diff --git a/CHANGELOG.md b/CHANGELOG.md index d7dced7081..6f405f7bcf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,14 +7,26 @@ This project adheres to [Semantic Versioning](http://semver.org/). ### Fixed - Improve `px.*_map()` auto-fitting behavior when `zoom` and `center` are not specified [[#5686](https://github.com/plotly/plotly.py/pull/5686)] +### Updated +- Update plotly.js from version 3.6.0 to version 4.0.0 [[#5673](https://github.com/plotly/plotly.py/pull/5673)]. This is a major-version release with many changes. See the [plotly.js release notes](https://github.com/plotly/plotly.js/releases/tag/v4.0.0) for the full list. The most significant changes include: + - Add `quiver` trace type to visualize vector fields using arrows [[#7710](https://github.com/plotly/plotly.js/pull/7710), [#7945](https://github.com/plotly/plotly.js/issues/7945)] + - Add "Share Chart" modebar button for generating a chart-sharing link via Plotly Cloud [[#7909](https://github.com/plotly/plotly.js/pull/7909)] + - Remove `scattermapbox`, `choroplethmapbox`, `densitymapbox` trace types, the `mapbox` subplot, and the `mapboxAccessToken` config option [[#7860](https://github.com/plotly/plotly.js/pull/7860)]. Use the equivalent `*map` traces instead. + - The corresponding `graph_objects` and Plotly Express functions have also been removed in plotly.py; use the `map` versions instead + - Drop support for MathJax v2, and add support for v4 [[#7898](https://github.com/plotly/plotly.js/pull/7898)]. MathJax is the JavaScript library used for rendering mathematical equations in plotly charts. + - Switch color processing library from [TinyColor](https://github.com/bgrins/TinyColor) to [culori](https://culorijs.org) [[#7536](https://github.com/plotly/plotly.js/pull/7536), [#7962](https://github.com/plotly/plotly.js/pull/7962)]. There are some changes to supported color string formats as a result: + - `rgb()`/`rgba()` strings with decimal 0–1 fractions are no longer supported + - `hsv()` color strings are no longer supported + - Strings with invalid syntax such as `hsl(120, 50% 50%)` are no longer supported + - New supported formats: `'#ff0000aa'`, `'#f00a'`, `'rgb(255 0 0)'`, `'rgba(255 0 0 / 0.5)'`, `'hsl(0 100% 50% / 0.5)'`, `'hsla(0, 100%, 50%, 0.5)'`, `'hwb(0, 0%, 0%)'`, `lab()`, `lch()`, `oklab()`, `oklch()`, `color()`, `hsl(0.5turn 60% 40%)`, `hsl(none 60% 40%)` + - Replace `country-regex` with `country-iso-search` to search for country names in choropleth, scattergeo traces [[#7856](https://github.com/plotly/plotly.js/pull/7856)]. Most country names are handled exactly the same; a small number of legacy entries have been removed. + - Change `layout.geo.fitbounds` default from `false` to `'locations'` [[#7895](https://github.com/plotly/plotly.js/pull/7895)]. `geo` subplots will now auto-fit the initial view to the trace data by default. + - Dynamically compute `center` and `zoom` values for `scattermap` and `densitymap` traces. The initial map view will now auto-fit to the trace data by default. Add `layout.map.fitbounds` attribute (default `'locations'`) to enable or disable auto-fitting behavior [[#7884](https://github.com/plotly/plotly.js/pull/7884), [#7913](https://github.com/plotly/plotly.js/pull/7913)] + - Fix GeoJSON bounding-box computation for `choropleth` and `scattergeo` traces whose geometry crosses the antimeridian [[#7891](https://github.com/plotly/plotly.js/pull/7891)] -## [7.0.0rc0] - 2026-07-29 -### Removed -- Remove the deprecated Figure Factory functions `create_2d_density`, `create_annotated_heatmap`, `create_bullet`, `create_candlestick`, `create_choropleth`, `create_distplot`, `create_facet_grid`, `create_gantt`, `create_hexbin_mapbox`, `create_ohlc`, `create_scatterplotmatrix`, and `create_violin` [[#5627](https://github.com/plotly/plotly.py/pull/5627)] -- Remove support for Kaleido versions less than v1.0.0 for static image generation [[#5677](https://github.com/plotly/plotly.py/pull/5677)] -- Remove support for Orca for static image generation [[#5677](https://github.com/plotly/plotly.py/pull/5677)] -- Remove `engine` argument from functions `fig.write_image()`,`fig.to_image()`, `pio.write_image()`, `pio.write_images()`, `pio.to_image()`, `pio.full_figure_for_development()`, and from renderer constructors [[#5677](https://github.com/plotly/plotly.py/pull/5677)] + +## [7.0.0rc0] - 2026-07-29 ### Fixed - Fix `hex_to_rgb` parsing of 3-digit shorthand hexadecimal colors such as `#FFF` [[#5662](https://github.com/plotly/plotly.py/pull/5662)], with thanks to @genrichez for the contribution! @@ -22,23 +34,15 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Apply `histfunc`/`z` aggregation to `marginal_x`/`marginal_y="histogram"` subplots in `density_heatmap`/`density_contour`, instead of always showing raw bin counts [[#3521](https://github.com/plotly/plotly.py/issues/3521)], with thanks to @lucasjamar for the contribution! - Fix `mpl_to_plotly` silently dropping matplotlib path collections in data coordinates (such as violin plots, pcolor, event plots, stack plots, fill_between, and stem plots) by rendering them as filled polygons or lines [[#5702](https://github.com/plotly/plotly.py/pull/5702)], with thanks to @robertoffmoura for the contribution! - -## [6.9.0] - 2026-07-09 - -### Fixed -- Raise a clear `ValueError` when an unsupported marginal plot type is passed to Plotly Express, instead of failing later with a cryptic `'NoneType' object has no attribute 'constructor'` message [[#5625](https://github.com/plotly/plotly.py/pull/5625)], with thanks to @eugen-goebel for the contribution! -- Read and write figure JSON files as UTF-8 in `read_json`/`write_json` so figures containing non-ASCII text are handled correctly on platforms whose default encoding is not UTF-8 (e.g. cp1252 on Windows) [[#5633](https://github.com/plotly/plotly.py/pull/5633)] - - -### Updated -- Update plotly.js from version 3.6.0 to version 3.7.0. See the plotly.js [release notes](https://github.com/plotly/plotly.js/releases/tag/v3.7.0) for more information [[#5639](https://github.com/plotly/plotly.py/pull/5639)]. Notable changes include: - - Rename `sendDataToCloud` modebar button to `sendChartToCloud`, and update to upload chart to Plotly Cloud [[#7802](https://github.com/plotly/plotly.js/pull/7802), [#7852](https://github.com/plotly/plotly.js/pull/7852), [#7854](https://github.com/plotly/plotly.js/pull/7854)]. NOTE: The Plotly Cloud endpoint for receiving charts is not yet functional, so this button won't complete the upload. - - Fix stale `scattergl` error bars after toggling traces with mixed error bar visibility [[#7773](https://github.com/plotly/plotly.js/issues/7773)], with thanks to @JulienIcon for the contribution! - - Fix geo `fitbounds` to choose a compact longitude range when point data straddles the antimeridian [[#7837](https://github.com/plotly/plotly.js/pull/7837)], with thanks to @SharadhNaidu for the contribution! +### Removed +- Remove the deprecated Figure Factory functions `create_2d_density`, `create_annotated_heatmap`, `create_bullet`, `create_candlestick`, `create_choropleth`, `create_distplot`, `create_facet_grid`, `create_gantt`, `create_hexbin_mapbox`, `create_ohlc`, `create_scatterplotmatrix`, and `create_violin` [[#5627](https://github.com/plotly/plotly.py/pull/5627)] +- Remove support for Kaleido versions less than v1.0.0 for static image generation [[#5677](https://github.com/plotly/plotly.py/pull/5677)] +- Remove support for Orca for static image generation [[#5677](https://github.com/plotly/plotly.py/pull/5677)] +- Remove `engine` argument from functions `fig.write_image()`,`fig.to_image()`, `pio.write_image()`, `pio.write_images()`, `pio.to_image()`, `pio.full_figure_for_development()`, and from renderer constructors [[#5677](https://github.com/plotly/plotly.py/pull/5677)] ### Updated - Update plotly.js from version 3.6.0 to version 4.0.0-rc.0 [[#5673](https://github.com/plotly/plotly.py/pull/5673)]. This is a major-version release candidate with many changes. See the [plotly.js release notes](https://github.com/plotly/plotly.js/releases/tag/v4.0.0-rc.0) for the full list. The most significant changes include: - - Add `quiver` trace type to visualize vector fields using arrows [[#7710](https://github.com/plotly/plotly.js/pull/7710)], with thanks to @degzhaus for the contribution! + - Add `quiver` trace type to visualize vector fields using arrows [[#7710](https://github.com/plotly/plotly.js/pull/7710)] - Add "Share Chart" modebar button for generating a chart-sharing link via Plotly Cloud [[#7909](https://github.com/plotly/plotly.js/pull/7909)] - Remove `scattermapbox`, `choroplethmapbox`, `densitymapbox` trace types, the `mapbox` subplot, and the `mapboxAccessToken` config option [[#7860](https://github.com/plotly/plotly.js/pull/7860)]. Use the equivalent `*map` traces instead. - The corresponding `graph_objects` and Plotly Express functions have also been removed in plotly.py; use the `map` versions instead @@ -49,9 +53,22 @@ This project adheres to [Semantic Versioning](http://semver.org/). - New supported formats: `'#ff0000aa'`, `'#f00a'`, `'rgb(255 0 0)'`, `'rgba(255 0 0 / 0.5)'`, `'hsl(0 100% 50% / 0.5)'`, `'hsla(0, 100%, 50%, 0.5)'`, `'hwb(0, 0%, 0%)'` - Replace `country-regex` with `country-iso-search` to search for country names in choropleth, scattergeo traces [[#7856](https://github.com/plotly/plotly.js/pull/7856)]. Most country names are handled exactly the same; a small number of legacy entries have been removed. - Change `layout.geo.fitbounds` default from `false` to `'locations'` [[#7895](https://github.com/plotly/plotly.js/pull/7895)]. `geo` subplots will now auto-fit the initial view to the trace data by default. - - Dynamically compute `center` and `zoom` values for `scattermap` and `densitymap` traces. The initial map view will now auto-fit to the trace data by default. Add `layout.map.fitbounds` attribute (default `'locations'`) to enable or disable auto-fitting behavior [[#7884](https://github.com/plotly/plotly.js/pull/7884), [#7913](https://github.com/plotly/plotly.js/pull/7913)], with thanks to @palmerusaf and @DhruvGarg111 for the contributions! + - Dynamically compute `center` and `zoom` values for `scattermap` and `densitymap` traces. The initial map view will now auto-fit to the trace data by default. Add `layout.map.fitbounds` attribute (default `'locations'`) to enable or disable auto-fitting behavior [[#7884](https://github.com/plotly/plotly.js/pull/7884), [#7913](https://github.com/plotly/plotly.js/pull/7913)] - Fix GeoJSON bounding-box computation for `choropleth` and `scattergeo` traces whose geometry crosses the antimeridian [[#7891](https://github.com/plotly/plotly.js/pull/7891)] +## [6.9.0] - 2026-07-09 + +### Fixed +- Raise a clear `ValueError` when an unsupported marginal plot type is passed to Plotly Express, instead of failing later with a cryptic `'NoneType' object has no attribute 'constructor'` message [[#5625](https://github.com/plotly/plotly.py/pull/5625)], with thanks to @eugen-goebel for the contribution! +- Read and write figure JSON files as UTF-8 in `read_json`/`write_json` so figures containing non-ASCII text are handled correctly on platforms whose default encoding is not UTF-8 (e.g. cp1252 on Windows) [[#5633](https://github.com/plotly/plotly.py/pull/5633)] + + +### Updated +- Update plotly.js from version 3.6.0 to version 3.7.0. See the plotly.js [release notes](https://github.com/plotly/plotly.js/releases/tag/v3.7.0) for more information [[#5639](https://github.com/plotly/plotly.py/pull/5639)]. Notable changes include: + - Rename `sendDataToCloud` modebar button to `sendChartToCloud`, and update to upload chart to Plotly Cloud [[#7802](https://github.com/plotly/plotly.js/pull/7802), [#7852](https://github.com/plotly/plotly.js/pull/7852), [#7854](https://github.com/plotly/plotly.js/pull/7854)] + - Fix stale `scattergl` error bars after toggling traces with mixed error bar visibility [[#7773](https://github.com/plotly/plotly.js/issues/7773)] + - Fix geo `fitbounds` to choose a compact longitude range when point data straddles the antimeridian [[#7837](https://github.com/plotly/plotly.js/pull/7837)] + ## [6.8.0] - 2026-06-03 ### Added diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3128518a24..952af48317 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -309,7 +309,7 @@ python commands.py updateplotlyjsdev --devrepo reponame --devbranch branchname This fetches the `plotly.js` in the CircleCI artifact of the branch `branchname` of the repo `reponame`. If `--devrepo` or `--devbranch` are omitted, -`updateplotlyjsdev` defaults to `plotly/plotly.js` and `master` respectively. +`updateplotlyjsdev` defaults to `plotly/plotly.js` and `main` respectively. ### Local Repository diff --git a/_plotly_utils/basevalidators.py b/_plotly_utils/basevalidators.py index 12ac5c43b9..1ffc63e5ad 100644 --- a/_plotly_utils/basevalidators.py +++ b/_plotly_utils/basevalidators.py @@ -1118,16 +1118,18 @@ def validate_coerce(self, v): class ColorValidator(BaseValidator): """ "color": { - "description": "A string describing color. Supported formats: + "description": "A string describing color. All CSS 4 color formats are supported, including: - hex or short hex (e.g. '#d3d3d3', '#d3d') - hex or short hex with alpha (e.g. '#d3d3d380', '#d3d8') - rgb (e.g. 'rgb(255, 0, 0)', 'rgb(255 0 0)') - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - named colors(full list: - http://www.w3.org/TR/css3-color/#svg-color)", + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - See full CSS 4 color spec: https://www.w3.org/TR/css-color-4/", "requiredOpts": [], "otherOpts": [ "dflt", @@ -1142,7 +1144,7 @@ class ColorValidator(BaseValidator): r"#([A-Fa-f0-9]{3}|[A-Fa-f0-9]{4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})" ) re_rgb_etc = re.compile( - r"((rgb|hsl)a?|hwb)\([\d.]+(%|deg)?([ ,] ?[\d.]+%?){2}([ /,] ?[\d.]+%?)?\)" + r"((rgb|hsl)a?|hwb|(ok)?(lab|lch))\([\d.]+(%|deg)?([ ,] ?[\d.]+%?){2}([ /,] ?[\d.]+%?)?\)|color\([\w-]+([ ,] ?[\d.]+){3,4}\)" ) re_ddk = re.compile(r"var\(\-\-.*\)") @@ -1323,8 +1325,11 @@ def description(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list""".format( + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/""".format( plotly_name=self.plotly_name ) diff --git a/codegen/resources/plot-schema.json b/codegen/resources/plot-schema.json index e43f9d2f2d..0412ea47de 100644 --- a/codegen/resources/plot-schema.json +++ b/codegen/resources/plot-schema.json @@ -427,7 +427,7 @@ "requiredOpts": [] }, "color": { - "description": "A string describing color. Supported formats: - hex (e.g. '#d3d3d3', '#d3d3d3aa') - rgb (e.g. 'rgb(255, 0, 0)', 'rgb(255 0 0)') - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)') - hwb (e.g. 'hwb(0, 0%, 0%)') - named colors (full list: http://www.w3.org/TR/css3-color/#svg-color)", + "description": "A string describing color. Supported formats: - hex (e.g. '#d3d3d3', '#d3d3d3aa') - rgb/rgba (e.g. 'rgb(255, 0, 0)', 'rgba(255 0 0 / 0.5)') - hsl/hsla (e.g. 'hsl(0, 100%, 50%)', 'hsla(0 100% 50% / 0.5)') - hwb (e.g. 'hwb(0 0% 0%)') - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') - color (e.g. 'color(display-p3 1 0 0)') - named colors (full list: https://www.w3.org/TR/css-color-4/#named-colors)", "otherOpts": [ "dflt", "arrayOk" @@ -1140,7 +1140,7 @@ ] }, "clickanywhere": { - "description": "If true, `plotly_click` events will fire for any click position within the plot area, not just over traces. When clicking where there is no trace data, the event will have an empty `points` array but will include `xvals` and `yvals` with click coordinates in data space.", + "description": "If true, `plotly_click` events will fire for any click position within the plot area, not just over traces. When clicking where there is no trace data, the event will have an empty `points` array but will include `xvals` and `yvals` with click coordinates in data space, and `xPixel` and `yPixel` with click coordinates in pixels, relative to the top-left corner of the graph div.", "dflt": false, "editType": "none", "valType": "boolean" @@ -2785,7 +2785,7 @@ "valType": "number" }, "hoveranywhere": { - "description": "If true, `plotly_hover` events will fire for any cursor position within the plot area, not just over traces. When the cursor is not over a trace, the event will have an empty `points` array but will include `xvals` and `yvals` with cursor coordinates in data space.", + "description": "If true, `plotly_hover` events will fire for any cursor position within the plot area, not just over traces. When the cursor is not over a trace, the event will have an empty `points` array but will include `xvals` and `yvals` with cursor coordinates in data space, and `xPixel` and `yPixel` with cursor coordinates in pixels, relative to the top-left corner of the graph div. A `plotly_unhover` event fires when the cursor leaves the plot area.", "dflt": false, "editType": "none", "valType": "boolean" @@ -49859,7 +49859,7 @@ "animatable": true, "attributes": { "anchor": { - "description": "Sets the arrows' anchor with respect to their (x,y) positions. Use *tail* to place (x,y) at the base, *tip* to place (x,y) at the head, or *center* to center the arrow on (x,y).", + "description": "Sets the vector arrows' anchor with respect to their (x,y) positions. Use *tail* to place (x,y) at the base, *tip* to place (x,y) at the head, or *center* to center the vector arrow on (x,y).", "dflt": "tail", "editType": "calc", "valType": "enumerated", @@ -49869,9 +49869,9 @@ "center" ] }, - "anglemode": { - "description": "Sets the mode used to determine the angle of the arrow vectors. If *paper*, u/v are interpreted in pixel coordinates and the rendered vector angle does not change regardless of the axes scales. If *data*, u/v are interpreted in data coordinates and the rendered vector angle may change, e.g. if zooming in along a single axis", - "dflt": "axis", + "arrowref": { + "description": "Determines how the u/v vector components are interpreted. If *paper*, u/v are interpreted in pixel coordinates and the rendered vector angle does not change regardless of the axis scales. If *data*, u/v are interpreted in data coordinates and the rendered vector angle may change, e.g. if zooming in along a single axis", + "dflt": "data", "editType": "calc", "valType": "enumerated", "values": [ @@ -50194,9 +50194,26 @@ "min": 0, "valType": "number" }, + "lengthfactor": { + "description": "Adjusts the drawn length of the vector arrows. The arrow length is determined by the values of u and v, then optionally rescaled when `lengthmode` is *scaled*, then multiplied by `lengthfactor`.", + "dflt": 1, + "editType": "calc", + "min": 0, + "valType": "number" + }, + "lengthmode": { + "description": "Determines whether vector arrows are drawn according to their raw lengths, or scaled based on the maximum vector length and point density. Note: When `arrowref` is *paper* vectors are always scaled and `lengthmode` *raw* is ignored.", + "dflt": "scaled", + "editType": "calc", + "valType": "enumerated", + "values": [ + "scaled", + "raw" + ] + }, "marker": { "arrowsize": { - "description": "Sets the size of the arrow head relative to `marker.line.width`. A value of 1 (default) gives a head about 3x as wide as the line.", + "description": "Sets the size of the vector arrowhead relative to `marker.line.width`. A value of 1 (default) gives a head about 3x as wide as the line.", "dflt": 1, "editType": "calc", "min": 0.3, @@ -50879,7 +50896,7 @@ "editType": "style", "role": "object", "width": { - "description": "Sets the width (in px) of the arrow lines.", + "description": "Sets the width (in px) of the vector arrow lines.", "dflt": 2, "editType": "style", "min": 0, @@ -50962,23 +50979,6 @@ "editType": "style", "valType": "boolean" }, - "sizemode": { - "description": "Determines whether arrows are drawn according to their raw lengths, or scaled based on the maximum vector length and point density. Note: When `anglemode` is *data* arrows are alwyas scaled and `sizemode` *raw* is ignored.", - "dflt": "scaled", - "editType": "calc", - "valType": "enumerated", - "values": [ - "scaled", - "raw" - ] - }, - "sizeref": { - "description": "Adjusts the arrow size scaling. The arrow length is determined by the vector norm multiplied by `sizeref`, optionally normalized when `sizemode` is *scaled* (`sizeref` is applied after scaling).", - "dflt": 1, - "editType": "calc", - "min": 0, - "valType": "number" - }, "text": { "arrayOk": true, "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.", @@ -51105,7 +51105,7 @@ "type": "quiver", "u": { "anim": true, - "description": "Sets the x components of the arrow vectors.", + "description": "Sets the x components of the vector arrows.", "editType": "calc", "valType": "data_array" }, @@ -51160,7 +51160,7 @@ }, "v": { "anim": true, - "description": "Sets the y components of the arrow vectors.", + "description": "Sets the y components of the vector arrows.", "editType": "calc", "valType": "data_array" }, @@ -51183,7 +51183,7 @@ }, "x": { "anim": true, - "description": "Sets the x coordinates of the arrow locations.", + "description": "Sets the x coordinates of the vector arrow locations.", "editType": "calc+clearAxisTypes", "valType": "data_array" }, @@ -51208,7 +51208,7 @@ }, "y": { "anim": true, - "description": "Sets the y coordinates of the arrow locations.", + "description": "Sets the y coordinates of the vector arrow locations.", "editType": "calc+clearAxisTypes", "valType": "data_array" }, @@ -51264,6 +51264,16 @@ "editType": "calc", "valType": "data_array" }, + "direction": { + "description": "Sets the direction of the flow along the `orientation` axis. With `forward` (the default), sources are on the left (horizontal) or top (vertical). With `reversed`, sources are on the right (horizontal) or bottom (vertical).", + "dflt": "forward", + "editType": "calc", + "valType": "enumerated", + "values": [ + "forward", + "reversed" + ] + }, "domain": { "column": { "description": "If there is a layout grid, use the domain for this column in the grid for this sankey trace.", @@ -52187,7 +52197,7 @@ } }, "orientation": { - "description": "Sets the orientation of the Sankey diagram.", + "description": "Sets the orientation of the Sankey diagram. With `h` (the default), the flow runs horizontally. With `v`, the flow runs vertically. Use `direction` to control which side the sources are placed on.", "dflt": "h", "editType": "calc", "valType": "enumerated", diff --git a/commands.py b/commands.py index 6080901edb..a258980555 100644 --- a/commands.py +++ b/commands.py @@ -228,8 +228,8 @@ def update_plotlyjs(plotly_js_version, outdir): # FIXME: switch to argparse -def update_schema_bundle_from_master(args): - """Update the plotly.js schema and bundle from master.""" +def update_schema_bundle_from_main(args): + """Update the plotly.js schema and bundle from main.""" if args.local is None: build_info = get_latest_commit_info(args.devrepo, args.devbranch) archive_url, bundle_url, schema_url = get_github_urls( @@ -276,7 +276,7 @@ def update_schema_bundle_from_master(args): def update_plotlyjs_dev(args, outdir): """Update project to a new development version of plotly.js.""" - update_schema_bundle_from_master(args) + update_schema_bundle_from_main(args) perform_codegen(outdir) @@ -484,7 +484,7 @@ def make_parser(): p_update_dev.add_argument( "--devrepo", default="plotly/plotly.js", help="repository" ) - p_update_dev.add_argument("--devbranch", default="master", help="branch") + p_update_dev.add_argument("--devbranch", default="main", help="branch") p_update_dev.add_argument("--local", default=None, help="local path") subparsers.add_parser("updateplotlyjs", help="update plotly.js") diff --git a/js/lib/mimeExtension.js b/js/lib/mimeExtension.js index 3db25b997c..ff2ee9a60b 100644 --- a/js/lib/mimeExtension.js +++ b/js/lib/mimeExtension.js @@ -1,90 +1,93 @@ -var wI=Object.create;var q5=Object.defineProperty;var TI=Object.getOwnPropertyDescriptor;var AI=Object.getOwnPropertyNames;var MI=Object.getPrototypeOf,SI=Object.prototype.hasOwnProperty;var Ny=(gt,ve)=>()=>(ve||gt((ve={exports:{}}).exports,ve),ve.exports);var EI=(gt,ve,rt,lt)=>{if(ve&&typeof ve=="object"||typeof ve=="function")for(let Tt of AI(ve))!SI.call(gt,Tt)&&Tt!==rt&&q5(gt,Tt,{get:()=>ve[Tt],enumerable:!(lt=TI(ve,Tt))||lt.enumerable});return gt};var Jh=(gt,ve,rt)=>(rt=gt!=null?wI(MI(gt)):{},EI(ve||!gt||!gt.__esModule?q5(rt,"default",{value:gt,enumerable:!0}):rt,gt));var rv=Ny((wm,V5)=>{(function(gt,ve){typeof wm=="object"&&typeof V5<"u"?ve(wm):typeof define=="function"&&define.amd?define(["exports"],ve):(gt=typeof globalThis<"u"?globalThis:gt||self,ve(gt.lumino_algorithm={}))})(wm,function(gt){"use strict";gt.ArrayExt=void 0,function(An){function yi(Fi,Oi,Un=0,jn=-1){let Nn=Fi.length;if(Nn===0)return-1;Un<0?Un=Math.max(0,Un+Nn):Un=Math.min(Un,Nn-1),jn<0?jn=Math.max(0,jn+Nn):jn=Math.min(jn,Nn-1);let Yi;jn0;){let Gf=ol>>1,ih=ko+Gf;Un(Fi[ih],Oi)<0?(ko=ih+1,ol-=Gf+1):ol=Gf}return ko}An.lowerBound=Gs;function Pu(Fi,Oi,Un,jn=0,Nn=-1){let Yi=Fi.length;if(Yi===0)return 0;jn<0?jn=Math.max(0,jn+Yi):jn=Math.min(jn,Yi-1),Nn<0?Nn=Math.max(0,Nn+Yi):Nn=Math.min(Nn,Yi-1);let ko=jn,ol=Nn-jn+1;for(;ol>0;){let Gf=ol>>1,ih=ko+Gf;Un(Fi[ih],Oi)>0?ol=Gf:(ko=ih+1,ol-=Gf+1)}return ko}An.upperBound=Pu;function Vl(Fi,Oi,Un){if(Fi===Oi)return!0;if(Fi.length!==Oi.length)return!1;for(let jn=0,Nn=Fi.length;jn=Yi&&(Un=Nn<0?Yi-1:Yi),jn===void 0?jn=Nn<0?-1:Yi:jn<0?jn=Math.max(jn+Yi,Nn<0?-1:0):jn>=Yi&&(jn=Nn<0?Yi-1:Yi);let ko;Nn<0&&jn>=Un||Nn>0&&Un>=jn?ko=0:Nn<0?ko=Math.floor((jn-Un+1)/Nn+1):ko=Math.floor((jn-Un-1)/Nn+1);let ol=[];for(let Gf=0;Gf=jn))return;let Yi=jn-Un+1;if(Oi>0?Oi=Oi%Yi:Oi<0&&(Oi=(Oi%Yi+Yi)%Yi),Oi===0)return;let ko=Un+Oi;cu(Fi,Un,ko-1),cu(Fi,ko,jn),cu(Fi,Un,jn)}An.rotate=Ic;function nh(Fi,Oi,Un=0,jn=-1){let Nn=Fi.length;if(Nn===0)return;Un<0?Un=Math.max(0,Un+Nn):Un=Math.min(Un,Nn-1),jn<0?jn=Math.max(0,jn+Nn):jn=Math.min(jn,Nn-1);let Yi;jnOi;--Nn)Fi[Nn]=Fi[Nn-1];Fi[Oi]=Un}An.insert=Cd;function oo(Fi,Oi){let Un=Fi.length;if(Oi<0&&(Oi+=Un),Oi<0||Oi>=Un)return;let jn=Fi[Oi];for(let Nn=Oi+1;Nn=Un&&ko<=jn&&Fi[ko]===Oi||jn=Un)&&Fi[ko]===Oi?Yi++:Yi>0&&(Fi[ko-Yi]=Fi[ko]);return Yi>0&&(Fi.length=Nn-Yi),Yi}An.removeAllOf=Nh;function Ld(Fi,Oi,Un=0,jn=-1){let Nn,Yi=Gn(Fi,Oi,Un,jn);return Yi!==-1&&(Nn=oo(Fi,Yi)),{index:Yi,value:Nn}}An.removeFirstWhere=Ld;function Rs(Fi,Oi,Un=-1,jn=0){let Nn,Yi=ys(Fi,Oi,Un,jn);return Yi!==-1&&(Nn=oo(Fi,Yi)),{index:Yi,value:Nn}}An.removeLastWhere=Rs;function ld(Fi,Oi,Un=0,jn=-1){let Nn=Fi.length;if(Nn===0)return 0;Un<0?Un=Math.max(0,Un+Nn):Un=Math.min(Un,Nn-1),jn<0?jn=Math.max(0,jn+Nn):jn=Math.min(jn,Nn-1);let Yi=0;for(let ko=0;ko=Un&&ko<=jn&&Oi(Fi[ko],ko)||jn=Un)&&Oi(Fi[ko],ko)?Yi++:Yi>0&&(Fi[ko-Yi]=Fi[ko]);return Yi>0&&(Fi.length=Nn-Yi),Yi}An.removeAllWhere=ld}(gt.ArrayExt||(gt.ArrayExt={}));function*ve(...An){for(let yi of An)yield*yi}function*rt(){}function*lt(An,yi=0){for(let yn of An)yield[yi++,yn]}function*Tt(An,yi){let yn=0;for(let Gn of An)yi(Gn,yn++)&&(yield Gn)}function zt(An,yi){let yn=0;for(let Gn of An)if(yi(Gn,yn++))return Gn}function Lr(An,yi){let yn=0;for(let Gn of An)if(yi(Gn,yn++))return yn-1;return-1}function gr(An,yi){let yn;for(let Gn of An){if(yn===void 0){yn=Gn;continue}yi(Gn,yn)<0&&(yn=Gn)}return yn}function Mr(An,yi){let yn;for(let Gn of An){if(yn===void 0){yn=Gn;continue}yi(Gn,yn)>0&&(yn=Gn)}return yn}function Ur(An,yi){let yn=!0,Gn,ys;for(let Us of An)yn?(Gn=Us,ys=Us,yn=!1):yi(Us,Gn)<0?Gn=Us:yi(Us,ys)>0&&(ys=Us);return yn?void 0:[Gn,ys]}function wr(An){return Array.from(An)}function Ir(An){let yi={};for(let[yn,Gn]of An)yi[yn]=Gn;return yi}function Hr(An,yi){let yn=0;for(let Gn of An)if(yi(Gn,yn++)===!1)return}function Rr(An,yi){let yn=0;for(let Gn of An)if(yi(Gn,yn++)===!1)return!1;return!0}function Br(An,yi){let yn=0;for(let Gn of An)if(yi(Gn,yn++))return!0;return!1}function*Pr(An,yi){let yn=0;for(let Gn of An)yield yi(Gn,yn++)}function*xe(An,yi,yn){yi===void 0?(yi=An,An=0,yn=1):yn===void 0&&(yn=1);let Gn=Xa.rangeLength(An,yi,yn);for(let ys=0;ysGn&&ys>0||yn-1;yi--)yield An[yi]}function Pn(An){let yi=[],yn=new Set,Gn=new Map;for(let rs of An)ys(rs);for(let[rs]of Gn)Us(rs);return yi;function ys(rs){let[Gs,Pu]=rs,Vl=Gn.get(Pu);Vl?Vl.push(Gs):Gn.set(Pu,[Gs])}function Us(rs){if(yn.has(rs))return;yn.add(rs);let Gs=Gn.get(rs);if(Gs)for(let Pu of Gs)Us(Pu);yi.push(rs)}}function*Na(An,yi){let yn=0;for(let Gn of An)yn++%yi===0&&(yield Gn)}gt.StringExt=void 0,function(An){function yi(rs,Gs,Pu=0){let Vl=new Array(Gs.length);for(let Fl=0,uu=Pu,cu=Gs.length;FlGs?1:0}An.cmp=Us}(gt.StringExt||(gt.StringExt={}));function*ii(An,yi){if(yi<1)return;let yn=An[Symbol.iterator](),Gn;for(;0Gn[Symbol.iterator]()),yn=yi.map(Gn=>Gn.next());for(;Rr(yn,Gn=>!Gn.done);yn=yi.map(Gn=>Gn.next()))yield yn.map(Gn=>Gn.value)}gt.chain=ve,gt.each=Hr,gt.empty=rt,gt.enumerate=lt,gt.every=Rr,gt.filter=Tt,gt.find=zt,gt.findIndex=Lr,gt.map=Pr,gt.max=Mr,gt.min=gr,gt.minmax=Ur,gt.once=Ta,gt.range=xe,gt.reduce=Ka,gt.repeat=da,gt.retro=Ja,gt.some=Br,gt.stride=Na,gt.take=ii,gt.toArray=wr,gt.toObject=Ir,gt.topologicSort=Pn,gt.zip=Ni})});var Am=Ny((Tm,H5)=>{(function(gt,ve){typeof Tm=="object"&&typeof H5<"u"?ve(Tm,rv()):typeof define=="function"&&define.amd?define(["exports","@lumino/algorithm"],ve):(gt=typeof globalThis<"u"?globalThis:gt||self,ve(gt.lumino_coreutils={},gt.lumino_algorithm))})(Tm,function(gt,ve){"use strict";gt.JSONExt=void 0,function(Ur){Ur.emptyObject=Object.freeze({}),Ur.emptyArray=Object.freeze([]);function wr(da){return da===null||typeof da=="boolean"||typeof da=="number"||typeof da=="string"}Ur.isPrimitive=wr;function Ir(da){return Array.isArray(da)}Ur.isArray=Ir;function Hr(da){return!wr(da)&&!Ir(da)}Ur.isObject=Hr;function Rr(da,Ta){if(da===Ta)return!0;if(wr(da)||wr(Ta))return!1;let Ja=Ir(da),Pn=Ir(Ta);return Ja!==Pn?!1:Ja&&Pn?Pr(da,Ta):xe(da,Ta)}Ur.deepEqual=Rr;function Br(da){return wr(da)?da:Ir(da)?Xa(da):Ka(da)}Ur.deepCopy=Br;function Pr(da,Ta){if(da===Ta)return!0;if(da.length!==Ta.length)return!1;for(let Ja=0,Pn=da.length;Ja!0,this._plugins=new Map,this._services=new Map,wr.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=wr.validatePlugin)}get application(){return this._application}set application(wr){if(this._application!==null)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=wr}get deferredPlugins(){return Array.from(this._plugins).filter(([wr,Ir])=>Ir.autoStart==="defer").map(([wr,Ir])=>wr)}getPluginDescription(wr){var Ir,Hr;return(Hr=(Ir=this._plugins.get(wr))===null||Ir===void 0?void 0:Ir.description)!==null&&Hr!==void 0?Hr:""}hasPlugin(wr){return this._plugins.has(wr)}isPluginActivated(wr){var Ir,Hr;return(Hr=(Ir=this._plugins.get(wr))===null||Ir===void 0?void 0:Ir.activated)!==null&&Hr!==void 0?Hr:!1}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(wr){if(this._plugins.has(wr.id))throw new TypeError(`Plugin '${wr.id}' is already registered.`);if(!this._validatePlugin(wr))throw new Error(`Plugin '${wr.id}' is not valid.`);let Ir=Tt.createPluginData(wr);Tt.ensureNoCycle(Ir,this._plugins,this._services),Ir.provides&&this._services.set(Ir.provides,Ir.id),this._plugins.set(Ir.id,Ir)}registerPlugins(wr){for(let Ir of wr)this.registerPlugin(Ir)}deregisterPlugin(wr,Ir){let Hr=this._plugins.get(wr);if(Hr){if(Hr.activated&&!Ir)throw new Error(`Plugin '${wr}' is still active.`);this._plugins.delete(wr)}}async activatePlugin(wr){let Ir=this._plugins.get(wr);if(!Ir)throw new ReferenceError(`Plugin '${wr}' is not registered.`);if(Ir.activated)return;if(Ir.promise)return Ir.promise;let Hr=Ir.requires.map(Br=>this.resolveRequiredService(Br)),Rr=Ir.optional.map(Br=>this.resolveOptionalService(Br));return Ir.promise=Promise.all([...Hr,...Rr]).then(Br=>Ir.activate.apply(void 0,[this.application,...Br])).then(Br=>{Ir.service=Br,Ir.activated=!0,Ir.promise=null}).catch(Br=>{throw Ir.promise=null,Br}),Ir.promise}async activatePlugins(wr,Ir={}){switch(wr){case"defer":{let Hr=this.deferredPlugins.filter(Rr=>this._plugins.get(Rr).autoStart).map(Rr=>this.activatePlugin(Rr));await Promise.all(Hr);break}case"startUp":{let Rr=Tt.collectStartupPlugins(this._plugins,Ir).map(async Br=>{try{return await this.activatePlugin(Br)}catch(Pr){console.error(`Plugin '${Br}' failed to activate.`,Pr)}});await Promise.all(Rr);break}}}async deactivatePlugin(wr){let Ir=this._plugins.get(wr);if(!Ir)throw new ReferenceError(`Plugin '${wr}' is not registered.`);if(!Ir.activated)return[];if(!Ir.deactivate)throw new TypeError(`Plugin '${wr}'#deactivate() method missing`);let Hr=Tt.findDependents(wr,this._plugins,this._services),Rr=Hr.map(Br=>this._plugins.get(Br));for(let Br of Rr)if(!Br.deactivate)throw new TypeError(`Plugin ${Br.id}#deactivate() method missing (depends on ${wr})`);for(let Br of Rr){let Pr=[...Br.requires,...Br.optional].map(xe=>{let Xa=this._services.get(xe);return Xa?this._plugins.get(Xa).service:null});await Br.deactivate(this.application,...Pr),Br.service=null,Br.activated=!1}return Hr.pop(),Hr}async resolveRequiredService(wr){let Ir=this._services.get(wr);if(!Ir)throw new TypeError(`No provider for: ${wr.name}.`);let Hr=this._plugins.get(Ir);return Hr.activated||await this.activatePlugin(Ir),Hr.service}async resolveOptionalService(wr){let Ir=this._services.get(wr);if(!Ir)return null;let Hr=this._plugins.get(Ir);if(!Hr.activated)try{await this.activatePlugin(Ir)}catch(Rr){return console.error(Rr),null}return Hr.service}}var Tt;(function(Ur){class wr{constructor(xe){var Xa,Ka,da,Ta;this._activated=!1,this._promise=null,this._service=null,this.id=xe.id,this.description=(Xa=xe.description)!==null&&Xa!==void 0?Xa:"",this.activate=xe.activate,this.deactivate=(Ka=xe.deactivate)!==null&&Ka!==void 0?Ka:null,this.provides=(da=xe.provides)!==null&&da!==void 0?da:null,this.autoStart=(Ta=xe.autoStart)!==null&&Ta!==void 0?Ta:!1,this.requires=xe.requires?xe.requires.slice():[],this.optional=xe.optional?xe.optional.slice():[]}get activated(){return this._activated}set activated(xe){this._activated=xe}get service(){return this._service}set service(xe){this._service=xe}get promise(){return this._promise}set promise(xe){this._promise=xe}}function Ir(Pr){return new wr(Pr)}Ur.createPluginData=Ir;function Hr(Pr,xe,Xa){let Ka=[...Pr.requires,...Pr.optional],da=Ja=>{if(Ja===Pr.provides)return!0;let Pn=Xa.get(Ja);if(!Pn)return!1;let Na=xe.get(Pn),ii=[...Na.requires,...Na.optional];return ii.length===0?!1:(Ta.push(Pn),ii.some(da)?!0:(Ta.pop(),!1))};if(!Pr.provides||Ka.length===0)return;let Ta=[Pr.id];if(Ka.some(da))throw new ReferenceError(`Cycle detected: ${Ta.join(" -> ")}.`)}Ur.ensureNoCycle=Hr;function Rr(Pr,xe,Xa){let Ka=new Array,da=ii=>{let Ni=xe.get(ii),An=[...Ni.requires,...Ni.optional];Ka.push(...An.reduce((yi,yn)=>{let Gn=Xa.get(yn);return Gn&&yi.push([ii,Gn]),yi},[]))};for(let ii of xe.keys())da(ii);let Ta=Ka.filter(ii=>ii[1]===Pr),Ja=0;for(;Ta.length>Ja;){let ii=Ta.length,Ni=new Set(Ta.map(An=>An[0]));for(let An of Ni)Ka.filter(yi=>yi[1]===An).forEach(yi=>{Ta.includes(yi)||Ta.push(yi)});Ja=ii}let Pn=ve.topologicSort(Ta),Na=Pn.findIndex(ii=>ii===Pr);return Na===-1?[Pr]:Pn.slice(0,Na+1)}Ur.findDependents=Rr;function Br(Pr,xe){let Xa=new Set;for(let Ka of Pr.keys())Pr.get(Ka).autoStart===!0&&Xa.add(Ka);if(xe.startPlugins)for(let Ka of xe.startPlugins)Xa.add(Ka);if(xe.ignorePlugins)for(let Ka of xe.ignorePlugins)Xa.delete(Ka);return Array.from(Xa)}Ur.collectStartupPlugins=Br})(Tt||(Tt={}));class zt{constructor(){this.promise=new Promise((wr,Ir)=>{this._resolve=wr,this._reject=Ir})}resolve(wr){let Ir=this._resolve;Ir(wr)}reject(wr){let Ir=this._reject;Ir(wr)}}class Lr{constructor(wr,Ir){this.name=wr,this.description=Ir??"",this._tokenStructuralPropertyT=null}}function gr(Ur){let wr=0;for(let Ir=0,Hr=Ur.length;Ir>>0),Ur[Ir]=wr&255,wr>>>=8}gt.Random=void 0,function(Ur){Ur.getRandomValues=(()=>{let wr=typeof window<"u"&&(window.crypto||window.msCrypto)||null;return wr&&typeof wr.getRandomValues=="function"?function(Hr){return wr.getRandomValues(Hr)}:gr})()}(gt.Random||(gt.Random={}));function Mr(Ur){let wr=new Uint8Array(16),Ir=new Array(256);for(let Hr=0;Hr<16;++Hr)Ir[Hr]="0"+Hr.toString(16);for(let Hr=16;Hr<256;++Hr)Ir[Hr]=Hr.toString(16);return function(){return Ur(wr),wr[6]=64|wr[6]&15,wr[8]=128|wr[8]&63,Ir[wr[0]]+Ir[wr[1]]+Ir[wr[2]]+Ir[wr[3]]+"-"+Ir[wr[4]]+Ir[wr[5]]+"-"+Ir[wr[6]]+Ir[wr[7]]+"-"+Ir[wr[8]]+Ir[wr[9]]+"-"+Ir[wr[10]]+Ir[wr[11]]+Ir[wr[12]]+Ir[wr[13]]+Ir[wr[14]]+Ir[wr[15]]}}gt.UUID=void 0,function(Ur){Ur.uuid4=Mr(gt.Random.getRandomValues)}(gt.UUID||(gt.UUID={})),gt.MimeData=rt,gt.PluginRegistry=lt,gt.PromiseDelegate=zt,gt.Token=Lr})});var Q5=Ny((J5,Fm)=>{(function(gt,ve){typeof Fm=="object"&&Fm.exports?Fm.exports=ve():gt.moduleName=ve()})(typeof self<"u"?self:J5,()=>{"use strict";var gt=(()=>{var ve=Object.create,rt=Object.defineProperty,lt=Object.defineProperties,Tt=Object.getOwnPropertyDescriptor,zt=Object.getOwnPropertyDescriptors,Lr=Object.getOwnPropertyNames,gr=Object.getOwnPropertySymbols,Mr=Object.getPrototypeOf,Ur=Object.prototype.hasOwnProperty,wr=Object.prototype.propertyIsEnumerable,Ir=(U,O,u)=>O in U?rt(U,O,{enumerable:!0,configurable:!0,writable:!0,value:u}):U[O]=u,Hr=(U,O)=>{for(var u in O||(O={}))Ur.call(O,u)&&Ir(U,u,O[u]);if(gr)for(var u of gr(O))wr.call(O,u)&&Ir(U,u,O[u]);return U},Rr=(U,O)=>lt(U,zt(O)),Br=(U,O)=>{var u={};for(var v in U)Ur.call(U,v)&&O.indexOf(v)<0&&(u[v]=U[v]);if(U!=null&&gr)for(var v of gr(U))O.indexOf(v)<0&&wr.call(U,v)&&(u[v]=U[v]);return u},Pr=(U,O,u)=>function(){if(u)throw u[0];try{return U&&(O=(0,U[Lr(U)[0]])(U=0)),O}catch(w){throw u=[w],w}},xe=(U,O)=>function(){try{return O||(0,U[Lr(U)[0]])((O={exports:{}}).exports,O),O.exports}catch(v){throw O=0,v}},Xa=(U,O)=>{for(var u in O)rt(U,u,{get:O[u],enumerable:!0})},Ka=(U,O,u,v)=>{if(O&&typeof O=="object"||typeof O=="function")for(let w of Lr(O))!Ur.call(U,w)&&w!==u&&rt(U,w,{get:()=>O[w],enumerable:!(v=Tt(O,w))||v.enumerable});return U},da=(U,O,u)=>(u=U!=null?ve(Mr(U)):{},Ka(O||!U||!U.__esModule?rt(u,"default",{value:U,enumerable:!0}):u,U)),Ta=U=>Ka(rt({},"__esModule",{value:!0}),U),Ja=xe({"src/version.js"(U){"use strict";U.version="4.0.0-rc.0"}}),Pn=xe({"node_modules/native-promise-only/lib/npo.src.js"(U,O){(function(v,w,S){w[v]=w[v]||S(),typeof O<"u"&&O.exports&&(O.exports=w[v])})("Promise",typeof window<"u"?window:U,function(){"use strict";var v,w,S,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(b){return setImmediate(b)}:setTimeout;try{Object.defineProperty({},"x",{}),v=function(b,M,A,E){return Object.defineProperty(b,M,{value:A,writable:!0,configurable:E!==!1})}}catch{v=function(M,A,E){return M[A]=E,M}}S=function(){var b,M,A;function E(g,T){this.fn=g,this.self=T,this.next=void 0}return{add:function(T,m){A=new E(T,m),M?M.next=A:b=A,M=A,A=void 0},drain:function(){var T=b;for(b=M=w=void 0;T;)T.fn.call(T.self),T=T.next}}}();function t(o,b){S.add(o,b),w||(w=e(S.drain))}function a(o){var b,M=typeof o;return o!=null&&(M=="object"||M=="function")&&(b=o.then),typeof b=="function"?b:!1}function r(){for(var o=0;o0&&t(r,M))}catch(A){s.call(new p(M),A)}}}function s(o){var b=this;b.triggered||(b.triggered=!0,b.def&&(b=b.def),b.msg=o,b.state=2,b.chain.length>0&&t(r,b))}function c(o,b,M,A){for(var E=0;Ewe?1:le>=we?0:NaN}u.descending=function(le,we){return wele?1:we>=le?0:NaN},u.min=function(le,we){var Be=-1,$e=le.length,Je,it;if(arguments.length===1){for(;++Be<$e;)if((it=le[Be])!=null&&it>=it){Je=it;break}for(;++Be<$e;)(it=le[Be])!=null&&Je>it&&(Je=it)}else{for(;++Be<$e;)if((it=we.call(le,le[Be],Be))!=null&&it>=it){Je=it;break}for(;++Be<$e;)(it=we.call(le,le[Be],Be))!=null&&Je>it&&(Je=it)}return Je},u.max=function(le,we){var Be=-1,$e=le.length,Je,it;if(arguments.length===1){for(;++Be<$e;)if((it=le[Be])!=null&&it>=it){Je=it;break}for(;++Be<$e;)(it=le[Be])!=null&&it>Je&&(Je=it)}else{for(;++Be<$e;)if((it=we.call(le,le[Be],Be))!=null&&it>=it){Je=it;break}for(;++Be<$e;)(it=we.call(le,le[Be],Be))!=null&&it>Je&&(Je=it)}return Je},u.extent=function(le,we){var Be=-1,$e=le.length,Je,it,Ct;if(arguments.length===1){for(;++Be<$e;)if((it=le[Be])!=null&&it>=it){Je=Ct=it;break}for(;++Be<$e;)(it=le[Be])!=null&&(Je>it&&(Je=it),Ct=it){Je=Ct=it;break}for(;++Be<$e;)(it=we.call(le,le[Be],Be))!=null&&(Je>it&&(Je=it),Ct1)return Ct/(qt-1)},u.deviation=function(){var le=u.variance.apply(this,arguments);return le&&Math.sqrt(le)};function f(le){return{left:function(we,Be,$e,Je){for(arguments.length<3&&($e=0),arguments.length<4&&(Je=we.length);$e>>1;le(we[it],Be)<0?$e=it+1:Je=it}return $e},right:function(we,Be,$e,Je){for(arguments.length<3&&($e=0),arguments.length<4&&(Je=we.length);$e>>1;le(we[it],Be)>0?Je=it:$e=it+1}return $e}}}var d=f(s);u.bisectLeft=d.left,u.bisect=u.bisectRight=d.right,u.bisector=function(le){return f(le.length===1?function(we,Be){return s(le(we),Be)}:le)},u.shuffle=function(le,we,Be){($e=arguments.length)<3&&(Be=le.length,$e<2&&(we=0));for(var $e=Be-we,Je,it;$e;)it=Math.random()*$e--|0,Je=le[$e+we],le[$e+we]=le[it+we],le[it+we]=Je;return le},u.permute=function(le,we){for(var Be=we.length,$e=new Array(Be);Be--;)$e[Be]=le[we[Be]];return $e},u.pairs=function(le){for(var we=0,Be=le.length-1,$e,Je=le[0],it=new Array(Be<0?0:Be);we=0;)for(Ct=le[we],Be=Ct.length;--Be>=0;)it[--Je]=Ct[Be];return it};var o=Math.abs;u.range=function(le,we,Be){if(arguments.length<3&&(Be=1,arguments.length<2&&(we=le,le=0)),(we-le)/Be===1/0)throw new Error("infinite range");var $e=[],Je=b(o(Be)),it=-1,Ct;if(le*=Je,we*=Je,Be*=Je,Be<0)for(;(Ct=le+Be*++it)>we;)$e.push(Ct/Je);else for(;(Ct=le+Be*++it)=we.length)return Je?Je.call(le,qt):$e?qt.sort($e):qt;for(var ur=-1,qr=qt.length,Nr=we[sr++],ya,Ea,Zr,oa=new A,ma;++ur=we.length)return bt;var sr=[],ur=Be[qt++];return bt.forEach(function(qr,Nr){sr.push({key:qr,values:Ct(Nr,qt)})}),ur?sr.sort(function(qr,Nr){return ur(qr.key,Nr.key)}):sr}return le.map=function(bt,qt){return it(qt,bt,0)},le.entries=function(bt){return Ct(it(u.map,bt,0),0)},le.key=function(bt){return we.push(bt),le},le.sortKeys=function(bt){return Be[we.length-1]=bt,le},le.sortValues=function(bt){return $e=bt,le},le.rollup=function(bt){return Je=bt,le},le},u.set=function(le){var we=new F;if(le)for(var Be=0,$e=le.length;Be<$e;++Be)we.add(le[Be]);return we};function F(){this._=Object.create(null)}M(F,{has:h,add:function(le){return this._[T(le+="")]=!0,le},remove:x,values:_,size:D,empty:C,forEach:function(le){for(var we in this._)le.call(this,m(we))}}),u.behavior={};function I(le){return le}u.rebind=function(le,we){for(var Be=1,$e=arguments.length,Je;++Be<$e;)le[Je=arguments[Be]]=z(le,we,we[Je]);return le};function z(le,we,Be){return function(){var $e=Be.apply(we,arguments);return $e===we?le:$e}}function R(le,we){if(we in le)return we;we=we.charAt(0).toUpperCase()+we.slice(1);for(var Be=0,$e=k.length;Be<$e;++Be){var Je=k[Be]+we;if(Je in le)return Je}}var k=["webkit","ms","moz","Moz","o","O"];function B(){}u.dispatch=function(){for(var le=new N,we=-1,Be=arguments.length;++we=0&&($e=le.slice(Be+1),le=le.slice(0,Be)),le)return arguments.length<2?this[le].on($e):this[le].on($e,we);if(arguments.length===2){if(we==null)for(le in this)this.hasOwnProperty(le)&&this[le].on($e,null);return this}};function q(le){var we=[],Be=new A;function $e(){for(var Je=we,it=-1,Ct=Je.length,bt;++it=0&&(Be=le.slice(0,we))!=="xmlns"&&(le=le.slice(we+1)),ue.hasOwnProperty(Be)?{space:ue[Be],local:le}:le}},X.attr=function(le,we){if(arguments.length<2){if(typeof le=="string"){var Be=this.node();return le=u.ns.qualify(le),le.local?Be.getAttributeNS(le.space,le.local):Be.getAttribute(le)}for(we in le)this.each(pe(we,le[we]));return this}return this.each(pe(le,we))};function pe(le,we){le=u.ns.qualify(le);function Be(){this.removeAttribute(le)}function $e(){this.removeAttributeNS(le.space,le.local)}function Je(){this.setAttribute(le,we)}function it(){this.setAttributeNS(le.space,le.local,we)}function Ct(){var qt=we.apply(this,arguments);qt==null?this.removeAttribute(le):this.setAttribute(le,qt)}function bt(){var qt=we.apply(this,arguments);qt==null?this.removeAttributeNS(le.space,le.local):this.setAttributeNS(le.space,le.local,qt)}return we==null?le.local?$e:Be:typeof we=="function"?le.local?bt:Ct:le.local?it:Je}function ge(le){return le.trim().replace(/\s+/g," ")}X.classed=function(le,we){if(arguments.length<2){if(typeof le=="string"){var Be=this.node(),$e=(le=Se(le)).length,Je=-1;if(we=Be.classList){for(;++Je<$e;)if(!we.contains(le[Je]))return!1}else for(we=Be.getAttribute("class");++Je<$e;)if(!Te(le[Je]).test(we))return!1;return!0}for(we in le)this.each(Ce(we,le[we]));return this}return this.each(Ce(le,we))};function Te(le){return new RegExp("(?:^|\\s+)"+u.requote(le)+"(?:\\s+|$)","g")}function Se(le){return(le+"").trim().split(/^|\s+/)}function Ce(le,we){le=Se(le).map(Ue);var Be=le.length;function $e(){for(var it=-1;++it=0;)(it=Be[$e])&&(Je&&Je!==it.nextSibling&&Je.parentNode.insertBefore(it,Je),Je=it);return this},X.sort=function(le){le=be.apply(this,arguments);for(var we=-1,Be=this.length;++we=we&&(we=Je+1);!(qt=Ct[we])&&++we0&&(le=le.slice(0,Je));var Ct=yt.get(le);Ct&&(le=Ct,it=It);function bt(){var ur=this[$e];ur&&(this.removeEventListener(le,ur,ur.$),delete this[$e])}function qt(){var ur=it(we,w(arguments));bt.call(this),this.addEventListener(le,this[$e]=ur,ur.$=Be),ur._=we}function sr(){var ur=new RegExp("^__on([^.]+)"+u.requote(le)+"$"),qr;for(var Nr in this)if(qr=Nr.match(ur)){var ya=this[Nr];this.removeEventListener(qr[1],ya,ya.$),delete this[Nr]}}return Je?we?qt:bt:we?B:sr}var yt=u.map({mouseenter:"mouseover",mouseleave:"mouseout"});S&&yt.forEach(function(le){"on"+le in S&&yt.remove(le)});function At(le,we){return function(Be){var $e=u.event;u.event=Be,we[0]=this.__data__;try{le.apply(this,we)}finally{u.event=$e}}}function It(le,we){var Be=At(le,we);return function($e){var Je=this,it=$e.relatedTarget;(!it||it!==Je&&!(it.compareDocumentPosition(Je)&8))&&Be.call(Je,$e)}}var Zt,vr=0;function Ut(le){var we=".dragsuppress-"+ ++vr,Be="click"+we,$e=u.select(e(le)).on("touchmove"+we,Y).on("dragstart"+we,Y).on("selectstart"+we,Y);if(Zt==null&&(Zt="onselectstart"in le?!1:R(le.style,"userSelect")),Zt){var Je=l(le).style,it=Je[Zt];Je[Zt]="none"}return function(Ct){if($e.on(we,null),Zt&&(Je[Zt]=it),Ct){var bt=function(){$e.on(Be,null)};$e.on(Be,function(){Y(),bt()},!0),setTimeout(bt,0)}}}u.mouse=function(le){return at(le,ee())};var Jt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function at(le,we){we.changedTouches&&(we=we.changedTouches[0]);var Be=le.ownerSVGElement||le;if(Be.createSVGPoint){var $e=Be.createSVGPoint();if(Jt<0){var Je=e(le);if(Je.scrollX||Je.scrollY){Be=u.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var it=Be[0][0].getScreenCTM();Jt=!(it.f||it.e),Be.remove()}}return Jt?($e.x=we.pageX,$e.y=we.pageY):($e.x=we.clientX,$e.y=we.clientY),$e=$e.matrixTransform(le.getScreenCTM().inverse()),[$e.x,$e.y]}var Ct=le.getBoundingClientRect();return[we.clientX-Ct.left-le.clientLeft,we.clientY-Ct.top-le.clientTop]}u.touch=function(le,we,Be){if(arguments.length<3&&(Be=we,we=ee().changedTouches),we){for(var $e=0,Je=we.length,it;$e0?1:le<0?-1:0}function ft(le,we,Be){return(we[0]-le[0])*(Be[1]-le[1])-(we[1]-le[1])*(Be[0]-le[0])}function mt(le){return le>1?0:le<-1?ye:Math.acos(le)}function _t(le){return le>1?He:le<-1?-He:Math.asin(le)}function Bt(le){return((le=Math.exp(le))-1/le)/2}function Et(le){return((le=Math.exp(le))+1/le)/2}function hr(le){return((le=Math.exp(2*le))-1)/(le+1)}function $r(le){return(le=Math.sin(le/2))*le}var ca=Math.SQRT2,na=2,wa=4;u.interpolateZoom=function(le,we){var Be=le[0],$e=le[1],Je=le[2],it=we[0],Ct=we[1],bt=we[2],qt=it-Be,sr=Ct-$e,ur=qt*qt+sr*sr,qr,Nr;if(ur0&&(gi=gi.transition().duration(Ct)),gi.call(Ca.event)}function Ui(){oa&&oa.domain(Zr.range().map(function(gi){return(gi-le.x)/le.k}).map(Zr.invert)),Ma&&Ma.domain(ma.range().map(function(gi){return(gi-le.y)/le.k}).map(ma.invert))}function Bi(gi){bt++||gi({type:"zoomstart"})}function So(gi){Ui(),gi({type:"zoom",scale:le.k,translate:[le.x,le.y]})}function Di(gi){--bt||(gi({type:"zoomend"}),Be=null)}function mo(){var gi=this,Qi=Ea.of(gi,arguments),Oo=0,gs=u.select(e(gi)).on(sr,su).on(ur,xu),Bs=aa(u.mouse(gi)),cl=Ut(gi);pi.call(gi),Bi(Qi);function su(){Oo=1,ri(u.mouse(gi),Bs),So(Qi)}function xu(){gs.on(sr,null).on(ur,null),cl(Oo),Di(Qi)}}function Ts(){var gi=this,Qi=Ea.of(gi,arguments),Oo={},gs=0,Bs,cl=".zoom-"+u.event.changedTouches[0].identifier,su="touchmove"+cl,xu="touchend"+cl,ic=[],Ve=u.select(gi),Pt=Ut(gi);Er(),Bi(Qi),Ve.on(qt,null).on(Nr,Er);function Ft(){var Yr=u.touches(gi);return Bs=le.k,Yr.forEach(function(_a){_a.identifier in Oo&&(Oo[_a.identifier]=aa(_a))}),Yr}function Er(){var Yr=u.event.target;u.select(Yr).on(su,Xr).on(xu,Kr),ic.push(Yr);for(var _a=u.event.changedTouches,Ra=0,Ba=_a.length;Ra1){var Tn=Ua[0],nn=Ua[1],ua=Tn[0]-nn[0],yr=Tn[1]-nn[1];gs=ua*ua+yr*yr}}function Xr(){var Yr=u.touches(gi),_a,Ra,Ba,Ua;pi.call(gi);for(var Wn=0,Tn=Yr.length;Wn1?1:we,Be=Be<0?0:Be>1?1:Be,Je=Be<=.5?Be*(1+we):Be+we-Be*we,$e=2*Be-Je;function it(bt){return bt>360?bt-=360:bt<0&&(bt+=360),bt<60?$e+(Je-$e)*bt/60:bt<180?Je:bt<240?$e+(Je-$e)*(240-bt)/60:$e}function Ct(bt){return Math.round(it(bt)*255)}return new rn(Ct(le+120),Ct(le),Ct(le-120))}u.hcl=ka;function ka(le,we,Be){return this instanceof ka?(this.h=+le,this.c=+we,void(this.l=+Be)):arguments.length<2?le instanceof ka?new ka(le.h,le.c,le.l):le instanceof bn?Ln(le.l,le.a,le.b):Ln((le=rr((le=u.rgb(le)).r,le.g,le.b)).l,le.a,le.b):new ka(le,we,Be)}var oi=ka.prototype=new Ia;oi.brighter=function(le){return new ka(this.h,this.c,Math.min(100,this.l+ci*(arguments.length?le:1)))},oi.darker=function(le){return new ka(this.h,this.c,Math.max(0,this.l-ci*(arguments.length?le:1)))},oi.rgb=function(){return $n(this.h,this.c,this.l).rgb()};function $n(le,we,Be){return isNaN(le)&&(le=0),isNaN(we)&&(we=0),new bn(Be,Math.cos(le*=We)*we,Math.sin(le)*we)}u.lab=bn;function bn(le,we,Be){return this instanceof bn?(this.l=+le,this.a=+we,void(this.b=+Be)):arguments.length<2?le instanceof bn?new bn(le.l,le.a,le.b):le instanceof ka?$n(le.h,le.c,le.l):rr((le=rn(le)).r,le.g,le.b):new bn(le,we,Be)}var ci=18,hi=.95047,Pi=1,Jn=1.08883,Ti=bn.prototype=new Ia;Ti.brighter=function(le){return new bn(Math.min(100,this.l+ci*(arguments.length?le:1)),this.a,this.b)},Ti.darker=function(le){return new bn(Math.max(0,this.l-ci*(arguments.length?le:1)),this.a,this.b)},Ti.rgb=function(){return _n(this.l,this.a,this.b)};function _n(le,we,Be){var $e=(le+16)/116,Je=$e+we/500,it=$e-Be/200;return Je=ji(Je)*hi,$e=ji($e)*Pi,it=ji(it)*Jn,new rn(un(3.2404542*Je-1.5371385*$e-.4985314*it),un(-.969266*Je+1.8760108*$e+.041556*it),un(.0556434*Je-.2040259*$e+1.0572252*it))}function Ln(le,we,Be){return le>0?new ka(Math.atan2(Be,we)*pt,Math.sqrt(we*we+Be*Be),le):new ka(NaN,NaN,le)}function ji(le){return le>.206893034?le*le*le:(le-4/29)/7.787037}function Zi(le){return le>.008856?Math.pow(le,1/3):7.787037*le+4/29}function un(le){return Math.round(255*(le<=.00304?12.92*le:1.055*Math.pow(le,1/2.4)-.055))}u.rgb=rn;function rn(le,we,Be){return this instanceof rn?(this.r=~~le,this.g=~~we,void(this.b=~~Be)):arguments.length<2?le instanceof rn?new rn(le.r,le.g,le.b):nr(""+le,rn,tn):new rn(le,we,Be)}function nt(le){return new rn(le>>16,le>>8&255,le&255)}function Ke(le){return nt(le)+""}var Qt=rn.prototype=new Ia;Qt.brighter=function(le){le=Math.pow(.7,arguments.length?le:1);var we=this.r,Be=this.g,$e=this.b,Je=30;return!we&&!Be&&!$e?new rn(Je,Je,Je):(we&&we>4,$e=$e>>4|$e,Je=qt&240,Je=Je>>4|Je,it=qt&15,it=it<<4|it):le.length===7&&($e=(qt&16711680)>>16,Je=(qt&65280)>>8,it=qt&255)),we($e,Je,it))}function cr(le,we,Be){var $e=Math.min(le/=255,we/=255,Be/=255),Je=Math.max(le,we,Be),it=Je-$e,Ct,bt,qt=(Je+$e)/2;return it?(bt=qt<.5?it/(Je+$e):it/(2-Je-$e),le==Je?Ct=(we-Be)/it+(we0&&qt<1?0:Ct),new Va(Ct,bt,qt)}function rr(le,we,Be){le=Ze(le),we=Ze(we),Be=Ze(Be);var $e=Zi((.4124564*le+.3575761*we+.1804375*Be)/hi),Je=Zi((.2126729*le+.7151522*we+.072175*Be)/Pi),it=Zi((.0193339*le+.119192*we+.9503041*Be)/Jn);return bn(116*Je-16,500*($e-Je),200*(Je-it))}function Ze(le){return(le/=255)<=.04045?le/12.92:Math.pow((le+.055)/1.055,2.4)}function xt(le){var we=parseFloat(le);return le.charAt(le.length-1)==="%"?Math.round(we*2.55):we}var Vt=u.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Vt.forEach(function(le,we){Vt.set(le,nt(we))});function er(le){return typeof le=="function"?le:function(){return le}}u.functor=er,u.xhr=Tr(I);function Tr(le){return function(we,Be,$e){return arguments.length===2&&typeof Be=="function"&&($e=Be,Be=null),jr(we,Be,le,$e)}}function jr(le,we,Be,$e){var Je={},it=u.dispatch("beforesend","progress","load","error"),Ct={},bt=new XMLHttpRequest,qt=null;self.XDomainRequest&&!("withCredentials"in bt)&&/^(http(s)?:)?\/\//.test(le)&&(bt=new XDomainRequest),"onload"in bt?bt.onload=bt.onerror=sr:bt.onreadystatechange=function(){bt.readyState>3&&sr()};function sr(){var ur=bt.status,qr;if(!ur&&kr(bt)||ur>=200&&ur<300||ur===304){try{qr=Be.call(Je,bt)}catch(Nr){it.error.call(Je,Nr);return}it.load.call(Je,qr)}else it.error.call(Je,bt)}return bt.onprogress=function(ur){var qr=u.event;u.event=ur;try{it.progress.call(Je,bt)}finally{u.event=qr}},Je.header=function(ur,qr){return ur=(ur+"").toLowerCase(),arguments.length<2?Ct[ur]:(qr==null?delete Ct[ur]:Ct[ur]=qr+"",Je)},Je.mimeType=function(ur){return arguments.length?(we=ur==null?null:ur+"",Je):we},Je.responseType=function(ur){return arguments.length?(qt=ur,Je):qt},Je.response=function(ur){return Be=ur,Je},["get","post"].forEach(function(ur){Je[ur]=function(){return Je.send.apply(Je,[ur].concat(w(arguments)))}}),Je.send=function(ur,qr,Nr){if(arguments.length===2&&typeof qr=="function"&&(Nr=qr,qr=null),bt.open(ur,le,!0),we!=null&&!("accept"in Ct)&&(Ct.accept=we+",*/*"),bt.setRequestHeader)for(var ya in Ct)bt.setRequestHeader(ya,Ct[ya]);return we!=null&&bt.overrideMimeType&&bt.overrideMimeType(we),qt!=null&&(bt.responseType=qt),Nr!=null&&Je.on("error",Nr).on("load",function(Ea){Nr(null,Ea)}),it.beforesend.call(Je,bt),bt.send(qr??null),Je},Je.abort=function(){return bt.abort(),Je},u.rebind(Je,it,"on"),$e==null?Je:Je.get(Fr($e))}function Fr(le){return le.length===1?function(we,Be){le(we==null?Be:null)}:le}function kr(le){var we=le.responseType;return we&&we!=="text"?le.response:le.responseText}u.dsv=function(le,we){var Be=new RegExp('["'+le+` -]`),$e=le.charCodeAt(0);function Je(sr,ur,qr){arguments.length<3&&(qr=ur,ur=null);var Nr=jr(sr,we,ur==null?it:Ct(ur),qr);return Nr.row=function(ya){return arguments.length?Nr.response((ur=ya)==null?it:Ct(ya)):ur},Nr}function it(sr){return Je.parse(sr.responseText)}function Ct(sr){return function(ur){return Je.parse(ur.responseText,sr)}}Je.parse=function(sr,ur){var qr;return Je.parseRows(sr,function(Nr,ya){if(qr)return qr(Nr,ya-1);var Ea=function(Zr){for(var oa={},ma=Nr.length,Ma=0;Ma=Ea)return Nr;if(Ma)return Ma=!1,qr;var Sn=Zr;if(sr.charCodeAt(Sn)===34){for(var Bn=Sn;Bn++24?(isFinite(we)&&(clearTimeout(Dn),Dn=setTimeout(ti,we)),La=0):(La=1,Mn(ti))}u.timer.flush=function(){Si(),ai()};function Si(){for(var le=Date.now(),we=ra;we;)le>=we.t&&we.c(le-we.t)&&(we.c=null),we=we.n;return le}function ai(){for(var le,we=ra,Be=1/0;we;)we.c?(we.t=0;--bt)Zr.push(Je[sr[qr[bt]][2]]);for(bt=+ya;bt1&&ft(le[Be[$e-2]],le[Be[$e-1]],le[Je])<=0;)--$e;Be[$e++]=Je}return Be.slice(0,$e)}function Bo(le,we){return le[0]-we[0]||le[1]-we[1]}u.geom.polygon=function(le){return j(le,Mo),le};var Mo=u.geom.polygon.prototype=[];Mo.area=function(){for(var le=-1,we=this.length,Be,$e=this[we-1],Je=0;++leRe)bt=bt.L;else if(Ct=we-po(bt,Be),Ct>Re){if(!bt.R){$e=bt;break}bt=bt.R}else{it>-Re?($e=bt.P,Je=bt):Ct>-Re?($e=bt,Je=bt.N):$e=Je=bt;break}var qt=Ho(le);if(Po.insert($e,qt),!(!$e&&!Je)){if($e===Je){qs($e),Je=Ho($e.site),Po.insert(qt,Je),qt.edge=Je.edge=fs($e.site,qt.site),ts($e),ts(Je);return}if(!Je){qt.edge=fs($e.site,qt.site);return}qs($e),qs(Je);var sr=$e.site,ur=sr.x,qr=sr.y,Nr=le.x-ur,ya=le.y-qr,Ea=Je.site,Zr=Ea.x-ur,oa=Ea.y-qr,ma=2*(Nr*oa-ya*Zr),Ma=Nr*Nr+ya*ya,Ca=Zr*Zr+oa*oa,aa={x:(oa*Ma-ya*Ca)/ma+ur,y:(Nr*Ca-Zr*Ma)/ma+qr};Ss(Je.edge,sr,Ea,aa),qt.edge=fs(sr,le,null,aa),Je.edge=fs(le,Ea,null,aa),ts($e),ts(Je)}}function Yo(le,we){var Be=le.site,$e=Be.x,Je=Be.y,it=Je-we;if(!it)return $e;var Ct=le.P;if(!Ct)return-1/0;Be=Ct.site;var bt=Be.x,qt=Be.y,sr=qt-we;if(!sr)return bt;var ur=bt-$e,qr=1/it-1/sr,Nr=ur/sr;return qr?(-Nr+Math.sqrt(Nr*Nr-2*qr*(ur*ur/(-2*sr)-qt+sr/2+Je-it/2)))/qr+$e:($e+bt)/2}function po(le,we){var Be=le.N;if(Be)return Yo(Be,we);var $e=le.site;return $e.y===we?$e.x:1/0}function _s(le){this.site=le,this.edges=[]}_s.prototype.prepare=function(){for(var le=this.edges,we=le.length,Be;we--;)Be=le[we].edge,(!Be.b||!Be.a)&&le.splice(we,1);return le.sort(Io),le.length};function qo(le){for(var we=le[0][0],Be=le[1][0],$e=le[0][1],Je=le[1][1],it,Ct,bt,qt,sr=Wo,ur=sr.length,qr,Nr,ya,Ea,Zr,oa;ur--;)if(qr=sr[ur],!(!qr||!qr.prepare()))for(ya=qr.edges,Ea=ya.length,Nr=0;NrRe||o(qt-Ct)>Re)&&(ya.splice(Nr,0,new ls(Wl(qr.site,oa,o(bt-we)Re?{x:we,y:o(it-we)Re?{x:o(Ct-Je)Re?{x:Be,y:o(it-Be)Re?{x:o(Ct-$e)=-he)){var Nr=qt*qt+sr*sr,ya=ur*ur+oa*oa,Ea=(oa*Nr-sr*ya)/qr,Zr=(qt*ya-ur*Nr)/qr,oa=Zr+bt,ma=ro.pop()||new tl;ma.arc=le,ma.site=Je,ma.x=Ea+Ct,ma.y=oa+Math.sqrt(Ea*Ea+Zr*Zr),ma.cy=oa,le.circle=ma;for(var Ma=null,Ca=ho._;Ca;)if(ma.y0)){if(Zr/=ya,ya<0){if(Zr0){if(Zr>Nr)return;Zr>qr&&(qr=Zr)}if(Zr=Be-bt,!(!ya&&Zr<0)){if(Zr/=ya,ya<0){if(Zr>Nr)return;Zr>qr&&(qr=Zr)}else if(ya>0){if(Zr0)){if(Zr/=Ea,Ea<0){if(Zr0){if(Zr>Nr)return;Zr>qr&&(qr=Zr)}if(Zr=$e-qt,!(!Ea&&Zr<0)){if(Zr/=Ea,Ea<0){if(Zr>Nr)return;Zr>qr&&(qr=Zr)}else if(Ea>0){if(Zr0&&(Je.a={x:bt+qr*ya,y:qt+qr*Ea}),Nr<1&&(Je.b={x:bt+Nr*ya,y:qt+Nr*Ea}),Je}}}}}}function ps(le){for(var we=Co,Be=Xs(le[0][0],le[0][1],le[1][0],le[1][1]),$e=we.length,Je;$e--;)Je=we[$e],(!ml(Je,le)||!Be(Je)||o(Je.a.x-Je.b.x)=it)return;if(ur>Nr){if(!$e)$e={x:Ea,y:Ct};else if($e.y>=bt)return;Be={x:Ea,y:bt}}else{if(!$e)$e={x:Ea,y:bt};else if($e.y1)if(ur>Nr){if(!$e)$e={x:(Ct-ma)/oa,y:Ct};else if($e.y>=bt)return;Be={x:(bt-ma)/oa,y:bt}}else{if(!$e)$e={x:(bt-ma)/oa,y:bt};else if($e.y=it)return;Be={x:it,y:oa*it+ma}}else{if(!$e)$e={x:it,y:oa*it+ma};else if($e.x=ur&&ma.x<=Nr&&ma.y>=qr&&ma.y<=ya?[[ur,ya],[Nr,ya],[Nr,qr],[ur,qr]]:[];Ma.point=qt[Zr]}),sr}function bt(qt){return qt.map(function(sr,ur){return{x:Math.round($e(sr,ur)/Re)*Re,y:Math.round(Je(sr,ur)/Re)*Re,i:ur}})}return Ct.links=function(qt){return Ql(bt(qt)).edges.filter(function(sr){return sr.l&&sr.r}).map(function(sr){return{source:qt[sr.l.i],target:qt[sr.r.i]}})},Ct.triangles=function(qt){var sr=[];return Ql(bt(qt)).cells.forEach(function(ur,qr){for(var Nr=ur.site,ya=ur.edges.sort(Io),Ea=-1,Zr=ya.length,oa,ma,Ma=ya[Zr-1].edge,Ca=Ma.l===Nr?Ma.r:Ma.l;++EaCa&&(Ca=ur.x),ur.y>aa&&(aa=ur.y),ya.push(ur.x),Ea.push(ur.y);else for(Zr=0;ZrCa&&(Ca=Sn),Bn>aa&&(aa=Bn),ya.push(Sn),Ea.push(Bn)}var ri=Ca-ma,xi=aa-Ma;ri>xi?aa=Ma+ri:Ca=ma+xi;function Ui(Di,mo,Ts,al,Ds,gi,Qi,Oo){if(!(isNaN(Ts)||isNaN(al)))if(Di.leaf){var gs=Di.x,Bs=Di.y;if(gs!=null)if(o(gs-Ts)+o(Bs-al)<.01)Bi(Di,mo,Ts,al,Ds,gi,Qi,Oo);else{var cl=Di.point;Di.x=Di.y=Di.point=null,Bi(Di,cl,gs,Bs,Ds,gi,Qi,Oo),Bi(Di,mo,Ts,al,Ds,gi,Qi,Oo)}else Di.x=Ts,Di.y=al,Di.point=mo}else Bi(Di,mo,Ts,al,Ds,gi,Qi,Oo)}function Bi(Di,mo,Ts,al,Ds,gi,Qi,Oo){var gs=(Ds+Qi)*.5,Bs=(gi+Oo)*.5,cl=Ts>=gs,su=al>=Bs,xu=su<<1|cl;Di.leaf=!1,Di=Di.nodes[xu]||(Di.nodes[xu]=_c()),cl?Ds=gs:Qi=gs,su?gi=Bs:Oo=Bs,Ui(Di,mo,Ts,al,Ds,gi,Qi,Oo)}var So=_c();if(So.add=function(Di){Ui(So,Di,+qr(Di,++Zr),+Nr(Di,Zr),ma,Ma,Ca,aa)},So.visit=function(Di){vu(Di,So,ma,Ma,Ca,aa)},So.find=function(Di){return pu(So,Di[0],Di[1],ma,Ma,Ca,aa)},Zr=-1,we==null){for(;++Zrit||Nr>Ct||ya<$e||Ea=Sn,xi=Be>=Bn,Ui=xi<<1|ri,Bi=Ui+4;UiBe&&(it=we.slice(Be,it),bt[Ct]?bt[Ct]+=it:bt[++Ct]=it),($e=$e[0])===(Je=Je[0])?bt[Ct]?bt[Ct]+=Je:bt[++Ct]=Je:(bt[++Ct]=null,qt.push({i:Ct,x:Vs($e,Je)})),Be=Tu.lastIndex;return Be=0&&!($e=u.interpolators[Be](le,we)););return $e}u.interpolators=[function(le,we){var Be=typeof we;return(Be==="string"?Vt.has(we.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(we)?mu:os:we instanceof Ia?mu:Array.isArray(we)?bc:Be==="object"&&isNaN(we)?eu:Vs)(le,we)}],u.interpolateArray=bc;function bc(le,we){var Be=[],$e=[],Je=le.length,it=we.length,Ct=Math.min(le.length,we.length),bt;for(bt=0;bt=0?le.slice(0,we):le,$e=we>=0?le.slice(we+1):"in";return Be=Af.get(Be)||Hs,$e=Xo.get($e)||I,Mf($e(Be.apply(null,v.call(arguments,1))))};function Mf(le){return function(we){return we<=0?0:we>=1?1:le(we)}}function ns(le){return function(we){return 1-le(1-we)}}function so(le){return function(we){return .5*(we<.5?le(2*we):2-le(2-2*we))}}function qu(le){return le*le}function hc(le){return le*le*le}function Ll(le){if(le<=0)return 0;if(le>=1)return 1;var we=le*le,Be=we*le;return 4*(le<.5?Be:3*(le-we)+Be-.75)}function Qc(le){return function(we){return Math.pow(we,le)}}function Au(le){return 1-Math.cos(le*He)}function Zu(le){return Math.pow(2,10*(le-1))}function ll(le){return 1-Math.sqrt(1-le*le)}function ef(le,we){var Be;return arguments.length<2&&(we=.45),arguments.length?Be=we/Ie*Math.asin(1/le):(le=1,Be=we/4),function($e){return 1+le*Math.pow(2,-10*$e)*Math.sin(($e-Be)*Ie/we)}}function zc(le){return le||(le=1.70158),function(we){return we*we*((le+1)*we-le)}}function Ku(le){return le<1/2.75?7.5625*le*le:le<2/2.75?7.5625*(le-=1.5/2.75)*le+.75:le<2.5/2.75?7.5625*(le-=2.25/2.75)*le+.9375:7.5625*(le-=2.625/2.75)*le+.984375}u.interpolateHcl=Ju;function Ju(le,we){le=u.hcl(le),we=u.hcl(we);var Be=le.h,$e=le.c,Je=le.l,it=we.h-Be,Ct=we.c-$e,bt=we.l-Je;return isNaN(Ct)&&(Ct=0,$e=isNaN($e)?we.c:$e),isNaN(it)?(it=0,Be=isNaN(Be)?we.h:Be):it>180?it-=360:it<-180&&(it+=360),function(qt){return $n(Be+it*qt,$e+Ct*qt,Je+bt*qt)+""}}u.interpolateHsl=Bc;function Bc(le,we){le=u.hsl(le),we=u.hsl(we);var Be=le.h,$e=le.s,Je=le.l,it=we.h-Be,Ct=we.s-$e,bt=we.l-Je;return isNaN(Ct)&&(Ct=0,$e=isNaN($e)?we.s:$e),isNaN(it)?(it=0,Be=isNaN(Be)?we.h:Be):it>180?it-=360:it<-180&&(it+=360),function(qt){return tn(Be+it*qt,$e+Ct*qt,Je+bt*qt)+""}}u.interpolateLab=Nc;function Nc(le,we){le=u.lab(le),we=u.lab(we);var Be=le.l,$e=le.a,Je=le.b,it=we.l-Be,Ct=we.a-$e,bt=we.b-Je;return function(qt){return _n(Be+it*qt,$e+Ct*qt,Je+bt*qt)+""}}u.interpolateRound=tu;function tu(le,we){return we-=le,function(Be){return Math.round(le+we*Be)}}u.transform=function(le){var we=S.createElementNS(u.ns.prefix.svg,"g");return(u.transform=function(Be){if(Be!=null){we.setAttribute("transform",Be);var $e=we.transform.baseVal.consolidate()}return new xc($e?$e.matrix:ec)})(le)};function xc(le){var we=[le.a,le.b],Be=[le.c,le.d],$e=Qu(we),Je=ru(we,Be),it=Qu($s(Be,we,-Je))||0;we[0]*Be[1]180?we+=360:we-le>180&&(le+=360),$e.push({i:Be.push(Iu(Be)+"rotate(",null,")")-2,x:Vs(le,we)})):we&&Be.push(Iu(Be)+"rotate("+we+")")}function Sf(le,we,Be,$e){le!==we?$e.push({i:Be.push(Iu(Be)+"skewX(",null,")")-2,x:Vs(le,we)}):we&&Be.push(Iu(Be)+"skewX("+we+")")}function tf(le,we,Be,$e){if(le[0]!==we[0]||le[1]!==we[1]){var Je=Be.push(Iu(Be)+"scale(",null,",",null,")");$e.push({i:Je-4,x:Vs(le[0],we[0])},{i:Je-2,x:Vs(le[1],we[1])})}else(we[0]!==1||we[1]!==1)&&Be.push(Iu(Be)+"scale("+we+")")}function Vu(le,we){var Be=[],$e=[];return le=u.transform(le),we=u.transform(we),us(le.translate,we.translate,Be,$e),wc(le.rotate,we.rotate,Be,$e),Sf(le.skew,we.skew,Be,$e),tf(le.scale,we.scale,Be,$e),le=we=null,function(Je){for(var it=-1,Ct=$e.length,bt;++it0?it=aa:(Be.c=null,Be.t=NaN,Be=null,we.end({type:"end",alpha:it=0})):aa>0&&(we.start({type:"start",alpha:it=aa}),Be=_i(le.tick)),le):it},le.start=function(){var aa,Sn=ya.length,Bn=Ea.length,ri=$e[0],xi=$e[1],Ui,Bi;for(aa=0;aa=0;)it.push(ur=sr[qt]),ur.parent=bt,ur.depth=bt.depth+1;Be&&(bt.value=0),bt.children=sr}else Be&&(bt.value=+Be.call($e,bt,bt.depth)||0),delete bt.children;return Mu(Je,function(qr){var Nr,ya;le&&(Nr=qr.children)&&Nr.sort(le),Be&&(ya=qr.parent)&&(ya.value+=qr.value)}),Ct}return $e.sort=function(Je){return arguments.length?(le=Je,$e):le},$e.children=function(Je){return arguments.length?(we=Je,$e):we},$e.value=function(Je){return arguments.length?(Be=Je,$e):Be},$e.revalue=function(Je){return Be&&(Ru(Je,function(it){it.children&&(it.value=0)}),Mu(Je,function(it){var Ct;it.children||(it.value=+Be.call($e,it,it.depth)||0),(Ct=it.parent)&&(Ct.value+=it.value)})),Je},$e};function gu(le,we){return u.rebind(le,we,"sort","children","value"),le.nodes=le,le.links=Yl,le}function Ru(le,we){for(var Be=[le];(le=Be.pop())!=null;)if(we(le),(Je=le.children)&&($e=Je.length))for(var $e,Je;--$e>=0;)Be.push(Je[$e])}function Mu(le,we){for(var Be=[le],$e=[];(le=Be.pop())!=null;)if($e.push(le),(Ct=le.children)&&(it=Ct.length))for(var Je=-1,it,Ct;++JeJe&&(Je=bt),$e.push(bt)}for(Ct=0;Ct$e&&(Be=we,$e=Je);return Be}function qc(le){return le.reduce(rc,0)}function rc(le,we){return le+we[1]}u.layout.histogram=function(){var le=!0,we=Number,Be=Ac,$e=ac;function Je(it,Nr){for(var bt=[],qt=it.map(we,this),sr=Be.call(this,qt,Nr),ur=$e.call(this,sr,qt,Nr),qr,Nr=-1,ya=qt.length,Ea=ur.length-1,Zr=le?1:1/ya,oa;++Nr0)for(Nr=-1;++Nr=sr[0]&&oa<=sr[1]&&(qr=bt[u.bisect(ur,oa,1,Ea)-1],qr.y+=Zr,qr.push(it[Nr]));return bt}return Je.value=function(it){return arguments.length?(we=it,Je):we},Je.range=function(it){return arguments.length?(Be=er(it),Je):Be},Je.bins=function(it){return arguments.length?($e=typeof it=="number"?function(Ct){return nu(Ct,it)}:er(it),Je):$e},Je.frequency=function(it){return arguments.length?(le=!!it,Je):le},Je};function ac(le,we){return nu(le,Math.ceil(Math.log(we.length)/Math.LN2+1))}function nu(le,we){for(var Be=-1,$e=+le[0],Je=(le[1]-$e)/we,it=[];++Be<=we;)it[Be]=Je*Be+$e;return it}function Ac(le){return[u.min(le),u.max(le)]}u.layout.pack=function(){var le=u.layout.hierarchy().sort(Wu),we=0,Be=[1,1],$e;function Je(it,Ct){var bt=le.call(this,it,Ct),qt=bt[0],sr=Be[0],ur=Be[1],qr=$e==null?Math.sqrt:typeof $e=="function"?$e:function(){return $e};if(qt.x=qt.y=0,Mu(qt,function(ya){ya.r=+qr(ya.value)}),Mu(qt,Cf),we){var Nr=we*($e?1:Math.max(2*qt.r/sr,2*qt.r/ur))/2;Mu(qt,function(ya){ya.r+=Nr}),Mu(qt,Cf),Mu(qt,function(ya){ya.r-=Nr})}return Sc(qt,sr/2,ur/2,$e?1:1/Math.max(2*qt.r/sr,2*qt.r/ur)),bt}return Je.size=function(it){return arguments.length?(Be=it,Je):Be},Je.radius=function(it){return arguments.length?($e=it==null||typeof it=="function"?it:+it,Je):$e},Je.padding=function(it){return arguments.length?(we=+it,Je):we},gu(Je,le)};function Wu(le,we){return le.value-we.value}function Vc(le,we){var Be=le._pack_next;le._pack_next=we,we._pack_prev=le,we._pack_next=Be,Be._pack_prev=we}function Hc(le,we){le._pack_next=we,we._pack_prev=le}function of(le,we){var Be=we.x-le.x,$e=we.y-le.y,Je=le.r+we.r;return .999*Je*Je>Be*Be+$e*$e}function Cf(le){if(!(we=le.children)||!(Nr=we.length))return;var we,Be=1/0,$e=-1/0,Je=1/0,it=-1/0,Ct,bt,qt,sr,ur,qr,Nr;function ya(aa){Be=Math.min(aa.x-aa.r,Be),$e=Math.max(aa.x+aa.r,$e),Je=Math.min(aa.y-aa.r,Je),it=Math.max(aa.y+aa.r,it)}if(we.forEach(Mc),Ct=we[0],Ct.x=-Ct.r,Ct.y=0,ya(Ct),Nr>1&&(bt=we[1],bt.x=bt.r,bt.y=0,ya(bt),Nr>2))for(qt=we[2],wl(Ct,bt,qt),ya(qt),Vc(Ct,qt),Ct._pack_prev=qt,Vc(qt,bt),bt=Ct._pack_next,sr=3;sroa.x&&(oa=Sn),Sn.depth>ma.depth&&(ma=Sn)});var Ma=we(Zr,oa)/2-Zr.x,Ca=Be[0]/(oa.x+we(oa,Zr)/2+Ma),aa=Be[1]/(ma.depth||1);Ru(ya,function(Sn){Sn.x=(Sn.x+Ma)*Ca,Sn.y=Sn.depth*aa})}return Nr}function it(ur){for(var qr={A:null,children:[ur]},Nr=[qr],ya;(ya=Nr.pop())!=null;)for(var Ea=ya.children,Zr,oa=0,ma=Ea.length;oa0&&(Ec(Mt(Zr,ur,Nr),ur,Sn),ma+=Sn,Ma+=Sn),Ca+=Zr.m,ma+=ya.m,aa+=oa.m,Ma+=Ea.m;Zr&&!Lf(Ea)&&(Ea.t=Zr,Ea.m+=Ca-Ma),ya&&!lf(oa)&&(oa.t=ya,oa.m+=ma-aa,Nr=ur)}return Nr}function sr(ur){ur.x*=Be[0],ur.y=ur.depth*Be[1]}return Je.separation=function(ur){return arguments.length?(we=ur,Je):we},Je.size=function(ur){return arguments.length?($e=(Be=ur)==null?sr:null,Je):$e?null:Be},Je.nodeSize=function(ur){return arguments.length?($e=(Be=ur)==null?null:sr,Je):$e?Be:null},gu(Je,le)};function Su(le,we){return le.parent==we.parent?1:2}function lf(le){var we=le.children;return we.length?we[0]:le.t}function Lf(le){var we=le.children,Be;return(Be=we.length)?we[Be-1]:le.t}function Ec(le,we,Be){var $e=Be/(we.i-le.i);we.c-=$e,we.s+=Be,le.c+=$e,we.z+=Be,we.m+=Be}function Fu(le){for(var we=0,Be=0,$e=le.children,Je=$e.length,it;--Je>=0;)it=$e[Je],it.z+=we,it.m+=we,we+=it.s+(Be+=it.c)}function Mt(le,we,Be){return le.a.parent===we.parent?le.a:Be}u.layout.cluster=function(){var le=u.layout.hierarchy().sort(null).value(null),we=Su,Be=[1,1],$e=!1;function Je(it,Ct){var bt=le.call(this,it,Ct),qt=bt[0],sr,ur=0;Mu(qt,function(Zr){var oa=Zr.children;oa&&oa.length?(Zr.x=_r(oa),Zr.y=jt(oa)):(Zr.x=sr?ur+=we(Zr,sr):0,Zr.y=0,sr=Zr)});var qr=dr(qt),Nr=ea(qt),ya=qr.x-we(qr,Nr)/2,Ea=Nr.x+we(Nr,qr)/2;return Mu(qt,$e?function(Zr){Zr.x=(Zr.x-qt.x)*Be[0],Zr.y=(qt.y-Zr.y)*Be[1]}:function(Zr){Zr.x=(Zr.x-ya)/(Ea-ya)*Be[0],Zr.y=(1-(qt.y?Zr.y/qt.y:1))*Be[1]}),bt}return Je.separation=function(it){return arguments.length?(we=it,Je):we},Je.size=function(it){return arguments.length?($e=(Be=it)==null,Je):$e?null:Be},Je.nodeSize=function(it){return arguments.length?($e=(Be=it)!=null,Je):$e?Be:null},gu(Je,le)};function jt(le){return 1+u.max(le,function(we){return we.y})}function _r(le){return le.reduce(function(we,Be){return we+Be.x},0)/le.length}function dr(le){var we=le.children;return we&&we.length?dr(we[0]):le}function ea(le){var we=le.children,Be;return we&&(Be=we.length)?ea(we[Be-1]):le}u.layout.treemap=function(){var le=u.layout.hierarchy(),we=Math.round,Be=[1,1],$e=null,Je=Aa,it=!1,Ct,bt="squarify",qt=.5*(1+Math.sqrt(5));function sr(Zr,oa){for(var ma=-1,Ma=Zr.length,Ca,aa;++ma0;)Ma.push(aa=Ca[xi-1]),Ma.area+=aa.area,bt!=="squarify"||(Bn=Nr(Ma,ri))<=Sn?(Ca.pop(),Sn=Bn):(Ma.area-=Ma.pop().area,ya(Ma,ri,ma,!1),ri=Math.min(ma.dx,ma.dy),Ma.length=Ma.area=0,Sn=1/0);Ma.length&&(ya(Ma,ri,ma,!0),Ma.length=Ma.area=0),oa.forEach(ur)}}function qr(Zr){var oa=Zr.children;if(oa&&oa.length){var ma=Je(Zr),Ma=oa.slice(),Ca,aa=[];for(sr(Ma,ma.dx*ma.dy/Zr.value),aa.area=0;Ca=Ma.pop();)aa.push(Ca),aa.area+=Ca.area,Ca.z!=null&&(ya(aa,Ca.z?ma.dx:ma.dy,ma,!Ma.length),aa.length=aa.area=0);oa.forEach(qr)}}function Nr(Zr,oa){for(var ma=Zr.area,Ma,Ca=0,aa=1/0,Sn=-1,Bn=Zr.length;++SnCa&&(Ca=Ma));return ma*=ma,oa*=oa,ma?Math.max(oa*Ca*qt/ma,ma/(oa*aa*qt)):1/0}function ya(Zr,oa,ma,Ma){var Ca=-1,aa=Zr.length,Sn=ma.x,Bn=ma.y,ri=oa?we(Zr.area/oa):0,xi;if(oa==ma.dx){for((Ma||ri>ma.dy)&&(ri=ma.dy);++Cama.dx)&&(ri=ma.dx);++Ca1);return le+we*$e*Math.sqrt(-2*Math.log(it)/it)}},logNormal:function(){var le=u.random.normal.apply(u,arguments);return function(){return Math.exp(le())}},bates:function(le){var we=u.random.irwinHall(le);return function(){return we()/le}},irwinHall:function(le){return function(){for(var we=0,Be=0;Be2?Pa:qn,sr=$e?Tc:rf;return Je=qt(le,we,sr,Be),it=qt(we,le,sr,ju),bt}function bt(qt){return Je(qt)}return bt.invert=function(qt){return it(qt)},bt.domain=function(qt){return arguments.length?(le=qt.map(Number),Ct()):le},bt.range=function(qt){return arguments.length?(we=qt,Ct()):we},bt.rangeRound=function(qt){return bt.range(qt).interpolate(tu)},bt.clamp=function(qt){return arguments.length?($e=qt,Ct()):$e},bt.interpolate=function(qt){return arguments.length?(Be=qt,Ct()):Be},bt.ticks=function(qt){return Vi(le,qt)},bt.tickFormat=function(qt,sr){return d3_scale_linearTickFormat(le,qt,sr)},bt.nice=function(qt){return Ii(le,qt),Ct()},bt.copy=function(){return Qn(le,we,Be,$e)},Ct()}function Ei(le,we){return u.rebind(le,we,"range","rangeRound","interpolate","clamp")}function Ii(le,we){return Wa(le,$a(ki(le,we)[2])),Wa(le,$a(ki(le,we)[2])),le}function ki(le,we){we==null&&(we=10);var Be=fn(le),$e=Be[1]-Be[0],Je=Math.pow(10,Math.floor(Math.log($e/we)/Math.LN10)),it=we/$e*Je;return it<=.15?Je*=10:it<=.35?Je*=5:it<=.75&&(Je*=2),Be[0]=Math.ceil(Be[0]/Je)*Je,Be[1]=Math.floor(Be[1]/Je)*Je+Je*.5,Be[2]=Je,Be}function Vi(le,we){return u.range.apply(u,ki(le,we))}var ni={s:1,g:1,p:1,r:1,e:1};function Rn(le){return-Math.floor(Math.log(le)/Math.LN10+.01)}function no(le,we){var Be=Rn(we[2]);return le in ni?Math.abs(Be-Rn(Math.max(o(we[0]),o(we[1]))))+ +(le!=="e"):Be-(le==="%")*2}u.scale.log=function(){return wo(u.scale.linear().domain([0,1]),10,!0,[1,10])};function wo(le,we,Be,$e){function Je(bt){return(Be?Math.log(bt<0?0:bt):-Math.log(bt>0?0:-bt))/Math.log(we)}function it(bt){return Be?Math.pow(we,bt):-Math.pow(we,-bt)}function Ct(bt){return le(Je(bt))}return Ct.invert=function(bt){return it(le.invert(bt))},Ct.domain=function(bt){return arguments.length?(Be=bt[0]>=0,le.domain(($e=bt.map(Number)).map(Je)),Ct):$e},Ct.base=function(bt){return arguments.length?(we=+bt,le.domain($e.map(Je)),Ct):we},Ct.nice=function(){var bt=Wa($e.map(Je),Be?Math:Go);return le.domain(bt),$e=bt.map(it),Ct},Ct.ticks=function(){var bt=fn($e),qt=[],sr=bt[0],ur=bt[1],qr=Math.floor(Je(sr)),Nr=Math.ceil(Je(ur)),ya=we%1?2:we;if(isFinite(Nr-qr)){if(Be){for(;qr0;Ea--)qt.push(it(qr)*Ea);for(qr=0;qt[qr]ur;Nr--);qt=qt.slice(qr,Nr)}return qt},Ct.copy=function(){return wo(le.copy(),we,Be,$e)},Ei(Ct,le)}var Go={floor:function(le){return-Math.ceil(-le)},ceil:function(le){return-Math.floor(-le)}};u.scale.pow=function(){return bs(u.scale.linear(),1,[0,1])};function bs(le,we,Be){var $e=Jo(we),Je=Jo(1/we);function it(Ct){return le($e(Ct))}return it.invert=function(Ct){return Je(le.invert(Ct))},it.domain=function(Ct){return arguments.length?(le.domain((Be=Ct.map(Number)).map($e)),it):Be},it.ticks=function(Ct){return Vi(Be,Ct)},it.tickFormat=function(Ct,bt){return d3_scale_linearTickFormat(Be,Ct,bt)},it.nice=function(Ct){return it.domain(Ii(Be,Ct))},it.exponent=function(Ct){return arguments.length?($e=Jo(we=Ct),Je=Jo(1/we),le.domain(Be.map($e)),it):we},it.copy=function(){return bs(le.copy(),we,Be)},Ei(it,le)}function Jo(le){return function(we){return we<0?-Math.pow(-we,le):Math.pow(we,le)}}u.scale.sqrt=function(){return u.scale.pow().exponent(.5)},u.scale.ordinal=function(){return Es([],{t:"range",a:[[]]})};function Es(le,we){var Be,$e,Je;function it(bt){return $e[((Be.get(bt)||(we.t==="range"?Be.set(bt,le.push(bt)):NaN))-1)%$e.length]}function Ct(bt,qt){return u.range(le.length).map(function(sr){return bt+qt*sr})}return it.domain=function(bt){if(!arguments.length)return le;le=[],Be=new A;for(var qt=-1,sr=bt.length,ur;++qt0?Be[it-1]:le[0],itNr?0:1;if(ur=Fe)return qt(ur,Ea)+(sr?qt(sr,1-Ea):"")+"Z";var Zr,oa,ma,Ma,Ca=0,aa=0,Sn,Bn,ri,xi,Ui,Bi,So,Di,mo=[];if((Ma=(+Ct.apply(this,arguments)||0)/2)&&(ma=$e===yu?Math.sqrt(sr*sr+ur*ur):+$e.apply(this,arguments),Ea||(aa*=-1),ur&&(aa=_t(ma/ur*Math.sin(Ma))),sr&&(Ca=_t(ma/sr*Math.sin(Ma)))),ur){Sn=ur*Math.cos(qr+aa),Bn=ur*Math.sin(qr+aa),ri=ur*Math.cos(Nr-aa),xi=ur*Math.sin(Nr-aa);var Ts=Math.abs(Nr-qr-2*aa)<=ye?0:1;if(aa&&nc(Sn,Bn,ri,xi)===Ea^Ts){var al=(qr+Nr)/2;Sn=ur*Math.cos(al),Bn=ur*Math.sin(al),ri=xi=null}}else Sn=Bn=0;if(sr){Ui=sr*Math.cos(Nr-Ca),Bi=sr*Math.sin(Nr-Ca),So=sr*Math.cos(qr+Ca),Di=sr*Math.sin(qr+Ca);var Ds=Math.abs(qr-Nr+2*Ca)<=ye?0:1;if(Ca&&nc(Ui,Bi,So,Di)===1-Ea^Ds){var gi=(qr+Nr)/2;Ui=sr*Math.cos(gi),Bi=sr*Math.sin(gi),So=Di=null}}else Ui=Bi=0;if(ya>Re&&(Zr=Math.min(Math.abs(ur-sr)/2,+Be.apply(this,arguments)))>.001){oa=sr0?0:1}function Xi(le,we,Be,$e,Je){var it=le[0]-we[0],Ct=le[1]-we[1],bt=(Je?$e:-$e)/Math.sqrt(it*it+Ct*Ct),qt=bt*Ct,sr=-bt*it,ur=le[0]+qt,qr=le[1]+sr,Nr=we[0]+qt,ya=we[1]+sr,Ea=(ur+Nr)/2,Zr=(qr+ya)/2,oa=Nr-ur,ma=ya-qr,Ma=oa*oa+ma*ma,Ca=Be-$e,aa=ur*ya-Nr*qr,Sn=(ma<0?-1:1)*Math.sqrt(Math.max(0,Ca*Ca*Ma-aa*aa)),Bn=(aa*ma-oa*Sn)/Ma,ri=(-aa*oa-ma*Sn)/Ma,xi=(aa*ma+oa*Sn)/Ma,Ui=(-aa*oa+ma*Sn)/Ma,Bi=Bn-Ea,So=ri-Zr,Di=xi-Ea,mo=Ui-Zr;return Bi*Bi+So*So>Di*Di+mo*mo&&(Bn=xi,ri=Ui),[[Bn-qt,ri-sr],[Bn*Be/Ca,ri*Be/Ca]]}function vo(){return!0}function mf(le){var we=Ao,Be=yo,$e=vo,Je=ou,it=Je.key,Ct=.7;function bt(qt){var sr=[],ur=[],qr=-1,Nr=qt.length,ya,Ea=er(we),Zr=er(Be);function oa(){sr.push("M",Je(le(ur),Ct))}for(;++qr1?le.join("L"):le+"Z"}function Me(le){return le.join("L")+"Z"}function L(le){for(var we=0,Be=le.length,$e=le[0],Je=[$e[0],",",$e[1]];++we1&&Je.push("H",$e[0]),Je.join("")}function J(le){for(var we=0,Be=le.length,$e=le[0],Je=[$e[0],",",$e[1]];++we1){bt=we[1],it=le[qt],qt++,$e+="C"+(Je[0]+Ct[0])+","+(Je[1]+Ct[1])+","+(it[0]-bt[0])+","+(it[1]-bt[1])+","+it[0]+","+it[1];for(var sr=2;sr9&&(it=Be*3/Math.sqrt(it),Ct[bt]=it*$e,Ct[bt+1]=it*Je));for(bt=-1;++bt<=qt;)it=(le[Math.min(qt,bt+1)][0]-le[Math.max(0,bt-1)][0])/(6*(1+Ct[bt]*Ct[bt])),we.push([it||0,Ct[bt]*it||0]);return we}function Dt(le){return le.length<3?ou(le):le[0]+et(le,ht(le))}u.svg.line.radial=function(){var le=mf(Ot);return le.radius=le.x,delete le.x,le.angle=le.y,delete le.y,le};function Ot(le){for(var we,Be=-1,$e=le.length,Je,it;++Be<$e;)we=le[Be],Je=we[0],it=we[1]-He,we[0]=Je*Math.cos(it),we[1]=Je*Math.sin(it);return le}function $t(le){var we=Ao,Be=Ao,$e=0,Je=yo,it=vo,Ct=ou,bt=Ct.key,qt=Ct,sr="L",ur=.7;function qr(Nr){var ya=[],Ea=[],Zr=[],oa=-1,ma=Nr.length,Ma,Ca=er(we),aa=er($e),Sn=we===Be?function(){return ri}:er(Be),Bn=$e===Je?function(){return xi}:er(Je),ri,xi;function Ui(){ya.push("M",Ct(le(Zr),ur),sr,qt(le(Ea.reverse()),ur),"Z")}for(;++oaye)+",1 "+qr}function sr(ur,qr,Nr,ya){return"Q 0,0 "+ya}return it.radius=function(ur){return arguments.length?(Be=er(ur),it):Be},it.source=function(ur){return arguments.length?(le=er(ur),it):le},it.target=function(ur){return arguments.length?(we=er(ur),it):we},it.startAngle=function(ur){return arguments.length?($e=er(ur),it):$e},it.endAngle=function(ur){return arguments.length?(Je=er(ur),it):Je},it};function zr(le){return le.radius}u.svg.diagonal=function(){var le=ir,we=pr,Be=Wr;function $e(Je,it){var Ct=le.call(this,Je,it),bt=we.call(this,Je,it),qt=(Ct.y+bt.y)/2,sr=[Ct,{x:Ct.x,y:qt},{x:bt.x,y:qt},bt];return sr=sr.map(Be),"M"+sr[0]+"C"+sr[1]+" "+sr[2]+" "+sr[3]}return $e.source=function(Je){return arguments.length?(le=er(Je),$e):le},$e.target=function(Je){return arguments.length?(we=er(Je),$e):we},$e.projection=function(Je){return arguments.length?(Be=Je,$e):Be},$e};function Wr(le){return[le.x,le.y]}u.svg.diagonal.radial=function(){var le=u.svg.diagonal(),we=Wr,Be=le.projection;return le.projection=function($e){return arguments.length?Be(ia(we=$e)):we},le};function ia(le){return function(){var we=le.apply(this,arguments),Be=we[0],$e=we[1]-He;return[Be*Math.cos($e),Be*Math.sin($e)]}}u.svg.symbol=function(){var le=ln,we=Sa;function Be($e,Je){return(wn.get(le.call(this,$e,Je))||an)(we.call(this,$e,Je))}return Be.type=function($e){return arguments.length?(le=er($e),Be):le},Be.size=function($e){return arguments.length?(we=er($e),Be):we},Be};function Sa(){return 64}function ln(){return"circle"}function an(le){var we=Math.sqrt(le/ye);return"M0,"+we+"A"+we+","+we+" 0 1,1 0,"+-we+"A"+we+","+we+" 0 1,1 0,"+we+"Z"}var wn=u.map({circle:an,cross:function(le){var we=Math.sqrt(le/5)/2;return"M"+-3*we+","+-we+"H"+-we+"V"+-3*we+"H"+we+"V"+-we+"H"+3*we+"V"+we+"H"+we+"V"+3*we+"H"+-we+"V"+we+"H"+-3*we+"Z"},diamond:function(le){var we=Math.sqrt(le/(2*Mi)),Be=we*Mi;return"M0,"+-we+"L"+Be+",0 0,"+we+" "+-Be+",0Z"},square:function(le){var we=Math.sqrt(le)/2;return"M"+-we+","+-we+"L"+we+","+-we+" "+we+","+we+" "+-we+","+we+"Z"},"triangle-down":function(le){var we=Math.sqrt(le/ei),Be=we*ei/2;return"M0,"+Be+"L"+we+","+-Be+" "+-we+","+-Be+"Z"},"triangle-up":function(le){var we=Math.sqrt(le/ei),Be=we*ei/2;return"M0,"+-Be+"L"+we+","+Be+" "+-we+","+Be+"Z"}});u.svg.symbolTypes=wn.keys();var ei=Math.sqrt(3),Mi=Math.tan(30*We);X.transition=function(le){for(var we=Zo||++ds,Be=ks(le),$e=[],Je,it,Ct=Is||{time:Date.now(),ease:Ll,delay:0,duration:250},bt=-1,qt=this.length;++bt0;)qr[--Ma].call(le,ma);if(oa>=1)return Ct.event&&Ct.event.end.call(le,le.__data__,we),--it.count?delete it[$e]:delete le[Be],1}Ct||(bt=Je.time,qt=_i(Nr,0,bt),Ct=it[$e]={tween:new A,time:bt,timer:qt,delay:Je.delay,duration:Je.duration,ease:Je.ease,index:we},Je=null,++it.count)}u.svg.axis=function(){var le=u.scale.linear(),we=Il,Be=6,$e=6,Je=3,it=[10],Ct=null,bt;function qt(sr){sr.each(function(){var ur=u.select(this),qr=this.__chart__||le,Nr=this.__chart__=le.copy(),ya=Ct??(Nr.ticks?Nr.ticks.apply(Nr,it):Nr.domain()),Ea=bt??(Nr.tickFormat?Nr.tickFormat.apply(Nr,it):I),Zr=ur.selectAll(".tick").data(ya,Nr),oa=Zr.enter().insert("g",".domain").attr("class","tick").style("opacity",Re),ma=u.transition(Zr.exit()).style("opacity",Re).remove(),Ma=u.transition(Zr.order()).style("opacity",1),Ca=Math.max(Be,0)+Je,aa,Sn=gn(Nr),Bn=ur.selectAll(".domain").data([0]),ri=(Bn.enter().append("path").attr("class","domain"),u.transition(Bn));oa.append("line"),oa.append("text");var xi=oa.select("line"),Ui=Ma.select("line"),Bi=Zr.select("text").text(Ea),So=oa.select("text"),Di=Ma.select("text"),mo=we==="top"||we==="left"?-1:1,Ts,al,Ds,gi;if(we==="bottom"||we==="top"?(aa=Xl,Ts="x",Ds="y",al="x2",gi="y2",Bi.attr("dy",mo<0?"0em":".71em").style("text-anchor","middle"),ri.attr("d","M"+Sn[0]+","+mo*$e+"V0H"+Sn[1]+"V"+mo*$e)):(aa=il,Ts="y",Ds="x",al="y2",gi="x2",Bi.attr("dy",".32em").style("text-anchor",mo<0?"end":"start"),ri.attr("d","M"+mo*$e+","+Sn[0]+"H0V"+Sn[1]+"H"+mo*$e)),xi.attr(gi,mo*Be),So.attr(Ds,mo*Ca),Ui.attr(al,0).attr(gi,mo*Be),Di.attr(Ts,0).attr(Ds,mo*Ca),Nr.rangeBand){var Qi=Nr,Oo=Qi.rangeBand()/2;qr=Nr=function(gs){return Qi(gs)+Oo}}else qr.rangeBand?qr=Nr:ma.call(aa,Nr,qr);oa.call(aa,qr,Nr),Ma.call(aa,Nr,Nr)})}return qt.scale=function(sr){return arguments.length?(le=sr,qt):le},qt.orient=function(sr){return arguments.length?(we=sr in _u?sr+"":Il,qt):we},qt.ticks=function(){return arguments.length?(it=w(arguments),qt):it},qt.tickValues=function(sr){return arguments.length?(Ct=sr,qt):Ct},qt.tickFormat=function(sr){return arguments.length?(bt=sr,qt):bt},qt.tickSize=function(sr){var ur=arguments.length;return ur?(Be=+sr,$e=+arguments[ur-1],qt):Be},qt.innerTickSize=function(sr){return arguments.length?(Be=+sr,qt):Be},qt.outerTickSize=function(sr){return arguments.length?($e=+sr,qt):$e},qt.tickPadding=function(sr){return arguments.length?(Je=+sr,qt):Je},qt.tickSubdivide=function(){return arguments.length&&qt},qt};var Il="bottom",_u={top:1,right:1,bottom:1,left:1};function Xl(le,we,Be){le.attr("transform",function($e){var Je=we($e);return"translate("+(isFinite(Je)?Je:Be($e))+",0)"})}function il(le,we,Be){le.attr("transform",function($e){var Je=we($e);return"translate(0,"+(isFinite(Je)?Je:Be($e))+")"})}u.svg.brush=function(){var le=te(ur,"brushstart","brush","brushend"),we=null,Be=null,$e=[0,0],Je=[0,0],it,Ct,bt=!0,qt=!0,sr=bu[0];function ur(Zr){Zr.each(function(){var oa=u.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Ea).on("touchstart.brush",Ea),ma=oa.selectAll(".background").data([0]);ma.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),oa.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ma=oa.selectAll(".resize").data(sr,I);Ma.exit().remove(),Ma.enter().append("g").attr("class",function(Bn){return"resize "+Bn}).style("cursor",function(Bn){return ku[Bn]}).append("rect").attr("x",function(Bn){return/[ew]$/.test(Bn)?-3:null}).attr("y",function(Bn){return/^[ns]/.test(Bn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ma.style("display",ur.empty()?"none":null);var Ca=u.transition(oa),aa=u.transition(ma),Sn;we&&(Sn=gn(we),aa.attr("x",Sn[0]).attr("width",Sn[1]-Sn[0]),Nr(Ca)),Be&&(Sn=gn(Be),aa.attr("y",Sn[0]).attr("height",Sn[1]-Sn[0]),ya(Ca)),qr(Ca)})}ur.event=function(Zr){Zr.each(function(){var oa=le.of(this,arguments),ma={x:$e,y:Je,i:it,j:Ct},Ma=this.__chart__||ma;this.__chart__=ma,Zo?u.select(this).transition().each("start.brush",function(){it=Ma.i,Ct=Ma.j,$e=Ma.x,Je=Ma.y,oa({type:"brushstart"})}).tween("brush:brush",function(){var Ca=bc($e,ma.x),aa=bc(Je,ma.y);return it=Ct=null,function(Sn){$e=ma.x=Ca(Sn),Je=ma.y=aa(Sn),oa({type:"brush",mode:"resize"})}}).each("end.brush",function(){it=ma.i,Ct=ma.j,oa({type:"brush",mode:"resize"}),oa({type:"brushend"})}):(oa({type:"brushstart"}),oa({type:"brush",mode:"resize"}),oa({type:"brushend"}))})};function qr(Zr){Zr.selectAll(".resize").attr("transform",function(oa){return"translate("+$e[+/e$/.test(oa)]+","+Je[+/^s/.test(oa)]+")"})}function Nr(Zr){Zr.select(".extent").attr("x",$e[0]),Zr.selectAll(".extent,.n>rect,.s>rect").attr("width",$e[1]-$e[0])}function ya(Zr){Zr.select(".extent").attr("y",Je[0]),Zr.selectAll(".extent,.e>rect,.w>rect").attr("height",Je[1]-Je[0])}function Ea(){var Zr=this,oa=u.select(u.event.target),ma=le.of(Zr,arguments),Ma=u.select(Zr),Ca=oa.datum(),aa=!/^(n|s)$/.test(Ca)&&we,Sn=!/^(e|w)$/.test(Ca)&&Be,Bn=oa.classed("extent"),ri=Ut(Zr),xi,Ui=u.mouse(Zr),Bi,So=u.select(e(Zr)).on("keydown.brush",Ts).on("keyup.brush",al);if(u.event.changedTouches?So.on("touchmove.brush",Ds).on("touchend.brush",Qi):So.on("mousemove.brush",Ds).on("mouseup.brush",Qi),Ma.interrupt().selectAll("*").interrupt(),Bn)Ui[0]=$e[0]-Ui[0],Ui[1]=Je[0]-Ui[1];else if(Ca){var Di=+/w$/.test(Ca),mo=+/^n/.test(Ca);Bi=[$e[1-Di]-Ui[0],Je[1-mo]-Ui[1]],Ui[0]=$e[Di],Ui[1]=Je[mo]}else u.event.altKey&&(xi=Ui.slice());Ma.style("pointer-events","none").selectAll(".resize").style("display",null),u.select("body").style("cursor",oa.style("cursor")),ma({type:"brushstart"}),Ds();function Ts(){u.event.keyCode==32&&(Bn||(xi=null,Ui[0]-=$e[1],Ui[1]-=Je[1],Bn=2),Y())}function al(){u.event.keyCode==32&&Bn==2&&(Ui[0]+=$e[1],Ui[1]+=Je[1],Bn=0,Y())}function Ds(){var Oo=u.mouse(Zr),gs=!1;Bi&&(Oo[0]+=Bi[0],Oo[1]+=Bi[1]),Bn||(u.event.altKey?(xi||(xi=[($e[0]+$e[1])/2,(Je[0]+Je[1])/2]),Ui[0]=$e[+(Oo[0]0))return At;do At.push(It=new Date(+ut)),be(ut,yt),ne(ut);while(It=ot)for(;ne(ot),!ut(ot);)ot.setTime(ot-1)},function(ot,yt){if(ot>=ot)if(yt<0)for(;++yt<=0;)for(;be(ot,-1),!ut(ot););else for(;--yt>=0;)for(;be(ot,1),!ut(ot););})},De&&(Ne.count=function(ut,ot){return v.setTime(+ut),w.setTime(+ot),ne(v),ne(w),Math.floor(De(v,w))},Ne.every=function(ut){return ut=Math.floor(ut),!isFinite(ut)||!(ut>0)?null:ut>1?Ne.filter(qe?function(ot){return qe(ot)%ut===0}:function(ot){return Ne.count(0,ot)%ut===0}):Ne}),Ne}var l=S(function(){},function(ne,be){ne.setTime(+ne+be)},function(ne,be){return be-ne});l.every=function(ne){return ne=Math.floor(ne),!isFinite(ne)||!(ne>0)?null:ne>1?S(function(be){be.setTime(Math.floor(be/ne)*ne)},function(be,De){be.setTime(+be+De*ne)},function(be,De){return(De-be)/ne}):l};var e=l.range,t=1e3,a=6e4,r=36e5,n=864e5,i=6048e5,s=S(function(ne){ne.setTime(ne-ne.getMilliseconds())},function(ne,be){ne.setTime(+ne+be*t)},function(ne,be){return(be-ne)/t},function(ne){return ne.getUTCSeconds()}),c=s.range,p=S(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*t)},function(ne,be){ne.setTime(+ne+be*a)},function(ne,be){return(be-ne)/a},function(ne){return ne.getMinutes()}),f=p.range,d=S(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*t-ne.getMinutes()*a)},function(ne,be){ne.setTime(+ne+be*r)},function(ne,be){return(be-ne)/r},function(ne){return ne.getHours()}),y=d.range,o=S(function(ne){ne.setHours(0,0,0,0)},function(ne,be){ne.setDate(ne.getDate()+be)},function(ne,be){return(be-ne-(be.getTimezoneOffset()-ne.getTimezoneOffset())*a)/n},function(ne){return ne.getDate()-1}),b=o.range;function M(ne){return S(function(be){be.setDate(be.getDate()-(be.getDay()+7-ne)%7),be.setHours(0,0,0,0)},function(be,De){be.setDate(be.getDate()+De*7)},function(be,De){return(De-be-(De.getTimezoneOffset()-be.getTimezoneOffset())*a)/i})}var A=M(0),E=M(1),g=M(2),T=M(3),m=M(4),h=M(5),x=M(6),_=A.range,D=E.range,C=g.range,F=T.range,I=m.range,z=h.range,R=x.range,k=S(function(ne){ne.setDate(1),ne.setHours(0,0,0,0)},function(ne,be){ne.setMonth(ne.getMonth()+be)},function(ne,be){return be.getMonth()-ne.getMonth()+(be.getFullYear()-ne.getFullYear())*12},function(ne){return ne.getMonth()}),B=k.range,N=S(function(ne){ne.setMonth(0,1),ne.setHours(0,0,0,0)},function(ne,be){ne.setFullYear(ne.getFullYear()+be)},function(ne,be){return be.getFullYear()-ne.getFullYear()},function(ne){return ne.getFullYear()});N.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:S(function(be){be.setFullYear(Math.floor(be.getFullYear()/ne)*ne),be.setMonth(0,1),be.setHours(0,0,0,0)},function(be,De){be.setFullYear(be.getFullYear()+De*ne)})};var q=N.range,Y=S(function(ne){ne.setUTCSeconds(0,0)},function(ne,be){ne.setTime(+ne+be*a)},function(ne,be){return(be-ne)/a},function(ne){return ne.getUTCMinutes()}),ee=Y.range,te=S(function(ne){ne.setUTCMinutes(0,0,0)},function(ne,be){ne.setTime(+ne+be*r)},function(ne,be){return(be-ne)/r},function(ne){return ne.getUTCHours()}),ae=te.range,j=S(function(ne){ne.setUTCHours(0,0,0,0)},function(ne,be){ne.setUTCDate(ne.getUTCDate()+be)},function(ne,be){return(be-ne)/n},function(ne){return ne.getUTCDate()-1}),G=j.range;function K(ne){return S(function(be){be.setUTCDate(be.getUTCDate()-(be.getUTCDay()+7-ne)%7),be.setUTCHours(0,0,0,0)},function(be,De){be.setUTCDate(be.getUTCDate()+De*7)},function(be,De){return(De-be)/i})}var H=K(0),Z=K(1),X=K(2),$=K(3),Q=K(4),re=K(5),ue=K(6),pe=H.range,ge=Z.range,Te=X.range,Se=$.range,Ce=Q.range,Ue=re.range,Oe=ue.range,_e=S(function(ne){ne.setUTCDate(1),ne.setUTCHours(0,0,0,0)},function(ne,be){ne.setUTCMonth(ne.getUTCMonth()+be)},function(ne,be){return be.getUTCMonth()-ne.getUTCMonth()+(be.getUTCFullYear()-ne.getUTCFullYear())*12},function(ne){return ne.getUTCMonth()}),ce=_e.range,ie=S(function(ne){ne.setUTCMonth(0,1),ne.setUTCHours(0,0,0,0)},function(ne,be){ne.setUTCFullYear(ne.getUTCFullYear()+be)},function(ne,be){return be.getUTCFullYear()-ne.getUTCFullYear()},function(ne){return ne.getUTCFullYear()});ie.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:S(function(be){be.setUTCFullYear(Math.floor(be.getUTCFullYear()/ne)*ne),be.setUTCMonth(0,1),be.setUTCHours(0,0,0,0)},function(be,De){be.setUTCFullYear(be.getUTCFullYear()+De*ne)})};var se=ie.range;u.timeDay=o,u.timeDays=b,u.timeFriday=h,u.timeFridays=z,u.timeHour=d,u.timeHours=y,u.timeInterval=S,u.timeMillisecond=l,u.timeMilliseconds=e,u.timeMinute=p,u.timeMinutes=f,u.timeMonday=E,u.timeMondays=D,u.timeMonth=k,u.timeMonths=B,u.timeSaturday=x,u.timeSaturdays=R,u.timeSecond=s,u.timeSeconds=c,u.timeSunday=A,u.timeSundays=_,u.timeThursday=m,u.timeThursdays=I,u.timeTuesday=g,u.timeTuesdays=C,u.timeWednesday=T,u.timeWednesdays=F,u.timeWeek=A,u.timeWeeks=_,u.timeYear=N,u.timeYears=q,u.utcDay=j,u.utcDays=G,u.utcFriday=re,u.utcFridays=Ue,u.utcHour=te,u.utcHours=ae,u.utcMillisecond=l,u.utcMilliseconds=e,u.utcMinute=Y,u.utcMinutes=ee,u.utcMonday=Z,u.utcMondays=ge,u.utcMonth=_e,u.utcMonths=ce,u.utcSaturday=ue,u.utcSaturdays=Oe,u.utcSecond=s,u.utcSeconds=c,u.utcSunday=H,u.utcSundays=pe,u.utcThursday=Q,u.utcThursdays=Ce,u.utcTuesday=X,u.utcTuesdays=Te,u.utcWednesday=$,u.utcWednesdays=Se,u.utcWeek=H,u.utcWeeks=pe,u.utcYear=ie,u.utcYears=se,Object.defineProperty(u,"__esModule",{value:!0})})}}),Ni=xe({"node_modules/d3-time-format/dist/d3-time-format.js"(U,O){(function(u,v){typeof U=="object"&&typeof O<"u"?v(U,ii()):(u=u||self,v(u.d3=u.d3||{},u.d3))})(U,function(u,v){"use strict";function w(Ee){if(0<=Ee.y&&Ee.y<100){var Re=new Date(-1,Ee.m,Ee.d,Ee.H,Ee.M,Ee.S,Ee.L);return Re.setFullYear(Ee.y),Re}return new Date(Ee.y,Ee.m,Ee.d,Ee.H,Ee.M,Ee.S,Ee.L)}function S(Ee){if(0<=Ee.y&&Ee.y<100){var Re=new Date(Date.UTC(-1,Ee.m,Ee.d,Ee.H,Ee.M,Ee.S,Ee.L));return Re.setUTCFullYear(Ee.y),Re}return new Date(Date.UTC(Ee.y,Ee.m,Ee.d,Ee.H,Ee.M,Ee.S,Ee.L))}function l(Ee,Re,he){return{y:Ee,m:Re,d:he,H:0,M:0,S:0,L:0}}function e(Ee){var Re=Ee.dateTime,he=Ee.date,ye=Ee.time,Ie=Ee.periods,Fe=Ee.days,He=Ee.shortDays,We=Ee.months,pt=Ee.shortMonths,ct=c(Ie),ft=p(Ie),mt=c(Fe),_t=p(Fe),Bt=c(He),Et=p(He),hr=c(We),$r=p(We),ca=c(pt),na=p(pt),wa={a:Pi,A:Jn,b:Ti,B:_n,c:null,d:k,e:k,f:ee,H:B,I:N,j:q,L:Y,m:te,M:ae,p:Ln,q:ji,Q:ot,s:yt,S:j,u:G,U:K,V:H,w:Z,W:X,x:null,X:null,y:$,Y:Q,Z:re,"%":ut},pa={a:Zi,A:un,b:rn,B:nt,c:null,d:ue,e:ue,f:Ce,H:pe,I:ge,j:Te,L:Se,m:Ue,M:Oe,p:Ke,q:Qt,Q:ot,s:yt,S:_e,u:ce,U:ie,V:se,w:ne,W:be,x:null,X:null,y:De,Y:qe,Z:Ne,"%":ut},fa={a:tn,A:ka,b:oi,B:$n,c:bn,d:m,e:m,f:F,H:x,I:x,j:h,L:C,m:T,M:_,p:Oa,q:g,Q:z,s:R,S:D,u:d,U:y,V:o,w:f,W:b,x:ci,X:hi,y:A,Y:M,Z:E,"%":I};wa.x=za(he,wa),wa.X=za(ye,wa),wa.c=za(Re,wa),pa.x=za(he,pa),pa.X=za(ye,pa),pa.c=za(Re,pa);function za(Xt,nr){return function(cr){var rr=[],Ze=-1,xt=0,Vt=Xt.length,er,Tr,jr;for(cr instanceof Date||(cr=new Date(+cr));++Ze53)return null;"w"in rr||(rr.w=1),"Z"in rr?(xt=S(l(rr.y,0,1)),Vt=xt.getUTCDay(),xt=Vt>4||Vt===0?v.utcMonday.ceil(xt):v.utcMonday(xt),xt=v.utcDay.offset(xt,(rr.V-1)*7),rr.y=xt.getUTCFullYear(),rr.m=xt.getUTCMonth(),rr.d=xt.getUTCDate()+(rr.w+6)%7):(xt=w(l(rr.y,0,1)),Vt=xt.getDay(),xt=Vt>4||Vt===0?v.timeMonday.ceil(xt):v.timeMonday(xt),xt=v.timeDay.offset(xt,(rr.V-1)*7),rr.y=xt.getFullYear(),rr.m=xt.getMonth(),rr.d=xt.getDate()+(rr.w+6)%7)}else("W"in rr||"U"in rr)&&("w"in rr||(rr.w="u"in rr?rr.u%7:"W"in rr?1:0),Vt="Z"in rr?S(l(rr.y,0,1)).getUTCDay():w(l(rr.y,0,1)).getDay(),rr.m=0,rr.d="W"in rr?(rr.w+6)%7+rr.W*7-(Vt+5)%7:rr.w+rr.U*7-(Vt+6)%7);return"Z"in rr?(rr.H+=rr.Z/100|0,rr.M+=rr.Z%100,S(rr)):w(rr)}}function Va(Xt,nr,cr,rr){for(var Ze=0,xt=nr.length,Vt=cr.length,er,Tr;Ze=Vt)return-1;if(er=nr.charCodeAt(Ze++),er===37){if(er=nr.charAt(Ze++),Tr=fa[er in t?nr.charAt(Ze++):er],!Tr||(rr=Tr(Xt,cr,rr))<0)return-1}else if(er!=cr.charCodeAt(rr++))return-1}return rr}function Oa(Xt,nr,cr){var rr=ct.exec(nr.slice(cr));return rr?(Xt.p=ft[rr[0].toLowerCase()],cr+rr[0].length):-1}function tn(Xt,nr,cr){var rr=Bt.exec(nr.slice(cr));return rr?(Xt.w=Et[rr[0].toLowerCase()],cr+rr[0].length):-1}function ka(Xt,nr,cr){var rr=mt.exec(nr.slice(cr));return rr?(Xt.w=_t[rr[0].toLowerCase()],cr+rr[0].length):-1}function oi(Xt,nr,cr){var rr=ca.exec(nr.slice(cr));return rr?(Xt.m=na[rr[0].toLowerCase()],cr+rr[0].length):-1}function $n(Xt,nr,cr){var rr=hr.exec(nr.slice(cr));return rr?(Xt.m=$r[rr[0].toLowerCase()],cr+rr[0].length):-1}function bn(Xt,nr,cr){return Va(Xt,Re,nr,cr)}function ci(Xt,nr,cr){return Va(Xt,he,nr,cr)}function hi(Xt,nr,cr){return Va(Xt,ye,nr,cr)}function Pi(Xt){return He[Xt.getDay()]}function Jn(Xt){return Fe[Xt.getDay()]}function Ti(Xt){return pt[Xt.getMonth()]}function _n(Xt){return We[Xt.getMonth()]}function Ln(Xt){return Ie[+(Xt.getHours()>=12)]}function ji(Xt){return 1+~~(Xt.getMonth()/3)}function Zi(Xt){return He[Xt.getUTCDay()]}function un(Xt){return Fe[Xt.getUTCDay()]}function rn(Xt){return pt[Xt.getUTCMonth()]}function nt(Xt){return We[Xt.getUTCMonth()]}function Ke(Xt){return Ie[+(Xt.getUTCHours()>=12)]}function Qt(Xt){return 1+~~(Xt.getUTCMonth()/3)}return{format:function(Xt){var nr=za(Xt+="",wa);return nr.toString=function(){return Xt},nr},parse:function(Xt){var nr=Ia(Xt+="",!1);return nr.toString=function(){return Xt},nr},utcFormat:function(Xt){var nr=za(Xt+="",pa);return nr.toString=function(){return Xt},nr},utcParse:function(Xt){var nr=Ia(Xt+="",!0);return nr.toString=function(){return Xt},nr}}}var t={"-":"",_:" ",0:"0"},a=/^\s*\d+/,r=/^%/,n=/[\\^$*+?|[\]().{}]/g;function i(Ee,Re,he){var ye=Ee<0?"-":"",Ie=(ye?-Ee:Ee)+"",Fe=Ie.length;return ye+(Fe68?1900:2e3),he+ye[0].length):-1}function E(Ee,Re,he){var ye=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Re.slice(he,he+6));return ye?(Ee.Z=ye[1]?0:-(ye[2]+(ye[3]||"00")),he+ye[0].length):-1}function g(Ee,Re,he){var ye=a.exec(Re.slice(he,he+1));return ye?(Ee.q=ye[0]*3-3,he+ye[0].length):-1}function T(Ee,Re,he){var ye=a.exec(Re.slice(he,he+2));return ye?(Ee.m=ye[0]-1,he+ye[0].length):-1}function m(Ee,Re,he){var ye=a.exec(Re.slice(he,he+2));return ye?(Ee.d=+ye[0],he+ye[0].length):-1}function h(Ee,Re,he){var ye=a.exec(Re.slice(he,he+3));return ye?(Ee.m=0,Ee.d=+ye[0],he+ye[0].length):-1}function x(Ee,Re,he){var ye=a.exec(Re.slice(he,he+2));return ye?(Ee.H=+ye[0],he+ye[0].length):-1}function _(Ee,Re,he){var ye=a.exec(Re.slice(he,he+2));return ye?(Ee.M=+ye[0],he+ye[0].length):-1}function D(Ee,Re,he){var ye=a.exec(Re.slice(he,he+2));return ye?(Ee.S=+ye[0],he+ye[0].length):-1}function C(Ee,Re,he){var ye=a.exec(Re.slice(he,he+3));return ye?(Ee.L=+ye[0],he+ye[0].length):-1}function F(Ee,Re,he){var ye=a.exec(Re.slice(he,he+6));return ye?(Ee.L=Math.floor(ye[0]/1e3),he+ye[0].length):-1}function I(Ee,Re,he){var ye=r.exec(Re.slice(he,he+1));return ye?he+ye[0].length:-1}function z(Ee,Re,he){var ye=a.exec(Re.slice(he));return ye?(Ee.Q=+ye[0],he+ye[0].length):-1}function R(Ee,Re,he){var ye=a.exec(Re.slice(he));return ye?(Ee.s=+ye[0],he+ye[0].length):-1}function k(Ee,Re){return i(Ee.getDate(),Re,2)}function B(Ee,Re){return i(Ee.getHours(),Re,2)}function N(Ee,Re){return i(Ee.getHours()%12||12,Re,2)}function q(Ee,Re){return i(1+v.timeDay.count(v.timeYear(Ee),Ee),Re,3)}function Y(Ee,Re){return i(Ee.getMilliseconds(),Re,3)}function ee(Ee,Re){return Y(Ee,Re)+"000"}function te(Ee,Re){return i(Ee.getMonth()+1,Re,2)}function ae(Ee,Re){return i(Ee.getMinutes(),Re,2)}function j(Ee,Re){return i(Ee.getSeconds(),Re,2)}function G(Ee){var Re=Ee.getDay();return Re===0?7:Re}function K(Ee,Re){return i(v.timeSunday.count(v.timeYear(Ee)-1,Ee),Re,2)}function H(Ee,Re){var he=Ee.getDay();return Ee=he>=4||he===0?v.timeThursday(Ee):v.timeThursday.ceil(Ee),i(v.timeThursday.count(v.timeYear(Ee),Ee)+(v.timeYear(Ee).getDay()===4),Re,2)}function Z(Ee){return Ee.getDay()}function X(Ee,Re){return i(v.timeMonday.count(v.timeYear(Ee)-1,Ee),Re,2)}function $(Ee,Re){return i(Ee.getFullYear()%100,Re,2)}function Q(Ee,Re){return i(Ee.getFullYear()%1e4,Re,4)}function re(Ee){var Re=Ee.getTimezoneOffset();return(Re>0?"-":(Re*=-1,"+"))+i(Re/60|0,"0",2)+i(Re%60,"0",2)}function ue(Ee,Re){return i(Ee.getUTCDate(),Re,2)}function pe(Ee,Re){return i(Ee.getUTCHours(),Re,2)}function ge(Ee,Re){return i(Ee.getUTCHours()%12||12,Re,2)}function Te(Ee,Re){return i(1+v.utcDay.count(v.utcYear(Ee),Ee),Re,3)}function Se(Ee,Re){return i(Ee.getUTCMilliseconds(),Re,3)}function Ce(Ee,Re){return Se(Ee,Re)+"000"}function Ue(Ee,Re){return i(Ee.getUTCMonth()+1,Re,2)}function Oe(Ee,Re){return i(Ee.getUTCMinutes(),Re,2)}function _e(Ee,Re){return i(Ee.getUTCSeconds(),Re,2)}function ce(Ee){var Re=Ee.getUTCDay();return Re===0?7:Re}function ie(Ee,Re){return i(v.utcSunday.count(v.utcYear(Ee)-1,Ee),Re,2)}function se(Ee,Re){var he=Ee.getUTCDay();return Ee=he>=4||he===0?v.utcThursday(Ee):v.utcThursday.ceil(Ee),i(v.utcThursday.count(v.utcYear(Ee),Ee)+(v.utcYear(Ee).getUTCDay()===4),Re,2)}function ne(Ee){return Ee.getUTCDay()}function be(Ee,Re){return i(v.utcMonday.count(v.utcYear(Ee)-1,Ee),Re,2)}function De(Ee,Re){return i(Ee.getUTCFullYear()%100,Re,2)}function qe(Ee,Re){return i(Ee.getUTCFullYear()%1e4,Re,4)}function Ne(){return"+0000"}function ut(){return"%"}function ot(Ee){return+Ee}function yt(Ee){return Math.floor(+Ee/1e3)}var At;It({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function It(Ee){return At=e(Ee),u.timeFormat=At.format,u.timeParse=At.parse,u.utcFormat=At.utcFormat,u.utcParse=At.utcParse,At}var Zt="%Y-%m-%dT%H:%M:%S.%LZ";function vr(Ee){return Ee.toISOString()}var Ut=Date.prototype.toISOString?vr:u.utcFormat(Zt);function Jt(Ee){var Re=new Date(Ee);return isNaN(Re)?null:Re}var at=+new Date("2000-01-01T00:00:00.000Z")?Jt:u.utcParse(Zt);u.isoFormat=Ut,u.isoParse=at,u.timeFormatDefaultLocale=It,u.timeFormatLocale=e,Object.defineProperty(u,"__esModule",{value:!0})})}}),An=xe({"node_modules/d3-format/dist/d3-format.js"(U,O){(function(u,v){typeof U=="object"&&typeof O<"u"?v(U):(u=typeof globalThis<"u"?globalThis:u||self,v(u.d3=u.d3||{}))})(U,function(u){"use strict";function v(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function w(T,m){if((h=(T=m?T.toExponential(m-1):T.toExponential()).indexOf("e"))<0)return null;var h,x=T.slice(0,h);return[x.length>1?x[0]+x.slice(2):x,+T.slice(h+1)]}function S(T){return T=w(Math.abs(T)),T?T[1]:NaN}function l(T,m){return function(h,x){for(var _=h.length,D=[],C=0,F=T[0],I=0;_>0&&F>0&&(I+F+1>x&&(F=Math.max(1,x-I)),D.push(h.substring(_-=F,_+F)),!((I+=F+1)>x));)F=T[C=(C+1)%T.length];return D.reverse().join(m)}}function e(T){return function(m){return m.replace(/[0-9]/g,function(h){return T[+h]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(T){if(!(m=t.exec(T)))throw new Error("invalid format: "+T);var m;return new r({fill:m[1],align:m[2],sign:m[3],symbol:m[4],zero:m[5],width:m[6],comma:m[7],precision:m[8]&&m[8].slice(1),trim:m[9],type:m[10]})}a.prototype=r.prototype;function r(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function n(T){e:for(var m=T.length,h=1,x=-1,_;h0&&(x=0);break}return x>0?T.slice(0,x)+T.slice(_+1):T}var i;function s(T,m){var h=w(T,m);if(!h)return T+"";var x=h[0],_=h[1],D=_-(i=Math.max(-8,Math.min(8,Math.floor(_/3)))*3)+1,C=x.length;return D===C?x:D>C?x+new Array(D-C+1).join("0"):D>0?x.slice(0,D)+"."+x.slice(D):"0."+new Array(1-D).join("0")+w(T,Math.max(0,m+D-1))[0]}function c(T,m){var h=w(T,m);if(!h)return T+"";var x=h[0],_=h[1];return _<0?"0."+new Array(-_).join("0")+x:x.length>_+1?x.slice(0,_+1)+"."+x.slice(_+1):x+new Array(_-x.length+2).join("0")}var p={"%":function(T,m){return(T*100).toFixed(m)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:v,e:function(T,m){return T.toExponential(m)},f:function(T,m){return T.toFixed(m)},g:function(T,m){return T.toPrecision(m)},o:function(T){return Math.round(T).toString(8)},p:function(T,m){return c(T*100,m)},r:c,s,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function f(T){return T}var d=Array.prototype.map,y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function o(T){var m=T.grouping===void 0||T.thousands===void 0?f:l(d.call(T.grouping,Number),T.thousands+""),h=T.currency===void 0?"":T.currency[0]+"",x=T.currency===void 0?"":T.currency[1]+"",_=T.decimal===void 0?".":T.decimal+"",D=T.numerals===void 0?f:e(d.call(T.numerals,String)),C=T.percent===void 0?"%":T.percent+"",F=T.minus===void 0?"-":T.minus+"",I=T.nan===void 0?"NaN":T.nan+"";function z(k){k=a(k);var B=k.fill,N=k.align,q=k.sign,Y=k.symbol,ee=k.zero,te=k.width,ae=k.comma,j=k.precision,G=k.trim,K=k.type;K==="n"?(ae=!0,K="g"):p[K]||(j===void 0&&(j=12),G=!0,K="g"),(ee||B==="0"&&N==="=")&&(ee=!0,B="0",N="=");var H=Y==="$"?h:Y==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",Z=Y==="$"?x:/[%p]/.test(K)?C:"",X=p[K],$=/[defgprs%]/.test(K);j=j===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function Q(re){var ue=H,pe=Z,ge,Te,Se;if(K==="c")pe=X(re)+pe,re="";else{re=+re;var Ce=re<0||1/re<0;if(re=isNaN(re)?I:X(Math.abs(re),j),G&&(re=n(re)),Ce&&+re==0&&q!=="+"&&(Ce=!1),ue=(Ce?q==="("?q:F:q==="-"||q==="("?"":q)+ue,pe=(K==="s"?y[8+i/3]:"")+pe+(Ce&&q==="("?")":""),$){for(ge=-1,Te=re.length;++geSe||Se>57){pe=(Se===46?_+re.slice(ge+1):re.slice(ge))+pe,re=re.slice(0,ge);break}}}ae&&!ee&&(re=m(re,1/0));var Ue=ue.length+re.length+pe.length,Oe=Ue>1)+ue+re+pe+Oe.slice(Ue);break;default:re=Oe+ue+re+pe;break}return D(re)}return Q.toString=function(){return k+""},Q}function R(k,B){var N=z((k=a(k),k.type="f",k)),q=Math.max(-8,Math.min(8,Math.floor(S(B)/3)))*3,Y=Math.pow(10,-q),ee=y[8+q/3];return function(te){return N(Y*te)+ee}}return{format:z,formatPrefix:R}}var b;M({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function M(T){return b=o(T),u.format=b.format,u.formatPrefix=b.formatPrefix,b}function A(T){return Math.max(0,-S(Math.abs(T)))}function E(T,m){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(S(m)/3)))*3-S(Math.abs(T)))}function g(T,m){return T=Math.abs(T),m=Math.abs(m)-T,Math.max(0,S(m)-S(T))+1}u.FormatSpecifier=r,u.formatDefaultLocale=M,u.formatLocale=o,u.formatSpecifier=a,u.precisionFixed=A,u.precisionPrefix=E,u.precisionRound=g,Object.defineProperty(u,"__esModule",{value:!0})})}}),yi=xe({"node_modules/is-string-blank/index.js"(U,O){"use strict";O.exports=function(u){for(var v=u.length,w,S=0;S13)&&w!==32&&w!==133&&w!==160&&w!==5760&&w!==6158&&(w<8192||w>8205)&&w!==8232&&w!==8233&&w!==8239&&w!==8287&&w!==8288&&w!==12288&&w!==65279)return!1;return!0}}}),yn=xe({"node_modules/fast-isnumeric/index.js"(U,O){"use strict";var u=yi();O.exports=function(v){var w=typeof v;if(w==="string"){var S=v;if(v=+v,v===0&&u(S))return!1}else if(w!=="number")return!1;return v-v<1}}}),Gn=xe({"src/constants/numerical.js"(U,O){"use strict";O.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}}}),ys=xe({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(U,O){(function(u,v){typeof U=="object"&&typeof O<"u"?v(U):(u=typeof globalThis<"u"?globalThis:u||self,v(u["base64-arraybuffer"]={}))})(U,function(u){"use strict";for(var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=typeof Uint8Array>"u"?[]:new Uint8Array(256),S=0;S>2],i+=v[(a[r]&3)<<4|a[r+1]>>4],i+=v[(a[r+1]&15)<<2|a[r+2]>>6],i+=v[a[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e=function(t){var a=t.length*.75,r=t.length,n,i=0,s,c,p,f;t[t.length-1]==="="&&(a--,t[t.length-2]==="="&&a--);var d=new ArrayBuffer(a),y=new Uint8Array(d);for(n=0;n>4,y[i++]=(c&15)<<4|p>>2,y[i++]=(p&3)<<6|f&63;return d};u.decode=e,u.encode=l,Object.defineProperty(u,"__esModule",{value:!0})})}}),Us=xe({"src/lib/is_plain_object.js"(U,O){"use strict";O.exports=function(v){return window&&window.process&&window.process.versions?Object.prototype.toString.call(v)==="[object Object]":Object.prototype.toString.call(v)==="[object Object]"&&Object.getPrototypeOf(v).hasOwnProperty("hasOwnProperty")}}}),rs=xe({"src/lib/array.js"(U){"use strict";var O=ys().decode,u=Us(),v=Array.isArray,w=ArrayBuffer,S=DataView;function l(s){return w.isView(s)&&!(s instanceof S)}U.isTypedArray=l;function e(s){return v(s)||l(s)}U.isArrayOrTypedArray=e;function t(s){return!e(s[0])}U.isArray1D=t,U.ensureArray=function(s,c){return v(s)||(s=[]),s.length=c,s};var a={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};a.uint8c=a.u1c,a.uint8=a.u1,a.int8=a.i1,a.uint16=a.u2,a.int16=a.i2,a.uint32=a.u4,a.int32=a.i4,a.float32=a.f4,a.float64=a.f8;function r(s){return s.constructor===ArrayBuffer}U.isArrayBuffer=r,U.decodeTypedArraySpec=function(s){var c=[],p=n(s),f=p.dtype,d=a[f];if(!d)throw new Error('Error in dtype: "'+f+'"');var y=d.BYTES_PER_ELEMENT,o=p.bdata;r(o)||(o=O(o));var b=p.shape===void 0?[o.byteLength/y]:(""+p.shape).split(",");b.reverse();var M=b.length,A,E,g=+b[0],T=y*g,m=0;if(M===1)c=new d(o);else if(M===2)for(A=+b[1],E=0;E2)return d[A]=d[A]|l,b.set(M,null);if(o){for(c=A;c0)return Math.log(w)/Math.LN10;var l=Math.log(Math.min(S[0],S[1]))/Math.LN10;return u(l)||(l=Math.log(Math.max(S[0],S[1]))/Math.LN10-6),l}}}),uu=xe({"src/lib/relink_private.js"(U,O){"use strict";var u=rs().isArrayOrTypedArray,v=Us();O.exports=function w(S,l){for(var e in l){var t=l[e],a=S[e];if(a!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in S)continue;S[e]=t}else if(u(t)&&u(a)&&v(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,a.length),n=0;nIc,modHalf:()=>nh});function Ic(U,O){let u=U%O;return u<0?u+O:u}function nh(U,O){return Math.abs(U)>O/2?U-Math.round(U/O)*O:U}var Cd=Pr({"src/lib/mod.ts"(){"use strict"}}),oo=xe({"src/lib/extend.js"(U){"use strict";var O=Us(),u=Array.isArray;function v(S,l){var e,t;for(e=0;e=4&&U[3]!==1&&(O=", "+U[3]),"hwb("+U[0]+", "+U[1]+"%, "+U[2]+"%"+O+")"},Nn.to.keyword=function(...U){return jn[U.slice(0,3)]},Yi=Nn}}),ol,Gf=Pr({"node_modules/color/node_modules/color-name/index.js"(){ol={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]}}});function ih(U){let O=U>.0031308?1.055*U**.4166666666666667-.055:U*12.92;return Math.min(Math.max(0,O),1)}function cv(U){return U>.04045?((U+.055)/1.055)**2.4:U/12.92}function tT(U,O){return(U[0]-O[0])**2+(U[1]-O[1])**2+(U[2]-O[2])**2}var zm,_o,ud,Th,Xy=Pr({"node_modules/color/node_modules/color-convert/conversions.js"(){Gf(),zm={};for(let U of Object.keys(ol))zm[ol[U]]=U;_o={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},ud=_o,Th=(6/29)**3;for(let U of Object.keys(_o)){if(!("channels"in _o[U]))throw new Error("missing channels property: "+U);if(!("labels"in _o[U]))throw new Error("missing channel labels property: "+U);if(_o[U].labels.length!==_o[U].channels)throw new Error("channel and label counts mismatch: "+U);let{channels:O,labels:u}=_o[U];delete _o[U].channels,delete _o[U].labels,Object.defineProperty(_o[U],"channels",{value:O}),Object.defineProperty(_o[U],"labels",{value:u})}_o.rgb.hsl=function(U){let O=U[0]/255,u=U[1]/255,v=U[2]/255,w=Math.min(O,u,v),S=Math.max(O,u,v),l=S-w,e,t;switch(S){case w:{e=0;break}case O:{e=(u-v)/l;break}case u:{e=2+(v-O)/l;break}case v:{e=4+(O-u)/l;break}}e=Math.min(e*60,360),e<0&&(e+=360);let a=(w+S)/2;return S===w?t=0:a<=.5?t=l/(S+w):t=l/(2-S-w),[e,t*100,a*100]},_o.rgb.hsv=function(U){let O,u,v,w,S,l=U[0]/255,e=U[1]/255,t=U[2]/255,a=Math.max(l,e,t),r=a-Math.min(l,e,t),n=function(i){return(a-i)/6/r+1/2};if(r===0)w=0,S=0;else{switch(S=r/a,O=n(l),u=n(e),v=n(t),a){case l:{w=v-u;break}case e:{w=1/3+O-v;break}case t:{w=2/3+u-O;break}}w<0?w+=1:w>1&&(w-=1)}return[w*360,S*100,a*100]},_o.rgb.hwb=function(U){let O=U[0],u=U[1],v=U[2],w=_o.rgb.hsl(U)[0],S=1/255*Math.min(O,Math.min(u,v));return v=1-1/255*Math.max(O,Math.max(u,v)),[w,S*100,v*100]},_o.rgb.oklab=function(U){let O=cv(U[0]/255),u=cv(U[1]/255),v=cv(U[2]/255),w=Math.cbrt(.4122214708*O+.5363325363*u+.0514459929*v),S=Math.cbrt(.2119034982*O+.6806995451*u+.1073969566*v),l=Math.cbrt(.0883024619*O+.2817188376*u+.6299787005*v),e=.2104542553*w+.793617785*S-.0040720468*l,t=1.9779984951*w-2.428592205*S+.4505937099*l,a=.0259040371*w+.7827717662*S-.808675766*l;return[e*100,t*100,a*100]},_o.rgb.cmyk=function(U){let O=U[0]/255,u=U[1]/255,v=U[2]/255,w=Math.min(1-O,1-u,1-v),S=(1-O-w)/(1-w)||0,l=(1-u-w)/(1-w)||0,e=(1-v-w)/(1-w)||0;return[S*100,l*100,e*100,w*100]},_o.rgb.keyword=function(U){let O=zm[U];if(O)return O;let u=Number.POSITIVE_INFINITY,v;for(let w of Object.keys(ol)){let S=ol[w],l=tT(U,S);lTh?u**(1/3):7.787*u+16/116,v=v>Th?v**(1/3):7.787*v+16/116,w=w>Th?w**(1/3):7.787*w+16/116;let S=116*v-16,l=500*(u-v),e=200*(v-w);return[S,l,e]},_o.hsl.rgb=function(U){let O=U[0]/360,u=U[1]/100,v=U[2]/100,w,S;if(u===0)return S=v*255,[S,S,S];let l=v<.5?v*(1+u):v+u-v*u,e=2*v-l,t=[0,0,0];for(let a=0;a<3;a++)w=O+1/3*-(a-1),w<0&&w++,w>1&&w--,6*w<1?S=e+(l-e)*6*w:2*w<1?S=l:3*w<2?S=e+(l-e)*(2/3-w)*6:S=e,t[a]=S*255;return t},_o.hsl.hsv=function(U){let O=U[0],u=U[1]/100,v=U[2]/100,w=u,S=Math.max(v,.01);v*=2,u*=v<=1?v:2-v,w*=S<=1?S:2-S;let l=(v+u)/2,e=v===0?2*w/(S+w):2*u/(v+u);return[O,e*100,l*100]},_o.hsv.rgb=function(U){let O=U[0]/60,u=U[1]/100,v=U[2]/100,w=Math.floor(O)%6,S=O-Math.floor(O),l=255*v*(1-u),e=255*v*(1-u*S),t=255*v*(1-u*(1-S));switch(v*=255,w){case 0:return[v,t,l];case 1:return[e,v,l];case 2:return[l,v,t];case 3:return[l,e,v];case 4:return[t,l,v];case 5:return[v,l,e]}},_o.hsv.hsl=function(U){let O=U[0],u=U[1]/100,v=U[2]/100,w=Math.max(v,.01),S,l;l=(2-u)*v;let e=(2-u)*w;return S=u*w,S/=e<=1?e:2-e,S=S||0,l/=2,[O,S*100,l*100]},_o.hwb.rgb=function(U){let O=U[0]/360,u=U[1]/100,v=U[2]/100,w=u+v,S;w>1&&(u/=w,v/=w);let l=Math.floor(6*O),e=1-v;S=6*O-l,l&1&&(S=1-S);let t=u+S*(e-u),a,r,n;switch(l){default:case 6:case 0:{a=e,r=t,n=u;break}case 1:{a=t,r=e,n=u;break}case 2:{a=u,r=e,n=t;break}case 3:{a=u,r=t,n=e;break}case 4:{a=t,r=u,n=e;break}case 5:{a=e,r=u,n=t;break}}return[a*255,r*255,n*255]},_o.cmyk.rgb=function(U){let O=U[0]/100,u=U[1]/100,v=U[2]/100,w=U[3]/100,S=1-Math.min(1,O*(1-w)+w),l=1-Math.min(1,u*(1-w)+w),e=1-Math.min(1,v*(1-w)+w);return[S*255,l*255,e*255]},_o.xyz.rgb=function(U){let O=U[0]/100,u=U[1]/100,v=U[2]/100,w,S,l;return w=O*3.2404542+u*-1.5371385+v*-.4985314,S=O*-.969266+u*1.8760108+v*.041556,l=O*.0556434+u*-.2040259+v*1.0572252,w=ih(w),S=ih(S),l=ih(l),[w*255,S*255,l*255]},_o.xyz.lab=function(U){let O=U[0],u=U[1],v=U[2];O/=95.047,u/=100,v/=108.883,O=O>Th?O**(1/3):7.787*O+16/116,u=u>Th?u**(1/3):7.787*u+16/116,v=v>Th?v**(1/3):7.787*v+16/116;let w=116*u-16,S=500*(O-u),l=200*(u-v);return[w,S,l]},_o.xyz.oklab=function(U){let O=U[0]/100,u=U[1]/100,v=U[2]/100,w=Math.cbrt(.8189330101*O+.3618667424*u-.1288597137*v),S=Math.cbrt(.0329845436*O+.9293118715*u+.0361456387*v),l=Math.cbrt(.0482003018*O+.2643662691*u+.633851707*v),e=.2104542553*w+.793617785*S-.0040720468*l,t=1.9779984951*w-2.428592205*S+.4505937099*l,a=.0259040371*w+.7827717662*S-.808675766*l;return[e*100,t*100,a*100]},_o.oklab.oklch=function(U){return _o.lab.lch(U)},_o.oklab.xyz=function(U){let O=U[0]/100,u=U[1]/100,v=U[2]/100,w=(.999999998*O+.396337792*u+.215803758*v)**3,S=(1.000000008*O-.105561342*u-.063854175*v)**3,l=(1.000000055*O-.089484182*u-1.291485538*v)**3,e=1.227013851*w-.55779998*S+.281256149*l,t=-.040580178*w+1.11225687*S-.071676679*l,a=-.076381285*w-.421481978*S+1.58616322*l;return[e*100,t*100,a*100]},_o.oklab.rgb=function(U){let O=U[0]/100,u=U[1]/100,v=U[2]/100,w=(O+.3963377774*u+.2158037573*v)**3,S=(O-.1055613458*u-.0638541728*v)**3,l=(O-.0894841775*u-1.291485548*v)**3,e=ih(4.0767416621*w-3.3077115913*S+.2309699292*l),t=ih(-1.2684380046*w+2.6097574011*S-.3413193965*l),a=ih(-.0041960863*w-.7034186147*S+1.707614701*l);return[e*255,t*255,a*255]},_o.oklch.oklab=function(U){return _o.lch.lab(U)},_o.lab.xyz=function(U){let O=U[0],u=U[1],v=U[2],w,S,l;S=(O+16)/116,w=u/500+S,l=S-v/200;let e=S**3,t=w**3,a=l**3;return S=e>Th?e:(S-16/116)/7.787,w=t>Th?t:(w-16/116)/7.787,l=a>Th?a:(l-16/116)/7.787,w*=95.047,S*=100,l*=108.883,[w,S,l]},_o.lab.lch=function(U){let O=U[0],u=U[1],v=U[2],w;w=Math.atan2(v,u)*360/2/Math.PI,w<0&&(w+=360);let l=Math.sqrt(u*u+v*v);return[O,l,w]},_o.lch.lab=function(U){let O=U[0],u=U[1],w=U[2]/360*2*Math.PI,S=u*Math.cos(w),l=u*Math.sin(w);return[O,S,l]},_o.rgb.ansi16=function(U,O=null){let[u,v,w]=U,S=O===null?_o.rgb.hsv(U)[2]:O;if(S=Math.round(S/50),S===0)return 30;let l=30+(Math.round(w/255)<<2|Math.round(v/255)<<1|Math.round(u/255));return S===2&&(l+=60),l},_o.hsv.ansi16=function(U){return _o.rgb.ansi16(_o.hsv.rgb(U),U[2])},_o.rgb.ansi256=function(U){let O=U[0],u=U[1],v=U[2];return O>>4===u>>4&&u>>4===v>>4?O<8?16:O>248?231:Math.round((O-8)/247*24)+232:16+36*Math.round(O/255*5)+6*Math.round(u/255*5)+Math.round(v/255*5)},_o.ansi16.rgb=function(U){U=U[0];let O=U%10;if(O===0||O===7)return U>50&&(O+=3.5),O=O/10.5*255,[O,O,O];let u=(Math.trunc(U>50)+1)*.5,v=(O&1)*u*255,w=(O>>1&1)*u*255,S=(O>>2&1)*u*255;return[v,w,S]},_o.ansi256.rgb=function(U){if(U=U[0],U>=232){let S=(U-232)*10+8;return[S,S,S]}U-=16;let O,u=Math.floor(U/36)/5*255,v=Math.floor((O=U%36)/6)/5*255,w=O%6/5*255;return[u,v,w]},_o.rgb.hex=function(U){let u=(((Math.round(U[0])&255)<<16)+((Math.round(U[1])&255)<<8)+(Math.round(U[2])&255)).toString(16).toUpperCase();return"000000".slice(u.length)+u},_o.hex.rgb=function(U){let O=U.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!O)return[0,0,0];let u=O[0];O[0].length===3&&(u=[...u].map(e=>e+e).join(""));let v=Number.parseInt(u,16),w=v>>16&255,S=v>>8&255,l=v&255;return[w,S,l]},_o.rgb.hcg=function(U){let O=U[0]/255,u=U[1]/255,v=U[2]/255,w=Math.max(Math.max(O,u),v),S=Math.min(Math.min(O,u),v),l=w-S,e,t=l<1?S/(1-l):0;return l<=0?e=0:w===O?e=(u-v)/l%6:w===u?e=2+(v-O)/l:e=4+(O-u)/l,e/=6,e%=1,[e*360,l*100,t*100]},_o.hsl.hcg=function(U){let O=U[1]/100,u=U[2]/100,v=u<.5?2*O*u:2*O*(1-u),w=0;return v<1&&(w=(u-.5*v)/(1-v)),[U[0],v*100,w*100]},_o.hsv.hcg=function(U){let O=U[1]/100,u=U[2]/100,v=O*u,w=0;return v<1&&(w=(u-v)/(1-v)),[U[0],v*100,w*100]},_o.hcg.rgb=function(U){let O=U[0]/360,u=U[1]/100,v=U[2]/100;if(u===0)return[v*255,v*255,v*255];let w=[0,0,0],S=O%1*6,l=S%1,e=1-l,t=0;switch(Math.floor(S)){case 0:{w[0]=1,w[1]=l,w[2]=0;break}case 1:{w[0]=e,w[1]=1,w[2]=0;break}case 2:{w[0]=0,w[1]=1,w[2]=l;break}case 3:{w[0]=0,w[1]=e,w[2]=1;break}case 4:{w[0]=l,w[1]=0,w[2]=1;break}default:w[0]=1,w[1]=0,w[2]=e}return t=(1-u)*v,[(u*w[0]+t)*255,(u*w[1]+t)*255,(u*w[2]+t)*255]},_o.hcg.hsv=function(U){let O=U[1]/100,u=U[2]/100,v=O+u*(1-O),w=0;return v>0&&(w=O/v),[U[0],w*100,v*100]},_o.hcg.hsl=function(U){let O=U[1]/100,v=U[2]/100*(1-O)+.5*O,w=0;return v>0&&v<.5?w=O/(2*v):v>=.5&&v<1&&(w=O/(2*(1-v))),[U[0],w*100,v*100]},_o.hcg.hwb=function(U){let O=U[1]/100,u=U[2]/100,v=O+u*(1-O);return[U[0],(v-O)*100,(1-v)*100]},_o.hwb.hcg=function(U){let O=U[1]/100,v=1-U[2]/100,w=v-O,S=0;return w<1&&(S=(v-w)/(1-w)),[U[0],w*100,S*100]},_o.apple.rgb=function(U){return[U[0]/65535*255,U[1]/65535*255,U[2]/65535*255]},_o.rgb.apple=function(U){return[U[0]/255*65535,U[1]/255*65535,U[2]/255*65535]},_o.gray.rgb=function(U){return[U[0]/100*255,U[0]/100*255,U[0]/100*255]},_o.gray.hsl=function(U){return[0,0,U[0]]},_o.gray.hsv=_o.gray.hsl,_o.gray.hwb=function(U){return[0,100,U[0]]},_o.gray.cmyk=function(U){return[0,0,0,U[0]]},_o.gray.lab=function(U){return[U[0],0,0]},_o.gray.hex=function(U){let O=Math.round(U[0]/100*255)&255,v=((O<<16)+(O<<8)+O).toString(16).toUpperCase();return"000000".slice(v.length)+v},_o.rgb.gray=function(U){return[(U[0]+U[1]+U[2])/3/255*100]}}});function rT(){let U={},O=Object.keys(ud);for(let{length:u}=O,v=0;v0;){let v=u.pop(),w=Object.keys(ud[v]);for(let{length:S}=w,l=0;l1&&(u=v),U(u))};return"conversion"in U&&(O.conversion=U.conversion),O}function uT(U){let O=function(...u){let v=u[0];if(v==null)return v;v.length>1&&(u=v);let w=U(u);if(typeof w=="object")for(let{length:S}=w,l=0;lJy});function Xc(U,O){if(!(this instanceof Xc))return new Xc(U,O);if(O&&O in Nm&&(O=null),O&&!(O in Wf))throw new Error("Unknown model: "+O);let u,v;if(U==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(U instanceof Xc)this.model=U.model,this.color=[...U.color],this.valpha=U.valpha;else if(typeof U=="string"){let w=Yi.get(U);if(w===null)throw new Error("Unable to parse color from string: "+U);this.model=w.model,v=Wf[this.model].channels,this.color=w.value.slice(0,v),this.valpha=typeof w.value[v]=="number"?w.value[v]:1}else if(U.length>0){this.model=O||"rgb",v=Wf[this.model].channels;let w=Array.prototype.slice.call(U,0,v);this.color=Bm(w,v),this.valpha=typeof U[v]=="number"?U[v]:1}else if(typeof U=="number")this.model="rgb",this.color=[U>>16&255,U>>8&255,U&255],this.valpha=1;else{this.valpha=1;let w=Object.keys(U);"alpha"in U&&(w.splice(w.indexOf("alpha"),1),this.valpha=typeof U.alpha=="number"?U.alpha:0);let S=w.sort().join("");if(!(S in Qp))throw new Error("Unable to parse color from object: "+JSON.stringify(U));this.model=Qp[S];let{labels:l}=Wf[this.model],e=[];for(u=0;u(U%360+360)%360),saturationl:Yu("hsl",1,Dc(100)),lightness:Yu("hsl",2,Dc(100)),saturationv:Yu("hsv",1,Dc(100)),value:Yu("hsv",2,Dc(100)),chroma:Yu("hcg",1,Dc(100)),gray:Yu("hcg",2,Dc(100)),white:Yu("hwb",1,Dc(100)),wblack:Yu("hwb",2,Dc(100)),cyan:Yu("cmyk",0,Dc(100)),magenta:Yu("cmyk",1,Dc(100)),yellow:Yu("cmyk",2,Dc(100)),black:Yu("cmyk",3,Dc(100)),x:Yu("xyz",0,Dc(95.047)),y:Yu("xyz",1,Dc(100)),z:Yu("xyz",2,Dc(108.833)),l:Yu("lab",0,Dc(100)),a:Yu("lab",1),b:Yu("lab",2),keyword(U){return U!==void 0?new Xc(U):Wf[this.model].keyword(this.color)},hex(U){return U!==void 0?new Xc(U):Yi.to.hex(...this.rgb().round().color)},hexa(U){if(U!==void 0)return new Xc(U);let O=this.rgb().round().color,u=Math.round(this.valpha*255).toString(16).toUpperCase();return u.length===1&&(u="0"+u),Yi.to.hex(...O)+u},rgbNumber(){let U=this.rgb().color;return(U[0]&255)<<16|(U[1]&255)<<8|U[2]&255},luminosity(){let U=this.rgb().color,O=[];for(let[u,v]of U.entries()){let w=v/255;O[u]=w<=.04045?w/12.92:((w+.055)/1.055)**2.4}return .2126*O[0]+.7152*O[1]+.0722*O[2]},contrast(U){let O=this.luminosity(),u=U.luminosity();return O>u?(O+.05)/(u+.05):(u+.05)/(O+.05)},level(U){let O=this.contrast(U);return O>=7?"AAA":O>=4.5?"AA":""},isDark(){let U=this.rgb().color;return(U[0]*2126+U[1]*7152+U[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let U=this.rgb();for(let O=0;O<3;O++)U.color[O]=255-U.color[O];return U},lighten(U){let O=this.hsl();return O.color[2]+=O.color[2]*U,O},darken(U){let O=this.hsl();return O.color[2]-=O.color[2]*U,O},saturate(U){let O=this.hsl();return O.color[1]+=O.color[1]*U,O},desaturate(U){let O=this.hsl();return O.color[1]-=O.color[1]*U,O},whiten(U){let O=this.hwb();return O.color[1]+=O.color[1]*U,O},blacken(U){let O=this.hwb();return O.color[2]+=O.color[2]*U,O},grayscale(){let U=this.rgb().color,O=U[0]*.3+U[1]*.59+U[2]*.11;return Xc.rgb(O,O,O)},fade(U){return this.alpha(this.valpha-this.valpha*U)},opaquer(U){return this.alpha(this.valpha+this.valpha*U)},rotate(U){let O=this.hsl(),u=O.color[0];return u=(u+U)%360,u=u<0?360+u:u,O.color[0]=u,O},mix(U,O){if(!U||!U.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof U);let u=U.rgb(),v=this.rgb(),w=O===void 0?.5:O,S=2*w-1,l=u.alpha()-v.alpha(),e=((S*l===-1?S:(S+l)/(1+S*l))+1)/2,t=1-e;return Xc.rgb(e*u.red()+t*v.red(),e*u.green()+t*v.green(),e*u.blue()+t*v.blue(),u.alpha()*w+v.alpha()*(1-w))}};for(let U of Object.keys(Wf)){if(Nm.includes(U))continue;let{channels:O}=Wf[U];Xc.prototype[U]=function(...u){return this.model===U?new Xc(this):u.length>0?new Xc(u,U):new Xc([...dT(Wf[this.model][U].raw(this.color)),this.valpha],U)},Xc[U]=function(...u){let v=u[0];return typeof v=="number"&&(v=Bm(u,O)),new Xc(v,U)}}Jy=Xc}}),fv=xe({"src/plot_api/plot_config.js"(U,O){"use strict";var u={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},v={};function w(S,l){for(var e in S){var t=S[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),w(t,l[e]))}}w(u,v),O.exports={configAttributes:u,dfltConfig:v}}}),Qy=xe({"src/lib/notifier.js"(U,O){"use strict";var u=Na(),v=yn(),w=[];O.exports=function(S,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||w.indexOf(S)!==-1)return;w.push(S);var a=1e3;v(l)?a=l:l==="long"&&(a=3e3);var r=u.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var n=r.selectAll(".notifier-note").data(w);function i(s){s.duration(700).style("opacity",0).each("end",function(c){var p=w.indexOf(c);p!==-1&&w.splice(p,1),u.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=u.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(i)});for(var p=c.append("p"),f=s.split(//g),d=0;d1){var l=["LOG:"];for(S=0;S1){var e=[];for(S=0;S"),"long")}},w.warn=function(){var S;if(u.logging>0){var l=["WARN:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}},w.error=function(){var S;if(u.logging>0){var l=["ERROR:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}}}}),sc=xe({"src/components/color/attributes.js"(U){"use strict";U.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],U.defaultLine="#444",U.lightLine="#eee",U.background="#fff",U.borderLine="#BEC8D9",U.lightFraction=100*10/11}}),wi=xe({"src/components/color/index.js"(U,O){"use strict";var u=(vT(),Ta(Ky)).default,{warn:v}=cd(),{background:w,defaultLine:S,defaults:l,lightLine:e}=sc(),t=E=>{typeof E=="string"&&(E=E.trim());try{return u(E)}catch{return v(`Invalid color specifier: "${E}". Defaulting to "#000"`),u("#000")}},a=E=>{let{r:g,g:T,b:m}=t(E).rgb().object();return`rgb(${Math.round(g)}, ${Math.round(T)}, ${Math.round(m)})`},r=E=>E?t(E).alpha():0,n=(E,g)=>{let T=t(E).rgb().object();return`rgba(${Math.round(T.r)}, ${Math.round(T.g)}, ${Math.round(T.b)}, ${g})`},i=(E,g)=>{var T,m;g||(g=w);let h=t(E).rgb().object();if((T=h.alpha)!=null||(h.alpha=1),h.alpha===1)return t(E).rgb().string();let x=t(g).rgb().object();(m=x.alpha)!=null||(x.alpha=1);let _=x.alpha===1?x:{r:255*(1-x.alpha)+x.r*x.alpha,g:255*(1-x.alpha)+x.g*x.alpha,b:255*(1-x.alpha)+x.b*x.alpha},D={r:_.r*(1-h.alpha)+h.r*h.alpha,g:_.g*(1-h.alpha)+h.g*h.alpha,b:_.b*(1-h.alpha)+h.b*h.alpha};return t(D).rgb().string()},s=(E,g,T)=>{let m=t(E).rgb().object(),h=t(g).rgb().object(),x={r:T*m.r+(1-T)*h.r,g:T*m.g+(1-T)*h.g,b:T*m.b+(1-T)*h.b};return t(x).rgb().string()},c=(E,g)=>{let T=t(E);return T.lightness(T.lightness()+g)},p=(E,g,T)=>{let m=t(E);return m.alpha()!==1&&(m=t(i(E,w))),(m.isDark()?g?c(m,g):t(w):T?c(m,-T):t(S)).rgb().string()},f=(E,g)=>{let T=t(g);E.style({stroke:a(g),"stroke-opacity":T.alpha()})},d=(E,g)=>{let T=t(g);E.style({fill:a(g),"fill-opacity":T.alpha()})},y=(E,g)=>!!(E&&g&&t(E).rgb().string()===t(g).rgb().string()),o=E=>{if(typeof E!="string")return!1;try{return!!u(E.trim())}catch{return!1}},b=(E,g)=>{var T;g=g===0?0:g||10;let m=t(E).rgb().object(),h=Math.round(255*(g/100));return t({r:Math.max(0,Math.min(255,m.r+h)),g:Math.max(0,Math.min(255,m.g+h)),b:Math.max(0,Math.min(255,m.b+h))}).alpha((T=m.alpha)!=null?T:1).rgb().string()},M=(E,g,T)=>t(E).mix(t(g),T/100).rgb().string(),A=(E,g=["#000","#fff"])=>{let T,m=-1/0;for(let h of g){let x=t(E).contrast(t(h));x>m&&(m=x,T=t(h).rgb().string())}return T};O.exports={addOpacity:n,adjustLightness:c,background:w,brighten:b,color:t,combine:i,contrast:p,defaultLine:S,defaults:l,equals:y,fill:d,interpolate:s,isValid:o,lightLine:e,mix:M,mostReadable:A,opacity:r,rgb:a,stroke:f}}}),hv=xe({"src/components/colorscale/scales.js"(U,O){"use strict";var u=wi(),v={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},w=v.RdBu;function S(t,a){if(a||(a=w),!t)return a;function r(){try{t=v[t]||JSON.parse(t)}catch{t=a}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:a}function l(t){var a=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rpT});function pT(U,O="",u,v){let w=O+(u?"":"$"),S=v===!1?"":"^";return U==="xy"?new RegExp(S+"x"+e0+"y"+e0+w):new RegExp(S+U+e0+w)}var e0,ap=Pr({"src/lib/regex.ts"(){"use strict";e0="([2-9]|[1-9][0-9]+)?"}}),mT=xe({"src/lib/coerce.js"(U){"use strict";var O=yn(),u=oo().extendFlat,v=Rs(),w=hv(),S=wi(),l=fd().DESELECTDIM,e=Gs(),t=(ap(),Ta(dv)).counter,a=(Cd(),Ta(cu)).modHalf,r=rs().isArrayOrTypedArray,n=rs().isTypedArraySpec,i=rs().decodeTypedArraySpec;U.valObjectMeta={data_array:{coerceFunction:function(c,p,f){p.set(r(c)?c:n(c)?i(c):f)}},enumerated:{coerceFunction:function(c,p,f,d){d.coerceNumber&&(c=+c),d.values.indexOf(c)===-1?p.set(f):p.set(c)},validateFunction:function(c,p){p.coerceNumber&&(c=+c);for(var f=p.values,d=0;do===!0||o===!1;y(c)||d.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(y)?p.set(c):p.set(f)}},number:{coerceFunction:function(c,p,f,d){n(c)&&(c=i(c)),!O(c)||d.min!==void 0&&cd.max?p.set(f):p.set(+c)}},integer:{coerceFunction:function(c,p,f,d){if((d.extras||[]).indexOf(c)!==-1){p.set(c);return}n(c)&&(c=i(c)),c%1||!O(c)||d.min!==void 0&&cd.max?p.set(f):p.set(+c)}},string:{coerceFunction:function(c,p,f,d){if(typeof c!="string"){var y=typeof c=="number";d.strict===!0||!y?p.set(f):p.set(String(c))}else d.noBlank&&!c?p.set(f):p.set(c)}},color:{coerceFunction:function(c,p,f){n(c)&&(c=i(c)),S.isValid(c)?p.set(c):p.set(f)}},colorlist:{coerceFunction:function(c,p,f){!Array.isArray(c)||!c.length?p.set(f):c.every(d=>S.isValid(d))?p.set(c):p.set(f)}},colorscale:{coerceFunction:function(c,p,f){p.set(w.get(c,f))}},angle:{coerceFunction:function(c,p,f){n(c)&&(c=i(c)),c==="auto"?p.set("auto"):O(c)?p.set(a(+c,360)):p.set(f)}},subplotid:{coerceFunction:function(c,p,f,d){var y=d.regex||t(f);let o=b=>typeof b=="string"&&y.test(b);o(c)||d.arrayOk&&r(c)&&c.length>0&&c.every(o)?p.set(c):p.set(f)},validateFunction:function(c,p){var f=p.dflt;return c===f?!0:typeof c!="string"?!1:!!t(f).test(c)}},flaglist:{coerceFunction:function(c,p,f,d){if((d.extras||[]).indexOf(c)!==-1){p.set(c);return}if(typeof c!="string"){p.set(f);return}for(var y=c.split("+"),o=0;oHr({valType:"string",dflt:"",editType:S},l!==!1?{arrayOk:!0}:{}),U.texttemplateAttrs=({editType:S="calc",arrayOk:l}={},e={})=>Hr({valType:"string",dflt:"",editType:S},l!==!1?{arrayOk:!0}:{}),U.shapeTexttemplateAttrs=({editType:S="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:S}),U.templatefallbackAttrs=({editType:S="none"}={})=>({valType:"any",dflt:"-",editType:S})}}),jm=xe({"src/components/shapes/label_texttemplate.js"(U,O){"use strict";function u(A,E){return E?E.d2l(A):A}function v(A,E){return E?E.l2d(A):A}function w(A){return A.x0}function S(A){return A.x1}function l(A){return A.y0}function e(A){return A.y1}function t(A){return A.x0shift||0}function a(A){return A.x1shift||0}function r(A){return A.y0shift||0}function n(A){return A.y1shift||0}function i(A,E){return u(A.x1,E)+a(A)-u(A.x0,E)-t(A)}function s(A,E,g){return u(A.y1,g)+n(A)-u(A.y0,g)-r(A)}function c(A,E){return Math.abs(i(A,E))}function p(A,E,g){return Math.abs(s(A,E,g))}function f(A,E,g){return A.type!=="line"?void 0:Math.sqrt(Math.pow(i(A,E),2)+Math.pow(s(A,E,g),2))}function d(A,E){return v((u(A.x1,E)+a(A)+u(A.x0,E)+t(A))/2,E)}function y(A,E,g){return v((u(A.y1,g)+n(A)+u(A.y0,g)+r(A))/2,g)}function o(A,E,g){return A.type!=="line"?void 0:s(A,E,g)/i(A,E)}var b=["x0","x1","y0","y1","dy","height","ycenter"],M=["x0","x1","y0","y1","dx","width","xcenter"];O.exports={x0:w,x1:S,y0:l,y1:e,slope:o,dx:i,dy:s,width:c,height:p,length:f,xcenter:d,ycenter:y,simpleXVariables:b,simpleYVariables:M}}}),GT=xe({"src/components/shapes/draw_newshape/attributes.js"(U,O){"use strict";var u=Hl().overrideAll,v=Rs(),w=vl(),S=Rc().dash,l=oo().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=js(),a=jm();O.exports=u({newshape:{visible:l({},v.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},v.legend,{}),legendgroup:l({},v.legendgroup,{}),legendgrouptitle:{text:l({},v.legendgrouptitle.text,{}),font:w({})},legendrank:l({},v.legendrank,{}),legendwidth:l({},v.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},S,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:l({},v.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(a)}),texttemplatefallback:t({editType:"arraydraw"}),font:w({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),WT=xe({"src/components/selections/draw_newselection/attributes.js"(U,O){"use strict";var u=Rc().dash,v=oo().extendFlat;O.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:v({},u,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),qm=xe({"src/plots/pad_attributes.js"(U,O){"use strict";O.exports=function(u){var v=u.editType;return{t:{valType:"number",dflt:0,editType:v},r:{valType:"number",dflt:0,editType:v},b:{valType:"number",dflt:0,editType:v},l:{valType:"number",dflt:0,editType:v},editType:v}}}}),np=xe({"src/plots/layout_attributes.js"(U,O){"use strict";var u=vl(),v=r0(),w=sc(),S=GT(),l=WT(),e=qm(),t=oo().extendFlat,a=u({editType:"calc"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=w.defaultLine,O.exports={font:a,title:{text:{valType:"string",editType:"layoutstyle"},font:u({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:u({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:t(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:w.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:w.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:w.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:S.newshape,activeshape:S.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},v.transition,{editType:"none"})}}}),YT=xe({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var U=document.createElement("style");U.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",U.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(U)}})()}}),Ci=xe({"src/registry.js"(U){"use strict";var O=cd(),u=Om(),v=e_(),w=t0().addStyleRule,S=oo(),l=Rs(),e=np(),t=S.extendFlat,a=S.extendDeepAll;U.modules={},U.allCategories={},U.allTypes=[],U.subplotsRegistry={},U.componentsRegistry={},U.layoutArrayContainers=[],U.layoutArrayRegexes=[],U.traceLayoutAttributes={},U.localeRegistry={},U.apiMethodRegistry={},U.collectableSubplotTypes=null,U.register=function(o){if(U.collectableSubplotTypes=null,o)o&&!Array.isArray(o)&&(o=[o]);else throw new Error("No argument passed to Plotly.register.");for(var b=0;b=o&&I<=b?I:l}if(typeof I!="string"&&typeof I!="number")return l;I=String(I);var N=d(z),q=I.charAt(0);N&&(q==="G"||q==="g")&&(I=I.slice(1),z="");var Y=N&&z.slice(0,7)==="chinese",ee=I.match(Y?p:c);if(!ee)return l;var te=ee[1],ae=ee[3]||"1",j=Number(ee[5]||1),G=Number(ee[7]||0),K=Number(ee[9]||0),H=Number(ee[11]||0);if(N){if(te.length===2)return l;te=Number(te);var Z;try{var X=i.getComponentMethod("calendars","getCal")(z);if(Y){var $=ae.charAt(ae.length-1)==="i";ae=parseInt(ae,10),Z=X.newDate(te,X.toMonthIndex(te,ae,$),j)}else Z=X.newDate(te,Number(ae),j)}catch{return l}return Z?(Z.toJD()-n)*e+G*t+K*a+H*r:l}te.length===2?te=(Number(te)+2e3-f)%100+f:te=Number(te),ae-=1;var Q=new Date(Date.UTC(2e3,ae,j,G,K));return Q.setUTCFullYear(te),Q.getUTCMonth()!==ae||Q.getUTCDate()!==j?l:Q.getTime()+H*r},o=U.MIN_MS=U.dateTime2ms("-9999"),b=U.MAX_MS=U.dateTime2ms("9999-12-31 23:59:59.9999"),U.isDateTime=function(I,z){return U.dateTime2ms(I,z)!==l};function M(I,z){return String(I+Math.pow(10,z)).slice(1)}var A=90*e,E=3*t,g=5*a;U.ms2DateTime=function(I,z,R){if(typeof I!="number"||!(I>=o&&I<=b))return l;z||(z=0);var k=Math.floor(w(I+.05,1)*10),B=Math.round(I-k/10),N,q,Y,ee,te,ae;if(d(R)){var j=Math.floor(B/e)+n,G=Math.floor(w(I,e));try{N=i.getComponentMethod("calendars","getCal")(R).fromJD(j).formatDate("yyyy-mm-dd")}catch{N=s("G%Y-%m-%d")(new Date(B))}if(N.charAt(0)==="-")for(;N.length<11;)N="-0"+N.slice(1);else for(;N.length<10;)N="0"+N;q=z=o+e&&I<=b-e))return l;var z=Math.floor(w(I+.05,1)*10),R=new Date(Math.round(I-z/10)),k=O("%Y-%m-%d")(R),B=R.getHours(),N=R.getMinutes(),q=R.getSeconds(),Y=R.getUTCMilliseconds()*10+z;return T(k,B,N,q,Y)};function T(I,z,R,k,B){if((z||R||k||B)&&(I+=" "+M(z,2)+":"+M(R,2),(k||B)&&(I+=":"+M(k,2),B))){for(var N=4;B%10===0;)N-=1,B/=10;I+="."+M(B,N)}return I}U.cleanDate=function(I,z,R){if(I===l)return z;if(U.isJSDate(I)||typeof I=="number"&&isFinite(I)){if(d(R))return v.error("JS Dates and milliseconds are incompatible with world calendars",I),z;if(I=U.ms2DateTimeLocal(+I),!I&&z!==void 0)return z}else if(!U.isDateTime(I,R))return v.error("unrecognized date",I),z;return I};var m=/%\d?f/g,h=/%h/g,x={1:"1",2:"1",3:"2",4:"2"};function _(I,z,R,k){I=I.replace(m,function(N){var q=Math.min(+N.charAt(1)||6,6),Y=(z/1e3%1+2).toFixed(q).slice(2).replace(/0+$/,"")||"0";return Y});var B=new Date(Math.floor(z+.05));if(I=I.replace(h,function(){return x[R("%q")(B)]}),d(k))try{I=i.getComponentMethod("calendars","worldCalFmt")(I,z,k)}catch{return"Invalid"}return R(I)(B)}var D=[59,59.9,59.99,59.999,59.9999];function C(I,z){var R=w(I+.05,e),k=M(Math.floor(R/t),2)+":"+M(w(Math.floor(R/a),60),2);if(z!=="M"){u(z)||(z=0);var B=Math.min(w(I/r,60),D[z]),N=(100+B).toFixed(z).slice(1);z>0&&(N=N.replace(/0+$/,"").replace(/[\.]$/,"")),k+=":"+N}return k}U.formatDate=function(I,z,R,k,B,N){if(B=d(B)&&B,!z)if(R==="y")z=N.year;else if(R==="m")z=N.month;else if(R==="d")z=N.dayMonth+` -`+N.year;else return C(I,R)+` -`+_(N.dayMonthYear,I,k,B);return _(z,I,k,B)};var F=3*e;U.incrementMonth=function(I,z,R){R=d(R)&&R;var k=w(I,e);if(I=Math.round(I-k),R)try{var B=Math.round(I/e)+n,N=i.getComponentMethod("calendars","getCal")(R),q=N.fromJD(B);return z%12?N.add(q,z,"m"):N.add(q,z/12,"y"),(q.toJD()-n)*e+k}catch{v.error("invalid ms "+I+" in calendar "+R)}var Y=new Date(I+F);return Y.setUTCMonth(Y.getUTCMonth()+z)+k-F},U.findExactDates=function(I,z){for(var R=0,k=0,B=0,N=0,q,Y,ee=d(z)&&i.getComponentMethod("calendars","getCal")(z),te=0;te1?(n[c-1]-n[0])/(c-1):1,d,y;for(f>=0?y=i?l:e:y=i?a:t,r+=f*S*(i?-1:1)*(f>=0?1:-1);s90&&u.log("Long binary search..."),s-1};function l(r,n){return rn}function a(r,n){return r>=n}U.sorterAsc=function(r,n){return r-n},U.sorterDes=function(r,n){return n-r},U.distinctVals=function(r){var n=r.slice();n.sort(U.sorterAsc);var i;for(i=n.length-1;i>-1&&n[i]===w;i--);for(var s=n[i]-n[0]||1,c=s/(i||1)/1e4,p=[],f,d=0;d<=i;d++){var y=n[d],o=y-f;f===void 0?(p.push(y),f=y):o>c&&(s=Math.min(s,o),p.push(y),f=y)}return{vals:p,minDiff:s}},U.roundUp=function(r,n,i){for(var s=0,c=n.length-1,p,f=0,d=i?0:1,y=i?1:0,o=i?Math.ceil:Math.floor;s0&&(s=1),i&&s)return r.sort(n)}return s?r:r.reverse()},U.findIndexOfMin=function(r,n){n=n||v;for(var i=1/0,s,c=0;cn_});function $T(U){return Object.keys(U).sort()}var n_,vv=Pr({"src/lib/sort_object_keys.ts"(){"use strict";n_=$T}}),ZT=xe({"src/lib/stats.js"(U){"use strict";var O=yn(),u=rs().isArrayOrTypedArray;U.aggNums=function(v,w,S,l){var e,t;if((!l||l>S.length)&&(l=S.length),O(w)||(w=!1),u(S[0])){for(t=new Array(l),e=0;ev.length-1)return v[v.length-1];var S=w%1;return S*v[Math.ceil(w)]+(1-S)*v[Math.floor(w)]}}}),KT=xe({"src/lib/angles.js"(U,O){"use strict";var u=(Cd(),Ta(cu)),v=u.mod,w=u.modHalf,S=Math.PI,l=2*S;function e(y){return y/180*S}function t(y){return y/S*180}function a(y){return Math.abs(y[1]-y[0])>l-1e-14}function r(y,o){return w(o-y,l)}function n(y,o){return Math.abs(r(y,o))}function i(y,o){if(a(o))return!0;var b,M;o[0]M&&(M+=l);var A=v(y,l),E=A+l;return A>=b&&A<=M||E>=b&&E<=M}function s(y,o,b,M){if(!i(o,M))return!1;var A,E;return b[0]=A&&y<=E}function c(y,o,b,M,A,E,g){A=A||0,E=E||0;var T=a([b,M]),m,h,x,_,D;T?(m=0,h=S,x=l):b1/3&&u.x<2/3},U.isRightAnchor=function(u){return u.xanchor==="right"||u.xanchor==="auto"&&u.x>=2/3},U.isTopAnchor=function(u){return u.yanchor==="top"||u.yanchor==="auto"&&u.y>=2/3},U.isMiddleAnchor=function(u){return u.yanchor==="middle"||u.yanchor==="auto"&&u.y>1/3&&u.y<2/3},U.isBottomAnchor=function(u){return u.yanchor==="bottom"||u.yanchor==="auto"&&u.y<=1/3}}}),QT=xe({"src/lib/geometry2d.js"(U){"use strict";var O=(Cd(),Ta(cu)).mod;U.segmentsIntersect=u;function u(e,t,a,r,n,i,s,c){var p=a-e,f=n-e,d=s-n,y=r-t,o=i-t,b=c-i,M=p*b-d*y;if(M===0)return null;var A=(f*b-d*o)/M,E=(f*y-p*o)/M;return E<0||E>1||A<0||A>1?null:{x:e+p*A,y:t+y*A}}U.segmentDistance=function(t,a,r,n,i,s,c,p){if(u(t,a,r,n,i,s,c,p))return 0;var f=r-t,d=n-a,y=c-i,o=p-s,b=f*f+d*d,M=y*y+o*o,A=Math.min(v(f,d,b,i-t,s-a),v(f,d,b,c-t,p-a),v(y,o,M,t-i,a-s),v(y,o,M,r-i,n-s));return Math.sqrt(A)};function v(e,t,a,r,n){var i=r*e+n*t;if(i<0)return r*r+n*n;if(i>a){var s=r-e,c=n-t;return s*s+c*c}else{var p=r*t-n*e;return p*p/a}}var w,S,l;U.getTextLocation=function(t,a,r,n){if((t!==S||n!==l)&&(w={},S=t,l=n),w[r])return w[r];var i=t.getPointAtLength(O(r-n/2,a)),s=t.getPointAtLength(O(r+n/2,a)),c=Math.atan((s.y-i.y)/(s.x-i.x)),p=t.getPointAtLength(O(r,a)),f=(p.x*4+i.x+s.x)/6,d=(p.y*4+i.y+s.y)/6,y={x:f,y:d,theta:c};return w[r]=y,y},U.clearLocationCache=function(){S=null},U.getVisibleSegment=function(t,a,r){var n=a.left,i=a.right,s=a.top,c=a.bottom,p=0,f=t.getTotalLength(),d=f,y,o;function b(A){var E=t.getPointAtLength(A);A===0?y=E:A===f&&(o=E);var g=E.xi?E.x-i:0,T=E.yc?E.y-c:0;return Math.sqrt(g*g+T*T)}for(var M=b(p);M;){if(p+=M+r,p>d)return;M=b(p)}for(M=b(d);M;){if(d-=M+r,p>d)return;M=b(d)}return{min:p,max:d,len:d-p,total:f,isClosed:p===0&&d===f&&Math.abs(y.x-o.x)<.1&&Math.abs(y.y-o.y)<.1}},U.findPointOnPath=function(t,a,r,n){n=n||{};for(var i=n.pathLength||t.getTotalLength(),s=n.tolerance||.001,c=n.iterationLimit||30,p=t.getPointAtLength(0)[r]>t.getPointAtLength(i)[r]?-1:1,f=0,d=0,y=i,o,b,M;f0?y=o:d=o,f++}return b}}}),Hm=xe({"src/lib/throttle.js"(U){"use strict";var O={};U.throttle=function(w,S,l){var e=O[w],t=Date.now();if(!e){for(var a in O)O[a].tse.ts+S){r();return}e.timer=setTimeout(function(){r(),e.timer=null},S)},U.done=function(v){var w=O[v];return!w||!w.timer?Promise.resolve():new Promise(function(S){var l=w.onDone;w.onDone=function(){l&&l(),S(),w.onDone=null}})},U.clear=function(v){if(v)u(O[v]),delete O[v];else for(var w in O)U.clear(w)};function u(v){v&&v.timer!==null&&(clearTimeout(v.timer),v.timer=null)}}}),eA=xe({"src/lib/clear_responsive.js"(U,O){"use strict";O.exports=function(v){v._responsiveChartHandler&&(window.removeEventListener("resize",v._responsiveChartHandler),delete v._responsiveChartHandler)}}}),tA=xe({"node_modules/is-mobile/index.js"(U,O){"use strict";O.exports=S,O.exports.isMobile=S,O.exports.default=S;var u=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,v=/CrOS/,w=/android|ipad|playbook|silk/i;function S(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=u.test(e)&&!v.test(e)||!!l.tablet&&w.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),rA=xe({"src/lib/preserve_drawing_buffer.js"(U,O){"use strict";var u=yn(),v=tA();O.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=w(),typeof e!="string")return!0;var t=v({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var a=e.split(" "),r=1;r-1;i--){var s=a[i];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(u(c)&&(c=+c),c>=13)return!0}}}return t};function w(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}}}),aA=xe({"src/lib/make_trace_groups.js"(U,O){"use strict";var u=Na();O.exports=function(w,S,l){var e=w.selectAll("g."+l.replace(/\s/g,".")).data(S,function(a){return a[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=w.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(a){a[0][t]=u.select(this)}),e}}}),nA=xe({"src/lib/localize.js"(U,O){"use strict";var u=Ci();O.exports=function(w,S){for(var l=w._context.locale,e=0;e<2;e++){for(var t=w._context.locales,a=0;a<2;a++){var r=(t[l]||{}).dictionary;if(r){var n=r[S];if(n)return n}t=u.localeRegistry}var i=l.split("-")[0];if(i===l)break;l=i}return S}}}),i_=xe({"src/lib/filter_unique.js"(U,O){"use strict";O.exports=function(v){for(var w={},S=[],l=0,e=0;e1?(S*v+S*w)/S:v+w,e=String(l).length;if(e>16){var t=String(w).length,a=String(v).length;if(e>=a+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),o_={};Xa(o_,{default:()=>c_});function sA(U){return typeof U=="string"&&(U=U.replace(u_,"")),(0,s_.default)(U)?Number(U):l_.BADNUM}var s_,l_,u_,c_,lA=Pr({"src/lib/clean_number.ts"(){"use strict";s_=da(yn()),l_=da(Gn()),u_=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,c_=sA}}),uA=xe({"src/lib/slugify.js"(U,O){"use strict";var u=/<[^>]*>/g,v=/[\p{S}\p{P}]/gu,w=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,S=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),n=60;function i(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}O.exports=function(c,p=n){var f=i(c??"").replace(S,"").replace(u," ").replace(v,d=>d===e?d:"").toLowerCase().trim().replace(l,e).replace(w,"").replace(a,e);return f.length<=p?f:Array.from(f).slice(0,p).join("").replace(r,"")}}}),Sr=xe({"src/lib/index.js"(U,O){"use strict";var u=Na(),v=Ni().utcFormat,w=An().format,S=yn(),l=Gn(),e=l.FP_SAFE,t=-e,a=l.BADNUM,r=O.exports={};r.adjustFormat=function(X){return!X||/^\d[.]\df/.test(X)||/[.]\d%/.test(X)?X:X==="0.f"?"~f":/^\d%/.test(X)?"~%":/^\ds/.test(X)?"~s":!/^[~,.0$]/.test(X)&&/[&fps]/.test(X)?"~"+X:X};var n={};r.warnBadFormat=function(Z){var X=String(Z);n[X]||(n[X]=1,r.warn('encountered bad format: "'+X+'"'))},r.noFormat=function(Z){return String(Z)},r.numberFormat=function(Z){var X;try{X=w(r.adjustFormat(Z))}catch{return r.warnBadFormat(Z),r.noFormat}return X},r.nestedProperty=Gs(),r.keyedContainer=Pu(),r.relativeAttr=Vl(),r.isPlainObject=Us(),r.toLogRange=Fl(),r.relinkPrivateKeys=uu();var i=rs();r.isArrayBuffer=i.isArrayBuffer,r.isTypedArray=i.isTypedArray,r.isArrayOrTypedArray=i.isArrayOrTypedArray,r.isArray1D=i.isArray1D,r.ensureArray=i.ensureArray,r.concat=i.concat,r.maxRowLength=i.maxRowLength,r.minRowLength=i.minRowLength;var s=(Cd(),Ta(cu));r.mod=s.mod,r.modHalf=s.modHalf;var c=mT();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var p=XT();r.dateTime2ms=p.dateTime2ms,r.isDateTime=p.isDateTime,r.ms2DateTime=p.ms2DateTime,r.ms2DateTimeLocal=p.ms2DateTimeLocal,r.cleanDate=p.cleanDate,r.isJSDate=p.isJSDate,r.formatDate=p.formatDate,r.incrementMonth=p.incrementMonth,r.dateTick0=p.dateTick0,r.dfltRange=p.dfltRange,r.findExactDates=p.findExactDates,r.MIN_MS=p.MIN_MS,r.MAX_MS=p.MAX_MS;var f=Vm();r.findBin=f.findBin,r.sorterAsc=f.sorterAsc,r.sorterDes=f.sorterDes,r.distinctVals=f.distinctVals,r.roundUp=f.roundUp,r.sort=f.sort,r.findIndexOfMin=f.findIndexOfMin,r.sortObjectKeys=(vv(),Ta(Id)).default;var d=ZT();r.aggNums=d.aggNums,r.len=d.len,r.mean=d.mean,r.geometricMean=d.geometricMean,r.median=d.median,r.midRange=d.midRange,r.variance=d.variance,r.stdev=d.stdev,r.interp=d.interp;var y=Um();r.init2dArray=y.init2dArray,r.transposeRagged=y.transposeRagged,r.dot=y.dot,r.translationMatrix=y.translationMatrix,r.rotationMatrix=y.rotationMatrix,r.rotationXYMatrix=y.rotationXYMatrix,r.apply3DTransform=y.apply3DTransform,r.apply2DTransform=y.apply2DTransform,r.apply2DTransform2=y.apply2DTransform2,r.convertCssMatrix=y.convertCssMatrix,r.inverseTransformMatrix=y.inverseTransformMatrix;var o=KT();r.deg2rad=o.deg2rad,r.rad2deg=o.rad2deg,r.angleDelta=o.angleDelta,r.angleDist=o.angleDist,r.isFullCircle=o.isFullCircle,r.isAngleInsideSector=o.isAngleInsideSector,r.isPtInsideSector=o.isPtInsideSector,r.pathArc=o.pathArc,r.pathSector=o.pathSector,r.pathAnnulus=o.pathAnnulus;var b=JT();r.isLeftAnchor=b.isLeftAnchor,r.isCenterAnchor=b.isCenterAnchor,r.isRightAnchor=b.isRightAnchor,r.isTopAnchor=b.isTopAnchor,r.isMiddleAnchor=b.isMiddleAnchor,r.isBottomAnchor=b.isBottomAnchor;var M=QT();r.segmentsIntersect=M.segmentsIntersect,r.segmentDistance=M.segmentDistance,r.getTextLocation=M.getTextLocation,r.clearLocationCache=M.clearLocationCache,r.getVisibleSegment=M.getVisibleSegment,r.findPointOnPath=M.findPointOnPath;var A=oo();r.extendFlat=A.extendFlat,r.extendDeep=A.extendDeep,r.extendDeepAll=A.extendDeepAll,r.extendDeepNoArrays=A.extendDeepNoArrays;var E=cd();r.log=E.log,r.warn=E.warn,r.error=E.error;var g=(ap(),Ta(dv));r.counterRegex=g.counter;var T=Hm();r.throttle=T.throttle,r.throttleDone=T.done,r.clearThrottle=T.clear;var m=t0();r.getGraphDiv=m.getGraphDiv,r.isPlotDiv=m.isPlotDiv,r.removeElement=m.removeElement,r.addStyleRule=m.addStyleRule,r.addRelatedStyleRule=m.addRelatedStyleRule,r.deleteRelatedStyleRule=m.deleteRelatedStyleRule,r.setStyleOnHover=m.setStyleOnHover,r.getFullTransformMatrix=m.getFullTransformMatrix,r.getElementTransformMatrix=m.getElementTransformMatrix,r.getElementAndAncestors=m.getElementAndAncestors,r.equalDomRects=m.equalDomRects,r.clearResponsive=eA(),r.preserveDrawingBuffer=rA(),r.makeTraceGroups=aA(),r._=nA(),r.notifier=Qy(),r.filterUnique=i_(),r.filterVisible=iA(),r.pushUnique=e_(),r.increment=oA(),r.cleanNumber=(lA(),Ta(o_)).default,r.slugify=uA(),r.ensureNumber=function(X){return S(X)?(X=Number(X),X>e||X=X?!1:S(Z)&&Z>=0&&Z%1===0},r.noop=Om(),r.identity=a0(),r.repeat=function(Z,X){for(var $=new Array(X),Q=0;Q$?Math.max($,Math.min(X,Z)):Math.max(X,Math.min($,Z))},r.bBoxIntersect=function(Z,X,$){return $=$||0,Z.left<=X.right+$&&X.left<=Z.right+$&&Z.top<=X.bottom+$&&X.top<=Z.bottom+$},r.simpleMap=function(Z,X,$,Q,re){for(var ue=Z.length,pe=new Array(ue),ge=0;ge=Math.pow(2,$)?re>10?(r.warn("randstr failed uniqueness"),pe):Z(X,$,Q,(re||0)+1):pe},r.OptionControl=function(Z,X){Z||(Z={}),X||(X="opt");var $={};return $.optionList=[],$._newoption=function(Q){Q[X]=Z,$[Q.name]=Q,$.optionList.push(Q)},$["_"+X]=Z,$},r.smooth=function(Z,X){if(X=Math.round(X)||0,X<2)return Z;var $=Z.length,Q=2*$,re=2*X-1,ue=new Array(re),pe=new Array($),ge,Te,Se,Ce;for(ge=0;ge=Q&&(Se-=Q*Math.floor(Se/Q)),Se<0?Se=-1-Se:Se>=$&&(Se=Q-1-Se),Ce+=Z[Se]*ue[Te];pe[ge]=Ce}return pe},r.syncOrAsync=function(Z,X,$){var Q,re;function ue(){return r.syncOrAsync(Z,X,$)}for(;Z.length;)if(re=Z.splice(0,1)[0],Q=re(X),Q&&Q.then)return Q.then(ue);return $&&$(X)},r.stripTrailingSlash=function(Z){return Z.slice(-1)==="/"?Z.slice(0,-1):Z},r.noneOrAll=function(Z,X,$){if(Z){var Q=!1,re=!0,ue,pe;for(ue=0;ue<$.length;ue++)pe=Z[$[ue]],pe!=null?Q=!0:re=!1;if(Q&&!re)for(ue=0;ue<$.length;ue++)Z[$[ue]]=X[$[ue]]}},r.mergeArray=function(Z,X,$,Q){var re=typeof Q=="function";if(r.isArrayOrTypedArray(Z))for(var ue=Math.min(Z.length,X.length),pe=0;pe0?re:0})},r.fillArray=function(Z,X,$,Q){if(Q=Q||r.identity,r.isArrayOrTypedArray(Z))for(var re=0;reD.test(window.navigator.userAgent);var C=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var Z=C.exec(window.navigator.userAgent);if(Z&&Z.length===2){var X=parseInt(Z[1]);if(!isNaN(X))return X}return null},r.isD3Selection=function(Z){return Z instanceof u.selection},r.ensureSingle=function(Z,X,$,Q){var re=Z.select(X+($?"."+$:""));if(re.size())return re;var ue=Z.append(X);return $&&ue.classed($,!0),Q&&ue.call(Q),ue},r.ensureSingleById=function(Z,X,$,Q){var re=Z.select(X+"#"+$);if(re.size())return re;var ue=Z.append(X).attr("id",$);return Q&&ue.call(Q),ue},r.objectFromPath=function(Z,X){for(var $=Z.split("."),Q,re=Q={},ue=0;ue<$.length;ue++){var pe=$[ue],ge=null,Te=$[ue].match(/(.*)\[([0-9]+)\]/);Te?(pe=Te[1],ge=Te[2],Q=Q[pe]=[],ue===$.length-1?Q[ge]=X:Q[ge]={},Q=Q[ge]):(ue===$.length-1?Q[pe]=X:Q[pe]={},Q=Q[pe])}return re};var F=/^([^\[\.]+)\.(.+)?/,I=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function z(Z){return Z.slice(0,2)==="__"}r.expandObjectPaths=function(Z){var X,$,Q,re,ue,pe,ge;if(typeof Z=="object"&&!Array.isArray(Z)){for($ in Z)if(Z.hasOwnProperty($))if(X=$.match(F)){if(re=Z[$],Q=X[1],z(Q))continue;delete Z[$],Z[Q]=r.extendDeepNoArrays(Z[Q]||{},r.objectFromPath($,r.expandObjectPaths(re))[Q])}else if(X=$.match(I)){if(re=Z[$],Q=X[1],z(Q))continue;if(ue=parseInt(X[2]),delete Z[$],Z[Q]=Z[Q]||[],X[3]===".")ge=X[4],pe=Z[Q][ue]=Z[Q][ue]||{},r.extendDeepNoArrays(pe,r.objectFromPath(ge,r.expandObjectPaths(re)));else{if(z(Q))continue;Z[Q][ue]=r.expandObjectPaths(re)}}else{if(z($))continue;Z[$]=r.expandObjectPaths(Z[$])}}return Z},r.numSeparate=function(Z,X,$){if($||($=!1),typeof X!="string"||X.length===0)throw new Error("Separator string required for formatting!");typeof Z=="number"&&(Z=String(Z));var Q=/(\d+)(\d{3})/,re=X.charAt(0),ue=X.charAt(1),pe=Z.split("."),ge=pe[0],Te=pe.length>1?re+pe[1]:"";if(ue&&(pe.length>1||ge.length>4||$))for(;Q.test(ge);)ge=ge.replace(Q,"$1"+ue+"$2");return ge+Te},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var R=/^\w*$/;r.templateString=function(Z,X){var $={};return Z.replace(r.TEMPLATE_STRING_REGEX,function(Q,re){var ue;return R.test(re)?ue=X[re]:($[re]=$[re]||r.nestedProperty(X,re).get,ue=$[re](!0)),ue!==void 0?ue:""})};var k={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=Z=>te(Rr(Hr({},Z),{opts:k}));var B={max:10,count:0,name:"texttemplate"};r.texttemplateString=Z=>te(Rr(Hr({},Z),{opts:B}));var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function q(Z){var X=Z.match(N);return X?{key:X[1],op:X[2],number:Number(X[3])}:{key:Z,op:null,number:null}}var Y={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=Z=>te(Rr(Hr({},Z),{opts:Y}));var ee=/^[:|\|]/;function te({data:Z=[],locale:X,fallback:$,labels:Q={},opts:re,template:ue}){return ue.replace(r.TEMPLATE_STRING_REGEX,(pe,ge,Te)=>{let Se=["xother","yother"].includes(ge),Ce=["_xother","_yother"].includes(ge),Ue=["_xother_","_yother_"].includes(ge),Oe=["xother_","yother_"].includes(ge),_e=Se||Ce||Oe||Ue;(Ce||Ue)&&(ge=ge.substring(1)),(Oe||Ue)&&(ge=ge.substring(0,ge.length-1));let ce=null,ie=null;if(re.parseMultDiv){var se=q(ge);ge=se.key,ce=se.op,ie=se.number}let ne;if(_e){if(Q[ge]===void 0)return"";ne=Q[ge]}else for(let Ne of Z)if(Ne){if(Ne.hasOwnProperty(ge)){ne=Ne[ge];break}if(R.test(ge)||(ne=r.nestedProperty(Ne,ge).get(!0)),ne!==void 0)break}if(ne===void 0){let{count:Ne,max:ut,name:ot}=re,yt=$===!1?pe:$;return Ne=ae&&pe<=j,Se=ge>=ae&&ge<=j;if(Te&&(Q=10*Q+pe-ae),Se&&(re=10*re+ge-ae),!Te||!Se){if(Q!==re)return Q-re;if(pe!==ge)return pe-ge}}return re-Q};var G=2e9;r.seedPseudoRandom=function(){G=2e9},r.pseudoRandom=function(){var Z=G;return G=(69069*G+1)%4294967296,Math.abs(G-Z)<429496729?r.pseudoRandom():G/4294967296},r.fillText=function(Z,X,$){var Q=Array.isArray($)?function(pe){$.push(pe)}:function(pe){$.text=pe},re=r.extractOption(Z,X,"htx","hovertext");if(r.isValidTextValue(re))return Q(re);var ue=r.extractOption(Z,X,"tx","text");if(r.isValidTextValue(ue))return Q(ue)},r.isValidTextValue=function(Z){return Z||Z===0},r.formatPercent=function(Z,X){X=X||0;for(var $=(Math.round(100*Z*Math.pow(10,X))*Math.pow(.1,X)).toFixed(X)+"%",Q=0;Q1&&(Se=1):Se=0,r.strTranslate(re-Se*($+pe),ue-Se*(Q+ge))+r.strScale(Se)+(Te?"rotate("+Te+(X?"":" "+$+" "+Q)+")":"")},r.setTransormAndDisplay=function(Z,X){Z.attr("transform",r.getTextTransform(X)),Z.style("display",X.scale?null:"none")},r.ensureUniformFontSize=function(Z,X){var $=r.extendFlat({},X);return $.size=Math.max(X.size,Z._fullLayout.uniformtext.minsize||0),$},r.join2=function(Z,X,$){var Q=Z.length;return Q>1?Z.slice(0,-1).join(X)+$+Z[Q-1]:Z.join(X)},r.bigFont=function(Z){return Math.round(1.2*Z)};var K=r.getFirefoxVersion(),H=K!==null&&K<86;r.getPositionFromD3Event=function(){return H?[u.event.layerX,u.event.layerY]:[u.event.offsetX,u.event.offsetY]}}}),cA=xe({"build/plotcss.js"(){"use strict";var U=Sr(),O={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.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(v in O)u=v.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),U.addStyleRule(u,O[v]);var u,v}}),f_=xe({"node_modules/is-browser/client.js"(U,O){O.exports=!0}}),h_=xe({"node_modules/has-hover/index.js"(U,O){"use strict";var u=f_(),v;typeof window.matchMedia=="function"?v=!window.matchMedia("(hover: none)").matches:v=u,O.exports=v}}),pv=xe({"node_modules/events/events.js"(U,O){"use strict";var u=typeof Reflect=="object"?Reflect:null,v=u&&typeof u.apply=="function"?u.apply:function(E,g,T){return Function.prototype.apply.call(E,g,T)},w;u&&typeof u.ownKeys=="function"?w=u.ownKeys:Object.getOwnPropertySymbols?w=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:w=function(E){return Object.getOwnPropertyNames(E)};function S(A){console&&console.warn&&console.warn(A)}var l=Number.isNaN||function(E){return E!==E};function e(){e.init.call(this)}O.exports=e,O.exports.once=o,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function a(A){if(typeof A!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof A)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(A){if(typeof A!="number"||A<0||l(A))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+A+".");t=A}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||l(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function r(A){return A._maxListeners===void 0?e.defaultMaxListeners:A._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(E){for(var g=[],T=1;T0&&(x=g[0]),x instanceof Error)throw x;var _=new Error("Unhandled error."+(x?" ("+x.message+")":""));throw _.context=x,_}var D=h[E];if(D===void 0)return!1;if(typeof D=="function")v(D,this,g);else for(var C=D.length,F=f(D,C),T=0;T0&&x.length>m&&!x.warned){x.warned=!0;var _=new Error("Possible EventEmitter memory leak detected. "+x.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");_.name="MaxListenersExceededWarning",_.emitter=A,_.type=E,_.count=x.length,S(_)}return A}e.prototype.addListener=function(E,g){return n(this,E,g,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(E,g){return n(this,E,g,!0)};function i(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(A,E,g){var T={fired:!1,wrapFn:void 0,target:A,type:E,listener:g},m=i.bind(T);return m.listener=g,T.wrapFn=m,m}e.prototype.once=function(E,g){return a(g),this.on(E,s(this,E,g)),this},e.prototype.prependOnceListener=function(E,g){return a(g),this.prependListener(E,s(this,E,g)),this},e.prototype.removeListener=function(E,g){var T,m,h,x,_;if(a(g),m=this._events,m===void 0)return this;if(T=m[E],T===void 0)return this;if(T===g||T.listener===g)--this._eventsCount===0?this._events=Object.create(null):(delete m[E],m.removeListener&&this.emit("removeListener",E,T.listener||g));else if(typeof T!="function"){for(h=-1,x=T.length-1;x>=0;x--)if(T[x]===g||T[x].listener===g){_=T[x].listener,h=x;break}if(h<0)return this;h===0?T.shift():d(T,h),T.length===1&&(m[E]=T[0]),m.removeListener!==void 0&&this.emit("removeListener",E,_||g)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(E){var g,T,m;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[E]),this;if(arguments.length===0){var h=Object.keys(T),x;for(m=0;m=0;m--)this.removeListener(E,g[m]);return this};function c(A,E,g){var T=A._events;if(T===void 0)return[];var m=T[E];return m===void 0?[]:typeof m=="function"?g?[m.listener||m]:[m]:g?y(m):f(m,m.length)}e.prototype.listeners=function(E){return c(this,E,!0)},e.prototype.rawListeners=function(E){return c(this,E,!1)},e.listenerCount=function(A,E){return typeof A.listenerCount=="function"?A.listenerCount(E):p.call(A,E)},e.prototype.listenerCount=p;function p(A){var E=this._events;if(E!==void 0){var g=E[A];if(typeof g=="function")return 1;if(g!==void 0)return g.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?w(this._events):[]};function f(A,E){for(var g=new Array(E),T=0;T{},{passive:!0}),w},triggerHandler:function(w,S,l){var e,t=w._ev;if(!t)return;var a=t._events[S];if(!a)return;function r(i){if(i.listener){if(t.removeListener(S,i.listener),!i.fired)return i.fired=!0,i.listener.apply(t,[l])}else return i.apply(t,[l])}a=Array.isArray(a)?a:[a];var n;for(n=0;nv.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},S.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},S.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},S.undo=function(e){var t,a;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a=k.length)return!1;if(C.dimensions===2){if(I++,F.length===I)return C;var B=F[I];if(!M(B))return!1;C=k[R][B]}else C=k[R]}else C=k}}return C}function M(C){return C===Math.round(C)&&C>=0}function A(C){var F,I;F=O.modules[C]._module,I=F.basePlotModule;var z={};z.type=null;var R=a({},v),k=a({},F.attributes);U.crawl(k,function(q,Y,ee,te,ae){i(R,ae).set(void 0),q===void 0&&i(k,ae).set(void 0)}),a(z,R),O.traceIs(C,"noOpacity")&&delete z.opacity,O.traceIs(C,"showLegend")||(delete z.showlegend,delete z.legendgroup),O.traceIs(C,"noHover")&&(delete z.hoverinfo,delete z.hoverlabel),F.selectPoints||delete z.selectedpoints,a(z,k),I.attributes&&a(z,I.attributes),z.type=C;var B={meta:F.meta||{},categories:F.categories||{},animatable:!!F.animatable,type:C,attributes:T(z)};if(F.layoutAttributes){var N={};a(N,F.layoutAttributes),B.layoutAttributes=T(N)}return F.animatable||U.crawl(B,function(q){U.isValObject(q)&&"anim"in q&&delete q.anim}),B}function E(){var C={},F,I;a(C,w);for(F in O.subplotsRegistry)if(I=O.subplotsRegistry[F],!!I.layoutAttributes)if(Array.isArray(I.attr))for(var z=0;z=r&&(a._input||{})._templateitemname;i&&(n=r);var s=t+"["+n+"]",c;function p(){c={},i&&(c[s]={},c[s][v]=i)}p();function f(b,M){c[b]=M}function d(b,M){i?O.nestedProperty(c[s],b).set(M):c[s+"."+b]=M}function y(){var b=c;return p(),b}function o(b,M){b&&d(b,M);var A=y();for(var E in A)O.nestedProperty(e,E).set(A[E])}return{modifyBase:f,modifyItem:d,getUpdateObj:y,applyUpdate:o}}}}),lc=xe({"src/plots/cartesian/constants.js"(U,O){"use strict";var u=(ap(),Ta(dv)).counter;O.exports={idRegex:{x:u("x","( domain)?"),y:u("y","( domain)?")},attrRegex:u("[xy]axis"),xAxisMatch:u("xaxis"),yAxisMatch:u("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),fu=xe({"src/plots/cartesian/axis_ids.js"(U){"use strict";var O=Ci(),u=lc();U.id2name=function(S){if(!(typeof S!="string"||!S.match(u.AX_ID_PATTERN))){var l=S.split(" ")[0].slice(1);return l==="1"&&(l=""),S.charAt(0)+"axis"+l}},U.name2id=function(S){if(S.match(u.AX_NAME_PATTERN)){var l=S.slice(5);return l==="1"&&(l=""),S.charAt(0)+l}},U.cleanId=function(S,l,e){var t=/( domain)$/.test(S);if(!(typeof S!="string"||!S.match(u.AX_ID_PATTERN))&&!(l&&S.charAt(0)!==l)&&!(t&&!e)){var a=S.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),S.charAt(0)+a+(t&&e?" domain":"")}},U.list=function(w,S,l){var e=w._fullLayout;if(!e)return[];var t=U.listIds(w,S),a=new Array(t.length),r;for(r=0;re?1:-1:+(w.slice(1)||1)-+(S.slice(1)||1)},U.ref2id=function(w){return/^[xyz]/.test(w)?w.split(" ")[0]:!1};function v(w,S){if(S&&S.length){for(var l=0;l0?".":"")+i;u.isPlainObject(s)?e(s,a,c,n+1):a(c,i,s)}})}}}),zl=xe({"src/plots/plots.js"(U,O){"use strict";var u=Na(),v=Ni().timeFormatLocale,w=An().formatLocale,S=yn(),l=ys(),e=Ja().version,t=Ci(),a=op(),r=Cs(),n=Sr(),i=wi(),s=Gn().BADNUM,c=fu(),p=Dd().clearOutline,f=Gm(),d=r0(),y=d_(),o=df().getModuleCalcData,b=n.relinkPrivateKeys,M=n._,A=O.exports={};n.extendFlat(A,t),A.attributes=Rs(),A.attributes.type.values=A.allTypes,A.fontAttrs=vl(),A.layoutAttributes=np();var E=hA();A.executeAPICommand=E.executeAPICommand,A.computeAPICommandBindings=E.computeAPICommandBindings,A.manageCommandObserver=E.manageCommandObserver,A.hasSimpleAPICommandBindings=E.hasSimpleAPICommandBindings,A.redrawText=function(j){return j=n.getGraphDiv(j),new Promise(function(G){setTimeout(function(){j._fullLayout&&(t.getComponentMethod("annotations","draw")(j),t.getComponentMethod("legend","draw")(j),t.getComponentMethod("colorbar","draw")(j),G(A.previousPromises(j)))},300)})},A.resize=function(j){j=n.getGraphDiv(j);var G,K=new Promise(function(H,Z){(!j||n.isHidden(j))&&Z(new Error("Resize must be passed a displayed plot div element.")),j._redrawTimer&&clearTimeout(j._redrawTimer),j._resolveResize&&(G=j._resolveResize),j._resolveResize=H,j._redrawTimer=setTimeout(function(){if(!j.layout||j.layout.width&&j.layout.height||n.isHidden(j)){H(j);return}delete j.layout.width,delete j.layout.height;var X=j.changed;j.autoplay=!0,t.call("relayout",j,{autosize:!0}).then(function(){j.changed=X,j._resolveResize===H&&(delete j._resolveResize,H(j))})},100)});return G&&G(K),K},A.previousPromises=function(j){if((j._promises||[]).length)return Promise.all(j._promises).then(function(){j._promises=[]})},A.sendDataToCloud=function(j,G){j.emit("plotly_beforeexport");let K=new URL(G).origin;var H=A.graphJson(j,!1,"object");H.version=e;var Z=new URL(G);Z.searchParams.set("origin",window.location.origin);var X=window.open(Z.href,"_blank");if(!X){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),j.emit("plotly_exportfail");return}var $=function(Q){Q.origin===K&&Q.data&&Q.data.type==="CHART_AUTH_SUCCESS"&&(X.postMessage({type:"chart",chart:H},K),window.removeEventListener("message",$),j.emit("plotly_afterexport"))};return window.addEventListener("message",$),!1};var g=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];A.supplyDefaults=function(j,G){var K=G&&G.skipUpdateCalc,H=j._fullLayout||{};if(H._skipDefaults){delete H._skipDefaults;return}var Z=j._fullLayout={},X=j.layout||{},$=j._fullData||[],Q=j._fullData=[],re=j.data||[],ue=j.calcdata||[],pe=j._context||{},ge;j._transitionData||A.createTransitionData(j),Z._dfltTitle={plot:M(j,"Click to enter Plot title"),subtitle:M(j,"Click to enter Plot subtitle"),x:M(j,"Click to enter X axis title"),y:M(j,"Click to enter Y axis title"),colorbar:M(j,"Click to enter Colorscale title"),annotation:M(j,"new text")},Z._traceWord=M(j,"trace");var Te=x(j,g);if(H._initialAutoSizeIsDone){var Se=H.width,Ce=H.height;A.supplyLayoutGlobalDefaults(X,Z,Te),X.width||(Z.width=Se),X.height||(Z.height=Ce),A.sanitizeMargins(Z)}else{A.supplyLayoutGlobalDefaults(X,Z,Te);var Ue=!X.width||!X.height,Oe=Z.autosize,_e=pe.autosizable,ce=Ue&&(Oe||_e);ce?A.plotAutoSize(j,X,Z):Ue&&A.sanitizeMargins(Z),!Oe&&Ue&&(X.width=Z.width,X.height=Z.height)}Z._d3locale=_(Te,Z.separators),Z._extraFormat=x(j,T),Z._initialAutoSizeIsDone=!0,Z._dataLength=re.length,Z._modules=[],Z._visibleModules=[],Z._basePlotModules=[];var ie=Z._subplots=h(),se=Z._splomAxes={x:{},y:{}},ne=Z._splomSubplots={};Z._splomGridDflt={},Z._scatterStackOpts={},Z._firstScatter={},Z._alignmentOpts={},Z._colorAxes={},Z._requestRangeslider={},Z._traceUids=m($,re),A.supplyDataDefaults(re,Q,X,Z);var be=Object.keys(se.x),De=Object.keys(se.y);if(be.length>1&&De.length>1){for(t.getComponentMethod("grid","sizeDefaults")(X,Z),ge=0;ge15&&De.length>15&&Z.shapes.length===0&&Z.images.length===0,A.linkSubplots(Q,Z,$,H),A.cleanPlot(Q,Z,$,H);var yt=!!(H._has&&H._has("cartesian")),At=!!(Z._has&&Z._has("cartesian")),It=yt,Zt=At;It&&!Zt?H._bgLayer.remove():Zt&&!It&&(Z._shouldCreateBgLayer=!0),H._zoomlayer&&!j._dragging&&p({_fullLayout:H}),D(Q,Z),b(Z,H),t.getComponentMethod("colorscale","crossTraceDefaults")(Q,Z),Z._preGUI||(Z._preGUI={}),Z._tracePreGUI||(Z._tracePreGUI={});var vr=Z._tracePreGUI,Ut={},Jt;for(Jt in vr)Ut[Jt]="old";for(ge=0;ge0){var pe=1-2*X;$=Math.round(pe*$),Q=Math.round(pe*Q)}}var ge=A.layoutAttributes.width.min,Te=A.layoutAttributes.height.min;$1,Ce=!K.height&&Math.abs(H.height-Q)>1;(Ce||Se)&&(Se&&(H.width=$),Ce&&(H.height=Q)),G._initialAutoSize||(G._initialAutoSize={width:$,height:Q}),A.sanitizeMargins(H)},A.supplyLayoutModuleDefaults=function(j,G,K,H){var Z=t.componentsRegistry,X=G._basePlotModules,$,Q,re,ue=t.subplotsRegistry.cartesian;for($ in Z)re=Z[$],re.includeBasePlot&&re.includeBasePlot(j,G);X.length||X.push(ue),G._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(j,G),ue.finalizeSubplots(j,G));for(var pe in G._subplots)G._subplots[pe].sort(n.subplotSort);for(Q=0;Q1&&(K.l/=Oe,K.r/=Oe)}if(Te){var _e=(K.t+K.b)/Te;_e>1&&(K.t/=_e,K.b/=_e)}var ce=K.xl!==void 0?K.xl:K.x,ie=K.xr!==void 0?K.xr:K.x,se=K.yt!==void 0?K.yt:K.y,ne=K.yb!==void 0?K.yb:K.y;Se[G]={l:{val:ce,size:K.l+Ue},r:{val:ie,size:K.r+Ue},b:{val:ne,size:K.b+Ue},t:{val:se,size:K.t+Ue}},Ce[G]=1}if(!H._replotting)return A.doAutoMargin(j)}};function k(j){if("_redrawFromAutoMarginCount"in j._fullLayout)return!1;var G=c.list(j,"",!0);for(var K in G)if(G[K].autoshift||G[K].shift)return!0;return!1}A.doAutoMargin=function(j){var G=j._fullLayout,K=G.width,H=G.height;G._size||(G._size={}),I(G);var Z=G._size,X=G.margin,$={t:0,b:0,l:0,r:0},Q=n.extendFlat({},Z),re=X.l,ue=X.r,pe=X.t,ge=X.b,Te=G._pushmargin,Se=G._pushmarginIds,Ce=G.minreducedwidth,Ue=G.minreducedheight;if(X.autoexpand!==!1){for(var Oe in Te)Se[Oe]||delete Te[Oe];var _e=j._fullLayout._reservedMargin;for(var ce in _e)for(var ie in _e[ce]){var se=_e[ce][ie];$[ie]=Math.max($[ie],se)}Te.base={l:{val:0,size:re},r:{val:1,size:ue},t:{val:1,size:pe},b:{val:0,size:ge}};for(var ne in $){var be=0;for(var De in Te)De!=="base"&&S(Te[De][ne].size)&&(be=Te[De][ne].size>be?Te[De][ne].size:be);var qe=Math.max(0,X[ne]-be);$[ne]=Math.max(0,$[ne]-qe)}for(var Ne in Te){var ut=Te[Ne].l||{},ot=Te[Ne].b||{},yt=ut.val,At=ut.size,It=ot.val,Zt=ot.size,vr=K-$.r-$.l,Ut=H-$.t-$.b;for(var Jt in Te){if(S(At)&&Te[Jt].r){var at=Te[Jt].r.val,Ee=Te[Jt].r.size;if(at>yt){var Re=(At*at+(Ee-vr)*yt)/(at-yt),he=(Ee*(1-yt)+(At-vr)*(1-at))/(at-yt);Re+he>re+ue&&(re=Re,ue=he)}}if(S(Zt)&&Te[Jt].t){var ye=Te[Jt].t.val,Ie=Te[Jt].t.size;if(ye>It){var Fe=(Zt*ye+(Ie-Ut)*It)/(ye-It),He=(Ie*(1-It)+(Zt-Ut)*(1-ye))/(ye-It);Fe+He>ge+pe&&(ge=Fe,pe=He)}}}}}var We=n.constrain(K-X.l-X.r,z,Ce),pt=n.constrain(H-X.t-X.b,R,Ue),ct=Math.max(0,K-We),ft=Math.max(0,H-pt);if(ct){var mt=(re+ue)/ct;mt>1&&(re/=mt,ue/=mt)}if(ft){var _t=(ge+pe)/ft;_t>1&&(ge/=_t,pe/=_t)}if(Z.l=Math.round(re)+$.l,Z.r=Math.round(ue)+$.r,Z.t=Math.round(pe)+$.t,Z.b=Math.round(ge)+$.b,Z.p=Math.round(X.pad),Z.w=Math.round(K)-Z.l-Z.r,Z.h=Math.round(H)-Z.t-Z.b,!G._replotting&&(A.didMarginChange(Q,Z)||k(j))){"_redrawFromAutoMarginCount"in G?G._redrawFromAutoMarginCount++:G._redrawFromAutoMarginCount=1;var Bt=3*(1+Object.keys(Se).length);if(G._redrawFromAutoMarginCount1)return!0}return!1},A.graphJson=function(j,G=!1,K="json",H=!1,Z=!1){(H&&G&&!j._fullData||H&&!G&&!j._fullLayout)&&A.supplyDefaults(j);var X=H?j._fullData:j.data,$=H?j._fullLayout:j.layout,Q=(j._transitionData||{})._frames;function re(ge,Te){if(typeof ge=="function")return Te?"_function_":null;if(n.isPlainObject(ge)){var Se={};return Object.keys(ge).sort().forEach(function(_e){if(["_","["].indexOf(_e.charAt(0))===-1){if(typeof ge[_e]=="function"){Te&&(Se[_e]="_function");return}Se[_e]=re(ge[_e],Te)}}),Se}var Ce=Array.isArray(ge),Ue=n.isTypedArray(ge);if((Ce||Ue)&&ge.dtype&&ge.shape){var Oe=ge.bdata;return re({dtype:ge.dtype,shape:ge.shape,bdata:n.isArrayBuffer(Oe)?l.encode(Oe):Oe},Te)}return Ce?ge.map(function(_e){return re(_e,Te)}):Ue?n.simpleMap(ge,n.identity):n.isJSDate(ge)?n.ms2DateTimeLocal(+ge):ge}var ue={data:(X||[]).map(function(ge){var Te=re(ge);return G&&delete Te.fit,Te})};if(!G&&(ue.layout=re($),H)){var pe=$._size;ue.layout.computed={margin:{b:pe.b,l:pe.l,r:pe.r,t:pe.t}}}return Q&&(ue.frames=re(Q)),Z&&(ue.config=re(j._context,!0)),K==="object"?ue:JSON.stringify(ue)},A.modifyFrames=function(j,G){var K,H,Z,X=j._transitionData._frames,$=j._transitionData._frameHash;for(K=0;K0&&(j._transitioningWithDuration=!0),j._transitionData._interruptCallbacks.push(function(){H=!0}),K.redraw&&j._transitionData._interruptCallbacks.push(function(){return t.call("redraw",j)}),j._transitionData._interruptCallbacks.push(function(){j.emit("plotly_transitioninterrupted",[])});var Te=0,Se=0;function Ce(){return Te++,function(){Se++,!H&&Se===Te&&Q(ge)}}K.runFn(Ce),setTimeout(Ce())})}function Q(ge){if(j._transitionData)return X(j._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",j)}).then(function(){j._transitioning=!1,j._transitioningWithDuration=!1,j.emit("plotly_transitioned",[])}).then(ge)}function re(){if(j._transitionData)return j._transitioning=!1,Z(j._transitionData._interruptCallbacks)}var ue=[A.previousPromises,re,K.prepareFn,A.rehover,A.reselect,$],pe=n.syncOrAsync(ue,j);return(!pe||!pe.then)&&(pe=Promise.resolve()),pe.then(function(){return j})}A.doCalcdata=function(j,G){var K=c.list(j),H=j._fullData,Z=j._fullLayout,X,$,Q,re=new Array(H.length),ue=(j.calcdata||[]).slice();for(j.calcdata=re,Z._numBoxes=0,Z._numViolins=0,Z._violinScaleGroupStats={},j._hmpixcount=0,j._hmlumcount=0,Z._piecolormap={},Z._sunburstcolormap={},Z._treemapcolormap={},Z._iciclecolormap={},Z._funnelareacolormap={},Q=0;Qk?k.match(l):null;U.matchTex=e,U.convertToTspans=function(k,B,N){var q=k.text(),Y=!k.attr("data-notex")&&B&&B._context.typesetMath&&typeof MathJax<"u"&&e(q),ee=O.select(k.node().parentNode);if(ee.empty())return;var te=k.attr("class")?k.attr("class").split(" ")[0]:"text";te+="-math",ee.selectAll("svg."+te).remove(),ee.selectAll("g."+te+"-group").remove(),k.style("display",null).attr({"data-unformatted":q,"data-math":"N"});function ae(){ee.empty()||(te=k.attr("class")+"-math",ee.select("svg."+te).remove()),k.text("").style("white-space","pre");var j=F(k.node(),q);j&&k.style("pointer-events","all"),U.positionText(k),N&&N.call(k)}return Y?(B&&B._promises||[]).push(new Promise(function(j){k.style("display","none");var G=parseInt(k.node().style.fontSize,10),K={fontSize:G},H=k.attr("text-anchor");i(Y[2],K,function(Z,X,$){ee.selectAll("svg."+te).remove(),ee.selectAll("g."+te+"-group").remove();var Q=Z&&Z.select("svg");if(!Q||!Q.node()){ae(),j();return}k.style("display","none");var re=ee.append("g").classed(te+"-group",!0).attr({"pointer-events":"none","data-unformatted":q,"data-math":"Y"});re.node().appendChild(Q.node()),X&&X.node()&&Q.node().insertBefore(X.node().cloneNode(!0),Q.node().firstChild);var ue=$.width,pe=$.height;Q.attr({class:te,height:pe,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":K.fontSize+"px"});var ge=k.node().style.fill||"black",Te=Q.select("g");Te.attr({fill:ge,stroke:ge});var Se=Te.node().getBoundingClientRect(),Ce=Se.width,Ue=Se.height;(Ce>ue||Ue>pe)&&(Q.style("overflow","hidden"),Se=Q.node().getBoundingClientRect(),Ce=Se.width,Ue=Se.height);var Oe=+k.attr("x"),_e=+k.attr("y"),ce=G||k.node().getBoundingClientRect().height,ie=-ce/4;te[0]==="y"?re.attr({transform:"rotate("+[-90,Oe,_e]+")"+v(-Ce/2,ie-Ue/2)}):te[0]==="l"?_e=ie-Ue/2:te[0]==="a"&&te.indexOf("atitle")!==0?(Oe=0,_e=ie):(Oe=Oe-Ce*(H==="middle"?.5:H==="end"?1:0),_e=_e+ie-Ue/2),Q.attr({x:Oe,y:_e}),N&&N.call(k,re),j(re)})})):ae(),k};var t=/(<|<|<)/g,a=/(>|>|>)/g;function r(k){return k.replace(t,"\\lt ").replace(a,"\\gt ")}var n=null;function i(k,B,N){let q=parseInt((MathJax.version||"").split(".")[0]);if(q!==3&&q!==4){u.warn("Unsupported MathJax version:",MathJax.version);return}var Y;let ee=function(){if(!n){let G=MathJax._.output.svg_ts.SVG,K=u.extendFlat({},MathJax.config.svg,{fontCache:"local"});q===4&&(K.linebreaks=u.extendFlat({},K.linebreaks,{inline:!1})),n=MathJax._.mathjax.mathjax.document(document,u.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new G(K)}))}let ae="math-output-"+u.randstr({},64);Y=O.select("body").append("div").attr({id:ae}).style({visibility:"hidden",position:"absolute","font-size":B.fontSize+"px"});let j=r(k).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return n.convert(j,{display:!1})}).then(function(G){Y.node().appendChild(G)})},te=function(){let ae=Y.select(".MathJax"),j=!ae.empty()&&Y.select("svg").node();if(!j)u.log("There was an error in the tex syntax.",k),N();else{let G=j.getBoundingClientRect(),K=ae.select("defs");N(ae,K,G)}Y.remove()};Promise.resolve().then(ee).then(te).catch(ae=>{u.log("MathJax typesetting failed.",k,ae),Y&&Y.remove(),N()})}var s={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},c={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},f="\u200B",d=["http:","https:","mailto:","",void 0,":"],y=U.NEWLINES=/(\r\n?|\n)/g,o=/(<[^<>]*>)/,b=/<(\/?)([^ >]*)(\s+(.*))?>/i,M=//i;U.BR_TAG_ALL=//gi;var A=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,E=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,g=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,T=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function m(k,B){if(!k)return null;var N=k.match(B),q=N&&(N[3]||N[4]);return q&&D(q)}var h=/(^|;)\s*color:/;U.plainText=function(k,B){B=B||{};for(var N=B.len!==void 0&&B.len!==-1?B.len:1/0,q=B.allowedTags!==void 0?B.allowedTags:["br"],Y="...",ee=Y.length,te=k.split(o),ae=[],j="",G=0,K=0;Kee?ae.push(H.slice(0,Math.max(0,Q-ee))+Y):ae.push(H.slice(0,Q));break}j=""}}return ae.join("")};var x={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},_=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function D(k){return k.replace(_,function(B,N){var q;return N.charAt(0)==="#"?q=C(N.charAt(1)==="x"?parseInt(N.slice(2),16):parseInt(N.slice(1),10)):q=x[N],q||B})}U.convertEntities=D;function C(k){if(!(k>1114111)){var B=String.fromCodePoint;if(B)return B(k);var N=String.fromCharCode;return k<=65535?N(k):N((k>>10)+55232,k%1024+56320)}}function F(k,B){B=B.replace(y," ");var N=!1,q=[],Y,ee=-1;function te(){ee++;var Ce=document.createElementNS(w.svg,"tspan");O.select(Ce).attr({class:"line",dy:ee*S+"em"}),k.appendChild(Ce),Y=Ce;var Ue=q;if(q=[{node:Ce}],Ue.length>1)for(var Oe=1;Oe.",B);return}var Ue=q.pop();Ce!==Ue.type&&u.log("Start tag <"+Ue.type+"> doesnt match end tag <"+Ce+">. Pretending it did match.",B),Y=q[q.length-1].node}var K=M.test(B);K?te():(Y=k,q=[{node:k}]);for(var H=B.split(o),Z=0;Z=0;o--,b++){var M=f[o];y[b]=[1-M[0],M[1]]}return y}function s(f,d){d=d||{};for(var y=f.domain,o=f.range,b=o.length,M=new Array(b),A=0;Ad-p?p=d-(f-d):f-d=0?b=a.colorscale.sequential:b=a.colorscale.sequentialminus,s._sync("colorscale",b)}}}}),Bl=xe({"src/components/colorscale/index.js"(U,O){"use strict";var u=hv(),v=vf();O.exports={moduleType:"component",name:"colorscale",attributes:pl(),layoutAttributes:v_(),supplyLayoutDefaults:dA(),handleDefaults:Fc(),crossTraceDefaults:vA(),calc:xf(),scales:u.scales,defaultScale:u.defaultScale,getScale:u.get,isValidScale:u.isValid,hasColorscale:v.hasColorscale,extractOpts:v.extractOpts,extractScale:v.extractScale,flipScale:v.flipScale,makeColorScaleFunc:v.makeColorScaleFunc,makeColorScaleFuncFromTrace:v.makeColorScaleFuncFromTrace}}}),Cl=xe({"src/traces/scatter/subtypes.js"(U,O){"use strict";var u=Sr(),v=rs().isTypedArraySpec;O.exports={hasLines:function(w){return w.visible&&w.mode&&w.mode.indexOf("lines")!==-1},hasMarkers:function(w){return w.visible&&(w.mode&&w.mode.indexOf("markers")!==-1||w.type==="splom")},hasText:function(w){return w.visible&&w.mode&&w.mode.indexOf("text")!==-1},isBubble:function(w){var S=w.marker;return u.isPlainObject(S)&&(u.isArrayOrTypedArray(S.size)||v(S.size))}}}}),n0=xe({"src/traces/scatter/make_bubble_size_func.js"(U,O){"use strict";var u=yn();O.exports=function(w,S){S||(S=2);var l=w.marker,e=l.sizeref||1,t=l.sizemin||0,a=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var n=a(r/S);return u(n)&&n>0?Math.max(n,t):0}}}}),Kf=xe({"src/components/fx/helpers.js"(U){"use strict";var O=Sr();U.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},U.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var a=e.xaxes||[],r=e.yaxes||[],n=0;n=0&&a.index2&&(t.push([r].concat(n.splice(0,2))),i="l",r=r=="m"?"l":"L");;){if(n.length==u[i])return n.unshift(r),t.push(n);if(n.length0&&(ie=100,ce=ce.replace("-open","")),ce.indexOf("-dot")>0&&(ie+=200,ce=ce.replace("-dot","")),ce=y.symbolNames.indexOf(ce),ce>=0&&(ce+=ie)}return ce%100>=T||ce>=400?0:Math.floor(Math.max(ce,0))};function h(ce,ie,se,ne){var be=ce%100;return y.symbolFuncs[be](ie,se,ne)+(ce>=200?m:"")}var x=w("~f"),_={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};y.gradient=function(ce,ie,se,ne,be,De){var qe=_[ne];return D(ce,ie,se,qe.type,be,De,qe.start,qe.stop,!1,qe.reversed)};function D(ce,ie,se,ne,be,De,qe,Ne,ut,ot){var yt=be.length,At;ne==="linear"?At={node:"linearGradient",attrs:{x1:qe.x,y1:qe.y,x2:Ne.x,y2:Ne.y,gradientUnits:ut?"userSpaceOnUse":"objectBoundingBox"},reversed:ot}:ne==="radial"&&(At={node:"radialGradient",reversed:ot});for(var It=new Array(yt),Zt=0;Zt=0&&ce.i===void 0&&(ce.i=De.i),ie.style("opacity",ne.selectedOpacityFn?ne.selectedOpacityFn(ce):ce.mo===void 0?qe.opacity:ce.mo),ne.ms2mrc){var ut;ce.ms==="various"||qe.size==="various"?ut=3:ut=ne.ms2mrc(ce.ms),ce.mrc=ut,ne.selectedSizeFn&&(ut=ce.mrc=ne.selectedSizeFn(ce));var ot=y.symbolNumber(ce.mx||qe.symbol)||0;ce.om=ot%200>=100;var yt=_e(ce,se),At=$(ce,se);ie.attr("d",h(ot,ut,yt,At))}var It=!1,Zt,vr,Ut;if(ce.so)Ut=Ne.outlierwidth,vr=Ne.outliercolor,Zt=qe.outliercolor;else{var Jt=(Ne||{}).width;Ut=(ce.mlw+1||Jt+1||(ce.trace?(ce.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in ce?vr=ce.mlcc=ne.lineScale(ce.mlc):v.isArrayOrTypedArray(Ne.color)?vr=e.defaultLine:vr=Ne.color,v.isArrayOrTypedArray(qe.color)&&(Zt=e.defaultLine,It=!0),"mc"in ce?Zt=ce.mcc=ne.markerScale(ce.mc):Zt=qe.color||qe.colors||"rgba(0,0,0,0)",ne.selectedColorFn&&(Zt=ne.selectedColorFn(ce))}let at=ce.mld||(Ne||{}).dash;if(at&&y.dashLine(ie,at,Ut),ce.om)ie.call(e.stroke,Zt).style({"stroke-width":(Ut||1)+"px",fill:"none"});else{ie.style("stroke-width",(ce.isBlank?0:Ut)+"px");var Ee=qe.gradient,Re=ce.mgt;Re?It=!0:Re=Ee&&Ee.type,v.isArrayOrTypedArray(Re)&&(Re=Re[0],_[Re]||(Re=0));var he=qe.pattern,ye=y.getPatternAttr,Ie=he&&(ye(he.shape,ce.i,"")||ye(he.path,ce.i,""));if(Re&&Re!=="none"){var Fe=ce.mgc;Fe?It=!0:Fe=Ee.color;var He=se.uid;It&&(He+="-"+ce.i),y.gradient(ie,be,He,Re,[[0,Fe],[1,Zt]],"fill")}else if(Ie){var We=!1,pt=he.fgcolor;!pt&&De&&De.color&&(pt=De.color,We=!0);var ct=ye(pt,ce.i,De&&De.color||null),ft=ye(he.bgcolor,ce.i,null),mt=he.fgopacity,_t=ye(he.size,ce.i,8),Bt=ye(he.solidity,ce.i,.3);We=We||ce.mcc||v.isArrayOrTypedArray(he.shape)||v.isArrayOrTypedArray(he.path)||v.isArrayOrTypedArray(he.bgcolor)||v.isArrayOrTypedArray(he.fgcolor)||v.isArrayOrTypedArray(he.size)||v.isArrayOrTypedArray(he.solidity);var Et=se.uid;We&&(Et+="-"+ce.i),y.pattern(ie,"point",be,Et,Ie,_t,Bt,ce.mcc,he.fillmode,ft,ct,mt)}else v.isArrayOrTypedArray(Zt)?e.fill(ie,Zt[ce.i]):e.fill(ie,Zt);Ut&&e.stroke(ie,vr)}},y.makePointStyleFns=function(ce){var ie={},se=ce.marker;return ie.markerScale=y.tryColorscale(se,""),ie.lineScale=y.tryColorscale(se,"line"),l.traceIs(ce,"symbols")&&(ie.ms2mrc=p.isBubble(ce)?f(ce):function(){return(se.size||6)/2}),ce.selectedpoints&&v.extendFlat(ie,y.makeSelectedPointStyleFns(ce)),ie},y.makeSelectedPointStyleFns=function(ce){var ie={},se=ce.selected||{},ne=ce.unselected||{},be=ce.marker||{},De=se.marker||{},qe=ne.marker||{},Ne=be.opacity,ut=De.opacity,ot=qe.opacity,yt=ut!==void 0,At=ot!==void 0;(v.isArrayOrTypedArray(Ne)||yt||At)&&(ie.selectedOpacityFn=function(he){var ye=he.mo===void 0?be.opacity:he.mo;return he.selected?yt?ut:ye:At?ot:c*ye});var It=be.color,Zt=De.color,vr=qe.color;(Zt||vr)&&(ie.selectedColorFn=function(he){var ye=he.mcc||It;return he.selected?Zt||ye:vr||ye});var Ut=be.size,Jt=De.size,at=qe.size,Ee=Jt!==void 0,Re=at!==void 0;return l.traceIs(ce,"symbols")&&(Ee||Re)&&(ie.selectedSizeFn=function(he){var ye=he.mrc||Ut/2;return he.selected?Ee?Jt/2:ye:Re?at/2:ye}),ie},y.makeSelectedTextStyleFns=function(ce){var ie={},se=ce.selected||{},ne=ce.unselected||{},be=ce.textfont||{},De=se.textfont||{},qe=ne.textfont||{},Ne=be.color,ut=De.color,ot=qe.color;return ie.selectedTextColorFn=function(yt){var At=yt.tc||Ne;return yt.selected?ut||At:ot||(ut?At:e.addOpacity(At,c))},ie},y.selectedPointStyle=function(ce,ie){if(!(!ce.size()||!ie.selectedpoints)){var se=y.makeSelectedPointStyleFns(ie),ne=ie.marker||{},be=[];se.selectedOpacityFn&&be.push(function(De,qe){De.style("opacity",se.selectedOpacityFn(qe))}),se.selectedColorFn&&be.push(function(De,qe){e.fill(De,se.selectedColorFn(qe))}),se.selectedSizeFn&&be.push(function(De,qe){var Ne=qe.mx||ne.symbol||0,ut=se.selectedSizeFn(qe);De.attr("d",h(y.symbolNumber(Ne),ut,_e(qe,ie),$(qe,ie))),qe.mrc2=ut}),be.length&&ce.each(function(De){for(var qe=u.select(this),Ne=0;Ne0?se:0}y.textPointStyle=function(ce,ie,se){if(ce.size()){var ne;if(ie.selectedpoints){var be=y.makeSelectedTextStyleFns(ie);ne=be.selectedTextColorFn}var De=ie.texttemplate,qe=se._fullLayout;ce.each(function(Ne){var ut=u.select(this),ot=De?v.extractOption(Ne,ie,"txt","texttemplate"):v.extractOption(Ne,ie,"tx","text");if(!ot&&ot!==0){ut.remove();return}if(De){var yt=ie._module.formatLabels,At=yt?yt(Ne,ie,qe):{},It={};d(It,ie,Ne.i),ot=v.texttemplateString({data:[It,Ne,ie._meta],fallback:ie.texttemplatefallback,labels:At,locale:qe._d3locale,template:ot})}var Zt=Ne.tp||ie.textposition,vr=I(Ne,ie),Ut=ne?ne(Ne):Ne.tc||ie.textfont.color;ut.call(y.font,{family:Ne.tf||ie.textfont.family,weight:Ne.tw||ie.textfont.weight,style:Ne.ty||ie.textfont.style,variant:Ne.tv||ie.textfont.variant,textcase:Ne.tC||ie.textfont.textcase,lineposition:Ne.tE||ie.textfont.lineposition,shadow:Ne.tS||ie.textfont.shadow,size:vr,color:Ut}).text(ot).call(r.convertToTspans,se).call(F,Zt,vr,Ne.mrc)})}},y.selectedTextStyle=function(ce,ie){if(!(!ce.size()||!ie.selectedpoints)){var se=y.makeSelectedTextStyleFns(ie);ce.each(function(ne){var be=u.select(this),De=se.selectedTextColorFn(ne),qe=ne.tp||ie.textposition,Ne=I(ne,ie);e.fill(be,De);var ut=l.traceIs(ie,"bar-like");F(be,qe,Ne,ne.mrc2||ne.mrc,ut)})}};var z=.5;y.smoothopen=function(ce,ie){if(ce.length<3)return"M"+ce.join("L");var se="M"+ce[0],ne=[],be;for(be=1;be=ut||he>=yt&&he<=ut)&&(ye<=At&&ye>=ot||ye>=At&&ye<=ot)&&(ce=[he,ye])}return ce}y.applyBackoff=ae,y.makeTester=function(){var ce=v.ensureSingleById(u.select("body"),"svg","js-plotly-tester",function(se){se.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ie=v.ensureSingle(ce,"path","js-reference-point",function(se){se.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});y.tester=ce,y.testref=ie},y.savedBBoxes={};var j=0,G=1e4;y.bBox=function(ce,ie,se){se||(se=K(ce));var ne;if(se){if(ne=y.savedBBoxes[se],ne)return v.extendFlat({},ne)}else if(ce.childNodes.length===1){var be=ce.childNodes[0];if(se=K(be),se){var De=+be.getAttribute("x")||0,qe=+be.getAttribute("y")||0,Ne=be.getAttribute("transform");if(!Ne){var ut=y.bBox(be,!1,se);return De&&(ut.left+=De,ut.right+=De),qe&&(ut.top+=qe,ut.bottom+=qe),ut}if(se+="~"+De+"~"+qe+"~"+Ne,ne=y.savedBBoxes[se],ne)return v.extendFlat({},ne)}}var ot,yt;ie?ot=ce:(yt=y.tester.node(),ot=ce.cloneNode(!0),yt.appendChild(ot)),u.select(ot).attr("transform",null).call(r.positionText,0,0);var At=ot.getBoundingClientRect(),It=y.testref.node().getBoundingClientRect();ie||yt.removeChild(ot);var Zt={height:At.height,width:At.width,left:At.left-It.left,top:At.top-It.top,right:At.right-It.left,bottom:At.bottom-It.top};return j>=G&&(y.savedBBoxes={},j=0),se&&(y.savedBBoxes[se]=Zt),j++,v.extendFlat({},Zt)};function K(ce){var ie=ce.getAttribute("data-unformatted");if(ie!==null)return ie+ce.getAttribute("data-math")+ce.getAttribute("text-anchor")+ce.getAttribute("style")}y.setClipUrl=function(ce,ie,se){ce.attr("clip-path",H(ie,se))};function H(ce,ie){if(!ce)return null;var se=ie._context,ne=se._exportedPlot?"":se._baseUrl||"";return ne?"url('"+ne+"#"+ce+"')":"url(#"+ce+")"}y.getTranslate=function(ce){var ie=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,se=ce.attr?"attr":"getAttribute",ne=ce[se]("transform")||"",be=ne.replace(ie,function(De,qe,Ne){return[qe,Ne].join(" ")}).split(" ");return{x:+be[0]||0,y:+be[1]||0}},y.setTranslate=function(ce,ie,se){var ne=/(\btranslate\(.*?\);?)/,be=ce.attr?"attr":"getAttribute",De=ce.attr?"attr":"setAttribute",qe=ce[be]("transform")||"";return ie=ie||0,se=se||0,qe=qe.replace(ne,"").trim(),qe+=a(ie,se),qe=qe.trim(),ce[De]("transform",qe),qe},y.getScale=function(ce){var ie=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,se=ce.attr?"attr":"getAttribute",ne=ce[se]("transform")||"",be=ne.replace(ie,function(De,qe,Ne){return[qe,Ne].join(" ")}).split(" ");return{x:+be[0]||1,y:+be[1]||1}},y.setScale=function(ce,ie,se){var ne=/(\bscale\(.*?\);?)/,be=ce.attr?"attr":"getAttribute",De=ce.attr?"attr":"setAttribute",qe=ce[be]("transform")||"";return ie=ie||1,se=se||1,qe=qe.replace(ne,"").trim(),qe+="scale("+ie+","+se+")",qe=qe.trim(),ce[De]("transform",qe),qe};var Z=/\s*sc.*/;y.setPointGroupScale=function(ce,ie,se){if(ie=ie||1,se=se||1,!!ce){var ne=ie===1&&se===1?"":"scale("+ie+","+se+")";ce.each(function(){var be=(this.getAttribute("transform")||"").replace(Z,"");be+=ne,be=be.trim(),this.setAttribute("transform",be)})}};var X=/translate\([^)]*\)\s*$/;y.setTextPointsScale=function(ce,ie,se){ce&&ce.each(function(){var ne,be=u.select(this),De=be.select("text");if(De.node()){var qe=parseFloat(De.attr("x")||0),Ne=parseFloat(De.attr("y")||0),ut=(be.attr("transform")||"").match(X);ie===1&&se===1?ne=[]:ne=[a(qe,Ne),"scale("+ie+","+se+")",a(-qe,-Ne)],ut&&ne.push(ut),be.attr("transform",ne.join(""))}})};function $(ce,ie){var se;return ce&&(se=ce.mf),se===void 0&&(se=ie.marker&&ie.marker.standoff||0),!ie._geo&&!ie._xA?-se:se}y.getMarkerStandoff=$;var Q=Math.atan2,re=Math.cos,ue=Math.sin;function pe(ce,ie){var se=ie[0],ne=ie[1];return[se*re(ce)-ne*ue(ce),se*ue(ce)+ne*re(ce)]}var ge,Te,Se,Ce,Ue,Oe;function _e(ce,ie){var se=ce.ma;se===void 0&&(se=ie.marker.angle,(!S(se)||v.isArrayOrTypedArray(se))&&(se=0));var ne,be,De=ie.marker.angleref;if(De==="previous"||De==="north"){if(ie._geo){var qe=ie._geo.project(ce.lonlat);ne=qe[0],be=qe[1]}else{var Ne=ie._xA,ut=ie._yA;if(Ne&&ut)ne=Ne.c2p(ce.x),be=ut.c2p(ce.y);else return 90}if(ie._geo){var ot=ce.lonlat[0],yt=ce.lonlat[1],At=ie._geo.project([ot,yt+1e-5]),It=ie._geo.project([ot+1e-5,yt]),Zt=Q(It[1]-be,It[0]-ne),vr=Q(At[1]-be,At[0]-ne),Ut;if(De==="north")Ut=se/180*Math.PI;else if(De==="previous"){var Jt=ot/180*Math.PI,at=yt/180*Math.PI,Ee=ge/180*Math.PI,Re=Te/180*Math.PI,he=Ee-Jt,ye=re(Re)*ue(he),Ie=ue(Re)*re(at)-re(Re)*ue(at)*re(he);Ut=-Q(ye,Ie)-Math.PI,ge=ot,Te=yt}var Fe=pe(Zt,[re(Ut),0]),He=pe(vr,[ue(Ut),0]);se=Q(Fe[1]+He[1],Fe[0]+He[0])/Math.PI*180,De==="previous"&&!(Oe===ie.uid&&ce.i===Ue+1)&&(se=null)}if(De==="previous"&&!ie._geo)if(Oe===ie.uid&&ce.i===Ue+1&&S(ne)&&S(be)){var We=ne-Se,pt=be-Ce,ct=ie.line&&ie.line.shape||"",ft=ct.slice(ct.length-1);ft==="h"&&(pt=0),ft==="v"&&(We=0),se+=Q(pt,We)/Math.PI*180+90}else se=null}return Se=ne,Ce=be,Ue=ce.i,Oe=ie.uid,se}y.getMarkerAngle=_e}}),gv=xe({"src/components/titles/index.js"(U,O){"use strict";var u=Na(),v=yn(),w=zl(),S=Ci(),l=Sr(),e=l.strTranslate,t=go(),a=wi(),r=el(),n=fd(),i=uc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,p=1.6;function f(d,y,o){var b=d._fullLayout,M=o.propContainer,A=o.propName,E=o.placeholder,g=o.traceIndex,T=o.avoid||{},m=o.attributes,h=o.transform,x=o.containerGroup,_=1,D=M.title,C=(D&&D.text?D.text:"").trim(),F=!1,I=D&&D.font?D.font:{},z=I.family,R=I.size,k=I.color,B=I.weight,N=I.style,q=I.variant,Y=I.textcase,ee=I.lineposition,te=I.shadow,ae=o.subtitlePropName,j=!!ae,G=o.subtitlePlaceholder,K=(M.title||{}).subtitle||{text:"",font:{}},H=(K.text||"").trim(),Z=!1,X=1,$=K.font,Q=$.family,re=$.size,ue=$.color,pe=$.weight,ge=$.style,Te=$.variant,Se=$.textcase,Ce=$.lineposition,Ue=$.shadow,Oe;A==="title.text"?Oe="titleText":A.indexOf("axis")!==-1?Oe="axisTitleText":A.indexOf("colorbar")!==-1&&(Oe="colorbarTitleText");var _e=d._context.edits[Oe];function ce(Zt,vr){return Zt===void 0||vr===void 0?!1:Zt.replace(s," % ")===vr.replace(s," % ")}C===""?_=0:ce(C,E)&&(_e||(C=""),_=.2,F=!0),j&&(H===""?X=0:ce(H,G)&&(_e||(H=""),X=.2,Z=!0)),o._meta?C=l.templateString(C,o._meta):b._meta&&(C=l.templateString(C,b._meta));var ie=C||H||_e,se;x||(x=l.ensureSingle(b._infolayer,"g","g-"+y),se=b._hColorbarMoveTitle);var ne=x.selectAll("text."+y).data(ie?[0]:[]);ne.enter().append("text"),ne.text(C).attr("class",y),ne.exit().remove();var be=null,De=y+"-subtitle",qe=H||_e;if(j&&(be=x.selectAll("text."+De).data(qe?[0]:[]),be.enter().append("text"),be.text(H).attr("class",De),be.exit().remove()),!ie)return x;function Ne(Zt,vr){l.syncOrAsync([ut,ot],{title:Zt,subtitle:vr})}function ut(Zt){var vr=Zt.title,Ut=Zt.subtitle,Jt;!h&&se&&(h={}),h?(Jt="",h.rotate&&(Jt+="rotate("+[h.rotate,m.x,m.y]+")"),(h.offset||se)&&(Jt+=e(0,(h.offset||0)-(se||0)))):Jt=null,vr.attr("transform",Jt);function at(Fe){if(Fe){var He=u.select(Fe.node().parentNode).select("."+De);if(!He.empty()){var We=Fe.node().getBBox();if(We.height){var pt=We.y+We.height+c*re;He.attr("y",pt)}}}}if(vr.style("opacity",_*a.opacity(k)).call(t.font,{color:a.rgb(k),size:u.round(R,2),family:z,weight:B,style:N,variant:q,textcase:Y,shadow:te,lineposition:ee}).attr(m).call(r.convertToTspans,d,at),Ut&&!Ut.empty()){var Ee=x.select("."+y+"-math-group"),Re=vr.node().getBBox(),he=Ee.node()?Ee.node().getBBox():void 0,ye=he?he.y+he.height+c*re:Re.y+Re.height+p*re,Ie=l.extendFlat({},m,{y:ye});Ut.attr("transform",Jt),Ut.style("opacity",X*a.opacity(ue)).call(t.font,{color:a.rgb(ue),size:u.round(re,2),family:Q,weight:pe,style:ge,variant:Te,textcase:Se,shadow:Ue,lineposition:Ce}).attr(Ie).call(r.convertToTspans,d)}return w.previousPromises(d)}function ot(Zt){var vr=Zt.title,Ut=u.select(vr.node().parentNode);if(T&&T.selection&&T.side&&C){Ut.attr("transform",null);var Jt=i[T.side],at=T.side==="left"||T.side==="top"?-1:1,Ee=v(T.pad)?T.pad:2,Re=t.bBox(Ut.node()),he={t:0,b:0,l:0,r:0},ye=d._fullLayout._reservedMargin;for(var Ie in ye)for(var Fe in ye[Ie]){var He=ye[Ie][Fe];he[Fe]=Math.max(he[Fe],He)}var We={left:he.l,top:he.t,right:b.width-he.r,bottom:b.height-he.b},pt=T.maxShift||at*(We[T.side]-Re[T.side]),ct=0;if(pt<0)ct=pt;else{var ft=T.offsetLeft||0,mt=T.offsetTop||0;Re.left-=ft,Re.right-=ft,Re.top-=mt,Re.bottom-=mt,T.selection.each(function(){var Bt=t.bBox(this);l.bBoxIntersect(Re,Bt,Ee)&&(ct=Math.max(ct,at*(Bt[T.side]-Re[Jt])+Ee))}),ct=Math.min(pt,ct),M._titleScoot=Math.abs(ct)}if(ct>0||pt<0){var _t={left:[-ct,0],right:[ct,0],top:[0,-ct],bottom:[0,ct]}[T.side];Ut.attr("transform",e(_t[0],_t[1]))}}}ne.call(Ne,be);function yt(Zt,vr){Zt.text(vr).on("mouseover.opacity",function(){u.select(this).transition().duration(n.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){u.select(this).transition().duration(n.HIDE_PLACEHOLDER).style("opacity",0)})}if(_e&&(C?ne.on(".opacity",null):(yt(ne,E),F=!0),ne.call(r.makeEditable,{gd:d}).on("edit",function(Zt){g!==void 0?S.call("_guiRestyle",d,A,Zt,g):S.call("_guiRelayout",d,A,Zt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ne)}).on("input",function(Zt){this.text(Zt||" ").call(r.positionText,m.x,m.y)}),j)){if(j&&!C){var At=ne.node().getBBox(),It=At.y+At.height+p*re;be.attr("y",It)}H?be.on(".opacity",null):(yt(be,G),Z=!0),be.call(r.makeEditable,{gd:d}).on("edit",function(Zt){S.call("_guiRelayout",d,"title.subtitle.text",Zt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ne)}).on("input",function(Zt){this.text(Zt||" ").call(r.positionText,be.attr("x"),be.attr("y"))})}return ne.classed("js-placeholder",F),be&&!be.empty()&&be.classed("js-placeholder",Z),x}O.exports={draw:f,SUBTITLE_PADDING_EM:p,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Oh=xe({"src/plots/cartesian/set_convert.js"(U,O){"use strict";var u=Na(),v=Ni().utcFormat,w=Sr(),S=w.numberFormat,l=yn(),e=w.cleanNumber,t=w.ms2DateTime,a=w.dateTime2ms,r=w.ensureNumber,n=w.isArrayOrTypedArray,i=Gn(),s=i.FP_SAFE,c=i.BADNUM,p=i.LOG_CLIP,f=i.ONEWEEK,d=i.ONEDAY,y=i.ONEHOUR,o=i.ONEMIN,b=i.ONESEC,M=fu(),A=lc(),E=A.HOUR_PATTERN,g=A.WEEKDAY_PATTERN;function T(h){return Math.pow(10,h)}function m(h){return h!=null}O.exports=function(x,_){_=_||{};var D=x._id||"x",C=D.charAt(0);function F(H,Z){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&Z&&x.range&&x.range.length===2){var X=x.range[0],$=x.range[1];return .5*(X+$-2*p*Math.abs(X-$))}else return c}function I(H,Z,X,$){if(($||{}).msUTC&&l(H))return+H;var Q=a(H,X||x.calendar);if(Q===c)if(l(H)){H=+H;var re=Math.floor(w.mod(H+.05,1)*10),ue=Math.round(H-re/10);Q=a(new Date(ue))+re/10}else return c;return Q}function z(H,Z,X){return t(H,Z,X||x.calendar)}function R(H){return x._categories[Math.round(H)]}function k(H){if(m(H)){if(x._categoriesMap===void 0&&(x._categoriesMap={}),x._categoriesMap[H]!==void 0)return x._categoriesMap[H];x._categories.push(typeof H=="number"?String(H):H);var Z=x._categories.length-1;return x._categoriesMap[H]=Z,Z}return c}function B(H,Z){for(var X=new Array(Z),$=0;$x.range[1]&&(X=!X);for(var $=X?-1:1,Q=$*H,re=0,ue=0;uege)re=ue+1;else{re=Q<(pe+ge)/2?ue:ue+1;break}}var Te=x._B[re]||0;return isFinite(Te)?ee(H,x._m2,Te):0},j=function(H){var Z=x._rangebreaks.length;if(!Z)return te(H,x._m,x._b);for(var X=0,$=0;$x._rangebreaks[$].pmax&&(X=$+1);return te(H,x._m2,x._B[X])}}x.c2l=x.type==="log"?F:r,x.l2c=x.type==="log"?T:r,x.l2p=ae,x.p2l=j,x.c2p=x.type==="log"?function(H,Z){return ae(F(H,Z))}:ae,x.p2c=x.type==="log"?function(H){return T(j(H))}:j,["linear","-"].indexOf(x.type)!==-1?(x.d2r=x.r2d=x.d2c=x.r2c=x.d2l=x.r2l=e,x.c2d=x.c2r=x.l2d=x.l2r=r,x.d2p=x.r2p=function(H){return x.l2p(e(H))},x.p2d=x.p2r=j,x.cleanPos=r):x.type==="log"?(x.d2r=x.d2l=function(H,Z){return F(e(H),Z)},x.r2d=x.r2c=function(H){return T(e(H))},x.d2c=x.r2l=e,x.c2d=x.l2r=r,x.c2r=F,x.l2d=T,x.d2p=function(H,Z){return x.l2p(x.d2r(H,Z))},x.p2d=function(H){return T(j(H))},x.r2p=function(H){return x.l2p(e(H))},x.p2r=j,x.cleanPos=r):x.type==="date"?(x.d2r=x.r2d=w.identity,x.d2c=x.r2c=x.d2l=x.r2l=I,x.c2d=x.c2r=x.l2d=x.l2r=z,x.d2p=x.r2p=function(H,Z,X){return x.l2p(I(H,0,X))},x.p2d=x.p2r=function(H,Z,X){return z(j(H),Z,X)},x.cleanPos=function(H){return w.cleanDate(H,c,x.calendar)}):x.type==="category"?(x.d2c=x.d2l=k,x.r2d=x.c2d=x.l2d=R,x.d2r=x.d2l_noadd=q,x.r2c=function(H){var Z=Y(H);return Z!==void 0?Z:x.fraction2r(.5)},x.l2r=x.c2r=r,x.r2l=Y,x.d2p=function(H){return x.l2p(x.r2c(H))},x.p2d=function(H){return R(j(H))},x.r2p=x.d2p,x.p2r=j,x.cleanPos=function(H){return typeof H=="string"&&H!==""?H:r(H)}):x.type==="multicategory"&&(x.r2d=x.c2d=x.l2d=R,x.d2r=x.d2l_noadd=q,x.r2c=function(H){var Z=q(H);return Z!==void 0?Z:x.fraction2r(.5)},x.r2c_just_indices=N,x.l2r=x.c2r=r,x.r2l=q,x.d2p=function(H){return x.l2p(x.r2c(H))},x.p2d=function(H){return R(j(H))},x.r2p=x.d2p,x.p2r=j,x.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:r(H)},x.setupMultiCategory=function(H){var Z=x._traceIndices,X,$,Q=x._matchGroup;if(Q&&x._categories.length===0){for(var re in Q)if(re!==D){var ue=_[M.id2name(re)];Z=Z.concat(ue._traceIndices)}}var pe=[[0,{}],[0,{}]],ge=[];for(X=0;Xue[1]&&($[re?0:1]=X,Q[1]=ue[1]),Q[0]>=Q[1])if(Z!==void 0){var pe=ue[0]+1;X!==void 0&&(pe=Math.min(pe,ue[1])),$[re?0:1]=x.l2r(pe)}else X!==void 0&&($[re?1:0]=x.l2r(ue[1]-1))}},x.cleanRange=function(H,Z){x._cleanRange(H,Z),x.limitRange(H)},x._cleanRange=function(H,Z){Z||(Z={}),H||(H="range");var X=w.nestedProperty(x,H).get(),$,Q;if(x.type==="date"?Q=w.dfltRange(x.calendar):C==="y"?Q=A.DFLTRANGEY:x._name==="realaxis"?Q=[0,1]:Q=Z.dfltRange||A.DFLTRANGEX,Q=Q.slice(),(x.rangemode==="tozero"||x.rangemode==="nonnegative")&&(Q[0]=0),!X||X.length!==2){w.nestedProperty(x,H).set(Q);return}var re=X[0]===null,ue=X[1]===null;for(x.type==="date"&&!x.autorange&&(X[0]=w.cleanDate(X[0],c,x.calendar),X[1]=w.cleanDate(X[1],c,x.calendar)),$=0;$<2;$++)if(x.type==="date"){if(!w.isDateTime(X[$],x.calendar)){x[H]=Q;break}if(x.r2l(X[0])===x.r2l(X[1])){var pe=w.constrain(x.r2l(X[0]),w.MIN_MS+1e3,w.MAX_MS-1e3);X[0]=x.l2r(pe-1e3),X[1]=x.l2r(pe+1e3);break}}else{if(!l(X[$]))if(!(re||ue)&&l(X[1-$]))X[$]=X[1-$]*($?10:.1);else{x[H]=Q;break}if(X[$]<-s?X[$]=-s:X[$]>s&&(X[$]=s),X[0]===X[1]){var ge=Math.max(1,Math.abs(X[0]*1e-6));X[0]-=ge,X[1]+=ge}}},x.setScale=function(H){var Z=_._size;if(x.overlaying){var X=M.getFromId({_fullLayout:_},x.overlaying);x.domain=X.domain}var $=H&&x._r?"_r":"range",Q=x.calendar;x.cleanRange($);var re=x.r2l(x[$][0],Q),ue=x.r2l(x[$][1],Q),pe=C==="y";if(pe?(x._offset=Z.t+(1-x.domain[1])*Z.h,x._length=Z.h*(x.domain[1]-x.domain[0]),x._m=x._length/(re-ue),x._b=-x._m*ue):(x._offset=Z.l+x.domain[0]*Z.w,x._length=Z.w*(x.domain[1]-x.domain[0]),x._m=x._length/(ue-re),x._b=-x._m*re),x._rangebreaks=[],x._lBreaks=0,x._m2=0,x._B=[],x.rangebreaks){var ge,Te;if(x._rangebreaks=x.locateBreaks(Math.min(re,ue),Math.max(re,ue)),x._rangebreaks.length){for(ge=0;geue&&(Se=!Se),Se&&x._rangebreaks.reverse();var Ce=Se?-1:1;for(x._m2=Ce*x._length/(Math.abs(ue-re)-x._lBreaks),x._B.push(-x._m2*(pe?ue:re)),ge=0;geQ&&(Q+=7,re<$&&(re+=7));break;case E:ue=new Date(H);var Se=ue.getUTCHours(),Ce=ue.getUTCMinutes(),Ue=ue.getUTCSeconds(),Oe=ue.getUTCMilliseconds();re=Se+(Ce/60+Ue/3600+Oe/36e5),$>Q&&(Q+=24,re<$&&(re+=24));break;case"":re=H;break}if(re>=$&&re=$&&H=Ne.min&&(neNe.max&&(Ne.max=be),De=!1)}De&&ue.push({min:ne,max:be})}};for(X=0;Xb*2}function i(p){return Math.max(1,(p-1)/1e3)}function s(p,f){for(var d=p.length,y=i(d),o=0,b=0,M={},A=0;Ao*2}function c(p){return S(p[0])&&S(p[1])}}}),Ah=xe({"src/plots/cartesian/autorange.js"(U,O){"use strict";var u=Na(),v=yn(),w=Sr(),S=Gn().FP_SAFE,l=Ci(),e=go(),t=fu(),a=t.getFromId,r=t.isLinked;O.exports={applyAutorangeOptions:x,getAutoRange:n,makePadFn:s,doAutoRange:d,findExtremes:y,concatExtremes:f};function n(_,D){var C,F,I=[],z=_._fullLayout,R=s(z,D,0),k=s(z,D,1),B=f(_,D),N=B.min,q=B.max;if(N.length===0||q.length===0)return w.simpleMap(D.range,D.r2l);var Y=N[0].val,ee=q[0].val;for(C=1;C0&&(ge=Z-R(Q)-k(re),ge>X?Te/ge>$&&(ue=Q,pe=re,$=Te/ge):Te/Z>$&&(ue={val:Q.val,nopad:1},pe={val:re.val,nopad:1},$=Te/Z));function Se(ce,ie){return Math.max(ce,k(ie))}if(Y===ee){var Ce=Y-1,Ue=Y+1;if(K)if(Y===0)I=[0,1];else{var Oe=(Y>0?q:N).reduce(Se,0),_e=Y/(1-Math.min(.5,Oe/Z));I=Y>0?[0,_e]:[_e,0]}else H?I=[Math.max(0,Ce),Math.max(1,Ue)]:I=[Ce,Ue]}else K?(ue.val>=0&&(ue={val:0,nopad:1}),pe.val<=0&&(pe={val:0,nopad:1})):H&&(ue.val-$*R(ue)<0&&(ue={val:0,nopad:1}),pe.val<=0&&(pe={val:1,nopad:1})),$=(pe.val-ue.val-i(D,Q.val,re.val))/(Z-R(ue)-k(pe)),I=[ue.val-$*R(ue),pe.val+$*k(pe)];return I=x(I,D),D.limitRange&&D.limitRange(),ae&&I.reverse(),w.simpleMap(I,D.l2r||Number)}function i(_,D,C){var F=0;if(_.rangebreaks)for(var I=_.locateBreaks(D,C),z=0;z0?C.ppadplus:C.ppadminus)||C.ppad||0),Q=X((_._m>0?C.ppadminus:C.ppadplus)||C.ppad||0),re=X(C.vpadplus||C.vpad),ue=X(C.vpadminus||C.vpad);if(!N){if(H=1/0,Z=-1/0,B)for(Y=0;Y0&&(H=ee),ee>Z&&ee-S&&(H=ee),ee>Z&&ee=Te;Y--)ge(Y);return{min:F,max:I,opts:C}}function o(_,D,C,F){M(_,D,C,F,E)}function b(_,D,C,F){M(_,D,C,F,g)}function M(_,D,C,F,I){for(var z=F.tozero,R=F.extrapad,k=!0,B=0;B<_.length&&k;B++){var N=_[B];if(I(N.val,D)&&N.pad>=C&&(N.extrapad||!R)){k=!1;break}else I(D,N.val)&&N.pad<=C&&(R||!N.extrapad)&&(_.splice(B,1),B--)}if(k){var q=z&&D===0;_.push({val:D,pad:q?0:C,extrapad:q?!1:R})}}function A(_){return v(_)&&Math.abs(_)=D}function T(_,D){var C=D.autorangeoptions;return C&&C.minallowed!==void 0&&h(D,C.minallowed,C.maxallowed)?C.minallowed:C&&C.clipmin!==void 0&&h(D,C.clipmin,C.clipmax)?Math.max(_,D.d2l(C.clipmin)):_}function m(_,D){var C=D.autorangeoptions;return C&&C.maxallowed!==void 0&&h(D,C.minallowed,C.maxallowed)?C.maxallowed:C&&C.clipmax!==void 0&&h(D,C.clipmin,C.clipmax)?Math.min(_,D.d2l(C.clipmax)):_}function h(_,D,C){return D!==void 0&&C!==void 0?(D=_.d2l(D),C=_.d2l(C),D=B&&(z=B,C=B),R<=B&&(R=B,F=B)}}return C=T(C,D),F=m(F,D),[C,F]}}}),uo=xe({"src/plots/cartesian/axes.js"(U,O){"use strict";var u=Na(),v=yn(),w=zl(),S=Ci(),l=Sr(),e=l.strTranslate,t=el(),a=gv(),r=wi(),n=go(),i=$c(),s=m_(),c=lc(),p=Gn(),f=p.ONEMAXYEAR,d=p.ONEAVGYEAR,y=p.ONEMINYEAR,o=p.ONEMAXQUARTER,b=p.ONEAVGQUARTER,M=p.ONEMINQUARTER,A=p.ONEMAXMONTH,E=p.ONEAVGMONTH,g=p.ONEMINMONTH,T=p.ONEWEEK,m=p.ONEDAY,h=m/2,x=p.ONEHOUR,_=p.ONEMIN,D=p.ONESEC,C=p.ONEMILLI,F=p.ONEMICROSEC,I=p.MINUS_SIGN,z=p.BADNUM,R={K:"zeroline"},k={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},q={K:"tick",L:"text"},Y={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},ee=uc(),te=ee.MID_SHIFT,ae=ee.CAP_SHIFT,j=ee.LINE_SPACING,G=ee.OPPOSITE_SIDE,K=3,H=O.exports={};H.setConvert=Oh();var Z=lp(),X=fu(),$=X.idSort,Q=X.isLinked;H.id2name=X.id2name,H.name2id=X.name2id,H.cleanId=X.cleanId,H.list=X.list,H.listIds=X.listIds,H.getFromId=X.getFromId,H.getFromTrace=X.getFromTrace;var re=Ah();H.getAutoRange=re.getAutoRange,H.findExtremes=re.findExtremes;var ue=1e-4;function pe(nt){var Ke=(nt[1]-nt[0])*ue;return[nt[0]-Ke,nt[1]+Ke]}function ge(nt,Ke,Qt){if(![Qt,nt,Ke].every(v)||Qt===0)return nt;let Xt=Math.round((nt-Ke)/Qt),nr=Ke+Xt*Qt;return nt!==nr&&Math.abs(nt-nr)jr+" domain")),xt=xt.concat(cr||[]),er.length>rr?(l.warn("Array attribute "+Vt+" has more entries than expected, truncating to "+rr),er=er.slice(0,rr)):er.length2e-6||((Qt-nt._forceTick0)/nt._minDtick%1+1.000001)%1>2e-6)&&(nt._minDtick=0))},H.saveRangeInitial=function(nt,Ke){for(var Qt=H.list(nt,"",!0),Xt=!1,nr=0;nrTr*.3||Vt(Xt)||Vt(nr))){var jr=Qt.dtick/2;nt+=nt+jrrr){var Ze=Number(Qt.slice(1));cr.exactYears>rr&&Ze%12===0?nt=H.tickIncrement(nt,"M6","reverse")+m*1.5:cr.exactMonths>rr?nt=H.tickIncrement(nt,"M1","reverse")+m*15.5:nt-=h;var xt=H.tickIncrement(nt,Qt);if(xt<=Xt)return xt}return nt}H.prepMinorTicks=function(nt,Ke,Qt){var Xt,nr;if(!((Xt=Ke.minor)!=null&&Xt.dtick)){delete nt.dtick;var cr=Ke.dtick&&v(Ke._tmin),rr;if(cr){var Ze=H.tickIncrement(Ke._tmin,Ke.dtick,!0);rr=[Ke._tmin,Ze*.99+Ke._tmin*.01]}else{var xt=l.simpleMap(Ke.range,Ke.r2l);rr=[xt[0],.8*xt[0]+.2*xt[1]]}if(nt.range=l.simpleMap(rr,Ke.l2r),nt._isMinor=!0,H.prepTicks(nt,Qt),cr){var Vt=v(Ke.dtick),er=v(nt.dtick),Tr=Vt?Ke.dtick:+Ke.dtick.substring(1),jr=er?nt.dtick:+nt.dtick.substring(1);Vt&&er?_e(Tr,jr)?Tr===2*T&&jr===2*m&&(nt.dtick=T):Tr===2*T&&jr===3*m?nt.dtick=T:Tr===T&&!(Ke._input.minor||{}).nticks?nt.dtick=m:ce(Tr/jr,2.5)?nt.dtick=Tr/2:nt.dtick=Tr:String(Ke.dtick).charAt(0)==="M"?er?nt.dtick="M1":_e(Tr,jr)?Tr>=12&&jr===2&&(nt.dtick="M3"):nt.dtick=Ke.dtick:String(nt.dtick).charAt(0)==="L"?String(Ke.dtick).charAt(0)==="L"?_e(Tr,jr)||(nt.dtick=ce(Tr/jr,2.5)?Ke.dtick/2:Ke.dtick):nt.dtick="D1":nt.dtick==="D2"&&+Ke.dtick>1&&(nt.dtick=1)}nt.range=Ke.range}((nr=Ke.minor)==null?void 0:nr._tick0Init)===void 0&&(nt.tick0=Ke.tick0)};function _e(nt,Ke){return Math.abs((nt/Ke+.5)%1-.5)<.001}function ce(nt,Ke){return Math.abs(nt/Ke-1)<.001}H.prepTicks=function(nt,Ke){var Qt=l.simpleMap(nt.range,nt.r2l,void 0,void 0,Ke);if(nt.tickmode==="auto"||!nt.dtick){var Xt=nt.nticks,nr;Xt||(nt.type==="category"||nt.type==="multicategory"?(nr=nt.tickfont?l.bigFont(nt.tickfont.size||12):15,Xt=nt._length/nr):(nr=nt._id.charAt(0)==="y"?40:80,Xt=l.constrain(nt._length/nr,4,9)+1),nt._name==="radialaxis"&&(Xt*=2)),nt.minor&&nt.minor.tickmode!=="array"||nt.tickmode==="array"&&(Xt*=100),nt._roughDTick=Math.abs(Qt[1]-Qt[0])/Xt,H.autoTicks(nt,nt._roughDTick),nt._minDtick>0&&nt.dtick0?(cr=Xt-1,rr=Xt):(cr=Xt,rr=Xt);var Ze=nt[cr].value,xt=nt[rr].value,Vt=Math.abs(xt-Ze),er=Qt||Vt,Tr=0;er>=y?Vt>=y&&Vt<=f?Tr=Vt:Tr=d:Qt===b&&er>=M?Vt>=M&&Vt<=o?Tr=Vt:Tr=b:er>=g?Vt>=g&&Vt<=A?Tr=Vt:Tr=E:Qt===T&&er>=T?Tr=T:er>=m?Tr=m:Qt===h&&er>=h?Tr=h:Qt===x&&er>=x&&(Tr=x);var jr;Tr>=Vt&&(Tr=Vt,jr=!0);var Fr=nr+Tr;if(Ke.rangebreaks&&Tr>0){for(var kr=84,ra=0,ja=0;jaT&&(Tr=Vt)}(Tr>0||Xt===0)&&(nt[Xt].periodX=nr+Tr/2)}}H.calcTicks=function(Ke,Qt){for(var Xt=Ke.type,nr=Ke.calendar,cr=Ke.ticklabelstep,rr=Ke.ticklabelmode==="period",Ze=Ke.range[0]>Ke.range[1],xt=!Ke.ticklabelindex||l.isArrayOrTypedArray(Ke.ticklabelindex)?Ke.ticklabelindex:[Ke.ticklabelindex],Vt=l.simpleMap(Ke.range,Ke.r2l,void 0,void 0,Qt),er=Vt[1]=(_i?0:1);ti--){var Si=!ti;ti?(Ke._dtickInit=Ke.dtick,Ke._tick0Init=Ke.tick0):_i&&(Ke.minor._dtickInit=Ke.minor.dtick,Ke.minor._tick0Init=Ke.minor.tick0);var ai=ti?Ke:l.extendFlat({},Ke,_i?Ke.minor:{minor:{}});if(Si?H.prepMinorTicks(ai,Ke,Qt):H.prepTicks(ai,Qt),ai.tickmode==="array"){ti?(ja=[],kr=qe(Ke,!Si)):(La=[],ra=qe(Ke,!Si));continue}if(ai.tickmode==="sync"){ja=[],kr=De(Ke);continue}var Ao=pe(Vt),yo=Ao[0],Vn=Ao[1],Bo=v(ai.dtick),Mo=Xt==="log"&&!(Bo||ai.dtick.charAt(0)==="L"),co=H.tickFirst(ai,Qt);if(ti){if(Ke._tmin=co,co=Vn:ao<=Vn;ao=H.tickIncrement(ao,Po,er,nr)){if(ti&&Co++,ai.rangebreaks&&!er){if(ao=jr)break}if(ja.length>Fr||ao===Ro)break;Ro=ao;var zi={value:ge(ao,vi,Po)};ti?(ao===co&&(zi.first=!0),Mo&&ao!==(ao|0)&&(zi.simpleLabel=!0),cr>1&&Co%cr&&(zi.skipLabel=!0),ja.push(zi)):(zi.minor=!0,La.push(zi))}}if(!La||La.length<3)xt=!1;else{var ho=(La[2].value-La[1].value)*(Ze?-1:1);rn(ho,Ke.tickformat)||(xt=!1,La=La.slice(1))}if(!xt)Dn=ja;else{var ro=ja.concat(La);rr&&ja.length&&(ro=ro.slice(1)),ro=ro.sort(function(ls,No){return ls.value-No.value}).filter(function(ls,No,Do){return No===0||ls.value!==Do[No-1].value});var es=ro.map(function(ls,No){return ls.minor===void 0&&!ls.skipLabel?No:null}).filter(function(ls){return ls!==null});es.forEach(function(ls){xt.map(function(No){var Do=ls+No;Do>=0&&Do-1;Io--){if(ja[Io].drop){ja.splice(Io,1);continue}ja[Io].value=_n(ja[Io].value,Ke);var Xs=Ke.c2p(ja[Io].value);(tl?qs>Xs-ts:qsjr||hsjr&&(Do.periodX=jr),hsnr&&krnr&&jad)Ke/=d,Xt=nr(10),nt.dtick="M"+12*vr(Ke,Xt,Ne);else if(cr>E)Ke/=E,nt.dtick="M"+vr(Ke,1,ut);else if(cr>m){if(nt.dtick=vr(Ke,m,nt._hasDayOfWeekBreaks?[1,2,7,14]:yt),!Qt){var rr=H.getTickFormat(nt),Ze=nt.ticklabelmode==="period";Ze&&(nt._rawTick0=nt.tick0),/%[uVW]/.test(rr)?nt.tick0=l.dateTick0(nt.calendar,2):nt.tick0=l.dateTick0(nt.calendar,1),Ze&&(nt._dowTick0=nt.tick0)}}else cr>x?nt.dtick=vr(Ke,x,ut):cr>_?nt.dtick=vr(Ke,_,ot):cr>D?nt.dtick=vr(Ke,D,ot):(Xt=nr(10),nt.dtick=vr(Ke,Xt,Ne))}else if(nt.type==="log"){nt.tick0=0;var xt=l.simpleMap(nt.range,nt.r2l);if(nt._isMinor&&(Ke*=1.5),Ke>.7)nt.dtick=Math.ceil(Ke);else if(Math.abs(xt[1]-xt[0])<1){var Vt=1.5*Math.abs((xt[1]-xt[0])/Ke);Ke=Math.abs(Math.pow(10,xt[1])-Math.pow(10,xt[0]))/Vt,Xt=nr(10),nt.dtick="L"+vr(Ke,Xt,Ne)}else nt.dtick=Ke>.3?"D2":"D1"}else nt.type==="category"||nt.type==="multicategory"?(nt.tick0=0,nt.dtick=Math.ceil(Math.max(Ke,1))):Ti(nt)?(nt.tick0=0,Xt=1,nt.dtick=vr(Ke,Xt,Zt)):(nt.tick0=0,Xt=nr(10),nt.dtick=vr(Ke,Xt,Ne));if(nt.dtick===0&&(nt.dtick=1),!v(nt.dtick)&&typeof nt.dtick!="string"){var er=nt.dtick;throw nt.dtick=1,"ax.dtick error: "+String(er)}};function Ut(nt){var Ke=nt.dtick;if(nt._tickexponent=0,!v(Ke)&&typeof Ke!="string"&&(Ke=1),(nt.type==="category"||nt.type==="multicategory")&&(nt._tickround=null),nt.type==="date"){var Qt=nt.r2l(nt.tick0),Xt=nt.l2r(Qt).replace(/(^-|i)/g,""),nr=Xt.length;if(String(Ke).charAt(0)==="M")nr>10||Xt.slice(5)!=="01-01"?nt._tickround="d":nt._tickround=+Ke.slice(1)%12===0?"y":"m";else if(Ke>=m&&nr<=10||Ke>=m*15)nt._tickround="d";else if(Ke>=_&&nr<=16||Ke>=x)nt._tickround="M";else if(Ke>=D&&nr<=19||Ke>=_)nt._tickround="S";else{var cr=nt.l2r(Qt+Ke).replace(/^-/,"").length;nt._tickround=Math.max(nr,cr)-20,nt._tickround<0&&(nt._tickround=4)}}else if(v(Ke)||Ke.charAt(0)==="L"){var rr=nt.range.map(nt.r2d||Number);v(Ke)||(Ke=Number(Ke.slice(1))),nt._tickround=2-Math.floor(Math.log(Ke)/Math.LN10+.01);var Ze=Math.max(Math.abs(rr[0]),Math.abs(rr[1])),xt=Math.floor(Math.log(Ze)/Math.LN10+.01),Vt=nt.minexponent===void 0?3:nt.minexponent;Math.abs(xt)>Vt&&(pt(nt.exponentformat)&&nt.exponentformat!=="SI extended"&&!ct(xt)||pt(nt.exponentformat)&&nt.exponentformat==="SI extended"&&!ft(xt)?nt._tickexponent=3*Math.round((xt-1)/3):nt._tickexponent=xt)}else nt._tickround=null}H.tickIncrement=function(nt,Ke,Qt,Xt){var nr=Qt?-1:1;if(v(Ke))return l.increment(nt,nr*Ke);var cr=Ke.charAt(0),rr=nr*Number(Ke.slice(1));if(cr==="M")return l.incrementMonth(nt,rr,Xt);if(cr==="L")return Math.log(Math.pow(10,nt)+rr)/Math.LN10;if(cr==="D"){var Ze=Ke==="D2"?It:At,xt=nt+nr*.01,Vt=l.roundUp(l.mod(xt,1),Ze,Qt);return Math.floor(xt)+Math.log(u.round(Math.pow(10,Vt),1))/Math.LN10}throw"unrecognized dtick "+String(Ke)},H.tickFirst=function(nt,Ke){var Qt=nt.r2l||Number,Xt=l.simpleMap(nt.range,Qt,void 0,void 0,Ke),nr=Xt[1]=0&&_i<=nt._length?Mn:null};if(xt&&l.isArrayOrTypedArray(nt.ticktext)){var kr=l.simpleMap(nt.range,nt.r2l),ra=(Math.abs(kr[1]-kr[0])-(nt._lBreaks||0))/1e4;for(jr=0;jr"+Ze;else{var Vt=Ln(nt),er=nt._trueSide||nt.side;(!Vt&&er==="top"||Vt&&er==="bottom")&&(rr+="
")}Ke.text=rr}function Ee(nt,Ke,Qt,Xt,nr){var cr=nt.dtick,rr=Ke.x,Ze=nt.tickformat,xt=typeof cr=="string"&&cr.charAt(0);if(nr==="never"&&(nr=""),Xt&&xt!=="L"&&(cr="L3",xt="L"),Ze||xt==="L")Ke.text=_t(Math.pow(10,rr),nt,nr,Xt);else if(v(cr)||xt==="D"&&(nt.minorloglabels==="complete"||l.mod(rr+.01,1)<.1)){var Vt;nt.minorloglabels==="complete"&&!(l.mod(rr+.01,1)<.1)&&(Vt=!0,Ke.fontSize*=.75);var er=Math.pow(10,rr).toExponential(0),Tr=er.split("e"),jr=+Tr[1],Fr=Math.abs(jr),kr=nt.exponentformat;kr==="power"||pt(kr)&&kr!=="SI extended"&&ct(jr)||pt(kr)&&kr==="SI extended"&&ft(jr)?(Ke.text=Tr[0],Fr>0&&(Ke.text+="x10"),Ke.text==="1x10"&&(Ke.text="10"),jr!==0&&jr!==1&&(Ke.text+=""+(jr>0?"":I)+Fr+""),Ke.fontSize*=1.25):(kr==="e"||kr==="E")&&Fr>2?Ke.text=Tr[0]+kr+(jr>0?"+":I)+Fr:(Ke.text=_t(Math.pow(10,rr),nt,"","fakehover"),cr==="D1"&&nt._id.charAt(0)==="y"&&(Ke.dy-=Ke.fontSize/6))}else if(xt==="D")Ke.text=nt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(rr,1)))),Ke.fontSize*=.75;else throw"unrecognized dtick "+String(cr);if(nt.dtick==="D1"){var ra=String(Ke.text).charAt(0);(ra==="0"||ra==="1")&&(nt._id.charAt(0)==="y"?Ke.dx-=Ke.fontSize/4:(Ke.dy+=Ke.fontSize/2,Ke.dx+=(nt.range[1]>nt.range[0]?1:-1)*Ke.fontSize*(rr<0?.5:.25)))}}function Re(nt,Ke){var Qt=nt._categories[Math.round(Ke.x)];Qt===void 0&&(Qt=""),Ke.text=String(Qt)}function he(nt,Ke,Qt){var Xt=Math.round(Ke.x),nr=nt._categories[Xt]||[],cr=nr[1]===void 0?"":String(nr[1]),rr=nr[0]===void 0?"":String(nr[0]);Qt?Ke.text=rr+" - "+cr:(Ke.text=cr,Ke.text2=rr)}function ye(nt,Ke,Qt,Xt,nr){nr==="never"?nr="":nt.showexponent==="all"&&Math.abs(Ke.x/nt.dtick)<1e-6&&(nr="hide"),Ke.text=_t(Ke.x,nt,nr,Xt)}function Ie(nt,Ke,Qt,Xt,nr){if(nt.thetaunit==="radians"&&!Qt){var cr=Ke.x/180;if(cr===0)Ke.text="0";else{var rr=Fe(cr);if(rr[1]>=100)Ke.text=_t(l.deg2rad(Ke.x),nt,nr,Xt);else{var Ze=Ke.x<0;rr[1]===1?rr[0]===1?Ke.text="\u03C0":Ke.text=rr[0]+"\u03C0":Ke.text=["",rr[0],"","\u2044","",rr[1],"","\u03C0"].join(""),Ze&&(Ke.text=I+Ke.text)}}}else Ke.text=_t(Ke.x,nt,nr,Xt)}function Fe(nt){function Ke(Ze,xt){return Math.abs(Ze-xt)<=1e-6}function Qt(Ze,xt){return Ke(xt,0)?Ze:Qt(xt,Ze%xt)}function Xt(Ze){for(var xt=1;!Ke(Math.round(Ze*xt)/xt,Ze);)xt*=10;return xt}var nr=Xt(nt),cr=nt*nr,rr=Math.abs(Qt(cr,nr));return[Math.round(cr/rr),Math.round(nr/rr)]}var He=["f","p","n","\u03BC","m","","k","M","G","T"],We=["q","r","y","z","a",...He,"P","E","Z","Y","R","Q"],pt=nt=>["SI","SI extended","B"].includes(nt);function ct(nt){return nt>14||nt<-15}function ft(nt){return nt>32||nt<-30}function mt(nt,Ke){return pt(Ke)?!!(Ke==="SI extended"&&ft(nt)||Ke!=="SI extended"&&ct(nt)):!1}function _t(nt,Ke,Qt,Xt){var nr=nt<0,cr=Ke._tickround,rr=Qt||Ke.exponentformat||"B",Ze=Ke._tickexponent,xt=H.getTickFormat(Ke),Vt=Ke.separatethousands;if(Xt){var er={exponentformat:rr,minexponent:Ke.minexponent,dtick:Ke.showexponent==="none"?Ke.dtick:v(nt)&&Math.abs(nt)||1,range:Ke.showexponent==="none"?Ke.range.map(Ke.r2d):[0,nt||1]};Ut(er),cr=(Number(er._tickround)||0)+4,Ze=er._tickexponent,Ke.hoverformat&&(xt=Ke.hoverformat)}if(xt)return Ke._numFormat(xt)(nt).replace(/-/g,I);rr==="none"&&(Ze=0),nt=Math.abs(nt);let Tr=Math.pow(10,-cr)/2;if(nt"+jr+"":rr==="B"&&Ze===9?nt+="B":pt(rr)&&(nt+=rr==="SI extended"?We[Ze/3+10]:He[Ze/3+5])}return nr?I+nt:nt}H.getTickFormat=function(nt){var Ke;function Qt(xt){return typeof xt!="string"?xt:Number(xt.replace("M",""))*E}function Xt(xt,Vt){var er=["L","D"];if(typeof xt==typeof Vt){if(typeof xt=="number")return xt-Vt;var Tr=er.indexOf(xt.charAt(0)),jr=er.indexOf(Vt.charAt(0));return Tr===jr?Number(xt.replace(/(L|D)/g,""))-Number(Vt.replace(/(L|D)/g,"")):Tr-jr}else return typeof xt=="number"?1:-1}function nr(xt,Vt,er){var Tr=er||function(kr){return kr},jr=Vt[0],Fr=Vt[1];return(!jr&&typeof jr!="number"||Tr(jr)<=Tr(xt))&&(!Fr&&typeof Fr!="number"||Tr(Fr)>=Tr(xt))}function cr(xt,Vt){var er=Vt[0]===null,Tr=Vt[1]===null,jr=Xt(xt,Vt[0])>=0,Fr=Xt(xt,Vt[1])<=0;return(er||jr)&&(Tr||Fr)}var rr,Ze;if(nt.tickformatstops&&nt.tickformatstops.length>0)switch(nt.type){case"date":case"linear":{for(Ke=0;Ke=0&&nr.unshift(nr.splice(er,1).shift())}});var Ze={false:{left:0,right:0}};return l.syncOrAsync(nr.map(function(xt){return function(){if(xt){var Vt=H.getFromId(nt,xt);Qt||(Qt={}),Qt.axShifts=Ze,Qt.overlayingShiftedAx=rr;var er=H.drawOne(nt,Vt,Qt);return Vt._shiftPusher&&Zi(Vt,Vt._fullDepth||0,Ze,!0),Vt._r=Vt.range.slice(),Vt._rl=l.simpleMap(Vt._r,Vt.r2l),er}}}))},H.drawOne=function(nt,Ke,Qt){Qt=Qt||{};var Xt=Qt.axShifts||{},nr=Qt.overlayingShiftedAx||[],cr,rr,Ze;Ke.setScale();var xt=nt._fullLayout,Vt=Ke._id,er=Vt.charAt(0),Tr=H.counterLetter(Vt),jr=xt._plots[Ke._mainSubplot],Fr=Ke.zerolinelayer==="above traces";if(!jr)return;if(Ke._shiftPusher=Ke.autoshift||nr.indexOf(Ke._id)!==-1||nr.indexOf(Ke.overlaying)!==-1,Ke._shiftPusher&Ke.anchor==="free"){var kr=Ke.linewidth/2||0;Ke.ticks==="inside"&&(kr+=Ke.ticklen),Zi(Ke,kr,Xt,!0),Zi(Ke,Ke.shift||0,Xt,!1)}(Qt.skipTitle!==!0||Ke._shift===void 0)&&(Ke._shift=un(Ke,Xt));var ra=jr[er+"axislayer"],ja=Ke._mainLinePosition,La=ja+=Ke._shift,Dn=Ke._mainMirrorPosition,Mn=Ke._vals=H.calcTicks(Ke),_i=[Ke.mirror,La,Dn].join("_");for(cr=0;cr0?No.bottom-Ss:0,ls))));var du=0,Ql=0;if(Ke._shiftPusher&&(du=Math.max(ls,No.height>0?fs==="l"?Ss-No.left:No.right-Ss:0),Ke.title.text!==xt._dfltTitle[er]&&(Ql=(Ke._titleStandoff||0)+(Ke._titleScoot||0),fs==="l"&&(Ql+=za(Ke))),Ke._fullDepth=Math.max(du,Ql)),Ke.automargin){Do={x:0,y:0,r:0,l:0,t:0,b:0};var Ou=[0,1],Uu=typeof Ke._shift=="number"?Ke._shift:0;if(er==="x"){if(fs==="b"?Do[fs]=Ke._depth:(Do[fs]=Ke._depth=Math.max(No.width>0?Ss-No.top:0,ls),Ou.reverse()),No.width>0){var Xu=No.right-(Ke._offset+Ke._length);Xu>0&&(Do.xr=1,Do.r=Xu);var $u=Ke._offset-No.left;$u>0&&(Do.xl=0,Do.l=$u)}}else if(fs==="l"?(Ke._depth=Math.max(No.height>0?Ss-No.left:0,ls),Do[fs]=Ke._depth-Uu):(Ke._depth=Math.max(No.height>0?No.right-Ss:0,ls),Do[fs]=Ke._depth+Uu,Ou.reverse()),No.height>0){var fc=No.bottom-(Ke._offset+Ke._length);fc>0&&(Do.yb=0,Do.b=fc);var _c=Ke._offset-No.top;_c>0&&(Do.yt=1,Do.t=_c)}Do[Tr]=Ke.anchor==="free"?Ke.position:Ke._anchorAxis.domain[Ou[0]],Ke.title.text!==xt._dfltTitle[er]&&(Do[fs]+=za(Ke)+(Ke.title.standoff||0)),Ke.mirror&&Ke.anchor!=="free"&&(hs={x:0,y:0,r:0,l:0,t:0,b:0},hs[Wl]=Ke.linewidth,Ke.mirror&&Ke.mirror!==!0&&(hs[Wl]+=ls),Ke.mirror===!0||Ke.mirror==="ticks"?hs[Tr]=Ke._anchorAxis.domain[Ou[1]]:(Ke.mirror==="all"||Ke.mirror==="allticks")&&(hs[Tr]=[Ke._counterDomainMin,Ke._counterDomainMax][Ou[1]]))}xl&&(Jl=S.getComponentMethod("rangeslider","autoMarginOpts")(nt,Ke)),typeof Ke.automargin=="string"&&(Bt(Do,Ke.automargin),Bt(hs,Ke.automargin)),w.autoMargin(nt,oi(Ke),Do),w.autoMargin(nt,$n(Ke),hs),w.autoMargin(nt,bn(Ke),Jl)}),l.syncOrAsync(ps)}};function Bt(nt,Ke){if(nt){var Qt=Object.keys(Y).reduce(function(Xt,nr){return Ke.indexOf(nr)!==-1&&Y[nr].forEach(function(cr){Xt[cr]=1}),Xt},{});Object.keys(nt).forEach(function(Xt){Qt[Xt]||(Xt.length===1?nt[Xt]=0:delete nt[Xt])})}}function Et(nt,Ke){var Qt=[],Xt,nr=function(cr,rr){var Ze=cr.xbnd[rr];Ze!==null&&Qt.push(l.extendFlat({},cr,{x:Ze}))};if(Ke.length){for(Xt=0;Xtnt.range[1],Ze=nt.ticklabelposition&&nt.ticklabelposition.indexOf("inside")!==-1,xt=!Ze;if(Qt){var Vt=rr?-1:1;Qt=Qt*Vt}if(Xt){var er=nt.side,Tr=Ze&&(er==="top"||er==="left")||xt&&(er==="bottom"||er==="right")?1:-1;Xt=Xt*Tr}return nt._id.charAt(0)==="x"?function(jr){return e(nr+nt._offset+nt.l2p(na(jr))+Qt,cr+Xt)}:function(jr){return e(cr+Xt,nr+nt._offset+nt.l2p(na(jr))+Qt)}};function na(nt){return nt.periodX!==void 0?nt.periodX:nt.x}function wa(nt){var Ke=nt.ticklabelposition||"",Qt=nt.tickson||"",Xt=function(kr){return Ke.indexOf(kr)!==-1},nr=Xt("top"),cr=Xt("left"),rr=Xt("right"),Ze=Xt("bottom"),xt=Xt("inside"),Vt=Qt!=="boundaries"&&(Ze||cr||nr||rr);if(!Vt&&!xt)return[0,0];var er=nt.side,Tr=Vt?(nt.tickwidth||0)/2:0,jr=K,Fr=nt.tickfont?nt.tickfont.size:12;return(Ze||nr)&&(Tr+=Fr*ae,jr+=(nt.linewidth||0)/2),(cr||rr)&&(Tr+=(nt.linewidth||0)/2,jr+=K),xt&&er==="top"&&(jr-=Fr*(1-ae)),(cr||nr)&&(Tr=-Tr),(er==="bottom"||er==="right")&&(jr=-jr),[Vt?Tr:0,xt?jr:0]}H.makeTickPath=function(nt,Ke,Qt,Xt){Xt||(Xt={});var nr=Xt.minor;if(nr&&!nt.minor)return"";var cr=Xt.len!==void 0?Xt.len:nr?nt.minor.ticklen:nt.ticklen,rr=nt._id.charAt(0),Ze=(nt.linewidth||1)/2;return rr==="x"?"M0,"+(Ke+Ze*Qt)+"v"+cr*Qt:"M"+(Ke+Ze*Qt)+",0h"+cr*Qt},H.makeLabelFns=function(nt,Ke,Qt){var Xt=nt.ticklabelposition||"",nr=nt.tickson||"",cr=function(co){return Xt.indexOf(co)!==-1},rr=cr("top"),Ze=cr("left"),xt=cr("right"),Vt=cr("bottom"),er=nr!=="boundaries"&&(Vt||Ze||rr||xt),Tr=cr("inside"),jr=Xt==="inside"&&nt.ticks==="inside"||!Tr&&nt.ticks==="outside"&&nr!=="boundaries",Fr=0,kr=0,ra=jr?nt.ticklen:0;if(Tr?ra*=-1:er&&(ra=0),jr&&(Fr+=ra,Qt)){var ja=l.deg2rad(Qt);Fr=ra*Math.cos(ja)+1,kr=ra*Math.sin(ja)}nt.showticklabels&&(jr||nt.showline)&&(Fr+=.2*nt.tickfont.size),Fr+=(nt.linewidth||1)/2*(Tr?-1:1);var La={labelStandoff:Fr,labelShift:kr},Dn,Mn,_i,ti,Si=0,ai=nt.side,Ao=nt._id.charAt(0),yo=nt.tickangle,Vn;if(Ao==="x")Vn=!Tr&&ai==="bottom"||Tr&&ai==="top",ti=Vn?1:-1,Tr&&(ti*=-1),Dn=kr*ti,Mn=Ke+Fr*ti,_i=Vn?1:-.2,Math.abs(yo)===90&&(Tr?_i+=te:yo===-90&&ai==="bottom"?_i=ae:yo===90&&ai==="top"?_i=te:_i=.5,Si=te/2*(yo/90)),La.xFn=function(co){return co.dx+Dn+Si*co.fontSize},La.yFn=function(co){return co.dy+Mn+co.fontSize*_i},La.anchorFn=function(co,Ro){if(er){if(Ze)return"end";if(xt)return"start"}return!v(Ro)||Ro===0||Ro===180?"middle":Ro*ti<0!==Tr?"end":"start"},La.heightFn=function(co,Ro,ao){return Ro<-60||Ro>60?-.5*ao:nt.side==="top"!==Tr?-ao:0};else if(Ao==="y"){if(Vn=!Tr&&ai==="left"||Tr&&ai==="right",ti=Vn?1:-1,Tr&&(ti*=-1),Dn=Fr,Mn=kr*ti,_i=0,!Tr&&Math.abs(yo)===90&&(yo===-90&&ai==="left"||yo===90&&ai==="right"?_i=ae:_i=.5),Tr){var Bo=v(yo)?+yo:0;if(Bo!==0){var Mo=l.deg2rad(Bo);Si=Math.abs(Math.sin(Mo))*ae*ti,_i=0}}La.xFn=function(co){return co.dx+Ke-(Dn+co.fontSize*_i)*ti+Si*co.fontSize},La.yFn=function(co){return co.dy+Mn+co.fontSize*te},La.anchorFn=function(co,Ro){return v(Ro)&&Math.abs(Ro)===90?"middle":Vn?"end":"start"},La.heightFn=function(co,Ro,ao){return nt.side==="right"&&(Ro*=-1),Ro<-30?-ao:Ro<30?-.5*ao:0}}return La};function pa(nt){return[nt.text,nt.x,nt.axInfo,nt.font,nt.fontSize,nt.fontColor].join("_")}H.drawTicks=function(nt,Ke,Qt){Qt=Qt||{};var Xt=Ke._id+"tick",nr=[].concat(Ke.minor&&Ke.minor.ticks?Qt.vals.filter(function(rr){return rr.minor&&!rr.noTick}):[]).concat(Ke.ticks?Qt.vals.filter(function(rr){return!rr.minor&&!rr.noTick}):[]),cr=Qt.layer.selectAll("path."+Xt).data(nr,pa);cr.exit().remove(),cr.enter().append("path").classed(Xt,1).classed("ticks",1).classed("crisp",Qt.crisp!==!1).each(function(rr){return r.stroke(u.select(this),rr.minor?Ke.minor.tickcolor:Ke.tickcolor)}).style("stroke-width",function(rr){return n.crispRound(nt,rr.minor?Ke.minor.tickwidth:Ke.tickwidth,1)+"px"}).attr("d",Qt.path).style("display",null),ji(Ke,[N]),cr.attr("transform",Qt.transFn)},H.drawGrid=function(nt,Ke,Qt){if(Qt=Qt||{},Ke.tickmode!=="sync"){var Xt=Ke._id+"grid",nr=Ke.minor&&Ke.minor.showgrid,cr=nr?Qt.vals.filter(function(La){return La.minor}):[],rr=Ke.showgrid?Qt.vals.filter(function(La){return!La.minor}):[],Ze=Qt.counterAxis;if(Ze&&H.shouldShowZeroLine(nt,Ke,Ze))for(var xt=Ke.tickmode==="array",Vt=0;Vt=0;kr--){var ra=kr?jr:Fr;if(ra){var ja=ra.selectAll("path."+Xt).data(kr?rr:cr,pa);ja.exit().remove(),ja.enter().append("path").classed(Xt,1).classed("crisp",Qt.crisp!==!1),ja.attr("transform",Qt.transFn).attr("d",Qt.path).each(function(La){return r.stroke(u.select(this),La.minor?Ke.minor.gridcolor:Ke.gridcolor||"#ddd")}).style("stroke-dasharray",function(La){return n.dashStyle(La.minor?Ke.minor.griddash:Ke.griddash,La.minor?Ke.minor.gridwidth:Ke.gridwidth)}).style("stroke-width",function(La){return(La.minor?Tr:Ke._gw)+"px"}).style("display",null),typeof Qt.path=="function"&&ja.attr("d",Qt.path)}}ji(Ke,[k,B])}},H.drawZeroLine=function(nt,Ke,Qt){Qt=Qt||Qt;var Xt=Ke._id+"zl",nr=H.shouldShowZeroLine(nt,Ke,Qt.counterAxis),cr=Qt.layer.selectAll("path."+Xt).data(nr?[{x:0,id:Ke._id}]:[]);cr.exit().remove(),cr.enter().append("path").classed(Xt,1).classed("zl",1).classed("crisp",Qt.crisp!==!1).each(function(){Qt.layer.selectAll("path").sort(function(rr,Ze){return $(rr.id,Ze.id)})}),cr.attr("transform",Qt.transFn).attr("d",Qt.path).call(r.stroke,Ke.zerolinecolor||r.defaultLine).style("stroke-width",n.crispRound(nt,Ke.zerolinewidth,Ke._gw||1)+"px").style("display",null),ji(Ke,[R])},H.drawLabels=function(nt,Ke,Qt){Qt=Qt||{};var Xt=nt._fullLayout,nr=Ke._id,cr=Ke.zerolinelayer==="above traces",rr=Qt.cls||nr+"tick",Ze=Qt.vals.filter(function(vi){return vi.text}),xt=Qt.labelFns,Vt=Qt.secondary?0:Ke.tickangle,er=(Ke._prevTickAngles||{})[rr],Tr=Qt.layer.selectAll("g."+rr).data(Ke.showticklabels?Ze:[],pa),jr=[];Tr.enter().append("g").classed(rr,1).append("text").attr("text-anchor","middle").each(function(vi){var zi=u.select(this),ho=nt._promises.length;zi.call(t.positionText,xt.xFn(vi),xt.yFn(vi)).call(n.font,{family:vi.font,size:vi.fontSize,color:vi.fontColor,weight:vi.fontWeight,style:vi.fontStyle,variant:vi.fontVariant,textcase:vi.fontTextcase,lineposition:vi.fontLineposition,shadow:vi.fontShadow}).text(vi.text).call(t.convertToTspans,nt),nt._promises[ho]?jr.push(nt._promises.pop().then(function(){Fr(zi,Vt)})):Fr(zi,Vt)}),ji(Ke,[q]),Tr.exit().remove(),Qt.repositionOnUpdate&&Tr.each(function(vi){u.select(this).select("text").call(t.positionText,xt.xFn(vi),xt.yFn(vi))});function Fr(vi,zi){vi.each(function(ho){var ro=u.select(this),es=ro.select(".text-math-group"),Ho=xt.anchorFn(ho,zi),is=Qt.transFn.call(ro.node(),ho)+(v(zi)&&+zi!=0?" rotate("+zi+","+xt.xFn(ho)+","+(xt.yFn(ho)-ho.fontSize/2)+")":""),as=t.lineCount(ro),vs=j*ho.fontSize,Yo=xt.heightFn(ho,v(zi)?+zi:0,(as-1)*vs);if(Yo&&(is+=e(0,Yo)),es.empty()){var po=ro.select("text");po.attr({transform:is,"text-anchor":Ho}),po.style("display",null),Ke._adjustTickLabelsOverflow&&Ke._adjustTickLabelsOverflow()}else{var _s=n.bBox(es.node()).width,qo=_s*{end:-.5,start:.5}[Ho];es.attr("transform",is+e(qo,0))}})}Ke._adjustTickLabelsOverflow=function(){var vi=Ke.ticklabeloverflow;if(!(!vi||vi==="allow")){var zi=vi.indexOf("hide")!==-1,ho=Ke._id.charAt(0)==="x",ro=0,es=ho?nt._fullLayout.width:nt._fullLayout.height;if(vi.indexOf("domain")!==-1){var Ho=l.simpleMap(Ke.range,Ke.r2l);ro=Ke.l2p(Ho[0])+Ke._offset,es=Ke.l2p(Ho[1])+Ke._offset}var is=Math.min(ro,es),as=Math.max(ro,es),vs=Ke.side,Yo=1/0,po=-1/0;Tr.each(function(tl){var ts=u.select(this),qs=ts.select(".text-math-group");if(qs.empty()){var Xs=n.bBox(ts.node()),ps=0;ho?(Xs.right>as||Xs.leftas||Xs.top+(Ke.tickangle?0:tl.fontSize/4)Ke["_visibleLabelMin_"+Ho._id]?ts.style("display","none"):as.K==="tick"&&!is&&ts.node().style.display!=="none"&&ts.style("display",null)})})})})},Fr(Tr,er+1?er:Vt);function kr(){return jr.length&&Promise.all(jr)}var ra=null;function ja(){if(Fr(Tr,Vt),Ze.length&&Ke.autotickangles&&(Ke.type!=="log"||String(Ke.dtick).charAt(0)!=="D")){ra=Ke.autotickangles[0];var vi=0,zi=[],ho,ro=1;Tr.each(function(Do){vi=Math.max(vi,Do.fontSize);var hs=Ke.l2p(Do.x),Jl=ka(this),du=n.bBox(Jl.node());ro=Math.max(ro,t.lineCount(Jl)),zi.push({top:0,bottom:10,height:10,left:hs-du.width/2,right:hs+du.width/2+2,width:du.width+2})});var es=(Ke.tickson==="boundaries"||Ke.showdividers)&&!Qt.secondary,Ho=Ze.length,is=Math.abs((Ze[Ho-1].x-Ze[0].x)*Ke._m)/(Ho-1),as=es?is/2:is,vs=es?Ke.ticklen:vi*1.25*ro,Yo=Math.sqrt(Math.pow(as,2)+Math.pow(vs,2)),po=as/Yo,_s=Ke.autotickangles.map(function(Do){return Do*Math.PI/180}),qo=_s.find(function(Do){return Math.abs(Math.cos(Do))<=po});qo===void 0&&(qo=_s.reduce(function(Do,hs){return Math.abs(Math.cos(Do))Co*ao&&(Mo=ao,yo[Ao]=Vn[Ao]=co[Ao])}var Wo=Math.abs(Mo-Bo);Wo-ti>0?(Wo-=ti,ti*=1+ti/Wo):ti=0,Ke._id.charAt(0)!=="y"&&(ti=-ti),yo[ai]=Mn.p2r(Mn.r2p(Vn[ai])+Si*ti),Mn.autorange==="min"||Mn.autorange==="max reversed"?(yo[0]=null,Mn._rangeInitial0=void 0,Mn._rangeInitial1=void 0):(Mn.autorange==="max"||Mn.autorange==="min reversed")&&(yo[1]=null,Mn._rangeInitial0=void 0,Mn._rangeInitial1=void 0),Xt._insideTickLabelsUpdaterange[Mn._name+".range"]=yo}var Po=l.syncOrAsync(La);return Po&&Po.then&&nt._promises.push(Po),Po};function fa(nt,Ke,Qt){var Xt=Ke._id+"divider",nr=Qt.vals,cr=Qt.layer.selectAll("path."+Xt).data(nr,pa);cr.exit().remove(),cr.enter().insert("path",":first-child").classed(Xt,1).classed("crisp",1).call(r.stroke,Ke.dividercolor).style("stroke-width",n.crispRound(nt,Ke.dividerwidth,1)+"px"),cr.attr("transform",Qt.transFn).attr("d",Qt.path)}H.getPxPosition=function(nt,Ke){var Qt=nt._fullLayout._size,Xt=Ke._id.charAt(0),nr=Ke.side,cr;if(Ke.anchor!=="free"?cr=Ke._anchorAxis:Xt==="x"?cr={_offset:Qt.t+(1-(Ke.position||0))*Qt.h,_length:0}:Xt==="y"&&(cr={_offset:Qt.l+(Ke.position||0)*Qt.w+Ke._shift,_length:0}),nr==="top"||nr==="left")return cr._offset;if(nr==="bottom"||nr==="right")return cr._offset+cr._length};function za(nt){var Ke=nt.title.font.size,Qt=(nt.title.text.match(t.BR_TAG_ALL)||[]).length;return nt.title.hasOwnProperty("standoff")?Ke*(ae+Qt*j):Qt?Ke*(Qt+1)*j:Ke}function Ia(nt,Ke){var Qt=nt._fullLayout,Xt=Ke._id,nr=Xt.charAt(0),cr=Ke.title.font.size,rr,Ze=(Ke.title.text.match(t.BR_TAG_ALL)||[]).length;if(Ke.title.hasOwnProperty("standoff"))Ke.side==="bottom"||Ke.side==="right"?rr=Ke._depth+Ke.title.standoff+cr*ae:(Ke.side==="top"||Ke.side==="left")&&(rr=Ke._depth+Ke.title.standoff+cr*(te+Ze*j));else{var xt=Ln(Ke);if(Ke.type==="multicategory")rr=Ke._depth;else{var Vt=1.5*cr;xt&&(Vt=.5*cr,Ke.ticks==="outside"&&(Vt+=Ke.ticklen)),rr=10+Vt+(Ke.linewidth?Ke.linewidth-1:0)}xt||(nr==="x"?rr+=Ke.side==="top"?cr*(Ke.showticklabels?1:0):cr*(Ke.showticklabels?1.5:.5):rr+=Ke.side==="right"?cr*(Ke.showticklabels?1:.5):cr*(Ke.showticklabels?.5:0))}var er=H.getPxPosition(nt,Ke),Tr,jr,Fr;nr==="x"?(jr=Ke._offset+Ke._length/2,Fr=Ke.side==="top"?er-rr:er+rr):(Fr=Ke._offset+Ke._length/2,jr=Ke.side==="right"?er+rr:er-rr,Tr={rotate:"-90",offset:0});var kr;if(Ke.type!=="multicategory"){var ra=Ke._selections[Ke._id+"tick"];if(kr={selection:ra,side:Ke.side},ra&&ra.node()&&ra.node().parentNode){var ja=n.getTranslate(ra.node().parentNode);kr.offsetLeft=ja.x,kr.offsetTop=ja.y}Ke.title.hasOwnProperty("standoff")&&(kr.pad=0)}return Ke._titleStandoff=rr,a.draw(nt,Xt+"title",{propContainer:Ke,propName:Ke._name+".title.text",placeholder:Qt._dfltTitle[nr],avoid:kr,transform:Tr,attributes:{x:jr,y:Fr,"text-anchor":"middle"}})}H.shouldShowZeroLine=function(nt,Ke,Qt){var Xt=l.simpleMap(Ke.range,Ke.r2l);return Xt[0]*Xt[1]<=0&&Ke.zeroline&&(Ke.type==="linear"||Ke.type==="-")&&!(Ke.rangebreaks&&Ke.maskBreaks(0)===z)&&(Va(Ke,0)||!Oa(nt,Ke,Qt,Xt)||tn(nt,Ke))},H.clipEnds=function(nt,Ke){return Ke.filter(function(Qt){return Va(nt,Qt.x)})};function Va(nt,Ke){var Qt=nt.l2p(Ke);return Qt>1&&Qt1)for(nr=1;nr=nr.min&&nt=F:/%L/.test(Ke)?nt>=C:/%[SX]/.test(Ke)?nt>=D:/%M/.test(Ke)?nt>=_:/%[HI]/.test(Ke)?nt>=x:/%p/.test(Ke)?nt>=h:/%[Aadejuwx]/.test(Ke)?nt>=m:/%[UVW]/.test(Ke)?nt>=T:/%[Bbm]/.test(Ke)?nt>=g:/%[q]/.test(Ke)?nt>=M:/%[Yy]/.test(Ke)?nt>=y:!0}}}),__=xe({"src/plots/cartesian/autorange_options_defaults.js"(U,O){"use strict";O.exports=function(v,w,S){var l,e;if(S){var t=w==="reversed"||w==="min reversed"||w==="max reversed";l=S[t?1:0],e=S[t?0:1]}var a=v("autorangeoptions.minallowed",e===null?l:void 0),r=v("autorangeoptions.maxallowed",l===null?e:void 0);a===void 0&&v("autorangeoptions.clipmin"),r===void 0&&v("autorangeoptions.clipmax"),v("autorangeoptions.include")}}}),b_=xe({"src/plots/cartesian/range_defaults.js"(U,O){"use strict";var u=__();O.exports=function(w,S,l,e){var t=S._template||{},a=S.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var n;!e.noInsiderange&&a!=="log"&&(n=l("insiderange"),n&&(n[0]===null||n[1]===null)&&(S.insiderange=!1,n=void 0),n&&(r=l("range",n)))}var i=S.getAutorangeDflt(r,e),s=l("autorange",i),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete S.range,S.autorange=!0,c=!0),c||(i=S.getAutorangeDflt(r,e),s=l("autorange",i)),s&&(u(l,s,r),(a==="linear"||a==="-")&&l("rangemode")),S.cleanRange()}}}),mA=xe({"node_modules/mouse-event-offset/index.js"(U,O){var u={left:0,top:0};O.exports=v;function v(S,l,e){l=l||S.currentTarget||S.srcElement,Array.isArray(e)||(e=[0,0]);var t=S.clientX||0,a=S.clientY||0,r=w(l);return e[0]=t-r.left,e[1]=a-r.top,e}function w(S){return S===window||S===document||S===document.body?u:S.getBoundingClientRect()}}}),Ym=xe({"node_modules/has-passive-events/index.js"(U,O){"use strict";var u=f_();function v(){var w=!1;try{var S=Object.defineProperty({},"passive",{get:function(){w=!0}});window.addEventListener("test",null,S),window.removeEventListener("test",null,S)}catch{w=!1}return w}O.exports=u&&v()}}),gA=xe({"src/components/dragelement/align.js"(U,O){"use strict";O.exports=function(v,w,S,l,e){var t=(v-S)/(l-S),a=t+w/(l-S),r=(t+a)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?a:t<2/3-r?t:a>4/3-r?a:r}}}),yA=xe({"src/components/dragelement/cursor.js"(U,O){"use strict";var u=Sr(),v=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];O.exports=function(S,l,e,t){return e==="left"?S=0:e==="center"?S=1:e==="right"?S=2:S=u.constrain(Math.floor(S*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=u.constrain(Math.floor(l*3),0,2),v[l][S]}}}),_A=xe({"src/components/dragelement/unhover.js"(U,O){"use strict";var u=ip(),v=Hm(),w=t0().getGraphDiv,S=uv(),l=O.exports={};l.wrapped=function(e,t,a){e=w(e),e._fullLayout&&v.clear(e._fullLayout._uid+S.HOVERID),l.raw(e,t,a)},l.raw=function(t,a){var r=t._fullLayout,n=t._hoverdata;a||(a={}),!(a.target&&!t._dragged&&u.triggerHandler(t,"plotly_beforehover",a)===!1)&&(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,a.target&&n&&t.emit("plotly_unhover",{event:a,points:n}))}}}),Bf=xe({"src/components/dragelement/index.js"(U,O){"use strict";var u=mA(),v=h_(),w=Ym(),S=Sr().removeElement,l=lc(),e=O.exports={};e.align=gA(),e.getCursor=yA();var t=_A();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(i){var s=i.gd,c=1,p=s._context.doubleClickDelay,f=i.element,d,y,o,b,M,A,E,g;s._mouseDownTime||(s._mouseDownTime=0),f.style.pointerEvents="all",f.onmousedown=h,w?(f._ontouchstart&&f.removeEventListener("touchstart",f._ontouchstart),f._ontouchstart=h,f.addEventListener("touchstart",h,{passive:!1})):f.ontouchstart=h;function T(D,C,F){return Math.abs(D)"u"&&typeof D.clientY>"u"&&(D.clientX=d,D.clientY=y),o=new Date().getTime(),o-s._mouseDownTimep&&(c=Math.max(c-1,1)),s._dragged)i.doneFn&&i.doneFn();else{var C;A.target===E?C=A:(C={target:E,srcElement:E,toElement:E},Object.keys(A).concat(Object.keys(A.__proto__)).forEach(F=>{var I=A[F];!C[F]&&typeof I!="function"&&(C[F]=I)})),i.clickFn&&i.clickFn(c,C),g||E.dispatchEvent(new MouseEvent("click",D))}s._dragging=!1,s._dragged=!1}};function a(){var n=document.createElement("div");n.className="dragcover";var i=n.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(n),n}e.coverSlip=a;function r(n){return u(n.changedTouches?n.changedTouches[0]:n,document.body)}}}),Mh=xe({"src/lib/setcursor.js"(U,O){"use strict";O.exports=function(v,w){(v.attr("class")||"").split(" ").forEach(function(S){S.indexOf("cursor-")===0&&v.classed(S,!1)}),w&&v.classed("cursor-"+w,!0)}}}),bA=xe({"src/lib/override_cursor.js"(U,O){"use strict";var u=Mh(),v="data-savedcursor",w="!!";O.exports=function(l,e){var t=l.attr(v);if(e){if(!t){for(var a=(l.attr("class")||"").split(" "),r=0;rG.legend.length)for(var Z=G.legend.length;Z(r==="legend"?1:0));if(F===!1&&(i[r]=void 0),!(F===!1&&!p.uirevision)&&(d("uirevision",i.uirevision),F!==!1)){d("borderwidth");var I=d("orientation"),z=d("yref"),R=d("xref"),k=I==="h",B=z==="paper",N=R==="paper",q,Y,ee,te="left";k?(q=0,u.getComponentMethod("rangeslider","isVisible")(n.xaxis)?B?(Y=1.1,ee="bottom"):(Y=1,ee="top"):B?(Y=-.1,ee="top"):(Y=0,ee="bottom")):(Y=1,ee="auto",N?q=1.02:(q=1,te="right")),v.coerce(p,f,{x:{valType:"number",editType:"legend",min:N?-2:0,max:N?3:1,dflt:q}},"x"),v.coerce(p,f,{y:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:Y}},"y"),d("traceorder",m),t.isGrouped(i[r])&&d("tracegroupgap"),d("entrywidth"),d("entrywidthmode"),d("indentation"),d("itemsizing"),d("itemwidth"),d("itemclick"),d("itemdoubleclick"),d("groupclick"),d("xanchor",te),d("yanchor",ee),d("maxheight"),d("valign"),v.noneOrAll(p,f,["x","y"]);var ae=d("title.text");if(ae){d("title.side",k?"left":"top");var j=v.extendFlat({},y,{size:v.bigFont(y.size)});v.coerceFont(d,"title.font",j);let G=c>1;d("titleclick",G?"toggle":!1),d("titledoubleclick",G?"toggleothers":!1)}}}O.exports=function(n,i,s){var c,p=s.slice(),f=i.shapes;if(f)for(c=0;cUe.showlegend||Ue.legendgroup);var y=f.concat(d),o=i.trace;o._isShape&&(o=n.shapes[o.index]);var b=o.legendgroup,M,A,E,g,T,m,h={},x=[],_=[],D=[];function C(Ue,Oe){var _e=x.indexOf(Ue),ce=h.visible;return ce||(ce=h.visible=[]),x.indexOf(Ue)===-1&&(x.push(Ue),_e=x.length-1),ce[_e]=Oe,_e}var F=(n.shapes||[]).map(function(Ue){return Ue._input}),I=!1;function z(Ue,Oe){F[Ue].visible=Oe,I=!0}function R(Ue,Oe){if(!(i.groupTitle&&!c)){var _e=Ue._isShape,ce=Ue.index;ce===void 0&&(ce=Ue._index);var ie=Ue.visible===!1?!1:Oe;_e?z(ce,ie):C(ce,ie)}}var k=o.legend;if(!o._isShape&&O.traceIs(o,"pie-like")){var B=i.label,N=p.indexOf(B);if(r==="toggle")N===-1?p.push(B):p.splice(N,1);else if(r==="toggleothers"){var q=N!==-1,Y=[];for(M=0;ME.showlegend||E.legendgroup),c=n.concat(s);function p(E){return(E.legend||"legend")===i}var f,d;if(a==="toggle")f=!c.some(function(g){return p(g)&&g.visible===!0}),d=!1;else{let E=c.some(function(g){return!p(g)&&g.visible===!0&&g.showlegend!==!1});f=!0,d=!E}let y={visible:[]},o=[],b=(r.shapes||[]).map(function(E){return E._input});for(var M=!1,A=0;Az&&(F=z)}D[y][0]._groupMinRank=F,D[y][0]._preGroupSort=y}var R=function(ee,te){return ee[0]._groupMinRank-te[0]._groupMinRank||ee[0]._preGroupSort-te[0]._preGroupSort},k=function(ee,te){var ae=u(ee.trace.legendrank)?ee.trace.legendrank[ee.i]:ee.trace.legendrank,j=u(te.trace.legendrank)?te.trace.legendrank[te.i]:te.trace.legendrank;return ae-j||ee._preSort-te._preSort};for(D.forEach(function(ee,te){ee[0]._preGroupSort=te}),D.sort(R),y=0;y0)Z=G.width;else return 0;return m?H:Math.min(Z,K)};A.each(function(j){var G=u.select(this),K=w.ensureSingle(G,"g","layers");K.style("opacity",j[0].trace.opacity);var H=g.indentation,Z=g.valign,X=j[0].lineHeight,$=j[0].height;if(Z==="middle"&&H===0||!X||!$)K.attr("transform",null);else{var Q={top:1,bottom:-1}[Z],re=Q*(.5*(X-$+3))||0,ue=g.indentation;K.attr("transform",S(ue,re))}var pe=K.selectAll("g.legendfill").data([j]);pe.enter().append("g").classed("legendfill",!0);var ge=K.selectAll("g.legendlines").data([j]);ge.enter().append("g").classed("legendlines",!0);var Te=K.selectAll("g.legendsymbols").data([j]);Te.enter().append("g").classed("legendsymbols",!0),Te.selectAll("g.legendpoints").data([j]).enter().append("g").classed("legendpoints",!0)}).each(ae).each(I).each(R).each(z).each(B).each(ee).each(Y).each(C).each(F).each(N).each(q);function C(j){var G=o(j),K=G.showFill,H=G.showLine,Z=G.showGradientLine,X=G.showGradientFill,$=G.anyFill,Q=G.anyLine,re=j[0],ue=re.trace,pe,ge,Te=t(ue),Se=Te.colorscale,Ce=Te.reversescale,Ue=function(be){if(be.size())if(K)l.fillGroupStyle(be,E,!0);else{var De="legendfill-"+ue.uid;l.gradient(be,E,De,y(Ce),Se,"fill")}},Oe=function(be){if(be.size()){var De="legendline-"+ue.uid;l.lineGroupStyle(be),l.gradient(be,E,De,y(Ce),Se,"stroke")}},_e=a.hasMarkers(ue)||!$?"M5,0":Q?"M5,-2":"M5,-3",ce=u.select(this),ie=ce.select(".legendfill").selectAll("path").data(K||X?[j]:[]);if(ie.enter().append("path").classed("js-fill",!0),ie.exit().remove(),ie.attr("d",_e+"h"+h+"v6h-"+h+"z").call(Ue),H||Z){var se=D(void 0,ue.line,f,c);ge=w.minExtend(ue,{line:{width:se}}),pe=[w.minExtend(re,{trace:ge})]}var ne=ce.select(".legendlines").selectAll("path").data(H||Z?[pe]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",_e+(Z?"l"+h+",0.0001":"h"+h)).call(H?l.lineGroupStyle:Oe)}function F(j){var G=o(j),K=G.anyFill,H=G.anyLine,Z=G.showLine,X=G.showMarker,$=j[0],Q=$.trace,re=!X&&!H&&!K&&a.hasText(Q),ue,pe;function ge(se,ne,be,De){var qe=w.nestedProperty(Q,se).get(),Ne=w.isArrayOrTypedArray(qe)&&ne?ne(qe):qe;if(m&&Ne&&De!==void 0&&(Ne=De),be){if(Nebe[1])return be[1]}return Ne}function Te(se){return $._distinct&&$.index&&se[$.index]?se[$.index]:se[0]}if(X||re||Z){var Se={},Ce={};if(X){Se.mc=ge("marker.color",Te);var Ue=Q.type==="scattermap";Se.mx=Ue?"circle":ge("marker.symbol",Te),Se.mo=ge("marker.opacity",w.mean,[.2,1]),Se.mlc=ge("marker.line.color",Te),Se.mlw=ge("marker.line.width",w.mean,[0,5],p),Se.mld=ge("marker.line.dash",Te),Ce.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Oe=ge("marker.size",w.mean,[2,16],s);Se.ms=Oe,Ce.marker.size=Oe}Z&&(Ce.line={width:ge("line.width",Te,[0,10],c)}),re&&(Se.tx="Aa",Se.tp=ge("textposition",Te),Se.ts=10,Se.tc=ge("textfont.color",Te),Se.tf=ge("textfont.family",Te),Se.tw=ge("textfont.weight",Te),Se.ty=ge("textfont.style",Te),Se.tv=ge("textfont.variant",Te),Se.tC=ge("textfont.textcase",Te),Se.tE=ge("textfont.lineposition",Te),Se.tS=ge("textfont.shadow",Te)),ue=[w.minExtend($,Se)],pe=w.minExtend(Q,Ce),pe.selectedpoints=null,pe.texttemplate=null}var _e=u.select(this).select("g.legendpoints"),ce=_e.selectAll("path.scatterpts").data(X?ue:[]);ce.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),ce.exit().remove(),ce.call(l.pointStyle,pe,E),X&&(ue[0].mrc=3);var ie=_e.selectAll("g.pointtext").data(re?ue:[]);ie.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),ie.exit().remove(),ie.selectAll("text").call(l.textPointStyle,pe,E)}function I(j){var G=j[0].trace,K=G.type==="waterfall";if(j[0]._distinct&&K){var H=j[0].trace[j[0].dir].marker;return j[0].mc=H.color,j[0].mlw=H.line.width,j[0].mlc=H.line.color,k(j,this,"waterfall")}var Z=[];G.visible&&K&&(Z=j[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 X=u.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Z);X.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),X.exit().remove(),X.each(function($){var Q=u.select(this),re=G[$[0]].marker,ue=D(void 0,re.line,d,p);Q.attr("d",$[1]).style("stroke-width",ue+"px").call(e.fill,re.color),ue&&Q.call(e.stroke,re.line.color)})}function z(j){k(j,this)}function R(j){k(j,this,"funnel")}function k(j,G,K){var H=j[0].trace,Z=H.marker||{},X=Z.line||{},$=Z.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Q=K?H.visible&&H.type===K:v.traceIs(H,"bar"),re=u.select(G).select("g.legendpoints").selectAll("path.legend"+K).data(Q?[j]:[]);re.enter().append("path").classed("legend"+K,!0).attr("d",$).attr("transform",_),re.exit().remove(),re.each(function(ue){var pe=u.select(this),ge=ue[0],Te=D(ge.mlw,Z.line,d,p);pe.style("stroke-width",Te+"px");var Se=ge.mcc;if(!g._inHover&&"mc"in ge){var Ce=t(Z),Ue=Ce.mid;Ue===void 0&&(Ue=(Ce.max+Ce.min)/2),Se=l.tryColorscale(Z,"")(Ue)}var Oe=Se||ge.mc||Z.color,_e=Z.pattern,ce=l.getPatternAttr,ie=_e&&(ce(_e.shape,0,"")||ce(_e.path,0,""));if(ie){var se=ce(_e.bgcolor,0,null),ne=ce(_e.fgcolor,0,null),be=_e.fgopacity,De=b(_e.size,8,10),qe=b(_e.solidity,.5,1),Ne="legend-"+H.uid;pe.call(l.pattern,"legend",E,Ne,ie,De,qe,Se,_e.fillmode,se,ne,be)}else pe.call(e.fill,Oe);Te&&e.stroke(pe,ge.mlc||X.color)})}function B(j){var G=j[0].trace,K=u.select(this).select("g.legendpoints").selectAll("path.legendbox").data(G.visible&&v.traceIs(G,"box-violin")?[j]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),K.exit().remove(),K.each(function(){var H=u.select(this);if((G.boxpoints==="all"||G.points==="all")&&e.opacity(G.fillcolor)===0&&e.opacity((G.line||{}).color)===0){var Z=w.minExtend(G,{marker:{size:m?s:w.constrain(G.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,Z,E)}else{var X=D(void 0,G.line,d,p);H.style("stroke-width",X+"px").call(e.fill,G.fillcolor),X&&e.stroke(H,G.line.color)}})}function N(j){var G=j[0].trace,K=u.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(G.visible&&G.type==="candlestick"?[j,j]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(H,Z){return Z?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",_).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Z){var X=u.select(this),$=G[Z?"increasing":"decreasing"],Q=D(void 0,$.line,d,p);X.style("stroke-width",Q+"px").call(e.fill,$.fillcolor),Q&&e.stroke(X,$.line.color)})}function q(j){var G=j[0].trace,K=u.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(G.visible&&G.type==="ohlc"?[j,j]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(H,Z){return Z?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",_).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Z){var X=u.select(this),$=G[Z?"increasing":"decreasing"],Q=D(void 0,$.line,d,p);X.style("fill","none").call(l.dashLine,$.line.dash,Q),Q&&e.stroke(X,$.line.color)})}function Y(j){te(j,this,"pie")}function ee(j){te(j,this,"funnelarea")}function te(j,G,K){var H=j[0],Z=H.trace,X=K?Z.visible&&Z.type===K:v.traceIs(Z,K),$=u.select(G).select("g.legendpoints").selectAll("path.legend"+K).data(X?[j]:[]);if($.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),$.exit().remove(),$.size()){var Q=Z.marker||{},re=D(n(Q.line.width,H.pts),Q.line,d,p),ue="pieLike",pe=w.minExtend(Z,{marker:{line:{width:re}}},ue),ge=w.minExtend(H,{trace:pe},ue);r($,ge,pe,E)}}function ae(j){var G=j[0].trace,K,H=[];if(G.visible)switch(G.type){case"histogram2d":case"heatmap":H=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":H=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":H=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":H=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],K=!1;break;case"streamtube":H=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],K=!1;break;case"surface":H=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],K=!0;break;case"mesh3d":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var Z=u.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(H);Z.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),Z.exit().remove(),Z.each(function(X,$){var Q=u.select(this),re=t(G),ue=re.colorscale,pe=re.reversescale,ge=function(Ue){if(Ue.size()){var Oe="legendfill-"+G.uid;l.gradient(Ue,E,Oe,y(pe,K==="radial"),ue,"fill")}},Te;if(ue){if(!K){var Ce=ue.length;Te=$===0?ue[pe?Ce-1:0][1]:$===1?ue[pe?0:Ce-1][1]:ue[Math.floor((Ce-1)/2)][1]}}else{var Se=G.vertexcolor||G.facecolor||G.color;Te=w.isArrayOrTypedArray(Se)?Se[$]||Se[0]:Se}Q.attr("d",X[0]),Te?Q.call(e.fill,Te):Q.call(ge)})}};function y(M,A){var E=A?"radial":"horizontal";return E+(M?"":"reversed")}function o(M){var A=M[0].trace,E=A.contours,g=a.hasLines(A)||A.visible&&A.type==="quiver",T=a.hasMarkers(A),m=A.visible&&A.fill&&A.fill!=="none",h=!1,x=!1;if(E){var _=E.coloring;_==="lines"?h=!0:g=_==="none"||_==="heatmap"||E.showlines,E.type==="constraint"?m=E._operation!=="=":(_==="fill"||_==="heatmap")&&(x=!0)}return{showMarker:T,showLine:g,showFill:m,showGradientLine:h,showGradientFill:x,anyLine:g||h,anyFill:m||x}}function b(M,A,E){return M&&w.isArrayOrTypedArray(M)?A:M>E?E:M}}}),S_=xe({"src/components/legend/draw.js"(U,O){"use strict";var u=Na(),v=Sr(),w=zl(),S=Ci(),l=ip(),e=Bf(),t=go(),a=wi(),r=el(),n=T_().handleItemClick,i=T_().handleTitleClick,s=A_(),c=uc(),p=c.LINE_SPACING,f=c.FROM_TL,d=c.FROM_BR,y=xA(),o=M_(),b=o0(),M=1,A=/^legend[0-9]*$/;O.exports=function(q,Y){if(Y)g(q,Y);else{var ee=q._fullLayout,te=ee._legends,ae=ee._infolayer.selectAll('[class^="legend"]');ae.each(function(){var H=u.select(this),Z=H.attr("class"),X=Z.split(" ")[0];X.match(A)&&te.indexOf(X)===-1&&H.remove()});for(var j=0;j1)}var re=ee.hiddenlabels||[];if(!G&&(!ee.showlegend||!K.length))return j.selectAll("."+te).remove(),ee._topdefs.select("#"+ae).remove(),w.autoMargin(N,te);var ue=v.ensureSingle(j,"g",te,function(ce){G||ce.attr("pointer-events","all")}),pe=v.ensureSingleById(ee._topdefs,"clipPath",ae,function(ce){ce.append("rect")}),ge=v.ensureSingle(ue,"rect","bg",function(ce){ce.attr("shape-rendering","crispEdges")});ge.call(a.stroke,Y.bordercolor).call(a.fill,Y.bgcolor).style("stroke-width",Y.borderwidth+"px");var Te=v.ensureSingle(ue,"g","scrollbox"),Se=Y.title;Y._titleWidth=0,Y._titleHeight=0;var Ce;Se.text?(Ce=v.ensureSingle(Te,"text",te+"titletext"),Ce.attr("text-anchor","start").call(t.font,Se.font).text(Se.text),C(Ce,Te,N,Y,M),!G&&(Y.titleclick||Y.titledoubleclick)&&D(Te,N,Y,te)):(Te.selectAll("."+te+"titletext").remove(),Te.selectAll("."+te+"titletoggle").remove());var Ue=v.ensureSingle(ue,"rect","scrollbar",function(ce){ce.attr(s.scrollBarEnterAttrs).call(a.fill,s.scrollBarColor)}),Oe=Te.selectAll("g.groups").data(K);Oe.enter().append("g").attr("class","groups"),Oe.exit().remove();var _e=Oe.selectAll("g.traces").data(v.identity);_e.enter().append("g").attr("class","traces"),_e.exit().remove(),_e.style("opacity",function(ce){let ie=ce[0],se=ie.trace;if(ie.groupTitle){let ne=se.legendgroup,be=(ee.shapes||[]).filter(function(qe){return qe.showlegend});return N._fullData.concat(be).some(function(qe){return qe.legendgroup===ne&&(qe.legend||"legend")===te&&qe.visible===!0})?1:.5}return S.traceIs(se,"pie-like")?re.indexOf(ce[0].label)!==-1?.5:1:se.visible==="legendonly"?.5:1}).each(function(){u.select(this).call(h,N,Y)}).call(o,N,Y).each(function(ce){G||ce[0].groupTitle&&Y.groupclick==="toggleitem"||u.select(this).call(_,N,te)}),v.syncOrAsync([w.previousPromises,function(){return z(N,Oe,_e,Y,Te)},function(){var ce=ee._size,ie=Y.borderwidth,se=Y.xref==="paper",ne=Y.yref==="paper";if(Se.text){let ct=(ee.shapes||[]).filter(function(mt){return mt.showlegend}),ft=N._fullData.concat(ct).some(function(mt){let _t=mt.legend||"legend";var Bt=Array.isArray(_t)?_t.includes(te):_t===te;return Bt&&mt.visible===!0});Ce.style("opacity",ft?1:.5)}if(!G){var be,De;se?be=ce.l+ce.w*Y.x-f[k(Y)]*Y._width:be=ee.width*Y.x-f[k(Y)]*Y._width,ne?De=ce.t+ce.h*(1-Y.y)-f[B(Y)]*Y._effHeight:De=ee.height*(1-Y.y)-f[B(Y)]*Y._effHeight;var qe=R(N,te,be,De);if(qe)return;if(ee.margin.autoexpand){var Ne=be,ut=De;be=se?v.constrain(be,0,ee.width-Y._width):Ne,De=ne?v.constrain(De,0,ee.height-Y._effHeight):ut,be!==Ne&&v.log("Constrain "+te+".x to make legend fit inside graph"),De!==ut&&v.log("Constrain "+te+".y to make legend fit inside graph")}t.setTranslate(ue,be,De)}if(Ue.on(".drag",null),ue.on("wheel",null),G||Y._height<=Y._maxHeight||N._context.staticPlot){var ot=Y._effHeight;G&&(ot=Y._height),ge.attr({width:Y._width-ie,height:ot-ie,x:ie/2,y:ie/2}),t.setTranslate(Te,0,0),pe.select("rect").attr({width:Y._width-2*ie,height:ot-2*ie,x:ie,y:ie}),t.setClipUrl(Te,ae,N),t.setRect(Ue,0,0,0,0),delete Y._scrollY}else{var yt=Math.max(s.scrollBarMinHeight,Y._effHeight*Y._effHeight/Y._height),At=Y._effHeight-yt-2*s.scrollBarMargin,It=Y._height-Y._effHeight,Zt=At/It,vr=Math.min(Y._scrollY||0,It);ge.attr({width:Y._width-2*ie+s.scrollBarWidth+s.scrollBarMargin,height:Y._effHeight-ie,x:ie/2,y:ie/2}),pe.select("rect").attr({width:Y._width-2*ie+s.scrollBarWidth+s.scrollBarMargin,height:Y._effHeight-2*ie,x:ie,y:ie+vr}),t.setClipUrl(Te,ae,N),Ie(vr,yt,Zt),ue.on("wheel",function(){vr=v.constrain(Y._scrollY+u.event.deltaY/It*At,0,It),Ie(vr,yt,Zt),vr!==0&&vr!==It&&u.event.preventDefault()});var Ut,Jt,at,Ee=function(ct,ft,mt){var _t=(mt-ft)/Zt+ct;return v.constrain(_t,0,It)},Re=function(ct,ft,mt){var _t=(ft-mt)/Zt+ct;return v.constrain(_t,0,It)},he=u.behavior.drag().on("dragstart",function(){var ct=u.event.sourceEvent;ct.type==="touchstart"?Ut=ct.changedTouches[0].clientY:Ut=ct.clientY,at=vr}).on("drag",function(){var ct=u.event.sourceEvent;ct.buttons===2||ct.ctrlKey||(ct.type==="touchmove"?Jt=ct.changedTouches[0].clientY:Jt=ct.clientY,vr=Ee(at,Ut,Jt),Ie(vr,yt,Zt))});Ue.call(he);var ye=u.behavior.drag().on("dragstart",function(){var ct=u.event.sourceEvent;ct.type==="touchstart"&&(Ut=ct.changedTouches[0].clientY,at=vr)}).on("drag",function(){var ct=u.event.sourceEvent;ct.type==="touchmove"&&(Jt=ct.changedTouches[0].clientY,vr=Re(at,Ut,Jt),Ie(vr,yt,Zt))});Te.call(ye)}function Ie(ct,ft,mt){Y._scrollY=N._fullLayout[te]._scrollY=ct,t.setTranslate(Te,0,-ct),t.setRect(Ue,Y._width,s.scrollBarMargin+ct*mt,s.scrollBarWidth,ft),pe.select("rect").attr("y",ie+ct)}if(N._context.edits.legendPosition){var Fe,He,We,pt;ue.classed("cursor-move",!0),e.init({element:ue.node(),gd:N,prepFn:function(ct){if(ct.target!==Ue.node()){var ft=t.getTranslate(ue);We=ft.x,pt=ft.y}},moveFn:function(ct,ft){if(We!==void 0&&pt!==void 0){var mt=We+ct,_t=pt+ft;t.setTranslate(ue,mt,_t),Fe=e.align(mt,Y._width,ce.l,ce.l+ce.w,Y.xanchor),He=e.align(_t+Y._height,-Y._height,ce.t+ce.h,ce.t,Y.yanchor)}},doneFn:function(){if(Fe!==void 0&&He!==void 0){var ct={};ct[te+".x"]=Fe,ct[te+".y"]=He,S.call("_guiRelayout",N,ct)}},clickFn:function(ct,ft){var mt=j.selectAll("g.traces").filter(function(){var _t=this.getBoundingClientRect();return ft.clientX>=_t.left&&ft.clientX<=_t.right&&ft.clientY>=_t.top&&ft.clientY<=_t.bottom});mt.size()>0&&m(N,Y,mt,ct,ft)}})}}],N)}}function T(N,q,Y){var ee=N[0],te=ee.width,ae=q.entrywidthmode,j=ee.trace.legendwidth||q.entrywidth;return ae==="fraction"?q._maxWidth*j:Y+(j||te)}function m(N,q,Y,ee,te){var ae=N._fullLayout,j=Y.data()[0][0].trace,G=q.itemclick,K=q.itemdoubleclick,H={event:te,node:Y.node(),curveNumber:j.index,expandedIndex:j.index,data:N.data,layout:N.layout,frames:N._transitionData._frames,config:N._context,fullData:N._fullData,fullLayout:ae};j._group&&(H.group=j._group),S.traceIs(j,"pie-like")&&(H.label=Y.datum()[0].label);var Z=l.triggerHandler(N,"plotly_legendclick",H);if(ee===1){if(Z===!1)return;q._clickTimeout=setTimeout(function(){N._fullLayout&&G&&n(Y,N,q,G)},N._context.doubleClickDelay)}else if(ee===2){q._clickTimeout&&clearTimeout(q._clickTimeout),N._legendMouseDownTime=0;var X=l.triggerHandler(N,"plotly_legenddoubleclick",H);X!==!1&&Z!==!1&&K&&n(Y,N,q,K)}}function h(N,q,Y){var ee=b.getId(Y),te=N.data()[0][0],ae=te.trace,j=S.traceIs(ae,"pie-like"),G=!Y._inHover&&q._context.edits.legendText&&!j,K=Y._maxNameLength,H,Z;te.groupTitle?(H=te.groupTitle.text,Z=te.groupTitle.font):(Z=Y.font,Y.entries?H=te.text:(H=j?te.label:ae.name,ae._meta&&(H=v.templateString(H,ae._meta))));var X=v.ensureSingle(N,"text",ee+"text");X.attr("text-anchor","start").call(t.font,Z).text(G?x(H,K):H);var $=Y.indentation+Y.itemwidth+s.itemGap*2;r.positionText(X,$,0),G?X.call(r.makeEditable,{gd:q,text:H}).call(C,N,q,Y).on("edit",function(Q){this.text(x(Q,K)).call(C,N,q,Y);var re={};return re.name=Q,te.trace._isShape?S.call("_guiRelayout",q,"shapes["+ae.index+"].name",re.name):S.call("_guiRestyle",q,re,ae.index)}):C(X,N,q,Y)}function x(N,q){var Y=Math.max(4,q);if(N&&N.trim().length>=Y/2)return N;N=N||"";for(var ee=Y-N.length;ee>0;ee--)N+=" ";return N}function _(N,q,Y){var ee=q._context.doubleClickDelay,te,ae=1,j=v.ensureSingle(N,"rect",Y+"toggle",function(G){q._context.staticPlot||G.style("cursor","pointer").attr("pointer-events","all"),G.call(a.fill,"rgba(0,0,0,0)")});q._context.staticPlot||(j.on("mousedown",function(){te=new Date().getTime(),te-q._legendMouseDownTimeee&&(ae=Math.max(ae-1,1)),m(q,G,N,ae,u.event)}}))}function D(N,q,Y,ee){if(q._fullData.some(function(H){let Z=H.legend||"legend";return(Array.isArray(Z)?Z.includes(ee):Z===ee)&&S.traceIs(H,"pie-like")}))return;let ae=q._context.doubleClickDelay;var j,G=1;let K=v.ensureSingle(N,"rect",ee+"titletoggle",function(H){q._context.staticPlot||H.style("cursor","pointer").attr("pointer-events","all"),H.call(a.fill,"rgba(0,0,0,0)")});q._context.staticPlot||(K.on("mousedown",function(){j=new Date().getTime(),j-q._legendMouseDownTimeae&&(G=Math.max(G-1,1));let H={event:u.event,legendId:ee,data:q.data,layout:q.layout,fullData:q._fullData,fullLayout:q._fullLayout};if(G===1&&Y.titleclick){if(l.triggerHandler(q,"plotly_legendtitleclick",H)===!1)return;Y._titleClickTimeout=setTimeout(function(){q._fullLayout&&i(q,Y,Y.titleclick)},ae)}else G===2&&(Y._titleClickTimeout&&clearTimeout(Y._titleClickTimeout),q._legendMouseDownTime=0,l.triggerHandler(q,"plotly_legendtitledoubleclick",H)!==!1&&Y.titledoubleclick&&i(q,Y,Y.titledoubleclick))}))}function C(N,q,Y,ee,te){ee._inHover&&N.attr("data-notex",!0),r.convertToTspans(N,Y,function(){F(q,Y,ee,te)})}function F(N,q,Y,ee){var te=N.data()[0][0],ae=te&&te.trace.showlegend;if(Array.isArray(ae)&&(ae=ae[te.i]!==!1),!Y._inHover&&te&&!ae){N.remove();return}var j=N.select("g[class*=math-group]"),G=j.node(),K=b.getId(Y);Y||(Y=q._fullLayout[K]);var H=Y.borderwidth,Z;ee===M?Z=Y.title.font:te.groupTitle?Z=te.groupTitle.font:Z=Y.font;var X=Z.size*p,$,Q;if(G){var re=t.bBox(G);$=re.height,Q=re.width,ee===M?t.setTranslate(j,H,H+$*.75):t.setTranslate(j,0,$*.25)}else{var ue="."+K+(ee===M?"title":"")+"text",pe=N.select(ue),ge=r.lineCount(pe),Te=pe.node();if($=X*ge,Q=Te?t.bBox(Te).width:0,ee===M)Y.title.side==="left"&&(Q+=s.itemGap*2),r.positionText(pe,H+s.titlePad,H+X);else{var Se=s.itemGap*2+Y.indentation+Y.itemwidth;te.groupTitle&&(Se=s.itemGap,Q-=Y.indentation+Y.itemwidth),r.positionText(pe,Se,-X*((ge-1)/2-.3))}}ee===M?(Y._titleWidth=Q,Y._titleHeight=$):(te.lineHeight=X,te.height=Math.max($,16)+3,te.width=Q)}function I(N){var q=0,Y=0,ee=N.title.side;return ee&&(ee.indexOf("left")!==-1&&(q=N._titleWidth),ee.indexOf("top")!==-1&&(Y=N._titleHeight)),[q,Y]}function z(N,q,Y,ee,te){var ae=N._fullLayout,j=b.getId(ee);ee||(ee=ae[j]);var G=ae._size,K=b.isVertical(ee),H=b.isGrouped(ee),Z=ee.entrywidthmode==="fraction",X=ee.borderwidth,$=2*X,Q=s.itemGap,re=ee.indentation+ee.itemwidth+Q*2,ue=2*(X+Q),pe=B(ee),ge=ee.y<0||ee.y===0&&pe==="top",Te=ee.y>1||ee.y===1&&pe==="bottom",Se=ee.tracegroupgap,Ce={};let{orientation:Ue,yref:Oe}=ee,{maxheight:_e}=ee,ce=ge||Te||Ue!=="v"||Oe!=="paper";_e||(_e=ce?.5:1);let ie=ce?ae.height:G.h;ee._maxHeight=Math.max(_e>1?_e:_e*ie,30);var se=0;ee._width=0,ee._height=0;var ne=I(ee);if(K)Y.each(function(ct){var ft=ct[0].height;t.setTranslate(this,X+ne[0],X+ne[1]+ee._height+ft/2+Q),ee._height+=ft,ee._width=Math.max(ee._width,ct[0].width)}),se=re+ee._width,ee._width+=Q+re+$,ee._height+=ue,H&&(q.each(function(ct,ft){t.setTranslate(this,0,ft*ee.tracegroupgap)}),ee._height+=(ee._lgroupsLength-1)*ee.tracegroupgap);else{var be=k(ee),De=ee.x<0||ee.x===0&&be==="right",qe=ee.x>1||ee.x===1&&be==="left",Ne=Te||ge,ut=ae.width/2;ee._maxWidth=Math.max(De?Ne&&be==="left"?G.l+G.w:ut:qe?Ne&&be==="right"?G.r+G.w:ut:G.w,2*re);var ot=0,yt=0;Y.each(function(ct){var ft=T(ct,ee,re);ot=Math.max(ot,ft),yt+=ft}),se=null;var At=0;if(H){var It=0,Zt=0,vr=0;q.each(function(){var ct=0,ft=0;u.select(this).selectAll("g.traces").each(function(_t){var Bt=T(_t,ee,re),Et=_t[0].height;t.setTranslate(this,ne[0],ne[1]+X+Q+Et/2+ft),ft+=Et,ct=Math.max(ct,Bt),Ce[_t[0].trace.legendgroup]=ct});var mt=ct+Q;Zt>0&&mt+X+Zt>ee._maxWidth?(At=Math.max(At,Zt),Zt=0,vr+=It+Se,It=ft):It=Math.max(It,ft),t.setTranslate(this,Zt,vr),Zt+=mt}),ee._width=Math.max(At,Zt)+X,ee._height=vr+It+ue}else{var Ut=Y.size(),Jt=yt+$+(Ut-1)*Q=ee._maxWidth&&(At=Math.max(At,he),Ee=0,Re+=at,ee._height+=at,at=0),t.setTranslate(this,ne[0]+X+Ee,ne[1]+X+Re+ft/2+Q),he=Ee+mt+Q,Ee+=_t,at=Math.max(at,ft)}),Jt?(ee._width=Ee+$,ee._height=at+ue):(ee._width=Math.max(At,he)+$,ee._height+=at+ue)}}ee._width=Math.ceil(Math.max(ee._width+ne[0],ee._titleWidth+2*(X+s.titlePad))),ee._height=Math.ceil(Math.max(ee._height+ne[1],ee._titleHeight+2*(X+s.itemGap))),ee._effHeight=Math.min(ee._height,ee._maxHeight);var ye=N._context.edits,Ie=ye.legendText||ye.legendPosition;Y.each(function(ct){var ft=u.select(this).select("."+j+"toggle"),mt=ct[0].height,_t=ct[0].trace.legendgroup,Bt=T(ct,ee,re);H&&_t!==""&&(Bt=Ce[_t]);var Et=Ie?re:se||Bt;!K&&!Z&&(Et+=Q/2),t.setRect(ft,0,-mt/2,Et,mt)});var Fe=te.select("."+j+"titletext");Fe.node()&&E(Fe,ee,X);var He=te.select("."+j+"titletoggle");if(He.size()&&Fe.node()){var We=Fe.attr("x")||0,pt=s.titlePad;t.setRect(He,We-pt,X,ee._titleWidth+2*pt,ee._titleHeight+2*pt)}}function R(N,q,Y,ee){var te=N._fullLayout,ae=te[q],j=k(ae),G=B(ae),K=ae.xref==="paper",H=ae.yref==="paper";N._fullLayout._reservedMargin[q]={};var Z=ae.y<.5?"b":"t",X=ae.x<.5?"l":"r",$={r:te.width-Y,l:Y+ae._width,b:te.height-ee,t:ee+ae._effHeight};if(K&&H)return w.autoMargin(N,q,{x:ae.x,y:ae.y,l:ae._width*f[j],r:ae._width*d[j],b:ae._effHeight*d[G],t:ae._effHeight*f[G]});K?N._fullLayout._reservedMargin[q][Z]=$[Z]:H||ae.orientation==="v"?N._fullLayout._reservedMargin[q][X]=$[X]:N._fullLayout._reservedMargin[q][Z]=$[Z]}function k(N){return v.isRightAnchor(N)?"right":v.isCenterAnchor(N)?"center":"left"}function B(N){return v.isBottomAnchor(N)?"bottom":v.isMiddleAnchor(N)?"middle":"top"}}}),E_=xe({"src/components/fx/hover.js"(U){"use strict";var O=Na(),u=yn(),v=Sr(),w=v.pushUnique,S=v.strTranslate,l=v.strRotate,e=ip(),t=el(),a=bA(),r=go(),n=wi(),i=Bf(),s=uo(),c=lc().zindexSeparator,p=Ci(),f=Kf(),d=uv(),y=w_(),o=S_(),b=d.YANGLE,M=Math.PI*b/180,A=1/Math.sin(M),E=Math.cos(M),g=Math.sin(M),T=d.HOVERARROWSIZE,m=d.HOVERTEXTPAD,h={box:!0,ohlc:!0,violin:!0,candlestick:!0},x={scatter:!0,scattergl:!0,splom:!0};function _(X,$){return X.distance-$.distance}U.hover=function($,Q,re,ue){$=v.getGraphDiv($);var pe=Q.target;v.throttle($._fullLayout._uid+d.HOVERID,d.HOVERMINTIME,function(){D($,Q,re,ue,pe)})},U.loneHover=function($,Q){var re=!0;Array.isArray($)||(re=!1,$=[$]);var ue=Q.gd,pe=K(ue),ge=H(ue),Te=$.map(function(ne){var be=ne._x0||ne.x0||ne.x||0,De=ne._x1||ne.x1||ne.x||0,qe=ne._y0||ne.y0||ne.y||0,Ne=ne._y1||ne.y1||ne.y||0,ut=ne.eventData;if(ut){var ot=Math.min(be,De),yt=Math.max(be,De),At=Math.min(qe,Ne),It=Math.max(qe,Ne),Zt=ne.trace;if(p.traceIs(Zt,"gl3d")){var vr=ue._fullLayout[Zt.scene]._scene.container,Ut=vr.offsetLeft,Jt=vr.offsetTop;ot+=Ut,yt+=Ut,At+=Jt,It+=Jt}ut.bbox={x0:ot+ge,x1:yt+ge,y0:At+pe,y1:It+pe},ut.xPixel=(be+De)/2,ut.yPixel=(qe+Ne)/2,Q.inOut_bbox&&Q.inOut_bbox.push(ut.bbox)}else ut=!1;return{color:ne.color||n.defaultLine,x0:ne.x0||ne.x||0,x1:ne.x1||ne.x||0,y0:ne.y0||ne.y||0,y1:ne.y1||ne.y||0,xLabel:ne.xLabel,yLabel:ne.yLabel,zLabel:ne.zLabel,text:ne.text,name:ne.name,idealAlign:ne.idealAlign,borderColor:ne.borderColor,fontFamily:ne.fontFamily,fontSize:ne.fontSize,fontColor:ne.fontColor,fontWeight:ne.fontWeight,fontStyle:ne.fontStyle,fontVariant:ne.fontVariant,nameLength:ne.nameLength,textAlign:ne.textAlign,trace:ne.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:ne.hovertemplate||!1,hovertemplateLabels:ne.hovertemplateLabels||!1,eventData:ut}}),Se=!1,Ce=I(Te,{gd:ue,hovermode:"closest",rotateLabels:Se,bgColor:Q.bgColor||n.background,container:O.select(Q.container),outerContainer:Q.outerContainer||Q.container}),Ue=Ce.hoverLabels,Oe=5,_e=0,ce=0;Ue.sort(function(ne,be){return ne.y0-be.y0}).each(function(ne,be){var De=ne.y0-ne.by/2;De-Oe<_e?ne.offset=_e-De+Oe:ne.offset=0,_e=De+ne.by+ne.offset,be===Q.anchorIndex&&(ce=ne.offset)}).each(function(ne){ne.offset-=ce});var ie=ue._fullLayout._invScaleX,se=ue._fullLayout._invScaleY;return N(Ue,Se,ie,se),re?Ue:Ue.node()};function D(X,$,Q,re,ue){Q||(Q="xy"),typeof Q=="string"&&(Q=Q.split(c)[0]);var pe=Array.isArray(Q)?Q:[Q],ge,Te=X._fullLayout,Se=Te.hoversubplots,Ce=Te._plots||[],Ue=Ce[Q],Oe=Te._has("cartesian"),_e=$.hovermode||Te.hovermode,ce=(_e||"").charAt(0)==="x",ie=(_e||"").charAt(0)==="y",se,ne;if(Oe&&(ce||ie)&&Se==="axis"){for(var be=pe.length,De=0;Deyt[0]._length||wa<0||wa>At[0]._length)return i.unhoverRaw(X,$)}if($.pointerX=na+yt[0]._offset,$.pointerY=wa+At[0]._offset,"xval"in $?Re=f.flat(pe,$.xval):Re=f.p2c(yt,na),"yval"in $?he=f.flat(pe,$.yval):he=f.p2c(At,wa),!u(Re[0])||!u(he[0]))return v.warn("Fx.hover failed",$,X),i.unhoverRaw(X,$)}Te.clickanywhere&&(X._hoverXVals=Re,X._hoverYVals=he,X._hoverXAxes=yt,X._hoverYAxes=At);var za=1/0;function Ia(Vn,Bo){for(Ie=0;IeBt&&(at.splice(0,Bt),za=at[0].distance),Oe&&Jt!==0&&at.length===0){_t.distance=Jt,_t.index=!1;var Co=He._module.hoverPoints(_t,ft,mt,"closest",{hoverLayer:Te._hoverlayer});if(Co&&(Co=Co.filter(function(ro){return ro.spikeDistance<=Jt})),Co&&Co.length){var Wo,Po=Co.filter(function(ro){return ro.xa.showspikes&&ro.xa.spikesnap!=="hovered data"});if(Po.length){var vi=Po[0];u(vi.x0)&&u(vi.y0)&&(Wo=Oa(vi),(!Et.vLinePoint||Et.vLinePoint.spikeDistance>Wo.spikeDistance)&&(Et.vLinePoint=Wo))}var zi=Co.filter(function(ro){return ro.ya.showspikes&&ro.ya.spikesnap!=="hovered data"});if(zi.length){var ho=zi[0];u(ho.x0)&&u(ho.y0)&&(Wo=Oa(ho),(!Et.hLinePoint||Et.hLinePoint.spikeDistance>Wo.spikeDistance)&&(Et.hLinePoint=Wo))}}}}}Ia();function Va(Vn,Bo,Mo){for(var co=null,Ro=1/0,ao,Co=0;CoVn.trace.index===ji.trace.index):at=[ji];var Zi=at.length,un=G("x",ji,Te),rn=G("y",ji,Te);Ia(un,rn);var nt=[],Ke={},Qt=0,Xt=function(Vn){var Bo=h[Vn.trace.type]?C(Vn):Vn.trace.index;if(!Ke[Bo])Qt++,Ke[Bo]=Qt,nt.push(Vn);else{var Mo=Ke[Bo]-1,co=nt[Mo];Mo>0&&Math.abs(Vn.distance)Zi-1;nr--)Xt(at[nr]);at=nt,$n()}var cr=X._hoverdata,rr=[],Ze=K(X),xt=H(X);for(let Vn of at){var Vt=f.makeEventData(Vn,Vn.trace,Vn.cd);if(Vn.hovertemplate!==!1){var er=!1;Vn.cd[Vn.index]&&Vn.cd[Vn.index].ht&&(er=Vn.cd[Vn.index].ht),Vn.hovertemplate=er||Vn.trace.hovertemplate||!1}if(Vn.xa&&Vn.ya){var Tr=Vn.x0+Vn.xa._offset,jr=Vn.x1+Vn.xa._offset,Fr=Vn.y0+Vn.ya._offset,kr=Vn.y1+Vn.ya._offset,ra=Math.min(Tr,jr),ja=Math.max(Tr,jr),La=Math.min(Fr,kr),Dn=Math.max(Fr,kr);Vt.bbox={x0:ra+xt,x1:ja+xt,y0:La+Ze,y1:Dn+Ze},Vt.xPixel=(Tr+jr)/2,Vt.yPixel=(Fr+kr)/2}Vn.eventData=[Vt],rr.push(Vt)}X._hoverdata=rr;var Mn=_e==="y"&&(Ee.length>1||at.length>1)||_e==="closest"&&hr&&at.length>1,_i=n.combine(Te.plot_bgcolor||n.background,Te.paper_bgcolor),ti=I(at,{gd:X,hovermode:_e,rotateLabels:Mn,bgColor:_i,container:Te._hoverlayer,outerContainer:Te._paper.node(),commonLabelOpts:Te.hoverlabel,hoverdistance:Te.hoverdistance}),Si=ti.hoverLabels;if(f.isUnifiedHover(_e)||(R(Si,Mn,Te,ti.commonLabelBoundingBox),N(Si,Mn,Te._invScaleX,Te._invScaleY)),ue&&ue.tagName){var ai=p.getComponentMethod("annotations","hasClickToShow")(X,rr);a(O.select(ue),ai?"pointer":"")}var Ao=ee(X,$,cr);if(!ue||re||!Ao&&!Te.hoveranywhere)return;cr&&Ao&&X.emit("plotly_unhover",{event:$,points:cr}),yo(X._hoverdata);function yo(Vn){X.emit("plotly_hover",{event:$,points:Vn,xaxes:yt,yaxes:At,xvals:Re,yvals:he})}}function C(X){return[X.trace.index,X.index,X.x0,X.y0,X.name,X.attr,X.xa?X.xa._id:"",X.ya?X.ya._id:""].join(",")}var F=/([\s\S]*)<\/extra>/;function I(X,$){var Q=$.gd,re=Q._fullLayout,ue=$.hovermode,pe=$.rotateLabels,ge=$.bgColor,Te=$.container,Se=$.outerContainer,Ce=$.commonLabelOpts||{};if(X.length===0)return[[]];var Ue=$.fontFamily||d.HOVERFONT,Oe=$.fontSize||d.HOVERFONTSIZE,_e=$.fontWeight||re.font.weight,ce=$.fontStyle||re.font.style,ie=$.fontVariant||re.font.variant,se=$.fontTextcase||re.font.textcase,ne=$.fontLineposition||re.font.lineposition,be=$.fontShadow||re.font.shadow,De=X[0],qe=De.xa,Ne=De.ya,ut=ue.charAt(0),ot=ut+"Label",yt=De[ot];if(yt===void 0&&qe.type==="multicategory")for(var At=0;Atre.width-rr&&(Ze=re.width-rr),Ln.attr("d","M"+(Xt-Ze)+",0L"+(Xt-Ze+T)+","+cr+T+"H"+rr+"v"+cr+(m*2+Qt.height)+"H"+-rr+"V"+cr+T+"H"+(Xt-Ze-T)+"Z"),Xt=Ze,Ie.minX=Xt-rr,Ie.maxX=Xt+rr,qe.side==="top"?(Ie.minY=nr-(m*2+Qt.height),Ie.maxY=nr-m):(Ie.minY=nr+m,Ie.maxY=nr+(m*2+Qt.height))}else{var xt,Vt,er;Ne.side==="right"?(xt="start",Vt=1,er="",Xt=qe._offset+qe._length):(xt="end",Vt=-1,er="-",Xt=qe._offset),nr=Ne._offset+(De.y0+De.y1)/2,ji.attr("text-anchor",xt),Ln.attr("d","M0,0L"+er+T+","+T+"V"+(m+Qt.height/2)+"h"+er+(m*2+Qt.width)+"V-"+(m+Qt.height/2)+"H"+er+T+"V-"+T+"Z"),Ie.minY=nr-(m+Qt.height/2),Ie.maxY=nr+(m+Qt.height/2),Ne.side==="right"?(Ie.minX=Xt+T,Ie.maxX=Xt+T+(m*2+Qt.width)):(Ie.minX=Xt-T-(m*2+Qt.width),Ie.maxX=Xt-T);var Tr=Qt.height/2,jr=Zt-Qt.top-Tr,Fr="clip"+re._uid+"commonlabel"+Ne._id,kr;if(XtLn.hoverinfo!=="none");if(_n.length===0)return[];var Fe=re.hoverlabel,He=Fe.font,We=_n[0],pt=((ue==="x unified"?We.xa:We.ya).unifiedhovertitle||{}).text,ct=pt?v.hovertemplateString({data:ue==="x unified"?[{xa:We.xa,x:We.xVal}]:[{ya:We.ya,y:We.yVal}],fallback:We.trace.hovertemplatefallback,locale:re._d3locale,template:pt}):yt,ft={showlegend:!0,legend:{title:{text:ct,font:He},font:He,bgcolor:Fe.bgcolor,bordercolor:Fe.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:re.legend?re.legend.traceorder:void 0,orientation:"v"}},mt={font:He};y(ft,mt,Q._fullData);var _t=mt.legend;_t.entries=[];for(var Bt=0;Bt<_n.length;Bt++){var Et=_n[Bt];if(Et.hoverinfo!=="none"){var hr=z(Et,!0,ue,re,yt),$r=hr[0],ca=hr[1];Et.name=ca,ca!==""?Et.text=ca+" : "+$r:Et.text=$r;var na=Et.cd[Et.index];na&&(na.mc&&(Et.mc=na.mc),na.mcc&&(Et.mc=na.mcc),na.mlc&&(Et.mlc=na.mlc),na.mlcc&&(Et.mlc=na.mlcc),na.mlw&&(Et.mlw=na.mlw),na.mrc&&(Et.mrc=na.mrc),na.dir&&(Et.dir=na.dir)),Et._distinct=!0,_t.entries.push([Et])}}_t.entries.sort(function(Ln,ji){var Zi=re.hoversort;if(Zi==="value descending"||Zi==="value ascending"){var un=ue.charAt(0)==="x"?"y":"x",rn=Ln[0][un+"LabelVal"],nt=ji[0][un+"LabelVal"];if(rn!==nt)return Zi==="value descending"?nt-rn:rn-nt}return Ln[0].trace.index-ji[0].trace.index}),_t.layer=Te,_t._inHover=!0,_t._groupTitleFont=Fe.grouptitlefont,o(Q,_t);var wa=Te.select("g.legend"),pa=Z(Q,wa.node()),fa=pa.width+2*m,za=pa.height+2*m,Ia=_n[0],Va=(Ia.x0+Ia.x1)/2,Oa=(Ia.y0+Ia.y1)/2,tn=!(p.traceIs(Ia.trace,"bar-like")||p.traceIs(Ia.trace,"box-violin")),ka,oi;ut==="y"?tn?(oi=Oa-m,ka=Oa+m):(oi=Math.min.apply(null,_n.map(function(Ln){return Math.min(Ln.y0,Ln.y1)})),ka=Math.max.apply(null,_n.map(function(Ln){return Math.max(Ln.y0,Ln.y1)}))):oi=ka=v.mean(_n.map(function(Ln){return(Ln.y0+Ln.y1)/2}))-za/2;var $n,bn;ut==="x"?tn?($n=Va+m,bn=Va-m):($n=Math.max.apply(null,_n.map(function(Ln){return Math.max(Ln.x0,Ln.x1)})),bn=Math.min.apply(null,_n.map(function(Ln){return Math.min(Ln.x0,Ln.x1)}))):$n=bn=v.mean(_n.map(function(Ln){return(Ln.x0+Ln.x1)/2}))-fa/2;var ci=qe._offset,hi=Ne._offset;ka+=hi,$n+=ci,bn+=ci-fa,oi+=hi-za;var Pi,Jn;return $n+fa=0?Pi=$n:bn+fa=0?Pi=bn:ci+fa=0?Jn=ka:oi+za=0?Jn=oi:hi+za=0,(_n.idealAlign==="top"||!La)&&Dn?(er-=jr/2,_n.anchor="end"):La?(er+=jr/2,_n.anchor="start"):_n.anchor="middle",_n.crossPos=er;else{if(_n.pos=er,La=Vt+Tr/2+ja<=vr,Dn=Vt-Tr/2-ja>=0,(_n.idealAlign==="left"||!La)&&Dn)Vt-=Tr/2,_n.anchor="end";else if(La)Vt+=Tr/2,_n.anchor="start";else{_n.anchor="middle";var Mn=ja/2,_i=Vt+Mn-vr,ti=Vt-Mn;_i>0&&(Vt-=_i),ti<0&&(Vt+=-ti)}_n.crossPos=Vt}nr.attr("text-anchor",_n.anchor),rr&&cr.attr("text-anchor",_n.anchor),Ln.attr("transform",S(Vt,er)+(pe?l(b):""))}),{hoverLabels:Ti,commonLabelBoundingBox:Ie}}function z(X,$,Q,re,ue,pe){var ge,Te,Se="",Ce="";X.nameOverride!==void 0&&(X.name=X.nameOverride),X.name&&(X.trace._meta&&(X.name=v.templateString(X.name,X.trace._meta)),Se=ae(X.name,X.nameLength));var Ue=Q.charAt(0),Oe=Ue==="x"?"y":"x";X.zLabel!==void 0?(X.xLabel!==void 0&&(Ce+="x: "+X.xLabel+"
"),X.yLabel!==void 0&&(Ce+="y: "+X.yLabel+"
"),X.trace.type!=="choropleth"&&X.trace.type!=="choroplethmap"&&(Ce+=(Ce?"z: ":"")+X.zLabel)):$&&X[Ue+"Label"]===ue?Ce=X[Oe+"Label"]||"":X.xLabel===void 0?X.yLabel!==void 0&&X.trace.type!=="scattercarpet"&&(Ce=X.yLabel):X.yLabel===void 0?Ce=X.xLabel:Ce="("+X.xLabel+", "+X.yLabel+")",(X.text||X.text===0)&&!Array.isArray(X.text)&&(Ce+=(Ce?"
":"")+X.text),X.extraText!==void 0&&(Ce+=(Ce?"
":"")+X.extraText),pe&&Ce===""&&!X.hovertemplate&&(Se===""&&pe.remove(),Ce=Se),(Te=(ge=X.trace)==null?void 0:ge.hoverlabel)!=null&&Te.split&&(X.hovertemplate="");let{hovertemplate:_e=!1}=X;if(_e){let ce=X.hovertemplateLabels||X;X[Ue+"Label"]!==ue&&(ce[Ue+"other"]=ce[Ue+"Val"],ce[Ue+"otherLabel"]=ce[Ue+"Label"]),Ce=v.hovertemplateString({data:[X.eventData[0]||{},X.trace._meta],fallback:X.trace.hovertemplatefallback,labels:ce,locale:re._d3locale,template:_e}),Ce=Ce.replace(F,(ie,se)=>(Se=ae(se,X.nameLength),""))}return[Ce,Se]}function R(X,$,Q,re){var ue=$?"xa":"ya",pe=$?"ya":"xa",ge=0,Te=1,Se=X.size(),Ce=new Array(Se),Ue=0,Oe=re.minX,_e=re.maxX,ce=re.minY,ie=re.maxY,se=function(Re){return Re*Q._invScaleX},ne=function(Re){return Re*Q._invScaleY};X.each(function(Re){var he=Re[ue],ye=Re[pe],Ie=he._id.charAt(0)==="x",Fe=he.range;Ue===0&&Fe&&Fe[0]>Fe[1]!==Ie&&(Te=-1);var He=0,We=Ie?Q.width:Q.height;if(Q.hovermode==="x"||Q.hovermode==="y"){var pt=k(Re,$),ct=Re.anchor,ft=ct==="end"?-1:1,mt,_t;if(ct==="middle")mt=Re.crossPos+(Ie?ne(pt.y-Re.by/2):se(Re.bx/2+Re.tx2width/2)),_t=mt+(Ie?ne(Re.by):se(Re.bx));else if(Ie)mt=Re.crossPos+ne(T+pt.y)-ne(Re.by/2-T),_t=mt+ne(Re.by);else{var Bt=se(ft*T+pt.x),Et=Bt+se(ft*Re.bx);mt=Re.crossPos+Math.min(Bt,Et),_t=Re.crossPos+Math.max(Bt,Et)}Ie?ce!==void 0&&ie!==void 0&&Math.min(_t,ie)-Math.max(mt,ce)>1&&(ye.side==="left"?(He=ye._mainLinePosition,We=Q.width):We=ye._mainLinePosition):Oe!==void 0&&_e!==void 0&&Math.min(_t,_e)-Math.max(mt,Oe)>1&&(ye.side==="top"?(He=ye._mainLinePosition,We=Q.height):We=ye._mainLinePosition)}Ce[Ue++]=[{datum:Re,traceIndex:Re.trace.index,dp:0,pos:Re.pos,posref:Re.posref,size:Re.by*(Ie?A:1)/2,pmin:He,pmax:We}]}),Ce.sort(function(Re,he){return Re[0].posref-he[0].posref||Te*(he[0].traceIndex-Re[0].traceIndex)});var be,De,qe,Ne,ut,ot,yt;function At(Re){var he=Re[0],ye=Re[Re.length-1];if(De=he.pmin-he.pos-he.dp+he.size,qe=ye.pos+ye.dp+ye.size-he.pmax,De>.01){for(ut=Re.length-1;ut>=0;ut--)Re[ut].dp+=De;be=!1}if(!(qe<.01)){if(De<-.01){for(ut=Re.length-1;ut>=0;ut--)Re[ut].dp-=qe;be=!1}if(be){var Ie=0;for(Ne=0;Nehe.pmax&&Ie++;for(Ne=Re.length-1;Ne>=0&&!(Ie<=0);Ne--)ot=Re[Ne],ot.pos>he.pmax-1&&(ot.del=!0,Ie--);for(Ne=0;Ne=0;ut--)Re[ut].dp-=qe;for(Ne=Re.length-1;Ne>=0&&!(Ie<=0);Ne--)ot=Re[Ne],ot.pos+ot.dp+ot.size>he.pmax&&(ot.del=!0,Ie--)}}}for(;!be&&ge<=Se;){for(ge++,be=!0,Ne=0;Ne.01){for(ut=Zt.length-1;ut>=0;ut--)Zt[ut].dp+=De;for(It.push.apply(It,Zt),Ce.splice(Ne+1,1),yt=0,ut=It.length-1;ut>=0;ut--)yt+=It[ut].dp;for(qe=yt/It.length,ut=It.length-1;ut>=0;ut--)It[ut].dp-=qe;be=!1}else Ne++}Ce.forEach(At)}for(Ne=Ce.length-1;Ne>=0;Ne--){var Jt=Ce[Ne];for(ut=Jt.length-1;ut>=0;ut--){var at=Jt[ut],Ee=at.datum;Ee.offset=at.dp,Ee.del=at.del}}}function k(X,$){var Q=0,re=X.offset;return $&&(re*=-g,Q=X.offset*E),{x:Q,y:re}}function B(X){var $={start:1,end:-1,middle:0}[X.anchor],Q=$*(T+m),re=Q+$*(X.txwidth+m),ue=X.anchor==="middle";return ue&&(Q-=X.tx2width/2,re+=X.txwidth/2+m),{alignShift:$,textShiftX:Q,text2ShiftX:re}}function N(X,$,Q,re){var ue=function(ge){return ge*Q},pe=function(ge){return ge*re};X.each(function(ge){var Te=O.select(this);if(ge.del)return Te.remove();var Se=Te.select("text.nums"),Ce=ge.anchor,Ue=Ce==="end"?-1:1,Oe=B(ge),_e=k(ge,$),ce=_e.x,ie=_e.y,se=Ce==="middle",ne="hoverlabel"in ge.trace?ge.trace.hoverlabel.showarrow:!0,be;se?be="M-"+ue(ge.bx/2+ge.tx2width/2)+","+pe(ie-ge.by/2)+"h"+ue(ge.bx)+"v"+pe(ge.by)+"h-"+ue(ge.bx)+"Z":ne?be="M0,0L"+ue(Ue*T+ce)+","+pe(T+ie)+"v"+pe(ge.by/2-T)+"h"+ue(Ue*ge.bx)+"v-"+pe(ge.by)+"H"+ue(Ue*T+ce)+"V"+pe(ie-T)+"Z":be="M"+ue(Ue*T+ce)+","+pe(ie-ge.by/2)+"h"+ue(Ue*ge.bx)+"v"+pe(ge.by)+"h"+ue(-Ue*ge.bx)+"Z",Te.select("path").attr("d",be);var De=ce+Oe.textShiftX,qe=ie+ge.ty0-ge.by/2+m,Ne=ge.textAlign||"auto";Ne!=="auto"&&(Ne==="left"&&Ce!=="start"?(Se.attr("text-anchor","start"),De=se?-ge.bx/2-ge.tx2width/2+m:-ge.bx-m):Ne==="right"&&Ce!=="end"&&(Se.attr("text-anchor","end"),De=se?ge.bx/2-ge.tx2width/2-m:ge.bx+m)),Se.call(t.positionText,ue(De),pe(qe)),ge.tx2width&&(Te.select("text.name").call(t.positionText,ue(Oe.text2ShiftX+Oe.alignShift*m+ce),pe(ie+ge.ty0-ge.by/2+m)),Te.select("rect").call(r.setRect,ue(Oe.text2ShiftX+(Oe.alignShift-1)*ge.tx2width/2+ce),pe(ie-ge.by/2-1),ue(ge.tx2width),pe(ge.by+2)))})}function q(X,$){var Q=X.index,re=X.trace||{},ue=X.cd[0],pe=X.cd[Q]||{};function ge(_e){return _e||u(_e)&&_e===0}var Te=Array.isArray(Q)?function(_e,ce){var ie=v.castOption(ue,Q,_e);return ge(ie)?ie:v.extractOption({},re,"",ce)}:function(_e,ce){return v.extractOption(pe,re,_e,ce)};function Se(_e,ce,ie){var se=Te(ce,ie);ge(se)&&(X[_e]=se)}if(Se("hoverinfo","hi","hoverinfo"),Se("bgcolor","hbg","hoverlabel.bgcolor"),Se("borderColor","hbc","hoverlabel.bordercolor"),Se("fontFamily","htf","hoverlabel.font.family"),Se("fontSize","hts","hoverlabel.font.size"),Se("fontColor","htc","hoverlabel.font.color"),Se("fontWeight","htw","hoverlabel.font.weight"),Se("fontStyle","hty","hoverlabel.font.style"),Se("fontVariant","htv","hoverlabel.font.variant"),Se("nameLength","hnl","hoverlabel.namelength"),Se("textAlign","hta","hoverlabel.align"),X.posref=$==="y"||$==="closest"&&re.orientation==="h"?X.xa._offset+(X.x0+X.x1)/2:X.ya._offset+(X.y0+X.y1)/2,X.x0=v.constrain(X.x0,0,X.xa._length),X.x1=v.constrain(X.x1,0,X.xa._length),X.y0=v.constrain(X.y0,0,X.ya._length),X.y1=v.constrain(X.y1,0,X.ya._length),X.xLabelVal!==void 0&&(X.xLabel="xLabel"in X?X.xLabel:s.hoverLabelText(X.xa,X.xLabelVal,re.xhoverformat),X.xVal=X.xa.c2d(X.xLabelVal)),X.yLabelVal!==void 0&&(X.yLabel="yLabel"in X?X.yLabel:s.hoverLabelText(X.ya,X.yLabelVal,re.yhoverformat),X.yVal=X.ya.c2d(X.yLabelVal)),X.zLabelVal!==void 0&&X.zLabel===void 0&&(X.zLabel=String(X.zLabelVal)),!isNaN(X.xerr)&&!(X.xa.type==="log"&&X.xerr<=0)){var Ce=s.tickText(X.xa,X.xa.c2l(X.xerr),"hover").text;X.xerrneg!==void 0?X.xLabel+=" +"+Ce+" / -"+s.tickText(X.xa,X.xa.c2l(X.xerrneg),"hover").text:X.xLabel+=" \xB1 "+Ce,$==="x"&&(X.distance+=1)}if(!isNaN(X.yerr)&&!(X.ya.type==="log"&&X.yerr<=0)){var Ue=s.tickText(X.ya,X.ya.c2l(X.yerr),"hover").text;X.yerrneg!==void 0?X.yLabel+=" +"+Ue+" / -"+s.tickText(X.ya,X.ya.c2l(X.yerrneg),"hover").text:X.yLabel+=" \xB1 "+Ue,$==="y"&&(X.distance+=1)}var Oe=X.hoverinfo||X.trace.hoverinfo;return Oe&&Oe!=="all"&&(Oe=Array.isArray(Oe)?Oe:Oe.split("+"),Oe.indexOf("x")===-1&&(X.xLabel=void 0),Oe.indexOf("y")===-1&&(X.yLabel=void 0),Oe.indexOf("z")===-1&&(X.zLabel=void 0),Oe.indexOf("text")===-1&&(X.text=void 0),Oe.indexOf("name")===-1&&(X.name=void 0)),X}function Y(X,$,Q){var re=Q.container,ue=Q.fullLayout,pe=ue._size,ge=Q.event,Te=!!$.hLinePoint,Se=!!$.vLinePoint,Ce,Ue;if(re.selectAll(".spikeline").remove(),!!(Se||Te)){var Oe=n.combine(ue.plot_bgcolor,ue.paper_bgcolor);if(Te){var _e=$.hLinePoint,ce,ie;Ce=_e&&_e.xa,Ue=_e&&_e.ya;var se=Ue.spikesnap;se==="cursor"?(ce=ge.pointerX,ie=ge.pointerY):(ce=Ce._offset+_e.x,ie=Ue._offset+_e.y);var ne=n.color(_e.color).contrast(n.color(Oe))<1.5?n.contrast(Oe):_e.color,be=Ue.spikemode,De=Ue.spikethickness,qe=Ue.spikecolor||ne,Ne=s.getPxPosition(X,Ue),ut,ot;if(be.indexOf("toaxis")!==-1||be.indexOf("across")!==-1){if(be.indexOf("toaxis")!==-1&&(ut=Ne,ot=ce),be.indexOf("across")!==-1){var yt=Ue._counterDomainMin,At=Ue._counterDomainMax;Ue.anchor==="free"&&(yt=Math.min(yt,Ue.position),At=Math.max(At,Ue.position)),ut=pe.l+yt*pe.w,ot=pe.l+At*pe.w}re.insert("line",":first-child").attr({x1:ut,x2:ot,y1:ie,y2:ie,"stroke-width":De,stroke:qe,"stroke-dasharray":r.dashStyle(Ue.spikedash,De)}).classed("spikeline",!0).classed("crisp",!0),re.insert("line",":first-child").attr({x1:ut,x2:ot,y1:ie,y2:ie,"stroke-width":De+2,stroke:Oe}).classed("spikeline",!0).classed("crisp",!0)}be.indexOf("marker")!==-1&&re.insert("circle",":first-child").attr({cx:Ne+(Ue.side!=="right"?De:-De),cy:ie,r:De,fill:qe}).classed("spikeline",!0)}if(Se){var It=$.vLinePoint,Zt,vr;Ce=It&&It.xa,Ue=It&&It.ya;var Ut=Ce.spikesnap;Ut==="cursor"?(Zt=ge.pointerX,vr=ge.pointerY):(Zt=Ce._offset+It.x,vr=Ue._offset+It.y);var Jt=n.color(It.color).contrast(n.color(Oe))<1.5?n.contrast(Oe):It.color,at=Ce.spikemode,Ee=Ce.spikethickness,Re=Ce.spikecolor||Jt,he=s.getPxPosition(X,Ce),ye,Ie;if(at.indexOf("toaxis")!==-1||at.indexOf("across")!==-1){if(at.indexOf("toaxis")!==-1&&(ye=he,Ie=vr),at.indexOf("across")!==-1){var Fe=Ce._counterDomainMin,He=Ce._counterDomainMax;Ce.anchor==="free"&&(Fe=Math.min(Fe,Ce.position),He=Math.max(He,Ce.position)),ye=pe.t+(1-He)*pe.h,Ie=pe.t+(1-Fe)*pe.h}re.insert("line",":first-child").attr({x1:Zt,x2:Zt,y1:ye,y2:Ie,"stroke-width":Ee,stroke:Re,"stroke-dasharray":r.dashStyle(Ce.spikedash,Ee)}).classed("spikeline",!0).classed("crisp",!0),re.insert("line",":first-child").attr({x1:Zt,x2:Zt,y1:ye,y2:Ie,"stroke-width":Ee+2,stroke:Oe}).classed("spikeline",!0).classed("crisp",!0)}at.indexOf("marker")!==-1&&re.insert("circle",":first-child").attr({cx:Zt,cy:he-(Ce.side!=="top"?Ee:-Ee),r:Ee,fill:Re}).classed("spikeline",!0)}}}function ee(X,$,Q){if(!Q||Q.length!==X._hoverdata.length)return!0;for(var re=Q.length-1;re>=0;re--){var ue=Q[re],pe=X._hoverdata[re];if(ue.curveNumber!==pe.curveNumber||String(ue.pointNumber)!==String(pe.pointNumber)||String(ue.pointNumbers)!==String(pe.pointNumbers)||ue.binNumber!==pe.binNumber)return!0}return!1}function te(X,$){return!$||$.vLinePoint!==X._spikepoints.vLinePoint||$.hLinePoint!==X._spikepoints.hLinePoint}function ae(X,$){return t.plainText(X||"",{len:$,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function j(X,$){for(var Q=$.charAt(0),re=[],ue=[],pe=[],ge=0;geX.offsetTop+X.clientTop,H=X=>X.offsetLeft+X.clientLeft;function Z(X,$){var Q=X._fullLayout,re=$.getBoundingClientRect(),ue=re.left,pe=re.top,ge=ue+re.width,Te=pe+re.height,Se=v.apply3DTransform(Q._invTransform)(ue,pe),Ce=v.apply3DTransform(Q._invTransform)(ge,Te),Ue=Se[0],Oe=Se[1],_e=Ce[0],ce=Ce[1];return{x:Ue,y:Oe,width:_e-Ue,height:ce-Oe,top:Math.min(Oe,ce),left:Math.min(Ue,_e),right:Math.max(Ue,_e),bottom:Math.max(Oe,ce)}}}}),s0=xe({"src/components/fx/hoverlabel_defaults.js"(U,O){"use strict";var u=Sr(),v=wi(),w=Kf().isUnifiedHover;O.exports=function(l,e,t,a){a=a||{};var r=e.legend;function n(i){a.font[i]||(a.font[i]=r?e.legend.font[i]:e.font[i])}e&&w(e.hovermode)&&(a.font||(a.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),r?(a.bgcolor||(a.bgcolor=v.combine(e.legend.bgcolor,e.paper_bgcolor)),a.bordercolor||(a.bordercolor=e.legend.bordercolor)):a.bgcolor||(a.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",a.bgcolor),t("hoverlabel.bordercolor",a.bordercolor),t("hoverlabel.namelength",a.namelength),t("hoverlabel.showarrow",a.showarrow),u.coerceFont(t,"hoverlabel.font",a.font),t("hoverlabel.align",a.align)}}}),TA=xe({"src/components/fx/layout_global_defaults.js"(U,O){"use strict";var u=Sr(),v=s0(),w=Nh();O.exports=function(l,e){function t(a,r){return u.coerce(l,e,w,a,r)}v(l,e,t)}}}),AA=xe({"src/components/fx/defaults.js"(U,O){"use strict";var u=Sr(),v=Ld(),w=s0();O.exports=function(l,e,t,a){function r(i,s){return u.coerce(l,e,v,i,s)}var n=u.extendFlat({},a.hoverlabel);e.hovertemplate&&(n.namelength=-1),w(l,e,r,n)}}}),k_=xe({"src/components/fx/hovermode_defaults.js"(U,O){"use strict";var u=Sr(),v=Nh();O.exports=function(S,l){function e(t,a){return l[t]!==void 0?l[t]:u.coerce(S,l,v,t,a)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),MA=xe({"src/components/fx/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=Nh(),w=k_(),S=s0();O.exports=function(e,t){function a(p,f){return u.coerce(e,t,v,p,f)}var r=w(e,t);r&&(a("hoverdistance"),a("spikedistance"),r.indexOf("unified")!==-1&&a("hoversort"));var n=a("dragmode");n==="select"&&a("selectdirection");var i=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((i||s)&&c===1||i&&s&&c===2)&&(t.dragmode="pan"),S(e,t,a),u.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),SA=xe({"src/components/fx/calc.js"(U,O){"use strict";var u=Sr(),v=Ci();O.exports=function(l){var e=l.calcdata,t=l._fullLayout;function a(c){return function(p){return u.coerceHoverinfo({hoverinfo:p},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),$m=xe({"src/components/shapes/draw_newshape/constants.js"(U,O){"use strict";var u=32;O.exports={CIRCLE_SIDES:u,i000:0,i090:u/4,i180:u/2,i270:u/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Zm=xe({"src/components/selections/helpers.js"(U,O){"use strict";var u=Sr().strTranslate;function v(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function w(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function S(e){var t=e._id.charAt(0)==="y"?1:0;return function(a){return v(e,a[t])}}function l(e){return u(e.xaxis._offset,e.yaxis._offset)}O.exports={p2r:v,r2p:w,axValue:S,getTransform:l}}}),Bd=xe({"src/components/shapes/draw_newshape/helpers.js"(U){"use strict";var O=i0(),u=$m(),v=u.CIRCLE_SIDES,w=u.SQRT2,S=Zm(),l=S.p2r,e=S.r2p,t=[0,3,4,5,6,1,2],a=[0,3,4,1,2];U.writePaths=function(i){var s=i.length;if(!s)return"M0,0Z";for(var c="",p=0;p0&&b{let s=i.charAt(0),c=r[s].drawn!==void 0;return n+(c?1:0)},0)},U.getDataToPixel=function(l,e,t,a,r){var n=l._fullLayout._size,i;if(e)if(r==="domain")i=function(c){return e._length*(a?1-c:c)+e._offset};else{var s=U.shapePositionToRange(e);i=function(c){var p=S(e,t);return e._offset+e.r2p(s(c,!0))+p},e.type==="date"&&(i=U.decodeDate(i))}else a?i=function(c){return n.t+n.h*(1-c)}:i=function(c){return n.l+n.w*c};return i},U.getPixelToData=function(l,e,t,a){var r=l._fullLayout._size,n;if(e)if(a==="domain")n=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var i=U.rangeToShapePosition(e);n=function(s){return i(e.p2r(s-e._offset))}}else t?n=function(s){return 1-(s-r.t)/r.h}:n=function(s){return(s-r.l)/r.w};return n},U.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,a=Math.round(l);return t?a+.5:a},U.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},a=l._fullLayout._plots[t.xref+t.yref],r=!!a;return r?a._hadPlotinfo=!0:(a={},t.xref&&t.xref!=="paper"&&(a.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(a.yaxis=l._fullLayout[t.yref+"axis"])),a.xsizemode=t.xsizemode,a.ysizemode=t.ysizemode,a.xanchor=t.xanchor,a.yanchor=t.yanchor,{options:t,plotinfo:a}},U.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},a=l._fullLayout._plots[t.xref+t.yref],r=!!a;return r?a._hadPlotinfo=!0:(a={},t.xref&&(a.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(a.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:a}},U.getPathString=function(l,e){let t=e.type,a=v.getRefType(e.xref),r=v.getRefType(e.yref),n=l._fullLayout._size;var i,s,c,p,f,d,y,o,b,M,A,E;function g(F,I,z,R){var k;if(F)if(I==="domain")R?k=function(B){return F._offset+F._length*(1-B)}:k=function(B){return F._offset+F._length*B};else{let B=U.shapePositionToRange(F);k=function(N){return F._offset+F.r2p(B(N,!0))},z==="path"&&F.type==="date"&&(k=U.decodeDate(k))}else R?k=function(B){return n.t+n.h*(1-B)}:k=function(B){return n.l+n.w*B};return k}if(a==="array"?(y=[],i=e.xref.map(function(F){return v.getFromId(l,F)}),y=e.xref.map(function(F,I){return g(i[I],v.getRefType(F),t,!1)})):(i=v.getFromId(l,e.xref),y=g(i,a,t,!1)),r==="array"?(o=[],s=e.yref.map(function(F){return v.getFromId(l,F)}),o=e.yref.map(function(F,I){return g(s[I],v.getRefType(F),t,!0)})):(s=v.getFromId(l,e.yref),o=g(s,r,t,!0)),t==="path")return w(e,y,o);if(a==="array")c=S(i[0],e.x0shift),p=S(i[1],e.x1shift),b=y[0](e.x0)+c,M=y[1](e.x1)+p;else if(c=S(i,e.x0shift),p=S(i,e.x1shift),e.xsizemode==="pixel"){let F=y(e.xanchor);b=F+e.x0+c,M=F+e.x1+p}else b=y(e.x0)+c,M=y(e.x1)+p;if(r==="array")f=S(s[0],e.y0shift),d=S(s[1],e.y1shift),A=o[0](e.y0)+f,E=o[1](e.y1)+d;else if(f=S(s,e.y0shift),d=S(s,e.y1shift),e.ysizemode==="pixel"){let F=o(e.yanchor);A=F-e.y0+f,E=F-e.y1+d}else A=o(e.y0)+f,E=o(e.y1)+d;if(t==="line")return"M"+b+","+A+"L"+M+","+E;if(t==="rect")return"M"+b+","+A+"H"+M+"V"+E+"H"+b+"Z";var T=(b+M)/2,m=(A+E)/2,h=Math.abs(T-b),x=Math.abs(m-A),_="A"+h+","+x,D=T+h+","+m,C=T+","+(m-x);return"M"+D+_+" 0 1,1 "+C+_+" 0 0,1 "+D+"Z"};function w(l,e,t){let a=l.path,r=l.xsizemode,n=l.ysizemode,i=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),p=Array.isArray(l.yref);var f=0,d=0;return a.replace(O.segmentRE,function(y){var o=0,b=y.charAt(0),M=O.paramIsX[b],A=O.paramIsY[b],E=O.numParams[b];let g=M.drawn!==void 0,T=A.drawn!==void 0,m=c?e[f]:e,h=p?t[d]:t;var x=y.slice(1).replace(O.paramRE,function(_){return M[o]?r==="pixel"?_=m(i)+Number(_):_=m(_):A[o]&&(n==="pixel"?_=h(s)-Number(_):_=h(_)),o++,o>E&&(_="X"),_});return o>E&&(x=x.replace(/[\s,]*X.*/,""),u.log("Ignoring extra params in segment "+y)),g&&f++,T&&d++,b+x})}U.getPixelShift=S;function S(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),L_=xe({"src/components/shapes/display_labels.js"(U,O){"use strict";var u=Sr(),v=uo(),w=el(),S=go(),l=Bd().readPaths,e=Nd(),t=e.getPathString,a=jm(),r=uc().FROM_TL;O.exports=function(c,p,f,d){if(d.selectAll(".shape-label").remove(),!!(f.label.text||f.label.texttemplate)){var y;if(f.label.texttemplate){var o={};if(f.type!=="path"){var b=v.getFromId(c,f.xref),M=v.getFromId(c,f.yref);let $=Array.isArray(f.xref),Q=Array.isArray(f.yref);for(var A in a){var E=typeof a[A]=="function",g=!$||a.simpleXVariables.includes(A),T=!Q||a.simpleYVariables.includes(A);if(E&&g&&T){var m=a[A](f,b,M);m!==void 0&&(o[A]=m)}}}y=u.texttemplateStringForShapes({data:[o],fallback:f.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:f.label.texttemplate})}else y=f.label.text;var h={"data-index":p},x=f.label.font,_={"data-notex":1},D=d.append("g").attr(h).classed("shape-label",!0),C=D.append("text").attr(_).classed("shape-label-text",!0).text(y),F,I,z,R;if(f.path){var k=t(c,f),B=l(k,c);F=1/0,z=1/0,I=-1/0,R=-1/0;for(var N=0;Ne.getDataToPixel(c,se,ie,!1,ne)(ce),_e=(ce,ie,se,ne)=>e.getDataToPixel(c,se,ie,!0,ne)(ce);if(f.xsizemode==="pixel"){let ce=Oe(f.xanchor,void 0,re,Te),ie=e.getPixelShift(re,f.x0shift),se=e.getPixelShift(re,f.x1shift);F=ce+f.x0+ie,I=ce+f.x1+se}else F=Oe(f.x0,f.x0shift,re,Te),I=Oe(f.x1,f.x1shift,ue,Se);if(f.ysizemode==="pixel"){let ce=_e(f.yanchor,void 0,pe,Ce),ie=e.getPixelShift(pe,f.y0shift),se=e.getPixelShift(pe,f.y1shift);z=ce-f.y0+ie,R=ce-f.y1+se}else z=_e(f.y0,f.y0shift,pe,Ce),R=_e(f.y1,f.y1shift,ge,Ue)}var j=f.label.textangle;j==="auto"&&(f.type==="line"?j=n(F,z,I,R):j=0),C.call(function($){return $.call(S.font,x).attr({}),w.convertToTspans($,c),$});var G=S.bBox(C.node()),K=i(F,z,I,R,f,j,G),H=K.textx,Z=K.texty,X=K.xanchor;C.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[X],y:Z,x:H,transform:"rotate("+j+","+H+","+Z+")"}).call(w.positionText,H,Z)}};function n(s,c,p,f){var d,y;return y=Math.abs(p-s),p>=s?d=c-f:d=f-c,-180/Math.PI*Math.atan2(d,y)}function i(s,c,p,f,d,y,o){var b=d.label.textposition,M=d.label.textangle,A=d.label.padding,E=d.type,g=Math.PI/180*y,T=Math.sin(g),m=Math.cos(g),h=d.label.xanchor,x=d.label.yanchor,_,D,C,F;if(E==="line"){b==="start"?(_=s,D=c):b==="end"?(_=p,D=f):(_=(s+p)/2,D=(c+f)/2),h==="auto"&&(b==="start"?M==="auto"?p>s?h="left":ps?h="right":ps?h="right":ps?h="left":p1&&!(_e.length===2&&_e[1][0]==="Z")&&(j===0&&(_e[0][0]="M"),_[ae]=_e,z(),R())}}function ue(_e,ce){if(_e===2){ae=+ce.srcElement.getAttribute("data-i"),j=+ce.srcElement.getAttribute("data-j");var ie=_[ae];!y(ie)&&!o(ie)&&re()}}function pe(_e){ee=[];for(var ce=0;ce<_.length;ce++){var ie=_[ce],se=y(ie),ne=!se&&o(ie);ee[ce]=[];for(var be=ie.length,De=0;De{if(!C._dragging&&C._fullLayout.hoveranywhere){let B=R(k);B&&c.hover(C,B,I.id)}}),z.addEventListener("click",k=>{if(!C._dragged&&C._fullLayout.clickanywhere){let B=R(k);B&&c.click(C,B,I.id)}})}function g(C,F,I){let z=I.xref,R=I.yref;if(Array.isArray(z)||Array.isArray(R)){let k="clip"+F._fullLayout._uid+"shape"+I._index,B=T(F,z,R);w.ensureSingleById(F._fullLayout._clips,"clipPath",k,function(N){N.append("rect")}).select("rect").attr(B),n.setClipUrl(C,k,F)}else{let k=(z+R).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");n.setClipUrl(C,k?"clip"+F._fullLayout._uid+k:null,F)}}function T(C,F,I){let z=C._fullLayout._size;function R(N,q){let Y=(Array.isArray(N)?N:[N]).map(ae=>S.getFromId(C,ae)).filter(Boolean);if(!Y.length)return q?[z.t,z.t+z.h]:[z.l,z.l+z.w];let ee=Y.map(function(ae){return ae._offset}),te=Y.map(function(ae){return ae._offset+ae._length});return[Math.min(...ee),Math.max(...te)]}let k=R(F,!1),B=R(I,!0);return{x:k[0],y:B[0],width:k[1]-k[0],height:B[1]-B[0]}}function m(C,F,I,z,R,k){var B=10,N=10,q=I.xsizemode==="pixel",Y=I.ysizemode==="pixel",ee=I.type==="line",te=I.type==="path",ae=k.modifyItem,j,G,K,H,Z,X,$,Q,re,ue,pe,ge,Te,Se,Ce,Ue=u.select(F.node().parentNode),Oe=S.getFromId(C,I.xref),_e=S.getRefType(I.xref),ce=S.getFromId(C,I.yref),ie=S.getRefType(I.yref),se=I.x0shift,ne=I.x1shift,be=I.y0shift,De=I.y1shift,qe=function(He,We){var pt=d.getDataToPixel(C,Oe,We,!1,_e);return pt(He)},Ne=function(He,We){var pt=d.getDataToPixel(C,ce,We,!0,ie);return pt(He)},ut=d.getPixelToData(C,Oe,!1,_e),ot=d.getPixelToData(C,ce,!0,ie),yt=Zt(),At={element:yt.node(),gd:C,prepFn:Jt,doneFn:at,clickFn:Ee},It;s.init(At),yt.node().onmousemove=Ut;function Zt(){return ee?vr():F}function vr(){var He=10,We=Math.max(I.line.width,He),pt=R.append("g").attr("data-index",z).attr("drag-helper",!0);pt.append("path").attr("d",F.attr("d")).style({cursor:"move","stroke-width":We,"stroke-opacity":"0"});var ct={"fill-opacity":"0"},ft=Math.max(We/2,He);return pt.append("circle").attr({"data-line-point":"start-point",cx:q?qe(I.xanchor)+I.x0:qe(I.x0,se),cy:Y?Ne(I.yanchor)-I.y0:Ne(I.y0,be),r:ft}).style(ct).classed("cursor-grab",!0),pt.append("circle").attr({"data-line-point":"end-point",cx:q?qe(I.xanchor)+I.x1:qe(I.x1,ne),cy:Y?Ne(I.yanchor)-I.y1:Ne(I.y1,De),r:ft}).style(ct).classed("cursor-grab",!0),pt}function Ut(He){if(b(C)){It=null;return}if(ee)He.target.tagName==="path"?It="move":It=He.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var We=At.element.getBoundingClientRect(),pt=We.right-We.left,ct=We.bottom-We.top,ft=He.clientX-We.left,mt=He.clientY-We.top,_t=!te&&pt>B&&ct>N&&!He.shiftKey?s.getCursor(ft/pt,1-mt/ct):"move";p(F,_t),It=_t.split("-")[0]}}function Jt(He){b(C)||(q&&(Z=qe(I.xanchor)),Y&&(X=Ne(I.yanchor)),I.type==="path"?Ce=I.path:(j=q?I.x0:qe(I.x0),G=Y?I.y0:Ne(I.y0),K=q?I.x1:qe(I.x1),H=Y?I.y1:Ne(I.y1)),jH?($=G,pe="y0",Q=H,ge="y1"):($=H,pe="y1",Q=G,ge="y0"),Ut(He),ye(R,I),Fe(F,I,C),At.moveFn=It==="move"?Re:he,At.altKey=He.altKey)}function at(){b(C)||(p(F),Ie(R),g(F,C,I),v.call("_guiRelayout",C,k.getUpdateObj()))}function Ee(){b(C)||Ie(R)}function Re(He,We){if(I.type==="path"){var pt=function(mt){return mt},ct=pt,ft=pt;q?ae("xanchor",I.xanchor=ut(Z+He)):(ct=function(_t){return ut(qe(_t)+He)},Oe&&Oe.type==="date"&&(ct=d.encodeDate(ct))),Y?ae("yanchor",I.yanchor=ot(X+We)):(ft=function(_t){return ot(Ne(_t)+We)},ce&&ce.type==="date"&&(ft=d.encodeDate(ft))),ae("path",I.path=h(Ce,ct,ft))}else q?ae("xanchor",I.xanchor=ut(Z+He)):(ae("x0",I.x0=ut(j+He)),ae("x1",I.x1=ut(K+He))),Y?ae("yanchor",I.yanchor=ot(X+We)):(ae("y0",I.y0=ot(G+We)),ae("y1",I.y1=ot(H+We)));F.attr("d",y(C,I)),ye(R,I),t(C,z,I,Ue)}function he(He,We){if(te){var pt=function(Va){return Va},ct=pt,ft=pt;q?ae("xanchor",I.xanchor=ut(Z+He)):(ct=function(Oa){return ut(qe(Oa)+He)},Oe&&Oe.type==="date"&&(ct=d.encodeDate(ct))),Y?ae("yanchor",I.yanchor=ot(X+We)):(ft=function(Oa){return ot(Ne(Oa)+We)},ce&&ce.type==="date"&&(ft=d.encodeDate(ft))),ae("path",I.path=h(Ce,ct,ft))}else if(ee){if(It==="resize-over-start-point"){var mt=j+He,_t=Y?G-We:G+We;ae("x0",I.x0=q?mt:ut(mt)),ae("y0",I.y0=Y?_t:ot(_t))}else if(It==="resize-over-end-point"){var Bt=K+He,Et=Y?H-We:H+We;ae("x1",I.x1=q?Bt:ut(Bt)),ae("y1",I.y1=Y?Et:ot(Et))}}else{var hr=function(Va){return It.indexOf(Va)!==-1},$r=hr("n"),ca=hr("s"),na=hr("w"),wa=hr("e"),pa=$r?$+We:$,fa=ca?Q+We:Q,za=na?re+He:re,Ia=wa?ue+He:ue;Y&&($r&&(pa=$-We),ca&&(fa=Q-We)),(!Y&&fa-pa>N||Y&&pa-fa>N)&&(ae(pe,I[pe]=Y?pa:ot(pa)),ae(ge,I[ge]=Y?fa:ot(fa))),Ia-za>B&&(ae(Te,I[Te]=q?za:ut(za)),ae(Se,I[Se]=q?Ia:ut(Ia)))}F.attr("d",y(C,I)),ye(R,I),t(C,z,I,Ue)}function ye(He,We){(q||Y)&&pt();function pt(){var ct=We.type!=="path",ft=He.selectAll(".visual-cue").data([0]),mt=1;ft.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":mt}).classed("visual-cue",!0);var _t=qe(q?We.xanchor:w.midRange(ct?[We.x0,We.x1]:d.extractPathCoords(We.path,f.paramIsX))),Bt=Ne(Y?We.yanchor:w.midRange(ct?[We.y0,We.y1]:d.extractPathCoords(We.path,f.paramIsY)));if(_t=d.roundPositionForSharpStrokeRendering(_t,mt),Bt=d.roundPositionForSharpStrokeRendering(Bt,mt),q&&Y){var Et="M"+(_t-1-mt)+","+(Bt-1-mt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ft.attr("d",Et)}else if(q){var hr="M"+(_t-1-mt)+","+(Bt-9-mt)+"v18 h2 v-18 Z";ft.attr("d",hr)}else{var $r="M"+(_t-9-mt)+","+(Bt-1-mt)+"h18 v2 h-18 Z";ft.attr("d",$r)}}}function Ie(He){He.selectAll(".visual-cue").remove()}function Fe(He,We,pt){var ct=We.xref,ft=We.yref,mt=S.getFromId(pt,ct),_t=S.getFromId(pt,ft),Bt="";ct!=="paper"&&!mt.autorange&&(Bt+=ct),ft!=="paper"&&!_t.autorange&&(Bt+=ft),n.setClipUrl(He,Bt?"clip"+pt._fullLayout._uid+Bt:null,pt)}}function h(C,F,I){return C.replace(f.segmentRE,function(z){var R=0,k=z.charAt(0),B=f.paramIsX[k],N=f.paramIsY[k],q=f.numParams[k],Y=z.slice(1).replace(f.paramRE,function(ee){return R>=q||(B[R]?ee=F(ee):N[R]&&(ee=I(ee)),R++),ee});return k+Y})}function x(C,F){if(M(C)){var I=F.node(),z=+I.getAttribute("data-index");if(z>=0){if(z===C._fullLayout._activeShapeIndex){_(C);return}C._fullLayout._activeShapeIndex=z,C._fullLayout._deactivateShape=_,o(C)}}}function _(C){if(M(C)){var F=C._fullLayout._activeShapeIndex;F>=0&&(a(C),delete C._fullLayout._activeShapeIndex,o(C))}}function D(C){if(M(C)){a(C);var F=C._fullLayout._activeShapeIndex,I=(C.layout||{}).shapes||[];if(F-K),[q,Y]=R.invert(z.midPt),{minscale:ee}=I.projection,te=(m=I.projection.maxscale)!=null?m:1/0,ae=Math.min(ee,te),j=Math.max(ee,te),G=_==="in"?f*k:1/f*k;G>j?G=j:GR_});var tg,D_,R_,F_=Pr({"src/components/modebar/attributes.ts"(){"use strict";tg=da(I_()),D_={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["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`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${tg.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${tg.default.foreButtons.join("*, *")}*.`].join(" ")}},R_=D_}}),CA=xe({"src/components/modebar/defaults.js"(U,O){"use strict";var u=Sr(),v=wi(),w=Cs(),S=(F_(),Ta(eg)).default;O.exports=function(e,t){var a=e.modebar||{},r=w.newContainer(t,"modebar");function n(s,c){return u.coerce(a,r,S,s,c)}n("orientation"),n("bgcolor",v.addOpacity(t.paper_bgcolor,.5));var i=v.contrast(v.rgb(t.modebar.bgcolor));n("color",v.addOpacity(i,.3)),n("activecolor",v.addOpacity(i,.7)),n("uirevision",t.uirevision),n("add"),n("remove")}}}),LA=xe({"src/components/modebar/modebar.js"(U,O){"use strict";var u=Na(),v=yn(),w=Sr(),S=Xm(),l=Ja().version,e=new DOMParser;function t(i){this.container=i.container,this.element=document.createElement("div"),this.update(i.graphInfo,i.buttons),this.container.appendChild(this.element)}var a=t.prototype;a.update=function(i,s){this.graphInfo=i;var c=this.graphInfo._context,p=this.graphInfo._fullLayout,f="modebar-"+p._uid;this.element.setAttribute("id",f),this.element.setAttribute("role","toolbar"),this._uid=f,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),p.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var d=p.modebar,y="#"+f+" .modebar-group";document.querySelectorAll(y).forEach(function(E){E.style.backgroundColor=d.bgcolor});var o=!this.hasButtons(s),b=this.hasLogo!==c.displaylogo,M=this.locale!==c.locale;if(this.locale=c.locale,(o||b||M)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var A=this.getLogo();c.watermark&&(A.className=A.className+" watermark"),p.modebar.orientation==="v"?this.element.insertBefore(A,this.element.childNodes[0]):this.element.appendChild(A),this.hasLogo=!0}this.updateActiveButton(),w.setStyleOnHover("#"+f+" .modebar-btn",".active",".icon path","fill: "+d.activecolor,"fill: "+d.color,this.element)},a.updateButtons=function(i){var s=this;this.buttons=i,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var p=s.createGroup();c.forEach(function(f){var d=f.name;if(!d)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(d)!==-1)throw new Error("button name '"+d+"' is taken");s.buttonsNames.push(d);var y=s.createButton(f);s.buttonElements.push(y),p.appendChild(y)}),s.element.appendChild(p)})},a.createGroup=function(){var i=document.createElement("div");i.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return i.style.backgroundColor=s.bgcolor,i},a.createButton=function(i){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var p=i.title;p===void 0?p=i.name:typeof p=="function"&&(p=p(this.graphInfo)),(p||p===0)&&(c.setAttribute("data-title",p),c.setAttribute("aria-label",p)),i.attr!==void 0&&c.setAttribute("data-attr",i.attr);var f=i.val;f!==void 0&&(typeof f=="function"&&(f=f(this.graphInfo)),c.setAttribute("data-val",f));var d=i.click;if(typeof d!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(o){i.click(s.graphInfo,o),s.updateActiveButton(o.currentTarget)}),c.setAttribute("data-toggle",i.toggle||!1),i.toggle&&u.select(c).classed("active",!0);var y=i.icon;return typeof y=="function"?c.appendChild(y()):c.appendChild(this.createIcon(y||S.question)),c.setAttribute("data-gravity",i.gravity||"n"),c},a.createIcon=function(i){var s=v(i.height)?Number(i.height):i.ascent-i.descent,c="http://www.w3.org/2000/svg",p;if(i.path){p=document.createElementNS(c,"svg"),p.setAttribute("viewBox",[0,0,i.width,s].join(" ")),p.setAttribute("class","icon");var f=document.createElementNS(c,"path");f.setAttribute("d",i.path),i.transform?f.setAttribute("transform",i.transform):i.ascent!==void 0&&f.setAttribute("transform","matrix(1 0 0 -1 0 "+i.ascent+")"),p.appendChild(f)}if(i.svg){var d=e.parseFromString(i.svg,"application/xml");p=d.childNodes[0]}return p.setAttribute("height","1em"),p.setAttribute("width","1em"),p},a.updateActiveButton=function(i){var s=this.graphInfo._fullLayout,c=i!==void 0?i.getAttribute("data-attr"):null;this.buttonElements.forEach(function(p){var f=p.getAttribute("data-val")||!0,d=p.getAttribute("data-attr"),y=p.getAttribute("data-toggle")==="true",o=u.select(p),b=function(E,g){var T=s.modebar,m=E.querySelector(".icon path");m&&(g||E.matches(":hover")?m.style.fill=T.activecolor:m.style.fill=T.color)};if(y){if(d===c){var M=!o.classed("active");o.classed("active",M),b(p,M)}}else{var A=d===null?d:w.nestedProperty(s,d).get();o.classed("active",A===f),b(p,A===f)}})},a.hasButtons=function(i){var s=this.buttons;if(!s||i.length!==s.length)return!1;for(var c=0;c1?(ee=["toggleHover"],te=["resetViews"]):h?(Y=["zoomInGeo","zoomOutGeo"],ee=["hoverClosestGeo"],te=["resetGeo"]):m?(ee=["hoverClosest3d"],te=["resetCameraDefault3d","resetCameraLastSave3d"]):C?(Y=["zoomInMap","zoomOutMap"],ee=["toggleHover"],te=["resetViewMap"]):x?ee=["hoverClosestPie"]:z?(ee=["hoverClosestCartesian","hoverCompareCartesian"],te=["resetViewSankey"]):ee=["toggleHover"],T&&ee.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(y)||k)&&(ee=[]),T&&!R&&(Y=["zoomIn2d","zoomOut2d","autoScale2d"],te[0]!=="resetViews"&&(te=["resetScale2d"])),m?ae=["zoom3d","pan3d","orbitRotation","tableRotation"]:T&&!R||D?ae=["zoom2d","pan2d"]:C||h?ae=["pan2d"]:F&&(ae=["zoom2d"]),i(y)&&ae.push("select2d","lasso2d");var j=[],G=function(X){j.indexOf(X)===-1&&ee.indexOf(X)!==-1&&j.push(X)};if(Array.isArray(E)){for(var K=[],H=0;HM?y.slice(M):o.slice(b))+A}function c(f,d){for(var y=d._size,o=y.h/y.w,b={},M=Object.keys(f),A=0;Ae*D&&!z)){for(M=0;Mj&&rete&&(te=re);var pe=(te-ee)/(2*ae);h/=pe,ee=g.l2r(ee),te=g.l2r(te),g.range=g._input.range=N=R[1]||q[1]<=R[0])&&Y[0]k[0])return!0}return!1}function A(R){var k=R._fullLayout,B=k._size,N=B.p,q=n.list(R,"",!0),Y,ee,te,ae,j,G;if(k._paperdiv.style({width:R._context.responsive&&k.autosize&&!R._context._hasZeroWidth&&!R.layout.width?"100%":k.width+"px",height:R._context.responsive&&k.autosize&&!R._context._hasZeroHeight&&!R.layout.height?"100%":k.height+"px"}).selectAll(".main-svg").call(t.setSize,k.width,k.height),R._context.setBackground(R,k.paper_bgcolor),U.drawMainTitle(R),r.manage(R),!k._has("cartesian"))return v.previousPromises(R);function K(he,ye,Ie){var Fe=he._lw/2;if(he._id.charAt(0)==="x"){if(ye){if(Ie==="top")return ye._offset-N-Fe}else return B.t+B.h*(1-(he.position||0))+Fe%1;return ye._offset+ye._length+N+Fe}if(ye){if(Ie==="right")return ye._offset+ye._length+N+Fe}else return B.l+B.w*(he.position||0)+Fe%1;return ye._offset-N-Fe}for(Y=0;Y0){_(R,Y,j,ae),te.attr({x:ee,y:Y,"text-anchor":N,dy:F(k.yanchor)}).call(S.positionText,ee,Y);var G=(k.text.match(S.BR_TAG_ALL)||[]).length;if(G){var K=i.LINE_SPACING*G+i.MID_SHIFT;k.y===0&&(K=-K),te.selectAll(".line").each(function(){var Q=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",Q)})}var H=O.select(R).selectAll(".gtitle-subtitle");if(H.node()){var Z=te.node().getBBox(),X=Z.y+Z.height,$=X+a.SUBTITLE_PADDING_EM*k.subtitle.font.size;H.attr({x:ee,y:$,"text-anchor":N,dy:F(k.yanchor)}).call(S.positionText,ee,$)}}}};function m(R,k,B,N,q){var Y=k.yref==="paper"?R._fullLayout._size.h:R._fullLayout.height,ee=w.isTopAnchor(k)?N:N-q,te=B==="b"?Y-ee:ee;return w.isTopAnchor(k)&&B==="t"||w.isBottomAnchor(k)&&B==="b"?!1:te.5?"t":"b",ee=R._fullLayout.margin[Y],te=0;return k.yref==="paper"?te=B+k.pad.t+k.pad.b:k.yref==="container"&&(te=h(Y,N,q,R._fullLayout.height,B)+k.pad.t+k.pad.b),te>ee?te:0}function _(R,k,B,N){var q="title.automargin",Y=R._fullLayout.title,ee=Y.y>.5?"t":"b",te={x:Y.x,y:Y.y,t:0,b:0},ae={};Y.yref==="paper"&&m(R,Y,ee,k,N)?te[ee]=B:Y.yref==="container"&&(ae[ee]=B,R._fullLayout._reservedMargin[q]=ae),v.allowAutoMargin(R,q),v.autoMargin(R,q,te)}function D(R,k){var B=R.title,N=R._size,q=0;switch(k===d?q=B.pad.l:k===o&&(q=-B.pad.r),B.xref){case"paper":return N.l+N.w*B.x+q;case"container":default:return R.width*B.x+q}}function C(R,k){var B=R.title,N=R._size,q=0;if(k==="0em"||!k?q=-B.pad.b:k===i.CAP_SHIFT+"em"&&(q=B.pad.t),B.y==="auto")return N.t/2;switch(B.yref){case"paper":return N.t+N.h-N.h*B.y+q;case"container":default:return R.height-R.height*B.y+q}}function F(R){return R==="top"?i.CAP_SHIFT+.3+"em":R==="bottom"?"-0.3em":i.MID_SHIFT+"em"}function I(R){var k=R.title,B=y;return w.isRightAnchor(k)?B=o:w.isLeftAnchor(k)&&(B=d),B}function z(R){var k=R.title,B="0em";return w.isTopAnchor(k)?B=i.CAP_SHIFT+"em":w.isMiddleAnchor(k)&&(B=i.MID_SHIFT+"em"),B}U.doTraceStyle=function(R){var k=R.calcdata,B=[],N;for(N=0;N=0;I--){var z=E.append("path").attr(T).style("opacity",I?.1:m).call(S.stroke,x).call(S.fill,h).call(l.dashLine,I?"solid":D,I?4+_:_);if(s(z,d,b),C){var R=e(d.layout,"selections",b);z.style({cursor:"move"});var k={element:z.node(),plotinfo:M,gd:d,editHelpers:R,isActiveSelection:!0},B=u(g,d);v(B,z,k)}else z.style("pointer-events",I?"all":"none");F[I]=z}var N=F[0],q=F[1];q.node().addEventListener("click",function(){return c(d,N)})}}function s(d,y,o){var b=o.xref+o.yref;l.setClipUrl(d,"clip"+y._fullLayout._uid+b,y)}function c(d,y){if(n(d)){var o=y.node(),b=+o.getAttribute("data-index");if(b>=0){if(b===d._fullLayout._activeSelectionIndex){f(d);return}d._fullLayout._activeSelectionIndex=b,d._fullLayout._deactivateSelection=f,r(d)}}}function p(d){if(n(d)){var y=d._fullLayout.selections.length-1;d._fullLayout._activeSelectionIndex=y,d._fullLayout._deactivateSelection=f,r(d)}}function f(d){if(n(d)){var y=d._fullLayout._activeSelectionIndex;y>=0&&(w(d),delete d._fullLayout._activeSelectionIndex,r(d))}}}}),IA=xe({"node_modules/polybooljs/lib/build-log.js"(U,O){function u(){var v,w=0,S=!1;function l(e,t){return v.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),v}return v={list:[],segmentId:function(){return w++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,a){return l("temp_status",{seg:e,above:t,below:a})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,a){return l("status",{seg:e,above:t,below:a})},vert:function(e){return e===S?v:(S=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},v}O.exports=u}}),DA=xe({"node_modules/polybooljs/lib/epsilon.js"(U,O){function u(v){typeof v!="number"&&(v=1e-10);var w={epsilon:function(S){return typeof S=="number"&&(v=S),v},pointAboveOrOnLine:function(S,l,e){var t=l[0],a=l[1],r=e[0],n=e[1],i=S[0],s=S[1];return(r-t)*(s-a)-(n-a)*(i-t)>=-v},pointBetween:function(S,l,e){var t=S[1]-l[1],a=e[0]-l[0],r=S[0]-l[0],n=e[1]-l[1],i=r*a+t*n;if(i-v)},pointsSameX:function(S,l){return Math.abs(S[0]-l[0])v!=r-t>v&&(a-s)*(t-c)/(r-c)+s-e>v&&(n=!n),a=s,r=c}return n}};return w}O.exports=u}}),RA=xe({"node_modules/polybooljs/lib/linked-list.js"(U,O){var u={create:function(){var v={root:{root:!0,next:null},exists:function(w){return!(w===null||w===v.root)},isEmpty:function(){return v.root.next===null},getHead:function(){return v.root.next},insertBefore:function(w,S){for(var l=v.root,e=v.root.next;e!==null;){if(S(e)){w.prev=e.prev,w.next=e,e.prev.next=w,e.prev=w;return}l=e,e=e.next}l.next=w,w.prev=l,w.next=null},findTransition:function(w){for(var S=v.root,l=v.root.next;l!==null&&!w(l);)S=l,l=l.next;return{before:S===v.root?null:S,after:l,insert:function(e){return e.prev=S,e.next=l,S.next=e,l!==null&&(l.prev=e),e}}}};return v},node:function(v){return v.prev=null,v.next=null,v.remove=function(){v.prev.next=v.next,v.next&&(v.next.prev=v.prev),v.prev=null,v.next=null},v}};O.exports=u}}),FA=xe({"node_modules/polybooljs/lib/intersecter.js"(U,O){var u=RA();function v(w,S,l){function e(y,o){return{id:l?l.segmentId():-1,start:y,end:o,myFill:{above:null,below:null},otherFill:null}}function t(y,o,b){return{id:l?l.segmentId():-1,start:y,end:o,myFill:{above:b.myFill.above,below:b.myFill.below},otherFill:null}}var a=u.create();function r(y,o,b,M,A,E){var g=S.pointsCompare(o,A);return g!==0?g:S.pointsSame(b,E)?0:y!==M?y?1:-1:S.pointAboveOrOnLine(b,M?A:E,M?E:A)?1:-1}function n(y,o){a.insertBefore(y,function(b){var M=r(y.isStart,y.pt,o,b.isStart,b.pt,b.other.pt);return M<0})}function i(y,o){var b=u.node({isStart:!0,pt:y.start,seg:y,primary:o,other:null,status:null});return n(b,y.end),b}function s(y,o,b){var M=u.node({isStart:!1,pt:o.end,seg:o,primary:b,other:y,status:null});y.other=M,n(M,y.pt)}function c(y,o){var b=i(y,o);return s(b,y,o),b}function p(y,o){l&&l.segmentChop(y.seg,o),y.other.remove(),y.seg.end=o,y.other.pt=o,n(y.other,y.pt)}function f(y,o){var b=t(o,y.seg.end,y.seg);return p(y,o),c(b,y.primary)}function d(y,o){var b=u.create();function M(R,k){var B=R.seg.start,N=R.seg.end,q=k.seg.start,Y=k.seg.end;return S.pointsCollinear(B,q,Y)?S.pointsCollinear(N,q,Y)||S.pointAboveOrOnLine(N,q,Y)?1:-1:S.pointAboveOrOnLine(B,q,Y)?1:-1}function A(R){return b.findTransition(function(k){var B=M(R,k.ev);return B>0})}function E(R,k){var B=R.seg,N=k.seg,q=B.start,Y=B.end,ee=N.start,te=N.end;l&&l.checkIntersection(B,N);var ae=S.linesIntersect(q,Y,ee,te);if(ae===!1){if(!S.pointsCollinear(q,Y,ee)||S.pointsSame(q,te)||S.pointsSame(Y,ee))return!1;var j=S.pointsSame(q,ee),G=S.pointsSame(Y,te);if(j&&G)return k;var K=!j&&S.pointBetween(q,ee,te),H=!G&&S.pointBetween(Y,ee,te);if(j)return H?f(k,Y):f(R,te),k;K&&(G||(H?f(k,Y):f(R,te)),f(k,q))}else ae.alongA===0&&(ae.alongB===-1?f(R,ee):ae.alongB===0?f(R,ae.pt):ae.alongB===1&&f(R,te)),ae.alongB===0&&(ae.alongA===-1?f(k,q):ae.alongA===0?f(k,ae.pt):ae.alongA===1&&f(k,Y));return!1}for(var g=[];!a.isEmpty();){var T=a.getHead();if(l&&l.vert(T.pt[0]),T.isStart){let R=function(){if(x){var k=E(T,x);if(k)return k}return _?E(T,_):!1};var m=R;l&&l.segmentNew(T.seg,T.primary);var h=A(T),x=h.before?h.before.ev:null,_=h.after?h.after.ev:null;l&&l.tempStatus(T.seg,x?x.seg:!1,_?_.seg:!1);var D=R();if(D){if(w){var C;T.seg.myFill.below===null?C=!0:C=T.seg.myFill.above!==T.seg.myFill.below,C&&(D.seg.myFill.above=!D.seg.myFill.above)}else D.seg.otherFill=T.seg.myFill;l&&l.segmentUpdate(D.seg),T.other.remove(),T.remove()}if(a.getHead()!==T){l&&l.rewind(T.seg);continue}if(w){var C;T.seg.myFill.below===null?C=!0:C=T.seg.myFill.above!==T.seg.myFill.below,_?T.seg.myFill.below=_.seg.myFill.above:T.seg.myFill.below=y,C?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var F;_?T.primary===_.primary?F=_.seg.otherFill.above:F=_.seg.myFill.above:F=T.primary?o:y,T.seg.otherFill={above:F,below:F}}l&&l.status(T.seg,x?x.seg:!1,_?_.seg:!1),T.other.status=h.insert(u.node({ev:T}))}else{var I=T.status;if(I===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(b.exists(I.prev)&&b.exists(I.next)&&E(I.prev.ev,I.next.ev),l&&l.statusRemove(I.ev.seg),I.remove(),!T.primary){var z=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=z}g.push(T.seg)}a.getHead().remove()}return l&&l.done(),g}return w?{addRegion:function(y){for(var o,b=y[y.length-1],M=0;Mt!=f>t&&e<(p-s)*(t-c)/(f-c)+s;d&&(a=!a)}return a}}}),f0=xe({"src/lib/polygon.js"(U,O){"use strict";var u=Um().dot,v=Gn().BADNUM,w=O.exports={};w.tester=function(l){var e=l.slice(),t=e[0][0],a=t,r=e[0][1],n=r,i;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),i=1;ia||A===v||An||b&&c(o))}function f(o,b){var M=o[0],A=o[1];if(M===v||Ma||A===v||An)return!1;var E=e.length,g=e[0][0],T=e[0][1],m=0,h,x,_,D,C;for(h=1;hMath.max(x,g)||A>Math.max(_,T)))if(Ai||Math.abs(u(f,c))>a)return!0;return!1},w.filter=function(l,e){var t=[l[0]],a=0,r=0;function n(s){l.push(s);var c=t.length,p=a;t.splice(r+1);for(var f=p+1;f1){var i=l.pop();n(i)}return{addPt:n,raw:l,filtered:t}}}}),jA=xe({"src/components/selections/constants.js"(U,O){"use strict";O.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),qA=xe({"src/components/selections/select.js"(U,O){"use strict";var u=OA(),v=UA(),w=Ci(),S=go().dashStyle,l=wi(),e=hu(),t=Kf().makeEventData,a=Uh(),r=a.freeMode,n=a.rectMode,i=a.drawMode,s=a.openMode,c=a.selectMode,p=Nd(),f=u0(),d=Jm(),y=Dd().clearOutline,o=Bd(),b=o.handleEllipse,M=o.readPaths,A=Km().newShapes,E=C_(),g=N_().activateLastSelection,T=Sr(),m=T.sorterAsc,h=f0(),x=Hm(),_=fu().getFromId,D=l0(),C=c0().redrawReglTraces,F=jA(),I=F.MINSELECT,z=h.filter,R=h.tester,k=Zm(),B=k.p2r,N=k.axValue,q=k.getTransform;function Y(Ee){return Ee.subplot!==void 0}function ee(Ee,Re,he,ye,Ie){var Fe=!Y(ye),He=r(Ie),We=n(Ie),pt=s(Ie),ct=i(Ie),ft=c(Ie),mt=Ie==="drawline",_t=Ie==="drawcircle",Bt=mt||_t,Et=ye.gd,hr=Et._fullLayout,$r=ft&&hr.newselection.mode==="immediate"&&Fe,ca=hr._zoomlayer,na=ye.element.getBoundingClientRect(),wa=ye.plotinfo,pa=q(wa),fa=Re-na.left,za=he-na.top;hr._calcInverseTransform(Et);var Ia=T.apply3DTransform(hr._invTransform)(fa,za);fa=Ia[0],za=Ia[1];var Va=hr._invScaleX,Oa=hr._invScaleY,tn=fa,ka=za,oi="M"+fa+","+za,$n=ye.xaxes[0],bn=ye.yaxes[0],ci=$n._length,hi=bn._length,Pi=Ee.altKey&&!(i(Ie)&&pt),Jn,Ti,_n,Ln,ji,Zi,un;H(Ee,Et,ye),He&&(Jn=z([[fa,za]],F.BENDPX));var rn=ca.selectAll("path.select-outline-"+wa.id).data([1]),nt=ct?hr.newshape:hr.newselection;ct&&(ye.hasText=nt.label.text||nt.label.texttemplate);var Ke=ct&&!pt?nt.fillcolor:"rgba(0,0,0,0)",Qt=nt.line.color||(Fe?l.contrast(Et._fullLayout.plot_bgcolor):"#7f7f7f");rn.enter().append("path").attr("class","select-outline select-outline-"+wa.id).style({opacity:ct?nt.opacity/2:1,"stroke-dasharray":S(nt.line.dash,nt.line.width),"stroke-width":nt.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,Qt).call(l.fill,Ke).attr("fill-rule","evenodd").classed("cursor-move",!!ct).attr("transform",pa).attr("d",oi+"Z");var Xt=ca.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",pa).attr("d","M0,0Z");if(ct&&ye.hasText){var nr=ca.select(".label-temp");nr.empty()&&(nr=ca.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var cr=hr._uid+F.SELECTID,rr=[],Ze=re(Et,ye.xaxes,ye.yaxes,ye.subplot);$r&&!Ee.shiftKey&&(ye._clearSubplotSelections=function(){if(Fe){var Vt=$n._id,er=bn._id;qe(Et,Vt,er,Ze);for(var Tr=(Et.layout||{}).selections||[],jr=[],Fr=!1,kr=0;kr=0){Et._fullLayout._deactivateShape(Et);return}if(!ct){var Tr=hr.clickmode;x.done(cr).then(function(){if(x.clear(cr),Vt===2){for(rn.remove(),ji=0;ji-1&&te(er,Et,ye.xaxes,ye.yaxes,ye.subplot,ye,rn),Tr==="event"&&Jt(Et,void 0);e.click(Et,er,wa.id)}).catch(T.error)}},ye.doneFn=function(){Xt.remove(),x.done(cr).then(function(){x.clear(cr),!$r&&Ln&&ye.selectionDefs&&(Ln.subtract=Pi,ye.selectionDefs.push(Ln),ye.mergedPolygons.length=0,[].push.apply(ye.mergedPolygons,_n)),($r||ct)&&$(ye,$r),ye.doneFnCompleted&&ye.doneFnCompleted(rr),ft&&Jt(Et,un)}).catch(T.error)}}function te(Ee,Re,he,ye,Ie,Fe,He){var We=Re._hoverdata,pt=Re._fullLayout,ct=pt.clickmode,ft=ct.indexOf("event")>-1,mt=[],_t,Bt,Et,hr,$r,ca,na,wa,pa,fa;if(pe(We)){H(Ee,Re,Fe),_t=re(Re,he,ye,Ie);var za=ge(We,_t),Ia=za.pointNumbers.length>0;if(Ia?Se(_t,za):Ce(_t)&&(na=Te(za))){for(He&&He.remove(),fa=0;fa<_t.length;fa++)Bt=_t[fa],Bt._module.selectPoints(Bt,!1);Ue(Re,_t),$(Fe),ft&&at(Re)}else{wa=Ee.shiftKey&&(na!==void 0?na:Te(za)),Et=ae(za.pointNumber,za.searchInfo,wa);var Va=Fe.selectionDefs.concat([Et]);for(hr=K(Va,hr),fa=0;fa<_t.length;fa++)if($r=_t[fa]._module.selectPoints(_t[fa],hr),ca=ce($r,_t[fa]),mt.length)for(var Oa=0;Oa=0}function X(Ee){return Ee._fullLayout._activeSelectionIndex>=0}function $(Ee,Re){var he=Ee.dragmode,ye=Ee.plotinfo,Ie=Ee.gd;Z(Ie)&&Ie._fullLayout._deactivateShape(Ie),X(Ie)&&Ie._fullLayout._deactivateSelection(Ie);var Fe=Ie._fullLayout,He=Fe._zoomlayer,We=i(he),pt=c(he);if(We||pt){var ct=He.selectAll(".select-outline-"+ye.id);if(ct&&Ie._fullLayout._outlining){var ft;We&&(ft=A(ct,Ee)),ft&&w.call("_guiRelayout",Ie,{shapes:ft});var mt;pt&&!Y(Ee)&&(mt=E(ct,Ee)),mt&&(Ie._fullLayout._noEmitSelectedAtStart=!0,w.call("_guiRelayout",Ie,{selections:mt}).then(function(){Re&&g(Ie)})),Ie._fullLayout._outlining=!1}}ye.selection={},ye.selection.selectionDefs=Ee.selectionDefs=[],ye.selection.mergedPolygons=Ee.mergedPolygons=[]}function Q(Ee){return Ee._id}function re(Ee,Re,he,ye){if(!Ee.calcdata)return[];var Ie=[],Fe=Re.map(Q),He=he.map(Q),We,pt,ct;for(ct=0;ct0,Fe=Ie?ye[0]:he;return Re.selectedpoints?Re.selectedpoints.indexOf(Fe)>-1:!1}function Se(Ee,Re){var he=[],ye,Ie,Fe,He;for(He=0;He0&&he.push(ye);if(he.length===1&&(Fe=he[0]===Re.searchInfo,Fe&&(Ie=Re.searchInfo.cd[0].trace,Ie.selectedpoints.length===Re.pointNumbers.length))){for(He=0;He1||(Re+=ye.selectedpoints.length,Re>1)))return!1;return Re===1}function Ue(Ee,Re,he){var ye,Ie;for(ye=0;ye-1&ℜif(!He&&Re){var Vt=ut(Ee,!0);if(Vt.length){var er=Vt[0].xref,Tr=Vt[0].yref;if(er&&Tr){var jr=At(Vt),Fr=Zt([_(Ee,er,"x"),_(Ee,Tr,"y")]);Fr(rr,jr)}}Ee._fullLayout._noEmitSelectedAtStart?Ee._fullLayout._noEmitSelectedAtStart=!1:xt&&Jt(Ee,rr),_t._reselect=!1}if(!He&&_t._deselect){var kr=_t._deselect;We=kr.xref,pt=kr.yref,De(We,pt,ft)||qe(Ee,We,pt,ye),xt&&(rr.points.length?Jt(Ee,rr):at(Ee)),_t._deselect=!1}return{eventData:rr,selectionTesters:he}}function be(Ee){var Re=Ee.calcdata;if(Re)for(var he=0;he=0){nt._fullLayout._deactivateShape(nt);return}var Ke=nt._fullLayout.clickmode;if(j(nt),un===2&&!ce&&Jn(),_e)Ke.indexOf("select")>-1&&T(rn,nt,De,qe,ue.id,ct),Ke.indexOf("event")>-1&&n.click(nt,rn,ue.id);else if(un===1&&ce){var Qt=Ce?se:ie,Xt=Ce==="s"||Ue==="w"?0:1,nr=Qt._name+".range["+Xt+"]",cr=R(Qt,Xt),rr="left",Ze="middle";if(Qt.fixedrange)return;Ce?(Ze=Ce==="n"?"top":"bottom",Qt.side==="right"&&(rr="right")):Ue==="e"&&(rr="right"),nt._context.showAxisRangeEntryBoxes&&u.select(pt).call(t.makeEditable,{gd:nt,immediate:!0,background:nt._fullLayout.paper_bgcolor,text:String(cr),fill:Qt.tickfont?Qt.tickfont.color:"#444",horizontalAlign:rr,verticalAlign:Ze}).on("edit",function(xt){var Vt=Qt.d2r(xt);Vt!==void 0&&l.call("_guiRelayout",nt,nr,Vt)})}}c.init(ct);var _t,Bt,Et,hr,$r,ca,na,wa,pa,fa;function za(un,rn,nt){var Ke=pt.getBoundingClientRect();_t=rn-Ke.left,Bt=nt-Ke.top,re._fullLayout._calcInverseTransform(re);var Qt=v.apply3DTransform(re._fullLayout._invTransform)(_t,Bt);_t=Qt[0],Bt=Qt[1],Et={l:_t,r:_t,w:0,t:Bt,b:Bt,h:0},hr=re._hmpixcount?re._hmlumcount/re._hmpixcount:a.color(re._fullLayout.plot_bgcolor).luminosity(),$r="M0,0H"+ot+"V"+yt+"H0V0",ca=!1,na="xy",fa=!1,wa=Y(Oe,hr,Ne,ut,$r),pa=ee(Oe,Ne,ut)}function Ia(un,rn){if(re._transitioningWithDuration)return!1;var nt=Math.max(0,Math.min(ot,Ie*un+_t)),Ke=Math.max(0,Math.min(yt,Fe*rn+Bt)),Qt=Math.abs(nt-_t),Xt=Math.abs(Ke-Bt);Et.l=Math.min(_t,nt),Et.r=Math.max(_t,nt),Et.t=Math.min(Bt,Ke),Et.b=Math.max(Bt,Ke);function nr(){na="",Et.r=Et.l,Et.t=Et.b,pa.attr("d","M0,0Z")}if(At.isSubplotConstrained)Qt>_||Xt>_?(na="xy",Qt/ot>Xt/yt?(Xt=Qt*yt/ot,Bt>Ke?Et.t=Bt-Xt:Et.b=Bt+Xt):(Qt=Xt*ot/yt,_t>nt?Et.l=_t-Qt:Et.r=_t+Qt),pa.attr("d",Z(Et))):nr();else if(It.isSubplotConstrained)if(Qt>_||Xt>_){na="xy";var cr=Math.min(Et.l/ot,(yt-Et.b)/yt),rr=Math.max(Et.r/ot,(yt-Et.t)/yt);Et.l=cr*ot,Et.r=rr*ot,Et.b=(1-cr)*yt,Et.t=(1-rr)*yt,pa.attr("d",Z(Et))}else nr();else!vr||Xt0){var xt;if(It.isSubplotConstrained||!Zt&&vr.length===1){for(xt=0;xt1&&(nr.maxallowed!==void 0&&Jt===(nr.range[0]1&&(cr.maxallowed!==void 0&&at===(cr.range[0]=0?Math.min(re,.9):1/(1/Math.max(re,-.3)+3.222))}function q(re,ue,pe){return re?re==="nsew"?pe?"":ue==="pan"?"move":"crosshair":re.toLowerCase()+"-resize":"pointer"}function Y(re,ue,pe,ge,Te){return re.append("path").attr("class","zoombox").style({fill:ue>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(pe,ge)).attr("d",Te+"Z")}function ee(re,ue,pe){return re.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(ue,pe)).attr("d","M0,0Z")}function te(re,ue,pe,ge,Te,Se){re.attr("d",ge+"M"+pe.l+","+pe.t+"v"+pe.h+"h"+pe.w+"v-"+pe.h+"h-"+pe.w+"Z"),ae(re,ue,Te,Se)}function ae(re,ue,pe,ge){pe||(re.transition().style("fill",ge>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ue.transition().style("opacity",1).duration(200))}function j(re){u.select(re).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function G(re){D&&re.data&&re._context.showTips&&(v.notifier(v._(re,"Double-click to zoom back out"),"long",re),D=!1)}function K(re,ue){return"M"+(re.l-.5)+","+(ue-_-.5)+"h-3v"+(2*_+1)+"h3ZM"+(re.r+.5)+","+(ue-_-.5)+"h3v"+(2*_+1)+"h-3Z"}function H(re,ue){return"M"+(ue-_-.5)+","+(re.t-.5)+"v-3h"+(2*_+1)+"v3ZM"+(ue-_-.5)+","+(re.b+.5)+"v3h"+(2*_+1)+"v-3Z"}function Z(re){var ue=Math.floor(Math.min(re.b-re.t,re.r-re.l,_)/2);return"M"+(re.l-3.5)+","+(re.t-.5+ue)+"h3v"+-ue+"h"+ue+"v-3h-"+(ue+3)+"ZM"+(re.r+3.5)+","+(re.t-.5+ue)+"h-3v"+-ue+"h"+-ue+"v-3h"+(ue+3)+"ZM"+(re.r+3.5)+","+(re.b+.5-ue)+"h-3v"+ue+"h"+-ue+"v3h"+(ue+3)+"ZM"+(re.l-3.5)+","+(re.b+.5-ue)+"h3v"+ue+"h"+ue+"v3h-"+(ue+3)+"Z"}function X(re,ue,pe,ge,Te){for(var Se=!1,Ce={},Ue={},Oe,_e,ce,ie,se=(Te||{}).xaHash,ne=(Te||{}).yaHash,be=0;be1&&v.warn("Full array edits are incompatible with other edits",c);var M=n[""][""];if(e(M))r.set(null);else if(Array.isArray(M))r.set(M);else return v.warn("Unrecognized full array edit value",c,M),!0;return y?!1:(p(o,b),f(a),!0)}var A=Object.keys(n).map(Number).sort(w),E=r.get(),g=E||[],T=s(b,c).get(),m=[],h=-1,x=g.length,_,D,C,F,I,z,R,k;for(_=0;_g.length-(R?0:1)){v.warn("index out of range",c,C);continue}if(z!==void 0)I.length>1&&v.warn("Insertion & removal are incompatible with edits to the same index.",c,C),e(z)?m.push(C):R?(z==="add"&&(z={}),g.splice(C,0,z),T&&T.splice(C,0,{})):v.warn("Unrecognized full object edit value",c,C,z),h===-1&&(h=C);else for(D=0;D=0;_--)g.splice(m[_],1),T&&T.splice(m[_],1);if(g.length?E||r.set(g):r.set(null),y)return!1;if(p(o,b),d!==u){var B;if(h===-1)B=A;else{for(x=Math.max(g.length,x),B=[],_=0;_=h));_++)B.push(C);for(_=h;_0&&v.log("Clearing previous rejected promises from queue."),y._promises=[]},U.cleanLayout=function(y){var o,b;y||(y={}),y.xaxis1&&(y.xaxis||(y.xaxis=y.xaxis1),delete y.xaxis1),y.yaxis1&&(y.yaxis||(y.yaxis=y.yaxis1),delete y.yaxis1),y.scene1&&(y.scene||(y.scene=y.scene1),delete y.scene1);var M=(w.subplotsRegistry.cartesian||{}).attrRegex,A=(w.subplotsRegistry.polar||{}).attrRegex,E=(w.subplotsRegistry.ternary||{}).attrRegex,g=(w.subplotsRegistry.gl3d||{}).attrRegex,T=Object.keys(y);for(o=0;o3?(z.x=1.02,z.xanchor="left"):z.x<-2&&(z.x=-.02,z.xanchor="right"),z.y>3?(z.y=1.02,z.yanchor="bottom"):z.y<-2&&(z.y=-.02,z.yanchor="top")),y.dragmode==="rotate"&&(y.dragmode="orbit"),y.template&&y.template.layout&&U.cleanLayout(y.template.layout),y};function r(y,o,b=!1){var M=y[o],A=o.charAt(0);b&&Array.isArray(M)||M&&M!=="paper"&&(y[o]=l(M,A,!0))}U.cleanData=function(y){for(var o=0;o0)return y.slice(0,o)}U.hasParent=function(y,o){for(var b=f(o);b;){if(b in y)return!0;b=f(b)}return!1},U.clearAxisTypes=function(y,o,b){for(var M=0;M{let b=(...M)=>M.every(A=>v.isPlainObject(A))||M.every(A=>Array.isArray(A));if([y,o].every(M=>Array.isArray(M))){if(y.length!==o.length)return!1;for(let M=0;Mv.isPlainObject(M))){if(Object.keys(y).length!==Object.keys(o).length)return!1;for(let M in y){if(M.startsWith("_"))continue;let A=y[M],E=o[M];if(A!==E&&!(b(A,E)?d(A,E):!1))return!1}return!0}return!1};U.collectionsAreEqual=d}}),rg=xe({"src/plot_api/plot_api.js"(U){"use strict";var O=Na(),u=yn(),v=h_(),w=Sr(),S=w.nestedProperty,l=ip(),e=fA(),t=Ci(),a=op(),r=zl(),n=uo(),i=b_(),s=$c(),c=go(),p=wi(),f=q_().initInteractions,d=fh(),y=yc().clearOutline,o=fv().dfltConfig,b=WA(),M=YA(),A=c0(),E=Hl(),g=lc().AX_NAME_PATTERN,T=0,m=5;function h(he,ye,Ie,Fe){var He;if(he=w.getGraphDiv(he),l.init(he),w.isPlainObject(ye)){var We=ye;ye=We.data,Ie=We.layout,Fe=We.config,He=We.frames}var pt=l.triggerHandler(he,"plotly_beforeplot",[ye,Ie,Fe]);if(pt===!1)return Promise.reject();!ye&&!Ie&&!w.isPlotDiv(he)&&w.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",he);function ct(){if(He)return U.addFrames(he,He)}F(he,Fe),Ie||(Ie={}),O.select(he).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(he._promises)||(he._promises=[]);var ft=(he.data||[]).length===0&&Array.isArray(ye);Array.isArray(ye)&&(M.cleanData(ye),ft?he.data=ye:he.data.push.apply(he.data,ye),he.empty=!1),(!he.layout||ft)&&(he.layout=M.cleanLayout(Ie)),r.supplyDefaults(he);var mt=he._fullLayout,_t=mt._has("cartesian");mt._replotting=!0,(ft||mt._shouldCreateBgLayer)&&(Re(he),mt._shouldCreateBgLayer&&delete mt._shouldCreateBgLayer),c.initGradients(he),c.initPatterns(he),ft&&n.saveShowSpikeInitial(he);var Bt=!he.calcdata||he.calcdata.length!==(he._fullData||[]).length;Bt&&r.doCalcdata(he);for(var Et=0;Et=he.data.length||He<-he.data.length)throw new Error(Ie+" must be valid indices for gd.data.");if(ye.indexOf(He,Fe+1)>-1||He>=0&&ye.indexOf(-he.data.length+He)>-1||He<0&&ye.indexOf(he.data.length+He)>-1)throw new Error("each index in "+Ie+" must be unique.")}}function B(he,ye,Ie){if(!Array.isArray(he.data))throw new Error("gd.data must be an array.");if(typeof ye>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(ye)||(ye=[ye]),k(he,ye,"currentIndices"),typeof Ie<"u"&&!Array.isArray(Ie)&&(Ie=[Ie]),typeof Ie<"u"&&k(he,Ie,"newIndices"),typeof Ie<"u"&&ye.length!==Ie.length)throw new Error("current and new indices must be of equal length.")}function N(he,ye,Ie){var Fe,He;if(!Array.isArray(he.data))throw new Error("gd.data must be an array.");if(typeof ye>"u")throw new Error("traces must be defined.");for(Array.isArray(ye)||(ye=[ye]),Fe=0;Fe"u")throw new Error("indices must be an integer or array of integers");k(he,Ie,"indices");for(var We in ye){if(!Array.isArray(ye[We])||ye[We].length!==Ie.length)throw new Error("attribute "+We+" must be an array of length equal to indices array length");if(He&&(!(We in Fe)||!Array.isArray(Fe[We])||Fe[We].length!==ye[We].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function Y(he,ye,Ie,Fe){var He=w.isPlainObject(Fe),We=[],pt,ct,ft,mt,_t;Array.isArray(Ie)||(Ie=[Ie]),Ie=R(Ie,he.data.length-1);for(var Bt in ye)for(var Et=0;Et=0&&_t=0&&_t"u")return mt=U.redraw(he),e.add(he,He,pt,We,ct),mt;Array.isArray(Ie)||(Ie=[Ie]);try{B(he,Fe,Ie)}catch(_t){throw he.data.splice(he.data.length-ye.length,ye.length),_t}return e.startSequence(he),e.add(he,He,pt,We,ct),mt=U.moveTraces(he,Fe,Ie),e.stopSequence(he),mt}function K(he,ye){he=w.getGraphDiv(he);var Ie=[],Fe=U.addTraces,He=K,We=[he,Ie,ye],pt=[he,ye],ct,ft;if(typeof ye>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(ye)||(ye=[ye]),k(he,ye,"indices"),ye=R(ye,he.data.length-1),ye.sort(w.sorterDes),ct=0;ct"u")for(Ie=[],mt=0;mt0&&typeof tn.parts[$n]!="string";)$n--;var bn=tn.parts[$n],ci=tn.parts[$n-1]+"."+bn,hi=tn.parts.slice(0,$n).join("."),Pi=S(he.layout,hi).get(),Jn=S(Fe,hi).get(),Ti=tn.get();if(ka!==void 0){wa[Oa]=ka,pa[Oa]=bn==="reverse"?ka:X(Ti);var _n=a.getLayoutValObject(Fe,tn.parts);if(_n&&_n.impliedEdits&&ka!==null)for(var Ln in _n.impliedEdits)fa(w.relativeAttr(Oa,Ln),_n.impliedEdits[Ln]);if(["width","height"].indexOf(Oa)!==-1)if(ka){fa("autosize",null);var ji=Oa==="height"?"width":"height";fa(ji,Fe[ji])}else Fe[Oa]=he._initialAutoSize[Oa];else if(Oa==="autosize")fa("width",ka?null:Fe.width),fa("height",ka?null:Fe.height);else if(ci.match(Se))Va(ci),S(Fe,hi+"._inputRange").set(null);else if(ci.match(Ce)){Va(ci),S(Fe,hi+"._inputRange").set(null);var Zi=S(Fe,hi).get();Zi._inputDomain&&(Zi._input.domain=Zi._inputDomain.slice())}else ci.match(Ue)&&S(Fe,hi+"._inputDomain").set(null);if(bn==="type"){Ia=Pi;var un=Jn.type==="linear"&&ka==="log",rn=Jn.type==="log"&&ka==="linear";if(un||rn){if(!Ia||!Ia.range)fa(hi+".autorange",!0);else if(Jn.autorange)un&&(Ia.range=Ia.range[1]>Ia.range[0]?[1,2]:[2,1]);else{var nt=Ia.range[0],Ke=Ia.range[1];un?(nt<=0&&Ke<=0&&fa(hi+".autorange",!0),nt<=0?nt=Ke/1e6:Ke<=0&&(Ke=nt/1e6),fa(hi+".range[0]",Math.log(nt)/Math.LN10),fa(hi+".range[1]",Math.log(Ke)/Math.LN10)):(fa(hi+".range[0]",Math.pow(10,nt)),fa(hi+".range[1]",Math.pow(10,Ke)))}Array.isArray(Fe._subplots.polar)&&Fe._subplots.polar.length&&Fe[tn.parts[0]]&&tn.parts[1]==="radialaxis"&&delete Fe[tn.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(he,Jn,ka,fa),t.getComponentMethod("images","convertCoords")(he,Jn,ka,fa)}else fa(hi+".autorange",!0),fa(hi+".range",null);S(Fe,hi+"._inputRange").set(null)}else if(bn.match(g)){var Qt=S(Fe,Oa).get(),Xt=(ka||{}).type;(!Xt||Xt==="-")&&(Xt="linear"),t.getComponentMethod("annotations","convertCoords")(he,Qt,Xt,fa),t.getComponentMethod("images","convertCoords")(he,Qt,Xt,fa)}var nr=b.containerArrayMatch(Oa);if(nr){_t=nr.array,Bt=nr.index;var cr=nr.property,rr=_n||{editType:"calc"};Bt!==""&&cr===""&&(b.isAddVal(ka)?pa[Oa]=null:b.isRemoveVal(ka)?pa[Oa]=(S(Ie,_t).get()||[])[Bt]:w.warn("unrecognized full object value",ye)),E.update(na,rr),mt[_t]||(mt[_t]={});var Ze=mt[_t][Bt];Ze||(Ze=mt[_t][Bt]={}),Ze[cr]=ka,delete ye[Oa]}else bn==="reverse"?(Pi.range?Pi.range.reverse():(fa(hi+".autorange",!0),Pi.range=[1,0]),Jn.autorange?na.calc=!0:na.plot=!0):(Oa==="dragmode"&&(ka===!1&&Ti!==!1||ka!==!1&&Ti===!1)||Fe._has("scatter-like")&&Fe._has("regl")&&Oa==="dragmode"&&(ka==="lasso"||ka==="select")&&!(Ti==="lasso"||Ti==="select")?na.plot=!0:_n?E.update(na,_n):na.calc=!0,tn.set(ka))}}for(_t in mt){var xt=b.applyContainerArrayChanges(he,We(Ie,_t),mt[_t],na,We);xt||(na.plot=!0)}for(var Vt in za){Ia=n.getFromId(he,Vt);var er=Ia&&Ia._constraintGroup;if(er){na.calc=!0;for(var Tr in er)za[Tr]||(n.getFromId(he,Tr)._constraintShrinkable=!0)}}(_e(he)||ye.height||ye.width)&&(na.plot=!0);var jr=Fe.shapes;for(Bt=0;Bt1;)if(Fe.pop(),Ie=S(ye,Fe.join(".")+".uirevision").get(),Ie!==void 0)return Ie;return ye.uirevision}function qe(he,ye){for(var Ie=0;Ie[hi,he._ev.listeners(hi)]);We=U.newPlot(he,ye,Ie,Fe).then(()=>{for(let[hi,Pi]of ci)Pi.forEach(Jn=>he.on(hi,Jn));return U.react(he,ye,Ie,Fe)})}else{he.data=ye||[],M.cleanData(he.data),he.layout=Ie||{},M.cleanLayout(he.layout),ot(he.data,he.layout,ct,ft),r.supplyDefaults(he,{skipUpdateCalc:!0});var Bt=he._fullData,Et=he._fullLayout,hr=Et.datarevision===void 0,$r=Et.transition,ca=It(he,ft,Et,hr,$r),na=ca.newDataRevision,wa=At(he,ct,Bt,hr,$r,na);if(_e(he)&&(ca.layoutReplot=!0),wa.calc||ca.calc){he.calcdata=void 0;for(var pa=Object.getOwnPropertyNames(Et),fa=0;fa(_t||he.emit("plotly_react",{config:Fe,data:ye,layout:Ie}),he))}function At(he,ye,Ie,Fe,He,We){var pt=ye.length===Ie.length;if(!He&&!pt)return{fullReplot:!0,calc:!0};var ct=E.traceFlags();ct.arrays={},ct.nChanges=0,ct.nChangesAnim=0;var ft,mt;function _t(hr){var $r=a.getTraceValObject(mt,hr);return!mt._module.animatable&&$r.anim&&($r.anim=!1),$r}var Bt={getValObject:_t,flags:ct,immutable:Fe,transition:He,newDataRevision:We,gd:he},Et={};for(ft=0;ft=He.length?He[0]:He[mt]:He}function ct(mt){return Array.isArray(We)?mt>=We.length?We[0]:We[mt]:We}function ft(mt,_t){var Bt=0;return function(){if(mt&&++Bt===_t)return mt()}}return new Promise(function(mt,_t){function Bt(){if(Fe._frameQueue.length!==0){for(;Fe._frameQueue.length;){var bn=Fe._frameQueue.pop();bn.onInterrupt&&bn.onInterrupt()}he.emit("plotly_animationinterrupted",[])}}function Et(bn){if(bn.length!==0){for(var ci=0;ciFe._timeToNext&&$r()};bn()}var na=0;function wa(bn){return Array.isArray(He)?na>=He.length?bn.transitionOpts=He[na]:bn.transitionOpts=He[0]:bn.transitionOpts=He,na++,bn}var pa,fa,za=[],Ia=ye==null,Va=Array.isArray(ye),Oa=!Ia&&!Va&&w.isPlainObject(ye);if(Oa)za.push({type:"object",data:wa(w.extendFlat({},ye))});else if(Ia||["string","number"].indexOf(typeof ye)!==-1)for(pa=0;pa0&&oioi)&&$n.push(fa);za=$n}}za.length>0?Et(za):(he.emit("plotly_animated"),mt())})}function Ut(he,ye,Ie){if(he=w.getGraphDiv(he),ye==null)return Promise.resolve();if(!w.isPlotDiv(he))throw new Error("This element is not a Plotly plot: "+he+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Fe,He,We,pt,ct=he._transitionData._frames,ft=he._transitionData._frameHash;if(!Array.isArray(ye))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+ye);var mt=ct.length+ye.length*2,_t=[],Bt={};for(Fe=ye.length-1;Fe>=0;Fe--)if(w.isPlainObject(ye[Fe])){var Et=ye[Fe].name,hr=(ft[Et]||Bt[Et]||{}).name,$r=ye[Fe].name,ca=ft[hr]||Bt[hr];hr&&$r&&typeof $r=="number"&&ca&&Ttn.index?-1:Oa.index=0;Fe--){if(He=_t[Fe].frame,typeof He.name=="number"&&w.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!He.name)for(;ft[He.name="frame "+he._transitionData._counter++];);if(ft[He.name]){for(We=0;We=0;Ie--)Fe=ye[Ie],We.push({type:"delete",index:Fe}),pt.unshift({type:"insert",index:Fe,value:He[Fe]});var ct=r.modifyFrames,ft=r.modifyFrames,mt=[he,pt],_t=[he,We];return e&&e.add(he,ct,mt,ft,_t),r.modifyFrames(he,We)}function at(he){he=w.getGraphDiv(he);var ye=he._fullLayout||{},Ie=he._fullData||[];return r.cleanPlot([],{},Ie,ye),r.purge(he),l.purge(he),ye._container&&ye._container.remove(),delete he._context,he}function Ee(he){var ye=he._fullLayout,Ie=he.getBoundingClientRect();if(!w.equalDomRects(Ie,ye._lastBBox)){var Fe=ye._invTransform=w.inverseTransformMatrix(w.getFullTransformMatrix(he));ye._invScaleX=Math.sqrt(Fe[0][0]*Fe[0][0]+Fe[0][1]*Fe[0][1]+Fe[0][2]*Fe[0][2]),ye._invScaleY=Math.sqrt(Fe[1][0]*Fe[1][0]+Fe[1][1]*Fe[1][1]+Fe[1][2]*Fe[1][2]),ye._lastBBox=Ie}}function Re(he){var ye=O.select(he),Ie=he._fullLayout;if(Ie._calcInverseTransform=Ee,Ie._calcInverseTransform(he),Ie._container=ye.selectAll(".plot-container").data([0]),Ie._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ie._paperdiv=Ie._container.selectAll(".svg-container").data([0]),Ie._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ie._glcontainer=Ie._paperdiv.selectAll(".gl-container").data([{}]),Ie._glcontainer.enter().append("div").classed("gl-container",!0),Ie._paperdiv.selectAll(".main-svg").remove(),Ie._paperdiv.select(".modebar-container").remove(),Ie._paper=Ie._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ie._toppaper=Ie._paperdiv.append("svg").classed("main-svg",!0),Ie._modebardiv=Ie._paperdiv.append("div"),delete Ie._modeBar,Ie._hoverpaper=Ie._paperdiv.append("svg").classed("main-svg",!0),!Ie._uid){var Fe={};O.selectAll("defs").each(function(){this.id&&(Fe[this.id.split("-")[1]]=1)}),Ie._uid=w.randstr(Fe)}Ie._paperdiv.selectAll(".main-svg").attr(d.svgAttrs),Ie._defs=Ie._paper.append("defs").attr("id","defs-"+Ie._uid),Ie._clips=Ie._defs.append("g").classed("clips",!0),Ie._topdefs=Ie._toppaper.append("defs").attr("id","topdefs-"+Ie._uid),Ie._topclips=Ie._topdefs.append("g").classed("clips",!0),Ie._bgLayer=Ie._paper.append("g").classed("bglayer",!0),Ie._draggers=Ie._paper.append("g").classed("draglayer",!0);var He=Ie._paper.append("g").classed("layer-below",!0);Ie._imageLowerLayer=He.append("g").classed("imagelayer",!0),Ie._shapeLowerLayer=He.append("g").classed("shapelayer",!0),Ie._cartesianlayer=Ie._paper.append("g").classed("cartesianlayer",!0),Ie._polarlayer=Ie._paper.append("g").classed("polarlayer",!0),Ie._smithlayer=Ie._paper.append("g").classed("smithlayer",!0),Ie._ternarylayer=Ie._paper.append("g").classed("ternarylayer",!0),Ie._geolayer=Ie._paper.append("g").classed("geolayer",!0),Ie._funnelarealayer=Ie._paper.append("g").classed("funnelarealayer",!0),Ie._pielayer=Ie._paper.append("g").classed("pielayer",!0),Ie._iciclelayer=Ie._paper.append("g").classed("iciclelayer",!0),Ie._treemaplayer=Ie._paper.append("g").classed("treemaplayer",!0),Ie._sunburstlayer=Ie._paper.append("g").classed("sunburstlayer",!0),Ie._indicatorlayer=Ie._toppaper.append("g").classed("indicatorlayer",!0),Ie._glimages=Ie._paper.append("g").classed("glimages",!0);var We=Ie._toppaper.append("g").classed("layer-above",!0);Ie._imageUpperLayer=We.append("g").classed("imagelayer",!0),Ie._shapeUpperLayer=We.append("g").classed("shapelayer",!0),Ie._selectionLayer=Ie._toppaper.append("g").classed("selectionlayer",!0),Ie._infolayer=Ie._toppaper.append("g").classed("infolayer",!0),Ie._menulayer=Ie._toppaper.append("g").classed("menulayer",!0),Ie._zoomlayer=Ie._toppaper.append("g").classed("zoomlayer",!0),Ie._hoverlayer=Ie._hoverpaper.append("g").classed("hoverlayer",!0),Ie._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),he.emit("plotly_framework")}U.animate=vr,U.addFrames=Ut,U.deleteFrames=Jt,U.addTraces=G,U.deleteTraces=K,U.extendTraces=ae,U.moveTraces=H,U.prependTraces=j,U.newPlot=z,U._doPlot=h,U.purge=at,U.react=yt,U.redraw=I,U.relayout=pe,U.restyle=Z,U.setPlotConfig=_,U.update=ce,U._guiRelayout=ie(pe),U._guiRestyle=ie(Z),U._guiUpdate=ie(ce),U._storeDirectGUIEdit=re}}),hd=xe({"src/snapshot/helpers.js"(U){"use strict";var O=Ci();U.getDelay=function(w){return w._has&&(w._has("gl3d")||w._has("map"))?500:0},U.getRedrawFunc=function(w){return function(){O.getComponentMethod("colorbar","draw")(w)}},U.encodeSVG=function(w){return"data:image/svg+xml,"+encodeURIComponent(w)},U.encodeJSON=function(w){return"data:application/json,"+encodeURIComponent(w)};var u=window.URL||window.webkitURL;U.createObjectURL=function(w){return u.createObjectURL(w)},U.revokeObjectURL=function(w){return u.revokeObjectURL(w)},U.createBlob=function(w,S){if(S==="svg")return new window.Blob([w],{type:"image/svg+xml;charset=utf-8"});if(S==="full-json")return new window.Blob([w],{type:"application/json;charset=utf-8"});var l=v(window.atob(w));return new window.Blob([l],{type:"image/"+S})},U.octetStream=function(w){document.location.href="data:application/octet-stream"+w},U.getPlotTitle=function(w){var S,l,e,t,a=w._fullLayout;if(a){var r=(S=a.title)==null?void 0:S.text;return r===((l=a._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=w.layout)==null?void 0:e.title)==null?void 0:t.text},U.getPlotSubtitle=function(w){var S,l,e,t,a,r,n=w._fullLayout;if(n){var i=(l=(S=n.title)==null?void 0:S.subtitle)==null?void 0:l.text;return i===((e=n._dfltTitle)==null?void 0:e.subtitle)?void 0:i}return(r=(a=(t=w.layout)==null?void 0:t.title)==null?void 0:a.subtitle)==null?void 0:r.text};function v(w){for(var S=w.length,l=new ArrayBuffer(S),e=new Uint8Array(l),t=0;t{let o=y.toLowerCase();return r.includes(o)?y:n.includes(o)?"<":i.includes(o)?">":y.includes("<")||y.includes(">")?"":f.html(y).text()});return f.remove(),d}function c(p){return p.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}O.exports=function(f,d,y){var o=f._fullLayout,b=o._paper,M=o._toppaper,A=o.width,E=o.height,g;b.insert("rect",":first-child").call(w.setRect,0,0,A,E).call(S.fill,o.paper_bgcolor);var T=o._basePlotModules||[];for(g=0;g1&&E.push(s("object","layout"))),v.supplyDefaults(g);for(var h=g._fullData,x=T.length,_=0;_D.length&&A.push(s("unused",E,x.concat(D.length)));var k=D.length,B=Array.isArray(R);B&&(k=Math.min(k,R.length));var N,q,Y,ee,te;if(C.dimensions===2)for(q=0;qD[q].length&&A.push(s("unused",E,x.concat(q,D[q].length)));var ae=D[q].length;for(N=0;N<(B?Math.min(ae,R[q].length):ae);N++)Y=B?R[q][N]:R,ee=_[q][N],te=D[q][N],u.validate(ee,Y)?te!==ee&&te!==+ee&&A.push(s("dynamic",E,x.concat(q,N),ee,te)):A.push(s("value",E,x.concat(q,N),ee))}else A.push(s("array",E,x.concat(q),_[q]));else for(q=0;qI?A.push({code:"unused",traceType:_,templateCount:F,dataCount:I}):I>F&&A.push({code:"reused",traceType:_,templateCount:F,dataCount:I})}}function z(R,k){for(var B in R)if(B.charAt(0)!=="_"){var N=R[B],q=s(R,B,k);u(N)?(Array.isArray(R)&&N._template===!1&&N.templateitemname&&A.push({code:"missing",path:q,templateitemname:N.templateitemname}),z(N,q)):Array.isArray(N)&&c(N)&&z(N,q)}}if(z({data:g,layout:E},""),A.length)return A.map(p)};function c(f){for(var d=0;d=0;p--){var f=l[p];if(f.type==="scatter"&&f.xaxis===s.xaxis&&f.yaxis===s.yaxis){f.opacity=void 0;break}}}}}}}),e6=xe({"src/traces/scatter/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=Gm();O.exports=function(w,S){function l(t,a){return u.coerce(w,S,v,t,a)}var e=S.barmode==="group";S.scattermode==="group"&&l("scattergap",e?S.bargap:.2)}}}),Ch=xe({"src/plots/cartesian/align_period.js"(U,O){"use strict";var u=yn(),v=Sr(),w=v.dateTime2ms,S=v.incrementMonth,l=Gn(),e=l.ONEAVGMONTH;O.exports=function(a,r,n,i){if(r.type!=="date")return{vals:i};var s=a[n+"periodalignment"];if(!s)return{vals:i};var c=a[n+"period"],p;if(u(c)){if(c=+c,c<=0)return{vals:i}}else if(typeof c=="string"&&c.charAt(0)==="M"){var f=+c.substring(1);if(f>0&&Math.round(f)===f)p=f;else return{vals:i}}for(var d=r.calendar,y=s==="start",o=s==="end",b=a[n+"period0"],M=w(b,d)||0,A=[],E=[],g=[],T=i.length,m=0;mh;)D=S(D,-p,d);for(;D<=h;)D=S(D,p,d);_=S(D,-p,d)}else{for(x=Math.round((h-M)/c),D=M+x*c;D>h;)D-=c;for(;D<=h;)D+=c;_=D-c}A[m]=y?_:o?D:(_+D)/2,E[m]=_,g[m]=D}return{vals:A,starts:E,ends:g}}}}),dh=xe({"src/traces/scatter/colorscale_calc.js"(U,O){"use strict";var u=vf().hasColorscale,v=xf(),w=Cl();O.exports=function(l,e){w.hasLines(e)&&u(e,"line")&&v(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),w.hasMarkers(e)&&(u(e,"marker")&&v(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),u(e,"marker.line")&&v(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Hh=xe({"src/traces/scatter/arrays_to_calcdata.js"(U,O){"use strict";var u=Sr();O.exports=function(w,S){for(var l=0;lz&&_[k].gap;)k--;for(N=_[k].s,R=_.length-1;R>k;R--)_[R].s=N;for(;zee+q||!u(Y))}for(var ae=0;aek(N))):k(I.text);let B=I.outsidetextfont.size*r*R+a;return{ppadplus:z.some(N=>N.s<0)?B:0,ppadminus:z.some(N=>N.s>=0)?B:0}}return{ppadplus:void 0,ppadminus:void 0}}function D(I,z,R,k){for(var B=F(k),N=0;NF[d]&&d0?l:e)/(d._m*b*(d._m>0?l:e)))),mt*=1e3}if(_t===w){if(o&&(_t=d.c2p(ft.y,!0)),_t===w)return!1;_t*=1e3}return[mt,_t]}function Q(ct,ft,mt,_t){var Bt=mt-ct,Et=_t-ft,hr=.5-ct,$r=.5-ft,ca=Bt*Bt+Et*Et,na=Bt*hr+Et*$r;if(na>0&&na1||Math.abs(hr.y-mt[0][1])>1)&&(hr=[hr.x,hr.y],_t&&ge(hr,ct)Ce||ct[1]Oe)return[r(ct[0],Se,Ce),r(ct[1],Ue,Oe)]}function ut(ct,ft){if(ct[0]===ft[0]&&(ct[0]===Se||ct[0]===Ce)||ct[1]===ft[1]&&(ct[1]===Ue||ct[1]===Oe))return!0}function ot(ct,ft){var mt=[],_t=Ne(ct),Bt=Ne(ft);return _t&&Bt&&ut(_t,Bt)||(_t&&mt.push(_t),Bt&&mt.push(Bt)),mt}function yt(ct,ft,mt){return function(_t,Bt){var Et=Ne(_t),hr=Ne(Bt),$r=[];if(Et&&hr&&ut(Et,hr))return $r;Et&&$r.push(Et),hr&&$r.push(hr);var ca=2*t.constrain((_t[ct]+Bt[ct])/2,ft,mt)-((Et||_t)[ct]+(hr||Bt)[ct]);if(ca){var na;Et&&hr?na=ca>0==Et[ct]>hr[ct]?Et:hr:na=Et||hr,na[ct]+=ca}return $r}}var At;m==="linear"||m==="spline"?At=qe:m==="hv"||m==="vh"?At=ot:m==="hvh"?At=yt(0,Se,Ce):m==="vhv"&&(At=yt(1,Ue,Oe));function It(ct,ft){var mt=ft[0]-ct[0],_t=(ft[1]-ct[1])/mt,Bt=(ct[1]*ft[0]-ft[1]*ct[0])/mt;return Bt>0?[_t>0?Se:Ce,Oe]:[_t>0?Ce:Se,Ue]}function Zt(ct){var ft=ct[0],mt=ct[1],_t=ft===F[I-1][0],Bt=mt===F[I-1][1];if(!(_t&&Bt))if(I>1){var Et=ft===F[I-2][0],hr=mt===F[I-2][1];_t&&(ft===Se||ft===Ce)&&Et?hr?I--:F[I-1]=ct:Bt&&(mt===Ue||mt===Oe)&&hr?Et?I--:F[I-1]=ct:F[I++]=ct}else F[I++]=ct}function vr(ct){F[I-1][0]!==ct[0]&&F[I-1][1]!==ct[1]&&Zt([se,ne]),Zt(ct),be=null,se=ne=0}var Ut=t.isArrayOrTypedArray(E);function Jt(ct){if(ct&&A&&(ct.i=z,ct.d=s,ct.trace=p,ct.marker=Ut?E[ct.i]:E,ct.backoff=A),re=ct[0]/b,ue=ct[1]/M,ce=ct[0]Ce?Ce:0,ie=ct[1]Oe?Oe:0,ce||ie){if(!I)F[I++]=[ce||ct[0],ie||ct[1]];else if(be){var ft=At(be,ct);ft.length>1&&(vr(ft[0]),F[I++]=ft[1])}else De=At(F[I-1],ct)[0],F[I++]=De;var mt=F[I-1];ce&&ie&&(mt[0]!==ce||mt[1]!==ie)?(be&&(se!==ce&&ne!==ie?Zt(se&&ne?It(be,ct):[se||ce,ne||ie]):se&&ne&&Zt([se,ne])),Zt([ce,ie])):se-ce&&ne-ie&&Zt([ce||se,ie||ne]),be=ct,se=ce,ne=ie}else be&&vr(At(be,ct)[0]),F[I++]=ct}for(z=0;zpe(q,at))break;k=q,K=te[0]*ee[0]+te[1]*ee[1],K>j?(j=K,B=q,Y=!1):K=s.length||!q)break;Jt(q),R=q}}be&&Zt([se||be[0],ne||be[1]]),_.push(F.slice(0,I))}var Ee=m.slice(m.length-1);if(A&&Ee!=="h"&&Ee!=="v"){for(var Re=!1,he=-1,ye=[],Ie=0;Ie<_.length;Ie++)for(var Fe=0;Fe<_[Ie].length-1;Fe++){var He=_[Ie][Fe],We=_[Ie][Fe+1],pt=u.applyBackoff(We,He);(pt[0]!==We[0]||pt[1]!==We[1])&&(Re=!0),ye[he+1]||(he++,ye[he]=[He,[pt[0],pt[1]]])}return Re?ye:_}return _}}}),Y_=xe({"src/traces/scatter/link_traces.js"(U,O){"use strict";var u={tonextx:1,tonexty:1,tonext:1};O.exports=function(w,S,l){var e,t,a,r,n,i={},s=!1,c=-1,p=0,f=-1;for(t=0;t=0?n=f:(n=f=p,p++),n0,m=r(f,d,y);if(A=o.selectAll("g.trace").data(m,function(x){return x[0].trace.uid}),A.enter().append("g").attr("class",function(x){return"trace scatter trace"+x[0].trace.uid}).style("stroke-miterlimit",2),A.order(),i(f,A,d),T){M&&(E=M());var h=u.transition().duration(b.duration).ease(b.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()});h.each(function(){o.selectAll("g.trace").each(function(x,_){s(f,_,d,x,m,this,b)})})}else A.each(function(x,_){s(f,_,d,x,m,this,b)});g&&A.exit().remove(),o.selectAll("path:not([d])").remove()};function i(p,f,d){f.each(function(y){var o=S(u.select(this),"g","fills");e.setClipUrl(o,d.layerClipId,p);var b=y[0].trace;b._ownFill=null,b._nextFill=null;var M=[];b._ownfill&&M.push("_ownFill"),b._nexttrace&&M.push("_nextFill");var A=o.selectAll("g").data(M,l);A.enter().append("g"),A.exit().remove(),A.order().each(function(E){b[E]=S(u.select(this),"path","js-fill")})})}function s(p,f,d,y,o,b,M){var A=p._context.staticPlot,E;c(p,f,d,y,o);var g=!!M&&M.duration>0;function T(Zt){return g?Zt.transition():Zt}var m=d.xaxis,h=d.yaxis,x=y[0].trace,_=x.line,D=u.select(b),C=S(D,"g","errorbars"),F=S(D,"g","lines"),I=S(D,"g","points"),z=S(D,"g","text");if(v.getComponentMethod("errorbars","plot")(p,C,d,M),x.visible!==!0)return;T(D).style("opacity",x.opacity);var R,k,B=x.fill.charAt(x.fill.length-1);B!=="x"&&B!=="y"&&(B="");var N,q;B==="y"?(N=1,q=h.c2p(0,!0)):B==="x"&&(N=0,q=m.c2p(0,!0)),y[0][d.isRangePlot?"nodeRangePlot3":"node3"]=D;var Y="",ee=[],te=x._prevtrace,ae=null,j=null;te&&(Y=te._prevRevpath||"",k=te._nextFill,ee=te._ownPolygons,ae=te._fillsegments,j=te._fillElement);var G,K,H="",Z="",X,$,Q,re,ue,pe,ge=[];x._polygons=[];var Te=[],Se=[],Ce=w.noop;if(R=x._ownFill,t.hasLines(x)||x.fill!=="none"){k&&k.datum(y),["hv","vh","hvh","vhv"].indexOf(_.shape)!==-1?(X=e.steps(_.shape),$=e.steps(_.shape.split("").reverse().join(""))):_.shape==="spline"?X=$=function(Zt){var vr=Zt[Zt.length-1];return Zt.length>1&&Zt[0][0]===vr[0]&&Zt[0][1]===vr[1]?e.smoothclosed(Zt.slice(1),_.smoothing):e.smoothopen(Zt,_.smoothing)}:X=$=function(Zt){return"M"+Zt.join("L")},Q=function(Zt){return $(Zt.reverse())},Se=a(y,{xaxis:m,yaxis:h,trace:x,connectGaps:x.connectgaps,baseTolerance:Math.max(_.width||1,3)/4,shape:_.shape,backoff:_.backoff,simplify:_.simplify,fill:x.fill}),Te=new Array(Se.length);var Ue=0;for(E=0;E=A[0]&&D.x<=A[1]&&D.y>=E[0]&&D.y<=E[1]}),h=Math.ceil(m.length/T),x=0;o.forEach(function(D,C){var F=D[0].trace;t.hasMarkers(F)&&F.marker.maxdisplayed>0&&C=Math.min(te,ae)&&d<=Math.max(te,ae)?0:1/0}var j=Math.max(3,ee.mrc||0),G=1-1/j,K=Math.abs(p.c2p(ee.x)-d);return K=Math.min(te,ae)&&y<=Math.max(te,ae)?0:1/0}var j=Math.max(3,ee.mrc||0),G=1-1/j,K=Math.abs(f.c2p(ee.y)-y);return KZ!=Te>=Z&&(ue=Q[$-1][0],pe=Q[$][0],Te-ge&&(re=ue+(pe-ue)*(Z-ge)/(Te-ge),j=Math.min(j,re),G=Math.max(G,re)));return j=Math.max(j,0),G=Math.min(G,p._length),{x0:j,x1:G,y0:Z,y1:Z}}if(b.indexOf("fills")!==-1&&c._fillElement){var N=k(c._fillElement)&&!k(c._fillExclusionElement);if(N){var q=B(c._polygons);q===null&&(q={x0:o[0],x1:o[0],y0:o[1],y1:o[1]});var Y=l.defaultLine;return l.opacity(c.fillcolor)?Y=c.fillcolor:l.opacity((c.line||{}).color)&&(Y=c.line.color),u.extendFlat(a,{distance:a.maxHoverDistance,x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1,color:Y,hovertemplate:!1}),delete a.index,c.text&&!u.isArrayOrTypedArray(c.text)?a.text=String(c.text):a.text=c.name,[a]}}}}}),wv=xe({"src/traces/scatter/select.js"(U,O){"use strict";var u=Cl();O.exports=function(w,S){var l=w.cd,e=w.xaxis,t=w.yaxis,a=[],r=l[0].trace,n,i,s,c,p=r.mode&&!u.hasMarkers(r)&&!u.hasText(r);if(p)return[];if(S===!1)for(n=0;n0&&(i["_"+r+"axes"]||{})[a])return i;if((i[r+"axis"]||r)===a){if(e(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,a){var r=l(t),n=u(t,"box-violin");return n&&a===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),og=xe({"src/plots/cartesian/category_order_defaults.js"(U,O){"use strict";var u=rs().isTypedArraySpec;function v(w,S){var l=S.dataAttr||w._id.charAt(0),e={},t,a,r;if(S.axData)t=S.axData;else for(t=[],a=0;a0||u(a),n;r&&(n="array");var i=e("categoryorder",n),s;i==="array"&&(s=e("categoryarray")),!r&&i==="array"&&(i=l.categoryorder="trace"),i==="trace"?l._initialCategories=[]:i==="array"?l._initialCategories=s.slice():(s=v(l,t).sort(),i==="category ascending"?l._initialCategories=s:i==="category descending"&&(l._initialCategories=s.reverse()))}}}}),v0=xe({"src/plots/cartesian/line_grid_defaults.js"(U,O){"use strict";var u=wi(),v=sc(),w=Sr();O.exports=function(l,e,t,a){a=a||{};var r=a.dfltColor;function n(_,D){return w.coerce2(l,e,a.attributes,_,D)}var i=n("linecolor",r),s=n("linewidth"),c=t("showline",a.showLine||!!i||!!s);c||(delete e.linecolor,delete e.linewidth);var p=u.mix(r,a.bgColor,a.blend||v.lightFraction),f=n("gridcolor",p),d=n("gridwidth"),y=n("griddash"),o=t("showgrid",a.showGrid||!!f||!!d||!!y);if(o||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),a.hasMinor){var b=u.mix(e.gridcolor,a.bgColor,67),M=n("minor.gridcolor",b),A=n("minor.gridwidth",e.gridwidth||1),E=n("minor.griddash",e.griddash||"solid"),g=t("minor.showgrid",!!M||!!A||!!E);g||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!a.noZeroLine){var T=n("zerolinelayer"),m=n("zerolinecolor",r),h=n("zerolinewidth"),x=t("zeroline",a.showGrid||!!m||!!h);x||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),p0=xe({"src/plots/cartesian/axis_defaults.js"(U,O){"use strict";var u=yn(),v=Ci(),w=Sr(),S=Cs(),l=bf(),e=$c(),t=mv(),a=sp(),r=Rd(),n=Fd(),i=og(),s=v0(),c=b_(),p=Oh(),f=lc().WEEKDAY_PATTERN,d=lc().HOUR_PATTERN;O.exports=function(A,E,g,T,m){var h=T.letter,x=T.font||{},_=T.splomStash||{},D=g("visible",!T.visibleDflt),C=E._template||{},F=E.type||C.type||"-",I;if(F==="date"){var z=v.getComponentMethod("calendars","handleDefaults");z(A,E,"calendar",T.calendar),T.noTicklabelmode||(I=g("ticklabelmode"))}!T.noTicklabelindex&&(F==="date"||F==="linear")&&g("ticklabelindex");var R="";(!T.noTicklabelposition||F==="multicategory")&&(R=w.coerce(A,E,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:I==="period"?["outside","inside"]:h==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),T.noTicklabeloverflow||g("ticklabeloverflow",R.indexOf("inside")!==-1?"hide past domain":F==="category"||F==="multicategory"?"allow":"hide past div"),p(E,m),c(A,E,g,T),i(A,E,g,T),T.noHover||(F!=="category"&&g("hoverformat"),T.noUnifiedhovertitle||g("unifiedhovertitle.text"));var k=g("color"),B=k!==e.color.dflt?k:x.color,N=_.label||m._dfltTitle[h];if(n(A,E,g,F,T),!D)return E;g("title.text",N),w.coerceFont(g,"title.font",x,{overrideDflt:{size:w.bigFont(x.size),color:B}}),t(A,E,g,F);var q=T.hasMinor;if(q&&(S.newContainer(E,"minor"),t(A,E,g,F,{isMinor:!0})),r(A,E,g,F,T),a(A,E,g,T),q){var Y=T.isMinor;T.isMinor=!0,a(A,E,g,T),T.isMinor=Y}s(A,E,g,{dfltColor:k,bgColor:T.bgColor,showGrid:T.showGrid,hasMinor:q,attributes:e}),q&&E.ticklabelindex==null&&!E.minor.ticks&&!E.minor.showgrid&&delete E.minor,(E.showline||E.ticks)&&g("mirror");var ee=F==="multicategory";if(!T.noTickson&&(F==="category"||ee)&&(E.ticks||E.showgrid)&&(ee?(g("tickson","boundaries"),delete E.ticklabelposition):g("tickson")),ee){var te=g("showdividers");te&&(g("dividercolor"),g("dividerwidth"))}if(F==="date")if(l(A,E,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:y}),!E.rangebreaks.length)delete E.rangebreaks;else{for(var ae=0;ae=2){var h="",x,_;if(m.length===2){for(x=0;x<2;x++)if(_=b(m[x]),_){h=f;break}}var D=g("pattern",h);if(D===f)for(x=0;x<2;x++)_=b(m[x]),_&&(A.bounds[x]=m[x]=_-1);if(D)for(x=0;x<2;x++)switch(_=m[x],D){case f:if(!u(_)){A.enabled=!1;return}if(_=+_,_!==Math.floor(_)||_<0||_>=7){A.enabled=!1;return}A.bounds[x]=m[x]=_;break;case d:if(!u(_)){A.enabled=!1;return}if(_=+_,_<0||_>24){A.enabled=!1;return}A.bounds[x]=m[x]=_;break}if(E.autorange===!1){var C=E.range;if(C[0]C[1]){A.enabled=!1;return}}else if(m[0]>C[0]&&m[1]g[1]-1/4096&&(l.domain=p),v.noneOrAll(S.domain,l.domain,p),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),n6=xe({"src/plots/cartesian/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=wi(),w=Kf().isUnifiedHover,S=k_(),l=Cs(),e=np(),t=$c(),a=X_(),r=p0(),n=yv(),i=sg(),s=fu(),c=s.id2name,p=s.name2id,f=lc().AX_ID_PATTERN,d=Ci(),y=d.traceIs,o=d.getComponentMethod;function b(M,A,E){Array.isArray(M[A])?M[A].push(E):M[A]=[E]}O.exports=function(A,E,g){var T=E.autotypenumbers,m={},h={},x={},_={},D={},C={},F={},I={},z={},R={},k,B;for(k=0;k rect").call(S.setTranslate,0,0).call(S.setScale,1,1),E.plot.call(S.setTranslate,g._offset,T._offset).call(S.setScale,1,1);var m=E.plot.selectAll(".scatterlayer .trace");m.selectAll(".point").call(S.setPointGroupScale,1,1),m.selectAll(".textpoint").call(S.setTextPointsScale,1,1),m.call(S.hideOutsideRangePoints,E)}function c(E,g){var T=E.plotinfo,m=T.xaxis,h=T.yaxis,x=m._length,_=h._length,D=!!E.xr1,C=!!E.yr1,F=[];if(D){var I=w.simpleMap(E.xr0,m.r2l),z=w.simpleMap(E.xr1,m.r2l),R=I[1]-I[0],k=z[1]-z[0];F[0]=(I[0]*(1-g)+g*z[0]-I[0])/(I[1]-I[0])*x,F[2]=x*(1-g+g*k/R),m.range[0]=m.l2r(I[0]*(1-g)+g*z[0]),m.range[1]=m.l2r(I[1]*(1-g)+g*z[1])}else F[0]=0,F[2]=x;if(C){var B=w.simpleMap(E.yr0,h.r2l),N=w.simpleMap(E.yr1,h.r2l),q=B[1]-B[0],Y=N[1]-N[0];F[1]=(B[1]*(1-g)+g*N[1]-B[1])/(B[0]-B[1])*_,F[3]=_*(1-g+g*Y/q),h.range[0]=m.l2r(B[0]*(1-g)+g*N[0]),h.range[1]=h.l2r(B[1]*(1-g)+g*N[1])}else F[1]=0,F[3]=_;l.drawOne(t,m,{skipTitle:!0}),l.drawOne(t,h,{skipTitle:!0}),l.redrawComponents(t,[m._id,h._id]);var ee=D?x/F[2]:1,te=C?_/F[3]:1,ae=D?F[0]:0,j=C?F[1]:0,G=D?F[0]/F[2]*x:0,K=C?F[1]/F[3]*_:0,H=m._offset-G,Z=h._offset-K;T.clipRect.call(S.setTranslate,ae,j).call(S.setScale,1/ee,1/te),T.plot.call(S.setTranslate,H,Z).call(S.setScale,ee,te),S.setPointGroupScale(T.zoomScalePts,1/ee,1/te),S.setTextPointsScale(T.zoomScaleTxt,1/ee,1/te)}var p;n&&(p=n());function f(){for(var E={},g=0;gr.duration?(f(),b=window.cancelAnimationFrame(A)):b=window.requestAnimationFrame(A)}return y=Date.now(),b=window.requestAnimationFrame(A),Promise.resolve()}}}),Nu=xe({"src/plots/cartesian/index.js"(U){"use strict";var O=Na(),u=Ci(),v=Sr(),w=zl(),S=go(),l=df().getModuleCalcData,e=fu(),t=lc(),a=fh(),r=v.ensureSingle;function n(y,o,b){return v.ensureSingle(y,o,b,function(M){M.datum(b)})}var i=t.zindexSeparator;U.name="cartesian",U.attr=["xaxis","yaxis"],U.idRoot=["x","y"],U.idRegex=t.idRegex,U.attrRegex=t.attrRegex,U.attributes=a6(),U.layoutAttributes=$c(),U.supplyLayoutDefaults=n6(),U.transitionAxes=i6(),U.finalizeSubplots=function(y,o){var b=o._subplots,M=b.xaxis,A=b.yaxis,E=b.cartesian,g=E,T={},m={},h,x,_;for(h=0;h0){var C=D.id;if(C.indexOf(i)!==-1)continue;C+=i+(h+1),D=v.extendFlat({},D,{id:C,plot:A._cartesianlayer.selectAll(".subplot").select("."+C)})}for(var F=[],I,z=0;z1&&(q+=i+N),B.push(T+q),g=0;g1,_=o.mainplotinfo;if(!o.mainplot||x)if(h)o.xlines=r(M,"path","xlines-above"),o.ylines=r(M,"path","ylines-above"),o.xaxislayer=r(M,"g","xaxislayer-above"),o.yaxislayer=r(M,"g","yaxislayer-above");else{if(!g){var D=r(M,"g","layer-subplot");o.shapelayer=r(D,"g","shapelayer"),o.imagelayer=r(D,"g","imagelayer"),_&&x?(o.minorGridlayer=_.minorGridlayer,o.gridlayer=_.gridlayer,o.zerolinelayer=_.zerolinelayer):(o.minorGridlayer=r(M,"g","minor-gridlayer"),o.gridlayer=r(M,"g","gridlayer"),o.zerolinelayer=r(M,"g","zerolinelayer"));var C=r(M,"g","layer-between");o.shapelayerBetween=r(C,"g","shapelayer"),o.imagelayerBetween=r(C,"g","imagelayer"),r(M,"path","xlines-below"),r(M,"path","ylines-below"),o.overlinesBelow=r(M,"g","overlines-below"),r(M,"g","xaxislayer-below"),r(M,"g","yaxislayer-below"),o.overaxesBelow=r(M,"g","overaxes-below")}o.overplot=r(M,"g","overplot"),o.plot=r(o.overplot,"g",A),_&&x?o.zerolinelayerAbove=_.zerolinelayerAbove:o.zerolinelayerAbove=r(M,"g","zerolinelayer-above"),g||(o.xlines=r(M,"path","xlines-above"),o.ylines=r(M,"path","ylines-above"),o.overlinesAbove=r(M,"g","overlines-above"),r(M,"g","xaxislayer-above"),r(M,"g","yaxislayer-above"),o.overaxesAbove=r(M,"g","overaxes-above"),o.xlines=M.select(".xlines-"+T),o.ylines=M.select(".ylines-"+m),o.xaxislayer=M.select(".xaxislayer-"+T),o.yaxislayer=M.select(".yaxislayer-"+m))}else{var F=_.plotgroup,I=A+"-x",z=A+"-y";o.minorGridlayer=_.minorGridlayer,o.gridlayer=_.gridlayer,o.zerolinelayer=_.zerolinelayer,o.zerolinelayerAbove=_.zerolinelayerAbove,r(_.overlinesBelow,"path",I),r(_.overlinesBelow,"path",z),r(_.overaxesBelow,"g",I),r(_.overaxesBelow,"g",z),o.plot=r(_.overplot,"g",A),r(_.overlinesAbove,"path",I),r(_.overlinesAbove,"path",z),r(_.overaxesAbove,"g",I),r(_.overaxesAbove,"g",z),o.xlines=F.select(".overlines-"+T).select("."+I),o.ylines=F.select(".overlines-"+m).select("."+z),o.xaxislayer=F.select(".overaxes-"+T).select("."+I),o.yaxislayer=F.select(".overaxes-"+m).select("."+z)}g||(h||(n(o.minorGridlayer,"g",o.xaxis._id),n(o.minorGridlayer,"g",o.yaxis._id),o.minorGridlayer.selectAll("g").map(function(R){return R[0]}).sort(e.idSort),n(o.gridlayer,"g",o.xaxis._id),n(o.gridlayer,"g",o.yaxis._id),o.gridlayer.selectAll("g").map(function(R){return R[0]}).sort(e.idSort)),o.xlines.style("fill","none").classed("crisp",!0),o.ylines.style("fill","none").classed("crisp",!0))}function f(y,o){if(y){var b={};y.each(function(m){var h=m[0],x=O.select(this);x.remove(),d(h,o),b[h]=!0});for(var M in o._plots)for(var A=o._plots[M],E=A.overlays||[],g=0;g=0,o=n.indexOf("end")>=0,b=c.backoff*f+i.standoff,M=p.backoff*d+i.startstandoff,A,E,g,T;if(s.nodeName==="line"){A={x:+r.attr("x1"),y:+r.attr("y1")},E={x:+r.attr("x2"),y:+r.attr("y2")};var m=A.x-E.x,h=A.y-E.y;if(g=Math.atan2(h,m),T=g+Math.PI,b&&M&&b+M>Math.sqrt(m*m+h*h)){q();return}if(b){if(b*b>m*m+h*h){q();return}var x=b*Math.cos(g),_=b*Math.sin(g);E.x+=x,E.y+=_,r.attr({x2:E.x,y2:E.y})}if(M){if(M*M>m*m+h*h){q();return}var D=M*Math.cos(g),C=M*Math.sin(g);A.x-=D,A.y-=C,r.attr({x1:A.x,y1:A.y})}}else if(s.nodeName==="path"){var F=s.getTotalLength(),I="";if(F2/3?fa="right":fa="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[fa]}for(var De=!1,qe=["x","y"],Ne=0;Ne1)&&(yt===ot?(We=At.r2fraction(M["a"+ut]),(We<0||We>1)&&(De=!0)):De=!0),Re=At._offset+At.r2p(M[ut]),Ie=.5}else{var pt=He==="domain";ut==="x"?(ye=M[ut],Re=pt?At._offset+At._length*ye:Re=h.l+h.w*ye):(ye=1-M[ut],Re=pt?At._offset+At._length*ye:Re=h.t+h.h*ye),Ie=M.showarrow?.5:ye}if(M.showarrow){Ee.head=Re;var ct=M["a"+ut];if(Fe=Zt*be(.5,M.xanchor)-vr*be(.5,M.yanchor),yt===ot){var ft=e.getRefType(yt);ft==="domain"?(ut==="y"&&(ct=1-ct),Ee.tail=At._offset+At._length*ct):ft==="paper"?ut==="y"?(ct=1-ct,Ee.tail=h.t+h.h*ct):Ee.tail=h.l+h.w*ct:Ee.tail=At._offset+At.r2p(ct),he=Fe}else Ee.tail=Re+ct,he=Fe+ct;Ee.text=Ee.tail+Fe;var mt=m[ut==="x"?"width":"height"];if(ot==="paper"&&(Ee.head=S.constrain(Ee.head,1,mt-1)),yt==="pixel"){var _t=-Math.max(Ee.tail-3,Ee.text),Bt=Math.min(Ee.tail+3,Ee.text)-mt;_t>0?(Ee.tail+=_t,Ee.text+=_t):Bt>0&&(Ee.tail-=Bt,Ee.text-=Bt)}Ee.tail+=at,Ee.head+=at}else Fe=Ut*be(Ie,Jt),he=Fe,Ee.text=Re+Fe;Ee.text+=at,Fe+=at,he+=at,M["_"+ut+"padplus"]=Ut/2+he,M["_"+ut+"padminus"]=Ut/2-he,M["_"+ut+"size"]=Ut,M["_"+ut+"shift"]=Fe}if(De){ae.remove();return}var Et=0,hr=0;if(M.align!=="left"&&(Et=(ce-Oe)*(M.align==="center"?.5:1)),M.valign!=="top"&&(hr=(ie-_e)*(M.valign==="middle"?.5:1)),Ce)Se.select("svg").attr({x:K+Et-1,y:K+hr}).call(a.setClipUrl,Z?R:null,b);else{var $r=K+hr-Ue.top,ca=K+Et-Ue.left;re.call(n.positionText,ca,$r).call(a.setClipUrl,Z?R:null,b)}X.select("rect").call(a.setRect,K,K,ce,ie),H.call(a.setRect,j/2,j/2,se-j,ne-j),ae.call(a.setTranslate,Math.round(k.x.text-se/2),Math.round(k.y.text-ne/2)),q.attr({transform:"rotate("+B+","+k.x.text+","+k.y.text+")"});var na=function(pa,fa){N.selectAll(".annotation-arrow-g").remove();var za=k.x.head,Ia=k.y.head,Va=k.x.tail+pa,Oa=k.y.tail+fa,tn=k.x.text+pa,ka=k.y.text+fa,oi=S.rotationXYMatrix(B,tn,ka),$n=S.apply2DTransform(oi),bn=S.apply2DTransform2(oi),ci=+H.attr("width"),hi=+H.attr("height"),Pi=tn-.5*ci,Jn=Pi+ci,Ti=ka-.5*hi,_n=Ti+hi,Ln=[[Pi,Ti,Pi,_n],[Pi,_n,Jn,_n],[Jn,_n,Jn,Ti],[Jn,Ti,Pi,Ti]].map(bn);if(!Ln.reduce(function(Ze,xt){return Ze^!!S.segmentsIntersect(za,Ia,za+1e6,Ia+1e6,xt[0],xt[1],xt[2],xt[3])},!1)){Ln.forEach(function(Ze){var xt=S.segmentsIntersect(Va,Oa,za,Ia,Ze[0],Ze[1],Ze[2],Ze[3]);xt&&(Va=xt.x,Oa=xt.y)});var ji=M.arrowwidth,Zi=M.arrowcolor,un=M.arrowside,rn=N.append("g").style({opacity:t.opacity(Zi)}).classed("annotation-arrow-g",!0),nt=rn.append("path").attr("d","M"+Va+","+Oa+"L"+za+","+Ia).style("stroke-width",ji+"px").call(t.stroke,t.rgb(Zi));if(p(nt,un,M),x.annotationPosition&&nt.node().parentNode&&!E){var Ke=za,Qt=Ia;if(M.standoff){var Xt=Math.sqrt(Math.pow(za-Va,2)+Math.pow(Ia-Oa,2));Ke+=M.standoff*(Va-za)/Xt,Qt+=M.standoff*(Oa-Ia)/Xt}var nr=rn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Va-Ke)+","+(Oa-Qt),transform:l(Ke,Qt)}).style("stroke-width",ji+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),cr,rr;s.init({element:nr.node(),gd:b,prepFn:function(){var Ze=a.getTranslate(ae);cr=Ze.x,rr=Ze.y,g&&g.autorange&&F(g._name+".autorange",!0),T&&T.autorange&&F(T._name+".autorange",!0)},moveFn:function(Ze,xt){var Vt=$n(cr,rr),er=Vt[0]+Ze,Tr=Vt[1]+xt;ae.call(a.setTranslate,er,Tr),I("x",y(g,Ze,"x",h,M)),I("y",y(T,xt,"y",h,M)),M.axref===M.xref&&I("ax",y(g,Ze,"ax",h,M)),M.ayref===M.yref&&I("ay",y(T,xt,"ay",h,M)),rn.attr("transform",l(Ze,xt)),q.attr({transform:"rotate("+B+","+er+","+Tr+")"})},doneFn:function(){v.call("_guiRelayout",b,z());var Ze=document.querySelector(".js-notes-box-panel");Ze&&Ze.redraw(Ze.selectedObj)}})}}};if(M.showarrow&&na(0,0),Y){var wa;s.init({element:ae.node(),gd:b,prepFn:function(){wa=q.attr("transform")},moveFn:function(pa,fa){var za="pointer";if(M.showarrow)M.axref===M.xref?I("ax",y(g,pa,"ax",h,M)):I("ax",M.ax+pa),M.ayref===M.yref?I("ay",y(T,fa,"ay",h.w,M)):I("ay",M.ay+fa),na(pa,fa);else{if(E)return;var Ia,Va;if(g)Ia=y(g,pa,"x",h,M);else{var Oa=M._xsize/h.w,tn=M.x+(M._xshift-M.xshift)/h.w-Oa/2;Ia=s.align(tn+pa/h.w,Oa,0,1,M.xanchor)}if(T)Va=y(T,fa,"y",h,M);else{var ka=M._ysize/h.h,oi=M.y-(M._yshift+M.yshift)/h.h-ka/2;Va=s.align(oi-fa/h.h,ka,0,1,M.yanchor)}I("x",Ia),I("y",Va),(!g||!T)&&(za=s.getCursor(g?.5:Ia,T?.5:Va,M.xanchor,M.yanchor))}q.attr({transform:l(pa,fa)+wa}),i(ae,za)},clickFn:function(pa,fa){M.captureevents&&b.emit("plotly_clickannotation",te(fa))},doneFn:function(){i(ae),v.call("_guiRelayout",b,z());var pa=document.querySelector(".js-notes-box-panel");pa&&pa.redraw(pa.selectedObj)}})}}x.annotationText?re.call(n.makeEditable,{delegate:ae,gd:b}).call(ue).on("edit",function(ge){M.text=ge,this.call(ue),I("text",ge),g&&g.autorange&&F(g._name+".autorange",!0),T&&T.autorange&&F(T._name+".autorange",!0),v.call("_guiRelayout",b,z())}):re.call(ue)}}}),l6=xe({"src/components/annotations/click.js"(U,O){"use strict";var u=Sr(),v=Ci(),w=Cs().arrayEditor;O.exports={hasClickToShow:S,onClick:l};function S(a,r){var n=e(a,r);return n.on.length>0||n.explicitOff.length>0}function l(a,r){var n=e(a,r),i=n.on,s=n.off.concat(n.explicitOff),c={},p=a._fullLayout.annotations,f,d;if(i.length||s.length){for(f=0;f1){i=!0;break}}i?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(n._pdata=v(l.glplot.cameraParams,[e.xaxis.r2l(n.x)*t[0],e.yaxis.r2l(n.y)*t[1],e.zaxis.r2l(n.z)*t[2]]),u(l.graphDiv,n,r,l.id,n._xa,n._ya))}}}}),m6=xe({"src/components/annotations3d/index.js"(U,O){"use strict";var u=Ci(),v=Sr();O.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:ug()}}},layoutAttributes:ug(),handleDefaults:d6(),includeBasePlot:w,convert:v6(),draw:p6()};function w(S,l){var e=u.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,a=Object.keys(S),r=0;r{var _=x+"anchor",D=x==="x"?b:M,C={_fullLayout:n},F,I,z,R;let k=x+"ref",B=a[k];if(Array.isArray(B)&&B.length>0){let N=l.countDefiningCoords(d,p,x);R=v.coerceRefArray(a,r,C,x,void 0,"paper",N),r["_"+x+"refArray"]=!0}else R=v.coerceRef(a,r,C,x,void 0,"paper");if(Array.isArray(R))R.forEach(function(N){v.getRefType(N)==="range"&&(F=v.getFromId(C,N),F&&F._shapeIndices.indexOf(r._index)===-1&&F._shapeIndices.push(r._index))}),y&&[0,1].forEach(function(N){let q=R[N];v.getRefType(q)==="range"?(F=v.getFromId(C,q),I=l.shapePositionToRange(F),z=l.rangeToShapePosition(F),(F.type==="category"||F.type==="multicategory")&&i(x+N+"shift")):I=z=u.identity;let ee=x+N,te=a[ee];if(a[ee]=I(a[ee],!0),D==="pixel"?i(ee,E[N]):v.coercePosition(r,C,i,q,ee,A[N]),r[ee]=z(r[ee]),a[ee]=te,N===0&&D==="pixel"){let ae=a[_];a[_]=I(a[_],!0),v.coercePosition(r,C,i,q,_,.25),r[_]=z(r[_]),a[_]=ae}});else{if(v.getRefType(R)==="range"?(F=v.getFromId(C,R),F._shapeIndices.push(r._index),z=l.rangeToShapePosition(F),I=l.shapePositionToRange(F),y&&(F.type==="category"||F.type==="multicategory")&&(i(x+"0shift"),i(x+"1shift"))):I=z=u.identity,y){let q=x+"0",Y=x+"1",ee=a[q],te=a[Y];a[q]=I(a[q],!0),a[Y]=I(a[Y],!0),D==="pixel"?(i(q,E[0]),i(Y,E[1])):(v.coercePosition(r,C,i,R,q,A[0]),v.coercePosition(r,C,i,R,Y,A[1])),r[q]=z(r[q]),r[Y]=z(r[Y]),a[q]=ee,a[Y]=te}if(D==="pixel"){let q=a[_];a[_]=I(a[_],!0),v.coercePosition(r,C,i,R,_,.25),r[_]=z(r[_]),a[_]=q}}}),y&&u.noneOrAll(a,r,["x0","x1","y0","y1"]);var g=d==="line",T,m;if(y&&(T=i("label.texttemplate"),i("label.texttemplatefallback")),T||(m=i("label.text")),m||T){i("label.textangle");var h=i("label.textposition",g?"middle":"middle center");i("label.xanchor"),i("label.yanchor",e(g,h)),i("label.padding"),u.coerceFont(i,"label.font",n.font)}}}}),y6=xe({"src/components/shapes/draw_newshape/defaults.js"(U,O){"use strict";var u=wi(),v=Sr();function w(S,l){return S?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}O.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),v.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var a=t("newshape.line.width");if(a){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",u.contrast(r)),t("newshape.line.dash")}var n=l.dragmode==="drawline",i=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),i||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",n?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",w(n,c)),t("newshape.label.padding"),v.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),_6=xe({"src/components/shapes/calc_autorange.js"(U,O){"use strict";var u=Sr(),v=uo(),w=u0(),S=Nd();O.exports=function(i){var s=i._fullLayout,c=u.filterVisible(s.shapes);if(!(!c.length||!i._fullData.length))for(var p=0;p{d=v.getFromId(i,A),f._extremes[d._id]=v.findExtremes(d,E,e(f))})}else f.xref!=="paper"&&o!=="domain"&&(d=v.getFromId(i,f.xref),y=r(d,f,w.paramIsX),y&&(f._extremes[d._id]=v.findExtremes(d,y,e(f))));if(b==="array"){let M=l(i,f,"y");Object.entries(M).forEach(([A,E])=>{d=v.getFromId(i,A),f._extremes[d._id]=v.findExtremes(d,E,t(f))})}else f.yref!=="paper"&&b!=="domain"&&(d=v.getFromId(i,f.yref),y=r(d,f,w.paramIsY),y&&(f._extremes[d._id]=v.findExtremes(d,y,t(f))))}};function l(n,i,s){let c=i[s+"ref"],p=s==="x"?w.paramIsX:w.paramIsY;function f(A,E){A==="paper"||v.getRefType(A)==="domain"||(d[A]||(d[A]=[]),d[A].push(E))}let d={};if(i.type==="path"&&i.path){let A=i.path.match(w.segmentRE)||[];for(var y=0,o=0;oT&&(f(c[y],m[T]),y++)}}else f(c[0],i[s+"0"]),f(c[1],i[s+"1"]);let b={};for(let A in d){let E=v.getFromId(n,A);if(E){var M=E.type==="category"||E.type==="multicategory"?E.r2c:E.d2c;E.type==="date"&&(M=S.decodeDate(M)),b[E._id]=d[A].map(M)}}return b}function e(n){return a(n.line.width,n.xsizemode,n.x0,n.x1,n.path,!1)}function t(n){return a(n.line.width,n.ysizemode,n.y0,n.y1,n.path,!0)}function a(n,i,s,c,p,f){var d=n/2,y=f;if(i==="pixel"){var o=p?S.extractPathCoords(p,f?w.paramIsY:w.paramIsX):[s,c],b=u.aggNums(Math.max,null,o),M=u.aggNums(Math.min,null,o),A=M<0?Math.abs(M)+d:d,E=b>0?b+d:d;return{ppad:d,ppadplus:y?A:E,ppadminus:y?E:A}}else return{ppad:d}}function r(n,i,s){var c=n._id.charAt(0)==="x"?"x":"y",p=n.type==="category"||n.type==="multicategory",f,d,y=0,o=0,b=p?n.r2c:n.d2c,M=i[c+"sizemode"]==="scaled";if(M?(f=i[c+"0"],d=i[c+"1"],p&&(y=i[c+"0shift"],o=i[c+"1shift"])):(f=i[c+"anchor"],d=i[c+"anchor"]),f!==void 0)return[b(f)+y,b(d)+o];if(i.path){var A=1/0,E=-1/0,g=i.path.match(w.segmentRE),T,m,h,x,_;for(n.type==="date"&&(b=S.decodeDate(b)),T=0;TE&&(E=_)));if(E>=A)return[A,E]}}}}),b6=xe({"src/components/shapes/index.js"(U,O){"use strict";var u=Qm();O.exports={moduleType:"component",name:"shapes",layoutAttributes:K_(),supplyLayoutDefaults:g6(),supplyDrawNewShapeDefaults:y6(),includeBasePlot:d0()("shapes"),calcAutorange:_6(),draw:u.draw,drawOne:u.drawOne}}}),J_=xe({"src/components/images/attributes.js"(U,O){"use strict";var u=lc(),v=Cs().templatedArray,w=h0();O.exports=v("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",u.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",u.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),x6=xe({"src/components/images/defaults.js"(U,O){"use strict";var u=Sr(),v=uo(),w=bf(),S=J_(),l="images";O.exports=function(a,r){var n={name:l,handleItemDefaults:e};w(a,r,n)};function e(t,a,r){function n(b,M){return u.coerce(t,a,S,b,M)}var i=n("source"),s=n("visible",!!i);if(!s)return a;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var c={_fullLayout:r},p=["x","y"],f=0;f<2;f++){var d=p[f],y=v.coerceRef(t,a,c,d,"paper",void 0);if(y!=="paper"){var o=v.getFromId(c,y);o._imgIndices.push(a._index)}v.coercePosition(a,c,n,y,d,0)}return a}}}),w6=xe({"src/components/images/draw.js"(U,O){"use strict";var u=Na(),v=go(),w=uo(),S=fu(),l=fh();O.exports=function(t){var a=t._fullLayout,r=[],n={},i=[],s,c;for(c=0;c0);p&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),u.noneOrAll(r,n,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),u.coerceFont(s,"font",i.font),s("bgcolor",i.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function a(r,n){function i(c,p){return u.coerce(r,n,e,c,p)}var s=i("visible",r.method==="skip"||Array.isArray(r.args));s&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}}),S6=xe({"src/components/updatemenus/scrollbox.js"(U,O){"use strict";O.exports=l;var u=Na(),v=wi(),w=go(),S=Sr();function l(e,t,a){this.gd=e,this.container=t,this.id=a,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,a,r){var n=this.gd._fullLayout,i=n.width,s=n.height;this.position=t;var c=this.position.l,p=this.position.w,f=this.position.t,d=this.position.h,y=this.position.direction,o=y==="down",b=y==="left",M=y==="right",A=y==="up",E=p,g=d,T,m,h,x;!o&&!b&&!M&&!A&&(this.position.direction="down",o=!0);var _=o||A;_?(T=c,m=T+E,o?(h=f,x=Math.min(h+g,s),g=x-h):(x=f+g,h=Math.max(x-g,0),g=x-h)):(h=f,x=h+g,b?(m=c+E,T=Math.max(m-E,0),E=m-T):(T=c,m=Math.min(T+E,i),E=m-T)),this._box={l:T,t:h,w:E,h:g};var D=p>E,C=l.barLength+2*l.barPad,F=l.barWidth+2*l.barPad,I=c,z=f+d;z+F>s&&(z=s-F);var R=this.container.selectAll("rect.scrollbar-horizontal").data(D?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-horizontal",!0).call(v.fill,l.barColor),D?(this.hbar=R.attr({rx:l.barRadius,ry:l.barRadius,x:I,y:z,width:C,height:F}),this._hbarXMin=I+C/2,this._hbarTranslateMax=E-C):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var k=d>g,B=l.barWidth+2*l.barPad,N=l.barLength+2*l.barPad,q=c+p,Y=f;q+B>i&&(q=i-B);var ee=this.container.selectAll("rect.scrollbar-vertical").data(k?[0]:[]);ee.exit().on(".drag",null).remove(),ee.enter().append("rect").classed("scrollbar-vertical",!0).call(v.fill,l.barColor),k?(this.vbar=ee.attr({rx:l.barRadius,ry:l.barRadius,x:q,y:Y,width:B,height:N}),this._vbarYMin=Y+N/2,this._vbarTranslateMax=g-N):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var te=this.id,ae=T-.5,j=k?m+B+.5:m+.5,G=h-.5,K=D?x+F+.5:x+.5,H=n._topdefs.selectAll("#"+te).data(D||k?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",te).append("rect"),D||k?(this._clipRect=H.select("rect").attr({x:Math.floor(ae),y:Math.floor(G),width:Math.ceil(j)-Math.floor(ae),height:Math.ceil(K)-Math.floor(G)}),this.container.call(w.setClipUrl,te,this.gd),this.bg.attr({x:c,y:f,width:p,height:d})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(w.setClipUrl,null),delete this._clipRect),D||k){var Z=u.behavior.drag().on("dragstart",function(){u.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Z);var X=u.behavior.drag().on("dragstart",function(){u.event.sourceEvent.preventDefault(),u.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));D&&this.hbar.on(".drag",null).call(X),k&&this.vbar.on(".drag",null).call(X)}this.setTranslate(a,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(w.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)},l.prototype._onBoxDrag=function(){var t=this.translateX,a=this.translateY;this.hbar&&(t-=u.event.dx),this.vbar&&(a-=u.event.dy),this.setTranslate(t,a)},l.prototype._onBoxWheel=function(){var t=this.translateX,a=this.translateY;this.hbar&&(t+=u.event.deltaY),this.vbar&&(a+=u.event.deltaY),this.setTranslate(t,a)},l.prototype._onBarDrag=function(){var t=this.translateX,a=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax,i=S.constrain(u.event.x,r,n),s=(i-r)/(n-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var p=a+this._vbarYMin,f=p+this._vbarTranslateMax,d=S.constrain(u.event.y,p,f),y=(d-p)/(f-p),o=this.position.h-this._box.h;a=y*o}this.setTranslate(t,a)},l.prototype.setTranslate=function(t,a){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=S.constrain(t||0,0,r),a=S.constrain(a||0,0,n),this.translateX=t,this.translateY=a,this.container.call(w.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-a),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+a-.5)}),this.hbar){var i=t/r;this.hbar.call(w.setTranslate,t+i*this._hbarTranslateMax,a)}if(this.vbar){var s=a/n;this.vbar.call(w.setTranslate,t,a+s*this._vbarTranslateMax)}}}}),E6=xe({"src/components/updatemenus/draw.js"(U,O){"use strict";var u=Na(),v=zl(),w=wi(),S=go(),l=Sr(),e=el(),t=Cs().arrayEditor,a=uc().LINE_SPACING,r=cg(),n=S6();O.exports=function(C){var F=C._fullLayout,I=l.filterVisible(F[r.name]);function z(te){v.autoMargin(C,h(te))}var R=F._menulayer.selectAll("g."+r.containerClassName).data(I.length>0?[0]:[]);if(R.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),R.exit().each(function(){u.select(this).selectAll("g."+r.headerGroupClassName).each(z)}).remove(),I.length!==0){var k=R.selectAll("g."+r.headerGroupClassName).data(I,i);k.enter().append("g").classed(r.headerGroupClassName,!0);for(var B=l.ensureSingle(R,"g",r.dropdownButtonGroupClassName,function(te){te.style("pointer-events","all")}),N=0;N0?[0]:[]);q.enter().append("g").classed(r.containerClassName,!0).style("cursor",k?null:"ew-resize");function Y(j){j._commandObserver&&(j._commandObserver.remove(),delete j._commandObserver),v.autoMargin(R,p(j))}if(q.exit().each(function(){u.select(this).selectAll("g."+r.groupClassName).each(Y)}).remove(),N.length!==0){var ee=q.selectAll("g."+r.groupClassName).data(N,d);ee.enter().append("g").classed(r.groupClassName,!0),ee.exit().each(Y).remove();for(var te=0;te0&&(ee=ee.transition().duration(R.transition.duration).ease(R.transition.easing)),ee.attr("transform",e(Y-r.gripWidth*.5,R._dims.currentValueTotalHeight))}}function D(z,R){var k=z._dims;return k.inputAreaStart+r.stepInset+(k.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,R))}function C(z,R){var k=z._dims;return Math.min(1,Math.max(0,(R-r.stepInset-k.inputAreaStart)/(k.inputAreaLength-2*r.stepInset-2*k.inputAreaStart)))}function F(z,R,k){var B=k._dims,N=l.ensureSingle(z,"rect",r.railTouchRectClass,function(q){q.call(m,R,z,k).style("pointer-events","all")});N.attr({width:B.inputAreaLength,height:Math.max(B.inputAreaWidth,r.tickOffset+k.ticklen+B.labelHeight)}).call(w.fill,k.bgcolor).attr("opacity",0),S.setTranslate(N,0,B.currentValueTotalHeight)}function I(z,R){var k=R._dims,B=k.inputAreaLength-r.railInset*2,N=l.ensureSingle(z,"rect",r.railRectClass);N.attr({width:B,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(w.stroke,R.bordercolor).call(w.fill,R.bgcolor).style("stroke-width",R.borderwidth+"px"),S.setTranslate(N,r.railInset,(k.inputAreaWidth-r.railWidth)*.5+k.currentValueTotalHeight)}}}),P6=xe({"src/components/sliders/index.js"(U,O){"use strict";var u=m0();O.exports={moduleType:"component",name:u.name,layoutAttributes:eb(),supplyLayoutDefaults:C6(),draw:L6()}}}),fg=xe({"src/components/rangeslider/attributes.js"(U,O){"use strict";var u=sc();O.exports={bgcolor:{valType:"color",dflt:u.background,editType:"plot"},bordercolor:{valType:"color",dflt:u.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}}),tb=xe({"src/components/rangeslider/oppaxis_attributes.js"(U,O){"use strict";O.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}}),hg=xe({"src/components/rangeslider/constants.js"(U,O){"use strict";O.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),I6=xe({"src/components/rangeslider/helpers.js"(U){"use strict";var O=fu(),u=el(),v=hg(),w=uc().LINE_SPACING,S=v.name;function l(e){var t=e&&e[S];return t&&t.visible}U.isVisible=l,U.makeData=function(e){for(var t=O.list({_fullLayout:e},"x",!0),a=e.margin,r=[],n=0;n=Oe.max)Ce=ue[Ue+1];else if(Se=Oe.pmax)Ce=ue[Ue+1];else if(Se0?m.touches[0].clientX:0}function f(m,h,x,_){if(h._context.staticPlot)return;var D=m.select("rect."+c.slideBoxClassName).node(),C=m.select("rect."+c.grabAreaMinClassName).node(),F=m.select("rect."+c.grabAreaMaxClassName).node();function I(){var z=u.event,R=z.target,k=p(z),B=k-m.node().getBoundingClientRect().left,N=_.d2p(x._rl[0]),q=_.d2p(x._rl[1]),Y=i.coverSlip();this.addEventListener("touchmove",ee),this.addEventListener("touchend",te),Y.addEventListener("mousemove",ee),Y.addEventListener("mouseup",te);function ee(ae){var j=p(ae),G=+j-k,K,H,Z;switch(R){case D:if(Z="ew-resize",N+G>x._length||q+G<0)return;K=N+G,H=q+G;break;case C:if(Z="col-resize",N+G>x._length)return;K=N+G,H=q;break;case F:if(Z="col-resize",q+G<0)return;K=N,H=q+G;break;default:Z="ew-resize",K=B,H=B+G;break}if(H0);if(b){var M=a(i,s,c);y("x",M[0]),y("y",M[1]),u.noneOrAll(n,i,["x","y"]),y("xanchor"),y("yanchor"),u.coerceFont(y,"font",s.font);var A=y("bgcolor");y("activecolor",v.contrast(A,e.lightAmount,e.darkAmount)),y("bordercolor"),y("borderwidth")}};function t(r,n,i,s){var c=s.calendar;function p(y,o){return u.coerce(r,n,l.buttons,y,o)}var f=p("visible");if(f){var d=p("step");d!=="all"&&(c&&c!=="gregorian"&&(d==="month"||d==="year")?n.stepmode="backward":p("stepmode"),p("count")),p("label")}}function a(r,n,i){for(var s=i.filter(function(d){return n[d].anchor===r._id}),c=0,p=0;p1)){delete c.grid;return}if(!y&&!o&&!b){var x=T("pattern")==="independent";x&&(y=!0)}g._hasSubplotGrid=y;var _=T("roworder"),D=_==="top to bottom",C=y?.2:.1,F=y?.3:.1,I,z;M&&c._splomGridDflt&&(I=c._splomGridDflt.xside,z=c._splomGridDflt.yside),g._domains={x:r("x",T,C,I,h),y:r("y",T,F,z,m,D)}}function r(s,c,p,f,d,y){var o=c(s+"gap",p),b=c("domain."+s);c(s+"side",f);for(var M=new Array(d),A=b[0],E=(b[1]-A)/(d-o),g=E*(1-o),T=0;T0,f=t._context.staticPlot;a.each(function(d){var y=d[0].trace,o=y.error_x||{},b=y.error_y||{},M;y.ids&&(M=function(T){return T.id});var A=S.hasMarkers(y)&&y.marker.maxdisplayed>0;!b.visible&&!o.visible&&(d=[]);var E=u.select(this).selectAll("g.errorbar").data(d,M);if(E.exit().remove(),!!d.length){o.visible||E.selectAll("path.xerror").remove(),b.visible||E.selectAll("path.yerror").remove(),E.style("opacity",1);var g=E.enter().append("g").classed("errorbar",!0);p&&g.style("opacity",0).transition().duration(n.duration).style("opacity",1),w.setClipUrl(E,r.layerClipId,t),E.each(function(T){var m=u.select(this),h=l(T,s,c);if(!(A&&!T.vis)){var x,_=m.select("path.yerror");if(b.visible&&v(h.x)&&v(h.yh)&&v(h.ys)){var D=b.width;x="M"+(h.x-D)+","+h.yh+"h"+2*D+"m-"+D+",0V"+h.ys,h.noYS||(x+="m-"+D+",0h"+2*D),i=!_.size(),i?_=m.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0):p&&(_=_.transition().duration(n.duration).ease(n.easing)),_.attr("d",x)}else _.remove();var C=m.select("path.xerror");if(o.visible&&v(h.y)&&v(h.xh)&&v(h.xs)){var F=(o.copy_ystyle?b:o).width;x="M"+h.xh+","+(h.y-F)+"v"+2*F+"m0,-"+F+"H"+h.xs,h.noXS||(x+="m0,-"+F+"v"+2*F),i=!C.size(),i?C=m.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0):p&&(C=C.transition().duration(n.duration).ease(n.easing)),C.attr("d",x)}else C.remove()}})}})};function l(e,t,a){var r={x:t.c2p(e.x),y:a.c2p(e.y)};return e.yh!==void 0&&(r.yh=a.c2p(e.yh),r.ys=a.c2p(e.ys),v(r.ys)||(r.noYS=!0,r.ys=a.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),v(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),H6=xe({"src/components/errorbars/style.js"(U,O){"use strict";var u=Na(),v=wi();O.exports=function(S){S.each(function(l){var e=l[0].trace,t=e.error_y||{},a=e.error_x||{},r=u.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(v.stroke,t.color),a.copy_ystyle&&(a=t),r.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(v.stroke,a.color)})}}}),G6=xe({"src/components/errorbars/index.js"(U,O){"use strict";var u=Sr(),v=Hl().overrideAll,w=nb(),S={error_x:u.extendFlat({},w),error_y:u.extendFlat({},w)};delete S.error_x.copy_zstyle,delete S.error_y.copy_zstyle,delete S.error_y.copy_ystyle;var l={error_x:u.extendFlat({},w),error_y:u.extendFlat({},w),error_z:u.extendFlat({},w)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,O.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:S,bar:S,histogram:S,scatter3d:v(l,"calc","nested"),scattergl:v(S,"calc","nested")}},supplyDefaults:j6(),calc:q6(),makeComputeError:ib(),plot:V6(),style:H6(),hoverInfo:e};function e(t,a,r){(a.error_y||{}).visible&&(r.yerr=t.yh-t.y,a.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(a.error_x||{}).visible&&(r.xerr=t.xh-t.x,a.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),W6=xe({"src/components/colorbar/constants.js"(U,O){"use strict";O.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),Y6=xe({"src/components/colorbar/draw.js"(U,O){"use strict";var u=Na(),v=zl(),w=Ci(),S=uo(),l=Bf(),e=Sr(),t=e.strTranslate,a=oo().extendFlat,r=Mh(),n=go(),i=wi(),s=gv(),c=el(),p=vf().flipScale,f=p0(),d=sg(),y=$c(),o=uc(),b=o.LINE_SPACING,M=o.FROM_TL,A=o.FROM_BR,E=W6().cn;function g(D){var C=D._fullLayout,F=C._infolayer.selectAll("g."+E.colorbar).data(T(D),function(I){return I._id});F.enter().append("g").attr("class",function(I){return I._id}).classed(E.colorbar,!0),F.each(function(I){var z=u.select(this);e.ensureSingle(z,"rect",E.cbbg),e.ensureSingle(z,"g",E.cbfills),e.ensureSingle(z,"g",E.cblines),e.ensureSingle(z,"g",E.cbaxis,function(k){k.classed(E.crisp,!0)}),e.ensureSingle(z,"g",E.cbtitleunshift,function(k){k.append("g").classed(E.cbtitle,!0)}),e.ensureSingle(z,"rect",E.cboutline);var R=m(z,I,D);R&&R.then&&(D._promises||[]).push(R),D._context.edits.colorbarPosition&&h(z,I,D)}),F.exit().each(function(I){v.autoMargin(D,I._id)}).remove(),F.order()}function T(D){var C=D._fullLayout,F=D.calcdata,I=[],z,R,k,B;function N(X){return a(X,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function q(){typeof B.calc=="function"?B.calc(D,k,z):(z._fillgradient=R.reversescale?p(R.colorscale):R.colorscale,z._zrange=[R[B.min],R[B.max]])}for(var Y=0;Y1){var at=Math.pow(10,Math.floor(Math.log(Jt)/Math.LN10));vr*=at*e.roundUp(Jt/at,[2,5,10]),(Math.abs(Ce.start)/Ce.size+1e-6)%1<2e-6&&(It.tick0=0)}It.dtick=vr}It.domain=I?[yt+j/$.h,yt+ne-j/$.h]:[yt+ae/$.w,yt+ne-ae/$.w],It.setScale(),D.attr("transform",t(Math.round($.l),Math.round($.t)));var Ee=D.select("."+E.cbtitleunshift).attr("transform",t(-Math.round($.l),-Math.round($.t))),Re=It.ticklabelposition,he=It.title.font.size,ye=D.select("."+E.cbaxis),Ie,Fe=0,He=0;function We(_t,Bt){var Et={propContainer:It,propName:C._propPrefix+"title.text",traceIndex:C._traceIndex,_meta:C._meta,placeholder:X._dfltTitle.colorbar,containerGroup:D.select("."+E.cbtitle)},hr=_t.charAt(0)==="h"?_t.slice(1):"h"+_t;D.selectAll("."+hr+",."+hr+"-math-group").remove(),s.draw(F,_t,a(Et,Bt||{}))}function pt(){if(I&&Zt||!I&&!Zt){var _t,Bt;pe==="top"&&(_t=ae+$.l+be*G,Bt=j+$.t+De*(1-yt-ne)+3+he*.75),pe==="bottom"&&(_t=ae+$.l+be*G,Bt=j+$.t+De*(1-yt)-3-he*.25),pe==="right"&&(Bt=j+$.t+De*K+3+he*.75,_t=ae+$.l+be*yt),We(It._id+"title",{attributes:{x:_t,y:Bt,"text-anchor":I?"start":"middle"}})}}function ct(){if(I&&!Zt||!I&&Zt){var _t=It.position||0,Bt=It._offset+It._length/2,Et,hr;if(pe==="right")hr=Bt,Et=$.l+be*_t+10+he*(It.showticklabels?1:.5);else if(Et=Bt,pe==="bottom"&&(hr=$.t+De*_t+10+(Re.indexOf("inside")===-1?It.tickfont.size:0)+(It.ticks!=="inside"&&C.ticklen||0)),pe==="top"){var $r=ue.text.split("
").length;hr=$.t+De*_t+10-ce-b*he*$r}We((I?"h":"v")+It._id+"title",{avoid:{selection:u.select(F).selectAll("g."+It._id+"tick"),side:pe,offsetTop:I?0:$.t,offsetLeft:I?$.l:0,maxShift:I?X.width:X.height},attributes:{x:Et,y:hr,"text-anchor":"middle"},transform:{rotate:I?-90:0,offset:0}})}}function ft(){if(!I&&!Zt||I&&Zt){var _t=D.select("."+E.cbtitle),Bt=_t.select("text"),Et=[-N/2,N/2],hr=_t.select(".h"+It._id+"title-math-group").node(),$r=15.6;Bt.node()&&($r=parseInt(Bt.node().style.fontSize,10)*b);var ca;if(hr?(ca=n.bBox(hr),He=ca.width,Fe=ca.height,Fe>$r&&(Et[1]-=(Fe-$r)/2)):Bt.node()&&!Bt.classed(E.jsPlaceholder)&&(ca=n.bBox(Bt.node()),He=ca.width,Fe=ca.height),I){if(Fe){if(Fe+=5,pe==="top")It.domain[1]-=Fe/$.h,Et[1]*=-1;else{It.domain[0]+=Fe/$.h;var na=c.lineCount(Bt);Et[1]+=(1-na)*$r}_t.attr("transform",t(Et[0],Et[1])),It.setScale()}}else He&&(pe==="right"&&(It.domain[0]+=(He+he/2)/$.w),_t.attr("transform",t(Et[0],Et[1])),It.setScale())}D.selectAll("."+E.cbfills+",."+E.cblines).attr("transform",I?t(0,Math.round($.h*(1-It.domain[1]))):t(Math.round($.w*It.domain[0]),0)),ye.attr("transform",I?t(0,Math.round(-$.t)):t(Math.round(-$.l),0));var wa=D.select("."+E.cbfills).selectAll("rect."+E.cbfill).attr("style","").data(Oe);wa.enter().append("rect").classed(E.cbfill,!0).attr("style",""),wa.exit().remove();var pa=ge.map(It.c2p).map(Math.round).sort(function(Oa,tn){return Oa-tn});wa.each(function(Oa,tn){var ka=[tn===0?ge[0]:(Oe[tn]+Oe[tn-1])/2,tn===Oe.length-1?ge[1]:(Oe[tn]+Oe[tn+1])/2].map(It.c2p).map(Math.round);I&&(ka[1]=e.constrain(ka[1]+(ka[1]>ka[0])?1:-1,pa[0],pa[1]));var oi=u.select(this).attr(I?"x":"y",qe).attr(I?"y":"x",u.min(ka)).attr(I?"width":"height",Math.max(ce,2)).attr(I?"height":"width",Math.max(u.max(ka)-u.min(ka),2));if(C._fillgradient)n.gradient(oi,F,C._id,I?"vertical":"horizontalreversed",C._fillgradient,"fill");else{var $n=Se(Oa).replace("e-","");oi.attr("fill",i.color($n).hex())}});var fa=D.select("."+E.cblines).selectAll("path."+E.cbline).data(re.color&&re.width?_e:[]);fa.enter().append("path").classed(E.cbline,!0),fa.exit().remove(),fa.each(function(Oa){var tn=qe,ka=Math.round(It.c2p(Oa))+re.width/2%1;u.select(this).attr("d","M"+(I?tn+","+ka:ka+","+tn)+(I?"h":"v")+ce).call(n.lineGroupStyle,re.width,Te(Oa),re.dash)}),ye.selectAll("g."+It._id+"tick,path").remove();var za=qe+ce+(N||0)/2-(C.ticks==="outside"?1:0),Ia=S.calcTicks(It),Va=S.getTickSigns(It)[2];return S.drawTicks(F,It,{vals:It.ticks==="inside"?S.clipEnds(It,Ia):Ia,layer:ye,path:S.makeTickPath(It,za,Va),transFn:S.makeTransTickFn(It)}),S.drawLabels(F,It,{vals:Ia,layer:ye,transFn:S.makeTransTickLabelFn(It),labelFns:S.makeLabelFns(It,za)})}function mt(){var _t,Bt=ce+N/2;Re.indexOf("inside")===-1&&(_t=n.bBox(ye.node()),Bt+=I?_t.width:_t.height),Ie=Ee.select("text");var Et=0,hr=I&&pe==="top",$r=!I&&pe==="right",ca=0;if(Ie.node()&&!Ie.classed(E.jsPlaceholder)){var na,wa=Ee.select(".h"+It._id+"title-math-group").node();wa&&(I&&Zt||!I&&!Zt)?(_t=n.bBox(wa),Et=_t.width,na=_t.height):(_t=n.bBox(Ee.node()),Et=_t.right-$.l-(I?qe:At),na=_t.bottom-$.t-(I?At:qe),!I&&pe==="top"&&(Bt+=_t.height,ca=_t.height)),$r&&(Ie.attr("transform",t(Et/2+he/2,0)),Et*=2),Bt=Math.max(Bt,I?Et:na)}var pa=(I?ae:j)*2+Bt+q+N/2,fa=0;!I&&ue.text&&te==="bottom"&&K<=0&&(fa=pa/2,pa+=fa,ca+=fa),X._hColorbarMoveTitle=fa,X._hColorbarMoveCBTitle=ca;var za=q+N,Ia=(I?qe:At)-za/2-(I?ae:0),Va=(I?At:qe)-(I?se:j+ca-fa);D.select("."+E.cbbg).attr("x",Ia).attr("y",Va).attr(I?"width":"height",Math.max(pa-fa,2)).attr(I?"height":"width",Math.max(se+za,2)).call(i.fill,Y).call(i.stroke,C.bordercolor).style("stroke-width",q);var Oa=$r?Math.max(Et-10,0):0;D.selectAll("."+E.cboutline).attr("x",(I?qe:At+ae)+Oa).attr("y",(I?At+j-se:qe)+(hr?Fe:0)).attr(I?"width":"height",Math.max(ce,2)).attr(I?"height":"width",Math.max(se-(I?2*j+Fe:2*ae+Oa),2)).call(i.stroke,C.outlinecolor).style({fill:"none","stroke-width":N});var tn=I?Ne*pa:0,ka=I?0:(1-ut)*pa-ca;if(tn=Z?$.l-tn:-tn,ka=H?$.t-ka:-ka,D.attr("transform",t(tn,ka)),!I&&(q||i.opacity(Y)&&!i.equals(X.paper_bgcolor,Y))){var oi=ye.selectAll("text"),$n=oi[0].length,bn=D.select("."+E.cbbg).node(),ci=n.bBox(bn),hi=n.getTranslate(D),Pi=2;oi.each(function(Ke,Qt){var Xt=0,nr=$n-1;if(Qt===Xt||Qt===nr){var cr=n.bBox(this),rr=n.getTranslate(this),Ze;if(Qt===nr){var xt=cr.right+rr.x,Vt=ci.right+hi.x+At-q-Pi+G;Ze=Vt-xt,Ze>0&&(Ze=0)}else if(Qt===Xt){var er=cr.left+rr.x,Tr=ci.left+hi.x+At+q+Pi;Ze=Tr-er,Ze<0&&(Ze=0)}Ze&&($n<3?this.setAttribute("transform","translate("+Ze+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Jn={},Ti=M[ee],_n=A[ee],Ln=M[te],ji=A[te],Zi=pa-ce;I?(R==="pixels"?(Jn.y=K,Jn.t=se*Ln,Jn.b=se*ji):(Jn.t=Jn.b=0,Jn.yt=K+z*Ln,Jn.yb=K-z*ji),B==="pixels"?(Jn.x=G,Jn.l=pa*Ti,Jn.r=pa*_n):(Jn.l=Zi*Ti,Jn.r=Zi*_n,Jn.xl=G-k*Ti,Jn.xr=G+k*_n)):(R==="pixels"?(Jn.x=G,Jn.l=se*Ti,Jn.r=se*_n):(Jn.l=Jn.r=0,Jn.xl=G+z*Ti,Jn.xr=G-z*_n),B==="pixels"?(Jn.y=1-K,Jn.t=pa*Ln,Jn.b=pa*ji):(Jn.t=Zi*Ln,Jn.b=Zi*ji,Jn.yt=K-k*Ln,Jn.yb=K+k*ji));var un=C.y<.5?"b":"t",rn=C.x<.5?"l":"r";F._fullLayout._reservedMargin[C._id]={};var nt={r:X.width-Ia-tn,l:Ia+Jn.r,b:X.height-Va-ka,t:Va+Jn.b};Z&&H?v.autoMargin(F,C._id,Jn):Z?F._fullLayout._reservedMargin[C._id][un]=nt[un]:H||I?F._fullLayout._reservedMargin[C._id][rn]=nt[rn]:F._fullLayout._reservedMargin[C._id][un]=nt[un]}return e.syncOrAsync([v.previousPromises,pt,ft,ct,v.previousPromises,mt],F)}function h(D,C,F){var I=C.orientation==="v",z=F._fullLayout,R=z._size,k,B,N;l.init({element:D.node(),gd:F,prepFn:function(){k=D.attr("transform"),r(D)},moveFn:function(q,Y){D.attr("transform",k+t(q,Y)),B=l.align((I?C._uFrac:C._vFrac)+q/R.w,I?C._thickFrac:C._lenFrac,0,1,C.xanchor),N=l.align((I?C._vFrac:1-C._uFrac)-Y/R.h,I?C._lenFrac:C._thickFrac,0,1,C.yanchor);var ee=l.getCursor(B,N,C.xanchor,C.yanchor);r(D,ee)},doneFn:function(){if(r(D),B!==void 0&&N!==void 0){var q={};q[C._propPrefix+"x"]=B,q[C._propPrefix+"y"]=N,C._traceIndex!==void 0?w.call("_guiRestyle",F,q,C._traceIndex):w.call("_guiRelayout",F,q)}}})}function x(D,C,F){var I=C._levels,z=[],R=[],k,B,N=I.end+I.size/100,q=I.size,Y=1.001*F[0]-.001*F[1],ee=1.001*F[1]-.001*F[0];for(B=0;B<1e5&&(k=I.start+B*q,!(q>0?k>=N:k<=N));B++)k>Y&&k0?k>=N:k<=N));B++)k>F[0]&&k-1}O.exports=function(a,r){var n,i=a.data,s=a.layout,c=S([],i),p=S({},s,l(r.tileClass)),f=a._context||{};if(r.width&&(p.width=r.width),r.height&&(p.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){p.annotations=[];var d=Object.keys(p);for(n=0;n=0)return f}else if(typeof f=="string"&&(f=f.trim(),f.slice(-1)==="%"&&u(f.slice(0,-1))&&(f=+f.slice(0,-1),f>=0)))return f+"%"}function p(f,d,y,o,b,M){M=M||{};var A=M.moduleHasSelected!==!1,E=M.moduleHasUnselected!==!1,g=M.moduleHasConstrain!==!1,T=M.moduleHasCliponaxis!==!1,m=M.moduleHasTextangle!==!1,h=M.moduleHasInsideanchor!==!1,x=!!M.hasPathbar,_=Array.isArray(b)||b==="auto",D=_||b==="inside",C=_||b==="outside";if(D||C){var F=n(o,"textfont",y.font),I=v.extendFlat({},F),z=f.textfont&&f.textfont.color,R=!z;if(R&&delete I.color,n(o,"insidetextfont",I),x){var k=v.extendFlat({},F);R&&delete k.color,n(o,"pathbar.textfont",k)}C&&n(o,"outsidetextfont",F),A&&o("selected.textfont.color"),E&&o("unselected.textfont.color"),g&&o("constraintext"),T&&o("cliponaxis"),m&&o("textangle"),o("texttemplate"),o("texttemplatefallback")}D&&h&&o("insidetextanchor")}O.exports={supplyDefaults:i,crossTraceDefaults:s,handleText:p,validateCornerradius:c}}}),sb=xe({"src/traces/bar/layout_defaults.js"(U,O){"use strict";var u=Ci(),v=uo(),w=Sr(),S=vg(),l=sh().validateCornerradius;O.exports=function(e,t,a){function r(A,E){return w.coerce(e,t,S,A,E)}for(var n=!1,i=!1,s=!1,c={},p=r("barmode"),f=p==="group",d=0;d0&&!c[o]&&(s=!0),c[o]=!0),y.visible&&y.type==="histogram"){var b=v.getFromId({_fullLayout:t},y[y.orientation==="v"?"xaxis":"yaxis"]);b.type!=="category"&&(i=!0)}}if(!n){delete t.barmode;return}p!=="overlay"&&r("barnorm"),r("bargap",i&&!s?0:.2),r("bargroupgap");var M=r("barcornerradius");t.barcornerradius=l(M)}}}),g0=xe({"src/traces/bar/arrays_to_calcdata.js"(U,O){"use strict";var u=Sr();O.exports=function(w,S){for(var l=0;lt;if(!a)return S}return l!==void 0?l:w.dflt},U.coerceColor=function(w,S,l){return O.isValid(S)?S:l!==void 0?l:w.dflt},U.coerceEnumerated=function(w,S,l){return w.coerceNumber&&(S=+S),w.values.indexOf(S)!==-1?S:l!==void 0?l:w.dflt},U.getValue=function(w,S){var l;return v(w)?S1||x.bargap===0&&x.bargroupgap===0&&!_[0].trace.marker.line.width)&&u.select(this).attr("shape-rendering","crispEdges")}),m.selectAll("g.points").each(function(_){var D=u.select(this),C=_[0].trace;c(D,C,T)}),l.getComponentMethod("errorbars","style")(m)}function c(T,m,h){w.pointStyle(T.selectAll("path"),m,h),p(T,m,h)}function p(T,m,h){T.selectAll("text").each(function(x){var _=u.select(this),D=S.ensureUniformFontSize(h,o(_,x,m,h));w.font(_,D)})}function f(T,m,h){var x=m[0].trace;x.selectedpoints?d(h,x,T):(c(h,x,T),l.getComponentMethod("errorbars","style")(h))}function d(T,m,h){w.selectedPointStyle(T.selectAll("path"),m),y(T.selectAll("text"),m,h)}function y(T,m,h){T.each(function(x){var _=u.select(this),D;if(x.selected){D=S.ensureUniformFontSize(h,o(_,x,m,h));var C=m.selected.textfont&&m.selected.textfont.color;C&&(D.color=C),w.font(_,D)}else w.selectedTextStyle(_,m)})}function o(T,m,h,x){var _=x._fullLayout.font,D=h.textfont;if(T.classed("bartext-inside")){var C=g(m,h);D=M(h,m.i,_,C)}else T.classed("bartext-outside")&&(D=A(h,m.i,_));return D}function b(T,m,h){return E(a,T.textfont,m,h)}function M(T,m,h,x){var _=b(T,m,h),D=T._input.textfont===void 0||T._input.textfont.color===void 0||Array.isArray(T.textfont.color)&&T.textfont.color[m]===void 0;return D&&(_={color:v.contrast(x),family:_.family,size:_.size,weight:_.weight,style:_.style,variant:_.variant,textcase:_.textcase,lineposition:_.lineposition,shadow:_.shadow}),E(r,T.insidetextfont,m,_)}function A(T,m,h){var x=b(T,m,h);return E(n,T.outsidetextfont,m,x)}function E(T,m,h,x){m=m||{};var _=i.getValue(m.family,h),D=i.getValue(m.size,h),C=i.getValue(m.color,h),F=i.getValue(m.weight,h),I=i.getValue(m.style,h),z=i.getValue(m.variant,h),R=i.getValue(m.textcase,h),k=i.getValue(m.lineposition,h),B=i.getValue(m.shadow,h);return{family:i.coerceString(T.family,_,x.family),size:i.coerceNumber(T.size,D,x.size),color:i.coerceColor(T.color,C,x.color),weight:i.coerceString(T.weight,F,x.weight),style:i.coerceString(T.style,I,x.style),variant:i.coerceString(T.variant,z,x.variant),textcase:i.coerceString(T.variant,R,x.textcase),lineposition:i.coerceString(T.variant,k,x.lineposition),shadow:i.coerceString(T.variant,B,x.shadow)}}function g(T,m){return m.type==="waterfall"?m[T.dir].marker.color:T.mcc||T.mc||m.marker.color}O.exports={style:s,styleTextPoints:p,styleOnSelect:f,getInsideTextFont:M,getOutsideTextFont:A,getBarColor:g,resizeText:e}}}),Tv=xe({"src/traces/bar/plot.js"(U,O){"use strict";var u=Na(),v=yn(),w=Sr(),S=el(),l=wi(),e=go(),t=Ci(),a=uo().tickText,r=wf(),n=r.recordMinTextSize,i=r.clearMinTextSize,s=ph(),c=mg(),p=Ud(),f=Gh(),d=f.text,y=f.textposition,o=Kf().appendArrayPointValue,b=p.TEXTPAD;function M(Y){return Y.id}function A(Y){if(Y.ids)return M}function E(Y){return(Y>0)-(Y<0)}function g(Y,ee){return Y0}function x(Y,ee,te,ae,j,G){var K=ee.xaxis,H=ee.yaxis,Z=Y._fullLayout,X=Y._context.staticPlot;j||(j={mode:Z.barmode,norm:Z.barmode,gap:Z.bargap,groupgap:Z.bargroupgap},i("bar",Z));var $=w.makeTraceGroups(ae,te,"trace bars").each(function(Q){var re=u.select(this),ue=Q[0].trace,pe=Q[0].t,ge=ue.type==="waterfall",Te=ue.type==="funnel",Se=ue.type==="histogram",Ce=ue.type==="bar",Ue=Ce||Te,Oe=0;ge&&ue.connector.visible&&ue.connector.mode==="between"&&(Oe=ue.connector.line.width/2);var _e=ue.orientation==="h",ce=h(j),ie=w.ensureSingle(re,"g","points"),se=A(ue),ne=ie.selectAll("g.point").data(w.identity,se);ne.enter().append("g").classed("point",!0),ne.exit().remove(),ne.each(function(De,qe){var Ne=u.select(this),ut=T(De,K,H,_e),ot=ut[0][0],yt=ut[0][1],At=ut[1][0],It=ut[1][1],Zt=(_e?yt-ot:It-At)===0;Zt&&Ue&&c.getLineWidth(ue,De)&&(Zt=!1),Zt||(Zt=!v(ot)||!v(yt)||!v(At)||!v(It)),De.isBlank=Zt,Zt&&(_e?yt=ot:It=At),Oe&&!Zt&&(_e?(ot-=g(ot,yt)*Oe,yt+=g(ot,yt)*Oe):(At-=g(At,It)*Oe,It+=g(At,It)*Oe));var vr,Ut;if(ue.type==="waterfall"){if(!Zt){var Jt=ue[De.dir].marker;vr=Jt.line.width,Ut=Jt.color}}else vr=c.getLineWidth(ue,De),Ut=De.mc||ue.marker.color;function at(Ia){var Va=u.round(vr/2%1,2);return j.gap===0&&j.groupgap===0?u.round(Math.round(Ia)-Va,2):Ia}function Ee(Ia,Va,Oa){return Oa&&Ia===Va?Ia:Math.abs(Ia-Va)>=2?at(Ia):Ia>Va?Math.ceil(Ia):Math.floor(Ia)}var Re=l.opacity(Ut),he=Re<1||vr>.01?at:Ee;Y._context.staticPlot||(ot=he(ot,yt,_e),yt=he(yt,ot,_e),At=he(At,It,!_e),It=he(It,At,!_e));var ye=_e?K.c2p:H.c2p,Ie;De.s0>0?Ie=De._sMax:De.s0<0?Ie=De._sMin:Ie=De.s1>0?De._sMax:De._sMin;function Fe(Ia,Va){if(!Ia)return 0;var Oa=Math.abs(_e?It-At:yt-ot),tn=Math.abs(_e?yt-ot:It-At),ka=he(Math.abs(ye(Ie,!0)-ye(0,!0))),oi=De.hasB?Math.min(Oa/2,tn/2):Math.min(Oa/2,ka),$n;if(Va==="%"){var bn=Math.min(50,Ia);$n=Oa*(bn/100)}else $n=Ia;return he(Math.max(Math.min($n,oi),0))}var He=Ce||Se?Fe(pe.cornerradiusvalue,pe.cornerradiusform):0,We,pt,ct="M"+ot+","+At+"V"+It+"H"+yt+"V"+At+"Z",ft=0;if(He&&De.s){var mt=E(De.s0)===0||E(De.s)===E(De.s0)?De.s1:De.s0;if(ft=he(De.hasB?0:Math.abs(ye(Ie,!0)-ye(mt,!0))),ft0?Math.sqrt(ft*(2*He-ft)):0,ca=_t>0?Math.max:Math.min;We="M"+ot+","+At+"V"+(It-hr*Bt)+"H"+ca(yt-(He-ft)*_t,ot)+"A "+He+","+He+" 0 0 "+Et+" "+yt+","+(It-He*Bt-$r)+"V"+(At+He*Bt+$r)+"A "+He+","+He+" 0 0 "+Et+" "+ca(yt-(He-ft)*_t,ot)+","+(At+hr*Bt)+"Z"}else if(De.hasB)We="M"+(ot+He*_t)+","+At+"A "+He+","+He+" 0 0 "+Et+" "+ot+","+(At+He*Bt)+"V"+(It-He*Bt)+"A "+He+","+He+" 0 0 "+Et+" "+(ot+He*_t)+","+It+"H"+(yt-He*_t)+"A "+He+","+He+" 0 0 "+Et+" "+yt+","+(It-He*Bt)+"V"+(At+He*Bt)+"A "+He+","+He+" 0 0 "+Et+" "+(yt-He*_t)+","+At+"Z";else{pt=Math.abs(It-At)+ft;var na=pt0?Math.sqrt(ft*(2*He-ft)):0,pa=Bt>0?Math.max:Math.min;We="M"+(ot+na*_t)+","+At+"V"+pa(It-(He-ft)*Bt,At)+"A "+He+","+He+" 0 0 "+Et+" "+(ot+He*_t-wa)+","+It+"H"+(yt-He*_t+wa)+"A "+He+","+He+" 0 0 "+Et+" "+(yt-na*_t)+","+pa(It-(He-ft)*Bt,At)+"V"+At+"Z"}}else We=ct}else We=ct;var fa=m(w.ensureSingle(Ne,"path"),Z,j,G);if(fa.style("vector-effect",X?"none":"non-scaling-stroke").attr("d",isNaN((yt-ot)*(It-At))||Zt&&Y._context.staticPlot?"M0,0Z":We).call(e.setClipUrl,ee.layerClipId,Y),!Z.uniformtext.mode&&ce){var za=e.makePointStyleFns(ue);e.singlePointStyle(De,fa,ue,za,Y)}_(Y,ee,Ne,Q,qe,ot,yt,At,It,He,ft,j,G),ee.layerClipId&&e.hideOutsideRangePoint(De,Ne.select("text"),K,H,ue.xcalendar,ue.ycalendar)});var be=ue.cliponaxis===!1;e.setClipUrl(re,be?null:ee.layerClipId,Y)});t.getComponentMethod("errorbars","plot")(Y,$,ee,j)}function _(Y,ee,te,ae,j,G,K,H,Z,X,$,Q,re){var ue=ee.xaxis,pe=ee.yaxis,ge=Y._fullLayout,Te;function Se(pt,ct,ft){var mt=w.ensureSingle(pt,"text").text(ct).attr({class:"bartext bartext-"+Te,"text-anchor":"middle","data-notex":1}).call(e.font,ft).call(S.convertToTspans,Y);return mt}var Ce=ae[0].trace,Ue=Ce.orientation==="h",Oe=k(ge,ae,j,ue,pe);Te=B(Ce,j);var _e=Q.mode==="stack"||Q.mode==="relative",ce=ae[j],ie=!_e||ce._outmost,se=ce.hasB,ne=X&&X-$>b;if(!Oe||Te==="none"||(ce.isBlank||G===K||H===Z)&&(Te==="auto"||Te==="inside")){te.select("text").remove();return}var be=ge.font,De=s.getBarColor(ae[j],Ce),qe=s.getInsideTextFont(Ce,j,be,De),Ne=s.getOutsideTextFont(Ce,j,be),ut=Ce.insidetextanchor||"end",ot=te.datum();Ue?ue.type==="log"&&ot.s0<=0&&(ue.range[0]0&&at>0,he;ne?se?he=D(It-2*X,Zt,Jt,at,Ue)||D(It,Zt-2*X,Jt,at,Ue):Ue?he=D(It-(X-$),Zt,Jt,at,Ue)||D(It,Zt-2*(X-$),Jt,at,Ue):he=D(It,Zt-(X-$),Jt,at,Ue)||D(It-2*(X-$),Zt,Jt,at,Ue):he=D(It,Zt,Jt,at,Ue),Re&&he?Te="inside":(Te="outside",vr.remove(),vr=null)}else Te="inside";if(!vr){Ee=w.ensureUniformFontSize(Y,Te==="outside"?Ne:qe),vr=Se(te,Oe,Ee);var ye=vr.attr("transform");if(vr.attr("transform",""),Ut=e.bBox(vr.node()),Jt=Ut.width,at=Ut.height,vr.attr("transform",ye),Jt<=0||at<=0){vr.remove();return}}var Ie=Ce.textangle,Fe,He;Te==="outside"?(He=Ce.constraintext==="both"||Ce.constraintext==="outside",Fe=R(G,K,H,Z,Ut,{isHorizontal:Ue,constrained:He,angle:Ie})):(He=Ce.constraintext==="both"||Ce.constraintext==="inside",Fe=I(G,K,H,Z,Ut,{isHorizontal:Ue,constrained:He,angle:Ie,anchor:ut,hasB:se,r:X,overhead:$})),Fe.fontSize=Ee.size,n(Ce.type==="histogram"?"bar":Ce.type,Fe,ge),ce.transform=Fe;var We=m(vr,ge,Q,re);w.setTransormAndDisplay(We,Fe)}function D(Y,ee,te,ae,j){if(Y<0||ee<0)return!1;var G=te<=Y&&ae<=ee,K=te<=ee&&ae<=Y,H=j?Y>=te*(ee/ae):ee>=ae*(Y/te);return G||K||H}function C(Y){return Y==="auto"?0:Y}function F(Y,ee){var te=Math.PI/180*ee,ae=Math.abs(Math.sin(te)),j=Math.abs(Math.cos(te));return{x:Y.width*j+Y.height*ae,y:Y.width*ae+Y.height*j}}function I(Y,ee,te,ae,j,G){var K=!!G.isHorizontal,H=!!G.constrained,Z=G.angle||0,X=G.anchor,$=X==="end",Q=X==="start",re=G.leftToRight||0,ue=(re+1)/2,pe=1-ue,ge=G.hasB,Te=G.r,Se=G.overhead,Ce=j.width,Ue=j.height,Oe=Math.abs(ee-Y),_e=Math.abs(ae-te),ce=Oe>2*b&&_e>2*b?b:0;Oe-=2*ce,_e-=2*ce;var ie=C(Z);Z==="auto"&&!(Ce<=Oe&&Ue<=_e)&&(Ce>Oe||Ue>_e)&&(!(Ce>_e||Ue>Oe)||Ceb){var De=z(Y,ee,te,ae,se,Te,Se,K,ge);ne=De.scale,be=De.pad}else ne=1,H&&(ne=Math.min(1,Oe/se.x,_e/se.y)),be=0;var qe=j.left*pe+j.right*ue,Ne=(j.top+j.bottom)/2,ut=(Y+b)*pe+(ee-b)*ue,ot=(te+ae)/2,yt=0,At=0;if(Q||$){var It=(K?se.x:se.y)/2;Te&&($||ge)&&(ce+=be);var Zt=K?g(Y,ee):g(te,ae);K?Q?(ut=Y+Zt*ce,yt=-Zt*It):(ut=ee-Zt*ce,yt=Zt*It):Q?(ot=te+Zt*ce,At=-Zt*It):(ot=ae-Zt*ce,At=Zt*It)}return{textX:qe,textY:Ne,targetX:ut,targetY:ot,anchorX:yt,anchorY:At,scale:ne,rotate:ie}}function z(Y,ee,te,ae,j,G,K,H,Z){var X=Math.max(0,Math.abs(ee-Y)-2*b),$=Math.max(0,Math.abs(ae-te)-2*b),Q=G-b,re=K?Q-Math.sqrt(Q*Q-(Q-K)*(Q-K)):Q,ue=Z?Q*2:H?Q-K:2*re,pe=Z?Q*2:H?2*re:Q-K,ge,Te,Se,Ce,Ue;return j.y/j.x>=$/(X-ue)?Ce=$/j.y:j.y/j.x<=($-pe)/X?Ce=X/j.x:!Z&&H?(ge=j.x*j.x+j.y*j.y/4,Te=-2*j.x*(X-Q)-j.y*($/2-Q),Se=(X-Q)*(X-Q)+($/2-Q)*($/2-Q)-Q*Q,Ce=(-Te+Math.sqrt(Te*Te-4*ge*Se))/(2*ge)):Z?(ge=(j.x*j.x+j.y*j.y)/4,Te=-j.x*(X/2-Q)-j.y*($/2-Q),Se=(X/2-Q)*(X/2-Q)+($/2-Q)*($/2-Q)-Q*Q,Ce=(-Te+Math.sqrt(Te*Te-4*ge*Se))/(2*ge)):(ge=j.x*j.x/4+j.y*j.y,Te=-j.x*(X/2-Q)-2*j.y*($-Q),Se=(X/2-Q)*(X/2-Q)+($-Q)*($-Q)-Q*Q,Ce=(-Te+Math.sqrt(Te*Te-4*ge*Se))/(2*ge)),Ce=Math.min(1,Ce),H?Ue=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-($-j.y*Ce)/2)*(Q-($-j.y*Ce)/2)))-K):Ue=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(X-j.x*Ce)/2)*(Q-(X-j.x*Ce)/2)))-K),{scale:Ce,pad:Ue}}function R(Y,ee,te,ae,j,G){var K=!!G.isHorizontal,H=!!G.constrained,Z=G.angle||0,X=j.width,$=j.height,Q=Math.abs(ee-Y),re=Math.abs(ae-te),ue;K?ue=re>2*b?b:0:ue=Q>2*b?b:0;var pe=1;H&&(pe=K?Math.min(1,re/$):Math.min(1,Q/X));var ge=C(Z),Te=F(j,ge),Se=(K?Te.x:Te.y)/2,Ce=(j.left+j.right)/2,Ue=(j.top+j.bottom)/2,Oe=(Y+ee)/2,_e=(te+ae)/2,ce=0,ie=0,se=K?g(ee,Y):g(te,ae);return K?(Oe=ee-se*ue,ce=se*Se):(_e=ae+se*ue,ie=-se*Se),{textX:Ce,textY:Ue,targetX:Oe,targetY:_e,anchorX:ce,anchorY:ie,scale:pe,rotate:ge}}function k(Y,ee,te,ae,j){var G=ee[0].trace,K=G.texttemplate,H;return K?H=N(Y,ee,te,ae,j):G.textinfo?H=q(ee,te,ae,j):H=c.getValue(G.text,te),c.coerceString(d,H)}function B(Y,ee){var te=c.getValue(Y.textposition,ee);return c.coerceEnumerated(y,te)}function N(Y,ee,te,ae,j){var G=ee[0].trace,K=w.castOption(G,te,"texttemplate");if(!K)return"";var H=G.type==="histogram",Z=G.type==="waterfall",X=G.type==="funnel",$=G.orientation==="h",Q,re,ue,pe;$?(Q="y",re=j,ue="x",pe=ae):(Q="x",re=ae,ue="y",pe=j);function ge(ce){return a(re,re.c2l(ce),!0).text}function Te(ce){return a(pe,pe.c2l(ce),!0).text}var Se=ee[te],Ce={};Ce.label=Se.p,Ce.labelLabel=Ce[Q+"Label"]=ge(Se.p);var Ue=w.castOption(G,Se.i,"text");(Ue===0||Ue)&&(Ce.text=Ue),Ce.value=Se.s,Ce.valueLabel=Ce[ue+"Label"]=Te(Se.s);var Oe={};o(Oe,G,Se.i),(H||Oe.x===void 0)&&(Oe.x=$?Ce.value:Ce.label),(H||Oe.y===void 0)&&(Oe.y=$?Ce.label:Ce.value),(H||Oe.xLabel===void 0)&&(Oe.xLabel=$?Ce.valueLabel:Ce.labelLabel),(H||Oe.yLabel===void 0)&&(Oe.yLabel=$?Ce.labelLabel:Ce.valueLabel),Z&&(Ce.delta=+Se.rawS||Se.s,Ce.deltaLabel=Te(Ce.delta),Ce.final=Se.v,Ce.finalLabel=Te(Ce.final),Ce.initial=Ce.final-Ce.delta,Ce.initialLabel=Te(Ce.initial)),X&&(Ce.value=Se.s,Ce.valueLabel=Te(Ce.value),Ce.percentInitial=Se.begR,Ce.percentInitialLabel=w.formatPercent(Se.begR),Ce.percentPrevious=Se.difR,Ce.percentPreviousLabel=w.formatPercent(Se.difR),Ce.percentTotal=Se.sumR,Ce.percenTotalLabel=w.formatPercent(Se.sumR));var _e=w.castOption(G,Se.i,"customdata");return _e&&(Ce.customdata=_e),w.texttemplateString({data:[Oe,Ce,G._meta],fallback:G.texttemplatefallback,labels:Ce,locale:Y._d3locale,template:K})}function q(Y,ee,te,ae){var j=Y[0].trace,G=j.orientation==="h",K=j.type==="waterfall",H=j.type==="funnel";function Z(_e){var ce=G?ae:te;return a(ce,_e,!0).text}function X(_e){var ce=G?te:ae;return a(ce,+_e,!0).text}var $=j.textinfo,Q=Y[ee],re=$.split("+"),ue=[],pe,ge=function(_e){return re.indexOf(_e)!==-1};if(ge("label")&&ue.push(Z(Y[ee].p)),ge("text")&&(pe=w.castOption(j,Q.i,"text"),(pe===0||pe)&&ue.push(pe)),K){var Te=+Q.rawS||Q.s,Se=Q.v,Ce=Se-Te;ge("initial")&&ue.push(X(Ce)),ge("delta")&&ue.push(X(Te)),ge("final")&&ue.push(X(Se))}if(H){ge("value")&&ue.push(X(Q.s));var Ue=0;ge("percent initial")&&Ue++,ge("percent previous")&&Ue++,ge("percent total")&&Ue++;var Oe=Ue>1;ge("percent initial")&&(pe=w.formatPercent(Q.begR),Oe&&(pe+=" of initial"),ue.push(pe)),ge("percent previous")&&(pe=w.formatPercent(Q.difR),Oe&&(pe+=" of previous"),ue.push(pe)),ge("percent total")&&(pe=w.formatPercent(Q.sumR),Oe&&(pe+=" of total"),ue.push(pe))}return ue.join("
")}O.exports={plot:x,toMoveInsideBar:I}}}),vp=xe({"src/traces/bar/hover.js"(U,O){"use strict";var u=hu(),v=Ci(),w=wi(),S=Sr().fillText,l=mg().getLineWidth,e=uo().hoverLabelText,t=Gn().BADNUM;function a(i,s,c,p,f){var d=r(i,s,c,p,f);if(d){var y=d.cd,o=y[0].trace,b=y[d.index];return d.color=n(o,b),v.getComponentMethod("errorbars","hoverInfo")(b,o,d),[d]}}function r(i,s,c,p,f){var d=i.cd,y=d[0].trace,o=d[0].t,b=p==="closest",M=y.type==="waterfall",A=i.maxHoverDistance,E=i.maxSpikeDistance,g,T,m,h,x,_,D;y.orientation==="h"?(g=c,T=s,m="y",h="x",x=ae,_=Y):(g=s,T=c,m="x",h="y",_=ae,x=Y);var C=y[m+"period"],F=b||C;function I(pe){return R(pe,-1)}function z(pe){return R(pe,1)}function R(pe,ge){var Te=pe.w;return pe[m]+ge*Te/2}function k(pe){return pe[m+"End"]-pe[m+"Start"]}var B=b?I:C?function(pe){return pe.p-k(pe)/2}:function(pe){return Math.min(I(pe),pe.p-o.bardelta/2)},N=b?z:C?function(pe){return pe.p+k(pe)/2}:function(pe){return Math.max(z(pe),pe.p+o.bardelta/2)};function q(pe,ge,Te){return f.finiteRange&&(Te=0),u.inbox(pe-g,ge-g,Te+Math.min(1,Math.abs(ge-pe)/D)-1)}function Y(pe){return q(B(pe),N(pe),A)}function ee(pe){return q(I(pe),z(pe),E)}function te(pe){var ge=pe[h];if(M){var Te=Math.abs(pe.rawS)||0;T>0?ge+=Te:T<0&&(ge-=Te)}return ge}function ae(pe){var ge=T,Te=pe.b,Se=te(pe);return u.inbox(Te-ge,Se-ge,A+(Se-ge)/(Se-Te)-1)}function j(pe){var ge=T,Te=pe.b,Se=te(pe);return u.inbox(Te-ge,Se-ge,E+(Se-ge)/(Se-Te)-1)}var G=i[m+"a"],K=i[h+"a"];D=Math.abs(G.r2c(G.range[1])-G.r2c(G.range[0]));function H(pe){return(x(pe)+_(pe))/2}var Z=u.getDistanceFunction(p,x,_,H);if(u.getClosest(d,Z,i),i.index!==!1&&d[i.index].p!==t){F||(B=function(pe){return Math.min(I(pe),pe.p-o.bargroupwidth/2)},N=function(pe){return Math.max(z(pe),pe.p+o.bargroupwidth/2)});var X=i.index,$=d[X],Q=y.base?$.b+$.s:$.s;i[h+"0"]=i[h+"1"]=K.c2p($[h],!0),i[h+"LabelVal"]=Q;var re=o.extents[o.extents.round($.p)];i[m+"0"]=G.c2p(b?B($):re[0],!0),i[m+"1"]=G.c2p(b?N($):re[1],!0);var ue=$.orig_p!==void 0;return i[m+"LabelVal"]=ue?$.orig_p:$.p,i.labelLabel=e(G,i[m+"LabelVal"],y[m+"hoverformat"]),i.valueLabel=e(K,i[h+"LabelVal"],y[h+"hoverformat"]),i.baseLabel=e(K,$.b,y[h+"hoverformat"]),i.spikeDistance=(j($)+ee($))/2,i[m+"Spike"]=G.c2p($.p,!0),S($,y,i),i.hovertemplate=y.hovertemplate,i}}function n(i,s){var c=s.mcc||i.marker.color,p=s.mlcc||i.marker.line.color,f=l(i,s);if(w.opacity(c))return c;if(w.opacity(p)&&f)return p}O.exports={hoverPoints:a,hoverOnBars:r,getTraceColor:n}}}),aM=xe({"src/traces/bar/event_data.js"(U,O){"use strict";O.exports=function(v,w,S){return v.x="xVal"in w?w.xVal:w.x,v.y="yVal"in w?w.yVal:w.y,w.xa&&(v.xaxis=w.xa),w.ya&&(v.yaxis=w.ya),S.orientation==="h"?(v.label=v.y,v.value=v.x):(v.label=v.x,v.value=v.y),v}}}),pp=xe({"src/traces/bar/select.js"(U,O){"use strict";O.exports=function(w,S){var l=w.cd,e=w.xaxis,t=w.yaxis,a=l[0].trace,r=a.type==="funnel",n=a.orientation==="h",i=[],s;if(S===!1)for(s=0;s0?(C="v",m>0?F=Math.min(x,h):F=Math.min(h)):m>0?(C="h",F=Math.min(x)):F=0;if(!F){c.visible=!1;return}c._length=F;var B=p("orientation",C);c._hasPreCompStats?B==="v"&&m===0?(p("x0",0),p("dx",1)):B==="h"&&T===0&&(p("y0",0),p("dy",1)):B==="v"&&m===0?p("x0"):B==="h"&&T===0&&p("y0");var N=v.getComponentMethod("calendars","handleTraceDefaults");N(s,c,["x","y"],f)}function n(s,c,p,f){var d=f.prefix,y=u.coerce2(s,c,t,"marker.outliercolor"),o=p("marker.line.outliercolor"),b="outliers";c._hasPreCompStats?b="all":(y||o)&&(b="suspectedoutliers");var M=p(d+"points",b);M?(p("jitter",M==="all"?.3:0),p("pointpos",M==="all"?-1.5:0),p("marker.symbol"),p("marker.opacity"),p("marker.size"),p("marker.angle"),p("marker.color",c.line.color),p("marker.line.color"),p("marker.line.width"),M==="suspectedoutliers"&&(p("marker.line.outliercolor",c.marker.color),p("marker.line.outlierwidth")),p("selected.marker.color"),p("unselected.marker.color"),p("selected.marker.size"),p("unselected.marker.size"),p("text"),p("hovertext")):delete c.marker;var A=p("hoveron");(A==="all"||A.indexOf("points")!==-1)&&(p("hovertemplate"),p("hovertemplatefallback")),u.coerceSelectionMarkerOpacity(c,p)}function i(s,c){var p,f;function d(M){return u.coerce(f._input,f,t,M)}for(var y=0;yte.uf};if(E._hasPreCompStats){var X=E[F],$=function(Zt){return C.d2c((E[Zt]||[])[_])},Q=1/0,re=-1/0;for(_=0;_=te.q1&&te.q3>=te.med){var pe=$("lowerfence");te.lf=pe!==l&&pe<=te.q1?pe:f(te,j,G);var ge=$("upperfence");te.uf=ge!==l&&ge>=te.q3?ge:d(te,j,G);var Te=$("mean");te.mean=Te!==l?Te:G?S.mean(j,G):(te.q1+te.q3)/2;var Se=$("sd");te.sd=Te!==l&&Se>=0?Se:G?S.stdev(j,G,te.mean):te.q3-te.q1,te.lo=y(te),te.uo=o(te);var Ce=$("notchspan");Ce=Ce!==l&&Ce>0?Ce:b(te,G),te.ln=te.med-Ce,te.un=te.med+Ce;var Ue=te.lf,Oe=te.uf;E.boxpoints&&j.length&&(Ue=Math.min(Ue,j[0]),Oe=Math.max(Oe,j[G-1])),E.notched&&(Ue=Math.min(Ue,te.ln),Oe=Math.max(Oe,te.un)),te.min=Ue,te.max=Oe}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+te.q1,"median = "+te.med,"q3 = "+te.q3].join(` -`));var _e;te.med!==l?_e=te.med:te.q1!==l?te.q3!==l?_e=(te.q1+te.q3)/2:_e=te.q1:te.q3!==l?_e=te.q3:_e=0,te.med=_e,te.q1=te.q3=_e,te.lf=te.uf=_e,te.mean=te.sd=_e,te.ln=te.un=_e,te.min=te.max=_e}Q=Math.min(Q,te.min),re=Math.max(re,te.max),te.pts2=ae.filter(Z),h.push(te)}}E._extremes[C._id]=v.findExtremes(C,[Q,re],{padded:!0})}else{var ce=C.makeCalcdata(E,F),ie=a(Y,ee),se=Y.length,ne=r(se);for(_=0;_=0&&be0){if(te={},te.pos=te[z]=Y[_],ae=te.pts=ne[_].sort(c),j=te[F]=ae.map(p),G=j.length,te.min=j[0],te.max=j[G-1],te.mean=S.mean(j,G),te.sd=S.stdev(j,G,te.mean)*E.sdmultiple,te.med=S.interp(j,.5),G%2&&(ut||ot)){var yt,At;ut?(yt=j.slice(0,G/2),At=j.slice(G/2+1)):ot&&(yt=j.slice(0,G/2+1),At=j.slice(G/2)),te.q1=S.interp(yt,.5),te.q3=S.interp(At,.5)}else te.q1=S.interp(j,.25),te.q3=S.interp(j,.75);te.lf=f(te,j,G),te.uf=d(te,j,G),te.lo=y(te),te.uo=o(te);var It=b(te,G);te.ln=te.med-It,te.un=te.med+It,De=Math.min(De,te.ln),qe=Math.max(qe,te.un),te.pts2=ae.filter(Z),h.push(te)}E.notched&&S.isTypedArray(ce)&&(ce=Array.from(ce)),E._extremes[C._id]=v.findExtremes(C,E.notched?ce.concat([De,qe]):ce,{padded:!0})}return s(h,E),h.length>0?(h[0].t={num:g[x],dPos:ee,posLetter:z,valLetter:F,labels:{med:e(A,"median:"),min:e(A,"min:"),q1:e(A,"q1:"),q3:e(A,"q3:"),max:e(A,"max:"),mean:E.boxmean==="sd"||E.sizemode==="sd"?e(A,"mean \xB1 \u03C3:").replace("\u03C3",E.sdmultiple===1?"\u03C3":E.sdmultiple+"\u03C3"):e(A,"mean:"),lf:e(A,"lower fence:"),uf:e(A,"upper fence:")}},g[x]++,h):[{t:{empty:!0}}]};function t(M,A,E,g){var T=A in M,m=A+"0"in M,h="d"+A in M;if(T||m&&h){var x=E.makeCalcdata(M,A),_=w(M,E,A,x).vals;return[_,x]}var D;m?D=M[A+"0"]:"name"in M&&(E.type==="category"||u(M.name)&&["linear","log"].indexOf(E.type)!==-1||S.isDateTime(M.name)&&E.type==="date")?D=M.name:D=g;for(var C=E.type==="multicategory"?E.r2c_just_indices(D):E.d2c(D,0,M[A+"calendar"]),F=M._length,I=new Array(F),z=0;z1,m=1-s[t+"gap"],h=1-s[t+"groupgap"];for(f=0;f0;if(C==="positive"?(te=F*(D?1:.5),G=j,ae=G=z):C==="negative"?(te=G=z,ae=F*(D?1:.5),K=j):(te=ae=F,G=K=j),re){var ue=x.pointpos,pe=x.jitter,ge=x.marker.size/2,Te=0;ue+pe>=0&&(Te=j*(ue+pe),Te>te?(Q=!0,X=ge,H=Te):Te>G&&(X=ge,H=te)),Te<=te&&(H=te);var Se=0;ue-pe<=0&&(Se=-j*(ue-pe),Se>ae?(Q=!0,$=ge,Z=Se):Se>K&&($=ge,Z=ae)),Se<=ae&&(Z=ae)}else H=te,Z=ae;var Ce=new Array(y.length);for(d=0;dE.lo&&(B.so=!0)}return T});A.enter().append("path").classed("point",!0),A.exit().remove(),A.call(w.translatePoints,p,f)}function r(n,i,s,c){var p=i.val,f=i.pos,d=!!f.rangebreaks,y=c.bPos,o=c.bPosPxOffset||0,b=s.boxmean||(s.meanline||{}).visible,M,A;Array.isArray(c.bdPos)?(M=c.bdPos[0],A=c.bdPos[1]):(M=c.bdPos,A=c.bdPos);var E=n.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?v.identity:[]);E.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),E.exit().remove(),E.each(function(g){var T=f.c2l(g.pos+y,!0),m=f.l2p(T-M)+o,h=f.l2p(T+A)+o,x=d?(m+h)/2:f.l2p(T)+o,_=p.c2p(g.mean,!0),D=p.c2p(g.mean-g.sd,!0),C=p.c2p(g.mean+g.sd,!0);s.orientation==="h"?u.select(this).attr("d","M"+_+","+m+"V"+h+(b==="sd"?"m0,0L"+D+","+x+"L"+_+","+m+"L"+C+","+x+"Z":"")):u.select(this).attr("d","M"+m+","+_+"H"+h+(b==="sd"?"m0,0L"+x+","+D+"L"+m+","+_+"L"+x+","+C+"Z":""))})}O.exports={plot:e,plotBoxAndWhiskers:t,plotPoints:a,plotBoxMean:r}}}),bg=xe({"src/traces/box/style.js"(U,O){"use strict";var u=Na(),v=wi(),w=go();function S(e,t,a){var r=a||u.select(e).selectAll("g.trace.boxes");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=u.select(this),s=n[0].trace,c=s.line.width;function p(y,o,b,M){y.style("stroke-width",o+"px").call(v.stroke,b).call(v.fill,M)}var f=i.selectAll("path.box");if(s.type==="candlestick")f.each(function(y){if(!y.empty){var o=u.select(this),b=s[y.dir];p(o,b.line.width,b.line.color,b.fillcolor),o.style("opacity",s.selectedpoints&&!y.selected?.3:1)}});else{p(f,c,s.line.color,s.fillcolor),i.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(v.stroke,s.line.color);var d=i.selectAll("path.point");w.pointStyle(d,s,e)}})}function l(e,t,a){var r=t[0].trace,n=a.selectAll("path.point");r.selectedpoints?w.selectedPointStyle(n,r):w.pointStyle(n,r,e)}O.exports={style:S,styleOnSelect:l}}}),ub=xe({"src/traces/box/hover.js"(U,O){"use strict";var u=uo(),v=Sr(),w=hu(),S=wi(),l=v.fillText;function e(r,n,i,s){var c=r.cd,p=c[0].trace,f=p.hoveron,d=[],y;return f.indexOf("boxes")!==-1&&(d=d.concat(t(r,n,i,s))),f.indexOf("points")!==-1&&(y=a(r,n,i)),s==="closest"?y?[y]:d:(y&&d.push(y),d)}function t(r,n,i,s){var c=r.cd,p=r.xa,f=r.ya,d=c[0].trace,y=c[0].t,o=d.type==="violin",b,M,A,E,g,T,m,h,x,_,D,C=y.bdPos,F,I,z=y.wHover,R=function(Se){return A.c2l(Se.pos)+y.bPos-A.c2l(T)};o&&d.side!=="both"?(d.side==="positive"&&(x=function(Se){var Ce=R(Se);return w.inbox(Ce,Ce+z,_)},F=C,I=0),d.side==="negative"&&(x=function(Se){var Ce=R(Se);return w.inbox(Ce-z,Ce,_)},F=0,I=C)):(x=function(Se){var Ce=R(Se);return w.inbox(Ce-z,Ce+z,_)},F=I=C);var k;o?k=function(Se){return w.inbox(Se.span[0]-g,Se.span[1]-g,_)}:k=function(Se){return w.inbox(Se.min-g,Se.max-g,_)},d.orientation==="h"?(g=n,T=i,m=k,h=x,b="y",A=f,M="x",E=p):(g=i,T=n,m=x,h=k,b="x",A=p,M="y",E=f);var B=Math.min(1,C/Math.abs(A.r2c(A.range[1])-A.r2c(A.range[0])));_=r.maxHoverDistance-B,D=r.maxSpikeDistance-B;function N(Se){return(m(Se)+h(Se))/2}var q=w.getDistanceFunction(s,m,h,N);if(w.getClosest(c,q,r),r.index===!1)return[];var Y=c[r.index],ee=d.line.color,te=(d.marker||{}).color;S.opacity(ee)&&d.line.width?r.color=ee:S.opacity(te)&&d.boxpoints?r.color=te:r.color=d.fillcolor,r[b+"0"]=A.c2p(Y.pos+y.bPos-I,!0),r[b+"1"]=A.c2p(Y.pos+y.bPos+F,!0),r[b+"LabelVal"]=Y.orig_p!==void 0?Y.orig_p:Y.pos;var ae=b+"Spike";r.spikeDistance=N(Y)*D/_,r[ae]=A.c2p(Y.pos,!0);var j=d.boxmean||d.sizemode==="sd"||(d.meanline||{}).visible,G=d.boxpoints||d.points,K=G&&j?["max","uf","q3","med","mean","q1","lf","min"]:G&&!j?["max","uf","q3","med","q1","lf","min"]:!G&&j?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],H=E.range[1]0&&(a=!0);for(var s=0;se){var t=e-S[v];return S[v]=e,t}}else return S[v]=e,e;return 0},max:function(v,w,S,l){var e=l[w];if(u(e))if(e=Number(e),u(S[v])){if(S[v]m&&mS){var _=h===v?1:6,D=h===v?"M12":"M1";return function(C,F){var I=y.c2d(C,v,o),z=I.indexOf("-",_);z>0&&(I=I.slice(0,z));var R=y.d2c(I,0,o);if(Rt?c>S?c>v*1.1?v:c>w*1.1?w:S:c>l?l:c>e?e:t:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function i(c,p,f,d,y,o){if(d&&c>S){var b=s(p,y,o),M=s(f,y,o),A=c===v?0:1;return b[A]!==M[A]}return Math.floor(f/c)-Math.floor(p/c)>.1}function s(c,p,f){var d=p.c2d(c,v,f).split("-");return d[0]===""&&(d.unshift(),d[0]="-"+d[0]),d}}}),mb=xe({"src/traces/histogram/calc.js"(U,O){"use strict";var u=yn(),v=Sr(),w=Ci(),S=uo(),{hasColorscale:l}=vf(),e=xf(),t=g0(),a=hb(),r=db(),n=vb(),i=pb();function s(y,o){var b=[],M=[],A=o.orientation==="h",E=S.getFromId(y,A?o.yaxis:o.xaxis),g=A?"y":"x",T={x:"y",y:"x"}[g],m=o[g+"calendar"],h=o.cumulative,x,_=c(y,o,E,g),D=_[0],C=_[1],F=typeof D.size=="string",I=[],z=F?I:D,R=[],k=[],B=[],N=0,q=o.histnorm,Y=o.histfunc,ee=q.indexOf("density")!==-1,te,ae,j;h.enabled&&ee&&(q=q.replace(/ ?density$/,""),ee=!1);var G=Y==="max"||Y==="min",K=G?null:0,H=a.count,Z=r[q],X=!1,$=function(be){return E.r2c(be,0,m)},Q;for(v.isArrayOrTypedArray(o[T])&&Y!=="count"&&(Q=o[T],X=Y==="avg",H=a[Y]),x=$(D.start),ae=$(D.end)+(x-S.tickIncrement(x,D.size,!1,m))/1e6;x=0&&j=ie;x--)if(M[x]){se=x;break}for(x=ie;x<=se;x++)if(u(b[x])&&u(M[x])){var ne={p:b[x],s:M[x],b:0};h.enabled||(ne.pts=B[x],ge?ne.ph0=ne.ph1=B[x].length?C[B[x][0]]:b[x]:(o._computePh=!0,ne.ph0=Oe(I[x]),ne.ph1=Oe(I[x+1],!0))),ce.push(ne)}return ce.length===1&&(ce[0].width1=S.tickIncrement(ce[0].p,D.size,!1,m)-ce[0].p),l(o,"marker")&&e(y,o,{vals:o.marker.color,containerStr:"marker",cLetter:"c"}),l(o,"marker.line")&&e(y,o,{vals:o.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(ce,o),v.isArrayOrTypedArray(o.selectedpoints)&&v.tagSelected(ce,o,Ce),ce}function c(y,o,b,M,A){var E,g=M+"bins",T=y._fullLayout,m=o["_"+M+"bingroup"],h=T._histogramBinOpts[m],x=T.barmode==="overlay",_,D,C,F,I,z,R,k=function(Oe){return b.r2c(Oe,0,F)},B=function(Oe){return b.c2r(Oe,0,F)},N=b.type==="date"?function(Oe){return Oe||Oe===0?v.cleanDate(Oe,null,F):null}:function(Oe){return u(Oe)?Number(Oe):null};function q(Oe,_e,ce){_e[Oe+"Found"]?(_e[Oe]=N(_e[Oe]),_e[Oe]===null&&(_e[Oe]=ce[Oe])):(z[Oe]=_e[Oe]=ce[Oe],v.nestedProperty(D[0],g+"."+Oe).set(ce[Oe]))}if(o["_"+M+"autoBinFinished"])delete o["_"+M+"autoBinFinished"];else{D=h.traces;var Y=[],ee=!0,te=!1,ae=!1;for(_=0;_b.r2l(re)&&(pe=S.tickIncrement(pe,h.size,!0,F)),Z.start=b.l2r(pe),Q||v.nestedProperty(o,g+".start").set(Z.start)}var ge=h.end,Te=b.r2l(H.end),Se=Te!==void 0;if((h.endFound||Se)&&Te!==b.r2l(ge)){var Ce=Se?Te:v.aggNums(Math.max,null,I);Z.end=b.l2r(Ce),Se||v.nestedProperty(o,g+".start").set(Z.end)}var Ue="autobin"+M;return o._input[Ue]===!1&&(o._input[g]=v.extendFlat({},o[g]||{}),delete o._input[Ue],delete o[Ue]),[Z,I]}function p(y,o,b,M,A){var E=y._fullLayout,g=f(y,o),T=!1,m=1/0,h=[o],x,_,D;for(x=0;x=0;M--)T(M);else if(o==="increasing"){for(M=1;M=0;M--)y[M]+=y[M+1];b==="exclude"&&(y.push(0),y.shift())}}O.exports={calc:s,calcAllAutoBins:c}}}),cM=xe({"src/traces/histogram2d/calc.js"(U,O){"use strict";var u=Sr(),v=uo(),w=hb(),S=db(),l=vb(),e=pb(),t=mb().calcAllAutoBins;O.exports=function(s,c){var p=v.getFromId(s,c.xaxis),f=v.getFromId(s,c.yaxis),d=c.xcalendar,y=c.ycalendar,o=function(Ee){return p.r2c(Ee,0,d)},b=function(Ee){return f.r2c(Ee,0,y)},M=function(Ee){return p.c2r(Ee,0,d)},A=function(Ee){return f.c2r(Ee,0,y)},E,g,T,m,h=t(s,c,p,"x"),x=h[0],_=h[1],D=t(s,c,f,"y"),C=D[0],F=D[1],I=c._length;_.length>I&&_.splice(I,_.length-I),F.length>I&&F.splice(I,F.length-I);var z=[],R=[],k=[],B=typeof x.size=="string",N=typeof C.size=="string",q=[],Y=[],ee=B?q:x,te=N?Y:C,ae=0,j=[],G=[],K=c.histnorm,H=c.histfunc,Z=K.indexOf("density")!==-1,X=H==="max"||H==="min",$=X?null:0,Q=w.count,re=S[K],ue=!1,pe=[],ge=[],Te="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Te&&H!=="count"&&(ue=H==="avg",Q=w[H]);var Se=x.size,Ce=o(x.start),Ue=o(x.end)+(Ce-v.tickIncrement(Ce,Se,!1,d))/1e6;for(E=Ce;E=0&&T=0&&mv;n++)r=l(t,a,S(r));return r>v&&u.log("interp2d didn't converge quickly",r),t};function l(e,t,a){var r=0,n,i,s,c,p,f,d,y,o,b,M,A,E;for(c=0;cA&&(r=Math.max(r,Math.abs(e[i][s]-M)/(E-A))))}return r}}}),Mg=xe({"src/traces/heatmap/find_empties.js"(U,O){"use strict";var u=Sr().maxRowLength;O.exports=function(w){var S=[],l={},e=[],t=w[0],a=[],r=[0,0,0],n=u(w),i,s,c,p,f,d,y,o;for(s=0;s=0;f--)p=e[f],s=p[0],c=p[1],d=((l[[s-1,c]]||r)[2]+(l[[s+1,c]]||r)[2]+(l[[s,c-1]]||r)[2]+(l[[s,c+1]]||r)[2])/20,d&&(y[p]=[s,c,d],e.splice(f,1),o=!0);if(!o)throw"findEmpties iterated with no new neighbors";for(p in y)l[p]=y[p],S.push(y[p])}return S.sort(function(b,M){return M[2]-b[2]})}}}),gb=xe({"src/traces/heatmap/make_bound_array.js"(U,O){"use strict";var u=Ci(),v=Sr().isArrayOrTypedArray;O.exports=function(S,l,e,t,a,r){var n=[],i=u.traceIs(S,"contour"),s=u.traceIs(S,"histogram"),c,p,f,d=v(l)&&l.length>1;if(d&&!s&&r.type!=="category"){var y=l.length;if(y<=a){if(i)n=Array.from(l).slice(0,a);else if(a===1)r.type==="log"?n=[.5*l[0],2*l[0]]:n=[l[0]-.5,l[0]+.5];else if(r.type==="log"){for(n=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],f=1;f1){var K=(G[G.length-1]-G[0])/(G.length-1),H=Math.abs(K/100);for(I=0;IH)return!1}return!0}y._islinear=!1,o.type==="log"||b.type==="log"?E==="fast"&&k("log axis found"):B(g)?B(x)?y._islinear=!0:E==="fast"&&k("y scale is not linear"):E==="fast"&&k("x scale is not linear");var N=v.maxRowLength(F),q=y.xtype==="scaled"?"":g,Y=i(y,q,T,m,N,o),ee=y.ytype==="scaled"?"":x,te=i(y,ee,_,D,F.length,b);y._extremes[o._id]=w.findExtremes(o,Y),y._extremes[b._id]=w.findExtremes(b,te);var ae={x:Y,y:te,z:F,text:y._text||y.text,hovertext:y._hovertext||y.hovertext};if(y.xperiodalignment&&h&&(ae.orig_x=h),y.yperiodalignment&&C&&(ae.orig_y=C),q&&q.length===Y.length-1&&(ae.xCenter=q),ee&&ee.length===te.length-1&&(ae.yCenter=ee),A&&(ae.xRanges=z.xRanges,ae.yRanges=z.yRanges,ae.pts=z.pts),M||e(d,y,{vals:F,cLetter:"z"}),M&&y.contours&&y.contours.coloring==="heatmap"){var j={type:y.type==="contour"?"heatmap":"histogram2d",xcalendar:y.xcalendar,ycalendar:y.ycalendar};ae.xfill=i(j,q,T,m,N,o),ae.yfill=i(j,ee,_,D,F.length,b)}return[ae]};function c(f){for(var d=[],y=f.length,o=0;o0;)H=h.c2p(k[Q]),Q--;for(H0;)$=x.c2p(B[Q]),Q--;$=h._length||H<=0||X>=x._length||$<=0;if(Ce){var Ue=D.selectAll("image").data([]);Ue.exit().remove(),o(D);return}var Oe,_e;pe==="fast"?(Oe=ae,_e=te):(Oe=Te,_e=Se);var ce=document.createElement("canvas");ce.width=Oe,ce.height=_e;var ie=ce.getContext("2d",{willReadFrequently:!0}),se=n(F,{noNumericCheck:!0,returnArray:!0}),ne,be;pe==="fast"?(ne=j?function(Fr){return ae-1-Fr}:l.identity,be=G?function(Fr){return te-1-Fr}:l.identity):(ne=function(Fr){return l.constrain(Math.round(h.c2p(k[Fr])-K),0,Te)},be=function(Fr){return l.constrain(Math.round(x.c2p(B[Fr])-X),0,Se)});var De=be(0),qe=[De,De],Ne=j?0:1,ut=G?0:1,ot=0,yt=0,At=0,It=0,Zt,vr,Ut,Jt,at;function Ee(Fr,kr=0){if(Fr===void 0)return[0,0,0,0];var ra=se(Fr);return ra[0]=Math.round(ra[0]),ra[1]=Math.round(ra[1]),ra[2]=Math.round(ra[2]),ot+=kr,yt+=ra[0]*kr,At+=ra[1]*kr,It+=ra[2]*kr,ra}function Re(Fr,kr,ra,ja){var La=Fr[ra.bin0];if(La===void 0)return Ee(void 0,1);var Dn=Fr[ra.bin1],Mn=kr[ra.bin0],_i=kr[ra.bin1],ti=Dn-La||0,Si=Mn-La||0,ai;return Dn===void 0?_i===void 0?ai=0:Mn===void 0?ai=2*(_i-La):ai=(2*_i-Mn-La)*2/3:_i===void 0?Mn===void 0?ai=0:ai=(2*La-Dn-Mn)*2/3:Mn===void 0?ai=(2*_i-Dn-La)*2/3:ai=_i+La-Dn-Mn,Ee(La+ra.frac*ti+ja.frac*(Si+ra.frac*ai))}if(pe!=="default"){var he=0,ye;try{ye=new Uint8Array(Oe*_e*4)}catch{ye=new Array(Oe*_e*4)}if(pe==="smooth"){var Ie=N||k,Fe=q||B,He=new Array(Ie.length),We=new Array(Fe.length),pt=new Array(Te),ct=N?M:b,ft=q?M:b,mt,_t,Bt;for(Q=0;Qci||ci>x._length))for(re=ka;rePi||Pi>h._length)){var Jn=t({x:hi,y:bn},F,E._fullLayout);Jn.x=hi,Jn.y=bn;var Ti=C.z[Q][re];Ti===void 0?(Jn.z="",Jn.zLabel=""):(Jn.z=Ti,Jn.zLabel=S.tickText(za,Ti,"hover").text);var _n=C.text&&C.text[Q]&&C.text[Q][re];(_n===void 0||_n===!1)&&(_n=""),Jn.text=_n;var Ln=l.texttemplateString({data:[Jn,F._meta],fallback:F.texttemplatefallback,labels:Jn,locale:E._fullLayout._d3locale,template:pa});if(Ln){var ji=Ln.split("
"),Zi=ji.length,un=0;for(ue=0;ue=b[0].length||D<0||D>b.length)return}else{if(u.inbox(a-y[0],a-y[y.length-1],0)>0||u.inbox(r-o[0],r-o[o.length-1],0)>0)return;if(s){var C;for(T=[2*y[0]-y[1]],C=1;C=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),w0=xe({"src/traces/contour/attributes.js"(U,O){"use strict";var u=mp(),v=wu(),w=Kl(),S=w.axisHoverFormat,l=w.descriptionOnlyNumbers,e=pl(),t=Rc().dash,a=vl(),r=oo().extendFlat,n=Rg(),i=n.COMPARISON_OPS2,s=n.INTERVAL_OPS,c=v.line;O.exports=r({z:u.z,x:u.x,x0:u.x0,dx:u.dx,y:u.y,y0:u.y0,dy:u.dy,xperiod:u.xperiod,yperiod:u.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:u.xperiodalignment,yperiodalignment:u.yperiodalignment,text:u.text,hovertext:u.hovertext,transpose:u.transpose,xtype:u.xtype,ytype:u.ytype,xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:u.hovertemplate,hovertemplatefallback:u.hovertemplatefallback,texttemplate:r({},u.texttemplate,{}),texttemplatefallback:u.texttemplatefallback,textfont:r({},u.textfont,{}),hoverongaps:u.hoverongaps,connectgaps:r({},u.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:a({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(i).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},c.smoothing,{}),editType:"plot"},zorder:v.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),wb=xe({"src/traces/histogram2dcontour/attributes.js"(U,O){"use strict";var u=Dg(),v=w0(),w=pl(),S=Kl().axisHoverFormat,l=oo().extendFlat;O.exports=l({x:u.x,y:u.y,z:u.z,marker:u.marker,histnorm:u.histnorm,histfunc:u.histfunc,nbinsx:u.nbinsx,xbins:u.xbins,nbinsy:u.nbinsy,ybins:u.ybins,autobinx:u.autobinx,autobiny:u.autobiny,bingroup:u.bingroup,xbingroup:u.xbingroup,ybingroup:u.ybingroup,autocontour:v.autocontour,ncontours:v.ncontours,contours:v.contours,line:{color:v.line.color,width:l({},v.line.width,{dflt:.5}),dash:v.line.dash,smoothing:v.line.smoothing,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:u.hovertemplate,hovertemplatefallback:u.hovertemplatefallback,texttemplate:v.texttemplate,texttemplatefallback:v.texttemplatefallback,textfont:v.textfont},w("",{cLetter:"z",editTypeOverride:"calc"}))}}),Fg=xe({"src/traces/contour/contours_defaults.js"(U,O){"use strict";O.exports=function(v,w,S,l){var e=l("contours.start"),t=l("contours.end"),a=e===!1||t===!1,r=S("contours.size"),n;a?n=w.autocontour=!0:n=S("autocontour",!1),(n||!r)&&S("ncontours")}}}),Tb=xe({"src/traces/contour/label_defaults.js"(U,O){"use strict";var u=Sr();O.exports=function(w,S,l,e){e||(e={});var t=w("contours.showlabels");if(t){var a=S.font;u.coerceFont(w,"contours.labelfont",a,{overrideDflt:{color:l}}),w("contours.labelformat")}e.hasHover!==!1&&w("zhoverformat")}}}),zg=xe({"src/traces/contour/style_defaults.js"(U,O){"use strict";var u=Fc(),v=Tb();O.exports=function(S,l,e,t,a){var r=e("contours.coloring"),n,i="";r==="fill"&&(n=e("contours.showlines")),n!==!1&&(r!=="lines"&&(i=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(S.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,u(S,l,t,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),v(e,t,i,a)}}}),wM=xe({"src/traces/histogram2dcontour/defaults.js"(U,O){"use strict";var u=Sr(),v=xb(),w=Fg(),S=zg(),l=x0(),e=wb();O.exports=function(a,r,n,i){function s(p,f){return u.coerce(a,r,e,p,f)}function c(p){return u.coerce2(a,r,e,p)}v(a,r,s,i),r.visible!==!1&&(w(a,r,s,c),S(a,r,s,i),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&l(s,i))}}}),Ab=xe({"src/traces/contour/set_contours.js"(U,O){"use strict";var u=uo(),v=Sr();O.exports=function(l,e){var t=l.contours;if(l.autocontour){var a=l.zmin,r=l.zmax;(l.zauto||a===void 0)&&(a=v.aggNums(Math.min,null,e)),(l.zauto||r===void 0)&&(r=v.aggNums(Math.max,null,e));var n=w(a,r,l.ncontours);t.size=n.dtick,t.start=u.tickFirst(n),n.range.reverse(),t.end=u.tickFirst(n),t.start===a&&(t.start+=t.size),t.end===r&&(t.end-=t.size),t.start>t.end&&(t.start=t.end=(t.start+t.end)/2),l._input.contours||(l._input.contours={}),v.extendFlat(l._input.contours,{start:t.start,end:t.end,size:t.size}),l._input.autocontour=!0}else if(t.type!=="constraint"){var i=t.start,s=t.end,c=l._input.contours;if(i>s&&(t.start=c.start=s,s=t.end=c.end=i,i=t.start),!(t.size>0)){var p;i===s?p=1:p=w(i,s,l.ncontours).dtick,c.size=t.size=p}}};function w(S,l,e){var t={type:"linear",range:[S,l]};return u.autoTicks(t,(l-S)/(e||15)),t}}}),T0=xe({"src/traces/contour/end_plus.js"(U,O){"use strict";O.exports=function(v){return v.end+v.size/1e6}}}),Mb=xe({"src/traces/contour/calc.js"(U,O){"use strict";var u=Bl(),v=Sg(),w=Ab(),S=T0();O.exports=function(e,t){var a=v(e,t),r=a[0].z;w(t,r);var n=t.contours,i=u.extractOpts(t),s;if(n.coloring==="heatmap"&&i.auto&&t.autocontour===!1){var c=n.start,p=S(n),f=n.size||1,d=Math.floor((p-c)/f)+1;isFinite(f)||(f=1,d=1);var y=c-f/2,o=y+d*f;s=[y,o]}else s=r;return u.calc(e,t,{vals:s,cLetter:"z"}),a}}}),A0=xe({"src/traces/contour/constants.js"(U,O){"use strict";O.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}}}}),Sb=xe({"src/traces/contour/make_crossings.js"(U,O){"use strict";var u=A0();O.exports=function(S){var l=S[0].z,e=l.length,t=l[0].length,a=e===2||t===2,r,n,i,s,c,p,f,d,y;for(n=0;nw?0:1)+(S[0][1]>w?0:2)+(S[1][1]>w?0:4)+(S[1][0]>w?0:8);if(l===5||l===10){var e=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return w>e?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),Eb=xe({"src/traces/contour/find_all_paths.js"(U,O){"use strict";var u=Sr(),v=A0();O.exports=function(r,n,i){var s,c,p,f,d;for(n=n||.01,i=i||.01,p=0;p20?(p=v.CHOOSESADDLE[p][(f[0]||f[1])<0?0:1],a.crossings[c]=v.SADDLEREMAINDER[p]):delete a.crossings[c],f=v.NEWDELTA[p],!f){u.log("Found bad marching index:",p,r,a.level);break}d.push(t(a,r,f)),r[0]+=f[0],r[1]+=f[1],c=r.join(","),w(d[d.length-1],d[d.length-2],i,s)&&d.pop();var E=f[0]&&(r[0]<0||r[0]>o-2)||f[1]&&(r[1]<0||r[1]>y-2),g=r[0]===b[0]&&r[1]===b[1]&&f[0]===M[0]&&f[1]===M[1];if(g||n&&E)break;p=a.crossings[c]}A===1e4&&u.log("Infinite loop in contour?");var T=w(d[0],d[d.length-1],i,s),m=0,h=.2*a.smoothing,x=[],_=0,D,C,F,I,z,R,k,B,N,q,Y;for(A=1;A=_;A--)if(D=x[A],D=_&&D+x[C]B&&N--,a.edgepaths[N]=Y.concat(d,q));break}j||(a.edgepaths[B]=d.concat(q))}for(B=0;B20&&r?a===208||a===1114?i=n[0]===0?1:-1:s=n[1]===0?1:-1:v.BOTTOMSTART.indexOf(a)!==-1?s=1:v.LEFTSTART.indexOf(a)!==-1?i=1:v.TOPSTART.indexOf(a)!==-1?s=-1:i=-1,[i,s]}function t(a,r,n){var i=r[0]+Math.max(n[0],0),s=r[1]+Math.max(n[1],0),c=a.z[s][i],p=a.xaxis,f=a.yaxis;if(n[1]){var d=(a.level-c)/(a.z[s][i+1]-c),y=(d!==1?(1-d)*p.c2l(a.x[i]):0)+(d!==0?d*p.c2l(a.x[i+1]):0);return[p.c2p(p.l2c(y),!0),f.c2p(a.y[s],!0),i+d,s]}else{var o=(a.level-c)/(a.z[s+1][i]-c),b=(o!==1?(1-o)*f.c2l(a.y[s]):0)+(o!==0?o*f.c2l(a.y[s+1]):0);return[p.c2p(a.x[i],!0),f.c2p(f.l2c(b),!0),i,s+o]}}}}),TM=xe({"src/traces/contour/constraint_mapping.js"(U,O){"use strict";var u=Rg(),v=yn();O.exports={"[]":S("[]"),"][":S("]["),">":l(">"),"<":l("<"),"=":l("=")};function w(e,t){var a=Array.isArray(t),r;function n(i){return v(i)?+i:null}return u.COMPARISON_OPS2.indexOf(e)!==-1?r=n(a?t[0]:t):u.INTERVAL_OPS.indexOf(e)!==-1?r=a?[n(t[0]),n(t[1])]:[n(t),n(t)]:u.SET_OPS.indexOf(e)!==-1&&(r=a?t.map(n):[n(t)]),r}function S(e){return function(t){t=w(e,t);var a=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:a,end:r,size:r-a}}}function l(e){return function(t){return t=w(e,t),{start:t,end:1/0,size:1/0}}}}}),kb=xe({"src/traces/contour/empty_pathinfo.js"(U,O){"use strict";var u=Sr(),v=TM(),w=T0();O.exports=function(l,e,t){for(var a=l.type==="constraint"?v[l._operation](l.value):l,r=a.size,n=[],i=w(a),s=t.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:t.a,y:t.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:t.x,y:t.y},p=a.start;p1e3){u.warn("Too many contours, clipping at 1000",l);break}return n}}}),Cb=xe({"src/traces/contour/convert_to_constraints.js"(U,O){"use strict";var u=Sr();O.exports=function(w,S){var l,e,t,a=function(i){return i.reverse()},r=function(i){return i};switch(S){case"=":case"<":return w;case">":for(w.length!==1&&u.warn("Contour data invalid for the specified inequality operation."),e=w[0],l=0;lt.level||t.starts.length&&e===t.level)}break;case"constraint":if(w.prefixBoundary=!1,w.edgepaths.length)return;var a=w.x.length,r=w.y.length,n=-1/0,i=1/0;for(l=0;l":s>n&&(w.prefixBoundary=!0);break;case"<":(sn||w.starts.length&&p===i)&&(w.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),p=Math.max(s[0],s[1]),cn&&(w.prefixBoundary=!0);break}break}}}}),Bg=xe({"src/traces/contour/plot.js"(U){"use strict";var O=Na(),u=Sr(),v=go(),w=Bl(),S=el(),l=uo(),e=Oh(),t=kg(),a=Sb(),r=Eb(),n=kb(),i=Cb(),s=Lb(),c=A0(),p=c.LABELOPTIMIZER;U.plot=function(g,T,m,h){var x=T.xaxis,_=T.yaxis;u.makeTraceGroups(h,m,"contour").each(function(D){var C=O.select(this),F=D[0],I=F.trace,z=F.x,R=F.y,k=I.contours,B=n(k,T,F),N=u.ensureSingle(C,"g","heatmapcoloring"),q=[];k.coloring==="heatmap"&&(q=[D]),t(g,T,q,N),a(B),r(B);var Y=x.c2p(z[0],!0),ee=x.c2p(z[z.length-1],!0),te=_.c2p(R[0],!0),ae=_.c2p(R[R.length-1],!0),j=[[Y,ae],[ee,ae],[ee,te],[Y,te]],G=B;k.type==="constraint"&&(G=i(B,k._operation)),f(C,j,k),d(C,G,j,k),o(C,B,g,F,k),M(C,T,g,F,j)})};function f(E,g,T){var m=u.ensureSingle(E,"g","contourbg"),h=m.selectAll("path").data(T.coloring==="fill"?[0]:[]);h.enter().append("path"),h.exit().remove(),h.attr("d","M"+g.join("L")+"Z").style("stroke","none")}function d(E,g,T,m){var h=m.coloring==="fill"||m.type==="constraint"&&m._operation!=="=",x="M"+T.join("L")+"Z";h&&s(g,m);var _=u.ensureSingle(E,"g","contourfill"),D=_.selectAll("path").data(h?g:[]);D.enter().append("path"),D.exit().remove(),D.each(function(C){var F=(C.prefixBoundary?x:"")+y(C,T);F?O.select(this).attr("d",F).style("stroke","none"):O.select(this).remove()})}function y(E,g){var T="",m=0,h=E.edgepaths.map(function(Y,ee){return ee}),x=!0,_,D,C,F,I,z;function R(Y){return Math.abs(Y[1]-g[0][1])<.01}function k(Y){return Math.abs(Y[1]-g[2][1])<.01}function B(Y){return Math.abs(Y[0]-g[0][0])<.01}function N(Y){return Math.abs(Y[0]-g[2][0])<.01}for(;h.length;){for(z=v.smoothopen(E.edgepaths[m],E.smoothing),T+=x?z:z.replace(/^M/,"L"),h.splice(h.indexOf(m),1),_=E.edgepaths[m][E.edgepaths[m].length-1],F=-1,C=0;C<4;C++){if(!_){u.log("Missing end?",m,E);break}for(R(_)&&!N(_)?D=g[1]:B(_)?D=g[0]:k(_)?D=g[3]:N(_)&&(D=g[2]),I=0;I=0&&(D=q,F=I):Math.abs(_[1]-D[1])<.01?Math.abs(_[1]-q[1])<.01&&(q[0]-_[0])*(D[0]-q[0])>=0&&(D=q,F=I):u.log("endpt to newendpt is not vert. or horz.",_,D,q)}if(_=D,F>=0)break;T+="L"+D}if(F===E.edgepaths.length){u.log("unclosed perimeter path");break}m=F,x=h.indexOf(m)===-1,x&&(m=h[0],T+="Z")}for(m=0;mp.MAXCOST*2)break;R&&(D/=2),_=F-D/2,C=_+D*1.5}if(z<=p.MAXCOST)return I};function b(E,g,T,m){var h=g.width/2,x=g.height/2,_=E.x,D=E.y,C=E.theta,F=Math.cos(C)*h,I=Math.sin(C)*h,z=(_>m.center?m.right-_:_-m.left)/(F+Math.abs(Math.sin(C)*x)),R=(D>m.middle?m.bottom-D:D-m.top)/(Math.abs(I)+Math.cos(C)*x);if(z<1||R<1)return 1/0;var k=p.EDGECOST*(1/(z-1)+1/(R-1));k+=p.ANGLECOST*C*C;for(var B=_-F,N=D-I,q=_+F,Y=D+I,ee=0;ee=M)&&(t<=b&&(t=b),a>=M&&(a=M),n=Math.floor((a-t)/r)+1,i=0),o=0;ob&&(f.unshift(b),d.unshift(d[0])),f[f.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:u(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(i("contours.value",0),u(s.value)||(t(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),SM=xe({"src/traces/contour/defaults.js"(U,O){"use strict";var u=Sr(),v=xg(),w=Sh(),S=Db(),l=Fg(),e=zg(),t=x0(),a=w0();O.exports=function(n,i,s,c){function p(o,b){return u.coerce(n,i,a,o,b)}function f(o){return u.coerce2(n,i,a,o)}var d=v(n,i,p,c);if(!d){i.visible=!1;return}w(n,i,c,p),p("xhoverformat"),p("yhoverformat"),p("text"),p("hovertext"),p("hoverongaps"),p("hovertemplate"),p("hovertemplatefallback");var y=p("contours.type")==="constraint";p("connectgaps",u.isArray1D(i.z)),y?S(n,i,p,c,s):(l(n,i,p,f),e(n,i,p,c)),i.contours&&i.contours.coloring==="heatmap"&&t(p,c),p("zorder")}}}),EM=xe({"src/traces/contour/index.js"(U,O){"use strict";O.exports={attributes:w0(),supplyDefaults:SM(),calc:Mb(),plot:Bg().plot,style:Ng(),colorbar:Og(),hoverPoints:Ib(),moduleType:"trace",name:"contour",basePlotModule:Nu(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),kM=xe({"lib/contour.js"(U,O){"use strict";O.exports=EM()}}),Rb=xe({"src/traces/scatterternary/attributes.js"(U,O){"use strict";var{hovertemplateAttrs:u,texttemplateAttrs:v,templatefallbackAttrs:w}=js(),S=qh(),l=wu(),e=Rs(),t=pl(),a=Rc().dash,r=oo().extendFlat,n=l.marker,i=l.line,s=n.line;O.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:r({},l.mode,{dflt:"markers"}),text:r({},l.text,{}),texttemplate:v({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:w({editType:"plot"}),hovertext:r({},l.hovertext,{}),line:{color:i.color,width:i.width,dash:a,backoff:i.backoff,shape:r({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:r({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),marker:r({symbol:n.symbol,opacity:n.opacity,angle:n.angle,angleref:n.angleref,standoff:n.standoff,maxdisplayed:n.maxdisplayed,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:r({width:s.width,dash:s.dash,editType:"calc"},t("marker.line")),gradient:n.gradient,editType:"calc"},t("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:r({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:u(),hovertemplatefallback:w()}}}),CM=xe({"src/traces/scatterternary/defaults.js"(U,O){"use strict";var u=Sr(),v=jh(),w=Cl(),S=hh(),l=Eh(),e=cp(),t=kh(),a=Vh(),r=Rb();O.exports=function(i,s,c,p){function f(E,g){return u.coerce(i,s,r,E,g)}var d=f("a"),y=f("b"),o=f("c"),b;if(d?(b=d.length,y?(b=Math.min(b,y.length),o&&(b=Math.min(b,o.length))):o?b=Math.min(b,o.length):b=0):y&&o&&(b=Math.min(y.length,o.length)),!b){s.visible=!1;return}s._length=b,f("sum"),f("text"),f("hovertext"),s.hoveron!=="fills"&&(f("hovertemplate"),f("hovertemplatefallback"));var M=b"),a.hovertemplate=p.hovertemplate,t}}}),RM=xe({"src/traces/scatterternary/event_data.js"(U,O){"use strict";O.exports=function(v,w,S,l,e){if(w.xa&&(v.xaxis=w.xa),w.ya&&(v.yaxis=w.ya),l[e]){var t=l[e];v.a=t.a,v.b=t.b,v.c=t.c}else v.a=w.a,v.b=w.b,v.c=w.c;return v}}}),FM=xe({"src/plots/ternary/ternary.js"(U,O){"use strict";var u=Na(),v=Ci(),w=Sr(),S=w.strTranslate,l=w._,e=wi(),t=go(),a=Oh(),r=oo().extendFlat,n=zl(),i=uo(),s=Bf(),c=hu(),p=Uh(),f=p.freeMode,d=p.rectMode,y=gv(),o=yc().prepSelect,b=yc().selectOnClick,M=yc().clearOutline,A=yc().clearSelectionsCache,E=lc();function g(R,k){this.id=R.id,this.graphDiv=R.graphDiv,this.init(k),this.makeFramework(k),this.updateFx(k),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}O.exports=g;var T=g.prototype;T.init=function(R){this.container=R._ternarylayer,this.defs=R._defs,this.layoutId=R._uid,this.traceHash={},this.layers={}},T.plot=function(R,k){var B=this,N=k[B.id],q=k._size;B._hasClipOnAxisFalse=!1;for(var Y=0;Ym*j?(re=j,Q=re*m):(Q=ae,re=Q/m),ue=ee*Q/ae,pe=te*re/j,X=k.l+k.w*q-Q/2,$=k.t+k.h*(1-Y)-re/2,B.x0=X,B.y0=$,B.w=Q,B.h=re,B.sum=G,B.xaxis={type:"linear",range:[K+2*Z-G,G-K-2*H],domain:[q-ue/2,q+ue/2],_id:"x"},a(B.xaxis,B.graphDiv._fullLayout),B.xaxis.setScale(),B.xaxis.isPtWithinRange=function(ne){return ne.a>=B.aaxis.range[0]&&ne.a<=B.aaxis.range[1]&&ne.b>=B.baxis.range[1]&&ne.b<=B.baxis.range[0]&&ne.c>=B.caxis.range[1]&&ne.c<=B.caxis.range[0]},B.yaxis={type:"linear",range:[K,G-H-Z],domain:[Y-pe/2,Y+pe/2],_id:"y"},a(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var ge=B.yaxis.domain[0],Te=B.aaxis=r({},R.aaxis,{range:[K,G-H-Z],side:"left",tickangle:(+R.aaxis.tickangle||0)-30,domain:[ge,ge+pe*m],anchor:"free",position:0,_id:"y",_length:Q});a(Te,B.graphDiv._fullLayout),Te.setScale();var Se=B.baxis=r({},R.baxis,{range:[G-K-Z,H],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:Q});a(Se,B.graphDiv._fullLayout),Se.setScale();var Ce=B.caxis=r({},R.caxis,{range:[G-K-H,Z],side:"right",tickangle:(+R.caxis.tickangle||0)+30,domain:[ge,ge+pe*m],anchor:"free",position:0,_id:"y",_length:Q});a(Ce,B.graphDiv._fullLayout),Ce.setScale();var Ue="M"+X+","+($+re)+"h"+Q+"l-"+Q/2+",-"+re+"Z";B.clipDef.select("path").attr("d",Ue),B.layers.plotbg.select("path").attr("d",Ue);var Oe="M0,"+re+"h"+Q+"l-"+Q/2+",-"+re+"Z";B.clipDefRelative.select("path").attr("d",Oe);var _e=S(X,$);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",_e),B.clipDefRelative.select("path").attr("transform",null);var ce=S(X-Se._offset,$+re);B.layers.baxis.attr("transform",ce),B.layers.bgrid.attr("transform",ce);var ie=S(X+Q/2,$)+"rotate(30)"+S(0,-Te._offset);B.layers.aaxis.attr("transform",ie),B.layers.agrid.attr("transform",ie);var se=S(X+Q/2,$)+"rotate(-30)"+S(0,-Ce._offset);B.layers.caxis.attr("transform",se),B.layers.cgrid.attr("transform",se),B.drawAxes(!0),B.layers.aline.select("path").attr("d",Te.showline?"M"+X+","+($+re)+"l"+Q/2+",-"+re:"M0,0").call(e.stroke,Te.linecolor||"#000").style("stroke-width",(Te.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",Se.showline?"M"+X+","+($+re)+"h"+Q:"M0,0").call(e.stroke,Se.linecolor||"#000").style("stroke-width",(Se.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",Ce.showline?"M"+(X+Q/2)+","+$+"l"+Q/2+","+re:"M0,0").call(e.stroke,Ce.linecolor||"#000").style("stroke-width",(Ce.linewidth||0)+"px"),B.graphDiv._context.staticPlot||B.initInteractions(),t.setClipUrl(B.layers.frontplot,B._hasClipOnAxisFalse?null:B.clipId,B.graphDiv)},T.drawAxes=function(R){var k=this,B=k.graphDiv,N=k.id.slice(7)+"title",q=k.layers,Y=k.aaxis,ee=k.baxis,te=k.caxis;if(k.drawAx(Y),k.drawAx(ee),k.drawAx(te),R){var ae=Math.max(Y.showticklabels?Y.tickfont.size/2:0,(te.showticklabels?te.tickfont.size*.75:0)+(te.ticks==="outside"?te.ticklen*.87:0)),j=(ee.showticklabels?ee.tickfont.size:0)+(ee.ticks==="outside"?ee.ticklen:0)+3;q["a-title"]=y.draw(B,"a"+N,{propContainer:Y,propName:k.id+".aaxis.title.text",placeholder:l(B,"Click to enter Component A title"),attributes:{x:k.x0+k.w/2,y:k.y0-Y.title.font.size/3-ae,"text-anchor":"middle"}}),q["b-title"]=y.draw(B,"b"+N,{propContainer:ee,propName:k.id+".baxis.title.text",placeholder:l(B,"Click to enter Component B title"),attributes:{x:k.x0-j,y:k.y0+k.h+ee.title.font.size*.83+j,"text-anchor":"middle"}}),q["c-title"]=y.draw(B,"c"+N,{propContainer:te,propName:k.id+".caxis.title.text",placeholder:l(B,"Click to enter Component C title"),attributes:{x:k.x0+k.w+j,y:k.y0+k.h+te.title.font.size*.83+j,"text-anchor":"middle"}})}},T.drawAx=function(R){var k=this,B=k.graphDiv,N=R._name,q=N.charAt(0),Y=R._id,ee=k.layers[N],te=30,ae=q+"tickLayout",j=h(R);k[ae]!==j&&(ee.selectAll("."+Y+"tick").remove(),k[ae]=j),R.setScale();var G=i.calcTicks(R),K=i.clipEnds(R,G),H=i.makeTransTickFn(R),Z=i.getTickSigns(R)[2],X=w.deg2rad(te),$=Z*(R.linewidth||1)/2,Q=Z*R.ticklen,re=k.w,ue=k.h,pe=q==="b"?"M0,"+$+"l"+Math.sin(X)*Q+","+Math.cos(X)*Q:"M"+$+",0l"+Math.cos(X)*Q+","+-Math.sin(X)*Q,ge={a:"M0,0l"+ue+",-"+re/2,b:"M0,0l-"+re/2+",-"+ue,c:"M0,0l-"+ue+","+re/2}[q];i.drawTicks(B,R,{vals:R.ticks==="inside"?K:G,layer:ee,path:pe,transFn:H,crisp:!1}),i.drawGrid(B,R,{vals:K,layer:k.layers[q+"grid"],path:ge,transFn:H,crisp:!1}),i.drawLabels(B,R,{vals:G,layer:ee,transFn:H,labelFns:i.makeLabelFns(R,0,te)})};function h(R){return R.ticks+String(R.ticklen)+String(R.showticklabels)}var x=E.MINZOOM/2+.87,_="m-0.87,.5h"+x+"v3h-"+(x+5.2)+"l"+(x/2+2.6)+",-"+(x*.87+4.5)+"l2.6,1.5l-"+x/2+","+x*.87+"Z",D="m0.87,.5h-"+x+"v3h"+(x+5.2)+"l-"+(x/2+2.6)+",-"+(x*.87+4.5)+"l-2.6,1.5l"+x/2+","+x*.87+"Z",C="m0,1l"+x/2+","+x*.87+"l2.6,-1.5l-"+(x/2+2.6)+",-"+(x*.87+4.5)+"l-"+(x/2+2.6)+","+(x*.87+4.5)+"l2.6,1.5l"+x/2+",-"+x*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",I=!0;T.clearOutline=function(){A(this.dragOptions),M(this.dragOptions.gd)},T.initInteractions=function(){var R=this,k=R.layers.plotbg.select("path").node(),B=R.graphDiv,N=B._fullLayout._zoomlayer,q,Y;this.dragOptions={element:k,gd:B,plotinfo:{id:R.id,domain:B._fullLayout[R.id].domain,xaxis:R.xaxis,yaxis:R.yaxis},subplot:R.id,prepFn:function(ce,ie,se){R.dragOptions.xaxes=[R.xaxis],R.dragOptions.yaxes=[R.yaxis],q=B._fullLayout._invScaleX,Y=B._fullLayout._invScaleY;var ne=R.dragOptions.dragmode=B._fullLayout.dragmode;f(ne)?R.dragOptions.minDrag=1:R.dragOptions.minDrag=void 0,ne==="zoom"?(R.dragOptions.moveFn=Se,R.dragOptions.clickFn=re,R.dragOptions.doneFn=Ce,ue(ce,ie,se)):ne==="pan"?(R.dragOptions.moveFn=Oe,R.dragOptions.clickFn=re,R.dragOptions.doneFn=_e,Ue(),R.clearOutline(B)):(d(ne)||f(ne))&&o(ce,ie,se,R.dragOptions,ne)}};var ee,te,ae,j,G,K,H,Z,X,$;function Q(ce){var ie={};return ie[R.id+".aaxis.min"]=ce.a,ie[R.id+".baxis.min"]=ce.b,ie[R.id+".caxis.min"]=ce.c,ie}function re(ce,ie){var se=B._fullLayout.clickmode;z(B),ce===2&&(B.emit("plotly_doubleclick",null),v.call("_guiRelayout",B,Q({a:0,b:0,c:0}))),se.indexOf("select")>-1&&ce===1&&b(ie,B,[R.xaxis],[R.yaxis],R.id,R.dragOptions),se.indexOf("event")>-1&&c.click(B,ie,R.id)}function ue(ce,ie,se){var ne=k.getBoundingClientRect();ee=ie-ne.left,te=se-ne.top,B._fullLayout._calcInverseTransform(B);var be=B._fullLayout._invTransform,De=w.apply3DTransform(be)(ee,te);ee=De[0],te=De[1],ae={a:R.aaxis.range[0],b:R.baxis.range[1],c:R.caxis.range[1]},G=ae,j=R.aaxis.range[1]-ae.a,K=e.color(R.graphDiv._fullLayout[R.id].bgcolor).luminosity(),H="M0,"+R.h+"L"+R.w/2+", 0L"+R.w+","+R.h+"Z",Z=!1,X=N.append("path").attr("class","zoombox").attr("transform",S(R.x0,R.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",H),$=N.append("path").attr("class","zoombox-corners").attr("transform",S(R.x0,R.y0)).style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),R.clearOutline(B)}function pe(ce,ie){return 1-ie/R.h}function ge(ce,ie){return 1-(ce+(R.h-ie)/Math.sqrt(3))/R.w}function Te(ce,ie){return(ce-(R.h-ie)/Math.sqrt(3))/R.w}function Se(ce,ie){var se=ee+ce*q,ne=te+ie*Y,be=Math.max(0,Math.min(1,pe(ee,te),pe(se,ne))),De=Math.max(0,Math.min(1,ge(ee,te),ge(se,ne))),qe=Math.max(0,Math.min(1,Te(ee,te),Te(se,ne))),Ne=(be/2+qe)*R.w,ut=(1-be/2-De)*R.w,ot=(Ne+ut)/2,yt=ut-Ne,At=(1-be)*R.h,It=At-yt/m;yt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),$.transition().style("opacity",1).duration(200),Z=!0),B.emit("plotly_relayouting",Q(G))}function Ce(){z(B),G!==ae&&(v.call("_guiRelayout",B,Q(G)),I&&B.data&&B._context.showTips&&(w.notifier(l(B,"Double-click to zoom back out"),"long",B),I=!1))}function Ue(){ae={a:R.aaxis.range[0],b:R.baxis.range[1],c:R.caxis.range[1]},G=ae}function Oe(ce,ie){var se=ce/R.xaxis._m,ne=ie/R.yaxis._m;G={a:ae.a-ne,b:ae.b+(se+ne)/2,c:ae.c-(se-ne)/2};var be=[G.a,G.b,G.c].sort(w.sorterAsc),De={a:be.indexOf(G.a),b:be.indexOf(G.b),c:be.indexOf(G.c)};be[0]<0&&(be[1]+be[0]/2<0?(be[2]+=be[0]+be[1],be[0]=be[1]=0):(be[2]+=be[0]/2,be[1]+=be[0]/2,be[0]=0),G={a:be[De.a],b:be[De.b],c:be[De.c]},ie=(ae.a-G.a)*R.yaxis._m,ce=(ae.c-G.c-ae.b+G.b)*R.xaxis._m);var qe=S(R.x0+ce,R.y0+ie);R.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",qe);var Ne=S(-ce,-ie);R.clipDefRelative.select("path").attr("transform",Ne),R.aaxis.range=[G.a,R.sum-G.b-G.c],R.baxis.range=[R.sum-G.a-G.c,G.b],R.caxis.range=[R.sum-G.a-G.b,G.c],R.drawAxes(!1),R._hasClipOnAxisFalse&&R.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,R),B.emit("plotly_relayouting",Q(G))}function _e(){v.call("_guiRelayout",B,Q(G))}k.onmousemove=function(ce){c.hover(B,ce,R.id),B._fullLayout._lasthover=k,B._fullLayout._hoversubplot=R.id},k.onmouseout=function(ce){B._dragging||s.unhover(B,ce)},s.init(this.dragOptions)};function z(R){u.select(R).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),Fb=xe({"src/plots/ternary/layout_attributes.js"(U,O){"use strict";var u=sc(),v=Gl().attributes,w=$c(),S=Hl().overrideAll,l=oo().extendFlat,e={title:{text:w.title.text,font:w.title.font},color:w.color,tickmode:w.minor.tickmode,nticks:l({},w.nticks,{dflt:6,min:1}),tick0:w.tick0,dtick:w.dtick,tickvals:w.tickvals,ticktext:w.ticktext,ticks:w.ticks,ticklen:w.ticklen,tickwidth:w.tickwidth,tickcolor:w.tickcolor,ticklabelstep:w.ticklabelstep,showticklabels:w.showticklabels,labelalias:w.labelalias,showtickprefix:w.showtickprefix,tickprefix:w.tickprefix,showticksuffix:w.showticksuffix,ticksuffix:w.ticksuffix,showexponent:w.showexponent,exponentformat:w.exponentformat,minexponent:w.minexponent,separatethousands:w.separatethousands,tickfont:w.tickfont,tickangle:w.tickangle,tickformat:w.tickformat,tickformatstops:w.tickformatstops,hoverformat:w.hoverformat,showline:l({},w.showline,{dflt:!0}),linecolor:w.linecolor,linewidth:w.linewidth,showgrid:l({},w.showgrid,{dflt:!0}),gridcolor:w.gridcolor,gridwidth:w.gridwidth,griddash:w.griddash,layer:w.layer,min:{valType:"number",dflt:0,min:0}},t=O.exports=S({domain:v({name:"ternary"}),bgcolor:{valType:"color",dflt:u.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}}}),Av=xe({"src/plots/subplot_defaults.js"(U,O){"use strict";var u=Sr(),v=Cs(),w=Gl().defaults;O.exports=function(l,e,t,a){var r=a.type,n=a.attributes,i=a.handleDefaults,s=a.partition||"x",c=e._subplots[r],p=c.length,f=p&&c[0].replace(/\d+$/,""),d,y;function o(E,g){return u.coerce(d,y,n,E,g)}for(var b=0;b=b&&(T.min=0,m.min=0,h.min=0,p.aaxis&&delete p.aaxis.min,p.baxis&&delete p.baxis.min,p.caxis&&delete p.caxis.min)}function c(p,f,d,y){var o=n[f._name];function b(x,_){return w.coerce(p,f,o,x,_)}b("uirevision",y.uirevision),f.type="linear";var M=b("color"),A=M!==o.color.dflt?M:d.font.color,E=f._name,g=E.charAt(0).toUpperCase(),T="Component "+g,m=b("title.text",T);f._hovertitle=m===T?m:g,w.coerceFont(b,"title.font",d.font,{overrideDflt:{size:w.bigFont(d.font.size),color:A}}),b("min"),a(p,f,b,"linear"),e(p,f,b,"linear"),l(p,f,b,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),t(p,f,b,{outerTicks:!0});var h=b("showticklabels");h&&(w.coerceFont(b,"tickfont",d.font,{overrideDflt:{color:A}}),b("tickangle"),b("tickformat")),r(p,f,b,{dfltColor:M,bgColor:d.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:o}),b("hoverformat"),b("layer")}}}),BM=xe({"src/plots/ternary/index.js"(U){"use strict";var O=FM(),u=df().getSubplotCalcData,v=Sr().counterRegex,w="ternary";U.name=w;var S=U.attr="subplot";U.idRoot=w,U.idRegex=U.attrRegex=v(w);var l=U.attributes={};l[S]={valType:"subplotid",dflt:"ternary",editType:"calc"},U.layoutAttributes=Fb(),U.supplyLayoutDefaults=zM(),U.plot=function(t){for(var a=t._fullLayout,r=t.calcdata,n=a._subplots[w],i=0;i0){var E=t.xa,g=t.ya,T,m,h,x,_;p.orientation==="h"?(_=a,T="y",h=g,m="x",x=E):(_=r,T="x",h=E,m="y",x=g);var D=c[t.index];if(_>=D.span[0]&&_<=D.span[1]){var C=v.extendFlat({},t),F=x.c2p(_,!0),I=l.getKdeValue(D,p,_),z=l.getPositionOnKdePath(D,p,F),R=h._offset,k=h._length;C[T+"0"]=z[0],C[T+"1"]=z[1],C[m+"0"]=C[m+"1"]=F,C[m+"Label"]=m+": "+w.hoverLabelText(x,_,p[m+"hoverformat"])+", "+c[0].t.labels.kde+" "+I.toFixed(3);for(var B=0,N=0;N path").each(function(d){if(!d.isBlank){var y=f.marker;u.select(this).call(w.fill,d.mc||y.color).call(w.stroke,d.mlc||y.line.color).call(v.dashLine,y.line.dash,d.mlw||y.line.width).style("opacity",f.selectedpoints&&!d.selected?S:1)}}),t(p,f,r),p.selectAll(".regions").each(function(){u.select(this).selectAll("path").style("stroke-width",0).call(w.fill,f.connector.fillcolor)}),p.selectAll(".lines").each(function(){var d=f.connector.line;v.lineGroupStyle(u.select(this).selectAll("path"),d.width,d.color,d.dash)})})}O.exports={style:a}}}),rS=xe({"src/traces/funnel/hover.js"(U,O){"use strict";var u=wi().opacity,v=vp().hoverOnBars,w=Sr().formatPercent;O.exports=function(e,t,a,r,n){var i=v(e,t,a,r,n);if(i){var s=i.cd,c=s[0].trace,p=c.orientation==="h",f=i.index,d=s[f],y=p?"x":"y";i[y+"LabelVal"]=d.s,i.percentInitial=d.begR,i.percentInitialLabel=w(d.begR,1),i.percentPrevious=d.difR,i.percentPreviousLabel=w(d.difR,1),i.percentTotal=d.sumR,i.percentTotalLabel=w(d.sumR,1);var o=d.hi||c.hoverinfo,b=[];if(o&&o!=="none"&&o!=="skip"){var M=o==="all",A=o.split("+"),E=function(g){return M||A.indexOf(g)!==-1};E("percent initial")&&b.push(i.percentInitialLabel+" of initial"),E("percent previous")&&b.push(i.percentPreviousLabel+" of previous"),E("percent total")&&b.push(i.percentTotalLabel+" of total")}return i.extraText=b.join("
"),i.color=S(c,d),[i]}};function S(l,e){var t=l.marker,a=e.mc||t.color,r=e.mlc||t.line.color,n=e.mlw||t.line.width;if(u(a))return a;if(u(r)&&n)return r}}}),aS=xe({"src/traces/funnel/event_data.js"(U,O){"use strict";O.exports=function(v,w){return v.x="xVal"in w?w.xVal:w.x,v.y="yVal"in w?w.yVal:w.y,"percentInitial"in w&&(v.percentInitial=w.percentInitial),"percentPrevious"in w&&(v.percentPrevious=w.percentPrevious),"percentTotal"in w&&(v.percentTotal=w.percentTotal),w.xa&&(v.xaxis=w.xa),w.ya&&(v.yaxis=w.ya),v}}}),nS=xe({"src/traces/funnel/index.js"(U,O){"use strict";O.exports={attributes:Nb(),layoutAttributes:Ob(),supplyDefaults:Ub().supplyDefaults,crossTraceDefaults:Ub().crossTraceDefaults,supplyLayoutDefaults:ZM(),calc:JM(),crossTraceCalc:QM(),plot:eS(),style:tS().style,hoverPoints:rS(),eventData:aS(),selectPoints:pp(),moduleType:"trace",name:"funnel",basePlotModule:Nu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),iS=xe({"lib/funnel.js"(U,O){"use strict";O.exports=nS()}}),oS=xe({"src/traces/waterfall/constants.js"(U,O){"use strict";O.exports={eventDataKeys:["initial","delta","final"]}}}),jb=xe({"src/traces/waterfall/attributes.js"(U,O){"use strict";var u=Gh(),v=wu().line,w=Rs(),S=Kl().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=js(),a=oS(),r=oo().extendFlat,n=wi();function i(s){return{marker:{color:r({},u.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},u.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},u.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}O.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:u.x,x0:u.x0,dx:u.dx,y:u.y,y0:u.y0,dy:u.dy,xperiod:u.xperiod,yperiod:u.yperiod,xperiod0:u.xperiod0,yperiod0:u.yperiod0,xperiodalignment:u.xperiodalignment,yperiodalignment:u.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:u.hovertext,hovertemplate:l({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),hoverinfo:r({},w.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label"])}),texttemplatefallback:t({editType:"plot"}),text:u.text,textposition:u.textposition,insidetextanchor:u.insidetextanchor,textangle:u.textangle,textfont:u.textfont,insidetextfont:u.insidetextfont,outsidetextfont:u.outsidetextfont,constraintext:u.constraintext,cliponaxis:u.cliponaxis,orientation:u.orientation,offset:u.offset,width:u.width,increasing:i("increasing"),decreasing:i("decreasing"),totals:i("intermediate sums and total"),connector:{line:{color:r({},v.color,{dflt:n.defaultLine}),width:r({},v.width,{editType:"plot"}),dash:v.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:u.offsetgroup,alignmentgroup:u.alignmentgroup,zorder:u.zorder}}}),qb=xe({"src/traces/waterfall/layout_attributes.js"(U,O){"use strict";O.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"}}}}),yp=xe({"src/constants/delta.js"(U,O){"use strict";O.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),Vb=xe({"src/traces/waterfall/defaults.js"(U,O){"use strict";var u=Sr(),v=bv(),w=sh().handleText,S=_v(),l=Sh(),e=jb(),t=wi(),a=yp(),r=a.INCREASING.COLOR,n=a.DECREASING.COLOR,i="#4499FF";function s(f,d,y){f(d+".marker.color",y),f(d+".marker.line.color",t.defaultLine),f(d+".marker.line.width")}function c(f,d,y,o){function b(T,m){return u.coerce(f,d,e,T,m)}var M=S(f,d,o,b);if(!M){d.visible=!1;return}l(f,d,o,b),b("xhoverformat"),b("yhoverformat"),b("measure"),b("orientation",d.x&&!d.y?"h":"v"),b("base"),b("offset"),b("width"),b("text"),b("hovertext"),b("hovertemplate"),b("hovertemplatefallback");var A=b("textposition");w(f,d,o,b,A,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),d.textposition!=="none"&&(b("texttemplate"),b("texttemplatefallback"),d.texttemplate||b("textinfo")),s(b,"increasing",r),s(b,"decreasing",n),s(b,"totals",i);var E=b("connector.visible");if(E){b("connector.mode");var g=b("connector.line.width");g&&(b("connector.line.color"),b("connector.line.dash"))}b("zorder")}function p(f,d){var y,o;function b(A){return u.coerce(o._input,o,e,A)}if(d.waterfallmode==="group")for(var M=0;M0&&(b?_+="M"+h[0]+","+x[1]+"V"+x[0]:_+="M"+h[1]+","+x[0]+"H"+h[0]),M!=="between"&&(g.isSum||T path").each(function(d){if(!d.isBlank){var y=f[d.dir].marker;u.select(this).call(w.fill,y.color).call(w.stroke,y.line.color).call(v.dashLine,y.line.dash,y.line.width).style("opacity",f.selectedpoints&&!d.selected?S:1)}}),t(p,f,r),p.selectAll(".lines").each(function(){var d=f.connector.line;v.lineGroupStyle(u.select(this).selectAll("path"),d.width,d.color,d.dash)})})}O.exports={style:a}}}),hS=xe({"src/traces/waterfall/hover.js"(U,O){"use strict";var u=uo().hoverLabelText,v=wi().opacity,w=vp().hoverOnBars,S=yp(),l={increasing:S.INCREASING.SYMBOL,decreasing:S.DECREASING.SYMBOL};O.exports=function(a,r,n,i,s){var c=w(a,r,n,i,s);if(!c)return;var p=c.cd,f=p[0].trace,d=f.orientation==="h",y=d?"x":"y",o=d?a.xa:a.ya;function b(D){return u(o,D,f[y+"hoverformat"])}var M=c.index,A=p[M],E=A.isSum?A.b+A.s:A.rawS;c.initial=A.b+A.s-E,c.delta=E,c.final=c.initial+c.delta;var g=b(Math.abs(c.delta));c.deltaLabel=E<0?"("+g+")":g,c.finalLabel=b(c.final),c.initialLabel=b(c.initial);var T=A.hi||f.hoverinfo,m=[];if(T&&T!=="none"&&T!=="skip"){var h=T==="all",x=T.split("+"),_=function(D){return h||x.indexOf(D)!==-1};A.isSum||(_("final")&&(d?!_("x"):!_("y"))&&m.push(c.finalLabel),_("delta")&&(E<0?m.push(c.deltaLabel+" "+l.decreasing):m.push(c.deltaLabel+" "+l.increasing)),_("initial")&&m.push("Initial: "+c.initialLabel))}return m.length&&(c.extraText=m.join("
")),c.color=e(f,A),[c]};function e(t,a){var r=t[a.dir].marker,n=r.color,i=r.line.color,s=r.line.width;if(v(n))return n;if(v(i)&&s)return i}}}),dS=xe({"src/traces/waterfall/event_data.js"(U,O){"use strict";O.exports=function(v,w){return v.x="xVal"in w?w.xVal:w.x,v.y="yVal"in w?w.yVal:w.y,"initial"in w&&(v.initial=w.initial),"delta"in w&&(v.delta=w.delta),"final"in w&&(v.final=w.final),w.xa&&(v.xaxis=w.xa),w.ya&&(v.yaxis=w.ya),v}}}),vS=xe({"src/traces/waterfall/index.js"(U,O){"use strict";O.exports={attributes:jb(),layoutAttributes:qb(),supplyDefaults:Vb().supplyDefaults,crossTraceDefaults:Vb().crossTraceDefaults,supplyLayoutDefaults:sS(),calc:lS(),crossTraceCalc:uS(),plot:cS(),style:fS().style,hoverPoints:hS(),eventData:dS(),selectPoints:pp(),moduleType:"trace",name:"waterfall",basePlotModule:Nu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),pS=xe({"lib/waterfall.js"(U,O){"use strict";O.exports=vS()}}),_p=xe({"src/traces/image/constants.js"(U,O){"use strict";O.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(u){return u.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(u){return u.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(u){return u.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(u){var v=u.slice(0,3);return v[1]=v[1]+"%",v[2]=v[2]+"%",v},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(u){var v=u.slice(0,4);return v[1]=v[1]+"%",v[2]=v[2]+"%",v},suffix:["\xB0","%","%",""]}}}}}),jg={};Xa(jg,{default:()=>$b});var Hb,Gb,qg,Wb,Yb,Vg,Hg,Gg,Xb,$b,Zb=Pr({"src/traces/image/attributes.ts"(){"use strict";Hb=da(oo()),Gb=da(Rs()),qg=da(js()),Wb=da(wu()),Yb=da(_p()),Vg=["rgb","rgba","rgba256","hsl","hsla"],Hg=[],Gg=[];for(let U of Vg){let O=Yb.colormodel[U];Hg.push(`For the \`${U}\` colormodel, it is [${(O.zminDflt||O.min).join(", ")}].`),Gg.push(`For the \`${U}\` colormodel, it is [${(O.zmaxDflt||O.max).join(", ")}].`)}Xb={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:Vg,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",Hg.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",Gg.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,Hb.extendFlat)({},Gb.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,qg.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,qg.templatefallbackAttrs)(),zorder:Wb.zorder},$b=Xb}}),mS=xe({"src/traces/image/defaults.js"(U,O){"use strict";var u=Sr(),v=(Zb(),Ta(jg)).default,w=_p(),S=hd().IMAGE_URL_PREFIX;O.exports=function(e,t){function a(i,s){return u.coerce(e,t,v,i,s)}a("source"),t.source&&!t.source.match(S)&&delete t.source,t._hasSource=!!t.source;var r=a("z");if(t._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}a("x0"),a("y0"),a("dx"),a("dy");var n;t._hasZ?(a("colormodel","rgb"),n=w.colormodel[t.colormodel],a("zmin",n.zminDflt||n.min),a("zmax",n.zmaxDflt||n.max)):t._hasSource&&(t.colormodel="rgba256",n=w.colormodel[t.colormodel],t.zmin=n.zminDflt,t.zmax=n.zmaxDflt),a("zsmooth"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),t._length=null,a("zorder")}}}),dd=xe({"node_modules/inherits/inherits_browser.js"(U,O){typeof Object.create=="function"?O.exports=function(v,w){w&&(v.super_=w,v.prototype=Object.create(w.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:O.exports=function(v,w){if(w){v.super_=w;var S=function(){};S.prototype=w.prototype,v.prototype=new S,v.prototype.constructor=v}}}}),Kb=xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/stream-browser.js"(U,O){O.exports=pv().EventEmitter}}),gS=xe({"node_modules/base64-js/index.js"(U){"use strict";U.byteLength=t,U.toByteArray=r,U.fromByteArray=s;var O=[],u=[],v=typeof Uint8Array<"u"?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(S=0,l=w.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var f=c.indexOf("=");f===-1&&(f=p);var d=f===p?0:4-f%4;return[f,d]}function t(c){var p=e(c),f=p[0],d=p[1];return(f+d)*3/4-d}function a(c,p,f){return(p+f)*3/4-f}function r(c){var p,f=e(c),d=f[0],y=f[1],o=new v(a(c,d,y)),b=0,M=y>0?d-4:d,A;for(A=0;A>16&255,o[b++]=p>>8&255,o[b++]=p&255;return y===2&&(p=u[c.charCodeAt(A)]<<2|u[c.charCodeAt(A+1)]>>4,o[b++]=p&255),y===1&&(p=u[c.charCodeAt(A)]<<10|u[c.charCodeAt(A+1)]<<4|u[c.charCodeAt(A+2)]>>2,o[b++]=p>>8&255,o[b++]=p&255),o}function n(c){return O[c>>18&63]+O[c>>12&63]+O[c>>6&63]+O[c&63]}function i(c,p,f){for(var d,y=[],o=p;oM?M:b+o));return d===1?(p=c[f-1],y.push(O[p>>2]+O[p<<4&63]+"==")):d===2&&(p=(c[f-2]<<8)+c[f-1],y.push(O[p>>10]+O[p>>4&63]+O[p<<2&63]+"=")),y.join("")}}}),yS=xe({"node_modules/ieee754/index.js"(U){U.read=function(O,u,v,w,S){var l,e,t=S*8-w-1,a=(1<>1,n=-7,i=v?S-1:0,s=v?-1:1,c=O[u+i];for(i+=s,l=c&(1<<-n)-1,c>>=-n,n+=t;n>0;l=l*256+O[u+i],i+=s,n-=8);for(e=l&(1<<-n)-1,l>>=-n,n+=w;n>0;e=e*256+O[u+i],i+=s,n-=8);if(l===0)l=1-r;else{if(l===a)return e?NaN:(c?-1:1)*(1/0);e=e+Math.pow(2,w),l=l-r}return(c?-1:1)*e*Math.pow(2,l-w)},U.write=function(O,u,v,w,S,l){var e,t,a,r=l*8-S-1,n=(1<>1,s=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=w?0:l-1,p=w?1:-1,f=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(t=isNaN(u)?1:0,e=n):(e=Math.floor(Math.log(u)/Math.LN2),u*(a=Math.pow(2,-e))<1&&(e--,a*=2),e+i>=1?u+=s/a:u+=s*Math.pow(2,1-i),u*a>=2&&(e++,a/=2),e+i>=n?(t=0,e=n):e+i>=1?(t=(u*a-1)*Math.pow(2,S),e=e+i):(t=u*Math.pow(2,i-1)*Math.pow(2,S),e=0));S>=8;O[v+c]=t&255,c+=p,t/=256,S-=8);for(e=e<0;O[v+c]=e&255,c+=p,e/=256,r-=8);O[v+c-p]|=f*128}}}),Mv=xe({"node_modules/buffer/index.js"(U){"use strict";var O=gS(),u=yS(),v=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;U.Buffer=e,U.SlowBuffer=y,U.INSPECT_MAX_BYTES=50;var w=2147483647;U.kMaxLength=w,e.TYPED_ARRAY_SUPPORT=S(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function S(){try{let ie=new Uint8Array(1),se={foo:function(){return 42}};return Object.setPrototypeOf(se,Uint8Array.prototype),Object.setPrototypeOf(ie,se),ie.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function l(ie){if(ie>w)throw new RangeError('The value "'+ie+'" is invalid for option "size"');let se=new Uint8Array(ie);return Object.setPrototypeOf(se,e.prototype),se}function e(ie,se,ne){if(typeof ie=="number"){if(typeof se=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return n(ie)}return t(ie,se,ne)}e.poolSize=8192;function t(ie,se,ne){if(typeof ie=="string")return i(ie,se);if(ArrayBuffer.isView(ie))return c(ie);if(ie==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ie);if(Ce(ie,ArrayBuffer)||ie&&Ce(ie.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ce(ie,SharedArrayBuffer)||ie&&Ce(ie.buffer,SharedArrayBuffer)))return p(ie,se,ne);if(typeof ie=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let be=ie.valueOf&&ie.valueOf();if(be!=null&&be!==ie)return e.from(be,se,ne);let De=f(ie);if(De)return De;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ie[Symbol.toPrimitive]=="function")return e.from(ie[Symbol.toPrimitive]("string"),se,ne);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ie)}e.from=function(ie,se,ne){return t(ie,se,ne)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function a(ie){if(typeof ie!="number")throw new TypeError('"size" argument must be of type number');if(ie<0)throw new RangeError('The value "'+ie+'" is invalid for option "size"')}function r(ie,se,ne){return a(ie),ie<=0?l(ie):se!==void 0?typeof ne=="string"?l(ie).fill(se,ne):l(ie).fill(se):l(ie)}e.alloc=function(ie,se,ne){return r(ie,se,ne)};function n(ie){return a(ie),l(ie<0?0:d(ie)|0)}e.allocUnsafe=function(ie){return n(ie)},e.allocUnsafeSlow=function(ie){return n(ie)};function i(ie,se){if((typeof se!="string"||se==="")&&(se="utf8"),!e.isEncoding(se))throw new TypeError("Unknown encoding: "+se);let ne=o(ie,se)|0,be=l(ne),De=be.write(ie,se);return De!==ne&&(be=be.slice(0,De)),be}function s(ie){let se=ie.length<0?0:d(ie.length)|0,ne=l(se);for(let be=0;be=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return ie|0}function y(ie){return+ie!=ie&&(ie=0),e.alloc(+ie)}e.isBuffer=function(se){return se!=null&&se._isBuffer===!0&&se!==e.prototype},e.compare=function(se,ne){if(Ce(se,Uint8Array)&&(se=e.from(se,se.offset,se.byteLength)),Ce(ne,Uint8Array)&&(ne=e.from(ne,ne.offset,ne.byteLength)),!e.isBuffer(se)||!e.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(se===ne)return 0;let be=se.length,De=ne.length;for(let qe=0,Ne=Math.min(be,De);qeDe.length?(e.isBuffer(Ne)||(Ne=e.from(Ne)),Ne.copy(De,qe)):Uint8Array.prototype.set.call(De,Ne,qe);else if(e.isBuffer(Ne))Ne.copy(De,qe);else throw new TypeError('"list" argument must be an Array of Buffers');qe+=Ne.length}return De};function o(ie,se){if(e.isBuffer(ie))return ie.length;if(ArrayBuffer.isView(ie)||Ce(ie,ArrayBuffer))return ie.byteLength;if(typeof ie!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ie);let ne=ie.length,be=arguments.length>2&&arguments[2]===!0;if(!be&&ne===0)return 0;let De=!1;for(;;)switch(se){case"ascii":case"latin1":case"binary":return ne;case"utf8":case"utf-8":return ue(ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne*2;case"hex":return ne>>>1;case"base64":return Te(ie).length;default:if(De)return be?-1:ue(ie).length;se=(""+se).toLowerCase(),De=!0}}e.byteLength=o;function b(ie,se,ne){let be=!1;if((se===void 0||se<0)&&(se=0),se>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0,se>>>=0,ne<=se))return"";for(ie||(ie="utf8");;)switch(ie){case"hex":return R(this,se,ne);case"utf8":case"utf-8":return D(this,se,ne);case"ascii":return I(this,se,ne);case"latin1":case"binary":return z(this,se,ne);case"base64":return _(this,se,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,se,ne);default:if(be)throw new TypeError("Unknown encoding: "+ie);ie=(ie+"").toLowerCase(),be=!0}}e.prototype._isBuffer=!0;function M(ie,se,ne){let be=ie[se];ie[se]=ie[ne],ie[ne]=be}e.prototype.swap16=function(){let se=this.length;if(se%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;nene&&(se+=" ... "),""},v&&(e.prototype[v]=e.prototype.inspect),e.prototype.compare=function(se,ne,be,De,qe){if(Ce(se,Uint8Array)&&(se=e.from(se,se.offset,se.byteLength)),!e.isBuffer(se))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof se);if(ne===void 0&&(ne=0),be===void 0&&(be=se?se.length:0),De===void 0&&(De=0),qe===void 0&&(qe=this.length),ne<0||be>se.length||De<0||qe>this.length)throw new RangeError("out of range index");if(De>=qe&&ne>=be)return 0;if(De>=qe)return-1;if(ne>=be)return 1;if(ne>>>=0,be>>>=0,De>>>=0,qe>>>=0,this===se)return 0;let Ne=qe-De,ut=be-ne,ot=Math.min(Ne,ut),yt=this.slice(De,qe),At=se.slice(ne,be);for(let It=0;It2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,Ue(ne)&&(ne=De?0:ie.length-1),ne<0&&(ne=ie.length+ne),ne>=ie.length){if(De)return-1;ne=ie.length-1}else if(ne<0)if(De)ne=0;else return-1;if(typeof se=="string"&&(se=e.from(se,be)),e.isBuffer(se))return se.length===0?-1:E(ie,se,ne,be,De);if(typeof se=="number")return se=se&255,typeof Uint8Array.prototype.indexOf=="function"?De?Uint8Array.prototype.indexOf.call(ie,se,ne):Uint8Array.prototype.lastIndexOf.call(ie,se,ne):E(ie,[se],ne,be,De);throw new TypeError("val must be string, number or Buffer")}function E(ie,se,ne,be,De){let qe=1,Ne=ie.length,ut=se.length;if(be!==void 0&&(be=String(be).toLowerCase(),be==="ucs2"||be==="ucs-2"||be==="utf16le"||be==="utf-16le")){if(ie.length<2||se.length<2)return-1;qe=2,Ne/=2,ut/=2,ne/=2}function ot(At,It){return qe===1?At[It]:At.readUInt16BE(It*qe)}let yt;if(De){let At=-1;for(yt=ne;ytNe&&(ne=Ne-ut),yt=ne;yt>=0;yt--){let At=!0;for(let It=0;ItDe&&(be=De)):be=De;let qe=se.length;be>qe/2&&(be=qe/2);let Ne;for(Ne=0;Ne>>0,isFinite(be)?(be=be>>>0,De===void 0&&(De="utf8")):(De=be,be=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let qe=this.length-ne;if((be===void 0||be>qe)&&(be=qe),se.length>0&&(be<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");De||(De="utf8");let Ne=!1;for(;;)switch(De){case"hex":return g(this,se,ne,be);case"utf8":case"utf-8":return T(this,se,ne,be);case"ascii":case"latin1":case"binary":return m(this,se,ne,be);case"base64":return h(this,se,ne,be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,se,ne,be);default:if(Ne)throw new TypeError("Unknown encoding: "+De);De=(""+De).toLowerCase(),Ne=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(ie,se,ne){return se===0&&ne===ie.length?O.fromByteArray(ie):O.fromByteArray(ie.slice(se,ne))}function D(ie,se,ne){ne=Math.min(ie.length,ne);let be=[],De=se;for(;De239?4:qe>223?3:qe>191?2:1;if(De+ut<=ne){let ot,yt,At,It;switch(ut){case 1:qe<128&&(Ne=qe);break;case 2:ot=ie[De+1],(ot&192)===128&&(It=(qe&31)<<6|ot&63,It>127&&(Ne=It));break;case 3:ot=ie[De+1],yt=ie[De+2],(ot&192)===128&&(yt&192)===128&&(It=(qe&15)<<12|(ot&63)<<6|yt&63,It>2047&&(It<55296||It>57343)&&(Ne=It));break;case 4:ot=ie[De+1],yt=ie[De+2],At=ie[De+3],(ot&192)===128&&(yt&192)===128&&(At&192)===128&&(It=(qe&15)<<18|(ot&63)<<12|(yt&63)<<6|At&63,It>65535&&It<1114112&&(Ne=It))}}Ne===null?(Ne=65533,ut=1):Ne>65535&&(Ne-=65536,be.push(Ne>>>10&1023|55296),Ne=56320|Ne&1023),be.push(Ne),De+=ut}return F(be)}var C=4096;function F(ie){let se=ie.length;if(se<=C)return String.fromCharCode.apply(String,ie);let ne="",be=0;for(;bebe)&&(ne=be);let De="";for(let qe=se;qebe&&(se=be),ne<0?(ne+=be,ne<0&&(ne=0)):ne>be&&(ne=be),nene)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(se,ne,be){se=se>>>0,ne=ne>>>0,be||B(se,ne,this.length);let De=this[se],qe=1,Ne=0;for(;++Ne>>0,ne=ne>>>0,be||B(se,ne,this.length);let De=this[se+--ne],qe=1;for(;ne>0&&(qe*=256);)De+=this[se+--ne]*qe;return De},e.prototype.readUint8=e.prototype.readUInt8=function(se,ne){return se=se>>>0,ne||B(se,1,this.length),this[se]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(se,ne){return se=se>>>0,ne||B(se,2,this.length),this[se]|this[se+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(se,ne){return se=se>>>0,ne||B(se,2,this.length),this[se]<<8|this[se+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(se,ne){return se=se>>>0,ne||B(se,4,this.length),(this[se]|this[se+1]<<8|this[se+2]<<16)+this[se+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(se,ne){return se=se>>>0,ne||B(se,4,this.length),this[se]*16777216+(this[se+1]<<16|this[se+2]<<8|this[se+3])},e.prototype.readBigUInt64LE=_e(function(se){se=se>>>0,X(se,"offset");let ne=this[se],be=this[se+7];(ne===void 0||be===void 0)&&$(se,this.length-8);let De=ne+this[++se]*2**8+this[++se]*2**16+this[++se]*2**24,qe=this[++se]+this[++se]*2**8+this[++se]*2**16+be*2**24;return BigInt(De)+(BigInt(qe)<>>0,X(se,"offset");let ne=this[se],be=this[se+7];(ne===void 0||be===void 0)&&$(se,this.length-8);let De=ne*2**24+this[++se]*2**16+this[++se]*2**8+this[++se],qe=this[++se]*2**24+this[++se]*2**16+this[++se]*2**8+be;return(BigInt(De)<>>0,ne=ne>>>0,be||B(se,ne,this.length);let De=this[se],qe=1,Ne=0;for(;++Ne=qe&&(De-=Math.pow(2,8*ne)),De},e.prototype.readIntBE=function(se,ne,be){se=se>>>0,ne=ne>>>0,be||B(se,ne,this.length);let De=ne,qe=1,Ne=this[se+--De];for(;De>0&&(qe*=256);)Ne+=this[se+--De]*qe;return qe*=128,Ne>=qe&&(Ne-=Math.pow(2,8*ne)),Ne},e.prototype.readInt8=function(se,ne){return se=se>>>0,ne||B(se,1,this.length),this[se]&128?(255-this[se]+1)*-1:this[se]},e.prototype.readInt16LE=function(se,ne){se=se>>>0,ne||B(se,2,this.length);let be=this[se]|this[se+1]<<8;return be&32768?be|4294901760:be},e.prototype.readInt16BE=function(se,ne){se=se>>>0,ne||B(se,2,this.length);let be=this[se+1]|this[se]<<8;return be&32768?be|4294901760:be},e.prototype.readInt32LE=function(se,ne){return se=se>>>0,ne||B(se,4,this.length),this[se]|this[se+1]<<8|this[se+2]<<16|this[se+3]<<24},e.prototype.readInt32BE=function(se,ne){return se=se>>>0,ne||B(se,4,this.length),this[se]<<24|this[se+1]<<16|this[se+2]<<8|this[se+3]},e.prototype.readBigInt64LE=_e(function(se){se=se>>>0,X(se,"offset");let ne=this[se],be=this[se+7];(ne===void 0||be===void 0)&&$(se,this.length-8);let De=this[se+4]+this[se+5]*2**8+this[se+6]*2**16+(be<<24);return(BigInt(De)<>>0,X(se,"offset");let ne=this[se],be=this[se+7];(ne===void 0||be===void 0)&&$(se,this.length-8);let De=(ne<<24)+this[++se]*2**16+this[++se]*2**8+this[++se];return(BigInt(De)<>>0,ne||B(se,4,this.length),u.read(this,se,!0,23,4)},e.prototype.readFloatBE=function(se,ne){return se=se>>>0,ne||B(se,4,this.length),u.read(this,se,!1,23,4)},e.prototype.readDoubleLE=function(se,ne){return se=se>>>0,ne||B(se,8,this.length),u.read(this,se,!0,52,8)},e.prototype.readDoubleBE=function(se,ne){return se=se>>>0,ne||B(se,8,this.length),u.read(this,se,!1,52,8)};function N(ie,se,ne,be,De,qe){if(!e.isBuffer(ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(se>De||seie.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(se,ne,be,De){if(se=+se,ne=ne>>>0,be=be>>>0,!De){let ut=Math.pow(2,8*be)-1;N(this,se,ne,be,ut,0)}let qe=1,Ne=0;for(this[ne]=se&255;++Ne>>0,be=be>>>0,!De){let ut=Math.pow(2,8*be)-1;N(this,se,ne,be,ut,0)}let qe=be-1,Ne=1;for(this[ne+qe]=se&255;--qe>=0&&(Ne*=256);)this[ne+qe]=se/Ne&255;return ne+be},e.prototype.writeUint8=e.prototype.writeUInt8=function(se,ne,be){return se=+se,ne=ne>>>0,be||N(this,se,ne,1,255,0),this[ne]=se&255,ne+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(se,ne,be){return se=+se,ne=ne>>>0,be||N(this,se,ne,2,65535,0),this[ne]=se&255,this[ne+1]=se>>>8,ne+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(se,ne,be){return se=+se,ne=ne>>>0,be||N(this,se,ne,2,65535,0),this[ne]=se>>>8,this[ne+1]=se&255,ne+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(se,ne,be){return se=+se,ne=ne>>>0,be||N(this,se,ne,4,4294967295,0),this[ne+3]=se>>>24,this[ne+2]=se>>>16,this[ne+1]=se>>>8,this[ne]=se&255,ne+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(se,ne,be){return se=+se,ne=ne>>>0,be||N(this,se,ne,4,4294967295,0),this[ne]=se>>>24,this[ne+1]=se>>>16,this[ne+2]=se>>>8,this[ne+3]=se&255,ne+4};function q(ie,se,ne,be,De){Z(se,be,De,ie,ne,7);let qe=Number(se&BigInt(4294967295));ie[ne++]=qe,qe=qe>>8,ie[ne++]=qe,qe=qe>>8,ie[ne++]=qe,qe=qe>>8,ie[ne++]=qe;let Ne=Number(se>>BigInt(32)&BigInt(4294967295));return ie[ne++]=Ne,Ne=Ne>>8,ie[ne++]=Ne,Ne=Ne>>8,ie[ne++]=Ne,Ne=Ne>>8,ie[ne++]=Ne,ne}function Y(ie,se,ne,be,De){Z(se,be,De,ie,ne,7);let qe=Number(se&BigInt(4294967295));ie[ne+7]=qe,qe=qe>>8,ie[ne+6]=qe,qe=qe>>8,ie[ne+5]=qe,qe=qe>>8,ie[ne+4]=qe;let Ne=Number(se>>BigInt(32)&BigInt(4294967295));return ie[ne+3]=Ne,Ne=Ne>>8,ie[ne+2]=Ne,Ne=Ne>>8,ie[ne+1]=Ne,Ne=Ne>>8,ie[ne]=Ne,ne+8}e.prototype.writeBigUInt64LE=_e(function(se,ne=0){return q(this,se,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=_e(function(se,ne=0){return Y(this,se,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(se,ne,be,De){if(se=+se,ne=ne>>>0,!De){let ot=Math.pow(2,8*be-1);N(this,se,ne,be,ot-1,-ot)}let qe=0,Ne=1,ut=0;for(this[ne]=se&255;++qe>0)-ut&255;return ne+be},e.prototype.writeIntBE=function(se,ne,be,De){if(se=+se,ne=ne>>>0,!De){let ot=Math.pow(2,8*be-1);N(this,se,ne,be,ot-1,-ot)}let qe=be-1,Ne=1,ut=0;for(this[ne+qe]=se&255;--qe>=0&&(Ne*=256);)se<0&&ut===0&&this[ne+qe+1]!==0&&(ut=1),this[ne+qe]=(se/Ne>>0)-ut&255;return ne+be},e.prototype.writeInt8=function(se,ne,be){return se=+se,ne=ne>>>0,be||N(this,se,ne,1,127,-128),se<0&&(se=255+se+1),this[ne]=se&255,ne+1},e.prototype.writeInt16LE=function(se,ne,be){return se=+se,ne=ne>>>0,be||N(this,se,ne,2,32767,-32768),this[ne]=se&255,this[ne+1]=se>>>8,ne+2},e.prototype.writeInt16BE=function(se,ne,be){return se=+se,ne=ne>>>0,be||N(this,se,ne,2,32767,-32768),this[ne]=se>>>8,this[ne+1]=se&255,ne+2},e.prototype.writeInt32LE=function(se,ne,be){return se=+se,ne=ne>>>0,be||N(this,se,ne,4,2147483647,-2147483648),this[ne]=se&255,this[ne+1]=se>>>8,this[ne+2]=se>>>16,this[ne+3]=se>>>24,ne+4},e.prototype.writeInt32BE=function(se,ne,be){return se=+se,ne=ne>>>0,be||N(this,se,ne,4,2147483647,-2147483648),se<0&&(se=4294967295+se+1),this[ne]=se>>>24,this[ne+1]=se>>>16,this[ne+2]=se>>>8,this[ne+3]=se&255,ne+4},e.prototype.writeBigInt64LE=_e(function(se,ne=0){return q(this,se,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=_e(function(se,ne=0){return Y(this,se,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ee(ie,se,ne,be,De,qe){if(ne+be>ie.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("Index out of range")}function te(ie,se,ne,be,De){return se=+se,ne=ne>>>0,De||ee(ie,se,ne,4,34028234663852886e22,-34028234663852886e22),u.write(ie,se,ne,be,23,4),ne+4}e.prototype.writeFloatLE=function(se,ne,be){return te(this,se,ne,!0,be)},e.prototype.writeFloatBE=function(se,ne,be){return te(this,se,ne,!1,be)};function ae(ie,se,ne,be,De){return se=+se,ne=ne>>>0,De||ee(ie,se,ne,8,17976931348623157e292,-17976931348623157e292),u.write(ie,se,ne,be,52,8),ne+8}e.prototype.writeDoubleLE=function(se,ne,be){return ae(this,se,ne,!0,be)},e.prototype.writeDoubleBE=function(se,ne,be){return ae(this,se,ne,!1,be)},e.prototype.copy=function(se,ne,be,De){if(!e.isBuffer(se))throw new TypeError("argument should be a Buffer");if(be||(be=0),!De&&De!==0&&(De=this.length),ne>=se.length&&(ne=se.length),ne||(ne=0),De>0&&De=this.length)throw new RangeError("Index out of range");if(De<0)throw new RangeError("sourceEnd out of bounds");De>this.length&&(De=this.length),se.length-ne>>0,be=be===void 0?this.length:be>>>0,se||(se=0);let qe;if(typeof se=="number")for(qe=ne;qe2**32?De=K(String(ne)):typeof ne=="bigint"&&(De=String(ne),(ne>BigInt(2)**BigInt(32)||ne<-(BigInt(2)**BigInt(32)))&&(De=K(De)),De+="n"),be+=` It must be ${se}. Received ${De}`,be},RangeError);function K(ie){let se="",ne=ie.length,be=ie[0]==="-"?1:0;for(;ne>=be+4;ne-=3)se=`_${ie.slice(ne-3,ne)}${se}`;return`${ie.slice(0,ne)}${se}`}function H(ie,se,ne){X(se,"offset"),(ie[se]===void 0||ie[se+ne]===void 0)&&$(se,ie.length-(ne+1))}function Z(ie,se,ne,be,De,qe){if(ie>ne||ie3?se===0||se===BigInt(0)?ut=`>= 0${Ne} and < 2${Ne} ** ${(qe+1)*8}${Ne}`:ut=`>= -(2${Ne} ** ${(qe+1)*8-1}${Ne}) and < 2 ** ${(qe+1)*8-1}${Ne}`:ut=`>= ${se}${Ne} and <= ${ne}${Ne}`,new j.ERR_OUT_OF_RANGE("value",ut,ie)}H(be,De,qe)}function X(ie,se){if(typeof ie!="number")throw new j.ERR_INVALID_ARG_TYPE(se,"number",ie)}function $(ie,se,ne){throw Math.floor(ie)!==ie?(X(ie,ne),new j.ERR_OUT_OF_RANGE(ne||"offset","an integer",ie)):se<0?new j.ERR_BUFFER_OUT_OF_BOUNDS:new j.ERR_OUT_OF_RANGE(ne||"offset",`>= ${ne?1:0} and <= ${se}`,ie)}var Q=/[^+/0-9A-Za-z-_]/g;function re(ie){if(ie=ie.split("=")[0],ie=ie.trim().replace(Q,""),ie.length<2)return"";for(;ie.length%4!==0;)ie=ie+"=";return ie}function ue(ie,se){se=se||1/0;let ne,be=ie.length,De=null,qe=[];for(let Ne=0;Ne55295&&ne<57344){if(!De){if(ne>56319){(se-=3)>-1&&qe.push(239,191,189);continue}else if(Ne+1===be){(se-=3)>-1&&qe.push(239,191,189);continue}De=ne;continue}if(ne<56320){(se-=3)>-1&&qe.push(239,191,189),De=ne;continue}ne=(De-55296<<10|ne-56320)+65536}else De&&(se-=3)>-1&&qe.push(239,191,189);if(De=null,ne<128){if((se-=1)<0)break;qe.push(ne)}else if(ne<2048){if((se-=2)<0)break;qe.push(ne>>6|192,ne&63|128)}else if(ne<65536){if((se-=3)<0)break;qe.push(ne>>12|224,ne>>6&63|128,ne&63|128)}else if(ne<1114112){if((se-=4)<0)break;qe.push(ne>>18|240,ne>>12&63|128,ne>>6&63|128,ne&63|128)}else throw new Error("Invalid code point")}return qe}function pe(ie){let se=[];for(let ne=0;ne>8,De=ne%256,qe.push(De),qe.push(be);return qe}function Te(ie){return O.toByteArray(re(ie))}function Se(ie,se,ne,be){let De;for(De=0;De=se.length||De>=ie.length);++De)se[De+ne]=ie[De];return De}function Ce(ie,se){return ie instanceof se||ie!=null&&ie.constructor!=null&&ie.constructor.name!=null&&ie.constructor.name===se.name}function Ue(ie){return ie!==ie}var Oe=function(){let ie="0123456789abcdef",se=new Array(256);for(let ne=0;ne<16;++ne){let be=ne*16;for(let De=0;De<16;++De)se[be+De]=ie[ne]+ie[De]}return se}();function _e(ie){return typeof BigInt>"u"?ce:ie}function ce(){throw new Error("BigInt not supported")}}}),Wg=xe({"node_modules/has-symbols/shams.js"(U,O){"use strict";O.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var v={},w=Symbol("test"),S=Object(w);if(typeof w=="string"||Object.prototype.toString.call(w)!=="[object Symbol]"||Object.prototype.toString.call(S)!=="[object Symbol]")return!1;var l=42;v[w]=l;for(var e in v)return!1;if(typeof Object.keys=="function"&&Object.keys(v).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(v).length!==0)return!1;var t=Object.getOwnPropertySymbols(v);if(t.length!==1||t[0]!==w||!Object.prototype.propertyIsEnumerable.call(v,w))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(v,w);if(a.value!==l||a.enumerable!==!0)return!1}return!0}}}),M0=xe({"node_modules/has-tostringtag/shams.js"(U,O){"use strict";var u=Wg();O.exports=function(){return u()&&!!Symbol.toStringTag}}}),Jb=xe({"node_modules/es-object-atoms/index.js"(U,O){"use strict";O.exports=Object}}),_S=xe({"node_modules/es-errors/index.js"(U,O){"use strict";O.exports=Error}}),bS=xe({"node_modules/es-errors/eval.js"(U,O){"use strict";O.exports=EvalError}}),xS=xe({"node_modules/es-errors/range.js"(U,O){"use strict";O.exports=RangeError}}),wS=xe({"node_modules/es-errors/ref.js"(U,O){"use strict";O.exports=ReferenceError}}),Qb=xe({"node_modules/es-errors/syntax.js"(U,O){"use strict";O.exports=SyntaxError}}),bp=xe({"node_modules/es-errors/type.js"(U,O){"use strict";O.exports=TypeError}}),TS=xe({"node_modules/es-errors/uri.js"(U,O){"use strict";O.exports=URIError}}),AS=xe({"node_modules/math-intrinsics/abs.js"(U,O){"use strict";O.exports=Math.abs}}),MS=xe({"node_modules/math-intrinsics/floor.js"(U,O){"use strict";O.exports=Math.floor}}),SS=xe({"node_modules/math-intrinsics/max.js"(U,O){"use strict";O.exports=Math.max}}),ES=xe({"node_modules/math-intrinsics/min.js"(U,O){"use strict";O.exports=Math.min}}),kS=xe({"node_modules/math-intrinsics/pow.js"(U,O){"use strict";O.exports=Math.pow}}),CS=xe({"node_modules/math-intrinsics/round.js"(U,O){"use strict";O.exports=Math.round}}),LS=xe({"node_modules/math-intrinsics/isNaN.js"(U,O){"use strict";O.exports=Number.isNaN||function(v){return v!==v}}}),PS=xe({"node_modules/math-intrinsics/sign.js"(U,O){"use strict";var u=LS();O.exports=function(w){return u(w)||w===0?w:w<0?-1:1}}}),IS=xe({"node_modules/gopd/gOPD.js"(U,O){"use strict";O.exports=Object.getOwnPropertyDescriptor}}),Sv=xe({"node_modules/gopd/index.js"(U,O){"use strict";var u=IS();if(u)try{u([],"length")}catch{u=null}O.exports=u}}),S0=xe({"node_modules/es-define-property/index.js"(U,O){"use strict";var u=Object.defineProperty||!1;if(u)try{u({},"a",{value:1})}catch{u=!1}O.exports=u}}),DS=xe({"node_modules/has-symbols/index.js"(U,O){"use strict";var u=typeof Symbol<"u"&&Symbol,v=Wg();O.exports=function(){return typeof u!="function"||typeof Symbol!="function"||typeof u("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:v()}}}),ex=xe({"node_modules/get-proto/Reflect.getPrototypeOf.js"(U,O){"use strict";O.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),tx=xe({"node_modules/get-proto/Object.getPrototypeOf.js"(U,O){"use strict";var u=Jb();O.exports=u.getPrototypeOf||null}}),RS=xe({"node_modules/function-bind/implementation.js"(U,O){"use strict";var u="Function.prototype.bind called on incompatible ",v=Object.prototype.toString,w=Math.max,S="[object Function]",l=function(r,n){for(var i=[],s=0;s"u"||!T?u:T(Uint8Array),F={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?u:ArrayBuffer,"%ArrayIteratorPrototype%":g&&T?T([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":D,"%AsyncGenerator%":D,"%AsyncGeneratorFunction%":D,"%AsyncIteratorPrototype%":D,"%Atomics%":typeof Atomics>"u"?u:Atomics,"%BigInt%":typeof BigInt>"u"?u:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?u:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?u:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?u:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":w,"%eval%":eval,"%EvalError%":S,"%Float16Array%":typeof Float16Array>"u"?u:Float16Array,"%Float32Array%":typeof Float32Array>"u"?u:Float32Array,"%Float64Array%":typeof Float64Array>"u"?u:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?u:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":D,"%Int8Array%":typeof Int8Array>"u"?u:Int8Array,"%Int16Array%":typeof Int16Array>"u"?u:Int16Array,"%Int32Array%":typeof Int32Array>"u"?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&T?T(T([][Symbol.iterator]())):u,"%JSON%":typeof JSON=="object"?JSON:u,"%Map%":typeof Map>"u"?u:Map,"%MapIteratorPrototype%":typeof Map>"u"||!g||!T?u:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":v,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?u:Promise,"%Proxy%":typeof Proxy>"u"?u:Proxy,"%RangeError%":l,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?u:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?u:Set,"%SetIteratorPrototype%":typeof Set>"u"||!g||!T?u:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&T?T(""[Symbol.iterator]()):u,"%Symbol%":g?Symbol:u,"%SyntaxError%":t,"%ThrowTypeError%":E,"%TypedArray%":C,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?u:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?u:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?u:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?u:Uint32Array,"%URIError%":r,"%WeakMap%":typeof WeakMap>"u"?u:WeakMap,"%WeakRef%":typeof WeakRef>"u"?u:WeakRef,"%WeakSet%":typeof WeakSet>"u"?u:WeakSet,"%Function.prototype.call%":_,"%Function.prototype.apply%":x,"%Object.defineProperty%":M,"%Object.getPrototypeOf%":m,"%Math.abs%":n,"%Math.floor%":i,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":p,"%Math.round%":f,"%Math.sign%":d,"%Reflect.getPrototypeOf%":h};if(T)try{null.error}catch(H){I=T(T(H)),F["%Error.prototype%"]=I}var I,z=function H(Z){var X;if(Z==="%AsyncFunction%")X=o("async function () {}");else if(Z==="%GeneratorFunction%")X=o("function* () {}");else if(Z==="%AsyncGeneratorFunction%")X=o("async function* () {}");else if(Z==="%AsyncGenerator%"){var $=H("%AsyncGeneratorFunction%");$&&(X=$.prototype)}else if(Z==="%AsyncIteratorPrototype%"){var Q=H("%AsyncGenerator%");Q&&T&&(X=T(Q.prototype))}return F[Z]=X,X},R={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},k=xp(),B=US(),N=k.call(_,Array.prototype.concat),q=k.call(x,Array.prototype.splice),Y=k.call(_,String.prototype.replace),ee=k.call(_,String.prototype.slice),te=k.call(_,RegExp.prototype.exec),ae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,j=/\\(\\)?/g,G=function(Z){var X=ee(Z,0,1),$=ee(Z,-1);if(X==="%"&&$!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if($==="%"&&X!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var Q=[];return Y(Z,ae,function(re,ue,pe,ge){Q[Q.length]=pe?Y(ge,j,"$1"):ue||re}),Q},K=function(Z,X){var $=Z,Q;if(B(R,$)&&(Q=R[$],$="%"+Q[0]+"%"),B(F,$)){var re=F[$];if(re===D&&(re=z($)),typeof re>"u"&&!X)throw new a("intrinsic "+Z+" exists, but is not available. Please file an issue!");return{alias:Q,name:$,value:re}}throw new t("intrinsic "+Z+" does not exist!")};O.exports=function(Z,X){if(typeof Z!="string"||Z.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof X!="boolean")throw new a('"allowMissing" argument must be a boolean');if(te(/^%?[^%]*%?$/,Z)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var $=G(Z),Q=$.length>0?$[0]:"",re=K("%"+Q+"%",X),ue=re.name,pe=re.value,ge=!1,Te=re.alias;Te&&(Q=Te[0],q($,N([0,1],Te)));for(var Se=1,Ce=!0;Se<$.length;Se+=1){var Ue=$[Se],Oe=ee(Ue,0,1),_e=ee(Ue,-1);if((Oe==='"'||Oe==="'"||Oe==="`"||_e==='"'||_e==="'"||_e==="`")&&Oe!==_e)throw new t("property names with quotes must have matching quotes");if((Ue==="constructor"||!Ce)&&(ge=!0),Q+="."+Ue,ue="%"+Q+"%",B(F,ue))pe=F[ue];else if(pe!=null){if(!(Ue in pe)){if(!X)throw new a("base intrinsic for "+Z+" exists, but the property is not available.");return}if(b&&Se+1>=$.length){var ce=b(pe,Ue);Ce=!!ce,Ce&&"get"in ce&&!("originalValue"in ce.get)?pe=ce.get:pe=pe[Ue]}else Ce=B(pe,Ue),pe=pe[Ue];Ce&&!ge&&(F[ue]=pe)}}return pe}}}),jS=xe({"node_modules/define-data-property/index.js"(U,O){"use strict";var u=S0(),v=Qb(),w=bp(),S=Sv();O.exports=function(e,t,a){if(!e||typeof e!="object"&&typeof e!="function")throw new w("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new w("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new w("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new w("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new w("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new w("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!S&&S(e,t);if(u)u(e,t,{configurable:i===null&&c?c.configurable:!i,enumerable:r===null&&c?c.enumerable:!r,value:a,writable:n===null&&c?c.writable:!n});else if(s||!r&&!n&&!i)e[t]=a;else throw new v("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),ax=xe({"node_modules/has-property-descriptors/index.js"(U,O){"use strict";var u=S0(),v=function(){return!!u};v.hasArrayLengthDefineBug=function(){if(!u)return null;try{return u([],"length",{value:1}).length!==1}catch{return!0}},O.exports=v}}),qS=xe({"node_modules/set-function-length/index.js"(U,O){"use strict";var u=Xg(),v=jS(),w=ax()(),S=Sv(),l=bp(),e=u("%Math.floor%");O.exports=function(a,r){if(typeof a!="function")throw new l("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||e(r)!==r)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in a&&S){var c=S(a,"length");c&&!c.configurable&&(i=!1),c&&!c.writable&&(s=!1)}return(i||s||!n)&&(w?v(a,"length",r,!0,!0):v(a,"length",r)),a}}}),E0=xe({"node_modules/call-bind/index.js"(U,O){"use strict";var u=xp(),v=Xg(),w=qS(),S=bp(),l=v("%Function.prototype.apply%"),e=v("%Function.prototype.call%"),t=v("%Reflect.apply%",!0)||u.call(e,l),a=S0(),r=v("%Math.max%");O.exports=function(s){if(typeof s!="function")throw new S("a function is required");var c=t(u,e,arguments);return w(c,1+r(0,s.length-(arguments.length-1)),!0)};var n=function(){return t(u,l,arguments)};a?a(O.exports,"apply",{value:n}):O.exports.apply=n}}),wp=xe({"node_modules/call-bind/callBound.js"(U,O){"use strict";var u=Xg(),v=E0(),w=v(u("String.prototype.indexOf"));O.exports=function(l,e){var t=u(l,!!e);return typeof t=="function"&&w(l,".prototype.")>-1?v(t):t}}}),VS=xe({"node_modules/is-arguments/index.js"(U,O){"use strict";var u=M0()(),v=wp(),w=v("Object.prototype.toString"),S=function(a){return u&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:w(a)==="[object Arguments]"},l=function(a){return S(a)?!0:a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&w(a)!=="[object Array]"&&w(a.callee)==="[object Function]"},e=function(){return S(arguments)}();S.isLegacyArguments=l,O.exports=e?S:l}}),HS=xe({"node_modules/is-generator-function/index.js"(U,O){"use strict";var u=Object.prototype.toString,v=Function.prototype.toString,w=/^\s*(?:function)?\*/,S=M0()(),l=Object.getPrototypeOf,e=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},t;O.exports=function(r){if(typeof r!="function")return!1;if(w.test(v.call(r)))return!0;if(!S){var n=u.call(r);return n==="[object GeneratorFunction]"}if(!l)return!1;if(typeof t>"u"){var i=e();t=i?l(i):!1}return l(r)===t}}}),GS=xe({"node_modules/is-callable/index.js"(U,O){"use strict";var u=Function.prototype.toString,v=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,w,S;if(typeof v=="function"&&typeof Object.defineProperty=="function")try{w=Object.defineProperty({},"length",{get:function(){throw S}}),S={},v(function(){throw 42},null,w)}catch(b){b!==S&&(v=null)}else v=null;var l=/^\s*class\b/,e=function(M){try{var A=u.call(M);return l.test(A)}catch{return!1}},t=function(M){try{return e(M)?!1:(u.call(M),!0)}catch{return!1}},a=Object.prototype.toString,r="[object Object]",n="[object Function]",i="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",p="[object HTMLCollection]",f=typeof Symbol=="function"&&!!Symbol.toStringTag,d=!(0 in[,]),y=function(){return!1};typeof document=="object"&&(o=document.all,a.call(o)===a.call(document.all)&&(y=function(M){if((d||!M)&&(typeof M>"u"||typeof M=="object"))try{var A=a.call(M);return(A===s||A===c||A===p||A===r)&&M("")==null}catch{}return!1}));var o;O.exports=v?function(M){if(y(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;try{v(M,null,w)}catch(A){if(A!==S)return!1}return!e(M)&&t(M)}:function(M){if(y(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;if(f)return t(M);if(e(M))return!1;var A=a.call(M);return A!==n&&A!==i&&!/^\[object HTML/.test(A)?!1:t(M)}}}),nx=xe({"node_modules/for-each/index.js"(U,O){"use strict";var u=GS(),v=Object.prototype.toString,w=Object.prototype.hasOwnProperty,S=function(r,n,i){for(var s=0,c=r.length;s=3&&(s=i),v.call(r)==="[object Array]"?S(r,n,s):typeof r=="string"?l(r,n,s):e(r,n,s)};O.exports=t}}),ix=xe({"node_modules/available-typed-arrays/index.js"(U,O){"use strict";var u=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],v=typeof globalThis>"u"?window:globalThis;O.exports=function(){for(var S=[],l=0;l"u"?window:globalThis,r=v(),n=S("String.prototype.slice"),i=Object.getPrototypeOf,s=S("Array.prototype.indexOf",!0)||function(y,o){for(var b=0;b-1?o:o!=="Object"?!1:f(y)}return l?p(y):null}}}),YS=xe({"node_modules/is-typed-array/index.js"(U,O){"use strict";var u=nx(),v=ix(),w=wp(),S=w("Object.prototype.toString"),l=M0()(),e=Sv(),t=typeof globalThis>"u"?window:globalThis,a=v(),r=w("Array.prototype.indexOf",!0)||function(f,d){for(var y=0;y-1}return e?c(f):!1}}}),ox=xe({"node_modules/util/support/types.js"(U){"use strict";var O=VS(),u=HS(),v=WS(),w=YS();function S(ge){return ge.call.bind(ge)}var l=typeof BigInt<"u",e=typeof Symbol<"u",t=S(Object.prototype.toString),a=S(Number.prototype.valueOf),r=S(String.prototype.valueOf),n=S(Boolean.prototype.valueOf);l&&(i=S(BigInt.prototype.valueOf));var i;e&&(s=S(Symbol.prototype.valueOf));var s;function c(ge,Te){if(typeof ge!="object")return!1;try{return Te(ge),!0}catch{return!1}}U.isArgumentsObject=O,U.isGeneratorFunction=u,U.isTypedArray=w;function p(ge){return typeof Promise<"u"&&ge instanceof Promise||ge!==null&&typeof ge=="object"&&typeof ge.then=="function"&&typeof ge.catch=="function"}U.isPromise=p;function f(ge){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ge):w(ge)||q(ge)}U.isArrayBufferView=f;function d(ge){return v(ge)==="Uint8Array"}U.isUint8Array=d;function y(ge){return v(ge)==="Uint8ClampedArray"}U.isUint8ClampedArray=y;function o(ge){return v(ge)==="Uint16Array"}U.isUint16Array=o;function b(ge){return v(ge)==="Uint32Array"}U.isUint32Array=b;function M(ge){return v(ge)==="Int8Array"}U.isInt8Array=M;function A(ge){return v(ge)==="Int16Array"}U.isInt16Array=A;function E(ge){return v(ge)==="Int32Array"}U.isInt32Array=E;function g(ge){return v(ge)==="Float32Array"}U.isFloat32Array=g;function T(ge){return v(ge)==="Float64Array"}U.isFloat64Array=T;function m(ge){return v(ge)==="BigInt64Array"}U.isBigInt64Array=m;function h(ge){return v(ge)==="BigUint64Array"}U.isBigUint64Array=h;function x(ge){return t(ge)==="[object Map]"}x.working=typeof Map<"u"&&x(new Map);function _(ge){return typeof Map>"u"?!1:x.working?x(ge):ge instanceof Map}U.isMap=_;function D(ge){return t(ge)==="[object Set]"}D.working=typeof Set<"u"&&D(new Set);function C(ge){return typeof Set>"u"?!1:D.working?D(ge):ge instanceof Set}U.isSet=C;function F(ge){return t(ge)==="[object WeakMap]"}F.working=typeof WeakMap<"u"&&F(new WeakMap);function I(ge){return typeof WeakMap>"u"?!1:F.working?F(ge):ge instanceof WeakMap}U.isWeakMap=I;function z(ge){return t(ge)==="[object WeakSet]"}z.working=typeof WeakSet<"u"&&z(new WeakSet);function R(ge){return z(ge)}U.isWeakSet=R;function k(ge){return t(ge)==="[object ArrayBuffer]"}k.working=typeof ArrayBuffer<"u"&&k(new ArrayBuffer);function B(ge){return typeof ArrayBuffer>"u"?!1:k.working?k(ge):ge instanceof ArrayBuffer}U.isArrayBuffer=B;function N(ge){return t(ge)==="[object DataView]"}N.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&N(new DataView(new ArrayBuffer(1),0,1));function q(ge){return typeof DataView>"u"?!1:N.working?N(ge):ge instanceof DataView}U.isDataView=q;var Y=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ee(ge){return t(ge)==="[object SharedArrayBuffer]"}function te(ge){return typeof Y>"u"?!1:(typeof ee.working>"u"&&(ee.working=ee(new Y)),ee.working?ee(ge):ge instanceof Y)}U.isSharedArrayBuffer=te;function ae(ge){return t(ge)==="[object AsyncFunction]"}U.isAsyncFunction=ae;function j(ge){return t(ge)==="[object Map Iterator]"}U.isMapIterator=j;function G(ge){return t(ge)==="[object Set Iterator]"}U.isSetIterator=G;function K(ge){return t(ge)==="[object Generator]"}U.isGeneratorObject=K;function H(ge){return t(ge)==="[object WebAssembly.Module]"}U.isWebAssemblyCompiledModule=H;function Z(ge){return c(ge,a)}U.isNumberObject=Z;function X(ge){return c(ge,r)}U.isStringObject=X;function $(ge){return c(ge,n)}U.isBooleanObject=$;function Q(ge){return l&&c(ge,i)}U.isBigIntObject=Q;function re(ge){return e&&c(ge,s)}U.isSymbolObject=re;function ue(ge){return Z(ge)||X(ge)||$(ge)||Q(ge)||re(ge)}U.isBoxedPrimitive=ue;function pe(ge){return typeof Uint8Array<"u"&&(B(ge)||te(ge))}U.isAnyArrayBuffer=pe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ge){Object.defineProperty(U,ge,{enumerable:!1,value:function(){throw new Error(ge+" is not supported in userland")}})})}}),sx=xe({"node_modules/util/support/isBufferBrowser.js"(U,O){O.exports=function(v){return v&&typeof v=="object"&&typeof v.copy=="function"&&typeof v.fill=="function"&&typeof v.readUInt8=="function"}}}),lx=xe({"(disabled):node_modules/util/util.js"(U){var O=Object.getOwnPropertyDescriptors||function(q){for(var Y=Object.keys(q),ee={},te=0;te=te)return G;switch(G){case"%s":return String(ee[Y++]);case"%d":return Number(ee[Y++]);case"%j":try{return JSON.stringify(ee[Y++])}catch{return"[Circular]"}default:return G}}),j=ee[Y];Y"u")return function(){return U.deprecate(N,q).apply(this,arguments)};var Y=!1;function ee(){if(!Y){if(process.throwDeprecation)throw new Error(q);process.traceDeprecation?console.trace(q):console.error(q),Y=!0}return N.apply(this,arguments)}return ee};var v={},w=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),w=new RegExp("^"+S+"$","i");var S;U.debuglog=function(N){if(N=N.toUpperCase(),!v[N])if(w.test(N)){var q=process.pid;v[N]=function(){var Y=U.format.apply(U,arguments);console.error("%s %d: %s",N,q,Y)}}else v[N]=function(){};return v[N]};function l(N,q){var Y={seen:[],stylize:t};return arguments.length>=3&&(Y.depth=arguments[2]),arguments.length>=4&&(Y.colors=arguments[3]),d(q)?Y.showHidden=q:q&&U._extend(Y,q),E(Y.showHidden)&&(Y.showHidden=!1),E(Y.depth)&&(Y.depth=2),E(Y.colors)&&(Y.colors=!1),E(Y.customInspect)&&(Y.customInspect=!0),Y.colors&&(Y.stylize=e),r(Y,N,Y.depth)}U.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(N,q){var Y=l.styles[q];return Y?"\x1B["+l.colors[Y][0]+"m"+N+"\x1B["+l.colors[Y][1]+"m":N}function t(N,q){return N}function a(N){var q={};return N.forEach(function(Y,ee){q[Y]=!0}),q}function r(N,q,Y){if(N.customInspect&&q&&x(q.inspect)&&q.inspect!==U.inspect&&!(q.constructor&&q.constructor.prototype===q)){var ee=q.inspect(Y,N);return M(ee)||(ee=r(N,ee,Y)),ee}var te=n(N,q);if(te)return te;var ae=Object.keys(q),j=a(ae);if(N.showHidden&&(ae=Object.getOwnPropertyNames(q)),h(q)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0))return i(q);if(ae.length===0){if(x(q)){var G=q.name?": "+q.name:"";return N.stylize("[Function"+G+"]","special")}if(g(q))return N.stylize(RegExp.prototype.toString.call(q),"regexp");if(m(q))return N.stylize(Date.prototype.toString.call(q),"date");if(h(q))return i(q)}var K="",H=!1,Z=["{","}"];if(f(q)&&(H=!0,Z=["[","]"]),x(q)){var X=q.name?": "+q.name:"";K=" [Function"+X+"]"}if(g(q)&&(K=" "+RegExp.prototype.toString.call(q)),m(q)&&(K=" "+Date.prototype.toUTCString.call(q)),h(q)&&(K=" "+i(q)),ae.length===0&&(!H||q.length==0))return Z[0]+K+Z[1];if(Y<0)return g(q)?N.stylize(RegExp.prototype.toString.call(q),"regexp"):N.stylize("[Object]","special");N.seen.push(q);var $;return H?$=s(N,q,Y,j,ae):$=ae.map(function(Q){return c(N,q,Y,j,Q,H)}),N.seen.pop(),p($,K,Z)}function n(N,q){if(E(q))return N.stylize("undefined","undefined");if(M(q)){var Y="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return N.stylize(Y,"string")}if(b(q))return N.stylize(""+q,"number");if(d(q))return N.stylize(""+q,"boolean");if(y(q))return N.stylize("null","null")}function i(N){return"["+Error.prototype.toString.call(N)+"]"}function s(N,q,Y,ee,te){for(var ae=[],j=0,G=q.length;j-1&&(ae?G=G.split(` -`).map(function(H){return" "+H}).join(` -`).slice(2):G=` -`+G.split(` -`).map(function(H){return" "+H}).join(` -`))):G=N.stylize("[Circular]","special")),E(j)){if(ae&&te.match(/^\d+$/))return G;j=JSON.stringify(""+te),j.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(j=j.slice(1,-1),j=N.stylize(j,"name")):(j=j.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),j=N.stylize(j,"string"))}return j+": "+G}function p(N,q,Y){var ee=0,te=N.reduce(function(ae,j){return ee++,j.indexOf(` -`)>=0&&ee++,ae+j.replace(/\u001b\[\d\d?m/g,"").length+1},0);return te>60?Y[0]+(q===""?"":q+` - `)+" "+N.join(`, - `)+" "+Y[1]:Y[0]+q+" "+N.join(", ")+" "+Y[1]}U.types=ox();function f(N){return Array.isArray(N)}U.isArray=f;function d(N){return typeof N=="boolean"}U.isBoolean=d;function y(N){return N===null}U.isNull=y;function o(N){return N==null}U.isNullOrUndefined=o;function b(N){return typeof N=="number"}U.isNumber=b;function M(N){return typeof N=="string"}U.isString=M;function A(N){return typeof N=="symbol"}U.isSymbol=A;function E(N){return N===void 0}U.isUndefined=E;function g(N){return T(N)&&D(N)==="[object RegExp]"}U.isRegExp=g,U.types.isRegExp=g;function T(N){return typeof N=="object"&&N!==null}U.isObject=T;function m(N){return T(N)&&D(N)==="[object Date]"}U.isDate=m,U.types.isDate=m;function h(N){return T(N)&&(D(N)==="[object Error]"||N instanceof Error)}U.isError=h,U.types.isNativeError=h;function x(N){return typeof N=="function"}U.isFunction=x;function _(N){return N===null||typeof N=="boolean"||typeof N=="number"||typeof N=="string"||typeof N=="symbol"||typeof N>"u"}U.isPrimitive=_,U.isBuffer=sx();function D(N){return Object.prototype.toString.call(N)}function C(N){return N<10?"0"+N.toString(10):N.toString(10)}var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var N=new Date,q=[C(N.getHours()),C(N.getMinutes()),C(N.getSeconds())].join(":");return[N.getDate(),F[N.getMonth()],q].join(" ")}U.log=function(){console.log("%s - %s",I(),U.format.apply(U,arguments))},U.inherits=dd(),U._extend=function(N,q){if(!q||!T(q))return N;for(var Y=Object.keys(q),ee=Y.length;ee--;)N[Y[ee]]=q[Y[ee]];return N};function z(N,q){return Object.prototype.hasOwnProperty.call(N,q)}var R=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;U.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(R&&q[R]){var Y=q[R];if(typeof Y!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Y,R,{value:Y,enumerable:!1,writable:!1,configurable:!0}),Y}function Y(){for(var ee,te,ae=new Promise(function(K,H){ee=K,te=H}),j=[],G=0;G0?this.tail.next=d:this.head=d,this.tail=d,++this.length}},{key:"unshift",value:function(f){var d={data:f,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length}},{key:"shift",value:function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(f){if(this.length===0)return"";for(var d=this.head,y=""+d.data;d=d.next;)y+=f+d.data;return y}},{key:"concat",value:function(f){if(this.length===0)return a.alloc(0);for(var d=a.allocUnsafe(f>>>0),y=this.head,o=0;y;)s(y.data,d,o),o+=y.data.length,y=y.next;return d}},{key:"consume",value:function(f,d){var y;return fb.length?b.length:f;if(M===b.length?o+=b:o+=b.slice(0,f),f-=M,f===0){M===b.length?(++y,d.next?this.head=d.next:this.head=this.tail=null):(this.head=d,d.data=b.slice(M));break}++y}return this.length-=y,o}},{key:"_getBuffer",value:function(f){var d=a.allocUnsafe(f),y=this.head,o=1;for(y.data.copy(d),f-=y.data.length;y=y.next;){var b=y.data,M=f>b.length?b.length:f;if(b.copy(d,d.length-f,0,M),f-=M,f===0){M===b.length?(++o,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=b.slice(M));break}++o}return this.length-=o,d}},{key:i,value:function(f,d){return n(this,v({},d,{depth:0,customInspect:!1}))}}]),c}()}}),ux=xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js"(U,O){"use strict";function u(t,a){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(a?a(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,t)):process.nextTick(l,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!a&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(w,r):(r._writableState.errorEmitted=!0,process.nextTick(v,r,s)):process.nextTick(v,r,s):a?(process.nextTick(w,r),a(s)):process.nextTick(w,r)}),this)}function v(t,a){l(t,a),w(t)}function w(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(t,a){t.emit("error",a)}function e(t,a){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(a):t.emit("error",a)}O.exports={destroy:u,undestroy:S,errorOrDestroy:e}}}),Ev=xe({"node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js"(U,O){"use strict";function u(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,a.__proto__=r}var v={};function w(a,r,n){n||(n=Error);function i(c,p,f){return typeof r=="string"?r:r(c,p,f)}var s=function(c){u(p,c);function p(f,d,y){return c.call(this,i(f,d,y))||this}return p}(n);s.prototype.name=n.name,s.prototype.code=a,v[a]=s}function S(a,r){if(Array.isArray(a)){var n=a.length;return a=a.map(function(i){return String(i)}),n>2?"one of ".concat(r," ").concat(a.slice(0,n-1).join(", "),", or ")+a[n-1]:n===2?"one of ".concat(r," ").concat(a[0]," or ").concat(a[1]):"of ".concat(r," ").concat(a[0])}else return"of ".concat(r," ").concat(String(a))}function l(a,r,n){return a.substr(!n||n<0?0:+n,r.length)===r}function e(a,r,n){return(n===void 0||n>a.length)&&(n=a.length),a.substring(n-r.length,n)===r}function t(a,r,n){return typeof n!="number"&&(n=0),n+r.length>a.length?!1:a.indexOf(r,n)!==-1}w("ERR_INVALID_OPT_VALUE",function(a,r){return'The value "'+r+'" is invalid for option "'+a+'"'},TypeError),w("ERR_INVALID_ARG_TYPE",function(a,r,n){var i;typeof r=="string"&&l(r,"not ")?(i="must not be",r=r.replace(/^not /,"")):i="must be";var s;if(e(a," argument"))s="The ".concat(a," ").concat(i," ").concat(S(r,"type"));else{var c=t(a,".")?"property":"argument";s='The "'.concat(a,'" ').concat(c," ").concat(i," ").concat(S(r,"type"))}return s+=". Received type ".concat(typeof n),s},TypeError),w("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),w("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),w("ERR_STREAM_PREMATURE_CLOSE","Premature close"),w("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),w("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),w("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),w("ERR_STREAM_WRITE_AFTER_END","write after end"),w("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),w("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),w("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),O.exports.codes=v}}),cx=xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(U,O){"use strict";var u=Ev().codes.ERR_INVALID_OPT_VALUE;function v(S,l,e){return S.highWaterMark!=null?S.highWaterMark:l?S[e]:null}function w(S,l,e,t){var a=v(l,t,e);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var r=t?e:"highWaterMark";throw new u(r,a)}return Math.floor(a)}return S.objectMode?16:16*1024}O.exports={getHighWaterMark:w}}}),$S=xe({"node_modules/util-deprecate/browser.js"(U,O){O.exports=u;function u(w,S){if(v("noDeprecation"))return w;var l=!1;function e(){if(!l){if(v("throwDeprecation"))throw new Error(S);v("traceDeprecation")?console.trace(S):console.warn(S),l=!0}return w.apply(this,arguments)}return e}function v(w){try{if(!window.localStorage)return!1}catch{return!1}var S=window.localStorage[w];return S==null?!1:String(S).toLowerCase()==="true"}}}),fx=xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(U,O){"use strict";O.exports=m;function u(j){var G=this;this.next=null,this.entry=null,this.finish=function(){ae(G,j)}}var v;m.WritableState=g;var w={deprecate:$S()},S=Kb(),l=Mv().Buffer,e=window.Uint8Array||function(){};function t(j){return l.from(j)}function a(j){return l.isBuffer(j)||j instanceof e}var r=ux(),n=cx(),i=n.getHighWaterMark,s=Ev().codes,c=s.ERR_INVALID_ARG_TYPE,p=s.ERR_METHOD_NOT_IMPLEMENTED,f=s.ERR_MULTIPLE_CALLBACK,d=s.ERR_STREAM_CANNOT_PIPE,y=s.ERR_STREAM_DESTROYED,o=s.ERR_STREAM_NULL_VALUES,b=s.ERR_STREAM_WRITE_AFTER_END,M=s.ERR_UNKNOWN_ENCODING,A=r.errorOrDestroy;dd()(m,S);function E(){}function g(j,G,K){v=v||kv(),j=j||{},typeof K!="boolean"&&(K=G instanceof v),this.objectMode=!!j.objectMode,K&&(this.objectMode=this.objectMode||!!j.writableObjectMode),this.highWaterMark=i(this,j,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var H=j.decodeStrings===!1;this.decodeStrings=!H,this.defaultEncoding=j.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Z){z(G,Z)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=j.emitClose!==!1,this.autoDestroy=!!j.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new u(this)}g.prototype.getBuffer=function(){for(var G=this.bufferedRequest,K=[];G;)K.push(G),G=G.next;return K},function(){try{Object.defineProperty(g.prototype,"buffer",{get:w.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(G){return T.call(this,G)?!0:this!==m?!1:G&&G._writableState instanceof g}})):T=function(G){return G instanceof this};function m(j){v=v||kv();var G=this instanceof v;if(!G&&!T.call(m,this))return new m(j);this._writableState=new g(j,this,G),this.writable=!0,j&&(typeof j.write=="function"&&(this._write=j.write),typeof j.writev=="function"&&(this._writev=j.writev),typeof j.destroy=="function"&&(this._destroy=j.destroy),typeof j.final=="function"&&(this._final=j.final)),S.call(this)}m.prototype.pipe=function(){A(this,new d)};function h(j,G){var K=new b;A(j,K),process.nextTick(G,K)}function x(j,G,K,H){var Z;return K===null?Z=new o:typeof K!="string"&&!G.objectMode&&(Z=new c("chunk",["string","Buffer"],K)),Z?(A(j,Z),process.nextTick(H,Z),!1):!0}m.prototype.write=function(j,G,K){var H=this._writableState,Z=!1,X=!H.objectMode&&a(j);return X&&!l.isBuffer(j)&&(j=t(j)),typeof G=="function"&&(K=G,G=null),X?G="buffer":G||(G=H.defaultEncoding),typeof K!="function"&&(K=E),H.ending?h(this,K):(X||x(this,H,j,K))&&(H.pendingcb++,Z=D(this,H,X,j,G,K)),Z},m.prototype.cork=function(){this._writableState.corked++},m.prototype.uncork=function(){var j=this._writableState;j.corked&&(j.corked--,!j.writing&&!j.corked&&!j.bufferProcessing&&j.bufferedRequest&&B(this,j))},m.prototype.setDefaultEncoding=function(G){if(typeof G=="string"&&(G=G.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((G+"").toLowerCase())>-1))throw new M(G);return this._writableState.defaultEncoding=G,this},Object.defineProperty(m.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function _(j,G,K){return!j.objectMode&&j.decodeStrings!==!1&&typeof G=="string"&&(G=l.from(G,K)),G}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function D(j,G,K,H,Z,X){if(!K){var $=_(G,H,Z);H!==$&&(K=!0,Z="buffer",H=$)}var Q=G.objectMode?1:H.length;G.length+=Q;var re=G.length>5===6?2:y>>4===14?3:y>>3===30?4:y>>6===2?-1:-2}function e(y,o,b){var M=o.length-1;if(M=0?(A>0&&(y.lastNeed=A-1),A):--M=0?(A>0&&(y.lastNeed=A-2),A):--M=0?(A>0&&(A===2?A=0:y.lastNeed=A-3),A):0))}function t(y,o,b){if((o[0]&192)!==128)return y.lastNeed=0,"\uFFFD";if(y.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return y.lastNeed=1,"\uFFFD";if(y.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return y.lastNeed=2,"\uFFFD"}}function a(y){var o=this.lastTotal-this.lastNeed,b=t(this,y,o);if(b!==void 0)return b;if(this.lastNeed<=y.length)return y.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,o,0,y.length),this.lastNeed-=y.length}function r(y,o){var b=e(this,y,o);if(!this.lastNeed)return y.toString("utf8",o);this.lastTotal=b;var M=y.length-(b-this.lastNeed);return y.copy(this.lastChar,0,M),y.toString("utf8",o,M)}function n(y){var o=y&&y.length?this.write(y):"";return this.lastNeed?o+"\uFFFD":o}function i(y,o){if((y.length-o)%2===0){var b=y.toString("utf16le",o);if(b){var M=b.charCodeAt(b.length-1);if(M>=55296&&M<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],b.slice(0,-1)}return b}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",o,y.length-1)}function s(y){var o=y&&y.length?this.write(y):"";if(this.lastNeed){var b=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,b)}return o}function c(y,o){var b=(y.length-o)%3;return b===0?y.toString("base64",o):(this.lastNeed=3-b,this.lastTotal=3,b===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",o,y.length-b))}function p(y){var o=y&&y.length?this.write(y):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function f(y){return y.toString(this.encoding)}function d(y){return y&&y.length?this.write(y):""}}}),$g=xe({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(U,O){"use strict";var u=Ev().codes.ERR_STREAM_PREMATURE_CLOSE;function v(e){var t=!1;return function(){if(!t){t=!0;for(var a=arguments.length,r=new Array(a),n=0;n0)if(typeof Q!="string"&&!ge.objectMode&&Object.getPrototypeOf(Q)!==l.prototype&&(Q=t(Q)),ue)ge.endEmitted?g($,new b):D($,ge,Q,!0);else if(ge.ended)g($,new y);else{if(ge.destroyed)return!1;ge.reading=!1,ge.decoder&&!re?(Q=ge.decoder.write(Q),ge.objectMode||Q.length!==0?D($,ge,Q,!1):N($,ge)):D($,ge,Q,!1)}else ue||(ge.reading=!1,N($,ge))}return!ge.ended&&(ge.length=F?$=F:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function z($,Q){return $<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:$!==$?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:($>Q.highWaterMark&&(Q.highWaterMark=I($)),$<=Q.length?$:Q.ended?Q.length:(Q.needReadable=!0,0))}x.prototype.read=function($){n("read",$),$=parseInt($,10);var Q=this._readableState,re=$;if($!==0&&(Q.emittedReadable=!1),$===0&&Q.needReadable&&((Q.highWaterMark!==0?Q.length>=Q.highWaterMark:Q.length>0)||Q.ended))return n("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?H(this):k(this),null;if($=z($,Q),$===0&&Q.ended)return Q.length===0&&H(this),null;var ue=Q.needReadable;n("need readable",ue),(Q.length===0||Q.length-$0?pe=K($,Q):pe=null,pe===null?(Q.needReadable=Q.length<=Q.highWaterMark,$=0):(Q.length-=$,Q.awaitDrain=0),Q.length===0&&(Q.ended||(Q.needReadable=!0),re!==$&&Q.ended&&H(this)),pe!==null&&this.emit("data",pe),pe};function R($,Q){if(n("onEofChunk"),!Q.ended){if(Q.decoder){var re=Q.decoder.end();re&&re.length&&(Q.buffer.push(re),Q.length+=Q.objectMode?1:re.length)}Q.ended=!0,Q.sync?k($):(Q.needReadable=!1,Q.emittedReadable||(Q.emittedReadable=!0,B($)))}}function k($){var Q=$._readableState;n("emitReadable",Q.needReadable,Q.emittedReadable),Q.needReadable=!1,Q.emittedReadable||(n("emitReadable",Q.flowing),Q.emittedReadable=!0,process.nextTick(B,$))}function B($){var Q=$._readableState;n("emitReadable_",Q.destroyed,Q.length,Q.ended),!Q.destroyed&&(Q.length||Q.ended)&&($.emit("readable"),Q.emittedReadable=!1),Q.needReadable=!Q.flowing&&!Q.ended&&Q.length<=Q.highWaterMark,G($)}function N($,Q){Q.readingMore||(Q.readingMore=!0,process.nextTick(q,$,Q))}function q($,Q){for(;!Q.reading&&!Q.ended&&(Q.length1&&X(ue.pipes,$)!==-1)&&!Ue&&(n("false write response, pause",ue.awaitDrain),ue.awaitDrain++),re.pause())}function ce(be){n("onerror",be),ne(),$.removeListener("error",ce),w($,"error")===0&&g($,be)}m($,"error",ce);function ie(){$.removeListener("finish",se),ne()}$.once("close",ie);function se(){n("onfinish"),$.removeListener("close",ie),ne()}$.once("finish",se);function ne(){n("unpipe"),re.unpipe($)}return $.emit("pipe",re),ue.flowing||(n("pipe resume"),re.resume()),$};function Y($){return function(){var re=$._readableState;n("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&w($,"data")&&(re.flowing=!0,G($))}}x.prototype.unpipe=function($){var Q=this._readableState,re={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return $&&$!==Q.pipes?this:($||($=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,$&&$.emit("unpipe",this,re),this);if(!$){var ue=Q.pipes,pe=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var ge=0;ge0,ue.flowing!==!1&&this.resume()):$==="readable"&&!ue.endEmitted&&!ue.readableListening&&(ue.readableListening=ue.needReadable=!0,ue.flowing=!1,ue.emittedReadable=!1,n("on readable",ue.length,ue.reading),ue.length?k(this):ue.reading||process.nextTick(te,this)),re},x.prototype.addListener=x.prototype.on,x.prototype.removeListener=function($,Q){var re=S.prototype.removeListener.call(this,$,Q);return $==="readable"&&process.nextTick(ee,this),re},x.prototype.removeAllListeners=function($){var Q=S.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&process.nextTick(ee,this),Q};function ee($){var Q=$._readableState;Q.readableListening=$.listenerCount("readable")>0,Q.resumeScheduled&&!Q.paused?Q.flowing=!0:$.listenerCount("data")>0&&$.resume()}function te($){n("readable nexttick read 0"),$.read(0)}x.prototype.resume=function(){var $=this._readableState;return $.flowing||(n("resume"),$.flowing=!$.readableListening,ae(this,$)),$.paused=!1,this};function ae($,Q){Q.resumeScheduled||(Q.resumeScheduled=!0,process.nextTick(j,$,Q))}function j($,Q){n("resume",Q.reading),Q.reading||$.read(0),Q.resumeScheduled=!1,$.emit("resume"),G($),Q.flowing&&!Q.reading&&$.read(0)}x.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function G($){var Q=$._readableState;for(n("flow",Q.flowing);Q.flowing&&$.read()!==null;);}x.prototype.wrap=function($){var Q=this,re=this._readableState,ue=!1;$.on("end",function(){if(n("wrapped end"),re.decoder&&!re.ended){var Te=re.decoder.end();Te&&Te.length&&Q.push(Te)}Q.push(null)}),$.on("data",function(Te){if(n("wrapped data"),re.decoder&&(Te=re.decoder.write(Te)),!(re.objectMode&&Te==null)&&!(!re.objectMode&&(!Te||!Te.length))){var Se=Q.push(Te);Se||(ue=!0,$.pause())}});for(var pe in $)this[pe]===void 0&&typeof $[pe]=="function"&&(this[pe]=function(Se){return function(){return $[Se].apply($,arguments)}}(pe));for(var ge=0;ge=Q.length?(Q.decoder?re=Q.buffer.join(""):Q.buffer.length===1?re=Q.buffer.first():re=Q.buffer.concat(Q.length),Q.buffer.clear()):re=Q.buffer.consume($,Q.decoder),re}function H($){var Q=$._readableState;n("endReadable",Q.endEmitted),Q.endEmitted||(Q.ended=!0,process.nextTick(Z,Q,$))}function Z($,Q){if(n("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,Q.readable=!1,Q.emit("end"),$.autoDestroy)){var re=Q._writableState;(!re||re.autoDestroy&&re.finished)&&Q.destroy()}}typeof Symbol=="function"&&(x.from=function($,Q){return E===void 0&&(E=JS()),E(x,$,Q)});function X($,Q){for(var re=0,ue=$.length;re0;return a(b,A,E,function(g){y||(y=g),g&&o.forEach(r),!A&&(o.forEach(r),d(y))})});return p.reduce(n)}O.exports=s}}),tE=xe({"node_modules/stream-browserify/index.js"(U,O){O.exports=w;var u=pv().EventEmitter,v=dd();v(w,u),w.Readable=dx(),w.Writable=fx(),w.Duplex=kv(),w.Transform=vx(),w.PassThrough=QS(),w.finished=$g(),w.pipeline=eE(),w.Stream=w;function w(){u.call(this)}w.prototype.pipe=function(S,l){var e=this;function t(p){S.writable&&S.write(p)===!1&&e.pause&&e.pause()}e.on("data",t);function a(){e.readable&&e.resume&&e.resume()}S.on("drain",a),!S._isStdio&&(!l||l.end!==!1)&&(e.on("end",n),e.on("close",i));var r=!1;function n(){r||(r=!0,S.end())}function i(){r||(r=!0,typeof S.destroy=="function"&&S.destroy())}function s(p){if(c(),u.listenerCount(this,"error")===0)throw p}e.on("error",s),S.on("error",s);function c(){e.removeListener("data",t),S.removeListener("drain",a),e.removeListener("end",n),e.removeListener("close",i),e.removeListener("error",s),S.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),S.removeListener("close",c)}return e.on("end",c),e.on("close",c),S.on("close",c),S.emit("pipe",e),S}}}),Tp=xe({"node_modules/util/util.js"(U){var O=Object.getOwnPropertyDescriptors||function(q){for(var Y=Object.keys(q),ee={},te=0;te=te)return G;switch(G){case"%s":return String(ee[Y++]);case"%d":return Number(ee[Y++]);case"%j":try{return JSON.stringify(ee[Y++])}catch{return"[Circular]"}default:return G}}),j=ee[Y];Y"u")return function(){return U.deprecate(N,q).apply(this,arguments)};var Y=!1;function ee(){if(!Y){if(process.throwDeprecation)throw new Error(q);process.traceDeprecation?console.trace(q):console.error(q),Y=!0}return N.apply(this,arguments)}return ee};var v={},w=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),w=new RegExp("^"+S+"$","i");var S;U.debuglog=function(N){if(N=N.toUpperCase(),!v[N])if(w.test(N)){var q=process.pid;v[N]=function(){var Y=U.format.apply(U,arguments);console.error("%s %d: %s",N,q,Y)}}else v[N]=function(){};return v[N]};function l(N,q){var Y={seen:[],stylize:t};return arguments.length>=3&&(Y.depth=arguments[2]),arguments.length>=4&&(Y.colors=arguments[3]),d(q)?Y.showHidden=q:q&&U._extend(Y,q),E(Y.showHidden)&&(Y.showHidden=!1),E(Y.depth)&&(Y.depth=2),E(Y.colors)&&(Y.colors=!1),E(Y.customInspect)&&(Y.customInspect=!0),Y.colors&&(Y.stylize=e),r(Y,N,Y.depth)}U.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(N,q){var Y=l.styles[q];return Y?"\x1B["+l.colors[Y][0]+"m"+N+"\x1B["+l.colors[Y][1]+"m":N}function t(N,q){return N}function a(N){var q={};return N.forEach(function(Y,ee){q[Y]=!0}),q}function r(N,q,Y){if(N.customInspect&&q&&x(q.inspect)&&q.inspect!==U.inspect&&!(q.constructor&&q.constructor.prototype===q)){var ee=q.inspect(Y,N);return M(ee)||(ee=r(N,ee,Y)),ee}var te=n(N,q);if(te)return te;var ae=Object.keys(q),j=a(ae);if(N.showHidden&&(ae=Object.getOwnPropertyNames(q)),h(q)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0))return i(q);if(ae.length===0){if(x(q)){var G=q.name?": "+q.name:"";return N.stylize("[Function"+G+"]","special")}if(g(q))return N.stylize(RegExp.prototype.toString.call(q),"regexp");if(m(q))return N.stylize(Date.prototype.toString.call(q),"date");if(h(q))return i(q)}var K="",H=!1,Z=["{","}"];if(f(q)&&(H=!0,Z=["[","]"]),x(q)){var X=q.name?": "+q.name:"";K=" [Function"+X+"]"}if(g(q)&&(K=" "+RegExp.prototype.toString.call(q)),m(q)&&(K=" "+Date.prototype.toUTCString.call(q)),h(q)&&(K=" "+i(q)),ae.length===0&&(!H||q.length==0))return Z[0]+K+Z[1];if(Y<0)return g(q)?N.stylize(RegExp.prototype.toString.call(q),"regexp"):N.stylize("[Object]","special");N.seen.push(q);var $;return H?$=s(N,q,Y,j,ae):$=ae.map(function(Q){return c(N,q,Y,j,Q,H)}),N.seen.pop(),p($,K,Z)}function n(N,q){if(E(q))return N.stylize("undefined","undefined");if(M(q)){var Y="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return N.stylize(Y,"string")}if(b(q))return N.stylize(""+q,"number");if(d(q))return N.stylize(""+q,"boolean");if(y(q))return N.stylize("null","null")}function i(N){return"["+Error.prototype.toString.call(N)+"]"}function s(N,q,Y,ee,te){for(var ae=[],j=0,G=q.length;j-1&&(ae?G=G.split(` -`).map(function(H){return" "+H}).join(` -`).slice(2):G=` -`+G.split(` -`).map(function(H){return" "+H}).join(` -`))):G=N.stylize("[Circular]","special")),E(j)){if(ae&&te.match(/^\d+$/))return G;j=JSON.stringify(""+te),j.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(j=j.slice(1,-1),j=N.stylize(j,"name")):(j=j.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),j=N.stylize(j,"string"))}return j+": "+G}function p(N,q,Y){var ee=0,te=N.reduce(function(ae,j){return ee++,j.indexOf(` -`)>=0&&ee++,ae+j.replace(/\u001b\[\d\d?m/g,"").length+1},0);return te>60?Y[0]+(q===""?"":q+` - `)+" "+N.join(`, - `)+" "+Y[1]:Y[0]+q+" "+N.join(", ")+" "+Y[1]}U.types=ox();function f(N){return Array.isArray(N)}U.isArray=f;function d(N){return typeof N=="boolean"}U.isBoolean=d;function y(N){return N===null}U.isNull=y;function o(N){return N==null}U.isNullOrUndefined=o;function b(N){return typeof N=="number"}U.isNumber=b;function M(N){return typeof N=="string"}U.isString=M;function A(N){return typeof N=="symbol"}U.isSymbol=A;function E(N){return N===void 0}U.isUndefined=E;function g(N){return T(N)&&D(N)==="[object RegExp]"}U.isRegExp=g,U.types.isRegExp=g;function T(N){return typeof N=="object"&&N!==null}U.isObject=T;function m(N){return T(N)&&D(N)==="[object Date]"}U.isDate=m,U.types.isDate=m;function h(N){return T(N)&&(D(N)==="[object Error]"||N instanceof Error)}U.isError=h,U.types.isNativeError=h;function x(N){return typeof N=="function"}U.isFunction=x;function _(N){return N===null||typeof N=="boolean"||typeof N=="number"||typeof N=="string"||typeof N=="symbol"||typeof N>"u"}U.isPrimitive=_,U.isBuffer=sx();function D(N){return Object.prototype.toString.call(N)}function C(N){return N<10?"0"+N.toString(10):N.toString(10)}var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function I(){var N=new Date,q=[C(N.getHours()),C(N.getMinutes()),C(N.getSeconds())].join(":");return[N.getDate(),F[N.getMonth()],q].join(" ")}U.log=function(){console.log("%s - %s",I(),U.format.apply(U,arguments))},U.inherits=dd(),U._extend=function(N,q){if(!q||!T(q))return N;for(var Y=Object.keys(q),ee=Y.length;ee--;)N[Y[ee]]=q[Y[ee]];return N};function z(N,q){return Object.prototype.hasOwnProperty.call(N,q)}var R=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;U.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(R&&q[R]){var Y=q[R];if(typeof Y!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Y,R,{value:Y,enumerable:!1,writable:!1,configurable:!0}),Y}function Y(){for(var ee,te,ae=new Promise(function(K,H){ee=K,te=H}),j=[],G=0;G"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(E){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},c(E)}var p={},f,d;function y(E,g,T){T||(T=Error);function m(x,_,D){return typeof g=="string"?g:g(x,_,D)}var h=function(x){t(D,x);var _=r(D);function D(C,F,I){var z;return e(this,D),z=_.call(this,m(C,F,I)),z.code=E,z}return w(D)}(T);p[E]=h}function o(E,g){if(Array.isArray(E)){var T=E.length;return E=E.map(function(m){return String(m)}),T>2?"one of ".concat(g," ").concat(E.slice(0,T-1).join(", "),", or ")+E[T-1]:T===2?"one of ".concat(g," ").concat(E[0]," or ").concat(E[1]):"of ".concat(g," ").concat(E[0])}else return"of ".concat(g," ").concat(String(E))}function b(E,g,T){return E.substr(!T||T<0?0:+T,g.length)===g}function M(E,g,T){return(T===void 0||T>E.length)&&(T=E.length),E.substring(T-g.length,T)===g}function A(E,g,T){return typeof T!="number"&&(T=0),T+g.length>E.length?!1:E.indexOf(g,T)!==-1}y("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),y("ERR_INVALID_ARG_TYPE",function(E,g,T){f===void 0&&(f=C0()),f(typeof E=="string","'name' must be a string");var m;typeof g=="string"&&b(g,"not ")?(m="must not be",g=g.replace(/^not /,"")):m="must be";var h;if(M(E," argument"))h="The ".concat(E," ").concat(m," ").concat(o(g,"type"));else{var x=A(E,".")?"property":"argument";h='The "'.concat(E,'" ').concat(x," ").concat(m," ").concat(o(g,"type"))}return h+=". Received type ".concat(u(T)),h},TypeError),y("ERR_INVALID_ARG_VALUE",function(E,g){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";d===void 0&&(d=Tp());var m=d.inspect(g);return m.length>128&&(m="".concat(m.slice(0,128),"...")),"The argument '".concat(E,"' ").concat(T,". Received ").concat(m)},TypeError,RangeError),y("ERR_INVALID_RETURN_VALUE",function(E,g,T){var m;return T&&T.constructor&&T.constructor.name?m="instance of ".concat(T.constructor.name):m="type ".concat(u(T)),"Expected ".concat(E,' to be returned from the "').concat(g,'"')+" function but got ".concat(m,".")},TypeError),y("ERR_MISSING_ARGS",function(){for(var E=arguments.length,g=new Array(E),T=0;T0,"At least one arg needs to be specified");var m="The ",h=g.length;switch(g=g.map(function(x){return'"'.concat(x,'"')}),h){case 1:m+="".concat(g[0]," argument");break;case 2:m+="".concat(g[0]," and ").concat(g[1]," arguments");break;default:m+=g.slice(0,h-1).join(", "),m+=", and ".concat(g[h-1]," arguments");break}return"".concat(m," must be specified")},TypeError),O.exports.codes=p}}),rE=xe({"node_modules/assert/build/internal/assert/assertion_error.js"(U,O){"use strict";function u(B,N){var q=Object.keys(B);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(B);N&&(Y=Y.filter(function(ee){return Object.getOwnPropertyDescriptor(B,ee).enumerable})),q.push.apply(q,Y)}return q}function v(B){for(var N=1;N"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function d(B){return Function.toString.call(B).indexOf("[native code]")!==-1}function y(B,N){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Y,ee){return Y.__proto__=ee,Y},y(B,N)}function o(B){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(q){return q.__proto__||Object.getPrototypeOf(q)},o(B)}function b(B){"@babel/helpers - typeof";return b=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(N){return typeof N}:function(N){return N&&typeof Symbol=="function"&&N.constructor===Symbol&&N!==Symbol.prototype?"symbol":typeof N},b(B)}var M=Tp(),A=M.inspect,E=px(),g=E.codes.ERR_INVALID_ARG_TYPE;function T(B,N,q){return(q===void 0||q>B.length)&&(q=B.length),B.substring(q-N.length,q)===N}function m(B,N){if(N=Math.floor(N),B.length==0||N==0)return"";var q=B.length*N;for(N=Math.floor(Math.log(N)/Math.log(2));N;)B+=B,N--;return B+=B.substring(0,q-B.length),B}var h="",x="",_="",D="",C={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},F=10;function I(B){var N=Object.keys(B),q=Object.create(Object.getPrototypeOf(B));return N.forEach(function(Y){q[Y]=B[Y]}),Object.defineProperty(q,"message",{value:B.message}),q}function z(B){return A(B,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function R(B,N,q){var Y="",ee="",te=0,ae="",j=!1,G=z(B),K=G.split(` -`),H=z(N).split(` -`),Z=0,X="";if(q==="strictEqual"&&b(B)==="object"&&b(N)==="object"&&B!==null&&N!==null&&(q="strictEqualObject"),K.length===1&&H.length===1&&K[0]!==H[0]){var $=K[0].length+H[0].length;if($<=F){if((b(B)!=="object"||B===null)&&(b(N)!=="object"||N===null)&&(B!==0||N!==0))return"".concat(C[q],` - -`)+"".concat(K[0]," !== ").concat(H[0],` -`)}else if(q!=="strictEqualObject"){var Q=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if($2&&(X=` - `.concat(m(" ",Z),"^"),Z=0)}}}for(var re=K[K.length-1],ue=H[H.length-1];re===ue&&(Z++<2?ae=` - `.concat(re).concat(ae):Y=re,K.pop(),H.pop(),!(K.length===0||H.length===0));)re=K[K.length-1],ue=H[H.length-1];var pe=Math.max(K.length,H.length);if(pe===0){var ge=G.split(` -`);if(ge.length>30)for(ge[26]="".concat(h,"...").concat(D);ge.length>27;)ge.pop();return"".concat(C.notIdentical,` - -`).concat(ge.join(` +var HF=Object.create;var eA=Object.defineProperty;var GF=Object.getOwnPropertyDescriptor;var WF=Object.getOwnPropertyNames;var YF=Object.getPrototypeOf,XF=Object.prototype.hasOwnProperty;var ab=(xt,be)=>()=>(be||xt((be={exports:{}}).exports,be),be.exports);var $F=(xt,be,st,ft)=>{if(be&&typeof be=="object"||typeof be=="function")for(let Lt of WF(be))!XF.call(xt,Lt)&&Lt!==st&&eA(xt,Lt,{get:()=>be[Lt],enumerable:!(ft=GF(be,Lt))||ft.enumerable});return xt};var sd=(xt,be,st)=>(st=xt!=null?HF(YF(xt)):{},$F(be||!xt||!xt.__esModule?eA(st,"default",{value:xt,enumerable:!0}):st,xt));var yv=ab((cg,tA)=>{(function(xt,be){typeof cg=="object"&&typeof tA<"u"?be(cg):typeof define=="function"&&define.amd?define(["exports"],be):(xt=typeof globalThis<"u"?globalThis:xt||self,be(xt.lumino_algorithm={}))})(cg,function(xt){"use strict";xt.ArrayExt=void 0,function(Ta){function Hn(Ei,Hi,ia=0,Ia=-1){let Ra=Ei.length;if(Ra===0)return-1;ia<0?ia=Math.max(0,ia+Ra):ia=Math.min(ia,Ra-1),Ia<0?Ia=Math.max(0,Ia+Ra):Ia=Math.min(Ia,Ra-1);let no;Ia0;){let Qa=rs>>1,uh=po+Qa;ia(Ei[uh],Hi)<0?(po=uh+1,rs-=Qa+1):rs=Qa}return po}Ta.lowerBound=Qi;function iu(Ei,Hi,ia,Ia=0,Ra=-1){let no=Ei.length;if(no===0)return 0;Ia<0?Ia=Math.max(0,Ia+no):Ia=Math.min(Ia,no-1),Ra<0?Ra=Math.max(0,Ra+no):Ra=Math.min(Ra,no-1);let po=Ia,rs=Ra-Ia+1;for(;rs>0;){let Qa=rs>>1,uh=po+Qa;ia(Ei[uh],Hi)>0?rs=Qa:(po=uh+1,rs-=Qa+1)}return po}Ta.upperBound=iu;function Us(Ei,Hi,ia){if(Ei===Hi)return!0;if(Ei.length!==Hi.length)return!1;for(let Ia=0,Ra=Ei.length;Ia=no&&(ia=Ra<0?no-1:no),Ia===void 0?Ia=Ra<0?-1:no:Ia<0?Ia=Math.max(Ia+no,Ra<0?-1:0):Ia>=no&&(Ia=Ra<0?no-1:no);let po;Ra<0&&Ia>=ia||Ra>0&&ia>=Ia?po=0:Ra<0?po=Math.floor((Ia-ia+1)/Ra+1):po=Math.floor((Ia-ia-1)/Ra+1);let rs=[];for(let Qa=0;Qa=Ia))return;let no=Ia-ia+1;if(Hi>0?Hi=Hi%no:Hi<0&&(Hi=(Hi%no+no)%no),Hi===0)return;let po=ia+Hi;ec(Ei,ia,po-1),ec(Ei,po,Ia),ec(Ei,ia,Ia)}Ta.rotate=Ec;function Jf(Ei,Hi,ia=0,Ia=-1){let Ra=Ei.length;if(Ra===0)return;ia<0?ia=Math.max(0,ia+Ra):ia=Math.min(ia,Ra-1),Ia<0?Ia=Math.max(0,Ia+Ra):Ia=Math.min(Ia,Ra-1);let no;IaHi;--Ra)Ei[Ra]=Ei[Ra-1];Ei[Hi]=ia}Ta.insert=Ag;function lh(Ei,Hi){let ia=Ei.length;if(Hi<0&&(Hi+=ia),Hi<0||Hi>=ia)return;let Ia=Ei[Hi];for(let Ra=Hi+1;Ra=ia&&po<=Ia&&Ei[po]===Hi||Ia=ia)&&Ei[po]===Hi?no++:no>0&&(Ei[po-no]=Ei[po]);return no>0&&(Ei.length=Ra-no),no}Ta.removeAllOf=Vd;function vo(Ei,Hi,ia=0,Ia=-1){let Ra,no=ji(Ei,Hi,ia,Ia);return no!==-1&&(Ra=lh(Ei,no)),{index:no,value:Ra}}Ta.removeFirstWhere=vo;function Xs(Ei,Hi,ia=-1,Ia=0){let Ra,no=ls(Ei,Hi,ia,Ia);return no!==-1&&(Ra=lh(Ei,no)),{index:no,value:Ra}}Ta.removeLastWhere=Xs;function Mv(Ei,Hi,ia=0,Ia=-1){let Ra=Ei.length;if(Ra===0)return 0;ia<0?ia=Math.max(0,ia+Ra):ia=Math.min(ia,Ra-1),Ia<0?Ia=Math.max(0,Ia+Ra):Ia=Math.min(Ia,Ra-1);let no=0;for(let po=0;po=ia&&po<=Ia&&Hi(Ei[po],po)||Ia=ia)&&Hi(Ei[po],po)?no++:no>0&&(Ei[po-no]=Ei[po]);return no>0&&(Ei.length=Ra-no),no}Ta.removeAllWhere=Mv}(xt.ArrayExt||(xt.ArrayExt={}));function*be(...Ta){for(let Hn of Ta)yield*Hn}function*st(){}function*ft(Ta,Hn=0){for(let ki of Ta)yield[Hn++,ki]}function*Lt(Ta,Hn){let ki=0;for(let ji of Ta)Hn(ji,ki++)&&(yield ji)}function Xt(Ta,Hn){let ki=0;for(let ji of Ta)if(Hn(ji,ki++))return ji}function Hr(Ta,Hn){let ki=0;for(let ji of Ta)if(Hn(ji,ki++))return ki-1;return-1}function Cr(Ta,Hn){let ki;for(let ji of Ta){if(ki===void 0){ki=ji;continue}Hn(ji,ki)<0&&(ki=ji)}return ki}function jr(Ta,Hn){let ki;for(let ji of Ta){if(ki===void 0){ki=ji;continue}Hn(ji,ki)>0&&(ki=ji)}return ki}function Jr(Ta,Hn){let ki=!0,ji,ls;for(let Ys of Ta)ki?(ji=Ys,ls=Ys,ki=!1):Hn(Ys,ji)<0?ji=Ys:Hn(Ys,ls)>0&&(ls=Ys);return ki?void 0:[ji,ls]}function zr(Ta){return Array.from(Ta)}function Gr(Ta){let Hn={};for(let[ki,ji]of Ta)Hn[ki]=ji;return Hn}function tn(Ta,Hn){let ki=0;for(let ji of Ta)if(Hn(ji,ki++)===!1)return}function Yr(Ta,Hn){let ki=0;for(let ji of Ta)if(Hn(ji,ki++)===!1)return!1;return!0}function Nr(Ta,Hn){let ki=0;for(let ji of Ta)if(Hn(ji,ki++))return!0;return!1}function*Qr(Ta,Hn){let ki=0;for(let ji of Ta)yield Hn(ji,ki++)}function*En(Ta,Hn,ki){Hn===void 0?(Hn=Ta,Ta=0,ki=1):ki===void 0&&(ki=1);let ji=In.rangeLength(Ta,Hn,ki);for(let ls=0;lsji&&ls>0||ki-1;Hn--)yield Ta[Hn]}function ra(Ta){let Hn=[],ki=new Set,ji=new Map;for(let mi of Ta)ls(mi);for(let[mi]of ji)Ys(mi);return Hn;function ls(mi){let[Qi,iu]=mi,Us=ji.get(iu);Us?Us.push(Qi):ji.set(iu,[Qi])}function Ys(mi){if(ki.has(mi))return;ki.add(mi);let Qi=ji.get(mi);if(Qi)for(let iu of Qi)Ys(iu);Hn.push(mi)}}function*ri(Ta,Hn){let ki=0;for(let ji of Ta)ki++%Hn===0&&(yield ji)}xt.StringExt=void 0,function(Ta){function Hn(mi,Qi,iu=0){let Us=new Array(Qi.length);for(let vs=0,dl=iu,ec=Qi.length;vsQi?1:0}Ta.cmp=Ys}(xt.StringExt||(xt.StringExt={}));function*ni(Ta,Hn){if(Hn<1)return;let ki=Ta[Symbol.iterator](),ji;for(;0ji[Symbol.iterator]()),ki=Hn.map(ji=>ji.next());for(;Yr(ki,ji=>!ji.done);ki=Hn.map(ji=>ji.next()))yield ki.map(ji=>ji.value)}xt.chain=be,xt.each=tn,xt.empty=st,xt.enumerate=ft,xt.every=Yr,xt.filter=Lt,xt.find=Xt,xt.findIndex=Hr,xt.map=Qr,xt.max=jr,xt.min=Cr,xt.minmax=Jr,xt.once=Wn,xt.range=En,xt.reduce=Ee,xt.repeat=yn,xt.retro=Yn,xt.some=Nr,xt.stride=ri,xt.take=ni,xt.toArray=zr,xt.toObject=Gr,xt.topologicSort=ra,xt.zip=qi})});var hg=ab((fg,rA)=>{(function(xt,be){typeof fg=="object"&&typeof rA<"u"?be(fg,yv()):typeof define=="function"&&define.amd?define(["exports","@lumino/algorithm"],be):(xt=typeof globalThis<"u"?globalThis:xt||self,be(xt.lumino_coreutils={},xt.lumino_algorithm))})(fg,function(xt,be){"use strict";xt.JSONExt=void 0,function(Jr){Jr.emptyObject=Object.freeze({}),Jr.emptyArray=Object.freeze([]);function zr(yn){return yn===null||typeof yn=="boolean"||typeof yn=="number"||typeof yn=="string"}Jr.isPrimitive=zr;function Gr(yn){return Array.isArray(yn)}Jr.isArray=Gr;function tn(yn){return!zr(yn)&&!Gr(yn)}Jr.isObject=tn;function Yr(yn,Wn){if(yn===Wn)return!0;if(zr(yn)||zr(Wn))return!1;let Yn=Gr(yn),ra=Gr(Wn);return Yn!==ra?!1:Yn&&ra?Qr(yn,Wn):En(yn,Wn)}Jr.deepEqual=Yr;function Nr(yn){return zr(yn)?yn:Gr(yn)?In(yn):Ee(yn)}Jr.deepCopy=Nr;function Qr(yn,Wn){if(yn===Wn)return!0;if(yn.length!==Wn.length)return!1;for(let Yn=0,ra=yn.length;Yn!0,this._plugins=new Map,this._services=new Map,zr.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=zr.validatePlugin)}get application(){return this._application}set application(zr){if(this._application!==null)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=zr}get deferredPlugins(){return Array.from(this._plugins).filter(([zr,Gr])=>Gr.autoStart==="defer").map(([zr,Gr])=>zr)}getPluginDescription(zr){var Gr,tn;return(tn=(Gr=this._plugins.get(zr))===null||Gr===void 0?void 0:Gr.description)!==null&&tn!==void 0?tn:""}hasPlugin(zr){return this._plugins.has(zr)}isPluginActivated(zr){var Gr,tn;return(tn=(Gr=this._plugins.get(zr))===null||Gr===void 0?void 0:Gr.activated)!==null&&tn!==void 0?tn:!1}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(zr){if(this._plugins.has(zr.id))throw new TypeError(`Plugin '${zr.id}' is already registered.`);if(!this._validatePlugin(zr))throw new Error(`Plugin '${zr.id}' is not valid.`);let Gr=Lt.createPluginData(zr);Lt.ensureNoCycle(Gr,this._plugins,this._services),Gr.provides&&this._services.set(Gr.provides,Gr.id),this._plugins.set(Gr.id,Gr)}registerPlugins(zr){for(let Gr of zr)this.registerPlugin(Gr)}deregisterPlugin(zr,Gr){let tn=this._plugins.get(zr);if(tn){if(tn.activated&&!Gr)throw new Error(`Plugin '${zr}' is still active.`);this._plugins.delete(zr)}}async activatePlugin(zr){let Gr=this._plugins.get(zr);if(!Gr)throw new ReferenceError(`Plugin '${zr}' is not registered.`);if(Gr.activated)return;if(Gr.promise)return Gr.promise;let tn=Gr.requires.map(Nr=>this.resolveRequiredService(Nr)),Yr=Gr.optional.map(Nr=>this.resolveOptionalService(Nr));return Gr.promise=Promise.all([...tn,...Yr]).then(Nr=>Gr.activate.apply(void 0,[this.application,...Nr])).then(Nr=>{Gr.service=Nr,Gr.activated=!0,Gr.promise=null}).catch(Nr=>{throw Gr.promise=null,Nr}),Gr.promise}async activatePlugins(zr,Gr={}){switch(zr){case"defer":{let tn=this.deferredPlugins.filter(Yr=>this._plugins.get(Yr).autoStart).map(Yr=>this.activatePlugin(Yr));await Promise.all(tn);break}case"startUp":{let Yr=Lt.collectStartupPlugins(this._plugins,Gr).map(async Nr=>{try{return await this.activatePlugin(Nr)}catch(Qr){console.error(`Plugin '${Nr}' failed to activate.`,Qr)}});await Promise.all(Yr);break}}}async deactivatePlugin(zr){let Gr=this._plugins.get(zr);if(!Gr)throw new ReferenceError(`Plugin '${zr}' is not registered.`);if(!Gr.activated)return[];if(!Gr.deactivate)throw new TypeError(`Plugin '${zr}'#deactivate() method missing`);let tn=Lt.findDependents(zr,this._plugins,this._services),Yr=tn.map(Nr=>this._plugins.get(Nr));for(let Nr of Yr)if(!Nr.deactivate)throw new TypeError(`Plugin ${Nr.id}#deactivate() method missing (depends on ${zr})`);for(let Nr of Yr){let Qr=[...Nr.requires,...Nr.optional].map(En=>{let In=this._services.get(En);return In?this._plugins.get(In).service:null});await Nr.deactivate(this.application,...Qr),Nr.service=null,Nr.activated=!1}return tn.pop(),tn}async resolveRequiredService(zr){let Gr=this._services.get(zr);if(!Gr)throw new TypeError(`No provider for: ${zr.name}.`);let tn=this._plugins.get(Gr);return tn.activated||await this.activatePlugin(Gr),tn.service}async resolveOptionalService(zr){let Gr=this._services.get(zr);if(!Gr)return null;let tn=this._plugins.get(Gr);if(!tn.activated)try{await this.activatePlugin(Gr)}catch(Yr){return console.error(Yr),null}return tn.service}}var Lt;(function(Jr){class zr{constructor(En){var In,Ee,yn,Wn;this._activated=!1,this._promise=null,this._service=null,this.id=En.id,this.description=(In=En.description)!==null&&In!==void 0?In:"",this.activate=En.activate,this.deactivate=(Ee=En.deactivate)!==null&&Ee!==void 0?Ee:null,this.provides=(yn=En.provides)!==null&&yn!==void 0?yn:null,this.autoStart=(Wn=En.autoStart)!==null&&Wn!==void 0?Wn:!1,this.requires=En.requires?En.requires.slice():[],this.optional=En.optional?En.optional.slice():[]}get activated(){return this._activated}set activated(En){this._activated=En}get service(){return this._service}set service(En){this._service=En}get promise(){return this._promise}set promise(En){this._promise=En}}function Gr(Qr){return new zr(Qr)}Jr.createPluginData=Gr;function tn(Qr,En,In){let Ee=[...Qr.requires,...Qr.optional],yn=Yn=>{if(Yn===Qr.provides)return!0;let ra=In.get(Yn);if(!ra)return!1;let ri=En.get(ra),ni=[...ri.requires,...ri.optional];return ni.length===0?!1:(Wn.push(ra),ni.some(yn)?!0:(Wn.pop(),!1))};if(!Qr.provides||Ee.length===0)return;let Wn=[Qr.id];if(Ee.some(yn))throw new ReferenceError(`Cycle detected: ${Wn.join(" -> ")}.`)}Jr.ensureNoCycle=tn;function Yr(Qr,En,In){let Ee=new Array,yn=ni=>{let qi=En.get(ni),Ta=[...qi.requires,...qi.optional];Ee.push(...Ta.reduce((Hn,ki)=>{let ji=In.get(ki);return ji&&Hn.push([ni,ji]),Hn},[]))};for(let ni of En.keys())yn(ni);let Wn=Ee.filter(ni=>ni[1]===Qr),Yn=0;for(;Wn.length>Yn;){let ni=Wn.length,qi=new Set(Wn.map(Ta=>Ta[0]));for(let Ta of qi)Ee.filter(Hn=>Hn[1]===Ta).forEach(Hn=>{Wn.includes(Hn)||Wn.push(Hn)});Yn=ni}let ra=be.topologicSort(Wn),ri=ra.findIndex(ni=>ni===Qr);return ri===-1?[Qr]:ra.slice(0,ri+1)}Jr.findDependents=Yr;function Nr(Qr,En){let In=new Set;for(let Ee of Qr.keys())Qr.get(Ee).autoStart===!0&&In.add(Ee);if(En.startPlugins)for(let Ee of En.startPlugins)In.add(Ee);if(En.ignorePlugins)for(let Ee of En.ignorePlugins)In.delete(Ee);return Array.from(In)}Jr.collectStartupPlugins=Nr})(Lt||(Lt={}));class Xt{constructor(){this.promise=new Promise((zr,Gr)=>{this._resolve=zr,this._reject=Gr})}resolve(zr){let Gr=this._resolve;Gr(zr)}reject(zr){let Gr=this._reject;Gr(zr)}}class Hr{constructor(zr,Gr){this.name=zr,this.description=Gr??"",this._tokenStructuralPropertyT=null}}function Cr(Jr){let zr=0;for(let Gr=0,tn=Jr.length;Gr>>0),Jr[Gr]=zr&255,zr>>>=8}xt.Random=void 0,function(Jr){Jr.getRandomValues=(()=>{let zr=typeof window<"u"&&(window.crypto||window.msCrypto)||null;return zr&&typeof zr.getRandomValues=="function"?function(tn){return zr.getRandomValues(tn)}:Cr})()}(xt.Random||(xt.Random={}));function jr(Jr){let zr=new Uint8Array(16),Gr=new Array(256);for(let tn=0;tn<16;++tn)Gr[tn]="0"+tn.toString(16);for(let tn=16;tn<256;++tn)Gr[tn]=tn.toString(16);return function(){return Jr(zr),zr[6]=64|zr[6]&15,zr[8]=128|zr[8]&63,Gr[zr[0]]+Gr[zr[1]]+Gr[zr[2]]+Gr[zr[3]]+"-"+Gr[zr[4]]+Gr[zr[5]]+"-"+Gr[zr[6]]+Gr[zr[7]]+"-"+Gr[zr[8]]+Gr[zr[9]]+"-"+Gr[zr[10]]+Gr[zr[11]]+Gr[zr[12]]+Gr[zr[13]]+Gr[zr[14]]+Gr[zr[15]]}}xt.UUID=void 0,function(Jr){Jr.uuid4=jr(xt.Random.getRandomValues)}(xt.UUID||(xt.UUID={})),xt.MimeData=st,xt.PluginRegistry=ft,xt.PromiseDelegate=Xt,xt.Token=Hr})});var fA=ab((cA,Tg)=>{(function(xt,be){typeof Tg=="object"&&Tg.exports?Tg.exports=be():xt.moduleName=be()})(typeof self<"u"?self:cA,()=>{"use strict";var xt=(()=>{var be=Object.create,st=Object.defineProperty,ft=Object.defineProperties,Lt=Object.getOwnPropertyDescriptor,Xt=Object.getOwnPropertyDescriptors,Hr=Object.getOwnPropertyNames,Cr=Object.getOwnPropertySymbols,jr=Object.getPrototypeOf,Jr=Object.prototype.hasOwnProperty,zr=Object.prototype.propertyIsEnumerable,Gr=(J,V)=>(V=Symbol[J])?V:Symbol.for("Symbol."+J),tn=J=>{throw TypeError(J)},Yr=(J,V,v)=>V in J?st(J,V,{enumerable:!0,configurable:!0,writable:!0,value:v}):J[V]=v,Nr=(J,V)=>{for(var v in V||(V={}))Jr.call(V,v)&&Yr(J,v,V[v]);if(Cr)for(var v of Cr(V))zr.call(V,v)&&Yr(J,v,V[v]);return J},Qr=(J,V)=>ft(J,Xt(V)),En=(J,V)=>{var v={};for(var x in J)Jr.call(J,x)&&V.indexOf(x)<0&&(v[x]=J[x]);if(J!=null&&Cr)for(var x of Cr(J))V.indexOf(x)<0&&zr.call(J,x)&&(v[x]=J[x]);return v},In=(J,V,v)=>function(){if(v)throw v[0];try{return J&&(V=(0,J[Hr(J)[0]])(J=0)),V}catch(E){throw v=[E],E}},Ee=(J,V)=>function(){try{return V||(0,J[Hr(J)[0]])((V={exports:{}}).exports,V),V.exports}catch(x){throw V=0,x}},yn=(J,V)=>{for(var v in V)st(J,v,{get:V[v],enumerable:!0})},Wn=(J,V,v,x)=>{if(V&&typeof V=="object"||typeof V=="function")for(let E of Hr(V))!Jr.call(J,E)&&E!==v&&st(J,E,{get:()=>V[E],enumerable:!(x=Lt(V,E))||x.enumerable});return J},Yn=(J,V,v)=>(v=J!=null?be(jr(J)):{},Wn(V||!J||!J.__esModule?st(v,"default",{value:J,enumerable:!0}):v,J)),ra=J=>Wn(st({},"__esModule",{value:!0}),J),ri=function(J,V){this[0]=J,this[1]=V},ni=J=>{var V=J[Gr("asyncIterator")],v=!1,x,E={};return V==null?(V=J[Gr("iterator")](),x=k=>E[k]=l=>V[k](l)):(V=V.call(J),x=k=>E[k]=l=>{if(v){if(v=!1,k==="throw")throw l;return l}return v=!0,{done:!1,value:new ri(new Promise(e=>{var t=V[k](l);t instanceof Object||tn("Object expected"),e(t)}),1)}}),E[Gr("iterator")]=()=>E,x("next"),"throw"in V?x("throw"):E.throw=k=>{throw k},"return"in V&&x("return"),E},qi=Ee({"src/version.js"(J){"use strict";J.version="4.0.0"}}),Ta=Ee({"node_modules/native-promise-only/lib/npo.src.js"(J,V){(function(x,E,k){E[x]=E[x]||k(),typeof V<"u"&&V.exports&&(V.exports=E[x])})("Promise",typeof window<"u"?window:J,function(){"use strict";var x,E,k,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),x=function(w,S,M,C){return Object.defineProperty(w,S,{value:M,writable:!0,configurable:C!==!1})}}catch{x=function(S,M,C){return S[M]=C,S}}k=function(){var w,S,M;function C(_,T){this.fn=_,this.self=T,this.next=void 0}return{add:function(T,f){M=new C(T,f),S?S.next=M:w=M,S=M,M=void 0},drain:function(){var T=w;for(w=S=E=void 0;T;)T.fn.call(T.self),T=T.next}}}();function t(i,w){k.add(i,w),E||(E=e(k.drain))}function a(i){var w,S=typeof i;return i!=null&&(S=="object"||S=="function")&&(w=i.then),typeof w=="function"?w:!1}function r(){for(var i=0;i0&&t(r,S))}catch(M){s.call(new m(S),M)}}}function s(i){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=i,w.state=2,w.chain.length>0&&t(r,w))}function c(i,w,S,M){for(var C=0;CSe?1:he>=Se?0:NaN}v.descending=function(he,Se){return Sehe?1:Se>=he?0:NaN},v.min=function(he,Se){var je=-1,Qe=he.length,tt,ut;if(arguments.length===1){for(;++je=ut){tt=ut;break}for(;++jeut&&(tt=ut)}else{for(;++je=ut){tt=ut;break}for(;++jeut&&(tt=ut)}return tt},v.max=function(he,Se){var je=-1,Qe=he.length,tt,ut;if(arguments.length===1){for(;++je=ut){tt=ut;break}for(;++jett&&(tt=ut)}else{for(;++je=ut){tt=ut;break}for(;++jett&&(tt=ut)}return tt},v.extent=function(he,Se){var je=-1,Qe=he.length,tt,ut,jt;if(arguments.length===1){for(;++je=ut){tt=jt=ut;break}for(;++jeut&&(tt=ut),jt=ut){tt=jt=ut;break}for(;++jeut&&(tt=ut),jt1)return jt/(Qt-1)},v.deviation=function(){var he=v.variance.apply(this,arguments);return he&&Math.sqrt(he)};function h(he){return{left:function(Se,je,Qe,tt){for(arguments.length<3&&(Qe=0),arguments.length<4&&(tt=Se.length);Qe>>1;he(Se[ut],je)<0?Qe=ut+1:tt=ut}return Qe},right:function(Se,je,Qe,tt){for(arguments.length<3&&(Qe=0),arguments.length<4&&(tt=Se.length);Qe>>1;he(Se[ut],je)>0?tt=ut:Qe=ut+1}return Qe}}}var p=h(s);v.bisectLeft=p.left,v.bisect=v.bisectRight=p.right,v.bisector=function(he){return h(he.length===1?function(Se,je){return s(he(Se),je)}:he)},v.shuffle=function(he,Se,je){(Qe=arguments.length)<3&&(je=he.length,Qe<2&&(Se=0));for(var Qe=je-Se,tt,ut;Qe;)ut=Math.random()*Qe--|0,tt=he[Qe+Se],he[Qe+Se]=he[ut+Se],he[ut+Se]=tt;return he},v.permute=function(he,Se){for(var je=Se.length,Qe=new Array(je);je--;)Qe[je]=he[Se[je]];return Qe},v.pairs=function(he){for(var Se=0,je=he.length-1,Qe,tt=he[0],ut=new Array(je<0?0:je);Se=0;)for(jt=he[Se],je=jt.length;--je>=0;)ut[--tt]=jt[je];return ut};var i=Math.abs;v.range=function(he,Se,je){if(arguments.length<3&&(je=1,arguments.length<2&&(Se=he,he=0)),(Se-he)/je===1/0)throw new Error("infinite range");var Qe=[],tt=w(i(je)),ut=-1,jt;if(he*=tt,Se*=tt,je*=tt,je<0)for(;(jt=he+je*++ut)>Se;)Qe.push(jt/tt);else for(;(jt=he+je*++ut)=Se.length)return tt?tt.call(he,Qt):Qe?Qt.sort(Qe):Qt;for(var yr=-1,Kr=Qt.length,$r=Se[gr++],bn,Rn,rn,pn=new M,xn;++yr=Se.length)return St;var gr=[],yr=je[Qt++];return St.forEach(function(Kr,$r){gr.push({key:Kr,values:jt($r,Qt)})}),yr?gr.sort(function(Kr,$r){return yr(Kr.key,$r.key)}):gr}return he.map=function(St,Qt){return ut(Qt,St,0)},he.entries=function(St){return jt(ut(v.map,St,0),0)},he.key=function(St){return Se.push(St),he},he.sortKeys=function(St){return je[Se.length-1]=St,he},he.sortValues=function(St){return Qe=St,he},he.rollup=function(St){return tt=St,he},he},v.set=function(he){var Se=new N;if(he)for(var je=0,Qe=he.length;je=0&&(Qe=he.slice(je+1),he=he.slice(0,je)),he)return arguments.length<2?this[he].on(Qe):this[he].on(Qe,Se);if(arguments.length===2){if(Se==null)for(he in this)this.hasOwnProperty(he)&&this[he].on(Qe,null);return this}};function Z(he){var Se=[],je=new M;function Qe(){for(var tt=Se,ut=-1,jt=tt.length,St;++ut=0&&(je=he.slice(0,Se))!=="xmlns"&&(he=he.slice(Se+1)),fe.hasOwnProperty(je)?{space:fe[je],local:he}:he}},q.attr=function(he,Se){if(arguments.length<2){if(typeof he=="string"){var je=this.node();return he=v.ns.qualify(he),he.local?je.getAttributeNS(he.space,he.local):je.getAttribute(he)}for(Se in he)this.each(ye(Se,he[Se]));return this}return this.each(ye(he,Se))};function ye(he,Se){he=v.ns.qualify(he);function je(){this.removeAttribute(he)}function Qe(){this.removeAttributeNS(he.space,he.local)}function tt(){this.setAttribute(he,Se)}function ut(){this.setAttributeNS(he.space,he.local,Se)}function jt(){var Qt=Se.apply(this,arguments);Qt==null?this.removeAttribute(he):this.setAttribute(he,Qt)}function St(){var Qt=Se.apply(this,arguments);Qt==null?this.removeAttributeNS(he.space,he.local):this.setAttributeNS(he.space,he.local,Qt)}return Se==null?he.local?Qe:je:typeof Se=="function"?he.local?St:jt:he.local?ut:tt}function xe(he){return he.trim().replace(/\s+/g," ")}q.classed=function(he,Se){if(arguments.length<2){if(typeof he=="string"){var je=this.node(),Qe=(he=Me(he)).length,tt=-1;if(Se=je.classList){for(;++tt=0;)(ut=je[Qe])&&(tt&&tt!==ut.nextSibling&&tt.parentNode.insertBefore(ut,tt),tt=ut);return this},q.sort=function(he){he=Te.apply(this,arguments);for(var Se=-1,je=this.length;++Se=Se&&(Se=tt+1);!(Qt=jt[Se])&&++Se0&&(he=he.slice(0,tt));var jt=Tt.get(he);jt&&(he=jt,ut=Kt);function St(){var yr=this[Qe];yr&&(this.removeEventListener(he,yr,yr.$),delete this[Qe])}function Qt(){var yr=ut(Se,E(arguments));St.call(this),this.addEventListener(he,this[Qe]=yr,yr.$=je),yr._=Se}function gr(){var yr=new RegExp("^__on([^.]+)"+v.requote(he)+"$"),Kr;for(var $r in this)if(Kr=$r.match(yr)){var bn=this[$r];this.removeEventListener(Kr[1],bn,bn.$),delete this[$r]}}return tt?Se?Qt:St:Se?j:gr}var Tt=v.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Tt.forEach(function(he){"on"+he in k&&Tt.remove(he)});function At(he,Se){return function(je){var Qe=v.event;v.event=je,Se[0]=this.__data__;try{he.apply(this,Se)}finally{v.event=Qe}}}function Kt(he,Se){var je=At(he,Se);return function(Qe){var tt=this,ut=Qe.relatedTarget;(!ut||ut!==tt&&!(ut.compareDocumentPosition(tt)&8))&&je.call(tt,Qe)}}var nr,_r=0;function Zt(he){var Se=".dragsuppress-"+ ++_r,je="click"+Se,Qe=v.select(e(he)).on("touchmove"+Se,Q).on("dragstart"+Se,Q).on("selectstart"+Se,Q);if(nr==null&&(nr="onselectstart"in he?!1:F(he.style,"userSelect")),nr){var tt=l(he).style,ut=tt[nr];tt[nr]="none"}return function(jt){if(Qe.on(Se,null),nr&&(tt[nr]=ut),jt){var St=function(){Qe.on(je,null)};Qe.on(je,function(){Q(),St()},!0),setTimeout(St,0)}}}v.mouse=function(he){return Ot(he,re())};var sr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(he,Se){Se.changedTouches&&(Se=Se.changedTouches[0]);var je=he.ownerSVGElement||he;if(je.createSVGPoint){var Qe=je.createSVGPoint();if(sr<0){var tt=e(he);if(tt.scrollX||tt.scrollY){je=v.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ut=je[0][0].getScreenCTM();sr=!(ut.f||ut.e),je.remove()}}return sr?(Qe.x=Se.pageX,Qe.y=Se.pageY):(Qe.x=Se.clientX,Qe.y=Se.clientY),Qe=Qe.matrixTransform(he.getScreenCTM().inverse()),[Qe.x,Qe.y]}var jt=he.getBoundingClientRect();return[Se.clientX-jt.left-he.clientLeft,Se.clientY-jt.top-he.clientTop]}v.touch=function(he,Se,je){if(arguments.length<3&&(je=Se,Se=re().changedTouches),Se){for(var Qe=0,tt=Se.length,ut;Qe0?1:he<0?-1:0}function Dt(he,Se,je){return(Se[0]-he[0])*(je[1]-he[1])-(Se[1]-he[1])*(je[0]-he[0])}function Ct(he){return he>1?0:he<-1?Be:Math.acos(he)}function Vt(he){return he>1?Ze:he<-1?-Ze:Math.asin(he)}function Ht(he){return((he=Math.exp(he))-1/he)/2}function Wt(he){return((he=Math.exp(he))+1/he)/2}function Sr(he){return((he=Math.exp(2*he))-1)/(he+1)}function on(he){return(he=Math.sin(he/2))*he}var $t=Math.SQRT2,It=2,ir=4;v.interpolateZoom=function(he,Se){var je=he[0],Qe=he[1],tt=he[2],ut=Se[0],jt=Se[1],St=Se[2],Qt=ut-je,gr=jt-Qe,yr=Qt*Qt+gr*gr,Kr,$r;if(yr0&&(_e=_e.transition().duration(jt)),_e.call(Fn.event)}function Oi(){pn&&pn.domain(rn.range().map(function(_e){return(_e-he.x)/he.k}).map(rn.invert)),Bn&&Bn.domain(xn.range().map(function(_e){return(_e-he.y)/he.k}).map(xn.invert))}function Pi(_e){St++||_e({type:"zoomstart"})}function ko(_e){Oi(),_e({type:"zoom",scale:he.k,translate:[he.x,he.y]})}function de(_e){--St||(_e({type:"zoomend"}),je=null)}function y(){var _e=this,De=Rn.of(_e,arguments),Ne=0,Ye=v.select(e(_e)).on(gr,Ft).on(yr,Gt),lt=mn(v.mouse(_e)),ct=Zt(_e);bo.call(_e),Pi(De);function Ft(){Ne=1,Ka(v.mouse(_e),lt),ko(De)}function Gt(){Ye.on(gr,null).on(yr,null),ct(Ne),de(De)}}function O(){var _e=this,De=Rn.of(_e,arguments),Ne={},Ye=0,lt,ct=".zoom-"+v.event.changedTouches[0].identifier,Ft="touchmove"+ct,Gt="touchend"+ct,Jt=[],it=v.select(_e),Rt=Zt(_e);or(),Pi(De),it.on(Qt,null).on($r,or);function qt(){var dr=v.touches(_e);return lt=he.k,dr.forEach(function(mr){mr.identifier in Ne&&(Ne[mr.identifier]=mn(mr))}),dr}function or(){var dr=v.event.target;v.select(dr).on(Ft,vr).on(Gt,Ar),Jt.push(dr);for(var mr=v.event.changedTouches,qr=0,Lr=mr.length;qr1){var Dn=cn[0],qn=cn[1],_n=Dn[0]-qn[0],vn=Dn[1]-qn[1];Ye=_n*_n+vn*vn}}function vr(){var dr=v.touches(_e),mr,qr,Lr,cn;bo.call(_e);for(var Nn=0,Dn=dr.length;Nn1?1:Se,je=je<0?0:je>1?1:je,tt=je<=.5?je*(1+Se):je+Se-je*Se,Qe=2*je-tt;function ut(St){return St>360?St-=360:St<0&&(St+=360),St<60?Qe+(tt-Qe)*St/60:St<180?tt:St<240?Qe+(tt-Qe)*(240-St)/60:Qe}function jt(St){return Math.round(ut(St)*255)}return new Kn(jt(he+120),jt(he),jt(he-120))}v.hcl=jn;function jn(he,Se,je){return this instanceof jn?(this.h=+he,this.c=+Se,void(this.l=+je)):arguments.length<2?he instanceof jn?new jn(he.h,he.c,he.l):he instanceof Qn?pa(he.l,he.a,he.b):pa((he=Fr((he=v.rgb(he)).r,he.g,he.b)).l,he.a,he.b):new jn(he,Se,je)}var Aa=jn.prototype=new ln;Aa.brighter=function(he){return new jn(this.h,this.c,Math.min(100,this.l+ei*(arguments.length?he:1)))},Aa.darker=function(he){return new jn(this.h,this.c,Math.max(0,this.l-ei*(arguments.length?he:1)))},Aa.rgb=function(){return ua(this.h,this.c,this.l).rgb()};function ua(he,Se,je){return isNaN(he)&&(he=0),isNaN(Se)&&(Se=0),new Qn(je,Math.cos(he*=Je)*Se,Math.sin(he)*Se)}v.lab=Qn;function Qn(he,Se,je){return this instanceof Qn?(this.l=+he,this.a=+Se,void(this.b=+je)):arguments.length<2?he instanceof Qn?new Qn(he.l,he.a,he.b):he instanceof jn?ua(he.h,he.c,he.l):Fr((he=Kn(he)).r,he.g,he.b):new Qn(he,Se,je)}var ei=18,Fa=.95047,ai=1,Mi=1.08883,ci=Qn.prototype=new ln;ci.brighter=function(he){return new Qn(Math.min(100,this.l+ei*(arguments.length?he:1)),this.a,this.b)},ci.darker=function(he){return new Qn(Math.max(0,this.l-ei*(arguments.length?he:1)),this.a,this.b)},ci.rgb=function(){return ba(this.l,this.a,this.b)};function ba(he,Se,je){var Qe=(he+16)/116,tt=Qe+Se/500,ut=Qe-je/200;return tt=Ii(tt)*Fa,Qe=Ii(Qe)*ai,ut=Ii(ut)*Mi,new Kn(da(3.2404542*tt-1.5371385*Qe-.4985314*ut),da(-.969266*tt+1.8760108*Qe+.041556*ut),da(.0556434*tt-.2040259*Qe+1.0572252*ut))}function pa(he,Se,je){return he>0?new jn(Math.atan2(je,Se)*Mt,Math.sqrt(Se*Se+je*je),he):new jn(NaN,NaN,he)}function Ii(he){return he>.206893034?he*he*he:(he-4/29)/7.787037}function ho(he){return he>.008856?Math.pow(he,1/3):7.787037*he+4/29}function da(he){return Math.round(255*(he<=.00304?12.92*he:1.055*Math.pow(he,1/2.4)-.055))}v.rgb=Kn;function Kn(he,Se,je){return this instanceof Kn?(this.r=~~he,this.g=~~Se,void(this.b=~~je)):arguments.length<2?he instanceof Kn?new Kn(he.r,he.g,he.b):Tr(""+he,Kn,Un):new Kn(he,Se,je)}function ot(he){return new Kn(he>>16,he>>8&255,he&255)}function et(he){return ot(he)+""}var hr=Kn.prototype=new ln;hr.brighter=function(he){he=Math.pow(.7,arguments.length?he:1);var Se=this.r,je=this.g,Qe=this.b,tt=30;return!Se&&!je&&!Qe?new Kn(tt,tt,tt):(Se&&Se>4,Qe=Qe>>4|Qe,tt=Qt&240,tt=tt>>4|tt,ut=Qt&15,ut=ut<<4|ut):he.length===7&&(Qe=(Qt&16711680)>>16,tt=(Qt&65280)>>8,ut=Qt&255)),Se(Qe,tt,ut))}function Rr(he,Se,je){var Qe=Math.min(he/=255,Se/=255,je/=255),tt=Math.max(he,Se,je),ut=tt-Qe,jt,St,Qt=(tt+Qe)/2;return ut?(St=Qt<.5?ut/(tt+Qe):ut/(2-tt-Qe),he==tt?jt=(Se-je)/ut+(Se0&&Qt<1?0:jt),new nn(jt,St,Qt)}function Fr(he,Se,je){he=at(he),Se=at(Se),je=at(je);var Qe=ho((.4124564*he+.3575761*Se+.1804375*je)/Fa),tt=ho((.2126729*he+.7151522*Se+.072175*je)/ai),ut=ho((.0193339*he+.119192*Se+.9503041*je)/Mi);return Qn(116*tt-16,500*(Qe-tt),200*(tt-ut))}function at(he){return(he/=255)<=.04045?he/12.92:Math.pow((he+.055)/1.055,2.4)}function kt(he){var Se=parseFloat(he);return he.charAt(he.length-1)==="%"?Math.round(Se*2.55):Se}var Ut=v.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});Ut.forEach(function(he,Se){Ut.set(he,ot(Se))});function ar(he){return typeof he=="function"?he:function(){return he}}v.functor=ar,v.xhr=Er(R);function Er(he){return function(Se,je,Qe){return arguments.length===2&&typeof je=="function"&&(Qe=je,je=null),br(Se,je,he,Qe)}}function br(he,Se,je,Qe){var tt={},ut=v.dispatch("beforesend","progress","load","error"),jt={},St=new XMLHttpRequest,Qt=null;self.XDomainRequest&&!("withCredentials"in St)&&/^(http(s)?:)?\/\//.test(he)&&(St=new XDomainRequest),"onload"in St?St.onload=St.onerror=gr:St.onreadystatechange=function(){St.readyState>3&&gr()};function gr(){var yr=St.status,Kr;if(!yr&&Pr(St)||yr>=200&&yr<300||yr===304){try{Kr=je.call(tt,St)}catch($r){ut.error.call(tt,$r);return}ut.load.call(tt,Kr)}else ut.error.call(tt,St)}return St.onprogress=function(yr){var Kr=v.event;v.event=yr;try{ut.progress.call(tt,St)}finally{v.event=Kr}},tt.header=function(yr,Kr){return yr=(yr+"").toLowerCase(),arguments.length<2?jt[yr]:(Kr==null?delete jt[yr]:jt[yr]=Kr+"",tt)},tt.mimeType=function(yr){return arguments.length?(Se=yr==null?null:yr+"",tt):Se},tt.responseType=function(yr){return arguments.length?(Qt=yr,tt):Qt},tt.response=function(yr){return je=yr,tt},["get","post"].forEach(function(yr){tt[yr]=function(){return tt.send.apply(tt,[yr].concat(E(arguments)))}}),tt.send=function(yr,Kr,$r){if(arguments.length===2&&typeof Kr=="function"&&($r=Kr,Kr=null),St.open(yr,he,!0),Se!=null&&!("accept"in jt)&&(jt.accept=Se+",*/*"),St.setRequestHeader)for(var bn in jt)St.setRequestHeader(bn,jt[bn]);return Se!=null&&St.overrideMimeType&&St.overrideMimeType(Se),Qt!=null&&(St.responseType=Qt),$r!=null&&tt.on("error",$r).on("load",function(Rn){$r(null,Rn)}),ut.beforesend.call(tt,St),St.send(Kr??null),tt},tt.abort=function(){return St.abort(),tt},v.rebind(tt,ut,"on"),Qe==null?tt:tt.get(Or(Qe))}function Or(he){return he.length===1?function(Se,je){he(Se==null?je:null)}:he}function Pr(he){var Se=he.responseType;return Se&&Se!=="text"?he.response:he.responseText}v.dsv=function(he,Se){var je=new RegExp('["'+he+` +]`),Qe=he.charCodeAt(0);function tt(gr,yr,Kr){arguments.length<3&&(Kr=yr,yr=null);var $r=br(gr,Se,yr==null?ut:jt(yr),Kr);return $r.row=function(bn){return arguments.length?$r.response((yr=bn)==null?ut:jt(bn)):yr},$r}function ut(gr){return tt.parse(gr.responseText)}function jt(gr){return function(yr){return tt.parse(yr.responseText,gr)}}tt.parse=function(gr,yr){var Kr;return tt.parseRows(gr,function($r,bn){if(Kr)return Kr($r,bn-1);var Rn=function(rn){for(var pn={},xn=$r.length,Bn=0;Bn=Rn)return $r;if(Bn)return Bn=!1,Kr;var Ea=rn;if(gr.charCodeAt(Ea)===34){for(var Oa=Ea;Oa++24?(isFinite(Se)&&(clearTimeout(Ca),Ca=setTimeout(ga,Se)),Pn=0):(Pn=1,ma(ga))}v.timer.flush=function(){eo(),si()};function eo(){for(var he=Date.now(),Se=hn;Se;)he>=Se.t&&Se.c(he-Se.t)&&(Se.c=null),Se=Se.n;return he}function si(){for(var he,Se=hn,je=1/0;Se;)Se.c?(Se.t=0;--St)rn.push(tt[gr[Kr[St]][2]]);for(St=+bn;St<$r.length-Rn;++St)rn.push(tt[gr[$r[St]][2]]);return rn}return Qe.x=function(tt){return arguments.length?(Se=tt,Qe):Se},Qe.y=function(tt){return arguments.length?(je=tt,Qe):je},Qe};function Sa(he){for(var Se=he.length,je=[0,1],Qe=2,tt=2;tt1&&Dt(he[je[Qe-2]],he[je[Qe-1]],he[tt])<=0;)--Qe;je[Qe++]=tt}return je.slice(0,Qe)}function Gi(he,Se){return he[0]-Se[0]||he[1]-Se[1]}v.geom.polygon=function(he){return H(he,ti),he};var ti=v.geom.polygon.prototype=[];ti.area=function(){for(var he=-1,Se=this.length,je,Qe=this[Se-1],tt=0;++heht)St=St.L;else if(jt=Se-ns(St,je),jt>ht){if(!St.R){Qe=St;break}St=St.R}else{ut>-ht?(Qe=St.P,tt=St):jt>-ht?(Qe=St,tt=St.N):Qe=tt=St;break}var Qt=Io(he);if(So.insert(Qe,Qt),!(!Qe&&!tt)){if(Qe===tt){mo(Qe),tt=Io(Qe.site),So.insert(Qt,tt),Qt.edge=tt.edge=es(Qe.site,Qt.site),Go(Qe),Go(tt);return}if(!tt){Qt.edge=es(Qe.site,Qt.site);return}mo(Qe),mo(tt);var gr=Qe.site,yr=gr.x,Kr=gr.y,$r=he.x-yr,bn=he.y-Kr,Rn=tt.site,rn=Rn.x-yr,pn=Rn.y-Kr,xn=2*($r*pn-bn*rn),Bn=$r*$r+bn*bn,Fn=rn*rn+pn*pn,mn={x:(pn*Bn-bn*Fn)/xn+yr,y:($r*Fn-rn*Bn)/xn+Kr};Ps(tt.edge,gr,Rn,mn),Qt.edge=es(gr,he,null,mn),tt.edge=es(he,Rn,null,mn),Go(Qe),Go(tt)}}function Ko(he,Se){var je=he.site,Qe=je.x,tt=je.y,ut=tt-Se;if(!ut)return Qe;var jt=he.P;if(!jt)return-1/0;je=jt.site;var St=je.x,Qt=je.y,gr=Qt-Se;if(!gr)return St;var yr=St-Qe,Kr=1/ut-1/gr,$r=yr/gr;return Kr?(-$r+Math.sqrt($r*$r-2*Kr*(yr*yr/(-2*gr)-Qt+gr/2+tt-ut/2)))/Kr+Qe:(Qe+St)/2}function ns(he,Se){var je=he.N;if(je)return Ko(je,Se);var Qe=he.site;return Qe.y===Se?Qe.x:1/0}function wo(he){this.site=he,this.edges=[]}wo.prototype.prepare=function(){for(var he=this.edges,Se=he.length,je;Se--;)je=he[Se].edge,(!je.b||!je.a)&&he.splice(Se,1);return he.sort(Di),he.length};function No(he){for(var Se=he[0][0],je=he[1][0],Qe=he[0][1],tt=he[1][1],ut,jt,St,Qt,gr=Mo,yr=gr.length,Kr,$r,bn,Rn,rn,pn;yr--;)if(Kr=gr[yr],!(!Kr||!Kr.prepare()))for(bn=Kr.edges,Rn=bn.length,$r=0;$rht||i(Qt-jt)>ht)&&(bn.splice($r,0,new $o(Zs(Kr.site,pn,i(St-Se)ht?{x:Se,y:i(ut-Se)ht?{x:i(jt-tt)ht?{x:je,y:i(ut-je)ht?{x:i(jt-Qe)=-Re)){var $r=Qt*Qt+gr*gr,bn=yr*yr+pn*pn,Rn=(pn*$r-gr*bn)/Kr,rn=(Qt*bn-yr*$r)/Kr,pn=rn+St,xn=Wi.pop()||new lo;xn.arc=he,xn.site=tt,xn.x=Rn+jt,xn.y=pn+Math.sqrt(Rn*Rn+rn*rn),xn.cy=pn,he.circle=xn;for(var Bn=null,Fn=co._;Fn;)if(xn.y0)){if(rn/=bn,bn<0){if(rn0){if(rn>$r)return;rn>Kr&&(Kr=rn)}if(rn=je-St,!(!bn&&rn<0)){if(rn/=bn,bn<0){if(rn>$r)return;rn>Kr&&(Kr=rn)}else if(bn>0){if(rn0)){if(rn/=Rn,Rn<0){if(rn0){if(rn>$r)return;rn>Kr&&(Kr=rn)}if(rn=Qe-Qt,!(!Rn&&rn<0)){if(rn/=Rn,Rn<0){if(rn>$r)return;rn>Kr&&(Kr=rn)}else if(Rn>0){if(rn0&&(tt.a={x:St+Kr*bn,y:Qt+Kr*Rn}),$r<1&&(tt.b={x:St+$r*bn,y:Qt+$r*Rn}),tt}}}}}}function Jo(he){for(var Se=so,je=us(he[0][0],he[0][1],he[1][0],he[1][1]),Qe=Se.length,tt;Qe--;)tt=Se[Qe],(!zs(tt,he)||!je(tt)||i(tt.a.x-tt.b.x)=ut)return;if(yr>$r){if(!Qe)Qe={x:Rn,y:jt};else if(Qe.y>=St)return;je={x:Rn,y:St}}else{if(!Qe)Qe={x:Rn,y:St};else if(Qe.y1)if(yr>$r){if(!Qe)Qe={x:(jt-xn)/pn,y:jt};else if(Qe.y>=St)return;je={x:(St-xn)/pn,y:St}}else{if(!Qe)Qe={x:(St-xn)/pn,y:St};else if(Qe.y=ut)return;je={x:ut,y:pn*ut+xn}}else{if(!Qe)Qe={x:ut,y:pn*ut+xn};else if(Qe.x=yr&&xn.x<=$r&&xn.y>=Kr&&xn.y<=bn?[[yr,bn],[$r,bn],[$r,Kr],[yr,Kr]]:[];Bn.point=Qt[rn]}),gr}function St(Qt){return Qt.map(function(gr,yr){return{x:Math.round(Qe(gr,yr)/ht)*ht,y:Math.round(tt(gr,yr)/ht)*ht,i:yr}})}return jt.links=function(Qt){return ml(St(Qt)).edges.filter(function(gr){return gr.l&&gr.r}).map(function(gr){return{source:Qt[gr.l.i],target:Qt[gr.r.i]}})},jt.triangles=function(Qt){var gr=[];return ml(St(Qt)).cells.forEach(function(yr,Kr){for(var $r=yr.site,bn=yr.edges.sort(Di),Rn=-1,rn=bn.length,pn,xn,Bn=bn[rn-1].edge,Fn=Bn.l===$r?Bn.r:Bn.l;++RnFn&&(Fn=yr.x),yr.y>mn&&(mn=yr.y),bn.push(yr.x),Rn.push(yr.y);else for(rn=0;rnFn&&(Fn=Ea),Oa>mn&&(mn=Oa),bn.push(Ea),Rn.push(Oa)}var Ka=Fn-xn,di=mn-Bn;Ka>di?mn=Bn+Ka:Fn=xn+di;function Oi(de,y,O,ie,ce,_e,De,Ne){if(!(isNaN(O)||isNaN(ie)))if(de.leaf){var Ye=de.x,lt=de.y;if(Ye!=null)if(i(Ye-O)+i(lt-ie)<.01)Pi(de,y,O,ie,ce,_e,De,Ne);else{var ct=de.point;de.x=de.y=de.point=null,Pi(de,ct,Ye,lt,ce,_e,De,Ne),Pi(de,y,O,ie,ce,_e,De,Ne)}else de.x=O,de.y=ie,de.point=y}else Pi(de,y,O,ie,ce,_e,De,Ne)}function Pi(de,y,O,ie,ce,_e,De,Ne){var Ye=(ce+De)*.5,lt=(_e+Ne)*.5,ct=O>=Ye,Ft=ie>=lt,Gt=Ft<<1|ct;de.leaf=!1,de=de.nodes[Gt]||(de.nodes[Gt]=Bl()),ct?ce=Ye:De=Ye,Ft?_e=lt:Ne=lt,Oi(de,y,O,ie,ce,_e,De,Ne)}var ko=Bl();if(ko.add=function(de){Oi(ko,de,+Kr(de,++rn),+$r(de,rn),xn,Bn,Fn,mn)},ko.visit=function(de){_l(de,ko,xn,Bn,Fn,mn)},ko.find=function(de){return ju(ko,de[0],de[1],xn,Bn,Fn,mn)},rn=-1,Se==null){for(;++rnut||$r>jt||bn=Ea,di=je>=Oa,Oi=di<<1|Ka,Pi=Oi+4;Oije&&(ut=Se.slice(je,ut),St[jt]?St[jt]+=ut:St[++jt]=ut),(Qe=Qe[0])===(tt=tt[0])?St[jt]?St[jt]+=tt:St[++jt]=tt:(St[++jt]=null,Qt.push({i:jt,x:As(Qe,tt)})),je=ol.lastIndex;return je=0&&!(Qe=v.interpolators[je](he,Se)););return Qe}v.interpolators=[function(he,Se){var je=typeof Se;return(je==="string"?Ut.has(Se.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Se)?lu:ms:Se instanceof ln?lu:Array.isArray(Se)?Eu:je==="object"&&isNaN(Se)?il:As)(he,Se)}],v.interpolateArray=Eu;function Eu(he,Se){var je=[],Qe=[],tt=he.length,ut=Se.length,jt=Math.min(he.length,Se.length),St;for(St=0;St=0?he.slice(0,Se):he,Qe=Se>=0?he.slice(Se+1):"in";return je=fc.get(je)||Uu,Qe=th.get(Qe)||R,Cf(Qe(je.apply(null,x.call(arguments,1))))};function Cf(he){return function(Se){return Se<=0?0:Se>=1?1:he(Se)}}function qu(he){return function(Se){return 1-he(1-Se)}}function gs(he){return function(Se){return .5*(Se<.5?he(2*Se):2-he(2-2*Se))}}function Lf(he){return he*he}function hc(he){return he*he*he}function nc(he){if(he<=0)return 0;if(he>=1)return 1;var Se=he*he,je=Se*he;return 4*(he<.5?je:3*(he-Se)+je-.75)}function hf(he){return function(Se){return Math.pow(Se,he)}}function ku(he){return 1-Math.cos(he*Ze)}function dc(he){return Math.pow(2,10*(he-1))}function Cu(he){return 1-Math.sqrt(1-he*he)}function Pc(he,Se){var je;return arguments.length<2&&(Se=.45),arguments.length?je=Se/He*Math.asin(1/he):(he=1,je=Se/4),function(Qe){return 1+he*Math.pow(2,-10*Qe)*Math.sin((Qe-je)*He/Se)}}function $c(he){return he||(he=1.70158),function(Se){return Se*Se*((he+1)*Se-he)}}function Zl(he){return he<1/2.75?7.5625*he*he:he<2/2.75?7.5625*(he-=1.5/2.75)*he+.75:he<2.5/2.75?7.5625*(he-=2.25/2.75)*he+.9375:7.5625*(he-=2.625/2.75)*he+.984375}v.interpolateHcl=df;function df(he,Se){he=v.hcl(he),Se=v.hcl(Se);var je=he.h,Qe=he.c,tt=he.l,ut=Se.h-je,jt=Se.c-Qe,St=Se.l-tt;return isNaN(jt)&&(jt=0,Qe=isNaN(Qe)?Se.c:Qe),isNaN(ut)?(ut=0,je=isNaN(je)?Se.h:je):ut>180?ut-=360:ut<-180&&(ut+=360),function(Qt){return ua(je+ut*Qt,Qe+jt*Qt,tt+St*Qt)+""}}v.interpolateHsl=Dc;function Dc(he,Se){he=v.hsl(he),Se=v.hsl(Se);var je=he.h,Qe=he.s,tt=he.l,ut=Se.h-je,jt=Se.s-Qe,St=Se.l-tt;return isNaN(jt)&&(jt=0,Qe=isNaN(Qe)?Se.s:Qe),isNaN(ut)?(ut=0,je=isNaN(je)?Se.h:je):ut>180?ut-=360:ut<-180&&(ut+=360),function(Qt){return Un(je+ut*Qt,Qe+jt*Qt,tt+St*Qt)+""}}v.interpolateLab=Ic;function Ic(he,Se){he=v.lab(he),Se=v.lab(Se);var je=he.l,Qe=he.a,tt=he.b,ut=Se.l-je,jt=Se.a-Qe,St=Se.b-tt;return function(Qt){return ba(je+ut*Qt,Qe+jt*Qt,tt+St*Qt)+""}}v.interpolateRound=Vu;function Vu(he,Se){return Se-=he,function(je){return Math.round(he+Se*je)}}v.transform=function(he){var Se=k.createElementNS(v.ns.prefix.svg,"g");return(v.transform=function(je){if(je!=null){Se.setAttribute("transform",je);var Qe=Se.transform.baseVal.consolidate()}return new Rc(Qe?Qe.matrix:Fc)})(he)};function Rc(he){var Se=[he.a,he.b],je=[he.c,he.d],Qe=vf(Se),tt=Lu(Se,je),ut=vf(sl(je,Se,-tt))||0;Se[0]*je[1]180?Se+=360:Se-he>180&&(he+=360),Qe.push({i:je.push(Pu(je)+"rotate(",null,")")-2,x:As(he,Se)})):Se&&je.push(Pu(je)+"rotate("+Se+")")}function Hu(he,Se,je,Qe){he!==Se?Qe.push({i:je.push(Pu(je)+"skewX(",null,")")-2,x:As(he,Se)}):Se&&je.push(Pu(je)+"skewX("+Se+")")}function uu(he,Se,je,Qe){if(he[0]!==Se[0]||he[1]!==Se[1]){var tt=je.push(Pu(je)+"scale(",null,",",null,")");Qe.push({i:tt-4,x:As(he[0],Se[0])},{i:tt-2,x:As(he[1],Se[1])})}else(Se[0]!==1||Se[1]!==1)&&je.push(Pu(je)+"scale("+Se+")")}function Gu(he,Se){var je=[],Qe=[];return he=v.transform(he),Se=v.transform(Se),vc(he.translate,Se.translate,je,Qe),zc(he.rotate,Se.rotate,je,Qe),Hu(he.skew,Se.skew,je,Qe),uu(he.scale,Se.scale,je,Qe),he=Se=null,function(tt){for(var ut=-1,jt=Qe.length,St;++ut0?ut=mn:(je.c=null,je.t=NaN,je=null,Se.end({type:"end",alpha:ut=0})):mn>0&&(Se.start({type:"start",alpha:ut=mn}),je=bi(he.tick)),he):ut},he.start=function(){var mn,Ea=bn.length,Oa=Rn.length,Ka=Qe[0],di=Qe[1],Oi,Pi;for(mn=0;mn=0;)ut.push(yr=gr[Qt]),yr.parent=St,yr.depth=St.depth+1;je&&(St.value=0),St.children=gr}else je&&(St.value=+je.call(Qe,St,St.depth)||0),delete St.children;return Ll(tt,function(Kr){var $r,bn;he&&($r=Kr.children)&&$r.sort(he),je&&(bn=Kr.parent)&&(bn.value+=Kr.value)}),jt}return Qe.sort=function(tt){return arguments.length?(he=tt,Qe):he},Qe.children=function(tt){return arguments.length?(Se=tt,Qe):Se},Qe.value=function(tt){return arguments.length?(je=tt,Qe):je},Qe.revalue=function(tt){return je&&(Cl(tt,function(ut){ut.children&&(ut.value=0)}),Ll(tt,function(ut){var jt;ut.children||(ut.value=+je.call(Qe,ut,ut.depth)||0),(jt=ut.parent)&&(jt.value+=ut.value)})),tt},Qe};function cu(he,Se){return v.rebind(he,Se,"sort","children","value"),he.nodes=he,he.links=Tl,he}function Cl(he,Se){for(var je=[he];(he=je.pop())!=null;)if(Se(he),(tt=he.children)&&(Qe=tt.length))for(var Qe,tt;--Qe>=0;)je.push(tt[Qe])}function Ll(he,Se){for(var je=[he],Qe=[];(he=je.pop())!=null;)if(Qe.push(he),(jt=he.children)&&(ut=jt.length))for(var tt=-1,ut,jt;++tttt&&(tt=St),Qe.push(St)}for(jt=0;jtQe&&(je=Se,Qe=tt);return je}function ef(he){return he.reduce(_u,0)}function _u(he,Se){return he+Se[1]}v.layout.histogram=function(){var he=!0,Se=Number,je=Ru,Qe=$u;function tt(ut,$r){for(var St=[],Qt=ut.map(Se,this),gr=je.call(this,Qt,$r),yr=Qe.call(this,gr,Qt,$r),Kr,$r=-1,bn=Qt.length,Rn=yr.length-1,rn=he?1:1/bn,pn;++$r0)for($r=-1;++$r=gr[0]&&pn<=gr[1]&&(Kr=St[v.bisect(yr,pn,1,Rn)-1],Kr.y+=rn,Kr.push(ut[$r]));return St}return tt.value=function(ut){return arguments.length?(Se=ut,tt):Se},tt.range=function(ut){return arguments.length?(je=ar(ut),tt):je},tt.bins=function(ut){return arguments.length?(Qe=typeof ut=="number"?function(jt){return mc(jt,ut)}:ar(ut),tt):Qe},tt.frequency=function(ut){return arguments.length?(he=!!ut,tt):he},tt};function $u(he,Se){return mc(he,Math.ceil(Math.log(Se.length)/Math.LN2+1))}function mc(he,Se){for(var je=-1,Qe=+he[0],tt=(he[1]-Qe)/Se,ut=[];++je<=Se;)ut[je]=tt*je+Qe;return ut}function Ru(he){return[v.min(he),v.max(he)]}v.layout.pack=function(){var he=v.layout.hierarchy().sort(zo),Se=0,je=[1,1],Qe;function tt(ut,jt){var St=he.call(this,ut,jt),Qt=St[0],gr=je[0],yr=je[1],Kr=Qe==null?Math.sqrt:typeof Qe=="function"?Qe:function(){return Qe};if(Qt.x=Qt.y=0,Ll(Qt,function(bn){bn.r=+Kr(bn.value)}),Ll(Qt,tf),Se){var $r=Se*(Qe?1:Math.max(2*Qt.r/gr,2*Qt.r/yr))/2;Ll(Qt,function(bn){bn.r+=$r}),Ll(Qt,tf),Ll(Qt,function(bn){bn.r-=$r})}return yf(Qt,gr/2,yr/2,Qe?1:1/Math.max(2*Qt.r/gr,2*Qt.r/yr)),St}return tt.size=function(ut){return arguments.length?(je=ut,tt):je},tt.radius=function(ut){return arguments.length?(Qe=ut==null||typeof ut=="function"?ut:+ut,tt):Qe},tt.padding=function(ut){return arguments.length?(Se=+ut,tt):Se},cu(tt,he)};function zo(he,Se){return he.value-Se.value}function gc(he,Se){var je=he._pack_next;he._pack_next=Se,Se._pack_prev=he,Se._pack_next=je,je._pack_prev=Se}function Vf(he,Se){he._pack_next=Se,Se._pack_prev=he}function mf(he,Se){var je=Se.x-he.x,Qe=Se.y-he.y,tt=he.r+Se.r;return .999*tt*tt>je*je+Qe*Qe}function tf(he){if(!(Se=he.children)||!($r=Se.length))return;var Se,je=1/0,Qe=-1/0,tt=1/0,ut=-1/0,jt,St,Qt,gr,yr,Kr,$r;function bn(mn){je=Math.min(mn.x-mn.r,je),Qe=Math.max(mn.x+mn.r,Qe),tt=Math.min(mn.y-mn.r,tt),ut=Math.max(mn.y+mn.r,ut)}if(Se.forEach(gf),jt=Se[0],jt.x=-jt.r,jt.y=0,bn(jt),$r>1&&(St=Se[1],St.x=St.r,St.y=0,bn(St),$r>2))for(Qt=Se[2],ul(jt,St,Qt),bn(Qt),gc(jt,Qt),jt._pack_prev=Qt,gc(Qt,St),St=jt._pack_next,gr=3;gr<$r;gr++){ul(jt,St,Qt=Se[gr]);var Rn=0,rn=1,pn=1;for(yr=St._pack_next;yr!==St;yr=yr._pack_next,rn++)if(mf(yr,Qt)){Rn=1;break}if(Rn==1)for(Kr=jt._pack_prev;Kr!==yr._pack_prev&&!mf(Kr,Qt);Kr=Kr._pack_prev,pn++);Rn?(rnpn.x&&(pn=Ea),Ea.depth>xn.depth&&(xn=Ea)});var Bn=Se(rn,pn)/2-rn.x,Fn=je[0]/(pn.x+Se(pn,rn)/2+Bn),mn=je[1]/(xn.depth||1);Cl(bn,function(Ea){Ea.x=(Ea.x+Bn)*Fn,Ea.y=Ea.depth*mn})}return $r}function ut(yr){for(var Kr={A:null,children:[yr]},$r=[Kr],bn;(bn=$r.pop())!=null;)for(var Rn=bn.children,rn,pn=0,xn=Rn.length;pn0&&(bc(zt(rn,yr,$r),yr,Ea),xn+=Ea,Bn+=Ea),Fn+=rn.m,xn+=bn.m,mn+=pn.m,Bn+=Rn.m;rn&&!_c(Rn)&&(Rn.t=rn,Rn.m+=Fn-Bn),bn&&!yc(pn)&&(pn.t=bn,pn.m+=xn-mn,$r=yr)}return $r}function gr(yr){yr.x*=je[0],yr.y=yr.depth*je[1]}return tt.separation=function(yr){return arguments.length?(Se=yr,tt):Se},tt.size=function(yr){return arguments.length?(Qe=(je=yr)==null?gr:null,tt):Qe?null:je},tt.nodeSize=function(yr){return arguments.length?(Qe=(je=yr)==null?null:gr,tt):Qe?je:null},cu(tt,he)};function Pl(he,Se){return he.parent==Se.parent?1:2}function yc(he){var Se=he.children;return Se.length?Se[0]:he.t}function _c(he){var Se=he.children,je;return(je=Se.length)?Se[je-1]:he.t}function bc(he,Se,je){var Qe=je/(Se.i-he.i);Se.c-=Qe,Se.s+=je,he.c+=Qe,Se.z+=je,Se.m+=je}function ac(he){for(var Se=0,je=0,Qe=he.children,tt=Qe.length,ut;--tt>=0;)ut=Qe[tt],ut.z+=Se,ut.m+=Se,Se+=ut.s+(je+=ut.c)}function zt(he,Se,je){return he.a.parent===Se.parent?he.a:je}v.layout.cluster=function(){var he=v.layout.hierarchy().sort(null).value(null),Se=Pl,je=[1,1],Qe=!1;function tt(ut,jt){var St=he.call(this,ut,jt),Qt=St[0],gr,yr=0;Ll(Qt,function(rn){var pn=rn.children;pn&&pn.length?(rn.x=Br(pn),rn.y=rr(pn)):(rn.x=gr?yr+=Se(rn,gr):0,rn.y=0,gr=rn)});var Kr=wr(Qt),$r=un(Qt),bn=Kr.x-Se(Kr,$r)/2,Rn=$r.x+Se($r,Kr)/2;return Ll(Qt,Qe?function(rn){rn.x=(rn.x-Qt.x)*je[0],rn.y=(Qt.y-rn.y)*je[1]}:function(rn){rn.x=(rn.x-bn)/(Rn-bn)*je[0],rn.y=(1-(Qt.y?rn.y/Qt.y:1))*je[1]}),St}return tt.separation=function(ut){return arguments.length?(Se=ut,tt):Se},tt.size=function(ut){return arguments.length?(Qe=(je=ut)==null,tt):Qe?null:je},tt.nodeSize=function(ut){return arguments.length?(Qe=(je=ut)!=null,tt):Qe?je:null},cu(tt,he)};function rr(he){return 1+v.max(he,function(Se){return Se.y})}function Br(he){return he.reduce(function(Se,je){return Se+je.x},0)/he.length}function wr(he){var Se=he.children;return Se&&Se.length?wr(Se[0]):he}function un(he){var Se=he.children,je;return Se&&(je=Se.length)?un(Se[je-1]):he}v.layout.treemap=function(){var he=v.layout.hierarchy(),Se=Math.round,je=[1,1],Qe=null,tt=Ln,ut=!1,jt,St="squarify",Qt=.5*(1+Math.sqrt(5));function gr(rn,pn){for(var xn=-1,Bn=rn.length,Fn,mn;++xn0;)Bn.push(mn=Fn[di-1]),Bn.area+=mn.area,St!=="squarify"||(Oa=$r(Bn,Ka))<=Ea?(Fn.pop(),Ea=Oa):(Bn.area-=Bn.pop().area,bn(Bn,Ka,xn,!1),Ka=Math.min(xn.dx,xn.dy),Bn.length=Bn.area=0,Ea=1/0);Bn.length&&(bn(Bn,Ka,xn,!0),Bn.length=Bn.area=0),pn.forEach(yr)}}function Kr(rn){var pn=rn.children;if(pn&&pn.length){var xn=tt(rn),Bn=pn.slice(),Fn,mn=[];for(gr(Bn,xn.dx*xn.dy/rn.value),mn.area=0;Fn=Bn.pop();)mn.push(Fn),mn.area+=Fn.area,Fn.z!=null&&(bn(mn,Fn.z?xn.dx:xn.dy,xn,!Bn.length),mn.length=mn.area=0);pn.forEach(Kr)}}function $r(rn,pn){for(var xn=rn.area,Bn,Fn=0,mn=1/0,Ea=-1,Oa=rn.length;++EaFn&&(Fn=Bn));return xn*=xn,pn*=pn,xn?Math.max(pn*Fn*Qt/xn,xn/(pn*mn*Qt)):1/0}function bn(rn,pn,xn,Bn){var Fn=-1,mn=rn.length,Ea=xn.x,Oa=xn.y,Ka=pn?Se(rn.area/pn):0,di;if(pn==xn.dx){for((Bn||Ka>xn.dy)&&(Ka=xn.dy);++Fnxn.dx)&&(Ka=xn.dx);++Fn1);return he+Se*Qe*Math.sqrt(-2*Math.log(ut)/ut)}},logNormal:function(){var he=v.random.normal.apply(v,arguments);return function(){return Math.exp(he())}},bates:function(he){var Se=v.random.irwinHall(he);return function(){return Se()/he}},irwinHall:function(he){return function(){for(var Se=0,je=0;je2?La:Pa,gr=Qe?gu:Zc;return tt=Qt(he,Se,gr,je),ut=Qt(Se,he,gr,Su),St}function St(Qt){return tt(Qt)}return St.invert=function(Qt){return ut(Qt)},St.domain=function(Qt){return arguments.length?(he=Qt.map(Number),jt()):he},St.range=function(Qt){return arguments.length?(Se=Qt,jt()):Se},St.rangeRound=function(Qt){return St.range(Qt).interpolate(Vu)},St.clamp=function(Qt){return arguments.length?(Qe=Qt,jt()):Qe},St.interpolate=function(Qt){return arguments.length?(je=Qt,jt()):je},St.ticks=function(Qt){return _i(he,Qt)},St.tickFormat=function(Qt,gr){return d3_scale_linearTickFormat(he,Qt,gr)},St.nice=function(Qt){return Ni(he,Qt),jt()},St.copy=function(){return qa(he,Se,je,Qe)},jt()}function Bi(he,Se){return v.rebind(he,Se,"range","rangeRound","interpolate","clamp")}function Ni(he,Se){return Gn(he,oa(Zi(he,Se)[2])),Gn(he,oa(Zi(he,Se)[2])),he}function Zi(he,Se){Se==null&&(Se=10);var je=Jn(he),Qe=je[1]-je[0],tt=Math.pow(10,Math.floor(Math.log(Qe/Se)/Math.LN10)),ut=Se/Qe*tt;return ut<=.15?tt*=10:ut<=.35?tt*=5:ut<=.75&&(tt*=2),je[0]=Math.ceil(je[0]/tt)*tt,je[1]=Math.floor(je[1]/tt)*tt+tt*.5,je[2]=tt,je}function _i(he,Se){return v.range.apply(v,Zi(he,Se))}var Va={s:1,g:1,p:1,r:1,e:1};function Ga(he){return-Math.floor(Math.log(he)/Math.LN10+.01)}function oo(he,Se){var je=Ga(Se[2]);return he in Va?Math.abs(je-Ga(Math.max(i(Se[0]),i(Se[1]))))+ +(he!=="e"):je-(he==="%")*2}v.scale.log=function(){return go(v.scale.linear().domain([0,1]),10,!0,[1,10])};function go(he,Se,je,Qe){function tt(St){return(je?Math.log(St<0?0:St):-Math.log(St>0?0:-St))/Math.log(Se)}function ut(St){return je?Math.pow(Se,St):-Math.pow(Se,-St)}function jt(St){return he(tt(St))}return jt.invert=function(St){return ut(he.invert(St))},jt.domain=function(St){return arguments.length?(je=St[0]>=0,he.domain((Qe=St.map(Number)).map(tt)),jt):Qe},jt.base=function(St){return arguments.length?(Se=+St,he.domain(Qe.map(tt)),jt):Se},jt.nice=function(){var St=Gn(Qe.map(tt),je?Math:Vo);return he.domain(St),Qe=St.map(ut),jt},jt.ticks=function(){var St=Jn(Qe),Qt=[],gr=St[0],yr=St[1],Kr=Math.floor(tt(gr)),$r=Math.ceil(tt(yr)),bn=Se%1?2:Se;if(isFinite($r-Kr)){if(je){for(;Kr<$r;Kr++)for(var Rn=1;Rn0;Rn--)Qt.push(ut(Kr)*Rn);for(Kr=0;Qt[Kr]yr;$r--);Qt=Qt.slice(Kr,$r)}return Qt},jt.copy=function(){return go(he.copy(),Se,je,Qe)},Bi(jt,he)}var Vo={floor:function(he){return-Math.ceil(-he)},ceil:function(he){return-Math.floor(-he)}};v.scale.pow=function(){return Wo(v.scale.linear(),1,[0,1])};function Wo(he,Se,je){var Qe=Yo(Se),tt=Yo(1/Se);function ut(jt){return he(Qe(jt))}return ut.invert=function(jt){return tt(he.invert(jt))},ut.domain=function(jt){return arguments.length?(he.domain((je=jt.map(Number)).map(Qe)),ut):je},ut.ticks=function(jt){return _i(je,jt)},ut.tickFormat=function(jt,St){return d3_scale_linearTickFormat(je,jt,St)},ut.nice=function(jt){return ut.domain(Ni(je,jt))},ut.exponent=function(jt){return arguments.length?(Qe=Yo(Se=jt),tt=Yo(1/Se),he.domain(je.map(Qe)),ut):Se},ut.copy=function(){return Wo(he.copy(),Se,je)},Bi(ut,he)}function Yo(he){return function(Se){return Se<0?-Math.pow(-Se,he):Math.pow(Se,he)}}v.scale.sqrt=function(){return v.scale.pow().exponent(.5)},v.scale.ordinal=function(){return as([],{t:"range",a:[[]]})};function as(he,Se){var je,Qe,tt;function ut(St){return Qe[((je.get(St)||(Se.t==="range"?je.set(St,he.push(St)):NaN))-1)%Qe.length]}function jt(St,Qt){return v.range(he.length).map(function(gr){return St+Qt*gr})}return ut.domain=function(St){if(!arguments.length)return he;he=[],je=new M;for(var Qt=-1,gr=St.length,yr;++Qt0?je[ut-1]:he[0],ut$r?0:1;if(yr=$e)return Qt(yr,Rn)+(gr?Qt(gr,1-Rn):"")+"Z";var rn,pn,xn,Bn,Fn=0,mn=0,Ea,Oa,Ka,di,Oi,Pi,ko,de,y=[];if((Bn=(+jt.apply(this,arguments)||0)/2)&&(xn=Qe===Nl?Math.sqrt(gr*gr+yr*yr):+Qe.apply(this,arguments),Rn||(mn*=-1),yr&&(mn=Vt(xn/yr*Math.sin(Bn))),gr&&(Fn=Vt(xn/gr*Math.sin(Bn)))),yr){Ea=yr*Math.cos(Kr+mn),Oa=yr*Math.sin(Kr+mn),Ka=yr*Math.cos($r-mn),di=yr*Math.sin($r-mn);var O=Math.abs($r-Kr-2*mn)<=Be?0:1;if(mn&&ic(Ea,Oa,Ka,di)===Rn^O){var ie=(Kr+$r)/2;Ea=yr*Math.cos(ie),Oa=yr*Math.sin(ie),Ka=di=null}}else Ea=Oa=0;if(gr){Oi=gr*Math.cos($r-Fn),Pi=gr*Math.sin($r-Fn),ko=gr*Math.cos(Kr+Fn),de=gr*Math.sin(Kr+Fn);var ce=Math.abs(Kr-$r+2*Fn)<=Be?0:1;if(Fn&&ic(Oi,Pi,ko,de)===1-Rn^ce){var _e=(Kr+$r)/2;Oi=gr*Math.cos(_e),Pi=gr*Math.sin(_e),ko=de=null}}else Oi=Pi=0;if(bn>ht&&(rn=Math.min(Math.abs(yr-gr)/2,+je.apply(this,arguments)))>.001){pn=gr0?0:1}function Oc(he,Se,je,Qe,tt){var ut=he[0]-Se[0],jt=he[1]-Se[1],St=(tt?Qe:-Qe)/Math.sqrt(ut*ut+jt*jt),Qt=St*jt,gr=-St*ut,yr=he[0]+Qt,Kr=he[1]+gr,$r=Se[0]+Qt,bn=Se[1]+gr,Rn=(yr+$r)/2,rn=(Kr+bn)/2,pn=$r-yr,xn=bn-Kr,Bn=pn*pn+xn*xn,Fn=je-Qe,mn=yr*bn-$r*Kr,Ea=(xn<0?-1:1)*Math.sqrt(Math.max(0,Fn*Fn*Bn-mn*mn)),Oa=(mn*xn-pn*Ea)/Bn,Ka=(-mn*pn-xn*Ea)/Bn,di=(mn*xn+pn*Ea)/Bn,Oi=(-mn*pn+xn*Ea)/Bn,Pi=Oa-Rn,ko=Ka-rn,de=di-Rn,y=Oi-rn;return Pi*Pi+ko*ko>de*de+y*y&&(Oa=di,Ka=Oi),[[Oa-Qt,Ka-gr],[Oa*je/Fn,Ka*je/Fn]]}function Zu(){return!0}function hu(he){var Se=Ao,je=ro,Qe=Zu,tt=Ql,ut=tt.key,jt=.7;function St(Qt){var gr=[],yr=[],Kr=-1,$r=Qt.length,bn,Rn=ar(Se),rn=ar(je);function pn(){gr.push("M",tt(he(yr),jt))}for(;++Kr<$r;)Qe.call(this,bn=Qt[Kr],Kr)?yr.push([+Rn.call(this,bn,Kr),+rn.call(this,bn,Kr)]):yr.length&&(pn(),yr=[]);return yr.length&&pn(),gr.length?gr.join(""):null}return St.x=function(Qt){return arguments.length?(Se=Qt,St):Se},St.y=function(Qt){return arguments.length?(je=Qt,St):je},St.defined=function(Qt){return arguments.length?(Qe=Qt,St):Qe},St.interpolate=function(Qt){return arguments.length?(typeof Qt=="function"?ut=tt=Qt:ut=(tt=Jl.get(Qt)||Ql).key,St):ut},St.tension=function(Qt){return arguments.length?(jt=Qt,St):jt},St}v.svg.line=function(){return hu(R)};var Jl=v.map({linear:Ql,"linear-closed":xu,step:rf,"step-before":Ff,"step-after":xc,basis:wu,"basis-open":jl,"basis-closed":Ul,bundle:Ci,cardinal:Bu,"cardinal-open":rl,"cardinal-closed":Ol,monotone:Dr});Jl.forEach(function(he,Se){Se.key=he,Se.closed=/-closed$/.test(he)});function Ql(he){return he.length>1?he.join("L"):he+"Z"}function xu(he){return he.join("L")+"Z"}function rf(he){for(var Se=0,je=he.length,Qe=he[0],tt=[Qe[0],",",Qe[1]];++Se1&&tt.push("H",Qe[0]),tt.join("")}function Ff(he){for(var Se=0,je=he.length,Qe=he[0],tt=[Qe[0],",",Qe[1]];++Se1){St=Se[1],ut=he[Qt],Qt++,Qe+="C"+(tt[0]+jt[0])+","+(tt[1]+jt[1])+","+(ut[0]-St[0])+","+(ut[1]-St[1])+","+ut[0]+","+ut[1];for(var gr=2;gr9&&(ut=je*3/Math.sqrt(ut),jt[St]=ut*Qe,jt[St+1]=ut*tt));for(St=-1;++St<=Qt;)ut=(he[Math.min(Qt,St+1)][0]-he[Math.max(0,St-1)][0])/(6*(1+jt[St]*jt[St])),Se.push([ut||0,jt[St]*ut||0]);return Se}function Dr(he){return he.length<3?Ql(he):he[0]+nf(he,Yt(he))}v.svg.line.radial=function(){var he=hu(Ur);return he.radius=he.x,delete he.x,he.angle=he.y,delete he.y,he};function Ur(he){for(var Se,je=-1,Qe=he.length,tt,ut;++jeBe)+",1 "+Kr}function gr(yr,Kr,$r,bn){return"Q 0,0 "+bn}return ut.radius=function(yr){return arguments.length?(je=ar(yr),ut):je},ut.source=function(yr){return arguments.length?(he=ar(yr),ut):he},ut.target=function(yr){return arguments.length?(Se=ar(yr),ut):Se},ut.startAngle=function(yr){return arguments.length?(Qe=ar(yr),ut):Qe},ut.endAngle=function(yr){return arguments.length?(tt=ar(yr),ut):tt},ut};function gn(he){return he.radius}v.svg.diagonal=function(){var he=Wr,Se=sn,je=Cn;function Qe(tt,ut){var jt=he.call(this,tt,ut),St=Se.call(this,tt,ut),Qt=(jt.y+St.y)/2,gr=[jt,{x:jt.x,y:Qt},{x:St.x,y:Qt},St];return gr=gr.map(je),"M"+gr[0]+"C"+gr[1]+" "+gr[2]+" "+gr[3]}return Qe.source=function(tt){return arguments.length?(he=ar(tt),Qe):he},Qe.target=function(tt){return arguments.length?(Se=ar(tt),Qe):Se},Qe.projection=function(tt){return arguments.length?(je=tt,Qe):je},Qe};function Cn(he){return[he.x,he.y]}v.svg.diagonal.radial=function(){var he=v.svg.diagonal(),Se=Cn,je=he.projection;return he.projection=function(Qe){return arguments.length?je(Zn(Se=Qe)):Se},he};function Zn(he){return function(){var Se=he.apply(this,arguments),je=Se[0],Qe=Se[1]-Ze;return[je*Math.cos(Qe),je*Math.sin(Qe)]}}v.svg.symbol=function(){var he=Na,Se=ya;function je(Qe,tt){return(Yi.get(he.call(this,Qe,tt))||wi)(Se.call(this,Qe,tt))}return je.type=function(Qe){return arguments.length?(he=ar(Qe),je):he},je.size=function(Qe){return arguments.length?(Se=ar(Qe),je):Se},je};function ya(){return 64}function Na(){return"circle"}function wi(he){var Se=Math.sqrt(he/Be);return"M0,"+Se+"A"+Se+","+Se+" 0 1,1 0,"+-Se+"A"+Se+","+Se+" 0 1,1 0,"+Se+"Z"}var Yi=v.map({circle:wi,cross:function(he){var Se=Math.sqrt(he/5)/2;return"M"+-3*Se+","+-Se+"H"+-Se+"V"+-3*Se+"H"+Se+"V"+-Se+"H"+3*Se+"V"+Se+"H"+Se+"V"+3*Se+"H"+-Se+"V"+Se+"H"+-3*Se+"Z"},diamond:function(he){var Se=Math.sqrt(he/(2*_o)),je=Se*_o;return"M0,"+-Se+"L"+je+",0 0,"+Se+" "+-je+",0Z"},square:function(he){var Se=Math.sqrt(he)/2;return"M"+-Se+","+-Se+"L"+Se+","+-Se+" "+Se+","+Se+" "+-Se+","+Se+"Z"},"triangle-down":function(he){var Se=Math.sqrt(he/Ti),je=Se*Ti/2;return"M0,"+je+"L"+Se+","+-je+" "+-Se+","+-je+"Z"},"triangle-up":function(he){var Se=Math.sqrt(he/Ti),je=Se*Ti/2;return"M0,"+-je+"L"+Se+","+je+" "+-Se+","+je+"Z"}});v.svg.symbolTypes=Yi.keys();var Ti=Math.sqrt(3),_o=Math.tan(30*Je);q.transition=function(he){for(var Se=cl||++Es,je=Li(he),Qe=[],tt,ut,jt=ql||{time:Date.now(),ease:nc,delay:0,duration:250},St=-1,Qt=this.length;++St0;)Kr[--Bn].call(he,xn);if(pn>=1)return jt.event&&jt.event.end.call(he,he.__data__,Se),--ut.count?delete ut[Qe]:delete he[je],1}jt||(St=tt.time,Qt=bi($r,0,St),jt=ut[Qe]={tween:new M,time:St,timer:Qt,delay:tt.delay,duration:tt.duration,ease:tt.ease,index:Se},tt=null,++ut.count)}v.svg.axis=function(){var he=v.scale.linear(),Se=fl,je=6,Qe=6,tt=3,ut=[10],jt=null,St;function Qt(gr){gr.each(function(){var yr=v.select(this),Kr=this.__chart__||he,$r=this.__chart__=he.copy(),bn=jt??($r.ticks?$r.ticks.apply($r,ut):$r.domain()),Rn=St??($r.tickFormat?$r.tickFormat.apply($r,ut):R),rn=yr.selectAll(".tick").data(bn,$r),pn=rn.enter().insert("g",".domain").attr("class","tick").style("opacity",ht),xn=v.transition(rn.exit()).style("opacity",ht).remove(),Bn=v.transition(rn.order()).style("opacity",1),Fn=Math.max(je,0)+tt,mn,Ea=ca($r),Oa=yr.selectAll(".domain").data([0]),Ka=(Oa.enter().append("path").attr("class","domain"),v.transition(Oa));pn.append("line"),pn.append("text");var di=pn.select("line"),Oi=Bn.select("line"),Pi=rn.select("text").text(Rn),ko=pn.select("text"),de=Bn.select("text"),y=Se==="top"||Se==="left"?-1:1,O,ie,ce,_e;if(Se==="bottom"||Se==="top"?(mn=tu,O="x",ce="y",ie="x2",_e="y2",Pi.attr("dy",y<0?"0em":".71em").style("text-anchor","middle"),Ka.attr("d","M"+Ea[0]+","+y*Qe+"V0H"+Ea[1]+"V"+y*Qe)):(mn=Bs,O="y",ce="x",ie="y2",_e="x2",Pi.attr("dy",".32em").style("text-anchor",y<0?"end":"start"),Ka.attr("d","M"+y*Qe+","+Ea[0]+"H0V"+Ea[1]+"H"+y*Qe)),di.attr(_e,y*je),ko.attr(ce,y*Fn),Oi.attr(ie,0).attr(_e,y*je),de.attr(O,0).attr(ce,y*Fn),$r.rangeBand){var De=$r,Ne=De.rangeBand()/2;Kr=$r=function(Ye){return De(Ye)+Ne}}else Kr.rangeBand?Kr=$r:xn.call(mn,$r,Kr);pn.call(mn,Kr,$r),Bn.call(mn,$r,$r)})}return Qt.scale=function(gr){return arguments.length?(he=gr,Qt):he},Qt.orient=function(gr){return arguments.length?(Se=gr in Ku?gr+"":fl,Qt):Se},Qt.ticks=function(){return arguments.length?(ut=E(arguments),Qt):ut},Qt.tickValues=function(gr){return arguments.length?(jt=gr,Qt):jt},Qt.tickFormat=function(gr){return arguments.length?(St=gr,Qt):St},Qt.tickSize=function(gr){var yr=arguments.length;return yr?(je=+gr,Qe=+arguments[yr-1],Qt):je},Qt.innerTickSize=function(gr){return arguments.length?(je=+gr,Qt):je},Qt.outerTickSize=function(gr){return arguments.length?(Qe=+gr,Qt):Qe},Qt.tickPadding=function(gr){return arguments.length?(tt=+gr,Qt):tt},Qt.tickSubdivide=function(){return arguments.length&&Qt},Qt};var fl="bottom",Ku={top:1,right:1,bottom:1,left:1};function tu(he,Se,je){he.attr("transform",function(Qe){var tt=Se(Qe);return"translate("+(isFinite(tt)?tt:je(Qe))+",0)"})}function Bs(he,Se,je){he.attr("transform",function(Qe){var tt=Se(Qe);return"translate(0,"+(isFinite(tt)?tt:je(Qe))+")"})}v.svg.brush=function(){var he=ae(yr,"brushstart","brush","brushend"),Se=null,je=null,Qe=[0,0],tt=[0,0],ut,jt,St=!0,Qt=!0,gr=du[0];function yr(rn){rn.each(function(){var pn=v.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Rn).on("touchstart.brush",Rn),xn=pn.selectAll(".background").data([0]);xn.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),pn.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Bn=pn.selectAll(".resize").data(gr,R);Bn.exit().remove(),Bn.enter().append("g").attr("class",function(Oa){return"resize "+Oa}).style("cursor",function(Oa){return oc[Oa]}).append("rect").attr("x",function(Oa){return/[ew]$/.test(Oa)?-3:null}).attr("y",function(Oa){return/^[ns]/.test(Oa)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Bn.style("display",yr.empty()?"none":null);var Fn=v.transition(pn),mn=v.transition(xn),Ea;Se&&(Ea=ca(Se),mn.attr("x",Ea[0]).attr("width",Ea[1]-Ea[0]),$r(Fn)),je&&(Ea=ca(je),mn.attr("y",Ea[0]).attr("height",Ea[1]-Ea[0]),bn(Fn)),Kr(Fn)})}yr.event=function(rn){rn.each(function(){var pn=he.of(this,arguments),xn={x:Qe,y:tt,i:ut,j:jt},Bn=this.__chart__||xn;this.__chart__=xn,cl?v.select(this).transition().each("start.brush",function(){ut=Bn.i,jt=Bn.j,Qe=Bn.x,tt=Bn.y,pn({type:"brushstart"})}).tween("brush:brush",function(){var Fn=Eu(Qe,xn.x),mn=Eu(tt,xn.y);return ut=jt=null,function(Ea){Qe=xn.x=Fn(Ea),tt=xn.y=mn(Ea),pn({type:"brush",mode:"resize"})}}).each("end.brush",function(){ut=xn.i,jt=xn.j,pn({type:"brush",mode:"resize"}),pn({type:"brushend"})}):(pn({type:"brushstart"}),pn({type:"brush",mode:"resize"}),pn({type:"brushend"}))})};function Kr(rn){rn.selectAll(".resize").attr("transform",function(pn){return"translate("+Qe[+/e$/.test(pn)]+","+tt[+/^s/.test(pn)]+")"})}function $r(rn){rn.select(".extent").attr("x",Qe[0]),rn.selectAll(".extent,.n>rect,.s>rect").attr("width",Qe[1]-Qe[0])}function bn(rn){rn.select(".extent").attr("y",tt[0]),rn.selectAll(".extent,.e>rect,.w>rect").attr("height",tt[1]-tt[0])}function Rn(){var rn=this,pn=v.select(v.event.target),xn=he.of(rn,arguments),Bn=v.select(rn),Fn=pn.datum(),mn=!/^(n|s)$/.test(Fn)&&Se,Ea=!/^(e|w)$/.test(Fn)&&je,Oa=pn.classed("extent"),Ka=Zt(rn),di,Oi=v.mouse(rn),Pi,ko=v.select(e(rn)).on("keydown.brush",O).on("keyup.brush",ie);if(v.event.changedTouches?ko.on("touchmove.brush",ce).on("touchend.brush",De):ko.on("mousemove.brush",ce).on("mouseup.brush",De),Bn.interrupt().selectAll("*").interrupt(),Oa)Oi[0]=Qe[0]-Oi[0],Oi[1]=tt[0]-Oi[1];else if(Fn){var de=+/w$/.test(Fn),y=+/^n/.test(Fn);Pi=[Qe[1-de]-Oi[0],tt[1-y]-Oi[1]],Oi[0]=Qe[de],Oi[1]=tt[y]}else v.event.altKey&&(di=Oi.slice());Bn.style("pointer-events","none").selectAll(".resize").style("display",null),v.select("body").style("cursor",pn.style("cursor")),xn({type:"brushstart"}),ce();function O(){v.event.keyCode==32&&(Oa||(di=null,Oi[0]-=Qe[1],Oi[1]-=tt[1],Oa=2),Q())}function ie(){v.event.keyCode==32&&Oa==2&&(Oi[0]+=Qe[1],Oi[1]+=tt[1],Oa=0,Q())}function ce(){var Ne=v.mouse(rn),Ye=!1;Pi&&(Ne[0]+=Pi[0],Ne[1]+=Pi[1]),Oa||(v.event.altKey?(di||(di=[(Qe[0]+Qe[1])/2,(tt[0]+tt[1])/2]),Oi[0]=Qe[+(Ne[0]0))return At;do At.push(Kt=new Date(+gt)),Te(gt,Tt),se(gt);while(Kt=mt)for(;se(mt),!gt(mt);)mt.setTime(mt-1)},function(mt,Tt){if(mt>=mt)if(Tt<0)for(;++Tt<=0;)for(;Te(mt,-1),!gt(mt););else for(;--Tt>=0;)for(;Te(mt,1),!gt(mt););})},Fe&&(Ge.count=function(gt,mt){return x.setTime(+gt),E.setTime(+mt),se(x),se(E),Math.floor(Fe(x,E))},Ge.every=function(gt){return gt=Math.floor(gt),!isFinite(gt)||!(gt>0)?null:gt>1?Ge.filter(We?function(mt){return We(mt)%gt===0}:function(mt){return Ge.count(0,mt)%gt===0}):Ge}),Ge}var l=k(function(){},function(se,Te){se.setTime(+se+Te)},function(se,Te){return Te-se});l.every=function(se){return se=Math.floor(se),!isFinite(se)||!(se>0)?null:se>1?k(function(Te){Te.setTime(Math.floor(Te/se)*se)},function(Te,Fe){Te.setTime(+Te+Fe*se)},function(Te,Fe){return(Fe-Te)/se}):l};var e=l.range,t=1e3,a=6e4,r=36e5,n=864e5,o=6048e5,s=k(function(se){se.setTime(se-se.getMilliseconds())},function(se,Te){se.setTime(+se+Te*t)},function(se,Te){return(Te-se)/t},function(se){return se.getUTCSeconds()}),c=s.range,m=k(function(se){se.setTime(se-se.getMilliseconds()-se.getSeconds()*t)},function(se,Te){se.setTime(+se+Te*a)},function(se,Te){return(Te-se)/a},function(se){return se.getMinutes()}),h=m.range,p=k(function(se){se.setTime(se-se.getMilliseconds()-se.getSeconds()*t-se.getMinutes()*a)},function(se,Te){se.setTime(+se+Te*r)},function(se,Te){return(Te-se)/r},function(se){return se.getHours()}),g=p.range,i=k(function(se){se.setHours(0,0,0,0)},function(se,Te){se.setDate(se.getDate()+Te)},function(se,Te){return(Te-se-(Te.getTimezoneOffset()-se.getTimezoneOffset())*a)/n},function(se){return se.getDate()-1}),w=i.range;function S(se){return k(function(Te){Te.setDate(Te.getDate()-(Te.getDay()+7-se)%7),Te.setHours(0,0,0,0)},function(Te,Fe){Te.setDate(Te.getDate()+Fe*7)},function(Te,Fe){return(Fe-Te-(Fe.getTimezoneOffset()-Te.getTimezoneOffset())*a)/o})}var M=S(0),C=S(1),_=S(2),T=S(3),f=S(4),u=S(5),A=S(6),b=M.range,z=C.range,I=_.range,N=T.range,R=f.range,B=u.range,F=A.range,P=k(function(se){se.setDate(1),se.setHours(0,0,0,0)},function(se,Te){se.setMonth(se.getMonth()+Te)},function(se,Te){return Te.getMonth()-se.getMonth()+(Te.getFullYear()-se.getFullYear())*12},function(se){return se.getMonth()}),j=P.range,U=k(function(se){se.setMonth(0,1),se.setHours(0,0,0,0)},function(se,Te){se.setFullYear(se.getFullYear()+Te)},function(se,Te){return Te.getFullYear()-se.getFullYear()},function(se){return se.getFullYear()});U.every=function(se){return!isFinite(se=Math.floor(se))||!(se>0)?null:k(function(Te){Te.setFullYear(Math.floor(Te.getFullYear()/se)*se),Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,Fe){Te.setFullYear(Te.getFullYear()+Fe*se)})};var Z=U.range,Q=k(function(se){se.setUTCSeconds(0,0)},function(se,Te){se.setTime(+se+Te*a)},function(se,Te){return(Te-se)/a},function(se){return se.getUTCMinutes()}),re=Q.range,ae=k(function(se){se.setUTCMinutes(0,0,0)},function(se,Te){se.setTime(+se+Te*r)},function(se,Te){return(Te-se)/r},function(se){return se.getUTCHours()}),oe=ae.range,H=k(function(se){se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCDate(se.getUTCDate()+Te)},function(se,Te){return(Te-se)/n},function(se){return se.getUTCDate()-1}),X=H.range;function K(se){return k(function(Te){Te.setUTCDate(Te.getUTCDate()-(Te.getUTCDay()+7-se)%7),Te.setUTCHours(0,0,0,0)},function(Te,Fe){Te.setUTCDate(Te.getUTCDate()+Fe*7)},function(Te,Fe){return(Fe-Te)/o})}var G=K(0),Y=K(1),q=K(2),$=K(3),ee=K(4),ne=K(5),fe=K(6),ye=G.range,xe=Y.range,Ae=q.range,Me=$.range,Ie=ee.range,Ue=ne.range,qe=fe.range,ke=k(function(se){se.setUTCDate(1),se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCMonth(se.getUTCMonth()+Te)},function(se,Te){return Te.getUTCMonth()-se.getUTCMonth()+(Te.getUTCFullYear()-se.getUTCFullYear())*12},function(se){return se.getUTCMonth()}),ge=ke.range,ue=k(function(se){se.setUTCMonth(0,1),se.setUTCHours(0,0,0,0)},function(se,Te){se.setUTCFullYear(se.getUTCFullYear()+Te)},function(se,Te){return Te.getUTCFullYear()-se.getUTCFullYear()},function(se){return se.getUTCFullYear()});ue.every=function(se){return!isFinite(se=Math.floor(se))||!(se>0)?null:k(function(Te){Te.setUTCFullYear(Math.floor(Te.getUTCFullYear()/se)*se),Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,Fe){Te.setUTCFullYear(Te.getUTCFullYear()+Fe*se)})};var ve=ue.range;v.timeDay=i,v.timeDays=w,v.timeFriday=u,v.timeFridays=B,v.timeHour=p,v.timeHours=g,v.timeInterval=k,v.timeMillisecond=l,v.timeMilliseconds=e,v.timeMinute=m,v.timeMinutes=h,v.timeMonday=C,v.timeMondays=z,v.timeMonth=P,v.timeMonths=j,v.timeSaturday=A,v.timeSaturdays=F,v.timeSecond=s,v.timeSeconds=c,v.timeSunday=M,v.timeSundays=b,v.timeThursday=f,v.timeThursdays=R,v.timeTuesday=_,v.timeTuesdays=I,v.timeWednesday=T,v.timeWednesdays=N,v.timeWeek=M,v.timeWeeks=b,v.timeYear=U,v.timeYears=Z,v.utcDay=H,v.utcDays=X,v.utcFriday=ne,v.utcFridays=Ue,v.utcHour=ae,v.utcHours=oe,v.utcMillisecond=l,v.utcMilliseconds=e,v.utcMinute=Q,v.utcMinutes=re,v.utcMonday=Y,v.utcMondays=xe,v.utcMonth=ke,v.utcMonths=ge,v.utcSaturday=fe,v.utcSaturdays=qe,v.utcSecond=s,v.utcSeconds=c,v.utcSunday=G,v.utcSundays=ye,v.utcThursday=ee,v.utcThursdays=Ie,v.utcTuesday=q,v.utcTuesdays=Ae,v.utcWednesday=$,v.utcWednesdays=Me,v.utcWeek=G,v.utcWeeks=ye,v.utcYear=ue,v.utcYears=ve,Object.defineProperty(v,"__esModule",{value:!0})})}}),ji=Ee({"node_modules/d3-time-format/dist/d3-time-format.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J,ki()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(J,function(v,x){"use strict";function E(Ze){if(0<=Ze.y&&Ze.y<100){var Je=new Date(-1,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L);return Je.setFullYear(Ze.y),Je}return new Date(Ze.y,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L)}function k(Ze){if(0<=Ze.y&&Ze.y<100){var Je=new Date(Date.UTC(-1,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L));return Je.setUTCFullYear(Ze.y),Je}return new Date(Date.UTC(Ze.y,Ze.m,Ze.d,Ze.H,Ze.M,Ze.S,Ze.L))}function l(Ze,Je,Mt){return{y:Ze,m:Je,d:Mt,H:0,M:0,S:0,L:0}}function e(Ze){var Je=Ze.dateTime,Mt=Ze.date,dt=Ze.time,Dt=Ze.periods,Ct=Ze.days,Vt=Ze.shortDays,Ht=Ze.months,Wt=Ze.shortMonths,Sr=c(Dt),on=m(Dt),$t=c(Ct),It=m(Ct),ir=c(Vt),cr=m(Vt),fr=c(Ht),Ir=m(Ht),ln=c(Wt),nn=m(Wt),wn={a:ho,A:da,b:Kn,B:ot,c:null,d:P,e:P,f:re,g:ne,G:ye,H:j,I:U,j:Z,L:Q,m:ae,M:oe,p:et,q:hr,Q:Zt,s:sr,S:H,u:X,U:K,V:Y,w:q,W:$,x:null,X:null,y:ee,Y:fe,Z:xe,"%":_r},Un={a:ur,A:Tr,b:Rr,B:Fr,c:null,d:Ae,e:Ae,f:ke,g:Tt,G:Kt,H:Me,I:Ie,j:Ue,L:qe,m:ge,M:ue,p:at,q:kt,Q:Zt,s:sr,S:ve,u:se,U:Te,V:We,w:Ge,W:gt,x:null,X:null,y:mt,Y:At,Z:nr,"%":_r},jn={a:Fa,A:ai,b:Mi,B:ci,c:ba,d:f,e:f,f:N,g:M,G:S,H:A,I:A,j:u,L:I,m:T,M:b,p:ei,q:_,Q:B,s:F,S:z,u:p,U:g,V:i,w:h,W:w,x:pa,X:Ii,y:M,Y:S,Z:C,"%":R};wn.x=Aa(Mt,wn),wn.X=Aa(dt,wn),wn.c=Aa(Je,wn),Un.x=Aa(Mt,Un),Un.X=Aa(dt,Un),Un.c=Aa(Je,Un);function Aa(Ut,ar){return function(Er){var br=[],Or=-1,Pr=0,hn=Ut.length,zn,Pn,Ca;for(Er instanceof Date||(Er=new Date(+Er));++Or53)return null;"w"in br||(br.w=1),"Z"in br?(Pr=k(l(br.y,0,1)),hn=Pr.getUTCDay(),Pr=hn>4||hn===0?x.utcMonday.ceil(Pr):x.utcMonday(Pr),Pr=x.utcDay.offset(Pr,(br.V-1)*7),br.y=Pr.getUTCFullYear(),br.m=Pr.getUTCMonth(),br.d=Pr.getUTCDate()+(br.w+6)%7):(Pr=E(l(br.y,0,1)),hn=Pr.getDay(),Pr=hn>4||hn===0?x.timeMonday.ceil(Pr):x.timeMonday(Pr),Pr=x.timeDay.offset(Pr,(br.V-1)*7),br.y=Pr.getFullYear(),br.m=Pr.getMonth(),br.d=Pr.getDate()+(br.w+6)%7)}else("W"in br||"U"in br)&&("w"in br||(br.w="u"in br?br.u%7:"W"in br?1:0),hn="Z"in br?k(l(br.y,0,1)).getUTCDay():E(l(br.y,0,1)).getDay(),br.m=0,br.d="W"in br?(br.w+6)%7+br.W*7-(hn+5)%7:br.w+br.U*7-(hn+6)%7);return"Z"in br?(br.H+=br.Z/100|0,br.M+=br.Z%100,k(br)):E(br)}}function Qn(Ut,ar,Er,br){for(var Or=0,Pr=ar.length,hn=Er.length,zn,Pn;Or=hn)return-1;if(zn=ar.charCodeAt(Or++),zn===37){if(zn=ar.charAt(Or++),Pn=jn[zn in t?ar.charAt(Or++):zn],!Pn||(br=Pn(Ut,Er,br))<0)return-1}else if(zn!=Er.charCodeAt(br++))return-1}return br}function ei(Ut,ar,Er){var br=Sr.exec(ar.slice(Er));return br?(Ut.p=on[br[0].toLowerCase()],Er+br[0].length):-1}function Fa(Ut,ar,Er){var br=ir.exec(ar.slice(Er));return br?(Ut.w=cr[br[0].toLowerCase()],Er+br[0].length):-1}function ai(Ut,ar,Er){var br=$t.exec(ar.slice(Er));return br?(Ut.w=It[br[0].toLowerCase()],Er+br[0].length):-1}function Mi(Ut,ar,Er){var br=ln.exec(ar.slice(Er));return br?(Ut.m=nn[br[0].toLowerCase()],Er+br[0].length):-1}function ci(Ut,ar,Er){var br=fr.exec(ar.slice(Er));return br?(Ut.m=Ir[br[0].toLowerCase()],Er+br[0].length):-1}function ba(Ut,ar,Er){return Qn(Ut,Je,ar,Er)}function pa(Ut,ar,Er){return Qn(Ut,Mt,ar,Er)}function Ii(Ut,ar,Er){return Qn(Ut,dt,ar,Er)}function ho(Ut){return Vt[Ut.getDay()]}function da(Ut){return Ct[Ut.getDay()]}function Kn(Ut){return Wt[Ut.getMonth()]}function ot(Ut){return Ht[Ut.getMonth()]}function et(Ut){return Dt[+(Ut.getHours()>=12)]}function hr(Ut){return 1+~~(Ut.getMonth()/3)}function ur(Ut){return Vt[Ut.getUTCDay()]}function Tr(Ut){return Ct[Ut.getUTCDay()]}function Rr(Ut){return Wt[Ut.getUTCMonth()]}function Fr(Ut){return Ht[Ut.getUTCMonth()]}function at(Ut){return Dt[+(Ut.getUTCHours()>=12)]}function kt(Ut){return 1+~~(Ut.getUTCMonth()/3)}return{format:function(Ut){var ar=Aa(Ut+="",wn);return ar.toString=function(){return Ut},ar},parse:function(Ut){var ar=ua(Ut+="",!1);return ar.toString=function(){return Ut},ar},utcFormat:function(Ut){var ar=Aa(Ut+="",Un);return ar.toString=function(){return Ut},ar},utcParse:function(Ut){var ar=ua(Ut+="",!0);return ar.toString=function(){return Ut},ar}}}var t={"-":"",_:" ",0:"0"},a=/^\s*\d+/,r=/^%/,n=/[\\^$*+?|[\]().{}]/g;function o(Ze,Je,Mt){var dt=Ze<0?"-":"",Dt=(dt?-Ze:Ze)+"",Ct=Dt.length;return dt+(Ct68?1900:2e3),Mt+dt[0].length):-1}function C(Ze,Je,Mt){var dt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Je.slice(Mt,Mt+6));return dt?(Ze.Z=dt[1]?0:-(dt[2]+(dt[3]||"00")),Mt+dt[0].length):-1}function _(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+1));return dt?(Ze.q=dt[0]*3-3,Mt+dt[0].length):-1}function T(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+2));return dt?(Ze.m=dt[0]-1,Mt+dt[0].length):-1}function f(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+2));return dt?(Ze.d=+dt[0],Mt+dt[0].length):-1}function u(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+3));return dt?(Ze.m=0,Ze.d=+dt[0],Mt+dt[0].length):-1}function A(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+2));return dt?(Ze.H=+dt[0],Mt+dt[0].length):-1}function b(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+2));return dt?(Ze.M=+dt[0],Mt+dt[0].length):-1}function z(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+2));return dt?(Ze.S=+dt[0],Mt+dt[0].length):-1}function I(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+3));return dt?(Ze.L=+dt[0],Mt+dt[0].length):-1}function N(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt,Mt+6));return dt?(Ze.L=Math.floor(dt[0]/1e3),Mt+dt[0].length):-1}function R(Ze,Je,Mt){var dt=r.exec(Je.slice(Mt,Mt+1));return dt?Mt+dt[0].length:-1}function B(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt));return dt?(Ze.Q=+dt[0],Mt+dt[0].length):-1}function F(Ze,Je,Mt){var dt=a.exec(Je.slice(Mt));return dt?(Ze.s=+dt[0],Mt+dt[0].length):-1}function P(Ze,Je){return o(Ze.getDate(),Je,2)}function j(Ze,Je){return o(Ze.getHours(),Je,2)}function U(Ze,Je){return o(Ze.getHours()%12||12,Je,2)}function Z(Ze,Je){return o(1+x.timeDay.count(x.timeYear(Ze),Ze),Je,3)}function Q(Ze,Je){return o(Ze.getMilliseconds(),Je,3)}function re(Ze,Je){return Q(Ze,Je)+"000"}function ae(Ze,Je){return o(Ze.getMonth()+1,Je,2)}function oe(Ze,Je){return o(Ze.getMinutes(),Je,2)}function H(Ze,Je){return o(Ze.getSeconds(),Je,2)}function X(Ze){var Je=Ze.getDay();return Je===0?7:Je}function K(Ze,Je){return o(x.timeSunday.count(x.timeYear(Ze)-1,Ze),Je,2)}function G(Ze){var Je=Ze.getDay();return Je>=4||Je===0?x.timeThursday(Ze):x.timeThursday.ceil(Ze)}function Y(Ze,Je){return Ze=G(Ze),o(x.timeThursday.count(x.timeYear(Ze),Ze)+(x.timeYear(Ze).getDay()===4),Je,2)}function q(Ze){return Ze.getDay()}function $(Ze,Je){return o(x.timeMonday.count(x.timeYear(Ze)-1,Ze),Je,2)}function ee(Ze,Je){return o(Ze.getFullYear()%100,Je,2)}function ne(Ze,Je){return Ze=G(Ze),o(Ze.getFullYear()%100,Je,2)}function fe(Ze,Je){return o(Ze.getFullYear()%1e4,Je,4)}function ye(Ze,Je){var Mt=Ze.getDay();return Ze=Mt>=4||Mt===0?x.timeThursday(Ze):x.timeThursday.ceil(Ze),o(Ze.getFullYear()%1e4,Je,4)}function xe(Ze){var Je=Ze.getTimezoneOffset();return(Je>0?"-":(Je*=-1,"+"))+o(Je/60|0,"0",2)+o(Je%60,"0",2)}function Ae(Ze,Je){return o(Ze.getUTCDate(),Je,2)}function Me(Ze,Je){return o(Ze.getUTCHours(),Je,2)}function Ie(Ze,Je){return o(Ze.getUTCHours()%12||12,Je,2)}function Ue(Ze,Je){return o(1+x.utcDay.count(x.utcYear(Ze),Ze),Je,3)}function qe(Ze,Je){return o(Ze.getUTCMilliseconds(),Je,3)}function ke(Ze,Je){return qe(Ze,Je)+"000"}function ge(Ze,Je){return o(Ze.getUTCMonth()+1,Je,2)}function ue(Ze,Je){return o(Ze.getUTCMinutes(),Je,2)}function ve(Ze,Je){return o(Ze.getUTCSeconds(),Je,2)}function se(Ze){var Je=Ze.getUTCDay();return Je===0?7:Je}function Te(Ze,Je){return o(x.utcSunday.count(x.utcYear(Ze)-1,Ze),Je,2)}function Fe(Ze){var Je=Ze.getUTCDay();return Je>=4||Je===0?x.utcThursday(Ze):x.utcThursday.ceil(Ze)}function We(Ze,Je){return Ze=Fe(Ze),o(x.utcThursday.count(x.utcYear(Ze),Ze)+(x.utcYear(Ze).getUTCDay()===4),Je,2)}function Ge(Ze){return Ze.getUTCDay()}function gt(Ze,Je){return o(x.utcMonday.count(x.utcYear(Ze)-1,Ze),Je,2)}function mt(Ze,Je){return o(Ze.getUTCFullYear()%100,Je,2)}function Tt(Ze,Je){return Ze=Fe(Ze),o(Ze.getUTCFullYear()%100,Je,2)}function At(Ze,Je){return o(Ze.getUTCFullYear()%1e4,Je,4)}function Kt(Ze,Je){var Mt=Ze.getUTCDay();return Ze=Mt>=4||Mt===0?x.utcThursday(Ze):x.utcThursday.ceil(Ze),o(Ze.getUTCFullYear()%1e4,Je,4)}function nr(){return"+0000"}function _r(){return"%"}function Zt(Ze){return+Ze}function sr(Ze){return Math.floor(+Ze/1e3)}var Ot;vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vt(Ze){return Ot=e(Ze),v.timeFormat=Ot.format,v.timeParse=Ot.parse,v.utcFormat=Ot.utcFormat,v.utcParse=Ot.utcParse,Ot}var ht="%Y-%m-%dT%H:%M:%S.%LZ";function Re(Ze){return Ze.toISOString()}var Be=Date.prototype.toISOString?Re:v.utcFormat(ht);function He(Ze){var Je=new Date(Ze);return isNaN(Je)?null:Je}var $e=+new Date("2000-01-01T00:00:00.000Z")?He:v.utcParse(ht);v.isoFormat=Be,v.isoParse=$e,v.timeFormatDefaultLocale=vt,v.timeFormatLocale=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),ls=Ee({"node_modules/d3-format/dist/d3-format.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J):(v=typeof globalThis<"u"?globalThis:v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";function x(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function E(T,f){if((u=(T=f?T.toExponential(f-1):T.toExponential()).indexOf("e"))<0)return null;var u,A=T.slice(0,u);return[A.length>1?A[0]+A.slice(2):A,+T.slice(u+1)]}function k(T){return T=E(Math.abs(T)),T?T[1]:NaN}function l(T,f){return function(u,A){for(var b=u.length,z=[],I=0,N=T[0],R=0;b>0&&N>0&&(R+N+1>A&&(N=Math.max(1,A-R)),z.push(u.substring(b-=N,b+N)),!((R+=N+1)>A));)N=T[I=(I+1)%T.length];return z.reverse().join(f)}}function e(T){return function(f){return f.replace(/[0-9]/g,function(u){return T[+u]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(T){if(!(f=t.exec(T)))throw new Error("invalid format: "+T);var f;return new r({fill:f[1],align:f[2],sign:f[3],symbol:f[4],zero:f[5],width:f[6],comma:f[7],precision:f[8]&&f[8].slice(1),trim:f[9],type:f[10]})}a.prototype=r.prototype;function r(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function n(T){e:for(var f=T.length,u=1,A=-1,b;u0&&(A=0);break}return A>0?T.slice(0,A)+T.slice(b+1):T}var o;function s(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],b=u[1],z=b-(o=Math.max(-8,Math.min(8,Math.floor(b/3)))*3)+1,I=A.length;return z===I?A:z>I?A+new Array(z-I+1).join("0"):z>0?A.slice(0,z)+"."+A.slice(z):"0."+new Array(1-z).join("0")+E(T,Math.max(0,f+z-1))[0]}function c(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],b=u[1];return b<0?"0."+new Array(-b).join("0")+A:A.length>b+1?A.slice(0,b+1)+"."+A.slice(b+1):A+new Array(b-A.length+2).join("0")}var m={"%":function(T,f){return(T*100).toFixed(f)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:x,e:function(T,f){return T.toExponential(f)},f:function(T,f){return T.toFixed(f)},g:function(T,f){return T.toPrecision(f)},o:function(T){return Math.round(T).toString(8)},p:function(T,f){return c(T*100,f)},r:c,s,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function h(T){return T}var p=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function i(T){var f=T.grouping===void 0||T.thousands===void 0?h:l(p.call(T.grouping,Number),T.thousands+""),u=T.currency===void 0?"":T.currency[0]+"",A=T.currency===void 0?"":T.currency[1]+"",b=T.decimal===void 0?".":T.decimal+"",z=T.numerals===void 0?h:e(p.call(T.numerals,String)),I=T.percent===void 0?"%":T.percent+"",N=T.minus===void 0?"-":T.minus+"",R=T.nan===void 0?"NaN":T.nan+"";function B(P){P=a(P);var j=P.fill,U=P.align,Z=P.sign,Q=P.symbol,re=P.zero,ae=P.width,oe=P.comma,H=P.precision,X=P.trim,K=P.type;K==="n"?(oe=!0,K="g"):m[K]||(H===void 0&&(H=12),X=!0,K="g"),(re||j==="0"&&U==="=")&&(re=!0,j="0",U="=");var G=Q==="$"?u:Q==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",Y=Q==="$"?A:/[%p]/.test(K)?I:"",q=m[K],$=/[defgprs%]/.test(K);H=H===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,H)):Math.max(0,Math.min(20,H));function ee(ne){var fe=G,ye=Y,xe,Ae,Me;if(K==="c")ye=q(ne)+ye,ne="";else{ne=+ne;var Ie=ne<0||1/ne<0;if(ne=isNaN(ne)?R:q(Math.abs(ne),H),X&&(ne=n(ne)),Ie&&+ne==0&&Z!=="+"&&(Ie=!1),fe=(Ie?Z==="("?Z:N:Z==="-"||Z==="("?"":Z)+fe,ye=(K==="s"?g[8+o/3]:"")+ye+(Ie&&Z==="("?")":""),$){for(xe=-1,Ae=ne.length;++xeMe||Me>57){ye=(Me===46?b+ne.slice(xe+1):ne.slice(xe))+ye,ne=ne.slice(0,xe);break}}}oe&&!re&&(ne=f(ne,1/0));var Ue=fe.length+ne.length+ye.length,qe=Ue>1)+fe+ne+ye+qe.slice(Ue);break;default:ne=qe+fe+ne+ye;break}return z(ne)}return ee.toString=function(){return P+""},ee}function F(P,j){var U=B((P=a(P),P.type="f",P)),Z=Math.max(-8,Math.min(8,Math.floor(k(j)/3)))*3,Q=Math.pow(10,-Z),re=g[8+Z/3];return function(ae){return U(Q*ae)+re}}return{format:B,formatPrefix:F}}var w;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(T){return w=i(T),v.format=w.format,v.formatPrefix=w.formatPrefix,w}function M(T){return Math.max(0,-k(Math.abs(T)))}function C(T,f){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k(f)/3)))*3-k(Math.abs(T)))}function _(T,f){return T=Math.abs(T),f=Math.abs(f)-T,Math.max(0,k(f)-k(T))+1}v.FormatSpecifier=r,v.formatDefaultLocale=S,v.formatLocale=i,v.formatSpecifier=a,v.precisionFixed=M,v.precisionPrefix=C,v.precisionRound=_,Object.defineProperty(v,"__esModule",{value:!0})})}}),Ys=Ee({"node_modules/is-string-blank/index.js"(J,V){"use strict";V.exports=function(v){for(var x=v.length,E,k=0;k13)&&E!==32&&E!==133&&E!==160&&E!==5760&&E!==6158&&(E<8192||E>8205)&&E!==8232&&E!==8233&&E!==8239&&E!==8287&&E!==8288&&E!==12288&&E!==65279)return!1;return!0}}}),mi=Ee({"node_modules/fast-isnumeric/index.js"(J,V){"use strict";var v=Ys();V.exports=function(x){var E=typeof x;if(E==="string"){var k=x;if(x=+x,x===0&&v(k))return!1}else if(E!=="number")return!1;return x-x<1}}}),Qi=Ee({"src/constants/numerical.js"(J,V){"use strict";V.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}}}),iu=Ee({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J):(v=typeof globalThis<"u"?globalThis:v||self,x(v["base64-arraybuffer"]={}))})(J,function(v){"use strict";for(var x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256),k=0;k>2],o+=x[(a[r]&3)<<4|a[r+1]>>4],o+=x[(a[r+1]&15)<<2|a[r+2]>>6],o+=x[a[r+2]&63];return n%3===2?o=o.substring(0,o.length-1)+"=":n%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e=function(t){var a=t.length*.75,r=t.length,n,o=0,s,c,m,h;t[t.length-1]==="="&&(a--,t[t.length-2]==="="&&a--);var p=new ArrayBuffer(a),g=new Uint8Array(p);for(n=0;n>4,g[o++]=(c&15)<<4|m>>2,g[o++]=(m&3)<<6|h&63;return p};v.decode=e,v.encode=l,Object.defineProperty(v,"__esModule",{value:!0})})}}),Us=Ee({"src/lib/is_plain_object.js"(J,V){"use strict";V.exports=function(x){return window&&window.process&&window.process.versions?Object.prototype.toString.call(x)==="[object Object]":Object.prototype.toString.call(x)==="[object Object]"&&Object.getPrototypeOf(x).hasOwnProperty("hasOwnProperty")}}}),vs=Ee({"src/lib/array.js"(J){"use strict";var V=iu().decode,v=Us(),x=Array.isArray,E=ArrayBuffer,k=DataView;function l(s){return E.isView(s)&&!(s instanceof k)}J.isTypedArray=l;function e(s){return x(s)||l(s)}J.isArrayOrTypedArray=e;function t(s){return!e(s[0])}J.isArray1D=t,J.ensureArray=function(s,c){return x(s)||(s=[]),s.length=c,s};var a={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};a.uint8c=a.u1c,a.uint8=a.u1,a.int8=a.i1,a.uint16=a.u2,a.int16=a.i2,a.uint32=a.u4,a.int32=a.i4,a.float32=a.f4,a.float64=a.f8;function r(s){return s.constructor===ArrayBuffer}J.isArrayBuffer=r,J.decodeTypedArraySpec=function(s){var c=[],m=n(s),h=m.dtype,p=a[h];if(!p)throw new Error('Error in dtype: "'+h+'"');var g=p.BYTES_PER_ELEMENT,i=m.bdata;r(i)||(i=V(i));var w=m.shape===void 0?[i.byteLength/g]:(""+m.shape).split(",");w.reverse();var S=w.length,M,C,_=+w[0],T=g*_,f=0;if(S===1)c=new p(i);else if(S===2)for(M=+w[1],C=0;C2)return p[M]=p[M]|l,w.set(S,null);if(i){for(c=M;c0)return Math.log(E)/Math.LN10;var l=Math.log(Math.min(k[0],k[1]))/Math.LN10;return v(l)||(l=Math.log(Math.max(k[0],k[1]))/Math.LN10-6),l}}}),Ag=Ee({"src/lib/relink_private.js"(J,V){"use strict";var v=vs().isArrayOrTypedArray,x=Us();V.exports=function E(k,l){for(var e in l){var t=l[e],a=k[e];if(a!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in k)continue;k[e]=t}else if(v(t)&&v(a)&&x(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,a.length),n=0;nMg,modHalf:()=>Sg});function Mg(J,V){let v=J%V;return v<0?v+V:v}function Sg(J,V){return Math.abs(J)>V/2?J-Math.round(J/V)*V:J}var Vd=In({"src/lib/mod.ts"(){"use strict"}}),vo=Ee({"src/lib/extend.js"(J){"use strict";var V=Us(),v=Array.isArray;function x(k,l){var e,t;for(e=0;e{for(var Ke in Oe)v(Le,Ke,{get:Oe[Ke],enumerable:!0})},e=(Le,Oe,Ke,yt)=>{if(Oe&&typeof Oe=="object"||typeof Oe=="function")for(let wt of E(Oe))!k.call(Le,wt)&&wt!==Ke&&v(Le,wt,{get:()=>Oe[wt],enumerable:!(yt=x(Oe,wt))||yt.enumerable});return Le},t=Le=>e(v({},"__esModule",{value:!0}),Le),a={};l(a,{a98:()=>Uo,average:()=>Tr,averageAngle:()=>et,averageNumber:()=>hr,blend:()=>hl,blerp:()=>Ge,clampChroma:()=>vr,clampGamut:()=>or,clampRgb:()=>qt,colorsNamed:()=>s,convertA98ToXyz65:()=>Ot,convertCubehelixToRgb:()=>ei,convertDlchToLab65:()=>So,convertHsiToRgb:()=>ws,convertHslToRgb:()=>No,convertHsvToRgb:()=>Ps,convertHwbToRgb:()=>Ro,convertItpToXyz65:()=>Ms,convertJabToJch:()=>Lu,convertJabToRgb:()=>Dc,convertJabToXyz65:()=>Pc,convertJchToJab:()=>sl,convertLab65ToDlch:()=>ii,convertLab65ToRgb:()=>ga,convertLab65ToXyz65:()=>ma,convertLabToLch:()=>kt,convertLabToRgb:()=>bl,convertLabToXyz50:()=>Gu,convertLchToLab:()=>ar,convertLchuvToLuv:()=>Iu,convertLrgbToOklab:()=>rr,convertLrgbToRgb:()=>Dt,convertLuvToLchuv:()=>fu,convertLuvToXyz50:()=>gf,convertOkhslToOklab:()=>Ni,convertOkhsvToOklab:()=>Ga,convertOklabToLrgb:()=>Ln,convertOklabToOkhsl:()=>Bi,convertOklabToOkhsv:()=>Va,convertOklabToRgb:()=>Jn,convertP3ToXyz65:()=>Xo,convertProphotoToXyz50:()=>ic,convertRec2020ToXyz65:()=>Bu,convertRgbToCubehelix:()=>ua,convertRgbToHsi:()=>Ko,convertRgbToHsl:()=>Di,convertRgbToHsv:()=>$o,convertRgbToHwb:()=>Ls,convertRgbToJab:()=>Zl,convertRgbToLab:()=>Kc,convertRgbToLab65:()=>Sa,convertRgbToLrgb:()=>$e,convertRgbToOklab:()=>wr,convertRgbToXyb:()=>eu,convertRgbToXyz50:()=>Wu,convertRgbToXyz65:()=>Je,convertRgbToYiq:()=>Zn,convertXybToRgb:()=>pt,convertXyz50ToLab:()=>Yu,convertXyz50ToLuv:()=>Ru,convertXyz50ToProphoto:()=>Al,convertXyz50ToRgb:()=>gu,convertXyz50ToXyz65:()=>Wr,convertXyz65ToA98:()=>Re,convertXyz65ToItp:()=>Eu,convertXyz65ToJab:()=>hc,convertXyz65ToLab65:()=>Ao,convertXyz65ToP3:()=>Ws,convertXyz65ToRec2020:()=>rf,convertXyz65ToRgb:()=>Vt,convertXyz65ToXyz50:()=>Ur,convertYiqToRgb:()=>Na,converter:()=>P,cubehelix:()=>Qs,differenceCie76:()=>ba,differenceCie94:()=>pa,differenceCiede2000:()=>Ii,differenceCmc:()=>ho,differenceEuclidean:()=>ci,differenceHueChroma:()=>Mi,differenceHueNaive:()=>ai,differenceHueSaturation:()=>Fa,differenceHyab:()=>da,differenceItp:()=>ot,differenceKotsarenkoRamos:()=>Kn,displayable:()=>it,dlab:()=>os,dlch:()=>hs,easingGamma:()=>Ne,easingInOutSine:()=>jo,easingMidpoint:()=>Kr,easingSmootherstep:()=>fo,easingSmoothstep:()=>Eo,easingSmoothstepInverse:()=>yi,filterBrightness:()=>Sn,filterContrast:()=>Tn,filterDeficiencyDeuter:()=>pi,filterDeficiencyProt:()=>Xa,filterDeficiencyTrit:()=>Xi,filterGrayscale:()=>Ha,filterHueRotate:()=>Si,filterInvert:()=>$a,filterSaturate:()=>$n,filterSepia:()=>Xn,fixupAlpha:()=>Kt,fixupHueDecreasing:()=>fr,fixupHueIncreasing:()=>cr,fixupHueLonger:()=>ir,fixupHueShorter:()=>It,formatCss:()=>Vi,formatHex:()=>fl,formatHex8:()=>Ku,formatHsl:()=>Bs,formatRgb:()=>tu,getMode:()=>oe,hsi:()=>ss,hsl:()=>ks,hsv:()=>ts,hwb:()=>el,inGamut:()=>Rt,interpolate:()=>pn,interpolateWith:()=>xn,interpolateWithPremultipliedAlpha:()=>Bn,interpolatorLinear:()=>At,interpolatorPiecewise:()=>Tt,interpolatorSplineBasis:()=>Ea,interpolatorSplineBasisClosed:()=>Oa,interpolatorSplineMonotone:()=>ie,interpolatorSplineMonotone2:()=>ce,interpolatorSplineMonotoneClosed:()=>_e,interpolatorSplineNatural:()=>di,interpolatorSplineNaturalClosed:()=>Oi,itp:()=>Il,jab:()=>Do,jch:()=>ru,lab:()=>Ns,lab65:()=>Nu,lch:()=>Vl,lch65:()=>Hl,lchuv:()=>Co,lerp:()=>Fe,lrgb:()=>is,luv:()=>Hs,mapAlphaDivide:()=>ut,mapAlphaMultiply:()=>tt,mapTransferGamma:()=>St,mapTransferLinear:()=>jt,mapper:()=>Qe,modeA98:()=>Wt,modeCubehelix:()=>Fr,modeDlab:()=>Io,modeDlch:()=>Oo,modeHsi:()=>wo,modeHsl:()=>Zs,modeHsv:()=>Ji,modeHwb:()=>yl,modeItp:()=>fc,modeJab:()=>Vu,modeJch:()=>Pu,modeLab:()=>Cl,modeLab65:()=>If,modeLch:()=>ll,modeLch65:()=>Nc,modeLchuv:()=>Pl,modeLrgb:()=>_c,modeLuv:()=>ac,modeOkhsl:()=>_i,modeOkhsv:()=>go,modeOklab:()=>as,modeOklch:()=>ps,modeP3:()=>Nl,modeProphoto:()=>Zu,modeRec2020:()=>jc,modeRgb:()=>_r,modeXyb:()=>Nt,modeXyz50:()=>Yt,modeXyz65:()=>gn,modeYiq:()=>Yi,nearest:()=>mr,okhsl:()=>fn,okhsv:()=>la,oklab:()=>ha,oklch:()=>ao,p3:()=>ds,parse:()=>ge,parseHex:()=>g,parseHsl:()=>Is,parseHslLegacy:()=>Jo,parseHwb:()=>ml,parseLab:()=>Df,parseLch:()=>Bc,parseNamed:()=>m,parseOklab:()=>Wo,parseOklch:()=>Ks,parseRgb:()=>ve,parseRgbLegacy:()=>N,parseTransparent:()=>Te,prophoto:()=>Os,random:()=>je,rec2020:()=>io,removeParser:()=>X,rgb:()=>en,round:()=>bo,samples:()=>lt,serializeHex:()=>ql,serializeHex8:()=>Js,serializeHsl:()=>Li,serializeRgb:()=>Tu,toGamut:()=>Ar,trilerp:()=>gt,unlerp:()=>We,useMode:()=>ae,useParser:()=>H,wcagContrast:()=>Vs,wcagLuminance:()=>qs,xyb:()=>dn,xyz50:()=>An,xyz65:()=>sa,yiq:()=>wa}),V.exports=t(a);var r=(Le,Oe)=>{if(typeof Le=="number"){if(Oe===3)return{mode:"rgb",r:(Le>>8&15|Le>>4&240)/255,g:(Le>>4&15|Le&240)/255,b:(Le&15|Le<<4&240)/255};if(Oe===4)return{mode:"rgb",r:(Le>>12&15|Le>>8&240)/255,g:(Le>>8&15|Le>>4&240)/255,b:(Le>>4&15|Le&240)/255,alpha:(Le&15|Le<<4&240)/255};if(Oe===6)return{mode:"rgb",r:(Le>>16&255)/255,g:(Le>>8&255)/255,b:(Le&255)/255};if(Oe===8)return{mode:"rgb",r:(Le>>24&255)/255,g:(Le>>16&255)/255,b:(Le>>8&255)/255,alpha:(Le&255)/255}}},n=r,o={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},s=o,c=Le=>n(s[Le.toLowerCase()],6),m=c,h=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,p=Le=>{let Oe;return(Oe=Le.match(h))?n(parseInt(Oe[1],16),Oe[1].length):void 0},g=p,i="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",w=`(?:${i}|none)`,S=`${i}%`,M=`(?:${i}%|none)`,C=`(?:${i}%|${i})`,_=`(?:${i}%|${i}|none)`,T=`(?:${i}(deg|grad|rad|turn)|${i})`,f=`(?:${i}(deg|grad|rad|turn)|${i}|none)`,u="\\s*,\\s*",A=new RegExp("^"+_+"$"),b=new RegExp(`^rgba?\\(\\s*${i}${u}${i}${u}${i}\\s*(?:,\\s*${C}\\s*)?\\)$`),z=new RegExp(`^rgba?\\(\\s*${S}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),I=Le=>{let Oe={mode:"rgb"},Ke;if(Ke=Le.match(b))Ke[1]!==void 0&&(Oe.r=Ke[1]/255),Ke[2]!==void 0&&(Oe.g=Ke[2]/255),Ke[3]!==void 0&&(Oe.b=Ke[3]/255);else if(Ke=Le.match(z))Ke[1]!==void 0&&(Oe.r=Ke[1]/100),Ke[2]!==void 0&&(Oe.g=Ke[2]/100),Ke[3]!==void 0&&(Oe.b=Ke[3]/100);else return;return Ke[4]!==void 0?Oe.alpha=Math.max(0,Math.min(1,Ke[4]/100)):Ke[5]!==void 0&&(Oe.alpha=Math.max(0,Math.min(1,+Ke[5]))),Oe},N=I,R=(Le,Oe)=>Le===void 0?void 0:typeof Le!="object"?ge(Le):Le.mode!==void 0?Le:Oe?Qr(Nr({},Le),{mode:Oe}):void 0,B=R,F=(Le="rgb")=>Oe=>(Oe=B(Oe,Le))!==void 0?Oe.mode===Le?Oe:j[Oe.mode][Le]?j[Oe.mode][Le](Oe):Le==="rgb"?j[Oe.mode].rgb(Oe):j.rgb[Le](j[Oe.mode].rgb(Oe)):void 0,P=F,j={},U={},Z=[],Q={},re=Le=>Le,ae=Le=>(j[Le.mode]=Nr(Nr({},j[Le.mode]),Le.toMode),Object.keys(Le.fromMode||{}).forEach(Oe=>{j[Oe]||(j[Oe]={}),j[Oe][Le.mode]=Le.fromMode[Oe]}),Le.ranges||(Le.ranges={}),Le.difference||(Le.difference={}),Le.channels.forEach(Oe=>{if(Le.ranges[Oe]===void 0&&(Le.ranges[Oe]=[0,1]),!Le.interpolate[Oe])throw new Error(`Missing interpolator for: ${Oe}`);typeof Le.interpolate[Oe]=="function"&&(Le.interpolate[Oe]={use:Le.interpolate[Oe]}),Le.interpolate[Oe].fixup||(Le.interpolate[Oe].fixup=re)}),U[Le.mode]=Le,(Le.parse||[]).forEach(Oe=>{H(Oe,Le.mode)}),P(Le.mode)),oe=Le=>U[Le],H=(Le,Oe)=>{if(typeof Le=="string"){if(!Oe)throw new Error("'mode' required when 'parser' is a string");Q[Le]=Oe}else typeof Le=="function"&&Z.indexOf(Le)<0&&Z.push(Le)},X=Le=>{if(typeof Le=="string")delete Q[Le];else if(typeof Le=="function"){let Oe=Z.indexOf(Le);Oe>0&&Z.splice(Oe,1)}},K=/[^\x00-\x7F]|[a-zA-Z_]/,G=/[^\x00-\x7F]|[-\w]/,Y={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},q=0;function $(Le){let Oe=Le[q],Ke=Le[q+1];return Oe==="-"||Oe==="+"?/\d/.test(Ke)||Ke==="."&&/\d/.test(Le[q+2]):Oe==="."?/\d/.test(Ke):/\d/.test(Oe)}function ee(Le){if(q>=Le.length)return!1;let Oe=Le[q];if(K.test(Oe))return!0;if(Oe==="-"){if(Le.length-q<2)return!1;let Ke=Le[q+1];return!!(Ke==="-"||K.test(Ke))}return!1}var ne={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function fe(Le){let Oe="";if((Le[q]==="-"||Le[q]==="+")&&(Oe+=Le[q++]),Oe+=ye(Le),Le[q]==="."&&/\d/.test(Le[q+1])&&(Oe+=Le[q++]+ye(Le)),(Le[q]==="e"||Le[q]==="E")&&((Le[q+1]==="-"||Le[q+1]==="+")&&/\d/.test(Le[q+2])?Oe+=Le[q++]+Le[q++]+ye(Le):/\d/.test(Le[q+1])&&(Oe+=Le[q++]+ye(Le))),ee(Le)){let Ke=xe(Le);return Ke==="deg"||Ke==="rad"||Ke==="turn"||Ke==="grad"?{type:Y.Hue,value:Oe*ne[Ke]}:void 0}return Le[q]==="%"?(q++,{type:Y.Percentage,value:+Oe}):{type:Y.Number,value:+Oe}}function ye(Le){let Oe="";for(;/\d/.test(Le[q]);)Oe+=Le[q++];return Oe}function xe(Le){let Oe="";for(;q4)){if(Ke.length===4){if(Ke[3].type!==Y.Alpha)return;Ke[3]=Ke[3].value}return Ke.length===3&&Ke.push({type:Y.None,value:void 0}),Ke.every(wt=>wt.type!==Y.Alpha)?Ke:void 0}}function qe(Le,Oe){Le._i=0;let Ke=Le[Le._i++];if(!Ke||Ke.type!==Y.Function)return;let yt=Ue(Le,Oe);if(yt)return yt.unshift(Ke.value),yt}var ke=Le=>{if(typeof Le!="string")return;let Oe=Me(Le),Ke=Oe?qe(Oe,!0):void 0,yt,wt=0,Pt=Z.length;for(;wtLe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Te=se,Fe=(Le,Oe,Ke)=>Le+Ke*(Oe-Le),We=(Le,Oe,Ke)=>(Ke-Le)/(Oe-Le),Ge=(Le,Oe,Ke,yt,wt,Pt)=>Fe(Fe(Le,Oe,wt),Fe(Ke,yt,wt),Pt),gt=(Le,Oe,Ke,yt,wt,Pt,pr,Zr,Mn,va,aa)=>Fe(Ge(Le,Oe,Ke,yt,Mn,va),Ge(wt,Pt,pr,Zr,Mn,va),aa),mt=Le=>{let Oe=[];for(let Ke=0;KeOe=>{let Ke=mt(Oe);return yt=>{let wt=yt*Ke.length,Pt=yt>=1?Ke.length-1:Math.max(Math.floor(wt),0),pr=Ke[Pt];return pr===void 0?void 0:Le(pr[0],pr[1],wt-Pt)}},At=Tt(Fe),Kt=Le=>{let Oe=!1,Ke=Le.map(yt=>yt!==void 0?(Oe=!0,yt):1);return Oe?Ke:Le},nr={mode:"rgb",channels:["r","g","b","alpha"],parse:[ve,g,N,m,Te,"srgb"],serialize:"srgb",interpolate:{r:At,g:At,b:At,alpha:{use:At,fixup:Kt}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_r=nr,Zt=(Le=0)=>Math.pow(Math.abs(Le),563/256)*Math.sign(Le),sr=Le=>{let Oe=Zt(Le.r),Ke=Zt(Le.g),yt=Zt(Le.b),wt={mode:"xyz65",x:.5766690429101305*Oe+.1855582379065463*Ke+.1882286462349947*yt,y:.297344975250536*Oe+.6273635662554661*Ke+.0752914584939979*yt,z:.0270313613864123*Oe+.0706888525358272*Ke+.9913375368376386*yt};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Ot=sr,vt=Le=>Math.pow(Math.abs(Le),256/563)*Math.sign(Le),ht=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"a98",r:vt(Le*2.0415879038107465-Oe*.5650069742788597-.3447313507783297*Ke),g:vt(Le*-.9692436362808798+Oe*1.8759675015077206+.0415550574071756*Ke),b:vt(Le*.0134442806320312-Oe*.1183623922310184+1.0151749943912058*Ke)};return yt!==void 0&&(wt.alpha=yt),wt},Re=ht,Be=(Le=0)=>{let Oe=Math.abs(Le);return Oe<=.04045?Le/12.92:(Math.sign(Le)||1)*Math.pow((Oe+.055)/1.055,2.4)},He=({r:Le,g:Oe,b:Ke,alpha:yt})=>{let wt={mode:"lrgb",r:Be(Le),g:Be(Oe),b:Be(Ke)};return yt!==void 0&&(wt.alpha=yt),wt},$e=He,Ze=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt={mode:"xyz65",x:.4123907992659593*Oe+.357584339383878*Ke+.1804807884018343*yt,y:.2126390058715102*Oe+.715168678767756*Ke+.0721923153607337*yt,z:.0193308187155918*Oe+.119194779794626*Ke+.9505321522496607*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Je=Ze,Mt=(Le=0)=>{let Oe=Math.abs(Le);return Oe>.0031308?(Math.sign(Le)||1)*(1.055*Math.pow(Oe,1/2.4)-.055):Le*12.92},dt=({r:Le,g:Oe,b:Ke,alpha:yt},wt="rgb")=>{let Pt={mode:wt,r:Mt(Le),g:Mt(Oe),b:Mt(Ke)};return yt!==void 0&&(Pt.alpha=yt),Pt},Dt=dt,Ct=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Dt({r:Le*3.2409699419045226-Oe*1.537383177570094-.4986107602930034*Ke,g:Le*-.9692436362808796+Oe*1.8759675015077204+.0415550574071756*Ke,b:Le*.0556300796969936-Oe*.2039769588889765+1.0569715142428784*Ke});return yt!==void 0&&(wt.alpha=yt),wt},Vt=Ct,Ht=Qr(Nr({},_r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:Le=>Re(Je(Le)),xyz65:Re},toMode:{rgb:Le=>Vt(Ot(Le)),xyz65:Ot}}),Wt=Ht,Sr=Le=>(Le=Le%360)<0?Le+360:Le,on=Sr,$t=(Le,Oe)=>Le.map((Ke,yt,wt)=>{if(Ke===void 0)return Ke;let Pt=on(Ke);return yt===0||Le[yt-1]===void 0?Pt:Oe(Pt-on(wt[yt-1]))}).reduce((Ke,yt)=>!Ke.length||yt===void 0||Ke[Ke.length-1]===void 0?(Ke.push(yt),Ke):(Ke.push(yt+Ke[Ke.length-1]),Ke),[]),It=Le=>$t(Le,Oe=>Math.abs(Oe)<=180?Oe:Oe-360*Math.sign(Oe)),ir=Le=>$t(Le,Oe=>Math.abs(Oe)>=180||Oe===0?Oe:Oe-360*Math.sign(Oe)),cr=Le=>$t(Le,Oe=>Oe>=0?Oe:Oe+360),fr=Le=>$t(Le,Oe=>Oe<=0?Oe:Oe-360),Ir=[-.14861,1.78277,-.29227,-.90649,1.97294,0],ln=Math.PI/180,nn=180/Math.PI,wn=Ir[3]*Ir[4],Un=Ir[1]*Ir[4],jn=Ir[1]*Ir[2]-Ir[0]*Ir[3],Aa=({r:Le,g:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(jn*Ke+Le*wn-Oe*Un)/(jn+wn-Un),Pt=Ke-wt,pr=(Ir[4]*(Oe-wt)-Ir[2]*Pt)/Ir[3],Zr={mode:"cubehelix",l:wt,s:wt===0||wt===1?void 0:Math.sqrt(Pt*Pt+pr*pr)/(Ir[4]*wt*(1-wt))};return Zr.s&&(Zr.h=Math.atan2(pr,Pt)*nn-120),yt!==void 0&&(Zr.alpha=yt),Zr},ua=Aa,Qn=({h:Le,s:Oe,l:Ke,alpha:yt})=>{let wt={mode:"rgb"};Le=(Le===void 0?0:Le+120)*ln,Ke===void 0&&(Ke=0);let Pt=Oe===void 0?0:Oe*Ke*(1-Ke),pr=Math.cos(Le),Zr=Math.sin(Le);return wt.r=Ke+Pt*(Ir[0]*pr+Ir[1]*Zr),wt.g=Ke+Pt*(Ir[2]*pr+Ir[3]*Zr),wt.b=Ke+Pt*(Ir[4]*pr+Ir[5]*Zr),yt!==void 0&&(wt.alpha=yt),wt},ei=Qn,Fa=(Le,Oe)=>{if(Le.h===void 0||Oe.h===void 0||!Le.s||!Oe.s)return 0;let Ke=on(Le.h),yt=on(Oe.h),wt=Math.sin((yt-Ke+360)/2*Math.PI/180);return 2*Math.sqrt(Le.s*Oe.s)*wt},ai=(Le,Oe)=>{if(Le.h===void 0||Oe.h===void 0)return 0;let Ke=on(Le.h),yt=on(Oe.h);return Math.abs(yt-Ke)>180?Ke-(yt-360*Math.sign(yt-Ke)):yt-Ke},Mi=(Le,Oe)=>{if(Le.h===void 0||Oe.h===void 0||!Le.c||!Oe.c)return 0;let Ke=on(Le.h),yt=on(Oe.h),wt=Math.sin((yt-Ke+360)/2*Math.PI/180);return 2*Math.sqrt(Le.c*Oe.c)*wt},ci=(Le="rgb",Oe=[1,1,1,0])=>{let Ke=oe(Le),yt=Ke.channels,wt=Ke.difference,Pt=P(Le);return(pr,Zr)=>{let Mn=Pt(pr),va=Pt(Zr);return Math.sqrt(yt.reduce((aa,ea,ja)=>{let ka=wt[ea]?wt[ea](Mn,va):Mn[ea]-va[ea];return aa+(Oe[ja]||0)*Math.pow(isNaN(ka)?0:ka,2)},0))}},ba=()=>ci("lab65"),pa=(Le=1,Oe=.045,Ke=.015)=>{let yt=P("lab65");return(wt,Pt)=>{let pr=yt(wt),Zr=yt(Pt),Mn=pr.l,va=pr.a,aa=pr.b,ea=Math.sqrt(va*va+aa*aa),ja=Zr.l,ka=Zr.a,za=Zr.b,Ua=Math.sqrt(ka*ka+za*za),Ja=Math.pow(Mn-ja,2),hi=Math.pow(ea-Ua,2),Ki=Math.pow(va-ka,2)+Math.pow(aa-za,2)-hi;return Math.sqrt(Ja/Math.pow(Le,2)+hi/Math.pow(1+Oe*ea,2)+Ki/Math.pow(1+Ke*ea,2))}},Ii=(Le=1,Oe=1,Ke=1)=>{let yt=P("lab65");return(wt,Pt)=>{let pr=yt(wt),Zr=yt(Pt),Mn=pr.l,va=pr.a,aa=pr.b,ea=Math.sqrt(va*va+aa*aa),ja=Zr.l,ka=Zr.a,za=Zr.b,Ua=Math.sqrt(ka*ka+za*za),Ja=(ea+Ua)/2,hi=.5*(1-Math.sqrt(Math.pow(Ja,7)/(Math.pow(Ja,7)+Math.pow(25,7)))),Ki=va*(1+hi),Qo=ka*(1+hi),Ds=Math.sqrt(Ki*Ki+aa*aa),ys=Math.sqrt(Qo*Qo+za*za),Gl=Math.abs(Ki)+Math.abs(aa)===0?0:Math.atan2(aa,Ki);Gl+=(Gl<0)*2*Math.PI;let nu=Math.abs(Qo)+Math.abs(za)===0?0:Math.atan2(za,Qo);nu+=(nu<0)*2*Math.PI;let Au=ja-Mn,zf=ys-Ds,Gf=Ds*ys===0?0:nu-Gl;Gf-=(Gf>Math.PI)*2*Math.PI,Gf+=(Gf<-Math.PI)*2*Math.PI;let dh=2*Math.sqrt(Ds*ys)*Math.sin(Gf/2),ed=(Mn+ja)/2,Oh=(Ds+ys)/2,Bf;Ds*ys===0?Bf=Gl+nu:(Bf=(Gl+nu)/2,Bf-=(Math.abs(Gl-nu)>Math.PI)*Math.PI,Bf+=(Bf<0)*2*Math.PI);let fv=Math.pow(ed-50,2),kd=1-.17*Math.cos(Bf-Math.PI/6)+.24*Math.cos(2*Bf)+.32*Math.cos(3*Bf+Math.PI/30)-.2*Math.cos(4*Bf-63*Math.PI/180),Cd=1+.015*fv/Math.sqrt(20+fv),Ld=1+.045*Oh,Pd=1+.015*Oh*kd,f0=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*Bf-275)/25,2)),rp=2*Math.sqrt(Math.pow(Oh,7)/(Math.pow(Oh,7)+Math.pow(25,7))),jh=-1*Math.sin(2*f0)*rp;return Math.sqrt(Math.pow(Au/(Le*Cd),2)+Math.pow(zf/(Oe*Ld),2)+Math.pow(dh/(Ke*Pd),2)+jh*zf/(Oe*Ld)*dh/(Ke*Pd))}},ho=(Le=1,Oe=1)=>{let Ke=P("lab65");return(yt,wt)=>{let Pt=Ke(yt),pr=Pt.l,Zr=Pt.a,Mn=Pt.b,va=Math.sqrt(Zr*Zr+Mn*Mn),aa=Math.atan2(Mn,Zr);aa=aa+2*Math.PI*(aa<0);let ea=Ke(wt),ja=ea.l,ka=ea.a,za=ea.b,Ua=Math.sqrt(ka*ka+za*za),Ja=Math.pow(pr-ja,2),hi=Math.pow(va-Ua,2),Ki=Math.pow(Zr-ka,2)+Math.pow(Mn-za,2)-hi,Qo=Math.sqrt(Math.pow(va,4)/(Math.pow(va,4)+1900)),Ds=aa>=164/180*Math.PI&&aa<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(aa+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(aa+35/180*Math.PI)),ys=pr<16?.511:.040975*pr/(1+.01765*pr),Gl=.0638*va/(1+.0131*va)+.638,nu=Gl*(Qo*Ds+1-Qo);return Math.sqrt(Ja/Math.pow(Le*ys,2)+hi/Math.pow(Oe*Gl,2)+Ki/Math.pow(nu,2))}},da=()=>{let Le=P("lab65");return(Oe,Ke)=>{let yt=Le(Oe),wt=Le(Ke),Pt=yt.l-wt.l,pr=yt.a-wt.a,Zr=yt.b-wt.b;return Math.abs(Pt)+Math.sqrt(pr*pr+Zr*Zr)}},Kn=()=>ci("yiq",[.5053,.299,.1957]),ot=()=>ci("itp",[518400,129600,518400]),et=Le=>{let Oe=Le.reduce((yt,wt)=>{if(wt!==void 0){let Pt=wt*Math.PI/180;yt.sin+=Math.sin(Pt),yt.cos+=Math.cos(Pt)}return yt},{sin:0,cos:0}),Ke=Math.atan2(Oe.sin,Oe.cos)*180/Math.PI;return Ke<0?360+Ke:Ke},hr=Le=>{let Oe=Le.filter(Ke=>Ke!==void 0);return Oe.length?Oe.reduce((Ke,yt)=>Ke+yt,0)/Oe.length:void 0},ur=Le=>typeof Le=="function";function Tr(Le,Oe="rgb",Ke){let yt=oe(Oe),wt=Le.map(P(Oe));return yt.channels.reduce((Pt,pr)=>{let Zr=wt.map(Mn=>Mn[pr]).filter(Mn=>Mn!==void 0);if(Zr.length){let Mn;ur(Ke)?Mn=Ke:Ke&&ur(Ke[pr])?Mn=Ke[pr]:yt.average&&ur(yt.average[pr])?Mn=yt.average[pr]:Mn=hr,Pt[pr]=Mn(Zr,pr)}return Pt},{mode:Oe})}var Rr={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:ua},toMode:{rgb:ei},interpolate:{h:{use:At,fixup:It},s:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Fa},average:{h:et}},Fr=Rr,at=({l:Le,a:Oe,b:Ke,alpha:yt},wt="lch")=>{Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let Pt=Math.sqrt(Oe*Oe+Ke*Ke),pr={mode:wt,l:Le,c:Pt};return Pt&&(pr.h=on(Math.atan2(Ke,Oe)*180/Math.PI)),yt!==void 0&&(pr.alpha=yt),pr},kt=at,Ut=({l:Le,c:Oe,h:Ke,alpha:yt},wt="lab")=>{Ke===void 0&&(Ke=0);let Pt={mode:wt,l:Le,a:Oe?Oe*Math.cos(Ke/180*Math.PI):0,b:Oe?Oe*Math.sin(Ke/180*Math.PI):0};return yt!==void 0&&(Pt.alpha=yt),Pt},ar=Ut,Er=Math.pow(29,3)/Math.pow(3,3),br=Math.pow(6,3)/Math.pow(29,3),Or={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Pr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},hn=Math.pow(29,3)/Math.pow(3,3),zn=Math.pow(6,3)/Math.pow(29,3),Pn=Le=>Math.pow(Le,3)>br?Math.pow(Le,3):(116*Le-16)/Er,Ca=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(Le+16)/116,Pt=Oe/500+wt,pr=wt-Ke/200,Zr={mode:"xyz65",x:Pn(Pt)*Pr.X,y:Pn(wt)*Pr.Y,z:Pn(pr)*Pr.Z};return yt!==void 0&&(Zr.alpha=yt),Zr},ma=Ca,bi=Le=>Vt(ma(Le)),ga=bi,eo=Le=>Le>br?Math.cbrt(Le):(Er*Le+16)/116,si=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=eo(Le/Pr.X),Pt=eo(Oe/Pr.Y),pr=eo(Ke/Pr.Z),Zr={mode:"lab65",l:116*Pt-16,a:500*(wt-Pt),b:200*(Pt-pr)};return yt!==void 0&&(Zr.alpha=yt),Zr},Ao=si,ro=Le=>{let Oe=Ao(Je(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},Sa=ro,Gi=1,ti=1,fi=26/180*Math.PI,xo=Math.cos(fi),zi=Math.sin(fi),so=100/Math.log(139/100),Mo=({l:Le,c:Oe,h:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"lab65",l:(Math.exp(Le*Gi/so)-1)/.0039},Pt=(Math.exp(.0435*Oe*ti*Gi)-1)/.075,pr=Pt*Math.cos(Ke/180*Math.PI-fi),Zr=Pt*Math.sin(Ke/180*Math.PI-fi);return wt.a=pr*xo-Zr/.83*zi,wt.b=pr*zi+Zr/.83*xo,yt!==void 0&&(wt.alpha=yt),wt},So=Mo,oi=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Oe*xo+Ke*zi,Pt=.83*(Ke*xo-Oe*zi),pr=Math.sqrt(wt*wt+Pt*Pt),Zr={mode:"dlch",l:so/Gi*Math.log(1+.0039*Le),c:Math.log(1+.075*pr)/(.0435*ti*Gi)};return Zr.c&&(Zr.h=on((Math.atan2(Pt,wt)+fi)/Math.PI*180)),yt!==void 0&&(Zr.alpha=yt),Zr},ii=oi,co=Le=>So(kt(Le,"dlch")),Wi=Le=>ar(ii(Le),"dlab"),Ho={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:co,rgb:Le=>ga(co(Le))},fromMode:{lab65:Wi,rgb:Le=>Wi(Sa(Le))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:Kt}}},Io=Ho,qo={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:So,dlab:Le=>ar(Le,"dlab"),rgb:Le=>ga(So(Le))},fromMode:{lab65:ii,dlab:Le=>kt(Le,"dlch"),rgb:Le=>ii(Sa(Le))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:At,c:At,h:{use:At,fixup:It},alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},Oo=qo;function ws({h:Le,s:Oe,i:Ke,alpha:yt}){Le=on(Le!==void 0?Le:0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.abs(Le/60%2-1),Pt;switch(Math.floor(Le/60)){case 0:Pt={r:Ke*(1+Oe*(3/(2-wt)-1)),g:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),b:Ke*(1-Oe)};break;case 1:Pt={r:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),g:Ke*(1+Oe*(3/(2-wt)-1)),b:Ke*(1-Oe)};break;case 2:Pt={r:Ke*(1-Oe),g:Ke*(1+Oe*(3/(2-wt)-1)),b:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1))};break;case 3:Pt={r:Ke*(1-Oe),g:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),b:Ke*(1+Oe*(3/(2-wt)-1))};break;case 4:Pt={r:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1)),g:Ke*(1-Oe),b:Ke*(1+Oe*(3/(2-wt)-1))};break;case 5:Pt={r:Ke*(1+Oe*(3/(2-wt)-1)),g:Ke*(1-Oe),b:Ke*(1+Oe*(3*(1-wt)/(2-wt)-1))};break;default:Pt={r:Ke*(1-Oe),g:Ke*(1-Oe),b:Ke*(1-Oe)}}return Pt.mode="rgb",yt!==void 0&&(Pt.alpha=yt),Pt}function Ko({r:Le,g:Oe,b:Ke,alpha:yt}){Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.max(Le,Oe,Ke),Pt=Math.min(Le,Oe,Ke),pr={mode:"hsi",s:Le+Oe+Ke===0?0:1-3*Pt/(Le+Oe+Ke),i:(Le+Oe+Ke)/3};return wt-Pt!==0&&(pr.h=(wt===Le?(Oe-Ke)/(wt-Pt)+(Oe{switch(Oe){case"deg":return+Le;case"rad":return Le/Math.PI*180;case"grad":return Le/10*9;case"turn":return Le*360}},Go=lo,mo=new RegExp(`^hsla?\\(\\s*${T}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),us=Le=>{let Oe=Le.match(mo);if(!Oe)return;let Ke={mode:"hsl"};return Oe[3]!==void 0?Ke.h=+Oe[3]:Oe[1]!==void 0&&Oe[2]!==void 0&&(Ke.h=Go(Oe[1],Oe[2])),Oe[4]!==void 0&&(Ke.s=Math.min(Math.max(0,Oe[4]/100),1)),Oe[5]!==void 0&&(Ke.l=Math.min(Math.max(0,Oe[5]/100),1)),Oe[6]!==void 0?Ke.alpha=Math.max(0,Math.min(1,Oe[6]/100)):Oe[7]!==void 0&&(Ke.alpha=Math.max(0,Math.min(1,+Oe[7]))),Ke},Jo=us;function zs(Le,Oe){if(!Oe||Oe[0]!=="hsl"&&Oe[0]!=="hsla")return;let Ke={mode:"hsl"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==Y.None){if(yt.type===Y.Percentage)return;Ke.h=yt.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Ke.s=wt.value/100}if(Pt.type!==Y.None){if(Pt.type===Y.Hue)return;Ke.l=Pt.value/100}return pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var Is=zs,es={mode:"hsl",toMode:{rgb:No},fromMode:{rgb:Di},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Is,Jo],serialize:Le=>`hsl(${Le.h!==void 0?Le.h:"none"} ${Le.s!==void 0?Le.s*100+"%":"none"} ${Le.l!==void 0?Le.l*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:It},s:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Fa},average:{h:et}},Zs=es;function Ps({h:Le,s:Oe,v:Ke,alpha:yt}){Le=on(Le!==void 0?Le:0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.abs(Le/60%2-1),Pt;switch(Math.floor(Le/60)){case 0:Pt={r:Ke,g:Ke*(1-Oe*wt),b:Ke*(1-Oe)};break;case 1:Pt={r:Ke*(1-Oe*wt),g:Ke,b:Ke*(1-Oe)};break;case 2:Pt={r:Ke*(1-Oe),g:Ke,b:Ke*(1-Oe*wt)};break;case 3:Pt={r:Ke*(1-Oe),g:Ke*(1-Oe*wt),b:Ke};break;case 4:Pt={r:Ke*(1-Oe*wt),g:Ke*(1-Oe),b:Ke};break;case 5:Pt={r:Ke,g:Ke*(1-Oe),b:Ke*(1-Oe*wt)};break;default:Pt={r:Ke*(1-Oe),g:Ke*(1-Oe),b:Ke*(1-Oe)}}return Pt.mode="rgb",yt!==void 0&&(Pt.alpha=yt),Pt}function $o({r:Le,g:Oe,b:Ke,alpha:yt}){Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.max(Le,Oe,Ke),Pt=Math.min(Le,Oe,Ke),pr={mode:"hsv",s:wt===0?0:1-Pt/wt,v:wt};return wt-Pt!==0&&(pr.h=(wt===Le?(Oe-Ke)/(wt-Pt)+(Oe1){let wt=Oe+Ke;Oe/=wt,Ke/=wt}return Ps({h:Le,s:Ke===1?1:1-Oe/(1-Ke),v:1-Ke,alpha:yt})}function Ls(Le){let Oe=$o(Le);if(Oe===void 0)return;let Ke=Oe.s!==void 0?Oe.s:0,yt=Oe.v!==void 0?Oe.v:0,wt={mode:"hwb",w:(1-Ke)*yt,b:1-yt};return Oe.h!==void 0&&(wt.h=Oe.h),Oe.alpha!==void 0&&(wt.alpha=Oe.alpha),wt}function zl(Le,Oe){if(!Oe||Oe[0]!=="hwb")return;let Ke={mode:"hwb"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==Y.None){if(yt.type===Y.Percentage)return;Ke.h=yt.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Ke.w=wt.value/100}if(Pt.type!==Y.None){if(Pt.type===Y.Hue)return;Ke.b=Pt.value/100}return pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var ml=zl,Ts={mode:"hwb",toMode:{rgb:Ro},fromMode:{rgb:Ls},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[ml],serialize:Le=>`hwb(${Le.h!==void 0?Le.h:"none"} ${Le.w!==void 0?Le.w*100+"%":"none"} ${Le.b!==void 0?Le.b*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:It},w:At,b:At,alpha:{use:At,fixup:Kt}},difference:{h:ai},average:{h:et}},yl=Ts,mu=203,su=.1593017578125,cc=78.84375,Bl=.8359375,_l=18.8515625,ju=18.6875;function lu(Le){if(Le<0)return 0;let Oe=Math.pow(Le,1/cc);return 1e4*Math.pow(Math.max(0,Oe-Bl)/(_l-ju*Oe),1/su)}function il(Le){if(Le<0)return 0;let Oe=Math.pow(Le/1e4,su);return Math.pow((Bl+_l*Oe)/(1+ju*Oe),cc)}var As=Le=>Math.max(Le/mu,0),ms=({i:Le,t:Oe,p:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=lu(Le+.008609037037932761*Oe+.11102962500302593*Ke),Pt=lu(Le-.00860903703793275*Oe-.11102962500302599*Ke),pr=lu(Le+.5600313357106791*Oe-.32062717498731885*Ke),Zr={mode:"xyz65",x:As(2.070152218389422*wt-1.3263473389671556*Pt+.2066510476294051*pr),y:As(.3647385209748074*wt+.680566024947227*Pt-.0453045459220346*pr),z:As(-.049747207535812*wt-.0492609666966138*Pt+1.1880659249923042*pr)};return yt!==void 0&&(Zr.alpha=yt),Zr},Ms=ms,ol=(Le=0)=>Math.max(Le*mu,0),Su=({x:Le,y:Oe,z:Ke,alpha:yt})=>{let wt=ol(Le),Pt=ol(Oe),pr=ol(Ke),Zr=il(.3592832590121217*wt+.6976051147779502*Pt-.0358915932320289*pr),Mn=il(-.1920808463704995*wt+1.1004767970374323*Pt+.0753748658519118*pr),va=il(.0070797844607477*wt+.0748396662186366*Pt+.8433265453898765*pr),aa=.5*Zr+.5*Mn,ea=1.61376953125*Zr-3.323486328125*Mn+1.709716796875*va,ja=4.378173828125*Zr-4.24560546875*Mn-.132568359375*va,ka={mode:"itp",i:aa,t:ea,p:ja};return yt!==void 0&&(ka.alpha=yt),ka},Eu=Su,Uu={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Ms,rgb:Le=>Vt(Ms(Le))},fromMode:{xyz65:Eu,rgb:Le=>Eu(Je(Le))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:At,t:At,p:At,alpha:{use:At,fixup:Kt}}},fc=Uu,th=134.03437499999998,Cf=16295499532821565e-27,qu=Le=>{if(Le<0)return 0;let Oe=Math.pow(Le/1e4,su);return Math.pow((Bl+_l*Oe)/(1+ju*Oe),th)},gs=(Le=0)=>Math.max(Le*203,0),Lf=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le=gs(Le),Oe=gs(Oe),Ke=gs(Ke);let wt=1.15*Le-.15*Ke,Pt=.66*Oe+.34*Le,pr=qu(.41478972*wt+.579999*Pt+.014648*Ke),Zr=qu(-.20151*wt+1.120649*Pt+.0531008*Ke),Mn=qu(-.0166008*wt+.2648*Pt+.6684799*Ke),va=(pr+Zr)/2,aa={mode:"jab",j:.44*va/(1-.56*va)-Cf,a:3.524*pr-4.066708*Zr+.542708*Mn,b:.199076*pr+1.096799*Zr-1.295875*Mn};return yt!==void 0&&(aa.alpha=yt),aa},hc=Lf,nc=134.03437499999998,hf=16295499532821565e-27,ku=Le=>{if(Le<0)return 0;let Oe=Math.pow(Le,1/nc);return 1e4*Math.pow((Bl-Oe)/(ju*Oe-_l),1/su)},dc=Le=>Le/203,Cu=({j:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(Le+hf)/(.44+.56*(Le+hf)),Pt=ku(wt+.13860504*Oe+.058047316*Ke),pr=ku(wt-.13860504*Oe-.058047316*Ke),Zr=ku(wt-.096019242*Oe-.8118919*Ke),Mn={mode:"xyz65",x:dc(1.661373024652174*Pt-.914523081304348*pr+.23136208173913045*Zr),y:dc(-.3250758611844533*Pt+1.571847026732543*pr-.21825383453227928*Zr),z:dc(-.090982811*Pt-.31272829*pr+1.5227666*Zr)};return yt!==void 0&&(Mn.alpha=yt),Mn},Pc=Cu,$c=Le=>{let Oe=hc(Je(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},Zl=$c,df=Le=>Vt(Pc(Le)),Dc=df,Ic={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:Zl,xyz65:hc},toMode:{rgb:Dc,xyz65:Pc},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:At,a:At,b:At,alpha:{use:At,fixup:Kt}}},Vu=Ic,Rc=({j:Le,a:Oe,b:Ke,alpha:yt})=>{Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.sqrt(Oe*Oe+Ke*Ke),Pt={mode:"jch",j:Le,c:wt};return wt&&(Pt.h=on(Math.atan2(Ke,Oe)*180/Math.PI)),yt!==void 0&&(Pt.alpha=yt),Pt},Lu=Rc,vf=({j:Le,c:Oe,h:Ke,alpha:yt})=>{Ke===void 0&&(Ke=0);let wt={mode:"jab",j:Le,a:Oe?Oe*Math.cos(Ke/180*Math.PI):0,b:Oe?Oe*Math.sin(Ke/180*Math.PI):0};return yt!==void 0&&(wt.alpha=yt),wt},sl=vf,Fc={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:sl,rgb:Le=>Dc(sl(Le))},fromMode:{rgb:Le=>Lu(Zl(Le)),jab:Lu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:At,fixup:It},c:At,j:At,alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},Pu=Fc,vc=Math.pow(29,3)/Math.pow(3,3),zc=Math.pow(6,3)/Math.pow(29,3),Hu=Le=>Math.pow(Le,3)>zc?Math.pow(Le,3):(116*Le-16)/vc,uu=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=(Le+16)/116,Pt=Oe/500+wt,pr=wt-Ke/200,Zr={mode:"xyz50",x:Hu(Pt)*Or.X,y:Hu(wt)*Or.Y,z:Hu(pr)*Or.Z};return yt!==void 0&&(Zr.alpha=yt),Zr},Gu=uu,Zc=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Dt({r:Le*3.1341359569958707-Oe*1.6173863321612538-.4906619460083532*Ke,g:Le*-.978795502912089+Oe*1.916254567259524+.03344273116131949*Ke,b:Le*.07195537988411677-Oe*.2289768264158322+1.405386058324125*Ke});return yt!==void 0&&(wt.alpha=yt),wt},gu=Zc,Pf=Le=>gu(Gu(Le)),bl=Pf,xl=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt={mode:"xyz50",x:.436065742824811*Oe+.3851514688337912*Ke+.14307845442264197*yt,y:.22249319175623702*Oe+.7168870538238823*Ke+.06061979053616537*yt,z:.013923904500943465*Oe+.09708128566574634*Ke+.7140993584005155*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Wu=xl,wl=Le=>Le>zc?Math.cbrt(Le):(vc*Le+16)/116,pf=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=wl(Le/Or.X),Pt=wl(Oe/Or.Y),pr=wl(Ke/Or.Z),Zr={mode:"lab",l:116*Pt-16,a:500*(wt-Pt),b:200*(Pt-pr)};return yt!==void 0&&(Zr.alpha=yt),Zr},Yu=pf,pc=Le=>{let Oe=Yu(Wu(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},Kc=pc;function cs(Le,Oe){if(!Oe||Oe[0]!=="lab")return;let Ke={mode:"lab"},[,yt,wt,Pt,pr]=Oe;if(!(yt.type===Y.Hue||wt.type===Y.Hue||Pt.type===Y.Hue))return yt.type!==Y.None&&(Ke.l=Math.min(Math.max(0,yt.value),100)),wt.type!==Y.None&&(Ke.a=wt.type===Y.Number?wt.value:wt.value*125/100),Pt.type!==Y.None&&(Ke.b=Pt.type===Y.Number?Pt.value:Pt.value*125/100),pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var Df=cs,cu={mode:"lab",toMode:{xyz50:Gu,rgb:bl},fromMode:{xyz50:Yu,rgb:Kc},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[Df],serialize:Le=>`lab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:Kt}}},Cl=cu,Ll=Qr(Nr({},Cl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:ma,rgb:ga},fromMode:{xyz65:Ao,rgb:Sa},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),If=Ll;function yu(Le,Oe){if(!Oe||Oe[0]!=="lch")return;let Ke={mode:"lch"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==Y.None){if(yt.type===Y.Hue)return;Ke.l=Math.min(Math.max(0,yt.value),100)}if(wt.type!==Y.None&&(Ke.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*150/100)),Pt.type!==Y.None){if(Pt.type===Y.Percentage)return;Ke.h=Pt.value}return pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var Bc=yu,Tl={mode:"lch",toMode:{lab:ar,rgb:Le=>bl(ar(Le))},fromMode:{rgb:Le=>kt(Kc(Le)),lab:kt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[Bc],serialize:Le=>`lch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:It},c:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},ll=Tl,Jc=Qr(Nr({},ll),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:Le=>ar(Le,"lab65"),rgb:Le=>ga(ar(Le,"lab65"))},fromMode:{rgb:Le=>kt(Sa(Le),"lch65"),lab65:Le=>kt(Le,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Nc=Jc,Rf=({l:Le,u:Oe,v:Ke,alpha:yt})=>{Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.sqrt(Oe*Oe+Ke*Ke),Pt={mode:"lchuv",l:Le,c:wt};return wt&&(Pt.h=on(Math.atan2(Ke,Oe)*180/Math.PI)),yt!==void 0&&(Pt.alpha=yt),Pt},fu=Rf,Du=({l:Le,c:Oe,h:Ke,alpha:yt})=>{Ke===void 0&&(Ke=0);let wt={mode:"luv",l:Le,u:Oe?Oe*Math.cos(Ke/180*Math.PI):0,v:Oe?Oe*Math.sin(Ke/180*Math.PI):0};return yt!==void 0&&(wt.alpha=yt),wt},Iu=Du,Xu=(Le,Oe,Ke)=>4*Le/(Le+15*Oe+3*Ke),Qc=(Le,Oe,Ke)=>9*Oe/(Le+15*Oe+3*Ke),ef=Xu(Or.X,Or.Y,Or.Z),_u=Qc(Or.X,Or.Y,Or.Z),$u=Le=>Le<=zc?vc*Le:116*Math.cbrt(Le)-16,mc=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=$u(Oe/Or.Y),Pt=Xu(Le,Oe,Ke),pr=Qc(Le,Oe,Ke);!isFinite(Pt)||!isFinite(pr)?wt=Pt=pr=0:(Pt=13*wt*(Pt-ef),pr=13*wt*(pr-_u));let Zr={mode:"luv",l:wt,u:Pt,v:pr};return yt!==void 0&&(Zr.alpha=yt),Zr},Ru=mc,zo=(Le,Oe,Ke)=>4*Le/(Le+15*Oe+3*Ke),gc=(Le,Oe,Ke)=>9*Oe/(Le+15*Oe+3*Ke),Vf=zo(Or.X,Or.Y,Or.Z),mf=gc(Or.X,Or.Y,Or.Z),tf=({l:Le,u:Oe,v:Ke,alpha:yt})=>{if(Le===void 0&&(Le=0),Le===0)return{mode:"xyz50",x:0,y:0,z:0};Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Oe/(13*Le)+Vf,Pt=Ke/(13*Le)+mf,pr=Or.Y*(Le<=8?Le/vc:Math.pow((Le+16)/116,3)),Zr=pr*(9*wt)/(4*Pt),Mn=pr*(12-3*wt-20*Pt)/(4*Pt),va={mode:"xyz50",x:Zr,y:pr,z:Mn};return yt!==void 0&&(va.alpha=yt),va},gf=tf,Hf=Le=>fu(Ru(Wu(Le))),yf=Le=>gu(gf(Iu(Le))),ul={mode:"lchuv",toMode:{luv:Iu,rgb:yf},fromMode:{rgb:Hf,luv:fu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:At,fixup:It},c:At,l:At,alpha:{use:At,fixup:Kt}},difference:{h:Mi},average:{h:et}},Pl=ul,yc=Qr(Nr({},_r),{mode:"lrgb",toMode:{rgb:Dt},fromMode:{rgb:$e},parse:["srgb-linear"],serialize:"srgb-linear"}),_c=yc,bc={mode:"luv",toMode:{xyz50:gf,rgb:Le=>gu(gf(Le))},fromMode:{xyz50:Ru,rgb:Le=>Ru(Wu(Le))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:At,u:At,v:At,alpha:{use:At,fixup:Kt}}},ac=bc,zt=({r:Le,g:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.cbrt(.412221469470763*Le+.5363325372617348*Oe+.0514459932675022*Ke),Pt=Math.cbrt(.2119034958178252*Le+.6806995506452344*Oe+.1073969535369406*Ke),pr=Math.cbrt(.0883024591900564*Le+.2817188391361215*Oe+.6299787016738222*Ke),Zr={mode:"oklab",l:.210454268309314*wt+.7936177747023054*Pt-.0040720430116193*pr,a:1.9779985324311684*wt-2.42859224204858*Pt+.450593709617411*pr,b:.0259040424655478*wt+.7827717124575296*Pt-.8086757549230774*pr};return yt!==void 0&&(Zr.alpha=yt),Zr},rr=zt,Br=Le=>{let Oe=rr($e(Le));return Le.r===Le.b&&Le.b===Le.g&&(Oe.a=Oe.b=0),Oe},wr=Br,un=({l:Le,a:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Math.pow(Le+.3963377773761749*Oe+.2158037573099136*Ke,3),Pt=Math.pow(Le-.1055613458156586*Oe-.0638541728258133*Ke,3),pr=Math.pow(Le-.0894841775298119*Oe-1.2914855480194092*Ke,3),Zr={mode:"lrgb",r:4.076741636075957*wt-3.3077115392580616*Pt+.2309699031821044*pr,g:-1.2684379732850317*wt+2.6097573492876887*Pt-.3413193760026573*pr,b:-.0041960761386756*wt-.7034186179359362*Pt+1.7076146940746117*pr};return yt!==void 0&&(Zr.alpha=yt),Zr},Ln=un,Vn=Le=>Dt(Ln(Le)),Jn=Vn;function ca(Le){let yt=1.170873786407767;return .5*(yt*Le-.206+Math.sqrt((yt*Le-.206)*(yt*Le-.206)+4*.03*yt*Le))}function Pa(Le){return(Le*Le+.206*Le)/(1.170873786407767*(Le+.03))}function Gn(Le,Oe){let Ke,yt,wt,Pt,pr,Zr,Mn,va;-1.88170328*Le-.80936493*Oe>1?(Ke=1.19086277,yt=1.76576728,wt=.59662641,Pt=.75515197,pr=.56771245,Zr=4.0767416621,Mn=-3.3077115913,va=.2309699292):1.81444104*Le-1.19445276*Oe>1?(Ke=.73956515,yt=-.45954404,wt=.08285427,Pt=.1254107,pr=.14503204,Zr=-1.2684380046,Mn=2.6097574011,va=-.3413193965):(Ke=1.35733652,yt=-.00915799,wt=-1.1513021,Pt=-.50559606,pr=.00692167,Zr=-.0041960863,Mn=-.7034186147,va=1.707614701);let aa=Ke+yt*Le+wt*Oe+Pt*Le*Le+pr*Le*Oe,ea=.3963377774*Le+.2158037573*Oe,ja=-.1055613458*Le-.0638541728*Oe,ka=-.0894841775*Le-1.291485548*Oe;{let za=1+aa*ea,Ua=1+aa*ja,Ja=1+aa*ka,hi=za*za*za,Ki=Ua*Ua*Ua,Qo=Ja*Ja*Ja,Ds=3*ea*za*za,ys=3*ja*Ua*Ua,Gl=3*ka*Ja*Ja,nu=6*ea*ea*za,Au=6*ja*ja*Ua,zf=6*ka*ka*Ja,Gf=Zr*hi+Mn*Ki+va*Qo,dh=Zr*Ds+Mn*ys+va*Gl,ed=Zr*nu+Mn*Au+va*zf;aa=aa-Gf*dh/(dh*dh-.5*Gf*ed)}return aa}function oa(Le,Oe){let Ke=Gn(Le,Oe),yt=Ln({l:1,a:Ke*Le,b:Ke*Oe}),wt=Math.cbrt(1/Math.max(yt.r,yt.g,yt.b)),Pt=wt*Ke;return[wt,Pt]}function fa(Le,Oe,Ke,yt,wt,Pt=null){Pt||(Pt=oa(Le,Oe));let pr;if((Ke-wt)*Pt[1]-(Pt[0]-wt)*yt<=0)pr=Pt[1]*wt/(yt*Pt[0]+Pt[1]*(wt-Ke));else{pr=Pt[1]*(wt-1)/(yt*(Pt[0]-1)+Pt[1]*(wt-Ke));{let Zr=Ke-wt,Mn=yt,va=.3963377774*Le+.2158037573*Oe,aa=-.1055613458*Le-.0638541728*Oe,ea=-.0894841775*Le-1.291485548*Oe,ja=Zr+Mn*va,ka=Zr+Mn*aa,za=Zr+Mn*ea;{let Ua=wt*(1-pr)+pr*Ke,Ja=pr*yt,hi=Ua+Ja*va,Ki=Ua+Ja*aa,Qo=Ua+Ja*ea,Ds=hi*hi*hi,ys=Ki*Ki*Ki,Gl=Qo*Qo*Qo,nu=3*ja*hi*hi,Au=3*ka*Ki*Ki,zf=3*za*Qo*Qo,Gf=6*ja*ja*hi,dh=6*ka*ka*Ki,ed=6*za*za*Qo,Oh=4.0767416621*Ds-3.3077115913*ys+.2309699292*Gl-1,Bf=4.0767416621*nu-3.3077115913*Au+.2309699292*zf,fv=4.0767416621*Gf-3.3077115913*dh+.2309699292*ed,kd=Bf/(Bf*Bf-.5*Oh*fv),Cd=-Oh*kd,Ld=-1.2684380046*Ds+2.6097574011*ys-.3413193965*Gl-1,Pd=-1.2684380046*nu+2.6097574011*Au-.3413193965*zf,f0=-1.2684380046*Gf+2.6097574011*dh-.3413193965*ed,rp=Pd/(Pd*Pd-.5*Ld*f0),jh=-Ld*rp,np=-.0041960863*Ds-.7034186147*ys+1.707614701*Gl-1,ap=-.0041960863*nu-.7034186147*Au+1.707614701*zf,td=-.0041960863*Gf-.7034186147*dh+1.707614701*ed,Dd=ap/(ap*ap-.5*np*td),h0=-np*Dd;Cd=kd>=0?Cd:1e6,jh=rp>=0?jh:1e6,h0=Dd>=0?h0:1e6,pr+=Math.min(Cd,Math.min(jh,h0))}}}return pr}function La(Le,Oe,Ke=null){Ke||(Ke=oa(Le,Oe));let yt=Ke[0],wt=Ke[1];return[wt/yt,wt/(1-yt)]}function qa(Le,Oe,Ke){let yt=oa(Oe,Ke),wt=fa(Oe,Ke,Le,1,Le,yt),Pt=La(Oe,Ke,yt),pr=.11516993+1/(7.4477897+4.1590124*Ke+Oe*(-2.19557347+1.75198401*Ke+Oe*(-2.13704948-10.02301043*Ke+Oe*(-4.24894561+5.38770819*Ke+4.69891013*Oe)))),Zr=.11239642+1/(1.6132032-.68124379*Ke+Oe*(.40370612+.90148123*Ke+Oe*(-.27087943+.6122399*Ke+Oe*(.00299215-.45399568*Ke-.14661872*Oe)))),Mn=wt/Math.min(Le*Pt[0],(1-Le)*Pt[1]),va=Le*pr,aa=(1-Le)*Zr,ea=.9*Mn*Math.sqrt(Math.sqrt(1/(1/(va*va*va*va)+1/(aa*aa*aa*aa))));return va=Le*.4,aa=(1-Le)*.8,[Math.sqrt(1/(1/(va*va)+1/(aa*aa))),ea,wt]}function Bi(Le){let Oe=Le.l!==void 0?Le.l:0,Ke=Le.a!==void 0?Le.a:0,yt=Le.b!==void 0?Le.b:0,wt={mode:"okhsl",l:ca(Oe)};Le.alpha!==void 0&&(wt.alpha=Le.alpha);let Pt=Math.sqrt(Ke*Ke+yt*yt);if(!Pt)return wt.s=0,wt;let[pr,Zr,Mn]=qa(Oe,Ke/Pt,yt/Pt),va;if(PtBi(wr(Le))},toMode:{oklab:Ni,rgb:Le=>Jn(Ni(Le))}}),_i=Zi;function Va(Le){let Oe=Le.l!==void 0?Le.l:0,Ke=Le.a!==void 0?Le.a:0,yt=Le.b!==void 0?Le.b:0,wt=Math.sqrt(Ke*Ke+yt*yt),Pt=wt?Ke/wt:1,pr=wt?yt/wt:1,[Zr,Mn]=La(Pt,pr),va=.5,aa=1-va/Zr,ea=Mn/(wt+Oe*Mn),ja=ea*Oe,ka=ea*wt,za=Pa(ja),Ua=ka*za/ja,Ja=Ln({l:za,a:Pt*Ua,b:pr*Ua}),hi=Math.cbrt(1/Math.max(Ja.r,Ja.g,Ja.b,0));Oe=Oe/hi,wt=wt/hi*ca(Oe)/Oe,Oe=ca(Oe);let Ki={mode:"okhsv",s:wt?(va+Mn)*ka/(Mn*va+Mn*aa*ka):0,v:Oe?Oe/ja:0};return Ki.s&&(Ki.h=on(Math.atan2(yt,Ke)*180/Math.PI)),Le.alpha!==void 0&&(Ki.alpha=Le.alpha),Ki}function Ga(Le){let Oe={mode:"oklab"};Le.alpha!==void 0&&(Oe.alpha=Le.alpha);let Ke=Le.h!==void 0?Le.h:0,yt=Le.s!==void 0?Le.s:0,wt=Le.v!==void 0?Le.v:0,Pt=Math.cos(Ke/180*Math.PI),pr=Math.sin(Ke/180*Math.PI),[Zr,Mn]=La(Pt,pr),va=.5,aa=1-va/Zr,ea=1-yt*va/(va+Mn-Mn*aa*yt),ja=yt*Mn*va/(va+Mn-Mn*aa*yt),ka=Pa(ea),za=ja*ka/ea,Ua=Ln({l:ka,a:Pt*za,b:pr*za}),Ja=Math.cbrt(1/Math.max(Ua.r,Ua.g,Ua.b,0)),hi=Pa(wt*ea),Ki=ja*hi/ea;return Oe.l=hi*Ja,Oe.a=Ki*Pt*Ja,Oe.b=Ki*pr*Ja,Oe}var oo=Qr(Nr({},Ji),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Va,rgb:Le=>Va(wr(Le))},toMode:{oklab:Ga,rgb:Le=>Jn(Ga(Le))}}),go=oo;function Vo(Le,Oe){if(!Oe||Oe[0]!=="oklab")return;let Ke={mode:"oklab"},[,yt,wt,Pt,pr]=Oe;if(!(yt.type===Y.Hue||wt.type===Y.Hue||Pt.type===Y.Hue))return yt.type!==Y.None&&(Ke.l=Math.min(Math.max(0,yt.type===Y.Number?yt.value:yt.value/100),1)),wt.type!==Y.None&&(Ke.a=wt.type===Y.Number?wt.value:wt.value*.4/100),Pt.type!==Y.None&&(Ke.b=Pt.type===Y.Number?Pt.value:Pt.value*.4/100),pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var Wo=Vo,Yo=Qr(Nr({},Cl),{mode:"oklab",toMode:{lrgb:Ln,rgb:Jn},fromMode:{lrgb:rr,rgb:wr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Wo],serialize:Le=>`oklab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`}),as=Yo;function Bo(Le,Oe){if(!Oe||Oe[0]!=="oklch")return;let Ke={mode:"oklch"},[,yt,wt,Pt,pr]=Oe;if(yt.type!==Y.None){if(yt.type===Y.Hue)return;Ke.l=Math.min(Math.max(0,yt.type===Y.Number?yt.value:yt.value/100),1)}if(wt.type!==Y.None&&(Ke.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*.4/100)),Pt.type!==Y.None){if(Pt.type===Y.Percentage)return;Ke.h=Pt.value}return pr.type!==Y.None&&(Ke.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Ke}var Ks=Bo,Rs=Qr(Nr({},ll),{mode:"oklch",toMode:{oklab:Le=>ar(Le,"oklab"),rgb:Le=>Jn(ar(Le,"oklab"))},fromMode:{rgb:Le=>kt(wr(Le),"oklch"),oklab:Le=>kt(Le,"oklch")},parse:[Ks],serialize:Le=>`oklch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),ps=Rs,vi=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt={mode:"xyz65",x:.486570948648216*Oe+.265667693169093*Ke+.1982172852343625*yt,y:.2289745640697487*Oe+.6917385218365062*Ke+.079286914093745*yt,z:0*Oe+.0451133818589026*Ke+1.043944368900976*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Xo=vi,Ss=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Dt({r:Le*2.4934969119414263-Oe*.9313836179191242-.402710784450717*Ke,g:Le*-.8294889695615749+Oe*1.7626640603183465+.0236246858419436*Ke,b:Le*.0358458302437845-Oe*.0761723892680418+.9568845240076871*Ke},"p3");return yt!==void 0&&(wt.alpha=yt),wt},Ws=Ss,Dl=Qr(Nr({},_r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:Le=>Ws(Je(Le)),xyz65:Ws},toMode:{rgb:Le=>Vt(Xo(Le)),xyz65:Xo}}),Nl=Dl,Kl=Le=>{let Oe=Math.abs(Le);return Oe>=1/512?Math.sign(Le)*Math.pow(Oe,1/1.8):16*Le},Fu=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"prophoto",r:Kl(Le*1.3457868816471585-Oe*.2555720873797946-.0511018649755453*Ke),g:Kl(Le*-.5446307051249019+Oe*1.5082477428451466+.0205274474364214*Ke),b:Kl(Le*0+Oe*0+1.2119675456389452*Ke)};return yt!==void 0&&(wt.alpha=yt),wt},Al=Fu,zu=(Le=0)=>{let Oe=Math.abs(Le);return Oe>=16/512?Math.sign(Le)*Math.pow(Oe,1.8):Le/16},bu=Le=>{let Oe=zu(Le.r),Ke=zu(Le.g),yt=zu(Le.b),wt={mode:"xyz50",x:.7977666449006423*Oe+.1351812974005331*Ke+.0313477341283922*yt,y:.2880748288194013*Oe+.7118352342418731*Ke+899369387256e-16*yt,z:0*Oe+0*Ke+.8251046025104602*yt};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},ic=bu,Oc=Qr(Nr({},_r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:Al,rgb:Le=>Al(Wu(Le))},toMode:{xyz50:ic,rgb:Le=>gu(ic(Le))}}),Zu=Oc,hu=1.09929682680944,Jl=.018053968510807,Ql=Le=>{let Oe=Math.abs(Le);return Oe>Jl?(Math.sign(Le)||1)*(hu*Math.pow(Oe,.45)-(hu-1)):4.5*Le},xu=({x:Le,y:Oe,z:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"rec2020",r:Ql(Le*1.7166511879712683-Oe*.3556707837763925-.2533662813736599*Ke),g:Ql(Le*-.6666843518324893+Oe*1.6164812366349395+.0157685458139111*Ke),b:Ql(Le*.0176398574453108-Oe*.0427706132578085+.9421031212354739*Ke)};return yt!==void 0&&(wt.alpha=yt),wt},rf=xu,Ff=1.09929682680944,xc=.018053968510807,rl=(Le=0)=>{let Oe=Math.abs(Le);return Oe{let Oe=rl(Le.r),Ke=rl(Le.g),yt=rl(Le.b),wt={mode:"xyz65",x:.6369580483012911*Oe+.1446169035862083*Ke+.1688809751641721*yt,y:.262700212011267*Oe+.6779980715188708*Ke+.059301716469862*yt,z:0*Oe+.0280726930490874*Ke+1.0609850577107909*yt};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Bu=Ol,nf=Qr(Nr({},_r),{mode:"rec2020",fromMode:{xyz65:rf,rgb:Le=>rf(Je(Le))},toMode:{xyz65:Bu,rgb:Le=>Vt(Bu(Le))},parse:["rec2020"],serialize:"rec2020"}),jc=nf,wu=.0037930732552754493,jl=Math.cbrt(wu),Ul=Le=>Math.cbrt(Le)-jl,Ci=Le=>{let{r:Oe,g:Ke,b:yt,alpha:wt}=$e(Le),Pt=Ul(.3*Oe+.622*Ke+.078*yt+wu),pr=Ul(.23*Oe+.692*Ke+.078*yt+wu),Zr=Ul(.2434226892454782*Oe+.2047674442449682*Ke+.5518098665095535*yt+wu),Mn={mode:"xyb",x:(Pt-pr)/2,y:(Pt+pr)/2,b:Zr-(Pt+pr)/2};return wt!==void 0&&(Mn.alpha=wt),Mn},eu=Ci,Xe=Le=>Math.pow(Le+jl,3),rt=({x:Le,y:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt=Xe(Le+Oe)-wu,Pt=Xe(Oe-Le)-wu,pr=Xe(Ke+Oe)-wu,Zr=Dt({r:11.031566904639861*wt-9.866943908131562*Pt-.16462299650829934*pr,g:-3.2541473810744237*wt+4.418770377582723*Pt-.16462299650829934*pr,b:-3.6588512867136815*wt+2.7129230459360922*Pt+1.9459282407775895*pr});return yt!==void 0&&(Zr.alpha=yt),Zr},pt=rt,_t={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:pt},fromMode:{rgb:eu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:At,y:At,b:At,alpha:{use:At,fixup:Kt}}},Nt=_t,Bt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:gu,lab:Yu},fromMode:{rgb:Wu,lab:Gu},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:Kt}}},Yt=Bt,Dr=Le=>{let{x:Oe,y:Ke,z:yt,alpha:wt}=Le;Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0),yt===void 0&&(yt=0);let Pt={mode:"xyz50",x:1.0479298208405488*Oe+.0229467933410191*Ke-.0501922295431356*yt,y:.0296278156881593*Oe+.990434484573249*Ke-.0170738250293851*yt,z:-.0092430581525912*Oe+.0150551448965779*Ke+.7518742899580008*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Ur=Dr,kr=Le=>{let{x:Oe,y:Ke,z:yt,alpha:wt}=Le;Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0),yt===void 0&&(yt=0);let Pt={mode:"xyz65",x:.9554734527042182*Oe-.0230985368742614*Ke+.0632593086610217*yt,y:-.0283697069632081*Oe+1.0099954580058226*Ke+.021041398966943*yt,z:.0123140016883199*Oe-.0205076964334779*Ke+1.3303659366080753*yt};return wt!==void 0&&(Pt.alpha=wt),Pt},Wr=kr,sn={mode:"xyz65",toMode:{rgb:Vt,xyz50:Ur},fromMode:{rgb:Je,xyz50:Wr},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:Kt}}},gn=sn,Cn=({r:Le,g:Oe,b:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"yiq",y:.29889531*Le+.58662247*Oe+.11448223*Ke,i:.59597799*Le-.2741761*Oe-.32180189*Ke,q:.21147017*Le-.52261711*Oe+.31114694*Ke};return yt!==void 0&&(wt.alpha=yt),wt},Zn=Cn,ya=({y:Le,i:Oe,q:Ke,alpha:yt})=>{Le===void 0&&(Le=0),Oe===void 0&&(Oe=0),Ke===void 0&&(Ke=0);let wt={mode:"rgb",r:Le+.95608445*Oe+.6208885*Ke,g:Le-.27137664*Oe-.6486059*Ke,b:Le-1.10561724*Oe+1.70250126*Ke};return yt!==void 0&&(wt.alpha=yt),wt},Na=ya,wi={mode:"yiq",toMode:{rgb:Na},fromMode:{rgb:Zn},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:At,i:At,q:At,alpha:{use:At,fixup:Kt}}},Yi=wi,Ti=(Le,Oe)=>Math.round(Le*(Oe=Math.pow(10,Oe)))/Oe,_o=(Le=4)=>Oe=>typeof Oe=="number"?Ti(Oe,Le):Oe,bo=_o,Zo=bo(2),fs=Le=>Math.max(0,Math.min(1,Le||0)),Po=Le=>Math.round(fs(Le)*255),Es=P("rgb"),cl=P("hsl"),ql=Le=>{if(Le===void 0)return;let Oe=Po(Le.r),Ke=Po(Le.g),yt=Po(Le.b);return"#"+(1<<24|Oe<<16|Ke<<8|yt).toString(16).slice(1)},Js=Le=>{if(Le===void 0)return;let Oe=Po(Le.alpha!==void 0?Le.alpha:1);return ql(Le)+(256|Oe).toString(16).slice(1)},Tu=Le=>{if(Le===void 0)return;let Oe=Po(Le.r),Ke=Po(Le.g),yt=Po(Le.b);return Le.alpha===void 0||Le.alpha===1?`rgb(${Oe}, ${Ke}, ${yt})`:`rgba(${Oe}, ${Ke}, ${yt}, ${Zo(fs(Le.alpha))})`},Li=Le=>{if(Le===void 0)return;let Oe=Zo(Le.h||0),Ke=Zo(fs(Le.s)*100)+"%",yt=Zo(fs(Le.l)*100)+"%";return Le.alpha===void 0||Le.alpha===1?`hsl(${Oe}, ${Ke}, ${yt})`:`hsla(${Oe}, ${Ke}, ${yt}, ${Zo(fs(Le.alpha))})`},Vi=Le=>{let Oe=B(Le);if(!Oe)return;let Ke=oe(Oe.mode);if(!Ke.serialize||typeof Ke.serialize=="string"){let yt=`color(${Ke.serialize||`--${Oe.mode}`} `;return Ke.channels.forEach((wt,Pt)=>{wt!=="alpha"&&(yt+=(Pt?" ":"")+(Oe[wt]!==void 0?Oe[wt]:"none"))}),Oe.alpha!==void 0&&Oe.alpha<1&&(yt+=` / ${Oe.alpha}`),yt+")"}if(typeof Ke.serialize=="function")return Ke.serialize(Oe)},fl=Le=>ql(Es(Le)),Ku=Le=>Js(Es(Le)),tu=Le=>Tu(Es(Le)),Bs=Le=>Li(cl(Le)),oc={normal:(Le,Oe)=>Oe,multiply:(Le,Oe)=>Le*Oe,screen:(Le,Oe)=>Le+Oe-Le*Oe,"hard-light":(Le,Oe)=>Oe<.5?Le*2*Oe:2*Oe*(1-Le)-1,overlay:(Le,Oe)=>Le<.5?Oe*2*Le:2*Le*(1-Oe)-1,darken:(Le,Oe)=>Math.min(Le,Oe),lighten:(Le,Oe)=>Math.max(Le,Oe),"color-dodge":(Le,Oe)=>Le===0?0:Oe===1?1:Math.min(1,Le/(1-Oe)),"color-burn":(Le,Oe)=>Le===1?1:Oe===0?0:1-Math.min(1,(1-Le)/Oe),"soft-light":(Le,Oe)=>Oe<.5?Le-(1-2*Oe)*Le*(1-Le):Le+(2*Oe-1)*((Le<.25?((16*Le-12)*Le+4)*Le:Math.sqrt(Le))-Le),difference:(Le,Oe)=>Math.abs(Le-Oe),exclusion:(Le,Oe)=>Le+Oe-2*Le*Oe},du=(Le,Oe="normal",Ke="rgb")=>{let yt=typeof Oe=="function"?Oe:oc[Oe],wt=P(Ke),Pt=oe(Ke).channels;return Le.map(Zr=>{let Mn=wt(Zr);return Mn.alpha===void 0&&(Mn.alpha=1),Mn}).reduce((Zr,Mn)=>{if(Zr===void 0)return Mn;let va=Mn.alpha+Zr.alpha*(1-Mn.alpha);return Pt.reduce((aa,ea)=>(ea!=="alpha"&&(va===0?aa[ea]=0:(aa[ea]=Mn.alpha*(1-Zr.alpha)*Mn[ea]+Mn.alpha*Zr.alpha*yt(Zr[ea],Mn[ea])+(1-Mn.alpha)*Zr.alpha*Zr[ea],aa[ea]=Math.max(0,Math.min(1,aa[ea]/va)))),aa),{mode:Ke,alpha:va})})},hl=du,Uc=([Le,Oe])=>Le+Math.random()*(Oe-Le),he=Le=>Object.keys(Le).reduce((Oe,Ke)=>{let yt=Le[Ke];return Oe[Ke]=Array.isArray(yt)?yt:[yt,yt],Oe},{}),Se=(Le="rgb",Oe={})=>{let Ke=oe(Le),yt=he(Oe);return Ke.channels.reduce((wt,Pt)=>((yt.alpha||Pt!=="alpha")&&(wt[Pt]=Uc(yt[Pt]||Ke.ranges[Pt])),wt),{mode:Le})},je=Se,Qe=(Le,Oe="rgb",Ke=!1)=>{let yt=Oe?oe(Oe).channels:null,wt=Oe?P(Oe):B;return Pt=>{let pr=wt(Pt);if(!pr)return;let Zr=(yt||oe(pr.mode).channels).reduce((va,aa)=>{let ea=Le(pr[aa],aa,pr,Oe);return ea!==void 0&&!isNaN(ea)&&(va[aa]=ea),va},{mode:pr.mode});if(!Ke)return Zr;let Mn=B(Pt);return Mn&&Mn.mode!==Zr.mode?P(Mn.mode)(Zr):Zr}},tt=(Le,Oe,Ke)=>Oe!=="alpha"?(Le||0)*(Ke.alpha!==void 0?Ke.alpha:1):Le,ut=(Le,Oe,Ke)=>Oe!=="alpha"&&Ke.alpha!==0?(Le||0)/(Ke.alpha!==void 0?Ke.alpha:1):Le,jt=(Le=1,Oe=0)=>(Ke,yt)=>yt!=="alpha"?Ke*Le+Oe:Ke,St=(Le=1,Oe=1,Ke=0)=>(yt,wt)=>wt!=="alpha"?Le*Math.pow(yt,Oe)+Ke:yt,Qt=Le=>{Le[0]===void 0&&(Le[0]=0),Le[Le.length-1]===void 0&&(Le[Le.length-1]=1);let Oe=1,Ke,yt,wt,Pt;for(;OeOe=>Le<=0?1:Le>=1?0:Math.pow(Oe,Math.log(.5)/Math.log(Le)),Kr=yr,$r=Le=>typeof Le=="function",bn=Le=>Le&&typeof Le=="object",Rn=Le=>typeof Le=="number",rn=(Le,Oe="rgb",Ke,yt)=>{let wt=oe(Oe),Pt=P(Oe),pr=[],Zr=[],Mn={};Le.forEach(ja=>{Array.isArray(ja)?(pr.push(Pt(ja[0])),Zr.push(ja[1])):Rn(ja)||$r(ja)?Mn[Zr.length]=ja:(pr.push(Pt(ja)),Zr.push(void 0))}),gr(Zr);let va=wt.channels.reduce((ja,ka)=>{let za;return bn(Ke)&&bn(Ke[ka])&&Ke[ka].fixup?za=Ke[ka].fixup:bn(wt.interpolate[ka])&&wt.interpolate[ka].fixup?za=wt.interpolate[ka].fixup:za=Ua=>Ua,ja[ka]=za(pr.map(Ua=>Ua[ka])),ja},{});if(yt){let ja=pr.map((ka,za)=>wt.channels.reduce((Ua,Ja)=>(Ua[Ja]=va[Ja][za],Ua),{mode:Oe}));va=wt.channels.reduce((ka,za)=>(ka[za]=ja.map(Ua=>{let Ja=yt(Ua[za],za,Ua,Oe);return isNaN(Ja)?void 0:Ja}),ka),{})}let aa=wt.channels.reduce((ja,ka)=>{let za;return $r(Ke)?za=Ke:bn(Ke)&&$r(Ke[ka])?za=Ke[ka]:bn(Ke)&&bn(Ke[ka])&&Ke[ka].use?za=Ke[ka].use:$r(wt.interpolate[ka])?za=wt.interpolate[ka]:bn(wt.interpolate[ka])&&(za=wt.interpolate[ka].use),ja[ka]=za(va[ka]),ja},{}),ea=pr.length-1;return ja=>{if(ja=Math.min(Math.max(0,ja),1),ja<=Zr[0])return pr[0];if(ja>Zr[ea])return pr[ea];let ka=0;for(;Zr[ka]{let ys=aa[Ds](Ki);return ys!==void 0&&(Qo[Ds]=ys),Qo},{mode:Oe})}},pn=(Le,Oe="rgb",Ke)=>rn(Le,Oe,Ke),xn=(Le,Oe)=>(Ke,yt="rgb",wt)=>{let Pt=Oe?Qe(Oe,yt):void 0,pr=rn(Ke,yt,wt,Le);return Pt?Zr=>Pt(pr(Zr)):pr},Bn=xn(tt,ut),Fn=(Le,Oe)=>(Le+Oe)%Oe,mn=(Le,Oe,Ke,yt,wt)=>{let Pt=wt*wt,pr=Pt*wt;return((1-3*wt+3*Pt-pr)*Le+(4-6*Pt+3*pr)*Oe+(1+3*wt+3*Pt-3*pr)*Ke+pr*yt)/6},Ea=Le=>Oe=>{let Ke=Le.length-1,yt=Oe>=1?Ke-1:Math.max(0,Math.floor(Oe*Ke));return mn(yt>0?Le[yt-1]:2*Le[yt]-Le[yt+1],Le[yt],Le[yt+1],ytOe=>{let Ke=Le.length-1,yt=Math.floor(Oe*Ke);return mn(Le[Fn(yt-1,Le.length)],Le[Fn(yt,Le.length)],Le[Fn(yt+1,Le.length)],Le[Fn(yt+2,Le.length)],(Oe-yt/Ke)*Ke)},Ka=Le=>{let Oe,Ke=Le.length-1,yt=new Array(Ke),wt=new Array(Ke),Pt=new Array(Ke);for(yt[1]=1/4,wt[1]=(6*Le[1]-Le[0])/4,Oe=2;Oe0&&(Pt[Ke-1]=wt[Ke-1]),Oe=Ke-2;Oe>0;--Oe)Pt[Oe]=wt[Oe]-yt[Oe]*Pt[Oe+1];return Pt},di=Le=>Ea(Ka(Le)),Oi=Le=>Oa(Ka(Le)),Pi=Math.sign,ko=Math.min,de=Math.abs,y=Le=>{let Oe=Le.length-1,Ke=[],yt=[],wt=[];for(let Pt=0;Pt0?.5*(Le[Pt+1]-Le[Pt-1])*Oe:void 0),wt.push(Pt>0?(Pi(Ke[Pt-1])+Pi(Ke[Pt]))*ko(de(Ke[Pt-1]),de(Ke[Pt]),.5*de(yt[Pt])):void 0);return[Ke,yt,wt]},O=(Le,Oe,Ke)=>{let yt=Le.length-1,wt=yt*yt;return Pt=>{let pr;Pt>=1?pr=yt-1:pr=Math.max(0,Math.floor(Pt*yt));let Zr=Pt-pr/yt,Mn=Zr*Zr,va=Mn*Zr;return(Oe[pr]+Oe[pr+1]-2*Ke[pr])*wt*va+(3*Ke[pr]-2*Oe[pr]-Oe[pr+1])*yt*Mn+Oe[pr]*Zr+Le[pr]}},ie=Le=>{if(Le.length<3)return At(Le);let Oe=Le.length-1,[Ke,,yt]=y(Le);return yt[0]=Ke[0],yt[Oe]=Ke[Oe-1],O(Le,yt,Ke)},ce=Le=>{if(Le.length<3)return At(Le);let Oe=Le.length-1,[Ke,yt,wt]=y(Le);return yt[0]=(Le[1]*2-Le[0]*1.5-Le[2]*.5)*Oe,yt[Oe]=(Le[Oe]*1.5-Le[Oe-1]*2+Le[Oe-2]*.5)*Oe,wt[0]=yt[0]*Ke[0]<=0?0:de(yt[0])>2*de(Ke[0])?2*Ke[0]:yt[0],wt[Oe]=yt[Oe]*Ke[Oe-1]<=0?0:de(yt[Oe])>2*de(Ke[Oe-1])?2*Ke[Oe-1]:yt[Oe],O(Le,wt,Ke)},_e=Le=>{let Oe=Le.length-1,[Ke,yt,wt]=y(Le);yt[0]=.5*(Le[1]-Le[Oe])*Oe,yt[Oe]=.5*(Le[0]-Le[Oe-1])*Oe;let Pt=(Le[0]-Le[Oe])*Oe,pr=Pt;return wt[0]=(Pi(Pt)+Pi(Ke[0]))*ko(de(Pt),de(Ke[0]),.5*de(yt[0])),wt[Oe]=(Pi(Ke[Oe-1])+Pi(pr))*ko(de(Ke[Oe-1]),de(pr),.5*de(yt[Oe])),O(Le,wt,Ke)},De=(Le=1)=>Le===1?Oe=>Oe:Oe=>Math.pow(Oe,Le),Ne=De,Ye=(Le=2,Oe=1)=>{let Ke=Ne(Oe);if(Le<2)return Le<1?[]:[Ke(.5)];let yt=[];for(let wt=0;wt{let Oe={mode:Le.mode,r:Math.max(0,Math.min(Le.r!==void 0?Le.r:0,1)),g:Math.max(0,Math.min(Le.g!==void 0?Le.g:0,1)),b:Math.max(0,Math.min(Le.b!==void 0?Le.b:0,1))};return Le.alpha!==void 0&&(Oe.alpha=Le.alpha),Oe},Gt=Le=>Ft(ct(Le)),Jt=Le=>Le!==void 0&&(Le.r===void 0||Le.r>=0&&Le.r<=1)&&(Le.g===void 0||Le.g>=0&&Le.g<=1)&&(Le.b===void 0||Le.b>=0&&Le.b<=1);function it(Le){return Jt(ct(Le))}function Rt(Le="rgb"){let{gamut:Oe}=oe(Le);if(!Oe)return yt=>!0;let Ke=P(typeof Oe=="string"?Oe:Le);return yt=>Jt(Ke(yt))}function qt(Le){return Le=B(Le),Le===void 0||it(Le)?Le:P(Le.mode)(Gt(Le))}function or(Le="rgb"){let{gamut:Oe}=oe(Le);if(!Oe)return Pt=>B(Pt);let Ke=typeof Oe=="string"?Oe:Le,yt=P(Ke),wt=Rt(Ke);return Pt=>{let pr=B(Pt);if(!pr)return;let Zr=yt(pr);if(wt(Zr))return pr;let Mn=Ft(Zr);return pr.mode===Mn.mode?Mn:P(pr.mode)(Mn)}}function vr(Le,Oe="lch",Ke="rgb"){Le=B(Le);let yt=Ke==="rgb"?it:Rt(Ke),wt=Ke==="rgb"?Gt:or(Ke);if(Le===void 0||yt(Le))return Le;let Pt=P(Le.mode);Le=P(Oe)(Le);let pr=Qr(Nr({},Le),{c:0});if(!yt(pr))return Pt(wt(pr));let Zr=0,Mn=Le.c!==void 0?Le.c:0,va=oe(Oe).ranges.c,aa=(va[1]-va[0])/Math.pow(2,13),ea=pr.c;for(;Mn-Zr>aa;)pr.c=Zr+(Mn-Zr)*.5,yt(pr)?(ea=pr.c,Zr=pr.c):Mn=pr.c;return Pt(yt(pr)?pr:Qr(Nr({},pr),{c:ea}))}function Ar(Le="rgb",Oe="oklch",Ke=ci("oklch"),yt=.02){let wt=P(Le),Pt=oe(Le);if(!Pt.gamut)return aa=>wt(aa);let pr=Rt(Le),Zr=or(Le),Mn=P(Oe),{ranges:va}=oe(Oe);if(!va.l||!va.c)throw new Error("LCH-like space expected");return aa=>{if(aa=B(aa),aa===void 0)return;let ea=Nr({},Mn(aa));if(ea.l===void 0&&(ea.l=0),ea.c===void 0&&(ea.c=0),ea.l>=va.l[1]){let Ja=Qr(Nr({},Pt.white),{mode:Le});return aa.alpha!==void 0&&(Ja.alpha=aa.alpha),Ja}if(ea.l<=va.l[0]){let Ja=Qr(Nr({},Pt.black),{mode:Le});return aa.alpha!==void 0&&(Ja.alpha=aa.alpha),Ja}if(pr(ea))return wt(ea);let ja=0,ka=ea.c,za=(va.c[1]-va.c[0])/4e3,Ua=Zr(ea);for(;ka-ja>za;)ea.c=(ja+ka)*.5,Ua=Zr(ea),pr(ea)||Ke&&yt>0&&Ke(ea,Ua)<=yt?ja=ea.c:ka=ea.c;return wt(pr(ea)?ea:Ua)}}var dr=(Le,Oe=ci(),Ke=yt=>yt)=>{let yt=Le.map((wt,Pt)=>({color:Ke(wt),i:Pt}));return(wt,Pt=1,pr=1/0)=>(isFinite(Pt)&&(Pt=Math.max(1,Math.min(Pt,yt.length-1))),yt.forEach(Zr=>{Zr.d=Oe(wt,Zr.color)}),yt.sort((Zr,Mn)=>Zr.d-Mn.d).slice(0,Pt).filter(Zr=>Zr.dLe[Zr.i]))},mr=dr,qr=Le=>Math.max(Le,0),Lr=Le=>Math.max(Math.min(Le,1),0),cn=(Le,Oe,Ke)=>Le===void 0||Oe===void 0?void 0:Le+Ke*(Oe-Le),Nn=Le=>{let Oe=1-Lr(Le);return[.393+.607*Oe,.769-.769*Oe,.189-.189*Oe,0,.349-.349*Oe,.686+.314*Oe,.168-.168*Oe,0,.272-.272*Oe,.534-.534*Oe,.131+.869*Oe,0,0,0,0,1]},Dn=Le=>{let Oe=qr(Le);return[.213+.787*Oe,.715-.715*Oe,.072-.072*Oe,0,.213-.213*Oe,.715+.285*Oe,.072-.072*Oe,0,.213-.213*Oe,.715-.715*Oe,.072+.928*Oe,0,0,0,0,1]},qn=Le=>{let Oe=1-Lr(Le);return[.2126+.7874*Oe,.7152-.7152*Oe,.0722-.0722*Oe,0,.2126-.2126*Oe,.7152+.2848*Oe,.0722-.0722*Oe,0,.2126-.2126*Oe,.7152-.7152*Oe,.0722+.9278*Oe,0,0,0,0,1]},_n=Le=>{let Oe=Math.PI*Le/180,Ke=Math.cos(Oe),yt=Math.sin(Oe);return[.213+Ke*.787-yt*.213,.715-Ke*.715-yt*.715,.072-Ke*.072+yt*.928,0,.213-Ke*.213+yt*.143,.715+Ke*.285+yt*.14,.072-Ke*.072-yt*.283,0,.213-Ke*.213-yt*.787,.715-Ke*.715+yt*.715,.072+Ke*.928+yt*.072,0,0,0,0,1]},vn=(Le,Oe,Ke=!1)=>{let yt=P(Oe),wt=oe(Oe).channels;return Pt=>{let pr=yt(Pt);if(!pr)return;let Zr={mode:Oe},Mn,va=wt.length;for(let ea=0;ea{let Ke=qr(Le);return Qe(jt(Ke),Oe,!0)},Tn=(Le=1,Oe="rgb")=>{let Ke=qr(Le);return Qe(jt(Ke,(1-Ke)/2),Oe,!0)},Xn=(Le=1,Oe="rgb")=>vn(Nn(Le),Oe,!0),$n=(Le=1,Oe="rgb")=>vn(Dn(Le),Oe,!0),Ha=(Le=1,Oe="rgb")=>vn(qn(Le),Oe,!0),$a=(Le=1,Oe="rgb")=>{let Ke=Lr(Le);return Qe((yt,wt)=>wt==="alpha"?yt:cn(Ke,1-Ke,yt),Oe,!0)},Si=(Le=0,Oe="rgb")=>vn(_n(Le),Oe,!0),Ma=P("rgb"),xa=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],gi=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],Wa=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],Ya=(Le,Oe)=>{let Ke=Math.max(0,Math.min(1,Oe)),yt=Math.round(Ke/.1),wt=Math.round(Ke%.1),Pt=Le[yt];if(wt>0&&ytFe(Pt[Mn],pr[Mn],wt))}return pr=>{let Zr=B(pr);if(Zr===void 0)return;let{r:Mn,g:va,b:aa}=Ma(Zr),ea={mode:"rgb",r:Pt[0]*Mn+Pt[1]*va+Pt[2]*aa,g:Pt[3]*Mn+Pt[4]*va+Pt[5]*aa,b:Pt[6]*Mn+Pt[7]*va+Pt[8]*aa};return Zr.alpha!==void 0&&(ea.alpha=Zr.alpha),P(Zr.mode)(ea)}},Xa=(Le=1)=>Ya(xa,Le),pi=(Le=1)=>Ya(gi,Le),Xi=(Le=1)=>Ya(Wa,Le),Eo=Le=>Le*Le*(3-2*Le),yi=Le=>.5-Math.sin(Math.asin(1-2*Le)/3),Ui=Le=>Le*Le*Le*(Le*(Le*6-15)+10),fo=Ui,To=Le=>(1-Math.cos(Le*Math.PI))/2,jo=To;function qs(Le){let Oe=P("lrgb")(Le);return .2126*Oe.r+.7152*Oe.g+.0722*Oe.b}function Vs(Le,Oe){let Ke=qs(Le),yt=qs(Oe);return(Math.max(Ke,yt)+.05)/(Math.min(Ke,yt)+.05)}var Uo=ae(Wt),Qs=ae(Fr),os=ae(Io),hs=ae(Oo),ss=ae(wo),ks=ae(Zs),ts=ae(Ji),el=ae(yl),Il=ae(fc),Do=ae(Vu),ru=ae(Pu),Ns=ae(Cl),Nu=ae(If),Vl=ae(ll),Hl=ae(Nc),Co=ae(Pl),is=ae(_c),Hs=ae(ac),fn=ae(_i),la=ae(go),ha=ae(as),ao=ae(ps),ds=ae(Nl),Os=ae(Zu),io=ae(jc),en=ae(_r),dn=ae(Nt),An=ae(Yt),sa=ae(gn),wa=ae(Yi)}}),Ra=Ee({"src/plot_api/plot_config.js"(J,V){"use strict";var v={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},x={};function E(k,l){for(var e in k){var t=k[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),E(t,l[e]))}}E(v,x),V.exports={configAttributes:v,dfltConfig:x}}}),no=Ee({"src/lib/notifier.js"(J,V){"use strict";var v=Hn(),x=mi(),E=[];V.exports=function(k,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||E.indexOf(k)!==-1)return;E.push(k);var a=1e3;x(l)?a=l:l==="long"&&(a=3e3);var r=v.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var n=r.selectAll(".notifier-note").data(E);function o(s){s.duration(700).style("opacity",0).each("end",function(c){var m=E.indexOf(c);m!==-1&&E.splice(m,1),v.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=v.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(o)});for(var m=c.append("p"),h=s.split(//g),p=0;p1){var l=["LOG:"];for(k=0;k1){var e=[];for(k=0;k"),"long")}},E.warn=function(){var k;if(v.logging>0){var l=["WARN:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}},E.error=function(){var k;if(v.logging>0){var l=["ERROR:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}}}}),rs=Ee({"src/components/color/attributes.js"(J){"use strict";J.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],J.defaultLine="#444",J.lightLine="#eee",J.background="#fff",J.borderLine="#BEC8D9",J.lightFraction=100*10/11}}),Qa=Ee({"src/components/color/index.js"(J,V){"use strict";var{converter:v,formatHex:x,formatRgb:E,wcagContrast:k,wcagLuminance:l}=Ia(),{isArrayOrTypedArray:e}=vs(),{warn:t}=po(),{background:a,defaultLine:r,defaults:n,lightLine:o}=rs(),s=v("rgb"),c=v("hsl"),m=q=>{if(typeof q!="string")return;let $=q.trim().toLowerCase();if(!/^[0-9a-f]+$/.test($))try{return s($)}catch{return}},h=q=>q>0?q>1?1:q:0,p={mode:"rgb",r:0,g:0,b:0,alpha:1},g=q=>Math.round(q*255e6)/255e6,i=q=>Qr(Nr({},q),{r:g(q.r),g:g(q.g),b:g(q.b)}),w=q=>E(i(q)),S=q=>x(i(q)),M=(q,$)=>{var ee;let ne=m(q);return ne?((ee=ne.alpha)!=null||(ne.alpha=1),ne):(!$&&q!=null&&t(`Invalid color specifier: "${q}". Defaulting to "#000"`),p)},C=q=>w(Qr(Nr({},M(q)),{alpha:1})),_=q=>q?M(q).alpha:0,T=q=>e(q)&&q.length>2&&Number.isFinite(q[0])&&Number.isFinite(q[1])&&Number.isFinite(q[2]),f=q=>{let[$,ee,ne,fe]=q,ye=Math.max($,ee,ne)>1?1/255:1,xe=fe??1;return{mode:"rgb",r:$*ye,g:ee*ye,b:ne*ye,alpha:xe>1?xe/255:xe}},u=(q,$)=>{let ee=T(q)?f(q):M(q,!0),ne=[h(ee.r),h(ee.g),h(ee.b),h(ee.alpha)];return $==="uint8"||$==="uint8_clamped"?Uint8Array.from(ne,fe=>Math.round(fe*255)):$==="float32"?Float32Array.from(ne):$==="float64"?Float64Array.from(ne):ne},A=(q,$)=>w(Qr(Nr({},M(q)),{alpha:h($)})),b=(q,$)=>{let ee=M(q),ne=ee.alpha;if(ne===1)return w(ee);let fe=M($||a),ye=fe.alpha,xe=(Ae,Me)=>(ye===1?Me:1-ye+Me*ye)*(1-ne)+Ae*ne;return w({mode:"rgb",r:xe(ee.r,fe.r),g:xe(ee.g,fe.g),b:xe(ee.b,fe.b)})},z=(q,$,ee)=>{let ne=M(q),fe=M($),ye=(xe,Ae)=>ee*xe+(1-ee)*Ae;return w({mode:"rgb",r:ye(ne.r,fe.r),g:ye(ne.g,fe.g),b:ye(ne.b,fe.b)})},I=(q,$)=>{let ee=M(q),ne=c(ee)||{mode:"hsl",h:0,s:0,l:0};return w(s(Qr(Nr({},ne),{l:h((ne.l*100+$)/100),alpha:ee.alpha})))},N=(q,$)=>k(M(q),M($)),R=q=>N(q,a)>N(q,r),B=w(M(a)),F=w(M(r)),P=(q,$,ee)=>(M(q).alpha!==1&&(q=b(q,a)),R(q)?$?I(q,$):B:ee?I(q,-ee):F),j=(q,$)=>{q.style({stroke:C($),"stroke-opacity":M($).alpha})},U=(q,$)=>{q.style({fill:C($),"fill-opacity":M($).alpha})},Z=(q,$)=>!!(q&&$&&C(q)===C($)),Q=q=>m(q)!==void 0,re=(q,$)=>{$=$===0?0:$||10;let ee=M(q),ne=$/100;return w(Qr(Nr({},ee),{r:h(ee.r+ne),g:h(ee.g+ne),b:h(ee.b+ne)}))},ae=(q,$,ee)=>{let ne=M(q),fe=M($),ye=ee/100,xe=fe.alpha-ne.alpha,Ae=2*ye-1,Me=((Ae*xe===-1?Ae:(Ae+xe)/(1+Ae*xe))+1)/2,Ie=1-Me,Ue=(qe,ke)=>Ie*qe+Me*ke;return w({mode:"rgb",r:Ue(ne.r,fe.r),g:Ue(ne.g,fe.g),b:Ue(ne.b,fe.b),alpha:ne.alpha*(1-ye)+fe.alpha*ye})},oe=(q,$=["#000","#fff"])=>{let ee,ne=-1/0;for(let fe of $){let ye=N(q,fe);ye>ne&&(ne=ye,ee=w(M(fe)))}return ee},H=q=>w(M(q)),X=q=>S(M(q)).toUpperCase(),K=q=>{let $=M(q);return[h($.r)*255,h($.g)*255,h($.b)*255,h($.alpha)]},G=([q,$,ee,ne])=>w({mode:"rgb",r:q/255,g:$/255,b:ee/255,alpha:ne}),Y=q=>{let $=M(q);return l({mode:"rgb",r:h($.r),g:h($.g),b:h($.b)})};V.exports={addOpacity:A,adjustLightness:I,background:a,brighten:re,combine:b,contrast:P,defaultLine:r,defaults:n,equals:Z,fill:U,hexString:X,interpolate:z,isChannelArray:T,isDark:R,isValid:Q,lightLine:o,luminosity:Y,mix:ae,mostReadable:oe,normalize:u,opacity:_,parse:M,rgb:C,rgbaArray:K,rgbaArrayToString:G,rgbaString:H,stroke:j,wcagContrast:N}}}),uh=Ee({"src/components/colorscale/scales.js"(J,V){"use strict";var v=Qa(),x={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},E=x.RdBu;function k(t,a){if(a||(a=E),!t)return a;function r(){try{t=x[t]||JSON.parse(t)}catch{t=a}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:a}function l(t){var a=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rdA});function dA(J,V="",v,x){let E=V+(v?"":"$"),k=x===!1?"":"^";return J==="xy"?new RegExp(k+"x"+B0+"y"+B0+E):new RegExp(k+J+B0+E)}var B0,Rp=In({"src/lib/regex.ts"(){"use strict";B0="([2-9]|[1-9][0-9]+)?"}}),vA=Ee({"src/lib/coerce.js"(J){"use strict";var V=mi(),v=vo().extendFlat,x=ia(),E=uh(),k=Qa(),l=gd().DESELECTDIM,e=dl(),t=(Rp(),ra(Sv)).counter,a=(Vd(),ra(lh)).modHalf,r=vs().isArrayOrTypedArray,n=vs().isTypedArraySpec,o=vs().decodeTypedArraySpec;J.valObjectMeta={data_array:{coerceFunction:function(c,m,h){m.set(r(c)?c:n(c)?o(c):h)}},enumerated:{coerceFunction:function(c,m,h,p){p.coerceNumber&&(c=+c),p.values.indexOf(c)===-1?m.set(h):m.set(c)},validateFunction:function(c,m){m.coerceNumber&&(c=+c);for(var h=m.values,p=0;pi===!0||i===!1;g(c)||p.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(g)?m.set(c):m.set(h)}},number:{coerceFunction:function(c,m,h,p){n(c)&&(c=o(c)),!V(c)||p.min!==void 0&&cp.max?m.set(h):m.set(+c)}},integer:{coerceFunction:function(c,m,h,p){if((p.extras||[]).indexOf(c)!==-1){m.set(c);return}n(c)&&(c=o(c)),c%1||!V(c)||p.min!==void 0&&cp.max?m.set(h):m.set(+c)}},string:{coerceFunction:function(c,m,h,p){if(typeof c!="string"){var g=typeof c=="number";p.strict===!0||!g?m.set(h):m.set(String(c))}else p.noBlank&&!c?m.set(h):m.set(c)}},color:{coerceFunction:function(c,m,h){n(c)&&(c=o(c)),k.isValid(c)?m.set(c):m.set(h)}},colorlist:{coerceFunction:function(c,m,h){!Array.isArray(c)||!c.length?m.set(h):c.every(p=>k.isValid(p))?m.set(c):m.set(h)}},colorscale:{coerceFunction:function(c,m,h){m.set(E.get(c,h))}},angle:{coerceFunction:function(c,m,h){n(c)&&(c=o(c)),c==="auto"?m.set("auto"):V(c)?m.set(a(+c,360)):m.set(h)}},subplotid:{coerceFunction:function(c,m,h,p){var g=p.regex||t(h);let i=w=>typeof w=="string"&&g.test(w);i(c)||p.arrayOk&&r(c)&&c.length>0&&c.every(i)?m.set(c):m.set(h)},validateFunction:function(c,m){var h=m.dflt;return c===h?!0:typeof c!="string"?!1:!!t(h).test(c)}},flaglist:{coerceFunction:function(c,m,h,p){if((p.extras||[]).indexOf(c)!==-1){m.set(c);return}if(typeof c!="string"){m.set(h);return}for(var g=c.split("+"),i=0;iNr({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.texttemplateAttrs=({editType:k="calc",arrayOk:l}={},e={})=>Nr({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.shapeTexttemplateAttrs=({editType:k="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:k}),J.templatefallbackAttrs=({editType:k="none"}={})=>({valType:"any",dflt:"-",editType:k})}}),Cg=Ee({"src/components/shapes/label_texttemplate.js"(J,V){"use strict";function v(M,C){return C?C.d2l(M):M}function x(M,C){return C?C.l2d(M):M}function E(M){return M.x0}function k(M){return M.x1}function l(M){return M.y0}function e(M){return M.y1}function t(M){return M.x0shift||0}function a(M){return M.x1shift||0}function r(M){return M.y0shift||0}function n(M){return M.y1shift||0}function o(M,C){return v(M.x1,C)+a(M)-v(M.x0,C)-t(M)}function s(M,C,_){return v(M.y1,_)+n(M)-v(M.y0,_)-r(M)}function c(M,C){return Math.abs(o(M,C))}function m(M,C,_){return Math.abs(s(M,C,_))}function h(M,C,_){return M.type!=="line"?void 0:Math.sqrt(Math.pow(o(M,C),2)+Math.pow(s(M,C,_),2))}function p(M,C){return x((v(M.x1,C)+a(M)+v(M.x0,C)+t(M))/2,C)}function g(M,C,_){return x((v(M.y1,_)+n(M)+v(M.y0,_)+r(M))/2,_)}function i(M,C,_){return M.type!=="line"?void 0:s(M,C,_)/o(M,C)}var w=["x0","x1","y0","y1","dy","height","ycenter"],S=["x0","x1","y0","y1","dx","width","xcenter"];V.exports={x0:E,x1:k,y0:l,y1:e,slope:i,dx:o,dy:s,width:c,height:m,length:h,xcenter:p,ycenter:g,simpleXVariables:w,simpleYVariables:S}}}),VA=Ee({"src/components/shapes/draw_newshape/attributes.js"(J,V){"use strict";var v=El().overrideAll,x=ia(),E=Xs(),k=kc().dash,l=vo().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),a=Cg();V.exports=v({newshape:{visible:l({},x.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},x.legend,{}),legendgroup:l({},x.legendgroup,{}),legendgrouptitle:{text:l({},x.legendgrouptitle.text,{}),font:E({})},legendrank:l({},x.legendrank,{}),legendwidth:l({},x.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},k,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:l({},x.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(a)}),texttemplatefallback:t({editType:"arraydraw"}),font:E({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),HA=Ee({"src/components/selections/draw_newselection/attributes.js"(J,V){"use strict";var v=kc().dash,x=vo().extendFlat;V.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:x({},v,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Lg=Ee({"src/plots/pad_attributes.js"(J,V){"use strict";V.exports=function(v){var x=v.editType;return{t:{valType:"number",dflt:0,editType:x},r:{valType:"number",dflt:0,editType:x},b:{valType:"number",dflt:0,editType:x},l:{valType:"number",dflt:0,editType:x},editType:x}}}}),Fp=Ee({"src/plots/layout_attributes.js"(J,V){"use strict";var v=Xs(),x=O0(),E=rs(),k=VA(),l=HA(),e=Lg(),t=vo().extendFlat,a=v({editType:"calc"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=E.defaultLine,V.exports={font:a,title:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:v({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:t(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:E.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:E.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:E.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:k.newshape,activeshape:k.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},x.transition,{editType:"none"})}}}),GA=Ee({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var J=document.createElement("style");J.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",J.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(J)}})()}}),Ri=Ee({"src/registry.js"(J){"use strict";var V=po(),v=Eg(),x=vb(),E=N0().addStyleRule,k=vo(),l=ia(),e=Fp(),t=k.extendFlat,a=k.extendDeepAll;J.modules={},J.allCategories={},J.allTypes=[],J.subplotsRegistry={},J.componentsRegistry={},J.layoutArrayContainers=[],J.layoutArrayRegexes=[],J.traceLayoutAttributes={},J.localeRegistry={},J.apiMethodRegistry={},J.collectableSubplotTypes=null,J.register=function(i){if(J.collectableSubplotTypes=null,i)i&&!Array.isArray(i)&&(i=[i]);else throw new Error("No argument passed to Plotly.register.");for(var w=0;w=i&&R<=w?R:l}if(typeof R!="string"&&typeof R!="number")return l;R=String(R);var U=p(B),Z=R.charAt(0);U&&(Z==="G"||Z==="g")&&(R=R.slice(1),B="");var Q=U&&B.slice(0,7)==="chinese",re=R.match(Q?m:c);if(!re)return l;var ae=re[1],oe=re[3]||"1",H=Number(re[5]||1),X=Number(re[7]||0),K=Number(re[9]||0),G=Number(re[11]||0);if(U){if(ae.length===2)return l;ae=Number(ae);var Y;try{var q=o.getComponentMethod("calendars","getCal")(B);if(Q){var $=oe.charAt(oe.length-1)==="i";oe=parseInt(oe,10),Y=q.newDate(ae,q.toMonthIndex(ae,oe,$),H)}else Y=q.newDate(ae,Number(oe),H)}catch{return l}return Y?(Y.toJD()-n)*e+X*t+K*a+G*r:l}ae.length===2?ae=(Number(ae)+2e3-h)%100+h:ae=Number(ae),oe-=1;var ee=new Date(Date.UTC(2e3,oe,H,X,K));return ee.setUTCFullYear(ae),ee.getUTCMonth()!==oe||ee.getUTCDate()!==H?l:ee.getTime()+G*r},i=J.MIN_MS=J.dateTime2ms("-9999"),w=J.MAX_MS=J.dateTime2ms("9999-12-31 23:59:59.9999"),J.isDateTime=function(R,B){return J.dateTime2ms(R,B)!==l};function S(R,B){return String(R+Math.pow(10,B)).slice(1)}var M=90*e,C=3*t,_=5*a;J.ms2DateTime=function(R,B,F){if(typeof R!="number"||!(R>=i&&R<=w))return l;B||(B=0);var P=Math.floor(E(R+.05,1)*10),j=Math.round(R-P/10),U,Z,Q,re,ae,oe;if(p(F)){var H=Math.floor(j/e)+n,X=Math.floor(E(R,e));try{U=o.getComponentMethod("calendars","getCal")(F).fromJD(H).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(j))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;Z=B=i+e&&R<=w-e))return l;var B=Math.floor(E(R+.05,1)*10),F=new Date(Math.round(R-B/10)),P=V("%Y-%m-%d")(F),j=F.getHours(),U=F.getMinutes(),Z=F.getSeconds(),Q=F.getUTCMilliseconds()*10+B;return T(P,j,U,Z,Q)};function T(R,B,F,P,j){if((B||F||P||j)&&(R+=" "+S(B,2)+":"+S(F,2),(P||j)&&(R+=":"+S(P,2),j))){for(var U=4;j%10===0;)U-=1,j/=10;R+="."+S(j,U)}return R}J.cleanDate=function(R,B,F){if(R===l)return B;if(J.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(p(F))return x.error("JS Dates and milliseconds are incompatible with world calendars",R),B;if(R=J.ms2DateTimeLocal(+R),!R&&B!==void 0)return B}else if(!J.isDateTime(R,F))return x.error("unrecognized date",R),B;return R};var f=/%\d?f/g,u=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function b(R,B,F,P){R=R.replace(f,function(U){var Z=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed(Z).slice(2).replace(/0+$/,"")||"0";return Q});var j=new Date(Math.floor(B+.05));if(R=R.replace(u,function(){return A[F("%q")(j)]}),p(P))try{R=o.getComponentMethod("calendars","worldCalFmt")(R,B,P)}catch{return"Invalid"}return F(R)(j)}var z=[59,59.9,59.99,59.999,59.9999];function I(R,B){var F=E(R+.05,e),P=S(Math.floor(F/t),2)+":"+S(E(Math.floor(F/a),60),2);if(B!=="M"){v(B)||(B=0);var j=Math.min(E(R/r,60),z[B]),U=(100+j).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+U}return P}J.formatDate=function(R,B,F,P,j,U){if(j=p(j)&&j,!B)if(F==="y")B=U.year;else if(F==="m")B=U.month;else if(F==="d")B=U.dayMonth+` +`+U.year;else return I(R,F)+` +`+b(U.dayMonthYear,R,P,j);return b(B,R,P,j)};var N=3*e;J.incrementMonth=function(R,B,F){F=p(F)&&F;var P=E(R,e);if(R=Math.round(R-P),F)try{var j=Math.round(R/e)+n,U=o.getComponentMethod("calendars","getCal")(F),Z=U.fromJD(j);return B%12?U.add(Z,B,"m"):U.add(Z,B/12,"y"),(Z.toJD()-n)*e+P}catch{x.error("invalid ms "+R+" in calendar "+F)}var Q=new Date(R+N);return Q.setUTCMonth(Q.getUTCMonth()+B)+P-N},J.findExactDates=function(R,B){for(var F=0,P=0,j=0,U=0,Z,Q,re=p(B)&&o.getComponentMethod("calendars","getCal")(B),ae=0;ae1?(n[c-1]-n[0])/(c-1):1,p,g;for(h>=0?g=o?l:e:g=o?a:t,r+=h*k*(o?-1:1)*(h>=0?1:-1);s90&&v.log("Long binary search..."),s-1};function l(r,n){return rn}function a(r,n){return r>=n}J.sorterAsc=function(r,n){return r-n},J.sorterDes=function(r,n){return n-r},J.distinctVals=function(r){var n=r.slice();n.sort(J.sorterAsc);var o;for(o=n.length-1;o>-1&&n[o]===E;o--);for(var s=n[o]-n[0]||1,c=s/(o||1)/1e4,m=[],h,p=0;p<=o;p++){var g=n[p],i=g-h;h===void 0?(m.push(g),h=g):i>c&&(s=Math.min(s,i),m.push(g),h=g)}return{vals:m,minDiff:s}},J.roundUp=function(r,n,o){for(var s=0,c=n.length-1,m,h=0,p=o?0:1,g=o?1:0,i=o?Math.ceil:Math.floor;s0&&(s=1),o&&s)return r.sort(n)}return s?r:r.reverse()},J.findIndexOfMin=function(r,n){n=n||x;for(var o=1/0,s,c=0;cyb});function YA(J){return Object.keys(J).sort()}var yb,Ev=In({"src/lib/sort_object_keys.ts"(){"use strict";yb=YA}}),XA=Ee({"src/lib/stats.js"(J){"use strict";var V=mi(),v=vs().isArrayOrTypedArray;J.aggNums=function(x,E,k,l){var e,t;if((!l||l>k.length)&&(l=k.length),V(E)||(E=!1),v(k[0])){for(t=new Array(l),e=0;ex.length-1)return x[x.length-1];var k=E%1;return k*x[Math.ceil(E)]+(1-k)*x[Math.floor(E)]}}}),$A=Ee({"src/lib/angles.js"(J,V){"use strict";var v=(Vd(),ra(lh)),x=v.mod,E=v.modHalf,k=Math.PI,l=2*k;function e(g){return g/180*k}function t(g){return g/k*180}function a(g){return Math.abs(g[1]-g[0])>l-1e-14}function r(g,i){return E(i-g,l)}function n(g,i){return Math.abs(r(g,i))}function o(g,i){if(a(i))return!0;var w,S;i[0]S&&(S+=l);var M=x(g,l),C=M+l;return M>=w&&M<=S||C>=w&&C<=S}function s(g,i,w,S){if(!o(i,S))return!1;var M,C;return w[0]=M&&g<=C}function c(g,i,w,S,M,C,_){M=M||0,C=C||0;var T=a([w,S]),f,u,A,b,z;T?(f=0,u=k,A=l):w1/3&&v.x<2/3},J.isRightAnchor=function(v){return v.xanchor==="right"||v.xanchor==="auto"&&v.x>=2/3},J.isTopAnchor=function(v){return v.yanchor==="top"||v.yanchor==="auto"&&v.y>=2/3},J.isMiddleAnchor=function(v){return v.yanchor==="middle"||v.yanchor==="auto"&&v.y>1/3&&v.y<2/3},J.isBottomAnchor=function(v){return v.yanchor==="bottom"||v.yanchor==="auto"&&v.y<=1/3}}}),KA=Ee({"src/lib/geometry2d.js"(J){"use strict";var V=(Vd(),ra(lh)).mod;J.segmentsIntersect=v;function v(e,t,a,r,n,o,s,c){var m=a-e,h=n-e,p=s-n,g=r-t,i=o-t,w=c-o,S=m*w-p*g;if(S===0)return null;var M=(h*w-p*i)/S,C=(h*g-m*i)/S;return C<0||C>1||M<0||M>1?null:{x:e+m*M,y:t+g*M}}J.segmentDistance=function(t,a,r,n,o,s,c,m){if(v(t,a,r,n,o,s,c,m))return 0;var h=r-t,p=n-a,g=c-o,i=m-s,w=h*h+p*p,S=g*g+i*i,M=Math.min(x(h,p,w,o-t,s-a),x(h,p,w,c-t,m-a),x(g,i,S,t-o,a-s),x(g,i,S,r-o,n-s));return Math.sqrt(M)};function x(e,t,a,r,n){var o=r*e+n*t;if(o<0)return r*r+n*n;if(o>a){var s=r-e,c=n-t;return s*s+c*c}else{var m=r*t-n*e;return m*m/a}}var E,k,l;J.getTextLocation=function(t,a,r,n){if((t!==k||n!==l)&&(E={},k=t,l=n),E[r])return E[r];var o=t.getPointAtLength(V(r-n/2,a)),s=t.getPointAtLength(V(r+n/2,a)),c=Math.atan((s.y-o.y)/(s.x-o.x)),m=t.getPointAtLength(V(r,a)),h=(m.x*4+o.x+s.x)/6,p=(m.y*4+o.y+s.y)/6,g={x:h,y:p,theta:c};return E[r]=g,g},J.clearLocationCache=function(){k=null},J.getVisibleSegment=function(t,a,r){var n=a.left,o=a.right,s=a.top,c=a.bottom,m=0,h=t.getTotalLength(),p=h,g,i;function w(M){var C=t.getPointAtLength(M);M===0?g=C:M===h&&(i=C);var _=C.xo?C.x-o:0,T=C.yc?C.y-c:0;return Math.sqrt(_*_+T*T)}for(var S=w(m);S;){if(m+=S+r,m>p)return;S=w(m)}for(S=w(p);S;){if(p-=S+r,m>p)return;S=w(p)}return{min:m,max:p,len:p-m,total:h,isClosed:m===0&&p===h&&Math.abs(g.x-i.x)<.1&&Math.abs(g.y-i.y)<.1}},J.findPointOnPath=function(t,a,r,n){n=n||{};for(var o=n.pathLength||t.getTotalLength(),s=n.tolerance||.001,c=n.iterationLimit||30,m=t.getPointAtLength(0)[r]>t.getPointAtLength(o)[r]?-1:1,h=0,p=0,g=o,i,w,S;h0?g=i:p=i,h++}return w}}}),Dg=Ee({"src/lib/throttle.js"(J){"use strict";var V={};J.throttle=function(E,k,l){var e=V[E],t=Date.now();if(!e){for(var a in V)V[a].tse.ts+k){r();return}e.timer=setTimeout(function(){r(),e.timer=null},k)},J.done=function(x){var E=V[x];return!E||!E.timer?Promise.resolve():new Promise(function(k){var l=E.onDone;E.onDone=function(){l&&l(),k(),E.onDone=null}})},J.clear=function(x){if(x)v(V[x]),delete V[x];else for(var E in V)J.clear(E)};function v(x){x&&x.timer!==null&&(clearTimeout(x.timer),x.timer=null)}}}),JA=Ee({"src/lib/clear_responsive.js"(J,V){"use strict";V.exports=function(x){x._responsiveChartHandler&&(window.removeEventListener("resize",x._responsiveChartHandler),delete x._responsiveChartHandler)}}}),QA=Ee({"node_modules/is-mobile/index.js"(J,V){"use strict";V.exports=k,V.exports.isMobile=k,V.exports.default=k;var v=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,x=/CrOS/,E=/android|ipad|playbook|silk/i;function k(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=v.test(e)&&!x.test(e)||!!l.tablet&&E.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),eM=Ee({"src/lib/preserve_drawing_buffer.js"(J,V){"use strict";var v=mi(),x=QA();V.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=E(),typeof e!="string")return!0;var t=x({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var a=e.split(" "),r=1;r-1;o--){var s=a[o];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(v(c)&&(c=+c),c>=13)return!0}}}return t};function E(){var k;return typeof navigator<"u"&&(k=navigator.userAgent),k&&k.headers&&typeof k.headers["user-agent"]=="string"&&(k=k.headers["user-agent"]),k}}}),tM=Ee({"src/lib/make_trace_groups.js"(J,V){"use strict";var v=Hn();V.exports=function(E,k,l){var e=E.selectAll("g."+l.replace(/\s/g,".")).data(k,function(a){return a[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=E.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(a){a[0][t]=v.select(this)}),e}}}),rM=Ee({"src/lib/localize.js"(J,V){"use strict";var v=Ri();V.exports=function(E,k){for(var l=E._context.locale,e=0;e<2;e++){for(var t=E._context.locales,a=0;a<2;a++){var r=(t[l]||{}).dictionary;if(r){var n=r[k];if(n)return n}t=v.localeRegistry}var o=l.split("-")[0];if(o===l)break;l=o}return k}}}),_b=Ee({"src/lib/filter_unique.js"(J,V){"use strict";V.exports=function(x){for(var E={},k=[],l=0,e=0;e1?(k*x+k*E)/k:x+E,e=String(l).length;if(e>16){var t=String(E).length,a=String(x).length;if(e>=a+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),bb={};yn(bb,{default:()=>Ab});function iM(J){return typeof J=="string"&&(J=J.replace(Tb,"")),(0,xb.default)(J)?Number(J):wb.BADNUM}var xb,wb,Tb,Ab,oM=In({"src/lib/clean_number.ts"(){"use strict";xb=Yn(mi()),wb=Yn(Qi()),Tb=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,Ab=iM}}),sM=Ee({"src/lib/slugify.js"(J,V){"use strict";var v=/<[^>]*>/g,x=/[\p{S}\p{P}]/gu,E=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,k=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),n=60;function o(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}V.exports=function(c,m=n){var h=o(c??"").replace(k,"").replace(v," ").replace(x,p=>p===e?p:"").toLowerCase().trim().replace(l,e).replace(E,"").replace(a,e);return h.length<=m?h:Array.from(h).slice(0,m).join("").replace(r,"")}}}),Vr=Ee({"src/lib/index.js"(J,V){"use strict";var v=Hn(),x=ji().utcFormat,E=ls().format,k=mi(),l=Qi(),e=l.FP_SAFE,t=-e,a=l.BADNUM,r=V.exports={};r.adjustFormat=function(q){if(!q||/^\d[.]\df/.test(q)||/[.]\d%/.test(q))return q;if(q==="0.f")return"~f";if(/^\d%/.test(q))return"~%";if(/^\ds/.test(q))return"~s";var $=(q.match(/^[+\-( ]?/)||[""])[0],ee=q.slice($.length);return!/^[~,.0$#]/.test(ee)&&/[&fps]/.test(ee)?$+"~"+ee:q};var n={};r.warnBadFormat=function(Y){var q=String(Y);n[q]||(n[q]=1,r.warn('encountered bad format: "'+q+'"'))},r.noFormat=function(Y){return String(Y)},r.numberFormat=function(Y){var q;try{q=E(r.adjustFormat(Y))}catch{return r.warnBadFormat(Y),r.noFormat}return q},r.nestedProperty=dl(),r.keyedContainer=ec(),r.relativeAttr=Ec(),r.isPlainObject=Us(),r.toLogRange=Jf(),r.relinkPrivateKeys=Ag();var o=vs();r.isArrayBuffer=o.isArrayBuffer,r.isTypedArray=o.isTypedArray,r.isArrayOrTypedArray=o.isArrayOrTypedArray,r.isArray1D=o.isArray1D,r.ensureArray=o.ensureArray,r.concat=o.concat,r.maxRowLength=o.maxRowLength,r.minRowLength=o.minRowLength;var s=(Vd(),ra(lh));r.mod=s.mod,r.modHalf=s.modHalf;var c=vA();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var m=WA();r.dateTime2ms=m.dateTime2ms,r.isDateTime=m.isDateTime,r.ms2DateTime=m.ms2DateTime,r.ms2DateTimeLocal=m.ms2DateTimeLocal,r.cleanDate=m.cleanDate,r.isJSDate=m.isJSDate,r.formatDate=m.formatDate,r.incrementMonth=m.incrementMonth,r.dateTick0=m.dateTick0,r.dfltRange=m.dfltRange,r.findExactDates=m.findExactDates,r.MIN_MS=m.MIN_MS,r.MAX_MS=m.MAX_MS;var h=Pg();r.findBin=h.findBin,r.sorterAsc=h.sorterAsc,r.sorterDes=h.sorterDes,r.distinctVals=h.distinctVals,r.roundUp=h.roundUp,r.sort=h.sort,r.findIndexOfMin=h.findIndexOfMin,r.sortObjectKeys=(Ev(),ra(Hd)).default;var p=XA();r.aggNums=p.aggNums,r.len=p.len,r.mean=p.mean,r.geometricMean=p.geometricMean,r.median=p.median,r.midRange=p.midRange,r.variance=p.variance,r.stdev=p.stdev,r.interp=p.interp;var g=kg();r.init2dArray=g.init2dArray,r.transposeRagged=g.transposeRagged,r.dot=g.dot,r.translationMatrix=g.translationMatrix,r.rotationMatrix=g.rotationMatrix,r.rotationXYMatrix=g.rotationXYMatrix,r.apply3DTransform=g.apply3DTransform,r.apply2DTransform=g.apply2DTransform,r.apply2DTransform2=g.apply2DTransform2,r.convertCssMatrix=g.convertCssMatrix,r.inverseTransformMatrix=g.inverseTransformMatrix;var i=$A();r.deg2rad=i.deg2rad,r.rad2deg=i.rad2deg,r.angleDelta=i.angleDelta,r.angleDist=i.angleDist,r.isFullCircle=i.isFullCircle,r.isAngleInsideSector=i.isAngleInsideSector,r.isPtInsideSector=i.isPtInsideSector,r.pathArc=i.pathArc,r.pathSector=i.pathSector,r.pathAnnulus=i.pathAnnulus;var w=ZA();r.isLeftAnchor=w.isLeftAnchor,r.isCenterAnchor=w.isCenterAnchor,r.isRightAnchor=w.isRightAnchor,r.isTopAnchor=w.isTopAnchor,r.isMiddleAnchor=w.isMiddleAnchor,r.isBottomAnchor=w.isBottomAnchor;var S=KA();r.segmentsIntersect=S.segmentsIntersect,r.segmentDistance=S.segmentDistance,r.getTextLocation=S.getTextLocation,r.clearLocationCache=S.clearLocationCache,r.getVisibleSegment=S.getVisibleSegment,r.findPointOnPath=S.findPointOnPath;var M=vo();r.extendFlat=M.extendFlat,r.extendDeep=M.extendDeep,r.extendDeepAll=M.extendDeepAll,r.extendDeepNoArrays=M.extendDeepNoArrays;var C=po();r.log=C.log,r.warn=C.warn,r.error=C.error;var _=(Rp(),ra(Sv));r.counterRegex=_.counter;var T=Dg();r.throttle=T.throttle,r.throttleDone=T.done,r.clearThrottle=T.clear;var f=N0();r.getGraphDiv=f.getGraphDiv,r.isPlotDiv=f.isPlotDiv,r.removeElement=f.removeElement,r.addStyleRule=f.addStyleRule,r.addRelatedStyleRule=f.addRelatedStyleRule,r.deleteRelatedStyleRule=f.deleteRelatedStyleRule,r.setStyleOnHover=f.setStyleOnHover,r.getFullTransformMatrix=f.getFullTransformMatrix,r.getElementTransformMatrix=f.getElementTransformMatrix,r.getElementAndAncestors=f.getElementAndAncestors,r.equalDomRects=f.equalDomRects,r.clearResponsive=JA(),r.preserveDrawingBuffer=eM(),r.makeTraceGroups=tM(),r._=rM(),r.notifier=no(),r.filterUnique=_b(),r.filterVisible=nM(),r.pushUnique=vb(),r.increment=aM(),r.cleanNumber=(oM(),ra(bb)).default,r.slugify=sM(),r.ensureNumber=function(q){return k(q)?(q=Number(q),q>e||q=q?!1:k(Y)&&Y>=0&&Y%1===0},r.noop=Eg(),r.identity=j0(),r.repeat=function(Y,q){for(var $=new Array(q),ee=0;ee$?Math.max($,Math.min(q,Y)):Math.max(q,Math.min($,Y))},r.bBoxIntersect=function(Y,q,$){return $=$||0,Y.left<=q.right+$&&q.left<=Y.right+$&&Y.top<=q.bottom+$&&q.top<=Y.bottom+$},r.simpleMap=function(Y,q,$,ee,ne){for(var fe=Y.length,ye=new Array(fe),xe=0;xe=Math.pow(2,$)?ne>10?(r.warn("randstr failed uniqueness"),ye):Y(q,$,ee,(ne||0)+1):ye},r.OptionControl=function(Y,q){Y||(Y={}),q||(q="opt");var $={};return $.optionList=[],$._newoption=function(ee){ee[q]=Y,$[ee.name]=ee,$.optionList.push(ee)},$["_"+q]=Y,$},r.smooth=function(Y,q){if(q=Math.round(q)||0,q<2)return Y;var $=Y.length,ee=2*$,ne=2*q-1,fe=new Array(ne),ye=new Array($),xe,Ae,Me,Ie;for(xe=0;xe=ee&&(Me-=ee*Math.floor(Me/ee)),Me<0?Me=-1-Me:Me>=$&&(Me=ee-1-Me),Ie+=Y[Me]*fe[Ae];ye[xe]=Ie}return ye},r.syncOrAsync=function(Y,q,$){var ee,ne;function fe(){return r.syncOrAsync(Y,q,$)}for(;Y.length;)if(ne=Y.splice(0,1)[0],ee=ne(q),ee&&ee.then)return ee.then(fe);return $&&$(q)},r.stripTrailingSlash=function(Y){return Y.slice(-1)==="/"?Y.slice(0,-1):Y},r.noneOrAll=function(Y,q,$){if(Y){var ee=!1,ne=!0,fe,ye;for(fe=0;fe<$.length;fe++)ye=Y[$[fe]],ye!=null?ee=!0:ne=!1;if(ee&&!ne)for(fe=0;fe<$.length;fe++)Y[$[fe]]=q[$[fe]]}},r.mergeArray=function(Y,q,$,ee){var ne=typeof ee=="function";if(r.isArrayOrTypedArray(Y))for(var fe=Math.min(Y.length,q.length),ye=0;ye0?ne:0})},r.fillArray=function(Y,q,$,ee){if(ee=ee||r.identity,r.isArrayOrTypedArray(Y))for(var ne=0;nez.test(window.navigator.userAgent);var I=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var Y=I.exec(window.navigator.userAgent);if(Y&&Y.length===2){var q=parseInt(Y[1]);if(!isNaN(q))return q}return null},r.isD3Selection=function(Y){return Y instanceof v.selection},r.ensureSingle=function(Y,q,$,ee){var ne=Y.select(q+($?"."+$:""));if(ne.size())return ne;var fe=Y.append(q);return $&&fe.classed($,!0),ee&&fe.call(ee),fe},r.ensureSingleById=function(Y,q,$,ee){var ne=Y.select(q+"#"+$);if(ne.size())return ne;var fe=Y.append(q).attr("id",$);return ee&&fe.call(ee),fe},r.objectFromPath=function(Y,q){for(var $=Y.split("."),ee,ne=ee={},fe=0;fe<$.length;fe++){var ye=$[fe],xe=null,Ae=$[fe].match(/(.*)\[([0-9]+)\]/);Ae?(ye=Ae[1],xe=Ae[2],ee=ee[ye]=[],fe===$.length-1?ee[xe]=q:ee[xe]={},ee=ee[xe]):(fe===$.length-1?ee[ye]=q:ee[ye]={},ee=ee[ye])}return ne};var N=/^([^\[\.]+)\.(.+)?/,R=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;function B(Y){return Y.slice(0,2)==="__"}r.expandObjectPaths=function(Y){var q,$,ee,ne,fe,ye,xe;if(typeof Y=="object"&&!Array.isArray(Y)){for($ in Y)if(Y.hasOwnProperty($))if(q=$.match(N)){if(ne=Y[$],ee=q[1],B(ee))continue;delete Y[$],Y[ee]=r.extendDeepNoArrays(Y[ee]||{},r.objectFromPath($,r.expandObjectPaths(ne))[ee])}else if(q=$.match(R)){if(ne=Y[$],ee=q[1],B(ee))continue;if(fe=parseInt(q[2]),delete Y[$],Y[ee]=Y[ee]||[],q[3]===".")xe=q[4],ye=Y[ee][fe]=Y[ee][fe]||{},r.extendDeepNoArrays(ye,r.objectFromPath(xe,r.expandObjectPaths(ne)));else{if(B(ee))continue;Y[ee][fe]=r.expandObjectPaths(ne)}}else{if(B($))continue;Y[$]=r.expandObjectPaths(Y[$])}}return Y},r.numSeparate=function(Y,q,$){if($||($=!1),typeof q!="string"||q.length===0)throw new Error("Separator string required for formatting!");typeof Y=="number"&&(Y=String(Y));var ee=/(\d+)(\d{3})/,ne=q.charAt(0),fe=q.charAt(1),ye=Y.split("."),xe=ye[0],Ae=ye.length>1?ne+ye[1]:"";if(fe&&(ye.length>1||xe.length>4||$))for(;ee.test(xe);)xe=xe.replace(ee,"$1"+fe+"$2");return xe+Ae},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;r.templateString=function(Y,q){var $={};return Y.replace(r.TEMPLATE_STRING_REGEX,function(ee,ne){var fe;return F.test(ne)?fe=q[ne]:($[ne]=$[ne]||r.nestedProperty(q,ne).get,fe=$[ne](!0)),fe!==void 0?fe:""})};var P={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=Y=>ae(Qr(Nr({},Y),{opts:P}));var j={max:10,count:0,name:"texttemplate"};r.texttemplateString=Y=>ae(Qr(Nr({},Y),{opts:j}));var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Z(Y){var q=Y.match(U);return q?{key:q[1],op:q[2],number:Number(q[3])}:{key:Y,op:null,number:null}}var Q={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=Y=>ae(Qr(Nr({},Y),{opts:Q}));var re=/^[:|\|]/;function ae({data:Y=[],locale:q,fallback:$,labels:ee={},opts:ne,template:fe}){return fe.replace(r.TEMPLATE_STRING_REGEX,(ye,xe,Ae)=>{let Me=["xother","yother"].includes(xe),Ie=["_xother","_yother"].includes(xe),Ue=["_xother_","_yother_"].includes(xe),qe=["xother_","yother_"].includes(xe),ke=Me||Ie||qe||Ue;(Ie||Ue)&&(xe=xe.substring(1)),(qe||Ue)&&(xe=xe.substring(0,xe.length-1));let ge=null,ue=null;if(ne.parseMultDiv){var ve=Z(xe);xe=ve.key,ge=ve.op,ue=ve.number}let se;if(ke){if(ee[xe]===void 0)return"";se=ee[xe]}else for(let Ge of Y)if(Ge){if(Ge.hasOwnProperty(xe)){se=Ge[xe];break}if(F.test(xe)||(se=r.nestedProperty(Ge,xe).get(!0)),se!==void 0)break}if(se===void 0){let{count:Ge,max:gt,name:mt}=ne,Tt=$===!1?ye:$;return Ge=oe&&ye<=H,Me=xe>=oe&&xe<=H;if(Ae&&(ee=10*ee+ye-oe),Me&&(ne=10*ne+xe-oe),!Ae||!Me){if(ee!==ne)return ee-ne;if(ye!==xe)return ye-xe}}return ne-ee};var X=2e9;r.seedPseudoRandom=function(){X=2e9},r.pseudoRandom=function(){var Y=X;return X=(69069*X+1)%4294967296,Math.abs(X-Y)<429496729?r.pseudoRandom():X/4294967296},r.fillText=function(Y,q,$){var ee=Array.isArray($)?function(ye){$.push(ye)}:function(ye){$.text=ye},ne=r.extractOption(Y,q,"htx","hovertext");if(r.isValidTextValue(ne))return ee(ne);var fe=r.extractOption(Y,q,"tx","text");if(r.isValidTextValue(fe))return ee(fe)},r.isValidTextValue=function(Y){return Y||Y===0},r.formatPercent=function(Y,q){q=q||0;for(var $=(Math.round(100*Y*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ee=0;ee1&&(Me=1):Me=0,r.strTranslate(ne-Me*($+ye),fe-Me*(ee+xe))+r.strScale(Me)+(Ae?"rotate("+Ae+(q?"":" "+$+" "+ee)+")":"")},r.setTransormAndDisplay=function(Y,q){Y.attr("transform",r.getTextTransform(q)),Y.style("display",q.scale?null:"none")},r.ensureUniformFontSize=function(Y,q){var $=r.extendFlat({},q);return $.size=Math.max(q.size,Y._fullLayout.uniformtext.minsize||0),$},r.join2=function(Y,q,$){var ee=Y.length;return ee>1?Y.slice(0,-1).join(q)+$+Y[ee-1]:Y.join(q)},r.bigFont=function(Y){return Math.round(1.2*Y)};var K=r.getFirefoxVersion(),G=K!==null&&K<86;r.getPositionFromD3Event=function(){return G?[v.event.layerX,v.event.layerY]:[v.event.offsetX,v.event.offsetY]}}}),lM=Ee({"build/plotcss.js"(){"use strict";var J=Vr(),V={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.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(x in V)v=x.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),J.addStyleRule(v,V[x]);var v,x}}),Mb=Ee({"node_modules/is-browser/client.js"(J,V){V.exports=!0}}),Sb=Ee({"node_modules/has-hover/index.js"(J,V){"use strict";var v=Mb(),x;typeof window.matchMedia=="function"?x=!window.matchMedia("(hover: none)").matches:x=v,V.exports=x}}),kv=Ee({"node_modules/events/events.js"(J,V){"use strict";var v=typeof Reflect=="object"?Reflect:null,x=v&&typeof v.apply=="function"?v.apply:function(C,_,T){return Function.prototype.apply.call(C,_,T)},E;v&&typeof v.ownKeys=="function"?E=v.ownKeys:Object.getOwnPropertySymbols?E=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:E=function(C){return Object.getOwnPropertyNames(C)};function k(M){console&&console.warn&&console.warn(M)}var l=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}V.exports=e,V.exports.once=i,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function a(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(M){if(typeof M!="number"||M<0||l(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");t=M}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||l(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function r(M){return M._maxListeners===void 0?e.defaultMaxListeners:M._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(C){for(var _=[],T=1;T0&&(A=_[0]),A instanceof Error)throw A;var b=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw b.context=A,b}var z=u[C];if(z===void 0)return!1;if(typeof z=="function")x(z,this,_);else for(var I=z.length,N=h(z,I),T=0;T0&&A.length>f&&!A.warned){A.warned=!0;var b=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");b.name="MaxListenersExceededWarning",b.emitter=M,b.type=C,b.count=A.length,k(b)}return M}e.prototype.addListener=function(C,_){return n(this,C,_,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,_){return n(this,C,_,!0)};function o(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(M,C,_){var T={fired:!1,wrapFn:void 0,target:M,type:C,listener:_},f=o.bind(T);return f.listener=_,T.wrapFn=f,f}e.prototype.once=function(C,_){return a(_),this.on(C,s(this,C,_)),this},e.prototype.prependOnceListener=function(C,_){return a(_),this.prependListener(C,s(this,C,_)),this},e.prototype.removeListener=function(C,_){var T,f,u,A,b;if(a(_),f=this._events,f===void 0)return this;if(T=f[C],T===void 0)return this;if(T===_||T.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete f[C],f.removeListener&&this.emit("removeListener",C,T.listener||_));else if(typeof T!="function"){for(u=-1,A=T.length-1;A>=0;A--)if(T[A]===_||T[A].listener===_){b=T[A].listener,u=A;break}if(u<0)return this;u===0?T.shift():p(T,u),T.length===1&&(f[C]=T[0]),f.removeListener!==void 0&&this.emit("removeListener",C,b||_)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var _,T,f;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[C]),this;if(arguments.length===0){var u=Object.keys(T),A;for(f=0;f=0;f--)this.removeListener(C,_[f]);return this};function c(M,C,_){var T=M._events;if(T===void 0)return[];var f=T[C];return f===void 0?[]:typeof f=="function"?_?[f.listener||f]:[f]:_?g(f):h(f,f.length)}e.prototype.listeners=function(C){return c(this,C,!0)},e.prototype.rawListeners=function(C){return c(this,C,!1)},e.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):m.call(M,C)},e.prototype.listenerCount=m;function m(M){var C=this._events;if(C!==void 0){var _=C[M];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function h(M,C){for(var _=new Array(C),T=0;T{},{passive:!0}),E},triggerHandler:function(E,k,l){var e,t=E._ev;if(!t)return;var a=t._events[k];if(!a)return;function r(o){if(o.listener){if(t.removeListener(k,o.listener),!o.fired)return o.fired=!0,o.listener.apply(t,[l])}else return o.apply(t,[l])}a=Array.isArray(a)?a:[a];var n;for(n=0;nx.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},k.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},k.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},k.undo=function(e){var t,a;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a=P.length)return!1;if(I.dimensions===2){if(R++,N.length===R)return I;var j=N[R];if(!S(j))return!1;I=P[F][j]}else I=P[F]}else I=P}}return I}function S(I){return I===Math.round(I)&&I>=0}function M(I){var N,R;N=V.modules[I]._module,R=N.basePlotModule;var B={};B.type=null;var F=a({},x),P=a({},N.attributes);J.crawl(P,function(Z,Q,re,ae,oe){o(F,oe).set(void 0),Z===void 0&&o(P,oe).set(void 0)}),a(B,F),V.traceIs(I,"noOpacity")&&delete B.opacity,V.traceIs(I,"showLegend")||(delete B.showlegend,delete B.legendgroup),V.traceIs(I,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),N.selectPoints||delete B.selectedpoints,a(B,P),R.attributes&&a(B,R.attributes),B.type=I;var j={meta:N.meta||{},categories:N.categories||{},animatable:!!N.animatable,type:I,attributes:T(B)};if(N.layoutAttributes){var U={};a(U,N.layoutAttributes),j.layoutAttributes=T(U)}return N.animatable||J.crawl(j,function(Z){J.isValObject(Z)&&"anim"in Z&&delete Z.anim}),j}function C(){var I={},N,R;a(I,E);for(N in V.subplotsRegistry)if(R=V.subplotsRegistry[N],!!R.layoutAttributes)if(Array.isArray(R.attr))for(var B=0;B=r&&(a._input||{})._templateitemname;o&&(n=r);var s=t+"["+n+"]",c;function m(){c={},o&&(c[s]={},c[s][x]=o)}m();function h(w,S){c[w]=S}function p(w,S){o?V.nestedProperty(c[s],w).set(S):c[s+"."+w]=S}function g(){var w=c;return m(),w}function i(w,S){w&&p(w,S);var M=g();for(var C in M)V.nestedProperty(e,C).set(M[C])}return{modifyBase:h,modifyItem:p,getUpdateObj:g,applyUpdate:i}}}}),tc=Ee({"src/plots/cartesian/constants.js"(J,V){"use strict";var v=(Rp(),ra(Sv)).counter;V.exports={idRegex:{x:v("x","( domain)?"),y:v("y","( domain)?")},attrRegex:v("[xy]axis"),xAxisMatch:v("xaxis"),yAxisMatch:v("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),Xl=Ee({"src/plots/cartesian/axis_ids.js"(J){"use strict";var V=Ri(),v=tc();J.id2name=function(k){if(!(typeof k!="string"||!k.match(v.AX_ID_PATTERN))){var l=k.split(" ")[0].slice(1);return l==="1"&&(l=""),k.charAt(0)+"axis"+l}},J.name2id=function(k){if(k.match(v.AX_NAME_PATTERN)){var l=k.slice(5);return l==="1"&&(l=""),k.charAt(0)+l}},J.cleanId=function(k,l,e){var t=/( domain)$/.test(k);if(!(typeof k!="string"||!k.match(v.AX_ID_PATTERN))&&!(l&&k.charAt(0)!==l)&&!(t&&!e)){var a=k.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),k.charAt(0)+a+(t&&e?" domain":"")}},J.list=function(E,k,l){var e=E._fullLayout;if(!e)return[];var t=J.listIds(E,k),a=new Array(t.length),r;for(r=0;re?1:-1:+(E.slice(1)||1)-+(k.slice(1)||1)},J.ref2id=function(E){return/^[xyz]/.test(E)?E.split(" ")[0]:!1};function x(E,k){if(k&&k.length){for(var l=0;l0?".":"")+o;v.isPlainObject(s)?e(s,a,c,n+1):a(c,o,s)}})}}}),vl=Ee({"src/plots/plots.js"(J,V){"use strict";var v=Hn(),x=ji().timeFormatLocale,E=ls().formatLocale,k=mi(),l=iu(),e=qi().version,t=Ri(),a=Bp(),r=xs(),n=Vr(),o=Qa(),s=Qi().BADNUM,c=Xl(),m=Gd().clearOutline,h=Ig(),p=O0(),g=Eb(),i=uf().getModuleCalcData,w=n.relinkPrivateKeys,S=n._,M=V.exports={};n.extendFlat(M,t),M.attributes=ia(),M.attributes.type.values=M.allTypes,M.fontAttrs=Xs(),M.layoutAttributes=Fp();var C=cM();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(H){return H=n.getGraphDiv(H),new Promise(function(X){setTimeout(function(){H._fullLayout&&(t.getComponentMethod("annotations","draw")(H),t.getComponentMethod("legend","draw")(H),t.getComponentMethod("colorbar","draw")(H),X(M.previousPromises(H)))},300)})},M.resize=function(H){H=n.getGraphDiv(H);var X,K=new Promise(function(G,Y){(!H||n.isHidden(H))&&Y(new Error("Resize must be passed a displayed plot div element.")),H._redrawTimer&&clearTimeout(H._redrawTimer),H._resolveResize&&(X=H._resolveResize),H._resolveResize=G,H._redrawTimer=setTimeout(function(){if(!H.layout||H.layout.width&&H.layout.height||n.isHidden(H)){G(H);return}delete H.layout.width,delete H.layout.height;var q=H.changed;H.autoplay=!0,t.call("relayout",H,{autosize:!0}).then(function(){H.changed=q,H._resolveResize===G&&(delete H._resolveResize,G(H))})},100)});return X&&X(K),K},M.previousPromises=function(H){if((H._promises||[]).length)return Promise.all(H._promises).then(function(){H._promises=[]})},M.sendDataToCloud=function(H,X){H.emit("plotly_beforeexport");let K=new URL(X).origin;var G=M.graphJson(H,!1,"object");G.version=e;var Y=new URL(X);Y.searchParams.set("origin",window.location.origin);var q=window.open(Y.href,"_blank");if(!q){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),H.emit("plotly_exportfail");return}var $=function(ee){ee.origin===K&&ee.data&&ee.data.type==="CHART_AUTH_SUCCESS"&&(q.postMessage({type:"chart",chart:G},K),window.removeEventListener("message",$),H.emit("plotly_afterexport"))};return window.addEventListener("message",$),!1};var _=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(H,X){var K=X&&X.skipUpdateCalc,G=H._fullLayout||{};if(G._skipDefaults){delete G._skipDefaults;return}var Y=H._fullLayout={},q=H.layout||{},$=H._fullData||[],ee=H._fullData=[],ne=H.data||[],fe=H.calcdata||[],ye=H._context||{},xe;H._transitionData||M.createTransitionData(H),Y._dfltTitle={plot:S(H,"Click to enter Plot title"),subtitle:S(H,"Click to enter Plot subtitle"),x:S(H,"Click to enter X axis title"),y:S(H,"Click to enter Y axis title"),colorbar:S(H,"Click to enter Colorscale title"),annotation:S(H,"new text")},Y._traceWord=S(H,"trace");var Ae=A(H,_);if(G._initialAutoSizeIsDone){var Me=G.width,Ie=G.height;M.supplyLayoutGlobalDefaults(q,Y,Ae),q.width||(Y.width=Me),q.height||(Y.height=Ie),M.sanitizeMargins(Y)}else{M.supplyLayoutGlobalDefaults(q,Y,Ae);var Ue=!q.width||!q.height,qe=Y.autosize,ke=ye.autosizable,ge=Ue&&(qe||ke);ge?M.plotAutoSize(H,q,Y):Ue&&M.sanitizeMargins(Y),!qe&&Ue&&(q.width=Y.width,q.height=Y.height)}Y._d3locale=b(Ae,Y.separators),Y._extraFormat=A(H,T),Y._initialAutoSizeIsDone=!0,Y._dataLength=ne.length,Y._modules=[],Y._visibleModules=[],Y._basePlotModules=[];var ue=Y._subplots=u(),ve=Y._splomAxes={x:{},y:{}},se=Y._splomSubplots={};Y._splomGridDflt={},Y._scatterStackOpts={},Y._firstScatter={},Y._alignmentOpts={},Y._colorAxes={},Y._requestRangeslider={},Y._traceUids=f($,ne),M.supplyDataDefaults(ne,ee,q,Y);var Te=Object.keys(ve.x),Fe=Object.keys(ve.y);if(Te.length>1&&Fe.length>1){for(t.getComponentMethod("grid","sizeDefaults")(q,Y),xe=0;xe15&&Fe.length>15&&Y.shapes.length===0&&Y.images.length===0,M.linkSubplots(ee,Y,$,G),M.cleanPlot(ee,Y,$,G);var Tt=!!(G._has&&G._has("cartesian")),At=!!(Y._has&&Y._has("cartesian")),Kt=Tt,nr=At;Kt&&!nr?G._bgLayer.remove():nr&&!Kt&&(Y._shouldCreateBgLayer=!0),G._zoomlayer&&!H._dragging&&m({_fullLayout:G}),z(ee,Y),w(Y,G),t.getComponentMethod("colorscale","crossTraceDefaults")(ee,Y),Y._preGUI||(Y._preGUI={}),Y._tracePreGUI||(Y._tracePreGUI={});var _r=Y._tracePreGUI,Zt={},sr;for(sr in _r)Zt[sr]="old";for(xe=0;xe0){var ye=1-2*q;$=Math.round(ye*$),ee=Math.round(ye*ee)}}var xe=M.layoutAttributes.width.min,Ae=M.layoutAttributes.height.min;$1,Ie=!K.height&&Math.abs(G.height-ee)>1;(Ie||Me)&&(Me&&(G.width=$),Ie&&(G.height=ee)),X._initialAutoSize||(X._initialAutoSize={width:$,height:ee}),M.sanitizeMargins(G)},M.supplyLayoutModuleDefaults=function(H,X,K,G){var Y=t.componentsRegistry,q=X._basePlotModules,$,ee,ne,fe=t.subplotsRegistry.cartesian;for($ in Y)ne=Y[$],ne.includeBasePlot&&ne.includeBasePlot(H,X);q.length||q.push(fe),X._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(H,X),fe.finalizeSubplots(H,X));for(var ye in X._subplots)X._subplots[ye].sort(n.subplotSort);for(ee=0;ee1&&(K.l/=qe,K.r/=qe)}if(Ae){var ke=(K.t+K.b)/Ae;ke>1&&(K.t/=ke,K.b/=ke)}var ge=K.xl!==void 0?K.xl:K.x,ue=K.xr!==void 0?K.xr:K.x,ve=K.yt!==void 0?K.yt:K.y,se=K.yb!==void 0?K.yb:K.y;Me[X]={l:{val:ge,size:K.l+Ue},r:{val:ue,size:K.r+Ue},b:{val:se,size:K.b+Ue},t:{val:ve,size:K.t+Ue}},Ie[X]=1}if(!G._replotting)return M.doAutoMargin(H)}};function P(H){if("_redrawFromAutoMarginCount"in H._fullLayout)return!1;var X=c.list(H,"",!0);for(var K in X)if(X[K].autoshift||X[K].shift)return!0;return!1}M.doAutoMargin=function(H){var X=H._fullLayout,K=X.width,G=X.height;X._size||(X._size={}),R(X);var Y=X._size,q=X.margin,$={t:0,b:0,l:0,r:0},ee=n.extendFlat({},Y),ne=q.l,fe=q.r,ye=q.t,xe=q.b,Ae=X._pushmargin,Me=X._pushmarginIds,Ie=X.minreducedwidth,Ue=X.minreducedheight;if(q.autoexpand!==!1){for(var qe in Ae)Me[qe]||delete Ae[qe];var ke=H._fullLayout._reservedMargin;for(var ge in ke)for(var ue in ke[ge]){var ve=ke[ge][ue];$[ue]=Math.max($[ue],ve)}Ae.base={l:{val:0,size:ne},r:{val:1,size:fe},t:{val:1,size:ye},b:{val:0,size:xe}};for(var se in $){var Te=0;for(var Fe in Ae)Fe!=="base"&&k(Ae[Fe][se].size)&&(Te=Ae[Fe][se].size>Te?Ae[Fe][se].size:Te);var We=Math.max(0,q[se]-Te);$[se]=Math.max(0,$[se]-We)}for(var Ge in Ae){var gt=Ae[Ge].l||{},mt=Ae[Ge].b||{},Tt=gt.val,At=gt.size,Kt=mt.val,nr=mt.size,_r=K-$.r-$.l,Zt=G-$.t-$.b;for(var sr in Ae){if(k(At)&&Ae[sr].r){var Ot=Ae[sr].r.val,vt=Ae[sr].r.size;if(Ot>Tt){var ht=(At*Ot+(vt-_r)*Tt)/(Ot-Tt),Re=(vt*(1-Tt)+(At-_r)*(1-Ot))/(Ot-Tt);ht+Re>ne+fe&&(ne=ht,fe=Re)}}if(k(nr)&&Ae[sr].t){var Be=Ae[sr].t.val,He=Ae[sr].t.size;if(Be>Kt){var $e=(nr*Be+(He-Zt)*Kt)/(Be-Kt),Ze=(He*(1-Kt)+(nr-Zt)*(1-Be))/(Be-Kt);$e+Ze>xe+ye&&(xe=$e,ye=Ze)}}}}}var Je=n.constrain(K-q.l-q.r,B,Ie),Mt=n.constrain(G-q.t-q.b,F,Ue),dt=Math.max(0,K-Je),Dt=Math.max(0,G-Mt);if(dt){var Ct=(ne+fe)/dt;Ct>1&&(ne/=Ct,fe/=Ct)}if(Dt){var Vt=(xe+ye)/Dt;Vt>1&&(xe/=Vt,ye/=Vt)}if(Y.l=Math.round(ne)+$.l,Y.r=Math.round(fe)+$.r,Y.t=Math.round(ye)+$.t,Y.b=Math.round(xe)+$.b,Y.p=Math.round(q.pad),Y.w=Math.round(K)-Y.l-Y.r,Y.h=Math.round(G)-Y.t-Y.b,!X._replotting&&(M.didMarginChange(ee,Y)||P(H))){"_redrawFromAutoMarginCount"in X?X._redrawFromAutoMarginCount++:X._redrawFromAutoMarginCount=1;var Ht=3*(1+Object.keys(Me).length);if(X._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(H,X=!1,K="json",G=!1,Y=!1){(G&&X&&!H._fullData||G&&!X&&!H._fullLayout)&&M.supplyDefaults(H);var q=G?H._fullData:H.data,$=G?H._fullLayout:H.layout,ee=(H._transitionData||{})._frames;function ne(xe,Ae){if(typeof xe=="function")return Ae?"_function_":null;if(n.isPlainObject(xe)){var Me={};return Object.keys(xe).sort().forEach(function(ke){if(["_","["].indexOf(ke.charAt(0))===-1){if(typeof xe[ke]=="function"){Ae&&(Me[ke]="_function");return}Me[ke]=ne(xe[ke],Ae)}}),Me}var Ie=Array.isArray(xe),Ue=n.isTypedArray(xe);if((Ie||Ue)&&xe.dtype&&xe.shape){var qe=xe.bdata;return ne({dtype:xe.dtype,shape:xe.shape,bdata:n.isArrayBuffer(qe)?l.encode(qe):qe},Ae)}return Ie?xe.map(function(ke){return ne(ke,Ae)}):Ue?n.simpleMap(xe,n.identity):n.isJSDate(xe)?n.ms2DateTimeLocal(+xe):xe}var fe={data:(q||[]).map(function(xe){var Ae=ne(xe);return X&&delete Ae.fit,Ae})};if(!X&&(fe.layout=ne($),G)){var ye=$._size;fe.layout.computed={margin:{b:ye.b,l:ye.l,r:ye.r,t:ye.t}}}return ee&&(fe.frames=ne(ee)),Y&&(fe.config=ne(H._context,!0)),K==="object"?fe:JSON.stringify(fe)},M.modifyFrames=function(H,X){var K,G,Y,q=H._transitionData._frames,$=H._transitionData._frameHash;for(K=0;K0&&(H._transitioningWithDuration=!0),H._transitionData._interruptCallbacks.push(function(){G=!0}),K.redraw&&H._transitionData._interruptCallbacks.push(function(){return t.call("redraw",H)}),H._transitionData._interruptCallbacks.push(function(){H.emit("plotly_transitioninterrupted",[])});var Ae=0,Me=0;function Ie(){return Ae++,function(){Me++,!G&&Me===Ae&&ee(xe)}}K.runFn(Ie),setTimeout(Ie())})}function ee(xe){if(H._transitionData)return q(H._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",H)}).then(function(){H._transitioning=!1,H._transitioningWithDuration=!1,H.emit("plotly_transitioned",[])}).then(xe)}function ne(){if(H._transitionData)return H._transitioning=!1,Y(H._transitionData._interruptCallbacks)}var fe=[M.previousPromises,ne,K.prepareFn,M.rehover,M.reselect,$],ye=n.syncOrAsync(fe,H);return(!ye||!ye.then)&&(ye=Promise.resolve()),ye.then(function(){return H})}M.doCalcdata=function(H,X){var K=c.list(H),G=H._fullData,Y=H._fullLayout,q,$,ee,ne=new Array(G.length),fe=(H.calcdata||[]).slice();for(H.calcdata=ne,Y._numBoxes=0,Y._numViolins=0,Y._violinScaleGroupStats={},H._hmpixcount=0,H._hmlumcount=0,Y._piecolormap={},Y._sunburstcolormap={},Y._treemapcolormap={},Y._iciclecolormap={},Y._funnelareacolormap={},ee=0;eeQ?Q.match(l):null;J.matchTex=e,J.convertToTspans=function(Q,re,ae){var oe=Q.text(),H=!Q.attr("data-notex")&&re&&re._context.typesetMath&&e(oe);H&&!m()&&(H=null);var X=V.select(Q.node().parentNode);if(X.empty())return;var K=Q.attr("class")?Q.attr("class").split(" ")[0]:"text";K+="-math",X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove(),Q.style("display",null).attr({"data-unformatted":oe,"data-math":"N"});function G(){X.empty()||(K=Q.attr("class")+"-math",X.select("svg."+K).remove()),Q.text("").style("white-space","pre");var Y=P(Q.node(),oe);Y&&Q.style("pointer-events","all"),J.positionText(Q),ae&&ae.call(Q)}return H?(re&&re._promises||[]).push(new Promise(function(Y){Q.style("display","none");var q=parseInt(Q.node().style.fontSize,10),$={fontSize:q},ee=Q.attr("text-anchor");h(H[2],$,function(ne,fe,ye){X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove();var xe=ne&&ne.select("svg");if(!xe||!xe.node()){G(),Y();return}Q.style("display","none");var Ae=X.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":oe,"data-math":"Y"});Ae.node().appendChild(xe.node()),fe&&fe.node()&&xe.node().insertBefore(fe.node().cloneNode(!0),xe.node().firstChild);var Me=ye.width,Ie=ye.height;xe.attr({class:K,height:Ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":$.fontSize+"px"});var Ue=Q.node().style.fill||"black",qe=xe.select("g");qe.attr({fill:Ue,stroke:Ue});var ke=qe.node().getBoundingClientRect(),ge=ke.width,ue=ke.height;(ge>Me||ue>Ie)&&(xe.style("overflow","hidden"),ke=xe.node().getBoundingClientRect(),ge=ke.width,ue=ke.height);var ve=+Q.attr("x"),se=+Q.attr("y"),Te=q||Q.node().getBoundingClientRect().height,Fe=-Te/4;K[0]==="y"?Ae.attr({transform:"rotate("+[-90,ve,se]+")"+x(-ge/2,Fe-ue/2)}):K[0]==="l"?se=Fe-ue/2:K[0]==="a"&&K.indexOf("atitle")!==0?(ve=0,se=Fe):(ve=ve-ge*(ee==="middle"?.5:ee==="end"?1:0),se=se+Fe-ue/2),xe.attr({x:ve,y:se}),ae&&ae.call(Q,Ae),Y(Ae)})})):G(),Q};var t=/(<|<|<)/g,a=/(>|>|>)/g;function r(Q){return Q.replace(t,"\\lt ").replace(a,"\\gt ")}var n=null,o=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,s=!1,c=!1;function m(){let Q=o();return Q===3||Q===4?!0:(Q===null?s||(s=!0,v.warn("MathJax is not loaded. Math equations will not be rendered.")):c||(c=!0,v.warn("Unsupported MathJax version:",MathJax.version)),!1)}function h(Q,re,ae){let oe=o();var H;let X=function(){if(!n){let q=MathJax._.output.svg_ts.SVG,$=v.extendFlat({},MathJax.config.svg,{fontCache:"local"});oe===4&&($.linebreaks=v.extendFlat({},$.linebreaks,{inline:!1})),n=MathJax._.mathjax.mathjax.document(document,v.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new q($)}))}let G="math-output-"+v.randstr({},64);H=V.select("body").append("div").attr({id:G}).style({visibility:"hidden",position:"absolute","font-size":re.fontSize+"px"});let Y=r(Q).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return n.convert(Y,{display:!1})}).then(function(q){H.node().appendChild(q)})},K=function(){let G=H.select(".MathJax"),Y=!G.empty()&&H.select("svg").node();if(!Y)v.log("There was an error in the tex syntax.",Q),ae();else{let q=Y.getBoundingClientRect(),$=G.select("defs");ae(G,$,q)}H.remove()};Promise.resolve().then(X).then(K).catch(G=>{v.log("MathJax typesetting failed.",Q,G),H&&H.remove(),ae()})}var p={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},g={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},w="\u200B",S=["http:","https:","mailto:","",void 0,":"],M=J.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,T=//i;J.BR_TAG_ALL=//gi;var f=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,u=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,b=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function z(Q,re){if(!Q)return null;var ae=Q.match(re),oe=ae&&(ae[3]||ae[4]);return oe&&B(oe)}var I=/(^|;)\s*color:/;J.plainText=function(Q,re){re=re||{};for(var ae=re.len!==void 0&&re.len!==-1?re.len:1/0,oe=re.allowedTags!==void 0?re.allowedTags:["br"],H="...",X=H.length,K=Q.split(C),G=[],Y="",q=0,$=0;$X?G.push(ee.slice(0,Math.max(0,xe-X))+H):G.push(ee.slice(0,xe));break}Y=""}}return G.join("")};var N={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},R=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B(Q){return Q.replace(R,function(re,ae){var oe;return ae.charAt(0)==="#"?oe=F(ae.charAt(1)==="x"?parseInt(ae.slice(2),16):parseInt(ae.slice(1),10)):oe=N[ae],oe||re})}J.convertEntities=B;function F(Q){if(!(Q>1114111)){var re=String.fromCodePoint;if(re)return re(Q);var ae=String.fromCharCode;return Q<=65535?ae(Q):ae((Q>>10)+55232,Q%1024+56320)}}function P(Q,re){re=re.replace(M," ");var ae=!1,oe=[],H,X=-1;function K(){X++;var ge=document.createElementNS(E.svg,"tspan");V.select(ge).attr({class:"line",dy:X*k+"em"}),Q.appendChild(ge),H=ge;var ue=oe;if(oe=[{node:ge}],ue.length>1)for(var ve=1;ve.",re);return}var ue=oe.pop();ge!==ue.type&&v.log("Start tag <"+ue.type+"> doesnt match end tag <"+ge+">. Pretending it did match.",re),H=oe[oe.length-1].node}var $=T.test(re);$?K():(H=Q,oe=[{node:Q}]);for(var ee=re.split(C),ne=0;ne=0;g--,i++){var w=m[g];p[i]=[1-w[0],w[1]]}return p}function s(m,h){h=h||{};for(var p=m.domain,g=m.range,i=g.length,w=new Array(i),S=0;Sp-m?m=p-(h-p):h-p=0?w=a.colorscale.sequential:w=a.colorscale.sequentialminus,s._sync("colorscale",w)}}}}),pl=Ee({"src/components/colorscale/index.js"(J,V){"use strict";var v=uh(),x=cf();V.exports={moduleType:"component",name:"colorscale",attributes:$s(),layoutAttributes:kb(),supplyLayoutDefaults:fM(),handleDefaults:Cc(),crossTraceDefaults:hM(),calc:Sf(),scales:v.scales,defaultScale:v.defaultScale,getScale:v.get,isValidScale:v.isValid,hasColorscale:x.hasColorscale,extractOpts:x.extractOpts,extractScale:x.extractScale,flipScale:x.flipScale,makeColorScaleFunc:x.makeColorScaleFunc,makeColorScaleFuncFromTrace:x.makeColorScaleFuncFromTrace}}}),al=Ee({"src/traces/scatter/subtypes.js"(J,V){"use strict";var v=Vr(),x=vs().isTypedArraySpec;V.exports={hasLines:function(E){return E.visible&&E.mode&&E.mode.indexOf("lines")!==-1},hasMarkers:function(E){return E.visible&&(E.mode&&E.mode.indexOf("markers")!==-1||E.type==="splom")},hasText:function(E){return E.visible&&E.mode&&E.mode.indexOf("text")!==-1},isBubble:function(E){var k=E.marker;return v.isPlainObject(k)&&(v.isArrayOrTypedArray(k.size)||x(k.size))}}}}),U0=Ee({"src/traces/scatter/make_bubble_size_func.js"(J,V){"use strict";var v=mi();V.exports=function(E,k){k||(k=2);var l=E.marker,e=l.sizeref||1,t=l.sizemin||0,a=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var n=a(r/k);return v(n)&&n>0?Math.max(n,t):0}}}}),Qf=Ee({"src/components/fx/helpers.js"(J){"use strict";var V=Vr();J.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},J.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var a=e.xaxes||[],r=e.yaxes||[],n=0;n=0&&a.index{let o=r.toLowerCase(),s=r,c=l(n);for(o==="m"&&c.length>2&&(t.push([s,...c.splice(0,2)]),o="l",s=s==="m"?"l":"L");;){if(c.length===v[o])return t.push([s,...c]),"";if(c.length0&&(ue=100,ge=ge.replace("-open","")),ge.indexOf("-dot")>0&&(ue+=200,ge=ge.replace("-dot","")),ge=g.symbolNames.indexOf(ge),ge>=0&&(ge+=ue)}return ge%100>=T||ge>=400?0:Math.floor(Math.max(ge,0))};function u(ge,ue,ve,se){var Te=ge%100;return g.symbolFuncs[Te](ue,ve,se)+(ge>=200?f:"")}var A=E("~f"),b={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};g.gradient=function(ge,ue,ve,se,Te,Fe){var We=b[se];return z(ge,ue,ve,We.type,Te,Fe,We.start,We.stop,!1,We.reversed)};function z(ge,ue,ve,se,Te,Fe,We,Ge,gt,mt){var Tt=Te.length,At;se==="linear"?At={node:"linearGradient",attrs:{x1:We.x,y1:We.y,x2:Ge.x,y2:Ge.y,gradientUnits:gt?"userSpaceOnUse":"objectBoundingBox"},reversed:mt}:se==="radial"&&(At={node:"radialGradient",reversed:mt});for(var Kt=new Array(Tt),nr=0;nr=0&&ge.i===void 0&&(ge.i=Fe.i),ue.style("opacity",se.selectedOpacityFn?se.selectedOpacityFn(ge):ge.mo===void 0?We.opacity:ge.mo),se.ms2mrc){var gt;ge.ms==="various"||We.size==="various"?gt=3:gt=se.ms2mrc(ge.ms),ge.mrc=gt,se.selectedSizeFn&&(gt=ge.mrc=se.selectedSizeFn(ge));var mt=g.symbolNumber(ge.mx||We.symbol)||0;ge.om=mt%200>=100;var Tt=ke(ge,ve),At=$(ge,ve);ue.attr("d",u(mt,gt,Tt,At))}var Kt=!1,nr,_r,Zt;if(ge.so)Zt=Ge.outlierwidth,_r=Ge.outliercolor,nr=We.outliercolor;else{var sr=(Ge||{}).width;Zt=(ge.mlw+1||sr+1||(ge.trace?(ge.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in ge?_r=ge.mlcc=se.lineScale(ge.mlc):x.isArrayOrTypedArray(Ge.color)?_r=e.defaultLine:_r=Ge.color,x.isArrayOrTypedArray(We.color)&&(nr=e.defaultLine,Kt=!0),"mc"in ge?nr=ge.mcc=se.markerScale(ge.mc):nr=We.color||We.colors||"rgba(0,0,0,0)",se.selectedColorFn&&(nr=se.selectedColorFn(ge))}let Ot=ge.mld||(Ge||{}).dash;if(Ot&&g.dashLine(ue,Ot,Zt),ge.om)ue.call(e.stroke,nr).style({"stroke-width":(Zt||1)+"px",fill:"none"});else{ue.style("stroke-width",(ge.isBlank?0:Zt)+"px");var vt=We.gradient,ht=ge.mgt;ht?Kt=!0:ht=vt&&vt.type,x.isArrayOrTypedArray(ht)&&(ht=ht[0],b[ht]||(ht=0));var Re=We.pattern,Be=g.getPatternAttr,He=Re&&(Be(Re.shape,ge.i,"")||Be(Re.path,ge.i,""));if(ht&&ht!=="none"){var $e=ge.mgc;$e?Kt=!0:$e=vt.color;var Ze=ve.uid;Kt&&(Ze+="-"+ge.i),g.gradient(ue,Te,Ze,ht,[[0,$e],[1,nr]],"fill")}else if(He){var Je=!1,Mt=Re.fgcolor;!Mt&&Fe&&Fe.color&&(Mt=Fe.color,Je=!0);var dt=Be(Mt,ge.i,Fe&&Fe.color||null),Dt=Be(Re.bgcolor,ge.i,null),Ct=Re.fgopacity,Vt=Be(Re.size,ge.i,8),Ht=Be(Re.solidity,ge.i,.3);Je=Je||ge.mcc||x.isArrayOrTypedArray(Re.shape)||x.isArrayOrTypedArray(Re.path)||x.isArrayOrTypedArray(Re.bgcolor)||x.isArrayOrTypedArray(Re.fgcolor)||x.isArrayOrTypedArray(Re.size)||x.isArrayOrTypedArray(Re.solidity);var Wt=ve.uid;Je&&(Wt+="-"+ge.i),g.pattern(ue,"point",Te,Wt,He,Vt,Ht,ge.mcc,Re.fillmode,Dt,dt,Ct)}else x.isArrayOrTypedArray(nr)?e.fill(ue,nr[ge.i]):e.fill(ue,nr);Zt&&e.stroke(ue,_r)}},g.makePointStyleFns=function(ge){var ue={},ve=ge.marker;return ue.markerScale=g.tryColorscale(ve,""),ue.lineScale=g.tryColorscale(ve,"line"),l.traceIs(ge,"symbols")&&(ue.ms2mrc=m.isBubble(ge)?h(ge):function(){return(ve.size||6)/2}),ge.selectedpoints&&x.extendFlat(ue,g.makeSelectedPointStyleFns(ge)),ue},g.makeSelectedPointStyleFns=function(ge){var ue={},ve=ge.selected||{},se=ge.unselected||{},Te=ge.marker||{},Fe=ve.marker||{},We=se.marker||{},Ge=Te.opacity,gt=Fe.opacity,mt=We.opacity,Tt=gt!==void 0,At=mt!==void 0;(x.isArrayOrTypedArray(Ge)||Tt||At)&&(ue.selectedOpacityFn=function(Re){var Be=Re.mo===void 0?Te.opacity:Re.mo;return Re.selected?Tt?gt:Be:At?mt:c*Be});var Kt=Te.color,nr=Fe.color,_r=We.color;(nr||_r)&&(ue.selectedColorFn=function(Re){var Be=Re.mcc||Kt;return Re.selected?nr||Be:_r||Be});var Zt=Te.size,sr=Fe.size,Ot=We.size,vt=sr!==void 0,ht=Ot!==void 0;return l.traceIs(ge,"symbols")&&(vt||ht)&&(ue.selectedSizeFn=function(Re){var Be=Re.mrc||Zt/2;return Re.selected?vt?sr/2:Be:ht?Ot/2:Be}),ue},g.makeSelectedTextStyleFns=function(ge){var ue={},ve=ge.selected||{},se=ge.unselected||{},Te=ge.textfont||{},Fe=ve.textfont||{},We=se.textfont||{},Ge=Te.color,gt=Fe.color,mt=We.color;return ue.selectedTextColorFn=function(Tt){var At=Tt.tc||Ge;return Tt.selected?gt||At:mt||(gt?At:e.addOpacity(At,c))},ue},g.selectedPointStyle=function(ge,ue){if(!(!ge.size()||!ue.selectedpoints)){var ve=g.makeSelectedPointStyleFns(ue),se=ue.marker||{},Te=[];ve.selectedOpacityFn&&Te.push(function(Fe,We){Fe.style("opacity",ve.selectedOpacityFn(We))}),ve.selectedColorFn&&Te.push(function(Fe,We){e.fill(Fe,ve.selectedColorFn(We))}),ve.selectedSizeFn&&Te.push(function(Fe,We){var Ge=We.mx||se.symbol||0,gt=ve.selectedSizeFn(We);Fe.attr("d",u(g.symbolNumber(Ge),gt,ke(We,ue),$(We,ue))),We.mrc2=gt}),Te.length&&ge.each(function(Fe){for(var We=v.select(this),Ge=0;Ge0?ve:0}g.textPointStyle=function(ge,ue,ve){if(ge.size()){var se;if(ue.selectedpoints){var Te=g.makeSelectedTextStyleFns(ue);se=Te.selectedTextColorFn}var Fe=ue.texttemplate,We=ve._fullLayout;ge.each(function(Ge){var gt=v.select(this),mt=Fe?x.extractOption(Ge,ue,"txt","texttemplate"):x.extractOption(Ge,ue,"tx","text");if(!mt&&mt!==0){gt.remove();return}if(Fe){var Tt=ue._module.formatLabels,At=Tt?Tt(Ge,ue,We):{},Kt={};p(Kt,ue,Ge.i),mt=x.texttemplateString({data:[Kt,Ge,ue._meta],fallback:ue.texttemplatefallback,labels:At,locale:We._d3locale,template:mt})}var nr=Ge.tp||ue.textposition,_r=R(Ge,ue),Zt=se?se(Ge):Ge.tc||ue.textfont.color;gt.call(g.font,{family:Ge.tf||ue.textfont.family,weight:Ge.tw||ue.textfont.weight,style:Ge.ty||ue.textfont.style,variant:Ge.tv||ue.textfont.variant,textcase:Ge.tC||ue.textfont.textcase,lineposition:Ge.tE||ue.textfont.lineposition,shadow:Ge.tS||ue.textfont.shadow,size:_r,color:Zt}).text(mt).call(r.convertToTspans,ve).call(N,nr,_r,Ge.mrc)})}},g.selectedTextStyle=function(ge,ue){if(!(!ge.size()||!ue.selectedpoints)){var ve=g.makeSelectedTextStyleFns(ue);ge.each(function(se){var Te=v.select(this),Fe=ve.selectedTextColorFn(se),We=se.tp||ue.textposition,Ge=R(se,ue);e.fill(Te,Fe);var gt=l.traceIs(ue,"bar-like");N(Te,We,Ge,se.mrc2||se.mrc,gt)})}};var B=.5;g.smoothopen=function(ge,ue){if(ge.length<3)return"M"+ge.join("L");var ve="M"+ge[0],se=[],Te;for(Te=1;Te=gt||Re>=Tt&&Re<=gt)&&(Be<=At&&Be>=mt||Be>=At&&Be<=mt)&&(ge=[Re,Be])}return ge}g.applyBackoff=oe,g.makeTester=function(){var ge=x.ensureSingleById(v.select("body"),"svg","js-plotly-tester",function(ve){ve.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ue=x.ensureSingle(ge,"path","js-reference-point",function(ve){ve.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});g.tester=ge,g.testref=ue},g.savedBBoxes={};var H=0,X=1e4;g.bBox=function(ge,ue,ve){ve||(ve=K(ge));var se;if(ve){if(se=g.savedBBoxes[ve],se)return x.extendFlat({},se)}else if(ge.childNodes.length===1){var Te=ge.childNodes[0];if(ve=K(Te),ve){var Fe=+Te.getAttribute("x")||0,We=+Te.getAttribute("y")||0,Ge=Te.getAttribute("transform");if(!Ge){var gt=g.bBox(Te,!1,ve);return Fe&&(gt.left+=Fe,gt.right+=Fe),We&&(gt.top+=We,gt.bottom+=We),gt}if(ve+="~"+Fe+"~"+We+"~"+Ge,se=g.savedBBoxes[ve],se)return x.extendFlat({},se)}}var mt,Tt;ue?mt=ge:(Tt=g.tester.node(),mt=ge.cloneNode(!0),Tt.appendChild(mt)),v.select(mt).attr("transform",null).call(r.positionText,0,0);var At=mt.getBoundingClientRect(),Kt=g.testref.node().getBoundingClientRect();ue||Tt.removeChild(mt);var nr={height:At.height,width:At.width,left:At.left-Kt.left,top:At.top-Kt.top,right:At.right-Kt.left,bottom:At.bottom-Kt.top};return H>=X&&(g.savedBBoxes={},H=0),ve&&(g.savedBBoxes[ve]=nr),H++,x.extendFlat({},nr)};function K(ge){var ue=ge.getAttribute("data-unformatted");if(ue!==null)return ue+ge.getAttribute("data-math")+ge.getAttribute("text-anchor")+ge.getAttribute("style")}g.setClipUrl=function(ge,ue,ve){ge.attr("clip-path",G(ue,ve))};function G(ge,ue){if(!ge)return null;var ve=ue._context,se=ve._exportedPlot?"":ve._baseUrl||"";return se?"url('"+se+"#"+ge+"')":"url(#"+ge+")"}g.getTranslate=function(ge){var ue=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ve=ge.attr?"attr":"getAttribute",se=ge[ve]("transform")||"",Te=se.replace(ue,function(Fe,We,Ge){return[We,Ge].join(" ")}).split(" ");return{x:+Te[0]||0,y:+Te[1]||0}},g.setTranslate=function(ge,ue,ve){var se=/(\btranslate\(.*?\);?)/,Te=ge.attr?"attr":"getAttribute",Fe=ge.attr?"attr":"setAttribute",We=ge[Te]("transform")||"";return ue=ue||0,ve=ve||0,We=We.replace(se,"").trim(),We+=a(ue,ve),We=We.trim(),ge[Fe]("transform",We),We},g.getScale=function(ge){var ue=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ve=ge.attr?"attr":"getAttribute",se=ge[ve]("transform")||"",Te=se.replace(ue,function(Fe,We,Ge){return[We,Ge].join(" ")}).split(" ");return{x:+Te[0]||1,y:+Te[1]||1}},g.setScale=function(ge,ue,ve){var se=/(\bscale\(.*?\);?)/,Te=ge.attr?"attr":"getAttribute",Fe=ge.attr?"attr":"setAttribute",We=ge[Te]("transform")||"";return ue=ue||1,ve=ve||1,We=We.replace(se,"").trim(),We+="scale("+ue+","+ve+")",We=We.trim(),ge[Fe]("transform",We),We};var Y=/\s*sc.*/;g.setPointGroupScale=function(ge,ue,ve){if(ue=ue||1,ve=ve||1,!!ge){var se=ue===1&&ve===1?"":"scale("+ue+","+ve+")";ge.each(function(){var Te=(this.getAttribute("transform")||"").replace(Y,"");Te+=se,Te=Te.trim(),this.setAttribute("transform",Te)})}};var q=/translate\([^)]*\)\s*$/;g.setTextPointsScale=function(ge,ue,ve){ge&&ge.each(function(){var se,Te=v.select(this),Fe=Te.select("text");if(Fe.node()){var We=parseFloat(Fe.attr("x")||0),Ge=parseFloat(Fe.attr("y")||0),gt=(Te.attr("transform")||"").match(q);ue===1&&ve===1?se=[]:se=[a(We,Ge),"scale("+ue+","+ve+")",a(-We,-Ge)],gt&&se.push(gt),Te.attr("transform",se.join(""))}})};function $(ge,ue){var ve;return ge&&(ve=ge.mf),ve===void 0&&(ve=ue.marker&&ue.marker.standoff||0),!ue._geo&&!ue._xA?-ve:ve}g.getMarkerStandoff=$;var ee=Math.atan2,ne=Math.cos,fe=Math.sin;function ye(ge,ue){var ve=ue[0],se=ue[1];return[ve*ne(ge)-se*fe(ge),ve*fe(ge)+se*ne(ge)]}var xe,Ae,Me,Ie,Ue,qe;function ke(ge,ue){var ve=ge.ma;ve===void 0&&(ve=ue.marker.angle,(!k(ve)||x.isArrayOrTypedArray(ve))&&(ve=0));var se,Te,Fe=ue.marker.angleref;if(Fe==="previous"||Fe==="north"){if(ue._geo){var We=ue._geo.project(ge.lonlat);se=We[0],Te=We[1]}else{var Ge=ue._xA,gt=ue._yA;if(Ge&>)se=Ge.c2p(ge.x),Te=gt.c2p(ge.y);else return 90}if(ue._geo){var mt=ge.lonlat[0],Tt=ge.lonlat[1],At=ue._geo.project([mt,Tt+1e-5]),Kt=ue._geo.project([mt+1e-5,Tt]),nr=ee(Kt[1]-Te,Kt[0]-se),_r=ee(At[1]-Te,At[0]-se),Zt;if(Fe==="north")Zt=ve/180*Math.PI;else if(Fe==="previous"){var sr=mt/180*Math.PI,Ot=Tt/180*Math.PI,vt=xe/180*Math.PI,ht=Ae/180*Math.PI,Re=vt-sr,Be=ne(ht)*fe(Re),He=fe(ht)*ne(Ot)-ne(ht)*fe(Ot)*ne(Re);Zt=-ee(Be,He)-Math.PI,xe=mt,Ae=Tt}var $e=ye(nr,[ne(Zt),0]),Ze=ye(_r,[fe(Zt),0]);ve=ee($e[1]+Ze[1],$e[0]+Ze[0])/Math.PI*180,Fe==="previous"&&!(qe===ue.uid&&ge.i===Ue+1)&&(ve=null)}if(Fe==="previous"&&!ue._geo)if(qe===ue.uid&&ge.i===Ue+1&&k(se)&&k(Te)){var Je=se-Me,Mt=Te-Ie,dt=ue.line&&ue.line.shape||"",Dt=dt.slice(dt.length-1);Dt==="h"&&(Mt=0),Dt==="v"&&(Je=0),ve+=ee(Mt,Je)/Math.PI*180+90}else ve=null}return Me=se,Ie=Te,Ue=ge.i,qe=ue.uid,ve}g.getMarkerAngle=ke}}),Lv=Ee({"src/components/titles/index.js"(J,V){"use strict";var v=Hn(),x=mi(),E=vl(),k=Ri(),l=Vr(),e=l.strTranslate,t=yo(),a=Qa(),r=Fs(),n=gd(),o=rc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,m=1.6;function h(p,g,i){var w=p._fullLayout,S=i.propContainer,M=i.propName,C=i.placeholder,_=i.traceIndex,T=i.avoid||{},f=i.attributes,u=i.transform,A=i.containerGroup,b=1,z=S.title,I=(z&&z.text?z.text:"").trim(),N=!1,R=z&&z.font?z.font:{},B=R.family,F=R.size,P=R.color,j=R.weight,U=R.style,Z=R.variant,Q=R.textcase,re=R.lineposition,ae=R.shadow,oe=i.subtitlePropName,H=!!oe,X=i.subtitlePlaceholder,K=(S.title||{}).subtitle||{text:"",font:{}},G=(K.text||"").trim(),Y=!1,q=1,$=K.font,ee=$.family,ne=$.size,fe=$.color,ye=$.weight,xe=$.style,Ae=$.variant,Me=$.textcase,Ie=$.lineposition,Ue=$.shadow,qe;M==="title.text"?qe="titleText":M.indexOf("axis")!==-1?qe="axisTitleText":M.indexOf("colorbar")!==-1&&(qe="colorbarTitleText");var ke=p._context.edits[qe];function ge(nr,_r){return nr===void 0||_r===void 0?!1:nr.replace(s," % ")===_r.replace(s," % ")}I===""?b=0:ge(I,C)&&(ke||(I=""),b=.2,N=!0),H&&(G===""?q=0:ge(G,X)&&(ke||(G=""),q=.2,Y=!0)),i._meta?I=l.templateString(I,i._meta):w._meta&&(I=l.templateString(I,w._meta));var ue=I||G||ke,ve;A||(A=l.ensureSingle(w._infolayer,"g","g-"+g),ve=w._hColorbarMoveTitle);var se=A.selectAll("text."+g).data(ue?[0]:[]);se.enter().append("text"),se.text(I).attr("class",g),se.exit().remove();var Te=null,Fe=g+"-subtitle",We=G||ke;if(H&&(Te=A.selectAll("text."+Fe).data(We?[0]:[]),Te.enter().append("text"),Te.text(G).attr("class",Fe),Te.exit().remove()),!ue)return A;function Ge(nr,_r){l.syncOrAsync([gt,mt],{title:nr,subtitle:_r})}function gt(nr){var _r=nr.title,Zt=nr.subtitle,sr;!u&&ve&&(u={}),u?(sr="",u.rotate&&(sr+="rotate("+[u.rotate,f.x,f.y]+")"),(u.offset||ve)&&(sr+=e(0,(u.offset||0)-(ve||0)))):sr=null,_r.attr("transform",sr);function Ot($e){if($e){var Ze=v.select($e.node().parentNode).select("."+Fe);if(!Ze.empty()){var Je=$e.node().getBBox();if(Je.height){var Mt=Je.y+Je.height+c*ne;Ze.attr("y",Mt)}}}}if(_r.style("opacity",b*a.opacity(P)).call(t.font,{color:a.rgb(P),size:v.round(F,2),family:B,weight:j,style:U,variant:Z,textcase:Q,shadow:ae,lineposition:re}).attr(f).call(r.convertToTspans,p,Ot),Zt&&!Zt.empty()){var vt=A.select("."+g+"-math-group"),ht=_r.node().getBBox(),Re=vt.node()?vt.node().getBBox():void 0,Be=Re?Re.y+Re.height+c*ne:ht.y+ht.height+m*ne,He=l.extendFlat({},f,{y:Be});Zt.attr("transform",sr),Zt.style("opacity",q*a.opacity(fe)).call(t.font,{color:a.rgb(fe),size:v.round(ne,2),family:ee,weight:ye,style:xe,variant:Ae,textcase:Me,shadow:Ue,lineposition:Ie}).attr(He).call(r.convertToTspans,p)}return E.previousPromises(p)}function mt(nr){var _r=nr.title,Zt=v.select(_r.node().parentNode);if(T&&T.selection&&T.side&&I){Zt.attr("transform",null);var sr=o[T.side],Ot=T.side==="left"||T.side==="top"?-1:1,vt=x(T.pad)?T.pad:2,ht=t.bBox(Zt.node()),Re={t:0,b:0,l:0,r:0},Be=p._fullLayout._reservedMargin;for(var He in Be)for(var $e in Be[He]){var Ze=Be[He][$e];Re[$e]=Math.max(Re[$e],Ze)}var Je={left:Re.l,top:Re.t,right:w.width-Re.r,bottom:w.height-Re.b},Mt=T.maxShift||Ot*(Je[T.side]-ht[T.side]),dt=0;if(Mt<0)dt=Mt;else{var Dt=T.offsetLeft||0,Ct=T.offsetTop||0;ht.left-=Dt,ht.right-=Dt,ht.top-=Ct,ht.bottom-=Ct,T.selection.each(function(){var Ht=t.bBox(this);l.bBoxIntersect(ht,Ht,vt)&&(dt=Math.max(dt,Ot*(Ht[T.side]-ht[sr])+vt))}),dt=Math.min(Mt,dt),S._titleScoot=Math.abs(dt)}if(dt>0||Mt<0){var Vt={left:[-dt,0],right:[dt,0],top:[0,-dt],bottom:[0,dt]}[T.side];Zt.attr("transform",e(Vt[0],Vt[1]))}}}se.call(Ge,Te);function Tt(nr,_r){nr.text(_r).on("mouseover.opacity",function(){v.select(this).transition().duration(n.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){v.select(this).transition().duration(n.HIDE_PLACEHOLDER).style("opacity",0)})}if(ke&&(I?se.on(".opacity",null):(Tt(se,C),N=!0),se.call(r.makeEditable,{gd:p}).on("edit",function(nr){_!==void 0?k.call("_guiRestyle",p,M,nr,_):k.call("_guiRelayout",p,M,nr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(nr){this.text(nr||" ").call(r.positionText,f.x,f.y)}),H)){if(H&&!I){var At=se.node().getBBox(),Kt=At.y+At.height+m*ne;Te.attr("y",Kt)}G?Te.on(".opacity",null):(Tt(Te,X),Y=!0),Te.call(r.makeEditable,{gd:p}).on("edit",function(nr){k.call("_guiRelayout",p,"title.subtitle.text",nr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(nr){this.text(nr||" ").call(r.positionText,Te.attr("x"),Te.attr("y"))})}return se.classed("js-placeholder",N),Te&&!Te.empty()&&Te.classed("js-placeholder",Y),A}V.exports={draw:h,SUBTITLE_PADDING_EM:m,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Hh=Ee({"src/plots/cartesian/set_convert.js"(J,V){"use strict";var v=Hn(),x=ji().utcFormat,E=Vr(),k=E.numberFormat,l=mi(),e=E.cleanNumber,t=E.ms2DateTime,a=E.dateTime2ms,r=E.ensureNumber,n=E.isArrayOrTypedArray,o=Qi(),s=o.FP_SAFE,c=o.BADNUM,m=o.LOG_CLIP,h=o.ONEWEEK,p=o.ONEDAY,g=o.ONEHOUR,i=o.ONEMIN,w=o.ONESEC,S=Xl(),M=tc(),C=M.HOUR_PATTERN,_=M.WEEKDAY_PATTERN;function T(u){return Math.pow(10,u)}function f(u){return u!=null}V.exports=function(A,b){b=b||{};var z=A._id||"x",I=z.charAt(0);function N(G,Y){if(G>0)return Math.log(G)/Math.LN10;if(G<=0&&Y&&A.range&&A.range.length===2){var q=A.range[0],$=A.range[1];return .5*(q+$-2*m*Math.abs(q-$))}else return c}function R(G,Y,q,$){if(($||{}).msUTC&&l(G))return+G;var ee=a(G,q||A.calendar);if(ee===c)if(l(G)){G=+G;var ne=Math.floor(E.mod(G+.05,1)*10),fe=Math.round(G-ne/10);ee=a(new Date(fe))+ne/10}else return c;return ee}function B(G,Y,q){return t(G,Y,q||A.calendar)}function F(G){return A._categories[Math.round(G)]}function P(G){if(f(G)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[G]!==void 0)return A._categoriesMap[G];A._categories.push(typeof G=="number"?String(G):G);var Y=A._categories.length-1;return A._categoriesMap[G]=Y,Y}return c}function j(G,Y){for(var q=new Array(Y),$=0;$A.range[1]&&(q=!q);for(var $=q?-1:1,ee=$*G,ne=0,fe=0;fexe)ne=fe+1;else{ne=ee<(ye+xe)/2?fe:fe+1;break}}var Ae=A._B[ne]||0;return isFinite(Ae)?re(G,A._m2,Ae):0},H=function(G){var Y=A._rangebreaks.length;if(!Y)return ae(G,A._m,A._b);for(var q=0,$=0;$A._rangebreaks[$].pmax&&(q=$+1);return ae(G,A._m2,A._B[q])}}A.c2l=A.type==="log"?N:r,A.l2c=A.type==="log"?T:r,A.l2p=oe,A.p2l=H,A.c2p=A.type==="log"?function(G,Y){return oe(N(G,Y))}:oe,A.p2c=A.type==="log"?function(G){return T(H(G))}:H,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=e,A.c2d=A.c2r=A.l2d=A.l2r=r,A.d2p=A.r2p=function(G){return A.l2p(e(G))},A.p2d=A.p2r=H,A.cleanPos=r):A.type==="log"?(A.d2r=A.d2l=function(G,Y){return N(e(G),Y)},A.r2d=A.r2c=function(G){return T(e(G))},A.d2c=A.r2l=e,A.c2d=A.l2r=r,A.c2r=N,A.l2d=T,A.d2p=function(G,Y){return A.l2p(A.d2r(G,Y))},A.p2d=function(G){return T(H(G))},A.r2p=function(G){return A.l2p(e(G))},A.p2r=H,A.cleanPos=r):A.type==="date"?(A.d2r=A.r2d=E.identity,A.d2c=A.r2c=A.d2l=A.r2l=R,A.c2d=A.c2r=A.l2d=A.l2r=B,A.d2p=A.r2p=function(G,Y,q){return A.l2p(R(G,0,q))},A.p2d=A.p2r=function(G,Y,q){return B(H(G),Y,q)},A.cleanPos=function(G){return E.cleanDate(G,c,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=P,A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=Z,A.r2c=function(G){var Y=Q(G);return Y!==void 0?Y:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=Q,A.d2p=function(G){return A.l2p(A.r2c(G))},A.p2d=function(G){return F(H(G))},A.r2p=A.d2p,A.p2r=H,A.cleanPos=function(G){return typeof G=="string"&&G!==""?G:r(G)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=Z,A.r2c=function(G){var Y=Z(G);return Y!==void 0?Y:A.fraction2r(.5)},A.r2c_just_indices=U,A.l2r=A.c2r=r,A.r2l=Z,A.d2p=function(G){return A.l2p(A.r2c(G))},A.p2d=function(G){return F(H(G))},A.r2p=A.d2p,A.p2r=H,A.cleanPos=function(G){return Array.isArray(G)||typeof G=="string"&&G!==""?G:r(G)},A.setupMultiCategory=function(G){var Y=A._traceIndices,q,$,ee=A._matchGroup;if(ee&&A._categories.length===0){for(var ne in ee)if(ne!==z){var fe=b[S.id2name(ne)];Y=Y.concat(fe._traceIndices)}}var ye=[[0,{}],[0,{}]],xe=[];for(q=0;qfe[1]&&($[ne?0:1]=q,ee[1]=fe[1]),ee[0]>=ee[1])if(Y!==void 0){var ye=fe[0]+1;q!==void 0&&(ye=Math.min(ye,fe[1])),$[ne?0:1]=A.l2r(ye)}else q!==void 0&&($[ne?1:0]=A.l2r(fe[1]-1))}},A.cleanRange=function(G,Y){A._cleanRange(G,Y),A.limitRange(G)},A._cleanRange=function(G,Y){Y||(Y={}),G||(G="range");var q=E.nestedProperty(A,G).get(),$,ee;if(A.type==="date"?ee=E.dfltRange(A.calendar):I==="y"?ee=M.DFLTRANGEY:A._name==="realaxis"?ee=[0,1]:ee=Y.dfltRange||M.DFLTRANGEX,ee=ee.slice(),(A.rangemode==="tozero"||A.rangemode==="nonnegative")&&(ee[0]=0),!q||q.length!==2){E.nestedProperty(A,G).set(ee);return}var ne=q[0]===null,fe=q[1]===null;for(A.type==="date"&&!A.autorange&&(q[0]=E.cleanDate(q[0],c,A.calendar),q[1]=E.cleanDate(q[1],c,A.calendar)),$=0;$<2;$++)if(A.type==="date"){if(!E.isDateTime(q[$],A.calendar)){A[G]=ee;break}if(A.r2l(q[0])===A.r2l(q[1])){var ye=E.constrain(A.r2l(q[0]),E.MIN_MS+1e3,E.MAX_MS-1e3);q[0]=A.l2r(ye-1e3),q[1]=A.l2r(ye+1e3);break}}else{if(!l(q[$]))if(!(ne||fe)&&l(q[1-$]))q[$]=q[1-$]*($?10:.1);else{A[G]=ee;break}if(q[$]<-s?q[$]=-s:q[$]>s&&(q[$]=s),q[0]===q[1]){var xe=Math.max(1,Math.abs(q[0]*1e-6));q[0]-=xe,q[1]+=xe}}},A.setScale=function(G){var Y=b._size;if(A.overlaying){var q=S.getFromId({_fullLayout:b},A.overlaying);A.domain=q.domain}var $=G&&A._r?"_r":"range",ee=A.calendar;A.cleanRange($);var ne=A.r2l(A[$][0],ee),fe=A.r2l(A[$][1],ee),ye=I==="y";if(ye?(A._offset=Y.t+(1-A.domain[1])*Y.h,A._length=Y.h*(A.domain[1]-A.domain[0]),A._m=A._length/(ne-fe),A._b=-A._m*fe):(A._offset=Y.l+A.domain[0]*Y.w,A._length=Y.w*(A.domain[1]-A.domain[0]),A._m=A._length/(fe-ne),A._b=-A._m*ne),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks){var xe,Ae;if(A._rangebreaks=A.locateBreaks(Math.min(ne,fe),Math.max(ne,fe)),A._rangebreaks.length){for(xe=0;xefe&&(Me=!Me),Me&&A._rangebreaks.reverse();var Ie=Me?-1:1;for(A._m2=Ie*A._length/(Math.abs(fe-ne)-A._lBreaks),A._B.push(-A._m2*(ye?fe:ne)),xe=0;xeee&&(ee+=7,ne<$&&(ne+=7));break;case C:fe=new Date(G);var Me=fe.getUTCHours(),Ie=fe.getUTCMinutes(),Ue=fe.getUTCSeconds(),qe=fe.getUTCMilliseconds();ne=Me+(Ie/60+Ue/3600+qe/36e5),$>ee&&(ee+=24,ne<$&&(ne+=24));break;case"":ne=G;break}if(ne>=$&&ne=$&&G=Ge.min&&(seGe.max&&(Ge.max=Te),Fe=!1)}Fe&&fe.push({min:se,max:Te})}};for(q=0;qw*2}function o(m){return Math.max(1,(m-1)/1e3)}function s(m,h){for(var p=m.length,g=o(p),i=0,w=0,S={},M=0;Mi*2}function c(m){return k(m[0])&&k(m[1])}}}),Ph=Ee({"src/plots/cartesian/autorange.js"(J,V){"use strict";var v=Hn(),x=mi(),E=Vr(),k=Qi().FP_SAFE,l=Ri(),e=yo(),t=Xl(),a=t.getFromId,r=t.isLinked;V.exports={applyAutorangeOptions:A,getAutoRange:n,makePadFn:s,doAutoRange:p,findExtremes:g,concatExtremes:h};function n(b,z){var I,N,R=[],B=b._fullLayout,F=s(B,z,0),P=s(B,z,1),j=h(b,z),U=j.min,Z=j.max;if(U.length===0||Z.length===0)return E.simpleMap(z.range,z.r2l);var Q=U[0].val,re=Z[0].val;for(I=1;I0&&(xe=Y-F(ee)-P(ne),xe>q?Ae/xe>$&&(fe=ee,ye=ne,$=Ae/xe):Ae/Y>$&&(fe={val:ee.val,nopad:1},ye={val:ne.val,nopad:1},$=Ae/Y));function Me(ge,ue){return Math.max(ge,P(ue))}if(Q===re){var Ie=Q-1,Ue=Q+1;if(K)if(Q===0)R=[0,1];else{var qe=(Q>0?Z:U).reduce(Me,0),ke=Q/(1-Math.min(.5,qe/Y));R=Q>0?[0,ke]:[ke,0]}else G?R=[Math.max(0,Ie),Math.max(1,Ue)]:R=[Ie,Ue]}else K?(fe.val>=0&&(fe={val:0,nopad:1}),ye.val<=0&&(ye={val:0,nopad:1})):G&&(fe.val-$*F(fe)<0&&(fe={val:0,nopad:1}),ye.val<=0&&(ye={val:1,nopad:1})),$=(ye.val-fe.val-o(z,ee.val,ne.val))/(Y-F(fe)-P(ye)),R=[fe.val-$*F(fe),ye.val+$*P(ye)];return R=A(R,z),z.limitRange&&z.limitRange(),oe&&R.reverse(),E.simpleMap(R,z.l2r||Number)}function o(b,z,I){var N=0;if(b.rangebreaks)for(var R=b.locateBreaks(z,I),B=0;B0?I.ppadplus:I.ppadminus)||I.ppad||0),ee=q((b._m>0?I.ppadminus:I.ppadplus)||I.ppad||0),ne=q(I.vpadplus||I.vpad),fe=q(I.vpadminus||I.vpad);if(!U){if(G=1/0,Y=-1/0,j)for(Q=0;Q0&&(G=re),re>Y&&re-k&&(G=re),re>Y&&re=Ae;Q--)xe(Q);return{min:N,max:R,opts:I}}function i(b,z,I,N){S(b,z,I,N,C)}function w(b,z,I,N){S(b,z,I,N,_)}function S(b,z,I,N,R){for(var B=N.tozero,F=N.extrapad,P=!0,j=0;j=I&&(U.extrapad||!F)){P=!1;break}else R(z,U.val)&&U.pad<=I&&(F||!U.extrapad)&&(b.splice(j,1),j--)}if(P){var Z=B&&z===0;b.push({val:z,pad:Z?0:I,extrapad:Z?!1:F})}}function M(b){return x(b)&&Math.abs(b)=z}function T(b,z){var I=z.autorangeoptions;return I&&I.minallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.minallowed:I&&I.clipmin!==void 0&&u(z,I.clipmin,I.clipmax)?Math.max(b,z.d2l(I.clipmin)):b}function f(b,z){var I=z.autorangeoptions;return I&&I.maxallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.maxallowed:I&&I.clipmax!==void 0&&u(z,I.clipmin,I.clipmax)?Math.min(b,z.d2l(I.clipmax)):b}function u(b,z,I){return z!==void 0&&I!==void 0?(z=b.d2l(z),I=b.d2l(I),z=j&&(B=j,I=j),F<=j&&(F=j,N=j)}}return I=T(I,z),N=f(N,z),[I,N]}}}),uo=Ee({"src/plots/cartesian/axes.js"(J,V){"use strict";var v=Hn(),x=mi(),E=vl(),k=Ri(),l=Vr(),e=l.strTranslate,t=Fs(),a=Lv(),r=Qa(),n=yo(),o=Gc(),s=Lb(),c=tc(),m=Qi(),h=m.ONEMAXYEAR,p=m.ONEAVGYEAR,g=m.ONEMINYEAR,i=m.ONEMAXQUARTER,w=m.ONEAVGQUARTER,S=m.ONEMINQUARTER,M=m.ONEMAXMONTH,C=m.ONEAVGMONTH,_=m.ONEMINMONTH,T=m.ONEWEEK,f=m.ONEDAY,u=f/2,A=m.ONEHOUR,b=m.ONEMIN,z=m.ONESEC,I=m.ONEMILLI,N=m.ONEMICROSEC,R=m.MINUS_SIGN,B=m.BADNUM,F={K:"zeroline"},P={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},U={K:"tick",L:"path"},Z={K:"tick",L:"text"},Q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},re=rc(),ae=re.MID_SHIFT,oe=re.CAP_SHIFT,H=re.LINE_SPACING,X=re.OPPOSITE_SIDE,K=3,G=V.exports={};G.setConvert=Hh();var Y=Op(),q=Xl(),$=q.idSort,ee=q.isLinked;G.id2name=q.id2name,G.name2id=q.name2id,G.cleanId=q.cleanId,G.list=q.list,G.listIds=q.listIds,G.getFromId=q.getFromId,G.getFromTrace=q.getFromTrace;var ne=Ph();G.getAutoRange=ne.getAutoRange,G.findExtremes=ne.findExtremes;var fe=1e-4;function ye(ot){var et=(ot[1]-ot[0])*fe;return[ot[0]-et,ot[1]+et]}function xe(ot,et,hr){if(![hr,ot,et].every(x)||hr===0)return ot;let ur=Math.round((ot-et)/hr),Tr=et+ur*hr;return ot!==Tr&&Math.abs(ot-Tr)br+" domain")),kt=kt.concat(Rr||[]),ar.length>Fr?(l.warn("Array attribute "+Ut+" has more entries than expected, truncating to "+Fr),ar=ar.slice(0,Fr)):ar.length2e-6||((hr-ot._forceTick0)/ot._minDtick%1+1.000001)%1>2e-6)&&(ot._minDtick=0))},G.saveRangeInitial=function(ot,et){for(var hr=G.list(ot,"",!0),ur=!1,Tr=0;TrEr*.3||Ut(ur)||Ut(Tr))){var br=hr.dtick/2;ot+=ot+brFr){var at=Number(hr.slice(1));Rr.exactYears>Fr&&at%12===0?ot=G.tickIncrement(ot,"M6","reverse")+f*1.5:Rr.exactMonths>Fr?ot=G.tickIncrement(ot,"M1","reverse")+f*15.5:ot-=u;var kt=G.tickIncrement(ot,hr);if(kt<=ur)return kt}return ot}G.prepMinorTicks=function(ot,et,hr){var ur,Tr;if(!((ur=et.minor)!=null&&ur.dtick)){delete ot.dtick;var Rr=et.dtick&&x(et._tmin),Fr;if(Rr){var at=G.tickIncrement(et._tmin,et.dtick,!0);Fr=[et._tmin,at*.99+et._tmin*.01]}else{var kt=l.simpleMap(et.range,et.r2l);Fr=[kt[0],.8*kt[0]+.2*kt[1]]}if(ot.range=l.simpleMap(Fr,et.l2r),ot._isMinor=!0,G.prepTicks(ot,hr),Rr){var Ut=x(et.dtick),ar=x(ot.dtick),Er=Ut?et.dtick:+et.dtick.substring(1),br=ar?ot.dtick:+ot.dtick.substring(1);Ut&&ar?ke(Er,br)?Er===2*T&&br===2*f&&(ot.dtick=T):Er===2*T&&br===3*f?ot.dtick=T:Er===T&&!(et._input.minor||{}).nticks?ot.dtick=f:ge(Er/br,2.5)?ot.dtick=Er/2:ot.dtick=Er:String(et.dtick).charAt(0)==="M"?ar?ot.dtick="M1":ke(Er,br)?Er>=12&&br===2&&(ot.dtick="M3"):ot.dtick=et.dtick:String(ot.dtick).charAt(0)==="L"?String(et.dtick).charAt(0)==="L"?ke(Er,br)||(ot.dtick=ge(Er/br,2.5)?et.dtick/2:et.dtick):ot.dtick="D1":ot.dtick==="D2"&&+et.dtick>1&&(ot.dtick=1)}ot.range=et.range}((Tr=et.minor)==null?void 0:Tr._tick0Init)===void 0&&(ot.tick0=et.tick0)};function ke(ot,et){return Math.abs((ot/et+.5)%1-.5)<.001}function ge(ot,et){return Math.abs(ot/et-1)<.001}G.prepTicks=function(ot,et){var hr=l.simpleMap(ot.range,ot.r2l,void 0,void 0,et);if(ot.tickmode==="auto"||!ot.dtick){var ur=ot.nticks,Tr;ur||(ot.type==="category"||ot.type==="multicategory"?(Tr=ot.tickfont?l.bigFont(ot.tickfont.size||12):15,ur=ot._length/Tr):(Tr=ot._id.charAt(0)==="y"?40:80,ur=l.constrain(ot._length/Tr,4,9)+1),ot._name==="radialaxis"&&(ur*=2)),ot.minor&&ot.minor.tickmode!=="array"||ot.tickmode==="array"&&(ur*=100),ot._roughDTick=Math.abs(hr[1]-hr[0])/ur,G.autoTicks(ot,ot._roughDTick),ot._minDtick>0&&ot.dtick0?(Rr=ur-1,Fr=ur):(Rr=ur,Fr=ur);var at=ot[Rr].value,kt=ot[Fr].value,Ut=Math.abs(kt-at),ar=hr||Ut,Er=0;ar>=g?Ut>=g&&Ut<=h?Er=Ut:Er=p:hr===w&&ar>=S?Ut>=S&&Ut<=i?Er=Ut:Er=w:ar>=_?Ut>=_&&Ut<=M?Er=Ut:Er=C:hr===T&&ar>=T?Er=T:ar>=f?Er=f:hr===u&&ar>=u?Er=u:hr===A&&ar>=A&&(Er=A);var br;Er>=Ut&&(Er=Ut,br=!0);var Or=Tr+Er;if(et.rangebreaks&&Er>0){for(var Pr=84,hn=0,zn=0;znT&&(Er=Ut)}(Er>0||ur===0)&&(ot[ur].periodX=Tr+Er/2)}}G.calcTicks=function(et,hr){for(var ur=et.type,Tr=et.calendar,Rr=et.ticklabelstep,Fr=et.ticklabelmode==="period",at=et.range[0]>et.range[1],kt=!et.ticklabelindex||l.isArrayOrTypedArray(et.ticklabelindex)?et.ticklabelindex:[et.ticklabelindex],Ut=l.simpleMap(et.range,et.r2l,void 0,void 0,hr),ar=Ut[1]=(bi?0:1);ga--){var eo=!ga;ga?(et._dtickInit=et.dtick,et._tick0Init=et.tick0):bi&&(et.minor._dtickInit=et.minor.dtick,et.minor._tick0Init=et.minor.tick0);var si=ga?et:l.extendFlat({},et,bi?et.minor:{minor:{}});if(eo?G.prepMinorTicks(si,et,hr):G.prepTicks(si,hr),si.tickmode==="array"){ga?(zn=[],Pr=We(et,!eo)):(Pn=[],hn=We(et,!eo));continue}if(si.tickmode==="sync"){zn=[],Pr=Fe(et);continue}var Ao=ye(Ut),ro=Ao[0],Sa=Ao[1],Gi=x(si.dtick),ti=ur==="log"&&!(Gi||si.dtick.charAt(0)==="L"),fi=G.tickFirst(si,hr);if(ga){if(et._tmin=fi,fi=Sa:zi<=Sa;zi=G.tickIncrement(zi,So,ar,Tr)){if(ga&&so++,si.rangebreaks&&!ar){if(zi=br)break}if(zn.length>Or||zi===xo)break;xo=zi;var ii={value:xe(zi,oi,So)};ga?(zi===fi&&(ii.first=!0),ti&&zi!==(zi|0)&&(ii.simpleLabel=!0),Rr>1&&so%Rr&&(ii.skipLabel=!0),zn.push(ii)):(ii.minor=!0,Pn.push(ii))}}if(!Pn||Pn.length<3)kt=!1;else{var co=(Pn[2].value-Pn[1].value)*(at?-1:1);Kn(co,et.tickformat)||(kt=!1,Pn=Pn.slice(1))}if(!kt)Ca=zn;else{var Wi=zn.concat(Pn);Fr&&zn.length&&(Wi=Wi.slice(1)),Wi=Wi.sort(function($o,Fo){return $o.value-Fo.value}).filter(function($o,Fo,Ji){return Fo===0||$o.value!==Ji[Fo-1].value});var Ho=Wi.map(function($o,Fo){return $o.minor===void 0&&!$o.skipLabel?Fo:null}).filter(function($o){return $o!==null});Ho.forEach(function($o){kt.map(function(Fo){var Ji=$o+Fo;Ji>=0&&Ji-1;Di--){if(zn[Di].drop){zn.splice(Di,1);continue}zn[Di].value=ba(zn[Di].value,et);var us=et.c2p(zn[Di].value);(lo?mo>us-Go:mobr||Robr&&(Ji.periodX=br),RoTr&&PrTr&&znp)et/=p,ur=Tr(10),ot.dtick="M"+12*_r(et,ur,Ge);else if(Rr>C)et/=C,ot.dtick="M"+_r(et,1,gt);else if(Rr>f){if(ot.dtick=_r(et,f,ot._hasDayOfWeekBreaks?[1,2,7,14]:Tt),!hr){var Fr=G.getTickFormat(ot),at=ot.ticklabelmode==="period";at&&(ot._rawTick0=ot.tick0),/%[uVW]/.test(Fr)?ot.tick0=l.dateTick0(ot.calendar,2):ot.tick0=l.dateTick0(ot.calendar,1),at&&(ot._dowTick0=ot.tick0)}}else Rr>A?ot.dtick=_r(et,A,gt):Rr>b?ot.dtick=_r(et,b,mt):Rr>z?ot.dtick=_r(et,z,mt):(ur=Tr(10),ot.dtick=_r(et,ur,Ge))}else if(ot.type==="log"){ot.tick0=0;var kt=l.simpleMap(ot.range,ot.r2l);if(ot._isMinor&&(et*=1.5),et>.7)ot.dtick=Math.ceil(et);else if(Math.abs(kt[1]-kt[0])<1){var Ut=1.5*Math.abs((kt[1]-kt[0])/et);et=Math.abs(Math.pow(10,kt[1])-Math.pow(10,kt[0]))/Ut,ur=Tr(10),ot.dtick="L"+_r(et,ur,Ge)}else ot.dtick=et>.3?"D2":"D1"}else ot.type==="category"||ot.type==="multicategory"?(ot.tick0=0,ot.dtick=Math.ceil(Math.max(et,1))):ci(ot)?(ot.tick0=0,ur=1,ot.dtick=_r(et,ur,nr)):(ot.tick0=0,ur=Tr(10),ot.dtick=_r(et,ur,Ge));if(ot.dtick===0&&(ot.dtick=1),!x(ot.dtick)&&typeof ot.dtick!="string"){var ar=ot.dtick;throw ot.dtick=1,"ax.dtick error: "+String(ar)}};function Zt(ot){var et=ot.dtick;if(ot._tickexponent=0,!x(et)&&typeof et!="string"&&(et=1),(ot.type==="category"||ot.type==="multicategory")&&(ot._tickround=null),ot.type==="date"){var hr=ot.r2l(ot.tick0),ur=ot.l2r(hr).replace(/(^-|i)/g,""),Tr=ur.length;if(String(et).charAt(0)==="M")Tr>10||ur.slice(5)!=="01-01"?ot._tickround="d":ot._tickround=+et.slice(1)%12===0?"y":"m";else if(et>=f&&Tr<=10||et>=f*15)ot._tickround="d";else if(et>=b&&Tr<=16||et>=A)ot._tickround="M";else if(et>=z&&Tr<=19||et>=b)ot._tickround="S";else{var Rr=ot.l2r(hr+et).replace(/^-/,"").length;ot._tickround=Math.max(Tr,Rr)-20,ot._tickround<0&&(ot._tickround=4)}}else if(x(et)||et.charAt(0)==="L"){var Fr=ot.range.map(ot.r2d||Number);x(et)||(et=Number(et.slice(1))),ot._tickround=2-Math.floor(Math.log(et)/Math.LN10+.01);var at=Math.max(Math.abs(Fr[0]),Math.abs(Fr[1])),kt=Math.floor(Math.log(at)/Math.LN10+.01),Ut=ot.minexponent===void 0?3:ot.minexponent;Math.abs(kt)>Ut&&(Mt(ot.exponentformat)&&ot.exponentformat!=="SI extended"&&!dt(kt)||Mt(ot.exponentformat)&&ot.exponentformat==="SI extended"&&!Dt(kt)?ot._tickexponent=3*Math.round((kt-1)/3):ot._tickexponent=kt)}else ot._tickround=null}G.tickIncrement=function(ot,et,hr,ur){var Tr=hr?-1:1;if(x(et))return l.increment(ot,Tr*et);var Rr=et.charAt(0),Fr=Tr*Number(et.slice(1));if(Rr==="M")return l.incrementMonth(ot,Fr,ur);if(Rr==="L")return Math.log(Math.pow(10,ot)+Fr)/Math.LN10;if(Rr==="D"){var at=et==="D2"?Kt:At,kt=ot+Tr*.01,Ut=l.roundUp(l.mod(kt,1),at,hr);return Math.floor(kt)+Math.log(v.round(Math.pow(10,Ut),1))/Math.LN10}throw"unrecognized dtick "+String(et)},G.tickFirst=function(ot,et){var hr=ot.r2l||Number,ur=l.simpleMap(ot.range,hr,void 0,void 0,et),Tr=ur[1]=0&&bi<=ot._length?ma:null};if(kt&&l.isArrayOrTypedArray(ot.ticktext)){var Pr=l.simpleMap(ot.range,ot.r2l),hn=(Math.abs(Pr[1]-Pr[0])-(ot._lBreaks||0))/1e4;for(br=0;br"+at;else{var Ut=pa(ot),ar=ot._trueSide||ot.side;(!Ut&&ar==="top"||Ut&&ar==="bottom")&&(Fr+="
")}et.text=Fr}function vt(ot,et,hr,ur,Tr){var Rr=ot.dtick,Fr=et.x,at=ot.tickformat,kt=typeof Rr=="string"&&Rr.charAt(0);if(Tr==="never"&&(Tr=""),ur&&kt!=="L"&&(Rr="L3",kt="L"),at||kt==="L")et.text=Vt(Math.pow(10,Fr),ot,Tr,ur);else if(x(Rr)||kt==="D"&&(ot.minorloglabels==="complete"||l.mod(Fr+.01,1)<.1)){var Ut;ot.minorloglabels==="complete"&&!(l.mod(Fr+.01,1)<.1)&&(Ut=!0,et.fontSize*=.75);var ar=Math.pow(10,Fr).toExponential(0),Er=ar.split("e"),br=+Er[1],Or=Math.abs(br),Pr=ot.exponentformat;Pr==="power"||Mt(Pr)&&Pr!=="SI extended"&&dt(br)||Mt(Pr)&&Pr==="SI extended"&&Dt(br)?(et.text=Er[0],Or>0&&(et.text+="x10"),et.text==="1x10"&&(et.text="10"),br!==0&&br!==1&&(et.text+=""+(br>0?"":R)+Or+""),et.fontSize*=1.25):(Pr==="e"||Pr==="E")&&Or>2?et.text=Er[0]+Pr+(br>0?"+":R)+Or:(et.text=Vt(Math.pow(10,Fr),ot,"","fakehover"),Rr==="D1"&&ot._id.charAt(0)==="y"&&(et.dy-=et.fontSize/6))}else if(kt==="D")et.text=ot.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(Fr,1)))),et.fontSize*=.75;else throw"unrecognized dtick "+String(Rr);if(ot.dtick==="D1"){var hn=String(et.text).charAt(0);(hn==="0"||hn==="1")&&(ot._id.charAt(0)==="y"?et.dx-=et.fontSize/4:(et.dy+=et.fontSize/2,et.dx+=(ot.range[1]>ot.range[0]?1:-1)*et.fontSize*(Fr<0?.5:.25)))}}function ht(ot,et){var hr=ot._categories[Math.round(et.x)];hr===void 0&&(hr=""),et.text=String(hr)}function Re(ot,et,hr){var ur=Math.round(et.x),Tr=ot._categories[ur]||[],Rr=Tr[1]===void 0?"":String(Tr[1]),Fr=Tr[0]===void 0?"":String(Tr[0]);hr?et.text=Fr+" - "+Rr:(et.text=Rr,et.text2=Fr)}function Be(ot,et,hr,ur,Tr){Tr==="never"?Tr="":ot.showexponent==="all"&&Math.abs(et.x/ot.dtick)<1e-6&&(Tr="hide"),et.text=Vt(et.x,ot,Tr,ur)}function He(ot,et,hr,ur,Tr){if(ot.thetaunit==="radians"&&!hr){var Rr=et.x/180;if(Rr===0)et.text="0";else{var Fr=$e(Rr);if(Fr[1]>=100)et.text=Vt(l.deg2rad(et.x),ot,Tr,ur);else{var at=et.x<0;Fr[1]===1?Fr[0]===1?et.text="\u03C0":et.text=Fr[0]+"\u03C0":et.text=["",Fr[0],"","\u2044","",Fr[1],"","\u03C0"].join(""),at&&(et.text=R+et.text)}}}else et.text=Vt(et.x,ot,Tr,ur)}function $e(ot){function et(at,kt){return Math.abs(at-kt)<=1e-6}function hr(at,kt){return et(kt,0)?at:hr(kt,at%kt)}function ur(at){for(var kt=1;!et(Math.round(at*kt)/kt,at);)kt*=10;return kt}var Tr=ur(ot),Rr=ot*Tr,Fr=Math.abs(hr(Rr,Tr));return[Math.round(Rr/Fr),Math.round(Tr/Fr)]}var Ze=["f","p","n","\u03BC","m","","k","M","G","T"],Je=["q","r","y","z","a",...Ze,"P","E","Z","Y","R","Q"],Mt=ot=>["SI","SI extended","B"].includes(ot);function dt(ot){return ot>14||ot<-15}function Dt(ot){return ot>32||ot<-30}function Ct(ot,et){return Mt(et)?!!(et==="SI extended"&&Dt(ot)||et!=="SI extended"&&dt(ot)):!1}function Vt(ot,et,hr,ur){var Tr=ot<0,Rr=et._tickround,Fr=hr||et.exponentformat||"B",at=et._tickexponent,kt=G.getTickFormat(et),Ut=et.separatethousands;if(ur){var ar={exponentformat:Fr,minexponent:et.minexponent,dtick:et.showexponent==="none"?et.dtick:x(ot)&&Math.abs(ot)||1,range:et.showexponent==="none"?et.range.map(et.r2d):[0,ot||1]};Zt(ar),Rr=(Number(ar._tickround)||0)+4,at=ar._tickexponent,et.hoverformat&&(kt=et.hoverformat)}if(kt)return et._numFormat(kt)(ot).replace(/-/g,R);Fr==="none"&&(at=0),ot=Math.abs(ot);let Er=Math.pow(10,-Rr)/2;if(ot"+br+"":Fr==="B"&&at===9?ot+="B":Mt(Fr)&&(ot+=Fr==="SI extended"?Je[at/3+10]:Ze[at/3+5])}return Tr?R+ot:ot}G.getTickFormat=function(ot){var et;function hr(kt){return typeof kt!="string"?kt:Number(kt.replace("M",""))*C}function ur(kt,Ut){var ar=["L","D"];if(typeof kt==typeof Ut){if(typeof kt=="number")return kt-Ut;var Er=ar.indexOf(kt.charAt(0)),br=ar.indexOf(Ut.charAt(0));return Er===br?Number(kt.replace(/(L|D)/g,""))-Number(Ut.replace(/(L|D)/g,"")):Er-br}else return typeof kt=="number"?1:-1}function Tr(kt,Ut,ar){var Er=ar||function(Pr){return Pr},br=Ut[0],Or=Ut[1];return(!br&&typeof br!="number"||Er(br)<=Er(kt))&&(!Or&&typeof Or!="number"||Er(Or)>=Er(kt))}function Rr(kt,Ut){var ar=Ut[0]===null,Er=Ut[1]===null,br=ur(kt,Ut[0])>=0,Or=ur(kt,Ut[1])<=0;return(ar||br)&&(Er||Or)}var Fr,at;if(ot.tickformatstops&&ot.tickformatstops.length>0)switch(ot.type){case"date":case"linear":{for(et=0;et=0&&Tr.unshift(Tr.splice(ar,1).shift())}});var at={false:{left:0,right:0}};return l.syncOrAsync(Tr.map(function(kt){return function(){if(kt){var Ut=G.getFromId(ot,kt);hr||(hr={}),hr.axShifts=at,hr.overlayingShiftedAx=Fr;var ar=G.drawOne(ot,Ut,hr);return Ut._shiftPusher&&ho(Ut,Ut._fullDepth||0,at,!0),Ut._r=Ut.range.slice(),Ut._rl=l.simpleMap(Ut._r,Ut.r2l),ar}}}))},G.drawOne=function(ot,et,hr){hr=hr||{};var ur=hr.axShifts||{},Tr=hr.overlayingShiftedAx||[],Rr,Fr,at;et.setScale();var kt=ot._fullLayout,Ut=et._id,ar=Ut.charAt(0),Er=G.counterLetter(Ut),br=kt._plots[et._mainSubplot],Or=et.zerolinelayer==="above traces";if(!br)return;if(et._shiftPusher=et.autoshift||Tr.indexOf(et._id)!==-1||Tr.indexOf(et.overlaying)!==-1,et._shiftPusher&et.anchor==="free"){var Pr=et.linewidth/2||0;et.ticks==="inside"&&(Pr+=et.ticklen),ho(et,Pr,ur,!0),ho(et,et.shift||0,ur,!1)}(hr.skipTitle!==!0||et._shift===void 0)&&(et._shift=da(et,ur));var hn=br[ar+"axislayer"],zn=et._mainLinePosition,Pn=zn+=et._shift,Ca=et._mainMirrorPosition,ma=et._vals=G.calcTicks(et),bi=[et.mirror,Pn,Ca].join("_");for(Rr=0;Rr0?Fo.bottom-Ps:0,$o))));var zl=0,ml=0;if(et._shiftPusher&&(zl=Math.max($o,Fo.height>0?es==="l"?Ps-Fo.left:Fo.right-Ps:0),et.title.text!==kt._dfltTitle[ar]&&(ml=(et._titleStandoff||0)+(et._titleScoot||0),es==="l"&&(ml+=Ir(et))),et._fullDepth=Math.max(zl,ml)),et.automargin){Ji={x:0,y:0,r:0,l:0,t:0,b:0};var Ts=[0,1],yl=typeof et._shift=="number"?et._shift:0;if(ar==="x"){if(es==="b"?Ji[es]=et._depth:(Ji[es]=et._depth=Math.max(Fo.width>0?Ps-Fo.top:0,$o),Ts.reverse()),Fo.width>0){var mu=Fo.right-(et._offset+et._length);mu>0&&(Ji.xr=1,Ji.r=mu);var su=et._offset-Fo.left;su>0&&(Ji.xl=0,Ji.l=su)}}else if(es==="l"?(et._depth=Math.max(Fo.height>0?Ps-Fo.left:0,$o),Ji[es]=et._depth-yl):(et._depth=Math.max(Fo.height>0?Fo.right-Ps:0,$o),Ji[es]=et._depth+yl,Ts.reverse()),Fo.height>0){var cc=Fo.bottom-(et._offset+et._length);cc>0&&(Ji.yb=0,Ji.b=cc);var Bl=et._offset-Fo.top;Bl>0&&(Ji.yt=1,Ji.t=Bl)}Ji[Er]=et.anchor==="free"?et.position:et._anchorAxis.domain[Ts[0]],et.title.text!==kt._dfltTitle[ar]&&(Ji[es]+=Ir(et)+(et.title.standoff||0)),et.mirror&&et.anchor!=="free"&&(Ro={x:0,y:0,r:0,l:0,t:0,b:0},Ro[Zs]=et.linewidth,et.mirror&&et.mirror!==!0&&(Ro[Zs]+=$o),et.mirror===!0||et.mirror==="ticks"?Ro[Er]=et._anchorAxis.domain[Ts[1]]:(et.mirror==="all"||et.mirror==="allticks")&&(Ro[Er]=[et._counterDomainMin,et._counterDomainMax][Ts[1]]))}Is&&(Ls=k.getComponentMethod("rangeslider","autoMarginOpts")(ot,et)),typeof et.automargin=="string"&&(Ht(Ji,et.automargin),Ht(Ro,et.automargin)),E.autoMargin(ot,Aa(et),Ji),E.autoMargin(ot,ua(et),Ro),E.autoMargin(ot,Qn(et),Ls)}),l.syncOrAsync(Jo)}};function Ht(ot,et){if(ot){var hr=Object.keys(Q).reduce(function(ur,Tr){return et.indexOf(Tr)!==-1&&Q[Tr].forEach(function(Rr){ur[Rr]=1}),ur},{});Object.keys(ot).forEach(function(ur){hr[ur]||(ur.length===1?ot[ur]=0:delete ot[ur])})}}function Wt(ot,et){var hr=[],ur,Tr=function(Rr,Fr){var at=Rr.xbnd[Fr];at!==null&&hr.push(l.extendFlat({},Rr,{x:at}))};if(et.length){for(ur=0;urot.range[1],at=ot.ticklabelposition&&ot.ticklabelposition.indexOf("inside")!==-1,kt=!at;if(hr){var Ut=Fr?-1:1;hr=hr*Ut}if(ur){var ar=ot.side,Er=at&&(ar==="top"||ar==="left")||kt&&(ar==="bottom"||ar==="right")?1:-1;ur=ur*Er}return ot._id.charAt(0)==="x"?function(br){return e(Tr+ot._offset+ot.l2p(It(br))+hr,Rr+ur)}:function(br){return e(Rr+ur,Tr+ot._offset+ot.l2p(It(br))+hr)}};function It(ot){return ot.periodX!==void 0?ot.periodX:ot.x}function ir(ot){var et=ot.ticklabelposition||"",hr=ot.tickson||"",ur=function(Pr){return et.indexOf(Pr)!==-1},Tr=ur("top"),Rr=ur("left"),Fr=ur("right"),at=ur("bottom"),kt=ur("inside"),Ut=hr!=="boundaries"&&(at||Rr||Tr||Fr);if(!Ut&&!kt)return[0,0];var ar=ot.side,Er=Ut?(ot.tickwidth||0)/2:0,br=K,Or=ot.tickfont?ot.tickfont.size:12;return(at||Tr)&&(Er+=Or*oe,br+=(ot.linewidth||0)/2),(Rr||Fr)&&(Er+=(ot.linewidth||0)/2,br+=K),kt&&ar==="top"&&(br-=Or*(1-oe)),(Rr||Tr)&&(Er=-Er),(ar==="bottom"||ar==="right")&&(br=-br),[Ut?Er:0,kt?br:0]}G.makeTickPath=function(ot,et,hr,ur){ur||(ur={});var Tr=ur.minor;if(Tr&&!ot.minor)return"";var Rr=ur.len!==void 0?ur.len:Tr?ot.minor.ticklen:ot.ticklen,Fr=ot._id.charAt(0),at=(ot.linewidth||1)/2;return Fr==="x"?"M0,"+(et+at*hr)+"v"+Rr*hr:"M"+(et+at*hr)+",0h"+Rr*hr},G.makeLabelFns=function(ot,et,hr){var ur=ot.ticklabelposition||"",Tr=ot.tickson||"",Rr=function(fi){return ur.indexOf(fi)!==-1},Fr=Rr("top"),at=Rr("left"),kt=Rr("right"),Ut=Rr("bottom"),ar=Tr!=="boundaries"&&(Ut||at||Fr||kt),Er=Rr("inside"),br=ur==="inside"&&ot.ticks==="inside"||!Er&&ot.ticks==="outside"&&Tr!=="boundaries",Or=0,Pr=0,hn=br?ot.ticklen:0;if(Er?hn*=-1:ar&&(hn=0),br&&(Or+=hn,hr)){var zn=l.deg2rad(hr);Or=hn*Math.cos(zn)+1,Pr=hn*Math.sin(zn)}ot.showticklabels&&(br||ot.showline)&&(Or+=.2*ot.tickfont.size),Or+=(ot.linewidth||1)/2*(Er?-1:1);var Pn={labelStandoff:Or,labelShift:Pr},Ca,ma,bi,ga,eo=0,si=ot.side,Ao=ot._id.charAt(0),ro=ot.tickangle,Sa;if(Ao==="x")Sa=!Er&&si==="bottom"||Er&&si==="top",ga=Sa?1:-1,Er&&(ga*=-1),Ca=Pr*ga,ma=et+Or*ga,bi=Sa?1:-.2,Math.abs(ro)===90&&(Er?bi+=ae:ro===-90&&si==="bottom"?bi=oe:ro===90&&si==="top"?bi=ae:bi=.5,eo=ae/2*(ro/90)),Pn.xFn=function(fi){return fi.dx+Ca+eo*fi.fontSize},Pn.yFn=function(fi){return fi.dy+ma+fi.fontSize*bi},Pn.anchorFn=function(fi,xo){if(ar){if(at)return"end";if(kt)return"start"}return!x(xo)||xo===0||xo===180?"middle":xo*ga<0!==Er?"end":"start"},Pn.heightFn=function(fi,xo,zi){return xo<-60||xo>60?-.5*zi:ot.side==="top"!==Er?-zi:0};else if(Ao==="y"){if(Sa=!Er&&si==="left"||Er&&si==="right",ga=Sa?1:-1,Er&&(ga*=-1),Ca=Or,ma=Pr*ga,bi=0,!Er&&Math.abs(ro)===90&&(ro===-90&&si==="left"||ro===90&&si==="right"?bi=oe:bi=.5),Er){var Gi=x(ro)?+ro:0;if(Gi!==0){var ti=l.deg2rad(Gi);eo=Math.abs(Math.sin(ti))*oe*ga,bi=0}}Pn.xFn=function(fi){return fi.dx+et-(Ca+fi.fontSize*bi)*ga+eo*fi.fontSize},Pn.yFn=function(fi){return fi.dy+ma+fi.fontSize*ae},Pn.anchorFn=function(fi,xo){return x(xo)&&Math.abs(xo)===90?"middle":Sa?"end":"start"},Pn.heightFn=function(fi,xo,zi){return ot.side==="right"&&(xo*=-1),xo<-30?-zi:xo<30?-.5*zi:0}}return Pn};function cr(ot){return[ot.text,ot.x,ot.axInfo,ot.font,ot.fontSize,ot.fontColor].join("_")}G.drawTicks=function(ot,et,hr){hr=hr||{};var ur=et._id+"tick",Tr=[].concat(et.minor&&et.minor.ticks?hr.vals.filter(function(Fr){return Fr.minor&&!Fr.noTick}):[]).concat(et.ticks?hr.vals.filter(function(Fr){return!Fr.minor&&!Fr.noTick}):[]),Rr=hr.layer.selectAll("path."+ur).data(Tr,cr);Rr.exit().remove(),Rr.enter().append("path").classed(ur,1).classed("ticks",1).classed("crisp",hr.crisp!==!1).each(function(Fr){return r.stroke(v.select(this),Fr.minor?et.minor.tickcolor:et.tickcolor)}).style("stroke-width",function(Fr){return n.crispRound(ot,Fr.minor?et.minor.tickwidth:et.tickwidth,1)+"px"}).attr("d",hr.path).style("display",null),Ii(et,[U]),Rr.attr("transform",hr.transFn)},G.drawGrid=function(ot,et,hr){if(hr=hr||{},et.tickmode!=="sync"){var ur=et._id+"grid",Tr=et.minor&&et.minor.showgrid,Rr=Tr?hr.vals.filter(function(Pn){return Pn.minor}):[],Fr=et.showgrid?hr.vals.filter(function(Pn){return!Pn.minor}):[],at=hr.counterAxis;if(at&&G.shouldShowZeroLine(ot,et,at))for(var kt=et.tickmode==="array",Ut=0;Ut=0;Pr--){var hn=Pr?br:Or;if(hn){var zn=hn.selectAll("path."+ur).data(Pr?Fr:Rr,cr);zn.exit().remove(),zn.enter().append("path").classed(ur,1).classed("crisp",hr.crisp!==!1),zn.attr("transform",hr.transFn).attr("d",hr.path).each(function(Pn){return r.stroke(v.select(this),Pn.minor?et.minor.gridcolor:et.gridcolor||"#ddd")}).style("stroke-dasharray",function(Pn){return n.dashStyle(Pn.minor?et.minor.griddash:et.griddash,Pn.minor?et.minor.gridwidth:et.gridwidth)}).style("stroke-width",function(Pn){return(Pn.minor?Er:et._gw)+"px"}).style("display",null),typeof hr.path=="function"&&zn.attr("d",hr.path)}}Ii(et,[P,j])}},G.drawZeroLine=function(ot,et,hr){hr=hr||hr;var ur=et._id+"zl",Tr=G.shouldShowZeroLine(ot,et,hr.counterAxis),Rr=hr.layer.selectAll("path."+ur).data(Tr?[{x:0,id:et._id}]:[]);Rr.exit().remove(),Rr.enter().append("path").classed(ur,1).classed("zl",1).classed("crisp",hr.crisp!==!1).each(function(){hr.layer.selectAll("path").sort(function(Fr,at){return $(Fr.id,at.id)})}),Rr.attr("transform",hr.transFn).attr("d",hr.path).call(r.stroke,et.zerolinecolor||r.defaultLine).style("stroke-width",n.crispRound(ot,et.zerolinewidth,et._gw||1)+"px").style("display",null),Ii(et,[F])},G.drawLabels=function(ot,et,hr){hr=hr||{};var ur=ot._fullLayout,Tr=et._id,Rr=et.zerolinelayer==="above traces",Fr=hr.cls||Tr+"tick",at=hr.vals.filter(function(oi){return oi.text}),kt=hr.labelFns,Ut=hr.secondary?0:et.tickangle,ar=(et._prevTickAngles||{})[Fr],Er=hr.layer.selectAll("g."+Fr).data(et.showticklabels?at:[],cr),br=[];Er.enter().append("g").classed(Fr,1).append("text").attr("text-anchor","middle").each(function(oi){var ii=v.select(this),co=ot._promises.length;ii.call(t.positionText,kt.xFn(oi),kt.yFn(oi)).call(n.font,{family:oi.font,size:oi.fontSize,color:oi.fontColor,weight:oi.fontWeight,style:oi.fontStyle,variant:oi.fontVariant,textcase:oi.fontTextcase,lineposition:oi.fontLineposition,shadow:oi.fontShadow}).text(oi.text).call(t.convertToTspans,ot),ot._promises[co]?br.push(ot._promises.pop().then(function(){Or(ii,Ut)})):Or(ii,Ut)}),Ii(et,[Z]),Er.exit().remove(),hr.repositionOnUpdate&&Er.each(function(oi){v.select(this).select("text").call(t.positionText,kt.xFn(oi),kt.yFn(oi))});function Or(oi,ii){oi.each(function(co){var Wi=v.select(this),Ho=Wi.select(".text-math-group"),Io=kt.anchorFn(co,ii),qo=hr.transFn.call(Wi.node(),co)+(x(ii)&&+ii!=0?" rotate("+ii+","+kt.xFn(co)+","+(kt.yFn(co)-co.fontSize/2)+")":""),Oo=t.lineCount(Wi),ws=H*co.fontSize,Ko=kt.heightFn(co,x(ii)?+ii:0,(Oo-1)*ws);if(Ko&&(qo+=e(0,Ko)),Ho.empty()){var ns=Wi.select("text");ns.attr({transform:qo,"text-anchor":Io}),ns.style("display",null),et._adjustTickLabelsOverflow&&et._adjustTickLabelsOverflow()}else{var wo=n.bBox(Ho.node()).width,No=wo*{end:-.5,start:.5}[Io];Ho.attr("transform",qo+e(No,0))}})}et._adjustTickLabelsOverflow=function(){var oi=et.ticklabeloverflow;if(!(!oi||oi==="allow")){var ii=oi.indexOf("hide")!==-1,co=et._id.charAt(0)==="x",Wi=0,Ho=co?ot._fullLayout.width:ot._fullLayout.height;if(oi.indexOf("domain")!==-1){var Io=l.simpleMap(et.range,et.r2l);Wi=et.l2p(Io[0])+et._offset,Ho=et.l2p(Io[1])+et._offset}var qo=Math.min(Wi,Ho),Oo=Math.max(Wi,Ho),ws=et.side,Ko=1/0,ns=-1/0;Er.each(function(lo){var Go=v.select(this),mo=Go.select(".text-math-group");if(mo.empty()){var us=n.bBox(Go.node()),Jo=0;co?(us.right>Oo||us.leftOo||us.top+(et.tickangle?0:lo.fontSize/4)et["_visibleLabelMin_"+Io._id]?Go.style("display","none"):Oo.K==="tick"&&!qo&&Go.node().style.display!=="none"&&Go.style("display",null)})})})})},Or(Er,ar+1?ar:Ut);function Pr(){return br.length&&Promise.all(br)}var hn=null;function zn(){if(Or(Er,Ut),at.length&&et.autotickangles&&(et.type!=="log"||String(et.dtick).charAt(0)!=="D")){hn=et.autotickangles[0];var oi=0,ii=[],co,Wi=1;Er.each(function(Ji){oi=Math.max(oi,Ji.fontSize);var Ro=et.l2p(Ji.x),Ls=jn(this),zl=n.bBox(Ls.node());Wi=Math.max(Wi,t.lineCount(Ls)),ii.push({top:0,bottom:10,height:10,left:Ro-zl.width/2,right:Ro+zl.width/2+2,width:zl.width+2})});var Ho=(et.tickson==="boundaries"||et.showdividers)&&!hr.secondary,Io=at.length,qo=Math.abs((at[Io-1].x-at[0].x)*et._m)/(Io-1),Oo=Ho?qo/2:qo,ws=Ho?et.ticklen:oi*1.25*Wi,Ko=Math.sqrt(Math.pow(Oo,2)+Math.pow(ws,2)),ns=Oo/Ko,wo=et.autotickangles.map(function(Ji){return Ji*Math.PI/180}),No=wo.find(function(Ji){return Math.abs(Math.cos(Ji))<=ns});No===void 0&&(No=wo.reduce(function(Ji,Ro){return Math.abs(Math.cos(Ji))so*zi&&(ti=zi,ro[Ao]=Sa[Ao]=fi[Ao])}var Mo=Math.abs(ti-Gi);Mo-ga>0?(Mo-=ga,ga*=1+ga/Mo):ga=0,et._id.charAt(0)!=="y"&&(ga=-ga),ro[si]=ma.p2r(ma.r2p(Sa[si])+eo*ga),ma.autorange==="min"||ma.autorange==="max reversed"?(ro[0]=null,ma._rangeInitial0=void 0,ma._rangeInitial1=void 0):(ma.autorange==="max"||ma.autorange==="min reversed")&&(ro[1]=null,ma._rangeInitial0=void 0,ma._rangeInitial1=void 0),ur._insideTickLabelsUpdaterange[ma._name+".range"]=ro}var So=l.syncOrAsync(Pn);return So&&So.then&&ot._promises.push(So),So};function fr(ot,et,hr){var ur=et._id+"divider",Tr=hr.vals,Rr=hr.layer.selectAll("path."+ur).data(Tr,cr);Rr.exit().remove(),Rr.enter().insert("path",":first-child").classed(ur,1).classed("crisp",1).call(r.stroke,et.dividercolor).style("stroke-width",n.crispRound(ot,et.dividerwidth,1)+"px"),Rr.attr("transform",hr.transFn).attr("d",hr.path)}G.getPxPosition=function(ot,et){var hr=ot._fullLayout._size,ur=et._id.charAt(0),Tr=et.side,Rr;if(et.anchor!=="free"?Rr=et._anchorAxis:ur==="x"?Rr={_offset:hr.t+(1-(et.position||0))*hr.h,_length:0}:ur==="y"&&(Rr={_offset:hr.l+(et.position||0)*hr.w+et._shift,_length:0}),Tr==="top"||Tr==="left")return Rr._offset;if(Tr==="bottom"||Tr==="right")return Rr._offset+Rr._length};function Ir(ot){var et=ot.title.font.size,hr=(ot.title.text.match(t.BR_TAG_ALL)||[]).length;return ot.title.hasOwnProperty("standoff")?et*(oe+hr*H):hr?et*(hr+1)*H:et}function ln(ot,et){var hr=ot._fullLayout,ur=et._id,Tr=ur.charAt(0),Rr=et.title.font.size,Fr,at=(et.title.text.match(t.BR_TAG_ALL)||[]).length;if(et.title.hasOwnProperty("standoff"))et.side==="bottom"||et.side==="right"?Fr=et._depth+et.title.standoff+Rr*oe:(et.side==="top"||et.side==="left")&&(Fr=et._depth+et.title.standoff+Rr*(ae+at*H));else{var kt=pa(et);if(et.type==="multicategory")Fr=et._depth;else{var Ut=1.5*Rr;kt&&(Ut=.5*Rr,et.ticks==="outside"&&(Ut+=et.ticklen)),Fr=10+Ut+(et.linewidth?et.linewidth-1:0)}kt||(Tr==="x"?Fr+=et.side==="top"?Rr*(et.showticklabels?1:0):Rr*(et.showticklabels?1.5:.5):Fr+=et.side==="right"?Rr*(et.showticklabels?1:.5):Rr*(et.showticklabels?.5:0))}var ar=G.getPxPosition(ot,et),Er,br,Or;Tr==="x"?(br=et._offset+et._length/2,Or=et.side==="top"?ar-Fr:ar+Fr):(Or=et._offset+et._length/2,br=et.side==="right"?ar+Fr:ar-Fr,Er={rotate:"-90",offset:0});var Pr;if(et.type!=="multicategory"){var hn=et._selections[et._id+"tick"];if(Pr={selection:hn,side:et.side},hn&&hn.node()&&hn.node().parentNode){var zn=n.getTranslate(hn.node().parentNode);Pr.offsetLeft=zn.x,Pr.offsetTop=zn.y}et.title.hasOwnProperty("standoff")&&(Pr.pad=0)}return et._titleStandoff=Fr,a.draw(ot,ur+"title",{propContainer:et,propName:et._name+".title.text",placeholder:hr._dfltTitle[Tr],avoid:Pr,transform:Er,attributes:{x:br,y:Or,"text-anchor":"middle"}})}G.shouldShowZeroLine=function(ot,et,hr){var ur=l.simpleMap(et.range,et.r2l);return ur[0]*ur[1]<=0&&et.zeroline&&(et.type==="linear"||et.type==="-")&&!(et.rangebreaks&&et.maskBreaks(0)===B)&&(nn(et,0)||!wn(ot,et,hr,ur)||Un(ot,et))},G.clipEnds=function(ot,et){return et.filter(function(hr){return nn(ot,hr.x)})};function nn(ot,et){var hr=ot.l2p(et);return hr>1&&hr1)for(Tr=1;Tr=Tr.min&&ot=N:/%L/.test(et)?ot>=I:/%[SX]/.test(et)?ot>=z:/%M/.test(et)?ot>=b:/%[HI]/.test(et)?ot>=A:/%p/.test(et)?ot>=u:/%[Aadejuwx]/.test(et)?ot>=f:/%[UVW]/.test(et)?ot>=T:/%[Bbm]/.test(et)?ot>=_:/%[q]/.test(et)?ot>=S:/%[Yy]/.test(et)?ot>=g:!0}}}),Rb=Ee({"src/plots/cartesian/autorange_options_defaults.js"(J,V){"use strict";V.exports=function(x,E,k){var l,e;if(k){var t=E==="reversed"||E==="min reversed"||E==="max reversed";l=k[t?1:0],e=k[t?0:1]}var a=x("autorangeoptions.minallowed",e===null?l:void 0),r=x("autorangeoptions.maxallowed",l===null?e:void 0);a===void 0&&x("autorangeoptions.clipmin"),r===void 0&&x("autorangeoptions.clipmax"),x("autorangeoptions.include")}}}),Fb=Ee({"src/plots/cartesian/range_defaults.js"(J,V){"use strict";var v=Rb();V.exports=function(E,k,l,e){var t=k._template||{},a=k.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var n;!e.noInsiderange&&a!=="log"&&(n=l("insiderange"),n&&(n[0]===null||n[1]===null)&&(k.insiderange=!1,n=void 0),n&&(r=l("range",n)))}var o=k.getAutorangeDflt(r,e),s=l("autorange",o),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete k.range,k.autorange=!0,c=!0),c||(o=k.getAutorangeDflt(r,e),s=l("autorange",o)),s&&(v(l,s,r),(a==="linear"||a==="-")&&l("rangemode")),k.cleanRange()}}}),vM=Ee({"node_modules/mouse-event-offset/index.js"(J,V){var v={left:0,top:0};V.exports=x;function x(k,l,e){l=l||k.currentTarget||k.srcElement,Array.isArray(e)||(e=[0,0]);var t=k.clientX||0,a=k.clientY||0,r=E(l);return e[0]=t-r.left,e[1]=a-r.top,e}function E(k){return k===window||k===document||k===document.body?v:k.getBoundingClientRect()}}}),Fg=Ee({"node_modules/has-passive-events/index.js"(J,V){"use strict";var v=Mb();function x(){var E=!1;try{var k=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("test",null,k),window.removeEventListener("test",null,k)}catch{E=!1}return E}V.exports=v&&x()}}),pM=Ee({"src/components/dragelement/align.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){var t=(x-k)/(l-k),a=t+E/(l-k),r=(t+a)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?a:t<2/3-r?t:a>4/3-r?a:r}}}),mM=Ee({"src/components/dragelement/cursor.js"(J,V){"use strict";var v=Vr(),x=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];V.exports=function(k,l,e,t){return e==="left"?k=0:e==="center"?k=1:e==="right"?k=2:k=v.constrain(Math.floor(k*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=v.constrain(Math.floor(l*3),0,2),x[l][k]}}}),gM=Ee({"src/components/dragelement/unhover.js"(J,V){"use strict";var v=zp(),x=Dg(),E=N0().getGraphDiv,k=Mv(),l=V.exports={};l.wrapped=function(e,t,a){var r;e=E(e),e._fullLayout&&x.clear(e._fullLayout._uid+k.HOVERID);let n=e._hoverdata;l.raw(e,t,a)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(r=e._fullLayout)!=null&&r.hoveranywhere&&t?.target&&!n&&e.emit("plotly_unhover",{event:t,points:[]}))},l.raw=function(t,a){var r=t._fullLayout,n=t._hoverdata;return a||(a={}),a.target&&!t._dragged&&v.triggerHandler(t,"plotly_beforehover",a)===!1?!1:(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,a.target&&n&&t.emit("plotly_unhover",{event:a,points:n}),!0)}}}),qf=Ee({"src/components/dragelement/index.js"(J,V){"use strict";var v=vM(),x=Sb(),E=Fg(),k=Vr().removeElement,l=tc(),e=V.exports={};e.align=pM(),e.getCursor=mM();var t=gM();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(o){var s=o.gd,c=1,m=s._context.doubleClickDelay,h=o.element,p,g,i,w,S,M,C,_;s._mouseDownTime||(s._mouseDownTime=0),h.style.pointerEvents="all",h.onmousedown=u,E?(h._ontouchstart&&h.removeEventListener("touchstart",h._ontouchstart),h._ontouchstart=u,h.addEventListener("touchstart",u,{passive:!1})):h.ontouchstart=u;function T(z,I,N){return Math.abs(z)"u"&&typeof z.clientY>"u"&&(z.clientX=p,z.clientY=g),i=new Date().getTime(),i-s._mouseDownTimem&&(c=Math.max(c-1,1)),s._dragged)o.doneFn&&o.doneFn();else{var I;M.target===C?I=M:(I={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(N=>{var R=M[N];!I[N]&&typeof R!="function"&&(I[N]=R)})),o.clickFn&&o.clickFn(c,I),_||C.dispatchEvent(new MouseEvent("click",z))}s._dragging=!1,s._dragged=!1}};function a(){var n=document.createElement("div");n.className="dragcover";var o=n.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(n),n}e.coverSlip=a;function r(n){return v(n.changedTouches?n.changedTouches[0]:n,document.body)}}}),Dh=Ee({"src/lib/setcursor.js"(J,V){"use strict";V.exports=function(x,E){(x.attr("class")||"").split(" ").forEach(function(k){k.indexOf("cursor-")===0&&x.classed(k,!1)}),E&&x.classed("cursor-"+E,!0)}}}),yM=Ee({"src/lib/override_cursor.js"(J,V){"use strict";var v=Dh(),x="data-savedcursor",E="!!";V.exports=function(l,e){var t=l.attr(x);if(e){if(!t){for(var a=(l.attr("class")||"").split(" "),r=0;rX.legend.length)for(var Y=X.legend.length;Y(r==="legend"?1:0));if(N===!1&&(o[r]=void 0),!(N===!1&&!m.uirevision)&&(p("uirevision",o.uirevision),N!==!1)){p("borderwidth");var R=p("orientation"),B=p("yref"),F=p("xref"),P=R==="h",j=B==="paper",U=F==="paper",Z,Q,re,ae="left";P?(Z=0,v.getComponentMethod("rangeslider","isVisible")(n.xaxis)?j?(Q=1.1,re="bottom"):(Q=1,re="top"):j?(Q=-.1,re="top"):(Q=0,re="bottom")):(Q=1,re="auto",U?Z=1.02:(Z=1,ae="right")),x.coerce(m,h,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:Z}},"x"),x.coerce(m,h,{y:{valType:"number",editType:"legend",min:j?-2:0,max:j?3:1,dflt:Q}},"y"),p("traceorder",f),t.isGrouped(o[r])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",ae),p("yanchor",re),p("maxheight"),p("valign"),x.noneOrAll(m,h,["x","y"]);var oe=p("title.text");if(oe){p("title.side",P?"left":"top");var H=x.extendFlat({},g,{size:x.bigFont(g.size)});x.coerceFont(p,"title.font",H);let X=c>1;p("titleclick",X?"toggle":!1),p("titledoubleclick",X?"toggleothers":!1)}}}V.exports=function(n,o,s){var c,m=s.slice(),h=o.shapes;if(h)for(c=0;cUe.showlegend||Ue.legendgroup);var g=h.concat(p),i=o.trace;i._isShape&&(i=n.shapes[i.index]);var w=i.legendgroup,S,M,C,_,T,f,u={},A=[],b=[],z=[];function I(Ue,qe){var ke=A.indexOf(Ue),ge=u.visible;return ge||(ge=u.visible=[]),A.indexOf(Ue)===-1&&(A.push(Ue),ke=A.length-1),ge[ke]=qe,ke}var N=(n.shapes||[]).map(function(Ue){return Ue._input}),R=!1;function B(Ue,qe){N[Ue].visible=qe,R=!0}function F(Ue,qe){if(!(o.groupTitle&&!c)){var ke=Ue._isShape,ge=Ue.index;ge===void 0&&(ge=Ue._index);var ue=Ue.visible===!1?!1:qe;ke?B(ge,ue):I(ge,ue)}}var P=i.legend;if(!i._isShape&&V.traceIs(i,"pie-like")){var j=o.label,U=m.indexOf(j);if(r==="toggle")U===-1?m.push(j):m.splice(U,1);else if(r==="toggleothers"){var Z=U!==-1,Q=[];for(S=0;SC.showlegend||C.legendgroup),c=n.concat(s);function m(C){return(C.legend||"legend")===o}var h,p;if(a==="toggle")h=!c.some(function(_){return m(_)&&_.visible===!0}),p=!1;else{let C=c.some(function(_){return!m(_)&&_.visible===!0&&_.showlegend!==!1});h=!0,p=!C}let g={visible:[]},i=[],w=(r.shapes||[]).map(function(C){return C._input});for(var S=!1,M=0;MB&&(N=B)}z[g][0]._groupMinRank=N,z[g][0]._preGroupSort=g}var F=function(re,ae){return re[0]._groupMinRank-ae[0]._groupMinRank||re[0]._preGroupSort-ae[0]._preGroupSort},P=function(re,ae){var oe=v(re.trace.legendrank)?re.trace.legendrank[re.i]:re.trace.legendrank,H=v(ae.trace.legendrank)?ae.trace.legendrank[ae.i]:ae.trace.legendrank;return oe-H||re._preSort-ae._preSort};for(z.forEach(function(re,ae){re[0]._preGroupSort=ae}),z.sort(F),g=0;g0)Y=X.width;else return 0;return f?G:Math.min(Y,K)};M.each(function(H){var X=v.select(this),K=E.ensureSingle(X,"g","layers");K.style("opacity",H[0].trace.opacity);var G=_.indentation,Y=_.valign,q=H[0].lineHeight,$=H[0].height;if(Y==="middle"&&G===0||!q||!$)K.attr("transform",null);else{var ee={top:1,bottom:-1}[Y],ne=ee*(.5*(q-$+3))||0,fe=_.indentation;K.attr("transform",k(fe,ne))}var ye=K.selectAll("g.legendfill").data([H]);ye.enter().append("g").classed("legendfill",!0);var xe=K.selectAll("g.legendlines").data([H]);xe.enter().append("g").classed("legendlines",!0);var Ae=K.selectAll("g.legendsymbols").data([H]);Ae.enter().append("g").classed("legendsymbols",!0),Ae.selectAll("g.legendpoints").data([H]).enter().append("g").classed("legendpoints",!0)}).each(oe).each(R).each(F).each(B).each(j).each(re).each(Q).each(I).each(N).each(U).each(Z);function I(H){var X=i(H),K=X.showFill,G=X.showLine,Y=X.showGradientLine,q=X.showGradientFill,$=X.anyFill,ee=X.anyLine,ne=H[0],fe=ne.trace,ye,xe,Ae=t(fe),Me=Ae.colorscale,Ie=Ae.reversescale,Ue=function(Te){if(Te.size())if(K)l.fillGroupStyle(Te,C,!0);else{var Fe="legendfill-"+fe.uid;l.gradient(Te,C,Fe,g(Ie),Me,"fill")}},qe=function(Te){if(Te.size()){var Fe="legendline-"+fe.uid;l.lineGroupStyle(Te),l.gradient(Te,C,Fe,g(Ie),Me,"stroke")}},ke=a.hasMarkers(fe)||!$?"M5,0":ee?"M5,-2":"M5,-3",ge=v.select(this),ue=ge.select(".legendfill").selectAll("path").data(K||q?[H]:[]);if(ue.enter().append("path").classed("js-fill",!0),ue.exit().remove(),ue.attr("d",ke+"h"+u+"v6h-"+u+"z").call(Ue),G||Y){var ve=z(void 0,fe.line,h,c);xe=E.minExtend(fe,{line:{width:ve}}),ye=[E.minExtend(ne,{trace:xe})]}var se=ge.select(".legendlines").selectAll("path").data(G||Y?[ye]:[]);se.enter().append("path").classed("js-line",!0),se.exit().remove(),se.attr("d",ke+(Y?"l"+u+",0.0001":"h"+u)).call(G?l.lineGroupStyle:qe)}function N(H){var X=i(H),K=X.anyFill,G=X.anyLine,Y=X.showLine,q=X.showMarker,$=H[0],ee=$.trace,ne=!q&&!G&&!K&&a.hasText(ee),fe,ye;function xe(ve,se,Te,Fe){var We=E.nestedProperty(ee,ve).get(),Ge=E.isArrayOrTypedArray(We)&&se?se(We):We;if(f&&Ge&&Fe!==void 0&&(Ge=Fe),Te){if(GeTe[1])return Te[1]}return Ge}function Ae(ve){return $._distinct&&$.index&&ve[$.index]?ve[$.index]:ve[0]}if(q||ne||Y){var Me={},Ie={};if(q){Me.mc=xe("marker.color",Ae);var Ue=ee.type==="scattermap";Me.mx=Ue?"circle":xe("marker.symbol",Ae),Me.mo=xe("marker.opacity",E.mean,[.2,1]),Me.mlc=xe("marker.line.color",Ae),Me.mlw=xe("marker.line.width",E.mean,[0,5],m),Me.mld=xe("marker.line.dash",Ae),Ie.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var qe=xe("marker.size",E.mean,[2,16],s);Me.ms=qe,Ie.marker.size=qe}Y&&(Ie.line={width:xe("line.width",Ae,[0,10],c)}),ne&&(Me.tx="Aa",Me.tp=xe("textposition",Ae),Me.ts=10,Me.tc=xe("textfont.color",Ae),Me.tf=xe("textfont.family",Ae),Me.tw=xe("textfont.weight",Ae),Me.ty=xe("textfont.style",Ae),Me.tv=xe("textfont.variant",Ae),Me.tC=xe("textfont.textcase",Ae),Me.tE=xe("textfont.lineposition",Ae),Me.tS=xe("textfont.shadow",Ae)),fe=[E.minExtend($,Me)],ye=E.minExtend(ee,Ie),ye.selectedpoints=null,ye.texttemplate=null}var ke=v.select(this).select("g.legendpoints"),ge=ke.selectAll("path.scatterpts").data(q?fe:[]);ge.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),ge.exit().remove(),ge.call(l.pointStyle,ye,C),q&&(fe[0].mrc=3);var ue=ke.selectAll("g.pointtext").data(ne?fe:[]);ue.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),ue.exit().remove(),ue.selectAll("text").call(l.textPointStyle,ye,C)}function R(H){var X=H[0].trace,K=X.type==="waterfall";if(H[0]._distinct&&K){var G=H[0].trace[H[0].dir].marker;return H[0].mc=G.color,H[0].mlw=G.line.width,H[0].mlc=G.line.color,P(H,this,"waterfall")}var Y=[];X.visible&&K&&(Y=H[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 q=v.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Y);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),q.exit().remove(),q.each(function($){var ee=v.select(this),ne=X[$[0]].marker,fe=z(void 0,ne.line,p,m);ee.attr("d",$[1]).style("stroke-width",fe+"px").call(e.fill,ne.color),fe&&ee.call(e.stroke,ne.line.color)})}function B(H){P(H,this)}function F(H){P(H,this,"funnel")}function P(H,X,K){var G=H[0].trace,Y=G.marker||{},q=Y.line||{},$=Y.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ee=K?G.visible&&G.type===K:x.traceIs(G,"bar"),ne=v.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(ee?[H]:[]);ne.enter().append("path").classed("legend"+K,!0).attr("d",$).attr("transform",b),ne.exit().remove(),ne.each(function(fe){var ye=v.select(this),xe=fe[0],Ae=z(xe.mlw,Y.line,p,m);ye.style("stroke-width",Ae+"px");var Me=xe.mcc;if(!_._inHover&&"mc"in xe){var Ie=t(Y),Ue=Ie.mid;Ue===void 0&&(Ue=(Ie.max+Ie.min)/2),Me=l.tryColorscale(Y,"")(Ue)}var qe=Me||xe.mc||Y.color,ke=Y.pattern,ge=l.getPatternAttr,ue=ke&&(ge(ke.shape,0,"")||ge(ke.path,0,""));if(ue){var ve=ge(ke.bgcolor,0,null),se=ge(ke.fgcolor,0,null),Te=ke.fgopacity,Fe=w(ke.size,8,10),We=w(ke.solidity,.5,1),Ge="legend-"+G.uid;ye.call(l.pattern,"legend",C,Ge,ue,Fe,We,Me,ke.fillmode,ve,se,Te)}else ye.call(e.fill,qe);Ae&&e.stroke(ye,xe.mlc||q.color)})}function j(H){var X=H[0].trace,K=v.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&x.traceIs(X,"box-violin")?[H]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),K.exit().remove(),K.each(function(){var G=v.select(this);if((X.boxpoints==="all"||X.points==="all")&&e.opacity(X.fillcolor)===0&&e.opacity((X.line||{}).color)===0){var Y=E.minExtend(X,{marker:{size:f?s:E.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,Y,C)}else{var q=z(void 0,X.line,p,m);G.style("stroke-width",q+"px").call(e.fill,X.fillcolor),q&&e.stroke(G,X.line.color)}})}function U(H){var X=H[0].trace,K=v.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[H,H]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(G,Y){return Y?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",b).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(G,Y){var q=v.select(this),$=X[Y?"increasing":"decreasing"],ee=z(void 0,$.line,p,m);q.style("stroke-width",ee+"px").call(e.fill,$.fillcolor),ee&&e.stroke(q,$.line.color)})}function Z(H){var X=H[0].trace,K=v.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[H,H]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(G,Y){return Y?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",b).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(G,Y){var q=v.select(this),$=X[Y?"increasing":"decreasing"],ee=z(void 0,$.line,p,m);q.style("fill","none").call(l.dashLine,$.line.dash,ee),ee&&e.stroke(q,$.line.color)})}function Q(H){ae(H,this,"pie")}function re(H){ae(H,this,"funnelarea")}function ae(H,X,K){var G=H[0],Y=G.trace,q=K?Y.visible&&Y.type===K:x.traceIs(Y,K),$=v.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(q?[H]:[]);if($.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),$.exit().remove(),$.size()){var ee=Y.marker||{},ne=z(n(ee.line.width,G.pts),ee.line,p,m),fe="pieLike",ye=E.minExtend(Y,{marker:{line:{width:ne}}},fe),xe=E.minExtend(G,{trace:ye},fe);r($,xe,ye,C)}}function oe(H){var X=H[0].trace,K,G=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":G=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":G=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":G=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":G=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],K=!1;break;case"streamtube":G=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],K=!1;break;case"surface":G=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],K=!0;break;case"mesh3d":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":G=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var Y=v.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(G);Y.enter().append("path").classed("legend3dandfriends",!0).attr("transform",b).style("stroke-miterlimit",1),Y.exit().remove(),Y.each(function(q,$){var ee=v.select(this),ne=t(X),fe=ne.colorscale,ye=ne.reversescale,xe=function(Ue){if(Ue.size()){var qe="legendfill-"+X.uid;l.gradient(Ue,C,qe,g(ye,K==="radial"),fe,"fill")}},Ae;if(fe){if(!K){var Ie=fe.length;Ae=$===0?fe[ye?Ie-1:0][1]:$===1?fe[ye?0:Ie-1][1]:fe[Math.floor((Ie-1)/2)][1]}}else{var Me=X.vertexcolor||X.facecolor||X.color;Ae=E.isArrayOrTypedArray(Me)?Me[$]||Me[0]:Me}ee.attr("d",q[0]),Ae?ee.call(e.fill,Ae):ee.call(xe)})}};function g(S,M){var C=M?"radial":"horizontal";return C+(S?"":"reversed")}function i(S){var M=S[0].trace,C=M.contours,_=a.hasLines(M)||M.visible&&M.type==="quiver",T=a.hasMarkers(M),f=M.visible&&M.fill&&M.fill!=="none",u=!1,A=!1;if(C){var b=C.coloring;b==="lines"?u=!0:_=b==="none"||b==="heatmap"||C.showlines,C.type==="constraint"?f=C._operation!=="=":(b==="fill"||b==="heatmap")&&(A=!0)}return{showMarker:T,showLine:_,showFill:f,showGradientLine:u,showGradientFill:A,anyLine:_||u,anyFill:f||A}}function w(S,M,C){return S&&E.isArrayOrTypedArray(S)?M:S>C?C:S}}}),Ub=Ee({"src/components/legend/draw.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=vl(),k=Ri(),l=zp(),e=qf(),t=yo(),a=Qa(),r=Fs(),n=Nb().handleItemClick,o=Nb().handleTitleClick,s=Ob(),c=rc(),m=c.LINE_SPACING,h=c.FROM_TL,p=c.FROM_BR,g=_M(),i=jb(),w=q0(),S=1,M=/^legend[0-9]*$/;V.exports=function(Z,Q){if(Q)_(Z,Q);else{var re=Z._fullLayout,ae=re._legends,oe=re._infolayer.selectAll('[class^="legend"]');oe.each(function(){var G=v.select(this),Y=G.attr("class"),q=Y.split(" ")[0];q.match(M)&&ae.indexOf(q)===-1&&G.remove()});for(var H=0;H1)}var ne=re.hiddenlabels||[];if(!X&&(!re.showlegend||!K.length))return H.selectAll("."+ae).remove(),re._topdefs.select("#"+oe).remove(),E.autoMargin(U,ae);var fe=x.ensureSingle(H,"g",ae,function(ge){X||ge.attr("pointer-events","all")}),ye=x.ensureSingleById(re._topdefs,"clipPath",oe,function(ge){ge.append("rect")}),xe=x.ensureSingle(fe,"rect","bg",function(ge){ge.attr("shape-rendering","crispEdges")});xe.call(a.stroke,Q.bordercolor).call(a.fill,Q.bgcolor).style("stroke-width",Q.borderwidth+"px");var Ae=x.ensureSingle(fe,"g","scrollbox"),Me=Q.title;Q._titleWidth=0,Q._titleHeight=0;var Ie;Me.text?(Ie=x.ensureSingle(Ae,"text",ae+"titletext"),Ie.attr("text-anchor","start").call(t.font,Me.font).text(Me.text),I(Ie,Ae,U,Q,S),!X&&(Q.titleclick||Q.titledoubleclick)&&z(Ae,U,Q,ae)):(Ae.selectAll("."+ae+"titletext").remove(),Ae.selectAll("."+ae+"titletoggle").remove());var Ue=x.ensureSingle(fe,"rect","scrollbar",function(ge){ge.attr(s.scrollBarEnterAttrs).call(a.fill,s.scrollBarColor)}),qe=Ae.selectAll("g.groups").data(K);qe.enter().append("g").attr("class","groups"),qe.exit().remove();var ke=qe.selectAll("g.traces").data(x.identity);ke.enter().append("g").attr("class","traces"),ke.exit().remove(),ke.style("opacity",function(ge){let ue=ge[0],ve=ue.trace;if(ue.groupTitle){let se=ve.legendgroup,Te=(re.shapes||[]).filter(function(We){return We.showlegend});return U._fullData.concat(Te).some(function(We){return We.legendgroup===se&&(We.legend||"legend")===ae&&We.visible===!0})?1:.5}return k.traceIs(ve,"pie-like")?ne.indexOf(ge[0].label)!==-1?.5:1:ve.visible==="legendonly"?.5:1}).each(function(){v.select(this).call(u,U,Q)}).call(i,U,Q).each(function(ge){X||ge[0].groupTitle&&Q.groupclick==="toggleitem"||v.select(this).call(b,U,ae)}),x.syncOrAsync([E.previousPromises,function(){return B(U,qe,ke,Q,Ae)},function(){var ge=re._size,ue=Q.borderwidth,ve=Q.xref==="paper",se=Q.yref==="paper";if(Me.text){let dt=(re.shapes||[]).filter(function(Ct){return Ct.showlegend}),Dt=U._fullData.concat(dt).some(function(Ct){let Vt=Ct.legend||"legend";var Ht=Array.isArray(Vt)?Vt.includes(ae):Vt===ae;return Ht&&Ct.visible===!0});Ie.style("opacity",Dt?1:.5)}if(!X){var Te,Fe;ve?Te=ge.l+ge.w*Q.x-h[P(Q)]*Q._width:Te=re.width*Q.x-h[P(Q)]*Q._width,se?Fe=ge.t+ge.h*(1-Q.y)-h[j(Q)]*Q._effHeight:Fe=re.height*(1-Q.y)-h[j(Q)]*Q._effHeight;var We=F(U,ae,Te,Fe);if(We)return;if(re.margin.autoexpand){var Ge=Te,gt=Fe;Te=ve?x.constrain(Te,0,re.width-Q._width):Ge,Fe=se?x.constrain(Fe,0,re.height-Q._effHeight):gt,Te!==Ge&&x.log("Constrain "+ae+".x to make legend fit inside graph"),Fe!==gt&&x.log("Constrain "+ae+".y to make legend fit inside graph")}t.setTranslate(fe,Te,Fe)}if(Ue.on(".drag",null),fe.on("wheel",null),X||Q._height<=Q._maxHeight||U._context.staticPlot){var mt=Q._effHeight;X&&(mt=Q._height),xe.attr({width:Q._width-ue,height:mt-ue,x:ue/2,y:ue/2}),t.setTranslate(Ae,0,0),ye.select("rect").attr({width:Q._width-2*ue,height:mt-2*ue,x:ue,y:ue}),t.setClipUrl(Ae,oe,U),t.setRect(Ue,0,0,0,0),delete Q._scrollY}else{var Tt=Math.max(s.scrollBarMinHeight,Q._effHeight*Q._effHeight/Q._height),At=Q._effHeight-Tt-2*s.scrollBarMargin,Kt=Q._height-Q._effHeight,nr=At/Kt,_r=Math.min(Q._scrollY||0,Kt);xe.attr({width:Q._width-2*ue+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-ue,x:ue/2,y:ue/2}),ye.select("rect").attr({width:Q._width-2*ue+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-2*ue,x:ue,y:ue+_r}),t.setClipUrl(Ae,oe,U),He(_r,Tt,nr),fe.on("wheel",function(){_r=x.constrain(Q._scrollY+v.event.deltaY/Kt*At,0,Kt),He(_r,Tt,nr),_r!==0&&_r!==Kt&&v.event.preventDefault()});var Zt,sr,Ot,vt=function(dt,Dt,Ct){var Vt=(Ct-Dt)/nr+dt;return x.constrain(Vt,0,Kt)},ht=function(dt,Dt,Ct){var Vt=(Dt-Ct)/nr+dt;return x.constrain(Vt,0,Kt)},Re=v.behavior.drag().on("dragstart",function(){var dt=v.event.sourceEvent;dt.type==="touchstart"?Zt=dt.changedTouches[0].clientY:Zt=dt.clientY,Ot=_r}).on("drag",function(){var dt=v.event.sourceEvent;dt.buttons===2||dt.ctrlKey||(dt.type==="touchmove"?sr=dt.changedTouches[0].clientY:sr=dt.clientY,_r=vt(Ot,Zt,sr),He(_r,Tt,nr))});Ue.call(Re);var Be=v.behavior.drag().on("dragstart",function(){var dt=v.event.sourceEvent;dt.type==="touchstart"&&(Zt=dt.changedTouches[0].clientY,Ot=_r)}).on("drag",function(){var dt=v.event.sourceEvent;dt.type==="touchmove"&&(sr=dt.changedTouches[0].clientY,_r=ht(Ot,Zt,sr),He(_r,Tt,nr))});Ae.call(Be)}function He(dt,Dt,Ct){Q._scrollY=U._fullLayout[ae]._scrollY=dt,t.setTranslate(Ae,0,-dt),t.setRect(Ue,Q._width,s.scrollBarMargin+dt*Ct,s.scrollBarWidth,Dt),ye.select("rect").attr("y",ue+dt)}if(U._context.edits.legendPosition){var $e,Ze,Je,Mt;fe.classed("cursor-move",!0),e.init({element:fe.node(),gd:U,prepFn:function(dt){if(dt.target!==Ue.node()){var Dt=t.getTranslate(fe);Je=Dt.x,Mt=Dt.y}},moveFn:function(dt,Dt){if(Je!==void 0&&Mt!==void 0){var Ct=Je+dt,Vt=Mt+Dt;t.setTranslate(fe,Ct,Vt),$e=e.align(Ct,Q._width,ge.l,ge.l+ge.w,Q.xanchor),Ze=e.align(Vt+Q._height,-Q._height,ge.t+ge.h,ge.t,Q.yanchor)}},doneFn:function(){if($e!==void 0&&Ze!==void 0){var dt={};dt[ae+".x"]=$e,dt[ae+".y"]=Ze,k.call("_guiRelayout",U,dt)}},clickFn:function(dt,Dt){var Ct=H.selectAll("g.traces").filter(function(){var Vt=this.getBoundingClientRect();return Dt.clientX>=Vt.left&&Dt.clientX<=Vt.right&&Dt.clientY>=Vt.top&&Dt.clientY<=Vt.bottom});Ct.size()>0&&f(U,Q,Ct,dt,Dt)}})}}],U)}}function T(U,Z,Q){var re=U[0],ae=re.width,oe=Z.entrywidthmode,H=re.trace.legendwidth||Z.entrywidth;return oe==="fraction"?Z._maxWidth*H:Q+(H||ae)}function f(U,Z,Q,re,ae){var oe=U._fullLayout,H=Q.data()[0][0].trace,X=Z.itemclick,K=Z.itemdoubleclick,G={event:ae,node:Q.node(),curveNumber:H.index,expandedIndex:H.index,data:U.data,layout:U.layout,frames:U._transitionData._frames,config:U._context,fullData:U._fullData,fullLayout:oe};H._group&&(G.group=H._group),k.traceIs(H,"pie-like")&&(G.label=Q.datum()[0].label);var Y=l.triggerHandler(U,"plotly_legendclick",G);if(re===1){if(Y===!1)return;Z._clickTimeout=setTimeout(function(){U._fullLayout&&X&&n(Q,U,Z,X)},U._context.doubleClickDelay)}else if(re===2){Z._clickTimeout&&clearTimeout(Z._clickTimeout),U._legendMouseDownTime=0;var q=l.triggerHandler(U,"plotly_legenddoubleclick",G);q!==!1&&Y!==!1&&K&&n(Q,U,Z,K)}}function u(U,Z,Q){var re=w.getId(Q),ae=U.data()[0][0],oe=ae.trace,H=k.traceIs(oe,"pie-like"),X=!Q._inHover&&Z._context.edits.legendText&&!H,K=Q._maxNameLength,G,Y;ae.groupTitle?(G=ae.groupTitle.text,Y=ae.groupTitle.font):(Y=Q.font,Q.entries?G=ae.text:(G=H?ae.label:oe.name,oe._meta&&(G=x.templateString(G,oe._meta))));var q=x.ensureSingle(U,"text",re+"text");q.attr("text-anchor","start").call(t.font,Y).text(X?A(G,K):G);var $=Q.indentation+Q.itemwidth+s.itemGap*2;r.positionText(q,$,0),X?q.call(r.makeEditable,{gd:Z,text:G}).call(I,U,Z,Q).on("edit",function(ee){this.text(A(ee,K)).call(I,U,Z,Q);var ne={};return ne.name=ee,ae.trace._isShape?k.call("_guiRelayout",Z,"shapes["+oe.index+"].name",ne.name):k.call("_guiRestyle",Z,ne,oe.index)}):I(q,U,Z,Q)}function A(U,Z){var Q=Math.max(4,Z);if(U&&U.trim().length>=Q/2)return U;U=U||"";for(var re=Q-U.length;re>0;re--)U+=" ";return U}function b(U,Z,Q){var re=Z._context.doubleClickDelay,ae,oe=1,H=x.ensureSingle(U,"rect",Q+"toggle",function(X){Z._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(a.fill,"rgba(0,0,0,0)")});Z._context.staticPlot||(H.on("mousedown",function(){ae=new Date().getTime(),ae-Z._legendMouseDownTimere&&(oe=Math.max(oe-1,1)),f(Z,X,U,oe,v.event)}}))}function z(U,Z,Q,re){if(Z._fullData.some(function(G){let Y=G.legend||"legend";return(Array.isArray(Y)?Y.includes(re):Y===re)&&k.traceIs(G,"pie-like")}))return;let oe=Z._context.doubleClickDelay;var H,X=1;let K=x.ensureSingle(U,"rect",re+"titletoggle",function(G){Z._context.staticPlot||G.style("cursor","pointer").attr("pointer-events","all"),G.call(a.fill,"rgba(0,0,0,0)")});Z._context.staticPlot||(K.on("mousedown",function(){H=new Date().getTime(),H-Z._legendMouseDownTimeoe&&(X=Math.max(X-1,1));let G={event:v.event,legendId:re,data:Z.data,layout:Z.layout,fullData:Z._fullData,fullLayout:Z._fullLayout};if(X===1&&Q.titleclick){if(l.triggerHandler(Z,"plotly_legendtitleclick",G)===!1)return;Q._titleClickTimeout=setTimeout(function(){Z._fullLayout&&o(Z,Q,Q.titleclick)},oe)}else X===2&&(Q._titleClickTimeout&&clearTimeout(Q._titleClickTimeout),Z._legendMouseDownTime=0,l.triggerHandler(Z,"plotly_legendtitledoubleclick",G)!==!1&&Q.titledoubleclick&&o(Z,Q,Q.titledoubleclick))}))}function I(U,Z,Q,re,ae){re._inHover&&U.attr("data-notex",!0),r.convertToTspans(U,Q,function(){N(Z,Q,re,ae)})}function N(U,Z,Q,re){var ae=U.data()[0][0],oe=ae&&ae.trace.showlegend;if(Array.isArray(oe)&&(oe=oe[ae.i]!==!1),!Q._inHover&&ae&&!oe){U.remove();return}var H=U.select("g[class*=math-group]"),X=H.node(),K=w.getId(Q);Q||(Q=Z._fullLayout[K]);var G=Q.borderwidth,Y;re===S?Y=Q.title.font:ae.groupTitle?Y=ae.groupTitle.font:Y=Q.font;var q=Y.size*m,$,ee;if(X){var ne=t.bBox(X);$=ne.height,ee=ne.width,re===S?t.setTranslate(H,G,G+$*.75):t.setTranslate(H,0,$*.25)}else{var fe="."+K+(re===S?"title":"")+"text",ye=U.select(fe),xe=r.lineCount(ye),Ae=ye.node();if($=q*xe,ee=Ae?t.bBox(Ae).width:0,re===S)Q.title.side==="left"&&(ee+=s.itemGap*2),r.positionText(ye,G+s.titlePad,G+q);else{var Me=s.itemGap*2+Q.indentation+Q.itemwidth;ae.groupTitle&&(Me=s.itemGap,ee-=Q.indentation+Q.itemwidth),r.positionText(ye,Me,-q*((xe-1)/2-.3))}}re===S?(Q._titleWidth=ee,Q._titleHeight=$):(ae.lineHeight=q,ae.height=Math.max($,16)+3,ae.width=ee)}function R(U){var Z=0,Q=0,re=U.title.side;return re&&(re.indexOf("left")!==-1&&(Z=U._titleWidth),re.indexOf("top")!==-1&&(Q=U._titleHeight)),[Z,Q]}function B(U,Z,Q,re,ae){var oe=U._fullLayout,H=w.getId(re);re||(re=oe[H]);var X=oe._size,K=w.isVertical(re),G=w.isGrouped(re),Y=re.entrywidthmode==="fraction",q=re.borderwidth,$=2*q,ee=s.itemGap,ne=re.indentation+re.itemwidth+ee*2,fe=2*(q+ee),ye=j(re),xe=re.y<0||re.y===0&&ye==="top",Ae=re.y>1||re.y===1&&ye==="bottom",Me=re.tracegroupgap,Ie={};let{orientation:Ue,yref:qe}=re,{maxheight:ke}=re,ge=xe||Ae||Ue!=="v"||qe!=="paper";ke||(ke=ge?.5:1);let ue=ge?oe.height:X.h;re._maxHeight=Math.max(ke>1?ke:ke*ue,30);var ve=0;re._width=0,re._height=0;var se=R(re);if(K)Q.each(function(dt){var Dt=dt[0].height;t.setTranslate(this,q+se[0],q+se[1]+re._height+Dt/2+ee),re._height+=Dt,re._width=Math.max(re._width,dt[0].width)}),ve=ne+re._width,re._width+=ee+ne+$,re._height+=fe,G&&(Z.each(function(dt,Dt){t.setTranslate(this,0,Dt*re.tracegroupgap)}),re._height+=(re._lgroupsLength-1)*re.tracegroupgap);else{var Te=P(re),Fe=re.x<0||re.x===0&&Te==="right",We=re.x>1||re.x===1&&Te==="left",Ge=Ae||xe,gt=oe.width/2;re._maxWidth=Math.max(Fe?Ge&&Te==="left"?X.l+X.w:gt:We?Ge&&Te==="right"?X.r+X.w:gt:X.w,2*ne);var mt=0,Tt=0;Q.each(function(dt){var Dt=T(dt,re,ne);mt=Math.max(mt,Dt),Tt+=Dt}),ve=null;var At=0;if(G){var Kt=0,nr=0,_r=0;Z.each(function(){var dt=0,Dt=0;v.select(this).selectAll("g.traces").each(function(Vt){var Ht=T(Vt,re,ne),Wt=Vt[0].height;t.setTranslate(this,se[0],se[1]+q+ee+Wt/2+Dt),Dt+=Wt,dt=Math.max(dt,Ht),Ie[Vt[0].trace.legendgroup]=dt});var Ct=dt+ee;nr>0&&Ct+q+nr>re._maxWidth?(At=Math.max(At,nr),nr=0,_r+=Kt+Me,Kt=Dt):Kt=Math.max(Kt,Dt),t.setTranslate(this,nr,_r),nr+=Ct}),re._width=Math.max(At,nr)+q,re._height=_r+Kt+fe}else{var Zt=Q.size(),sr=Tt+$+(Zt-1)*ee=re._maxWidth&&(At=Math.max(At,Re),vt=0,ht+=Ot,re._height+=Ot,Ot=0),t.setTranslate(this,se[0]+q+vt,se[1]+q+ht+Dt/2+ee),Re=vt+Ct+ee,vt+=Vt,Ot=Math.max(Ot,Dt)}),sr?(re._width=vt+$,re._height=Ot+fe):(re._width=Math.max(At,Re)+$,re._height+=Ot+fe)}}re._width=Math.ceil(Math.max(re._width+se[0],re._titleWidth+2*(q+s.titlePad))),re._height=Math.ceil(Math.max(re._height+se[1],re._titleHeight+2*(q+s.itemGap))),re._effHeight=Math.min(re._height,re._maxHeight);var Be=U._context.edits,He=Be.legendText||Be.legendPosition;Q.each(function(dt){var Dt=v.select(this).select("."+H+"toggle"),Ct=dt[0].height,Vt=dt[0].trace.legendgroup,Ht=T(dt,re,ne);G&&Vt!==""&&(Ht=Ie[Vt]);var Wt=He?ne:ve||Ht;!K&&!Y&&(Wt+=ee/2),t.setRect(Dt,0,-Ct/2,Wt,Ct)});var $e=ae.select("."+H+"titletext");$e.node()&&C($e,re,q);var Ze=ae.select("."+H+"titletoggle");if(Ze.size()&&$e.node()){var Je=$e.attr("x")||0,Mt=s.titlePad;t.setRect(Ze,Je-Mt,q,re._titleWidth+2*Mt,re._titleHeight+2*Mt)}}function F(U,Z,Q,re){var ae=U._fullLayout,oe=ae[Z],H=P(oe),X=j(oe),K=oe.xref==="paper",G=oe.yref==="paper";U._fullLayout._reservedMargin[Z]={};var Y=oe.y<.5?"b":"t",q=oe.x<.5?"l":"r",$={r:ae.width-Q,l:Q+oe._width,b:ae.height-re,t:re+oe._effHeight};if(K&&G)return E.autoMargin(U,Z,{x:oe.x,y:oe.y,l:oe._width*h[H],r:oe._width*p[H],b:oe._effHeight*p[X],t:oe._effHeight*h[X]});K?U._fullLayout._reservedMargin[Z][Y]=$[Y]:G||oe.orientation==="v"?U._fullLayout._reservedMargin[Z][q]=$[q]:U._fullLayout._reservedMargin[Z][Y]=$[Y]}function P(U){return x.isRightAnchor(U)?"right":x.isCenterAnchor(U)?"center":"left"}function j(U){return x.isBottomAnchor(U)?"bottom":x.isMiddleAnchor(U)?"middle":"top"}}}),qb=Ee({"src/components/fx/hover.js"(J){"use strict";var V=Hn(),v=mi(),x=Vr(),E=x.pushUnique,k=x.strTranslate,l=x.strRotate,e=zp(),t=Fs(),a=yM(),r=yo(),n=Qa(),o=qf(),s=uo(),c=tc().zindexSeparator,m=Ri(),h=Qf(),p=Mv(),g=Bb(),i=Ub(),w=p.YANGLE,S=Math.PI*w/180,M=1/Math.sin(S),C=Math.cos(S),_=Math.sin(S),T=p.HOVERARROWSIZE,f=p.HOVERTEXTPAD,u={box:!0,ohlc:!0,violin:!0,candlestick:!0},A={scatter:!0,scattergl:!0,splom:!0};function b(q,$){return q.distance-$.distance}J.hover=function($,ee,ne,fe){$=x.getGraphDiv($);var ye=ee.target;x.throttle($._fullLayout._uid+p.HOVERID,p.HOVERMINTIME,function(){z($,ee,ne,fe,ye)})},J.loneHover=function($,ee){var ne=!0;Array.isArray($)||(ne=!1,$=[$]);var fe=ee.gd,ye=K(fe),xe=G(fe),Ae=$.map(function(se){var Te=se._x0||se.x0||se.x||0,Fe=se._x1||se.x1||se.x||0,We=se._y0||se.y0||se.y||0,Ge=se._y1||se.y1||se.y||0,gt=se.eventData;if(gt){var mt=Math.min(Te,Fe),Tt=Math.max(Te,Fe),At=Math.min(We,Ge),Kt=Math.max(We,Ge),nr=se.trace;if(m.traceIs(nr,"gl3d")){var _r=fe._fullLayout[nr.scene]._scene.container,Zt=_r.offsetLeft,sr=_r.offsetTop;mt+=Zt,Tt+=Zt,At+=sr,Kt+=sr}gt.bbox={x0:mt+xe,x1:Tt+xe,y0:At+ye,y1:Kt+ye},gt.xPixel=(Te+Fe)/2,gt.yPixel=(We+Ge)/2,ee.inOut_bbox&&ee.inOut_bbox.push(gt.bbox)}else gt=!1;return{color:se.color||n.defaultLine,x0:se.x0||se.x||0,x1:se.x1||se.x||0,y0:se.y0||se.y||0,y1:se.y1||se.y||0,xLabel:se.xLabel,yLabel:se.yLabel,zLabel:se.zLabel,text:se.text,name:se.name,idealAlign:se.idealAlign,borderColor:se.borderColor,fontFamily:se.fontFamily,fontSize:se.fontSize,fontColor:se.fontColor,fontWeight:se.fontWeight,fontStyle:se.fontStyle,fontVariant:se.fontVariant,nameLength:se.nameLength,textAlign:se.textAlign,trace:se.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:se.hovertemplate||!1,hovertemplateLabels:se.hovertemplateLabels||!1,eventData:gt}}),Me=!1,Ie=R(Ae,{gd:fe,hovermode:"closest",rotateLabels:Me,bgColor:ee.bgColor||n.background,container:V.select(ee.container),outerContainer:ee.outerContainer||ee.container}),Ue=Ie.hoverLabels,qe=5,ke=0,ge=0;Ue.sort(function(se,Te){return se.y0-Te.y0}).each(function(se,Te){var Fe=se.y0-se.by/2;Fe-qeTt[0]._length||ir<0||ir>At[0]._length)return o.unhoverRaw(q,$)}if($.pointerX=It+Tt[0]._offset,$.pointerY=ir+At[0]._offset,"xval"in $?ht=h.flat(ye,$.xval):ht=h.p2c(Tt,It),"yval"in $?Re=h.flat(ye,$.yval):Re=h.p2c(At,ir),q._hoverPointerX=$.pointerX,q._hoverPointerY=$.pointerY,!v(ht[0])||!v(Re[0]))return x.warn("Fx.hover failed",$,q),o.unhoverRaw(q,$)}Ae.clickanywhere&&(q._hoverXVals=ht,q._hoverYVals=Re,q._hoverXAxes=Tt,q._hoverYAxes=At);var Ir=1/0;function ln(Sa,Gi){for(He=0;HeHt&&(Ot.splice(0,Ht),Ir=Ot[0].distance),qe&&sr!==0&&Ot.length===0){Vt.distance=sr,Vt.index=!1;var so=Ze._module.hoverPoints(Vt,Dt,Ct,"closest",{hoverLayer:Ae._hoverlayer});if(so&&(so=so.filter(function(Wi){return Wi.spikeDistance<=sr})),so&&so.length){var Mo,So=so.filter(function(Wi){return Wi.xa.showspikes&&Wi.xa.spikesnap!=="hovered data"});if(So.length){var oi=So[0];v(oi.x0)&&v(oi.y0)&&(Mo=wn(oi),(!Wt.vLinePoint||Wt.vLinePoint.spikeDistance>Mo.spikeDistance)&&(Wt.vLinePoint=Mo))}var ii=so.filter(function(Wi){return Wi.ya.showspikes&&Wi.ya.spikesnap!=="hovered data"});if(ii.length){var co=ii[0];v(co.x0)&&v(co.y0)&&(Mo=wn(co),(!Wt.hLinePoint||Wt.hLinePoint.spikeDistance>Mo.spikeDistance)&&(Wt.hLinePoint=Mo))}}}}}ln();function nn(Sa,Gi,ti){for(var fi=null,xo=1/0,zi,so=0;soSa.trace.index===Ii.trace.index):Ot=[Ii];var ho=Ot.length,da=X("x",Ii,Ae),Kn=X("y",Ii,Ae);ln(da,Kn);var ot=[],et={},hr=0,ur=function(Sa){var Gi=u[Sa.trace.type]?I(Sa):Sa.trace.index;if(!et[Gi])hr++,et[Gi]=hr,ot.push(Sa);else{var ti=et[Gi]-1,fi=ot[ti];ti>0&&Math.abs(Sa.distance)ho-1;Tr--)ur(Ot[Tr]);Ot=ot,ua()}var Rr=q._hoverdata,Fr=[],at=K(q),kt=G(q);for(let Sa of Ot){var Ut=h.makeEventData(Sa,Sa.trace,Sa.cd);if(Sa.hovertemplate!==!1){var ar=!1;Sa.cd[Sa.index]&&Sa.cd[Sa.index].ht&&(ar=Sa.cd[Sa.index].ht),Sa.hovertemplate=ar||Sa.trace.hovertemplate||!1}if(Sa.xa&&Sa.ya){var Er=Sa.x0+Sa.xa._offset,br=Sa.x1+Sa.xa._offset,Or=Sa.y0+Sa.ya._offset,Pr=Sa.y1+Sa.ya._offset,hn=Math.min(Er,br),zn=Math.max(Er,br),Pn=Math.min(Or,Pr),Ca=Math.max(Or,Pr);Ut.bbox={x0:hn+kt,x1:zn+kt,y0:Pn+at,y1:Ca+at},Ut.xPixel=(Er+br)/2,Ut.yPixel=(Or+Pr)/2}Sa.eventData=[Ut],Fr.push(Ut)}q._hoverdata=Fr;var ma=ke==="y"&&(vt.length>1||Ot.length>1)||ke==="closest"&&Sr&&Ot.length>1,bi=n.combine(Ae.plot_bgcolor||n.background,Ae.paper_bgcolor),ga=R(Ot,{gd:q,hovermode:ke,rotateLabels:ma,bgColor:bi,container:Ae._hoverlayer,outerContainer:Ae._paper.node(),commonLabelOpts:Ae.hoverlabel,hoverdistance:Ae.hoverdistance}),eo=ga.hoverLabels;if(h.isUnifiedHover(ke)||(F(eo,ma,Ae,ga.commonLabelBoundingBox),U(eo,ma,Ae._invScaleX,Ae._invScaleY)),fe&&fe.tagName){var si=m.getComponentMethod("annotations","hasClickToShow")(q,Fr);a(V.select(fe),si?"pointer":"")}var Ao=re(q,$,Rr);if(!fe||ne||!Ao&&!Ae.hoveranywhere)return;Rr&&Ao&&q.emit("plotly_unhover",{event:$,points:Rr}),ro(q._hoverdata);function ro(Sa){q.emit("plotly_hover",{event:$,points:Sa,xaxes:Tt,yaxes:At,xvals:h.c2dApply(Tt,ht),yvals:h.c2dApply(At,Re),xPixel:$.pointerX,yPixel:$.pointerY})}}function I(q){return[q.trace.index,q.index,q.x0,q.y0,q.name,q.attr,q.xa?q.xa._id:"",q.ya?q.ya._id:""].join(",")}var N=/([\s\S]*)<\/extra>/;function R(q,$){var ee=$.gd,ne=ee._fullLayout,fe=$.hovermode,ye=$.rotateLabels,xe=$.bgColor,Ae=$.container,Me=$.outerContainer,Ie=$.commonLabelOpts||{};if(q.length===0)return[[]];var Ue=$.fontFamily||p.HOVERFONT,qe=$.fontSize||p.HOVERFONTSIZE,ke=$.fontWeight||ne.font.weight,ge=$.fontStyle||ne.font.style,ue=$.fontVariant||ne.font.variant,ve=$.fontTextcase||ne.font.textcase,se=$.fontLineposition||ne.font.lineposition,Te=$.fontShadow||ne.font.shadow,Fe=q[0],We=Fe.xa,Ge=Fe.ya,gt=fe.charAt(0),mt=gt+"Label",Tt=Fe[mt];if(Tt===void 0&&We.type==="multicategory")for(var At=0;Atne.width-Fr&&(at=ne.width-Fr),pa.attr("d","M"+(ur-at)+",0L"+(ur-at+T)+","+Rr+T+"H"+Fr+"v"+Rr+(f*2+hr.height)+"H"+-Fr+"V"+Rr+T+"H"+(ur-at-T)+"Z"),ur=at,He.minX=ur-Fr,He.maxX=ur+Fr,We.side==="top"?(He.minY=Tr-(f*2+hr.height),He.maxY=Tr-f):(He.minY=Tr+f,He.maxY=Tr+(f*2+hr.height))}else{var kt,Ut,ar;Ge.side==="right"?(kt="start",Ut=1,ar="",ur=We._offset+We._length):(kt="end",Ut=-1,ar="-",ur=We._offset),Tr=Ge._offset+(Fe.y0+Fe.y1)/2,Ii.attr("text-anchor",kt),pa.attr("d","M0,0L"+ar+T+","+T+"V"+(f+hr.height/2)+"h"+ar+(f*2+hr.width)+"V-"+(f+hr.height/2)+"H"+ar+T+"V-"+T+"Z"),He.minY=Tr-(f+hr.height/2),He.maxY=Tr+(f+hr.height/2),Ge.side==="right"?(He.minX=ur+T,He.maxX=ur+T+(f*2+hr.width)):(He.minX=ur-T-(f*2+hr.width),He.maxX=ur-T);var Er=hr.height/2,br=nr-hr.top-Er,Or="clip"+ne._uid+"commonlabel"+Ge._id,Pr;if(urpa.hoverinfo!=="none");if(ba.length===0)return[];var $e=ne.hoverlabel,Ze=$e.font,Je=ba[0],Mt=((fe==="x unified"?Je.xa:Je.ya).unifiedhovertitle||{}).text,dt=Mt?x.hovertemplateString({data:fe==="x unified"?[{xa:Je.xa,x:Je.xVal}]:[{ya:Je.ya,y:Je.yVal}],fallback:Je.trace.hovertemplatefallback,locale:ne._d3locale,template:Mt}):Tt,Dt={showlegend:!0,legend:{title:{text:dt,font:Ze},font:Ze,bgcolor:$e.bgcolor,bordercolor:$e.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ne.legend?ne.legend.traceorder:void 0,orientation:"v"}},Ct={font:Ze};g(Dt,Ct,ee._fullData);var Vt=Ct.legend;Vt.entries=[];for(var Ht=0;Ht=0?ai=ua:Qn+fr<_r&&Qn>=0?ai=Qn:ei+fr<_r?ai=ei:ua-nn=0?Mi=jn:Aa+Ir=0?Mi=Aa:Fa+Ir=0,(ba.idealAlign==="top"||!Pn)&&Ca?(ar-=br/2,ba.anchor="end"):Pn?(ar+=br/2,ba.anchor="start"):ba.anchor="middle",ba.crossPos=ar;else{if(ba.pos=ar,Pn=Ut+Er/2+zn<=_r,Ca=Ut-Er/2-zn>=0,(ba.idealAlign==="left"||!Pn)&&Ca)Ut-=Er/2,ba.anchor="end";else if(Pn)Ut+=Er/2,ba.anchor="start";else{ba.anchor="middle";var ma=zn/2,bi=Ut+ma-_r,ga=Ut-ma;bi>0&&(Ut-=bi),ga<0&&(Ut+=-ga)}ba.crossPos=Ut}Tr.attr("text-anchor",ba.anchor),Fr&&Rr.attr("text-anchor",ba.anchor),pa.attr("transform",k(Ut,ar)+(ye?l(w):""))}),{hoverLabels:ci,commonLabelBoundingBox:He}}function B(q,$,ee,ne,fe,ye){var xe,Ae,Me="",Ie="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=x.templateString(q.name,q.trace._meta)),Me=oe(q.name,q.nameLength));var Ue=ee.charAt(0),qe=Ue==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(Ie+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(Ie+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmap"&&(Ie+=(Ie?"z: ":"")+q.zLabel)):$&&q[Ue+"Label"]===fe?Ie=q[qe+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(Ie=q.yLabel):q.yLabel===void 0?Ie=q.xLabel:Ie="("+q.xLabel+", "+q.yLabel+")",(q.text||q.text===0)&&!Array.isArray(q.text)&&(Ie+=(Ie?"
":"")+q.text),q.extraText!==void 0&&(Ie+=(Ie?"
":"")+q.extraText),ye&&Ie===""&&!q.hovertemplate&&(Me===""&&ye.remove(),Ie=Me),(Ae=(xe=q.trace)==null?void 0:xe.hoverlabel)!=null&&Ae.split&&(q.hovertemplate="");let{hovertemplate:ke=!1}=q;if(ke){let ge=q.hovertemplateLabels||q;q[Ue+"Label"]!==fe&&(ge[Ue+"other"]=ge[Ue+"Val"],ge[Ue+"otherLabel"]=ge[Ue+"Label"]),Ie=x.hovertemplateString({data:[q.eventData[0]||{},q.trace._meta],fallback:q.trace.hovertemplatefallback,labels:ge,locale:ne._d3locale,template:ke}),Ie=Ie.replace(N,(ue,ve)=>(Me=oe(ve,q.nameLength),""))}return[Ie,Me]}function F(q,$,ee,ne){var fe=$?"xa":"ya",ye=$?"ya":"xa",xe=0,Ae=1,Me=q.size(),Ie=new Array(Me),Ue=0,qe=ne.minX,ke=ne.maxX,ge=ne.minY,ue=ne.maxY,ve=function(ht){return ht*ee._invScaleX},se=function(ht){return ht*ee._invScaleY};q.each(function(ht){var Re=ht[fe],Be=ht[ye],He=Re._id.charAt(0)==="x",$e=Re.range;Ue===0&&$e&&$e[0]>$e[1]!==He&&(Ae=-1);var Ze=0,Je=He?ee.width:ee.height;if(ee.hovermode==="x"||ee.hovermode==="y"){var Mt=P(ht,$),dt=ht.anchor,Dt=dt==="end"?-1:1,Ct,Vt;if(dt==="middle")Ct=ht.crossPos+(He?se(Mt.y-ht.by/2):ve(ht.bx/2+ht.tx2width/2)),Vt=Ct+(He?se(ht.by):ve(ht.bx));else if(He)Ct=ht.crossPos+se(T+Mt.y)-se(ht.by/2-T),Vt=Ct+se(ht.by);else{var Ht=ve(Dt*T+Mt.x),Wt=Ht+ve(Dt*ht.bx);Ct=ht.crossPos+Math.min(Ht,Wt),Vt=ht.crossPos+Math.max(Ht,Wt)}He?ge!==void 0&&ue!==void 0&&Math.min(Vt,ue)-Math.max(Ct,ge)>1&&(Be.side==="left"?(Ze=Be._mainLinePosition,Je=ee.width):Je=Be._mainLinePosition):qe!==void 0&&ke!==void 0&&Math.min(Vt,ke)-Math.max(Ct,qe)>1&&(Be.side==="top"?(Ze=Be._mainLinePosition,Je=ee.height):Je=Be._mainLinePosition)}Ie[Ue++]=[{datum:ht,traceIndex:ht.trace.index,dp:0,pos:ht.pos,posref:ht.posref,size:ht.by*(He?M:1)/2,pmin:Ze,pmax:Je}]}),Ie.sort(function(ht,Re){return ht[0].posref-Re[0].posref||Ae*(Re[0].traceIndex-ht[0].traceIndex)});var Te,Fe,We,Ge,gt,mt,Tt;function At(ht){var Re=ht[0],Be=ht[ht.length-1];if(Fe=Re.pmin-Re.pos-Re.dp+Re.size,We=Be.pos+Be.dp+Be.size-Re.pmax,Fe>.01){for(gt=ht.length-1;gt>=0;gt--)ht[gt].dp+=Fe;Te=!1}if(!(We<.01)){if(Fe<-.01){for(gt=ht.length-1;gt>=0;gt--)ht[gt].dp-=We;Te=!1}if(Te){var He=0;for(Ge=0;GeRe.pmax&&He++;for(Ge=ht.length-1;Ge>=0&&!(He<=0);Ge--)mt=ht[Ge],mt.pos>Re.pmax-1&&(mt.del=!0,He--);for(Ge=0;Ge=0;gt--)ht[gt].dp-=We;for(Ge=ht.length-1;Ge>=0&&!(He<=0);Ge--)mt=ht[Ge],mt.pos+mt.dp+mt.size>Re.pmax&&(mt.del=!0,He--)}}}for(;!Te&&xe<=Me;){for(xe++,Te=!0,Ge=0;Ge.01){for(gt=nr.length-1;gt>=0;gt--)nr[gt].dp+=Fe;for(Kt.push.apply(Kt,nr),Ie.splice(Ge+1,1),Tt=0,gt=Kt.length-1;gt>=0;gt--)Tt+=Kt[gt].dp;for(We=Tt/Kt.length,gt=Kt.length-1;gt>=0;gt--)Kt[gt].dp-=We;Te=!1}else Ge++}Ie.forEach(At)}for(Ge=Ie.length-1;Ge>=0;Ge--){var sr=Ie[Ge];for(gt=sr.length-1;gt>=0;gt--){var Ot=sr[gt],vt=Ot.datum;vt.offset=Ot.dp,vt.del=Ot.del}}}function P(q,$){var ee=0,ne=q.offset;return $&&(ne*=-_,ee=q.offset*C),{x:ee,y:ne}}function j(q){var $={start:1,end:-1,middle:0}[q.anchor],ee=$*(T+f),ne=ee+$*(q.txwidth+f),fe=q.anchor==="middle";return fe&&(ee-=q.tx2width/2,ne+=q.txwidth/2+f),{alignShift:$,textShiftX:ee,text2ShiftX:ne}}function U(q,$,ee,ne){var fe=function(xe){return xe*ee},ye=function(xe){return xe*ne};q.each(function(xe){var Ae=V.select(this);if(xe.del)return Ae.remove();var Me=Ae.select("text.nums"),Ie=xe.anchor,Ue=Ie==="end"?-1:1,qe=j(xe),ke=P(xe,$),ge=ke.x,ue=ke.y,ve=Ie==="middle",se="hoverlabel"in xe.trace?xe.trace.hoverlabel.showarrow:!0,Te;ve?Te="M-"+fe(xe.bx/2+xe.tx2width/2)+","+ye(ue-xe.by/2)+"h"+fe(xe.bx)+"v"+ye(xe.by)+"h-"+fe(xe.bx)+"Z":se?Te="M0,0L"+fe(Ue*T+ge)+","+ye(T+ue)+"v"+ye(xe.by/2-T)+"h"+fe(Ue*xe.bx)+"v-"+ye(xe.by)+"H"+fe(Ue*T+ge)+"V"+ye(ue-T)+"Z":Te="M"+fe(Ue*T+ge)+","+ye(ue-xe.by/2)+"h"+fe(Ue*xe.bx)+"v"+ye(xe.by)+"h"+fe(-Ue*xe.bx)+"Z",Ae.select("path").attr("d",Te);var Fe=ge+qe.textShiftX,We=ue+xe.ty0-xe.by/2+f,Ge=xe.textAlign||"auto";Ge!=="auto"&&(Ge==="left"&&Ie!=="start"?(Me.attr("text-anchor","start"),Fe=ve?-xe.bx/2-xe.tx2width/2+f:-xe.bx-f):Ge==="right"&&Ie!=="end"&&(Me.attr("text-anchor","end"),Fe=ve?xe.bx/2-xe.tx2width/2-f:xe.bx+f)),Me.call(t.positionText,fe(Fe),ye(We)),xe.tx2width&&(Ae.select("text.name").call(t.positionText,fe(qe.text2ShiftX+qe.alignShift*f+ge),ye(ue+xe.ty0-xe.by/2+f)),Ae.select("rect").call(r.setRect,fe(qe.text2ShiftX+(qe.alignShift-1)*xe.tx2width/2+ge),ye(ue-xe.by/2-1),fe(xe.tx2width),ye(xe.by+2)))})}function Z(q,$){var ee=q.index,ne=q.trace||{},fe=q.cd[0],ye=q.cd[ee]||{};function xe(ke){return ke||v(ke)&&ke===0}var Ae=Array.isArray(ee)?function(ke,ge){var ue=x.castOption(fe,ee,ke);return xe(ue)?ue:x.extractOption({},ne,"",ge)}:function(ke,ge){return x.extractOption(ye,ne,ke,ge)};function Me(ke,ge,ue){var ve=Ae(ge,ue);xe(ve)&&(q[ke]=ve)}if(Me("hoverinfo","hi","hoverinfo"),Me("bgcolor","hbg","hoverlabel.bgcolor"),Me("borderColor","hbc","hoverlabel.bordercolor"),Me("fontFamily","htf","hoverlabel.font.family"),Me("fontSize","hts","hoverlabel.font.size"),Me("fontColor","htc","hoverlabel.font.color"),Me("fontWeight","htw","hoverlabel.font.weight"),Me("fontStyle","hty","hoverlabel.font.style"),Me("fontVariant","htv","hoverlabel.font.variant"),Me("nameLength","hnl","hoverlabel.namelength"),Me("textAlign","hta","hoverlabel.align"),q.posref=$==="y"||$==="closest"&&ne.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=x.constrain(q.x0,0,q.xa._length),q.x1=x.constrain(q.x1,0,q.xa._length),q.y0=x.constrain(q.y0,0,q.ya._length),q.y1=x.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:s.hoverLabelText(q.xa,q.xLabelVal,ne.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:s.hoverLabelText(q.ya,q.yLabelVal,ne.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!isNaN(q.xerr)&&!(q.xa.type==="log"&&q.xerr<=0)){var Ie=s.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+Ie+" / -"+s.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+Ie,$==="x"&&(q.distance+=1)}if(!isNaN(q.yerr)&&!(q.ya.type==="log"&&q.yerr<=0)){var Ue=s.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+Ue+" / -"+s.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+Ue,$==="y"&&(q.distance+=1)}var qe=q.hoverinfo||q.trace.hoverinfo;return qe&&qe!=="all"&&(qe=Array.isArray(qe)?qe:qe.split("+"),qe.indexOf("x")===-1&&(q.xLabel=void 0),qe.indexOf("y")===-1&&(q.yLabel=void 0),qe.indexOf("z")===-1&&(q.zLabel=void 0),qe.indexOf("text")===-1&&(q.text=void 0),qe.indexOf("name")===-1&&(q.name=void 0)),q}function Q(q,$,ee){var ne=ee.container,fe=ee.fullLayout,ye=fe._size,xe=ee.event,Ae=!!$.hLinePoint,Me=!!$.vLinePoint,Ie,Ue;if(ne.selectAll(".spikeline").remove(),!!(Me||Ae)){var qe=n.combine(fe.plot_bgcolor,fe.paper_bgcolor);if(Ae){var ke=$.hLinePoint,ge,ue;Ie=ke&&ke.xa,Ue=ke&&ke.ya;var ve=Ue.spikesnap;ve==="cursor"?(ge=xe.pointerX,ue=xe.pointerY):(ge=Ie._offset+ke.x,ue=Ue._offset+ke.y);var se=n.wcagContrast(ke.color,qe)<1.5?n.contrast(qe):ke.color,Te=Ue.spikemode,Fe=Ue.spikethickness,We=Ue.spikecolor||se,Ge=s.getPxPosition(q,Ue),gt,mt;if(Te.indexOf("toaxis")!==-1||Te.indexOf("across")!==-1){if(Te.indexOf("toaxis")!==-1&&(gt=Ge,mt=ge),Te.indexOf("across")!==-1){var Tt=Ue._counterDomainMin,At=Ue._counterDomainMax;Ue.anchor==="free"&&(Tt=Math.min(Tt,Ue.position),At=Math.max(At,Ue.position)),gt=ye.l+Tt*ye.w,mt=ye.l+At*ye.w}ne.insert("line",":first-child").attr({x1:gt,x2:mt,y1:ue,y2:ue,"stroke-width":Fe,stroke:We,"stroke-dasharray":r.dashStyle(Ue.spikedash,Fe)}).classed("spikeline",!0).classed("crisp",!0),ne.insert("line",":first-child").attr({x1:gt,x2:mt,y1:ue,y2:ue,"stroke-width":Fe+2,stroke:qe}).classed("spikeline",!0).classed("crisp",!0)}Te.indexOf("marker")!==-1&&ne.insert("circle",":first-child").attr({cx:Ge+(Ue.side!=="right"?Fe:-Fe),cy:ue,r:Fe,fill:We}).classed("spikeline",!0)}if(Me){var Kt=$.vLinePoint,nr,_r;Ie=Kt&&Kt.xa,Ue=Kt&&Kt.ya;var Zt=Ie.spikesnap;Zt==="cursor"?(nr=xe.pointerX,_r=xe.pointerY):(nr=Ie._offset+Kt.x,_r=Ue._offset+Kt.y);var sr=n.wcagContrast(Kt.color,qe)<1.5?n.contrast(qe):Kt.color,Ot=Ie.spikemode,vt=Ie.spikethickness,ht=Ie.spikecolor||sr,Re=s.getPxPosition(q,Ie),Be,He;if(Ot.indexOf("toaxis")!==-1||Ot.indexOf("across")!==-1){if(Ot.indexOf("toaxis")!==-1&&(Be=Re,He=_r),Ot.indexOf("across")!==-1){var $e=Ie._counterDomainMin,Ze=Ie._counterDomainMax;Ie.anchor==="free"&&($e=Math.min($e,Ie.position),Ze=Math.max(Ze,Ie.position)),Be=ye.t+(1-Ze)*ye.h,He=ye.t+(1-$e)*ye.h}ne.insert("line",":first-child").attr({x1:nr,x2:nr,y1:Be,y2:He,"stroke-width":vt,stroke:ht,"stroke-dasharray":r.dashStyle(Ie.spikedash,vt)}).classed("spikeline",!0).classed("crisp",!0),ne.insert("line",":first-child").attr({x1:nr,x2:nr,y1:Be,y2:He,"stroke-width":vt+2,stroke:qe}).classed("spikeline",!0).classed("crisp",!0)}Ot.indexOf("marker")!==-1&&ne.insert("circle",":first-child").attr({cx:nr,cy:Re-(Ie.side!=="top"?vt:-vt),r:vt,fill:ht}).classed("spikeline",!0)}}}function re(q,$,ee){if(!ee||ee.length!==q._hoverdata.length)return!0;for(var ne=ee.length-1;ne>=0;ne--){var fe=ee[ne],ye=q._hoverdata[ne];if(fe.curveNumber!==ye.curveNumber||String(fe.pointNumber)!==String(ye.pointNumber)||String(fe.pointNumbers)!==String(ye.pointNumbers)||fe.binNumber!==ye.binNumber)return!0}return!1}function ae(q,$){return!$||$.vLinePoint!==q._spikepoints.vLinePoint||$.hLinePoint!==q._spikepoints.hLinePoint}function oe(q,$){return t.plainText(q||"",{len:$,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function H(q,$){for(var ee=$.charAt(0),ne=[],fe=[],ye=[],xe=0;xeq.offsetTop+q.clientTop,G=q=>q.offsetLeft+q.clientLeft;function Y(q,$){var ee=q._fullLayout,ne=$.getBoundingClientRect(),fe=ne.left,ye=ne.top,xe=fe+ne.width,Ae=ye+ne.height,Me=x.apply3DTransform(ee._invTransform)(fe,ye),Ie=x.apply3DTransform(ee._invTransform)(xe,Ae),Ue=Me[0],qe=Me[1],ke=Ie[0],ge=Ie[1];return{x:Ue,y:qe,width:ke-Ue,height:ge-qe,top:Math.min(qe,ge),left:Math.min(Ue,ke),right:Math.max(Ue,ke),bottom:Math.max(qe,ge)}}}}),V0=Ee({"src/components/fx/hoverlabel_defaults.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=Qf().isUnifiedHover;V.exports=function(l,e,t,a){a=a||{};var r=e.legend;function n(o){a.font[o]||(a.font[o]=r?e.legend.font[o]:e.font[o])}e&&E(e.hovermode)&&(a.font||(a.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),r?(a.bgcolor||(a.bgcolor=x.combine(e.legend.bgcolor,e.paper_bgcolor)),a.bordercolor||(a.bordercolor=e.legend.bordercolor)):a.bgcolor||(a.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",a.bgcolor),t("hoverlabel.bordercolor",a.bordercolor),t("hoverlabel.namelength",a.namelength),t("hoverlabel.showarrow",a.showarrow),v.coerceFont(t,"hoverlabel.font",a.font),t("hoverlabel.align",a.align)}}}),xM=Ee({"src/components/fx/layout_global_defaults.js"(J,V){"use strict";var v=Vr(),x=V0(),E=Ei();V.exports=function(l,e){function t(a,r){return v.coerce(l,e,E,a,r)}x(l,e,t)}}}),wM=Ee({"src/components/fx/defaults.js"(J,V){"use strict";var v=Vr(),x=Hi(),E=V0();V.exports=function(l,e,t,a){function r(o,s){return v.coerce(l,e,x,o,s)}var n=v.extendFlat({},a.hoverlabel);e.hovertemplate&&(n.namelength=-1),E(l,e,r,n)}}}),Vb=Ee({"src/components/fx/hovermode_defaults.js"(J,V){"use strict";var v=Vr(),x=Ei();V.exports=function(k,l){function e(t,a){return l[t]!==void 0?l[t]:v.coerce(k,l,x,t,a)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),TM=Ee({"src/components/fx/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=Ei(),E=Vb(),k=V0();V.exports=function(e,t){function a(m,h){return v.coerce(e,t,x,m,h)}var r=E(e,t);r&&(a("hoverdistance"),a("spikedistance"),r.indexOf("unified")!==-1&&a("hoversort"));var n=a("dragmode");n==="select"&&a("selectdirection");var o=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((o||s)&&c===1||o&&s&&c===2)&&(t.dragmode="pan"),k(e,t,a),v.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),AM=Ee({"src/components/fx/calc.js"(J,V){"use strict";var v=Vr(),x=Ri();V.exports=function(l){var e=l.calcdata,t=l._fullLayout;function a(c){return function(m){return v.coerceHoverinfo({hoverinfo:m},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),Bg=Ee({"src/components/shapes/draw_newshape/constants.js"(J,V){"use strict";var v=32;V.exports={CIRCLE_SIDES:v,i000:0,i090:v/4,i180:v/2,i270:v/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Ng=Ee({"src/components/selections/helpers.js"(J,V){"use strict";var v=Vr().strTranslate;function x(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function E(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function k(e){var t=e._id.charAt(0)==="y"?1:0;return function(a){return x(e,a[t])}}function l(e){return v(e.xaxis._offset,e.yaxis._offset)}V.exports={p2r:x,r2p:E,axValue:k,getTransform:l}}}),$d=Ee({"src/components/shapes/draw_newshape/helpers.js"(J){"use strict";var V=Ib(),v=Bg(),x=v.CIRCLE_SIDES,E=v.SQRT2,k=Ng(),l=k.p2r,e=k.r2p,t=[0,3,4,5,6,1,2],a=[0,3,4,1,2];J.writePaths=function(o){var s=o.length;if(!s)return"M0,0Z";for(var c="",m=0;m0&&w{let s=o.charAt(0),c=r[s].drawn!==void 0;return n+(c?1:0)},0)},J.getDataToPixel=function(l,e,t,a,r){var n=l._fullLayout._size,o;if(e)if(r==="domain")o=function(c){return e._length*(a?1-c:c)+e._offset};else{var s=J.shapePositionToRange(e);o=function(c){var m=k(e,t);return e._offset+e.r2p(s(c,!0))+m},e.type==="date"&&(o=J.decodeDate(o))}else a?o=function(c){return n.t+n.h*(1-c)}:o=function(c){return n.l+n.w*c};return o},J.getPixelToData=function(l,e,t,a){var r=l._fullLayout._size,n;if(e)if(a==="domain")n=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var o=J.rangeToShapePosition(e);n=function(s){return o(e.p2r(s-e._offset))}}else t?n=function(s){return 1-(s-r.t)/r.h}:n=function(s){return(s-r.l)/r.w};return n},J.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,a=Math.round(l);return t?a+.5:a},J.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},a=l._fullLayout._plots[t.xref+t.yref],r=!!a;return r?a._hadPlotinfo=!0:(a={},t.xref&&t.xref!=="paper"&&(a.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(a.yaxis=l._fullLayout[t.yref+"axis"])),a.xsizemode=t.xsizemode,a.ysizemode=t.ysizemode,a.xanchor=t.xanchor,a.yanchor=t.yanchor,{options:t,plotinfo:a}},J.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},a=l._fullLayout._plots[t.xref+t.yref],r=!!a;return r?a._hadPlotinfo=!0:(a={},t.xref&&(a.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(a.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:a}},J.getPathString=function(l,e){let t=e.type,a=x.getRefType(e.xref),r=x.getRefType(e.yref),n=l._fullLayout._size;var o,s,c,m,h,p,g,i,w,S,M,C;function _(N,R,B,F){var P;if(N)if(R==="domain")F?P=function(j){return N._offset+N._length*(1-j)}:P=function(j){return N._offset+N._length*j};else{let j=J.shapePositionToRange(N);P=function(U){return N._offset+N.r2p(j(U,!0))},B==="path"&&N.type==="date"&&(P=J.decodeDate(P))}else F?P=function(j){return n.t+n.h*(1-j)}:P=function(j){return n.l+n.w*j};return P}if(a==="array"?(g=[],o=e.xref.map(function(N){return x.getFromId(l,N)}),g=e.xref.map(function(N,R){return _(o[R],x.getRefType(N),t,!1)})):(o=x.getFromId(l,e.xref),g=_(o,a,t,!1)),r==="array"?(i=[],s=e.yref.map(function(N){return x.getFromId(l,N)}),i=e.yref.map(function(N,R){return _(s[R],x.getRefType(N),t,!0)})):(s=x.getFromId(l,e.yref),i=_(s,r,t,!0)),t==="path")return E(e,g,i);if(a==="array")c=k(o[0],e.x0shift),m=k(o[1],e.x1shift),w=g[0](e.x0)+c,S=g[1](e.x1)+m;else if(c=k(o,e.x0shift),m=k(o,e.x1shift),e.xsizemode==="pixel"){let N=g(e.xanchor);w=N+e.x0+c,S=N+e.x1+m}else w=g(e.x0)+c,S=g(e.x1)+m;if(r==="array")h=k(s[0],e.y0shift),p=k(s[1],e.y1shift),M=i[0](e.y0)+h,C=i[1](e.y1)+p;else if(h=k(s,e.y0shift),p=k(s,e.y1shift),e.ysizemode==="pixel"){let N=i(e.yanchor);M=N-e.y0+h,C=N-e.y1+p}else M=i(e.y0)+h,C=i(e.y1)+p;if(t==="line")return"M"+w+","+M+"L"+S+","+C;if(t==="rect")return"M"+w+","+M+"H"+S+"V"+C+"H"+w+"Z";var T=(w+S)/2,f=(M+C)/2,u=Math.abs(T-w),A=Math.abs(f-M),b="A"+u+","+A,z=T+u+","+f,I=T+","+(f-A);return"M"+z+b+" 0 1,1 "+I+b+" 0 0,1 "+z+"Z"};function E(l,e,t){let a=l.path,r=l.xsizemode,n=l.ysizemode,o=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),m=Array.isArray(l.yref);var h=0,p=0;return a.replace(V.segmentRE,function(g){var i=0,w=g.charAt(0),S=V.paramIsX[w],M=V.paramIsY[w],C=V.numParams[w];let _=S.drawn!==void 0,T=M.drawn!==void 0,f=c?e[h]:e,u=m?t[p]:t;var A=g.slice(1).replace(V.paramRE,function(b){return S[i]?r==="pixel"?b=f(o)+Number(b):b=f(b):M[i]&&(n==="pixel"?b=u(s)-Number(b):b=u(b)),i++,i>C&&(b="X"),b});return i>C&&(A=A.replace(/[\s,]*X.*/,""),v.log("Ignoring extra params in segment "+g)),_&&h++,T&&p++,w+A})}J.getPixelShift=k;function k(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),Gb=Ee({"src/components/shapes/display_labels.js"(J,V){"use strict";var v=Vr(),x=uo(),E=Fs(),k=yo(),l=$d().readPaths,e=Zd(),t=e.getPathString,a=Cg(),r=rc().FROM_TL;V.exports=function(c,m,h,p){if(p.selectAll(".shape-label").remove(),!!(h.label.text||h.label.texttemplate)){var g;if(h.label.texttemplate){var i={};if(h.type!=="path"){var w=x.getFromId(c,h.xref),S=x.getFromId(c,h.yref);let $=Array.isArray(h.xref),ee=Array.isArray(h.yref);for(var M in a){var C=typeof a[M]=="function",_=!$||a.simpleXVariables.includes(M),T=!ee||a.simpleYVariables.includes(M);if(C&&_&&T){var f=a[M](h,w,S);f!==void 0&&(i[M]=f)}}}g=v.texttemplateStringForShapes({data:[i],fallback:h.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:h.label.texttemplate})}else g=h.label.text;var u={"data-index":m},A=h.label.font,b={"data-notex":1},z=p.append("g").attr(u).classed("shape-label",!0),I=z.append("text").attr(b).classed("shape-label-text",!0).text(g),N,R,B,F;if(h.path){var P=t(c,h),j=l(P,c);N=1/0,B=1/0,R=-1/0,F=-1/0;for(var U=0;Ue.getDataToPixel(c,ve,ue,!1,se)(ge),ke=(ge,ue,ve,se)=>e.getDataToPixel(c,ve,ue,!0,se)(ge);if(h.xsizemode==="pixel"){let ge=qe(h.xanchor,void 0,ne,Ae),ue=e.getPixelShift(ne,h.x0shift),ve=e.getPixelShift(ne,h.x1shift);N=ge+h.x0+ue,R=ge+h.x1+ve}else N=qe(h.x0,h.x0shift,ne,Ae),R=qe(h.x1,h.x1shift,fe,Me);if(h.ysizemode==="pixel"){let ge=ke(h.yanchor,void 0,ye,Ie),ue=e.getPixelShift(ye,h.y0shift),ve=e.getPixelShift(ye,h.y1shift);B=ge-h.y0+ue,F=ge-h.y1+ve}else B=ke(h.y0,h.y0shift,ye,Ie),F=ke(h.y1,h.y1shift,xe,Ue)}var H=h.label.textangle;H==="auto"&&(h.type==="line"?H=n(N,B,R,F):H=0),I.call(function($){return $.call(k.font,A).attr({}),E.convertToTspans($,c),$});var X=k.bBox(I.node()),K=o(N,B,R,F,h,H,X),G=K.textx,Y=K.texty,q=K.xanchor;I.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[q],y:Y,x:G,transform:"rotate("+H+","+G+","+Y+")"}).call(E.positionText,G,Y)}};function n(s,c,m,h){var p,g;return g=Math.abs(m-s),m>=s?p=c-h:p=h-c,-180/Math.PI*Math.atan2(p,g)}function o(s,c,m,h,p,g,i){var w=p.label.textposition,S=p.label.textangle,M=p.label.padding,C=p.type,_=Math.PI/180*g,T=Math.sin(_),f=Math.cos(_),u=p.label.xanchor,A=p.label.yanchor,b,z,I,N;if(C==="line"){w==="start"?(b=s,z=c):w==="end"?(b=m,z=h):(b=(s+m)/2,z=(c+h)/2),u==="auto"&&(w==="start"?S==="auto"?m>s?u="left":ms?u="right":ms?u="right":ms?u="left":m1&&!(ke.length===2&&ke[1][0]==="Z")&&(H===0&&(ke[0][0]="M"),b[oe]=ke,B(),F())}}function fe(ke,ge){if(ke===2){oe=+ge.srcElement.getAttribute("data-i"),H=+ge.srcElement.getAttribute("data-j");var ue=b[oe];!g(ue)&&!i(ue)&&ne()}}function ye(ke){re=[];for(var ge=0;ge{if(!I._dragging&&I._fullLayout.hoveranywhere){let j=F(P);j&&c.hover(I,j,R.id)}}),B.addEventListener("click",P=>{if(!I._dragged&&I._fullLayout.clickanywhere){let j=F(P);j&&c.click(I,j,R.id)}})}function _(I,N,R){let B=R.xref,F=R.yref;if(Array.isArray(B)||Array.isArray(F)){let P="clip"+N._fullLayout._uid+"shape"+R._index,j=T(N,B,F);E.ensureSingleById(N._fullLayout._clips,"clipPath",P,function(U){U.append("rect")}).select("rect").attr(j),n.setClipUrl(I,P,N)}else{let P=(B+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");n.setClipUrl(I,P?"clip"+N._fullLayout._uid+P:null,N)}}function T(I,N,R){let B=I._fullLayout._size;function F(U,Z){let Q=(Array.isArray(U)?U:[U]).map(oe=>k.getFromId(I,oe)).filter(Boolean);if(!Q.length)return Z?[B.t,B.t+B.h]:[B.l,B.l+B.w];let re=Q.map(function(oe){return oe._offset}),ae=Q.map(function(oe){return oe._offset+oe._length});return[Math.min(...re),Math.max(...ae)]}let P=F(N,!1),j=F(R,!0);return{x:P[0],y:j[0],width:P[1]-P[0],height:j[1]-j[0]}}function f(I,N,R,B,F,P){var j=10,U=10,Z=R.xsizemode==="pixel",Q=R.ysizemode==="pixel",re=R.type==="line",ae=R.type==="path",oe=P.modifyItem,H,X,K,G,Y,q,$,ee,ne,fe,ye,xe,Ae,Me,Ie,Ue=v.select(N.node().parentNode),qe=k.getFromId(I,R.xref),ke=k.getRefType(R.xref),ge=k.getFromId(I,R.yref),ue=k.getRefType(R.yref),ve=R.x0shift,se=R.x1shift,Te=R.y0shift,Fe=R.y1shift,We=function(Ze,Je){var Mt=p.getDataToPixel(I,qe,Je,!1,ke);return Mt(Ze)},Ge=function(Ze,Je){var Mt=p.getDataToPixel(I,ge,Je,!0,ue);return Mt(Ze)},gt=p.getPixelToData(I,qe,!1,ke),mt=p.getPixelToData(I,ge,!0,ue),Tt=nr(),At={element:Tt.node(),gd:I,prepFn:sr,doneFn:Ot,clickFn:vt},Kt;s.init(At),Tt.node().onmousemove=Zt;function nr(){return re?_r():N}function _r(){var Ze=10,Je=Math.max(R.line.width,Ze),Mt=F.append("g").attr("data-index",B).attr("drag-helper",!0);Mt.append("path").attr("d",N.attr("d")).style({cursor:"move","stroke-width":Je,"stroke-opacity":"0"});var dt={"fill-opacity":"0"},Dt=Math.max(Je/2,Ze);return Mt.append("circle").attr({"data-line-point":"start-point",cx:Z?We(R.xanchor)+R.x0:We(R.x0,ve),cy:Q?Ge(R.yanchor)-R.y0:Ge(R.y0,Te),r:Dt}).style(dt).classed("cursor-grab",!0),Mt.append("circle").attr({"data-line-point":"end-point",cx:Z?We(R.xanchor)+R.x1:We(R.x1,se),cy:Q?Ge(R.yanchor)-R.y1:Ge(R.y1,Fe),r:Dt}).style(dt).classed("cursor-grab",!0),Mt}function Zt(Ze){if(w(I)){Kt=null;return}if(re)Ze.target.tagName==="path"?Kt="move":Kt=Ze.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Je=At.element.getBoundingClientRect(),Mt=Je.right-Je.left,dt=Je.bottom-Je.top,Dt=Ze.clientX-Je.left,Ct=Ze.clientY-Je.top,Vt=!ae&&Mt>j&&dt>U&&!Ze.shiftKey?s.getCursor(Dt/Mt,1-Ct/dt):"move";m(N,Vt),Kt=Vt.split("-")[0]}}function sr(Ze){w(I)||(Z&&(Y=We(R.xanchor)),Q&&(q=Ge(R.yanchor)),R.type==="path"?Ie=R.path:(H=Z?R.x0:We(R.x0),X=Q?R.y0:Ge(R.y0),K=Z?R.x1:We(R.x1),G=Q?R.y1:Ge(R.y1)),HG?($=X,ye="y0",ee=G,xe="y1"):($=G,ye="y1",ee=X,xe="y0"),Zt(Ze),Be(F,R),$e(N,R,I),At.moveFn=Kt==="move"?ht:Re,At.altKey=Ze.altKey)}function Ot(){w(I)||(m(N),He(F),_(N,I,R),x.call("_guiRelayout",I,P.getUpdateObj()))}function vt(){w(I)||He(F)}function ht(Ze,Je){if(R.type==="path"){var Mt=function(Ct){return Ct},dt=Mt,Dt=Mt;Z?oe("xanchor",R.xanchor=gt(Y+Ze)):(dt=function(Vt){return gt(We(Vt)+Ze)},qe&&qe.type==="date"&&(dt=p.encodeDate(dt))),Q?oe("yanchor",R.yanchor=mt(q+Je)):(Dt=function(Vt){return mt(Ge(Vt)+Je)},ge&&ge.type==="date"&&(Dt=p.encodeDate(Dt))),oe("path",R.path=u(Ie,dt,Dt))}else Z?oe("xanchor",R.xanchor=gt(Y+Ze)):(oe("x0",R.x0=gt(H+Ze)),oe("x1",R.x1=gt(K+Ze))),Q?oe("yanchor",R.yanchor=mt(q+Je)):(oe("y0",R.y0=mt(X+Je)),oe("y1",R.y1=mt(G+Je)));N.attr("d",g(I,R)),Be(F,R),t(I,B,R,Ue)}function Re(Ze,Je){if(ae){var Mt=function(nn){return nn},dt=Mt,Dt=Mt;Z?oe("xanchor",R.xanchor=gt(Y+Ze)):(dt=function(wn){return gt(We(wn)+Ze)},qe&&qe.type==="date"&&(dt=p.encodeDate(dt))),Q?oe("yanchor",R.yanchor=mt(q+Je)):(Dt=function(wn){return mt(Ge(wn)+Je)},ge&&ge.type==="date"&&(Dt=p.encodeDate(Dt))),oe("path",R.path=u(Ie,dt,Dt))}else if(re){if(Kt==="resize-over-start-point"){var Ct=H+Ze,Vt=Q?X-Je:X+Je;oe("x0",R.x0=Z?Ct:gt(Ct)),oe("y0",R.y0=Q?Vt:mt(Vt))}else if(Kt==="resize-over-end-point"){var Ht=K+Ze,Wt=Q?G-Je:G+Je;oe("x1",R.x1=Z?Ht:gt(Ht)),oe("y1",R.y1=Q?Wt:mt(Wt))}}else{var Sr=function(nn){return Kt.indexOf(nn)!==-1},on=Sr("n"),$t=Sr("s"),It=Sr("w"),ir=Sr("e"),cr=on?$+Je:$,fr=$t?ee+Je:ee,Ir=It?ne+Ze:ne,ln=ir?fe+Ze:fe;Q&&(on&&(cr=$-Je),$t&&(fr=ee-Je)),(!Q&&fr-cr>U||Q&&cr-fr>U)&&(oe(ye,R[ye]=Q?cr:mt(cr)),oe(xe,R[xe]=Q?fr:mt(fr))),ln-Ir>j&&(oe(Ae,R[Ae]=Z?Ir:gt(Ir)),oe(Me,R[Me]=Z?ln:gt(ln)))}N.attr("d",g(I,R)),Be(F,R),t(I,B,R,Ue)}function Be(Ze,Je){(Z||Q)&&Mt();function Mt(){var dt=Je.type!=="path",Dt=Ze.selectAll(".visual-cue").data([0]),Ct=1;Dt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var Vt=We(Z?Je.xanchor:E.midRange(dt?[Je.x0,Je.x1]:p.extractPathCoords(Je.path,h.paramIsX))),Ht=Ge(Q?Je.yanchor:E.midRange(dt?[Je.y0,Je.y1]:p.extractPathCoords(Je.path,h.paramIsY)));if(Vt=p.roundPositionForSharpStrokeRendering(Vt,Ct),Ht=p.roundPositionForSharpStrokeRendering(Ht,Ct),Z&&Q){var Wt="M"+(Vt-1-Ct)+","+(Ht-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Dt.attr("d",Wt)}else if(Z){var Sr="M"+(Vt-1-Ct)+","+(Ht-9-Ct)+"v18 h2 v-18 Z";Dt.attr("d",Sr)}else{var on="M"+(Vt-9-Ct)+","+(Ht-1-Ct)+"h18 v2 h-18 Z";Dt.attr("d",on)}}}function He(Ze){Ze.selectAll(".visual-cue").remove()}function $e(Ze,Je,Mt){var dt=Je.xref,Dt=Je.yref,Ct=k.getFromId(Mt,dt),Vt=k.getFromId(Mt,Dt),Ht="";dt!=="paper"&&!Ct.autorange&&(Ht+=dt),Dt!=="paper"&&!Vt.autorange&&(Ht+=Dt),n.setClipUrl(Ze,Ht?"clip"+Mt._fullLayout._uid+Ht:null,Mt)}}function u(I,N,R){return I.replace(h.segmentRE,function(B){var F=0,P=B.charAt(0),j=h.paramIsX[P],U=h.paramIsY[P],Z=h.numParams[P],Q=B.slice(1).replace(h.paramRE,function(re){return F>=Z||(j[F]?re=N(re):U[F]&&(re=R(re)),F++),re});return P+Q})}function A(I,N){if(S(I)){var R=N.node(),B=+R.getAttribute("data-index");if(B>=0){if(B===I._fullLayout._activeShapeIndex){b(I);return}I._fullLayout._activeShapeIndex=B,I._fullLayout._deactivateShape=b,i(I)}}}function b(I){if(S(I)){var N=I._fullLayout._activeShapeIndex;N>=0&&(a(I),delete I._fullLayout._activeShapeIndex,i(I))}}function z(I){if(S(I)){a(I);var N=I._fullLayout._activeShapeIndex,R=(I.layout||{}).shapes||[];if(N{let o=E(e),s=t.append("div").classed("plotly-cloud-dialog-box",!0);if(s.append("div").classed("plotly-cloud-dialog-title",!0).text(o.DIALOG_TITLE),a===x.plotlyServerURL){let m=s.append("div").classed("plotly-cloud-dialog-message",!0),h=new URL(a).origin,p=o.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),g=p[0],i=p[2],w=p[4];m.append("span").text(g),m.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",h).attr("target","_blank").text(i),m.append("span").text(w),m.append("div").classed("plotly-cloud-dialog-message--account",!0).text(o.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let m=new URL(a),h=m.hostname,p=m.origin,g=o.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),i=g[0],w=g[4],S=s.append("div").classed("plotly-cloud-dialog-message",!0);S.append("span").text(i),S.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",p).attr("target","_blank").text(h),S.append("span").text(w)}let c=s.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(o.DIALOG_CANCEL).on("click",n),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(o.DIALOG_CONFIRM).on("click",r)},l=(e,t,a)=>{let r=v.select(e._fullLayout._paperdiv.node());r.selectAll(".plotly-cloud-dialog").remove();let n=r.append("div").classed("plotly-cloud-dialog",!0),o=()=>{n.remove(),document.removeEventListener("keydown",s)},s=c=>{(c.key==="Escape"||c.keyCode===27)&&o()};document.addEventListener("keydown",s),n.on("click",()=>{v.event.target===n.node()&&o()}),k(e,n,t,()=>{o(),a()},o)};V.exports=l}}),Wb=Ee({"src/components/modebar/buttons.js"(J,V){"use strict";var v=Ri(),x=vl(),E=Xl(),k=zg(),l=Ug().eraseActiveShape,e=EM(),t=Vr(),a=t._,r=V.exports={};r.toImage={name:"toImage",title:function(_){var T=_._context.toImageButtonOptions||{},f=T.format||"png";return f==="png"?a(_,"Download plot as a PNG"):a(_,"Download plot")},icon:k.camera,click:function(_){var T=_._context.toImageButtonOptions,f={format:T.format||"png"};t.notifier(a(_,"Preparing image - this may take a few seconds"),"long",_),["filename","width","height","scale"].forEach(function(u){u in T&&(f[u]=T[u])}),v.call("downloadImage",_,f).then(function(u){t.notifier(a(_,"Image download succeeded")+" - "+u,"long",_)}).catch(function(){t.notifier(a(_,"Sorry, there was a problem downloading your image!"),"long",_)})}},r.sendChartToCloud={name:"sendChartToCloud",title:function(_){return a(_,"Share chart...")},icon:k.cloudupload,click:function(_){var T=(window.PLOTLYENV||{}).BASE_URL||_._context.plotlyServerURL;if(!T){console.error("No destination URL provided (plotlyServerURL is empty)");return}var f;try{f=new URL(T)}catch{console.error("Invalid plotlyServerURL: "+T);return}let u=["http:","https:"];if(!u.includes(f.protocol)){console.error(`Invalid protocol '${f.protocol}' in plotlyServerURL '${T}'. Must be one of: ${u.join(", ")}`);return}e(_,T,function(){x.sendDataToCloud(_,T)})}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(_){return a(_,"Zoom")},attr:"dragmode",val:"zoom",icon:k.zoombox,click:n},r.pan2d={name:"pan2d",_cat:"pan",title:function(_){return a(_,"Pan")},attr:"dragmode",val:"pan",icon:k.pan,click:n},r.select2d={name:"select2d",_cat:"select",title:function(_){return a(_,"Box Select")},attr:"dragmode",val:"select",icon:k.selectbox,click:n},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(_){return a(_,"Lasso Select")},attr:"dragmode",val:"lasso",icon:k.lasso,click:n},r.drawclosedpath={name:"drawclosedpath",title:function(_){return a(_,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:k.drawclosedpath,click:n},r.drawopenpath={name:"drawopenpath",title:function(_){return a(_,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:k.drawopenpath,click:n},r.drawline={name:"drawline",title:function(_){return a(_,"Draw line")},attr:"dragmode",val:"drawline",icon:k.drawline,click:n},r.drawrect={name:"drawrect",title:function(_){return a(_,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:k.drawrect,click:n},r.drawcircle={name:"drawcircle",title:function(_){return a(_,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:k.drawcircle,click:n},r.eraseshape={name:"eraseshape",title:function(_){return a(_,"Erase active shape")},icon:k.eraseshape,click:l},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(_){return a(_,"Zoom in")},attr:"zoom",val:"in",icon:k.zoom_plus,click:n},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(_){return a(_,"Zoom out")},attr:"zoom",val:"out",icon:k.zoom_minus,click:n},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(_){return a(_,"Autoscale")},attr:"zoom",val:"auto",icon:k.autoscale,click:n},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(_){return a(_,"Reset axes")},attr:"zoom",val:"reset",icon:k.home,click:n},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(_){return a(_,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:k.tooltip_basic,gravity:"ne",click:n},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(_){return a(_,"Compare data on hover")},attr:"hovermode",val:function(_){return _._fullLayout._isHoriz?"y":"x"},icon:k.tooltip_compare,gravity:"ne",click:n};function n(_,T){var f=T.currentTarget,u=f.getAttribute("data-attr"),A=f.getAttribute("data-val")||!0,b=_._fullLayout,z={},I=E.list(_,null,!0),N=b._cartesianSpikesEnabled,R,B;if(u==="zoom"){var F=A==="in"?.5:2,P=(1+F)/2,j=(1-F)/2,U,Z;for(B=0;B-K),[Z,Q]=F.invert(B.midPt),{minscale:re}=R.projection,ae=(f=R.projection.maxscale)!=null?f:1/0,oe=Math.min(re,ae),H=Math.max(re,ae),X=b==="in"?h*P:1/h*P;X>H?X=H:X$b});var Vg,Xb,$b,Zb=In({"src/components/modebar/attributes.ts"(){"use strict";Vg=Yn(Yb()),Xb={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["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`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${Vg.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${Vg.default.foreButtons.join("*, *")}*.`].join(" ")}},$b=Xb}}),kM=Ee({"src/components/modebar/defaults.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=xs(),k=(Zb(),ra(qg)).default;V.exports=function(e,t){var a=e.modebar||{},r=E.newContainer(t,"modebar");function n(s,c){return v.coerce(a,r,k,s,c)}n("orientation"),n("bgcolor",x.addOpacity(t.paper_bgcolor,.5));var o=x.contrast(x.rgb(t.modebar.bgcolor));n("color",x.addOpacity(o,.3)),n("activecolor",x.addOpacity(o,.7)),n("uirevision",t.uirevision),n("add"),n("remove")}}}),CM=Ee({"src/components/modebar/modebar.js"(J,V){"use strict";var v=Hn(),x=mi(),E=Vr(),k=zg(),l=qi().version,e=new DOMParser;function t(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var a=t.prototype;a.update=function(o,s){this.graphInfo=o;var c=this.graphInfo._context,m=this.graphInfo._fullLayout,h="modebar-"+m._uid;this.element.setAttribute("id",h),this.element.setAttribute("role","toolbar"),this._uid=h,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),m.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var p=m.modebar,g="#"+h+" .modebar-group";document.querySelectorAll(g).forEach(function(C){C.style.backgroundColor=p.bgcolor});var i=!this.hasButtons(s),w=this.hasLogo!==c.displaylogo,S=this.locale!==c.locale;if(this.locale=c.locale,(i||w||S)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var M=this.getLogo();c.watermark&&(M.className=M.className+" watermark"),m.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),E.setStyleOnHover("#"+h+" .modebar-btn",".active",".icon path","fill: "+p.activecolor,"fill: "+p.color,this.element)},a.updateButtons=function(o){var s=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var m=s.createGroup();c.forEach(function(h){var p=h.name;if(!p)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(p)!==-1)throw new Error("button name '"+p+"' is taken");s.buttonsNames.push(p);var g=s.createButton(h);s.buttonElements.push(g),m.appendChild(g)}),s.element.appendChild(m)})},a.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=s.bgcolor,o},a.createButton=function(o){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var m=o.title;m===void 0?m=o.name:typeof m=="function"&&(m=m(this.graphInfo)),(m||m===0)&&(c.setAttribute("data-title",m),c.setAttribute("aria-label",m)),o.attr!==void 0&&c.setAttribute("data-attr",o.attr);var h=o.val;h!==void 0&&(typeof h=="function"&&(h=h(this.graphInfo)),c.setAttribute("data-val",h));var p=o.click;if(typeof p!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(i){o.click(s.graphInfo,i),s.updateActiveButton(i.currentTarget)}),c.setAttribute("data-toggle",o.toggle||!1),o.toggle&&v.select(c).classed("active",!0);var g=o.icon;return typeof g=="function"?c.appendChild(g()):c.appendChild(this.createIcon(g||k.question)),c.setAttribute("data-gravity",o.gravity||"n"),c},a.createIcon=function(o){var s=x(o.height)?Number(o.height):o.ascent-o.descent,c="http://www.w3.org/2000/svg",m;if(o.path){m=document.createElementNS(c,"svg"),m.setAttribute("viewBox",[0,0,o.width,s].join(" ")),m.setAttribute("class","icon");var h=document.createElementNS(c,"path");h.setAttribute("d",o.path),o.transform?h.setAttribute("transform",o.transform):o.ascent!==void 0&&h.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),m.appendChild(h)}if(o.svg){var p=e.parseFromString(o.svg,"application/xml");m=p.childNodes[0]}return m.setAttribute("height","1em"),m.setAttribute("width","1em"),m},a.updateActiveButton=function(o){var s=this.graphInfo._fullLayout,c=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(m){var h=m.getAttribute("data-val")||!0,p=m.getAttribute("data-attr"),g=m.getAttribute("data-toggle")==="true",i=v.select(m),w=function(C,_){var T=s.modebar,f=C.querySelector(".icon path");f&&(_||C.matches(":hover")?f.style.fill=T.activecolor:f.style.fill=T.color)};if(g){if(p===c){var S=!i.classed("active");i.classed("active",S),w(m,S)}}else{var M=p===null?p:E.nestedProperty(s,p).get();i.classed("active",M===h),w(m,M===h)}})},a.hasButtons=function(o){var s=this.buttons;if(!s||o.length!==s.length)return!1;for(var c=0;c1?(re=["toggleHover"],ae=["resetViews"]):u?(Q=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],ae=["resetGeo"]):f?(re=["hoverClosest3d"],ae=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(Q=["zoomInMap","zoomOutMap"],re=["toggleHover"],ae=["resetViewMap"]):A?re=["hoverClosestPie"]:B?(re=["hoverClosestCartesian","hoverCompareCartesian"],ae=["resetViewSankey"]):re=["toggleHover"],T&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(g)||P)&&(re=[]),T&&!F&&(Q=["zoomIn2d","zoomOut2d","autoScale2d"],ae[0]!=="resetViews"&&(ae=["resetScale2d"])),f?oe=["zoom3d","pan3d","orbitRotation","tableRotation"]:T&&!F||z?oe=["zoom2d","pan2d"]:I||u?oe=["pan2d"]:N&&(oe=["zoom2d"]),o(g)&&oe.push("select2d","lasso2d");var H=[],X=function(q){H.indexOf(q)===-1&&re.indexOf(q)!==-1&&H.push(q)};if(Array.isArray(C)){for(var K=[],G=0;GS?g.slice(S):i.slice(w))+M}function c(h,p){for(var g=p._size,i=g.h/g.w,w={},S=Object.keys(h),M=0;Me*z&&!B)){for(S=0;SH&&neae&&(ae=ne);var ye=(ae-re)/(2*oe);u/=ye,re=_.l2r(re),ae=_.l2r(ae),_.range=_._input.range=U=F[1]||Z[1]<=F[0])&&Q[0]P[0])return!0}return!1}function M(F){var P=F._fullLayout,j=P._size,U=j.p,Z=n.list(F,"",!0),Q,re,ae,oe,H,X;if(P._paperdiv.style({width:F._context.responsive&&P.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":P.width+"px",height:F._context.responsive&&P.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(t.setSize,P.width,P.height),F._context.setBackground(F,P.paper_bgcolor),J.drawMainTitle(F),r.manage(F),!P._has("cartesian"))return x.previousPromises(F);function K(Re,Be,He){var $e=Re._lw/2;if(Re._id.charAt(0)==="x"){if(Be){if(He==="top")return Be._offset-U-$e}else return j.t+j.h*(1-(Re.position||0))+$e%1;return Be._offset+Be._length+U+$e}if(Be){if(He==="right")return Be._offset+Be._length+U+$e}else return j.l+j.w*(Re.position||0)+$e%1;return Be._offset-U-$e}for(Q=0;Q0){b(F,Q,H,oe),ae.attr({x:re,y:Q,"text-anchor":U,dy:N(P.yanchor)}).call(k.positionText,re,Q);var X=(P.text.match(k.BR_TAG_ALL)||[]).length;if(X){var K=o.LINE_SPACING*X+o.MID_SHIFT;P.y===0&&(K=-K),ae.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",ee)})}var G=V.select(F).selectAll(".gtitle-subtitle");if(G.node()){var Y=ae.node().getBBox(),q=Y.y+Y.height,$=q+a.SUBTITLE_PADDING_EM*P.subtitle.font.size;G.attr({x:re,y:$,"text-anchor":U,dy:N(P.yanchor)}).call(k.positionText,re,$)}}}};function f(F,P,j,U,Z){var Q=P.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,re=E.isTopAnchor(P)?U:U-Z,ae=j==="b"?Q-re:re;return E.isTopAnchor(P)&&j==="t"||E.isBottomAnchor(P)&&j==="b"?!1:ae.5?"t":"b",re=F._fullLayout.margin[Q],ae=0;return P.yref==="paper"?ae=j+P.pad.t+P.pad.b:P.yref==="container"&&(ae=u(Q,U,Z,F._fullLayout.height,j)+P.pad.t+P.pad.b),ae>re?ae:0}function b(F,P,j,U){var Z="title.automargin",Q=F._fullLayout.title,re=Q.y>.5?"t":"b",ae={x:Q.x,y:Q.y,t:0,b:0},oe={};Q.yref==="paper"&&f(F,Q,re,P,U)?ae[re]=j:Q.yref==="container"&&(oe[re]=j,F._fullLayout._reservedMargin[Z]=oe),x.allowAutoMargin(F,Z),x.autoMargin(F,Z,ae)}function z(F,P){var j=F.title,U=F._size,Z=0;switch(P===p?Z=j.pad.l:P===i&&(Z=-j.pad.r),j.xref){case"paper":return U.l+U.w*j.x+Z;case"container":default:return F.width*j.x+Z}}function I(F,P){var j=F.title,U=F._size,Z=0;if(P==="0em"||!P?Z=-j.pad.b:P===o.CAP_SHIFT+"em"&&(Z=j.pad.t),j.y==="auto")return U.t/2;switch(j.yref){case"paper":return U.t+U.h-U.h*j.y+Z;case"container":default:return F.height-F.height*j.y+Z}}function N(F){return F==="top"?o.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function R(F){var P=F.title,j=g;return E.isRightAnchor(P)?j=i:E.isLeftAnchor(P)&&(j=p),j}function B(F){var P=F.title,j="0em";return E.isTopAnchor(P)?j=o.CAP_SHIFT+"em":E.isMiddleAnchor(P)&&(j=o.MID_SHIFT+"em"),j}J.doTraceStyle=function(F){var P=F.calcdata,j=[],U;for(U=0;U=0;R--){var B=C.append("path").attr(T).style("opacity",R?.1:f).call(k.stroke,A).call(k.fill,u).call(l.dashLine,R?"solid":z,R?4+b:b);if(s(B,p,w),I){var F=e(p.layout,"selections",w);B.style({cursor:"move"});var P={element:B.node(),plotinfo:S,gd:p,editHelpers:F,isActiveSelection:!0},j=v(_,p);x(j,B,P)}else B.style("pointer-events",R?"all":"none");N[R]=B}var U=N[0],Z=N[1];Z.node().addEventListener("click",function(){return c(p,U)})}}function s(p,g,i){var w=i.xref+i.yref;l.setClipUrl(p,"clip"+g._fullLayout._uid+w,g)}function c(p,g){if(n(p)){var i=g.node(),w=+i.getAttribute("data-index");if(w>=0){if(w===p._fullLayout._activeSelectionIndex){h(p);return}p._fullLayout._activeSelectionIndex=w,p._fullLayout._deactivateSelection=h,r(p)}}}function m(p){if(n(p)){var g=p._fullLayout.selections.length-1;p._fullLayout._activeSelectionIndex=g,p._fullLayout._deactivateSelection=h,r(p)}}function h(p){if(n(p)){var g=p._fullLayout._activeSelectionIndex;g>=0&&(E(p),delete p._fullLayout._activeSelectionIndex,r(p))}}}}),PM=Ee({"node_modules/polybooljs/lib/build-log.js"(J,V){function v(){var x,E=0,k=!1;function l(e,t){return x.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),x}return x={list:[],segmentId:function(){return E++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,a){return l("temp_status",{seg:e,above:t,below:a})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,a){return l("status",{seg:e,above:t,below:a})},vert:function(e){return e===k?x:(k=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},x}V.exports=v}}),DM=Ee({"node_modules/polybooljs/lib/epsilon.js"(J,V){function v(x){typeof x!="number"&&(x=1e-10);var E={epsilon:function(k){return typeof k=="number"&&(x=k),x},pointAboveOrOnLine:function(k,l,e){var t=l[0],a=l[1],r=e[0],n=e[1],o=k[0],s=k[1];return(r-t)*(s-a)-(n-a)*(o-t)>=-x},pointBetween:function(k,l,e){var t=k[1]-l[1],a=e[0]-l[0],r=k[0]-l[0],n=e[1]-l[1],o=r*a+t*n;if(o-x)},pointsSameX:function(k,l){return Math.abs(k[0]-l[0])x!=r-t>x&&(a-s)*(t-c)/(r-c)+s-e>x&&(n=!n),a=s,r=c}return n}};return E}V.exports=v}}),IM=Ee({"node_modules/polybooljs/lib/linked-list.js"(J,V){var v={create:function(){var x={root:{root:!0,next:null},exists:function(E){return!(E===null||E===x.root)},isEmpty:function(){return x.root.next===null},getHead:function(){return x.root.next},insertBefore:function(E,k){for(var l=x.root,e=x.root.next;e!==null;){if(k(e)){E.prev=e.prev,E.next=e,e.prev.next=E,e.prev=E;return}l=e,e=e.next}l.next=E,E.prev=l,E.next=null},findTransition:function(E){for(var k=x.root,l=x.root.next;l!==null&&!E(l);)k=l,l=l.next;return{before:k===x.root?null:k,after:l,insert:function(e){return e.prev=k,e.next=l,k.next=e,l!==null&&(l.prev=e),e}}}};return x},node:function(x){return x.prev=null,x.next=null,x.remove=function(){x.prev.next=x.next,x.next&&(x.next.prev=x.prev),x.prev=null,x.next=null},x}};V.exports=v}}),RM=Ee({"node_modules/polybooljs/lib/intersecter.js"(J,V){var v=IM();function x(E,k,l){function e(g,i){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:null,below:null},otherFill:null}}function t(g,i,w){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:w.myFill.above,below:w.myFill.below},otherFill:null}}var a=v.create();function r(g,i,w,S,M,C){var _=k.pointsCompare(i,M);return _!==0?_:k.pointsSame(w,C)?0:g!==S?g?1:-1:k.pointAboveOrOnLine(w,S?M:C,S?C:M)?1:-1}function n(g,i){a.insertBefore(g,function(w){var S=r(g.isStart,g.pt,i,w.isStart,w.pt,w.other.pt);return S<0})}function o(g,i){var w=v.node({isStart:!0,pt:g.start,seg:g,primary:i,other:null,status:null});return n(w,g.end),w}function s(g,i,w){var S=v.node({isStart:!1,pt:i.end,seg:i,primary:w,other:g,status:null});g.other=S,n(S,g.pt)}function c(g,i){var w=o(g,i);return s(w,g,i),w}function m(g,i){l&&l.segmentChop(g.seg,i),g.other.remove(),g.seg.end=i,g.other.pt=i,n(g.other,g.pt)}function h(g,i){var w=t(i,g.seg.end,g.seg);return m(g,i),c(w,g.primary)}function p(g,i){var w=v.create();function S(F,P){var j=F.seg.start,U=F.seg.end,Z=P.seg.start,Q=P.seg.end;return k.pointsCollinear(j,Z,Q)?k.pointsCollinear(U,Z,Q)||k.pointAboveOrOnLine(U,Z,Q)?1:-1:k.pointAboveOrOnLine(j,Z,Q)?1:-1}function M(F){return w.findTransition(function(P){var j=S(F,P.ev);return j>0})}function C(F,P){var j=F.seg,U=P.seg,Z=j.start,Q=j.end,re=U.start,ae=U.end;l&&l.checkIntersection(j,U);var oe=k.linesIntersect(Z,Q,re,ae);if(oe===!1){if(!k.pointsCollinear(Z,Q,re)||k.pointsSame(Z,ae)||k.pointsSame(Q,re))return!1;var H=k.pointsSame(Z,re),X=k.pointsSame(Q,ae);if(H&&X)return P;var K=!H&&k.pointBetween(Z,re,ae),G=!X&&k.pointBetween(Q,re,ae);if(H)return G?h(P,Q):h(F,ae),P;K&&(X||(G?h(P,Q):h(F,ae)),h(P,Z))}else oe.alongA===0&&(oe.alongB===-1?h(F,re):oe.alongB===0?h(F,oe.pt):oe.alongB===1&&h(F,ae)),oe.alongB===0&&(oe.alongA===-1?h(P,Z):oe.alongA===0?h(P,oe.pt):oe.alongA===1&&h(P,Q));return!1}for(var _=[];!a.isEmpty();){var T=a.getHead();if(l&&l.vert(T.pt[0]),T.isStart){let F=function(){if(A){var P=C(T,A);if(P)return P}return b?C(T,b):!1};var f=F;l&&l.segmentNew(T.seg,T.primary);var u=M(T),A=u.before?u.before.ev:null,b=u.after?u.after.ev:null;l&&l.tempStatus(T.seg,A?A.seg:!1,b?b.seg:!1);var z=F();if(z){if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,I&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=T.seg.myFill;l&&l.segmentUpdate(z.seg),T.other.remove(),T.remove()}if(a.getHead()!==T){l&&l.rewind(T.seg);continue}if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,b?T.seg.myFill.below=b.seg.myFill.above:T.seg.myFill.below=g,I?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var N;b?T.primary===b.primary?N=b.seg.otherFill.above:N=b.seg.myFill.above:N=T.primary?i:g,T.seg.otherFill={above:N,below:N}}l&&l.status(T.seg,A?A.seg:!1,b?b.seg:!1),T.other.status=u.insert(v.node({ev:T}))}else{var R=T.status;if(R===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(w.exists(R.prev)&&w.exists(R.next)&&C(R.prev.ev,R.next.ev),l&&l.statusRemove(R.ev.seg),R.remove(),!T.primary){var B=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=B}_.push(T.seg)}a.getHead().remove()}return l&&l.done(),_}return E?{addRegion:function(g){for(var i,w=g[g.length-1],S=0;St!=h>t&&e<(m-s)*(t-c)/(h-c)+s;p&&(a=!a)}return a}}}),Y0=Ee({"src/lib/polygon.js"(J,V){"use strict";var v=kg().dot,x=Qi().BADNUM,E=V.exports={};E.tester=function(l){var e=l.slice(),t=e[0][0],a=t,r=e[0][1],n=r,o;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),o=1;oa||M===x||Mn||w&&c(i))}function h(i,w){var S=i[0],M=i[1];if(S===x||Sa||M===x||Mn)return!1;var C=e.length,_=e[0][0],T=e[0][1],f=0,u,A,b,z,I;for(u=1;uMath.max(A,_)||M>Math.max(b,T)))if(Mo||Math.abs(v(h,c))>a)return!0;return!1},E.filter=function(l,e){var t=[l[0]],a=0,r=0;function n(s){l.push(s);var c=t.length,m=a;t.splice(r+1);for(var h=m+1;h1){var o=l.pop();n(o)}return{addPt:n,raw:l,filtered:t}}}}),jM=Ee({"src/components/selections/constants.js"(J,V){"use strict";V.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),UM=Ee({"src/components/selections/select.js"(J,V){"use strict";var v=NM(),x=OM(),E=Ri(),k=yo().dashStyle,l=Qa(),e=$l(),t=Qf().makeEventData,a=Gh(),r=a.freeMode,n=a.rectMode,o=a.drawMode,s=a.openMode,c=a.selectMode,m=Zd(),h=G0(),p=jg(),g=Gd().clearOutline,i=$d(),w=i.handleEllipse,S=i.readPaths,M=Og().newShapes,C=Hb(),_=Qb().activateLastSelection,T=Vr(),f=T.sorterAsc,u=Y0(),A=Dg(),b=Xl().getFromId,z=H0(),I=W0().redrawReglTraces,N=jM(),R=N.MINSELECT,B=u.filter,F=u.tester,P=Ng(),j=P.p2r,U=P.axValue,Z=P.getTransform;function Q(vt){return vt.subplot!==void 0}function re(vt,ht,Re,Be,He){var $e=!Q(Be),Ze=r(He),Je=n(He),Mt=s(He),dt=o(He),Dt=c(He),Ct=He==="drawline",Vt=He==="drawcircle",Ht=Ct||Vt,Wt=Be.gd,Sr=Wt._fullLayout,on=Dt&&Sr.newselection.mode==="immediate"&&$e,$t=Sr._zoomlayer,It=Be.element.getBoundingClientRect(),ir=Be.plotinfo,cr=Z(ir),fr=ht-It.left,Ir=Re-It.top;Sr._calcInverseTransform(Wt);var ln=T.apply3DTransform(Sr._invTransform)(fr,Ir);fr=ln[0],Ir=ln[1];var nn=Sr._invScaleX,wn=Sr._invScaleY,Un=fr,jn=Ir,Aa="M"+fr+","+Ir,ua=Be.xaxes[0],Qn=Be.yaxes[0],ei=ua._length,Fa=Qn._length,ai=vt.altKey&&!(o(He)&&Mt),Mi,ci,ba,pa,Ii,ho,da;G(vt,Wt,Be),Ze&&(Mi=B([[fr,Ir]],N.BENDPX));var Kn=$t.selectAll("path.select-outline-"+ir.id).data([1]),ot=dt?Sr.newshape:Sr.newselection;dt&&(Be.hasText=ot.label.text||ot.label.texttemplate);var et=dt&&!Mt?ot.fillcolor:"rgba(0,0,0,0)",hr=ot.line.color||($e?l.contrast(Wt._fullLayout.plot_bgcolor):"#7f7f7f");Kn.enter().append("path").attr("class","select-outline select-outline-"+ir.id).style({opacity:dt?ot.opacity/2:1,"stroke-dasharray":k(ot.line.dash,ot.line.width),"stroke-width":ot.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,hr).call(l.fill,et).attr("fill-rule","evenodd").classed("cursor-move",!!dt).attr("transform",cr).attr("d",Aa+"Z");var ur=$t.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",cr).attr("d","M0,0Z");if(dt&&Be.hasText){var Tr=$t.select(".label-temp");Tr.empty()&&(Tr=$t.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Rr=Sr._uid+N.SELECTID,Fr=[],at=ne(Wt,Be.xaxes,Be.yaxes,Be.subplot);on&&!vt.shiftKey&&(Be._clearSubplotSelections=function(){if($e){var Ut=ua._id,ar=Qn._id;We(Wt,Ut,ar,at);for(var Er=(Wt.layout||{}).selections||[],br=[],Or=!1,Pr=0;Pr=0){Wt._fullLayout._deactivateShape(Wt);return}if(!dt){var Er=Sr.clickmode;A.done(Rr).then(function(){if(A.clear(Rr),Ut===2){for(Kn.remove(),Ii=0;Ii-1&&ae(ar,Wt,Be.xaxes,Be.yaxes,Be.subplot,Be,Kn),Er==="event"&&sr(Wt,void 0);e.click(Wt,ar,ir.id)}).catch(T.error)}},Be.doneFn=function(){ur.remove(),A.done(Rr).then(function(){A.clear(Rr),!on&&pa&&Be.selectionDefs&&(pa.subtract=ai,Be.selectionDefs.push(pa),Be.mergedPolygons.length=0,[].push.apply(Be.mergedPolygons,ba)),(on||dt)&&$(Be,on),Be.doneFnCompleted&&Be.doneFnCompleted(Fr),Dt&&sr(Wt,da)}).catch(T.error)}}function ae(vt,ht,Re,Be,He,$e,Ze){var Je=ht._hoverdata,Mt=ht._fullLayout,dt=Mt.clickmode,Dt=dt.indexOf("event")>-1,Ct=[],Vt,Ht,Wt,Sr,on,$t,It,ir,cr,fr;if(ye(Je)){G(vt,ht,$e),Vt=ne(ht,Re,Be,He);var Ir=xe(Je,Vt),ln=Ir.pointNumbers.length>0;if(ln?Me(Vt,Ir):Ie(Vt)&&(It=Ae(Ir))){for(Ze&&Ze.remove(),fr=0;fr=0}function q(vt){return vt._fullLayout._activeSelectionIndex>=0}function $(vt,ht){var Re=vt.dragmode,Be=vt.plotinfo,He=vt.gd;Y(He)&&He._fullLayout._deactivateShape(He),q(He)&&He._fullLayout._deactivateSelection(He);var $e=He._fullLayout,Ze=$e._zoomlayer,Je=o(Re),Mt=c(Re);if(Je||Mt){var dt=Ze.selectAll(".select-outline-"+Be.id);if(dt&&He._fullLayout._outlining){var Dt;Je&&(Dt=M(dt,vt)),Dt&&E.call("_guiRelayout",He,{shapes:Dt});var Ct;Mt&&!Q(vt)&&(Ct=C(dt,vt)),Ct&&(He._fullLayout._noEmitSelectedAtStart=!0,E.call("_guiRelayout",He,{selections:Ct}).then(function(){ht&&_(He)})),He._fullLayout._outlining=!1}}Be.selection={},Be.selection.selectionDefs=vt.selectionDefs=[],Be.selection.mergedPolygons=vt.mergedPolygons=[]}function ee(vt){return vt._id}function ne(vt,ht,Re,Be){if(!vt.calcdata)return[];var He=[],$e=ht.map(ee),Ze=Re.map(ee),Je,Mt,dt;for(dt=0;dt0,$e=He?Be[0]:Re;return ht.selectedpoints?ht.selectedpoints.indexOf($e)>-1:!1}function Me(vt,ht){var Re=[],Be,He,$e,Ze;for(Ze=0;Ze0&&Re.push(Be);if(Re.length===1&&($e=Re[0]===ht.searchInfo,$e&&(He=ht.searchInfo.cd[0].trace,He.selectedpoints.length===ht.pointNumbers.length))){for(Ze=0;Ze1||(ht+=Be.selectedpoints.length,ht>1)))return!1;return ht===1}function Ue(vt,ht,Re){var Be,He;for(Be=0;Be-1&&ht;if(!Ze&&ht){var Ut=gt(vt,!0);if(Ut.length){var ar=Ut[0].xref,Er=Ut[0].yref;if(ar&&Er){var br=At(Ut),Or=nr([b(vt,ar,"x"),b(vt,Er,"y")]);Or(Fr,br)}}vt._fullLayout._noEmitSelectedAtStart?vt._fullLayout._noEmitSelectedAtStart=!1:kt&&sr(vt,Fr),Vt._reselect=!1}if(!Ze&&Vt._deselect){var Pr=Vt._deselect;Je=Pr.xref,Mt=Pr.yref,Fe(Je,Mt,Dt)||We(vt,Je,Mt,Be),kt&&(Fr.points.length?sr(vt,Fr):Ot(vt)),Vt._deselect=!1}return{eventData:Fr,selectionTesters:Re}}function Te(vt){var ht=vt.calcdata;if(ht)for(var Re=0;Re=0){ot._fullLayout._deactivateShape(ot);return}var et=ot._fullLayout.clickmode;if(H(ot),da===2&&!ge&&Mi(),ke)et.indexOf("select")>-1&&T(Kn,ot,Fe,We,fe.id,dt),et.indexOf("event")>-1&&n.click(ot,Kn,fe.id);else if(da===1&&ge){var hr=Ie?ve:ue,ur=Ie==="s"||Ue==="w"?0:1,Tr=hr._name+".range["+ur+"]",Rr=F(hr,ur),Fr="left",at="middle";if(hr.fixedrange)return;Ie?(at=Ie==="n"?"top":"bottom",hr.side==="right"&&(Fr="right")):Ue==="e"&&(Fr="right"),ot._context.showAxisRangeEntryBoxes&&v.select(Mt).call(t.makeEditable,{gd:ot,immediate:!0,background:ot._fullLayout.paper_bgcolor,text:String(Rr),fill:hr.tickfont?hr.tickfont.color:"#444",horizontalAlign:Fr,verticalAlign:at}).on("edit",function(kt){var Ut=hr.d2r(kt);Ut!==void 0&&l.call("_guiRelayout",ot,Tr,Ut)})}}c.init(dt);var Vt,Ht,Wt,Sr,on,$t,It,ir,cr,fr;function Ir(da,Kn,ot){var et=Mt.getBoundingClientRect();Vt=Kn-et.left,Ht=ot-et.top,ne._fullLayout._calcInverseTransform(ne);var hr=x.apply3DTransform(ne._fullLayout._invTransform)(Vt,Ht);Vt=hr[0],Ht=hr[1],Wt={l:Vt,r:Vt,w:0,t:Ht,b:Ht,h:0},Sr=ne._hmpixcount?ne._hmlumcount/ne._hmpixcount:a.luminosity(ne._fullLayout.plot_bgcolor),on="M0,0H"+mt+"V"+Tt+"H0V0",$t=!1,It="xy",fr=!1,ir=Q(qe,Sr,Ge,gt,on),cr=re(qe,Ge,gt)}function ln(da,Kn){if(ne._transitioningWithDuration)return!1;var ot=Math.max(0,Math.min(mt,He*da+Vt)),et=Math.max(0,Math.min(Tt,$e*Kn+Ht)),hr=Math.abs(ot-Vt),ur=Math.abs(et-Ht);Wt.l=Math.min(Vt,ot),Wt.r=Math.max(Vt,ot),Wt.t=Math.min(Ht,et),Wt.b=Math.max(Ht,et);function Tr(){It="",Wt.r=Wt.l,Wt.t=Wt.b,cr.attr("d","M0,0Z")}if(At.isSubplotConstrained)hr>b||ur>b?(It="xy",hr/mt>ur/Tt?(ur=hr*Tt/mt,Ht>et?Wt.t=Ht-ur:Wt.b=Ht+ur):(hr=ur*mt/Tt,Vt>ot?Wt.l=Vt-hr:Wt.r=Vt+hr),cr.attr("d",Y(Wt))):Tr();else if(Kt.isSubplotConstrained)if(hr>b||ur>b){It="xy";var Rr=Math.min(Wt.l/mt,(Tt-Wt.b)/Tt),Fr=Math.max(Wt.r/mt,(Tt-Wt.t)/Tt);Wt.l=Rr*mt,Wt.r=Fr*mt,Wt.b=(1-Rr)*Tt,Wt.t=(1-Fr)*Tt,cr.attr("d",Y(Wt))}else Tr();else!_r||ur0){var kt;if(Kt.isSubplotConstrained||!nr&&_r.length===1){for(kt=0;kt1&&(Tr.maxallowed!==void 0&&sr===(Tr.range[0]1&&(Rr.maxallowed!==void 0&&Ot===(Rr.range[0]=0?Math.min(ne,.9):1/(1/Math.max(ne,-.3)+3.222))}function Z(ne,fe,ye){return ne?ne==="nsew"?ye?"":fe==="pan"?"move":"crosshair":ne.toLowerCase()+"-resize":"pointer"}function Q(ne,fe,ye,xe,Ae){return ne.append("path").attr("class","zoombox").style({fill:fe>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(ye,xe)).attr("d",Ae+"Z")}function re(ne,fe,ye){return ne.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(fe,ye)).attr("d","M0,0Z")}function ae(ne,fe,ye,xe,Ae,Me){ne.attr("d",xe+"M"+ye.l+","+ye.t+"v"+ye.h+"h"+ye.w+"v-"+ye.h+"h-"+ye.w+"Z"),oe(ne,fe,Ae,Me)}function oe(ne,fe,ye,xe){ye||(ne.transition().style("fill",xe>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),fe.transition().style("opacity",1).duration(200))}function H(ne){v.select(ne).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function X(ne){z&&ne.data&&ne._context.showTips&&(x.notifier(x._(ne,"Double-click to zoom back out"),"long",ne),z=!1)}function K(ne,fe){return"M"+(ne.l-.5)+","+(fe-b-.5)+"h-3v"+(2*b+1)+"h3ZM"+(ne.r+.5)+","+(fe-b-.5)+"h3v"+(2*b+1)+"h-3Z"}function G(ne,fe){return"M"+(fe-b-.5)+","+(ne.t-.5)+"v-3h"+(2*b+1)+"v3ZM"+(fe-b-.5)+","+(ne.b+.5)+"v3h"+(2*b+1)+"v-3Z"}function Y(ne){var fe=Math.floor(Math.min(ne.b-ne.t,ne.r-ne.l,b)/2);return"M"+(ne.l-3.5)+","+(ne.t-.5+fe)+"h3v"+-fe+"h"+fe+"v-3h-"+(fe+3)+"ZM"+(ne.r+3.5)+","+(ne.t-.5+fe)+"h-3v"+-fe+"h"+-fe+"v-3h"+(fe+3)+"ZM"+(ne.r+3.5)+","+(ne.b+.5-fe)+"h-3v"+fe+"h"+-fe+"v3h"+(fe+3)+"ZM"+(ne.l-3.5)+","+(ne.b+.5-fe)+"h3v"+fe+"h"+fe+"v3h-"+(fe+3)+"Z"}function q(ne,fe,ye,xe,Ae){for(var Me=!1,Ie={},Ue={},qe,ke,ge,ue,ve=(Ae||{}).xaHash,se=(Ae||{}).yaHash,Te=0;Te1&&x.warn("Full array edits are incompatible with other edits",c);var S=n[""][""];if(e(S))r.set(null);else if(Array.isArray(S))r.set(S);else return x.warn("Unrecognized full array edit value",c,S),!0;return g?!1:(m(i,w),h(a),!0)}var M=Object.keys(n).map(Number).sort(E),C=r.get(),_=C||[],T=s(w,c).get(),f=[],u=-1,A=_.length,b,z,I,N,R,B,F,P;for(b=0;b_.length-(F?0:1)){x.warn("index out of range",c,I);continue}if(B!==void 0)R.length>1&&x.warn("Insertion & removal are incompatible with edits to the same index.",c,I),e(B)?f.push(I):F?(B==="add"&&(B={}),_.splice(I,0,B),T&&T.splice(I,0,{})):x.warn("Unrecognized full object edit value",c,I,B),u===-1&&(u=I);else for(z=0;z=0;b--)_.splice(f[b],1),T&&T.splice(f[b],1);if(_.length?C||r.set(_):r.set(null),g)return!1;if(m(i,w),p!==v){var j;if(u===-1)j=M;else{for(A=Math.max(_.length,A),j=[],b=0;b=u));b++)j.push(I);for(b=u;b0&&x.log("Clearing previous rejected promises from queue."),g._promises=[]},J.cleanLayout=function(g){var i,w;g||(g={}),g.xaxis1&&(g.xaxis||(g.xaxis=g.xaxis1),delete g.xaxis1),g.yaxis1&&(g.yaxis||(g.yaxis=g.yaxis1),delete g.yaxis1),g.scene1&&(g.scene||(g.scene=g.scene1),delete g.scene1);var S=(E.subplotsRegistry.cartesian||{}).attrRegex,M=(E.subplotsRegistry.polar||{}).attrRegex,C=(E.subplotsRegistry.ternary||{}).attrRegex,_=(E.subplotsRegistry.gl3d||{}).attrRegex,T=Object.keys(g);for(i=0;i3?(B.x=1.02,B.xanchor="left"):B.x<-2&&(B.x=-.02,B.xanchor="right"),B.y>3?(B.y=1.02,B.yanchor="bottom"):B.y<-2&&(B.y=-.02,B.yanchor="top")),g.dragmode==="rotate"&&(g.dragmode="orbit"),g.template&&g.template.layout&&J.cleanLayout(g.template.layout),g};function r(g,i,w=!1){var S=g[i],M=i.charAt(0);w&&Array.isArray(S)||S&&S!=="paper"&&(g[i]=l(S,M,!0))}J.cleanData=function(g){for(var i=0;i0)return g.slice(0,i)}J.hasParent=function(g,i){for(var w=h(i);w;){if(w in g)return!0;w=h(w)}return!1},J.clearAxisTypes=function(g,i,w){for(var S=0;S{let w=(...S)=>S.every(M=>x.isPlainObject(M))||S.every(M=>Array.isArray(M));if([g,i].every(S=>Array.isArray(S))){if(g.length!==i.length)return!1;for(let S=0;Sx.isPlainObject(S))){if(Object.keys(g).length!==Object.keys(i).length)return!1;for(let S in g){if(S.startsWith("_"))continue;let M=g[S],C=i[S];if(M!==C&&!(w(M,C)?p(M,C):!1))return!1}return!0}return!1};J.collectionsAreEqual=p}}),Hg=Ee({"src/plot_api/plot_api.js"(J){"use strict";var V=Hn(),v=mi(),x=Sb(),E=Vr(),k=E.nestedProperty,l=zp(),e=uM(),t=Ri(),a=Bp(),r=vl(),n=uo(),o=Fb(),s=Gc(),c=yo(),m=Qa(),h=nx().initInteractions,p=mh(),g=uc().clearOutline,i=Ra().dfltConfig,w=GM(),S=WM(),M=W0(),C=El(),_=tc().AX_NAME_PATTERN,T=0,f=5;function u(Re,Be,He,$e){var Ze;if(Re=E.getGraphDiv(Re),l.init(Re),E.isPlainObject(Be)){var Je=Be;Be=Je.data,He=Je.layout,$e=Je.config,Ze=Je.frames}var Mt=l.triggerHandler(Re,"plotly_beforeplot",[Be,He,$e]);if(Mt===!1)return Promise.reject();!Be&&!He&&!E.isPlotDiv(Re)&&E.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Re);function dt(){if(Ze)return J.addFrames(Re,Ze)}N(Re,$e),He||(He={}),V.select(Re).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(Re._promises)||(Re._promises=[]);var Dt=(Re.data||[]).length===0&&Array.isArray(Be);Array.isArray(Be)&&(S.cleanData(Be),Dt?Re.data=Be:Re.data.push.apply(Re.data,Be),Re.empty=!1),(!Re.layout||Dt)&&(Re.layout=S.cleanLayout(He)),r.supplyDefaults(Re);var Ct=Re._fullLayout,Vt=Ct._has("cartesian");Ct._replotting=!0,(Dt||Ct._shouldCreateBgLayer)&&(ht(Re),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),c.initGradients(Re),c.initPatterns(Re),Dt&&n.saveShowSpikeInitial(Re);var Ht=!Re.calcdata||Re.calcdata.length!==(Re._fullData||[]).length;Ht&&r.doCalcdata(Re);for(var Wt=0;Wt=Re.data.length||Ze<-Re.data.length)throw new Error(He+" must be valid indices for gd.data.");if(Be.indexOf(Ze,$e+1)>-1||Ze>=0&&Be.indexOf(-Re.data.length+Ze)>-1||Ze<0&&Be.indexOf(Re.data.length+Ze)>-1)throw new Error("each index in "+He+" must be unique.")}}function j(Re,Be,He){if(!Array.isArray(Re.data))throw new Error("gd.data must be an array.");if(typeof Be>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Be)||(Be=[Be]),P(Re,Be,"currentIndices"),typeof He<"u"&&!Array.isArray(He)&&(He=[He]),typeof He<"u"&&P(Re,He,"newIndices"),typeof He<"u"&&Be.length!==He.length)throw new Error("current and new indices must be of equal length.")}function U(Re,Be,He){var $e,Ze;if(!Array.isArray(Re.data))throw new Error("gd.data must be an array.");if(typeof Be>"u")throw new Error("traces must be defined.");for(Array.isArray(Be)||(Be=[Be]),$e=0;$e"u")throw new Error("indices must be an integer or array of integers");P(Re,He,"indices");for(var Je in Be){if(!Array.isArray(Be[Je])||Be[Je].length!==He.length)throw new Error("attribute "+Je+" must be an array of length equal to indices array length");if(Ze&&(!(Je in $e)||!Array.isArray($e[Je])||$e[Je].length!==Be[Je].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function Q(Re,Be,He,$e){var Ze=E.isPlainObject($e),Je=[],Mt,dt,Dt,Ct,Vt;Array.isArray(He)||(He=[He]),He=F(He,Re.data.length-1);for(var Ht in Be)for(var Wt=0;Wt=0&&Vt=0&&Vt"u")return Ct=J.redraw(Re),e.add(Re,Ze,Mt,Je,dt),Ct;Array.isArray(He)||(He=[He]);try{j(Re,$e,He)}catch(Vt){throw Re.data.splice(Re.data.length-Be.length,Be.length),Vt}return e.startSequence(Re),e.add(Re,Ze,Mt,Je,dt),Ct=J.moveTraces(Re,$e,He),e.stopSequence(Re),Ct}function K(Re,Be){Re=E.getGraphDiv(Re);var He=[],$e=J.addTraces,Ze=K,Je=[Re,He,Be],Mt=[Re,Be],dt,Dt;if(typeof Be>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Be)||(Be=[Be]),P(Re,Be,"indices"),Be=F(Be,Re.data.length-1),Be.sort(E.sorterDes),dt=0;dt"u")for(He=[],Ct=0;Ct0&&typeof Un.parts[ua]!="string";)ua--;var Qn=Un.parts[ua],ei=Un.parts[ua-1]+"."+Qn,Fa=Un.parts.slice(0,ua).join("."),ai=k(Re.layout,Fa).get(),Mi=k($e,Fa).get(),ci=Un.get();if(jn!==void 0){ir[wn]=jn,cr[wn]=Qn==="reverse"?jn:q(ci);var ba=a.getLayoutValObject($e,Un.parts);if(ba&&ba.impliedEdits&&jn!==null)for(var pa in ba.impliedEdits)fr(E.relativeAttr(wn,pa),ba.impliedEdits[pa]);if(["width","height"].indexOf(wn)!==-1)if(jn){fr("autosize",null);var Ii=wn==="height"?"width":"height";fr(Ii,$e[Ii])}else $e[wn]=Re._initialAutoSize[wn];else if(wn==="autosize")fr("width",jn?null:$e.width),fr("height",jn?null:$e.height);else if(ei.match(Me))nn(ei),k($e,Fa+"._inputRange").set(null);else if(ei.match(Ie)){nn(ei),k($e,Fa+"._inputRange").set(null);var ho=k($e,Fa).get();ho._inputDomain&&(ho._input.domain=ho._inputDomain.slice())}else ei.match(Ue)&&k($e,Fa+"._inputDomain").set(null);if(Qn==="type"){ln=ai;var da=Mi.type==="linear"&&jn==="log",Kn=Mi.type==="log"&&jn==="linear";if(da||Kn){if(!ln||!ln.range)fr(Fa+".autorange",!0);else if(Mi.autorange)da&&(ln.range=ln.range[1]>ln.range[0]?[1,2]:[2,1]);else{var ot=ln.range[0],et=ln.range[1];da?(ot<=0&&et<=0&&fr(Fa+".autorange",!0),ot<=0?ot=et/1e6:et<=0&&(et=ot/1e6),fr(Fa+".range[0]",Math.log(ot)/Math.LN10),fr(Fa+".range[1]",Math.log(et)/Math.LN10)):(fr(Fa+".range[0]",Math.pow(10,ot)),fr(Fa+".range[1]",Math.pow(10,et)))}Array.isArray($e._subplots.polar)&&$e._subplots.polar.length&&$e[Un.parts[0]]&&Un.parts[1]==="radialaxis"&&delete $e[Un.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(Re,Mi,jn,fr),t.getComponentMethod("images","convertCoords")(Re,Mi,jn,fr)}else fr(Fa+".autorange",!0),fr(Fa+".range",null);k($e,Fa+"._inputRange").set(null)}else if(Qn.match(_)){var hr=k($e,wn).get(),ur=(jn||{}).type;(!ur||ur==="-")&&(ur="linear"),t.getComponentMethod("annotations","convertCoords")(Re,hr,ur,fr),t.getComponentMethod("images","convertCoords")(Re,hr,ur,fr)}var Tr=w.containerArrayMatch(wn);if(Tr){Vt=Tr.array,Ht=Tr.index;var Rr=Tr.property,Fr=ba||{editType:"calc"};Ht!==""&&Rr===""&&(w.isAddVal(jn)?cr[wn]=null:w.isRemoveVal(jn)?cr[wn]=(k(He,Vt).get()||[])[Ht]:E.warn("unrecognized full object value",Be)),C.update(It,Fr),Ct[Vt]||(Ct[Vt]={});var at=Ct[Vt][Ht];at||(at=Ct[Vt][Ht]={}),at[Rr]=jn,delete Be[wn]}else Qn==="reverse"?(ai.range?ai.range.reverse():(fr(Fa+".autorange",!0),ai.range=[1,0]),Mi.autorange?It.calc=!0:It.plot=!0):(wn==="dragmode"&&(jn===!1&&ci!==!1||jn!==!1&&ci===!1)||$e._has("scatter-like")&&$e._has("regl")&&wn==="dragmode"&&(jn==="lasso"||jn==="select")&&!(ci==="lasso"||ci==="select")?It.plot=!0:ba?C.update(It,ba):It.calc=!0,Un.set(jn))}}for(Vt in Ct){var kt=w.applyContainerArrayChanges(Re,Je(He,Vt),Ct[Vt],It,Je);kt||(It.plot=!0)}for(var Ut in Ir){ln=n.getFromId(Re,Ut);var ar=ln&&ln._constraintGroup;if(ar){It.calc=!0;for(var Er in ar)Ir[Er]||(n.getFromId(Re,Er)._constraintShrinkable=!0)}}(ke(Re)||Be.height||Be.width)&&(It.plot=!0);var br=$e.shapes;for(Ht=0;Ht1;)if($e.pop(),He=k(Be,$e.join(".")+".uirevision").get(),He!==void 0)return He;return Be.uirevision}function We(Re,Be){for(var He=0;He[Fa,Re._ev.listeners(Fa)]);Je=J.newPlot(Re,Be,He,$e).then(()=>{for(let[Fa,ai]of ei)ai.forEach(Mi=>Re.on(Fa,Mi));return J.react(Re,Be,He,$e)})}else{Re.data=Be||[],S.cleanData(Re.data),Re.layout=He||{},S.cleanLayout(Re.layout),mt(Re.data,Re.layout,dt,Dt),r.supplyDefaults(Re,{skipUpdateCalc:!0});var Ht=Re._fullData,Wt=Re._fullLayout,Sr=Wt.datarevision===void 0,on=Wt.transition,$t=Kt(Re,Dt,Wt,Sr,on),It=$t.newDataRevision,ir=At(Re,dt,Ht,Sr,on,It);if(ke(Re)&&($t.layoutReplot=!0),ir.calc||$t.calc){Re.calcdata=void 0;for(var cr=Object.getOwnPropertyNames(Wt),fr=0;fr(Vt||Re.emit("plotly_react",{config:$e,data:Be,layout:He}),Re))}function At(Re,Be,He,$e,Ze,Je){var Mt=Be.length===He.length;if(!Ze&&!Mt)return{fullReplot:!0,calc:!0};var dt=C.traceFlags();dt.arrays={},dt.nChanges=0,dt.nChangesAnim=0;var Dt,Ct;function Vt(Sr){var on=a.getTraceValObject(Ct,Sr);return!Ct._module.animatable&&on.anim&&(on.anim=!1),on}var Ht={getValObject:Vt,flags:dt,immutable:$e,transition:Ze,newDataRevision:Je,gd:Re},Wt={};for(Dt=0;Dt=Ze.length?Ze[0]:Ze[Ct]:Ze}function dt(Ct){return Array.isArray(Je)?Ct>=Je.length?Je[0]:Je[Ct]:Je}function Dt(Ct,Vt){var Ht=0;return function(){if(Ct&&++Ht===Vt)return Ct()}}return new Promise(function(Ct,Vt){function Ht(){if($e._frameQueue.length!==0){for(;$e._frameQueue.length;){var Qn=$e._frameQueue.pop();Qn.onInterrupt&&Qn.onInterrupt()}Re.emit("plotly_animationinterrupted",[])}}function Wt(Qn){if(Qn.length!==0){for(var ei=0;ei$e._timeToNext&&on()};Qn()}var It=0;function ir(Qn){return Array.isArray(Ze)?It>=Ze.length?Qn.transitionOpts=Ze[It]:Qn.transitionOpts=Ze[0]:Qn.transitionOpts=Ze,It++,Qn}var cr,fr,Ir=[],ln=Be==null,nn=Array.isArray(Be),wn=!ln&&!nn&&E.isPlainObject(Be);if(wn)Ir.push({type:"object",data:ir(E.extendFlat({},Be))});else if(ln||["string","number"].indexOf(typeof Be)!==-1)for(cr=0;cr<$e._frames.length;cr++)fr=$e._frames[cr],fr&&(ln||String(fr.group)===String(Be))&&Ir.push({type:"byname",name:String(fr.name),data:ir({name:fr.name})});else if(nn)for(cr=0;cr0&&AaAa)&&ua.push(fr);Ir=ua}}Ir.length>0?Wt(Ir):(Re.emit("plotly_animated"),Ct())})}function Zt(Re,Be,He){if(Re=E.getGraphDiv(Re),Be==null)return Promise.resolve();if(!E.isPlotDiv(Re))throw new Error("This element is not a Plotly plot: "+Re+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var $e,Ze,Je,Mt,dt=Re._transitionData._frames,Dt=Re._transitionData._frameHash;if(!Array.isArray(Be))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Be);var Ct=dt.length+Be.length*2,Vt=[],Ht={};for($e=Be.length-1;$e>=0;$e--)if(E.isPlainObject(Be[$e])){var Wt=Be[$e].name,Sr=(Dt[Wt]||Ht[Wt]||{}).name,on=Be[$e].name,$t=Dt[Sr]||Ht[Sr];Sr&&on&&typeof on=="number"&&$t&&TUn.index?-1:wn.index=0;$e--){if(Ze=Vt[$e].frame,typeof Ze.name=="number"&&E.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Ze.name)for(;Dt[Ze.name="frame "+Re._transitionData._counter++];);if(Dt[Ze.name]){for(Je=0;Je=0;He--)$e=Be[He],Je.push({type:"delete",index:$e}),Mt.unshift({type:"insert",index:$e,value:Ze[$e]});var dt=r.modifyFrames,Dt=r.modifyFrames,Ct=[Re,Mt],Vt=[Re,Je];return e&&e.add(Re,dt,Ct,Dt,Vt),r.modifyFrames(Re,Je)}function Ot(Re){Re=E.getGraphDiv(Re);var Be=Re._fullLayout||{},He=Re._fullData||[];return r.cleanPlot([],{},He,Be),r.purge(Re),l.purge(Re),Be._container&&Be._container.remove(),delete Re._context,Re}function vt(Re){var Be=Re._fullLayout,He=Re.getBoundingClientRect();if(!E.equalDomRects(He,Be._lastBBox)){var $e=Be._invTransform=E.inverseTransformMatrix(E.getFullTransformMatrix(Re));Be._invScaleX=Math.sqrt($e[0][0]*$e[0][0]+$e[0][1]*$e[0][1]+$e[0][2]*$e[0][2]),Be._invScaleY=Math.sqrt($e[1][0]*$e[1][0]+$e[1][1]*$e[1][1]+$e[1][2]*$e[1][2]),Be._lastBBox=He}}function ht(Re){var Be=V.select(Re),He=Re._fullLayout;if(He._calcInverseTransform=vt,He._calcInverseTransform(Re),He._container=Be.selectAll(".plot-container").data([0]),He._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),He._paperdiv=He._container.selectAll(".svg-container").data([0]),He._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),He._glcontainer=He._paperdiv.selectAll(".gl-container").data([{}]),He._glcontainer.enter().append("div").classed("gl-container",!0),He._paperdiv.selectAll(".main-svg").remove(),He._paperdiv.select(".modebar-container").remove(),He._paper=He._paperdiv.insert("svg",":first-child").classed("main-svg",!0),He._toppaper=He._paperdiv.append("svg").classed("main-svg",!0),He._modebardiv=He._paperdiv.append("div"),delete He._modeBar,He._hoverpaper=He._paperdiv.append("svg").classed("main-svg",!0),!He._uid){var $e={};V.selectAll("defs").each(function(){this.id&&($e[this.id.split("-")[1]]=1)}),He._uid=E.randstr($e)}He._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),He._defs=He._paper.append("defs").attr("id","defs-"+He._uid),He._clips=He._defs.append("g").classed("clips",!0),He._topdefs=He._toppaper.append("defs").attr("id","topdefs-"+He._uid),He._topclips=He._topdefs.append("g").classed("clips",!0),He._bgLayer=He._paper.append("g").classed("bglayer",!0),He._draggers=He._paper.append("g").classed("draglayer",!0);var Ze=He._paper.append("g").classed("layer-below",!0);He._imageLowerLayer=Ze.append("g").classed("imagelayer",!0),He._shapeLowerLayer=Ze.append("g").classed("shapelayer",!0),He._cartesianlayer=He._paper.append("g").classed("cartesianlayer",!0),He._polarlayer=He._paper.append("g").classed("polarlayer",!0),He._smithlayer=He._paper.append("g").classed("smithlayer",!0),He._ternarylayer=He._paper.append("g").classed("ternarylayer",!0),He._geolayer=He._paper.append("g").classed("geolayer",!0),He._funnelarealayer=He._paper.append("g").classed("funnelarealayer",!0),He._pielayer=He._paper.append("g").classed("pielayer",!0),He._iciclelayer=He._paper.append("g").classed("iciclelayer",!0),He._treemaplayer=He._paper.append("g").classed("treemaplayer",!0),He._sunburstlayer=He._paper.append("g").classed("sunburstlayer",!0),He._indicatorlayer=He._toppaper.append("g").classed("indicatorlayer",!0),He._glimages=He._paper.append("g").classed("glimages",!0);var Je=He._toppaper.append("g").classed("layer-above",!0);He._imageUpperLayer=Je.append("g").classed("imagelayer",!0),He._shapeUpperLayer=Je.append("g").classed("shapelayer",!0),He._selectionLayer=He._toppaper.append("g").classed("selectionlayer",!0),He._infolayer=He._toppaper.append("g").classed("infolayer",!0),He._menulayer=He._toppaper.append("g").classed("menulayer",!0),He._zoomlayer=He._toppaper.append("g").classed("zoomlayer",!0),He._hoverlayer=He._hoverpaper.append("g").classed("hoverlayer",!0),He._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),Re.emit("plotly_framework")}J.animate=_r,J.addFrames=Zt,J.deleteFrames=sr,J.addTraces=X,J.deleteTraces=K,J.extendTraces=oe,J.moveTraces=G,J.prependTraces=H,J.newPlot=B,J._doPlot=u,J.purge=Ot,J.react=Tt,J.redraw=R,J.relayout=ye,J.restyle=Y,J.setPlotConfig=b,J.update=ge,J._guiRelayout=ue(ye),J._guiRestyle=ue(Y),J._guiUpdate=ue(ge),J._storeDirectGUIEdit=ne}}),yd=Ee({"src/snapshot/helpers.js"(J){"use strict";var V=Ri();J.getDelay=function(E){return E._has&&(E._has("gl3d")||E._has("map"))?500:0},J.getRedrawFunc=function(E){return function(){V.getComponentMethod("colorbar","draw")(E)}},J.encodeSVG=function(E){return"data:image/svg+xml,"+encodeURIComponent(E)},J.encodeJSON=function(E){return"data:application/json,"+encodeURIComponent(E)};var v=window.URL||window.webkitURL;J.createObjectURL=function(E){return v.createObjectURL(E)},J.revokeObjectURL=function(E){return v.revokeObjectURL(E)},J.createBlob=function(E,k){if(k==="svg")return new window.Blob([E],{type:"image/svg+xml;charset=utf-8"});if(k==="full-json")return new window.Blob([E],{type:"application/json;charset=utf-8"});var l=x(window.atob(E));return new window.Blob([l],{type:"image/"+k})},J.octetStream=function(E){document.location.href="data:application/octet-stream"+E},J.getPlotTitle=function(E){var k,l,e,t,a=E._fullLayout;if(a){var r=(k=a.title)==null?void 0:k.text;return r===((l=a._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=E.layout)==null?void 0:e.title)==null?void 0:t.text},J.getPlotSubtitle=function(E){var k,l,e,t,a,r,n=E._fullLayout;if(n){var o=(l=(k=n.title)==null?void 0:k.subtitle)==null?void 0:l.text;return o===((e=n._dfltTitle)==null?void 0:e.subtitle)?void 0:o}return(r=(a=(t=E.layout)==null?void 0:t.title)==null?void 0:a.subtitle)==null?void 0:r.text};function x(E){for(var k=E.length,l=new ArrayBuffer(k),e=new Uint8Array(l),t=0;t{let i=g.toLowerCase();return r.includes(i)?g:n.includes(i)?"<":o.includes(i)?">":g.includes("<")||g.includes(">")?"":h.html(g).text()});return h.remove(),p}function c(m){return m.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}V.exports=function(h,p,g){var i=h._fullLayout,w=i._paper,S=i._toppaper,M=i.width,C=i.height,_;w.insert("rect",":first-child").call(E.setRect,0,0,M,C).call(k.fill,i.paper_bgcolor);var T=i._basePlotModules||[];for(_=0;_1&&C.push(s("object","layout"))),x.supplyDefaults(_);for(var u=_._fullData,A=T.length,b=0;bz.length&&M.push(s("unused",C,A.concat(z.length)));var P=z.length,j=Array.isArray(F);j&&(P=Math.min(P,F.length));var U,Z,Q,re,ae;if(I.dimensions===2)for(Z=0;Zz[Z].length&&M.push(s("unused",C,A.concat(Z,z[Z].length)));var oe=z[Z].length;for(U=0;U<(j?Math.min(oe,F[Z].length):oe);U++)Q=j?F[Z][U]:F,re=b[Z][U],ae=z[Z][U],v.validate(re,Q)?ae!==re&&ae!==+re&&M.push(s("dynamic",C,A.concat(Z,U),re,ae)):M.push(s("value",C,A.concat(Z,U),re))}else M.push(s("array",C,A.concat(Z),b[Z]));else for(Z=0;ZR?M.push({code:"unused",traceType:b,templateCount:N,dataCount:R}):R>N&&M.push({code:"reused",traceType:b,templateCount:N,dataCount:R})}}function B(F,P){for(var j in F)if(j.charAt(0)!=="_"){var U=F[j],Z=s(F,j,P);v(U)?(Array.isArray(F)&&U._template===!1&&U.templateitemname&&M.push({code:"missing",path:Z,templateitemname:U.templateitemname}),B(U,Z)):Array.isArray(U)&&c(U)&&B(U,Z)}}if(B({data:_,layout:C},""),M.length)return M.map(m)};function c(h){for(var p=0;p=0;m--){var h=l[m];if(h.type==="scatter"&&h.xaxis===s.xaxis&&h.yaxis===s.yaxis){h.opacity=void 0;break}}}}}}}),QM=Ee({"src/traces/scatter/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=Ig();V.exports=function(E,k){function l(t,a){return v.coerce(E,k,x,t,a)}var e=k.barmode==="group";k.scattermode==="group"&&l("scattergap",e?k.bargap:.2)}}}),zh=Ee({"src/plots/cartesian/align_period.js"(J,V){"use strict";var v=mi(),x=Vr(),E=x.dateTime2ms,k=x.incrementMonth,l=Qi(),e=l.ONEAVGMONTH;V.exports=function(a,r,n,o){if(r.type!=="date")return{vals:o};var s=a[n+"periodalignment"];if(!s)return{vals:o};var c=a[n+"period"],m;if(v(c)){if(c=+c,c<=0)return{vals:o}}else if(typeof c=="string"&&c.charAt(0)==="M"){var h=+c.substring(1);if(h>0&&Math.round(h)===h)m=h;else return{vals:o}}for(var p=r.calendar,g=s==="start",i=s==="end",w=a[n+"period0"],S=E(w,p)||0,M=[],C=[],_=[],T=o.length,f=0;fu;)z=k(z,-m,p);for(;z<=u;)z=k(z,m,p);b=k(z,-m,p)}else{for(A=Math.round((u-S)/c),z=S+A*c;z>u;)z-=c;for(;z<=u;)z+=c;b=z-c}M[f]=g?b:i?z:(b+z)/2,C[f]=b,_[f]=z}return{vals:M,starts:C,ends:_}}}}),yh=Ee({"src/traces/scatter/colorscale_calc.js"(J,V){"use strict";var v=cf().hasColorscale,x=Sf(),E=al();V.exports=function(l,e){E.hasLines(e)&&v(e,"line")&&x(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),E.hasMarkers(e)&&(v(e,"marker")&&x(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),v(e,"marker.line")&&x(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),$h=Ee({"src/traces/scatter/arrays_to_calcdata.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k){for(var l=0;lB&&b[P].gap;)P--;for(U=b[P].s,F=b.length-1;F>P;F--)b[F].s=U;for(;Bre+Z||!v(Q))}for(var oe=0;oeP(U))):P(R.text);let j=R.outsidetextfont.size*r*F+a;return{ppadplus:B.some(U=>U.s<0)?j:0,ppadminus:B.some(U=>U.s>=0)?j:0}}return{ppadplus:void 0,ppadminus:void 0}}function z(R,B,F,P){for(var j=N(P),U=0;UN[p]&&p0?l:e)/(p._m*w*(p._m>0?l:e)))),Ct*=1e3}if(Vt===E){if(i&&(Vt=p.c2p(Dt.y,!0)),Vt===E)return!1;Vt*=1e3}return[Ct,Vt]}function ee(dt,Dt,Ct,Vt){var Ht=Ct-dt,Wt=Vt-Dt,Sr=.5-dt,on=.5-Dt,$t=Ht*Ht+Wt*Wt,It=Ht*Sr+Wt*on;if(It>0&&It<$t){var ir=Sr*Wt-on*Ht;if(ir*ir<$t)return!0}}var ne,fe;function ye(dt,Dt){var Ct=dt[0]/w,Vt=dt[1]/S,Ht=Math.max(0,-Ct,Ct-1,-Vt,Vt-1);return Ht&&ne!==void 0&&ee(Ct,Vt,ne,fe)&&(Ht=0),Ht&&Dt&&ee(Ct,Vt,Dt[0]/w,Dt[1]/S)&&(Ht=0),(1+n.toleranceGrowth*Ht)*T}function xe(dt,Dt){var Ct=dt[0]-Dt[0],Vt=dt[1]-Dt[1];return Math.sqrt(Ct*Ct+Vt*Vt)}var Ae=n.maxScreensAway,Me=-w*Ae,Ie=w*(1+Ae),Ue=-S*Ae,qe=S*(1+Ae),ke=[[Me,Ue,Ie,Ue],[Ie,Ue,Ie,qe],[Ie,qe,Me,qe],[Me,qe,Me,Ue]],ge,ue,ve,se,Te,Fe;function We(dt,Dt){for(var Ct=[],Vt=0,Ht=0;Ht<4;Ht++){var Wt=ke[Ht],Sr=a(dt[0],dt[1],Dt[0],Dt[1],Wt[0],Wt[1],Wt[2],Wt[3]);Sr&&(!Vt||Math.abs(Sr.x-Ct[0][0])>1||Math.abs(Sr.y-Ct[0][1])>1)&&(Sr=[Sr.x,Sr.y],Vt&&xe(Sr,dt)Ie||dt[1]qe)return[r(dt[0],Me,Ie),r(dt[1],Ue,qe)]}function gt(dt,Dt){if(dt[0]===Dt[0]&&(dt[0]===Me||dt[0]===Ie)||dt[1]===Dt[1]&&(dt[1]===Ue||dt[1]===qe))return!0}function mt(dt,Dt){var Ct=[],Vt=Ge(dt),Ht=Ge(Dt);return Vt&&Ht&>(Vt,Ht)||(Vt&&Ct.push(Vt),Ht&&Ct.push(Ht)),Ct}function Tt(dt,Dt,Ct){return function(Vt,Ht){var Wt=Ge(Vt),Sr=Ge(Ht),on=[];if(Wt&&Sr&>(Wt,Sr))return on;Wt&&on.push(Wt),Sr&&on.push(Sr);var $t=2*t.constrain((Vt[dt]+Ht[dt])/2,Dt,Ct)-((Wt||Vt)[dt]+(Sr||Ht)[dt]);if($t){var It;Wt&&Sr?It=$t>0==Wt[dt]>Sr[dt]?Wt:Sr:It=Wt||Sr,It[dt]+=$t}return on}}var At;f==="linear"||f==="spline"?At=We:f==="hv"||f==="vh"?At=mt:f==="hvh"?At=Tt(0,Me,Ie):f==="vhv"&&(At=Tt(1,Ue,qe));function Kt(dt,Dt){var Ct=Dt[0]-dt[0],Vt=(Dt[1]-dt[1])/Ct,Ht=(dt[1]*Dt[0]-Dt[1]*dt[0])/Ct;return Ht>0?[Vt>0?Me:Ie,qe]:[Vt>0?Ie:Me,Ue]}function nr(dt){var Dt=dt[0],Ct=dt[1],Vt=Dt===N[R-1][0],Ht=Ct===N[R-1][1];if(!(Vt&&Ht))if(R>1){var Wt=Dt===N[R-2][0],Sr=Ct===N[R-2][1];Vt&&(Dt===Me||Dt===Ie)&&Wt?Sr?R--:N[R-1]=dt:Ht&&(Ct===Ue||Ct===qe)&&Sr?Wt?R--:N[R-1]=dt:N[R++]=dt}else N[R++]=dt}function _r(dt){N[R-1][0]!==dt[0]&&N[R-1][1]!==dt[1]&&nr([ve,se]),nr(dt),Te=null,ve=se=0}var Zt=t.isArrayOrTypedArray(C);function sr(dt){if(dt&&M&&(dt.i=B,dt.d=s,dt.trace=m,dt.marker=Zt?C[dt.i]:C,dt.backoff=M),ne=dt[0]/w,fe=dt[1]/S,ge=dt[0]Ie?Ie:0,ue=dt[1]qe?qe:0,ge||ue){if(!R)N[R++]=[ge||dt[0],ue||dt[1]];else if(Te){var Dt=At(Te,dt);Dt.length>1&&(_r(Dt[0]),N[R++]=Dt[1])}else Fe=At(N[R-1],dt)[0],N[R++]=Fe;var Ct=N[R-1];ge&&ue&&(Ct[0]!==ge||Ct[1]!==ue)?(Te&&(ve!==ge&&se!==ue?nr(ve&&se?Kt(Te,dt):[ve||ge,se||ue]):ve&&se&&nr([ve,se])),nr([ge,ue])):ve-ge&&se-ue&&nr([ge||ve,ue||se]),Te=dt,ve=ge,se=ue}else Te&&_r(At(Te,dt)[0]),N[R++]=dt}for(B=0;Bye(Z,Ot))break;P=Z,K=ae[0]*re[0]+ae[1]*re[1],K>H?(H=K,j=Z,Q=!1):K=s.length||!Z)break;sr(Z),F=Z}}Te&&nr([ve||Te[0],se||Te[1]]),b.push(N.slice(0,R))}var vt=f.slice(f.length-1);if(M&&vt!=="h"&&vt!=="v"){for(var ht=!1,Re=-1,Be=[],He=0;He=0?n=h:(n=h=m,m++),n0,f=r(h,p,g);if(M=i.selectAll("g.trace").data(f,function(A){return A[0].trace.uid}),M.enter().append("g").attr("class",function(A){return"trace scatter trace"+A[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(h,M,p),T){S&&(C=S());var u=v.transition().duration(w.duration).ease(w.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});u.each(function(){i.selectAll("g.trace").each(function(A,b){s(h,b,p,A,f,this,w)})})}else M.each(function(A,b){s(h,b,p,A,f,this,w)});_&&M.exit().remove(),i.selectAll("path:not([d])").remove()};function o(m,h,p){h.each(function(g){var i=k(v.select(this),"g","fills");e.setClipUrl(i,p.layerClipId,m);var w=g[0].trace;w._ownFill=null,w._nextFill=null;var S=[];w._ownfill&&S.push("_ownFill"),w._nexttrace&&S.push("_nextFill");var M=i.selectAll("g").data(S,l);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){w[C]=k(v.select(this),"path","js-fill")})})}function s(m,h,p,g,i,w,S){var M=m._context.staticPlot,C;c(m,h,p,g,i);var _=!!S&&S.duration>0;function T(nr){return _?nr.transition():nr}var f=p.xaxis,u=p.yaxis,A=g[0].trace,b=A.line,z=v.select(w),I=k(z,"g","errorbars"),N=k(z,"g","lines"),R=k(z,"g","points"),B=k(z,"g","text");if(x.getComponentMethod("errorbars","plot")(m,I,p,S),A.visible!==!0)return;T(z).style("opacity",A.opacity);var F,P,j=A.fill.charAt(A.fill.length-1);j!=="x"&&j!=="y"&&(j="");var U,Z;j==="y"?(U=1,Z=u.c2p(0,!0)):j==="x"&&(U=0,Z=f.c2p(0,!0)),g[0][p.isRangePlot?"nodeRangePlot3":"node3"]=z;var Q="",re=[],ae=A._prevtrace,oe=null,H=null;ae&&(Q=ae._prevRevpath||"",P=ae._nextFill,re=ae._ownPolygons,oe=ae._fillsegments,H=ae._fillElement);var X,K,G="",Y="",q,$,ee,ne,fe,ye,xe=[];A._polygons=[];var Ae=[],Me=[],Ie=E.noop;if(F=A._ownFill,t.hasLines(A)||A.fill!=="none"){P&&P.datum(g),["hv","vh","hvh","vhv"].indexOf(b.shape)!==-1?(q=e.steps(b.shape),$=e.steps(b.shape.split("").reverse().join(""))):b.shape==="spline"?q=$=function(nr){var _r=nr[nr.length-1];return nr.length>1&&nr[0][0]===_r[0]&&nr[0][1]===_r[1]?e.smoothclosed(nr.slice(1),b.smoothing):e.smoothopen(nr,b.smoothing)}:q=$=function(nr){return"M"+nr.join("L")},ee=function(nr){return $(nr.reverse())},Me=a(g,{xaxis:f,yaxis:u,trace:A,connectGaps:A.connectgaps,baseTolerance:Math.max(b.width||1,3)/4,shape:b.shape,backoff:b.backoff,simplify:b.simplify,fill:A.fill}),Ae=new Array(Me.length);var Ue=0;for(C=0;C=M[0]&&z.x<=M[1]&&z.y>=C[0]&&z.y<=C[1]}),u=Math.ceil(f.length/T),A=0;i.forEach(function(z,I){var N=z[0].trace;t.hasMarkers(N)&&N.marker.maxdisplayed>0&&I=Math.min(ae,oe)&&p<=Math.max(ae,oe)?0:1/0}var H=Math.max(3,re.mrc||0),X=1-1/H,K=Math.abs(m.c2p(re.x)-p);return K=Math.min(ae,oe)&&g<=Math.max(ae,oe)?0:1/0}var H=Math.max(3,re.mrc||0),X=1-1/H,K=Math.abs(h.c2p(re.y)-g);return KY!=Ae>=Y&&(fe=ee[$-1][0],ye=ee[$][0],Ae-xe&&(ne=fe+(ye-fe)*(Y-xe)/(Ae-xe),H=Math.min(H,ne),X=Math.max(X,ne)));return H=Math.max(H,0),X=Math.min(X,m._length),{x0:H,x1:X,y0:Y,y1:Y}}if(w.indexOf("fills")!==-1&&c._fillElement){var U=P(c._fillElement)&&!P(c._fillExclusionElement);if(U){var Z=j(c._polygons);Z===null&&(Z={x0:i[0],x1:i[0],y0:i[1],y1:i[1]});var Q=l.defaultLine;return l.opacity(c.fillcolor)?Q=c.fillcolor:l.opacity((c.line||{}).color)&&(Q=c.line.color),v.extendFlat(a,{distance:a.maxHoverDistance,x0:Z.x0,x1:Z.x1,y0:Z.y0,y1:Z.y1,color:Q,hovertemplate:!1}),delete a.index,c.text&&!v.isArrayOrTypedArray(c.text)?a.text=String(c.text):a.text=c.name,[a]}}}}}),Fv=Ee({"src/traces/scatter/select.js"(J,V){"use strict";var v=al();V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,a=[],r=l[0].trace,n,o,s,c,m=r.mode&&!v.hasMarkers(r)&&!v.hasText(r);if(m)return[];if(k===!1)for(n=0;n0&&(o["_"+r+"axes"]||{})[a])return o;if((o[r+"axis"]||r)===a){if(e(o,r))return o;if((o[r]||[]).length||o[r+"0"])return o}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,a){var r=l(t),n=v(t,"box-violin");return n&&a===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),Xg=Ee({"src/plots/cartesian/category_order_defaults.js"(J,V){"use strict";var v=vs().isTypedArraySpec;function x(E,k){var l=k.dataAttr||E._id.charAt(0),e={},t,a,r;if(k.axData)t=k.axData;else for(t=[],a=0;a0||v(a),n;r&&(n="array");var o=e("categoryorder",n),s;o==="array"&&(s=e("categoryarray")),!r&&o==="array"&&(o=l.categoryorder="trace"),o==="trace"?l._initialCategories=[]:o==="array"?l._initialCategories=s.slice():(s=x(l,t).sort(),o==="category ascending"?l._initialCategories=s:o==="category descending"&&(l._initialCategories=s.reverse()))}}}}),Z0=Ee({"src/plots/cartesian/line_grid_defaults.js"(J,V){"use strict";var v=Qa(),x=rs(),E=Vr();V.exports=function(l,e,t,a){a=a||{};var r=a.dfltColor;function n(b,z){return E.coerce2(l,e,a.attributes,b,z)}var o=n("linecolor",r),s=n("linewidth"),c=t("showline",a.showLine||!!o||!!s);c||(delete e.linecolor,delete e.linewidth);var m=v.mix(r,a.bgColor,a.blend||x.lightFraction),h=n("gridcolor",m),p=n("gridwidth"),g=n("griddash"),i=t("showgrid",a.showGrid||!!h||!!p||!!g);if(i||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),a.hasMinor){var w=v.mix(e.gridcolor,a.bgColor,67),S=n("minor.gridcolor",w),M=n("minor.gridwidth",e.gridwidth||1),C=n("minor.griddash",e.griddash||"solid"),_=t("minor.showgrid",!!S||!!M||!!C);_||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!a.noZeroLine){var T=n("zerolinelayer"),f=n("zerolinecolor",r),u=n("zerolinewidth"),A=t("zeroline",a.showGrid||!!f||!!u);A||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),K0=Ee({"src/plots/cartesian/axis_defaults.js"(J,V){"use strict";var v=mi(),x=Ri(),E=Vr(),k=xs(),l=Mf(),e=Gc(),t=Cv(),a=Np(),r=Wd(),n=Yd(),o=Xg(),s=Z0(),c=Fb(),m=Hh(),h=tc().WEEKDAY_PATTERN,p=tc().HOUR_PATTERN;V.exports=function(M,C,_,T,f){var u=T.letter,A=T.font||{},b=T.splomStash||{},z=_("visible",!T.visibleDflt),I=C._template||{},N=C.type||I.type||"-",R;if(N==="date"){var B=x.getComponentMethod("calendars","handleDefaults");B(M,C,"calendar",T.calendar),T.noTicklabelmode||(R=_("ticklabelmode"))}!T.noTicklabelindex&&(N==="date"||N==="linear")&&_("ticklabelindex");var F="";(!T.noTicklabelposition||N==="multicategory")&&(F=E.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:R==="period"?["outside","inside"]:u==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),T.noTicklabeloverflow||_("ticklabeloverflow",F.indexOf("inside")!==-1?"hide past domain":N==="category"||N==="multicategory"?"allow":"hide past div"),m(C,f),c(M,C,_,T),o(M,C,_,T),T.noHover||(N!=="category"&&_("hoverformat"),T.noUnifiedhovertitle||_("unifiedhovertitle.text"));var P=_("color"),j=P!==e.color.dflt?P:A.color,U=b.label||f._dfltTitle[u];if(n(M,C,_,N,T),!z)return C;_("title.text",U),E.coerceFont(_,"title.font",A,{overrideDflt:{size:E.bigFont(A.size),color:j}}),t(M,C,_,N);var Z=T.hasMinor;if(Z&&(k.newContainer(C,"minor"),t(M,C,_,N,{isMinor:!0})),r(M,C,_,N,T),a(M,C,_,T),Z){var Q=T.isMinor;T.isMinor=!0,a(M,C,_,T),T.isMinor=Q}s(M,C,_,{dfltColor:P,bgColor:T.bgColor,showGrid:T.showGrid,hasMinor:Z,attributes:e}),Z&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&_("mirror");var re=N==="multicategory";if(!T.noTickson&&(N==="category"||re)&&(C.ticks||C.showgrid)&&(re?(_("tickson","boundaries"),delete C.ticklabelposition):_("tickson")),re){var ae=_("showdividers");ae&&(_("dividercolor"),_("dividerwidth"))}if(N==="date")if(l(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:g}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var oe=0;oe=2){var u="",A,b;if(f.length===2){for(A=0;A<2;A++)if(b=w(f[A]),b){u=h;break}}var z=_("pattern",u);if(z===h)for(A=0;A<2;A++)b=w(f[A]),b&&(M.bounds[A]=f[A]=b-1);if(z)for(A=0;A<2;A++)switch(b=f[A],z){case h:if(!v(b)){M.enabled=!1;return}if(b=+b,b!==Math.floor(b)||b<0||b>=7){M.enabled=!1;return}M.bounds[A]=f[A]=b;break;case p:if(!v(b)){M.enabled=!1;return}if(b=+b,b<0||b>24){M.enabled=!1;return}M.bounds[A]=f[A]=b;break}if(C.autorange===!1){var I=C.range;if(I[0]I[1]){M.enabled=!1;return}}else if(f[0]>I[0]&&f[1]_[1]-1/4096&&(l.domain=m),x.noneOrAll(k.domain,l.domain,m),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),n4=Ee({"src/plots/cartesian/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=Qf().isUnifiedHover,k=Vb(),l=xs(),e=Fp(),t=Gc(),a=ux(),r=K0(),n=Pv(),o=$g(),s=Xl(),c=s.id2name,m=s.name2id,h=tc().AX_ID_PATTERN,p=Ri(),g=p.traceIs,i=p.getComponentMethod;function w(S,M,C){Array.isArray(S[M])?S[M].push(C):S[M]=[C]}V.exports=function(M,C,_){var T=C.autotypenumbers,f={},u={},A={},b={},z={},I={},N={},R={},B={},F={},P,j;for(P=0;P<_.length;P++){var U=_[P];if(g(U,"cartesian")){var Z;if(U.xaxis)Z=c(U.xaxis),w(f,Z,U);else if(U.xaxes)for(j=0;j rect").call(k.setTranslate,0,0).call(k.setScale,1,1),C.plot.call(k.setTranslate,_._offset,T._offset).call(k.setScale,1,1);var f=C.plot.selectAll(".scatterlayer .trace");f.selectAll(".point").call(k.setPointGroupScale,1,1),f.selectAll(".textpoint").call(k.setTextPointsScale,1,1),f.call(k.hideOutsideRangePoints,C)}function c(C,_){var T=C.plotinfo,f=T.xaxis,u=T.yaxis,A=f._length,b=u._length,z=!!C.xr1,I=!!C.yr1,N=[];if(z){var R=E.simpleMap(C.xr0,f.r2l),B=E.simpleMap(C.xr1,f.r2l),F=R[1]-R[0],P=B[1]-B[0];N[0]=(R[0]*(1-_)+_*B[0]-R[0])/(R[1]-R[0])*A,N[2]=A*(1-_+_*P/F),f.range[0]=f.l2r(R[0]*(1-_)+_*B[0]),f.range[1]=f.l2r(R[1]*(1-_)+_*B[1])}else N[0]=0,N[2]=A;if(I){var j=E.simpleMap(C.yr0,u.r2l),U=E.simpleMap(C.yr1,u.r2l),Z=j[1]-j[0],Q=U[1]-U[0];N[1]=(j[1]*(1-_)+_*U[1]-j[1])/(j[0]-j[1])*b,N[3]=b*(1-_+_*Q/Z),u.range[0]=f.l2r(j[0]*(1-_)+_*U[0]),u.range[1]=u.l2r(j[1]*(1-_)+_*U[1])}else N[1]=0,N[3]=b;l.drawOne(t,f,{skipTitle:!0}),l.drawOne(t,u,{skipTitle:!0}),l.redrawComponents(t,[f._id,u._id]);var re=z?A/N[2]:1,ae=I?b/N[3]:1,oe=z?N[0]:0,H=I?N[1]:0,X=z?N[0]/N[2]*A:0,K=I?N[1]/N[3]*b:0,G=f._offset-X,Y=u._offset-K;T.clipRect.call(k.setTranslate,oe,H).call(k.setScale,1/re,1/ae),T.plot.call(k.setTranslate,G,Y).call(k.setScale,re,ae),k.setPointGroupScale(T.zoomScalePts,1/re,1/ae),k.setTextPointsScale(T.zoomScaleTxt,1/re,1/ae)}var m;n&&(m=n());function h(){for(var C={},_=0;_r.duration?(h(),w=window.cancelAnimationFrame(M)):w=window.requestAnimationFrame(M)}return g=Date.now(),w=window.requestAnimationFrame(M),Promise.resolve()}}}),Mu=Ee({"src/plots/cartesian/index.js"(J){"use strict";var V=Hn(),v=Ri(),x=Vr(),E=vl(),k=yo(),l=uf().getModuleCalcData,e=Xl(),t=tc(),a=mh(),r=x.ensureSingle;function n(g,i,w){return x.ensureSingle(g,i,w,function(S){S.datum(w)})}var o=t.zindexSeparator;J.name="cartesian",J.attr=["xaxis","yaxis"],J.idRoot=["x","y"],J.idRegex=t.idRegex,J.attrRegex=t.attrRegex,J.attributes=r4(),J.layoutAttributes=Gc(),J.supplyLayoutDefaults=n4(),J.transitionAxes=a4(),J.finalizeSubplots=function(g,i){var w=i._subplots,S=w.xaxis,M=w.yaxis,C=w.cartesian,_=C,T={},f={},u,A,b;for(u=0;u<_.length;u++){var z=_[u].split("y");T[z[0]]=1,f["y"+z[1]]=1}for(u=0;u0){var I=z.id;if(I.indexOf(o)!==-1)continue;I+=o+(u+1),z=x.extendFlat({},z,{id:I,plot:M._cartesianlayer.selectAll(".subplot").select("."+I)})}for(var N=[],R,B=0;B<_.length;B++){var F=_[B],P=F[0].trace;A===(P.zorder||0)&&P.xaxis+P.yaxis===b&&((i.indexOf(P.index)!==-1||P.carpet)&&(R&&R[0].trace.xaxis+R[0].trace.yaxis===b&&["tonextx","tonexty","tonext"].indexOf(P.fill)!==-1&&N.indexOf(R)===-1&&N.push(R),N.push(F)),R=F)}s(g,z,N,w,S)}}};function s(g,i,w,S,M){for(var C=t.traceLayerClasses,_=g._fullLayout,T=_._zindices,f=_._modules,u,A,b,z=[],I=[],N=0;N1&&(Z+=o+U),j.push(T+Z),_=0;_1,b=i.mainplotinfo;if(!i.mainplot||A)if(u)i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.xaxislayer=r(S,"g","xaxislayer-above"),i.yaxislayer=r(S,"g","yaxislayer-above");else{if(!_){var z=r(S,"g","layer-subplot");i.shapelayer=r(z,"g","shapelayer"),i.imagelayer=r(z,"g","imagelayer"),b&&A?(i.minorGridlayer=b.minorGridlayer,i.gridlayer=b.gridlayer,i.zerolinelayer=b.zerolinelayer):(i.minorGridlayer=r(S,"g","minor-gridlayer"),i.gridlayer=r(S,"g","gridlayer"),i.zerolinelayer=r(S,"g","zerolinelayer"));var I=r(S,"g","layer-between");i.shapelayerBetween=r(I,"g","shapelayer"),i.imagelayerBetween=r(I,"g","imagelayer"),r(S,"path","xlines-below"),r(S,"path","ylines-below"),i.overlinesBelow=r(S,"g","overlines-below"),r(S,"g","xaxislayer-below"),r(S,"g","yaxislayer-below"),i.overaxesBelow=r(S,"g","overaxes-below")}i.overplot=r(S,"g","overplot"),i.plot=r(i.overplot,"g",M),b&&A?i.zerolinelayerAbove=b.zerolinelayerAbove:i.zerolinelayerAbove=r(S,"g","zerolinelayer-above"),_||(i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.overlinesAbove=r(S,"g","overlines-above"),r(S,"g","xaxislayer-above"),r(S,"g","yaxislayer-above"),i.overaxesAbove=r(S,"g","overaxes-above"),i.xlines=S.select(".xlines-"+T),i.ylines=S.select(".ylines-"+f),i.xaxislayer=S.select(".xaxislayer-"+T),i.yaxislayer=S.select(".yaxislayer-"+f))}else{var N=b.plotgroup,R=M+"-x",B=M+"-y";i.minorGridlayer=b.minorGridlayer,i.gridlayer=b.gridlayer,i.zerolinelayer=b.zerolinelayer,i.zerolinelayerAbove=b.zerolinelayerAbove,r(b.overlinesBelow,"path",R),r(b.overlinesBelow,"path",B),r(b.overaxesBelow,"g",R),r(b.overaxesBelow,"g",B),i.plot=r(b.overplot,"g",M),r(b.overlinesAbove,"path",R),r(b.overlinesAbove,"path",B),r(b.overaxesAbove,"g",R),r(b.overaxesAbove,"g",B),i.xlines=N.select(".overlines-"+T).select("."+R),i.ylines=N.select(".overlines-"+f).select("."+B),i.xaxislayer=N.select(".overaxes-"+T).select("."+R),i.yaxislayer=N.select(".overaxes-"+f).select("."+B)}_||(u||(n(i.minorGridlayer,"g",i.xaxis._id),n(i.minorGridlayer,"g",i.yaxis._id),i.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),n(i.gridlayer,"g",i.xaxis._id),n(i.gridlayer,"g",i.yaxis._id),i.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),i.xlines.style("fill","none").classed("crisp",!0),i.ylines.style("fill","none").classed("crisp",!0))}function h(g,i){if(g){var w={};g.each(function(f){var u=f[0],A=V.select(this);A.remove(),p(u,i),w[u]=!0});for(var S in i._plots)for(var M=i._plots[S],C=M.overlays||[],_=0;_=0,i=n.indexOf("end")>=0,w=c.backoff*h+o.standoff,S=m.backoff*p+o.startstandoff,M,C,_,T;if(s.nodeName==="line"){M={x:+r.attr("x1"),y:+r.attr("y1")},C={x:+r.attr("x2"),y:+r.attr("y2")};var f=M.x-C.x,u=M.y-C.y;if(_=Math.atan2(u,f),T=_+Math.PI,w&&S&&w+S>Math.sqrt(f*f+u*u)){Z();return}if(w){if(w*w>f*f+u*u){Z();return}var A=w*Math.cos(_),b=w*Math.sin(_);C.x+=A,C.y+=b,r.attr({x2:C.x,y2:C.y})}if(S){if(S*S>f*f+u*u){Z();return}var z=S*Math.cos(_),I=S*Math.sin(_);M.x-=z,M.y-=I,r.attr({x1:M.x,y1:M.y})}}else if(s.nodeName==="path"){var N=s.getTotalLength(),R="";if(N2/3?fr="right":fr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[fr]}for(var Fe=!1,We=["x","y"],Ge=0;Ge1)&&(Tt===mt?(Je=At.r2fraction(S["a"+gt]),(Je<0||Je>1)&&(Fe=!0)):Fe=!0),ht=At._offset+At.r2p(S[gt]),He=.5}else{var Mt=Ze==="domain";gt==="x"?(Be=S[gt],ht=Mt?At._offset+At._length*Be:ht=u.l+u.w*Be):(Be=1-S[gt],ht=Mt?At._offset+At._length*Be:ht=u.t+u.h*Be),He=S.showarrow?.5:Be}if(S.showarrow){vt.head=ht;var dt=S["a"+gt];if($e=nr*Te(.5,S.xanchor)-_r*Te(.5,S.yanchor),Tt===mt){var Dt=e.getRefType(Tt);Dt==="domain"?(gt==="y"&&(dt=1-dt),vt.tail=At._offset+At._length*dt):Dt==="paper"?gt==="y"?(dt=1-dt,vt.tail=u.t+u.h*dt):vt.tail=u.l+u.w*dt:vt.tail=At._offset+At.r2p(dt),Re=$e}else vt.tail=ht+dt,Re=$e+dt;vt.text=vt.tail+$e;var Ct=f[gt==="x"?"width":"height"];if(mt==="paper"&&(vt.head=k.constrain(vt.head,1,Ct-1)),Tt==="pixel"){var Vt=-Math.max(vt.tail-3,vt.text),Ht=Math.min(vt.tail+3,vt.text)-Ct;Vt>0?(vt.tail+=Vt,vt.text+=Vt):Ht>0&&(vt.tail-=Ht,vt.text-=Ht)}vt.tail+=Ot,vt.head+=Ot}else $e=Zt*Te(He,sr),Re=$e,vt.text=ht+$e;vt.text+=Ot,$e+=Ot,Re+=Ot,S["_"+gt+"padplus"]=Zt/2+Re,S["_"+gt+"padminus"]=Zt/2-Re,S["_"+gt+"size"]=Zt,S["_"+gt+"shift"]=$e}if(Fe){oe.remove();return}var Wt=0,Sr=0;if(S.align!=="left"&&(Wt=(ge-qe)*(S.align==="center"?.5:1)),S.valign!=="top"&&(Sr=(ue-ke)*(S.valign==="middle"?.5:1)),Ie)Me.select("svg").attr({x:K+Wt-1,y:K+Sr}).call(a.setClipUrl,Y?F:null,w);else{var on=K+Sr-Ue.top,$t=K+Wt-Ue.left;ne.call(n.positionText,$t,on).call(a.setClipUrl,Y?F:null,w)}q.select("rect").call(a.setRect,K,K,ge,ue),G.call(a.setRect,H/2,H/2,ve-H,se-H),oe.call(a.setTranslate,Math.round(P.x.text-ve/2),Math.round(P.y.text-se/2)),Z.attr({transform:"rotate("+j+","+P.x.text+","+P.y.text+")"});var It=function(cr,fr){U.selectAll(".annotation-arrow-g").remove();var Ir=P.x.head,ln=P.y.head,nn=P.x.tail+cr,wn=P.y.tail+fr,Un=P.x.text+cr,jn=P.y.text+fr,Aa=k.rotationXYMatrix(j,Un,jn),ua=k.apply2DTransform(Aa),Qn=k.apply2DTransform2(Aa),ei=+G.attr("width"),Fa=+G.attr("height"),ai=Un-.5*ei,Mi=ai+ei,ci=jn-.5*Fa,ba=ci+Fa,pa=[[ai,ci,ai,ba],[ai,ba,Mi,ba],[Mi,ba,Mi,ci],[Mi,ci,ai,ci]].map(Qn);if(!pa.reduce(function(at,kt){return at^!!k.segmentsIntersect(Ir,ln,Ir+1e6,ln+1e6,kt[0],kt[1],kt[2],kt[3])},!1)){pa.forEach(function(at){var kt=k.segmentsIntersect(nn,wn,Ir,ln,at[0],at[1],at[2],at[3]);kt&&(nn=kt.x,wn=kt.y)});var Ii=S.arrowwidth,ho=S.arrowcolor,da=S.arrowside,Kn=U.append("g").style({opacity:t.opacity(ho)}).classed("annotation-arrow-g",!0),ot=Kn.append("path").attr("d","M"+nn+","+wn+"L"+Ir+","+ln).style("stroke-width",Ii+"px").call(t.stroke,t.rgb(ho));if(m(ot,da,S),A.annotationPosition&&ot.node().parentNode&&!C){var et=Ir,hr=ln;if(S.standoff){var ur=Math.sqrt(Math.pow(Ir-nn,2)+Math.pow(ln-wn,2));et+=S.standoff*(nn-Ir)/ur,hr+=S.standoff*(wn-ln)/ur}var Tr=Kn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(nn-et)+","+(wn-hr),transform:l(et,hr)}).style("stroke-width",Ii+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),Rr,Fr;s.init({element:Tr.node(),gd:w,prepFn:function(){var at=a.getTranslate(oe);Rr=at.x,Fr=at.y,_&&_.autorange&&N(_._name+".autorange",!0),T&&T.autorange&&N(T._name+".autorange",!0)},moveFn:function(at,kt){var Ut=ua(Rr,Fr),ar=Ut[0]+at,Er=Ut[1]+kt;oe.call(a.setTranslate,ar,Er),R("x",g(_,at,"x",u,S)),R("y",g(T,kt,"y",u,S)),S.axref===S.xref&&R("ax",g(_,at,"ax",u,S)),S.ayref===S.yref&&R("ay",g(T,kt,"ay",u,S)),Kn.attr("transform",l(at,kt)),Z.attr({transform:"rotate("+j+","+ar+","+Er+")"})},doneFn:function(){x.call("_guiRelayout",w,B());var at=document.querySelector(".js-notes-box-panel");at&&at.redraw(at.selectedObj)}})}}};if(S.showarrow&&It(0,0),Q){var ir;s.init({element:oe.node(),gd:w,prepFn:function(){ir=Z.attr("transform")},moveFn:function(cr,fr){var Ir="pointer";if(S.showarrow)S.axref===S.xref?R("ax",g(_,cr,"ax",u,S)):R("ax",S.ax+cr),S.ayref===S.yref?R("ay",g(T,fr,"ay",u.w,S)):R("ay",S.ay+fr),It(cr,fr);else{if(C)return;var ln,nn;if(_)ln=g(_,cr,"x",u,S);else{var wn=S._xsize/u.w,Un=S.x+(S._xshift-S.xshift)/u.w-wn/2;ln=s.align(Un+cr/u.w,wn,0,1,S.xanchor)}if(T)nn=g(T,fr,"y",u,S);else{var jn=S._ysize/u.h,Aa=S.y-(S._yshift+S.yshift)/u.h-jn/2;nn=s.align(Aa-fr/u.h,jn,0,1,S.yanchor)}R("x",ln),R("y",nn),(!_||!T)&&(Ir=s.getCursor(_?.5:ln,T?.5:nn,S.xanchor,S.yanchor))}Z.attr({transform:l(cr,fr)+ir}),o(oe,Ir)},clickFn:function(cr,fr){S.captureevents&&w.emit("plotly_clickannotation",ae(fr))},doneFn:function(){o(oe),x.call("_guiRelayout",w,B());var cr=document.querySelector(".js-notes-box-panel");cr&&cr.redraw(cr.selectedObj)}})}}A.annotationText?ne.call(n.makeEditable,{delegate:oe,gd:w}).call(fe).on("edit",function(xe){S.text=xe,this.call(fe),R("text",xe),_&&_.autorange&&N(_._name+".autorange",!0),T&&T.autorange&&N(T._name+".autorange",!0),x.call("_guiRelayout",w,B())}):ne.call(fe)}}}),s4=Ee({"src/components/annotations/click.js"(J,V){"use strict";var v=Vr(),x=Ri(),E=xs().arrayEditor;V.exports={hasClickToShow:k,onClick:l};function k(a,r){var n=e(a,r);return n.on.length>0||n.explicitOff.length>0}function l(a,r){var n=e(a,r),o=n.on,s=n.off.concat(n.explicitOff),c={},m=a._fullLayout.annotations,h,p;if(o.length||s.length){for(h=0;h1){o=!0;break}}o?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(n._pdata=x(l.glplot.cameraParams,[e.xaxis.r2l(n.x)*t[0],e.yaxis.r2l(n.y)*t[1],e.zaxis.r2l(n.z)*t[2]]),v(l.graphDiv,n,r,l.id,n._xa,n._ya))}}}}),p4=Ee({"src/components/annotations3d/index.js"(J,V){"use strict";var v=Ri(),x=Vr();V.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Kg()}}},layoutAttributes:Kg(),handleDefaults:h4(),includeBasePlot:E,convert:d4(),draw:v4()};function E(k,l){var e=v.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,a=Object.keys(k),r=0;r{var b=A+"anchor",z=A==="x"?w:S,I={_fullLayout:n},N,R,B,F;let P=A+"ref",j=a[P];if(Array.isArray(j)&&j.length>0){let U=l.countDefiningCoords(p,m,A);F=x.coerceRefArray(a,r,I,A,void 0,"paper",U),r["_"+A+"refArray"]=!0}else F=x.coerceRef(a,r,I,A,void 0,"paper");if(Array.isArray(F))F.forEach(function(U){x.getRefType(U)==="range"&&(N=x.getFromId(I,U),N&&N._shapeIndices.indexOf(r._index)===-1&&N._shapeIndices.push(r._index))}),g&&[0,1].forEach(function(U){let Z=F[U];x.getRefType(Z)==="range"?(N=x.getFromId(I,Z),R=l.shapePositionToRange(N),B=l.rangeToShapePosition(N),(N.type==="category"||N.type==="multicategory")&&o(A+U+"shift")):R=B=v.identity;let re=A+U,ae=a[re];if(a[re]=R(a[re],!0),z==="pixel"?o(re,C[U]):x.coercePosition(r,I,o,Z,re,M[U]),r[re]=B(r[re]),a[re]=ae,U===0&&z==="pixel"){let oe=a[b];a[b]=R(a[b],!0),x.coercePosition(r,I,o,Z,b,.25),r[b]=B(r[b]),a[b]=oe}});else{if(x.getRefType(F)==="range"?(N=x.getFromId(I,F),N._shapeIndices.push(r._index),B=l.rangeToShapePosition(N),R=l.shapePositionToRange(N),g&&(N.type==="category"||N.type==="multicategory")&&(o(A+"0shift"),o(A+"1shift"))):R=B=v.identity,g){let Z=A+"0",Q=A+"1",re=a[Z],ae=a[Q];a[Z]=R(a[Z],!0),a[Q]=R(a[Q],!0),z==="pixel"?(o(Z,C[0]),o(Q,C[1])):(x.coercePosition(r,I,o,F,Z,M[0]),x.coercePosition(r,I,o,F,Q,M[1])),r[Z]=B(r[Z]),r[Q]=B(r[Q]),a[Z]=re,a[Q]=ae}if(z==="pixel"){let Z=a[b];a[b]=R(a[b],!0),x.coercePosition(r,I,o,F,b,.25),r[b]=B(r[b]),a[b]=Z}}}),g&&v.noneOrAll(a,r,["x0","x1","y0","y1"]);var _=p==="line",T,f;if(g&&(T=o("label.texttemplate"),o("label.texttemplatefallback")),T||(f=o("label.text")),f||T){o("label.textangle");var u=o("label.textposition",_?"middle":"middle center");o("label.xanchor"),o("label.yanchor",e(_,u)),o("label.padding"),v.coerceFont(o,"label.font",n.font)}}}}),g4=Ee({"src/components/shapes/draw_newshape/defaults.js"(J,V){"use strict";var v=Qa(),x=Vr();function E(k,l){return k?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}V.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),x.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var a=t("newshape.line.width");if(a){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",v.contrast(r)),t("newshape.line.dash")}var n=l.dragmode==="drawline",o=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),o||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",n?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",E(n,c)),t("newshape.label.padding"),x.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),y4=Ee({"src/components/shapes/calc_autorange.js"(J,V){"use strict";var v=Vr(),x=uo(),E=G0(),k=Zd();V.exports=function(o){var s=o._fullLayout,c=v.filterVisible(s.shapes);if(!(!c.length||!o._fullData.length))for(var m=0;m{p=x.getFromId(o,M),h._extremes[p._id]=x.findExtremes(p,C,e(h))})}else h.xref!=="paper"&&i!=="domain"&&(p=x.getFromId(o,h.xref),g=r(p,h,E.paramIsX),g&&(h._extremes[p._id]=x.findExtremes(p,g,e(h))));if(w==="array"){let S=l(o,h,"y");Object.entries(S).forEach(([M,C])=>{p=x.getFromId(o,M),h._extremes[p._id]=x.findExtremes(p,C,t(h))})}else h.yref!=="paper"&&w!=="domain"&&(p=x.getFromId(o,h.yref),g=r(p,h,E.paramIsY),g&&(h._extremes[p._id]=x.findExtremes(p,g,t(h))))}};function l(n,o,s){let c=o[s+"ref"],m=s==="x"?E.paramIsX:E.paramIsY;function h(M,C){M==="paper"||x.getRefType(M)==="domain"||(p[M]||(p[M]=[]),p[M].push(C))}let p={};if(o.type==="path"&&o.path){let M=o.path.match(E.segmentRE)||[];for(var g=0,i=0;iT&&(h(c[g],f[T]),g++)}}else h(c[0],o[s+"0"]),h(c[1],o[s+"1"]);let w={};for(let M in p){let C=x.getFromId(n,M);if(C){var S=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(S=k.decodeDate(S)),w[C._id]=p[M].map(S)}}return w}function e(n){return a(n.line.width,n.xsizemode,n.x0,n.x1,n.path,!1)}function t(n){return a(n.line.width,n.ysizemode,n.y0,n.y1,n.path,!0)}function a(n,o,s,c,m,h){var p=n/2,g=h;if(o==="pixel"){var i=m?k.extractPathCoords(m,h?E.paramIsY:E.paramIsX):[s,c],w=v.aggNums(Math.max,null,i),S=v.aggNums(Math.min,null,i),M=S<0?Math.abs(S)+p:p,C=w>0?w+p:p;return{ppad:p,ppadplus:g?M:C,ppadminus:g?C:M}}else return{ppad:p}}function r(n,o,s){var c=n._id.charAt(0)==="x"?"x":"y",m=n.type==="category"||n.type==="multicategory",h,p,g=0,i=0,w=m?n.r2c:n.d2c,S=o[c+"sizemode"]==="scaled";if(S?(h=o[c+"0"],p=o[c+"1"],m&&(g=o[c+"0shift"],i=o[c+"1shift"])):(h=o[c+"anchor"],p=o[c+"anchor"]),h!==void 0)return[w(h)+g,w(p)+i];if(o.path){var M=1/0,C=-1/0,_=o.path.match(E.segmentRE),T,f,u,A,b;for(n.type==="date"&&(w=k.decodeDate(w)),T=0;T<_.length;T++)f=_[T],u=s[f.charAt(0)].drawn,u!==void 0&&(A=_[T].slice(1).match(E.paramRE),!(!A||A.lengthC&&(C=b)));if(C>=M)return[M,C]}}}}),_4=Ee({"src/components/shapes/index.js"(J,V){"use strict";var v=Ug();V.exports={moduleType:"component",name:"shapes",layoutAttributes:hx(),supplyLayoutDefaults:m4(),supplyDrawNewShapeDefaults:g4(),includeBasePlot:$0()("shapes"),calcAutorange:y4(),draw:v.draw,drawOne:v.drawOne}}}),dx=Ee({"src/components/images/attributes.js"(J,V){"use strict";var v=tc(),x=xs().templatedArray,E=X0();V.exports=x("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",v.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",v.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),b4=Ee({"src/components/images/defaults.js"(J,V){"use strict";var v=Vr(),x=uo(),E=Mf(),k=dx(),l="images";V.exports=function(a,r){var n={name:l,handleItemDefaults:e};E(a,r,n)};function e(t,a,r){function n(w,S){return v.coerce(t,a,k,w,S)}var o=n("source"),s=n("visible",!!o);if(!s)return a;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var c={_fullLayout:r},m=["x","y"],h=0;h<2;h++){var p=m[h],g=x.coerceRef(t,a,c,p,"paper",void 0);if(g!=="paper"){var i=x.getFromId(c,g);i._imgIndices.push(a._index)}x.coercePosition(a,c,n,g,p,0)}return a}}}),x4=Ee({"src/components/images/draw.js"(J,V){"use strict";var v=Hn(),x=yo(),E=uo(),k=Xl(),l=mh();V.exports=function(t){var a=t._fullLayout,r=[],n={},o=[],s,c;for(c=0;c0);m&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),v.noneOrAll(r,n,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),v.coerceFont(s,"font",o.font),s("bgcolor",o.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function a(r,n){function o(c,m){return v.coerce(r,n,e,c,m)}var s=o("visible",r.method==="skip"||Array.isArray(r.args));s&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),M4=Ee({"src/components/updatemenus/scrollbox.js"(J,V){"use strict";V.exports=l;var v=Hn(),x=Qa(),E=yo(),k=Vr();function l(e,t,a){this.gd=e,this.container=t,this.id=a,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,a,r){var n=this.gd._fullLayout,o=n.width,s=n.height;this.position=t;var c=this.position.l,m=this.position.w,h=this.position.t,p=this.position.h,g=this.position.direction,i=g==="down",w=g==="left",S=g==="right",M=g==="up",C=m,_=p,T,f,u,A;!i&&!w&&!S&&!M&&(this.position.direction="down",i=!0);var b=i||M;b?(T=c,f=T+C,i?(u=h,A=Math.min(u+_,s),_=A-u):(A=h+_,u=Math.max(A-_,0),_=A-u)):(u=h,A=u+_,w?(f=c+C,T=Math.max(f-C,0),C=f-T):(T=c,f=Math.min(T+C,o),C=f-T)),this._box={l:T,t:u,w:C,h:_};var z=m>C,I=l.barLength+2*l.barPad,N=l.barWidth+2*l.barPad,R=c,B=h+p;B+N>s&&(B=s-N);var F=this.container.selectAll("rect.scrollbar-horizontal").data(z?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(x.fill,l.barColor),z?(this.hbar=F.attr({rx:l.barRadius,ry:l.barRadius,x:R,y:B,width:I,height:N}),this._hbarXMin=R+I/2,this._hbarTranslateMax=C-I):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=p>_,j=l.barWidth+2*l.barPad,U=l.barLength+2*l.barPad,Z=c+m,Q=h;Z+j>o&&(Z=o-j);var re=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);re.exit().on(".drag",null).remove(),re.enter().append("rect").classed("scrollbar-vertical",!0).call(x.fill,l.barColor),P?(this.vbar=re.attr({rx:l.barRadius,ry:l.barRadius,x:Z,y:Q,width:j,height:U}),this._vbarYMin=Q+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ae=this.id,oe=T-.5,H=P?f+j+.5:f+.5,X=u-.5,K=z?A+N+.5:A+.5,G=n._topdefs.selectAll("#"+ae).data(z||P?[0]:[]);if(G.exit().remove(),G.enter().append("clipPath").attr("id",ae).append("rect"),z||P?(this._clipRect=G.select("rect").attr({x:Math.floor(oe),y:Math.floor(X),width:Math.ceil(H)-Math.floor(oe),height:Math.ceil(K)-Math.floor(X)}),this.container.call(E.setClipUrl,ae,this.gd),this.bg.attr({x:c,y:h,width:m,height:p})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),z||P){var Y=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var q=v.behavior.drag().on("dragstart",function(){v.event.sourceEvent.preventDefault(),v.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));z&&this.hbar.on(".drag",null).call(q),P&&this.vbar.on(".drag",null).call(q)}this.setTranslate(a,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.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)},l.prototype._onBoxDrag=function(){var t=this.translateX,a=this.translateY;this.hbar&&(t-=v.event.dx),this.vbar&&(a-=v.event.dy),this.setTranslate(t,a)},l.prototype._onBoxWheel=function(){var t=this.translateX,a=this.translateY;this.hbar&&(t+=v.event.deltaY),this.vbar&&(a+=v.event.deltaY),this.setTranslate(t,a)},l.prototype._onBarDrag=function(){var t=this.translateX,a=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax,o=k.constrain(v.event.x,r,n),s=(o-r)/(n-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var m=a+this._vbarYMin,h=m+this._vbarTranslateMax,p=k.constrain(v.event.y,m,h),g=(p-m)/(h-m),i=this.position.h-this._box.h;a=g*i}this.setTranslate(t,a)},l.prototype.setTranslate=function(t,a){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=k.constrain(t||0,0,r),a=k.constrain(a||0,0,n),this.translateX=t,this.translateY=a,this.container.call(E.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-a),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+a-.5)}),this.hbar){var o=t/r;this.hbar.call(E.setTranslate,t+o*this._hbarTranslateMax,a)}if(this.vbar){var s=a/n;this.vbar.call(E.setTranslate,t,a+s*this._vbarTranslateMax)}}}}),S4=Ee({"src/components/updatemenus/draw.js"(J,V){"use strict";var v=Hn(),x=vl(),E=Qa(),k=yo(),l=Vr(),e=Fs(),t=xs().arrayEditor,a=rc().LINE_SPACING,r=Jg(),n=M4();V.exports=function(I){var N=I._fullLayout,R=l.filterVisible(N[r.name]);function B(ae){x.autoMargin(I,u(ae))}var F=N._menulayer.selectAll("g."+r.containerClassName).data(R.length>0?[0]:[]);if(F.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),F.exit().each(function(){v.select(this).selectAll("g."+r.headerGroupClassName).each(B)}).remove(),R.length!==0){var P=F.selectAll("g."+r.headerGroupClassName).data(R,o);P.enter().append("g").classed(r.headerGroupClassName,!0);for(var j=l.ensureSingle(F,"g",r.dropdownButtonGroupClassName,function(ae){ae.style("pointer-events","all")}),U=0;U0?[0]:[]);Z.enter().append("g").classed(r.containerClassName,!0).style("cursor",P?null:"ew-resize");function Q(H){H._commandObserver&&(H._commandObserver.remove(),delete H._commandObserver),x.autoMargin(F,m(H))}if(Z.exit().each(function(){v.select(this).selectAll("g."+r.groupClassName).each(Q)}).remove(),U.length!==0){var re=Z.selectAll("g."+r.groupClassName).data(U,p);re.enter().append("g").classed(r.groupClassName,!0),re.exit().each(Q).remove();for(var ae=0;ae0&&(re=re.transition().duration(F.transition.duration).ease(F.transition.easing)),re.attr("transform",e(Q-r.gripWidth*.5,F._dims.currentValueTotalHeight))}}function z(B,F){var P=B._dims;return P.inputAreaStart+r.stepInset+(P.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,F))}function I(B,F){var P=B._dims;return Math.min(1,Math.max(0,(F-r.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*r.stepInset-2*P.inputAreaStart)))}function N(B,F,P){var j=P._dims,U=l.ensureSingle(B,"rect",r.railTouchRectClass,function(Z){Z.call(f,F,B,P).style("pointer-events","all")});U.attr({width:j.inputAreaLength,height:Math.max(j.inputAreaWidth,r.tickOffset+P.ticklen+j.labelHeight)}).call(E.fill,P.bgcolor).attr("opacity",0),k.setTranslate(U,0,j.currentValueTotalHeight)}function R(B,F){var P=F._dims,j=P.inputAreaLength-r.railInset*2,U=l.ensureSingle(B,"rect",r.railRectClass);U.attr({width:j,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(E.stroke,F.bordercolor).call(E.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),k.setTranslate(U,r.railInset,(P.inputAreaWidth-r.railWidth)*.5+P.currentValueTotalHeight)}}}),L4=Ee({"src/components/sliders/index.js"(J,V){"use strict";var v=J0();V.exports={moduleType:"component",name:v.name,layoutAttributes:px(),supplyLayoutDefaults:k4(),draw:C4()}}}),Qg=Ee({"src/components/rangeslider/attributes.js"(J,V){"use strict";var v=rs();V.exports={bgcolor:{valType:"color",dflt:v.background,editType:"plot"},bordercolor:{valType:"color",dflt:v.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}}),mx=Ee({"src/components/rangeslider/oppaxis_attributes.js"(J,V){"use strict";V.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}}),e1=Ee({"src/components/rangeslider/constants.js"(J,V){"use strict";V.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),P4=Ee({"src/components/rangeslider/helpers.js"(J){"use strict";var V=Xl(),v=Fs(),x=e1(),E=rc().LINE_SPACING,k=x.name;function l(e){var t=e&&e[k];return t&&t.visible}J.isVisible=l,J.makeData=function(e){for(var t=V.list({_fullLayout:e},"x",!0),a=e.margin,r=[],n=0;n=qe.max)Ie=fe[Ue+1];else if(Me=qe.pmax)Ie=fe[Ue+1];else if(Me0?f.touches[0].clientX:0}function h(f,u,A,b){if(u._context.staticPlot)return;var z=f.select("rect."+c.slideBoxClassName).node(),I=f.select("rect."+c.grabAreaMinClassName).node(),N=f.select("rect."+c.grabAreaMaxClassName).node();function R(){var B=v.event,F=B.target,P=m(B),j=P-f.node().getBoundingClientRect().left,U=b.d2p(A._rl[0]),Z=b.d2p(A._rl[1]),Q=o.coverSlip();this.addEventListener("touchmove",re),this.addEventListener("touchend",ae),Q.addEventListener("mousemove",re),Q.addEventListener("mouseup",ae);function re(oe){var H=m(oe),X=+H-P,K,G,Y;switch(F){case z:if(Y="ew-resize",U+X>A._length||Z+X<0)return;K=U+X,G=Z+X;break;case I:if(Y="col-resize",U+X>A._length)return;K=U+X,G=Z;break;case N:if(Y="col-resize",Z+X<0)return;K=U,G=Z+X;break;default:Y="ew-resize",K=j,G=j+X;break}if(G0);if(w){var S=a(o,s,c);g("x",S[0]),g("y",S[1]),v.noneOrAll(n,o,["x","y"]),g("xanchor"),g("yanchor"),v.coerceFont(g,"font",s.font);var M=g("bgcolor");g("activecolor",x.contrast(M,e.lightAmount,e.darkAmount)),g("bordercolor"),g("borderwidth")}};function t(r,n,o,s){var c=s.calendar;function m(g,i){return v.coerce(r,n,l.buttons,g,i)}var h=m("visible");if(h){var p=m("step");p!=="all"&&(c&&c!=="gregorian"&&(p==="month"||p==="year")?n.stepmode="backward":m("stepmode"),m("count")),m("label")}}function a(r,n,o){for(var s=o.filter(function(p){return n[p].anchor===r._id}),c=0,m=0;m1)){delete c.grid;return}if(!g&&!i&&!w){var A=T("pattern")==="independent";A&&(g=!0)}_._hasSubplotGrid=g;var b=T("roworder"),z=b==="top to bottom",I=g?.2:.1,N=g?.3:.1,R,B;S&&c._splomGridDflt&&(R=c._splomGridDflt.xside,B=c._splomGridDflt.yside),_._domains={x:r("x",T,I,R,u),y:r("y",T,N,B,f,z)}}function r(s,c,m,h,p,g){var i=c(s+"gap",m),w=c("domain."+s);c(s+"side",h);for(var S=new Array(p),M=w[0],C=(w[1]-M)/(p-i),_=C*(1-i),T=0;T0,h=t._context.staticPlot;a.each(function(p){var g=p[0].trace,i=g.error_x||{},w=g.error_y||{},S;g.ids&&(S=function(T){return T.id});var M=k.hasMarkers(g)&&g.marker.maxdisplayed>0;!w.visible&&!i.visible&&(p=[]);var C=v.select(this).selectAll("g.errorbar").data(p,S);if(C.exit().remove(),!!p.length){i.visible||C.selectAll("path.xerror").remove(),w.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var _=C.enter().append("g").classed("errorbar",!0);m&&_.style("opacity",0).transition().duration(n.duration).style("opacity",1),E.setClipUrl(C,r.layerClipId,t),C.each(function(T){var f=v.select(this),u=l(T,s,c);if(!(M&&!T.vis)){var A,b=f.select("path.yerror");if(w.visible&&x(u.x)&&x(u.yh)&&x(u.ys)){var z=w.width;A="M"+(u.x-z)+","+u.yh+"h"+2*z+"m-"+z+",0V"+u.ys,u.noYS||(A+="m-"+z+",0h"+2*z),o=!b.size(),o?b=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0):m&&(b=b.transition().duration(n.duration).ease(n.easing)),b.attr("d",A)}else b.remove();var I=f.select("path.xerror");if(i.visible&&x(u.y)&&x(u.xh)&&x(u.xs)){var N=(i.copy_ystyle?w:i).width;A="M"+u.xh+","+(u.y-N)+"v"+2*N+"m0,-"+N+"H"+u.xs,u.noXS||(A+="m0,-"+N+"v"+2*N),o=!I.size(),o?I=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0):m&&(I=I.transition().duration(n.duration).ease(n.easing)),I.attr("d",A)}else I.remove()}})}})};function l(e,t,a){var r={x:t.c2p(e.x),y:a.c2p(e.y)};return e.yh!==void 0&&(r.yh=a.c2p(e.yh),r.ys=a.c2p(e.ys),x(r.ys)||(r.noYS=!0,r.ys=a.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),x(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),V4=Ee({"src/components/errorbars/style.js"(J,V){"use strict";var v=Hn(),x=Qa();V.exports=function(k){k.each(function(l){var e=l[0].trace,t=e.error_y||{},a=e.error_x||{},r=v.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(x.stroke,t.color),a.copy_ystyle&&(a=t),r.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(x.stroke,a.color)})}}}),H4=Ee({"src/components/errorbars/index.js"(J,V){"use strict";var v=Vr(),x=El().overrideAll,E=_x(),k={error_x:v.extendFlat({},E),error_y:v.extendFlat({},E)};delete k.error_x.copy_zstyle,delete k.error_y.copy_zstyle,delete k.error_y.copy_ystyle;var l={error_x:v.extendFlat({},E),error_y:v.extendFlat({},E),error_z:v.extendFlat({},E)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,V.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:k,bar:k,histogram:k,scatter3d:x(l,"calc","nested"),scattergl:x(k,"calc","nested")}},supplyDefaults:j4(),calc:U4(),makeComputeError:bx(),plot:q4(),style:V4(),hoverInfo:e};function e(t,a,r){(a.error_y||{}).visible&&(r.yerr=t.yh-t.y,a.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(a.error_x||{}).visible&&(r.xerr=t.xh-t.x,a.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),G4=Ee({"src/components/colorbar/constants.js"(J,V){"use strict";V.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),W4=Ee({"src/components/colorbar/draw.js"(J,V){"use strict";var v=Hn(),x=vl(),E=Ri(),k=uo(),l=qf(),e=Vr(),t=e.strTranslate,a=vo().extendFlat,r=Dh(),n=yo(),o=Qa(),s=Lv(),c=Fs(),m=cf().flipScale,h=K0(),p=$g(),g=Gc(),i=rc(),w=i.LINE_SPACING,S=i.FROM_TL,M=i.FROM_BR,C=G4().cn;function _(N){var R=N._fullLayout,B=R._infolayer.selectAll("g."+C.colorbar).data(T(N),function(F){return F._id});B.enter().append("g").attr("class",function(F){return F._id}).classed(C.colorbar,!0),B.each(function(F){var P=v.select(this);e.ensureSingle(P,"rect",C.cbbg),e.ensureSingle(P,"g",C.cbfills),e.ensureSingle(P,"g",C.cblines),e.ensureSingle(P,"g",C.cbaxis,function(U){U.classed(C.crisp,!0)}),e.ensureSingle(P,"g",C.cbtitleunshift,function(U){U.append("g").classed(C.cbtitle,!0)}),e.ensureSingle(P,"rect",C.cboutline);var j=A(P,F,N);j&&j.then&&(N._promises||[]).push(j),N._context.edits.colorbarPosition&&b(P,F,N)}),B.exit().each(function(F){x.autoMargin(N,F._id)}).remove(),B.order()}function T(N){var R=N._fullLayout,B=N.calcdata,F=[],P,j,U,Z;function Q(ee){return a(ee,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof Z.calc=="function"?Z.calc(N,U,P):(P._fillgradient=j.reversescale?m(j.colorscale):j.colorscale,P._zrange=[j[Z.min],j[Z.max]])}for(var ae=0;ae[Math.min(N[0]+R,N[1]),N[1]],u=(N,R)=>[N[0],Math.max(N[1]-R,N[0])];function A(N,R,B){var F=R.orientation==="v",P=R.len,j=R.lenmode,U=R.thickness,Z=R.thicknessmode,Q=R.outlinewidth,re=R.borderwidth,ae=R.bgcolor,oe=R.xanchor,H=R.yanchor,X=R.xpad,K=R.ypad,G=R.x,Y=F?R.y:1-R.y,q=R.yref==="paper",$=R.xref==="paper",ee=B._fullLayout,ne=ee._size,fe=R._fillcolor,ye=R._line,xe=R.title,Ae=xe.side,Me=R._zrange||v.extent((typeof fe=="function"?fe:ye.color).domain()),Ie=typeof ye.color=="function"?ye.color:function(){return ye.color},Ue=typeof fe=="function"?fe:function(){return fe},qe=R._levels,ke=z(B,R,Me),ge=ke.fill,ue=ke.line,ve=Math.round(U*(Z==="fraction"?F?ne.w:ne.h:1)),se=ve/(F?ne.w:ne.h),Te=Math.round(P*(j==="fraction"?F?ne.h:ne.w:1)),Fe=Te/(F?ne.h:ne.w),We=$?ne.w:B._fullLayout.width,Ge=q?ne.h:B._fullLayout.height,gt=Math.round(F?G*We+X:Y*Ge+K),mt={center:.5,right:1}[oe]||0,Tt={top:1,middle:.5}[H]||0,At=F?G-mt*se:Y-Tt*se,Kt=F?Y-Tt*Fe:G-mt*Fe,nr=Math.round(F?Ge*(1-Kt):We*Kt);R._lenFrac=Fe,R._thickFrac=se,R._uFrac=At,R._vFrac=Kt;var _r=R._axis=I(B,R,Me);_r.position=se+(F?G+X/ne.w:Y+K/ne.h);var Zt=["top","bottom"].indexOf(Ae)!==-1;if(F&&Zt&&(_r.title.side=Ae,_r.titlex=G+X/ne.w,_r.titley=Kt+(xe.side==="top"?Fe-K/ne.h:K/ne.h)),!F&&!Zt&&(_r.title.side=Ae,_r.titley=Y+K/ne.h,_r.titlex=Kt+X/ne.w),ye.color&&R.tickmode==="auto"){_r.tickmode="linear",_r.tick0=qe.start;var sr=qe.size,Ot=e.constrain(Te/50,4,15)+1,vt=(Me[1]-Me[0])/((R.nticks||Ot)*sr);if(vt>1){var ht=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));sr*=ht*e.roundUp(vt/ht,[2,5,10]),(Math.abs(qe.start)/qe.size+1e-6)%1<2e-6&&(_r.tick0=0)}_r.dtick=sr}var Re=F?K/ne.h:X/ne.w;_r.domain=u(f([Kt,Kt+Fe],Re),Re),_r.setScale(),N.attr("transform",t(Math.round(ne.l),Math.round(ne.t)));var Be=N.select("."+C.cbtitleunshift).attr("transform",t(-Math.round(ne.l),-Math.round(ne.t))),He=_r.ticklabelposition,$e=_r.title.font.size,Ze=N.select("."+C.cbaxis),Je,Mt=0,dt=0;function Dt(Sr,on){var $t={propContainer:_r,propName:R._propPrefix+"title.text",traceIndex:R._traceIndex,_meta:R._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:N.select("."+C.cbtitle)},It=Sr.charAt(0)==="h"?Sr.slice(1):"h"+Sr;N.selectAll("."+It+",."+It+"-math-group").remove(),s.draw(B,Sr,a($t,on||{}))}function Ct(){if(F&&Zt||!F&&!Zt){var Sr,on;Ae==="top"&&(Sr=X+ne.l+We*G,on=K+ne.t+Ge*(1-Kt-Fe)+3+$e*.75),Ae==="bottom"&&(Sr=X+ne.l+We*G,on=K+ne.t+Ge*(1-Kt)-3-$e*.25),Ae==="right"&&(on=K+ne.t+Ge*Y+3+$e*.75,Sr=X+ne.l+We*Kt),Dt(_r._id+"title",{attributes:{x:Sr,y:on,"text-anchor":F?"start":"middle"}})}}function Vt(){if(F&&!Zt||!F&&Zt){var Sr=_r.position||0,on=_r._offset+_r._length/2,$t,It;if(Ae==="right")It=on,$t=ne.l+We*Sr+10+$e*(_r.showticklabels?1:.5);else if($t=on,Ae==="bottom"&&(It=ne.t+Ge*Sr+10+(He.indexOf("inside")===-1?_r.tickfont.size:0)+(_r.ticks!=="inside"&&R.ticklen||0)),Ae==="top"){var ir=xe.text.split("
").length;It=ne.t+Ge*Sr+10-ve-w*$e*ir}Dt((F?"h":"v")+_r._id+"title",{avoid:{selection:v.select(B).selectAll("g."+_r._id+"tick"),side:Ae,offsetTop:F?0:ne.t,offsetLeft:F?ne.l:0,maxShift:F?ee.width:ee.height},attributes:{x:$t,y:It,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}}function Ht(){if(!F&&!Zt||F&&Zt){var Sr=N.select("."+C.cbtitle),on=Sr.select("text"),$t=[-Q/2,Q/2],It=Sr.select(".h"+_r._id+"title-math-group").node(),ir=15.6;on.node()&&(ir=parseInt(on.node().style.fontSize,10)*w);var cr;if(It?(cr=n.bBox(It),dt=cr.width,Mt=cr.height,Mt>ir&&($t[1]-=(Mt-ir)/2)):on.node()&&!on.classed(C.jsPlaceholder)&&(cr=n.bBox(on.node()),dt=cr.width,Mt=cr.height),F){if(Mt){if(Mt+=5,Ae==="top")_r.domain=u(_r.domain,Mt/ne.h),$t[1]*=-1;else{_r.domain=f(_r.domain,Mt/ne.h);var fr=c.lineCount(on);$t[1]+=(1-fr)*ir}Sr.attr("transform",t($t[0],$t[1])),_r.setScale()}}else dt&&(Ae==="right"&&(_r.domain=f(_r.domain,(dt+$e/2)/ne.w)),Sr.attr("transform",t($t[0],$t[1])),_r.setScale())}N.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",F?t(0,Math.round(ne.h*(1-_r.domain[1]))):t(Math.round(ne.w*_r.domain[0]),0)),Ze.attr("transform",F?t(0,Math.round(-ne.t)):t(Math.round(-ne.l),0));var Ir=N.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(ge);Ir.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Ir.exit().remove();var ln=Me.map(_r.c2p).map(Math.round).sort(function(Aa,ua){return Aa-ua});Ir.each(function(Aa,ua){var Qn=[ua===0?Me[0]:(ge[ua]+ge[ua-1])/2,ua===ge.length-1?Me[1]:(ge[ua]+ge[ua+1])/2].map(_r.c2p).map(Math.round);F&&(Qn[1]=e.constrain(Qn[1]+(Qn[1]>Qn[0])?1:-1,ln[0],ln[1]));var ei=v.select(this).attr(F?"x":"y",gt).attr(F?"y":"x",v.min(Qn)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(v.max(Qn)-v.min(Qn),2));if(R._fillgradient)n.gradient(ei,B,R._id,F?"vertical":"horizontalreversed",R._fillgradient,"fill");else{var Fa=Ue(Aa).replace("e-","");ei.attr("fill",o.hexString(Fa))}});var nn=N.select("."+C.cblines).selectAll("path."+C.cbline).data(ye.color&&ye.width?ue:[]);nn.enter().append("path").classed(C.cbline,!0),nn.exit().remove(),nn.each(function(Aa){var ua=gt,Qn=Math.round(_r.c2p(Aa))+ye.width/2%1;v.select(this).attr("d","M"+(F?ua+","+Qn:Qn+","+ua)+(F?"h":"v")+ve).call(n.lineGroupStyle,ye.width,Ie(Aa),ye.dash)}),Ze.selectAll("g."+_r._id+"tick,path").remove();var wn=gt+ve+(Q||0)/2-(R.ticks==="outside"?1:0),Un=k.calcTicks(_r),jn=k.getTickSigns(_r)[2];return k.drawTicks(B,_r,{vals:_r.ticks==="inside"?k.clipEnds(_r,Un):Un,layer:Ze,path:k.makeTickPath(_r,wn,jn),transFn:k.makeTransTickFn(_r)}),k.drawLabels(B,_r,{vals:Un,layer:Ze,transFn:k.makeTransTickLabelFn(_r),labelFns:k.makeLabelFns(_r,wn)})}function Wt(){var Sr,on=ve+Q/2;He.indexOf("inside")===-1&&(Sr=n.bBox(Ze.node()),on+=F?Sr.width:Sr.height),Je=Be.select("text");var $t=0,It=F&&Ae==="top",ir=!F&&Ae==="right",cr=0;if(Je.node()&&!Je.classed(C.jsPlaceholder)){var fr,Ir=Be.select(".h"+_r._id+"title-math-group").node();Ir&&(F&&Zt||!F&&!Zt)?(Sr=n.bBox(Ir),$t=Sr.width,fr=Sr.height):(Sr=n.bBox(Be.node()),$t=Sr.right-ne.l-(F?gt:nr),fr=Sr.bottom-ne.t-(F?nr:gt),!F&&Ae==="top"&&(on+=Sr.height,cr=Sr.height)),ir&&(Je.attr("transform",t($t/2+$e/2,0)),$t*=2),on=Math.max(on,F?$t:fr)}var ln=(F?X:K)*2+on+re+Q/2,nn=0;!F&&xe.text&&H==="bottom"&&Y<=0&&(nn=ln/2,ln+=nn,cr+=nn),ee._hColorbarMoveTitle=nn,ee._hColorbarMoveCBTitle=cr;var wn=re+Q,Un=(F?gt:nr)-wn/2-(F?X:0),jn=(F?nr:gt)-(F?Te:K+cr-nn);N.select("."+C.cbbg).attr("x",Un).attr("y",jn).attr(F?"width":"height",Math.max(ln-nn,2)).attr(F?"height":"width",Math.max(Te+wn,2)).call(o.fill,ae).call(o.stroke,R.bordercolor).style("stroke-width",re);var Aa=ir?Math.max($t-10,0):0;N.selectAll("."+C.cboutline).attr("x",(F?gt:nr+X)+Aa).attr("y",(F?nr+K-Te:gt)+(It?Mt:0)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(Te-(F?2*K+Mt:2*X+Aa),2)).call(o.stroke,R.outlinecolor).style({fill:"none","stroke-width":Q});var ua=F?mt*ln:0,Qn=F?0:(1-Tt)*ln-cr;if(ua=$?ne.l-ua:-ua,Qn=q?ne.t-Qn:-Qn,N.attr("transform",t(ua,Qn)),!F&&(re||o.opacity(ae)&&!o.equals(ee.paper_bgcolor,ae))){var ei=Ze.selectAll("text"),Fa=ei[0].length,ai=N.select("."+C.cbbg).node(),Mi=n.bBox(ai),ci=n.getTranslate(N),ba=2;ei.each(function(Tr,Rr){var Fr=0,at=Fa-1;if(Rr===Fr||Rr===at){var kt=n.bBox(this),Ut=n.getTranslate(this),ar;if(Rr===at){var Er=kt.right+Ut.x,br=Mi.right+ci.x+nr-re-ba+G;ar=br-Er,ar>0&&(ar=0)}else if(Rr===Fr){var Or=kt.left+Ut.x,Pr=Mi.left+ci.x+nr+re+ba;ar=Pr-Or,ar<0&&(ar=0)}ar&&(Fa<3?this.setAttribute("transform","translate("+ar+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var pa={},Ii=S[oe],ho=M[oe],da=S[H],Kn=M[H],ot=ln-ve;F?(j==="pixels"?(pa.y=Y,pa.t=Te*da,pa.b=Te*Kn):(pa.t=pa.b=0,pa.yt=Y+P*da,pa.yb=Y-P*Kn),Z==="pixels"?(pa.x=G,pa.l=ln*Ii,pa.r=ln*ho):(pa.l=ot*Ii,pa.r=ot*ho,pa.xl=G-U*Ii,pa.xr=G+U*ho)):(j==="pixels"?(pa.x=G,pa.l=Te*Ii,pa.r=Te*ho):(pa.l=pa.r=0,pa.xl=G+P*Ii,pa.xr=G-P*ho),Z==="pixels"?(pa.y=1-Y,pa.t=ln*da,pa.b=ln*Kn):(pa.t=ot*da,pa.b=ot*Kn,pa.yt=Y-U*da,pa.yb=Y+U*Kn));var et=R.y<.5?"b":"t",hr=R.x<.5?"l":"r";B._fullLayout._reservedMargin[R._id]={};var ur={r:ee.width-Un-ua,l:Un+pa.r,b:ee.height-jn-Qn,t:jn+pa.b};$&&q?x.autoMargin(B,R._id,pa):$?B._fullLayout._reservedMargin[R._id][et]=ur[et]:q||F?B._fullLayout._reservedMargin[R._id][hr]=ur[hr]:B._fullLayout._reservedMargin[R._id][et]=ur[et]}return e.syncOrAsync([x.previousPromises,Ct,Ht,Vt,x.previousPromises,Wt],B)}function b(N,R,B){var F=R.orientation==="v",P=B._fullLayout,j=P._size,U,Z,Q;l.init({element:N.node(),gd:B,prepFn:function(){U=N.attr("transform"),r(N)},moveFn:function(re,ae){N.attr("transform",U+t(re,ae)),Z=l.align((F?R._uFrac:R._vFrac)+re/j.w,F?R._thickFrac:R._lenFrac,0,1,R.xanchor),Q=l.align((F?R._vFrac:1-R._uFrac)-ae/j.h,F?R._lenFrac:R._thickFrac,0,1,R.yanchor);var oe=l.getCursor(Z,Q,R.xanchor,R.yanchor);r(N,oe)},doneFn:function(){if(r(N),Z!==void 0&&Q!==void 0){var re={};re[R._propPrefix+"x"]=Z,re[R._propPrefix+"y"]=Q,R._traceIndex!==void 0?E.call("_guiRestyle",B,re,R._traceIndex):E.call("_guiRelayout",B,re)}}})}function z(N,R,B){var F=R._levels,P=[],j=[],U,Z,Q=F.end+F.size/100,re=F.size,ae=1.001*B[0]-.001*B[1],oe=1.001*B[1]-.001*B[0];for(Z=0;Z<1e5&&(U=F.start+Z*re,!(re>0?U>=Q:U<=Q));Z++)U>ae&&U0?U>=Q:U<=Q));Z++)U>B[0]&&U-1}V.exports=function(a,r){var n,o=a.data,s=a.layout,c=k([],o),m=k({},s,l(r.tileClass)),h=a._context||{};if(r.width&&(m.width=r.width),r.height&&(m.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){m.annotations=[];var p=Object.keys(m);for(n=0;n=0)return h}else if(typeof h=="string"&&(h=h.trim(),h.slice(-1)==="%"&&v(h.slice(0,-1))&&(h=+h.slice(0,-1),h>=0)))return h+"%"}function m(h,p,g,i,w,S){S=S||{};var M=S.moduleHasSelected!==!1,C=S.moduleHasUnselected!==!1,_=S.moduleHasConstrain!==!1,T=S.moduleHasCliponaxis!==!1,f=S.moduleHasTextangle!==!1,u=S.moduleHasInsideanchor!==!1,A=!!S.hasPathbar,b=Array.isArray(w)||w==="auto",z=b||w==="inside",I=b||w==="outside";if(z||I){var N=n(i,"textfont",g.font),R=x.extendFlat({},N),B=h.textfont&&h.textfont.color,F=!B;if(F&&delete R.color,n(i,"insidetextfont",R),A){var P=x.extendFlat({},N);F&&delete P.color,n(i,"pathbar.textfont",P)}I&&n(i,"outsidetextfont",N),M&&i("selected.textfont.color"),C&&i("unselected.textfont.color"),_&&i("constraintext"),T&&i("cliponaxis"),f&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}z&&u&&i("insidetextanchor")}V.exports={supplyDefaults:o,crossTraceDefaults:s,handleText:m,validateCornerradius:c}}}),wx=Ee({"src/traces/bar/layout_defaults.js"(J,V){"use strict";var v=Ri(),x=uo(),E=Vr(),k=r1(),l=fh().validateCornerradius;V.exports=function(e,t,a){function r(M,C){return E.coerce(e,t,k,M,C)}for(var n=!1,o=!1,s=!1,c={},m=r("barmode"),h=m==="group",p=0;p0&&!c[i]&&(s=!0),c[i]=!0),g.visible&&g.type==="histogram"){var w=x.getFromId({_fullLayout:t},g[g.orientation==="v"?"xaxis":"yaxis"]);w.type!=="category"&&(o=!0)}}if(!n){delete t.barmode;return}m!=="overlay"&&r("barnorm"),r("bargap",o&&!s?0:.2),r("bargroupgap");var S=r("barcornerradius");t.barcornerradius=l(S)}}}),Q0=Ee({"src/traces/bar/arrays_to_calcdata.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k){for(var l=0;lt;if(!a)return k}return l!==void 0?l:E.dflt},J.coerceColor=function(E,k,l){return V.isValid(k)?k:l!==void 0?l:E.dflt},J.coerceEnumerated=function(E,k,l){return E.coerceNumber&&(k=+k),E.values.indexOf(k)!==-1?k:l!==void 0?l:E.dflt},J.getValue=function(E,k){var l;return x(E)?k1||A.bargap===0&&A.bargroupgap===0&&!b[0].trace.marker.line.width)&&v.select(this).attr("shape-rendering","crispEdges")}),f.selectAll("g.points").each(function(b){var z=v.select(this),I=b[0].trace;c(z,I,T)}),l.getComponentMethod("errorbars","style")(f)}function c(T,f,u){E.pointStyle(T.selectAll("path"),f,u),m(T,f,u)}function m(T,f,u){T.selectAll("text").each(function(A){var b=v.select(this),z=k.ensureUniformFontSize(u,i(b,A,f,u));E.font(b,z)})}function h(T,f,u){var A=f[0].trace;A.selectedpoints?p(u,A,T):(c(u,A,T),l.getComponentMethod("errorbars","style")(u))}function p(T,f,u){E.selectedPointStyle(T.selectAll("path"),f),g(T.selectAll("text"),f,u)}function g(T,f,u){T.each(function(A){var b=v.select(this),z;if(A.selected){z=k.ensureUniformFontSize(u,i(b,A,f,u));var I=f.selected.textfont&&f.selected.textfont.color;I&&(z.color=I),E.font(b,z)}else E.selectedTextStyle(b,f)})}function i(T,f,u,A){var b=A._fullLayout.font,z=u.textfont;if(T.classed("bartext-inside")){var I=_(f,u);z=S(u,f.i,b,I)}else T.classed("bartext-outside")&&(z=M(u,f.i,b));return z}function w(T,f,u){return C(a,T.textfont,f,u)}function S(T,f,u,A){var b=w(T,f,u),z=T._input.textfont===void 0||T._input.textfont.color===void 0||Array.isArray(T.textfont.color)&&T.textfont.color[f]===void 0;return z&&(b={color:x.contrast(A),family:b.family,size:b.size,weight:b.weight,style:b.style,variant:b.variant,textcase:b.textcase,lineposition:b.lineposition,shadow:b.shadow}),C(r,T.insidetextfont,f,b)}function M(T,f,u){var A=w(T,f,u);return C(n,T.outsidetextfont,f,A)}function C(T,f,u,A){f=f||{};var b=o.getValue(f.family,u),z=o.getValue(f.size,u),I=o.getValue(f.color,u),N=o.getValue(f.weight,u),R=o.getValue(f.style,u),B=o.getValue(f.variant,u),F=o.getValue(f.textcase,u),P=o.getValue(f.lineposition,u),j=o.getValue(f.shadow,u);return{family:o.coerceString(T.family,b,A.family),size:o.coerceNumber(T.size,z,A.size),color:o.coerceColor(T.color,I,A.color),weight:o.coerceString(T.weight,N,A.weight),style:o.coerceString(T.style,R,A.style),variant:o.coerceString(T.variant,B,A.variant),textcase:o.coerceString(T.variant,F,A.textcase),lineposition:o.coerceString(T.variant,P,A.lineposition),shadow:o.coerceString(T.variant,j,A.shadow)}}function _(T,f){return f.type==="waterfall"?f[T.dir].marker.color:T.mcc||T.mc||f.marker.color}V.exports={style:s,styleTextPoints:m,styleOnSelect:h,getInsideTextFont:S,getOutsideTextFont:M,getBarColor:_,resizeText:e}}}),zv=Ee({"src/traces/bar/plot.js"(J,V){"use strict";var v=Hn(),x=mi(),E=Vr(),k=Fs(),l=Qa(),e=yo(),t=Ri(),a=uo().tickText,r=Ef(),n=r.recordMinTextSize,o=r.clearMinTextSize,s=bh(),c=a1(),m=Jd(),h=Zh(),p=h.text,g=h.textposition,i=Qf().appendArrayPointValue,w=m.TEXTPAD;function S(re){return re.id}function M(re){if(re.ids)return S}function C(re){return(re>0)-(re<0)}function _(re,ae){return re0}function A(re,ae,oe,H,X,K){var G=ae.xaxis,Y=ae.yaxis,q=re._fullLayout,$=re._context.staticPlot;X||(X={mode:q.barmode,norm:q.barmode,gap:q.bargap,groupgap:q.bargroupgap},o("bar",q));var ee=E.makeTraceGroups(H,oe,"trace bars").each(function(ne){var fe=v.select(this),ye=ne[0].trace,xe=ne[0].t,Ae=ye.type==="waterfall",Me=ye.type==="funnel",Ie=ye.type==="histogram",Ue=ye.type==="bar",qe=Ue||Me,ke=0;Ae&&ye.connector.visible&&ye.connector.mode==="between"&&(ke=ye.connector.line.width/2);var ge=ye.orientation==="h",ue=u(X),ve=E.ensureSingle(fe,"g","points"),se=M(ye),Te=ve.selectAll("g.point").data(E.identity,se);Te.enter().append("g").classed("point",!0),Te.exit().remove(),Te.each(function(We,Ge){var gt=v.select(this),mt=T(We,G,Y,ge),Tt=mt[0][0],At=mt[0][1],Kt=mt[1][0],nr=mt[1][1],_r=(ge?At-Tt:nr-Kt)===0;_r&&qe&&c.getLineWidth(ye,We)&&(_r=!1),_r||(_r=!x(Tt)||!x(At)||!x(Kt)||!x(nr)),We.isBlank=_r,_r&&(ge?At=Tt:nr=Kt),ke&&!_r&&(ge?(Tt-=_(Tt,At)*ke,At+=_(Tt,At)*ke):(Kt-=_(Kt,nr)*ke,nr+=_(Kt,nr)*ke));var Zt,sr;if(ye.type==="waterfall"){if(!_r){var Ot=ye[We.dir].marker;Zt=Ot.line.width,sr=Ot.color}}else Zt=c.getLineWidth(ye,We),sr=We.mc||ye.marker.color;function vt(nn){var wn=v.round(Zt/2%1,2);return X.gap===0&&X.groupgap===0?v.round(Math.round(nn)-wn,2):nn}function ht(nn,wn,Un){return Un&&nn===wn?nn:Math.abs(nn-wn)>=2?vt(nn):nn>wn?Math.ceil(nn):Math.floor(nn)}var Re=l.opacity(sr),Be=Re<1||Zt>.01?vt:ht;re._context.staticPlot||(Tt=Be(Tt,At,ge),At=Be(At,Tt,ge),Kt=Be(Kt,nr,!ge),nr=Be(nr,Kt,!ge));var He=ge?G.c2p:Y.c2p,$e;We.s0>0?$e=We._sMax:We.s0<0?$e=We._sMin:$e=We.s1>0?We._sMax:We._sMin;function Ze(nn,wn){if(!nn)return 0;var Un=Math.abs(ge?nr-Kt:At-Tt),jn=Math.abs(ge?At-Tt:nr-Kt),Aa=Be(Math.abs(He($e,!0)-He(0,!0))),ua=We.hasB?Math.min(Un/2,jn/2):Math.min(Un/2,Aa),Qn;if(wn==="%"){var ei=Math.min(50,nn);Qn=Un*(ei/100)}else Qn=nn;return Be(Math.max(Math.min(Qn,ua),0))}var Je=Ue||Ie?Ze(xe.cornerradiusvalue,xe.cornerradiusform):0,Mt,dt,Dt="M"+Tt+","+Kt+"V"+nr+"H"+At+"V"+Kt+"Z",Ct=0;if(Je&&We.s){var Vt=C(We.s0)===0||C(We.s)===C(We.s0)?We.s1:We.s0;if(Ct=Be(We.hasB?0:Math.abs(He($e,!0)-He(Vt,!0))),Ct0?Math.sqrt(Ct*(2*Je-Ct)):0,It=Ht>0?Math.max:Math.min;Mt="M"+Tt+","+Kt+"V"+(nr-on*Wt)+"H"+It(At-(Je-Ct)*Ht,Tt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+At+","+(nr-Je*Wt-$t)+"V"+(Kt+Je*Wt+$t)+"A "+Je+","+Je+" 0 0 "+Sr+" "+It(At-(Je-Ct)*Ht,Tt)+","+(Kt+on*Wt)+"Z"}else if(We.hasB)Mt="M"+(Tt+Je*Ht)+","+Kt+"A "+Je+","+Je+" 0 0 "+Sr+" "+Tt+","+(Kt+Je*Wt)+"V"+(nr-Je*Wt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(Tt+Je*Ht)+","+nr+"H"+(At-Je*Ht)+"A "+Je+","+Je+" 0 0 "+Sr+" "+At+","+(nr-Je*Wt)+"V"+(Kt+Je*Wt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(At-Je*Ht)+","+Kt+"Z";else{dt=Math.abs(nr-Kt)+Ct;var ir=dt0?Math.sqrt(Ct*(2*Je-Ct)):0,fr=Wt>0?Math.max:Math.min;Mt="M"+(Tt+ir*Ht)+","+Kt+"V"+fr(nr-(Je-Ct)*Wt,Kt)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(Tt+Je*Ht-cr)+","+nr+"H"+(At-Je*Ht+cr)+"A "+Je+","+Je+" 0 0 "+Sr+" "+(At-ir*Ht)+","+fr(nr-(Je-Ct)*Wt,Kt)+"V"+Kt+"Z"}}else Mt=Dt}else Mt=Dt;var Ir=f(E.ensureSingle(gt,"path"),q,X,K);if(Ir.style("vector-effect",$?"none":"non-scaling-stroke").attr("d",isNaN((At-Tt)*(nr-Kt))||_r&&re._context.staticPlot?"M0,0Z":Mt).call(e.setClipUrl,ae.layerClipId,re),!q.uniformtext.mode&&ue){var ln=e.makePointStyleFns(ye);e.singlePointStyle(We,Ir,ye,ln,re)}b(re,ae,gt,ne,Ge,Tt,At,Kt,nr,Je,Ct,X,K),ae.layerClipId&&e.hideOutsideRangePoint(We,gt.select("text"),G,Y,ye.xcalendar,ye.ycalendar)});var Fe=ye.cliponaxis===!1;e.setClipUrl(fe,Fe?null:ae.layerClipId,re)});t.getComponentMethod("errorbars","plot")(re,ee,ae,X)}function b(re,ae,oe,H,X,K,G,Y,q,$,ee,ne,fe){var ye=ae.xaxis,xe=ae.yaxis,Ae=re._fullLayout,Me;function Ie(Dt,Ct,Vt){var Ht=E.ensureSingle(Dt,"text").text(Ct).attr({class:"bartext bartext-"+Me,"text-anchor":"middle","data-notex":1}).call(e.font,Vt).call(k.convertToTspans,re);return Ht}var Ue=H[0].trace,qe=Ue.orientation==="h",ke=U(H,qe,ye,xe),ge=P(Ae,H,X,ye,xe);Me=j(Ue,X);var ue=ne.mode==="stack"||ne.mode==="relative",ve=H[X],se=!ue||ve._outmost,Te=ve.hasB,Fe=$&&$-ee>w;if(!ge||Me==="none"||(ve.isBlank||K===G||Y===q)&&(Me==="auto"||Me==="inside")){oe.select("text").remove();return}var We=Ae.font,Ge=s.getBarColor(H[X],Ue),gt=s.getInsideTextFont(Ue,X,We,Ge),mt=s.getOutsideTextFont(Ue,X,We),Tt=Ue.insidetextanchor||"end",At=oe.datum();qe?ye.type==="log"&&At.s0<=0&&(ye.range[0]0&&ht>0,He;Fe?Te?He=z(_r-2*$,Zt,vt,ht,qe)||z(_r,Zt-2*$,vt,ht,qe):qe?He=z(_r-($-ee),Zt,vt,ht,qe)||z(_r,Zt-2*($-ee),vt,ht,qe):He=z(_r,Zt-($-ee),vt,ht,qe)||z(_r-2*($-ee),Zt,vt,ht,qe):He=z(_r,Zt,vt,ht,qe),Be&&He?Me="inside":(Me="outside",sr.remove(),sr=null)}else Me="inside";if(!sr){Re=E.ensureUniformFontSize(re,Me==="outside"?mt:gt),sr=Ie(oe,ge,Re);var $e=sr.attr("transform");if(sr.attr("transform",""),Ot=e.bBox(sr.node()),vt=Ot.width,ht=Ot.height,sr.attr("transform",$e),vt<=0||ht<=0){sr.remove();return}}var Ze=Ue.textangle,Je,Mt;Me==="outside"?(Mt=Ue.constraintext==="both"||Ue.constraintext==="outside",Je=F(K,G,Y,q,Ot,{isHorizontal:qe,constrained:Mt,angle:Ze,zeroBarDir:ke})):(Mt=Ue.constraintext==="both"||Ue.constraintext==="inside",Je=R(K,G,Y,q,Ot,{isHorizontal:qe,constrained:Mt,angle:Ze,anchor:Tt,hasB:Te,r:$,overhead:ee})),Je.fontSize=Re.size,n(Ue.type==="histogram"?"bar":Ue.type,Je,Ae),ve.transform=Je;var dt=f(sr,Ae,ne,fe);E.setTransormAndDisplay(dt,Je)}function z(re,ae,oe,H,X){if(re<0||ae<0)return!1;var K=oe<=re&&H<=ae,G=oe<=ae&&H<=re,Y=X?re>=oe*(ae/H):ae>=H*(re/oe);return K||G||Y}function I(re){return re==="auto"?0:re}function N(re,ae){var oe=Math.PI/180*ae,H=Math.abs(Math.sin(oe)),X=Math.abs(Math.cos(oe));return{x:re.width*X+re.height*H,y:re.width*H+re.height*X}}function R(re,ae,oe,H,X,K){var G=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,$=K.anchor,ee=$==="end",ne=$==="start",fe=K.leftToRight||0,ye=(fe+1)/2,xe=1-ye,Ae=K.hasB,Me=K.r,Ie=K.overhead,Ue=X.width,qe=X.height,ke=Math.abs(ae-re),ge=Math.abs(H-oe),ue=ke>2*w&&ge>2*w?w:0;ke-=2*ue,ge-=2*ue;var ve=I(q);q==="auto"&&!(Ue<=ke&&qe<=ge)&&(Ue>ke||qe>ge)&&(!(Ue>ge||qe>ke)||Uew){var We=B(re,ae,oe,H,se,Me,Ie,G,Ae);Te=We.scale,Fe=We.pad}else Te=1,Y&&(Te=Math.min(1,ke/se.x,ge/se.y)),Fe=0;var Ge=X.left*xe+X.right*ye,gt=(X.top+X.bottom)/2,mt=(re+w)*xe+(ae-w)*ye,Tt=(oe+H)/2,At=0,Kt=0;if(ne||ee){var nr=(G?se.x:se.y)/2;Me&&(ee||Ae)&&(ue+=Fe);var _r=G?_(re,ae):_(oe,H);G?ne?(mt=re+_r*ue,At=-_r*nr):(mt=ae-_r*ue,At=_r*nr):ne?(Tt=oe+_r*ue,Kt=-_r*nr):(Tt=H-_r*ue,Kt=_r*nr)}return{textX:Ge,textY:gt,targetX:mt,targetY:Tt,anchorX:At,anchorY:Kt,scale:Te,rotate:ve}}function B(re,ae,oe,H,X,K,G,Y,q){var $=Math.max(0,Math.abs(ae-re)-2*w),ee=Math.max(0,Math.abs(H-oe)-2*w),ne=K-w,fe=G?ne-Math.sqrt(ne*ne-(ne-G)*(ne-G)):ne,ye=q?ne*2:Y?ne-G:2*fe,xe=q?ne*2:Y?2*fe:ne-G,Ae,Me,Ie,Ue,qe;return X.y/X.x>=ee/($-ye)?Ue=ee/X.y:X.y/X.x<=(ee-xe)/$?Ue=$/X.x:!q&&Y?(Ae=X.x*X.x+X.y*X.y/4,Me=-2*X.x*($-ne)-X.y*(ee/2-ne),Ie=($-ne)*($-ne)+(ee/2-ne)*(ee/2-ne)-ne*ne,Ue=(-Me+Math.sqrt(Me*Me-4*Ae*Ie))/(2*Ae)):q?(Ae=(X.x*X.x+X.y*X.y)/4,Me=-X.x*($/2-ne)-X.y*(ee/2-ne),Ie=($/2-ne)*($/2-ne)+(ee/2-ne)*(ee/2-ne)-ne*ne,Ue=(-Me+Math.sqrt(Me*Me-4*Ae*Ie))/(2*Ae)):(Ae=X.x*X.x/4+X.y*X.y,Me=-X.x*($/2-ne)-2*X.y*(ee-ne),Ie=($/2-ne)*($/2-ne)+(ee-ne)*(ee-ne)-ne*ne,Ue=(-Me+Math.sqrt(Me*Me-4*Ae*Ie))/(2*Ae)),Ue=Math.min(1,Ue),Y?qe=Math.max(0,ne-Math.sqrt(Math.max(0,ne*ne-(ne-(ee-X.y*Ue)/2)*(ne-(ee-X.y*Ue)/2)))-G):qe=Math.max(0,ne-Math.sqrt(Math.max(0,ne*ne-(ne-($-X.x*Ue)/2)*(ne-($-X.x*Ue)/2)))-G),{scale:Ue,pad:qe}}function F(re,ae,oe,H,X,K){var G=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,$=X.width,ee=X.height,ne=Math.abs(ae-re),fe=Math.abs(H-oe),ye;G?ye=fe>2*w?w:0:ye=ne>2*w?w:0;var xe=1;Y&&(xe=G?Math.min(1,fe/ee):Math.min(1,ne/$));var Ae=I(q),Me=N(X,Ae),Ie=(G?Me.x:Me.y)/2,Ue=(X.left+X.right)/2,qe=(X.top+X.bottom)/2,ke=(re+ae)/2,ge=(oe+H)/2,ue=0,ve=0,se;return(G?re===ae:oe===H)&&K.zeroBarDir?se=K.zeroBarDir:se=G?_(ae,re):_(oe,H),G?(ke=ae-se*ye,ue=se*Ie):(ge=H+se*ye,ve=-se*Ie),{textX:Ue,textY:qe,targetX:ke,targetY:ge,anchorX:ue,anchorY:ve,scale:xe,rotate:Ae}}function P(re,ae,oe,H,X){var K=ae[0].trace,G=K.texttemplate,Y;return G?Y=Z(re,ae,oe,H,X):K.textinfo?Y=Q(ae,oe,H,X):Y=c.getValue(K.text,oe),c.coerceString(p,Y)}function j(re,ae){var oe=c.getValue(re.textposition,ae);return c.coerceEnumerated(g,oe)}function U(re,ae,oe,H){for(var X=!1,K=!1,G=0;G0?X=!0:Y<0&&(K=!0),X&&K)return 0}var q=ae?oe:H,$=-_(q.range[0],q.range[1]);return K?X?0:-$:$}function Z(re,ae,oe,H,X){var K=ae[0].trace,G=E.castOption(K,oe,"texttemplate");if(!G)return"";var Y=K.type==="histogram",q=K.type==="waterfall",$=K.type==="funnel",ee=K.orientation==="h",ne,fe,ye,xe;ee?(ne="y",fe=X,ye="x",xe=H):(ne="x",fe=H,ye="y",xe=X);function Ae(ue){return a(fe,fe.c2l(ue),!0).text}function Me(ue){return a(xe,xe.c2l(ue),!0).text}var Ie=ae[oe],Ue={};Ue.label=Ie.p,Ue.labelLabel=Ue[ne+"Label"]=Ae(Ie.p);var qe=E.castOption(K,Ie.i,"text");(qe===0||qe)&&(Ue.text=qe),Ue.value=Ie.s,Ue.valueLabel=Ue[ye+"Label"]=Me(Ie.s);var ke={};i(ke,K,Ie.i),(Y||ke.x===void 0)&&(ke.x=ee?Ue.value:Ue.label),(Y||ke.y===void 0)&&(ke.y=ee?Ue.label:Ue.value),(Y||ke.xLabel===void 0)&&(ke.xLabel=ee?Ue.valueLabel:Ue.labelLabel),(Y||ke.yLabel===void 0)&&(ke.yLabel=ee?Ue.labelLabel:Ue.valueLabel),q&&(Ue.delta=+Ie.rawS||Ie.s,Ue.deltaLabel=Me(Ue.delta),Ue.final=Ie.v,Ue.finalLabel=Me(Ue.final),Ue.initial=Ue.final-Ue.delta,Ue.initialLabel=Me(Ue.initial)),$&&(Ue.value=Ie.s,Ue.valueLabel=Me(Ue.value),Ue.percentInitial=Ie.begR,Ue.percentInitialLabel=E.formatPercent(Ie.begR),Ue.percentPrevious=Ie.difR,Ue.percentPreviousLabel=E.formatPercent(Ie.difR),Ue.percentTotal=Ie.sumR,Ue.percenTotalLabel=E.formatPercent(Ie.sumR));var ge=E.castOption(K,Ie.i,"customdata");return ge&&(Ue.customdata=ge),E.texttemplateString({data:[ke,Ue,K._meta],fallback:K.texttemplatefallback,labels:Ue,locale:re._d3locale,template:G})}function Q(re,ae,oe,H){var X=re[0].trace,K=X.orientation==="h",G=X.type==="waterfall",Y=X.type==="funnel";function q(ge){var ue=K?H:oe;return a(ue,ge,!0).text}function $(ge){var ue=K?oe:H;return a(ue,+ge,!0).text}var ee=X.textinfo,ne=re[ae],fe=ee.split("+"),ye=[],xe,Ae=function(ge){return fe.indexOf(ge)!==-1};if(Ae("label")&&ye.push(q(re[ae].p)),Ae("text")&&(xe=E.castOption(X,ne.i,"text"),(xe===0||xe)&&ye.push(xe)),G){var Me=+ne.rawS||ne.s,Ie=ne.v,Ue=Ie-Me;Ae("initial")&&ye.push($(Ue)),Ae("delta")&&ye.push($(Me)),Ae("final")&&ye.push($(Ie))}if(Y){Ae("value")&&ye.push($(ne.s));var qe=0;Ae("percent initial")&&qe++,Ae("percent previous")&&qe++,Ae("percent total")&&qe++;var ke=qe>1;Ae("percent initial")&&(xe=E.formatPercent(ne.begR),ke&&(xe+=" of initial"),ye.push(xe)),Ae("percent previous")&&(xe=E.formatPercent(ne.difR),ke&&(xe+=" of previous"),ye.push(xe)),Ae("percent total")&&(xe=E.formatPercent(ne.sumR),ke&&(xe+=" of total"),ye.push(xe))}return ye.join("
")}V.exports={plot:A,toMoveInsideBar:R}}}),Gp=Ee({"src/traces/bar/hover.js"(J,V){"use strict";var v=$l(),x=Ri(),E=Qa(),k=Vr().fillText,l=a1().getLineWidth,e=uo().hoverLabelText,t=Qi().BADNUM;function a(o,s,c,m,h){var p=r(o,s,c,m,h);if(p){var g=p.cd,i=g[0].trace,w=g[p.index];return p.color=n(i,w),x.getComponentMethod("errorbars","hoverInfo")(w,i,p),[p]}}function r(o,s,c,m,h){var p=o.cd,g=p[0].trace,i=p[0].t,w=m==="closest",S=g.type==="waterfall",M=o.maxHoverDistance,C=o.maxSpikeDistance,_,T,f,u,A,b,z;g.orientation==="h"?(_=c,T=s,f="y",u="x",A=oe,b=Q):(_=s,T=c,f="x",u="y",b=oe,A=Q);var I=g[f+"period"],N=w||I;function R(ye){return F(ye,-1)}function B(ye){return F(ye,1)}function F(ye,xe){var Ae=ye.w;return ye[f]+xe*Ae/2}function P(ye){return ye[f+"End"]-ye[f+"Start"]}var j=w?R:I?function(ye){return ye.p-P(ye)/2}:function(ye){return Math.min(R(ye),ye.p-i.bardelta/2)},U=w?B:I?function(ye){return ye.p+P(ye)/2}:function(ye){return Math.max(B(ye),ye.p+i.bardelta/2)};function Z(ye,xe,Ae){return h.finiteRange&&(Ae=0),v.inbox(ye-_,xe-_,Ae+Math.min(1,Math.abs(xe-ye)/z)-1)}function Q(ye){return Z(j(ye),U(ye),M)}function re(ye){return Z(R(ye),B(ye),C)}function ae(ye){var xe=ye[u];if(S){var Ae=Math.abs(ye.rawS)||0;T>0?xe+=Ae:T<0&&(xe-=Ae)}return xe}function oe(ye){var xe=T,Ae=ye.b,Me=ae(ye);return v.inbox(Ae-xe,Me-xe,M+(Me-xe)/(Me-Ae)-1)}function H(ye){var xe=T,Ae=ye.b,Me=ae(ye);return v.inbox(Ae-xe,Me-xe,C+(Me-xe)/(Me-Ae)-1)}var X=o[f+"a"],K=o[u+"a"];z=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function G(ye){return(A(ye)+b(ye))/2}var Y=v.getDistanceFunction(m,A,b,G);if(v.getClosest(p,Y,o),o.index!==!1&&p[o.index].p!==t){N||(j=function(ye){return Math.min(R(ye),ye.p-i.bargroupwidth/2)},U=function(ye){return Math.max(B(ye),ye.p+i.bargroupwidth/2)});var q=o.index,$=p[q],ee=g.base?$.b+$.s:$.s;o[u+"0"]=o[u+"1"]=K.c2p($[u],!0),o[u+"LabelVal"]=ee;var ne=i.extents[i.extents.round($.p)];o[f+"0"]=X.c2p(w?j($):ne[0],!0),o[f+"1"]=X.c2p(w?U($):ne[1],!0);var fe=$.orig_p!==void 0;return o[f+"LabelVal"]=fe?$.orig_p:$.p,o.labelLabel=e(X,o[f+"LabelVal"],g[f+"hoverformat"]),o.valueLabel=e(K,o[u+"LabelVal"],g[u+"hoverformat"]),o.baseLabel=e(K,$.b,g[u+"hoverformat"]),o.spikeDistance=(H($)+re($))/2,o[f+"Spike"]=X.c2p($.p,!0),k($,g,o),o.hovertemplate=g.hovertemplate,o}}function n(o,s){var c=s.mcc||o.marker.color,m=s.mlcc||o.marker.line.color,h=l(o,s);if(E.opacity(c))return c;if(E.opacity(m)&&h)return m}V.exports={hoverPoints:a,hoverOnBars:r,getTraceColor:n}}}),rS=Ee({"src/traces/bar/event_data.js"(J,V){"use strict";V.exports=function(x,E,k){return x.x="xVal"in E?E.xVal:E.x,x.y="yVal"in E?E.yVal:E.y,E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),k.orientation==="h"?(x.label=x.y,x.value=x.x):(x.label=x.x,x.value=x.y),x}}}),Wp=Ee({"src/traces/bar/select.js"(J,V){"use strict";V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,a=l[0].trace,r=a.type==="funnel",n=a.orientation==="h",o=[],s;if(k===!1)for(s=0;s0?(I="v",f>0?N=Math.min(A,u):N=Math.min(u)):f>0?(I="h",N=Math.min(A)):N=0;if(!N){c.visible=!1;return}c._length=N;var j=m("orientation",I);c._hasPreCompStats?j==="v"&&f===0?(m("x0",0),m("dx",1)):j==="h"&&T===0&&(m("y0",0),m("dy",1)):j==="v"&&f===0?m("x0"):j==="h"&&T===0&&m("y0");var U=x.getComponentMethod("calendars","handleTraceDefaults");U(s,c,["x","y"],h)}function n(s,c,m,h){var p=h.prefix,g=v.coerce2(s,c,t,"marker.outliercolor"),i=m("marker.line.outliercolor"),w="outliers";c._hasPreCompStats?w="all":(g||i)&&(w="suspectedoutliers");var S=m(p+"points",w);S?(m("jitter",S==="all"?.3:0),m("pointpos",S==="all"?-1.5:0),m("marker.symbol"),m("marker.opacity"),m("marker.size"),m("marker.angle"),m("marker.color",c.line.color),m("marker.line.color"),m("marker.line.width"),S==="suspectedoutliers"&&(m("marker.line.outliercolor",c.marker.color),m("marker.line.outlierwidth")),m("selected.marker.color"),m("unselected.marker.color"),m("selected.marker.size"),m("unselected.marker.size"),m("text"),m("hovertext")):delete c.marker;var M=m("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(m("hovertemplate"),m("hovertemplatefallback")),v.coerceSelectionMarkerOpacity(c,m)}function o(s,c){var m,h;function p(S){return v.coerce(h._input,h,t,S)}for(var g=0;gae.uf};if(C._hasPreCompStats){var q=C[N],$=function(nr){return I.d2c((C[nr]||[])[b])},ee=1/0,ne=-1/0;for(b=0;b=ae.q1&&ae.q3>=ae.med){var ye=$("lowerfence");ae.lf=ye!==l&&ye<=ae.q1?ye:h(ae,H,X);var xe=$("upperfence");ae.uf=xe!==l&&xe>=ae.q3?xe:p(ae,H,X);var Ae=$("mean");ae.mean=Ae!==l?Ae:X?k.mean(H,X):(ae.q1+ae.q3)/2;var Me=$("sd");ae.sd=Ae!==l&&Me>=0?Me:X?k.stdev(H,X,ae.mean):ae.q3-ae.q1,ae.lo=g(ae),ae.uo=i(ae);var Ie=$("notchspan");Ie=Ie!==l&&Ie>0?Ie:w(ae,X),ae.ln=ae.med-Ie,ae.un=ae.med+Ie;var Ue=ae.lf,qe=ae.uf;C.boxpoints&&H.length&&(Ue=Math.min(Ue,H[0]),qe=Math.max(qe,H[X-1])),C.notched&&(Ue=Math.min(Ue,ae.ln),qe=Math.max(qe,ae.un)),ae.min=Ue,ae.max=qe}else{k.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ae.q1,"median = "+ae.med,"q3 = "+ae.q3].join(` +`));var ke;ae.med!==l?ke=ae.med:ae.q1!==l?ae.q3!==l?ke=(ae.q1+ae.q3)/2:ke=ae.q1:ae.q3!==l?ke=ae.q3:ke=0,ae.med=ke,ae.q1=ae.q3=ke,ae.lf=ae.uf=ke,ae.mean=ae.sd=ke,ae.ln=ae.un=ke,ae.min=ae.max=ke}ee=Math.min(ee,ae.min),ne=Math.max(ne,ae.max),ae.pts2=oe.filter(Y),u.push(ae)}}C._extremes[I._id]=x.findExtremes(I,[ee,ne],{padded:!0})}else{var ge=I.makeCalcdata(C,N),ue=a(Q,re),ve=Q.length,se=r(ve);for(b=0;b=0&&Te0){if(ae={},ae.pos=ae[B]=Q[b],oe=ae.pts=se[b].sort(c),H=ae[N]=oe.map(m),X=H.length,ae.min=H[0],ae.max=H[X-1],ae.mean=k.mean(H,X),ae.sd=k.stdev(H,X,ae.mean)*C.sdmultiple,ae.med=k.interp(H,.5),X%2&&(gt||mt)){var Tt,At;gt?(Tt=H.slice(0,X/2),At=H.slice(X/2+1)):mt&&(Tt=H.slice(0,X/2+1),At=H.slice(X/2)),ae.q1=k.interp(Tt,.5),ae.q3=k.interp(At,.5)}else ae.q1=k.interp(H,.25),ae.q3=k.interp(H,.75);ae.lf=h(ae,H,X),ae.uf=p(ae,H,X),ae.lo=g(ae),ae.uo=i(ae);var Kt=w(ae,X);ae.ln=ae.med-Kt,ae.un=ae.med+Kt,Fe=Math.min(Fe,ae.ln),We=Math.max(We,ae.un),ae.pts2=oe.filter(Y),u.push(ae)}C.notched&&k.isTypedArray(ge)&&(ge=Array.from(ge)),C._extremes[I._id]=x.findExtremes(I,C.notched?ge.concat([Fe,We]):ge,{padded:!0})}return s(u,C),u.length>0?(u[0].t={num:_[A],dPos:re,posLetter:B,valLetter:N,labels:{med:e(M,"median:"),min:e(M,"min:"),q1:e(M,"q1:"),q3:e(M,"q3:"),max:e(M,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?e(M,"mean \xB1 \u03C3:").replace("\u03C3",C.sdmultiple===1?"\u03C3":C.sdmultiple+"\u03C3"):e(M,"mean:"),lf:e(M,"lower fence:"),uf:e(M,"upper fence:")}},_[A]++,u):[{t:{empty:!0}}]};function t(S,M,C,_){var T=M in S,f=M+"0"in S,u="d"+M in S;if(T||f&&u){var A=C.makeCalcdata(S,M),b=E(S,C,M,A).vals;return[b,A]}var z;f?z=S[M+"0"]:"name"in S&&(C.type==="category"||v(S.name)&&["linear","log"].indexOf(C.type)!==-1||k.isDateTime(S.name)&&C.type==="date")?z=S.name:z=_;for(var I=C.type==="multicategory"?C.r2c_just_indices(z):C.d2c(z,0,S[M+"calendar"]),N=S._length,R=new Array(N),B=0;B1,f=1-s[t+"gap"],u=1-s[t+"groupgap"];for(h=0;h0;if(I==="positive"?(ae=N*(z?1:.5),X=H,oe=X=B):I==="negative"?(ae=X=B,oe=N*(z?1:.5),K=H):(ae=oe=N,X=K=H),ne){var fe=A.pointpos,ye=A.jitter,xe=A.marker.size/2,Ae=0;fe+ye>=0&&(Ae=H*(fe+ye),Ae>ae?(ee=!0,q=xe,G=Ae):Ae>X&&(q=xe,G=ae)),Ae<=ae&&(G=ae);var Me=0;fe-ye<=0&&(Me=-H*(fe-ye),Me>oe?(ee=!0,$=xe,Y=Me):Me>K&&($=xe,Y=oe)),Me<=oe&&(Y=oe)}else G=ae,Y=oe;var Ie=new Array(g.length);for(p=0;pC.lo&&(j.so=!0)}return T});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(E.translatePoints,m,h)}function r(n,o,s,c){var m=o.val,h=o.pos,p=!!h.rangebreaks,g=c.bPos,i=c.bPosPxOffset||0,w=s.boxmean||(s.meanline||{}).visible,S,M;Array.isArray(c.bdPos)?(S=c.bdPos[0],M=c.bdPos[1]):(S=c.bdPos,M=c.bdPos);var C=n.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?x.identity:[]);C.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),C.exit().remove(),C.each(function(_){var T=h.c2l(_.pos+g,!0),f=h.l2p(T-S)+i,u=h.l2p(T+M)+i,A=p?(f+u)/2:h.l2p(T)+i,b=m.c2p(_.mean,!0),z=m.c2p(_.mean-_.sd,!0),I=m.c2p(_.mean+_.sd,!0);s.orientation==="h"?v.select(this).attr("d","M"+b+","+f+"V"+u+(w==="sd"?"m0,0L"+z+","+A+"L"+b+","+f+"L"+I+","+A+"Z":"")):v.select(this).attr("d","M"+f+","+b+"H"+u+(w==="sd"?"m0,0L"+A+","+z+"L"+f+","+b+"L"+A+","+I+"Z":""))})}V.exports={plot:e,plotBoxAndWhiskers:t,plotPoints:a,plotBoxMean:r}}}),l1=Ee({"src/traces/box/style.js"(J,V){"use strict";var v=Hn(),x=Qa(),E=yo();function k(e,t,a){var r=a||v.select(e).selectAll("g.trace.boxes");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var o=v.select(this),s=n[0].trace,c=s.line.width;function m(g,i,w,S){g.style("stroke-width",i+"px").call(x.stroke,w).call(x.fill,S)}var h=o.selectAll("path.box");if(s.type==="candlestick")h.each(function(g){if(!g.empty){var i=v.select(this),w=s[g.dir];m(i,w.line.width,w.line.color,w.fillcolor),i.style("opacity",s.selectedpoints&&!g.selected?.3:1)}});else{m(h,c,s.line.color,s.fillcolor),o.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(x.stroke,s.line.color);var p=o.selectAll("path.point");E.pointStyle(p,s,e)}})}function l(e,t,a){var r=t[0].trace,n=a.selectAll("path.point");r.selectedpoints?E.selectedPointStyle(n,r):E.pointStyle(n,r,e)}V.exports={style:k,styleOnSelect:l}}}),Ax=Ee({"src/traces/box/hover.js"(J,V){"use strict";var v=uo(),x=Vr(),E=$l(),k=Qa(),l=x.fillText;function e(r,n,o,s){var c=r.cd,m=c[0].trace,h=m.hoveron,p=[],g;return h.indexOf("boxes")!==-1&&(p=p.concat(t(r,n,o,s))),h.indexOf("points")!==-1&&(g=a(r,n,o)),s==="closest"?g?[g]:p:(g&&p.push(g),p)}function t(r,n,o,s){var c=r.cd,m=r.xa,h=r.ya,p=c[0].trace,g=c[0].t,i=p.type==="violin",w,S,M,C,_,T,f,u,A,b,z,I=g.bdPos,N,R,B=g.wHover,F=function(Me){return M.c2l(Me.pos)+g.bPos-M.c2l(T)};i&&p.side!=="both"?(p.side==="positive"&&(A=function(Me){var Ie=F(Me);return E.inbox(Ie,Ie+B,b)},N=I,R=0),p.side==="negative"&&(A=function(Me){var Ie=F(Me);return E.inbox(Ie-B,Ie,b)},N=0,R=I)):(A=function(Me){var Ie=F(Me);return E.inbox(Ie-B,Ie+B,b)},N=R=I);var P;i?P=function(Me){return E.inbox(Me.span[0]-_,Me.span[1]-_,b)}:P=function(Me){return E.inbox(Me.min-_,Me.max-_,b)},p.orientation==="h"?(_=n,T=o,f=P,u=A,w="y",M=h,S="x",C=m):(_=o,T=n,f=A,u=P,w="x",M=m,S="y",C=h);var j=Math.min(1,I/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));b=r.maxHoverDistance-j,z=r.maxSpikeDistance-j;function U(Me){return(f(Me)+u(Me))/2}var Z=E.getDistanceFunction(s,f,u,U);if(E.getClosest(c,Z,r),r.index===!1)return[];var Q=c[r.index],re=p.line.color,ae=(p.marker||{}).color;k.opacity(re)&&p.line.width?r.color=re:k.opacity(ae)&&p.boxpoints?r.color=ae:r.color=p.fillcolor,r[w+"0"]=M.c2p(Q.pos+g.bPos-R,!0),r[w+"1"]=M.c2p(Q.pos+g.bPos+N,!0),r[w+"LabelVal"]=Q.orig_p!==void 0?Q.orig_p:Q.pos;var oe=w+"Spike";r.spikeDistance=U(Q)*z/b,r[oe]=M.c2p(Q.pos,!0);var H=p.boxmean||p.sizemode==="sd"||(p.meanline||{}).visible,X=p.boxpoints||p.points,K=X&&H?["max","uf","q3","med","mean","q1","lf","min"]:X&&!H?["max","uf","q3","med","q1","lf","min"]:!X&&H?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],G=C.range[1]0&&(a=!0);for(var s=0;se){var t=e-k[x];return k[x]=e,t}}else return k[x]=e,e;return 0},max:function(x,E,k,l){var e=l[E];if(v(e))if(e=Number(e),v(k[x])){if(k[x]f&&fk){var b=u===x?1:6,z=u===x?"M12":"M1";return function(I,N){var R=g.c2d(I,x,i),B=R.indexOf("-",b);B>0&&(R=R.slice(0,B));var F=g.d2c(R,0,i);if(Ft?c>k?c>x*1.1?x:c>E*1.1?E:k:c>l?l:c>e?e:t:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function o(c,m,h,p,g,i){if(p&&c>k){var w=s(m,g,i),S=s(h,g,i),M=c===x?0:1;return w[M]!==S[M]}return Math.floor(h/c)-Math.floor(m/c)>.1}function s(c,m,h){var p=m.c2d(c,x,h).split("-");return p[0]===""&&(p.unshift(),p[0]="-"+p[0]),p}}}),Px=Ee({"src/traces/histogram/calc.js"(J,V){"use strict";var v=mi(),x=Vr(),E=Ri(),k=uo(),{hasColorscale:l}=cf(),e=Sf(),t=Q0(),a=Ex(),r=kx(),n=Cx(),o=Lx();function s(g,i){var w=[],S=[],M=i.orientation==="h",C=k.getFromId(g,M?i.yaxis:i.xaxis),_=M?"y":"x",T={x:"y",y:"x"}[_],f=i[_+"calendar"],u=i.cumulative,A,b=c(g,i,C,_),z=b[0],I=b[1],N=typeof z.size=="string",R=[],B=N?R:z,F=[],P=[],j=[],U=0,Z=i.histnorm,Q=i.histfunc,re=Z.indexOf("density")!==-1,ae,oe,H;u.enabled&&re&&(Z=Z.replace(/ ?density$/,""),re=!1);var X=Q==="max"||Q==="min",K=X?null:0,G=a.count,Y=r[Z],q=!1,$=function(Te){return C.r2c(Te,0,f)},ee;for(x.isArrayOrTypedArray(i[T])&&Q!=="count"&&(ee=i[T],q=Q==="avg",G=a[Q]),A=$(z.start),oe=$(z.end)+(A-k.tickIncrement(A,z.size,!1,f))/1e6;A=0&&H=ue;A--)if(S[A]){ve=A;break}for(A=ue;A<=ve;A++)if(v(w[A])&&v(S[A])){var se={p:w[A],s:S[A],b:0};u.enabled||(se.pts=j[A],xe?se.ph0=se.ph1=j[A].length?I[j[A][0]]:w[A]:(i._computePh=!0,se.ph0=qe(R[A]),se.ph1=qe(R[A+1],!0))),ge.push(se)}return ge.length===1&&(ge[0].width1=k.tickIncrement(ge[0].p,z.size,!1,f)-ge[0].p),l(i,"marker")&&e(g,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),l(i,"marker.line")&&e(g,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(ge,i),x.isArrayOrTypedArray(i.selectedpoints)&&x.tagSelected(ge,i,Ie),ge}function c(g,i,w,S,M){var C,_=S+"bins",T=g._fullLayout,f=i["_"+S+"bingroup"],u=T._histogramBinOpts[f],A=T.barmode==="overlay",b,z,I,N,R,B,F,P=function(qe){return w.r2c(qe,0,N)},j=function(qe){return w.c2r(qe,0,N)},U=w.type==="date"?function(qe){return qe||qe===0?x.cleanDate(qe,null,N):null}:function(qe){return v(qe)?Number(qe):null};function Z(qe,ke,ge){ke[qe+"Found"]?(ke[qe]=U(ke[qe]),ke[qe]===null&&(ke[qe]=ge[qe])):(B[qe]=ke[qe]=ge[qe],x.nestedProperty(z[0],_+"."+qe).set(ge[qe]))}if(i["_"+S+"autoBinFinished"])delete i["_"+S+"autoBinFinished"];else{z=u.traces;var Q=[],re=!0,ae=!1,oe=!1;for(b=0;bw.r2l(ne)&&(ye=k.tickIncrement(ye,u.size,!0,N)),Y.start=w.l2r(ye),ee||x.nestedProperty(i,_+".start").set(Y.start)}var xe=u.end,Ae=w.r2l(G.end),Me=Ae!==void 0;if((u.endFound||Me)&&Ae!==w.r2l(xe)){var Ie=Me?Ae:x.aggNums(Math.max,null,R);Y.end=w.l2r(Ie),Me||x.nestedProperty(i,_+".start").set(Y.end)}var Ue="autobin"+S;return i._input[Ue]===!1&&(i._input[_]=x.extendFlat({},i[_]||{}),delete i._input[Ue],delete i[Ue]),[Y,R]}function m(g,i,w,S,M){var C=g._fullLayout,_=h(g,i),T=!1,f=1/0,u=[i],A,b,z;for(A=0;A<_.length;A++)if(b=_[A],b===i)T=!0;else if(!T)z=C._histogramBinOpts[b["_"+S+"bingroup"]],f=Math.min(f,z.size||b[M].size);else{var I=c(g,b,w,S,!0),N=I[0],R=I[2];b["_"+S+"autoBinFinished"]=1,b["_"+S+"pos0"]=I[1],R?u.push(b):f=Math.min(f,N.size)}var B=new Array(u.length);for(A=0;A=0;S--)T(S);else if(i==="increasing"){for(S=1;S=0;S--)g[S]+=g[S+1];w==="exclude"&&(g.push(0),g.shift())}}V.exports={calc:s,calcAllAutoBins:c}}}),uS=Ee({"src/traces/histogram2d/calc.js"(J,V){"use strict";var v=Vr(),x=uo(),E=Ex(),k=kx(),l=Cx(),e=Lx(),t=Px().calcAllAutoBins;V.exports=function(s,c){var m=x.getFromId(s,c.xaxis),h=x.getFromId(s,c.yaxis),p=c.xcalendar,g=c.ycalendar,i=function(vt){return m.r2c(vt,0,p)},w=function(vt){return h.r2c(vt,0,g)},S=function(vt){return m.c2r(vt,0,p)},M=function(vt){return h.c2r(vt,0,g)},C,_,T,f,u=t(s,c,m,"x"),A=u[0],b=u[1],z=t(s,c,h,"y"),I=z[0],N=z[1],R=c._length;b.length>R&&b.splice(R,b.length-R),N.length>R&&N.splice(R,N.length-R);var B=[],F=[],P=[],j=typeof A.size=="string",U=typeof I.size=="string",Z=[],Q=[],re=j?Z:A,ae=U?Q:I,oe=0,H=[],X=[],K=c.histnorm,G=c.histfunc,Y=K.indexOf("density")!==-1,q=G==="max"||G==="min",$=q?null:0,ee=E.count,ne=k[K],fe=!1,ye=[],xe=[],Ae="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Ae&&G!=="count"&&(fe=G==="avg",ee=E[G]);var Me=A.size,Ie=i(A.start),Ue=i(A.end)+(Ie-x.tickIncrement(Ie,Me,!1,p))/1e6;for(C=Ie;C=0&&T=0&&fx;n++)r=l(t,a,k(r));return r>x&&v.log("interp2d didn't converge quickly",r),t};function l(e,t,a){var r=0,n,o,s,c,m,h,p,g,i,w,S,M,C;for(c=0;cM&&(r=Math.max(r,Math.abs(e[o][s]-S)/(C-M))))}return r}}}),d1=Ee({"src/traces/heatmap/find_empties.js"(J,V){"use strict";var v=Vr().maxRowLength;V.exports=function(E){var k=[],l={},e=[],t=E[0],a=[],r=[0,0,0],n=v(E),o,s,c,m,h,p,g,i;for(s=0;s=0;h--)m=e[h],s=m[0],c=m[1],p=((l[[s-1,c]]||r)[2]+(l[[s+1,c]]||r)[2]+(l[[s,c-1]]||r)[2]+(l[[s,c+1]]||r)[2])/20,p&&(g[m]=[s,c,p],e.splice(h,1),i=!0);if(!i)throw"findEmpties iterated with no new neighbors";for(m in g)l[m]=g[m],k.push(g[m])}return k.sort(function(w,S){return S[2]-w[2]})}}}),Dx=Ee({"src/traces/heatmap/make_bound_array.js"(J,V){"use strict";var v=Ri(),x=Vr().isArrayOrTypedArray;V.exports=function(k,l,e,t,a,r){var n=[],o=v.traceIs(k,"contour"),s=v.traceIs(k,"histogram"),c,m,h,p=x(l)&&l.length>1;if(p&&!s&&r.type!=="category"){var g=l.length;if(g<=a){if(o)n=Array.from(l).slice(0,a);else if(a===1)r.type==="log"?n=[.5*l[0],2*l[0]]:n=[l[0]-.5,l[0]+.5];else if(r.type==="log"){for(n=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],h=1;h1){var K=(X[X.length-1]-X[0])/(X.length-1),G=Math.abs(K/100);for(R=0;RG)return!1}return!0}g._islinear=!1,i.type==="log"||w.type==="log"?C==="fast"&&P("log axis found"):j(_)?j(A)?g._islinear=!0:C==="fast"&&P("y scale is not linear"):C==="fast"&&P("x scale is not linear");var U=x.maxRowLength(N),Z=g.xtype==="scaled"?"":_,Q=o(g,Z,T,f,U,i),re=g.ytype==="scaled"?"":A,ae=o(g,re,b,z,N.length,w);g._extremes[i._id]=E.findExtremes(i,Q),g._extremes[w._id]=E.findExtremes(w,ae);var oe={x:Q,y:ae,z:N,text:g._text||g.text,hovertext:g._hovertext||g.hovertext};if(g.xperiodalignment&&u&&(oe.orig_x=u),g.yperiodalignment&&I&&(oe.orig_y=I),Z&&Z.length===Q.length-1&&(oe.xCenter=Z),re&&re.length===ae.length-1&&(oe.yCenter=re),M&&(oe.xRanges=B.xRanges,oe.yRanges=B.yRanges,oe.pts=B.pts),S||e(p,g,{vals:N,cLetter:"z"}),S&&g.contours&&g.contours.coloring==="heatmap"){var H={type:g.type==="contour"?"heatmap":"histogram2d",xcalendar:g.xcalendar,ycalendar:g.ycalendar};oe.xfill=o(H,Z,T,f,U,i),oe.yfill=o(H,re,b,z,N.length,w)}return[oe]};function c(h){for(var p=[],g=h.length,i=0;i0;)G=u.c2p(P[ee]),ee--;for(G0;)$=A.c2p(j[ee]),ee--;$=u._length||G<=0||q>=A._length||$<=0;if(Ie){var Ue=z.selectAll("image").data([]);Ue.exit().remove(),i(z);return}var qe,ke;ye==="fast"?(qe=oe,ke=ae):(qe=Ae,ke=Me);var ge=document.createElement("canvas");ge.width=qe,ge.height=ke;var ue=ge.getContext("2d",{willReadFrequently:!0}),ve=n(N,{noNumericCheck:!0,returnArray:!0}),se,Te;ye==="fast"?(se=H?function(Or){return oe-1-Or}:l.identity,Te=X?function(Or){return ae-1-Or}:l.identity):(se=function(Or){return l.constrain(Math.round(u.c2p(P[Or])-K),0,Ae)},Te=function(Or){return l.constrain(Math.round(A.c2p(j[Or])-q),0,Me)});var Fe=Te(0),We=[Fe,Fe],Ge=H?0:1,gt=X?0:1,mt=0,Tt=0,At=0,Kt=0,nr,_r,Zt,sr,Ot;function vt(Or,Pr=0){if(Or===void 0)return[0,0,0,0];var hn=ve(Or);return hn[0]=Math.round(hn[0]),hn[1]=Math.round(hn[1]),hn[2]=Math.round(hn[2]),mt+=Pr,Tt+=hn[0]*Pr,At+=hn[1]*Pr,Kt+=hn[2]*Pr,hn}function ht(Or,Pr,hn,zn){var Pn=Or[hn.bin0];if(Pn===void 0)return vt(void 0,1);var Ca=Or[hn.bin1],ma=Pr[hn.bin0],bi=Pr[hn.bin1],ga=Ca-Pn||0,eo=ma-Pn||0,si;return Ca===void 0?bi===void 0?si=0:ma===void 0?si=2*(bi-Pn):si=(2*bi-ma-Pn)*2/3:bi===void 0?ma===void 0?si=0:si=(2*Pn-Ca-ma)*2/3:ma===void 0?si=(2*bi-Ca-Pn)*2/3:si=bi+Pn-Ca-ma,vt(Pn+hn.frac*ga+zn.frac*(eo+hn.frac*si))}if(ye!=="default"){var Re=0,Be;try{Be=new Uint8Array(qe*ke*4)}catch{Be=new Array(qe*ke*4)}if(ye==="smooth"){var He=U||P,$e=Z||j,Ze=new Array(He.length),Je=new Array($e.length),Mt=new Array(Ae),dt=U?S:w,Dt=Z?S:w,Ct,Vt,Ht;for(ee=0;eeei||ei>A._length))for(ne=jn;neai||ai>u._length)){var Mi=t({x:Fa,y:Qn},N,C._fullLayout);Mi.x=Fa,Mi.y=Qn;var ci=I.z[ee][ne];ci===void 0?(Mi.z="",Mi.zLabel=""):(Mi.z=ci,Mi.zLabel=k.tickText(Ir,ci,"hover").text);var ba=I.text&&I.text[ee]&&I.text[ee][ne];(ba===void 0||ba===!1)&&(ba=""),Mi.text=ba;var pa=l.texttemplateString({data:[Mi,N._meta],fallback:N.texttemplatefallback,labels:Mi,locale:C._fullLayout._d3locale,template:cr});if(pa){var Ii=pa.split("
"),ho=Ii.length,da=0;for(fe=0;fe=w[0].length||z<0||z>w.length)return}else{if(v.inbox(a-g[0],a-g[g.length-1],0)>0||v.inbox(r-i[0],r-i[i.length-1],0)>0)return;if(s){var I;for(T=[2*g[0]-g[1]],I=1;I=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),am=Ee({"src/traces/contour/attributes.js"(J,V){"use strict";var v=Yp(),x=ou(),E=Fl(),k=E.axisHoverFormat,l=E.descriptionOnlyNumbers,e=$s(),t=kc().dash,a=Xs(),r=vo().extendFlat,n=w1(),o=n.COMPARISON_OPS2,s=n.INTERVAL_OPS,c=x.line;V.exports=r({z:v.z,x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:x.xperiod0,yperiod0:x.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,text:v.text,hovertext:v.hovertext,transpose:v.transpose,xtype:v.xtype,ytype:v.ytype,xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:r({},v.texttemplate,{}),texttemplatefallback:v.texttemplatefallback,textfont:r({},v.textfont,{}),hoverongaps:v.hoverongaps,connectgaps:r({},v.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:a({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(o).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},c.smoothing,{}),editType:"plot"},zorder:x.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),Bx=Ee({"src/traces/histogram2dcontour/attributes.js"(J,V){"use strict";var v=x1(),x=am(),E=$s(),k=Fl().axisHoverFormat,l=vo().extendFlat;V.exports=l({x:v.x,y:v.y,z:v.z,marker:v.marker,histnorm:v.histnorm,histfunc:v.histfunc,nbinsx:v.nbinsx,xbins:v.xbins,nbinsy:v.nbinsy,ybins:v.ybins,autobinx:v.autobinx,autobiny:v.autobiny,bingroup:v.bingroup,xbingroup:v.xbingroup,ybingroup:v.ybingroup,autocontour:x.autocontour,ncontours:x.ncontours,contours:x.contours,line:{color:x.line.color,width:l({},x.line.width,{dflt:.5}),dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback,texttemplate:x.texttemplate,texttemplatefallback:x.texttemplatefallback,textfont:x.textfont},E("",{cLetter:"z",editTypeOverride:"calc"}))}}),T1=Ee({"src/traces/contour/contours_defaults.js"(J,V){"use strict";V.exports=function(x,E,k,l){var e=l("contours.start"),t=l("contours.end"),a=e===!1||t===!1,r=k("contours.size"),n;a?n=E.autocontour=!0:n=k("autocontour",!1),(n||!r)&&k("ncontours")}}}),Nx=Ee({"src/traces/contour/label_defaults.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k,l,e){e||(e={});var t=E("contours.showlabels");if(t){var a=k.font;v.coerceFont(E,"contours.labelfont",a,{overrideDflt:{color:l}}),E("contours.labelformat")}e.hasHover!==!1&&E("zhoverformat")}}}),A1=Ee({"src/traces/contour/style_defaults.js"(J,V){"use strict";var v=Cc(),x=Nx();V.exports=function(k,l,e,t,a){var r=e("contours.coloring"),n,o="";r==="fill"&&(n=e("contours.showlines")),n!==!1&&(r!=="lines"&&(o=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(k.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,v(k,l,t,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),x(e,t,o,a)}}}),xS=Ee({"src/traces/histogram2dcontour/defaults.js"(J,V){"use strict";var v=Vr(),x=zx(),E=T1(),k=A1(),l=nm(),e=Bx();V.exports=function(a,r,n,o){function s(m,h){return v.coerce(a,r,e,m,h)}function c(m){return v.coerce2(a,r,e,m)}x(a,r,s,o),r.visible!==!1&&(E(a,r,s,c),k(a,r,s,o),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&l(s,o))}}}),Ox=Ee({"src/traces/contour/set_contours.js"(J,V){"use strict";var v=uo(),x=Vr();V.exports=function(l,e){var t=l.contours;if(l.autocontour){var a=l.zmin,r=l.zmax;(l.zauto||a===void 0)&&(a=x.aggNums(Math.min,null,e)),(l.zauto||r===void 0)&&(r=x.aggNums(Math.max,null,e));var n=E(a,r,l.ncontours);t.size=n.dtick,t.start=v.tickFirst(n),n.range.reverse(),t.end=v.tickFirst(n),t.start===a&&(t.start+=t.size),t.end===r&&(t.end-=t.size),t.start>t.end&&(t.start=t.end=(t.start+t.end)/2),l._input.contours||(l._input.contours={}),x.extendFlat(l._input.contours,{start:t.start,end:t.end,size:t.size}),l._input.autocontour=!0}else if(t.type!=="constraint"){var o=t.start,s=t.end,c=l._input.contours;if(o>s&&(t.start=c.start=s,s=t.end=c.end=o,o=t.start),!(t.size>0)){var m;o===s?m=1:m=E(o,s,l.ncontours).dtick,c.size=t.size=m}}};function E(k,l,e){var t={type:"linear",range:[k,l]};return v.autoTicks(t,(l-k)/(e||15)),t}}}),im=Ee({"src/traces/contour/end_plus.js"(J,V){"use strict";V.exports=function(x){return x.end+x.size/1e6}}}),jx=Ee({"src/traces/contour/calc.js"(J,V){"use strict";var v=pl(),x=v1(),E=Ox(),k=im();V.exports=function(e,t){var a=x(e,t),r=a[0].z;E(t,r);var n=t.contours,o=v.extractOpts(t),s;if(n.coloring==="heatmap"&&o.auto&&t.autocontour===!1){var c=n.start,m=k(n),h=n.size||1,p=Math.floor((m-c)/h)+1;isFinite(h)||(h=1,p=1);var g=c-h/2,i=g+p*h;s=[g,i]}else s=r;return v.calc(e,t,{vals:s,cLetter:"z"}),a}}}),om=Ee({"src/traces/contour/constants.js"(J,V){"use strict";V.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}}}}),Ux=Ee({"src/traces/contour/make_crossings.js"(J,V){"use strict";var v=om();V.exports=function(k){var l=k[0].z,e=l.length,t=l[0].length,a=e===2||t===2,r,n,o,s,c,m,h,p,g;for(n=0;nE?0:1)+(k[0][1]>E?0:2)+(k[1][1]>E?0:4)+(k[1][0]>E?0:8);if(l===5||l===10){var e=(k[0][0]+k[0][1]+k[1][0]+k[1][1])/4;return E>e?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),qx=Ee({"src/traces/contour/find_all_paths.js"(J,V){"use strict";var v=Vr(),x=om();V.exports=function(r,n,o){var s,c,m,h,p;for(n=n||.01,o=o||.01,m=0;m20?(m=x.CHOOSESADDLE[m][(h[0]||h[1])<0?0:1],a.crossings[c]=x.SADDLEREMAINDER[m]):delete a.crossings[c],h=x.NEWDELTA[m],!h){v.log("Found bad marching index:",m,r,a.level);break}p.push(t(a,r,h)),r[0]+=h[0],r[1]+=h[1],c=r.join(","),E(p[p.length-1],p[p.length-2],o,s)&&p.pop();var C=h[0]&&(r[0]<0||r[0]>i-2)||h[1]&&(r[1]<0||r[1]>g-2),_=r[0]===w[0]&&r[1]===w[1]&&h[0]===S[0]&&h[1]===S[1];if(_||n&&C)break;m=a.crossings[c]}M===1e4&&v.log("Infinite loop in contour?");var T=E(p[0],p[p.length-1],o,s),f=0,u=.2*a.smoothing,A=[],b=0,z,I,N,R,B,F,P,j,U,Z,Q;for(M=1;M=b;M--)if(z=A[M],z=b&&z+A[I]j&&U--,a.edgepaths[U]=Q.concat(p,Z));break}H||(a.edgepaths[j]=p.concat(Z))}for(j=0;j20&&r?a===208||a===1114?o=n[0]===0?1:-1:s=n[1]===0?1:-1:x.BOTTOMSTART.indexOf(a)!==-1?s=1:x.LEFTSTART.indexOf(a)!==-1?o=1:x.TOPSTART.indexOf(a)!==-1?s=-1:o=-1,[o,s]}function t(a,r,n){var o=r[0]+Math.max(n[0],0),s=r[1]+Math.max(n[1],0),c=a.z[s][o],m=a.xaxis,h=a.yaxis;if(n[1]){var p=(a.level-c)/(a.z[s][o+1]-c),g=(p!==1?(1-p)*m.c2l(a.x[o]):0)+(p!==0?p*m.c2l(a.x[o+1]):0);return[m.c2p(m.l2c(g),!0),h.c2p(a.y[s],!0),o+p,s]}else{var i=(a.level-c)/(a.z[s+1][o]-c),w=(i!==1?(1-i)*h.c2l(a.y[s]):0)+(i!==0?i*h.c2l(a.y[s+1]):0);return[m.c2p(a.x[o],!0),h.c2p(h.l2c(w),!0),o,s+i]}}}}),wS=Ee({"src/traces/contour/constraint_mapping.js"(J,V){"use strict";var v=w1(),x=mi();V.exports={"[]":k("[]"),"][":k("]["),">":l(">"),"<":l("<"),"=":l("=")};function E(e,t){var a=Array.isArray(t),r;function n(o){return x(o)?+o:null}return v.COMPARISON_OPS2.indexOf(e)!==-1?r=n(a?t[0]:t):v.INTERVAL_OPS.indexOf(e)!==-1?r=a?[n(t[0]),n(t[1])]:[n(t),n(t)]:v.SET_OPS.indexOf(e)!==-1&&(r=a?t.map(n):[n(t)]),r}function k(e){return function(t){t=E(e,t);var a=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:a,end:r,size:r-a}}}function l(e){return function(t){return t=E(e,t),{start:t,end:1/0,size:1/0}}}}}),Vx=Ee({"src/traces/contour/empty_pathinfo.js"(J,V){"use strict";var v=Vr(),x=wS(),E=im();V.exports=function(l,e,t){for(var a=l.type==="constraint"?x[l._operation](l.value):l,r=a.size,n=[],o=E(a),s=t.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:t.a,y:t.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:t.x,y:t.y},m=a.start;m1e3){v.warn("Too many contours, clipping at 1000",l);break}return n}}}),Hx=Ee({"src/traces/contour/convert_to_constraints.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k){var l,e,t,a=function(o){return o.reverse()},r=function(o){return o};switch(k){case"=":case"<":return E;case">":for(E.length!==1&&v.warn("Contour data invalid for the specified inequality operation."),e=E[0],l=0;lt.level||t.starts.length&&e===t.level)}break;case"constraint":if(E.prefixBoundary=!1,E.edgepaths.length)return;var a=E.x.length,r=E.y.length,n=-1/0,o=1/0;for(l=0;l":s>n&&(E.prefixBoundary=!0);break;case"<":(sn||E.starts.length&&m===o)&&(E.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),m=Math.max(s[0],s[1]),cn&&(E.prefixBoundary=!0);break}break}}}}),M1=Ee({"src/traces/contour/plot.js"(J){"use strict";var V=Hn(),v=Vr(),x=yo(),E=pl(),k=Fs(),l=uo(),e=Hh(),t=m1(),a=Ux(),r=qx(),n=Vx(),o=Hx(),s=Gx(),c=om(),m=c.LABELOPTIMIZER;J.plot=function(_,T,f,u){var A=T.xaxis,b=T.yaxis;v.makeTraceGroups(u,f,"contour").each(function(z){var I=V.select(this),N=z[0],R=N.trace,B=N.x,F=N.y,P=R.contours,j=n(P,T,N),U=v.ensureSingle(I,"g","heatmapcoloring"),Z=[];P.coloring==="heatmap"&&(Z=[z]),t(_,T,Z,U),a(j),r(j);var Q=A.c2p(B[0],!0),re=A.c2p(B[B.length-1],!0),ae=b.c2p(F[0],!0),oe=b.c2p(F[F.length-1],!0),H=[[Q,oe],[re,oe],[re,ae],[Q,ae]],X=j;P.type==="constraint"&&(X=o(j,P._operation)),h(I,H,P),p(I,X,H,P),i(I,j,_,N,P),S(I,T,_,N,H)})};function h(C,_,T){var f=v.ensureSingle(C,"g","contourbg"),u=f.selectAll("path").data(T.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+_.join("L")+"Z").style("stroke","none")}function p(C,_,T,f){var u=f.coloring==="fill"||f.type==="constraint"&&f._operation!=="=",A="M"+T.join("L")+"Z";u&&s(_,f);var b=v.ensureSingle(C,"g","contourfill"),z=b.selectAll("path").data(u?_:[]);z.enter().append("path"),z.exit().remove(),z.each(function(I){var N=(I.prefixBoundary?A:"")+g(I,T);N?V.select(this).attr("d",N).style("stroke","none"):V.select(this).remove()})}function g(C,_){var T="",f=0,u=C.edgepaths.map(function(Q,re){return re}),A=!0,b,z,I,N,R,B;function F(Q){return Math.abs(Q[1]-_[0][1])<.01}function P(Q){return Math.abs(Q[1]-_[2][1])<.01}function j(Q){return Math.abs(Q[0]-_[0][0])<.01}function U(Q){return Math.abs(Q[0]-_[2][0])<.01}for(;u.length;){for(B=x.smoothopen(C.edgepaths[f],C.smoothing),T+=A?B:B.replace(/^M/,"L"),u.splice(u.indexOf(f),1),b=C.edgepaths[f][C.edgepaths[f].length-1],N=-1,I=0;I<4;I++){if(!b){v.log("Missing end?",f,C);break}for(F(b)&&!U(b)?z=_[1]:j(b)?z=_[0]:P(b)?z=_[3]:U(b)&&(z=_[2]),R=0;R=0&&(z=Z,N=R):Math.abs(b[1]-z[1])<.01?Math.abs(b[1]-Z[1])<.01&&(Z[0]-b[0])*(z[0]-Z[0])>=0&&(z=Z,N=R):v.log("endpt to newendpt is not vert. or horz.",b,z,Z)}if(b=z,N>=0)break;T+="L"+z}if(N===C.edgepaths.length){v.log("unclosed perimeter path");break}f=N,A=u.indexOf(f)===-1,A&&(f=u[0],T+="Z")}for(f=0;fm.MAXCOST*2)break;F&&(z/=2),b=N-z/2,I=b+z*1.5}if(B<=m.MAXCOST)return R};function w(C,_,T,f){var u=_.width/2,A=_.height/2,b=C.x,z=C.y,I=C.theta,N=Math.cos(I)*u,R=Math.sin(I)*u,B=(b>f.center?f.right-b:b-f.left)/(N+Math.abs(Math.sin(I)*A)),F=(z>f.middle?f.bottom-z:z-f.top)/(Math.abs(R)+Math.cos(I)*A);if(B<1||F<1)return 1/0;var P=m.EDGECOST*(1/(B-1)+1/(F-1));P+=m.ANGLECOST*I*I;for(var j=b-N,U=z-R,Z=b+N,Q=z+R,re=0;re=S)&&(t<=w&&(t=w),a>=S&&(a=S),n=Math.floor((a-t)/r)+1,o=0),i=0;iw&&(h.unshift(w),p.unshift(p[0])),h[h.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:v(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(o("contours.value",0),v(s.value)||(t(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),MS=Ee({"src/traces/contour/defaults.js"(J,V){"use strict";var v=Vr(),x=u1(),E=Ih(),k=Xx(),l=T1(),e=A1(),t=nm(),a=am();V.exports=function(n,o,s,c){function m(i,w){return v.coerce(n,o,a,i,w)}function h(i){return v.coerce2(n,o,a,i)}var p=x(n,o,m,c);if(!p){o.visible=!1;return}E(n,o,c,m),m("xhoverformat"),m("yhoverformat"),m("text"),m("hovertext"),m("hoverongaps"),m("hovertemplate"),m("hovertemplatefallback");var g=m("contours.type")==="constraint";m("connectgaps",v.isArray1D(o.z)),g?k(n,o,m,c,s):(l(n,o,m,h),e(n,o,m,c)),o.contours&&o.contours.coloring==="heatmap"&&t(m,c),m("zorder")}}}),SS=Ee({"src/traces/contour/index.js"(J,V){"use strict";V.exports={attributes:am(),supplyDefaults:MS(),calc:jx(),plot:M1().plot,style:S1(),colorbar:E1(),hoverPoints:Yx(),moduleType:"trace",name:"contour",basePlotModule:Mu(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),ES=Ee({"lib/contour.js"(J,V){"use strict";V.exports=SS()}}),$x=Ee({"src/traces/scatterternary/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=Yh(),l=ou(),e=ia(),t=$s(),a=kc().dash,r=vo().extendFlat,n=l.marker,o=l.line,s=n.line;V.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:r({},l.mode,{dflt:"markers"}),text:r({},l.text,{}),texttemplate:x({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:r({},l.hovertext,{}),line:{color:o.color,width:o.width,dash:a,backoff:o.backoff,shape:r({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:r({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:k(),marker:r({symbol:n.symbol,opacity:n.opacity,angle:n.angle,angleref:n.angleref,standoff:n.standoff,maxdisplayed:n.maxdisplayed,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:r({width:s.width,dash:s.dash,editType:"calc"},t("marker.line")),gradient:n.gradient,editType:"calc"},t("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:r({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:v(),hovertemplatefallback:E()}}}),kS=Ee({"src/traces/scatterternary/defaults.js"(J,V){"use strict";var v=Vr(),x=Wh(),E=al(),k=gh(),l=Rh(),e=Up(),t=Fh(),a=Xh(),r=$x();V.exports=function(o,s,c,m){function h(C,_){return v.coerce(o,s,r,C,_)}var p=h("a"),g=h("b"),i=h("c"),w;if(p?(w=p.length,g?(w=Math.min(w,g.length),i&&(w=Math.min(w,i.length))):i?w=Math.min(w,i.length):w=0):g&&i&&(w=Math.min(g.length,i.length)),!w){s.visible=!1;return}s._length=w,h("sum"),h("text"),h("hovertext"),s.hoveron!=="fills"&&(h("hovertemplate"),h("hovertemplatefallback"));var S=w"),a.hovertemplate=m.hovertemplate,t}}}),IS=Ee({"src/traces/scatterternary/event_data.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){if(E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),l[e]){var t=l[e];x.a=t.a,x.b=t.b,x.c=t.c}else x.a=E.a,x.b=E.b,x.c=E.c;return x}}}),RS=Ee({"src/plots/ternary/ternary.js"(J,V){"use strict";var v=Hn(),x=Ri(),E=Vr(),k=E.strTranslate,l=E._,e=Qa(),t=yo(),a=Hh(),r=vo().extendFlat,n=vl(),o=uo(),s=qf(),c=$l(),m=Gh(),h=m.freeMode,p=m.rectMode,g=Lv(),i=uc().prepSelect,w=uc().selectOnClick,S=uc().clearOutline,M=uc().clearSelectionsCache,C=tc();function _(F,P){this.id=F.id,this.graphDiv=F.graphDiv,this.init(P),this.makeFramework(P),this.updateFx(P),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}V.exports=_;var T=_.prototype;T.init=function(F){this.container=F._ternarylayer,this.defs=F._defs,this.layoutId=F._uid,this.traceHash={},this.layers={}},T.plot=function(F,P){var j=this,U=P[j.id],Z=P._size;j._hasClipOnAxisFalse=!1;for(var Q=0;Qf*H?(ne=H,ee=ne*f):(ee=oe,ne=ee/f),fe=re*ee/oe,ye=ae*ne/H,q=P.l+P.w*Z-ee/2,$=P.t+P.h*(1-Q)-ne/2,j.x0=q,j.y0=$,j.w=ee,j.h=ne,j.sum=X,j.xaxis={type:"linear",range:[K+2*Y-X,X-K-2*G],domain:[Z-fe/2,Z+fe/2],_id:"x"},a(j.xaxis,j.graphDiv._fullLayout),j.xaxis.setScale(),j.xaxis.isPtWithinRange=function(se){return se.a>=j.aaxis.range[0]&&se.a<=j.aaxis.range[1]&&se.b>=j.baxis.range[1]&&se.b<=j.baxis.range[0]&&se.c>=j.caxis.range[1]&&se.c<=j.caxis.range[0]},j.yaxis={type:"linear",range:[K,X-G-Y],domain:[Q-ye/2,Q+ye/2],_id:"y"},a(j.yaxis,j.graphDiv._fullLayout),j.yaxis.setScale(),j.yaxis.isPtWithinRange=function(){return!0};var xe=j.yaxis.domain[0],Ae=j.aaxis=r({},F.aaxis,{range:[K,X-G-Y],side:"left",tickangle:(+F.aaxis.tickangle||0)-30,domain:[xe,xe+ye*f],anchor:"free",position:0,_id:"y",_length:ee});a(Ae,j.graphDiv._fullLayout),Ae.setScale();var Me=j.baxis=r({},F.baxis,{range:[X-K-Y,G],side:"bottom",domain:j.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ee});a(Me,j.graphDiv._fullLayout),Me.setScale();var Ie=j.caxis=r({},F.caxis,{range:[X-K-G,Y],side:"right",tickangle:(+F.caxis.tickangle||0)+30,domain:[xe,xe+ye*f],anchor:"free",position:0,_id:"y",_length:ee});a(Ie,j.graphDiv._fullLayout),Ie.setScale();var Ue="M"+q+","+($+ne)+"h"+ee+"l-"+ee/2+",-"+ne+"Z";j.clipDef.select("path").attr("d",Ue),j.layers.plotbg.select("path").attr("d",Ue);var qe="M0,"+ne+"h"+ee+"l-"+ee/2+",-"+ne+"Z";j.clipDefRelative.select("path").attr("d",qe);var ke=k(q,$);j.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ke),j.clipDefRelative.select("path").attr("transform",null);var ge=k(q-Me._offset,$+ne);j.layers.baxis.attr("transform",ge),j.layers.bgrid.attr("transform",ge);var ue=k(q+ee/2,$)+"rotate(30)"+k(0,-Ae._offset);j.layers.aaxis.attr("transform",ue),j.layers.agrid.attr("transform",ue);var ve=k(q+ee/2,$)+"rotate(-30)"+k(0,-Ie._offset);j.layers.caxis.attr("transform",ve),j.layers.cgrid.attr("transform",ve),j.drawAxes(!0),j.layers.aline.select("path").attr("d",Ae.showline?"M"+q+","+($+ne)+"l"+ee/2+",-"+ne:"M0,0").call(e.stroke,Ae.linecolor||"#000").style("stroke-width",(Ae.linewidth||0)+"px"),j.layers.bline.select("path").attr("d",Me.showline?"M"+q+","+($+ne)+"h"+ee:"M0,0").call(e.stroke,Me.linecolor||"#000").style("stroke-width",(Me.linewidth||0)+"px"),j.layers.cline.select("path").attr("d",Ie.showline?"M"+(q+ee/2)+","+$+"l"+ee/2+","+ne:"M0,0").call(e.stroke,Ie.linecolor||"#000").style("stroke-width",(Ie.linewidth||0)+"px"),j.graphDiv._context.staticPlot||j.initInteractions(),t.setClipUrl(j.layers.frontplot,j._hasClipOnAxisFalse?null:j.clipId,j.graphDiv)},T.drawAxes=function(F){var P=this,j=P.graphDiv,U=P.id.slice(7)+"title",Z=P.layers,Q=P.aaxis,re=P.baxis,ae=P.caxis;if(P.drawAx(Q),P.drawAx(re),P.drawAx(ae),F){var oe=Math.max(Q.showticklabels?Q.tickfont.size/2:0,(ae.showticklabels?ae.tickfont.size*.75:0)+(ae.ticks==="outside"?ae.ticklen*.87:0)),H=(re.showticklabels?re.tickfont.size:0)+(re.ticks==="outside"?re.ticklen:0)+3;Z["a-title"]=g.draw(j,"a"+U,{propContainer:Q,propName:P.id+".aaxis.title.text",placeholder:l(j,"Click to enter Component A title"),attributes:{x:P.x0+P.w/2,y:P.y0-Q.title.font.size/3-oe,"text-anchor":"middle"}}),Z["b-title"]=g.draw(j,"b"+U,{propContainer:re,propName:P.id+".baxis.title.text",placeholder:l(j,"Click to enter Component B title"),attributes:{x:P.x0-H,y:P.y0+P.h+re.title.font.size*.83+H,"text-anchor":"middle"}}),Z["c-title"]=g.draw(j,"c"+U,{propContainer:ae,propName:P.id+".caxis.title.text",placeholder:l(j,"Click to enter Component C title"),attributes:{x:P.x0+P.w+H,y:P.y0+P.h+ae.title.font.size*.83+H,"text-anchor":"middle"}})}},T.drawAx=function(F){var P=this,j=P.graphDiv,U=F._name,Z=U.charAt(0),Q=F._id,re=P.layers[U],ae=30,oe=Z+"tickLayout",H=u(F);P[oe]!==H&&(re.selectAll("."+Q+"tick").remove(),P[oe]=H),F.setScale();var X=o.calcTicks(F),K=o.clipEnds(F,X),G=o.makeTransTickFn(F),Y=o.getTickSigns(F)[2],q=E.deg2rad(ae),$=Y*(F.linewidth||1)/2,ee=Y*F.ticklen,ne=P.w,fe=P.h,ye=Z==="b"?"M0,"+$+"l"+Math.sin(q)*ee+","+Math.cos(q)*ee:"M"+$+",0l"+Math.cos(q)*ee+","+-Math.sin(q)*ee,xe={a:"M0,0l"+fe+",-"+ne/2,b:"M0,0l-"+ne/2+",-"+fe,c:"M0,0l-"+fe+","+ne/2}[Z];o.drawTicks(j,F,{vals:F.ticks==="inside"?K:X,layer:re,path:ye,transFn:G,crisp:!1}),o.drawGrid(j,F,{vals:K,layer:P.layers[Z+"grid"],path:xe,transFn:G,crisp:!1}),o.drawLabels(j,F,{vals:X,layer:re,transFn:G,labelFns:o.makeLabelFns(F,0,ae)})};function u(F){return F.ticks+String(F.ticklen)+String(F.showticklabels)}var A=C.MINZOOM/2+.87,b="m-0.87,.5h"+A+"v3h-"+(A+5.2)+"l"+(A/2+2.6)+",-"+(A*.87+4.5)+"l2.6,1.5l-"+A/2+","+A*.87+"Z",z="m0.87,.5h-"+A+"v3h"+(A+5.2)+"l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-2.6,1.5l"+A/2+","+A*.87+"Z",I="m0,1l"+A/2+","+A*.87+"l2.6,-1.5l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-"+(A/2+2.6)+","+(A*.87+4.5)+"l2.6,1.5l"+A/2+",-"+A*.87+"Z",N="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",R=!0;T.clearOutline=function(){M(this.dragOptions),S(this.dragOptions.gd)},T.initInteractions=function(){var F=this,P=F.layers.plotbg.select("path").node(),j=F.graphDiv,U=j._fullLayout._zoomlayer,Z,Q;this.dragOptions={element:P,gd:j,plotinfo:{id:F.id,domain:j._fullLayout[F.id].domain,xaxis:F.xaxis,yaxis:F.yaxis},subplot:F.id,prepFn:function(ge,ue,ve){F.dragOptions.xaxes=[F.xaxis],F.dragOptions.yaxes=[F.yaxis],Z=j._fullLayout._invScaleX,Q=j._fullLayout._invScaleY;var se=F.dragOptions.dragmode=j._fullLayout.dragmode;h(se)?F.dragOptions.minDrag=1:F.dragOptions.minDrag=void 0,se==="zoom"?(F.dragOptions.moveFn=Me,F.dragOptions.clickFn=ne,F.dragOptions.doneFn=Ie,fe(ge,ue,ve)):se==="pan"?(F.dragOptions.moveFn=qe,F.dragOptions.clickFn=ne,F.dragOptions.doneFn=ke,Ue(),F.clearOutline(j)):(p(se)||h(se))&&i(ge,ue,ve,F.dragOptions,se)}};var re,ae,oe,H,X,K,G,Y,q,$;function ee(ge){var ue={};return ue[F.id+".aaxis.min"]=ge.a,ue[F.id+".baxis.min"]=ge.b,ue[F.id+".caxis.min"]=ge.c,ue}function ne(ge,ue){var ve=j._fullLayout.clickmode;B(j),ge===2&&(j.emit("plotly_doubleclick",null),x.call("_guiRelayout",j,ee({a:0,b:0,c:0}))),ve.indexOf("select")>-1&&ge===1&&w(ue,j,[F.xaxis],[F.yaxis],F.id,F.dragOptions),ve.indexOf("event")>-1&&c.click(j,ue,F.id)}function fe(ge,ue,ve){var se=P.getBoundingClientRect();re=ue-se.left,ae=ve-se.top,j._fullLayout._calcInverseTransform(j);var Te=j._fullLayout._invTransform,Fe=E.apply3DTransform(Te)(re,ae);re=Fe[0],ae=Fe[1],oe={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=oe,H=F.aaxis.range[1]-oe.a,K=e.luminosity(F.graphDiv._fullLayout[F.id].bgcolor),G="M0,"+F.h+"L"+F.w/2+", 0L"+F.w+","+F.h+"Z",Y=!1,q=U.append("path").attr("class","zoombox").attr("transform",k(F.x0,F.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",G),$=U.append("path").attr("class","zoombox-corners").attr("transform",k(F.x0,F.y0)).style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),F.clearOutline(j)}function ye(ge,ue){return 1-ue/F.h}function xe(ge,ue){return 1-(ge+(F.h-ue)/Math.sqrt(3))/F.w}function Ae(ge,ue){return(ge-(F.h-ue)/Math.sqrt(3))/F.w}function Me(ge,ue){var ve=re+ge*Z,se=ae+ue*Q,Te=Math.max(0,Math.min(1,ye(re,ae),ye(ve,se))),Fe=Math.max(0,Math.min(1,xe(re,ae),xe(ve,se))),We=Math.max(0,Math.min(1,Ae(re,ae),Ae(ve,se))),Ge=(Te/2+We)*F.w,gt=(1-Te/2-Fe)*F.w,mt=(Ge+gt)/2,Tt=gt-Ge,At=(1-Te)*F.h,Kt=At-Tt/f;Tt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),$.transition().style("opacity",1).duration(200),Y=!0),j.emit("plotly_relayouting",ee(X))}function Ie(){B(j),X!==oe&&(x.call("_guiRelayout",j,ee(X)),R&&j.data&&j._context.showTips&&(E.notifier(l(j,"Double-click to zoom back out"),"long",j),R=!1))}function Ue(){oe={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=oe}function qe(ge,ue){var ve=ge/F.xaxis._m,se=ue/F.yaxis._m;X={a:oe.a-se,b:oe.b+(ve+se)/2,c:oe.c-(ve-se)/2};var Te=[X.a,X.b,X.c].sort(E.sorterAsc),Fe={a:Te.indexOf(X.a),b:Te.indexOf(X.b),c:Te.indexOf(X.c)};Te[0]<0&&(Te[1]+Te[0]/2<0?(Te[2]+=Te[0]+Te[1],Te[0]=Te[1]=0):(Te[2]+=Te[0]/2,Te[1]+=Te[0]/2,Te[0]=0),X={a:Te[Fe.a],b:Te[Fe.b],c:Te[Fe.c]},ue=(oe.a-X.a)*F.yaxis._m,ge=(oe.c-X.c-oe.b+X.b)*F.xaxis._m);var We=k(F.x0+ge,F.y0+ue);F.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",We);var Ge=k(-ge,-ue);F.clipDefRelative.select("path").attr("transform",Ge),F.aaxis.range=[X.a,F.sum-X.b-X.c],F.baxis.range=[F.sum-X.a-X.c,X.b],F.caxis.range=[F.sum-X.a-X.b,X.c],F.drawAxes(!1),F._hasClipOnAxisFalse&&F.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,F),j.emit("plotly_relayouting",ee(X))}function ke(){x.call("_guiRelayout",j,ee(X))}P.onmousemove=function(ge){c.hover(j,ge,F.id),j._fullLayout._lasthover=P,j._fullLayout._hoversubplot=F.id},P.onmouseout=function(ge){j._dragging||s.unhover(j,ge)},s.init(this.dragOptions)};function B(F){v.select(F).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),Zx=Ee({"src/plots/ternary/layout_attributes.js"(J,V){"use strict";var v=rs(),x=kl().attributes,E=Gc(),k=El().overrideAll,l=vo().extendFlat,e={title:{text:E.title.text,font:E.title.font},color:E.color,tickmode:E.minor.tickmode,nticks:l({},E.nticks,{dflt:6,min:1}),tick0:E.tick0,dtick:E.dtick,tickvals:E.tickvals,ticktext:E.ticktext,ticks:E.ticks,ticklen:E.ticklen,tickwidth:E.tickwidth,tickcolor:E.tickcolor,ticklabelstep:E.ticklabelstep,showticklabels:E.showticklabels,labelalias:E.labelalias,showtickprefix:E.showtickprefix,tickprefix:E.tickprefix,showticksuffix:E.showticksuffix,ticksuffix:E.ticksuffix,showexponent:E.showexponent,exponentformat:E.exponentformat,minexponent:E.minexponent,separatethousands:E.separatethousands,tickfont:E.tickfont,tickangle:E.tickangle,tickformat:E.tickformat,tickformatstops:E.tickformatstops,hoverformat:E.hoverformat,showline:l({},E.showline,{dflt:!0}),linecolor:E.linecolor,linewidth:E.linewidth,showgrid:l({},E.showgrid,{dflt:!0}),gridcolor:E.gridcolor,gridwidth:E.gridwidth,griddash:E.griddash,layer:E.layer,min:{valType:"number",dflt:0,min:0}},t=V.exports=k({domain:x({name:"ternary"}),bgcolor:{valType:"color",dflt:v.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}}}),Bv=Ee({"src/plots/subplot_defaults.js"(J,V){"use strict";var v=Vr(),x=xs(),E=kl().defaults;V.exports=function(l,e,t,a){var r=a.type,n=a.attributes,o=a.handleDefaults,s=a.partition||"x",c=e._subplots[r],m=c.length,h=m&&c[0].replace(/\d+$/,""),p,g;function i(C,_){return v.coerce(p,g,n,C,_)}for(var w=0;w=w&&(T.min=0,f.min=0,u.min=0,m.aaxis&&delete m.aaxis.min,m.baxis&&delete m.baxis.min,m.caxis&&delete m.caxis.min)}function c(m,h,p,g){var i=n[h._name];function w(A,b){return E.coerce(m,h,i,A,b)}w("uirevision",g.uirevision),h.type="linear";var S=w("color"),M=S!==i.color.dflt?S:p.font.color,C=h._name,_=C.charAt(0).toUpperCase(),T="Component "+_,f=w("title.text",T);h._hovertitle=f===T?f:_,E.coerceFont(w,"title.font",p.font,{overrideDflt:{size:E.bigFont(p.font.size),color:M}}),w("min"),a(m,h,w,"linear"),e(m,h,w,"linear"),l(m,h,w,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),t(m,h,w,{outerTicks:!0});var u=w("showticklabels");u&&(E.coerceFont(w,"tickfont",p.font,{overrideDflt:{color:M}}),w("tickangle"),w("tickformat")),r(m,h,w,{dfltColor:S,bgColor:p.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),w("hoverformat"),w("layer")}}}),zS=Ee({"src/plots/ternary/index.js"(J){"use strict";var V=RS(),v=uf().getSubplotCalcData,x=Vr().counterRegex,E="ternary";J.name=E;var k=J.attr="subplot";J.idRoot=E,J.idRegex=J.attrRegex=x(E);var l=J.attributes={};l[k]={valType:"subplotid",dflt:"ternary",editType:"calc"},J.layoutAttributes=Zx(),J.supplyLayoutDefaults=FS(),J.plot=function(t){for(var a=t._fullLayout,r=t.calcdata,n=a._subplots[E],o=0;o0){var C=t.xa,_=t.ya,T,f,u,A,b;m.orientation==="h"?(b=a,T="y",u=_,f="x",A=C):(b=r,T="x",u=C,f="y",A=_);var z=c[t.index];if(b>=z.span[0]&&b<=z.span[1]){var I=x.extendFlat({},t),N=A.c2p(b,!0),R=l.getKdeValue(z,m,b),B=l.getPositionOnKdePath(z,m,N),F=u._offset,P=u._length;I[T+"0"]=B[0],I[T+"1"]=B[1],I[f+"0"]=I[f+"1"]=N,I[f+"Label"]=f+": "+E.hoverLabelText(A,b,m[f+"hoverformat"])+", "+c[0].t.labels.kde+" "+R.toFixed(3);for(var j=0,U=0;U path").each(function(p){if(!p.isBlank){var g=h.marker;v.select(this).call(E.fill,p.mc||g.color).call(E.stroke,p.mlc||g.line.color).call(x.dashLine,g.line.dash,p.mlw||g.line.width).style("opacity",h.selectedpoints&&!p.selected?k:1)}}),t(m,h,r),m.selectAll(".regions").each(function(){v.select(this).selectAll("path").style("stroke-width",0).call(E.fill,h.connector.fillcolor)}),m.selectAll(".lines").each(function(){var p=h.connector.line;x.lineGroupStyle(v.select(this).selectAll("path"),p.width,p.color,p.dash)})})}V.exports={style:a}}}),tE=Ee({"src/traces/funnel/hover.js"(J,V){"use strict";var v=Qa().opacity,x=Gp().hoverOnBars,E=Vr().formatPercent;V.exports=function(e,t,a,r,n){var o=x(e,t,a,r,n);if(o){var s=o.cd,c=s[0].trace,m=c.orientation==="h",h=o.index,p=s[h],g=m?"x":"y";o[g+"LabelVal"]=p.s,o.percentInitial=p.begR,o.percentInitialLabel=E(p.begR,1),o.percentPrevious=p.difR,o.percentPreviousLabel=E(p.difR,1),o.percentTotal=p.sumR,o.percentTotalLabel=E(p.sumR,1);var i=p.hi||c.hoverinfo,w=[];if(i&&i!=="none"&&i!=="skip"){var S=i==="all",M=i.split("+"),C=function(_){return S||M.indexOf(_)!==-1};C("percent initial")&&w.push(o.percentInitialLabel+" of initial"),C("percent previous")&&w.push(o.percentPreviousLabel+" of previous"),C("percent total")&&w.push(o.percentTotalLabel+" of total")}return o.extraText=w.join("
"),o.color=k(c,p),[o]}};function k(l,e){var t=l.marker,a=e.mc||t.color,r=e.mlc||t.line.color,n=e.mlw||t.line.width;if(v(a))return a;if(v(r)&&n)return r}}}),rE=Ee({"src/traces/funnel/event_data.js"(J,V){"use strict";V.exports=function(x,E){return x.x="xVal"in E?E.xVal:E.x,x.y="yVal"in E?E.yVal:E.y,"percentInitial"in E&&(x.percentInitial=E.percentInitial),"percentPrevious"in E&&(x.percentPrevious=E.percentPrevious),"percentTotal"in E&&(x.percentTotal=E.percentTotal),E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),x}}}),nE=Ee({"src/traces/funnel/index.js"(J,V){"use strict";V.exports={attributes:Qx(),layoutAttributes:e2(),supplyDefaults:t2().supplyDefaults,crossTraceDefaults:t2().crossTraceDefaults,supplyLayoutDefaults:$S(),calc:KS(),crossTraceCalc:JS(),plot:QS(),style:eE().style,hoverPoints:tE(),eventData:rE(),selectPoints:Wp(),moduleType:"trace",name:"funnel",basePlotModule:Mu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),aE=Ee({"lib/funnel.js"(J,V){"use strict";V.exports=nE()}}),iE=Ee({"src/traces/waterfall/constants.js"(J,V){"use strict";V.exports={eventDataKeys:["initial","delta","final"]}}}),r2=Ee({"src/traces/waterfall/attributes.js"(J,V){"use strict";var v=Zh(),x=ou().line,E=ia(),k=Fl().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),a=iE(),r=vo().extendFlat,n=Qa();function o(s){return{marker:{color:r({},v.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},v.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},v.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}V.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:v.x,x0:v.x0,dx:v.dx,y:v.y,y0:v.y0,dy:v.dy,xperiod:v.xperiod,yperiod:v.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:v.xperiodalignment,yperiodalignment:v.yperiodalignment,xhoverformat:k("x"),yhoverformat:k("y"),hovertext:v.hovertext,hovertemplate:l({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),hoverinfo:r({},E.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label"])}),texttemplatefallback:t({editType:"plot"}),text:v.text,textposition:v.textposition,insidetextanchor:v.insidetextanchor,textangle:v.textangle,textfont:v.textfont,insidetextfont:v.insidetextfont,outsidetextfont:v.outsidetextfont,constraintext:v.constraintext,cliponaxis:v.cliponaxis,orientation:v.orientation,offset:v.offset,width:v.width,increasing:o("increasing"),decreasing:o("decreasing"),totals:o("intermediate sums and total"),connector:{line:{color:r({},x.color,{dflt:n.defaultLine}),width:r({},x.width,{editType:"plot"}),dash:x.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:v.offsetgroup,alignmentgroup:v.alignmentgroup,zorder:v.zorder}}}),n2=Ee({"src/traces/waterfall/layout_attributes.js"(J,V){"use strict";V.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"}}}}),$p=Ee({"src/constants/delta.js"(J,V){"use strict";V.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),a2=Ee({"src/traces/waterfall/defaults.js"(J,V){"use strict";var v=Vr(),x=Iv(),E=fh().handleText,k=Dv(),l=Ih(),e=r2(),t=Qa(),a=$p(),r=a.INCREASING.COLOR,n=a.DECREASING.COLOR,o="#4499FF";function s(h,p,g){h(p+".marker.color",g),h(p+".marker.line.color",t.defaultLine),h(p+".marker.line.width")}function c(h,p,g,i){function w(T,f){return v.coerce(h,p,e,T,f)}var S=k(h,p,i,w);if(!S){p.visible=!1;return}l(h,p,i,w),w("xhoverformat"),w("yhoverformat"),w("measure"),w("orientation",p.x&&!p.y?"h":"v"),w("base"),w("offset"),w("width"),w("text"),w("hovertext"),w("hovertemplate"),w("hovertemplatefallback");var M=w("textposition");E(h,p,i,w,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),p.textposition!=="none"&&(w("texttemplate"),w("texttemplatefallback"),p.texttemplate||w("textinfo")),s(w,"increasing",r),s(w,"decreasing",n),s(w,"totals",o);var C=w("connector.visible");if(C){w("connector.mode");var _=w("connector.line.width");_&&(w("connector.line.color"),w("connector.line.dash"))}w("zorder")}function m(h,p){var g,i;function w(M){return v.coerce(i._input,i,e,M)}if(p.waterfallmode==="group")for(var S=0;S0&&(w?b+="M"+u[0]+","+A[1]+"V"+A[0]:b+="M"+u[1]+","+A[0]+"H"+u[0]),S!=="between"&&(_.isSum||T path").each(function(p){if(!p.isBlank){var g=h[p.dir].marker;v.select(this).call(E.fill,g.color).call(E.stroke,g.line.color).call(x.dashLine,g.line.dash,g.line.width).style("opacity",h.selectedpoints&&!p.selected?k:1)}}),t(m,h,r),m.selectAll(".lines").each(function(){var p=h.connector.line;x.lineGroupStyle(v.select(this).selectAll("path"),p.width,p.color,p.dash)})})}V.exports={style:a}}}),fE=Ee({"src/traces/waterfall/hover.js"(J,V){"use strict";var v=uo().hoverLabelText,x=Qa().opacity,E=Gp().hoverOnBars,k=$p(),l={increasing:k.INCREASING.SYMBOL,decreasing:k.DECREASING.SYMBOL};V.exports=function(a,r,n,o,s){var c=E(a,r,n,o,s);if(!c)return;var m=c.cd,h=m[0].trace,p=h.orientation==="h",g=p?"x":"y",i=p?a.xa:a.ya;function w(z){return v(i,z,h[g+"hoverformat"])}var S=c.index,M=m[S],C=M.isSum?M.b+M.s:M.rawS;c.initial=M.b+M.s-C,c.delta=C,c.final=c.initial+c.delta;var _=w(Math.abs(c.delta));c.deltaLabel=C<0?"("+_+")":_,c.finalLabel=w(c.final),c.initialLabel=w(c.initial);var T=M.hi||h.hoverinfo,f=[];if(T&&T!=="none"&&T!=="skip"){var u=T==="all",A=T.split("+"),b=function(z){return u||A.indexOf(z)!==-1};M.isSum||(b("final")&&(p?!b("x"):!b("y"))&&f.push(c.finalLabel),b("delta")&&(C<0?f.push(c.deltaLabel+" "+l.decreasing):f.push(c.deltaLabel+" "+l.increasing)),b("initial")&&f.push("Initial: "+c.initialLabel))}return f.length&&(c.extraText=f.join("
")),c.color=e(h,M),[c]};function e(t,a){var r=t[a.dir].marker,n=r.color,o=r.line.color,s=r.line.width;if(x(n))return n;if(x(o)&&s)return o}}}),hE=Ee({"src/traces/waterfall/event_data.js"(J,V){"use strict";V.exports=function(x,E){return x.x="xVal"in E?E.xVal:E.x,x.y="yVal"in E?E.yVal:E.y,"initial"in E&&(x.initial=E.initial),"delta"in E&&(x.delta=E.delta),"final"in E&&(x.final=E.final),E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),x}}}),dE=Ee({"src/traces/waterfall/index.js"(J,V){"use strict";V.exports={attributes:r2(),layoutAttributes:n2(),supplyDefaults:a2().supplyDefaults,crossTraceDefaults:a2().crossTraceDefaults,supplyLayoutDefaults:oE(),calc:sE(),crossTraceCalc:lE(),plot:uE(),style:cE().style,hoverPoints:fE(),eventData:hE(),selectPoints:Wp(),moduleType:"trace",name:"waterfall",basePlotModule:Mu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),vE=Ee({"lib/waterfall.js"(J,V){"use strict";V.exports=dE()}}),Zp=Ee({"src/traces/image/constants.js"(J,V){"use strict";V.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(v){return v.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(v){return v.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(v){var x=v.slice(0,3);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(v){var x=v.slice(0,4);return x[1]=x[1]+"%",x[2]=x[2]+"%",x},suffix:["\xB0","%","%",""]}}}}}),C1={};yn(C1,{default:()=>c2});var i2,o2,L1,s2,l2,P1,D1,I1,u2,c2,f2=In({"src/traces/image/attributes.ts"(){"use strict";i2=Yn(vo()),o2=Yn(ia()),L1=Yn(Cs()),s2=Yn(ou()),l2=Yn(Zp()),P1=["rgb","rgba","rgba256","hsl","hsla"],D1=[],I1=[];for(let J of P1){let V=l2.colormodel[J];D1.push(`For the \`${J}\` colormodel, it is [${(V.zminDflt||V.min).join(", ")}].`),I1.push(`For the \`${J}\` colormodel, it is [${(V.zmaxDflt||V.max).join(", ")}].`)}u2={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:P1,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",D1.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",I1.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,i2.extendFlat)({},o2.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,L1.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,L1.templatefallbackAttrs)(),zorder:s2.zorder},c2=u2}}),pE=Ee({"src/traces/image/defaults.js"(J,V){"use strict";var v=Vr(),x=(f2(),ra(C1)).default,E=Zp(),k=yd().IMAGE_URL_PREFIX;V.exports=function(e,t){function a(o,s){return v.coerce(e,t,x,o,s)}a("source"),t.source&&!t.source.match(k)&&delete t.source,t._hasSource=!!t.source;var r=a("z");if(t._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}a("x0"),a("y0"),a("dx"),a("dy");var n;t._hasZ?(a("colormodel","rgb"),n=E.colormodel[t.colormodel],a("zmin",n.zminDflt||n.min),a("zmax",n.zmaxDflt||n.max)):t._hasSource&&(t.colormodel="rgba256",n=E.colormodel[t.colormodel],t.zmin=n.zminDflt,t.zmax=n.zmaxDflt),a("zsmooth"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),t._length=null,a("zorder")}}}),_d=Ee({"node_modules/inherits/inherits_browser.js"(J,V){typeof Object.create=="function"?V.exports=function(x,E){E&&(x.super_=E,x.prototype=Object.create(E.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}))}:V.exports=function(x,E){if(E){x.super_=E;var k=function(){};k.prototype=E.prototype,x.prototype=new k,x.prototype.constructor=x}}}}),h2=Ee({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(J,V){V.exports=kv().EventEmitter}}),mE=Ee({"node_modules/base64-js/index.js"(J){"use strict";J.byteLength=t,J.toByteArray=r,J.fromByteArray=s;var V=[],v=[],x=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(k=0,l=E.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var h=c.indexOf("=");h===-1&&(h=m);var p=h===m?0:4-h%4;return[h,p]}function t(c){var m=e(c),h=m[0],p=m[1];return(h+p)*3/4-p}function a(c,m,h){return(m+h)*3/4-h}function r(c){var m,h=e(c),p=h[0],g=h[1],i=new x(a(c,p,g)),w=0,S=g>0?p-4:p,M;for(M=0;M>16&255,i[w++]=m>>8&255,i[w++]=m&255;return g===2&&(m=v[c.charCodeAt(M)]<<2|v[c.charCodeAt(M+1)]>>4,i[w++]=m&255),g===1&&(m=v[c.charCodeAt(M)]<<10|v[c.charCodeAt(M+1)]<<4|v[c.charCodeAt(M+2)]>>2,i[w++]=m>>8&255,i[w++]=m&255),i}function n(c){return V[c>>18&63]+V[c>>12&63]+V[c>>6&63]+V[c&63]}function o(c,m,h){for(var p,g=[],i=m;iS?S:w+i));return p===1?(m=c[h-1],g.push(V[m>>2]+V[m<<4&63]+"==")):p===2&&(m=(c[h-2]<<8)+c[h-1],g.push(V[m>>10]+V[m>>4&63]+V[m<<2&63]+"=")),g.join("")}}}),gE=Ee({"node_modules/ieee754/index.js"(J){J.read=function(V,v,x,E,k){var l,e,t=k*8-E-1,a=(1<>1,n=-7,o=x?k-1:0,s=x?-1:1,c=V[v+o];for(o+=s,l=c&(1<<-n)-1,c>>=-n,n+=t;n>0;l=l*256+V[v+o],o+=s,n-=8);for(e=l&(1<<-n)-1,l>>=-n,n+=E;n>0;e=e*256+V[v+o],o+=s,n-=8);if(l===0)l=1-r;else{if(l===a)return e?NaN:(c?-1:1)*(1/0);e=e+Math.pow(2,E),l=l-r}return(c?-1:1)*e*Math.pow(2,l-E)},J.write=function(V,v,x,E,k,l){var e,t,a,r=l*8-k-1,n=(1<>1,s=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=E?0:l-1,m=E?1:-1,h=v<0||v===0&&1/v<0?1:0;for(v=Math.abs(v),isNaN(v)||v===1/0?(t=isNaN(v)?1:0,e=n):(e=Math.floor(Math.log(v)/Math.LN2),v*(a=Math.pow(2,-e))<1&&(e--,a*=2),e+o>=1?v+=s/a:v+=s*Math.pow(2,1-o),v*a>=2&&(e++,a/=2),e+o>=n?(t=0,e=n):e+o>=1?(t=(v*a-1)*Math.pow(2,k),e=e+o):(t=v*Math.pow(2,o-1)*Math.pow(2,k),e=0));k>=8;V[x+c]=t&255,c+=m,t/=256,k-=8);for(e=e<0;V[x+c]=e&255,c+=m,e/=256,r-=8);V[x+c-m]|=h*128}}}),Nv=Ee({"node_modules/buffer/index.js"(J){"use strict";var V=mE(),v=gE(),x=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;J.Buffer=e,J.SlowBuffer=g,J.INSPECT_MAX_BYTES=50;var E=2147483647;J.kMaxLength=E,e.TYPED_ARRAY_SUPPORT=k(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function k(){try{let ue=new Uint8Array(1),ve={foo:function(){return 42}};return Object.setPrototypeOf(ve,Uint8Array.prototype),Object.setPrototypeOf(ue,ve),ue.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function l(ue){if(ue>E)throw new RangeError('The value "'+ue+'" is invalid for option "size"');let ve=new Uint8Array(ue);return Object.setPrototypeOf(ve,e.prototype),ve}function e(ue,ve,se){if(typeof ue=="number"){if(typeof ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return n(ue)}return t(ue,ve,se)}e.poolSize=8192;function t(ue,ve,se){if(typeof ue=="string")return o(ue,ve);if(ArrayBuffer.isView(ue))return c(ue);if(ue==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ue);if(Ie(ue,ArrayBuffer)||ue&&Ie(ue.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ue,SharedArrayBuffer)||ue&&Ie(ue.buffer,SharedArrayBuffer)))return m(ue,ve,se);if(typeof ue=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Te=ue.valueOf&&ue.valueOf();if(Te!=null&&Te!==ue)return e.from(Te,ve,se);let Fe=h(ue);if(Fe)return Fe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ue[Symbol.toPrimitive]=="function")return e.from(ue[Symbol.toPrimitive]("string"),ve,se);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ue)}e.from=function(ue,ve,se){return t(ue,ve,se)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function a(ue){if(typeof ue!="number")throw new TypeError('"size" argument must be of type number');if(ue<0)throw new RangeError('The value "'+ue+'" is invalid for option "size"')}function r(ue,ve,se){return a(ue),ue<=0?l(ue):ve!==void 0?typeof se=="string"?l(ue).fill(ve,se):l(ue).fill(ve):l(ue)}e.alloc=function(ue,ve,se){return r(ue,ve,se)};function n(ue){return a(ue),l(ue<0?0:p(ue)|0)}e.allocUnsafe=function(ue){return n(ue)},e.allocUnsafeSlow=function(ue){return n(ue)};function o(ue,ve){if((typeof ve!="string"||ve==="")&&(ve="utf8"),!e.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);let se=i(ue,ve)|0,Te=l(se),Fe=Te.write(ue,ve);return Fe!==se&&(Te=Te.slice(0,Fe)),Te}function s(ue){let ve=ue.length<0?0:p(ue.length)|0,se=l(ve);for(let Te=0;Te=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return ue|0}function g(ue){return+ue!=ue&&(ue=0),e.alloc(+ue)}e.isBuffer=function(ve){return ve!=null&&ve._isBuffer===!0&&ve!==e.prototype},e.compare=function(ve,se){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),Ie(se,Uint8Array)&&(se=e.from(se,se.offset,se.byteLength)),!e.isBuffer(ve)||!e.isBuffer(se))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ve===se)return 0;let Te=ve.length,Fe=se.length;for(let We=0,Ge=Math.min(Te,Fe);WeFe.length?(e.isBuffer(Ge)||(Ge=e.from(Ge)),Ge.copy(Fe,We)):Uint8Array.prototype.set.call(Fe,Ge,We);else if(e.isBuffer(Ge))Ge.copy(Fe,We);else throw new TypeError('"list" argument must be an Array of Buffers');We+=Ge.length}return Fe};function i(ue,ve){if(e.isBuffer(ue))return ue.length;if(ArrayBuffer.isView(ue)||Ie(ue,ArrayBuffer))return ue.byteLength;if(typeof ue!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ue);let se=ue.length,Te=arguments.length>2&&arguments[2]===!0;if(!Te&&se===0)return 0;let Fe=!1;for(;;)switch(ve){case"ascii":case"latin1":case"binary":return se;case"utf8":case"utf-8":return fe(ue).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return se*2;case"hex":return se>>>1;case"base64":return Ae(ue).length;default:if(Fe)return Te?-1:fe(ue).length;ve=(""+ve).toLowerCase(),Fe=!0}}e.byteLength=i;function w(ue,ve,se){let Te=!1;if((ve===void 0||ve<0)&&(ve=0),ve>this.length||((se===void 0||se>this.length)&&(se=this.length),se<=0)||(se>>>=0,ve>>>=0,se<=ve))return"";for(ue||(ue="utf8");;)switch(ue){case"hex":return F(this,ve,se);case"utf8":case"utf-8":return z(this,ve,se);case"ascii":return R(this,ve,se);case"latin1":case"binary":return B(this,ve,se);case"base64":return b(this,ve,se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ve,se);default:if(Te)throw new TypeError("Unknown encoding: "+ue);ue=(ue+"").toLowerCase(),Te=!0}}e.prototype._isBuffer=!0;function S(ue,ve,se){let Te=ue[ve];ue[ve]=ue[se],ue[se]=Te}e.prototype.swap16=function(){let ve=this.length;if(ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let se=0;sese&&(ve+=" ... "),""},x&&(e.prototype[x]=e.prototype.inspect),e.prototype.compare=function(ve,se,Te,Fe,We){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),!e.isBuffer(ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ve);if(se===void 0&&(se=0),Te===void 0&&(Te=ve?ve.length:0),Fe===void 0&&(Fe=0),We===void 0&&(We=this.length),se<0||Te>ve.length||Fe<0||We>this.length)throw new RangeError("out of range index");if(Fe>=We&&se>=Te)return 0;if(Fe>=We)return-1;if(se>=Te)return 1;if(se>>>=0,Te>>>=0,Fe>>>=0,We>>>=0,this===ve)return 0;let Ge=We-Fe,gt=Te-se,mt=Math.min(Ge,gt),Tt=this.slice(Fe,We),At=ve.slice(se,Te);for(let Kt=0;Kt2147483647?se=2147483647:se<-2147483648&&(se=-2147483648),se=+se,Ue(se)&&(se=Fe?0:ue.length-1),se<0&&(se=ue.length+se),se>=ue.length){if(Fe)return-1;se=ue.length-1}else if(se<0)if(Fe)se=0;else return-1;if(typeof ve=="string"&&(ve=e.from(ve,Te)),e.isBuffer(ve))return ve.length===0?-1:C(ue,ve,se,Te,Fe);if(typeof ve=="number")return ve=ve&255,typeof Uint8Array.prototype.indexOf=="function"?Fe?Uint8Array.prototype.indexOf.call(ue,ve,se):Uint8Array.prototype.lastIndexOf.call(ue,ve,se):C(ue,[ve],se,Te,Fe);throw new TypeError("val must be string, number or Buffer")}function C(ue,ve,se,Te,Fe){let We=1,Ge=ue.length,gt=ve.length;if(Te!==void 0&&(Te=String(Te).toLowerCase(),Te==="ucs2"||Te==="ucs-2"||Te==="utf16le"||Te==="utf-16le")){if(ue.length<2||ve.length<2)return-1;We=2,Ge/=2,gt/=2,se/=2}function mt(At,Kt){return We===1?At[Kt]:At.readUInt16BE(Kt*We)}let Tt;if(Fe){let At=-1;for(Tt=se;TtGe&&(se=Ge-gt),Tt=se;Tt>=0;Tt--){let At=!0;for(let Kt=0;KtFe&&(Te=Fe)):Te=Fe;let We=ve.length;Te>We/2&&(Te=We/2);let Ge;for(Ge=0;Ge>>0,isFinite(Te)?(Te=Te>>>0,Fe===void 0&&(Fe="utf8")):(Fe=Te,Te=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let We=this.length-se;if((Te===void 0||Te>We)&&(Te=We),ve.length>0&&(Te<0||se<0)||se>this.length)throw new RangeError("Attempt to write outside buffer bounds");Fe||(Fe="utf8");let Ge=!1;for(;;)switch(Fe){case"hex":return _(this,ve,se,Te);case"utf8":case"utf-8":return T(this,ve,se,Te);case"ascii":case"latin1":case"binary":return f(this,ve,se,Te);case"base64":return u(this,ve,se,Te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,ve,se,Te);default:if(Ge)throw new TypeError("Unknown encoding: "+Fe);Fe=(""+Fe).toLowerCase(),Ge=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function b(ue,ve,se){return ve===0&&se===ue.length?V.fromByteArray(ue):V.fromByteArray(ue.slice(ve,se))}function z(ue,ve,se){se=Math.min(ue.length,se);let Te=[],Fe=ve;for(;Fe239?4:We>223?3:We>191?2:1;if(Fe+gt<=se){let mt,Tt,At,Kt;switch(gt){case 1:We<128&&(Ge=We);break;case 2:mt=ue[Fe+1],(mt&192)===128&&(Kt=(We&31)<<6|mt&63,Kt>127&&(Ge=Kt));break;case 3:mt=ue[Fe+1],Tt=ue[Fe+2],(mt&192)===128&&(Tt&192)===128&&(Kt=(We&15)<<12|(mt&63)<<6|Tt&63,Kt>2047&&(Kt<55296||Kt>57343)&&(Ge=Kt));break;case 4:mt=ue[Fe+1],Tt=ue[Fe+2],At=ue[Fe+3],(mt&192)===128&&(Tt&192)===128&&(At&192)===128&&(Kt=(We&15)<<18|(mt&63)<<12|(Tt&63)<<6|At&63,Kt>65535&&Kt<1114112&&(Ge=Kt))}}Ge===null?(Ge=65533,gt=1):Ge>65535&&(Ge-=65536,Te.push(Ge>>>10&1023|55296),Ge=56320|Ge&1023),Te.push(Ge),Fe+=gt}return N(Te)}var I=4096;function N(ue){let ve=ue.length;if(ve<=I)return String.fromCharCode.apply(String,ue);let se="",Te=0;for(;TeTe)&&(se=Te);let Fe="";for(let We=ve;WeTe&&(ve=Te),se<0?(se+=Te,se<0&&(se=0)):se>Te&&(se=Te),sese)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(ve,se,Te){ve=ve>>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=this[ve],We=1,Ge=0;for(;++Ge>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=this[ve+--se],We=1;for(;se>0&&(We*=256);)Fe+=this[ve+--se]*We;return Fe},e.prototype.readUint8=e.prototype.readUInt8=function(ve,se){return ve=ve>>>0,se||j(ve,1,this.length),this[ve]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(ve,se){return ve=ve>>>0,se||j(ve,2,this.length),this[ve]|this[ve+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(ve,se){return ve=ve>>>0,se||j(ve,2,this.length),this[ve]<<8|this[ve+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),(this[ve]|this[ve+1]<<8|this[ve+2]<<16)+this[ve+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),this[ve]*16777216+(this[ve+1]<<16|this[ve+2]<<8|this[ve+3])},e.prototype.readBigUInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&$(ve,this.length-8);let Fe=se+this[++ve]*2**8+this[++ve]*2**16+this[++ve]*2**24,We=this[++ve]+this[++ve]*2**8+this[++ve]*2**16+Te*2**24;return BigInt(Fe)+(BigInt(We)<>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&$(ve,this.length-8);let Fe=se*2**24+this[++ve]*2**16+this[++ve]*2**8+this[++ve],We=this[++ve]*2**24+this[++ve]*2**16+this[++ve]*2**8+Te;return(BigInt(Fe)<>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=this[ve],We=1,Ge=0;for(;++Ge=We&&(Fe-=Math.pow(2,8*se)),Fe},e.prototype.readIntBE=function(ve,se,Te){ve=ve>>>0,se=se>>>0,Te||j(ve,se,this.length);let Fe=se,We=1,Ge=this[ve+--Fe];for(;Fe>0&&(We*=256);)Ge+=this[ve+--Fe]*We;return We*=128,Ge>=We&&(Ge-=Math.pow(2,8*se)),Ge},e.prototype.readInt8=function(ve,se){return ve=ve>>>0,se||j(ve,1,this.length),this[ve]&128?(255-this[ve]+1)*-1:this[ve]},e.prototype.readInt16LE=function(ve,se){ve=ve>>>0,se||j(ve,2,this.length);let Te=this[ve]|this[ve+1]<<8;return Te&32768?Te|4294901760:Te},e.prototype.readInt16BE=function(ve,se){ve=ve>>>0,se||j(ve,2,this.length);let Te=this[ve+1]|this[ve]<<8;return Te&32768?Te|4294901760:Te},e.prototype.readInt32LE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),this[ve]|this[ve+1]<<8|this[ve+2]<<16|this[ve+3]<<24},e.prototype.readInt32BE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),this[ve]<<24|this[ve+1]<<16|this[ve+2]<<8|this[ve+3]},e.prototype.readBigInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&$(ve,this.length-8);let Fe=this[ve+4]+this[ve+5]*2**8+this[ve+6]*2**16+(Te<<24);return(BigInt(Fe)<>>0,q(ve,"offset");let se=this[ve],Te=this[ve+7];(se===void 0||Te===void 0)&&$(ve,this.length-8);let Fe=(se<<24)+this[++ve]*2**16+this[++ve]*2**8+this[++ve];return(BigInt(Fe)<>>0,se||j(ve,4,this.length),v.read(this,ve,!0,23,4)},e.prototype.readFloatBE=function(ve,se){return ve=ve>>>0,se||j(ve,4,this.length),v.read(this,ve,!1,23,4)},e.prototype.readDoubleLE=function(ve,se){return ve=ve>>>0,se||j(ve,8,this.length),v.read(this,ve,!0,52,8)},e.prototype.readDoubleBE=function(ve,se){return ve=ve>>>0,se||j(ve,8,this.length),v.read(this,ve,!1,52,8)};function U(ue,ve,se,Te,Fe,We){if(!e.isBuffer(ue))throw new TypeError('"buffer" argument must be a Buffer instance');if(ve>Fe||veue.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(ve,se,Te,Fe){if(ve=+ve,se=se>>>0,Te=Te>>>0,!Fe){let gt=Math.pow(2,8*Te)-1;U(this,ve,se,Te,gt,0)}let We=1,Ge=0;for(this[se]=ve&255;++Ge>>0,Te=Te>>>0,!Fe){let gt=Math.pow(2,8*Te)-1;U(this,ve,se,Te,gt,0)}let We=Te-1,Ge=1;for(this[se+We]=ve&255;--We>=0&&(Ge*=256);)this[se+We]=ve/Ge&255;return se+Te},e.prototype.writeUint8=e.prototype.writeUInt8=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,1,255,0),this[se]=ve&255,se+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,65535,0),this[se]=ve&255,this[se+1]=ve>>>8,se+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,65535,0),this[se]=ve>>>8,this[se+1]=ve&255,se+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,4294967295,0),this[se+3]=ve>>>24,this[se+2]=ve>>>16,this[se+1]=ve>>>8,this[se]=ve&255,se+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,4294967295,0),this[se]=ve>>>24,this[se+1]=ve>>>16,this[se+2]=ve>>>8,this[se+3]=ve&255,se+4};function Z(ue,ve,se,Te,Fe){Y(ve,Te,Fe,ue,se,7);let We=Number(ve&BigInt(4294967295));ue[se++]=We,We=We>>8,ue[se++]=We,We=We>>8,ue[se++]=We,We=We>>8,ue[se++]=We;let Ge=Number(ve>>BigInt(32)&BigInt(4294967295));return ue[se++]=Ge,Ge=Ge>>8,ue[se++]=Ge,Ge=Ge>>8,ue[se++]=Ge,Ge=Ge>>8,ue[se++]=Ge,se}function Q(ue,ve,se,Te,Fe){Y(ve,Te,Fe,ue,se,7);let We=Number(ve&BigInt(4294967295));ue[se+7]=We,We=We>>8,ue[se+6]=We,We=We>>8,ue[se+5]=We,We=We>>8,ue[se+4]=We;let Ge=Number(ve>>BigInt(32)&BigInt(4294967295));return ue[se+3]=Ge,Ge=Ge>>8,ue[se+2]=Ge,Ge=Ge>>8,ue[se+1]=Ge,Ge=Ge>>8,ue[se]=Ge,se+8}e.prototype.writeBigUInt64LE=ke(function(ve,se=0){return Z(this,ve,se,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=ke(function(ve,se=0){return Q(this,ve,se,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(ve,se,Te,Fe){if(ve=+ve,se=se>>>0,!Fe){let mt=Math.pow(2,8*Te-1);U(this,ve,se,Te,mt-1,-mt)}let We=0,Ge=1,gt=0;for(this[se]=ve&255;++We>0)-gt&255;return se+Te},e.prototype.writeIntBE=function(ve,se,Te,Fe){if(ve=+ve,se=se>>>0,!Fe){let mt=Math.pow(2,8*Te-1);U(this,ve,se,Te,mt-1,-mt)}let We=Te-1,Ge=1,gt=0;for(this[se+We]=ve&255;--We>=0&&(Ge*=256);)ve<0&>===0&&this[se+We+1]!==0&&(gt=1),this[se+We]=(ve/Ge>>0)-gt&255;return se+Te},e.prototype.writeInt8=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,1,127,-128),ve<0&&(ve=255+ve+1),this[se]=ve&255,se+1},e.prototype.writeInt16LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,32767,-32768),this[se]=ve&255,this[se+1]=ve>>>8,se+2},e.prototype.writeInt16BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,2,32767,-32768),this[se]=ve>>>8,this[se+1]=ve&255,se+2},e.prototype.writeInt32LE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,2147483647,-2147483648),this[se]=ve&255,this[se+1]=ve>>>8,this[se+2]=ve>>>16,this[se+3]=ve>>>24,se+4},e.prototype.writeInt32BE=function(ve,se,Te){return ve=+ve,se=se>>>0,Te||U(this,ve,se,4,2147483647,-2147483648),ve<0&&(ve=4294967295+ve+1),this[se]=ve>>>24,this[se+1]=ve>>>16,this[se+2]=ve>>>8,this[se+3]=ve&255,se+4},e.prototype.writeBigInt64LE=ke(function(ve,se=0){return Z(this,ve,se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=ke(function(ve,se=0){return Q(this,ve,se,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function re(ue,ve,se,Te,Fe,We){if(se+Te>ue.length)throw new RangeError("Index out of range");if(se<0)throw new RangeError("Index out of range")}function ae(ue,ve,se,Te,Fe){return ve=+ve,se=se>>>0,Fe||re(ue,ve,se,4,34028234663852886e22,-34028234663852886e22),v.write(ue,ve,se,Te,23,4),se+4}e.prototype.writeFloatLE=function(ve,se,Te){return ae(this,ve,se,!0,Te)},e.prototype.writeFloatBE=function(ve,se,Te){return ae(this,ve,se,!1,Te)};function oe(ue,ve,se,Te,Fe){return ve=+ve,se=se>>>0,Fe||re(ue,ve,se,8,17976931348623157e292,-17976931348623157e292),v.write(ue,ve,se,Te,52,8),se+8}e.prototype.writeDoubleLE=function(ve,se,Te){return oe(this,ve,se,!0,Te)},e.prototype.writeDoubleBE=function(ve,se,Te){return oe(this,ve,se,!1,Te)},e.prototype.copy=function(ve,se,Te,Fe){if(!e.isBuffer(ve))throw new TypeError("argument should be a Buffer");if(Te||(Te=0),!Fe&&Fe!==0&&(Fe=this.length),se>=ve.length&&(se=ve.length),se||(se=0),Fe>0&&Fe=this.length)throw new RangeError("Index out of range");if(Fe<0)throw new RangeError("sourceEnd out of bounds");Fe>this.length&&(Fe=this.length),ve.length-se>>0,Te=Te===void 0?this.length:Te>>>0,ve||(ve=0);let We;if(typeof ve=="number")for(We=se;We2**32?Fe=K(String(se)):typeof se=="bigint"&&(Fe=String(se),(se>BigInt(2)**BigInt(32)||se<-(BigInt(2)**BigInt(32)))&&(Fe=K(Fe)),Fe+="n"),Te+=` It must be ${ve}. Received ${Fe}`,Te},RangeError);function K(ue){let ve="",se=ue.length,Te=ue[0]==="-"?1:0;for(;se>=Te+4;se-=3)ve=`_${ue.slice(se-3,se)}${ve}`;return`${ue.slice(0,se)}${ve}`}function G(ue,ve,se){q(ve,"offset"),(ue[ve]===void 0||ue[ve+se]===void 0)&&$(ve,ue.length-(se+1))}function Y(ue,ve,se,Te,Fe,We){if(ue>se||ue3?ve===0||ve===BigInt(0)?gt=`>= 0${Ge} and < 2${Ge} ** ${(We+1)*8}${Ge}`:gt=`>= -(2${Ge} ** ${(We+1)*8-1}${Ge}) and < 2 ** ${(We+1)*8-1}${Ge}`:gt=`>= ${ve}${Ge} and <= ${se}${Ge}`,new H.ERR_OUT_OF_RANGE("value",gt,ue)}G(Te,Fe,We)}function q(ue,ve){if(typeof ue!="number")throw new H.ERR_INVALID_ARG_TYPE(ve,"number",ue)}function $(ue,ve,se){throw Math.floor(ue)!==ue?(q(ue,se),new H.ERR_OUT_OF_RANGE(se||"offset","an integer",ue)):ve<0?new H.ERR_BUFFER_OUT_OF_BOUNDS:new H.ERR_OUT_OF_RANGE(se||"offset",`>= ${se?1:0} and <= ${ve}`,ue)}var ee=/[^+/0-9A-Za-z-_]/g;function ne(ue){if(ue=ue.split("=")[0],ue=ue.trim().replace(ee,""),ue.length<2)return"";for(;ue.length%4!==0;)ue=ue+"=";return ue}function fe(ue,ve){ve=ve||1/0;let se,Te=ue.length,Fe=null,We=[];for(let Ge=0;Ge55295&&se<57344){if(!Fe){if(se>56319){(ve-=3)>-1&&We.push(239,191,189);continue}else if(Ge+1===Te){(ve-=3)>-1&&We.push(239,191,189);continue}Fe=se;continue}if(se<56320){(ve-=3)>-1&&We.push(239,191,189),Fe=se;continue}se=(Fe-55296<<10|se-56320)+65536}else Fe&&(ve-=3)>-1&&We.push(239,191,189);if(Fe=null,se<128){if((ve-=1)<0)break;We.push(se)}else if(se<2048){if((ve-=2)<0)break;We.push(se>>6|192,se&63|128)}else if(se<65536){if((ve-=3)<0)break;We.push(se>>12|224,se>>6&63|128,se&63|128)}else if(se<1114112){if((ve-=4)<0)break;We.push(se>>18|240,se>>12&63|128,se>>6&63|128,se&63|128)}else throw new Error("Invalid code point")}return We}function ye(ue){let ve=[];for(let se=0;se>8,Fe=se%256,We.push(Fe),We.push(Te);return We}function Ae(ue){return V.toByteArray(ne(ue))}function Me(ue,ve,se,Te){let Fe;for(Fe=0;Fe=ve.length||Fe>=ue.length);++Fe)ve[Fe+se]=ue[Fe];return Fe}function Ie(ue,ve){return ue instanceof ve||ue!=null&&ue.constructor!=null&&ue.constructor.name!=null&&ue.constructor.name===ve.name}function Ue(ue){return ue!==ue}var qe=function(){let ue="0123456789abcdef",ve=new Array(256);for(let se=0;se<16;++se){let Te=se*16;for(let Fe=0;Fe<16;++Fe)ve[Te+Fe]=ue[se]+ue[Fe]}return ve}();function ke(ue){return typeof BigInt>"u"?ge:ue}function ge(){throw new Error("BigInt not supported")}}}),R1=Ee({"node_modules/has-symbols/shams.js"(J,V){"use strict";V.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var x={},E=Symbol("test"),k=Object(E);if(typeof E=="string"||Object.prototype.toString.call(E)!=="[object Symbol]"||Object.prototype.toString.call(k)!=="[object Symbol]")return!1;var l=42;x[E]=l;for(var e in x)return!1;if(typeof Object.keys=="function"&&Object.keys(x).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(x).length!==0)return!1;var t=Object.getOwnPropertySymbols(x);if(t.length!==1||t[0]!==E||!Object.prototype.propertyIsEnumerable.call(x,E))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(x,E);if(a.value!==l||a.enumerable!==!0)return!1}return!0}}}),sm=Ee({"node_modules/has-tostringtag/shams.js"(J,V){"use strict";var v=R1();V.exports=function(){return v()&&!!Symbol.toStringTag}}}),F1=Ee({"node_modules/es-object-atoms/index.js"(J,V){"use strict";V.exports=Object}}),yE=Ee({"node_modules/es-errors/index.js"(J,V){"use strict";V.exports=Error}}),_E=Ee({"node_modules/es-errors/eval.js"(J,V){"use strict";V.exports=EvalError}}),bE=Ee({"node_modules/es-errors/range.js"(J,V){"use strict";V.exports=RangeError}}),xE=Ee({"node_modules/es-errors/ref.js"(J,V){"use strict";V.exports=ReferenceError}}),d2=Ee({"node_modules/es-errors/syntax.js"(J,V){"use strict";V.exports=SyntaxError}}),Kp=Ee({"node_modules/es-errors/type.js"(J,V){"use strict";V.exports=TypeError}}),wE=Ee({"node_modules/es-errors/uri.js"(J,V){"use strict";V.exports=URIError}}),TE=Ee({"node_modules/math-intrinsics/abs.js"(J,V){"use strict";V.exports=Math.abs}}),AE=Ee({"node_modules/math-intrinsics/floor.js"(J,V){"use strict";V.exports=Math.floor}}),ME=Ee({"node_modules/math-intrinsics/max.js"(J,V){"use strict";V.exports=Math.max}}),SE=Ee({"node_modules/math-intrinsics/min.js"(J,V){"use strict";V.exports=Math.min}}),EE=Ee({"node_modules/math-intrinsics/pow.js"(J,V){"use strict";V.exports=Math.pow}}),kE=Ee({"node_modules/math-intrinsics/round.js"(J,V){"use strict";V.exports=Math.round}}),CE=Ee({"node_modules/math-intrinsics/isNaN.js"(J,V){"use strict";V.exports=Number.isNaN||function(x){return x!==x}}}),LE=Ee({"node_modules/math-intrinsics/sign.js"(J,V){"use strict";var v=CE();V.exports=function(E){return v(E)||E===0?E:E<0?-1:1}}}),PE=Ee({"node_modules/gopd/gOPD.js"(J,V){"use strict";V.exports=Object.getOwnPropertyDescriptor}}),Ov=Ee({"node_modules/gopd/index.js"(J,V){"use strict";var v=PE();if(v)try{v([],"length")}catch{v=null}V.exports=v}}),lm=Ee({"node_modules/es-define-property/index.js"(J,V){"use strict";var v=Object.defineProperty||!1;if(v)try{v({},"a",{value:1})}catch{v=!1}V.exports=v}}),DE=Ee({"node_modules/has-symbols/index.js"(J,V){"use strict";var v=typeof Symbol<"u"&&Symbol,x=R1();V.exports=function(){return typeof v!="function"||typeof Symbol!="function"||typeof v("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:x()}}}),v2=Ee({"node_modules/get-proto/Reflect.getPrototypeOf.js"(J,V){"use strict";V.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),p2=Ee({"node_modules/get-proto/Object.getPrototypeOf.js"(J,V){"use strict";var v=F1();V.exports=v.getPrototypeOf||null}}),IE=Ee({"node_modules/function-bind/implementation.js"(J,V){"use strict";var v="Function.prototype.bind called on incompatible ",x=Object.prototype.toString,E=Math.max,k="[object Function]",l=function(r,n){for(var o=[],s=0;s"u"||!T?v:T(Uint8Array),N={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?v:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?v:ArrayBuffer,"%ArrayIteratorPrototype%":_&&T?T([][Symbol.iterator]()):v,"%AsyncFromSyncIteratorPrototype%":v,"%AsyncFunction%":z,"%AsyncGenerator%":z,"%AsyncGeneratorFunction%":z,"%AsyncIteratorPrototype%":z,"%Atomics%":typeof Atomics>"u"?v:Atomics,"%BigInt%":typeof BigInt>"u"?v:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?v:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?v:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?v:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E,"%eval%":eval,"%EvalError%":k,"%Float16Array%":typeof Float16Array>"u"?v:Float16Array,"%Float32Array%":typeof Float32Array>"u"?v:Float32Array,"%Float64Array%":typeof Float64Array>"u"?v:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?v:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":z,"%Int8Array%":typeof Int8Array>"u"?v:Int8Array,"%Int16Array%":typeof Int16Array>"u"?v:Int16Array,"%Int32Array%":typeof Int32Array>"u"?v:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&T?T(T([][Symbol.iterator]())):v,"%JSON%":typeof JSON=="object"?JSON:v,"%Map%":typeof Map>"u"?v:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_||!T?v:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":x,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?v:Promise,"%Proxy%":typeof Proxy>"u"?v:Proxy,"%RangeError%":l,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?v:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?v:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_||!T?v:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?v:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&T?T(""[Symbol.iterator]()):v,"%Symbol%":_?Symbol:v,"%SyntaxError%":t,"%ThrowTypeError%":C,"%TypedArray%":I,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?v:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?v:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?v:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?v:Uint32Array,"%URIError%":r,"%WeakMap%":typeof WeakMap>"u"?v:WeakMap,"%WeakRef%":typeof WeakRef>"u"?v:WeakRef,"%WeakSet%":typeof WeakSet>"u"?v:WeakSet,"%Function.prototype.call%":b,"%Function.prototype.apply%":A,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":f,"%Math.abs%":n,"%Math.floor%":o,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":m,"%Math.round%":h,"%Math.sign%":p,"%Reflect.getPrototypeOf%":u};if(T)try{null.error}catch(G){R=T(T(G)),N["%Error.prototype%"]=R}var R,B=function G(Y){var q;if(Y==="%AsyncFunction%")q=i("async function () {}");else if(Y==="%GeneratorFunction%")q=i("function* () {}");else if(Y==="%AsyncGeneratorFunction%")q=i("async function* () {}");else if(Y==="%AsyncGenerator%"){var $=G("%AsyncGeneratorFunction%");$&&(q=$.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ee=G("%AsyncGenerator%");ee&&T&&(q=T(ee.prototype))}return N[Y]=q,q},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=Jp(),j=g2(),U=P.call(b,Array.prototype.concat),Z=P.call(A,Array.prototype.splice),Q=P.call(b,String.prototype.replace),re=P.call(b,String.prototype.slice),ae=P.call(b,RegExp.prototype.exec),oe=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,X=function(Y){var q=re(Y,0,1),$=re(Y,-1);if(q==="%"&&$!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if($==="%"&&q!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var ee=[];return Q(Y,oe,function(ne,fe,ye,xe){ee[ee.length]=ye?Q(xe,H,"$1"):fe||ne}),ee},K=function(Y,q){var $=Y,ee;if(j(F,$)&&(ee=F[$],$="%"+ee[0]+"%"),j(N,$)){var ne=N[$];if(ne===z&&(ne=B($)),typeof ne>"u"&&!q)throw new a("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ee,name:$,value:ne}}throw new t("intrinsic "+Y+" does not exist!")};V.exports=function(Y,q){if(typeof Y!="string"||Y.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new a('"allowMissing" argument must be a boolean');if(ae(/^%?[^%]*%?$/,Y)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var $=X(Y),ee=$.length>0?$[0]:"",ne=K("%"+ee+"%",q),fe=ne.name,ye=ne.value,xe=!1,Ae=ne.alias;Ae&&(ee=Ae[0],Z($,U([0,1],Ae)));for(var Me=1,Ie=!0;Me<$.length;Me+=1){var Ue=$[Me],qe=re(Ue,0,1),ke=re(Ue,-1);if((qe==='"'||qe==="'"||qe==="`"||ke==='"'||ke==="'"||ke==="`")&&qe!==ke)throw new t("property names with quotes must have matching quotes");if((Ue==="constructor"||!Ie)&&(xe=!0),ee+="."+Ue,fe="%"+ee+"%",j(N,fe))ye=N[fe];else if(ye!=null){if(!(Ue in ye)){if(!q)throw new a("base intrinsic for "+Y+" exists, but the property is not available.");return}if(w&&Me+1>=$.length){var ge=w(ye,Ue);Ie=!!ge,Ie&&"get"in ge&&!("originalValue"in ge.get)?ye=ge.get:ye=ye[Ue]}else Ie=j(ye,Ue),ye=ye[Ue];Ie&&!xe&&(N[fe]=ye)}}return ye}}}),jv=Ee({"node_modules/call-bound/index.js"(J,V){"use strict";var v=j1(),x=N1(),E=x([v("%String.prototype.indexOf%")]);V.exports=function(l,e){var t=v(l,!!e);return typeof t=="function"&&E(l,".prototype.")>-1?x([t]):t}}}),zE=Ee({"node_modules/is-arguments/index.js"(J,V){"use strict";var v=sm()(),x=jv(),E=x("Object.prototype.toString"),k=function(a){return v&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:E(a)==="[object Arguments]"},l=function(a){return k(a)?!0:a!==null&&typeof a=="object"&&"length"in a&&typeof a.length=="number"&&a.length>=0&&E(a)!=="[object Array]"&&"callee"in a&&E(a.callee)==="[object Function]"},e=function(){return k(arguments)}();k.isLegacyArguments=l,V.exports=e?k:l}}),BE=Ee({"node_modules/is-regex/index.js"(J,V){"use strict";var v=jv(),x=sm()(),E=g2(),k=Ov(),l;x?(e=v("RegExp.prototype.exec"),t={},a=function(){throw t},r={toString:a,valueOf:a},typeof Symbol.toPrimitive=="symbol"&&(r[Symbol.toPrimitive]=a),l=function(c){if(!c||typeof c!="object")return!1;var m=k(c,"lastIndex"),h=m&&E(m,"value");if(!h)return!1;try{e(c,r)}catch(p){return p===t}}):(n=v("Object.prototype.toString"),o="[object RegExp]",l=function(c){return!c||typeof c!="object"&&typeof c!="function"?!1:n(c)===o});var e,t,a,r,n,o;V.exports=l}}),NE=Ee({"node_modules/safe-regex-test/index.js"(J,V){"use strict";var v=jv(),x=BE(),E=v("RegExp.prototype.exec"),k=Kp();V.exports=function(e){if(!x(e))throw new k("`regex` must be a RegExp");return function(a){return E(e,a)!==null}}}}),OE=Ee({"node_modules/generator-function/index.js"(J,V){"use strict";var v=function*(){}.constructor;V.exports=()=>v}}),jE=Ee({"node_modules/is-generator-function/index.js"(J,V){"use strict";var v=jv(),x=NE(),E=x(/^\s*(?:function)?\*/),k=sm()(),l=O1(),e=v("Object.prototype.toString"),t=v("Function.prototype.toString"),a=OE();V.exports=function(n){if(typeof n!="function")return!1;if(E(t(n)))return!0;if(!k){var o=e(n);return o==="[object GeneratorFunction]"}if(!l)return!1;var s=a();return s&&l(n)===s.prototype}}}),UE=Ee({"node_modules/is-callable/index.js"(J,V){"use strict";var v=Function.prototype.toString,x=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,E,k;if(typeof x=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw k}}),k={},x(function(){throw 42},null,E)}catch(w){w!==k&&(x=null)}else x=null;var l=/^\s*class\b/,e=function(S){try{var M=v.call(S);return l.test(M)}catch{return!1}},t=function(S){try{return e(S)?!1:(v.call(S),!0)}catch{return!1}},a=Object.prototype.toString,r="[object Object]",n="[object Function]",o="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",m="[object HTMLCollection]",h=typeof Symbol=="function"&&!!Symbol.toStringTag,p=!(0 in[,]),g=function(){return!1};typeof document=="object"&&(i=document.all,a.call(i)===a.call(document.all)&&(g=function(S){if((p||!S)&&(typeof S>"u"||typeof S=="object"))try{var M=a.call(S);return(M===s||M===c||M===m||M===r)&&S("")==null}catch{}return!1}));var i;V.exports=x?function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;try{x(S,null,E)}catch(M){if(M!==k)return!1}return!e(S)&&t(S)}:function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;if(h)return t(S);if(e(S))return!1;var M=a.call(S);return M!==n&&M!==o&&!/^\[object HTML/.test(M)?!1:t(S)}}}),qE=Ee({"node_modules/for-each/index.js"(J,V){"use strict";var v=UE(),x=Object.prototype.toString,E=Object.prototype.hasOwnProperty,k=function(r,n,o){for(var s=0,c=r.length;s=3&&(s=o),t(r)?k(r,n,s):typeof r=="string"?l(r,n,s):e(r,n,s)}}}),VE=Ee({"node_modules/possible-typed-array-names/index.js"(J,V){"use strict";V.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),HE=Ee({"node_modules/available-typed-arrays/index.js"(J,V){"use strict";var v=VE(),x=typeof globalThis>"u"?window:globalThis;V.exports=function(){for(var k=[],l=0;l3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new E("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new E("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new E("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new E("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!k&&k(e,t);if(v)v(e,t,{configurable:o===null&&c?c.configurable:!o,enumerable:r===null&&c?c.enumerable:!r,value:a,writable:n===null&&c?c.writable:!n});else if(s||!r&&!n&&!o)e[t]=a;else throw new x("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),_2=Ee({"node_modules/has-property-descriptors/index.js"(J,V){"use strict";var v=lm(),x=function(){return!!v};x.hasArrayLengthDefineBug=function(){if(!v)return null;try{return v([],"length",{value:1}).length!==1}catch{return!0}},V.exports=x}}),GE=Ee({"node_modules/set-function-length/index.js"(J,V){"use strict";var v=j1(),x=y2(),E=_2()(),k=Ov(),l=Kp(),e=v("%Math.floor%");V.exports=function(a,r){if(typeof a!="function")throw new l("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||e(r)!==r)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in a&&k){var c=k(a,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(s=!1)}return(o||s||!n)&&(E?x(a,"length",r,!0,!0):x(a,"length",r)),a}}}),WE=Ee({"node_modules/call-bind-apply-helpers/applyBind.js"(J,V){"use strict";var v=Jp(),x=B1(),E=m2();V.exports=function(){return E(v,x,arguments)}}}),um=Ee({"node_modules/call-bind/index.js"(J,V){"use strict";var v=GE(),x=lm(),E=N1(),k=WE();V.exports=function(e){var t=E(arguments),a=1+e.length-(arguments.length-1);return v(t,a>0?a:0,!0)},x?x(V.exports,"apply",{value:k}):V.exports.apply=k}}),b2=Ee({"node_modules/which-typed-array/index.js"(J,V){"use strict";var v=qE(),x=HE(),E=um(),k=jv(),l=Ov(),e=O1(),t=k("Object.prototype.toString"),a=sm()(),r=typeof globalThis>"u"?window:globalThis,n=x(),o=k("String.prototype.slice"),s=k("Array.prototype.indexOf",!0)||function(i,w){for(var S=0;S-1}V.exports=function(i){if(!i||typeof i!="object")return!1;if(!a){var w=o(t(i),8,-1);return p(w)?w:w!=="Object"?!1:h(i)}return l?m(i):null}}}),YE=Ee({"node_modules/is-typed-array/index.js"(J,V){"use strict";var v=b2();V.exports=function(E){return!!v(E)}}}),x2=Ee({"node_modules/util/support/types.js"(J){"use strict";var V=zE(),v=jE(),x=b2(),E=YE();function k(xe){return xe.call.bind(xe)}var l=typeof BigInt<"u",e=typeof Symbol<"u",t=k(Object.prototype.toString),a=k(Number.prototype.valueOf),r=k(String.prototype.valueOf),n=k(Boolean.prototype.valueOf);l&&(o=k(BigInt.prototype.valueOf));var o;e&&(s=k(Symbol.prototype.valueOf));var s;function c(xe,Ae){if(typeof xe!="object")return!1;try{return Ae(xe),!0}catch{return!1}}J.isArgumentsObject=V,J.isGeneratorFunction=v,J.isTypedArray=E;function m(xe){return typeof Promise<"u"&&xe instanceof Promise||xe!==null&&typeof xe=="object"&&typeof xe.then=="function"&&typeof xe.catch=="function"}J.isPromise=m;function h(xe){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(xe):E(xe)||Z(xe)}J.isArrayBufferView=h;function p(xe){return x(xe)==="Uint8Array"}J.isUint8Array=p;function g(xe){return x(xe)==="Uint8ClampedArray"}J.isUint8ClampedArray=g;function i(xe){return x(xe)==="Uint16Array"}J.isUint16Array=i;function w(xe){return x(xe)==="Uint32Array"}J.isUint32Array=w;function S(xe){return x(xe)==="Int8Array"}J.isInt8Array=S;function M(xe){return x(xe)==="Int16Array"}J.isInt16Array=M;function C(xe){return x(xe)==="Int32Array"}J.isInt32Array=C;function _(xe){return x(xe)==="Float32Array"}J.isFloat32Array=_;function T(xe){return x(xe)==="Float64Array"}J.isFloat64Array=T;function f(xe){return x(xe)==="BigInt64Array"}J.isBigInt64Array=f;function u(xe){return x(xe)==="BigUint64Array"}J.isBigUint64Array=u;function A(xe){return t(xe)==="[object Map]"}A.working=typeof Map<"u"&&A(new Map);function b(xe){return typeof Map>"u"?!1:A.working?A(xe):xe instanceof Map}J.isMap=b;function z(xe){return t(xe)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function I(xe){return typeof Set>"u"?!1:z.working?z(xe):xe instanceof Set}J.isSet=I;function N(xe){return t(xe)==="[object WeakMap]"}N.working=typeof WeakMap<"u"&&N(new WeakMap);function R(xe){return typeof WeakMap>"u"?!1:N.working?N(xe):xe instanceof WeakMap}J.isWeakMap=R;function B(xe){return t(xe)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function F(xe){return B(xe)}J.isWeakSet=F;function P(xe){return t(xe)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function j(xe){return typeof ArrayBuffer>"u"?!1:P.working?P(xe):xe instanceof ArrayBuffer}J.isArrayBuffer=j;function U(xe){return t(xe)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function Z(xe){return typeof DataView>"u"?!1:U.working?U(xe):xe instanceof DataView}J.isDataView=Z;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function re(xe){return t(xe)==="[object SharedArrayBuffer]"}function ae(xe){return typeof Q>"u"?!1:(typeof re.working>"u"&&(re.working=re(new Q)),re.working?re(xe):xe instanceof Q)}J.isSharedArrayBuffer=ae;function oe(xe){return t(xe)==="[object AsyncFunction]"}J.isAsyncFunction=oe;function H(xe){return t(xe)==="[object Map Iterator]"}J.isMapIterator=H;function X(xe){return t(xe)==="[object Set Iterator]"}J.isSetIterator=X;function K(xe){return t(xe)==="[object Generator]"}J.isGeneratorObject=K;function G(xe){return t(xe)==="[object WebAssembly.Module]"}J.isWebAssemblyCompiledModule=G;function Y(xe){return c(xe,a)}J.isNumberObject=Y;function q(xe){return c(xe,r)}J.isStringObject=q;function $(xe){return c(xe,n)}J.isBooleanObject=$;function ee(xe){return l&&c(xe,o)}J.isBigIntObject=ee;function ne(xe){return e&&c(xe,s)}J.isSymbolObject=ne;function fe(xe){return Y(xe)||q(xe)||$(xe)||ee(xe)||ne(xe)}J.isBoxedPrimitive=fe;function ye(xe){return typeof Uint8Array<"u"&&(j(xe)||ae(xe))}J.isAnyArrayBuffer=ye,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(xe){Object.defineProperty(J,xe,{enumerable:!1,value:function(){throw new Error(xe+" is not supported in userland")}})})}}),w2=Ee({"node_modules/util/support/isBufferBrowser.js"(J,V){V.exports=function(x){return x&&typeof x=="object"&&typeof x.copy=="function"&&typeof x.fill=="function"&&typeof x.readUInt8=="function"}}}),T2=Ee({"(disabled):node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function(Z){for(var Q=Object.keys(Z),re={},ae=0;ae=ae)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),H=re[Q];Q"u")return function(){return J.deprecate(U,Z).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error(Z);process.traceDeprecation?console.trace(Z):console.error(Z),Q=!0}return U.apply(this,arguments)}return re};var x={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!x[U])if(E.test(U)){var Z=process.pid;x[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,Z,Q)}}else x[U]=function(){};return x[U]};function l(U,Z){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),p(Z)?Q.showHidden=Z:Z&&J._extend(Q,Z),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,Z){var Q=l.styles[Z];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,Z){return U}function a(U){var Z={};return U.forEach(function(Q,re){Z[Q]=!0}),Z}function r(U,Z,Q){if(U.customInspect&&Z&&A(Z.inspect)&&Z.inspect!==J.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var re=Z.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ae=n(U,Z);if(ae)return ae;var oe=Object.keys(Z),H=a(oe);if(U.showHidden&&(oe=Object.getOwnPropertyNames(Z)),u(Z)&&(oe.indexOf("message")>=0||oe.indexOf("description")>=0))return o(Z);if(oe.length===0){if(A(Z)){var X=Z.name?": "+Z.name:"";return U.stylize("[Function"+X+"]","special")}if(_(Z))return U.stylize(RegExp.prototype.toString.call(Z),"regexp");if(f(Z))return U.stylize(Date.prototype.toString.call(Z),"date");if(u(Z))return o(Z)}var K="",G=!1,Y=["{","}"];if(h(Z)&&(G=!0,Y=["[","]"]),A(Z)){var q=Z.name?": "+Z.name:"";K=" [Function"+q+"]"}if(_(Z)&&(K=" "+RegExp.prototype.toString.call(Z)),f(Z)&&(K=" "+Date.prototype.toUTCString.call(Z)),u(Z)&&(K=" "+o(Z)),oe.length===0&&(!G||Z.length==0))return Y[0]+K+Y[1];if(Q<0)return _(Z)?U.stylize(RegExp.prototype.toString.call(Z),"regexp"):U.stylize("[Object]","special");U.seen.push(Z);var $;return G?$=s(U,Z,Q,H,oe):$=oe.map(function(ee){return c(U,Z,Q,H,ee,G)}),U.seen.pop(),m($,K,Y)}function n(U,Z){if(C(Z))return U.stylize("undefined","undefined");if(S(Z)){var Q="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w(Z))return U.stylize(""+Z,"number");if(p(Z))return U.stylize(""+Z,"boolean");if(g(Z))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,Z,Q,re,ae){for(var oe=[],H=0,X=Z.length;H-1&&(oe?X=X.split(` +`).map(function(G){return" "+G}).join(` +`).slice(2):X=` +`+X.split(` +`).map(function(G){return" "+G}).join(` +`))):X=U.stylize("[Circular]","special")),C(H)){if(oe&&ae.match(/^\d+$/))return X;H=JSON.stringify(""+ae),H.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(H=H.slice(1,-1),H=U.stylize(H,"name")):(H=H.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),H=U.stylize(H,"string"))}return H+": "+X}function m(U,Z,Q){var re=0,ae=U.reduce(function(oe,H){return re++,H.indexOf(` +`)>=0&&re++,oe+H.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ae>60?Q[0]+(Z===""?"":Z+` + `)+" "+U.join(`, + `)+" "+Q[1]:Q[0]+Z+" "+U.join(", ")+" "+Q[1]}J.types=x2();function h(U){return Array.isArray(U)}J.isArray=h;function p(U){return typeof U=="boolean"}J.isBoolean=p;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function b(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=b,J.isBuffer=w2();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var U=new Date,Z=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),N[U.getMonth()],Z].join(" ")}J.log=function(){console.log("%s - %s",R(),J.format.apply(J,arguments))},J.inherits=_d(),J._extend=function(U,Z){if(!Z||!T(Z))return U;for(var Q=Object.keys(Z),re=Q.length;re--;)U[Q[re]]=Z[Q[re]];return U};function B(U,Z){return Object.prototype.hasOwnProperty.call(U,Z)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&Z[F]){var Q=Z[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ae,oe=new Promise(function(K,G){re=K,ae=G}),H=[],X=0;X0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(g){var i={data:g,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var i=this.head,w=""+i.data;i=i.next;)w+=g+i.data;return w}},{key:"concat",value:function(g){if(this.length===0)return n.alloc(0);for(var i=n.allocUnsafe(g>>>0),w=this.head,S=0;w;)m(w.data,i,S),S+=w.data.length,w=w.next;return i}},{key:"consume",value:function(g,i){var w;return gM.length?M.length:g;if(C===M.length?S+=M:S+=M.slice(0,g),g-=C,g===0){C===M.length?(++w,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=M.slice(C));break}++w}return this.length-=w,S}},{key:"_getBuffer",value:function(g){var i=n.allocUnsafe(g),w=this.head,S=1;for(w.data.copy(i),g-=w.data.length;w=w.next;){var M=w.data,C=g>M.length?M.length:g;if(M.copy(i,i.length-g,0,C),g-=C,g===0){C===M.length?(++S,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=M.slice(C));break}++S}return this.length-=S,i}},{key:c,value:function(g,i){return s(this,x(x({},i),{},{depth:0,customInspect:!1}))}}]),h}()}}),A2=Ee({"node_modules/readable-stream/lib/internal/streams/destroy.js"(J,V){"use strict";function v(t,a){var r=this,n=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return n||o?(a?a(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,t)):process.nextTick(l,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!a&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(E,r):(r._writableState.errorEmitted=!0,process.nextTick(x,r,s)):process.nextTick(x,r,s):a?(process.nextTick(E,r),a(s)):process.nextTick(E,r)}),this)}function x(t,a){l(t,a),E(t)}function E(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function k(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(t,a){t.emit("error",a)}function e(t,a){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(a):t.emit("error",a)}V.exports={destroy:v,undestroy:k,errorOrDestroy:e}}}),Uv=Ee({"node_modules/readable-stream/errors-browser.js"(J,V){"use strict";function v(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,a.__proto__=r}var x={};function E(a,r,n){n||(n=Error);function o(c,m,h){return typeof r=="string"?r:r(c,m,h)}var s=function(c){v(m,c);function m(h,p,g){return c.call(this,o(h,p,g))||this}return m}(n);s.prototype.name=n.name,s.prototype.code=a,x[a]=s}function k(a,r){if(Array.isArray(a)){var n=a.length;return a=a.map(function(o){return String(o)}),n>2?"one of ".concat(r," ").concat(a.slice(0,n-1).join(", "),", or ")+a[n-1]:n===2?"one of ".concat(r," ").concat(a[0]," or ").concat(a[1]):"of ".concat(r," ").concat(a[0])}else return"of ".concat(r," ").concat(String(a))}function l(a,r,n){return a.substr(!n||n<0?0:+n,r.length)===r}function e(a,r,n){return(n===void 0||n>a.length)&&(n=a.length),a.substring(n-r.length,n)===r}function t(a,r,n){return typeof n!="number"&&(n=0),n+r.length>a.length?!1:a.indexOf(r,n)!==-1}E("ERR_INVALID_OPT_VALUE",function(a,r){return'The value "'+r+'" is invalid for option "'+a+'"'},TypeError),E("ERR_INVALID_ARG_TYPE",function(a,r,n){var o;typeof r=="string"&&l(r,"not ")?(o="must not be",r=r.replace(/^not /,"")):o="must be";var s;if(e(a," argument"))s="The ".concat(a," ").concat(o," ").concat(k(r,"type"));else{var c=t(a,".")?"property":"argument";s='The "'.concat(a,'" ').concat(c," ").concat(o," ").concat(k(r,"type"))}return s+=". Received type ".concat(typeof n),s},TypeError),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),E("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),E("ERR_STREAM_PREMATURE_CLOSE","Premature close"),E("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),E("ERR_STREAM_WRITE_AFTER_END","write after end"),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),V.exports.codes=x}}),M2=Ee({"node_modules/readable-stream/lib/internal/streams/state.js"(J,V){"use strict";var v=Uv().codes.ERR_INVALID_OPT_VALUE;function x(k,l,e){return k.highWaterMark!=null?k.highWaterMark:l?k[e]:null}function E(k,l,e,t){var a=x(l,t,e);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var r=t?e:"highWaterMark";throw new v(r,a)}return Math.floor(a)}return k.objectMode?16:16*1024}V.exports={getHighWaterMark:E}}}),$E=Ee({"node_modules/util-deprecate/browser.js"(J,V){V.exports=v;function v(E,k){if(x("noDeprecation"))return E;var l=!1;function e(){if(!l){if(x("throwDeprecation"))throw new Error(k);x("traceDeprecation")?console.trace(k):console.warn(k),l=!0}return E.apply(this,arguments)}return e}function x(E){try{if(!window.localStorage)return!1}catch{return!1}var k=window.localStorage[E];return k==null?!1:String(k).toLowerCase()==="true"}}}),S2=Ee({"node_modules/readable-stream/lib/_stream_writable.js"(J,V){"use strict";V.exports=f;function v(H){var X=this;this.next=null,this.entry=null,this.finish=function(){oe(X,H)}}var x;f.WritableState=_;var E={deprecate:$E()},k=h2(),l=Nv().Buffer,e=(typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function t(H){return l.from(H)}function a(H){return l.isBuffer(H)||H instanceof e}var r=A2(),n=M2(),o=n.getHighWaterMark,s=Uv().codes,c=s.ERR_INVALID_ARG_TYPE,m=s.ERR_METHOD_NOT_IMPLEMENTED,h=s.ERR_MULTIPLE_CALLBACK,p=s.ERR_STREAM_CANNOT_PIPE,g=s.ERR_STREAM_DESTROYED,i=s.ERR_STREAM_NULL_VALUES,w=s.ERR_STREAM_WRITE_AFTER_END,S=s.ERR_UNKNOWN_ENCODING,M=r.errorOrDestroy;_d()(f,k);function C(){}function _(H,X,K){x=x||qv(),H=H||{},typeof K!="boolean"&&(K=X instanceof x),this.objectMode=!!H.objectMode,K&&(this.objectMode=this.objectMode||!!H.writableObjectMode),this.highWaterMark=o(this,H,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var G=H.decodeStrings===!1;this.decodeStrings=!G,this.defaultEncoding=H.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){B(X,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=H.emitClose!==!1,this.autoDestroy=!!H.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new v(this)}_.prototype.getBuffer=function(){for(var X=this.bufferedRequest,K=[];X;)K.push(X),X=X.next;return K},function(){try{Object.defineProperty(_.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(f,Symbol.hasInstance,{value:function(X){return T.call(this,X)?!0:this!==f?!1:X&&X._writableState instanceof _}})):T=function(X){return X instanceof this};function f(H){x=x||qv();var X=this instanceof x;if(!X&&!T.call(f,this))return new f(H);this._writableState=new _(H,this,X),this.writable=!0,H&&(typeof H.write=="function"&&(this._write=H.write),typeof H.writev=="function"&&(this._writev=H.writev),typeof H.destroy=="function"&&(this._destroy=H.destroy),typeof H.final=="function"&&(this._final=H.final)),k.call(this)}f.prototype.pipe=function(){M(this,new p)};function u(H,X){var K=new w;M(H,K),process.nextTick(X,K)}function A(H,X,K,G){var Y;return K===null?Y=new i:typeof K!="string"&&!X.objectMode&&(Y=new c("chunk",["string","Buffer"],K)),Y?(M(H,Y),process.nextTick(G,Y),!1):!0}f.prototype.write=function(H,X,K){var G=this._writableState,Y=!1,q=!G.objectMode&&a(H);return q&&!l.isBuffer(H)&&(H=t(H)),typeof X=="function"&&(K=X,X=null),q?X="buffer":X||(X=G.defaultEncoding),typeof K!="function"&&(K=C),G.ending?u(this,K):(q||A(this,G,H,K))&&(G.pendingcb++,Y=z(this,G,q,H,X,K)),Y},f.prototype.cork=function(){this._writableState.corked++},f.prototype.uncork=function(){var H=this._writableState;H.corked&&(H.corked--,!H.writing&&!H.corked&&!H.bufferProcessing&&H.bufferedRequest&&j(this,H))},f.prototype.setDefaultEncoding=function(X){if(typeof X=="string"&&(X=X.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((X+"").toLowerCase())>-1))throw new S(X);return this._writableState.defaultEncoding=X,this},Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function b(H,X,K){return!H.objectMode&&H.decodeStrings!==!1&&typeof X=="string"&&(X=l.from(X,K)),X}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(H,X,K,G,Y,q){if(!K){var $=b(X,G,Y);G!==$&&(K=!0,Y="buffer",G=$)}var ee=X.objectMode?1:G.length;X.length+=ee;var ne=X.length>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function e(g,i,w){var S=i.length-1;if(S=0?(M>0&&(g.lastNeed=M-1),M):--S=0?(M>0&&(g.lastNeed=M-2),M):--S=0?(M>0&&(M===2?M=0:g.lastNeed=M-3),M):0))}function t(g,i,w){if((i[0]&192)!==128)return g.lastNeed=0,"\uFFFD";if(g.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return g.lastNeed=1,"\uFFFD";if(g.lastNeed>2&&i.length>2&&(i[2]&192)!==128)return g.lastNeed=2,"\uFFFD"}}function a(g){var i=this.lastTotal-this.lastNeed,w=t(this,g,i);if(w!==void 0)return w;if(this.lastNeed<=g.length)return g.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,i,0,g.length),this.lastNeed-=g.length}function r(g,i){var w=e(this,g,i);if(!this.lastNeed)return g.toString("utf8",i);this.lastTotal=w;var S=g.length-(w-this.lastNeed);return g.copy(this.lastChar,0,S),g.toString("utf8",i,S)}function n(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+"\uFFFD":i}function o(g,i){if((g.length-i)%2===0){var w=g.toString("utf16le",i);if(w){var S=w.charCodeAt(w.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",i,g.length-1)}function s(g){var i=g&&g.length?this.write(g):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,w)}return i}function c(g,i){var w=(g.length-i)%3;return w===0?g.toString("base64",i):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",i,g.length-w))}function m(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function h(g){return g.toString(this.encoding)}function p(g){return g&&g.length?this.write(g):""}}}),U1=Ee({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(J,V){"use strict";var v=Uv().codes.ERR_STREAM_PREMATURE_CLOSE;function x(e){var t=!1;return function(){if(!t){t=!0;for(var a=arguments.length,r=new Array(a),n=0;n0)if(typeof ee!="string"&&!xe.objectMode&&Object.getPrototypeOf(ee)!==l.prototype&&(ee=t(ee)),fe)xe.endEmitted?_($,new w):z($,xe,ee,!0);else if(xe.ended)_($,new g);else{if(xe.destroyed)return!1;xe.reading=!1,xe.decoder&&!ne?(ee=xe.decoder.write(ee),xe.objectMode||ee.length!==0?z($,xe,ee,!1):U($,xe)):z($,xe,ee,!1)}else fe||(xe.reading=!1,U($,xe))}return!xe.ended&&(xe.length=N?$=N:($--,$|=$>>>1,$|=$>>>2,$|=$>>>4,$|=$>>>8,$|=$>>>16,$++),$}function B($,ee){return $<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:$!==$?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:($>ee.highWaterMark&&(ee.highWaterMark=R($)),$<=ee.length?$:ee.ended?ee.length:(ee.needReadable=!0,0))}A.prototype.read=function($){n("read",$),$=parseInt($,10);var ee=this._readableState,ne=$;if($!==0&&(ee.emittedReadable=!1),$===0&&ee.needReadable&&((ee.highWaterMark!==0?ee.length>=ee.highWaterMark:ee.length>0)||ee.ended))return n("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?G(this):P(this),null;if($=B($,ee),$===0&&ee.ended)return ee.length===0&&G(this),null;var fe=ee.needReadable;n("need readable",fe),(ee.length===0||ee.length-$0?ye=K($,ee):ye=null,ye===null?(ee.needReadable=ee.length<=ee.highWaterMark,$=0):(ee.length-=$,ee.awaitDrain=0),ee.length===0&&(ee.ended||(ee.needReadable=!0),ne!==$&&ee.ended&&G(this)),ye!==null&&this.emit("data",ye),ye};function F($,ee){if(n("onEofChunk"),!ee.ended){if(ee.decoder){var ne=ee.decoder.end();ne&&ne.length&&(ee.buffer.push(ne),ee.length+=ee.objectMode?1:ne.length)}ee.ended=!0,ee.sync?P($):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,j($)))}}function P($){var ee=$._readableState;n("emitReadable",ee.needReadable,ee.emittedReadable),ee.needReadable=!1,ee.emittedReadable||(n("emitReadable",ee.flowing),ee.emittedReadable=!0,process.nextTick(j,$))}function j($){var ee=$._readableState;n("emitReadable_",ee.destroyed,ee.length,ee.ended),!ee.destroyed&&(ee.length||ee.ended)&&($.emit("readable"),ee.emittedReadable=!1),ee.needReadable=!ee.flowing&&!ee.ended&&ee.length<=ee.highWaterMark,X($)}function U($,ee){ee.readingMore||(ee.readingMore=!0,process.nextTick(Z,$,ee))}function Z($,ee){for(;!ee.reading&&!ee.ended&&(ee.length1&&q(fe.pipes,$)!==-1)&&!Ue&&(n("false write response, pause",fe.awaitDrain),fe.awaitDrain++),ne.pause())}function ge(Te){n("onerror",Te),se(),$.removeListener("error",ge),E($,"error")===0&&_($,Te)}f($,"error",ge);function ue(){$.removeListener("finish",ve),se()}$.once("close",ue);function ve(){n("onfinish"),$.removeListener("close",ue),se()}$.once("finish",ve);function se(){n("unpipe"),ne.unpipe($)}return $.emit("pipe",ne),fe.flowing||(n("pipe resume"),ne.resume()),$};function Q($){return function(){var ne=$._readableState;n("pipeOnDrain",ne.awaitDrain),ne.awaitDrain&&ne.awaitDrain--,ne.awaitDrain===0&&E($,"data")&&(ne.flowing=!0,X($))}}A.prototype.unpipe=function($){var ee=this._readableState,ne={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return $&&$!==ee.pipes?this:($||($=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,$&&$.emit("unpipe",this,ne),this);if(!$){var fe=ee.pipes,ye=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var xe=0;xe0,fe.flowing!==!1&&this.resume()):$==="readable"&&!fe.endEmitted&&!fe.readableListening&&(fe.readableListening=fe.needReadable=!0,fe.flowing=!1,fe.emittedReadable=!1,n("on readable",fe.length,fe.reading),fe.length?P(this):fe.reading||process.nextTick(ae,this)),ne},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function($,ee){var ne=k.prototype.removeListener.call(this,$,ee);return $==="readable"&&process.nextTick(re,this),ne},A.prototype.removeAllListeners=function($){var ee=k.prototype.removeAllListeners.apply(this,arguments);return($==="readable"||$===void 0)&&process.nextTick(re,this),ee};function re($){var ee=$._readableState;ee.readableListening=$.listenerCount("readable")>0,ee.resumeScheduled&&!ee.paused?ee.flowing=!0:$.listenerCount("data")>0&&$.resume()}function ae($){n("readable nexttick read 0"),$.read(0)}A.prototype.resume=function(){var $=this._readableState;return $.flowing||(n("resume"),$.flowing=!$.readableListening,oe(this,$)),$.paused=!1,this};function oe($,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,process.nextTick(H,$,ee))}function H($,ee){n("resume",ee.reading),ee.reading||$.read(0),ee.resumeScheduled=!1,$.emit("resume"),X($),ee.flowing&&!ee.reading&&$.read(0)}A.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function X($){var ee=$._readableState;for(n("flow",ee.flowing);ee.flowing&&$.read()!==null;);}A.prototype.wrap=function($){var ee=this,ne=this._readableState,fe=!1;$.on("end",function(){if(n("wrapped end"),ne.decoder&&!ne.ended){var Ae=ne.decoder.end();Ae&&Ae.length&&ee.push(Ae)}ee.push(null)}),$.on("data",function(Ae){if(n("wrapped data"),ne.decoder&&(Ae=ne.decoder.write(Ae)),!(ne.objectMode&&Ae==null)&&!(!ne.objectMode&&(!Ae||!Ae.length))){var Me=ee.push(Ae);Me||(fe=!0,$.pause())}});for(var ye in $)this[ye]===void 0&&typeof $[ye]=="function"&&(this[ye]=function(Me){return function(){return $[Me].apply($,arguments)}}(ye));for(var xe=0;xe=ee.length?(ee.decoder?ne=ee.buffer.join(""):ee.buffer.length===1?ne=ee.buffer.first():ne=ee.buffer.concat(ee.length),ee.buffer.clear()):ne=ee.buffer.consume($,ee.decoder),ne}function G($){var ee=$._readableState;n("endReadable",ee.endEmitted),ee.endEmitted||(ee.ended=!0,process.nextTick(Y,ee,$))}function Y($,ee){if(n("endReadableNT",$.endEmitted,$.length),!$.endEmitted&&$.length===0&&($.endEmitted=!0,ee.readable=!1,ee.emit("end"),$.autoDestroy)){var ne=ee._writableState;(!ne||ne.autoDestroy&&ne.finished)&&ee.destroy()}}typeof Symbol=="function"&&(A.from=function($,ee){return C===void 0&&(C=JE()),C(A,$,ee)});function q($,ee){for(var ne=0,fe=$.length;ne0;return a(w,M,C,function(_){g||(g=_),_&&i.forEach(r),!M&&(i.forEach(r),p(g))})});return m.reduce(n)}V.exports=s}}),tk=Ee({"node_modules/stream-browserify/index.js"(J,V){V.exports=E;var v=kv().EventEmitter,x=_d();x(E,v),E.Readable=k2(),E.Writable=S2(),E.Duplex=qv(),E.Transform=C2(),E.PassThrough=QE(),E.finished=U1(),E.pipeline=ek(),E.Stream=E;function E(){v.call(this)}E.prototype.pipe=function(k,l){var e=this;function t(m){k.writable&&k.write(m)===!1&&e.pause&&e.pause()}e.on("data",t);function a(){e.readable&&e.resume&&e.resume()}k.on("drain",a),!k._isStdio&&(!l||l.end!==!1)&&(e.on("end",n),e.on("close",o));var r=!1;function n(){r||(r=!0,k.end())}function o(){r||(r=!0,typeof k.destroy=="function"&&k.destroy())}function s(m){if(c(),v.listenerCount(this,"error")===0)throw m}e.on("error",s),k.on("error",s);function c(){e.removeListener("data",t),k.removeListener("drain",a),e.removeListener("end",n),e.removeListener("close",o),e.removeListener("error",s),k.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),k.removeListener("close",c)}return e.on("end",c),e.on("close",c),k.on("close",c),k.emit("pipe",e),k}}}),Qp=Ee({"node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function(Z){for(var Q=Object.keys(Z),re={},ae=0;ae=ae)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),H=re[Q];Q"u")return function(){return J.deprecate(U,Z).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error(Z);process.traceDeprecation?console.trace(Z):console.error(Z),Q=!0}return U.apply(this,arguments)}return re};var x={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!x[U])if(E.test(U)){var Z=process.pid;x[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,Z,Q)}}else x[U]=function(){};return x[U]};function l(U,Z){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),p(Z)?Q.showHidden=Z:Z&&J._extend(Q,Z),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,Z){var Q=l.styles[Z];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,Z){return U}function a(U){var Z={};return U.forEach(function(Q,re){Z[Q]=!0}),Z}function r(U,Z,Q){if(U.customInspect&&Z&&A(Z.inspect)&&Z.inspect!==J.inspect&&!(Z.constructor&&Z.constructor.prototype===Z)){var re=Z.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ae=n(U,Z);if(ae)return ae;var oe=Object.keys(Z),H=a(oe);if(U.showHidden&&(oe=Object.getOwnPropertyNames(Z)),u(Z)&&(oe.indexOf("message")>=0||oe.indexOf("description")>=0))return o(Z);if(oe.length===0){if(A(Z)){var X=Z.name?": "+Z.name:"";return U.stylize("[Function"+X+"]","special")}if(_(Z))return U.stylize(RegExp.prototype.toString.call(Z),"regexp");if(f(Z))return U.stylize(Date.prototype.toString.call(Z),"date");if(u(Z))return o(Z)}var K="",G=!1,Y=["{","}"];if(h(Z)&&(G=!0,Y=["[","]"]),A(Z)){var q=Z.name?": "+Z.name:"";K=" [Function"+q+"]"}if(_(Z)&&(K=" "+RegExp.prototype.toString.call(Z)),f(Z)&&(K=" "+Date.prototype.toUTCString.call(Z)),u(Z)&&(K=" "+o(Z)),oe.length===0&&(!G||Z.length==0))return Y[0]+K+Y[1];if(Q<0)return _(Z)?U.stylize(RegExp.prototype.toString.call(Z),"regexp"):U.stylize("[Object]","special");U.seen.push(Z);var $;return G?$=s(U,Z,Q,H,oe):$=oe.map(function(ee){return c(U,Z,Q,H,ee,G)}),U.seen.pop(),m($,K,Y)}function n(U,Z){if(C(Z))return U.stylize("undefined","undefined");if(S(Z)){var Q="'"+JSON.stringify(Z).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w(Z))return U.stylize(""+Z,"number");if(p(Z))return U.stylize(""+Z,"boolean");if(g(Z))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,Z,Q,re,ae){for(var oe=[],H=0,X=Z.length;H-1&&(oe?X=X.split(` +`).map(function(G){return" "+G}).join(` +`).slice(2):X=` +`+X.split(` +`).map(function(G){return" "+G}).join(` +`))):X=U.stylize("[Circular]","special")),C(H)){if(oe&&ae.match(/^\d+$/))return X;H=JSON.stringify(""+ae),H.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(H=H.slice(1,-1),H=U.stylize(H,"name")):(H=H.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),H=U.stylize(H,"string"))}return H+": "+X}function m(U,Z,Q){var re=0,ae=U.reduce(function(oe,H){return re++,H.indexOf(` +`)>=0&&re++,oe+H.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ae>60?Q[0]+(Z===""?"":Z+` + `)+" "+U.join(`, + `)+" "+Q[1]:Q[0]+Z+" "+U.join(", ")+" "+Q[1]}J.types=x2();function h(U){return Array.isArray(U)}J.isArray=h;function p(U){return typeof U=="boolean"}J.isBoolean=p;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function b(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=b,J.isBuffer=w2();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var U=new Date,Z=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),N[U.getMonth()],Z].join(" ")}J.log=function(){console.log("%s - %s",R(),J.format.apply(J,arguments))},J.inherits=_d(),J._extend=function(U,Z){if(!Z||!T(Z))return U;for(var Q=Object.keys(Z),re=Q.length;re--;)U[Q[re]]=Z[Q[re]];return U};function B(U,Z){return Object.prototype.hasOwnProperty.call(U,Z)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function(Z){if(typeof Z!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&Z[F]){var Q=Z[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ae,oe=new Promise(function(K,G){re=K,ae=G}),H=[],X=0;X"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(C){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},c(C)}var m={},h,p;function g(C,_,T){T||(T=Error);function f(A,b,z){return typeof _=="string"?_:_(A,b,z)}var u=function(A){t(z,A);var b=r(z);function z(I,N,R){var B;return e(this,z),B=b.call(this,f(I,N,R)),B.code=C,B}return E(z)}(T);m[C]=u}function i(C,_){if(Array.isArray(C)){var T=C.length;return C=C.map(function(f){return String(f)}),T>2?"one of ".concat(_," ").concat(C.slice(0,T-1).join(", "),", or ")+C[T-1]:T===2?"one of ".concat(_," ").concat(C[0]," or ").concat(C[1]):"of ".concat(_," ").concat(C[0])}else return"of ".concat(_," ").concat(String(C))}function w(C,_,T){return C.substr(!T||T<0?0:+T,_.length)===_}function S(C,_,T){return(T===void 0||T>C.length)&&(T=C.length),C.substring(T-_.length,T)===_}function M(C,_,T){return typeof T!="number"&&(T=0),T+_.length>C.length?!1:C.indexOf(_,T)!==-1}g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",function(C,_,T){h===void 0&&(h=V1()),h(typeof C=="string","'name' must be a string");var f;typeof _=="string"&&w(_,"not ")?(f="must not be",_=_.replace(/^not /,"")):f="must be";var u;if(S(C," argument"))u="The ".concat(C," ").concat(f," ").concat(i(_,"type"));else{var A=M(C,".")?"property":"argument";u='The "'.concat(C,'" ').concat(A," ").concat(f," ").concat(i(_,"type"))}return u+=". Received type ".concat(v(T)),u},TypeError),g("ERR_INVALID_ARG_VALUE",function(C,_){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=Qp());var f=p.inspect(_);return f.length>128&&(f="".concat(f.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(T,". Received ").concat(f)},TypeError,RangeError),g("ERR_INVALID_RETURN_VALUE",function(C,_,T){var f;return T&&T.constructor&&T.constructor.name?f="instance of ".concat(T.constructor.name):f="type ".concat(v(T)),"Expected ".concat(C,' to be returned from the "').concat(_,'"')+" function but got ".concat(f,".")},TypeError),g("ERR_MISSING_ARGS",function(){for(var C=arguments.length,_=new Array(C),T=0;T0,"At least one arg needs to be specified");var f="The ",u=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),u){case 1:f+="".concat(_[0]," argument");break;case 2:f+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:f+=_.slice(0,u-1).join(", "),f+=", and ".concat(_[u-1]," arguments");break}return"".concat(f," must be specified")},TypeError),V.exports.codes=m}}),rk=Ee({"node_modules/assert/build/internal/assert/assertion_error.js"(J,V){"use strict";function v(j,U){var Z=Object.keys(j);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(j);U&&(Q=Q.filter(function(re){return Object.getOwnPropertyDescriptor(j,re).enumerable})),Z.push.apply(Z,Q)}return Z}function x(j){for(var U=1;U"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function p(j){return Function.toString.call(j).indexOf("[native code]")!==-1}function g(j,U){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,re){return Q.__proto__=re,Q},g(j,U)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Z){return Z.__proto__||Object.getPrototypeOf(Z)},i(j)}function w(j){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},w(j)}var S=Qp(),M=S.inspect,C=L2(),_=C.codes.ERR_INVALID_ARG_TYPE;function T(j,U,Z){return(Z===void 0||Z>j.length)&&(Z=j.length),j.substring(Z-U.length,Z)===U}function f(j,U){if(U=Math.floor(U),j.length==0||U==0)return"";var Z=j.length*U;for(U=Math.floor(Math.log(U)/Math.log(2));U;)j+=j,U--;return j+=j.substring(0,Z-j.length),j}var u="",A="",b="",z="",I={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},N=10;function R(j){var U=Object.keys(j),Z=Object.create(Object.getPrototypeOf(j));return U.forEach(function(Q){Z[Q]=j[Q]}),Object.defineProperty(Z,"message",{value:j.message}),Z}function B(j){return M(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(j,U,Z){var Q="",re="",ae=0,oe="",H=!1,X=B(j),K=X.split(` +`),G=B(U).split(` +`),Y=0,q="";if(Z==="strictEqual"&&w(j)==="object"&&w(U)==="object"&&j!==null&&U!==null&&(Z="strictEqualObject"),K.length===1&&G.length===1&&K[0]!==G[0]){var $=K[0].length+G[0].length;if($<=N){if((w(j)!=="object"||j===null)&&(w(U)!=="object"||U===null)&&(j!==0||U!==0))return"".concat(I[Z],` + +`)+"".concat(K[0]," !== ").concat(G[0],` +`)}else if(Z!=="strictEqualObject"){var ee=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if($2&&(q=` + `.concat(f(" ",Y),"^"),Y=0)}}}for(var ne=K[K.length-1],fe=G[G.length-1];ne===fe&&(Y++<2?oe=` + `.concat(ne).concat(oe):Q=ne,K.pop(),G.pop(),!(K.length===0||G.length===0));)ne=K[K.length-1],fe=G[G.length-1];var ye=Math.max(K.length,G.length);if(ye===0){var xe=X.split(` +`);if(xe.length>30)for(xe[26]="".concat(u,"...").concat(z);xe.length>27;)xe.pop();return"".concat(I.notIdentical,` + +`).concat(xe.join(` `),` -`)}Z>3&&(ae=` -`.concat(h,"...").concat(D).concat(ae),j=!0),Y!==""&&(ae=` - `.concat(Y).concat(ae),Y="");var Te=0,Se=C[q]+` -`.concat(x,"+ actual").concat(D," ").concat(_,"- expected").concat(D),Ce=" ".concat(h,"...").concat(D," Lines skipped");for(Z=0;Z1&&Z>2&&(Ue>4?(ee+=` -`.concat(h,"...").concat(D),j=!0):Ue>3&&(ee+=` - `.concat(H[Z-2]),Te++),ee+=` - `.concat(H[Z-1]),Te++),te=Z,Y+=` -`.concat(_,"-").concat(D," ").concat(H[Z]),Te++;else if(H.length1&&Z>2&&(Ue>4?(ee+=` -`.concat(h,"...").concat(D),j=!0):Ue>3&&(ee+=` - `.concat(K[Z-2]),Te++),ee+=` - `.concat(K[Z-1]),Te++),te=Z,ee+=` -`.concat(x,"+").concat(D," ").concat(K[Z]),Te++;else{var Oe=H[Z],_e=K[Z],ce=_e!==Oe&&(!T(_e,",")||_e.slice(0,-1)!==Oe);ce&&T(Oe,",")&&Oe.slice(0,-1)===_e&&(ce=!1,_e+=","),ce?(Ue>1&&Z>2&&(Ue>4?(ee+=` -`.concat(h,"...").concat(D),j=!0):Ue>3&&(ee+=` - `.concat(K[Z-2]),Te++),ee+=` - `.concat(K[Z-1]),Te++),te=Z,ee+=` -`.concat(x,"+").concat(D," ").concat(_e),Y+=` -`.concat(_,"-").concat(D," ").concat(Oe),Te+=2):(ee+=Y,Y="",(Ue===1||Z===0)&&(ee+=` - `.concat(_e),Te++))}if(Te>20&&Z30)for($[26]="".concat(h,"...").concat(D);$.length>27;)$.pop();$.length===1?te=q.call(this,"".concat(X," ").concat($[0])):te=q.call(this,"".concat(X,` +`)}Y>3&&(oe=` +`.concat(u,"...").concat(z).concat(oe),H=!0),Q!==""&&(oe=` + `.concat(Q).concat(oe),Q="");var Ae=0,Me=I[Z]+` +`.concat(A,"+ actual").concat(z," ").concat(b,"- expected").concat(z),Ie=" ".concat(u,"...").concat(z," Lines skipped");for(Y=0;Y1&&Y>2&&(Ue>4?(re+=` +`.concat(u,"...").concat(z),H=!0):Ue>3&&(re+=` + `.concat(G[Y-2]),Ae++),re+=` + `.concat(G[Y-1]),Ae++),ae=Y,Q+=` +`.concat(b,"-").concat(z," ").concat(G[Y]),Ae++;else if(G.length1&&Y>2&&(Ue>4?(re+=` +`.concat(u,"...").concat(z),H=!0):Ue>3&&(re+=` + `.concat(K[Y-2]),Ae++),re+=` + `.concat(K[Y-1]),Ae++),ae=Y,re+=` +`.concat(A,"+").concat(z," ").concat(K[Y]),Ae++;else{var qe=G[Y],ke=K[Y],ge=ke!==qe&&(!T(ke,",")||ke.slice(0,-1)!==qe);ge&&T(qe,",")&&qe.slice(0,-1)===ke&&(ge=!1,ke+=","),ge?(Ue>1&&Y>2&&(Ue>4?(re+=` +`.concat(u,"...").concat(z),H=!0):Ue>3&&(re+=` + `.concat(K[Y-2]),Ae++),re+=` + `.concat(K[Y-1]),Ae++),ae=Y,re+=` +`.concat(A,"+").concat(z," ").concat(ke),Q+=` +`.concat(b,"-").concat(z," ").concat(qe),Ae+=2):(re+=Q,Q="",(Ue===1||Y===0)&&(re+=` + `.concat(ke),Ae++))}if(Ae>20&&Y30)for($[26]="".concat(u,"...").concat(z);$.length>27;)$.pop();$.length===1?ae=Z.call(this,"".concat(q," ").concat($[0])):ae=Z.call(this,"".concat(q,` `).concat($.join(` `),` -`))}else{var Q=z(K),re="",ue=C[j];j==="notDeepEqual"||j==="notEqual"?(Q="".concat(C[j],` +`))}else{var ee=B(K),ne="",fe=I[H];H==="notDeepEqual"||H==="notEqual"?(ee="".concat(I[H],` -`).concat(Q),Q.length>1024&&(Q="".concat(Q.slice(0,1021),"..."))):(re="".concat(z(H)),Q.length>512&&(Q="".concat(Q.slice(0,509),"...")),re.length>512&&(re="".concat(re.slice(0,509),"...")),j==="deepEqual"||j==="equal"?Q="".concat(ue,` +`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(ne="".concat(B(G)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),ne.length>512&&(ne="".concat(ne.slice(0,509),"...")),H==="deepEqual"||H==="equal"?ee="".concat(fe,` -`).concat(Q,` +`).concat(ee,` should equal -`):re=" ".concat(j," ").concat(re)),te=q.call(this,"".concat(Q).concat(re))}return Error.stackTraceLimit=Z,te.generatedMessage=!ae,Object.defineProperty(s(te),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),te.code="ERR_ASSERTION",te.actual=K,te.expected=H,te.operator=j,Error.captureStackTrace&&Error.captureStackTrace(s(te),G),te.stack,te.name="AssertionError",i(te)}return e(Y,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:N,value:function(te,ae){return A(this,v(v({},ae),{},{customInspect:!1,depth:0}))}}]),Y}(c(Error),A.custom);O.exports=k}}),mx=xe({"node_modules/object-keys/isArguments.js"(U,O){"use strict";var u=Object.prototype.toString;O.exports=function(w){var S=u.call(w),l=S==="[object Arguments]";return l||(l=S!=="[object Array]"&&w!==null&&typeof w=="object"&&typeof w.length=="number"&&w.length>=0&&u.call(w.callee)==="[object Function]"),l}}}),aE=xe({"node_modules/object-keys/implementation.js"(U,O){"use strict";var u;Object.keys||(v=Object.prototype.hasOwnProperty,w=Object.prototype.toString,S=mx(),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var p=c.constructor;return p&&p.prototype===c},n={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},i=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!n["$"+c]&&v.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!i)return r(c);try{return r(c)}catch{return!1}},u=function(p){var f=p!==null&&typeof p=="object",d=w.call(p)==="[object Function]",y=S(p),o=f&&w.call(p)==="[object String]",b=[];if(!f&&!d&&!y)throw new TypeError("Object.keys called on a non-object");var M=t&&d;if(o&&p.length>0&&!v.call(p,0))for(var A=0;A0)for(var E=0;E2?arguments[2]:{},p=u(s);v&&(p=S.call(p,Object.getOwnPropertySymbols(s)));for(var f=0;fie.length)&&(se=ie.length);for(var ne=0,be=new Array(se);ne10)return!0;for(var se=0;se57)return!0}return ie.length===10&&ie>=Math.pow(2,32)}function k(ie){return Object.keys(ie).filter(R).concat(s(ie).filter(Object.prototype.propertyIsEnumerable.bind(ie)))}function B(ie,se){if(ie===se)return 0;for(var ne=ie.length,be=se.length,De=0,qe=Math.min(ne,be);De1?H-1:0),X=1;X1?H-1:0),X=1;X1?H-1:0),X=1;X1?H-1:0),X=1;X=0&&v.call(E.callee)==="[object Function]"),l}}}),nk=Ee({"node_modules/object-keys/implementation.js"(J,V){"use strict";var v;Object.keys||(x=Object.prototype.hasOwnProperty,E=Object.prototype.toString,k=P2(),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var m=c.constructor;return m&&m.prototype===c},n={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},o=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!n["$"+c]&&x.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!o)return r(c);try{return r(c)}catch{return!1}},v=function(m){var h=m!==null&&typeof m=="object",p=E.call(m)==="[object Function]",g=k(m),i=h&&E.call(m)==="[object String]",w=[];if(!h&&!p&&!g)throw new TypeError("Object.keys called on a non-object");var S=t&&p;if(i&&m.length>0&&!x.call(m,0))for(var M=0;M0)for(var C=0;C-1?x(t):t}}}),cm=Ee({"node_modules/define-properties/index.js"(J,V){"use strict";var v=D2(),x=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",E=Object.prototype.toString,k=Array.prototype.concat,l=y2(),e=function(n){return typeof n=="function"&&E.call(n)==="[object Function]"},t=_2()(),a=function(n,o,s,c){if(o in n){if(c===!0){if(n[o]===s)return}else if(!e(c)||!c())return}t?l(n,o,s,!0):l(n,o,s)},r=function(n,o){var s=arguments.length>2?arguments[2]:{},c=v(o);x&&(c=k.call(c,Object.getOwnPropertySymbols(o)));for(var m=0;mue.length)&&(ve=ue.length);for(var se=0,Te=new Array(ve);se10)return!0;for(var ve=0;ve57)return!0}return ue.length===10&&ue>=Math.pow(2,32)}function P(ue){return Object.keys(ue).filter(F).concat(s(ue).filter(Object.prototype.propertyIsEnumerable.bind(ue)))}function j(ue,ve){if(ue===ve)return 0;for(var se=ue.length,Te=ve.length,Fe=0,We=Math.min(se,Te);Fe1?G-1:0),q=1;q1?G-1:0),q=1;q1?G-1:0),q=1;q1?G-1:0),q=1;q0)return e(n);if(s==="number"&&isNaN(n)===!1)return i.long?a(n):t(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function e(n){if(n=String(n),!(n.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(n);if(i){var s=parseFloat(i[1]),c=(i[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*l;case"days":case"day":case"d":return s*S;case"hours":case"hour":case"hrs":case"hr":case"h":return s*w;case"minutes":case"minute":case"mins":case"min":case"m":return s*v;case"seconds":case"second":case"secs":case"sec":case"s":return s*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function t(n){return n>=S?Math.round(n/S)+"d":n>=w?Math.round(n/w)+"h":n>=v?Math.round(n/v)+"m":n>=u?Math.round(n/u)+"s":n+"ms"}function a(n){return r(n,S,"day")||r(n,w,"hour")||r(n,v,"minute")||r(n,u,"second")||n+" ms"}function r(n,i,s){if(!(n=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}U.formatters.j=function(t){try{return JSON.stringify(t)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}};function v(t){var a=this.useColors;if(t[0]=(a?"%c":"")+this.namespace+(a?" %c":" ")+t[0]+(a?"%c ":" ")+"+"+U.humanize(this.diff),!!a){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(n++,s==="%c"&&(i=n))}),t.splice(i,0,r)}}function w(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function S(t){try{t==null?U.storage.removeItem("debug"):U.storage.debug=t}catch{}}function l(){var t;try{t=U.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}U.enable(l());function e(){try{return window.localStorage}catch{}}}}),vE=xe({"node_modules/stream-parser/index.js"(U,O){var u=C0(),v=dE()("stream-parser");O.exports=t;var w=-1,S=0,l=1,e=2;function t(o){var b=o&&typeof o._transform=="function",M=o&&typeof o._write=="function";if(!b&&!M)throw new Error("must pass a Writable or Transform stream in");v("extending Parser into stream"),o._bytes=r,o._skipBytes=n,b&&(o._passthrough=i),b?o._transform=c:o._write=s}function a(o){v("initializing parser stream"),o._parserBytesLeft=0,o._parserBuffers=[],o._parserBuffered=0,o._parserState=w,o._parserCallback=null,typeof o.push=="function"&&(o._parserOutput=o.push.bind(o)),o._parserInit=!0}function r(o,b){u(!this._parserCallback,'there is already a "callback" set!'),u(isFinite(o)&&o>0,'can only buffer a finite number of bytes > 0, got "'+o+'"'),this._parserInit||a(this),v("buffering %o bytes",o),this._parserBytesLeft=o,this._parserCallback=b,this._parserState=S}function n(o,b){u(!this._parserCallback,'there is already a "callback" set!'),u(o>0,'can only skip > 0 bytes, got "'+o+'"'),this._parserInit||a(this),v("skipping %o bytes",o),this._parserBytesLeft=o,this._parserCallback=b,this._parserState=l}function i(o,b){u(!this._parserCallback,'There is already a "callback" set!'),u(o>0,'can only pass through > 0 bytes, got "'+o+'"'),this._parserInit||a(this),v("passing through %o bytes",o),this._parserBytesLeft=o,this._parserCallback=b,this._parserState=e}function s(o,b,M){this._parserInit||a(this),v("write(%o bytes)",o.length),typeof b=="function"&&(M=b),d(this,o,null,M)}function c(o,b,M){this._parserInit||a(this),v("transform(%o bytes)",o.length),typeof b!="function"&&(b=this._parserOutput),d(this,o,b,M)}function p(o,b,M,A){return o._parserBytesLeft<=0?A(new Error("got data but not currently parsing anything")):b.length<=o._parserBytesLeft?function(){return f(o,b,M,A)}:function(){var E=b.slice(0,o._parserBytesLeft);return f(o,E,M,function(g){if(g)return A(g);if(b.length>E.length)return function(){return p(o,b.slice(E.length),M,A)}})}}function f(o,b,M,A){if(o._parserBytesLeft-=b.length,v("%o bytes left for stream piece",o._parserBytesLeft),o._parserState===S?(o._parserBuffers.push(b),o._parserBuffered+=b.length):o._parserState===e&&M(b),o._parserBytesLeft===0){var E=o._parserCallback;if(E&&o._parserState===S&&o._parserBuffers.length>1&&(b=Buffer.concat(o._parserBuffers,o._parserBuffered)),o._parserState!==S&&(b=null),o._parserCallback=null,o._parserBuffered=0,o._parserState=w,o._parserBuffers.splice(0),E){var g=[];b&&g.push(b),M&&g.push(M);var T=E.length>g.length;T&&g.push(y(A));var m=E.apply(o,g);if(!T||A===m)return A}}else return A}var d=y(p);function y(o){return function(){for(var b=o.apply(this,arguments);typeof b=="function";)b=b();return b}}}}),bl=xe({"node_modules/probe-image-size/lib/common.js"(U){"use strict";var O=tE().Transform,u=vE();function v(){O.call(this,{readableObjectMode:!0})}v.prototype=Object.create(O.prototype),v.prototype.constructor=v,u(v.prototype),U.ParserStream=v,U.sliceEq=function(S,l,e){for(var t=l,a=0;a>4&15,p=i[4]&15,f=i[5]>>4&15,d=u(i,6),y=8,o=0;od.width||f.width===d.width&&f.height>d.height?f:d}),c=i.reduce(function(f,d){return f.height>d.height||f.height===d.height&&f.width>d.width?f:d}),p;return s.width>c.height||s.width===c.height&&s.height>c.width?p=s:p=c,p}O.exports.readSizeFromMeta=function(i){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(i,s),!!s.sizes.length){var c=n(s.sizes),p=1;s.transforms.forEach(function(d){var y={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},o={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(d.type==="imir"&&(d.value===0?p=o[p]:(p=o[p],p=y[p],p=y[p])),d.type==="irot")for(var b=0;b0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,S)}},w.prototype.read_uint16=function(S){var l=this.input;if(S+2>l.length)throw u("unexpected EOF","EBADDATA");return this.big_endian?l[S]*256+l[S+1]:l[S]+l[S+1]*256},w.prototype.read_uint32=function(S){var l=this.input;if(S+4>l.length)throw u("unexpected EOF","EBADDATA");return this.big_endian?l[S]*16777216+l[S+1]*65536+l[S+2]*256+l[S+3]:l[S]+l[S+1]*256+l[S+2]*65536+l[S+3]*16777216},w.prototype.is_subifd_link=function(S,l){return S===0&&l===34665||S===0&&l===34853||S===34665&&l===40965},w.prototype.exif_format_length=function(S){switch(S){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},w.prototype.exif_format_read=function(S,l){var e;switch(S){case 1:case 2:return e=this.input[l],e;case 6:return e=this.input[l],e|(e&128)*33554430;case 3:return e=this.read_uint16(l),e;case 8:return e=this.read_uint16(l),e|(e&32768)*131070;case 4:return e=this.read_uint32(l),e;case 9:return e=this.read_uint32(l),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},w.prototype.scan_ifd=function(S,l,e){var t=this.read_uint16(l);l+=2;for(var a=0;athis.input.length)throw u("unexpected EOF","EBADDATA");for(var d=[],y=p,o=0;o0&&(this.ifds_to_read.push({id:r,offset:d[0]}),f=!0);var M={is_big_endian:this.big_endian,ifd:S,tag:r,format:n,count:i,entry_offset:l+this.start,data_length:c,data_offset:p+this.start,value:d,is_subifd_link:f};if(e(M)===!1){this.aborted=!0;return}l+=12}S===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},O.exports.ExifParser=w,O.exports.get_orientation=function(S){var l=0;try{return new w(S,0,S.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return l=e.value[0],!1}),l}catch{return-1}}}}),mE=xe({"node_modules/probe-image-size/lib/parse_sync/avif.js"(U,O){"use strict";var u=bl().str2arr,v=bl().sliceEq,w=bl().readUInt32BE,S=pE(),l=Kg(),e=u("ftyp");O.exports=function(t){if(v(t,4,e)){var a=S.unbox(t,0);if(a){var r=S.getMimeType(a.data);if(r){for(var n,i=a.end;;){var s=S.unbox(t,i);if(!s)break;if(i=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){n=s.data;break}}if(n){var c=S.readSizeFromMeta(n);if(c){var p={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(p.variants=c.variants),c.orientation&&(p.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=t.length){var f=w(t,c.exif_location.offset),d=t.slice(c.exif_location.offset+f+4,c.exif_location.offset+c.exif_location.length),y=l.get_orientation(d);y>0&&(p.orientation=y)}return p}}}}}}}}),gE=xe({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(U,O){"use strict";var u=bl().str2arr,v=bl().sliceEq,w=bl().readUInt16LE,S=u("BM");O.exports=function(l){if(!(l.length<26)&&v(l,0,S))return{width:w(l,18),height:w(l,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),yE=xe({"node_modules/probe-image-size/lib/parse_sync/gif.js"(U,O){"use strict";var u=bl().str2arr,v=bl().sliceEq,w=bl().readUInt16LE,S=u("GIF87a"),l=u("GIF89a");O.exports=function(e){if(!(e.length<10)&&!(!v(e,0,S)&&!v(e,0,l)))return{width:w(e,6),height:w(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),_E=xe({"node_modules/probe-image-size/lib/parse_sync/ico.js"(U,O){"use strict";var u=bl().readUInt16LE,v=0,w=1,S=16;O.exports=function(l){var e=u(l,0),t=u(l,2),a=u(l,4);if(!(e!==v||t!==w||!a)){for(var r=[],n={width:0,height:0},i=0;in.width||c>n.height)&&(n=p)}return{width:n.width,height:n.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),bE=xe({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(U,O){"use strict";var u=bl().readUInt16BE,v=bl().str2arr,w=bl().sliceEq,S=Kg(),l=v("Exif\0\0");O.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var a=e[t++],r;a===255;)a=e[t++];if(208<=a&&a<=217||a===1)r=0;else if(192<=a&&a<=254){if(e.length-t<2)return;r=u(e,t)-2,t+=2}else return;if(a===217||a===218)return;var n;if(a===225&&r>=10&&w(e,t,l)&&(n=S.get_orientation(e.slice(t+6,t+r))),r>=5&&192<=a&&a<=207&&a!==196&&a!==200&&a!==204){if(e.length-t0&&(i.orientation=n),i}t+=r}}}}),xE=xe({"node_modules/probe-image-size/lib/parse_sync/png.js"(U,O){"use strict";var u=bl().str2arr,v=bl().sliceEq,w=bl().readUInt32BE,S=u(`\x89PNG\r +`).concat(p(X),` +`));var ne=new m({actual:X,expected:K,message:G,operator:q,stackStartFn:Y});throw ne.generatedMessage=ee,ne}}A.match=function X(K,G,Y){oe(K,G,Y,X,"match")},A.doesNotMatch=function X(K,G,Y){oe(K,G,Y,X,"doesNotMatch")};function H(){for(var X=arguments.length,K=new Array(X),G=0;G0)return e(n);if(s==="number"&&isNaN(n)===!1)return o.long?a(n):t(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function e(n){if(n=String(n),!(n.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(n);if(o){var s=parseFloat(o[1]),c=(o[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*l;case"days":case"day":case"d":return s*k;case"hours":case"hour":case"hrs":case"hr":case"h":return s*E;case"minutes":case"minute":case"mins":case"min":case"m":return s*x;case"seconds":case"second":case"secs":case"sec":case"s":return s*v;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function t(n){return n>=k?Math.round(n/k)+"d":n>=E?Math.round(n/E)+"h":n>=x?Math.round(n/x)+"m":n>=v?Math.round(n/v)+"s":n+"ms"}function a(n){return r(n,k,"day")||r(n,E,"hour")||r(n,x,"minute")||r(n,v,"second")||n+" ms"}function r(n,o,s){if(!(n=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}J.formatters.j=function(t){try{return JSON.stringify(t)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}};function x(t){var a=this.useColors;if(t[0]=(a?"%c":"")+this.namespace+(a?" %c":" ")+t[0]+(a?"%c ":" ")+"+"+J.humanize(this.diff),!!a){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(n++,s==="%c"&&(o=n))}),t.splice(o,0,r)}}function E(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function k(t){try{t==null?J.storage.removeItem("debug"):J.storage.debug=t}catch{}}function l(){var t;try{t=J.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}J.enable(l());function e(){try{return window.localStorage}catch{}}}}),pk=Ee({"node_modules/stream-parser/index.js"(J,V){var v=V1(),x=vk()("stream-parser");V.exports=t;var E=-1,k=0,l=1,e=2;function t(i){var w=i&&typeof i._transform=="function",S=i&&typeof i._write=="function";if(!w&&!S)throw new Error("must pass a Writable or Transform stream in");x("extending Parser into stream"),i._bytes=r,i._skipBytes=n,w&&(i._passthrough=o),w?i._transform=c:i._write=s}function a(i){x("initializing parser stream"),i._parserBytesLeft=0,i._parserBuffers=[],i._parserBuffered=0,i._parserState=E,i._parserCallback=null,typeof i.push=="function"&&(i._parserOutput=i.push.bind(i)),i._parserInit=!0}function r(i,w){v(!this._parserCallback,'there is already a "callback" set!'),v(isFinite(i)&&i>0,'can only buffer a finite number of bytes > 0, got "'+i+'"'),this._parserInit||a(this),x("buffering %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=k}function n(i,w){v(!this._parserCallback,'there is already a "callback" set!'),v(i>0,'can only skip > 0 bytes, got "'+i+'"'),this._parserInit||a(this),x("skipping %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=l}function o(i,w){v(!this._parserCallback,'There is already a "callback" set!'),v(i>0,'can only pass through > 0 bytes, got "'+i+'"'),this._parserInit||a(this),x("passing through %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=e}function s(i,w,S){this._parserInit||a(this),x("write(%o bytes)",i.length),typeof w=="function"&&(S=w),p(this,i,null,S)}function c(i,w,S){this._parserInit||a(this),x("transform(%o bytes)",i.length),typeof w!="function"&&(w=this._parserOutput),p(this,i,w,S)}function m(i,w,S,M){return i._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):w.length<=i._parserBytesLeft?function(){return h(i,w,S,M)}:function(){var C=w.slice(0,i._parserBytesLeft);return h(i,C,S,function(_){if(_)return M(_);if(w.length>C.length)return function(){return m(i,w.slice(C.length),S,M)}})}}function h(i,w,S,M){if(i._parserBytesLeft-=w.length,x("%o bytes left for stream piece",i._parserBytesLeft),i._parserState===k?(i._parserBuffers.push(w),i._parserBuffered+=w.length):i._parserState===e&&S(w),i._parserBytesLeft===0){var C=i._parserCallback;if(C&&i._parserState===k&&i._parserBuffers.length>1&&(w=Buffer.concat(i._parserBuffers,i._parserBuffered)),i._parserState!==k&&(w=null),i._parserCallback=null,i._parserBuffered=0,i._parserState=E,i._parserBuffers.splice(0),C){var _=[];w&&_.push(w),S&&_.push(S);var T=C.length>_.length;T&&_.push(g(M));var f=C.apply(i,_);if(!T||M===f)return M}}else return M}var p=g(m);function g(i){return function(){for(var w=i.apply(this,arguments);typeof w=="function";)w=w();return w}}}}),Gs=Ee({"node_modules/probe-image-size/lib/common.js"(J){"use strict";var V=tk().Transform,v=pk();function x(){V.call(this,{readableObjectMode:!0})}x.prototype=Object.create(V.prototype),x.prototype.constructor=x,v(x.prototype),J.ParserStream=x,J.sliceEq=function(k,l,e){for(var t=l,a=0;a>16},J.readInt16BE=function(k,l){return J.readUInt16BE(k,l)<<16>>16},J.readUInt32LE=function(k,l){return(k[l]|k[l+1]<<8|k[l+2]<<16)+k[l+3]*16777216},J.readUInt32BE=function(k,l){return k[l]*16777216+(k[l+1]<<16|k[l+2]<<8|k[l+3])},J.readInt32LE=function(k,l){return J.readUInt32LE(k,l)|0},J.readInt32BE=function(k,l){return J.readUInt32BE(k,l)|0};function E(k,l,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=k,l&&(this.code=l),e&&(this.statusCode=e)}E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,J.ProbeError=E}}),mk=Ee({"node_modules/probe-image-size/lib/miaf_utils.js"(J,V){"use strict";var v=Gs().readUInt16BE,x=Gs().readUInt32BE;function E(o,s){if(o.length<4+s)return null;var c=x(o,s);return o.length>4&15,m=o[4]&15,h=o[5]>>4&15,p=v(o,6),g=8,i=0;ip.width||h.width===p.width&&h.height>p.height?h:p}),c=o.reduce(function(h,p){return h.height>p.height||h.height===p.height&&h.width>p.width?h:p}),m;return s.width>c.height||s.width===c.height&&s.height>c.width?m=s:m=c,m}V.exports.readSizeFromMeta=function(o){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(o,s),!!s.sizes.length){var c=n(s.sizes),m=1;s.transforms.forEach(function(p){var g={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},i={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(p.type==="imir"&&(p.value===0?m=i[m]:(m=i[m],m=g[m],m=g[m])),p.type==="irot")for(var w=0;w0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,k)}},E.prototype.read_uint16=function(k){var l=this.input;if(k+2>l.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?l[k]*256+l[k+1]:l[k]+l[k+1]*256},E.prototype.read_uint32=function(k){var l=this.input;if(k+4>l.length)throw v("unexpected EOF","EBADDATA");return this.big_endian?l[k]*16777216+l[k+1]*65536+l[k+2]*256+l[k+3]:l[k]+l[k+1]*256+l[k+2]*65536+l[k+3]*16777216},E.prototype.is_subifd_link=function(k,l){return k===0&&l===34665||k===0&&l===34853||k===34665&&l===40965},E.prototype.exif_format_length=function(k){switch(k){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},E.prototype.exif_format_read=function(k,l){var e;switch(k){case 1:case 2:return e=this.input[l],e;case 6:return e=this.input[l],e|(e&128)*33554430;case 3:return e=this.read_uint16(l),e;case 8:return e=this.read_uint16(l),e|(e&32768)*131070;case 4:return e=this.read_uint32(l),e;case 9:return e=this.read_uint32(l),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},E.prototype.scan_ifd=function(k,l,e){var t=this.read_uint16(l);l+=2;for(var a=0;athis.input.length)throw v("unexpected EOF","EBADDATA");for(var p=[],g=m,i=0;i0&&(this.ifds_to_read.push({id:r,offset:p[0]}),h=!0);var S={is_big_endian:this.big_endian,ifd:k,tag:r,format:n,count:o,entry_offset:l+this.start,data_length:c,data_offset:m+this.start,value:p,is_subifd_link:h};if(e(S)===!1){this.aborted=!0;return}l+=12}k===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},V.exports.ExifParser=E,V.exports.get_orientation=function(k){var l=0;try{return new E(k,0,k.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return l=e.value[0],!1}),l}catch{return-1}}}}),gk=Ee({"node_modules/probe-image-size/lib/parse_sync/avif.js"(J,V){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readUInt32BE,k=mk(),l=H1(),e=v("ftyp");V.exports=function(t){if(x(t,4,e)){var a=k.unbox(t,0);if(a){var r=k.getMimeType(a.data);if(r){for(var n,o=a.end;;){var s=k.unbox(t,o);if(!s)break;if(o=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){n=s.data;break}}if(n){var c=k.readSizeFromMeta(n);if(c){var m={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(m.variants=c.variants),c.orientation&&(m.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=t.length){var h=E(t,c.exif_location.offset),p=t.slice(c.exif_location.offset+h+4,c.exif_location.offset+c.exif_location.length),g=l.get_orientation(p);g>0&&(m.orientation=g)}return m}}}}}}}}),yk=Ee({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(J,V){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readInt16LE,k=Gs().readInt32LE,l=Gs().readUInt32LE,e=v("BM");V.exports=function(t){if(!(t.length<26)&&x(t,0,e)){var a,r,n=l(t,14);if(n===12)r=E(t,18),a=E(t,20);else if(n>12)r=k(t,18),a=k(t,22);else return;return{width:r,height:Math.abs(a),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),_k=Ee({"node_modules/probe-image-size/lib/parse_sync/gif.js"(J,V){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readUInt16LE,k=v("GIF87a"),l=v("GIF89a");V.exports=function(e){if(!(e.length<10)&&!(!x(e,0,k)&&!x(e,0,l)))return{width:E(e,6),height:E(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),bk=Ee({"node_modules/probe-image-size/lib/parse_sync/ico.js"(J,V){"use strict";var v=Gs().readUInt16LE,x=0,E=1,k=16;V.exports=function(l){var e=v(l,0),t=v(l,2),a=v(l,4);if(!(e!==x||t!==E||!a)&&!(l.length<6+a*k)){for(var r=[],n={width:0,height:0},o=0;on.width||c>n.height)&&(n=m)}return{width:n.width,height:n.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),xk=Ee({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(J,V){"use strict";var v=Gs().readUInt16BE,x=Gs().str2arr,E=Gs().sliceEq,k=H1(),l=x("Exif\0\0");V.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var a=e[t++],r;a===255;)a=e[t++];if(a>=208&&a<=217||a===1)r=0;else if(a>=192&&a<=254){if(e.length-t<2)return;r=v(e,t)-2,t+=2}else return;if(a===217||a===218)return;var n;if(a===225&&r>=10&&E(e,t,l)&&(n=k.get_orientation(e.slice(t+6,t+r))),r>=5&&a>=192&&a<=207&&a!==196&&a!==200&&a!==204){if(e.length-t0&&(o.orientation=n),o}t+=r}}}}),wk=Ee({"node_modules/probe-image-size/lib/parse_sync/png.js"(J,V){"use strict";var v=Gs().str2arr,x=Gs().sliceEq,E=Gs().readUInt32BE,k=v(`\x89PNG\r  -`),l=u("IHDR");O.exports=function(e){if(!(e.length<24)&&v(e,0,S)&&v(e,12,l))return{width:w(e,16),height:w(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),wE=xe({"node_modules/probe-image-size/lib/parse_sync/psd.js"(U,O){"use strict";var u=bl().str2arr,v=bl().sliceEq,w=bl().readUInt32BE,S=u("8BPS\0");O.exports=function(l){if(!(l.length<22)&&v(l,0,S))return{width:w(l,18),height:w(l,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),TE=xe({"node_modules/probe-image-size/lib/parse_sync/svg.js"(U,O){"use strict";function u(s){return s===32||s===9||s===13||s===10}function v(s){return typeof s=="number"&&isFinite(s)&&s>0}function w(s){var c=0,p=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,r=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function n(s){var c=s.match(e),p=s.match(t),f=s.match(a);return{width:c&&(c[1]||c[2]),height:p&&(p[1]||p[2]),viewbox:f&&(f[1]||f[2])}}function i(s){return r.test(s)?s.match(r)[0]:"px"}O.exports=function(s){if(w(s)){for(var c="",p=0;p>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function n(i,s){return{width:(i[s+6]<<16|i[s+5]<<8|i[s+4])+1,height:(i[s+9]<i.length)){for(;s+8=10?c=c||a(i,s+8):d==="VP8L"&&y>=9?c=c||r(i,s+8):d==="VP8X"&&y>=10?c=c||n(i,s+8):d==="EXIF"&&(p=l.get_orientation(i.slice(s+8,s+8+y)),s=1/0),s+=8+y}if(c)return p>0&&(c.orientation=p),c}}}}}),SE=xe({"node_modules/probe-image-size/lib/parsers_sync.js"(U,O){"use strict";O.exports={avif:mE(),bmp:gE(),gif:yE(),ico:_E(),jpeg:bE(),png:xE(),psd:wE(),svg:TE(),tiff:AE(),webp:ME()}}}),EE=xe({"node_modules/probe-image-size/sync.js"(U,O){"use strict";var u=SE();function v(w){for(var S=Object.keys(u),l=0;l0;)D=c.c2p(E+z*h),z--;for(z=0;F===void 0&&z0;)I=p.c2p(g+z*x),z--;if(D<_&&(C=D,D=_,_=C),Ij[0];if(G||K){var H=_+k/2,Z=F+B/2;te+="transform:"+w(H+"px",Z+"px")+"scale("+(G?-1:1)+","+(K?-1:1)+")"+w(-H+"px",-Z+"px")+";"}}ee.attr("style",te);var X=new Promise(function($){if(b._hasZ)$();else if(b._hasSource)if(b._canvas&&b._canvas.el.width===T&&b._canvas.el.height===m&&b._canvas.source===b.source)$();else{var Q=document.createElement("canvas");Q.width=T,Q.height=m;var re=Q.getContext("2d",{willReadFrequently:!0});b._image=b._image||new Image;var ue=b._image;ue.onload=function(){re.drawImage(ue,0,0),b._canvas={el:Q,source:b.source},$()},ue.setAttribute("src",b.source)}}).then(function(){var $,Q;if(b._hasZ)Q=Y(function(pe,ge){var Te=A[ge][pe];return v.isTypedArray(Te)&&(Te=Array.from(Te)),Te}),$=Q.toDataURL("image/png");else if(b._hasSource)if(M)$=b.source;else{var re=b._canvas.el.getContext("2d",{willReadFrequently:!0}),ue=re.getImageData(0,0,T,m).data;Q=Y(function(pe,ge){var Te=4*(ge*T+pe);return[ue[Te],ue[Te+1],ue[Te+2],ue[Te+3]]}),$=Q.toDataURL("image/png")}ee.attr({"xlink:href":$,height:B,width:k,x:_,y:F})});r._promises.push(X)})}}}),PE=xe({"src/traces/image/style.js"(U,O){"use strict";var u=Na();O.exports=function(w){u.select(w).selectAll(".im image").style("opacity",function(S){return S[0].trace.opacity})}}}),IE=xe({"src/traces/image/hover.js"(U,O){"use strict";var u=hu(),v=Sr(),w=v.isArrayOrTypedArray,S=_p();O.exports=function(e,t,a){var r=e.cd[0],n=r.trace,i=e.xa,s=e.ya;if(!(u.inbox(t-r.x0,t-(r.x0+r.w*n.dx),0)>0||u.inbox(a-r.y0,a-(r.y0+r.h*n.dy),0)>0)){var c=Math.floor((t-r.x0)/n.dx),p=Math.floor(Math.abs(a-r.y0)/n.dy),f;if(n._hasZ?f=r.z[p][c]:n._hasSource&&(f=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,p,1,1).data),!!f){var d=r.hi||n.hoverinfo,y;if(d){var o=d.split("+");o.indexOf("all")!==-1&&(o=["color"]),o.indexOf("color")!==-1&&(y=!0)}var b=S.colormodel[n.colormodel],M=b.colormodel||n.colormodel,A=M.length,E=n._scaler(f),g=b.suffix,T=[];(n.hovertemplate||y)&&(T.push("["+[E[0]+g[0],E[1]+g[1],E[2]+g[2]].join(", ")),A===4&&T.push(", "+E[3]+g[3]),T.push("]"),T=T.join(""),e.extraText=M.toUpperCase()+": "+T);var m;w(n.hovertext)&&w(n.hovertext[p])?m=n.hovertext[p][c]:w(n.text)&&w(n.text[p])&&(m=n.text[p][c]);var h=s.c2p(r.y0+(p+.5)*n.dy),x=r.x0+(c+.5)*n.dx,_=r.y0+(p+.5)*n.dy,D="["+f.slice(0,n.colormodel.length).join(", ")+"]";return[v.extendFlat(e,{index:[p,c],x0:i.c2p(r.x0+c*n.dx),x1:i.c2p(r.x0+(c+1)*n.dx),y0:h,y1:h,color:E,xVal:x,xLabelVal:x,yVal:_,yLabelVal:_,zLabelVal:D,text:m,hovertemplateLabels:{zLabel:D,colorLabel:T,"color[0]Label":E[0]+g[0],"color[1]Label":E[1]+g[1],"color[2]Label":E[2]+g[2],"color[3]Label":E[3]+g[3]}})]}}}}}),DE=xe({"src/traces/image/event_data.js"(U,O){"use strict";O.exports=function(v,w){return"xVal"in w&&(v.x=w.xVal),"yVal"in w&&(v.y=w.yVal),w.xa&&(v.xaxis=w.xa),w.ya&&(v.yaxis=w.ya),v.color=w.color,v.colormodel=w.trace.colormodel,v.z||(v.z=w.color),v}}}),RE=xe({"src/traces/image/index.js"(U,O){"use strict";O.exports={attributes:(Zb(),Ta(jg)).default,supplyDefaults:mS(),calc:CE(),plot:LE(),style:PE(),hoverPoints:IE(),eventData:DE(),moduleType:"trace",name:"image",basePlotModule:Nu(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),FE=xe({"lib/image.js"(U,O){"use strict";O.exports=RE()}}),Cv=xe({"src/traces/pie/attributes.js"(U,O){"use strict";var u=Rs(),v=Gl().attributes,w=vl(),S=sc(),{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=js(),a=oo().extendFlat,r=Rc().pattern,n=w({editType:"plot",arrayOk:!0,colorEditType:"plot"});O.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:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,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:a({},u.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:t(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:t({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:a({},n,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:a({},n,{}),outsidetextfont:a({},n,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:a({},u.showlegend,{arrayOk:!0}),legend:a({},u.legend,{arrayOk:!0}),legendrank:a({},u.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:a({},n,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:v({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:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),Lv=xe({"src/traces/pie/defaults.js"(U,O){"use strict";var u=yn(),v=Sr(),w=Cv(),S=Gl().defaults,l=sh().handleText,e=Sr().coercePattern;function t(n,i){var s=v.isArrayOrTypedArray(n),c=v.isArrayOrTypedArray(i),p=Math.min(s?n.length:1/0,c?i.length:1/0);if(isFinite(p)||(p=0),p&&c){for(var f,d=0;d0){f=!0;break}}f||(p=0)}return{hasLabels:s,hasValues:c,len:p}}function a(n,i,s,c,p){var f=c("marker.line.width");f&&c("marker.line.color",p?void 0:s.paper_bgcolor);var d=c("marker.colors");e(c,"marker.pattern",d),n.marker&&!i.marker.pattern.fgcolor&&(i.marker.pattern.fgcolor=n.marker.colors),i.marker.pattern.bgcolor||(i.marker.pattern.bgcolor=s.paper_bgcolor)}function r(n,i,s,c){function p(_,D){return v.coerce(n,i,w,_,D)}var f=p("labels"),d=p("values"),y=t(f,d),o=y.len;if(i._hasLabels=y.hasLabels,i._hasValues=y.hasValues,!i._hasLabels&&i._hasValues&&(p("label0"),p("dlabel")),!o){i.visible=!1;return}i._length=o,a(n,i,c,p,!0),p("scalegroup");var b=p("text"),M=p("texttemplate");p("texttemplatefallback");var A;if(M||(A=p("textinfo",v.isArrayOrTypedArray(b)?"text+percent":"percent")),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback"),M||A&&A!=="none"){var E=p("textposition");l(n,i,c,p,E,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var g=Array.isArray(E)||E==="auto",T=g||E==="outside";T&&p("automargin"),(E==="inside"||E==="auto"||Array.isArray(E))&&p("insidetextorientation")}else A==="none"&&p("textposition","none");S(i,c,p);var m=p("hole"),h=p("title.text");if(h){var x=p("title.position",m?"middle center":"top center");!m&&x==="middle center"&&(i.title.position="top center"),v.coerceFont(p,"title.font",c.font)}p("sort"),p("direction"),p("rotation"),p("pull")}O.exports={handleLabelsAndValues:t,handleMarkerDefaults:a,supplyDefaults:r}}}),Jg=xe({"src/traces/pie/layout_attributes.js"(U,O){"use strict";O.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),zE=xe({"src/traces/pie/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=Jg();O.exports=function(S,l){function e(t,a){return u.coerce(S,l,v,t,a)}e("hiddenlabels"),e("piecolorway",l.colorway),e("extendpiecolors")}}}),Ap=xe({"src/traces/pie/calc.js"(U,O){"use strict";var u=yn(),v=wi(),w={};function S(a,r){var n=[],i=a._fullLayout,s=i.hiddenlabels||[],c=r.labels,p=r.marker.colors||[],f=r.values,d=r._length,y=r._hasValues&&d,o,b;if(r.dlabel)for(c=new Array(d),o=0;o=0});var _=r.type==="funnelarea"?g:r.sort;return _&&n.sort(function(D,C){return C.v-D.v}),n[0]&&(n[0].vTotal=E),n}function l(a){return function(n,i){if(!n||!v.isValid(n))return!1;let s=v.color(n).rgb().string();return a[i]||(a[i]=s),s}}function e(a,r){var n=(r||{}).type;n||(n="pie");var i=a._fullLayout,s=a.calcdata,c=i[n+"colorway"],p=i["_"+n+"colormap"];i["extend"+n+"colors"]&&(c=t(c,w));for(var f=0,d=0;d0&&(De+=ot*ne.pxmid[0],qe+=ot*ne.pxmid[1])}ne.cxFinal=De,ne.cyFinal=qe;function yt(at,Ee,Re,he){var ye=he*(Ee[0]-at[0]),Ie=he*(Ee[1]-at[1]);return"a"+he*ue.r+","+he*ue.r+" 0 "+ne.largeArc+(Re?" 1 ":" 0 ")+ye+","+Ie}var At=pe.hole;if(ne.v===ue.vTotal){var It="M"+(De+ne.px0[0])+","+(qe+ne.px0[1])+yt(ne.px0,ne.pxmid,!0,1)+yt(ne.pxmid,ne.px0,!0,1)+"Z";At?ut.attr("d","M"+(De+At*ne.px0[0])+","+(qe+At*ne.px0[1])+yt(ne.px0,ne.pxmid,!1,At)+yt(ne.pxmid,ne.px0,!1,At)+"Z"+It):ut.attr("d",It)}else{var Zt=yt(ne.px0,ne.px1,!0,1);if(At){var vr=1-At;ut.attr("d","M"+(De+At*ne.px1[0])+","+(qe+At*ne.px1[1])+yt(ne.px1,ne.px0,!1,At)+"l"+vr*ne.px0[0]+","+vr*ne.px0[1]+Zt+"Z")}else ut.attr("d","M"+De+","+qe+"l"+ne.px0[0]+","+ne.px0[1]+Zt+"Z")}ae(G,ne,ue);var Ut=p.castOption(pe.textposition,ne.pts),Jt=Ne.selectAll("g.slicetext").data(ne.text&&Ut!=="none"?[0]:[]);Jt.enter().append("g").classed("slicetext",!0),Jt.exit().remove(),Jt.each(function(){var at=e.ensureSingle(u.select(this),"text","",function(We){We.attr("data-notex",1)}),Ee=e.ensureUniformFontSize(G,Ut==="outside"?M(pe,ne,Z.font):A(pe,ne,Z.font));at.text(ne.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,Ee).call(r.convertToTspans,G);var Re=l.bBox(at.node()),he;if(Ut==="outside")he=F(Re,ne);else if(he=g(Re,ne,ue),Ut==="auto"&&he.scale<1){var ye=e.ensureUniformFontSize(G,pe.outsidetextfont);at.call(l.font,ye),Re=l.bBox(at.node()),he=F(Re,ne)}var Ie=he.textPosAngle,Fe=Ie===void 0?ne.pxmid:te(ue.r,Ie);if(he.targetX=De+Fe[0]*he.rCenter+(he.x||0),he.targetY=qe+Fe[1]*he.rCenter+(he.y||0),j(he,Re),he.outside){var He=he.targetY;ne.yLabelMin=He-Re.height/2,ne.yLabelMid=He,ne.yLabelMax=He+Re.height/2,ne.labelExtraX=0,ne.labelExtraY=0,Se=!0}he.fontSize=Ee.size,i(pe.type,he,Z),Q[be].transform=he,e.setTransormAndDisplay(at,he)})});var Ce=u.select(this).selectAll("g.titletext").data(pe.title.text?[0]:[]);if(Ce.enter().append("g").classed("titletext",!0),Ce.exit().remove(),Ce.each(function(){var ne=e.ensureSingle(u.select(this),"text","",function(qe){qe.attr("data-notex",1)}),be=pe.title.text;pe._meta&&(be=e.templateString(be,pe._meta)),ne.text(be).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,pe.title.font).call(r.convertToTspans,G);var De;pe.title.position==="middle center"?De=I(ue):De=z(ue,X),ne.attr("transform",a(De.x,De.y)+t(Math.min(1,De.scale))+a(De.tx,De.ty))}),Se&&N(Te,pe),o(ge,pe),Se&&pe.automargin){var Ue=l.bBox(re.node()),Oe=pe.domain,_e=X.w*(Oe.x[1]-Oe.x[0]),ce=X.h*(Oe.y[1]-Oe.y[0]),ie=(.5*_e-ue.r)/X.w,se=(.5*ce-ue.r)/X.h;v.autoMargin(G,"pie."+pe.uid+".automargin",{xl:Oe.x[0]-ie,xr:Oe.x[1]+ie,yb:Oe.y[0]-se,yt:Oe.y[1]+se,l:Math.max(ue.cx-ue.r-Ue.left,0),r:Math.max(Ue.right-(ue.cx+ue.r),0),b:Math.max(Ue.bottom-(ue.cy+ue.r),0),t:Math.max(ue.cy-ue.r-Ue.top,0),pad:5})}})});setTimeout(function(){$.selectAll("tspan").each(function(){var Q=u.select(this);Q.attr("dy")&&Q.attr("dy",Q.attr("dy"))})},0)}function o(G,K){G.each(function(H){var Z=u.select(this);if(!H.labelExtraX&&!H.labelExtraY){Z.select("path.textline").remove();return}var X=Z.select("g.slicetext text");H.transform.targetX+=H.labelExtraX,H.transform.targetY+=H.labelExtraY,e.setTransormAndDisplay(X,H.transform);var $=H.cxFinal+H.pxmid[0],Q=H.cyFinal+H.pxmid[1],re="M"+$+","+Q,ue=(H.yLabelMax-H.yLabelMin)*(H.pxmid[0]<0?-1:1)/4;if(H.labelExtraX){var pe=H.labelExtraX*H.pxmid[1]/H.pxmid[0],ge=H.yLabelMid+H.labelExtraY-(H.cyFinal+H.pxmid[1]);Math.abs(pe)>Math.abs(ge)?re+="l"+ge*H.pxmid[0]/H.pxmid[1]+","+ge+"H"+($+H.labelExtraX+ue):re+="l"+H.labelExtraX+","+pe+"v"+(ge-pe)+"h"+ue}else re+="V"+(H.yLabelMid+H.labelExtraY)+"h"+ue;e.ensureSingle(Z,"path","textline").call(S.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:re,fill:"none"})})}function b(G,K,H){var Z=H[0],X=Z.cx,$=Z.cy,Q=Z.trace,re=Q.type==="funnelarea";"_hasHoverLabel"in Q||(Q._hasHoverLabel=!1),"_hasHoverEvent"in Q||(Q._hasHoverEvent=!1),G.on("mouseover",function(ue){var pe=K._fullLayout,ge=K._fullData[Q.index];if(!(K._dragging||pe.hovermode===!1)){var Te=ge.hoverinfo;if(Array.isArray(Te)&&(Te=w.castHoverinfo({hoverinfo:[p.castOption(Te,ue.pts)],_module:Q._module},pe,0)),Te==="all"&&(Te="label+text+value+percent+name"),ge.hovertemplate||Te!=="none"&&Te!=="skip"&&Te){var Se=ue.rInscribed||0,Ce=X+ue.pxmid[0]*(1-Se),Ue=$+ue.pxmid[1]*(1-Se),Oe=pe.separators,_e=[];if(Te&&Te.indexOf("label")!==-1&&_e.push(ue.label),ue.text=p.castOption(ge.hovertext||ge.text,ue.pts),Te&&Te.indexOf("text")!==-1){var ce=ue.text;e.isValidTextValue(ce)&&_e.push(ce)}ue.value=ue.v,ue.valueLabel=p.formatPieValue(ue.v,Oe),Te&&Te.indexOf("value")!==-1&&_e.push(ue.valueLabel),ue.percent=ue.v/Z.vTotal,ue.percentLabel=p.formatPiePercent(ue.percent,Oe),Te&&Te.indexOf("percent")!==-1&&_e.push(ue.percentLabel);var ie=ge.hoverlabel,se=ie.font,ne=[];w.loneHover({trace:Q,x0:Ce-Se*Z.r,x1:Ce+Se*Z.r,y:Ue,_x0:re?X+ue.TL[0]:Ce-Se*Z.r,_x1:re?X+ue.TR[0]:Ce+Se*Z.r,_y0:re?$+ue.TL[1]:Ue-Se*Z.r,_y1:re?$+ue.BL[1]:Ue+Se*Z.r,text:_e.join("
"),name:ge.hovertemplate||Te.indexOf("name")!==-1?ge.name:void 0,idealAlign:ue.pxmid[0]<0?"left":"right",color:p.castOption(ie.bgcolor,ue.pts)||ue.color,borderColor:p.castOption(ie.bordercolor,ue.pts),fontFamily:p.castOption(se.family,ue.pts),fontSize:p.castOption(se.size,ue.pts),fontColor:p.castOption(se.color,ue.pts),nameLength:p.castOption(ie.namelength,ue.pts),textAlign:p.castOption(ie.align,ue.pts),hovertemplate:p.castOption(ge.hovertemplate,ue.pts),hovertemplateLabels:ue,eventData:[f(ue,ge)]},{container:pe._hoverlayer.node(),outerContainer:pe._paper.node(),gd:K,inOut_bbox:ne}),ue.bbox=ne[0],Q._hasHoverLabel=!0}Q._hasHoverEvent=!0,K.emit("plotly_hover",{points:[f(ue,ge)],event:u.event})}}),G.on("mouseout",function(ue){var pe=K._fullLayout,ge=K._fullData[Q.index],Te=u.select(this).datum();Q._hasHoverEvent&&(ue.originalEvent=u.event,K.emit("plotly_unhover",{points:[f(Te,ge)],event:u.event}),Q._hasHoverEvent=!1),Q._hasHoverLabel&&(w.loneUnhover(pe._hoverlayer.node()),Q._hasHoverLabel=!1)}),G.on("click",function(ue){var pe=K._fullLayout,ge=K._fullData[Q.index];K._dragging||pe.hovermode===!1||(K._hoverdata=[f(ue,ge)],w.click(K,u.event))})}function M(G,K,H){var Z=p.castOption(G.outsidetextfont.color,K.pts)||p.castOption(G.textfont.color,K.pts)||H.color,X=p.castOption(G.outsidetextfont.family,K.pts)||p.castOption(G.textfont.family,K.pts)||H.family,$=p.castOption(G.outsidetextfont.size,K.pts)||p.castOption(G.textfont.size,K.pts)||H.size,Q=p.castOption(G.outsidetextfont.weight,K.pts)||p.castOption(G.textfont.weight,K.pts)||H.weight,re=p.castOption(G.outsidetextfont.style,K.pts)||p.castOption(G.textfont.style,K.pts)||H.style,ue=p.castOption(G.outsidetextfont.variant,K.pts)||p.castOption(G.textfont.variant,K.pts)||H.variant,pe=p.castOption(G.outsidetextfont.textcase,K.pts)||p.castOption(G.textfont.textcase,K.pts)||H.textcase,ge=p.castOption(G.outsidetextfont.lineposition,K.pts)||p.castOption(G.textfont.lineposition,K.pts)||H.lineposition,Te=p.castOption(G.outsidetextfont.shadow,K.pts)||p.castOption(G.textfont.shadow,K.pts)||H.shadow;return{color:Z,family:X,size:$,weight:Q,style:re,variant:ue,textcase:pe,lineposition:ge,shadow:Te}}function A(G,K,H){var Z=p.castOption(G.insidetextfont.color,K.pts);!Z&&G._input.textfont&&(Z=p.castOption(G._input.textfont.color,K.pts));var X=p.castOption(G.insidetextfont.family,K.pts)||p.castOption(G.textfont.family,K.pts)||H.family,$=p.castOption(G.insidetextfont.size,K.pts)||p.castOption(G.textfont.size,K.pts)||H.size,Q=p.castOption(G.insidetextfont.weight,K.pts)||p.castOption(G.textfont.weight,K.pts)||H.weight,re=p.castOption(G.insidetextfont.style,K.pts)||p.castOption(G.textfont.style,K.pts)||H.style,ue=p.castOption(G.insidetextfont.variant,K.pts)||p.castOption(G.textfont.variant,K.pts)||H.variant,pe=p.castOption(G.insidetextfont.textcase,K.pts)||p.castOption(G.textfont.textcase,K.pts)||H.textcase,ge=p.castOption(G.insidetextfont.lineposition,K.pts)||p.castOption(G.textfont.lineposition,K.pts)||H.lineposition,Te=p.castOption(G.insidetextfont.shadow,K.pts)||p.castOption(G.textfont.shadow,K.pts)||H.shadow;return{color:Z||S.contrast(K.color),family:X,size:$,weight:Q,style:re,variant:ue,textcase:pe,lineposition:ge,shadow:Te}}function E(G,K){for(var H,Z,X=0;X=-4;ie-=2)ce(Math.PI*ie,"tan");for(ie=4;ie>=-4;ie-=2)ce(Math.PI*(ie+1),"tan")}if(Te||Ce){for(ie=4;ie>=-4;ie-=2)ce(Math.PI*(ie+1.5),"rad");for(ie=4;ie>=-4;ie-=2)ce(Math.PI*(ie+.5),"rad")}}if(re||Ue||Te){var se=Math.sqrt(G.width*G.width+G.height*G.height);if(_e={scale:X*Z*2/se,rCenter:1-X,rotate:0},_e.textPosAngle=(K.startangle+K.stopangle)/2,_e.scale>=1)return _e;Oe.push(_e)}(Ue||Ce)&&(_e=m(G,Z,Q,ue,pe),_e.textPosAngle=(K.startangle+K.stopangle)/2,Oe.push(_e)),(Ue||Se)&&(_e=h(G,Z,Q,ue,pe),_e.textPosAngle=(K.startangle+K.stopangle)/2,Oe.push(_e));for(var ne=0,be=0,De=0;De=1)break}return Oe[ne]}function T(G,K){var H=G.startangle,Z=G.stopangle;return H>K&&K>Z||H0?1:-1)/2,y:$/(1+H*H/(Z*Z)),outside:!0}}function I(G){var K=Math.sqrt(G.titleBox.width*G.titleBox.width+G.titleBox.height*G.titleBox.height);return{x:G.cx,y:G.cy,scale:G.trace.hole*G.r*2/K,tx:0,ty:-G.titleBox.height/2+G.trace.title.font.size}}function z(G,K){var H=1,Z=1,X,$=G.trace,Q={x:G.cx,y:G.cy},re={tx:0,ty:0};re.ty+=$.title.font.size,X=B($),$.title.position.indexOf("top")!==-1?(Q.y-=(1+X)*G.r,re.ty-=G.titleBox.height):$.title.position.indexOf("bottom")!==-1&&(Q.y+=(1+X)*G.r);var ue=R(G.r,G.trace.aspectratio),pe=K.w*($.domain.x[1]-$.domain.x[0])/2;return $.title.position.indexOf("left")!==-1?(pe=pe+ue,Q.x-=(1+X)*ue,re.tx+=G.titleBox.width/2):$.title.position.indexOf("center")!==-1?pe*=2:$.title.position.indexOf("right")!==-1&&(pe=pe+ue,Q.x+=(1+X)*ue,re.tx-=G.titleBox.width/2),H=pe/G.titleBox.width,Z=k(G,K)/G.titleBox.height,{x:Q.x,y:Q.y,scale:Math.min(H,Z),tx:re.tx,ty:re.ty}}function R(G,K){return G/(K===void 0?1:K)}function k(G,K){var H=G.trace,Z=K.h*(H.domain.y[1]-H.domain.y[0]);return Math.min(G.titleBox.height,Z/2)}function B(G){var K=G.pull;if(!K)return 0;var H;if(e.isArrayOrTypedArray(K))for(K=0,H=0;HK&&(K=G.pull[H]);return K}function N(G,K){var H,Z,X,$,Q,re,ue,pe,ge,Te,Se,Ce,Ue;function Oe(se,ne){return se.pxmid[1]-ne.pxmid[1]}function _e(se,ne){return ne.pxmid[1]-se.pxmid[1]}function ce(se,ne){ne||(ne={});var be=ne.labelExtraY+(Z?ne.yLabelMax:ne.yLabelMin),De=Z?se.yLabelMin:se.yLabelMax,qe=Z?se.yLabelMax:se.yLabelMin,Ne=se.cyFinal+Q(se.px0[1],se.px1[1]),ut=be-De,ot,yt,At,It,Zt,vr;if(ut*ue>0&&(se.labelExtraY=ut),!!e.isArrayOrTypedArray(K.pull))for(yt=0;yt=(p.castOption(K.pull,At.pts)||0))&&((se.pxmid[1]-At.pxmid[1])*ue>0?(It=At.cyFinal+Q(At.px0[1],At.px1[1]),ut=It-De-se.labelExtraY,ut*ue>0&&(se.labelExtraY+=ut)):(qe+se.labelExtraY-Ne)*ue>0&&(ot=3*re*Math.abs(yt-Te.indexOf(se)),Zt=At.cxFinal+$(At.px0[0],At.px1[0]),vr=Zt+ot-(se.cxFinal+se.pxmid[0])-se.labelExtraX,vr*re>0&&(se.labelExtraX+=vr)))}for(Z=0;Z<2;Z++)for(X=Z?Oe:_e,Q=Z?Math.max:Math.min,ue=Z?1:-1,H=0;H<2;H++){for($=H?Math.max:Math.min,re=H?1:-1,pe=G[Z][H],pe.sort(X),ge=G[1-Z][H],Te=ge.concat(pe),Ce=[],Se=0;Se1?(pe=H.r,ge=pe/X.aspectratio):(ge=H.r,pe=ge*X.aspectratio),pe*=(1+X.baseratio)/2,ue=pe*ge}Q=Math.min(Q,ue/H.vTotal)}for(Z=0;ZK.vTotal/2?1:0,pe.halfangle=Math.PI*Math.min(pe.v/K.vTotal,.5),pe.ring=1-Z.hole,pe.rInscribed=C(pe,K))}function te(G,K){return[G*Math.sin(K),-G*Math.cos(K)]}function ae(G,K,H){var Z=G._fullLayout,X=H.trace,$=X.texttemplate,Q=X.textinfo;if(!$&&Q&&Q!=="none"){var re=Q.split("+"),ue=function(ne){return re.indexOf(ne)!==-1},pe=ue("label"),ge=ue("text"),Te=ue("value"),Se=ue("percent"),Ce=Z.separators,Ue;if(Ue=pe?[K.label]:[],ge){var Oe=p.getFirstFilled(X.text,K.pts);d(Oe)&&Ue.push(Oe)}Te&&Ue.push(p.formatPieValue(K.v,Ce)),Se&&Ue.push(p.formatPiePercent(K.v/H.vTotal,Ce)),K.text=Ue.join("
")}function _e(ne){return{label:ne.label,value:ne.v,valueLabel:p.formatPieValue(ne.v,Z.separators),percent:ne.v/H.vTotal,percentLabel:p.formatPiePercent(ne.v/H.vTotal,Z.separators),color:ne.color,text:ne.text,customdata:e.castOption(X,ne.i,"customdata")}}if($){var ce=e.castOption(X,K.i,"texttemplate");if(!ce)K.text="";else{var ie=_e(K),se=p.getFirstFilled(X.text,K.pts);(d(se)||se==="")&&(ie.text=se),K.text=e.texttemplateString({data:[ie,X._meta],fallback:X.texttemplatefallback,labels:ie,locale:G._fullLayout._d3locale,template:ce})}}}function j(G,K){var H=G.rotate*Math.PI/180,Z=Math.cos(H),X=Math.sin(H),$=(K.left+K.right)/2,Q=(K.top+K.bottom)/2;G.textX=$*Z-Q*X,G.textY=$*X+Q*Z,G.noCenter=!0}O.exports={plot:y,formatSliceLabel:ae,transformInsideText:g,determineInsideTextFont:A,positionTitleOutside:z,prerenderTitles:E,layoutAreas:q,attachFxHandlers:b,computeTransform:j}}}),NE=xe({"src/traces/pie/style.js"(U,O){"use strict";var u=Na(),v=up(),w=wf().resizeText;O.exports=function(l){var e=l._fullLayout._pielayer.selectAll(".trace");w(l,e,"pie"),e.each(function(t){var a=t[0],r=a.trace,n=u.select(this);n.style({opacity:r.opacity}),n.selectAll("path.surface").each(function(i){u.select(this).call(v,i,r,l)})})}}}),OE=xe({"src/traces/pie/base_plot.js"(U){"use strict";var O=zl();U.name="pie",U.plot=function(u,v,w,S){O.plotBasePlot(U.name,u,v,w,S)},U.clean=function(u,v,w,S){O.cleanBasePlot(U.name,u,v,w,S)}}}),UE=xe({"src/traces/pie/index.js"(U,O){"use strict";O.exports={attributes:Cv(),supplyDefaults:Lv().supplyDefaults,supplyLayoutDefaults:zE(),layoutAttributes:Jg(),calc:Ap().calc,crossTraceCalc:Ap().crossTraceCalc,plot:Qg().plot,style:NE(),styleOne:up(),moduleType:"trace",name:"pie",basePlotModule:OE(),categories:["pie-like","pie","showLegend"],meta:{}}}}),jE=xe({"lib/pie.js"(U,O){"use strict";O.exports=UE()}}),qE=xe({"src/traces/sunburst/base_plot.js"(U){"use strict";var O=zl();U.name="sunburst",U.plot=function(u,v,w,S){O.plotBasePlot(U.name,u,v,w,S)},U.clean=function(u,v,w,S){O.cleanBasePlot(U.name,u,v,w,S)}}}),xx=xe({"src/traces/sunburst/constants.js"(U,O){"use strict";O.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),L0=xe({"src/traces/sunburst/attributes.js"(U,O){"use strict";var u=Rs(),{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:S}=js(),l=pl(),e=Gl().attributes,t=Cv(),a=xx(),r=oo().extendFlat,n=Rc().pattern;O.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},t.marker.line.color,{dflt:null}),width:r({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:n,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:w({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r({},u.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:v({},{keys:a.eventDataKeys}),hovertemplatefallback:S(),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:r({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),wx=xe({"src/traces/sunburst/layout_attributes.js"(U,O){"use strict";O.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),VE=xe({"src/traces/sunburst/defaults.js"(U,O){"use strict";var u=Sr(),v=L0(),w=Gl().defaults,S=sh().handleText,l=Lv().handleMarkerDefaults,e=Bl(),t=e.hasColorscale,a=e.handleDefaults;O.exports=function(n,i,s,c){function p(A,E){return u.coerce(n,i,v,A,E)}var f=p("labels"),d=p("parents");if(!f||!f.length||!d||!d.length){i.visible=!1;return}var y=p("values");y&&y.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),l(n,i,c,p);var o=i._hasColorscale=t(n,"marker","colors")||(n.marker||{}).coloraxis;o&&a(n,i,c,p,{prefix:"marker.",cLetter:"c"}),p("leaf.opacity",o?1:.7);var b=p("text");p("texttemplate"),p("texttemplatefallback"),i.texttemplate||p("textinfo",u.isArrayOrTypedArray(b)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var M="auto";S(n,i,c,p,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("insidetextorientation"),p("sort"),p("rotation"),p("root.color"),w(i,c,p),i._length=null}}}),HE=xe({"src/traces/sunburst/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=wx();O.exports=function(S,l){function e(t,a){return u.coerce(S,l,v,t,a)}e("sunburstcolorway",l.colorway),e("extendsunburstcolors")}}}),P0=xe({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(U,O){(function(u,v){typeof U=="object"&&typeof O<"u"?v(U):(u=u||self,v(u.d3=u.d3||{}))})(U,function(u){"use strict";function v(he,ye){return he.parent===ye.parent?1:2}function w(he){return he.reduce(S,0)/he.length}function S(he,ye){return he+ye.x}function l(he){return 1+he.reduce(e,0)}function e(he,ye){return Math.max(he,ye.y)}function t(he){for(var ye;ye=he.children;)he=ye[0];return he}function a(he){for(var ye;ye=he.children;)he=ye[ye.length-1];return he}function r(){var he=v,ye=1,Ie=1,Fe=!1;function He(We){var pt,ct=0;We.eachAfter(function(Et){var hr=Et.children;hr?(Et.x=w(hr),Et.y=l(hr)):(Et.x=pt?ct+=he(Et,pt):0,Et.y=0,pt=Et)});var ft=t(We),mt=a(We),_t=ft.x-he(ft,mt)/2,Bt=mt.x+he(mt,ft)/2;return We.eachAfter(Fe?function(Et){Et.x=(Et.x-We.x)*ye,Et.y=(We.y-Et.y)*Ie}:function(Et){Et.x=(Et.x-_t)/(Bt-_t)*ye,Et.y=(1-(We.y?Et.y/We.y:1))*Ie})}return He.separation=function(We){return arguments.length?(he=We,He):he},He.size=function(We){return arguments.length?(Fe=!1,ye=+We[0],Ie=+We[1],He):Fe?null:[ye,Ie]},He.nodeSize=function(We){return arguments.length?(Fe=!0,ye=+We[0],Ie=+We[1],He):Fe?[ye,Ie]:null},He}function n(he){var ye=0,Ie=he.children,Fe=Ie&&Ie.length;if(!Fe)ye=1;else for(;--Fe>=0;)ye+=Ie[Fe].value;he.value=ye}function i(){return this.eachAfter(n)}function s(he){var ye=this,Ie,Fe=[ye],He,We,pt;do for(Ie=Fe.reverse(),Fe=[];ye=Ie.pop();)if(he(ye),He=ye.children,He)for(We=0,pt=He.length;We=0;--He)Ie.push(Fe[He]);return this}function p(he){for(var ye=this,Ie=[ye],Fe=[],He,We,pt;ye=Ie.pop();)if(Fe.push(ye),He=ye.children,He)for(We=0,pt=He.length;We=0;)Ie+=Fe[He].value;ye.value=Ie})}function d(he){return this.eachBefore(function(ye){ye.children&&ye.children.sort(he)})}function y(he){for(var ye=this,Ie=o(ye,he),Fe=[ye];ye!==Ie;)ye=ye.parent,Fe.push(ye);for(var He=Fe.length;he!==Ie;)Fe.splice(He,0,he),he=he.parent;return Fe}function o(he,ye){if(he===ye)return he;var Ie=he.ancestors(),Fe=ye.ancestors(),He=null;for(he=Ie.pop(),ye=Fe.pop();he===ye;)He=he,he=Ie.pop(),ye=Fe.pop();return He}function b(){for(var he=this,ye=[he];he=he.parent;)ye.push(he);return ye}function M(){var he=[];return this.each(function(ye){he.push(ye)}),he}function A(){var he=[];return this.eachBefore(function(ye){ye.children||he.push(ye)}),he}function E(){var he=this,ye=[];return he.each(function(Ie){Ie!==he&&ye.push({source:Ie.parent,target:Ie})}),ye}function g(he,ye){var Ie=new _(he),Fe=+he.value&&(Ie.value=he.value),He,We=[Ie],pt,ct,ft,mt;for(ye==null&&(ye=m);He=We.pop();)if(Fe&&(He.value=+He.data.value),(ct=ye(He.data))&&(mt=ct.length))for(He.children=new Array(mt),ft=mt-1;ft>=0;--ft)We.push(pt=He.children[ft]=new _(ct[ft])),pt.parent=He,pt.depth=He.depth+1;return Ie.eachBefore(x)}function T(){return g(this).eachBefore(h)}function m(he){return he.children}function h(he){he.data=he.data.data}function x(he){var ye=0;do he.height=ye;while((he=he.parent)&&he.height<++ye)}function _(he){this.data=he,this.depth=this.height=0,this.parent=null}_.prototype=g.prototype={constructor:_,count:i,each:s,eachAfter:p,eachBefore:c,sum:f,sort:d,path:y,ancestors:b,descendants:M,leaves:A,links:E,copy:T};var D=Array.prototype.slice;function C(he){for(var ye=he.length,Ie,Fe;ye;)Fe=Math.random()*ye--|0,Ie=he[ye],he[ye]=he[Fe],he[Fe]=Ie;return he}function F(he){for(var ye=0,Ie=(he=C(D.call(he))).length,Fe=[],He,We;ye0&&Ie*Ie>Fe*Fe+He*He}function k(he,ye){for(var Ie=0;Ieft?(He=(mt+ft-We)/(2*mt),ct=Math.sqrt(Math.max(0,ft/mt-He*He)),Ie.x=he.x-He*Fe-ct*pt,Ie.y=he.y-He*pt+ct*Fe):(He=(mt+We-ft)/(2*mt),ct=Math.sqrt(Math.max(0,We/mt-He*He)),Ie.x=ye.x+He*Fe-ct*pt,Ie.y=ye.y+He*pt+ct*Fe)):(Ie.x=ye.x+Ie.r,Ie.y=ye.y)}function te(he,ye){var Ie=he.r+ye.r-1e-6,Fe=ye.x-he.x,He=ye.y-he.y;return Ie>0&&Ie*Ie>Fe*Fe+He*He}function ae(he){var ye=he._,Ie=he.next._,Fe=ye.r+Ie.r,He=(ye.x*Ie.r+Ie.x*ye.r)/Fe,We=(ye.y*Ie.r+Ie.y*ye.r)/Fe;return He*He+We*We}function j(he){this._=he,this.next=null,this.previous=null}function G(he){if(!(He=he.length))return 0;var ye,Ie,Fe,He,We,pt,ct,ft,mt,_t,Bt;if(ye=he[0],ye.x=0,ye.y=0,!(He>1))return ye.r;if(Ie=he[1],ye.x=-Ie.r,Ie.x=ye.r,Ie.y=0,!(He>2))return ye.r+Ie.r;ee(Ie,ye,Fe=he[2]),ye=new j(ye),Ie=new j(Ie),Fe=new j(Fe),ye.next=Fe.previous=Ie,Ie.next=ye.previous=Fe,Fe.next=Ie.previous=ye;e:for(ct=3;ct0)throw new Error("cycle");return ct}return Ie.id=function(Fe){return arguments.length?(he=Z(Fe),Ie):he},Ie.parentId=function(Fe){return arguments.length?(ye=Z(Fe),Ie):ye},Ie}function ne(he,ye){return he.parent===ye.parent?1:2}function be(he){var ye=he.children;return ye?ye[0]:he.t}function De(he){var ye=he.children;return ye?ye[ye.length-1]:he.t}function qe(he,ye,Ie){var Fe=Ie/(ye.i-he.i);ye.c-=Fe,ye.s+=Ie,he.c+=Fe,ye.z+=Ie,ye.m+=Ie}function Ne(he){for(var ye=0,Ie=0,Fe=he.children,He=Fe.length,We;--He>=0;)We=Fe[He],We.z+=ye,We.m+=ye,ye+=We.s+(Ie+=We.c)}function ut(he,ye,Ie){return he.a.parent===ye.parent?he.a:Ie}function ot(he,ye){this._=he,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=ye}ot.prototype=Object.create(_.prototype);function yt(he){for(var ye=new ot(he,0),Ie,Fe=[ye],He,We,pt,ct;Ie=Fe.pop();)if(We=Ie._.children)for(Ie.children=new Array(ct=We.length),pt=ct-1;pt>=0;--pt)Fe.push(He=Ie.children[pt]=new ot(We[pt],pt)),He.parent=Ie;return(ye.parent=new ot(null,0)).children=[ye],ye}function At(){var he=ne,ye=1,Ie=1,Fe=null;function He(mt){var _t=yt(mt);if(_t.eachAfter(We),_t.parent.m=-_t.z,_t.eachBefore(pt),Fe)mt.eachBefore(ft);else{var Bt=mt,Et=mt,hr=mt;mt.eachBefore(function(pa){pa.xEt.x&&(Et=pa),pa.depth>hr.depth&&(hr=pa)});var $r=Bt===Et?1:he(Bt,Et)/2,ca=$r-Bt.x,na=ye/(Et.x+$r+ca),wa=Ie/(hr.depth||1);mt.eachBefore(function(pa){pa.x=(pa.x+ca)*na,pa.y=pa.depth*wa})}return mt}function We(mt){var _t=mt.children,Bt=mt.parent.children,Et=mt.i?Bt[mt.i-1]:null;if(_t){Ne(mt);var hr=(_t[0].z+_t[_t.length-1].z)/2;Et?(mt.z=Et.z+he(mt._,Et._),mt.m=mt.z-hr):mt.z=hr}else Et&&(mt.z=Et.z+he(mt._,Et._));mt.parent.A=ct(mt,Et,mt.parent.A||Bt[0])}function pt(mt){mt._.x=mt.z+mt.parent.m,mt.m+=mt.parent.m}function ct(mt,_t,Bt){if(_t){for(var Et=mt,hr=mt,$r=_t,ca=Et.parent.children[0],na=Et.m,wa=hr.m,pa=$r.m,fa=ca.m,za;$r=De($r),Et=be(Et),$r&&Et;)ca=be(ca),hr=De(hr),hr.a=mt,za=$r.z+pa-Et.z-na+he($r._,Et._),za>0&&(qe(ut($r,mt,Bt),mt,za),na+=za,wa+=za),pa+=$r.m,na+=Et.m,fa+=ca.m,wa+=hr.m;$r&&!De(hr)&&(hr.t=$r,hr.m+=pa-wa),Et&&!be(ca)&&(ca.t=Et,ca.m+=na-fa,Bt=mt)}return Bt}function ft(mt){mt.x*=ye,mt.y=mt.depth*Ie}return He.separation=function(mt){return arguments.length?(he=mt,He):he},He.size=function(mt){return arguments.length?(Fe=!1,ye=+mt[0],Ie=+mt[1],He):Fe?null:[ye,Ie]},He.nodeSize=function(mt){return arguments.length?(Fe=!0,ye=+mt[0],Ie=+mt[1],He):Fe?[ye,Ie]:null},He}function It(he,ye,Ie,Fe,He){for(var We=he.children,pt,ct=-1,ft=We.length,mt=he.value&&(He-Ie)/he.value;++ctpa&&(pa=mt),Va=na*na*Ia,fa=Math.max(pa/Va,Va/wa),fa>za){na-=mt;break}za=fa}pt.push(ft={value:na,dice:hr<$r,children:ct.slice(_t,Bt)}),ft.dice?Se(ft,Ie,Fe,He,ca?Fe+=$r*na/ca:We):It(ft,Ie,Fe,ca?Ie+=hr*na/ca:He,We),ca-=na,_t=Bt}return pt}var Ut=function he(ye){function Ie(Fe,He,We,pt,ct){vr(ye,Fe,He,We,pt,ct)}return Ie.ratio=function(Fe){return he((Fe=+Fe)>1?Fe:1)},Ie}(Zt);function Jt(){var he=Ut,ye=!1,Ie=1,Fe=1,He=[0],We=X,pt=X,ct=X,ft=X,mt=X;function _t(Et){return Et.x0=Et.y0=0,Et.x1=Ie,Et.y1=Fe,Et.eachBefore(Bt),He=[0],ye&&Et.eachBefore(Te),Et}function Bt(Et){var hr=He[Et.depth],$r=Et.x0+hr,ca=Et.y0+hr,na=Et.x1-hr,wa=Et.y1-hr;na<$r&&($r=na=($r+na)/2),wa=Et-1){var pa=We[Bt];pa.x0=$r,pa.y0=ca,pa.x1=na,pa.y1=wa;return}for(var fa=mt[Bt],za=hr/2+fa,Ia=Bt+1,Va=Et-1;Ia>>1;mt[Oa]wa-ca){var oi=($r*ka+na*tn)/hr;_t(Bt,Ia,tn,$r,ca,oi,wa),_t(Ia,Et,ka,oi,ca,na,wa)}else{var $n=(ca*ka+wa*tn)/hr;_t(Bt,Ia,tn,$r,ca,na,$n),_t(Ia,Et,ka,$r,$n,na,wa)}}}function Ee(he,ye,Ie,Fe,He){(he.depth&1?It:Se)(he,ye,Ie,Fe,He)}var Re=function he(ye){function Ie(Fe,He,We,pt,ct){if((ft=Fe._squarify)&&ft.ratio===ye)for(var ft,mt,_t,Bt,Et=-1,hr,$r=ft.length,ca=Fe.value;++Et<$r;){for(mt=ft[Et],_t=mt.children,Bt=mt.value=0,hr=_t.length;Bt1?Fe:1)},Ie}(Zt);u.cluster=r,u.hierarchy=g,u.pack=re,u.packEnclose=F,u.packSiblings=K,u.partition=Ce,u.stratify=se,u.tree=At,u.treemap=Jt,u.treemapBinary=at,u.treemapDice=Se,u.treemapResquarify=Re,u.treemapSlice=It,u.treemapSliceDice=Ee,u.treemapSquarify=Ut,Object.defineProperty(u,"__esModule",{value:!0})})}}),I0=xe({"src/traces/sunburst/calc.js"(U){"use strict";var O=P0(),u=yn(),v=Sr(),w=Bl().makeColorScaleFuncFromTrace,S=Ap().makePullColorFn,l=Ap().generateExtendedColors,e=Bl().calc,t=Gn().ALMOST_EQUAL,a={},r={},n={};U.calc=function(s,c){var p=s._fullLayout,f=c.ids,d=v.isArrayOrTypedArray(f),y=c.labels,o=c.parents,b=c.values,M=v.isArrayOrTypedArray(b),A=[],E={},g={},T=function(K,H){E[K]?E[K].push(H):E[K]=[H],g[H]=1},m=function(K){return K||typeof K=="number"},h=function(K){return!M||u(b[K])&&b[K]>=0},x,_,D;d?(x=Math.min(f.length,o.length),_=function(K){return m(f[K])&&h(K)},D=function(K){return String(f[K])}):(x=Math.min(y.length,o.length),_=function(K){return m(y[K])&&h(K)},D=function(K){return String(y[K])}),M&&(x=Math.min(x,b.length));for(var C=0;C1){for(var B=v.randstr(),N=0;N>8&15|O>>4&240,O>>4&15|O&240,(O&15)<<4|O&15,1):u===8?D0(O>>24&255,O>>16&255,O>>8&255,(O&255)/255):u===4?D0(O>>12&15|O>>8&240,O>>8&15|O>>4&240,O>>4&15|O&240,((O&15)<<4|O&15)/255):null):(O=Ix.exec(U))?new Zc(O[1],O[2],O[3],1):(O=Dx.exec(U))?new Zc(O[1]*255/100,O[2]*255/100,O[3]*255/100,1):(O=Rx.exec(U))?D0(O[1],O[2],O[3],O[4]):(O=Fx.exec(U))?D0(O[1]*255/100,O[2]*255/100,O[3]*255/100,O[4]):(O=zx.exec(U))?kx(O[1],O[2]/100,O[3]/100,1):(O=Bx.exec(U))?kx(O[1],O[2]/100,O[3]/100,O[4]):n1.hasOwnProperty(U)?Mx(n1[U]):U==="transparent"?new Zc(NaN,NaN,NaN,0):null}function Mx(U){return new Zc(U>>16&255,U>>8&255,U&255,1)}function D0(U,O,u,v){return v<=0&&(U=O=u=NaN),new Zc(U,O,u,v)}function t1(U){return U instanceof vd||(U=Sp(U)),U?(U=U.rgb(),new Zc(U.r,U.g,U.b,U.opacity)):new Zc}function R0(U,O,u,v){return arguments.length===1?t1(U):new Zc(U,O,u,v??1)}function Zc(U,O,u,v){this.r=+U,this.g=+O,this.b=+u,this.opacity=+v}function Sx(){return`#${qd(this.r)}${qd(this.g)}${qd(this.b)}`}function YE(){return`#${qd(this.r)}${qd(this.g)}${qd(this.b)}${qd((isNaN(this.opacity)?1:this.opacity)*255)}`}function Ex(){let U=F0(this.opacity);return`${U===1?"rgb(":"rgba("}${jd(this.r)}, ${jd(this.g)}, ${jd(this.b)}${U===1?")":`, ${U})`}`}function F0(U){return isNaN(U)?1:Math.max(0,Math.min(1,U))}function jd(U){return Math.max(0,Math.min(255,Math.round(U)||0))}function qd(U){return U=jd(U),(U<16?"0":"")+U.toString(16)}function kx(U,O,u,v){return v<=0?U=O=u=NaN:u<=0||u>=1?U=O=NaN:O<=0&&(U=NaN),new mh(U,O,u,v)}function Cx(U){if(U instanceof mh)return new mh(U.h,U.s,U.l,U.opacity);if(U instanceof vd||(U=Sp(U)),!U)return new mh;if(U instanceof mh)return U;U=U.rgb();var O=U.r/255,u=U.g/255,v=U.b/255,w=Math.min(O,u,v),S=Math.max(O,u,v),l=NaN,e=S-w,t=(S+w)/2;return e?(O===S?l=(u-v)/e+(u0&&t<1?0:l,new mh(l,e,t,U.opacity)}function r1(U,O,u,v){return arguments.length===1?Cx(U):new mh(U,O,u,v??1)}function mh(U,O,u,v){this.h=+U,this.s=+O,this.l=+u,this.opacity=+v}function Lx(U){return U=(U||0)%360,U<0?U+360:U}function z0(U){return Math.max(0,Math.min(1,U||0))}function a1(U,O,u){return(U<60?O+(u-O)*U/60:U<180?u:U<240?O+(u-O)*(240-U)/60:O)*255}var pd,Vd,Hd,Iv,gh,Px,Ix,Dx,Rx,Fx,zx,Bx,n1,i1=Pr({"node_modules/d3-color/src/color.js"(){e1(),pd=.7,Vd=1/pd,Hd="\\s*([+-]?\\d+)\\s*",Iv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",gh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Px=/^#([0-9a-f]{3,8})$/,Ix=new RegExp(`^rgb\\(${Hd},${Hd},${Hd}\\)$`),Dx=new RegExp(`^rgb\\(${gh},${gh},${gh}\\)$`),Rx=new RegExp(`^rgba\\(${Hd},${Hd},${Hd},${Iv}\\)$`),Fx=new RegExp(`^rgba\\(${gh},${gh},${gh},${Iv}\\)$`),zx=new RegExp(`^hsl\\(${Iv},${gh},${gh}\\)$`),Bx=new RegExp(`^hsla\\(${Iv},${gh},${gh},${Iv}\\)$`),n1={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},Pv(vd,Sp,{copy(U){return Object.assign(new this.constructor,this,U)},displayable(){return this.rgb().displayable()},hex:Tx,formatHex:Tx,formatHex8:GE,formatHsl:WE,formatRgb:Ax,toString:Ax}),Pv(Zc,R0,Mp(vd,{brighter(U){return U=U==null?Vd:Math.pow(Vd,U),new Zc(this.r*U,this.g*U,this.b*U,this.opacity)},darker(U){return U=U==null?pd:Math.pow(pd,U),new Zc(this.r*U,this.g*U,this.b*U,this.opacity)},rgb(){return this},clamp(){return new Zc(jd(this.r),jd(this.g),jd(this.b),F0(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Sx,formatHex:Sx,formatHex8:YE,formatRgb:Ex,toString:Ex})),Pv(mh,r1,Mp(vd,{brighter(U){return U=U==null?Vd:Math.pow(Vd,U),new mh(this.h,this.s,this.l*U,this.opacity)},darker(U){return U=U==null?pd:Math.pow(pd,U),new mh(this.h,this.s,this.l*U,this.opacity)},rgb(){var U=this.h%360+(this.h<0)*360,O=isNaN(U)||isNaN(this.s)?0:this.s,u=this.l,v=u+(u<.5?u:1-u)*O,w=2*u-v;return new Zc(a1(U>=240?U-240:U+120,w,v),a1(U,w,v),a1(U<120?U+240:U-120,w,v),this.opacity)},clamp(){return new mh(Lx(this.h),z0(this.s),z0(this.l),F0(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let U=F0(this.opacity);return`${U===1?"hsl(":"hsla("}${Lx(this.h)}, ${z0(this.s)*100}%, ${z0(this.l)*100}%${U===1?")":`, ${U})`}`}}))}}),o1,s1,Nx=Pr({"node_modules/d3-color/src/math.js"(){o1=Math.PI/180,s1=180/Math.PI}});function Ox(U){if(U instanceof Lh)return new Lh(U.l,U.a,U.b,U.opacity);if(U instanceof Wh)return Ux(U);U instanceof Zc||(U=t1(U));var O=h1(U.r),u=h1(U.g),v=h1(U.b),w=u1((.2225045*O+.7168786*u+.0606169*v)/p1),S,l;return O===u&&u===v?S=l=w:(S=u1((.4360747*O+.3850649*u+.1430804*v)/v1),l=u1((.0139322*O+.0971045*u+.7141733*v)/m1)),new Lh(116*w-16,500*(S-w),200*(w-l),U.opacity)}function l1(U,O,u,v){return arguments.length===1?Ox(U):new Lh(U,O,u,v??1)}function Lh(U,O,u,v){this.l=+U,this.a=+O,this.b=+u,this.opacity=+v}function u1(U){return U>jx?Math.pow(U,.3333333333333333):U/y1+g1}function c1(U){return U>Gd?U*U*U:y1*(U-g1)}function f1(U){return 255*(U<=.0031308?12.92*U:1.055*Math.pow(U,.4166666666666667)-.055)}function h1(U){return(U/=255)<=.04045?U/12.92:Math.pow((U+.055)/1.055,2.4)}function XE(U){if(U instanceof Wh)return new Wh(U.h,U.c,U.l,U.opacity);if(U instanceof Lh||(U=Ox(U)),U.a===0&&U.b===0)return new Wh(NaN,0=1?(u=1,O-1):Math.floor(u*O),w=U[v],S=U[v+1],l=v>0?U[v-1]:2*w-S,e=v()=>U}});function Yx(U,O){return function(u){return U+u*O}}function JE(U,O,u){return U=Math.pow(U,u),O=Math.pow(O,u)-U,u=1/u,function(v){return Math.pow(U+v*O,u)}}function O0(U,O){var u=O-U;return u?Yx(U,u>180||u<-180?u-360*Math.round(u/360):u):Cp(isNaN(U)?O:U)}function QE(U){return(U=+U)==1?Kc:function(O,u){return u-O?JE(O,u,U):Cp(isNaN(O)?u:O)}}function Kc(U,O){var u=O-U;return u?Yx(U,u):Cp(isNaN(U)?O:U)}var Fv=Pr({"node_modules/d3-interpolate/src/color.js"(){Wx()}});function Xx(U){return function(O){var u=O.length,v=new Array(u),w=new Array(u),S=new Array(u),l,e;for(l=0;lu&&(S=O.slice(u,S),e[l]?e[l]+=S:e[++l]=S),(v=v[0])===(w=w[0])?e[l]?e[l]+=w:e[++l]=w:(e[++l]=null,t.push({i:l,x:Ph(v,w)})),u=V0.lastIndex;return u180?r+=360:r-a>180&&(a+=360),i.push({i:n.push(w(n)+"rotate(",null,v)-2,x:Ph(a,r)})):r&&n.push(w(n)+"rotate("+r+v)}function e(a,r,n,i){a!==r?i.push({i:n.push(w(n)+"skewX(",null,v)-2,x:Ph(a,r)}):r&&n.push(w(n)+"skewX("+r+v)}function t(a,r,n,i,s,c){if(a!==n||r!==i){var p=s.push(w(s)+"scale(",null,",",null,")");c.push({i:p-4,x:Ph(a,n)},{i:p-2,x:Ph(r,i)})}else(n!==1||i!==1)&&s.push(w(s)+"scale("+n+","+i+")")}return function(a,r){var n=[],i=[];return a=U(a),r=U(r),S(a.translateX,a.translateY,r.translateX,r.translateY,n,i),l(a.rotate,r.rotate,n,i),e(a.skewX,r.skewX,n,i),t(a.scaleX,a.scaleY,r.scaleX,r.scaleY,n,i),a=r=null,function(s){for(var c=-1,p=i.length,f;++cH0,interpolateArray:()=>ek,interpolateBasis:()=>Vx,interpolateBasisClosed:()=>Hx,interpolateCubehelix:()=>x2,interpolateCubehelixLong:()=>w2,interpolateDate:()=>t2,interpolateDiscrete:()=>ak,interpolateHcl:()=>y2,interpolateHclLong:()=>_2,interpolateHsl:()=>p2,interpolateHslLong:()=>m2,interpolateHue:()=>ik,interpolateLab:()=>yk,interpolateNumber:()=>Ph,interpolateNumberArray:()=>M1,interpolateObject:()=>a2,interpolateRgb:()=>U0,interpolateRgbBasis:()=>$x,interpolateRgbBasisClosed:()=>Zx,interpolateRound:()=>sk,interpolateString:()=>i2,interpolateTransformCss:()=>u2,interpolateTransformSvg:()=>c2,interpolateZoom:()=>d2,piecewise:()=>wk,quantize:()=>Ak});var zv=Pr({"node_modules/d3-interpolate/src/index.js"(){G0(),e2(),A1(),Gx(),r2(),nk(),ok(),j0(),S1(),n2(),lk(),o2(),dk(),mk(),Kx(),gk(),_k(),bk(),xk(),Tk(),Mk()}}),k1=xe({"src/traces/sunburst/fill_one.js"(U,O){"use strict";var u=go(),v=wi();O.exports=function(S,l,e,t,a){var r=l.data.data,n=r.i,i=a||r.color;if(n>=0){l.i=r.i;var s=e.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=i,l.color=i):(s.color=i,l.color=i),u.pointStyle(S,e,t,l)}else v.fill(S,i)}}}),T2=xe({"src/traces/sunburst/style.js"(U,O){"use strict";var u=Na(),v=wi(),w=Sr(),S=wf().resizeText,l=k1();function e(a){var r=a._fullLayout._sunburstlayer.selectAll(".trace");S(a,r,"sunburst"),r.each(function(n){var i=u.select(this),s=n[0],c=s.trace;i.style("opacity",c.opacity),i.selectAll("path.surface").each(function(p){u.select(this).call(t,p,c,a)})})}function t(a,r,n,i){var s=r.data.data,c=!r.children,p=s.i,f=w.castOption(n,p,"marker.line.color")||v.defaultLine,d=w.castOption(n,p,"marker.line.width")||0;a.call(l,r,n,i).style("stroke-width",d).call(v.stroke,f).style("opacity",c?n.leaf.opacity:null)}O.exports={style:e,styleOne:t}}}),md=xe({"src/traces/sunburst/helpers.js"(U){"use strict";var O=Sr(),u=wi(),v=Mh(),w=zd();U.findEntryWithLevel=function(t,a){var r;return a&&t.eachAfter(function(n){if(U.getPtId(n)===a)return r=n.copy()}),r||t},U.findEntryWithChild=function(t,a){var r;return t.eachAfter(function(n){for(var i=n.children||[],s=0;s0)},U.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},U.isHeader=function(t,a){return!(U.isLeaf(t)||t.depth===a._maxDepth-1)};function e(t){return t.data.data.pid}U.getParent=function(t,a){return U.findEntryWithLevel(t,e(a))},U.listPath=function(t,a){var r=t.parent;if(!r)return[];var n=a?[r.data[a]]:[r];return U.listPath(r,a).concat(n)},U.getPath=function(t){return U.listPath(t,"label").join("/")+"/"},U.formatValue=w.formatPieValue,U.formatPercent=function(t,a){var r=O.formatPercent(t,0);return r==="0%"&&(r=w.formatPiePercent(t,a)),r}}}),X0=xe({"src/traces/sunburst/fx.js"(U,O){"use strict";var u=Na(),v=Ci(),w=Kf().appendArrayPointValue,S=hu(),l=Sr(),e=ip(),t=md(),a=zd(),r=a.formatPieValue;O.exports=function(s,c,p,f,d){var y=f[0],o=y.trace,b=y.hierarchy,M=o.type==="sunburst",A=o.type==="treemap"||o.type==="icicle";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1);var E=function(m){var h=p._fullLayout;if(!(p._dragging||h.hovermode===!1)){var x=p._fullData[o.index],_=m.data.data,D=_.i,C=t.isHierarchyRoot(m),F=t.getParent(b,m),I=t.getValue(m),z=function(Q){return l.castOption(x,D,Q)},R=z("hovertemplate"),k=S.castHoverinfo(x,h,D),B=h.separators,N;if(R||k&&k!=="none"&&k!=="skip"){var q,Y;M&&(q=y.cx+m.pxmid[0]*(1-m.rInscribed),Y=y.cy+m.pxmid[1]*(1-m.rInscribed)),A&&(q=m._hoverX,Y=m._hoverY);var ee={},te=[],ae=[],j=function(Q){return te.indexOf(Q)!==-1};k&&(te=k==="all"?x._module.attributes.hoverinfo.flags:k.split("+")),ee.label=_.label,j("label")&&ee.label&&ae.push(ee.label),_.hasOwnProperty("v")&&(ee.value=_.v,ee.valueLabel=r(ee.value,B),j("value")&&ae.push(ee.valueLabel)),ee.currentPath=m.currentPath=t.getPath(m.data),j("current path")&&!C&&ae.push(ee.currentPath);var G,K=[],H=function(){K.indexOf(G)===-1&&(ae.push(G),K.push(G))};ee.percentParent=m.percentParent=I/t.getValue(F),ee.parent=m.parentString=t.getPtLabel(F),j("percent parent")&&(G=t.formatPercent(ee.percentParent,B)+" of "+ee.parent,H()),ee.percentEntry=m.percentEntry=I/t.getValue(c),ee.entry=m.entry=t.getPtLabel(c),j("percent entry")&&!C&&!m.onPathbar&&(G=t.formatPercent(ee.percentEntry,B)+" of "+ee.entry,H()),ee.percentRoot=m.percentRoot=I/t.getValue(b),ee.root=m.root=t.getPtLabel(b),j("percent root")&&!C&&(G=t.formatPercent(ee.percentRoot,B)+" of "+ee.root,H()),ee.text=z("hovertext")||z("text"),j("text")&&(G=ee.text,l.isValidTextValue(G)&&ae.push(G)),N=[n(m,x,d.eventDataKeys)];var Z={trace:x,y:Y,_x0:m._x0,_x1:m._x1,_y0:m._y0,_y1:m._y1,text:ae.join("
"),name:R||j("name")?x.name:void 0,color:z("hoverlabel.bgcolor")||_.color,borderColor:z("hoverlabel.bordercolor"),fontFamily:z("hoverlabel.font.family"),fontSize:z("hoverlabel.font.size"),fontColor:z("hoverlabel.font.color"),fontWeight:z("hoverlabel.font.weight"),fontStyle:z("hoverlabel.font.style"),fontVariant:z("hoverlabel.font.variant"),nameLength:z("hoverlabel.namelength"),textAlign:z("hoverlabel.align"),hovertemplate:R,hovertemplateLabels:ee,eventData:N};M&&(Z.x0=q-m.rInscribed*m.rpx1,Z.x1=q+m.rInscribed*m.rpx1,Z.idealAlign=m.pxmid[0]<0?"left":"right"),A&&(Z.x=q,Z.idealAlign=q<0?"left":"right");var X=[];S.loneHover(Z,{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:p,inOut_bbox:X}),N[0].bbox=X[0],o._hasHoverLabel=!0}if(A){var $=s.select("path.surface");d.styleOne($,m,x,p,{hovered:!0})}o._hasHoverEvent=!0,p.emit("plotly_hover",{points:N||[n(m,x,d.eventDataKeys)],event:u.event})}},g=function(m){var h=p._fullLayout,x=p._fullData[o.index],_=u.select(this).datum();if(o._hasHoverEvent&&(m.originalEvent=u.event,p.emit("plotly_unhover",{points:[n(_,x,d.eventDataKeys)],event:u.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(S.loneUnhover(h._hoverlayer.node()),o._hasHoverLabel=!1),A){var D=s.select("path.surface");d.styleOne(D,_,x,p,{hovered:!1})}},T=function(m){var h=p._fullLayout,x=p._fullData[o.index],_=M&&(t.isHierarchyRoot(m)||t.isLeaf(m)),D=t.getPtId(m),C=t.isEntry(m)?t.findEntryWithChild(b,D):t.findEntryWithLevel(b,D),F=t.getPtId(C),I={points:[n(m,x,d.eventDataKeys)],event:u.event};_||(I.nextLevel=F);var z=e.triggerHandler(p,"plotly_"+o.type+"click",I);if(z!==!1&&h.hovermode&&(p._hoverdata=[n(m,x,d.eventDataKeys)],S.click(p,u.event)),!_&&z!==!1&&!p._dragging&&!p._transitioning){v.call("_storeDirectGUIEdit",x,h._tracePreGUI[x.uid],{level:x.level});var R={data:[{level:F}],traces:[o.index]},k={frame:{redraw:!1,duration:d.transitionTime},transition:{duration:d.transitionTime,easing:d.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(h._hoverlayer.node()),v.call("animate",p,R,k)}};s.on("mouseover",E),s.on("mouseout",g),s.on("click",T)};function n(i,s,c){for(var p=i.data.data,f={curveNumber:s.index,pointNumber:p.i,data:s._input,fullData:s},d=0;dqe.x1?2*Math.PI:0)+Q;Ne=ne.rpx1Ce?2*Math.PI:0)+Q;De={x0:Ne,x1:Ne}}else De={rpx0:te,rpx1:te},S.extendFlat(De,se(ne));else De={rpx0:0,rpx1:0};else De={x0:Q,x1:Q};return v(De,qe)}function ie(ne){var be=K[y.getPtId(ne)],De,qe=ne.transform;if(be)De=be;else if(De={rpx1:ne.rpx1,transform:{textPosAngle:qe.textPosAngle,scale:0,rotate:qe.rotate,rCenter:qe.rCenter,x:qe.x,y:qe.y}},G)if(ne.parent)if(Ce){var Ne=ne.x1>Ce?2*Math.PI:0;De.x0=De.x1=Ne}else S.extendFlat(De,se(ne));else De.x0=De.x1=Q;else De.x0=De.x1=Q;var ut=v(De.transform.textPosAngle,ne.transform.textPosAngle),ot=v(De.rpx1,ne.rpx1),yt=v(De.x0,ne.x0),At=v(De.x1,ne.x1),It=v(De.transform.scale,qe.scale),Zt=v(De.transform.rotate,qe.rotate),vr=qe.rCenter===0?3:De.transform.rCenter===0?1/3:1,Ut=v(De.transform.rCenter,qe.rCenter),Jt=function(at){return Ut(Math.pow(at,vr))};return function(at){var Ee=ot(at),Re=yt(at),he=At(at),ye=Jt(at),Ie=pe(Ee,(Re+he)/2),Fe=ut(at),He={pxmid:Ie,rpx1:Ee,transform:{textPosAngle:Fe,rCenter:ye,x:qe.x,y:qe.y}};return t(z.type,qe,_),{transform:{targetX:Te(He),targetY:Se(He),scale:It(at),rotate:Zt(at),rCenter:ye}}}}function se(ne){var be=ne.parent,De=K[y.getPtId(be)],qe={};if(De){var Ne=be.children,ut=Ne.indexOf(ne),ot=Ne.length,yt=v(De.x0,De.x1);qe.x0=yt(ut/ot),qe.x1=yt(ut/ot)}else qe.x0=qe.x1=0;return qe}}function b(g){return u.partition().size([2*Math.PI,g.height+1])(g)}U.formatSliceLabel=function(g,T,m,h,x){var _=m.texttemplate,D=m.textinfo;if(!_&&(!D||D==="none"))return"";var C=x.separators,F=h[0],I=g.data.data,z=F.hierarchy,R=y.isHierarchyRoot(g),k=y.getParent(z,g),B=y.getValue(g);if(!_){var N=D.split("+"),q=function(X){return N.indexOf(X)!==-1},Y=[],ee;if(q("label")&&I.label&&Y.push(I.label),I.hasOwnProperty("v")&&q("value")&&Y.push(y.formatValue(I.v,C)),!R){q("current path")&&Y.push(y.getPath(g.data));var te=0;q("percent parent")&&te++,q("percent entry")&&te++,q("percent root")&&te++;var ae=te>1;if(te){var j,G=function(X){ee=y.formatPercent(j,C),ae&&(ee+=" of "+X),Y.push(ee)};q("percent parent")&&!R&&(j=B/y.getValue(k),G("parent")),q("percent entry")&&(j=B/y.getValue(T),G("entry")),q("percent root")&&(j=B/y.getValue(z),G("root"))}}return q("text")&&(ee=S.castOption(m,I.i,"text"),S.isValidTextValue(ee)&&Y.push(ee)),Y.join("
")}var K=S.castOption(m,I.i,"texttemplate");if(!K)return"";var H={};I.label&&(H.label=I.label),I.hasOwnProperty("v")&&(H.value=I.v,H.valueLabel=y.formatValue(I.v,C)),H.currentPath=y.getPath(g.data),R||(H.percentParent=B/y.getValue(k),H.percentParentLabel=y.formatPercent(H.percentParent,C),H.parent=y.getPtLabel(k)),H.percentEntry=B/y.getValue(T),H.percentEntryLabel=y.formatPercent(H.percentEntry,C),H.entry=y.getPtLabel(T),H.percentRoot=B/y.getValue(z),H.percentRootLabel=y.formatPercent(H.percentRoot,C),H.root=y.getPtLabel(z),I.hasOwnProperty("color")&&(H.color=I.color);var Z=S.castOption(m,I.i,"text");return(S.isValidTextValue(Z)||Z==="")&&(H.text=Z),H.customdata=S.castOption(m,I.i,"customdata"),S.texttemplateString({data:[H,m._meta],fallback:m.texttemplatefallback,labels:H,locale:x._d3locale,template:K})};function M(g){return g.rpx0===0&&S.isFullCircle([g.x0,g.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(g.halfangle)),g.ring/2))}function A(g){return E(g.rpx1,g.transform.textPosAngle)}function E(g,T){return[g*Math.sin(T),-g*Math.cos(T)]}}}),Sk=xe({"src/traces/sunburst/index.js"(U,O){"use strict";O.exports={moduleType:"trace",name:"sunburst",basePlotModule:qE(),categories:[],animatable:!0,attributes:L0(),layoutAttributes:wx(),supplyDefaults:VE(),supplyLayoutDefaults:HE(),calc:I0().calc,crossTraceCalc:I0().crossTraceCalc,plot:C1().plot,style:T2().style,colorbar:pf(),meta:{}}}}),Ek=xe({"lib/sunburst.js"(U,O){"use strict";O.exports=Sk()}}),kk=xe({"src/traces/treemap/base_plot.js"(U){"use strict";var O=zl();U.name="treemap",U.plot=function(u,v,w,S){O.plotBasePlot(U.name,u,v,w,S)},U.clean=function(u,v,w,S){O.cleanBasePlot(U.name,u,v,w,S)}}}),Bv=xe({"src/traces/treemap/constants.js"(U,O){"use strict";O.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),L1=xe({"src/traces/treemap/attributes.js"(U,O){"use strict";var{hovertemplateAttrs:u,texttemplateAttrs:v,templatefallbackAttrs:w}=js(),S=pl(),l=Gl().attributes,e=Cv(),t=L0(),a=Bv(),r=oo().extendFlat,n=Rc().pattern;O.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:r({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:t.marker.colors,pattern:n,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:v({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:w({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:u({},{keys:a.eventDataKeys}),hovertemplatefallback:w(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:t.root,domain:l({name:"treemap",trace:!0,editType:"calc"})}}}),A2=xe({"src/traces/treemap/layout_attributes.js"(U,O){"use strict";O.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Ck=xe({"src/traces/treemap/defaults.js"(U,O){"use strict";var u=Sr(),v=L1(),w=wi(),S=Gl().defaults,l=sh().handleText,e=Ud().TEXTPAD,t=Lv().handleMarkerDefaults,a=Bl(),r=a.hasColorscale,n=a.handleDefaults;O.exports=function(s,c,p,f){function d(x,_){return u.coerce(s,c,v,x,_)}var y=d("labels"),o=d("parents");if(!y||!y.length||!o||!o.length){c.visible=!1;return}var b=d("values");b&&b.length?d("branchvalues"):d("count"),d("level"),d("maxdepth");var M=d("tiling.packing");M==="squarify"&&d("tiling.squarifyratio"),d("tiling.flip"),d("tiling.pad");var A=d("text");d("texttemplate"),d("texttemplatefallback"),c.texttemplate||d("textinfo",u.isArrayOrTypedArray(A)?"text+label":"label"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback");var E=d("pathbar.visible"),g="auto";l(s,c,f,d,g,{hasPathbar:E,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("textposition");var T=c.textposition.indexOf("bottom")!==-1;t(s,c,f,d);var m=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;m?n(s,c,f,d,{prefix:"marker.",cLetter:"c"}):d("marker.depthfade",!(c.marker.colors||[]).length);var h=c.textfont.size*2;d("marker.pad.t",T?h/4:h),d("marker.pad.l",h/4),d("marker.pad.r",h/4),d("marker.pad.b",T?h:h/4),d("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:w.contrast(f.paper_bgcolor)}}},E&&(d("pathbar.thickness",c.pathbar.textfont.size+2*e),d("pathbar.side"),d("pathbar.edgeshape")),d("sort"),d("root.color"),S(c,f,d),c._length=null}}}),Lk=xe({"src/traces/treemap/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=A2();O.exports=function(S,l){function e(t,a){return u.coerce(S,l,v,t,a)}e("treemapcolorway",l.colorway),e("extendtreemapcolors")}}}),M2=xe({"src/traces/treemap/calc.js"(U){"use strict";var O=I0();U.calc=function(u,v){return O.calc(u,v)},U.crossTraceCalc=function(u){return O._runCrossTraceCalc("treemap",u)}}}),S2=xe({"src/traces/treemap/flip_tree.js"(U,O){"use strict";O.exports=function u(v,w,S){var l;S.swapXY&&(l=v.x0,v.x0=v.y0,v.y0=l,l=v.x1,v.x1=v.y1,v.y1=l),S.flipX&&(l=v.x0,v.x0=w[0]-v.x1,v.x1=w[0]-l),S.flipY&&(l=v.y0,v.y0=w[1]-v.y1,v.y1=w[1]-l);var e=v.children;if(e)for(var t=0;t0)for(var h=0;h").join(" ")||"";var ae=v.ensureSingle(ee,"g","slicetext"),j=v.ensureSingle(ae,"text","",function(K){K.attr("data-notex",1)}),G=v.ensureUniformFontSize(s,a.determineTextFont(z,Y,F.font,{onPathbar:!0}));j.text(Y._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(w.font,G).call(S.convertToTspans,s),Y.textBB=w.bBox(j.node()),Y.transform=g(Y,{fontSize:G.size,onPathbar:!0}),Y.transform.fontSize=G.size,m?j.transition().attrTween("transform",function(K){var H=_(K,n,D,[o,b]);return function(Z){return T(H(Z))}}):j.attr("transform",T(Y))})}}}),Ik=xe({"src/traces/treemap/plot_one.js"(U,O){"use strict";var u=Na(),v=(zv(),Ta(Yd)).interpolate,w=md(),S=Sr(),l=Ud().TEXTPAD,e=Tv(),t=e.toMoveInsideBar,a=wf(),r=a.recordMinTextSize,n=Bv(),i=Pk();function s(c){return w.isHierarchyRoot(c)?"":w.getPtId(c)}O.exports=function(p,f,d,y,o){var b=p._fullLayout,M=f[0],A=M.trace,E=A.type,g=E==="icicle",T=M.hierarchy,m=w.findEntryWithLevel(T,A.level),h=u.select(d),x=h.selectAll("g.pathbar"),_=h.selectAll("g.slice");if(!m){x.remove(),_.remove();return}var D=w.isHierarchyRoot(m),C=!b.uniformtext.mode&&w.hasTransition(y),F=w.getMaxDepth(A),I=function(Ut){return Ut.data.depth-m.data.depth-1?B+Y:-(q+Y):0,te={x0:N,x1:N,y0:ee,y1:ee+q},ae=function(Ut,Jt,at){var Ee=A.tiling.pad,Re=function(Fe){return Fe-Ee<=Jt.x0},he=function(Fe){return Fe+Ee>=Jt.x1},ye=function(Fe){return Fe-Ee<=Jt.y0},Ie=function(Fe){return Fe+Ee>=Jt.y1};return Ut.x0===Jt.x0&&Ut.x1===Jt.x1&&Ut.y0===Jt.y0&&Ut.y1===Jt.y1?{x0:Ut.x0,x1:Ut.x1,y0:Ut.y0,y1:Ut.y1}:{x0:Re(Ut.x0-Ee)?0:he(Ut.x0-Ee)?at[0]:Ut.x0,x1:Re(Ut.x1+Ee)?0:he(Ut.x1+Ee)?at[0]:Ut.x1,y0:ye(Ut.y0-Ee)?0:Ie(Ut.y0-Ee)?at[1]:Ut.y0,y1:ye(Ut.y1+Ee)?0:Ie(Ut.y1+Ee)?at[1]:Ut.y1}},j=null,G={},K={},H=null,Z=function(Ut,Jt){return Jt?G[s(Ut)]:K[s(Ut)]},X=function(Ut,Jt,at,Ee){if(Jt)return G[s(T)]||te;var Re=K[A.level]||at;return I(Ut)?ae(Ut,Re,Ee):{}};M.hasMultipleRoots&&D&&F++,A._maxDepth=F,A._backgroundColor=b.paper_bgcolor,A._entryDepth=m.data.depth,A._atRootLevel=D;var $=-k/2+z.l+z.w*(R.x[1]+R.x[0])/2,Q=-B/2+z.t+z.h*(1-(R.y[1]+R.y[0])/2),re=function(Ut){return $+Ut},ue=function(Ut){return Q+Ut},pe=ue(0),ge=re(0),Te=function(Ut){return ge+Ut},Se=function(Ut){return pe+Ut};function Ce(Ut,Jt){return Ut+","+Jt}var Ue=Te(0),Oe=function(Ut){Ut.x=Math.max(Ue,Ut.x)},_e=A.pathbar.edgeshape,ce=function(Ut){var Jt=Te(Math.max(Math.min(Ut.x0,Ut.x0),0)),at=Te(Math.min(Math.max(Ut.x1,Ut.x1),N)),Ee=Se(Ut.y0),Re=Se(Ut.y1),he=q/2,ye={},Ie={};ye.x=Jt,Ie.x=at,ye.y=Ie.y=(Ee+Re)/2;var Fe={x:Jt,y:Ee},He={x:at,y:Ee},We={x:at,y:Re},pt={x:Jt,y:Re};return _e===">"?(Fe.x-=he,He.x-=he,We.x-=he,pt.x-=he):_e==="/"?(We.x-=he,pt.x-=he,ye.x-=he/2,Ie.x-=he/2):_e==="\\"?(Fe.x-=he,He.x-=he,ye.x-=he/2,Ie.x-=he/2):_e==="<"&&(ye.x-=he,Ie.x-=he),Oe(Fe),Oe(pt),Oe(ye),Oe(He),Oe(We),Oe(Ie),"M"+Ce(Fe.x,Fe.y)+"L"+Ce(He.x,He.y)+"L"+Ce(Ie.x,Ie.y)+"L"+Ce(We.x,We.y)+"L"+Ce(pt.x,pt.y)+"L"+Ce(ye.x,ye.y)+"Z"},ie=A[g?"tiling":"marker"].pad,se=function(Ut){return A.textposition.indexOf(Ut)!==-1},ne=se("top"),be=se("left"),De=se("right"),qe=se("bottom"),Ne=function(Ut){var Jt=re(Ut.x0),at=re(Ut.x1),Ee=ue(Ut.y0),Re=ue(Ut.y1),he=at-Jt,ye=Re-Ee;if(!he||!ye)return"";var Ie=A.marker.cornerradius||0,Fe=Math.min(Ie,he/2,ye/2);Fe&&Ut.data&&Ut.data.data&&Ut.data.data.label&&(ne&&(Fe=Math.min(Fe,ie.t)),be&&(Fe=Math.min(Fe,ie.l)),De&&(Fe=Math.min(Fe,ie.r)),qe&&(Fe=Math.min(Fe,ie.b)));var He=function(We,pt){return Fe?"a"+Ce(Fe,Fe)+" 0 0 1 "+Ce(We,pt):""};return"M"+Ce(Jt,Ee+Fe)+He(Fe,-Fe)+"L"+Ce(at-Fe,Ee)+He(Fe,Fe)+"L"+Ce(at,Re-Fe)+He(-Fe,Fe)+"L"+Ce(Jt+Fe,Re)+He(-Fe,-Fe)+"Z"},ut=function(Ut,Jt){var at=Ut.x0,Ee=Ut.x1,Re=Ut.y0,he=Ut.y1,ye=Ut.textBB,Ie=ne||Jt.isHeader&&!qe,Fe=Ie?"start":qe?"end":"middle",He=se("right"),We=se("left")||Jt.onPathbar,pt=We?-1:He?1:0;if(Jt.isHeader){if(at+=(g?ie:ie.l)-l,Ee-=(g?ie:ie.r)-l,at>=Ee){var ct=(at+Ee)/2;at=ct,Ee=ct}var ft;qe?(ft=he-(g?ie:ie.b),Re-1,flipY:R.tiling.flip.indexOf("y")>-1,pad:{inner:R.tiling.pad,top:R.marker.pad.t,left:R.marker.pad.l,right:R.marker.pad.r,bottom:R.marker.pad.b}}),ee=Y.descendants(),te=1/0,ae=-1/0;ee.forEach(function(Z){var X=Z.depth;X>=R._maxDepth?(Z.x0=Z.x1=(Z.x0+Z.x1)/2,Z.y0=Z.y1=(Z.y0+Z.y1)/2):(te=Math.min(te,X),ae=Math.max(ae,X))}),d=d.data(ee,a.getPtId),R._maxVisibleLayers=isFinite(ae)?ae-te+1:0,d.enter().append("g").classed("slice",!0),h(d,i,C,[o,b],E),d.order();var j=null;if(m&&D){var G=a.getPtId(D);d.each(function(Z){j===null&&a.getPtId(Z)===G&&(j={x0:Z.x0,x1:Z.x1,y0:Z.y0,y1:Z.y1})})}var K=function(){return j||{x0:0,x1:o,y0:0,y1:b}},H=d;return m&&(H=H.transition().each("end",function(){var Z=u.select(this);a.setSliceCursor(Z,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),H.each(function(Z){var X=a.isHeader(Z,R);Z._x0=M(Z.x0),Z._x1=M(Z.x1),Z._y0=A(Z.y0),Z._y1=A(Z.y1),Z._hoverX=M(Z.x1-R.marker.pad.r),Z._hoverY=A(N?Z.y1-R.marker.pad.b/2:Z.y0+R.marker.pad.t/2);var $=u.select(this),Q=v.ensureSingle($,"path","surface",function(Se){Se.style("pointer-events",F?"none":"all")});m?Q.transition().attrTween("d",function(Se){var Ce=x(Se,i,K(),[o,b]);return function(Ue){return E(Ce(Ue))}}):Q.attr("d",E),$.call(r,f,c,p,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,c,{isTransitioning:c._transitioning}),Q.call(e,Z,R,c,{hovered:!1}),Z.x0===Z.x1||Z.y0===Z.y1?Z._text="":X?Z._text=q?"":a.getPtLabel(Z)||"":Z._text=n(Z,f,R,p,I)||"";var re=v.ensureSingle($,"g","slicetext"),ue=v.ensureSingle(re,"text","",function(Se){Se.attr("data-notex",1)}),pe=v.ensureUniformFontSize(c,a.determineTextFont(R,Z,I.font)),ge=Z._text||" ",Te=X&&ge.indexOf("
")===-1;ue.text(ge).classed("slicetext",!0).attr("text-anchor",B?"end":k||Te?"start":"middle").call(w.font,pe).call(S.convertToTspans,c),Z.textBB=w.bBox(ue.node()),Z.transform=g(Z,{fontSize:pe.size,isHeader:X}),Z.transform.fontSize=pe.size,m?ue.transition().attrTween("transform",function(Se){var Ce=_(Se,i,K(),[o,b]);return function(Ue){return T(Ce(Ue))}}):ue.attr("transform",T(Z))}),j}}}),Rk=xe({"src/traces/treemap/plot.js"(U,O){"use strict";var u=k2(),v=Dk();O.exports=function(S,l,e,t){return u(S,l,e,t,{type:"treemap",drawDescendants:v})}}}),Fk=xe({"src/traces/treemap/index.js"(U,O){"use strict";O.exports={moduleType:"trace",name:"treemap",basePlotModule:kk(),categories:[],animatable:!0,attributes:L1(),layoutAttributes:A2(),supplyDefaults:Ck(),supplyLayoutDefaults:Lk(),calc:M2().calc,crossTraceCalc:M2().crossTraceCalc,plot:Rk(),style:P1().style,colorbar:pf(),meta:{}}}}),zk=xe({"lib/treemap.js"(U,O){"use strict";O.exports=Fk()}}),Bk=xe({"src/traces/icicle/base_plot.js"(U){"use strict";var O=zl();U.name="icicle",U.plot=function(u,v,w,S){O.plotBasePlot(U.name,u,v,w,S)},U.clean=function(u,v,w,S){O.cleanBasePlot(U.name,u,v,w,S)}}}),C2=xe({"src/traces/icicle/attributes.js"(U,O){"use strict";var{hovertemplateAttrs:u,texttemplateAttrs:v,templatefallbackAttrs:w}=js(),S=pl(),l=Gl().attributes,e=Cv(),t=L0(),a=L1(),r=Bv(),n=oo().extendFlat,i=Rc().pattern;O.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:a.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:n({colors:t.marker.colors,line:t.marker.line,pattern:i,editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:a.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:v({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),texttemplatefallback:w({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:u({},{keys:r.eventDataKeys}),hovertemplatefallback:w(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:a.outsidetextfont,textposition:a.textposition,sort:e.sort,root:t.root,domain:l({name:"icicle",trace:!0,editType:"calc"})}}}),L2=xe({"src/traces/icicle/layout_attributes.js"(U,O){"use strict";O.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Nk=xe({"src/traces/icicle/defaults.js"(U,O){"use strict";var u=Sr(),v=C2(),w=wi(),S=Gl().defaults,l=sh().handleText,e=Ud().TEXTPAD,t=Lv().handleMarkerDefaults,a=Bl(),r=a.hasColorscale,n=a.handleDefaults;O.exports=function(s,c,p,f){function d(T,m){return u.coerce(s,c,v,T,m)}var y=d("labels"),o=d("parents");if(!y||!y.length||!o||!o.length){c.visible=!1;return}var b=d("values");b&&b.length?d("branchvalues"):d("count"),d("level"),d("maxdepth"),d("tiling.orientation"),d("tiling.flip"),d("tiling.pad");var M=d("text");d("texttemplate"),d("texttemplatefallback"),c.texttemplate||d("textinfo",u.isArrayOrTypedArray(M)?"text+label":"label"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback");var A=d("pathbar.visible"),E="auto";l(s,c,f,d,E,{hasPathbar:A,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("textposition"),t(s,c,f,d);var g=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;g&&n(s,c,f,d,{prefix:"marker.",cLetter:"c"}),d("leaf.opacity",g?1:.7),c._hovered={marker:{line:{width:2,color:w.contrast(f.paper_bgcolor)}}},A&&(d("pathbar.thickness",c.pathbar.textfont.size+2*e),d("pathbar.side"),d("pathbar.edgeshape")),d("sort"),d("root.color"),S(c,f,d),c._length=null}}}),Ok=xe({"src/traces/icicle/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=L2();O.exports=function(S,l){function e(t,a){return u.coerce(S,l,v,t,a)}e("iciclecolorway",l.colorway),e("extendiciclecolors")}}}),P2=xe({"src/traces/icicle/calc.js"(U){"use strict";var O=I0();U.calc=function(u,v){return O.calc(u,v)},U.crossTraceCalc=function(u){return O._runCrossTraceCalc("icicle",u)}}}),Uk=xe({"src/traces/icicle/partition.js"(U,O){"use strict";var u=P0(),v=S2();O.exports=function(S,l,e){var t=e.flipX,a=e.flipY,r=e.orientation==="h",n=e.maxDepth,i=l[0],s=l[1];n&&(i=(S.height+1)*l[0]/Math.min(S.height+1,n),s=(S.height+1)*l[1]/Math.min(S.height+1,n));var c=u.partition().padding(e.pad.inner).size(r?[l[1],i]:[l[0],s])(S);return(r||t||a)&&v(c,l,{swapXY:r,flipX:t,flipY:a}),c}}}),I2=xe({"src/traces/icicle/style.js"(U,O){"use strict";var u=Na(),v=wi(),w=Sr(),S=wf().resizeText,l=k1();function e(a){var r=a._fullLayout._iciclelayer.selectAll(".trace");S(a,r,"icicle"),r.each(function(n){var i=u.select(this),s=n[0],c=s.trace;i.style("opacity",c.opacity),i.selectAll("path.surface").each(function(p){u.select(this).call(t,p,c,a)})})}function t(a,r,n,i){var s=r.data.data,c=!r.children,p=s.i,f=w.castOption(n,p,"marker.line.color")||v.defaultLine,d=w.castOption(n,p,"marker.line.width")||0;a.call(l,r,n,i).style("stroke-width",d).call(v.stroke,f).style("opacity",c?n.leaf.opacity:null)}O.exports={style:e,styleOne:t}}}),jk=xe({"src/traces/icicle/draw_descendants.js"(U,O){"use strict";var u=Na(),v=Sr(),w=go(),S=el(),l=Uk(),e=I2().styleOne,t=Bv(),a=md(),r=X0(),n=C1().formatSliceLabel,i=!1;O.exports=function(c,p,f,d,y){var o=y.width,b=y.height,M=y.viewX,A=y.viewY,E=y.pathSlice,g=y.toMoveInsideSlice,T=y.strTransform,m=y.hasTransition,h=y.handleSlicesExit,x=y.makeUpdateSliceInterpolator,_=y.makeUpdateTextInterpolator,D=y.prevEntry,C={},F=c._context.staticPlot,I=c._fullLayout,z=p[0],R=z.trace,k=R.textposition.indexOf("left")!==-1,B=R.textposition.indexOf("right")!==-1,N=R.textposition.indexOf("bottom")!==-1,q=l(f,[o,b],{flipX:R.tiling.flip.indexOf("x")>-1,flipY:R.tiling.flip.indexOf("y")>-1,orientation:R.tiling.orientation,pad:{inner:R.tiling.pad},maxDepth:R._maxDepth}),Y=q.descendants(),ee=1/0,te=-1/0;Y.forEach(function(H){var Z=H.depth;Z>=R._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(ee=Math.min(ee,Z),te=Math.max(te,Z))}),d=d.data(Y,a.getPtId),R._maxVisibleLayers=isFinite(te)?te-ee+1:0,d.enter().append("g").classed("slice",!0),h(d,i,C,[o,b],E),d.order();var ae=null;if(m&&D){var j=a.getPtId(D);d.each(function(H){ae===null&&a.getPtId(H)===j&&(ae={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var G=function(){return ae||{x0:0,x1:o,y0:0,y1:b}},K=d;return m&&(K=K.transition().each("end",function(){var H=u.select(this);a.setSliceCursor(H,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(H){H._x0=M(H.x0),H._x1=M(H.x1),H._y0=A(H.y0),H._y1=A(H.y1),H._hoverX=M(H.x1-R.tiling.pad),H._hoverY=A(N?H.y1-R.tiling.pad/2:H.y0+R.tiling.pad/2);var Z=u.select(this),X=v.ensureSingle(Z,"path","surface",function(ue){ue.style("pointer-events",F?"none":"all")});m?X.transition().attrTween("d",function(ue){var pe=x(ue,i,G(),[o,b],{orientation:R.tiling.orientation,flipX:R.tiling.flip.indexOf("x")>-1,flipY:R.tiling.flip.indexOf("y")>-1});return function(ge){return E(pe(ge))}}):X.attr("d",E),Z.call(r,f,c,p,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,c,{isTransitioning:c._transitioning}),X.call(e,H,R,c,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":H._text=n(H,f,R,p,I)||"";var $=v.ensureSingle(Z,"g","slicetext"),Q=v.ensureSingle($,"text","",function(ue){ue.attr("data-notex",1)}),re=v.ensureUniformFontSize(c,a.determineTextFont(R,H,I.font));Q.text(H._text||" ").classed("slicetext",!0).attr("text-anchor",B?"end":k?"start":"middle").call(w.font,re).call(S.convertToTspans,c),H.textBB=w.bBox(Q.node()),H.transform=g(H,{fontSize:re.size}),H.transform.fontSize=re.size,m?Q.transition().attrTween("transform",function(ue){var pe=_(ue,i,G(),[o,b]);return function(ge){return T(pe(ge))}}):Q.attr("transform",T(H))}),ae}}}),qk=xe({"src/traces/icicle/plot.js"(U,O){"use strict";var u=k2(),v=jk();O.exports=function(S,l,e,t){return u(S,l,e,t,{type:"icicle",drawDescendants:v})}}}),Vk=xe({"src/traces/icicle/index.js"(U,O){"use strict";O.exports={moduleType:"trace",name:"icicle",basePlotModule:Bk(),categories:[],animatable:!0,attributes:C2(),layoutAttributes:L2(),supplyDefaults:Nk(),supplyLayoutDefaults:Ok(),calc:P2().calc,crossTraceCalc:P2().crossTraceCalc,plot:qk(),style:I2().style,colorbar:pf(),meta:{}}}}),Hk=xe({"lib/icicle.js"(U,O){"use strict";O.exports=Vk()}}),Gk=xe({"src/traces/funnelarea/base_plot.js"(U){"use strict";var O=zl();U.name="funnelarea",U.plot=function(u,v,w,S){O.plotBasePlot(U.name,u,v,w,S)},U.clean=function(u,v,w,S){O.cleanBasePlot(U.name,u,v,w,S)}}}),D2=xe({"src/traces/funnelarea/attributes.js"(U,O){"use strict";var u=Cv(),v=Rs(),w=Gl().attributes,{hovertemplateAttrs:S,texttemplateAttrs:l,templatefallbackAttrs:e}=js(),t=oo().extendFlat;O.exports={labels:u.labels,label0:u.label0,dlabel:u.dlabel,values:u.values,marker:{colors:u.marker.colors,line:{color:t({},u.marker.line.color,{dflt:null}),width:t({},u.marker.line.width,{dflt:1}),editType:"calc"},pattern:u.marker.pattern,editType:"calc"},text:u.text,hovertext:u.hovertext,scalegroup:t({},u.scalegroup,{}),textinfo:t({},u.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:t({},v.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:t({},u.textposition,{values:["inside","none"],dflt:"inside"}),textfont:u.textfont,insidetextfont:u.insidetextfont,title:{text:u.title.text,font:u.title.font,position:t({},u.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:w({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"}}}}),R2=xe({"src/traces/funnelarea/layout_attributes.js"(U,O){"use strict";var u=Jg().hiddenlabels;O.exports={hiddenlabels:u,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Wk=xe({"src/traces/funnelarea/defaults.js"(U,O){"use strict";var u=Sr(),v=D2(),w=Gl().defaults,S=sh().handleText,l=Lv().handleLabelsAndValues,e=Lv().handleMarkerDefaults;O.exports=function(a,r,n,i){function s(E,g){return u.coerce(a,r,v,E,g)}var c=s("labels"),p=s("values"),f=l(c,p),d=f.len;if(r._hasLabels=f.hasLabels,r._hasValues=f.hasValues,!r._hasLabels&&r._hasValues&&(s("label0"),s("dlabel")),!d){r.visible=!1;return}r._length=d,e(a,r,i,s),s("scalegroup");var y=s("text"),o=s("texttemplate");s("texttemplatefallback");var b;if(o||(b=s("textinfo",Array.isArray(y)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),o||b&&b!=="none"){var M=s("textposition");S(a,r,i,s,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else b==="none"&&s("textposition","none");w(r,i,s);var A=s("title.text");A&&(s("title.position"),u.coerceFont(s,"title.font",i.font)),s("aspectratio"),s("baseratio")}}}),Yk=xe({"src/traces/funnelarea/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=R2();O.exports=function(S,l){function e(t,a){return u.coerce(S,l,v,t,a)}e("hiddenlabels"),e("funnelareacolorway",l.colorway),e("extendfunnelareacolors")}}}),F2=xe({"src/traces/funnelarea/calc.js"(U,O){"use strict";var u=Ap();function v(S,l){return u.calc(S,l)}function w(S){u.crossTraceCalc(S,{type:"funnelarea"})}O.exports={calc:v,crossTraceCalc:w}}}),Xk=xe({"src/traces/funnelarea/plot.js"(U,O){"use strict";var u=Na(),v=go(),w=Sr(),S=w.strScale,l=w.strTranslate,e=el(),t=Tv(),a=t.toMoveInsideBar,r=wf(),n=r.recordMinTextSize,i=r.clearMinTextSize,s=zd(),c=Qg(),p=c.attachFxHandlers,f=c.determineInsideTextFont,d=c.layoutAreas,y=c.prerenderTitles,o=c.positionTitleOutside,b=c.formatSliceLabel;O.exports=function(T,m){var h=T._context.staticPlot,x=T._fullLayout;i("funnelarea",x),y(m,T),d(m,x._size),w.makeTraceGroups(x._funnelarealayer,m,"trace").each(function(_){var D=u.select(this),C=_[0],F=C.trace;E(_),D.each(function(){var I=u.select(this).selectAll("g.slice").data(_);I.enter().append("g").classed("slice",!0),I.exit().remove(),I.each(function(R,k){if(R.hidden){u.select(this).selectAll("path,g").remove();return}R.pointNumber=R.i,R.curveNumber=F.index;var B=C.cx,N=C.cy,q=u.select(this),Y=q.selectAll("path.surface").data([R]);Y.enter().append("path").classed("surface",!0).style({"pointer-events":h?"none":"all"}),q.call(p,T,_);var ee="M"+(B+R.TR[0])+","+(N+R.TR[1])+M(R.TR,R.BR)+M(R.BR,R.BL)+M(R.BL,R.TL)+"Z";Y.attr("d",ee),b(T,R,C);var te=s.castOption(F.textposition,R.pts),ae=q.selectAll("g.slicetext").data(R.text&&te!=="none"?[0]:[]);ae.enter().append("g").classed("slicetext",!0),ae.exit().remove(),ae.each(function(){var j=w.ensureSingle(u.select(this),"text","",function(re){re.attr("data-notex",1)}),G=w.ensureUniformFontSize(T,f(F,R,x.font));j.text(R.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(v.font,G).call(e.convertToTspans,T);var K=v.bBox(j.node()),H,Z,X,$=Math.min(R.BL[1],R.BR[1])+N,Q=Math.max(R.TL[1],R.TR[1])+N;Z=Math.max(R.TL[0],R.BL[0])+B,X=Math.min(R.TR[0],R.BR[0])+B,H=a(Z,X,$,Q,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),H.fontSize=G.size,n(F.type,H,x),_[k].transform=H,w.setTransormAndDisplay(j,H)})});var z=u.select(this).selectAll("g.titletext").data(F.title.text?[0]:[]);z.enter().append("g").classed("titletext",!0),z.exit().remove(),z.each(function(){var R=w.ensureSingle(u.select(this),"text","",function(N){N.attr("data-notex",1)}),k=F.title.text;F._meta&&(k=w.templateString(k,F._meta)),R.text(k).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(v.font,F.title.font).call(e.convertToTspans,T);var B=o(C,x._size);R.attr("transform",l(B.x,B.y)+S(Math.min(1,B.scale))+l(B.tx,B.ty))})})})};function M(g,T){var m=T[0]-g[0],h=T[1]-g[1];return"l"+m+","+h}function A(g,T){return[.5*(g[0]+T[0]),.5*(g[1]+T[1])]}function E(g){if(!g.length)return;var T=g[0],m=T.trace,h=m.aspectratio,x=m.baseratio;x>.999&&(x=.999);var _=Math.pow(x,2),D=T.vTotal,C=D*_/(1-_),F=D,I=C/D;function z(){var ue=Math.sqrt(I);return{x:ue,y:-ue}}function R(){var ue=z();return[ue.x,ue.y]}var k,B=[];B.push(R());var N,q;for(N=g.length-1;N>-1;N--)if(q=g[N],!q.hidden){var Y=q.v/F;I+=Y,B.push(R())}var ee=1/0,te=-1/0;for(N=0;N-1;N--)if(q=g[N],!q.hidden){$+=1;var Q=B[$][0],re=B[$][1];q.TL=[-Q,re],q.TR=[Q,re],q.BL=Z,q.BR=X,q.pxmid=A(q.TR,q.BR),Z=q.TL,X=q.TR}}}}),$k=xe({"src/traces/funnelarea/style.js"(U,O){"use strict";var u=Na(),v=up(),w=wf().resizeText;O.exports=function(l){var e=l._fullLayout._funnelarealayer.selectAll(".trace");w(l,e,"funnelarea"),e.each(function(t){var a=t[0],r=a.trace,n=u.select(this);n.style({opacity:r.opacity}),n.selectAll("path.surface").each(function(i){u.select(this).call(v,i,r,l)})})}}}),Zk=xe({"src/traces/funnelarea/index.js"(U,O){"use strict";O.exports={moduleType:"trace",name:"funnelarea",basePlotModule:Gk(),categories:["pie-like","funnelarea","showLegend"],attributes:D2(),layoutAttributes:R2(),supplyDefaults:Wk(),supplyLayoutDefaults:Yk(),calc:F2().calc,crossTraceCalc:F2().crossTraceCalc,plot:Xk(),style:$k(),styleOne:up(),meta:{}}}}),Kk=xe({"lib/funnelarea.js"(U,O){"use strict";O.exports=Zk()}}),Jc=xe({"stackgl_modules/index.js"(U,O){"use strict";(function(){var u={1964:function(l,e,t){l.exports={alpha_shape:t(3502),convex_hull:t(7352),delaunay_triangulate:t(7642),gl_cone3d:t(6405),gl_error3d:t(9165),gl_line3d:t(5714),gl_mesh3d:t(7201),gl_plot3d:t(4100),gl_scatter3d:t(8418),gl_streamtube3d:t(7815),gl_surface3d:t(9499),ndarray:t(9618),ndarray_linear_interpolate:t(4317)}},4793:function(l,e,t){"use strict";var a,r=t(7507),n=t(3778),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=f,a=h,e.IS=50;var s=2147483647;a=s,f.TYPED_ARRAY_SUPPORT=c(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{var _e=new Uint8Array(1),ce={foo:function(){return 42}};return Object.setPrototypeOf(ce,Uint8Array.prototype),Object.setPrototypeOf(_e,ce),_e.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function p(_e){if(_e>s)throw new RangeError('The value "'+_e+'" is invalid for option "size"');var ce=new Uint8Array(_e);return Object.setPrototypeOf(ce,f.prototype),ce}function f(_e,ce,ie){if(typeof _e=="number"){if(typeof ce=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return b(_e)}return d(_e,ce,ie)}f.poolSize=8192;function d(_e,ce,ie){if(typeof _e=="string")return M(_e,ce);if(ArrayBuffer.isView(_e))return E(_e);if(_e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e);if(Ce(_e,ArrayBuffer)||_e&&Ce(_e.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ce(_e,SharedArrayBuffer)||_e&&Ce(_e.buffer,SharedArrayBuffer)))return g(_e,ce,ie);if(typeof _e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var se=_e.valueOf&&_e.valueOf();if(se!=null&&se!==_e)return f.from(se,ce,ie);var ne=T(_e);if(ne)return ne;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof _e[Symbol.toPrimitive]=="function")return f.from(_e[Symbol.toPrimitive]("string"),ce,ie);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof _e)}f.from=function(_e,ce,ie){return d(_e,ce,ie)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function y(_e){if(typeof _e!="number")throw new TypeError('"size" argument must be of type number');if(_e<0)throw new RangeError('The value "'+_e+'" is invalid for option "size"')}function o(_e,ce,ie){return y(_e),_e<=0?p(_e):ce!==void 0?typeof ie=="string"?p(_e).fill(ce,ie):p(_e).fill(ce):p(_e)}f.alloc=function(_e,ce,ie){return o(_e,ce,ie)};function b(_e){return y(_e),p(_e<0?0:m(_e)|0)}f.allocUnsafe=function(_e){return b(_e)},f.allocUnsafeSlow=function(_e){return b(_e)};function M(_e,ce){if((typeof ce!="string"||ce==="")&&(ce="utf8"),!f.isEncoding(ce))throw new TypeError("Unknown encoding: "+ce);var ie=x(_e,ce)|0,se=p(ie),ne=se.write(_e,ce);return ne!==ie&&(se=se.slice(0,ne)),se}function A(_e){for(var ce=_e.length<0?0:m(_e.length)|0,ie=p(ce),se=0;se=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return _e|0}function h(_e){return+_e!=_e&&(_e=0),f.alloc(+_e)}f.isBuffer=function(ce){return ce!=null&&ce._isBuffer===!0&&ce!==f.prototype},f.compare=function(ce,ie){if(Ce(ce,Uint8Array)&&(ce=f.from(ce,ce.offset,ce.byteLength)),Ce(ie,Uint8Array)&&(ie=f.from(ie,ie.offset,ie.byteLength)),!f.isBuffer(ce)||!f.isBuffer(ie))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ce===ie)return 0;for(var se=ce.length,ne=ie.length,be=0,De=Math.min(se,ne);bene.length?f.from(De).copy(ne,be):Uint8Array.prototype.set.call(ne,De,be);else if(f.isBuffer(De))De.copy(ne,be);else throw new TypeError('"list" argument must be an Array of Buffers');be+=De.length}return ne};function x(_e,ce){if(f.isBuffer(_e))return _e.length;if(ArrayBuffer.isView(_e)||Ce(_e,ArrayBuffer))return _e.byteLength;if(typeof _e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof _e);var ie=_e.length,se=arguments.length>2&&arguments[2]===!0;if(!se&&ie===0)return 0;for(var ne=!1;;)switch(ce){case"ascii":case"latin1":case"binary":return ie;case"utf8":case"utf-8":return ue(_e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ie*2;case"hex":return ie>>>1;case"base64":return Te(_e).length;default:if(ne)return se?-1:ue(_e).length;ce=(""+ce).toLowerCase(),ne=!0}}f.byteLength=x;function _(_e,ce,ie){var se=!1;if((ce===void 0||ce<0)&&(ce=0),ce>this.length||((ie===void 0||ie>this.length)&&(ie=this.length),ie<=0)||(ie>>>=0,ce>>>=0,ie<=ce))return"";for(_e||(_e="utf8");;)switch(_e){case"hex":return j(this,ce,ie);case"utf8":case"utf-8":return q(this,ce,ie);case"ascii":return te(this,ce,ie);case"latin1":case"binary":return ae(this,ce,ie);case"base64":return N(this,ce,ie);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return G(this,ce,ie);default:if(se)throw new TypeError("Unknown encoding: "+_e);_e=(_e+"").toLowerCase(),se=!0}}f.prototype._isBuffer=!0;function D(_e,ce,ie){var se=_e[ce];_e[ce]=_e[ie],_e[ie]=se}f.prototype.swap16=function(){var ce=this.length;if(ce%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ie=0;ieie&&(ce+=" ... "),""},i&&(f.prototype[i]=f.prototype.inspect),f.prototype.compare=function(ce,ie,se,ne,be){if(Ce(ce,Uint8Array)&&(ce=f.from(ce,ce.offset,ce.byteLength)),!f.isBuffer(ce))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ce);if(ie===void 0&&(ie=0),se===void 0&&(se=ce?ce.length:0),ne===void 0&&(ne=0),be===void 0&&(be=this.length),ie<0||se>ce.length||ne<0||be>this.length)throw new RangeError("out of range index");if(ne>=be&&ie>=se)return 0;if(ne>=be)return-1;if(ie>=se)return 1;if(ie>>>=0,se>>>=0,ne>>>=0,be>>>=0,this===ce)return 0;for(var De=be-ne,qe=se-ie,Ne=Math.min(De,qe),ut=this.slice(ne,be),ot=ce.slice(ie,se),yt=0;yt2147483647?ie=2147483647:ie<-2147483648&&(ie=-2147483648),ie=+ie,Ue(ie)&&(ie=ne?0:_e.length-1),ie<0&&(ie=_e.length+ie),ie>=_e.length){if(ne)return-1;ie=_e.length-1}else if(ie<0)if(ne)ie=0;else return-1;if(typeof ce=="string"&&(ce=f.from(ce,se)),f.isBuffer(ce))return ce.length===0?-1:F(_e,ce,ie,se,ne);if(typeof ce=="number")return ce=ce&255,typeof Uint8Array.prototype.indexOf=="function"?ne?Uint8Array.prototype.indexOf.call(_e,ce,ie):Uint8Array.prototype.lastIndexOf.call(_e,ce,ie):F(_e,[ce],ie,se,ne);throw new TypeError("val must be string, number or Buffer")}function F(_e,ce,ie,se,ne){var be=1,De=_e.length,qe=ce.length;if(se!==void 0&&(se=String(se).toLowerCase(),se==="ucs2"||se==="ucs-2"||se==="utf16le"||se==="utf-16le")){if(_e.length<2||ce.length<2)return-1;be=2,De/=2,qe/=2,ie/=2}function Ne(It,Zt){return be===1?It[Zt]:It.readUInt16BE(Zt*be)}var ut;if(ne){var ot=-1;for(ut=ie;utDe&&(ie=De-qe),ut=ie;ut>=0;ut--){for(var yt=!0,At=0;Atne&&(se=ne)):se=ne;var be=ce.length;se>be/2&&(se=be/2);for(var De=0;De>>0,isFinite(se)?(se=se>>>0,ne===void 0&&(ne="utf8")):(ne=se,se=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var be=this.length-ie;if((se===void 0||se>be)&&(se=be),ce.length>0&&(se<0||ie<0)||ie>this.length)throw new RangeError("Attempt to write outside buffer bounds");ne||(ne="utf8");for(var De=!1;;)switch(ne){case"hex":return I(this,ce,ie,se);case"utf8":case"utf-8":return z(this,ce,ie,se);case"ascii":case"latin1":case"binary":return R(this,ce,ie,se);case"base64":return k(this,ce,ie,se);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,ce,ie,se);default:if(De)throw new TypeError("Unknown encoding: "+ne);ne=(""+ne).toLowerCase(),De=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function N(_e,ce,ie){return ce===0&&ie===_e.length?r.fromByteArray(_e):r.fromByteArray(_e.slice(ce,ie))}function q(_e,ce,ie){ie=Math.min(_e.length,ie);for(var se=[],ne=ce;ne239?4:be>223?3:be>191?2:1;if(ne+qe<=ie){var Ne,ut,ot,yt;switch(qe){case 1:be<128&&(De=be);break;case 2:Ne=_e[ne+1],(Ne&192)===128&&(yt=(be&31)<<6|Ne&63,yt>127&&(De=yt));break;case 3:Ne=_e[ne+1],ut=_e[ne+2],(Ne&192)===128&&(ut&192)===128&&(yt=(be&15)<<12|(Ne&63)<<6|ut&63,yt>2047&&(yt<55296||yt>57343)&&(De=yt));break;case 4:Ne=_e[ne+1],ut=_e[ne+2],ot=_e[ne+3],(Ne&192)===128&&(ut&192)===128&&(ot&192)===128&&(yt=(be&15)<<18|(Ne&63)<<12|(ut&63)<<6|ot&63,yt>65535&&yt<1114112&&(De=yt))}}De===null?(De=65533,qe=1):De>65535&&(De-=65536,se.push(De>>>10&1023|55296),De=56320|De&1023),se.push(De),ne+=qe}return ee(se)}var Y=4096;function ee(_e){var ce=_e.length;if(ce<=Y)return String.fromCharCode.apply(String,_e);for(var ie="",se=0;sese)&&(ie=se);for(var ne="",be=ce;bese&&(ce=se),ie<0?(ie+=se,ie<0&&(ie=0)):ie>se&&(ie=se),ieie)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(ce,ie,se){ce=ce>>>0,ie=ie>>>0,se||K(ce,ie,this.length);for(var ne=this[ce],be=1,De=0;++De>>0,ie=ie>>>0,se||K(ce,ie,this.length);for(var ne=this[ce+--ie],be=1;ie>0&&(be*=256);)ne+=this[ce+--ie]*be;return ne},f.prototype.readUint8=f.prototype.readUInt8=function(ce,ie){return ce=ce>>>0,ie||K(ce,1,this.length),this[ce]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(ce,ie){return ce=ce>>>0,ie||K(ce,2,this.length),this[ce]|this[ce+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(ce,ie){return ce=ce>>>0,ie||K(ce,2,this.length),this[ce]<<8|this[ce+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(ce,ie){return ce=ce>>>0,ie||K(ce,4,this.length),(this[ce]|this[ce+1]<<8|this[ce+2]<<16)+this[ce+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(ce,ie){return ce=ce>>>0,ie||K(ce,4,this.length),this[ce]*16777216+(this[ce+1]<<16|this[ce+2]<<8|this[ce+3])},f.prototype.readIntLE=function(ce,ie,se){ce=ce>>>0,ie=ie>>>0,se||K(ce,ie,this.length);for(var ne=this[ce],be=1,De=0;++De=be&&(ne-=Math.pow(2,8*ie)),ne},f.prototype.readIntBE=function(ce,ie,se){ce=ce>>>0,ie=ie>>>0,se||K(ce,ie,this.length);for(var ne=ie,be=1,De=this[ce+--ne];ne>0&&(be*=256);)De+=this[ce+--ne]*be;return be*=128,De>=be&&(De-=Math.pow(2,8*ie)),De},f.prototype.readInt8=function(ce,ie){return ce=ce>>>0,ie||K(ce,1,this.length),this[ce]&128?(255-this[ce]+1)*-1:this[ce]},f.prototype.readInt16LE=function(ce,ie){ce=ce>>>0,ie||K(ce,2,this.length);var se=this[ce]|this[ce+1]<<8;return se&32768?se|4294901760:se},f.prototype.readInt16BE=function(ce,ie){ce=ce>>>0,ie||K(ce,2,this.length);var se=this[ce+1]|this[ce]<<8;return se&32768?se|4294901760:se},f.prototype.readInt32LE=function(ce,ie){return ce=ce>>>0,ie||K(ce,4,this.length),this[ce]|this[ce+1]<<8|this[ce+2]<<16|this[ce+3]<<24},f.prototype.readInt32BE=function(ce,ie){return ce=ce>>>0,ie||K(ce,4,this.length),this[ce]<<24|this[ce+1]<<16|this[ce+2]<<8|this[ce+3]},f.prototype.readFloatLE=function(ce,ie){return ce=ce>>>0,ie||K(ce,4,this.length),n.read(this,ce,!0,23,4)},f.prototype.readFloatBE=function(ce,ie){return ce=ce>>>0,ie||K(ce,4,this.length),n.read(this,ce,!1,23,4)},f.prototype.readDoubleLE=function(ce,ie){return ce=ce>>>0,ie||K(ce,8,this.length),n.read(this,ce,!0,52,8)},f.prototype.readDoubleBE=function(ce,ie){return ce=ce>>>0,ie||K(ce,8,this.length),n.read(this,ce,!1,52,8)};function H(_e,ce,ie,se,ne,be){if(!f.isBuffer(_e))throw new TypeError('"buffer" argument must be a Buffer instance');if(ce>ne||ce_e.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(ce,ie,se,ne){if(ce=+ce,ie=ie>>>0,se=se>>>0,!ne){var be=Math.pow(2,8*se)-1;H(this,ce,ie,se,be,0)}var De=1,qe=0;for(this[ie]=ce&255;++qe>>0,se=se>>>0,!ne){var be=Math.pow(2,8*se)-1;H(this,ce,ie,se,be,0)}var De=se-1,qe=1;for(this[ie+De]=ce&255;--De>=0&&(qe*=256);)this[ie+De]=ce/qe&255;return ie+se},f.prototype.writeUint8=f.prototype.writeUInt8=function(ce,ie,se){return ce=+ce,ie=ie>>>0,se||H(this,ce,ie,1,255,0),this[ie]=ce&255,ie+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(ce,ie,se){return ce=+ce,ie=ie>>>0,se||H(this,ce,ie,2,65535,0),this[ie]=ce&255,this[ie+1]=ce>>>8,ie+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(ce,ie,se){return ce=+ce,ie=ie>>>0,se||H(this,ce,ie,2,65535,0),this[ie]=ce>>>8,this[ie+1]=ce&255,ie+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(ce,ie,se){return ce=+ce,ie=ie>>>0,se||H(this,ce,ie,4,4294967295,0),this[ie+3]=ce>>>24,this[ie+2]=ce>>>16,this[ie+1]=ce>>>8,this[ie]=ce&255,ie+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(ce,ie,se){return ce=+ce,ie=ie>>>0,se||H(this,ce,ie,4,4294967295,0),this[ie]=ce>>>24,this[ie+1]=ce>>>16,this[ie+2]=ce>>>8,this[ie+3]=ce&255,ie+4},f.prototype.writeIntLE=function(ce,ie,se,ne){if(ce=+ce,ie=ie>>>0,!ne){var be=Math.pow(2,8*se-1);H(this,ce,ie,se,be-1,-be)}var De=0,qe=1,Ne=0;for(this[ie]=ce&255;++De>0)-Ne&255;return ie+se},f.prototype.writeIntBE=function(ce,ie,se,ne){if(ce=+ce,ie=ie>>>0,!ne){var be=Math.pow(2,8*se-1);H(this,ce,ie,se,be-1,-be)}var De=se-1,qe=1,Ne=0;for(this[ie+De]=ce&255;--De>=0&&(qe*=256);)ce<0&&Ne===0&&this[ie+De+1]!==0&&(Ne=1),this[ie+De]=(ce/qe>>0)-Ne&255;return ie+se},f.prototype.writeInt8=function(ce,ie,se){return ce=+ce,ie=ie>>>0,se||H(this,ce,ie,1,127,-128),ce<0&&(ce=255+ce+1),this[ie]=ce&255,ie+1},f.prototype.writeInt16LE=function(ce,ie,se){return ce=+ce,ie=ie>>>0,se||H(this,ce,ie,2,32767,-32768),this[ie]=ce&255,this[ie+1]=ce>>>8,ie+2},f.prototype.writeInt16BE=function(ce,ie,se){return ce=+ce,ie=ie>>>0,se||H(this,ce,ie,2,32767,-32768),this[ie]=ce>>>8,this[ie+1]=ce&255,ie+2},f.prototype.writeInt32LE=function(ce,ie,se){return ce=+ce,ie=ie>>>0,se||H(this,ce,ie,4,2147483647,-2147483648),this[ie]=ce&255,this[ie+1]=ce>>>8,this[ie+2]=ce>>>16,this[ie+3]=ce>>>24,ie+4},f.prototype.writeInt32BE=function(ce,ie,se){return ce=+ce,ie=ie>>>0,se||H(this,ce,ie,4,2147483647,-2147483648),ce<0&&(ce=4294967295+ce+1),this[ie]=ce>>>24,this[ie+1]=ce>>>16,this[ie+2]=ce>>>8,this[ie+3]=ce&255,ie+4};function Z(_e,ce,ie,se,ne,be){if(ie+se>_e.length)throw new RangeError("Index out of range");if(ie<0)throw new RangeError("Index out of range")}function X(_e,ce,ie,se,ne){return ce=+ce,ie=ie>>>0,ne||Z(_e,ce,ie,4,34028234663852886e22,-34028234663852886e22),n.write(_e,ce,ie,se,23,4),ie+4}f.prototype.writeFloatLE=function(ce,ie,se){return X(this,ce,ie,!0,se)},f.prototype.writeFloatBE=function(ce,ie,se){return X(this,ce,ie,!1,se)};function $(_e,ce,ie,se,ne){return ce=+ce,ie=ie>>>0,ne||Z(_e,ce,ie,8,17976931348623157e292,-17976931348623157e292),n.write(_e,ce,ie,se,52,8),ie+8}f.prototype.writeDoubleLE=function(ce,ie,se){return $(this,ce,ie,!0,se)},f.prototype.writeDoubleBE=function(ce,ie,se){return $(this,ce,ie,!1,se)},f.prototype.copy=function(ce,ie,se,ne){if(!f.isBuffer(ce))throw new TypeError("argument should be a Buffer");if(se||(se=0),!ne&&ne!==0&&(ne=this.length),ie>=ce.length&&(ie=ce.length),ie||(ie=0),ne>0&&ne=this.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("sourceEnd out of bounds");ne>this.length&&(ne=this.length),ce.length-ie>>0,se=se===void 0?this.length:se>>>0,ce||(ce=0);var De;if(typeof ce=="number")for(De=ie;De55295&&ie<57344){if(!ne){if(ie>56319){(ce-=3)>-1&&be.push(239,191,189);continue}else if(De+1===se){(ce-=3)>-1&&be.push(239,191,189);continue}ne=ie;continue}if(ie<56320){(ce-=3)>-1&&be.push(239,191,189),ne=ie;continue}ie=(ne-55296<<10|ie-56320)+65536}else ne&&(ce-=3)>-1&&be.push(239,191,189);if(ne=null,ie<128){if((ce-=1)<0)break;be.push(ie)}else if(ie<2048){if((ce-=2)<0)break;be.push(ie>>6|192,ie&63|128)}else if(ie<65536){if((ce-=3)<0)break;be.push(ie>>12|224,ie>>6&63|128,ie&63|128)}else if(ie<1114112){if((ce-=4)<0)break;be.push(ie>>18|240,ie>>12&63|128,ie>>6&63|128,ie&63|128)}else throw new Error("Invalid code point")}return be}function pe(_e){for(var ce=[],ie=0;ie<_e.length;++ie)ce.push(_e.charCodeAt(ie)&255);return ce}function ge(_e,ce){for(var ie,se,ne,be=[],De=0;De<_e.length&&!((ce-=2)<0);++De)ie=_e.charCodeAt(De),se=ie>>8,ne=ie%256,be.push(ne),be.push(se);return be}function Te(_e){return r.toByteArray(re(_e))}function Se(_e,ce,ie,se){for(var ne=0;ne=ce.length||ne>=_e.length);++ne)ce[ne+ie]=_e[ne];return ne}function Ce(_e,ce){return _e instanceof ce||_e!=null&&_e.constructor!=null&&_e.constructor.name!=null&&_e.constructor.name===ce.name}function Ue(_e){return _e!==_e}var Oe=function(){for(var _e="0123456789abcdef",ce=new Array(256),ie=0;ie<16;++ie)for(var se=ie*16,ne=0;ne<16;++ne)ce[se+ne]=_e[ie]+_e[ne];return ce}()},9216:function(l){"use strict";l.exports=r,l.exports.isMobile=r,l.exports.default=r;let e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,a=/android|ipad|playbook|silk/i;function r(n){n||(n={});let i=n.ua;if(!i&&typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&typeof i.headers["user-agent"]=="string"&&(i=i.headers["user-agent"]),typeof i!="string")return!1;let s=e.test(i)&&!t.test(i)||!!n.tablet&&a.test(i);return!s&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(l,e,t){"use strict";l.exports=c;var a=t(7261),r=t(9977),n=t(1811);function i(p,f){this._controllerNames=Object.keys(p),this._controllerList=this._controllerNames.map(function(d){return p[d]}),this._mode=f,this._active=p[f],this._active||(this._mode="turntable",this._active=p.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=i.prototype;s.flush=function(p){for(var f=this._controllerList,d=0;d"u"?t(1538):WeakMap,r=t(2762),n=t(8116),i=new a;function s(c){var p=i.get(c),f=p&&(p._triangleBuffer.handle||p._triangleBuffer.buffer);if(!f||!c.isBuffer(f)){var d=r(c,new Float32Array([-1,-1,-1,4,4,-1]));p=n(c,[{buffer:d,type:c.FLOAT,size:2}]),p._triangleBuffer=d,i.set(c,p)}p.bind(),c.drawArrays(c.TRIANGLES,0,3),p.unbind()}l.exports=s},1085:function(l,e,t){var a=t(1371);l.exports=r;function r(n,i,s){i=typeof i=="number"?i:1,s=s||": ";var c=n.split(/\r?\n/),p=String(c.length+i-1).length;return c.map(function(f,d){var y=d+i,o=String(y).length,b=a(y,p-o);return b+s+f}).join(` -`)}},3952:function(l,e,t){"use strict";l.exports=n;var a=t(3250);function r(i,s){for(var c=new Array(s+1),p=0;p0)throw new Error("Invalid string. Length must be a multiple of 4");var E=M.indexOf("=");E===-1&&(E=A);var g=E===A?0:4-E%4;return[E,g]}function p(M){var A=c(M),E=A[0],g=A[1];return(E+g)*3/4-g}function f(M,A,E){return(A+E)*3/4-E}function d(M){var A,E=c(M),g=E[0],T=E[1],m=new r(f(M,g,T)),h=0,x=T>0?g-4:g,_;for(_=0;_>16&255,m[h++]=A>>8&255,m[h++]=A&255;return T===2&&(A=a[M.charCodeAt(_)]<<2|a[M.charCodeAt(_+1)]>>4,m[h++]=A&255),T===1&&(A=a[M.charCodeAt(_)]<<10|a[M.charCodeAt(_+1)]<<4|a[M.charCodeAt(_+2)]>>2,m[h++]=A>>8&255,m[h++]=A&255),m}function y(M){return t[M>>18&63]+t[M>>12&63]+t[M>>6&63]+t[M&63]}function o(M,A,E){for(var g,T=[],m=A;mx?x:h+m));return g===1?(A=M[E-1],T.push(t[A>>2]+t[A<<4&63]+"==")):g===2&&(A=(M[E-2]<<8)+M[E-1],T.push(t[A>>10]+t[A>>4&63]+t[A<<2&63]+"=")),T.join("")}},3865:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,i){return a(n[0].mul(i[1]).add(i[0].mul(n[1])),n[1].mul(i[1]))}},1318:function(l){"use strict";l.exports=e;function e(t,a){return t[0].mul(a[1]).cmp(a[0].mul(t[1]))}},8697:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,i){return a(n[0].mul(i[1]),n[1].mul(i[0]))}},7842:function(l,e,t){"use strict";var a=t(6330),r=t(1533),n=t(2651),i=t(6768),s=t(869),c=t(8697);l.exports=p;function p(f,d){if(a(f))return d?c(f,p(d)):[f[0].clone(),f[1].clone()];var y=0,o,b;if(r(f))o=f.clone();else if(typeof f=="string")o=i(f);else{if(f===0)return[n(0),n(1)];if(f===Math.floor(f))o=n(f);else{for(;f!==Math.floor(f);)f=f*Math.pow(2,256),y-=256;o=n(f)}}if(a(d))o.mul(d[1]),b=d[0].clone();else if(r(d))b=d.clone();else if(typeof d=="string")b=i(d);else if(!d)b=n(1);else if(d===Math.floor(d))b=n(d);else{for(;d!==Math.floor(d);)d=d*Math.pow(2,256),y+=256;b=n(d)}return y>0?o=o.ushln(y):y<0&&(b=b.ushln(-y)),s(o,b)}},6330:function(l,e,t){"use strict";var a=t(1533);l.exports=r;function r(n){return Array.isArray(n)&&n.length===2&&a(n[0])&&a(n[1])}},5716:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return n.cmp(new a(0))}},1369:function(l,e,t){"use strict";var a=t(5716);l.exports=r;function r(n){var i=n.length,s=n.words,c=0;if(i===1)c=s[0];else if(i===2)c=s[0]+s[1]*67108864;else for(var p=0;p20?52:c+32}},1533:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return n&&typeof n=="object"&&!!n.words}},2651:function(l,e,t){"use strict";var a=t(6859),r=t(2361);l.exports=n;function n(i){var s=r.exponent(i);return s<52?new a(i):new a(i*Math.pow(2,52-s)).ushln(s-52)}},869:function(l,e,t){"use strict";var a=t(2651),r=t(5716);l.exports=n;function n(i,s){var c=r(i),p=r(s);if(c===0)return[a(0),a(1)];if(p===0)return[a(0),a(0)];p<0&&(i=i.neg(),s=s.neg());var f=i.gcd(s);return f.cmpn(1)?[i.div(f),s.div(f)]:[i,s]}},6768:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return new a(n)}},6504:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,i){return a(n[0].mul(i[0]),n[1].mul(i[1]))}},7721:function(l,e,t){"use strict";var a=t(5716);l.exports=r;function r(n){return a(n[0])*a(n[1])}},5572:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,i){return a(n[0].mul(i[1]).sub(n[1].mul(i[0])),n[1].mul(i[1]))}},946:function(l,e,t){"use strict";var a=t(1369),r=t(4025);l.exports=n;function n(i){var s=i[0],c=i[1];if(s.cmpn(0)===0)return 0;var p=s.abs().divmod(c.abs()),f=p.div,d=a(f),y=p.mod,o=s.negative!==c.negative?-1:1;if(y.cmpn(0)===0)return o*d;if(d){var b=r(d)+4,M=a(y.ushln(b).divRound(c));return o*(d+M*Math.pow(2,-b))}else{var A=c.bitLength()-y.bitLength()+53,M=a(y.ushln(A).divRound(c));return A<1023?o*M*Math.pow(2,-A):(M*=Math.pow(2,-1023),o*M*Math.pow(2,1023-A))}}},2478:function(l){"use strict";function e(s,c,p,f,d){for(var y=d+1;f<=d;){var o=f+d>>>1,b=s[o],M=p!==void 0?p(b,c):b-c;M>=0?(y=o,d=o-1):f=o+1}return y}function t(s,c,p,f,d){for(var y=d+1;f<=d;){var o=f+d>>>1,b=s[o],M=p!==void 0?p(b,c):b-c;M>0?(y=o,d=o-1):f=o+1}return y}function a(s,c,p,f,d){for(var y=f-1;f<=d;){var o=f+d>>>1,b=s[o],M=p!==void 0?p(b,c):b-c;M<0?(y=o,f=o+1):d=o-1}return y}function r(s,c,p,f,d){for(var y=f-1;f<=d;){var o=f+d>>>1,b=s[o],M=p!==void 0?p(b,c):b-c;M<=0?(y=o,f=o+1):d=o-1}return y}function n(s,c,p,f,d){for(;f<=d;){var y=f+d>>>1,o=s[y],b=p!==void 0?p(o,c):o-c;if(b===0)return y;b<=0?f=y+1:d=y-1}return-1}function i(s,c,p,f,d,y){return typeof p=="function"?y(s,c,p,f===void 0?0:f|0,d===void 0?s.length-1:d|0):y(s,c,void 0,p===void 0?0:p|0,f===void 0?s.length-1:f|0)}l.exports={ge:function(s,c,p,f,d){return i(s,c,p,f,d,e)},gt:function(s,c,p,f,d){return i(s,c,p,f,d,t)},lt:function(s,c,p,f,d){return i(s,c,p,f,d,a)},le:function(s,c,p,f,d){return i(s,c,p,f,d,r)},eq:function(s,c,p,f,d){return i(s,c,p,f,d,n)}}},8828:function(l,e){"use strict";"use restrict";var t=32;e.INT_BITS=t,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(n<0)},e.abs=function(n){var i=n>>t-1;return(n^i)-i},e.min=function(n,i){return i^(n^i)&-(n65535)<<4,n>>>=i,s=(n>255)<<3,n>>>=s,i|=s,s=(n>15)<<2,n>>>=s,i|=s,s=(n>3)<<1,n>>>=s,i|=s,i|n>>1},e.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},e.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function a(n){var i=32;return n&=-n,n&&i--,n&65535&&(i-=16),n&16711935&&(i-=8),n&252645135&&(i-=4),n&858993459&&(i-=2),n&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},e.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},e.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var r=new Array(256);(function(n){for(var i=0;i<256;++i){var s=i,c=i,p=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--p;n[i]=c<>>8&255]<<16|r[n>>>16&255]<<8|r[n>>>24&255]},e.interleave2=function(n,i){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n|i<<1},e.deinterleave2=function(n,i){return n=n>>>i&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},e.interleave3=function(n,i,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},e.deinterleave3=function(n,i){return n=n>>>i&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},e.nextCombination=function(n){var i=n|n-1;return i+1|(~i&-~i)-1>>>a(n)+1}},6859:function(l,e,t){l=t.nmd(l),function(a,r){"use strict";function n(R,k){if(!R)throw new Error(k||"Assertion failed")}function i(R,k){R.super_=k;var B=function(){};B.prototype=k.prototype,R.prototype=new B,R.prototype.constructor=R}function s(R,k,B){if(s.isBN(R))return R;this.negative=0,this.words=null,this.length=0,this.red=null,R!==null&&((k==="le"||k==="be")&&(B=k,k=10),this._init(R||0,k||10,B||"be"))}typeof a=="object"?a.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=t(7790).Buffer}catch{}s.isBN=function(k){return k instanceof s?!0:k!==null&&typeof k=="object"&&k.constructor.wordSize===s.wordSize&&Array.isArray(k.words)},s.max=function(k,B){return k.cmp(B)>0?k:B},s.min=function(k,B){return k.cmp(B)<0?k:B},s.prototype._init=function(k,B,N){if(typeof k=="number")return this._initNumber(k,B,N);if(typeof k=="object")return this._initArray(k,B,N);B==="hex"&&(B=16),n(B===(B|0)&&B>=2&&B<=36),k=k.toString().replace(/\s+/g,"");var q=0;k[0]==="-"&&(q++,this.negative=1),q=0;q-=3)ee=k[q]|k[q-1]<<8|k[q-2]<<16,this.words[Y]|=ee<>>26-te&67108863,te+=24,te>=26&&(te-=26,Y++);else if(N==="le")for(q=0,Y=0;q>>26-te&67108863,te+=24,te>=26&&(te-=26,Y++);return this.strip()};function p(R,k){var B=R.charCodeAt(k);return B>=65&&B<=70?B-55:B>=97&&B<=102?B-87:B-48&15}function f(R,k,B){var N=p(R,B);return B-1>=k&&(N|=p(R,B-1)<<4),N}s.prototype._parseHex=function(k,B,N){this.length=Math.ceil((k.length-B)/6),this.words=new Array(this.length);for(var q=0;q=B;q-=2)te=f(k,B,q)<=18?(Y-=18,ee+=1,this.words[ee]|=te>>>26):Y+=8;else{var ae=k.length-B;for(q=ae%2===0?B+1:B;q=18?(Y-=18,ee+=1,this.words[ee]|=te>>>26):Y+=8}this.strip()};function d(R,k,B,N){for(var q=0,Y=Math.min(R.length,B),ee=k;ee=49?q+=te-49+10:te>=17?q+=te-17+10:q+=te}return q}s.prototype._parseBase=function(k,B,N){this.words=[0],this.length=1;for(var q=0,Y=1;Y<=67108863;Y*=B)q++;q--,Y=Y/B|0;for(var ee=k.length-N,te=ee%q,ae=Math.min(ee,ee-te)+N,j=0,G=N;G1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var y=["","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"],o=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],b=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(k,B){k=k||10,B=B|0||1;var N;if(k===16||k==="hex"){N="";for(var q=0,Y=0,ee=0;ee>>24-q&16777215,q+=2,q>=26&&(q-=26,ee--),Y!==0||ee!==this.length-1?N=y[6-ae.length]+ae+N:N=ae+N}for(Y!==0&&(N=Y.toString(16)+N);N.length%B!==0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}if(k===(k|0)&&k>=2&&k<=36){var j=o[k],G=b[k];N="";var K=this.clone();for(K.negative=0;!K.isZero();){var H=K.modn(G).toString(k);K=K.idivn(G),K.isZero()?N=H+N:N=y[j-H.length]+H+N}for(this.isZero()&&(N="0"+N);N.length%B!==0;)N="0"+N;return this.negative!==0&&(N="-"+N),N}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var k=this.words[0];return this.length===2?k+=this.words[1]*67108864:this.length===3&&this.words[2]===1?k+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-k:k},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(k,B){return n(typeof c<"u"),this.toArrayLike(c,k,B)},s.prototype.toArray=function(k,B){return this.toArrayLike(Array,k,B)},s.prototype.toArrayLike=function(k,B,N){var q=this.byteLength(),Y=N||Math.max(1,q);n(q<=Y,"byte array longer than desired length"),n(Y>0,"Requested array length <= 0"),this.strip();var ee=B==="le",te=new k(Y),ae,j,G=this.clone();if(ee){for(j=0;!G.isZero();j++)ae=G.andln(255),G.iushrn(8),te[j]=ae;for(;j=4096&&(N+=13,B>>>=13),B>=64&&(N+=7,B>>>=7),B>=8&&(N+=4,B>>>=4),B>=2&&(N+=2,B>>>=2),N+B},s.prototype._zeroBits=function(k){if(k===0)return 26;var B=k,N=0;return B&8191||(N+=13,B>>>=13),B&127||(N+=7,B>>>=7),B&15||(N+=4,B>>>=4),B&3||(N+=2,B>>>=2),B&1||N++,N},s.prototype.bitLength=function(){var k=this.words[this.length-1],B=this._countBits(k);return(this.length-1)*26+B};function M(R){for(var k=new Array(R.bitLength()),B=0;B>>q}return k}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var k=0,B=0;Bk.length?this.clone().ior(k):k.clone().ior(this)},s.prototype.uor=function(k){return this.length>k.length?this.clone().iuor(k):k.clone().iuor(this)},s.prototype.iuand=function(k){var B;this.length>k.length?B=k:B=this;for(var N=0;Nk.length?this.clone().iand(k):k.clone().iand(this)},s.prototype.uand=function(k){return this.length>k.length?this.clone().iuand(k):k.clone().iuand(this)},s.prototype.iuxor=function(k){var B,N;this.length>k.length?(B=this,N=k):(B=k,N=this);for(var q=0;qk.length?this.clone().ixor(k):k.clone().ixor(this)},s.prototype.uxor=function(k){return this.length>k.length?this.clone().iuxor(k):k.clone().iuxor(this)},s.prototype.inotn=function(k){n(typeof k=="number"&&k>=0);var B=Math.ceil(k/26)|0,N=k%26;this._expand(B),N>0&&B--;for(var q=0;q0&&(this.words[q]=~this.words[q]&67108863>>26-N),this.strip()},s.prototype.notn=function(k){return this.clone().inotn(k)},s.prototype.setn=function(k,B){n(typeof k=="number"&&k>=0);var N=k/26|0,q=k%26;return this._expand(N+1),B?this.words[N]=this.words[N]|1<k.length?(N=this,q=k):(N=k,q=this);for(var Y=0,ee=0;ee>>26;for(;Y!==0&&ee>>26;if(this.length=N.length,Y!==0)this.words[this.length]=Y,this.length++;else if(N!==this)for(;eek.length?this.clone().iadd(k):k.clone().iadd(this)},s.prototype.isub=function(k){if(k.negative!==0){k.negative=0;var B=this.iadd(k);return k.negative=1,B._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(k),this.negative=1,this._normSign();var N=this.cmp(k);if(N===0)return this.negative=0,this.length=1,this.words[0]=0,this;var q,Y;N>0?(q=this,Y=k):(q=k,Y=this);for(var ee=0,te=0;te>26,this.words[te]=B&67108863;for(;ee!==0&&te>26,this.words[te]=B&67108863;if(ee===0&&te>>26,K=ae&67108863,H=Math.min(j,k.length-1),Z=Math.max(0,j-R.length+1);Z<=H;Z++){var X=j-Z|0;q=R.words[X]|0,Y=k.words[Z]|0,ee=q*Y+K,G+=ee/67108864|0,K=ee&67108863}B.words[j]=K|0,ae=G|0}return ae!==0?B.words[j]=ae|0:B.length--,B.strip()}var E=function(k,B,N){var q=k.words,Y=B.words,ee=N.words,te=0,ae,j,G,K=q[0]|0,H=K&8191,Z=K>>>13,X=q[1]|0,$=X&8191,Q=X>>>13,re=q[2]|0,ue=re&8191,pe=re>>>13,ge=q[3]|0,Te=ge&8191,Se=ge>>>13,Ce=q[4]|0,Ue=Ce&8191,Oe=Ce>>>13,_e=q[5]|0,ce=_e&8191,ie=_e>>>13,se=q[6]|0,ne=se&8191,be=se>>>13,De=q[7]|0,qe=De&8191,Ne=De>>>13,ut=q[8]|0,ot=ut&8191,yt=ut>>>13,At=q[9]|0,It=At&8191,Zt=At>>>13,vr=Y[0]|0,Ut=vr&8191,Jt=vr>>>13,at=Y[1]|0,Ee=at&8191,Re=at>>>13,he=Y[2]|0,ye=he&8191,Ie=he>>>13,Fe=Y[3]|0,He=Fe&8191,We=Fe>>>13,pt=Y[4]|0,ct=pt&8191,ft=pt>>>13,mt=Y[5]|0,_t=mt&8191,Bt=mt>>>13,Et=Y[6]|0,hr=Et&8191,$r=Et>>>13,ca=Y[7]|0,na=ca&8191,wa=ca>>>13,pa=Y[8]|0,fa=pa&8191,za=pa>>>13,Ia=Y[9]|0,Va=Ia&8191,Oa=Ia>>>13;N.negative=k.negative^B.negative,N.length=19,ae=Math.imul(H,Ut),j=Math.imul(H,Jt),j=j+Math.imul(Z,Ut)|0,G=Math.imul(Z,Jt);var tn=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(tn>>>26)|0,tn&=67108863,ae=Math.imul($,Ut),j=Math.imul($,Jt),j=j+Math.imul(Q,Ut)|0,G=Math.imul(Q,Jt),ae=ae+Math.imul(H,Ee)|0,j=j+Math.imul(H,Re)|0,j=j+Math.imul(Z,Ee)|0,G=G+Math.imul(Z,Re)|0;var ka=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(ka>>>26)|0,ka&=67108863,ae=Math.imul(ue,Ut),j=Math.imul(ue,Jt),j=j+Math.imul(pe,Ut)|0,G=Math.imul(pe,Jt),ae=ae+Math.imul($,Ee)|0,j=j+Math.imul($,Re)|0,j=j+Math.imul(Q,Ee)|0,G=G+Math.imul(Q,Re)|0,ae=ae+Math.imul(H,ye)|0,j=j+Math.imul(H,Ie)|0,j=j+Math.imul(Z,ye)|0,G=G+Math.imul(Z,Ie)|0;var oi=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(oi>>>26)|0,oi&=67108863,ae=Math.imul(Te,Ut),j=Math.imul(Te,Jt),j=j+Math.imul(Se,Ut)|0,G=Math.imul(Se,Jt),ae=ae+Math.imul(ue,Ee)|0,j=j+Math.imul(ue,Re)|0,j=j+Math.imul(pe,Ee)|0,G=G+Math.imul(pe,Re)|0,ae=ae+Math.imul($,ye)|0,j=j+Math.imul($,Ie)|0,j=j+Math.imul(Q,ye)|0,G=G+Math.imul(Q,Ie)|0,ae=ae+Math.imul(H,He)|0,j=j+Math.imul(H,We)|0,j=j+Math.imul(Z,He)|0,G=G+Math.imul(Z,We)|0;var $n=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+($n>>>26)|0,$n&=67108863,ae=Math.imul(Ue,Ut),j=Math.imul(Ue,Jt),j=j+Math.imul(Oe,Ut)|0,G=Math.imul(Oe,Jt),ae=ae+Math.imul(Te,Ee)|0,j=j+Math.imul(Te,Re)|0,j=j+Math.imul(Se,Ee)|0,G=G+Math.imul(Se,Re)|0,ae=ae+Math.imul(ue,ye)|0,j=j+Math.imul(ue,Ie)|0,j=j+Math.imul(pe,ye)|0,G=G+Math.imul(pe,Ie)|0,ae=ae+Math.imul($,He)|0,j=j+Math.imul($,We)|0,j=j+Math.imul(Q,He)|0,G=G+Math.imul(Q,We)|0,ae=ae+Math.imul(H,ct)|0,j=j+Math.imul(H,ft)|0,j=j+Math.imul(Z,ct)|0,G=G+Math.imul(Z,ft)|0;var bn=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(bn>>>26)|0,bn&=67108863,ae=Math.imul(ce,Ut),j=Math.imul(ce,Jt),j=j+Math.imul(ie,Ut)|0,G=Math.imul(ie,Jt),ae=ae+Math.imul(Ue,Ee)|0,j=j+Math.imul(Ue,Re)|0,j=j+Math.imul(Oe,Ee)|0,G=G+Math.imul(Oe,Re)|0,ae=ae+Math.imul(Te,ye)|0,j=j+Math.imul(Te,Ie)|0,j=j+Math.imul(Se,ye)|0,G=G+Math.imul(Se,Ie)|0,ae=ae+Math.imul(ue,He)|0,j=j+Math.imul(ue,We)|0,j=j+Math.imul(pe,He)|0,G=G+Math.imul(pe,We)|0,ae=ae+Math.imul($,ct)|0,j=j+Math.imul($,ft)|0,j=j+Math.imul(Q,ct)|0,G=G+Math.imul(Q,ft)|0,ae=ae+Math.imul(H,_t)|0,j=j+Math.imul(H,Bt)|0,j=j+Math.imul(Z,_t)|0,G=G+Math.imul(Z,Bt)|0;var ci=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(ci>>>26)|0,ci&=67108863,ae=Math.imul(ne,Ut),j=Math.imul(ne,Jt),j=j+Math.imul(be,Ut)|0,G=Math.imul(be,Jt),ae=ae+Math.imul(ce,Ee)|0,j=j+Math.imul(ce,Re)|0,j=j+Math.imul(ie,Ee)|0,G=G+Math.imul(ie,Re)|0,ae=ae+Math.imul(Ue,ye)|0,j=j+Math.imul(Ue,Ie)|0,j=j+Math.imul(Oe,ye)|0,G=G+Math.imul(Oe,Ie)|0,ae=ae+Math.imul(Te,He)|0,j=j+Math.imul(Te,We)|0,j=j+Math.imul(Se,He)|0,G=G+Math.imul(Se,We)|0,ae=ae+Math.imul(ue,ct)|0,j=j+Math.imul(ue,ft)|0,j=j+Math.imul(pe,ct)|0,G=G+Math.imul(pe,ft)|0,ae=ae+Math.imul($,_t)|0,j=j+Math.imul($,Bt)|0,j=j+Math.imul(Q,_t)|0,G=G+Math.imul(Q,Bt)|0,ae=ae+Math.imul(H,hr)|0,j=j+Math.imul(H,$r)|0,j=j+Math.imul(Z,hr)|0,G=G+Math.imul(Z,$r)|0;var hi=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(hi>>>26)|0,hi&=67108863,ae=Math.imul(qe,Ut),j=Math.imul(qe,Jt),j=j+Math.imul(Ne,Ut)|0,G=Math.imul(Ne,Jt),ae=ae+Math.imul(ne,Ee)|0,j=j+Math.imul(ne,Re)|0,j=j+Math.imul(be,Ee)|0,G=G+Math.imul(be,Re)|0,ae=ae+Math.imul(ce,ye)|0,j=j+Math.imul(ce,Ie)|0,j=j+Math.imul(ie,ye)|0,G=G+Math.imul(ie,Ie)|0,ae=ae+Math.imul(Ue,He)|0,j=j+Math.imul(Ue,We)|0,j=j+Math.imul(Oe,He)|0,G=G+Math.imul(Oe,We)|0,ae=ae+Math.imul(Te,ct)|0,j=j+Math.imul(Te,ft)|0,j=j+Math.imul(Se,ct)|0,G=G+Math.imul(Se,ft)|0,ae=ae+Math.imul(ue,_t)|0,j=j+Math.imul(ue,Bt)|0,j=j+Math.imul(pe,_t)|0,G=G+Math.imul(pe,Bt)|0,ae=ae+Math.imul($,hr)|0,j=j+Math.imul($,$r)|0,j=j+Math.imul(Q,hr)|0,G=G+Math.imul(Q,$r)|0,ae=ae+Math.imul(H,na)|0,j=j+Math.imul(H,wa)|0,j=j+Math.imul(Z,na)|0,G=G+Math.imul(Z,wa)|0;var Pi=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(Pi>>>26)|0,Pi&=67108863,ae=Math.imul(ot,Ut),j=Math.imul(ot,Jt),j=j+Math.imul(yt,Ut)|0,G=Math.imul(yt,Jt),ae=ae+Math.imul(qe,Ee)|0,j=j+Math.imul(qe,Re)|0,j=j+Math.imul(Ne,Ee)|0,G=G+Math.imul(Ne,Re)|0,ae=ae+Math.imul(ne,ye)|0,j=j+Math.imul(ne,Ie)|0,j=j+Math.imul(be,ye)|0,G=G+Math.imul(be,Ie)|0,ae=ae+Math.imul(ce,He)|0,j=j+Math.imul(ce,We)|0,j=j+Math.imul(ie,He)|0,G=G+Math.imul(ie,We)|0,ae=ae+Math.imul(Ue,ct)|0,j=j+Math.imul(Ue,ft)|0,j=j+Math.imul(Oe,ct)|0,G=G+Math.imul(Oe,ft)|0,ae=ae+Math.imul(Te,_t)|0,j=j+Math.imul(Te,Bt)|0,j=j+Math.imul(Se,_t)|0,G=G+Math.imul(Se,Bt)|0,ae=ae+Math.imul(ue,hr)|0,j=j+Math.imul(ue,$r)|0,j=j+Math.imul(pe,hr)|0,G=G+Math.imul(pe,$r)|0,ae=ae+Math.imul($,na)|0,j=j+Math.imul($,wa)|0,j=j+Math.imul(Q,na)|0,G=G+Math.imul(Q,wa)|0,ae=ae+Math.imul(H,fa)|0,j=j+Math.imul(H,za)|0,j=j+Math.imul(Z,fa)|0,G=G+Math.imul(Z,za)|0;var Jn=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,ae=Math.imul(It,Ut),j=Math.imul(It,Jt),j=j+Math.imul(Zt,Ut)|0,G=Math.imul(Zt,Jt),ae=ae+Math.imul(ot,Ee)|0,j=j+Math.imul(ot,Re)|0,j=j+Math.imul(yt,Ee)|0,G=G+Math.imul(yt,Re)|0,ae=ae+Math.imul(qe,ye)|0,j=j+Math.imul(qe,Ie)|0,j=j+Math.imul(Ne,ye)|0,G=G+Math.imul(Ne,Ie)|0,ae=ae+Math.imul(ne,He)|0,j=j+Math.imul(ne,We)|0,j=j+Math.imul(be,He)|0,G=G+Math.imul(be,We)|0,ae=ae+Math.imul(ce,ct)|0,j=j+Math.imul(ce,ft)|0,j=j+Math.imul(ie,ct)|0,G=G+Math.imul(ie,ft)|0,ae=ae+Math.imul(Ue,_t)|0,j=j+Math.imul(Ue,Bt)|0,j=j+Math.imul(Oe,_t)|0,G=G+Math.imul(Oe,Bt)|0,ae=ae+Math.imul(Te,hr)|0,j=j+Math.imul(Te,$r)|0,j=j+Math.imul(Se,hr)|0,G=G+Math.imul(Se,$r)|0,ae=ae+Math.imul(ue,na)|0,j=j+Math.imul(ue,wa)|0,j=j+Math.imul(pe,na)|0,G=G+Math.imul(pe,wa)|0,ae=ae+Math.imul($,fa)|0,j=j+Math.imul($,za)|0,j=j+Math.imul(Q,fa)|0,G=G+Math.imul(Q,za)|0,ae=ae+Math.imul(H,Va)|0,j=j+Math.imul(H,Oa)|0,j=j+Math.imul(Z,Va)|0,G=G+Math.imul(Z,Oa)|0;var Ti=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,ae=Math.imul(It,Ee),j=Math.imul(It,Re),j=j+Math.imul(Zt,Ee)|0,G=Math.imul(Zt,Re),ae=ae+Math.imul(ot,ye)|0,j=j+Math.imul(ot,Ie)|0,j=j+Math.imul(yt,ye)|0,G=G+Math.imul(yt,Ie)|0,ae=ae+Math.imul(qe,He)|0,j=j+Math.imul(qe,We)|0,j=j+Math.imul(Ne,He)|0,G=G+Math.imul(Ne,We)|0,ae=ae+Math.imul(ne,ct)|0,j=j+Math.imul(ne,ft)|0,j=j+Math.imul(be,ct)|0,G=G+Math.imul(be,ft)|0,ae=ae+Math.imul(ce,_t)|0,j=j+Math.imul(ce,Bt)|0,j=j+Math.imul(ie,_t)|0,G=G+Math.imul(ie,Bt)|0,ae=ae+Math.imul(Ue,hr)|0,j=j+Math.imul(Ue,$r)|0,j=j+Math.imul(Oe,hr)|0,G=G+Math.imul(Oe,$r)|0,ae=ae+Math.imul(Te,na)|0,j=j+Math.imul(Te,wa)|0,j=j+Math.imul(Se,na)|0,G=G+Math.imul(Se,wa)|0,ae=ae+Math.imul(ue,fa)|0,j=j+Math.imul(ue,za)|0,j=j+Math.imul(pe,fa)|0,G=G+Math.imul(pe,za)|0,ae=ae+Math.imul($,Va)|0,j=j+Math.imul($,Oa)|0,j=j+Math.imul(Q,Va)|0,G=G+Math.imul(Q,Oa)|0;var _n=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(_n>>>26)|0,_n&=67108863,ae=Math.imul(It,ye),j=Math.imul(It,Ie),j=j+Math.imul(Zt,ye)|0,G=Math.imul(Zt,Ie),ae=ae+Math.imul(ot,He)|0,j=j+Math.imul(ot,We)|0,j=j+Math.imul(yt,He)|0,G=G+Math.imul(yt,We)|0,ae=ae+Math.imul(qe,ct)|0,j=j+Math.imul(qe,ft)|0,j=j+Math.imul(Ne,ct)|0,G=G+Math.imul(Ne,ft)|0,ae=ae+Math.imul(ne,_t)|0,j=j+Math.imul(ne,Bt)|0,j=j+Math.imul(be,_t)|0,G=G+Math.imul(be,Bt)|0,ae=ae+Math.imul(ce,hr)|0,j=j+Math.imul(ce,$r)|0,j=j+Math.imul(ie,hr)|0,G=G+Math.imul(ie,$r)|0,ae=ae+Math.imul(Ue,na)|0,j=j+Math.imul(Ue,wa)|0,j=j+Math.imul(Oe,na)|0,G=G+Math.imul(Oe,wa)|0,ae=ae+Math.imul(Te,fa)|0,j=j+Math.imul(Te,za)|0,j=j+Math.imul(Se,fa)|0,G=G+Math.imul(Se,za)|0,ae=ae+Math.imul(ue,Va)|0,j=j+Math.imul(ue,Oa)|0,j=j+Math.imul(pe,Va)|0,G=G+Math.imul(pe,Oa)|0;var Ln=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(Ln>>>26)|0,Ln&=67108863,ae=Math.imul(It,He),j=Math.imul(It,We),j=j+Math.imul(Zt,He)|0,G=Math.imul(Zt,We),ae=ae+Math.imul(ot,ct)|0,j=j+Math.imul(ot,ft)|0,j=j+Math.imul(yt,ct)|0,G=G+Math.imul(yt,ft)|0,ae=ae+Math.imul(qe,_t)|0,j=j+Math.imul(qe,Bt)|0,j=j+Math.imul(Ne,_t)|0,G=G+Math.imul(Ne,Bt)|0,ae=ae+Math.imul(ne,hr)|0,j=j+Math.imul(ne,$r)|0,j=j+Math.imul(be,hr)|0,G=G+Math.imul(be,$r)|0,ae=ae+Math.imul(ce,na)|0,j=j+Math.imul(ce,wa)|0,j=j+Math.imul(ie,na)|0,G=G+Math.imul(ie,wa)|0,ae=ae+Math.imul(Ue,fa)|0,j=j+Math.imul(Ue,za)|0,j=j+Math.imul(Oe,fa)|0,G=G+Math.imul(Oe,za)|0,ae=ae+Math.imul(Te,Va)|0,j=j+Math.imul(Te,Oa)|0,j=j+Math.imul(Se,Va)|0,G=G+Math.imul(Se,Oa)|0;var ji=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(ji>>>26)|0,ji&=67108863,ae=Math.imul(It,ct),j=Math.imul(It,ft),j=j+Math.imul(Zt,ct)|0,G=Math.imul(Zt,ft),ae=ae+Math.imul(ot,_t)|0,j=j+Math.imul(ot,Bt)|0,j=j+Math.imul(yt,_t)|0,G=G+Math.imul(yt,Bt)|0,ae=ae+Math.imul(qe,hr)|0,j=j+Math.imul(qe,$r)|0,j=j+Math.imul(Ne,hr)|0,G=G+Math.imul(Ne,$r)|0,ae=ae+Math.imul(ne,na)|0,j=j+Math.imul(ne,wa)|0,j=j+Math.imul(be,na)|0,G=G+Math.imul(be,wa)|0,ae=ae+Math.imul(ce,fa)|0,j=j+Math.imul(ce,za)|0,j=j+Math.imul(ie,fa)|0,G=G+Math.imul(ie,za)|0,ae=ae+Math.imul(Ue,Va)|0,j=j+Math.imul(Ue,Oa)|0,j=j+Math.imul(Oe,Va)|0,G=G+Math.imul(Oe,Oa)|0;var Zi=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(Zi>>>26)|0,Zi&=67108863,ae=Math.imul(It,_t),j=Math.imul(It,Bt),j=j+Math.imul(Zt,_t)|0,G=Math.imul(Zt,Bt),ae=ae+Math.imul(ot,hr)|0,j=j+Math.imul(ot,$r)|0,j=j+Math.imul(yt,hr)|0,G=G+Math.imul(yt,$r)|0,ae=ae+Math.imul(qe,na)|0,j=j+Math.imul(qe,wa)|0,j=j+Math.imul(Ne,na)|0,G=G+Math.imul(Ne,wa)|0,ae=ae+Math.imul(ne,fa)|0,j=j+Math.imul(ne,za)|0,j=j+Math.imul(be,fa)|0,G=G+Math.imul(be,za)|0,ae=ae+Math.imul(ce,Va)|0,j=j+Math.imul(ce,Oa)|0,j=j+Math.imul(ie,Va)|0,G=G+Math.imul(ie,Oa)|0;var un=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(un>>>26)|0,un&=67108863,ae=Math.imul(It,hr),j=Math.imul(It,$r),j=j+Math.imul(Zt,hr)|0,G=Math.imul(Zt,$r),ae=ae+Math.imul(ot,na)|0,j=j+Math.imul(ot,wa)|0,j=j+Math.imul(yt,na)|0,G=G+Math.imul(yt,wa)|0,ae=ae+Math.imul(qe,fa)|0,j=j+Math.imul(qe,za)|0,j=j+Math.imul(Ne,fa)|0,G=G+Math.imul(Ne,za)|0,ae=ae+Math.imul(ne,Va)|0,j=j+Math.imul(ne,Oa)|0,j=j+Math.imul(be,Va)|0,G=G+Math.imul(be,Oa)|0;var rn=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(rn>>>26)|0,rn&=67108863,ae=Math.imul(It,na),j=Math.imul(It,wa),j=j+Math.imul(Zt,na)|0,G=Math.imul(Zt,wa),ae=ae+Math.imul(ot,fa)|0,j=j+Math.imul(ot,za)|0,j=j+Math.imul(yt,fa)|0,G=G+Math.imul(yt,za)|0,ae=ae+Math.imul(qe,Va)|0,j=j+Math.imul(qe,Oa)|0,j=j+Math.imul(Ne,Va)|0,G=G+Math.imul(Ne,Oa)|0;var nt=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(nt>>>26)|0,nt&=67108863,ae=Math.imul(It,fa),j=Math.imul(It,za),j=j+Math.imul(Zt,fa)|0,G=Math.imul(Zt,za),ae=ae+Math.imul(ot,Va)|0,j=j+Math.imul(ot,Oa)|0,j=j+Math.imul(yt,Va)|0,G=G+Math.imul(yt,Oa)|0;var Ke=(te+ae|0)+((j&8191)<<13)|0;te=(G+(j>>>13)|0)+(Ke>>>26)|0,Ke&=67108863,ae=Math.imul(It,Va),j=Math.imul(It,Oa),j=j+Math.imul(Zt,Va)|0,G=Math.imul(Zt,Oa);var Qt=(te+ae|0)+((j&8191)<<13)|0;return te=(G+(j>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,ee[0]=tn,ee[1]=ka,ee[2]=oi,ee[3]=$n,ee[4]=bn,ee[5]=ci,ee[6]=hi,ee[7]=Pi,ee[8]=Jn,ee[9]=Ti,ee[10]=_n,ee[11]=Ln,ee[12]=ji,ee[13]=Zi,ee[14]=un,ee[15]=rn,ee[16]=nt,ee[17]=Ke,ee[18]=Qt,te!==0&&(ee[19]=te,N.length++),N};Math.imul||(E=A);function g(R,k,B){B.negative=k.negative^R.negative,B.length=R.length+k.length;for(var N=0,q=0,Y=0;Y>>26)|0,q+=ee>>>26,ee&=67108863}B.words[Y]=te,N=ee,ee=q}return N!==0?B.words[Y]=N:B.length--,B.strip()}function T(R,k,B){var N=new m;return N.mulp(R,k,B)}s.prototype.mulTo=function(k,B){var N,q=this.length+k.length;return this.length===10&&k.length===10?N=E(this,k,B):q<63?N=A(this,k,B):q<1024?N=g(this,k,B):N=T(this,k,B),N};function m(R,k){this.x=R,this.y=k}m.prototype.makeRBT=function(k){for(var B=new Array(k),N=s.prototype._countBits(k)-1,q=0;q>=1;return q},m.prototype.permute=function(k,B,N,q,Y,ee){for(var te=0;te>>1)Y++;return 1<>>13,N[2*ee+1]=Y&8191,Y=Y>>>13;for(ee=2*B;ee>=26,B+=q/67108864|0,B+=Y>>>26,this.words[N]=Y&67108863}return B!==0&&(this.words[N]=B,this.length++),this.length=k===0?1:this.length,this},s.prototype.muln=function(k){return this.clone().imuln(k)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(k){var B=M(k);if(B.length===0)return new s(1);for(var N=this,q=0;q=0);var B=k%26,N=(k-B)/26,q=67108863>>>26-B<<26-B,Y;if(B!==0){var ee=0;for(Y=0;Y>>26-B}ee&&(this.words[Y]=ee,this.length++)}if(N!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+N]=this.words[Y];for(Y=0;Y=0);var q;B?q=(B-B%26)/26:q=0;var Y=k%26,ee=Math.min((k-Y)/26,this.length),te=67108863^67108863>>>Y<ee)for(this.length-=ee,j=0;j=0&&(G!==0||j>=q);j--){var K=this.words[j]|0;this.words[j]=G<<26-Y|K>>>Y,G=K&te}return ae&&G!==0&&(ae.words[ae.length++]=G),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(k,B,N){return n(this.negative===0),this.iushrn(k,B,N)},s.prototype.shln=function(k){return this.clone().ishln(k)},s.prototype.ushln=function(k){return this.clone().iushln(k)},s.prototype.shrn=function(k){return this.clone().ishrn(k)},s.prototype.ushrn=function(k){return this.clone().iushrn(k)},s.prototype.testn=function(k){n(typeof k=="number"&&k>=0);var B=k%26,N=(k-B)/26,q=1<=0);var B=k%26,N=(k-B)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=N)return this;if(B!==0&&N++,this.length=Math.min(N,this.length),B!==0){var q=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},s.prototype.isubn=function(k){if(n(typeof k=="number"),n(k<67108864),k<0)return this.iaddn(-k);if(this.negative!==0)return this.negative=0,this.iaddn(k),this.negative=1,this;if(this.words[0]-=k,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(ae/67108864|0),this.words[Y+N]=ee&67108863}for(;Y>26,this.words[Y+N]=ee&67108863;if(te===0)return this.strip();for(n(te===-1),te=0,Y=0;Y>26,this.words[Y]=ee&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(k,B){var N=this.length-k.length,q=this.clone(),Y=k,ee=Y.words[Y.length-1]|0,te=this._countBits(ee);N=26-te,N!==0&&(Y=Y.ushln(N),q.iushln(N),ee=Y.words[Y.length-1]|0);var ae=q.length-Y.length,j;if(B!=="mod"){j=new s(null),j.length=ae+1,j.words=new Array(j.length);for(var G=0;G=0;H--){var Z=(q.words[Y.length+H]|0)*67108864+(q.words[Y.length+H-1]|0);for(Z=Math.min(Z/ee|0,67108863),q._ishlnsubmul(Y,Z,H);q.negative!==0;)Z--,q.negative=0,q._ishlnsubmul(Y,1,H),q.isZero()||(q.negative^=1);j&&(j.words[H]=Z)}return j&&j.strip(),q.strip(),B!=="div"&&N!==0&&q.iushrn(N),{div:j||null,mod:q}},s.prototype.divmod=function(k,B,N){if(n(!k.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var q,Y,ee;return this.negative!==0&&k.negative===0?(ee=this.neg().divmod(k,B),B!=="mod"&&(q=ee.div.neg()),B!=="div"&&(Y=ee.mod.neg(),N&&Y.negative!==0&&Y.iadd(k)),{div:q,mod:Y}):this.negative===0&&k.negative!==0?(ee=this.divmod(k.neg(),B),B!=="mod"&&(q=ee.div.neg()),{div:q,mod:ee.mod}):this.negative&k.negative?(ee=this.neg().divmod(k.neg(),B),B!=="div"&&(Y=ee.mod.neg(),N&&Y.negative!==0&&Y.isub(k)),{div:ee.div,mod:Y}):k.length>this.length||this.cmp(k)<0?{div:new s(0),mod:this}:k.length===1?B==="div"?{div:this.divn(k.words[0]),mod:null}:B==="mod"?{div:null,mod:new s(this.modn(k.words[0]))}:{div:this.divn(k.words[0]),mod:new s(this.modn(k.words[0]))}:this._wordDiv(k,B)},s.prototype.div=function(k){return this.divmod(k,"div",!1).div},s.prototype.mod=function(k){return this.divmod(k,"mod",!1).mod},s.prototype.umod=function(k){return this.divmod(k,"mod",!0).mod},s.prototype.divRound=function(k){var B=this.divmod(k);if(B.mod.isZero())return B.div;var N=B.div.negative!==0?B.mod.isub(k):B.mod,q=k.ushrn(1),Y=k.andln(1),ee=N.cmp(q);return ee<0||Y===1&&ee===0?B.div:B.div.negative!==0?B.div.isubn(1):B.div.iaddn(1)},s.prototype.modn=function(k){n(k<=67108863);for(var B=(1<<26)%k,N=0,q=this.length-1;q>=0;q--)N=(B*N+(this.words[q]|0))%k;return N},s.prototype.idivn=function(k){n(k<=67108863);for(var B=0,N=this.length-1;N>=0;N--){var q=(this.words[N]|0)+B*67108864;this.words[N]=q/k|0,B=q%k}return this.strip()},s.prototype.divn=function(k){return this.clone().idivn(k)},s.prototype.egcd=function(k){n(k.negative===0),n(!k.isZero());var B=this,N=k.clone();B.negative!==0?B=B.umod(k):B=B.clone();for(var q=new s(1),Y=new s(0),ee=new s(0),te=new s(1),ae=0;B.isEven()&&N.isEven();)B.iushrn(1),N.iushrn(1),++ae;for(var j=N.clone(),G=B.clone();!B.isZero();){for(var K=0,H=1;!(B.words[0]&H)&&K<26;++K,H<<=1);if(K>0)for(B.iushrn(K);K-- >0;)(q.isOdd()||Y.isOdd())&&(q.iadd(j),Y.isub(G)),q.iushrn(1),Y.iushrn(1);for(var Z=0,X=1;!(N.words[0]&X)&&Z<26;++Z,X<<=1);if(Z>0)for(N.iushrn(Z);Z-- >0;)(ee.isOdd()||te.isOdd())&&(ee.iadd(j),te.isub(G)),ee.iushrn(1),te.iushrn(1);B.cmp(N)>=0?(B.isub(N),q.isub(ee),Y.isub(te)):(N.isub(B),ee.isub(q),te.isub(Y))}return{a:ee,b:te,gcd:N.iushln(ae)}},s.prototype._invmp=function(k){n(k.negative===0),n(!k.isZero());var B=this,N=k.clone();B.negative!==0?B=B.umod(k):B=B.clone();for(var q=new s(1),Y=new s(0),ee=N.clone();B.cmpn(1)>0&&N.cmpn(1)>0;){for(var te=0,ae=1;!(B.words[0]&ae)&&te<26;++te,ae<<=1);if(te>0)for(B.iushrn(te);te-- >0;)q.isOdd()&&q.iadd(ee),q.iushrn(1);for(var j=0,G=1;!(N.words[0]&G)&&j<26;++j,G<<=1);if(j>0)for(N.iushrn(j);j-- >0;)Y.isOdd()&&Y.iadd(ee),Y.iushrn(1);B.cmp(N)>=0?(B.isub(N),q.isub(Y)):(N.isub(B),Y.isub(q))}var K;return B.cmpn(1)===0?K=q:K=Y,K.cmpn(0)<0&&K.iadd(k),K},s.prototype.gcd=function(k){if(this.isZero())return k.abs();if(k.isZero())return this.abs();var B=this.clone(),N=k.clone();B.negative=0,N.negative=0;for(var q=0;B.isEven()&&N.isEven();q++)B.iushrn(1),N.iushrn(1);do{for(;B.isEven();)B.iushrn(1);for(;N.isEven();)N.iushrn(1);var Y=B.cmp(N);if(Y<0){var ee=B;B=N,N=ee}else if(Y===0||N.cmpn(1)===0)break;B.isub(N)}while(!0);return N.iushln(q)},s.prototype.invm=function(k){return this.egcd(k).a.umod(k)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(k){return this.words[0]&k},s.prototype.bincn=function(k){n(typeof k=="number");var B=k%26,N=(k-B)/26,q=1<>>26,te&=67108863,this.words[ee]=te}return Y!==0&&(this.words[ee]=Y,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(k){var B=k<0;if(this.negative!==0&&!B)return-1;if(this.negative===0&&B)return 1;this.strip();var N;if(this.length>1)N=1;else{B&&(k=-k),n(k<=67108863,"Number is too big");var q=this.words[0]|0;N=q===k?0:qk.length)return 1;if(this.length=0;N--){var q=this.words[N]|0,Y=k.words[N]|0;if(q!==Y){qY&&(B=1);break}}return B},s.prototype.gtn=function(k){return this.cmpn(k)===1},s.prototype.gt=function(k){return this.cmp(k)===1},s.prototype.gten=function(k){return this.cmpn(k)>=0},s.prototype.gte=function(k){return this.cmp(k)>=0},s.prototype.ltn=function(k){return this.cmpn(k)===-1},s.prototype.lt=function(k){return this.cmp(k)===-1},s.prototype.lten=function(k){return this.cmpn(k)<=0},s.prototype.lte=function(k){return this.cmp(k)<=0},s.prototype.eqn=function(k){return this.cmpn(k)===0},s.prototype.eq=function(k){return this.cmp(k)===0},s.red=function(k){return new I(k)},s.prototype.toRed=function(k){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),k.convertTo(this)._forceRed(k)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(k){return this.red=k,this},s.prototype.forceRed=function(k){return n(!this.red,"Already a number in reduction context"),this._forceRed(k)},s.prototype.redAdd=function(k){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,k)},s.prototype.redIAdd=function(k){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,k)},s.prototype.redSub=function(k){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,k)},s.prototype.redISub=function(k){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,k)},s.prototype.redShl=function(k){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,k)},s.prototype.redMul=function(k){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,k),this.red.mul(this,k)},s.prototype.redIMul=function(k){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,k),this.red.imul(this,k)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(k){return n(this.red&&!k.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,k)};var h={k256:null,p224:null,p192:null,p25519:null};function x(R,k){this.name=R,this.p=new s(k,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}x.prototype._tmp=function(){var k=new s(null);return k.words=new Array(Math.ceil(this.n/13)),k},x.prototype.ireduce=function(k){var B=k,N;do this.split(B,this.tmp),B=this.imulK(B),B=B.iadd(this.tmp),N=B.bitLength();while(N>this.n);var q=N0?B.isub(this.p):B.strip!==void 0?B.strip():B._strip(),B},x.prototype.split=function(k,B){k.iushrn(this.n,0,B)},x.prototype.imulK=function(k){return k.imul(this.k)};function _(){x.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(_,x),_.prototype.split=function(k,B){for(var N=4194303,q=Math.min(k.length,9),Y=0;Y>>22,ee=te}ee>>>=22,k.words[Y-10]=ee,ee===0&&k.length>10?k.length-=10:k.length-=9},_.prototype.imulK=function(k){k.words[k.length]=0,k.words[k.length+1]=0,k.length+=2;for(var B=0,N=0;N>>=26,k.words[N]=Y,B=q}return B!==0&&(k.words[k.length++]=B),k},s._prime=function(k){if(h[k])return h[k];var B;if(k==="k256")B=new _;else if(k==="p224")B=new D;else if(k==="p192")B=new C;else if(k==="p25519")B=new F;else throw new Error("Unknown prime "+k);return h[k]=B,B};function I(R){if(typeof R=="string"){var k=s._prime(R);this.m=k.p,this.prime=k}else n(R.gtn(1),"modulus must be greater than 1"),this.m=R,this.prime=null}I.prototype._verify1=function(k){n(k.negative===0,"red works only with positives"),n(k.red,"red works only with red numbers")},I.prototype._verify2=function(k,B){n((k.negative|B.negative)===0,"red works only with positives"),n(k.red&&k.red===B.red,"red works only with red numbers")},I.prototype.imod=function(k){return this.prime?this.prime.ireduce(k)._forceRed(this):k.umod(this.m)._forceRed(this)},I.prototype.neg=function(k){return k.isZero()?k.clone():this.m.sub(k)._forceRed(this)},I.prototype.add=function(k,B){this._verify2(k,B);var N=k.add(B);return N.cmp(this.m)>=0&&N.isub(this.m),N._forceRed(this)},I.prototype.iadd=function(k,B){this._verify2(k,B);var N=k.iadd(B);return N.cmp(this.m)>=0&&N.isub(this.m),N},I.prototype.sub=function(k,B){this._verify2(k,B);var N=k.sub(B);return N.cmpn(0)<0&&N.iadd(this.m),N._forceRed(this)},I.prototype.isub=function(k,B){this._verify2(k,B);var N=k.isub(B);return N.cmpn(0)<0&&N.iadd(this.m),N},I.prototype.shl=function(k,B){return this._verify1(k),this.imod(k.ushln(B))},I.prototype.imul=function(k,B){return this._verify2(k,B),this.imod(k.imul(B))},I.prototype.mul=function(k,B){return this._verify2(k,B),this.imod(k.mul(B))},I.prototype.isqr=function(k){return this.imul(k,k.clone())},I.prototype.sqr=function(k){return this.mul(k,k)},I.prototype.sqrt=function(k){if(k.isZero())return k.clone();var B=this.m.andln(3);if(n(B%2===1),B===3){var N=this.m.add(new s(1)).iushrn(2);return this.pow(k,N)}for(var q=this.m.subn(1),Y=0;!q.isZero()&&q.andln(1)===0;)Y++,q.iushrn(1);n(!q.isZero());var ee=new s(1).toRed(this),te=ee.redNeg(),ae=this.m.subn(1).iushrn(1),j=this.m.bitLength();for(j=new s(2*j*j).toRed(this);this.pow(j,ae).cmp(te)!==0;)j.redIAdd(te);for(var G=this.pow(j,q),K=this.pow(k,q.addn(1).iushrn(1)),H=this.pow(k,q),Z=Y;H.cmp(ee)!==0;){for(var X=H,$=0;X.cmp(ee)!==0;$++)X=X.redSqr();n($=0;Y--){for(var G=B.words[Y],K=j-1;K>=0;K--){var H=G>>K&1;if(ee!==q[0]&&(ee=this.sqr(ee)),H===0&&te===0){ae=0;continue}te<<=1,te|=H,ae++,!(ae!==N&&(Y!==0||K!==0))&&(ee=this.mul(ee,q[te]),ae=0,te=0)}j=26}return ee},I.prototype.convertTo=function(k){var B=k.umod(this.m);return B===k?B.clone():B},I.prototype.convertFrom=function(k){var B=k.clone();return B.red=null,B},s.mont=function(k){return new z(k)};function z(R){I.call(this,R),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(z,I),z.prototype.convertTo=function(k){return this.imod(k.ushln(this.shift))},z.prototype.convertFrom=function(k){var B=this.imod(k.mul(this.rinv));return B.red=null,B},z.prototype.imul=function(k,B){if(k.isZero()||B.isZero())return k.words[0]=0,k.length=1,k;var N=k.imul(B),q=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=N.isub(q).iushrn(this.shift),ee=Y;return Y.cmp(this.m)>=0?ee=Y.isub(this.m):Y.cmpn(0)<0&&(ee=Y.iadd(this.m)),ee._forceRed(this)},z.prototype.mul=function(k,B){if(k.isZero()||B.isZero())return new s(0)._forceRed(this);var N=k.mul(B),q=N.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=N.isub(q).iushrn(this.shift),ee=Y;return Y.cmp(this.m)>=0?ee=Y.isub(this.m):Y.cmpn(0)<0&&(ee=Y.iadd(this.m)),ee._forceRed(this)},z.prototype.invm=function(k){var B=this.imod(k._invmp(this.m).mul(this.r2));return B._forceRed(this)}}(l,this)},6204:function(l){"use strict";l.exports=e;function e(t){var a,r,n,i=t.length,s=0;for(a=0;a>>1;if(!(m<=0)){var h,x=a.mallocDouble(2*m*g),_=a.mallocInt32(g);if(g=s(b,m,x,_),g>0){if(m===1&&E)r.init(g),h=r.sweepComplete(m,A,0,g,x,_,0,g,x,_);else{var D=a.mallocDouble(2*m*T),C=a.mallocInt32(T);T=s(M,m,D,C),T>0&&(r.init(g+T),m===1?h=r.sweepBipartite(m,A,0,g,x,_,0,T,D,C):h=n(m,A,E,g,x,_,T,D,C),a.free(D),a.free(C))}a.free(x),a.free(_)}return h}}}var p;function f(b,M){p.push([b,M])}function d(b){return p=[],c(b,b,f,!0),p}function y(b,M){return p=[],c(b,M,f,!1),p}function o(b,M,A){switch(arguments.length){case 1:return d(b);case 2:return typeof M=="function"?c(b,b,M,!0):y(b,M);case 3:return c(b,M,A,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(l,e){"use strict";function t(){function n(c,p,f,d,y,o,b,M,A,E,g){for(var T=2*c,m=d,h=T*d;mA-M?n(c,p,f,d,y,o,b,M,A,E,g):i(c,p,f,d,y,o,b,M,A,E,g)}return s}function a(){function n(f,d,y,o,b,M,A,E,g,T,m){for(var h=2*f,x=o,_=h*o;xT-g?o?n(f,d,y,b,M,A,E,g,T,m,h):i(f,d,y,b,M,A,E,g,T,m,h):o?s(f,d,y,b,M,A,E,g,T,m,h):c(f,d,y,b,M,A,E,g,T,m,h)}return p}function r(n){return n?t():a()}e.partial=r(!1),e.full=r(!0)},7150:function(l,e,t){"use strict";l.exports=R;var a=t(1888),r=t(8828),n=t(2455),i=n.partial,s=n.full,c=t(855),p=t(3545),f=t(8105),d=128,y=1<<22,o=1<<22,b=f("!(lo>=p0)&&!(p1>=hi)"),M=f("lo===p0"),A=f("lo0;){G-=1;var Z=G*m,X=_[Z],$=_[Z+1],Q=_[Z+2],re=_[Z+3],ue=_[Z+4],pe=_[Z+5],ge=G*h,Te=D[ge],Se=D[ge+1],Ce=pe&1,Ue=!!(pe&16),Oe=Y,_e=ee,ce=ae,ie=j;if(Ce&&(Oe=ae,_e=j,ce=Y,ie=ee),!(pe&2&&(Q=A(k,X,$,Q,Oe,_e,Se),$>=Q))&&!(pe&4&&($=E(k,X,$,Q,Oe,_e,Te),$>=Q))){var se=Q-$,ne=ue-re;if(Ue){if(k*se*(se+ne)f&&y[T+p]>E;--g,T-=b){for(var m=T,h=T+b,x=0;x>>1,E=2*c,g=A,T=y[E*A+p];b=D?(g=_,T=D):x>=F?(g=h,T=x):(g=C,T=F):D>=F?(g=_,T=D):F>=x?(g=h,T=x):(g=C,T=F);for(var R=E*(M-1),k=E*g,I=0;I=p0)&&!(p1>=hi)":p};function t(f){return e[f]}function a(f,d,y,o,b,M,A){for(var E=2*f,g=E*y,T=g,m=y,h=d,x=f+d,_=y;o>_;++_,g+=E){var D=b[g+h];if(D===A)if(m===_)m+=1,T+=E;else{for(var C=0;E>C;++C){var F=b[g+C];b[g+C]=b[T],b[T++]=F}var I=M[_];M[_]=M[m],M[m++]=I}}return m}function r(f,d,y,o,b,M,A){for(var E=2*f,g=E*y,T=g,m=y,h=d,x=f+d,_=y;o>_;++_,g+=E){var D=b[g+h];if(DC;++C){var F=b[g+C];b[g+C]=b[T],b[T++]=F}var I=M[_];M[_]=M[m],M[m++]=I}}return m}function n(f,d,y,o,b,M,A){for(var E=2*f,g=E*y,T=g,m=y,h=d,x=f+d,_=y;o>_;++_,g+=E){var D=b[g+x];if(D<=A)if(m===_)m+=1,T+=E;else{for(var C=0;E>C;++C){var F=b[g+C];b[g+C]=b[T],b[T++]=F}var I=M[_];M[_]=M[m],M[m++]=I}}return m}function i(f,d,y,o,b,M,A){for(var E=2*f,g=E*y,T=g,m=y,h=d,x=f+d,_=y;o>_;++_,g+=E){var D=b[g+x];if(D<=A)if(m===_)m+=1,T+=E;else{for(var C=0;E>C;++C){var F=b[g+C];b[g+C]=b[T],b[T++]=F}var I=M[_];M[_]=M[m],M[m++]=I}}return m}function s(f,d,y,o,b,M,A){for(var E=2*f,g=E*y,T=g,m=y,h=d,x=f+d,_=y;o>_;++_,g+=E){var D=b[g+h],C=b[g+x];if(D<=A&&A<=C)if(m===_)m+=1,T+=E;else{for(var F=0;E>F;++F){var I=b[g+F];b[g+F]=b[T],b[T++]=I}var z=M[_];M[_]=M[m],M[m++]=z}}return m}function c(f,d,y,o,b,M,A){for(var E=2*f,g=E*y,T=g,m=y,h=d,x=f+d,_=y;o>_;++_,g+=E){var D=b[g+h],C=b[g+x];if(DF;++F){var I=b[g+F];b[g+F]=b[T],b[T++]=I}var z=M[_];M[_]=M[m],M[m++]=z}}return m}function p(f,d,y,o,b,M,A,E){for(var g=2*f,T=g*y,m=T,h=y,x=d,_=f+d,D=y;o>D;++D,T+=g){var C=b[T+x],F=b[T+_];if(!(C>=A)&&!(E>=F))if(h===D)h+=1,m+=g;else{for(var I=0;g>I;++I){var z=b[T+I];b[T+I]=b[m],b[m++]=z}var R=M[D];M[D]=M[h],M[h++]=R}}return h}},4192:function(l){"use strict";l.exports=t;var e=32;function t(d,y){y<=4*e?a(0,y-1,d):f(0,y-1,d)}function a(d,y,o){for(var b=2*(d+1),M=d+1;M<=y;++M){for(var A=o[b++],E=o[b++],g=M,T=b-2;g-- >d;){var m=o[T-2],h=o[T-1];if(mo[y+1]:!0}function p(d,y,o,b){d*=2;var M=b[d];return M>1,g=E-b,T=E+b,m=M,h=g,x=E,_=T,D=A,C=d+1,F=y-1,I=0;c(m,h,o)&&(I=m,m=h,h=I),c(_,D,o)&&(I=_,_=D,D=I),c(m,x,o)&&(I=m,m=x,x=I),c(h,x,o)&&(I=h,h=x,x=I),c(m,_,o)&&(I=m,m=_,_=I),c(x,_,o)&&(I=x,x=_,_=I),c(h,D,o)&&(I=h,h=D,D=I),c(h,x,o)&&(I=h,h=x,x=I),c(_,D,o)&&(I=_,_=D,D=I);for(var z=o[2*h],R=o[2*h+1],k=o[2*_],B=o[2*_+1],N=2*m,q=2*x,Y=2*D,ee=2*M,te=2*E,ae=2*A,j=0;j<2;++j){var G=o[N+j],K=o[q+j],H=o[Y+j];o[ee+j]=G,o[te+j]=K,o[ae+j]=H}n(g,d,o),n(T,y,o);for(var Z=C;Z<=F;++Z)if(p(Z,z,R,o))Z!==C&&r(Z,C,o),++C;else if(!p(Z,k,B,o))for(;;)if(p(F,k,B,o)){p(F,z,R,o)?(i(Z,C,F,o),++C,--F):(r(Z,F,o),--F);break}else{if(--F>>1;n(b,K);for(var H=0,Z=0,te=0;te=i)X=X-i|0,A(f,d,Z--,X);else if(X>=0)A(c,p,H--,X);else if(X<=-i){X=-X-i|0;for(var $=0;$>>1;n(b,K);for(var H=0,Z=0,X=0,te=0;te>1===b[2*te+3]>>1&&(Q=2,te+=1),$<0){for(var re=-($>>1)-1,ue=0;ue>1)-1;Q===0?A(c,p,H--,re):Q===1?A(f,d,Z--,re):Q===2&&A(y,o,X--,re)}}}function m(x,_,D,C,F,I,z,R,k,B,N,q){var Y=0,ee=2*x,te=_,ae=_+x,j=1,G=1;C?G=i:j=i;for(var K=F;K>>1;n(b,$);for(var Q=0,K=0;K<$;++K){var re=b[2*K+1]|0;if(re<0){var H=-re,ue=!1;if(H>=i?(ue=!C,H-=i):(ue=!!C,H-=1),ue)E(c,p,Q++,H);else{var pe=q[H],ge=ee*H,Te=N[ge+_+1],Se=N[ge+_+1+x];e:for(var Ce=0;Ce>>1;n(b,H);for(var Z=0,ae=0;ae=i)c[Z++]=j-i;else{j-=1;var $=N[j],Q=Y*j,re=B[Q+_+1],ue=B[Q+_+1+x];e:for(var pe=0;pe=0;--pe)if(c[pe]===j){for(var Ce=pe+1;Ce0;){for(var M=p.pop(),y=p.pop(),A=-1,E=-1,o=d[y],T=1;T=0||(c.flip(y,M),n(s,c,p,A,y,E),n(s,c,p,y,E,A),n(s,c,p,E,M,A),n(s,c,p,M,A,E))}}},5023:function(l,e,t){"use strict";var a=t(2478);l.exports=p;function r(f,d,y,o,b,M,A){this.cells=f,this.neighbor=d,this.flags=o,this.constraint=y,this.active=b,this.next=M,this.boundary=A}var n=r.prototype;function i(f,d){return f[0]-d[0]||f[1]-d[1]||f[2]-d[2]}n.locate=function(){var f=[0,0,0];return function(d,y,o){var b=d,M=y,A=o;return y0||A.length>0;){for(;M.length>0;){var h=M.pop();if(E[h]!==-b){E[h]=b;for(var x=g[h],_=0;_<3;++_){var D=m[3*h+_];D>=0&&E[D]===0&&(T[3*h+_]?A.push(D):(M.push(D),E[D]=b))}}}var C=A;A=M,M=C,A.length=0,b=-b}var F=c(g,E,d);return y?F.concat(o.boundary):F}},8902:function(l,e,t){"use strict";var a=t(2478),r=t(3250)[3],n=0,i=1,s=2;l.exports=A;function c(E,g,T,m,h){this.a=E,this.b=g,this.idx=T,this.lowerIds=m,this.upperIds=h}function p(E,g,T,m){this.a=E,this.b=g,this.type=T,this.idx=m}function f(E,g){var T=E.a[0]-g.a[0]||E.a[1]-g.a[1]||E.type-g.type;return T||E.type!==n&&(T=r(E.a,E.b,g.b),T)?T:E.idx-g.idx}function d(E,g){return r(E.a,E.b,g)}function y(E,g,T,m,h){for(var x=a.lt(g,m,d),_=a.gt(g,m,d),D=x;D<_;++D){for(var C=g[D],F=C.lowerIds,z=F.length;z>1&&r(T[F[z-2]],T[F[z-1]],m)>0;)E.push([F[z-1],F[z-2],h]),z-=1;F.length=z,F.push(h);for(var I=C.upperIds,z=I.length;z>1&&r(T[I[z-2]],T[I[z-1]],m)<0;)E.push([I[z-2],I[z-1],h]),z-=1;I.length=z,I.push(h)}}function o(E,g){var T;return E.a[0]C[0]&&h.push(new p(C,D,s,x),new p(D,C,i,x))}h.sort(f);for(var F=h[0].a[0]-(1+Math.abs(h[0].a[0]))*Math.pow(2,-52),I=[new c([F,1],[F,0],-1,[],[],[],[])],z=[],x=0,R=h.length;x=0}}(),n.removeTriangle=function(c,p,f){var d=this.stars;i(d[c],p,f),i(d[p],f,c),i(d[f],c,p)},n.addTriangle=function(c,p,f){var d=this.stars;d[c].push(p,f),d[p].push(f,c),d[f].push(c,p)},n.opposite=function(c,p){for(var f=this.stars[p],d=1,y=f.length;d=0;--k){var G=z[k];B=G[0];var K=F[B],H=K[0],Z=K[1],X=C[H],$=C[Z];if((X[0]-$[0]||X[1]-$[1])<0){var Q=H;H=Z,Z=Q}K[0]=H;var re=K[1]=G[1],ue;for(R&&(ue=K[2]);k>0&&z[k-1][0]===B;){var G=z[--k],pe=G[1];R?F.push([re,pe,ue]):F.push([re,pe]),re=pe}R?F.push([re,Z,ue]):F.push([re,Z])}return N}function g(C,F,I){for(var z=F.length,R=new a(z),k=[],B=0;BF[2]?1:0)}function h(C,F,I){if(C.length!==0){if(F)for(var z=0;z0||B.length>0}function D(C,F,I){var z;if(I){z=F;for(var R=new Array(F.length),k=0;kE+1)throw new Error(M+" map requires nshades to be at least size "+b.length);Array.isArray(p.alpha)?p.alpha.length!==2?g=[1,1]:g=p.alpha.slice():typeof p.alpha=="number"?g=[p.alpha,p.alpha]:g=[1,1],f=b.map(function(D){return Math.round(D.index*E)}),g[0]=Math.min(Math.max(g[0],0),1),g[1]=Math.min(Math.max(g[1],0),1);var m=b.map(function(D,C){var F=b[C].index,I=b[C].rgb.slice();return I.length===4&&I[3]>=0&&I[3]<=1||(I[3]=g[0]+(g[1]-g[0])*F),I}),h=[];for(T=0;T=0}function p(f,d,y,o){var b=a(d,y,o);if(b===0){var M=r(a(f,d,y)),A=r(a(f,d,o));if(M===A){if(M===0){var E=c(f,d,y),g=c(f,d,o);return E===g?0:E?1:-1}return 0}else{if(A===0)return M>0||c(f,d,o)?-1:1;if(M===0)return A>0||c(f,d,y)?1:-1}return r(A-M)}var T=a(f,d,y);if(T>0)return b>0&&a(f,d,o)>0?1:-1;if(T<0)return b>0||a(f,d,o)>0?1:-1;var m=a(f,d,o);return m>0||c(f,d,y)?1:-1}},8572:function(l){"use strict";l.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(l){l.exports=a;var e=Math.min;function t(r,n){return r-n}function a(r,n){var i=r.length,s=r.length-n.length;if(s)return s;switch(i){case 0:return 0;case 1:return r[0]-n[0];case 2:return r[0]+r[1]-n[0]-n[1]||e(r[0],r[1])-e(n[0],n[1]);case 3:var c=r[0]+r[1],p=n[0]+n[1];if(s=c+r[2]-(p+n[2]),s)return s;var f=e(r[0],r[1]),d=e(n[0],n[1]);return e(f,r[2])-e(d,n[2])||e(f+r[2],c)-e(d+n[2],p);case 4:var y=r[0],o=r[1],b=r[2],M=r[3],A=n[0],E=n[1],g=n[2],T=n[3];return y+o+b+M-(A+E+g+T)||e(y,o,b,M)-e(A,E,g,T,A)||e(y+o,y+b,y+M,o+b,o+M,b+M)-e(A+E,A+g,A+T,E+g,E+T,g+T)||e(y+o+b,y+o+M,y+b+M,o+b+M)-e(A+E+g,A+E+T,A+g+T,E+g+T);default:for(var m=r.slice().sort(t),h=n.slice().sort(t),x=0;xt[r][0]&&(r=n);return ar?[[r],[a]]:[[a]]}},4750:function(l,e,t){"use strict";l.exports=r;var a=t(3090);function r(n){var i=a(n),s=i.length;if(s<=2)return[];for(var c=new Array(s),p=i[s-1],f=0;f=p[A]&&(M+=1);o[b]=M}}return c}function s(c,p){try{return a(c,!0)}catch{var f=r(c);if(f.length<=p)return[];var d=n(c,f),y=a(d,!0);return i(y,f)}}},4769:function(l){"use strict";function e(a,r,n,i,s,c){var p=6*s*s-6*s,f=3*s*s-4*s+1,d=-6*s*s+6*s,y=3*s*s-2*s;if(a.length){c||(c=new Array(a.length));for(var o=a.length-1;o>=0;--o)c[o]=p*a[o]+f*r[o]+d*n[o]+y*i[o];return c}return p*a+f*r+d*n[o]+y*i}function t(a,r,n,i,s,c){var p=s-1,f=s*s,d=p*p,y=(1+2*s)*d,o=s*d,b=f*(3-2*s),M=f*p;if(a.length){c||(c=new Array(a.length));for(var A=a.length-1;A>=0;--A)c[A]=y*a[A]+o*r[A]+b*n[A]+M*i[A];return c}return y*a+o*r+b*n+M*i}l.exports=t,l.exports.derivative=e},7642:function(l,e,t){"use strict";var a=t(8954),r=t(1682);l.exports=c;function n(p,f){this.point=p,this.index=f}function i(p,f){for(var d=p.point,y=f.point,o=d.length,b=0;b=2)return!1;I[R]=k}return!0}):F=F.filter(function(I){for(var z=0;z<=y;++z){var R=x[I[z]];if(R<0)return!1;I[z]=R}return!0}),y&1)for(var M=0;M>>31},l.exports.exponent=function(b){var M=l.exports.hi(b);return(M<<1>>>21)-1023},l.exports.fraction=function(b){var M=l.exports.lo(b),A=l.exports.hi(b),E=A&(1<<20)-1;return A&2146435072&&(E+=1048576),[M,E]},l.exports.denormalized=function(b){var M=l.exports.hi(b);return!(M&2146435072)}},1338:function(l){"use strict";function e(r,n,i){var s=r[i]|0;if(s<=0)return[];var c=new Array(s),p;if(i===r.length-1)for(p=0;p"u"&&(n=0),typeof r){case"number":if(r>0)return t(r|0,n);break;case"object":if(typeof r.length=="number")return e(r,n,0);break}return[]}l.exports=a},3134:function(l,e,t){"use strict";l.exports=r;var a=t(1682);function r(n,i){var s=n.length;if(typeof i!="number"){i=0;for(var c=0;c=y-1)for(var T=M.length-1,h=f-d[y-1],m=0;m=y-1)for(var g=M.length-1,T=f-d[y-1],m=0;m=0;--y)if(f[--d])return!1;return!0},s.jump=function(f){var d=this.lastT(),y=this.dimension;if(!(f0;--m)o.push(n(E[m-1],g[m-1],arguments[m])),b.push(0)}},s.push=function(f){var d=this.lastT(),y=this.dimension;if(!(f1e-6?1/A:0;this._time.push(f);for(var h=y;h>0;--h){var x=n(g[h-1],T[h-1],arguments[h]);o.push(x),b.push((x-o[M++])*m)}}},s.set=function(f){var d=this.dimension;if(!(f0;--E)y.push(n(M[E-1],A[E-1],arguments[E])),o.push(0)}},s.move=function(f){var d=this.lastT(),y=this.dimension;if(!(f<=d||arguments.length!==y+1)){var o=this._state,b=this._velocity,M=o.length-this.dimension,A=this.bounds,E=A[0],g=A[1],T=f-d,m=T>1e-6?1/T:0;this._time.push(f);for(var h=y;h>0;--h){var x=arguments[h];o.push(n(E[h-1],g[h-1],o[M++]+x)),b.push(x*m)}}},s.idle=function(f){var d=this.lastT();if(!(f=0;--m)o.push(n(E[m],g[m],o[M]+T*b[M])),b.push(0),M+=1}};function c(f){for(var d=new Array(f),y=0;y=0;--C){var h=x[C];_[C]<=0?x[C]=new a(h._color,h.key,h.value,x[C+1],h.right,h._count+1):x[C]=new a(h._color,h.key,h.value,h.left,x[C+1],h._count+1)}for(var C=x.length-1;C>1;--C){var F=x[C-1],h=x[C];if(F._color===t||h._color===t)break;var I=x[C-2];if(I.left===F)if(F.left===h){var z=I.right;if(z&&z._color===e)F._color=t,I.right=n(t,z),I._color=e,C-=1;else{if(I._color=e,I.left=F.right,F._color=t,F.right=I,x[C-2]=F,x[C-1]=h,i(I),i(F),C>=3){var R=x[C-3];R.left===I?R.left=F:R.right=F}break}}else{var z=I.right;if(z&&z._color===e)F._color=t,I.right=n(t,z),I._color=e,C-=1;else{if(F.right=h.left,I._color=e,I.left=h.right,h._color=t,h.left=F,h.right=I,x[C-2]=h,x[C-1]=F,i(I),i(F),i(h),C>=3){var R=x[C-3];R.left===I?R.left=h:R.right=h}break}}else if(F.right===h){var z=I.left;if(z&&z._color===e)F._color=t,I.left=n(t,z),I._color=e,C-=1;else{if(I._color=e,I.right=F.left,F._color=t,F.left=I,x[C-2]=F,x[C-1]=h,i(I),i(F),C>=3){var R=x[C-3];R.right===I?R.right=F:R.left=F}break}}else{var z=I.left;if(z&&z._color===e)F._color=t,I.left=n(t,z),I._color=e,C-=1;else{if(F.left=h.right,I._color=e,I.right=h.left,h._color=t,h.right=F,h.left=I,x[C-2]=h,x[C-1]=F,i(I),i(F),i(h),C>=3){var R=x[C-3];R.right===I?R.right=h:R.left=h}break}}}return x[0]._color=t,new s(m,x[0])};function p(g,T){if(T.left){var m=p(g,T.left);if(m)return m}var m=g(T.key,T.value);if(m)return m;if(T.right)return p(g,T.right)}function f(g,T,m,h){var x=T(g,h.key);if(x<=0){if(h.left){var _=f(g,T,m,h.left);if(_)return _}var _=m(h.key,h.value);if(_)return _}if(h.right)return f(g,T,m,h.right)}function d(g,T,m,h,x){var _=m(g,x.key),D=m(T,x.key),C;if(_<=0&&(x.left&&(C=d(g,T,m,h,x.left),C)||D>0&&(C=h(x.key,x.value),C)))return C;if(D>0&&x.right)return d(g,T,m,h,x.right)}c.forEach=function(T,m,h){if(this.root)switch(arguments.length){case 1:return p(T,this.root);case 2:return f(m,this._compare,T,this.root);case 3:return this._compare(m,h)>=0?void 0:d(m,h,this._compare,T,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var g=[],T=this.root;T;)g.push(T),T=T.left;return new y(this,g)}}),Object.defineProperty(c,"end",{get:function(){for(var g=[],T=this.root;T;)g.push(T),T=T.right;return new y(this,g)}}),c.at=function(g){if(g<0)return new y(this,[]);for(var T=this.root,m=[];;){if(m.push(T),T.left){if(g=T.right._count)break;T=T.right}else break}return new y(this,[])},c.ge=function(g){for(var T=this._compare,m=this.root,h=[],x=0;m;){var _=T(g,m.key);h.push(m),_<=0&&(x=h.length),_<=0?m=m.left:m=m.right}return h.length=x,new y(this,h)},c.gt=function(g){for(var T=this._compare,m=this.root,h=[],x=0;m;){var _=T(g,m.key);h.push(m),_<0&&(x=h.length),_<0?m=m.left:m=m.right}return h.length=x,new y(this,h)},c.lt=function(g){for(var T=this._compare,m=this.root,h=[],x=0;m;){var _=T(g,m.key);h.push(m),_>0&&(x=h.length),_<=0?m=m.left:m=m.right}return h.length=x,new y(this,h)},c.le=function(g){for(var T=this._compare,m=this.root,h=[],x=0;m;){var _=T(g,m.key);h.push(m),_>=0&&(x=h.length),_<0?m=m.left:m=m.right}return h.length=x,new y(this,h)},c.find=function(g){for(var T=this._compare,m=this.root,h=[];m;){var x=T(g,m.key);if(h.push(m),x===0)return new y(this,h);x<=0?m=m.left:m=m.right}return new y(this,[])},c.remove=function(g){var T=this.find(g);return T?T.remove():this},c.get=function(g){for(var T=this._compare,m=this.root;m;){var h=T(g,m.key);if(h===0)return m.value;h<=0?m=m.left:m=m.right}};function y(g,T){this.tree=g,this._stack=T}var o=y.prototype;Object.defineProperty(o,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(o,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),o.clone=function(){return new y(this.tree,this._stack.slice())};function b(g,T){g.key=T.key,g.value=T.value,g.left=T.left,g.right=T.right,g._color=T._color,g._count=T._count}function M(g){for(var T,m,h,x,_=g.length-1;_>=0;--_){if(T=g[_],_===0){T._color=t;return}if(m=g[_-1],m.left===T){if(h=m.right,h.right&&h.right._color===e){if(h=m.right=r(h),x=h.right=r(h.right),m.right=h.left,h.left=m,h.right=x,h._color=m._color,T._color=t,m._color=t,x._color=t,i(m),i(h),_>1){var D=g[_-2];D.left===m?D.left=h:D.right=h}g[_-1]=h;return}else if(h.left&&h.left._color===e){if(h=m.right=r(h),x=h.left=r(h.left),m.right=x.left,h.left=x.right,x.left=m,x.right=h,x._color=m._color,m._color=t,h._color=t,T._color=t,i(m),i(h),i(x),_>1){var D=g[_-2];D.left===m?D.left=x:D.right=x}g[_-1]=x;return}if(h._color===t)if(m._color===e){m._color=t,m.right=n(e,h);return}else{m.right=n(e,h);continue}else{if(h=r(h),m.right=h.left,h.left=m,h._color=m._color,m._color=e,i(m),i(h),_>1){var D=g[_-2];D.left===m?D.left=h:D.right=h}g[_-1]=h,g[_]=m,_+11){var D=g[_-2];D.right===m?D.right=h:D.left=h}g[_-1]=h;return}else if(h.right&&h.right._color===e){if(h=m.left=r(h),x=h.right=r(h.right),m.left=x.right,h.right=x.left,x.right=m,x.left=h,x._color=m._color,m._color=t,h._color=t,T._color=t,i(m),i(h),i(x),_>1){var D=g[_-2];D.right===m?D.right=x:D.left=x}g[_-1]=x;return}if(h._color===t)if(m._color===e){m._color=t,m.left=n(e,h);return}else{m.left=n(e,h);continue}else{if(h=r(h),m.left=h.right,h.right=m,h._color=m._color,m._color=e,i(m),i(h),_>1){var D=g[_-2];D.right===m?D.right=h:D.left=h}g[_-1]=h,g[_]=m,_+1=0;--h){var m=g[h];m.left===g[h+1]?T[h]=new a(m._color,m.key,m.value,T[h+1],m.right,m._count):T[h]=new a(m._color,m.key,m.value,m.left,T[h+1],m._count)}if(m=T[T.length-1],m.left&&m.right){var x=T.length;for(m=m.left;m.right;)T.push(m),m=m.right;var _=T[x-1];T.push(new a(m._color,_.key,_.value,m.left,m.right,m._count)),T[x-1].key=m.key,T[x-1].value=m.value;for(var h=T.length-2;h>=x;--h)m=T[h],T[h]=new a(m._color,m.key,m.value,m.left,T[h+1],m._count);T[x-1].left=T[x]}if(m=T[T.length-1],m._color===e){var D=T[T.length-2];D.left===m?D.left=null:D.right===m&&(D.right=null),T.pop();for(var h=0;h0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(o,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(o,"index",{get:function(){var g=0,T=this._stack;if(T.length===0){var m=this.tree.root;return m?m._count:0}else T[T.length-1].left&&(g=T[T.length-1].left._count);for(var h=T.length-2;h>=0;--h)T[h+1]===T[h].right&&(++g,T[h].left&&(g+=T[h].left._count));return g},enumerable:!0}),o.next=function(){var g=this._stack;if(g.length!==0){var T=g[g.length-1];if(T.right)for(T=T.right;T;)g.push(T),T=T.left;else for(g.pop();g.length>0&&g[g.length-1].right===T;)T=g[g.length-1],g.pop()}},Object.defineProperty(o,"hasNext",{get:function(){var g=this._stack;if(g.length===0)return!1;if(g[g.length-1].right)return!0;for(var T=g.length-1;T>0;--T)if(g[T-1].left===g[T])return!0;return!1}}),o.update=function(g){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var m=new Array(T.length),h=T[T.length-1];m[m.length-1]=new a(h._color,h.key,g,h.left,h.right,h._count);for(var x=T.length-2;x>=0;--x)h=T[x],h.left===T[x+1]?m[x]=new a(h._color,h.key,h.value,m[x+1],h.right,h._count):m[x]=new a(h._color,h.key,h.value,h.left,m[x+1],h._count);return new s(this.tree._compare,m[0])},o.prev=function(){var g=this._stack;if(g.length!==0){var T=g[g.length-1];if(T.left)for(T=T.left;T;)g.push(T),T=T.right;else for(g.pop();g.length>0&&g[g.length-1].left===T;)T=g[g.length-1],g.pop()}},Object.defineProperty(o,"hasPrev",{get:function(){var g=this._stack;if(g.length===0)return!1;if(g[g.length-1].left)return!0;for(var T=g.length-1;T>0;--T)if(g[T-1].right===g[T])return!0;return!1}});function A(g,T){return gT?1:0}function E(g){return new s(g||A,null)}},3837:function(l,e,t){"use strict";l.exports=C;var a=t(4935),r=t(501),n=t(5304),i=t(6429),s=t(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=ArrayBuffer,f=DataView;function d(F){return p.isView(F)&&!(F instanceof f)}function y(F){return Array.isArray(F)||d(F)}function o(F,I){return F[0]=I[0],F[1]=I[1],F[2]=I[2],F}function b(F){this.gl=F,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=n(F)}var M=b.prototype;M.update=function(F){F=F||{};function I(H,Z,X){if(X in F){var $=F[X],Q=this[X],re;(H?y($)&&y($[0]):y($))?this[X]=re=[Z($[0]),Z($[1]),Z($[2])]:this[X]=re=[Z($),Z($),Z($)];for(var ue=0;ue<3;++ue)if(re[ue]!==Q[ue])return!0}return!1}var z=I.bind(this,!1,Number),R=I.bind(this,!1,Boolean),k=I.bind(this,!1,String),B=I.bind(this,!0,function(H){if(y(H)){if(H.length===3)return[+H[0],+H[1],+H[2],1];if(H.length===4)return[+H[0],+H[1],+H[2],+H[3]]}return[0,0,0,1]}),N,q=!1,Y=!1;if("bounds"in F)for(var ee=F.bounds,te=0;te<2;++te)for(var ae=0;ae<3;++ae)ee[te][ae]!==this.bounds[te][ae]&&(Y=!0),this.bounds[te][ae]=ee[te][ae];if("ticks"in F){N=F.ticks,q=!0,this.autoTicks=!1;for(var te=0;te<3;++te)this.tickSpacing[te]=0}else z("tickSpacing")&&(this.autoTicks=!0,Y=!0);if(this._firstInit&&("ticks"in F||"tickSpacing"in F||(this.autoTicks=!0),Y=!0,q=!0,this._firstInit=!1),Y&&this.autoTicks&&(N=s.create(this.bounds,this.tickSpacing),q=!0),q){for(var te=0;te<3;++te)N[te].sort(function(Z,X){return Z.x-X.x});s.equal(N,this.ticks)?q=!1:this.ticks=N}R("tickEnable"),k("tickFont")&&(q=!0),k("tickFontStyle")&&(q=!0),k("tickFontWeight")&&(q=!0),k("tickFontVariant")&&(q=!0),z("tickSize"),z("tickAngle"),z("tickPad"),B("tickColor");var j=k("labels");k("labelFont")&&(j=!0),k("labelFontStyle")&&(j=!0),k("labelFontWeight")&&(j=!0),k("labelFontVariant")&&(j=!0),R("labelEnable"),z("labelSize"),z("labelPad"),B("labelColor"),R("lineEnable"),R("lineMirror"),z("lineWidth"),B("lineColor"),R("lineTickEnable"),R("lineTickMirror"),z("lineTickLength"),z("lineTickWidth"),B("lineTickColor"),R("gridEnable"),z("gridWidth"),B("gridColor"),R("zeroEnable"),B("zeroLineColor"),z("zeroLineWidth"),R("backgroundEnable"),B("backgroundColor");var G=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],K=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(j||q)&&this._text.update(this.bounds,this.labels,G,this.ticks,K):this._text=a(this.gl,this.bounds,this.labels,G,this.ticks,K),this._lines&&q&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};function A(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var E=[new A,new A,new A];function g(F,I,z,R,k){for(var B=F.primalOffset,N=F.primalMinor,q=F.mirrorOffset,Y=F.mirrorMinor,ee=R[I],te=0;te<3;++te)if(I!==te){var ae=B,j=q,G=N,K=Y;ee&1<0?(G[te]=-1,K[te]=0):(G[te]=0,K[te]=1)}}var T=[0,0,0],m={model:c,view:c,projection:c,_ortho:!1};M.isOpaque=function(){return!0},M.isTransparent=function(){return!1},M.drawTransparent=function(F){};var h=0,x=[0,0,0],_=[0,0,0],D=[0,0,0];M.draw=function(F){F=F||m;for(var X=this.gl,I=F.model||c,z=F.view||c,R=F.projection||c,k=this.bounds,B=F._ortho||!1,N=i(I,z,R,k,B),q=N.cubeEdges,Y=N.axis,ee=z[12],te=z[13],ae=z[14],j=z[15],G=B?2:1,K=G*this.pixelRatio*(R[3]*ee+R[7]*te+R[11]*ae+R[15]*j)/X.drawingBufferHeight,H=0;H<3;++H)this.lastCubeProps.cubeEdges[H]=q[H],this.lastCubeProps.axis[H]=Y[H];for(var Z=E,H=0;H<3;++H)g(E[H],H,this.bounds,q,Y);for(var X=this.gl,$=T,H=0;H<3;++H)this.backgroundEnable[H]?$[H]=Y[H]:$[H]=0;this._background.draw(I,z,R,k,$,this.backgroundColor),this._lines.bind(I,z,R,this);for(var H=0;H<3;++H){var Q=[0,0,0];Y[H]>0?Q[H]=k[1][H]:Q[H]=k[0][H];for(var re=0;re<2;++re){var ue=(H+1+re)%3,pe=(H+1+(re^1))%3;this.gridEnable[ue]&&this._lines.drawGrid(ue,pe,this.bounds,Q,this.gridColor[ue],this.gridWidth[ue]*this.pixelRatio)}for(var re=0;re<2;++re){var ue=(H+1+re)%3,pe=(H+1+(re^1))%3;this.zeroEnable[pe]&&Math.min(k[0][pe],k[1][pe])<=0&&Math.max(k[0][pe],k[1][pe])>=0&&this._lines.drawZero(ue,pe,this.bounds,Q,this.zeroLineColor[pe],this.zeroLineWidth[pe]*this.pixelRatio)}}for(var H=0;H<3;++H){this.lineEnable[H]&&this._lines.drawAxisLine(H,this.bounds,Z[H].primalOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio),this.lineMirror[H]&&this._lines.drawAxisLine(H,this.bounds,Z[H].mirrorOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio);for(var ge=o(x,Z[H].primalMinor),Te=o(_,Z[H].mirrorMinor),Se=this.lineTickLength,re=0;re<3;++re){var Ce=K/I[5*re];ge[re]*=Se[re]*Ce,Te[re]*=Se[re]*Ce}this.lineTickEnable[H]&&this._lines.drawAxisTicks(H,Z[H].primalOffset,ge,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio),this.lineTickMirror[H]&&this._lines.drawAxisTicks(H,Z[H].mirrorOffset,Te,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio)}this._lines.unbind(),this._text.bind(I,z,R,this.pixelRatio);var Ue,Oe=.5,_e,ce;function ie(Ne){ce=[0,0,0],ce[Ne]=1}function se(Ne,ut,ot){var yt=(Ne+1)%3,At=(Ne+2)%3,It=ut[yt],Zt=ut[At],vr=ot[yt],Ut=ot[At];if(It>0&&Ut>0){ie(yt);return}else if(It>0&&Ut<0){ie(yt);return}else if(It<0&&Ut>0){ie(yt);return}else if(It<0&&Ut<0){ie(yt);return}else if(Zt>0&&vr>0){ie(At);return}else if(Zt>0&&vr<0){ie(At);return}else if(Zt<0&&vr>0){ie(At);return}else if(Zt<0&&vr<0){ie(At);return}}for(var H=0;H<3;++H){for(var ne=Z[H].primalMinor,be=Z[H].mirrorMinor,De=o(D,Z[H].primalOffset),re=0;re<3;++re)this.lineTickEnable[H]&&(De[re]+=K*ne[re]*Math.max(this.lineTickLength[re],0)/I[5*re]);var qe=[0,0,0];if(qe[H]=1,this.tickEnable[H]){this.tickAngle[H]===-3600?(this.tickAngle[H]=0,this.tickAlign[H]="auto"):this.tickAlign[H]=-1,_e=1,Ue=[this.tickAlign[H],Oe,_e],Ue[0]==="auto"?Ue[0]=h:Ue[0]=parseInt(""+Ue[0]),ce=[0,0,0],se(H,ne,be);for(var re=0;re<3;++re)De[re]+=K*ne[re]*this.tickPad[re]/I[5*re];this._text.drawTicks(H,this.tickSize[H],this.tickAngle[H],De,this.tickColor[H],qe,ce,Ue)}if(this.labelEnable[H]){_e=0,ce=[0,0,0],this.labels[H].length>4&&(ie(H),_e=1),Ue=[this.labelAlign[H],Oe,_e],Ue[0]==="auto"?Ue[0]=h:Ue[0]=parseInt(""+Ue[0]);for(var re=0;re<3;++re)De[re]+=K*ne[re]*this.labelPad[re]/I[5*re];De[H]+=.5*(k[0][H]+k[1][H]),this._text.drawLabel(H,this.labelSize[H],this.labelAngle[H],De,this.labelColor[H],[0,0,0],ce,Ue)}}this._text.unbind()},M.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function C(F,I){var z=new b(F);return z.update(I),z}},5304:function(l,e,t){"use strict";l.exports=c;var a=t(2762),r=t(8116),n=t(1879).bg;function i(p,f,d,y){this.gl=p,this.buffer=f,this.vao=d,this.shader=y}var s=i.prototype;s.draw=function(p,f,d,y,o,b){for(var M=!1,A=0;A<3;++A)M=M||o[A];if(M){var E=this.gl;E.enable(E.POLYGON_OFFSET_FILL),E.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:p,view:f,projection:d,bounds:y,enable:o,colors:b},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),E.disable(E.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(p){for(var f=[],d=[],y=0,o=0;o<3;++o)for(var b=(o+1)%3,M=(o+2)%3,A=[0,0,0],E=[0,0,0],g=-1;g<=1;g+=2){d.push(y,y+2,y+1,y+1,y+2,y+3),A[o]=g,E[o]=g;for(var T=-1;T<=1;T+=2){A[b]=T;for(var m=-1;m<=1;m+=2)A[M]=m,f.push(A[0],A[1],A[2],E[0],E[1],E[2]),y+=1}var h=b;b=M,M=h}var x=a(p,new Float32Array(f)),_=a(p,new Uint16Array(d),p.ELEMENT_ARRAY_BUFFER),D=r(p,[{buffer:x,type:p.FLOAT,size:3,offset:0,stride:24},{buffer:x,type:p.FLOAT,size:3,offset:12,stride:24}],_),C=n(p);return C.attributes.position.location=0,C.attributes.normal.location=1,new i(p,x,D,C)}},6429:function(l,e,t){"use strict";l.exports=g;var a=t(8828),r=t(6760),n=t(5202),i=t(3250),s=new Array(16),c=new Array(8),p=new Array(8),f=new Array(3),d=[0,0,0];(function(){for(var T=0;T<8;++T)c[T]=[1,1,1,1],p[T]=[1,1,1]})();function y(T,m,h){for(var x=0;x<4;++x){T[x]=h[12+x];for(var _=0;_<3;++_)T[x]+=m[_]*h[4*_+x]}}var o=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function b(T){for(var m=0;mY&&(z|=1<Y){z|=1<p[C][1])&&(Z=C);for(var X=-1,C=0;C<3;++C){var $=Z^1<p[Q][0]&&(Q=$)}}var re=M;re[0]=re[1]=re[2]=0,re[a.log2(X^Z)]=Z&X,re[a.log2(Z^Q)]=Z&Q;var ue=Q^7;ue===z||ue===H?(ue=X^7,re[a.log2(Q^ue)]=ue&Q):re[a.log2(X^ue)]=ue&X;for(var pe=A,ge=z,B=0;B<3;++B)ge&1<0}function E(s){var c=0,m=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,r=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function n(s){var c=s.match(e),m=s.match(t),h=s.match(a);return{width:c&&(c[1]||c[2]),height:m&&(m[1]||m[2]),viewbox:h&&(h[1]||h[2])}}function o(s){return r.test(s)?s.match(r)[0]:"px"}V.exports=function(s){if(E(s)){for(var c="",m=0;m>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function n(o,s){return{width:(o[s+6]<<16|o[s+5]<<8|o[s+4])+1,height:(o[s+9]<<16|o[s+8]<<8|o[s+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}V.exports=function(o){if(!(o.length<16)&&!(!x(o,0,e)||!x(o,8,t))){var s=12,c=null,m=0,h=k(o,4)+8;if(!(h>o.length)){for(;s+8=10?c=c||a(o,s+8):p==="VP8L"&&g>=5?c=c||r(o,s+8):p==="VP8X"&&g>=10?c=c||n(o,s+8):p==="EXIF"&&(m=l.get_orientation(o.slice(s+8,s+8+g)),s=1/0),s+=8+g}if(c)return m>0&&(c.orientation=m),c}}}}}),Ek=Ee({"node_modules/probe-image-size/lib/parsers_sync.js"(J,V){"use strict";V.exports={avif:gk(),bmp:yk(),gif:_k(),ico:bk(),jpeg:xk(),png:wk(),psd:Tk(),svg:Ak(),tiff:Mk(),webp:Sk()}}}),kk=Ee({"node_modules/probe-image-size/sync.js"(J,V){"use strict";var v=Ek();function x(E){for(var k=Object.keys(v),l=0;l0&&e.height>0?e:null}return null}V.exports=function(k){return x(k)},V.exports.parsers=v}}),Ck=Ee({"src/traces/image/helpers.js"(J){"use strict";var V=kk(),v=yd().IMAGE_URL_PREFIX,x=Nv().Buffer;J.getImageSize=function(E){var k=E.replace(v,""),l=new x(k,"base64");return V(l)}}}),Lk=Ee({"src/traces/image/calc.js"(J,V){"use strict";var v=Vr(),x=Zp(),E=mi(),k=uo(),l=Vr().maxRowLength,e=Ck().getImageSize;V.exports=function(o,s){var c,m;if(s._hasZ)c=s.z.length,m=l(s.z);else if(s._hasSource){var h=e(s.source);c=h.height,m=h.width}var p=k.getFromId(o,s.xaxis||"x"),g=k.getFromId(o,s.yaxis||"y"),i=p.d2c(s.x0)-s.dx/2,w=g.d2c(s.y0)-s.dy/2,S,M=[i,i+m*s.dx],C=[w,w+c*s.dy];if(p&&p.type==="log")for(S=0;S0;)z=c.c2p(C+B*u),B--;for(B=0;N===void 0&&B0;)R=m.c2p(_+B*A),B--;if(zH[0];if(X||K){var G=b+P/2,Y=N+j/2;ae+="transform:"+E(G+"px",Y+"px")+"scale("+(X?-1:1)+","+(K?-1:1)+")"+E(-G+"px",-Y+"px")+";"}}re.attr("style",ae);var q=new Promise(function($){if(w._hasZ)$();else if(w._hasSource)if(w._canvas&&w._canvas.el.width===T&&w._canvas.el.height===f&&w._canvas.source===w.source)$();else{var ee=document.createElement("canvas");ee.width=T,ee.height=f;var ne=ee.getContext("2d",{willReadFrequently:!0});w._image=w._image||new Image;var fe=w._image;fe.onload=function(){ne.drawImage(fe,0,0),w._canvas={el:ee,source:w.source},$()},fe.setAttribute("src",w.source)}}).then(function(){var $,ee;if(w._hasZ)ee=Q(function(ye,xe){var Ae=M[xe][ye];return x.isTypedArray(Ae)&&(Ae=Array.from(Ae)),Ae}),$=ee.toDataURL("image/png");else if(w._hasSource)if(S)$=w.source;else{var ne=w._canvas.el.getContext("2d",{willReadFrequently:!0}),fe=ne.getImageData(0,0,T,f).data;ee=Q(function(ye,xe){var Ae=4*(xe*T+ye);return[fe[Ae],fe[Ae+1],fe[Ae+2],fe[Ae+3]]}),$=ee.toDataURL("image/png")}re.attr({"xlink:href":$,height:j,width:P,x:b,y:N})});r._promises.push(q)})}}}),Dk=Ee({"src/traces/image/style.js"(J,V){"use strict";var v=Hn();V.exports=function(E){v.select(E).selectAll(".im image").style("opacity",function(k){return k[0].trace.opacity})}}}),Ik=Ee({"src/traces/image/hover.js"(J,V){"use strict";var v=$l(),x=Vr(),E=x.isArrayOrTypedArray,k=Zp();V.exports=function(e,t,a){var r=e.cd[0],n=r.trace,o=e.xa,s=e.ya;if(!(v.inbox(t-r.x0,t-(r.x0+r.w*n.dx),0)>0||v.inbox(a-r.y0,a-(r.y0+r.h*n.dy),0)>0)){var c=Math.floor((t-r.x0)/n.dx),m=Math.floor(Math.abs(a-r.y0)/n.dy),h;if(n._hasZ?h=r.z[m][c]:n._hasSource&&(h=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,m,1,1).data),!!h){var p=r.hi||n.hoverinfo,g;if(p){var i=p.split("+");i.indexOf("all")!==-1&&(i=["color"]),i.indexOf("color")!==-1&&(g=!0)}var w=k.colormodel[n.colormodel],S=w.colormodel||n.colormodel,M=S.length,C=n._scaler(h),_=w.suffix,T=[];(n.hovertemplate||g)&&(T.push("["+[C[0]+_[0],C[1]+_[1],C[2]+_[2]].join(", ")),M===4&&T.push(", "+C[3]+_[3]),T.push("]"),T=T.join(""),e.extraText=S.toUpperCase()+": "+T);var f;E(n.hovertext)&&E(n.hovertext[m])?f=n.hovertext[m][c]:E(n.text)&&E(n.text[m])&&(f=n.text[m][c]);var u=s.c2p(r.y0+(m+.5)*n.dy),A=r.x0+(c+.5)*n.dx,b=r.y0+(m+.5)*n.dy,z="["+h.slice(0,n.colormodel.length).join(", ")+"]";return[x.extendFlat(e,{index:[m,c],x0:o.c2p(r.x0+c*n.dx),x1:o.c2p(r.x0+(c+1)*n.dx),y0:u,y1:u,color:C,xVal:A,xLabelVal:A,yVal:b,yLabelVal:b,zLabelVal:z,text:f,hovertemplateLabels:{zLabel:z,colorLabel:T,"color[0]Label":C[0]+_[0],"color[1]Label":C[1]+_[1],"color[2]Label":C[2]+_[2],"color[3]Label":C[3]+_[3]}})]}}}}}),Rk=Ee({"src/traces/image/event_data.js"(J,V){"use strict";V.exports=function(x,E){return"xVal"in E&&(x.x=E.xVal),"yVal"in E&&(x.y=E.yVal),E.xa&&(x.xaxis=E.xa),E.ya&&(x.yaxis=E.ya),x.color=E.color,x.colormodel=E.trace.colormodel,x.z||(x.z=E.color),x}}}),Fk=Ee({"src/traces/image/index.js"(J,V){"use strict";V.exports={attributes:(f2(),ra(C1)).default,supplyDefaults:pE(),calc:Lk(),plot:Pk(),style:Dk(),hoverPoints:Ik(),eventData:Rk(),moduleType:"trace",name:"image",basePlotModule:Mu(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),zk=Ee({"lib/image.js"(J,V){"use strict";V.exports=Fk()}}),Vv=Ee({"src/traces/pie/attributes.js"(J,V){"use strict";var v=ia(),x=kl().attributes,E=Xs(),k=rs(),{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),a=vo().extendFlat,r=kc().pattern,n=E({editType:"plot",arrayOk:!0,colorEditType:"plot"});V.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:k.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,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:a({},v.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:t(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:t({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:a({},n,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:a({},n,{}),outsidetextfont:a({},n,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:a({},v.showlegend,{arrayOk:!0}),legend:a({},v.legend,{arrayOk:!0}),legendrank:a({},v.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:a({},n,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:x({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:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),Hv=Ee({"src/traces/pie/defaults.js"(J,V){"use strict";var v=mi(),x=Vr(),E=Vv(),k=kl().defaults,l=fh().handleText,e=Vr().coercePattern;function t(n,o){var s=x.isArrayOrTypedArray(n),c=x.isArrayOrTypedArray(o),m=Math.min(s?n.length:1/0,c?o.length:1/0);if(isFinite(m)||(m=0),m&&c){for(var h,p=0;p0){h=!0;break}}h||(m=0)}return{hasLabels:s,hasValues:c,len:m}}function a(n,o,s,c,m){var h=c("marker.line.width");h&&c("marker.line.color",m?void 0:s.paper_bgcolor);var p=c("marker.colors");e(c,"marker.pattern",p),n.marker&&!o.marker.pattern.fgcolor&&(o.marker.pattern.fgcolor=n.marker.colors),o.marker.pattern.bgcolor||(o.marker.pattern.bgcolor=s.paper_bgcolor)}function r(n,o,s,c){function m(b,z){return x.coerce(n,o,E,b,z)}var h=m("labels"),p=m("values"),g=t(h,p),i=g.len;if(o._hasLabels=g.hasLabels,o._hasValues=g.hasValues,!o._hasLabels&&o._hasValues&&(m("label0"),m("dlabel")),!i){o.visible=!1;return}o._length=i,a(n,o,c,m,!0),m("scalegroup");var w=m("text"),S=m("texttemplate");m("texttemplatefallback");var M;if(S||(M=m("textinfo",x.isArrayOrTypedArray(w)?"text+percent":"percent")),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),S||M&&M!=="none"){var C=m("textposition");l(n,o,c,m,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(C)||C==="auto",T=_||C==="outside";T&&m("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&m("insidetextorientation")}else M==="none"&&m("textposition","none");k(o,c,m);var f=m("hole"),u=m("title.text");if(u){var A=m("title.position",f?"middle center":"top center");!f&&A==="middle center"&&(o.title.position="top center"),x.coerceFont(m,"title.font",c.font)}m("sort"),m("direction"),m("rotation"),m("pull")}V.exports={handleLabelsAndValues:t,handleMarkerDefaults:a,supplyDefaults:r}}}),G1=Ee({"src/traces/pie/layout_attributes.js"(J,V){"use strict";V.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Bk=Ee({"src/traces/pie/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=G1();V.exports=function(k,l){function e(t,a){return v.coerce(k,l,x,t,a)}e("hiddenlabels"),e("piecolorway",l.colorway),e("extendpiecolors")}}}),e0=Ee({"src/traces/pie/calc.js"(J,V){"use strict";var v=mi(),x=Qa(),E={};function k(a,r){var n=[],o=a._fullLayout,s=o.hiddenlabels||[],c=r.labels,m=r.marker.colors||[],h=r.values,p=r._length,g=r._hasValues&&p,i,w;if(r.dlabel)for(c=new Array(p),i=0;i=0});var b=r.type==="funnelarea"?_:r.sort;return b&&n.sort(function(z,I){return I.v-z.v}),n[0]&&(n[0].vTotal=C),n}function l(a){return function(n,o){if(!n||!x.isValid(n))return!1;let s=x.rgbaString(n);return a[o]||(a[o]=s),s}}function e(a,r){var n=(r||{}).type;n||(n="pie");var o=a._fullLayout,s=a.calcdata,c=o[n+"colorway"],m=o["_"+n+"colormap"];o["extend"+n+"colors"]&&(c=t(c,E));for(var h=0,p=0;p0&&(Fe+=mt*se.pxmid[0],We+=mt*se.pxmid[1])}se.cxFinal=Fe,se.cyFinal=We;function Tt(Ot,vt,ht,Re){var Be=Re*(vt[0]-Ot[0]),He=Re*(vt[1]-Ot[1]);return"a"+Re*fe.r+","+Re*fe.r+" 0 "+se.largeArc+(ht?" 1 ":" 0 ")+Be+","+He}var At=ye.hole;if(se.v===fe.vTotal){var Kt="M"+(Fe+se.px0[0])+","+(We+se.px0[1])+Tt(se.px0,se.pxmid,!0,1)+Tt(se.pxmid,se.px0,!0,1)+"Z";At?gt.attr("d","M"+(Fe+At*se.px0[0])+","+(We+At*se.px0[1])+Tt(se.px0,se.pxmid,!1,At)+Tt(se.pxmid,se.px0,!1,At)+"Z"+Kt):gt.attr("d",Kt)}else{var nr=Tt(se.px0,se.px1,!0,1);if(At){var _r=1-At;gt.attr("d","M"+(Fe+At*se.px1[0])+","+(We+At*se.px1[1])+Tt(se.px1,se.px0,!1,At)+"l"+_r*se.px0[0]+","+_r*se.px0[1]+nr+"Z")}else gt.attr("d","M"+Fe+","+We+"l"+se.px0[0]+","+se.px0[1]+nr+"Z")}oe(X,se,fe);var Zt=m.castOption(ye.textposition,se.pts),sr=Ge.selectAll("g.slicetext").data(se.text&&Zt!=="none"?[0]:[]);sr.enter().append("g").classed("slicetext",!0),sr.exit().remove(),sr.each(function(){var Ot=e.ensureSingle(v.select(this),"text","",function(Je){Je.attr("data-notex",1)}),vt=e.ensureUniformFontSize(X,Zt==="outside"?S(ye,se,Y.font):M(ye,se,Y.font));Ot.text(se.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,vt).call(r.convertToTspans,X);var ht=l.bBox(Ot.node()),Re;if(Zt==="outside")Re=N(ht,se);else if(Re=_(ht,se,fe),Zt==="auto"&&Re.scale<1){var Be=e.ensureUniformFontSize(X,ye.outsidetextfont);Ot.call(l.font,Be),ht=l.bBox(Ot.node()),Re=N(ht,se)}var He=Re.textPosAngle,$e=He===void 0?se.pxmid:ae(fe.r,He);if(Re.targetX=Fe+$e[0]*Re.rCenter+(Re.x||0),Re.targetY=We+$e[1]*Re.rCenter+(Re.y||0),H(Re,ht),Re.outside){var Ze=Re.targetY;se.yLabelMin=Ze-ht.height/2,se.yLabelMid=Ze,se.yLabelMax=Ze+ht.height/2,se.labelExtraX=0,se.labelExtraY=0,Me=!0}Re.fontSize=vt.size,o(ye.type,Re,Y),ee[Te].transform=Re,e.setTransormAndDisplay(Ot,Re)})});var Ie=v.select(this).selectAll("g.titletext").data(ye.title.text?[0]:[]);if(Ie.enter().append("g").classed("titletext",!0),Ie.exit().remove(),Ie.each(function(){var se=e.ensureSingle(v.select(this),"text","",function(We){We.attr("data-notex",1)}),Te=ye.title.text;ye._meta&&(Te=e.templateString(Te,ye._meta)),se.text(Te).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,ye.title.font).call(r.convertToTspans,X);var Fe;ye.title.position==="middle center"?Fe=R(fe):Fe=B(fe,q),se.attr("transform",a(Fe.x,Fe.y)+t(Math.min(1,Fe.scale))+a(Fe.tx,Fe.ty))}),Me&&U(Ae,ye),i(xe,ye),Me&&ye.automargin){var Ue=l.bBox(ne.node()),qe=ye.domain,ke=q.w*(qe.x[1]-qe.x[0]),ge=q.h*(qe.y[1]-qe.y[0]),ue=(.5*ke-fe.r)/q.w,ve=(.5*ge-fe.r)/q.h;x.autoMargin(X,"pie."+ye.uid+".automargin",{xl:qe.x[0]-ue,xr:qe.x[1]+ue,yb:qe.y[0]-ve,yt:qe.y[1]+ve,l:Math.max(fe.cx-fe.r-Ue.left,0),r:Math.max(Ue.right-(fe.cx+fe.r),0),b:Math.max(Ue.bottom-(fe.cy+fe.r),0),t:Math.max(fe.cy-fe.r-Ue.top,0),pad:5})}})});setTimeout(function(){$.selectAll("tspan").each(function(){var ee=v.select(this);ee.attr("dy")&&ee.attr("dy",ee.attr("dy"))})},0)}function i(X,K){X.each(function(G){var Y=v.select(this);if(!G.labelExtraX&&!G.labelExtraY){Y.select("path.textline").remove();return}var q=Y.select("g.slicetext text");G.transform.targetX+=G.labelExtraX,G.transform.targetY+=G.labelExtraY,e.setTransormAndDisplay(q,G.transform);var $=G.cxFinal+G.pxmid[0],ee=G.cyFinal+G.pxmid[1],ne="M"+$+","+ee,fe=(G.yLabelMax-G.yLabelMin)*(G.pxmid[0]<0?-1:1)/4;if(G.labelExtraX){var ye=G.labelExtraX*G.pxmid[1]/G.pxmid[0],xe=G.yLabelMid+G.labelExtraY-(G.cyFinal+G.pxmid[1]);Math.abs(ye)>Math.abs(xe)?ne+="l"+xe*G.pxmid[0]/G.pxmid[1]+","+xe+"H"+($+G.labelExtraX+fe):ne+="l"+G.labelExtraX+","+ye+"v"+(xe-ye)+"h"+fe}else ne+="V"+(G.yLabelMid+G.labelExtraY)+"h"+fe;e.ensureSingle(Y,"path","textline").call(k.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:ne,fill:"none"})})}function w(X,K,G){var Y=G[0],q=Y.cx,$=Y.cy,ee=Y.trace,ne=ee.type==="funnelarea";"_hasHoverLabel"in ee||(ee._hasHoverLabel=!1),"_hasHoverEvent"in ee||(ee._hasHoverEvent=!1),X.on("mouseover",function(fe){var ye=K._fullLayout,xe=K._fullData[ee.index];if(!(K._dragging||ye.hovermode===!1)){var Ae=xe.hoverinfo;if(Array.isArray(Ae)&&(Ae=E.castHoverinfo({hoverinfo:[m.castOption(Ae,fe.pts)],_module:ee._module},ye,0)),Ae==="all"&&(Ae="label+text+value+percent+name"),xe.hovertemplate||Ae!=="none"&&Ae!=="skip"&&Ae){var Me=fe.rInscribed||0,Ie=q+fe.pxmid[0]*(1-Me),Ue=$+fe.pxmid[1]*(1-Me),qe=ye.separators,ke=[];if(Ae&&Ae.indexOf("label")!==-1&&ke.push(fe.label),fe.text=m.castOption(xe.hovertext||xe.text,fe.pts),Ae&&Ae.indexOf("text")!==-1){var ge=fe.text;e.isValidTextValue(ge)&&ke.push(ge)}fe.value=fe.v,fe.valueLabel=m.formatPieValue(fe.v,qe),Ae&&Ae.indexOf("value")!==-1&&ke.push(fe.valueLabel),fe.percent=fe.v/Y.vTotal,fe.percentLabel=m.formatPiePercent(fe.percent,qe),Ae&&Ae.indexOf("percent")!==-1&&ke.push(fe.percentLabel);var ue=xe.hoverlabel,ve=ue.font,se=[];E.loneHover({trace:ee,x0:Ie-Me*Y.r,x1:Ie+Me*Y.r,y:Ue,_x0:ne?q+fe.TL[0]:Ie-Me*Y.r,_x1:ne?q+fe.TR[0]:Ie+Me*Y.r,_y0:ne?$+fe.TL[1]:Ue-Me*Y.r,_y1:ne?$+fe.BL[1]:Ue+Me*Y.r,text:ke.join("
"),name:xe.hovertemplate||Ae.indexOf("name")!==-1?xe.name:void 0,idealAlign:fe.pxmid[0]<0?"left":"right",color:m.castOption(ue.bgcolor,fe.pts)||fe.color,borderColor:m.castOption(ue.bordercolor,fe.pts),fontFamily:m.castOption(ve.family,fe.pts),fontSize:m.castOption(ve.size,fe.pts),fontColor:m.castOption(ve.color,fe.pts),nameLength:m.castOption(ue.namelength,fe.pts),textAlign:m.castOption(ue.align,fe.pts),hovertemplate:m.castOption(xe.hovertemplate,fe.pts),hovertemplateLabels:fe,eventData:[h(fe,xe)]},{container:ye._hoverlayer.node(),outerContainer:ye._paper.node(),gd:K,inOut_bbox:se}),fe.bbox=se[0],ee._hasHoverLabel=!0}ee._hasHoverEvent=!0,K.emit("plotly_hover",{points:[h(fe,xe)],event:v.event})}}),X.on("mouseout",function(fe){var ye=K._fullLayout,xe=K._fullData[ee.index],Ae=v.select(this).datum();ee._hasHoverEvent&&(fe.originalEvent=v.event,K.emit("plotly_unhover",{points:[h(Ae,xe)],event:v.event}),ee._hasHoverEvent=!1),ee._hasHoverLabel&&(E.loneUnhover(ye._hoverlayer.node()),ee._hasHoverLabel=!1)}),X.on("click",function(fe){var ye=K._fullLayout,xe=K._fullData[ee.index];K._dragging||ye.hovermode===!1||(K._hoverdata=[h(fe,xe)],E.click(K,v.event))})}function S(X,K,G){var Y=m.castOption(X.outsidetextfont.color,K.pts)||m.castOption(X.textfont.color,K.pts)||G.color,q=m.castOption(X.outsidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||G.family,$=m.castOption(X.outsidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||G.size,ee=m.castOption(X.outsidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||G.weight,ne=m.castOption(X.outsidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||G.style,fe=m.castOption(X.outsidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||G.variant,ye=m.castOption(X.outsidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||G.textcase,xe=m.castOption(X.outsidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||G.lineposition,Ae=m.castOption(X.outsidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||G.shadow;return{color:Y,family:q,size:$,weight:ee,style:ne,variant:fe,textcase:ye,lineposition:xe,shadow:Ae}}function M(X,K,G){var Y=m.castOption(X.insidetextfont.color,K.pts);!Y&&X._input.textfont&&(Y=m.castOption(X._input.textfont.color,K.pts));var q=m.castOption(X.insidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||G.family,$=m.castOption(X.insidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||G.size,ee=m.castOption(X.insidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||G.weight,ne=m.castOption(X.insidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||G.style,fe=m.castOption(X.insidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||G.variant,ye=m.castOption(X.insidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||G.textcase,xe=m.castOption(X.insidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||G.lineposition,Ae=m.castOption(X.insidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||G.shadow;return{color:Y||k.contrast(K.color),family:q,size:$,weight:ee,style:ne,variant:fe,textcase:ye,lineposition:xe,shadow:Ae}}function C(X,K){for(var G,Y,q=0;q=-4;ue-=2)ge(Math.PI*ue,"tan");for(ue=4;ue>=-4;ue-=2)ge(Math.PI*(ue+1),"tan")}if(Ae||Ie){for(ue=4;ue>=-4;ue-=2)ge(Math.PI*(ue+1.5),"rad");for(ue=4;ue>=-4;ue-=2)ge(Math.PI*(ue+.5),"rad")}}if(ne||Ue||Ae){var ve=Math.sqrt(X.width*X.width+X.height*X.height);if(ke={scale:q*Y*2/ve,rCenter:1-q,rotate:0},ke.textPosAngle=(K.startangle+K.stopangle)/2,ke.scale>=1)return ke;qe.push(ke)}(Ue||Ie)&&(ke=f(X,Y,ee,fe,ye),ke.textPosAngle=(K.startangle+K.stopangle)/2,qe.push(ke)),(Ue||Me)&&(ke=u(X,Y,ee,fe,ye),ke.textPosAngle=(K.startangle+K.stopangle)/2,qe.push(ke));for(var se=0,Te=0,Fe=0;Fe=1)break}return qe[se]}function T(X,K){var G=X.startangle,Y=X.stopangle;return G>K&&K>Y||G0?1:-1)/2,y:$/(1+G*G/(Y*Y)),outside:!0}}function R(X){var K=Math.sqrt(X.titleBox.width*X.titleBox.width+X.titleBox.height*X.titleBox.height);return{x:X.cx,y:X.cy,scale:X.trace.hole*X.r*2/K,tx:0,ty:-X.titleBox.height/2+X.trace.title.font.size}}function B(X,K){var G=1,Y=1,q,$=X.trace,ee={x:X.cx,y:X.cy},ne={tx:0,ty:0};ne.ty+=$.title.font.size,q=j($),$.title.position.indexOf("top")!==-1?(ee.y-=(1+q)*X.r,ne.ty-=X.titleBox.height):$.title.position.indexOf("bottom")!==-1&&(ee.y+=(1+q)*X.r);var fe=F(X.r,X.trace.aspectratio),ye=K.w*($.domain.x[1]-$.domain.x[0])/2;return $.title.position.indexOf("left")!==-1?(ye=ye+fe,ee.x-=(1+q)*fe,ne.tx+=X.titleBox.width/2):$.title.position.indexOf("center")!==-1?ye*=2:$.title.position.indexOf("right")!==-1&&(ye=ye+fe,ee.x+=(1+q)*fe,ne.tx-=X.titleBox.width/2),G=ye/X.titleBox.width,Y=P(X,K)/X.titleBox.height,{x:ee.x,y:ee.y,scale:Math.min(G,Y),tx:ne.tx,ty:ne.ty}}function F(X,K){return X/(K===void 0?1:K)}function P(X,K){var G=X.trace,Y=K.h*(G.domain.y[1]-G.domain.y[0]);return Math.min(X.titleBox.height,Y/2)}function j(X){var K=X.pull;if(!K)return 0;var G;if(e.isArrayOrTypedArray(K))for(K=0,G=0;GK&&(K=X.pull[G]);return K}function U(X,K){var G,Y,q,$,ee,ne,fe,ye,xe,Ae,Me,Ie,Ue;function qe(ve,se){return ve.pxmid[1]-se.pxmid[1]}function ke(ve,se){return se.pxmid[1]-ve.pxmid[1]}function ge(ve,se){se||(se={});var Te=se.labelExtraY+(Y?se.yLabelMax:se.yLabelMin),Fe=Y?ve.yLabelMin:ve.yLabelMax,We=Y?ve.yLabelMax:ve.yLabelMin,Ge=ve.cyFinal+ee(ve.px0[1],ve.px1[1]),gt=Te-Fe,mt,Tt,At,Kt,nr,_r;if(gt*fe>0&&(ve.labelExtraY=gt),!!e.isArrayOrTypedArray(K.pull))for(Tt=0;Tt=(m.castOption(K.pull,At.pts)||0))&&((ve.pxmid[1]-At.pxmid[1])*fe>0?(Kt=At.cyFinal+ee(At.px0[1],At.px1[1]),gt=Kt-Fe-ve.labelExtraY,gt*fe>0&&(ve.labelExtraY+=gt)):(We+ve.labelExtraY-Ge)*fe>0&&(mt=3*ne*Math.abs(Tt-Ae.indexOf(ve)),nr=At.cxFinal+$(At.px0[0],At.px1[0]),_r=nr+mt-(ve.cxFinal+ve.pxmid[0])-ve.labelExtraX,_r*ne>0&&(ve.labelExtraX+=_r)))}for(Y=0;Y<2;Y++)for(q=Y?qe:ke,ee=Y?Math.max:Math.min,fe=Y?1:-1,G=0;G<2;G++){for($=G?Math.max:Math.min,ne=G?1:-1,ye=X[Y][G],ye.sort(q),xe=X[1-Y][G],Ae=xe.concat(ye),Ie=[],Me=0;Me1?(ye=G.r,xe=ye/q.aspectratio):(xe=G.r,ye=xe*q.aspectratio),ye*=(1+q.baseratio)/2,fe=ye*xe}ee=Math.min(ee,fe/G.vTotal)}for(Y=0;YK.vTotal/2?1:0,ye.halfangle=Math.PI*Math.min(ye.v/K.vTotal,.5),ye.ring=1-Y.hole,ye.rInscribed=I(ye,K))}function ae(X,K){return[X*Math.sin(K),-X*Math.cos(K)]}function oe(X,K,G){var Y=X._fullLayout,q=G.trace,$=q.texttemplate,ee=q.textinfo;if(!$&&ee&&ee!=="none"){var ne=ee.split("+"),fe=function(se){return ne.indexOf(se)!==-1},ye=fe("label"),xe=fe("text"),Ae=fe("value"),Me=fe("percent"),Ie=Y.separators,Ue;if(Ue=ye?[K.label]:[],xe){var qe=m.getFirstFilled(q.text,K.pts);p(qe)&&Ue.push(qe)}Ae&&Ue.push(m.formatPieValue(K.v,Ie)),Me&&Ue.push(m.formatPiePercent(K.v/G.vTotal,Ie)),K.text=Ue.join("
")}function ke(se){return{label:se.label,value:se.v,valueLabel:m.formatPieValue(se.v,Y.separators),percent:se.v/G.vTotal,percentLabel:m.formatPiePercent(se.v/G.vTotal,Y.separators),color:se.color,text:se.text,customdata:e.castOption(q,se.i,"customdata")}}if($){var ge=e.castOption(q,K.i,"texttemplate");if(!ge)K.text="";else{var ue=ke(K),ve=m.getFirstFilled(q.text,K.pts);(p(ve)||ve==="")&&(ue.text=ve),K.text=e.texttemplateString({data:[ue,q._meta],fallback:q.texttemplatefallback,labels:ue,locale:X._fullLayout._d3locale,template:ge})}}}function H(X,K){var G=X.rotate*Math.PI/180,Y=Math.cos(G),q=Math.sin(G),$=(K.left+K.right)/2,ee=(K.top+K.bottom)/2;X.textX=$*Y-ee*q,X.textY=$*q+ee*Y,X.noCenter=!0}V.exports={plot:g,formatSliceLabel:oe,transformInsideText:_,determineInsideTextFont:M,positionTitleOutside:B,prerenderTitles:C,layoutAreas:Z,attachFxHandlers:w,computeTransform:H}}}),Ok=Ee({"src/traces/pie/style.js"(J,V){"use strict";var v=Hn(),x=jp(),E=Ef().resizeText;V.exports=function(l){var e=l._fullLayout._pielayer.selectAll(".trace");E(l,e,"pie"),e.each(function(t){var a=t[0],r=a.trace,n=v.select(this);n.style({opacity:r.opacity}),n.selectAll("path.surface").each(function(o){v.select(this).call(x,o,r,l)})})}}}),jk=Ee({"src/traces/pie/base_plot.js"(J){"use strict";var V=vl();J.name="pie",J.plot=function(v,x,E,k){V.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){V.cleanBasePlot(J.name,v,x,E,k)}}}),Uk=Ee({"src/traces/pie/index.js"(J,V){"use strict";V.exports={attributes:Vv(),supplyDefaults:Hv().supplyDefaults,supplyLayoutDefaults:Bk(),layoutAttributes:G1(),calc:e0().calc,crossTraceCalc:e0().crossTraceCalc,plot:W1().plot,style:Ok(),styleOne:jp(),moduleType:"trace",name:"pie",basePlotModule:jk(),categories:["pie-like","pie","showLegend"],meta:{}}}}),qk=Ee({"lib/pie.js"(J,V){"use strict";V.exports=Uk()}}),Vk=Ee({"src/traces/sunburst/base_plot.js"(J){"use strict";var V=vl();J.name="sunburst",J.plot=function(v,x,E,k){V.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){V.cleanBasePlot(J.name,v,x,E,k)}}}),z2=Ee({"src/traces/sunburst/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),fm=Ee({"src/traces/sunburst/attributes.js"(J,V){"use strict";var v=ia(),{hovertemplateAttrs:x,texttemplateAttrs:E,templatefallbackAttrs:k}=Cs(),l=$s(),e=kl().attributes,t=Vv(),a=z2(),r=vo().extendFlat,n=kc().pattern;V.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},t.marker.line.color,{dflt:null}),width:r({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:n,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:E({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:k({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r({},v.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:x({},{keys:a.eventDataKeys}),hovertemplatefallback:k(),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:r({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),B2=Ee({"src/traces/sunburst/layout_attributes.js"(J,V){"use strict";V.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),Hk=Ee({"src/traces/sunburst/defaults.js"(J,V){"use strict";var v=Vr(),x=fm(),E=kl().defaults,k=fh().handleText,l=Hv().handleMarkerDefaults,e=pl(),t=e.hasColorscale,a=e.handleDefaults;V.exports=function(n,o,s,c){function m(M,C){return v.coerce(n,o,x,M,C)}var h=m("labels"),p=m("parents");if(!h||!h.length||!p||!p.length){o.visible=!1;return}var g=m("values");g&&g.length?m("branchvalues"):m("count"),m("level"),m("maxdepth"),l(n,o,c,m);var i=o._hasColorscale=t(n,"marker","colors")||(n.marker||{}).coloraxis;i&&a(n,o,c,m,{prefix:"marker.",cLetter:"c"}),m("leaf.opacity",i?1:.7);var w=m("text");m("texttemplate"),m("texttemplatefallback"),o.texttemplate||m("textinfo",v.isArrayOrTypedArray(w)?"text+label":"label"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var S="auto";k(n,o,c,m,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),m("insidetextorientation"),m("sort"),m("rotation"),m("root.color"),E(o,c,m),o._length=null}}}),Gk=Ee({"src/traces/sunburst/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=B2();V.exports=function(k,l){function e(t,a){return v.coerce(k,l,x,t,a)}e("sunburstcolorway",l.colorway),e("extendsunburstcolors")}}}),hm=Ee({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J):(v=v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";function x(Re,Be){return Re.parent===Be.parent?1:2}function E(Re){return Re.reduce(k,0)/Re.length}function k(Re,Be){return Re+Be.x}function l(Re){return 1+Re.reduce(e,0)}function e(Re,Be){return Math.max(Re,Be.y)}function t(Re){for(var Be;Be=Re.children;)Re=Be[0];return Re}function a(Re){for(var Be;Be=Re.children;)Re=Be[Be.length-1];return Re}function r(){var Re=x,Be=1,He=1,$e=!1;function Ze(Je){var Mt,dt=0;Je.eachAfter(function(Wt){var Sr=Wt.children;Sr?(Wt.x=E(Sr),Wt.y=l(Sr)):(Wt.x=Mt?dt+=Re(Wt,Mt):0,Wt.y=0,Mt=Wt)});var Dt=t(Je),Ct=a(Je),Vt=Dt.x-Re(Dt,Ct)/2,Ht=Ct.x+Re(Ct,Dt)/2;return Je.eachAfter($e?function(Wt){Wt.x=(Wt.x-Je.x)*Be,Wt.y=(Je.y-Wt.y)*He}:function(Wt){Wt.x=(Wt.x-Vt)/(Ht-Vt)*Be,Wt.y=(1-(Je.y?Wt.y/Je.y:1))*He})}return Ze.separation=function(Je){return arguments.length?(Re=Je,Ze):Re},Ze.size=function(Je){return arguments.length?($e=!1,Be=+Je[0],He=+Je[1],Ze):$e?null:[Be,He]},Ze.nodeSize=function(Je){return arguments.length?($e=!0,Be=+Je[0],He=+Je[1],Ze):$e?[Be,He]:null},Ze}function n(Re){var Be=0,He=Re.children,$e=He&&He.length;if(!$e)Be=1;else for(;--$e>=0;)Be+=He[$e].value;Re.value=Be}function o(){return this.eachAfter(n)}function s(Re){var Be=this,He,$e=[Be],Ze,Je,Mt;do for(He=$e.reverse(),$e=[];Be=He.pop();)if(Re(Be),Ze=Be.children,Ze)for(Je=0,Mt=Ze.length;Je=0;--Ze)He.push($e[Ze]);return this}function m(Re){for(var Be=this,He=[Be],$e=[],Ze,Je,Mt;Be=He.pop();)if($e.push(Be),Ze=Be.children,Ze)for(Je=0,Mt=Ze.length;Je=0;)He+=$e[Ze].value;Be.value=He})}function p(Re){return this.eachBefore(function(Be){Be.children&&Be.children.sort(Re)})}function g(Re){for(var Be=this,He=i(Be,Re),$e=[Be];Be!==He;)Be=Be.parent,$e.push(Be);for(var Ze=$e.length;Re!==He;)$e.splice(Ze,0,Re),Re=Re.parent;return $e}function i(Re,Be){if(Re===Be)return Re;var He=Re.ancestors(),$e=Be.ancestors(),Ze=null;for(Re=He.pop(),Be=$e.pop();Re===Be;)Ze=Re,Re=He.pop(),Be=$e.pop();return Ze}function w(){for(var Re=this,Be=[Re];Re=Re.parent;)Be.push(Re);return Be}function S(){var Re=[];return this.each(function(Be){Re.push(Be)}),Re}function M(){var Re=[];return this.eachBefore(function(Be){Be.children||Re.push(Be)}),Re}function C(){var Re=this,Be=[];return Re.each(function(He){He!==Re&&Be.push({source:He.parent,target:He})}),Be}function _(Re,Be){var He=new b(Re),$e=+Re.value&&(He.value=Re.value),Ze,Je=[He],Mt,dt,Dt,Ct;for(Be==null&&(Be=f);Ze=Je.pop();)if($e&&(Ze.value=+Ze.data.value),(dt=Be(Ze.data))&&(Ct=dt.length))for(Ze.children=new Array(Ct),Dt=Ct-1;Dt>=0;--Dt)Je.push(Mt=Ze.children[Dt]=new b(dt[Dt])),Mt.parent=Ze,Mt.depth=Ze.depth+1;return He.eachBefore(A)}function T(){return _(this).eachBefore(u)}function f(Re){return Re.children}function u(Re){Re.data=Re.data.data}function A(Re){var Be=0;do Re.height=Be;while((Re=Re.parent)&&Re.height<++Be)}function b(Re){this.data=Re,this.depth=this.height=0,this.parent=null}b.prototype=_.prototype={constructor:b,count:o,each:s,eachAfter:m,eachBefore:c,sum:h,sort:p,path:g,ancestors:w,descendants:S,leaves:M,links:C,copy:T};var z=Array.prototype.slice;function I(Re){for(var Be=Re.length,He,$e;Be;)$e=Math.random()*Be--|0,He=Re[Be],Re[Be]=Re[$e],Re[$e]=He;return Re}function N(Re){for(var Be=0,He=(Re=I(z.call(Re))).length,$e=[],Ze,Je;Be0&&He*He>$e*$e+Ze*Ze}function P(Re,Be){for(var He=0;HeDt?(Ze=(Ct+Dt-Je)/(2*Ct),dt=Math.sqrt(Math.max(0,Dt/Ct-Ze*Ze)),He.x=Re.x-Ze*$e-dt*Mt,He.y=Re.y-Ze*Mt+dt*$e):(Ze=(Ct+Je-Dt)/(2*Ct),dt=Math.sqrt(Math.max(0,Je/Ct-Ze*Ze)),He.x=Be.x+Ze*$e-dt*Mt,He.y=Be.y+Ze*Mt+dt*$e)):(He.x=Be.x+He.r,He.y=Be.y)}function ae(Re,Be){var He=Re.r+Be.r-1e-6,$e=Be.x-Re.x,Ze=Be.y-Re.y;return He>0&&He*He>$e*$e+Ze*Ze}function oe(Re){var Be=Re._,He=Re.next._,$e=Be.r+He.r,Ze=(Be.x*He.r+He.x*Be.r)/$e,Je=(Be.y*He.r+He.y*Be.r)/$e;return Ze*Ze+Je*Je}function H(Re){this._=Re,this.next=null,this.previous=null}function X(Re){if(!(Ze=Re.length))return 0;var Be,He,$e,Ze,Je,Mt,dt,Dt,Ct,Vt,Ht;if(Be=Re[0],Be.x=0,Be.y=0,!(Ze>1))return Be.r;if(He=Re[1],Be.x=-He.r,He.x=Be.r,He.y=0,!(Ze>2))return Be.r+He.r;re(He,Be,$e=Re[2]),Be=new H(Be),He=new H(He),$e=new H($e),Be.next=$e.previous=He,He.next=Be.previous=$e,$e.next=He.previous=Be;e:for(dt=3;dt0)throw new Error("cycle");return dt}return He.id=function($e){return arguments.length?(Re=Y($e),He):Re},He.parentId=function($e){return arguments.length?(Be=Y($e),He):Be},He}function se(Re,Be){return Re.parent===Be.parent?1:2}function Te(Re){var Be=Re.children;return Be?Be[0]:Re.t}function Fe(Re){var Be=Re.children;return Be?Be[Be.length-1]:Re.t}function We(Re,Be,He){var $e=He/(Be.i-Re.i);Be.c-=$e,Be.s+=He,Re.c+=$e,Be.z+=He,Be.m+=He}function Ge(Re){for(var Be=0,He=0,$e=Re.children,Ze=$e.length,Je;--Ze>=0;)Je=$e[Ze],Je.z+=Be,Je.m+=Be,Be+=Je.s+(He+=Je.c)}function gt(Re,Be,He){return Re.a.parent===Be.parent?Re.a:He}function mt(Re,Be){this._=Re,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Be}mt.prototype=Object.create(b.prototype);function Tt(Re){for(var Be=new mt(Re,0),He,$e=[Be],Ze,Je,Mt,dt;He=$e.pop();)if(Je=He._.children)for(He.children=new Array(dt=Je.length),Mt=dt-1;Mt>=0;--Mt)$e.push(Ze=He.children[Mt]=new mt(Je[Mt],Mt)),Ze.parent=He;return(Be.parent=new mt(null,0)).children=[Be],Be}function At(){var Re=se,Be=1,He=1,$e=null;function Ze(Ct){var Vt=Tt(Ct);if(Vt.eachAfter(Je),Vt.parent.m=-Vt.z,Vt.eachBefore(Mt),$e)Ct.eachBefore(Dt);else{var Ht=Ct,Wt=Ct,Sr=Ct;Ct.eachBefore(function(cr){cr.xWt.x&&(Wt=cr),cr.depth>Sr.depth&&(Sr=cr)});var on=Ht===Wt?1:Re(Ht,Wt)/2,$t=on-Ht.x,It=Be/(Wt.x+on+$t),ir=He/(Sr.depth||1);Ct.eachBefore(function(cr){cr.x=(cr.x+$t)*It,cr.y=cr.depth*ir})}return Ct}function Je(Ct){var Vt=Ct.children,Ht=Ct.parent.children,Wt=Ct.i?Ht[Ct.i-1]:null;if(Vt){Ge(Ct);var Sr=(Vt[0].z+Vt[Vt.length-1].z)/2;Wt?(Ct.z=Wt.z+Re(Ct._,Wt._),Ct.m=Ct.z-Sr):Ct.z=Sr}else Wt&&(Ct.z=Wt.z+Re(Ct._,Wt._));Ct.parent.A=dt(Ct,Wt,Ct.parent.A||Ht[0])}function Mt(Ct){Ct._.x=Ct.z+Ct.parent.m,Ct.m+=Ct.parent.m}function dt(Ct,Vt,Ht){if(Vt){for(var Wt=Ct,Sr=Ct,on=Vt,$t=Wt.parent.children[0],It=Wt.m,ir=Sr.m,cr=on.m,fr=$t.m,Ir;on=Fe(on),Wt=Te(Wt),on&&Wt;)$t=Te($t),Sr=Fe(Sr),Sr.a=Ct,Ir=on.z+cr-Wt.z-It+Re(on._,Wt._),Ir>0&&(We(gt(on,Ct,Ht),Ct,Ir),It+=Ir,ir+=Ir),cr+=on.m,It+=Wt.m,fr+=$t.m,ir+=Sr.m;on&&!Fe(Sr)&&(Sr.t=on,Sr.m+=cr-ir),Wt&&!Te($t)&&($t.t=Wt,$t.m+=It-fr,Ht=Ct)}return Ht}function Dt(Ct){Ct.x*=Be,Ct.y=Ct.depth*He}return Ze.separation=function(Ct){return arguments.length?(Re=Ct,Ze):Re},Ze.size=function(Ct){return arguments.length?($e=!1,Be=+Ct[0],He=+Ct[1],Ze):$e?null:[Be,He]},Ze.nodeSize=function(Ct){return arguments.length?($e=!0,Be=+Ct[0],He=+Ct[1],Ze):$e?[Be,He]:null},Ze}function Kt(Re,Be,He,$e,Ze){for(var Je=Re.children,Mt,dt=-1,Dt=Je.length,Ct=Re.value&&(Ze-He)/Re.value;++dtcr&&(cr=Ct),nn=It*It*ln,fr=Math.max(cr/nn,nn/ir),fr>Ir){It-=Ct;break}Ir=fr}Mt.push(Dt={value:It,dice:Sr1?$e:1)},He}(nr);function sr(){var Re=Zt,Be=!1,He=1,$e=1,Ze=[0],Je=q,Mt=q,dt=q,Dt=q,Ct=q;function Vt(Wt){return Wt.x0=Wt.y0=0,Wt.x1=He,Wt.y1=$e,Wt.eachBefore(Ht),Ze=[0],Be&&Wt.eachBefore(Ae),Wt}function Ht(Wt){var Sr=Ze[Wt.depth],on=Wt.x0+Sr,$t=Wt.y0+Sr,It=Wt.x1-Sr,ir=Wt.y1-Sr;It=Wt-1){var cr=Je[Ht];cr.x0=on,cr.y0=$t,cr.x1=It,cr.y1=ir;return}for(var fr=Ct[Ht],Ir=Sr/2+fr,ln=Ht+1,nn=Wt-1;ln>>1;Ct[wn]ir-$t){var Aa=(on*jn+It*Un)/Sr;Vt(Ht,ln,Un,on,$t,Aa,ir),Vt(ln,Wt,jn,Aa,$t,It,ir)}else{var ua=($t*jn+ir*Un)/Sr;Vt(Ht,ln,Un,on,$t,It,ua),Vt(ln,Wt,jn,on,ua,It,ir)}}}function vt(Re,Be,He,$e,Ze){(Re.depth&1?Kt:Me)(Re,Be,He,$e,Ze)}var ht=function Re(Be){function He($e,Ze,Je,Mt,dt){if((Dt=$e._squarify)&&Dt.ratio===Be)for(var Dt,Ct,Vt,Ht,Wt=-1,Sr,on=Dt.length,$t=$e.value;++Wt1?$e:1)},He}(nr);v.cluster=r,v.hierarchy=_,v.pack=ne,v.packEnclose=N,v.packSiblings=K,v.partition=Ie,v.stratify=ve,v.tree=At,v.treemap=sr,v.treemapBinary=Ot,v.treemapDice=Me,v.treemapResquarify=ht,v.treemapSlice=Kt,v.treemapSliceDice=vt,v.treemapSquarify=Zt,Object.defineProperty(v,"__esModule",{value:!0})})}}),dm=Ee({"src/traces/sunburst/calc.js"(J){"use strict";var V=hm(),v=mi(),x=Vr(),E=pl().makeColorScaleFuncFromTrace,k=e0().makePullColorFn,l=e0().generateExtendedColors,e=pl().calc,t=Qi().ALMOST_EQUAL,a={},r={},n={};J.calc=function(s,c){var m=s._fullLayout,h=c.ids,p=x.isArrayOrTypedArray(h),g=c.labels,i=c.parents,w=c.values,S=x.isArrayOrTypedArray(w),M=[],C={},_={},T=function(K,G){C[K]?C[K].push(G):C[K]=[G],_[G]=1},f=function(K){return K||typeof K=="number"},u=function(K){return!S||v(w[K])&&w[K]>=0},A,b,z;p?(A=Math.min(h.length,i.length),b=function(K){return f(h[K])&&u(K)},z=function(K){return String(h[K])}):(A=Math.min(g.length,i.length),b=function(K){return f(g[K])&&u(K)},z=function(K){return String(g[K])}),S&&(A=Math.min(A,w.length));for(var I=0;I1){for(var j=x.randstr(),U=0;U>8&15|V>>4&240,V>>4&15|V&240,(V&15)<<4|V&15,1):v===8?vm(V>>24&255,V>>16&255,V>>8&255,(V&255)/255):v===4?vm(V>>12&15|V>>8&240,V>>8&15|V>>4&240,V>>4&15|V&240,((V&15)<<4|V&15)/255):null):(V=Y2.exec(J))?new Wc(V[1],V[2],V[3],1):(V=X2.exec(J))?new Wc(V[1]*255/100,V[2]*255/100,V[3]*255/100,1):(V=$2.exec(J))?vm(V[1],V[2],V[3],V[4]):(V=Z2.exec(J))?vm(V[1]*255/100,V[2]*255/100,V[3]*255/100,V[4]):(V=K2.exec(J))?V2(V[1],V[2]/100,V[3]/100,1):(V=J2.exec(J))?V2(V[1],V[2]/100,V[3]/100,V[4]):K1.hasOwnProperty(J)?j2(K1[J]):J==="transparent"?new Wc(NaN,NaN,NaN,0):null}function j2(J){return new Wc(J>>16&255,J>>8&255,J&255,1)}function vm(J,V,v,x){return x<=0&&(J=V=v=NaN),new Wc(J,V,v,x)}function X1(J){return J instanceof bd||(J=r0(J)),J?(J=J.rgb(),new Wc(J.r,J.g,J.b,J.opacity)):new Wc}function pm(J,V,v,x){return arguments.length===1?X1(J):new Wc(J,V,v,x??1)}function Wc(J,V,v,x){this.r=+J,this.g=+V,this.b=+v,this.opacity=+x}function U2(){return`#${ev(this.r)}${ev(this.g)}${ev(this.b)}`}function Xk(){return`#${ev(this.r)}${ev(this.g)}${ev(this.b)}${ev((isNaN(this.opacity)?1:this.opacity)*255)}`}function q2(){let J=mm(this.opacity);return`${J===1?"rgb(":"rgba("}${Qd(this.r)}, ${Qd(this.g)}, ${Qd(this.b)}${J===1?")":`, ${J})`}`}function mm(J){return isNaN(J)?1:Math.max(0,Math.min(1,J))}function Qd(J){return Math.max(0,Math.min(255,Math.round(J)||0))}function ev(J){return J=Qd(J),(J<16?"0":"")+J.toString(16)}function V2(J,V,v,x){return x<=0?J=V=v=NaN:v<=0||v>=1?J=V=NaN:V<=0&&(J=NaN),new xh(J,V,v,x)}function H2(J){if(J instanceof xh)return new xh(J.h,J.s,J.l,J.opacity);if(J instanceof bd||(J=r0(J)),!J)return new xh;if(J instanceof xh)return J;J=J.rgb();var V=J.r/255,v=J.g/255,x=J.b/255,E=Math.min(V,v,x),k=Math.max(V,v,x),l=NaN,e=k-E,t=(k+E)/2;return e?(V===k?l=(v-x)/e+(v0&&t<1?0:l,new xh(l,e,t,J.opacity)}function $1(J,V,v,x){return arguments.length===1?H2(J):new xh(J,V,v,x??1)}function xh(J,V,v,x){this.h=+J,this.s=+V,this.l=+v,this.opacity=+x}function G2(J){return J=(J||0)%360,J<0?J+360:J}function gm(J){return Math.max(0,Math.min(1,J||0))}function Z1(J,V,v){return(J<60?V+(v-V)*J/60:J<180?v:J<240?V+(v-V)*(240-J)/60:V)*255}var xd,tv,rv,Wv,wh,W2,Y2,X2,$2,Z2,K2,J2,K1,J1=In({"node_modules/d3-color/src/color.js"(){Y1(),xd=.7,tv=1/xd,rv="\\s*([+-]?\\d+)\\s*",Wv="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wh="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",W2=/^#([0-9a-f]{3,8})$/,Y2=new RegExp(`^rgb\\(${rv},${rv},${rv}\\)$`),X2=new RegExp(`^rgb\\(${wh},${wh},${wh}\\)$`),$2=new RegExp(`^rgba\\(${rv},${rv},${rv},${Wv}\\)$`),Z2=new RegExp(`^rgba\\(${wh},${wh},${wh},${Wv}\\)$`),K2=new RegExp(`^hsl\\(${Wv},${wh},${wh}\\)$`),J2=new RegExp(`^hsla\\(${Wv},${wh},${wh},${Wv}\\)$`),K1={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},Gv(bd,r0,{copy(J){return Object.assign(new this.constructor,this,J)},displayable(){return this.rgb().displayable()},hex:N2,formatHex:N2,formatHex8:Wk,formatHsl:Yk,formatRgb:O2,toString:O2}),Gv(Wc,pm,t0(bd,{brighter(J){return J=J==null?tv:Math.pow(tv,J),new Wc(this.r*J,this.g*J,this.b*J,this.opacity)},darker(J){return J=J==null?xd:Math.pow(xd,J),new Wc(this.r*J,this.g*J,this.b*J,this.opacity)},rgb(){return this},clamp(){return new Wc(Qd(this.r),Qd(this.g),Qd(this.b),mm(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:U2,formatHex:U2,formatHex8:Xk,formatRgb:q2,toString:q2})),Gv(xh,$1,t0(bd,{brighter(J){return J=J==null?tv:Math.pow(tv,J),new xh(this.h,this.s,this.l*J,this.opacity)},darker(J){return J=J==null?xd:Math.pow(xd,J),new xh(this.h,this.s,this.l*J,this.opacity)},rgb(){var J=this.h%360+(this.h<0)*360,V=isNaN(J)||isNaN(this.s)?0:this.s,v=this.l,x=v+(v<.5?v:1-v)*V,E=2*v-x;return new Wc(Z1(J>=240?J-240:J+120,E,x),Z1(J,E,x),Z1(J<120?J+240:J-120,E,x),this.opacity)},clamp(){return new xh(G2(this.h),gm(this.s),gm(this.l),mm(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let J=mm(this.opacity);return`${J===1?"hsl(":"hsla("}${G2(this.h)}, ${gm(this.s)*100}%, ${gm(this.l)*100}%${J===1?")":`, ${J})`}`}}))}}),Q1,ey,Q2=In({"node_modules/d3-color/src/math.js"(){Q1=Math.PI/180,ey=180/Math.PI}});function e3(J){if(J instanceof Bh)return new Bh(J.l,J.a,J.b,J.opacity);if(J instanceof Kh)return t3(J);J instanceof Wc||(J=X1(J));var V=iy(J.r),v=iy(J.g),x=iy(J.b),E=ry((.2225045*V+.7168786*v+.0606169*x)/ly),k,l;return V===v&&v===x?k=l=E:(k=ry((.4360747*V+.3850649*v+.1430804*x)/sy),l=ry((.0139322*V+.0971045*v+.7141733*x)/uy)),new Bh(116*E-16,500*(k-E),200*(E-l),J.opacity)}function ty(J,V,v,x){return arguments.length===1?e3(J):new Bh(J,V,v,x??1)}function Bh(J,V,v,x){this.l=+J,this.a=+V,this.b=+v,this.opacity=+x}function ry(J){return J>r3?Math.pow(J,.3333333333333333):J/fy+cy}function ny(J){return J>nv?J*J*J:fy*(J-cy)}function ay(J){return 255*(J<=.0031308?12.92*J:1.055*Math.pow(J,.4166666666666667)-.055)}function iy(J){return(J/=255)<=.04045?J/12.92:Math.pow((J+.055)/1.055,2.4)}function $k(J){if(J instanceof Kh)return new Kh(J.h,J.c,J.l,J.opacity);if(J instanceof Bh||(J=e3(J)),J.a===0&&J.b===0)return new Kh(NaN,0=1?(v=1,V-1):Math.floor(v*V),E=J[x],k=J[x+1],l=x>0?J[x-1]:2*E-k,e=x()=>J}});function l3(J,V){return function(v){return J+v*V}}function Qk(J,V,v){return J=Math.pow(J,v),V=Math.pow(V,v)-J,v=1/v,function(x){return Math.pow(J+x*V,v)}}function bm(J,V){var v=V-J;return v?l3(J,v>180||v<-180?v-360*Math.round(v/360):v):i0(isNaN(J)?V:J)}function eC(J){return(J=+J)==1?Yc:function(V,v){return v-V?Qk(V,v,J):i0(isNaN(V)?v:V)}}function Yc(J,V){var v=V-J;return v?l3(J,v):i0(isNaN(J)?V:J)}var $v=In({"node_modules/d3-interpolate/src/color.js"(){s3()}});function u3(J){return function(V){var v=V.length,x=new Array(v),E=new Array(v),k=new Array(v),l,e;for(l=0;lv&&(k=V.slice(v,k),e[l]?e[l]+=k:e[++l]=k),(x=x[0])===(E=E[0])?e[l]?e[l]+=E:e[++l]=E:(e[++l]=null,t.push({i:l,x:Nh(x,E)})),v=Am.lastIndex;return v180?r+=360:r-a>180&&(a+=360),o.push({i:n.push(E(n)+"rotate(",null,x)-2,x:Nh(a,r)})):r&&n.push(E(n)+"rotate("+r+x)}function e(a,r,n,o){a!==r?o.push({i:n.push(E(n)+"skewX(",null,x)-2,x:Nh(a,r)}):r&&n.push(E(n)+"skewX("+r+x)}function t(a,r,n,o,s,c){if(a!==n||r!==o){var m=s.push(E(s)+"scale(",null,",",null,")");c.push({i:m-4,x:Nh(a,n)},{i:m-2,x:Nh(r,o)})}else(n!==1||o!==1)&&s.push(E(s)+"scale("+n+","+o+")")}return function(a,r){var n=[],o=[];return a=J(a),r=J(r),k(a.translateX,a.translateY,r.translateX,r.translateY,n,o),l(a.rotate,r.rotate,n,o),e(a.skewX,r.skewX,n,o),t(a.scaleX,a.scaleY,r.scaleX,r.scaleY,n,o),a=r=null,function(s){for(var c=-1,m=o.length,h;++cMm,interpolateArray:()=>tC,interpolateBasis:()=>a3,interpolateBasisClosed:()=>i3,interpolateCubehelix:()=>z3,interpolateCubehelixLong:()=>B3,interpolateDate:()=>m3,interpolateDiscrete:()=>aC,interpolateHcl:()=>I3,interpolateHclLong:()=>R3,interpolateHsl:()=>L3,interpolateHslLong:()=>P3,interpolateHue:()=>oC,interpolateLab:()=>_C,interpolateNumber:()=>Nh,interpolateNumberArray:()=>yy,interpolateObject:()=>y3,interpolateRgb:()=>xm,interpolateRgbBasis:()=>c3,interpolateRgbBasisClosed:()=>f3,interpolateRound:()=>lC,interpolateString:()=>b3,interpolateTransformCss:()=>A3,interpolateTransformSvg:()=>M3,interpolateZoom:()=>k3,piecewise:()=>TC,quantize:()=>MC});var Zv=In({"node_modules/d3-interpolate/src/index.js"(){Sm(),p3(),gy(),o3(),g3(),iC(),sC(),wm(),_y(),_3(),uC(),x3(),vC(),gC(),h3(),yC(),bC(),xC(),wC(),AC(),SC()}}),xy=Ee({"src/traces/sunburst/fill_one.js"(J,V){"use strict";var v=yo(),x=Qa();V.exports=function(k,l,e,t,a){var r=l.data.data,n=r.i,o=a||r.color;if(n>=0){l.i=r.i;var s=e.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=o,l.color=o):(s.color=o,l.color=o),v.pointStyle(k,e,t,l)}else x.fill(k,o)}}}),N3=Ee({"src/traces/sunburst/style.js"(J,V){"use strict";var v=Hn(),x=Qa(),E=Vr(),k=Ef().resizeText,l=xy();function e(a){var r=a._fullLayout._sunburstlayer.selectAll(".trace");k(a,r,"sunburst"),r.each(function(n){var o=v.select(this),s=n[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){v.select(this).call(t,m,c,a)})})}function t(a,r,n,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(n,m,"marker.line.color")||x.defaultLine,p=E.castOption(n,m,"marker.line.width")||0;a.call(l,r,n,o).style("stroke-width",p).call(x.stroke,h).style("opacity",c?n.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),wd=Ee({"src/traces/sunburst/helpers.js"(J){"use strict";var V=Vr(),v=Qa(),x=Dh(),E=Xd();J.findEntryWithLevel=function(t,a){var r;return a&&t.eachAfter(function(n){if(J.getPtId(n)===a)return r=n.copy()}),r||t},J.findEntryWithChild=function(t,a){var r;return t.eachAfter(function(n){for(var o=n.children||[],s=0;s0)},J.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},J.isHeader=function(t,a){return!(J.isLeaf(t)||t.depth===a._maxDepth-1)};function e(t){return t.data.data.pid}J.getParent=function(t,a){return J.findEntryWithLevel(t,e(a))},J.listPath=function(t,a){var r=t.parent;if(!r)return[];var n=a?[r.data[a]]:[r];return J.listPath(r,a).concat(n)},J.getPath=function(t){return J.listPath(t,"label").join("/")+"/"},J.formatValue=E.formatPieValue,J.formatPercent=function(t,a){var r=V.formatPercent(t,0);return r==="0%"&&(r=E.formatPiePercent(t,a)),r}}}),Cm=Ee({"src/traces/sunburst/fx.js"(J,V){"use strict";var v=Hn(),x=Ri(),E=Qf().appendArrayPointValue,k=$l(),l=Vr(),e=zp(),t=wd(),a=Xd(),r=a.formatPieValue;V.exports=function(s,c,m,h,p){var g=h[0],i=g.trace,w=g.hierarchy,S=i.type==="sunburst",M=i.type==="treemap"||i.type==="icicle";"_hasHoverLabel"in i||(i._hasHoverLabel=!1),"_hasHoverEvent"in i||(i._hasHoverEvent=!1);var C=function(f){var u=m._fullLayout;if(!(m._dragging||u.hovermode===!1)){var A=m._fullData[i.index],b=f.data.data,z=b.i,I=t.isHierarchyRoot(f),N=t.getParent(w,f),R=t.getValue(f),B=function(ee){return l.castOption(A,z,ee)},F=B("hovertemplate"),P=k.castHoverinfo(A,u,z),j=u.separators,U;if(F||P&&P!=="none"&&P!=="skip"){var Z,Q;S&&(Z=g.cx+f.pxmid[0]*(1-f.rInscribed),Q=g.cy+f.pxmid[1]*(1-f.rInscribed)),M&&(Z=f._hoverX,Q=f._hoverY);var re={},ae=[],oe=[],H=function(ee){return ae.indexOf(ee)!==-1};P&&(ae=P==="all"?A._module.attributes.hoverinfo.flags:P.split("+")),re.label=b.label,H("label")&&re.label&&oe.push(re.label),b.hasOwnProperty("v")&&(re.value=b.v,re.valueLabel=r(re.value,j),H("value")&&oe.push(re.valueLabel)),re.currentPath=f.currentPath=t.getPath(f.data),H("current path")&&!I&&oe.push(re.currentPath);var X,K=[],G=function(){K.indexOf(X)===-1&&(oe.push(X),K.push(X))};re.percentParent=f.percentParent=R/t.getValue(N),re.parent=f.parentString=t.getPtLabel(N),H("percent parent")&&(X=t.formatPercent(re.percentParent,j)+" of "+re.parent,G()),re.percentEntry=f.percentEntry=R/t.getValue(c),re.entry=f.entry=t.getPtLabel(c),H("percent entry")&&!I&&!f.onPathbar&&(X=t.formatPercent(re.percentEntry,j)+" of "+re.entry,G()),re.percentRoot=f.percentRoot=R/t.getValue(w),re.root=f.root=t.getPtLabel(w),H("percent root")&&!I&&(X=t.formatPercent(re.percentRoot,j)+" of "+re.root,G()),re.text=B("hovertext")||B("text"),H("text")&&(X=re.text,l.isValidTextValue(X)&&oe.push(X)),U=[n(f,A,p.eventDataKeys)];var Y={trace:A,y:Q,_x0:f._x0,_x1:f._x1,_y0:f._y0,_y1:f._y1,text:oe.join("
"),name:F||H("name")?A.name:void 0,color:B("hoverlabel.bgcolor")||b.color,borderColor:B("hoverlabel.bordercolor"),fontFamily:B("hoverlabel.font.family"),fontSize:B("hoverlabel.font.size"),fontColor:B("hoverlabel.font.color"),fontWeight:B("hoverlabel.font.weight"),fontStyle:B("hoverlabel.font.style"),fontVariant:B("hoverlabel.font.variant"),nameLength:B("hoverlabel.namelength"),textAlign:B("hoverlabel.align"),hovertemplate:F,hovertemplateLabels:re,eventData:U};S&&(Y.x0=Z-f.rInscribed*f.rpx1,Y.x1=Z+f.rInscribed*f.rpx1,Y.idealAlign=f.pxmid[0]<0?"left":"right"),M&&(Y.x=Z,Y.idealAlign=Z<0?"left":"right");var q=[];k.loneHover(Y,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:m,inOut_bbox:q}),U[0].bbox=q[0],i._hasHoverLabel=!0}if(M){var $=s.select("path.surface");p.styleOne($,f,A,m,{hovered:!0})}i._hasHoverEvent=!0,m.emit("plotly_hover",{points:U||[n(f,A,p.eventDataKeys)],event:v.event})}},_=function(f){var u=m._fullLayout,A=m._fullData[i.index],b=v.select(this).datum();if(i._hasHoverEvent&&(f.originalEvent=v.event,m.emit("plotly_unhover",{points:[n(b,A,p.eventDataKeys)],event:v.event}),i._hasHoverEvent=!1),i._hasHoverLabel&&(k.loneUnhover(u._hoverlayer.node()),i._hasHoverLabel=!1),M){var z=s.select("path.surface");p.styleOne(z,b,A,m,{hovered:!1})}},T=function(f){var u=m._fullLayout,A=m._fullData[i.index],b=S&&(t.isHierarchyRoot(f)||t.isLeaf(f)),z=t.getPtId(f),I=t.isEntry(f)?t.findEntryWithChild(w,z):t.findEntryWithLevel(w,z),N=t.getPtId(I),R={points:[n(f,A,p.eventDataKeys)],event:v.event};b||(R.nextLevel=N);var B=e.triggerHandler(m,"plotly_"+i.type+"click",R);if(B!==!1&&u.hovermode&&(m._hoverdata=[n(f,A,p.eventDataKeys)],k.click(m,v.event)),!b&&B!==!1&&!m._dragging&&!m._transitioning){x.call("_storeDirectGUIEdit",A,u._tracePreGUI[A.uid],{level:A.level});var F={data:[{level:N}],traces:[i.index]},P={frame:{redraw:!1,duration:p.transitionTime},transition:{duration:p.transitionTime,easing:p.transitionEasing},mode:"immediate",fromcurrent:!0};k.loneUnhover(u._hoverlayer.node()),x.call("animate",m,F,P)}};s.on("mouseover",C),s.on("mouseout",_),s.on("click",T)};function n(o,s,c){for(var m=o.data.data,h={curveNumber:s.index,pointNumber:m.i,data:s._input,fullData:s},p=0;pWe.x1?2*Math.PI:0)+ee;Ge=se.rpx1Ie?2*Math.PI:0)+ee;Fe={x0:Ge,x1:Ge}}else Fe={rpx0:ae,rpx1:ae},k.extendFlat(Fe,ve(se));else Fe={rpx0:0,rpx1:0};else Fe={x0:ee,x1:ee};return x(Fe,We)}function ue(se){var Te=K[g.getPtId(se)],Fe,We=se.transform;if(Te)Fe=Te;else if(Fe={rpx1:se.rpx1,transform:{textPosAngle:We.textPosAngle,scale:0,rotate:We.rotate,rCenter:We.rCenter,x:We.x,y:We.y}},X)if(se.parent)if(Ie){var Ge=se.x1>Ie?2*Math.PI:0;Fe.x0=Fe.x1=Ge}else k.extendFlat(Fe,ve(se));else Fe.x0=Fe.x1=ee;else Fe.x0=Fe.x1=ee;var gt=x(Fe.transform.textPosAngle,se.transform.textPosAngle),mt=x(Fe.rpx1,se.rpx1),Tt=x(Fe.x0,se.x0),At=x(Fe.x1,se.x1),Kt=x(Fe.transform.scale,We.scale),nr=x(Fe.transform.rotate,We.rotate),_r=We.rCenter===0?3:Fe.transform.rCenter===0?1/3:1,Zt=x(Fe.transform.rCenter,We.rCenter),sr=function(Ot){return Zt(Math.pow(Ot,_r))};return function(Ot){var vt=mt(Ot),ht=Tt(Ot),Re=At(Ot),Be=sr(Ot),He=ye(vt,(ht+Re)/2),$e=gt(Ot),Ze={pxmid:He,rpx1:vt,transform:{textPosAngle:$e,rCenter:Be,x:We.x,y:We.y}};return t(B.type,We,b),{transform:{targetX:Ae(Ze),targetY:Me(Ze),scale:Kt(Ot),rotate:nr(Ot),rCenter:Be}}}}function ve(se){var Te=se.parent,Fe=K[g.getPtId(Te)],We={};if(Fe){var Ge=Te.children,gt=Ge.indexOf(se),mt=Ge.length,Tt=x(Fe.x0,Fe.x1);We.x0=Tt(gt/mt),We.x1=Tt(gt/mt)}else We.x0=We.x1=0;return We}}function w(_){return v.partition().size([2*Math.PI,_.height+1])(_)}J.formatSliceLabel=function(_,T,f,u,A){var b=f.texttemplate,z=f.textinfo;if(!b&&(!z||z==="none"))return"";var I=A.separators,N=u[0],R=_.data.data,B=N.hierarchy,F=g.isHierarchyRoot(_),P=g.getParent(B,_),j=g.getValue(_);if(!b){var U=z.split("+"),Z=function(q){return U.indexOf(q)!==-1},Q=[],re;if(Z("label")&&R.label&&Q.push(R.label),R.hasOwnProperty("v")&&Z("value")&&Q.push(g.formatValue(R.v,I)),!F){Z("current path")&&Q.push(g.getPath(_.data));var ae=0;Z("percent parent")&&ae++,Z("percent entry")&&ae++,Z("percent root")&&ae++;var oe=ae>1;if(ae){var H,X=function(q){re=g.formatPercent(H,I),oe&&(re+=" of "+q),Q.push(re)};Z("percent parent")&&!F&&(H=j/g.getValue(P),X("parent")),Z("percent entry")&&(H=j/g.getValue(T),X("entry")),Z("percent root")&&(H=j/g.getValue(B),X("root"))}}return Z("text")&&(re=k.castOption(f,R.i,"text"),k.isValidTextValue(re)&&Q.push(re)),Q.join("
")}var K=k.castOption(f,R.i,"texttemplate");if(!K)return"";var G={};R.label&&(G.label=R.label),R.hasOwnProperty("v")&&(G.value=R.v,G.valueLabel=g.formatValue(R.v,I)),G.currentPath=g.getPath(_.data),F||(G.percentParent=j/g.getValue(P),G.percentParentLabel=g.formatPercent(G.percentParent,I),G.parent=g.getPtLabel(P)),G.percentEntry=j/g.getValue(T),G.percentEntryLabel=g.formatPercent(G.percentEntry,I),G.entry=g.getPtLabel(T),G.percentRoot=j/g.getValue(B),G.percentRootLabel=g.formatPercent(G.percentRoot,I),G.root=g.getPtLabel(B),R.hasOwnProperty("color")&&(G.color=R.color);var Y=k.castOption(f,R.i,"text");return(k.isValidTextValue(Y)||Y==="")&&(G.text=Y),G.customdata=k.castOption(f,R.i,"customdata"),k.texttemplateString({data:[G,f._meta],fallback:f.texttemplatefallback,labels:G,locale:A._d3locale,template:K})};function S(_){return _.rpx0===0&&k.isFullCircle([_.x0,_.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(_.halfangle)),_.ring/2))}function M(_){return C(_.rpx1,_.transform.textPosAngle)}function C(_,T){return[_*Math.sin(T),-_*Math.cos(T)]}}}),EC=Ee({"src/traces/sunburst/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"sunburst",basePlotModule:Vk(),categories:[],animatable:!0,attributes:fm(),layoutAttributes:B2(),supplyDefaults:Hk(),supplyLayoutDefaults:Gk(),calc:dm().calc,crossTraceCalc:dm().crossTraceCalc,plot:wy().plot,style:N3().style,colorbar:ff(),meta:{}}}}),kC=Ee({"lib/sunburst.js"(J,V){"use strict";V.exports=EC()}}),CC=Ee({"src/traces/treemap/base_plot.js"(J){"use strict";var V=vl();J.name="treemap",J.plot=function(v,x,E,k){V.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){V.cleanBasePlot(J.name,v,x,E,k)}}}),Kv=Ee({"src/traces/treemap/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),Ty=Ee({"src/traces/treemap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=$s(),l=kl().attributes,e=Vv(),t=fm(),a=Kv(),r=vo().extendFlat,n=kc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:r({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:t.marker.colors,pattern:n,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:x({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:v({},{keys:a.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:t.root,domain:l({name:"treemap",trace:!0,editType:"calc"})}}}),O3=Ee({"src/traces/treemap/layout_attributes.js"(J,V){"use strict";V.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),LC=Ee({"src/traces/treemap/defaults.js"(J,V){"use strict";var v=Vr(),x=Ty(),E=Qa(),k=kl().defaults,l=fh().handleText,e=Jd().TEXTPAD,t=Hv().handleMarkerDefaults,a=pl(),r=a.hasColorscale,n=a.handleDefaults;V.exports=function(s,c,m,h){function p(A,b){return v.coerce(s,c,x,A,b)}var g=p("labels"),i=p("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=p("values");w&&w.length?p("branchvalues"):p("count"),p("level"),p("maxdepth");var S=p("tiling.packing");S==="squarify"&&p("tiling.squarifyratio"),p("tiling.flip"),p("tiling.pad");var M=p("text");p("texttemplate"),p("texttemplatefallback"),c.texttemplate||p("textinfo",v.isArrayOrTypedArray(M)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var C=p("pathbar.visible"),_="auto";l(s,c,h,p,_,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition");var T=c.textposition.indexOf("bottom")!==-1;t(s,c,h,p);var f=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;f?n(s,c,h,p,{prefix:"marker.",cLetter:"c"}):p("marker.depthfade",!(c.marker.colors||[]).length);var u=c.textfont.size*2;p("marker.pad.t",T?u/4:u),p("marker.pad.l",u/4),p("marker.pad.r",u/4),p("marker.pad.b",T?u:u/4),p("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},C&&(p("pathbar.thickness",c.pathbar.textfont.size+2*e),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),k(c,h,p),c._length=null}}}),PC=Ee({"src/traces/treemap/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=O3();V.exports=function(k,l){function e(t,a){return v.coerce(k,l,x,t,a)}e("treemapcolorway",l.colorway),e("extendtreemapcolors")}}}),j3=Ee({"src/traces/treemap/calc.js"(J){"use strict";var V=dm();J.calc=function(v,x){return V.calc(v,x)},J.crossTraceCalc=function(v){return V._runCrossTraceCalc("treemap",v)}}}),U3=Ee({"src/traces/treemap/flip_tree.js"(J,V){"use strict";V.exports=function v(x,E,k){var l;k.swapXY&&(l=x.x0,x.x0=x.y0,x.y0=l,l=x.x1,x.x1=x.y1,x.y1=l),k.flipX&&(l=x.x0,x.x0=E[0]-x.x1,x.x1=E[0]-l),k.flipY&&(l=x.y0,x.y0=E[1]-x.y1,x.y1=E[1]-l);var e=x.children;if(e)for(var t=0;t0)for(var u=0;u").join(" ")||"";var oe=x.ensureSingle(re,"g","slicetext"),H=x.ensureSingle(oe,"text","",function(K){K.attr("data-notex",1)}),X=x.ensureUniformFontSize(s,a.determineTextFont(B,Q,N.font,{onPathbar:!0}));H.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(E.font,X).call(k.convertToTspans,s),Q.textBB=E.bBox(H.node()),Q.transform=_(Q,{fontSize:X.size,onPathbar:!0}),Q.transform.fontSize=X.size,f?H.transition().attrTween("transform",function(K){var G=b(K,n,z,[i,w]);return function(Y){return T(G(Y))}}):H.attr("transform",T(Q))})}}}),IC=Ee({"src/traces/treemap/plot_one.js"(J,V){"use strict";var v=Hn(),x=(Zv(),ra(iv)).interpolate,E=wd(),k=Vr(),l=Jd().TEXTPAD,e=zv(),t=e.toMoveInsideBar,a=Ef(),r=a.recordMinTextSize,n=Kv(),o=DC();function s(c){return E.isHierarchyRoot(c)?"":E.getPtId(c)}V.exports=function(m,h,p,g,i){var w=m._fullLayout,S=h[0],M=S.trace,C=M.type,_=C==="icicle",T=S.hierarchy,f=E.findEntryWithLevel(T,M.level),u=v.select(p),A=u.selectAll("g.pathbar"),b=u.selectAll("g.slice");if(!f){A.remove(),b.remove();return}var z=E.isHierarchyRoot(f),I=!w.uniformtext.mode&&E.hasTransition(g),N=E.getMaxDepth(M),R=function(Zt){return Zt.data.depth-f.data.depth-1?j+Q:-(Z+Q):0,ae={x0:U,x1:U,y0:re,y1:re+Z},oe=function(Zt,sr,Ot){var vt=M.tiling.pad,ht=function($e){return $e-vt<=sr.x0},Re=function($e){return $e+vt>=sr.x1},Be=function($e){return $e-vt<=sr.y0},He=function($e){return $e+vt>=sr.y1};return Zt.x0===sr.x0&&Zt.x1===sr.x1&&Zt.y0===sr.y0&&Zt.y1===sr.y1?{x0:Zt.x0,x1:Zt.x1,y0:Zt.y0,y1:Zt.y1}:{x0:ht(Zt.x0-vt)?0:Re(Zt.x0-vt)?Ot[0]:Zt.x0,x1:ht(Zt.x1+vt)?0:Re(Zt.x1+vt)?Ot[0]:Zt.x1,y0:Be(Zt.y0-vt)?0:He(Zt.y0-vt)?Ot[1]:Zt.y0,y1:Be(Zt.y1+vt)?0:He(Zt.y1+vt)?Ot[1]:Zt.y1}},H=null,X={},K={},G=null,Y=function(Zt,sr){return sr?X[s(Zt)]:K[s(Zt)]},q=function(Zt,sr,Ot,vt){if(sr)return X[s(T)]||ae;var ht=K[M.level]||Ot;return R(Zt)?oe(Zt,ht,vt):{}};S.hasMultipleRoots&&z&&N++,M._maxDepth=N,M._backgroundColor=w.paper_bgcolor,M._entryDepth=f.data.depth,M._atRootLevel=z;var $=-P/2+B.l+B.w*(F.x[1]+F.x[0])/2,ee=-j/2+B.t+B.h*(1-(F.y[1]+F.y[0])/2),ne=function(Zt){return $+Zt},fe=function(Zt){return ee+Zt},ye=fe(0),xe=ne(0),Ae=function(Zt){return xe+Zt},Me=function(Zt){return ye+Zt};function Ie(Zt,sr){return Zt+","+sr}var Ue=Ae(0),qe=function(Zt){Zt.x=Math.max(Ue,Zt.x)},ke=M.pathbar.edgeshape,ge=function(Zt){var sr=Ae(Math.max(Math.min(Zt.x0,Zt.x0),0)),Ot=Ae(Math.min(Math.max(Zt.x1,Zt.x1),U)),vt=Me(Zt.y0),ht=Me(Zt.y1),Re=Z/2,Be={},He={};Be.x=sr,He.x=Ot,Be.y=He.y=(vt+ht)/2;var $e={x:sr,y:vt},Ze={x:Ot,y:vt},Je={x:Ot,y:ht},Mt={x:sr,y:ht};return ke===">"?($e.x-=Re,Ze.x-=Re,Je.x-=Re,Mt.x-=Re):ke==="/"?(Je.x-=Re,Mt.x-=Re,Be.x-=Re/2,He.x-=Re/2):ke==="\\"?($e.x-=Re,Ze.x-=Re,Be.x-=Re/2,He.x-=Re/2):ke==="<"&&(Be.x-=Re,He.x-=Re),qe($e),qe(Mt),qe(Be),qe(Ze),qe(Je),qe(He),"M"+Ie($e.x,$e.y)+"L"+Ie(Ze.x,Ze.y)+"L"+Ie(He.x,He.y)+"L"+Ie(Je.x,Je.y)+"L"+Ie(Mt.x,Mt.y)+"L"+Ie(Be.x,Be.y)+"Z"},ue=M[_?"tiling":"marker"].pad,ve=function(Zt){return M.textposition.indexOf(Zt)!==-1},se=ve("top"),Te=ve("left"),Fe=ve("right"),We=ve("bottom"),Ge=function(Zt){var sr=ne(Zt.x0),Ot=ne(Zt.x1),vt=fe(Zt.y0),ht=fe(Zt.y1),Re=Ot-sr,Be=ht-vt;if(!Re||!Be)return"";var He=M.marker.cornerradius||0,$e=Math.min(He,Re/2,Be/2);$e&&Zt.data&&Zt.data.data&&Zt.data.data.label&&(se&&($e=Math.min($e,ue.t)),Te&&($e=Math.min($e,ue.l)),Fe&&($e=Math.min($e,ue.r)),We&&($e=Math.min($e,ue.b)));var Ze=function(Je,Mt){return $e?"a"+Ie($e,$e)+" 0 0 1 "+Ie(Je,Mt):""};return"M"+Ie(sr,vt+$e)+Ze($e,-$e)+"L"+Ie(Ot-$e,vt)+Ze($e,$e)+"L"+Ie(Ot,ht-$e)+Ze(-$e,$e)+"L"+Ie(sr+$e,ht)+Ze(-$e,-$e)+"Z"},gt=function(Zt,sr){var Ot=Zt.x0,vt=Zt.x1,ht=Zt.y0,Re=Zt.y1,Be=Zt.textBB,He=se||sr.isHeader&&!We,$e=He?"start":We?"end":"middle",Ze=ve("right"),Je=ve("left")||sr.onPathbar,Mt=Je?-1:Ze?1:0;if(sr.isHeader){if(Ot+=(_?ue:ue.l)-l,vt-=(_?ue:ue.r)-l,Ot>=vt){var dt=(Ot+vt)/2;Ot=dt,vt=dt}var Dt;We?(Dt=Re-(_?ue:ue.b),ht-1,flipY:F.tiling.flip.indexOf("y")>-1,pad:{inner:F.tiling.pad,top:F.marker.pad.t,left:F.marker.pad.l,right:F.marker.pad.r,bottom:F.marker.pad.b}}),re=Q.descendants(),ae=1/0,oe=-1/0;re.forEach(function(Y){var q=Y.depth;q>=F._maxDepth?(Y.x0=Y.x1=(Y.x0+Y.x1)/2,Y.y0=Y.y1=(Y.y0+Y.y1)/2):(ae=Math.min(ae,q),oe=Math.max(oe,q))}),p=p.data(re,a.getPtId),F._maxVisibleLayers=isFinite(oe)?oe-ae+1:0,p.enter().append("g").classed("slice",!0),u(p,o,I,[i,w],C),p.order();var H=null;if(f&&z){var X=a.getPtId(z);p.each(function(Y){H===null&&a.getPtId(Y)===X&&(H={x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1})})}var K=function(){return H||{x0:0,x1:i,y0:0,y1:w}},G=p;return f&&(G=G.transition().each("end",function(){var Y=v.select(this);a.setSliceCursor(Y,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),G.each(function(Y){var q=a.isHeader(Y,F);Y._x0=S(Y.x0),Y._x1=S(Y.x1),Y._y0=M(Y.y0),Y._y1=M(Y.y1),Y._hoverX=S(Y.x1-F.marker.pad.r),Y._hoverY=M(U?Y.y1-F.marker.pad.b/2:Y.y0+F.marker.pad.t/2);var $=v.select(this),ee=x.ensureSingle($,"path","surface",function(Me){Me.style("pointer-events",N?"none":"all")});f?ee.transition().attrTween("d",function(Me){var Ie=A(Me,o,K(),[i,w]);return function(Ue){return C(Ie(Ue))}}):ee.attr("d",C),$.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,c,{isTransitioning:c._transitioning}),ee.call(e,Y,F,c,{hovered:!1}),Y.x0===Y.x1||Y.y0===Y.y1?Y._text="":q?Y._text=Z?"":a.getPtLabel(Y)||"":Y._text=n(Y,h,F,m,R)||"";var ne=x.ensureSingle($,"g","slicetext"),fe=x.ensureSingle(ne,"text","",function(Me){Me.attr("data-notex",1)}),ye=x.ensureUniformFontSize(c,a.determineTextFont(F,Y,R.font)),xe=Y._text||" ",Ae=q&&xe.indexOf("
")===-1;fe.text(xe).classed("slicetext",!0).attr("text-anchor",j?"end":P||Ae?"start":"middle").call(E.font,ye).call(k.convertToTspans,c),Y.textBB=E.bBox(fe.node()),Y.transform=_(Y,{fontSize:ye.size,isHeader:q}),Y.transform.fontSize=ye.size,f?fe.transition().attrTween("transform",function(Me){var Ie=b(Me,o,K(),[i,w]);return function(Ue){return T(Ie(Ue))}}):fe.attr("transform",T(Y))}),H}}}),FC=Ee({"src/traces/treemap/plot.js"(J,V){"use strict";var v=V3(),x=RC();V.exports=function(k,l,e,t){return v(k,l,e,t,{type:"treemap",drawDescendants:x})}}}),zC=Ee({"src/traces/treemap/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"treemap",basePlotModule:CC(),categories:[],animatable:!0,attributes:Ty(),layoutAttributes:O3(),supplyDefaults:LC(),supplyLayoutDefaults:PC(),calc:j3().calc,crossTraceCalc:j3().crossTraceCalc,plot:FC(),style:Ay().style,colorbar:ff(),meta:{}}}}),BC=Ee({"lib/treemap.js"(J,V){"use strict";V.exports=zC()}}),NC=Ee({"src/traces/icicle/base_plot.js"(J){"use strict";var V=vl();J.name="icicle",J.plot=function(v,x,E,k){V.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){V.cleanBasePlot(J.name,v,x,E,k)}}}),H3=Ee({"src/traces/icicle/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=$s(),l=kl().attributes,e=Vv(),t=fm(),a=Ty(),r=Kv(),n=vo().extendFlat,o=kc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:a.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:n({colors:t.marker.colors,line:t.marker.line,pattern:o,editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:a.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:x({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:v({},{keys:r.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:a.outsidetextfont,textposition:a.textposition,sort:e.sort,root:t.root,domain:l({name:"icicle",trace:!0,editType:"calc"})}}}),G3=Ee({"src/traces/icicle/layout_attributes.js"(J,V){"use strict";V.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),OC=Ee({"src/traces/icicle/defaults.js"(J,V){"use strict";var v=Vr(),x=H3(),E=Qa(),k=kl().defaults,l=fh().handleText,e=Jd().TEXTPAD,t=Hv().handleMarkerDefaults,a=pl(),r=a.hasColorscale,n=a.handleDefaults;V.exports=function(s,c,m,h){function p(T,f){return v.coerce(s,c,x,T,f)}var g=p("labels"),i=p("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=p("values");w&&w.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),p("tiling.orientation"),p("tiling.flip"),p("tiling.pad");var S=p("text");p("texttemplate"),p("texttemplatefallback"),c.texttemplate||p("textinfo",v.isArrayOrTypedArray(S)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var M=p("pathbar.visible"),C="auto";l(s,c,h,p,C,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("textposition"),t(s,c,h,p);var _=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;_&&n(s,c,h,p,{prefix:"marker.",cLetter:"c"}),p("leaf.opacity",_?1:.7),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},M&&(p("pathbar.thickness",c.pathbar.textfont.size+2*e),p("pathbar.side"),p("pathbar.edgeshape")),p("sort"),p("root.color"),k(c,h,p),c._length=null}}}),jC=Ee({"src/traces/icicle/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=G3();V.exports=function(k,l){function e(t,a){return v.coerce(k,l,x,t,a)}e("iciclecolorway",l.colorway),e("extendiciclecolors")}}}),W3=Ee({"src/traces/icicle/calc.js"(J){"use strict";var V=dm();J.calc=function(v,x){return V.calc(v,x)},J.crossTraceCalc=function(v){return V._runCrossTraceCalc("icicle",v)}}}),UC=Ee({"src/traces/icicle/partition.js"(J,V){"use strict";var v=hm(),x=U3();V.exports=function(k,l,e){var t=e.flipX,a=e.flipY,r=e.orientation==="h",n=e.maxDepth,o=l[0],s=l[1];n&&(o=(k.height+1)*l[0]/Math.min(k.height+1,n),s=(k.height+1)*l[1]/Math.min(k.height+1,n));var c=v.partition().padding(e.pad.inner).size(r?[l[1],o]:[l[0],s])(k);return(r||t||a)&&x(c,l,{swapXY:r,flipX:t,flipY:a}),c}}}),Y3=Ee({"src/traces/icicle/style.js"(J,V){"use strict";var v=Hn(),x=Qa(),E=Vr(),k=Ef().resizeText,l=xy();function e(a){var r=a._fullLayout._iciclelayer.selectAll(".trace");k(a,r,"icicle"),r.each(function(n){var o=v.select(this),s=n[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){v.select(this).call(t,m,c,a)})})}function t(a,r,n,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(n,m,"marker.line.color")||x.defaultLine,p=E.castOption(n,m,"marker.line.width")||0;a.call(l,r,n,o).style("stroke-width",p).call(x.stroke,h).style("opacity",c?n.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),qC=Ee({"src/traces/icicle/draw_descendants.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=yo(),k=Fs(),l=UC(),e=Y3().styleOne,t=Kv(),a=wd(),r=Cm(),n=wy().formatSliceLabel,o=!1;V.exports=function(c,m,h,p,g){var i=g.width,w=g.height,S=g.viewX,M=g.viewY,C=g.pathSlice,_=g.toMoveInsideSlice,T=g.strTransform,f=g.hasTransition,u=g.handleSlicesExit,A=g.makeUpdateSliceInterpolator,b=g.makeUpdateTextInterpolator,z=g.prevEntry,I={},N=c._context.staticPlot,R=c._fullLayout,B=m[0],F=B.trace,P=F.textposition.indexOf("left")!==-1,j=F.textposition.indexOf("right")!==-1,U=F.textposition.indexOf("bottom")!==-1,Z=l(h,[i,w],{flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1,orientation:F.tiling.orientation,pad:{inner:F.tiling.pad},maxDepth:F._maxDepth}),Q=Z.descendants(),re=1/0,ae=-1/0;Q.forEach(function(G){var Y=G.depth;Y>=F._maxDepth?(G.x0=G.x1=(G.x0+G.x1)/2,G.y0=G.y1=(G.y0+G.y1)/2):(re=Math.min(re,Y),ae=Math.max(ae,Y))}),p=p.data(Q,a.getPtId),F._maxVisibleLayers=isFinite(ae)?ae-re+1:0,p.enter().append("g").classed("slice",!0),u(p,o,I,[i,w],C),p.order();var oe=null;if(f&&z){var H=a.getPtId(z);p.each(function(G){oe===null&&a.getPtId(G)===H&&(oe={x0:G.x0,x1:G.x1,y0:G.y0,y1:G.y1})})}var X=function(){return oe||{x0:0,x1:i,y0:0,y1:w}},K=p;return f&&(K=K.transition().each("end",function(){var G=v.select(this);a.setSliceCursor(G,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(G){G._x0=S(G.x0),G._x1=S(G.x1),G._y0=M(G.y0),G._y1=M(G.y1),G._hoverX=S(G.x1-F.tiling.pad),G._hoverY=M(U?G.y1-F.tiling.pad/2:G.y0+F.tiling.pad/2);var Y=v.select(this),q=x.ensureSingle(Y,"path","surface",function(fe){fe.style("pointer-events",N?"none":"all")});f?q.transition().attrTween("d",function(fe){var ye=A(fe,o,X(),[i,w],{orientation:F.tiling.orientation,flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1});return function(xe){return C(ye(xe))}}):q.attr("d",C),Y.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,c,{isTransitioning:c._transitioning}),q.call(e,G,F,c,{hovered:!1}),G.x0===G.x1||G.y0===G.y1?G._text="":G._text=n(G,h,F,m,R)||"";var $=x.ensureSingle(Y,"g","slicetext"),ee=x.ensureSingle($,"text","",function(fe){fe.attr("data-notex",1)}),ne=x.ensureUniformFontSize(c,a.determineTextFont(F,G,R.font));ee.text(G._text||" ").classed("slicetext",!0).attr("text-anchor",j?"end":P?"start":"middle").call(E.font,ne).call(k.convertToTspans,c),G.textBB=E.bBox(ee.node()),G.transform=_(G,{fontSize:ne.size}),G.transform.fontSize=ne.size,f?ee.transition().attrTween("transform",function(fe){var ye=b(fe,o,X(),[i,w]);return function(xe){return T(ye(xe))}}):ee.attr("transform",T(G))}),oe}}}),VC=Ee({"src/traces/icicle/plot.js"(J,V){"use strict";var v=V3(),x=qC();V.exports=function(k,l,e,t){return v(k,l,e,t,{type:"icicle",drawDescendants:x})}}}),HC=Ee({"src/traces/icicle/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"icicle",basePlotModule:NC(),categories:[],animatable:!0,attributes:H3(),layoutAttributes:G3(),supplyDefaults:OC(),supplyLayoutDefaults:jC(),calc:W3().calc,crossTraceCalc:W3().crossTraceCalc,plot:VC(),style:Y3().style,colorbar:ff(),meta:{}}}}),GC=Ee({"lib/icicle.js"(J,V){"use strict";V.exports=HC()}}),WC=Ee({"src/traces/funnelarea/base_plot.js"(J){"use strict";var V=vl();J.name="funnelarea",J.plot=function(v,x,E,k){V.plotBasePlot(J.name,v,x,E,k)},J.clean=function(v,x,E,k){V.cleanBasePlot(J.name,v,x,E,k)}}}),X3=Ee({"src/traces/funnelarea/attributes.js"(J,V){"use strict";var v=Vv(),x=ia(),E=kl().attributes,{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=Cs(),t=vo().extendFlat;V.exports={labels:v.labels,label0:v.label0,dlabel:v.dlabel,values:v.values,marker:{colors:v.marker.colors,line:{color:t({},v.marker.line.color,{dflt:null}),width:t({},v.marker.line.width,{dflt:1}),editType:"calc"},pattern:v.marker.pattern,editType:"calc"},text:v.text,hovertext:v.hovertext,scalegroup:t({},v.scalegroup,{}),textinfo:t({},v.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:t({},x.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:k({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:t({},v.textposition,{values:["inside","none"],dflt:"inside"}),textfont:v.textfont,insidetextfont:v.insidetextfont,title:{text:v.title.text,font:v.title.font,position:t({},v.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:E({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"}}}}),$3=Ee({"src/traces/funnelarea/layout_attributes.js"(J,V){"use strict";var v=G1().hiddenlabels;V.exports={hiddenlabels:v,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),YC=Ee({"src/traces/funnelarea/defaults.js"(J,V){"use strict";var v=Vr(),x=X3(),E=kl().defaults,k=fh().handleText,l=Hv().handleLabelsAndValues,e=Hv().handleMarkerDefaults;V.exports=function(a,r,n,o){function s(C,_){return v.coerce(a,r,x,C,_)}var c=s("labels"),m=s("values"),h=l(c,m),p=h.len;if(r._hasLabels=h.hasLabels,r._hasValues=h.hasValues,!r._hasLabels&&r._hasValues&&(s("label0"),s("dlabel")),!p){r.visible=!1;return}r._length=p,e(a,r,o,s),s("scalegroup");var g=s("text"),i=s("texttemplate");s("texttemplatefallback");var w;if(i||(w=s("textinfo",Array.isArray(g)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),i||w&&w!=="none"){var S=s("textposition");k(a,r,o,s,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else w==="none"&&s("textposition","none");E(r,o,s);var M=s("title.text");M&&(s("title.position"),v.coerceFont(s,"title.font",o.font)),s("aspectratio"),s("baseratio")}}}),XC=Ee({"src/traces/funnelarea/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=$3();V.exports=function(k,l){function e(t,a){return v.coerce(k,l,x,t,a)}e("hiddenlabels"),e("funnelareacolorway",l.colorway),e("extendfunnelareacolors")}}}),Z3=Ee({"src/traces/funnelarea/calc.js"(J,V){"use strict";var v=e0();function x(k,l){return v.calc(k,l)}function E(k){v.crossTraceCalc(k,{type:"funnelarea"})}V.exports={calc:x,crossTraceCalc:E}}}),$C=Ee({"src/traces/funnelarea/plot.js"(J,V){"use strict";var v=Hn(),x=yo(),E=Vr(),k=E.strScale,l=E.strTranslate,e=Fs(),t=zv(),a=t.toMoveInsideBar,r=Ef(),n=r.recordMinTextSize,o=r.clearMinTextSize,s=Xd(),c=W1(),m=c.attachFxHandlers,h=c.determineInsideTextFont,p=c.layoutAreas,g=c.prerenderTitles,i=c.positionTitleOutside,w=c.formatSliceLabel;V.exports=function(T,f){var u=T._context.staticPlot,A=T._fullLayout;o("funnelarea",A),g(f,T),p(f,A._size),E.makeTraceGroups(A._funnelarealayer,f,"trace").each(function(b){var z=v.select(this),I=b[0],N=I.trace;C(b),z.each(function(){var R=v.select(this).selectAll("g.slice").data(b);R.enter().append("g").classed("slice",!0),R.exit().remove(),R.each(function(F,P){if(F.hidden){v.select(this).selectAll("path,g").remove();return}F.pointNumber=F.i,F.curveNumber=N.index;var j=I.cx,U=I.cy,Z=v.select(this),Q=Z.selectAll("path.surface").data([F]);Q.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),Z.call(m,T,b);var re="M"+(j+F.TR[0])+","+(U+F.TR[1])+S(F.TR,F.BR)+S(F.BR,F.BL)+S(F.BL,F.TL)+"Z";Q.attr("d",re),w(T,F,I);var ae=s.castOption(N.textposition,F.pts),oe=Z.selectAll("g.slicetext").data(F.text&&ae!=="none"?[0]:[]);oe.enter().append("g").classed("slicetext",!0),oe.exit().remove(),oe.each(function(){var H=E.ensureSingle(v.select(this),"text","",function(ne){ne.attr("data-notex",1)}),X=E.ensureUniformFontSize(T,h(N,F,A.font));H.text(F.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(x.font,X).call(e.convertToTspans,T);var K=x.bBox(H.node()),G,Y,q,$=Math.min(F.BL[1],F.BR[1])+U,ee=Math.max(F.TL[1],F.TR[1])+U;Y=Math.max(F.TL[0],F.BL[0])+j,q=Math.min(F.TR[0],F.BR[0])+j,G=a(Y,q,$,ee,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),G.fontSize=X.size,n(N.type,G,A),b[P].transform=G,E.setTransormAndDisplay(H,G)})});var B=v.select(this).selectAll("g.titletext").data(N.title.text?[0]:[]);B.enter().append("g").classed("titletext",!0),B.exit().remove(),B.each(function(){var F=E.ensureSingle(v.select(this),"text","",function(U){U.attr("data-notex",1)}),P=N.title.text;N._meta&&(P=E.templateString(P,N._meta)),F.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(x.font,N.title.font).call(e.convertToTspans,T);var j=i(I,A._size);F.attr("transform",l(j.x,j.y)+k(Math.min(1,j.scale))+l(j.tx,j.ty))})})})};function S(_,T){var f=T[0]-_[0],u=T[1]-_[1];return"l"+f+","+u}function M(_,T){return[.5*(_[0]+T[0]),.5*(_[1]+T[1])]}function C(_){if(!_.length)return;var T=_[0],f=T.trace,u=f.aspectratio,A=f.baseratio;A>.999&&(A=.999);var b=Math.pow(A,2),z=T.vTotal,I=z*b/(1-b),N=z,R=I/z;function B(){var fe=Math.sqrt(R);return{x:fe,y:-fe}}function F(){var fe=B();return[fe.x,fe.y]}var P,j=[];j.push(F());var U,Z;for(U=_.length-1;U>-1;U--)if(Z=_[U],!Z.hidden){var Q=Z.v/N;R+=Q,j.push(F())}var re=1/0,ae=-1/0;for(U=0;U-1;U--)if(Z=_[U],!Z.hidden){$+=1;var ee=j[$][0],ne=j[$][1];Z.TL=[-ee,ne],Z.TR=[ee,ne],Z.BL=Y,Z.BR=q,Z.pxmid=M(Z.TR,Z.BR),Y=Z.TL,q=Z.TR}}}}),ZC=Ee({"src/traces/funnelarea/style.js"(J,V){"use strict";var v=Hn(),x=jp(),E=Ef().resizeText;V.exports=function(l){var e=l._fullLayout._funnelarealayer.selectAll(".trace");E(l,e,"funnelarea"),e.each(function(t){var a=t[0],r=a.trace,n=v.select(this);n.style({opacity:r.opacity}),n.selectAll("path.surface").each(function(o){v.select(this).call(x,o,r,l)})})}}}),KC=Ee({"src/traces/funnelarea/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"funnelarea",basePlotModule:WC(),categories:["pie-like","funnelarea","showLegend"],attributes:X3(),layoutAttributes:$3(),supplyDefaults:YC(),supplyLayoutDefaults:XC(),calc:Z3().calc,crossTraceCalc:Z3().crossTraceCalc,plot:$C(),style:ZC(),styleOne:jp(),meta:{}}}}),JC=Ee({"lib/funnelarea.js"(J,V){"use strict";V.exports=KC()}}),Xc=Ee({"stackgl_modules/index.js"(J,V){"use strict";(function(){var v={1964:function(l,e,t){l.exports={alpha_shape:t(3502),convex_hull:t(7352),delaunay_triangulate:t(7642),gl_cone3d:t(6405),gl_error3d:t(9165),gl_line3d:t(5714),gl_mesh3d:t(7201),gl_plot3d:t(4100),gl_scatter3d:t(8418),gl_streamtube3d:t(7815),gl_surface3d:t(9499),ndarray:t(9618),ndarray_linear_interpolate:t(4317)}},4793:function(l,e,t){"use strict";var a,r=t(7507),n=t(3778),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=h,a=u,e.IS=50;var s=2147483647;a=s,h.TYPED_ARRAY_SUPPORT=c(),!h.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{var ke=new Uint8Array(1),ge={foo:function(){return 42}};return Object.setPrototypeOf(ge,Uint8Array.prototype),Object.setPrototypeOf(ke,ge),ke.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function m(ke){if(ke>s)throw new RangeError('The value "'+ke+'" is invalid for option "size"');var ge=new Uint8Array(ke);return Object.setPrototypeOf(ge,h.prototype),ge}function h(ke,ge,ue){if(typeof ke=="number"){if(typeof ge=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(ke)}return p(ke,ge,ue)}h.poolSize=8192;function p(ke,ge,ue){if(typeof ke=="string")return S(ke,ge);if(ArrayBuffer.isView(ke))return C(ke);if(ke==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke);if(Ie(ke,ArrayBuffer)||ke&&Ie(ke.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ke,SharedArrayBuffer)||ke&&Ie(ke.buffer,SharedArrayBuffer)))return _(ke,ge,ue);if(typeof ke=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ve=ke.valueOf&&ke.valueOf();if(ve!=null&&ve!==ke)return h.from(ve,ge,ue);var se=T(ke);if(se)return se;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ke[Symbol.toPrimitive]=="function")return h.from(ke[Symbol.toPrimitive]("string"),ge,ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}h.from=function(ke,ge,ue){return p(ke,ge,ue)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function g(ke){if(typeof ke!="number")throw new TypeError('"size" argument must be of type number');if(ke<0)throw new RangeError('The value "'+ke+'" is invalid for option "size"')}function i(ke,ge,ue){return g(ke),ke<=0?m(ke):ge!==void 0?typeof ue=="string"?m(ke).fill(ge,ue):m(ke).fill(ge):m(ke)}h.alloc=function(ke,ge,ue){return i(ke,ge,ue)};function w(ke){return g(ke),m(ke<0?0:f(ke)|0)}h.allocUnsafe=function(ke){return w(ke)},h.allocUnsafeSlow=function(ke){return w(ke)};function S(ke,ge){if((typeof ge!="string"||ge==="")&&(ge="utf8"),!h.isEncoding(ge))throw new TypeError("Unknown encoding: "+ge);var ue=A(ke,ge)|0,ve=m(ue),se=ve.write(ke,ge);return se!==ue&&(ve=ve.slice(0,se)),ve}function M(ke){for(var ge=ke.length<0?0:f(ke.length)|0,ue=m(ge),ve=0;ve=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return ke|0}function u(ke){return+ke!=ke&&(ke=0),h.alloc(+ke)}h.isBuffer=function(ge){return ge!=null&&ge._isBuffer===!0&&ge!==h.prototype},h.compare=function(ge,ue){if(Ie(ge,Uint8Array)&&(ge=h.from(ge,ge.offset,ge.byteLength)),Ie(ue,Uint8Array)&&(ue=h.from(ue,ue.offset,ue.byteLength)),!h.isBuffer(ge)||!h.isBuffer(ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ge===ue)return 0;for(var ve=ge.length,se=ue.length,Te=0,Fe=Math.min(ve,se);Tese.length?h.from(Fe).copy(se,Te):Uint8Array.prototype.set.call(se,Fe,Te);else if(h.isBuffer(Fe))Fe.copy(se,Te);else throw new TypeError('"list" argument must be an Array of Buffers');Te+=Fe.length}return se};function A(ke,ge){if(h.isBuffer(ke))return ke.length;if(ArrayBuffer.isView(ke)||Ie(ke,ArrayBuffer))return ke.byteLength;if(typeof ke!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ke);var ue=ke.length,ve=arguments.length>2&&arguments[2]===!0;if(!ve&&ue===0)return 0;for(var se=!1;;)switch(ge){case"ascii":case"latin1":case"binary":return ue;case"utf8":case"utf-8":return fe(ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ue*2;case"hex":return ue>>>1;case"base64":return Ae(ke).length;default:if(se)return ve?-1:fe(ke).length;ge=(""+ge).toLowerCase(),se=!0}}h.byteLength=A;function b(ke,ge,ue){var ve=!1;if((ge===void 0||ge<0)&&(ge=0),ge>this.length||((ue===void 0||ue>this.length)&&(ue=this.length),ue<=0)||(ue>>>=0,ge>>>=0,ue<=ge))return"";for(ke||(ke="utf8");;)switch(ke){case"hex":return H(this,ge,ue);case"utf8":case"utf-8":return Z(this,ge,ue);case"ascii":return ae(this,ge,ue);case"latin1":case"binary":return oe(this,ge,ue);case"base64":return U(this,ge,ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,ge,ue);default:if(ve)throw new TypeError("Unknown encoding: "+ke);ke=(ke+"").toLowerCase(),ve=!0}}h.prototype._isBuffer=!0;function z(ke,ge,ue){var ve=ke[ge];ke[ge]=ke[ue],ke[ue]=ve}h.prototype.swap16=function(){var ge=this.length;if(ge%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ue=0;ueue&&(ge+=" ... "),""},o&&(h.prototype[o]=h.prototype.inspect),h.prototype.compare=function(ge,ue,ve,se,Te){if(Ie(ge,Uint8Array)&&(ge=h.from(ge,ge.offset,ge.byteLength)),!h.isBuffer(ge))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ge);if(ue===void 0&&(ue=0),ve===void 0&&(ve=ge?ge.length:0),se===void 0&&(se=0),Te===void 0&&(Te=this.length),ue<0||ve>ge.length||se<0||Te>this.length)throw new RangeError("out of range index");if(se>=Te&&ue>=ve)return 0;if(se>=Te)return-1;if(ue>=ve)return 1;if(ue>>>=0,ve>>>=0,se>>>=0,Te>>>=0,this===ge)return 0;for(var Fe=Te-se,We=ve-ue,Ge=Math.min(Fe,We),gt=this.slice(se,Te),mt=ge.slice(ue,ve),Tt=0;Tt2147483647?ue=2147483647:ue<-2147483648&&(ue=-2147483648),ue=+ue,Ue(ue)&&(ue=se?0:ke.length-1),ue<0&&(ue=ke.length+ue),ue>=ke.length){if(se)return-1;ue=ke.length-1}else if(ue<0)if(se)ue=0;else return-1;if(typeof ge=="string"&&(ge=h.from(ge,ve)),h.isBuffer(ge))return ge.length===0?-1:N(ke,ge,ue,ve,se);if(typeof ge=="number")return ge=ge&255,typeof Uint8Array.prototype.indexOf=="function"?se?Uint8Array.prototype.indexOf.call(ke,ge,ue):Uint8Array.prototype.lastIndexOf.call(ke,ge,ue):N(ke,[ge],ue,ve,se);throw new TypeError("val must be string, number or Buffer")}function N(ke,ge,ue,ve,se){var Te=1,Fe=ke.length,We=ge.length;if(ve!==void 0&&(ve=String(ve).toLowerCase(),ve==="ucs2"||ve==="ucs-2"||ve==="utf16le"||ve==="utf-16le")){if(ke.length<2||ge.length<2)return-1;Te=2,Fe/=2,We/=2,ue/=2}function Ge(Kt,nr){return Te===1?Kt[nr]:Kt.readUInt16BE(nr*Te)}var gt;if(se){var mt=-1;for(gt=ue;gtFe&&(ue=Fe-We),gt=ue;gt>=0;gt--){for(var Tt=!0,At=0;Atse&&(ve=se)):ve=se;var Te=ge.length;ve>Te/2&&(ve=Te/2);for(var Fe=0;Fe>>0,isFinite(ve)?(ve=ve>>>0,se===void 0&&(se="utf8")):(se=ve,ve=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Te=this.length-ue;if((ve===void 0||ve>Te)&&(ve=Te),ge.length>0&&(ve<0||ue<0)||ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");se||(se="utf8");for(var Fe=!1;;)switch(se){case"hex":return R(this,ge,ue,ve);case"utf8":case"utf-8":return B(this,ge,ue,ve);case"ascii":case"latin1":case"binary":return F(this,ge,ue,ve);case"base64":return P(this,ge,ue,ve);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,ge,ue,ve);default:if(Fe)throw new TypeError("Unknown encoding: "+se);se=(""+se).toLowerCase(),Fe=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(ke,ge,ue){return ge===0&&ue===ke.length?r.fromByteArray(ke):r.fromByteArray(ke.slice(ge,ue))}function Z(ke,ge,ue){ue=Math.min(ke.length,ue);for(var ve=[],se=ge;se239?4:Te>223?3:Te>191?2:1;if(se+We<=ue){var Ge,gt,mt,Tt;switch(We){case 1:Te<128&&(Fe=Te);break;case 2:Ge=ke[se+1],(Ge&192)===128&&(Tt=(Te&31)<<6|Ge&63,Tt>127&&(Fe=Tt));break;case 3:Ge=ke[se+1],gt=ke[se+2],(Ge&192)===128&&(gt&192)===128&&(Tt=(Te&15)<<12|(Ge&63)<<6|gt&63,Tt>2047&&(Tt<55296||Tt>57343)&&(Fe=Tt));break;case 4:Ge=ke[se+1],gt=ke[se+2],mt=ke[se+3],(Ge&192)===128&&(gt&192)===128&&(mt&192)===128&&(Tt=(Te&15)<<18|(Ge&63)<<12|(gt&63)<<6|mt&63,Tt>65535&&Tt<1114112&&(Fe=Tt))}}Fe===null?(Fe=65533,We=1):Fe>65535&&(Fe-=65536,ve.push(Fe>>>10&1023|55296),Fe=56320|Fe&1023),ve.push(Fe),se+=We}return re(ve)}var Q=4096;function re(ke){var ge=ke.length;if(ge<=Q)return String.fromCharCode.apply(String,ke);for(var ue="",ve=0;veve)&&(ue=ve);for(var se="",Te=ge;Teve&&(ge=ve),ue<0?(ue+=ve,ue<0&&(ue=0)):ue>ve&&(ue=ve),ueue)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(ge,ue,ve){ge=ge>>>0,ue=ue>>>0,ve||K(ge,ue,this.length);for(var se=this[ge],Te=1,Fe=0;++Fe>>0,ue=ue>>>0,ve||K(ge,ue,this.length);for(var se=this[ge+--ue],Te=1;ue>0&&(Te*=256);)se+=this[ge+--ue]*Te;return se},h.prototype.readUint8=h.prototype.readUInt8=function(ge,ue){return ge=ge>>>0,ue||K(ge,1,this.length),this[ge]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(ge,ue){return ge=ge>>>0,ue||K(ge,2,this.length),this[ge]|this[ge+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(ge,ue){return ge=ge>>>0,ue||K(ge,2,this.length),this[ge]<<8|this[ge+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),(this[ge]|this[ge+1]<<8|this[ge+2]<<16)+this[ge+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),this[ge]*16777216+(this[ge+1]<<16|this[ge+2]<<8|this[ge+3])},h.prototype.readIntLE=function(ge,ue,ve){ge=ge>>>0,ue=ue>>>0,ve||K(ge,ue,this.length);for(var se=this[ge],Te=1,Fe=0;++Fe=Te&&(se-=Math.pow(2,8*ue)),se},h.prototype.readIntBE=function(ge,ue,ve){ge=ge>>>0,ue=ue>>>0,ve||K(ge,ue,this.length);for(var se=ue,Te=1,Fe=this[ge+--se];se>0&&(Te*=256);)Fe+=this[ge+--se]*Te;return Te*=128,Fe>=Te&&(Fe-=Math.pow(2,8*ue)),Fe},h.prototype.readInt8=function(ge,ue){return ge=ge>>>0,ue||K(ge,1,this.length),this[ge]&128?(255-this[ge]+1)*-1:this[ge]},h.prototype.readInt16LE=function(ge,ue){ge=ge>>>0,ue||K(ge,2,this.length);var ve=this[ge]|this[ge+1]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt16BE=function(ge,ue){ge=ge>>>0,ue||K(ge,2,this.length);var ve=this[ge+1]|this[ge]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt32LE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),this[ge]|this[ge+1]<<8|this[ge+2]<<16|this[ge+3]<<24},h.prototype.readInt32BE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),this[ge]<<24|this[ge+1]<<16|this[ge+2]<<8|this[ge+3]},h.prototype.readFloatLE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),n.read(this,ge,!0,23,4)},h.prototype.readFloatBE=function(ge,ue){return ge=ge>>>0,ue||K(ge,4,this.length),n.read(this,ge,!1,23,4)},h.prototype.readDoubleLE=function(ge,ue){return ge=ge>>>0,ue||K(ge,8,this.length),n.read(this,ge,!0,52,8)},h.prototype.readDoubleBE=function(ge,ue){return ge=ge>>>0,ue||K(ge,8,this.length),n.read(this,ge,!1,52,8)};function G(ke,ge,ue,ve,se,Te){if(!h.isBuffer(ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(ge>se||geke.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(ge,ue,ve,se){if(ge=+ge,ue=ue>>>0,ve=ve>>>0,!se){var Te=Math.pow(2,8*ve)-1;G(this,ge,ue,ve,Te,0)}var Fe=1,We=0;for(this[ue]=ge&255;++We>>0,ve=ve>>>0,!se){var Te=Math.pow(2,8*ve)-1;G(this,ge,ue,ve,Te,0)}var Fe=ve-1,We=1;for(this[ue+Fe]=ge&255;--Fe>=0&&(We*=256);)this[ue+Fe]=ge/We&255;return ue+ve},h.prototype.writeUint8=h.prototype.writeUInt8=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,1,255,0),this[ue]=ge&255,ue+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,2,65535,0),this[ue]=ge&255,this[ue+1]=ge>>>8,ue+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,2,65535,0),this[ue]=ge>>>8,this[ue+1]=ge&255,ue+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,4,4294967295,0),this[ue+3]=ge>>>24,this[ue+2]=ge>>>16,this[ue+1]=ge>>>8,this[ue]=ge&255,ue+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,4,4294967295,0),this[ue]=ge>>>24,this[ue+1]=ge>>>16,this[ue+2]=ge>>>8,this[ue+3]=ge&255,ue+4},h.prototype.writeIntLE=function(ge,ue,ve,se){if(ge=+ge,ue=ue>>>0,!se){var Te=Math.pow(2,8*ve-1);G(this,ge,ue,ve,Te-1,-Te)}var Fe=0,We=1,Ge=0;for(this[ue]=ge&255;++Fe>0)-Ge&255;return ue+ve},h.prototype.writeIntBE=function(ge,ue,ve,se){if(ge=+ge,ue=ue>>>0,!se){var Te=Math.pow(2,8*ve-1);G(this,ge,ue,ve,Te-1,-Te)}var Fe=ve-1,We=1,Ge=0;for(this[ue+Fe]=ge&255;--Fe>=0&&(We*=256);)ge<0&&Ge===0&&this[ue+Fe+1]!==0&&(Ge=1),this[ue+Fe]=(ge/We>>0)-Ge&255;return ue+ve},h.prototype.writeInt8=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,1,127,-128),ge<0&&(ge=255+ge+1),this[ue]=ge&255,ue+1},h.prototype.writeInt16LE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,2,32767,-32768),this[ue]=ge&255,this[ue+1]=ge>>>8,ue+2},h.prototype.writeInt16BE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,2,32767,-32768),this[ue]=ge>>>8,this[ue+1]=ge&255,ue+2},h.prototype.writeInt32LE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,4,2147483647,-2147483648),this[ue]=ge&255,this[ue+1]=ge>>>8,this[ue+2]=ge>>>16,this[ue+3]=ge>>>24,ue+4},h.prototype.writeInt32BE=function(ge,ue,ve){return ge=+ge,ue=ue>>>0,ve||G(this,ge,ue,4,2147483647,-2147483648),ge<0&&(ge=4294967295+ge+1),this[ue]=ge>>>24,this[ue+1]=ge>>>16,this[ue+2]=ge>>>8,this[ue+3]=ge&255,ue+4};function Y(ke,ge,ue,ve,se,Te){if(ue+ve>ke.length)throw new RangeError("Index out of range");if(ue<0)throw new RangeError("Index out of range")}function q(ke,ge,ue,ve,se){return ge=+ge,ue=ue>>>0,se||Y(ke,ge,ue,4,34028234663852886e22,-34028234663852886e22),n.write(ke,ge,ue,ve,23,4),ue+4}h.prototype.writeFloatLE=function(ge,ue,ve){return q(this,ge,ue,!0,ve)},h.prototype.writeFloatBE=function(ge,ue,ve){return q(this,ge,ue,!1,ve)};function $(ke,ge,ue,ve,se){return ge=+ge,ue=ue>>>0,se||Y(ke,ge,ue,8,17976931348623157e292,-17976931348623157e292),n.write(ke,ge,ue,ve,52,8),ue+8}h.prototype.writeDoubleLE=function(ge,ue,ve){return $(this,ge,ue,!0,ve)},h.prototype.writeDoubleBE=function(ge,ue,ve){return $(this,ge,ue,!1,ve)},h.prototype.copy=function(ge,ue,ve,se){if(!h.isBuffer(ge))throw new TypeError("argument should be a Buffer");if(ve||(ve=0),!se&&se!==0&&(se=this.length),ue>=ge.length&&(ue=ge.length),ue||(ue=0),se>0&&se=this.length)throw new RangeError("Index out of range");if(se<0)throw new RangeError("sourceEnd out of bounds");se>this.length&&(se=this.length),ge.length-ue>>0,ve=ve===void 0?this.length:ve>>>0,ge||(ge=0);var Fe;if(typeof ge=="number")for(Fe=ue;Fe55295&&ue<57344){if(!se){if(ue>56319){(ge-=3)>-1&&Te.push(239,191,189);continue}else if(Fe+1===ve){(ge-=3)>-1&&Te.push(239,191,189);continue}se=ue;continue}if(ue<56320){(ge-=3)>-1&&Te.push(239,191,189),se=ue;continue}ue=(se-55296<<10|ue-56320)+65536}else se&&(ge-=3)>-1&&Te.push(239,191,189);if(se=null,ue<128){if((ge-=1)<0)break;Te.push(ue)}else if(ue<2048){if((ge-=2)<0)break;Te.push(ue>>6|192,ue&63|128)}else if(ue<65536){if((ge-=3)<0)break;Te.push(ue>>12|224,ue>>6&63|128,ue&63|128)}else if(ue<1114112){if((ge-=4)<0)break;Te.push(ue>>18|240,ue>>12&63|128,ue>>6&63|128,ue&63|128)}else throw new Error("Invalid code point")}return Te}function ye(ke){for(var ge=[],ue=0;ue>8,se=ue%256,Te.push(se),Te.push(ve);return Te}function Ae(ke){return r.toByteArray(ne(ke))}function Me(ke,ge,ue,ve){for(var se=0;se=ge.length||se>=ke.length);++se)ge[se+ue]=ke[se];return se}function Ie(ke,ge){return ke instanceof ge||ke!=null&&ke.constructor!=null&&ke.constructor.name!=null&&ke.constructor.name===ge.name}function Ue(ke){return ke!==ke}var qe=function(){for(var ke="0123456789abcdef",ge=new Array(256),ue=0;ue<16;++ue)for(var ve=ue*16,se=0;se<16;++se)ge[ve+se]=ke[ue]+ke[se];return ge}()},9216:function(l){"use strict";l.exports=r,l.exports.isMobile=r,l.exports.default=r;let e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,a=/android|ipad|playbook|silk/i;function r(n){n||(n={});let o=n.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;let s=e.test(o)&&!t.test(o)||!!n.tablet&&a.test(o);return!s&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(l,e,t){"use strict";l.exports=c;var a=t(7261),r=t(9977),n=t(1811);function o(m,h){this._controllerNames=Object.keys(m),this._controllerList=this._controllerNames.map(function(p){return m[p]}),this._mode=h,this._active=m[h],this._active||(this._mode="turntable",this._active=m.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;s.flush=function(m){for(var h=this._controllerList,p=0;p"u"?t(1538):WeakMap,r=t(2762),n=t(8116),o=new a;function s(c){var m=o.get(c),h=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!h||!c.isBuffer(h)){var p=r(c,new Float32Array([-1,-1,-1,4,4,-1]));m=n(c,[{buffer:p,type:c.FLOAT,size:2}]),m._triangleBuffer=p,o.set(c,m)}m.bind(),c.drawArrays(c.TRIANGLES,0,3),m.unbind()}l.exports=s},1085:function(l,e,t){var a=t(1371);l.exports=r;function r(n,o,s){o=typeof o=="number"?o:1,s=s||": ";var c=n.split(/\r?\n/),m=String(c.length+o-1).length;return c.map(function(h,p){var g=p+o,i=String(g).length,w=a(g,m-i);return w+s+h}).join(` +`)}},3952:function(l,e,t){"use strict";l.exports=n;var a=t(3250);function r(o,s){for(var c=new Array(s+1),m=0;m0)throw new Error("Invalid string. Length must be a multiple of 4");var C=S.indexOf("=");C===-1&&(C=M);var _=C===M?0:4-C%4;return[C,_]}function m(S){var M=c(S),C=M[0],_=M[1];return(C+_)*3/4-_}function h(S,M,C){return(M+C)*3/4-C}function p(S){var M,C=c(S),_=C[0],T=C[1],f=new r(h(S,_,T)),u=0,A=T>0?_-4:_,b;for(b=0;b>16&255,f[u++]=M>>8&255,f[u++]=M&255;return T===2&&(M=a[S.charCodeAt(b)]<<2|a[S.charCodeAt(b+1)]>>4,f[u++]=M&255),T===1&&(M=a[S.charCodeAt(b)]<<10|a[S.charCodeAt(b+1)]<<4|a[S.charCodeAt(b+2)]>>2,f[u++]=M>>8&255,f[u++]=M&255),f}function g(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function i(S,M,C){for(var _,T=[],f=M;fA?A:u+f));return _===1?(M=S[C-1],T.push(t[M>>2]+t[M<<4&63]+"==")):_===2&&(M=(S[C-2]<<8)+S[C-1],T.push(t[M>>10]+t[M>>4&63]+t[M<<2&63]+"=")),T.join("")}},3865:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,o){return a(n[0].mul(o[1]).add(o[0].mul(n[1])),n[1].mul(o[1]))}},1318:function(l){"use strict";l.exports=e;function e(t,a){return t[0].mul(a[1]).cmp(a[0].mul(t[1]))}},8697:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,o){return a(n[0].mul(o[1]),n[1].mul(o[0]))}},7842:function(l,e,t){"use strict";var a=t(6330),r=t(1533),n=t(2651),o=t(6768),s=t(869),c=t(8697);l.exports=m;function m(h,p){if(a(h))return p?c(h,m(p)):[h[0].clone(),h[1].clone()];var g=0,i,w;if(r(h))i=h.clone();else if(typeof h=="string")i=o(h);else{if(h===0)return[n(0),n(1)];if(h===Math.floor(h))i=n(h);else{for(;h!==Math.floor(h);)h=h*Math.pow(2,256),g-=256;i=n(h)}}if(a(p))i.mul(p[1]),w=p[0].clone();else if(r(p))w=p.clone();else if(typeof p=="string")w=o(p);else if(!p)w=n(1);else if(p===Math.floor(p))w=n(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),g+=256;w=n(p)}return g>0?i=i.ushln(g):g<0&&(w=w.ushln(-g)),s(i,w)}},6330:function(l,e,t){"use strict";var a=t(1533);l.exports=r;function r(n){return Array.isArray(n)&&n.length===2&&a(n[0])&&a(n[1])}},5716:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return n.cmp(new a(0))}},1369:function(l,e,t){"use strict";var a=t(5716);l.exports=r;function r(n){var o=n.length,s=n.words,c=0;if(o===1)c=s[0];else if(o===2)c=s[0]+s[1]*67108864;else for(var m=0;m20?52:c+32}},1533:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return n&&typeof n=="object"&&!!n.words}},2651:function(l,e,t){"use strict";var a=t(6859),r=t(2361);l.exports=n;function n(o){var s=r.exponent(o);return s<52?new a(o):new a(o*Math.pow(2,52-s)).ushln(s-52)}},869:function(l,e,t){"use strict";var a=t(2651),r=t(5716);l.exports=n;function n(o,s){var c=r(o),m=r(s);if(c===0)return[a(0),a(1)];if(m===0)return[a(0),a(0)];m<0&&(o=o.neg(),s=s.neg());var h=o.gcd(s);return h.cmpn(1)?[o.div(h),s.div(h)]:[o,s]}},6768:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return new a(n)}},6504:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,o){return a(n[0].mul(o[0]),n[1].mul(o[1]))}},7721:function(l,e,t){"use strict";var a=t(5716);l.exports=r;function r(n){return a(n[0])*a(n[1])}},5572:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,o){return a(n[0].mul(o[1]).sub(n[1].mul(o[0])),n[1].mul(o[1]))}},946:function(l,e,t){"use strict";var a=t(1369),r=t(4025);l.exports=n;function n(o){var s=o[0],c=o[1];if(s.cmpn(0)===0)return 0;var m=s.abs().divmod(c.abs()),h=m.div,p=a(h),g=m.mod,i=s.negative!==c.negative?-1:1;if(g.cmpn(0)===0)return i*p;if(p){var w=r(p)+4,S=a(g.ushln(w).divRound(c));return i*(p+S*Math.pow(2,-w))}else{var M=c.bitLength()-g.bitLength()+53,S=a(g.ushln(M).divRound(c));return M<1023?i*S*Math.pow(2,-M):(S*=Math.pow(2,-1023),i*S*Math.pow(2,1023-M))}}},2478:function(l){"use strict";function e(s,c,m,h,p){for(var g=p+1;h<=p;){var i=h+p>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>=0?(g=i,p=i-1):h=i+1}return g}function t(s,c,m,h,p){for(var g=p+1;h<=p;){var i=h+p>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>0?(g=i,p=i-1):h=i+1}return g}function a(s,c,m,h,p){for(var g=h-1;h<=p;){var i=h+p>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<0?(g=i,h=i+1):p=i-1}return g}function r(s,c,m,h,p){for(var g=h-1;h<=p;){var i=h+p>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<=0?(g=i,h=i+1):p=i-1}return g}function n(s,c,m,h,p){for(;h<=p;){var g=h+p>>>1,i=s[g],w=m!==void 0?m(i,c):i-c;if(w===0)return g;w<=0?h=g+1:p=g-1}return-1}function o(s,c,m,h,p,g){return typeof m=="function"?g(s,c,m,h===void 0?0:h|0,p===void 0?s.length-1:p|0):g(s,c,void 0,m===void 0?0:m|0,h===void 0?s.length-1:h|0)}l.exports={ge:function(s,c,m,h,p){return o(s,c,m,h,p,e)},gt:function(s,c,m,h,p){return o(s,c,m,h,p,t)},lt:function(s,c,m,h,p){return o(s,c,m,h,p,a)},le:function(s,c,m,h,p){return o(s,c,m,h,p,r)},eq:function(s,c,m,h,p){return o(s,c,m,h,p,n)}}},8828:function(l,e){"use strict";"use restrict";var t=32;e.INT_BITS=t,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(n<0)},e.abs=function(n){var o=n>>t-1;return(n^o)-o},e.min=function(n,o){return o^(n^o)&-(n65535)<<4,n>>>=o,s=(n>255)<<3,n>>>=s,o|=s,s=(n>15)<<2,n>>>=s,o|=s,s=(n>3)<<1,n>>>=s,o|=s,o|n>>1},e.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},e.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function a(n){var o=32;return n&=-n,n&&o--,n&65535&&(o-=16),n&16711935&&(o-=8),n&252645135&&(o-=4),n&858993459&&(o-=2),n&1431655765&&(o-=1),o}e.countTrailingZeros=a,e.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},e.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},e.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var r=new Array(256);(function(n){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;n[o]=c<>>8&255]<<16|r[n>>>16&255]<<8|r[n>>>24&255]},e.interleave2=function(n,o){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,n|o<<1},e.deinterleave2=function(n,o){return n=n>>>o&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},e.interleave3=function(n,o,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,n|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},e.deinterleave3=function(n,o){return n=n>>>o&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},e.nextCombination=function(n){var o=n|n-1;return o+1|(~o&-~o)-1>>>a(n)+1}},6859:function(l,e,t){l=t.nmd(l),function(a,r){"use strict";function n(F,P){if(!F)throw new Error(P||"Assertion failed")}function o(F,P){F.super_=P;var j=function(){};j.prototype=P.prototype,F.prototype=new j,F.prototype.constructor=F}function s(F,P,j){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((P==="le"||P==="be")&&(j=P,P=10),this._init(F||0,P||10,j||"be"))}typeof a=="object"?a.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=t(7790).Buffer}catch{}s.isBN=function(P){return P instanceof s?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===s.wordSize&&Array.isArray(P.words)},s.max=function(P,j){return P.cmp(j)>0?P:j},s.min=function(P,j){return P.cmp(j)<0?P:j},s.prototype._init=function(P,j,U){if(typeof P=="number")return this._initNumber(P,j,U);if(typeof P=="object")return this._initArray(P,j,U);j==="hex"&&(j=16),n(j===(j|0)&&j>=2&&j<=36),P=P.toString().replace(/\s+/g,"");var Z=0;P[0]==="-"&&(Z++,this.negative=1),Z=0;Z-=3)re=P[Z]|P[Z-1]<<8|P[Z-2]<<16,this.words[Q]|=re<>>26-ae&67108863,ae+=24,ae>=26&&(ae-=26,Q++);else if(U==="le")for(Z=0,Q=0;Z>>26-ae&67108863,ae+=24,ae>=26&&(ae-=26,Q++);return this.strip()};function m(F,P){var j=F.charCodeAt(P);return j>=65&&j<=70?j-55:j>=97&&j<=102?j-87:j-48&15}function h(F,P,j){var U=m(F,j);return j-1>=P&&(U|=m(F,j-1)<<4),U}s.prototype._parseHex=function(P,j,U){this.length=Math.ceil((P.length-j)/6),this.words=new Array(this.length);for(var Z=0;Z=j;Z-=2)ae=h(P,j,Z)<=18?(Q-=18,re+=1,this.words[re]|=ae>>>26):Q+=8;else{var oe=P.length-j;for(Z=oe%2===0?j+1:j;Z=18?(Q-=18,re+=1,this.words[re]|=ae>>>26):Q+=8}this.strip()};function p(F,P,j,U){for(var Z=0,Q=Math.min(F.length,j),re=P;re=49?Z+=ae-49+10:ae>=17?Z+=ae-17+10:Z+=ae}return Z}s.prototype._parseBase=function(P,j,U){this.words=[0],this.length=1;for(var Z=0,Q=1;Q<=67108863;Q*=j)Z++;Z--,Q=Q/j|0;for(var re=P.length-U,ae=re%Z,oe=Math.min(re,re-ae)+U,H=0,X=U;X1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var g=["","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"],i=[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],w=[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];s.prototype.toString=function(P,j){P=P||10,j=j|0||1;var U;if(P===16||P==="hex"){U="";for(var Z=0,Q=0,re=0;re>>24-Z&16777215,Z+=2,Z>=26&&(Z-=26,re--),Q!==0||re!==this.length-1?U=g[6-oe.length]+oe+U:U=oe+U}for(Q!==0&&(U=Q.toString(16)+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(P===(P|0)&&P>=2&&P<=36){var H=i[P],X=w[P];U="";var K=this.clone();for(K.negative=0;!K.isZero();){var G=K.modn(X).toString(P);K=K.idivn(X),K.isZero()?U=G+U:U=g[H-G.length]+G+U}for(this.isZero()&&(U="0"+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(P,j){return n(typeof c<"u"),this.toArrayLike(c,P,j)},s.prototype.toArray=function(P,j){return this.toArrayLike(Array,P,j)},s.prototype.toArrayLike=function(P,j,U){var Z=this.byteLength(),Q=U||Math.max(1,Z);n(Z<=Q,"byte array longer than desired length"),n(Q>0,"Requested array length <= 0"),this.strip();var re=j==="le",ae=new P(Q),oe,H,X=this.clone();if(re){for(H=0;!X.isZero();H++)oe=X.andln(255),X.iushrn(8),ae[H]=oe;for(;H=4096&&(U+=13,j>>>=13),j>=64&&(U+=7,j>>>=7),j>=8&&(U+=4,j>>>=4),j>=2&&(U+=2,j>>>=2),U+j},s.prototype._zeroBits=function(P){if(P===0)return 26;var j=P,U=0;return j&8191||(U+=13,j>>>=13),j&127||(U+=7,j>>>=7),j&15||(U+=4,j>>>=4),j&3||(U+=2,j>>>=2),j&1||U++,U},s.prototype.bitLength=function(){var P=this.words[this.length-1],j=this._countBits(P);return(this.length-1)*26+j};function S(F){for(var P=new Array(F.bitLength()),j=0;j>>Z}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,j=0;jP.length?this.clone().ior(P):P.clone().ior(this)},s.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},s.prototype.iuand=function(P){var j;this.length>P.length?j=P:j=this;for(var U=0;UP.length?this.clone().iand(P):P.clone().iand(this)},s.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},s.prototype.iuxor=function(P){var j,U;this.length>P.length?(j=this,U=P):(j=P,U=this);for(var Z=0;ZP.length?this.clone().ixor(P):P.clone().ixor(this)},s.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},s.prototype.inotn=function(P){n(typeof P=="number"&&P>=0);var j=Math.ceil(P/26)|0,U=P%26;this._expand(j),U>0&&j--;for(var Z=0;Z0&&(this.words[Z]=~this.words[Z]&67108863>>26-U),this.strip()},s.prototype.notn=function(P){return this.clone().inotn(P)},s.prototype.setn=function(P,j){n(typeof P=="number"&&P>=0);var U=P/26|0,Z=P%26;return this._expand(U+1),j?this.words[U]=this.words[U]|1<P.length?(U=this,Z=P):(U=P,Z=this);for(var Q=0,re=0;re>>26;for(;Q!==0&&re>>26;if(this.length=U.length,Q!==0)this.words[this.length]=Q,this.length++;else if(U!==this)for(;reP.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var j=this.iadd(P);return P.negative=1,j._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var U=this.cmp(P);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var Z,Q;U>0?(Z=this,Q=P):(Z=P,Q=this);for(var re=0,ae=0;ae>26,this.words[ae]=j&67108863;for(;re!==0&&ae>26,this.words[ae]=j&67108863;if(re===0&&ae>>26,K=oe&67108863,G=Math.min(H,P.length-1),Y=Math.max(0,H-F.length+1);Y<=G;Y++){var q=H-Y|0;Z=F.words[q]|0,Q=P.words[Y]|0,re=Z*Q+K,X+=re/67108864|0,K=re&67108863}j.words[H]=K|0,oe=X|0}return oe!==0?j.words[H]=oe|0:j.length--,j.strip()}var C=function(P,j,U){var Z=P.words,Q=j.words,re=U.words,ae=0,oe,H,X,K=Z[0]|0,G=K&8191,Y=K>>>13,q=Z[1]|0,$=q&8191,ee=q>>>13,ne=Z[2]|0,fe=ne&8191,ye=ne>>>13,xe=Z[3]|0,Ae=xe&8191,Me=xe>>>13,Ie=Z[4]|0,Ue=Ie&8191,qe=Ie>>>13,ke=Z[5]|0,ge=ke&8191,ue=ke>>>13,ve=Z[6]|0,se=ve&8191,Te=ve>>>13,Fe=Z[7]|0,We=Fe&8191,Ge=Fe>>>13,gt=Z[8]|0,mt=gt&8191,Tt=gt>>>13,At=Z[9]|0,Kt=At&8191,nr=At>>>13,_r=Q[0]|0,Zt=_r&8191,sr=_r>>>13,Ot=Q[1]|0,vt=Ot&8191,ht=Ot>>>13,Re=Q[2]|0,Be=Re&8191,He=Re>>>13,$e=Q[3]|0,Ze=$e&8191,Je=$e>>>13,Mt=Q[4]|0,dt=Mt&8191,Dt=Mt>>>13,Ct=Q[5]|0,Vt=Ct&8191,Ht=Ct>>>13,Wt=Q[6]|0,Sr=Wt&8191,on=Wt>>>13,$t=Q[7]|0,It=$t&8191,ir=$t>>>13,cr=Q[8]|0,fr=cr&8191,Ir=cr>>>13,ln=Q[9]|0,nn=ln&8191,wn=ln>>>13;U.negative=P.negative^j.negative,U.length=19,oe=Math.imul(G,Zt),H=Math.imul(G,sr),H=H+Math.imul(Y,Zt)|0,X=Math.imul(Y,sr);var Un=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Un>>>26)|0,Un&=67108863,oe=Math.imul($,Zt),H=Math.imul($,sr),H=H+Math.imul(ee,Zt)|0,X=Math.imul(ee,sr),oe=oe+Math.imul(G,vt)|0,H=H+Math.imul(G,ht)|0,H=H+Math.imul(Y,vt)|0,X=X+Math.imul(Y,ht)|0;var jn=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(jn>>>26)|0,jn&=67108863,oe=Math.imul(fe,Zt),H=Math.imul(fe,sr),H=H+Math.imul(ye,Zt)|0,X=Math.imul(ye,sr),oe=oe+Math.imul($,vt)|0,H=H+Math.imul($,ht)|0,H=H+Math.imul(ee,vt)|0,X=X+Math.imul(ee,ht)|0,oe=oe+Math.imul(G,Be)|0,H=H+Math.imul(G,He)|0,H=H+Math.imul(Y,Be)|0,X=X+Math.imul(Y,He)|0;var Aa=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Aa>>>26)|0,Aa&=67108863,oe=Math.imul(Ae,Zt),H=Math.imul(Ae,sr),H=H+Math.imul(Me,Zt)|0,X=Math.imul(Me,sr),oe=oe+Math.imul(fe,vt)|0,H=H+Math.imul(fe,ht)|0,H=H+Math.imul(ye,vt)|0,X=X+Math.imul(ye,ht)|0,oe=oe+Math.imul($,Be)|0,H=H+Math.imul($,He)|0,H=H+Math.imul(ee,Be)|0,X=X+Math.imul(ee,He)|0,oe=oe+Math.imul(G,Ze)|0,H=H+Math.imul(G,Je)|0,H=H+Math.imul(Y,Ze)|0,X=X+Math.imul(Y,Je)|0;var ua=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ua>>>26)|0,ua&=67108863,oe=Math.imul(Ue,Zt),H=Math.imul(Ue,sr),H=H+Math.imul(qe,Zt)|0,X=Math.imul(qe,sr),oe=oe+Math.imul(Ae,vt)|0,H=H+Math.imul(Ae,ht)|0,H=H+Math.imul(Me,vt)|0,X=X+Math.imul(Me,ht)|0,oe=oe+Math.imul(fe,Be)|0,H=H+Math.imul(fe,He)|0,H=H+Math.imul(ye,Be)|0,X=X+Math.imul(ye,He)|0,oe=oe+Math.imul($,Ze)|0,H=H+Math.imul($,Je)|0,H=H+Math.imul(ee,Ze)|0,X=X+Math.imul(ee,Je)|0,oe=oe+Math.imul(G,dt)|0,H=H+Math.imul(G,Dt)|0,H=H+Math.imul(Y,dt)|0,X=X+Math.imul(Y,Dt)|0;var Qn=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Qn>>>26)|0,Qn&=67108863,oe=Math.imul(ge,Zt),H=Math.imul(ge,sr),H=H+Math.imul(ue,Zt)|0,X=Math.imul(ue,sr),oe=oe+Math.imul(Ue,vt)|0,H=H+Math.imul(Ue,ht)|0,H=H+Math.imul(qe,vt)|0,X=X+Math.imul(qe,ht)|0,oe=oe+Math.imul(Ae,Be)|0,H=H+Math.imul(Ae,He)|0,H=H+Math.imul(Me,Be)|0,X=X+Math.imul(Me,He)|0,oe=oe+Math.imul(fe,Ze)|0,H=H+Math.imul(fe,Je)|0,H=H+Math.imul(ye,Ze)|0,X=X+Math.imul(ye,Je)|0,oe=oe+Math.imul($,dt)|0,H=H+Math.imul($,Dt)|0,H=H+Math.imul(ee,dt)|0,X=X+Math.imul(ee,Dt)|0,oe=oe+Math.imul(G,Vt)|0,H=H+Math.imul(G,Ht)|0,H=H+Math.imul(Y,Vt)|0,X=X+Math.imul(Y,Ht)|0;var ei=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ei>>>26)|0,ei&=67108863,oe=Math.imul(se,Zt),H=Math.imul(se,sr),H=H+Math.imul(Te,Zt)|0,X=Math.imul(Te,sr),oe=oe+Math.imul(ge,vt)|0,H=H+Math.imul(ge,ht)|0,H=H+Math.imul(ue,vt)|0,X=X+Math.imul(ue,ht)|0,oe=oe+Math.imul(Ue,Be)|0,H=H+Math.imul(Ue,He)|0,H=H+Math.imul(qe,Be)|0,X=X+Math.imul(qe,He)|0,oe=oe+Math.imul(Ae,Ze)|0,H=H+Math.imul(Ae,Je)|0,H=H+Math.imul(Me,Ze)|0,X=X+Math.imul(Me,Je)|0,oe=oe+Math.imul(fe,dt)|0,H=H+Math.imul(fe,Dt)|0,H=H+Math.imul(ye,dt)|0,X=X+Math.imul(ye,Dt)|0,oe=oe+Math.imul($,Vt)|0,H=H+Math.imul($,Ht)|0,H=H+Math.imul(ee,Vt)|0,X=X+Math.imul(ee,Ht)|0,oe=oe+Math.imul(G,Sr)|0,H=H+Math.imul(G,on)|0,H=H+Math.imul(Y,Sr)|0,X=X+Math.imul(Y,on)|0;var Fa=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Fa>>>26)|0,Fa&=67108863,oe=Math.imul(We,Zt),H=Math.imul(We,sr),H=H+Math.imul(Ge,Zt)|0,X=Math.imul(Ge,sr),oe=oe+Math.imul(se,vt)|0,H=H+Math.imul(se,ht)|0,H=H+Math.imul(Te,vt)|0,X=X+Math.imul(Te,ht)|0,oe=oe+Math.imul(ge,Be)|0,H=H+Math.imul(ge,He)|0,H=H+Math.imul(ue,Be)|0,X=X+Math.imul(ue,He)|0,oe=oe+Math.imul(Ue,Ze)|0,H=H+Math.imul(Ue,Je)|0,H=H+Math.imul(qe,Ze)|0,X=X+Math.imul(qe,Je)|0,oe=oe+Math.imul(Ae,dt)|0,H=H+Math.imul(Ae,Dt)|0,H=H+Math.imul(Me,dt)|0,X=X+Math.imul(Me,Dt)|0,oe=oe+Math.imul(fe,Vt)|0,H=H+Math.imul(fe,Ht)|0,H=H+Math.imul(ye,Vt)|0,X=X+Math.imul(ye,Ht)|0,oe=oe+Math.imul($,Sr)|0,H=H+Math.imul($,on)|0,H=H+Math.imul(ee,Sr)|0,X=X+Math.imul(ee,on)|0,oe=oe+Math.imul(G,It)|0,H=H+Math.imul(G,ir)|0,H=H+Math.imul(Y,It)|0,X=X+Math.imul(Y,ir)|0;var ai=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ai>>>26)|0,ai&=67108863,oe=Math.imul(mt,Zt),H=Math.imul(mt,sr),H=H+Math.imul(Tt,Zt)|0,X=Math.imul(Tt,sr),oe=oe+Math.imul(We,vt)|0,H=H+Math.imul(We,ht)|0,H=H+Math.imul(Ge,vt)|0,X=X+Math.imul(Ge,ht)|0,oe=oe+Math.imul(se,Be)|0,H=H+Math.imul(se,He)|0,H=H+Math.imul(Te,Be)|0,X=X+Math.imul(Te,He)|0,oe=oe+Math.imul(ge,Ze)|0,H=H+Math.imul(ge,Je)|0,H=H+Math.imul(ue,Ze)|0,X=X+Math.imul(ue,Je)|0,oe=oe+Math.imul(Ue,dt)|0,H=H+Math.imul(Ue,Dt)|0,H=H+Math.imul(qe,dt)|0,X=X+Math.imul(qe,Dt)|0,oe=oe+Math.imul(Ae,Vt)|0,H=H+Math.imul(Ae,Ht)|0,H=H+Math.imul(Me,Vt)|0,X=X+Math.imul(Me,Ht)|0,oe=oe+Math.imul(fe,Sr)|0,H=H+Math.imul(fe,on)|0,H=H+Math.imul(ye,Sr)|0,X=X+Math.imul(ye,on)|0,oe=oe+Math.imul($,It)|0,H=H+Math.imul($,ir)|0,H=H+Math.imul(ee,It)|0,X=X+Math.imul(ee,ir)|0,oe=oe+Math.imul(G,fr)|0,H=H+Math.imul(G,Ir)|0,H=H+Math.imul(Y,fr)|0,X=X+Math.imul(Y,Ir)|0;var Mi=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,oe=Math.imul(Kt,Zt),H=Math.imul(Kt,sr),H=H+Math.imul(nr,Zt)|0,X=Math.imul(nr,sr),oe=oe+Math.imul(mt,vt)|0,H=H+Math.imul(mt,ht)|0,H=H+Math.imul(Tt,vt)|0,X=X+Math.imul(Tt,ht)|0,oe=oe+Math.imul(We,Be)|0,H=H+Math.imul(We,He)|0,H=H+Math.imul(Ge,Be)|0,X=X+Math.imul(Ge,He)|0,oe=oe+Math.imul(se,Ze)|0,H=H+Math.imul(se,Je)|0,H=H+Math.imul(Te,Ze)|0,X=X+Math.imul(Te,Je)|0,oe=oe+Math.imul(ge,dt)|0,H=H+Math.imul(ge,Dt)|0,H=H+Math.imul(ue,dt)|0,X=X+Math.imul(ue,Dt)|0,oe=oe+Math.imul(Ue,Vt)|0,H=H+Math.imul(Ue,Ht)|0,H=H+Math.imul(qe,Vt)|0,X=X+Math.imul(qe,Ht)|0,oe=oe+Math.imul(Ae,Sr)|0,H=H+Math.imul(Ae,on)|0,H=H+Math.imul(Me,Sr)|0,X=X+Math.imul(Me,on)|0,oe=oe+Math.imul(fe,It)|0,H=H+Math.imul(fe,ir)|0,H=H+Math.imul(ye,It)|0,X=X+Math.imul(ye,ir)|0,oe=oe+Math.imul($,fr)|0,H=H+Math.imul($,Ir)|0,H=H+Math.imul(ee,fr)|0,X=X+Math.imul(ee,Ir)|0,oe=oe+Math.imul(G,nn)|0,H=H+Math.imul(G,wn)|0,H=H+Math.imul(Y,nn)|0,X=X+Math.imul(Y,wn)|0;var ci=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ci>>>26)|0,ci&=67108863,oe=Math.imul(Kt,vt),H=Math.imul(Kt,ht),H=H+Math.imul(nr,vt)|0,X=Math.imul(nr,ht),oe=oe+Math.imul(mt,Be)|0,H=H+Math.imul(mt,He)|0,H=H+Math.imul(Tt,Be)|0,X=X+Math.imul(Tt,He)|0,oe=oe+Math.imul(We,Ze)|0,H=H+Math.imul(We,Je)|0,H=H+Math.imul(Ge,Ze)|0,X=X+Math.imul(Ge,Je)|0,oe=oe+Math.imul(se,dt)|0,H=H+Math.imul(se,Dt)|0,H=H+Math.imul(Te,dt)|0,X=X+Math.imul(Te,Dt)|0,oe=oe+Math.imul(ge,Vt)|0,H=H+Math.imul(ge,Ht)|0,H=H+Math.imul(ue,Vt)|0,X=X+Math.imul(ue,Ht)|0,oe=oe+Math.imul(Ue,Sr)|0,H=H+Math.imul(Ue,on)|0,H=H+Math.imul(qe,Sr)|0,X=X+Math.imul(qe,on)|0,oe=oe+Math.imul(Ae,It)|0,H=H+Math.imul(Ae,ir)|0,H=H+Math.imul(Me,It)|0,X=X+Math.imul(Me,ir)|0,oe=oe+Math.imul(fe,fr)|0,H=H+Math.imul(fe,Ir)|0,H=H+Math.imul(ye,fr)|0,X=X+Math.imul(ye,Ir)|0,oe=oe+Math.imul($,nn)|0,H=H+Math.imul($,wn)|0,H=H+Math.imul(ee,nn)|0,X=X+Math.imul(ee,wn)|0;var ba=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ba>>>26)|0,ba&=67108863,oe=Math.imul(Kt,Be),H=Math.imul(Kt,He),H=H+Math.imul(nr,Be)|0,X=Math.imul(nr,He),oe=oe+Math.imul(mt,Ze)|0,H=H+Math.imul(mt,Je)|0,H=H+Math.imul(Tt,Ze)|0,X=X+Math.imul(Tt,Je)|0,oe=oe+Math.imul(We,dt)|0,H=H+Math.imul(We,Dt)|0,H=H+Math.imul(Ge,dt)|0,X=X+Math.imul(Ge,Dt)|0,oe=oe+Math.imul(se,Vt)|0,H=H+Math.imul(se,Ht)|0,H=H+Math.imul(Te,Vt)|0,X=X+Math.imul(Te,Ht)|0,oe=oe+Math.imul(ge,Sr)|0,H=H+Math.imul(ge,on)|0,H=H+Math.imul(ue,Sr)|0,X=X+Math.imul(ue,on)|0,oe=oe+Math.imul(Ue,It)|0,H=H+Math.imul(Ue,ir)|0,H=H+Math.imul(qe,It)|0,X=X+Math.imul(qe,ir)|0,oe=oe+Math.imul(Ae,fr)|0,H=H+Math.imul(Ae,Ir)|0,H=H+Math.imul(Me,fr)|0,X=X+Math.imul(Me,Ir)|0,oe=oe+Math.imul(fe,nn)|0,H=H+Math.imul(fe,wn)|0,H=H+Math.imul(ye,nn)|0,X=X+Math.imul(ye,wn)|0;var pa=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(pa>>>26)|0,pa&=67108863,oe=Math.imul(Kt,Ze),H=Math.imul(Kt,Je),H=H+Math.imul(nr,Ze)|0,X=Math.imul(nr,Je),oe=oe+Math.imul(mt,dt)|0,H=H+Math.imul(mt,Dt)|0,H=H+Math.imul(Tt,dt)|0,X=X+Math.imul(Tt,Dt)|0,oe=oe+Math.imul(We,Vt)|0,H=H+Math.imul(We,Ht)|0,H=H+Math.imul(Ge,Vt)|0,X=X+Math.imul(Ge,Ht)|0,oe=oe+Math.imul(se,Sr)|0,H=H+Math.imul(se,on)|0,H=H+Math.imul(Te,Sr)|0,X=X+Math.imul(Te,on)|0,oe=oe+Math.imul(ge,It)|0,H=H+Math.imul(ge,ir)|0,H=H+Math.imul(ue,It)|0,X=X+Math.imul(ue,ir)|0,oe=oe+Math.imul(Ue,fr)|0,H=H+Math.imul(Ue,Ir)|0,H=H+Math.imul(qe,fr)|0,X=X+Math.imul(qe,Ir)|0,oe=oe+Math.imul(Ae,nn)|0,H=H+Math.imul(Ae,wn)|0,H=H+Math.imul(Me,nn)|0,X=X+Math.imul(Me,wn)|0;var Ii=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,oe=Math.imul(Kt,dt),H=Math.imul(Kt,Dt),H=H+Math.imul(nr,dt)|0,X=Math.imul(nr,Dt),oe=oe+Math.imul(mt,Vt)|0,H=H+Math.imul(mt,Ht)|0,H=H+Math.imul(Tt,Vt)|0,X=X+Math.imul(Tt,Ht)|0,oe=oe+Math.imul(We,Sr)|0,H=H+Math.imul(We,on)|0,H=H+Math.imul(Ge,Sr)|0,X=X+Math.imul(Ge,on)|0,oe=oe+Math.imul(se,It)|0,H=H+Math.imul(se,ir)|0,H=H+Math.imul(Te,It)|0,X=X+Math.imul(Te,ir)|0,oe=oe+Math.imul(ge,fr)|0,H=H+Math.imul(ge,Ir)|0,H=H+Math.imul(ue,fr)|0,X=X+Math.imul(ue,Ir)|0,oe=oe+Math.imul(Ue,nn)|0,H=H+Math.imul(Ue,wn)|0,H=H+Math.imul(qe,nn)|0,X=X+Math.imul(qe,wn)|0;var ho=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ho>>>26)|0,ho&=67108863,oe=Math.imul(Kt,Vt),H=Math.imul(Kt,Ht),H=H+Math.imul(nr,Vt)|0,X=Math.imul(nr,Ht),oe=oe+Math.imul(mt,Sr)|0,H=H+Math.imul(mt,on)|0,H=H+Math.imul(Tt,Sr)|0,X=X+Math.imul(Tt,on)|0,oe=oe+Math.imul(We,It)|0,H=H+Math.imul(We,ir)|0,H=H+Math.imul(Ge,It)|0,X=X+Math.imul(Ge,ir)|0,oe=oe+Math.imul(se,fr)|0,H=H+Math.imul(se,Ir)|0,H=H+Math.imul(Te,fr)|0,X=X+Math.imul(Te,Ir)|0,oe=oe+Math.imul(ge,nn)|0,H=H+Math.imul(ge,wn)|0,H=H+Math.imul(ue,nn)|0,X=X+Math.imul(ue,wn)|0;var da=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(da>>>26)|0,da&=67108863,oe=Math.imul(Kt,Sr),H=Math.imul(Kt,on),H=H+Math.imul(nr,Sr)|0,X=Math.imul(nr,on),oe=oe+Math.imul(mt,It)|0,H=H+Math.imul(mt,ir)|0,H=H+Math.imul(Tt,It)|0,X=X+Math.imul(Tt,ir)|0,oe=oe+Math.imul(We,fr)|0,H=H+Math.imul(We,Ir)|0,H=H+Math.imul(Ge,fr)|0,X=X+Math.imul(Ge,Ir)|0,oe=oe+Math.imul(se,nn)|0,H=H+Math.imul(se,wn)|0,H=H+Math.imul(Te,nn)|0,X=X+Math.imul(Te,wn)|0;var Kn=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(Kn>>>26)|0,Kn&=67108863,oe=Math.imul(Kt,It),H=Math.imul(Kt,ir),H=H+Math.imul(nr,It)|0,X=Math.imul(nr,ir),oe=oe+Math.imul(mt,fr)|0,H=H+Math.imul(mt,Ir)|0,H=H+Math.imul(Tt,fr)|0,X=X+Math.imul(Tt,Ir)|0,oe=oe+Math.imul(We,nn)|0,H=H+Math.imul(We,wn)|0,H=H+Math.imul(Ge,nn)|0,X=X+Math.imul(Ge,wn)|0;var ot=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(ot>>>26)|0,ot&=67108863,oe=Math.imul(Kt,fr),H=Math.imul(Kt,Ir),H=H+Math.imul(nr,fr)|0,X=Math.imul(nr,Ir),oe=oe+Math.imul(mt,nn)|0,H=H+Math.imul(mt,wn)|0,H=H+Math.imul(Tt,nn)|0,X=X+Math.imul(Tt,wn)|0;var et=(ae+oe|0)+((H&8191)<<13)|0;ae=(X+(H>>>13)|0)+(et>>>26)|0,et&=67108863,oe=Math.imul(Kt,nn),H=Math.imul(Kt,wn),H=H+Math.imul(nr,nn)|0,X=Math.imul(nr,wn);var hr=(ae+oe|0)+((H&8191)<<13)|0;return ae=(X+(H>>>13)|0)+(hr>>>26)|0,hr&=67108863,re[0]=Un,re[1]=jn,re[2]=Aa,re[3]=ua,re[4]=Qn,re[5]=ei,re[6]=Fa,re[7]=ai,re[8]=Mi,re[9]=ci,re[10]=ba,re[11]=pa,re[12]=Ii,re[13]=ho,re[14]=da,re[15]=Kn,re[16]=ot,re[17]=et,re[18]=hr,ae!==0&&(re[19]=ae,U.length++),U};Math.imul||(C=M);function _(F,P,j){j.negative=P.negative^F.negative,j.length=F.length+P.length;for(var U=0,Z=0,Q=0;Q>>26)|0,Z+=re>>>26,re&=67108863}j.words[Q]=ae,U=re,re=Z}return U!==0?j.words[Q]=U:j.length--,j.strip()}function T(F,P,j){var U=new f;return U.mulp(F,P,j)}s.prototype.mulTo=function(P,j){var U,Z=this.length+P.length;return this.length===10&&P.length===10?U=C(this,P,j):Z<63?U=M(this,P,j):Z<1024?U=_(this,P,j):U=T(this,P,j),U};function f(F,P){this.x=F,this.y=P}f.prototype.makeRBT=function(P){for(var j=new Array(P),U=s.prototype._countBits(P)-1,Z=0;Z>=1;return Z},f.prototype.permute=function(P,j,U,Z,Q,re){for(var ae=0;ae>>1)Q++;return 1<>>13,U[2*re+1]=Q&8191,Q=Q>>>13;for(re=2*j;re>=26,j+=Z/67108864|0,j+=Q>>>26,this.words[U]=Q&67108863}return j!==0&&(this.words[U]=j,this.length++),this.length=P===0?1:this.length,this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var j=S(P);if(j.length===0)return new s(1);for(var U=this,Z=0;Z=0);var j=P%26,U=(P-j)/26,Z=67108863>>>26-j<<26-j,Q;if(j!==0){var re=0;for(Q=0;Q>>26-j}re&&(this.words[Q]=re,this.length++)}if(U!==0){for(Q=this.length-1;Q>=0;Q--)this.words[Q+U]=this.words[Q];for(Q=0;Q=0);var Z;j?Z=(j-j%26)/26:Z=0;var Q=P%26,re=Math.min((P-Q)/26,this.length),ae=67108863^67108863>>>Q<re)for(this.length-=re,H=0;H=0&&(X!==0||H>=Z);H--){var K=this.words[H]|0;this.words[H]=X<<26-Q|K>>>Q,X=K&ae}return oe&&X!==0&&(oe.words[oe.length++]=X),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,j,U){return n(this.negative===0),this.iushrn(P,j,U)},s.prototype.shln=function(P){return this.clone().ishln(P)},s.prototype.ushln=function(P){return this.clone().iushln(P)},s.prototype.shrn=function(P){return this.clone().ishrn(P)},s.prototype.ushrn=function(P){return this.clone().iushrn(P)},s.prototype.testn=function(P){n(typeof P=="number"&&P>=0);var j=P%26,U=(P-j)/26,Z=1<=0);var j=P%26,U=(P-j)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(j!==0&&U++,this.length=Math.min(U,this.length),j!==0){var Z=67108863^67108863>>>j<=67108864;j++)this.words[j]-=67108864,j===this.length-1?this.words[j+1]=1:this.words[j+1]++;return this.length=Math.max(this.length,j+1),this},s.prototype.isubn=function(P){if(n(typeof P=="number"),n(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var j=0;j>26)-(oe/67108864|0),this.words[Q+U]=re&67108863}for(;Q>26,this.words[Q+U]=re&67108863;if(ae===0)return this.strip();for(n(ae===-1),ae=0,Q=0;Q>26,this.words[Q]=re&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,j){var U=this.length-P.length,Z=this.clone(),Q=P,re=Q.words[Q.length-1]|0,ae=this._countBits(re);U=26-ae,U!==0&&(Q=Q.ushln(U),Z.iushln(U),re=Q.words[Q.length-1]|0);var oe=Z.length-Q.length,H;if(j!=="mod"){H=new s(null),H.length=oe+1,H.words=new Array(H.length);for(var X=0;X=0;G--){var Y=(Z.words[Q.length+G]|0)*67108864+(Z.words[Q.length+G-1]|0);for(Y=Math.min(Y/re|0,67108863),Z._ishlnsubmul(Q,Y,G);Z.negative!==0;)Y--,Z.negative=0,Z._ishlnsubmul(Q,1,G),Z.isZero()||(Z.negative^=1);H&&(H.words[G]=Y)}return H&&H.strip(),Z.strip(),j!=="div"&&U!==0&&Z.iushrn(U),{div:H||null,mod:Z}},s.prototype.divmod=function(P,j,U){if(n(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var Z,Q,re;return this.negative!==0&&P.negative===0?(re=this.neg().divmod(P,j),j!=="mod"&&(Z=re.div.neg()),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.iadd(P)),{div:Z,mod:Q}):this.negative===0&&P.negative!==0?(re=this.divmod(P.neg(),j),j!=="mod"&&(Z=re.div.neg()),{div:Z,mod:re.mod}):this.negative&P.negative?(re=this.neg().divmod(P.neg(),j),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.isub(P)),{div:re.div,mod:Q}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?j==="div"?{div:this.divn(P.words[0]),mod:null}:j==="mod"?{div:null,mod:new s(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new s(this.modn(P.words[0]))}:this._wordDiv(P,j)},s.prototype.div=function(P){return this.divmod(P,"div",!1).div},s.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},s.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},s.prototype.divRound=function(P){var j=this.divmod(P);if(j.mod.isZero())return j.div;var U=j.div.negative!==0?j.mod.isub(P):j.mod,Z=P.ushrn(1),Q=P.andln(1),re=U.cmp(Z);return re<0||Q===1&&re===0?j.div:j.div.negative!==0?j.div.isubn(1):j.div.iaddn(1)},s.prototype.modn=function(P){n(P<=67108863);for(var j=(1<<26)%P,U=0,Z=this.length-1;Z>=0;Z--)U=(j*U+(this.words[Z]|0))%P;return U},s.prototype.idivn=function(P){n(P<=67108863);for(var j=0,U=this.length-1;U>=0;U--){var Z=(this.words[U]|0)+j*67108864;this.words[U]=Z/P|0,j=Z%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){n(P.negative===0),n(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var Z=new s(1),Q=new s(0),re=new s(0),ae=new s(1),oe=0;j.isEven()&&U.isEven();)j.iushrn(1),U.iushrn(1),++oe;for(var H=U.clone(),X=j.clone();!j.isZero();){for(var K=0,G=1;!(j.words[0]&G)&&K<26;++K,G<<=1);if(K>0)for(j.iushrn(K);K-- >0;)(Z.isOdd()||Q.isOdd())&&(Z.iadd(H),Q.isub(X)),Z.iushrn(1),Q.iushrn(1);for(var Y=0,q=1;!(U.words[0]&q)&&Y<26;++Y,q<<=1);if(Y>0)for(U.iushrn(Y);Y-- >0;)(re.isOdd()||ae.isOdd())&&(re.iadd(H),ae.isub(X)),re.iushrn(1),ae.iushrn(1);j.cmp(U)>=0?(j.isub(U),Z.isub(re),Q.isub(ae)):(U.isub(j),re.isub(Z),ae.isub(Q))}return{a:re,b:ae,gcd:U.iushln(oe)}},s.prototype._invmp=function(P){n(P.negative===0),n(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var Z=new s(1),Q=new s(0),re=U.clone();j.cmpn(1)>0&&U.cmpn(1)>0;){for(var ae=0,oe=1;!(j.words[0]&oe)&&ae<26;++ae,oe<<=1);if(ae>0)for(j.iushrn(ae);ae-- >0;)Z.isOdd()&&Z.iadd(re),Z.iushrn(1);for(var H=0,X=1;!(U.words[0]&X)&&H<26;++H,X<<=1);if(H>0)for(U.iushrn(H);H-- >0;)Q.isOdd()&&Q.iadd(re),Q.iushrn(1);j.cmp(U)>=0?(j.isub(U),Z.isub(Q)):(U.isub(j),Q.isub(Z))}var K;return j.cmpn(1)===0?K=Z:K=Q,K.cmpn(0)<0&&K.iadd(P),K},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var j=this.clone(),U=P.clone();j.negative=0,U.negative=0;for(var Z=0;j.isEven()&&U.isEven();Z++)j.iushrn(1),U.iushrn(1);do{for(;j.isEven();)j.iushrn(1);for(;U.isEven();)U.iushrn(1);var Q=j.cmp(U);if(Q<0){var re=j;j=U,U=re}else if(Q===0||U.cmpn(1)===0)break;j.isub(U)}while(!0);return U.iushln(Z)},s.prototype.invm=function(P){return this.egcd(P).a.umod(P)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(P){return this.words[0]&P},s.prototype.bincn=function(P){n(typeof P=="number");var j=P%26,U=(P-j)/26,Z=1<>>26,ae&=67108863,this.words[re]=ae}return Q!==0&&(this.words[re]=Q,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var j=P<0;if(this.negative!==0&&!j)return-1;if(this.negative===0&&j)return 1;this.strip();var U;if(this.length>1)U=1;else{j&&(P=-P),n(P<=67108863,"Number is too big");var Z=this.words[0]|0;U=Z===P?0:ZP.length)return 1;if(this.length=0;U--){var Z=this.words[U]|0,Q=P.words[U]|0;if(Z!==Q){ZQ&&(j=1);break}}return j},s.prototype.gtn=function(P){return this.cmpn(P)===1},s.prototype.gt=function(P){return this.cmp(P)===1},s.prototype.gten=function(P){return this.cmpn(P)>=0},s.prototype.gte=function(P){return this.cmp(P)>=0},s.prototype.ltn=function(P){return this.cmpn(P)===-1},s.prototype.lt=function(P){return this.cmp(P)===-1},s.prototype.lten=function(P){return this.cmpn(P)<=0},s.prototype.lte=function(P){return this.cmp(P)<=0},s.prototype.eqn=function(P){return this.cmpn(P)===0},s.prototype.eq=function(P){return this.cmp(P)===0},s.red=function(P){return new R(P)},s.prototype.toRed=function(P){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(P){return this.red=P,this},s.prototype.forceRed=function(P){return n(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return n(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var u={k256:null,p224:null,p192:null,p25519:null};function A(F,P){this.name=F,this.p=new s(P,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}A.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},A.prototype.ireduce=function(P){var j=P,U;do this.split(j,this.tmp),j=this.imulK(j),j=j.iadd(this.tmp),U=j.bitLength();while(U>this.n);var Z=U0?j.isub(this.p):j.strip!==void 0?j.strip():j._strip(),j},A.prototype.split=function(P,j){P.iushrn(this.n,0,j)},A.prototype.imulK=function(P){return P.imul(this.k)};function b(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(b,A),b.prototype.split=function(P,j){for(var U=4194303,Z=Math.min(P.length,9),Q=0;Q>>22,re=ae}re>>>=22,P.words[Q-10]=re,re===0&&P.length>10?P.length-=10:P.length-=9},b.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var j=0,U=0;U>>=26,P.words[U]=Q,j=Z}return j!==0&&(P.words[P.length++]=j),P},s._prime=function(P){if(u[P])return u[P];var j;if(P==="k256")j=new b;else if(P==="p224")j=new z;else if(P==="p192")j=new I;else if(P==="p25519")j=new N;else throw new Error("Unknown prime "+P);return u[P]=j,j};function R(F){if(typeof F=="string"){var P=s._prime(F);this.m=P.p,this.prime=P}else n(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}R.prototype._verify1=function(P){n(P.negative===0,"red works only with positives"),n(P.red,"red works only with red numbers")},R.prototype._verify2=function(P,j){n((P.negative|j.negative)===0,"red works only with positives"),n(P.red&&P.red===j.red,"red works only with red numbers")},R.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},R.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},R.prototype.add=function(P,j){this._verify2(P,j);var U=P.add(j);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},R.prototype.iadd=function(P,j){this._verify2(P,j);var U=P.iadd(j);return U.cmp(this.m)>=0&&U.isub(this.m),U},R.prototype.sub=function(P,j){this._verify2(P,j);var U=P.sub(j);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},R.prototype.isub=function(P,j){this._verify2(P,j);var U=P.isub(j);return U.cmpn(0)<0&&U.iadd(this.m),U},R.prototype.shl=function(P,j){return this._verify1(P),this.imod(P.ushln(j))},R.prototype.imul=function(P,j){return this._verify2(P,j),this.imod(P.imul(j))},R.prototype.mul=function(P,j){return this._verify2(P,j),this.imod(P.mul(j))},R.prototype.isqr=function(P){return this.imul(P,P.clone())},R.prototype.sqr=function(P){return this.mul(P,P)},R.prototype.sqrt=function(P){if(P.isZero())return P.clone();var j=this.m.andln(3);if(n(j%2===1),j===3){var U=this.m.add(new s(1)).iushrn(2);return this.pow(P,U)}for(var Z=this.m.subn(1),Q=0;!Z.isZero()&&Z.andln(1)===0;)Q++,Z.iushrn(1);n(!Z.isZero());var re=new s(1).toRed(this),ae=re.redNeg(),oe=this.m.subn(1).iushrn(1),H=this.m.bitLength();for(H=new s(2*H*H).toRed(this);this.pow(H,oe).cmp(ae)!==0;)H.redIAdd(ae);for(var X=this.pow(H,Z),K=this.pow(P,Z.addn(1).iushrn(1)),G=this.pow(P,Z),Y=Q;G.cmp(re)!==0;){for(var q=G,$=0;q.cmp(re)!==0;$++)q=q.redSqr();n($=0;Q--){for(var X=j.words[Q],K=H-1;K>=0;K--){var G=X>>K&1;if(re!==Z[0]&&(re=this.sqr(re)),G===0&&ae===0){oe=0;continue}ae<<=1,ae|=G,oe++,!(oe!==U&&(Q!==0||K!==0))&&(re=this.mul(re,Z[ae]),oe=0,ae=0)}H=26}return re},R.prototype.convertTo=function(P){var j=P.umod(this.m);return j===P?j.clone():j},R.prototype.convertFrom=function(P){var j=P.clone();return j.red=null,j},s.mont=function(P){return new B(P)};function B(F){R.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}o(B,R),B.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},B.prototype.convertFrom=function(P){var j=this.imod(P.mul(this.rinv));return j.red=null,j},B.prototype.imul=function(P,j){if(P.isZero()||j.isZero())return P.words[0]=0,P.length=1,P;var U=P.imul(j),Z=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub(Z).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.mul=function(P,j){if(P.isZero()||j.isZero())return new s(0)._forceRed(this);var U=P.mul(j),Z=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub(Z).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.invm=function(P){var j=this.imod(P._invmp(this.m).mul(this.r2));return j._forceRed(this)}}(l,this)},6204:function(l){"use strict";l.exports=e;function e(t){var a,r,n,o=t.length,s=0;for(a=0;a>>1;if(!(f<=0)){var u,A=a.mallocDouble(2*f*_),b=a.mallocInt32(_);if(_=s(w,f,A,b),_>0){if(f===1&&C)r.init(_),u=r.sweepComplete(f,M,0,_,A,b,0,_,A,b);else{var z=a.mallocDouble(2*f*T),I=a.mallocInt32(T);T=s(S,f,z,I),T>0&&(r.init(_+T),f===1?u=r.sweepBipartite(f,M,0,_,A,b,0,T,z,I):u=n(f,M,C,_,A,b,T,z,I),a.free(z),a.free(I))}a.free(A),a.free(b)}return u}}}var m;function h(w,S){m.push([w,S])}function p(w){return m=[],c(w,w,h,!0),m}function g(w,S){return m=[],c(w,S,h,!1),m}function i(w,S,M){switch(arguments.length){case 1:return p(w);case 2:return typeof S=="function"?c(w,w,S,!0):g(w,S);case 3:return c(w,S,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(l,e){"use strict";function t(){function n(c,m,h,p,g,i,w,S,M,C,_){for(var T=2*c,f=p,u=T*p;fM-S?n(c,m,h,p,g,i,w,S,M,C,_):o(c,m,h,p,g,i,w,S,M,C,_)}return s}function a(){function n(h,p,g,i,w,S,M,C,_,T,f){for(var u=2*h,A=i,b=u*i;AT-_?i?n(h,p,g,w,S,M,C,_,T,f,u):o(h,p,g,w,S,M,C,_,T,f,u):i?s(h,p,g,w,S,M,C,_,T,f,u):c(h,p,g,w,S,M,C,_,T,f,u)}return m}function r(n){return n?t():a()}e.partial=r(!1),e.full=r(!0)},7150:function(l,e,t){"use strict";l.exports=F;var a=t(1888),r=t(8828),n=t(2455),o=n.partial,s=n.full,c=t(855),m=t(3545),h=t(8105),p=128,g=1<<22,i=1<<22,w=h("!(lo>=p0)&&!(p1>=hi)"),S=h("lo===p0"),M=h("lo0;){X-=1;var Y=X*f,q=b[Y],$=b[Y+1],ee=b[Y+2],ne=b[Y+3],fe=b[Y+4],ye=b[Y+5],xe=X*u,Ae=z[xe],Me=z[xe+1],Ie=ye&1,Ue=!!(ye&16),qe=Q,ke=re,ge=oe,ue=H;if(Ie&&(qe=oe,ke=H,ge=Q,ue=re),!(ye&2&&(ee=M(P,q,$,ee,qe,ke,Me),$>=ee))&&!(ye&4&&($=C(P,q,$,ee,qe,ke,Ae),$>=ee))){var ve=ee-$,se=fe-ne;if(Ue){if(P*ve*(ve+se)h&&g[T+m]>C;--_,T-=w){for(var f=T,u=T+w,A=0;A>>1,C=2*c,_=M,T=g[C*M+m];w=z?(_=b,T=z):A>=N?(_=u,T=A):(_=I,T=N):z>=N?(_=b,T=z):N>=A?(_=u,T=A):(_=I,T=N);for(var F=C*(S-1),P=C*_,R=0;R=p0)&&!(p1>=hi)":m};function t(h){return e[h]}function a(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+u];if(z===M)if(f===b)f+=1,T+=C;else{for(var I=0;C>I;++I){var N=w[_+I];w[_+I]=w[T],w[T++]=N}var R=S[b];S[b]=S[f],S[f++]=R}}return f}function r(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+u];if(zI;++I){var N=w[_+I];w[_+I]=w[T],w[T++]=N}var R=S[b];S[b]=S[f],S[f++]=R}}return f}function n(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+A];if(z<=M)if(f===b)f+=1,T+=C;else{for(var I=0;C>I;++I){var N=w[_+I];w[_+I]=w[T],w[T++]=N}var R=S[b];S[b]=S[f],S[f++]=R}}return f}function o(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+A];if(z<=M)if(f===b)f+=1,T+=C;else{for(var I=0;C>I;++I){var N=w[_+I];w[_+I]=w[T],w[T++]=N}var R=S[b];S[b]=S[f],S[f++]=R}}return f}function s(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+u],I=w[_+A];if(z<=M&&M<=I)if(f===b)f+=1,T+=C;else{for(var N=0;C>N;++N){var R=w[_+N];w[_+N]=w[T],w[T++]=R}var B=S[b];S[b]=S[f],S[f++]=B}}return f}function c(h,p,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=p,A=h+p,b=g;i>b;++b,_+=C){var z=w[_+u],I=w[_+A];if(zN;++N){var R=w[_+N];w[_+N]=w[T],w[T++]=R}var B=S[b];S[b]=S[f],S[f++]=B}}return f}function m(h,p,g,i,w,S,M,C){for(var _=2*h,T=_*g,f=T,u=g,A=p,b=h+p,z=g;i>z;++z,T+=_){var I=w[T+A],N=w[T+b];if(!(I>=M)&&!(C>=N))if(u===z)u+=1,f+=_;else{for(var R=0;_>R;++R){var B=w[T+R];w[T+R]=w[f],w[f++]=B}var F=S[z];S[z]=S[u],S[u++]=F}}return u}},4192:function(l){"use strict";l.exports=t;var e=32;function t(p,g){g<=4*e?a(0,g-1,p):h(0,g-1,p)}function a(p,g,i){for(var w=2*(p+1),S=p+1;S<=g;++S){for(var M=i[w++],C=i[w++],_=S,T=w-2;_-- >p;){var f=i[T-2],u=i[T-1];if(fi[g+1]:!0}function m(p,g,i,w){p*=2;var S=w[p];return S>1,_=C-w,T=C+w,f=S,u=_,A=C,b=T,z=M,I=p+1,N=g-1,R=0;c(f,u,i)&&(R=f,f=u,u=R),c(b,z,i)&&(R=b,b=z,z=R),c(f,A,i)&&(R=f,f=A,A=R),c(u,A,i)&&(R=u,u=A,A=R),c(f,b,i)&&(R=f,f=b,b=R),c(A,b,i)&&(R=A,A=b,b=R),c(u,z,i)&&(R=u,u=z,z=R),c(u,A,i)&&(R=u,u=A,A=R),c(b,z,i)&&(R=b,b=z,z=R);for(var B=i[2*u],F=i[2*u+1],P=i[2*b],j=i[2*b+1],U=2*f,Z=2*A,Q=2*z,re=2*S,ae=2*C,oe=2*M,H=0;H<2;++H){var X=i[U+H],K=i[Z+H],G=i[Q+H];i[re+H]=X,i[ae+H]=K,i[oe+H]=G}n(_,p,i),n(T,g,i);for(var Y=I;Y<=N;++Y)if(m(Y,B,F,i))Y!==I&&r(Y,I,i),++I;else if(!m(Y,P,j,i))for(;;)if(m(N,P,j,i)){m(N,B,F,i)?(o(Y,I,N,i),++I,--N):(r(Y,N,i),--N);break}else{if(--N>>1;n(w,K);for(var G=0,Y=0,ae=0;ae=o)q=q-o|0,M(h,p,Y--,q);else if(q>=0)M(c,m,G--,q);else if(q<=-o){q=-q-o|0;for(var $=0;$>>1;n(w,K);for(var G=0,Y=0,q=0,ae=0;ae>1===w[2*ae+3]>>1&&(ee=2,ae+=1),$<0){for(var ne=-($>>1)-1,fe=0;fe>1)-1;ee===0?M(c,m,G--,ne):ee===1?M(h,p,Y--,ne):ee===2&&M(g,i,q--,ne)}}}function f(A,b,z,I,N,R,B,F,P,j,U,Z){var Q=0,re=2*A,ae=b,oe=b+A,H=1,X=1;I?X=o:H=o;for(var K=N;K>>1;n(w,$);for(var ee=0,K=0;K<$;++K){var ne=w[2*K+1]|0;if(ne<0){var G=-ne,fe=!1;if(G>=o?(fe=!I,G-=o):(fe=!!I,G-=1),fe)C(c,m,ee++,G);else{var ye=Z[G],xe=re*G,Ae=U[xe+b+1],Me=U[xe+b+1+A];e:for(var Ie=0;Ie>>1;n(w,G);for(var Y=0,oe=0;oe=o)c[Y++]=H-o;else{H-=1;var $=U[H],ee=Q*H,ne=j[ee+b+1],fe=j[ee+b+1+A];e:for(var ye=0;ye=0;--ye)if(c[ye]===H){for(var Ie=ye+1;Ie0;){for(var S=m.pop(),g=m.pop(),M=-1,C=-1,i=p[g],T=1;T=0||(c.flip(g,S),n(s,c,m,M,g,C),n(s,c,m,g,C,M),n(s,c,m,C,S,M),n(s,c,m,S,M,C))}}},5023:function(l,e,t){"use strict";var a=t(2478);l.exports=m;function r(h,p,g,i,w,S,M){this.cells=h,this.neighbor=p,this.flags=i,this.constraint=g,this.active=w,this.next=S,this.boundary=M}var n=r.prototype;function o(h,p){return h[0]-p[0]||h[1]-p[1]||h[2]-p[2]}n.locate=function(){var h=[0,0,0];return function(p,g,i){var w=p,S=g,M=i;return g0||M.length>0;){for(;S.length>0;){var u=S.pop();if(C[u]!==-w){C[u]=w;for(var A=_[u],b=0;b<3;++b){var z=f[3*u+b];z>=0&&C[z]===0&&(T[3*u+b]?M.push(z):(S.push(z),C[z]=w))}}}var I=M;M=S,S=I,M.length=0,w=-w}var N=c(_,C,p);return g?N.concat(i.boundary):N}},8902:function(l,e,t){"use strict";var a=t(2478),r=t(3250)[3],n=0,o=1,s=2;l.exports=M;function c(C,_,T,f,u){this.a=C,this.b=_,this.idx=T,this.lowerIds=f,this.upperIds=u}function m(C,_,T,f){this.a=C,this.b=_,this.type=T,this.idx=f}function h(C,_){var T=C.a[0]-_.a[0]||C.a[1]-_.a[1]||C.type-_.type;return T||C.type!==n&&(T=r(C.a,C.b,_.b),T)?T:C.idx-_.idx}function p(C,_){return r(C.a,C.b,_)}function g(C,_,T,f,u){for(var A=a.lt(_,f,p),b=a.gt(_,f,p),z=A;z1&&r(T[N[B-2]],T[N[B-1]],f)>0;)C.push([N[B-1],N[B-2],u]),B-=1;N.length=B,N.push(u);for(var R=I.upperIds,B=R.length;B>1&&r(T[R[B-2]],T[R[B-1]],f)<0;)C.push([R[B-2],R[B-1],u]),B-=1;R.length=B,R.push(u)}}function i(C,_){var T;return C.a[0]<_.a[0]?T=r(C.a,C.b,_.a):T=r(_.b,_.a,C.a),T||(_.b[0]I[0]&&u.push(new m(I,z,s,A),new m(z,I,o,A))}u.sort(h);for(var N=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),R=[new c([N,1],[N,0],-1,[],[],[],[])],B=[],A=0,F=u.length;A=0}}(),n.removeTriangle=function(c,m,h){var p=this.stars;o(p[c],m,h),o(p[m],h,c),o(p[h],c,m)},n.addTriangle=function(c,m,h){var p=this.stars;p[c].push(m,h),p[m].push(h,c),p[h].push(c,m)},n.opposite=function(c,m){for(var h=this.stars[m],p=1,g=h.length;p=0;--P){var X=B[P];j=X[0];var K=N[j],G=K[0],Y=K[1],q=I[G],$=I[Y];if((q[0]-$[0]||q[1]-$[1])<0){var ee=G;G=Y,Y=ee}K[0]=G;var ne=K[1]=X[1],fe;for(F&&(fe=K[2]);P>0&&B[P-1][0]===j;){var X=B[--P],ye=X[1];F?N.push([ne,ye,fe]):N.push([ne,ye]),ne=ye}F?N.push([ne,Y,fe]):N.push([ne,Y])}return U}function _(I,N,R){for(var B=N.length,F=new a(B),P=[],j=0;jN[2]?1:0)}function u(I,N,R){if(I.length!==0){if(N)for(var B=0;B0||j.length>0}function z(I,N,R){var B;if(R){B=N;for(var F=new Array(N.length),P=0;PC+1)throw new Error(S+" map requires nshades to be at least size "+w.length);Array.isArray(m.alpha)?m.alpha.length!==2?_=[1,1]:_=m.alpha.slice():typeof m.alpha=="number"?_=[m.alpha,m.alpha]:_=[1,1],h=w.map(function(z){return Math.round(z.index*C)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var f=w.map(function(z,I){var N=w[I].index,R=w[I].rgb.slice();return R.length===4&&R[3]>=0&&R[3]<=1||(R[3]=_[0]+(_[1]-_[0])*N),R}),u=[];for(T=0;T=0}function m(h,p,g,i){var w=a(p,g,i);if(w===0){var S=r(a(h,p,g)),M=r(a(h,p,i));if(S===M){if(S===0){var C=c(h,p,g),_=c(h,p,i);return C===_?0:C?1:-1}return 0}else{if(M===0)return S>0||c(h,p,i)?-1:1;if(S===0)return M>0||c(h,p,g)?1:-1}return r(M-S)}var T=a(h,p,g);if(T>0)return w>0&&a(h,p,i)>0?1:-1;if(T<0)return w>0||a(h,p,i)>0?1:-1;var f=a(h,p,i);return f>0||c(h,p,g)?1:-1}},8572:function(l){"use strict";l.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(l){l.exports=a;var e=Math.min;function t(r,n){return r-n}function a(r,n){var o=r.length,s=r.length-n.length;if(s)return s;switch(o){case 0:return 0;case 1:return r[0]-n[0];case 2:return r[0]+r[1]-n[0]-n[1]||e(r[0],r[1])-e(n[0],n[1]);case 3:var c=r[0]+r[1],m=n[0]+n[1];if(s=c+r[2]-(m+n[2]),s)return s;var h=e(r[0],r[1]),p=e(n[0],n[1]);return e(h,r[2])-e(p,n[2])||e(h+r[2],c)-e(p+n[2],m);case 4:var g=r[0],i=r[1],w=r[2],S=r[3],M=n[0],C=n[1],_=n[2],T=n[3];return g+i+w+S-(M+C+_+T)||e(g,i,w,S)-e(M,C,_,T,M)||e(g+i,g+w,g+S,i+w,i+S,w+S)-e(M+C,M+_,M+T,C+_,C+T,_+T)||e(g+i+w,g+i+S,g+w+S,i+w+S)-e(M+C+_,M+C+T,M+_+T,C+_+T);default:for(var f=r.slice().sort(t),u=n.slice().sort(t),A=0;At[r][0]&&(r=n);return ar?[[r],[a]]:[[a]]}},4750:function(l,e,t){"use strict";l.exports=r;var a=t(3090);function r(n){var o=a(n),s=o.length;if(s<=2)return[];for(var c=new Array(s),m=o[s-1],h=0;h=m[M]&&(S+=1);i[w]=S}}return c}function s(c,m){try{return a(c,!0)}catch{var h=r(c);if(h.length<=m)return[];var p=n(c,h),g=a(p,!0);return o(g,h)}}},4769:function(l){"use strict";function e(a,r,n,o,s,c){var m=6*s*s-6*s,h=3*s*s-4*s+1,p=-6*s*s+6*s,g=3*s*s-2*s;if(a.length){c||(c=new Array(a.length));for(var i=a.length-1;i>=0;--i)c[i]=m*a[i]+h*r[i]+p*n[i]+g*o[i];return c}return m*a+h*r+p*n[i]+g*o}function t(a,r,n,o,s,c){var m=s-1,h=s*s,p=m*m,g=(1+2*s)*p,i=s*p,w=h*(3-2*s),S=h*m;if(a.length){c||(c=new Array(a.length));for(var M=a.length-1;M>=0;--M)c[M]=g*a[M]+i*r[M]+w*n[M]+S*o[M];return c}return g*a+i*r+w*n+S*o}l.exports=t,l.exports.derivative=e},7642:function(l,e,t){"use strict";var a=t(8954),r=t(1682);l.exports=c;function n(m,h){this.point=m,this.index=h}function o(m,h){for(var p=m.point,g=h.point,i=p.length,w=0;w=2)return!1;R[F]=P}return!0}):N=N.filter(function(R){for(var B=0;B<=g;++B){var F=A[R[B]];if(F<0)return!1;R[B]=F}return!0}),g&1)for(var S=0;S>>31},l.exports.exponent=function(w){var S=l.exports.hi(w);return(S<<1>>>21)-1023},l.exports.fraction=function(w){var S=l.exports.lo(w),M=l.exports.hi(w),C=M&(1<<20)-1;return M&2146435072&&(C+=1048576),[S,C]},l.exports.denormalized=function(w){var S=l.exports.hi(w);return!(S&2146435072)}},1338:function(l){"use strict";function e(r,n,o){var s=r[o]|0;if(s<=0)return[];var c=new Array(s),m;if(o===r.length-1)for(m=0;m"u"&&(n=0),typeof r){case"number":if(r>0)return t(r|0,n);break;case"object":if(typeof r.length=="number")return e(r,n,0);break}return[]}l.exports=a},3134:function(l,e,t){"use strict";l.exports=r;var a=t(1682);function r(n,o){var s=n.length;if(typeof o!="number"){o=0;for(var c=0;c=g-1)for(var T=S.length-1,u=h-p[g-1],f=0;f=g-1)for(var _=S.length-1,T=h-p[g-1],f=0;f=0;--g)if(h[--p])return!1;return!0},s.jump=function(h){var p=this.lastT(),g=this.dimension;if(!(h0;--f)i.push(n(C[f-1],_[f-1],arguments[f])),w.push(0)}},s.push=function(h){var p=this.lastT(),g=this.dimension;if(!(h1e-6?1/M:0;this._time.push(h);for(var u=g;u>0;--u){var A=n(_[u-1],T[u-1],arguments[u]);i.push(A),w.push((A-i[S++])*f)}}},s.set=function(h){var p=this.dimension;if(!(h0;--C)g.push(n(S[C-1],M[C-1],arguments[C])),i.push(0)}},s.move=function(h){var p=this.lastT(),g=this.dimension;if(!(h<=p||arguments.length!==g+1)){var i=this._state,w=this._velocity,S=i.length-this.dimension,M=this.bounds,C=M[0],_=M[1],T=h-p,f=T>1e-6?1/T:0;this._time.push(h);for(var u=g;u>0;--u){var A=arguments[u];i.push(n(C[u-1],_[u-1],i[S++]+A)),w.push(A*f)}}},s.idle=function(h){var p=this.lastT();if(!(h=0;--f)i.push(n(C[f],_[f],i[S]+T*w[S])),w.push(0),S+=1}};function c(h){for(var p=new Array(h),g=0;g=0;--I){var u=A[I];b[I]<=0?A[I]=new a(u._color,u.key,u.value,A[I+1],u.right,u._count+1):A[I]=new a(u._color,u.key,u.value,u.left,A[I+1],u._count+1)}for(var I=A.length-1;I>1;--I){var N=A[I-1],u=A[I];if(N._color===t||u._color===t)break;var R=A[I-2];if(R.left===N)if(N.left===u){var B=R.right;if(B&&B._color===e)N._color=t,R.right=n(t,B),R._color=e,I-=1;else{if(R._color=e,R.left=N.right,N._color=t,N.right=R,A[I-2]=N,A[I-1]=u,o(R),o(N),I>=3){var F=A[I-3];F.left===R?F.left=N:F.right=N}break}}else{var B=R.right;if(B&&B._color===e)N._color=t,R.right=n(t,B),R._color=e,I-=1;else{if(N.right=u.left,R._color=e,R.left=u.right,u._color=t,u.left=N,u.right=R,A[I-2]=u,A[I-1]=N,o(R),o(N),o(u),I>=3){var F=A[I-3];F.left===R?F.left=u:F.right=u}break}}else if(N.right===u){var B=R.left;if(B&&B._color===e)N._color=t,R.left=n(t,B),R._color=e,I-=1;else{if(R._color=e,R.right=N.left,N._color=t,N.left=R,A[I-2]=N,A[I-1]=u,o(R),o(N),I>=3){var F=A[I-3];F.right===R?F.right=N:F.left=N}break}}else{var B=R.left;if(B&&B._color===e)N._color=t,R.left=n(t,B),R._color=e,I-=1;else{if(N.left=u.right,R._color=e,R.right=u.left,u._color=t,u.right=N,u.left=R,A[I-2]=u,A[I-1]=N,o(R),o(N),o(u),I>=3){var F=A[I-3];F.right===R?F.right=u:F.left=u}break}}}return A[0]._color=t,new s(f,A[0])};function m(_,T){if(T.left){var f=m(_,T.left);if(f)return f}var f=_(T.key,T.value);if(f)return f;if(T.right)return m(_,T.right)}function h(_,T,f,u){var A=T(_,u.key);if(A<=0){if(u.left){var b=h(_,T,f,u.left);if(b)return b}var b=f(u.key,u.value);if(b)return b}if(u.right)return h(_,T,f,u.right)}function p(_,T,f,u,A){var b=f(_,A.key),z=f(T,A.key),I;if(b<=0&&(A.left&&(I=p(_,T,f,u,A.left),I)||z>0&&(I=u(A.key,A.value),I)))return I;if(z>0&&A.right)return p(_,T,f,u,A.right)}c.forEach=function(T,f,u){if(this.root)switch(arguments.length){case 1:return m(T,this.root);case 2:return h(f,this._compare,T,this.root);case 3:return this._compare(f,u)>=0?void 0:p(f,u,this._compare,T,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.left;return new g(this,_)}}),Object.defineProperty(c,"end",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.right;return new g(this,_)}}),c.at=function(_){if(_<0)return new g(this,[]);for(var T=this.root,f=[];;){if(f.push(T),T.left){if(_=T.right._count)break;T=T.right}else break}return new g(this,[])},c.ge=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var b=T(_,f.key);u.push(f),b<=0&&(A=u.length),b<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.gt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var b=T(_,f.key);u.push(f),b<0&&(A=u.length),b<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.lt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var b=T(_,f.key);u.push(f),b>0&&(A=u.length),b<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.le=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var b=T(_,f.key);u.push(f),b>=0&&(A=u.length),b<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.find=function(_){for(var T=this._compare,f=this.root,u=[];f;){var A=T(_,f.key);if(u.push(f),A===0)return new g(this,u);A<=0?f=f.left:f=f.right}return new g(this,[])},c.remove=function(_){var T=this.find(_);return T?T.remove():this},c.get=function(_){for(var T=this._compare,f=this.root;f;){var u=T(_,f.key);if(u===0)return f.value;u<=0?f=f.left:f=f.right}};function g(_,T){this.tree=_,this._stack=T}var i=g.prototype;Object.defineProperty(i,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(i,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),i.clone=function(){return new g(this.tree,this._stack.slice())};function w(_,T){_.key=T.key,_.value=T.value,_.left=T.left,_.right=T.right,_._color=T._color,_._count=T._count}function S(_){for(var T,f,u,A,b=_.length-1;b>=0;--b){if(T=_[b],b===0){T._color=t;return}if(f=_[b-1],f.left===T){if(u=f.right,u.right&&u.right._color===e){if(u=f.right=r(u),A=u.right=r(u.right),f.right=u.left,u.left=f,u.right=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),b>1){var z=_[b-2];z.left===f?z.left=u:z.right=u}_[b-1]=u;return}else if(u.left&&u.left._color===e){if(u=f.right=r(u),A=u.left=r(u.left),f.right=A.left,u.left=A.right,A.left=f,A.right=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),b>1){var z=_[b-2];z.left===f?z.left=A:z.right=A}_[b-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.right=n(e,u);return}else{f.right=n(e,u);continue}else{if(u=r(u),f.right=u.left,u.left=f,u._color=f._color,f._color=e,o(f),o(u),b>1){var z=_[b-2];z.left===f?z.left=u:z.right=u}_[b-1]=u,_[b]=f,b+1<_.length?_[b+1]=T:_.push(T),b=b+2}}else{if(u=f.left,u.left&&u.left._color===e){if(u=f.left=r(u),A=u.left=r(u.left),f.left=u.right,u.right=f,u.left=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),b>1){var z=_[b-2];z.right===f?z.right=u:z.left=u}_[b-1]=u;return}else if(u.right&&u.right._color===e){if(u=f.left=r(u),A=u.right=r(u.right),f.left=A.right,u.right=A.left,A.right=f,A.left=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),b>1){var z=_[b-2];z.right===f?z.right=A:z.left=A}_[b-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.left=n(e,u);return}else{f.left=n(e,u);continue}else{if(u=r(u),f.left=u.right,u.right=f,u._color=f._color,f._color=e,o(f),o(u),b>1){var z=_[b-2];z.right===f?z.right=u:z.left=u}_[b-1]=u,_[b]=f,b+1<_.length?_[b+1]=T:_.push(T),b=b+2}}}}i.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var T=new Array(_.length),f=_[_.length-1];T[T.length-1]=new a(f._color,f.key,f.value,f.left,f.right,f._count);for(var u=_.length-2;u>=0;--u){var f=_[u];f.left===_[u+1]?T[u]=new a(f._color,f.key,f.value,T[u+1],f.right,f._count):T[u]=new a(f._color,f.key,f.value,f.left,T[u+1],f._count)}if(f=T[T.length-1],f.left&&f.right){var A=T.length;for(f=f.left;f.right;)T.push(f),f=f.right;var b=T[A-1];T.push(new a(f._color,b.key,b.value,f.left,f.right,f._count)),T[A-1].key=f.key,T[A-1].value=f.value;for(var u=T.length-2;u>=A;--u)f=T[u],T[u]=new a(f._color,f.key,f.value,f.left,T[u+1],f._count);T[A-1].left=T[A]}if(f=T[T.length-1],f._color===e){var z=T[T.length-2];z.left===f?z.left=null:z.right===f&&(z.right=null),T.pop();for(var u=0;u0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(i,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(i,"index",{get:function(){var _=0,T=this._stack;if(T.length===0){var f=this.tree.root;return f?f._count:0}else T[T.length-1].left&&(_=T[T.length-1].left._count);for(var u=T.length-2;u>=0;--u)T[u+1]===T[u].right&&(++_,T[u].left&&(_+=T[u].left._count));return _},enumerable:!0}),i.next=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.right)for(T=T.right;T;)_.push(T),T=T.left;else for(_.pop();_.length>0&&_[_.length-1].right===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].left===_[T])return!0;return!1}}),i.update=function(_){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var f=new Array(T.length),u=T[T.length-1];f[f.length-1]=new a(u._color,u.key,_,u.left,u.right,u._count);for(var A=T.length-2;A>=0;--A)u=T[A],u.left===T[A+1]?f[A]=new a(u._color,u.key,u.value,f[A+1],u.right,u._count):f[A]=new a(u._color,u.key,u.value,u.left,f[A+1],u._count);return new s(this.tree._compare,f[0])},i.prev=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.left)for(T=T.left;T;)_.push(T),T=T.right;else for(_.pop();_.length>0&&_[_.length-1].left===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].right===_[T])return!0;return!1}});function M(_,T){return _T?1:0}function C(_){return new s(_||M,null)}},3837:function(l,e,t){"use strict";l.exports=I;var a=t(4935),r=t(501),n=t(5304),o=t(6429),s=t(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),m=ArrayBuffer,h=DataView;function p(N){return m.isView(N)&&!(N instanceof h)}function g(N){return Array.isArray(N)||p(N)}function i(N,R){return N[0]=R[0],N[1]=R[1],N[2]=R[2],N}function w(N){this.gl=N,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=n(N)}var S=w.prototype;S.update=function(N){N=N||{};function R(G,Y,q){if(q in N){var $=N[q],ee=this[q],ne;(G?g($)&&g($[0]):g($))?this[q]=ne=[Y($[0]),Y($[1]),Y($[2])]:this[q]=ne=[Y($),Y($),Y($)];for(var fe=0;fe<3;++fe)if(ne[fe]!==ee[fe])return!0}return!1}var B=R.bind(this,!1,Number),F=R.bind(this,!1,Boolean),P=R.bind(this,!1,String),j=R.bind(this,!0,function(G){if(g(G)){if(G.length===3)return[+G[0],+G[1],+G[2],1];if(G.length===4)return[+G[0],+G[1],+G[2],+G[3]]}return[0,0,0,1]}),U,Z=!1,Q=!1;if("bounds"in N)for(var re=N.bounds,ae=0;ae<2;++ae)for(var oe=0;oe<3;++oe)re[ae][oe]!==this.bounds[ae][oe]&&(Q=!0),this.bounds[ae][oe]=re[ae][oe];if("ticks"in N){U=N.ticks,Z=!0,this.autoTicks=!1;for(var ae=0;ae<3;++ae)this.tickSpacing[ae]=0}else B("tickSpacing")&&(this.autoTicks=!0,Q=!0);if(this._firstInit&&("ticks"in N||"tickSpacing"in N||(this.autoTicks=!0),Q=!0,Z=!0,this._firstInit=!1),Q&&this.autoTicks&&(U=s.create(this.bounds,this.tickSpacing),Z=!0),Z){for(var ae=0;ae<3;++ae)U[ae].sort(function(Y,q){return Y.x-q.x});s.equal(U,this.ticks)?Z=!1:this.ticks=U}F("tickEnable"),P("tickFont")&&(Z=!0),P("tickFontStyle")&&(Z=!0),P("tickFontWeight")&&(Z=!0),P("tickFontVariant")&&(Z=!0),B("tickSize"),B("tickAngle"),B("tickPad"),j("tickColor");var H=P("labels");P("labelFont")&&(H=!0),P("labelFontStyle")&&(H=!0),P("labelFontWeight")&&(H=!0),P("labelFontVariant")&&(H=!0),F("labelEnable"),B("labelSize"),B("labelPad"),j("labelColor"),F("lineEnable"),F("lineMirror"),B("lineWidth"),j("lineColor"),F("lineTickEnable"),F("lineTickMirror"),B("lineTickLength"),B("lineTickWidth"),j("lineTickColor"),F("gridEnable"),B("gridWidth"),j("gridColor"),F("zeroEnable"),j("zeroLineColor"),B("zeroLineWidth"),F("backgroundEnable"),j("backgroundColor");var X=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],K=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(H||Z)&&this._text.update(this.bounds,this.labels,X,this.ticks,K):this._text=a(this.gl,this.bounds,this.labels,X,this.ticks,K),this._lines&&Z&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var C=[new M,new M,new M];function _(N,R,B,F,P){for(var j=N.primalOffset,U=N.primalMinor,Z=N.mirrorOffset,Q=N.mirrorMinor,re=F[R],ae=0;ae<3;++ae)if(R!==ae){var oe=j,H=Z,X=U,K=Q;re&1<0?(X[ae]=-1,K[ae]=0):(X[ae]=0,K[ae]=1)}}var T=[0,0,0],f={model:c,view:c,projection:c,_ortho:!1};S.isOpaque=function(){return!0},S.isTransparent=function(){return!1},S.drawTransparent=function(N){};var u=0,A=[0,0,0],b=[0,0,0],z=[0,0,0];S.draw=function(N){N=N||f;for(var q=this.gl,R=N.model||c,B=N.view||c,F=N.projection||c,P=this.bounds,j=N._ortho||!1,U=o(R,B,F,P,j),Z=U.cubeEdges,Q=U.axis,re=B[12],ae=B[13],oe=B[14],H=B[15],X=j?2:1,K=X*this.pixelRatio*(F[3]*re+F[7]*ae+F[11]*oe+F[15]*H)/q.drawingBufferHeight,G=0;G<3;++G)this.lastCubeProps.cubeEdges[G]=Z[G],this.lastCubeProps.axis[G]=Q[G];for(var Y=C,G=0;G<3;++G)_(C[G],G,this.bounds,Z,Q);for(var q=this.gl,$=T,G=0;G<3;++G)this.backgroundEnable[G]?$[G]=Q[G]:$[G]=0;this._background.draw(R,B,F,P,$,this.backgroundColor),this._lines.bind(R,B,F,this);for(var G=0;G<3;++G){var ee=[0,0,0];Q[G]>0?ee[G]=P[1][G]:ee[G]=P[0][G];for(var ne=0;ne<2;++ne){var fe=(G+1+ne)%3,ye=(G+1+(ne^1))%3;this.gridEnable[fe]&&this._lines.drawGrid(fe,ye,this.bounds,ee,this.gridColor[fe],this.gridWidth[fe]*this.pixelRatio)}for(var ne=0;ne<2;++ne){var fe=(G+1+ne)%3,ye=(G+1+(ne^1))%3;this.zeroEnable[ye]&&Math.min(P[0][ye],P[1][ye])<=0&&Math.max(P[0][ye],P[1][ye])>=0&&this._lines.drawZero(fe,ye,this.bounds,ee,this.zeroLineColor[ye],this.zeroLineWidth[ye]*this.pixelRatio)}}for(var G=0;G<3;++G){this.lineEnable[G]&&this._lines.drawAxisLine(G,this.bounds,Y[G].primalOffset,this.lineColor[G],this.lineWidth[G]*this.pixelRatio),this.lineMirror[G]&&this._lines.drawAxisLine(G,this.bounds,Y[G].mirrorOffset,this.lineColor[G],this.lineWidth[G]*this.pixelRatio);for(var xe=i(A,Y[G].primalMinor),Ae=i(b,Y[G].mirrorMinor),Me=this.lineTickLength,ne=0;ne<3;++ne){var Ie=K/R[5*ne];xe[ne]*=Me[ne]*Ie,Ae[ne]*=Me[ne]*Ie}this.lineTickEnable[G]&&this._lines.drawAxisTicks(G,Y[G].primalOffset,xe,this.lineTickColor[G],this.lineTickWidth[G]*this.pixelRatio),this.lineTickMirror[G]&&this._lines.drawAxisTicks(G,Y[G].mirrorOffset,Ae,this.lineTickColor[G],this.lineTickWidth[G]*this.pixelRatio)}this._lines.unbind(),this._text.bind(R,B,F,this.pixelRatio);var Ue,qe=.5,ke,ge;function ue(Ge){ge=[0,0,0],ge[Ge]=1}function ve(Ge,gt,mt){var Tt=(Ge+1)%3,At=(Ge+2)%3,Kt=gt[Tt],nr=gt[At],_r=mt[Tt],Zt=mt[At];if(Kt>0&&Zt>0){ue(Tt);return}else if(Kt>0&&Zt<0){ue(Tt);return}else if(Kt<0&&Zt>0){ue(Tt);return}else if(Kt<0&&Zt<0){ue(Tt);return}else if(nr>0&&_r>0){ue(At);return}else if(nr>0&&_r<0){ue(At);return}else if(nr<0&&_r>0){ue(At);return}else if(nr<0&&_r<0){ue(At);return}}for(var G=0;G<3;++G){for(var se=Y[G].primalMinor,Te=Y[G].mirrorMinor,Fe=i(z,Y[G].primalOffset),ne=0;ne<3;++ne)this.lineTickEnable[G]&&(Fe[ne]+=K*se[ne]*Math.max(this.lineTickLength[ne],0)/R[5*ne]);var We=[0,0,0];if(We[G]=1,this.tickEnable[G]){this.tickAngle[G]===-3600?(this.tickAngle[G]=0,this.tickAlign[G]="auto"):this.tickAlign[G]=-1,ke=1,Ue=[this.tickAlign[G],qe,ke],Ue[0]==="auto"?Ue[0]=u:Ue[0]=parseInt(""+Ue[0]),ge=[0,0,0],ve(G,se,Te);for(var ne=0;ne<3;++ne)Fe[ne]+=K*se[ne]*this.tickPad[ne]/R[5*ne];this._text.drawTicks(G,this.tickSize[G],this.tickAngle[G],Fe,this.tickColor[G],We,ge,Ue)}if(this.labelEnable[G]){ke=0,ge=[0,0,0],this.labels[G].length>4&&(ue(G),ke=1),Ue=[this.labelAlign[G],qe,ke],Ue[0]==="auto"?Ue[0]=u:Ue[0]=parseInt(""+Ue[0]);for(var ne=0;ne<3;++ne)Fe[ne]+=K*se[ne]*this.labelPad[ne]/R[5*ne];Fe[G]+=.5*(P[0][G]+P[1][G]),this._text.drawLabel(G,this.labelSize[G],this.labelAngle[G],Fe,this.labelColor[G],[0,0,0],ge,Ue)}}this._text.unbind()},S.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function I(N,R){var B=new w(N);return B.update(R),B}},5304:function(l,e,t){"use strict";l.exports=c;var a=t(2762),r=t(8116),n=t(1879).bg;function o(m,h,p,g){this.gl=m,this.buffer=h,this.vao=p,this.shader=g}var s=o.prototype;s.draw=function(m,h,p,g,i,w){for(var S=!1,M=0;M<3;++M)S=S||i[M];if(S){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:h,projection:p,bounds:g,enable:i,colors:w},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(m){for(var h=[],p=[],g=0,i=0;i<3;++i)for(var w=(i+1)%3,S=(i+2)%3,M=[0,0,0],C=[0,0,0],_=-1;_<=1;_+=2){p.push(g,g+2,g+1,g+1,g+2,g+3),M[i]=_,C[i]=_;for(var T=-1;T<=1;T+=2){M[w]=T;for(var f=-1;f<=1;f+=2)M[S]=f,h.push(M[0],M[1],M[2],C[0],C[1],C[2]),g+=1}var u=w;w=S,S=u}var A=a(m,new Float32Array(h)),b=a(m,new Uint16Array(p),m.ELEMENT_ARRAY_BUFFER),z=r(m,[{buffer:A,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:A,type:m.FLOAT,size:3,offset:12,stride:24}],b),I=n(m);return I.attributes.position.location=0,I.attributes.normal.location=1,new o(m,A,z,I)}},6429:function(l,e,t){"use strict";l.exports=_;var a=t(8828),r=t(6760),n=t(5202),o=t(3250),s=new Array(16),c=new Array(8),m=new Array(8),h=new Array(3),p=[0,0,0];(function(){for(var T=0;T<8;++T)c[T]=[1,1,1,1],m[T]=[1,1,1]})();function g(T,f,u){for(var A=0;A<4;++A){T[A]=u[12+A];for(var b=0;b<3;++b)T[A]+=f[b]*u[4*b+A]}}var i=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function w(T){for(var f=0;fQ&&(B|=1<Q){B|=1<m[I][1])&&(Y=I);for(var q=-1,I=0;I<3;++I){var $=Y^1<m[ee][0]&&(ee=$)}}var ne=S;ne[0]=ne[1]=ne[2]=0,ne[a.log2(q^Y)]=Y&q,ne[a.log2(Y^ee)]=Yⅇvar fe=ee^7;fe===B||fe===G?(fe=q^7,ne[a.log2(ee^fe)]=fe&ee):ne[a.log2(q^fe)]=fe&q;for(var ye=M,xe=B,j=0;j<3;++j)xe&1<=0;--re){var ue=H[Q[re]];m.push(K*ue[0],-K*ue[1],B)}}for(var x=[0,0,0],_=[0,0,0],D=[0,0,0],C=[0,0,0],F=1.25,I={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},z=0;z<3;++z){D[z]=m.length/p|0,h(.5*(M[0][z]+M[1][z]),A[z],E[z],12,F,I),C[z]=(m.length/p|0)-D[z],x[z]=m.length/p|0;for(var R=0;R=0&&(p=s.length-c-1);var f=Math.pow(10,p),d=Math.round(n*i*f),y=d+"";if(y.indexOf("e")>=0)return y;var o=d/f,b=d%f;d<0?(o=-Math.ceil(o)|0,b=-b|0):(o=Math.floor(o)|0,b=b|0);var M=""+o;if(d<0&&(M="-"+M),p){for(var A=""+b;A.length=n[0][c];--d)p.push({x:d*i[c],text:t(i[c],d)});s.push(p)}return s}function r(n,i){for(var s=0;s<3;++s){if(n[s].length!==i[s].length)return!1;for(var c=0;cM)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return o.bufferSubData(b,g,E),M}function f(o,b){for(var M=a.malloc(o.length,b),A=o.length,E=0;E=0;--A){if(b[A]!==M)return!1;M*=o[A]}return!0}c.update=function(o,b){if(typeof b!="number"&&(b=-1),this.bind(),typeof o=="object"&&typeof o.shape<"u"){var M=o.dtype;if(i.indexOf(M)<0&&(M="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var A=gl.getExtension("OES_element_index_uint");A&&M!=="uint16"?M="uint32":M="uint16"}if(M===o.dtype&&d(o.shape,o.stride))o.offset===0&&o.data.length===o.shape[0]?this.length=p(this.gl,this.type,this.length,this.usage,o.data,b):this.length=p(this.gl,this.type,this.length,this.usage,o.data.subarray(o.offset,o.shape[0]),b);else{var E=a.malloc(o.size,M),g=n(E,o.shape);r.assign(g,o),b<0?this.length=p(this.gl,this.type,this.length,this.usage,E,b):this.length=p(this.gl,this.type,this.length,this.usage,E.subarray(0,o.size),b),a.free(E)}}else if(Array.isArray(o)){var T;this.type===this.gl.ELEMENT_ARRAY_BUFFER?T=f(o,"uint16"):T=f(o,"float32"),b<0?this.length=p(this.gl,this.type,this.length,this.usage,T,b):this.length=p(this.gl,this.type,this.length,this.usage,T.subarray(0,o.length),b),a.free(T)}else if(typeof o=="object"&&typeof o.length=="number")this.length=p(this.gl,this.type,this.length,this.usage,o,b);else if(typeof o=="number"||o===void 0){if(b>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");o=o|0,o<=0&&(o=1),this.gl.bufferData(this.type,o|0,this.usage),this.length=o}else throw new Error("gl-buffer: Invalid data type")};function y(o,b,M,A){if(M=M||o.ARRAY_BUFFER,A=A||o.DYNAMIC_DRAW,M!==o.ARRAY_BUFFER&&M!==o.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(A!==o.DYNAMIC_DRAW&&A!==o.STATIC_DRAW&&A!==o.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 E=o.createBuffer(),g=new s(o,M,E,0,A);return g.update(b),g}l.exports=y},6405:function(l,e,t){"use strict";var a=t(2931);l.exports=function(n,i){var s=n.positions,c=n.vectors,p={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return i&&(i[0]=[0,0,0],i[1]=[0,0,0]),p;for(var f=0,d=1/0,y=-1/0,o=1/0,b=-1/0,M=1/0,A=-1/0,E=null,g=null,T=[],m=1/0,h=!1,x=n.coneSizemode==="raw",_=0;_f&&(f=a.length(C)),_&&!x){var F=2*a.distance(E,D)/(a.length(g)+a.length(C));F?(m=Math.min(m,F),h=!1):h=!0}h||(E=D,g=C),T.push(C)}var I=[d,o,M],z=[y,b,A];i&&(i[0]=I,i[1]=z),f===0&&(f=1);var R=1/f;isFinite(m)||(m=1),p.vectorScale=m;var k=n.coneSize||(x?1:.5);n.absoluteConeSize&&(k=n.absoluteConeSize*R),p.coneScale=k;for(var _=0,B=0;_=1},o.isTransparent=function(){return this.opacity<1},o.pickSlots=1,o.setPickBase=function(T){this.pickId=T};function b(T){for(var m=f({colormap:T,nshades:256,format:"rgba"}),h=new Uint8Array(256*4),x=0;x<256;++x){for(var _=m[x],D=0;D<3;++D)h[4*x+D]=_[D];h[4*x+3]=_[3]*255}return p(h,[256,256,4],[4,0,1])}function M(T){for(var m=T.length,h=new Array(m),x=0;x0){var B=this.triShader;B.bind(),B.uniforms=F,this.triangleVAO.bind(),m.drawArrays(m.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},o.drawPick=function(T){T=T||{};for(var m=this.gl,h=T.model||d,x=T.view||d,_=T.projection||d,D=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],C=0;C<3;++C)D[0][C]=Math.max(D[0][C],this.clipBounds[0][C]),D[1][C]=Math.min(D[1][C],this.clipBounds[1][C]);this._model=[].slice.call(h),this._view=[].slice.call(x),this._projection=[].slice.call(_),this._resolution=[m.drawingBufferWidth,m.drawingBufferHeight];var F={model:h,view:x,projection:_,clipBounds:D,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},I=this.pickShader;I.bind(),I.uniforms=F,this.triangleCount>0&&(this.triangleVAO.bind(),m.drawArrays(m.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},o.pick=function(T){if(!T||T.id!==this.pickId)return null;var m=T.value[0]+256*T.value[1]+65536*T.value[2],h=this.cells[m],x=this.positions[h[1]].slice(0,3),_={position:x,dataCoordinate:x,index:Math.floor(h[1]/48)};return this.traceType==="cone"?_.index=Math.floor(h[1]/48):this.traceType==="streamtube"&&(_.intensity=this.intensity[h[1]],_.velocity=this.vectors[h[1]].slice(0,3),_.divergence=this.vectors[h[1]][3],_.index=m),_},o.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.triangleIds.dispose()};function A(T,m){var h=a(T,m.meshShader.vertex,m.meshShader.fragment,null,m.meshShader.attributes);return h.attributes.position.location=0,h.attributes.color.location=2,h.attributes.uv.location=3,h.attributes.vector.location=4,h}function E(T,m){var h=a(T,m.pickShader.vertex,m.pickShader.fragment,null,m.pickShader.attributes);return h.attributes.position.location=0,h.attributes.id.location=1,h.attributes.vector.location=4,h}function g(T,m,h){var x=h.shaders;arguments.length===1&&(m=T,T=m.gl);var _=A(T,x),D=E(T,x),C=i(T,p(new Uint8Array([255,255,255,255]),[1,1,4]));C.generateMipmap(),C.minFilter=T.LINEAR_MIPMAP_LINEAR,C.magFilter=T.LINEAR;var F=r(T),I=r(T),z=r(T),R=r(T),k=r(T),B=n(T,[{buffer:F,type:T.FLOAT,size:4},{buffer:k,type:T.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:z,type:T.FLOAT,size:4},{buffer:R,type:T.FLOAT,size:2},{buffer:I,type:T.FLOAT,size:4}]),N=new y(T,C,_,D,F,I,k,z,R,B,h.traceType||"cone");return N.update(m),N}l.exports=g},614:function(l,e,t){var a=t(3236),r=a([`precision highp float; +}`]);e.bg=function(p){return r(p,m,h,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(l,e,t){"use strict";l.exports=w;var a=t(2762),r=t(8116),n=t(4359),o=t(1879).Q,s=window||process.global||{},c=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var m=3;function h(S,M,C,_){this.gl=S,this.shader=M,this.buffer=C,this.vao=_,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var p=h.prototype,g=[0,0];p.bind=function(S,M,C,_){this.vao.bind(),this.shader.bind();var T=this.shader.uniforms;T.model=S,T.view=M,T.projection=C,T.pixelScale=_,g[0]=this.gl.drawingBufferWidth,g[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=g},p.unbind=function(){this.vao.unbind()},p.update=function(S,M,C,_,T){var f=[];function u(j,U,Z,Q,re,ae){var oe=[Z.style,Z.weight,Z.variant,Z.family].join("_"),H=c[oe];H||(H=c[oe]={});var X=H[U];X||(X=H[U]=i(U,{triangles:!0,font:Z.family,fontStyle:Z.style,fontWeight:Z.weight,fontVariant:Z.variant,textAlign:"center",textBaseline:"middle",lineSpacing:re,styletags:ae}));for(var K=(Q||12)/12,G=X.positions,Y=X.cells,q=0,$=Y.length;q<$;++q)for(var ee=Y[q],ne=2;ne>=0;--ne){var fe=G[ee[ne]];f.push(K*fe[0],-K*fe[1],j)}}for(var A=[0,0,0],b=[0,0,0],z=[0,0,0],I=[0,0,0],N=1.25,R={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},B=0;B<3;++B){z[B]=f.length/m|0,u(.5*(S[0][B]+S[1][B]),M[B],C[B],12,N,R),I[B]=(f.length/m|0)-z[B],A[B]=f.length/m|0;for(var F=0;F<_[B].length;++F)if(_[B][F].text){var P={family:_[B][F].font||T[B].family,style:T[B].fontStyle||T[B].style,weight:T[B].fontWeight||T[B].weight,variant:T[B].fontVariant||T[B].variant};u(_[B][F].x,_[B][F].text,P,_[B][F].fontSize||12,N,R)}b[B]=(f.length/m|0)-A[B]}this.buffer.update(f),this.tickOffset=A,this.tickCount=b,this.labelOffset=z,this.labelCount=I},p.drawTicks=function(S,M,C,_,T,f,u,A){this.tickCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.tickCount[S],this.tickOffset[S]))},p.drawLabel=function(S,M,C,_,T,f,u,A){this.labelCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.labelCount[S],this.labelOffset[S]))},p.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function i(S,M){try{return n(S,M)}catch(C){return console.warn('error vectorizing text:"'+S+'" error:',C),{cells:[],positions:[]}}}function w(S,M,C,_,T,f){var u=a(S),A=r(S,[{buffer:u,size:3}]),b=o(S);b.attributes.position.location=0;var z=new h(S,b,u,A);return z.update(M,C,_,T,f),z}},6444:function(l,e){"use strict";e.create=a,e.equal=r;function t(n,o){var s=n+"",c=s.indexOf("."),m=0;c>=0&&(m=s.length-c-1);var h=Math.pow(10,m),p=Math.round(n*o*h),g=p+"";if(g.indexOf("e")>=0)return g;var i=p/h,w=p%h;p<0?(i=-Math.ceil(i)|0,w=-w|0):(i=Math.floor(i)|0,w=w|0);var S=""+i;if(p<0&&(S="-"+S),m){for(var M=""+w;M.length=n[0][c];--p)m.push({x:p*o[c],text:t(o[c],p)});s.push(m)}return s}function r(n,o){for(var s=0;s<3;++s){if(n[s].length!==o[s].length)return!1;for(var c=0;cS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return i.bufferSubData(w,_,C),S}function h(i,w){for(var S=a.malloc(i.length,w),M=i.length,C=0;C=0;--M){if(w[M]!==S)return!1;S*=i[M]}return!0}c.update=function(i,w){if(typeof w!="number"&&(w=-1),this.bind(),typeof i=="object"&&typeof i.shape<"u"){var S=i.dtype;if(o.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&S!=="uint16"?S="uint32":S="uint16"}if(S===i.dtype&&p(i.shape,i.stride))i.offset===0&&i.data.length===i.shape[0]?this.length=m(this.gl,this.type,this.length,this.usage,i.data,w):this.length=m(this.gl,this.type,this.length,this.usage,i.data.subarray(i.offset,i.shape[0]),w);else{var C=a.malloc(i.size,S),_=n(C,i.shape);r.assign(_,i),w<0?this.length=m(this.gl,this.type,this.length,this.usage,C,w):this.length=m(this.gl,this.type,this.length,this.usage,C.subarray(0,i.size),w),a.free(C)}}else if(Array.isArray(i)){var T;this.type===this.gl.ELEMENT_ARRAY_BUFFER?T=h(i,"uint16"):T=h(i,"float32"),w<0?this.length=m(this.gl,this.type,this.length,this.usage,T,w):this.length=m(this.gl,this.type,this.length,this.usage,T.subarray(0,i.length),w),a.free(T)}else if(typeof i=="object"&&typeof i.length=="number")this.length=m(this.gl,this.type,this.length,this.usage,i,w);else if(typeof i=="number"||i===void 0){if(w>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");i=i|0,i<=0&&(i=1),this.gl.bufferData(this.type,i|0,this.usage),this.length=i}else throw new Error("gl-buffer: Invalid data type")};function g(i,w,S,M){if(S=S||i.ARRAY_BUFFER,M=M||i.DYNAMIC_DRAW,S!==i.ARRAY_BUFFER&&S!==i.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(M!==i.DYNAMIC_DRAW&&M!==i.STATIC_DRAW&&M!==i.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 C=i.createBuffer(),_=new s(i,S,C,0,M);return _.update(w),_}l.exports=g},6405:function(l,e,t){"use strict";var a=t(2931);l.exports=function(n,o){var s=n.positions,c=n.vectors,m={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),m;for(var h=0,p=1/0,g=-1/0,i=1/0,w=-1/0,S=1/0,M=-1/0,C=null,_=null,T=[],f=1/0,u=!1,A=n.coneSizemode==="raw",b=0;bh&&(h=a.length(I)),b&&!A){var N=2*a.distance(C,z)/(a.length(_)+a.length(I));N?(f=Math.min(f,N),u=!1):u=!0}u||(C=z,_=I),T.push(I)}var R=[p,i,S],B=[g,w,M];o&&(o[0]=R,o[1]=B),h===0&&(h=1);var F=1/h;isFinite(f)||(f=1),m.vectorScale=f;var P=n.coneSize||(A?1:.5);n.absoluteConeSize&&(P=n.absoluteConeSize*F),m.coneScale=P;for(var b=0,j=0;b=1},i.isTransparent=function(){return this.opacity<1},i.pickSlots=1,i.setPickBase=function(T){this.pickId=T};function w(T){for(var f=h({colormap:T,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),A=0;A<256;++A){for(var b=f[A],z=0;z<3;++z)u[4*A+z]=b[z];u[4*A+3]=b[3]*255}return m(u,[256,256,4],[4,0,1])}function S(T){for(var f=T.length,u=new Array(f),A=0;A0){var j=this.triShader;j.bind(),j.uniforms=N,this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},i.drawPick=function(T){T=T||{};for(var f=this.gl,u=T.model||p,A=T.view||p,b=T.projection||p,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)z[0][I]=Math.max(z[0][I],this.clipBounds[0][I]),z[1][I]=Math.min(z[1][I],this.clipBounds[1][I]);this._model=[].slice.call(u),this._view=[].slice.call(A),this._projection=[].slice.call(b),this._resolution=[f.drawingBufferWidth,f.drawingBufferHeight];var N={model:u,view:A,projection:b,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},R=this.pickShader;R.bind(),R.uniforms=N,this.triangleCount>0&&(this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},i.pick=function(T){if(!T||T.id!==this.pickId)return null;var f=T.value[0]+256*T.value[1]+65536*T.value[2],u=this.cells[f],A=this.positions[u[1]].slice(0,3),b={position:A,dataCoordinate:A,index:Math.floor(u[1]/48)};return this.traceType==="cone"?b.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(b.intensity=this.intensity[u[1]],b.velocity=this.vectors[u[1]].slice(0,3),b.divergence=this.vectors[u[1]][3],b.index=f),b},i.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.triangleIds.dispose()};function M(T,f){var u=a(T,f.meshShader.vertex,f.meshShader.fragment,null,f.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}function C(T,f){var u=a(T,f.pickShader.vertex,f.pickShader.fragment,null,f.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function _(T,f,u){var A=u.shaders;arguments.length===1&&(f=T,T=f.gl);var b=M(T,A),z=C(T,A),I=o(T,m(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=T.LINEAR_MIPMAP_LINEAR,I.magFilter=T.LINEAR;var N=r(T),R=r(T),B=r(T),F=r(T),P=r(T),j=n(T,[{buffer:N,type:T.FLOAT,size:4},{buffer:P,type:T.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:B,type:T.FLOAT,size:4},{buffer:F,type:T.FLOAT,size:2},{buffer:R,type:T.FLOAT,size:4}]),U=new g(T,I,b,z,N,R,P,B,F,j,u.traceType||"cone");return U.update(f),U}l.exports=_},614:function(l,e,t){var a=t(3236),r=a([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -507,7 +510,7 @@ void main() { gl_FragColor = litColor * opacity; } -`]),i=a([`precision highp float; +`]),o=a([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -639,7 +642,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);e.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(l){l.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",34e3:"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"}},5171:function(l,e,t){var a=t(737);l.exports=function(n){return a[n]}},9165:function(l,e,t){"use strict";l.exports=y;var a=t(2762),r=t(8116),n=t(3436),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(o,b,M,A){this.gl=o,this.shader=A,this.buffer=b,this.vao=M,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 c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(o){var b=this.gl,M=this.shader.uniforms;this.shader.bind();var A=M.view=o.view||i,E=M.projection=o.projection||i;M.model=o.model||i,M.clipBounds=this.clipBounds,M.opacity=this.opacity;var g=A[12],T=A[13],m=A[14],h=A[15],x=o._ortho||!1,_=x?2:1,D=_*this.pixelRatio*(E[3]*g+E[7]*T+E[11]*m+E[15]*h)/b.drawingBufferHeight;this.vao.bind();for(var C=0;C<3;++C)b.lineWidth(this.lineWidth[C]*this.pixelRatio),M.capSize=this.capSize[C]*D,this.lineCount[C]&&b.drawArrays(b.LINES,this.lineOffset[C],this.lineCount[C]);this.vao.unbind()};function p(o,b){for(var M=0;M<3;++M)o[0][M]=Math.min(o[0][M],b[M]),o[1][M]=Math.max(o[1][M],b[M])}var f=function(){for(var o=new Array(3),b=0;b<3;++b){for(var M=[],A=1;A<=2;++A)for(var E=-1;E<=1;E+=2){var g=(A+b)%3,T=[0,0,0];T[g]=E,M.push(T)}o[b]=M}return o}();function d(o,b,M,A){for(var E=f[A],g=0;g0){var F=x.slice();F[m]+=D[1][m],E.push(x[0],x[1],x[2],C[0],C[1],C[2],C[3],0,0,0,F[0],F[1],F[2],C[0],C[1],C[2],C[3],0,0,0),p(this.bounds,F),T+=2+d(E,F,C,m)}}}this.lineCount[m]=T-this.lineOffset[m]}this.buffer.update(E)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function y(o){var b=o.gl,M=a(b),A=r(b,[{buffer:M,type:b.FLOAT,size:3,offset:0,stride:40},{buffer:M,type:b.FLOAT,size:4,offset:12,stride:40},{buffer:M,type:b.FLOAT,size:3,offset:28,stride:40}]),E=n(b);E.attributes.position.location=0,E.attributes.color.location=1,E.attributes.offset.location=2;var g=new s(b,M,A,E);return g.update(o),g}},3436:function(l,e,t){"use strict";var a=t(3236),r=t(9405),n=a([`precision highp float; +}`]);e.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(l){l.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",34e3:"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"}},5171:function(l,e,t){var a=t(737);l.exports=function(n){return a[n]}},9165:function(l,e,t){"use strict";l.exports=g;var a=t(2762),r=t(8116),n=t(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(i,w,S,M){this.gl=i,this.shader=M,this.buffer=w,this.vao=S,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 c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(i){var w=this.gl,S=this.shader.uniforms;this.shader.bind();var M=S.view=i.view||o,C=S.projection=i.projection||o;S.model=i.model||o,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var _=M[12],T=M[13],f=M[14],u=M[15],A=i._ortho||!1,b=A?2:1,z=b*this.pixelRatio*(C[3]*_+C[7]*T+C[11]*f+C[15]*u)/w.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)w.lineWidth(this.lineWidth[I]*this.pixelRatio),S.capSize=this.capSize[I]*z,this.lineCount[I]&&w.drawArrays(w.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function m(i,w){for(var S=0;S<3;++S)i[0][S]=Math.min(i[0][S],w[S]),i[1][S]=Math.max(i[1][S],w[S])}var h=function(){for(var i=new Array(3),w=0;w<3;++w){for(var S=[],M=1;M<=2;++M)for(var C=-1;C<=1;C+=2){var _=(M+w)%3,T=[0,0,0];T[_]=C,S.push(T)}i[w]=S}return i}();function p(i,w,S,M){for(var C=h[M],_=0;_0){var N=A.slice();N[f]+=z[1][f],C.push(A[0],A[1],A[2],I[0],I[1],I[2],I[3],0,0,0,N[0],N[1],N[2],I[0],I[1],I[2],I[3],0,0,0),m(this.bounds,N),T+=2+p(C,N,I,f)}}}this.lineCount[f]=T-this.lineOffset[f]}this.buffer.update(C)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function g(i){var w=i.gl,S=a(w),M=r(w,[{buffer:S,type:w.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:w.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:w.FLOAT,size:3,offset:28,stride:40}]),C=n(w);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var _=new s(w,S,M,C);return _.update(i),_}},3436:function(l,e,t){"use strict";var a=t(3236),r=t(9405),n=a([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -655,7 +658,7 @@ void main() { gl_Position = projection * (view * worldPosition); fragColor = color; fragPosition = position; -}`]),i=a([`precision highp float; +}`]),o=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -690,13 +693,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);l.exports=function(s){return r(s,n,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(l,e,t){"use strict";var a=t(7766);l.exports=T;var r=null,n,i,s,c;function p(m){var h=m.getParameter(m.FRAMEBUFFER_BINDING),x=m.getParameter(m.RENDERBUFFER_BINDING),_=m.getParameter(m.TEXTURE_BINDING_2D);return[h,x,_]}function f(m,h){m.bindFramebuffer(m.FRAMEBUFFER,h[0]),m.bindRenderbuffer(m.RENDERBUFFER,h[1]),m.bindTexture(m.TEXTURE_2D,h[2])}function d(m,h){var x=m.getParameter(h.MAX_COLOR_ATTACHMENTS_WEBGL);r=new Array(x+1);for(var _=0;_<=x;++_){for(var D=new Array(x),C=0;C<_;++C)D[C]=m.COLOR_ATTACHMENT0+C;for(var C=_;C1&&I.drawBuffersWEBGL(r[F]);var N=x.getExtension("WEBGL_depth_texture");N?z?m.depth=o(x,D,C,N.UNSIGNED_INT_24_8_WEBGL,x.DEPTH_STENCIL,x.DEPTH_STENCIL_ATTACHMENT):R&&(m.depth=o(x,D,C,x.UNSIGNED_SHORT,x.DEPTH_COMPONENT,x.DEPTH_ATTACHMENT)):R&&z?m._depth_rb=b(x,D,C,x.DEPTH_STENCIL,x.DEPTH_STENCIL_ATTACHMENT):R?m._depth_rb=b(x,D,C,x.DEPTH_COMPONENT16,x.DEPTH_ATTACHMENT):z&&(m._depth_rb=b(x,D,C,x.STENCIL_INDEX,x.STENCIL_ATTACHMENT));var q=x.checkFramebufferStatus(x.FRAMEBUFFER);if(q!==x.FRAMEBUFFER_COMPLETE){m._destroyed=!0,x.bindFramebuffer(x.FRAMEBUFFER,null),x.deleteFramebuffer(m.handle),m.handle=null,m.depth&&(m.depth.dispose(),m.depth=null),m._depth_rb&&(x.deleteRenderbuffer(m._depth_rb),m._depth_rb=null);for(var B=0;BD||x<0||x>D)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");m._shape[0]=h,m._shape[1]=x;for(var C=p(_),F=0;FC||x<0||x>C)throw new Error("gl-fbo: Parameters are too large for FBO");_=_||{};var F=1;if("color"in _){if(F=Math.max(_.color|0,0),F<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(F>1)if(D){if(F>m.getParameter(D.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+F+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var I=m.UNSIGNED_BYTE,z=m.getExtension("OES_texture_float");if(_.float&&F>0){if(!z)throw new Error("gl-fbo: Context does not support floating point textures");I=m.FLOAT}else _.preferFloat&&F>0&&z&&(I=m.FLOAT);var R=!0;"depth"in _&&(R=!!_.depth);var k=!1;return"stencil"in _&&(k=!!_.stencil),new A(m,h,x,I,F,R,k,D)}},2992:function(l,e,t){var a=t(3387).sprintf,r=t(5171),n=t(1848),i=t(1085);l.exports=s;function s(c,p,f){"use strict";var d=n(p)||"of unknown name (see npm glsl-shader-name)",y="unknown type";f!==void 0&&(y=f===r.FRAGMENT_SHADER?"fragment":"vertex");for(var o=a(`Error compiling %s shader %s: -`,y,d),b=a("%s%s",o,c),M=c.split(` -`),A={},E=0;E1&&R.drawBuffersWEBGL(r[N]);var U=A.getExtension("WEBGL_depth_texture");U?B?f.depth=i(A,z,I,U.UNSIGNED_INT_24_8_WEBGL,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F&&(f.depth=i(A,z,I,A.UNSIGNED_SHORT,A.DEPTH_COMPONENT,A.DEPTH_ATTACHMENT)):F&&B?f._depth_rb=w(A,z,I,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F?f._depth_rb=w(A,z,I,A.DEPTH_COMPONENT16,A.DEPTH_ATTACHMENT):B&&(f._depth_rb=w(A,z,I,A.STENCIL_INDEX,A.STENCIL_ATTACHMENT));var Z=A.checkFramebufferStatus(A.FRAMEBUFFER);if(Z!==A.FRAMEBUFFER_COMPLETE){f._destroyed=!0,A.bindFramebuffer(A.FRAMEBUFFER,null),A.deleteFramebuffer(f.handle),f.handle=null,f.depth&&(f.depth.dispose(),f.depth=null),f._depth_rb&&(A.deleteRenderbuffer(f._depth_rb),f._depth_rb=null);for(var j=0;jz||A<0||A>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");f._shape[0]=u,f._shape[1]=A;for(var I=m(b),N=0;NI||A<0||A>I)throw new Error("gl-fbo: Parameters are too large for FBO");b=b||{};var N=1;if("color"in b){if(N=Math.max(b.color|0,0),N<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(N>1)if(z){if(N>f.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+N+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var R=f.UNSIGNED_BYTE,B=f.getExtension("OES_texture_float");if(b.float&&N>0){if(!B)throw new Error("gl-fbo: Context does not support floating point textures");R=f.FLOAT}else b.preferFloat&&N>0&&B&&(R=f.FLOAT);var F=!0;"depth"in b&&(F=!!b.depth);var P=!1;return"stencil"in b&&(P=!!b.stencil),new M(f,u,A,R,N,F,P,z)}},2992:function(l,e,t){var a=t(3387).sprintf,r=t(5171),n=t(1848),o=t(1085);l.exports=s;function s(c,m,h){"use strict";var p=n(m)||"of unknown name (see npm glsl-shader-name)",g="unknown type";h!==void 0&&(g=h===r.FRAGMENT_SHADER?"fragment":"vertex");for(var i=a(`Error compiling %s shader %s: +`,g,p),w=a("%s%s",i,c),S=c.split(` +`),M={},C=0;C0){for(var ae=0;ae<24;++ae)C.push(C[C.length-12]);R+=2,Y=!0}continue e}k[0][_]=Math.min(k[0][_],ee[_],te[_]),k[1][_]=Math.max(k[1][_],ee[_],te[_])}var j,G;Array.isArray(N[0])?(j=N.length>x-1?N[x-1]:N.length>0?N[N.length-1]:[0,0,0,1],G=N.length>x?N[x]:N.length>0?N[N.length-1]:[0,0,0,1]):j=G=N,j.length===3&&(j=[j[0],j[1],j[2],1]),G.length===3&&(G=[G[0],G[1],G[2],1]),!this.hasAlpha&&j[3]<1&&(this.hasAlpha=!0);var K;Array.isArray(q)?K=q.length>x-1?q[x-1]:q.length>0?q[q.length-1]:[0,0,0,1]:K=q;var H=z;if(z+=M(ee,te),Y){for(_=0;_<2;++_)C.push(ee[0],ee[1],ee[2],te[0],te[1],te[2],H,K,j[0],j[1],j[2],j[3]);R+=2,Y=!1}C.push(ee[0],ee[1],ee[2],te[0],te[1],te[2],H,K,j[0],j[1],j[2],j[3],ee[0],ee[1],ee[2],te[0],te[1],te[2],H,-K,j[0],j[1],j[2],j[3],te[0],te[1],te[2],ee[0],ee[1],ee[2],z,-K,G[0],G[1],G[2],G[3],te[0],te[1],te[2],ee[0],ee[1],ee[2],z,K,G[0],G[1],G[2],G[3]),R+=4}}if(this.buffer.update(C),F.push(z),I.push(B[B.length-1].slice()),this.bounds=k,this.vertexCount=R,this.points=I,this.arcLength=F,"dashes"in h){var Z=h.dashes,X=Z.slice();for(X.unshift(0),x=1;x1.0001)return null;_+=x[E]}return Math.abs(_-1)>.001?null:[g,c(f,x),x]}},840:function(l,e,t){var a=t(3236),r=a([`precision highp float; +}`]),c=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(m){return r(m,n,o,null,c)},e.createPickShader=function(m){return r(m,n,s,null,c)}},5714:function(l,e,t){"use strict";l.exports=f;var a=t(2762),r=t(8116),n=t(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer);function c(u,A,b,z){return o[0]=z,o[1]=b,o[2]=A,o[3]=u,s[0]}var m=t(2478),h=t(9618),p=t(7319),g=p.createShader,i=p.createPickShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function S(u,A){for(var b=0,z=0;z<3;++z){var I=u[z]-A[z];b+=I*I}return Math.sqrt(b)}function M(u){for(var A=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],b=0;b<3;++b)A[0][b]=Math.max(u[0][b],A[0][b]),A[1][b]=Math.min(u[1][b],A[1][b]);return A}function C(u,A,b,z){this.arcLength=u,this.position=A,this.index=b,this.dataCoordinate=z}function _(u,A,b,z,I,N){this.gl=u,this.shader=A,this.pickShader=b,this.buffer=z,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=N,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var T=_.prototype;T.isTransparent=function(){return this.hasAlpha},T.isOpaque=function(){return!this.hasAlpha},T.pickSlots=1,T.setPickBase=function(u){this.pickId=u},T.drawTransparent=T.draw=function(u){if(this.vertexCount){var A=this.gl,b=this.shader,z=this.vao;b.bind(),b.uniforms={model:u.model||w,view:u.view||w,projection:u.projection||w,clipBounds:M(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(A.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},T.drawPick=function(u){if(this.vertexCount){var A=this.gl,b=this.pickShader,z=this.vao;b.bind(),b.uniforms={model:u.model||w,view:u.view||w,projection:u.projection||w,pickId:this.pickId,clipBounds:M(this.clipBounds),screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(A.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},T.update=function(u){var A,b;this.dirty=!0;var z=!!u.connectGaps;"dashScale"in u&&(this.dashScale=u.dashScale),this.hasAlpha=!1,"opacity"in u&&(this.opacity=+u.opacity,this.opacity<1&&(this.hasAlpha=!0));var I=[],N=[],R=[],B=0,F=0,P=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],j=u.position||u.positions;if(j){var U=u.color||u.colors||[0,0,0,1],Z=u.lineWidth||1,Q=!1;e:for(A=1;A0){for(var oe=0;oe<24;++oe)I.push(I[I.length-12]);F+=2,Q=!0}continue e}P[0][b]=Math.min(P[0][b],re[b],ae[b]),P[1][b]=Math.max(P[1][b],re[b],ae[b])}var H,X;Array.isArray(U[0])?(H=U.length>A-1?U[A-1]:U.length>0?U[U.length-1]:[0,0,0,1],X=U.length>A?U[A]:U.length>0?U[U.length-1]:[0,0,0,1]):H=X=U,H.length===3&&(H=[H[0],H[1],H[2],1]),X.length===3&&(X=[X[0],X[1],X[2],1]),!this.hasAlpha&&H[3]<1&&(this.hasAlpha=!0);var K;Array.isArray(Z)?K=Z.length>A-1?Z[A-1]:Z.length>0?Z[Z.length-1]:[0,0,0,1]:K=Z;var G=B;if(B+=S(re,ae),Q){for(b=0;b<2;++b)I.push(re[0],re[1],re[2],ae[0],ae[1],ae[2],G,K,H[0],H[1],H[2],H[3]);F+=2,Q=!1}I.push(re[0],re[1],re[2],ae[0],ae[1],ae[2],G,K,H[0],H[1],H[2],H[3],re[0],re[1],re[2],ae[0],ae[1],ae[2],G,-K,H[0],H[1],H[2],H[3],ae[0],ae[1],ae[2],re[0],re[1],re[2],B,-K,X[0],X[1],X[2],X[3],ae[0],ae[1],ae[2],re[0],re[1],re[2],B,K,X[0],X[1],X[2],X[3]),F+=4}}if(this.buffer.update(I),N.push(B),R.push(j[j.length-1].slice()),this.bounds=P,this.vertexCount=F,this.points=R,this.arcLength=N,"dashes"in u){var Y=u.dashes,q=Y.slice();for(q.unshift(0),A=1;A1.0001)return null;b+=A[C]}return Math.abs(b-1)>.001?null:[_,c(h,A),A]}},840:function(l,e,t){var a=t(3236),r=a([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -1002,7 +1005,7 @@ void main() { gl_FragColor = litColor * f_color.a; } -`]),i=a([`precision highp float; +`]),o=a([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1099,7 +1102,7 @@ void main() { gl_PointSize = pointSize; f_color = color; f_uv = uv; -}`]),p=a([`precision highp float; +}`]),m=a([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; @@ -1114,7 +1117,7 @@ void main() { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),f=a([`precision highp float; +}`]),h=a([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1129,7 +1132,7 @@ void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; -}`]),d=a([`precision highp float; +}`]),p=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1162,7 +1165,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]),y=a([`precision highp float; +}`]),g=a([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1205,7 +1208,7 @@ void main() { } f_id = id; f_position = position; -}`]),o=a([`precision highp float; +}`]),i=a([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1214,7 +1217,7 @@ uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); -}`]),b=a([`precision highp float; +}`]),w=a([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; @@ -1222,14 +1225,14 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);e.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:c,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:f,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:y,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:o,fragment:b,attributes:[{name:"position",type:"vec3"}]}},7201:function(l,e,t){"use strict";var a=1e-6,r=1e-6,n=t(9405),i=t(2762),s=t(8116),c=t(7766),p=t(8406),f=t(6760),d=t(7608),y=t(9618),o=t(6729),b=t(7765),M=t(1888),A=t(840),E=t(7626),g=A.meshShader,T=A.wireShader,m=A.pointShader,h=A.pickShader,x=A.pointPickShader,_=A.contourShader,D=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function C(ae,j,G,K,H,Z,X,$,Q,re,ue,pe,ge,Te,Se,Ce,Ue,Oe,_e,ce,ie,se,ne,be,De,qe,Ne){this.gl=ae,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=j,this.dirty=!0,this.triShader=G,this.lineShader=K,this.pointShader=H,this.pickShader=Z,this.pointPickShader=X,this.contourShader=$,this.trianglePositions=Q,this.triangleColors=ue,this.triangleNormals=ge,this.triangleUVs=pe,this.triangleIds=re,this.triangleVAO=Te,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Se,this.edgeColors=Ue,this.edgeUVs=Oe,this.edgeIds=Ce,this.edgeVAO=_e,this.edgeCount=0,this.pointPositions=ce,this.pointColors=se,this.pointUVs=ne,this.pointSizes=be,this.pointIds=ie,this.pointVAO=De,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=qe,this.contourVAO=Ne,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!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=D,this._view=D,this._projection=D,this._resolution=[1,1]}var F=C.prototype;F.isOpaque=function(){return!this.hasAlpha},F.isTransparent=function(){return this.hasAlpha},F.pickSlots=1,F.setPickBase=function(ae){this.pickId=ae};function I(ae,j){if(!j||!j.length)return 1;for(var G=0;Gae&&G>0){var K=(j[G][0]-ae)/(j[G][0]-j[G-1][0]);return j[G][1]*(1-K)+K*j[G-1][1]}}return 1}function z(ae,j){for(var G=o({colormap:ae,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),H=0;H<256;++H){for(var Z=G[H],X=0;X<3;++X)K[4*H+X]=Z[X];j?K[4*H+3]=255*I(H/255,j):K[4*H+3]=255*Z[3]}return y(K,[256,256,4],[4,0,1])}function R(ae){for(var j=ae.length,G=new Array(j),K=0;K0){var ge=this.triShader;ge.bind(),ge.uniforms=$,this.triangleVAO.bind(),j.drawArrays(j.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var ge=this.lineShader;ge.bind(),ge.uniforms=$,this.edgeVAO.bind(),j.lineWidth(this.lineWidth*this.pixelRatio),j.drawArrays(j.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var ge=this.pointShader;ge.bind(),ge.uniforms=$,this.pointVAO.bind(),j.drawArrays(j.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var ge=this.contourShader;ge.bind(),ge.uniforms=$,this.contourVAO.bind(),j.drawArrays(j.LINES,0,this.contourCount),this.contourVAO.unbind()}},F.drawPick=function(ae){ae=ae||{};for(var j=this.gl,G=ae.model||D,K=ae.view||D,H=ae.projection||D,Z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],X=0;X<3;++X)Z[0][X]=Math.max(Z[0][X],this.clipBounds[0][X]),Z[1][X]=Math.min(Z[1][X],this.clipBounds[1][X]);this._model=[].slice.call(G),this._view=[].slice.call(K),this._projection=[].slice.call(H),this._resolution=[j.drawingBufferWidth,j.drawingBufferHeight];var $={model:G,view:K,projection:H,clipBounds:Z,pickId:this.pickId/255},Q=this.pickShader;if(Q.bind(),Q.uniforms=$,this.triangleCount>0&&(this.triangleVAO.bind(),j.drawArrays(j.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),j.lineWidth(this.lineWidth*this.pixelRatio),j.drawArrays(j.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Q=this.pointPickShader;Q.bind(),Q.uniforms=$,this.pointVAO.bind(),j.drawArrays(j.POINTS,0,this.pointCount),this.pointVAO.unbind()}},F.pick=function(ae){if(!ae||ae.id!==this.pickId)return null;for(var j=ae.value[0]+256*ae.value[1]+65536*ae.value[2],G=this.cells[j],K=this.positions,H=new Array(G.length),Z=0;ZMath.abs(h))o.rotate(D,0,0,-m*x*Math.PI*g.rotateSpeed/window.innerWidth);else if(!g._ortho){var C=-g.zoomSpeed*_*h/window.innerHeight*(D-o.lastT())/20;o.pan(D,0,0,M*(Math.exp(C)-1))}}},!0)},g.enableMouseListeners(),g}},799:function(l,e,t){var a=t(3236),r=t(9405),n=a([`precision mediump float; +`]);e.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:c,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:h,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:g,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:i,fragment:w,attributes:[{name:"position",type:"vec3"}]}},7201:function(l,e,t){"use strict";var a=1e-6,r=1e-6,n=t(9405),o=t(2762),s=t(8116),c=t(7766),m=t(8406),h=t(6760),p=t(7608),g=t(9618),i=t(6729),w=t(7765),S=t(1888),M=t(840),C=t(7626),_=M.meshShader,T=M.wireShader,f=M.pointShader,u=M.pickShader,A=M.pointPickShader,b=M.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(oe,H,X,K,G,Y,q,$,ee,ne,fe,ye,xe,Ae,Me,Ie,Ue,qe,ke,ge,ue,ve,se,Te,Fe,We,Ge){this.gl=oe,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=H,this.dirty=!0,this.triShader=X,this.lineShader=K,this.pointShader=G,this.pickShader=Y,this.pointPickShader=q,this.contourShader=$,this.trianglePositions=ee,this.triangleColors=fe,this.triangleNormals=xe,this.triangleUVs=ye,this.triangleIds=ne,this.triangleVAO=Ae,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Me,this.edgeColors=Ue,this.edgeUVs=qe,this.edgeIds=Ie,this.edgeVAO=ke,this.edgeCount=0,this.pointPositions=ge,this.pointColors=ve,this.pointUVs=se,this.pointSizes=Te,this.pointIds=ue,this.pointVAO=Fe,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=We,this.contourVAO=Ge,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!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=z,this._view=z,this._projection=z,this._resolution=[1,1]}var N=I.prototype;N.isOpaque=function(){return!this.hasAlpha},N.isTransparent=function(){return this.hasAlpha},N.pickSlots=1,N.setPickBase=function(oe){this.pickId=oe};function R(oe,H){if(!H||!H.length)return 1;for(var X=0;Xoe&&X>0){var K=(H[X][0]-oe)/(H[X][0]-H[X-1][0]);return H[X][1]*(1-K)+K*H[X-1][1]}}return 1}function B(oe,H){for(var X=i({colormap:oe,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),G=0;G<256;++G){for(var Y=X[G],q=0;q<3;++q)K[4*G+q]=Y[q];H?K[4*G+3]=255*R(G/255,H):K[4*G+3]=255*Y[3]}return g(K,[256,256,4],[4,0,1])}function F(oe){for(var H=oe.length,X=new Array(H),K=0;K0){var xe=this.triShader;xe.bind(),xe.uniforms=$,this.triangleVAO.bind(),H.drawArrays(H.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var xe=this.lineShader;xe.bind(),xe.uniforms=$,this.edgeVAO.bind(),H.lineWidth(this.lineWidth*this.pixelRatio),H.drawArrays(H.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var xe=this.pointShader;xe.bind(),xe.uniforms=$,this.pointVAO.bind(),H.drawArrays(H.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var xe=this.contourShader;xe.bind(),xe.uniforms=$,this.contourVAO.bind(),H.drawArrays(H.LINES,0,this.contourCount),this.contourVAO.unbind()}},N.drawPick=function(oe){oe=oe||{};for(var H=this.gl,X=oe.model||z,K=oe.view||z,G=oe.projection||z,Y=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)Y[0][q]=Math.max(Y[0][q],this.clipBounds[0][q]),Y[1][q]=Math.min(Y[1][q],this.clipBounds[1][q]);this._model=[].slice.call(X),this._view=[].slice.call(K),this._projection=[].slice.call(G),this._resolution=[H.drawingBufferWidth,H.drawingBufferHeight];var $={model:X,view:K,projection:G,clipBounds:Y,pickId:this.pickId/255},ee=this.pickShader;if(ee.bind(),ee.uniforms=$,this.triangleCount>0&&(this.triangleVAO.bind(),H.drawArrays(H.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),H.lineWidth(this.lineWidth*this.pixelRatio),H.drawArrays(H.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ee=this.pointPickShader;ee.bind(),ee.uniforms=$,this.pointVAO.bind(),H.drawArrays(H.POINTS,0,this.pointCount),this.pointVAO.unbind()}},N.pick=function(oe){if(!oe||oe.id!==this.pickId)return null;for(var H=oe.value[0]+256*oe.value[1]+65536*oe.value[2],X=this.cells[H],K=this.positions,G=new Array(X.length),Y=0;YMath.abs(u))i.rotate(z,0,0,-f*A*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var I=-_.zoomSpeed*b*u/window.innerHeight*(z-i.lastT())/20;i.pan(z,0,0,S*(Math.exp(I)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(l,e,t){var a=t(3236),r=t(9405),n=a([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); -}`]),i=a([`precision mediump float; +}`]),o=a([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; @@ -1238,7 +1241,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);l.exports=function(s){return r(s,n,i,null,[{name:"position",type:"vec2"}])}},4100:function(l,e,t){"use strict";var a=t(4437),r=t(3837),n=t(5445),i=t(4449),s=t(3589),c=t(2260),p=t(7169),f=t(351),d=t(4772),y=t(4040),o=t(799),b=t(9216)({tablet:!0,featureDetect:!0});l.exports={createScene:T,createCamera:a};function M(){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 A(h,x){var _=null;try{_=h.getContext("webgl",x),_||(_=h.getContext("experimental-webgl",x))}catch{return null}return _}function E(h){var x=Math.round(Math.log(Math.abs(h))/Math.log(10));if(x<0){var _=Math.round(Math.pow(10,-x));return Math.ceil(h*_)/_}else if(x>0){var _=Math.round(Math.pow(10,x));return Math.ceil(h/_)*_}return Math.ceil(h)}function g(h){return typeof h=="boolean"?h:!0}function T(h){h=h||{},h.camera=h.camera||{};var x=h.canvas;if(!x)if(x=document.createElement("canvas"),h.container){var _=h.container;_.appendChild(x)}else document.body.appendChild(x);var D=h.gl;if(D||(h.glOptions&&(b=!!h.glOptions.preserveDrawingBuffer),D=A(x,h.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:b})),!D)throw new Error("webgl not supported");var C=h.bounds||[[-10,-10,-10],[10,10,10]],F=new M,I=c(D,D.drawingBufferWidth,D.drawingBufferHeight,{preferFloat:!b}),z=o(D),R=h.cameraObject&&h.cameraObject._ortho===!0||h.camera.projection&&h.camera.projection.type==="orthographic"||!1,k={eye:h.camera.eye||[2,0,0],center:h.camera.center||[0,0,0],up:h.camera.up||[0,1,0],zoomMin:h.camera.zoomMax||.1,zoomMax:h.camera.zoomMin||100,mode:h.camera.mode||"turntable",_ortho:R},B=h.axes||{},N=r(D,B);N.enable=!B.disable;var q=h.spikes||{},Y=i(D,q),ee=[],te=[],ae=[],j=[],G=!0,X=!0,K=new Array(16),H=new Array(16),Z={view:null,projection:K,model:H,_ortho:!1},X=!0,$=[D.drawingBufferWidth,D.drawingBufferHeight],Q=h.cameraObject||a(x,k),re={gl:D,contextLost:!1,pixelRatio:h.pixelRatio||1,canvas:x,selection:F,camera:Q,axes:N,axesPixels:null,spikes:Y,bounds:C,objects:ee,shape:$,aspect:h.aspectRatio||[1,1,1],pickRadius:h.pickRadius||10,zNear:h.zNear||.01,zFar:h.zFar||1e3,fovy:h.fovy||Math.PI/4,clearColor:h.clearColor||[0,0,0,0],autoResize:g(h.autoResize),autoBounds:g(h.autoBounds),autoScale:!!h.autoScale,autoCenter:g(h.autoCenter),clipToBounds:g(h.clipToBounds),snapToData:!!h.snapToData,onselect:h.onselect||null,onrender:h.onrender||null,onclick:h.onclick||null,cameraParams:Z,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(ce){this.aspect[0]=ce.x,this.aspect[1]=ce.y,this.aspect[2]=ce.z,X=!0},setBounds:function(ce,ie){this.bounds[0][ce]=ie.min,this.bounds[1][ce]=ie.max},setClearColor:function(ce){this.clearColor=ce},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},ue=[D.drawingBufferWidth/re.pixelRatio|0,D.drawingBufferHeight/re.pixelRatio|0];function pe(){if(!re._stopped&&re.autoResize){var ce=x.parentNode,ie=1,se=1;ce&&ce!==document.body?(ie=ce.clientWidth,se=ce.clientHeight):(ie=window.innerWidth,se=window.innerHeight);var ne=Math.ceil(ie*re.pixelRatio)|0,be=Math.ceil(se*re.pixelRatio)|0;if(ne!==x.width||be!==x.height){x.width=ne,x.height=be;var De=x.style;De.position=De.position||"absolute",De.left="0px",De.top="0px",De.width=ie+"px",De.height=se+"px",G=!0}}}re.autoResize&&pe(),window.addEventListener("resize",pe);function ge(){for(var ce=ee.length,ie=j.length,se=0;se0&&ae[ie-1]===0;)ae.pop(),j.pop().dispose()}re.update=function(ce){re._stopped||(ce=ce||{},G=!0,X=!0)},re.add=function(ce){re._stopped||(ce.axes=N,ee.push(ce),te.push(-1),G=!0,X=!0,ge())},re.remove=function(ce){if(!re._stopped){var ie=ee.indexOf(ce);ie<0||(ee.splice(ie,1),te.pop(),G=!0,X=!0,ge())}},re.dispose=function(){if(!re._stopped&&(re._stopped=!0,window.removeEventListener("resize",pe),x.removeEventListener("webglcontextlost",Te),re.mouseListener.enabled=!1,!re.contextLost)){N.dispose(),Y.dispose();for(var ce=0;ceF.distance)continue;for(var ot=0;ot1e-6?(b=Math.acos(M),A=Math.sin(b),E=Math.sin((1-n)*b)/A,g=Math.sin(n*b)/A):(E=1-n,g=n),t[0]=E*i+g*f,t[1]=E*s+g*d,t[2]=E*c+g*y,t[3]=E*p+g*o,t}},5964:function(l){"use strict";l.exports=function(e){return!e&&e!==0?"":e.toString()}},9366:function(l,e,t){"use strict";var a=t(4359);l.exports=n;var r={};function n(i,s,c){var p=[s.style,s.weight,s.variant,s.family].join("_"),f=r[p];if(f||(f=r[p]={}),i in f)return f[i];var d={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};d.triangles=!0;var y=a(i,d);d.triangles=!1;var o=a(i,d),b,M;if(c&&c!==1){for(b=0;b0){var b=Math.round(Math.pow(10,A));return Math.ceil(u/b)*b}return Math.ceil(u)}function _(u){return typeof u=="boolean"?u:!0}function T(u){u=u||{},u.camera=u.camera||{};var A=u.canvas;if(!A)if(A=document.createElement("canvas"),u.container){var b=u.container;b.appendChild(A)}else document.body.appendChild(A);var z=u.gl;if(z||(u.glOptions&&(w=!!u.glOptions.preserveDrawingBuffer),z=M(A,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!z)throw new Error("webgl not supported");var I=u.bounds||[[-10,-10,-10],[10,10,10]],N=new S,R=c(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!w}),B=i(z),F=u.cameraObject&&u.cameraObject._ortho===!0||u.camera.projection&&u.camera.projection.type==="orthographic"||!1,P={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:F},j=u.axes||{},U=r(z,j);U.enable=!j.disable;var Z=u.spikes||{},Q=o(z,Z),re=[],ae=[],oe=[],H=[],X=!0,q=!0,K=new Array(16),G=new Array(16),Y={view:null,projection:K,model:G,_ortho:!1},q=!0,$=[z.drawingBufferWidth,z.drawingBufferHeight],ee=u.cameraObject||a(A,P),ne={gl:z,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:A,selection:N,camera:ee,axes:U,axesPixels:null,spikes:Q,bounds:I,objects:re,shape:$,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:_(u.autoResize),autoBounds:_(u.autoBounds),autoScale:!!u.autoScale,autoCenter:_(u.autoCenter),clipToBounds:_(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:Y,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(ge){this.aspect[0]=ge.x,this.aspect[1]=ge.y,this.aspect[2]=ge.z,q=!0},setBounds:function(ge,ue){this.bounds[0][ge]=ue.min,this.bounds[1][ge]=ue.max},setClearColor:function(ge){this.clearColor=ge},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},fe=[z.drawingBufferWidth/ne.pixelRatio|0,z.drawingBufferHeight/ne.pixelRatio|0];function ye(){if(!ne._stopped&&ne.autoResize){var ge=A.parentNode,ue=1,ve=1;ge&&ge!==document.body?(ue=ge.clientWidth,ve=ge.clientHeight):(ue=window.innerWidth,ve=window.innerHeight);var se=Math.ceil(ue*ne.pixelRatio)|0,Te=Math.ceil(ve*ne.pixelRatio)|0;if(se!==A.width||Te!==A.height){A.width=se,A.height=Te;var Fe=A.style;Fe.position=Fe.position||"absolute",Fe.left="0px",Fe.top="0px",Fe.width=ue+"px",Fe.height=ve+"px",X=!0}}}ne.autoResize&&ye(),window.addEventListener("resize",ye);function xe(){for(var ge=re.length,ue=H.length,ve=0;ve0&&oe[ue-1]===0;)oe.pop(),H.pop().dispose()}ne.update=function(ge){ne._stopped||(ge=ge||{},X=!0,q=!0)},ne.add=function(ge){ne._stopped||(ge.axes=U,re.push(ge),ae.push(-1),X=!0,q=!0,xe())},ne.remove=function(ge){if(!ne._stopped){var ue=re.indexOf(ge);ue<0||(re.splice(ue,1),ae.pop(),X=!0,q=!0,xe())}},ne.dispose=function(){if(!ne._stopped&&(ne._stopped=!0,window.removeEventListener("resize",ye),A.removeEventListener("webglcontextlost",Ae),ne.mouseListener.enabled=!1,!ne.contextLost)){U.dispose(),Q.dispose();for(var ge=0;geN.distance)continue;for(var mt=0;mt1e-6?(w=Math.acos(S),M=Math.sin(w),C=Math.sin((1-n)*w)/M,_=Math.sin(n*w)/M):(C=1-n,_=n),t[0]=C*o+_*h,t[1]=C*s+_*p,t[2]=C*c+_*g,t[3]=C*m+_*i,t}},5964:function(l){"use strict";l.exports=function(e){return!e&&e!==0?"":e.toString()}},9366:function(l,e,t){"use strict";var a=t(4359);l.exports=n;var r={};function n(o,s,c){var m=[s.style,s.weight,s.variant,s.family].join("_"),h=r[m];if(h||(h=r[m]={}),o in h)return h[o];var p={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};p.triangles=!0;var g=a(o,p);p.triangles=!1;var i=a(o,p),w,S;if(c&&c!==1){for(w=0;w1?1:H}function m(H,Z,X,$,Q,re,ue,pe,ge,Te,Se,Ce){this.gl=H,this.pixelRatio=1,this.shader=Z,this.orthoShader=X,this.projectShader=$,this.pointBuffer=Q,this.colorBuffer=re,this.glyphBuffer=ue,this.idBuffer=pe,this.vao=ge,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Te,this.pickOrthoShader=Se,this.pickProjectShader=Ce,this.points=[],this._selectResult=new g(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}var h=m.prototype;h.pickSlots=1,h.setPickBase=function(H){this.pickId=H},h.isTransparent=function(){if(this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&this.projectHasAlpha)return!0;return!1},h.isOpaque=function(){if(!this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&!this.projectHasAlpha)return!0;return!1};var x=[0,0],_=[0,0,0],D=[0,0,0],C=[0,0,0,1],F=[0,0,0,1],I=d.slice(),z=[0,0,0],R=[[0,0,0],[0,0,0]];function k(H){return H[0]=H[1]=H[2]=0,H}function B(H,Z){return H[0]=Z[0],H[1]=Z[1],H[2]=Z[2],H[3]=1,H}function N(H,Z,X,$){return H[0]=Z[0],H[1]=Z[1],H[2]=Z[2],H[X]=$,H}function q(H){for(var Z=R,X=0;X<2;++X)for(var $=0;$<3;++$)Z[X][$]=Math.max(Math.min(H[X][$],1e8),-1e8);return Z}function Y(H,Z,X,$){var Q=Z.axesProject,re=Z.gl,ue=H.uniforms,pe=X.model||d,ge=X.view||d,Te=X.projection||d,Se=Z.axesBounds,Ce=q(Z.clipBounds),Ue;Z.axes&&Z.axes.lastCubeProps?Ue=Z.axes.lastCubeProps.axis:Ue=[1,1,1],x[0]=2/re.drawingBufferWidth,x[1]=2/re.drawingBufferHeight,H.bind(),ue.view=ge,ue.projection=Te,ue.screenSize=x,ue.highlightId=Z.highlightId,ue.highlightScale=Z.highlightScale,ue.clipBounds=Ce,ue.pickGroup=Z.pickId/255,ue.pixelRatio=$;for(var Oe=0;Oe<3;++Oe)if(Q[Oe]){ue.scale=Z.projectScale[Oe],ue.opacity=Z.projectOpacity[Oe];for(var _e=I,ce=0;ce<16;++ce)_e[ce]=0;for(var ce=0;ce<4;++ce)_e[5*ce]=1;_e[5*Oe]=0,Ue[Oe]<0?_e[12+Oe]=Se[0][Oe]:_e[12+Oe]=Se[1][Oe],s(_e,pe,_e),ue.model=_e;var ie=(Oe+1)%3,se=(Oe+2)%3,ne=k(_),be=k(D);ne[ie]=1,be[se]=1;var De=E(Te,ge,pe,B(C,ne)),qe=E(Te,ge,pe,B(F,be));if(Math.abs(De[1])>Math.abs(qe[1])){var Ne=De;De=qe,qe=Ne,Ne=ne,ne=be,be=Ne;var ut=ie;ie=se,se=ut}De[0]<0&&(ne[ie]=-1),qe[1]>0&&(be[se]=-1);for(var ot=0,yt=0,ce=0;ce<4;++ce)ot+=Math.pow(pe[4*ie+ce],2),yt+=Math.pow(pe[4*se+ce],2);ne[ie]/=Math.sqrt(ot),be[se]/=Math.sqrt(yt),ue.axes[0]=ne,ue.axes[1]=be,ue.fragClipBounds[0]=N(z,Ce[0],Oe,-1e8),ue.fragClipBounds[1]=N(z,Ce[1],Oe,1e8),Z.vao.bind(),Z.vao.draw(re.TRIANGLES,Z.vertexCount),Z.lineWidth>0&&(re.lineWidth(Z.lineWidth*$),Z.vao.draw(re.LINES,Z.lineVertexCount,Z.vertexCount)),Z.vao.unbind()}}var ee=[-1e8,-1e8,-1e8],te=[1e8,1e8,1e8],ae=[ee,te];function j(H,Z,X,$,Q,re,ue){var pe=X.gl;if((re===X.projectHasAlpha||ue)&&Y(Z,X,$,Q),re===X.hasAlpha||ue){H.bind();var ge=H.uniforms;ge.model=$.model||d,ge.view=$.view||d,ge.projection=$.projection||d,x[0]=2/pe.drawingBufferWidth,x[1]=2/pe.drawingBufferHeight,ge.screenSize=x,ge.highlightId=X.highlightId,ge.highlightScale=X.highlightScale,ge.fragClipBounds=ae,ge.clipBounds=X.axes.bounds,ge.opacity=X.opacity,ge.pickGroup=X.pickId/255,ge.pixelRatio=Q,X.vao.bind(),X.vao.draw(pe.TRIANGLES,X.vertexCount),X.lineWidth>0&&(pe.lineWidth(X.lineWidth*Q),X.vao.draw(pe.LINES,X.lineVertexCount,X.vertexCount)),X.vao.unbind()}}h.draw=function(H){var Z=this.useOrtho?this.orthoShader:this.shader;j(Z,this.projectShader,this,H,this.pixelRatio,!1,!1)},h.drawTransparent=function(H){var Z=this.useOrtho?this.orthoShader:this.shader;j(Z,this.projectShader,this,H,this.pixelRatio,!0,!1)},h.drawPick=function(H){var Z=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;j(Z,this.pickProjectShader,this,H,1,!0,!0)},h.pick=function(H){if(!H||H.id!==this.pickId)return null;var Z=H.value[2]+(H.value[1]<<8)+(H.value[0]<<16);if(Z>=this.pointCount||Z<0)return null;var X=this.points[Z],$=this._selectResult;$.index=Z;for(var Q=0;Q<3;++Q)$.position[Q]=$.dataCoordinate[Q]=X[Q];return $},h.highlight=function(H){if(!H)this.highlightId=[1,1,1,1];else{var Z=H.index,X=Z&255,$=Z>>8&255,Q=Z>>16&255;this.highlightId=[X/255,$/255,Q/255,0]}};function G(H,Z,X,$){var Q;M(H)?Z0){var Jt=0,at=se,Ee=[0,0,0,1],Re=[0,0,0,1],he=M(Ue)&&M(Ue[0]),ye=M(ce)&&M(ce[0]);e:for(var $=0;$0?1-yt[0][0]:ft<0?1+yt[1][0]:1,mt*=mt>0?1-yt[0][1]:mt<0?1+yt[1][1]:1;for(var _t=[ft,mt],ca=ut.cells||[],na=ut.positions||[],qe=0;qethis.buffer.length){r.free(this.buffer);for(var M=this.buffer=r.mallocUint8(i(b*o*4)),A=0;AM)for(o=M;ob)for(o=b;o=0){for(var R=z.type.charAt(z.type.length-1)|0,k=new Array(R),B=0;B=0;)N+=1;F[I]=N}var q=new Array(M.length);function Y(){g.program=i.program(T,g._vref,g._fref,C,F);for(var ee=0;ee=0){var h=T.charCodeAt(T.length-1)-48;if(h<2||h>4)throw new a("","Invalid data type for attribute "+g+": "+T);s(f,d,m[0],o,h,b,g)}else if(T.indexOf("mat")>=0){var h=T.charCodeAt(T.length-1)-48;if(h<2||h>4)throw new a("","Invalid data type for attribute "+g+": "+T);c(f,d,m,o,h,b,g)}else throw new a("","Unknown data type for attribute "+g+": "+T);break}}return b}},3327:function(l,e,t){"use strict";var a=t(216),r=t(8866);l.exports=s;function n(c){return function(){return c}}function i(c,p){for(var f=new Array(c),d=0;d4)throw new r("","Invalid data type");switch(N.charAt(0)){case"b":case"i":c["uniform"+q+"iv"](d[F],I);break;case"v":c["uniform"+q+"fv"](d[F],I);break;default:throw new r("","Unrecognized data type for vector "+name+": "+N)}}else if(N.indexOf("mat")===0&&N.length===4){if(q=N.charCodeAt(N.length-1)-48,q<2||q>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+N);c["uniformMatrix"+q+"fv"](d[F],!1,I);break}else throw new r("","Unknown uniform data type for "+name+": "+N)}}}}}function b(T,m){if(typeof m!="object")return[[T,m]];var h=[];for(var x in m){var _=m[x],D=T;parseInt(x)+""===x?D+="["+x+"]":D+="."+x,typeof _=="object"?h.push.apply(h,b(D,_)):h.push([D,_])}return h}function M(T){switch(T){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var m=T.indexOf("vec");if(0<=m&&m<=1&&T.length===4+m){var h=T.charCodeAt(T.length-1)-48;if(h<2||h>4)throw new r("","Invalid data type");return T.charAt(0)==="b"?i(h,!1):i(h,0)}else if(T.indexOf("mat")===0&&T.length===4){var h=T.charCodeAt(T.length-1)-48;if(h<2||h>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+T);return i(h*h,0)}else throw new r("","Unknown uniform data type for "+name+": "+T)}}function A(T,m,h){if(typeof h=="object"){var x=E(h);Object.defineProperty(T,m,{get:n(x),set:o(h),enumerable:!0,configurable:!1})}else d[h]?Object.defineProperty(T,m,{get:y(h),set:o(h),enumerable:!0,configurable:!1}):T[m]=M(f[h].type)}function E(T){var m;if(Array.isArray(T)){m=new Array(T.length);for(var h=0;h1){f[0]in c||(c[f[0]]=[]),c=c[f[0]];for(var d=1;d1)for(var b=0;b"u"?t(606):WeakMap,i=new n,s=0;function c(A,E,g,T,m,h,x){this.id=A,this.src=E,this.type=g,this.shader=T,this.count=h,this.programs=[],this.cache=x}c.prototype.dispose=function(){if(--this.count===0){for(var A=this.cache,E=A.gl,g=this.programs,T=0,m=g.length;T1?1:G}function f(G,Y,q,$,ee,ne,fe,ye,xe,Ae,Me,Ie){this.gl=G,this.pixelRatio=1,this.shader=Y,this.orthoShader=q,this.projectShader=$,this.pointBuffer=ee,this.colorBuffer=ne,this.glyphBuffer=fe,this.idBuffer=ye,this.vao=xe,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Ae,this.pickOrthoShader=Me,this.pickProjectShader=Ie,this.points=[],this._selectResult=new _(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}var u=f.prototype;u.pickSlots=1,u.setPickBase=function(G){this.pickId=G},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var G=0;G<3;++G)if(this.axesProject[G]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var G=0;G<3;++G)if(this.axesProject[G]&&!this.projectHasAlpha)return!0;return!1};var A=[0,0],b=[0,0,0],z=[0,0,0],I=[0,0,0,1],N=[0,0,0,1],R=p.slice(),B=[0,0,0],F=[[0,0,0],[0,0,0]];function P(G){return G[0]=G[1]=G[2]=0,G}function j(G,Y){return G[0]=Y[0],G[1]=Y[1],G[2]=Y[2],G[3]=1,G}function U(G,Y,q,$){return G[0]=Y[0],G[1]=Y[1],G[2]=Y[2],G[q]=$,G}function Z(G){for(var Y=F,q=0;q<2;++q)for(var $=0;$<3;++$)Y[q][$]=Math.max(Math.min(G[q][$],1e8),-1e8);return Y}function Q(G,Y,q,$){var ee=Y.axesProject,ne=Y.gl,fe=G.uniforms,ye=q.model||p,xe=q.view||p,Ae=q.projection||p,Me=Y.axesBounds,Ie=Z(Y.clipBounds),Ue;Y.axes&&Y.axes.lastCubeProps?Ue=Y.axes.lastCubeProps.axis:Ue=[1,1,1],A[0]=2/ne.drawingBufferWidth,A[1]=2/ne.drawingBufferHeight,G.bind(),fe.view=xe,fe.projection=Ae,fe.screenSize=A,fe.highlightId=Y.highlightId,fe.highlightScale=Y.highlightScale,fe.clipBounds=Ie,fe.pickGroup=Y.pickId/255,fe.pixelRatio=$;for(var qe=0;qe<3;++qe)if(ee[qe]){fe.scale=Y.projectScale[qe],fe.opacity=Y.projectOpacity[qe];for(var ke=R,ge=0;ge<16;++ge)ke[ge]=0;for(var ge=0;ge<4;++ge)ke[5*ge]=1;ke[5*qe]=0,Ue[qe]<0?ke[12+qe]=Me[0][qe]:ke[12+qe]=Me[1][qe],s(ke,ye,ke),fe.model=ke;var ue=(qe+1)%3,ve=(qe+2)%3,se=P(b),Te=P(z);se[ue]=1,Te[ve]=1;var Fe=C(Ae,xe,ye,j(I,se)),We=C(Ae,xe,ye,j(N,Te));if(Math.abs(Fe[1])>Math.abs(We[1])){var Ge=Fe;Fe=We,We=Ge,Ge=se,se=Te,Te=Ge;var gt=ue;ue=ve,ve=gt}Fe[0]<0&&(se[ue]=-1),We[1]>0&&(Te[ve]=-1);for(var mt=0,Tt=0,ge=0;ge<4;++ge)mt+=Math.pow(ye[4*ue+ge],2),Tt+=Math.pow(ye[4*ve+ge],2);se[ue]/=Math.sqrt(mt),Te[ve]/=Math.sqrt(Tt),fe.axes[0]=se,fe.axes[1]=Te,fe.fragClipBounds[0]=U(B,Ie[0],qe,-1e8),fe.fragClipBounds[1]=U(B,Ie[1],qe,1e8),Y.vao.bind(),Y.vao.draw(ne.TRIANGLES,Y.vertexCount),Y.lineWidth>0&&(ne.lineWidth(Y.lineWidth*$),Y.vao.draw(ne.LINES,Y.lineVertexCount,Y.vertexCount)),Y.vao.unbind()}}var re=[-1e8,-1e8,-1e8],ae=[1e8,1e8,1e8],oe=[re,ae];function H(G,Y,q,$,ee,ne,fe){var ye=q.gl;if((ne===q.projectHasAlpha||fe)&&Q(Y,q,$,ee),ne===q.hasAlpha||fe){G.bind();var xe=G.uniforms;xe.model=$.model||p,xe.view=$.view||p,xe.projection=$.projection||p,A[0]=2/ye.drawingBufferWidth,A[1]=2/ye.drawingBufferHeight,xe.screenSize=A,xe.highlightId=q.highlightId,xe.highlightScale=q.highlightScale,xe.fragClipBounds=oe,xe.clipBounds=q.axes.bounds,xe.opacity=q.opacity,xe.pickGroup=q.pickId/255,xe.pixelRatio=ee,q.vao.bind(),q.vao.draw(ye.TRIANGLES,q.vertexCount),q.lineWidth>0&&(ye.lineWidth(q.lineWidth*ee),q.vao.draw(ye.LINES,q.lineVertexCount,q.vertexCount)),q.vao.unbind()}}u.draw=function(G){var Y=this.useOrtho?this.orthoShader:this.shader;H(Y,this.projectShader,this,G,this.pixelRatio,!1,!1)},u.drawTransparent=function(G){var Y=this.useOrtho?this.orthoShader:this.shader;H(Y,this.projectShader,this,G,this.pixelRatio,!0,!1)},u.drawPick=function(G){var Y=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;H(Y,this.pickProjectShader,this,G,1,!0,!0)},u.pick=function(G){if(!G||G.id!==this.pickId)return null;var Y=G.value[2]+(G.value[1]<<8)+(G.value[0]<<16);if(Y>=this.pointCount||Y<0)return null;var q=this.points[Y],$=this._selectResult;$.index=Y;for(var ee=0;ee<3;++ee)$.position[ee]=$.dataCoordinate[ee]=q[ee];return $},u.highlight=function(G){if(!G)this.highlightId=[1,1,1,1];else{var Y=G.index,q=Y&255,$=Y>>8&255,ee=Y>>16&255;this.highlightId=[q/255,$/255,ee/255,0]}};function X(G,Y,q,$){var ee;S(G)?Y0){var sr=0,Ot=ve,vt=[0,0,0,1],ht=[0,0,0,1],Re=S(Ue)&&S(Ue[0]),Be=S(ge)&&S(ge[0]);e:for(var $=0;$0?1-Tt[0][0]:Dt<0?1+Tt[1][0]:1,Ct*=Ct>0?1-Tt[0][1]:Ct<0?1+Tt[1][1]:1;for(var Vt=[Dt,Ct],$t=gt.cells||[],It=gt.positions||[],We=0;We<$t.length;++We)for(var Ht=$t[We],Wt=0;Wt<3;++Wt){for(var Sr=0;Sr<3;++Sr)Kt[3*sr+Sr]=Fe[Sr];for(var Sr=0;Sr<4;++Sr)nr[4*sr+Sr]=vt[Sr];Zt[sr]=ue;var on=It[Ht[Wt]];_r[2*sr]=Ze*(Mt*on[0]-dt*on[1]+Vt[0]),_r[2*sr+1]=Ze*(dt*on[0]+Mt*on[1]+Vt[1]),sr+=1}for(var $t=mt.edges,It=mt.positions,We=0;We<$t.length;++We)for(var Ht=$t[We],Wt=0;Wt<2;++Wt){for(var Sr=0;Sr<3;++Sr)Kt[3*Ot+Sr]=Fe[Sr];for(var Sr=0;Sr<4;++Sr)nr[4*Ot+Sr]=ht[Sr];Zt[Ot]=ue;var on=It[Ht[Wt]];_r[2*Ot]=Ze*(Mt*on[0]-dt*on[1]+Vt[0]),_r[2*Ot+1]=Ze*(dt*on[0]+Mt*on[1]+Vt[1]),Ot+=1}}}this.bounds=[Ae,Me],this.points=ee,this.pointCount=ee.length,this.vertexCount=ve,this.lineVertexCount=se,this.pointBuffer.update(Kt),this.colorBuffer.update(nr),this.glyphBuffer.update(_r),this.idBuffer.update(Zt),o.free(Kt),o.free(nr),o.free(_r),o.free(Zt)},u.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()};function K(G){var Y=G.gl,q=c.createPerspective(Y),$=c.createOrtho(Y),ee=c.createProject(Y),ne=c.createPickPerspective(Y),fe=c.createPickOrtho(Y),ye=c.createPickProject(Y),xe=r(Y),Ae=r(Y),Me=r(Y),Ie=r(Y),Ue=n(Y,[{buffer:xe,size:3,type:Y.FLOAT},{buffer:Ae,size:4,type:Y.FLOAT},{buffer:Me,size:2,type:Y.FLOAT},{buffer:Ie,size:4,type:Y.UNSIGNED_BYTE,normalized:!0}]),qe=new f(Y,q,$,ee,xe,Ae,Me,Ie,Ue,ne,fe,ye);return qe.update(G),qe}},3589:function(l,e,t){"use strict";l.exports=p;var a=t(2260),r=t(1888),n=t(9618),o=t(8828).nextPow2,s=function(g,i,w){for(var S=1e8,M=-1,C=-1,_=g.shape[0],T=g.shape[1],f=0;f<_;f++)for(var u=0;uthis.buffer.length){r.free(this.buffer);for(var S=this.buffer=r.mallocUint8(o(w*i*4)),M=0;MS)for(i=S;iw)for(i=w;i=0){for(var F=B.type.charAt(B.type.length-1)|0,P=new Array(F),j=0;j=0;)U+=1;N[R]=U}var Z=new Array(S.length);function Q(){_.program=o.program(T,_._vref,_._fref,I,N);for(var re=0;re=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new a("","Invalid data type for attribute "+_+": "+T);s(h,p,f[0],i,u,w,_)}else if(T.indexOf("mat")>=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new a("","Invalid data type for attribute "+_+": "+T);c(h,p,f,i,u,w,_)}else throw new a("","Unknown data type for attribute "+_+": "+T);break}}return w}},3327:function(l,e,t){"use strict";var a=t(216),r=t(8866);l.exports=s;function n(c){return function(){return c}}function o(c,m){for(var h=new Array(c),p=0;p4)throw new r("","Invalid data type");switch(U.charAt(0)){case"b":case"i":c["uniform"+Z+"iv"](p[N],R);break;case"v":c["uniform"+Z+"fv"](p[N],R);break;default:throw new r("","Unrecognized data type for vector "+name+": "+U)}}else if(U.indexOf("mat")===0&&U.length===4){if(Z=U.charCodeAt(U.length-1)-48,Z<2||Z>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+U);c["uniformMatrix"+Z+"fv"](p[N],!1,R);break}else throw new r("","Unknown uniform data type for "+name+": "+U)}}}}}function w(T,f){if(typeof f!="object")return[[T,f]];var u=[];for(var A in f){var b=f[A],z=T;parseInt(A)+""===A?z+="["+A+"]":z+="."+A,typeof b=="object"?u.push.apply(u,w(z,b)):u.push([z,b])}return u}function S(T){switch(T){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var f=T.indexOf("vec");if(0<=f&&f<=1&&T.length===4+f){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid data type");return T.charAt(0)==="b"?o(u,!1):o(u,0)}else if(T.indexOf("mat")===0&&T.length===4){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+T);return o(u*u,0)}else throw new r("","Unknown uniform data type for "+name+": "+T)}}function M(T,f,u){if(typeof u=="object"){var A=C(u);Object.defineProperty(T,f,{get:n(A),set:i(u),enumerable:!0,configurable:!1})}else p[u]?Object.defineProperty(T,f,{get:g(u),set:i(u),enumerable:!0,configurable:!1}):T[f]=S(h[u].type)}function C(T){var f;if(Array.isArray(T)){f=new Array(T.length);for(var u=0;u1){h[0]in c||(c[h[0]]=[]),c=c[h[0]];for(var p=1;p1)for(var w=0;w"u"?t(606):WeakMap,o=new n,s=0;function c(M,C,_,T,f,u,A){this.id=M,this.src=C,this.type=_,this.shader=T,this.count=u,this.programs=[],this.cache=A}c.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,C=M.gl,_=this.programs,T=0,f=_.length;T0)for(var j=0;jE)return T-1}return T},p=function(A,E,g){return Ag?g:A},f=function(A,E,g){var T=E.vectors,m=E.meshgrid,h=A[0],x=A[1],_=A[2],D=m[0].length,C=m[1].length,F=m[2].length,I=c(m[0],h),z=c(m[1],x),R=c(m[2],_),k=I+1,B=z+1,N=R+1;if(I=p(I,0,D-1),k=p(k,0,D-1),z=p(z,0,C-1),B=p(B,0,C-1),R=p(R,0,F-1),N=p(N,0,F-1),I<0||z<0||R<0||k>D-1||B>C-1||N>F-1)return a.create();var q=m[0][I],Y=m[0][k],ee=m[1][z],te=m[1][B],ae=m[2][R],j=m[2][N],G=(h-q)/(Y-q),K=(x-ee)/(te-ee),H=(_-ae)/(j-ae);isFinite(G)||(G=.5),isFinite(K)||(K=.5),isFinite(H)||(H=.5);var Z,X,$,Q,re,ue;switch(g.reversedX&&(I=D-1-I,k=D-1-k),g.reversedY&&(z=C-1-z,B=C-1-B),g.reversedZ&&(R=F-1-R,N=F-1-N),g.filled){case 5:re=R,ue=N,$=z*F,Q=B*F,Z=I*F*C,X=k*F*C;break;case 4:re=R,ue=N,Z=I*F,X=k*F,$=z*F*D,Q=B*F*D;break;case 3:$=z,Q=B,re=R*C,ue=N*C,Z=I*C*F,X=k*C*F;break;case 2:$=z,Q=B,Z=I*C,X=k*C,re=R*C*D,ue=N*C*D;break;case 1:Z=I,X=k,re=R*D,ue=N*D,$=z*D*F,Q=B*D*F;break;default:Z=I,X=k,$=z*D,Q=B*D,re=R*D*C,ue=N*D*C;break}var pe=T[Z+$+re],ge=T[Z+$+ue],Te=T[Z+Q+re],Se=T[Z+Q+ue],Ce=T[X+$+re],Ue=T[X+$+ue],Oe=T[X+Q+re],_e=T[X+Q+ue],ce=a.create(),ie=a.create(),se=a.create(),ne=a.create();a.lerp(ce,pe,Ce,G),a.lerp(ie,ge,Ue,G),a.lerp(se,Te,Oe,G),a.lerp(ne,Se,_e,G);var be=a.create(),De=a.create();a.lerp(be,ce,se,K),a.lerp(De,ie,ne,K);var qe=a.create();return a.lerp(qe,be,De,H),qe},d=function(A,E){var g=E[0],T=E[1],m=E[2];return A[0]=g<0?-g:g,A[1]=T<0?-T:T,A[2]=m<0?-m:m,A},y=function(A){var E=1/0;A.sort(function(h,x){return h-x});for(var g=A.length,T=1;Tk||_eB||ceN)},Y=a.distance(E[0],E[1]),ee=10*Y/T,te=ee*ee,ae=1,j=0,G=g.length;G>1&&(ae=o(g));for(var K=0;Kj&&(j=pe),re.push(pe),F.push({points:Z,velocities:X,divergences:re});for(var ge=0;gete&&a.scale(Te,Te,ee/Math.sqrt(Se)),a.add(Te,Te,H),$=D(Te),a.squaredDistance(Q,Te)-te>-1e-4*te){Z.push(Te),Q=Te,X.push($);var ue=C(Te,$),pe=a.length(ue);isFinite(pe)&&pe>j&&(j=pe),re.push(pe)}H=Te}}var Ce=s(F,A.colormap,j,ae);return h?Ce.tubeScale=h:(j===0&&(j=1),Ce.tubeScale=m*.5*ae/j),Ce};var b=t(6740),M=t(6405).createMesh;l.exports.createTubeMesh=function(A,E){return M(A,E,{shaders:b,traceType:"streamtube"})}},990:function(l,e,t){var a=t(9405),r=t(3236),n=r([`precision highp float; +}`]);e.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(l,e,t){"use strict";var a=t(2931),r=t(9970),n=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(M,C,_,T){for(var f=M.points,u=M.velocities,A=M.divergences,b=[],z=[],I=[],N=[],R=[],B=[],F=0,P=0,j=r.create(),U=r.create(),Z=8,Q=0;Q0)for(var H=0;HC)return T-1}return T},m=function(M,C,_){return M_?_:M},h=function(M,C,_){var T=C.vectors,f=C.meshgrid,u=M[0],A=M[1],b=M[2],z=f[0].length,I=f[1].length,N=f[2].length,R=c(f[0],u),B=c(f[1],A),F=c(f[2],b),P=R+1,j=B+1,U=F+1;if(R=m(R,0,z-1),P=m(P,0,z-1),B=m(B,0,I-1),j=m(j,0,I-1),F=m(F,0,N-1),U=m(U,0,N-1),R<0||B<0||F<0||P>z-1||j>I-1||U>N-1)return a.create();var Z=f[0][R],Q=f[0][P],re=f[1][B],ae=f[1][j],oe=f[2][F],H=f[2][U],X=(u-Z)/(Q-Z),K=(A-re)/(ae-re),G=(b-oe)/(H-oe);isFinite(X)||(X=.5),isFinite(K)||(K=.5),isFinite(G)||(G=.5);var Y,q,$,ee,ne,fe;switch(_.reversedX&&(R=z-1-R,P=z-1-P),_.reversedY&&(B=I-1-B,j=I-1-j),_.reversedZ&&(F=N-1-F,U=N-1-U),_.filled){case 5:ne=F,fe=U,$=B*N,ee=j*N,Y=R*N*I,q=P*N*I;break;case 4:ne=F,fe=U,Y=R*N,q=P*N,$=B*N*z,ee=j*N*z;break;case 3:$=B,ee=j,ne=F*I,fe=U*I,Y=R*I*N,q=P*I*N;break;case 2:$=B,ee=j,Y=R*I,q=P*I,ne=F*I*z,fe=U*I*z;break;case 1:Y=R,q=P,ne=F*z,fe=U*z,$=B*z*N,ee=j*z*N;break;default:Y=R,q=P,$=B*z,ee=j*z,ne=F*z*I,fe=U*z*I;break}var ye=T[Y+$+ne],xe=T[Y+$+fe],Ae=T[Y+ee+ne],Me=T[Y+ee+fe],Ie=T[q+$+ne],Ue=T[q+$+fe],qe=T[q+ee+ne],ke=T[q+ee+fe],ge=a.create(),ue=a.create(),ve=a.create(),se=a.create();a.lerp(ge,ye,Ie,X),a.lerp(ue,xe,Ue,X),a.lerp(ve,Ae,qe,X),a.lerp(se,Me,ke,X);var Te=a.create(),Fe=a.create();a.lerp(Te,ge,ve,K),a.lerp(Fe,ue,se,K);var We=a.create();return a.lerp(We,Te,Fe,G),We},p=function(M,C){var _=C[0],T=C[1],f=C[2];return M[0]=_<0?-_:_,M[1]=T<0?-T:T,M[2]=f<0?-f:f,M},g=function(M){var C=1/0;M.sort(function(u,A){return u-A});for(var _=M.length,T=1;T<_;T++){var f=Math.abs(M[T]-M[T-1]);fP||kej||geU)},Q=a.distance(C[0],C[1]),re=10*Q/T,ae=re*re,oe=1,H=0,X=_.length;X>1&&(oe=i(_));for(var K=0;KH&&(H=ye),ne.push(ye),N.push({points:Y,velocities:q,divergences:ne});for(var xe=0;xeae&&a.scale(Ae,Ae,re/Math.sqrt(Me)),a.add(Ae,Ae,G),$=z(Ae),a.squaredDistance(ee,Ae)-ae>-1e-4*ae){Y.push(Ae),ee=Ae,q.push($);var fe=I(Ae,$),ye=a.length(fe);isFinite(ye)&&ye>H&&(H=ye),ne.push(ye)}G=Ae}}var Ie=s(N,M.colormap,H,oe);return u?Ie.tubeScale=u:(H===0&&(H=1),Ie.tubeScale=f*.5*oe/H),Ie};var w=t(6740),S=t(6405).createMesh;l.exports.createTubeMesh=function(M,C){return S(M,C,{shaders:w,traceType:"streamtube"})}},990:function(l,e,t){var a=t(9405),r=t(3236),n=r([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1819,7 +1822,7 @@ void main() { eyeDirection = eyePosition - cameraCoordinate.xyz; surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); } -`]),i=r([`precision highp float; +`]),o=r([`precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { @@ -1985,15 +1988,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);e.createShader=function(p){var f=a(p,n,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},e.createPickShader=function(p){var f=a(p,n,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},e.createContourShader=function(p){var f=a(p,s,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f},e.createPickContourShader=function(p){var f=a(p,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f}},9499:function(l,e,t){"use strict";l.exports=Z;var a=t(8828),r=t(2762),n=t(8116),i=t(7766),s=t(1888),c=t(6729),p=t(5298),f=t(9994),d=t(9618),y=t(3711),o=t(6760),b=t(7608),M=t(2478),A=t(6199),E=t(990),g=E.createShader,T=E.createContourShader,m=E.createPickShader,h=E.createPickContourShader,x=4*10,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],D=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],C=[[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(){for(var X=0;X<3;++X){var $=C[X],Q=(X+1)%3,re=(X+2)%3;$[Q+0]=1,$[re+3]=1,$[X+6]=1}})();function F(X,$,Q,re,ue){this.position=X,this.index=$,this.uv=Q,this.level=re,this.dataCoordinate=ue}var I=256;function z(X,$,Q,re,ue,pe,ge,Te,Se,Ce,Ue,Oe,_e,ce,ie){this.gl=X,this.shape=$,this.bounds=Q,this.objectOffset=ie,this.intensityBounds=[],this._shader=re,this._pickShader=ue,this._coordinateBuffer=pe,this._vao=ge,this._colorMap=Te,this._contourShader=Se,this._contourPickShader=Ce,this._contourBuffer=Ue,this._contourVAO=Oe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new F([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=_e,this._dynamicVAO=ce,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=[d(s.mallocFloat(1024),[0,0]),d(s.mallocFloat(1024),[0,0]),d(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 R=z.prototype;R.genColormap=function(X,$){var Q=!1,re=f([c({colormap:X,nshades:I,format:"rgba"}).map(function(ue,pe){var ge=$?k(pe/255,$):ue[3];return ge<1&&(Q=!0),[ue[0],ue[1],ue[2],255*ge]})]);return p.divseq(re,255),this.hasAlphaScale=Q,re},R.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},R.isOpaque=function(){return!this.isTransparent()},R.pickSlots=1,R.setPickBase=function(X){this.pickId=X};function k(X,$){if(!$||!$.length)return 1;for(var Q=0;Q<$.length;++Q){if($.length<2)return 1;if($[Q][0]===X)return $[Q][1];if($[Q][0]>X&&Q>0){var re=($[Q][0]-X)/($[Q][0]-$[Q-1][0]);return $[Q][1]*(1-re)+re*$[Q-1][1]}}return 1}var B=[0,0,0],N={showSurface:!1,showContour:!1,projections:[_.slice(),_.slice(),_.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function q(X,$){var Q,re,ue,pe=$.axes&&$.axes.lastCubeProps.axis||B,ge=$.showSurface,Te=$.showContour;for(Q=0;Q<3;++Q)for(ge=ge||$.surfaceProject[Q],re=0;re<3;++re)Te=Te||$.contourProject[Q][re];for(Q=0;Q<3;++Q){var Se=N.projections[Q];for(re=0;re<16;++re)Se[re]=0;for(re=0;re<4;++re)Se[5*re]=1;Se[5*Q]=0,Se[12+Q]=$.axesBounds[+(pe[Q]>0)][Q],o(Se,X.model,Se);var Ce=N.clipBounds[Q];for(ue=0;ue<2;++ue)for(re=0;re<3;++re)Ce[ue][re]=X.clipBounds[ue][re];Ce[0][Q]=-1e8,Ce[1][Q]=1e8}return N.showSurface=ge,N.showContour=Te,N}var Y={model:_,view:_,projection:_,inverseModel:_.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},ee=_.slice(),te=[1,0,0,0,1,0,0,0,1];function ae(X,$){X=X||{};var Q=this.gl;Q.disable(Q.CULL_FACE),this._colorMap.bind(0);var re=Y;re.model=X.model||_,re.view=X.view||_,re.projection=X.projection||_,re.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],re.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],re.objectOffset=this.objectOffset,re.contourColor=this.contourColor[0],re.inverseModel=b(re.inverseModel,re.model);for(var ue=0;ue<2;++ue)for(var pe=re.clipBounds[ue],ge=0;ge<3;++ge)pe[ge]=Math.min(Math.max(this.clipBounds[ue][ge],-1e8),1e8);re.kambient=this.ambientLight,re.kdiffuse=this.diffuseLight,re.kspecular=this.specularLight,re.roughness=this.roughness,re.fresnel=this.fresnel,re.opacity=this.opacity,re.height=0,re.permutation=te,re.vertexColor=this.vertexColor;var Te=ee;for(o(Te,re.view,re.model),o(Te,re.projection,Te),b(Te,Te),ue=0;ue<3;++ue)re.eyePosition[ue]=Te[12+ue]/Te[15];var Se=Te[15];for(ue=0;ue<3;++ue)Se+=this.lightPosition[ue]*Te[4*ue+3];for(ue=0;ue<3;++ue){var Ce=Te[12+ue];for(ge=0;ge<3;++ge)Ce+=Te[4*ge+ue]*this.lightPosition[ge];re.lightPosition[ue]=Ce/Se}var Ue=q(re,this);if(Ue.showSurface){for(this._shader.bind(),this._shader.uniforms=re,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Q.TRIANGLES,this._vertexCount),ue=0;ue<3;++ue)!this.surfaceProject[ue]||!this.vertexCount||(this._shader.uniforms.model=Ue.projections[ue],this._shader.uniforms.clipBounds=Ue.clipBounds[ue],this._vao.draw(Q.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ue.showContour){var Oe=this._contourShader;re.kambient=1,re.kdiffuse=0,re.kspecular=0,re.opacity=1,Oe.bind(),Oe.uniforms=re;var _e=this._contourVAO;for(_e.bind(),ue=0;ue<3;++ue)for(Oe.uniforms.permutation=C[ue],Q.lineWidth(this.contourWidth[ue]*this.pixelRatio),ge=0;ge>4)/16)/255,ue=Math.floor(re),pe=re-ue,ge=$[1]*(X.value[1]+(X.value[2]&15)/16)/255,Te=Math.floor(ge),Se=ge-Te;ue+=1,Te+=1;var Ce=Q.position;Ce[0]=Ce[1]=Ce[2]=0;for(var Ue=0;Ue<2;++Ue)for(var Oe=Ue?pe:1-pe,_e=0;_e<2;++_e)for(var ce=_e?Se:1-Se,ie=ue+Ue,se=Te+_e,ne=Oe*ce,be=0;be<3;++be)Ce[be]+=this._field[be].get(ie,se)*ne;for(var De=this._pickResult.level,qe=0;qe<3;++qe)if(De[qe]=M.le(this.contourLevels[qe],Ce[qe]),De[qe]<0)this.contourLevels[qe].length>0&&(De[qe]=0);else if(De[qe]Math.abs(ut-Ce[qe])&&(De[qe]+=1)}for(Q.index[0]=pe<.5?ue:ue+1,Q.index[1]=Se<.5?Te:Te+1,Q.uv[0]=re/$[0],Q.uv[1]=ge/$[1],be=0;be<3;++be)Q.dataCoordinate[be]=this._field[be].get(Q.index[0],Q.index[1]);return Q},R.padField=function(X,$){var Q=$.shape.slice(),re=X.shape.slice();p.assign(X.lo(1,1).hi(Q[0],Q[1]),$),p.assign(X.lo(1).hi(Q[0],1),$.hi(Q[0],1)),p.assign(X.lo(1,re[1]-1).hi(Q[0],1),$.lo(0,Q[1]-1).hi(Q[0],1)),p.assign(X.lo(0,1).hi(1,Q[1]),$.hi(1)),p.assign(X.lo(re[0]-1,1).hi(1,Q[1]),$.lo(Q[0]-1)),X.set(0,0,$.get(0,0)),X.set(0,re[1]-1,$.get(0,Q[1]-1)),X.set(re[0]-1,0,$.get(Q[0]-1,0)),X.set(re[0]-1,re[1]-1,$.get(Q[0]-1,Q[1]-1))};function G(X,$){return Array.isArray(X)?[$(X[0]),$(X[1]),$(X[2])]:[$(X),$(X),$(X)]}function K(X){return Array.isArray(X)?X.length===3?[X[0],X[1],X[2],1]:[X[0],X[1],X[2],X[3]]:[0,0,0,1]}function H(X){if(Array.isArray(X)){if(Array.isArray(X))return[K(X[0]),K(X[1]),K(X[2])];var $=K(X);return[$.slice(),$.slice(),$.slice()]}}R.update=function(X){X=X||{},this.objectOffset=X.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in X&&(this.contourWidth=G(X.contourWidth,Number)),"showContour"in X&&(this.showContour=G(X.showContour,Boolean)),"showSurface"in X&&(this.showSurface=!!X.showSurface),"contourTint"in X&&(this.contourTint=G(X.contourTint,Boolean)),"contourColor"in X&&(this.contourColor=H(X.contourColor)),"contourProject"in X&&(this.contourProject=G(X.contourProject,function(_n){return G(_n,Boolean)})),"surfaceProject"in X&&(this.surfaceProject=X.surfaceProject),"dynamicColor"in X&&(this.dynamicColor=H(X.dynamicColor)),"dynamicTint"in X&&(this.dynamicTint=G(X.dynamicTint,Number)),"dynamicWidth"in X&&(this.dynamicWidth=G(X.dynamicWidth,Number)),"opacity"in X&&(this.opacity=X.opacity),"opacityscale"in X&&(this.opacityscale=X.opacityscale),"colorBounds"in X&&(this.colorBounds=X.colorBounds),"vertexColor"in X&&(this.vertexColor=X.vertexColor?1:0),"colormap"in X&&this._colorMap.setPixels(this.genColormap(X.colormap,this.opacityscale));var $=X.field||X.coords&&X.coords[2]||null,Q=!1;if($||(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 X||"coords"in X){var re=($.shape[0]+2)*($.shape[1]+2);re>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(a.nextPow2(re))),this._field[2]=d(this._field[2].data,[$.shape[0]+2,$.shape[1]+2]),this.padField(this._field[2],$),this.shape=$.shape.slice();for(var ue=this.shape,pe=0;pe<2;++pe)this._field[2].size>this._field[pe].data.length&&(s.freeFloat(this._field[pe].data),this._field[pe].data=s.mallocFloat(this._field[2].size)),this._field[pe]=d(this._field[pe].data,[ue[0]+2,ue[1]+2]);if(X.coords){var ge=X.coords;if(!Array.isArray(ge)||ge.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(pe=0;pe<2;++pe){var Te=ge[pe];for(_e=0;_e<2;++_e)if(Te.shape[_e]!==ue[_e])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[pe],Te)}}else if(X.ticks){var Se=X.ticks;if(!Array.isArray(Se)||Se.length!==2)throw new Error("gl-surface: invalid ticks");for(pe=0;pe<2;++pe){var Ce=Se[pe];if((Array.isArray(Ce)||Ce.length)&&(Ce=d(Ce)),Ce.shape[0]!==ue[pe])throw new Error("gl-surface: invalid tick length");var Ue=d(Ce.data,ue);Ue.stride[pe]=Ce.stride[0],Ue.stride[pe^1]=0,this.padField(this._field[pe],Ue)}}else{for(pe=0;pe<2;++pe){var Oe=[0,0];Oe[pe]=1,this._field[pe]=d(this._field[pe].data,[ue[0]+2,ue[1]+2],Oe,0)}this._field[0].set(0,0,0);for(var _e=0;_e0){for(var Jn=0;Jn<5;++Jn)Bt.pop();he-=1}continue e}}}ca.push(he)}this._contourOffsets[Et]=$r,this._contourCounts[Et]=ca}var Ti=s.mallocFloat(Bt.length);for(pe=0;peF||D<0||D>F)throw new Error("gl-texture2d: Invalid texture size");return x._shape=[_,D],x.bind(),C.texImage2D(C.TEXTURE_2D,0,x.format,_,D,0,x.format,x.type,null),x._mipLevels=[0],x}function o(x,_,D,C,F,I){this.gl=x,this.handle=_,this.format=F,this.type=I,this._shape=[D,C],this._mipLevels=[0],this._magFilter=x.NEAREST,this._minFilter=x.NEAREST,this._wrapS=x.CLAMP_TO_EDGE,this._wrapT=x.CLAMP_TO_EDGE,this._anisoSamples=1;var z=this,R=[this._wrapS,this._wrapT];Object.defineProperties(R,[{get:function(){return z._wrapS},set:function(B){return z.wrapS=B}},{get:function(){return z._wrapT},set:function(B){return z.wrapT=B}}]),this._wrapVector=R;var k=[this._shape[0],this._shape[1]];Object.defineProperties(k,[{get:function(){return z._shape[0]},set:function(B){return z.width=B}},{get:function(){return z._shape[1]},set:function(B){return z.height=B}}]),this._shapeVector=k}var b=o.prototype;Object.defineProperties(b,{minFilter:{get:function(){return this._minFilter},set:function(x){this.bind();var _=this.gl;if(this.type===_.FLOAT&&i.indexOf(x)>=0&&(_.getExtension("OES_texture_float_linear")||(x=_.NEAREST)),s.indexOf(x)<0)throw new Error("gl-texture2d: Unknown filter mode "+x);return _.texParameteri(_.TEXTURE_2D,_.TEXTURE_MIN_FILTER,x),this._minFilter=x}},magFilter:{get:function(){return this._magFilter},set:function(x){this.bind();var _=this.gl;if(this.type===_.FLOAT&&i.indexOf(x)>=0&&(_.getExtension("OES_texture_float_linear")||(x=_.NEAREST)),s.indexOf(x)<0)throw new Error("gl-texture2d: Unknown filter mode "+x);return _.texParameteri(_.TEXTURE_2D,_.TEXTURE_MAG_FILTER,x),this._magFilter=x}},mipSamples:{get:function(){return this._anisoSamples},set:function(x){var _=this._anisoSamples;if(this._anisoSamples=Math.max(x,1)|0,_!==this._anisoSamples){var D=this.gl.getExtension("EXT_texture_filter_anisotropic");D&&this.gl.texParameterf(this.gl.TEXTURE_2D,D.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(x){if(this.bind(),c.indexOf(x)<0)throw new Error("gl-texture2d: Unknown wrap mode "+x);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,x),this._wrapS=x}},wrapT:{get:function(){return this._wrapT},set:function(x){if(this.bind(),c.indexOf(x)<0)throw new Error("gl-texture2d: Unknown wrap mode "+x);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,x),this._wrapT=x}},wrap:{get:function(){return this._wrapVector},set:function(x){if(Array.isArray(x)||(x=[x,x]),x.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var _=0;_<2;++_)if(c.indexOf(x[_])<0)throw new Error("gl-texture2d: Unknown wrap mode "+x);this._wrapS=x[0],this._wrapT=x[1];var D=this.gl;return this.bind(),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_WRAP_S,this._wrapS),D.texParameteri(D.TEXTURE_2D,D.TEXTURE_WRAP_T,this._wrapT),x}},shape:{get:function(){return this._shapeVector},set:function(x){if(!Array.isArray(x))x=[x|0,x|0];else if(x.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return y(this,x[0]|0,x[1]|0),[x[0]|0,x[1]|0]}},width:{get:function(){return this._shape[0]},set:function(x){return x=x|0,y(this,x,this._shape[1]),x}},height:{get:function(){return this._shape[1]},set:function(x){return x=x|0,y(this,this._shape[0],x),x}}}),b.bind=function(x){var _=this.gl;return x!==void 0&&_.activeTexture(_.TEXTURE0+(x|0)),_.bindTexture(_.TEXTURE_2D,this.handle),x!==void 0?x|0:_.getParameter(_.ACTIVE_TEXTURE)-_.TEXTURE0},b.dispose=function(){this.gl.deleteTexture(this.handle)},b.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var x=Math.min(this._shape[0],this._shape[1]),_=0;x>0;++_,x>>>=1)this._mipLevels.indexOf(_)<0&&this._mipLevels.push(_)},b.setPixels=function(x,_,D,C){var F=this.gl;this.bind(),Array.isArray(_)?(C=D,D=_[1]|0,_=_[0]|0):(_=_||0,D=D||0),C=C||0;var I=f(x)?x:x.raw;if(I){var z=this._mipLevels.indexOf(C)<0;z?(F.texImage2D(F.TEXTURE_2D,0,this.format,this.format,this.type,I),this._mipLevels.push(C)):F.texSubImage2D(F.TEXTURE_2D,C,_,D,this.format,this.type,I)}else if(x.shape&&x.stride&&x.data){if(x.shape.length<2||_+x.shape[1]>this._shape[1]>>>C||D+x.shape[0]>this._shape[0]>>>C||_<0||D<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");A(F,_,D,C,this.format,this.type,this._mipLevels,x)}else throw new Error("gl-texture2d: Unsupported data type")};function M(x,_){return x.length===3?_[2]===1&&_[1]===x[0]*x[2]&&_[0]===x[2]:_[0]===1&&_[1]===x[0]}function A(x,_,D,C,F,I,z,R){var k=R.dtype,B=R.shape.slice();if(B.length<2||B.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var N=0,q=0,Y=M(B,R.stride.slice());k==="float32"?N=x.FLOAT:k==="float64"?(N=x.FLOAT,Y=!1,k="float32"):k==="uint8"?N=x.UNSIGNED_BYTE:(N=x.UNSIGNED_BYTE,Y=!1,k="uint8");var ee=1;if(B.length===2)q=x.LUMINANCE,B=[B[0],B[1],1],R=a(R.data,B,[R.stride[0],R.stride[1],1],R.offset);else if(B.length===3){if(B[2]===1)q=x.ALPHA;else if(B[2]===2)q=x.LUMINANCE_ALPHA;else if(B[2]===3)q=x.RGB;else if(B[2]===4)q=x.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ee=B[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((q===x.LUMINANCE||q===x.ALPHA)&&(F===x.LUMINANCE||F===x.ALPHA)&&(q=F),q!==F)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var te=R.size,ae=z.indexOf(C)<0;if(ae&&z.push(C),N===I&&Y)R.offset===0&&R.data.length===te?ae?x.texImage2D(x.TEXTURE_2D,C,F,B[0],B[1],0,F,I,R.data):x.texSubImage2D(x.TEXTURE_2D,C,_,D,B[0],B[1],F,I,R.data):ae?x.texImage2D(x.TEXTURE_2D,C,F,B[0],B[1],0,F,I,R.data.subarray(R.offset,R.offset+te)):x.texSubImage2D(x.TEXTURE_2D,C,_,D,B[0],B[1],F,I,R.data.subarray(R.offset,R.offset+te));else{var j;I===x.FLOAT?j=n.mallocFloat32(te):j=n.mallocUint8(te);var G=a(j,B,[B[2],B[2]*B[0],1]);N===x.FLOAT&&I===x.UNSIGNED_BYTE?d(G,R):r.assign(G,R),ae?x.texImage2D(x.TEXTURE_2D,C,F,B[0],B[1],0,F,I,j.subarray(0,te)):x.texSubImage2D(x.TEXTURE_2D,C,_,D,B[0],B[1],F,I,j.subarray(0,te)),I===x.FLOAT?n.freeFloat32(j):n.freeUint8(j)}}function E(x){var _=x.createTexture();return x.bindTexture(x.TEXTURE_2D,_),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,x.NEAREST),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,x.NEAREST),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_S,x.CLAMP_TO_EDGE),x.texParameteri(x.TEXTURE_2D,x.TEXTURE_WRAP_T,x.CLAMP_TO_EDGE),_}function g(x,_,D,C,F){var I=x.getParameter(x.MAX_TEXTURE_SIZE);if(_<0||_>I||D<0||D>I)throw new Error("gl-texture2d: Invalid texture shape");if(F===x.FLOAT&&!x.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var z=E(x);return x.texImage2D(x.TEXTURE_2D,0,C,_,D,0,C,F,null),new o(x,z,_,D,C,F)}function T(x,_,D,C,F,I){var z=E(x);return x.texImage2D(x.TEXTURE_2D,0,F,F,I,_),new o(x,z,D,C,F,I)}function m(x,_){var D=_.dtype,C=_.shape.slice(),F=x.getParameter(x.MAX_TEXTURE_SIZE);if(C[0]<0||C[0]>F||C[1]<0||C[1]>F)throw new Error("gl-texture2d: Invalid texture size");var I=M(C,_.stride.slice()),z=0;D==="float32"?z=x.FLOAT:D==="float64"?(z=x.FLOAT,I=!1,D="float32"):D==="uint8"?z=x.UNSIGNED_BYTE:(z=x.UNSIGNED_BYTE,I=!1,D="uint8");var R=0;if(C.length===2)R=x.LUMINANCE,C=[C[0],C[1],1],_=a(_.data,C,[_.stride[0],_.stride[1],1],_.offset);else if(C.length===3)if(C[2]===1)R=x.ALPHA;else if(C[2]===2)R=x.LUMINANCE_ALPHA;else if(C[2]===3)R=x.RGB;else if(C[2]===4)R=x.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");z===x.FLOAT&&!x.getExtension("OES_texture_float")&&(z=x.UNSIGNED_BYTE,I=!1);var k,B,N=_.size;if(I)_.offset===0&&_.data.length===N?k=_.data:k=_.data.subarray(_.offset,_.offset+N);else{var q=[C[2],C[2]*C[0],1];B=n.malloc(N,D);var Y=a(B,C,q,0);(D==="float32"||D==="float64")&&z===x.UNSIGNED_BYTE?d(Y,_):r.assign(Y,_),k=B.subarray(0,N)}var ee=E(x);return x.texImage2D(x.TEXTURE_2D,0,R,C[0],C[1],0,R,z,k),I||n.free(B),new o(x,ee,C[0],C[1],R,z)}function h(x){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||p(x),typeof arguments[1]=="number")return g(x,arguments[1],arguments[2],arguments[3]||x.RGBA,arguments[4]||x.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return g(x,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||x.RGBA,arguments[3]||x.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var _=arguments[1],D=f(_)?_:_.raw;if(D)return T(x,D,_.width|0,_.height|0,arguments[2]||x.RGBA,arguments[3]||x.UNSIGNED_BYTE);if(_.shape&&_.data&&_.stride)return m(x,_)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(l){"use strict";function e(t,a,r){a?a.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(d)}},9226:function(l){l.exports=e;function e(t,a){return t[0]=Math.ceil(a[0]),t[1]=Math.ceil(a[1]),t[2]=Math.ceil(a[2]),t}},3126:function(l){l.exports=e;function e(t){var a=new Float32Array(3);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a}},3990:function(l){l.exports=e;function e(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t}},1091:function(l){l.exports=e;function e(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2],c=r[0],p=r[1],f=r[2];return t[0]=i*f-s*p,t[1]=s*c-n*f,t[2]=n*p-i*c,t}},5455:function(l,e,t){l.exports=t(7056)},7056:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],i=a[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(l,e,t){l.exports=t(6690)},6690:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]/r[0],t[1]=a[1]/r[1],t[2]=a[2]/r[2],t}},244:function(l){l.exports=e;function e(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]}},2613:function(l){l.exports=1e-6},9922:function(l,e,t){l.exports=r;var a=t(2613);function r(n,i){var s=n[0],c=n[1],p=n[2],f=i[0],d=i[1],y=i[2];return Math.abs(s-f)<=a*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(c-d)<=a*Math.max(1,Math.abs(c),Math.abs(d))&&Math.abs(p-y)<=a*Math.max(1,Math.abs(p),Math.abs(y))}},9265:function(l){l.exports=e;function e(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]}},2681:function(l){l.exports=e;function e(t,a){return t[0]=Math.floor(a[0]),t[1]=Math.floor(a[1]),t[2]=Math.floor(a[2]),t}},5137:function(l,e,t){l.exports=r;var a=t(1091)();function r(n,i,s,c,p,f){var d,y;for(i||(i=3),s||(s=0),c?y=Math.min(c*i+s,n.length):y=n.length,d=s;d0&&(s=1/Math.sqrt(s),t[0]=a[0]*s,t[1]=a[1]*s,t[2]=a[2]*s),t}},7636:function(l){l.exports=e;function e(t,a){a=a||1;var r=Math.random()*2*Math.PI,n=Math.random()*2-1,i=Math.sqrt(1-n*n)*a;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*a,t}},6894:function(l){l.exports=e;function e(t,a,r,n){var i=r[1],s=r[2],c=a[1]-i,p=a[2]-s,f=Math.sin(n),d=Math.cos(n);return t[0]=a[0],t[1]=i+c*d-p*f,t[2]=s+c*f+p*d,t}},109:function(l){l.exports=e;function e(t,a,r,n){var i=r[0],s=r[2],c=a[0]-i,p=a[2]-s,f=Math.sin(n),d=Math.cos(n);return t[0]=i+p*f+c*d,t[1]=a[1],t[2]=s+p*d-c*f,t}},8692:function(l){l.exports=e;function e(t,a,r,n){var i=r[0],s=r[1],c=a[0]-i,p=a[1]-s,f=Math.sin(n),d=Math.cos(n);return t[0]=i+c*d-p*f,t[1]=s+c*f+p*d,t[2]=a[2],t}},2447:function(l){l.exports=e;function e(t,a){return t[0]=Math.round(a[0]),t[1]=Math.round(a[1]),t[2]=Math.round(a[2]),t}},6621:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t}},8489:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a[0]+r[0]*n,t[1]=a[1]+r[1]*n,t[2]=a[2]+r[2]*n,t}},1463:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a,t[1]=r,t[2]=n,t}},6141:function(l,e,t){l.exports=t(2953)},5486:function(l,e,t){l.exports=t(3066)},2953:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],i=a[2]-t[2];return r*r+n*n+i*i}},3066:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2];return a*a+r*r+n*n}},2229:function(l,e,t){l.exports=t(6843)},6843:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]-r[0],t[1]=a[1]-r[1],t[2]=a[2]-r[2],t}},492:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2];return t[0]=n*r[0]+i*r[3]+s*r[6],t[1]=n*r[1]+i*r[4]+s*r[7],t[2]=n*r[2]+i*r[5]+s*r[8],t}},5673:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2],c=r[3]*n+r[7]*i+r[11]*s+r[15];return c=c||1,t[0]=(r[0]*n+r[4]*i+r[8]*s+r[12])/c,t[1]=(r[1]*n+r[5]*i+r[9]*s+r[13])/c,t[2]=(r[2]*n+r[6]*i+r[10]*s+r[14])/c,t}},264:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2],c=r[0],p=r[1],f=r[2],d=r[3],y=d*n+p*s-f*i,o=d*i+f*n-c*s,b=d*s+c*i-p*n,M=-c*n-p*i-f*s;return t[0]=y*d+M*-c+o*-f-b*-p,t[1]=o*d+M*-p+b*-c-y*-f,t[2]=b*d+M*-f+y*-p-o*-c,t}},4361:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t[3]=a[3]+r[3],t}},2335:function(l){l.exports=e;function e(t){var a=new Float32Array(4);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3],a}},2933:function(l){l.exports=e;function e(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t}},7536:function(l){l.exports=e;function e(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],i=a[2]-t[2],s=a[3]-t[3];return Math.sqrt(r*r+n*n+i*i+s*s)}},1373:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]/r[0],t[1]=a[1]/r[1],t[2]=a[2]/r[2],t[3]=a[3]/r[3],t}},3750:function(l){l.exports=e;function e(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]+t[3]*a[3]}},3390:function(l){l.exports=e;function e(t,a,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=a,i[2]=r,i[3]=n,i}},9970:function(l,e,t){l.exports={create:t(7536),clone:t(2335),fromValues:t(3390),copy:t(2933),set:t(4578),add:t(4361),subtract:t(6860),multiply:t(3576),divide:t(1373),min:t(2334),max:t(160),scale:t(9288),scaleAndAdd:t(4844),distance:t(4691),squaredDistance:t(7960),length:t(6808),squaredLength:t(483),negate:t(1498),inverse:t(4494),normalize:t(5177),dot:t(3750),lerp:t(2573),random:t(9131),transformMat4:t(5352),transformQuat:t(4041)}},4494:function(l){l.exports=e;function e(t,a){return t[0]=1/a[0],t[1]=1/a[1],t[2]=1/a[2],t[3]=1/a[3],t}},6808:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(a*a+r*r+n*n+i*i)}},2573:function(l){l.exports=e;function e(t,a,r,n){var i=a[0],s=a[1],c=a[2],p=a[3];return t[0]=i+n*(r[0]-i),t[1]=s+n*(r[1]-s),t[2]=c+n*(r[2]-c),t[3]=p+n*(r[3]-p),t}},160:function(l){l.exports=e;function e(t,a,r){return t[0]=Math.max(a[0],r[0]),t[1]=Math.max(a[1],r[1]),t[2]=Math.max(a[2],r[2]),t[3]=Math.max(a[3],r[3]),t}},2334:function(l){l.exports=e;function e(t,a,r){return t[0]=Math.min(a[0],r[0]),t[1]=Math.min(a[1],r[1]),t[2]=Math.min(a[2],r[2]),t[3]=Math.min(a[3],r[3]),t}},3576:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r[0],t[1]=a[1]*r[1],t[2]=a[2]*r[2],t[3]=a[3]*r[3],t}},1498:function(l){l.exports=e;function e(t,a){return t[0]=-a[0],t[1]=-a[1],t[2]=-a[2],t[3]=-a[3],t}},5177:function(l){l.exports=e;function e(t,a){var r=a[0],n=a[1],i=a[2],s=a[3],c=r*r+n*n+i*i+s*s;return c>0&&(c=1/Math.sqrt(c),t[0]=r*c,t[1]=n*c,t[2]=i*c,t[3]=s*c),t}},9131:function(l,e,t){var a=t(5177),r=t(9288);l.exports=n;function n(i,s){return s=s||1,i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),i[3]=Math.random(),a(i,i),r(i,i,s),i}},9288:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t[3]=a[3]*r,t}},4844:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a[0]+r[0]*n,t[1]=a[1]+r[1]*n,t[2]=a[2]+r[2]*n,t[3]=a[3]+r[3]*n,t}},4578:function(l){l.exports=e;function e(t,a,r,n,i){return t[0]=a,t[1]=r,t[2]=n,t[3]=i,t}},7960:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],i=a[2]-t[2],s=a[3]-t[3];return r*r+n*n+i*i+s*s}},483:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2],i=t[3];return a*a+r*r+n*n+i*i}},6860:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]-r[0],t[1]=a[1]-r[1],t[2]=a[2]-r[2],t[3]=a[3]-r[3],t}},5352:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2],c=a[3];return t[0]=r[0]*n+r[4]*i+r[8]*s+r[12]*c,t[1]=r[1]*n+r[5]*i+r[9]*s+r[13]*c,t[2]=r[2]*n+r[6]*i+r[10]*s+r[14]*c,t[3]=r[3]*n+r[7]*i+r[11]*s+r[15]*c,t}},4041:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2],c=r[0],p=r[1],f=r[2],d=r[3],y=d*n+p*s-f*i,o=d*i+f*n-c*s,b=d*s+c*i-p*n,M=-c*n-p*i-f*s;return t[0]=y*d+M*-c+o*-f-b*-p,t[1]=o*d+M*-p+b*-c-y*-f,t[2]=b*d+M*-f+y*-p-o*-c,t[3]=a[3],t}},1848:function(l,e,t){var a=t(4905),r=t(6468);l.exports=n;function n(i){for(var s=Array.isArray(i)?i:a(i),c=0;c0)continue;qe=ne.slice(0,1).join("")}return Q(qe),te+=qe.length,k=k.slice(qe.length),k.length}while(!0)}function _e(){return/[^a-fA-F0-9]/.test(z)?(Q(k.join("")),I=c,C):(k.push(z),R=z,C+1)}function ce(){return z==="."||/[eE]/.test(z)?(k.push(z),I=M,R=z,C+1):z==="x"&&k.length===1&&k[0]==="0"?(I=h,k.push(z),R=z,C+1):/[^\d]/.test(z)?(Q(k.join("")),I=c,C):(k.push(z),R=z,C+1)}function ie(){return z==="f"&&(k.push(z),R=z,C+=1),/[eE]/.test(z)||(z==="-"||z==="+")&&/[eE]/.test(R)?(k.push(z),R=z,C+1):/[^\d]/.test(z)?(Q(k.join("")),I=c,C):(k.push(z),R=z,C+1)}function se(){if(/[^\d\w_]/.test(z)){var ne=k.join("");return $[ne]?I=g:X[ne]?I=E:I=A,Q(k.join("")),I=c,C}return k.push(z),R=z,C+1}}},3508:function(l,e,t){var a=t(6852);a=a.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.exports=a.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"])},6852:function(l){l.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"]},7932:function(l,e,t){var a=t(620);l.exports=a.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","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"])},620:function(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","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"]},7827:function(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(l,e,t){var a=t(5874);l.exports=r;function r(n,i){var s=a(i),c=[];return c=c.concat(s(n)),c=c.concat(s(null)),c}},3236:function(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),a=[],r=0;r>1,y=-7,o=r?i-1:0,b=r?-1:1,M=t[a+o];for(o+=b,s=M&(1<<-y)-1,M>>=-y,y+=p;y>0;s=s*256+t[a+o],o+=b,y-=8);for(c=s&(1<<-y)-1,s>>=-y,y+=n;y>0;c=c*256+t[a+o],o+=b,y-=8);if(s===0)s=1-d;else{if(s===f)return c?NaN:(M?-1:1)*(1/0);c=c+Math.pow(2,n),s=s-d}return(M?-1:1)*c*Math.pow(2,s-n)},e.write=function(t,a,r,n,i,s){var c,p,f,d=s*8-i-1,y=(1<>1,b=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=n?0:s-1,A=n?1:-1,E=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(p=isNaN(a)?1:0,c=y):(c=Math.floor(Math.log(a)/Math.LN2),a*(f=Math.pow(2,-c))<1&&(c--,f*=2),c+o>=1?a+=b/f:a+=b*Math.pow(2,1-o),a*f>=2&&(c++,f/=2),c+o>=y?(p=0,c=y):c+o>=1?(p=(a*f-1)*Math.pow(2,i),c=c+o):(p=a*Math.pow(2,o-1)*Math.pow(2,i),c=0));i>=8;t[r+M]=p&255,M+=A,p/=256,i-=8);for(c=c<0;t[r+M]=c&255,M+=A,c/=256,d-=8);t[r+M-A]|=E*128}},8954:function(l,e,t){"use strict";l.exports=o;var a=t(3250),r=t(6803).Fw;function n(b,M,A){this.vertices=b,this.adjacent=M,this.boundary=A,this.lastVisited=-1}n.prototype.flip=function(){var b=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=b;var M=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=M};function i(b,M,A){this.vertices=b,this.cell=M,this.index=A}function s(b,M){return r(b.vertices,M.vertices)}function c(b){return function(){var M=this.tuple;return b.apply(this,M)}}function p(b){var M=a[b+1];return M||(M=a),c(M)}var f=[];function d(b,M,A){this.dimension=b,this.vertices=M,this.simplices=A,this.interior=A.filter(function(T){return!T.boundary}),this.tuple=new Array(b+1);for(var E=0;E<=b;++E)this.tuple[E]=this.vertices[E];var g=f[b];g||(g=f[b]=p(b)),this.orient=g}var y=d.prototype;y.handleBoundaryDegeneracy=function(b,M){var A=this.dimension,E=this.vertices.length-1,g=this.tuple,T=this.vertices,m=[b];for(b.lastVisited=-E;m.length>0;){b=m.pop();for(var h=b.adjacent,x=0;x<=A;++x){var _=h[x];if(!(!_.boundary||_.lastVisited<=-E)){for(var D=_.vertices,C=0;C<=A;++C){var F=D[C];F<0?g[C]=M:g[C]=T[F]}var I=this.orient();if(I>0)return _;_.lastVisited=-E,I===0&&m.push(_)}}}return null},y.walk=function(b,M){var A=this.vertices.length-1,E=this.dimension,g=this.vertices,T=this.tuple,m=M?this.interior.length*Math.random()|0:this.interior.length-1,h=this.interior[m];e:for(;!h.boundary;){for(var x=h.vertices,_=h.adjacent,D=0;D<=E;++D)T[D]=g[x[D]];h.lastVisited=A;for(var D=0;D<=E;++D){var C=_[D];if(!(C.lastVisited>=A)){var F=T[D];T[D]=b;var I=this.orient();if(T[D]=F,I<0){h=C;continue e}else C.boundary?C.lastVisited=-A:C.lastVisited=A}}return}return h},y.addPeaks=function(b,M){var A=this.vertices.length-1,E=this.dimension,g=this.vertices,T=this.tuple,m=this.interior,h=this.simplices,x=[M];M.lastVisited=A,M.vertices[M.vertices.indexOf(-1)]=A,M.boundary=!1,m.push(M);for(var _=[];x.length>0;){var M=x.pop(),D=M.vertices,C=M.adjacent,F=D.indexOf(A);if(!(F<0)){for(var I=0;I<=E;++I)if(I!==F){var z=C[I];if(!(!z.boundary||z.lastVisited>=A)){var R=z.vertices;if(z.lastVisited!==-A){for(var k=0,B=0;B<=E;++B)R[B]<0?(k=B,T[B]=b):T[B]=g[R[B]];var N=this.orient();if(N>0){R[k]=A,z.boundary=!1,m.push(z),x.push(z),z.lastVisited=A;continue}else z.lastVisited=-A}var q=z.adjacent,Y=D.slice(),ee=C.slice(),te=new n(Y,ee,!0);h.push(te);var ae=q.indexOf(M);if(!(ae<0)){q[ae]=te,ee[F]=z,Y[I]=-1,ee[I]=M,C[I]=te,te.flip();for(var B=0;B<=E;++B){var j=Y[B];if(!(j<0||j===A)){for(var G=new Array(E-1),K=0,H=0;H<=E;++H){var Z=Y[H];Z<0||H===B||(G[K++]=Z)}_.push(new i(G,te,B))}}}}}}}_.sort(s);for(var I=0;I+1<_.length;I+=2){var X=_[I],$=_[I+1],Q=X.index,re=$.index;Q<0||re<0||(X.cell.adjacent[X.index]=$.cell,$.cell.adjacent[$.index]=X.cell)}},y.insert=function(b,M){var A=this.vertices;A.push(b);var E=this.walk(b,M);if(E){for(var g=this.dimension,T=this.tuple,m=0;m<=g;++m){var h=E.vertices[m];h<0?T[m]=b:T[m]=A[h]}var x=this.orient(T);x<0||x===0&&(E=this.handleBoundaryDegeneracy(E,b),!E)||this.addPeaks(b,E)}},y.boundary=function(){for(var b=this.dimension,M=[],A=this.simplices,E=A.length,g=0;g=0?m[x++]=h[D]:_=D&1;if(_===(b&1)){var C=m[0];m[0]=m[1],m[1]=C}M.push(m)}}return M};function o(b,M){var A=b.length;if(A===0)throw new Error("Must have at least d+1 points");var E=b[0].length;if(A<=E)throw new Error("Must input at least d+1 points");var g=b.slice(0,E+1),T=a.apply(void 0,g);if(T===0)throw new Error("Input not in general position");for(var m=new Array(E+1),h=0;h<=E;++h)m[h]=h;T<0&&(m[0]=1,m[1]=0);for(var x=new n(m,new Array(E+1),!1),_=x.adjacent,D=new Array(E+2),h=0;h<=E;++h){for(var C=m.slice(),F=0;F<=E;++F)F===h&&(C[F]=-1);var I=C[0];C[0]=C[1],C[1]=I;var z=new n(C,new Array(E+1),!0);_[h]=z,D[h]=z}D[E+1]=x;for(var h=0;h<=E;++h)for(var C=_[h].vertices,R=_[h].adjacent,F=0;F<=E;++F){var k=C[F];if(k<0){R[F]=x;continue}for(var B=0;B<=E;++B)_[B].vertices.indexOf(k)<0&&(R[F]=_[B])}for(var N=new d(E,g,D),q=!!M,h=E+1;h3*(D+1)?d(this,_):this.left.insert(_):this.left=T([_]);else if(_[0]>this.mid)this.right?4*(this.right.count+1)>3*(D+1)?d(this,_):this.right.insert(_):this.right=T([_]);else{var C=a.ge(this.leftPoints,_,E),F=a.ge(this.rightPoints,_,g);this.leftPoints.splice(C,0,_),this.rightPoints.splice(F,0,_)}},c.remove=function(_){var D=this.count-this.leftPoints;if(_[1]3*(D-1))return y(this,_);var F=this.left.remove(_);return F===i?(this.left=null,this.count-=1,n):(F===n&&(this.count-=1),F)}else if(_[0]>this.mid){if(!this.right)return r;var I=this.left?this.left.count:0;if(4*I>3*(D-1))return y(this,_);var F=this.right.remove(_);return F===i?(this.right=null,this.count-=1,n):(F===n&&(this.count-=1),F)}else{if(this.count===1)return this.leftPoints[0]===_?i:r;if(this.leftPoints.length===1&&this.leftPoints[0]===_){if(this.left&&this.right){for(var z=this,R=this.left;R.right;)z=R,R=R.right;if(z===this)R.right=this.right;else{var k=this.left,F=this.right;z.count-=R.count,z.right=R.left,R.left=k,R.right=F}p(this,R),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?p(this,this.left):p(this,this.right);return n}for(var k=a.ge(this.leftPoints,_,E);k=0&&_[F][1]>=D;--F){var I=C(_[F]);if(I)return I}}function M(_,D){for(var C=0;C<_.length;++C){var F=D(_[C]);if(F)return F}}c.queryPoint=function(_,D){if(_this.mid){if(this.right){var C=this.right.queryPoint(_,D);if(C)return C}return b(this.rightPoints,_,D)}else return M(this.leftPoints,D)},c.queryInterval=function(_,D,C){if(_this.mid&&this.right){var F=this.right.queryInterval(_,D,C);if(F)return F}return Dthis.mid?b(this.rightPoints,_,C):M(this.leftPoints,C)};function A(_,D){return _-D}function E(_,D){var C=_[0]-D[0];return C||_[1]-D[1]}function g(_,D){var C=_[1]-D[1];return C||_[0]-D[0]}function T(_){if(_.length===0)return null;for(var D=[],C=0;C<_.length;++C)D.push(_[C][0],_[C][1]);D.sort(A);for(var F=D[D.length>>1],I=[],z=[],R=[],C=0;C<_.length;++C){var k=_[C];k[1]13)&&a!==32&&a!==133&&a!==160&&a!==5760&&a!==6158&&(a<8192||a>8205)&&a!==8232&&a!==8233&&a!==8239&&a!==8287&&a!==8288&&a!==12288&&a!==65279)return!1;return!0}},395:function(l){function e(t,a,r){return t*(1-r)+a*r}l.exports=e},2652:function(l,e,t){var a=t(4335),r=t(6864),n=t(1903),i=t(9921),s=t(7608),c=t(5665),p={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},f=r(),d=r(),y=[0,0,0,0],o=[[0,0,0],[0,0,0],[0,0,0]],b=[0,0,0];l.exports=function(T,m,h,x,_,D){if(m||(m=[0,0,0]),h||(h=[0,0,0]),x||(x=[0,0,0]),_||(_=[0,0,0,1]),D||(D=[0,0,0,1]),!a(f,T)||(n(d,f),d[3]=0,d[7]=0,d[11]=0,d[15]=1,Math.abs(i(d)<1e-8)))return!1;var C=f[3],F=f[7],I=f[11],z=f[12],R=f[13],k=f[14],B=f[15];if(C!==0||F!==0||I!==0){y[0]=C,y[1]=F,y[2]=I,y[3]=B;var N=s(d,d);if(!N)return!1;c(d,d),M(_,y,d)}else _[0]=_[1]=_[2]=0,_[3]=1;if(m[0]=z,m[1]=R,m[2]=k,A(o,f),h[0]=p.length(o[0]),p.normalize(o[0],o[0]),x[0]=p.dot(o[0],o[1]),E(o[1],o[1],o[0],1,-x[0]),h[1]=p.length(o[1]),p.normalize(o[1],o[1]),x[0]/=h[1],x[1]=p.dot(o[0],o[2]),E(o[2],o[2],o[0],1,-x[1]),x[2]=p.dot(o[1],o[2]),E(o[2],o[2],o[1],1,-x[2]),h[2]=p.length(o[2]),p.normalize(o[2],o[2]),x[1]/=h[2],x[2]/=h[2],p.cross(b,o[1],o[2]),p.dot(o[0],b)<0)for(var q=0;q<3;q++)h[q]*=-1,o[q][0]*=-1,o[q][1]*=-1,o[q][2]*=-1;return D[0]=.5*Math.sqrt(Math.max(1+o[0][0]-o[1][1]-o[2][2],0)),D[1]=.5*Math.sqrt(Math.max(1-o[0][0]+o[1][1]-o[2][2],0)),D[2]=.5*Math.sqrt(Math.max(1-o[0][0]-o[1][1]+o[2][2],0)),D[3]=.5*Math.sqrt(Math.max(1+o[0][0]+o[1][1]+o[2][2],0)),o[2][1]>o[1][2]&&(D[0]=-D[0]),o[0][2]>o[2][0]&&(D[1]=-D[1]),o[1][0]>o[0][1]&&(D[2]=-D[2]),!0};function M(g,T,m){var h=T[0],x=T[1],_=T[2],D=T[3];return g[0]=m[0]*h+m[4]*x+m[8]*_+m[12]*D,g[1]=m[1]*h+m[5]*x+m[9]*_+m[13]*D,g[2]=m[2]*h+m[6]*x+m[10]*_+m[14]*D,g[3]=m[3]*h+m[7]*x+m[11]*_+m[15]*D,g}function A(g,T){g[0][0]=T[0],g[0][1]=T[1],g[0][2]=T[2],g[1][0]=T[4],g[1][1]=T[5],g[1][2]=T[6],g[2][0]=T[8],g[2][1]=T[9],g[2][2]=T[10]}function E(g,T,m,h,x){g[0]=T[0]*h+m[0]*x,g[1]=T[1]*h+m[1]*x,g[2]=T[2]*h+m[2]*x}},4335:function(l){l.exports=function(t,a){var r=a[15];if(r===0)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=a[i]*n;return!0}},7442:function(l,e,t){var a=t(6658),r=t(7182),n=t(2652),i=t(9921),s=t(8648),c=y(),p=y(),f=y();l.exports=d;function d(M,A,E,g){if(i(A)===0||i(E)===0)return!1;var T=n(A,c.translate,c.scale,c.skew,c.perspective,c.quaternion),m=n(E,p.translate,p.scale,p.skew,p.perspective,p.quaternion);return!T||!m?!1:(a(f.translate,c.translate,p.translate,g),a(f.skew,c.skew,p.skew,g),a(f.scale,c.scale,p.scale,g),a(f.perspective,c.perspective,p.perspective,g),s(f.quaternion,c.quaternion,p.quaternion,g),r(M,f.translate,f.scale,f.skew,f.perspective,f.quaternion),!0)}function y(){return{translate:o(),scale:o(1),skew:o(),perspective:b(),quaternion:b()}}function o(M){return[M||0,M||0,M||0]}function b(){return[0,0,0,1]}},7182:function(l,e,t){var a={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=a.create(),n=a.create();l.exports=function(s,c,p,f,d,y){return a.identity(s),a.fromRotationTranslation(s,y,c),s[3]=d[0],s[7]=d[1],s[11]=d[2],s[15]=d[3],a.identity(n),f[2]!==0&&(n[9]=f[2],a.multiply(s,s,n)),f[1]!==0&&(n[9]=0,n[8]=f[1],a.multiply(s,s,n)),f[0]!==0&&(n[8]=0,n[4]=f[0],a.multiply(s,s,n)),a.scale(s,s,p),s}},1811:function(l,e,t){"use strict";var a=t(2478),r=t(7442),n=t(7608),i=t(5567),s=t(2408),c=t(7089),p=t(6582),f=t(7656),d=t(2504),y=t(3536),o=[0,0,0];l.exports=E;function b(g){this._components=g.slice(),this._time=[0],this.prevMatrix=g.slice(),this.nextMatrix=g.slice(),this.computedMatrix=g.slice(),this.computedInverse=g.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]}var M=b.prototype;M.recalcMatrix=function(g){var T=this._time,m=a.le(T,g),h=this.computedMatrix;if(!(m<0)){var x=this._components;if(m===T.length-1)for(var _=16*m,D=0;D<16;++D)h[D]=x[_++];else{for(var C=T[m+1]-T[m],_=16*m,F=this.prevMatrix,I=!0,D=0;D<16;++D)F[D]=x[_++];for(var z=this.nextMatrix,D=0;D<16;++D)z[D]=x[_++],I=I&&F[D]===z[D];if(C<1e-6||I)for(var D=0;D<16;++D)h[D]=F[D];else r(h,F,z,(g-T[m])/C)}var R=this.computedUp;R[0]=h[1],R[1]=h[5],R[2]=h[9],y(R,R);var k=this.computedInverse;n(k,h);var B=this.computedEye,N=k[15];B[0]=k[12]/N,B[1]=k[13]/N,B[2]=k[14]/N;for(var q=this.computedCenter,Y=Math.exp(this.computedRadius[0]),D=0;D<3;++D)q[D]=B[D]-h[2+4*D]*Y}},M.idle=function(g){if(!(g1&&a(n[p[o-2]],n[p[o-1]],y)<=0;)o-=1,p.pop();for(p.push(d),o=f.length;o>1&&a(n[f[o-2]],n[f[o-1]],y)>=0;)o-=1,f.pop();f.push(d)}for(var b=new Array(f.length+p.length-2),M=0,s=0,A=p.length;s0;--E)b[M++]=f[E];return b}},351:function(l,e,t){"use strict";l.exports=r;var a=t(4687);function r(n,i){i||(i=n,n=window);var s=0,c=0,p=0,f={shift:!1,alt:!1,control:!1,meta:!1},d=!1;function y(_){var D=!1;return"altKey"in _&&(D=D||_.altKey!==f.alt,f.alt=!!_.altKey),"shiftKey"in _&&(D=D||_.shiftKey!==f.shift,f.shift=!!_.shiftKey),"ctrlKey"in _&&(D=D||_.ctrlKey!==f.control,f.control=!!_.ctrlKey),"metaKey"in _&&(D=D||_.metaKey!==f.meta,f.meta=!!_.metaKey),D}function o(_,D){var C=a.x(D),F=a.y(D);"buttons"in D&&(_=D.buttons|0),(_!==s||C!==c||F!==p||y(D))&&(s=_|0,c=C||0,p=F||0,i&&i(s,c,p,f))}function b(_){o(0,_)}function M(){(s||c||p||f.shift||f.alt||f.meta||f.control)&&(c=p=0,s=0,f.shift=f.alt=f.control=f.meta=!1,i&&i(0,0,0,f))}function A(_){y(_)&&i&&i(s,c,p,f)}function E(_){a.buttons(_)===0?o(0,_):o(s,_)}function g(_){o(s|a.buttons(_),_)}function T(_){o(s&~a.buttons(_),_)}function m(){d||(d=!0,n.addEventListener("mousemove",E),n.addEventListener("mousedown",g),n.addEventListener("mouseup",T),n.addEventListener("mouseleave",b),n.addEventListener("mouseenter",b),n.addEventListener("mouseout",b),n.addEventListener("mouseover",b),n.addEventListener("blur",M),n.addEventListener("keyup",A),n.addEventListener("keydown",A),n.addEventListener("keypress",A),n!==window&&(window.addEventListener("blur",M),window.addEventListener("keyup",A),window.addEventListener("keydown",A),window.addEventListener("keypress",A)))}function h(){d&&(d=!1,n.removeEventListener("mousemove",E),n.removeEventListener("mousedown",g),n.removeEventListener("mouseup",T),n.removeEventListener("mouseleave",b),n.removeEventListener("mouseenter",b),n.removeEventListener("mouseout",b),n.removeEventListener("mouseover",b),n.removeEventListener("blur",M),n.removeEventListener("keyup",A),n.removeEventListener("keydown",A),n.removeEventListener("keypress",A),n!==window&&(window.removeEventListener("blur",M),window.removeEventListener("keyup",A),window.removeEventListener("keydown",A),window.removeEventListener("keypress",A)))}m();var x={element:n};return Object.defineProperties(x,{enabled:{get:function(){return d},set:function(_){_?m():h()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return f},enumerable:!0}}),x}},24:function(l){var e={left:0,top:0};l.exports=t;function t(r,n,i){n=n||r.currentTarget||r.srcElement,Array.isArray(i)||(i=[0,0]);var s=r.clientX||0,c=r.clientY||0,p=a(n);return i[0]=s-p.left,i[1]=c-p.top,i}function a(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687:function(l,e){"use strict";function t(i){if(typeof i=="object"){if("buttons"in i)return i.buttons;if("which"in i){var s=i.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(ee=1,j[K++]=f(m[D],M,A,E),D+=N,g>0)for(Y=1,C=m[D],H=j[K]=f(C,M,A,E),$=j[K+Z],ue=j[K+Q],Te=j[K+pe],(H!==$||H!==ue||H!==Te)&&(I=m[D+F],R=m[D+z],B=m[D+k],c(Y,ee,C,I,R,B,H,$,ue,Te,M,A,E),Se=G[K]=te++),K+=1,D+=N,Y=2;Y0)for(Y=1,C=m[D],H=j[K]=f(C,M,A,E),$=j[K+Z],ue=j[K+Q],Te=j[K+pe],(H!==$||H!==ue||H!==Te)&&(I=m[D+F],R=m[D+z],B=m[D+k],c(Y,ee,C,I,R,B,H,$,ue,Te,M,A,E),Se=G[K]=te++,Te!==ue&&p(G[K+Q],Se,R,B,ue,Te,M,A,E)),K+=1,D+=N,Y=2;Y0){if(Y=1,j[K++]=f(m[D],M,A,E),D+=N,T>0)for(ee=1,C=m[D],H=j[K]=f(C,M,A,E),ue=j[K+Q],$=j[K+Z],Te=j[K+pe],(H!==ue||H!==$||H!==Te)&&(I=m[D+F],R=m[D+z],B=m[D+k],c(Y,ee,C,I,R,B,H,ue,$,Te,M,A,E),Se=G[K]=te++),K+=1,D+=N,ee=2;ee0)for(ee=1,C=m[D],H=j[K]=f(C,M,A,E),ue=j[K+Q],$=j[K+Z],Te=j[K+pe],(H!==ue||H!==$||H!==Te)&&(I=m[D+F],R=m[D+z],B=m[D+k],c(Y,ee,C,I,R,B,H,ue,$,Te,M,A,E),Se=G[K]=te++,Te!==ue&&p(G[K+Q],Se,B,I,Te,ue,M,A,E)),K+=1,D+=N,ee=2;ee 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var y=s.getters||[],o=new Array(f),b=0;b=0?o[b]=!0:o[b]=!1;return n(s.vertex,s.cell,s.phase,d,p,o)}},6199:function(l,e,t){"use strict";var a=t(1338),r={zero:function(E,g,T,m){var h=E[0],x=T[0];m|=0;var _=0,D=x;for(_=0;_2&&_[1]>2&&m(x.pick(-1,-1).lo(1,1).hi(_[0]-2,_[1]-2),h.pick(-1,-1,0).lo(1,1).hi(_[0]-2,_[1]-2),h.pick(-1,-1,1).lo(1,1).hi(_[0]-2,_[1]-2)),_[1]>2&&(T(x.pick(0,-1).lo(1).hi(_[1]-2),h.pick(0,-1,1).lo(1).hi(_[1]-2)),g(h.pick(0,-1,0).lo(1).hi(_[1]-2))),_[1]>2&&(T(x.pick(_[0]-1,-1).lo(1).hi(_[1]-2),h.pick(_[0]-1,-1,1).lo(1).hi(_[1]-2)),g(h.pick(_[0]-1,-1,0).lo(1).hi(_[1]-2))),_[0]>2&&(T(x.pick(-1,0).lo(1).hi(_[0]-2),h.pick(-1,0,0).lo(1).hi(_[0]-2)),g(h.pick(-1,0,1).lo(1).hi(_[0]-2))),_[0]>2&&(T(x.pick(-1,_[1]-1).lo(1).hi(_[0]-2),h.pick(-1,_[1]-1,0).lo(1).hi(_[0]-2)),g(h.pick(-1,_[1]-1,1).lo(1).hi(_[0]-2))),h.set(0,0,0,0),h.set(0,0,1,0),h.set(_[0]-1,0,0,0),h.set(_[0]-1,0,1,0),h.set(0,_[1]-1,0,0),h.set(0,_[1]-1,1,0),h.set(_[0]-1,_[1]-1,0,0),h.set(_[0]-1,_[1]-1,1,0),h}}function A(E){var g=E.join(),_=f[g];if(_)return _;for(var T=E.length,m=[y,o],h=1;h<=T;++h)m.push(b(h));var x=M,_=x.apply(void 0,m);return f[g]=_,_}l.exports=function(g,T,m){if(Array.isArray(m)||(typeof m=="string"?m=a(T.dimension,m):m=a(T.dimension,"clamp")),T.size===0)return g;if(T.dimension===0)return g.set(0),g;var h=A(m);return h(g,T)}},4317:function(l){"use strict";function e(i,s){var c=Math.floor(s),p=s-c,f=0<=c&&c0;){R<64?(g=R,R=0):(g=64,R-=64);for(var k=f[1]|0;k>0;){k<64?(T=k,k=0):(T=64,k-=64),o=I+R*h+k*x,A=z+R*D+k*C;var B=0,N=0,q=0,Y=_,ee=h-m*_,te=x-g*h,ae=F,j=D-m*F,G=C-g*D;for(q=0;q0;){C<64?(g=C,C=0):(g=64,C-=64);for(var F=f[0]|0;F>0;){F<64?(E=F,F=0):(E=64,F-=64),o=_+C*m+F*T,A=D+C*x+F*h;var I=0,z=0,R=m,k=T-g*m,B=x,N=h-g*x;for(z=0;z0;){z<64?(T=z,z=0):(T=64,z-=64);for(var R=f[0]|0;R>0;){R<64?(E=R,R=0):(E=64,R-=64);for(var k=f[1]|0;k>0;){k<64?(g=k,k=0):(g=64,k-=64),o=F+z*x+R*m+k*h,A=I+z*C+R*_+k*D;var B=0,N=0,q=0,Y=x,ee=m-T*x,te=h-E*m,ae=C,j=_-T*C,G=D-E*_;for(q=0;qb;){B=0,N=I-g;t:for(R=0;RY)break t;N+=_,B+=D}for(B=I,N=I-g,R=0;R>1,k=R-F,B=R+F,N=I,q=k,Y=R,ee=B,te=z,ae=M+1,j=A-1,G=!0,K,H,Z,X,$,Q,re,ue,pe,ge=0,Te=0,Se=0,Ce,Ue,Oe,_e,ce,ie,se,ne,be,De,qe,Ne,ut,ot,yt,At,It=x,Zt=y(It),vr=y(It);Ue=T*N,Oe=T*q,At=g;e:for(Ce=0;Ce0){H=N,N=q,q=H;break e}if(Se<0)break e;At+=D}Ue=T*ee,Oe=T*te,At=g;e:for(Ce=0;Ce0){H=ee,ee=te,te=H;break e}if(Se<0)break e;At+=D}Ue=T*N,Oe=T*Y,At=g;e:for(Ce=0;Ce0){H=N,N=Y,Y=H;break e}if(Se<0)break e;At+=D}Ue=T*q,Oe=T*Y,At=g;e:for(Ce=0;Ce0){H=q,q=Y,Y=H;break e}if(Se<0)break e;At+=D}Ue=T*N,Oe=T*ee,At=g;e:for(Ce=0;Ce0){H=N,N=ee,ee=H;break e}if(Se<0)break e;At+=D}Ue=T*Y,Oe=T*ee,At=g;e:for(Ce=0;Ce0){H=Y,Y=ee,ee=H;break e}if(Se<0)break e;At+=D}Ue=T*q,Oe=T*te,At=g;e:for(Ce=0;Ce0){H=q,q=te,te=H;break e}if(Se<0)break e;At+=D}Ue=T*q,Oe=T*Y,At=g;e:for(Ce=0;Ce0){H=q,q=Y,Y=H;break e}if(Se<0)break e;At+=D}Ue=T*ee,Oe=T*te,At=g;e:for(Ce=0;Ce0){H=ee,ee=te,te=H;break e}if(Se<0)break e;At+=D}for(Ue=T*N,Oe=T*q,_e=T*Y,ce=T*ee,ie=T*te,se=T*I,ne=T*R,be=T*z,yt=0,At=g,Ce=0;Ce0)j--;else if(Se<0){for(Ue=T*Q,Oe=T*ae,_e=T*j,At=g,Ce=0;Ce0)for(;;){re=g+j*T,yt=0;e:for(Ce=0;Ce0){if(--jz){e:for(;;){for(re=g+ae*T,yt=0,At=g,Ce=0;Ce1&&b?A(o,b[0],b[1]):A(o)}var p={"uint32,1,0":function(d,y){return function(o){var b=o.data,M=o.offset|0,A=o.shape,E=o.stride,g=E[0]|0,T=A[0]|0,m=E[1]|0,h=A[1]|0,x=m,_=m,D=1;T<=32?d(0,T-1,b,M,g,m,T,h,x,_,D):y(0,T-1,b,M,g,m,T,h,x,_,D)}}};function f(d,y){var o=[y,d].join(","),b=p[o],M=i(d,y),A=c(d,y,M);return b(M,A)}l.exports=f},446:function(l,e,t){"use strict";var a=t(7640),r={};function n(i){var s=i.order,c=i.dtype,p=[s,c],f=p.join(":"),d=r[f];return d||(r[f]=d=a(s,c)),d(i),i}l.exports=n},9618:function(l,e,t){var a=t(7163),r=typeof Float64Array<"u";function n(y,o){return y[0]-o[0]}function i(){var y=this.stride,o=new Array(y.length),b;for(b=0;b=0&&(m=g|0,T+=x*m,h-=m),new M(this.data,h,x,T)},A.step=function(g){var T=this.shape[0],m=this.stride[0],h=this.offset,x=0,_=Math.ceil;return typeof g=="number"&&(x=g|0,x<0?(h+=m*(T-1),T=_(-T/x)):T=_(T/x),m*=x),new M(this.data,T,m,h)},A.transpose=function(g){g=g===void 0?0:g|0;var T=this.shape,m=this.stride;return new M(this.data,T[g],m[g],this.offset)},A.pick=function(g){var T=[],m=[],h=this.offset;typeof g=="number"&&g>=0?h=h+this.stride[0]*g|0:(T.push(this.shape[0]),m.push(this.stride[0]));var x=o[T.length+1];return x(this.data,T,m,h)},function(g,T,m,h){return new M(g,T[0],m[0],h)}},2:function(y,o,b){function M(E,g,T,m,h,x){this.data=E,this.shape=[g,T],this.stride=[m,h],this.offset=x|0}var A=M.prototype;return A.dtype=y,A.dimension=2,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(A,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),A.set=function(g,T,m){return y==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*T,m):this.data[this.offset+this.stride[0]*g+this.stride[1]*T]=m},A.get=function(g,T){return y==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*T):this.data[this.offset+this.stride[0]*g+this.stride[1]*T]},A.index=function(g,T){return this.offset+this.stride[0]*g+this.stride[1]*T},A.hi=function(g,T){return new M(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},A.lo=function(g,T){var m=this.offset,h=0,x=this.shape[0],_=this.shape[1],D=this.stride[0],C=this.stride[1];return typeof g=="number"&&g>=0&&(h=g|0,m+=D*h,x-=h),typeof T=="number"&&T>=0&&(h=T|0,m+=C*h,_-=h),new M(this.data,x,_,D,C,m)},A.step=function(g,T){var m=this.shape[0],h=this.shape[1],x=this.stride[0],_=this.stride[1],D=this.offset,C=0,F=Math.ceil;return typeof g=="number"&&(C=g|0,C<0?(D+=x*(m-1),m=F(-m/C)):m=F(m/C),x*=C),typeof T=="number"&&(C=T|0,C<0?(D+=_*(h-1),h=F(-h/C)):h=F(h/C),_*=C),new M(this.data,m,h,x,_,D)},A.transpose=function(g,T){g=g===void 0?0:g|0,T=T===void 0?1:T|0;var m=this.shape,h=this.stride;return new M(this.data,m[g],m[T],h[g],h[T],this.offset)},A.pick=function(g,T){var m=[],h=[],x=this.offset;typeof g=="number"&&g>=0?x=x+this.stride[0]*g|0:(m.push(this.shape[0]),h.push(this.stride[0])),typeof T=="number"&&T>=0?x=x+this.stride[1]*T|0:(m.push(this.shape[1]),h.push(this.stride[1]));var _=o[m.length+1];return _(this.data,m,h,x)},function(g,T,m,h){return new M(g,T[0],T[1],m[0],m[1],h)}},3:function(y,o,b){function M(E,g,T,m,h,x,_,D){this.data=E,this.shape=[g,T,m],this.stride=[h,x,_],this.offset=D|0}var A=M.prototype;return A.dtype=y,A.dimension=3,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(A,"order",{get:function(){var g=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),m=Math.abs(this.stride[2]);return g>T?T>m?[2,1,0]:g>m?[1,2,0]:[1,0,2]:g>m?[2,0,1]:m>T?[0,1,2]:[0,2,1]}}),A.set=function(g,T,m,h){return y==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*T+this.stride[2]*m,h):this.data[this.offset+this.stride[0]*g+this.stride[1]*T+this.stride[2]*m]=h},A.get=function(g,T,m){return y==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*T+this.stride[2]*m):this.data[this.offset+this.stride[0]*g+this.stride[1]*T+this.stride[2]*m]},A.index=function(g,T,m){return this.offset+this.stride[0]*g+this.stride[1]*T+this.stride[2]*m},A.hi=function(g,T,m){return new M(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof m!="number"||m<0?this.shape[2]:m|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},A.lo=function(g,T,m){var h=this.offset,x=0,_=this.shape[0],D=this.shape[1],C=this.shape[2],F=this.stride[0],I=this.stride[1],z=this.stride[2];return typeof g=="number"&&g>=0&&(x=g|0,h+=F*x,_-=x),typeof T=="number"&&T>=0&&(x=T|0,h+=I*x,D-=x),typeof m=="number"&&m>=0&&(x=m|0,h+=z*x,C-=x),new M(this.data,_,D,C,F,I,z,h)},A.step=function(g,T,m){var h=this.shape[0],x=this.shape[1],_=this.shape[2],D=this.stride[0],C=this.stride[1],F=this.stride[2],I=this.offset,z=0,R=Math.ceil;return typeof g=="number"&&(z=g|0,z<0?(I+=D*(h-1),h=R(-h/z)):h=R(h/z),D*=z),typeof T=="number"&&(z=T|0,z<0?(I+=C*(x-1),x=R(-x/z)):x=R(x/z),C*=z),typeof m=="number"&&(z=m|0,z<0?(I+=F*(_-1),_=R(-_/z)):_=R(_/z),F*=z),new M(this.data,h,x,_,D,C,F,I)},A.transpose=function(g,T,m){g=g===void 0?0:g|0,T=T===void 0?1:T|0,m=m===void 0?2:m|0;var h=this.shape,x=this.stride;return new M(this.data,h[g],h[T],h[m],x[g],x[T],x[m],this.offset)},A.pick=function(g,T,m){var h=[],x=[],_=this.offset;typeof g=="number"&&g>=0?_=_+this.stride[0]*g|0:(h.push(this.shape[0]),x.push(this.stride[0])),typeof T=="number"&&T>=0?_=_+this.stride[1]*T|0:(h.push(this.shape[1]),x.push(this.stride[1])),typeof m=="number"&&m>=0?_=_+this.stride[2]*m|0:(h.push(this.shape[2]),x.push(this.stride[2]));var D=o[h.length+1];return D(this.data,h,x,_)},function(g,T,m,h){return new M(g,T[0],T[1],T[2],m[0],m[1],m[2],h)}},4:function(y,o,b){function M(E,g,T,m,h,x,_,D,C,F){this.data=E,this.shape=[g,T,m,h],this.stride=[x,_,D,C],this.offset=F|0}var A=M.prototype;return A.dtype=y,A.dimension=4,Object.defineProperty(A,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(A,"order",{get:b}),A.set=function(g,T,m,h,x){return y==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*T+this.stride[2]*m+this.stride[3]*h,x):this.data[this.offset+this.stride[0]*g+this.stride[1]*T+this.stride[2]*m+this.stride[3]*h]=x},A.get=function(g,T,m,h){return y==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*T+this.stride[2]*m+this.stride[3]*h):this.data[this.offset+this.stride[0]*g+this.stride[1]*T+this.stride[2]*m+this.stride[3]*h]},A.index=function(g,T,m,h){return this.offset+this.stride[0]*g+this.stride[1]*T+this.stride[2]*m+this.stride[3]*h},A.hi=function(g,T,m,h){return new M(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof m!="number"||m<0?this.shape[2]:m|0,typeof h!="number"||h<0?this.shape[3]:h|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},A.lo=function(g,T,m,h){var x=this.offset,_=0,D=this.shape[0],C=this.shape[1],F=this.shape[2],I=this.shape[3],z=this.stride[0],R=this.stride[1],k=this.stride[2],B=this.stride[3];return typeof g=="number"&&g>=0&&(_=g|0,x+=z*_,D-=_),typeof T=="number"&&T>=0&&(_=T|0,x+=R*_,C-=_),typeof m=="number"&&m>=0&&(_=m|0,x+=k*_,F-=_),typeof h=="number"&&h>=0&&(_=h|0,x+=B*_,I-=_),new M(this.data,D,C,F,I,z,R,k,B,x)},A.step=function(g,T,m,h){var x=this.shape[0],_=this.shape[1],D=this.shape[2],C=this.shape[3],F=this.stride[0],I=this.stride[1],z=this.stride[2],R=this.stride[3],k=this.offset,B=0,N=Math.ceil;return typeof g=="number"&&(B=g|0,B<0?(k+=F*(x-1),x=N(-x/B)):x=N(x/B),F*=B),typeof T=="number"&&(B=T|0,B<0?(k+=I*(_-1),_=N(-_/B)):_=N(_/B),I*=B),typeof m=="number"&&(B=m|0,B<0?(k+=z*(D-1),D=N(-D/B)):D=N(D/B),z*=B),typeof h=="number"&&(B=h|0,B<0?(k+=R*(C-1),C=N(-C/B)):C=N(C/B),R*=B),new M(this.data,x,_,D,C,F,I,z,R,k)},A.transpose=function(g,T,m,h){g=g===void 0?0:g|0,T=T===void 0?1:T|0,m=m===void 0?2:m|0,h=h===void 0?3:h|0;var x=this.shape,_=this.stride;return new M(this.data,x[g],x[T],x[m],x[h],_[g],_[T],_[m],_[h],this.offset)},A.pick=function(g,T,m,h){var x=[],_=[],D=this.offset;typeof g=="number"&&g>=0?D=D+this.stride[0]*g|0:(x.push(this.shape[0]),_.push(this.stride[0])),typeof T=="number"&&T>=0?D=D+this.stride[1]*T|0:(x.push(this.shape[1]),_.push(this.stride[1])),typeof m=="number"&&m>=0?D=D+this.stride[2]*m|0:(x.push(this.shape[2]),_.push(this.stride[2])),typeof h=="number"&&h>=0?D=D+this.stride[3]*h|0:(x.push(this.shape[3]),_.push(this.stride[3]));var C=o[x.length+1];return C(this.data,x,_,D)},function(g,T,m,h){return new M(g,T[0],T[1],T[2],T[3],m[0],m[1],m[2],m[3],h)}},5:function(o,b,M){function A(g,T,m,h,x,_,D,C,F,I,z,R){this.data=g,this.shape=[T,m,h,x,_],this.stride=[D,C,F,I,z],this.offset=R|0}var E=A.prototype;return E.dtype=o,E.dimension=5,Object.defineProperty(E,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(E,"order",{get:M}),E.set=function(T,m,h,x,_,D){return o==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*m+this.stride[2]*h+this.stride[3]*x+this.stride[4]*_,D):this.data[this.offset+this.stride[0]*T+this.stride[1]*m+this.stride[2]*h+this.stride[3]*x+this.stride[4]*_]=D},E.get=function(T,m,h,x,_){return o==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*m+this.stride[2]*h+this.stride[3]*x+this.stride[4]*_):this.data[this.offset+this.stride[0]*T+this.stride[1]*m+this.stride[2]*h+this.stride[3]*x+this.stride[4]*_]},E.index=function(T,m,h,x,_){return this.offset+this.stride[0]*T+this.stride[1]*m+this.stride[2]*h+this.stride[3]*x+this.stride[4]*_},E.hi=function(T,m,h,x,_){return new A(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof m!="number"||m<0?this.shape[1]:m|0,typeof h!="number"||h<0?this.shape[2]:h|0,typeof x!="number"||x<0?this.shape[3]:x|0,typeof _!="number"||_<0?this.shape[4]:_|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},E.lo=function(T,m,h,x,_){var D=this.offset,C=0,F=this.shape[0],I=this.shape[1],z=this.shape[2],R=this.shape[3],k=this.shape[4],B=this.stride[0],N=this.stride[1],q=this.stride[2],Y=this.stride[3],ee=this.stride[4];return typeof T=="number"&&T>=0&&(C=T|0,D+=B*C,F-=C),typeof m=="number"&&m>=0&&(C=m|0,D+=N*C,I-=C),typeof h=="number"&&h>=0&&(C=h|0,D+=q*C,z-=C),typeof x=="number"&&x>=0&&(C=x|0,D+=Y*C,R-=C),typeof _=="number"&&_>=0&&(C=_|0,D+=ee*C,k-=C),new A(this.data,F,I,z,R,k,B,N,q,Y,ee,D)},E.step=function(T,m,h,x,_){var D=this.shape[0],C=this.shape[1],F=this.shape[2],I=this.shape[3],z=this.shape[4],R=this.stride[0],k=this.stride[1],B=this.stride[2],N=this.stride[3],q=this.stride[4],Y=this.offset,ee=0,te=Math.ceil;return typeof T=="number"&&(ee=T|0,ee<0?(Y+=R*(D-1),D=te(-D/ee)):D=te(D/ee),R*=ee),typeof m=="number"&&(ee=m|0,ee<0?(Y+=k*(C-1),C=te(-C/ee)):C=te(C/ee),k*=ee),typeof h=="number"&&(ee=h|0,ee<0?(Y+=B*(F-1),F=te(-F/ee)):F=te(F/ee),B*=ee),typeof x=="number"&&(ee=x|0,ee<0?(Y+=N*(I-1),I=te(-I/ee)):I=te(I/ee),N*=ee),typeof _=="number"&&(ee=_|0,ee<0?(Y+=q*(z-1),z=te(-z/ee)):z=te(z/ee),q*=ee),new A(this.data,D,C,F,I,z,R,k,B,N,q,Y)},E.transpose=function(T,m,h,x,_){T=T===void 0?0:T|0,m=m===void 0?1:m|0,h=h===void 0?2:h|0,x=x===void 0?3:x|0,_=_===void 0?4:_|0;var D=this.shape,C=this.stride;return new A(this.data,D[T],D[m],D[h],D[x],D[_],C[T],C[m],C[h],C[x],C[_],this.offset)},E.pick=function(T,m,h,x,_){var D=[],C=[],F=this.offset;typeof T=="number"&&T>=0?F=F+this.stride[0]*T|0:(D.push(this.shape[0]),C.push(this.stride[0])),typeof m=="number"&&m>=0?F=F+this.stride[1]*m|0:(D.push(this.shape[1]),C.push(this.stride[1])),typeof h=="number"&&h>=0?F=F+this.stride[2]*h|0:(D.push(this.shape[2]),C.push(this.stride[2])),typeof x=="number"&&x>=0?F=F+this.stride[3]*x|0:(D.push(this.shape[3]),C.push(this.stride[3])),typeof _=="number"&&_>=0?F=F+this.stride[4]*_|0:(D.push(this.shape[4]),C.push(this.stride[4]));var I=b[D.length+1];return I(this.data,D,C,F)},function(T,m,h,x){return new A(T,m[0],m[1],m[2],m[3],m[4],h[0],h[1],h[2],h[3],h[4],x)}}};function c(y,o){var b=o===-1?"T":String(o),M=s[b];return o===-1?M(y):o===0?M(y,f[y][0]):M(y,f[y],i)}function p(y){if(a(y))return"buffer";if(r)switch(Object.prototype.toString.call(y)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(y)?"array":"generic"}var f={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function d(y,o,b,M){if(y===void 0){var h=f.array[0];return h([])}else typeof y=="number"&&(y=[y]);o===void 0&&(o=[y.length]);var A=o.length;if(b===void 0){b=new Array(A);for(var E=A-1,g=1;E>=0;--E)b[E]=g,g*=o[E]}if(M===void 0){M=0;for(var E=0;E>>0;l.exports=i;function i(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var p=a.hi(s),f=a.lo(s);return c>s==s>0?f===n?(p+=1,f=0):f+=1:f===0?(f=n,p-=1):f-=1,a.pack(f,p)}},8406:function(l,e){var t=1e-6,a=1e-6;e.vertexNormals=function(r,n,i){for(var s=n.length,c=new Array(s),p=i===void 0?t:i,f=0;fp)for(var D=c[o],C=1/Math.sqrt(m*x),_=0;_<3;++_){var F=(_+1)%3,I=(_+2)%3;D[_]+=C*(h[F]*T[I]-h[I]*T[F])}}for(var f=0;fp)for(var C=1/Math.sqrt(z),_=0;_<3;++_)D[_]*=C;else for(var _=0;_<3;++_)D[_]=0}return c},e.faceNormals=function(r,n,i){for(var s=r.length,c=new Array(s),p=i===void 0?a:i,f=0;fp?E=1/Math.sqrt(E):E=0;for(var o=0;o<3;++o)A[o]*=E;c[f]=A}return c}},4081:function(l){"use strict";l.exports=e;function e(t,a,r,n,i,s,c,p,f,d){var y=a+s+d;if(o>0){var o=Math.sqrt(y+1);t[0]=.5*(c-f)/o,t[1]=.5*(p-n)/o,t[2]=.5*(r-s)/o,t[3]=.5*o}else{var b=Math.max(a,s,d),o=Math.sqrt(2*b-y+1);a>=b?(t[0]=.5*o,t[1]=.5*(i+r)/o,t[2]=.5*(p+n)/o,t[3]=.5*(c-f)/o):s>=b?(t[0]=.5*(r+i)/o,t[1]=.5*o,t[2]=.5*(f+c)/o,t[3]=.5*(p-n)/o):(t[0]=.5*(n+p)/o,t[1]=.5*(c+f)/o,t[2]=.5*o,t[3]=.5*(r-i)/o)}return t}},9977:function(l,e,t){"use strict";l.exports=o;var a=t(9215),r=t(6582),n=t(7399),i=t(7608),s=t(4081);function c(b,M,A){return Math.sqrt(Math.pow(b,2)+Math.pow(M,2)+Math.pow(A,2))}function p(b,M,A,E){return Math.sqrt(Math.pow(b,2)+Math.pow(M,2)+Math.pow(A,2)+Math.pow(E,2))}function f(b,M){var A=M[0],E=M[1],g=M[2],T=M[3],m=p(A,E,g,T);m>1e-6?(b[0]=A/m,b[1]=E/m,b[2]=g/m,b[3]=T/m):(b[0]=b[1]=b[2]=0,b[3]=1)}function d(b,M,A){this.radius=a([A]),this.center=a(M),this.rotation=a(b),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 y=d.prototype;y.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},y.recalcMatrix=function(b){this.radius.curve(b),this.center.curve(b),this.rotation.curve(b);var M=this.computedRotation;f(M,M);var A=this.computedMatrix;n(A,M);var E=this.computedCenter,g=this.computedEye,T=this.computedUp,m=Math.exp(this.computedRadius[0]);g[0]=E[0]+m*A[2],g[1]=E[1]+m*A[6],g[2]=E[2]+m*A[10],T[0]=A[1],T[1]=A[5],T[2]=A[9];for(var h=0;h<3;++h){for(var x=0,_=0;_<3;++_)x+=A[h+4*_]*g[_];A[12+h]=-x}},y.getMatrix=function(b,M){this.recalcMatrix(b);var A=this.computedMatrix;if(M){for(var E=0;E<16;++E)M[E]=A[E];return M}return A},y.idle=function(b){this.center.idle(b),this.radius.idle(b),this.rotation.idle(b)},y.flush=function(b){this.center.flush(b),this.radius.flush(b),this.rotation.flush(b)},y.pan=function(b,M,A,E){M=M||0,A=A||0,E=E||0,this.recalcMatrix(b);var g=this.computedMatrix,T=g[1],m=g[5],h=g[9],x=c(T,m,h);T/=x,m/=x,h/=x;var _=g[0],D=g[4],C=g[8],F=_*T+D*m+C*h;_-=T*F,D-=m*F,C-=h*F;var I=c(_,D,C);_/=I,D/=I,C/=I;var z=g[2],R=g[6],k=g[10],B=z*T+R*m+k*h,N=z*_+R*D+k*C;z-=B*T+N*_,R-=B*m+N*D,k-=B*h+N*C;var q=c(z,R,k);z/=q,R/=q,k/=q;var Y=_*M+T*A,ee=D*M+m*A,te=C*M+h*A;this.center.move(b,Y,ee,te);var ae=Math.exp(this.computedRadius[0]);ae=Math.max(1e-4,ae+E),this.radius.set(b,Math.log(ae))},y.rotate=function(b,M,A,E){this.recalcMatrix(b),M=M||0,A=A||0;var g=this.computedMatrix,T=g[0],m=g[4],h=g[8],x=g[1],_=g[5],D=g[9],C=g[2],F=g[6],I=g[10],z=M*T+A*x,R=M*m+A*_,k=M*h+A*D,B=-(F*k-I*R),N=-(I*z-C*k),q=-(C*R-F*z),Y=Math.sqrt(Math.max(0,1-Math.pow(B,2)-Math.pow(N,2)-Math.pow(q,2))),ee=p(B,N,q,Y);ee>1e-6?(B/=ee,N/=ee,q/=ee,Y/=ee):(B=N=q=0,Y=1);var te=this.computedRotation,ae=te[0],j=te[1],G=te[2],K=te[3],H=ae*Y+K*B+j*q-G*N,Z=j*Y+K*N+G*B-ae*q,X=G*Y+K*q+ae*N-j*B,$=K*Y-ae*B-j*N-G*q;if(E){B=C,N=F,q=I;var Q=Math.sin(E)/c(B,N,q);B*=Q,N*=Q,q*=Q,Y=Math.cos(M),H=H*Y+$*B+Z*q-X*N,Z=Z*Y+$*N+X*B-H*q,X=X*Y+$*q+H*N-Z*B,$=$*Y-H*B-Z*N-X*q}var re=p(H,Z,X,$);re>1e-6?(H/=re,Z/=re,X/=re,$/=re):(H=Z=X=0,$=1),this.rotation.set(b,H,Z,X,$)},y.lookAt=function(b,M,A,E){this.recalcMatrix(b),A=A||this.computedCenter,M=M||this.computedEye,E=E||this.computedUp;var g=this.computedMatrix;r(g,M,A,E);var T=this.computedRotation;s(T,g[0],g[1],g[2],g[4],g[5],g[6],g[8],g[9],g[10]),f(T,T),this.rotation.set(b,T[0],T[1],T[2],T[3]);for(var m=0,h=0;h<3;++h)m+=Math.pow(A[h]-M[h],2);this.radius.set(b,.5*Math.log(Math.max(m,1e-6))),this.center.set(b,A[0],A[1],A[2])},y.translate=function(b,M,A,E){this.center.move(b,M||0,A||0,E||0)},y.setMatrix=function(b,M){var A=this.computedRotation;s(A,M[0],M[1],M[2],M[4],M[5],M[6],M[8],M[9],M[10]),f(A,A),this.rotation.set(b,A[0],A[1],A[2],A[3]);var E=this.computedMatrix;i(E,M);var g=E[15];if(Math.abs(g)>1e-6){var T=E[12]/g,m=E[13]/g,h=E[14]/g;this.recalcMatrix(b);var x=Math.exp(this.computedRadius[0]);this.center.set(b,T-E[2]*x,m-E[6]*x,h-E[10]*x),this.radius.idle(b)}else this.center.idle(b),this.radius.idle(b)},y.setDistance=function(b,M){M>0&&this.radius.set(b,Math.log(M))},y.setDistanceLimits=function(b,M){b>0?b=Math.log(b):b=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,b),this.radius.bounds[0][0]=b,this.radius.bounds[1][0]=M},y.getDistanceLimits=function(b){var M=this.radius.bounds;return b?(b[0]=Math.exp(M[0][0]),b[1]=Math.exp(M[1][0]),b):[Math.exp(M[0][0]),Math.exp(M[1][0])]},y.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]}},y.fromJSON=function(b){var M=this.lastT(),A=b.center;A&&this.center.set(M,A[0],A[1],A[2]);var E=b.rotation;E&&this.rotation.set(M,E[0],E[1],E[2],E[3]);var g=b.distance;g&&g>0&&this.radius.set(M,Math.log(g)),this.setDistanceLimits(b.zoomMin,b.zoomMax)};function o(b){b=b||{};var M=b.center||[0,0,0],A=b.rotation||[0,0,0,1],E=b.radius||1;M=[].slice.call(M,0,3),A=[].slice.call(A,0,4),f(A,A);var g=new d(A,M,Math.log(E));return g.setDistanceLimits(b.zoomMin,b.zoomMax),("eye"in b||"up"in b)&&g.lookAt(0,b.eye,b.center,b.up),g}},1371:function(l,e,t){"use strict";var a=t(3233);l.exports=function(n,i,s){return s=typeof s<"u"?s+"":" ",a(s,i)+n}},3202:function(l){l.exports=function(t,a){a||(a=[0,""]),t=String(t);var r=parseFloat(t,10);return a[0]=r,a[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",a}},3088:function(l,e,t){"use strict";l.exports=r;var a=t(3140);function r(n,i){for(var s=i.length|0,c=n.length,p=[new Array(s),new Array(s)],f=0;f0){D=p[I][x][0],F=I;break}C=D[F^1];for(var z=0;z<2;++z)for(var R=p[z][x],k=0;k0&&(D=B,C=N,F=z)}return _||D&&o(D,F),C}function M(h,x){var _=p[x][h][0],D=[h];o(_,x);for(var C=_[x^1],F=x;;){for(;C!==h;)D.push(C),C=b(D[D.length-2],C,!1);if(p[0][h].length+p[1][h].length===0)break;var I=D[D.length-1],z=h,R=D[1],k=b(I,z,!0);if(a(i[I],i[z],i[R],i[k])<0)break;D.push(h),C=b(I,z)}return D}function A(h,x){return x[1]===x[x.length-1]}for(var f=0;f0;){var T=p[0][f].length,m=M(f,E);A(g,m)?g.push.apply(g,m):(g.length>0&&y.push(g),g=m)}g.length>0&&y.push(g)}return y}},5609:function(l,e,t){"use strict";l.exports=r;var a=t(3134);function r(n,i){for(var s=a(n,i.length),c=new Array(i.length),p=new Array(i.length),f=[],d=0;d0;){var o=f.pop();c[o]=!1;for(var b=s[o],d=0;d0}T=T.filter(m);for(var h=T.length,x=new Array(h),_=new Array(h),g=0;g0;){var re=X.pop(),ue=ee[re];c(ue,function(Ce,Ue){return Ce-Ue});var pe=ue.length,ge=$[re],Te;if(ge===0){var R=T[re];Te=[R]}for(var g=0;g=0)&&($[Se]=ge^1,X.push(Se),ge===0)){var R=T[Se];Z(R)||(R.reverse(),Te.push(R))}}ge===0&&Q.push(Te)}return Q}},5085:function(l,e,t){l.exports=b;var a=t(3250)[3],r=t(4209),n=t(3352),i=t(2478);function s(){return!0}function c(M){return function(A,E){var g=M[A];return g?!!g.queryPoint(E,s):!1}}function p(M){for(var A={},E=0;E0&&A[g]===E[0])T=M[g-1];else return 1;for(var m=1;T;){var h=T.key,x=a(E,h[0],h[1]);if(h[0][0]0)m=-1,T=T.right;else return 0;else if(x>0)T=T.left;else if(x<0)m=1,T=T.right;else return 0}return m}}function d(M){return 1}function y(M){return function(E){return M(E[0],E[1])?0:1}}function o(M,A){return function(g){return M(g[0],g[1])?0:A(g)}}function b(M){for(var A=M.length,E=[],g=[],T=0,m=0;m=d?(h=1,_=d+2*b+A):(h=-b/d,_=b*h+A)):(h=0,M>=0?(x=0,_=A):-M>=o?(x=1,_=o+2*M+A):(x=-M/o,_=M*x+A));else if(x<0)x=0,b>=0?(h=0,_=A):-b>=d?(h=1,_=d+2*b+A):(h=-b/d,_=b*h+A);else{var D=1/m;h*=D,x*=D,_=h*(d*h+y*x+2*b)+x*(y*h+o*x+2*M)+A}else{var C,F,I,z;h<0?(C=y+b,F=o+M,F>C?(I=F-C,z=d-2*y+o,I>=z?(h=1,x=0,_=d+2*b+A):(h=I/z,x=1-h,_=h*(d*h+y*x+2*b)+x*(y*h+o*x+2*M)+A)):(h=0,F<=0?(x=1,_=o+2*M+A):M>=0?(x=0,_=A):(x=-M/o,_=M*x+A))):x<0?(C=y+M,F=d+b,F>C?(I=F-C,z=d-2*y+o,I>=z?(x=1,h=0,_=o+2*M+A):(x=I/z,h=1-x,_=h*(d*h+y*x+2*b)+x*(y*h+o*x+2*M)+A)):(x=0,F<=0?(h=1,_=d+2*b+A):b>=0?(h=0,_=A):(h=-b/d,_=b*h+A))):(I=o+M-y-b,I<=0?(h=0,x=1,_=o+2*M+A):(z=d-2*y+o,I>=z?(h=1,x=0,_=d+2*b+A):(h=I/z,x=1-h,_=h*(d*h+y*x+2*b)+x*(y*h+o*x+2*M)+A)))}for(var R=1-h-x,f=0;f0){var o=s[p-1];if(a(d,o)===0&&n(o)!==y){p-=1;continue}}s[p++]=d}}return s.length=p,s}},3233:function(l){"use strict";var e="",t;l.exports=a;function a(r,n){if(typeof r!="string")throw new TypeError("expected a string");if(n===1)return r;if(n===2)return r+r;var i=r.length*n;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=i)return e.substr(0,i);for(;i>e.length&&n>1;)n&1&&(e+=r),n>>=1,r+=r;return e+=r,e=e.substr(0,i),e}},3025:function(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(l){"use strict";l.exports=e;function e(t){for(var a=t.length,r=t[t.length-1],n=a,i=a-2;i>=0;--i){var s=r,c=t[i];r=s+c;var p=r-s,f=c-p;f&&(t[--n]=r,r=f)}for(var d=0,i=n;i0){if(F<=0)return I;z=C+F}else if(C<0){if(F>=0)return I;z=-(C+F)}else return I;var R=p*z;return I>=R||I<=-R?I:M(x,_,D)},function(x,_,D,C){var F=x[0]-C[0],I=_[0]-C[0],z=D[0]-C[0],R=x[1]-C[1],k=_[1]-C[1],B=D[1]-C[1],N=x[2]-C[2],q=_[2]-C[2],Y=D[2]-C[2],ee=I*B,te=z*k,ae=z*R,j=F*B,G=F*k,K=I*R,H=N*(ee-te)+q*(ae-j)+Y*(G-K),Z=(Math.abs(ee)+Math.abs(te))*Math.abs(N)+(Math.abs(ae)+Math.abs(j))*Math.abs(q)+(Math.abs(G)+Math.abs(K))*Math.abs(Y),X=f*Z;return H>X||-H>X?H:A(x,_,D,C)}];function g(h){var x=E[h.length];return x||(x=E[h.length]=b(h.length)),x.apply(void 0,h)}function T(h,x,_,D,C,F,I){return function(R,k,B,N,q){switch(arguments.length){case 0:case 1:return 0;case 2:return D(R,k);case 3:return C(R,k,B);case 4:return F(R,k,B,N);case 5:return I(R,k,B,N,q)}for(var Y=new Array(arguments.length),ee=0;ee0&&d>0||f<0&&d<0)return!1;var y=a(c,i,s),o=a(p,i,s);return y>0&&o>0||y<0&&o<0?!1:f===0&&d===0&&y===0&&o===0?r(i,s,c,p):!0}},8545:function(l){"use strict";l.exports=t;function e(a,r){var n=a+r,i=n-a,s=n-i,c=r-i,p=a-s,f=p+c;return f?[f,n]:[n]}function t(a,r){var n=a.length|0,i=r.length|0;if(n===1&&i===1)return e(a[0],-r[0]);var s=n+i,c=new Array(s),p=0,f=0,d=0,y=Math.abs,o=a[f],b=y(o),M=-r[d],A=y(M),E,g;b=i?(E=o,f+=1,f=i?(E=o,f+=1,f"u"&&(E=s(b));var g=b.length;if(g===0||E<1)return{cells:[],vertexIds:[],vertexWeights:[]};var T=c(M,+A),m=p(b,E),h=f(m,M,T,+A),x=d(m,M.length|0),_=i(E)(b,m.data,x,T),D=y(m),C=[].slice.call(h.data,0,h.shape[0]);return r.free(T),r.free(m.data),r.free(h.data),r.free(x),{cells:_,vertexIds:D,vertexWeights:C}}},1570:function(l){"use strict";l.exports=t;var e=[function(){function r(i,s,c,p){for(var f=Math.min(c,p)|0,d=Math.max(c,p)|0,y=i[2*f],o=i[2*f+1];y>1,M=s[2*b+1];if(M===d)return b;d>1,M=s[2*b+1];if(M===d)return b;d>1,M=s[2*b+1];if(M===d)return b;d>1,M=s[2*b+1];if(M===d)return b;d>1,z=p(x[I],_);z<=0?(z===0&&(F=I),D=I+1):z>0&&(C=I-1)}return F}a=o;function b(x,_){for(var D=new Array(x.length),C=0,F=D.length;C=x.length||p(x[ee],I)!==0););}return D}a=b;function M(x,_){if(!_)return b(y(E(x,0)),x,0);for(var D=new Array(_),C=0;C<_;++C)D[C]=[];for(var C=0,F=x.length;C>>B&1&&k.push(F[B]);_.push(k)}return d(_)}a=A;function E(x,_){if(_<0)return[];for(var D=[],C=(1<<_+1)-1,F=0;F0)-(n<0)},e.abs=function(n){var i=n>>t-1;return(n^i)-i},e.min=function(n,i){return i^(n^i)&-(n65535)<<4,n>>>=i,s=(n>255)<<3,n>>>=s,i|=s,s=(n>15)<<2,n>>>=s,i|=s,s=(n>3)<<1,n>>>=s,i|=s,i|n>>1},e.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},e.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function a(n){var i=32;return n&=-n,n&&i--,n&65535&&(i-=16),n&16711935&&(i-=8),n&252645135&&(i-=4),n&858993459&&(i-=2),n&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},e.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},e.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var r=new Array(256);(function(n){for(var i=0;i<256;++i){var s=i,c=i,p=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--p;n[i]=c<>>8&255]<<16|r[n>>>16&255]<<8|r[n>>>24&255]},e.interleave2=function(n,i){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n|i<<1},e.deinterleave2=function(n,i){return n=n>>>i&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},e.interleave3=function(n,i,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},e.deinterleave3=function(n,i){return n=n>>>i&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},e.nextCombination=function(n){var i=n|n-1;return i+1|(~i&-~i)-1>>>a(n)+1}},2014:function(l,e,t){"use strict";"use restrict";var a=t(3105),r=t(4623);function n(h){for(var x=0,_=Math.max,D=0,C=h.length;D>1,I=c(h[F],x);I<=0?(I===0&&(C=F),_=F+1):I>0&&(D=F-1)}return C}e.findCell=y;function o(h,x){for(var _=new Array(h.length),D=0,C=_.length;D=h.length||c(h[Y],F)!==0););}return _}e.incidence=o;function b(h,x){if(!x)return o(d(A(h,0)),h,0);for(var _=new Array(x),D=0;D>>k&1&&R.push(C[k]);x.push(R)}return f(x)}e.explode=M;function A(h,x){if(x<0)return[];for(var _=[],D=(1<>1:(j>>1)-1}function D(j){for(var G=x(j);;){var K=G,H=2*j+1,Z=2*(j+1),X=j;if(H0;){var K=_(j);if(K>=0){var H=x(K);if(G0){var j=R[0];return h(0,N-1),N-=1,D(0),j}return-1}function I(j,G){var K=R[j];return b[K]===G?j:(b[K]=-1/0,C(j),F(),b[K]=G,N+=1,C(N-1))}function z(j){if(!M[j]){M[j]=!0;var G=y[j],K=o[j];y[K]>=0&&(y[K]=G),o[G]>=0&&(o[G]=K),k[G]>=0&&I(k[G],m(G)),k[K]>=0&&I(k[K],m(K))}}for(var R=[],k=new Array(f),A=0;A>1;A>=0;--A)D(A);for(;;){var q=F();if(q<0||b[q]>p)break;z(q)}for(var Y=[],A=0;A=0&&K>=0&&G!==K){var H=k[G],Z=k[K];H!==Z&&ae.push([H,Z])}}),r.unique(r.normalize(ae)),{positions:Y,edges:ae}}},1303:function(l,e,t){"use strict";l.exports=n;var a=t(3250);function r(i,s){var c,p;if(s[0][0]s[1][0])c=s[1],p=s[0];else{var f=Math.min(i[0][1],i[1][1]),d=Math.max(i[0][1],i[1][1]),y=Math.min(s[0][1],s[1][1]),o=Math.max(s[0][1],s[1][1]);return do?f-o:d-o}var b,M;i[0][1]s[1][0])c=s[1],p=s[0];else return r(s,i);var f,d;if(i[0][0]i[1][0])f=i[1],d=i[0];else return-r(i,s);var y=a(c,p,d),o=a(c,p,f);if(y<0){if(o<=0)return y}else if(y>0){if(o>=0)return y}else if(o)return o;if(y=a(d,f,p),o=a(d,f,c),y<0){if(o<=0)return y}else if(y>0){if(o>=0)return y}else if(o)return o;return p[0]-d[0]}},4209:function(l,e,t){"use strict";l.exports=o;var a=t(2478),r=t(3840),n=t(3250),i=t(1303);function s(b,M,A){this.slabs=b,this.coordinates=M,this.horizontal=A}var c=s.prototype;function p(b,M){return b.y-M}function f(b,M){for(var A=null;b;){var E=b.key,g,T;E[0][0]0)if(M[0]!==E[1][0])A=b,b=b.right;else{var h=f(b.right,M);if(h)return h;b=b.left}else{if(M[0]!==E[1][0])return b;var h=f(b.right,M);if(h)return h;b=b.left}}return A}c.castUp=function(b){var M=a.le(this.coordinates,b[0]);if(M<0)return-1;var A=this.slabs[M],E=f(this.slabs[M],b),g=-1;if(E&&(g=E.value),this.coordinates[M]===b[0]){var T=null;if(E&&(T=E.key),M>0){var m=f(this.slabs[M-1],b);m&&(T?i(m.key,T)>0&&(T=m.key,g=m.value):(g=m.value,T=m.key))}var h=this.horizontal[M];if(h.length>0){var x=a.ge(h,b[1],p);if(x=h.length)return g;_=h[x]}}if(_.start)if(T){var D=n(T[0],T[1],[b[0],_.y]);T[0][0]>T[1][0]&&(D=-D),D>0&&(g=_.index)}else g=_.index;else _.y!==b[1]&&(g=_.index)}}}return g};function d(b,M,A,E){this.y=b,this.index=M,this.start=A,this.closed=E}function y(b,M,A,E){this.x=b,this.segment=M,this.create=A,this.index=E}function o(b){for(var M=b.length,A=2*M,E=new Array(A),g=0;g1&&(M=1);for(var A=1-M,E=f.length,g=new Array(E),T=0;T0||b>0&&g<0){var T=i(M,g,A,b);y.push(T),o.push(T.slice())}g<0?o.push(A.slice()):g>0?y.push(A.slice()):(y.push(A.slice()),o.push(A.slice())),b=g}return{positive:y,negative:o}}function c(f,d){for(var y=[],o=n(f[f.length-1],d),b=f[f.length-1],M=f[0],A=0;A0||o>0&&E<0)&&y.push(i(b,E,M,o)),E>=0&&y.push(M.slice()),o=E}return y}function p(f,d){for(var y=[],o=n(f[f.length-1],d),b=f[f.length-1],M=f[0],A=0;A0||o>0&&E<0)&&y.push(i(b,E,M,o)),E<=0&&y.push(M.slice()),o=E}return y}},3387:function(l,e,t){var a;(function(){"use strict";var r={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 n(f){return s(p(f),arguments)}function i(f,d){return n.apply(null,[f].concat(d||[]))}function s(f,d){var y=1,o=f.length,b,M="",A,E,g,T,m,h,x,_;for(A=0;A=0),g.type){case"b":b=parseInt(b,10).toString(2);break;case"c":b=String.fromCharCode(parseInt(b,10));break;case"d":case"i":b=parseInt(b,10);break;case"j":b=JSON.stringify(b,null,g.width?parseInt(g.width):0);break;case"e":b=g.precision?parseFloat(b).toExponential(g.precision):parseFloat(b).toExponential();break;case"f":b=g.precision?parseFloat(b).toFixed(g.precision):parseFloat(b);break;case"g":b=g.precision?String(Number(b.toPrecision(g.precision))):parseFloat(b);break;case"o":b=(parseInt(b,10)>>>0).toString(8);break;case"s":b=String(b),b=g.precision?b.substring(0,g.precision):b;break;case"t":b=String(!!b),b=g.precision?b.substring(0,g.precision):b;break;case"T":b=Object.prototype.toString.call(b).slice(8,-1).toLowerCase(),b=g.precision?b.substring(0,g.precision):b;break;case"u":b=parseInt(b,10)>>>0;break;case"v":b=b.valueOf(),b=g.precision?b.substring(0,g.precision):b;break;case"x":b=(parseInt(b,10)>>>0).toString(16);break;case"X":b=(parseInt(b,10)>>>0).toString(16).toUpperCase();break}r.json.test(g.type)?M+=b:(r.number.test(g.type)&&(!x||g.sign)?(_=x?"+":"-",b=b.toString().replace(r.sign,"")):_="",m=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",h=g.width-(_+b).length,T=g.width&&h>0?m.repeat(h):"",M+=g.align?_+b+T:m==="0"?_+T+b:T+_+b)}return M}var c=Object.create(null);function p(f){if(c[f])return c[f];for(var d=f,y,o=[],b=0;d;){if((y=r.text.exec(d))!==null)o.push(y[0]);else if((y=r.modulo.exec(d))!==null)o.push("%");else if((y=r.placeholder.exec(d))!==null){if(y[2]){b|=1;var M=[],A=y[2],E=[];if((E=r.key.exec(A))!==null)for(M.push(E[1]);(A=A.substring(E[0].length))!=="";)if((E=r.key_access.exec(A))!==null)M.push(E[1]);else if((E=r.index_access.exec(A))!==null)M.push(E[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");y[2]=M}else b|=2;if(b===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:y[0],param_no:y[1],keys:y[2],sign:y[3],pad_char:y[4],align:y[5],width:y[6],precision:y[7],type:y[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");d=d.substring(y[0].length)}return c[f]=o}e.sprintf=n,e.vsprintf=i,typeof window<"u"&&(window.sprintf=n,window.vsprintf=i,a=function(){return{sprintf:n,vsprintf:i}}.call(e,t,e,l),a!==void 0&&(l.exports=a))})()},3711:function(l,e,t){"use strict";l.exports=p;var a=t(2640),r=t(781),n={"2d":function(f,d,y){var o=f({order:d,scalarArguments:3,getters:y==="generic"?[0]:void 0,phase:function(M,A,E,g){return M>g|0},vertex:function(M,A,E,g,T,m,h,x,_,D,C,F,I){var z=(h<<0)+(x<<1)+(_<<2)+(D<<3)|0;if(!(z===0||z===15))switch(z){case 0:C.push([M-.5,A-.5]);break;case 1:C.push([M-.25-.25*(g+E-2*I)/(E-g),A-.25-.25*(T+E-2*I)/(E-T)]);break;case 2:C.push([M-.75-.25*(-g-E+2*I)/(g-E),A-.25-.25*(m+g-2*I)/(g-m)]);break;case 3:C.push([M-.5,A-.5-.5*(T+E+m+g-4*I)/(E-T+g-m)]);break;case 4:C.push([M-.25-.25*(m+T-2*I)/(T-m),A-.75-.25*(-T-E+2*I)/(T-E)]);break;case 5:C.push([M-.5-.5*(g+E+m+T-4*I)/(E-g+T-m),A-.5]);break;case 6:C.push([M-.5-.25*(-g-E+m+T)/(g-E+T-m),A-.5-.25*(-T-E+m+g)/(T-E+g-m)]);break;case 7:C.push([M-.75-.25*(m+T-2*I)/(T-m),A-.75-.25*(m+g-2*I)/(g-m)]);break;case 8:C.push([M-.75-.25*(-m-T+2*I)/(m-T),A-.75-.25*(-m-g+2*I)/(m-g)]);break;case 9:C.push([M-.5-.25*(g+E+-m-T)/(E-g+m-T),A-.5-.25*(T+E+-m-g)/(E-T+m-g)]);break;case 10:C.push([M-.5-.5*(-g-E+-m-T+4*I)/(g-E+m-T),A-.5]);break;case 11:C.push([M-.25-.25*(-m-T+2*I)/(m-T),A-.75-.25*(T+E-2*I)/(E-T)]);break;case 12:C.push([M-.5,A-.5-.5*(-T-E+-m-g+4*I)/(T-E+m-g)]);break;case 13:C.push([M-.75-.25*(g+E-2*I)/(E-g),A-.25-.25*(-m-g+2*I)/(m-g)]);break;case 14:C.push([M-.25-.25*(-g-E+2*I)/(g-E),A-.25-.25*(-T-E+2*I)/(T-E)]);break;case 15:C.push([M-.5,A-.5]);break}},cell:function(M,A,E,g,T,m,h,x,_){T?x.push([M,A]):x.push([A,M])}});return function(b,M){var A=[],E=[];return o(b,A,E,M),{positions:A,cells:E}}}};function i(f,d){var y=f.length+"d",o=n[y];if(o)return o(a,f,d)}function s(f,d){for(var y=r(f,d),o=y.length,b=new Array(o),M=new Array(o),A=0;AMath.max(g,T)?m[2]=1:g>Math.max(E,T)?m[0]=1:m[1]=1;for(var h=0,x=0,_=0;_<3;++_)h+=A[_]*A[_],x+=m[_]*A[_];for(var _=0;_<3;++_)m[_]-=x/h*A[_];return s(m,m),m}function y(A,E,g,T,m,h,x,_){this.center=a(g),this.up=a(T),this.right=a(m),this.radius=a([h]),this.angle=a([x,_]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(A,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 D=0;D<16;++D)this.computedMatrix[D]=.5;this.recalcMatrix(0)}var o=y.prototype;o.setDistanceLimits=function(A,E){A>0?A=Math.log(A):A=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,A),this.radius.bounds[0][0]=A,this.radius.bounds[1][0]=E},o.getDistanceLimits=function(A){var E=this.radius.bounds[0];return A?(A[0]=Math.exp(E[0][0]),A[1]=Math.exp(E[1][0]),A):[Math.exp(E[0][0]),Math.exp(E[1][0])]},o.recalcMatrix=function(A){this.center.curve(A),this.up.curve(A),this.right.curve(A),this.radius.curve(A),this.angle.curve(A);for(var E=this.computedUp,g=this.computedRight,T=0,m=0,h=0;h<3;++h)m+=E[h]*g[h],T+=E[h]*E[h];for(var x=Math.sqrt(T),_=0,h=0;h<3;++h)g[h]-=E[h]*m/T,_+=g[h]*g[h],E[h]/=x;for(var D=Math.sqrt(_),h=0;h<3;++h)g[h]/=D;var C=this.computedToward;i(C,E,g),s(C,C);for(var F=Math.exp(this.computedRadius[0]),I=this.computedAngle[0],z=this.computedAngle[1],R=Math.cos(I),k=Math.sin(I),B=Math.cos(z),N=Math.sin(z),q=this.computedCenter,Y=R*B,ee=k*B,te=N,ae=-R*N,j=-k*N,G=B,K=this.computedEye,H=this.computedMatrix,h=0;h<3;++h){var Z=Y*g[h]+ee*C[h]+te*E[h];H[4*h+1]=ae*g[h]+j*C[h]+G*E[h],H[4*h+2]=Z,H[4*h+3]=0}var X=H[1],$=H[5],Q=H[9],re=H[2],ue=H[6],pe=H[10],ge=$*pe-Q*ue,Te=Q*re-X*pe,Se=X*ue-$*re,Ce=p(ge,Te,Se);ge/=Ce,Te/=Ce,Se/=Ce,H[0]=ge,H[4]=Te,H[8]=Se;for(var h=0;h<3;++h)K[h]=q[h]+H[2+4*h]*F;for(var h=0;h<3;++h){for(var _=0,Ue=0;Ue<3;++Ue)_+=H[h+4*Ue]*K[Ue];H[12+h]=-_}H[15]=1},o.getMatrix=function(A,E){this.recalcMatrix(A);var g=this.computedMatrix;if(E){for(var T=0;T<16;++T)E[T]=g[T];return E}return g};var b=[0,0,0];o.rotate=function(A,E,g,T){if(this.angle.move(A,E,g),T){this.recalcMatrix(A);var m=this.computedMatrix;b[0]=m[2],b[1]=m[6],b[2]=m[10];for(var h=this.computedUp,x=this.computedRight,_=this.computedToward,D=0;D<3;++D)m[4*D]=h[D],m[4*D+1]=x[D],m[4*D+2]=_[D];n(m,m,T,b);for(var D=0;D<3;++D)h[D]=m[4*D],x[D]=m[4*D+1];this.up.set(A,h[0],h[1],h[2]),this.right.set(A,x[0],x[1],x[2])}},o.pan=function(A,E,g,T){E=E||0,g=g||0,T=T||0,this.recalcMatrix(A);var m=this.computedMatrix,h=Math.exp(this.computedRadius[0]),x=m[1],_=m[5],D=m[9],C=p(x,_,D);x/=C,_/=C,D/=C;var F=m[0],I=m[4],z=m[8],R=F*x+I*_+z*D;F-=x*R,I-=_*R,z-=D*R;var k=p(F,I,z);F/=k,I/=k,z/=k;var B=F*E+x*g,N=I*E+_*g,q=z*E+D*g;this.center.move(A,B,N,q);var Y=Math.exp(this.computedRadius[0]);Y=Math.max(1e-4,Y+T),this.radius.set(A,Math.log(Y))},o.translate=function(A,E,g,T){this.center.move(A,E||0,g||0,T||0)},o.setMatrix=function(A,E,g,T){var m=1;typeof g=="number"&&(m=g|0),(m<0||m>3)&&(m=1);var h=(m+2)%3,x=(m+1)%3;E||(this.recalcMatrix(A),E=this.computedMatrix);var _=E[m],D=E[m+4],C=E[m+8];if(T){var I=Math.abs(_),z=Math.abs(D),R=Math.abs(C),k=Math.max(I,z,R);I===k?(_=_<0?-1:1,D=C=0):R===k?(C=C<0?-1:1,_=D=0):(D=D<0?-1:1,_=C=0)}else{var F=p(_,D,C);_/=F,D/=F,C/=F}var B=E[h],N=E[h+4],q=E[h+8],Y=B*_+N*D+q*C;B-=_*Y,N-=D*Y,q-=C*Y;var ee=p(B,N,q);B/=ee,N/=ee,q/=ee;var te=D*q-C*N,ae=C*B-_*q,j=_*N-D*B,G=p(te,ae,j);te/=G,ae/=G,j/=G,this.center.jump(A,se,ne,be),this.radius.idle(A),this.up.jump(A,_,D,C),this.right.jump(A,B,N,q);var K,H;if(m===2){var Z=E[1],X=E[5],$=E[9],Q=Z*B+X*N+$*q,re=Z*te+X*ae+$*j;Te<0?K=-Math.PI/2:K=Math.PI/2,H=Math.atan2(re,Q)}else{var ue=E[2],pe=E[6],ge=E[10],Te=ue*_+pe*D+ge*C,Se=ue*B+pe*N+ge*q,Ce=ue*te+pe*ae+ge*j;K=Math.asin(f(Te)),H=Math.atan2(Ce,Se)}this.angle.jump(A,H,K),this.recalcMatrix(A);var Ue=E[2],Oe=E[6],_e=E[10],ce=this.computedMatrix;r(ce,E);var ie=ce[15],se=ce[12]/ie,ne=ce[13]/ie,be=ce[14]/ie,De=Math.exp(this.computedRadius[0]);this.center.jump(A,se-Ue*De,ne-Oe*De,be-_e*De)},o.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},o.idle=function(A){this.center.idle(A),this.up.idle(A),this.right.idle(A),this.radius.idle(A),this.angle.idle(A)},o.flush=function(A){this.center.flush(A),this.up.flush(A),this.right.flush(A),this.radius.flush(A),this.angle.flush(A)},o.setDistance=function(A,E){E>0&&this.radius.set(A,Math.log(E))},o.lookAt=function(A,E,g,T){this.recalcMatrix(A),E=E||this.computedEye,g=g||this.computedCenter,T=T||this.computedUp;var m=T[0],h=T[1],x=T[2],_=p(m,h,x);if(!(_<1e-6)){m/=_,h/=_,x/=_;var D=E[0]-g[0],C=E[1]-g[1],F=E[2]-g[2],I=p(D,C,F);if(!(I<1e-6)){D/=I,C/=I,F/=I;var z=this.computedRight,R=z[0],k=z[1],B=z[2],N=m*R+h*k+x*B;R-=N*m,k-=N*h,B-=N*x;var q=p(R,k,B);if(!(q<.01&&(R=h*F-x*C,k=x*D-m*F,B=m*C-h*D,q=p(R,k,B),q<1e-6))){R/=q,k/=q,B/=q,this.up.set(A,m,h,x),this.right.set(A,R,k,B),this.center.set(A,g[0],g[1],g[2]),this.radius.set(A,Math.log(I));var Y=h*B-x*k,ee=x*R-m*B,te=m*k-h*R,ae=p(Y,ee,te);Y/=ae,ee/=ae,te/=ae;var j=m*D+h*C+x*F,G=R*D+k*C+B*F,K=Y*D+ee*C+te*F,H=Math.asin(f(j)),Z=Math.atan2(K,G),X=this.angle._state,$=X[X.length-1],Q=X[X.length-2];$=$%(2*Math.PI);var re=Math.abs($+2*Math.PI-Z),ue=Math.abs($-Z),pe=Math.abs($-2*Math.PI-Z);re0?B.pop():new ArrayBuffer(R)}e.mallocArrayBuffer=b;function M(z){return new Uint8Array(b(z),0,z)}e.mallocUint8=M;function A(z){return new Uint16Array(b(2*z),0,z)}e.mallocUint16=A;function E(z){return new Uint32Array(b(4*z),0,z)}e.mallocUint32=E;function g(z){return new Int8Array(b(z),0,z)}e.mallocInt8=g;function T(z){return new Int16Array(b(2*z),0,z)}e.mallocInt16=T;function m(z){return new Int32Array(b(4*z),0,z)}e.mallocInt32=m;function h(z){return new Float32Array(b(4*z),0,z)}e.mallocFloat32=e.mallocFloat=h;function x(z){return new Float64Array(b(8*z),0,z)}e.mallocFloat64=e.mallocDouble=x;function _(z){return i?new Uint8ClampedArray(b(z),0,z):M(z)}e.mallocUint8Clamped=_;function D(z){return s?new BigUint64Array(b(8*z),0,z):null}e.mallocBigUint64=D;function C(z){return c?new BigInt64Array(b(8*z),0,z):null}e.mallocBigInt64=C;function F(z){return new DataView(b(z),0,z)}e.mallocDataView=F;function I(z){z=a.nextPow2(z);var R=a.log2(z),k=d[R];return k.length>0?k.pop():new n(z)}e.mallocBuffer=I,e.clearCache=function(){for(var R=0;R<32;++R)p.UINT8[R].length=0,p.UINT16[R].length=0,p.UINT32[R].length=0,p.INT8[R].length=0,p.INT16[R].length=0,p.INT32[R].length=0,p.FLOAT[R].length=0,p.DOUBLE[R].length=0,p.BIGUINT64[R].length=0,p.BIGINT64[R].length=0,p.UINT8C[R].length=0,f[R].length=0,d[R].length=0}},1755:function(l){"use strict";"use restrict";l.exports=e;function e(a){this.roots=new Array(a),this.ranks=new Array(a);for(var r=0;r",B="",N=k.length,q=B.length,Y=I[0]===b||I[0]===E,ee=0,te=-q;ee>-1&&(ee=z.indexOf(k,ee),!(ee===-1||(te=z.indexOf(B,ee+N),te===-1)||te<=ee));){for(var ae=ee;ae=te)R[ae]=null,z=z.substr(0,ae)+" "+z.substr(ae+1);else if(R[ae]!==null){var j=R[ae].indexOf(I[0]);j===-1?R[ae]+=I:Y&&(R[ae]=R[ae].substr(0,j+1)+(1+parseInt(R[ae][j+1]))+R[ae].substr(j+2))}var G=ee+N,K=z.substr(G,te-G),H=K.indexOf(k);H!==-1?ee=H:ee=te+q}return R}function m(F,I,z){for(var R=I.textAlign||"start",k=I.textBaseline||"alphabetic",B=[1<<30,1<<30],N=[0,0],q=F.length,Y=0;Y/g,` -`):z=z.replace(/\/g," ");var N="",q=[];for($=0;$-1?parseInt(ne[1+qe]):0,ot=Ne>-1?parseInt(be[1+Ne]):0;ut!==ot&&(De=De.replace(Se(),"?px "),ue*=Math.pow(.75,ot-ut),De=De.replace("?px ",Se())),re+=.25*j*(ot-ut)}if(B.superscripts===!0){var yt=ne.indexOf(b),At=be.indexOf(b),It=yt>-1?parseInt(ne[1+yt]):0,Zt=At>-1?parseInt(be[1+At]):0;It!==Zt&&(De=De.replace(Se(),"?px "),ue*=Math.pow(.75,Zt-It),De=De.replace("?px ",Se())),re-=.25*j*(Zt-It)}if(B.bolds===!0){var vr=ne.indexOf(f)>-1,Ut=be.indexOf(f)>-1;!vr&&Ut&&(Jt?De=De.replace("italic ","italic bold "):De="bold "+De),vr&&!Ut&&(De=De.replace("bold ",""))}if(B.italics===!0){var Jt=ne.indexOf(y)>-1,at=be.indexOf(y)>-1;!Jt&&at&&(De="italic "+De),Jt&&!at&&(De=De.replace("italic ",""))}I.font=De}for(X=0;X0&&(k=R.size),R.lineSpacing&&R.lineSpacing>0&&(B=R.lineSpacing),R.styletags&&R.styletags.breaklines&&(N.breaklines=!!R.styletags.breaklines),R.styletags&&R.styletags.bolds&&(N.bolds=!!R.styletags.bolds),R.styletags&&R.styletags.italics&&(N.italics=!!R.styletags.italics),R.styletags&&R.styletags.subscripts&&(N.subscripts=!!R.styletags.subscripts),R.styletags&&R.styletags.superscripts&&(N.superscripts=!!R.styletags.superscripts)),z.font=[R.fontStyle,R.fontVariant,R.fontWeight,k+"px",R.font].filter(function(Y){return Y}).join(" "),z.textAlign="start",z.textBaseline="alphabetic",z.direction="ltr";var q=h(I,z,F,k,B,N);return D(q,R,k)}},1538:function(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(_){_.permitHostObjects___&&_.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var a=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new r,i=Object.freeze({});if(n.set(i,1),n.get(i)!==1)a=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,p=Object.defineProperty,f=Object.isExtensible,d="weakmap:",y=d+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var o=new ArrayBuffer(25),b=new Uint8Array(o);crypto.getRandomValues(b),y=d+"rand:"+Array.prototype.map.call(b,function(_){return(_%36).toString(36)}).join("")+"___"}function M(_){return!(_.substr(0,d.length)==d&&_.substr(_.length-3)==="___")}if(p(Object,"getOwnPropertyNames",{value:function(D){return c(D).filter(M)}}),"getPropertyNames"in Object){var A=Object.getPropertyNames;p(Object,"getPropertyNames",{value:function(D){return A(D).filter(M)}})}function E(_){if(_!==Object(_))throw new TypeError("Not an object: "+_);var D=_[y];if(D&&D.key===_)return D;if(f(_)){D={key:_};try{return p(_,y,{value:D,writable:!1,enumerable:!1,configurable:!1}),D}catch{return}}}(function(){var _=Object.freeze;p(Object,"freeze",{value:function(I){return E(I),_(I)}});var D=Object.seal;p(Object,"seal",{value:function(I){return E(I),D(I)}});var C=Object.preventExtensions;p(Object,"preventExtensions",{value:function(I){return E(I),C(I)}})})();function g(_){return _.prototype=null,Object.freeze(_)}var T=!1;function m(){!T&&typeof console<"u"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var h=0,x=function(){this instanceof x||m();var _=[],D=[],C=h++;function F(k,B){var N,q=E(k);return q?C in q?q[C]:B:(N=_.indexOf(k),N>=0?D[N]:B)}function I(k){var B=E(k);return B?C in B:_.indexOf(k)>=0}function z(k,B){var N,q=E(k);return q?q[C]=B:(N=_.indexOf(k),N>=0?D[N]=B:(N=_.length,D[N]=B,_[N]=k)),this}function R(k){var B=E(k),N,q;return B?C in B&&delete B[C]:(N=_.indexOf(k),N<0?!1:(q=_.length-1,_[N]=void 0,D[N]=D[q],_[N]=_[q],_.length=q,D.length=q,!0))}return Object.create(x.prototype,{get___:{value:g(F)},has___:{value:g(I)},set___:{value:g(z)},delete___:{value:g(R)}})};x.prototype=Object.create(Object.prototype,{get:{value:function(D,C){return this.get___(D,C)},writable:!0,configurable:!0},has:{value:function(D){return this.has___(D)},writable:!0,configurable:!0},set:{value:function(D,C){return this.set___(D,C)},writable:!0,configurable:!0},delete:{value:function(D){return this.delete___(D)},writable:!0,configurable:!0}}),typeof r=="function"?function(){a&&typeof Proxy<"u"&&(Proxy=void 0);function _(){this instanceof x||m();var D=new r,C=void 0,F=!1;function I(B,N){return C?D.has(B)?D.get(B):C.get___(B,N):D.get(B,N)}function z(B){return D.has(B)||(C?C.has___(B):!1)}var R;a?R=function(B,N){return D.set(B,N),D.has(B)||(C||(C=new x),C.set(B,N)),this}:R=function(B,N){if(F)try{D.set(B,N)}catch{C||(C=new x),C.set___(B,N)}else D.set(B,N);return this};function k(B){var N=!!D.delete(B);return C&&C.delete___(B)||N}return Object.create(x.prototype,{get___:{value:g(I)},has___:{value:g(z)},set___:{value:g(R)},delete___:{value:g(k)},permitHostObjects___:{value:g(function(B){if(B===t)F=!0;else throw new Error("bogus call to permitHostObjects___")})}})}_.prototype=x.prototype,l.exports=_,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=x)})()},236:function(l,e,t){var a=t(8284);l.exports=r;function r(){var n={};return function(i){if((typeof i!="object"||i===null)&&typeof i!="function")throw new Error("Weakmap-shim: Key must be object");var s=i.valueOf(n);return s&&s.identity===n?s:a(i,n)}}},8284:function(l){l.exports=e;function e(t,a){var r={identity:a},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(i){return i!==a?n.apply(this,arguments):r},writable:!0}),r}},606:function(l,e,t){var a=t(236);l.exports=r;function r(){var n=a();return{get:function(i,s){var c=n(i);return c.hasOwnProperty("value")?c.value:s},set:function(i,s){return n(i).value=s,this},has:function(i){return"value"in n(i)},delete:function(i){return delete n(i).value}}}},3349:function(l){"use strict";function e(){return function(s,c,p,f,d,y){var o=s[0],b=p[0],M=[0],A=b;f|=0;var E=0,g=b;for(E=0;E=0!=m>=0&&d.push(M[0]+.5+.5*(T+m)/(T-m))}f+=g,++M[0]}}}function t(){return e()}var a=t;function r(s){var c={};return function(f,d,y){var o=f.dtype,b=f.order,M=[o,b.join()].join(),A=c[M];return A||(c[M]=A=s([o,b])),A(f.shape.slice(0),f.data,f.stride,f.offset|0,d,y)}}function n(s){return r(a.bind(void 0,s))}function i(s){return n({funcName:s.funcName})}l.exports=i({funcName:"zeroCrossings"})},781:function(l,e,t){"use strict";l.exports=r;var a=t(3349);function r(n,i){var s=[];return i=+i||0,a(n.hi(n.shape[0]-1),s,i),s}},7790:function(){}},v={};function w(l){var e=v[l];if(e!==void 0)return e.exports;var t=v[l]={id:l,loaded:!1,exports:{}};return u[l].call(t.exports,t,t.exports,w),t.loaded=!0,t.exports}(function(){w.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){w.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var S=w(1964);O.exports=S})()}}),z2=xe({"node_modules/color-name/index.js"(U,O){"use strict";O.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]}}}),Jk=xe({"node_modules/color-normalize/node_modules/color-parse/index.js"(U,O){"use strict";var u=z2();O.exports=w;var v={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function w(S){var l,e=[],t=1,a;if(typeof S=="string")if(S=S.toLowerCase(),u[S])e=u[S].slice(),a="rgb";else if(S==="transparent")t=0,a="rgb",e=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var r=S.slice(1),n=r.length,i=n<=4;t=1,i?(e=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],n===4&&(t=parseInt(r[3]+r[3],16)/255)):(e=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],n===8&&(t=parseInt(r[6]+r[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),a="rgb"}else if(l=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var s=l[1],c=s==="rgb",r=s.replace(/a$/,"");a=r;var n=r==="cmyk"?4:r==="gray"?1:3;e=l[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(d,y){if(/%$/.test(d))return y===n?parseFloat(d)/100:r==="rgb"?parseFloat(d)*255/100:parseFloat(d);if(r[y]==="h"){if(/deg$/.test(d))return parseFloat(d);if(v[d]!==void 0)return v[d]}return parseFloat(d)}),s===r&&e.push(1),t=c||e[n]===void 0?1:e[n],e=e.slice(0,n)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(e=S.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),a=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(e=[S[0],S[1],S[2]],a="rgb",t=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(a="rgb",e=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(a="hsl",e=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),t=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(t/=100)):(a="rgb",e=[S>>>16,(S&65280)>>>8,S&255]);return{space:a,values:e,alpha:t}}}}),Qk=xe({"node_modules/color-normalize/node_modules/color-rgba/index.js"(U,O){"use strict";var u=Jk();O.exports=function(S){Array.isArray(S)&&S.raw&&(S=String.raw.apply(null,arguments));var l,e,t,a=u(S);if(!a.space)return[];var r=[0,0,0],n=a.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(a.values[0],r[0]),n[0]),l[1]=Math.min(Math.max(a.values[1],r[1]),n[1]),l[2]=Math.min(Math.max(a.values[2],r[2]),n[2]),a.space[0]==="h"&&(l=v(l)),l.push(Math.min(Math.max(a.alpha,0),1)),l};function v(w){var S=w[0]/360,l=w[1]/100,e=w[2]/100,t,a,r,n,i,s=0;if(l===0)return i=e*255,[i,i,i];for(a=e<.5?e*(1+l):e+l-e*l,t=2*e-a,n=[0,0,0];s<3;)r=S+1/3*-(s-1),r<0?r++:r>1&&r--,i=6*r<1?t+(a-t)*6*r:2*r<1?a:3*r<2?t+(a-t)*(2/3-r)*6:t,n[s++]=i*255;return n}}}),$0=xe({"node_modules/clamp/index.js"(U,O){O.exports=u;function u(v,w,S){return wS?S:v:vw?w:v}}}),I1=xe({"node_modules/dtype/index.js"(U,O){O.exports=function(u){switch(u){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}}}}),Xd=xe({"node_modules/color-normalize/index.js"(U,O){"use strict";var u=Qk(),v=$0(),w=I1();O.exports=function(e,t){(t==="float"||!t)&&(t="array"),t==="uint"&&(t="uint8"),t==="uint_clamped"&&(t="uint8_clamped");var a=w(t),r=new a(4),n=t!=="uint8"&&t!=="uint8_clamped";return(!e.length||typeof e=="string")&&(e=u(e),e[0]/=255,e[1]/=255,e[2]/=255),S(e)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3]!=null?e[3]:255,n&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(n?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3]!=null?e[3]:1):(r[0]=v(Math.floor(e[0]*255),0,255),r[1]=v(Math.floor(e[1]*255),0,255),r[2]=v(Math.floor(e[2]*255),0,255),r[3]=e[3]==null?255:v(Math.floor(e[3]*255),0,255)),r)};function S(l){return!!(l instanceof Uint8Array||l instanceof Uint8ClampedArray||Array.isArray(l)&&(l[0]>1||l[0]===0)&&(l[1]>1||l[1]===0)&&(l[2]>1||l[2]===0)&&(!l[3]||l[3]>1))}}}),gd=xe({"src/lib/str2rgbarray.js"(U,O){"use strict";var u=Xd();function v(w){return w?u(w):[0,0,0,1]}O.exports=v}}),yd=xe({"src/lib/gl_format_color.js"(U,O){"use strict";var u=yn(),v=Xd(),w=Bl(),S=wi(),l=sc().defaultLine,e=rs().isArrayOrTypedArray,t=v(l),a=1;function r(p,f){var d=p;return d[3]*=f,d}function n(p){if(u(p))return t;var f=v(p);return f.length?f:t}function i(p){return u(p)?p:a}function s(p,f,d){var y=p.color;y&&y._inputArray&&(y=y._inputArray);var o=e(y),b=e(f),M=w.extractOpts(p),A=[],E,g,T,m,h;if(M.colorscale!==void 0?E=w.makeColorScaleFuncFromTrace(p):E=n,o?g=function(_,D){return _[D]===void 0?t:v(E(_[D]))}:g=n,b?T=function(_,D){return _[D]===void 0?a:i(_[D])}:T=i,o||b)for(var x=0;x0){var d=a.c2l(p);a._lowerLogErrorBound||(a._lowerLogErrorBound=d),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,d)}}else n[i]=[-s[0]*t,s[1]*t]}return n}function w(l){for(var e=0;e-1?-1:D.indexOf("right")>-1?1:0}function M(D){return D==null?0:D.indexOf("top")>-1?-1:D.indexOf("bottom")>-1?1:0}function A(D){var C=0,F=0,I=[C,F];if(Array.isArray(D))for(var z=0;z=0){var q=y(B.position,B.delaunayColor,B.delaunayAxis);q.opacity=D.opacity,this.delaunayMesh?this.delaunayMesh.update(q):(q.gl=C,this.delaunayMesh=S(q),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},d.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function _(D,C){var F=new f(D,C.uid);return F.update(C),F}O.exports=_}}),N2=xe({"src/traces/scatter3d/attributes.js"(U,O){"use strict";var u=wu(),v=vl(),w=pl(),S=Kl().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=js(),a=Rs(),r=B2(),n=D1(),i=oo().extendFlat,s=Hl().overrideAll,c=(vv(),Ta(Id)).default,p=u.line,f=u.marker,d=f.line,y=i({width:p.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},w("line"));function o(M){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var b=O.exports=s({x:u.x,y:u.y,z:{valType:"data_array"},text:i({},u.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:i({},u.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z"),mode:i({},u.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:o("x"),y:o("y"),z:o("z")},connectgaps:u.connectgaps,line:y,marker:i({symbol:{valType:"enumerated",values:c(n),dflt:"circle",arrayOk:!0},size:i({},f.size,{dflt:8}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:i({},f.opacity,{arrayOk:!1}),colorbar:f.colorbar,line:i({width:i({},d.width,{arrayOk:!1})},w("marker.line"))},w("marker")),textposition:i({},u.textposition,{dflt:"top center"}),textfont:v({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:a.opacity,hoverinfo:i({},a.hoverinfo)},"calc","nested");b.x.editType=b.y.editType=b.z.editType="calc+clearAxisTypes"}}),r4=xe({"src/traces/scatter3d/defaults.js"(U,O){"use strict";var u=Ci(),v=Sr(),w=Cl(),S=hh(),l=Eh(),e=kh(),t=N2();O.exports=function(n,i,s,c){function p(E,g){return v.coerce(n,i,t,E,g)}var f=a(n,i,p,c);if(!f){i.visible=!1;return}p("text"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback"),p("xhoverformat"),p("yhoverformat"),p("zhoverformat"),p("mode"),w.hasMarkers(i)&&S(n,i,s,c,p,{noAngle:!0,noLineDash:!0,noSelect:!0}),w.hasLines(i)&&(p("connectgaps"),l(n,i,s,c,p)),w.hasText(i)&&(p("texttemplate"),p("texttemplatefallback"),e(n,i,c,p,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var d=(i.line||{}).color,y=(i.marker||{}).color;p("surfaceaxis")>=0&&p("surfacecolor",d||y);for(var o=["x","y","z"],b=0;b<3;++b){var M="projection."+o[b];p(M+".show")&&(p(M+".opacity"),p(M+".scale"))}var A=u.getComponentMethod("errorbars","supplyDefaults");A(n,i,d||y||s,{axis:"z"}),A(n,i,d||y||s,{axis:"y",inherit:"z"}),A(n,i,d||y||s,{axis:"x",inherit:"z"})};function a(r,n,i,s){var c=0,p=i("x"),f=i("y"),d=i("z"),y=u.getComponentMethod("calendars","handleTraceDefaults");return y(r,n,["x","y","z"],s),p&&f&&d&&(c=Math.min(p.length,f.length,d.length),n._length=n._xlength=n._ylength=n._zlength=c),c}}}),a4=xe({"src/traces/scatter3d/calc.js"(U,O){"use strict";var u=Hh(),v=dh();O.exports=function(S,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return u(e,l),v(S,l),e}}}),n4=xe({"node_modules/get-canvas-context/index.js"(U,O){O.exports=u;function u(v,w){if(typeof v!="string")throw new TypeError("must specify type string");if(w=w||{},typeof document>"u"&&!w.canvas)return null;var S=w.canvas||document.createElement("canvas");typeof w.width=="number"&&(S.width=w.width),typeof w.height=="number"&&(S.height=w.height);var l=w,e;try{var t=[v];v.indexOf("webgl")===0&&t.push("experimental-"+v);for(var a=0;a/g," "));i[s]=d,c.tickmode=p}}a.ticks=i;for(var s=0;s<3;++s){S[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var y=0;y<2;++y)a.bounds[y][s]=t.glplot.bounds[y][s]}t.contourLevels=l(i)}}}),u4=xe({"src/plots/gl3d/scene.js"(U,O){"use strict";var u=Jc().gl_plot3d,v=u.createCamera,w=u.createScene,S=i4(),l=Ym(),e=Ci(),t=Sr(),a=t.preserveDrawingBuffer(),r=uo(),n=hu(),i=gd(),s=O2(),c=Z_(),p=o4(),f=s4(),d=l4(),y=Ah().applyAutorangeOptions,o,b,M=!1;function A(F,I){var z=document.createElement("div"),R=F.container;this.graphDiv=F.graphDiv;var k=document.createElementNS("http://www.w3.org/2000/svg","svg");k.style.position="absolute",k.style.top=k.style.left="0px",k.style.width=k.style.height="100%",k.style["z-index"]=20,k.style["pointer-events"]="none",z.appendChild(k),this.svgContainer=k,z.id=F.id,z.style.position="absolute",z.style.top=z.style.left="0px",z.style.width=z.style.height="100%",R.appendChild(z),this.fullLayout=I,this.id=F.id||"scene",this.fullSceneLayout=I[this.id],this.plotArgs=[[],{},{}],this.axesOptions=p(I,I[this.id]),this.spikeOptions=f(I[this.id]),this.container=z,this.staticMode=!!F.staticPlot,this.pixelRatio=this.pixelRatio||F.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var E=A.prototype;E.prepareOptions=function(){var F=this,I={canvas:F.canvas,gl:F.gl,glOptions:{preserveDrawingBuffer:a,premultipliedAlpha:!0,antialias:!0},container:F.container,axes:F.axesOptions,spikes:F.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:F.camera,pixelRatio:F.pixelRatio};if(F.staticMode){if(!b&&(o=document.createElement("canvas"),b=S({canvas:o,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!b))throw new Error("error creating static canvas/context for image server");I.gl=b,I.canvas=o}return I};var g=!0;E.tryCreatePlot=function(){var F=this,I=F.prepareOptions(),z=!0;try{F.glplot=w(I)}catch{if(F.staticMode||!g||a)z=!1;else{t.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{a=I.glOptions.preserveDrawingBuffer=!0,F.glplot=w(I)}catch{a=I.glOptions.preserveDrawingBuffer=!1,z=!1}}}return g=!1,z},E.initializeGLCamera=function(){var F=this,I=F.fullSceneLayout.camera,z=I.projection.type==="orthographic";F.camera=v(F.container,{center:[I.center.x,I.center.y,I.center.z],eye:[I.eye.x,I.eye.y,I.eye.z],up:[I.up.x,I.up.y,I.up.z],_ortho:z,zoomMin:.01,zoomMax:100,mode:"orbit"})},E.initializeGLPlot=function(){var F=this;F.initializeGLCamera();var I=F.tryCreatePlot();if(!I)return s(F);F.traces={},F.make4thDimension();var z=F.graphDiv,R=z.layout,k=function(){var N={};return F.isCameraChanged(R)&&(N[F.id+".camera"]=F.getCamera()),F.isAspectChanged(R)&&(N[F.id+".aspectratio"]=F.glplot.getAspectratio(),R[F.id].aspectmode!=="manual"&&(F.fullSceneLayout.aspectmode=R[F.id].aspectmode=N[F.id+".aspectmode"]="manual")),N},B=function(N){if(N.fullSceneLayout.dragmode!==!1){var q=k();N.saveLayout(R),N.graphDiv.emit("plotly_relayout",q)}};return F.glplot.canvas&&(F.glplot.canvas.addEventListener("mouseup",function(){B(F)}),F.glplot.canvas.addEventListener("touchstart",function(){M=!0}),F.glplot.canvas.addEventListener("wheel",function(N){if(z._context._scrollZoom.gl3d){if(F.camera._ortho){var q=N.deltaX>N.deltaY?1.1:.9090909090909091,Y=F.glplot.getAspectratio();F.glplot.setAspectratio({x:q*Y.x,y:q*Y.y,z:q*Y.z})}B(F)}},l?{passive:!1}:!1),F.glplot.canvas.addEventListener("mousemove",function(){if(F.fullSceneLayout.dragmode!==!1&&F.camera.mouseListener.buttons!==0){var N=k();F.graphDiv.emit("plotly_relayouting",N)}}),F.staticMode||F.glplot.canvas.addEventListener("webglcontextlost",function(N){z&&z.emit&&z.emit("plotly_webglcontextlost",{event:N,layer:F.id})},!1)),F.glplot.oncontextloss=function(){F.recoverContext()},F.glplot.onrender=function(){F.render()},!0},E.render=function(){var F=this,I=F.graphDiv,z,R=F.svgContainer,k=F.container.getBoundingClientRect();I._fullLayout._calcInverseTransform(I);var B=I._fullLayout._invScaleX,N=I._fullLayout._invScaleY,q=k.width*B,Y=k.height*N;R.setAttributeNS(null,"viewBox","0 0 "+q+" "+Y),R.setAttributeNS(null,"width",q),R.setAttributeNS(null,"height",Y),d(F),F.glplot.axes.update(F.axesOptions);for(var ee=Object.keys(F.traces),te=null,ae=F.glplot.selection,j=0;j")):z.type==="isosurface"||z.type==="volume"?(X.valueLabel=r.hoverLabelText(F._mockAxis,F._mockAxis.d2l(ae.traceCoordinate[3]),z.valuehoverformat),pe.push("value: "+X.valueLabel),ae.textLabel&&pe.push(ae.textLabel),ue=pe.join("
")):ue=ae.textLabel;var ge={x:ae.traceCoordinate[0],y:ae.traceCoordinate[1],z:ae.traceCoordinate[2],data:H._input,fullData:H,curveNumber:H.index,pointNumber:Z};n.appendArrayPointValue(ge,H,Z),z._module.eventData&&(ge=H._module.eventData(ge,ae,H,{},Z));var Te={points:[ge]};if(F.fullSceneLayout.hovermode){var Se=[];n.loneHover({trace:H,x:(.5+.5*K[0]/K[3])*q,y:(.5-.5*K[1]/K[3])*Y,xLabel:X.xLabel,yLabel:X.yLabel,zLabel:X.zLabel,text:ue,name:te.name,color:n.castHoverOption(H,Z,"bgcolor")||te.color,borderColor:n.castHoverOption(H,Z,"bordercolor"),fontFamily:n.castHoverOption(H,Z,"font.family"),fontSize:n.castHoverOption(H,Z,"font.size"),fontColor:n.castHoverOption(H,Z,"font.color"),nameLength:n.castHoverOption(H,Z,"namelength"),textAlign:n.castHoverOption(H,Z,"align"),hovertemplate:t.castOption(H,Z,"hovertemplate"),hovertemplateLabels:t.extendFlat({},ge,X),eventData:[ge]},{container:R,gd:I,inOut_bbox:Se}),ge.bbox=Se[0]}ae.distance<5&&(ae.buttons||M)?I.emit("plotly_click",Te):I.emit("plotly_hover",Te),this.oldEventData=Te}else n.loneUnhover(R),this.oldEventData&&I.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;F.drawAnnotations(F)},E.recoverContext=function(){var F=this;F.glplot.dispose();var I=function(){if(F.glplot.gl.isContextLost()){requestAnimationFrame(I);return}if(!F.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}F.plot.apply(F,F.plotArgs)};requestAnimationFrame(I)};var T=["xaxis","yaxis","zaxis"];function m(F,I,z){for(var R=F.fullSceneLayout,k=0;k<3;k++){var B=T[k],N=B.charAt(0),q=R[B],Y=I[N],ee=I[N+"calendar"],te=I["_"+N+"length"];if(!t.isArrayOrTypedArray(Y))z[0][k]=Math.min(z[0][k],0),z[1][k]=Math.max(z[1][k],te-1);else for(var ae,j=0;j<(te||Y.length);j++)if(t.isArrayOrTypedArray(Y[j]))for(var G=0;GH[1][N])H[0][N]=-1,H[1][N]=1;else{var Ue=H[1][N]-H[0][N];H[0][N]-=Ue/32,H[1][N]+=Ue/32}if($=[H[0][N],H[1][N]],$=y($,Y),H[0][N]=$[0],H[1][N]=$[1],Y.isReversed()){var Oe=H[0][N];H[0][N]=H[1][N],H[1][N]=Oe}}else $=Y.range,H[0][N]=Y.r2l($[0]),H[1][N]=Y.r2l($[1]);H[0][N]===H[1][N]&&(H[0][N]-=1,H[1][N]+=1),Z[N]=H[1][N]-H[0][N],Y.range=[H[0][N],H[1][N]],Y.limitRange(),R.glplot.setBounds(N,{min:Y.range[0]*G[N],max:Y.range[1]*G[N]})}var _e,ce=te.aspectmode;if(ce==="cube")_e=[1,1,1];else if(ce==="manual"){var ie=te.aspectratio;_e=[ie.x,ie.y,ie.z]}else if(ce==="auto"||ce==="data"){var se=[1,1,1];for(N=0;N<3;++N){Y=te[T[N]],ee=Y.type;var ne=X[ee];se[N]=Math.pow(ne.acc,1/ne.count)/G[N]}ce==="data"||Math.max.apply(null,se)/Math.min.apply(null,se)<=4?_e=se:_e=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");te.aspectratio.x=ae.aspectratio.x=_e[0],te.aspectratio.y=ae.aspectratio.y=_e[1],te.aspectratio.z=ae.aspectratio.z=_e[2],R.glplot.setAspectratio(te.aspectratio),R.viewInitial.aspectratio||(R.viewInitial.aspectratio={x:te.aspectratio.x,y:te.aspectratio.y,z:te.aspectratio.z}),R.viewInitial.aspectmode||(R.viewInitial.aspectmode=te.aspectmode);var be=te.domain||null,De=I._size||null;if(be&&De){var qe=R.container.style;qe.position="absolute",qe.left=De.l+be.x[0]*De.w+"px",qe.top=De.t+(1-be.y[1])*De.h+"px",qe.width=De.w*(be.x[1]-be.x[0])+"px",qe.height=De.h*(be.y[1]-be.y[0])+"px"}R.glplot.redraw()}},E.destroy=function(){var F=this;F.glplot&&(F.camera.mouseListener.enabled=!1,F.container.removeEventListener("wheel",F.camera.wheelListener),F.camera=null,F.glplot.dispose(),F.container.parentNode.removeChild(F.container),F.glplot=null)};function x(F){return[[F.eye.x,F.eye.y,F.eye.z],[F.center.x,F.center.y,F.center.z],[F.up.x,F.up.y,F.up.z]]}function _(F){return{up:{x:F.up[0],y:F.up[1],z:F.up[2]},center:{x:F.center[0],y:F.center[1],z:F.center[2]},eye:{x:F.eye[0],y:F.eye[1],z:F.eye[2]},projection:{type:F._ortho===!0?"orthographic":"perspective"}}}E.getCamera=function(){var F=this;return F.camera.view.recalcMatrix(F.camera.view.lastT()),_(F.camera)},E.setViewport=function(F){var I=this,z=F.camera;I.camera.lookAt.apply(this,x(z)),I.glplot.setAspectratio(F.aspectratio);var R=z.projection.type==="orthographic",k=I.camera._ortho;R!==k&&(I.glplot.redraw(),I.glplot.clearRGBA(),I.glplot.dispose(),I.initializeGLPlot())},E.isCameraChanged=function(F){var I=this,z=I.getCamera(),R=t.nestedProperty(F,I.id+".camera"),k=R.get();function B(ee,te,ae,j){var G=["up","center","eye"],K=["x","y","z"];return te[G[ae]]&&ee[G[ae]][K[j]]===te[G[ae]][K[j]]}var N=!1;if(k===void 0)N=!0;else{for(var q=0;q<3;q++)for(var Y=0;Y<3;Y++)if(!B(z,k,q,Y)){N=!0;break}(!k.projection||z.projection&&z.projection.type!==k.projection.type)&&(N=!0)}return N},E.isAspectChanged=function(F){var I=this,z=I.glplot.getAspectratio(),R=t.nestedProperty(F,I.id+".aspectratio"),k=R.get();return k===void 0||k.x!==z.x||k.y!==z.y||k.z!==z.z},E.saveLayout=function(F){var I=this,z=I.fullLayout,R,k,B,N,q,Y,ee=I.isCameraChanged(F),te=I.isAspectChanged(F),ae=ee||te;if(ae){var j={};if(ee&&(R=I.getCamera(),k=t.nestedProperty(F,I.id+".camera"),B=k.get(),j[I.id+".camera"]=B),te&&(N=I.glplot.getAspectratio(),q=t.nestedProperty(F,I.id+".aspectratio"),Y=q.get(),j[I.id+".aspectratio"]=Y),e.call("_storeDirectGUIEdit",F,z._preGUI,j),ee){k.set(R);var G=t.nestedProperty(z,I.id+".camera");G.set(R)}if(te){q.set(N);var K=t.nestedProperty(z,I.id+".aspectratio");K.set(N),I.glplot.redraw()}}return ae},E.updateFx=function(F,I){var z=this,R=z.camera;if(R)if(F==="orbit")R.mode="orbit",R.keyBindingMode="rotate";else if(F==="turntable"){R.up=[0,0,1],R.mode="turntable",R.keyBindingMode="rotate";var k=z.graphDiv,B=k._fullLayout,N=z.fullSceneLayout.camera,q=N.up.x,Y=N.up.y,ee=N.up.z;if(ee/Math.sqrt(q*q+Y*Y+ee*ee)<.999){var te=z.id+".camera.up",ae={x:0,y:0,z:1},j={};j[te]=ae;var G=k.layout;e.call("_storeDirectGUIEdit",G,B._preGUI,j),N.up=ae,t.nestedProperty(G,te).set(ae)}}else R.keyBindingMode=F;z.fullSceneLayout.hovermode=I};function D(F,I,z){for(var R=0,k=z-1;R0)for(var q=255/N,Y=0;Y<3;++Y)F[B+Y]=Math.min(q*F[B+Y],255)}}E.toImage=function(F){var I=this;F||(F="png"),I.staticMode&&I.container.appendChild(o),I.glplot.redraw();var z=I.glplot.gl,R=z.drawingBufferWidth,k=z.drawingBufferHeight;z.bindFramebuffer(z.FRAMEBUFFER,null);var B=new Uint8Array(R*k*4);z.readPixels(0,0,R,k,z.RGBA,z.UNSIGNED_BYTE,B),D(B,R,k),C(B,R,k);var N=document.createElement("canvas");N.width=R,N.height=k;var q=N.getContext("2d",{willReadFrequently:!0}),Y=q.createImageData(R,k);Y.data.set(B),q.putImageData(Y,0,0);var ee;switch(F){case"jpeg":ee=N.toDataURL("image/jpeg");break;case"webp":ee=N.toDataURL("image/webp");break;default:ee=N.toDataURL("image/png")}return I.staticMode&&I.container.removeChild(o),ee},E.setConvert=function(){for(var F=this,I=0;I<3;I++){var z=F.fullSceneLayout[T[I]];r.setConvert(z,F.fullLayout),z.setScale=t.noop}},E.make4thDimension=function(){var F=this,I=F.graphDiv,z=I._fullLayout;F._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(F._mockAxis,z)},O.exports=A}}),c4=xe({"src/plots/gl3d/layout/attributes.js"(U,O){"use strict";O.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),U2=xe({"src/plots/gl3d/layout/axis_attributes.js"(U,O){"use strict";var u=wi(),v=$c(),w=oo().extendFlat,S=Hl().overrideAll;O.exports=S({visible:v.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:u.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:v.color,categoryorder:v.categoryorder,categoryarray:v.categoryarray,title:{text:v.title.text,font:v.title.font},type:w({},v.type,{values:["-","linear","log","date","category"]}),autotypenumbers:v.autotypenumbers,autorange:v.autorange,autorangeoptions:{minallowed:v.autorangeoptions.minallowed,maxallowed:v.autorangeoptions.maxallowed,clipmin:v.autorangeoptions.clipmin,clipmax:v.autorangeoptions.clipmax,include:v.autorangeoptions.include,editType:"plot"},rangemode:v.rangemode,minallowed:v.minallowed,maxallowed:v.maxallowed,range:w({},v.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:v.minor.tickmode,nticks:v.nticks,tick0:v.tick0,dtick:v.dtick,tickvals:v.tickvals,ticktext:v.ticktext,ticks:v.ticks,mirror:v.mirror,ticklen:v.ticklen,tickwidth:v.tickwidth,tickcolor:v.tickcolor,showticklabels:v.showticklabels,labelalias:v.labelalias,tickfont:v.tickfont,tickangle:v.tickangle,tickprefix:v.tickprefix,showtickprefix:v.showtickprefix,ticksuffix:v.ticksuffix,showticksuffix:v.showticksuffix,showexponent:v.showexponent,exponentformat:v.exponentformat,minexponent:v.minexponent,separatethousands:v.separatethousands,tickformat:v.tickformat,tickformatstops:v.tickformatstops,hoverformat:v.hoverformat,showline:v.showline,linecolor:v.linecolor,linewidth:v.linewidth,showgrid:v.showgrid,gridcolor:w({},v.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:v.gridwidth,zeroline:v.zeroline,zerolinecolor:v.zerolinecolor,zerolinewidth:v.zerolinewidth},"plot","from-root")}}),j2=xe({"src/plots/gl3d/layout/layout_attributes.js"(U,O){"use strict";var u=U2(),v=Gl().attributes,w=oo().extendFlat,S=Sr().counterRegex;function l(e,t,a){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:a,editType:"camera"},editType:"camera"}}O.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:w(l(0,0,1),{}),center:w(l(0,0,0),{}),eye:w(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:v({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:u,yaxis:u,zaxis:u,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"}}}),f4=xe({"src/plots/gl3d/layout/axis_defaults.js"(U,O){"use strict";var u=wi(),v=Sr(),w=Cs(),S=U2(),l=X_(),e=p0(),t=["xaxis","yaxis","zaxis"],a=100*136/187;O.exports=function(n,i,s){var c,p;function f(o,b){return v.coerce(c,p,S,o,b)}for(var d=0;d1;function f(d){if(!p){var y=u.validate(i[d],e[d]);if(y)return i[d]}}S(i,s,c,{type:a,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:f,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(n,i,s,c){for(var p=s("bgcolor"),f=v.combine(p,c.paper_bgcolor),d=["up","center","eye"],y=0;y.999)&&(E="turntable")}else E="turntable";s("dragmode",E),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),$d=xe({"src/plots/gl3d/index.js"(U){"use strict";var O=Hl().overrideAll,u=Nh(),v=u4(),w=df().getSubplotData,S=Sr(),l=fh(),e="gl3d",t="scene";U.name=e,U.attr=t,U.idRoot=t,U.idRegex=U.attrRegex=S.counterRegex("scene"),U.attributes=c4(),U.layoutAttributes=j2(),U.baseLayoutAttrOverrides=O({hoverlabel:u.hoverlabel},"plot","nested"),U.supplyLayoutDefaults=h4(),U.plot=function(r){for(var n=r._fullLayout,i=r._fullData,s=n._subplots[e],c=0;c0){D=c[C];break}return D}function y(x,_){if(!(x<1||_<1)){for(var D=f(x),C=f(_),F=1,I=0;IA;)C--,C/=d(C),C++,C1?F:1};function E(x,_,D){var C=D[8]+D[2]*_[0]+D[5]*_[1];return x[0]=(D[6]+D[0]*_[0]+D[3]*_[1])/C,x[1]=(D[7]+D[1]*_[0]+D[4]*_[1])/C,x}function g(x,_,D){return T(x,_,E,D),x}function T(x,_,D,C){for(var F=[0,0],I=x.shape[0],z=x.shape[1],R=0;R0&&this.contourStart[C]!==null&&this.contourEnd[C]!==null&&this.contourEnd[C]>this.contourStart[C]))for(_[C]=!0,F=this.contourStart[C];FY&&(this.minValues[B]=Y),this.maxValues[B]c&&(a.isomin=null,a.isomax=null);var p=i("x"),f=i("y"),d=i("z"),y=i("value");if(!p||!p.length||!f||!f.length||!d||!d.length||!y||!y.length){a.visible=!1;return}var o=v.getComponentMethod("calendars","handleTraceDefaults");o(t,a,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(E){i(E+"hoverformat");var g="caps."+E,T=i(g+".show");T&&i(g+".fill");var m="slices."+E,h=i(m+".show");h&&(i(m+".fill"),i(m+".locations"))});var b=i("spaceframe.show");b&&i("spaceframe.fill");var M=i("surface.show");M&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var A=i("contour.show");A&&(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(E){i(E)}),S(t,a,n,i,{prefix:"",cLetter:"c"}),a._length=null}O.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),F1=xe({"src/traces/streamtube/calc.js"(U,O){"use strict";var u=Sr(),v=xf();function w(t,a){a._len=Math.min(a.u.length,a.v.length,a.w.length,a.x.length,a.y.length,a.z.length),a._u=e(a.u,a._len),a._v=e(a.v,a._len),a._w=e(a.w,a._len),a._x=e(a.x,a._len),a._y=e(a.y,a._len),a._z=e(a.z,a._len);var r=S(a);a._gridFill=r.fill,a._Xs=r.Xs,a._Ys=r.Ys,a._Zs=r.Zs,a._len=r.len;var n=0,i,s,c;a.starts&&(i=e(a.starts.x||[]),s=e(a.starts.y||[]),c=e(a.starts.z||[]),n=Math.min(i.length,s.length,c.length)),a._startsX=i||[],a._startsY=s||[],a._startsZ=c||[];var p=0,f=1/0,d;for(d=0;d1&&(h=a[i-1],_=r[i-1],C=n[i-1]),s=0;sh?"-":"+")+"x"),A=A.replace("y",(x>_?"-":"+")+"y"),A=A.replace("z",(D>C?"-":"+")+"z");var R=function(){i=0,F=[],I=[],z=[]};(!i||i0;f--){var d=Math.min(p[f],p[f-1]),y=Math.max(p[f],p[f-1]);if(y>d&&d-1}function Q(at,Ee){return at===null?Ee:at}function re(at,Ee,Re){ee();var he=[Ee],ye=[Re];if(H>=1)he=[Ee],ye=[Re];else if(H>0){var Ie=X(Ee,Re);he=Ie.xyzv,ye=Ie.abc}for(var Fe=0;Fe-1?Re[We]:Y(pt,ct,ft);_t>-1?He[We]=_t:He[We]=ae(pt,ct,ft,Q(at,mt))}j(He[0],He[1],He[2])}}function ue(at,Ee,Re){var he=function(ye,Ie,Fe){re(at,[Ee[ye],Ee[Ie],Ee[Fe]],[Re[ye],Re[Ie],Re[Fe]])};he(0,1,2),he(2,3,0)}function pe(at,Ee,Re){var he=function(ye,Ie,Fe){re(at,[Ee[ye],Ee[Ie],Ee[Fe]],[Re[ye],Re[Ie],Re[Fe]])};he(0,1,2),he(3,0,1),he(2,3,0),he(1,2,3)}function ge(at,Ee,Re,he){var ye=at[3];yehe&&(ye=he);for(var Ie=(at[3]-ye)/(at[3]-Ee[3]+1e-9),Fe=[],He=0;He<4;He++)Fe[He]=(1-Ie)*at[He]+Ie*Ee[He];return Fe}function Te(at,Ee,Re){return at>=Ee&&at<=Re}function Se(at){var Ee=.001*(R-z);return at>=z-Ee&&at<=R+Ee}function Ce(at){for(var Ee=[],Re=0;Re<4;Re++){var he=at[Re];Ee.push([c._x[he],c._y[he],c._z[he],c._value[he]])}return Ee}var Ue=3;function Oe(at,Ee,Re,he,ye,Ie){Ie||(Ie=1),Re=[-1,-1,-1];var Fe=!1,He=[Te(Ee[0][3],he,ye),Te(Ee[1][3],he,ye),Te(Ee[2][3],he,ye)];if(!He[0]&&!He[1]&&!He[2])return!1;var We=function(ct,ft,mt){return Se(ft[0][3])&&Se(ft[1][3])&&Se(ft[2][3])?(re(ct,ft,mt),!0):IeHe?[F,Ie]:[Ie,I];yt(Ee,We[0],We[1])}}var pt=[[Math.min(z,I),Math.max(z,I)],[Math.min(F,R),Math.max(F,R)]];["x","y","z"].forEach(function(ct){for(var ft=[],mt=0;mt0&&(ca.push(pa.id),ct==="x"?na.push([pa.distRatio,0,0]):ct==="y"?na.push([0,pa.distRatio,0]):na.push([0,0,pa.distRatio]))}else ct==="x"?$r=vr(1,h-1):ct==="y"?$r=vr(1,x-1):$r=vr(1,_-1);ca.length>0&&(ct==="x"?ft[_t]=At(at,ca,Bt,Et,na,ft[_t]):ct==="y"?ft[_t]=It(at,ca,Bt,Et,na,ft[_t]):ft[_t]=Zt(at,ca,Bt,Et,na,ft[_t]),_t++),$r.length>0&&(ct==="x"?ft[_t]=De(at,$r,Bt,Et,ft[_t]):ct==="y"?ft[_t]=qe(at,$r,Bt,Et,ft[_t]):ft[_t]=Ne(at,$r,Bt,Et,ft[_t]),_t++)}var fa=c.caps[ct];fa.show&&fa.fill&&(Z(fa.fill),ct==="x"?ft[_t]=De(at,[0,h-1],Bt,Et,ft[_t]):ct==="y"?ft[_t]=qe(at,[0,x-1],Bt,Et,ft[_t]):ft[_t]=Ne(at,[0,_-1],Bt,Et,ft[_t]),_t++)}}),M===0&&te(),c._meshX=k,c._meshY=B,c._meshZ=N,c._meshIntensity=q,c._Xs=g,c._Ys=T,c._Zs=m}return Jt(),c}function s(c,p){var f=c.glplot.gl,d=u({gl:f}),y=new a(c,d,p.uid);return d._trace=y,y.update(p),c.glplot.add(d),y}O.exports={findNearestOnAxis:t,generateIsoMeshes:i,createIsosurfaceTrace:s}}}),_4=xe({"src/traces/isosurface/index.js"(U,O){"use strict";O.exports={attributes:R1(),supplyDefaults:V2().supplyDefaults,calc:H2(),colorbar:{min:"cmin",max:"cmax"},plot:z1().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:$d(),categories:["gl3d","showLegend"],meta:{}}}}),b4=xe({"lib/isosurface.js"(U,O){"use strict";O.exports=_4()}}),G2=xe({"src/traces/volume/attributes.js"(U,O){"use strict";var u=pl(),v=R1(),w=Z0(),S=Rs(),l=oo().extendFlat,e=Hl().overrideAll,t=O.exports=e(l({x:v.x,y:v.y,z:v.z,value:v.value,isomin:v.isomin,isomax:v.isomax,surface:v.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:v.slices,caps:v.caps,text:v.text,hovertext:v.hovertext,xhoverformat:v.xhoverformat,yhoverformat:v.yhoverformat,zhoverformat:v.zhoverformat,valuehoverformat:v.valuehoverformat,hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback},u("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:v.colorbar,opacity:v.opacity,opacityscale:w.opacityscale,lightposition:v.lightposition,lighting:v.lighting,flatshading:v.flatshading,contour:v.contour,hoverinfo:l({},S.hoverinfo),showlegend:l({},S.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),x4=xe({"src/traces/volume/defaults.js"(U,O){"use strict";var u=Sr(),v=G2(),w=V2().supplyIsoDefaults,S=q2().opacityscaleDefaults;O.exports=function(e,t,a,r){function n(i,s){return u.coerce(e,t,v,i,s)}w(e,t,a,r,n),S(e,t,r,n)}}}),w4=xe({"src/traces/volume/convert.js"(U,O){"use strict";var u=Jc().gl_mesh3d,v=yd().parseColorScale,w=Sr().isArrayOrTypedArray,S=gd(),l=Bl().extractOpts,e=Pp(),t=z1().findNearestOnAxis,a=z1().generateIsoMeshes;function r(s,c,p){this.scene=s,this.uid=p,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var n=r.prototype;n.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,p=this.data._meshX[c],f=this.data._meshY[c],d=this.data._meshZ[c],y=this.data._Ys.length,o=this.data._Zs.length,b=t(p,this.data._Xs).id,M=t(f,this.data._Ys).id,A=t(d,this.data._Zs).id,E=s.index=A+o*M+o*y*b;s.traceCoordinate=[this.data._meshX[E],this.data._meshY[E],this.data._meshZ[E],this.data._value[E]];var g=this.data.hovertext||this.data.text;return w(g)&&g[E]!==void 0?s.textLabel=g[E]:g&&(s.textLabel=g),!0}},n.update=function(s){var c=this.scene,p=c.fullSceneLayout;this.data=a(s);function f(M,A,E,g){return A.map(function(T){return M.d2l(T,0,g)*E})}var d=e(f(p.xaxis,s._meshX,c.dataScale[0],s.xcalendar),f(p.yaxis,s._meshY,c.dataScale[1],s.ycalendar),f(p.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),y=e(s._meshI,s._meshJ,s._meshK),o={positions:d,cells:y,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:S(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},b=l(s);o.vertexIntensity=s._meshIntensity,o.vertexIntensityBounds=[b.min,b.max],o.colormap=v(s),this.mesh.update(o)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function i(s,c){var p=s.glplot.gl,f=u({gl:p}),d=new r(s,f,c.uid);return f._trace=d,d.update(c),s.glplot.add(f),d}O.exports=i}}),T4=xe({"src/traces/volume/index.js"(U,O){"use strict";O.exports={attributes:G2(),supplyDefaults:x4(),calc:H2(),colorbar:{min:"cmin",max:"cmax"},plot:w4(),moduleType:"trace",name:"volume",basePlotModule:$d(),categories:["gl3d","showLegend"],meta:{}}}}),A4=xe({"lib/volume.js"(U,O){"use strict";O.exports=T4()}}),M4=xe({"src/traces/mesh3d/defaults.js"(U,O){"use strict";var u=Ci(),v=Sr(),w=Fc(),S=Lp();O.exports=function(e,t,a,r){function n(f,d){return v.coerce(e,t,S,f,d)}function i(f){var d=f.map(function(y){var o=n(y);return o&&v.isArrayOrTypedArray(o)?o:null});return d.every(function(y){return y&&y.length===d[0].length})&&d}var s=i(["x","y","z"]);if(!s){t.visible=!1;return}if(i(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=u.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(f){n(f)});var p=n("contour.show");p&&(n("contour.color"),n("contour.width")),"intensity"in e?(n("intensity"),n("intensitymode"),w(e,t,r,n,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?n("facecolor"):"vertexcolor"in e?n("vertexcolor"):n("color",a)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),t._length=null}}}),S4=xe({"src/traces/mesh3d/calc.js"(U,O){"use strict";var u=xf();O.exports=function(w,S){S.intensity&&u(w,S,{vals:S.intensity,containerStr:"",cLetter:"c"})}}}),E4=xe({"src/traces/mesh3d/convert.js"(U,O){"use strict";var u=Jc().gl_mesh3d,v=Jc().delaunay_triangulate,w=Jc().alpha_shape,S=Jc().convex_hull,l=yd().parseColorScale,e=Sr().isArrayOrTypedArray,t=gd(),a=Bl().extractOpts,r=Pp();function n(o,b,M){this.scene=o,this.uid=M,this.mesh=b,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var i=n.prototype;i.handlePick=function(o){if(o.object===this.mesh){var b=o.index=o.data.index;o.data._cellCenter?o.traceCoordinate=o.data.dataCoordinate:o.traceCoordinate=[this.data.x[b],this.data.y[b],this.data.z[b]];var M=this.data.hovertext||this.data.text;return e(M)&&M[b]!==void 0?o.textLabel=M[b]:M&&(o.textLabel=M),!0}};function s(o){for(var b=[],M=o.length,A=0;A=b-.5)return!1;return!0}i.update=function(o){var b=this.scene,M=b.fullSceneLayout;this.data=o;var A=o.x.length,E=r(c(M.xaxis,o.x,b.dataScale[0],o.xcalendar),c(M.yaxis,o.y,b.dataScale[1],o.ycalendar),c(M.zaxis,o.z,b.dataScale[2],o.zcalendar)),g;if(o.i&&o.j&&o.k){if(o.i.length!==o.j.length||o.j.length!==o.k.length||!d(o.i,A)||!d(o.j,A)||!d(o.k,A))return;g=r(p(o.i),p(o.j),p(o.k))}else o.alphahull===0?g=S(E):o.alphahull>0?g=w(o.alphahull,E):g=f(o.delaunayaxis,E);var T={positions:E,cells:g,lightPosition:[o.lightposition.x,o.lightposition.y,o.lightposition.z],ambient:o.lighting.ambient,diffuse:o.lighting.diffuse,specular:o.lighting.specular,roughness:o.lighting.roughness,fresnel:o.lighting.fresnel,vertexNormalsEpsilon:o.lighting.vertexnormalsepsilon,faceNormalsEpsilon:o.lighting.facenormalsepsilon,opacity:o.opacity,contourEnable:o.contour.show,contourColor:t(o.contour.color).slice(0,3),contourWidth:o.contour.width,useFacetNormals:o.flatshading};if(o.intensity){var m=a(o);this.color="#fff";var h=o.intensitymode;T[h+"Intensity"]=o.intensity,T[h+"IntensityBounds"]=[m.min,m.max],T.colormap=l(o)}else o.vertexcolor?(this.color=o.vertexcolor[0],T.vertexColors=s(o.vertexcolor)):o.facecolor?(this.color=o.facecolor[0],T.cellColors=s(o.facecolor)):(this.color=o.color,T.meshColor=t(o.color));this.mesh.update(T)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function y(o,b){var M=o.glplot.gl,A=u({gl:M}),E=new n(o,A,b.uid);return A._trace=E,E.update(b),o.glplot.add(A),E}O.exports=y}}),k4=xe({"src/traces/mesh3d/index.js"(U,O){"use strict";O.exports={attributes:Lp(),supplyDefaults:M4(),calc:S4(),colorbar:{min:"cmin",max:"cmax"},plot:E4(),moduleType:"trace",name:"mesh3d",basePlotModule:$d(),categories:["gl3d","showLegend"],meta:{}}}}),C4=xe({"lib/mesh3d.js"(U,O){"use strict";O.exports=k4()}}),W2=xe({"src/traces/cone/attributes.js"(U,O){"use strict";var u=pl(),v=Kl().axisHoverFormat,{hovertemplateAttrs:w,templatefallbackAttrs:S}=js(),l=Lp(),e=Rs(),t=oo().extendFlat,a={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","raw"],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:w({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:v("u",1),vhoverformat:v("v",1),whoverformat:v("w",1),xhoverformat:v("x"),yhoverformat:v("y"),zhoverformat:v("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(a,u("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(n){a[n]=l[n]}),a.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),O.exports=a}}),L4=xe({"src/traces/cone/defaults.js"(U,O){"use strict";var u=Sr(),v=Fc(),w=W2();O.exports=function(l,e,t,a){function r(y,o){return u.coerce(l,e,w,y,o)}var n=r("u"),i=r("v"),s=r("w"),c=r("x"),p=r("y"),f=r("z");if(!n||!n.length||!i||!i.length||!s||!s.length||!c||!c.length||!p||!p.length||!f||!f.length){e.visible=!1;return}var d=r("sizemode");r("sizeref",d==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),v(l,e,a,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),P4=xe({"src/traces/cone/calc.js"(U,O){"use strict";var u=xf();O.exports=function(w,S){for(var l=S.u,e=S.v,t=S.w,a=Math.min(S.x.length,S.y.length,S.z.length,l.length,e.length,t.length),r=-1/0,n=1/0,i=0;i2?d=p.slice(1,f-1):f===2?d=[(p[0]+p[1])/2]:d=p,d}function i(p){var f=p.length;return f===1?[.5,.5]:[p[1]-p[0],p[f-1]-p[f-2]]}function s(p,f){var d=p.fullSceneLayout,y=p.dataScale,o=f._len,b={};function M(ae,j){var G=d[j],K=y[t[j]];return w.simpleMap(ae,function(H){return G.d2l(H)*K})}if(b.vectors=e(M(f._u,"xaxis"),M(f._v,"yaxis"),M(f._w,"zaxis"),o),!o)return{positions:[],cells:[]};var A=M(f._Xs,"xaxis"),E=M(f._Ys,"yaxis"),g=M(f._Zs,"zaxis");b.meshgrid=[A,E,g],b.gridFill=f._gridFill;var T=f._slen;if(T)b.startingPositions=e(M(f._startsX,"xaxis"),M(f._startsY,"yaxis"),M(f._startsZ,"zaxis"));else{for(var m=E[0],h=n(A),x=n(g),_=new Array(h.length*x.length),D=0,C=0;Cm&&(m=D[0]),D[1]h&&(h=D[1])}function _(D){switch(D.type){case"GeometryCollection":D.geometries.forEach(_);break;case"Point":x(D.coordinates);break;case"MultiPoint":D.coordinates.forEach(x);break}}M.arcs.forEach(function(D){for(var C=-1,F=D.length,I;++Cm&&(m=I[0]),I[1]h&&(h=I[1])});for(E in M.objects)_(M.objects[E]);return[g,T,m,h]}function l(M,A){for(var E,g=M.length,T=g-A;T<--g;)E=M[T],M[T++]=M[g],M[g]=E}function e(M,A){return typeof A=="string"&&(A=M.objects[A]),A.type==="GeometryCollection"?{type:"FeatureCollection",features:A.geometries.map(function(E){return t(M,E)})}:t(M,A)}function t(M,A){var E=A.id,g=A.bbox,T=A.properties==null?{}:A.properties,m=a(M,A);return E==null&&g==null?{type:"Feature",properties:T,geometry:m}:g==null?{type:"Feature",id:E,properties:T,geometry:m}:{type:"Feature",id:E,bbox:g,properties:T,geometry:m}}function a(M,A){var E=w(M.transform),g=M.arcs;function T(C,F){F.length&&F.pop();for(var I=g[C<0?~C:C],z=0,R=I.length;z1)g=s(M,A,E);else for(T=0,g=new Array(m=M.arcs.length);T1)for(var F=1,I=x(D[0]),z,R;FI&&(R=D[0],D[0]=D[F],D[F]=R,I=z);return D}).filter(function(_){return _.length>0})}}function d(M,A){for(var E=0,g=M.length;E>>1;M[T]=2))throw new Error("n must be \u22652");_=M.bbox||S(M);var E=_[0],g=_[1],T=_[2],m=_[3],h;A={scale:[T-E?(T-E)/(h-1):1,m-g?(m-g)/(h-1):1],translate:[E,g]}}else _=M.bbox;var x=o(A),_,D,C=M.objects,F={};function I(k){return x(k)}function z(k){var B;switch(k.type){case"GeometryCollection":B={type:"GeometryCollection",geometries:k.geometries.map(z)};break;case"Point":B={type:"Point",coordinates:I(k.coordinates)};break;case"MultiPoint":B={type:"MultiPoint",coordinates:k.coordinates.map(I)};break;default:return k}return k.id!=null&&(B.id=k.id),k.bbox!=null&&(B.bbox=k.bbox),k.properties!=null&&(B.properties=k.properties),B}function R(k){var B=0,N=1,q=k.length,Y,ee=new Array(q);for(ee[0]=x(k[0],0);++B0&&(S.push(l),l=[])}return l.length>0&&S.push(l),S},U.makeLine=function(u){return u.length===1?{type:"LineString",coordinates:u[0]}:{type:"MultiLineString",coordinates:u}},U.makePolygon=function(u){if(u.length===1)return{type:"Polygon",coordinates:u};for(var v=new Array(u.length),w=0;w{for(var M in b)u(o,M,{get:b[M],enumerable:!0})},e=(o,b,M,A)=>{if(b&&typeof b=="object"||typeof b=="function")for(let E of w(b))!S.call(o,E)&&E!==M&&u(o,E,{get:()=>b[E],enumerable:!(A=v(b,E))||A.enumerable});return o},t=o=>e(u({},"__esModule",{value:!0}),o),a={};l(a,{COUNTRIES:()=>r,byAlpha2:()=>d,byAlpha3:()=>f,byM49:()=>y,createLookup:()=>i,lookup:()=>c,lookupAlpha3:()=>p,sanitize:()=>n}),O.exports=t(a);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function n(o){return o.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function i(o){let b=new Map,M=new Map,A=new Map;for(let m of o)b.set(m.iso3,m),m.iso2&&M.set(m.iso2,m),m.m49&&A.set(m.m49,m);let E=new Map;for(let m of o)for(let h of[m.name,...m.aliases]){let x=n(h),_=E.get(x);if(_!==void 0&&_!==m.iso3)throw new Error(`Duplicate name/alias "${x}": ${_} vs ${m.iso3}`);E.set(x,m.iso3)}function g(m){if(m==null)return;let h=String(m).trim();if(!h)return;if(/^\d+$/.test(h)){let _=A.get(String(parseInt(h,10)).padStart(3,"0"));if(_)return _}if(/^[A-Za-z]{2}$/.test(h)){let _=M.get(h.toUpperCase());if(_)return _}if(/^[A-Za-z]{3}$/.test(h)){let _=b.get(h.toUpperCase());if(_)return _}let x=E.get(n(h));return x===void 0?void 0:b.get(x)}function T(m){var h;return(h=g(m))==null?void 0:h.iso3}return{lookup:g,lookupAlpha3:T,byAlpha3:b,byAlpha2:M,byM49:A}}var s=i(r),c=s.lookup,p=s.lookupAlpha3,f=s.byAlpha3,d=s.byAlpha2,y=s.byM49}}),N1=xe({"node_modules/@turf/helpers/dist/cjs/index.cjs"(U){"use strict";Object.defineProperty(U,"__esModule",{value:!0});var O=63710088e-1,u={centimeters:O*100,centimetres:O*100,degrees:360/(2*Math.PI),feet:O*3.28084,inches:O*39.37,kilometers:O/1e3,kilometres:O/1e3,meters:O,metres:O,miles:O/1609.344,millimeters:O*1e3,millimetres:O*1e3,nauticalmiles:O/1852,radians:1,yards:O*1.0936},v={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function w(C,F,I={}){let z={type:"Feature"};return(I.id===0||I.id)&&(z.id=I.id),I.bbox&&(z.bbox=I.bbox),z.properties=F||{},z.geometry=C,z}function S(C,F,I={}){switch(C){case"Point":return l(F).geometry;case"LineString":return r(F).geometry;case"Polygon":return t(F).geometry;case"MultiPoint":return c(F).geometry;case"MultiLineString":return s(F).geometry;case"MultiPolygon":return p(F).geometry;default:throw new Error(C+" is invalid")}}function l(C,F,I={}){if(!C)throw new Error("coordinates is required");if(!Array.isArray(C))throw new Error("coordinates must be an Array");if(C.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!h(C[0])||!h(C[1]))throw new Error("coordinates must contain numbers");return w({type:"Point",coordinates:C},F,I)}function e(C,F,I={}){return i(C.map(z=>l(z,F)),I)}function t(C,F,I={}){for(let R of C){if(R.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(R[R.length-1].length!==R[0].length)throw new Error("First and last Position are not equivalent.");for(let k=0;kt(z,F)),I)}function r(C,F,I={}){if(C.length<2)throw new Error("coordinates must be an array of two or more positions");return w({type:"LineString",coordinates:C},F,I)}function n(C,F,I={}){return i(C.map(z=>r(z,F)),I)}function i(C,F={}){let I={type:"FeatureCollection"};return F.id&&(I.id=F.id),F.bbox&&(I.bbox=F.bbox),I.features=C,I}function s(C,F,I={}){return w({type:"MultiLineString",coordinates:C},F,I)}function c(C,F,I={}){return w({type:"MultiPoint",coordinates:C},F,I)}function p(C,F,I={}){return w({type:"MultiPolygon",coordinates:C},F,I)}function f(C,F,I={}){return w({type:"GeometryCollection",geometries:C},F,I)}function d(C,F=0){if(F&&!(F>=0))throw new Error("precision must be a positive number");let I=Math.pow(10,F||0);return Math.round(C*I)/I}function y(C,F="kilometers"){let I=u[F];if(!I)throw new Error(F+" units is invalid");return C*I}function o(C,F="kilometers"){let I=u[F];if(!I)throw new Error(F+" units is invalid");return C/I}function b(C,F){return E(o(C,F))}function M(C){let F=C%360;return F<0&&(F+=360),F}function A(C){return C=C%360,C>180?C-360:C<-180?C+360:C}function E(C){return C%(2*Math.PI)*180/Math.PI}function g(C){return C%360*Math.PI/180}function T(C,F="kilometers",I="kilometers"){if(!(C>=0))throw new Error("length must be a positive number");return y(o(C,F),I)}function m(C,F="meters",I="kilometers"){if(!(C>=0))throw new Error("area must be a positive number");let z=v[F];if(!z)throw new Error("invalid original units");let R=v[I];if(!R)throw new Error("invalid final units");return C/z*R}function h(C){return!isNaN(C)&&C!==null&&!Array.isArray(C)}function x(C){return C!==null&&typeof C=="object"&&!Array.isArray(C)}function _(C){if(!C)throw new Error("bbox is required");if(!Array.isArray(C))throw new Error("bbox must be an Array");if(C.length!==4&&C.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");C.forEach(F=>{if(!h(F))throw new Error("bbox must only contain numbers")})}function D(C){if(!C)throw new Error("id is required");if(["string","number"].indexOf(typeof C)===-1)throw new Error("id must be a number or a string")}U.areaFactors=v,U.azimuthToBearing=A,U.bearingToAzimuth=M,U.convertArea=m,U.convertLength=T,U.degreesToRadians=g,U.earthRadius=O,U.factors=u,U.feature=w,U.featureCollection=i,U.geometry=S,U.geometryCollection=f,U.isNumber=h,U.isObject=x,U.lengthToDegrees=b,U.lengthToRadians=o,U.lineString=r,U.lineStrings=n,U.multiLineString=s,U.multiPoint=c,U.multiPolygon=p,U.point=l,U.points=e,U.polygon=t,U.polygons=a,U.radiansToDegrees=E,U.radiansToLength=y,U.round=d,U.validateBBox=_,U.validateId=D}}),O1=xe({"node_modules/@turf/meta/dist/cjs/index.cjs"(U){"use strict";Object.defineProperty(U,"__esModule",{value:!0});var O=N1();function u(o,b,M){if(o!==null)for(var A,E,g,T,m,h,x,_=0,D=0,C,F=o.type,I=F==="FeatureCollection",z=F==="Feature",R=I?o.features.length:1,k=0;kh||I>x||z>_){m=D,h=A,x=I,_=z,g=0;return}var R=O.lineString.call(void 0,[m,D],M.properties);if(b(R,A,E,z,g)===!1)return!1;g++,m=D})===!1)return!1}}})}function c(o,b,M){var A=M,E=!1;return s(o,function(g,T,m,h,x){E===!1&&M===void 0?A=g:A=b(A,g,T,m,h,x),E=!0}),A}function p(o,b){if(!o)throw new Error("geojson is required");n(o,function(M,A,E){if(M.geometry!==null){var g=M.geometry.type,T=M.geometry.coordinates;switch(g){case"LineString":if(b(M,A,E,0,0)===!1)return!1;break;case"Polygon":for(var m=0;mn+w(i),0)}function w(r){let n=0,i;switch(r.type){case"Polygon":return S(r.coordinates);case"MultiPolygon":for(i=0;i0){n+=Math.abs(t(r[0]));for(let i=1;i=n?(s+2)%n:s+2],d=c[0]*e,y=p[1]*e,o=f[0]*e;i+=(o-d)*Math.sin(y),s++}return i*l}var a=v;U.area=v,U.default=a}}),V4=xe({"node_modules/@turf/centroid/dist/cjs/index.cjs"(U){"use strict";Object.defineProperty(U,"__esModule",{value:!0});var O=N1(),u=O1();function v(S,l={}){let e=0,t=0,a=0;return u.coordEach.call(void 0,S,function(r){e+=r[0],t+=r[1],a++},!0),O.point.call(void 0,[e/a,t/a],l.properties)}var w=v;U.centroid=v,U.default=w}}),Q0=xe({"node_modules/d3-array/dist/d3-array.js"(U,O){(function(u,v){v(typeof U=="object"&&typeof O<"u"?U:u.d3=u.d3||{})})(U,function(u){"use strict";function v(K,H){return KH?1:K>=H?0:NaN}function w(K){return K.length===1&&(K=S(K)),{left:function(H,Z,X,$){for(X==null&&(X=0),$==null&&($=H.length);X<$;){var Q=X+$>>>1;K(H[Q],Z)<0?X=Q+1:$=Q}return X},right:function(H,Z,X,$){for(X==null&&(X=0),$==null&&($=H.length);X<$;){var Q=X+$>>>1;K(H[Q],Z)>0?$=Q:X=Q+1}return X}}}function S(K){return function(H,Z){return v(K(H),Z)}}var l=w(v),e=l.right,t=l.left;function a(K,H){H==null&&(H=r);for(var Z=0,X=K.length-1,$=K[0],Q=new Array(X<0?0:X);ZK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Z=K.length,X=0,$=-1,Q=0,re,ue,pe=0;if(H==null)for(;++$1)return pe/(X-1)}function p(K,H){var Z=c(K,H);return Z&&Math.sqrt(Z)}function f(K,H){var Z=K.length,X=-1,$,Q,re;if(H==null){for(;++X=$)for(Q=re=$;++X$&&(Q=$),re<$&&(re=$))}else for(;++X=$)for(Q=re=$;++X$&&(Q=$),re<$&&(re=$));return[Q,re]}var d=Array.prototype,y=d.slice,o=d.map;function b(K){return function(){return K}}function M(K){return K}function A(K,H,Z){K=+K,H=+H,Z=($=arguments.length)<2?(H=K,K=0,1):$<3?1:+Z;for(var X=-1,$=Math.max(0,Math.ceil((H-K)/Z))|0,Q=new Array($);++X<$;)Q[X]=K+X*Z;return Q}var E=Math.sqrt(50),g=Math.sqrt(10),T=Math.sqrt(2);function m(K,H,Z){var X,$=-1,Q,re,ue;if(H=+H,K=+K,Z=+Z,K===H&&Z>0)return[K];if((X=H0)for(K=Math.ceil(K/ue),H=Math.floor(H/ue),re=new Array(Q=Math.ceil(H-K+1));++$=0?(Q>=E?10:Q>=g?5:Q>=T?2:1)*Math.pow(10,$):-Math.pow(10,-$)/(Q>=E?10:Q>=g?5:Q>=T?2:1)}function x(K,H,Z){var X=Math.abs(H-K)/Math.max(0,Z),$=Math.pow(10,Math.floor(Math.log(X)/Math.LN10)),Q=X/$;return Q>=E?$*=10:Q>=g?$*=5:Q>=T&&($*=2),HSe;)Ce.pop(),--Ue;var Oe=new Array(Ue+1),_e;for(Q=0;Q<=Ue;++Q)_e=Oe[Q]=[],_e.x0=Q>0?Ce[Q-1]:Te,_e.x1=Q=1)return+Z(K[X-1],X-1,K);var X,$=(X-1)*H,Q=Math.floor($),re=+Z(K[Q],Q,K),ue=+Z(K[Q+1],Q+1,K);return re+(ue-re)*($-Q)}}function F(K,H,Z){return K=o.call(K,s).sort(v),Math.ceil((Z-H)/(2*(C(K,.75)-C(K,.25))*Math.pow(K.length,-1/3)))}function I(K,H,Z){return Math.ceil((Z-H)/(3.5*p(K)*Math.pow(K.length,-1/3)))}function z(K,H){var Z=K.length,X=-1,$,Q;if(H==null){for(;++X=$)for(Q=$;++XQ&&(Q=$)}else for(;++X=$)for(Q=$;++XQ&&(Q=$);return Q}function R(K,H){var Z=K.length,X=Z,$=-1,Q,re=0;if(H==null)for(;++$=0;)for(re=K[H],Z=re.length;--Z>=0;)Q[--$]=re[Z];return Q}function N(K,H){var Z=K.length,X=-1,$,Q;if(H==null){for(;++X=$)for(Q=$;++X$&&(Q=$)}else for(;++X=$)for(Q=$;++X$&&(Q=$);return Q}function q(K,H){for(var Z=H.length,X=new Array(Z);Z--;)X[Z]=K[H[Z]];return X}function Y(K,H){if(Z=K.length){var Z,X=0,$=0,Q,re=K[$];for(H==null&&(H=v);++X0?1:Mt<0?-1:0},m=Math.sqrt,h=Math.tan;function x(Mt){return Mt>1?0:Mt<-1?r:Math.acos(Mt)}function _(Mt){return Mt>1?n:Mt<-1?-n:Math.asin(Mt)}function D(Mt){return(Mt=g(Mt/2))*Mt}function C(){}function F(Mt,jt){Mt&&z.hasOwnProperty(Mt.type)&&z[Mt.type](Mt,jt)}var I={Feature:function(Mt,jt){F(Mt.geometry,jt)},FeatureCollection:function(Mt,jt){for(var _r=Mt.features,dr=-1,ea=_r.length;++dr=0?1:-1,ea=dr*_r,Aa=o(jt),Ga=g(jt),fn=j*Ga,gn=ae*Aa+fn*o(ea),qn=fn*dr*g(ea);N.add(y(qn,gn)),te=Mt,ae=Aa,j=Ga}function $(Mt){return q.reset(),B(Mt,G),q*2}function Q(Mt){return[y(Mt[1],Mt[0]),_(Mt[2])]}function re(Mt){var jt=Mt[0],_r=Mt[1],dr=o(_r);return[dr*o(jt),dr*g(jt),g(_r)]}function ue(Mt,jt){return Mt[0]*jt[0]+Mt[1]*jt[1]+Mt[2]*jt[2]}function pe(Mt,jt){return[Mt[1]*jt[2]-Mt[2]*jt[1],Mt[2]*jt[0]-Mt[0]*jt[2],Mt[0]*jt[1]-Mt[1]*jt[0]]}function ge(Mt,jt){Mt[0]+=jt[0],Mt[1]+=jt[1],Mt[2]+=jt[2]}function Te(Mt,jt){return[Mt[0]*jt,Mt[1]*jt,Mt[2]*jt]}function Se(Mt){var jt=m(Mt[0]*Mt[0]+Mt[1]*Mt[1]+Mt[2]*Mt[2]);Mt[0]/=jt,Mt[1]/=jt,Mt[2]/=jt}var Ce,Ue,Oe,_e,ce,ie,se,ne,be=w(),De,qe,Ne={point:ut,lineStart:yt,lineEnd:At,polygonStart:function(){Ne.point=It,Ne.lineStart=Zt,Ne.lineEnd=vr,be.reset(),G.polygonStart()},polygonEnd:function(){G.polygonEnd(),Ne.point=ut,Ne.lineStart=yt,Ne.lineEnd=At,N<0?(Ce=-(Oe=180),Ue=-(_e=90)):be>t?_e=90:be<-t&&(Ue=-90),qe[0]=Ce,qe[1]=Oe},sphere:function(){Ce=-(Oe=180),Ue=-(_e=90)}};function ut(Mt,jt){De.push(qe=[Ce=Mt,Oe=Mt]),jt_e&&(_e=jt)}function ot(Mt,jt){var _r=re([Mt*p,jt*p]);if(ne){var dr=pe(ne,_r),ea=[dr[1],-dr[0],0],Aa=pe(ea,dr);Se(Aa),Aa=Q(Aa);var Ga=Mt-ce,fn=Ga>0?1:-1,gn=Aa[0]*c*fn,qn,Wa=f(Ga)>180;Wa^(fn*ce_e&&(_e=qn)):(gn=(gn+360)%360-180,Wa^(fn*ce_e&&(_e=jt))),Wa?MtUt(Ce,Oe)&&(Oe=Mt):Ut(Mt,Oe)>Ut(Ce,Oe)&&(Ce=Mt):Oe>=Ce?(MtOe&&(Oe=Mt)):Mt>ce?Ut(Ce,Mt)>Ut(Ce,Oe)&&(Oe=Mt):Ut(Mt,Oe)>Ut(Ce,Oe)&&(Ce=Mt)}else De.push(qe=[Ce=Mt,Oe=Mt]);jt_e&&(_e=jt),ne=_r,ce=Mt}function yt(){Ne.point=ot}function At(){qe[0]=Ce,qe[1]=Oe,Ne.point=ut,ne=null}function It(Mt,jt){if(ne){var _r=Mt-ce;be.add(f(_r)>180?_r+(_r>0?360:-360):_r)}else ie=Mt,se=jt;G.point(Mt,jt),ot(Mt,jt)}function Zt(){G.lineStart()}function vr(){It(ie,se),G.lineEnd(),f(be)>t&&(Ce=-(Oe=180)),qe[0]=Ce,qe[1]=Oe,ne=null}function Ut(Mt,jt){return(jt-=Mt)<0?jt+360:jt}function Jt(Mt,jt){return Mt[0]-jt[0]}function at(Mt,jt){return Mt[0]<=Mt[1]?Mt[0]<=jt&&jt<=Mt[1]:jtUt(dr[0],dr[1])&&(dr[1]=ea[1]),Ut(ea[0],dr[1])>Ut(dr[0],dr[1])&&(dr[0]=ea[0])):Aa.push(dr=ea);for(Ga=-1/0,_r=Aa.length-1,jt=0,dr=Aa[_r];jt<=_r;dr=ea,++jt)ea=Aa[jt],(fn=Ut(dr[1],ea[0]))>Ga&&(Ga=fn,Ce=ea[0],Oe=dr[1])}return De=qe=null,Ce===1/0||Ue===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ce,Ue],[Oe,_e]]}var Re,he,ye,Ie,Fe,He,We,pt,ct,ft,mt,_t,Bt,Et,hr,$r,ca={sphere:C,point:na,lineStart:pa,lineEnd:Ia,polygonStart:function(){ca.lineStart=Va,ca.lineEnd=Oa},polygonEnd:function(){ca.lineStart=pa,ca.lineEnd=Ia}};function na(Mt,jt){Mt*=p,jt*=p;var _r=o(jt);wa(_r*o(Mt),_r*g(Mt),g(jt))}function wa(Mt,jt,_r){++Re,ye+=(Mt-ye)/Re,Ie+=(jt-Ie)/Re,Fe+=(_r-Fe)/Re}function pa(){ca.point=fa}function fa(Mt,jt){Mt*=p,jt*=p;var _r=o(jt);Et=_r*o(Mt),hr=_r*g(Mt),$r=g(jt),ca.point=za,wa(Et,hr,$r)}function za(Mt,jt){Mt*=p,jt*=p;var _r=o(jt),dr=_r*o(Mt),ea=_r*g(Mt),Aa=g(jt),Ga=y(m((Ga=hr*Aa-$r*ea)*Ga+(Ga=$r*dr-Et*Aa)*Ga+(Ga=Et*ea-hr*dr)*Ga),Et*dr+hr*ea+$r*Aa);he+=Ga,He+=Ga*(Et+(Et=dr)),We+=Ga*(hr+(hr=ea)),pt+=Ga*($r+($r=Aa)),wa(Et,hr,$r)}function Ia(){ca.point=na}function Va(){ca.point=tn}function Oa(){ka(_t,Bt),ca.point=na}function tn(Mt,jt){_t=Mt,Bt=jt,Mt*=p,jt*=p,ca.point=ka;var _r=o(jt);Et=_r*o(Mt),hr=_r*g(Mt),$r=g(jt),wa(Et,hr,$r)}function ka(Mt,jt){Mt*=p,jt*=p;var _r=o(jt),dr=_r*o(Mt),ea=_r*g(Mt),Aa=g(jt),Ga=hr*Aa-$r*ea,fn=$r*dr-Et*Aa,gn=Et*ea-hr*dr,qn=m(Ga*Ga+fn*fn+gn*gn),Wa=_(qn),$a=qn&&-Wa/qn;ct+=$a*Ga,ft+=$a*fn,mt+=$a*gn,he+=Wa,He+=Wa*(Et+(Et=dr)),We+=Wa*(hr+(hr=ea)),pt+=Wa*($r+($r=Aa)),wa(Et,hr,$r)}function oi(Mt){Re=he=ye=Ie=Fe=He=We=pt=ct=ft=mt=0,B(Mt,ca);var jt=ct,_r=ft,dr=mt,ea=jt*jt+_r*_r+dr*dr;return ear?Mt+Math.round(-Mt/s)*s:Mt,jt]}ci.invert=ci;function hi(Mt,jt,_r){return(Mt%=s)?jt||_r?bn(Jn(Mt),Ti(jt,_r)):Jn(Mt):jt||_r?Ti(jt,_r):ci}function Pi(Mt){return function(jt,_r){return jt+=Mt,[jt>r?jt-s:jt<-r?jt+s:jt,_r]}}function Jn(Mt){var jt=Pi(Mt);return jt.invert=Pi(-Mt),jt}function Ti(Mt,jt){var _r=o(Mt),dr=g(Mt),ea=o(jt),Aa=g(jt);function Ga(fn,gn){var qn=o(gn),Wa=o(fn)*qn,$a=g(fn)*qn,sn=g(gn),Pa=sn*_r+Wa*dr;return[y($a*ea-Pa*Aa,Wa*_r-sn*dr),_(Pa*ea+$a*Aa)]}return Ga.invert=function(fn,gn){var qn=o(gn),Wa=o(fn)*qn,$a=g(fn)*qn,sn=g(gn),Pa=sn*ea-$a*Aa;return[y($a*ea+sn*Aa,Wa*_r+Pa*dr),_(Pa*_r-Wa*dr)]},Ga}function _n(Mt){Mt=hi(Mt[0]*p,Mt[1]*p,Mt.length>2?Mt[2]*p:0);function jt(_r){return _r=Mt(_r[0]*p,_r[1]*p),_r[0]*=c,_r[1]*=c,_r}return jt.invert=function(_r){return _r=Mt.invert(_r[0]*p,_r[1]*p),_r[0]*=c,_r[1]*=c,_r},jt}function Ln(Mt,jt,_r,dr,ea,Aa){if(_r){var Ga=o(jt),fn=g(jt),gn=dr*_r;ea==null?(ea=jt+dr*s,Aa=jt-gn/2):(ea=ji(Ga,ea),Aa=ji(Ga,Aa),(dr>0?eaAa)&&(ea+=dr*s));for(var qn,Wa=ea;dr>0?Wa>Aa:Wa1&&Mt.push(Mt.pop().concat(Mt.shift()))},result:function(){var _r=Mt;return Mt=[],jt=null,_r}}}function rn(Mt,jt){return f(Mt[0]-jt[0])=0;--fn)ea.point(($a=Wa[fn])[0],$a[1]);else dr(sn.x,sn.p.x,-1,ea);sn=sn.p}sn=sn.o,Wa=sn.z,Pa=!Pa}while(!sn.v);ea.lineEnd()}}}function Qt(Mt){if(jt=Mt.length){for(var jt,_r=0,dr=Mt[0],ea;++_r=0?1:-1,Jo=bs*Go,Es=Jo>r,Vo=Ei*no;if(Xt.add(y(Vo*bs*g(Jo),Ii*wo+Vo*o(Jo))),Ga+=Es?Go+bs*s:Go,Es^Pa>=_r^ni>=_r){var yl=pe(re(sn),re(Vi));Se(yl);var Ws=pe(Aa,yl);Se(Ws);var xs=(Es^Go>=0?-1:1)*_(Ws[2]);(dr>xs||dr===xs&&(yl[0]||yl[1]))&&(fn+=Es^Go>=0?1:-1)}}return(Ga<-t||Ga0){for(gn||(ea.polygonStart(),gn=!0),ea.lineStart(),wo=0;wo1&&Rn&2&&no.push(no.pop().concat(no.shift())),Wa.push(no.filter(Ze))}}return sn}}function Ze(Mt){return Mt.length>1}function xt(Mt,jt){return((Mt=Mt.x)[0]<0?Mt[1]-n-t:n-Mt[1])-((jt=jt.x)[0]<0?jt[1]-n-t:n-jt[1])}var Vt=rr(function(){return!0},er,jr,[-r,-n]);function er(Mt){var jt=NaN,_r=NaN,dr=NaN,ea;return{lineStart:function(){Mt.lineStart(),ea=1},point:function(Aa,Ga){var fn=Aa>0?r:-r,gn=f(Aa-jt);f(gn-r)0?n:-n),Mt.point(dr,_r),Mt.lineEnd(),Mt.lineStart(),Mt.point(fn,_r),Mt.point(Aa,_r),ea=0):dr!==fn&&gn>=r&&(f(jt-dr)t?d((g(jt)*(Aa=o(dr))*g(_r)-g(dr)*(ea=o(jt))*g(Mt))/(ea*Aa*Ga)):(jt+dr)/2}function jr(Mt,jt,_r,dr){var ea;if(Mt==null)ea=_r*n,dr.point(-r,ea),dr.point(0,ea),dr.point(r,ea),dr.point(r,0),dr.point(r,-ea),dr.point(0,-ea),dr.point(-r,-ea),dr.point(-r,0),dr.point(-r,ea);else if(f(Mt[0]-jt[0])>t){var Aa=Mt[0]0,ea=f(jt)>t;function Aa(Wa,$a,sn,Pa){Ln(Pa,Mt,_r,sn,Wa,$a)}function Ga(Wa,$a){return o(Wa)*o($a)>jt}function fn(Wa){var $a,sn,Pa,Qn,Ei;return{lineStart:function(){Qn=Pa=!1,Ei=1},point:function(Ii,ki){var Vi=[Ii,ki],ni,Rn=Ga(Ii,ki),no=dr?Rn?0:qn(Ii,ki):Rn?qn(Ii+(Ii<0?r:-r),ki):0;if(!$a&&(Qn=Pa=Rn)&&Wa.lineStart(),Rn!==Pa&&(ni=gn($a,Vi),(!ni||rn($a,ni)||rn(Vi,ni))&&(Vi[2]=1)),Rn!==Pa)Ei=0,Rn?(Wa.lineStart(),ni=gn(Vi,$a),Wa.point(ni[0],ni[1])):(ni=gn($a,Vi),Wa.point(ni[0],ni[1],2),Wa.lineEnd()),$a=ni;else if(ea&&$a&&dr^Rn){var wo;!(no&sn)&&(wo=gn(Vi,$a,!0))&&(Ei=0,dr?(Wa.lineStart(),Wa.point(wo[0][0],wo[0][1]),Wa.point(wo[1][0],wo[1][1]),Wa.lineEnd()):(Wa.point(wo[1][0],wo[1][1]),Wa.lineEnd(),Wa.lineStart(),Wa.point(wo[0][0],wo[0][1],3)))}Rn&&(!$a||!rn($a,Vi))&&Wa.point(Vi[0],Vi[1]),$a=Vi,Pa=Rn,sn=no},lineEnd:function(){Pa&&Wa.lineEnd(),$a=null},clean:function(){return Ei|(Qn&&Pa)<<1}}}function gn(Wa,$a,sn){var Pa=re(Wa),Qn=re($a),Ei=[1,0,0],Ii=pe(Pa,Qn),ki=ue(Ii,Ii),Vi=Ii[0],ni=ki-Vi*Vi;if(!ni)return!sn&&Wa;var Rn=jt*ki/ni,no=-jt*Vi/ni,wo=pe(Ei,Ii),Go=Te(Ei,Rn),bs=Te(Ii,no);ge(Go,bs);var Jo=wo,Es=ue(Go,Jo),Vo=ue(Jo,Jo),yl=Es*Es-Vo*(ue(Go,Go)-1);if(!(yl<0)){var Ws=m(yl),xs=Te(Jo,(-Es-Ws)/Vo);if(ge(xs,Go),xs=Q(xs),!sn)return xs;var bi=Wa[0],ss=$a[0],ms=Wa[1],$o=$a[1],ul;ss0^xs[1]<(f(xs[0]-bi)r^(bi<=xs[0]&&xs[0]<=ss)){var Tl=Te(Jo,(-Es+Ws)/Vo);return ge(Tl,Go),[xs,Q(Tl)]}}}function qn(Wa,$a){var sn=dr?Mt:r-Mt,Pa=0;return Wa<-sn?Pa|=1:Wa>sn&&(Pa|=2),$a<-sn?Pa|=4:$a>sn&&(Pa|=8),Pa}return rr(Ga,fn,Aa,dr?[0,-Mt]:[-r,Mt-r])}function kr(Mt,jt,_r,dr,ea,Aa){var Ga=Mt[0],fn=Mt[1],gn=jt[0],qn=jt[1],Wa=0,$a=1,sn=gn-Ga,Pa=qn-fn,Qn;if(Qn=_r-Ga,!(!sn&&Qn>0)){if(Qn/=sn,sn<0){if(Qn0){if(Qn>$a)return;Qn>Wa&&(Wa=Qn)}if(Qn=ea-Ga,!(!sn&&Qn<0)){if(Qn/=sn,sn<0){if(Qn>$a)return;Qn>Wa&&(Wa=Qn)}else if(sn>0){if(Qn0)){if(Qn/=Pa,Pa<0){if(Qn0){if(Qn>$a)return;Qn>Wa&&(Wa=Qn)}if(Qn=Aa-fn,!(!Pa&&Qn<0)){if(Qn/=Pa,Pa<0){if(Qn>$a)return;Qn>Wa&&(Wa=Qn)}else if(Pa>0){if(Qn0&&(Mt[0]=Ga+Wa*sn,Mt[1]=fn+Wa*Pa),$a<1&&(jt[0]=Ga+$a*sn,jt[1]=fn+$a*Pa),!0}}}}}var ra=1e9,ja=-ra;function La(Mt,jt,_r,dr){function ea(qn,Wa){return Mt<=qn&&qn<=_r&&jt<=Wa&&Wa<=dr}function Aa(qn,Wa,$a,sn){var Pa=0,Qn=0;if(qn==null||(Pa=Ga(qn,$a))!==(Qn=Ga(Wa,$a))||gn(qn,Wa)<0^$a>0)do sn.point(Pa===0||Pa===3?Mt:_r,Pa>1?dr:jt);while((Pa=(Pa+$a+4)%4)!==Qn);else sn.point(Wa[0],Wa[1])}function Ga(qn,Wa){return f(qn[0]-Mt)0?0:3:f(qn[0]-_r)0?2:1:f(qn[1]-jt)0?1:0:Wa>0?3:2}function fn(qn,Wa){return gn(qn.x,Wa.x)}function gn(qn,Wa){var $a=Ga(qn,1),sn=Ga(Wa,1);return $a!==sn?$a-sn:$a===0?Wa[1]-qn[1]:$a===1?qn[0]-Wa[0]:$a===2?qn[1]-Wa[1]:Wa[0]-qn[0]}return function(qn){var Wa=qn,$a=un(),sn,Pa,Qn,Ei,Ii,ki,Vi,ni,Rn,no,wo,Go={point:bs,lineStart:yl,lineEnd:Ws,polygonStart:Es,polygonEnd:Vo};function bs(bi,ss){ea(bi,ss)&&Wa.point(bi,ss)}function Jo(){for(var bi=0,ss=0,ms=Pa.length;ssdr&&(Eu-zu)*(dr-Tl)>(Al-Tl)*(Mt-zu)&&++bi:Al<=dr&&(Eu-zu)*(dr-Tl)<(Al-Tl)*(Mt-zu)&&--bi;return bi}function Es(){Wa=$a,sn=[],Pa=[],wo=!0}function Vo(){var bi=Jo(),ss=wo&&bi,ms=(sn=v.merge(sn)).length;(ss||ms)&&(qn.polygonStart(),ss&&(qn.lineStart(),Aa(null,null,1,qn),qn.lineEnd()),ms&&Ke(sn,fn,bi,Aa,qn),qn.polygonEnd()),Wa=qn,sn=Pa=Qn=null}function yl(){Go.point=xs,Pa&&Pa.push(Qn=[]),no=!0,Rn=!1,Vi=ni=NaN}function Ws(){sn&&(xs(Ei,Ii),ki&&Rn&&$a.rejoin(),sn.push($a.result())),Go.point=bs,Rn&&Wa.lineEnd()}function xs(bi,ss){var ms=ea(bi,ss);if(Pa&&Qn.push([bi,ss]),no)Ei=bi,Ii=ss,ki=ms,no=!1,ms&&(Wa.lineStart(),Wa.point(bi,ss));else if(ms&&Rn)Wa.point(bi,ss);else{var $o=[Vi=Math.max(ja,Math.min(ra,Vi)),ni=Math.max(ja,Math.min(ra,ni))],ul=[bi=Math.max(ja,Math.min(ra,bi)),ss=Math.max(ja,Math.min(ra,ss))];kr($o,ul,Mt,jt,_r,dr)?(Rn||(Wa.lineStart(),Wa.point($o[0],$o[1])),Wa.point(ul[0],ul[1]),ms||Wa.lineEnd(),wo=!1):ms&&(Wa.lineStart(),Wa.point(bi,ss),wo=!1)}Vi=bi,ni=ss,Rn=ms}return Go}}function Dn(){var Mt=0,jt=0,_r=960,dr=500,ea,Aa,Ga;return Ga={stream:function(fn){return ea&&Aa===fn?ea:ea=La(Mt,jt,_r,dr)(Aa=fn)},extent:function(fn){return arguments.length?(Mt=+fn[0][0],jt=+fn[0][1],_r=+fn[1][0],dr=+fn[1][1],ea=Aa=null,Ga):[[Mt,jt],[_r,dr]]}}}var Mn=w(),_i,ti,Si,ai={sphere:C,point:C,lineStart:Ao,lineEnd:C,polygonStart:C,polygonEnd:C};function Ao(){ai.point=Vn,ai.lineEnd=yo}function yo(){ai.point=ai.lineEnd=C}function Vn(Mt,jt){Mt*=p,jt*=p,_i=Mt,ti=g(jt),Si=o(jt),ai.point=Bo}function Bo(Mt,jt){Mt*=p,jt*=p;var _r=g(jt),dr=o(jt),ea=f(Mt-_i),Aa=o(ea),Ga=g(ea),fn=dr*Ga,gn=Si*_r-ti*dr*Aa,qn=ti*_r+Si*dr*Aa;Mn.add(y(m(fn*fn+gn*gn),qn)),_i=Mt,ti=_r,Si=dr}function Mo(Mt){return Mn.reset(),B(Mt,ai),+Mn}var co=[null,null],Ro={type:"LineString",coordinates:co};function ao(Mt,jt){return co[0]=Mt,co[1]=jt,Mo(Ro)}var Co={Feature:function(Mt,jt){return Po(Mt.geometry,jt)},FeatureCollection:function(Mt,jt){for(var _r=Mt.features,dr=-1,ea=_r.length;++dr0&&(ea=ao(Mt[Aa],Mt[Aa-1]),ea>0&&_r<=ea&&dr<=ea&&(_r+dr-ea)*(1-Math.pow((_r-dr)/ea,2))t}).map(sn)).concat(v.range(b(Aa/qn)*qn,ea,qn).filter(function(ni){return f(ni%$a)>t}).map(Pa))}return ki.lines=function(){return Vi().map(function(ni){return{type:"LineString",coordinates:ni}})},ki.outline=function(){return{type:"Polygon",coordinates:[Qn(dr).concat(Ei(Ga).slice(1),Qn(_r).reverse().slice(1),Ei(fn).reverse().slice(1))]}},ki.extent=function(ni){return arguments.length?ki.extentMajor(ni).extentMinor(ni):ki.extentMinor()},ki.extentMajor=function(ni){return arguments.length?(dr=+ni[0][0],_r=+ni[1][0],fn=+ni[0][1],Ga=+ni[1][1],dr>_r&&(ni=dr,dr=_r,_r=ni),fn>Ga&&(ni=fn,fn=Ga,Ga=ni),ki.precision(Ii)):[[dr,fn],[_r,Ga]]},ki.extentMinor=function(ni){return arguments.length?(jt=+ni[0][0],Mt=+ni[1][0],Aa=+ni[0][1],ea=+ni[1][1],jt>Mt&&(ni=jt,jt=Mt,Mt=ni),Aa>ea&&(ni=Aa,Aa=ea,ea=ni),ki.precision(Ii)):[[jt,Aa],[Mt,ea]]},ki.step=function(ni){return arguments.length?ki.stepMajor(ni).stepMinor(ni):ki.stepMinor()},ki.stepMajor=function(ni){return arguments.length?(Wa=+ni[0],$a=+ni[1],ki):[Wa,$a]},ki.stepMinor=function(ni){return arguments.length?(gn=+ni[0],qn=+ni[1],ki):[gn,qn]},ki.precision=function(ni){return arguments.length?(Ii=+ni,sn=is(Aa,ea,90),Pa=as(jt,Mt,Ii),Qn=is(fn,Ga,90),Ei=as(dr,_r,Ii),ki):Ii},ki.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function Yo(){return vs()()}function po(Mt,jt){var _r=Mt[0]*p,dr=Mt[1]*p,ea=jt[0]*p,Aa=jt[1]*p,Ga=o(dr),fn=g(dr),gn=o(Aa),qn=g(Aa),Wa=Ga*o(_r),$a=Ga*g(_r),sn=gn*o(ea),Pa=gn*g(ea),Qn=2*_(m(D(Aa-dr)+Ga*gn*D(ea-_r))),Ei=g(Qn),Ii=Qn?function(ki){var Vi=g(ki*=Qn)/Ei,ni=g(Qn-ki)/Ei,Rn=ni*Wa+Vi*sn,no=ni*$a+Vi*Pa,wo=ni*fn+Vi*qn;return[y(no,Rn)*c,y(wo,m(Rn*Rn+no*no))*c]}:function(){return[_r*c,dr*c]};return Ii.distance=Qn,Ii}function _s(Mt){return Mt}var qo=w(),Io=w(),tl,ts,qs,Xs,ps={point:C,lineStart:C,lineEnd:C,polygonStart:function(){ps.lineStart=ml,ps.lineEnd=Wl},polygonEnd:function(){ps.lineStart=ps.lineEnd=ps.point=C,qo.add(f(Io)),Io.reset()},result:function(){var Mt=qo/2;return qo.reset(),Mt}};function ml(){ps.point=xl}function xl(Mt,jt){ps.point=fs,tl=qs=Mt,ts=Xs=jt}function fs(Mt,jt){Io.add(Xs*Mt-qs*jt),qs=Mt,Xs=jt}function Wl(){fs(tl,ts)}var Ss=1/0,ls=Ss,No=-Ss,Do=No,hs={point:Jl,lineStart:C,lineEnd:C,polygonStart:C,polygonEnd:C,result:function(){var Mt=[[Ss,ls],[No,Do]];return No=Do=-(ls=Ss=1/0),Mt}};function Jl(Mt,jt){MtNo&&(No=Mt),jtDo&&(Do=jt)}var du=0,Ql=0,Ou=0,Uu=0,Xu=0,$u=0,fc=0,_c=0,vu=0,pu,mu,eu,Vs,os={point:sl,lineStart:Tu,lineEnd:Hs,polygonStart:function(){os.lineStart=Af,os.lineEnd=Xo},polygonEnd:function(){os.point=sl,os.lineStart=Tu,os.lineEnd=Hs},result:function(){var Mt=vu?[fc/vu,_c/vu]:$u?[Uu/$u,Xu/$u]:Ou?[du/Ou,Ql/Ou]:[NaN,NaN];return du=Ql=Ou=Uu=Xu=$u=fc=_c=vu=0,Mt}};function sl(Mt,jt){du+=Mt,Ql+=jt,++Ou}function Tu(){os.point=ju}function ju(Mt,jt){os.point=bc,sl(eu=Mt,Vs=jt)}function bc(Mt,jt){var _r=Mt-eu,dr=jt-Vs,ea=m(_r*_r+dr*dr);Uu+=ea*(eu+Mt)/2,Xu+=ea*(Vs+jt)/2,$u+=ea,sl(eu=Mt,Vs=jt)}function Hs(){os.point=sl}function Af(){os.point=Mf}function Xo(){ns(pu,mu)}function Mf(Mt,jt){os.point=ns,sl(pu=eu=Mt,mu=Vs=jt)}function ns(Mt,jt){var _r=Mt-eu,dr=jt-Vs,ea=m(_r*_r+dr*dr);Uu+=ea*(eu+Mt)/2,Xu+=ea*(Vs+jt)/2,$u+=ea,ea=Vs*Mt-eu*jt,fc+=ea*(eu+Mt),_c+=ea*(Vs+jt),vu+=ea*3,sl(eu=Mt,Vs=jt)}function so(Mt){this._context=Mt}so.prototype={_radius:4.5,pointRadius:function(Mt){return this._radius=Mt,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Mt,jt){switch(this._point){case 0:{this._context.moveTo(Mt,jt),this._point=1;break}case 1:{this._context.lineTo(Mt,jt);break}default:{this._context.moveTo(Mt+this._radius,jt),this._context.arc(Mt,jt,this._radius,0,s);break}}},result:C};var qu=w(),hc,Ll,Qc,Au,Zu,ll={point:C,lineStart:function(){ll.point=ef},lineEnd:function(){hc&&zc(Ll,Qc),ll.point=C},polygonStart:function(){hc=!0},polygonEnd:function(){hc=null},result:function(){var Mt=+qu;return qu.reset(),Mt}};function ef(Mt,jt){ll.point=zc,Ll=Au=Mt,Qc=Zu=jt}function zc(Mt,jt){Au-=Mt,Zu-=jt,qu.add(m(Au*Au+Zu*Zu)),Au=Mt,Zu=jt}function Ku(){this._string=[]}Ku.prototype={_radius:4.5,_circle:Ju(4.5),pointRadius:function(Mt){return(Mt=+Mt)!==this._radius&&(this._radius=Mt,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Mt,jt){switch(this._point){case 0:{this._string.push("M",Mt,",",jt),this._point=1;break}case 1:{this._string.push("L",Mt,",",jt);break}default:{this._circle==null&&(this._circle=Ju(this._radius)),this._string.push("M",Mt,",",jt,this._circle);break}}},result:function(){if(this._string.length){var Mt=this._string.join("");return this._string=[],Mt}else return null}};function Ju(Mt){return"m0,"+Mt+"a"+Mt+","+Mt+" 0 1,1 0,"+-2*Mt+"a"+Mt+","+Mt+" 0 1,1 0,"+2*Mt+"z"}function Bc(Mt,jt){var _r=4.5,dr,ea;function Aa(Ga){return Ga&&(typeof _r=="function"&&ea.pointRadius(+_r.apply(this,arguments)),B(Ga,dr(ea))),ea.result()}return Aa.area=function(Ga){return B(Ga,dr(ps)),ps.result()},Aa.measure=function(Ga){return B(Ga,dr(ll)),ll.result()},Aa.bounds=function(Ga){return B(Ga,dr(hs)),hs.result()},Aa.centroid=function(Ga){return B(Ga,dr(os)),os.result()},Aa.projection=function(Ga){return arguments.length?(dr=Ga==null?(Mt=null,_s):(Mt=Ga).stream,Aa):Mt},Aa.context=function(Ga){return arguments.length?(ea=Ga==null?(jt=null,new Ku):new so(jt=Ga),typeof _r!="function"&&ea.pointRadius(_r),Aa):jt},Aa.pointRadius=function(Ga){return arguments.length?(_r=typeof Ga=="function"?Ga:(ea.pointRadius(+Ga),+Ga),Aa):_r},Aa.projection(Mt).context(jt)}function Nc(Mt){return{stream:tu(Mt)}}function tu(Mt){return function(jt){var _r=new xc;for(var dr in Mt)_r[dr]=Mt[dr];return _r.stream=jt,_r}}function xc(){}xc.prototype={constructor:xc,point:function(Mt,jt){this.stream.point(Mt,jt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function ru(Mt,jt,_r){var dr=Mt.clipExtent&&Mt.clipExtent();return Mt.scale(150).translate([0,0]),dr!=null&&Mt.clipExtent(null),B(_r,Mt.stream(hs)),jt(hs.result()),dr!=null&&Mt.clipExtent(dr),Mt}function Qu(Mt,jt,_r){return ru(Mt,function(dr){var ea=jt[1][0]-jt[0][0],Aa=jt[1][1]-jt[0][1],Ga=Math.min(ea/(dr[1][0]-dr[0][0]),Aa/(dr[1][1]-dr[0][1])),fn=+jt[0][0]+(ea-Ga*(dr[1][0]+dr[0][0]))/2,gn=+jt[0][1]+(Aa-Ga*(dr[1][1]+dr[0][1]))/2;Mt.scale(150*Ga).translate([fn,gn])},_r)}function $s(Mt,jt,_r){return Qu(Mt,[[0,0],jt],_r)}function ec(Mt,jt,_r){return ru(Mt,function(dr){var ea=+jt,Aa=ea/(dr[1][0]-dr[0][0]),Ga=(ea-Aa*(dr[1][0]+dr[0][0]))/2,fn=-Aa*dr[0][1];Mt.scale(150*Aa).translate([Ga,fn])},_r)}function Iu(Mt,jt,_r){return ru(Mt,function(dr){var ea=+jt,Aa=ea/(dr[1][1]-dr[0][1]),Ga=-Aa*dr[0][0],fn=(ea-Aa*(dr[1][1]+dr[0][1]))/2;Mt.scale(150*Aa).translate([Ga,fn])},_r)}var us=16,wc=o(30*p);function Sf(Mt,jt){return+jt?Vu(Mt,jt):tf(Mt)}function tf(Mt){return tu({point:function(jt,_r){jt=Mt(jt,_r),this.stream.point(jt[0],jt[1])}})}function Vu(Mt,jt){function _r(dr,ea,Aa,Ga,fn,gn,qn,Wa,$a,sn,Pa,Qn,Ei,Ii){var ki=qn-dr,Vi=Wa-ea,ni=ki*ki+Vi*Vi;if(ni>4*jt&&Ei--){var Rn=Ga+sn,no=fn+Pa,wo=gn+Qn,Go=m(Rn*Rn+no*no+wo*wo),bs=_(wo/=Go),Jo=f(f(wo)-1)jt||f((ki*Ws+Vi*xs)/ni-.5)>.3||Ga*sn+fn*Pa+gn*Qn2?bi[2]%360*p:0,Ws()):[fn*c,gn*c,qn*c]},Vo.angle=function(bi){return arguments.length?($a=bi%360*p,Ws()):$a*c},Vo.reflectX=function(bi){return arguments.length?(sn=bi?-1:1,Ws()):sn<0},Vo.reflectY=function(bi){return arguments.length?(Pa=bi?-1:1,Ws()):Pa<0},Vo.precision=function(bi){return arguments.length?(wo=Sf(Go,no=bi*bi),xs()):m(no)},Vo.fitExtent=function(bi,ss){return Qu(Vo,bi,ss)},Vo.fitSize=function(bi,ss){return $s(Vo,bi,ss)},Vo.fitWidth=function(bi,ss){return ec(Vo,bi,ss)},Vo.fitHeight=function(bi,ss){return Iu(Vo,bi,ss)};function Ws(){var bi=Zs(_r,0,0,sn,Pa,$a).apply(null,jt(Aa,Ga)),ss=($a?Zs:Ef)(_r,dr-bi[0],ea-bi[1],sn,Pa,$a);return Wa=hi(fn,gn,qn),Go=bn(jt,ss),bs=bn(Wa,Go),wo=Sf(Go,no),xs()}function xs(){return Jo=Es=null,Vo}return function(){return jt=Mt.apply(this,arguments),Vo.invert=jt.invert&&yl,Ws()}}function Fs(Mt){var jt=0,_r=r/3,dr=af(Mt),ea=dr(jt,_r);return ea.parallels=function(Aa){return arguments.length?dr(jt=Aa[0]*p,_r=Aa[1]*p):[jt*c,_r*c]},ea}function Du(Mt){var jt=o(Mt);function _r(dr,ea){return[dr*jt,g(ea)/jt]}return _r.invert=function(dr,ea){return[dr/jt,_(ea*jt)]},_r}function Nl(Mt,jt){var _r=g(Mt),dr=(_r+g(jt))/2;if(f(dr)=.12&&Ii<.234&&Ei>=-.425&&Ei<-.214?ea:Ii>=.166&&Ii<.234&&Ei>=-.214&&Ei<-.115?Ga:_r).invert(sn)},Wa.stream=function(sn){return Mt&&jt===sn?Mt:Mt=Oc([_r.stream(jt=sn),ea.stream(sn),Ga.stream(sn)])},Wa.precision=function(sn){return arguments.length?(_r.precision(sn),ea.precision(sn),Ga.precision(sn),$a()):_r.precision()},Wa.scale=function(sn){return arguments.length?(_r.scale(sn),ea.scale(sn*.35),Ga.scale(sn),Wa.translate(_r.translate())):_r.scale()},Wa.translate=function(sn){if(!arguments.length)return _r.translate();var Pa=_r.scale(),Qn=+sn[0],Ei=+sn[1];return dr=_r.translate(sn).clipExtent([[Qn-.455*Pa,Ei-.238*Pa],[Qn+.455*Pa,Ei+.238*Pa]]).stream(qn),Aa=ea.translate([Qn-.307*Pa,Ei+.201*Pa]).clipExtent([[Qn-.425*Pa+t,Ei+.12*Pa+t],[Qn-.214*Pa-t,Ei+.234*Pa-t]]).stream(qn),fn=Ga.translate([Qn-.205*Pa,Ei+.212*Pa]).clipExtent([[Qn-.214*Pa+t,Ei+.166*Pa+t],[Qn-.115*Pa-t,Ei+.234*Pa-t]]).stream(qn),$a()},Wa.fitExtent=function(sn,Pa){return Qu(Wa,sn,Pa)},Wa.fitSize=function(sn,Pa){return $s(Wa,sn,Pa)},Wa.fitWidth=function(sn,Pa){return ec(Wa,sn,Pa)},Wa.fitHeight=function(sn,Pa){return Iu(Wa,sn,Pa)};function $a(){return Mt=jt=null,Wa}return Wa.scale(1070)}function gu(Mt){return function(jt,_r){var dr=o(jt),ea=o(_r),Aa=Mt(dr*ea);return[Aa*ea*g(jt),Aa*g(_r)]}}function Ru(Mt){return function(jt,_r){var dr=m(jt*jt+_r*_r),ea=Mt(dr),Aa=g(ea),Ga=o(ea);return[y(jt*Aa,dr*Ga),_(dr&&_r*Aa/dr)]}}var Mu=gu(function(Mt){return m(2/(1+Mt))});Mu.invert=Ru(function(Mt){return 2*_(Mt/2)});function Xf(){return au(Mu).scale(124.75).clipAngle(180-.001)}var vc=gu(function(Mt){return(Mt=x(Mt))&&Mt/g(Mt)});vc.invert=Ru(function(Mt){return Mt});function kf(){return au(vc).scale(79.4188).clipAngle(180-.001)}function Yl(Mt,jt){return[Mt,A(h((n+jt)/2))]}Yl.invert=function(Mt,jt){return[Mt,2*d(M(jt))-n]};function tc(){return rl(Yl).scale(961/s)}function rl(Mt){var jt=au(Mt),_r=jt.center,dr=jt.scale,ea=jt.translate,Aa=jt.clipExtent,Ga=null,fn,gn,qn;jt.scale=function($a){return arguments.length?(dr($a),Wa()):dr()},jt.translate=function($a){return arguments.length?(ea($a),Wa()):ea()},jt.center=function($a){return arguments.length?(_r($a),Wa()):_r()},jt.clipExtent=function($a){return arguments.length?($a==null?Ga=fn=gn=qn=null:(Ga=+$a[0][0],fn=+$a[0][1],gn=+$a[1][0],qn=+$a[1][1]),Wa()):Ga==null?null:[[Ga,fn],[gn,qn]]};function Wa(){var $a=r*dr(),sn=jt(_n(jt.rotate()).invert([0,0]));return Aa(Ga==null?[[sn[0]-$a,sn[1]-$a],[sn[0]+$a,sn[1]+$a]]:Mt===Yl?[[Math.max(sn[0]-$a,Ga),fn],[Math.min(sn[0]+$a,gn),qn]]:[[Ga,Math.max(sn[1]-$a,fn)],[gn,Math.min(sn[1]+$a,qn)]])}return Wa()}function Gu(Mt){return h((n+Mt)/2)}function Nf(Mt,jt){var _r=o(Mt),dr=Mt===jt?g(Mt):A(_r/o(jt))/A(Gu(jt)/Gu(Mt)),ea=_r*E(Gu(Mt),dr)/dr;if(!dr)return Yl;function Aa(Ga,fn){ea>0?fn<-n+t&&(fn=-n+t):fn>n-t&&(fn=n-t);var gn=ea/E(Gu(fn),dr);return[gn*g(dr*Ga),ea-gn*o(dr*Ga)]}return Aa.invert=function(Ga,fn){var gn=ea-fn,qn=T(dr)*m(Ga*Ga+gn*gn),Wa=y(Ga,f(gn))*T(gn);return gn*dr<0&&(Wa-=r*T(Ga)*T(gn)),[Wa/dr,2*d(E(ea/qn,1/dr))-n]},Aa}function Uc(){return Fs(Nf).scale(109.5).parallels([30,30])}function ws(Mt,jt){return[Mt,jt]}ws.invert=ws;function Pl(){return au(ws).scale(152.63)}function Ol(Mt,jt){var _r=o(Mt),dr=Mt===jt?g(Mt):(_r-o(jt))/(jt-Mt),ea=_r/dr+Mt;if(f(dr)t&&--dr>0);return[Mt/(.8707+(Aa=_r*_r)*(-.131979+Aa*(-.013791+Aa*Aa*Aa*(.003971-.001529*Aa)))),_r]};function Sc(){return au(sf).scale(175.295)}function wl(Mt,jt){return[o(jt)*g(Mt),g(jt)]}wl.invert=Ru(_);function Su(){return au(wl).scale(249.5).clipAngle(90+t)}function lf(Mt,jt){var _r=o(jt),dr=1+o(Mt)*_r;return[_r*g(Mt)/dr,g(jt)/dr]}lf.invert=Ru(function(Mt){return 2*d(Mt)});function Lf(){return au(lf).scale(250).clipAngle(142)}function Ec(Mt,jt){return[A(h((n+jt)/2)),-Mt]}Ec.invert=function(Mt,jt){return[-jt,2*d(M(Mt))-n]};function Fu(){var Mt=rl(Ec),jt=Mt.center,_r=Mt.rotate;return Mt.center=function(dr){return arguments.length?jt([-dr[1],dr[0]]):(dr=jt(),[dr[1],-dr[0]])},Mt.rotate=function(dr){return arguments.length?_r([dr[0],dr[1],dr.length>2?dr[2]+90:90]):(dr=_r(),[dr[0],dr[1],dr[2]-90])},_r([0,0,90]).scale(159.155)}u.geoAlbers=dc,u.geoAlbersUsa=nf,u.geoArea=$,u.geoAzimuthalEqualArea=Xf,u.geoAzimuthalEqualAreaRaw=Mu,u.geoAzimuthalEquidistant=kf,u.geoAzimuthalEquidistantRaw=vc,u.geoBounds=Ee,u.geoCentroid=oi,u.geoCircle=Zi,u.geoClipAntimeridian=Vt,u.geoClipCircle=Fr,u.geoClipExtent=Dn,u.geoClipRectangle=La,u.geoConicConformal=Uc,u.geoConicConformalRaw=Nf,u.geoConicEqualArea=Hu,u.geoConicEqualAreaRaw=Nl,u.geoConicEquidistant=jc,u.geoConicEquidistantRaw=Ol,u.geoContains=Ho,u.geoDistance=ao,u.geoEqualEarth=Hc,u.geoEqualEarthRaw=Vc,u.geoEquirectangular=Pl,u.geoEquirectangularRaw=ws,u.geoGnomonic=Cf,u.geoGnomonicRaw=of,u.geoGraticule=vs,u.geoGraticule10=Yo,u.geoIdentity=Mc,u.geoInterpolate=po,u.geoLength=Mo,u.geoMercator=tc,u.geoMercatorRaw=Yl,u.geoNaturalEarth1=Sc,u.geoNaturalEarth1Raw=sf,u.geoOrthographic=Su,u.geoOrthographicRaw=wl,u.geoPath=Bc,u.geoProjection=au,u.geoProjectionMutator=af,u.geoRotation=_n,u.geoStereographic=Lf,u.geoStereographicRaw=lf,u.geoStream=B,u.geoTransform=Nc,u.geoTransverseMercator=Fu,u.geoTransverseMercatorRaw=Ec,Object.defineProperty(u,"__esModule",{value:!0})})}}),H4=xe({"src/lib/usa_location_names.js"(U,O){"use strict";var u={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},v=new Set(Object.values(u));O.exports={usaLocationAbbreviations:v,usaLocationList:u}}}),Z2={};Xa(Z2,{COUNTRIES_X:()=>K2});var K2,G4=Pr({"src/lib/custom_country_codes.ts"(){"use strict";K2=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),_d=xe({"src/lib/geo_location_utils.js"(U,O){"use strict";var u=Na(),{COUNTRIES:v,createLookup:w}=j4(),{area:S}=q4(),{centroid:l}=V4(),{coordAll:e}=O1(),{geoBounds:t}=U1(),a=a0(),r=cd(),n=Us(),i=Gs(),s=f0(),{usaLocationAbbreviations:c,usaLocationList:p}=H4(),{COUNTRIES_X:f}=(G4(),Ta(Z2)),{lookupAlpha3:d}=w([...v,...f]),y={"ISO-3":a,"USA-states":b,"country names":o};function o(F){let I=d(F);return I||(r.log("Unrecognized country name: "+F+"."),!1)}function b(F){F=F.trim();let I=c.has(F.toUpperCase())?F.toUpperCase():p[F.toLowerCase()];return I||(r.log("Unrecognized US location: "+F+"."),!1)}function M(F,I,z){var R;if(!I||typeof I!="string")return!1;let k=y[F](I);if(k){let B;if(F==="USA-states"){B=[];for(let N of z)((R=N?.properties)==null?void 0:R.gu)==="USA"&&B.push(N)}else B=z;for(let N of B)if(N.id===k)return N;r.log(`Location with id ${k} does not have a matching topojson feature at this resolution.`)}return!1}var A=360;function E(F){for(let I=0;I0&&F[I+1][0]<0)return I;return null}function g(F){var I=F.geometry,z=I.coordinates,R=F.id,k=[],B,N,q,Y;switch(R==="RUS"||R==="FJI"?B=function(ee){var te;if(E(ee)===null)te=ee;else for(te=new Array(ee.length),Y=0;Yte?ae[j++]=[ee[Y][0]+A,ee[Y][1]]:Y===te?(ae[j++]=ee[Y],ae[j++]=[ee[Y][0],-90]):ae[j++]=ee[Y];var G=s.tester(ae);G.pts.pop(),k.push(G)}:B=function(ee){k.push(s.tester(ee))},I.type){case"MultiPolygon":for(N=0;N0?K.properties.ct=h(K):K.properties.ct=[NaN,NaN],j.fIn=te,j.fOut=K,k.push(K)}else r.log(["Location",j.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete R[ae]}switch(z.type){case"FeatureCollection":var Y=z.features;for(B=0;Bk&&(k=q,z=N)}else z=I;return l(z).geometry.coordinates}function x(F){var I=window.PlotlyGeoAssets||{},z=[];function R(Y){return new Promise(function(ee,te){u.json(Y,function(ae,j){if(ae){delete I[Y];var G=ae.status===404?'GeoJSON at URL "'+Y+'" does not exist.':"Unexpected error while fetching from "+Y;return te(new Error(G))}return I[Y]=j,ee(j)})})}function k(Y){return new Promise(function(ee,te){var ae=0,j=setInterval(function(){if(I[Y]&&I[Y]!=="pending")return clearInterval(j),ee(I[Y]);if(ae>100)return clearInterval(j),te("Unexpected error while fetching from "+Y);ae++},50)})}for(var B=0;Bq-Y);if(I.length<2)return null;let z=I.length,R=I[z-1]-I[0];if(R>=360)return null;let k=-1/0,B=-1;for(let q=0;qk&&(k=Y,B=q)}let N=360-R;return k<=N?null:[I[B+1],I[B]+A]}function C([F,I]){return[F,F>I?I+A:I]}O.exports={locationToFeature:M,feature2polygons:g,getTraceGeojson:T,extractTraceFeature:m,fetchTraceGeoData:x,computeBbox:_,doesCrossAntiMeridian:E,getFitboundsLonRange:D,unwrapLonRange:C,ANTIMERIDIAN_LON_SHIFT:A}}}),J2=xe({"src/traces/scattergeo/style.js"(U,O){"use strict";var u=Na(),v=go(),w=wi(),S=Yf(),l=S.stylePoints,e=S.styleText;O.exports=function(r,n){n&&t(r,n)};function t(a,r){var n=r[0].trace,i=r[0].node3;i.style("opacity",r[0].trace.opacity),l(i,n,a),e(i,n,a),i.selectAll("path.js-line").style("fill","none").each(function(s){var c=u.select(this),p=s.trace,f=p.line||{};c.call(w.stroke,f.color).call(v.dashLine,f.dash||"",f.width||0),p.fill!=="none"&&c.call(w.fill,p.fillcolor)})}}}),Q2=xe({"src/traces/scattergeo/plot.js"(U,O){"use strict";var u=Na(),v=Sr(),w=B1().getTopojsonFeatures,S=J0(),l=_d(),e=Ah().findExtremes,t=Gn().BADNUM,a=vh().calcMarkerSize,r=Cl(),n=J2();function i(c,p,f){var d=p.layers.frontplot.select(".scatterlayer"),y=v.makeTraceGroups(d,f,"trace scattergeo");function o(b,M){b.lonlat[0]===t&&u.select(M).remove()}y.selectAll("*").remove(),y.each(function(b){var M=u.select(this),A=b[0].trace;if(r.hasLines(A)||A.fill!=="none"){var E=S.calcTraceToLineCoords(b),g=A.fill!=="none"?S.makePolygon(E):S.makeLine(E);M.selectAll("path.js-line").data([{geojson:g,trace:A}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(A)&&M.selectAll("path.point").data(v.identity).enter().append("path").classed("point",!0).each(function(T){o(T,this)}),r.hasText(A)&&M.selectAll("g").data(v.identity).enter().append("g").append("text").each(function(T){o(T,this)}),n(c,b)})}function s(c,p){var f=c[0].trace,d=p[f.geo],y=d._subplot,o=f._length,b,M;if(v.isArrayOrTypedArray(f.locations)){var A=f.locationmode,E=A==="geojson-id"?l.extractTraceFeature(c):w(f,y.topojson);for(b=0;b")}}}),Y4=xe({"src/traces/scattergeo/event_data.js"(U,O){"use strict";O.exports=function(v,w,S,l,e){v.lon=w.lon,v.lat=w.lat,v.location=w.loc?w.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(v.properties=t.fIn.properties),v}}}),X4=xe({"src/traces/scattergeo/select.js"(U,O){"use strict";var u=Cl(),v=Gn().BADNUM;O.exports=function(S,l){var e=S.cd,t=S.xaxis,a=S.yaxis,r=[],n=e[0].trace,i,s,c,p,f,d=!u.hasMarkers(n)&&!u.hasText(n);if(d)return[];if(l===!1)for(f=0;f0?1:Le<0?-1:0},d=Math.sin,y=Math.tan,o=1e-6,b=1e-12,M=Math.PI,A=M/2,E=M/4,g=Math.SQRT1_2,T=I(2),m=I(M),h=M*2,x=180/M,_=M/180;function D(Le){return Le?Le/Math.sin(Le):1}function C(Le){return Le>1?A:Le<-1?-A:Math.asin(Le)}function F(Le){return Le>1?0:Le<-1?M:Math.acos(Le)}function I(Le){return Le>0?Math.sqrt(Le):0}function z(Le){return Le=a(2*Le),(Le-1)/(Le+1)}function R(Le){return(a(Le)-a(-Le))/2}function k(Le){return(a(Le)+a(-Le))/2}function B(Le){return n(Le+I(Le*Le+1))}function N(Le){return n(Le+I(Le*Le-1))}function q(Le){var ze=y(Le/2),je=2*n(t(Le/2))/(ze*ze);function Xe(st,Qe){var ht=t(st),Dt=t(Qe),Ot=d(Qe),$t=Dt*ht,ir=-((1-$t?n((1+$t)/2)/(1-$t):-.5)+je/(1+$t));return[ir*Dt*d(st),ir*Ot]}return Xe.invert=function(st,Qe){var ht=I(st*st+Qe*Qe),Dt=-Le/2,Ot=50,$t;if(!ht)return[0,0];do{var ir=Dt/2,pr=t(ir),zr=d(ir),Wr=zr/pr,ia=-n(S(pr));Dt-=$t=(2/Wr*ia-je*Wr-ht)/(-ia/(zr*zr)+1-je/(2*pr*pr))*(pr<0?.7:1)}while(S($t)>o&&--Ot>0);var Sa=d(Dt);return[e(st*Sa,ht*t(Dt)),C(Qe*Sa/ht)]},Xe}function Y(){var Le=A,ze=v.geoProjectionMutator(q),je=ze(Le);return je.radius=function(Xe){return arguments.length?ze(Le=Xe*_):Le*x},je.scale(179.976).clipAngle(147)}function ee(Le,ze){var je=t(ze),Xe=D(F(je*t(Le/=2)));return[2*je*d(Le)*Xe,d(ze)*Xe]}ee.invert=function(Le,ze){if(!(Le*Le+4*ze*ze>M*M+o)){var je=Le,Xe=ze,st=25;do{var Qe=d(je),ht=d(je/2),Dt=t(je/2),Ot=d(Xe),$t=t(Xe),ir=d(2*Xe),pr=Ot*Ot,zr=$t*$t,Wr=ht*ht,ia=1-zr*Dt*Dt,Sa=ia?F($t*Dt)*I(ln=1/ia):ln=0,ln,an=2*Sa*$t*ht-Le,wn=Sa*Ot-ze,ei=ln*(zr*Wr+Sa*$t*Dt*pr),Mi=ln*(.5*Qe*ir-Sa*2*Ot*ht),pi=ln*.25*(ir*ht-Sa*Ot*zr*Qe),Ki=ln*(pr*Dt+Sa*Wr*$t),Lo=Mi*pi-Ki*ei;if(!Lo)break;var bo=(wn*Mi-an*Ki)/Lo,ds=(an*pi-wn*ei)/Lo;je-=bo,Xe-=ds}while((S(bo)>o||S(ds)>o)&&--st>0);return[je,Xe]}};function te(){return v.geoProjection(ee).scale(152.63)}function ae(Le){var ze=d(Le),je=t(Le),Xe=Le>=0?1:-1,st=y(Xe*Le),Qe=(1+ze-je)/2;function ht(Dt,Ot){var $t=t(Ot),ir=t(Dt/=2);return[(1+$t)*d(Dt),(Xe*Ot>-e(ir,st)-.001?0:-Xe*10)+Qe+d(Ot)*je-(1+$t)*ze*ir]}return ht.invert=function(Dt,Ot){var $t=0,ir=0,pr=50;do{var zr=t($t),Wr=d($t),ia=t(ir),Sa=d(ir),ln=1+ia,an=ln*Wr-Dt,wn=Qe+Sa*je-ln*ze*zr-Ot,ei=ln*zr/2,Mi=-Wr*Sa,pi=ze*ln*Wr/2,Ki=je*ia+ze*zr*Sa,Lo=Mi*pi-Ki*ei,bo=(wn*Mi-an*Ki)/Lo/2,ds=(an*pi-wn*ei)/Lo;S(ds)>2&&(ds/=2),$t-=bo,ir-=ds}while((S(bo)>o||S(ds)>o)&&--pr>0);return Xe*ir>-e(t($t),st)-.001?[$t*2,ir]:null},ht}function j(){var Le=20*_,ze=Le>=0?1:-1,je=y(ze*Le),Xe=v.geoProjectionMutator(ae),st=Xe(Le),Qe=st.stream;return st.parallel=function(ht){return arguments.length?(je=y((ze=(Le=ht*_)>=0?1:-1)*Le),Xe(Le)):Le*x},st.stream=function(ht){var Dt=st.rotate(),Ot=Qe(ht),$t=(st.rotate([0,0]),Qe(ht)),ir=st.precision();return st.rotate(Dt),Ot.sphere=function(){$t.polygonStart(),$t.lineStart();for(var pr=ze*-180;ze*pr<180;pr+=ze*90)$t.point(pr,ze*90);if(Le)for(;ze*(pr-=3*ze*ir)>=-180;)$t.point(pr,ze*-e(t(pr*_/2),je)*x);$t.lineEnd(),$t.polygonEnd()},Ot},st.scale(218.695).center([0,28.0974])}function G(Le,ze){var je=y(ze/2),Xe=I(1-je*je),st=1+Xe*t(Le/=2),Qe=d(Le)*Xe/st,ht=je/st,Dt=Qe*Qe,Ot=ht*ht;return[4/3*Qe*(3+Dt-3*Ot),4/3*ht*(3+3*Dt-Ot)]}G.invert=function(Le,ze){if(Le*=3/8,ze*=3/8,!Le&&S(ze)>1)return null;var je=Le*Le,Xe=ze*ze,st=1+je+Xe,Qe=I((st-I(st*st-4*ze*ze))/2),ht=C(Qe)/3,Dt=Qe?N(S(ze/Qe))/3:B(S(Le))/3,Ot=t(ht),$t=k(Dt),ir=$t*$t-Ot*Ot;return[f(Le)*2*e(R(Dt)*Ot,.25-ir),f(ze)*2*e($t*d(ht),.25+ir)]};function K(){return v.geoProjection(G).scale(66.1603)}var H=I(8),Z=n(1+T);function X(Le,ze){var je=S(ze);return jeb&&--Xe>0);return[Le/(t(je)*(H-1/d(je))),f(ze)*je]};function $(){return v.geoProjection(X).scale(112.314)}function Q(Le){var ze=2*M/Le;function je(Xe,st){var Qe=v.geoAzimuthalEquidistantRaw(Xe,st);if(S(Xe)>A){var ht=e(Qe[1],Qe[0]),Dt=I(Qe[0]*Qe[0]+Qe[1]*Qe[1]),Ot=ze*p((ht-A)/ze)+A,$t=e(d(ht-=Ot),2-t(ht));ht=Ot+C(M/Dt*d($t))-$t,Qe[0]=Dt*t(ht),Qe[1]=Dt*d(ht)}return Qe}return je.invert=function(Xe,st){var Qe=I(Xe*Xe+st*st);if(Qe>A){var ht=e(st,Xe),Dt=ze*p((ht-A)/ze)+A,Ot=ht>Dt?-1:1,$t=Qe*t(Dt-ht),ir=1/y(Ot*F(($t-M)/I(M*(M-2*$t)+Qe*Qe)));ht=Dt+2*l((ir+Ot*I(ir*ir-3))/3),Xe=Qe*t(ht),st=Qe*d(ht)}return v.geoAzimuthalEquidistantRaw.invert(Xe,st)},je}function re(){var Le=5,ze=v.geoProjectionMutator(Q),je=ze(Le),Xe=je.stream,st=.01,Qe=-t(st*_),ht=d(st*_);return je.lobes=function(Dt){return arguments.length?ze(Le=+Dt):Le},je.stream=function(Dt){var Ot=je.rotate(),$t=Xe(Dt),ir=(je.rotate([0,0]),Xe(Dt));return je.rotate(Ot),$t.sphere=function(){ir.polygonStart(),ir.lineStart();for(var pr=0,zr=360/Le,Wr=2*M/Le,ia=90-180/Le,Sa=A;pr0&&S(st)>o);return Xe<0?NaN:je}function Se(Le,ze,je){return ze===void 0&&(ze=40),je===void 0&&(je=b),function(Xe,st,Qe,ht){var Dt,Ot,$t;Qe=Qe===void 0?0:+Qe,ht=ht===void 0?0:+ht;for(var ir=0;irDt){Qe-=Ot/=2,ht-=$t/=2;continue}Dt=ia;var Sa=(Qe>0?-1:1)*je,ln=(ht>0?-1:1)*je,an=Le(Qe+Sa,ht),wn=Le(Qe,ht+ln),ei=(an[0]-pr[0])/Sa,Mi=(an[1]-pr[1])/Sa,pi=(wn[0]-pr[0])/ln,Ki=(wn[1]-pr[1])/ln,Lo=Ki*ei-Mi*pi,bo=(S(Lo)<.5?.5:1)/Lo;if(Ot=(Wr*pi-zr*Ki)*bo,$t=(zr*Mi-Wr*ei)*bo,Qe+=Ot,ht+=$t,S(Ot)0&&(Dt[1]*=1+Ot/1.5*Dt[0]*Dt[0]),Dt}return Xe.invert=Se(Xe),Xe}function Ue(){return v.geoProjection(Ce()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Oe(Le,ze){var je=Le*d(ze),Xe=30,st;do ze-=st=(ze+d(ze)-je)/(1+t(ze));while(S(st)>o&&--Xe>0);return ze/2}function _e(Le,ze,je){function Xe(st,Qe){return[Le*st*t(Qe=Oe(je,Qe)),ze*d(Qe)]}return Xe.invert=function(st,Qe){return Qe=C(Qe/ze),[st/(Le*t(Qe)),C((2*Qe+d(2*Qe))/je)]},Xe}var ce=_e(T/A,T,M);function ie(){return v.geoProjection(ce).scale(169.529)}var se=2.00276,ne=1.11072;function be(Le,ze){var je=Oe(M,ze);return[se*Le/(1/t(ze)+ne/t(je)),(ze+T*d(je))/se]}be.invert=function(Le,ze){var je=se*ze,Xe=ze<0?-E:E,st=25,Qe,ht;do ht=je-T*d(Xe),Xe-=Qe=(d(2*Xe)+2*Xe-M*d(ht))/(2*t(2*Xe)+2+M*t(ht)*T*t(Xe));while(S(Qe)>o&&--st>0);return ht=je-T*d(Xe),[Le*(1/t(ht)+ne/t(Xe))/se,ht]};function De(){return v.geoProjection(be).scale(160.857)}function qe(Le){var ze=0,je=v.geoProjectionMutator(Le),Xe=je(ze);return Xe.parallel=function(st){return arguments.length?je(ze=st*_):ze*x},Xe}function Ne(Le,ze){return[Le*t(ze),ze]}Ne.invert=function(Le,ze){return[Le/t(ze),ze]};function ut(){return v.geoProjection(Ne).scale(152.63)}function ot(Le){if(!Le)return Ne;var ze=1/y(Le);function je(Xe,st){var Qe=ze+Le-st,ht=Qe&&Xe*t(st)/Qe;return[Qe*d(ht),ze-Qe*t(ht)]}return je.invert=function(Xe,st){var Qe=I(Xe*Xe+(st=ze-st)*st),ht=ze+Le-Qe;return[Qe/t(ht)*e(Xe,st),ht]},je}function yt(){return qe(ot).scale(123.082).center([0,26.1441]).parallel(45)}function At(Le){function ze(je,Xe){var st=A-Xe,Qe=st&&je*Le*d(st)/st;return[st*d(Qe)/Le,A-st*t(Qe)]}return ze.invert=function(je,Xe){var st=je*Le,Qe=A-Xe,ht=I(st*st+Qe*Qe),Dt=e(st,Qe);return[(ht?ht/d(ht):1)*Dt/Le,A-ht]},ze}function It(){var Le=.5,ze=v.geoProjectionMutator(At),je=ze(Le);return je.fraction=function(Xe){return arguments.length?ze(Le=+Xe):Le},je.scale(158.837)}var Zt=_e(1,4/M,M);function vr(){return v.geoProjection(Zt).scale(152.63)}function Ut(Le,ze,je,Xe,st,Qe){var ht=t(Qe),Dt;if(S(Le)>1||S(Qe)>1)Dt=F(je*st+ze*Xe*ht);else{var Ot=d(Le/2),$t=d(Qe/2);Dt=2*C(I(Ot*Ot+ze*Xe*$t*$t))}return S(Dt)>o?[Dt,e(Xe*d(Qe),ze*st-je*Xe*ht)]:[0,0]}function Jt(Le,ze,je){return F((Le*Le+ze*ze-je*je)/(2*Le*ze))}function at(Le){return Le-2*M*r((Le+M)/(2*M))}function Ee(Le,ze,je){for(var Xe=[[Le[0],Le[1],d(Le[1]),t(Le[1])],[ze[0],ze[1],d(ze[1]),t(ze[1])],[je[0],je[1],d(je[1]),t(je[1])]],st=Xe[2],Qe,ht=0;ht<3;++ht,st=Qe)Qe=Xe[ht],st.v=Ut(Qe[1]-st[1],st[3],st[2],Qe[3],Qe[2],Qe[0]-st[0]),st.point=[0,0];var Dt=Jt(Xe[0].v[0],Xe[2].v[0],Xe[1].v[0]),Ot=Jt(Xe[0].v[0],Xe[1].v[0],Xe[2].v[0]),$t=M-Dt;Xe[2].point[1]=0,Xe[0].point[0]=-(Xe[1].point[0]=Xe[0].v[0]/2);var ir=[Xe[2].point[0]=Xe[0].point[0]+Xe[2].v[0]*t(Dt),2*(Xe[0].point[1]=Xe[1].point[1]=Xe[2].v[0]*d(Dt))];function pr(zr,Wr){var ia=d(Wr),Sa=t(Wr),ln=new Array(3),an;for(an=0;an<3;++an){var wn=Xe[an];if(ln[an]=Ut(Wr-wn[1],wn[3],wn[2],Sa,ia,zr-wn[0]),!ln[an][0])return wn.point;ln[an][1]=at(ln[an][1]-wn.v[1])}var ei=ir.slice();for(an=0;an<3;++an){var Mi=an==2?0:an+1,pi=Jt(Xe[an].v[0],ln[an][0],ln[Mi][0]);ln[an][1]<0&&(pi=-pi),an?an==1?(pi=Ot-pi,ei[0]-=ln[an][0]*t(pi),ei[1]-=ln[an][0]*d(pi)):(pi=$t-pi,ei[0]+=ln[an][0]*t(pi),ei[1]+=ln[an][0]*d(pi)):(ei[0]+=ln[an][0]*t(pi),ei[1]-=ln[an][0]*d(pi))}return ei[0]/=3,ei[1]/=3,ei}return pr}function Re(Le){return Le[0]*=_,Le[1]*=_,Le}function he(){return ye([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function ye(Le,ze,je){var Xe=v.geoCentroid({type:"MultiPoint",coordinates:[Le,ze,je]}),st=[-Xe[0],-Xe[1]],Qe=v.geoRotation(st),ht=Ee(Re(Qe(Le)),Re(Qe(ze)),Re(Qe(je)));ht.invert=Se(ht);var Dt=v.geoProjection(ht).rotate(st),Ot=Dt.center;return delete Dt.rotate,Dt.center=function($t){return arguments.length?Ot(Qe($t)):Qe.invert(Ot())},Dt.clipAngle(90)}function Ie(Le,ze){var je=I(1-d(ze));return[2/m*Le*je,m*(1-je)]}Ie.invert=function(Le,ze){var je=(je=ze/m-1)*je;return[je>0?Le*I(M/je)/2:0,C(1-je)]};function Fe(){return v.geoProjection(Ie).scale(95.6464).center([0,30])}function He(Le){var ze=y(Le);function je(Xe,st){return[Xe,(Xe?Xe/d(Xe):1)*(d(st)*t(Xe)-ze*t(st))]}return je.invert=ze?function(Xe,st){Xe&&(st*=d(Xe)/Xe);var Qe=t(Xe);return[Xe,2*e(I(Qe*Qe+ze*ze-st*st)-Qe,ze-st)]}:function(Xe,st){return[Xe,C(Xe?st*y(Xe)/Xe:st)]},je}function We(){return qe(He).scale(249.828).clipAngle(90)}var pt=I(3);function ct(Le,ze){return[pt*Le*(2*t(2*ze/3)-1)/m,pt*m*d(ze/3)]}ct.invert=function(Le,ze){var je=3*C(ze/(pt*m));return[m*Le/(pt*(2*t(2*je/3)-1)),je]};function ft(){return v.geoProjection(ct).scale(156.19)}function mt(Le){var ze=t(Le);function je(Xe,st){return[Xe*ze,d(st)/ze]}return je.invert=function(Xe,st){return[Xe/ze,C(st*ze)]},je}function _t(){return qe(mt).parallel(38.58).scale(195.044)}function Bt(Le){var ze=t(Le);function je(Xe,st){return[Xe*ze,(1+ze)*y(st/2)]}return je.invert=function(Xe,st){return[Xe/ze,l(st/(1+ze))*2]},je}function Et(){return qe(Bt).scale(124.75)}function hr(Le,ze){var je=I(8/(3*M));return[je*Le*(1-S(ze)/M),je*ze]}hr.invert=function(Le,ze){var je=I(8/(3*M)),Xe=ze/je;return[Le/(je*(1-S(Xe)/M)),Xe]};function $r(){return v.geoProjection(hr).scale(165.664)}function ca(Le,ze){var je=I(4-3*d(S(ze)));return[2/I(6*M)*Le*je,f(ze)*I(2*M/3)*(2-je)]}ca.invert=function(Le,ze){var je=2-S(ze)/I(2*M/3);return[Le*I(6*M)/(2*je),f(ze)*C((4-je*je)/3)]};function na(){return v.geoProjection(ca).scale(165.664)}function wa(Le,ze){var je=I(M*(4+M));return[2/je*Le*(1+I(1-4*ze*ze/(M*M))),4/je*ze]}wa.invert=function(Le,ze){var je=I(M*(4+M))/2;return[Le*je/(1+I(1-ze*ze*(4+M)/(4*M))),ze*je/2]};function pa(){return v.geoProjection(wa).scale(180.739)}function fa(Le,ze){var je=(2+A)*d(ze);ze/=2;for(var Xe=0,st=1/0;Xe<10&&S(st)>o;Xe++){var Qe=t(ze);ze-=st=(ze+d(ze)*(Qe+2)-je)/(2*Qe*(1+Qe))}return[2/I(M*(4+M))*Le*(1+t(ze)),2*I(M/(4+M))*d(ze)]}fa.invert=function(Le,ze){var je=ze*I((4+M)/M)/2,Xe=C(je),st=t(Xe);return[Le/(2/I(M*(4+M))*(1+st)),C((Xe+je*(st+2))/(2+A))]};function za(){return v.geoProjection(fa).scale(180.739)}function Ia(Le,ze){return[Le*(1+t(ze))/I(2+M),2*ze/I(2+M)]}Ia.invert=function(Le,ze){var je=I(2+M),Xe=ze*je/2;return[je*Le/(1+t(Xe)),Xe]};function Va(){return v.geoProjection(Ia).scale(173.044)}function Oa(Le,ze){for(var je=(1+A)*d(ze),Xe=0,st=1/0;Xe<10&&S(st)>o;Xe++)ze-=st=(ze+d(ze)-je)/(1+t(ze));return je=I(2+M),[Le*(1+t(ze))/je,2*ze/je]}Oa.invert=function(Le,ze){var je=1+A,Xe=I(je/2);return[Le*2*Xe/(1+t(ze*=Xe)),C((ze+d(ze))/je)]};function tn(){return v.geoProjection(Oa).scale(173.044)}var ka=3+2*T;function oi(Le,ze){var je=d(Le/=2),Xe=t(Le),st=I(t(ze)),Qe=t(ze/=2),ht=d(ze)/(Qe+T*Xe*st),Dt=I(2/(1+ht*ht)),Ot=I((T*Qe+(Xe+je)*st)/(T*Qe+(Xe-je)*st));return[ka*(Dt*(Ot-1/Ot)-2*n(Ot)),ka*(Dt*ht*(Ot+1/Ot)-2*l(ht))]}oi.invert=function(Le,ze){if(!(Qe=G.invert(Le/1.2,ze*1.065)))return null;var je=Qe[0],Xe=Qe[1],st=20,Qe;Le/=ka,ze/=ka;do{var ht=je/2,Dt=Xe/2,Ot=d(ht),$t=t(ht),ir=d(Dt),pr=t(Dt),zr=t(Xe),Wr=I(zr),ia=ir/(pr+T*$t*Wr),Sa=ia*ia,ln=I(2/(1+Sa)),an=T*pr+($t+Ot)*Wr,wn=T*pr+($t-Ot)*Wr,ei=an/wn,Mi=I(ei),pi=Mi-1/Mi,Ki=Mi+1/Mi,Lo=ln*pi-2*n(Mi)-Le,bo=ln*ia*Ki-2*l(ia)-ze,ds=ir&&g*Wr*Ot*Sa/ir,Zo=(T*$t*pr+Wr)/(2*(pr+T*$t*Wr)*(pr+T*$t*Wr)*Wr),Is=-.5*ia*ln*ln*ln,Ys=Is*ds,Ks=Is*Zo,ks=(ks=2*pr+T*Wr*($t-Ot))*ks*Mi,zs=(T*$t*pr*Wr+zr)/ks,Il=-(T*Ot*ir)/(Wr*ks),_u=pi*Ys-2*zs/Mi+ln*(zs+zs/ei),Xl=pi*Ks-2*Il/Mi+ln*(Il+Il/ei),il=ia*Ki*Ys-2*ds/(1+Sa)+ln*Ki*ds+ln*ia*(zs-zs/ei),ku=ia*Ki*Ks-2*Zo/(1+Sa)+ln*Ki*Zo+ln*ia*(Il-Il/ei),bu=Xl*il-ku*_u;if(!bu)break;var _l=(bo*Xl-Lo*ku)/bu,Dl=(Lo*il-bo*_u)/bu;je-=_l,Xe=i(-A,s(A,Xe-Dl))}while((S(_l)>o||S(Dl)>o)&&--st>0);return S(S(Xe)-A)Xe){var pr=I(ir),zr=e($t,Ot),Wr=je*p(zr/je),ia=zr-Wr,Sa=Le*t(ia),ln=(Le*d(ia)-ia*d(Sa))/(A-Sa),an=rn(ia,ln),wn=(M-Le)/nt(an,Sa,M);Ot=pr;var ei=50,Mi;do Ot-=Mi=(Le+nt(an,Sa,Ot)*wn-pr)/(an(Ot)*wn);while(S(Mi)>o&&--ei>0);$t=ia*d(Ot),OtXe){var Ot=I(Dt),$t=e(ht,Qe),ir=je*p($t/je),pr=$t-ir;Qe=Ot*t(pr),ht=Ot*d(pr);for(var zr=Qe-A,Wr=d(Qe),ia=ht/Wr,Sa=Qeo||S(ia)>o)&&--Sa>0);return[pr,zr]},Ot}var Xt=Qt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function nr(){return v.geoProjection(Xt).scale(149.995)}var cr=Qt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function rr(){return v.geoProjection(cr).scale(153.93)}var Ze=Qt(5/6*M,-.62636,-.0344,0,1.3493,-.05524,0,.045);function xt(){return v.geoProjection(Ze).scale(130.945)}function Vt(Le,ze){var je=Le*Le,Xe=ze*ze;return[Le*(1-.162388*Xe)*(.87-952426e-9*je*je),ze*(1+Xe/12)]}Vt.invert=function(Le,ze){var je=Le,Xe=ze,st=50,Qe;do{var ht=Xe*Xe;Xe-=Qe=(Xe*(1+ht/12)-ze)/(1+ht/4)}while(S(Qe)>o&&--st>0);st=50,Le/=1-.162388*ht;do{var Dt=(Dt=je*je)*Dt;je-=Qe=(je*(.87-952426e-9*Dt)-Le)/(.87-.00476213*Dt)}while(S(Qe)>o&&--st>0);return[je,Xe]};function er(){return v.geoProjection(Vt).scale(131.747)}var Tr=Qt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function jr(){return v.geoProjection(Tr).scale(131.087)}function Fr(Le){var ze=Le(A,0)[0]-Le(-A,0)[0];function je(Xe,st){var Qe=Xe>0?-.5:.5,ht=Le(Xe+Qe*M,st);return ht[0]-=Qe*ze,ht}return Le.invert&&(je.invert=function(Xe,st){var Qe=Xe>0?-.5:.5,ht=Le.invert(Xe+Qe*ze,st),Dt=ht[0]-Qe*M;return Dt<-M?Dt+=2*M:Dt>M&&(Dt-=2*M),ht[0]=Dt,ht}),je}function kr(Le,ze){var je=f(Le),Xe=f(ze),st=t(ze),Qe=t(Le)*st,ht=d(Le)*st,Dt=d(Xe*ze);Le=S(e(ht,Dt)),ze=C(Qe),S(Le-A)>o&&(Le%=A);var Ot=ra(Le>M/4?A-Le:Le,ze);return Le>M/4&&(Dt=Ot[0],Ot[0]=-Ot[1],Ot[1]=-Dt),Ot[0]*=je,Ot[1]*=-Xe,Ot}kr.invert=function(Le,ze){S(Le)>1&&(Le=f(Le)*2-Le),S(ze)>1&&(ze=f(ze)*2-ze);var je=f(Le),Xe=f(ze),st=-je*Le,Qe=-Xe*ze,ht=Qe/st<1,Dt=ja(ht?Qe:st,ht?st:Qe),Ot=Dt[0],$t=Dt[1],ir=t($t);return ht&&(Ot=-A-Ot),[je*(e(d(Ot)*ir,-d($t))+M),Xe*C(t(Ot)*ir)]};function ra(Le,ze){if(ze===A)return[0,0];var je=d(ze),Xe=je*je,st=Xe*Xe,Qe=1+st,ht=1+3*st,Dt=1-st,Ot=C(1/I(Qe)),$t=Dt+Xe*Qe*Ot,ir=(1-je)/$t,pr=I(ir),zr=ir*Qe,Wr=I(zr),ia=pr*Dt,Sa,ln;if(Le===0)return[0,-(ia+Xe*Wr)];var an=t(ze),wn=1/an,ei=2*je*an,Mi=(-3*Xe+Ot*ht)*ei,pi=(-$t*an-(1-je)*Mi)/($t*$t),Ki=.5*pi/pr,Lo=Dt*Ki-2*Xe*pr*ei,bo=Xe*Qe*pi+ir*ht*ei,ds=-wn*ei,Zo=-wn*bo,Is=-2*wn*Lo,Ys=4*Le/M,Ks;if(Le>.222*M||ze.175*M){if(Sa=(ia+Xe*I(zr*(1+st)-ia*ia))/(1+st),Le>M/4)return[Sa,Sa];var ks=Sa,zs=.5*Sa;Sa=.5*(zs+ks),ln=50;do{var Il=I(zr-Sa*Sa),_u=Sa*(Is+ds*Il)+Zo*C(Sa/Wr)-Ys;if(!_u)break;_u<0?zs=Sa:ks=Sa,Sa=.5*(zs+ks)}while(S(ks-zs)>o&&--ln>0)}else{Sa=o,ln=25;do{var Xl=Sa*Sa,il=I(zr-Xl),ku=Is+ds*il,bu=Sa*ku+Zo*C(Sa/Wr)-Ys,_l=ku+(Zo-ds*Xl)/il;Sa-=Ks=il?bu/_l:0}while(S(Ks)>o&&--ln>0)}return[Sa,-ia-Xe*I(zr-Sa*Sa)]}function ja(Le,ze){for(var je=0,Xe=1,st=.5,Qe=50;;){var ht=st*st,Dt=I(st),Ot=C(1/I(1+ht)),$t=1-ht+st*(1+ht)*Ot,ir=(1-Dt)/$t,pr=I(ir),zr=ir*(1+ht),Wr=pr*(1-ht),ia=zr-Le*Le,Sa=I(ia),ln=ze+Wr+st*Sa;if(S(Xe-je)0?je=st:Xe=st,st=.5*(je+Xe)}if(!Qe)return null;var an=C(Dt),wn=t(an),ei=1/wn,Mi=2*Dt*wn,pi=(-3*st+Ot*(1+3*ht))*Mi,Ki=(-$t*wn-(1-Dt)*pi)/($t*$t),Lo=.5*Ki/pr,bo=(1-ht)*Lo-2*st*pr*Mi,ds=-2*ei*bo,Zo=-ei*Mi,Is=-ei*(st*(1+ht)*Ki+ir*(1+3*ht)*Mi);return[M/4*(Le*(ds+Zo*Sa)+Is*C(Le/I(zr))),an]}function La(){return v.geoProjection(Fr(kr)).scale(239.75)}function Dn(Le,ze,je){var Xe,st,Qe;return Le?(Xe=Mn(Le,je),ze?(st=Mn(ze,1-je),Qe=st[1]*st[1]+je*Xe[0]*Xe[0]*st[0]*st[0],[[Xe[0]*st[2]/Qe,Xe[1]*Xe[2]*st[0]*st[1]/Qe],[Xe[1]*st[1]/Qe,-Xe[0]*Xe[2]*st[0]*st[2]/Qe],[Xe[2]*st[1]*st[2]/Qe,-je*Xe[0]*Xe[1]*st[0]/Qe]]):[[Xe[0],0],[Xe[1],0],[Xe[2],0]]):(st=Mn(ze,1-je),[[0,st[0]/st[1]],[1/st[1],0],[st[2]/st[1],0]])}function Mn(Le,ze){var je,Xe,st,Qe,ht;if(ze=1-o)return je=(1-ze)/4,Xe=k(Le),Qe=z(Le),st=1/Xe,ht=Xe*R(Le),[Qe+je*(ht-Le)/(Xe*Xe),st-je*Qe*st*(ht-Le),st+je*Qe*st*(ht+Le),2*l(a(Le))-A+je*(ht-Le)/Xe];var Dt=[1,0,0,0,0,0,0,0,0],Ot=[I(ze),0,0,0,0,0,0,0,0],$t=0;for(Xe=I(1-ze),ht=1;S(Ot[$t]/Dt[$t])>o&&$t<8;)je=Dt[$t++],Ot[$t]=(je-Xe)/2,Dt[$t]=(je+Xe)/2,Xe=I(je*Xe),ht*=2;st=ht*Dt[$t]*Le;do Qe=Ot[$t]*d(Xe=st)/Dt[$t],st=(C(Qe)+st)/2;while(--$t);return[d(st),Qe=t(st),Qe/t(st-Xe),st]}function _i(Le,ze,je){var Xe=S(Le),st=S(ze),Qe=R(st);if(Xe){var ht=1/d(Xe),Dt=1/(y(Xe)*y(Xe)),Ot=-(Dt+je*(Qe*Qe*ht*ht)-1+je),$t=(je-1)*Dt,ir=(-Ot+I(Ot*Ot-4*$t))/2;return[ti(l(1/I(ir)),je)*f(Le),ti(l(I((ir/Dt-1)/je)),1-je)*f(ze)]}return[0,ti(l(Qe),1-je)*f(ze)]}function ti(Le,ze){if(!ze)return Le;if(ze===1)return n(y(Le/2+E));for(var je=1,Xe=I(1-ze),st=I(ze),Qe=0;S(st)>o;Qe++){if(Le%M){var ht=l(Xe*y(Le)/je);ht<0&&(ht+=M),Le+=ht+~~(Le/M)*M}else Le+=Le;st=(je+Xe)/2,Xe=I(je*Xe),st=((je=st)-Xe)/2}return Le/(c(2,Qe)*je)}function Si(Le,ze){var je=(T-1)/(T+1),Xe=I(1-je*je),st=ti(A,Xe*Xe),Qe=-1,ht=n(y(M/4+S(ze)/2)),Dt=a(Qe*ht)/I(je),Ot=ai(Dt*t(Qe*Le),Dt*d(Qe*Le)),$t=_i(Ot[0],Ot[1],Xe*Xe);return[-$t[1],(ze>=0?1:-1)*(.5*st-$t[0])]}function ai(Le,ze){var je=Le*Le,Xe=ze+1,st=1-je-ze*ze;return[.5*((Le>=0?A:-A)-e(st,2*Le)),-.25*n(st*st+4*je)+.5*n(Xe*Xe+je)]}function Ao(Le,ze){var je=ze[0]*ze[0]+ze[1]*ze[1];return[(Le[0]*ze[0]+Le[1]*ze[1])/je,(Le[1]*ze[0]-Le[0]*ze[1])/je]}Si.invert=function(Le,ze){var je=(T-1)/(T+1),Xe=I(1-je*je),st=ti(A,Xe*Xe),Qe=-1,ht=Dn(.5*st-ze,-Le,Xe*Xe),Dt=Ao(ht[0],ht[1]),Ot=e(Dt[1],Dt[0])/Qe;return[Ot,2*l(a(.5/Qe*n(je*Dt[0]*Dt[0]+je*Dt[1]*Dt[1])))-A]};function yo(){return v.geoProjection(Fr(Si)).scale(151.496)}function Vn(Le){var ze=d(Le),je=t(Le),Xe=Bo(Le);Xe.invert=Bo(-Le);function st(Qe,ht){var Dt=Xe(Qe,ht);Qe=Dt[0],ht=Dt[1];var Ot=d(ht),$t=t(ht),ir=t(Qe),pr=F(ze*Ot+je*$t*ir),zr=d(pr),Wr=S(zr)>o?pr/zr:1;return[Wr*je*d(Qe),(S(Qe)>A?Wr:-Wr)*(ze*$t-je*Ot*ir)]}return st.invert=function(Qe,ht){var Dt=I(Qe*Qe+ht*ht),Ot=-d(Dt),$t=t(Dt),ir=Dt*$t,pr=-ht*Ot,zr=Dt*ze,Wr=I(ir*ir+pr*pr-zr*zr),ia=e(ir*zr+pr*Wr,pr*zr-ir*Wr),Sa=(Dt>A?-1:1)*e(Qe*Ot,Dt*t(ia)*$t+ht*d(ia)*Ot);return Xe.invert(Sa,ia)},st}function Bo(Le){var ze=d(Le),je=t(Le);return function(Xe,st){var Qe=t(st),ht=t(Xe)*Qe,Dt=d(Xe)*Qe,Ot=d(st);return[e(Dt,ht*je-Ot*ze),C(Ot*je+ht*ze)]}}function Mo(){var Le=0,ze=v.geoProjectionMutator(Vn),je=ze(Le),Xe=je.rotate,st=je.stream,Qe=v.geoCircle();return je.parallel=function(ht){if(!arguments.length)return Le*x;var Dt=je.rotate();return ze(Le=ht*_).rotate(Dt)},je.rotate=function(ht){return arguments.length?(Xe.call(je,[ht[0],ht[1]-Le*x]),Qe.center([-ht[0],-ht[1]]),je):(ht=Xe.call(je),ht[1]+=Le*x,ht)},je.stream=function(ht){return ht=st(ht),ht.sphere=function(){ht.polygonStart();var Dt=.01,Ot=Qe.radius(90-Dt)().coordinates[0],$t=Ot.length-1,ir=-1,pr;for(ht.lineStart();++ir<$t;)ht.point((pr=Ot[ir])[0],pr[1]);for(ht.lineEnd(),Ot=Qe.radius(90+Dt)().coordinates[0],$t=Ot.length-1,ht.lineStart();--ir>=0;)ht.point((pr=Ot[ir])[0],pr[1]);ht.lineEnd(),ht.polygonEnd()},ht},je.scale(79.4187).parallel(45).clipAngle(180-.001)}var co=3,Ro=C(1-1/co)*x,ao=mt(0);function Co(Le){var ze=Ro*_,je=Ie(M,ze)[0]-Ie(-M,ze)[0],Xe=ao(0,ze)[1],st=Ie(0,ze)[1],Qe=m-st,ht=h/Le,Dt=4/h,Ot=Xe+Qe*Qe*4/h;function $t(ir,pr){var zr,Wr=S(pr);if(Wr>ze){var ia=s(Le-1,i(0,r((ir+M)/ht)));ir+=M*(Le-1)/Le-ia*ht,zr=Ie(ir,Wr),zr[0]=zr[0]*h/je-h*(Le-1)/(2*Le)+ia*h/Le,zr[1]=Xe+(zr[1]-st)*4*Qe/h,pr<0&&(zr[1]=-zr[1])}else zr=ao(ir,pr);return zr[0]*=Dt,zr[1]/=Ot,zr}return $t.invert=function(ir,pr){ir/=Dt,pr*=Ot;var zr=S(pr);if(zr>Xe){var Wr=s(Le-1,i(0,r((ir+M)/ht)));ir=(ir+M*(Le-1)/Le-Wr*ht)*je/h;var ia=Ie.invert(ir,.25*(zr-Xe)*h/Qe+st);return ia[0]-=M*(Le-1)/Le-Wr*ht,pr<0&&(ia[1]=-ia[1]),ia}return ao.invert(ir,pr)},$t}function Wo(Le,ze){return[Le,ze&1?90-o:Ro]}function Po(Le,ze){return[Le,ze&1?-90+o:-Ro]}function vi(Le){return[Le[0]*(1-o),Le[1]]}function zi(Le){var ze=[].concat(w.range(-180,180+Le/2,Le).map(Wo),w.range(180,-180-Le/2,-Le).map(Po));return{type:"Polygon",coordinates:[Le===180?ze.map(vi):ze]}}function ho(){var Le=4,ze=v.geoProjectionMutator(Co),je=ze(Le),Xe=je.stream;return je.lobes=function(st){return arguments.length?ze(Le=+st):Le},je.stream=function(st){var Qe=je.rotate(),ht=Xe(st),Dt=(je.rotate([0,0]),Xe(st));return je.rotate(Qe),ht.sphere=function(){v.geoStream(zi(180/Le),Dt)},ht},je.scale(239.75)}function ro(Le){var ze=1+Le,je=d(1/ze),Xe=C(je),st=2*I(M/(Qe=M+4*Xe*ze)),Qe,ht=.5*st*(ze+I(Le*(2+Le))),Dt=Le*Le,Ot=ze*ze;function $t(ir,pr){var zr=1-d(pr),Wr,ia;if(zr&&zr<2){var Sa=A-pr,ln=25,an;do{var wn=d(Sa),ei=t(Sa),Mi=Xe+e(wn,ze-ei),pi=1+Ot-2*ze*ei;Sa-=an=(Sa-Dt*Xe-ze*wn+pi*Mi-.5*zr*Qe)/(2*ze*wn*Mi)}while(S(an)>b&&--ln>0);Wr=st*I(pi),ia=ir*Mi/M}else Wr=st*(Le+zr),ia=ir*Xe/M;return[Wr*d(ia),ht-Wr*t(ia)]}return $t.invert=function(ir,pr){var zr=ir*ir+(pr-=ht)*pr,Wr=(1+Ot-zr/(st*st))/(2*ze),ia=F(Wr),Sa=d(ia),ln=Xe+e(Sa,ze-Wr);return[C(ir/I(zr))*M/ln,C(1-2*(ia-Dt*Xe-ze*Sa+(1+Ot-2*ze*Wr)*ln)/Qe)]},$t}function es(){var Le=1,ze=v.geoProjectionMutator(ro),je=ze(Le);return je.ratio=function(Xe){return arguments.length?ze(Le=+Xe):Le},je.scale(167.774).center([0,18.67])}var Ho=.7109889596207567,is=.0528035274542;function as(Le,ze){return ze>-Ho?(Le=ce(Le,ze),Le[1]+=is,Le):Ne(Le,ze)}as.invert=function(Le,ze){return ze>-Ho?ce.invert(Le,ze-is):Ne.invert(Le,ze)};function vs(){return v.geoProjection(as).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Yo(Le,ze){return S(ze)>Ho?(Le=ce(Le,ze),Le[1]-=ze>0?is:-is,Le):Ne(Le,ze)}Yo.invert=function(Le,ze){return S(ze)>Ho?ce.invert(Le,ze+(ze>0?is:-is)):Ne.invert(Le,ze)};function po(){return v.geoProjection(Yo).scale(152.63)}function _s(Le,ze,je,Xe){var st=I(4*M/(2*je+(1+Le-ze/2)*d(2*je)+(Le+ze)/2*d(4*je)+ze/2*d(6*je))),Qe=I(Xe*d(je)*I((1+Le*t(2*je)+ze*t(4*je))/(1+Le+ze))),ht=je*Ot(1);function Dt(pr){return I(1+Le*t(2*pr)+ze*t(4*pr))}function Ot(pr){var zr=pr*je;return(2*zr+(1+Le-ze/2)*d(2*zr)+(Le+ze)/2*d(4*zr)+ze/2*d(6*zr))/je}function $t(pr){return Dt(pr)*d(pr)}var ir=function(pr,zr){var Wr=je*Te(Ot,ht*d(zr)/je,zr/M);isNaN(Wr)&&(Wr=je*f(zr));var ia=st*Dt(Wr);return[ia*Qe*pr/M*t(Wr),ia/Qe*d(Wr)]};return ir.invert=function(pr,zr){var Wr=Te($t,zr*Qe/st);return[pr*M/(t(Wr)*st*Qe*Dt(Wr)),C(je*Ot(Wr/je)/ht)]},je===0&&(st=I(Xe/M),ir=function(pr,zr){return[pr*st,d(zr)/st]},ir.invert=function(pr,zr){return[pr/st,C(zr*st)]}),ir}function qo(){var Le=1,ze=0,je=45*_,Xe=2,st=v.geoProjectionMutator(_s),Qe=st(Le,ze,je,Xe);return Qe.a=function(ht){return arguments.length?st(Le=+ht,ze,je,Xe):Le},Qe.b=function(ht){return arguments.length?st(Le,ze=+ht,je,Xe):ze},Qe.psiMax=function(ht){return arguments.length?st(Le,ze,je=+ht*_,Xe):je*x},Qe.ratio=function(ht){return arguments.length?st(Le,ze,je,Xe=+ht):Xe},Qe.scale(180.739)}function Io(Le,ze,je,Xe,st,Qe,ht,Dt,Ot,$t,ir){if(ir.nanEncountered)return NaN;var pr,zr,Wr,ia,Sa,ln,an,wn,ei,Mi;if(pr=je-ze,zr=Le(ze+pr*.25),Wr=Le(je-pr*.25),isNaN(zr)){ir.nanEncountered=!0;return}if(isNaN(Wr)){ir.nanEncountered=!0;return}return ia=pr*(Xe+4*zr+st)/12,Sa=pr*(st+4*Wr+Qe)/12,ln=ia+Sa,Mi=(ln-ht)/15,$t>Ot?(ir.maxDepthCount++,ln+Mi):Math.abs(Mi)>1;do Ot[ln]>Wr?Sa=ln:ia=ln,ln=ia+Sa>>1;while(ln>ia);var an=Ot[ln+1]-Ot[ln];return an&&(an=(Wr-Ot[ln+1])/an),(ln+1+an)/ht}var pr=2*ir(1)/M*Qe/je,zr=function(Wr,ia){var Sa=ir(S(d(ia))),ln=Xe(Sa)*Wr;return Sa/=pr,[ln,ia>=0?Sa:-Sa]};return zr.invert=function(Wr,ia){var Sa;return ia*=pr,S(ia)<1&&(Sa=f(ia)*C(st(S(ia))*Qe)),[Wr/Xe(S(ia)),Sa]},zr}function qs(){var Le=0,ze=2.5,je=1.183136,Xe=v.geoProjectionMutator(ts),st=Xe(Le,ze,je);return st.alpha=function(Qe){return arguments.length?Xe(Le=+Qe,ze,je):Le},st.k=function(Qe){return arguments.length?Xe(Le,ze=+Qe,je):ze},st.gamma=function(Qe){return arguments.length?Xe(Le,ze,je=+Qe):je},st.scale(152.63)}function Xs(Le,ze){return S(Le[0]-ze[0])=0;--Ot)je=Le[1][Ot],Xe=je[0][0],st=je[0][1],Qe=je[1][1],ht=je[2][0],Dt=je[2][1],ze.push(ps([[ht-o,Dt-o],[ht-o,Qe+o],[Xe+o,Qe+o],[Xe+o,st-o]],30));return{type:"Polygon",coordinates:[w.merge(ze)]}}function xl(Le,ze,je){var Xe,st;function Qe(Ot,$t){for(var ir=$t<0?-1:1,pr=ze[+($t<0)],zr=0,Wr=pr.length-1;zrpr[zr][2][0];++zr);var ia=Le(Ot-pr[zr][1][0],$t);return ia[0]+=Le(pr[zr][1][0],ir*$t>ir*pr[zr][0][1]?pr[zr][0][1]:$t)[0],ia}je?Qe.invert=je(Qe):Le.invert&&(Qe.invert=function(Ot,$t){for(var ir=st[+($t<0)],pr=ze[+($t<0)],zr=0,Wr=ir.length;zria&&(Sa=Wr,Wr=ia,ia=Sa),[[pr,Wr],[zr,ia]]})}),ht):ze.map(function($t){return $t.map(function(ir){return[[ir[0][0]*x,ir[0][1]*x],[ir[1][0]*x,ir[1][1]*x],[ir[2][0]*x,ir[2][1]*x]]})})},ze!=null&&ht.lobes(ze),ht}var fs=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Wl(){return xl(be,fs).scale(160.857)}var Ss=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function ls(){return xl(Yo,Ss).scale(152.63)}var No=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Do(){return xl(ce,No).scale(169.529)}var hs=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Jl(){return xl(ce,hs).scale(169.529).rotate([20,0])}var du=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function Ql(){return xl(as,du,Se).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Ou=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Uu(){return xl(Ne,Ou).scale(152.63).rotate([-20,0])}function Xu(Le,ze){return[3/h*Le*I(M*M/3-ze*ze),ze]}Xu.invert=function(Le,ze){return[h/3*Le/I(M*M/3-ze*ze),ze]};function $u(){return v.geoProjection(Xu).scale(158.837)}function fc(Le){function ze(je,Xe){if(S(S(Xe)-A)2)return null;je/=2,Xe/=2;var Qe=je*je,ht=Xe*Xe,Dt=2*Xe/(1+Qe+ht);return Dt=c((1+Dt)/(1-Dt),1/Le),[e(2*je,1-Qe-ht)/Le,C((Dt-1)/(Dt+1))]},ze}function _c(){var Le=.5,ze=v.geoProjectionMutator(fc),je=ze(Le);return je.spacing=function(Xe){return arguments.length?ze(Le=+Xe):Le},je.scale(124.75)}var vu=M/T;function pu(Le,ze){return[Le*(1+I(t(ze)))/2,ze/(t(ze/2)*t(Le/6))]}pu.invert=function(Le,ze){var je=S(Le),Xe=S(ze),st=o,Qe=A;Xeo||S(ln)>o)&&--st>0);return st&&[je,Xe]};function Vs(){return v.geoProjection(eu).scale(139.98)}function os(Le,ze){return[d(Le)/t(ze),y(ze)*t(Le)]}os.invert=function(Le,ze){var je=Le*Le,Xe=ze*ze,st=Xe+1,Qe=je+st,ht=Le?g*I((Qe-I(Qe*Qe-4*je))/je):1/I(st);return[C(Le*ht),f(ze)*F(ht)]};function sl(){return v.geoProjection(os).scale(144.049).clipAngle(90-.001)}function Tu(Le){var ze=t(Le),je=y(E+Le/2);function Xe(st,Qe){var ht=Qe-Le,Dt=S(ht)=0;)ir=Le[$t],pr=ir[0]+Dt*(Wr=pr)-Ot*zr,zr=ir[1]+Dt*zr+Ot*Wr;return pr=Dt*(Wr=pr)-Ot*zr,zr=Dt*zr+Ot*Wr,[pr,zr]}return je.invert=function(Xe,st){var Qe=20,ht=Xe,Dt=st;do{for(var Ot=ze,$t=Le[Ot],ir=$t[0],pr=$t[1],zr=0,Wr=0,ia;--Ot>=0;)$t=Le[Ot],zr=ir+ht*(ia=zr)-Dt*Wr,Wr=pr+ht*Wr+Dt*ia,ir=$t[0]+ht*(ia=ir)-Dt*pr,pr=$t[1]+ht*pr+Dt*ia;zr=ir+ht*(ia=zr)-Dt*Wr,Wr=pr+ht*Wr+Dt*ia,ir=ht*(ia=ir)-Dt*pr-Xe,pr=ht*pr+Dt*ia-st;var Sa=zr*zr+Wr*Wr,ln,an;ht-=ln=(ir*zr+pr*Wr)/Sa,Dt-=an=(pr*zr-ir*Wr)/Sa}while(S(ln)+S(an)>o*o&&--Qe>0);if(Qe){var wn=I(ht*ht+Dt*Dt),ei=2*l(wn*.5),Mi=d(ei);return[e(ht*Mi,wn*t(ei)),wn?C(Dt*Mi/wn):0]}},je}var Xo=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Mf=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],ns=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],so=[[.9245,0],[0,0],[.01943,0]],qu=[[.721316,0],[0,0],[-.00881625,-.00617325]];function hc(){return ll(Xo,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Ll(){return ll(Mf,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Qc(){return ll(ns,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Au(){return ll(so,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Zu(){return ll(qu,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function ll(Le,ze){var je=v.geoProjection(Af(Le)).rotate(ze).clipAngle(90),Xe=v.geoRotation(ze),st=je.center;return delete je.rotate,je.center=function(Qe){return arguments.length?st(Xe(Qe)):Xe.invert(st())},je}var ef=I(6),zc=I(7);function Ku(Le,ze){var je=C(7*d(ze)/(3*ef));return[ef*Le*(2*t(2*je/3)-1)/zc,9*d(je/3)/zc]}Ku.invert=function(Le,ze){var je=3*C(ze*zc/9);return[Le*zc/(ef*(2*t(2*je/3)-1)),C(d(je)*3*ef/7)]};function Ju(){return v.geoProjection(Ku).scale(164.859)}function Bc(Le,ze){for(var je=(1+g)*d(ze),Xe=ze,st=0,Qe;st<25&&(Xe-=Qe=(d(Xe/2)+d(Xe)-je)/(.5*t(Xe/2)+t(Xe)),!(S(Qe)b&&--Xe>0);return Qe=je*je,ht=Qe*Qe,Dt=Qe*ht,[Le/(.84719-.13063*Qe+Dt*Dt*(-.04515+.05494*Qe-.02326*ht+.00331*Dt)),je]};function Qu(){return v.geoProjection(ru).scale(175.295)}function $s(Le,ze){return[Le*(1+t(ze))/2,2*(ze-y(ze/2))]}$s.invert=function(Le,ze){for(var je=ze/2,Xe=0,st=1/0;Xe<10&&S(st)>o;++Xe){var Qe=t(ze/2);ze-=st=(ze-y(ze/2)-je)/(1-.5/(Qe*Qe))}return[2*Le/(1+t(ze)),ze]};function ec(){return v.geoProjection($s).scale(152.63)}var Iu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function us(){return xl(ue(1/0),Iu).rotate([20,0]).scale(152.63)}function wc(Le,ze){var je=d(ze),Xe=t(ze),st=f(Le);if(Le===0||S(ze)===A)return[0,ze];if(ze===0)return[Le,0];if(S(Le)===A)return[Le*Xe,A*je];var Qe=M/(2*Le)-2*Le/M,ht=2*ze/M,Dt=(1-ht*ht)/(je-ht),Ot=Qe*Qe,$t=Dt*Dt,ir=1+Ot/$t,pr=1+$t/Ot,zr=(Qe*je/Dt-Qe/2)/ir,Wr=($t*je/Ot+Dt/2)/pr,ia=zr*zr+Xe*Xe/ir,Sa=Wr*Wr-($t*je*je/Ot+Dt*je-1)/pr;return[A*(zr+I(ia)*st),A*(Wr+I(Sa<0?0:Sa)*f(-ze*Qe)*st)]}wc.invert=function(Le,ze){Le/=A,ze/=A;var je=Le*Le,Xe=ze*ze,st=je+Xe,Qe=M*M;return[Le?(st-1+I((1-st)*(1-st)+4*je))/(2*Le)*A:0,Te(function(ht){return st*(M*d(ht)-2*ht)*M+4*ht*ht*(ze-d(ht))+2*M*ht-Qe*ze},0)]};function Sf(){return v.geoProjection(wc).scale(127.267)}var tf=1.0148,Vu=.23185,rf=-.14499,Tc=.02406,Ef=tf,Zs=5*Vu,au=7*rf,af=9*Tc,Fs=1.790857183;function Du(Le,ze){var je=ze*ze;return[Le,ze*(tf+je*je*(Vu+je*(rf+Tc*je)))]}Du.invert=function(Le,ze){ze>Fs?ze=Fs:ze<-Fs&&(ze=-Fs);var je=ze,Xe;do{var st=je*je;je-=Xe=(je*(tf+st*st*(Vu+st*(rf+Tc*st)))-ze)/(Ef+st*st*(Zs+st*(au+af*st)))}while(S(Xe)>o);return[Le,je]};function Nl(){return v.geoProjection(Du).scale(139.319)}function Hu(Le,ze){if(S(ze)o&&--st>0);return ht=y(Xe),[(S(ze)=0;)if(Xe=ze[Dt],je[0]===Xe[0]&&je[1]===Xe[1]){if(Qe)return[Qe,je];Qe=je}}}function rl(Le){for(var ze=Le.length,je=[],Xe=Le[ze-1],st=0;st0?[-Xe[0],0]:[180-Xe[0],180])};var ze=Uc.map(function(je){return{face:je,project:Le(je)}});return[-1,0,0,1,0,1,4,5].forEach(function(je,Xe){var st=ze[je];st&&(st.children||(st.children=[])).push(ze[Xe])}),vc(ze[0],function(je,Xe){return ze[je<-M/2?Xe<0?6:4:je<0?Xe<0?2:0:jeXe^Wr>Xe&&je<(zr-$t)*(Xe-ir)/(Wr-ir)+$t&&(st=!st)}return st}function of(Le,ze){var je=ze.stream,Xe;if(!je)throw new Error("invalid projection");switch(Le&&Le.type){case"Feature":Xe=Mc;break;case"FeatureCollection":Xe=Cf;break;default:Xe=Sc;break}return Xe(Le,je)}function Cf(Le,ze){return{type:"FeatureCollection",features:Le.features.map(function(je){return Mc(je,ze)})}}function Mc(Le,ze){return{type:"Feature",id:Le.id,properties:Le.properties,geometry:Sc(Le.geometry,ze)}}function sf(Le,ze){return{type:"GeometryCollection",geometries:Le.geometries.map(function(je){return Sc(je,ze)})}}function Sc(Le,ze){if(!Le)return null;if(Le.type==="GeometryCollection")return sf(Le,ze);var je;switch(Le.type){case"Point":je=lf;break;case"MultiPoint":je=lf;break;case"LineString":je=Lf;break;case"MultiLineString":je=Lf;break;case"Polygon":je=Ec;break;case"MultiPolygon":je=Ec;break;case"Sphere":je=Ec;break;default:return null}return v.geoStream(Le,ze(je)),je.result()}var wl=[],Su=[],lf={point:function(Le,ze){wl.push([Le,ze])},result:function(){var Le=wl.length?wl.length<2?{type:"Point",coordinates:wl[0]}:{type:"MultiPoint",coordinates:wl}:null;return wl=[],Le}},Lf={lineStart:Wu,point:function(Le,ze){wl.push([Le,ze])},lineEnd:function(){wl.length&&(Su.push(wl),wl=[])},result:function(){var Le=Su.length?Su.length<2?{type:"LineString",coordinates:Su[0]}:{type:"MultiLineString",coordinates:Su}:null;return Su=[],Le}},Ec={polygonStart:Wu,lineStart:Wu,point:function(Le,ze){wl.push([Le,ze])},lineEnd:function(){var Le=wl.length;if(Le){do wl.push(wl[0].slice());while(++Le<4);Su.push(wl),wl=[]}},polygonEnd:Wu,result:function(){if(!Su.length)return null;var Le=[],ze=[];return Su.forEach(function(je){Vc(je)?Le.push([je]):ze.push(je)}),ze.forEach(function(je){var Xe=je[0];Le.some(function(st){if(Hc(st[0],Xe))return st.push(je),!0})||Le.push([je])}),Su=[],Le.length?Le.length>1?{type:"MultiPolygon",coordinates:Le}:{type:"Polygon",coordinates:Le[0]}:null}};function Fu(Le){var ze=Le(A,0)[0]-Le(-A,0)[0];function je(Xe,st){var Qe=S(Xe)0?Xe-M:Xe+M,st),Dt=(ht[0]-ht[1])*g,Ot=(ht[0]+ht[1])*g;if(Qe)return[Dt,Ot];var $t=ze*g,ir=Dt>0^Ot>0?-1:1;return[ir*Dt-f(Ot)*$t,ir*Ot-f(Dt)*$t]}return Le.invert&&(je.invert=function(Xe,st){var Qe=(Xe+st)*g,ht=(st-Xe)*g,Dt=S(Qe)<.5*ze&&S(ht)<.5*ze;if(!Dt){var Ot=ze*g,$t=Qe>0^ht>0?-1:1,ir=-$t*Xe+(ht>0?1:-1)*Ot,pr=-$t*st+(Qe>0?1:-1)*Ot;Qe=(-ir-pr)*g,ht=(ir-pr)*g}var zr=Le.invert(Qe,ht);return Dt||(zr[0]+=Qe>0?M:-M),zr}),v.geoProjection(je).rotate([-90,-90,45]).clipAngle(180-.001)}function Mt(){return Fu(kr).scale(176.423)}function jt(){return Fu(Si).scale(111.48)}function _r(Le,ze){if(!(0<=(ze=+ze)&&ze<=20))throw new Error("invalid digits");function je($t){var ir=$t.length,pr=2,zr=new Array(ir);for(zr[0]=+$t[0].toFixed(ze),zr[1]=+$t[1].toFixed(ze);pr2||Wr[0]!=ir[0]||Wr[1]!=ir[1])&&(pr.push(Wr),ir=Wr)}return pr.length===1&&$t.length>1&&pr.push(je($t[$t.length-1])),pr}function Qe($t){return $t.map(st)}function ht($t){if($t==null)return $t;var ir;switch($t.type){case"GeometryCollection":ir={type:"GeometryCollection",geometries:$t.geometries.map(ht)};break;case"Point":ir={type:"Point",coordinates:je($t.coordinates)};break;case"MultiPoint":ir={type:$t.type,coordinates:Xe($t.coordinates)};break;case"LineString":ir={type:$t.type,coordinates:st($t.coordinates)};break;case"MultiLineString":case"Polygon":ir={type:$t.type,coordinates:Qe($t.coordinates)};break;case"MultiPolygon":ir={type:"MultiPolygon",coordinates:$t.coordinates.map(Qe)};break;default:return $t}return $t.bbox!=null&&(ir.bbox=$t.bbox),ir}function Dt($t){var ir={type:"Feature",properties:$t.properties,geometry:ht($t.geometry)};return $t.id!=null&&(ir.id=$t.id),$t.bbox!=null&&(ir.bbox=$t.bbox),ir}if(Le!=null)switch(Le.type){case"Feature":return Dt(Le);case"FeatureCollection":{var Ot={type:"FeatureCollection",features:Le.features.map(Dt)};return Le.bbox!=null&&(Ot.bbox=Le.bbox),Ot}default:return ht(Le)}return Le}function dr(Le){var ze=d(Le);function je(Xe,st){var Qe=ze?y(Xe*ze/2)/ze:Xe/2;if(!st)return[2*Qe,-Le];var ht=2*l(Qe*d(st)),Dt=1/y(st);return[d(ht)*Dt,st+(1-t(ht))*Dt-Le]}return je.invert=function(Xe,st){if(S(st+=Le)o&&--Dt>0);var zr=Xe*($t=y(ht)),Wr=y(S(st)0?A:-A)*(Ot+st*(ir-ht)/2+st*st*(ir-2*Ot+ht)/2)]}Ga.invert=function(Le,ze){var je=ze/A,Xe=je*90,st=s(18,S(Xe/5)),Qe=i(0,r(st));do{var ht=Aa[Qe][1],Dt=Aa[Qe+1][1],Ot=Aa[s(19,Qe+2)][1],$t=Ot-ht,ir=Ot-2*Dt+ht,pr=2*(S(je)-Dt)/$t,zr=ir/$t,Wr=pr*(1-zr*pr*(1-2*zr*pr));if(Wr>=0||Qe===1){Xe=(ze>=0?5:-5)*(Wr+st);var ia=50,Sa;do st=s(18,S(Xe)/5),Qe=r(st),Wr=st-Qe,ht=Aa[Qe][1],Dt=Aa[Qe+1][1],Ot=Aa[s(19,Qe+2)][1],Xe-=(Sa=(ze>=0?A:-A)*(Dt+Wr*(Ot-ht)/2+Wr*Wr*(Ot-2*Dt+ht)/2)-ze)*x;while(S(Sa)>b&&--ia>0);break}}while(--Qe>=0);var ln=Aa[Qe][0],an=Aa[Qe+1][0],wn=Aa[s(19,Qe+2)][0];return[Le/(an+Wr*(wn-ln)/2+Wr*Wr*(wn-2*an+ln)/2),Xe*_]};function fn(){return v.geoProjection(Ga).scale(152.63)}function gn(Le){function ze(je,Xe){var st=t(Xe),Qe=(Le-1)/(Le-st*t(je));return[Qe*st*d(je),Qe*d(Xe)]}return ze.invert=function(je,Xe){var st=je*je+Xe*Xe,Qe=I(st),ht=(Le-I(1-st*(Le+1)/(Le-1)))/((Le-1)/Qe+Qe/(Le-1));return[e(je*ht,Qe*I(1-ht*ht)),Qe?C(Xe*ht/Qe):0]},ze}function qn(Le,ze){var je=gn(Le);if(!ze)return je;var Xe=t(ze),st=d(ze);function Qe(ht,Dt){var Ot=je(ht,Dt),$t=Ot[1],ir=$t*st/(Le-1)+Xe;return[Ot[0]*Xe/ir,$t/ir]}return Qe.invert=function(ht,Dt){var Ot=(Le-1)/(Le-1-Dt*st);return je.invert(Ot*ht,Ot*Dt*Xe)},Qe}function Wa(){var Le=2,ze=0,je=v.geoProjectionMutator(qn),Xe=je(Le,ze);return Xe.distance=function(st){return arguments.length?je(Le=+st,ze):Le},Xe.tilt=function(st){return arguments.length?je(Le,ze=st*_):ze*x},Xe.scale(432.147).clipAngle(F(1/Le)*x-1e-6)}var $a=1e-4,sn=1e4,Pa=-180,Qn=Pa+$a,Ei=180,Ii=Ei-$a,ki=-90,Vi=ki+$a,ni=90,Rn=ni-$a;function no(Le){return Le.length>0}function wo(Le){return Math.floor(Le*sn)/sn}function Go(Le){return Le===ki||Le===ni?[0,Le]:[Pa,wo(Le)]}function bs(Le){var ze=Le[0],je=Le[1],Xe=!1;return ze<=Qn?(ze=Pa,Xe=!0):ze>=Ii&&(ze=Ei,Xe=!0),je<=Vi?(je=ki,Xe=!0):je>=Rn&&(je=ni,Xe=!0),Xe?[ze,je]:Le}function Jo(Le){return Le.map(bs)}function Es(Le,ze,je){for(var Xe=0,st=Le.length;Xe=Ii||ir<=Vi||ir>=Rn){Qe[ht]=bs(Ot);for(var pr=ht+1;prQn&&WrVi&&ia=Dt)break;je.push({index:-1,polygon:ze,ring:Qe=Qe.slice(pr-1)}),Qe[0]=Go(Qe[0][1]),ht=-1,Dt=Qe.length}}}}function Vo(Le){var ze,je=Le.length,Xe={},st={},Qe,ht,Dt,Ot,$t;for(ze=0;ze0?M-Dt:Dt)*x],$t=v.geoProjection(Le(ht)).rotate(Ot),ir=v.geoRotation(Ot),pr=$t.center;return delete $t.rotate,$t.center=function(zr){return arguments.length?pr(ir(zr)):ir.invert(pr())},$t.clipAngle(90)}function $o(Le){var ze=t(Le);function je(Xe,st){var Qe=v.geoGnomonicRaw(Xe,st);return Qe[0]*=ze,Qe}return je.invert=function(Xe,st){return v.geoGnomonicRaw.invert(Xe/ze,st)},je}function ul(){return yu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function yu(Le,ze){return ms($o,Le,ze)}function iu(Le){if(!(Le*=2))return v.geoAzimuthalEquidistantRaw;var ze=-Le/2,je=-ze,Xe=Le*Le,st=y(je),Qe=.5/d(je);function ht(Dt,Ot){var $t=F(t(Ot)*t(Dt-ze)),ir=F(t(Ot)*t(Dt-je)),pr=Ot<0?-1:1;return $t*=$t,ir*=ir,[($t-ir)/(2*Le),pr*I(4*Xe*ir-(Xe-$t+ir)*(Xe-$t+ir))/(2*Le)]}return ht.invert=function(Dt,Ot){var $t=Ot*Ot,ir=t(I($t+(zr=Dt+ze)*zr)),pr=t(I($t+(zr=Dt+je)*zr)),zr,Wr;return[e(Wr=ir-pr,zr=(ir+pr)*st),(Ot<0?-1:1)*F(I(zr*zr+Wr*Wr)*Qe)]},ht}function zu(){return Tl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Tl(Le,ze){return ms(iu,Le,ze)}function Eu(Le,ze){if(S(ze)o&&--Dt>0);return[f(Le)*(I(st*st+4)+st)*M/4,A*ht]};function ou(){return v.geoProjection(kc).scale(127.16)}function Me(Le,ze,je,Xe,st){function Qe(ht,Dt){var Ot=je*d(Xe*Dt),$t=I(1-Ot*Ot),ir=I(2/(1+$t*t(ht*=st)));return[Le*$t*ir*d(ht),ze*Ot*ir]}return Qe.invert=function(ht,Dt){var Ot=ht/Le,$t=Dt/ze,ir=I(Ot*Ot+$t*$t),pr=2*C(ir/2);return[e(ht*y(pr),Le*ir)/st,ir&&C(Dt*d(pr)/(ze*je*ir))/Xe]},Qe}function L(Le,ze,je,Xe){var st=M/3;Le=i(Le,o),ze=i(ze,o),Le=s(Le,A),ze=s(ze,M-o),je=i(je,0),je=s(je,100-o),Xe=i(Xe,o);var Qe=je/100+1,ht=Xe/100,Dt=F(Qe*t(st))/st,Ot=d(Le)/d(Dt*A),$t=ze/M,ir=I(ht*d(Le/2)/d(ze/2)),pr=ir/I($t*Ot*Dt),zr=1/(ir*I($t*Ot*Dt));return Me(pr,zr,Ot,Dt,$t)}function J(){var Le=65*_,ze=60*_,je=20,Xe=200,st=v.geoProjectionMutator(L),Qe=st(Le,ze,je,Xe);return Qe.poleline=function(ht){return arguments.length?st(Le=+ht*_,ze,je,Xe):Le*x},Qe.parallels=function(ht){return arguments.length?st(Le,ze=+ht*_,je,Xe):ze*x},Qe.inflation=function(ht){return arguments.length?st(Le,ze,je=+ht,Xe):je},Qe.ratio=function(ht){return arguments.length?st(Le,ze,je,Xe=+ht):Xe},Qe.scale(163.775)}function fe(){return J().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var de=4*M+3*I(3),Ae=2*I(2*M*I(3)/de),Ye=_e(Ae*I(3)/M,Ae,de/6);function et(){return v.geoProjection(Ye).scale(176.84)}function dt(Le,ze){return[Le*I(1-3*ze*ze/(M*M)),ze]}dt.invert=function(Le,ze){return[Le/I(1-3*ze*ze/(M*M)),ze]};function St(){return v.geoProjection(dt).scale(152.63)}function Ht(Le,ze){var je=t(ze),Xe=t(Le)*je,st=1-Xe,Qe=t(Le=e(d(Le)*je,-d(ze))),ht=d(Le);return je=I(1-Xe*Xe),[ht*je-Qe*st,-Qe*je-ht*st]}Ht.invert=function(Le,ze){var je=(Le*Le+ze*ze)/-2,Xe=I(-je*(2+je)),st=ze*je+Le*Xe,Qe=Le*je-ze*Xe,ht=I(Qe*Qe+st*st);return[e(Xe*st,ht*(1+je)),ht?-C(Xe*Qe/ht):0]};function Wt(){return v.geoProjection(Ht).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function fr(Le,ze){var je=ee(Le,ze);return[(je[0]+Le/A)/2,(je[1]+ze)/2]}fr.invert=function(Le,ze){var je=Le,Xe=ze,st=25;do{var Qe=t(Xe),ht=d(Xe),Dt=d(2*Xe),Ot=ht*ht,$t=Qe*Qe,ir=d(je),pr=t(je/2),zr=d(je/2),Wr=zr*zr,ia=1-$t*pr*pr,Sa=ia?F(Qe*pr)*I(ln=1/ia):ln=0,ln,an=.5*(2*Sa*Qe*zr+je/A)-Le,wn=.5*(Sa*ht+Xe)-ze,ei=.5*ln*($t*Wr+Sa*Qe*pr*Ot)+.5/A,Mi=ln*(ir*Dt/4-Sa*ht*zr),pi=.125*ln*(Dt*zr-Sa*ht*$t*ir),Ki=.5*ln*(Ot*pr+Sa*Wr*Qe)+.5,Lo=Mi*pi-Ki*ei,bo=(wn*Mi-an*Ki)/Lo,ds=(an*pi-wn*ei)/Lo;je-=bo,Xe-=ds}while((S(bo)>o||S(ds)>o)&&--st>0);return[je,Xe]};function Ar(){return v.geoProjection(fr).scale(158.837)}u.geoNaturalEarth=v.geoNaturalEarth1,u.geoNaturalEarthRaw=v.geoNaturalEarth1Raw,u.geoAiry=Y,u.geoAiryRaw=q,u.geoAitoff=te,u.geoAitoffRaw=ee,u.geoArmadillo=j,u.geoArmadilloRaw=ae,u.geoAugust=K,u.geoAugustRaw=G,u.geoBaker=$,u.geoBakerRaw=X,u.geoBerghaus=re,u.geoBerghausRaw=Q,u.geoBertin1953=Ue,u.geoBertin1953Raw=Ce,u.geoBoggs=De,u.geoBoggsRaw=be,u.geoBonne=yt,u.geoBonneRaw=ot,u.geoBottomley=It,u.geoBottomleyRaw=At,u.geoBromley=vr,u.geoBromleyRaw=Zt,u.geoChamberlin=ye,u.geoChamberlinRaw=Ee,u.geoChamberlinAfrica=he,u.geoCollignon=Fe,u.geoCollignonRaw=Ie,u.geoCraig=We,u.geoCraigRaw=He,u.geoCraster=ft,u.geoCrasterRaw=ct,u.geoCylindricalEqualArea=_t,u.geoCylindricalEqualAreaRaw=mt,u.geoCylindricalStereographic=Et,u.geoCylindricalStereographicRaw=Bt,u.geoEckert1=$r,u.geoEckert1Raw=hr,u.geoEckert2=na,u.geoEckert2Raw=ca,u.geoEckert3=pa,u.geoEckert3Raw=wa,u.geoEckert4=za,u.geoEckert4Raw=fa,u.geoEckert5=Va,u.geoEckert5Raw=Ia,u.geoEckert6=tn,u.geoEckert6Raw=Oa,u.geoEisenlohr=$n,u.geoEisenlohrRaw=oi,u.geoFahey=hi,u.geoFaheyRaw=ci,u.geoFoucaut=Jn,u.geoFoucautRaw=Pi,u.geoFoucautSinusoidal=_n,u.geoFoucautSinusoidalRaw=Ti,u.geoGilbert=Zi,u.geoGingery=Ke,u.geoGingeryRaw=un,u.geoGinzburg4=nr,u.geoGinzburg4Raw=Xt,u.geoGinzburg5=rr,u.geoGinzburg5Raw=cr,u.geoGinzburg6=xt,u.geoGinzburg6Raw=Ze,u.geoGinzburg8=er,u.geoGinzburg8Raw=Vt,u.geoGinzburg9=jr,u.geoGinzburg9Raw=Tr,u.geoGringorten=La,u.geoGringortenRaw=kr,u.geoGuyou=yo,u.geoGuyouRaw=Si,u.geoHammer=ge,u.geoHammerRaw=ue,u.geoHammerRetroazimuthal=Mo,u.geoHammerRetroazimuthalRaw=Vn,u.geoHealpix=ho,u.geoHealpixRaw=Co,u.geoHill=es,u.geoHillRaw=ro,u.geoHomolosine=po,u.geoHomolosineRaw=Yo,u.geoHufnagel=qo,u.geoHufnagelRaw=_s,u.geoHyperelliptical=qs,u.geoHyperellipticalRaw=ts,u.geoInterrupt=xl,u.geoInterruptedBoggs=Wl,u.geoInterruptedHomolosine=ls,u.geoInterruptedMollweide=Do,u.geoInterruptedMollweideHemispheres=Jl,u.geoInterruptedSinuMollweide=Ql,u.geoInterruptedSinusoidal=Uu,u.geoKavrayskiy7=$u,u.geoKavrayskiy7Raw=Xu,u.geoLagrange=_c,u.geoLagrangeRaw=fc,u.geoLarrivee=mu,u.geoLarriveeRaw=pu,u.geoLaskowski=Vs,u.geoLaskowskiRaw=eu,u.geoLittrow=sl,u.geoLittrowRaw=os,u.geoLoximuthal=ju,u.geoLoximuthalRaw=Tu,u.geoMiller=Hs,u.geoMillerRaw=bc,u.geoModifiedStereographic=ll,u.geoModifiedStereographicRaw=Af,u.geoModifiedStereographicAlaska=hc,u.geoModifiedStereographicGs48=Ll,u.geoModifiedStereographicGs50=Qc,u.geoModifiedStereographicMiller=Au,u.geoModifiedStereographicLee=Zu,u.geoMollweide=ie,u.geoMollweideRaw=ce,u.geoMtFlatPolarParabolic=Ju,u.geoMtFlatPolarParabolicRaw=Ku,u.geoMtFlatPolarQuartic=Nc,u.geoMtFlatPolarQuarticRaw=Bc,u.geoMtFlatPolarSinusoidal=xc,u.geoMtFlatPolarSinusoidalRaw=tu,u.geoNaturalEarth2=Qu,u.geoNaturalEarth2Raw=ru,u.geoNellHammer=ec,u.geoNellHammerRaw=$s,u.geoInterruptedQuarticAuthalic=us,u.geoNicolosi=Sf,u.geoNicolosiRaw=wc,u.geoPatterson=Nl,u.geoPattersonRaw=Du,u.geoPolyconic=dc,u.geoPolyconicRaw=Hu,u.geoPolyhedral=vc,u.geoPolyhedralButterfly=ws,u.geoPolyhedralCollignon=jc,u.geoPolyhedralWaterman=qc,u.geoProject=of,u.geoGringortenQuincuncial=Mt,u.geoPeirceQuincuncial=jt,u.geoPierceQuincuncial=jt,u.geoQuantize=_r,u.geoQuincuncial=Fu,u.geoRectangularPolyconic=ea,u.geoRectangularPolyconicRaw=dr,u.geoRobinson=fn,u.geoRobinsonRaw=Ga,u.geoSatellite=Wa,u.geoSatelliteRaw=qn,u.geoSinuMollweide=vs,u.geoSinuMollweideRaw=as,u.geoSinusoidal=ut,u.geoSinusoidalRaw=Ne,u.geoStitch=xs,u.geoTimes=ss,u.geoTimesRaw=bi,u.geoTwoPointAzimuthal=yu,u.geoTwoPointAzimuthalRaw=$o,u.geoTwoPointAzimuthalUsa=ul,u.geoTwoPointEquidistant=Tl,u.geoTwoPointEquidistantRaw=iu,u.geoTwoPointEquidistantUsa=zu,u.geoVanDerGrinten=Al,u.geoVanDerGrintenRaw=Eu,u.geoVanDerGrinten2=Xi,u.geoVanDerGrinten2Raw=nc,u.geoVanDerGrinten3=mf,u.geoVanDerGrinten3Raw=vo,u.geoVanDerGrinten4=ou,u.geoVanDerGrinten4Raw=kc,u.geoWagner=J,u.geoWagner7=fe,u.geoWagnerRaw=L,u.geoWagner4=et,u.geoWagner4Raw=Ye,u.geoWagner6=St,u.geoWagner6Raw=dt,u.geoWiechel=Wt,u.geoWiechelRaw=Ht,u.geoWinkel3=Ar,u.geoWinkel3Raw=fr,Object.defineProperty(u,"__esModule",{value:!0})})}}),Z4=xe({"src/plots/geo/zoom.js"(U,O){"use strict";var u=Na(),v=Sr(),w=Ci(),S=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function a(x,_){var D=x.projection,C;return _._isScoped?C=i:_._isClipped?C=c:C=s,C(x,D)}O.exports=a;function r(x,_){return u.behavior.zoom().translate(_.translate()).scaleExtent(_.scaleExtent()).scale(_.scale())}function n(x,_,D){var C=x.id,F=x.graphDiv,I=F.layout,z=I[C],R=F._fullLayout,k=R[C],B={},N={};function q(Y,ee){B[C+"."+Y]=v.nestedProperty(z,Y).get(),w.call("_storeDirectGUIEdit",I,R._preGUI,B);var te=v.nestedProperty(k,Y);te.get()!==ee&&(te.set(ee),v.nestedProperty(z,Y).set(ee),N[C+"."+Y]=ee)}D(q),q("projection.scale",_.scale()/x.fitScale),q("fitbounds",!1),F.emit("plotly_relayout",N)}function i(x,_){var D=r(x,_);function C(){u.select(this).style(e)}function F(){_.scale(u.event.scale).translate(u.event.translate),x.render(!0);var R=_.invert(x.midPt);x.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":_.scale()/x.fitScale,"geo.center.lon":R[0],"geo.center.lat":R[1]})}function I(R){var k=_.invert(x.midPt);R("center.lon",k[0]),R("center.lat",k[1])}function z(){u.select(this).style(t),n(x,_,I)}return D.on("zoomstart",C).on("zoom",F).on("zoomend",z),D}function s(x,_){var D=r(x,_),C=2,F,I,z,R,k,B,N,q,Y;function ee(H){return _.invert(H)}function te(H){var Z=ee(H);if(!Z)return!0;var X=_(Z);return Math.abs(X[0]-H[0])>C||Math.abs(X[1]-H[1])>C}function ae(){u.select(this).style(e);let{x:H,y:Z,width:X,height:$}=this.getBBox();F=u.event.sourceEvent?u.mouse(this):[H+X/2,Z+$/2],I=_.rotate(),z=_.translate(),R=I,k=ee(F)}function j(){let{x:H,y:Z,width:X,height:$}=this.getBBox();if(B=u.event.sourceEvent?u.mouse(this):[H+X/2,Z+$/2],te(F)){D.scale(_.scale()),D.translate(_.translate());return}_.scale(u.event.scale),_.translate([z[0],u.event.translate[1]]),k?ee(B)&&(q=ee(B),N=[R[0]+(q[0]-k[0]),I[1],I[2]],_.rotate(N),R=N):(F=B,k=ee(F)),Y=!0,x.render(!0);var Q=_.rotate(),re=_.invert(x.midPt);x.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":_.scale()/x.fitScale,"geo.center.lon":re[0],"geo.center.lat":re[1],"geo.projection.rotation.lon":-Q[0]})}function G(){u.select(this).style(t),Y&&n(x,_,K)}function K(H){var Z=_.rotate(),X=_.invert(x.midPt);H("projection.rotation.lon",-Z[0]),H("center.lon",X[0]),H("center.lat",X[1])}return D.on("zoomstart",ae).on("zoom",j).on("zoomend",G),D}function c(x,_){var D={r:_.rotate(),k:_.scale()},C=r(x,_),F=h(C,"zoomstart","zoom","zoomend"),I=0,z=C.on,R;C.on("zoomstart",function(){u.select(this).style(e);let{x:Y,y:ee,width:te,height:ae}=this.getBBox(),j=u.event.sourceEvent?u.mouse(this):[Y+te/2,ee+ae/2],G=_.rotate(),K=G,H=_.translate(),Z=f(G);R=p(_,j),z.call(C,"zoom",function(){let{x:X,y:$,width:Q,height:re}=this.getBBox(),ue=u.event.sourceEvent?u.mouse(this):[X+Q/2,$+re/2];if(_.scale(D.k=u.event.scale),!R)j=ue,R=p(_,j);else if(p(_,ue)){_.rotate(G).translate(H);var pe=p(_,ue),ge=y(R,pe),Te=E(d(Z,ge)),Se=D.r=o(Te,R,K);(!isFinite(Se[0])||!isFinite(Se[1])||!isFinite(Se[2]))&&(Se=K),_.rotate(Se),K=Se}B(F.of(this,arguments))}),k(F.of(this,arguments))}).on("zoomend",function(){u.select(this).style(t),z.call(C,"zoom",null),N(F.of(this,arguments)),n(x,_,q)}).on("zoom.redraw",function(){x.render(!0);var Y=_.rotate();x.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":_.scale()/x.fitScale,"geo.projection.rotation.lon":-Y[0],"geo.projection.rotation.lat":-Y[1]})});function k(Y){I++||Y({type:"zoomstart"})}function B(Y){Y({type:"zoom"})}function N(Y){--I||Y({type:"zoomend"})}function q(Y){var ee=_.rotate();Y("projection.rotation.lon",-ee[0]),Y("projection.rotation.lat",-ee[1])}return u.rebind(C,F,"on")}function p(x,_){var D=x.invert(_);return D&&isFinite(D[0])&&isFinite(D[1])&&g(D)}function f(x){var _=.5*x[0]*S,D=.5*x[1]*S,C=.5*x[2]*S,F=Math.sin(_),I=Math.cos(_),z=Math.sin(D),R=Math.cos(D),k=Math.sin(C),B=Math.cos(C);return[I*R*B+F*z*k,F*R*B-I*z*k,I*z*B+F*R*k,I*R*k-F*z*B]}function d(x,_){var D=x[0],C=x[1],F=x[2],I=x[3],z=_[0],R=_[1],k=_[2],B=_[3];return[D*z-C*R-F*k-I*B,D*R+C*z+F*B-I*k,D*k-C*B+F*z+I*R,D*B+C*k-F*R+I*z]}function y(x,_){if(!(!x||!_)){var D=m(x,_),C=Math.sqrt(T(D,D)),F=.5*Math.acos(Math.max(-1,Math.min(1,T(x,_)))),I=Math.sin(F)/C;return C&&[Math.cos(F),D[2]*I,-D[1]*I,D[0]*I]}}function o(x,_,D){var C=A(_,2,x[0]);C=A(C,1,x[1]),C=A(C,0,x[2]-D[2]);var F=_[0],I=_[1],z=_[2],R=C[0],k=C[1],B=C[2],N=Math.atan2(I,F)*l,q=Math.sqrt(F*F+I*I),Y,ee;Math.abs(k)>q?(ee=(k>0?90:-90)-N,Y=0):(ee=Math.asin(k/q)*l-N,Y=Math.sqrt(q*q-k*k));var te=180-ee-2*N,ae=(Math.atan2(B,R)-Math.atan2(z,Y))*l,j=(Math.atan2(B,R)-Math.atan2(z,-Y))*l,G=b(D[0],D[1],ee,ae),K=b(D[0],D[1],te,j);return G<=K?[ee,ae,D[2]]:[te,j,D[2]]}function b(x,_,D,C){var F=M(D-x),I=M(C-_);return Math.sqrt(F*F+I*I)}function M(x){return(x%360+540)%360-180}function A(x,_,D){var C=D*S,F=x.slice(),I=_===0?1:0,z=_===2?1:2,R=Math.cos(C),k=Math.sin(C);return F[I]=x[I]*R-x[z]*k,F[z]=x[z]*R+x[I]*k,F}function E(x){return[Math.atan2(2*(x[0]*x[1]+x[2]*x[3]),1-2*(x[1]*x[1]+x[2]*x[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(x[0]*x[2]-x[3]*x[1]))))*l,Math.atan2(2*(x[0]*x[3]+x[1]*x[2]),1-2*(x[2]*x[2]+x[3]*x[3]))*l]}function g(x){var _=x[0]*S,D=x[1]*S,C=Math.cos(D);return[C*Math.cos(_),C*Math.sin(_),Math.sin(D)]}function T(x,_){for(var D=0,C=0,F=x.length;C0&&N._module.calcGeoJSON(B,I)}if(!z){var q=this.updateProjection(F,I);if(q)return;(!this.viewInitial||this.scope!==R.scope)&&this.saveViewInitial(R)}this.scope=R.scope,this.updateBaseLayers(I,R),this.updateDims(I,R),this.updateFx(I,R),s.generalUpdatePerTraceModule(this.graphDiv,this,F,R);var Y=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=Y.selectAll(".point"),this.dataPoints.text=Y.selectAll("text"),this.dataPaths.line=Y.selectAll(".js-line");var ee=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ee.selectAll("path"),this._render()},x.updateProjection=function(F,I){var z,R=this.graphDiv,k=I[this.id],B=I._size,N=k.domain,q=k.projection,Y=k.lonaxis,ee=k.lataxis,te=Y._ax,ae=ee._ax,j=this.projection=_(k),G=[[B.l+B.w*N.x[0],B.t+B.h*(1-N.y[1])],[B.l+B.w*N.x[1],B.t+B.h*(1-N.y[0])]],K=k.center||{},H=q.rotation||{},Z=Y.range||[],X=ee.range||[];if(k.fitbounds){if(te._length=G[1][0]-G[0][0],ae._length=G[1][1]-G[0][1],te.range=p(R,te),ae.range=p(R,ae),!this.hasChoropleth&&k.fitbounds==="locations"){for(var $=[],Q=!1,re=0;re0?(te.range[1]-te.range[0]-Ce)/2*(Se[1]-Se[0])/Ce:0;te.range=[Se[0]-Ue,Se[1]+Ue]}}}var Oe=(te.range[0]+te.range[1])/2,_e=(ae.range[0]+ae.range[1])/2;if(k._isScoped)K={lon:Oe,lat:_e};else if(k._isClipped){K={lon:Oe,lat:_e},H={lon:Oe,lat:_e,roll:H.roll};var ce=q.type,ie=M.lonaxisSpan[ce]/2||180,se=M.lataxisSpan[ce]/2||90;Z=[Oe-ie,Oe+ie],X=[_e-se,_e+se]}else K={lon:Oe,lat:_e},H={lon:Oe,lat:H.lat,roll:H.roll}}j.center([K.lon-H.lon,K.lat-H.lat]).rotate([-H.lon,-H.lat,H.roll]).parallels(q.parallels);var ne=C(Z,X);j.fitExtent(G,ne);var be=this.bounds=j.getBounds(ne),De=this.fitScale=j.scale(),qe=j.translate();if(j.scaleExtent=()=>{var It;let{minscale:Zt}=q,vr=(It=q.maxscale)!=null?It:1/0;return[De*Math.min(Zt,vr),De*Math.max(Zt,vr)]},k.fitbounds){var Ne=j.getBounds(C(te.range,ae.range)),ut=Math.min((be[1][0]-be[0][0])/(Ne[1][0]-Ne[0][0]),(be[1][1]-be[0][1])/(Ne[1][1]-Ne[0][1]));isFinite(ut)?j.scale(ut*De):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else j.scale(q.scale*De);var ot=this.midPt=[(be[0][0]+be[1][0])/2,(be[0][1]+be[1][1])/2];if(j.translate([qe[0]+(ot[0]-qe[0]),qe[1]+(ot[1]-qe[1])]).clipExtent(be),k._isAlbersUsa){var yt=j([K.lon,K.lat]);if(yt){var At=j.translate();j.translate([At[0]-(yt[0]-At[0]),At[1]-(yt[1]-At[1])])}}},x.updateBaseLayers=function(F,I){var z=this,R=z.topojson,k=z.layers,B=z.basePaths;function N(j){return j==="lonaxis"||j==="lataxis"}function q(j){return!!M.lineLayers[j]}function Y(j){return!!M.fillLayers[j]}var ee=this.hasChoropleth?M.layersForChoropleth:M.layers,te=ee.filter(function(j){return q(j)||Y(j)?I["show"+j]:N(j)?I[j].showgrid:!0}),ae=z.framework.selectAll(".layer").data(te,String);ae.exit().each(function(j){delete k[j],delete B[j],u.select(this).remove()}),ae.enter().append("g").attr("class",function(j){return"layer "+j}).each(function(j){var G=k[j]=u.select(this);j==="bg"?z.bgRect=G.append("rect").style("pointer-events","all"):N(j)?B[j]=G.append("path").style("fill","none"):j==="backplot"?G.append("g").classed("choroplethlayer",!0):j==="frontplot"?G.append("g").classed("scatterlayer",!0):q(j)?B[j]=G.append("path").style("fill","none").style("stroke-miterlimit",2):Y(j)&&(B[j]=G.append("path").style("stroke","none"))}),ae.order(),ae.each(function(j){var G=B[j],K=M.layerNameToAdjective[j];j==="frame"?G.datum(M.sphereSVG):q(j)||Y(j)?G.datum(m(R,R.objects[j])):N(j)&&G.datum(D(j,I,F)).call(r.stroke,I[j].gridcolor).call(n.dashLine,I[j].griddash,I[j].gridwidth),q(j)?G.call(r.stroke,I[K+"color"]).call(n.dashLine,"",I[K+"width"]):Y(j)&&G.call(r.fill,I[K+"color"])})},x.updateDims=function(F,I){var z=this.bounds,R=(I.framewidth||0)/2,k=z[0][0]-R,B=z[0][1]-R,N=z[1][0]-k+R,q=z[1][1]-B+R;n.setRect(this.clipRect,k,B,N,q),this.bgRect.call(n.setRect,k,B,N,q).call(r.fill,I.bgcolor),this.xaxis._offset=k,this.xaxis._length=N,this.yaxis._offset=B,this.yaxis._length=q},x.updateFx=function(F,I){var z=this,R=z.graphDiv,k=z.bgRect,B=F.dragmode,N=F.clickmode;if(z.isStatic)return;function q(){var ae=z.viewInitial,j={};for(var G in ae)j[z.id+"."+G]=ae[G];e.call("_guiRelayout",R,j),R.emit("plotly_doubleclick",null)}function Y(ae){return z.projection.invert([ae[0]+z.xaxis._offset,ae[1]+z.yaxis._offset])}var ee=function(ae,j){if(j.isRect){var G=ae.range={};G[z.id]=[Y([j.xmin,j.ymin]),Y([j.xmax,j.ymax])]}else{var K=ae.lassoPoints={};K[z.id]=j.map(Y)}},te={element:z.bgRect.node(),gd:R,plotinfo:{id:z.id,xaxis:z.xaxis,yaxis:z.yaxis,fillRangeItems:ee},xaxes:[z.xaxis],yaxes:[z.yaxis],subplot:z.id,clickFn:function(ae){ae===2&&y(R)}};if(B==="pan"){k.node().onmousedown=null;let ae=b(z,I);if(k.call(ae),!u.event){let j=z.projection.scale(),[G,K]=z.projection.scaleExtent();(jK)&&ae.event(k)}k.on("dblclick.zoom",q),R._context._scrollZoom.geo||k.on("wheel.zoom",null)}else(B==="select"||B==="lasso")&&(k.on(".zoom",null),te.prepFn=function(ae,j,G){d(ae,j,G,te,B)},f.init(te));k.on("mousemove",function(){var ae=z.projection.invert(t.getPositionFromD3Event());if(!ae)return f.unhover(R,u.event);z.xaxis.p2c=function(){return ae[0]},z.yaxis.p2c=function(){return ae[1]},i.hover(R,u.event,z.id)}),k.on("mouseout",function(){R._dragging||f.unhover(R,u.event)}),k.on("click",function(){B!=="select"&&B!=="lasso"&&(N.indexOf("select")>-1&&o(u.event,R,[z.xaxis],[z.yaxis],z.id,te),N.indexOf("event")>-1&&i.click(R,u.event))})},x.makeFramework=function(){var F=this,I=F.graphDiv,z=I._fullLayout,R="clip"+z._uid+F.id;F.clipDef=z._clips.append("clipPath").attr("id",R),F.clipRect=F.clipDef.append("rect"),F.framework=u.select(F.container).append("g").attr("class","geo "+F.id).call(n.setClipUrl,R,I),F.project=function(k){var B=F.projection(k);return B?[B[0]-F.xaxis._offset,B[1]-F.yaxis._offset]:[null,null]},F.xaxis={_id:"x",c2p:function(k){return F.project(k)[0]}},F.yaxis={_id:"y",c2p:function(k){return F.project(k)[1]}},F.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(F.mockAxis,z)},x.saveViewInitial=function(F){var I=F.center||{},z=F.projection,R=z.rotation||{};this.viewInitial={fitbounds:F.fitbounds,"projection.scale":z.scale};var k;F._isScoped?k={"center.lon":I.lon,"center.lat":I.lat}:F._isClipped?k={"projection.rotation.lon":R.lon,"projection.rotation.lat":R.lat,"center.lon":I.lon,"center.lat":I.lat}:k={"center.lon":I.lon,"center.lat":I.lat,"projection.rotation.lon":R.lon},t.extendFlat(this.viewInitial,k)},x.render=function(F){this._hasMarkerAngles&&F?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},x._render=function(){var F=this.projection,I=F.getPath(),z;function R(B){var N=F(B.lonlat);return N?a(N[0],N[1]):null}function k(B){return F.isLonLatOverEdges(B.lonlat)?"none":null}for(z in this.basePaths)this.basePaths[z].attr("d",I);for(z in this.dataPaths)this.dataPaths[z].attr("d",function(B){return I(B.geojson)});for(z in this.dataPoints)this.dataPoints[z].attr("display",k).attr("transform",R)};function _(F){var I=F.projection,z=I.type,R=M.projNames[z];R="geo"+t.titleCase(R);for(var k=v[R]||l[R],B=k(),N=F._isSatellite?Math.acos(1/I.distance)*180/Math.PI:F._isClipped?M.lonaxisSpan[z]/2:null,q=["center","rotate","parallels","clipExtent"],Y=function(ae){return ae?B:[]},ee=0;eeK}else return!1},B.getPath=function(){return w().projection(B)},B.getBounds=function(ae){return B.getPath().bounds(ae)},B.precision(M.precision),F._isSatellite&&B.tilt(I.tilt).distance(I.distance),N&&B.clipAngle(N-M.clipPad),B}function D(F,I,z){var R=1e-6,k=2.5,B=I[F],N=M.scopeDefaults[I.scope],q,Y,ee;F==="lonaxis"?(q=N.lonaxisRange,Y=N.lataxisRange,ee=function($,Q){return[$,Q]}):F==="lataxis"&&(q=N.lataxisRange,Y=N.lonaxisRange,ee=function($,Q){return[Q,$]});var te={type:"linear",range:[q[0],q[1]-R],tick0:B.tick0,dtick:B.dtick};c.setConvert(te,z);var ae=c.calcTicks(te);!I.isScoped&&F==="lonaxis"&&ae.pop();for(var j=ae.length,G=new Array(j),K=0;Kue[pe]!=null)||l.fitboundsIncompatible.has(o)?n.fitbounds=!1:Q.forEach(({dst:ue,key:pe})=>ue&&(ue[pe]=null))}}}}),t3=xe({"src/plots/geo/index.js"(U,O){"use strict";var u=df().getSubplotCalcData,v=Sr().counterRegex,w=K4(),S="geo",l=v(S),e={};e[S]={valType:"subplotid",dflt:S,editType:"calc"};function t(n){for(var i=n._fullLayout,s=n.calcdata,c=i._subplots[S],p=0;p")}}}}),i3=xe({"src/traces/choropleth/event_data.js"(U,O){"use strict";O.exports=function(v,w,S,l,e){v.location=w.location,v.z=w.z;var t=l[e];return t.fIn&&t.fIn.properties&&(v.properties=t.fIn.properties),v.ct=t.ct,v}}}),o3=xe({"src/traces/choropleth/select.js"(U,O){"use strict";O.exports=function(v,w){var S=v.cd,l=v.xaxis,e=v.yaxis,t=[],a,r,n,i,s;if(w===!1)for(a=0;a=Math.min(N,q)&&y<=Math.max(N,q)?0:1/0}if(C=Math.min(Y,ee)&&o<=Math.max(Y,ee)?0:1/0}z=Math.sqrt(C*C+F*F),h=M[D]}}}else for(D=M.length-1;D>-1;D--)m=M[D],x=f[m],_=d[m],C=c.c2p(x)-y,F=p.c2p(_)-o,I=Math.sqrt(C*C+F*F),I100},U.isDotSymbol=function(u){return typeof u=="string"?O.DOT_RE.test(u):u>200}}}),nC=xe({"src/traces/scattergl/defaults.js"(U,O){"use strict";var u=Sr(),v=Ci(),w=V1(),S=tm(),l=jh(),e=Cl(),t=_v(),a=Sh(),r=hh(),n=Eh(),i=Vh(),s=kh();O.exports=function(p,f,d,y){function o(h,x){return u.coerce(p,f,S,h,x)}var b=p.marker?w.isOpenSymbol(p.marker.symbol):!1,M=e.isBubble(p),A=t(p,f,y,o);if(!A){f.visible=!1;return}a(p,f,y,o),o("xhoverformat"),o("yhoverformat");var E=A>>1,p=t[c],f=r!==void 0?r(p,a):p-a;f>=0?(s=c,i=c-1):n=c+1}return s}function v(t,a,r,n,i){for(var s=i+1;n<=i;){var c=n+i>>>1,p=t[c],f=r!==void 0?r(p,a):p-a;f>0?(s=c,i=c-1):n=c+1}return s}function w(t,a,r,n,i){for(var s=n-1;n<=i;){var c=n+i>>>1,p=t[c],f=r!==void 0?r(p,a):p-a;f<0?(s=c,n=c+1):i=c-1}return s}function S(t,a,r,n,i){for(var s=n-1;n<=i;){var c=n+i>>>1,p=t[c],f=r!==void 0?r(p,a):p-a;f<=0?(s=c,n=c+1):i=c-1}return s}function l(t,a,r,n,i){for(;n<=i;){var s=n+i>>>1,c=t[s],p=r!==void 0?r(c,a):c-a;if(p===0)return s;p<=0?n=s+1:i=s-1}return-1}function e(t,a,r,n,i,s){return typeof r=="function"?s(t,a,r,n===void 0?0:n|0,i===void 0?t.length-1:i|0):s(t,a,void 0,r===void 0?0:r|0,n===void 0?t.length-1:n|0)}O.exports={ge:function(t,a,r,n,i){return e(t,a,r,n,i,u)},gt:function(t,a,r,n,i){return e(t,a,r,n,i,v)},lt:function(t,a,r,n,i){return e(t,a,r,n,i,w)},le:function(t,a,r,n,i){return e(t,a,r,n,i,S)},eq:function(t,a,r,n,i){return e(t,a,r,n,i,l)}}}}),Yh=xe({"node_modules/pick-by-alias/index.js"(U,O){"use strict";O.exports=function(S,l,e){var t={},a,r;if(typeof l=="string"&&(l=v(l)),Array.isArray(l)){var n={};for(r=0;r1&&(w=arguments),typeof w=="string"?w=w.split(/\s/).map(parseFloat):typeof w=="number"&&(w=[w]),w.length&&typeof w[0]=="number"?w.length===1?S={width:w[0],height:w[0],x:0,y:0}:w.length===2?S={width:w[0],height:w[1],x:0,y:0}:S={x:w[0],y:w[1],width:w[2]-w[0]||0,height:w[3]-w[1]||0}:w&&(w=u(w,{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"}),S={x:w.left||0,y:w.top||0},w.width==null?w.right?S.width=w.right-S.x:S.width=0:S.width=w.width,w.height==null?w.bottom?S.height=w.bottom-S.y:S.height=0:S.height=w.height),S}}}),Nv=xe({"node_modules/array-bounds/index.js"(U,O){"use strict";O.exports=u;function u(v,w){if(!v||v.length==null)throw Error("Argument should be an array");w==null?w=1:w=Math.floor(w);for(var S=Array(w*2),l=0;le&&(e=v[a]),v[a]>>1,M;f.dtype||(f.dtype="array"),typeof f.dtype=="string"?M=new(r(f.dtype))(b):f.dtype&&(M=f.dtype,Array.isArray(M)&&(M.length=b));for(let C=0;Cd||k>i){for(let Z=0;Zre||q>ue||Y=te||$===Q)return;let pe=A[X];Q===void 0&&(Q=pe.length);for(let ie=$;ie=z&&ne<=k&&be>=R&&be<=B&&ae.push(se)}let ge=E[X],Te=ge[$*4+0],Se=ge[$*4+1],Ce=ge[$*4+2],Ue=ge[$*4+3],Oe=G(ge,$+1),_e=Z*.5,ce=X+1;j(K,H,_e,ce,Te,Se||Ce||Ue||Oe),j(K,H+_e,_e,ce,Se,Ce||Ue||Oe),j(K+_e,H,_e,ce,Ce,Ue||Oe),j(K+_e,H+_e,_e,ce,Ue,Oe)}function G(K,H){let Z=null,X=0;for(;Z===null;)if(Z=K[H*4+X],X++,X>K.length)return null;return Z}return ae}function _(C,F,I,z,R){let k=[];for(let B=0;B1&&(p=1),p<-1&&(p=-1),c*Math.acos(p)},e=function(r,n,i,s,c,p,f,d,y,o,b,M){var A=Math.pow(c,2),E=Math.pow(p,2),g=Math.pow(b,2),T=Math.pow(M,2),m=A*E-A*T-E*g;m<0&&(m=0),m/=A*T+E*g,m=Math.sqrt(m)*(f===d?-1:1);var h=m*c/p*M,x=m*-p/c*b,_=o*h-y*x+(r+i)/2,D=y*h+o*x+(n+s)/2,C=(b-h)/c,F=(M-x)/p,I=(-b-h)/c,z=(-M-x)/p,R=l(1,0,C,F),k=l(C,F,I,z);return d===0&&k>0&&(k-=v),d===1&&k<0&&(k+=v),[_,D,R,k]},t=function(r){var n=r.px,i=r.py,s=r.cx,c=r.cy,p=r.rx,f=r.ry,d=r.xAxisRotation,y=d===void 0?0:d,o=r.largeArcFlag,b=o===void 0?0:o,M=r.sweepFlag,A=M===void 0?0:M,E=[];if(p===0||f===0)return[];var g=Math.sin(y*v/360),T=Math.cos(y*v/360),m=T*(n-s)/2+g*(i-c)/2,h=-g*(n-s)/2+T*(i-c)/2;if(m===0&&h===0)return[];p=Math.abs(p),f=Math.abs(f);var x=Math.pow(m,2)/Math.pow(p,2)+Math.pow(h,2)/Math.pow(f,2);x>1&&(p*=Math.sqrt(x),f*=Math.sqrt(x));var _=e(n,i,s,c,p,f,b,A,g,T,m,h),D=u(_,4),C=D[0],F=D[1],I=D[2],z=D[3],R=Math.abs(z)/(v/4);Math.abs(1-R)<1e-7&&(R=1);var k=Math.max(Math.ceil(R),1);z/=k;for(var B=0;B4?(a=o[o.length-4],r=o[o.length-3]):(a=p,r=f),t.push(o)}return t}function w(l,e,t,a){return["C",l,e,t,a,t,a]}function S(l,e,t,a,r,n){return["C",l/3+2/3*t,e/3+2/3*a,r/3+2/3*t,n/3+2/3*a,r,n]}}}),l3=xe({"node_modules/is-svg-path/index.js"(U,O){"use strict";O.exports=function(v){return typeof v!="string"?!1:(v=v.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(v)&&/[\dz]$/i.test(v)&&v.length>4))}}}),dC=xe({"node_modules/svg-path-bounds/index.js"(U,O){"use strict";var u=i0(),v=s3(),w=hC(),S=l3(),l=C0();O.exports=e;function e(t){if(Array.isArray(t)&&t.length===1&&typeof t[0]=="string"&&(t=t[0]),typeof t=="string"&&(l(S(t),"String is not an SVG path."),t=u(t)),l(Array.isArray(t),"Argument should be a string or an array of path segments."),t=v(t),t=w(t),!t.length)return[0,0,0,0];for(var a=[1/0,1/0,-1/0,-1/0],r=0,n=t.length;ra[2]&&(a[2]=i[s+0]),i[s+1]>a[3]&&(a[3]=i[s+1]);return a}}}),vC=xe({"node_modules/normalize-svg-path/index.js"(U,O){var u=Math.PI,v=a(120);O.exports=w;function w(r){for(var n,i=[],s=0,c=0,p=0,f=0,d=null,y=null,o=0,b=0,M=0,A=r.length;M7&&(i.push(E.splice(0,7)),E.unshift("C"));break;case"S":var T=o,m=b;(n=="C"||n=="S")&&(T+=T-s,m+=m-c),E=["C",T,m,E[1],E[2],E[3],E[4]];break;case"T":n=="Q"||n=="T"?(d=o*2-d,y=b*2-y):(d=o,y=b),E=l(o,b,d,y,E[1],E[2]);break;case"Q":d=E[1],y=E[2],E=l(o,b,E[1],E[2],E[3],E[4]);break;case"L":E=S(o,b,E[1],E[2]);break;case"H":E=S(o,b,E[1],b);break;case"V":E=S(o,b,o,E[1]);break;case"Z":E=S(o,b,p,f);break}n=g,o=E[E.length-2],b=E[E.length-1],E.length>4?(s=E[E.length-4],c=E[E.length-3]):(s=o,c=b),i.push(E)}return i}function S(r,n,i,s){return["C",r,n,i,s,i,s]}function l(r,n,i,s,c,p){return["C",r/3+2/3*i,n/3+2/3*s,c/3+2/3*i,p/3+2/3*s,c,p]}function e(r,n,i,s,c,p,f,d,y,o){if(o)_=o[0],D=o[1],h=o[2],x=o[3];else{var b=t(r,n,-c);r=b.x,n=b.y,b=t(d,y,-c),d=b.x,y=b.y;var M=(r-d)/2,A=(n-y)/2,E=M*M/(i*i)+A*A/(s*s);E>1&&(E=Math.sqrt(E),i=E*i,s=E*s);var g=i*i,T=s*s,m=(p==f?-1:1)*Math.sqrt(Math.abs((g*T-g*A*A-T*M*M)/(g*A*A+T*M*M)));m==1/0&&(m=1);var h=m*i*A/s+(r+d)/2,x=m*-s*M/i+(n+y)/2,_=Math.asin(((n-x)/s).toFixed(9)),D=Math.asin(((y-x)/s).toFixed(9));_=rD&&(_=_-u*2),!f&&D>_&&(D=D-u*2)}if(Math.abs(D-_)>v){var C=D,F=d,I=y;D=_+v*(f&&D>_?1:-1),d=h+i*Math.cos(D),y=x+s*Math.sin(D);var z=e(d,y,i,s,c,0,f,F,I,[D,C,h,x])}var R=Math.tan((D-_)/4),k=4/3*i*R,B=4/3*s*R,N=[2*r-(r+k*Math.sin(_)),2*n-(n-B*Math.cos(_)),d+k*Math.sin(D),y-B*Math.cos(D),d,y];if(o)return N;z&&(N=N.concat(z));for(var q=0;q0?t.strokeStyle="white":t.strokeStyle="black",t.lineWidth=Math.abs(d)),t.translate(c*.5,p*.5),t.scale(b,b),n()){var M=new Path2D(i);t.fill(M),d&&t.stroke(M)}else{var A=v(i);w(t,A),t.fill(),d&&t.stroke()}t.setTransform(1,0,0,1,0,0);var E=l(t,{cutoff:s.cutoff!=null?s.cutoff:.5,radius:s.radius!=null?s.radius:f*.5});return E}var r;function n(){if(r!=null)return r;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return r=!1;var s=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(s);var c=i.getImageData(0,0,1,1);return r=c&&c.data&&c.data[3]===255}}}),Uv=xe({"src/traces/scattergl/convert.js"(U,O){"use strict";var u=yn(),v=gC(),w=Xd(),S=Ci(),l=Sr(),e=l.isArrayOrTypedArray,t=go(),a=fu(),r=yd().formatColor,n=Cl(),i=n0(),s=V1(),c=Zd(),p=fd().DESELECTDIM,f={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},d=Kf().appendArrayPointValue;function y(z,R){var k,B={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},N=z._context.plotGlPixelRatio;if(R.visible!==!0)return B;if(n.hasText(R)&&(B.text=o(z,R),B.textSel=E(z,R,R.selected),B.textUnsel=E(z,R,R.unselected)),n.hasMarkers(R)&&(B.marker=M(z,R),B.markerSel=A(z,R,R.selected),B.markerUnsel=A(z,R,R.unselected),!R.unselected&&e(R.marker.opacity))){var q=R.marker.opacity;for(B.markerUnsel.opacity=new Array(q.length),k=0;k500?"bold":"normal":z}function M(z,R){var k=R._length,B=R.marker,N={},q,Y=e(B.symbol),ee=e(B.angle),te=e(B.color),ae=e(B.line.color),j=e(B.opacity),G=e(B.size),K=e(B.line.width),H;if(Y||(H=s.isOpenSymbol(B.symbol)),Y||te||ae||j||ee){N.symbols=new Array(k),N.angles=new Array(k),N.colors=new Array(k),N.borderColors=new Array(k);var Z=B.symbol,X=B.angle,$=r(B,B.opacity,k),Q=r(B.line,B.opacity,k);if(!e(Q[0])){var re=Q;for(Q=Array(k),q=0;qc.TOO_MANY_POINTS||n.hasMarkers(R)?"rect":"round";if(ae&&R.connectgaps){var G=q[0],K=q[1];for(Y=0;Y1?te[Y]:te[0]:te,H=e(ae)?ae.length>1?ae[Y]:ae[0]:ae,Z=f[K],X=f[H],$=j?j/.8+1:0,Q=-X*$-X*.5;q.offset[Y]=[Z*$/G,Q/G]}}return q}O.exports={style:y,markerStyle:M,markerSelection:A,linePositions:C,errorBarPositions:F,textPosition:I}}}),u3=xe({"src/traces/scattergl/scene_update.js"(U,O){"use strict";var u=Sr();O.exports=function(w,S){var l=S._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return S._scene||(l=S._scene={},l.init=function(){u.extendFlat(l,t,e)},l.init(),l.update=function(r){var n=u.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(n),l.scatter2d&&l.scatter2d.update(n),l.line2d&&l.line2d.update(n),l.error2d&&l.error2d.update(n.concat(n)),l.select2d&&l.select2d.update(n),l.glText)for(var i=0;i=p,h=T*2,x={},_,D=A.makeCalcdata(b,"x"),C=E.makeCalcdata(b,"y"),F=l(b,A,"x",D),I=l(b,E,"y",C),z=F.vals,R=I.vals;b._x=z,b._y=R,b.xperiodalignment&&(b._origX=D,b._xStarts=F.starts,b._xEnds=F.ends),b.yperiodalignment&&(b._origY=C,b._yStarts=I.starts,b._yEnds=I.ends);var k=new Array(h),B=new Array(T);for(_=0;_1&&v.extendFlat(g.line,i.linePositions(y,b,M)),g.errorX||g.errorY){var T=i.errorBarPositions(y,b,M,A,E);g.errorX&&v.extendFlat(g.errorX,T.x),g.errorY&&v.extendFlat(g.errorY,T.y)}return g.text&&(v.extendFlat(g.text,{positions:M},i.textPosition(y,b,g.text,g.marker)),v.extendFlat(g.textSel,{positions:M},i.textPosition(y,b,g.text,g.markerSel)),v.extendFlat(g.textUnsel,{positions:M},i.textPosition(y,b,g.text,g.markerUnsel))),g}}}),c3=xe({"src/traces/scattergl/edit_style.js"(U,O){"use strict";var u=Sr(),v=wi(),w=fd().DESELECTDIM;function S(l){var e=l[0],t=e.trace,a=e.t,r=a._scene,n=a.index,i=r.selectBatch[n],s=r.unselectBatch[n],c=r.textOptions[n],p=r.textSelectedOptions[n]||{},f=r.textUnselectedOptions[n]||{},d=u.extendFlat({},c),y,o;if(i.length||s.length){var b=p.color,M=f.color,A=c.color,E=u.isArrayOrTypedArray(A);for(d.color=new Array(t._length),y=0;y>>24,t=(S&16711680)>>>16,a=(S&65280)>>>8,r=S&255;return l===!1?[e,t,a,r]:[e/255,t/255,a/255,r/255]}}}),cc=xe({"node_modules/object-assign/index.js"(U,O){"use strict";var u=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;function S(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function l(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},a=0;a<10;a++)t["_"+String.fromCharCode(a)]=a;var r=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(r.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}O.exports=l()?Object.assign:function(e,t){for(var a,r=S(e),n,i=1;ix.length)&&(_=x.length);for(var D=0,C=new Array(_);D<_;D++)C[D]=x[D];return C}function r(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=Xd(),s=Nv(),c=bC(),p=H1(),f=cc(),d=xC(),y=Yh(),o=h3(),b=Ov(),M=wC(),A=G1(),E=Dp(),g=T;function T(x,_){var D=this;if(!(this instanceof T))return new T(x,_);typeof x=="function"?(_||(_={}),_.regl=x):(_=x,x=null),_&&_.length&&(_.positions=_),x=_.regl;var C=x._gl,F,I=[],z={},R=[],k=[null],B=[null],N=255,q=100;this.tooManyColors=M,F=x.texture({data:new Uint8Array(N*4),width:N,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),f(this,{regl:x,gl:C,groups:R,markerCache:B,markerTextures:k,palette:I,paletteIds:z,paletteTexture:F,maxColors:N,maxSize:q,canvas:C.canvas}),this.update(_);var Y={uniforms:{constPointSize:!!_.constPointSize,opacity:x.prop("opacity"),paletteSize:function(j,G){return[D.tooManyColors?0:N,F.height]},pixelRatio:x.context("pixelRatio"),scale:x.prop("scale"),scaleFract:x.prop("scaleFract"),translate:x.prop("translate"),translateFract:x.prop("translateFract"),markerTexture:x.prop("markerTexture"),paletteTexture:F},attributes:{x:function(j,G){return G.xAttr||{buffer:G.positionBuffer,stride:8,offset:0}},y:function(j,G){return G.yAttr||{buffer:G.positionBuffer,stride:8,offset:4}},xFract:function(j,G){return G.xAttr?{constant:[0,0]}:{buffer:G.positionFractBuffer,stride:8,offset:0}},yFract:function(j,G){return G.yAttr?{constant:[0,0]}:{buffer:G.positionFractBuffer,stride:8,offset:4}},size:function(j,G){return G.size.length?{buffer:G.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(G.size*255/D.maxSize)]}},borderSize:function(j,G){return G.borderSize.length?{buffer:G.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(G.borderSize*255/D.maxSize)]}},colorId:function(j,G){return G.color.length?{buffer:G.colorBuffer,stride:D.tooManyColors?8:4,offset:0}:{constant:D.tooManyColors?I.slice(G.color*4,G.color*4+4):[G.color]}},borderColorId:function(j,G){return G.borderColor.length?{buffer:G.colorBuffer,stride:D.tooManyColors?8:4,offset:D.tooManyColors?4:2}:{constant:D.tooManyColors?I.slice(G.borderColor*4,G.borderColor*4+4):[G.borderColor]}},isActive:function(j,G){return G.activation===!0?{constant:[1]}:G.activation?G.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:x.prop("viewport")},viewport:x.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:x.prop("elements"),count:x.prop("count"),offset:x.prop("offset"),primitive:"points"},ee=f({},Y);ee.frag=d([`precision highp float; +`]);e.createShader=function(m){var h=a(m,n,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createPickShader=function(m){var h=a(m,n,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createContourShader=function(m){var h=a(m,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h},e.createPickContourShader=function(m){var h=a(m,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h}},9499:function(l,e,t){"use strict";l.exports=Y;var a=t(8828),r=t(2762),n=t(8116),o=t(7766),s=t(1888),c=t(6729),m=t(5298),h=t(9994),p=t(9618),g=t(3711),i=t(6760),w=t(7608),S=t(2478),M=t(6199),C=t(990),_=C.createShader,T=C.createContourShader,f=C.createPickShader,u=C.createPickContourShader,A=4*10,b=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[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(){for(var q=0;q<3;++q){var $=I[q],ee=(q+1)%3,ne=(q+2)%3;$[ee+0]=1,$[ne+3]=1,$[q+6]=1}})();function N(q,$,ee,ne,fe){this.position=q,this.index=$,this.uv=ee,this.level=ne,this.dataCoordinate=fe}var R=256;function B(q,$,ee,ne,fe,ye,xe,Ae,Me,Ie,Ue,qe,ke,ge,ue){this.gl=q,this.shape=$,this.bounds=ee,this.objectOffset=ue,this.intensityBounds=[],this._shader=ne,this._pickShader=fe,this._coordinateBuffer=ye,this._vao=xe,this._colorMap=Ae,this._contourShader=Me,this._contourPickShader=Ie,this._contourBuffer=Ue,this._contourVAO=qe,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new N([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ke,this._dynamicVAO=ge,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=[p(s.mallocFloat(1024),[0,0]),p(s.mallocFloat(1024),[0,0]),p(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 F=B.prototype;F.genColormap=function(q,$){var ee=!1,ne=h([c({colormap:q,nshades:R,format:"rgba"}).map(function(fe,ye){var xe=$?P(ye/255,$):fe[3];return xe<1&&(ee=!0),[fe[0],fe[1],fe[2],255*xe]})]);return m.divseq(ne,255),this.hasAlphaScale=ee,ne},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(q){this.pickId=q};function P(q,$){if(!$||!$.length)return 1;for(var ee=0;ee<$.length;++ee){if($.length<2)return 1;if($[ee][0]===q)return $[ee][1];if($[ee][0]>q&&ee>0){var ne=($[ee][0]-q)/($[ee][0]-$[ee-1][0]);return $[ee][1]*(1-ne)+ne*$[ee-1][1]}}return 1}var j=[0,0,0],U={showSurface:!1,showContour:!1,projections:[b.slice(),b.slice(),b.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function Z(q,$){var ee,ne,fe,ye=$.axes&&$.axes.lastCubeProps.axis||j,xe=$.showSurface,Ae=$.showContour;for(ee=0;ee<3;++ee)for(xe=xe||$.surfaceProject[ee],ne=0;ne<3;++ne)Ae=Ae||$.contourProject[ee][ne];for(ee=0;ee<3;++ee){var Me=U.projections[ee];for(ne=0;ne<16;++ne)Me[ne]=0;for(ne=0;ne<4;++ne)Me[5*ne]=1;Me[5*ee]=0,Me[12+ee]=$.axesBounds[+(ye[ee]>0)][ee],i(Me,q.model,Me);var Ie=U.clipBounds[ee];for(fe=0;fe<2;++fe)for(ne=0;ne<3;++ne)Ie[fe][ne]=q.clipBounds[fe][ne];Ie[0][ee]=-1e8,Ie[1][ee]=1e8}return U.showSurface=xe,U.showContour=Ae,U}var Q={model:b,view:b,projection:b,inverseModel:b.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},re=b.slice(),ae=[1,0,0,0,1,0,0,0,1];function oe(q,$){q=q||{};var ee=this.gl;ee.disable(ee.CULL_FACE),this._colorMap.bind(0);var ne=Q;ne.model=q.model||b,ne.view=q.view||b,ne.projection=q.projection||b,ne.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ne.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ne.objectOffset=this.objectOffset,ne.contourColor=this.contourColor[0],ne.inverseModel=w(ne.inverseModel,ne.model);for(var fe=0;fe<2;++fe)for(var ye=ne.clipBounds[fe],xe=0;xe<3;++xe)ye[xe]=Math.min(Math.max(this.clipBounds[fe][xe],-1e8),1e8);ne.kambient=this.ambientLight,ne.kdiffuse=this.diffuseLight,ne.kspecular=this.specularLight,ne.roughness=this.roughness,ne.fresnel=this.fresnel,ne.opacity=this.opacity,ne.height=0,ne.permutation=ae,ne.vertexColor=this.vertexColor;var Ae=re;for(i(Ae,ne.view,ne.model),i(Ae,ne.projection,Ae),w(Ae,Ae),fe=0;fe<3;++fe)ne.eyePosition[fe]=Ae[12+fe]/Ae[15];var Me=Ae[15];for(fe=0;fe<3;++fe)Me+=this.lightPosition[fe]*Ae[4*fe+3];for(fe=0;fe<3;++fe){var Ie=Ae[12+fe];for(xe=0;xe<3;++xe)Ie+=Ae[4*xe+fe]*this.lightPosition[xe];ne.lightPosition[fe]=Ie/Me}var Ue=Z(ne,this);if(Ue.showSurface){for(this._shader.bind(),this._shader.uniforms=ne,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ee.TRIANGLES,this._vertexCount),fe=0;fe<3;++fe)!this.surfaceProject[fe]||!this.vertexCount||(this._shader.uniforms.model=Ue.projections[fe],this._shader.uniforms.clipBounds=Ue.clipBounds[fe],this._vao.draw(ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ue.showContour){var qe=this._contourShader;ne.kambient=1,ne.kdiffuse=0,ne.kspecular=0,ne.opacity=1,qe.bind(),qe.uniforms=ne;var ke=this._contourVAO;for(ke.bind(),fe=0;fe<3;++fe)for(qe.uniforms.permutation=I[fe],ee.lineWidth(this.contourWidth[fe]*this.pixelRatio),xe=0;xe>4)/16)/255,fe=Math.floor(ne),ye=ne-fe,xe=$[1]*(q.value[1]+(q.value[2]&15)/16)/255,Ae=Math.floor(xe),Me=xe-Ae;fe+=1,Ae+=1;var Ie=ee.position;Ie[0]=Ie[1]=Ie[2]=0;for(var Ue=0;Ue<2;++Ue)for(var qe=Ue?ye:1-ye,ke=0;ke<2;++ke)for(var ge=ke?Me:1-Me,ue=fe+Ue,ve=Ae+ke,se=qe*ge,Te=0;Te<3;++Te)Ie[Te]+=this._field[Te].get(ue,ve)*se;for(var Fe=this._pickResult.level,We=0;We<3;++We)if(Fe[We]=S.le(this.contourLevels[We],Ie[We]),Fe[We]<0)this.contourLevels[We].length>0&&(Fe[We]=0);else if(Fe[We]Math.abs(gt-Ie[We])&&(Fe[We]+=1)}for(ee.index[0]=ye<.5?fe:fe+1,ee.index[1]=Me<.5?Ae:Ae+1,ee.uv[0]=ne/$[0],ee.uv[1]=xe/$[1],Te=0;Te<3;++Te)ee.dataCoordinate[Te]=this._field[Te].get(ee.index[0],ee.index[1]);return ee},F.padField=function(q,$){var ee=$.shape.slice(),ne=q.shape.slice();m.assign(q.lo(1,1).hi(ee[0],ee[1]),$),m.assign(q.lo(1).hi(ee[0],1),$.hi(ee[0],1)),m.assign(q.lo(1,ne[1]-1).hi(ee[0],1),$.lo(0,ee[1]-1).hi(ee[0],1)),m.assign(q.lo(0,1).hi(1,ee[1]),$.hi(1)),m.assign(q.lo(ne[0]-1,1).hi(1,ee[1]),$.lo(ee[0]-1)),q.set(0,0,$.get(0,0)),q.set(0,ne[1]-1,$.get(0,ee[1]-1)),q.set(ne[0]-1,0,$.get(ee[0]-1,0)),q.set(ne[0]-1,ne[1]-1,$.get(ee[0]-1,ee[1]-1))};function X(q,$){return Array.isArray(q)?[$(q[0]),$(q[1]),$(q[2])]:[$(q),$(q),$(q)]}function K(q){return Array.isArray(q)?q.length===3?[q[0],q[1],q[2],1]:[q[0],q[1],q[2],q[3]]:[0,0,0,1]}function G(q){if(Array.isArray(q)){if(Array.isArray(q))return[K(q[0]),K(q[1]),K(q[2])];var $=K(q);return[$.slice(),$.slice(),$.slice()]}}F.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=X(q.contourWidth,Number)),"showContour"in q&&(this.showContour=X(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=X(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=G(q.contourColor)),"contourProject"in q&&(this.contourProject=X(q.contourProject,function(ba){return X(ba,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=G(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=X(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=X(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var $=q.field||q.coords&&q.coords[2]||null,ee=!1;if($||(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 q||"coords"in q){var ne=($.shape[0]+2)*($.shape[1]+2);ne>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(a.nextPow2(ne))),this._field[2]=p(this._field[2].data,[$.shape[0]+2,$.shape[1]+2]),this.padField(this._field[2],$),this.shape=$.shape.slice();for(var fe=this.shape,ye=0;ye<2;++ye)this._field[2].size>this._field[ye].data.length&&(s.freeFloat(this._field[ye].data),this._field[ye].data=s.mallocFloat(this._field[2].size)),this._field[ye]=p(this._field[ye].data,[fe[0]+2,fe[1]+2]);if(q.coords){var xe=q.coords;if(!Array.isArray(xe)||xe.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(ye=0;ye<2;++ye){var Ae=xe[ye];for(ke=0;ke<2;++ke)if(Ae.shape[ke]!==fe[ke])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[ye],Ae)}}else if(q.ticks){var Me=q.ticks;if(!Array.isArray(Me)||Me.length!==2)throw new Error("gl-surface: invalid ticks");for(ye=0;ye<2;++ye){var Ie=Me[ye];if((Array.isArray(Ie)||Ie.length)&&(Ie=p(Ie)),Ie.shape[0]!==fe[ye])throw new Error("gl-surface: invalid tick length");var Ue=p(Ie.data,fe);Ue.stride[ye]=Ie.stride[0],Ue.stride[ye^1]=0,this.padField(this._field[ye],Ue)}}else{for(ye=0;ye<2;++ye){var qe=[0,0];qe[ye]=1,this._field[ye]=p(this._field[ye].data,[fe[0]+2,fe[1]+2],qe,0)}this._field[0].set(0,0,0);for(var ke=0;ke0){for(var Mi=0;Mi<5;++Mi)Ht.pop();Re-=1}continue e}}}$t.push(Re)}this._contourOffsets[Wt]=on,this._contourCounts[Wt]=$t}var ci=s.mallocFloat(Ht.length);for(ye=0;yeN||z<0||z>N)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[b,z],A.bind(),I.texImage2D(I.TEXTURE_2D,0,A.format,b,z,0,A.format,A.type,null),A._mipLevels=[0],A}function i(A,b,z,I,N,R){this.gl=A,this.handle=b,this.format=N,this.type=R,this._shape=[z,I],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var B=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return B._wrapS},set:function(j){return B.wrapS=j}},{get:function(){return B._wrapT},set:function(j){return B.wrapT=j}}]),this._wrapVector=F;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return B._shape[0]},set:function(j){return B.width=j}},{get:function(){return B._shape[1]},set:function(j){return B.height=j}}]),this._shapeVector=P}var w=i.prototype;Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var b=this.gl;if(this.type===b.FLOAT&&o.indexOf(A)>=0&&(b.getExtension("OES_texture_float_linear")||(A=b.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var b=this.gl;if(this.type===b.FLOAT&&o.indexOf(A)>=0&&(b.getExtension("OES_texture_float_linear")||(A=b.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var b=this._anisoSamples;if(this._anisoSamples=Math.max(A,1)|0,b!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var b=0;b<2;++b)if(c.indexOf(A[b])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(!Array.isArray(A))A=[A|0,A|0];else if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return g(this,A[0]|0,A[1]|0),[A[0]|0,A[1]|0]}},width:{get:function(){return this._shape[0]},set:function(A){return A=A|0,g(this,A,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A=A|0,g(this,this._shape[0],A),A}}}),w.bind=function(A){var b=this.gl;return A!==void 0&&b.activeTexture(b.TEXTURE0+(A|0)),b.bindTexture(b.TEXTURE_2D,this.handle),A!==void 0?A|0:b.getParameter(b.ACTIVE_TEXTURE)-b.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),b=0;A>0;++b,A>>>=1)this._mipLevels.indexOf(b)<0&&this._mipLevels.push(b)},w.setPixels=function(A,b,z,I){var N=this.gl;this.bind(),Array.isArray(b)?(I=z,z=b[1]|0,b=b[0]|0):(b=b||0,z=z||0),I=I||0;var R=h(A)?A:A.raw;if(R){var B=this._mipLevels.indexOf(I)<0;B?(N.texImage2D(N.TEXTURE_2D,0,this.format,this.format,this.type,R),this._mipLevels.push(I)):N.texSubImage2D(N.TEXTURE_2D,I,b,z,this.format,this.type,R)}else if(A.shape&&A.stride&&A.data){if(A.shape.length<2||b+A.shape[1]>this._shape[1]>>>I||z+A.shape[0]>this._shape[0]>>>I||b<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(N,b,z,I,this.format,this.type,this._mipLevels,A)}else throw new Error("gl-texture2d: Unsupported data type")};function S(A,b){return A.length===3?b[2]===1&&b[1]===A[0]*A[2]&&b[0]===A[2]:b[0]===1&&b[1]===A[0]}function M(A,b,z,I,N,R,B,F){var P=F.dtype,j=F.shape.slice();if(j.length<2||j.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var U=0,Z=0,Q=S(j,F.stride.slice());P==="float32"?U=A.FLOAT:P==="float64"?(U=A.FLOAT,Q=!1,P="float32"):P==="uint8"?U=A.UNSIGNED_BYTE:(U=A.UNSIGNED_BYTE,Q=!1,P="uint8");var re=1;if(j.length===2)Z=A.LUMINANCE,j=[j[0],j[1],1],F=a(F.data,j,[F.stride[0],F.stride[1],1],F.offset);else if(j.length===3){if(j[2]===1)Z=A.ALPHA;else if(j[2]===2)Z=A.LUMINANCE_ALPHA;else if(j[2]===3)Z=A.RGB;else if(j[2]===4)Z=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");re=j[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((Z===A.LUMINANCE||Z===A.ALPHA)&&(N===A.LUMINANCE||N===A.ALPHA)&&(Z=N),Z!==N)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ae=F.size,oe=B.indexOf(I)<0;if(oe&&B.push(I),U===R&&Q)F.offset===0&&F.data.length===ae?oe?A.texImage2D(A.TEXTURE_2D,I,N,j[0],j[1],0,N,R,F.data):A.texSubImage2D(A.TEXTURE_2D,I,b,z,j[0],j[1],N,R,F.data):oe?A.texImage2D(A.TEXTURE_2D,I,N,j[0],j[1],0,N,R,F.data.subarray(F.offset,F.offset+ae)):A.texSubImage2D(A.TEXTURE_2D,I,b,z,j[0],j[1],N,R,F.data.subarray(F.offset,F.offset+ae));else{var H;R===A.FLOAT?H=n.mallocFloat32(ae):H=n.mallocUint8(ae);var X=a(H,j,[j[2],j[2]*j[0],1]);U===A.FLOAT&&R===A.UNSIGNED_BYTE?p(X,F):r.assign(X,F),oe?A.texImage2D(A.TEXTURE_2D,I,N,j[0],j[1],0,N,R,H.subarray(0,ae)):A.texSubImage2D(A.TEXTURE_2D,I,b,z,j[0],j[1],N,R,H.subarray(0,ae)),R===A.FLOAT?n.freeFloat32(H):n.freeUint8(H)}}function C(A){var b=A.createTexture();return A.bindTexture(A.TEXTURE_2D,b),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),b}function _(A,b,z,I,N){var R=A.getParameter(A.MAX_TEXTURE_SIZE);if(b<0||b>R||z<0||z>R)throw new Error("gl-texture2d: Invalid texture shape");if(N===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,I,b,z,0,I,N,null),new i(A,B,b,z,I,N)}function T(A,b,z,I,N,R){var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,N,N,R,b),new i(A,B,z,I,N,R)}function f(A,b){var z=b.dtype,I=b.shape.slice(),N=A.getParameter(A.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>N||I[1]<0||I[1]>N)throw new Error("gl-texture2d: Invalid texture size");var R=S(I,b.stride.slice()),B=0;z==="float32"?B=A.FLOAT:z==="float64"?(B=A.FLOAT,R=!1,z="float32"):z==="uint8"?B=A.UNSIGNED_BYTE:(B=A.UNSIGNED_BYTE,R=!1,z="uint8");var F=0;if(I.length===2)F=A.LUMINANCE,I=[I[0],I[1],1],b=a(b.data,I,[b.stride[0],b.stride[1],1],b.offset);else if(I.length===3)if(I[2]===1)F=A.ALPHA;else if(I[2]===2)F=A.LUMINANCE_ALPHA;else if(I[2]===3)F=A.RGB;else if(I[2]===4)F=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");B===A.FLOAT&&!A.getExtension("OES_texture_float")&&(B=A.UNSIGNED_BYTE,R=!1);var P,j,U=b.size;if(R)b.offset===0&&b.data.length===U?P=b.data:P=b.data.subarray(b.offset,b.offset+U);else{var Z=[I[2],I[2]*I[0],1];j=n.malloc(U,z);var Q=a(j,I,Z,0);(z==="float32"||z==="float64")&&B===A.UNSIGNED_BYTE?p(Q,b):r.assign(Q,b),P=j.subarray(0,U)}var re=C(A);return A.texImage2D(A.TEXTURE_2D,0,F,I[0],I[1],0,F,B,P),R||n.free(j),new i(A,re,I[0],I[1],F,B)}function u(A){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||m(A),typeof arguments[1]=="number")return _(A,arguments[1],arguments[2],arguments[3]||A.RGBA,arguments[4]||A.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(A,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var b=arguments[1],z=h(b)?b:b.raw;if(z)return T(A,z,b.width|0,b.height|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(b.shape&&b.data&&b.stride)return f(A,b)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(l){"use strict";function e(t,a,r){a?a.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o1?0:Math.acos(p)}},9226:function(l){l.exports=e;function e(t,a){return t[0]=Math.ceil(a[0]),t[1]=Math.ceil(a[1]),t[2]=Math.ceil(a[2]),t}},3126:function(l){l.exports=e;function e(t){var a=new Float32Array(3);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a}},3990:function(l){l.exports=e;function e(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t}},1091:function(l){l.exports=e;function e(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2],c=r[0],m=r[1],h=r[2];return t[0]=o*h-s*m,t[1]=s*c-n*h,t[2]=n*m-o*c,t}},5455:function(l,e,t){l.exports=t(7056)},7056:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],o=a[2]-t[2];return Math.sqrt(r*r+n*n+o*o)}},4008:function(l,e,t){l.exports=t(6690)},6690:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]/r[0],t[1]=a[1]/r[1],t[2]=a[2]/r[2],t}},244:function(l){l.exports=e;function e(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]}},2613:function(l){l.exports=1e-6},9922:function(l,e,t){l.exports=r;var a=t(2613);function r(n,o){var s=n[0],c=n[1],m=n[2],h=o[0],p=o[1],g=o[2];return Math.abs(s-h)<=a*Math.max(1,Math.abs(s),Math.abs(h))&&Math.abs(c-p)<=a*Math.max(1,Math.abs(c),Math.abs(p))&&Math.abs(m-g)<=a*Math.max(1,Math.abs(m),Math.abs(g))}},9265:function(l){l.exports=e;function e(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]}},2681:function(l){l.exports=e;function e(t,a){return t[0]=Math.floor(a[0]),t[1]=Math.floor(a[1]),t[2]=Math.floor(a[2]),t}},5137:function(l,e,t){l.exports=r;var a=t(1091)();function r(n,o,s,c,m,h){var p,g;for(o||(o=3),s||(s=0),c?g=Math.min(c*o+s,n.length):g=n.length,p=s;p0&&(s=1/Math.sqrt(s),t[0]=a[0]*s,t[1]=a[1]*s,t[2]=a[2]*s),t}},7636:function(l){l.exports=e;function e(t,a){a=a||1;var r=Math.random()*2*Math.PI,n=Math.random()*2-1,o=Math.sqrt(1-n*n)*a;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=n*a,t}},6894:function(l){l.exports=e;function e(t,a,r,n){var o=r[1],s=r[2],c=a[1]-o,m=a[2]-s,h=Math.sin(n),p=Math.cos(n);return t[0]=a[0],t[1]=o+c*p-m*h,t[2]=s+c*h+m*p,t}},109:function(l){l.exports=e;function e(t,a,r,n){var o=r[0],s=r[2],c=a[0]-o,m=a[2]-s,h=Math.sin(n),p=Math.cos(n);return t[0]=o+m*h+c*p,t[1]=a[1],t[2]=s+m*p-c*h,t}},8692:function(l){l.exports=e;function e(t,a,r,n){var o=r[0],s=r[1],c=a[0]-o,m=a[1]-s,h=Math.sin(n),p=Math.cos(n);return t[0]=o+c*p-m*h,t[1]=s+c*h+m*p,t[2]=a[2],t}},2447:function(l){l.exports=e;function e(t,a){return t[0]=Math.round(a[0]),t[1]=Math.round(a[1]),t[2]=Math.round(a[2]),t}},6621:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t}},8489:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a[0]+r[0]*n,t[1]=a[1]+r[1]*n,t[2]=a[2]+r[2]*n,t}},1463:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a,t[1]=r,t[2]=n,t}},6141:function(l,e,t){l.exports=t(2953)},5486:function(l,e,t){l.exports=t(3066)},2953:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],o=a[2]-t[2];return r*r+n*n+o*o}},3066:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2];return a*a+r*r+n*n}},2229:function(l,e,t){l.exports=t(6843)},6843:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]-r[0],t[1]=a[1]-r[1],t[2]=a[2]-r[2],t}},492:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2];return t[0]=n*r[0]+o*r[3]+s*r[6],t[1]=n*r[1]+o*r[4]+s*r[7],t[2]=n*r[2]+o*r[5]+s*r[8],t}},5673:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2],c=r[3]*n+r[7]*o+r[11]*s+r[15];return c=c||1,t[0]=(r[0]*n+r[4]*o+r[8]*s+r[12])/c,t[1]=(r[1]*n+r[5]*o+r[9]*s+r[13])/c,t[2]=(r[2]*n+r[6]*o+r[10]*s+r[14])/c,t}},264:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2],c=r[0],m=r[1],h=r[2],p=r[3],g=p*n+m*s-h*o,i=p*o+h*n-c*s,w=p*s+c*o-m*n,S=-c*n-m*o-h*s;return t[0]=g*p+S*-c+i*-h-w*-m,t[1]=i*p+S*-m+w*-c-g*-h,t[2]=w*p+S*-h+g*-m-i*-c,t}},4361:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t[3]=a[3]+r[3],t}},2335:function(l){l.exports=e;function e(t){var a=new Float32Array(4);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3],a}},2933:function(l){l.exports=e;function e(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t}},7536:function(l){l.exports=e;function e(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],o=a[2]-t[2],s=a[3]-t[3];return Math.sqrt(r*r+n*n+o*o+s*s)}},1373:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]/r[0],t[1]=a[1]/r[1],t[2]=a[2]/r[2],t[3]=a[3]/r[3],t}},3750:function(l){l.exports=e;function e(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]+t[3]*a[3]}},3390:function(l){l.exports=e;function e(t,a,r,n){var o=new Float32Array(4);return o[0]=t,o[1]=a,o[2]=r,o[3]=n,o}},9970:function(l,e,t){l.exports={create:t(7536),clone:t(2335),fromValues:t(3390),copy:t(2933),set:t(4578),add:t(4361),subtract:t(6860),multiply:t(3576),divide:t(1373),min:t(2334),max:t(160),scale:t(9288),scaleAndAdd:t(4844),distance:t(4691),squaredDistance:t(7960),length:t(6808),squaredLength:t(483),negate:t(1498),inverse:t(4494),normalize:t(5177),dot:t(3750),lerp:t(2573),random:t(9131),transformMat4:t(5352),transformQuat:t(4041)}},4494:function(l){l.exports=e;function e(t,a){return t[0]=1/a[0],t[1]=1/a[1],t[2]=1/a[2],t[3]=1/a[3],t}},6808:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2],o=t[3];return Math.sqrt(a*a+r*r+n*n+o*o)}},2573:function(l){l.exports=e;function e(t,a,r,n){var o=a[0],s=a[1],c=a[2],m=a[3];return t[0]=o+n*(r[0]-o),t[1]=s+n*(r[1]-s),t[2]=c+n*(r[2]-c),t[3]=m+n*(r[3]-m),t}},160:function(l){l.exports=e;function e(t,a,r){return t[0]=Math.max(a[0],r[0]),t[1]=Math.max(a[1],r[1]),t[2]=Math.max(a[2],r[2]),t[3]=Math.max(a[3],r[3]),t}},2334:function(l){l.exports=e;function e(t,a,r){return t[0]=Math.min(a[0],r[0]),t[1]=Math.min(a[1],r[1]),t[2]=Math.min(a[2],r[2]),t[3]=Math.min(a[3],r[3]),t}},3576:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r[0],t[1]=a[1]*r[1],t[2]=a[2]*r[2],t[3]=a[3]*r[3],t}},1498:function(l){l.exports=e;function e(t,a){return t[0]=-a[0],t[1]=-a[1],t[2]=-a[2],t[3]=-a[3],t}},5177:function(l){l.exports=e;function e(t,a){var r=a[0],n=a[1],o=a[2],s=a[3],c=r*r+n*n+o*o+s*s;return c>0&&(c=1/Math.sqrt(c),t[0]=r*c,t[1]=n*c,t[2]=o*c,t[3]=s*c),t}},9131:function(l,e,t){var a=t(5177),r=t(9288);l.exports=n;function n(o,s){return s=s||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),a(o,o),r(o,o,s),o}},9288:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t[3]=a[3]*r,t}},4844:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a[0]+r[0]*n,t[1]=a[1]+r[1]*n,t[2]=a[2]+r[2]*n,t[3]=a[3]+r[3]*n,t}},4578:function(l){l.exports=e;function e(t,a,r,n,o){return t[0]=a,t[1]=r,t[2]=n,t[3]=o,t}},7960:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],o=a[2]-t[2],s=a[3]-t[3];return r*r+n*n+o*o+s*s}},483:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2],o=t[3];return a*a+r*r+n*n+o*o}},6860:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]-r[0],t[1]=a[1]-r[1],t[2]=a[2]-r[2],t[3]=a[3]-r[3],t}},5352:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2],c=a[3];return t[0]=r[0]*n+r[4]*o+r[8]*s+r[12]*c,t[1]=r[1]*n+r[5]*o+r[9]*s+r[13]*c,t[2]=r[2]*n+r[6]*o+r[10]*s+r[14]*c,t[3]=r[3]*n+r[7]*o+r[11]*s+r[15]*c,t}},4041:function(l){l.exports=e;function e(t,a,r){var n=a[0],o=a[1],s=a[2],c=r[0],m=r[1],h=r[2],p=r[3],g=p*n+m*s-h*o,i=p*o+h*n-c*s,w=p*s+c*o-m*n,S=-c*n-m*o-h*s;return t[0]=g*p+S*-c+i*-h-w*-m,t[1]=i*p+S*-m+w*-c-g*-h,t[2]=w*p+S*-h+g*-m-i*-c,t[3]=a[3],t}},1848:function(l,e,t){var a=t(4905),r=t(6468);l.exports=n;function n(o){for(var s=Array.isArray(o)?o:a(o),c=0;c0)continue;We=se.slice(0,1).join("")}return ee(We),ae+=We.length,P=P.slice(We.length),P.length}while(!0)}function ke(){return/[^a-fA-F0-9]/.test(B)?(ee(P.join("")),R=c,I):(P.push(B),F=B,I+1)}function ge(){return B==="."||/[eE]/.test(B)?(P.push(B),R=S,F=B,I+1):B==="x"&&P.length===1&&P[0]==="0"?(R=u,P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),R=c,I):(P.push(B),F=B,I+1)}function ue(){return B==="f"&&(P.push(B),F=B,I+=1),/[eE]/.test(B)||(B==="-"||B==="+")&&/[eE]/.test(F)?(P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),R=c,I):(P.push(B),F=B,I+1)}function ve(){if(/[^\d\w_]/.test(B)){var se=P.join("");return $[se]?R=_:q[se]?R=C:R=M,ee(P.join("")),R=c,I}return P.push(B),F=B,I+1}}},3508:function(l,e,t){var a=t(6852);a=a.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.exports=a.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"])},6852:function(l){l.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"]},7932:function(l,e,t){var a=t(620);l.exports=a.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","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"])},620:function(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","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"]},7827:function(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(l,e,t){var a=t(5874);l.exports=r;function r(n,o){var s=a(o),c=[];return c=c.concat(s(n)),c=c.concat(s(null)),c}},3236:function(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),a=[],r=0;r>1,g=-7,i=r?o-1:0,w=r?-1:1,S=t[a+i];for(i+=w,s=S&(1<<-g)-1,S>>=-g,g+=m;g>0;s=s*256+t[a+i],i+=w,g-=8);for(c=s&(1<<-g)-1,s>>=-g,g+=n;g>0;c=c*256+t[a+i],i+=w,g-=8);if(s===0)s=1-p;else{if(s===h)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,n),s=s-p}return(S?-1:1)*c*Math.pow(2,s-n)},e.write=function(t,a,r,n,o,s){var c,m,h,p=s*8-o-1,g=(1<>1,w=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=n?0:s-1,M=n?1:-1,C=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(m=isNaN(a)?1:0,c=g):(c=Math.floor(Math.log(a)/Math.LN2),a*(h=Math.pow(2,-c))<1&&(c--,h*=2),c+i>=1?a+=w/h:a+=w*Math.pow(2,1-i),a*h>=2&&(c++,h/=2),c+i>=g?(m=0,c=g):c+i>=1?(m=(a*h-1)*Math.pow(2,o),c=c+i):(m=a*Math.pow(2,i-1)*Math.pow(2,o),c=0));o>=8;t[r+S]=m&255,S+=M,m/=256,o-=8);for(c=c<0;t[r+S]=c&255,S+=M,c/=256,p-=8);t[r+S-M]|=C*128}},8954:function(l,e,t){"use strict";l.exports=i;var a=t(3250),r=t(6803).Fw;function n(w,S,M){this.vertices=w,this.adjacent=S,this.boundary=M,this.lastVisited=-1}n.prototype.flip=function(){var w=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=w;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function o(w,S,M){this.vertices=w,this.cell=S,this.index=M}function s(w,S){return r(w.vertices,S.vertices)}function c(w){return function(){var S=this.tuple;return w.apply(this,S)}}function m(w){var S=a[w+1];return S||(S=a),c(S)}var h=[];function p(w,S,M){this.dimension=w,this.vertices=S,this.simplices=M,this.interior=M.filter(function(T){return!T.boundary}),this.tuple=new Array(w+1);for(var C=0;C<=w;++C)this.tuple[C]=this.vertices[C];var _=h[w];_||(_=h[w]=m(w)),this.orient=_}var g=p.prototype;g.handleBoundaryDegeneracy=function(w,S){var M=this.dimension,C=this.vertices.length-1,_=this.tuple,T=this.vertices,f=[w];for(w.lastVisited=-C;f.length>0;){w=f.pop();for(var u=w.adjacent,A=0;A<=M;++A){var b=u[A];if(!(!b.boundary||b.lastVisited<=-C)){for(var z=b.vertices,I=0;I<=M;++I){var N=z[I];N<0?_[I]=S:_[I]=T[N]}var R=this.orient();if(R>0)return b;b.lastVisited=-C,R===0&&f.push(b)}}}return null},g.walk=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=S?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[f];e:for(;!u.boundary;){for(var A=u.vertices,b=u.adjacent,z=0;z<=C;++z)T[z]=_[A[z]];u.lastVisited=M;for(var z=0;z<=C;++z){var I=b[z];if(!(I.lastVisited>=M)){var N=T[z];T[z]=w;var R=this.orient();if(T[z]=N,R<0){u=I;continue e}else I.boundary?I.lastVisited=-M:I.lastVisited=M}}return}return u},g.addPeaks=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=this.interior,u=this.simplices,A=[S];S.lastVisited=M,S.vertices[S.vertices.indexOf(-1)]=M,S.boundary=!1,f.push(S);for(var b=[];A.length>0;){var S=A.pop(),z=S.vertices,I=S.adjacent,N=z.indexOf(M);if(!(N<0)){for(var R=0;R<=C;++R)if(R!==N){var B=I[R];if(!(!B.boundary||B.lastVisited>=M)){var F=B.vertices;if(B.lastVisited!==-M){for(var P=0,j=0;j<=C;++j)F[j]<0?(P=j,T[j]=w):T[j]=_[F[j]];var U=this.orient();if(U>0){F[P]=M,B.boundary=!1,f.push(B),A.push(B),B.lastVisited=M;continue}else B.lastVisited=-M}var Z=B.adjacent,Q=z.slice(),re=I.slice(),ae=new n(Q,re,!0);u.push(ae);var oe=Z.indexOf(S);if(!(oe<0)){Z[oe]=ae,re[N]=B,Q[R]=-1,re[R]=S,I[R]=ae,ae.flip();for(var j=0;j<=C;++j){var H=Q[j];if(!(H<0||H===M)){for(var X=new Array(C-1),K=0,G=0;G<=C;++G){var Y=Q[G];Y<0||G===j||(X[K++]=Y)}b.push(new o(X,ae,j))}}}}}}}b.sort(s);for(var R=0;R+1=0?f[A++]=u[z]:b=z&1;if(b===(w&1)){var I=f[0];f[0]=f[1],f[1]=I}S.push(f)}}return S};function i(w,S){var M=w.length;if(M===0)throw new Error("Must have at least d+1 points");var C=w[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var _=w.slice(0,C+1),T=a.apply(void 0,_);if(T===0)throw new Error("Input not in general position");for(var f=new Array(C+1),u=0;u<=C;++u)f[u]=u;T<0&&(f[0]=1,f[1]=0);for(var A=new n(f,new Array(C+1),!1),b=A.adjacent,z=new Array(C+2),u=0;u<=C;++u){for(var I=f.slice(),N=0;N<=C;++N)N===u&&(I[N]=-1);var R=I[0];I[0]=I[1],I[1]=R;var B=new n(I,new Array(C+1),!0);b[u]=B,z[u]=B}z[C+1]=A;for(var u=0;u<=C;++u)for(var I=b[u].vertices,F=b[u].adjacent,N=0;N<=C;++N){var P=I[N];if(P<0){F[N]=A;continue}for(var j=0;j<=C;++j)b[j].vertices.indexOf(P)<0&&(F[N]=b[j])}for(var U=new p(C,_,z),Z=!!S,u=C+1;u3*(z+1)?p(this,b):this.left.insert(b):this.left=T([b]);else if(b[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?p(this,b):this.right.insert(b):this.right=T([b]);else{var I=a.ge(this.leftPoints,b,C),N=a.ge(this.rightPoints,b,_);this.leftPoints.splice(I,0,b),this.rightPoints.splice(N,0,b)}},c.remove=function(b){var z=this.count-this.leftPoints;if(b[1]3*(z-1))return g(this,b);var N=this.left.remove(b);return N===o?(this.left=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else if(b[0]>this.mid){if(!this.right)return r;var R=this.left?this.left.count:0;if(4*R>3*(z-1))return g(this,b);var N=this.right.remove(b);return N===o?(this.right=null,this.count-=1,n):(N===n&&(this.count-=1),N)}else{if(this.count===1)return this.leftPoints[0]===b?o:r;if(this.leftPoints.length===1&&this.leftPoints[0]===b){if(this.left&&this.right){for(var B=this,F=this.left;F.right;)B=F,F=F.right;if(B===this)F.right=this.right;else{var P=this.left,N=this.right;B.count-=F.count,B.right=F.left,F.left=P,F.right=N}m(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return n}for(var P=a.ge(this.leftPoints,b,C);P=0&&b[N][1]>=z;--N){var R=I(b[N]);if(R)return R}}function S(b,z){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(b,z);if(I)return I}return w(this.rightPoints,b,z)}else return S(this.leftPoints,z)},c.queryInterval=function(b,z,I){if(bthis.mid&&this.right){var N=this.right.queryInterval(b,z,I);if(N)return N}return zthis.mid?w(this.rightPoints,b,I):S(this.leftPoints,I)};function M(b,z){return b-z}function C(b,z){var I=b[0]-z[0];return I||b[1]-z[1]}function _(b,z){var I=b[1]-z[1];return I||b[0]-z[0]}function T(b){if(b.length===0)return null;for(var z=[],I=0;I>1],R=[],B=[],F=[],I=0;I13)&&a!==32&&a!==133&&a!==160&&a!==5760&&a!==6158&&(a<8192||a>8205)&&a!==8232&&a!==8233&&a!==8239&&a!==8287&&a!==8288&&a!==12288&&a!==65279)return!1;return!0}},395:function(l){function e(t,a,r){return t*(1-r)+a*r}l.exports=e},2652:function(l,e,t){var a=t(4335),r=t(6864),n=t(1903),o=t(9921),s=t(7608),c=t(5665),m={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},h=r(),p=r(),g=[0,0,0,0],i=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];l.exports=function(T,f,u,A,b,z){if(f||(f=[0,0,0]),u||(u=[0,0,0]),A||(A=[0,0,0]),b||(b=[0,0,0,1]),z||(z=[0,0,0,1]),!a(h,T)||(n(p,h),p[3]=0,p[7]=0,p[11]=0,p[15]=1,Math.abs(o(p)<1e-8)))return!1;var I=h[3],N=h[7],R=h[11],B=h[12],F=h[13],P=h[14],j=h[15];if(I!==0||N!==0||R!==0){g[0]=I,g[1]=N,g[2]=R,g[3]=j;var U=s(p,p);if(!U)return!1;c(p,p),S(b,g,p)}else b[0]=b[1]=b[2]=0,b[3]=1;if(f[0]=B,f[1]=F,f[2]=P,M(i,h),u[0]=m.length(i[0]),m.normalize(i[0],i[0]),A[0]=m.dot(i[0],i[1]),C(i[1],i[1],i[0],1,-A[0]),u[1]=m.length(i[1]),m.normalize(i[1],i[1]),A[0]/=u[1],A[1]=m.dot(i[0],i[2]),C(i[2],i[2],i[0],1,-A[1]),A[2]=m.dot(i[1],i[2]),C(i[2],i[2],i[1],1,-A[2]),u[2]=m.length(i[2]),m.normalize(i[2],i[2]),A[1]/=u[2],A[2]/=u[2],m.cross(w,i[1],i[2]),m.dot(i[0],w)<0)for(var Z=0;Z<3;Z++)u[Z]*=-1,i[Z][0]*=-1,i[Z][1]*=-1,i[Z][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+i[0][0]-i[1][1]-i[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-i[0][0]+i[1][1]-i[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-i[0][0]-i[1][1]+i[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+i[0][0]+i[1][1]+i[2][2],0)),i[2][1]>i[1][2]&&(z[0]=-z[0]),i[0][2]>i[2][0]&&(z[1]=-z[1]),i[1][0]>i[0][1]&&(z[2]=-z[2]),!0};function S(_,T,f){var u=T[0],A=T[1],b=T[2],z=T[3];return _[0]=f[0]*u+f[4]*A+f[8]*b+f[12]*z,_[1]=f[1]*u+f[5]*A+f[9]*b+f[13]*z,_[2]=f[2]*u+f[6]*A+f[10]*b+f[14]*z,_[3]=f[3]*u+f[7]*A+f[11]*b+f[15]*z,_}function M(_,T){_[0][0]=T[0],_[0][1]=T[1],_[0][2]=T[2],_[1][0]=T[4],_[1][1]=T[5],_[1][2]=T[6],_[2][0]=T[8],_[2][1]=T[9],_[2][2]=T[10]}function C(_,T,f,u,A){_[0]=T[0]*u+f[0]*A,_[1]=T[1]*u+f[1]*A,_[2]=T[2]*u+f[2]*A}},4335:function(l){l.exports=function(t,a){var r=a[15];if(r===0)return!1;for(var n=1/r,o=0;o<16;o++)t[o]=a[o]*n;return!0}},7442:function(l,e,t){var a=t(6658),r=t(7182),n=t(2652),o=t(9921),s=t(8648),c=g(),m=g(),h=g();l.exports=p;function p(S,M,C,_){if(o(M)===0||o(C)===0)return!1;var T=n(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion),f=n(C,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!T||!f?!1:(a(h.translate,c.translate,m.translate,_),a(h.skew,c.skew,m.skew,_),a(h.scale,c.scale,m.scale,_),a(h.perspective,c.perspective,m.perspective,_),s(h.quaternion,c.quaternion,m.quaternion,_),r(S,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function g(){return{translate:i(),scale:i(1),skew:i(),perspective:w(),quaternion:w()}}function i(S){return[S||0,S||0,S||0]}function w(){return[0,0,0,1]}},7182:function(l,e,t){var a={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=a.create(),n=a.create();l.exports=function(s,c,m,h,p,g){return a.identity(s),a.fromRotationTranslation(s,g,c),s[3]=p[0],s[7]=p[1],s[11]=p[2],s[15]=p[3],a.identity(n),h[2]!==0&&(n[9]=h[2],a.multiply(s,s,n)),h[1]!==0&&(n[9]=0,n[8]=h[1],a.multiply(s,s,n)),h[0]!==0&&(n[8]=0,n[4]=h[0],a.multiply(s,s,n)),a.scale(s,s,m),s}},1811:function(l,e,t){"use strict";var a=t(2478),r=t(7442),n=t(7608),o=t(5567),s=t(2408),c=t(7089),m=t(6582),h=t(7656),p=t(2504),g=t(3536),i=[0,0,0];l.exports=C;function w(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.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]}var S=w.prototype;S.recalcMatrix=function(_){var T=this._time,f=a.le(T,_),u=this.computedMatrix;if(!(f<0)){var A=this._components;if(f===T.length-1)for(var b=16*f,z=0;z<16;++z)u[z]=A[b++];else{for(var I=T[f+1]-T[f],b=16*f,N=this.prevMatrix,R=!0,z=0;z<16;++z)N[z]=A[b++];for(var B=this.nextMatrix,z=0;z<16;++z)B[z]=A[b++],R=R&&N[z]===B[z];if(I<1e-6||R)for(var z=0;z<16;++z)u[z]=N[z];else r(u,N,B,(_-T[f])/I)}var F=this.computedUp;F[0]=u[1],F[1]=u[5],F[2]=u[9],g(F,F);var P=this.computedInverse;n(P,u);var j=this.computedEye,U=P[15];j[0]=P[12]/U,j[1]=P[13]/U,j[2]=P[14]/U;for(var Z=this.computedCenter,Q=Math.exp(this.computedRadius[0]),z=0;z<3;++z)Z[z]=j[z]-u[2+4*z]*Q}},S.idle=function(_){if(!(_1&&a(n[m[i-2]],n[m[i-1]],g)<=0;)i-=1,m.pop();for(m.push(p),i=h.length;i>1&&a(n[h[i-2]],n[h[i-1]],g)>=0;)i-=1,h.pop();h.push(p)}for(var w=new Array(h.length+m.length-2),S=0,s=0,M=m.length;s0;--C)w[S++]=h[C];return w}},351:function(l,e,t){"use strict";l.exports=r;var a=t(4687);function r(n,o){o||(o=n,n=window);var s=0,c=0,m=0,h={shift:!1,alt:!1,control:!1,meta:!1},p=!1;function g(b){var z=!1;return"altKey"in b&&(z=z||b.altKey!==h.alt,h.alt=!!b.altKey),"shiftKey"in b&&(z=z||b.shiftKey!==h.shift,h.shift=!!b.shiftKey),"ctrlKey"in b&&(z=z||b.ctrlKey!==h.control,h.control=!!b.ctrlKey),"metaKey"in b&&(z=z||b.metaKey!==h.meta,h.meta=!!b.metaKey),z}function i(b,z){var I=a.x(z),N=a.y(z);"buttons"in z&&(b=z.buttons|0),(b!==s||I!==c||N!==m||g(z))&&(s=b|0,c=I||0,m=N||0,o&&o(s,c,m,h))}function w(b){i(0,b)}function S(){(s||c||m||h.shift||h.alt||h.meta||h.control)&&(c=m=0,s=0,h.shift=h.alt=h.control=h.meta=!1,o&&o(0,0,0,h))}function M(b){g(b)&&o&&o(s,c,m,h)}function C(b){a.buttons(b)===0?i(0,b):i(s,b)}function _(b){i(s|a.buttons(b),b)}function T(b){i(s&~a.buttons(b),b)}function f(){p||(p=!0,n.addEventListener("mousemove",C),n.addEventListener("mousedown",_),n.addEventListener("mouseup",T),n.addEventListener("mouseleave",w),n.addEventListener("mouseenter",w),n.addEventListener("mouseout",w),n.addEventListener("mouseover",w),n.addEventListener("blur",S),n.addEventListener("keyup",M),n.addEventListener("keydown",M),n.addEventListener("keypress",M),n!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function u(){p&&(p=!1,n.removeEventListener("mousemove",C),n.removeEventListener("mousedown",_),n.removeEventListener("mouseup",T),n.removeEventListener("mouseleave",w),n.removeEventListener("mouseenter",w),n.removeEventListener("mouseout",w),n.removeEventListener("mouseover",w),n.removeEventListener("blur",S),n.removeEventListener("keyup",M),n.removeEventListener("keydown",M),n.removeEventListener("keypress",M),n!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}f();var A={element:n};return Object.defineProperties(A,{enabled:{get:function(){return p},set:function(b){b?f():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),A}},24:function(l){var e={left:0,top:0};l.exports=t;function t(r,n,o){n=n||r.currentTarget||r.srcElement,Array.isArray(o)||(o=[0,0]);var s=r.clientX||0,c=r.clientY||0,m=a(n);return o[0]=s-m.left,o[1]=c-m.top,o}function a(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687:function(l,e){"use strict";function t(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var s=o.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(re=1,H[K++]=h(f[z],S,M,C),z+=U,_>0)for(Q=1,I=f[z],G=H[K]=h(I,S,M,C),$=H[K+Y],fe=H[K+ee],Ae=H[K+ye],(G!==$||G!==fe||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,$,fe,Ae,S,M,C),Me=X[K]=ae++),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],G=H[K]=h(I,S,M,C),$=H[K+Y],fe=H[K+ee],Ae=H[K+ye],(G!==$||G!==fe||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,$,fe,Ae,S,M,C),Me=X[K]=ae++,Ae!==$&&m(X[K+Y],Me,j,R,Ae,$,S,M,C)),K+=1,z+=U;for(z+=Z,K=0,Ie=Y,Y=q,q=Ie,Ie=ee,ee=ne,ne=Ie,Ie=ye,ye=xe,xe=Ie,re=2;re0)for(Q=1,I=f[z],G=H[K]=h(I,S,M,C),$=H[K+Y],fe=H[K+ee],Ae=H[K+ye],(G!==$||G!==fe||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,$,fe,Ae,S,M,C),Me=X[K]=ae++,Ae!==fe&&m(X[K+ee],Me,F,j,fe,Ae,S,M,C)),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],G=H[K]=h(I,S,M,C),$=H[K+Y],fe=H[K+ee],Ae=H[K+ye],(G!==$||G!==fe||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,$,fe,Ae,S,M,C),Me=X[K]=ae++,Ae!==fe&&m(X[K+ee],Me,F,j,fe,Ae,S,M,C),Ae!==$&&m(X[K+Y],Me,j,R,Ae,$,S,M,C)),K+=1,z+=U;re&1&&(K=0),Ie=Y,Y=q,q=Ie,Ie=ee,ee=ne,ne=Ie,Ie=ye,ye=xe,xe=Ie,z+=Z}}g(X),g(H)}},"false,1,0":function(c,m,h,p,g){return function(w,S,M,C){var _=w.shape[0]|0,T=w.shape[1]|0,f=w.data,u=w.offset|0,A=w.stride[0]|0,b=w.stride[1]|0,z=u,I,N=-A|0,R=0,B=-b|0,F=0,P=-A-b|0,j=0,U=b|0,Z=A-b*T|0,Q=0,re=0,ae=0,oe=2*T|0,H=p(oe),X=p(oe),K=0,G=0,Y=-1,q=-1,$=0,ee=-T|0,ne=T|0,fe=0,ye=-T-1|0,xe=T-1|0,Ae=0,Me=0,Ie=0;for(re=0;re0){if(Q=1,H[K++]=h(f[z],S,M,C),z+=U,T>0)for(re=1,I=f[z],G=H[K]=h(I,S,M,C),fe=H[K+ee],$=H[K+Y],Ae=H[K+ye],(G!==fe||G!==$||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,fe,$,Ae,S,M,C),Me=X[K]=ae++),K+=1,z+=U,re=2;re0)for(re=1,I=f[z],G=H[K]=h(I,S,M,C),fe=H[K+ee],$=H[K+Y],Ae=H[K+ye],(G!==fe||G!==$||G!==Ae)&&(R=f[z+N],F=f[z+B],j=f[z+P],c(Q,re,I,R,F,j,G,fe,$,Ae,S,M,C),Me=X[K]=ae++,Ae!==fe&&m(X[K+ee],Me,j,R,Ae,fe,S,M,C)),K+=1,z+=U,re=2;re 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var g=s.getters||[],i=new Array(h),w=0;w=0?i[w]=!0:i[w]=!1;return n(s.vertex,s.cell,s.phase,p,m,i)}},6199:function(l,e,t){"use strict";var a=t(1338),r={zero:function(C,_,T,f){var u=C[0],A=T[0];f|=0;var b=0,z=A;for(b=0;b2&&b[1]>2&&f(A.pick(-1,-1).lo(1,1).hi(b[0]-2,b[1]-2),u.pick(-1,-1,0).lo(1,1).hi(b[0]-2,b[1]-2),u.pick(-1,-1,1).lo(1,1).hi(b[0]-2,b[1]-2)),b[1]>2&&(T(A.pick(0,-1).lo(1).hi(b[1]-2),u.pick(0,-1,1).lo(1).hi(b[1]-2)),_(u.pick(0,-1,0).lo(1).hi(b[1]-2))),b[1]>2&&(T(A.pick(b[0]-1,-1).lo(1).hi(b[1]-2),u.pick(b[0]-1,-1,1).lo(1).hi(b[1]-2)),_(u.pick(b[0]-1,-1,0).lo(1).hi(b[1]-2))),b[0]>2&&(T(A.pick(-1,0).lo(1).hi(b[0]-2),u.pick(-1,0,0).lo(1).hi(b[0]-2)),_(u.pick(-1,0,1).lo(1).hi(b[0]-2))),b[0]>2&&(T(A.pick(-1,b[1]-1).lo(1).hi(b[0]-2),u.pick(-1,b[1]-1,0).lo(1).hi(b[0]-2)),_(u.pick(-1,b[1]-1,1).lo(1).hi(b[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(b[0]-1,0,0,0),u.set(b[0]-1,0,1,0),u.set(0,b[1]-1,0,0),u.set(0,b[1]-1,1,0),u.set(b[0]-1,b[1]-1,0,0),u.set(b[0]-1,b[1]-1,1,0),u}}function M(C){var _=C.join(),b=h[_];if(b)return b;for(var T=C.length,f=[g,i],u=1;u<=T;++u)f.push(w(u));var A=S,b=A.apply(void 0,f);return h[_]=b,b}l.exports=function(_,T,f){if(Array.isArray(f)||(typeof f=="string"?f=a(T.dimension,f):f=a(T.dimension,"clamp")),T.size===0)return _;if(T.dimension===0)return _.set(0),_;var u=M(f);return u(_,T)}},4317:function(l){"use strict";function e(o,s){var c=Math.floor(s),m=s-c,h=0<=c&&c0;){F<64?(_=F,F=0):(_=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(T=P,P=0):(T=64,P-=64),i=R+F*u+P*A,M=B+F*z+P*I;var j=0,U=0,Z=0,Q=b,re=u-f*b,ae=A-_*u,oe=N,H=z-f*N,X=I-_*z;for(Z=0;Z0;){I<64?(_=I,I=0):(_=64,I-=64);for(var N=h[0]|0;N>0;){N<64?(C=N,N=0):(C=64,N-=64),i=b+I*f+N*T,M=z+I*A+N*u;var R=0,B=0,F=f,P=T-_*f,j=A,U=u-_*A;for(B=0;B0;){B<64?(T=B,B=0):(T=64,B-=64);for(var F=h[0]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(_=P,P=0):(_=64,P-=64),i=N+B*A+F*f+P*u,M=R+B*I+F*b+P*z;var j=0,U=0,Z=0,Q=A,re=f-T*A,ae=u-C*f,oe=I,H=b-T*I,X=z-C*b;for(Z=0;Z<_;++Z){for(U=0;Uw;){j=0,U=R-_;t:for(F=0;FQ)break t;U+=b,j+=z}for(j=R,U=R-_,F=0;F>1,P=F-N,j=F+N,U=R,Z=P,Q=F,re=j,ae=B,oe=S+1,H=M-1,X=!0,K,G,Y,q,$,ee,ne,fe,ye,xe=0,Ae=0,Me=0,Ie,Ue,qe,ke,ge,ue,ve,se,Te,Fe,We,Ge,gt,mt,Tt,At,Kt=A,nr=g(Kt),_r=g(Kt);Ue=T*U,qe=T*Z,At=_;e:for(Ie=0;Ie0){G=U,U=Z,Z=G;break e}if(Me<0)break e;At+=z}Ue=T*re,qe=T*ae,At=_;e:for(Ie=0;Ie0){G=re,re=ae,ae=G;break e}if(Me<0)break e;At+=z}Ue=T*U,qe=T*Q,At=_;e:for(Ie=0;Ie0){G=U,U=Q,Q=G;break e}if(Me<0)break e;At+=z}Ue=T*Z,qe=T*Q,At=_;e:for(Ie=0;Ie0){G=Z,Z=Q,Q=G;break e}if(Me<0)break e;At+=z}Ue=T*U,qe=T*re,At=_;e:for(Ie=0;Ie0){G=U,U=re,re=G;break e}if(Me<0)break e;At+=z}Ue=T*Q,qe=T*re,At=_;e:for(Ie=0;Ie0){G=Q,Q=re,re=G;break e}if(Me<0)break e;At+=z}Ue=T*Z,qe=T*ae,At=_;e:for(Ie=0;Ie0){G=Z,Z=ae,ae=G;break e}if(Me<0)break e;At+=z}Ue=T*Z,qe=T*Q,At=_;e:for(Ie=0;Ie0){G=Z,Z=Q,Q=G;break e}if(Me<0)break e;At+=z}Ue=T*re,qe=T*ae,At=_;e:for(Ie=0;Ie0){G=re,re=ae,ae=G;break e}if(Me<0)break e;At+=z}for(Ue=T*U,qe=T*Z,ke=T*Q,ge=T*re,ue=T*ae,ve=T*R,se=T*F,Te=T*B,Tt=0,At=_,Ie=0;Ie0)H--;else if(Me<0){for(Ue=T*ee,qe=T*oe,ke=T*H,At=_,Ie=0;Ie0)for(;;){ne=_+H*T,Tt=0;e:for(Ie=0;Ie0){if(--HB){e:for(;;){for(ne=_+oe*T,Tt=0,At=_,Ie=0;Ie1&&w?M(i,w[0],w[1]):M(i)}var m={"uint32,1,0":function(p,g){return function(i){var w=i.data,S=i.offset|0,M=i.shape,C=i.stride,_=C[0]|0,T=M[0]|0,f=C[1]|0,u=M[1]|0,A=f,b=f,z=1;T<=32?p(0,T-1,w,S,_,f,T,u,A,b,z):g(0,T-1,w,S,_,f,T,u,A,b,z)}}};function h(p,g){var i=[g,p].join(","),w=m[i],S=o(p,g),M=c(p,g,S);return w(S,M)}l.exports=h},446:function(l,e,t){"use strict";var a=t(7640),r={};function n(o){var s=o.order,c=o.dtype,m=[s,c],h=m.join(":"),p=r[h];return p||(r[h]=p=a(s,c)),p(o),o}l.exports=n},9618:function(l,e,t){var a=t(7163),r=typeof Float64Array<"u";function n(g,i){return g[0]-i[0]}function o(){var g=this.stride,i=new Array(g.length),w;for(w=0;w=0&&(f=_|0,T+=A*f,u-=f),new S(this.data,u,A,T)},M.step=function(_){var T=this.shape[0],f=this.stride[0],u=this.offset,A=0,b=Math.ceil;return typeof _=="number"&&(A=_|0,A<0?(u+=f*(T-1),T=b(-T/A)):T=b(T/A),f*=A),new S(this.data,T,f,u)},M.transpose=function(_){_=_===void 0?0:_|0;var T=this.shape,f=this.stride;return new S(this.data,T[_],f[_],this.offset)},M.pick=function(_){var T=[],f=[],u=this.offset;typeof _=="number"&&_>=0?u=u+this.stride[0]*_|0:(T.push(this.shape[0]),f.push(this.stride[0]));var A=i[T.length+1];return A(this.data,T,f,u)},function(_,T,f,u){return new S(_,T[0],f[0],u)}},2:function(g,i,w){function S(C,_,T,f,u,A){this.data=C,this.shape=[_,T],this.stride=[f,u],this.offset=A|0}var M=S.prototype;return M.dtype=g,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(_,T,f){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T,f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]=f},M.get=function(_,T){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]},M.index=function(_,T){return this.offset+this.stride[0]*_+this.stride[1]*T},M.hi=function(_,T){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(_,T){var f=this.offset,u=0,A=this.shape[0],b=this.shape[1],z=this.stride[0],I=this.stride[1];return typeof _=="number"&&_>=0&&(u=_|0,f+=z*u,A-=u),typeof T=="number"&&T>=0&&(u=T|0,f+=I*u,b-=u),new S(this.data,A,b,z,I,f)},M.step=function(_,T){var f=this.shape[0],u=this.shape[1],A=this.stride[0],b=this.stride[1],z=this.offset,I=0,N=Math.ceil;return typeof _=="number"&&(I=_|0,I<0?(z+=A*(f-1),f=N(-f/I)):f=N(f/I),A*=I),typeof T=="number"&&(I=T|0,I<0?(z+=b*(u-1),u=N(-u/I)):u=N(u/I),b*=I),new S(this.data,f,u,A,b,z)},M.transpose=function(_,T){_=_===void 0?0:_|0,T=T===void 0?1:T|0;var f=this.shape,u=this.stride;return new S(this.data,f[_],f[T],u[_],u[T],this.offset)},M.pick=function(_,T){var f=[],u=[],A=this.offset;typeof _=="number"&&_>=0?A=A+this.stride[0]*_|0:(f.push(this.shape[0]),u.push(this.stride[0])),typeof T=="number"&&T>=0?A=A+this.stride[1]*T|0:(f.push(this.shape[1]),u.push(this.stride[1]));var b=i[f.length+1];return b(this.data,f,u,A)},function(_,T,f,u){return new S(_,T[0],T[1],f[0],f[1],u)}},3:function(g,i,w){function S(C,_,T,f,u,A,b,z){this.data=C,this.shape=[_,T,f],this.stride=[u,A,b],this.offset=z|0}var M=S.prototype;return M.dtype=g,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var _=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),f=Math.abs(this.stride[2]);return _>T?T>f?[2,1,0]:_>f?[1,2,0]:[1,0,2]:_>f?[2,0,1]:f>T?[0,1,2]:[0,2,1]}}),M.set=function(_,T,f,u){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f,u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]=u},M.get=function(_,T,f){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]},M.index=function(_,T,f){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f},M.hi=function(_,T,f){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(_,T,f){var u=this.offset,A=0,b=this.shape[0],z=this.shape[1],I=this.shape[2],N=this.stride[0],R=this.stride[1],B=this.stride[2];return typeof _=="number"&&_>=0&&(A=_|0,u+=N*A,b-=A),typeof T=="number"&&T>=0&&(A=T|0,u+=R*A,z-=A),typeof f=="number"&&f>=0&&(A=f|0,u+=B*A,I-=A),new S(this.data,b,z,I,N,R,B,u)},M.step=function(_,T,f){var u=this.shape[0],A=this.shape[1],b=this.shape[2],z=this.stride[0],I=this.stride[1],N=this.stride[2],R=this.offset,B=0,F=Math.ceil;return typeof _=="number"&&(B=_|0,B<0?(R+=z*(u-1),u=F(-u/B)):u=F(u/B),z*=B),typeof T=="number"&&(B=T|0,B<0?(R+=I*(A-1),A=F(-A/B)):A=F(A/B),I*=B),typeof f=="number"&&(B=f|0,B<0?(R+=N*(b-1),b=F(-b/B)):b=F(b/B),N*=B),new S(this.data,u,A,b,z,I,N,R)},M.transpose=function(_,T,f){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0;var u=this.shape,A=this.stride;return new S(this.data,u[_],u[T],u[f],A[_],A[T],A[f],this.offset)},M.pick=function(_,T,f){var u=[],A=[],b=this.offset;typeof _=="number"&&_>=0?b=b+this.stride[0]*_|0:(u.push(this.shape[0]),A.push(this.stride[0])),typeof T=="number"&&T>=0?b=b+this.stride[1]*T|0:(u.push(this.shape[1]),A.push(this.stride[1])),typeof f=="number"&&f>=0?b=b+this.stride[2]*f|0:(u.push(this.shape[2]),A.push(this.stride[2]));var z=i[u.length+1];return z(this.data,u,A,b)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],f[0],f[1],f[2],u)}},4:function(g,i,w){function S(C,_,T,f,u,A,b,z,I,N){this.data=C,this.shape=[_,T,f,u],this.stride=[A,b,z,I],this.offset=N|0}var M=S.prototype;return M.dtype=g,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:w}),M.set=function(_,T,f,u,A){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u,A):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]=A},M.get=function(_,T,f,u){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]},M.index=function(_,T,f,u){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u},M.hi=function(_,T,f,u){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,typeof u!="number"||u<0?this.shape[3]:u|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},M.lo=function(_,T,f,u){var A=this.offset,b=0,z=this.shape[0],I=this.shape[1],N=this.shape[2],R=this.shape[3],B=this.stride[0],F=this.stride[1],P=this.stride[2],j=this.stride[3];return typeof _=="number"&&_>=0&&(b=_|0,A+=B*b,z-=b),typeof T=="number"&&T>=0&&(b=T|0,A+=F*b,I-=b),typeof f=="number"&&f>=0&&(b=f|0,A+=P*b,N-=b),typeof u=="number"&&u>=0&&(b=u|0,A+=j*b,R-=b),new S(this.data,z,I,N,R,B,F,P,j,A)},M.step=function(_,T,f,u){var A=this.shape[0],b=this.shape[1],z=this.shape[2],I=this.shape[3],N=this.stride[0],R=this.stride[1],B=this.stride[2],F=this.stride[3],P=this.offset,j=0,U=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(P+=N*(A-1),A=U(-A/j)):A=U(A/j),N*=j),typeof T=="number"&&(j=T|0,j<0?(P+=R*(b-1),b=U(-b/j)):b=U(b/j),R*=j),typeof f=="number"&&(j=f|0,j<0?(P+=B*(z-1),z=U(-z/j)):z=U(z/j),B*=j),typeof u=="number"&&(j=u|0,j<0?(P+=F*(I-1),I=U(-I/j)):I=U(I/j),F*=j),new S(this.data,A,b,z,I,N,R,B,F,P)},M.transpose=function(_,T,f,u){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0,u=u===void 0?3:u|0;var A=this.shape,b=this.stride;return new S(this.data,A[_],A[T],A[f],A[u],b[_],b[T],b[f],b[u],this.offset)},M.pick=function(_,T,f,u){var A=[],b=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(A.push(this.shape[0]),b.push(this.stride[0])),typeof T=="number"&&T>=0?z=z+this.stride[1]*T|0:(A.push(this.shape[1]),b.push(this.stride[1])),typeof f=="number"&&f>=0?z=z+this.stride[2]*f|0:(A.push(this.shape[2]),b.push(this.stride[2])),typeof u=="number"&&u>=0?z=z+this.stride[3]*u|0:(A.push(this.shape[3]),b.push(this.stride[3]));var I=i[A.length+1];return I(this.data,A,b,z)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],T[3],f[0],f[1],f[2],f[3],u)}},5:function(i,w,S){function M(_,T,f,u,A,b,z,I,N,R,B,F){this.data=_,this.shape=[T,f,u,A,b],this.stride=[z,I,N,R,B],this.offset=F|0}var C=M.prototype;return C.dtype=i,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:S}),C.set=function(T,f,u,A,b,z){return i==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b,z):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b]=z},C.get=function(T,f,u,A,b){return i==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b]},C.index=function(T,f,u,A,b){return this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*b},C.hi=function(T,f,u,A,b){return new M(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof f!="number"||f<0?this.shape[1]:f|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof A!="number"||A<0?this.shape[3]:A|0,typeof b!="number"||b<0?this.shape[4]:b|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(T,f,u,A,b){var z=this.offset,I=0,N=this.shape[0],R=this.shape[1],B=this.shape[2],F=this.shape[3],P=this.shape[4],j=this.stride[0],U=this.stride[1],Z=this.stride[2],Q=this.stride[3],re=this.stride[4];return typeof T=="number"&&T>=0&&(I=T|0,z+=j*I,N-=I),typeof f=="number"&&f>=0&&(I=f|0,z+=U*I,R-=I),typeof u=="number"&&u>=0&&(I=u|0,z+=Z*I,B-=I),typeof A=="number"&&A>=0&&(I=A|0,z+=Q*I,F-=I),typeof b=="number"&&b>=0&&(I=b|0,z+=re*I,P-=I),new M(this.data,N,R,B,F,P,j,U,Z,Q,re,z)},C.step=function(T,f,u,A,b){var z=this.shape[0],I=this.shape[1],N=this.shape[2],R=this.shape[3],B=this.shape[4],F=this.stride[0],P=this.stride[1],j=this.stride[2],U=this.stride[3],Z=this.stride[4],Q=this.offset,re=0,ae=Math.ceil;return typeof T=="number"&&(re=T|0,re<0?(Q+=F*(z-1),z=ae(-z/re)):z=ae(z/re),F*=re),typeof f=="number"&&(re=f|0,re<0?(Q+=P*(I-1),I=ae(-I/re)):I=ae(I/re),P*=re),typeof u=="number"&&(re=u|0,re<0?(Q+=j*(N-1),N=ae(-N/re)):N=ae(N/re),j*=re),typeof A=="number"&&(re=A|0,re<0?(Q+=U*(R-1),R=ae(-R/re)):R=ae(R/re),U*=re),typeof b=="number"&&(re=b|0,re<0?(Q+=Z*(B-1),B=ae(-B/re)):B=ae(B/re),Z*=re),new M(this.data,z,I,N,R,B,F,P,j,U,Z,Q)},C.transpose=function(T,f,u,A,b){T=T===void 0?0:T|0,f=f===void 0?1:f|0,u=u===void 0?2:u|0,A=A===void 0?3:A|0,b=b===void 0?4:b|0;var z=this.shape,I=this.stride;return new M(this.data,z[T],z[f],z[u],z[A],z[b],I[T],I[f],I[u],I[A],I[b],this.offset)},C.pick=function(T,f,u,A,b){var z=[],I=[],N=this.offset;typeof T=="number"&&T>=0?N=N+this.stride[0]*T|0:(z.push(this.shape[0]),I.push(this.stride[0])),typeof f=="number"&&f>=0?N=N+this.stride[1]*f|0:(z.push(this.shape[1]),I.push(this.stride[1])),typeof u=="number"&&u>=0?N=N+this.stride[2]*u|0:(z.push(this.shape[2]),I.push(this.stride[2])),typeof A=="number"&&A>=0?N=N+this.stride[3]*A|0:(z.push(this.shape[3]),I.push(this.stride[3])),typeof b=="number"&&b>=0?N=N+this.stride[4]*b|0:(z.push(this.shape[4]),I.push(this.stride[4]));var R=w[z.length+1];return R(this.data,z,I,N)},function(T,f,u,A){return new M(T,f[0],f[1],f[2],f[3],f[4],u[0],u[1],u[2],u[3],u[4],A)}}};function c(g,i){var w=i===-1?"T":String(i),S=s[w];return i===-1?S(g):i===0?S(g,h[g][0]):S(g,h[g],o)}function m(g){if(a(g))return"buffer";if(r)switch(Object.prototype.toString.call(g)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(g)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function p(g,i,w,S){if(g===void 0){var u=h.array[0];return u([])}else typeof g=="number"&&(g=[g]);i===void 0&&(i=[g.length]);var M=i.length;if(w===void 0){w=new Array(M);for(var C=M-1,_=1;C>=0;--C)w[C]=_,_*=i[C]}if(S===void 0){S=0;for(var C=0;C>>0;l.exports=o;function o(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var m=a.hi(s),h=a.lo(s);return c>s==s>0?h===n?(m+=1,h=0):h+=1:h===0?(h=n,m-=1):h-=1,a.pack(h,m)}},8406:function(l,e){var t=1e-6,a=1e-6;e.vertexNormals=function(r,n,o){for(var s=n.length,c=new Array(s),m=o===void 0?t:o,h=0;hm)for(var z=c[i],I=1/Math.sqrt(f*A),b=0;b<3;++b){var N=(b+1)%3,R=(b+2)%3;z[b]+=I*(u[N]*T[R]-u[R]*T[N])}}for(var h=0;hm)for(var I=1/Math.sqrt(B),b=0;b<3;++b)z[b]*=I;else for(var b=0;b<3;++b)z[b]=0}return c},e.faceNormals=function(r,n,o){for(var s=r.length,c=new Array(s),m=o===void 0?a:o,h=0;hm?C=1/Math.sqrt(C):C=0;for(var i=0;i<3;++i)M[i]*=C;c[h]=M}return c}},4081:function(l){"use strict";l.exports=e;function e(t,a,r,n,o,s,c,m,h,p){var g=a+s+p;if(i>0){var i=Math.sqrt(g+1);t[0]=.5*(c-h)/i,t[1]=.5*(m-n)/i,t[2]=.5*(r-s)/i,t[3]=.5*i}else{var w=Math.max(a,s,p),i=Math.sqrt(2*w-g+1);a>=w?(t[0]=.5*i,t[1]=.5*(o+r)/i,t[2]=.5*(m+n)/i,t[3]=.5*(c-h)/i):s>=w?(t[0]=.5*(r+o)/i,t[1]=.5*i,t[2]=.5*(h+c)/i,t[3]=.5*(m-n)/i):(t[0]=.5*(n+m)/i,t[1]=.5*(c+h)/i,t[2]=.5*i,t[3]=.5*(r-o)/i)}return t}},9977:function(l,e,t){"use strict";l.exports=i;var a=t(9215),r=t(6582),n=t(7399),o=t(7608),s=t(4081);function c(w,S,M){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2))}function m(w,S,M,C){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2)+Math.pow(C,2))}function h(w,S){var M=S[0],C=S[1],_=S[2],T=S[3],f=m(M,C,_,T);f>1e-6?(w[0]=M/f,w[1]=C/f,w[2]=_/f,w[3]=T/f):(w[0]=w[1]=w[2]=0,w[3]=1)}function p(w,S,M){this.radius=a([M]),this.center=a(S),this.rotation=a(w),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 g=p.prototype;g.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},g.recalcMatrix=function(w){this.radius.curve(w),this.center.curve(w),this.rotation.curve(w);var S=this.computedRotation;h(S,S);var M=this.computedMatrix;n(M,S);var C=this.computedCenter,_=this.computedEye,T=this.computedUp,f=Math.exp(this.computedRadius[0]);_[0]=C[0]+f*M[2],_[1]=C[1]+f*M[6],_[2]=C[2]+f*M[10],T[0]=M[1],T[1]=M[5],T[2]=M[9];for(var u=0;u<3;++u){for(var A=0,b=0;b<3;++b)A+=M[u+4*b]*_[b];M[12+u]=-A}},g.getMatrix=function(w,S){this.recalcMatrix(w);var M=this.computedMatrix;if(S){for(var C=0;C<16;++C)S[C]=M[C];return S}return M},g.idle=function(w){this.center.idle(w),this.radius.idle(w),this.rotation.idle(w)},g.flush=function(w){this.center.flush(w),this.radius.flush(w),this.rotation.flush(w)},g.pan=function(w,S,M,C){S=S||0,M=M||0,C=C||0,this.recalcMatrix(w);var _=this.computedMatrix,T=_[1],f=_[5],u=_[9],A=c(T,f,u);T/=A,f/=A,u/=A;var b=_[0],z=_[4],I=_[8],N=b*T+z*f+I*u;b-=T*N,z-=f*N,I-=u*N;var R=c(b,z,I);b/=R,z/=R,I/=R;var B=_[2],F=_[6],P=_[10],j=B*T+F*f+P*u,U=B*b+F*z+P*I;B-=j*T+U*b,F-=j*f+U*z,P-=j*u+U*I;var Z=c(B,F,P);B/=Z,F/=Z,P/=Z;var Q=b*S+T*M,re=z*S+f*M,ae=I*S+u*M;this.center.move(w,Q,re,ae);var oe=Math.exp(this.computedRadius[0]);oe=Math.max(1e-4,oe+C),this.radius.set(w,Math.log(oe))},g.rotate=function(w,S,M,C){this.recalcMatrix(w),S=S||0,M=M||0;var _=this.computedMatrix,T=_[0],f=_[4],u=_[8],A=_[1],b=_[5],z=_[9],I=_[2],N=_[6],R=_[10],B=S*T+M*A,F=S*f+M*b,P=S*u+M*z,j=-(N*P-R*F),U=-(R*B-I*P),Z=-(I*F-N*B),Q=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(U,2)-Math.pow(Z,2))),re=m(j,U,Z,Q);re>1e-6?(j/=re,U/=re,Z/=re,Q/=re):(j=U=Z=0,Q=1);var ae=this.computedRotation,oe=ae[0],H=ae[1],X=ae[2],K=ae[3],G=oe*Q+K*j+H*Z-X*U,Y=H*Q+K*U+X*j-oe*Z,q=X*Q+K*Z+oe*U-H*j,$=K*Q-oe*j-H*U-X*Z;if(C){j=I,U=N,Z=R;var ee=Math.sin(C)/c(j,U,Z);j*=ee,U*=ee,Z*=ee,Q=Math.cos(S),G=G*Q+$*j+Y*Z-q*U,Y=Y*Q+$*U+q*j-G*Z,q=q*Q+$*Z+G*U-Y*j,$=$*Q-G*j-Y*U-q*Z}var ne=m(G,Y,q,$);ne>1e-6?(G/=ne,Y/=ne,q/=ne,$/=ne):(G=Y=q=0,$=1),this.rotation.set(w,G,Y,q,$)},g.lookAt=function(w,S,M,C){this.recalcMatrix(w),M=M||this.computedCenter,S=S||this.computedEye,C=C||this.computedUp;var _=this.computedMatrix;r(_,S,M,C);var T=this.computedRotation;s(T,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),h(T,T),this.rotation.set(w,T[0],T[1],T[2],T[3]);for(var f=0,u=0;u<3;++u)f+=Math.pow(M[u]-S[u],2);this.radius.set(w,.5*Math.log(Math.max(f,1e-6))),this.center.set(w,M[0],M[1],M[2])},g.translate=function(w,S,M,C){this.center.move(w,S||0,M||0,C||0)},g.setMatrix=function(w,S){var M=this.computedRotation;s(M,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),h(M,M),this.rotation.set(w,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;o(C,S);var _=C[15];if(Math.abs(_)>1e-6){var T=C[12]/_,f=C[13]/_,u=C[14]/_;this.recalcMatrix(w);var A=Math.exp(this.computedRadius[0]);this.center.set(w,T-C[2]*A,f-C[6]*A,u-C[10]*A),this.radius.idle(w)}else this.center.idle(w),this.radius.idle(w)},g.setDistance=function(w,S){S>0&&this.radius.set(w,Math.log(S))},g.setDistanceLimits=function(w,S){w>0?w=Math.log(w):w=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=S},g.getDistanceLimits=function(w){var S=this.radius.bounds;return w?(w[0]=Math.exp(S[0][0]),w[1]=Math.exp(S[1][0]),w):[Math.exp(S[0][0]),Math.exp(S[1][0])]},g.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]}},g.fromJSON=function(w){var S=this.lastT(),M=w.center;M&&this.center.set(S,M[0],M[1],M[2]);var C=w.rotation;C&&this.rotation.set(S,C[0],C[1],C[2],C[3]);var _=w.distance;_&&_>0&&this.radius.set(S,Math.log(_)),this.setDistanceLimits(w.zoomMin,w.zoomMax)};function i(w){w=w||{};var S=w.center||[0,0,0],M=w.rotation||[0,0,0,1],C=w.radius||1;S=[].slice.call(S,0,3),M=[].slice.call(M,0,4),h(M,M);var _=new p(M,S,Math.log(C));return _.setDistanceLimits(w.zoomMin,w.zoomMax),("eye"in w||"up"in w)&&_.lookAt(0,w.eye,w.center,w.up),_}},1371:function(l,e,t){"use strict";var a=t(3233);l.exports=function(n,o,s){return s=typeof s<"u"?s+"":" ",a(s,o)+n}},3202:function(l){l.exports=function(t,a){a||(a=[0,""]),t=String(t);var r=parseFloat(t,10);return a[0]=r,a[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",a}},3088:function(l,e,t){"use strict";l.exports=r;var a=t(3140);function r(n,o){for(var s=o.length|0,c=n.length,m=[new Array(s),new Array(s)],h=0;h0){z=m[R][A][0],N=R;break}I=z[N^1];for(var B=0;B<2;++B)for(var F=m[B][A],P=0;P0&&(z=j,I=U,N=B)}return b||z&&i(z,N),I}function S(u,A){var b=m[A][u][0],z=[u];i(b,A);for(var I=b[A^1],N=A;;){for(;I!==u;)z.push(I),I=w(z[z.length-2],I,!1);if(m[0][u].length+m[1][u].length===0)break;var R=z[z.length-1],B=u,F=z[1],P=w(R,B,!0);if(a(o[R],o[B],o[F],o[P])<0)break;z.push(u),I=w(R,B)}return z}function M(u,A){return A[1]===A[A.length-1]}for(var h=0;h0;){var T=m[0][h].length,f=S(h,C);M(_,f)?_.push.apply(_,f):(_.length>0&&g.push(_),_=f)}_.length>0&&g.push(_)}return g}},5609:function(l,e,t){"use strict";l.exports=r;var a=t(3134);function r(n,o){for(var s=a(n,o.length),c=new Array(o.length),m=new Array(o.length),h=[],p=0;p0;){var i=h.pop();c[i]=!1;for(var w=s[i],p=0;p0}T=T.filter(f);for(var u=T.length,A=new Array(u),b=new Array(u),_=0;_0;){var ne=q.pop(),fe=re[ne];c(fe,function(Ie,Ue){return Ie-Ue});var ye=fe.length,xe=$[ne],Ae;if(xe===0){var F=T[ne];Ae=[F]}for(var _=0;_=0)&&($[Me]=xe^1,q.push(Me),xe===0)){var F=T[Me];Y(F)||(F.reverse(),Ae.push(F))}}xe===0&&ee.push(Ae)}return ee}},5085:function(l,e,t){l.exports=w;var a=t(3250)[3],r=t(4209),n=t(3352),o=t(2478);function s(){return!0}function c(S){return function(M,C){var _=S[M];return _?!!_.queryPoint(C,s):!1}}function m(S){for(var M={},C=0;C0&&M[_]===C[0])T=S[_-1];else return 1;for(var f=1;T;){var u=T.key,A=a(C,u[0],u[1]);if(u[0][0]0)f=-1,T=T.right;else return 0;else if(A>0)T=T.left;else if(A<0)f=1,T=T.right;else return 0}return f}}function p(S){return 1}function g(S){return function(C){return S(C[0],C[1])?0:1}}function i(S,M){return function(_){return S(_[0],_[1])?0:M(_)}}function w(S){for(var M=S.length,C=[],_=[],T=0,f=0;f=p?(u=1,b=p+2*w+M):(u=-w/p,b=w*u+M)):(u=0,S>=0?(A=0,b=M):-S>=i?(A=1,b=i+2*S+M):(A=-S/i,b=S*A+M));else if(A<0)A=0,w>=0?(u=0,b=M):-w>=p?(u=1,b=p+2*w+M):(u=-w/p,b=w*u+M);else{var z=1/f;u*=z,A*=z,b=u*(p*u+g*A+2*w)+A*(g*u+i*A+2*S)+M}else{var I,N,R,B;u<0?(I=g+w,N=i+S,N>I?(R=N-I,B=p-2*g+i,R>=B?(u=1,A=0,b=p+2*w+M):(u=R/B,A=1-u,b=u*(p*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(u=0,N<=0?(A=1,b=i+2*S+M):S>=0?(A=0,b=M):(A=-S/i,b=S*A+M))):A<0?(I=g+S,N=p+w,N>I?(R=N-I,B=p-2*g+i,R>=B?(A=1,u=0,b=i+2*S+M):(A=R/B,u=1-A,b=u*(p*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(A=0,N<=0?(u=1,b=p+2*w+M):w>=0?(u=0,b=M):(u=-w/p,b=w*u+M))):(R=i+S-g-w,R<=0?(u=0,A=1,b=i+2*S+M):(B=p-2*g+i,R>=B?(u=1,A=0,b=p+2*w+M):(u=R/B,A=1-u,b=u*(p*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)))}for(var F=1-u-A,h=0;h0){var i=s[m-1];if(a(p,i)===0&&n(i)!==g){m-=1;continue}}s[m++]=p}}return s.length=m,s}},3233:function(l){"use strict";var e="",t;l.exports=a;function a(r,n){if(typeof r!="string")throw new TypeError("expected a string");if(n===1)return r;if(n===2)return r+r;var o=r.length*n;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=o)return e.substr(0,o);for(;o>e.length&&n>1;)n&1&&(e+=r),n>>=1,r+=r;return e+=r,e=e.substr(0,o),e}},3025:function(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(l){"use strict";l.exports=e;function e(t){for(var a=t.length,r=t[t.length-1],n=a,o=a-2;o>=0;--o){var s=r,c=t[o];r=s+c;var m=r-s,h=c-m;h&&(t[--n]=r,r=h)}for(var p=0,o=n;o0){if(N<=0)return R;B=I+N}else if(I<0){if(N>=0)return R;B=-(I+N)}else return R;var F=m*B;return R>=F||R<=-F?R:S(A,b,z)},function(A,b,z,I){var N=A[0]-I[0],R=b[0]-I[0],B=z[0]-I[0],F=A[1]-I[1],P=b[1]-I[1],j=z[1]-I[1],U=A[2]-I[2],Z=b[2]-I[2],Q=z[2]-I[2],re=R*j,ae=B*P,oe=B*F,H=N*j,X=N*P,K=R*F,G=U*(re-ae)+Z*(oe-H)+Q*(X-K),Y=(Math.abs(re)+Math.abs(ae))*Math.abs(U)+(Math.abs(oe)+Math.abs(H))*Math.abs(Z)+(Math.abs(X)+Math.abs(K))*Math.abs(Q),q=h*Y;return G>q||-G>q?G:M(A,b,z,I)}];function _(u){var A=C[u.length];return A||(A=C[u.length]=w(u.length)),A.apply(void 0,u)}function T(u,A,b,z,I,N,R){return function(F,P,j,U,Z){switch(arguments.length){case 0:case 1:return 0;case 2:return z(F,P);case 3:return I(F,P,j);case 4:return N(F,P,j,U);case 5:return R(F,P,j,U,Z)}for(var Q=new Array(arguments.length),re=0;re0&&p>0||h<0&&p<0)return!1;var g=a(c,o,s),i=a(m,o,s);return g>0&&i>0||g<0&&i<0?!1:h===0&&p===0&&g===0&&i===0?r(o,s,c,m):!0}},8545:function(l){"use strict";l.exports=t;function e(a,r){var n=a+r,o=n-a,s=n-o,c=r-o,m=a-s,h=m+c;return h?[h,n]:[n]}function t(a,r){var n=a.length|0,o=r.length|0;if(n===1&&o===1)return e(a[0],-r[0]);var s=n+o,c=new Array(s),m=0,h=0,p=0,g=Math.abs,i=a[h],w=g(i),S=-r[p],M=g(S),C,_;w=o?(C=i,h+=1,h=o?(C=i,h+=1,h"u"&&(C=s(w));var _=w.length;if(_===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var T=c(S,+M),f=m(w,C),u=h(f,S,T,+M),A=p(f,S.length|0),b=o(C)(w,f.data,A,T),z=g(f),I=[].slice.call(u.data,0,u.shape[0]);return r.free(T),r.free(f.data),r.free(u.data),r.free(A),{cells:b,vertexIds:z,vertexWeights:I}}},1570:function(l){"use strict";l.exports=t;var e=[function(){function r(o,s,c,m){for(var h=Math.min(c,m)|0,p=Math.max(c,m)|0,g=o[2*h],i=o[2*h+1];g>1,S=s[2*w+1];if(S===p)return w;p>1,S=s[2*w+1];if(S===p)return w;p>1,S=s[2*w+1];if(S===p)return w;p>1,S=s[2*w+1];if(S===p)return w;p>1,B=m(A[R],b);B<=0?(B===0&&(N=R),z=R+1):B>0&&(I=R-1)}return N}a=i;function w(A,b){for(var z=new Array(A.length),I=0,N=z.length;I=A.length||m(A[re],R)!==0););}return z}a=w;function S(A,b){if(!b)return w(g(C(A,0)),A,0);for(var z=new Array(b),I=0;I>>j&1&&P.push(N[j]);b.push(P)}return p(b)}a=M;function C(A,b){if(b<0)return[];for(var z=[],I=(1<0)-(n<0)},e.abs=function(n){var o=n>>t-1;return(n^o)-o},e.min=function(n,o){return o^(n^o)&-(n65535)<<4,n>>>=o,s=(n>255)<<3,n>>>=s,o|=s,s=(n>15)<<2,n>>>=s,o|=s,s=(n>3)<<1,n>>>=s,o|=s,o|n>>1},e.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},e.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function a(n){var o=32;return n&=-n,n&&o--,n&65535&&(o-=16),n&16711935&&(o-=8),n&252645135&&(o-=4),n&858993459&&(o-=2),n&1431655765&&(o-=1),o}e.countTrailingZeros=a,e.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},e.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},e.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var r=new Array(256);(function(n){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;n[o]=c<>>8&255]<<16|r[n>>>16&255]<<8|r[n>>>24&255]},e.interleave2=function(n,o){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,n|o<<1},e.deinterleave2=function(n,o){return n=n>>>o&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},e.interleave3=function(n,o,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,n|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},e.deinterleave3=function(n,o){return n=n>>>o&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},e.nextCombination=function(n){var o=n|n-1;return o+1|(~o&-~o)-1>>>a(n)+1}},2014:function(l,e,t){"use strict";"use restrict";var a=t(3105),r=t(4623);function n(u){for(var A=0,b=Math.max,z=0,I=u.length;z>1,R=c(u[N],A);R<=0?(R===0&&(I=N),b=N+1):R>0&&(z=N-1)}return I}e.findCell=g;function i(u,A){for(var b=new Array(u.length),z=0,I=b.length;z=u.length||c(u[Q],N)!==0););}return b}e.incidence=i;function w(u,A){if(!A)return i(p(M(u,0)),u,0);for(var b=new Array(A),z=0;z>>P&1&&F.push(I[P]);A.push(F)}return h(A)}e.explode=S;function M(u,A){if(A<0)return[];for(var b=[],z=(1<>1:(H>>1)-1}function z(H){for(var X=A(H);;){var K=X,G=2*H+1,Y=2*(H+1),q=H;if(G0;){var K=b(H);if(K>=0){var G=A(K);if(X0){var H=F[0];return u(0,U-1),U-=1,z(0),H}return-1}function R(H,X){var K=F[H];return w[K]===X?H:(w[K]=-1/0,I(H),N(),w[K]=X,U+=1,I(U-1))}function B(H){if(!S[H]){S[H]=!0;var X=g[H],K=i[H];g[K]>=0&&(g[K]=X),i[X]>=0&&(i[X]=K),P[X]>=0&&R(P[X],f(X)),P[K]>=0&&R(P[K],f(K))}}for(var F=[],P=new Array(h),M=0;M>1;M>=0;--M)z(M);for(;;){var Z=N();if(Z<0||w[Z]>m)break;B(Z)}for(var Q=[],M=0;M=0&&K>=0&&X!==K){var G=P[X],Y=P[K];G!==Y&&oe.push([G,Y])}}),r.unique(r.normalize(oe)),{positions:Q,edges:oe}}},1303:function(l,e,t){"use strict";l.exports=n;var a=t(3250);function r(o,s){var c,m;if(s[0][0]s[1][0])c=s[1],m=s[0];else{var h=Math.min(o[0][1],o[1][1]),p=Math.max(o[0][1],o[1][1]),g=Math.min(s[0][1],s[1][1]),i=Math.max(s[0][1],s[1][1]);return pi?h-i:p-i}var w,S;o[0][1]s[1][0])c=s[1],m=s[0];else return r(s,o);var h,p;if(o[0][0]o[1][0])h=o[1],p=o[0];else return-r(o,s);var g=a(c,m,p),i=a(c,m,h);if(g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;if(g=a(p,h,m),i=a(p,h,c),g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;return m[0]-p[0]}},4209:function(l,e,t){"use strict";l.exports=i;var a=t(2478),r=t(3840),n=t(3250),o=t(1303);function s(w,S,M){this.slabs=w,this.coordinates=S,this.horizontal=M}var c=s.prototype;function m(w,S){return w.y-S}function h(w,S){for(var M=null;w;){var C=w.key,_,T;C[0][0]0)if(S[0]!==C[1][0])M=w,w=w.right;else{var u=h(w.right,S);if(u)return u;w=w.left}else{if(S[0]!==C[1][0])return w;var u=h(w.right,S);if(u)return u;w=w.left}}return M}c.castUp=function(w){var S=a.le(this.coordinates,w[0]);if(S<0)return-1;var M=this.slabs[S],C=h(this.slabs[S],w),_=-1;if(C&&(_=C.value),this.coordinates[S]===w[0]){var T=null;if(C&&(T=C.key),S>0){var f=h(this.slabs[S-1],w);f&&(T?o(f.key,T)>0&&(T=f.key,_=f.value):(_=f.value,T=f.key))}var u=this.horizontal[S];if(u.length>0){var A=a.ge(u,w[1],m);if(A=u.length)return _;b=u[A]}}if(b.start)if(T){var z=n(T[0],T[1],[w[0],b.y]);T[0][0]>T[1][0]&&(z=-z),z>0&&(_=b.index)}else _=b.index;else b.y!==w[1]&&(_=b.index)}}}return _};function p(w,S,M,C){this.y=w,this.index=S,this.start=M,this.closed=C}function g(w,S,M,C){this.x=w,this.segment=S,this.create=M,this.index=C}function i(w){for(var S=w.length,M=2*S,C=new Array(M),_=0;_1&&(S=1);for(var M=1-S,C=h.length,_=new Array(C),T=0;T0||w>0&&_<0){var T=o(S,_,M,w);g.push(T),i.push(T.slice())}_<0?i.push(M.slice()):_>0?g.push(M.slice()):(g.push(M.slice()),i.push(M.slice())),w=_}return{positive:g,negative:i}}function c(h,p){for(var g=[],i=n(h[h.length-1],p),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C>=0&&g.push(S.slice()),i=C}return g}function m(h,p){for(var g=[],i=n(h[h.length-1],p),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C<=0&&g.push(S.slice()),i=C}return g}},3387:function(l,e,t){var a;(function(){"use strict";var r={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 n(h){return s(m(h),arguments)}function o(h,p){return n.apply(null,[h].concat(p||[]))}function s(h,p){var g=1,i=h.length,w,S="",M,C,_,T,f,u,A,b;for(M=0;M=0),_.type){case"b":w=parseInt(w,10).toString(2);break;case"c":w=String.fromCharCode(parseInt(w,10));break;case"d":case"i":w=parseInt(w,10);break;case"j":w=JSON.stringify(w,null,_.width?parseInt(_.width):0);break;case"e":w=_.precision?parseFloat(w).toExponential(_.precision):parseFloat(w).toExponential();break;case"f":w=_.precision?parseFloat(w).toFixed(_.precision):parseFloat(w);break;case"g":w=_.precision?String(Number(w.toPrecision(_.precision))):parseFloat(w);break;case"o":w=(parseInt(w,10)>>>0).toString(8);break;case"s":w=String(w),w=_.precision?w.substring(0,_.precision):w;break;case"t":w=String(!!w),w=_.precision?w.substring(0,_.precision):w;break;case"T":w=Object.prototype.toString.call(w).slice(8,-1).toLowerCase(),w=_.precision?w.substring(0,_.precision):w;break;case"u":w=parseInt(w,10)>>>0;break;case"v":w=w.valueOf(),w=_.precision?w.substring(0,_.precision):w;break;case"x":w=(parseInt(w,10)>>>0).toString(16);break;case"X":w=(parseInt(w,10)>>>0).toString(16).toUpperCase();break}r.json.test(_.type)?S+=w:(r.number.test(_.type)&&(!A||_.sign)?(b=A?"+":"-",w=w.toString().replace(r.sign,"")):b="",f=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",u=_.width-(b+w).length,T=_.width&&u>0?f.repeat(u):"",S+=_.align?b+w+T:f==="0"?b+T+w:T+b+w)}return S}var c=Object.create(null);function m(h){if(c[h])return c[h];for(var p=h,g,i=[],w=0;p;){if((g=r.text.exec(p))!==null)i.push(g[0]);else if((g=r.modulo.exec(p))!==null)i.push("%");else if((g=r.placeholder.exec(p))!==null){if(g[2]){w|=1;var S=[],M=g[2],C=[];if((C=r.key.exec(M))!==null)for(S.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=r.key_access.exec(M))!==null)S.push(C[1]);else if((C=r.index_access.exec(M))!==null)S.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=S}else w|=2;if(w===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");p=p.substring(g[0].length)}return c[h]=i}e.sprintf=n,e.vsprintf=o,typeof window<"u"&&(window.sprintf=n,window.vsprintf=o,a=function(){return{sprintf:n,vsprintf:o}}.call(e,t,e,l),a!==void 0&&(l.exports=a))})()},3711:function(l,e,t){"use strict";l.exports=m;var a=t(2640),r=t(781),n={"2d":function(h,p,g){var i=h({order:p,scalarArguments:3,getters:g==="generic"?[0]:void 0,phase:function(S,M,C,_){return S>_|0},vertex:function(S,M,C,_,T,f,u,A,b,z,I,N,R){var B=(u<<0)+(A<<1)+(b<<2)+(z<<3)|0;if(!(B===0||B===15))switch(B){case 0:I.push([S-.5,M-.5]);break;case 1:I.push([S-.25-.25*(_+C-2*R)/(C-_),M-.25-.25*(T+C-2*R)/(C-T)]);break;case 2:I.push([S-.75-.25*(-_-C+2*R)/(_-C),M-.25-.25*(f+_-2*R)/(_-f)]);break;case 3:I.push([S-.5,M-.5-.5*(T+C+f+_-4*R)/(C-T+_-f)]);break;case 4:I.push([S-.25-.25*(f+T-2*R)/(T-f),M-.75-.25*(-T-C+2*R)/(T-C)]);break;case 5:I.push([S-.5-.5*(_+C+f+T-4*R)/(C-_+T-f),M-.5]);break;case 6:I.push([S-.5-.25*(-_-C+f+T)/(_-C+T-f),M-.5-.25*(-T-C+f+_)/(T-C+_-f)]);break;case 7:I.push([S-.75-.25*(f+T-2*R)/(T-f),M-.75-.25*(f+_-2*R)/(_-f)]);break;case 8:I.push([S-.75-.25*(-f-T+2*R)/(f-T),M-.75-.25*(-f-_+2*R)/(f-_)]);break;case 9:I.push([S-.5-.25*(_+C+-f-T)/(C-_+f-T),M-.5-.25*(T+C+-f-_)/(C-T+f-_)]);break;case 10:I.push([S-.5-.5*(-_-C+-f-T+4*R)/(_-C+f-T),M-.5]);break;case 11:I.push([S-.25-.25*(-f-T+2*R)/(f-T),M-.75-.25*(T+C-2*R)/(C-T)]);break;case 12:I.push([S-.5,M-.5-.5*(-T-C+-f-_+4*R)/(T-C+f-_)]);break;case 13:I.push([S-.75-.25*(_+C-2*R)/(C-_),M-.25-.25*(-f-_+2*R)/(f-_)]);break;case 14:I.push([S-.25-.25*(-_-C+2*R)/(_-C),M-.25-.25*(-T-C+2*R)/(T-C)]);break;case 15:I.push([S-.5,M-.5]);break}},cell:function(S,M,C,_,T,f,u,A,b){T?A.push([S,M]):A.push([M,S])}});return function(w,S){var M=[],C=[];return i(w,M,C,S),{positions:M,cells:C}}}};function o(h,p){var g=h.length+"d",i=n[g];if(i)return i(a,h,p)}function s(h,p){for(var g=r(h,p),i=g.length,w=new Array(i),S=new Array(i),M=0;MMath.max(_,T)?f[2]=1:_>Math.max(C,T)?f[0]=1:f[1]=1;for(var u=0,A=0,b=0;b<3;++b)u+=M[b]*M[b],A+=f[b]*M[b];for(var b=0;b<3;++b)f[b]-=A/u*M[b];return s(f,f),f}function g(M,C,_,T,f,u,A,b){this.center=a(_),this.up=a(T),this.right=a(f),this.radius=a([u]),this.angle=a([A,b]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),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 z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var i=g.prototype;i.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},i.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},i.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,_=this.computedRight,T=0,f=0,u=0;u<3;++u)f+=C[u]*_[u],T+=C[u]*C[u];for(var A=Math.sqrt(T),b=0,u=0;u<3;++u)_[u]-=C[u]*f/T,b+=_[u]*_[u],C[u]/=A;for(var z=Math.sqrt(b),u=0;u<3;++u)_[u]/=z;var I=this.computedToward;o(I,C,_),s(I,I);for(var N=Math.exp(this.computedRadius[0]),R=this.computedAngle[0],B=this.computedAngle[1],F=Math.cos(R),P=Math.sin(R),j=Math.cos(B),U=Math.sin(B),Z=this.computedCenter,Q=F*j,re=P*j,ae=U,oe=-F*U,H=-P*U,X=j,K=this.computedEye,G=this.computedMatrix,u=0;u<3;++u){var Y=Q*_[u]+re*I[u]+ae*C[u];G[4*u+1]=oe*_[u]+H*I[u]+X*C[u],G[4*u+2]=Y,G[4*u+3]=0}var q=G[1],$=G[5],ee=G[9],ne=G[2],fe=G[6],ye=G[10],xe=$*ye-ee*fe,Ae=ee*ne-q*ye,Me=q*fe-$*ne,Ie=m(xe,Ae,Me);xe/=Ie,Ae/=Ie,Me/=Ie,G[0]=xe,G[4]=Ae,G[8]=Me;for(var u=0;u<3;++u)K[u]=Z[u]+G[2+4*u]*N;for(var u=0;u<3;++u){for(var b=0,Ue=0;Ue<3;++Ue)b+=G[u+4*Ue]*K[Ue];G[12+u]=-b}G[15]=1},i.getMatrix=function(M,C){this.recalcMatrix(M);var _=this.computedMatrix;if(C){for(var T=0;T<16;++T)C[T]=_[T];return C}return _};var w=[0,0,0];i.rotate=function(M,C,_,T){if(this.angle.move(M,C,_),T){this.recalcMatrix(M);var f=this.computedMatrix;w[0]=f[2],w[1]=f[6],w[2]=f[10];for(var u=this.computedUp,A=this.computedRight,b=this.computedToward,z=0;z<3;++z)f[4*z]=u[z],f[4*z+1]=A[z],f[4*z+2]=b[z];n(f,f,T,w);for(var z=0;z<3;++z)u[z]=f[4*z],A[z]=f[4*z+1];this.up.set(M,u[0],u[1],u[2]),this.right.set(M,A[0],A[1],A[2])}},i.pan=function(M,C,_,T){C=C||0,_=_||0,T=T||0,this.recalcMatrix(M);var f=this.computedMatrix,u=Math.exp(this.computedRadius[0]),A=f[1],b=f[5],z=f[9],I=m(A,b,z);A/=I,b/=I,z/=I;var N=f[0],R=f[4],B=f[8],F=N*A+R*b+B*z;N-=A*F,R-=b*F,B-=z*F;var P=m(N,R,B);N/=P,R/=P,B/=P;var j=N*C+A*_,U=R*C+b*_,Z=B*C+z*_;this.center.move(M,j,U,Z);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+T),this.radius.set(M,Math.log(Q))},i.translate=function(M,C,_,T){this.center.move(M,C||0,_||0,T||0)},i.setMatrix=function(M,C,_,T){var f=1;typeof _=="number"&&(f=_|0),(f<0||f>3)&&(f=1);var u=(f+2)%3,A=(f+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var b=C[f],z=C[f+4],I=C[f+8];if(T){var R=Math.abs(b),B=Math.abs(z),F=Math.abs(I),P=Math.max(R,B,F);R===P?(b=b<0?-1:1,z=I=0):F===P?(I=I<0?-1:1,b=z=0):(z=z<0?-1:1,b=I=0)}else{var N=m(b,z,I);b/=N,z/=N,I/=N}var j=C[u],U=C[u+4],Z=C[u+8],Q=j*b+U*z+Z*I;j-=b*Q,U-=z*Q,Z-=I*Q;var re=m(j,U,Z);j/=re,U/=re,Z/=re;var ae=z*Z-I*U,oe=I*j-b*Z,H=b*U-z*j,X=m(ae,oe,H);ae/=X,oe/=X,H/=X,this.center.jump(M,ve,se,Te),this.radius.idle(M),this.up.jump(M,b,z,I),this.right.jump(M,j,U,Z);var K,G;if(f===2){var Y=C[1],q=C[5],$=C[9],ee=Y*j+q*U+$*Z,ne=Y*ae+q*oe+$*H;Ae<0?K=-Math.PI/2:K=Math.PI/2,G=Math.atan2(ne,ee)}else{var fe=C[2],ye=C[6],xe=C[10],Ae=fe*b+ye*z+xe*I,Me=fe*j+ye*U+xe*Z,Ie=fe*ae+ye*oe+xe*H;K=Math.asin(h(Ae)),G=Math.atan2(Ie,Me)}this.angle.jump(M,G,K),this.recalcMatrix(M);var Ue=C[2],qe=C[6],ke=C[10],ge=this.computedMatrix;r(ge,C);var ue=ge[15],ve=ge[12]/ue,se=ge[13]/ue,Te=ge[14]/ue,Fe=Math.exp(this.computedRadius[0]);this.center.jump(M,ve-Ue*Fe,se-qe*Fe,Te-ke*Fe)},i.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},i.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},i.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},i.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},i.lookAt=function(M,C,_,T){this.recalcMatrix(M),C=C||this.computedEye,_=_||this.computedCenter,T=T||this.computedUp;var f=T[0],u=T[1],A=T[2],b=m(f,u,A);if(!(b<1e-6)){f/=b,u/=b,A/=b;var z=C[0]-_[0],I=C[1]-_[1],N=C[2]-_[2],R=m(z,I,N);if(!(R<1e-6)){z/=R,I/=R,N/=R;var B=this.computedRight,F=B[0],P=B[1],j=B[2],U=f*F+u*P+A*j;F-=U*f,P-=U*u,j-=U*A;var Z=m(F,P,j);if(!(Z<.01&&(F=u*N-A*I,P=A*z-f*N,j=f*I-u*z,Z=m(F,P,j),Z<1e-6))){F/=Z,P/=Z,j/=Z,this.up.set(M,f,u,A),this.right.set(M,F,P,j),this.center.set(M,_[0],_[1],_[2]),this.radius.set(M,Math.log(R));var Q=u*j-A*P,re=A*F-f*j,ae=f*P-u*F,oe=m(Q,re,ae);Q/=oe,re/=oe,ae/=oe;var H=f*z+u*I+A*N,X=F*z+P*I+j*N,K=Q*z+re*I+ae*N,G=Math.asin(h(H)),Y=Math.atan2(K,X),q=this.angle._state,$=q[q.length-1],ee=q[q.length-2];$=$%(2*Math.PI);var ne=Math.abs($+2*Math.PI-Y),fe=Math.abs($-Y),ye=Math.abs($-2*Math.PI-Y);ne0?j.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=w;function S(B){return new Uint8Array(w(B),0,B)}e.mallocUint8=S;function M(B){return new Uint16Array(w(2*B),0,B)}e.mallocUint16=M;function C(B){return new Uint32Array(w(4*B),0,B)}e.mallocUint32=C;function _(B){return new Int8Array(w(B),0,B)}e.mallocInt8=_;function T(B){return new Int16Array(w(2*B),0,B)}e.mallocInt16=T;function f(B){return new Int32Array(w(4*B),0,B)}e.mallocInt32=f;function u(B){return new Float32Array(w(4*B),0,B)}e.mallocFloat32=e.mallocFloat=u;function A(B){return new Float64Array(w(8*B),0,B)}e.mallocFloat64=e.mallocDouble=A;function b(B){return o?new Uint8ClampedArray(w(B),0,B):S(B)}e.mallocUint8Clamped=b;function z(B){return s?new BigUint64Array(w(8*B),0,B):null}e.mallocBigUint64=z;function I(B){return c?new BigInt64Array(w(8*B),0,B):null}e.mallocBigInt64=I;function N(B){return new DataView(w(B),0,B)}e.mallocDataView=N;function R(B){B=a.nextPow2(B);var F=a.log2(B),P=p[F];return P.length>0?P.pop():new n(B)}e.mallocBuffer=R,e.clearCache=function(){for(var F=0;F<32;++F)m.UINT8[F].length=0,m.UINT16[F].length=0,m.UINT32[F].length=0,m.INT8[F].length=0,m.INT16[F].length=0,m.INT32[F].length=0,m.FLOAT[F].length=0,m.DOUBLE[F].length=0,m.BIGUINT64[F].length=0,m.BIGINT64[F].length=0,m.UINT8C[F].length=0,h[F].length=0,p[F].length=0}},1755:function(l){"use strict";"use restrict";l.exports=e;function e(a){this.roots=new Array(a),this.ranks=new Array(a);for(var r=0;r",j="",U=P.length,Z=j.length,Q=R[0]===w||R[0]===C,re=0,ae=-Z;re>-1&&(re=B.indexOf(P,re),!(re===-1||(ae=B.indexOf(j,re+U),ae===-1)||ae<=re));){for(var oe=re;oe=ae)F[oe]=null,B=B.substr(0,oe)+" "+B.substr(oe+1);else if(F[oe]!==null){var H=F[oe].indexOf(R[0]);H===-1?F[oe]+=R:Q&&(F[oe]=F[oe].substr(0,H+1)+(1+parseInt(F[oe][H+1]))+F[oe].substr(H+2))}var X=re+U,K=B.substr(X,ae-X),G=K.indexOf(P);G!==-1?re=G:re=ae+Z}return F}function f(N,R,B){for(var F=R.textAlign||"start",P=R.textBaseline||"alphabetic",j=[1<<30,1<<30],U=[0,0],Z=N.length,Q=0;Q/g,` +`):B=B.replace(/\/g," ");var U="",Z=[];for($=0;$-1?parseInt(se[1+We]):0,mt=Ge>-1?parseInt(Te[1+Ge]):0;gt!==mt&&(Fe=Fe.replace(Me(),"?px "),fe*=Math.pow(.75,mt-gt),Fe=Fe.replace("?px ",Me())),ne+=.25*H*(mt-gt)}if(j.superscripts===!0){var Tt=se.indexOf(w),At=Te.indexOf(w),Kt=Tt>-1?parseInt(se[1+Tt]):0,nr=At>-1?parseInt(Te[1+At]):0;Kt!==nr&&(Fe=Fe.replace(Me(),"?px "),fe*=Math.pow(.75,nr-Kt),Fe=Fe.replace("?px ",Me())),ne-=.25*H*(nr-Kt)}if(j.bolds===!0){var _r=se.indexOf(h)>-1,Zt=Te.indexOf(h)>-1;!_r&&Zt&&(sr?Fe=Fe.replace("italic ","italic bold "):Fe="bold "+Fe),_r&&!Zt&&(Fe=Fe.replace("bold ",""))}if(j.italics===!0){var sr=se.indexOf(g)>-1,Ot=Te.indexOf(g)>-1;!sr&&Ot&&(Fe="italic "+Fe),sr&&!Ot&&(Fe=Fe.replace("italic ",""))}R.font=Fe}for(q=0;q0&&(P=F.size),F.lineSpacing&&F.lineSpacing>0&&(j=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(U.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(U.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(U.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(U.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(U.superscripts=!!F.styletags.superscripts)),B.font=[F.fontStyle,F.fontVariant,F.fontWeight,P+"px",F.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var Z=u(R,B,N,P,j,U);return z(Z,F,P)}},1538:function(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(b){b.permitHostObjects___&&b.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var a=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new r,o=Object.freeze({});if(n.set(o,1),n.get(o)!==1)a=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,m=Object.defineProperty,h=Object.isExtensible,p="weakmap:",g=p+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var i=new ArrayBuffer(25),w=new Uint8Array(i);crypto.getRandomValues(w),g=p+"rand:"+Array.prototype.map.call(w,function(b){return(b%36).toString(36)}).join("")+"___"}function S(b){return!(b.substr(0,p.length)==p&&b.substr(b.length-3)==="___")}if(m(Object,"getOwnPropertyNames",{value:function(z){return c(z).filter(S)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;m(Object,"getPropertyNames",{value:function(z){return M(z).filter(S)}})}function C(b){if(b!==Object(b))throw new TypeError("Not an object: "+b);var z=b[g];if(z&&z.key===b)return z;if(h(b)){z={key:b};try{return m(b,g,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch{return}}}(function(){var b=Object.freeze;m(Object,"freeze",{value:function(R){return C(R),b(R)}});var z=Object.seal;m(Object,"seal",{value:function(R){return C(R),z(R)}});var I=Object.preventExtensions;m(Object,"preventExtensions",{value:function(R){return C(R),I(R)}})})();function _(b){return b.prototype=null,Object.freeze(b)}var T=!1;function f(){!T&&typeof console<"u"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,A=function(){this instanceof A||f();var b=[],z=[],I=u++;function N(P,j){var U,Z=C(P);return Z?I in Z?Z[I]:j:(U=b.indexOf(P),U>=0?z[U]:j)}function R(P){var j=C(P);return j?I in j:b.indexOf(P)>=0}function B(P,j){var U,Z=C(P);return Z?Z[I]=j:(U=b.indexOf(P),U>=0?z[U]=j:(U=b.length,z[U]=j,b[U]=P)),this}function F(P){var j=C(P),U,Z;return j?I in j&&delete j[I]:(U=b.indexOf(P),U<0?!1:(Z=b.length-1,b[U]=void 0,z[U]=z[Z],b[U]=b[Z],b.length=Z,z.length=Z,!0))}return Object.create(A.prototype,{get___:{value:_(N)},has___:{value:_(R)},set___:{value:_(B)},delete___:{value:_(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(z,I){return this.get___(z,I)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,I){return this.set___(z,I)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof r=="function"?function(){a&&typeof Proxy<"u"&&(Proxy=void 0);function b(){this instanceof A||f();var z=new r,I=void 0,N=!1;function R(j,U){return I?z.has(j)?z.get(j):I.get___(j,U):z.get(j,U)}function B(j){return z.has(j)||(I?I.has___(j):!1)}var F;a?F=function(j,U){return z.set(j,U),z.has(j)||(I||(I=new A),I.set(j,U)),this}:F=function(j,U){if(N)try{z.set(j,U)}catch{I||(I=new A),I.set___(j,U)}else z.set(j,U);return this};function P(j){var U=!!z.delete(j);return I&&I.delete___(j)||U}return Object.create(A.prototype,{get___:{value:_(R)},has___:{value:_(B)},set___:{value:_(F)},delete___:{value:_(P)},permitHostObjects___:{value:_(function(j){if(j===t)N=!0;else throw new Error("bogus call to permitHostObjects___")})}})}b.prototype=A.prototype,l.exports=b,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=A)})()},236:function(l,e,t){var a=t(8284);l.exports=r;function r(){var n={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var s=o.valueOf(n);return s&&s.identity===n?s:a(o,n)}}},8284:function(l){l.exports=e;function e(t,a){var r={identity:a},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(o){return o!==a?n.apply(this,arguments):r},writable:!0}),r}},606:function(l,e,t){var a=t(236);l.exports=r;function r(){var n=a();return{get:function(o,s){var c=n(o);return c.hasOwnProperty("value")?c.value:s},set:function(o,s){return n(o).value=s,this},has:function(o){return"value"in n(o)},delete:function(o){return delete n(o).value}}}},3349:function(l){"use strict";function e(){return function(s,c,m,h,p,g){var i=s[0],w=m[0],S=[0],M=w;h|=0;var C=0,_=w;for(C=0;C=0!=f>=0&&p.push(S[0]+.5+.5*(T+f)/(T-f))}h+=_,++S[0]}}}function t(){return e()}var a=t;function r(s){var c={};return function(h,p,g){var i=h.dtype,w=h.order,S=[i,w.join()].join(),M=c[S];return M||(c[S]=M=s([i,w])),M(h.shape.slice(0),h.data,h.stride,h.offset|0,p,g)}}function n(s){return r(a.bind(void 0,s))}function o(s){return n({funcName:s.funcName})}l.exports=o({funcName:"zeroCrossings"})},781:function(l,e,t){"use strict";l.exports=r;var a=t(3349);function r(n,o){var s=[];return o=+o||0,a(n.hi(n.shape[0]-1),s,o),s}},7790:function(){}},x={};function E(l){var e=x[l];if(e!==void 0)return e.exports;var t=x[l]={id:l,loaded:!1,exports:{}};return v[l].call(t.exports,t,t.exports,E),t.loaded=!0,t.exports}(function(){E.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){E.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var k=E(1964);V.exports=k})()}}),Td=Ee({"src/lib/str2rgbarray.js"(J,V){"use strict";var{normalize:v}=Qa();function x(E){return E?v(E):[0,0,0,1]}V.exports=x}}),Ad=Ee({"src/lib/gl_format_color.js"(J,V){"use strict";var v=mi(),x=pl(),E=Qa(),k=rs().defaultLine,l=vs().isArrayOrTypedArray,e=E.normalize(k),t=1;function a(c,m){return[c[0],c[1],c[2],c[3]*m]}function r(c){return v(c)||!E.isChannelArray(c)&&!E.isValid(c)?e:E.normalize(c)}function n(c){return v(c)?c:t}function o(c,m,h){var p=c.color;p&&p._inputArray&&(p=p._inputArray);var g=l(p),i=l(m),w=x.extractOpts(c),S=[],M,C,_,T,f;if(w.colorscale!==void 0?M=x.makeColorScaleFuncFromTrace(c):M=r,g?C=(A,b)=>A[b]===void 0?e:w.colorscale===void 0?M(A[b]):E.normalize(M(A[b])):C=r,i?_=function(A,b){return A[b]===void 0?t:n(A[b])}:_=n,g||i)for(var u=0;u0){var p=a.c2l(m);a._lowerLogErrorBound||(a._lowerLogErrorBound=p),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,p)}}else n[o]=[-s[0]*t,s[1]*t]}return n}function E(l){for(var e=0;e-1?-1:z.indexOf("right")>-1?1:0}function S(z){return z==null?0:z.indexOf("top")>-1?-1:z.indexOf("bottom")>-1?1:0}function M(z){var I=0,N=0,R=[I,N];if(Array.isArray(z))for(var B=0;B=0){var Z=g(j.position,j.delaunayColor,j.delaunayAxis);Z.opacity=z.opacity,this.delaunayMesh?this.delaunayMesh.update(Z):(Z.gl=I,this.delaunayMesh=k(Z),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},p.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function b(z,I){var N=new h(z,I.uid);return N.update(I),N}V.exports=b}}),J3=Ee({"src/traces/scatter3d/attributes.js"(J,V){"use strict";var v=ou(),x=Xs(),E=$s(),k=Fl().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Cs(),a=ia(),r=K3(),n=My(),o=vo().extendFlat,s=El().overrideAll,c=(Ev(),ra(Hd)).default,m=v.line,h=v.marker,p=h.line,g=o({width:m.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},E("line"));function i(S){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var w=V.exports=s({x:v.x,y:v.y,z:{valType:"data_array"},text:o({},v.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:o({},v.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z"),mode:o({},v.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:i("x"),y:i("y"),z:i("z")},connectgaps:v.connectgaps,line:g,marker:o({symbol:{valType:"enumerated",values:c(n),dflt:"circle",arrayOk:!0},size:o({},h.size,{dflt:8}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:o({},h.opacity,{arrayOk:!1}),colorbar:h.colorbar,line:o({width:o({},p.width,{arrayOk:!1})},E("marker.line"))},E("marker")),textposition:o({},v.textposition,{dflt:"top center"}),textfont:x({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:a.opacity,hoverinfo:o({},a.hoverinfo)},"calc","nested");w.x.editType=w.y.editType=w.z.editType="calc+clearAxisTypes"}}),t8=Ee({"src/traces/scatter3d/defaults.js"(J,V){"use strict";var v=Ri(),x=Vr(),E=al(),k=gh(),l=Rh(),e=Fh(),t=J3();V.exports=function(n,o,s,c){function m(C,_){return x.coerce(n,o,t,C,_)}var h=a(n,o,m,c);if(!h){o.visible=!1;return}m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),m("zhoverformat"),m("mode"),E.hasMarkers(o)&&k(n,o,s,c,m,{noAngle:!0,noLineDash:!0,noSelect:!0}),E.hasLines(o)&&(m("connectgaps"),l(n,o,s,c,m)),E.hasText(o)&&(m("texttemplate"),m("texttemplatefallback"),e(n,o,c,m,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var p=(o.line||{}).color,g=(o.marker||{}).color;m("surfaceaxis")>=0&&m("surfacecolor",p||g);for(var i=["x","y","z"],w=0;w<3;++w){var S="projection."+i[w];m(S+".show")&&(m(S+".opacity"),m(S+".scale"))}var M=v.getComponentMethod("errorbars","supplyDefaults");M(n,o,p||g||s,{axis:"z"}),M(n,o,p||g||s,{axis:"y",inherit:"z"}),M(n,o,p||g||s,{axis:"x",inherit:"z"})};function a(r,n,o,s){var c=0,m=o("x"),h=o("y"),p=o("z"),g=v.getComponentMethod("calendars","handleTraceDefaults");return g(r,n,["x","y","z"],s),m&&h&&p&&(c=Math.min(m.length,h.length,p.length),n._length=n._xlength=n._ylength=n._zlength=c),c}}}),r8=Ee({"src/traces/scatter3d/calc.js"(J,V){"use strict";var v=$h(),x=yh();V.exports=function(k,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return v(e,l),x(k,l),e}}}),n8=Ee({"node_modules/get-canvas-context/index.js"(J,V){V.exports=v;function v(x,E){if(typeof x!="string")throw new TypeError("must specify type string");if(E=E||{},typeof document>"u"&&!E.canvas)return null;var k=E.canvas||document.createElement("canvas");typeof E.width=="number"&&(k.width=E.width),typeof E.height=="number"&&(k.height=E.height);var l=E,e;try{var t=[x];x.indexOf("webgl")===0&&t.push("experimental-"+x);for(var a=0;a/g," "));o[s]=p,c.tickmode=m}}a.ticks=o;for(var s=0;s<3;++s){k[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var g=0;g<2;++g)a.bounds[g][s]=t.glplot.bounds[g][s]}t.contourLevels=l(o)}}}),l8=Ee({"src/plots/gl3d/scene.js"(J,V){"use strict";var v=Xc().gl_plot3d,x=v.createCamera,E=v.createScene,k=a8(),l=Fg(),e=Ri(),t=Vr(),a=t.preserveDrawingBuffer(),r=uo(),n=$l(),o=Td(),s=Q3(),c=fx(),m=i8(),h=o8(),p=s8(),g=Ph().applyAutorangeOptions,i,w,S=!1;function M(N,R){var B=document.createElement("div"),F=N.container;this.graphDiv=N.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",B.appendChild(P),this.svgContainer=P,B.id=N.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",F.appendChild(B),this.fullLayout=R,this.id=N.id||"scene",this.fullSceneLayout=R[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(R,R[this.id]),this.spikeOptions=h(R[this.id]),this.container=B,this.staticMode=!!N.staticPlot,this.pixelRatio=this.pixelRatio||N.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var N=this,R={canvas:N.canvas,gl:N.gl,glOptions:{preserveDrawingBuffer:a,premultipliedAlpha:!0,antialias:!0},container:N.container,axes:N.axesOptions,spikes:N.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:N.camera,pixelRatio:N.pixelRatio};if(N.staticMode){if(!w&&(i=document.createElement("canvas"),w=k({canvas:i,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!w))throw new Error("error creating static canvas/context for image server");R.gl=w,R.canvas=i}return R};var _=!0;C.tryCreatePlot=function(){var N=this,R=N.prepareOptions(),B=!0;try{N.glplot=E(R)}catch{if(N.staticMode||!_||a)B=!1;else{t.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{a=R.glOptions.preserveDrawingBuffer=!0,N.glplot=E(R)}catch{a=R.glOptions.preserveDrawingBuffer=!1,B=!1}}}return _=!1,B},C.initializeGLCamera=function(){var N=this,R=N.fullSceneLayout.camera,B=R.projection.type==="orthographic";N.camera=x(N.container,{center:[R.center.x,R.center.y,R.center.z],eye:[R.eye.x,R.eye.y,R.eye.z],up:[R.up.x,R.up.y,R.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var N=this;N.initializeGLCamera();var R=N.tryCreatePlot();if(!R)return s(N);N.traces={},N.make4thDimension();var B=N.graphDiv,F=B.layout,P=function(){var U={};return N.isCameraChanged(F)&&(U[N.id+".camera"]=N.getCamera()),N.isAspectChanged(F)&&(U[N.id+".aspectratio"]=N.glplot.getAspectratio(),F[N.id].aspectmode!=="manual"&&(N.fullSceneLayout.aspectmode=F[N.id].aspectmode=U[N.id+".aspectmode"]="manual")),U},j=function(U){if(U.fullSceneLayout.dragmode!==!1){var Z=P();U.saveLayout(F),U.graphDiv.emit("plotly_relayout",Z)}};return N.glplot.canvas&&(N.glplot.canvas.addEventListener("mouseup",function(){j(N)}),N.glplot.canvas.addEventListener("touchstart",function(){S=!0}),N.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(N.camera._ortho){var Z=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=N.glplot.getAspectratio();N.glplot.setAspectratio({x:Z*Q.x,y:Z*Q.y,z:Z*Q.z})}j(N)}},l?{passive:!1}:!1),N.glplot.canvas.addEventListener("mousemove",function(){if(N.fullSceneLayout.dragmode!==!1&&N.camera.mouseListener.buttons!==0){var U=P();N.graphDiv.emit("plotly_relayouting",U)}}),N.staticMode||N.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:N.id})},!1)),N.glplot.oncontextloss=function(){N.recoverContext()},N.glplot.onrender=function(){N.render()},!0},C.render=function(){var N=this,R=N.graphDiv,B,F=N.svgContainer,P=N.container.getBoundingClientRect();R._fullLayout._calcInverseTransform(R);var j=R._fullLayout._invScaleX,U=R._fullLayout._invScaleY,Z=P.width*j,Q=P.height*U;F.setAttributeNS(null,"viewBox","0 0 "+Z+" "+Q),F.setAttributeNS(null,"width",Z),F.setAttributeNS(null,"height",Q),p(N),N.glplot.axes.update(N.axesOptions);for(var re=Object.keys(N.traces),ae=null,oe=N.glplot.selection,H=0;H")):B.type==="isosurface"||B.type==="volume"?(q.valueLabel=r.hoverLabelText(N._mockAxis,N._mockAxis.d2l(oe.traceCoordinate[3]),B.valuehoverformat),ye.push("value: "+q.valueLabel),oe.textLabel&&ye.push(oe.textLabel),fe=ye.join("
")):fe=oe.textLabel;var xe={x:oe.traceCoordinate[0],y:oe.traceCoordinate[1],z:oe.traceCoordinate[2],data:G._input,fullData:G,curveNumber:G.index,pointNumber:Y};n.appendArrayPointValue(xe,G,Y),B._module.eventData&&(xe=G._module.eventData(xe,oe,G,{},Y));var Ae={points:[xe]};if(N.fullSceneLayout.hovermode){var Me=[];n.loneHover({trace:G,x:(.5+.5*K[0]/K[3])*Z,y:(.5-.5*K[1]/K[3])*Q,xLabel:q.xLabel,yLabel:q.yLabel,zLabel:q.zLabel,text:fe,name:ae.name,color:n.castHoverOption(G,Y,"bgcolor")||ae.color,borderColor:n.castHoverOption(G,Y,"bordercolor"),fontFamily:n.castHoverOption(G,Y,"font.family"),fontSize:n.castHoverOption(G,Y,"font.size"),fontColor:n.castHoverOption(G,Y,"font.color"),nameLength:n.castHoverOption(G,Y,"namelength"),textAlign:n.castHoverOption(G,Y,"align"),hovertemplate:t.castOption(G,Y,"hovertemplate"),hovertemplateLabels:t.extendFlat({},xe,q),eventData:[xe]},{container:F,gd:R,inOut_bbox:Me}),xe.bbox=Me[0]}oe.distance<5&&(oe.buttons||S)?R.emit("plotly_click",Ae):R.emit("plotly_hover",Ae),this.oldEventData=Ae}else n.loneUnhover(F),this.oldEventData&&R.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;N.drawAnnotations(N)},C.recoverContext=function(){var N=this;N.glplot.dispose();var R=function(){if(N.glplot.gl.isContextLost()){requestAnimationFrame(R);return}if(!N.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}N.plot.apply(N,N.plotArgs)};requestAnimationFrame(R)};var T=["xaxis","yaxis","zaxis"];function f(N,R,B){for(var F=N.fullSceneLayout,P=0;P<3;P++){var j=T[P],U=j.charAt(0),Z=F[j],Q=R[U],re=R[U+"calendar"],ae=R["_"+U+"length"];if(!t.isArrayOrTypedArray(Q))B[0][P]=Math.min(B[0][P],0),B[1][P]=Math.max(B[1][P],ae-1);else for(var oe,H=0;H<(ae||Q.length);H++)if(t.isArrayOrTypedArray(Q[H]))for(var X=0;XG[1][U])G[0][U]=-1,G[1][U]=1;else{var Ue=G[1][U]-G[0][U];G[0][U]-=Ue/32,G[1][U]+=Ue/32}if($=[G[0][U],G[1][U]],$=g($,Q),G[0][U]=$[0],G[1][U]=$[1],Q.isReversed()){var qe=G[0][U];G[0][U]=G[1][U],G[1][U]=qe}}else $=Q.range,G[0][U]=Q.r2l($[0]),G[1][U]=Q.r2l($[1]);G[0][U]===G[1][U]&&(G[0][U]-=1,G[1][U]+=1),Y[U]=G[1][U]-G[0][U],Q.range=[G[0][U],G[1][U]],Q.limitRange(),F.glplot.setBounds(U,{min:Q.range[0]*X[U],max:Q.range[1]*X[U]})}var ke,ge=ae.aspectmode;if(ge==="cube")ke=[1,1,1];else if(ge==="manual"){var ue=ae.aspectratio;ke=[ue.x,ue.y,ue.z]}else if(ge==="auto"||ge==="data"){var ve=[1,1,1];for(U=0;U<3;++U){Q=ae[T[U]],re=Q.type;var se=q[re];ve[U]=Math.pow(se.acc,1/se.count)/X[U]}ge==="data"||Math.max.apply(null,ve)/Math.min.apply(null,ve)<=4?ke=ve:ke=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ae.aspectratio.x=oe.aspectratio.x=ke[0],ae.aspectratio.y=oe.aspectratio.y=ke[1],ae.aspectratio.z=oe.aspectratio.z=ke[2],F.glplot.setAspectratio(ae.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:ae.aspectratio.x,y:ae.aspectratio.y,z:ae.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=ae.aspectmode);var Te=ae.domain||null,Fe=R._size||null;if(Te&&Fe){var We=F.container.style;We.position="absolute",We.left=Fe.l+Te.x[0]*Fe.w+"px",We.top=Fe.t+(1-Te.y[1])*Fe.h+"px",We.width=Fe.w*(Te.x[1]-Te.x[0])+"px",We.height=Fe.h*(Te.y[1]-Te.y[0])+"px"}F.glplot.redraw()}},C.destroy=function(){var N=this;N.glplot&&(N.camera.mouseListener.enabled=!1,N.container.removeEventListener("wheel",N.camera.wheelListener),N.camera=null,N.glplot.dispose(),N.container.parentNode.removeChild(N.container),N.glplot=null)};function A(N){return[[N.eye.x,N.eye.y,N.eye.z],[N.center.x,N.center.y,N.center.z],[N.up.x,N.up.y,N.up.z]]}function b(N){return{up:{x:N.up[0],y:N.up[1],z:N.up[2]},center:{x:N.center[0],y:N.center[1],z:N.center[2]},eye:{x:N.eye[0],y:N.eye[1],z:N.eye[2]},projection:{type:N._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var N=this;return N.camera.view.recalcMatrix(N.camera.view.lastT()),b(N.camera)},C.setViewport=function(N){var R=this,B=N.camera;R.camera.lookAt.apply(this,A(B)),R.glplot.setAspectratio(N.aspectratio);var F=B.projection.type==="orthographic",P=R.camera._ortho;F!==P&&(R.glplot.redraw(),R.glplot.clearRGBA(),R.glplot.dispose(),R.initializeGLPlot())},C.isCameraChanged=function(N){var R=this,B=R.getCamera(),F=t.nestedProperty(N,R.id+".camera"),P=F.get();function j(re,ae,oe,H){var X=["up","center","eye"],K=["x","y","z"];return ae[X[oe]]&&re[X[oe]][K[H]]===ae[X[oe]][K[H]]}var U=!1;if(P===void 0)U=!0;else{for(var Z=0;Z<3;Z++)for(var Q=0;Q<3;Q++)if(!j(B,P,Z,Q)){U=!0;break}(!P.projection||B.projection&&B.projection.type!==P.projection.type)&&(U=!0)}return U},C.isAspectChanged=function(N){var R=this,B=R.glplot.getAspectratio(),F=t.nestedProperty(N,R.id+".aspectratio"),P=F.get();return P===void 0||P.x!==B.x||P.y!==B.y||P.z!==B.z},C.saveLayout=function(N){var R=this,B=R.fullLayout,F,P,j,U,Z,Q,re=R.isCameraChanged(N),ae=R.isAspectChanged(N),oe=re||ae;if(oe){var H={};if(re&&(F=R.getCamera(),P=t.nestedProperty(N,R.id+".camera"),j=P.get(),H[R.id+".camera"]=j),ae&&(U=R.glplot.getAspectratio(),Z=t.nestedProperty(N,R.id+".aspectratio"),Q=Z.get(),H[R.id+".aspectratio"]=Q),e.call("_storeDirectGUIEdit",N,B._preGUI,H),re){P.set(F);var X=t.nestedProperty(B,R.id+".camera");X.set(F)}if(ae){Z.set(U);var K=t.nestedProperty(B,R.id+".aspectratio");K.set(U),R.glplot.redraw()}}return oe},C.updateFx=function(N,R){var B=this,F=B.camera;if(F)if(N==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(N==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var P=B.graphDiv,j=P._fullLayout,U=B.fullSceneLayout.camera,Z=U.up.x,Q=U.up.y,re=U.up.z;if(re/Math.sqrt(Z*Z+Q*Q+re*re)<.999){var ae=B.id+".camera.up",oe={x:0,y:0,z:1},H={};H[ae]=oe;var X=P.layout;e.call("_storeDirectGUIEdit",X,j._preGUI,H),U.up=oe,t.nestedProperty(X,ae).set(oe)}}else F.keyBindingMode=N;B.fullSceneLayout.hovermode=R};function z(N,R,B){for(var F=0,P=B-1;F0)for(var Z=255/U,Q=0;Q<3;++Q)N[j+Q]=Math.min(Z*N[j+Q],255)}}C.toImage=function(N){var R=this;N||(N="png"),R.staticMode&&R.container.appendChild(i),R.glplot.redraw();var B=R.glplot.gl,F=B.drawingBufferWidth,P=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var j=new Uint8Array(F*P*4);B.readPixels(0,0,F,P,B.RGBA,B.UNSIGNED_BYTE,j),z(j,F,P),I(j,F,P);var U=document.createElement("canvas");U.width=F,U.height=P;var Z=U.getContext("2d",{willReadFrequently:!0}),Q=Z.createImageData(F,P);Q.data.set(j),Z.putImageData(Q,0,0);var re;switch(N){case"jpeg":re=U.toDataURL("image/jpeg");break;case"webp":re=U.toDataURL("image/webp");break;default:re=U.toDataURL("image/png")}return R.staticMode&&R.container.removeChild(i),re},C.setConvert=function(){for(var N=this,R=0;R<3;R++){var B=N.fullSceneLayout[T[R]];r.setConvert(B,N.fullLayout),B.setScale=t.noop}},C.make4thDimension=function(){var N=this,R=N.graphDiv,B=R._fullLayout;N._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(N._mockAxis,B)},V.exports=M}}),u8=Ee({"src/plots/gl3d/layout/attributes.js"(J,V){"use strict";V.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),ew=Ee({"src/plots/gl3d/layout/axis_attributes.js"(J,V){"use strict";var v=Qa(),x=Gc(),E=vo().extendFlat,k=El().overrideAll;V.exports=k({visible:x.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:v.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:x.color,categoryorder:x.categoryorder,categoryarray:x.categoryarray,title:{text:x.title.text,font:x.title.font},type:E({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorange:x.autorange,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},rangemode:x.rangemode,minallowed:x.minallowed,maxallowed:x.maxallowed,range:E({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,mirror:x.mirror,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,tickfont:x.tickfont,tickangle:x.tickangle,tickprefix:x.tickprefix,showtickprefix:x.showtickprefix,ticksuffix:x.ticksuffix,showticksuffix:x.showticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickformat:x.tickformat,tickformatstops:x.tickformatstops,hoverformat:x.hoverformat,showline:x.showline,linecolor:x.linecolor,linewidth:x.linewidth,showgrid:x.showgrid,gridcolor:E({},x.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:x.gridwidth,zeroline:x.zeroline,zerolinecolor:x.zerolinecolor,zerolinewidth:x.zerolinewidth},"plot","from-root")}}),tw=Ee({"src/plots/gl3d/layout/layout_attributes.js"(J,V){"use strict";var v=ew(),x=kl().attributes,E=vo().extendFlat,k=Vr().counterRegex;function l(e,t,a){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:a,editType:"camera"},editType:"camera"}}V.exports={_arrayAttrRegexps:[k("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:E(l(0,0,1),{}),center:E(l(0,0,0),{}),eye:E(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:x({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:v,yaxis:v,zaxis:v,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"}}}),c8=Ee({"src/plots/gl3d/layout/axis_defaults.js"(J,V){"use strict";var v=Qa(),x=Vr(),E=xs(),k=ew(),l=ux(),e=K0(),t=["xaxis","yaxis","zaxis"],a=100*136/187;V.exports=function(n,o,s){var c,m;function h(i,w){return x.coerce(c,m,k,i,w)}for(var p=0;p1;function h(p){if(!m){var g=v.validate(o[p],e[p]);if(g)return o[p]}}k(o,s,c,{type:a,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:h,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(n,o,s,c){for(var m=s("bgcolor"),h=x.combine(m,c.paper_bgcolor),p=["up","center","eye"],g=0;g.999)&&(C="turntable")}else C="turntable";s("dragmode",C),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),ov=Ee({"src/plots/gl3d/index.js"(J){"use strict";var V=El().overrideAll,v=Ei(),x=l8(),E=uf().getSubplotData,k=Vr(),l=mh(),e="gl3d",t="scene";J.name=e,J.attr=t,J.idRoot=t,J.idRegex=J.attrRegex=k.counterRegex("scene"),J.attributes=u8(),J.layoutAttributes=tw(),J.baseLayoutAttrOverrides=V({hoverlabel:v.hoverlabel},"plot","nested"),J.supplyLayoutDefaults=f8(),J.plot=function(r){for(var n=r._fullLayout,o=r._fullData,s=n._subplots[e],c=0;c0){z=c[I];break}return z}function g(A,b){if(!(A<1||b<1)){for(var z=h(A),I=h(b),N=1,R=0;RM;)I--,I/=p(I),I++,I1?N:1};function C(A,b,z){var I=z[8]+z[2]*b[0]+z[5]*b[1];return A[0]=(z[6]+z[0]*b[0]+z[3]*b[1])/I,A[1]=(z[7]+z[1]*b[0]+z[4]*b[1])/I,A}function _(A,b,z){return T(A,b,C,z),A}function T(A,b,z,I){for(var N=[0,0],R=A.shape[0],B=A.shape[1],F=0;F0&&this.contourStart[I]!==null&&this.contourEnd[I]!==null&&this.contourEnd[I]>this.contourStart[I]))for(b[I]=!0,N=this.contourStart[I];NQ&&(this.minValues[j]=Q),this.maxValues[j]c&&(a.isomin=null,a.isomax=null);var m=o("x"),h=o("y"),p=o("z"),g=o("value");if(!m||!m.length||!h||!h.length||!p||!p.length||!g||!g.length){a.visible=!1;return}var i=x.getComponentMethod("calendars","handleTraceDefaults");i(t,a,["x","y","z"],n),o("valuehoverformat"),["x","y","z"].forEach(function(C){o(C+"hoverformat");var _="caps."+C,T=o(_+".show");T&&o(_+".fill");var f="slices."+C,u=o(f+".show");u&&(o(f+".fill"),o(f+".locations"))});var w=o("spaceframe.show");w&&o("spaceframe.fill");var S=o("surface.show");S&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("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(C){o(C)}),k(t,a,n,o,{prefix:"",cLetter:"c"}),a._length=null}V.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),Ey=Ee({"src/traces/streamtube/calc.js"(J,V){"use strict";var v=Vr(),x=Sf();function E(t,a){a._len=Math.min(a.u.length,a.v.length,a.w.length,a.x.length,a.y.length,a.z.length),a._u=e(a.u,a._len),a._v=e(a.v,a._len),a._w=e(a.w,a._len),a._x=e(a.x,a._len),a._y=e(a.y,a._len),a._z=e(a.z,a._len);var r=k(a);a._gridFill=r.fill,a._Xs=r.Xs,a._Ys=r.Ys,a._Zs=r.Zs,a._len=r.len;var n=0,o,s,c;a.starts&&(o=e(a.starts.x||[]),s=e(a.starts.y||[]),c=e(a.starts.z||[]),n=Math.min(o.length,s.length,c.length)),a._startsX=o||[],a._startsY=s||[],a._startsZ=c||[];var m=0,h=1/0,p;for(p=0;p1&&(u=a[o-1],b=r[o-1],I=n[o-1]),s=0;su?"-":"+")+"x"),M=M.replace("y",(A>b?"-":"+")+"y"),M=M.replace("z",(z>I?"-":"+")+"z");var F=function(){o=0,N=[],R=[],B=[]};(!o||o0;h--){var p=Math.min(m[h],m[h-1]),g=Math.max(m[h],m[h-1]);if(g>p&&p-1}function ee(Ot,vt){return Ot===null?vt:Ot}function ne(Ot,vt,ht){re();var Re=[vt],Be=[ht];if(G>=1)Re=[vt],Be=[ht];else if(G>0){var He=q(vt,ht);Re=He.xyzv,Be=He.abc}for(var $e=0;$e-1?ht[Je]:Q(Mt,dt,Dt);Vt>-1?Ze[Je]=Vt:Ze[Je]=oe(Mt,dt,Dt,ee(Ot,Ct))}H(Ze[0],Ze[1],Ze[2])}}function fe(Ot,vt,ht){var Re=function(Be,He,$e){ne(Ot,[vt[Be],vt[He],vt[$e]],[ht[Be],ht[He],ht[$e]])};Re(0,1,2),Re(2,3,0)}function ye(Ot,vt,ht){var Re=function(Be,He,$e){ne(Ot,[vt[Be],vt[He],vt[$e]],[ht[Be],ht[He],ht[$e]])};Re(0,1,2),Re(3,0,1),Re(2,3,0),Re(1,2,3)}function xe(Ot,vt,ht,Re){var Be=Ot[3];BeRe&&(Be=Re);for(var He=(Ot[3]-Be)/(Ot[3]-vt[3]+1e-9),$e=[],Ze=0;Ze<4;Ze++)$e[Ze]=(1-He)*Ot[Ze]+He*vt[Ze];return $e}function Ae(Ot,vt,ht){return Ot>=vt&&Ot<=ht}function Me(Ot){var vt=.001*(F-B);return Ot>=B-vt&&Ot<=F+vt}function Ie(Ot){for(var vt=[],ht=0;ht<4;ht++){var Re=Ot[ht];vt.push([c._x[Re],c._y[Re],c._z[Re],c._value[Re]])}return vt}var Ue=3;function qe(Ot,vt,ht,Re,Be,He){He||(He=1),ht=[-1,-1,-1];var $e=!1,Ze=[Ae(vt[0][3],Re,Be),Ae(vt[1][3],Re,Be),Ae(vt[2][3],Re,Be)];if(!Ze[0]&&!Ze[1]&&!Ze[2])return!1;var Je=function(dt,Dt,Ct){return Me(Dt[0][3])&&Me(Dt[1][3])&&Me(Dt[2][3])?(ne(dt,Dt,Ct),!0):HeZe?[N,He]:[He,R];Tt(vt,Je[0],Je[1])}}var Mt=[[Math.min(B,R),Math.max(B,R)],[Math.min(N,F),Math.max(N,F)]];["x","y","z"].forEach(function(dt){for(var Dt=[],Ct=0;Ct0&&($t.push(cr.id),dt==="x"?It.push([cr.distRatio,0,0]):dt==="y"?It.push([0,cr.distRatio,0]):It.push([0,0,cr.distRatio]))}else dt==="x"?on=_r(1,u-1):dt==="y"?on=_r(1,A-1):on=_r(1,b-1);$t.length>0&&(dt==="x"?Dt[Vt]=At(Ot,$t,Ht,Wt,It,Dt[Vt]):dt==="y"?Dt[Vt]=Kt(Ot,$t,Ht,Wt,It,Dt[Vt]):Dt[Vt]=nr(Ot,$t,Ht,Wt,It,Dt[Vt]),Vt++),on.length>0&&(dt==="x"?Dt[Vt]=Fe(Ot,on,Ht,Wt,Dt[Vt]):dt==="y"?Dt[Vt]=We(Ot,on,Ht,Wt,Dt[Vt]):Dt[Vt]=Ge(Ot,on,Ht,Wt,Dt[Vt]),Vt++)}var fr=c.caps[dt];fr.show&&fr.fill&&(Y(fr.fill),dt==="x"?Dt[Vt]=Fe(Ot,[0,u-1],Ht,Wt,Dt[Vt]):dt==="y"?Dt[Vt]=We(Ot,[0,A-1],Ht,Wt,Dt[Vt]):Dt[Vt]=Ge(Ot,[0,b-1],Ht,Wt,Dt[Vt]),Vt++)}}),S===0&&ae(),c._meshX=P,c._meshY=j,c._meshZ=U,c._meshIntensity=Z,c._Xs=_,c._Ys=T,c._Zs=f}return sr(),c}function s(c,m){var h=c.glplot.gl,p=v({gl:h}),g=new a(c,p,m.uid);return p._trace=g,g.update(m),c.glplot.add(p),g}V.exports={findNearestOnAxis:t,generateIsoMeshes:o,createIsosurfaceTrace:s}}}),y8=Ee({"src/traces/isosurface/index.js"(J,V){"use strict";V.exports={attributes:Sy(),supplyDefaults:nw().supplyDefaults,calc:aw(),colorbar:{min:"cmin",max:"cmax"},plot:ky().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:ov(),categories:["gl3d","showLegend"],meta:{}}}}),_8=Ee({"lib/isosurface.js"(J,V){"use strict";V.exports=y8()}}),iw=Ee({"src/traces/volume/attributes.js"(J,V){"use strict";var v=$s(),x=Sy(),E=Lm(),k=ia(),l=vo().extendFlat,e=El().overrideAll,t=V.exports=e(l({x:x.x,y:x.y,z:x.z,value:x.value,isomin:x.isomin,isomax:x.isomax,surface:x.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:x.slices,caps:x.caps,text:x.text,hovertext:x.hovertext,xhoverformat:x.xhoverformat,yhoverformat:x.yhoverformat,zhoverformat:x.zhoverformat,valuehoverformat:x.valuehoverformat,hovertemplate:x.hovertemplate,hovertemplatefallback:x.hovertemplatefallback},v("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:x.colorbar,opacity:x.opacity,opacityscale:E.opacityscale,lightposition:x.lightposition,lighting:x.lighting,flatshading:x.flatshading,contour:x.contour,hoverinfo:l({},k.hoverinfo),showlegend:l({},k.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),b8=Ee({"src/traces/volume/defaults.js"(J,V){"use strict";var v=Vr(),x=iw(),E=nw().supplyIsoDefaults,k=rw().opacityscaleDefaults;V.exports=function(e,t,a,r){function n(o,s){return v.coerce(e,t,x,o,s)}E(e,t,a,r,n),k(e,t,r,n)}}}),x8=Ee({"src/traces/volume/convert.js"(J,V){"use strict";var v=Xc().gl_mesh3d,x=Ad().parseColorScale,E=Vr().isArrayOrTypedArray,k=Td(),l=pl().extractOpts,e=s0(),t=ky().findNearestOnAxis,a=ky().generateIsoMeshes;function r(s,c,m){this.scene=s,this.uid=m,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var n=r.prototype;n.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,m=this.data._meshX[c],h=this.data._meshY[c],p=this.data._meshZ[c],g=this.data._Ys.length,i=this.data._Zs.length,w=t(m,this.data._Xs).id,S=t(h,this.data._Ys).id,M=t(p,this.data._Zs).id,C=s.index=M+i*S+i*g*w;s.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var _=this.data.hovertext||this.data.text;return E(_)&&_[C]!==void 0?s.textLabel=_[C]:_&&(s.textLabel=_),!0}},n.update=function(s){var c=this.scene,m=c.fullSceneLayout;this.data=a(s);function h(S,M,C,_){return M.map(function(T){return S.d2l(T,0,_)*C})}var p=e(h(m.xaxis,s._meshX,c.dataScale[0],s.xcalendar),h(m.yaxis,s._meshY,c.dataScale[1],s.ycalendar),h(m.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),g=e(s._meshI,s._meshJ,s._meshK),i={positions:p,cells:g,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:k(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},w=l(s);i.vertexIntensity=s._meshIntensity,i.vertexIntensityBounds=[w.min,w.max],i.colormap=x(s),this.mesh.update(i)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(s,c){var m=s.glplot.gl,h=v({gl:m}),p=new r(s,h,c.uid);return h._trace=p,p.update(c),s.glplot.add(h),p}V.exports=o}}),w8=Ee({"src/traces/volume/index.js"(J,V){"use strict";V.exports={attributes:iw(),supplyDefaults:b8(),calc:aw(),colorbar:{min:"cmin",max:"cmax"},plot:x8(),moduleType:"trace",name:"volume",basePlotModule:ov(),categories:["gl3d","showLegend"],meta:{}}}}),T8=Ee({"lib/volume.js"(J,V){"use strict";V.exports=w8()}}),A8=Ee({"src/traces/mesh3d/defaults.js"(J,V){"use strict";var v=Ri(),x=Vr(),E=Cc(),k=o0();V.exports=function(e,t,a,r){function n(h,p){return x.coerce(e,t,k,h,p)}function o(h){var p=h.map(function(g){var i=n(g);return i&&x.isArrayOrTypedArray(i)?i:null});return p.every(function(g){return g&&g.length===p[0].length})&&p}var s=o(["x","y","z"]);if(!s){t.visible=!1;return}if(o(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=v.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(h){n(h)});var m=n("contour.show");m&&(n("contour.color"),n("contour.width")),"intensity"in e?(n("intensity"),n("intensitymode"),E(e,t,r,n,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?n("facecolor"):"vertexcolor"in e?n("vertexcolor"):n("color",a)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),t._length=null}}}),M8=Ee({"src/traces/mesh3d/calc.js"(J,V){"use strict";var v=Sf();V.exports=function(E,k){k.intensity&&v(E,k,{vals:k.intensity,containerStr:"",cLetter:"c"})}}}),S8=Ee({"src/traces/mesh3d/convert.js"(J,V){"use strict";var v=Xc().gl_mesh3d,x=Xc().delaunay_triangulate,E=Xc().alpha_shape,k=Xc().convex_hull,l=Ad().parseColorScale,e=Vr().isArrayOrTypedArray,t=Td(),a=pl().extractOpts,r=s0();function n(i,w,S){this.scene=i,this.uid=S,this.mesh=w,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=n.prototype;o.handlePick=function(i){if(i.object===this.mesh){var w=i.index=i.data.index;i.data._cellCenter?i.traceCoordinate=i.data.dataCoordinate:i.traceCoordinate=[this.data.x[w],this.data.y[w],this.data.z[w]];var S=this.data.hovertext||this.data.text;return e(S)&&S[w]!==void 0?i.textLabel=S[w]:S&&(i.textLabel=S),!0}};function s(i){for(var w=[],S=i.length,M=0;M=w-.5)return!1;return!0}o.update=function(i){var w=this.scene,S=w.fullSceneLayout;this.data=i;var M=i.x.length,C=r(c(S.xaxis,i.x,w.dataScale[0],i.xcalendar),c(S.yaxis,i.y,w.dataScale[1],i.ycalendar),c(S.zaxis,i.z,w.dataScale[2],i.zcalendar)),_;if(i.i&&i.j&&i.k){if(i.i.length!==i.j.length||i.j.length!==i.k.length||!p(i.i,M)||!p(i.j,M)||!p(i.k,M))return;_=r(m(i.i),m(i.j),m(i.k))}else i.alphahull===0?_=k(C):i.alphahull>0?_=E(i.alphahull,C):_=h(i.delaunayaxis,C);var T={positions:C,cells:_,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,contourEnable:i.contour.show,contourColor:t(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading};if(i.intensity){var f=a(i);this.color="#fff";var u=i.intensitymode;T[u+"Intensity"]=i.intensity,T[u+"IntensityBounds"]=[f.min,f.max],T.colormap=l(i)}else i.vertexcolor?(this.color=i.vertexcolor[0],T.vertexColors=s(i.vertexcolor)):i.facecolor?(this.color=i.facecolor[0],T.cellColors=s(i.facecolor)):(this.color=i.color,T.meshColor=t(i.color));this.mesh.update(T)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(i,w){var S=i.glplot.gl,M=v({gl:S}),C=new n(i,M,w.uid);return M._trace=C,C.update(w),i.glplot.add(M),C}V.exports=g}}),E8=Ee({"src/traces/mesh3d/index.js"(J,V){"use strict";V.exports={attributes:o0(),supplyDefaults:A8(),calc:M8(),colorbar:{min:"cmin",max:"cmax"},plot:S8(),moduleType:"trace",name:"mesh3d",basePlotModule:ov(),categories:["gl3d","showLegend"],meta:{}}}}),k8=Ee({"lib/mesh3d.js"(J,V){"use strict";V.exports=E8()}}),ow=Ee({"src/traces/cone/attributes.js"(J,V){"use strict";var v=$s(),x=Fl().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:k}=Cs(),l=o0(),e=ia(),t=vo().extendFlat,a={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","raw"],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:E({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:k({editType:"calc"}),uhoverformat:x("u",1),vhoverformat:x("v",1),whoverformat:x("w",1),xhoverformat:x("x"),yhoverformat:x("y"),zhoverformat:x("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(a,v("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(n){a[n]=l[n]}),a.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=a}}),C8=Ee({"src/traces/cone/defaults.js"(J,V){"use strict";var v=Vr(),x=Cc(),E=ow();V.exports=function(l,e,t,a){function r(g,i){return v.coerce(l,e,E,g,i)}var n=r("u"),o=r("v"),s=r("w"),c=r("x"),m=r("y"),h=r("z");if(!n||!n.length||!o||!o.length||!s||!s.length||!c||!c.length||!m||!m.length||!h||!h.length){e.visible=!1;return}var p=r("sizemode");r("sizeref",p==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),x(l,e,a,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),L8=Ee({"src/traces/cone/calc.js"(J,V){"use strict";var v=Sf();V.exports=function(E,k){for(var l=k.u,e=k.v,t=k.w,a=Math.min(k.x.length,k.y.length,k.z.length,l.length,e.length,t.length),r=-1/0,n=1/0,o=0;o2?p=m.slice(1,h-1):h===2?p=[(m[0]+m[1])/2]:p=m,p}function o(m){var h=m.length;return h===1?[.5,.5]:[m[1]-m[0],m[h-1]-m[h-2]]}function s(m,h){var p=m.fullSceneLayout,g=m.dataScale,i=h._len,w={};function S(oe,H){var X=p[H],K=g[t[H]];return E.simpleMap(oe,function(G){return X.d2l(G)*K})}if(w.vectors=e(S(h._u,"xaxis"),S(h._v,"yaxis"),S(h._w,"zaxis"),i),!i)return{positions:[],cells:[]};var M=S(h._Xs,"xaxis"),C=S(h._Ys,"yaxis"),_=S(h._Zs,"zaxis");w.meshgrid=[M,C,_],w.gridFill=h._gridFill;var T=h._slen;if(T)w.startingPositions=e(S(h._startsX,"xaxis"),S(h._startsY,"yaxis"),S(h._startsZ,"zaxis"));else{for(var f=C[0],u=n(M),A=n(_),b=new Array(u.length*A.length),z=0,I=0;If&&(f=z[0]),z[1]u&&(u=z[1])}function b(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(b);break;case"Point":A(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(A);break}}S.arcs.forEach(function(z){for(var I=-1,N=z.length,R;++If&&(f=R[0]),R[1]u&&(u=R[1])});for(C in S.objects)b(S.objects[C]);return[_,T,f,u]}function l(S,M){for(var C,_=S.length,T=_-M;T<--_;)C=S[T],S[T++]=S[_],S[_]=C}function e(S,M){return typeof M=="string"&&(M=S.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return t(S,C)})}:t(S,M)}function t(S,M){var C=M.id,_=M.bbox,T=M.properties==null?{}:M.properties,f=a(S,M);return C==null&&_==null?{type:"Feature",properties:T,geometry:f}:_==null?{type:"Feature",id:C,properties:T,geometry:f}:{type:"Feature",id:C,bbox:_,properties:T,geometry:f}}function a(S,M){var C=E(S.transform),_=S.arcs;function T(I,N){N.length&&N.pop();for(var R=_[I<0?~I:I],B=0,F=R.length;B1)_=s(S,M,C);else for(T=0,_=new Array(f=S.arcs.length);T1)for(var N=1,R=A(z[0]),B,F;NR&&(F=z[0],z[0]=z[N],z[N]=F,R=B);return z}).filter(function(b){return b.length>0})}}function p(S,M){for(var C=0,_=S.length;C<_;){var T=C+_>>>1;S[T]=2))throw new Error("n must be \u22652");b=S.bbox||k(S);var C=b[0],_=b[1],T=b[2],f=b[3],u;M={scale:[T-C?(T-C)/(u-1):1,f-_?(f-_)/(u-1):1],translate:[C,_]}}else b=S.bbox;var A=i(M),b,z,I=S.objects,N={};function R(P){return A(P)}function B(P){var j;switch(P.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:P.geometries.map(B)};break;case"Point":j={type:"Point",coordinates:R(P.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:P.coordinates.map(R)};break;default:return P}return P.id!=null&&(j.id=P.id),P.bbox!=null&&(j.bbox=P.bbox),P.properties!=null&&(j.properties=P.properties),j}function F(P){var j=0,U=1,Z=P.length,Q,re=new Array(Z);for(re[0]=A(P[0],0);++j0&&(k.push(l),l=[])}return l.length>0&&k.push(l),k},J.makeLine=function(v){return v.length===1?{type:"LineString",coordinates:v[0]}:{type:"MultiLineString",coordinates:v}},J.makePolygon=function(v){if(v.length===1)return{type:"Polygon",coordinates:v};for(var x=new Array(v.length),E=0;E{for(var S in w)v(i,S,{get:w[S],enumerable:!0})},e=(i,w,S,M)=>{if(w&&typeof w=="object"||typeof w=="function")for(let C of E(w))!k.call(i,C)&&C!==S&&v(i,C,{get:()=>w[C],enumerable:!(M=x(w,C))||M.enumerable});return i},t=i=>e(v({},"__esModule",{value:!0}),i),a={};l(a,{COUNTRIES:()=>r,byAlpha2:()=>p,byAlpha3:()=>h,byM49:()=>g,createLookup:()=>o,lookup:()=>c,lookupAlpha3:()=>m,sanitize:()=>n}),V.exports=t(a);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function n(i){return i.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function o(i){let w=new Map,S=new Map,M=new Map;for(let f of i)w.set(f.iso3,f),f.iso2&&S.set(f.iso2,f),f.m49&&M.set(f.m49,f);let C=new Map;for(let f of i)for(let u of[f.name,...f.aliases]){let A=n(u),b=C.get(A);if(b!==void 0&&b!==f.iso3)throw new Error(`Duplicate name/alias "${A}": ${b} vs ${f.iso3}`);C.set(A,f.iso3)}function _(f){if(f==null)return;let u=String(f).trim();if(!u)return;if(/^\d+$/.test(u)){let b=M.get(String(parseInt(u,10)).padStart(3,"0"));if(b)return b}if(/^[A-Za-z]{2}$/.test(u)){let b=S.get(u.toUpperCase());if(b)return b}if(/^[A-Za-z]{3}$/.test(u)){let b=w.get(u.toUpperCase());if(b)return b}let A=C.get(n(u));return A===void 0?void 0:w.get(A)}function T(f){var u;return(u=_(f))==null?void 0:u.iso3}return{lookup:_,lookupAlpha3:T,byAlpha3:w,byAlpha2:S,byM49:M}}var s=o(r),c=s.lookup,m=s.lookupAlpha3,h=s.byAlpha3,p=s.byAlpha2,g=s.byM49}}),Ly=Ee({"node_modules/@turf/helpers/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=63710088e-1,v={centimeters:V*100,centimetres:V*100,degrees:360/(2*Math.PI),feet:V*3.28084,inches:V*39.37,kilometers:V/1e3,kilometres:V/1e3,meters:V,metres:V,miles:V/1609.344,millimeters:V*1e3,millimetres:V*1e3,nauticalmiles:V/1852,radians:1,yards:V*1.0936},x={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function E(I,N,R={}){let B={type:"Feature"};return(R.id===0||R.id)&&(B.id=R.id),R.bbox&&(B.bbox=R.bbox),B.properties=N||{},B.geometry=I,B}function k(I,N,R={}){switch(I){case"Point":return l(N).geometry;case"LineString":return r(N).geometry;case"Polygon":return t(N).geometry;case"MultiPoint":return c(N).geometry;case"MultiLineString":return s(N).geometry;case"MultiPolygon":return m(N).geometry;default:throw new Error(I+" is invalid")}}function l(I,N,R={}){if(!I)throw new Error("coordinates is required");if(!Array.isArray(I))throw new Error("coordinates must be an Array");if(I.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(I[0])||!u(I[1]))throw new Error("coordinates must contain numbers");return E({type:"Point",coordinates:I},N,R)}function e(I,N,R={}){return o(I.map(B=>l(B,N)),R)}function t(I,N,R={}){for(let F of I){if(F.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(F[F.length-1].length!==F[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pt(B,N)),R)}function r(I,N,R={}){if(I.length<2)throw new Error("coordinates must be an array of two or more positions");return E({type:"LineString",coordinates:I},N,R)}function n(I,N,R={}){return o(I.map(B=>r(B,N)),R)}function o(I,N={}){let R={type:"FeatureCollection"};return N.id&&(R.id=N.id),N.bbox&&(R.bbox=N.bbox),R.features=I,R}function s(I,N,R={}){return E({type:"MultiLineString",coordinates:I},N,R)}function c(I,N,R={}){return E({type:"MultiPoint",coordinates:I},N,R)}function m(I,N,R={}){return E({type:"MultiPolygon",coordinates:I},N,R)}function h(I,N,R={}){return E({type:"GeometryCollection",geometries:I},N,R)}function p(I,N=0){if(N&&!(N>=0))throw new Error("precision must be a positive number");let R=Math.pow(10,N||0);return Math.round(I*R)/R}function g(I,N="kilometers"){let R=v[N];if(!R)throw new Error(N+" units is invalid");return I*R}function i(I,N="kilometers"){let R=v[N];if(!R)throw new Error(N+" units is invalid");return I/R}function w(I,N){return C(i(I,N))}function S(I){let N=I%360;return N<0&&(N+=360),N}function M(I){return I=I%360,I>180?I-360:I<-180?I+360:I}function C(I){return I%(2*Math.PI)*180/Math.PI}function _(I){return I%360*Math.PI/180}function T(I,N="kilometers",R="kilometers"){if(!(I>=0))throw new Error("length must be a positive number");return g(i(I,N),R)}function f(I,N="meters",R="kilometers"){if(!(I>=0))throw new Error("area must be a positive number");let B=x[N];if(!B)throw new Error("invalid original units");let F=x[R];if(!F)throw new Error("invalid final units");return I/B*F}function u(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)}function A(I){return I!==null&&typeof I=="object"&&!Array.isArray(I)}function b(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(N=>{if(!u(N))throw new Error("bbox must only contain numbers")})}function z(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}J.areaFactors=x,J.azimuthToBearing=M,J.bearingToAzimuth=S,J.convertArea=f,J.convertLength=T,J.degreesToRadians=_,J.earthRadius=V,J.factors=v,J.feature=E,J.featureCollection=o,J.geometry=k,J.geometryCollection=h,J.isNumber=u,J.isObject=A,J.lengthToDegrees=w,J.lengthToRadians=i,J.lineString=r,J.lineStrings=n,J.multiLineString=s,J.multiPoint=c,J.multiPolygon=m,J.point=l,J.points=e,J.polygon=t,J.polygons=a,J.radiansToDegrees=C,J.radiansToLength=g,J.round=p,J.validateBBox=b,J.validateId=z}}),Py=Ee({"node_modules/@turf/meta/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=Ly();function v(i,w,S){if(i!==null)for(var M,C,_,T,f,u,A,b=0,z=0,I,N=i.type,R=N==="FeatureCollection",B=N==="Feature",F=R?i.features.length:1,P=0;Pu||R>A||B>b){f=z,u=M,A=R,b=B,_=0;return}var F=V.lineString.call(void 0,[f,z],S.properties);if(w(F,M,C,B,_)===!1)return!1;_++,f=z})===!1)return!1}}})}function c(i,w,S){var M=S,C=!1;return s(i,function(_,T,f,u,A){C===!1&&S===void 0?M=_:M=w(M,_,T,f,u,A),C=!0}),M}function m(i,w){if(!i)throw new Error("geojson is required");n(i,function(S,M,C){if(S.geometry!==null){var _=S.geometry.type,T=S.geometry.coordinates;switch(_){case"LineString":if(w(S,M,C,0,0)===!1)return!1;break;case"Polygon":for(var f=0;fn+E(o),0)}function E(r){let n=0,o;switch(r.type){case"Polygon":return k(r.coordinates);case"MultiPolygon":for(o=0;o0){n+=Math.abs(t(r[0]));for(let o=1;o=n?(s+2)%n:s+2],p=c[0]*e,g=m[1]*e,i=h[0]*e;o+=(i-p)*Math.sin(g),s++}return o*l}var a=x;J.area=x,J.default=a}}),q8=Ee({"node_modules/@turf/centroid/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=Ly(),v=Py();function x(k,l={}){let e=0,t=0,a=0;return v.coordEach.call(void 0,k,function(r){e+=r[0],t+=r[1],a++},!0),V.point.call(void 0,[e/a,t/a],l.properties)}var E=x;J.centroid=x,J.default=E}}),V8=Ee({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(J,V){(function(v,x){x(typeof J=="object"&&typeof V<"u"?J:v.d3=v.d3||{})})(J,function(v){"use strict";function x(K,G){return KG?1:K>=G?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)<0?q=ee+1:$=ee}return q},right:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)>0?$=ee:q=ee+1}return q}}}function k(K){return function(G,Y){return x(K(G),Y)}}var l=E(x),e=l.right,t=l.left;function a(K,G){G==null&&(G=r);for(var Y=0,q=K.length-1,$=K[0],ee=new Array(q<0?0:q);YK?1:G>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,G){var Y=K.length,q=0,$=-1,ee=0,ne,fe,ye=0;if(G==null)for(;++$1)return ye/(q-1)}function m(K,G){var Y=c(K,G);return Y&&Math.sqrt(Y)}function h(K,G){var Y=K.length,q=-1,$,ee,ne;if(G==null){for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$))}else for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$));return[ee,ne]}var p=Array.prototype,g=p.slice,i=p.map;function w(K){return function(){return K}}function S(K){return K}function M(K,G,Y){K=+K,G=+G,Y=($=arguments.length)<2?(G=K,K=0,1):$<3?1:+Y;for(var q=-1,$=Math.max(0,Math.ceil((G-K)/Y))|0,ee=new Array($);++q<$;)ee[q]=K+q*Y;return ee}var C=Math.sqrt(50),_=Math.sqrt(10),T=Math.sqrt(2);function f(K,G,Y){var q,$=-1,ee,ne,fe;if(G=+G,K=+K,Y=+Y,K===G&&Y>0)return[K];if((q=G0)for(K=Math.ceil(K/fe),G=Math.floor(G/fe),ne=new Array(ee=Math.ceil(G-K+1));++$=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,$):-Math.pow(10,-$)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,G,Y){var q=Math.abs(G-K)/Math.max(0,Y),$=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/$;return ee>=C?$*=10:ee>=_?$*=5:ee>=T&&($*=2),GMe;)Ie.pop(),--Ue;var qe=new Array(Ue+1),ke;for(ee=0;ee<=Ue;++ee)ke=qe[ee]=[],ke.x0=ee>0?Ie[ee-1]:Ae,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,$=(q-1)*G,ee=Math.floor($),ne=+Y(K[ee],ee,K),fe=+Y(K[ee+1],ee+1,K);return ne+(fe-ne)*($-ee)}}function N(K,G,Y){return K=i.call(K,s).sort(x),Math.ceil((Y-G)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function R(K,G,Y){return Math.ceil((Y-G)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++qee&&(ee=$)}else for(;++q=$)for(ee=$;++qee&&(ee=$);return ee}function F(K,G){var Y=K.length,q=Y,$=-1,ee,ne=0;if(G==null)for(;++$=0;)for(ne=K[G],Y=ne.length;--Y>=0;)ee[--$]=ne[Y];return ee}function U(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++q$&&(ee=$)}else for(;++q=$)for(ee=$;++q$&&(ee=$);return ee}function Z(K,G){for(var Y=G.length,q=new Array(Y);Y--;)q[Y]=K[G[Y]];return q}function Q(K,G){if(Y=K.length){var Y,q=0,$=0,ee,ne=K[$];for(G==null&&(G=x);++q0?1:zt<0?-1:0},f=Math.sqrt,u=Math.tan;function A(zt){return zt>1?0:zt<-1?r:Math.acos(zt)}function b(zt){return zt>1?n:zt<-1?-n:Math.asin(zt)}function z(zt){return(zt=_(zt/2))*zt}function I(){}function N(zt,rr){zt&&B.hasOwnProperty(zt.type)&&B[zt.type](zt,rr)}var R={Feature:function(zt,rr){N(zt.geometry,rr)},FeatureCollection:function(zt,rr){for(var Br=zt.features,wr=-1,un=Br.length;++wr=0?1:-1,un=wr*Br,Ln=i(rr),Vn=_(rr),Jn=H*Vn,ca=oe*Ln+Jn*i(un),Pa=Jn*wr*_(un);U.add(g(Pa,ca)),ae=zt,oe=Ln,H=Vn}function $(zt){return Z.reset(),j(zt,X),Z*2}function ee(zt){return[g(zt[1],zt[0]),b(zt[2])]}function ne(zt){var rr=zt[0],Br=zt[1],wr=i(Br);return[wr*i(rr),wr*_(rr),_(Br)]}function fe(zt,rr){return zt[0]*rr[0]+zt[1]*rr[1]+zt[2]*rr[2]}function ye(zt,rr){return[zt[1]*rr[2]-zt[2]*rr[1],zt[2]*rr[0]-zt[0]*rr[2],zt[0]*rr[1]-zt[1]*rr[0]]}function xe(zt,rr){zt[0]+=rr[0],zt[1]+=rr[1],zt[2]+=rr[2]}function Ae(zt,rr){return[zt[0]*rr,zt[1]*rr,zt[2]*rr]}function Me(zt){var rr=f(zt[0]*zt[0]+zt[1]*zt[1]+zt[2]*zt[2]);zt[0]/=rr,zt[1]/=rr,zt[2]/=rr}var Ie,Ue,qe,ke,ge,ue,ve,se,Te=E(),Fe,We,Ge={point:gt,lineStart:Tt,lineEnd:At,polygonStart:function(){Ge.point=Kt,Ge.lineStart=nr,Ge.lineEnd=_r,Te.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Ge.point=gt,Ge.lineStart=Tt,Ge.lineEnd=At,U<0?(Ie=-(qe=180),Ue=-(ke=90)):Te>t?ke=90:Te<-t&&(Ue=-90),We[0]=Ie,We[1]=qe},sphere:function(){Ie=-(qe=180),Ue=-(ke=90)}};function gt(zt,rr){Fe.push(We=[Ie=zt,qe=zt]),rrke&&(ke=rr)}function mt(zt,rr){var Br=ne([zt*m,rr*m]);if(se){var wr=ye(se,Br),un=[wr[1],-wr[0],0],Ln=ye(un,wr);Me(Ln),Ln=ee(Ln);var Vn=zt-ge,Jn=Vn>0?1:-1,ca=Ln[0]*c*Jn,Pa,Gn=h(Vn)>180;Gn^(Jn*geke&&(ke=Pa)):(ca=(ca+360)%360-180,Gn^(Jn*geke&&(ke=rr))),Gn?ztZt(Ie,qe)&&(qe=zt):Zt(zt,qe)>Zt(Ie,qe)&&(Ie=zt):qe>=Ie?(ztqe&&(qe=zt)):zt>ge?Zt(Ie,zt)>Zt(Ie,qe)&&(qe=zt):Zt(zt,qe)>Zt(Ie,qe)&&(Ie=zt)}else Fe.push(We=[Ie=zt,qe=zt]);rrke&&(ke=rr),se=Br,ge=zt}function Tt(){Ge.point=mt}function At(){We[0]=Ie,We[1]=qe,Ge.point=gt,se=null}function Kt(zt,rr){if(se){var Br=zt-ge;Te.add(h(Br)>180?Br+(Br>0?360:-360):Br)}else ue=zt,ve=rr;X.point(zt,rr),mt(zt,rr)}function nr(){X.lineStart()}function _r(){Kt(ue,ve),X.lineEnd(),h(Te)>t&&(Ie=-(qe=180)),We[0]=Ie,We[1]=qe,se=null}function Zt(zt,rr){return(rr-=zt)<0?rr+360:rr}function sr(zt,rr){return zt[0]-rr[0]}function Ot(zt,rr){return zt[0]<=zt[1]?zt[0]<=rr&&rr<=zt[1]:rrZt(wr[0],wr[1])&&(wr[1]=un[1]),Zt(un[0],wr[1])>Zt(wr[0],wr[1])&&(wr[0]=un[0])):Ln.push(wr=un);for(Vn=-1/0,Br=Ln.length-1,rr=0,wr=Ln[Br];rr<=Br;wr=un,++rr)un=Ln[rr],(Jn=Zt(wr[1],un[0]))>Vn&&(Vn=Jn,Ie=un[0],qe=wr[1])}return Fe=We=null,Ie===1/0||Ue===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ie,Ue],[qe,ke]]}var ht,Re,Be,He,$e,Ze,Je,Mt,dt,Dt,Ct,Vt,Ht,Wt,Sr,on,$t={sphere:I,point:It,lineStart:cr,lineEnd:ln,polygonStart:function(){$t.lineStart=nn,$t.lineEnd=wn},polygonEnd:function(){$t.lineStart=cr,$t.lineEnd=ln}};function It(zt,rr){zt*=m,rr*=m;var Br=i(rr);ir(Br*i(zt),Br*_(zt),_(rr))}function ir(zt,rr,Br){++ht,Be+=(zt-Be)/ht,He+=(rr-He)/ht,$e+=(Br-$e)/ht}function cr(){$t.point=fr}function fr(zt,rr){zt*=m,rr*=m;var Br=i(rr);Wt=Br*i(zt),Sr=Br*_(zt),on=_(rr),$t.point=Ir,ir(Wt,Sr,on)}function Ir(zt,rr){zt*=m,rr*=m;var Br=i(rr),wr=Br*i(zt),un=Br*_(zt),Ln=_(rr),Vn=g(f((Vn=Sr*Ln-on*un)*Vn+(Vn=on*wr-Wt*Ln)*Vn+(Vn=Wt*un-Sr*wr)*Vn),Wt*wr+Sr*un+on*Ln);Re+=Vn,Ze+=Vn*(Wt+(Wt=wr)),Je+=Vn*(Sr+(Sr=un)),Mt+=Vn*(on+(on=Ln)),ir(Wt,Sr,on)}function ln(){$t.point=It}function nn(){$t.point=Un}function wn(){jn(Vt,Ht),$t.point=It}function Un(zt,rr){Vt=zt,Ht=rr,zt*=m,rr*=m,$t.point=jn;var Br=i(rr);Wt=Br*i(zt),Sr=Br*_(zt),on=_(rr),ir(Wt,Sr,on)}function jn(zt,rr){zt*=m,rr*=m;var Br=i(rr),wr=Br*i(zt),un=Br*_(zt),Ln=_(rr),Vn=Sr*Ln-on*un,Jn=on*wr-Wt*Ln,ca=Wt*un-Sr*wr,Pa=f(Vn*Vn+Jn*Jn+ca*ca),Gn=b(Pa),oa=Pa&&-Gn/Pa;dt+=oa*Vn,Dt+=oa*Jn,Ct+=oa*ca,Re+=Gn,Ze+=Gn*(Wt+(Wt=wr)),Je+=Gn*(Sr+(Sr=un)),Mt+=Gn*(on+(on=Ln)),ir(Wt,Sr,on)}function Aa(zt){ht=Re=Be=He=$e=Ze=Je=Mt=dt=Dt=Ct=0,j(zt,$t);var rr=dt,Br=Dt,wr=Ct,un=rr*rr+Br*Br+wr*wr;return unr?zt+Math.round(-zt/s)*s:zt,rr]}ei.invert=ei;function Fa(zt,rr,Br){return(zt%=s)?rr||Br?Qn(Mi(zt),ci(rr,Br)):Mi(zt):rr||Br?ci(rr,Br):ei}function ai(zt){return function(rr,Br){return rr+=zt,[rr>r?rr-s:rr<-r?rr+s:rr,Br]}}function Mi(zt){var rr=ai(zt);return rr.invert=ai(-zt),rr}function ci(zt,rr){var Br=i(zt),wr=_(zt),un=i(rr),Ln=_(rr);function Vn(Jn,ca){var Pa=i(ca),Gn=i(Jn)*Pa,oa=_(Jn)*Pa,fa=_(ca),La=fa*Br+Gn*wr;return[g(oa*un-La*Ln,Gn*Br-fa*wr),b(La*un+oa*Ln)]}return Vn.invert=function(Jn,ca){var Pa=i(ca),Gn=i(Jn)*Pa,oa=_(Jn)*Pa,fa=_(ca),La=fa*un-oa*Ln;return[g(oa*un+fa*Ln,Gn*Br+La*wr),b(La*Br-Gn*wr)]},Vn}function ba(zt){zt=Fa(zt[0]*m,zt[1]*m,zt.length>2?zt[2]*m:0);function rr(Br){return Br=zt(Br[0]*m,Br[1]*m),Br[0]*=c,Br[1]*=c,Br}return rr.invert=function(Br){return Br=zt.invert(Br[0]*m,Br[1]*m),Br[0]*=c,Br[1]*=c,Br},rr}function pa(zt,rr,Br,wr,un,Ln){if(Br){var Vn=i(rr),Jn=_(rr),ca=wr*Br;un==null?(un=rr+wr*s,Ln=rr-ca/2):(un=Ii(Vn,un),Ln=Ii(Vn,Ln),(wr>0?unLn)&&(un+=wr*s));for(var Pa,Gn=un;wr>0?Gn>Ln:Gn1&&zt.push(zt.pop().concat(zt.shift()))},result:function(){var Br=zt;return zt=[],rr=null,Br}}}function Kn(zt,rr){return h(zt[0]-rr[0])=0;--Jn)un.point((oa=Gn[Jn])[0],oa[1]);else wr(fa.x,fa.p.x,-1,un);fa=fa.p}fa=fa.o,Gn=fa.z,La=!La}while(!fa.v);un.lineEnd()}}}function hr(zt){if(rr=zt.length){for(var rr,Br=0,wr=zt[0],un;++Br=0?1:-1,Yo=Wo*Vo,as=Yo>r,Bo=Bi*oo;if(ur.add(g(Bo*Wo*_(Yo),Ni*go+Bo*i(Yo))),Vn+=as?Vo+Wo*s:Vo,as^La>=Br^Va>=Br){var Ks=ye(ne(fa),ne(_i));Me(Ks);var Rs=ye(Ln,Ks);Me(Rs);var ps=(as^Vo>=0?-1:1)*b(Rs[2]);(wr>ps||wr===ps&&(Ks[0]||Ks[1]))&&(Jn+=as^Vo>=0?1:-1)}}return(Vn<-t||Vn0){for(ca||(un.polygonStart(),ca=!0),un.lineStart(),go=0;go1&&Ga&2&&oo.push(oo.pop().concat(oo.shift())),Gn.push(oo.filter(at))}}return fa}}function at(zt){return zt.length>1}function kt(zt,rr){return((zt=zt.x)[0]<0?zt[1]-n-t:n-zt[1])-((rr=rr.x)[0]<0?rr[1]-n-t:n-rr[1])}var Ut=Fr(function(){return!0},ar,br,[-r,-n]);function ar(zt){var rr=NaN,Br=NaN,wr=NaN,un;return{lineStart:function(){zt.lineStart(),un=1},point:function(Ln,Vn){var Jn=Ln>0?r:-r,ca=h(Ln-rr);h(ca-r)0?n:-n),zt.point(wr,Br),zt.lineEnd(),zt.lineStart(),zt.point(Jn,Br),zt.point(Ln,Br),un=0):wr!==Jn&&ca>=r&&(h(rr-wr)t?p((_(rr)*(Ln=i(wr))*_(Br)-_(wr)*(un=i(rr))*_(zt))/(un*Ln*Vn)):(rr+wr)/2}function br(zt,rr,Br,wr){var un;if(zt==null)un=Br*n,wr.point(-r,un),wr.point(0,un),wr.point(r,un),wr.point(r,0),wr.point(r,-un),wr.point(0,-un),wr.point(-r,-un),wr.point(-r,0),wr.point(-r,un);else if(h(zt[0]-rr[0])>t){var Ln=zt[0]0,un=h(rr)>t;function Ln(Gn,oa,fa,La){pa(La,zt,Br,fa,Gn,oa)}function Vn(Gn,oa){return i(Gn)*i(oa)>rr}function Jn(Gn){var oa,fa,La,qa,Bi;return{lineStart:function(){qa=La=!1,Bi=1},point:function(Ni,Zi){var _i=[Ni,Zi],Va,Ga=Vn(Ni,Zi),oo=wr?Ga?0:Pa(Ni,Zi):Ga?Pa(Ni+(Ni<0?r:-r),Zi):0;if(!oa&&(qa=La=Ga)&&Gn.lineStart(),Ga!==La&&(Va=ca(oa,_i),(!Va||Kn(oa,Va)||Kn(_i,Va))&&(_i[2]=1)),Ga!==La)Bi=0,Ga?(Gn.lineStart(),Va=ca(_i,oa),Gn.point(Va[0],Va[1])):(Va=ca(oa,_i),Gn.point(Va[0],Va[1],2),Gn.lineEnd()),oa=Va;else if(un&&oa&&wr^Ga){var go;!(oo&fa)&&(go=ca(_i,oa,!0))&&(Bi=0,wr?(Gn.lineStart(),Gn.point(go[0][0],go[0][1]),Gn.point(go[1][0],go[1][1]),Gn.lineEnd()):(Gn.point(go[1][0],go[1][1]),Gn.lineEnd(),Gn.lineStart(),Gn.point(go[0][0],go[0][1],3)))}Ga&&(!oa||!Kn(oa,_i))&&Gn.point(_i[0],_i[1]),oa=_i,La=Ga,fa=oo},lineEnd:function(){La&&Gn.lineEnd(),oa=null},clean:function(){return Bi|(qa&&La)<<1}}}function ca(Gn,oa,fa){var La=ne(Gn),qa=ne(oa),Bi=[1,0,0],Ni=ye(La,qa),Zi=fe(Ni,Ni),_i=Ni[0],Va=Zi-_i*_i;if(!Va)return!fa&&Gn;var Ga=rr*Zi/Va,oo=-rr*_i/Va,go=ye(Bi,Ni),Vo=Ae(Bi,Ga),Wo=Ae(Ni,oo);xe(Vo,Wo);var Yo=go,as=fe(Vo,Yo),Bo=fe(Yo,Yo),Ks=as*as-Bo*(fe(Vo,Vo)-1);if(!(Ks<0)){var Rs=f(Ks),ps=Ae(Yo,(-as-Rs)/Bo);if(xe(ps,Vo),ps=ee(ps),!fa)return ps;var vi=Gn[0],Xo=oa[0],Ss=Gn[1],Ws=oa[1],Dl;Xo0^ps[1]<(h(ps[0]-vi)r^(vi<=ps[0]&&ps[0]<=Xo)){var Al=Ae(Yo,(-as+Rs)/Bo);return xe(Al,Vo),[ps,ee(Al)]}}}function Pa(Gn,oa){var fa=wr?zt:r-zt,La=0;return Gn<-fa?La|=1:Gn>fa&&(La|=2),oa<-fa?La|=4:oa>fa&&(La|=8),La}return Fr(Vn,Jn,Ln,wr?[0,-zt]:[-r,zt-r])}function Pr(zt,rr,Br,wr,un,Ln){var Vn=zt[0],Jn=zt[1],ca=rr[0],Pa=rr[1],Gn=0,oa=1,fa=ca-Vn,La=Pa-Jn,qa;if(qa=Br-Vn,!(!fa&&qa>0)){if(qa/=fa,fa<0){if(qa0){if(qa>oa)return;qa>Gn&&(Gn=qa)}if(qa=un-Vn,!(!fa&&qa<0)){if(qa/=fa,fa<0){if(qa>oa)return;qa>Gn&&(Gn=qa)}else if(fa>0){if(qa0)){if(qa/=La,La<0){if(qa0){if(qa>oa)return;qa>Gn&&(Gn=qa)}if(qa=Ln-Jn,!(!La&&qa<0)){if(qa/=La,La<0){if(qa>oa)return;qa>Gn&&(Gn=qa)}else if(La>0){if(qa0&&(zt[0]=Vn+Gn*fa,zt[1]=Jn+Gn*La),oa<1&&(rr[0]=Vn+oa*fa,rr[1]=Jn+oa*La),!0}}}}}var hn=1e9,zn=-hn;function Pn(zt,rr,Br,wr){function un(Pa,Gn){return zt<=Pa&&Pa<=Br&&rr<=Gn&&Gn<=wr}function Ln(Pa,Gn,oa,fa){var La=0,qa=0;if(Pa==null||(La=Vn(Pa,oa))!==(qa=Vn(Gn,oa))||ca(Pa,Gn)<0^oa>0)do fa.point(La===0||La===3?zt:Br,La>1?wr:rr);while((La=(La+oa+4)%4)!==qa);else fa.point(Gn[0],Gn[1])}function Vn(Pa,Gn){return h(Pa[0]-zt)0?0:3:h(Pa[0]-Br)0?2:1:h(Pa[1]-rr)0?1:0:Gn>0?3:2}function Jn(Pa,Gn){return ca(Pa.x,Gn.x)}function ca(Pa,Gn){var oa=Vn(Pa,1),fa=Vn(Gn,1);return oa!==fa?oa-fa:oa===0?Gn[1]-Pa[1]:oa===1?Pa[0]-Gn[0]:oa===2?Pa[1]-Gn[1]:Gn[0]-Pa[0]}return function(Pa){var Gn=Pa,oa=da(),fa,La,qa,Bi,Ni,Zi,_i,Va,Ga,oo,go,Vo={point:Wo,lineStart:Ks,lineEnd:Rs,polygonStart:as,polygonEnd:Bo};function Wo(vi,Xo){un(vi,Xo)&&Gn.point(vi,Xo)}function Yo(){for(var vi=0,Xo=0,Ss=La.length;Xowr&&(zu-Fu)*(wr-Al)>(bu-Al)*(zt-Fu)&&++vi:bu<=wr&&(zu-Fu)*(wr-Al)<(bu-Al)*(zt-Fu)&&--vi;return vi}function as(){Gn=oa,fa=[],La=[],go=!0}function Bo(){var vi=Yo(),Xo=go&&vi,Ss=(fa=x.merge(fa)).length;(Xo||Ss)&&(Pa.polygonStart(),Xo&&(Pa.lineStart(),Ln(null,null,1,Pa),Pa.lineEnd()),Ss&&et(fa,Jn,vi,Ln,Pa),Pa.polygonEnd()),Gn=Pa,fa=La=qa=null}function Ks(){Vo.point=ps,La&&La.push(qa=[]),oo=!0,Ga=!1,_i=Va=NaN}function Rs(){fa&&(ps(Bi,Ni),Zi&&Ga&&oa.rejoin(),fa.push(oa.result())),Vo.point=Wo,Ga&&Gn.lineEnd()}function ps(vi,Xo){var Ss=un(vi,Xo);if(La&&qa.push([vi,Xo]),oo)Bi=vi,Ni=Xo,Zi=Ss,oo=!1,Ss&&(Gn.lineStart(),Gn.point(vi,Xo));else if(Ss&&Ga)Gn.point(vi,Xo);else{var Ws=[_i=Math.max(zn,Math.min(hn,_i)),Va=Math.max(zn,Math.min(hn,Va))],Dl=[vi=Math.max(zn,Math.min(hn,vi)),Xo=Math.max(zn,Math.min(hn,Xo))];Pr(Ws,Dl,zt,rr,Br,wr)?(Ga||(Gn.lineStart(),Gn.point(Ws[0],Ws[1])),Gn.point(Dl[0],Dl[1]),Ss||Gn.lineEnd(),go=!1):Ss&&(Gn.lineStart(),Gn.point(vi,Xo),go=!1)}_i=vi,Va=Xo,Ga=Ss}return Vo}}function Ca(){var zt=0,rr=0,Br=960,wr=500,un,Ln,Vn;return Vn={stream:function(Jn){return un&&Ln===Jn?un:un=Pn(zt,rr,Br,wr)(Ln=Jn)},extent:function(Jn){return arguments.length?(zt=+Jn[0][0],rr=+Jn[0][1],Br=+Jn[1][0],wr=+Jn[1][1],un=Ln=null,Vn):[[zt,rr],[Br,wr]]}}}var ma=E(),bi,ga,eo,si={sphere:I,point:I,lineStart:Ao,lineEnd:I,polygonStart:I,polygonEnd:I};function Ao(){si.point=Sa,si.lineEnd=ro}function ro(){si.point=si.lineEnd=I}function Sa(zt,rr){zt*=m,rr*=m,bi=zt,ga=_(rr),eo=i(rr),si.point=Gi}function Gi(zt,rr){zt*=m,rr*=m;var Br=_(rr),wr=i(rr),un=h(zt-bi),Ln=i(un),Vn=_(un),Jn=wr*Vn,ca=eo*Br-ga*wr*Ln,Pa=ga*Br+eo*wr*Ln;ma.add(g(f(Jn*Jn+ca*ca),Pa)),bi=zt,ga=Br,eo=wr}function ti(zt){return ma.reset(),j(zt,si),+ma}var fi=[null,null],xo={type:"LineString",coordinates:fi};function zi(zt,rr){return fi[0]=zt,fi[1]=rr,ti(xo)}var so={Feature:function(zt,rr){return So(zt.geometry,rr)},FeatureCollection:function(zt,rr){for(var Br=zt.features,wr=-1,un=Br.length;++wr0&&(un=zi(zt[Ln],zt[Ln-1]),un>0&&Br<=un&&wr<=un&&(Br+wr-un)*(1-Math.pow((Br-wr)/un,2))t}).map(fa)).concat(x.range(w(Ln/Pa)*Pa,un,Pa).filter(function(Va){return h(Va%oa)>t}).map(La))}return Zi.lines=function(){return _i().map(function(Va){return{type:"LineString",coordinates:Va}})},Zi.outline=function(){return{type:"Polygon",coordinates:[qa(wr).concat(Bi(Vn).slice(1),qa(Br).reverse().slice(1),Bi(Jn).reverse().slice(1))]}},Zi.extent=function(Va){return arguments.length?Zi.extentMajor(Va).extentMinor(Va):Zi.extentMinor()},Zi.extentMajor=function(Va){return arguments.length?(wr=+Va[0][0],Br=+Va[1][0],Jn=+Va[0][1],Vn=+Va[1][1],wr>Br&&(Va=wr,wr=Br,Br=Va),Jn>Vn&&(Va=Jn,Jn=Vn,Vn=Va),Zi.precision(Ni)):[[wr,Jn],[Br,Vn]]},Zi.extentMinor=function(Va){return arguments.length?(rr=+Va[0][0],zt=+Va[1][0],Ln=+Va[0][1],un=+Va[1][1],rr>zt&&(Va=rr,rr=zt,zt=Va),Ln>un&&(Va=Ln,Ln=un,un=Va),Zi.precision(Ni)):[[rr,Ln],[zt,un]]},Zi.step=function(Va){return arguments.length?Zi.stepMajor(Va).stepMinor(Va):Zi.stepMinor()},Zi.stepMajor=function(Va){return arguments.length?(Gn=+Va[0],oa=+Va[1],Zi):[Gn,oa]},Zi.stepMinor=function(Va){return arguments.length?(ca=+Va[0],Pa=+Va[1],Zi):[ca,Pa]},Zi.precision=function(Va){return arguments.length?(Ni=+Va,fa=qo(Ln,un,90),La=Oo(rr,zt,Ni),qa=qo(Jn,Vn,90),Bi=Oo(wr,Br,Ni),Zi):Ni},Zi.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function Ko(){return ws()()}function ns(zt,rr){var Br=zt[0]*m,wr=zt[1]*m,un=rr[0]*m,Ln=rr[1]*m,Vn=i(wr),Jn=_(wr),ca=i(Ln),Pa=_(Ln),Gn=Vn*i(Br),oa=Vn*_(Br),fa=ca*i(un),La=ca*_(un),qa=2*b(f(z(Ln-wr)+Vn*ca*z(un-Br))),Bi=_(qa),Ni=qa?function(Zi){var _i=_(Zi*=qa)/Bi,Va=_(qa-Zi)/Bi,Ga=Va*Gn+_i*fa,oo=Va*oa+_i*La,go=Va*Jn+_i*Pa;return[g(oo,Ga)*c,g(go,f(Ga*Ga+oo*oo))*c]}:function(){return[Br*c,wr*c]};return Ni.distance=qa,Ni}function wo(zt){return zt}var No=E(),Di=E(),lo,Go,mo,us,Jo={point:I,lineStart:I,lineEnd:I,polygonStart:function(){Jo.lineStart=zs,Jo.lineEnd=Zs},polygonEnd:function(){Jo.lineStart=Jo.lineEnd=Jo.point=I,No.add(h(Di)),Di.reset()},result:function(){var zt=No/2;return No.reset(),zt}};function zs(){Jo.point=Is}function Is(zt,rr){Jo.point=es,lo=mo=zt,Go=us=rr}function es(zt,rr){Di.add(us*zt-mo*rr),mo=zt,us=rr}function Zs(){es(lo,Go)}var Ps=1/0,$o=Ps,Fo=-Ps,Ji=Fo,Ro={point:Ls,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var zt=[[Ps,$o],[Fo,Ji]];return Fo=Ji=-($o=Ps=1/0),zt}};function Ls(zt,rr){ztFo&&(Fo=zt),rr<$o&&($o=rr),rr>Ji&&(Ji=rr)}var zl=0,ml=0,Ts=0,yl=0,mu=0,su=0,cc=0,Bl=0,_l=0,ju,lu,il,As,ms={point:Ms,lineStart:ol,lineEnd:Uu,polygonStart:function(){ms.lineStart=fc,ms.lineEnd=th},polygonEnd:function(){ms.point=Ms,ms.lineStart=ol,ms.lineEnd=Uu},result:function(){var zt=_l?[cc/_l,Bl/_l]:su?[yl/su,mu/su]:Ts?[zl/Ts,ml/Ts]:[NaN,NaN];return zl=ml=Ts=yl=mu=su=cc=Bl=_l=0,zt}};function Ms(zt,rr){zl+=zt,ml+=rr,++Ts}function ol(){ms.point=Su}function Su(zt,rr){ms.point=Eu,Ms(il=zt,As=rr)}function Eu(zt,rr){var Br=zt-il,wr=rr-As,un=f(Br*Br+wr*wr);yl+=un*(il+zt)/2,mu+=un*(As+rr)/2,su+=un,Ms(il=zt,As=rr)}function Uu(){ms.point=Ms}function fc(){ms.point=Cf}function th(){qu(ju,lu)}function Cf(zt,rr){ms.point=qu,Ms(ju=il=zt,lu=As=rr)}function qu(zt,rr){var Br=zt-il,wr=rr-As,un=f(Br*Br+wr*wr);yl+=un*(il+zt)/2,mu+=un*(As+rr)/2,su+=un,un=As*zt-il*rr,cc+=un*(il+zt),Bl+=un*(As+rr),_l+=un*3,Ms(il=zt,As=rr)}function gs(zt){this._context=zt}gs.prototype={_radius:4.5,pointRadius:function(zt){return this._radius=zt,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(zt,rr){switch(this._point){case 0:{this._context.moveTo(zt,rr),this._point=1;break}case 1:{this._context.lineTo(zt,rr);break}default:{this._context.moveTo(zt+this._radius,rr),this._context.arc(zt,rr,this._radius,0,s);break}}},result:I};var Lf=E(),hc,nc,hf,ku,dc,Cu={point:I,lineStart:function(){Cu.point=Pc},lineEnd:function(){hc&&$c(nc,hf),Cu.point=I},polygonStart:function(){hc=!0},polygonEnd:function(){hc=null},result:function(){var zt=+Lf;return Lf.reset(),zt}};function Pc(zt,rr){Cu.point=$c,nc=ku=zt,hf=dc=rr}function $c(zt,rr){ku-=zt,dc-=rr,Lf.add(f(ku*ku+dc*dc)),ku=zt,dc=rr}function Zl(){this._string=[]}Zl.prototype={_radius:4.5,_circle:df(4.5),pointRadius:function(zt){return(zt=+zt)!==this._radius&&(this._radius=zt,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(zt,rr){switch(this._point){case 0:{this._string.push("M",zt,",",rr),this._point=1;break}case 1:{this._string.push("L",zt,",",rr);break}default:{this._circle==null&&(this._circle=df(this._radius)),this._string.push("M",zt,",",rr,this._circle);break}}},result:function(){if(this._string.length){var zt=this._string.join("");return this._string=[],zt}else return null}};function df(zt){return"m0,"+zt+"a"+zt+","+zt+" 0 1,1 0,"+-2*zt+"a"+zt+","+zt+" 0 1,1 0,"+2*zt+"z"}function Dc(zt,rr){var Br=4.5,wr,un;function Ln(Vn){return Vn&&(typeof Br=="function"&&un.pointRadius(+Br.apply(this,arguments)),j(Vn,wr(un))),un.result()}return Ln.area=function(Vn){return j(Vn,wr(Jo)),Jo.result()},Ln.measure=function(Vn){return j(Vn,wr(Cu)),Cu.result()},Ln.bounds=function(Vn){return j(Vn,wr(Ro)),Ro.result()},Ln.centroid=function(Vn){return j(Vn,wr(ms)),ms.result()},Ln.projection=function(Vn){return arguments.length?(wr=Vn==null?(zt=null,wo):(zt=Vn).stream,Ln):zt},Ln.context=function(Vn){return arguments.length?(un=Vn==null?(rr=null,new Zl):new gs(rr=Vn),typeof Br!="function"&&un.pointRadius(Br),Ln):rr},Ln.pointRadius=function(Vn){return arguments.length?(Br=typeof Vn=="function"?Vn:(un.pointRadius(+Vn),+Vn),Ln):Br},Ln.projection(zt).context(rr)}function Ic(zt){return{stream:Vu(zt)}}function Vu(zt){return function(rr){var Br=new Rc;for(var wr in zt)Br[wr]=zt[wr];return Br.stream=rr,Br}}function Rc(){}Rc.prototype={constructor:Rc,point:function(zt,rr){this.stream.point(zt,rr)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Lu(zt,rr,Br){var wr=zt.clipExtent&&zt.clipExtent();return zt.scale(150).translate([0,0]),wr!=null&&zt.clipExtent(null),j(Br,zt.stream(Ro)),rr(Ro.result()),wr!=null&&zt.clipExtent(wr),zt}function vf(zt,rr,Br){return Lu(zt,function(wr){var un=rr[1][0]-rr[0][0],Ln=rr[1][1]-rr[0][1],Vn=Math.min(un/(wr[1][0]-wr[0][0]),Ln/(wr[1][1]-wr[0][1])),Jn=+rr[0][0]+(un-Vn*(wr[1][0]+wr[0][0]))/2,ca=+rr[0][1]+(Ln-Vn*(wr[1][1]+wr[0][1]))/2;zt.scale(150*Vn).translate([Jn,ca])},Br)}function sl(zt,rr,Br){return vf(zt,[[0,0],rr],Br)}function Fc(zt,rr,Br){return Lu(zt,function(wr){var un=+rr,Ln=un/(wr[1][0]-wr[0][0]),Vn=(un-Ln*(wr[1][0]+wr[0][0]))/2,Jn=-Ln*wr[0][1];zt.scale(150*Ln).translate([Vn,Jn])},Br)}function Pu(zt,rr,Br){return Lu(zt,function(wr){var un=+rr,Ln=un/(wr[1][1]-wr[0][1]),Vn=-Ln*wr[0][0],Jn=(un-Ln*(wr[1][1]+wr[0][1]))/2;zt.scale(150*Ln).translate([Vn,Jn])},Br)}var vc=16,zc=i(30*m);function Hu(zt,rr){return+rr?Gu(zt,rr):uu(zt)}function uu(zt){return Vu({point:function(rr,Br){rr=zt(rr,Br),this.stream.point(rr[0],rr[1])}})}function Gu(zt,rr){function Br(wr,un,Ln,Vn,Jn,ca,Pa,Gn,oa,fa,La,qa,Bi,Ni){var Zi=Pa-wr,_i=Gn-un,Va=Zi*Zi+_i*_i;if(Va>4*rr&&Bi--){var Ga=Vn+fa,oo=Jn+La,go=ca+qa,Vo=f(Ga*Ga+oo*oo+go*go),Wo=b(go/=Vo),Yo=h(h(go)-1)rr||h((Zi*Rs+_i*ps)/Va-.5)>.3||Vn*fa+Jn*La+ca*qa2?vi[2]%360*m:0,Rs()):[Jn*c,ca*c,Pa*c]},Bo.angle=function(vi){return arguments.length?(oa=vi%360*m,Rs()):oa*c},Bo.reflectX=function(vi){return arguments.length?(fa=vi?-1:1,Rs()):fa<0},Bo.reflectY=function(vi){return arguments.length?(La=vi?-1:1,Rs()):La<0},Bo.precision=function(vi){return arguments.length?(go=Hu(Vo,oo=vi*vi),ps()):f(oo)},Bo.fitExtent=function(vi,Xo){return vf(Bo,vi,Xo)},Bo.fitSize=function(vi,Xo){return sl(Bo,vi,Xo)},Bo.fitWidth=function(vi,Xo){return Fc(Bo,vi,Xo)},Bo.fitHeight=function(vi,Xo){return Pu(Bo,vi,Xo)};function Rs(){var vi=bl(Br,0,0,fa,La,oa).apply(null,rr(Ln,Vn)),Xo=(oa?bl:Pf)(Br,wr-vi[0],un-vi[1],fa,La,oa);return Gn=Fa(Jn,ca,Pa),Vo=Qn(rr,Xo),Wo=Qn(Gn,Vo),go=Hu(Vo,oo),ps()}function ps(){return Yo=as=null,Bo}return function(){return rr=zt.apply(this,arguments),Bo.invert=rr.invert&&Ks,Rs()}}function wl(zt){var rr=0,Br=r/3,wr=Wu(zt),un=wr(rr,Br);return un.parallels=function(Ln){return arguments.length?wr(rr=Ln[0]*m,Br=Ln[1]*m):[rr*c,Br*c]},un}function pf(zt){var rr=i(zt);function Br(wr,un){return[wr*rr,_(un)/rr]}return Br.invert=function(wr,un){return[wr/rr,b(un*rr)]},Br}function Yu(zt,rr){var Br=_(zt),wr=(Br+_(rr))/2;if(h(wr)=.12&&Ni<.234&&Bi>=-.425&&Bi<-.214?un:Ni>=.166&&Ni<.234&&Bi>=-.214&&Bi<-.115?Vn:Br).invert(fa)},Gn.stream=function(fa){return zt&&rr===fa?zt:zt=cs([Br.stream(rr=fa),un.stream(fa),Vn.stream(fa)])},Gn.precision=function(fa){return arguments.length?(Br.precision(fa),un.precision(fa),Vn.precision(fa),oa()):Br.precision()},Gn.scale=function(fa){return arguments.length?(Br.scale(fa),un.scale(fa*.35),Vn.scale(fa),Gn.translate(Br.translate())):Br.scale()},Gn.translate=function(fa){if(!arguments.length)return Br.translate();var La=Br.scale(),qa=+fa[0],Bi=+fa[1];return wr=Br.translate(fa).clipExtent([[qa-.455*La,Bi-.238*La],[qa+.455*La,Bi+.238*La]]).stream(Pa),Ln=un.translate([qa-.307*La,Bi+.201*La]).clipExtent([[qa-.425*La+t,Bi+.12*La+t],[qa-.214*La-t,Bi+.234*La-t]]).stream(Pa),Jn=Vn.translate([qa-.205*La,Bi+.212*La]).clipExtent([[qa-.214*La+t,Bi+.166*La+t],[qa-.115*La-t,Bi+.234*La-t]]).stream(Pa),oa()},Gn.fitExtent=function(fa,La){return vf(Gn,fa,La)},Gn.fitSize=function(fa,La){return sl(Gn,fa,La)},Gn.fitWidth=function(fa,La){return Fc(Gn,fa,La)},Gn.fitHeight=function(fa,La){return Pu(Gn,fa,La)};function oa(){return zt=rr=null,Gn}return Gn.scale(1070)}function cu(zt){return function(rr,Br){var wr=i(rr),un=i(Br),Ln=zt(wr*un);return[Ln*un*_(rr),Ln*_(Br)]}}function Cl(zt){return function(rr,Br){var wr=f(rr*rr+Br*Br),un=zt(wr),Ln=_(un),Vn=i(un);return[g(rr*Ln,wr*Vn),b(wr&&Br*Ln/wr)]}}var Ll=cu(function(zt){return f(2/(1+zt))});Ll.invert=Cl(function(zt){return 2*b(zt/2)});function If(){return xl(Ll).scale(124.75).clipAngle(180-.001)}var yu=cu(function(zt){return(zt=A(zt))&&zt/_(zt)});yu.invert=Cl(function(zt){return zt});function Bc(){return xl(yu).scale(79.4188).clipAngle(180-.001)}function Tl(zt,rr){return[zt,M(u((n+rr)/2))]}Tl.invert=function(zt,rr){return[zt,2*p(S(rr))-n]};function ll(){return Jc(Tl).scale(961/s)}function Jc(zt){var rr=xl(zt),Br=rr.center,wr=rr.scale,un=rr.translate,Ln=rr.clipExtent,Vn=null,Jn,ca,Pa;rr.scale=function(oa){return arguments.length?(wr(oa),Gn()):wr()},rr.translate=function(oa){return arguments.length?(un(oa),Gn()):un()},rr.center=function(oa){return arguments.length?(Br(oa),Gn()):Br()},rr.clipExtent=function(oa){return arguments.length?(oa==null?Vn=Jn=ca=Pa=null:(Vn=+oa[0][0],Jn=+oa[0][1],ca=+oa[1][0],Pa=+oa[1][1]),Gn()):Vn==null?null:[[Vn,Jn],[ca,Pa]]};function Gn(){var oa=r*wr(),fa=rr(ba(rr.rotate()).invert([0,0]));return Ln(Vn==null?[[fa[0]-oa,fa[1]-oa],[fa[0]+oa,fa[1]+oa]]:zt===Tl?[[Math.max(fa[0]-oa,Vn),Jn],[Math.min(fa[0]+oa,ca),Pa]]:[[Vn,Math.max(fa[1]-oa,Jn)],[ca,Math.min(fa[1]+oa,Pa)]])}return Gn()}function Nc(zt){return u((n+zt)/2)}function Rf(zt,rr){var Br=i(zt),wr=zt===rr?_(zt):M(Br/i(rr))/M(Nc(rr)/Nc(zt)),un=Br*C(Nc(zt),wr)/wr;if(!wr)return Tl;function Ln(Vn,Jn){un>0?Jn<-n+t&&(Jn=-n+t):Jn>n-t&&(Jn=n-t);var ca=un/C(Nc(Jn),wr);return[ca*_(wr*Vn),un-ca*i(wr*Vn)]}return Ln.invert=function(Vn,Jn){var ca=un-Jn,Pa=T(wr)*f(Vn*Vn+ca*ca),Gn=g(Vn,h(ca))*T(ca);return ca*wr<0&&(Gn-=r*T(Vn)*T(ca)),[Gn/wr,2*p(C(un/Pa,1/wr))-n]},Ln}function fu(){return wl(Rf).scale(109.5).parallels([30,30])}function Du(zt,rr){return[zt,rr]}Du.invert=Du;function Iu(){return xl(Du).scale(152.63)}function Xu(zt,rr){var Br=i(zt),wr=zt===rr?_(zt):(Br-i(rr))/(rr-zt),un=Br/wr+zt;if(h(wr)t&&--wr>0);return[zt/(.8707+(Ln=Br*Br)*(-.131979+Ln*(-.013791+Ln*Ln*Ln*(.003971-.001529*Ln)))),Br]};function yf(){return xl(Hf).scale(175.295)}function ul(zt,rr){return[i(rr)*_(zt),_(rr)]}ul.invert=Cl(b);function Pl(){return xl(ul).scale(249.5).clipAngle(90+t)}function yc(zt,rr){var Br=i(rr),wr=1+i(zt)*Br;return[Br*_(zt)/wr,_(rr)/wr]}yc.invert=Cl(function(zt){return 2*p(zt)});function _c(){return xl(yc).scale(250).clipAngle(142)}function bc(zt,rr){return[M(u((n+rr)/2)),-zt]}bc.invert=function(zt,rr){return[-rr,2*p(S(zt))-n]};function ac(){var zt=Jc(bc),rr=zt.center,Br=zt.rotate;return zt.center=function(wr){return arguments.length?rr([-wr[1],wr[0]]):(wr=rr(),[wr[1],-wr[0]])},zt.rotate=function(wr){return arguments.length?Br([wr[0],wr[1],wr.length>2?wr[2]+90:90]):(wr=Br(),[wr[0],wr[1],wr[2]-90])},Br([0,0,90]).scale(159.155)}v.geoAlbers=Kc,v.geoAlbersUsa=Df,v.geoArea=$,v.geoAzimuthalEqualArea=If,v.geoAzimuthalEqualAreaRaw=Ll,v.geoAzimuthalEquidistant=Bc,v.geoAzimuthalEquidistantRaw=yu,v.geoBounds=vt,v.geoCentroid=Aa,v.geoCircle=ho,v.geoClipAntimeridian=Ut,v.geoClipCircle=Or,v.geoClipExtent=Ca,v.geoClipRectangle=Pn,v.geoConicConformal=fu,v.geoConicConformalRaw=Rf,v.geoConicEqualArea=pc,v.geoConicEqualAreaRaw=Yu,v.geoConicEquidistant=Qc,v.geoConicEquidistantRaw=Xu,v.geoContains=Io,v.geoDistance=zi,v.geoEqualEarth=Vf,v.geoEqualEarthRaw=gc,v.geoEquirectangular=Iu,v.geoEquirectangularRaw=Du,v.geoGnomonic=tf,v.geoGnomonicRaw=mf,v.geoGraticule=ws,v.geoGraticule10=Ko,v.geoIdentity=gf,v.geoInterpolate=ns,v.geoLength=ti,v.geoMercator=ll,v.geoMercatorRaw=Tl,v.geoNaturalEarth1=yf,v.geoNaturalEarth1Raw=Hf,v.geoOrthographic=Pl,v.geoOrthographicRaw=ul,v.geoPath=Dc,v.geoProjection=xl,v.geoProjectionMutator=Wu,v.geoRotation=ba,v.geoStereographic=_c,v.geoStereographicRaw=yc,v.geoStream=j,v.geoTransform=Ic,v.geoTransverseMercator=ac,v.geoTransverseMercatorRaw=bc,Object.defineProperty(v,"__esModule",{value:!0})})}}),H8=Ee({"src/lib/usa_location_names.js"(J,V){"use strict";var v={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},x=new Set(Object.values(v));V.exports={usaLocationAbbreviations:x,usaLocationList:v}}}),cw={};yn(cw,{COUNTRIES_X:()=>fw});var fw,G8=In({"src/lib/custom_country_codes.ts"(){"use strict";fw=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),Md=Ee({"src/lib/geo_location_utils.js"(J,V){"use strict";var v=Hn(),{COUNTRIES:x,createLookup:E}=j8(),{area:k}=U8(),{centroid:l}=q8(),{coordAll:e}=Py(),{geoBounds:t}=Dy(),a=j0(),r=po(),n=Us(),o=dl(),s=Y0(),{usaLocationAbbreviations:c,usaLocationList:m}=H8(),{COUNTRIES_X:h}=(G8(),ra(cw)),{lookupAlpha3:p}=E([...x,...h]),g={"ISO-3":a,"USA-states":w,"country names":i};function i(P){let j=p(P);return j||(r.log("Unrecognized country name: "+P+"."),!1)}function w(P){P=P.trim();let j=c.has(P.toUpperCase())?P.toUpperCase():m[P.toLowerCase()];return j||(r.log("Unrecognized US location: "+P+"."),!1)}function S(P,j,U){var Z;if(!j||typeof j!="string")return!1;let Q=g[P](j);if(Q){let re;if(P==="USA-states"){re=[];for(let ae of U)((Z=ae?.properties)==null?void 0:Z.gu)==="USA"&&re.push(ae)}else re=U;for(let ae of re)if(ae.id===Q)return ae;r.log(`Location with id ${Q} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(P){for(let j=0;j0&&P[j+1][0]<0)return j;return null}function _(P){var j=P.geometry,U=j.coordinates,Z=P.id,Q=[],re,ae,oe,H;switch(Z==="RUS"||Z==="FJI"?re=function(X){var K;if(C(X)===null)K=X;else for(K=new Array(X.length),H=0;HK?G[Y++]=[X[H][0]+M,X[H][1]]:H===K?(G[Y++]=X[H],G[Y++]=[X[H][0],-90]):G[Y++]=X[H];var q=s.tester(G);q.pts.pop(),Q.push(q)}:re=function(X){Q.push(s.tester(X))},j.type){case"MultiPolygon":for(ae=0;aeQ&&(Q=oe,U=ae)}else U=j;return!U||!U.coordinates.some(H=>H.length>0)?[NaN,NaN]:l(U).geometry.coordinates}function A(P){var j=window.PlotlyGeoAssets||{},U=[];function Z(H){return new Promise(function(X,K){v.json(H,function(G,Y){if(G){delete j[H];var q=G.status===404?'GeoJSON at URL "'+H+'" does not exist.':"Unexpected error while fetching from "+H;return K(new Error(q))}return j[H]=Y,X(Y)})})}function Q(H){return new Promise(function(X,K){var G=0,Y=setInterval(function(){if(j[H]&&j[H]!=="pending")return clearInterval(Y),X(j[H]);if(G>100)return clearInterval(Y),K("Unexpected error while fetching from "+H);G++},50)})}for(var re=0;reI(z(P));function z(P){try{return e(P)}catch{return[]}}function I(P){if(P.length===0)return null;if(P.length===1){let[re,ae]=P[0];return[re,ae,re,ae]}let[[j,U],[Z,Q]]=t({type:"MultiPoint",coordinates:P});return[j,U,F([j,Z])[1],Q]}var N=(P,j)=>j.fitbounds==="geojson"&&P.locationmode==="geojson-id",R=(P,j)=>N(P,j)?z(T(P)):[],B=(P,j)=>I(R(P,j));function F([P,j]){return[P,P>j?j+M:j]}V.exports={locationToFeature:S,feature2polygons:_,getTraceGeojson:T,extractTraceFeature:f,fetchTraceGeoData:A,boundsOfCoords:I,computeBbox:b,coordsOf:z,doesCrossAntiMeridian:C,fitGeojsonBbox:B,fitGeojsonCoords:R,unwrapLonRange:F,ANTIMERIDIAN_LON_SHIFT:M}}}),hw=Ee({"src/traces/scattergeo/style.js"(J,V){"use strict";var v=Hn(),x=yo(),E=Qa(),k=eh(),l=k.stylePoints,e=k.styleText;V.exports=function(r,n){n&&t(r,n)};function t(a,r){var n=r[0].trace,o=r[0].node3;o.style("opacity",r[0].trace.opacity),l(o,n,a),e(o,n,a),o.selectAll("path.js-line").style("fill","none").each(function(s){var c=v.select(this),m=s.trace,h=m.line||{};c.call(E.stroke,h.color).call(x.dashLine,h.dash||"",h.width||0),m.fill!=="none"&&c.call(E.fill,m.fillcolor)})}}}),Iy=Ee({"src/traces/scattergeo/plot.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=Cy().getTopojsonFeatures,k=Dm(),l=Md(),e=Ph().findExtremes,t=Qi().BADNUM,a=_h().calcMarkerSize,r=al(),n=hw();function o(m,h,p){var g=h.layers.frontplot.select(".scatterlayer"),i=x.makeTraceGroups(g,p,"trace scattergeo");function w(S,M){S.lonlat[0]===t&&v.select(M).remove()}i.selectAll("*").remove(),i.each(function(S){var M=v.select(this),C=S[0].trace;if(r.hasLines(C)||C.fill!=="none"){var _=k.calcTraceToLineCoords(S),T=C.fill!=="none"?k.makePolygon(_):k.makeLine(_);M.selectAll("path.js-line").data([{geojson:T,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(C)&&M.selectAll("path.point").data(x.identity).enter().append("path").classed("point",!0).each(function(f){w(f,this)}),r.hasText(C)&&M.selectAll("g").data(x.identity).enter().append("g").append("text").each(function(f){w(f,this)}),n(m,S)})}function s(m,h){var p=m[0].trace,g=h[p.geo],i=g._subplot,w=p._length,S,M;if(x.isArrayOrTypedArray(p.locations)){var C=p.locationmode,_=C==="geojson-id"?l.extractTraceFeature(m):E(p,i.topojson);for(S=0;S")}}}),Y8=Ee({"src/traces/scattergeo/event_data.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){x.lon=E.lon,x.lat=E.lat,x.location=E.loc?E.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(x.properties=t.fIn.properties),x}}}),X8=Ee({"src/traces/scattergeo/select.js"(J,V){"use strict";var v=al(),x=Qi().BADNUM;V.exports=function(k,l){var e=k.cd,t=k.xaxis,a=k.yaxis,r=[],n=e[0].trace,o,s,c,m,h,p=!v.hasMarkers(n)&&!v.hasText(n);if(p)return[];if(l===!1)for(h=0;hG?1:K>=G?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)<0?q=ee+1:$=ee}return q},right:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)>0?$=ee:q=ee+1}return q}}}function k(K){return function(G,Y){return x(K(G),Y)}}var l=E(x),e=l.right,t=l.left;function a(K,G){G==null&&(G=r);for(var Y=0,q=K.length-1,$=K[0],ee=new Array(q<0?0:q);YK?1:G>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,G){var Y=K.length,q=0,$=-1,ee=0,ne,fe,ye=0;if(G==null)for(;++$1)return ye/(q-1)}function m(K,G){var Y=c(K,G);return Y&&Math.sqrt(Y)}function h(K,G){var Y=K.length,q=-1,$,ee,ne;if(G==null){for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$))}else for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$));return[ee,ne]}var p=Array.prototype,g=p.slice,i=p.map;function w(K){return function(){return K}}function S(K){return K}function M(K,G,Y){K=+K,G=+G,Y=($=arguments.length)<2?(G=K,K=0,1):$<3?1:+Y;for(var q=-1,$=Math.max(0,Math.ceil((G-K)/Y))|0,ee=new Array($);++q<$;)ee[q]=K+q*Y;return ee}var C=Math.sqrt(50),_=Math.sqrt(10),T=Math.sqrt(2);function f(K,G,Y){var q,$=-1,ee,ne,fe;if(G=+G,K=+K,Y=+Y,K===G&&Y>0)return[K];if((q=G0)for(K=Math.ceil(K/fe),G=Math.floor(G/fe),ne=new Array(ee=Math.ceil(G-K+1));++$=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,$):-Math.pow(10,-$)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,G,Y){var q=Math.abs(G-K)/Math.max(0,Y),$=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/$;return ee>=C?$*=10:ee>=_?$*=5:ee>=T&&($*=2),GMe;)Ie.pop(),--Ue;var qe=new Array(Ue+1),ke;for(ee=0;ee<=Ue;++ee)ke=qe[ee]=[],ke.x0=ee>0?Ie[ee-1]:Ae,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,$=(q-1)*G,ee=Math.floor($),ne=+Y(K[ee],ee,K),fe=+Y(K[ee+1],ee+1,K);return ne+(fe-ne)*($-ee)}}function N(K,G,Y){return K=i.call(K,s).sort(x),Math.ceil((Y-G)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function R(K,G,Y){return Math.ceil((Y-G)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++qee&&(ee=$)}else for(;++q=$)for(ee=$;++qee&&(ee=$);return ee}function F(K,G){var Y=K.length,q=Y,$=-1,ee,ne=0;if(G==null)for(;++$=0;)for(ne=K[G],Y=ne.length;--Y>=0;)ee[--$]=ne[Y];return ee}function U(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++q$&&(ee=$)}else for(;++q=$)for(ee=$;++q$&&(ee=$);return ee}function Z(K,G){for(var Y=G.length,q=new Array(Y);Y--;)q[Y]=K[G[Y]];return q}function Q(K,G){if(Y=K.length){var Y,q=0,$=0,ee,ne=K[$];for(G==null&&(G=x);++q0?1:Xe<0?-1:0},p=Math.sin,g=Math.tan,i=1e-6,w=1e-12,S=Math.PI,M=S/2,C=S/4,_=Math.SQRT1_2,T=R(2),f=R(S),u=S*2,A=180/S,b=S/180;function z(Xe){return Xe?Xe/Math.sin(Xe):1}function I(Xe){return Xe>1?M:Xe<-1?-M:Math.asin(Xe)}function N(Xe){return Xe>1?0:Xe<-1?S:Math.acos(Xe)}function R(Xe){return Xe>0?Math.sqrt(Xe):0}function B(Xe){return Xe=a(2*Xe),(Xe-1)/(Xe+1)}function F(Xe){return(a(Xe)-a(-Xe))/2}function P(Xe){return(a(Xe)+a(-Xe))/2}function j(Xe){return n(Xe+R(Xe*Xe+1))}function U(Xe){return n(Xe+R(Xe*Xe-1))}function Z(Xe){var rt=g(Xe/2),pt=2*n(t(Xe/2))/(rt*rt);function _t(Nt,Bt){var Yt=t(Nt),Dr=t(Bt),Ur=p(Bt),kr=Dr*Yt,Wr=-((1-kr?n((1+kr)/2)/(1-kr):-.5)+pt/(1+kr));return[Wr*Dr*p(Nt),Wr*Ur]}return _t.invert=function(Nt,Bt){var Yt=R(Nt*Nt+Bt*Bt),Dr=-Xe/2,Ur=50,kr;if(!Yt)return[0,0];do{var Wr=Dr/2,sn=t(Wr),gn=p(Wr),Cn=gn/sn,Zn=-n(k(sn));Dr-=kr=(2/Cn*Zn-pt*Cn-Yt)/(-Zn/(gn*gn)+1-pt/(2*sn*sn))*(sn<0?.7:1)}while(k(kr)>i&&--Ur>0);var ya=p(Dr);return[e(Nt*ya,Yt*t(Dr)),I(Bt*ya/Yt)]},_t}function Q(){var Xe=M,rt=x.geoProjectionMutator(Z),pt=rt(Xe);return pt.radius=function(_t){return arguments.length?rt(Xe=_t*b):Xe*A},pt.scale(179.976).clipAngle(147)}function re(Xe,rt){var pt=t(rt),_t=z(N(pt*t(Xe/=2)));return[2*pt*p(Xe)*_t,p(rt)*_t]}re.invert=function(Xe,rt){if(!(Xe*Xe+4*rt*rt>S*S+i)){var pt=Xe,_t=rt,Nt=25;do{var Bt=p(pt),Yt=p(pt/2),Dr=t(pt/2),Ur=p(_t),kr=t(_t),Wr=p(2*_t),sn=Ur*Ur,gn=kr*kr,Cn=Yt*Yt,Zn=1-gn*Dr*Dr,ya=Zn?N(kr*Dr)*R(Na=1/Zn):Na=0,Na,wi=2*ya*kr*Yt-Xe,Yi=ya*Ur-rt,Ti=Na*(gn*Cn+ya*kr*Dr*sn),_o=Na*(.5*Bt*Wr-ya*2*Ur*Yt),bo=Na*.25*(Wr*Yt-ya*Ur*gn*Bt),Zo=Na*(sn*Dr+ya*Cn*kr),fs=_o*bo-Zo*Ti;if(!fs)break;var Po=(Yi*_o-wi*Zo)/fs,Es=(wi*bo-Yi*Ti)/fs;pt-=Po,_t-=Es}while((k(Po)>i||k(Es)>i)&&--Nt>0);return[pt,_t]}};function ae(){return x.geoProjection(re).scale(152.63)}function oe(Xe){var rt=p(Xe),pt=t(Xe),_t=Xe>=0?1:-1,Nt=g(_t*Xe),Bt=(1+rt-pt)/2;function Yt(Dr,Ur){var kr=t(Ur),Wr=t(Dr/=2);return[(1+kr)*p(Dr),(_t*Ur>-e(Wr,Nt)-.001?0:-_t*10)+Bt+p(Ur)*pt-(1+kr)*rt*Wr]}return Yt.invert=function(Dr,Ur){var kr=0,Wr=0,sn=50;do{var gn=t(kr),Cn=p(kr),Zn=t(Wr),ya=p(Wr),Na=1+Zn,wi=Na*Cn-Dr,Yi=Bt+ya*pt-Na*rt*gn-Ur,Ti=Na*gn/2,_o=-Cn*ya,bo=rt*Na*Cn/2,Zo=pt*Zn+rt*gn*ya,fs=_o*bo-Zo*Ti,Po=(Yi*_o-wi*Zo)/fs/2,Es=(wi*bo-Yi*Ti)/fs;k(Es)>2&&(Es/=2),kr-=Po,Wr-=Es}while((k(Po)>i||k(Es)>i)&&--sn>0);return _t*Wr>-e(t(kr),Nt)-.001?[kr*2,Wr]:null},Yt}function H(){var Xe=20*b,rt=Xe>=0?1:-1,pt=g(rt*Xe),_t=x.geoProjectionMutator(oe),Nt=_t(Xe),Bt=Nt.stream;return Nt.parallel=function(Yt){return arguments.length?(pt=g((rt=(Xe=Yt*b)>=0?1:-1)*Xe),_t(Xe)):Xe*A},Nt.stream=function(Yt){var Dr=Nt.rotate(),Ur=Bt(Yt),kr=(Nt.rotate([0,0]),Bt(Yt)),Wr=Nt.precision();return Nt.rotate(Dr),Ur.sphere=function(){kr.polygonStart(),kr.lineStart();for(var sn=rt*-180;rt*sn<180;sn+=rt*90)kr.point(sn,rt*90);if(Xe)for(;rt*(sn-=3*rt*Wr)>=-180;)kr.point(sn,rt*-e(t(sn*b/2),pt)*A);kr.lineEnd(),kr.polygonEnd()},Ur},Nt.scale(218.695).center([0,28.0974])}function X(Xe,rt){var pt=g(rt/2),_t=R(1-pt*pt),Nt=1+_t*t(Xe/=2),Bt=p(Xe)*_t/Nt,Yt=pt/Nt,Dr=Bt*Bt,Ur=Yt*Yt;return[4/3*Bt*(3+Dr-3*Ur),4/3*Yt*(3+3*Dr-Ur)]}X.invert=function(Xe,rt){if(Xe*=3/8,rt*=3/8,!Xe&&k(rt)>1)return null;var pt=Xe*Xe,_t=rt*rt,Nt=1+pt+_t,Bt=R((Nt-R(Nt*Nt-4*rt*rt))/2),Yt=I(Bt)/3,Dr=Bt?U(k(rt/Bt))/3:j(k(Xe))/3,Ur=t(Yt),kr=P(Dr),Wr=kr*kr-Ur*Ur;return[h(Xe)*2*e(F(Dr)*Ur,.25-Wr),h(rt)*2*e(kr*p(Yt),.25+Wr)]};function K(){return x.geoProjection(X).scale(66.1603)}var G=R(8),Y=n(1+T);function q(Xe,rt){var pt=k(rt);return ptw&&--_t>0);return[Xe/(t(pt)*(G-1/p(pt))),h(rt)*pt]};function $(){return x.geoProjection(q).scale(112.314)}function ee(Xe){var rt=2*S/Xe;function pt(_t,Nt){var Bt=x.geoAzimuthalEquidistantRaw(_t,Nt);if(k(_t)>M){var Yt=e(Bt[1],Bt[0]),Dr=R(Bt[0]*Bt[0]+Bt[1]*Bt[1]),Ur=rt*m((Yt-M)/rt)+M,kr=e(p(Yt-=Ur),2-t(Yt));Yt=Ur+I(S/Dr*p(kr))-kr,Bt[0]=Dr*t(Yt),Bt[1]=Dr*p(Yt)}return Bt}return pt.invert=function(_t,Nt){var Bt=R(_t*_t+Nt*Nt);if(Bt>M){var Yt=e(Nt,_t),Dr=rt*m((Yt-M)/rt)+M,Ur=Yt>Dr?-1:1,kr=Bt*t(Dr-Yt),Wr=1/g(Ur*N((kr-S)/R(S*(S-2*kr)+Bt*Bt)));Yt=Dr+2*l((Wr+Ur*R(Wr*Wr-3))/3),_t=Bt*t(Yt),Nt=Bt*p(Yt)}return x.geoAzimuthalEquidistantRaw.invert(_t,Nt)},pt}function ne(){var Xe=5,rt=x.geoProjectionMutator(ee),pt=rt(Xe),_t=pt.stream,Nt=.01,Bt=-t(Nt*b),Yt=p(Nt*b);return pt.lobes=function(Dr){return arguments.length?rt(Xe=+Dr):Xe},pt.stream=function(Dr){var Ur=pt.rotate(),kr=_t(Dr),Wr=(pt.rotate([0,0]),_t(Dr));return pt.rotate(Ur),kr.sphere=function(){Wr.polygonStart(),Wr.lineStart();for(var sn=0,gn=360/Xe,Cn=2*S/Xe,Zn=90-180/Xe,ya=M;sn0&&k(Nt)>i);return _t<0?NaN:pt}function Me(Xe,rt,pt){return rt===void 0&&(rt=40),pt===void 0&&(pt=w),function(_t,Nt,Bt,Yt){var Dr,Ur,kr;Bt=Bt===void 0?0:+Bt,Yt=Yt===void 0?0:+Yt;for(var Wr=0;WrDr){Bt-=Ur/=2,Yt-=kr/=2;continue}Dr=Zn;var ya=(Bt>0?-1:1)*pt,Na=(Yt>0?-1:1)*pt,wi=Xe(Bt+ya,Yt),Yi=Xe(Bt,Yt+Na),Ti=(wi[0]-sn[0])/ya,_o=(wi[1]-sn[1])/ya,bo=(Yi[0]-sn[0])/Na,Zo=(Yi[1]-sn[1])/Na,fs=Zo*Ti-_o*bo,Po=(k(fs)<.5?.5:1)/fs;if(Ur=(Cn*bo-gn*Zo)*Po,kr=(gn*_o-Cn*Ti)*Po,Bt+=Ur,Yt+=kr,k(Ur)0&&(Dr[1]*=1+Ur/1.5*Dr[0]*Dr[0]),Dr}return _t.invert=Me(_t),_t}function Ue(){return x.geoProjection(Ie()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function qe(Xe,rt){var pt=Xe*p(rt),_t=30,Nt;do rt-=Nt=(rt+p(rt)-pt)/(1+t(rt));while(k(Nt)>i&&--_t>0);return rt/2}function ke(Xe,rt,pt){function _t(Nt,Bt){return[Xe*Nt*t(Bt=qe(pt,Bt)),rt*p(Bt)]}return _t.invert=function(Nt,Bt){return Bt=I(Bt/rt),[Nt/(Xe*t(Bt)),I((2*Bt+p(2*Bt))/pt)]},_t}var ge=ke(T/M,T,S);function ue(){return x.geoProjection(ge).scale(169.529)}var ve=2.00276,se=1.11072;function Te(Xe,rt){var pt=qe(S,rt);return[ve*Xe/(1/t(rt)+se/t(pt)),(rt+T*p(pt))/ve]}Te.invert=function(Xe,rt){var pt=ve*rt,_t=rt<0?-C:C,Nt=25,Bt,Yt;do Yt=pt-T*p(_t),_t-=Bt=(p(2*_t)+2*_t-S*p(Yt))/(2*t(2*_t)+2+S*t(Yt)*T*t(_t));while(k(Bt)>i&&--Nt>0);return Yt=pt-T*p(_t),[Xe*(1/t(Yt)+se/t(_t))/ve,Yt]};function Fe(){return x.geoProjection(Te).scale(160.857)}function We(Xe){var rt=0,pt=x.geoProjectionMutator(Xe),_t=pt(rt);return _t.parallel=function(Nt){return arguments.length?pt(rt=Nt*b):rt*A},_t}function Ge(Xe,rt){return[Xe*t(rt),rt]}Ge.invert=function(Xe,rt){return[Xe/t(rt),rt]};function gt(){return x.geoProjection(Ge).scale(152.63)}function mt(Xe){if(!Xe)return Ge;var rt=1/g(Xe);function pt(_t,Nt){var Bt=rt+Xe-Nt,Yt=Bt&&_t*t(Nt)/Bt;return[Bt*p(Yt),rt-Bt*t(Yt)]}return pt.invert=function(_t,Nt){var Bt=R(_t*_t+(Nt=rt-Nt)*Nt),Yt=rt+Xe-Bt;return[Bt/t(Yt)*e(_t,Nt),Yt]},pt}function Tt(){return We(mt).scale(123.082).center([0,26.1441]).parallel(45)}function At(Xe){function rt(pt,_t){var Nt=M-_t,Bt=Nt&&pt*Xe*p(Nt)/Nt;return[Nt*p(Bt)/Xe,M-Nt*t(Bt)]}return rt.invert=function(pt,_t){var Nt=pt*Xe,Bt=M-_t,Yt=R(Nt*Nt+Bt*Bt),Dr=e(Nt,Bt);return[(Yt?Yt/p(Yt):1)*Dr/Xe,M-Yt]},rt}function Kt(){var Xe=.5,rt=x.geoProjectionMutator(At),pt=rt(Xe);return pt.fraction=function(_t){return arguments.length?rt(Xe=+_t):Xe},pt.scale(158.837)}var nr=ke(1,4/S,S);function _r(){return x.geoProjection(nr).scale(152.63)}function Zt(Xe,rt,pt,_t,Nt,Bt){var Yt=t(Bt),Dr;if(k(Xe)>1||k(Bt)>1)Dr=N(pt*Nt+rt*_t*Yt);else{var Ur=p(Xe/2),kr=p(Bt/2);Dr=2*I(R(Ur*Ur+rt*_t*kr*kr))}return k(Dr)>i?[Dr,e(_t*p(Bt),rt*Nt-pt*_t*Yt)]:[0,0]}function sr(Xe,rt,pt){return N((Xe*Xe+rt*rt-pt*pt)/(2*Xe*rt))}function Ot(Xe){return Xe-2*S*r((Xe+S)/(2*S))}function vt(Xe,rt,pt){for(var _t=[[Xe[0],Xe[1],p(Xe[1]),t(Xe[1])],[rt[0],rt[1],p(rt[1]),t(rt[1])],[pt[0],pt[1],p(pt[1]),t(pt[1])]],Nt=_t[2],Bt,Yt=0;Yt<3;++Yt,Nt=Bt)Bt=_t[Yt],Nt.v=Zt(Bt[1]-Nt[1],Nt[3],Nt[2],Bt[3],Bt[2],Bt[0]-Nt[0]),Nt.point=[0,0];var Dr=sr(_t[0].v[0],_t[2].v[0],_t[1].v[0]),Ur=sr(_t[0].v[0],_t[1].v[0],_t[2].v[0]),kr=S-Dr;_t[2].point[1]=0,_t[0].point[0]=-(_t[1].point[0]=_t[0].v[0]/2);var Wr=[_t[2].point[0]=_t[0].point[0]+_t[2].v[0]*t(Dr),2*(_t[0].point[1]=_t[1].point[1]=_t[2].v[0]*p(Dr))];function sn(gn,Cn){var Zn=p(Cn),ya=t(Cn),Na=new Array(3),wi;for(wi=0;wi<3;++wi){var Yi=_t[wi];if(Na[wi]=Zt(Cn-Yi[1],Yi[3],Yi[2],ya,Zn,gn-Yi[0]),!Na[wi][0])return Yi.point;Na[wi][1]=Ot(Na[wi][1]-Yi.v[1])}var Ti=Wr.slice();for(wi=0;wi<3;++wi){var _o=wi==2?0:wi+1,bo=sr(_t[wi].v[0],Na[wi][0],Na[_o][0]);Na[wi][1]<0&&(bo=-bo),wi?wi==1?(bo=Ur-bo,Ti[0]-=Na[wi][0]*t(bo),Ti[1]-=Na[wi][0]*p(bo)):(bo=kr-bo,Ti[0]+=Na[wi][0]*t(bo),Ti[1]+=Na[wi][0]*p(bo)):(Ti[0]+=Na[wi][0]*t(bo),Ti[1]-=Na[wi][0]*p(bo))}return Ti[0]/=3,Ti[1]/=3,Ti}return sn}function ht(Xe){return Xe[0]*=b,Xe[1]*=b,Xe}function Re(){return Be([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Be(Xe,rt,pt){var _t=x.geoCentroid({type:"MultiPoint",coordinates:[Xe,rt,pt]}),Nt=[-_t[0],-_t[1]],Bt=x.geoRotation(Nt),Yt=vt(ht(Bt(Xe)),ht(Bt(rt)),ht(Bt(pt)));Yt.invert=Me(Yt);var Dr=x.geoProjection(Yt).rotate(Nt),Ur=Dr.center;return delete Dr.rotate,Dr.center=function(kr){return arguments.length?Ur(Bt(kr)):Bt.invert(Ur())},Dr.clipAngle(90)}function He(Xe,rt){var pt=R(1-p(rt));return[2/f*Xe*pt,f*(1-pt)]}He.invert=function(Xe,rt){var pt=(pt=rt/f-1)*pt;return[pt>0?Xe*R(S/pt)/2:0,I(1-pt)]};function $e(){return x.geoProjection(He).scale(95.6464).center([0,30])}function Ze(Xe){var rt=g(Xe);function pt(_t,Nt){return[_t,(_t?_t/p(_t):1)*(p(Nt)*t(_t)-rt*t(Nt))]}return pt.invert=rt?function(_t,Nt){_t&&(Nt*=p(_t)/_t);var Bt=t(_t);return[_t,2*e(R(Bt*Bt+rt*rt-Nt*Nt)-Bt,rt-Nt)]}:function(_t,Nt){return[_t,I(_t?Nt*g(_t)/_t:Nt)]},pt}function Je(){return We(Ze).scale(249.828).clipAngle(90)}var Mt=R(3);function dt(Xe,rt){return[Mt*Xe*(2*t(2*rt/3)-1)/f,Mt*f*p(rt/3)]}dt.invert=function(Xe,rt){var pt=3*I(rt/(Mt*f));return[f*Xe/(Mt*(2*t(2*pt/3)-1)),pt]};function Dt(){return x.geoProjection(dt).scale(156.19)}function Ct(Xe){var rt=t(Xe);function pt(_t,Nt){return[_t*rt,p(Nt)/rt]}return pt.invert=function(_t,Nt){return[_t/rt,I(Nt*rt)]},pt}function Vt(){return We(Ct).parallel(38.58).scale(195.044)}function Ht(Xe){var rt=t(Xe);function pt(_t,Nt){return[_t*rt,(1+rt)*g(Nt/2)]}return pt.invert=function(_t,Nt){return[_t/rt,l(Nt/(1+rt))*2]},pt}function Wt(){return We(Ht).scale(124.75)}function Sr(Xe,rt){var pt=R(8/(3*S));return[pt*Xe*(1-k(rt)/S),pt*rt]}Sr.invert=function(Xe,rt){var pt=R(8/(3*S)),_t=rt/pt;return[Xe/(pt*(1-k(_t)/S)),_t]};function on(){return x.geoProjection(Sr).scale(165.664)}function $t(Xe,rt){var pt=R(4-3*p(k(rt)));return[2/R(6*S)*Xe*pt,h(rt)*R(2*S/3)*(2-pt)]}$t.invert=function(Xe,rt){var pt=2-k(rt)/R(2*S/3);return[Xe*R(6*S)/(2*pt),h(rt)*I((4-pt*pt)/3)]};function It(){return x.geoProjection($t).scale(165.664)}function ir(Xe,rt){var pt=R(S*(4+S));return[2/pt*Xe*(1+R(1-4*rt*rt/(S*S))),4/pt*rt]}ir.invert=function(Xe,rt){var pt=R(S*(4+S))/2;return[Xe*pt/(1+R(1-rt*rt*(4+S)/(4*S))),rt*pt/2]};function cr(){return x.geoProjection(ir).scale(180.739)}function fr(Xe,rt){var pt=(2+M)*p(rt);rt/=2;for(var _t=0,Nt=1/0;_t<10&&k(Nt)>i;_t++){var Bt=t(rt);rt-=Nt=(rt+p(rt)*(Bt+2)-pt)/(2*Bt*(1+Bt))}return[2/R(S*(4+S))*Xe*(1+t(rt)),2*R(S/(4+S))*p(rt)]}fr.invert=function(Xe,rt){var pt=rt*R((4+S)/S)/2,_t=I(pt),Nt=t(_t);return[Xe/(2/R(S*(4+S))*(1+Nt)),I((_t+pt*(Nt+2))/(2+M))]};function Ir(){return x.geoProjection(fr).scale(180.739)}function ln(Xe,rt){return[Xe*(1+t(rt))/R(2+S),2*rt/R(2+S)]}ln.invert=function(Xe,rt){var pt=R(2+S),_t=rt*pt/2;return[pt*Xe/(1+t(_t)),_t]};function nn(){return x.geoProjection(ln).scale(173.044)}function wn(Xe,rt){for(var pt=(1+M)*p(rt),_t=0,Nt=1/0;_t<10&&k(Nt)>i;_t++)rt-=Nt=(rt+p(rt)-pt)/(1+t(rt));return pt=R(2+S),[Xe*(1+t(rt))/pt,2*rt/pt]}wn.invert=function(Xe,rt){var pt=1+M,_t=R(pt/2);return[Xe*2*_t/(1+t(rt*=_t)),I((rt+p(rt))/pt)]};function Un(){return x.geoProjection(wn).scale(173.044)}var jn=3+2*T;function Aa(Xe,rt){var pt=p(Xe/=2),_t=t(Xe),Nt=R(t(rt)),Bt=t(rt/=2),Yt=p(rt)/(Bt+T*_t*Nt),Dr=R(2/(1+Yt*Yt)),Ur=R((T*Bt+(_t+pt)*Nt)/(T*Bt+(_t-pt)*Nt));return[jn*(Dr*(Ur-1/Ur)-2*n(Ur)),jn*(Dr*Yt*(Ur+1/Ur)-2*l(Yt))]}Aa.invert=function(Xe,rt){if(!(Bt=X.invert(Xe/1.2,rt*1.065)))return null;var pt=Bt[0],_t=Bt[1],Nt=20,Bt;Xe/=jn,rt/=jn;do{var Yt=pt/2,Dr=_t/2,Ur=p(Yt),kr=t(Yt),Wr=p(Dr),sn=t(Dr),gn=t(_t),Cn=R(gn),Zn=Wr/(sn+T*kr*Cn),ya=Zn*Zn,Na=R(2/(1+ya)),wi=T*sn+(kr+Ur)*Cn,Yi=T*sn+(kr-Ur)*Cn,Ti=wi/Yi,_o=R(Ti),bo=_o-1/_o,Zo=_o+1/_o,fs=Na*bo-2*n(_o)-Xe,Po=Na*Zn*Zo-2*l(Zn)-rt,Es=Wr&&_*Cn*Ur*ya/Wr,cl=(T*kr*sn+Cn)/(2*(sn+T*kr*Cn)*(sn+T*kr*Cn)*Cn),ql=-.5*Zn*Na*Na*Na,Js=ql*Es,Tu=ql*cl,Li=(Li=2*sn+T*Cn*(kr-Ur))*Li*_o,Vi=(T*kr*sn*Cn+gn)/Li,fl=-(T*Ur*Wr)/(Cn*Li),Ku=bo*Js-2*Vi/_o+Na*(Vi+Vi/Ti),tu=bo*Tu-2*fl/_o+Na*(fl+fl/Ti),Bs=Zn*Zo*Js-2*Es/(1+ya)+Na*Zo*Es+Na*Zn*(Vi-Vi/Ti),oc=Zn*Zo*Tu-2*cl/(1+ya)+Na*Zo*cl+Na*Zn*(fl-fl/Ti),du=tu*Bs-oc*Ku;if(!du)break;var hl=(Po*tu-fs*oc)/du,Uc=(fs*Bs-Po*Ku)/du;pt-=hl,_t=o(-M,s(M,_t-Uc))}while((k(hl)>i||k(Uc)>i)&&--Nt>0);return k(k(_t)-M)_t){var sn=R(Wr),gn=e(kr,Ur),Cn=pt*m(gn/pt),Zn=gn-Cn,ya=Xe*t(Zn),Na=(Xe*p(Zn)-Zn*p(ya))/(M-ya),wi=Kn(Zn,Na),Yi=(S-Xe)/ot(wi,ya,S);Ur=sn;var Ti=50,_o;do Ur-=_o=(Xe+ot(wi,ya,Ur)*Yi-sn)/(wi(Ur)*Yi);while(k(_o)>i&&--Ti>0);kr=Zn*p(Ur),Ur_t){var Ur=R(Dr),kr=e(Yt,Bt),Wr=pt*m(kr/pt),sn=kr-Wr;Bt=Ur*t(sn),Yt=Ur*p(sn);for(var gn=Bt-M,Cn=p(Bt),Zn=Yt/Cn,ya=Bti||k(Zn)>i)&&--ya>0);return[sn,gn]},Ur}var ur=hr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Tr(){return x.geoProjection(ur).scale(149.995)}var Rr=hr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Fr(){return x.geoProjection(Rr).scale(153.93)}var at=hr(5/6*S,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return x.geoProjection(at).scale(130.945)}function Ut(Xe,rt){var pt=Xe*Xe,_t=rt*rt;return[Xe*(1-.162388*_t)*(.87-952426e-9*pt*pt),rt*(1+_t/12)]}Ut.invert=function(Xe,rt){var pt=Xe,_t=rt,Nt=50,Bt;do{var Yt=_t*_t;_t-=Bt=(_t*(1+Yt/12)-rt)/(1+Yt/4)}while(k(Bt)>i&&--Nt>0);Nt=50,Xe/=1-.162388*Yt;do{var Dr=(Dr=pt*pt)*Dr;pt-=Bt=(pt*(.87-952426e-9*Dr)-Xe)/(.87-.00476213*Dr)}while(k(Bt)>i&&--Nt>0);return[pt,_t]};function ar(){return x.geoProjection(Ut).scale(131.747)}var Er=hr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function br(){return x.geoProjection(Er).scale(131.087)}function Or(Xe){var rt=Xe(M,0)[0]-Xe(-M,0)[0];function pt(_t,Nt){var Bt=_t>0?-.5:.5,Yt=Xe(_t+Bt*S,Nt);return Yt[0]-=Bt*rt,Yt}return Xe.invert&&(pt.invert=function(_t,Nt){var Bt=_t>0?-.5:.5,Yt=Xe.invert(_t+Bt*rt,Nt),Dr=Yt[0]-Bt*S;return Dr<-S?Dr+=2*S:Dr>S&&(Dr-=2*S),Yt[0]=Dr,Yt}),pt}function Pr(Xe,rt){var pt=h(Xe),_t=h(rt),Nt=t(rt),Bt=t(Xe)*Nt,Yt=p(Xe)*Nt,Dr=p(_t*rt);Xe=k(e(Yt,Dr)),rt=I(Bt),k(Xe-M)>i&&(Xe%=M);var Ur=hn(Xe>S/4?M-Xe:Xe,rt);return Xe>S/4&&(Dr=Ur[0],Ur[0]=-Ur[1],Ur[1]=-Dr),Ur[0]*=pt,Ur[1]*=-_t,Ur}Pr.invert=function(Xe,rt){k(Xe)>1&&(Xe=h(Xe)*2-Xe),k(rt)>1&&(rt=h(rt)*2-rt);var pt=h(Xe),_t=h(rt),Nt=-pt*Xe,Bt=-_t*rt,Yt=Bt/Nt<1,Dr=zn(Yt?Bt:Nt,Yt?Nt:Bt),Ur=Dr[0],kr=Dr[1],Wr=t(kr);return Yt&&(Ur=-M-Ur),[pt*(e(p(Ur)*Wr,-p(kr))+S),_t*I(t(Ur)*Wr)]};function hn(Xe,rt){if(rt===M)return[0,0];var pt=p(rt),_t=pt*pt,Nt=_t*_t,Bt=1+Nt,Yt=1+3*Nt,Dr=1-Nt,Ur=I(1/R(Bt)),kr=Dr+_t*Bt*Ur,Wr=(1-pt)/kr,sn=R(Wr),gn=Wr*Bt,Cn=R(gn),Zn=sn*Dr,ya,Na;if(Xe===0)return[0,-(Zn+_t*Cn)];var wi=t(rt),Yi=1/wi,Ti=2*pt*wi,_o=(-3*_t+Ur*Yt)*Ti,bo=(-kr*wi-(1-pt)*_o)/(kr*kr),Zo=.5*bo/sn,fs=Dr*Zo-2*_t*sn*Ti,Po=_t*Bt*bo+Wr*Yt*Ti,Es=-Yi*Ti,cl=-Yi*Po,ql=-2*Yi*fs,Js=4*Xe/S,Tu;if(Xe>.222*S||rt.175*S){if(ya=(Zn+_t*R(gn*(1+Nt)-Zn*Zn))/(1+Nt),Xe>S/4)return[ya,ya];var Li=ya,Vi=.5*ya;ya=.5*(Vi+Li),Na=50;do{var fl=R(gn-ya*ya),Ku=ya*(ql+Es*fl)+cl*I(ya/Cn)-Js;if(!Ku)break;Ku<0?Vi=ya:Li=ya,ya=.5*(Vi+Li)}while(k(Li-Vi)>i&&--Na>0)}else{ya=i,Na=25;do{var tu=ya*ya,Bs=R(gn-tu),oc=ql+Es*Bs,du=ya*oc+cl*I(ya/Cn)-Js,hl=oc+(cl-Es*tu)/Bs;ya-=Tu=Bs?du/hl:0}while(k(Tu)>i&&--Na>0)}return[ya,-Zn-_t*R(gn-ya*ya)]}function zn(Xe,rt){for(var pt=0,_t=1,Nt=.5,Bt=50;;){var Yt=Nt*Nt,Dr=R(Nt),Ur=I(1/R(1+Yt)),kr=1-Yt+Nt*(1+Yt)*Ur,Wr=(1-Dr)/kr,sn=R(Wr),gn=Wr*(1+Yt),Cn=sn*(1-Yt),Zn=gn-Xe*Xe,ya=R(Zn),Na=rt+Cn+Nt*ya;if(k(_t-pt)0?pt=Nt:_t=Nt,Nt=.5*(pt+_t)}if(!Bt)return null;var wi=I(Dr),Yi=t(wi),Ti=1/Yi,_o=2*Dr*Yi,bo=(-3*Nt+Ur*(1+3*Yt))*_o,Zo=(-kr*Yi-(1-Dr)*bo)/(kr*kr),fs=.5*Zo/sn,Po=(1-Yt)*fs-2*Nt*sn*_o,Es=-2*Ti*Po,cl=-Ti*_o,ql=-Ti*(Nt*(1+Yt)*Zo+Wr*(1+3*Yt)*_o);return[S/4*(Xe*(Es+cl*ya)+ql*I(Xe/R(gn))),wi]}function Pn(){return x.geoProjection(Or(Pr)).scale(239.75)}function Ca(Xe,rt,pt){var _t,Nt,Bt;return Xe?(_t=ma(Xe,pt),rt?(Nt=ma(rt,1-pt),Bt=Nt[1]*Nt[1]+pt*_t[0]*_t[0]*Nt[0]*Nt[0],[[_t[0]*Nt[2]/Bt,_t[1]*_t[2]*Nt[0]*Nt[1]/Bt],[_t[1]*Nt[1]/Bt,-_t[0]*_t[2]*Nt[0]*Nt[2]/Bt],[_t[2]*Nt[1]*Nt[2]/Bt,-pt*_t[0]*_t[1]*Nt[0]/Bt]]):[[_t[0],0],[_t[1],0],[_t[2],0]]):(Nt=ma(rt,1-pt),[[0,Nt[0]/Nt[1]],[1/Nt[1],0],[Nt[2]/Nt[1],0]])}function ma(Xe,rt){var pt,_t,Nt,Bt,Yt;if(rt=1-i)return pt=(1-rt)/4,_t=P(Xe),Bt=B(Xe),Nt=1/_t,Yt=_t*F(Xe),[Bt+pt*(Yt-Xe)/(_t*_t),Nt-pt*Bt*Nt*(Yt-Xe),Nt+pt*Bt*Nt*(Yt+Xe),2*l(a(Xe))-M+pt*(Yt-Xe)/_t];var Dr=[1,0,0,0,0,0,0,0,0],Ur=[R(rt),0,0,0,0,0,0,0,0],kr=0;for(_t=R(1-rt),Yt=1;k(Ur[kr]/Dr[kr])>i&&kr<8;)pt=Dr[kr++],Ur[kr]=(pt-_t)/2,Dr[kr]=(pt+_t)/2,_t=R(pt*_t),Yt*=2;Nt=Yt*Dr[kr]*Xe;do Bt=Ur[kr]*p(_t=Nt)/Dr[kr],Nt=(I(Bt)+Nt)/2;while(--kr);return[p(Nt),Bt=t(Nt),Bt/t(Nt-_t),Nt]}function bi(Xe,rt,pt){var _t=k(Xe),Nt=k(rt),Bt=F(Nt);if(_t){var Yt=1/p(_t),Dr=1/(g(_t)*g(_t)),Ur=-(Dr+pt*(Bt*Bt*Yt*Yt)-1+pt),kr=(pt-1)*Dr,Wr=(-Ur+R(Ur*Ur-4*kr))/2;return[ga(l(1/R(Wr)),pt)*h(Xe),ga(l(R((Wr/Dr-1)/pt)),1-pt)*h(rt)]}return[0,ga(l(Bt),1-pt)*h(rt)]}function ga(Xe,rt){if(!rt)return Xe;if(rt===1)return n(g(Xe/2+C));for(var pt=1,_t=R(1-rt),Nt=R(rt),Bt=0;k(Nt)>i;Bt++){if(Xe%S){var Yt=l(_t*g(Xe)/pt);Yt<0&&(Yt+=S),Xe+=Yt+~~(Xe/S)*S}else Xe+=Xe;Nt=(pt+_t)/2,_t=R(pt*_t),Nt=((pt=Nt)-_t)/2}return Xe/(c(2,Bt)*pt)}function eo(Xe,rt){var pt=(T-1)/(T+1),_t=R(1-pt*pt),Nt=ga(M,_t*_t),Bt=-1,Yt=n(g(S/4+k(rt)/2)),Dr=a(Bt*Yt)/R(pt),Ur=si(Dr*t(Bt*Xe),Dr*p(Bt*Xe)),kr=bi(Ur[0],Ur[1],_t*_t);return[-kr[1],(rt>=0?1:-1)*(.5*Nt-kr[0])]}function si(Xe,rt){var pt=Xe*Xe,_t=rt+1,Nt=1-pt-rt*rt;return[.5*((Xe>=0?M:-M)-e(Nt,2*Xe)),-.25*n(Nt*Nt+4*pt)+.5*n(_t*_t+pt)]}function Ao(Xe,rt){var pt=rt[0]*rt[0]+rt[1]*rt[1];return[(Xe[0]*rt[0]+Xe[1]*rt[1])/pt,(Xe[1]*rt[0]-Xe[0]*rt[1])/pt]}eo.invert=function(Xe,rt){var pt=(T-1)/(T+1),_t=R(1-pt*pt),Nt=ga(M,_t*_t),Bt=-1,Yt=Ca(.5*Nt-rt,-Xe,_t*_t),Dr=Ao(Yt[0],Yt[1]),Ur=e(Dr[1],Dr[0])/Bt;return[Ur,2*l(a(.5/Bt*n(pt*Dr[0]*Dr[0]+pt*Dr[1]*Dr[1])))-M]};function ro(){return x.geoProjection(Or(eo)).scale(151.496)}function Sa(Xe){var rt=p(Xe),pt=t(Xe),_t=Gi(Xe);_t.invert=Gi(-Xe);function Nt(Bt,Yt){var Dr=_t(Bt,Yt);Bt=Dr[0],Yt=Dr[1];var Ur=p(Yt),kr=t(Yt),Wr=t(Bt),sn=N(rt*Ur+pt*kr*Wr),gn=p(sn),Cn=k(gn)>i?sn/gn:1;return[Cn*pt*p(Bt),(k(Bt)>M?Cn:-Cn)*(rt*kr-pt*Ur*Wr)]}return Nt.invert=function(Bt,Yt){var Dr=R(Bt*Bt+Yt*Yt),Ur=-p(Dr),kr=t(Dr),Wr=Dr*kr,sn=-Yt*Ur,gn=Dr*rt,Cn=R(Wr*Wr+sn*sn-gn*gn),Zn=e(Wr*gn+sn*Cn,sn*gn-Wr*Cn),ya=(Dr>M?-1:1)*e(Bt*Ur,Dr*t(Zn)*kr+Yt*p(Zn)*Ur);return _t.invert(ya,Zn)},Nt}function Gi(Xe){var rt=p(Xe),pt=t(Xe);return function(_t,Nt){var Bt=t(Nt),Yt=t(_t)*Bt,Dr=p(_t)*Bt,Ur=p(Nt);return[e(Dr,Yt*pt-Ur*rt),I(Ur*pt+Yt*rt)]}}function ti(){var Xe=0,rt=x.geoProjectionMutator(Sa),pt=rt(Xe),_t=pt.rotate,Nt=pt.stream,Bt=x.geoCircle();return pt.parallel=function(Yt){if(!arguments.length)return Xe*A;var Dr=pt.rotate();return rt(Xe=Yt*b).rotate(Dr)},pt.rotate=function(Yt){return arguments.length?(_t.call(pt,[Yt[0],Yt[1]-Xe*A]),Bt.center([-Yt[0],-Yt[1]]),pt):(Yt=_t.call(pt),Yt[1]+=Xe*A,Yt)},pt.stream=function(Yt){return Yt=Nt(Yt),Yt.sphere=function(){Yt.polygonStart();var Dr=.01,Ur=Bt.radius(90-Dr)().coordinates[0],kr=Ur.length-1,Wr=-1,sn;for(Yt.lineStart();++Wr=0;)Yt.point((sn=Ur[Wr])[0],sn[1]);Yt.lineEnd(),Yt.polygonEnd()},Yt},pt.scale(79.4187).parallel(45).clipAngle(180-.001)}var fi=3,xo=I(1-1/fi)*A,zi=Ct(0);function so(Xe){var rt=xo*b,pt=He(S,rt)[0]-He(-S,rt)[0],_t=zi(0,rt)[1],Nt=He(0,rt)[1],Bt=f-Nt,Yt=u/Xe,Dr=4/u,Ur=_t+Bt*Bt*4/u;function kr(Wr,sn){var gn,Cn=k(sn);if(Cn>rt){var Zn=s(Xe-1,o(0,r((Wr+S)/Yt)));Wr+=S*(Xe-1)/Xe-Zn*Yt,gn=He(Wr,Cn),gn[0]=gn[0]*u/pt-u*(Xe-1)/(2*Xe)+Zn*u/Xe,gn[1]=_t+(gn[1]-Nt)*4*Bt/u,sn<0&&(gn[1]=-gn[1])}else gn=zi(Wr,sn);return gn[0]*=Dr,gn[1]/=Ur,gn}return kr.invert=function(Wr,sn){Wr/=Dr,sn*=Ur;var gn=k(sn);if(gn>_t){var Cn=s(Xe-1,o(0,r((Wr+S)/Yt)));Wr=(Wr+S*(Xe-1)/Xe-Cn*Yt)*pt/u;var Zn=He.invert(Wr,.25*(gn-_t)*u/Bt+Nt);return Zn[0]-=S*(Xe-1)/Xe-Cn*Yt,sn<0&&(Zn[1]=-Zn[1]),Zn}return zi.invert(Wr,sn)},kr}function Mo(Xe,rt){return[Xe,rt&1?90-i:xo]}function So(Xe,rt){return[Xe,rt&1?-90+i:-xo]}function oi(Xe){return[Xe[0]*(1-i),Xe[1]]}function ii(Xe){var rt=[].concat(E.range(-180,180+Xe/2,Xe).map(Mo),E.range(180,-180-Xe/2,-Xe).map(So));return{type:"Polygon",coordinates:[Xe===180?rt.map(oi):rt]}}function co(){var Xe=4,rt=x.geoProjectionMutator(so),pt=rt(Xe),_t=pt.stream;return pt.lobes=function(Nt){return arguments.length?rt(Xe=+Nt):Xe},pt.stream=function(Nt){var Bt=pt.rotate(),Yt=_t(Nt),Dr=(pt.rotate([0,0]),_t(Nt));return pt.rotate(Bt),Yt.sphere=function(){x.geoStream(ii(180/Xe),Dr)},Yt},pt.scale(239.75)}function Wi(Xe){var rt=1+Xe,pt=p(1/rt),_t=I(pt),Nt=2*R(S/(Bt=S+4*_t*rt)),Bt,Yt=.5*Nt*(rt+R(Xe*(2+Xe))),Dr=Xe*Xe,Ur=rt*rt;function kr(Wr,sn){var gn=1-p(sn),Cn,Zn;if(gn&&gn<2){var ya=M-sn,Na=25,wi;do{var Yi=p(ya),Ti=t(ya),_o=_t+e(Yi,rt-Ti),bo=1+Ur-2*rt*Ti;ya-=wi=(ya-Dr*_t-rt*Yi+bo*_o-.5*gn*Bt)/(2*rt*Yi*_o)}while(k(wi)>w&&--Na>0);Cn=Nt*R(bo),Zn=Wr*_o/S}else Cn=Nt*(Xe+gn),Zn=Wr*_t/S;return[Cn*p(Zn),Yt-Cn*t(Zn)]}return kr.invert=function(Wr,sn){var gn=Wr*Wr+(sn-=Yt)*sn,Cn=(1+Ur-gn/(Nt*Nt))/(2*rt),Zn=N(Cn),ya=p(Zn),Na=_t+e(ya,rt-Cn);return[I(Wr/R(gn))*S/Na,I(1-2*(Zn-Dr*_t-rt*ya+(1+Ur-2*rt*Cn)*Na)/Bt)]},kr}function Ho(){var Xe=1,rt=x.geoProjectionMutator(Wi),pt=rt(Xe);return pt.ratio=function(_t){return arguments.length?rt(Xe=+_t):Xe},pt.scale(167.774).center([0,18.67])}var Io=.7109889596207567,qo=.0528035274542;function Oo(Xe,rt){return rt>-Io?(Xe=ge(Xe,rt),Xe[1]+=qo,Xe):Ge(Xe,rt)}Oo.invert=function(Xe,rt){return rt>-Io?ge.invert(Xe,rt-qo):Ge.invert(Xe,rt)};function ws(){return x.geoProjection(Oo).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ko(Xe,rt){return k(rt)>Io?(Xe=ge(Xe,rt),Xe[1]-=rt>0?qo:-qo,Xe):Ge(Xe,rt)}Ko.invert=function(Xe,rt){return k(rt)>Io?ge.invert(Xe,rt+(rt>0?qo:-qo)):Ge.invert(Xe,rt)};function ns(){return x.geoProjection(Ko).scale(152.63)}function wo(Xe,rt,pt,_t){var Nt=R(4*S/(2*pt+(1+Xe-rt/2)*p(2*pt)+(Xe+rt)/2*p(4*pt)+rt/2*p(6*pt))),Bt=R(_t*p(pt)*R((1+Xe*t(2*pt)+rt*t(4*pt))/(1+Xe+rt))),Yt=pt*Ur(1);function Dr(sn){return R(1+Xe*t(2*sn)+rt*t(4*sn))}function Ur(sn){var gn=sn*pt;return(2*gn+(1+Xe-rt/2)*p(2*gn)+(Xe+rt)/2*p(4*gn)+rt/2*p(6*gn))/pt}function kr(sn){return Dr(sn)*p(sn)}var Wr=function(sn,gn){var Cn=pt*Ae(Ur,Yt*p(gn)/pt,gn/S);isNaN(Cn)&&(Cn=pt*h(gn));var Zn=Nt*Dr(Cn);return[Zn*Bt*sn/S*t(Cn),Zn/Bt*p(Cn)]};return Wr.invert=function(sn,gn){var Cn=Ae(kr,gn*Bt/Nt);return[sn*S/(t(Cn)*Nt*Bt*Dr(Cn)),I(pt*Ur(Cn/pt)/Yt)]},pt===0&&(Nt=R(_t/S),Wr=function(sn,gn){return[sn*Nt,p(gn)/Nt]},Wr.invert=function(sn,gn){return[sn/Nt,I(gn*Nt)]}),Wr}function No(){var Xe=1,rt=0,pt=45*b,_t=2,Nt=x.geoProjectionMutator(wo),Bt=Nt(Xe,rt,pt,_t);return Bt.a=function(Yt){return arguments.length?Nt(Xe=+Yt,rt,pt,_t):Xe},Bt.b=function(Yt){return arguments.length?Nt(Xe,rt=+Yt,pt,_t):rt},Bt.psiMax=function(Yt){return arguments.length?Nt(Xe,rt,pt=+Yt*b,_t):pt*A},Bt.ratio=function(Yt){return arguments.length?Nt(Xe,rt,pt,_t=+Yt):_t},Bt.scale(180.739)}function Di(Xe,rt,pt,_t,Nt,Bt,Yt,Dr,Ur,kr,Wr){if(Wr.nanEncountered)return NaN;var sn,gn,Cn,Zn,ya,Na,wi,Yi,Ti,_o;if(sn=pt-rt,gn=Xe(rt+sn*.25),Cn=Xe(pt-sn*.25),isNaN(gn)){Wr.nanEncountered=!0;return}if(isNaN(Cn)){Wr.nanEncountered=!0;return}return Zn=sn*(_t+4*gn+Nt)/12,ya=sn*(Nt+4*Cn+Bt)/12,Na=Zn+ya,_o=(Na-Yt)/15,kr>Ur?(Wr.maxDepthCount++,Na+_o):Math.abs(_o)>1;do Ur[Na]>Cn?ya=Na:Zn=Na,Na=Zn+ya>>1;while(Na>Zn);var wi=Ur[Na+1]-Ur[Na];return wi&&(wi=(Cn-Ur[Na+1])/wi),(Na+1+wi)/Yt}var sn=2*Wr(1)/S*Bt/pt,gn=function(Cn,Zn){var ya=Wr(k(p(Zn))),Na=_t(ya)*Cn;return ya/=sn,[Na,Zn>=0?ya:-ya]};return gn.invert=function(Cn,Zn){var ya;return Zn*=sn,k(Zn)<1&&(ya=h(Zn)*I(Nt(k(Zn))*Bt)),[Cn/_t(k(Zn)),ya]},gn}function mo(){var Xe=0,rt=2.5,pt=1.183136,_t=x.geoProjectionMutator(Go),Nt=_t(Xe,rt,pt);return Nt.alpha=function(Bt){return arguments.length?_t(Xe=+Bt,rt,pt):Xe},Nt.k=function(Bt){return arguments.length?_t(Xe,rt=+Bt,pt):rt},Nt.gamma=function(Bt){return arguments.length?_t(Xe,rt,pt=+Bt):pt},Nt.scale(152.63)}function us(Xe,rt){return k(Xe[0]-rt[0])=0;--Ur)pt=Xe[1][Ur],_t=pt[0][0],Nt=pt[0][1],Bt=pt[1][1],Yt=pt[2][0],Dr=pt[2][1],rt.push(Jo([[Yt-i,Dr-i],[Yt-i,Bt+i],[_t+i,Bt+i],[_t+i,Nt-i]],30));return{type:"Polygon",coordinates:[E.merge(rt)]}}function Is(Xe,rt,pt){var _t,Nt;function Bt(Ur,kr){for(var Wr=kr<0?-1:1,sn=rt[+(kr<0)],gn=0,Cn=sn.length-1;gnsn[gn][2][0];++gn);var Zn=Xe(Ur-sn[gn][1][0],kr);return Zn[0]+=Xe(sn[gn][1][0],Wr*kr>Wr*sn[gn][0][1]?sn[gn][0][1]:kr)[0],Zn}pt?Bt.invert=pt(Bt):Xe.invert&&(Bt.invert=function(Ur,kr){for(var Wr=Nt[+(kr<0)],sn=rt[+(kr<0)],gn=0,Cn=Wr.length;gnZn&&(ya=Cn,Cn=Zn,Zn=ya),[[sn,Cn],[gn,Zn]]})}),Yt):rt.map(function(kr){return kr.map(function(Wr){return[[Wr[0][0]*A,Wr[0][1]*A],[Wr[1][0]*A,Wr[1][1]*A],[Wr[2][0]*A,Wr[2][1]*A]]})})},rt!=null&&Yt.lobes(rt),Yt}var es=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Zs(){return Is(Te,es).scale(160.857)}var Ps=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function $o(){return Is(Ko,Ps).scale(152.63)}var Fo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Ji(){return Is(ge,Fo).scale(169.529)}var Ro=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ls(){return Is(ge,Ro).scale(169.529).rotate([20,0])}var zl=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function ml(){return Is(Oo,zl,Me).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Ts=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function yl(){return Is(Ge,Ts).scale(152.63).rotate([-20,0])}function mu(Xe,rt){return[3/u*Xe*R(S*S/3-rt*rt),rt]}mu.invert=function(Xe,rt){return[u/3*Xe/R(S*S/3-rt*rt),rt]};function su(){return x.geoProjection(mu).scale(158.837)}function cc(Xe){function rt(pt,_t){if(k(k(_t)-M)2)return null;pt/=2,_t/=2;var Bt=pt*pt,Yt=_t*_t,Dr=2*_t/(1+Bt+Yt);return Dr=c((1+Dr)/(1-Dr),1/Xe),[e(2*pt,1-Bt-Yt)/Xe,I((Dr-1)/(Dr+1))]},rt}function Bl(){var Xe=.5,rt=x.geoProjectionMutator(cc),pt=rt(Xe);return pt.spacing=function(_t){return arguments.length?rt(Xe=+_t):Xe},pt.scale(124.75)}var _l=S/T;function ju(Xe,rt){return[Xe*(1+R(t(rt)))/2,rt/(t(rt/2)*t(Xe/6))]}ju.invert=function(Xe,rt){var pt=k(Xe),_t=k(rt),Nt=i,Bt=M;_t<_l?Bt*=_t/_l:Nt+=6*N(_l/_t);for(var Yt=0;Yt<25;Yt++){var Dr=p(Bt),Ur=R(t(Bt)),kr=p(Bt/2),Wr=t(Bt/2),sn=p(Nt/6),gn=t(Nt/6),Cn=.5*Nt*(1+Ur)-pt,Zn=Bt/(Wr*gn)-_t,ya=Ur?-.25*Nt*Dr/Ur:0,Na=.5*(1+Ur),wi=(1+.5*Bt*kr/Wr)/(Wr*gn),Yi=Bt/Wr*(sn/6)/(gn*gn),Ti=ya*Yi-wi*Na,_o=(Cn*Yi-Zn*Na)/Ti,bo=(Zn*ya-Cn*wi)/Ti;if(Bt-=_o,Nt-=bo,k(_o)i||k(Na)>i)&&--Nt>0);return Nt&&[pt,_t]};function As(){return x.geoProjection(il).scale(139.98)}function ms(Xe,rt){return[p(Xe)/t(rt),g(rt)*t(Xe)]}ms.invert=function(Xe,rt){var pt=Xe*Xe,_t=rt*rt,Nt=_t+1,Bt=pt+Nt,Yt=Xe?_*R((Bt-R(Bt*Bt-4*pt))/pt):1/R(Nt);return[I(Xe*Yt),h(rt)*N(Yt)]};function Ms(){return x.geoProjection(ms).scale(144.049).clipAngle(90-.001)}function ol(Xe){var rt=t(Xe),pt=g(C+Xe/2);function _t(Nt,Bt){var Yt=Bt-Xe,Dr=k(Yt)=0;)Wr=Xe[kr],sn=Wr[0]+Dr*(Cn=sn)-Ur*gn,gn=Wr[1]+Dr*gn+Ur*Cn;return sn=Dr*(Cn=sn)-Ur*gn,gn=Dr*gn+Ur*Cn,[sn,gn]}return pt.invert=function(_t,Nt){var Bt=20,Yt=_t,Dr=Nt;do{for(var Ur=rt,kr=Xe[Ur],Wr=kr[0],sn=kr[1],gn=0,Cn=0,Zn;--Ur>=0;)kr=Xe[Ur],gn=Wr+Yt*(Zn=gn)-Dr*Cn,Cn=sn+Yt*Cn+Dr*Zn,Wr=kr[0]+Yt*(Zn=Wr)-Dr*sn,sn=kr[1]+Yt*sn+Dr*Zn;gn=Wr+Yt*(Zn=gn)-Dr*Cn,Cn=sn+Yt*Cn+Dr*Zn,Wr=Yt*(Zn=Wr)-Dr*sn-_t,sn=Yt*sn+Dr*Zn-Nt;var ya=gn*gn+Cn*Cn,Na,wi;Yt-=Na=(Wr*gn+sn*Cn)/ya,Dr-=wi=(sn*gn-Wr*Cn)/ya}while(k(Na)+k(wi)>i*i&&--Bt>0);if(Bt){var Yi=R(Yt*Yt+Dr*Dr),Ti=2*l(Yi*.5),_o=p(Ti);return[e(Yt*_o,Yi*t(Ti)),Yi?I(Dr*_o/Yi):0]}},pt}var th=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Cf=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],qu=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],gs=[[.9245,0],[0,0],[.01943,0]],Lf=[[.721316,0],[0,0],[-.00881625,-.00617325]];function hc(){return Cu(th,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function nc(){return Cu(Cf,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function hf(){return Cu(qu,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function ku(){return Cu(gs,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function dc(){return Cu(Lf,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Cu(Xe,rt){var pt=x.geoProjection(fc(Xe)).rotate(rt).clipAngle(90),_t=x.geoRotation(rt),Nt=pt.center;return delete pt.rotate,pt.center=function(Bt){return arguments.length?Nt(_t(Bt)):_t.invert(Nt())},pt}var Pc=R(6),$c=R(7);function Zl(Xe,rt){var pt=I(7*p(rt)/(3*Pc));return[Pc*Xe*(2*t(2*pt/3)-1)/$c,9*p(pt/3)/$c]}Zl.invert=function(Xe,rt){var pt=3*I(rt*$c/9);return[Xe*$c/(Pc*(2*t(2*pt/3)-1)),I(p(pt)*3*Pc/7)]};function df(){return x.geoProjection(Zl).scale(164.859)}function Dc(Xe,rt){for(var pt=(1+_)*p(rt),_t=rt,Nt=0,Bt;Nt<25&&(_t-=Bt=(p(_t/2)+p(_t)-pt)/(.5*t(_t/2)+t(_t)),!(k(Bt)w&&--_t>0);return Bt=pt*pt,Yt=Bt*Bt,Dr=Bt*Yt,[Xe/(.84719-.13063*Bt+Dr*Dr*(-.04515+.05494*Bt-.02326*Yt+.00331*Dr)),pt]};function vf(){return x.geoProjection(Lu).scale(175.295)}function sl(Xe,rt){return[Xe*(1+t(rt))/2,2*(rt-g(rt/2))]}sl.invert=function(Xe,rt){for(var pt=rt/2,_t=0,Nt=1/0;_t<10&&k(Nt)>i;++_t){var Bt=t(rt/2);rt-=Nt=(rt-g(rt/2)-pt)/(1-.5/(Bt*Bt))}return[2*Xe/(1+t(rt)),rt]};function Fc(){return x.geoProjection(sl).scale(152.63)}var Pu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function vc(){return Is(fe(1/0),Pu).rotate([20,0]).scale(152.63)}function zc(Xe,rt){var pt=p(rt),_t=t(rt),Nt=h(Xe);if(Xe===0||k(rt)===M)return[0,rt];if(rt===0)return[Xe,0];if(k(Xe)===M)return[Xe*_t,M*pt];var Bt=S/(2*Xe)-2*Xe/S,Yt=2*rt/S,Dr=(1-Yt*Yt)/(pt-Yt),Ur=Bt*Bt,kr=Dr*Dr,Wr=1+Ur/kr,sn=1+kr/Ur,gn=(Bt*pt/Dr-Bt/2)/Wr,Cn=(kr*pt/Ur+Dr/2)/sn,Zn=gn*gn+_t*_t/Wr,ya=Cn*Cn-(kr*pt*pt/Ur+Dr*pt-1)/sn;return[M*(gn+R(Zn)*Nt),M*(Cn+R(ya<0?0:ya)*h(-rt*Bt)*Nt)]}zc.invert=function(Xe,rt){Xe/=M,rt/=M;var pt=Xe*Xe,_t=rt*rt,Nt=pt+_t,Bt=S*S;return[Xe?(Nt-1+R((1-Nt)*(1-Nt)+4*pt))/(2*Xe)*M:0,Ae(function(Yt){return Nt*(S*p(Yt)-2*Yt)*S+4*Yt*Yt*(rt-p(Yt))+2*S*Yt-Bt*rt},0)]};function Hu(){return x.geoProjection(zc).scale(127.267)}var uu=1.0148,Gu=.23185,Zc=-.14499,gu=.02406,Pf=uu,bl=5*Gu,xl=7*Zc,Wu=9*gu,wl=1.790857183;function pf(Xe,rt){var pt=rt*rt;return[Xe,rt*(uu+pt*pt*(Gu+pt*(Zc+gu*pt)))]}pf.invert=function(Xe,rt){rt>wl?rt=wl:rt<-wl&&(rt=-wl);var pt=rt,_t;do{var Nt=pt*pt;pt-=_t=(pt*(uu+Nt*Nt*(Gu+Nt*(Zc+gu*Nt)))-rt)/(Pf+Nt*Nt*(bl+Nt*(xl+Wu*Nt)))}while(k(_t)>i);return[Xe,pt]};function Yu(){return x.geoProjection(pf).scale(139.319)}function pc(Xe,rt){if(k(rt)i&&--Nt>0);return Yt=g(_t),[(k(rt)=0;)if(_t=rt[Dr],pt[0]===_t[0]&&pt[1]===_t[1]){if(Bt)return[Bt,pt];Bt=pt}}}function Jc(Xe){for(var rt=Xe.length,pt=[],_t=Xe[rt-1],Nt=0;Nt0?[-_t[0],0]:[180-_t[0],180])};var rt=fu.map(function(pt){return{face:pt,project:Xe(pt)}});return[-1,0,0,1,0,1,4,5].forEach(function(pt,_t){var Nt=rt[pt];Nt&&(Nt.children||(Nt.children=[])).push(rt[_t])}),yu(rt[0],function(pt,_t){return rt[pt<-S/2?_t<0?6:4:pt<0?_t<0?2:0:pt_t^Cn>_t&&pt<(gn-kr)*(_t-Wr)/(Cn-Wr)+kr&&(Nt=!Nt)}return Nt}function mf(Xe,rt){var pt=rt.stream,_t;if(!pt)throw new Error("invalid projection");switch(Xe&&Xe.type){case"Feature":_t=gf;break;case"FeatureCollection":_t=tf;break;default:_t=yf;break}return _t(Xe,pt)}function tf(Xe,rt){return{type:"FeatureCollection",features:Xe.features.map(function(pt){return gf(pt,rt)})}}function gf(Xe,rt){return{type:"Feature",id:Xe.id,properties:Xe.properties,geometry:yf(Xe.geometry,rt)}}function Hf(Xe,rt){return{type:"GeometryCollection",geometries:Xe.geometries.map(function(pt){return yf(pt,rt)})}}function yf(Xe,rt){if(!Xe)return null;if(Xe.type==="GeometryCollection")return Hf(Xe,rt);var pt;switch(Xe.type){case"Point":pt=yc;break;case"MultiPoint":pt=yc;break;case"LineString":pt=_c;break;case"MultiLineString":pt=_c;break;case"Polygon":pt=bc;break;case"MultiPolygon":pt=bc;break;case"Sphere":pt=bc;break;default:return null}return x.geoStream(Xe,rt(pt)),pt.result()}var ul=[],Pl=[],yc={point:function(Xe,rt){ul.push([Xe,rt])},result:function(){var Xe=ul.length?ul.length<2?{type:"Point",coordinates:ul[0]}:{type:"MultiPoint",coordinates:ul}:null;return ul=[],Xe}},_c={lineStart:zo,point:function(Xe,rt){ul.push([Xe,rt])},lineEnd:function(){ul.length&&(Pl.push(ul),ul=[])},result:function(){var Xe=Pl.length?Pl.length<2?{type:"LineString",coordinates:Pl[0]}:{type:"MultiLineString",coordinates:Pl}:null;return Pl=[],Xe}},bc={polygonStart:zo,lineStart:zo,point:function(Xe,rt){ul.push([Xe,rt])},lineEnd:function(){var Xe=ul.length;if(Xe){do ul.push(ul[0].slice());while(++Xe<4);Pl.push(ul),ul=[]}},polygonEnd:zo,result:function(){if(!Pl.length)return null;var Xe=[],rt=[];return Pl.forEach(function(pt){gc(pt)?Xe.push([pt]):rt.push(pt)}),rt.forEach(function(pt){var _t=pt[0];Xe.some(function(Nt){if(Vf(Nt[0],_t))return Nt.push(pt),!0})||Xe.push([pt])}),Pl=[],Xe.length?Xe.length>1?{type:"MultiPolygon",coordinates:Xe}:{type:"Polygon",coordinates:Xe[0]}:null}};function ac(Xe){var rt=Xe(M,0)[0]-Xe(-M,0)[0];function pt(_t,Nt){var Bt=k(_t)0?_t-S:_t+S,Nt),Dr=(Yt[0]-Yt[1])*_,Ur=(Yt[0]+Yt[1])*_;if(Bt)return[Dr,Ur];var kr=rt*_,Wr=Dr>0^Ur>0?-1:1;return[Wr*Dr-h(Ur)*kr,Wr*Ur-h(Dr)*kr]}return Xe.invert&&(pt.invert=function(_t,Nt){var Bt=(_t+Nt)*_,Yt=(Nt-_t)*_,Dr=k(Bt)<.5*rt&&k(Yt)<.5*rt;if(!Dr){var Ur=rt*_,kr=Bt>0^Yt>0?-1:1,Wr=-kr*_t+(Yt>0?1:-1)*Ur,sn=-kr*Nt+(Bt>0?1:-1)*Ur;Bt=(-Wr-sn)*_,Yt=(Wr-sn)*_}var gn=Xe.invert(Bt,Yt);return Dr||(gn[0]+=Bt>0?S:-S),gn}),x.geoProjection(pt).rotate([-90,-90,45]).clipAngle(180-.001)}function zt(){return ac(Pr).scale(176.423)}function rr(){return ac(eo).scale(111.48)}function Br(Xe,rt){if(!(0<=(rt=+rt)&&rt<=20))throw new Error("invalid digits");function pt(kr){var Wr=kr.length,sn=2,gn=new Array(Wr);for(gn[0]=+kr[0].toFixed(rt),gn[1]=+kr[1].toFixed(rt);sn2||Cn[0]!=Wr[0]||Cn[1]!=Wr[1])&&(sn.push(Cn),Wr=Cn)}return sn.length===1&&kr.length>1&&sn.push(pt(kr[kr.length-1])),sn}function Bt(kr){return kr.map(Nt)}function Yt(kr){if(kr==null)return kr;var Wr;switch(kr.type){case"GeometryCollection":Wr={type:"GeometryCollection",geometries:kr.geometries.map(Yt)};break;case"Point":Wr={type:"Point",coordinates:pt(kr.coordinates)};break;case"MultiPoint":Wr={type:kr.type,coordinates:_t(kr.coordinates)};break;case"LineString":Wr={type:kr.type,coordinates:Nt(kr.coordinates)};break;case"MultiLineString":case"Polygon":Wr={type:kr.type,coordinates:Bt(kr.coordinates)};break;case"MultiPolygon":Wr={type:"MultiPolygon",coordinates:kr.coordinates.map(Bt)};break;default:return kr}return kr.bbox!=null&&(Wr.bbox=kr.bbox),Wr}function Dr(kr){var Wr={type:"Feature",properties:kr.properties,geometry:Yt(kr.geometry)};return kr.id!=null&&(Wr.id=kr.id),kr.bbox!=null&&(Wr.bbox=kr.bbox),Wr}if(Xe!=null)switch(Xe.type){case"Feature":return Dr(Xe);case"FeatureCollection":{var Ur={type:"FeatureCollection",features:Xe.features.map(Dr)};return Xe.bbox!=null&&(Ur.bbox=Xe.bbox),Ur}default:return Yt(Xe)}return Xe}function wr(Xe){var rt=p(Xe);function pt(_t,Nt){var Bt=rt?g(_t*rt/2)/rt:_t/2;if(!Nt)return[2*Bt,-Xe];var Yt=2*l(Bt*p(Nt)),Dr=1/g(Nt);return[p(Yt)*Dr,Nt+(1-t(Yt))*Dr-Xe]}return pt.invert=function(_t,Nt){if(k(Nt+=Xe)i&&--Dr>0);var gn=_t*(kr=g(Yt)),Cn=g(k(Nt)0?M:-M)*(Ur+Nt*(Wr-Yt)/2+Nt*Nt*(Wr-2*Ur+Yt)/2)]}Vn.invert=function(Xe,rt){var pt=rt/M,_t=pt*90,Nt=s(18,k(_t/5)),Bt=o(0,r(Nt));do{var Yt=Ln[Bt][1],Dr=Ln[Bt+1][1],Ur=Ln[s(19,Bt+2)][1],kr=Ur-Yt,Wr=Ur-2*Dr+Yt,sn=2*(k(pt)-Dr)/kr,gn=Wr/kr,Cn=sn*(1-gn*sn*(1-2*gn*sn));if(Cn>=0||Bt===1){_t=(rt>=0?5:-5)*(Cn+Nt);var Zn=50,ya;do Nt=s(18,k(_t)/5),Bt=r(Nt),Cn=Nt-Bt,Yt=Ln[Bt][1],Dr=Ln[Bt+1][1],Ur=Ln[s(19,Bt+2)][1],_t-=(ya=(rt>=0?M:-M)*(Dr+Cn*(Ur-Yt)/2+Cn*Cn*(Ur-2*Dr+Yt)/2)-rt)*A;while(k(ya)>w&&--Zn>0);break}}while(--Bt>=0);var Na=Ln[Bt][0],wi=Ln[Bt+1][0],Yi=Ln[s(19,Bt+2)][0];return[Xe/(wi+Cn*(Yi-Na)/2+Cn*Cn*(Yi-2*wi+Na)/2),_t*b]};function Jn(){return x.geoProjection(Vn).scale(152.63)}function ca(Xe){function rt(pt,_t){var Nt=t(_t),Bt=(Xe-1)/(Xe-Nt*t(pt));return[Bt*Nt*p(pt),Bt*p(_t)]}return rt.invert=function(pt,_t){var Nt=pt*pt+_t*_t,Bt=R(Nt),Yt=(Xe-R(1-Nt*(Xe+1)/(Xe-1)))/((Xe-1)/Bt+Bt/(Xe-1));return[e(pt*Yt,Bt*R(1-Yt*Yt)),Bt?I(_t*Yt/Bt):0]},rt}function Pa(Xe,rt){var pt=ca(Xe);if(!rt)return pt;var _t=t(rt),Nt=p(rt);function Bt(Yt,Dr){var Ur=pt(Yt,Dr),kr=Ur[1],Wr=kr*Nt/(Xe-1)+_t;return[Ur[0]*_t/Wr,kr/Wr]}return Bt.invert=function(Yt,Dr){var Ur=(Xe-1)/(Xe-1-Dr*Nt);return pt.invert(Ur*Yt,Ur*Dr*_t)},Bt}function Gn(){var Xe=2,rt=0,pt=x.geoProjectionMutator(Pa),_t=pt(Xe,rt);return _t.distance=function(Nt){return arguments.length?pt(Xe=+Nt,rt):Xe},_t.tilt=function(Nt){return arguments.length?pt(Xe,rt=Nt*b):rt*A},_t.scale(432.147).clipAngle(N(1/Xe)*A-1e-6)}var oa=1e-4,fa=1e4,La=-180,qa=La+oa,Bi=180,Ni=Bi-oa,Zi=-90,_i=Zi+oa,Va=90,Ga=Va-oa;function oo(Xe){return Xe.length>0}function go(Xe){return Math.floor(Xe*fa)/fa}function Vo(Xe){return Xe===Zi||Xe===Va?[0,Xe]:[La,go(Xe)]}function Wo(Xe){var rt=Xe[0],pt=Xe[1],_t=!1;return rt<=qa?(rt=La,_t=!0):rt>=Ni&&(rt=Bi,_t=!0),pt<=_i?(pt=Zi,_t=!0):pt>=Ga&&(pt=Va,_t=!0),_t?[rt,pt]:Xe}function Yo(Xe){return Xe.map(Wo)}function as(Xe,rt,pt){for(var _t=0,Nt=Xe.length;_t=Ni||Wr<=_i||Wr>=Ga){Bt[Yt]=Wo(Ur);for(var sn=Yt+1;snqa&&Cn_i&&Zn=Dr)break;pt.push({index:-1,polygon:rt,ring:Bt=Bt.slice(sn-1)}),Bt[0]=Vo(Bt[0][1]),Yt=-1,Dr=Bt.length}}}}function Bo(Xe){var rt,pt=Xe.length,_t={},Nt={},Bt,Yt,Dr,Ur,kr;for(rt=0;rt0?S-Dr:Dr)*A],kr=x.geoProjection(Xe(Yt)).rotate(Ur),Wr=x.geoRotation(Ur),sn=kr.center;return delete kr.rotate,kr.center=function(gn){return arguments.length?sn(Wr(gn)):Wr.invert(sn())},kr.clipAngle(90)}function Ws(Xe){var rt=t(Xe);function pt(_t,Nt){var Bt=x.geoGnomonicRaw(_t,Nt);return Bt[0]*=rt,Bt}return pt.invert=function(_t,Nt){return x.geoGnomonicRaw.invert(_t/rt,Nt)},pt}function Dl(){return Nl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Nl(Xe,rt){return Ss(Ws,Xe,rt)}function Kl(Xe){if(!(Xe*=2))return x.geoAzimuthalEquidistantRaw;var rt=-Xe/2,pt=-rt,_t=Xe*Xe,Nt=g(pt),Bt=.5/p(pt);function Yt(Dr,Ur){var kr=N(t(Ur)*t(Dr-rt)),Wr=N(t(Ur)*t(Dr-pt)),sn=Ur<0?-1:1;return kr*=kr,Wr*=Wr,[(kr-Wr)/(2*Xe),sn*R(4*_t*Wr-(_t-kr+Wr)*(_t-kr+Wr))/(2*Xe)]}return Yt.invert=function(Dr,Ur){var kr=Ur*Ur,Wr=t(R(kr+(gn=Dr+rt)*gn)),sn=t(R(kr+(gn=Dr+pt)*gn)),gn,Cn;return[e(Cn=Wr-sn,gn=(Wr+sn)*Nt),(Ur<0?-1:1)*N(R(gn*gn+Cn*Cn)*Bt)]},Yt}function Fu(){return Al([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Al(Xe,rt){return Ss(Kl,Xe,rt)}function zu(Xe,rt){if(k(rt)i&&--Dr>0);return[h(Xe)*(R(Nt*Nt+4)+Nt)*S/4,M*Yt]};function Ql(){return x.geoProjection(Jl).scale(127.16)}function xu(Xe,rt,pt,_t,Nt){function Bt(Yt,Dr){var Ur=pt*p(_t*Dr),kr=R(1-Ur*Ur),Wr=R(2/(1+kr*t(Yt*=Nt)));return[Xe*kr*Wr*p(Yt),rt*Ur*Wr]}return Bt.invert=function(Yt,Dr){var Ur=Yt/Xe,kr=Dr/rt,Wr=R(Ur*Ur+kr*kr),sn=2*I(Wr/2);return[e(Yt*g(sn),Xe*Wr)/Nt,Wr&&I(Dr*p(sn)/(rt*pt*Wr))/_t]},Bt}function rf(Xe,rt,pt,_t){var Nt=S/3;Xe=o(Xe,i),rt=o(rt,i),Xe=s(Xe,M),rt=s(rt,S-i),pt=o(pt,0),pt=s(pt,100-i),_t=o(_t,i);var Bt=pt/100+1,Yt=_t/100,Dr=N(Bt*t(Nt))/Nt,Ur=p(Xe)/p(Dr*M),kr=rt/S,Wr=R(Yt*p(Xe/2)/p(rt/2)),sn=Wr/R(kr*Ur*Dr),gn=1/(Wr*R(kr*Ur*Dr));return xu(sn,gn,Ur,Dr,kr)}function Ff(){var Xe=65*b,rt=60*b,pt=20,_t=200,Nt=x.geoProjectionMutator(rf),Bt=Nt(Xe,rt,pt,_t);return Bt.poleline=function(Yt){return arguments.length?Nt(Xe=+Yt*b,rt,pt,_t):Xe*A},Bt.parallels=function(Yt){return arguments.length?Nt(Xe,rt=+Yt*b,pt,_t):rt*A},Bt.inflation=function(Yt){return arguments.length?Nt(Xe,rt,pt=+Yt,_t):pt},Bt.ratio=function(Yt){return arguments.length?Nt(Xe,rt,pt,_t=+Yt):_t},Bt.scale(163.775)}function xc(){return Ff().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var rl=4*S+3*R(3),Ol=2*R(2*S*R(3)/rl),Bu=ke(Ol*R(3)/S,Ol,rl/6);function nf(){return x.geoProjection(Bu).scale(176.84)}function jc(Xe,rt){return[Xe*R(1-3*rt*rt/(S*S)),rt]}jc.invert=function(Xe,rt){return[Xe/R(1-3*rt*rt/(S*S)),rt]};function wu(){return x.geoProjection(jc).scale(152.63)}function jl(Xe,rt){var pt=t(rt),_t=t(Xe)*pt,Nt=1-_t,Bt=t(Xe=e(p(Xe)*pt,-p(rt))),Yt=p(Xe);return pt=R(1-_t*_t),[Yt*pt-Bt*Nt,-Bt*pt-Yt*Nt]}jl.invert=function(Xe,rt){var pt=(Xe*Xe+rt*rt)/-2,_t=R(-pt*(2+pt)),Nt=rt*pt+Xe*_t,Bt=Xe*pt-rt*_t,Yt=R(Bt*Bt+Nt*Nt);return[e(_t*Nt,Yt*(1+pt)),Yt?-I(_t*Bt/Yt):0]};function Ul(){return x.geoProjection(jl).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function Ci(Xe,rt){var pt=re(Xe,rt);return[(pt[0]+Xe/M)/2,(pt[1]+rt)/2]}Ci.invert=function(Xe,rt){var pt=Xe,_t=rt,Nt=25;do{var Bt=t(_t),Yt=p(_t),Dr=p(2*_t),Ur=Yt*Yt,kr=Bt*Bt,Wr=p(pt),sn=t(pt/2),gn=p(pt/2),Cn=gn*gn,Zn=1-kr*sn*sn,ya=Zn?N(Bt*sn)*R(Na=1/Zn):Na=0,Na,wi=.5*(2*ya*Bt*gn+pt/M)-Xe,Yi=.5*(ya*Yt+_t)-rt,Ti=.5*Na*(kr*Cn+ya*Bt*sn*Ur)+.5/M,_o=Na*(Wr*Dr/4-ya*Yt*gn),bo=.125*Na*(Dr*gn-ya*Yt*kr*Wr),Zo=.5*Na*(Ur*sn+ya*Cn*Bt)+.5,fs=_o*bo-Zo*Ti,Po=(Yi*_o-wi*Zo)/fs,Es=(wi*bo-Yi*Ti)/fs;pt-=Po,_t-=Es}while((k(Po)>i||k(Es)>i)&&--Nt>0);return[pt,_t]};function eu(){return x.geoProjection(Ci).scale(158.837)}v.geoNaturalEarth=x.geoNaturalEarth1,v.geoNaturalEarthRaw=x.geoNaturalEarth1Raw,v.geoAiry=Q,v.geoAiryRaw=Z,v.geoAitoff=ae,v.geoAitoffRaw=re,v.geoArmadillo=H,v.geoArmadilloRaw=oe,v.geoAugust=K,v.geoAugustRaw=X,v.geoBaker=$,v.geoBakerRaw=q,v.geoBerghaus=ne,v.geoBerghausRaw=ee,v.geoBertin1953=Ue,v.geoBertin1953Raw=Ie,v.geoBoggs=Fe,v.geoBoggsRaw=Te,v.geoBonne=Tt,v.geoBonneRaw=mt,v.geoBottomley=Kt,v.geoBottomleyRaw=At,v.geoBromley=_r,v.geoBromleyRaw=nr,v.geoChamberlin=Be,v.geoChamberlinRaw=vt,v.geoChamberlinAfrica=Re,v.geoCollignon=$e,v.geoCollignonRaw=He,v.geoCraig=Je,v.geoCraigRaw=Ze,v.geoCraster=Dt,v.geoCrasterRaw=dt,v.geoCylindricalEqualArea=Vt,v.geoCylindricalEqualAreaRaw=Ct,v.geoCylindricalStereographic=Wt,v.geoCylindricalStereographicRaw=Ht,v.geoEckert1=on,v.geoEckert1Raw=Sr,v.geoEckert2=It,v.geoEckert2Raw=$t,v.geoEckert3=cr,v.geoEckert3Raw=ir,v.geoEckert4=Ir,v.geoEckert4Raw=fr,v.geoEckert5=nn,v.geoEckert5Raw=ln,v.geoEckert6=Un,v.geoEckert6Raw=wn,v.geoEisenlohr=ua,v.geoEisenlohrRaw=Aa,v.geoFahey=Fa,v.geoFaheyRaw=ei,v.geoFoucaut=Mi,v.geoFoucautRaw=ai,v.geoFoucautSinusoidal=ba,v.geoFoucautSinusoidalRaw=ci,v.geoGilbert=ho,v.geoGingery=et,v.geoGingeryRaw=da,v.geoGinzburg4=Tr,v.geoGinzburg4Raw=ur,v.geoGinzburg5=Fr,v.geoGinzburg5Raw=Rr,v.geoGinzburg6=kt,v.geoGinzburg6Raw=at,v.geoGinzburg8=ar,v.geoGinzburg8Raw=Ut,v.geoGinzburg9=br,v.geoGinzburg9Raw=Er,v.geoGringorten=Pn,v.geoGringortenRaw=Pr,v.geoGuyou=ro,v.geoGuyouRaw=eo,v.geoHammer=xe,v.geoHammerRaw=fe,v.geoHammerRetroazimuthal=ti,v.geoHammerRetroazimuthalRaw=Sa,v.geoHealpix=co,v.geoHealpixRaw=so,v.geoHill=Ho,v.geoHillRaw=Wi,v.geoHomolosine=ns,v.geoHomolosineRaw=Ko,v.geoHufnagel=No,v.geoHufnagelRaw=wo,v.geoHyperelliptical=mo,v.geoHyperellipticalRaw=Go,v.geoInterrupt=Is,v.geoInterruptedBoggs=Zs,v.geoInterruptedHomolosine=$o,v.geoInterruptedMollweide=Ji,v.geoInterruptedMollweideHemispheres=Ls,v.geoInterruptedSinuMollweide=ml,v.geoInterruptedSinusoidal=yl,v.geoKavrayskiy7=su,v.geoKavrayskiy7Raw=mu,v.geoLagrange=Bl,v.geoLagrangeRaw=cc,v.geoLarrivee=lu,v.geoLarriveeRaw=ju,v.geoLaskowski=As,v.geoLaskowskiRaw=il,v.geoLittrow=Ms,v.geoLittrowRaw=ms,v.geoLoximuthal=Su,v.geoLoximuthalRaw=ol,v.geoMiller=Uu,v.geoMillerRaw=Eu,v.geoModifiedStereographic=Cu,v.geoModifiedStereographicRaw=fc,v.geoModifiedStereographicAlaska=hc,v.geoModifiedStereographicGs48=nc,v.geoModifiedStereographicGs50=hf,v.geoModifiedStereographicMiller=ku,v.geoModifiedStereographicLee=dc,v.geoMollweide=ue,v.geoMollweideRaw=ge,v.geoMtFlatPolarParabolic=df,v.geoMtFlatPolarParabolicRaw=Zl,v.geoMtFlatPolarQuartic=Ic,v.geoMtFlatPolarQuarticRaw=Dc,v.geoMtFlatPolarSinusoidal=Rc,v.geoMtFlatPolarSinusoidalRaw=Vu,v.geoNaturalEarth2=vf,v.geoNaturalEarth2Raw=Lu,v.geoNellHammer=Fc,v.geoNellHammerRaw=sl,v.geoInterruptedQuarticAuthalic=vc,v.geoNicolosi=Hu,v.geoNicolosiRaw=zc,v.geoPatterson=Yu,v.geoPattersonRaw=pf,v.geoPolyconic=Kc,v.geoPolyconicRaw=pc,v.geoPolyhedral=yu,v.geoPolyhedralButterfly=Du,v.geoPolyhedralCollignon=Qc,v.geoPolyhedralWaterman=ef,v.geoProject=mf,v.geoGringortenQuincuncial=zt,v.geoPeirceQuincuncial=rr,v.geoPierceQuincuncial=rr,v.geoQuantize=Br,v.geoQuincuncial=ac,v.geoRectangularPolyconic=un,v.geoRectangularPolyconicRaw=wr,v.geoRobinson=Jn,v.geoRobinsonRaw=Vn,v.geoSatellite=Gn,v.geoSatelliteRaw=Pa,v.geoSinuMollweide=ws,v.geoSinuMollweideRaw=Oo,v.geoSinusoidal=gt,v.geoSinusoidalRaw=Ge,v.geoStitch=ps,v.geoTimes=Xo,v.geoTimesRaw=vi,v.geoTwoPointAzimuthal=Nl,v.geoTwoPointAzimuthalRaw=Ws,v.geoTwoPointAzimuthalUsa=Dl,v.geoTwoPointEquidistant=Al,v.geoTwoPointEquidistantRaw=Kl,v.geoTwoPointEquidistantUsa=Fu,v.geoVanDerGrinten=bu,v.geoVanDerGrintenRaw=zu,v.geoVanDerGrinten2=Oc,v.geoVanDerGrinten2Raw=ic,v.geoVanDerGrinten3=hu,v.geoVanDerGrinten3Raw=Zu,v.geoVanDerGrinten4=Ql,v.geoVanDerGrinten4Raw=Jl,v.geoWagner=Ff,v.geoWagner7=xc,v.geoWagnerRaw=rf,v.geoWagner4=nf,v.geoWagner4Raw=Bu,v.geoWagner6=wu,v.geoWagner6Raw=jc,v.geoWiechel=Ul,v.geoWiechelRaw=jl,v.geoWinkel3=eu,v.geoWinkel3Raw=Ci,Object.defineProperty(v,"__esModule",{value:!0})})}}),K8=Ee({"src/plots/geo/zoom.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=Ri(),k=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function a(A,b){var z=A.projection,I;return b._isScoped?I=o:b._isClipped?I=c:I=s,I(A,z)}V.exports=a;function r(A,b){return v.behavior.zoom().translate(b.translate()).scaleExtent(b.scaleExtent()).scale(b.scale())}function n(A,b,z){var I=A.id,N=A.graphDiv,R=N.layout,B=R[I],F=N._fullLayout,P=F[I],j={},U={};function Z(Q,re){j[I+"."+Q]=x.nestedProperty(B,Q).get(),E.call("_storeDirectGUIEdit",R,F._preGUI,j);var ae=x.nestedProperty(P,Q);ae.get()!==re&&(ae.set(re),x.nestedProperty(B,Q).set(re),U[I+"."+Q]=re)}z(Z),Z("projection.scale",b.scale()/A.fitScale),Z("fitbounds",!1),N.emit("plotly_relayout",U)}function o(A,b){var z=r(A,b);function I(){v.select(this).style(e)}function N(){b.scale(v.event.scale).translate(v.event.translate),A.render(!0);var F=b.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":b.scale()/A.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function R(F){var P=b.invert(A.midPt);F("center.lon",P[0]),F("center.lat",P[1])}function B(){v.select(this).style(t),n(A,b,R)}return z.on("zoomstart",I).on("zoom",N).on("zoomend",B),z}function s(A,b){var z=r(A,b),I=2,N,R,B,F,P,j,U,Z,Q;function re(G){return b.invert(G)}function ae(G){var Y=re(G);if(!Y)return!0;var q=b(Y);return Math.abs(q[0]-G[0])>I||Math.abs(q[1]-G[1])>I}function oe(){v.select(this).style(e);let{x:G,y:Y,width:q,height:$}=this.getBBox();N=v.event.sourceEvent?v.mouse(this):[G+q/2,Y+$/2],R=b.rotate(),B=b.translate(),F=R,P=re(N)}function H(){let{x:G,y:Y,width:q,height:$}=this.getBBox();if(j=v.event.sourceEvent?v.mouse(this):[G+q/2,Y+$/2],ae(N)){z.scale(b.scale()),z.translate(b.translate());return}b.scale(v.event.scale),b.translate([B[0],v.event.translate[1]]),P?re(j)&&(Z=re(j),U=[F[0]+(Z[0]-P[0]),R[1],R[2]],b.rotate(U),F=U):(N=j,P=re(N)),Q=!0,A.render(!0);var ee=b.rotate(),ne=b.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":b.scale()/A.fitScale,"geo.center.lon":ne[0],"geo.center.lat":ne[1],"geo.projection.rotation.lon":-ee[0]})}function X(){v.select(this).style(t),Q&&n(A,b,K)}function K(G){var Y=b.rotate(),q=b.invert(A.midPt);G("projection.rotation.lon",-Y[0]),G("center.lon",q[0]),G("center.lat",q[1])}return z.on("zoomstart",oe).on("zoom",H).on("zoomend",X),z}function c(A,b){var z={r:b.rotate(),k:b.scale()},I=r(A,b),N=u(I,"zoomstart","zoom","zoomend"),R=0,B=I.on,F;I.on("zoomstart",function(){v.select(this).style(e);let{x:Q,y:re,width:ae,height:oe}=this.getBBox(),H=v.event.sourceEvent?v.mouse(this):[Q+ae/2,re+oe/2],X=b.rotate(),K=X,G=b.translate(),Y=h(X);F=m(b,H),B.call(I,"zoom",function(){let{x:q,y:$,width:ee,height:ne}=this.getBBox(),fe=v.event.sourceEvent?v.mouse(this):[q+ee/2,$+ne/2];if(b.scale(z.k=v.event.scale),!F)H=fe,F=m(b,H);else if(m(b,fe)){b.rotate(X).translate(G);var ye=m(b,fe),xe=g(F,ye),Ae=C(p(Y,xe)),Me=z.r=i(Ae,F,K);(!isFinite(Me[0])||!isFinite(Me[1])||!isFinite(Me[2]))&&(Me=K),b.rotate(Me),K=Me}j(N.of(this,arguments))}),P(N.of(this,arguments))}).on("zoomend",function(){v.select(this).style(t),B.call(I,"zoom",null),U(N.of(this,arguments)),n(A,b,Z)}).on("zoom.redraw",function(){A.render(!0);var Q=b.rotate();A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":b.scale()/A.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function P(Q){R++||Q({type:"zoomstart"})}function j(Q){Q({type:"zoom"})}function U(Q){--R||Q({type:"zoomend"})}function Z(Q){var re=b.rotate();Q("projection.rotation.lon",-re[0]),Q("projection.rotation.lat",-re[1])}return v.rebind(I,N,"on")}function m(A,b){var z=A.invert(b);return z&&isFinite(z[0])&&isFinite(z[1])&&_(z)}function h(A){var b=.5*A[0]*k,z=.5*A[1]*k,I=.5*A[2]*k,N=Math.sin(b),R=Math.cos(b),B=Math.sin(z),F=Math.cos(z),P=Math.sin(I),j=Math.cos(I);return[R*F*j+N*B*P,N*F*j-R*B*P,R*B*j+N*F*P,R*F*P-N*B*j]}function p(A,b){var z=A[0],I=A[1],N=A[2],R=A[3],B=b[0],F=b[1],P=b[2],j=b[3];return[z*B-I*F-N*P-R*j,z*F+I*B+N*j-R*P,z*P-I*j+N*B+R*F,z*j+I*P-N*F+R*B]}function g(A,b){if(!(!A||!b)){var z=f(A,b),I=Math.sqrt(T(z,z)),N=.5*Math.acos(Math.max(-1,Math.min(1,T(A,b)))),R=Math.sin(N)/I;return I&&[Math.cos(N),z[2]*R,-z[1]*R,z[0]*R]}}function i(A,b,z){var I=M(b,2,A[0]);I=M(I,1,A[1]),I=M(I,0,A[2]-z[2]);var N=b[0],R=b[1],B=b[2],F=I[0],P=I[1],j=I[2],U=Math.atan2(R,N)*l,Z=Math.sqrt(N*N+R*R),Q,re;Math.abs(P)>Z?(re=(P>0?90:-90)-U,Q=0):(re=Math.asin(P/Z)*l-U,Q=Math.sqrt(Z*Z-P*P));var ae=180-re-2*U,oe=(Math.atan2(j,F)-Math.atan2(B,Q))*l,H=(Math.atan2(j,F)-Math.atan2(B,-Q))*l,X=w(z[0],z[1],re,oe),K=w(z[0],z[1],ae,H);return X<=K?[re,oe,z[2]]:[ae,H,z[2]]}function w(A,b,z,I){var N=S(z-A),R=S(I-b);return Math.sqrt(N*N+R*R)}function S(A){return(A%360+540)%360-180}function M(A,b,z){var I=z*k,N=A.slice(),R=b===0?1:0,B=b===2?1:2,F=Math.cos(I),P=Math.sin(I);return N[R]=A[R]*F-A[B]*P,N[B]=A[B]*F+A[R]*P,N}function C(A){return[Math.atan2(2*(A[0]*A[1]+A[2]*A[3]),1-2*(A[1]*A[1]+A[2]*A[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(A[0]*A[2]-A[3]*A[1]))))*l,Math.atan2(2*(A[0]*A[3]+A[1]*A[2]),1-2*(A[2]*A[2]+A[3]*A[3]))*l]}function _(A){var b=A[0]*k,z=A[1]*k,I=Math.cos(z);return[I*Math.cos(b),I*Math.sin(b),Math.sin(z)]}function T(A,b){for(var z=0,I=0,N=A.length;I0&&Z._module.calcGeoJSON(U,B)}if(!F){var Q=this.updateProjection(R,B);if(Q)return;(!this.viewInitial||this.scope!==P.scope)&&this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(B,P),this.updateDims(B,P),this.updateFx(B,P),s.generalUpdatePerTraceModule(this.graphDiv,this,R,P);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var ae=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ae.selectAll("path"),this._render()},b.updateProjection=function(R,B){var F=this.graphDiv,P=B[this.id],j=B._size,U=P.domain,Z=P.projection,Q=P.lonaxis,re=P.lataxis,ae=Q._ax,oe=re._ax,H=this.projection=z(P),X=[[j.l+j.w*U.x[0],j.t+j.h*(1-U.y[1])],[j.l+j.w*U.x[1],j.t+j.h*(1-U.y[0])]],K=P.center||{},G=Z.rotation||{},Y=Q.range||[],q=re.range||[];if(P.fitbounds){ae._length=X[1][0]-X[0][0],oe._length=X[1][1]-X[0][1],ae.range=h(F,ae),oe.range=h(F,oe);let ve=[];for(let Kt of R){let nr=Kt[0].trace;nr.visible===!0&&nr._module.fitCoords&&ve.push(nr._module.fitCoords(Kt,P))}let se=m(F,ae),Te=se.min.reduce((Kt,{val:nr})=>Math.min(Kt,nr),1/0),We=se.max.reduce((Kt,{val:nr})=>Math.max(Kt,nr),-1/0)-Te,Ge=_.boundsOfCoords(ve.flat()),[gt,,mt]=Ge||[],Tt=mt-gt;if(!!Ge&&(We>360||We<360&&TtMath.max(ht,Kt(Re)),0),Zt=se.max.reduce((ht,Re)=>Math.max(ht,nr(Re)),0),sr=ae._length-_r-Zt,Ot=sr>ae._length/10?Tt*ae._length/sr:Tt,vt=(gt+mt)/2;ae.range=[vt-Ot/2,vt+Ot/2]}var $=(ae.range[0]+ae.range[1])/2,ee=(oe.range[0]+oe.range[1])/2;if(P._isScoped)K={lon:$,lat:ee};else if(P._isClipped){K={lon:$,lat:ee},G={lon:$,lat:ee,roll:G.roll};var ne=Z.type,fe=C.lonaxisSpan[ne]/2||180,ye=C.lataxisSpan[ne]/2||90;Y=[$-fe,$+fe],q=[ee-ye,ee+ye]}else K={lon:$,lat:ee},G={lon:$,lat:G.lat,roll:G.roll}}H.center([K.lon-G.lon,K.lat-G.lat]).rotate([-G.lon,-G.lat,G.roll]).parallels(Z.parallels);var xe=N(Y,q);H.fitExtent(X,xe);var Ae=this.bounds=H.getBounds(xe),Me=this.fitScale=H.scale(),Ie=H.translate();if(H.scaleExtent=()=>{var ve;let{minscale:se}=Z,Te=(ve=Z.maxscale)!=null?ve:1/0;return[Me*Math.min(se,Te),Me*Math.max(se,Te)]},P.fitbounds){var Ue=H.getBounds(N(ae.range,oe.range)),qe=Math.min((Ae[1][0]-Ae[0][0])/(Ue[1][0]-Ue[0][0]),(Ae[1][1]-Ae[0][1])/(Ue[1][1]-Ue[0][1]));isFinite(qe)?H.scale(qe*Me):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else H.scale(Z.scale*Me);var ke=this.midPt=[(Ae[0][0]+Ae[1][0])/2,(Ae[0][1]+Ae[1][1])/2];if(H.translate([Ie[0]+(ke[0]-Ie[0]),Ie[1]+(ke[1]-Ie[1])]).clipExtent(Ae),P._isAlbersUsa){var ge=H([K.lon,K.lat]);if(ge){var ue=H.translate();H.translate([ue[0]-(ge[0]-ue[0]),ue[1]-(ge[1]-ue[1])])}}},b.updateBaseLayers=function(R,B){var F=this,P=F.topojson,j=F.layers,U=F.basePaths;function Z(X){return X==="lonaxis"||X==="lataxis"}function Q(X){return!!C.lineLayers[X]}function re(X){return!!C.fillLayers[X]}var ae=this.hasChoropleth?C.layersForChoropleth:C.layers,oe=ae.filter(function(X){return Q(X)||re(X)?B["show"+X]:Z(X)?B[X].showgrid:!0}),H=F.framework.selectAll(".layer").data(oe,String);H.exit().each(function(X){delete j[X],delete U[X],v.select(this).remove()}),H.enter().append("g").attr("class",function(X){return"layer "+X}).each(function(X){var K=j[X]=v.select(this);X==="bg"?F.bgRect=K.append("rect").style("pointer-events","all"):Z(X)?U[X]=K.append("path").style("fill","none"):X==="backplot"?K.append("g").classed("choroplethlayer",!0):X==="frontplot"?K.append("g").classed("scatterlayer",!0):Q(X)?U[X]=K.append("path").style("fill","none").style("stroke-miterlimit",2):re(X)&&(U[X]=K.append("path").style("stroke","none"))}),H.order(),H.each(function(X){var K=U[X],G=C.layerNameToAdjective[X];X==="frame"?K.datum(C.sphereSVG):Q(X)||re(X)?K.datum(u(P,P.objects[X])):Z(X)&&K.datum(I(X,B,R)).call(r.stroke,B[X].gridcolor).call(n.dashLine,B[X].griddash,B[X].gridwidth),Q(X)?K.call(r.stroke,B[G+"color"]).call(n.dashLine,"",B[G+"width"]):re(X)&&K.call(r.fill,B[G+"color"])})},b.updateDims=function(R,B){var F=this.bounds,P=(B.framewidth||0)/2,j=F[0][0]-P,U=F[0][1]-P,Z=F[1][0]-j+P,Q=F[1][1]-U+P;n.setRect(this.clipRect,j,U,Z,Q),this.bgRect.call(n.setRect,j,U,Z,Q).call(r.fill,B.bgcolor),this.xaxis._offset=j,this.xaxis._length=Z,this.yaxis._offset=U,this.yaxis._length=Q},b.updateFx=function(R,B){var F=this,P=F.graphDiv,j=F.bgRect,U=R.dragmode,Z=R.clickmode;if(F.isStatic)return;function Q(){var H=F.viewInitial,X={};for(var K in H)X[F.id+"."+K]=H[K];e.call("_guiRelayout",P,X),P.emit("plotly_doubleclick",null)}function re(H){return F.projection.invert([H[0]+F.xaxis._offset,H[1]+F.yaxis._offset])}var ae=function(H,X){if(X.isRect){var K=H.range={};K[F.id]=[re([X.xmin,X.ymin]),re([X.xmax,X.ymax])]}else{var G=H.lassoPoints={};G[F.id]=X.map(re)}},oe={element:F.bgRect.node(),gd:P,plotinfo:{id:F.id,xaxis:F.xaxis,yaxis:F.yaxis,fillRangeItems:ae},xaxes:[F.xaxis],yaxes:[F.yaxis],subplot:F.id,clickFn:function(H){H===2&&w(P)}};if(U==="pan"){j.node().onmousedown=null;let H=M(F,B);if(j.call(H),!v.event){let X=F.projection.scale(),[K,G]=F.projection.scaleExtent();(XG)&&H.event(j)}j.on("dblclick.zoom",Q),P._context._scrollZoom.geo||j.on("wheel.zoom",null)}else(U==="select"||U==="lasso")&&(j.on(".zoom",null),oe.prepFn=function(H,X,K){i(H,X,K,oe,U)},g.init(oe));j.on("mousemove",function(){var H=F.projection.invert(t.getPositionFromD3Event());if(!H)return g.unhover(P,v.event);F.xaxis.p2c=function(){return H[0]},F.yaxis.p2c=function(){return H[1]},o.hover(P,v.event,F.id)}),j.on("mouseout",function(){P._dragging||g.unhover(P,v.event)}),j.on("click",function(){U!=="select"&&U!=="lasso"&&(Z.indexOf("select")>-1&&S(v.event,P,[F.xaxis],[F.yaxis],F.id,oe),Z.indexOf("event")>-1&&o.click(P,v.event))})},b.makeFramework=function(){var R=this,B=R.graphDiv,F=B._fullLayout,P="clip"+F._uid+R.id;R.clipDef=F._clips.append("clipPath").attr("id",P),R.clipRect=R.clipDef.append("rect"),R.framework=v.select(R.container).append("g").attr("class","geo "+R.id).call(n.setClipUrl,P,B),R.project=function(j){var U=R.projection(j);return U?[U[0]-R.xaxis._offset,U[1]-R.yaxis._offset]:[null,null]},R.xaxis={_id:"x",c2p:function(j){return R.project(j)[0]}},R.yaxis={_id:"y",c2p:function(j){return R.project(j)[1]}},R.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(R.mockAxis,F)},b.saveViewInitial=function(R){var B=R.center||{},F=R.projection,P=F.rotation||{};this.viewInitial={fitbounds:R.fitbounds,"projection.scale":F.scale};var j;R._isScoped?j={"center.lon":B.lon,"center.lat":B.lat}:R._isClipped?j={"projection.rotation.lon":P.lon,"projection.rotation.lat":P.lat,"center.lon":B.lon,"center.lat":B.lat}:j={"center.lon":B.lon,"center.lat":B.lat,"projection.rotation.lon":P.lon},t.extendFlat(this.viewInitial,j)},b.render=function(R){this._hasMarkerAngles&&R?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},b._render=function(){var R=this.projection,B=R.getPath(),F;function P(U){var Z=R(U.lonlat);return Z?a(Z[0],Z[1]):null}function j(U){return R.isLonLatOverEdges(U.lonlat)?"none":null}for(F in this.basePaths)this.basePaths[F].attr("d",B);for(F in this.dataPaths)this.dataPaths[F].attr("d",function(U){return B(U.geojson)});for(F in this.dataPoints)this.dataPoints[F].attr("display",j).attr("transform",P)};function z(R){var B=R.projection,F=B.type,P=C.projNames[F];P="geo"+t.titleCase(P);for(var j=x[P]||l[P],U=j(),Z=R._isSatellite?Math.acos(1/B.distance)*180/Math.PI:R._isClipped?C.lonaxisSpan[F]/2:null,Q=["center","rotate","parallels","clipExtent"],re=function(H){return H?U:[]},ae=0;aeG}else return!1},U.getPath=function(){return E().projection(U)},U.getBounds=function(H){return U.getPath().bounds(H)},U.precision(C.precision),R._isSatellite&&U.tilt(B.tilt).distance(B.distance),Z&&U.clipAngle(Z-C.clipPad),U}function I(R,B,F){var P=1e-6,j=2.5,U=B[R],Z=C.scopeDefaults[B.scope],Q,re,ae;R==="lonaxis"?(Q=Z.lonaxisRange,re=Z.lataxisRange,ae=function(ee,ne){return[ee,ne]}):R==="lataxis"&&(Q=Z.lataxisRange,re=Z.lonaxisRange,ae=function(ee,ne){return[ne,ee]});var oe={type:"linear",range:[Q[0],Q[1]-P],tick0:U.tick0,dtick:U.dtick};c.setConvert(oe,F);var H=c.calcTicks(oe);!B.isScoped&&R==="lonaxis"&&H.pop();for(var X=H.length,K=new Array(X),G=0;Gfe[ye]!=null)||l.fitboundsIncompatible.has(i)?n.fitbounds=!1:ee.forEach(({dst:fe,key:ye})=>fe&&(fe[ye]=null))}}}}),vw=Ee({"src/plots/geo/index.js"(J,V){"use strict";var v=uf().getSubplotCalcData,x=Vr().counterRegex,E=J8(),k="geo",l=x(k),e={};e[k]={valType:"subplotid",dflt:k,editType:"calc"};function t(n){for(var o=n._fullLayout,s=n.calcdata,c=o._subplots[k],m=0;m")}}}}),gw=Ee({"src/traces/choropleth/event_data.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){x.location=E.location,x.z=E.z;var t=l[e];return t.fIn&&t.fIn.properties&&(x.properties=t.fIn.properties),x.ct=t.ct,x}}}),yw=Ee({"src/traces/choropleth/select.js"(J,V){"use strict";V.exports=function(x,E){var k=x.cd,l=x.xaxis,e=x.yaxis,t=[],a,r,n,o,s;if(E===!1)for(a=0;a=Math.min(U,Z)&&g<=Math.max(U,Z)?0:1/0}if(I=Math.min(Q,re)&&i<=Math.max(Q,re)?0:1/0}B=Math.sqrt(I*I+N*N),u=S[z]}}}else for(z=S.length-1;z>-1;z--)f=S[z],A=h[f],b=p[f],I=c.c2p(A)-g,N=m.c2p(b)-i,R=Math.sqrt(I*I+N*N),R100},J.isDotSymbol=function(v){return typeof v=="string"?V.DOT_RE.test(v):v>200}}}),i7=Ee({"src/traces/scattergl/defaults.js"(J,V){"use strict";var v=Vr(),x=Ri(),E=By(),k=Rm(),l=Wh(),e=al(),t=Dv(),a=Ih(),r=gh(),n=Rh(),o=Xh(),s=Fh();V.exports=function(m,h,p,g){function i(u,A){return v.coerce(m,h,k,u,A)}var w=m.marker?E.isOpenSymbol(m.marker.symbol):!1,S=e.isBubble(m),M=t(m,h,g,i);if(!M){h.visible=!1;return}a(m,h,g,i),i("xhoverformat"),i("yhoverformat");var C=M>>1,m=t[c],h=r!==void 0?r(m,a):m-a;h>=0?(s=c,o=c-1):n=c+1}return s}function x(t,a,r,n,o){for(var s=o+1;n<=o;){var c=n+o>>>1,m=t[c],h=r!==void 0?r(m,a):m-a;h>0?(s=c,o=c-1):n=c+1}return s}function E(t,a,r,n,o){for(var s=n-1;n<=o;){var c=n+o>>>1,m=t[c],h=r!==void 0?r(m,a):m-a;h<0?(s=c,n=c+1):o=c-1}return s}function k(t,a,r,n,o){for(var s=n-1;n<=o;){var c=n+o>>>1,m=t[c],h=r!==void 0?r(m,a):m-a;h<=0?(s=c,n=c+1):o=c-1}return s}function l(t,a,r,n,o){for(;n<=o;){var s=n+o>>>1,c=t[s],m=r!==void 0?r(c,a):c-a;if(m===0)return s;m<=0?n=s+1:o=s-1}return-1}function e(t,a,r,n,o,s){return typeof r=="function"?s(t,a,r,n===void 0?0:n|0,o===void 0?t.length-1:o|0):s(t,a,void 0,r===void 0?0:r|0,n===void 0?t.length-1:n|0)}V.exports={ge:function(t,a,r,n,o){return e(t,a,r,n,o,v)},gt:function(t,a,r,n,o){return e(t,a,r,n,o,x)},lt:function(t,a,r,n,o){return e(t,a,r,n,o,E)},le:function(t,a,r,n,o){return e(t,a,r,n,o,k)},eq:function(t,a,r,n,o){return e(t,a,r,n,o,l)}}}}),_w=Ee({"node_modules/clamp/index.js"(J,V){V.exports=v;function v(x,E,k){return Ek?k:x:xE?E:x}}}),Jh=Ee({"node_modules/pick-by-alias/index.js"(J,V){"use strict";V.exports=function(k,l,e){var t={},a,r;if(typeof l=="string"&&(l=x(l)),Array.isArray(l)){var n={};for(r=0;r1&&(E=arguments),typeof E=="string"?E=E.split(/\s/).map(parseFloat):typeof E=="number"&&(E=[E]),E.length&&typeof E[0]=="number"?E.length===1?k={width:E[0],height:E[0],x:0,y:0}:E.length===2?k={width:E[0],height:E[1],x:0,y:0}:k={x:E[0],y:E[1],width:E[2]-E[0]||0,height:E[3]-E[1]||0}:E&&(E=v(E,{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"}),k={x:E.left||0,y:E.top||0},E.width==null?E.right?k.width=E.right-k.x:k.width=0:k.width=E.width,E.height==null?E.bottom?k.height=E.bottom-k.y:k.height=0:k.height=E.height),k}}}),Jv=Ee({"node_modules/array-bounds/index.js"(J,V){"use strict";V.exports=v;function v(x,E){if(!x||x.length==null)throw Error("Argument should be an array");E==null?E=1:E=Math.floor(E);for(var k=Array(E*2),l=0;le&&(e=x[a]),x[a]>>1,S;h.dtype||(h.dtype="array"),typeof h.dtype=="string"?S=new(r(h.dtype))(w):h.dtype&&(S=h.dtype,Array.isArray(S)&&(S.length=w));for(let I=0;Ip||P>o){for(let Y=0;Yne||Z>fe||Q=ae||$===ee)return;let ye=M[q];ee===void 0&&(ee=ye.length);for(let ue=$;ue=B&&se<=P&&Te>=F&&Te<=j&&oe.push(ve)}let xe=C[q],Ae=xe[$*4+0],Me=xe[$*4+1],Ie=xe[$*4+2],Ue=xe[$*4+3],qe=X(xe,$+1),ke=Y*.5,ge=q+1;H(K,G,ke,ge,Ae,Me||Ie||Ue||qe),H(K,G+ke,ke,ge,Me,Ie||Ue||qe),H(K+ke,G,ke,ge,Ie,Ue||qe),H(K+ke,G+ke,ke,ge,Ue,qe)}function X(K,G){let Y=null,q=0;for(;Y===null;)if(Y=K[G*4+q],q++,q>K.length)return null;return Y}return oe}function b(I,N,R,B,F){let P=[];for(let j=0;j2&&(t.push([r].concat(n.splice(0,2))),o="l",r=r=="m"?"l":"L");;){if(n.length==v[o])return n.unshift(r),t.push(n);if(n.length1&&(m=1),m<-1&&(m=-1),c*Math.acos(m)},e=function(r,n,o,s,c,m,h,p,g,i,w,S){var M=Math.pow(c,2),C=Math.pow(m,2),_=Math.pow(w,2),T=Math.pow(S,2),f=M*C-M*T-C*_;f<0&&(f=0),f/=M*T+C*_,f=Math.sqrt(f)*(h===p?-1:1);var u=f*c/m*S,A=f*-m/c*w,b=i*u-g*A+(r+o)/2,z=g*u+i*A+(n+s)/2,I=(w-u)/c,N=(S-A)/m,R=(-w-u)/c,B=(-S-A)/m,F=l(1,0,I,N),P=l(I,N,R,B);return p===0&&P>0&&(P-=x),p===1&&P<0&&(P+=x),[b,z,F,P]},t=function(r){var n=r.px,o=r.py,s=r.cx,c=r.cy,m=r.rx,h=r.ry,p=r.xAxisRotation,g=p===void 0?0:p,i=r.largeArcFlag,w=i===void 0?0:i,S=r.sweepFlag,M=S===void 0?0:S,C=[];if(m===0||h===0)return[];var _=Math.sin(g*x/360),T=Math.cos(g*x/360),f=T*(n-s)/2+_*(o-c)/2,u=-_*(n-s)/2+T*(o-c)/2;if(f===0&&u===0)return[];m=Math.abs(m),h=Math.abs(h);var A=Math.pow(f,2)/Math.pow(m,2)+Math.pow(u,2)/Math.pow(h,2);A>1&&(m*=Math.sqrt(A),h*=Math.sqrt(A));var b=e(n,o,s,c,m,h,w,M,_,T,f,u),z=v(b,4),I=z[0],N=z[1],R=z[2],B=z[3],F=Math.abs(B)/(x/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);B/=P;for(var j=0;j4?(a=i[i.length-4],r=i[i.length-3]):(a=m,r=h),t.push(i)}return t}function E(l,e,t,a){return["C",l,e,t,a,t,a]}function k(l,e,t,a,r,n){return["C",l/3+2/3*t,e/3+2/3*a,r/3+2/3*t,n/3+2/3*a,r,n]}}}),bw=Ee({"node_modules/is-svg-path/index.js"(J,V){"use strict";V.exports=function(x){return typeof x!="string"?!1:(x=x.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(x)&&/[\dz]$/i.test(x)&&x.length>4))}}}),m7=Ee({"node_modules/svg-path-bounds/index.js"(J,V){"use strict";var v=h7(),x=d7(),E=p7(),k=bw();V.exports=l;function l(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!k(e))throw Error("String is not an SVG path.");e=v(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=x(e),e=E(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],a=0,r=e.length;at[2]&&(t[2]=n[o+0]),n[o+1]>t[3]&&(t[3]=n[o+1]);return t}}}),g7=Ee({"node_modules/bitmap-sdf/index.js"(J,V){"use strict";V.exports=x;var v=1e20;function x(l,e){e||(e={});var t=e.cutoff==null?.25:e.cutoff,a=e.radius==null?8:e.radius,r=e.channel||0,n,o,s,c,m,h,p,g,i,w,S;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");n=e.width,o=e.height,c=l,e.stride?h=e.stride:h=Math.floor(l.length/n/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(g=l,p=g.getContext("2d"),n=g.width,o=g.height,i=p.getImageData(0,0,n,o),c=i.data,h=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(g=l.canvas,p=l,n=g.width,o=g.height,i=p.getImageData(0,0,n,o),c=i.data,h=4):window.ImageData&&l instanceof window.ImageData&&(i=l,n=l.width,o=l.height,c=i.data,h=4);if(s=Math.max(n,o),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(m=c,c=Array(n*o),w=0,S=Math.floor(m.length/h);wy7});function y7(J,V={}){if(!(0,Tw.default)(J))throw Error("Invalid SVG path");let v,x;V.shape||Array.isArray(V)?[v,x]=V.shape||V:(v=Fm.width=V.width||V.w||200,x=Fm.height=V.height||V.h||200);let E=Math.min(v,x),k=V.stroke||0,l=V.viewbox||V.viewBox||(0,ww.default)(J),e=[v/(l[2]-l[0]),x/(l[3]-l[1])],t=Math.min(e[0]||0,e[1]||0)/2;hh.fillStyle="black",hh.fillRect(0,0,v,x),hh.fillStyle="white",k&&(typeof k!="number"&&(k=1),hh.strokeStyle=k>0?"white":"black",hh.lineWidth=Math.abs(k)),hh.translate(v*.5,x*.5),hh.scale(t,t);let a=new Path2D(J);return hh.fill(a),k&&hh.stroke(a),hh.setTransform(1,0,0,1,0,0),(0,Aw.default)(hh,{cutoff:V.cutoff!=null?V.cutoff:.5,radius:V.radius!=null?V.radius:E*.5})}var ww,Tw,Aw,Fm,hh,_7=In({"node_modules/svg-path-sdf/svg-path-sdf.js"(){ww=Yn(m7()),Tw=Yn(bw()),Aw=Yn(g7()),Fm=document.createElement("canvas"),hh=Fm.getContext("2d",{willReadFrequently:!0})}}),ep=Ee({"src/traces/scattergl/convert.js"(J,V){"use strict";var v=mi(),x=(_7(),ra(xw)).default,{normalize:E}=Qa(),k=Ri(),l=Vr(),e=l.isArrayOrTypedArray,t=yo(),a=Xl(),r=Ad().formatColor,n=al(),o=U0(),s=By(),c=sv(),m=gd().DESELECTDIM,h={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},p=Qf().appendArrayPointValue;function g(B,F){var P,j={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},U=B._context.plotGlPixelRatio;if(F.visible!==!0)return j;if(n.hasText(F)&&(j.text=i(B,F),j.textSel=C(B,F,F.selected),j.textUnsel=C(B,F,F.unselected)),n.hasMarkers(F)&&(j.marker=S(B,F),j.markerSel=M(B,F,F.selected),j.markerUnsel=M(B,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var Z=F.marker.opacity;for(j.markerUnsel.opacity=new Array(Z.length),P=0;P500?"bold":"normal":B}function S(B,F){var P=F._length,j=F.marker,U={},Z,Q=e(j.symbol),re=e(j.angle),ae=e(j.color),oe=e(j.line.color),H=e(j.opacity),X=e(j.size),K=e(j.line.width),G;if(Q||(G=s.isOpenSymbol(j.symbol)),Q||ae||oe||H||re){U.symbols=new Array(P),U.angles=new Array(P),U.colors=new Array(P),U.borderColors=new Array(P);var Y=j.symbol,q=j.angle,$=r(j,j.opacity,P),ee=r(j.line,j.opacity,P);if(!e(ee[0])){var ne=ee;for(ee=Array(P),Z=0;Zc.TOO_MANY_POINTS||n.hasMarkers(F)?"rect":"round";if(oe&&F.connectgaps){var X=Z[0],K=Z[1];for(Q=0;Q1?ae[Q]:ae[0]:ae,G=e(oe)?oe.length>1?oe[Q]:oe[0]:oe,Y=h[K],q=h[G],$=H?H/.8+1:0,ee=-q*$-q*.5;Z.offset[Q]=[Y*$/X,ee/X]}}return Z}V.exports={style:g,markerStyle:S,markerSelection:M,linePositions:I,errorBarPositions:N,textPosition:R}}}),Mw=Ee({"src/traces/scattergl/scene_update.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k){var l=k._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return k._scene||(l=k._scene={},l.init=function(){v.extendFlat(l,t,e)},l.init(),l.update=function(r){var n=v.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(n),l.scatter2d&&l.scatter2d.update(n),l.line2d&&l.line2d.update(n),l.error2d&&l.error2d.update(n.concat(n)),l.select2d&&l.select2d.update(n),l.glText)for(var o=0;o=m,u=T*2,A={},b,z=M.makeCalcdata(w,"x"),I=C.makeCalcdata(w,"y"),N=l(w,M,"x",z),R=l(w,C,"y",I),B=N.vals,F=R.vals;w._x=B,w._y=F,w.xperiodalignment&&(w._origX=z,w._xStarts=N.starts,w._xEnds=N.ends),w.yperiodalignment&&(w._origY=I,w._yStarts=R.starts,w._yEnds=R.ends);var P=new Array(u),j=new Array(T);for(b=0;b1&&x.extendFlat(_.line,o.linePositions(g,w,S)),_.errorX||_.errorY){var T=o.errorBarPositions(g,w,S,M,C);_.errorX&&x.extendFlat(_.errorX,T.x),_.errorY&&x.extendFlat(_.errorY,T.y)}return _.text&&(x.extendFlat(_.text,{positions:S},o.textPosition(g,w,_.text,_.marker)),x.extendFlat(_.textSel,{positions:S},o.textPosition(g,w,_.text,_.markerSel)),x.extendFlat(_.textUnsel,{positions:S},o.textPosition(g,w,_.text,_.markerUnsel))),_}}}),Sw=Ee({"src/traces/scattergl/edit_style.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=gd().DESELECTDIM;function k(l){var e=l[0],t=e.trace,a=e.t,r=a._scene,n=a.index,o=r.selectBatch[n],s=r.unselectBatch[n],c=r.textOptions[n],m=r.textSelectedOptions[n]||{},h=r.textUnselectedOptions[n]||{},p=v.extendFlat({},c),g,i;if(o.length||s.length){var w=m.color,S=h.color,M=c.color,C=v.isArrayOrTypedArray(M);for(p.color=new Array(t._length),g=0;g10&&/[0-9](?:\s|\/)/.test(k)&&(e=k.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),a=k.match(/([a-z])/ig).join("").toLowerCase());else isNaN(k)?Array.isArray(k)||k.length?(e=[k[0],k[1],k[2]],a="rgb",t=k.length===4?k[3]:1):k instanceof Object&&(k.r!=null||k.red!=null||k.R!=null?(a="rgb",e=[k.r||k.red||k.R||0,k.g||k.green||k.G||0,k.b||k.blue||k.B||0]):(a="hsl",e=[k.h||k.hue||k.H||0,k.s||k.saturation||k.S||0,k.l||k.lightness||k.L||k.b||k.brightness]),t=k.a||k.alpha||k.opacity||1,k.opacity!=null&&(t/=100)):(a="rgb",e=[k>>>16,(k&65280)>>>8,k&255]);return{space:a,values:e,alpha:t}}}}),A7=Ee({"node_modules/color-rgba/index.js"(J,V){"use strict";var v=T7();V.exports=function(k){Array.isArray(k)&&k.raw&&(k=String.raw.apply(null,arguments));var l,e,t,a=v(k);if(!a.space)return[];var r=[0,0,0],n=a.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(a.values[0],r[0]),n[0]),l[1]=Math.min(Math.max(a.values[1],r[1]),n[1]),l[2]=Math.min(Math.max(a.values[2],r[2]),n[2]),a.space[0]==="h"&&(l=x(l)),l.push(Math.min(Math.max(a.alpha,0),1)),l};function x(E){var k=E[0]/360,l=E[1]/100,e=E[2]/100,t,a,r,n,o,s=0;if(l===0)return o=e*255,[o,o,o];for(a=e<.5?e*(1+l):e+l-e*l,t=2*e-a,n=[0,0,0];s<3;)r=k+1/3*-(s-1),r<0?r++:r>1&&r--,o=6*r<1?t+(a-t)*6*r:2*r<1?a:3*r<2?t+(a-t)*(2/3-r)*6:t,n[s++]=o*255;return n}}}),zm=Ee({"node_modules/color-normalize/index.js"(J,V){"use strict";var v=A7(),x=Ny();V.exports=function(l,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var t=x(e),a=new t(4),r=e!=="uint8"&&e!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=v(l),l[0]/=255,l[1]/=255,l[2]/=255),E(l)?(a[0]=l[0],a[1]=l[1],a[2]=l[2],a[3]=l[3]!=null?l[3]:255,r&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(r?(a[0]=l[0],a[1]=l[1],a[2]=l[2],a[3]=l[3]!=null?l[3]:1):(a[0]=Math.min(Math.max(Math.floor(l[0]*255),0),255),a[1]=Math.min(Math.max(Math.floor(l[1]*255),0),255),a[2]=Math.min(Math.max(Math.floor(l[2]*255),0),255),a[3]=l[3]==null?255:Math.min(Math.max(Math.floor(l[3]*255),0),255)),a)};function E(k){return!!(k instanceof Uint8Array||k instanceof Uint8ClampedArray||Array.isArray(k)&&(k[0]>1||k[0]===0)&&(k[1]>1||k[1]===0)&&(k[2]>1||k[2]===0)&&(!k[3]||k[3]>1))}}}),M7=Ee({"node_modules/color-id/index.js"(J,V){"use strict";var v=_w();V.exports=x,V.exports.to=x,V.exports.from=E;function x(k,l){l==null&&(l=!0);var e=k[0],t=k[1],a=k[2],r=k[3];r==null&&(r=l?1:255),l&&(e*=255,t*=255,a*=255,r*=255),e=v(e,0,255)&255,t=v(t,0,255)&255,a=v(a,0,255)&255,r=v(r,0,255)&255;var n=e*16777216+(t<<16)+(a<<8)+r;return n}function E(k,l){k=+k;var e=k>>>24,t=(k&16711680)>>>16,a=(k&65280)>>>8,r=k&255;return l===!1?[e,t,a,r]:[e/255,t/255,a/255,r/255]}}}),S7=Ee({"node_modules/glslify/browser.js"(J,V){V.exports=function(v){typeof v=="string"&&(v=[v]);for(var x=[].slice.call(arguments,1),E=[],k=0;k[this.tooManyColors?0:_,g.height],pixelRatio:m.context("pixelRatio"),scale:m.prop("scale"),scaleFract:m.prop("scaleFract"),translate:m.prop("translate"),translateFract:m.prop("translateFract"),markerTexture:m.prop("markerTexture"),paletteTexture:g},attributes:{x:(b,z)=>z.xAttr||{buffer:z.positionBuffer,stride:8,offset:0},y:(b,z)=>z.yAttr||{buffer:z.positionBuffer,stride:8,offset:4},xFract:(b,z)=>z.xAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:0},yFract:(b,z)=>z.yAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:4},size:(b,z)=>z.size.length?{buffer:z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(z.size*255/this.maxSize)]},borderSize:(b,z)=>z.borderSize.length?{buffer:z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(z.borderSize*255/this.maxSize)]},colorId:(b,z)=>z.color.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?i.slice(z.color*4,z.color*4+4):[z.color]},borderColorId:(b,z)=>z.borderColor.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?i.slice(z.borderColor*4,z.borderColor*4+4):[z.borderColor]},isActive:(b,z)=>z.activation===!0?{constant:[1]}:z.activation?z.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:m.prop("viewport")},viewport:m.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:m.prop("elements"),count:m.prop("count"),offset:m.prop("offset"),primitive:"points"},u=Object.assign({},f);u.frag=l([`precision highp float; #define GLSLIFY 1 uniform float opacity; @@ -2030,7 +2031,7 @@ void main() { } } -`]),ee.vert=d([`precision highp float; +`]),u.vert=l([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; @@ -2098,7 +2099,7 @@ void main() { fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); } -`]),this.drawMarker=x(ee);var te=f({},Y);te.frag=d([`precision highp float; +`]),this.drawMarker=m(u);let A=Object.assign({},f);A.frag=l([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor, fragBorderColor; @@ -2129,7 +2130,7 @@ void main() { color.a *= alpha * opacity; gl_FragColor = color; } -`]),te.vert=d([`precision highp float; +`]),A.vert=l([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; @@ -2193,8 +2194,8 @@ void main() { fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } -`]),M&&(te.frag=te.frag.replace("smoothstep","smoothStep"),ee.frag=ee.frag.replace("smoothstep","smoothStep")),this.drawCircle=x(te)}T.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},T.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},T.prototype.draw=function(){for(var x=this,_=arguments.length,D=new Array(_),C=0;C<_;C++)D[C]=arguments[C];var F=this.groups;if(D.length===1&&Array.isArray(D[0])&&(D[0][0]===null||Array.isArray(D[0][0]))&&(D=D[0]),this.regl._refresh(),D.length)for(var I=0;Ise)?ce.tree=p(_e,{bounds:Ne}):se&&se.length&&(ce.tree=se),ce.tree){var ut={primitive:"points",usage:"static",data:ce.tree,type:"uint32"};ce.elements?ce.elements(ut):ce.elements=z.elements(ut)}var ot=A.float32(_e);ne({data:ot,usage:"dynamic"});var yt=A.fract32(_e,ot);return be({data:yt,usage:"dynamic"}),De({data:new Uint8Array(qe),type:"uint8",usage:"stream"}),_e}},{marker:function(_e,ce,ie){var se=ce.activation;if(se.forEach(function(yt){return yt&&yt.destroy&&yt.destroy()}),se.length=0,!_e||typeof _e[0]=="number"){var ne=x.addMarker(_e);se[ne]=!0}else{for(var be=[],De=0,qe=Math.min(_e.length,ce.count);De=0)return F;var I;if(x instanceof Uint8Array||x instanceof Uint8ClampedArray)I=x;else{I=new Uint8Array(x.length);for(var z=0,R=x.length;zC*4&&(this.tooManyColors=!0),this.updatePalette(D),F.length===1?F[0]:F},T.prototype.updatePalette=function(x){if(!this.tooManyColors){var _=this.maxColors,D=this.paletteTexture,C=Math.ceil(x.length*.25/_);if(C>1){x=x.slice();for(var F=x.length*.25%_;F80*k){ee=ae=z[0],te=j=z[1];for(var Z=k;Zae&&(ae=G),K>j&&(j=K);H=Math.max(ae-ee,j-te),H=H!==0?32767/H:0}return S(q,Y,k,ee,te,H,0),Y}function v(z,R,k,B,N){var q,Y;if(N===I(z,R,k,B)>0)for(q=R;q=R;q-=B)Y=D(q,z[q],z[q+1],Y);return Y&&A(Y,Y.next)&&(C(Y),Y=Y.next),Y}function w(z,R){if(!z)return z;R||(R=z);var k=z,B;do if(B=!1,!k.steiner&&(A(k,k.next)||M(k.prev,k,k.next)===0)){if(C(k),k=R=k.prev,k===k.next)break;B=!0}else k=k.next;while(B||k!==R);return R}function S(z,R,k,B,N,q,Y){if(z){!Y&&q&&p(z,B,N,q);for(var ee=z,te,ae;z.prev!==z.next;){if(te=z.prev,ae=z.next,q?e(z,B,N,q):l(z)){R.push(te.i/k|0),R.push(z.i/k|0),R.push(ae.i/k|0),C(z),z=ae.next,ee=ae.next;continue}if(z=ae,z===ee){Y?Y===1?(z=t(w(z),R,k),S(z,R,k,B,N,q,2)):Y===2&&a(z,R,k,B,N,q):S(w(z),R,k,B,N,q,1);break}}}}function l(z){var R=z.prev,k=z,B=z.next;if(M(R,k,B)>=0)return!1;for(var N=R.x,q=k.x,Y=B.x,ee=R.y,te=k.y,ae=B.y,j=Nq?N>Y?N:Y:q>Y?q:Y,H=ee>te?ee>ae?ee:ae:te>ae?te:ae,Z=B.next;Z!==R;){if(Z.x>=j&&Z.x<=K&&Z.y>=G&&Z.y<=H&&o(N,ee,q,te,Y,ae,Z.x,Z.y)&&M(Z.prev,Z,Z.next)>=0)return!1;Z=Z.next}return!0}function e(z,R,k,B){var N=z.prev,q=z,Y=z.next;if(M(N,q,Y)>=0)return!1;for(var ee=N.x,te=q.x,ae=Y.x,j=N.y,G=q.y,K=Y.y,H=eete?ee>ae?ee:ae:te>ae?te:ae,$=j>G?j>K?j:K:G>K?G:K,Q=d(H,Z,R,k,B),re=d(X,$,R,k,B),ue=z.prevZ,pe=z.nextZ;ue&&ue.z>=Q&&pe&&pe.z<=re;){if(ue.x>=H&&ue.x<=X&&ue.y>=Z&&ue.y<=$&&ue!==N&&ue!==Y&&o(ee,j,te,G,ae,K,ue.x,ue.y)&&M(ue.prev,ue,ue.next)>=0||(ue=ue.prevZ,pe.x>=H&&pe.x<=X&&pe.y>=Z&&pe.y<=$&&pe!==N&&pe!==Y&&o(ee,j,te,G,ae,K,pe.x,pe.y)&&M(pe.prev,pe,pe.next)>=0))return!1;pe=pe.nextZ}for(;ue&&ue.z>=Q;){if(ue.x>=H&&ue.x<=X&&ue.y>=Z&&ue.y<=$&&ue!==N&&ue!==Y&&o(ee,j,te,G,ae,K,ue.x,ue.y)&&M(ue.prev,ue,ue.next)>=0)return!1;ue=ue.prevZ}for(;pe&&pe.z<=re;){if(pe.x>=H&&pe.x<=X&&pe.y>=Z&&pe.y<=$&&pe!==N&&pe!==Y&&o(ee,j,te,G,ae,K,pe.x,pe.y)&&M(pe.prev,pe,pe.next)>=0)return!1;pe=pe.nextZ}return!0}function t(z,R,k){var B=z;do{var N=B.prev,q=B.next.next;!A(N,q)&&E(N,B,B.next,q)&&h(N,q)&&h(q,N)&&(R.push(N.i/k|0),R.push(B.i/k|0),R.push(q.i/k|0),C(B),C(B.next),B=z=q),B=B.next}while(B!==z);return w(B)}function a(z,R,k,B,N,q){var Y=z;do{for(var ee=Y.next.next;ee!==Y.prev;){if(Y.i!==ee.i&&b(Y,ee)){var te=_(Y,ee);Y=w(Y,Y.next),te=w(te,te.next),S(Y,R,k,B,N,q,0),S(te,R,k,B,N,q,0);return}ee=ee.next}Y=Y.next}while(Y!==z)}function r(z,R,k,B){var N=[],q,Y,ee,te,ae;for(q=0,Y=R.length;q=k.next.y&&k.next.y!==k.y){var ee=k.x+(N-k.y)*(k.next.x-k.x)/(k.next.y-k.y);if(ee<=B&&ee>q&&(q=ee,Y=k.x=k.x&&k.x>=ae&&B!==k.x&&o(NY.x||k.x===Y.x&&c(Y,k)))&&(Y=k,G=K)),k=k.next;while(k!==te);return Y}function c(z,R){return M(z.prev,z,R.prev)<0&&M(R.next,z,z.next)<0}function p(z,R,k,B){var N=z;do N.z===0&&(N.z=d(N.x,N.y,R,k,B)),N.prevZ=N.prev,N.nextZ=N.next,N=N.next;while(N!==z);N.prevZ.nextZ=null,N.prevZ=null,f(N)}function f(z){var R,k,B,N,q,Y,ee,te,ae=1;do{for(k=z,z=null,q=null,Y=0;k;){for(Y++,B=k,ee=0,R=0;R0||te>0&&B;)ee!==0&&(te===0||!B||k.z<=B.z)?(N=k,k=k.nextZ,ee--):(N=B,B=B.nextZ,te--),q?q.nextZ=N:z=N,N.prevZ=q,q=N;k=B}q.nextZ=null,ae*=2}while(Y>1);return z}function d(z,R,k,B,N){return z=(z-k)*N|0,R=(R-B)*N|0,z=(z|z<<8)&16711935,z=(z|z<<4)&252645135,z=(z|z<<2)&858993459,z=(z|z<<1)&1431655765,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,z|R<<1}function y(z){var R=z,k=z;do(R.x=(z-Y)*(q-ee)&&(z-Y)*(B-ee)>=(k-Y)*(R-ee)&&(k-Y)*(q-ee)>=(N-Y)*(B-ee)}function b(z,R){return z.next.i!==R.i&&z.prev.i!==R.i&&!m(z,R)&&(h(z,R)&&h(R,z)&&x(z,R)&&(M(z.prev,z,R.prev)||M(z,R.prev,R))||A(z,R)&&M(z.prev,z,z.next)>0&&M(R.prev,R,R.next)>0)}function M(z,R,k){return(R.y-z.y)*(k.x-R.x)-(R.x-z.x)*(k.y-R.y)}function A(z,R){return z.x===R.x&&z.y===R.y}function E(z,R,k,B){var N=T(M(z,R,k)),q=T(M(z,R,B)),Y=T(M(k,B,z)),ee=T(M(k,B,R));return!!(N!==q&&Y!==ee||N===0&&g(z,k,R)||q===0&&g(z,B,R)||Y===0&&g(k,z,B)||ee===0&&g(k,R,B))}function g(z,R,k){return R.x<=Math.max(z.x,k.x)&&R.x>=Math.min(z.x,k.x)&&R.y<=Math.max(z.y,k.y)&&R.y>=Math.min(z.y,k.y)}function T(z){return z>0?1:z<0?-1:0}function m(z,R){var k=z;do{if(k.i!==z.i&&k.next.i!==z.i&&k.i!==R.i&&k.next.i!==R.i&&E(k,k.next,z,R))return!0;k=k.next}while(k!==z);return!1}function h(z,R){return M(z.prev,z,z.next)<0?M(z,R,z.next)>=0&&M(z,z.prev,R)>=0:M(z,R,z.prev)<0||M(z,z.next,R)<0}function x(z,R){var k=z,B=!1,N=(z.x+R.x)/2,q=(z.y+R.y)/2;do k.y>q!=k.next.y>q&&k.next.y!==k.y&&N<(k.next.x-k.x)*(q-k.y)/(k.next.y-k.y)+k.x&&(B=!B),k=k.next;while(k!==z);return B}function _(z,R){var k=new F(z.i,z.x,z.y),B=new F(R.i,R.x,R.y),N=z.next,q=R.prev;return z.next=R,R.prev=z,k.next=N,N.prev=k,B.next=k,k.prev=B,q.next=B,B.prev=q,B}function D(z,R,k,B){var N=new F(z,R,k);return B?(N.next=B.next,N.prev=B,B.next.prev=N,B.next=N):(N.prev=N,N.next=N),N}function C(z){z.next.prev=z.prev,z.prev.next=z.next,z.prevZ&&(z.prevZ.nextZ=z.nextZ),z.nextZ&&(z.nextZ.prevZ=z.prevZ)}function F(z,R,k){this.i=z,this.x=R,this.y=k,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}u.deviation=function(z,R,k,B){var N=R&&R.length,q=N?R[0]*k:z.length,Y=Math.abs(I(z,0,q,k));if(N)for(var ee=0,te=R.length;ee0&&(B+=z[N-1].length,k.holes.push(B))}return k}}}),AC=xe({"node_modules/array-normalize/index.js"(U,O){"use strict";var u=Nv();O.exports=v;function v(w,S,l){if(!w||w.length==null)throw Error("Argument should be an array");S==null&&(S=1),l==null&&(l=u(w,S));for(var e=0;e-1}}}),_3=xe({"node_modules/es5-ext/string/#/contains/index.js"(U,O){"use strict";O.exports=BC()()?String.prototype.contains:NC()}}),xd=xe({"node_modules/d/index.js"(U,O){"use strict";var u=jv(),v=g3(),w=X1(),S=y3(),l=_3(),e=O.exports=function(t,a){var r,n,i,s,c;return arguments.length<2||typeof t!="string"?(s=a,a=t,t=null):s=arguments[2],u(t)?(r=l.call(t,"c"),n=l.call(t,"e"),i=l.call(t,"w")):(r=i=!0,n=!1),c={value:a,configurable:r,enumerable:n,writable:i},s?w(S(s),c):c};e.gs=function(t,a,r){var n,i,s,c;return typeof t!="string"?(s=r,r=a,a=t,t=null):s=arguments[3],u(a)?v(a)?u(r)?v(r)||(s=r,r=void 0):r=void 0:(s=a,a=r=void 0):a=void 0,u(t)?(n=l.call(t,"c"),i=l.call(t,"e")):(n=!0,i=!1),c={get:a,set:r,configurable:n,enumerable:i},s?w(S(s),c):c}}}),rm=xe({"node_modules/es5-ext/function/is-arguments.js"(U,O){"use strict";var u=Object.prototype.toString,v=u.call(function(){return arguments}());O.exports=function(w){return u.call(w)===v}}}),am=xe({"node_modules/es5-ext/string/is-string.js"(U,O){"use strict";var u=Object.prototype.toString,v=u.call("");O.exports=function(w){return typeof w=="string"||w&&typeof w=="object"&&(w instanceof String||u.call(w)===v)||!1}}}),OC=xe({"node_modules/ext/global-this/is-implemented.js"(U,O){"use strict";O.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),UC=xe({"node_modules/ext/global-this/implementation.js"(U,O){var u=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};O.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return u()}try{return __global__||u()}finally{delete Object.prototype.__global__}}()}}),nm=xe({"node_modules/ext/global-this/index.js"(U,O){"use strict";O.exports=OC()()?globalThis:UC()}}),jC=xe({"node_modules/es6-symbol/is-implemented.js"(U,O){"use strict";var u=nm(),v={object:!0,symbol:!0};O.exports=function(){var w=u.Symbol,S;if(typeof w!="function")return!1;S=w("test symbol");try{String(S)}catch{return!1}return!(!v[typeof w.iterator]||!v[typeof w.toPrimitive]||!v[typeof w.toStringTag])}}}),qC=xe({"node_modules/es6-symbol/is-symbol.js"(U,O){"use strict";O.exports=function(u){return u?typeof u=="symbol"?!0:!u.constructor||u.constructor.name!=="Symbol"?!1:u[u.constructor.toStringTag]==="Symbol":!1}}}),b3=xe({"node_modules/es6-symbol/validate-symbol.js"(U,O){"use strict";var u=qC();O.exports=function(v){if(!u(v))throw new TypeError(v+" is not a symbol");return v}}}),VC=xe({"node_modules/es6-symbol/lib/private/generate-name.js"(U,O){"use strict";var u=xd(),v=Object.create,w=Object.defineProperty,S=Object.prototype,l=v(null);O.exports=function(e){for(var t=0,a,r;l[e+(t||"")];)++t;return e+=t||"",l[e]=!0,a="@@"+e,w(S,a,u.gs(null,function(n){r||(r=!0,w(this,a,u(n)),r=!1)})),a}}}),HC=xe({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(U,O){"use strict";var u=xd(),v=nm().Symbol;O.exports=function(w){return Object.defineProperties(w,{hasInstance:u("",v&&v.hasInstance||w("hasInstance")),isConcatSpreadable:u("",v&&v.isConcatSpreadable||w("isConcatSpreadable")),iterator:u("",v&&v.iterator||w("iterator")),match:u("",v&&v.match||w("match")),replace:u("",v&&v.replace||w("replace")),search:u("",v&&v.search||w("search")),species:u("",v&&v.species||w("species")),split:u("",v&&v.split||w("split")),toPrimitive:u("",v&&v.toPrimitive||w("toPrimitive")),toStringTag:u("",v&&v.toStringTag||w("toStringTag")),unscopables:u("",v&&v.unscopables||w("unscopables"))})}}}),GC=xe({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(U,O){"use strict";var u=xd(),v=b3(),w=Object.create(null);O.exports=function(S){return Object.defineProperties(S,{for:u(function(l){return w[l]?w[l]:w[l]=S(String(l))}),keyFor:u(function(l){var e;v(l);for(e in w)if(w[e]===l)return e})})}}}),WC=xe({"node_modules/es6-symbol/polyfill.js"(U,O){"use strict";var u=xd(),v=b3(),w=nm().Symbol,S=VC(),l=HC(),e=GC(),t=Object.create,a=Object.defineProperties,r=Object.defineProperty,n,i,s;if(typeof w=="function")try{String(w()),s=!0}catch{}else w=null;i=function(p){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(p)},O.exports=n=function c(p){var f;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?w(p):(f=t(i.prototype),p=p===void 0?"":String(p),a(f,{__description__:u("",p),__name__:u("",S(p))}))},l(n),e(n),a(i.prototype,{constructor:u(n),toString:u("",function(){return this.__name__})}),a(n.prototype,{toString:u(function(){return"Symbol ("+v(this).__description__+")"}),valueOf:u(function(){return v(this)})}),r(n.prototype,n.toPrimitive,u("",function(){var c=v(this);return typeof c=="symbol"?c:c.toString()})),r(n.prototype,n.toStringTag,u("c","Symbol")),r(i.prototype,n.toStringTag,u("c",n.prototype[n.toStringTag])),r(i.prototype,n.toPrimitive,u("c",n.prototype[n.toPrimitive]))}}),Jd=xe({"node_modules/es6-symbol/index.js"(U,O){"use strict";O.exports=jC()()?nm().Symbol:WC()}}),YC=xe({"node_modules/es5-ext/array/#/clear.js"(U,O){"use strict";var u=bd();O.exports=function(){return u(this).length=0,this}}}),Rp=xe({"node_modules/es5-ext/object/valid-callable.js"(U,O){"use strict";O.exports=function(u){if(typeof u!="function")throw new TypeError(u+" is not a function");return u}}}),XC=xe({"node_modules/type/string/coerce.js"(U,O){"use strict";var u=jv(),v=Y1(),w=Object.prototype.toString;O.exports=function(S){if(!u(S))return null;if(v(S)){var l=S.toString;if(typeof l!="function"||l===w)return null}try{return""+S}catch{return null}}}}),$C=xe({"node_modules/type/lib/safe-to-string.js"(U,O){"use strict";O.exports=function(u){try{return u.toString()}catch{try{return String(u)}catch{return null}}}}}),ZC=xe({"node_modules/type/lib/to-short-string.js"(U,O){"use strict";var u=$C(),v=/[\n\r\u2028\u2029]/g;O.exports=function(w){var S=u(w);return S===null?"":(S.length>100&&(S=S.slice(0,99)+"\u2026"),S=S.replace(v,function(l){switch(l){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}}}),x3=xe({"node_modules/type/lib/resolve-exception.js"(U,O){"use strict";var u=jv(),v=Y1(),w=XC(),S=ZC(),l=function(e,t){return e.replace("%v",S(t))};O.exports=function(e,t,a){if(!v(a))throw new TypeError(l(t,e));if(!u(e)){if("default"in a)return a.default;if(a.isOptional)return null}var r=w(a.errorMessage);throw u(r)||(r=t),new TypeError(l(r,e))}}}),KC=xe({"node_modules/type/value/ensure.js"(U,O){"use strict";var u=x3(),v=jv();O.exports=function(w){return v(w)?w:u(w,"Cannot use %v",arguments[1])}}}),JC=xe({"node_modules/type/plain-function/ensure.js"(U,O){"use strict";var u=x3(),v=g3();O.exports=function(w){return v(w)?w:u(w,"%v is not a plain function",arguments[1])}}}),QC=xe({"node_modules/es5-ext/array/from/is-implemented.js"(U,O){"use strict";O.exports=function(){var u=Array.from,v,w;return typeof u!="function"?!1:(v=["raz","dwa"],w=u(v),!!(w&&w!==v&&w[1]==="dwa"))}}}),e8=xe({"node_modules/es5-ext/function/is-function.js"(U,O){"use strict";var u=Object.prototype.toString,v=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);O.exports=function(w){return typeof w=="function"&&v(u.call(w))}}}),t8=xe({"node_modules/es5-ext/math/sign/is-implemented.js"(U,O){"use strict";O.exports=function(){var u=Math.sign;return typeof u!="function"?!1:u(10)===1&&u(-20)===-1}}}),r8=xe({"node_modules/es5-ext/math/sign/shim.js"(U,O){"use strict";O.exports=function(u){return u=Number(u),isNaN(u)||u===0?u:u>0?1:-1}}}),a8=xe({"node_modules/es5-ext/math/sign/index.js"(U,O){"use strict";O.exports=t8()()?Math.sign:r8()}}),n8=xe({"node_modules/es5-ext/number/to-integer.js"(U,O){"use strict";var u=a8(),v=Math.abs,w=Math.floor;O.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:u(S)*w(v(S)))}}}),i8=xe({"node_modules/es5-ext/number/to-pos-integer.js"(U,O){"use strict";var u=n8(),v=Math.max;O.exports=function(w){return v(0,u(w))}}}),o8=xe({"node_modules/es5-ext/array/from/shim.js"(U,O){"use strict";var u=Jd().iterator,v=rm(),w=e8(),S=i8(),l=Rp(),e=bd(),t=Kd(),a=am(),r=Array.isArray,n=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;O.exports=function(c){var p=arguments[1],f=arguments[2],d,y,o,b,M,A,E,g,T,m;if(c=Object(e(c)),t(p)&&l(p),!this||this===Array||!w(this)){if(!p){if(v(c))return M=c.length,M!==1?Array.apply(null,c):(b=new Array(1),b[0]=c[0],b);if(r(c)){for(b=new Array(M=c.length),y=0;y=55296&&A<=56319&&(m+=c[++y])),m=p?n.call(p,f,m,o):m,d?(i.value=m,s(b,o,i)):b[o]=m,++o;M=o}}if(M===void 0)for(M=S(c.length),d&&(b=new d(M)),y=0;y=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){a(this,"__redo__",l("c",[i]));return}this.__redo__.forEach(function(s,c){s>=i&&(this.__redo__[c]=++s)},this),this.__redo__.push(i)}}),_onDelete:l(function(i){var s;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(i),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,p){c>i&&(this.__redo__[p]=--c)},this)))}),_onClear:l(function(){this.__redo__&&u.call(this.__redo__),this.__nextIndex__=0})}))),a(n.prototype,t.iterator,l(function(){return this}))}}),d8=xe({"node_modules/es6-iterator/array.js"(U,O){"use strict";var u=W1(),v=_3(),w=xd(),S=Jd(),l=w3(),e=Object.defineProperty,t;t=O.exports=function(a,r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");l.call(this,a),r?v.call(r,"key+value")?r="key+value":v.call(r,"key")?r="key":r="value":r="value",e(this,"__kind__",w("",r))},u&&u(t,l),delete t.prototype.constructor,t.prototype=Object.create(l.prototype,{_resolve:w(function(a){return this.__kind__==="value"?this.__list__[a]:this.__kind__==="key+value"?[a,this.__list__[a]]:a})}),e(t.prototype,S.toStringTag,w("c","Array Iterator"))}}),v8=xe({"node_modules/es6-iterator/string.js"(U,O){"use strict";var u=W1(),v=xd(),w=Jd(),S=w3(),l=Object.defineProperty,e;e=O.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),S.call(this,t),l(this,"__length__",v("",t.length))},u&&u(e,S),delete e.prototype.constructor,e.prototype=Object.create(S.prototype,{_next:v(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?a+this.__list__[this.__nextIndex__++]:a)})}),l(e.prototype,w.toStringTag,v("c","String Iterator"))}}),p8=xe({"node_modules/es6-iterator/is-iterable.js"(U,O){"use strict";var u=rm(),v=Kd(),w=am(),S=Jd().iterator,l=Array.isArray;O.exports=function(e){return v(e)?l(e)||w(e)||u(e)?!0:typeof e[S]=="function":!1}}}),m8=xe({"node_modules/es6-iterator/valid-iterable.js"(U,O){"use strict";var u=p8();O.exports=function(v){if(!u(v))throw new TypeError(v+" is not iterable");return v}}}),T3=xe({"node_modules/es6-iterator/get.js"(U,O){"use strict";var u=rm(),v=am(),w=d8(),S=v8(),l=m8(),e=Jd().iterator;O.exports=function(t){return typeof l(t)[e]=="function"?t[e]():u(t)?new w(t):v(t)?new S(t):new w(t)}}}),g8=xe({"node_modules/es6-iterator/for-of.js"(U,O){"use strict";var u=rm(),v=Rp(),w=am(),S=T3(),l=Array.isArray,e=Function.prototype.call,t=Array.prototype.some;O.exports=function(a,r){var n,i=arguments[2],s,c,p,f,d,y,o;if(l(a)||u(a)?n="array":w(a)?n="string":a=S(a),v(r),c=function(){p=!0},n==="array"){t.call(a,function(b){return e.call(r,i,b,c),p});return}if(n==="string"){for(d=a.length,f=0;f=55296&&o<=56319&&(y+=a[++f])),e.call(r,i,y,c),!p);++f);return}for(s=a.next();!s.done;){if(e.call(r,i,s.value,c),p)return;s=a.next()}}}}),y8=xe({"node_modules/es6-weak-map/is-native-implemented.js"(U,O){"use strict";O.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),_8=xe({"node_modules/es6-weak-map/polyfill.js"(U,O){"use strict";var u=Kd(),v=W1(),w=kC(),S=bd(),l=CC(),e=xd(),t=T3(),a=g8(),r=Jd().toStringTag,n=y8(),i=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,p=Object.getPrototypeOf,f;O.exports=f=function(){var d=arguments[0],y;if(!(this instanceof f))throw new TypeError("Constructor requires 'new'");return y=n&&v&&WeakMap!==f?v(new WeakMap,p(this)):this,u(d)&&(i(d)||(d=t(d))),s(y,"__weakMapData__",e("c","$weakMap$"+l())),d&&a(d,function(o){S(o),y.set(o[0],o[1])}),y},n&&(v&&v(f,WeakMap),f.prototype=Object.create(WeakMap.prototype,{constructor:e(f)})),Object.defineProperties(f.prototype,{delete:e(function(d){return c.call(w(d),this.__weakMapData__)?(delete d[this.__weakMapData__],!0):!1}),get:e(function(d){if(c.call(w(d),this.__weakMapData__))return d[this.__weakMapData__]}),has:e(function(d){return c.call(w(d),this.__weakMapData__)}),set:e(function(d,y){return s(w(d),this.__weakMapData__,e("c",y)),this}),toString:e(function(){return"[object WeakMap]"})}),s(f.prototype,r,e("c","WeakMap"))}}),A3=xe({"node_modules/es6-weak-map/index.js"(U,O){"use strict";O.exports=MC()()?WeakMap:_8()}}),b8=xe({"node_modules/array-find-index/index.js"(U,O){"use strict";O.exports=function(u,v,w){if(typeof Array.prototype.findIndex=="function")return u.findIndex(v,w);if(typeof v!="function")throw new TypeError("predicate must be a function");var S=Object(u),l=S.length;if(l===0)return-1;for(var e=0;e{this.drawItem(w)});return this},s.prototype.drawItem=function(m,h){let{groups:p}=this,g=p[m];if(typeof h=="number"&&(m=h,g=p[h],h=null),!(g&&g.count&&g.opacity))return;g.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,g,h));let i=[];for(let w=1;w{let f=g[T];if(_===void 0)return f;_===null?_={positions:null}:typeof _=="function"?_={ondraw:_}:typeof _[0]=="number"&&(_={positions:_}),_=e(_,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),_.positions===null&&(_.positions=[]),_.tooManyColors!=null&&(this.tooManyColors=_.tooManyColors),f||(g[T]=f={id:T,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:w.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},_=Object.assign({},s.defaults,_)),_.positions&&!("marker"in _)&&(_.marker=f.marker,delete f.marker),_.marker&&!("positions"in _)&&(_.positions=f.positions,delete f.positions);let u=0,A=0;if(t(f,_,[{snap:!0,size:(b,z)=>(b==null&&(b=s.defaults.size),u+=b&&b.length?1:0,b),borderSize:(b,z)=>(b==null&&(b=s.defaults.borderSize),u+=b&&b.length?1:0,b),opacity:parseFloat,color:(b,z)=>(b==null&&(b=s.defaults.color),b=this.updateColor(b),A++,b),borderColor:(b,z)=>(b==null&&(b=s.defaults.borderColor),b=this.updateColor(b),A++,b),bounds:(b,z,I)=>("range"in I||(I.range=null),b),positions:(b,z,I)=>{let{snap:N}=z,{positionBuffer:R,positionFractBuffer:B,selectionBuffer:F}=z;if(b.x||b.y)return b.x.length?z.xAttr={buffer:w.buffer(b.x),offset:0,stride:4,count:b.x.length}:z.xAttr={buffer:b.x.buffer,offset:b.x.offset*4||0,stride:(b.x.stride||1)*4,count:b.x.count},b.y.length?z.yAttr={buffer:w.buffer(b.y),offset:0,stride:4,count:b.y.length}:z.yAttr={buffer:b.y.buffer,offset:b.y.offset*4||0,stride:(b.y.stride||1)*4,count:b.y.count},z.count=Math.max(z.xAttr.count,z.yAttr.count),b;b=a(b,"float64");let P=z.count=Math.floor(b.length/2),j=z.bounds=P?x(b,2):null;if(!I.range&&!z.range&&(delete z.range,I.range=j),!I.marker&&!z.marker&&(delete z.marker,I.marker=null),N&&(N===!0||P>N)?z.tree=k(b,{bounds:j}):N&&N.length&&(z.tree=N),z.tree){let Q={primitive:"points",usage:"static",data:z.tree,type:"uint32"};z.elements?z.elements(Q):z.elements=w.elements(Q)}var U=r.float32(b);R({data:U,usage:"dynamic"});var Z=r.fract32(b,U);return B({data:Z,usage:"dynamic"}),F({data:new Uint8Array(P),type:"uint8",usage:"stream"}),b}},{marker:(b,z,I)=>{let{activation:N}=z;if(N.forEach(R=>R&&R.destroy&&R.destroy()),N.length=0,!b||typeof b[0]=="number"){let R=this.addMarker(b);N[R]=!0}else{let R=[];for(let B=0,F=Math.min(b.length,z.count);B{let N=z.bounds;if(N)return b||(b=N),z.scale=[1/(b[2]-b[0]),1/(b[3]-b[1])],z.translate=[-b[0],-b[1]],z.scaleFract=r.fract(z.scale),z.translateFract=r.fract(z.translate),b},viewport:b=>n(b||[i.drawingBufferWidth,i.drawingBufferHeight])}]),u){let{count:b,size:z,borderSize:I,sizeBuffer:N}=f,R=new Uint8Array(b*2);if(z.length||I.length)for(let B=0;B=0)return i;let w;if(m instanceof Uint8Array||m instanceof Uint8ClampedArray)w=m;else{w=new Uint8Array(m.length);for(let M=0,C=m.length;Mg*4&&(this.tooManyColors=!0),this.updatePalette(p),i.length===1?i[0]:i},s.prototype.updatePalette=function(m){if(this.tooManyColors)return;let{maxColors:h,paletteTexture:p}=this,g=Math.ceil(m.length*.25/h);if(g>1){m=m.slice();for(let i=m.length*.25%h;i{m.sizeBuffer.destroy(),m.positionBuffer.destroy(),m.positionFractBuffer.destroy(),m.colorBuffer.destroy(),m.activation.forEach(h=>h&&h.destroy&&h.destroy()),m.selectionBuffer.destroy(),m.elements&&m.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(m=>m&&m.destroy&&m.destroy()),this};var c=function(m,h){var p=new o(m,h),g=p.render.bind(p);return Object.assign(g,{render:g,update:p.update.bind(p),draw:p.draw.bind(p),destroy:p.destroy.bind(p),regl:p.regl,gl:p.gl,canvas:p.gl.canvas,groups:p.groups,markers:p.markerCache,palette:p.palette}),g};V.exports=c}}),Lc=Ee({"node_modules/object-assign/index.js"(J,V){"use strict";var v=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function k(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function l(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},a=0;a<10;a++)t["_"+String.fromCharCode(a)]=a;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(o){n[o]=o}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}V.exports=l()?Object.assign:function(e,t){for(var a,r=k(e),n,o=1;o80*P){re=oe=B[0],ae=H=B[1];for(var Y=P;Yoe&&(oe=X),K>H&&(H=K);G=Math.max(oe-re,H-ae),G=G!==0?32767/G:0}return k(Z,Q,P,re,ae,G,0),Q}function x(B,F,P,j,U){var Z,Q;if(U===R(B,F,P,j)>0)for(Z=F;Z=F;Z-=j)Q=z(Z,B[Z],B[Z+1],Q);return Q&&M(Q,Q.next)&&(I(Q),Q=Q.next),Q}function E(B,F){if(!B)return B;F||(F=B);var P=B,j;do if(j=!1,!P.steiner&&(M(P,P.next)||S(P.prev,P,P.next)===0)){if(I(P),P=F=P.prev,P===P.next)break;j=!0}else P=P.next;while(j||P!==F);return F}function k(B,F,P,j,U,Z,Q){if(B){!Q&&Z&&m(B,j,U,Z);for(var re=B,ae,oe;B.prev!==B.next;){if(ae=B.prev,oe=B.next,Z?e(B,j,U,Z):l(B)){F.push(ae.i/P|0),F.push(B.i/P|0),F.push(oe.i/P|0),I(B),B=oe.next,re=oe.next;continue}if(B=oe,B===re){Q?Q===1?(B=t(E(B),F,P),k(B,F,P,j,U,Z,2)):Q===2&&a(B,F,P,j,U,Z):k(E(B),F,P,j,U,Z,1);break}}}}function l(B){var F=B.prev,P=B,j=B.next;if(S(F,P,j)>=0)return!1;for(var U=F.x,Z=P.x,Q=j.x,re=F.y,ae=P.y,oe=j.y,H=UZ?U>Q?U:Q:Z>Q?Z:Q,G=re>ae?re>oe?re:oe:ae>oe?ae:oe,Y=j.next;Y!==F;){if(Y.x>=H&&Y.x<=K&&Y.y>=X&&Y.y<=G&&i(U,re,Z,ae,Q,oe,Y.x,Y.y)&&S(Y.prev,Y,Y.next)>=0)return!1;Y=Y.next}return!0}function e(B,F,P,j){var U=B.prev,Z=B,Q=B.next;if(S(U,Z,Q)>=0)return!1;for(var re=U.x,ae=Z.x,oe=Q.x,H=U.y,X=Z.y,K=Q.y,G=reae?re>oe?re:oe:ae>oe?ae:oe,$=H>X?H>K?H:K:X>K?X:K,ee=p(G,Y,F,P,j),ne=p(q,$,F,P,j),fe=B.prevZ,ye=B.nextZ;fe&&fe.z>=ee&&ye&&ye.z<=ne;){if(fe.x>=G&&fe.x<=q&&fe.y>=Y&&fe.y<=$&&fe!==U&&fe!==Q&&i(re,H,ae,X,oe,K,fe.x,fe.y)&&S(fe.prev,fe,fe.next)>=0||(fe=fe.prevZ,ye.x>=G&&ye.x<=q&&ye.y>=Y&&ye.y<=$&&ye!==U&&ye!==Q&&i(re,H,ae,X,oe,K,ye.x,ye.y)&&S(ye.prev,ye,ye.next)>=0))return!1;ye=ye.nextZ}for(;fe&&fe.z>=ee;){if(fe.x>=G&&fe.x<=q&&fe.y>=Y&&fe.y<=$&&fe!==U&&fe!==Q&&i(re,H,ae,X,oe,K,fe.x,fe.y)&&S(fe.prev,fe,fe.next)>=0)return!1;fe=fe.prevZ}for(;ye&&ye.z<=ne;){if(ye.x>=G&&ye.x<=q&&ye.y>=Y&&ye.y<=$&&ye!==U&&ye!==Q&&i(re,H,ae,X,oe,K,ye.x,ye.y)&&S(ye.prev,ye,ye.next)>=0)return!1;ye=ye.nextZ}return!0}function t(B,F,P){var j=B;do{var U=j.prev,Z=j.next.next;!M(U,Z)&&C(U,j,j.next,Z)&&u(U,Z)&&u(Z,U)&&(F.push(U.i/P|0),F.push(j.i/P|0),F.push(Z.i/P|0),I(j),I(j.next),j=B=Z),j=j.next}while(j!==B);return E(j)}function a(B,F,P,j,U,Z){var Q=B;do{for(var re=Q.next.next;re!==Q.prev;){if(Q.i!==re.i&&w(Q,re)){var ae=b(Q,re);Q=E(Q,Q.next),ae=E(ae,ae.next),k(Q,F,P,j,U,Z,0),k(ae,F,P,j,U,Z,0);return}re=re.next}Q=Q.next}while(Q!==B)}function r(B,F,P,j){var U=[],Z,Q,re,ae,oe;for(Z=0,Q=F.length;Z=P.next.y&&P.next.y!==P.y){var re=P.x+(U-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(re<=j&&re>Z&&(Z=re,Q=P.x=P.x&&P.x>=oe&&j!==P.x&&i(UQ.x||P.x===Q.x&&c(Q,P)))&&(Q=P,X=K)),P=P.next;while(P!==ae);return Q}function c(B,F){return S(B.prev,B,F.prev)<0&&S(F.next,B,B.next)<0}function m(B,F,P,j){var U=B;do U.z===0&&(U.z=p(U.x,U.y,F,P,j)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==B);U.prevZ.nextZ=null,U.prevZ=null,h(U)}function h(B){var F,P,j,U,Z,Q,re,ae,oe=1;do{for(P=B,B=null,Z=null,Q=0;P;){for(Q++,j=P,re=0,F=0;F0||ae>0&&j;)re!==0&&(ae===0||!j||P.z<=j.z)?(U=P,P=P.nextZ,re--):(U=j,j=j.nextZ,ae--),Z?Z.nextZ=U:B=U,U.prevZ=Z,Z=U;P=j}Z.nextZ=null,oe*=2}while(Q>1);return B}function p(B,F,P,j,U){return B=(B-P)*U|0,F=(F-j)*U|0,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,B|F<<1}function g(B){var F=B,P=B;do(F.x=(B-Q)*(Z-re)&&(B-Q)*(j-re)>=(P-Q)*(F-re)&&(P-Q)*(Z-re)>=(U-Q)*(j-re)}function w(B,F){return B.next.i!==F.i&&B.prev.i!==F.i&&!f(B,F)&&(u(B,F)&&u(F,B)&&A(B,F)&&(S(B.prev,B,F.prev)||S(B,F.prev,F))||M(B,F)&&S(B.prev,B,B.next)>0&&S(F.prev,F,F.next)>0)}function S(B,F,P){return(F.y-B.y)*(P.x-F.x)-(F.x-B.x)*(P.y-F.y)}function M(B,F){return B.x===F.x&&B.y===F.y}function C(B,F,P,j){var U=T(S(B,F,P)),Z=T(S(B,F,j)),Q=T(S(P,j,B)),re=T(S(P,j,F));return!!(U!==Z&&Q!==re||U===0&&_(B,P,F)||Z===0&&_(B,j,F)||Q===0&&_(P,B,j)||re===0&&_(P,F,j))}function _(B,F,P){return F.x<=Math.max(B.x,P.x)&&F.x>=Math.min(B.x,P.x)&&F.y<=Math.max(B.y,P.y)&&F.y>=Math.min(B.y,P.y)}function T(B){return B>0?1:B<0?-1:0}function f(B,F){var P=B;do{if(P.i!==B.i&&P.next.i!==B.i&&P.i!==F.i&&P.next.i!==F.i&&C(P,P.next,B,F))return!0;P=P.next}while(P!==B);return!1}function u(B,F){return S(B.prev,B,B.next)<0?S(B,F,B.next)>=0&&S(B,B.prev,F)>=0:S(B,F,B.prev)<0||S(B,B.next,F)<0}function A(B,F){var P=B,j=!1,U=(B.x+F.x)/2,Z=(B.y+F.y)/2;do P.y>Z!=P.next.y>Z&&P.next.y!==P.y&&U<(P.next.x-P.x)*(Z-P.y)/(P.next.y-P.y)+P.x&&(j=!j),P=P.next;while(P!==B);return j}function b(B,F){var P=new N(B.i,B.x,B.y),j=new N(F.i,F.x,F.y),U=B.next,Z=F.prev;return B.next=F,F.prev=B,P.next=U,U.prev=P,j.next=P,P.prev=j,Z.next=j,j.prev=Z,j}function z(B,F,P,j){var U=new N(B,F,P);return j?(U.next=j.next,U.prev=j,j.next.prev=U,j.next=U):(U.prev=U,U.next=U),U}function I(B){B.next.prev=B.prev,B.prev.next=B.next,B.prevZ&&(B.prevZ.nextZ=B.nextZ),B.nextZ&&(B.nextZ.prevZ=B.prevZ)}function N(B,F,P){this.i=B,this.x=F,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}v.deviation=function(B,F,P,j){var U=F&&F.length,Z=U?F[0]*P:B.length,Q=Math.abs(R(B,0,Z,P));if(U)for(var re=0,ae=F.length;re0&&(j+=B[U-1].length,P.holes.push(j))}return P}}}),k7=Ee({"node_modules/array-normalize/index.js"(J,V){"use strict";var v=Jv();V.exports=x;function x(E,k,l){if(!E||E.length==null)throw Error("Argument should be an array");k==null&&(k=1),l==null&&(l=v(E,k));for(var e=0;e-1}}}),zw=Ee({"node_modules/es5-ext/string/#/contains/index.js"(J,V){"use strict";V.exports=U7()()?String.prototype.contains:q7()}}),Ed=Ee({"node_modules/d/index.js"(J,V){"use strict";var v=tp(),x=Rw(),E=qy(),k=Fw(),l=zw(),e=V.exports=function(t,a){var r,n,o,s,c;return arguments.length<2||typeof t!="string"?(s=a,a=t,t=null):s=arguments[2],v(t)?(r=l.call(t,"c"),n=l.call(t,"e"),o=l.call(t,"w")):(r=o=!0,n=!1),c={value:a,configurable:r,enumerable:n,writable:o},s?E(k(s),c):c};e.gs=function(t,a,r){var n,o,s,c;return typeof t!="string"?(s=r,r=a,a=t,t=null):s=arguments[3],v(a)?x(a)?v(r)?x(r)||(s=r,r=void 0):r=void 0:(s=a,a=r=void 0):a=void 0,v(t)?(n=l.call(t,"c"),o=l.call(t,"e")):(n=!0,o=!1),c={get:a,set:r,configurable:n,enumerable:o},s?E(k(s),c):c}}}),Bm=Ee({"node_modules/es5-ext/function/is-arguments.js"(J,V){"use strict";var v=Object.prototype.toString,x=v.call(function(){return arguments}());V.exports=function(E){return v.call(E)===x}}}),Nm=Ee({"node_modules/es5-ext/string/is-string.js"(J,V){"use strict";var v=Object.prototype.toString,x=v.call("");V.exports=function(E){return typeof E=="string"||E&&typeof E=="object"&&(E instanceof String||v.call(E)===x)||!1}}}),V7=Ee({"node_modules/ext/global-this/is-implemented.js"(J,V){"use strict";V.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),H7=Ee({"node_modules/ext/global-this/implementation.js"(J,V){var v=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};V.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return v()}try{return __global__||v()}finally{delete Object.prototype.__global__}}()}}),Om=Ee({"node_modules/ext/global-this/index.js"(J,V){"use strict";V.exports=V7()()?globalThis:H7()}}),G7=Ee({"node_modules/es6-symbol/is-implemented.js"(J,V){"use strict";var v=Om(),x={object:!0,symbol:!0};V.exports=function(){var E=v.Symbol,k;if(typeof E!="function")return!1;k=E("test symbol");try{String(k)}catch{return!1}return!(!x[typeof E.iterator]||!x[typeof E.toPrimitive]||!x[typeof E.toStringTag])}}}),W7=Ee({"node_modules/es6-symbol/is-symbol.js"(J,V){"use strict";V.exports=function(v){return v?typeof v=="symbol"?!0:!v.constructor||v.constructor.name!=="Symbol"?!1:v[v.constructor.toStringTag]==="Symbol":!1}}}),Bw=Ee({"node_modules/es6-symbol/validate-symbol.js"(J,V){"use strict";var v=W7();V.exports=function(x){if(!v(x))throw new TypeError(x+" is not a symbol");return x}}}),Y7=Ee({"node_modules/es6-symbol/lib/private/generate-name.js"(J,V){"use strict";var v=Ed(),x=Object.create,E=Object.defineProperty,k=Object.prototype,l=x(null);V.exports=function(e){for(var t=0,a,r;l[e+(t||"")];)++t;return e+=t||"",l[e]=!0,a="@@"+e,E(k,a,v.gs(null,function(n){r||(r=!0,E(this,a,v(n)),r=!1)})),a}}}),X7=Ee({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(J,V){"use strict";var v=Ed(),x=Om().Symbol;V.exports=function(E){return Object.defineProperties(E,{hasInstance:v("",x&&x.hasInstance||E("hasInstance")),isConcatSpreadable:v("",x&&x.isConcatSpreadable||E("isConcatSpreadable")),iterator:v("",x&&x.iterator||E("iterator")),match:v("",x&&x.match||E("match")),replace:v("",x&&x.replace||E("replace")),search:v("",x&&x.search||E("search")),species:v("",x&&x.species||E("species")),split:v("",x&&x.split||E("split")),toPrimitive:v("",x&&x.toPrimitive||E("toPrimitive")),toStringTag:v("",x&&x.toStringTag||E("toStringTag")),unscopables:v("",x&&x.unscopables||E("unscopables"))})}}}),$7=Ee({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(J,V){"use strict";var v=Ed(),x=Bw(),E=Object.create(null);V.exports=function(k){return Object.defineProperties(k,{for:v(function(l){return E[l]?E[l]:E[l]=k(String(l))}),keyFor:v(function(l){var e;x(l);for(e in E)if(E[e]===l)return e})})}}}),Z7=Ee({"node_modules/es6-symbol/polyfill.js"(J,V){"use strict";var v=Ed(),x=Bw(),E=Om().Symbol,k=Y7(),l=X7(),e=$7(),t=Object.create,a=Object.defineProperties,r=Object.defineProperty,n,o,s;if(typeof E=="function")try{String(E()),s=!0}catch{}else E=null;o=function(m){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return n(m)},V.exports=n=function c(m){var h;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?E(m):(h=t(o.prototype),m=m===void 0?"":String(m),a(h,{__description__:v("",m),__name__:v("",k(m))}))},l(n),e(n),a(o.prototype,{constructor:v(n),toString:v("",function(){return this.__name__})}),a(n.prototype,{toString:v(function(){return"Symbol ("+x(this).__description__+")"}),valueOf:v(function(){return x(this)})}),r(n.prototype,n.toPrimitive,v("",function(){var c=x(this);return typeof c=="symbol"?c:c.toString()})),r(n.prototype,n.toStringTag,v("c","Symbol")),r(o.prototype,n.toStringTag,v("c",n.prototype[n.toStringTag])),r(o.prototype,n.toPrimitive,v("c",n.prototype[n.toPrimitive]))}}),uv=Ee({"node_modules/es6-symbol/index.js"(J,V){"use strict";V.exports=G7()()?Om().Symbol:Z7()}}),K7=Ee({"node_modules/es5-ext/array/#/clear.js"(J,V){"use strict";var v=Sd();V.exports=function(){return v(this).length=0,this}}}),c0=Ee({"node_modules/es5-ext/object/valid-callable.js"(J,V){"use strict";V.exports=function(v){if(typeof v!="function")throw new TypeError(v+" is not a function");return v}}}),J7=Ee({"node_modules/type/string/coerce.js"(J,V){"use strict";var v=tp(),x=Iw(),E=Object.prototype.toString;V.exports=function(k){if(!v(k))return null;if(x(k)){var l=k.toString;if(typeof l!="function"||l===E)return null}try{return""+k}catch{return null}}}}),Q7=Ee({"node_modules/type/lib/safe-to-string.js"(J,V){"use strict";V.exports=function(v){try{return v.toString()}catch{try{return String(v)}catch{return null}}}}}),e9=Ee({"node_modules/type/lib/to-short-string.js"(J,V){"use strict";var v=Q7(),x=/[\n\r\u2028\u2029]/g;V.exports=function(E){var k=v(E);return k===null?"":(k.length>100&&(k=k.slice(0,99)+"\u2026"),k=k.replace(x,function(l){switch(l){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),k)}}}),t9=Ee({"node_modules/type/lib/resolve-error-message.js"(J,V){"use strict";var v=J7(),x=e9();V.exports=function(E,k,l){l&&l.errorMessage&&(E=v(l.errorMessage));var e=E.indexOf("%v"),t=e>-1?x(k):null;if(l&&l.name){var a=E.indexOf("%n");if(a>-1){if(e>-1){var r,n,o,s;return a>e?(r=t,o=e,n=l.name,s=a):(r=l.name,o=a,n=t,s=e),E.slice(0,o)+r+E.slice(o+2,s)+n+E.slice(s+2)}return E.slice(0,a)+l.name+E.slice(a+2)}}return e>-1?E.slice(0,e)+t+E.slice(e+2):E}}}),Nw=Ee({"node_modules/type/lib/resolve-exception.js"(J,V){"use strict";var v=tp(),x=t9();V.exports=function(E,k,l){if(l&&!v(E)){if("default"in l)return l.default;if(l.isOptional)return null}var e=l&&l.Error||TypeError,t=new e(x(k,E,l));throw l&&l.errorCode&&(t.code=l.errorCode),t}}}),r9=Ee({"node_modules/type/value/ensure.js"(J,V){"use strict";var v=Nw(),x=tp();V.exports=function(E){if(x(E))return E;var k=arguments[1],l=k&&k.name?"Expected a value for %n, received %v":"Cannot use %v";return v(E,l,k)}}}),n9=Ee({"node_modules/type/plain-function/ensure.js"(J,V){"use strict";var v=Nw(),x=Rw();V.exports=function(E){if(x(E))return E;var k=arguments[1],l=k&&k.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return v(E,l,k)}}}),a9=Ee({"node_modules/es5-ext/array/from/is-implemented.js"(J,V){"use strict";V.exports=function(){var v=Array.from,x,E;return typeof v!="function"?!1:(x=["raz","dwa"],E=v(x),!!(E&&E!==x&&E[1]==="dwa"))}}}),i9=Ee({"node_modules/es5-ext/function/is-function.js"(J,V){"use strict";var v=Object.prototype.toString,x=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);V.exports=function(E){return typeof E=="function"&&x(v.call(E))}}}),o9=Ee({"node_modules/es5-ext/math/sign/is-implemented.js"(J,V){"use strict";V.exports=function(){var v=Math.sign;return typeof v!="function"?!1:v(10)===1&&v(-20)===-1}}}),s9=Ee({"node_modules/es5-ext/math/sign/shim.js"(J,V){"use strict";V.exports=function(v){return v=Number(v),isNaN(v)||v===0?v:v>0?1:-1}}}),l9=Ee({"node_modules/es5-ext/math/sign/index.js"(J,V){"use strict";V.exports=o9()()?Math.sign:s9()}}),u9=Ee({"node_modules/es5-ext/number/to-integer.js"(J,V){"use strict";var v=l9(),x=Math.abs,E=Math.floor;V.exports=function(k){return isNaN(k)?0:(k=Number(k),k===0||!isFinite(k)?k:v(k)*E(x(k)))}}}),c9=Ee({"node_modules/es5-ext/number/to-pos-integer.js"(J,V){"use strict";var v=u9(),x=Math.max;V.exports=function(E){return x(0,v(E))}}}),f9=Ee({"node_modules/es5-ext/array/from/shim.js"(J,V){"use strict";var v=uv().iterator,x=Bm(),E=i9(),k=c9(),l=c0(),e=Sd(),t=lv(),a=Nm(),r=Array.isArray,n=Function.prototype.call,o={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;V.exports=function(c){var m=arguments[1],h=arguments[2],p,g,i,w,S,M,C,_,T,f;if(c=Object(e(c)),t(m)&&l(m),!this||this===Array||!E(this)){if(!m){if(x(c))return S=c.length,S!==1?Array.apply(null,c):(w=new Array(1),w[0]=c[0],w);if(r(c)){for(w=new Array(S=c.length),g=0;g=55296&&M<=56319&&(f+=c[++g])),f=m?n.call(m,h,f,i):f,p?(o.value=f,s(w,i,o)):w[i]=f,++i;S=i}}if(S===void 0)for(S=k(c.length),p&&(w=new p(S)),g=0;g=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){a(this,"__redo__",l("c",[o]));return}this.__redo__.forEach(function(s,c){s>=o&&(this.__redo__[c]=++s)},this),this.__redo__.push(o)}}),_onDelete:l(function(o){var s;o>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(o),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,m){c>o&&(this.__redo__[m]=--c)},this)))}),_onClear:l(function(){this.__redo__&&v.call(this.__redo__),this.__nextIndex__=0})}))),a(n.prototype,t.iterator,l(function(){return this}))}}),y9=Ee({"node_modules/es6-iterator/array.js"(J,V){"use strict";var v=Uy(),x=zw(),E=Ed(),k=uv(),l=Ow(),e=Object.defineProperty,t;t=V.exports=function(a,r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");l.call(this,a),r?x.call(r,"key+value")?r="key+value":x.call(r,"key")?r="key":r="value":r="value",e(this,"__kind__",E("",r))},v&&v(t,l),delete t.prototype.constructor,t.prototype=Object.create(l.prototype,{_resolve:E(function(a){return this.__kind__==="value"?this.__list__[a]:this.__kind__==="key+value"?[a,this.__list__[a]]:a})}),e(t.prototype,k.toStringTag,E("c","Array Iterator"))}}),_9=Ee({"node_modules/es6-iterator/string.js"(J,V){"use strict";var v=Uy(),x=Ed(),E=uv(),k=Ow(),l=Object.defineProperty,e;e=V.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),k.call(this,t),l(this,"__length__",x("",t.length))},v&&v(e,k),delete e.prototype.constructor,e.prototype=Object.create(k.prototype,{_next:x(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?a+this.__list__[this.__nextIndex__++]:a)})}),l(e.prototype,E.toStringTag,x("c","String Iterator"))}}),b9=Ee({"node_modules/es6-iterator/is-iterable.js"(J,V){"use strict";var v=Bm(),x=lv(),E=Nm(),k=uv().iterator,l=Array.isArray;V.exports=function(e){return x(e)?l(e)||E(e)||v(e)?!0:typeof e[k]=="function":!1}}}),x9=Ee({"node_modules/es6-iterator/valid-iterable.js"(J,V){"use strict";var v=b9();V.exports=function(x){if(!v(x))throw new TypeError(x+" is not iterable");return x}}}),jw=Ee({"node_modules/es6-iterator/get.js"(J,V){"use strict";var v=Bm(),x=Nm(),E=y9(),k=_9(),l=x9(),e=uv().iterator;V.exports=function(t){return typeof l(t)[e]=="function"?t[e]():v(t)?new E(t):x(t)?new k(t):new E(t)}}}),w9=Ee({"node_modules/es6-iterator/for-of.js"(J,V){"use strict";var v=Bm(),x=c0(),E=Nm(),k=jw(),l=Array.isArray,e=Function.prototype.call,t=Array.prototype.some;V.exports=function(a,r){var n,o=arguments[2],s,c,m,h,p,g,i;if(l(a)||v(a)?n="array":E(a)?n="string":a=k(a),x(r),c=function(){m=!0},n==="array"){t.call(a,function(w){return e.call(r,o,w,c),m});return}if(n==="string"){for(p=a.length,h=0;h=55296&&i<=56319&&(g+=a[++h])),e.call(r,o,g,c),!m);++h);return}for(s=a.next();!s.done;){if(e.call(r,o,s.value,c),m)return;s=a.next()}}}}),T9=Ee({"node_modules/es6-weak-map/is-native-implemented.js"(J,V){"use strict";V.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),A9=Ee({"node_modules/es6-weak-map/polyfill.js"(J,V){"use strict";var v=lv(),x=Uy(),E=D7(),k=Sd(),l=I7(),e=Ed(),t=jw(),a=w9(),r=uv().toStringTag,n=T9(),o=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf,h;V.exports=h=function(){var p=arguments[0],g;if(!(this instanceof h))throw new TypeError("Constructor requires 'new'");return g=n&&x&&WeakMap!==h?x(new WeakMap,m(this)):this,v(p)&&(o(p)||(p=t(p))),s(g,"__weakMapData__",e("c","$weakMap$"+l())),p&&a(p,function(i){k(i),g.set(i[0],i[1])}),g},n&&(x&&x(h,WeakMap),h.prototype=Object.create(WeakMap.prototype,{constructor:e(h)})),Object.defineProperties(h.prototype,{delete:e(function(p){return c.call(E(p),this.__weakMapData__)?(delete p[this.__weakMapData__],!0):!1}),get:e(function(p){if(c.call(E(p),this.__weakMapData__))return p[this.__weakMapData__]}),has:e(function(p){return c.call(E(p),this.__weakMapData__)}),set:e(function(p,g){return s(E(p),this.__weakMapData__,e("c",g)),this}),toString:e(function(){return"[object WeakMap]"})}),s(h.prototype,r,e("c","WeakMap"))}}),Uw=Ee({"node_modules/es6-weak-map/index.js"(J,V){"use strict";V.exports=C7()()?WeakMap:A9()}}),M9=Ee({"node_modules/array-find-index/index.js"(J,V){"use strict";V.exports=function(v,x,E){if(typeof Array.prototype.findIndex=="function")return v.findIndex(x,E);if(typeof x!="function")throw new TypeError("predicate must be a function");var k=Object(v),l=k.length;if(l===0)return-1;for(var e=0;ex.join==="round"?2:1,miterLimit:M.prop("miterLimit"),scale:M.prop("scale"),scaleFract:M.prop("scaleFract"),translateFract:M.prop("translateFract"),translate:M.prop("translate"),thickness:M.prop("thickness"),dashTexture:M.prop("dashTexture"),opacity:M.prop("opacity"),pixelRatio:M.context("pixelRatio"),id:M.prop("id"),dashLength:M.prop("dashLength"),viewport:(h,x)=>[x.viewport.x,x.viewport.y,h.viewportWidth,h.viewportHeight],depth:M.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(h,x)=>!x.overlay},stencil:{enable:!1},scissor:{enable:!0,box:M.prop("viewport")},viewport:M.prop("viewport")},g=M(w({vert:c,frag:p,attributes:{lineEnd:{buffer:A,divisor:0,stride:8,offset:0},lineTop:{buffer:A,divisor:0,stride:8,offset:4},aCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:M.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:M.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:M.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},E)),T;try{T=M(w({cull:{enable:!0,face:"back"},vert:y,frag:o,attributes:{lineEnd:{buffer:A,divisor:0,stride:8,offset:0},lineTop:{buffer:A,divisor:0,stride:8,offset:4},aColor:{buffer:M.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:M.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},E))}catch{T=g}return{fill:M({primitive:"triangle",elements:(h,x)=>x.triangles,offset:0,vert:f,frag:d,uniforms:{scale:M.prop("scale"),color:M.prop("fill"),scaleFract:M.prop("scaleFract"),translateFract:M.prop("translateFract"),translate:M.prop("translate"),opacity:M.prop("opacity"),pixelRatio:M.context("pixelRatio"),id:M.prop("id"),viewport:(h,x)=>[x.viewport.x,x.viewport.y,h.viewportWidth,h.viewportHeight]},attributes:{position:{buffer:M.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:M.prop("positionFractBuffer"),stride:8,offset:8}},blend:E.blend,depth:{enable:!1},scissor:E.scissor,stencil:E.stencil,viewport:E.viewport}),rect:g,miter:T}},b.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},b.prototype.render=function(...M){M.length&&this.update(...M),this.draw()},b.prototype.draw=function(...M){return(M.length?M:this.passes).forEach((A,E)=>{if(A&&Array.isArray(A))return this.draw(...A);typeof A=="number"&&(A=this.passes[A]),A&&A.count>1&&A.opacity&&(this.regl._refresh(),A.fill&&A.triangles&&A.triangles.length>2&&this.shaders.fill(A),A.thickness&&(A.scale[0]*A.viewport.width>b.precisionThreshold||A.scale[1]*A.viewport.height>b.precisionThreshold?this.shaders.rect(A):A.join==="rect"||!A.join&&(A.thickness<=2||A.count>=b.maxPoints)?this.shaders.rect(A):this.shaders.miter(A)))}),this},b.prototype.update=function(M){if(!M)return;M.length!=null?typeof M[0]=="number"&&(M=[{positions:M}]):Array.isArray(M)||(M=[M]);let{regl:A,gl:E}=this;if(M.forEach((T,m)=>{let h=this.passes[m];if(T!==void 0){if(T===null){this.passes[m]=null;return}if(typeof T[0]=="number"&&(T={positions:T}),T=S(T,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),h||(this.passes[m]=h={id:m,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:A.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:A.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:A.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:A.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},T=w({},b.defaults,T)),T.thickness!=null&&(h.thickness=parseFloat(T.thickness)),T.opacity!=null&&(h.opacity=parseFloat(T.opacity)),T.miterLimit!=null&&(h.miterLimit=parseFloat(T.miterLimit)),T.overlay!=null&&(h.overlay=!!T.overlay,mte-ae),q=[],Y=0,ee=h.hole!=null?h.hole[0]:null;if(ee!=null){let te=s(N,ae=>ae>=ee);N=N.slice(0,te),N.push(ee)}for(let te=0;teK-ee+(N[te]-Y)),G=e(ae,j);G=G.map(K=>K+Y+(K+Y{M.colorBuffer.destroy(),M.positionBuffer.destroy(),M.dashTexture.destroy()}),this.passes.length=0,this}}}),x8=xe({"node_modules/regl-error2d/index.js"(U,O){"use strict";var u=Nv(),v=Xd(),w=h3(),S=Yh(),l=cc(),e=Ov(),{float32:t,fract32:a}=G1();O.exports=n;var r=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function n(i,s){if(typeof i=="function"?(s||(s={}),s.regl=i):s=i,s.length&&(s.positions=s),i=s.regl,!i.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=i._gl,p,f,d,y,o,b,M={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},A=[];return y=i.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),d=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),o=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),b=i.buffer({usage:"static",type:"float",data:r}),m(s),p=i({vert:` +`;V.exports=w;function w(S,M){if(!(this instanceof w))return new w(S,M);if(typeof S=="function"?(M||(M={}),M.regl=S):M=S,M.length&&(M.positions=M),S=M.regl,!S.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=S._gl,this.regl=S,this.passes=[],this.shaders=w.shaders.has(S)?w.shaders.get(S):w.shaders.set(S,w.createShaders(S)).get(S),this.update(M)}w.dashMult=2,w.maxPatternLength=256,w.precisionThreshold=3e6,w.maxPoints=1e4,w.maxLines=2048,w.shaders=new n,w.createShaders=function(S){let M=S.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),C={primitive:"triangle strip",instances:S.prop("count"),count:4,offset:0,uniforms:{miterMode:(u,A)=>A.join==="round"?2:1,miterLimit:S.prop("miterLimit"),scale:S.prop("scale"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),thickness:S.prop("thickness"),dashTexture:S.prop("dashTexture"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),dashLength:S.prop("dashLength"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight],depth:S.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(u,A)=>!A.overlay},stencil:{enable:!1},scissor:{enable:!0,box:S.prop("viewport")},viewport:S.prop("viewport")},_=S(E({vert:c,frag:m,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},C)),T;try{T=S(E({cull:{enable:!0,face:"back"},vert:g,frag:i,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:S.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},C))}catch{T=_}return{fill:S({primitive:"triangle",elements:(u,A)=>A.triangles,offset:0,vert:h,frag:p,uniforms:{scale:S.prop("scale"),color:S.prop("fill"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:S.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8}},blend:C.blend,depth:{enable:!1},scissor:C.scissor,stencil:C.stencil,viewport:C.viewport}),rect:_,miter:T}},w.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},w.prototype.render=function(...S){S.length&&this.update(...S),this.draw()},w.prototype.draw=function(...S){return(S.length?S:this.passes).forEach((M,C)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>w.precisionThreshold||M.scale[1]*M.viewport.height>w.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=w.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},w.prototype.update=function(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let{regl:M,gl:C}=this;if(S.forEach((T,f)=>{let u=this.passes[f];if(T!==void 0){if(T===null){this.passes[f]=null;return}if(typeof T[0]=="number"&&(T={positions:T}),T=k(T,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),u||(this.passes[f]=u={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},T=E({},w.defaults,T)),T.thickness!=null&&(u.thickness=parseFloat(T.thickness)),T.opacity!=null&&(u.opacity=parseFloat(T.opacity)),T.miterLimit!=null&&(u.miterLimit=parseFloat(T.miterLimit)),T.overlay!=null&&(u.overlay=!!T.overlay,fae-oe),Z=[],Q=0,re=u.hole!=null?u.hole[0]:null;if(re!=null){let ae=s(U,oe=>oe>=re);U=U.slice(0,ae),U.push(re)}for(let ae=0;aeK-re+(U[ae]-Q)),X=e(oe,H);X=X.map(K=>K+Q+(K+Q{S.colorBuffer.destroy(),S.positionBuffer.destroy(),S.dashTexture.destroy()}),this.passes.length=0,this}}}),S9=Ee({"node_modules/regl-error2d/index.js"(J,V){"use strict";var v=Jv(),x=zm(),E=kw(),k=Jh(),l=Lc(),e=Qv(),{float32:t,fract32:a}=jy();V.exports=n;var r=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function n(o,s){if(typeof o=="function"?(s||(s={}),s.regl=o):s=o,s.length&&(s.positions=s),o=s.regl,!o.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=o._gl,m,h,p,g,i,w,S={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return g=o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),h=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),w=o.buffer({usage:"static",type:"float",data:r}),f(s),m=o({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2614,10 +2615,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:i.prop("range"),lineWidth:i.prop("lineWidth"),capSize:i.prop("capSize"),opacity:i.prop("opacity"),scale:i.prop("scale"),translate:i.prop("translate"),scaleFract:i.prop("scaleFract"),translateFract:i.prop("translateFract"),viewport:(x,_)=>[_.viewport.x,_.viewport.y,x.viewportWidth,x.viewportHeight]},attributes:{color:{buffer:y,offset:(x,_)=>_.offset*4,divisor:1},position:{buffer:f,offset:(x,_)=>_.offset*8,divisor:1},positionFract:{buffer:d,offset:(x,_)=>_.offset*8,divisor:1},error:{buffer:o,offset:(x,_)=>_.offset*16,divisor:1},direction:{buffer:b,stride:24,offset:0},lineOffset:{buffer:b,stride:24,offset:8},capOffset:{buffer:b,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:i.prop("viewport")},viewport:i.prop("viewport"),stencil:!1,instances:i.prop("count"),count:r.length}),l(E,{update:m,draw:g,destroy:h,regl:i,gl:c,canvas:c.canvas,groups:A}),E;function E(x){x?m(x):x===null&&h(),g()}function g(x){if(typeof x=="number")return T(x);x&&!Array.isArray(x)&&(x=[x]),i._refresh(),A.forEach((_,D)=>{if(_){if(x&&(x[D]?_.draw=!0:_.draw=!1),!_.draw){_.draw=!0;return}T(D)}})}function T(x){typeof x=="number"&&(x=A[x]),x!=null&&x&&x.count&&x.color&&x.opacity&&x.positions&&x.positions.length>1&&(x.scaleRatio=[x.scale[0]*x.viewport.width,x.scale[1]*x.viewport.height],p(x),x.after&&x.after(x))}function m(x){if(!x)return;x.length!=null?typeof x[0]=="number"&&(x=[{positions:x}]):Array.isArray(x)||(x=[x]);let _=0,D=0;if(E.groups=A=x.map((I,z)=>{let R=A[z];if(I)typeof I=="function"?I={after:I}:typeof I[0]=="number"&&(I={positions:I});else return R;return I=S(I,{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"}),R||(A[z]=R={id:z,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},I=l({},M,I)),w(R,I,[{lineWidth:k=>+k*.5,capSize:k=>+k*.5,opacity:parseFloat,errors:k=>(k=e(k),D+=k.length,k),positions:(k,B)=>(k=e(k,"float64"),B.count=Math.floor(k.length/2),B.bounds=u(k,2),B.offset=_,_+=B.count,k)},{color:(k,B)=>{let N=B.count;if(k||(k="transparent"),!Array.isArray(k)||typeof k[0]=="number"){let Y=k;k=Array(N);for(let ee=0;ee{let q=B.bounds;return k||(k=q),B.scale=[1/(k[2]-k[0]),1/(k[3]-k[1])],B.translate=[-k[0],-k[1]],B.scaleFract=a(B.scale),B.translateFract=a(B.translate),k},viewport:k=>{let B;return Array.isArray(k)?B={x:k[0],y:k[1],width:k[2]-k[0],height:k[3]-k[1]}:k?(B={x:k.x||k.left||0,y:k.y||k.top||0},k.right?B.width=k.right-B.x:B.width=k.w||k.width||0,k.bottom?B.height=k.bottom-B.y:B.height=k.h||k.height||0):B={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},B}}]),R}),_||D){let I=A.reduce((B,N,q)=>B+(N?N.count:0),0),z=new Float64Array(I*2),R=new Uint8Array(I*4),k=new Float32Array(I*4);A.forEach((B,N)=>{if(!B)return;let{positions:q,count:Y,offset:ee,color:te,errors:ae}=B;Y&&(R.set(te,ee*4),k.set(ae,ee*4),z.set(q,ee*2))});var C=t(z);f(C);var F=a(z,C);d(F),y(R),o(k)}}function h(){f.destroy(),d.destroy(),y.destroy(),o.destroy(),b.destroy()}}}}),w8=xe({"node_modules/unquote/index.js"(U,O){var u=/[\'\"]/;O.exports=function(w){return w?(u.test(w.charAt(0))&&(w=w.substr(1)),u.test(w.charAt(w.length-1))&&(w=w.substr(0,w.length-1)),w):""}}}),S3=xe({"node_modules/css-global-keywords/index.json"(U,O){O.exports=["inherit","initial","unset"]}}),E3=xe({"node_modules/css-system-font-keywords/index.json"(U,O){O.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),k3=xe({"node_modules/css-font-weight-keywords/index.json"(U,O){O.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),C3=xe({"node_modules/css-font-style-keywords/index.json"(U,O){O.exports=["normal","italic","oblique"]}}),L3=xe({"node_modules/css-font-stretch-keywords/index.json"(U,O){O.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),T8=xe({"node_modules/parenthesis/index.js"(U,O){"use strict";function u(S,l){if(typeof S!="string")return[S];var e=[S];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],a=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),p=[];function f(d,y,o){var b=e.push(d.slice(s[0].length,-s[1].length))-1;return p.push(b),a+b+a}e.forEach(function(d,y){for(var o,b=0;d!=o;)if(o=d,d=d.replace(c,f),b++>1e4)throw Error("References have circular dependency. Please, check them.");e[y]=d}),p=p.reverse(),e=e.map(function(d){return p.forEach(function(y){d=d.replace(new RegExp("(\\"+a+y+"\\"+a+")","g"),s[0]+"$1"+s[1])}),d})});var n=new RegExp("\\"+a+"([0-9]+)\\"+a);function i(s,c,p){for(var f=[],d,y=0;d=n.exec(s);){if(y++>1e4)throw Error("Circular references in parenthesis");f.push(s.slice(0,d.index)),f.push(i(c[d[1]],c)),s=s.slice(d.index+d[0].length)}return f.push(s),f}return r?e:i(e[0],e)}function v(S,l){if(l&&l.flat){var e=l&&l.escape||"___",t=S[0],a;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),n=0;t!=a;){if(n++>1e4)throw Error("Circular references in "+S);a=t,t=t.replace(r,i)}return t}return S.reduce(function s(c,p){return Array.isArray(p)&&(p=p.reduce(s,"")),c+p},"");function i(s,c){if(S[c]==null)throw Error("Reference "+c+"is undefined");return S[c]}}function w(S,l){return Array.isArray(S)?v(S,l):u(S,l)}w.parse=u,w.stringify=v,O.exports=w}}),A8=xe({"node_modules/string-split-by/index.js"(U,O){"use strict";var u=T8();O.exports=function(w,S,l){if(w==null)throw Error("First argument should be a string");if(S==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=u.parse(w,{flat:!0,brackets:l.ignore}),t=e[0],a=t.split(S);if(l.escape){for(var r=[],n=0;n1&&Pt===Ft&&(Pt==='"'||Pt==="'"))return['"'+t(Ve.substr(1,Ve.length-2))+'"'];var Er=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Ve);if(Er)return a(Ve.substr(0,Er.index)).concat(a(Er[1])).concat(a(Ve.substr(Er.index+Er[0].length)));var Xr=Ve.split(".");if(Xr.length===1)return['"'+t(Ve)+'"'];for(var Kr=[],Yr=0;Yr"u"?1:window.devicePixelRatio,Ua=!1,Wn={},Tn=function(yr){},nn=function(){};if(typeof Pt=="string"?Ft=document.querySelector(Pt):typeof Pt=="object"&&(b(Pt)?Ft=Pt:M(Pt)?(Kr=Pt,Xr=Kr.canvas):("gl"in Pt?Kr=Pt.gl:"canvas"in Pt?Xr=E(Pt.canvas):"container"in Pt&&(Er=E(Pt.container)),"attributes"in Pt&&(Yr=Pt.attributes),"extensions"in Pt&&(_a=A(Pt.extensions)),"optionalExtensions"in Pt&&(Ra=A(Pt.optionalExtensions)),"onDone"in Pt&&(Tn=Pt.onDone),"profile"in Pt&&(Ua=!!Pt.profile),"pixelRatio"in Pt&&(Ba=+Pt.pixelRatio),"cachedCode"in Pt&&(Wn=Pt.cachedCode))),Ft&&(Ft.nodeName.toLowerCase()==="canvas"?Xr=Ft:Er=Ft),!Kr){if(!Xr){var ua=y(Er||document.body,Tn,Ba);if(!ua)return null;Xr=ua.canvas,nn=ua.onDestroy}Yr.premultipliedAlpha===void 0&&(Yr.premultipliedAlpha=!0),Kr=o(Xr,Yr)}return Kr?{gl:Kr,canvas:Xr,container:Er,extensions:_a,optionalExtensions:Ra,pixelRatio:Ba,profile:Ua,cachedCode:Wn,onDone:Tn,onDestroy:nn}:(nn(),Tn("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(Ve,Pt){var Ft={};function Er(Yr){var _a=Yr.toLowerCase(),Ra;try{Ra=Ft[_a]=Ve.getExtension(_a)}catch{}return!!Ra}for(var Xr=0;Xr65535)<<4,Ve>>>=Pt,Ft=(Ve>255)<<3,Ve>>>=Ft,Pt|=Ft,Ft=(Ve>15)<<2,Ve>>>=Ft,Pt|=Ft,Ft=(Ve>3)<<1,Ve>>>=Ft,Pt|=Ft,Pt|Ve>>1}function k(){var Ve=m(8,function(){return[]});function Pt(Kr){var Yr=z(Kr),_a=Ve[R(Yr)>>2];return _a.length>0?_a.pop():new ArrayBuffer(Yr)}function Ft(Kr){Ve[R(Kr.byteLength)>>2].push(Kr)}function Er(Kr,Yr){var _a=null;switch(Kr){case h:_a=new Int8Array(Pt(Yr),0,Yr);break;case x:_a=new Uint8Array(Pt(Yr),0,Yr);break;case _:_a=new Int16Array(Pt(2*Yr),0,Yr);break;case D:_a=new Uint16Array(Pt(2*Yr),0,Yr);break;case C:_a=new Int32Array(Pt(4*Yr),0,Yr);break;case F:_a=new Uint32Array(Pt(4*Yr),0,Yr);break;case I:_a=new Float32Array(Pt(4*Yr),0,Yr);break;default:return null}return _a.length!==Yr?_a.subarray(0,Yr):_a}function Xr(Kr){Ft(Kr.buffer)}return{alloc:Pt,free:Ft,allocType:Er,freeType:Xr}}var B=k();B.zero=k();var N=3408,q=3410,Y=3411,ee=3412,te=3413,ae=3414,j=3415,G=33901,K=33902,H=3379,Z=3386,X=34921,$=36347,Q=36348,re=35661,ue=35660,pe=34930,ge=36349,Te=34076,Se=34024,Ce=7936,Ue=7937,Oe=7938,_e=35724,ce=34047,ie=36063,se=34852,ne=3553,be=34067,De=34069,qe=33984,Ne=6408,ut=5126,ot=5121,yt=36160,At=36053,It=36064,Zt=16384,vr=function(Ve,Pt){var Ft=1;Pt.ext_texture_filter_anisotropic&&(Ft=Ve.getParameter(ce));var Er=1,Xr=1;Pt.webgl_draw_buffers&&(Er=Ve.getParameter(se),Xr=Ve.getParameter(ie));var Kr=!!Pt.oes_texture_float;if(Kr){var Yr=Ve.createTexture();Ve.bindTexture(ne,Yr),Ve.texImage2D(ne,0,Ne,1,1,0,Ne,ut,null);var _a=Ve.createFramebuffer();if(Ve.bindFramebuffer(yt,_a),Ve.framebufferTexture2D(yt,It,ne,Yr,0),Ve.bindTexture(ne,null),Ve.checkFramebufferStatus(yt)!==At)Kr=!1;else{Ve.viewport(0,0,1,1),Ve.clearColor(1,0,0,1),Ve.clear(Zt);var Ra=B.allocType(ut,4);Ve.readPixels(0,0,1,1,Ne,ut,Ra),Ve.getError()?Kr=!1:(Ve.deleteFramebuffer(_a),Ve.deleteTexture(Yr),Kr=Ra[0]===1),B.freeType(Ra)}}var Ba=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ua=!0;if(!Ba){var Wn=Ve.createTexture(),Tn=B.allocType(ot,36);Ve.activeTexture(qe),Ve.bindTexture(be,Wn),Ve.texImage2D(De,0,Ne,3,3,0,Ne,ot,Tn),B.freeType(Tn),Ve.bindTexture(be,null),Ve.deleteTexture(Wn),Ua=!Ve.getError()}return{colorBits:[Ve.getParameter(q),Ve.getParameter(Y),Ve.getParameter(ee),Ve.getParameter(te)],depthBits:Ve.getParameter(ae),stencilBits:Ve.getParameter(j),subpixelBits:Ve.getParameter(N),extensions:Object.keys(Pt).filter(function(nn){return!!Pt[nn]}),maxAnisotropic:Ft,maxDrawbuffers:Er,maxColorAttachments:Xr,pointSizeDims:Ve.getParameter(G),lineWidthDims:Ve.getParameter(K),maxViewportDims:Ve.getParameter(Z),maxCombinedTextureUnits:Ve.getParameter(re),maxCubeMapSize:Ve.getParameter(Te),maxRenderbufferSize:Ve.getParameter(Se),maxTextureUnits:Ve.getParameter(pe),maxTextureSize:Ve.getParameter(H),maxAttributes:Ve.getParameter(X),maxVertexUniforms:Ve.getParameter($),maxVertexTextureUnits:Ve.getParameter(ue),maxVaryingVectors:Ve.getParameter(Q),maxFragmentUniforms:Ve.getParameter(ge),glsl:Ve.getParameter(_e),renderer:Ve.getParameter(Ue),vendor:Ve.getParameter(Ce),version:Ve.getParameter(Oe),readFloat:Kr,npotTextureCube:Ua}},Ut=function(Ve){return Ve instanceof Uint8Array||Ve instanceof Uint16Array||Ve instanceof Uint32Array||Ve instanceof Int8Array||Ve instanceof Int16Array||Ve instanceof Int32Array||Ve instanceof Float32Array||Ve instanceof Float64Array||Ve instanceof Uint8ClampedArray};function Jt(Ve){return!!Ve&&typeof Ve=="object"&&Array.isArray(Ve.shape)&&Array.isArray(Ve.stride)&&typeof Ve.offset=="number"&&Ve.shape.length===Ve.stride.length&&(Array.isArray(Ve.data)||Ut(Ve.data))}var at=function(Ve){return Object.keys(Ve).map(function(Pt){return Ve[Pt]})},Ee={shape:He,flatten:Fe};function Re(Ve,Pt,Ft){for(var Er=0;Er0){var Hn;if(Array.isArray(Qr[0])){Qa=fa(Qr);for(var ha=1,la=1;la0){if(typeof ha[0]=="number"){var qa=B.allocType(va.dtype,ha.length);oi(qa,ha),Qa(qa,vn),B.freeType(qa)}else if(Array.isArray(ha[0])||Ut(ha[0])){Za=fa(ha);var Ha=pa(ha,Za,va.dtype);Qa(Ha,vn),B.freeType(Ha)}}}else if(Jt(ha)){Za=ha.shape;var pn=ha.stride,Yn=0,si=0,Ya=0,xn=0;Za.length===1?(Yn=Za[0],si=1,Ya=pn[0],xn=0):Za.length===2&&(Yn=Za[0],si=Za[1],Ya=pn[0],xn=pn[1]);var li=Array.isArray(ha.data)?va.dtype:ka(ha.data),ui=B.allocType(li,Yn*si);$n(ui,ha.data,Yn,si,Ya,xn,ha.offset),Qa(ui,vn),B.freeType(ui)}return on}return ba||on(yr),on._reglType="buffer",on._buffer=va,on.subdata=Hn,Ft.profile&&(on.stats=va.stats),on.destroy=function(){Tn(va)},on}function ua(){at(Kr).forEach(function(yr){yr.buffer=Ve.createBuffer(),Ve.bindBuffer(yr.type,yr.buffer),Ve.bufferData(yr.type,yr.persistentData||yr.byteLength,yr.usage)})}return Ft.profile&&(Pt.getTotalBufferSize=function(){var yr=0;return Object.keys(Kr).forEach(function(Qr){yr+=Kr[Qr].stats.size}),yr}),{create:nn,createStream:Ra,destroyStream:Ba,clear:function(){at(Kr).forEach(Tn),_a.forEach(Tn)},getBuffer:function(yr){return yr&&yr._buffer instanceof Yr?yr._buffer:null},restore:ua,_initBuffer:Wn}}var ci=0,hi=0,Pi=1,Jn=1,Ti=4,_n=4,Ln={points:ci,point:hi,lines:Pi,line:Jn,triangles:Ti,triangle:_n,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ji=0,Zi=1,un=4,rn=5120,nt=5121,Ke=5122,Qt=5123,Xt=5124,nr=5125,cr=34963,rr=35040,Ze=35044;function xt(Ve,Pt,Ft,Er){var Xr={},Kr=0,Yr={uint8:nt,uint16:Qt};Pt.oes_element_index_uint&&(Yr.uint32=nr);function _a(ua){this.id=Kr++,Xr[this.id]=this,this.buffer=ua,this.primType=un,this.vertCount=0,this.type=0}_a.prototype.bind=function(){this.buffer.bind()};var Ra=[];function Ba(ua){var yr=Ra.pop();return yr||(yr=new _a(Ft.create(null,cr,!0,!1)._buffer)),Wn(yr,ua,rr,-1,-1,0,0),yr}function Ua(ua){Ra.push(ua)}function Wn(ua,yr,Qr,ba,Fa,va,on){ua.buffer.bind();var Qa;if(yr){var Hn=on;!on&&(!Ut(yr)||Jt(yr)&&!Ut(yr.data))&&(Hn=Pt.oes_element_index_uint?nr:Qt),Ft._initBuffer(ua.buffer,yr,Qr,Hn,3)}else Ve.bufferData(cr,va,Qr),ua.buffer.dtype=Qa||nt,ua.buffer.usage=Qr,ua.buffer.dimension=3,ua.buffer.byteLength=va;if(Qa=on,!on){switch(ua.buffer.dtype){case nt:case rn:Qa=nt;break;case Qt:case Ke:Qa=Qt;break;case nr:case Xt:Qa=nr;break;default:}ua.buffer.dtype=Qa}ua.type=Qa;var ha=Fa;ha<0&&(ha=ua.buffer.byteLength,Qa===Qt?ha>>=1:Qa===nr&&(ha>>=2)),ua.vertCount=ha;var la=ba;if(ba<0){la=un;var vn=ua.buffer.dimension;vn===1&&(la=ji),vn===2&&(la=Zi),vn===3&&(la=un)}ua.primType=la}function Tn(ua){Er.elementsCount--,delete Xr[ua.id],ua.buffer.destroy(),ua.buffer=null}function nn(ua,yr){var Qr=Ft.create(null,cr,!0),ba=new _a(Qr._buffer);Er.elementsCount++;function Fa(va){if(!va)Qr(),ba.primType=un,ba.vertCount=0,ba.type=nt;else if(typeof va=="number")Qr(va),ba.primType=un,ba.vertCount=va|0,ba.type=nt;else{var on=null,Qa=Ze,Hn=-1,ha=-1,la=0,vn=0;Array.isArray(va)||Ut(va)||Jt(va)?on=va:("data"in va&&(on=va.data),"usage"in va&&(Qa=wa[va.usage]),"primitive"in va&&(Hn=Ln[va.primitive]),"count"in va&&(ha=va.count|0),"type"in va&&(vn=Yr[va.type]),"length"in va?la=va.length|0:(la=ha,vn===Qt||vn===Ke?la*=2:(vn===nr||vn===Xt)&&(la*=4))),Wn(ba,on,Qa,Hn,ha,la,vn)}return Fa}return Fa(ua),Fa._reglType="elements",Fa._elements=ba,Fa.subdata=function(va,on){return Qr.subdata(va,on),Fa},Fa.destroy=function(){Tn(ba)},Fa}return{create:nn,createStream:Ba,destroyStream:Ua,getElements:function(ua){return typeof ua=="function"&&ua._elements instanceof _a?ua._elements:null},clear:function(){at(Xr).forEach(Tn)}}}var Vt=new Float32Array(1),er=new Uint32Array(Vt.buffer),Tr=5123;function jr(Ve){for(var Pt=B.allocType(Tr,Ve.length),Ft=0;Ft>>31<<15,Kr=(Er<<1>>>24)-127,Yr=Er>>13&1023;if(Kr<-24)Pt[Ft]=Xr;else if(Kr<-14){var _a=-14-Kr;Pt[Ft]=Xr+(Yr+1024>>_a)}else Kr>15?Pt[Ft]=Xr+31744:Pt[Ft]=Xr+(Kr+15<<10)+Yr}return Pt}function Fr(Ve){return Array.isArray(Ve)||Ut(Ve)}var kr=34467,ra=3553,ja=34067,La=34069,Dn=6408,Mn=6406,_i=6407,ti=6409,Si=6410,ai=32854,Ao=32855,yo=36194,Vn=32819,Bo=32820,Mo=33635,co=34042,Ro=6402,ao=34041,Co=35904,Wo=35906,Po=36193,vi=33776,zi=33777,ho=33778,ro=33779,es=35986,Ho=35987,is=34798,as=35840,vs=35841,Yo=35842,po=35843,_s=36196,qo=5121,Io=5123,tl=5125,ts=5126,qs=10242,Xs=10243,ps=10497,ml=33071,xl=33648,fs=10240,Wl=10241,Ss=9728,ls=9729,No=9984,Do=9985,hs=9986,Jl=9987,du=33170,Ql=4352,Ou=4353,Uu=4354,Xu=34046,$u=3317,fc=37440,_c=37441,vu=37443,pu=37444,mu=33984,eu=[No,hs,Do,Jl],Vs=[0,ti,Si,_i,Dn],os={};os[ti]=os[Mn]=os[Ro]=1,os[ao]=os[Si]=2,os[_i]=os[Co]=3,os[Dn]=os[Wo]=4;function sl(Ve){return"[object "+Ve+"]"}var Tu=sl("HTMLCanvasElement"),ju=sl("OffscreenCanvas"),bc=sl("CanvasRenderingContext2D"),Hs=sl("ImageBitmap"),Af=sl("HTMLImageElement"),Xo=sl("HTMLVideoElement"),Mf=Object.keys(We).concat([Tu,ju,bc,Hs,Af,Xo]),ns=[];ns[qo]=1,ns[ts]=4,ns[Po]=2,ns[Io]=2,ns[tl]=4;var so=[];so[ai]=2,so[Ao]=2,so[yo]=2,so[ao]=4,so[vi]=.5,so[zi]=.5,so[ho]=1,so[ro]=1,so[es]=.5,so[Ho]=1,so[is]=1,so[as]=.5,so[vs]=.25,so[Yo]=.5,so[po]=.25,so[_s]=.5;function qu(Ve){return Array.isArray(Ve)&&(Ve.length===0||typeof Ve[0]=="number")}function hc(Ve){if(!Array.isArray(Ve))return!1;var Pt=Ve.length;return!(Pt===0||!Fr(Ve[0]))}function Ll(Ve){return Object.prototype.toString.call(Ve)}function Qc(Ve){return Ll(Ve)===Tu}function Au(Ve){return Ll(Ve)===ju}function Zu(Ve){return Ll(Ve)===bc}function ll(Ve){return Ll(Ve)===Hs}function ef(Ve){return Ll(Ve)===Af}function zc(Ve){return Ll(Ve)===Xo}function Ku(Ve){if(!Ve)return!1;var Pt=Ll(Ve);return Mf.indexOf(Pt)>=0?!0:qu(Ve)||hc(Ve)||Jt(Ve)}function Ju(Ve){return We[Object.prototype.toString.call(Ve)]|0}function Bc(Ve,Pt){var Ft=Pt.length;switch(Ve.type){case qo:case Io:case tl:case ts:var Er=B.allocType(Ve.type,Ft);Er.set(Pt),Ve.data=Er;break;case Po:Ve.data=jr(Pt);break;default:}}function Nc(Ve,Pt){return B.allocType(Ve.type===Po?ts:Ve.type,Pt)}function tu(Ve,Pt){Ve.type===Po?(Ve.data=jr(Pt),B.freeType(Pt)):Ve.data=Pt}function xc(Ve,Pt,Ft,Er,Xr,Kr){for(var Yr=Ve.width,_a=Ve.height,Ra=Ve.channels,Ba=Yr*_a*Ra,Ua=Nc(Ve,Ba),Wn=0,Tn=0;Tn<_a;++Tn)for(var nn=0;nn=1;)_a+=Yr*Ra*Ra,Ra/=2;return _a}else return Yr*Ft*Er}function Qu(Ve,Pt,Ft,Er,Xr,Kr,Yr){var _a={"don't care":Ql,"dont care":Ql,nice:Uu,fast:Ou},Ra={repeat:ps,clamp:ml,mirror:xl},Ba={nearest:Ss,linear:ls},Ua=u({mipmap:Jl,"nearest mipmap nearest":No,"linear mipmap nearest":Do,"nearest mipmap linear":hs,"linear mipmap linear":Jl},Ba),Wn={none:0,browser:pu},Tn={uint8:qo,rgba4:Vn,rgb565:Mo,"rgb5 a1":Bo},nn={alpha:Mn,luminance:ti,"luminance alpha":Si,rgb:_i,rgba:Dn,rgba4:ai,"rgb5 a1":Ao,rgb565:yo},ua={};Pt.ext_srgb&&(nn.srgb=Co,nn.srgba=Wo),Pt.oes_texture_float&&(Tn.float32=Tn.float=ts),Pt.oes_texture_half_float&&(Tn.float16=Tn["half float"]=Po),Pt.webgl_depth_texture&&(u(nn,{depth:Ro,"depth stencil":ao}),u(Tn,{uint16:Io,uint32:tl,"depth stencil":co})),Pt.webgl_compressed_texture_s3tc&&u(ua,{"rgb s3tc dxt1":vi,"rgba s3tc dxt1":zi,"rgba s3tc dxt3":ho,"rgba s3tc dxt5":ro}),Pt.webgl_compressed_texture_atc&&u(ua,{"rgb atc":es,"rgba atc explicit alpha":Ho,"rgba atc interpolated alpha":is}),Pt.webgl_compressed_texture_pvrtc&&u(ua,{"rgb pvrtc 4bppv1":as,"rgb pvrtc 2bppv1":vs,"rgba pvrtc 4bppv1":Yo,"rgba pvrtc 2bppv1":po}),Pt.webgl_compressed_texture_etc1&&(ua["rgb etc1"]=_s);var yr=Array.prototype.slice.call(Ve.getParameter(kr));Object.keys(ua).forEach(function(Lt){var Vr=ua[Lt];yr.indexOf(Vr)>=0&&(nn[Lt]=Vr)});var Qr=Object.keys(nn);Ft.textureFormats=Qr;var ba=[];Object.keys(nn).forEach(function(Lt){var Vr=nn[Lt];ba[Vr]=Lt});var Fa=[];Object.keys(Tn).forEach(function(Lt){var Vr=Tn[Lt];Fa[Vr]=Lt});var va=[];Object.keys(Ba).forEach(function(Lt){var Vr=Ba[Lt];va[Vr]=Lt});var on=[];Object.keys(Ua).forEach(function(Lt){var Vr=Ua[Lt];on[Vr]=Lt});var Qa=[];Object.keys(Ra).forEach(function(Lt){var Vr=Ra[Lt];Qa[Vr]=Lt});var Hn=Qr.reduce(function(Lt,Vr){var Gr=nn[Vr];return Gr===ti||Gr===Mn||Gr===ti||Gr===Si||Gr===Ro||Gr===ao||Pt.ext_srgb&&(Gr===Co||Gr===Wo)?Lt[Gr]=Gr:Gr===Ao||Vr.indexOf("rgba")>=0?Lt[Gr]=Dn:Lt[Gr]=_i,Lt},{});function ha(){this.internalformat=Dn,this.format=Dn,this.type=qo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=pu,this.width=0,this.height=0,this.channels=0}function la(Lt,Vr){Lt.internalformat=Vr.internalformat,Lt.format=Vr.format,Lt.type=Vr.type,Lt.compressed=Vr.compressed,Lt.premultiplyAlpha=Vr.premultiplyAlpha,Lt.flipY=Vr.flipY,Lt.unpackAlignment=Vr.unpackAlignment,Lt.colorSpace=Vr.colorSpace,Lt.width=Vr.width,Lt.height=Vr.height,Lt.channels=Vr.channels}function vn(Lt,Vr){if(!(typeof Vr!="object"||!Vr)){if("premultiplyAlpha"in Vr&&(Lt.premultiplyAlpha=Vr.premultiplyAlpha),"flipY"in Vr&&(Lt.flipY=Vr.flipY),"alignment"in Vr&&(Lt.unpackAlignment=Vr.alignment),"colorSpace"in Vr&&(Lt.colorSpace=Wn[Vr.colorSpace]),"type"in Vr){var Gr=Vr.type;Lt.type=Tn[Gr]}var En=Lt.width,Hi=Lt.height,zo=Lt.channels,kn=!1;"shape"in Vr?(En=Vr.shape[0],Hi=Vr.shape[1],Vr.shape.length===3&&(zo=Vr.shape[2],kn=!0)):("radius"in Vr&&(En=Hi=Vr.radius),"width"in Vr&&(En=Vr.width),"height"in Vr&&(Hi=Vr.height),"channels"in Vr&&(zo=Vr.channels,kn=!0)),Lt.width=En|0,Lt.height=Hi|0,Lt.channels=zo|0;var wt=!1;if("format"in Vr){var Rt=Vr.format,Kt=Lt.internalformat=nn[Rt];Lt.format=Hn[Kt],Rt in Tn&&("type"in Vr||(Lt.type=Tn[Rt])),Rt in ua&&(Lt.compressed=!0),wt=!0}!kn&&wt?Lt.channels=os[Lt.format]:kn&&!wt&&Lt.channels!==Vs[Lt.format]&&(Lt.format=Lt.internalformat=Vs[Lt.channels])}}function Za(Lt){Ve.pixelStorei(fc,Lt.flipY),Ve.pixelStorei(_c,Lt.premultiplyAlpha),Ve.pixelStorei(vu,Lt.colorSpace),Ve.pixelStorei($u,Lt.unpackAlignment)}function qa(){ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ha(Lt,Vr){var Gr=null;if(Ku(Vr)?Gr=Vr:Vr&&(vn(Lt,Vr),"x"in Vr&&(Lt.xOffset=Vr.x|0),"y"in Vr&&(Lt.yOffset=Vr.y|0),Ku(Vr.data)&&(Gr=Vr.data)),Vr.copy){var En=Xr.viewportWidth,Hi=Xr.viewportHeight;Lt.width=Lt.width||En-Lt.xOffset,Lt.height=Lt.height||Hi-Lt.yOffset,Lt.needsCopy=!0}else if(!Gr)Lt.width=Lt.width||1,Lt.height=Lt.height||1,Lt.channels=Lt.channels||4;else if(Ut(Gr))Lt.channels=Lt.channels||4,Lt.data=Gr,!("type"in Vr)&&Lt.type===qo&&(Lt.type=Ju(Gr));else if(qu(Gr))Lt.channels=Lt.channels||4,Bc(Lt,Gr),Lt.alignment=1,Lt.needsFree=!0;else if(Jt(Gr)){var zo=Gr.data;!Array.isArray(zo)&&Lt.type===qo&&(Lt.type=Ju(zo));var kn=Gr.shape,wt=Gr.stride,Rt,Kt,Or,Jr,br,mr;kn.length===3?(Or=kn[2],mr=wt[2]):(Or=1,mr=1),Rt=kn[0],Kt=kn[1],Jr=wt[0],br=wt[1],Lt.alignment=1,Lt.width=Rt,Lt.height=Kt,Lt.channels=Or,Lt.format=Lt.internalformat=Vs[Or],Lt.needsFree=!0,xc(Lt,zo,Jr,br,mr,Gr.offset)}else if(Qc(Gr)||Au(Gr)||Zu(Gr))Qc(Gr)||Au(Gr)?Lt.element=Gr:Lt.element=Gr.canvas,Lt.width=Lt.element.width,Lt.height=Lt.element.height,Lt.channels=4;else if(ll(Gr))Lt.element=Gr,Lt.width=Gr.width,Lt.height=Gr.height,Lt.channels=4;else if(ef(Gr))Lt.element=Gr,Lt.width=Gr.naturalWidth,Lt.height=Gr.naturalHeight,Lt.channels=4;else if(zc(Gr))Lt.element=Gr,Lt.width=Gr.videoWidth,Lt.height=Gr.videoHeight,Lt.channels=4;else if(hc(Gr)){var or=Lt.width||Gr[0].length,Yt=Lt.height||Gr.length,ar=Lt.channels;Fr(Gr[0][0])?ar=ar||Gr[0][0].length:ar=ar||1;for(var Nt=Ee.shape(Gr),Cr=1,ta=0;ta>=Hi,Gr.height>>=Hi,Ha(Gr,En[Hi]),Lt.mipmask|=1<=0&&!("faces"in Vr)&&(Lt.genMipmaps=!0)}if("mag"in Vr){var En=Vr.mag;Lt.magFilter=Ba[En]}var Hi=Lt.wrapS,zo=Lt.wrapT;if("wrap"in Vr){var kn=Vr.wrap;typeof kn=="string"?Hi=zo=Ra[kn]:Array.isArray(kn)&&(Hi=Ra[kn[0]],zo=Ra[kn[1]])}else{if("wrapS"in Vr){var wt=Vr.wrapS;Hi=Ra[wt]}if("wrapT"in Vr){var Rt=Vr.wrapT;zo=Ra[Rt]}}if(Lt.wrapS=Hi,Lt.wrapT=zo,"anisotropic"in Vr){var Kt=Vr.anisotropic;Lt.anisotropic=Vr.anisotropic}if("mipmap"in Vr){var Or=!1;switch(typeof Vr.mipmap){case"string":Lt.mipmapHint=_a[Vr.mipmap],Lt.genMipmaps=!0,Or=!0;break;case"boolean":Or=Lt.genMipmaps=Vr.mipmap;break;case"object":Lt.genMipmaps=!1,Or=!0;break;default:}Or&&!("min"in Vr)&&(Lt.minFilter=No)}}function Ns(Lt,Vr){Ve.texParameteri(Vr,Wl,Lt.minFilter),Ve.texParameteri(Vr,fs,Lt.magFilter),Ve.texParameteri(Vr,qs,Lt.wrapS),Ve.texParameteri(Vr,Xs,Lt.wrapT),Pt.ext_texture_filter_anisotropic&&Ve.texParameteri(Vr,Xu,Lt.anisotropic),Lt.genMipmaps&&(Ve.hint(du,Lt.mipmapHint),Ve.generateMipmap(Vr))}var nl=0,As={},Ms=Ft.maxTextureUnits,Ps=Array(Ms).map(function(){return null});function Ai(Lt){ha.call(this),this.mipmask=0,this.internalformat=Dn,this.id=nl++,this.refCount=1,this.target=Lt,this.texture=Ve.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Fo,Yr.profile&&(this.stats={size:0})}function Os(Lt){Ve.activeTexture(mu),Ve.bindTexture(Lt.target,Lt.texture)}function jo(){var Lt=Ps[0];Lt?Ve.bindTexture(Lt.target,Lt.texture):Ve.bindTexture(ra,null)}function fl(Lt){var Vr=Lt.texture,Gr=Lt.unit,En=Lt.target;Gr>=0&&(Ve.activeTexture(mu+Gr),Ve.bindTexture(En,null),Ps[Gr]=null),Ve.deleteTexture(Vr),Lt.texture=null,Lt.params=null,Lt.pixels=null,Lt.refCount=0,delete As[Lt.id],Kr.textureCount--}u(Ai.prototype,{bind:function(){var Lt=this;Lt.bindCount+=1;var Vr=Lt.unit;if(Vr<0){for(var Gr=0;Gr0)continue;En.unit=-1}Ps[Gr]=Lt,Vr=Gr;break}Vr>=Ms,Yr.profile&&Kr.maxTextureUnits>br)-Or,mr.height=mr.height||(Gr.height>>br)-Jr,Os(Gr),Yn(mr,ra,Or,Jr,br),jo(),xn(mr),En}function zo(kn,wt){var Rt=kn|0,Kt=wt|0||Rt;if(Rt===Gr.width&&Kt===Gr.height)return En;En.width=Gr.width=Rt,En.height=Gr.height=Kt,Os(Gr);for(var Or=0;Gr.mipmask>>Or;++Or){var Jr=Rt>>Or,br=Kt>>Or;if(!Jr||!br)break;Ve.texImage2D(ra,Or,Gr.format,Jr,br,0,Gr.format,Gr.type,null)}return jo(),Yr.profile&&(Gr.stats.size=ru(Gr.internalformat,Gr.type,Rt,Kt,!1,!1)),En}return En(Lt,Vr),En.subimage=Hi,En.resize=zo,En._reglType="texture2d",En._texture=Gr,Yr.profile&&(En.stats=Gr.stats),En.destroy=function(){Gr.decRef()},En}function Sl(Lt,Vr,Gr,En,Hi,zo){var kn=new Ai(ja);As[kn.id]=kn,Kr.cubeCount++;var wt=new Array(6);function Rt(Jr,br,mr,or,Yt,ar){var Nt,Cr=kn.texInfo;for(Fo.call(Cr),Nt=0;Nt<6;++Nt)wt[Nt]=Wi();if(typeof Jr=="number"||!Jr){var ta=Jr|0||1;for(Nt=0;Nt<6;++Nt)ui(wt[Nt],ta,ta)}else if(typeof Jr=="object")if(br)Ri(wt[0],Jr),Ri(wt[1],br),Ri(wt[2],mr),Ri(wt[3],or),Ri(wt[4],Yt),Ri(wt[5],ar);else if(Js(Cr,Jr),vn(kn,Jr),"faces"in Jr){var xa=Jr.faces;for(Nt=0;Nt<6;++Nt)la(wt[Nt],kn),Ri(wt[Nt],xa[Nt])}else for(Nt=0;Nt<6;++Nt)Ri(wt[Nt],Jr);for(la(kn,wt[0]),Cr.genMipmaps?kn.mipmask=(wt[0].width<<1)-1:kn.mipmask=wt[0].mipmask,kn.internalformat=wt[0].internalformat,Rt.width=wt[0].width,Rt.height=wt[0].height,Os(kn),Nt=0;Nt<6;++Nt)cs(wt[Nt],La+Nt);for(Ns(Cr,ja),jo(),Yr.profile&&(kn.stats.size=ru(kn.internalformat,kn.type,Rt.width,Rt.height,Cr.genMipmaps,!0)),Rt.format=ba[kn.internalformat],Rt.type=Fa[kn.type],Rt.mag=va[Cr.magFilter],Rt.min=on[Cr.minFilter],Rt.wrapS=Qa[Cr.wrapS],Rt.wrapT=Qa[Cr.wrapT],Nt=0;Nt<6;++Nt)Ml(wt[Nt]);return Rt}function Kt(Jr,br,mr,or,Yt){var ar=mr|0,Nt=or|0,Cr=Yt|0,ta=Ya();return la(ta,kn),ta.width=0,ta.height=0,Ha(ta,br),ta.width=ta.width||(kn.width>>Cr)-ar,ta.height=ta.height||(kn.height>>Cr)-Nt,Os(kn),Yn(ta,La+Jr,ar,Nt,Cr),jo(),xn(ta),Rt}function Or(Jr){var br=Jr|0;if(br!==kn.width){Rt.width=kn.width=br,Rt.height=kn.height=br,Os(kn);for(var mr=0;mr<6;++mr)for(var or=0;kn.mipmask>>or;++or)Ve.texImage2D(La+mr,or,kn.format,br>>or,br>>or,0,kn.format,kn.type,null);return jo(),Yr.profile&&(kn.stats.size=ru(kn.internalformat,kn.type,Rt.width,Rt.height,!1,!0)),Rt}}return Rt(Lt,Vr,Gr,En,Hi,zo),Rt.subimage=Kt,Rt.resize=Or,Rt._reglType="textureCube",Rt._texture=kn,Yr.profile&&(Rt.stats=kn.stats),Rt.destroy=function(){kn.decRef()},Rt}function di(){for(var Lt=0;Lt>En,Gr.height>>En,0,Gr.internalformat,Gr.type,null);else for(var Hi=0;Hi<6;++Hi)Ve.texImage2D(La+Hi,En,Gr.internalformat,Gr.width>>En,Gr.height>>En,0,Gr.internalformat,Gr.type,null);Ns(Gr.texInfo,Gr.target)})}function lo(){for(var Lt=0;Lt=0?Ml=!0:Ra.indexOf(Fo)>=0&&(Ml=!1))),("depthTexture"in Ai||"depthStencilTexture"in Ai)&&(Ps=!!(Ai.depthTexture||Ai.depthStencilTexture)),"depth"in Ai&&(typeof Ai.depth=="boolean"?cs=Ai.depth:(nl=Ai.depth,Ls=!1)),"stencil"in Ai&&(typeof Ai.stencil=="boolean"?Ls=Ai.stencil:(As=Ai.stencil,cs=!1)),"depthStencil"in Ai&&(typeof Ai.depthStencil=="boolean"?cs=Ls=Ai.depthStencil:(Ms=Ai.depthStencil,cs=!1,Ls=!1))}var jo=null,fl=null,hl=null,Sl=null;if(Array.isArray(Wi))jo=Wi.map(ua);else if(Wi)jo=[ua(Wi)];else for(jo=new Array(Ns),li=0;li0&&(xn.depth=Ha[0].depth,xn.stencil=Ha[0].stencil,xn.depthStencil=Ha[0].depthStencil),Ha[Ya]?Ha[Ya](xn):Ha[Ya]=la(xn)}return u(pn,{width:li,height:li,color:Fo})}function Yn(si){var Ya,xn=si|0;if(xn===pn.width)return pn;var li=pn.color;for(Ya=0;Ya=li.byteLength?ui.subdata(li):(ui.destroy(),la.buffers[si]=null)),la.buffers[si]||(ui=la.buffers[si]=Xr.create(Ya,Uc,!1,!0)),xn.buffer=Xr.getBuffer(ui),xn.size=xn.buffer.dimension|0,xn.normalized=!1,xn.type=xn.buffer.dtype,xn.offset=0,xn.stride=0,xn.divisor=0,xn.state=1,pn[si]=1}else Xr.getBuffer(Ya)?(xn.buffer=Xr.getBuffer(Ya),xn.size=xn.buffer.dimension|0,xn.normalized=!1,xn.type=xn.buffer.dtype,xn.offset=0,xn.stride=0,xn.divisor=0,xn.state=1):Xr.getBuffer(Ya.buffer)?(xn.buffer=Xr.getBuffer(Ya.buffer),xn.size=(+Ya.size||xn.buffer.dimension)|0,xn.normalized=!!Ya.normalized||!1,"type"in Ya?xn.type=$r[Ya.type]:xn.type=xn.buffer.dtype,xn.offset=(Ya.offset||0)|0,xn.stride=(Ya.stride||0)|0,xn.divisor=(Ya.divisor||0)|0,xn.state=1):"x"in Ya&&(xn.x=+Ya.x||0,xn.y=+Ya.y||0,xn.z=+Ya.z||0,xn.w=+Ya.w||0,xn.state=2)}for(var Ri=0;Ri1)for(var Za=0;Zayr&&(yr=Qr.stats.uniformsCount)}),yr},Ft.getMaxAttributesCount=function(){var yr=0;return Ua.forEach(function(Qr){Qr.stats.attributesCount>yr&&(yr=Qr.stats.attributesCount)}),yr});function ua(){Xr={},Kr={};for(var yr=0;yr16&&(Ft=Wa(Ft,Ve.length*8));for(var Er=Array(16),Xr=Array(16),Kr=0;Kr<16;Kr++)Er[Kr]=Ft[Kr]^909522486,Xr[Kr]=Ft[Kr]^1549556828;var Yr=Wa(Er.concat(Fu(Pt)),512+Pt.length*8);return Mt(Wa(Xr.concat(Yr),768))}function Su(Ve){for(var Pt=Cf?"0123456789ABCDEF":"0123456789abcdef",Ft="",Er,Xr=0;Xr>>4&15)+Pt.charAt(Er&15);return Ft}function lf(Ve){for(var Pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ft="",Er=Ve.length,Xr=0;XrVe.length*8?Ft+=Mc:Ft+=Pt.charAt(Kr>>>6*(3-Yr)&63);return Ft}function Lf(Ve,Pt){var Ft=Pt.length,Er=Array(),Xr,Kr,Yr,_a,Ra=Array(Math.ceil(Ve.length/2));for(Xr=0;Xr0;){for(_a=Array(),Yr=0,Xr=0;Xr0||Kr>0)&&(_a[_a.length]=Kr);Er[Er.length]=Yr,Ra=_a}var Ba="";for(Xr=Er.length-1;Xr>=0;Xr--)Ba+=Pt.charAt(Er[Xr]);var Ua=Math.ceil(Ve.length*8/(Math.log(Pt.length)/Math.log(2)));for(Xr=Ba.length;Xr>>6&31,128|Er&63):Er<=65535?Pt+=String.fromCharCode(224|Er>>>12&15,128|Er>>>6&63,128|Er&63):Er<=2097151&&(Pt+=String.fromCharCode(240|Er>>>18&7,128|Er>>>12&63,128|Er>>>6&63,128|Er&63));return Pt}function Fu(Ve){for(var Pt=Array(Ve.length>>2),Ft=0;Ft>5]|=(Ve.charCodeAt(Ft/8)&255)<<24-Ft%32;return Pt}function Mt(Ve){for(var Pt="",Ft=0;Ft>5]>>>24-Ft%32&255);return Pt}function jt(Ve,Pt){return Ve>>>Pt|Ve<<32-Pt}function _r(Ve,Pt){return Ve>>>Pt}function dr(Ve,Pt,Ft){return Ve&Pt^~Ve&Ft}function ea(Ve,Pt,Ft){return Ve&Pt^Ve&Ft^Pt&Ft}function Aa(Ve){return jt(Ve,2)^jt(Ve,13)^jt(Ve,22)}function Ga(Ve){return jt(Ve,6)^jt(Ve,11)^jt(Ve,25)}function fn(Ve){return jt(Ve,7)^jt(Ve,18)^_r(Ve,3)}function gn(Ve){return jt(Ve,17)^jt(Ve,19)^_r(Ve,10)}var qn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Wa(Ve,Pt){var Ft=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Er=new Array(64),Xr,Kr,Yr,_a,Ra,Ba,Ua,Wn,Tn,nn,ua,yr;for(Ve[Pt>>5]|=128<<24-Pt%32,Ve[(Pt+64>>9<<4)+15]=Pt,Tn=0;Tn>16)+(Pt>>16)+(Ft>>16);return Er<<16|Ft&65535}function sn(Ve){return Array.prototype.slice.call(Ve)}function Pa(Ve){return sn(Ve).join("")}function Qn(Ve){var Pt=Ve&&Ve.cache,Ft=0,Er=[],Xr=[],Kr=[];function Yr(ua,yr){var Qr=yr&&yr.stable;if(!Qr){for(var ba=0;ba0&&(ua.push(Fa,"="),ua.push.apply(ua,sn(arguments)),ua.push(";")),Fa}return u(yr,{def:ba,toString:function(){return Pa([Qr.length>0?"var "+Qr.join(",")+";":"",Pa(ua)])}})}function Ra(){var ua=_a(),yr=_a(),Qr=ua.toString,ba=yr.toString;function Fa(va,on){yr(va,on,"=",ua.def(va,on),";")}return u(function(){ua.apply(ua,sn(arguments))},{def:ua.def,entry:ua,exit:yr,save:Fa,set:function(va,on,Qa){Fa(va,on),ua(va,on,"=",Qa,";")},toString:function(){return Qr()+ba()}})}function Ba(){var ua=Pa(arguments),yr=Ra(),Qr=Ra(),ba=yr.toString,Fa=Qr.toString;return u(yr,{then:function(){return yr.apply(yr,sn(arguments)),this},else:function(){return Qr.apply(Qr,sn(arguments)),this},toString:function(){var va=Fa();return va&&(va="else{"+va+"}"),Pa(["if(",ua,"){",ba(),"}",va])}})}var Ua=_a(),Wn={};function Tn(ua,yr){var Qr=[];function ba(){var Hn="a"+Qr.length;return Qr.push(Hn),Hn}yr=yr||0;for(var Fa=0;Fa[b.viewport.x,b.viewport.y,A.viewportWidth,A.viewportHeight]},attributes:{color:{buffer:g,offset:(A,b)=>b.offset*4,divisor:1},position:{buffer:h,offset:(A,b)=>b.offset*8,divisor:1},positionFract:{buffer:p,offset:(A,b)=>b.offset*8,divisor:1},error:{buffer:i,offset:(A,b)=>b.offset*16,divisor:1},direction:{buffer:w,stride:24,offset:0},lineOffset:{buffer:w,stride:24,offset:8},capOffset:{buffer:w,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:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:r.length}),l(C,{update:f,draw:_,destroy:u,regl:o,gl:c,canvas:c.canvas,groups:M}),C;function C(A){A?f(A):A===null&&u(),_()}function _(A){if(typeof A=="number")return T(A);A&&!Array.isArray(A)&&(A=[A]),o._refresh(),M.forEach((b,z)=>{if(b){if(A&&(A[z]?b.draw=!0:b.draw=!1),!b.draw){b.draw=!0;return}T(z)}})}function T(A){typeof A=="number"&&(A=M[A]),A!=null&&A&&A.count&&A.color&&A.opacity&&A.positions&&A.positions.length>1&&(A.scaleRatio=[A.scale[0]*A.viewport.width,A.scale[1]*A.viewport.height],m(A),A.after&&A.after(A))}function f(A){if(!A)return;A.length!=null?typeof A[0]=="number"&&(A=[{positions:A}]):Array.isArray(A)||(A=[A]);let b=0,z=0;if(C.groups=M=A.map((R,B)=>{let F=M[B];if(R)typeof R=="function"?R={after:R}:typeof R[0]=="number"&&(R={positions:R});else return F;return R=k(R,{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"}),F||(M[B]=F={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},R=l({},S,R)),E(F,R,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=e(P),z+=P.length,P),positions:(P,j)=>(P=e(P,"float64"),j.count=Math.floor(P.length/2),j.bounds=v(P,2),j.offset=b,b+=j.count,P)},{color:(P,j)=>{let U=j.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let Q=P;P=Array(U);for(let re=0;re{let Z=j.bounds;return P||(P=Z),j.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],j.translate=[-P[0],-P[1]],j.scaleFract=a(j.scale),j.translateFract=a(j.translate),P},viewport:P=>{let j;return Array.isArray(P)?j={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(j={x:P.x||P.left||0,y:P.y||P.top||0},P.right?j.width=P.right-j.x:j.width=P.w||P.width||0,P.bottom?j.height=P.bottom-j.y:j.height=P.h||P.height||0):j={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},j}}]),F}),b||z){let R=M.reduce((j,U,Z)=>j+(U?U.count:0),0),B=new Float64Array(R*2),F=new Uint8Array(R*4),P=new Float32Array(R*4);M.forEach((j,U)=>{if(!j)return;let{positions:Z,count:Q,offset:re,color:ae,errors:oe}=j;Q&&(F.set(ae,re*4),P.set(oe,re*4),B.set(Z,re*2))});var I=t(B);h(I);var N=a(B,I);p(N),g(F),i(P)}}function u(){h.destroy(),p.destroy(),g.destroy(),i.destroy(),w.destroy()}}}}),E9=Ee({"node_modules/unquote/index.js"(J,V){var v=/[\'\"]/;V.exports=function(E){return E?(v.test(E.charAt(0))&&(E=E.substr(1)),v.test(E.charAt(E.length-1))&&(E=E.substr(0,E.length-1)),E):""}}}),Vw=Ee({"node_modules/css-global-keywords/index.json"(J,V){V.exports=["inherit","initial","unset"]}}),Hw=Ee({"node_modules/css-system-font-keywords/index.json"(J,V){V.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),Gw=Ee({"node_modules/css-font-weight-keywords/index.json"(J,V){V.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),Ww=Ee({"node_modules/css-font-style-keywords/index.json"(J,V){V.exports=["normal","italic","oblique"]}}),Yw=Ee({"node_modules/css-font-stretch-keywords/index.json"(J,V){V.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),k9=Ee({"node_modules/parenthesis/index.js"(J,V){"use strict";function v(k,l){if(typeof k!="string")return[k];var e=[k];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],a=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),m=[];function h(p,g,i){var w=e.push(p.slice(s[0].length,-s[1].length))-1;return m.push(w),a+w+a}e.forEach(function(p,g){for(var i,w=0;p!=i;)if(i=p,p=p.replace(c,h),w++>1e4)throw Error("References have circular dependency. Please, check them.");e[g]=p}),m=m.reverse(),e=e.map(function(p){return m.forEach(function(g){p=p.replace(new RegExp("(\\"+a+g+"\\"+a+")","g"),s[0]+"$1"+s[1])}),p})});var n=new RegExp("\\"+a+"([0-9]+)\\"+a);function o(s,c,m){for(var h=[],p,g=0;p=n.exec(s);){if(g++>1e4)throw Error("Circular references in parenthesis");h.push(s.slice(0,p.index)),h.push(o(c[p[1]],c)),s=s.slice(p.index+p[0].length)}return h.push(s),h}return r?e:o(e[0],e)}function x(k,l){if(l&&l.flat){var e=l&&l.escape||"___",t=k[0],a;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),n=0;t!=a;){if(n++>1e4)throw Error("Circular references in "+k);a=t,t=t.replace(r,o)}return t}return k.reduce(function s(c,m){return Array.isArray(m)&&(m=m.reduce(s,"")),c+m},"");function o(s,c){if(k[c]==null)throw Error("Reference "+c+"is undefined");return k[c]}}function E(k,l){return Array.isArray(k)?x(k,l):v(k,l)}E.parse=v,E.stringify=x,V.exports=E}}),C9=Ee({"node_modules/string-split-by/index.js"(J,V){"use strict";var v=k9();V.exports=function(E,k,l){if(E==null)throw Error("First argument should be a string");if(k==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=v.parse(E,{flat:!0,brackets:l.ignore}),t=e[0],a=t.split(k);if(l.escape){for(var r=[],n=0;n1&&Rt===qt&&(Rt==='"'||Rt==="'"))return['"'+t(it.substr(1,it.length-2))+'"'];var or=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(it);if(or)return a(it.substr(0,or.index)).concat(a(or[1])).concat(a(it.substr(or.index+or[0].length)));var vr=it.split(".");if(vr.length===1)return['"'+t(it)+'"'];for(var Ar=[],dr=0;dr"u"?1:window.devicePixelRatio,cn=!1,Nn={},Dn=function(vn){},qn=function(){};if(typeof Rt=="string"?qt=document.querySelector(Rt):typeof Rt=="object"&&(w(Rt)?qt=Rt:S(Rt)?(Ar=Rt,vr=Ar.canvas):("gl"in Rt?Ar=Rt.gl:"canvas"in Rt?vr=C(Rt.canvas):"container"in Rt&&(or=C(Rt.container)),"attributes"in Rt&&(dr=Rt.attributes),"extensions"in Rt&&(mr=M(Rt.extensions)),"optionalExtensions"in Rt&&(qr=M(Rt.optionalExtensions)),"onDone"in Rt&&(Dn=Rt.onDone),"profile"in Rt&&(cn=!!Rt.profile),"pixelRatio"in Rt&&(Lr=+Rt.pixelRatio),"cachedCode"in Rt&&(Nn=Rt.cachedCode))),qt&&(qt.nodeName.toLowerCase()==="canvas"?vr=qt:or=qt),!Ar){if(!vr){var _n=g(or||document.body,Dn,Lr);if(!_n)return null;vr=_n.canvas,qn=_n.onDestroy}dr.premultipliedAlpha===void 0&&(dr.premultipliedAlpha=!0),Ar=i(vr,dr)}return Ar?{gl:Ar,canvas:vr,container:or,extensions:mr,optionalExtensions:qr,pixelRatio:Lr,profile:cn,cachedCode:Nn,onDone:Dn,onDestroy:qn}:(qn(),Dn("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(it,Rt){var qt={};function or(dr){var mr=dr.toLowerCase(),qr;try{qr=qt[mr]=it.getExtension(mr)}catch{}return!!qr}for(var vr=0;vr65535)<<4,it>>>=Rt,qt=(it>255)<<3,it>>>=qt,Rt|=qt,qt=(it>15)<<2,it>>>=qt,Rt|=qt,qt=(it>3)<<1,it>>>=qt,Rt|=qt,Rt|it>>1}function P(){var it=f(8,function(){return[]});function Rt(Ar){var dr=B(Ar),mr=it[F(dr)>>2];return mr.length>0?mr.pop():new ArrayBuffer(dr)}function qt(Ar){it[F(Ar.byteLength)>>2].push(Ar)}function or(Ar,dr){var mr=null;switch(Ar){case u:mr=new Int8Array(Rt(dr),0,dr);break;case A:mr=new Uint8Array(Rt(dr),0,dr);break;case b:mr=new Int16Array(Rt(2*dr),0,dr);break;case z:mr=new Uint16Array(Rt(2*dr),0,dr);break;case I:mr=new Int32Array(Rt(4*dr),0,dr);break;case N:mr=new Uint32Array(Rt(4*dr),0,dr);break;case R:mr=new Float32Array(Rt(4*dr),0,dr);break;default:return null}return mr.length!==dr?mr.subarray(0,dr):mr}function vr(Ar){qt(Ar.buffer)}return{alloc:Rt,free:qt,allocType:or,freeType:vr}}var j=P();j.zero=P();var U=3408,Z=3410,Q=3411,re=3412,ae=3413,oe=3414,H=3415,X=33901,K=33902,G=3379,Y=3386,q=34921,$=36347,ee=36348,ne=35661,fe=35660,ye=34930,xe=36349,Ae=34076,Me=34024,Ie=7936,Ue=7937,qe=7938,ke=35724,ge=34047,ue=36063,ve=34852,se=3553,Te=34067,Fe=34069,We=33984,Ge=6408,gt=5126,mt=5121,Tt=36160,At=36053,Kt=36064,nr=16384,_r=function(it,Rt){var qt=1;Rt.ext_texture_filter_anisotropic&&(qt=it.getParameter(ge));var or=1,vr=1;Rt.webgl_draw_buffers&&(or=it.getParameter(ve),vr=it.getParameter(ue));var Ar=!!Rt.oes_texture_float;if(Ar){var dr=it.createTexture();it.bindTexture(se,dr),it.texImage2D(se,0,Ge,1,1,0,Ge,gt,null);var mr=it.createFramebuffer();if(it.bindFramebuffer(Tt,mr),it.framebufferTexture2D(Tt,Kt,se,dr,0),it.bindTexture(se,null),it.checkFramebufferStatus(Tt)!==At)Ar=!1;else{it.viewport(0,0,1,1),it.clearColor(1,0,0,1),it.clear(nr);var qr=j.allocType(gt,4);it.readPixels(0,0,1,1,Ge,gt,qr),it.getError()?Ar=!1:(it.deleteFramebuffer(mr),it.deleteTexture(dr),Ar=qr[0]===1),j.freeType(qr)}}var Lr=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),cn=!0;if(!Lr){var Nn=it.createTexture(),Dn=j.allocType(mt,36);it.activeTexture(We),it.bindTexture(Te,Nn),it.texImage2D(Fe,0,Ge,3,3,0,Ge,mt,Dn),j.freeType(Dn),it.bindTexture(Te,null),it.deleteTexture(Nn),cn=!it.getError()}return{colorBits:[it.getParameter(Z),it.getParameter(Q),it.getParameter(re),it.getParameter(ae)],depthBits:it.getParameter(oe),stencilBits:it.getParameter(H),subpixelBits:it.getParameter(U),extensions:Object.keys(Rt).filter(function(qn){return!!Rt[qn]}),maxAnisotropic:qt,maxDrawbuffers:or,maxColorAttachments:vr,pointSizeDims:it.getParameter(X),lineWidthDims:it.getParameter(K),maxViewportDims:it.getParameter(Y),maxCombinedTextureUnits:it.getParameter(ne),maxCubeMapSize:it.getParameter(Ae),maxRenderbufferSize:it.getParameter(Me),maxTextureUnits:it.getParameter(ye),maxTextureSize:it.getParameter(G),maxAttributes:it.getParameter(q),maxVertexUniforms:it.getParameter($),maxVertexTextureUnits:it.getParameter(fe),maxVaryingVectors:it.getParameter(ee),maxFragmentUniforms:it.getParameter(xe),glsl:it.getParameter(ke),renderer:it.getParameter(Ue),vendor:it.getParameter(Ie),version:it.getParameter(qe),readFloat:Ar,npotTextureCube:cn}},Zt=function(it){return it instanceof Uint8Array||it instanceof Uint16Array||it instanceof Uint32Array||it instanceof Int8Array||it instanceof Int16Array||it instanceof Int32Array||it instanceof Float32Array||it instanceof Float64Array||it instanceof Uint8ClampedArray};function sr(it){return!!it&&typeof it=="object"&&Array.isArray(it.shape)&&Array.isArray(it.stride)&&typeof it.offset=="number"&&it.shape.length===it.stride.length&&(Array.isArray(it.data)||Zt(it.data))}var Ot=function(it){return Object.keys(it).map(function(Rt){return it[Rt]})},vt={shape:Ze,flatten:$e};function ht(it,Rt,qt){for(var or=0;or0){var Si;if(Array.isArray(Sn[0])){$a=fr(Sn);for(var Ma=1,xa=1;xa<$a.length;++xa)Ma*=$a[xa];vn.dimension=Ma,Si=cr(Sn,$a,vn.dtype),cn(vn,Si,Tn),Ha?vn.persistentData=Si:j.freeType(Si)}else if(typeof Sn[0]=="number"){vn.dimension=$n;var gi=j.allocType(vn.dtype,Sn.length);Aa(gi,Sn),cn(vn,gi,Tn),Ha?vn.persistentData=gi:j.freeType(gi)}else Zt(Sn[0])&&(vn.dimension=Sn[0].length,vn.dtype=Xn||jn(Sn[0])||wn,Si=cr(Sn,[Sn.length,Sn[0].length],vn.dtype),cn(vn,Si,Tn),Ha?vn.persistentData=Si:j.freeType(Si))}}else if(Zt(Sn))vn.dtype=Xn||jn(Sn),vn.dimension=$n,cn(vn,Sn,Tn),Ha&&(vn.persistentData=new Uint8Array(new Uint8Array(Sn.buffer)));else if(sr(Sn)){$a=Sn.shape;var Wa=Sn.stride,Ya=Sn.offset,Xa=0,pi=0,Xi=0,Eo=0;$a.length===1?(Xa=$a[0],pi=1,Xi=Wa[0],Eo=0):$a.length===2&&(Xa=$a[0],pi=$a[1],Xi=Wa[0],Eo=Wa[1]),vn.dtype=Xn||jn(Sn.data)||wn,vn.dimension=pi;var yi=j.allocType(vn.dtype,Xa*pi);ua(yi,Sn.data,Xa,pi,Xi,Eo,Ya),cn(vn,yi,Tn),Ha?vn.persistentData=yi:j.freeType(yi)}else Sn instanceof ArrayBuffer&&(vn.dtype=nn,vn.dimension=$n,cn(vn,Sn,Tn),Ha&&(vn.persistentData=new Uint8Array(new Uint8Array(Sn))))}function Dn(vn){Rt.bufferCount--,or(vn);var Sn=vn.buffer;it.deleteBuffer(Sn),vn.buffer=null,delete Ar[vn.id]}function qn(vn,Sn,Tn,Xn){Rt.bufferCount++;var $n=new dr(Sn);Ar[$n.id]=$n;function Ha(Ma){var xa=Ir,gi=null,Wa=0,Ya=0,Xa=1;return Array.isArray(Ma)||Zt(Ma)||sr(Ma)||Ma instanceof ArrayBuffer?gi=Ma:typeof Ma=="number"?Wa=Ma|0:Ma&&("data"in Ma&&(gi=Ma.data),"usage"in Ma&&(xa=ir[Ma.usage]),"type"in Ma&&(Ya=on[Ma.type]),"dimension"in Ma&&(Xa=Ma.dimension|0),"length"in Ma&&(Wa=Ma.length|0)),$n.bind(),gi?Nn($n,gi,xa,Ya,Xa,Xn):(Wa&&it.bufferData($n.type,Wa,xa),$n.dtype=Ya||nn,$n.usage=xa,$n.dimension=Xa,$n.byteLength=Wa),qt.profile&&($n.stats.size=$n.byteLength*Un[$n.dtype]),Ha}function $a(Ma,xa){it.bufferSubData($n.type,xa,Ma)}function Si(Ma,xa){var gi=(xa||0)|0,Wa;if($n.bind(),Zt(Ma)||Ma instanceof ArrayBuffer)$a(Ma,gi);else if(Array.isArray(Ma)){if(Ma.length>0){if(typeof Ma[0]=="number"){var Ya=j.allocType($n.dtype,Ma.length);Aa(Ya,Ma),$a(Ya,gi),j.freeType(Ya)}else if(Array.isArray(Ma[0])||Zt(Ma[0])){Wa=fr(Ma);var Xa=cr(Ma,Wa,$n.dtype);$a(Xa,gi),j.freeType(Xa)}}}else if(sr(Ma)){Wa=Ma.shape;var pi=Ma.stride,Xi=0,Eo=0,yi=0,Ui=0;Wa.length===1?(Xi=Wa[0],Eo=1,yi=pi[0],Ui=0):Wa.length===2&&(Xi=Wa[0],Eo=Wa[1],yi=pi[0],Ui=pi[1]);var fo=Array.isArray(Ma.data)?$n.dtype:jn(Ma.data),To=j.allocType(fo,Xi*Eo);ua(To,Ma.data,Xi,Eo,yi,Ui,Ma.offset),$a(To,gi),j.freeType(To)}return Ha}return Tn||Ha(vn),Ha._reglType="buffer",Ha._buffer=$n,Ha.subdata=Si,qt.profile&&(Ha.stats=$n.stats),Ha.destroy=function(){Dn($n)},Ha}function _n(){Ot(Ar).forEach(function(vn){vn.buffer=it.createBuffer(),it.bindBuffer(vn.type,vn.buffer),it.bufferData(vn.type,vn.persistentData||vn.byteLength,vn.usage)})}return qt.profile&&(Rt.getTotalBufferSize=function(){var vn=0;return Object.keys(Ar).forEach(function(Sn){vn+=Ar[Sn].stats.size}),vn}),{create:qn,createStream:qr,destroyStream:Lr,clear:function(){Ot(Ar).forEach(Dn),mr.forEach(Dn)},getBuffer:function(vn){return vn&&vn._buffer instanceof dr?vn._buffer:null},restore:_n,_initBuffer:Nn}}var ei=0,Fa=0,ai=1,Mi=1,ci=4,ba=4,pa={points:ei,point:Fa,lines:ai,line:Mi,triangles:ci,triangle:ba,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Ii=0,ho=1,da=4,Kn=5120,ot=5121,et=5122,hr=5123,ur=5124,Tr=5125,Rr=34963,Fr=35040,at=35044;function kt(it,Rt,qt,or){var vr={},Ar=0,dr={uint8:ot,uint16:hr};Rt.oes_element_index_uint&&(dr.uint32=Tr);function mr(_n){this.id=Ar++,vr[this.id]=this,this.buffer=_n,this.primType=da,this.vertCount=0,this.type=0}mr.prototype.bind=function(){this.buffer.bind()};var qr=[];function Lr(_n){var vn=qr.pop();return vn||(vn=new mr(qt.create(null,Rr,!0,!1)._buffer)),Nn(vn,_n,Fr,-1,-1,0,0),vn}function cn(_n){qr.push(_n)}function Nn(_n,vn,Sn,Tn,Xn,$n,Ha){_n.buffer.bind();var $a;if(vn){var Si=Ha;!Ha&&(!Zt(vn)||sr(vn)&&!Zt(vn.data))&&(Si=Rt.oes_element_index_uint?Tr:hr),qt._initBuffer(_n.buffer,vn,Sn,Si,3)}else it.bufferData(Rr,$n,Sn),_n.buffer.dtype=$a||ot,_n.buffer.usage=Sn,_n.buffer.dimension=3,_n.buffer.byteLength=$n;if($a=Ha,!Ha){switch(_n.buffer.dtype){case ot:case Kn:$a=ot;break;case hr:case et:$a=hr;break;case Tr:case ur:$a=Tr;break;default:}_n.buffer.dtype=$a}_n.type=$a;var Ma=Xn;Ma<0&&(Ma=_n.buffer.byteLength,$a===hr?Ma>>=1:$a===Tr&&(Ma>>=2)),_n.vertCount=Ma;var xa=Tn;if(Tn<0){xa=da;var gi=_n.buffer.dimension;gi===1&&(xa=Ii),gi===2&&(xa=ho),gi===3&&(xa=da)}_n.primType=xa}function Dn(_n){or.elementsCount--,delete vr[_n.id],_n.buffer.destroy(),_n.buffer=null}function qn(_n,vn){var Sn=qt.create(null,Rr,!0),Tn=new mr(Sn._buffer);or.elementsCount++;function Xn($n){if(!$n)Sn(),Tn.primType=da,Tn.vertCount=0,Tn.type=ot;else if(typeof $n=="number")Sn($n),Tn.primType=da,Tn.vertCount=$n|0,Tn.type=ot;else{var Ha=null,$a=at,Si=-1,Ma=-1,xa=0,gi=0;Array.isArray($n)||Zt($n)||sr($n)?Ha=$n:("data"in $n&&(Ha=$n.data),"usage"in $n&&($a=ir[$n.usage]),"primitive"in $n&&(Si=pa[$n.primitive]),"count"in $n&&(Ma=$n.count|0),"type"in $n&&(gi=dr[$n.type]),"length"in $n?xa=$n.length|0:(xa=Ma,gi===hr||gi===et?xa*=2:(gi===Tr||gi===ur)&&(xa*=4))),Nn(Tn,Ha,$a,Si,Ma,xa,gi)}return Xn}return Xn(_n),Xn._reglType="elements",Xn._elements=Tn,Xn.subdata=function($n,Ha){return Sn.subdata($n,Ha),Xn},Xn.destroy=function(){Dn(Tn)},Xn}return{create:qn,createStream:Lr,destroyStream:cn,getElements:function(_n){return typeof _n=="function"&&_n._elements instanceof mr?_n._elements:null},clear:function(){Ot(vr).forEach(Dn)}}}var Ut=new Float32Array(1),ar=new Uint32Array(Ut.buffer),Er=5123;function br(it){for(var Rt=j.allocType(Er,it.length),qt=0;qt>>31<<15,Ar=(or<<1>>>24)-127,dr=or>>13&1023;if(Ar<-24)Rt[qt]=vr;else if(Ar<-14){var mr=-14-Ar;Rt[qt]=vr+(dr+1024>>mr)}else Ar>15?Rt[qt]=vr+31744:Rt[qt]=vr+(Ar+15<<10)+dr}return Rt}function Or(it){return Array.isArray(it)||Zt(it)}var Pr=34467,hn=3553,zn=34067,Pn=34069,Ca=6408,ma=6406,bi=6407,ga=6409,eo=6410,si=32854,Ao=32855,ro=36194,Sa=32819,Gi=32820,ti=33635,fi=34042,xo=6402,zi=34041,so=35904,Mo=35906,So=36193,oi=33776,ii=33777,co=33778,Wi=33779,Ho=35986,Io=35987,qo=34798,Oo=35840,ws=35841,Ko=35842,ns=35843,wo=36196,No=5121,Di=5123,lo=5125,Go=5126,mo=10242,us=10243,Jo=10497,zs=33071,Is=33648,es=10240,Zs=10241,Ps=9728,$o=9729,Fo=9984,Ji=9985,Ro=9986,Ls=9987,zl=33170,ml=4352,Ts=4353,yl=4354,mu=34046,su=3317,cc=37440,Bl=37441,_l=37443,ju=37444,lu=33984,il=[Fo,Ro,Ji,Ls],As=[0,ga,eo,bi,Ca],ms={};ms[ga]=ms[ma]=ms[xo]=1,ms[zi]=ms[eo]=2,ms[bi]=ms[so]=3,ms[Ca]=ms[Mo]=4;function Ms(it){return"[object "+it+"]"}var ol=Ms("HTMLCanvasElement"),Su=Ms("OffscreenCanvas"),Eu=Ms("CanvasRenderingContext2D"),Uu=Ms("ImageBitmap"),fc=Ms("HTMLImageElement"),th=Ms("HTMLVideoElement"),Cf=Object.keys(Je).concat([ol,Su,Eu,Uu,fc,th]),qu=[];qu[No]=1,qu[Go]=4,qu[So]=2,qu[Di]=2,qu[lo]=4;var gs=[];gs[si]=2,gs[Ao]=2,gs[ro]=2,gs[zi]=4,gs[oi]=.5,gs[ii]=.5,gs[co]=1,gs[Wi]=1,gs[Ho]=.5,gs[Io]=1,gs[qo]=1,gs[Oo]=.5,gs[ws]=.25,gs[Ko]=.5,gs[ns]=.25,gs[wo]=.5;function Lf(it){return Array.isArray(it)&&(it.length===0||typeof it[0]=="number")}function hc(it){if(!Array.isArray(it))return!1;var Rt=it.length;return!(Rt===0||!Or(it[0]))}function nc(it){return Object.prototype.toString.call(it)}function hf(it){return nc(it)===ol}function ku(it){return nc(it)===Su}function dc(it){return nc(it)===Eu}function Cu(it){return nc(it)===Uu}function Pc(it){return nc(it)===fc}function $c(it){return nc(it)===th}function Zl(it){if(!it)return!1;var Rt=nc(it);return Cf.indexOf(Rt)>=0?!0:Lf(it)||hc(it)||sr(it)}function df(it){return Je[Object.prototype.toString.call(it)]|0}function Dc(it,Rt){var qt=Rt.length;switch(it.type){case No:case Di:case lo:case Go:var or=j.allocType(it.type,qt);or.set(Rt),it.data=or;break;case So:it.data=br(Rt);break;default:}}function Ic(it,Rt){return j.allocType(it.type===So?Go:it.type,Rt)}function Vu(it,Rt){it.type===So?(it.data=br(Rt),j.freeType(Rt)):it.data=Rt}function Rc(it,Rt,qt,or,vr,Ar){for(var dr=it.width,mr=it.height,qr=it.channels,Lr=dr*mr*qr,cn=Ic(it,Lr),Nn=0,Dn=0;Dn=1;)mr+=dr*qr*qr,qr/=2;return mr}else return dr*qt*or}function vf(it,Rt,qt,or,vr,Ar,dr){var mr={"don't care":ml,"dont care":ml,nice:yl,fast:Ts},qr={repeat:Jo,clamp:zs,mirror:Is},Lr={nearest:Ps,linear:$o},cn=v({mipmap:Ls,"nearest mipmap nearest":Fo,"linear mipmap nearest":Ji,"nearest mipmap linear":Ro,"linear mipmap linear":Ls},Lr),Nn={none:0,browser:ju},Dn={uint8:No,rgba4:Sa,rgb565:ti,"rgb5 a1":Gi},qn={alpha:ma,luminance:ga,"luminance alpha":eo,rgb:bi,rgba:Ca,rgba4:si,"rgb5 a1":Ao,rgb565:ro},_n={};Rt.ext_srgb&&(qn.srgb=so,qn.srgba=Mo),Rt.oes_texture_float&&(Dn.float32=Dn.float=Go),Rt.oes_texture_half_float&&(Dn.float16=Dn["half float"]=So),Rt.webgl_depth_texture&&(v(qn,{depth:xo,"depth stencil":zi}),v(Dn,{uint16:Di,uint32:lo,"depth stencil":fi})),Rt.webgl_compressed_texture_s3tc&&v(_n,{"rgb s3tc dxt1":oi,"rgba s3tc dxt1":ii,"rgba s3tc dxt3":co,"rgba s3tc dxt5":Wi}),Rt.webgl_compressed_texture_atc&&v(_n,{"rgb atc":Ho,"rgba atc explicit alpha":Io,"rgba atc interpolated alpha":qo}),Rt.webgl_compressed_texture_pvrtc&&v(_n,{"rgb pvrtc 4bppv1":Oo,"rgb pvrtc 2bppv1":ws,"rgba pvrtc 4bppv1":Ko,"rgba pvrtc 2bppv1":ns}),Rt.webgl_compressed_texture_etc1&&(_n["rgb etc1"]=wo);var vn=Array.prototype.slice.call(it.getParameter(Pr));Object.keys(_n).forEach(function(fn){var la=_n[fn];vn.indexOf(la)>=0&&(qn[fn]=la)});var Sn=Object.keys(qn);qt.textureFormats=Sn;var Tn=[];Object.keys(qn).forEach(function(fn){var la=qn[fn];Tn[la]=fn});var Xn=[];Object.keys(Dn).forEach(function(fn){var la=Dn[fn];Xn[la]=fn});var $n=[];Object.keys(Lr).forEach(function(fn){var la=Lr[fn];$n[la]=fn});var Ha=[];Object.keys(cn).forEach(function(fn){var la=cn[fn];Ha[la]=fn});var $a=[];Object.keys(qr).forEach(function(fn){var la=qr[fn];$a[la]=fn});var Si=Sn.reduce(function(fn,la){var ha=qn[la];return ha===ga||ha===ma||ha===ga||ha===eo||ha===xo||ha===zi||Rt.ext_srgb&&(ha===so||ha===Mo)?fn[ha]=ha:ha===Ao||la.indexOf("rgba")>=0?fn[ha]=Ca:fn[ha]=bi,fn},{});function Ma(){this.internalformat=Ca,this.format=Ca,this.type=No,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=ju,this.width=0,this.height=0,this.channels=0}function xa(fn,la){fn.internalformat=la.internalformat,fn.format=la.format,fn.type=la.type,fn.compressed=la.compressed,fn.premultiplyAlpha=la.premultiplyAlpha,fn.flipY=la.flipY,fn.unpackAlignment=la.unpackAlignment,fn.colorSpace=la.colorSpace,fn.width=la.width,fn.height=la.height,fn.channels=la.channels}function gi(fn,la){if(!(typeof la!="object"||!la)){if("premultiplyAlpha"in la&&(fn.premultiplyAlpha=la.premultiplyAlpha),"flipY"in la&&(fn.flipY=la.flipY),"alignment"in la&&(fn.unpackAlignment=la.alignment),"colorSpace"in la&&(fn.colorSpace=Nn[la.colorSpace]),"type"in la){var ha=la.type;fn.type=Dn[ha]}var ao=fn.width,ds=fn.height,Os=fn.channels,io=!1;"shape"in la?(ao=la.shape[0],ds=la.shape[1],la.shape.length===3&&(Os=la.shape[2],io=!0)):("radius"in la&&(ao=ds=la.radius),"width"in la&&(ao=la.width),"height"in la&&(ds=la.height),"channels"in la&&(Os=la.channels,io=!0)),fn.width=ao|0,fn.height=ds|0,fn.channels=Os|0;var en=!1;if("format"in la){var dn=la.format,An=fn.internalformat=qn[dn];fn.format=Si[An],dn in Dn&&("type"in la||(fn.type=Dn[dn])),dn in _n&&(fn.compressed=!0),en=!0}!io&&en?fn.channels=ms[fn.format]:io&&!en&&fn.channels!==As[fn.format]&&(fn.format=fn.internalformat=As[fn.channels])}}function Wa(fn){it.pixelStorei(cc,fn.flipY),it.pixelStorei(Bl,fn.premultiplyAlpha),it.pixelStorei(_l,fn.colorSpace),it.pixelStorei(su,fn.unpackAlignment)}function Ya(){Ma.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Xa(fn,la){var ha=null;if(Zl(la)?ha=la:la&&(gi(fn,la),"x"in la&&(fn.xOffset=la.x|0),"y"in la&&(fn.yOffset=la.y|0),Zl(la.data)&&(ha=la.data)),la.copy){var ao=vr.viewportWidth,ds=vr.viewportHeight;fn.width=fn.width||ao-fn.xOffset,fn.height=fn.height||ds-fn.yOffset,fn.needsCopy=!0}else if(!ha)fn.width=fn.width||1,fn.height=fn.height||1,fn.channels=fn.channels||4;else if(Zt(ha))fn.channels=fn.channels||4,fn.data=ha,!("type"in la)&&fn.type===No&&(fn.type=df(ha));else if(Lf(ha))fn.channels=fn.channels||4,Dc(fn,ha),fn.alignment=1,fn.needsFree=!0;else if(sr(ha)){var Os=ha.data;!Array.isArray(Os)&&fn.type===No&&(fn.type=df(Os));var io=ha.shape,en=ha.stride,dn,An,sa,wa,Le,Oe;io.length===3?(sa=io[2],Oe=en[2]):(sa=1,Oe=1),dn=io[0],An=io[1],wa=en[0],Le=en[1],fn.alignment=1,fn.width=dn,fn.height=An,fn.channels=sa,fn.format=fn.internalformat=As[sa],fn.needsFree=!0,Rc(fn,Os,wa,Le,Oe,ha.offset)}else if(hf(ha)||ku(ha)||dc(ha))hf(ha)||ku(ha)?fn.element=ha:fn.element=ha.canvas,fn.width=fn.element.width,fn.height=fn.element.height,fn.channels=4;else if(Cu(ha))fn.element=ha,fn.width=ha.width,fn.height=ha.height,fn.channels=4;else if(Pc(ha))fn.element=ha,fn.width=ha.naturalWidth,fn.height=ha.naturalHeight,fn.channels=4;else if($c(ha))fn.element=ha,fn.width=ha.videoWidth,fn.height=ha.videoHeight,fn.channels=4;else if(hc(ha)){var Ke=fn.width||ha[0].length,yt=fn.height||ha.length,wt=fn.channels;Or(ha[0][0])?wt=wt||ha[0][0].length:wt=wt||1;for(var Pt=vt.shape(ha),pr=1,Zr=0;Zr>=ds,ha.height>>=ds,Xa(ha,ao[ds]),fn.mipmask|=1<=0&&!("faces"in la)&&(fn.genMipmaps=!0)}if("mag"in la){var ao=la.mag;fn.magFilter=Lr[ao]}var ds=fn.wrapS,Os=fn.wrapT;if("wrap"in la){var io=la.wrap;typeof io=="string"?ds=Os=qr[io]:Array.isArray(io)&&(ds=qr[io[0]],Os=qr[io[1]])}else{if("wrapS"in la){var en=la.wrapS;ds=qr[en]}if("wrapT"in la){var dn=la.wrapT;Os=qr[dn]}}if(fn.wrapS=ds,fn.wrapT=Os,"anisotropic"in la){var An=la.anisotropic;fn.anisotropic=la.anisotropic}if("mipmap"in la){var sa=!1;switch(typeof la.mipmap){case"string":fn.mipmapHint=mr[la.mipmap],fn.genMipmaps=!0,sa=!0;break;case"boolean":sa=fn.genMipmaps=la.mipmap;break;case"object":fn.genMipmaps=!1,sa=!0;break;default:}sa&&!("min"in la)&&(fn.minFilter=Fo)}}function ss(fn,la){it.texParameteri(la,Zs,fn.minFilter),it.texParameteri(la,es,fn.magFilter),it.texParameteri(la,mo,fn.wrapS),it.texParameteri(la,us,fn.wrapT),Rt.ext_texture_filter_anisotropic&&it.texParameteri(la,mu,fn.anisotropic),fn.genMipmaps&&(it.hint(zl,fn.mipmapHint),it.generateMipmap(la))}var ks=0,ts={},el=qt.maxTextureUnits,Il=Array(el).map(function(){return null});function Do(fn){Ma.call(this),this.mipmask=0,this.internalformat=Ca,this.id=ks++,this.refCount=1,this.target=fn,this.texture=it.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new os,dr.profile&&(this.stats={size:0})}function ru(fn){it.activeTexture(lu),it.bindTexture(fn.target,fn.texture)}function Ns(){var fn=Il[0];fn?it.bindTexture(fn.target,fn.texture):it.bindTexture(hn,null)}function Nu(fn){var la=fn.texture,ha=fn.unit,ao=fn.target;ha>=0&&(it.activeTexture(lu+ha),it.bindTexture(ao,null),Il[ha]=null),it.deleteTexture(la),fn.texture=null,fn.params=null,fn.pixels=null,fn.refCount=0,delete ts[fn.id],Ar.textureCount--}v(Do.prototype,{bind:function(){var fn=this;fn.bindCount+=1;var la=fn.unit;if(la<0){for(var ha=0;ha0)continue;ao.unit=-1}Il[ha]=fn,la=ha;break}la>=el,dr.profile&&Ar.maxTextureUnits>Le)-sa,Oe.height=Oe.height||(ha.height>>Le)-wa,ru(ha),Xi(Oe,hn,sa,wa,Le),Ns(),Ui(Oe),ao}function Os(io,en){var dn=io|0,An=en|0||dn;if(dn===ha.width&&An===ha.height)return ao;ao.width=ha.width=dn,ao.height=ha.height=An,ru(ha);for(var sa=0;ha.mipmask>>sa;++sa){var wa=dn>>sa,Le=An>>sa;if(!wa||!Le)break;it.texImage2D(hn,sa,ha.format,wa,Le,0,ha.format,ha.type,null)}return Ns(),dr.profile&&(ha.stats.size=Lu(ha.internalformat,ha.type,dn,An,!1,!1)),ao}return ao(fn,la),ao.subimage=ds,ao.resize=Os,ao._reglType="texture2d",ao._texture=ha,dr.profile&&(ao.stats=ha.stats),ao.destroy=function(){ha.decRef()},ao}function Hl(fn,la,ha,ao,ds,Os){var io=new Do(zn);ts[io.id]=io,Ar.cubeCount++;var en=new Array(6);function dn(wa,Le,Oe,Ke,yt,wt){var Pt,pr=io.texInfo;for(os.call(pr),Pt=0;Pt<6;++Pt)en[Pt]=Uo();if(typeof wa=="number"||!wa){var Zr=wa|0||1;for(Pt=0;Pt<6;++Pt)To(en[Pt],Zr,Zr)}else if(typeof wa=="object")if(Le)jo(en[0],wa),jo(en[1],Le),jo(en[2],Oe),jo(en[3],Ke),jo(en[4],yt),jo(en[5],wt);else if(hs(pr,wa),gi(io,wa),"faces"in wa){var Mn=wa.faces;for(Pt=0;Pt<6;++Pt)xa(en[Pt],io),jo(en[Pt],Mn[Pt])}else for(Pt=0;Pt<6;++Pt)jo(en[Pt],wa);for(xa(io,en[0]),pr.genMipmaps?io.mipmask=(en[0].width<<1)-1:io.mipmask=en[0].mipmask,io.internalformat=en[0].internalformat,dn.width=en[0].width,dn.height=en[0].height,ru(io),Pt=0;Pt<6;++Pt)qs(en[Pt],Pn+Pt);for(ss(pr,zn),Ns(),dr.profile&&(io.stats.size=Lu(io.internalformat,io.type,dn.width,dn.height,pr.genMipmaps,!0)),dn.format=Tn[io.internalformat],dn.type=Xn[io.type],dn.mag=$n[pr.magFilter],dn.min=Ha[pr.minFilter],dn.wrapS=$a[pr.wrapS],dn.wrapT=$a[pr.wrapT],Pt=0;Pt<6;++Pt)Qs(en[Pt]);return dn}function An(wa,Le,Oe,Ke,yt){var wt=Oe|0,Pt=Ke|0,pr=yt|0,Zr=yi();return xa(Zr,io),Zr.width=0,Zr.height=0,Xa(Zr,Le),Zr.width=Zr.width||(io.width>>pr)-wt,Zr.height=Zr.height||(io.height>>pr)-Pt,ru(io),Xi(Zr,Pn+wa,wt,Pt,pr),Ns(),Ui(Zr),dn}function sa(wa){var Le=wa|0;if(Le!==io.width){dn.width=io.width=Le,dn.height=io.height=Le,ru(io);for(var Oe=0;Oe<6;++Oe)for(var Ke=0;io.mipmask>>Ke;++Ke)it.texImage2D(Pn+Oe,Ke,io.format,Le>>Ke,Le>>Ke,0,io.format,io.type,null);return Ns(),dr.profile&&(io.stats.size=Lu(io.internalformat,io.type,dn.width,dn.height,!1,!0)),dn}}return dn(fn,la,ha,ao,ds,Os),dn.subimage=An,dn.resize=sa,dn._reglType="textureCube",dn._texture=io,dr.profile&&(dn.stats=io.stats),dn.destroy=function(){io.decRef()},dn}function Co(){for(var fn=0;fn>ao,ha.height>>ao,0,ha.internalformat,ha.type,null);else for(var ds=0;ds<6;++ds)it.texImage2D(Pn+ds,ao,ha.internalformat,ha.width>>ao,ha.height>>ao,0,ha.internalformat,ha.type,null);ss(ha.texInfo,ha.target)})}function Hs(){for(var fn=0;fn=0?Qs=!0:qr.indexOf(os)>=0&&(Qs=!1))),("depthTexture"in Do||"depthStencilTexture"in Do)&&(Il=!!(Do.depthTexture||Do.depthStencilTexture)),"depth"in Do&&(typeof Do.depth=="boolean"?qs=Do.depth:(ks=Do.depth,Vs=!1)),"stencil"in Do&&(typeof Do.stencil=="boolean"?Vs=Do.stencil:(ts=Do.stencil,qs=!1)),"depthStencil"in Do&&(typeof Do.depthStencil=="boolean"?qs=Vs=Do.depthStencil:(el=Do.depthStencil,qs=!1,Vs=!1))}var Ns=null,Nu=null,Vl=null,Hl=null;if(Array.isArray(Uo))Ns=Uo.map(_n);else if(Uo)Ns=[_n(Uo)];else for(Ns=new Array(ss),fo=0;fo0&&(Ui.depth=Xa[0].depth,Ui.stencil=Xa[0].stencil,Ui.depthStencil=Xa[0].depthStencil),Xa[yi]?Xa[yi](Ui):Xa[yi]=xa(Ui)}return v(pi,{width:fo,height:fo,color:os})}function Xi(Eo){var yi,Ui=Eo|0;if(Ui===pi.width)return pi;var fo=pi.color;for(yi=0;yi=fo.byteLength?To.subdata(fo):(To.destroy(),xa.buffers[Eo]=null)),xa.buffers[Eo]||(To=xa.buffers[Eo]=vr.create(yi,fu,!1,!0)),Ui.buffer=vr.getBuffer(To),Ui.size=Ui.buffer.dimension|0,Ui.normalized=!1,Ui.type=Ui.buffer.dtype,Ui.offset=0,Ui.stride=0,Ui.divisor=0,Ui.state=1,pi[Eo]=1}else vr.getBuffer(yi)?(Ui.buffer=vr.getBuffer(yi),Ui.size=Ui.buffer.dimension|0,Ui.normalized=!1,Ui.type=Ui.buffer.dtype,Ui.offset=0,Ui.stride=0,Ui.divisor=0,Ui.state=1):vr.getBuffer(yi.buffer)?(Ui.buffer=vr.getBuffer(yi.buffer),Ui.size=(+yi.size||Ui.buffer.dimension)|0,Ui.normalized=!!yi.normalized||!1,"type"in yi?Ui.type=on[yi.type]:Ui.type=Ui.buffer.dtype,Ui.offset=(yi.offset||0)|0,Ui.stride=(yi.stride||0)|0,Ui.divisor=(yi.divisor||0)|0,Ui.state=1):"x"in yi&&(Ui.x=+yi.x||0,Ui.y=+yi.y||0,Ui.z=+yi.z||0,Ui.w=+yi.w||0,Ui.state=2)}for(var jo=0;jo1)for(var Wa=0;Wa<$n.size;++Wa){var Ya=$n.name.replace("[0]","["+Wa+"]");mr(gi,new dr(Ya,Rt.id(Ya),it.getUniformLocation(Si,Ya),$n))}else mr(gi,new dr($n.name,Rt.id($n.name),it.getUniformLocation(Si,$n.name),$n));var Xa=it.getProgramParameter(Si,$u);or.profile&&(vn.stats.attributesCount=Xa);var pi=vn.attributes;for(Xn=0;Xnvn&&(vn=Sn.stats.uniformsCount)}),vn},qt.getMaxAttributesCount=function(){var vn=0;return cn.forEach(function(Sn){Sn.stats.attributesCount>vn&&(vn=Sn.stats.attributesCount)}),vn});function _n(){vr={},Ar={};for(var vn=0;vn16&&(qt=Gn(qt,it.length*8));for(var or=Array(16),vr=Array(16),Ar=0;Ar<16;Ar++)or[Ar]=qt[Ar]^909522486,vr[Ar]=qt[Ar]^1549556828;var dr=Gn(or.concat(ac(Rt)),512+Rt.length*8);return zt(Gn(vr.concat(dr),768))}function Pl(it){for(var Rt=tf?"0123456789ABCDEF":"0123456789abcdef",qt="",or,vr=0;vr>>4&15)+Rt.charAt(or&15);return qt}function yc(it){for(var Rt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",qt="",or=it.length,vr=0;vrit.length*8?qt+=gf:qt+=Rt.charAt(Ar>>>6*(3-dr)&63);return qt}function _c(it,Rt){var qt=Rt.length,or=Array(),vr,Ar,dr,mr,qr=Array(Math.ceil(it.length/2));for(vr=0;vr0;){for(mr=Array(),dr=0,vr=0;vr0||Ar>0)&&(mr[mr.length]=Ar);or[or.length]=dr,qr=mr}var Lr="";for(vr=or.length-1;vr>=0;vr--)Lr+=Rt.charAt(or[vr]);var cn=Math.ceil(it.length*8/(Math.log(Rt.length)/Math.log(2)));for(vr=Lr.length;vr>>6&31,128|or&63):or<=65535?Rt+=String.fromCharCode(224|or>>>12&15,128|or>>>6&63,128|or&63):or<=2097151&&(Rt+=String.fromCharCode(240|or>>>18&7,128|or>>>12&63,128|or>>>6&63,128|or&63));return Rt}function ac(it){for(var Rt=Array(it.length>>2),qt=0;qt>5]|=(it.charCodeAt(qt/8)&255)<<24-qt%32;return Rt}function zt(it){for(var Rt="",qt=0;qt>5]>>>24-qt%32&255);return Rt}function rr(it,Rt){return it>>>Rt|it<<32-Rt}function Br(it,Rt){return it>>>Rt}function wr(it,Rt,qt){return it&Rt^~it&qt}function un(it,Rt,qt){return it&Rt^it&qt^Rt&qt}function Ln(it){return rr(it,2)^rr(it,13)^rr(it,22)}function Vn(it){return rr(it,6)^rr(it,11)^rr(it,25)}function Jn(it){return rr(it,7)^rr(it,18)^Br(it,3)}function ca(it){return rr(it,17)^rr(it,19)^Br(it,10)}var Pa=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Gn(it,Rt){var qt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),or=new Array(64),vr,Ar,dr,mr,qr,Lr,cn,Nn,Dn,qn,_n,vn;for(it[Rt>>5]|=128<<24-Rt%32,it[(Rt+64>>9<<4)+15]=Rt,Dn=0;Dn>16)+(Rt>>16)+(qt>>16);return or<<16|qt&65535}function fa(it){return Array.prototype.slice.call(it)}function La(it){return fa(it).join("")}function qa(it){var Rt=it&&it.cache,qt=0,or=[],vr=[],Ar=[];function dr(_n,vn){var Sn=vn&&vn.stable;if(!Sn){for(var Tn=0;Tn0&&(_n.push(Xn,"="),_n.push.apply(_n,fa(arguments)),_n.push(";")),Xn}return v(vn,{def:Tn,toString:function(){return La([Sn.length>0?"var "+Sn.join(",")+";":"",La(_n)])}})}function qr(){var _n=mr(),vn=mr(),Sn=_n.toString,Tn=vn.toString;function Xn($n,Ha){vn($n,Ha,"=",_n.def($n,Ha),";")}return v(function(){_n.apply(_n,fa(arguments))},{def:_n.def,entry:_n,exit:vn,save:Xn,set:function($n,Ha,$a){Xn($n,Ha),_n($n,Ha,"=",$a,";")},toString:function(){return Sn()+Tn()}})}function Lr(){var _n=La(arguments),vn=qr(),Sn=qr(),Tn=vn.toString,Xn=Sn.toString;return v(vn,{then:function(){return vn.apply(vn,fa(arguments)),this},else:function(){return Sn.apply(Sn,fa(arguments)),this},toString:function(){var $n=Xn();return $n&&($n="else{"+$n+"}"),La(["if(",_n,"){",Tn(),"}",$n])}})}var cn=mr(),Nn={};function Dn(_n,vn){var Sn=[];function Tn(){var Si="a"+Sn.length;return Sn.push(Si),Si}vn=vn||0;for(var Xn=0;Xn":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},oa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ma={cw:Be,ccw:$e};function Ma(Ve){return Array.isArray(Ve)||Ut(Ve)||Jt(Ve)}function Ca(Ve){return Ve.sort(function(Pt,Ft){return Pt===de?-1:Ft===de?1:Pt=1,Er>=2,Pt)}else if(Ft===Go){var Xr=Ve.data;return new aa(Xr.thisDep,Xr.contextDep,Xr.propDep,Pt)}else{if(Ft===bs)return new aa(!1,!1,!1,Pt);if(Ft===Jo){for(var Kr=!1,Yr=!1,_a=!1,Ra=0;Ra=1&&(Yr=!0),Ua>=2&&(_a=!0)}else Ba.type===Go&&(Kr=Kr||Ba.data.thisDep,Yr=Yr||Ba.data.contextDep,_a=_a||Ba.data.propDep)}return new aa(Kr,Yr,_a,Pt)}else return new aa(Ft===wo,Ft===no,Ft===Rn,Pt)}}var xi=new aa(!1,!1,!1,function(){});function Ui(Ve,Pt,Ft,Er,Xr,Kr,Yr,_a,Ra,Ba,Ua,Wn,Tn,nn,ua,yr){var Qr=Ba.Record,ba={add:32774,subtract:32778,"reverse subtract":32779};Ft.ext_blend_minmax&&(ba.min=Je,ba.max=it);var Fa=Ft.angle_instanced_arrays,va=Ft.webgl_draw_buffers,on=Ft.oes_vertex_array_object,Qa={dirty:!0,profile:yr.profile},Hn={},ha=[],la={},vn={};function Za(wt){return wt.replace(".","_")}function qa(wt,Rt,Kt){var Or=Za(wt);ha.push(wt),Hn[Or]=Qa[Or]=!!Kt,la[Or]=Rt}function Ha(wt,Rt,Kt){var Or=Za(wt);ha.push(wt),Array.isArray(Kt)?(Qa[Or]=Kt.slice(),Hn[Or]=Kt.slice()):Qa[Or]=Hn[Or]=Kt,vn[Or]=Rt}function pn(wt){return!!isNaN(wt)}qa(Es,Sa),qa(Vo,ia),Ha(yl,"blendColor",[0,0,0,0]),Ha(Ws,"blendEquationSeparate",[ur,ur]),Ha(xs,"blendFuncSeparate",[sr,qt,sr,qt]),qa(bi,an,!0),Ha(ss,"depthFunc",qr),Ha(ms,"depthRange",[0,1]),Ha($o,"depthMask",!0),Ha(ul,ul,[!0,!0,!0,!0]),qa(yu,Wr),Ha(iu,"cullFace",we),Ha(zu,zu,$e),Ha(Tl,Tl,1),qa(Eu,ei),Ha(Al,"polygonOffset",[0,0]),qa(nc,Mi),qa(Xi,pi),Ha(vo,"sampleCoverage",[1,!1]),qa(mf,ln),Ha(kc,"stencilMask",-1),Ha(ou,"stencilFunc",[Ct,0,-1]),Ha(Me,"stencilOpSeparate",[le,bt,bt,bt]),Ha(L,"stencilOpSeparate",[we,bt,bt,bt]),qa(J,wn),Ha(fe,"scissor",[0,0,Ve.drawingBufferWidth,Ve.drawingBufferHeight]),Ha(de,de,[0,0,Ve.drawingBufferWidth,Ve.drawingBufferHeight]);var Yn={gl:Ve,context:Tn,strings:Pt,next:Hn,current:Qa,draw:Wn,elements:Kr,buffer:Xr,shader:Ua,attributes:Ba.state,vao:Ba,uniforms:Ra,framebuffer:_a,extensions:Ft,timer:nn,isBufferArgs:Ma},si={primTypes:Ln,compareFuncs:Zr,blendFuncs:Ea,blendEquations:ba,stencilOps:oa,glTypes:$r,orientationType:ma};va&&(si.backBuffer=[we],si.drawBuffer=m(Er.maxDrawbuffers,function(wt){return wt===0?[0]:m(wt,function(Rt){return ya+Rt})}));var Ya=0;function xn(){var wt=Qn({cache:ua}),Rt=wt.link,Kt=wt.global;wt.id=Ya++,wt.batchId="0";var Or=Rt(Yn),Jr=wt.shared={props:"a0"};Object.keys(Yn).forEach(function(ar){Jr[ar]=Kt.def(Or,".",ar)});var br=wt.next={},mr=wt.current={};Object.keys(vn).forEach(function(ar){Array.isArray(Qa[ar])&&(br[ar]=Kt.def(Jr.next,".",ar),mr[ar]=Kt.def(Jr.current,".",ar))});var or=wt.constants={};Object.keys(si).forEach(function(ar){or[ar]=Kt.def(JSON.stringify(si[ar]))}),wt.invoke=function(ar,Nt){switch(Nt.type){case ni:var Cr=["this",Jr.context,Jr.props,wt.batchId];return ar.def(Rt(Nt.data),".call(",Cr.slice(0,Math.max(Nt.data.length+1,4)),")");case Rn:return ar.def(Jr.props,Nt.data);case no:return ar.def(Jr.context,Nt.data);case wo:return ar.def("this",Nt.data);case Go:return Nt.data.append(wt,ar),Nt.data.ref;case bs:return Nt.data.toString();case Jo:return Nt.data.map(function(ta){return wt.invoke(ar,ta)})}},wt.attribCache={};var Yt={};return wt.scopeAttrib=function(ar){var Nt=Pt.id(ar);if(Nt in Yt)return Yt[Nt];var Cr=Ba.scope[Nt];Cr||(Cr=Ba.scope[Nt]=new Qr);var ta=Yt[Nt]=Rt(Cr);return ta},wt}function li(wt){var Rt=wt.static,Kt=wt.dynamic,Or;if(Ae in Rt){var Jr=!!Rt[Ae];Or=Bn(function(mr,or){return Jr}),Or.enable=Jr}else if(Ae in Kt){var br=Kt[Ae];Or=ri(br,function(mr,or){return mr.invoke(or,br)})}return Or}function ui(wt,Rt){var Kt=wt.static,Or=wt.dynamic;if(Ye in Kt){var Jr=Kt[Ye];return Jr?(Jr=_a.getFramebuffer(Jr),Bn(function(mr,or){var Yt=mr.link(Jr),ar=mr.shared;or.set(ar.framebuffer,".next",Yt);var Nt=ar.context;return or.set(Nt,"."+Xe,Yt+".width"),or.set(Nt,"."+st,Yt+".height"),Yt})):Bn(function(mr,or){var Yt=mr.shared;or.set(Yt.framebuffer,".next","null");var ar=Yt.context;return or.set(ar,"."+Xe,ar+"."+Ot),or.set(ar,"."+st,ar+"."+$t),"null"})}else if(Ye in Or){var br=Or[Ye];return ri(br,function(mr,or){var Yt=mr.invoke(or,br),ar=mr.shared,Nt=ar.framebuffer,Cr=or.def(Nt,".getFramebuffer(",Yt,")");or.set(Nt,".next",Cr);var ta=ar.context;return or.set(ta,"."+Xe,Cr+"?"+Cr+".width:"+ta+"."+Ot),or.set(ta,"."+st,Cr+"?"+Cr+".height:"+ta+"."+$t),Cr})}else return null}function Ri(wt,Rt,Kt){var Or=wt.static,Jr=wt.dynamic;function br(Yt){if(Yt in Or){var ar=Or[Yt],Nt=!0,Cr=ar.x|0,ta=ar.y|0,xa,Zn;return"width"in ar?xa=ar.width|0:Nt=!1,"height"in ar?Zn=ar.height|0:Nt=!1,new aa(!Nt&&Rt&&Rt.thisDep,!Nt&&Rt&&Rt.contextDep,!Nt&&Rt&&Rt.propDep,function(Xn,On){var Fn=Xn.shared.context,hn=xa;"width"in ar||(hn=On.def(Fn,".",Xe,"-",Cr));var Cn=Zn;return"height"in ar||(Cn=On.def(Fn,".",st,"-",ta)),[Cr,ta,hn,Cn]})}else if(Yt in Jr){var mn=Jr[Yt],dn=ri(mn,function(Xn,On){var Fn=Xn.invoke(On,mn),hn=Xn.shared.context,Cn=On.def(Fn,".x|0"),In=On.def(Fn,".y|0"),fi=On.def('"width" in ',Fn,"?",Fn,".width|0:","(",hn,".",Xe,"-",Cn,")"),Ko=On.def('"height" in ',Fn,"?",Fn,".height|0:","(",hn,".",st,"-",In,")");return[Cn,In,fi,Ko]});return Rt&&(dn.thisDep=dn.thisDep||Rt.thisDep,dn.contextDep=dn.contextDep||Rt.contextDep,dn.propDep=dn.propDep||Rt.propDep),dn}else return Rt?new aa(Rt.thisDep,Rt.contextDep,Rt.propDep,function(Xn,On){var Fn=Xn.shared.context;return[0,0,On.def(Fn,".",Xe),On.def(Fn,".",st)]}):null}var mr=br(de);if(mr){var or=mr;mr=new aa(mr.thisDep,mr.contextDep,mr.propDep,function(Yt,ar){var Nt=or.append(Yt,ar),Cr=Yt.shared.context;return ar.set(Cr,"."+Qe,Nt[2]),ar.set(Cr,"."+ht,Nt[3]),Nt})}return{viewport:mr,scissor_box:br(fe)}}function cs(wt,Rt){var Kt=wt.static,Or=typeof Kt[dt]=="string"&&typeof Kt[et]=="string";if(Or){if(Object.keys(Rt.dynamic).length>0)return null;var Jr=Rt.static,br=Object.keys(Jr);if(br.length>0&&typeof Jr[br[0]]=="number"){for(var mr=[],or=0;or"+Cn+"?"+Nt+".constant["+Cn+"]:0;"}).join(""),"}}else{","if(",xa,"(",Nt,".buffer)){",Xn,"=",Zn,".createStream(",pr,",",Nt,".buffer);","}else{",Xn,"=",Zn,".getBuffer(",Nt,".buffer);","}",On,'="type" in ',Nt,"?",ta.glTypes,"[",Nt,".type]:",Xn,".dtype;",mn.normalized,"=!!",Nt,".normalized;");function Fn(hn){ar(mn[hn],"=",Nt,".",hn,"|0;")}return Fn("size"),Fn("offset"),Fn("stride"),Fn("divisor"),ar("}}"),ar.exit("if(",mn.isStream,"){",Zn,".destroyStream(",Xn,");","}"),mn}Jr[br]=ri(mr,or)}),Jr}function Ns(wt){var Rt=wt.static,Kt=wt.dynamic,Or={};return Object.keys(Rt).forEach(function(Jr){var br=Rt[Jr];Or[Jr]=Bn(function(mr,or){return typeof br=="number"||typeof br=="boolean"?""+br:mr.link(br)})}),Object.keys(Kt).forEach(function(Jr){var br=Kt[Jr];Or[Jr]=ri(br,function(mr,or){return mr.invoke(or,br)})}),Or}function nl(wt,Rt,Kt,Or,Jr){var br=wt.static,mr=wt.dynamic,or=cs(wt,Rt),Yt=ui(wt,Jr),ar=Ri(wt,Yt,Jr),Nt=Wi(wt,Jr),Cr=Ml(wt,Jr),ta=Ls(wt,Jr,or);function xa(Fn){var hn=ar[Fn];hn&&(Cr[Fn]=hn)}xa(de),xa(Za(fe));var Zn=Object.keys(Cr).length>0,mn={framebuffer:Yt,draw:Nt,shader:ta,state:Cr,dirty:Zn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(mn.profile=li(wt,Jr),mn.uniforms=Fo(Kt,Jr),mn.drawVAO=mn.scopeVAO=Nt.vao,!mn.drawVAO&&ta.program&&!or&&Ft.angle_instanced_arrays&&Nt.static.elements){var dn=!0,Xn=ta.program.attributes.map(function(Fn){var hn=Rt.static[Fn];return dn=dn&&!!hn,hn});if(dn&&Xn.length>0){var On=Ba.getVAO(Ba.createVAO({attributes:Xn,elements:Nt.static.elements}));mn.drawVAO=new aa(null,null,null,function(Fn,hn){return Fn.link(On)}),mn.useVAO=!0}}return or?mn.useVAO=!0:mn.attributes=Js(Rt,Jr),mn.context=Ns(Or,Jr),mn}function As(wt,Rt,Kt){var Or=wt.shared,Jr=Or.context,br=wt.scope();Object.keys(Kt).forEach(function(mr){Rt.save(Jr,"."+mr);var or=Kt[mr],Yt=or.append(wt,Rt);Array.isArray(Yt)?br(Jr,".",mr,"=[",Yt.join(),"];"):br(Jr,".",mr,"=",Yt,";")}),Rt(br)}function Ms(wt,Rt,Kt,Or){var Jr=wt.shared,br=Jr.gl,mr=Jr.framebuffer,or;va&&(or=Rt.def(Jr.extensions,".webgl_draw_buffers"));var Yt=wt.constants,ar=Yt.drawBuffer,Nt=Yt.backBuffer,Cr;Kt?Cr=Kt.append(wt,Rt):Cr=Rt.def(mr,".next"),Or||Rt("if(",Cr,"!==",mr,".cur){"),Rt("if(",Cr,"){",br,".bindFramebuffer(",Nr,",",Cr,".framebuffer);"),va&&Rt(or,".drawBuffersWEBGL(",ar,"[",Cr,".colorAttachments.length]);"),Rt("}else{",br,".bindFramebuffer(",Nr,",null);"),va&&Rt(or,".drawBuffersWEBGL(",Nt,");"),Rt("}",mr,".cur=",Cr,";"),Or||Rt("}")}function Ps(wt,Rt,Kt){var Or=wt.shared,Jr=Or.gl,br=wt.current,mr=wt.next,or=Or.current,Yt=Or.next,ar=wt.cond(or,".dirty");ha.forEach(function(Nt){var Cr=Za(Nt);if(!(Cr in Kt.state)){var ta,xa;if(Cr in mr){ta=mr[Cr],xa=br[Cr];var Zn=m(Qa[Cr].length,function(dn){return ar.def(ta,"[",dn,"]")});ar(wt.cond(Zn.map(function(dn,Xn){return dn+"!=="+xa+"["+Xn+"]"}).join("||")).then(Jr,".",vn[Cr],"(",Zn,");",Zn.map(function(dn,Xn){return xa+"["+Xn+"]="+dn}).join(";"),";"))}else{ta=ar.def(Yt,".",Cr);var mn=wt.cond(ta,"!==",or,".",Cr);ar(mn),Cr in la?mn(wt.cond(ta).then(Jr,".enable(",la[Cr],");").else(Jr,".disable(",la[Cr],");"),or,".",Cr,"=",ta,";"):mn(Jr,".",vn[Cr],"(",ta,");",or,".",Cr,"=",ta,";")}}}),Object.keys(Kt.state).length===0&&ar(or,".dirty=false;"),Rt(ar)}function Ai(wt,Rt,Kt,Or){var Jr=wt.shared,br=wt.current,mr=Jr.current,or=Jr.gl,Yt;Ca(Object.keys(Kt)).forEach(function(ar){var Nt=Kt[ar];if(!(Or&&!Or(Nt))){var Cr=Nt.append(wt,Rt);if(la[ar]){var ta=la[ar];Sn(Nt)?(Yt=wt.link(Cr,{stable:!0}),Rt(wt.cond(Yt).then(or,".enable(",ta,");").else(or,".disable(",ta,");")),Rt(mr,".",ar,"=",Yt,";")):(Rt(wt.cond(Cr).then(or,".enable(",ta,");").else(or,".disable(",ta,");")),Rt(mr,".",ar,"=",Cr,";"))}else if(Fr(Cr)){var xa=br[ar];Rt(or,".",vn[ar],"(",Cr,");",Cr.map(function(Zn,mn){return xa+"["+mn+"]="+Zn}).join(";"),";")}else Sn(Nt)?(Yt=wt.link(Cr,{stable:!0}),Rt(or,".",vn[ar],"(",Yt,");",mr,".",ar,"=",Yt,";")):Rt(or,".",vn[ar],"(",Cr,");",mr,".",ar,"=",Cr,";")}})}function Os(wt,Rt){Fa&&(wt.instancing=Rt.def(wt.shared.extensions,".angle_instanced_arrays"))}function jo(wt,Rt,Kt,Or,Jr){var br=wt.shared,mr=wt.stats,or=br.current,Yt=br.timer,ar=Kt.profile;function Nt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Cr,ta;function xa(Fn){Cr=Rt.def(),Fn(Cr,"=",Nt(),";"),typeof Jr=="string"?Fn(mr,".count+=",Jr,";"):Fn(mr,".count++;"),nn&&(Or?(ta=Rt.def(),Fn(ta,"=",Yt,".getNumPendingQueries();")):Fn(Yt,".beginQuery(",mr,");"))}function Zn(Fn){Fn(mr,".cpuTime+=",Nt(),"-",Cr,";"),nn&&(Or?Fn(Yt,".pushScopeStats(",ta,",",Yt,".getNumPendingQueries(),",mr,");"):Fn(Yt,".endQuery();"))}function mn(Fn){var hn=Rt.def(or,".profile");Rt(or,".profile=",Fn,";"),Rt.exit(or,".profile=",hn,";")}var dn;if(ar){if(Sn(ar)){ar.enable?(xa(Rt),Zn(Rt.exit),mn("true")):mn("false");return}dn=ar.append(wt,Rt),mn(dn)}else dn=Rt.def(or,".profile");var Xn=wt.block();xa(Xn),Rt("if(",dn,"){",Xn,"}");var On=wt.block();Zn(On),Rt.exit("if(",dn,"){",On,"}")}function fl(wt,Rt,Kt,Or,Jr){var br=wt.shared;function mr(Yt){switch(Yt){case Lo:case Is:case zs:return 2;case bo:case Ys:case Il:return 3;case ds:case Ks:case _u:return 4;default:return 1}}function or(Yt,ar,Nt){var Cr=br.gl,ta=Rt.def(Yt,".location"),xa=Rt.def(br.attributes,"[",ta,"]"),Zn=Nt.state,mn=Nt.buffer,dn=[Nt.x,Nt.y,Nt.z,Nt.w],Xn=["buffer","normalized","offset","stride"];function On(){Rt("if(!",xa,".buffer){",Cr,".enableVertexAttribArray(",ta,");}");var hn=Nt.type,Cn;if(Nt.size?Cn=Rt.def(Nt.size,"||",ar):Cn=ar,Rt("if(",xa,".type!==",hn,"||",xa,".size!==",Cn,"||",Xn.map(function(fi){return xa+"."+fi+"!=="+Nt[fi]}).join("||"),"){",Cr,".bindBuffer(",pr,",",mn,".buffer);",Cr,".vertexAttribPointer(",[ta,Cn,hn,Nt.normalized,Nt.stride,Nt.offset],");",xa,".type=",hn,";",xa,".size=",Cn,";",Xn.map(function(fi){return xa+"."+fi+"="+Nt[fi]+";"}).join(""),"}"),Fa){var In=Nt.divisor;Rt("if(",xa,".divisor!==",In,"){",wt.instancing,".vertexAttribDivisorANGLE(",[ta,In],");",xa,".divisor=",In,";}")}}function Fn(){Rt("if(",xa,".buffer){",Cr,".disableVertexAttribArray(",ta,");",xa,".buffer=null;","}if(",Ei.map(function(hn,Cn){return xa+"."+hn+"!=="+dn[Cn]}).join("||"),"){",Cr,".vertexAttrib4f(",ta,",",dn,");",Ei.map(function(hn,Cn){return xa+"."+hn+"="+dn[Cn]+";"}).join(""),"}")}Zn===ki?On():Zn===Vi?Fn():(Rt("if(",Zn,"===",ki,"){"),On(),Rt("}else{"),Fn(),Rt("}"))}Or.forEach(function(Yt){var ar=Yt.name,Nt=Kt.attributes[ar],Cr;if(Nt){if(!Jr(Nt))return;Cr=Nt.append(wt,Rt)}else{if(!Jr(xi))return;var ta=wt.scopeAttrib(ar);Cr={},Object.keys(new Qr).forEach(function(xa){Cr[xa]=Rt.def(ta,".",xa)})}or(wt.link(Yt),mr(Yt.info.type),Cr)})}function hl(wt,Rt,Kt,Or,Jr,br){for(var mr=wt.shared,or=mr.gl,Yt,ar=0;ar1){for(var dl=[],Cu=[],pc=0;pc>1)",mn],");")}function In(){Kt(dn,".drawArraysInstancedANGLE(",[ta,xa,Zn,mn],");")}Nt&&Nt!=="null"?On?Cn():(Kt("if(",Nt,"){"),Cn(),Kt("}else{"),In(),Kt("}")):In()}function hn(){function Cn(){Kt(br+".drawElements("+[ta,Zn,Xn,xa+"<<(("+Xn+"-"+Ii+")>>1)"]+");")}function In(){Kt(br+".drawArrays("+[ta,xa,Zn]+");")}Nt&&Nt!=="null"?On?Cn():(Kt("if(",Nt,"){"),Cn(),Kt("}else{"),In(),Kt("}")):In()}Fa&&(typeof mn!="number"||mn>=0)?typeof mn=="string"?(Kt("if(",mn,">0){"),Fn(),Kt("}else if(",mn,"<0){"),hn(),Kt("}")):Fn():hn()}function di(wt,Rt,Kt,Or,Jr){var br=xn(),mr=br.proc("body",Jr);return Fa&&(br.instancing=mr.def(br.shared.extensions,".angle_instanced_arrays")),wt(br,mr,Kt,Or),br.compile().body}function eo(wt,Rt,Kt,Or){Os(wt,Rt),Kt.useVAO?Kt.drawVAO?Rt(wt.shared.vao,".setVAO(",Kt.drawVAO.append(wt,Rt),");"):Rt(wt.shared.vao,".setVAO(",wt.shared.vao,".targetVAO);"):(Rt(wt.shared.vao,".setVAO(null);"),fl(wt,Rt,Kt,Or.attributes,function(){return!0})),hl(wt,Rt,Kt,Or.uniforms,function(){return!0},!1),Sl(wt,Rt,Rt,Kt)}function lo(wt,Rt){var Kt=wt.proc("draw",1);Os(wt,Kt),As(wt,Kt,Rt.context),Ms(wt,Kt,Rt.framebuffer),Ps(wt,Kt,Rt),Ai(wt,Kt,Rt.state),jo(wt,Kt,Rt,!1,!0);var Or=Rt.shader.progVar.append(wt,Kt);if(Kt(wt.shared.gl,".useProgram(",Or,".program);"),Rt.shader.program)eo(wt,Kt,Rt,Rt.shader.program);else{Kt(wt.shared.vao,".setVAO(null);");var Jr=wt.global.def("{}"),br=Kt.def(Or,".id"),mr=Kt.def(Jr,"[",br,"]");Kt(wt.cond(mr).then(mr,".call(this,a0);").else(mr,"=",Jr,"[",br,"]=",wt.link(function(or){return di(eo,wt,Rt,or,1)}),"(",Or,");",mr,".call(this,a0);"))}Object.keys(Rt.state).length>0&&Kt(wt.shared.current,".dirty=true;"),wt.shared.vao&&Kt(wt.shared.vao,".setVAO(null);")}function Lt(wt,Rt,Kt,Or){wt.batchId="a1",Os(wt,Rt);function Jr(){return!0}fl(wt,Rt,Kt,Or.attributes,Jr),hl(wt,Rt,Kt,Or.uniforms,Jr,!1),Sl(wt,Rt,Rt,Kt)}function Vr(wt,Rt,Kt,Or){Os(wt,Rt);var Jr=Kt.contextDep,br=Rt.def(),mr="a0",or="a1",Yt=Rt.def();wt.shared.props=Yt,wt.batchId=br;var ar=wt.scope(),Nt=wt.scope();Rt(ar.entry,"for(",br,"=0;",br,"<",or,";++",br,"){",Yt,"=",mr,"[",br,"];",Nt,"}",ar.exit);function Cr(Xn){return Xn.contextDep&&Jr||Xn.propDep}function ta(Xn){return!Cr(Xn)}if(Kt.needsContext&&As(wt,Nt,Kt.context),Kt.needsFramebuffer&&Ms(wt,Nt,Kt.framebuffer),Ai(wt,Nt,Kt.state,Cr),Kt.profile&&Cr(Kt.profile)&&jo(wt,Nt,Kt,!1,!0),Or)Kt.useVAO?Kt.drawVAO?Cr(Kt.drawVAO)?Nt(wt.shared.vao,".setVAO(",Kt.drawVAO.append(wt,Nt),");"):ar(wt.shared.vao,".setVAO(",Kt.drawVAO.append(wt,ar),");"):ar(wt.shared.vao,".setVAO(",wt.shared.vao,".targetVAO);"):(ar(wt.shared.vao,".setVAO(null);"),fl(wt,ar,Kt,Or.attributes,ta),fl(wt,Nt,Kt,Or.attributes,Cr)),hl(wt,ar,Kt,Or.uniforms,ta,!1),hl(wt,Nt,Kt,Or.uniforms,Cr,!0),Sl(wt,ar,Nt,Kt);else{var xa=wt.global.def("{}"),Zn=Kt.shader.progVar.append(wt,Nt),mn=Nt.def(Zn,".id"),dn=Nt.def(xa,"[",mn,"]");Nt(wt.shared.gl,".useProgram(",Zn,".program);","if(!",dn,"){",dn,"=",xa,"[",mn,"]=",wt.link(function(Xn){return di(Lt,wt,Kt,Xn,2)}),"(",Zn,");}",dn,".call(this,a0[",br,"],",br,");")}}function Gr(wt,Rt){var Kt=wt.proc("batch",2);wt.batchId="0",Os(wt,Kt);var Or=!1,Jr=!0;Object.keys(Rt.context).forEach(function(xa){Or=Or||Rt.context[xa].propDep}),Or||(As(wt,Kt,Rt.context),Jr=!1);var br=Rt.framebuffer,mr=!1;br?(br.propDep?Or=mr=!0:br.contextDep&&Or&&(mr=!0),mr||Ms(wt,Kt,br)):Ms(wt,Kt,null),Rt.state.viewport&&Rt.state.viewport.propDep&&(Or=!0);function or(xa){return xa.contextDep&&Or||xa.propDep}Ps(wt,Kt,Rt),Ai(wt,Kt,Rt.state,function(xa){return!or(xa)}),(!Rt.profile||!or(Rt.profile))&&jo(wt,Kt,Rt,!1,"a1"),Rt.contextDep=Or,Rt.needsContext=Jr,Rt.needsFramebuffer=mr;var Yt=Rt.shader.progVar;if(Yt.contextDep&&Or||Yt.propDep)Vr(wt,Kt,Rt,null);else{var ar=Yt.append(wt,Kt);if(Kt(wt.shared.gl,".useProgram(",ar,".program);"),Rt.shader.program)Vr(wt,Kt,Rt,Rt.shader.program);else{Kt(wt.shared.vao,".setVAO(null);");var Nt=wt.global.def("{}"),Cr=Kt.def(ar,".id"),ta=Kt.def(Nt,"[",Cr,"]");Kt(wt.cond(ta).then(ta,".call(this,a0,a1);").else(ta,"=",Nt,"[",Cr,"]=",wt.link(function(xa){return di(Vr,wt,Rt,xa,2)}),"(",ar,");",ta,".call(this,a0,a1);"))}}Object.keys(Rt.state).length>0&&Kt(wt.shared.current,".dirty=true;"),wt.shared.vao&&Kt(wt.shared.vao,".setVAO(null);")}function En(wt,Rt){var Kt=wt.proc("scope",3);wt.batchId="a2";var Or=wt.shared,Jr=Or.current;if(As(wt,Kt,Rt.context),Rt.framebuffer&&Rt.framebuffer.append(wt,Kt),Ca(Object.keys(Rt.state)).forEach(function(or){var Yt=Rt.state[or],ar=Yt.append(wt,Kt);Fr(ar)?ar.forEach(function(Nt,Cr){pn(Nt)?Kt.set(wt.next[or],"["+Cr+"]",Nt):Kt.set(wt.next[or],"["+Cr+"]",wt.link(Nt,{stable:!0}))}):Sn(Yt)?Kt.set(Or.next,"."+or,wt.link(ar,{stable:!0})):Kt.set(Or.next,"."+or,ar)}),jo(wt,Kt,Rt,!0,!0),[St,fr,Wt,Ar,Ht].forEach(function(or){var Yt=Rt.draw[or];if(Yt){var ar=Yt.append(wt,Kt);pn(ar)?Kt.set(Or.draw,"."+or,ar):Kt.set(Or.draw,"."+or,wt.link(ar),{stable:!0})}}),Object.keys(Rt.uniforms).forEach(function(or){var Yt=Rt.uniforms[or].append(wt,Kt);Array.isArray(Yt)&&(Yt="["+Yt.map(function(ar){return pn(ar)?ar:wt.link(ar,{stable:!0})})+"]"),Kt.set(Or.uniforms,"["+wt.link(Pt.id(or),{stable:!0})+"]",Yt)}),Object.keys(Rt.attributes).forEach(function(or){var Yt=Rt.attributes[or].append(wt,Kt),ar=wt.scopeAttrib(or);Object.keys(new Qr).forEach(function(Nt){Kt.set(ar,"."+Nt,Yt[Nt])})}),Rt.scopeVAO){var br=Rt.scopeVAO.append(wt,Kt);pn(br)?Kt.set(Or.vao,".targetVAO",br):Kt.set(Or.vao,".targetVAO",wt.link(br,{stable:!0}))}function mr(or){var Yt=Rt.shader[or];if(Yt){var ar=Yt.append(wt,Kt);pn(ar)?Kt.set(Or.shader,"."+or,ar):Kt.set(Or.shader,"."+or,wt.link(ar,{stable:!0}))}}mr(et),mr(dt),Object.keys(Rt.state).length>0&&(Kt(Jr,".dirty=true;"),Kt.exit(Jr,".dirty=true;")),Kt("a1(",wt.shared.context,",a0,",wt.batchId,");")}function Hi(wt){if(!(typeof wt!="object"||Fr(wt))){for(var Rt=Object.keys(wt),Kt=0;Kt=0;--di){var eo=Yn[di];eo&&eo(ua,null,0)}Ft.flush(),Ua&&Ua.update()}function Ri(){!li&&Yn.length>0&&(li=p.next(ui))}function cs(){li&&(p.cancel(ui),li=null)}function Ls(di){di.preventDefault(),Xr=!0,cs(),si.forEach(function(eo){eo()})}function Wi(di){Ft.getError(),Xr=!1,Kr.restore(),Hn.restore(),Fa.restore(),ha.restore(),la.restore(),vn.restore(),on.restore(),Ua&&Ua.restore(),Za.procs.refresh(),Ri(),Ya.forEach(function(eo){eo()})}pn&&(pn.addEventListener(Oo,Ls,!1),pn.addEventListener(gs,Wi,!1));function Ml(){Yn.length=0,cs(),pn&&(pn.removeEventListener(Oo,Ls),pn.removeEventListener(gs,Wi)),Hn.clear(),vn.clear(),la.clear(),on.clear(),ha.clear(),va.clear(),Fa.clear(),Ua&&Ua.clear(),xn.forEach(function(di){di()})}function Fo(di){function eo(br){var mr=u({},br);delete mr.uniforms,delete mr.attributes,delete mr.context,delete mr.vao,"stencil"in mr&&mr.stencil.op&&(mr.stencil.opBack=mr.stencil.opFront=mr.stencil.op,delete mr.stencil.op);function or(Yt){if(Yt in mr){var ar=mr[Yt];delete mr[Yt],Object.keys(ar).forEach(function(Nt){mr[Yt+"."+Nt]=ar[Nt]})}}return or("blend"),or("depth"),or("cull"),or("stencil"),or("polygonOffset"),or("scissor"),or("sample"),"vao"in br&&(mr.vao=br.vao),mr}function lo(br,mr){var or={},Yt={};return Object.keys(br).forEach(function(ar){var Nt=br[ar];if(c.isDynamic(Nt)){Yt[ar]=c.unbox(Nt,ar);return}else if(mr&&Array.isArray(Nt)){for(var Cr=0;Cr0)return wt.call(this,Or(br|0),br|0)}else if(Array.isArray(br)){if(br.length)return wt.call(this,br,br.length)}else return kn.call(this,br)}return u(Jr,{stats:Hi,destroy:function(){zo.destroy()}})}var Js=vn.setFBO=Fo({framebuffer:c.define.call(null,Bs,"framebuffer")});function Ns(di,eo){var lo=0;Za.procs.poll();var Lt=eo.color;Lt&&(Ft.clearColor(+Lt[0]||0,+Lt[1]||0,+Lt[2]||0,+Lt[3]||0),lo|=al),"depth"in eo&&(Ft.clearDepth(+eo.depth),lo|=Ds),"stencil"in eo&&(Ft.clearStencil(eo.stencil|0),lo|=gi),Ft.clear(lo)}function nl(di){if("framebuffer"in di)if(di.framebuffer&&di.framebuffer_reglType==="framebufferCube")for(var eo=0;eo<6;++eo)Js(u({framebuffer:di.framebuffer.faces[eo]},di),Ns);else Js(di,Ns);else Ns(null,di)}function As(di){Yn.push(di);function eo(){var lo=xu(Yn,di);function Lt(){var Vr=xu(Yn,Lt);Yn[Vr]=Yn[Yn.length-1],Yn.length-=1,Yn.length<=0&&cs()}Yn[lo]=Lt}return Ri(),{cancel:eo}}function Ms(){var di=Ha.viewport,eo=Ha.scissor_box;di[0]=di[1]=eo[0]=eo[1]=0,ua.viewportWidth=ua.framebufferWidth=ua.drawingBufferWidth=di[2]=eo[2]=Ft.drawingBufferWidth,ua.viewportHeight=ua.framebufferHeight=ua.drawingBufferHeight=di[3]=eo[3]=Ft.drawingBufferHeight}function Ps(){ua.tick+=1,ua.time=Os(),Ms(),Za.procs.poll()}function Ai(){ha.refresh(),Ms(),Za.procs.refresh(),Ua&&Ua.update()}function Os(){return(f()-Wn)/1e3}Ai();function jo(di,eo){var lo;switch(di){case"frame":return As(eo);case"lost":lo=si;break;case"restore":lo=Ya;break;case"destroy":lo=xn;break;default:}return lo.push(eo),{cancel:function(){for(var Lt=0;Lt=0},read:qa,destroy:Ml,_gl:Ft,_refresh:Ai,poll:function(){Ps(),Ua&&Ua.update()},now:Os,stats:_a,getCachedCode:fl,preloadCachedCode:hl});return Pt.onDone(null,Sl),Sl}return ic})}}),C8=xe({"node_modules/gl-util/context.js"(U,O){"use strict";var u=Yh();O.exports=function(a){if(a?typeof a=="string"&&(a={container:a}):a={},w(a)?a={container:a}:S(a)?a={container:a}:l(a)?a={gl:a}:a=u(a,{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),a.pixelRatio||(a.pixelRatio=window.pixelRatio||1),a.gl)return a.gl;if(a.canvas&&(a.container=a.canvas.parentNode),a.container){if(typeof a.container=="string"){var r=document.querySelector(a.container);if(!r)throw Error("Element "+a.container+" is not found");a.container=r}w(a.container)?(a.canvas=a.container,a.container=a.canvas.parentNode):a.canvas||(a.canvas=e(),a.container.appendChild(a.canvas),v(a))}else if(!a.canvas)if(typeof document<"u")a.container=document.body||document.documentElement,a.canvas=e(),a.container.appendChild(a.canvas),v(a);else throw Error("Not DOM environment. Use headless-gl.");return a.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{a.gl=a.canvas.getContext(n,a.attrs)}catch{}return a.gl}),a.gl};function v(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var a=t.container.getBoundingClientRect();t.canvas.width=t.width||a.right-a.left,t.canvas.height=t.height||a.bottom-a.top}}function w(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function S(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),L8=xe({"node_modules/font-atlas/index.js"(U,O){"use strict";var u=I3(),v=[32,126];O.exports=w;function w(S){S=S||{};var l=S.shape?S.shape:S.canvas?[S.canvas.width,S.canvas.height]:[512,512],e=S.canvas||document.createElement("canvas"),t=S.font,a=typeof S.step=="number"?[S.step,S.step]:S.step||[32,32],r=S.chars||v;if(t&&typeof t!="string"&&(t=u(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var n=[],i=r[0],s=0;i<=r[1];i++)n[s++]=String.fromCharCode(i);r=n}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var p=a[0]/2,f=a[1]/2,i=0;il[0]-a[0]/2&&(p=a[0]/2,f+=a[1]);return e}}}),D3=xe({"node_modules/bit-twiddle/twiddle.js"(U){"use strict";"use restrict";var O=32;U.INT_BITS=O,U.INT_MAX=2147483647,U.INT_MIN=-1<0)-(w<0)},U.abs=function(w){var S=w>>O-1;return(w^S)-S},U.min=function(w,S){return S^(w^S)&-(w65535)<<4,w>>>=S,l=(w>255)<<3,w>>>=l,S|=l,l=(w>15)<<2,w>>>=l,S|=l,l=(w>3)<<1,w>>>=l,S|=l,S|w>>1},U.log10=function(w){return w>=1e9?9:w>=1e8?8:w>=1e7?7:w>=1e6?6:w>=1e5?5:w>=1e4?4:w>=1e3?3:w>=100?2:w>=10?1:0},U.popCount=function(w){return w=w-(w>>>1&1431655765),w=(w&858993459)+(w>>>2&858993459),(w+(w>>>4)&252645135)*16843009>>>24};function u(w){var S=32;return w&=-w,w&&S--,w&65535&&(S-=16),w&16711935&&(S-=8),w&252645135&&(S-=4),w&858993459&&(S-=2),w&1431655765&&(S-=1),S}U.countTrailingZeros=u,U.nextPow2=function(w){return w+=w===0,--w,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w+1},U.prevPow2=function(w){return w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w-(w>>>1)},U.parity=function(w){return w^=w>>>16,w^=w>>>8,w^=w>>>4,w&=15,27030>>>w&1};var v=new Array(256);(function(w){for(var S=0;S<256;++S){var l=S,e=S,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;w[S]=e<>>8&255]<<16|v[w>>>16&255]<<8|v[w>>>24&255]},U.interleave2=function(w,S){return w&=65535,w=(w|w<<8)&16711935,w=(w|w<<4)&252645135,w=(w|w<<2)&858993459,w=(w|w<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,w|S<<1},U.deinterleave2=function(w,S){return w=w>>>S&1431655765,w=(w|w>>>1)&858993459,w=(w|w>>>2)&252645135,w=(w|w>>>4)&16711935,w=(w|w>>>16)&65535,w<<16>>16},U.interleave3=function(w,S,l){return w&=1023,w=(w|w<<16)&4278190335,w=(w|w<<8)&251719695,w=(w|w<<4)&3272356035,w=(w|w<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,w|=S<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,w|l<<2},U.deinterleave3=function(w,S){return w=w>>>S&1227133513,w=(w|w>>>2)&3272356035,w=(w|w>>>4)&251719695,w=(w|w>>>8)&4278190335,w=(w|w>>>16)&1023,w<<22>>22},U.nextCombination=function(w){var S=w|w-1;return S+1|(~S&-~S)-1>>>u(w)+1}}}),P8=xe({"node_modules/dup/dup.js"(U,O){"use strict";function u(S,l,e){var t=S[e]|0;if(t<=0)return[];var a=new Array(t),r;if(e===S.length-1)for(r=0;r"u"&&(l=0),typeof S){case"number":if(S>0)return v(S|0,l);break;case"object":if(typeof S.length=="number")return u(S,l,0);break}return[]}O.exports=w}}),I8=xe({"node_modules/typedarray-pool/pool.js"(U){"use strict";var O=D3(),u=P8(),v=Mv().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:u([32,0]),UINT16:u([32,0]),UINT32:u([32,0]),BIGUINT64:u([32,0]),INT8:u([32,0]),INT16:u([32,0]),INT32:u([32,0]),BIGINT64:u([32,0]),FLOAT:u([32,0]),DOUBLE:u([32,0]),DATA:u([32,0]),UINT8C:u([32,0]),BUFFER:u([32,0])});var w=typeof Uint8ClampedArray<"u",S=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=u([32,0])),e.BIGUINT64||(e.BIGUINT64=u([32,0])),e.BIGINT64||(e.BIGINT64=u([32,0])),e.BUFFER||(e.BUFFER=u([32,0]));var t=e.DATA,a=e.BUFFER;U.free=function(h){if(v.isBuffer(h))a[O.log2(h.length)].push(h);else{if(Object.prototype.toString.call(h)!=="[object ArrayBuffer]"&&(h=h.buffer),!h)return;var x=h.length||h.byteLength,_=O.log2(x)|0;t[_].push(h)}};function r(m){if(m){var h=m.length||m.byteLength,x=O.log2(h);t[x].push(m)}}function n(m){r(m.buffer)}U.freeUint8=U.freeUint16=U.freeUint32=U.freeBigUint64=U.freeInt8=U.freeInt16=U.freeInt32=U.freeBigInt64=U.freeFloat32=U.freeFloat=U.freeFloat64=U.freeDouble=U.freeUint8Clamped=U.freeDataView=n,U.freeArrayBuffer=r,U.freeBuffer=function(h){a[O.log2(h.length)].push(h)},U.malloc=function(h,x){if(x===void 0||x==="arraybuffer")return i(h);switch(x){case"uint8":return s(h);case"uint16":return c(h);case"uint32":return p(h);case"int8":return f(h);case"int16":return d(h);case"int32":return y(h);case"float":case"float32":return o(h);case"double":case"float64":return b(h);case"uint8_clamped":return M(h);case"bigint64":return E(h);case"biguint64":return A(h);case"buffer":return T(h);case"data":case"dataview":return g(h);default:return null}return null};function i(h){var h=O.nextPow2(h),x=O.log2(h),_=t[x];return _.length>0?_.pop():new ArrayBuffer(h)}U.mallocArrayBuffer=i;function s(m){return new Uint8Array(i(m),0,m)}U.mallocUint8=s;function c(m){return new Uint16Array(i(2*m),0,m)}U.mallocUint16=c;function p(m){return new Uint32Array(i(4*m),0,m)}U.mallocUint32=p;function f(m){return new Int8Array(i(m),0,m)}U.mallocInt8=f;function d(m){return new Int16Array(i(2*m),0,m)}U.mallocInt16=d;function y(m){return new Int32Array(i(4*m),0,m)}U.mallocInt32=y;function o(m){return new Float32Array(i(4*m),0,m)}U.mallocFloat32=U.mallocFloat=o;function b(m){return new Float64Array(i(8*m),0,m)}U.mallocFloat64=U.mallocDouble=b;function M(m){return w?new Uint8ClampedArray(i(m),0,m):s(m)}U.mallocUint8Clamped=M;function A(m){return S?new BigUint64Array(i(8*m),0,m):null}U.mallocBigUint64=A;function E(m){return l?new BigInt64Array(i(8*m),0,m):null}U.mallocBigInt64=E;function g(m){return new DataView(i(m),0,m)}U.mallocDataView=g;function T(m){m=O.nextPow2(m);var h=O.log2(m),x=a[h];return x.length>0?x.pop():new v(m)}U.mallocBuffer=T,U.clearCache=function(){for(var h=0;h<32;++h)e.UINT8[h].length=0,e.UINT16[h].length=0,e.UINT32[h].length=0,e.INT8[h].length=0,e.INT16[h].length=0,e.INT32[h].length=0,e.FLOAT[h].length=0,e.DOUBLE[h].length=0,e.BIGUINT64[h].length=0,e.BIGINT64[h].length=0,e.UINT8C[h].length=0,t[h].length=0,a[h].length=0}}}),D8=xe({"node_modules/is-plain-obj/index.js"(U,O){"use strict";var u=Object.prototype.toString;O.exports=function(v){var w;return u.call(v)==="[object Object]"&&(w=Object.getPrototypeOf(v),w===null||w===Object.getPrototypeOf({}))}}}),R3=xe({"node_modules/parse-unit/index.js"(U,O){O.exports=function(v,w){w||(w=[0,""]),v=String(v);var S=parseFloat(v,10);return w[0]=S,w[1]=v.match(/[\d.\-\+]*\s*(.*)/)[1]||"",w}}}),R8=xe({"node_modules/to-px/topx.js"(U,O){"use strict";var u=R3();O.exports=l;var v=96;function w(e,t){var a=u(getComputedStyle(e).getPropertyValue(t));return a[0]*l(a[1],e)}function S(e,t){var a=document.createElement("div");a.style["font-size"]="128"+e,t.appendChild(a);var r=w(a,"font-size")/128;return t.removeChild(a),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return S(e,t);case"em":return w(t,"font-size");case"rem":return w(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return v;case"cm":return v/2.54;case"mm":return v/25.4;case"pt":return v/72;case"pc":return v/6}return 1}}}),F8=xe({"node_modules/detect-kerning/index.js"(U,O){"use strict";O.exports=S;var u=S.canvas=document.createElement("canvas"),v=u.getContext("2d"),w=l([32,126]);S.createPairs=l,S.ascii=w;function S(e,t){Array.isArray(e)&&(e=e.join(", "));var a={},r,n=16,i=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(n=t.fontSize),t.threshold!=null&&(i=t.threshold))),r||(r=w),v.font=n+"px "+e;for(var s=0;sn*i){var d=(f-p)/n;a[c]=d*1e3}}return a}function l(e){for(var t=[],a=e[0];a<=e[1];a++)for(var r=String.fromCharCode(a),n=e[0];n0;a-=4)if(t[a]!==0)return Math.floor((a-3)*.25/e)}}}),B8=xe({"node_modules/gl-text/dist.js"(U,O){"use strict";var u=E8(),v=Yh(),w=k8(),S=C8(),l=A3(),e=Xd(),t=L8(),a=I8(),r=Dp(),n=D8(),i=R3(),s=R8(),c=F8(),p=cc(),f=z8(),d=Ov(),y=D3(),o=y.nextPow2,b=new l,M=!1;document.body&&(A=document.body.appendChild(document.createElement("div")),A.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(A).fontStretch&&(M=!0),document.body.removeChild(A));var A,E=function(m){g(m)?(m={regl:m},this.gl=m.regl._gl):this.gl=S(m),this.shader=b.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=m.regl||w({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),b.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(n(m)?m:{})};E.prototype.createShader=function(){var m=this.regl,h=m({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:m.prop("count"),offset:m.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:m.this("sizeBuffer")},width:{offset:0,stride:8,buffer:m.this("sizeBuffer")},char:m.this("charBuffer"),position:m.this("position")},uniforms:{atlasSize:function(_,D){return[D.atlas.width,D.atlas.height]},atlasDim:function(_,D){return[D.atlas.cols,D.atlas.rows]},atlas:function(_,D){return D.atlas.texture},charStep:function(_,D){return D.atlas.step},em:function(_,D){return D.atlas.em},color:m.prop("color"),opacity:m.prop("opacity"),viewport:m.this("viewportArray"),scale:m.this("scale"),align:m.prop("align"),baseline:m.prop("baseline"),translate:m.this("translate"),positionOffset:m.prop("positionOffset")},primitive:"points",viewport:m.this("viewport"),vert:` +`),Sn;if(Rt&&(Sn=Hf(vn),Rt[Sn]))return Rt[Sn].apply(null,vr);var Tn=Function.apply(null,or.concat(vn));return Rt&&(Rt[Sn]=Tn),Tn.apply(null,vr)}return{global:cn,link:dr,block:mr,proc:Dn,scope:qr,cond:Lr,compile:qn}}var Bi="xyzw".split(""),Ni=5121,Zi=1,_i=2,Va=0,Ga=1,oo=2,go=3,Vo=4,Wo=5,Yo=6,as="dither",Bo="blend.enable",Ks="blend.color",Rs="blend.equation",ps="blend.func",vi="depth.enable",Xo="depth.func",Ss="depth.range",Ws="depth.mask",Dl="colorMask",Nl="cull.enable",Kl="cull.face",Fu="frontFace",Al="lineWidth",zu="polygonOffset.enable",bu="polygonOffset.offset",ic="sample.alpha",Oc="sample.enable",Zu="sample.coverage",hu="stencil.enable",Jl="stencil.mask",Ql="stencil.func",xu="stencil.opFront",rf="stencil.opBack",Ff="scissor.enable",xc="scissor.box",rl="viewport",Ol="profile",Bu="framebuffer",nf="vert",jc="frag",wu="elements",jl="primitive",Ul="count",Ci="offset",eu="instances",Xe="vao",rt="Width",pt="Height",_t=Bu+rt,Nt=Bu+pt,Bt=rl+rt,Yt=rl+pt,Dr="drawingBuffer",Ur=Dr+rt,kr=Dr+pt,Wr=[ps,Rs,Ql,xu,rf,Zu,rl,xc,bu],sn=34962,gn=34963,Cn=2884,Zn=3042,ya=3024,Na=2960,wi=2929,Yi=3089,Ti=32823,_o=32926,bo=32928,Zo=5126,fs=35664,Po=35665,Es=35666,cl=5124,ql=35667,Js=35668,Tu=35669,Li=35670,Vi=35671,fl=35672,Ku=35673,tu=35674,Bs=35675,oc=35676,du=35678,hl=35680,Uc=4,he=1028,Se=1029,je=2304,Qe=2305,tt=32775,ut=32776,jt=519,St=7680,Qt=0,gr=1,yr=32774,Kr=513,$r=36160,bn=36064,Rn={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},rn={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},pn={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},xn={cw:je,ccw:Qe};function Bn(it){return Array.isArray(it)||Zt(it)||sr(it)}function Fn(it){return it.sort(function(Rt,qt){return Rt===rl?-1:qt===rl?1:Rt=1,or>=2,Rt)}else if(qt===Vo){var vr=it.data;return new mn(vr.thisDep,vr.contextDep,vr.propDep,Rt)}else{if(qt===Wo)return new mn(!1,!1,!1,Rt);if(qt===Yo){for(var Ar=!1,dr=!1,mr=!1,qr=0;qr=1&&(dr=!0),cn>=2&&(mr=!0)}else Lr.type===Vo&&(Ar=Ar||Lr.data.thisDep,dr=dr||Lr.data.contextDep,mr=mr||Lr.data.propDep)}return new mn(Ar,dr,mr,Rt)}else return new mn(qt===go,qt===oo,qt===Ga,Rt)}}var di=new mn(!1,!1,!1,function(){});function Oi(it,Rt,qt,or,vr,Ar,dr,mr,qr,Lr,cn,Nn,Dn,qn,_n,vn){var Sn=Lr.Record,Tn={add:32774,subtract:32778,"reverse subtract":32779};qt.ext_blend_minmax&&(Tn.min=tt,Tn.max=ut);var Xn=qt.angle_instanced_arrays,$n=qt.webgl_draw_buffers,Ha=qt.oes_vertex_array_object,$a={dirty:!0,profile:vn.profile},Si={},Ma=[],xa={},gi={};function Wa(en){return en.replace(".","_")}function Ya(en,dn,An){var sa=Wa(en);Ma.push(en),Si[sa]=$a[sa]=!!An,xa[sa]=dn}function Xa(en,dn,An){var sa=Wa(en);Ma.push(en),Array.isArray(An)?($a[sa]=An.slice(),Si[sa]=An.slice()):$a[sa]=Si[sa]=An,gi[sa]=dn}function pi(en){return!!isNaN(en)}Ya(as,ya),Ya(Bo,Zn),Xa(Ks,"blendColor",[0,0,0,0]),Xa(Rs,"blendEquationSeparate",[yr,yr]),Xa(ps,"blendFuncSeparate",[gr,Qt,gr,Qt]),Ya(vi,wi,!0),Xa(Xo,"depthFunc",Kr),Xa(Ss,"depthRange",[0,1]),Xa(Ws,"depthMask",!0),Xa(Dl,Dl,[!0,!0,!0,!0]),Ya(Nl,Cn),Xa(Kl,"cullFace",Se),Xa(Fu,Fu,Qe),Xa(Al,Al,1),Ya(zu,Ti),Xa(bu,"polygonOffset",[0,0]),Ya(ic,_o),Ya(Oc,bo),Xa(Zu,"sampleCoverage",[1,!1]),Ya(hu,Na),Xa(Jl,"stencilMask",-1),Xa(Ql,"stencilFunc",[jt,0,-1]),Xa(xu,"stencilOpSeparate",[he,St,St,St]),Xa(rf,"stencilOpSeparate",[Se,St,St,St]),Ya(Ff,Yi),Xa(xc,"scissor",[0,0,it.drawingBufferWidth,it.drawingBufferHeight]),Xa(rl,rl,[0,0,it.drawingBufferWidth,it.drawingBufferHeight]);var Xi={gl:it,context:Dn,strings:Rt,next:Si,current:$a,draw:Nn,elements:Ar,buffer:vr,shader:cn,attributes:Lr.state,vao:Lr,uniforms:qr,framebuffer:mr,extensions:qt,timer:qn,isBufferArgs:Bn},Eo={primTypes:pa,compareFuncs:rn,blendFuncs:Rn,blendEquations:Tn,stencilOps:pn,glTypes:on,orientationType:xn};$n&&(Eo.backBuffer=[Se],Eo.drawBuffer=f(or.maxDrawbuffers,function(en){return en===0?[0]:f(en,function(dn){return bn+dn})}));var yi=0;function Ui(){var en=qa({cache:_n}),dn=en.link,An=en.global;en.id=yi++,en.batchId="0";var sa=dn(Xi),wa=en.shared={props:"a0"};Object.keys(Xi).forEach(function(wt){wa[wt]=An.def(sa,".",wt)});var Le=en.next={},Oe=en.current={};Object.keys(gi).forEach(function(wt){Array.isArray($a[wt])&&(Le[wt]=An.def(wa.next,".",wt),Oe[wt]=An.def(wa.current,".",wt))});var Ke=en.constants={};Object.keys(Eo).forEach(function(wt){Ke[wt]=An.def(JSON.stringify(Eo[wt]))}),en.invoke=function(wt,Pt){switch(Pt.type){case Va:var pr=["this",wa.context,wa.props,en.batchId];return wt.def(dn(Pt.data),".call(",pr.slice(0,Math.max(Pt.data.length+1,4)),")");case Ga:return wt.def(wa.props,Pt.data);case oo:return wt.def(wa.context,Pt.data);case go:return wt.def("this",Pt.data);case Vo:return Pt.data.append(en,wt),Pt.data.ref;case Wo:return Pt.data.toString();case Yo:return Pt.data.map(function(Zr){return en.invoke(wt,Zr)})}},en.attribCache={};var yt={};return en.scopeAttrib=function(wt){var Pt=Rt.id(wt);if(Pt in yt)return yt[Pt];var pr=Lr.scope[Pt];pr||(pr=Lr.scope[Pt]=new Sn);var Zr=yt[Pt]=dn(pr);return Zr},en}function fo(en){var dn=en.static,An=en.dynamic,sa;if(Ol in dn){var wa=!!dn[Ol];sa=Oa(function(Oe,Ke){return wa}),sa.enable=wa}else if(Ol in An){var Le=An[Ol];sa=Ka(Le,function(Oe,Ke){return Oe.invoke(Ke,Le)})}return sa}function To(en,dn){var An=en.static,sa=en.dynamic;if(Bu in An){var wa=An[Bu];return wa?(wa=mr.getFramebuffer(wa),Oa(function(Oe,Ke){var yt=Oe.link(wa),wt=Oe.shared;Ke.set(wt.framebuffer,".next",yt);var Pt=wt.context;return Ke.set(Pt,"."+_t,yt+".width"),Ke.set(Pt,"."+Nt,yt+".height"),yt})):Oa(function(Oe,Ke){var yt=Oe.shared;Ke.set(yt.framebuffer,".next","null");var wt=yt.context;return Ke.set(wt,"."+_t,wt+"."+Ur),Ke.set(wt,"."+Nt,wt+"."+kr),"null"})}else if(Bu in sa){var Le=sa[Bu];return Ka(Le,function(Oe,Ke){var yt=Oe.invoke(Ke,Le),wt=Oe.shared,Pt=wt.framebuffer,pr=Ke.def(Pt,".getFramebuffer(",yt,")");Ke.set(Pt,".next",pr);var Zr=wt.context;return Ke.set(Zr,"."+_t,pr+"?"+pr+".width:"+Zr+"."+Ur),Ke.set(Zr,"."+Nt,pr+"?"+pr+".height:"+Zr+"."+kr),pr})}else return null}function jo(en,dn,An){var sa=en.static,wa=en.dynamic;function Le(yt){if(yt in sa){var wt=sa[yt],Pt=!0,pr=wt.x|0,Zr=wt.y|0,Mn,va;return"width"in wt?Mn=wt.width|0:Pt=!1,"height"in wt?va=wt.height|0:Pt=!1,new mn(!Pt&&dn&&dn.thisDep,!Pt&&dn&&dn.contextDep,!Pt&&dn&&dn.propDep,function(ja,ka){var za=ja.shared.context,Ua=Mn;"width"in wt||(Ua=ka.def(za,".",_t,"-",pr));var Ja=va;return"height"in wt||(Ja=ka.def(za,".",Nt,"-",Zr)),[pr,Zr,Ua,Ja]})}else if(yt in wa){var aa=wa[yt],ea=Ka(aa,function(ja,ka){var za=ja.invoke(ka,aa),Ua=ja.shared.context,Ja=ka.def(za,".x|0"),hi=ka.def(za,".y|0"),Ki=ka.def('"width" in ',za,"?",za,".width|0:","(",Ua,".",_t,"-",Ja,")"),Qo=ka.def('"height" in ',za,"?",za,".height|0:","(",Ua,".",Nt,"-",hi,")");return[Ja,hi,Ki,Qo]});return dn&&(ea.thisDep=ea.thisDep||dn.thisDep,ea.contextDep=ea.contextDep||dn.contextDep,ea.propDep=ea.propDep||dn.propDep),ea}else return dn?new mn(dn.thisDep,dn.contextDep,dn.propDep,function(ja,ka){var za=ja.shared.context;return[0,0,ka.def(za,".",_t),ka.def(za,".",Nt)]}):null}var Oe=Le(rl);if(Oe){var Ke=Oe;Oe=new mn(Oe.thisDep,Oe.contextDep,Oe.propDep,function(yt,wt){var Pt=Ke.append(yt,wt),pr=yt.shared.context;return wt.set(pr,"."+Bt,Pt[2]),wt.set(pr,"."+Yt,Pt[3]),Pt})}return{viewport:Oe,scissor_box:Le(xc)}}function qs(en,dn){var An=en.static,sa=typeof An[jc]=="string"&&typeof An[nf]=="string";if(sa){if(Object.keys(dn.dynamic).length>0)return null;var wa=dn.static,Le=Object.keys(wa);if(Le.length>0&&typeof wa[Le[0]]=="number"){for(var Oe=[],Ke=0;Ke"+Ja+"?"+Pt+".constant["+Ja+"]:0;"}).join(""),"}}else{","if(",Mn,"(",Pt,".buffer)){",ja,"=",va,".createStream(",sn,",",Pt,".buffer);","}else{",ja,"=",va,".getBuffer(",Pt,".buffer);","}",ka,'="type" in ',Pt,"?",Zr.glTypes,"[",Pt,".type]:",ja,".dtype;",aa.normalized,"=!!",Pt,".normalized;");function za(Ua){wt(aa[Ua],"=",Pt,".",Ua,"|0;")}return za("size"),za("offset"),za("stride"),za("divisor"),wt("}}"),wt.exit("if(",aa.isStream,"){",va,".destroyStream(",ja,");","}"),aa}wa[Le]=Ka(Oe,Ke)}),wa}function ss(en){var dn=en.static,An=en.dynamic,sa={};return Object.keys(dn).forEach(function(wa){var Le=dn[wa];sa[wa]=Oa(function(Oe,Ke){return typeof Le=="number"||typeof Le=="boolean"?""+Le:Oe.link(Le)})}),Object.keys(An).forEach(function(wa){var Le=An[wa];sa[wa]=Ka(Le,function(Oe,Ke){return Oe.invoke(Ke,Le)})}),sa}function ks(en,dn,An,sa,wa){var Le=en.static,Oe=en.dynamic,Ke=qs(en,dn),yt=To(en,wa),wt=jo(en,yt,wa),Pt=Uo(en,wa),pr=Qs(en,wa),Zr=Vs(en,wa,Ke);function Mn(za){var Ua=wt[za];Ua&&(pr[za]=Ua)}Mn(rl),Mn(Wa(xc));var va=Object.keys(pr).length>0,aa={framebuffer:yt,draw:Pt,shader:Zr,state:pr,dirty:va,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(aa.profile=fo(en,wa),aa.uniforms=os(An,wa),aa.drawVAO=aa.scopeVAO=Pt.vao,!aa.drawVAO&&Zr.program&&!Ke&&qt.angle_instanced_arrays&&Pt.static.elements){var ea=!0,ja=Zr.program.attributes.map(function(za){var Ua=dn.static[za];return ea=ea&&!!Ua,Ua});if(ea&&ja.length>0){var ka=Lr.getVAO(Lr.createVAO({attributes:ja,elements:Pt.static.elements}));aa.drawVAO=new mn(null,null,null,function(za,Ua){return za.link(ka)}),aa.useVAO=!0}}return Ke?aa.useVAO=!0:aa.attributes=hs(dn,wa),aa.context=ss(sa,wa),aa}function ts(en,dn,An){var sa=en.shared,wa=sa.context,Le=en.scope();Object.keys(An).forEach(function(Oe){dn.save(wa,"."+Oe);var Ke=An[Oe],yt=Ke.append(en,dn);Array.isArray(yt)?Le(wa,".",Oe,"=[",yt.join(),"];"):Le(wa,".",Oe,"=",yt,";")}),dn(Le)}function el(en,dn,An,sa){var wa=en.shared,Le=wa.gl,Oe=wa.framebuffer,Ke;$n&&(Ke=dn.def(wa.extensions,".webgl_draw_buffers"));var yt=en.constants,wt=yt.drawBuffer,Pt=yt.backBuffer,pr;An?pr=An.append(en,dn):pr=dn.def(Oe,".next"),sa||dn("if(",pr,"!==",Oe,".cur){"),dn("if(",pr,"){",Le,".bindFramebuffer(",$r,",",pr,".framebuffer);"),$n&&dn(Ke,".drawBuffersWEBGL(",wt,"[",pr,".colorAttachments.length]);"),dn("}else{",Le,".bindFramebuffer(",$r,",null);"),$n&&dn(Ke,".drawBuffersWEBGL(",Pt,");"),dn("}",Oe,".cur=",pr,";"),sa||dn("}")}function Il(en,dn,An){var sa=en.shared,wa=sa.gl,Le=en.current,Oe=en.next,Ke=sa.current,yt=sa.next,wt=en.cond(Ke,".dirty");Ma.forEach(function(Pt){var pr=Wa(Pt);if(!(pr in An.state)){var Zr,Mn;if(pr in Oe){Zr=Oe[pr],Mn=Le[pr];var va=f($a[pr].length,function(ea){return wt.def(Zr,"[",ea,"]")});wt(en.cond(va.map(function(ea,ja){return ea+"!=="+Mn+"["+ja+"]"}).join("||")).then(wa,".",gi[pr],"(",va,");",va.map(function(ea,ja){return Mn+"["+ja+"]="+ea}).join(";"),";"))}else{Zr=wt.def(yt,".",pr);var aa=en.cond(Zr,"!==",Ke,".",pr);wt(aa),pr in xa?aa(en.cond(Zr).then(wa,".enable(",xa[pr],");").else(wa,".disable(",xa[pr],");"),Ke,".",pr,"=",Zr,";"):aa(wa,".",gi[pr],"(",Zr,");",Ke,".",pr,"=",Zr,";")}}}),Object.keys(An.state).length===0&&wt(Ke,".dirty=false;"),dn(wt)}function Do(en,dn,An,sa){var wa=en.shared,Le=en.current,Oe=wa.current,Ke=wa.gl,yt;Fn(Object.keys(An)).forEach(function(wt){var Pt=An[wt];if(!(sa&&!sa(Pt))){var pr=Pt.append(en,dn);if(xa[wt]){var Zr=xa[wt];Ea(Pt)?(yt=en.link(pr,{stable:!0}),dn(en.cond(yt).then(Ke,".enable(",Zr,");").else(Ke,".disable(",Zr,");")),dn(Oe,".",wt,"=",yt,";")):(dn(en.cond(pr).then(Ke,".enable(",Zr,");").else(Ke,".disable(",Zr,");")),dn(Oe,".",wt,"=",pr,";"))}else if(Or(pr)){var Mn=Le[wt];dn(Ke,".",gi[wt],"(",pr,");",pr.map(function(va,aa){return Mn+"["+aa+"]="+va}).join(";"),";")}else Ea(Pt)?(yt=en.link(pr,{stable:!0}),dn(Ke,".",gi[wt],"(",yt,");",Oe,".",wt,"=",yt,";")):dn(Ke,".",gi[wt],"(",pr,");",Oe,".",wt,"=",pr,";")}})}function ru(en,dn){Xn&&(en.instancing=dn.def(en.shared.extensions,".angle_instanced_arrays"))}function Ns(en,dn,An,sa,wa){var Le=en.shared,Oe=en.stats,Ke=Le.current,yt=Le.timer,wt=An.profile;function Pt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var pr,Zr;function Mn(za){pr=dn.def(),za(pr,"=",Pt(),";"),typeof wa=="string"?za(Oe,".count+=",wa,";"):za(Oe,".count++;"),qn&&(sa?(Zr=dn.def(),za(Zr,"=",yt,".getNumPendingQueries();")):za(yt,".beginQuery(",Oe,");"))}function va(za){za(Oe,".cpuTime+=",Pt(),"-",pr,";"),qn&&(sa?za(yt,".pushScopeStats(",Zr,",",yt,".getNumPendingQueries(),",Oe,");"):za(yt,".endQuery();"))}function aa(za){var Ua=dn.def(Ke,".profile");dn(Ke,".profile=",za,";"),dn.exit(Ke,".profile=",Ua,";")}var ea;if(wt){if(Ea(wt)){wt.enable?(Mn(dn),va(dn.exit),aa("true")):aa("false");return}ea=wt.append(en,dn),aa(ea)}else ea=dn.def(Ke,".profile");var ja=en.block();Mn(ja),dn("if(",ea,"){",ja,"}");var ka=en.block();va(ka),dn.exit("if(",ea,"){",ka,"}")}function Nu(en,dn,An,sa,wa){var Le=en.shared;function Oe(yt){switch(yt){case fs:case ql:case Vi:return 2;case Po:case Js:case fl:return 3;case Es:case Tu:case Ku:return 4;default:return 1}}function Ke(yt,wt,Pt){var pr=Le.gl,Zr=dn.def(yt,".location"),Mn=dn.def(Le.attributes,"[",Zr,"]"),va=Pt.state,aa=Pt.buffer,ea=[Pt.x,Pt.y,Pt.z,Pt.w],ja=["buffer","normalized","offset","stride"];function ka(){dn("if(!",Mn,".buffer){",pr,".enableVertexAttribArray(",Zr,");}");var Ua=Pt.type,Ja;if(Pt.size?Ja=dn.def(Pt.size,"||",wt):Ja=wt,dn("if(",Mn,".type!==",Ua,"||",Mn,".size!==",Ja,"||",ja.map(function(Ki){return Mn+"."+Ki+"!=="+Pt[Ki]}).join("||"),"){",pr,".bindBuffer(",sn,",",aa,".buffer);",pr,".vertexAttribPointer(",[Zr,Ja,Ua,Pt.normalized,Pt.stride,Pt.offset],");",Mn,".type=",Ua,";",Mn,".size=",Ja,";",ja.map(function(Ki){return Mn+"."+Ki+"="+Pt[Ki]+";"}).join(""),"}"),Xn){var hi=Pt.divisor;dn("if(",Mn,".divisor!==",hi,"){",en.instancing,".vertexAttribDivisorANGLE(",[Zr,hi],");",Mn,".divisor=",hi,";}")}}function za(){dn("if(",Mn,".buffer){",pr,".disableVertexAttribArray(",Zr,");",Mn,".buffer=null;","}if(",Bi.map(function(Ua,Ja){return Mn+"."+Ua+"!=="+ea[Ja]}).join("||"),"){",pr,".vertexAttrib4f(",Zr,",",ea,");",Bi.map(function(Ua,Ja){return Mn+"."+Ua+"="+ea[Ja]+";"}).join(""),"}")}va===Zi?ka():va===_i?za():(dn("if(",va,"===",Zi,"){"),ka(),dn("}else{"),za(),dn("}"))}sa.forEach(function(yt){var wt=yt.name,Pt=An.attributes[wt],pr;if(Pt){if(!wa(Pt))return;pr=Pt.append(en,dn)}else{if(!wa(di))return;var Zr=en.scopeAttrib(wt);pr={},Object.keys(new Sn).forEach(function(Mn){pr[Mn]=dn.def(Zr,".",Mn)})}Ke(en.link(yt),Oe(yt.info.type),pr)})}function Vl(en,dn,An,sa,wa,Le){for(var Oe=en.shared,Ke=Oe.gl,yt,wt=0;wt1){for(var Ds=[],ys=[],Gl=0;Gl>1)",aa],");")}function hi(){An(ea,".drawArraysInstancedANGLE(",[Zr,Mn,va,aa],");")}Pt&&Pt!=="null"?ka?Ja():(An("if(",Pt,"){"),Ja(),An("}else{"),hi(),An("}")):hi()}function Ua(){function Ja(){An(Le+".drawElements("+[Zr,va,ja,Mn+"<<(("+ja+"-"+Ni+")>>1)"]+");")}function hi(){An(Le+".drawArrays("+[Zr,Mn,va]+");")}Pt&&Pt!=="null"?ka?Ja():(An("if(",Pt,"){"),Ja(),An("}else{"),hi(),An("}")):hi()}Xn&&(typeof aa!="number"||aa>=0)?typeof aa=="string"?(An("if(",aa,">0){"),za(),An("}else if(",aa,"<0){"),Ua(),An("}")):za():Ua()}function Co(en,dn,An,sa,wa){var Le=Ui(),Oe=Le.proc("body",wa);return Xn&&(Le.instancing=Oe.def(Le.shared.extensions,".angle_instanced_arrays")),en(Le,Oe,An,sa),Le.compile().body}function is(en,dn,An,sa){ru(en,dn),An.useVAO?An.drawVAO?dn(en.shared.vao,".setVAO(",An.drawVAO.append(en,dn),");"):dn(en.shared.vao,".setVAO(",en.shared.vao,".targetVAO);"):(dn(en.shared.vao,".setVAO(null);"),Nu(en,dn,An,sa.attributes,function(){return!0})),Vl(en,dn,An,sa.uniforms,function(){return!0},!1),Hl(en,dn,dn,An)}function Hs(en,dn){var An=en.proc("draw",1);ru(en,An),ts(en,An,dn.context),el(en,An,dn.framebuffer),Il(en,An,dn),Do(en,An,dn.state),Ns(en,An,dn,!1,!0);var sa=dn.shader.progVar.append(en,An);if(An(en.shared.gl,".useProgram(",sa,".program);"),dn.shader.program)is(en,An,dn,dn.shader.program);else{An(en.shared.vao,".setVAO(null);");var wa=en.global.def("{}"),Le=An.def(sa,".id"),Oe=An.def(wa,"[",Le,"]");An(en.cond(Oe).then(Oe,".call(this,a0);").else(Oe,"=",wa,"[",Le,"]=",en.link(function(Ke){return Co(is,en,dn,Ke,1)}),"(",sa,");",Oe,".call(this,a0);"))}Object.keys(dn.state).length>0&&An(en.shared.current,".dirty=true;"),en.shared.vao&&An(en.shared.vao,".setVAO(null);")}function fn(en,dn,An,sa){en.batchId="a1",ru(en,dn);function wa(){return!0}Nu(en,dn,An,sa.attributes,wa),Vl(en,dn,An,sa.uniforms,wa,!1),Hl(en,dn,dn,An)}function la(en,dn,An,sa){ru(en,dn);var wa=An.contextDep,Le=dn.def(),Oe="a0",Ke="a1",yt=dn.def();en.shared.props=yt,en.batchId=Le;var wt=en.scope(),Pt=en.scope();dn(wt.entry,"for(",Le,"=0;",Le,"<",Ke,";++",Le,"){",yt,"=",Oe,"[",Le,"];",Pt,"}",wt.exit);function pr(ja){return ja.contextDep&&wa||ja.propDep}function Zr(ja){return!pr(ja)}if(An.needsContext&&ts(en,Pt,An.context),An.needsFramebuffer&&el(en,Pt,An.framebuffer),Do(en,Pt,An.state,pr),An.profile&&pr(An.profile)&&Ns(en,Pt,An,!1,!0),sa)An.useVAO?An.drawVAO?pr(An.drawVAO)?Pt(en.shared.vao,".setVAO(",An.drawVAO.append(en,Pt),");"):wt(en.shared.vao,".setVAO(",An.drawVAO.append(en,wt),");"):wt(en.shared.vao,".setVAO(",en.shared.vao,".targetVAO);"):(wt(en.shared.vao,".setVAO(null);"),Nu(en,wt,An,sa.attributes,Zr),Nu(en,Pt,An,sa.attributes,pr)),Vl(en,wt,An,sa.uniforms,Zr,!1),Vl(en,Pt,An,sa.uniforms,pr,!0),Hl(en,wt,Pt,An);else{var Mn=en.global.def("{}"),va=An.shader.progVar.append(en,Pt),aa=Pt.def(va,".id"),ea=Pt.def(Mn,"[",aa,"]");Pt(en.shared.gl,".useProgram(",va,".program);","if(!",ea,"){",ea,"=",Mn,"[",aa,"]=",en.link(function(ja){return Co(fn,en,An,ja,2)}),"(",va,");}",ea,".call(this,a0[",Le,"],",Le,");")}}function ha(en,dn){var An=en.proc("batch",2);en.batchId="0",ru(en,An);var sa=!1,wa=!0;Object.keys(dn.context).forEach(function(Mn){sa=sa||dn.context[Mn].propDep}),sa||(ts(en,An,dn.context),wa=!1);var Le=dn.framebuffer,Oe=!1;Le?(Le.propDep?sa=Oe=!0:Le.contextDep&&sa&&(Oe=!0),Oe||el(en,An,Le)):el(en,An,null),dn.state.viewport&&dn.state.viewport.propDep&&(sa=!0);function Ke(Mn){return Mn.contextDep&&sa||Mn.propDep}Il(en,An,dn),Do(en,An,dn.state,function(Mn){return!Ke(Mn)}),(!dn.profile||!Ke(dn.profile))&&Ns(en,An,dn,!1,"a1"),dn.contextDep=sa,dn.needsContext=wa,dn.needsFramebuffer=Oe;var yt=dn.shader.progVar;if(yt.contextDep&&sa||yt.propDep)la(en,An,dn,null);else{var wt=yt.append(en,An);if(An(en.shared.gl,".useProgram(",wt,".program);"),dn.shader.program)la(en,An,dn,dn.shader.program);else{An(en.shared.vao,".setVAO(null);");var Pt=en.global.def("{}"),pr=An.def(wt,".id"),Zr=An.def(Pt,"[",pr,"]");An(en.cond(Zr).then(Zr,".call(this,a0,a1);").else(Zr,"=",Pt,"[",pr,"]=",en.link(function(Mn){return Co(la,en,dn,Mn,2)}),"(",wt,");",Zr,".call(this,a0,a1);"))}}Object.keys(dn.state).length>0&&An(en.shared.current,".dirty=true;"),en.shared.vao&&An(en.shared.vao,".setVAO(null);")}function ao(en,dn){var An=en.proc("scope",3);en.batchId="a2";var sa=en.shared,wa=sa.current;if(ts(en,An,dn.context),dn.framebuffer&&dn.framebuffer.append(en,An),Fn(Object.keys(dn.state)).forEach(function(Ke){var yt=dn.state[Ke],wt=yt.append(en,An);Or(wt)?wt.forEach(function(Pt,pr){pi(Pt)?An.set(en.next[Ke],"["+pr+"]",Pt):An.set(en.next[Ke],"["+pr+"]",en.link(Pt,{stable:!0}))}):Ea(yt)?An.set(sa.next,"."+Ke,en.link(wt,{stable:!0})):An.set(sa.next,"."+Ke,wt)}),Ns(en,An,dn,!0,!0),[wu,Ci,Ul,eu,jl].forEach(function(Ke){var yt=dn.draw[Ke];if(yt){var wt=yt.append(en,An);pi(wt)?An.set(sa.draw,"."+Ke,wt):An.set(sa.draw,"."+Ke,en.link(wt),{stable:!0})}}),Object.keys(dn.uniforms).forEach(function(Ke){var yt=dn.uniforms[Ke].append(en,An);Array.isArray(yt)&&(yt="["+yt.map(function(wt){return pi(wt)?wt:en.link(wt,{stable:!0})})+"]"),An.set(sa.uniforms,"["+en.link(Rt.id(Ke),{stable:!0})+"]",yt)}),Object.keys(dn.attributes).forEach(function(Ke){var yt=dn.attributes[Ke].append(en,An),wt=en.scopeAttrib(Ke);Object.keys(new Sn).forEach(function(Pt){An.set(wt,"."+Pt,yt[Pt])})}),dn.scopeVAO){var Le=dn.scopeVAO.append(en,An);pi(Le)?An.set(sa.vao,".targetVAO",Le):An.set(sa.vao,".targetVAO",en.link(Le,{stable:!0}))}function Oe(Ke){var yt=dn.shader[Ke];if(yt){var wt=yt.append(en,An);pi(wt)?An.set(sa.shader,"."+Ke,wt):An.set(sa.shader,"."+Ke,en.link(wt,{stable:!0}))}}Oe(nf),Oe(jc),Object.keys(dn.state).length>0&&(An(wa,".dirty=true;"),An.exit(wa,".dirty=true;")),An("a1(",en.shared.context,",a0,",en.batchId,");")}function ds(en){if(!(typeof en!="object"||Or(en))){for(var dn=Object.keys(en),An=0;An=0;--Co){var is=Xi[Co];is&&is(_n,null,0)}qt.flush(),cn&&cn.update()}function jo(){!fo&&Xi.length>0&&(fo=m.next(To))}function qs(){fo&&(m.cancel(To),fo=null)}function Vs(Co){Co.preventDefault(),vr=!0,qs(),Eo.forEach(function(is){is()})}function Uo(Co){qt.getError(),vr=!1,Ar.restore(),Si.restore(),Xn.restore(),Ma.restore(),xa.restore(),gi.restore(),Ha.restore(),cn&&cn.restore(),Wa.procs.refresh(),jo(),yi.forEach(function(is){is()})}pi&&(pi.addEventListener(Ne,Vs,!1),pi.addEventListener(Ye,Uo,!1));function Qs(){Xi.length=0,qs(),pi&&(pi.removeEventListener(Ne,Vs),pi.removeEventListener(Ye,Uo)),Si.clear(),gi.clear(),xa.clear(),Ha.clear(),Ma.clear(),$n.clear(),Xn.clear(),cn&&cn.clear(),Ui.forEach(function(Co){Co()})}function os(Co){function is(Le){var Oe=v({},Le);delete Oe.uniforms,delete Oe.attributes,delete Oe.context,delete Oe.vao,"stencil"in Oe&&Oe.stencil.op&&(Oe.stencil.opBack=Oe.stencil.opFront=Oe.stencil.op,delete Oe.stencil.op);function Ke(yt){if(yt in Oe){var wt=Oe[yt];delete Oe[yt],Object.keys(wt).forEach(function(Pt){Oe[yt+"."+Pt]=wt[Pt]})}}return Ke("blend"),Ke("depth"),Ke("cull"),Ke("stencil"),Ke("polygonOffset"),Ke("scissor"),Ke("sample"),"vao"in Le&&(Oe.vao=Le.vao),Oe}function Hs(Le,Oe){var Ke={},yt={};return Object.keys(Le).forEach(function(wt){var Pt=Le[wt];if(c.isDynamic(Pt)){yt[wt]=c.unbox(Pt,wt);return}else if(Oe&&Array.isArray(Pt)){for(var pr=0;pr0)return en.call(this,sa(Le|0),Le|0)}else if(Array.isArray(Le)){if(Le.length)return en.call(this,Le,Le.length)}else return io.call(this,Le)}return v(wa,{stats:ds,destroy:function(){Os.destroy()}})}var hs=gi.setFBO=os({framebuffer:c.define.call(null,lt,"framebuffer")});function ss(Co,is){var Hs=0;Wa.procs.poll();var fn=is.color;fn&&(qt.clearColor(+fn[0]||0,+fn[1]||0,+fn[2]||0,+fn[3]||0),Hs|=ie),"depth"in is&&(qt.clearDepth(+is.depth),Hs|=ce),"stencil"in is&&(qt.clearStencil(is.stencil|0),Hs|=_e),qt.clear(Hs)}function ks(Co){if("framebuffer"in Co)if(Co.framebuffer&&Co.framebuffer_reglType==="framebufferCube")for(var is=0;is<6;++is)hs(v({framebuffer:Co.framebuffer.faces[is]},Co),ss);else hs(Co,ss);else ss(null,Co)}function ts(Co){Xi.push(Co);function is(){var Hs=Gt(Xi,Co);function fn(){var la=Gt(Xi,fn);Xi[la]=Xi[Xi.length-1],Xi.length-=1,Xi.length<=0&&qs()}Xi[Hs]=fn}return jo(),{cancel:is}}function el(){var Co=Xa.viewport,is=Xa.scissor_box;Co[0]=Co[1]=is[0]=is[1]=0,_n.viewportWidth=_n.framebufferWidth=_n.drawingBufferWidth=Co[2]=is[2]=qt.drawingBufferWidth,_n.viewportHeight=_n.framebufferHeight=_n.drawingBufferHeight=Co[3]=is[3]=qt.drawingBufferHeight}function Il(){_n.tick+=1,_n.time=ru(),el(),Wa.procs.poll()}function Do(){Ma.refresh(),el(),Wa.procs.refresh(),cn&&cn.update()}function ru(){return(h()-Nn)/1e3}Do();function Ns(Co,is){var Hs;switch(Co){case"frame":return ts(is);case"lost":Hs=Eo;break;case"restore":Hs=yi;break;case"destroy":Hs=Ui;break;default:}return Hs.push(is),{cancel:function(){for(var fn=0;fn=0},read:Ya,destroy:Qs,_gl:qt,_refresh:Do,poll:function(){Il(),cn&&cn.update()},now:ru,stats:mr,getCachedCode:Nu,preloadCachedCode:Vl});return Rt.onDone(null,Hl),Hl}return Jt})}}),I9=Ee({"node_modules/gl-util/context.js"(J,V){"use strict";var v=Jh();V.exports=function(a){if(a?typeof a=="string"&&(a={container:a}):a={},E(a)?a={container:a}:k(a)?a={container:a}:l(a)?a={gl:a}:a=v(a,{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),a.pixelRatio||(a.pixelRatio=window.pixelRatio||1),a.gl)return a.gl;if(a.canvas&&(a.container=a.canvas.parentNode),a.container){if(typeof a.container=="string"){var r=document.querySelector(a.container);if(!r)throw Error("Element "+a.container+" is not found");a.container=r}E(a.container)?(a.canvas=a.container,a.container=a.canvas.parentNode):a.canvas||(a.canvas=e(),a.container.appendChild(a.canvas),x(a))}else if(!a.canvas)if(typeof document<"u")a.container=document.body||document.documentElement,a.canvas=e(),a.container.appendChild(a.canvas),x(a);else throw Error("Not DOM environment. Use headless-gl.");return a.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{a.gl=a.canvas.getContext(n,a.attrs)}catch{}return a.gl}),a.gl};function x(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var a=t.container.getBoundingClientRect();t.canvas.width=t.width||a.right-a.left,t.canvas.height=t.height||a.bottom-a.top}}function E(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function k(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),R9=Ee({"node_modules/font-atlas/index.js"(J,V){"use strict";var v=$w(),x=[32,126];V.exports=E;function E(k){k=k||{};var l=k.shape?k.shape:k.canvas?[k.canvas.width,k.canvas.height]:[512,512],e=k.canvas||document.createElement("canvas"),t=k.font,a=typeof k.step=="number"?[k.step,k.step]:k.step||[32,32],r=k.chars||x;if(t&&typeof t!="string"&&(t=v(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var n=[],o=r[0],s=0;o<=r[1];o++)n[s++]=String.fromCharCode(o);r=n}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var m=a[0]/2,h=a[1]/2,o=0;ol[0]-a[0]/2&&(m=a[0]/2,h+=a[1]);return e}}}),Kw=Ee({"node_modules/bit-twiddle/twiddle.js"(J){"use strict";"use restrict";var V=32;J.INT_BITS=V,J.INT_MAX=2147483647,J.INT_MIN=-1<0)-(E<0)},J.abs=function(E){var k=E>>V-1;return(E^k)-k},J.min=function(E,k){return k^(E^k)&-(E65535)<<4,E>>>=k,l=(E>255)<<3,E>>>=l,k|=l,l=(E>15)<<2,E>>>=l,k|=l,l=(E>3)<<1,E>>>=l,k|=l,k|E>>1},J.log10=function(E){return E>=1e9?9:E>=1e8?8:E>=1e7?7:E>=1e6?6:E>=1e5?5:E>=1e4?4:E>=1e3?3:E>=100?2:E>=10?1:0},J.popCount=function(E){return E=E-(E>>>1&1431655765),E=(E&858993459)+(E>>>2&858993459),(E+(E>>>4)&252645135)*16843009>>>24};function v(E){var k=32;return E&=-E,E&&k--,E&65535&&(k-=16),E&16711935&&(k-=8),E&252645135&&(k-=4),E&858993459&&(k-=2),E&1431655765&&(k-=1),k}J.countTrailingZeros=v,J.nextPow2=function(E){return E+=E===0,--E,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E+1},J.prevPow2=function(E){return E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E-(E>>>1)},J.parity=function(E){return E^=E>>>16,E^=E>>>8,E^=E>>>4,E&=15,27030>>>E&1};var x=new Array(256);(function(E){for(var k=0;k<256;++k){var l=k,e=k,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;E[k]=e<>>8&255]<<16|x[E>>>16&255]<<8|x[E>>>24&255]},J.interleave2=function(E,k){return E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,k&=65535,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,E|k<<1},J.deinterleave2=function(E,k){return E=E>>>k&1431655765,E=(E|E>>>1)&858993459,E=(E|E>>>2)&252645135,E=(E|E>>>4)&16711935,E=(E|E>>>16)&65535,E<<16>>16},J.interleave3=function(E,k,l){return E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,k&=1023,k=(k|k<<16)&4278190335,k=(k|k<<8)&251719695,k=(k|k<<4)&3272356035,k=(k|k<<2)&1227133513,E|=k<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,E|l<<2},J.deinterleave3=function(E,k){return E=E>>>k&1227133513,E=(E|E>>>2)&3272356035,E=(E|E>>>4)&251719695,E=(E|E>>>8)&4278190335,E=(E|E>>>16)&1023,E<<22>>22},J.nextCombination=function(E){var k=E|E-1;return k+1|(~k&-~k)-1>>>v(E)+1}}}),F9=Ee({"node_modules/dup/dup.js"(J,V){"use strict";function v(k,l,e){var t=k[e]|0;if(t<=0)return[];var a=new Array(t),r;if(e===k.length-1)for(r=0;r"u"&&(l=0),typeof k){case"number":if(k>0)return x(k|0,l);break;case"object":if(typeof k.length=="number")return v(k,l,0);break}return[]}V.exports=E}}),z9=Ee({"node_modules/typedarray-pool/pool.js"(J){"use strict";var V=Kw(),v=F9(),x=Nv().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:v([32,0]),UINT16:v([32,0]),UINT32:v([32,0]),BIGUINT64:v([32,0]),INT8:v([32,0]),INT16:v([32,0]),INT32:v([32,0]),BIGINT64:v([32,0]),FLOAT:v([32,0]),DOUBLE:v([32,0]),DATA:v([32,0]),UINT8C:v([32,0]),BUFFER:v([32,0])});var E=typeof Uint8ClampedArray<"u",k=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=v([32,0])),e.BIGUINT64||(e.BIGUINT64=v([32,0])),e.BIGINT64||(e.BIGINT64=v([32,0])),e.BUFFER||(e.BUFFER=v([32,0]));var t=e.DATA,a=e.BUFFER;J.free=function(u){if(x.isBuffer(u))a[V.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var A=u.length||u.byteLength,b=V.log2(A)|0;t[b].push(u)}};function r(f){if(f){var u=f.length||f.byteLength,A=V.log2(u);t[A].push(f)}}function n(f){r(f.buffer)}J.freeUint8=J.freeUint16=J.freeUint32=J.freeBigUint64=J.freeInt8=J.freeInt16=J.freeInt32=J.freeBigInt64=J.freeFloat32=J.freeFloat=J.freeFloat64=J.freeDouble=J.freeUint8Clamped=J.freeDataView=n,J.freeArrayBuffer=r,J.freeBuffer=function(u){a[V.log2(u.length)].push(u)},J.malloc=function(u,A){if(A===void 0||A==="arraybuffer")return o(u);switch(A){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return m(u);case"int8":return h(u);case"int16":return p(u);case"int32":return g(u);case"float":case"float32":return i(u);case"double":case"float64":return w(u);case"uint8_clamped":return S(u);case"bigint64":return C(u);case"biguint64":return M(u);case"buffer":return T(u);case"data":case"dataview":return _(u);default:return null}return null};function o(u){var u=V.nextPow2(u),A=V.log2(u),b=t[A];return b.length>0?b.pop():new ArrayBuffer(u)}J.mallocArrayBuffer=o;function s(f){return new Uint8Array(o(f),0,f)}J.mallocUint8=s;function c(f){return new Uint16Array(o(2*f),0,f)}J.mallocUint16=c;function m(f){return new Uint32Array(o(4*f),0,f)}J.mallocUint32=m;function h(f){return new Int8Array(o(f),0,f)}J.mallocInt8=h;function p(f){return new Int16Array(o(2*f),0,f)}J.mallocInt16=p;function g(f){return new Int32Array(o(4*f),0,f)}J.mallocInt32=g;function i(f){return new Float32Array(o(4*f),0,f)}J.mallocFloat32=J.mallocFloat=i;function w(f){return new Float64Array(o(8*f),0,f)}J.mallocFloat64=J.mallocDouble=w;function S(f){return E?new Uint8ClampedArray(o(f),0,f):s(f)}J.mallocUint8Clamped=S;function M(f){return k?new BigUint64Array(o(8*f),0,f):null}J.mallocBigUint64=M;function C(f){return l?new BigInt64Array(o(8*f),0,f):null}J.mallocBigInt64=C;function _(f){return new DataView(o(f),0,f)}J.mallocDataView=_;function T(f){f=V.nextPow2(f);var u=V.log2(f),A=a[u];return A.length>0?A.pop():new x(f)}J.mallocBuffer=T,J.clearCache=function(){for(var u=0;u<32;++u)e.UINT8[u].length=0,e.UINT16[u].length=0,e.UINT32[u].length=0,e.INT8[u].length=0,e.INT16[u].length=0,e.INT32[u].length=0,e.FLOAT[u].length=0,e.DOUBLE[u].length=0,e.BIGUINT64[u].length=0,e.BIGINT64[u].length=0,e.UINT8C[u].length=0,t[u].length=0,a[u].length=0}}}),B9=Ee({"node_modules/is-plain-obj/index.js"(J,V){"use strict";var v=Object.prototype.toString;V.exports=function(x){var E;return v.call(x)==="[object Object]"&&(E=Object.getPrototypeOf(x),E===null||E===Object.getPrototypeOf({}))}}}),Jw=Ee({"node_modules/parse-unit/index.js"(J,V){V.exports=function(x,E){E||(E=[0,""]),x=String(x);var k=parseFloat(x,10);return E[0]=k,E[1]=x.match(/[\d.\-\+]*\s*(.*)/)[1]||"",E}}}),N9=Ee({"node_modules/gl-text/node_modules/to-px/topx.js"(J,V){"use strict";var v=Jw();V.exports=l;var x=96;function E(e,t){var a=v(getComputedStyle(e).getPropertyValue(t));return a[0]*l(a[1],e)}function k(e,t){var a=document.createElement("div");a.style["font-size"]="128"+e,t.appendChild(a);var r=E(a,"font-size")/128;return t.removeChild(a),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return k(e,t);case"em":return E(t,"font-size");case"rem":return E(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return x;case"cm":return x/2.54;case"mm":return x/25.4;case"pt":return x/72;case"pc":return x/6}return 1}}}),O9=Ee({"node_modules/detect-kerning/index.js"(J,V){"use strict";V.exports=k;var v=k.canvas=document.createElement("canvas"),x=v.getContext("2d"),E=l([32,126]);k.createPairs=l,k.ascii=E;function k(e,t){Array.isArray(e)&&(e=e.join(", "));var a={},r,n=16,o=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(n=t.fontSize),t.threshold!=null&&(o=t.threshold))),r||(r=E),x.font=n+"px "+e;for(var s=0;sn*o){var p=(h-m)/n;a[c]=p*1e3}}return a}function l(e){for(var t=[],a=e[0];a<=e[1];a++)for(var r=String.fromCharCode(a),n=e[0];n0;a-=4)if(t[a]!==0)return Math.floor((a-3)*.25/e)}}}),U9=Ee({"node_modules/gl-text/dist.js"(J,V){"use strict";var v=D9(),x=Jh(),E=Zw(),k=I9(),l=Uw(),e=zm(),t=R9(),a=z9(),r=u0(),n=B9(),o=Jw(),s=N9(),c=O9(),m=Lc(),h=j9(),p=Qv(),g=Kw(),i=g.nextPow2,w=new l,S=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(S=!0),document.body.removeChild(M));var M,C=function(f){_(f)?(f={regl:f},this.gl=f.regl._gl):this.gl=k(f),this.shader=w.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=f.regl||E({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),w.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(n(f)?f:{})};C.prototype.createShader=function(){var f=this.regl,u=f({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:f.prop("count"),offset:f.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:f.this("sizeBuffer")},width:{offset:0,stride:8,buffer:f.this("sizeBuffer")},char:f.this("charBuffer"),position:f.this("position")},uniforms:{atlasSize:function(b,z){return[z.atlas.width,z.atlas.height]},atlasDim:function(b,z){return[z.atlas.cols,z.atlas.rows]},atlas:function(b,z){return z.atlas.texture},charStep:function(b,z){return z.atlas.step},em:function(b,z){return z.atlas.em},color:f.prop("color"),opacity:f.prop("opacity"),viewport:f.this("viewportArray"),scale:f.this("scale"),align:f.prop("align"),baseline:f.prop("baseline"),translate:f.this("translate"),positionOffset:f.prop("positionOffset")},primitive:"points",viewport:f.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2691,12 +2692,9 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),x={};return{regl:m,draw:h,atlas:x}},E.prototype.update=function(m){var h=this;if(typeof m=="string")m={text:m};else if(!m)return;m=v(m,{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),m.opacity!=null&&(Array.isArray(m.opacity)?this.opacity=m.opacity.map(function(ne){return parseFloat(ne)}):this.opacity=parseFloat(m.opacity)),m.viewport!=null&&(this.viewport=r(m.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(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]),m.kerning!=null&&(this.kerning=m.kerning),m.offset!=null&&(typeof m.offset=="number"&&(m.offset=[m.offset,0]),this.positionOffset=d(m.offset)),m.direction&&(this.direction=m.direction),m.range&&(this.range=m.range,this.scale=[1/(m.range[2]-m.range[0]),1/(m.range[3]-m.range[1])],this.translate=[-m.range[0],-m.range[1]]),m.scale&&(this.scale=m.scale),m.translate&&(this.translate=m.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!m.font&&(m.font=E.baseFontSize+"px sans-serif");var x=!1,_=!1;if(m.font&&(Array.isArray(m.font)?m.font:[m.font]).forEach(function(ne,be){if(typeof ne=="string")try{ne=u.parse(ne)}catch{ne=u.parse(E.baseFontSize+"px "+ne)}else{var De=ne.style,qe=ne.weight,Ne=ne.stretch,ut=ne.variant;ne=u.parse(u.stringify(ne)),De&&(ne.style=De),qe&&(ne.weight=qe),Ne&&(ne.stretch=Ne),ut&&(ne.variant=ut)}var ot=u.stringify({size:E.baseFontSize,family:ne.family,stretch:M?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style}),yt=i(ne.size),At=Math.round(yt[0]*s(yt[1]));if(At!==h.fontSize[be]&&(_=!0,h.fontSize[be]=At),(!h.font[be]||ot!=h.font[be].baseString)&&(x=!0,h.font[be]=E.fonts[ot],!h.font[be])){var It=ne.family.join(", "),Zt=[ne.style];ne.style!=ne.variant&&Zt.push(ne.variant),ne.variant!=ne.weight&&Zt.push(ne.weight),M&&ne.weight!=ne.stretch&&Zt.push(ne.stretch),h.font[be]={baseString:ot,family:It,weight:ne.weight,stretch:ne.stretch,style:ne.style,variant:ne.variant,width:{},kerning:{},metrics:f(It,{origin:"top",fontSize:E.baseFontSize,fontStyle:Zt.join(" ")})},E.fonts[ot]=h.font[be]}}),(x||_)&&this.font.forEach(function(ne,be){var De=u.stringify({size:h.fontSize[be],family:ne.family,stretch:M?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style});if(h.fontAtlas[be]=h.shader.atlas[De],!h.fontAtlas[be]){var qe=ne.metrics;h.shader.atlas[De]=h.fontAtlas[be]={fontString:De,step:Math.ceil(h.fontSize[be]*qe.bottom*.5)*2,em:h.fontSize[be],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:h.regl.texture()}}m.text==null&&(m.text=h.text)}),typeof m.text=="string"&&m.position&&m.position.length>2){for(var D=Array(m.position.length*.5),C=0;C2){for(var z=!m.position[0].length,R=a.mallocFloat(this.count*2),k=0,B=0;k1?h.align[be]:h.align[0]:h.align;if(typeof De=="number")return De;switch(De){case"right":case"end":return-ne;case"center":case"centre":case"middle":return-ne*.5}return 0})),this.baseline==null&&m.baseline==null&&(m.baseline=0),m.baseline!=null&&(this.baseline=m.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,be){var De=(h.font[be]||h.font[0]).metrics,qe=0;return qe+=De.bottom*.5,typeof ne=="number"?qe+=ne-De.baseline:qe+=-De[ne],qe*=-1,qe})),m.color!=null)if(m.color||(m.color="transparent"),typeof m.color=="string"||!isNaN(m.color))this.color=e(m.color,"uint8");else{var Te;if(typeof m.color[0]=="number"&&m.color.length>this.counts.length){var Se=m.color.length;Te=a.mallocUint8(Se);for(var Ce=(m.color.subarray||m.color.slice).bind(m.color),Ue=0;Ue4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ce){var ie=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(ie);for(var se=0;se1?this.counts[se]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[se]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(se*4,se*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[se]:this.opacity,baseline:this.baselineOffset[se]!=null?this.baselineOffset[se]:this.baselineOffset[0],align:this.align?this.alignOffset[se]!=null?this.alignOffset[se]:this.alignOffset[0]:0,atlas:this.fontAtlas[se]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(se*2,se*2+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=[]}},E.prototype.destroy=function(){},E.prototype.kerning=!0,E.prototype.position={constant:new Float32Array(2)},E.prototype.translate=null,E.prototype.scale=null,E.prototype.font=null,E.prototype.text="",E.prototype.positionOffset=[0,0],E.prototype.opacity=1,E.prototype.color=new Uint8Array([0,0,0,255]),E.prototype.alignOffset=[0,0],E.maxAtlasSize=1024,E.atlasCanvas=document.createElement("canvas"),E.atlasContext=E.atlasCanvas.getContext("2d",{alpha:!1}),E.baseFontSize=64,E.fonts={};function g(T){return typeof T=="function"&&T._gl&&T.prop&&T.texture&&T.buffer}O.exports=E}}),N8=xe({"node_modules/@plotly/regl/dist/regl.unchecked.js"(U,O){(function(u,v){typeof U=="object"&&typeof O<"u"?O.exports=v():u.createREGL=v()})(U,function(){"use strict";var u=function(Ve,Pt){for(var Ft=Object.keys(Pt),Er=0;Er1&&Pt===Ft&&(Pt==='"'||Pt==="'"))return['"'+t(Ve.substr(1,Ve.length-2))+'"'];var Er=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Ve);if(Er)return a(Ve.substr(0,Er.index)).concat(a(Er[1])).concat(a(Ve.substr(Er.index+Er[0].length)));var Xr=Ve.split(".");if(Xr.length===1)return['"'+t(Ve)+'"'];for(var Kr=[],Yr=0;Yr"u"?1:window.devicePixelRatio,Ua=!1,Wn={},Tn=function(yr){},nn=function(){};if(typeof Pt=="string"?Ft=document.querySelector(Pt):typeof Pt=="object"&&(b(Pt)?Ft=Pt:M(Pt)?(Kr=Pt,Xr=Kr.canvas):("gl"in Pt?Kr=Pt.gl:"canvas"in Pt?Xr=E(Pt.canvas):"container"in Pt&&(Er=E(Pt.container)),"attributes"in Pt&&(Yr=Pt.attributes),"extensions"in Pt&&(_a=A(Pt.extensions)),"optionalExtensions"in Pt&&(Ra=A(Pt.optionalExtensions)),"onDone"in Pt&&(Tn=Pt.onDone),"profile"in Pt&&(Ua=!!Pt.profile),"pixelRatio"in Pt&&(Ba=+Pt.pixelRatio),"cachedCode"in Pt&&(Wn=Pt.cachedCode))),Ft&&(Ft.nodeName.toLowerCase()==="canvas"?Xr=Ft:Er=Ft),!Kr){if(!Xr){var ua=y(Er||document.body,Tn,Ba);if(!ua)return null;Xr=ua.canvas,nn=ua.onDestroy}Yr.premultipliedAlpha===void 0&&(Yr.premultipliedAlpha=!0),Kr=o(Xr,Yr)}return Kr?{gl:Kr,canvas:Xr,container:Er,extensions:_a,optionalExtensions:Ra,pixelRatio:Ba,profile:Ua,cachedCode:Wn,onDone:Tn,onDestroy:nn}:(nn(),Tn("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(Ve,Pt){var Ft={};function Er(Yr){var _a=Yr.toLowerCase(),Ra;try{Ra=Ft[_a]=Ve.getExtension(_a)}catch{}return!!Ra}for(var Xr=0;Xr65535)<<4,Ve>>>=Pt,Ft=(Ve>255)<<3,Ve>>>=Ft,Pt|=Ft,Ft=(Ve>15)<<2,Ve>>>=Ft,Pt|=Ft,Ft=(Ve>3)<<1,Ve>>>=Ft,Pt|=Ft,Pt|Ve>>1}function k(){var Ve=m(8,function(){return[]});function Pt(Kr){var Yr=z(Kr),_a=Ve[R(Yr)>>2];return _a.length>0?_a.pop():new ArrayBuffer(Yr)}function Ft(Kr){Ve[R(Kr.byteLength)>>2].push(Kr)}function Er(Kr,Yr){var _a=null;switch(Kr){case h:_a=new Int8Array(Pt(Yr),0,Yr);break;case x:_a=new Uint8Array(Pt(Yr),0,Yr);break;case _:_a=new Int16Array(Pt(2*Yr),0,Yr);break;case D:_a=new Uint16Array(Pt(2*Yr),0,Yr);break;case C:_a=new Int32Array(Pt(4*Yr),0,Yr);break;case F:_a=new Uint32Array(Pt(4*Yr),0,Yr);break;case I:_a=new Float32Array(Pt(4*Yr),0,Yr);break;default:return null}return _a.length!==Yr?_a.subarray(0,Yr):_a}function Xr(Kr){Ft(Kr.buffer)}return{alloc:Pt,free:Ft,allocType:Er,freeType:Xr}}var B=k();B.zero=k();var N=3408,q=3410,Y=3411,ee=3412,te=3413,ae=3414,j=3415,G=33901,K=33902,H=3379,Z=3386,X=34921,$=36347,Q=36348,re=35661,ue=35660,pe=34930,ge=36349,Te=34076,Se=34024,Ce=7936,Ue=7937,Oe=7938,_e=35724,ce=34047,ie=36063,se=34852,ne=3553,be=34067,De=34069,qe=33984,Ne=6408,ut=5126,ot=5121,yt=36160,At=36053,It=36064,Zt=16384,vr=function(Ve,Pt){var Ft=1;Pt.ext_texture_filter_anisotropic&&(Ft=Ve.getParameter(ce));var Er=1,Xr=1;Pt.webgl_draw_buffers&&(Er=Ve.getParameter(se),Xr=Ve.getParameter(ie));var Kr=!!Pt.oes_texture_float;if(Kr){var Yr=Ve.createTexture();Ve.bindTexture(ne,Yr),Ve.texImage2D(ne,0,Ne,1,1,0,Ne,ut,null);var _a=Ve.createFramebuffer();if(Ve.bindFramebuffer(yt,_a),Ve.framebufferTexture2D(yt,It,ne,Yr,0),Ve.bindTexture(ne,null),Ve.checkFramebufferStatus(yt)!==At)Kr=!1;else{Ve.viewport(0,0,1,1),Ve.clearColor(1,0,0,1),Ve.clear(Zt);var Ra=B.allocType(ut,4);Ve.readPixels(0,0,1,1,Ne,ut,Ra),Ve.getError()?Kr=!1:(Ve.deleteFramebuffer(_a),Ve.deleteTexture(Yr),Kr=Ra[0]===1),B.freeType(Ra)}}var Ba=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Ua=!0;if(!Ba){var Wn=Ve.createTexture(),Tn=B.allocType(ot,36);Ve.activeTexture(qe),Ve.bindTexture(be,Wn),Ve.texImage2D(De,0,Ne,3,3,0,Ne,ot,Tn),B.freeType(Tn),Ve.bindTexture(be,null),Ve.deleteTexture(Wn),Ua=!Ve.getError()}return{colorBits:[Ve.getParameter(q),Ve.getParameter(Y),Ve.getParameter(ee),Ve.getParameter(te)],depthBits:Ve.getParameter(ae),stencilBits:Ve.getParameter(j),subpixelBits:Ve.getParameter(N),extensions:Object.keys(Pt).filter(function(nn){return!!Pt[nn]}),maxAnisotropic:Ft,maxDrawbuffers:Er,maxColorAttachments:Xr,pointSizeDims:Ve.getParameter(G),lineWidthDims:Ve.getParameter(K),maxViewportDims:Ve.getParameter(Z),maxCombinedTextureUnits:Ve.getParameter(re),maxCubeMapSize:Ve.getParameter(Te),maxRenderbufferSize:Ve.getParameter(Se),maxTextureUnits:Ve.getParameter(pe),maxTextureSize:Ve.getParameter(H),maxAttributes:Ve.getParameter(X),maxVertexUniforms:Ve.getParameter($),maxVertexTextureUnits:Ve.getParameter(ue),maxVaryingVectors:Ve.getParameter(Q),maxFragmentUniforms:Ve.getParameter(ge),glsl:Ve.getParameter(_e),renderer:Ve.getParameter(Ue),vendor:Ve.getParameter(Ce),version:Ve.getParameter(Oe),readFloat:Kr,npotTextureCube:Ua}},Ut=function(Ve){return Ve instanceof Uint8Array||Ve instanceof Uint16Array||Ve instanceof Uint32Array||Ve instanceof Int8Array||Ve instanceof Int16Array||Ve instanceof Int32Array||Ve instanceof Float32Array||Ve instanceof Float64Array||Ve instanceof Uint8ClampedArray};function Jt(Ve){return!!Ve&&typeof Ve=="object"&&Array.isArray(Ve.shape)&&Array.isArray(Ve.stride)&&typeof Ve.offset=="number"&&Ve.shape.length===Ve.stride.length&&(Array.isArray(Ve.data)||Ut(Ve.data))}var at=function(Ve){return Object.keys(Ve).map(function(Pt){return Ve[Pt]})},Ee={shape:He,flatten:Fe};function Re(Ve,Pt,Ft){for(var Er=0;Er0){var Hn;if(Array.isArray(Qr[0])){Qa=fa(Qr);for(var ha=1,la=1;la0){if(typeof ha[0]=="number"){var qa=B.allocType(va.dtype,ha.length);oi(qa,ha),Qa(qa,vn),B.freeType(qa)}else if(Array.isArray(ha[0])||Ut(ha[0])){Za=fa(ha);var Ha=pa(ha,Za,va.dtype);Qa(Ha,vn),B.freeType(Ha)}}}else if(Jt(ha)){Za=ha.shape;var pn=ha.stride,Yn=0,si=0,Ya=0,xn=0;Za.length===1?(Yn=Za[0],si=1,Ya=pn[0],xn=0):Za.length===2&&(Yn=Za[0],si=Za[1],Ya=pn[0],xn=pn[1]);var li=Array.isArray(ha.data)?va.dtype:ka(ha.data),ui=B.allocType(li,Yn*si);$n(ui,ha.data,Yn,si,Ya,xn,ha.offset),Qa(ui,vn),B.freeType(ui)}return on}return ba||on(yr),on._reglType="buffer",on._buffer=va,on.subdata=Hn,Ft.profile&&(on.stats=va.stats),on.destroy=function(){Tn(va)},on}function ua(){at(Kr).forEach(function(yr){yr.buffer=Ve.createBuffer(),Ve.bindBuffer(yr.type,yr.buffer),Ve.bufferData(yr.type,yr.persistentData||yr.byteLength,yr.usage)})}return Ft.profile&&(Pt.getTotalBufferSize=function(){var yr=0;return Object.keys(Kr).forEach(function(Qr){yr+=Kr[Qr].stats.size}),yr}),{create:nn,createStream:Ra,destroyStream:Ba,clear:function(){at(Kr).forEach(Tn),_a.forEach(Tn)},getBuffer:function(yr){return yr&&yr._buffer instanceof Yr?yr._buffer:null},restore:ua,_initBuffer:Wn}}var ci=0,hi=0,Pi=1,Jn=1,Ti=4,_n=4,Ln={points:ci,point:hi,lines:Pi,line:Jn,triangles:Ti,triangle:_n,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},ji=0,Zi=1,un=4,rn=5120,nt=5121,Ke=5122,Qt=5123,Xt=5124,nr=5125,cr=34963,rr=35040,Ze=35044;function xt(Ve,Pt,Ft,Er){var Xr={},Kr=0,Yr={uint8:nt,uint16:Qt};Pt.oes_element_index_uint&&(Yr.uint32=nr);function _a(ua){this.id=Kr++,Xr[this.id]=this,this.buffer=ua,this.primType=un,this.vertCount=0,this.type=0}_a.prototype.bind=function(){this.buffer.bind()};var Ra=[];function Ba(ua){var yr=Ra.pop();return yr||(yr=new _a(Ft.create(null,cr,!0,!1)._buffer)),Wn(yr,ua,rr,-1,-1,0,0),yr}function Ua(ua){Ra.push(ua)}function Wn(ua,yr,Qr,ba,Fa,va,on){ua.buffer.bind();var Qa;if(yr){var Hn=on;!on&&(!Ut(yr)||Jt(yr)&&!Ut(yr.data))&&(Hn=Pt.oes_element_index_uint?nr:Qt),Ft._initBuffer(ua.buffer,yr,Qr,Hn,3)}else Ve.bufferData(cr,va,Qr),ua.buffer.dtype=Qa||nt,ua.buffer.usage=Qr,ua.buffer.dimension=3,ua.buffer.byteLength=va;if(Qa=on,!on){switch(ua.buffer.dtype){case nt:case rn:Qa=nt;break;case Qt:case Ke:Qa=Qt;break;case nr:case Xt:Qa=nr;break;default:}ua.buffer.dtype=Qa}ua.type=Qa;var ha=Fa;ha<0&&(ha=ua.buffer.byteLength,Qa===Qt?ha>>=1:Qa===nr&&(ha>>=2)),ua.vertCount=ha;var la=ba;if(ba<0){la=un;var vn=ua.buffer.dimension;vn===1&&(la=ji),vn===2&&(la=Zi),vn===3&&(la=un)}ua.primType=la}function Tn(ua){Er.elementsCount--,delete Xr[ua.id],ua.buffer.destroy(),ua.buffer=null}function nn(ua,yr){var Qr=Ft.create(null,cr,!0),ba=new _a(Qr._buffer);Er.elementsCount++;function Fa(va){if(!va)Qr(),ba.primType=un,ba.vertCount=0,ba.type=nt;else if(typeof va=="number")Qr(va),ba.primType=un,ba.vertCount=va|0,ba.type=nt;else{var on=null,Qa=Ze,Hn=-1,ha=-1,la=0,vn=0;Array.isArray(va)||Ut(va)||Jt(va)?on=va:("data"in va&&(on=va.data),"usage"in va&&(Qa=wa[va.usage]),"primitive"in va&&(Hn=Ln[va.primitive]),"count"in va&&(ha=va.count|0),"type"in va&&(vn=Yr[va.type]),"length"in va?la=va.length|0:(la=ha,vn===Qt||vn===Ke?la*=2:(vn===nr||vn===Xt)&&(la*=4))),Wn(ba,on,Qa,Hn,ha,la,vn)}return Fa}return Fa(ua),Fa._reglType="elements",Fa._elements=ba,Fa.subdata=function(va,on){return Qr.subdata(va,on),Fa},Fa.destroy=function(){Tn(ba)},Fa}return{create:nn,createStream:Ba,destroyStream:Ua,getElements:function(ua){return typeof ua=="function"&&ua._elements instanceof _a?ua._elements:null},clear:function(){at(Xr).forEach(Tn)}}}var Vt=new Float32Array(1),er=new Uint32Array(Vt.buffer),Tr=5123;function jr(Ve){for(var Pt=B.allocType(Tr,Ve.length),Ft=0;Ft>>31<<15,Kr=(Er<<1>>>24)-127,Yr=Er>>13&1023;if(Kr<-24)Pt[Ft]=Xr;else if(Kr<-14){var _a=-14-Kr;Pt[Ft]=Xr+(Yr+1024>>_a)}else Kr>15?Pt[Ft]=Xr+31744:Pt[Ft]=Xr+(Kr+15<<10)+Yr}return Pt}function Fr(Ve){return Array.isArray(Ve)||Ut(Ve)}var kr=34467,ra=3553,ja=34067,La=34069,Dn=6408,Mn=6406,_i=6407,ti=6409,Si=6410,ai=32854,Ao=32855,yo=36194,Vn=32819,Bo=32820,Mo=33635,co=34042,Ro=6402,ao=34041,Co=35904,Wo=35906,Po=36193,vi=33776,zi=33777,ho=33778,ro=33779,es=35986,Ho=35987,is=34798,as=35840,vs=35841,Yo=35842,po=35843,_s=36196,qo=5121,Io=5123,tl=5125,ts=5126,qs=10242,Xs=10243,ps=10497,ml=33071,xl=33648,fs=10240,Wl=10241,Ss=9728,ls=9729,No=9984,Do=9985,hs=9986,Jl=9987,du=33170,Ql=4352,Ou=4353,Uu=4354,Xu=34046,$u=3317,fc=37440,_c=37441,vu=37443,pu=37444,mu=33984,eu=[No,hs,Do,Jl],Vs=[0,ti,Si,_i,Dn],os={};os[ti]=os[Mn]=os[Ro]=1,os[ao]=os[Si]=2,os[_i]=os[Co]=3,os[Dn]=os[Wo]=4;function sl(Ve){return"[object "+Ve+"]"}var Tu=sl("HTMLCanvasElement"),ju=sl("OffscreenCanvas"),bc=sl("CanvasRenderingContext2D"),Hs=sl("ImageBitmap"),Af=sl("HTMLImageElement"),Xo=sl("HTMLVideoElement"),Mf=Object.keys(We).concat([Tu,ju,bc,Hs,Af,Xo]),ns=[];ns[qo]=1,ns[ts]=4,ns[Po]=2,ns[Io]=2,ns[tl]=4;var so=[];so[ai]=2,so[Ao]=2,so[yo]=2,so[ao]=4,so[vi]=.5,so[zi]=.5,so[ho]=1,so[ro]=1,so[es]=.5,so[Ho]=1,so[is]=1,so[as]=.5,so[vs]=.25,so[Yo]=.5,so[po]=.25,so[_s]=.5;function qu(Ve){return Array.isArray(Ve)&&(Ve.length===0||typeof Ve[0]=="number")}function hc(Ve){if(!Array.isArray(Ve))return!1;var Pt=Ve.length;return!(Pt===0||!Fr(Ve[0]))}function Ll(Ve){return Object.prototype.toString.call(Ve)}function Qc(Ve){return Ll(Ve)===Tu}function Au(Ve){return Ll(Ve)===ju}function Zu(Ve){return Ll(Ve)===bc}function ll(Ve){return Ll(Ve)===Hs}function ef(Ve){return Ll(Ve)===Af}function zc(Ve){return Ll(Ve)===Xo}function Ku(Ve){if(!Ve)return!1;var Pt=Ll(Ve);return Mf.indexOf(Pt)>=0?!0:qu(Ve)||hc(Ve)||Jt(Ve)}function Ju(Ve){return We[Object.prototype.toString.call(Ve)]|0}function Bc(Ve,Pt){var Ft=Pt.length;switch(Ve.type){case qo:case Io:case tl:case ts:var Er=B.allocType(Ve.type,Ft);Er.set(Pt),Ve.data=Er;break;case Po:Ve.data=jr(Pt);break;default:}}function Nc(Ve,Pt){return B.allocType(Ve.type===Po?ts:Ve.type,Pt)}function tu(Ve,Pt){Ve.type===Po?(Ve.data=jr(Pt),B.freeType(Pt)):Ve.data=Pt}function xc(Ve,Pt,Ft,Er,Xr,Kr){for(var Yr=Ve.width,_a=Ve.height,Ra=Ve.channels,Ba=Yr*_a*Ra,Ua=Nc(Ve,Ba),Wn=0,Tn=0;Tn<_a;++Tn)for(var nn=0;nn=1;)_a+=Yr*Ra*Ra,Ra/=2;return _a}else return Yr*Ft*Er}function Qu(Ve,Pt,Ft,Er,Xr,Kr,Yr){var _a={"don't care":Ql,"dont care":Ql,nice:Uu,fast:Ou},Ra={repeat:ps,clamp:ml,mirror:xl},Ba={nearest:Ss,linear:ls},Ua=u({mipmap:Jl,"nearest mipmap nearest":No,"linear mipmap nearest":Do,"nearest mipmap linear":hs,"linear mipmap linear":Jl},Ba),Wn={none:0,browser:pu},Tn={uint8:qo,rgba4:Vn,rgb565:Mo,"rgb5 a1":Bo},nn={alpha:Mn,luminance:ti,"luminance alpha":Si,rgb:_i,rgba:Dn,rgba4:ai,"rgb5 a1":Ao,rgb565:yo},ua={};Pt.ext_srgb&&(nn.srgb=Co,nn.srgba=Wo),Pt.oes_texture_float&&(Tn.float32=Tn.float=ts),Pt.oes_texture_half_float&&(Tn.float16=Tn["half float"]=Po),Pt.webgl_depth_texture&&(u(nn,{depth:Ro,"depth stencil":ao}),u(Tn,{uint16:Io,uint32:tl,"depth stencil":co})),Pt.webgl_compressed_texture_s3tc&&u(ua,{"rgb s3tc dxt1":vi,"rgba s3tc dxt1":zi,"rgba s3tc dxt3":ho,"rgba s3tc dxt5":ro}),Pt.webgl_compressed_texture_atc&&u(ua,{"rgb atc":es,"rgba atc explicit alpha":Ho,"rgba atc interpolated alpha":is}),Pt.webgl_compressed_texture_pvrtc&&u(ua,{"rgb pvrtc 4bppv1":as,"rgb pvrtc 2bppv1":vs,"rgba pvrtc 4bppv1":Yo,"rgba pvrtc 2bppv1":po}),Pt.webgl_compressed_texture_etc1&&(ua["rgb etc1"]=_s);var yr=Array.prototype.slice.call(Ve.getParameter(kr));Object.keys(ua).forEach(function(Lt){var Vr=ua[Lt];yr.indexOf(Vr)>=0&&(nn[Lt]=Vr)});var Qr=Object.keys(nn);Ft.textureFormats=Qr;var ba=[];Object.keys(nn).forEach(function(Lt){var Vr=nn[Lt];ba[Vr]=Lt});var Fa=[];Object.keys(Tn).forEach(function(Lt){var Vr=Tn[Lt];Fa[Vr]=Lt});var va=[];Object.keys(Ba).forEach(function(Lt){var Vr=Ba[Lt];va[Vr]=Lt});var on=[];Object.keys(Ua).forEach(function(Lt){var Vr=Ua[Lt];on[Vr]=Lt});var Qa=[];Object.keys(Ra).forEach(function(Lt){var Vr=Ra[Lt];Qa[Vr]=Lt});var Hn=Qr.reduce(function(Lt,Vr){var Gr=nn[Vr];return Gr===ti||Gr===Mn||Gr===ti||Gr===Si||Gr===Ro||Gr===ao||Pt.ext_srgb&&(Gr===Co||Gr===Wo)?Lt[Gr]=Gr:Gr===Ao||Vr.indexOf("rgba")>=0?Lt[Gr]=Dn:Lt[Gr]=_i,Lt},{});function ha(){this.internalformat=Dn,this.format=Dn,this.type=qo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=pu,this.width=0,this.height=0,this.channels=0}function la(Lt,Vr){Lt.internalformat=Vr.internalformat,Lt.format=Vr.format,Lt.type=Vr.type,Lt.compressed=Vr.compressed,Lt.premultiplyAlpha=Vr.premultiplyAlpha,Lt.flipY=Vr.flipY,Lt.unpackAlignment=Vr.unpackAlignment,Lt.colorSpace=Vr.colorSpace,Lt.width=Vr.width,Lt.height=Vr.height,Lt.channels=Vr.channels}function vn(Lt,Vr){if(!(typeof Vr!="object"||!Vr)){if("premultiplyAlpha"in Vr&&(Lt.premultiplyAlpha=Vr.premultiplyAlpha),"flipY"in Vr&&(Lt.flipY=Vr.flipY),"alignment"in Vr&&(Lt.unpackAlignment=Vr.alignment),"colorSpace"in Vr&&(Lt.colorSpace=Wn[Vr.colorSpace]),"type"in Vr){var Gr=Vr.type;Lt.type=Tn[Gr]}var En=Lt.width,Hi=Lt.height,zo=Lt.channels,kn=!1;"shape"in Vr?(En=Vr.shape[0],Hi=Vr.shape[1],Vr.shape.length===3&&(zo=Vr.shape[2],kn=!0)):("radius"in Vr&&(En=Hi=Vr.radius),"width"in Vr&&(En=Vr.width),"height"in Vr&&(Hi=Vr.height),"channels"in Vr&&(zo=Vr.channels,kn=!0)),Lt.width=En|0,Lt.height=Hi|0,Lt.channels=zo|0;var wt=!1;if("format"in Vr){var Rt=Vr.format,Kt=Lt.internalformat=nn[Rt];Lt.format=Hn[Kt],Rt in Tn&&("type"in Vr||(Lt.type=Tn[Rt])),Rt in ua&&(Lt.compressed=!0),wt=!0}!kn&&wt?Lt.channels=os[Lt.format]:kn&&!wt&&Lt.channels!==Vs[Lt.format]&&(Lt.format=Lt.internalformat=Vs[Lt.channels])}}function Za(Lt){Ve.pixelStorei(fc,Lt.flipY),Ve.pixelStorei(_c,Lt.premultiplyAlpha),Ve.pixelStorei(vu,Lt.colorSpace),Ve.pixelStorei($u,Lt.unpackAlignment)}function qa(){ha.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Ha(Lt,Vr){var Gr=null;if(Ku(Vr)?Gr=Vr:Vr&&(vn(Lt,Vr),"x"in Vr&&(Lt.xOffset=Vr.x|0),"y"in Vr&&(Lt.yOffset=Vr.y|0),Ku(Vr.data)&&(Gr=Vr.data)),Vr.copy){var En=Xr.viewportWidth,Hi=Xr.viewportHeight;Lt.width=Lt.width||En-Lt.xOffset,Lt.height=Lt.height||Hi-Lt.yOffset,Lt.needsCopy=!0}else if(!Gr)Lt.width=Lt.width||1,Lt.height=Lt.height||1,Lt.channels=Lt.channels||4;else if(Ut(Gr))Lt.channels=Lt.channels||4,Lt.data=Gr,!("type"in Vr)&&Lt.type===qo&&(Lt.type=Ju(Gr));else if(qu(Gr))Lt.channels=Lt.channels||4,Bc(Lt,Gr),Lt.alignment=1,Lt.needsFree=!0;else if(Jt(Gr)){var zo=Gr.data;!Array.isArray(zo)&&Lt.type===qo&&(Lt.type=Ju(zo));var kn=Gr.shape,wt=Gr.stride,Rt,Kt,Or,Jr,br,mr;kn.length===3?(Or=kn[2],mr=wt[2]):(Or=1,mr=1),Rt=kn[0],Kt=kn[1],Jr=wt[0],br=wt[1],Lt.alignment=1,Lt.width=Rt,Lt.height=Kt,Lt.channels=Or,Lt.format=Lt.internalformat=Vs[Or],Lt.needsFree=!0,xc(Lt,zo,Jr,br,mr,Gr.offset)}else if(Qc(Gr)||Au(Gr)||Zu(Gr))Qc(Gr)||Au(Gr)?Lt.element=Gr:Lt.element=Gr.canvas,Lt.width=Lt.element.width,Lt.height=Lt.element.height,Lt.channels=4;else if(ll(Gr))Lt.element=Gr,Lt.width=Gr.width,Lt.height=Gr.height,Lt.channels=4;else if(ef(Gr))Lt.element=Gr,Lt.width=Gr.naturalWidth,Lt.height=Gr.naturalHeight,Lt.channels=4;else if(zc(Gr))Lt.element=Gr,Lt.width=Gr.videoWidth,Lt.height=Gr.videoHeight,Lt.channels=4;else if(hc(Gr)){var or=Lt.width||Gr[0].length,Yt=Lt.height||Gr.length,ar=Lt.channels;Fr(Gr[0][0])?ar=ar||Gr[0][0].length:ar=ar||1;for(var Nt=Ee.shape(Gr),Cr=1,ta=0;ta>=Hi,Gr.height>>=Hi,Ha(Gr,En[Hi]),Lt.mipmask|=1<=0&&!("faces"in Vr)&&(Lt.genMipmaps=!0)}if("mag"in Vr){var En=Vr.mag;Lt.magFilter=Ba[En]}var Hi=Lt.wrapS,zo=Lt.wrapT;if("wrap"in Vr){var kn=Vr.wrap;typeof kn=="string"?Hi=zo=Ra[kn]:Array.isArray(kn)&&(Hi=Ra[kn[0]],zo=Ra[kn[1]])}else{if("wrapS"in Vr){var wt=Vr.wrapS;Hi=Ra[wt]}if("wrapT"in Vr){var Rt=Vr.wrapT;zo=Ra[Rt]}}if(Lt.wrapS=Hi,Lt.wrapT=zo,"anisotropic"in Vr){var Kt=Vr.anisotropic;Lt.anisotropic=Vr.anisotropic}if("mipmap"in Vr){var Or=!1;switch(typeof Vr.mipmap){case"string":Lt.mipmapHint=_a[Vr.mipmap],Lt.genMipmaps=!0,Or=!0;break;case"boolean":Or=Lt.genMipmaps=Vr.mipmap;break;case"object":Lt.genMipmaps=!1,Or=!0;break;default:}Or&&!("min"in Vr)&&(Lt.minFilter=No)}}function Ns(Lt,Vr){Ve.texParameteri(Vr,Wl,Lt.minFilter),Ve.texParameteri(Vr,fs,Lt.magFilter),Ve.texParameteri(Vr,qs,Lt.wrapS),Ve.texParameteri(Vr,Xs,Lt.wrapT),Pt.ext_texture_filter_anisotropic&&Ve.texParameteri(Vr,Xu,Lt.anisotropic),Lt.genMipmaps&&(Ve.hint(du,Lt.mipmapHint),Ve.generateMipmap(Vr))}var nl=0,As={},Ms=Ft.maxTextureUnits,Ps=Array(Ms).map(function(){return null});function Ai(Lt){ha.call(this),this.mipmask=0,this.internalformat=Dn,this.id=nl++,this.refCount=1,this.target=Lt,this.texture=Ve.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Fo,Yr.profile&&(this.stats={size:0})}function Os(Lt){Ve.activeTexture(mu),Ve.bindTexture(Lt.target,Lt.texture)}function jo(){var Lt=Ps[0];Lt?Ve.bindTexture(Lt.target,Lt.texture):Ve.bindTexture(ra,null)}function fl(Lt){var Vr=Lt.texture,Gr=Lt.unit,En=Lt.target;Gr>=0&&(Ve.activeTexture(mu+Gr),Ve.bindTexture(En,null),Ps[Gr]=null),Ve.deleteTexture(Vr),Lt.texture=null,Lt.params=null,Lt.pixels=null,Lt.refCount=0,delete As[Lt.id],Kr.textureCount--}u(Ai.prototype,{bind:function(){var Lt=this;Lt.bindCount+=1;var Vr=Lt.unit;if(Vr<0){for(var Gr=0;Gr0)continue;En.unit=-1}Ps[Gr]=Lt,Vr=Gr;break}Vr>=Ms,Yr.profile&&Kr.maxTextureUnits>br)-Or,mr.height=mr.height||(Gr.height>>br)-Jr,Os(Gr),Yn(mr,ra,Or,Jr,br),jo(),xn(mr),En}function zo(kn,wt){var Rt=kn|0,Kt=wt|0||Rt;if(Rt===Gr.width&&Kt===Gr.height)return En;En.width=Gr.width=Rt,En.height=Gr.height=Kt,Os(Gr);for(var Or=0;Gr.mipmask>>Or;++Or){var Jr=Rt>>Or,br=Kt>>Or;if(!Jr||!br)break;Ve.texImage2D(ra,Or,Gr.format,Jr,br,0,Gr.format,Gr.type,null)}return jo(),Yr.profile&&(Gr.stats.size=ru(Gr.internalformat,Gr.type,Rt,Kt,!1,!1)),En}return En(Lt,Vr),En.subimage=Hi,En.resize=zo,En._reglType="texture2d",En._texture=Gr,Yr.profile&&(En.stats=Gr.stats),En.destroy=function(){Gr.decRef()},En}function Sl(Lt,Vr,Gr,En,Hi,zo){var kn=new Ai(ja);As[kn.id]=kn,Kr.cubeCount++;var wt=new Array(6);function Rt(Jr,br,mr,or,Yt,ar){var Nt,Cr=kn.texInfo;for(Fo.call(Cr),Nt=0;Nt<6;++Nt)wt[Nt]=Wi();if(typeof Jr=="number"||!Jr){var ta=Jr|0||1;for(Nt=0;Nt<6;++Nt)ui(wt[Nt],ta,ta)}else if(typeof Jr=="object")if(br)Ri(wt[0],Jr),Ri(wt[1],br),Ri(wt[2],mr),Ri(wt[3],or),Ri(wt[4],Yt),Ri(wt[5],ar);else if(Js(Cr,Jr),vn(kn,Jr),"faces"in Jr){var xa=Jr.faces;for(Nt=0;Nt<6;++Nt)la(wt[Nt],kn),Ri(wt[Nt],xa[Nt])}else for(Nt=0;Nt<6;++Nt)Ri(wt[Nt],Jr);for(la(kn,wt[0]),Cr.genMipmaps?kn.mipmask=(wt[0].width<<1)-1:kn.mipmask=wt[0].mipmask,kn.internalformat=wt[0].internalformat,Rt.width=wt[0].width,Rt.height=wt[0].height,Os(kn),Nt=0;Nt<6;++Nt)cs(wt[Nt],La+Nt);for(Ns(Cr,ja),jo(),Yr.profile&&(kn.stats.size=ru(kn.internalformat,kn.type,Rt.width,Rt.height,Cr.genMipmaps,!0)),Rt.format=ba[kn.internalformat],Rt.type=Fa[kn.type],Rt.mag=va[Cr.magFilter],Rt.min=on[Cr.minFilter],Rt.wrapS=Qa[Cr.wrapS],Rt.wrapT=Qa[Cr.wrapT],Nt=0;Nt<6;++Nt)Ml(wt[Nt]);return Rt}function Kt(Jr,br,mr,or,Yt){var ar=mr|0,Nt=or|0,Cr=Yt|0,ta=Ya();return la(ta,kn),ta.width=0,ta.height=0,Ha(ta,br),ta.width=ta.width||(kn.width>>Cr)-ar,ta.height=ta.height||(kn.height>>Cr)-Nt,Os(kn),Yn(ta,La+Jr,ar,Nt,Cr),jo(),xn(ta),Rt}function Or(Jr){var br=Jr|0;if(br!==kn.width){Rt.width=kn.width=br,Rt.height=kn.height=br,Os(kn);for(var mr=0;mr<6;++mr)for(var or=0;kn.mipmask>>or;++or)Ve.texImage2D(La+mr,or,kn.format,br>>or,br>>or,0,kn.format,kn.type,null);return jo(),Yr.profile&&(kn.stats.size=ru(kn.internalformat,kn.type,Rt.width,Rt.height,!1,!0)),Rt}}return Rt(Lt,Vr,Gr,En,Hi,zo),Rt.subimage=Kt,Rt.resize=Or,Rt._reglType="textureCube",Rt._texture=kn,Yr.profile&&(Rt.stats=kn.stats),Rt.destroy=function(){kn.decRef()},Rt}function di(){for(var Lt=0;Lt>En,Gr.height>>En,0,Gr.internalformat,Gr.type,null);else for(var Hi=0;Hi<6;++Hi)Ve.texImage2D(La+Hi,En,Gr.internalformat,Gr.width>>En,Gr.height>>En,0,Gr.internalformat,Gr.type,null);Ns(Gr.texInfo,Gr.target)})}function lo(){for(var Lt=0;Lt=0?Ml=!0:Ra.indexOf(Fo)>=0&&(Ml=!1))),("depthTexture"in Ai||"depthStencilTexture"in Ai)&&(Ps=!!(Ai.depthTexture||Ai.depthStencilTexture)),"depth"in Ai&&(typeof Ai.depth=="boolean"?cs=Ai.depth:(nl=Ai.depth,Ls=!1)),"stencil"in Ai&&(typeof Ai.stencil=="boolean"?Ls=Ai.stencil:(As=Ai.stencil,cs=!1)),"depthStencil"in Ai&&(typeof Ai.depthStencil=="boolean"?cs=Ls=Ai.depthStencil:(Ms=Ai.depthStencil,cs=!1,Ls=!1))}var jo=null,fl=null,hl=null,Sl=null;if(Array.isArray(Wi))jo=Wi.map(ua);else if(Wi)jo=[ua(Wi)];else for(jo=new Array(Ns),li=0;li0&&(xn.depth=Ha[0].depth,xn.stencil=Ha[0].stencil,xn.depthStencil=Ha[0].depthStencil),Ha[Ya]?Ha[Ya](xn):Ha[Ya]=la(xn)}return u(pn,{width:li,height:li,color:Fo})}function Yn(si){var Ya,xn=si|0;if(xn===pn.width)return pn;var li=pn.color;for(Ya=0;Ya=li.byteLength?ui.subdata(li):(ui.destroy(),la.buffers[si]=null)),la.buffers[si]||(ui=la.buffers[si]=Xr.create(Ya,Uc,!1,!0)),xn.buffer=Xr.getBuffer(ui),xn.size=xn.buffer.dimension|0,xn.normalized=!1,xn.type=xn.buffer.dtype,xn.offset=0,xn.stride=0,xn.divisor=0,xn.state=1,pn[si]=1}else Xr.getBuffer(Ya)?(xn.buffer=Xr.getBuffer(Ya),xn.size=xn.buffer.dimension|0,xn.normalized=!1,xn.type=xn.buffer.dtype,xn.offset=0,xn.stride=0,xn.divisor=0,xn.state=1):Xr.getBuffer(Ya.buffer)?(xn.buffer=Xr.getBuffer(Ya.buffer),xn.size=(+Ya.size||xn.buffer.dimension)|0,xn.normalized=!!Ya.normalized||!1,"type"in Ya?xn.type=$r[Ya.type]:xn.type=xn.buffer.dtype,xn.offset=(Ya.offset||0)|0,xn.stride=(Ya.stride||0)|0,xn.divisor=(Ya.divisor||0)|0,xn.state=1):"x"in Ya&&(xn.x=+Ya.x||0,xn.y=+Ya.y||0,xn.z=+Ya.z||0,xn.w=+Ya.w||0,xn.state=2)}for(var Ri=0;Ri1)for(var Za=0;Zayr&&(yr=Qr.stats.uniformsCount)}),yr},Ft.getMaxAttributesCount=function(){var yr=0;return Ua.forEach(function(Qr){Qr.stats.attributesCount>yr&&(yr=Qr.stats.attributesCount)}),yr});function ua(){Xr={},Kr={};for(var yr=0;yr16&&(Ft=Wa(Ft,Ve.length*8));for(var Er=Array(16),Xr=Array(16),Kr=0;Kr<16;Kr++)Er[Kr]=Ft[Kr]^909522486,Xr[Kr]=Ft[Kr]^1549556828;var Yr=Wa(Er.concat(Fu(Pt)),512+Pt.length*8);return Mt(Wa(Xr.concat(Yr),768))}function Su(Ve){for(var Pt=Cf?"0123456789ABCDEF":"0123456789abcdef",Ft="",Er,Xr=0;Xr>>4&15)+Pt.charAt(Er&15);return Ft}function lf(Ve){for(var Pt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ft="",Er=Ve.length,Xr=0;XrVe.length*8?Ft+=Mc:Ft+=Pt.charAt(Kr>>>6*(3-Yr)&63);return Ft}function Lf(Ve,Pt){var Ft=Pt.length,Er=Array(),Xr,Kr,Yr,_a,Ra=Array(Math.ceil(Ve.length/2));for(Xr=0;Xr0;){for(_a=Array(),Yr=0,Xr=0;Xr0||Kr>0)&&(_a[_a.length]=Kr);Er[Er.length]=Yr,Ra=_a}var Ba="";for(Xr=Er.length-1;Xr>=0;Xr--)Ba+=Pt.charAt(Er[Xr]);var Ua=Math.ceil(Ve.length*8/(Math.log(Pt.length)/Math.log(2)));for(Xr=Ba.length;Xr>>6&31,128|Er&63):Er<=65535?Pt+=String.fromCharCode(224|Er>>>12&15,128|Er>>>6&63,128|Er&63):Er<=2097151&&(Pt+=String.fromCharCode(240|Er>>>18&7,128|Er>>>12&63,128|Er>>>6&63,128|Er&63));return Pt}function Fu(Ve){for(var Pt=Array(Ve.length>>2),Ft=0;Ft>5]|=(Ve.charCodeAt(Ft/8)&255)<<24-Ft%32;return Pt}function Mt(Ve){for(var Pt="",Ft=0;Ft>5]>>>24-Ft%32&255);return Pt}function jt(Ve,Pt){return Ve>>>Pt|Ve<<32-Pt}function _r(Ve,Pt){return Ve>>>Pt}function dr(Ve,Pt,Ft){return Ve&Pt^~Ve&Ft}function ea(Ve,Pt,Ft){return Ve&Pt^Ve&Ft^Pt&Ft}function Aa(Ve){return jt(Ve,2)^jt(Ve,13)^jt(Ve,22)}function Ga(Ve){return jt(Ve,6)^jt(Ve,11)^jt(Ve,25)}function fn(Ve){return jt(Ve,7)^jt(Ve,18)^_r(Ve,3)}function gn(Ve){return jt(Ve,17)^jt(Ve,19)^_r(Ve,10)}var qn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Wa(Ve,Pt){var Ft=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Er=new Array(64),Xr,Kr,Yr,_a,Ra,Ba,Ua,Wn,Tn,nn,ua,yr;for(Ve[Pt>>5]|=128<<24-Pt%32,Ve[(Pt+64>>9<<4)+15]=Pt,Tn=0;Tn>16)+(Pt>>16)+(Ft>>16);return Er<<16|Ft&65535}function sn(Ve){return Array.prototype.slice.call(Ve)}function Pa(Ve){return sn(Ve).join("")}function Qn(Ve){var Pt=Ve&&Ve.cache,Ft=0,Er=[],Xr=[],Kr=[];function Yr(ua,yr){var Qr=yr&&yr.stable;if(!Qr){for(var ba=0;ba0&&(ua.push(Fa,"="),ua.push.apply(ua,sn(arguments)),ua.push(";")),Fa}return u(yr,{def:ba,toString:function(){return Pa([Qr.length>0?"var "+Qr.join(",")+";":"",Pa(ua)])}})}function Ra(){var ua=_a(),yr=_a(),Qr=ua.toString,ba=yr.toString;function Fa(va,on){yr(va,on,"=",ua.def(va,on),";")}return u(function(){ua.apply(ua,sn(arguments))},{def:ua.def,entry:ua,exit:yr,save:Fa,set:function(va,on,Qa){Fa(va,on),ua(va,on,"=",Qa,";")},toString:function(){return Qr()+ba()}})}function Ba(){var ua=Pa(arguments),yr=Ra(),Qr=Ra(),ba=yr.toString,Fa=Qr.toString;return u(yr,{then:function(){return yr.apply(yr,sn(arguments)),this},else:function(){return Qr.apply(Qr,sn(arguments)),this},toString:function(){var va=Fa();return va&&(va="else{"+va+"}"),Pa(["if(",ua,"){",ba(),"}",va])}})}var Ua=_a(),Wn={};function Tn(ua,yr){var Qr=[];function ba(){var Hn="a"+Qr.length;return Qr.push(Hn),Hn}yr=yr||0;for(var Fa=0;Fa":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},oa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},ma={cw:Be,ccw:$e};function Ma(Ve){return Array.isArray(Ve)||Ut(Ve)||Jt(Ve)}function Ca(Ve){return Ve.sort(function(Pt,Ft){return Pt===de?-1:Ft===de?1:Pt=1,Er>=2,Pt)}else if(Ft===Go){var Xr=Ve.data;return new aa(Xr.thisDep,Xr.contextDep,Xr.propDep,Pt)}else{if(Ft===bs)return new aa(!1,!1,!1,Pt);if(Ft===Jo){for(var Kr=!1,Yr=!1,_a=!1,Ra=0;Ra=1&&(Yr=!0),Ua>=2&&(_a=!0)}else Ba.type===Go&&(Kr=Kr||Ba.data.thisDep,Yr=Yr||Ba.data.contextDep,_a=_a||Ba.data.propDep)}return new aa(Kr,Yr,_a,Pt)}else return new aa(Ft===wo,Ft===no,Ft===Rn,Pt)}}var xi=new aa(!1,!1,!1,function(){});function Ui(Ve,Pt,Ft,Er,Xr,Kr,Yr,_a,Ra,Ba,Ua,Wn,Tn,nn,ua,yr){var Qr=Ba.Record,ba={add:32774,subtract:32778,"reverse subtract":32779};Ft.ext_blend_minmax&&(ba.min=Je,ba.max=it);var Fa=Ft.angle_instanced_arrays,va=Ft.webgl_draw_buffers,on=Ft.oes_vertex_array_object,Qa={dirty:!0,profile:yr.profile},Hn={},ha=[],la={},vn={};function Za(wt){return wt.replace(".","_")}function qa(wt,Rt,Kt){var Or=Za(wt);ha.push(wt),Hn[Or]=Qa[Or]=!!Kt,la[Or]=Rt}function Ha(wt,Rt,Kt){var Or=Za(wt);ha.push(wt),Array.isArray(Kt)?(Qa[Or]=Kt.slice(),Hn[Or]=Kt.slice()):Qa[Or]=Hn[Or]=Kt,vn[Or]=Rt}function pn(wt){return!!isNaN(wt)}qa(Es,Sa),qa(Vo,ia),Ha(yl,"blendColor",[0,0,0,0]),Ha(Ws,"blendEquationSeparate",[ur,ur]),Ha(xs,"blendFuncSeparate",[sr,qt,sr,qt]),qa(bi,an,!0),Ha(ss,"depthFunc",qr),Ha(ms,"depthRange",[0,1]),Ha($o,"depthMask",!0),Ha(ul,ul,[!0,!0,!0,!0]),qa(yu,Wr),Ha(iu,"cullFace",we),Ha(zu,zu,$e),Ha(Tl,Tl,1),qa(Eu,ei),Ha(Al,"polygonOffset",[0,0]),qa(nc,Mi),qa(Xi,pi),Ha(vo,"sampleCoverage",[1,!1]),qa(mf,ln),Ha(kc,"stencilMask",-1),Ha(ou,"stencilFunc",[Ct,0,-1]),Ha(Me,"stencilOpSeparate",[le,bt,bt,bt]),Ha(L,"stencilOpSeparate",[we,bt,bt,bt]),qa(J,wn),Ha(fe,"scissor",[0,0,Ve.drawingBufferWidth,Ve.drawingBufferHeight]),Ha(de,de,[0,0,Ve.drawingBufferWidth,Ve.drawingBufferHeight]);var Yn={gl:Ve,context:Tn,strings:Pt,next:Hn,current:Qa,draw:Wn,elements:Kr,buffer:Xr,shader:Ua,attributes:Ba.state,vao:Ba,uniforms:Ra,framebuffer:_a,extensions:Ft,timer:nn,isBufferArgs:Ma},si={primTypes:Ln,compareFuncs:Zr,blendFuncs:Ea,blendEquations:ba,stencilOps:oa,glTypes:$r,orientationType:ma};va&&(si.backBuffer=[we],si.drawBuffer=m(Er.maxDrawbuffers,function(wt){return wt===0?[0]:m(wt,function(Rt){return ya+Rt})}));var Ya=0;function xn(){var wt=Qn({cache:ua}),Rt=wt.link,Kt=wt.global;wt.id=Ya++,wt.batchId="0";var Or=Rt(Yn),Jr=wt.shared={props:"a0"};Object.keys(Yn).forEach(function(ar){Jr[ar]=Kt.def(Or,".",ar)});var br=wt.next={},mr=wt.current={};Object.keys(vn).forEach(function(ar){Array.isArray(Qa[ar])&&(br[ar]=Kt.def(Jr.next,".",ar),mr[ar]=Kt.def(Jr.current,".",ar))});var or=wt.constants={};Object.keys(si).forEach(function(ar){or[ar]=Kt.def(JSON.stringify(si[ar]))}),wt.invoke=function(ar,Nt){switch(Nt.type){case ni:var Cr=["this",Jr.context,Jr.props,wt.batchId];return ar.def(Rt(Nt.data),".call(",Cr.slice(0,Math.max(Nt.data.length+1,4)),")");case Rn:return ar.def(Jr.props,Nt.data);case no:return ar.def(Jr.context,Nt.data);case wo:return ar.def("this",Nt.data);case Go:return Nt.data.append(wt,ar),Nt.data.ref;case bs:return Nt.data.toString();case Jo:return Nt.data.map(function(ta){return wt.invoke(ar,ta)})}},wt.attribCache={};var Yt={};return wt.scopeAttrib=function(ar){var Nt=Pt.id(ar);if(Nt in Yt)return Yt[Nt];var Cr=Ba.scope[Nt];Cr||(Cr=Ba.scope[Nt]=new Qr);var ta=Yt[Nt]=Rt(Cr);return ta},wt}function li(wt){var Rt=wt.static,Kt=wt.dynamic,Or;if(Ae in Rt){var Jr=!!Rt[Ae];Or=Bn(function(mr,or){return Jr}),Or.enable=Jr}else if(Ae in Kt){var br=Kt[Ae];Or=ri(br,function(mr,or){return mr.invoke(or,br)})}return Or}function ui(wt,Rt){var Kt=wt.static,Or=wt.dynamic;if(Ye in Kt){var Jr=Kt[Ye];return Jr?(Jr=_a.getFramebuffer(Jr),Bn(function(mr,or){var Yt=mr.link(Jr),ar=mr.shared;or.set(ar.framebuffer,".next",Yt);var Nt=ar.context;return or.set(Nt,"."+Xe,Yt+".width"),or.set(Nt,"."+st,Yt+".height"),Yt})):Bn(function(mr,or){var Yt=mr.shared;or.set(Yt.framebuffer,".next","null");var ar=Yt.context;return or.set(ar,"."+Xe,ar+"."+Ot),or.set(ar,"."+st,ar+"."+$t),"null"})}else if(Ye in Or){var br=Or[Ye];return ri(br,function(mr,or){var Yt=mr.invoke(or,br),ar=mr.shared,Nt=ar.framebuffer,Cr=or.def(Nt,".getFramebuffer(",Yt,")");or.set(Nt,".next",Cr);var ta=ar.context;return or.set(ta,"."+Xe,Cr+"?"+Cr+".width:"+ta+"."+Ot),or.set(ta,"."+st,Cr+"?"+Cr+".height:"+ta+"."+$t),Cr})}else return null}function Ri(wt,Rt,Kt){var Or=wt.static,Jr=wt.dynamic;function br(Yt){if(Yt in Or){var ar=Or[Yt],Nt=!0,Cr=ar.x|0,ta=ar.y|0,xa,Zn;return"width"in ar?xa=ar.width|0:Nt=!1,"height"in ar?Zn=ar.height|0:Nt=!1,new aa(!Nt&&Rt&&Rt.thisDep,!Nt&&Rt&&Rt.contextDep,!Nt&&Rt&&Rt.propDep,function(Xn,On){var Fn=Xn.shared.context,hn=xa;"width"in ar||(hn=On.def(Fn,".",Xe,"-",Cr));var Cn=Zn;return"height"in ar||(Cn=On.def(Fn,".",st,"-",ta)),[Cr,ta,hn,Cn]})}else if(Yt in Jr){var mn=Jr[Yt],dn=ri(mn,function(Xn,On){var Fn=Xn.invoke(On,mn),hn=Xn.shared.context,Cn=On.def(Fn,".x|0"),In=On.def(Fn,".y|0"),fi=On.def('"width" in ',Fn,"?",Fn,".width|0:","(",hn,".",Xe,"-",Cn,")"),Ko=On.def('"height" in ',Fn,"?",Fn,".height|0:","(",hn,".",st,"-",In,")");return[Cn,In,fi,Ko]});return Rt&&(dn.thisDep=dn.thisDep||Rt.thisDep,dn.contextDep=dn.contextDep||Rt.contextDep,dn.propDep=dn.propDep||Rt.propDep),dn}else return Rt?new aa(Rt.thisDep,Rt.contextDep,Rt.propDep,function(Xn,On){var Fn=Xn.shared.context;return[0,0,On.def(Fn,".",Xe),On.def(Fn,".",st)]}):null}var mr=br(de);if(mr){var or=mr;mr=new aa(mr.thisDep,mr.contextDep,mr.propDep,function(Yt,ar){var Nt=or.append(Yt,ar),Cr=Yt.shared.context;return ar.set(Cr,"."+Qe,Nt[2]),ar.set(Cr,"."+ht,Nt[3]),Nt})}return{viewport:mr,scissor_box:br(fe)}}function cs(wt,Rt){var Kt=wt.static,Or=typeof Kt[dt]=="string"&&typeof Kt[et]=="string";if(Or){if(Object.keys(Rt.dynamic).length>0)return null;var Jr=Rt.static,br=Object.keys(Jr);if(br.length>0&&typeof Jr[br[0]]=="number"){for(var mr=[],or=0;or"+Cn+"?"+Nt+".constant["+Cn+"]:0;"}).join(""),"}}else{","if(",xa,"(",Nt,".buffer)){",Xn,"=",Zn,".createStream(",pr,",",Nt,".buffer);","}else{",Xn,"=",Zn,".getBuffer(",Nt,".buffer);","}",On,'="type" in ',Nt,"?",ta.glTypes,"[",Nt,".type]:",Xn,".dtype;",mn.normalized,"=!!",Nt,".normalized;");function Fn(hn){ar(mn[hn],"=",Nt,".",hn,"|0;")}return Fn("size"),Fn("offset"),Fn("stride"),Fn("divisor"),ar("}}"),ar.exit("if(",mn.isStream,"){",Zn,".destroyStream(",Xn,");","}"),mn}Jr[br]=ri(mr,or)}),Jr}function Ns(wt){var Rt=wt.static,Kt=wt.dynamic,Or={};return Object.keys(Rt).forEach(function(Jr){var br=Rt[Jr];Or[Jr]=Bn(function(mr,or){return typeof br=="number"||typeof br=="boolean"?""+br:mr.link(br)})}),Object.keys(Kt).forEach(function(Jr){var br=Kt[Jr];Or[Jr]=ri(br,function(mr,or){return mr.invoke(or,br)})}),Or}function nl(wt,Rt,Kt,Or,Jr){var br=wt.static,mr=wt.dynamic,or=cs(wt,Rt),Yt=ui(wt,Jr),ar=Ri(wt,Yt,Jr),Nt=Wi(wt,Jr),Cr=Ml(wt,Jr),ta=Ls(wt,Jr,or);function xa(Fn){var hn=ar[Fn];hn&&(Cr[Fn]=hn)}xa(de),xa(Za(fe));var Zn=Object.keys(Cr).length>0,mn={framebuffer:Yt,draw:Nt,shader:ta,state:Cr,dirty:Zn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(mn.profile=li(wt,Jr),mn.uniforms=Fo(Kt,Jr),mn.drawVAO=mn.scopeVAO=Nt.vao,!mn.drawVAO&&ta.program&&!or&&Ft.angle_instanced_arrays&&Nt.static.elements){var dn=!0,Xn=ta.program.attributes.map(function(Fn){var hn=Rt.static[Fn];return dn=dn&&!!hn,hn});if(dn&&Xn.length>0){var On=Ba.getVAO(Ba.createVAO({attributes:Xn,elements:Nt.static.elements}));mn.drawVAO=new aa(null,null,null,function(Fn,hn){return Fn.link(On)}),mn.useVAO=!0}}return or?mn.useVAO=!0:mn.attributes=Js(Rt,Jr),mn.context=Ns(Or,Jr),mn}function As(wt,Rt,Kt){var Or=wt.shared,Jr=Or.context,br=wt.scope();Object.keys(Kt).forEach(function(mr){Rt.save(Jr,"."+mr);var or=Kt[mr],Yt=or.append(wt,Rt);Array.isArray(Yt)?br(Jr,".",mr,"=[",Yt.join(),"];"):br(Jr,".",mr,"=",Yt,";")}),Rt(br)}function Ms(wt,Rt,Kt,Or){var Jr=wt.shared,br=Jr.gl,mr=Jr.framebuffer,or;va&&(or=Rt.def(Jr.extensions,".webgl_draw_buffers"));var Yt=wt.constants,ar=Yt.drawBuffer,Nt=Yt.backBuffer,Cr;Kt?Cr=Kt.append(wt,Rt):Cr=Rt.def(mr,".next"),Or||Rt("if(",Cr,"!==",mr,".cur){"),Rt("if(",Cr,"){",br,".bindFramebuffer(",Nr,",",Cr,".framebuffer);"),va&&Rt(or,".drawBuffersWEBGL(",ar,"[",Cr,".colorAttachments.length]);"),Rt("}else{",br,".bindFramebuffer(",Nr,",null);"),va&&Rt(or,".drawBuffersWEBGL(",Nt,");"),Rt("}",mr,".cur=",Cr,";"),Or||Rt("}")}function Ps(wt,Rt,Kt){var Or=wt.shared,Jr=Or.gl,br=wt.current,mr=wt.next,or=Or.current,Yt=Or.next,ar=wt.cond(or,".dirty");ha.forEach(function(Nt){var Cr=Za(Nt);if(!(Cr in Kt.state)){var ta,xa;if(Cr in mr){ta=mr[Cr],xa=br[Cr];var Zn=m(Qa[Cr].length,function(dn){return ar.def(ta,"[",dn,"]")});ar(wt.cond(Zn.map(function(dn,Xn){return dn+"!=="+xa+"["+Xn+"]"}).join("||")).then(Jr,".",vn[Cr],"(",Zn,");",Zn.map(function(dn,Xn){return xa+"["+Xn+"]="+dn}).join(";"),";"))}else{ta=ar.def(Yt,".",Cr);var mn=wt.cond(ta,"!==",or,".",Cr);ar(mn),Cr in la?mn(wt.cond(ta).then(Jr,".enable(",la[Cr],");").else(Jr,".disable(",la[Cr],");"),or,".",Cr,"=",ta,";"):mn(Jr,".",vn[Cr],"(",ta,");",or,".",Cr,"=",ta,";")}}}),Object.keys(Kt.state).length===0&&ar(or,".dirty=false;"),Rt(ar)}function Ai(wt,Rt,Kt,Or){var Jr=wt.shared,br=wt.current,mr=Jr.current,or=Jr.gl,Yt;Ca(Object.keys(Kt)).forEach(function(ar){var Nt=Kt[ar];if(!(Or&&!Or(Nt))){var Cr=Nt.append(wt,Rt);if(la[ar]){var ta=la[ar];Sn(Nt)?(Yt=wt.link(Cr,{stable:!0}),Rt(wt.cond(Yt).then(or,".enable(",ta,");").else(or,".disable(",ta,");")),Rt(mr,".",ar,"=",Yt,";")):(Rt(wt.cond(Cr).then(or,".enable(",ta,");").else(or,".disable(",ta,");")),Rt(mr,".",ar,"=",Cr,";"))}else if(Fr(Cr)){var xa=br[ar];Rt(or,".",vn[ar],"(",Cr,");",Cr.map(function(Zn,mn){return xa+"["+mn+"]="+Zn}).join(";"),";")}else Sn(Nt)?(Yt=wt.link(Cr,{stable:!0}),Rt(or,".",vn[ar],"(",Yt,");",mr,".",ar,"=",Yt,";")):Rt(or,".",vn[ar],"(",Cr,");",mr,".",ar,"=",Cr,";")}})}function Os(wt,Rt){Fa&&(wt.instancing=Rt.def(wt.shared.extensions,".angle_instanced_arrays"))}function jo(wt,Rt,Kt,Or,Jr){var br=wt.shared,mr=wt.stats,or=br.current,Yt=br.timer,ar=Kt.profile;function Nt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Cr,ta;function xa(Fn){Cr=Rt.def(),Fn(Cr,"=",Nt(),";"),typeof Jr=="string"?Fn(mr,".count+=",Jr,";"):Fn(mr,".count++;"),nn&&(Or?(ta=Rt.def(),Fn(ta,"=",Yt,".getNumPendingQueries();")):Fn(Yt,".beginQuery(",mr,");"))}function Zn(Fn){Fn(mr,".cpuTime+=",Nt(),"-",Cr,";"),nn&&(Or?Fn(Yt,".pushScopeStats(",ta,",",Yt,".getNumPendingQueries(),",mr,");"):Fn(Yt,".endQuery();"))}function mn(Fn){var hn=Rt.def(or,".profile");Rt(or,".profile=",Fn,";"),Rt.exit(or,".profile=",hn,";")}var dn;if(ar){if(Sn(ar)){ar.enable?(xa(Rt),Zn(Rt.exit),mn("true")):mn("false");return}dn=ar.append(wt,Rt),mn(dn)}else dn=Rt.def(or,".profile");var Xn=wt.block();xa(Xn),Rt("if(",dn,"){",Xn,"}");var On=wt.block();Zn(On),Rt.exit("if(",dn,"){",On,"}")}function fl(wt,Rt,Kt,Or,Jr){var br=wt.shared;function mr(Yt){switch(Yt){case Lo:case Is:case zs:return 2;case bo:case Ys:case Il:return 3;case ds:case Ks:case _u:return 4;default:return 1}}function or(Yt,ar,Nt){var Cr=br.gl,ta=Rt.def(Yt,".location"),xa=Rt.def(br.attributes,"[",ta,"]"),Zn=Nt.state,mn=Nt.buffer,dn=[Nt.x,Nt.y,Nt.z,Nt.w],Xn=["buffer","normalized","offset","stride"];function On(){Rt("if(!",xa,".buffer){",Cr,".enableVertexAttribArray(",ta,");}");var hn=Nt.type,Cn;if(Nt.size?Cn=Rt.def(Nt.size,"||",ar):Cn=ar,Rt("if(",xa,".type!==",hn,"||",xa,".size!==",Cn,"||",Xn.map(function(fi){return xa+"."+fi+"!=="+Nt[fi]}).join("||"),"){",Cr,".bindBuffer(",pr,",",mn,".buffer);",Cr,".vertexAttribPointer(",[ta,Cn,hn,Nt.normalized,Nt.stride,Nt.offset],");",xa,".type=",hn,";",xa,".size=",Cn,";",Xn.map(function(fi){return xa+"."+fi+"="+Nt[fi]+";"}).join(""),"}"),Fa){var In=Nt.divisor;Rt("if(",xa,".divisor!==",In,"){",wt.instancing,".vertexAttribDivisorANGLE(",[ta,In],");",xa,".divisor=",In,";}")}}function Fn(){Rt("if(",xa,".buffer){",Cr,".disableVertexAttribArray(",ta,");",xa,".buffer=null;","}if(",Ei.map(function(hn,Cn){return xa+"."+hn+"!=="+dn[Cn]}).join("||"),"){",Cr,".vertexAttrib4f(",ta,",",dn,");",Ei.map(function(hn,Cn){return xa+"."+hn+"="+dn[Cn]+";"}).join(""),"}")}Zn===ki?On():Zn===Vi?Fn():(Rt("if(",Zn,"===",ki,"){"),On(),Rt("}else{"),Fn(),Rt("}"))}Or.forEach(function(Yt){var ar=Yt.name,Nt=Kt.attributes[ar],Cr;if(Nt){if(!Jr(Nt))return;Cr=Nt.append(wt,Rt)}else{if(!Jr(xi))return;var ta=wt.scopeAttrib(ar);Cr={},Object.keys(new Qr).forEach(function(xa){Cr[xa]=Rt.def(ta,".",xa)})}or(wt.link(Yt),mr(Yt.info.type),Cr)})}function hl(wt,Rt,Kt,Or,Jr,br){for(var mr=wt.shared,or=mr.gl,Yt,ar=0;ar1){for(var dl=[],Cu=[],pc=0;pc>1)",mn],");")}function In(){Kt(dn,".drawArraysInstancedANGLE(",[ta,xa,Zn,mn],");")}Nt&&Nt!=="null"?On?Cn():(Kt("if(",Nt,"){"),Cn(),Kt("}else{"),In(),Kt("}")):In()}function hn(){function Cn(){Kt(br+".drawElements("+[ta,Zn,Xn,xa+"<<(("+Xn+"-"+Ii+")>>1)"]+");")}function In(){Kt(br+".drawArrays("+[ta,xa,Zn]+");")}Nt&&Nt!=="null"?On?Cn():(Kt("if(",Nt,"){"),Cn(),Kt("}else{"),In(),Kt("}")):In()}Fa&&(typeof mn!="number"||mn>=0)?typeof mn=="string"?(Kt("if(",mn,">0){"),Fn(),Kt("}else if(",mn,"<0){"),hn(),Kt("}")):Fn():hn()}function di(wt,Rt,Kt,Or,Jr){var br=xn(),mr=br.proc("body",Jr);return Fa&&(br.instancing=mr.def(br.shared.extensions,".angle_instanced_arrays")),wt(br,mr,Kt,Or),br.compile().body}function eo(wt,Rt,Kt,Or){Os(wt,Rt),Kt.useVAO?Kt.drawVAO?Rt(wt.shared.vao,".setVAO(",Kt.drawVAO.append(wt,Rt),");"):Rt(wt.shared.vao,".setVAO(",wt.shared.vao,".targetVAO);"):(Rt(wt.shared.vao,".setVAO(null);"),fl(wt,Rt,Kt,Or.attributes,function(){return!0})),hl(wt,Rt,Kt,Or.uniforms,function(){return!0},!1),Sl(wt,Rt,Rt,Kt)}function lo(wt,Rt){var Kt=wt.proc("draw",1);Os(wt,Kt),As(wt,Kt,Rt.context),Ms(wt,Kt,Rt.framebuffer),Ps(wt,Kt,Rt),Ai(wt,Kt,Rt.state),jo(wt,Kt,Rt,!1,!0);var Or=Rt.shader.progVar.append(wt,Kt);if(Kt(wt.shared.gl,".useProgram(",Or,".program);"),Rt.shader.program)eo(wt,Kt,Rt,Rt.shader.program);else{Kt(wt.shared.vao,".setVAO(null);");var Jr=wt.global.def("{}"),br=Kt.def(Or,".id"),mr=Kt.def(Jr,"[",br,"]");Kt(wt.cond(mr).then(mr,".call(this,a0);").else(mr,"=",Jr,"[",br,"]=",wt.link(function(or){return di(eo,wt,Rt,or,1)}),"(",Or,");",mr,".call(this,a0);"))}Object.keys(Rt.state).length>0&&Kt(wt.shared.current,".dirty=true;"),wt.shared.vao&&Kt(wt.shared.vao,".setVAO(null);")}function Lt(wt,Rt,Kt,Or){wt.batchId="a1",Os(wt,Rt);function Jr(){return!0}fl(wt,Rt,Kt,Or.attributes,Jr),hl(wt,Rt,Kt,Or.uniforms,Jr,!1),Sl(wt,Rt,Rt,Kt)}function Vr(wt,Rt,Kt,Or){Os(wt,Rt);var Jr=Kt.contextDep,br=Rt.def(),mr="a0",or="a1",Yt=Rt.def();wt.shared.props=Yt,wt.batchId=br;var ar=wt.scope(),Nt=wt.scope();Rt(ar.entry,"for(",br,"=0;",br,"<",or,";++",br,"){",Yt,"=",mr,"[",br,"];",Nt,"}",ar.exit);function Cr(Xn){return Xn.contextDep&&Jr||Xn.propDep}function ta(Xn){return!Cr(Xn)}if(Kt.needsContext&&As(wt,Nt,Kt.context),Kt.needsFramebuffer&&Ms(wt,Nt,Kt.framebuffer),Ai(wt,Nt,Kt.state,Cr),Kt.profile&&Cr(Kt.profile)&&jo(wt,Nt,Kt,!1,!0),Or)Kt.useVAO?Kt.drawVAO?Cr(Kt.drawVAO)?Nt(wt.shared.vao,".setVAO(",Kt.drawVAO.append(wt,Nt),");"):ar(wt.shared.vao,".setVAO(",Kt.drawVAO.append(wt,ar),");"):ar(wt.shared.vao,".setVAO(",wt.shared.vao,".targetVAO);"):(ar(wt.shared.vao,".setVAO(null);"),fl(wt,ar,Kt,Or.attributes,ta),fl(wt,Nt,Kt,Or.attributes,Cr)),hl(wt,ar,Kt,Or.uniforms,ta,!1),hl(wt,Nt,Kt,Or.uniforms,Cr,!0),Sl(wt,ar,Nt,Kt);else{var xa=wt.global.def("{}"),Zn=Kt.shader.progVar.append(wt,Nt),mn=Nt.def(Zn,".id"),dn=Nt.def(xa,"[",mn,"]");Nt(wt.shared.gl,".useProgram(",Zn,".program);","if(!",dn,"){",dn,"=",xa,"[",mn,"]=",wt.link(function(Xn){return di(Lt,wt,Kt,Xn,2)}),"(",Zn,");}",dn,".call(this,a0[",br,"],",br,");")}}function Gr(wt,Rt){var Kt=wt.proc("batch",2);wt.batchId="0",Os(wt,Kt);var Or=!1,Jr=!0;Object.keys(Rt.context).forEach(function(xa){Or=Or||Rt.context[xa].propDep}),Or||(As(wt,Kt,Rt.context),Jr=!1);var br=Rt.framebuffer,mr=!1;br?(br.propDep?Or=mr=!0:br.contextDep&&Or&&(mr=!0),mr||Ms(wt,Kt,br)):Ms(wt,Kt,null),Rt.state.viewport&&Rt.state.viewport.propDep&&(Or=!0);function or(xa){return xa.contextDep&&Or||xa.propDep}Ps(wt,Kt,Rt),Ai(wt,Kt,Rt.state,function(xa){return!or(xa)}),(!Rt.profile||!or(Rt.profile))&&jo(wt,Kt,Rt,!1,"a1"),Rt.contextDep=Or,Rt.needsContext=Jr,Rt.needsFramebuffer=mr;var Yt=Rt.shader.progVar;if(Yt.contextDep&&Or||Yt.propDep)Vr(wt,Kt,Rt,null);else{var ar=Yt.append(wt,Kt);if(Kt(wt.shared.gl,".useProgram(",ar,".program);"),Rt.shader.program)Vr(wt,Kt,Rt,Rt.shader.program);else{Kt(wt.shared.vao,".setVAO(null);");var Nt=wt.global.def("{}"),Cr=Kt.def(ar,".id"),ta=Kt.def(Nt,"[",Cr,"]");Kt(wt.cond(ta).then(ta,".call(this,a0,a1);").else(ta,"=",Nt,"[",Cr,"]=",wt.link(function(xa){return di(Vr,wt,Rt,xa,2)}),"(",ar,");",ta,".call(this,a0,a1);"))}}Object.keys(Rt.state).length>0&&Kt(wt.shared.current,".dirty=true;"),wt.shared.vao&&Kt(wt.shared.vao,".setVAO(null);")}function En(wt,Rt){var Kt=wt.proc("scope",3);wt.batchId="a2";var Or=wt.shared,Jr=Or.current;if(As(wt,Kt,Rt.context),Rt.framebuffer&&Rt.framebuffer.append(wt,Kt),Ca(Object.keys(Rt.state)).forEach(function(or){var Yt=Rt.state[or],ar=Yt.append(wt,Kt);Fr(ar)?ar.forEach(function(Nt,Cr){pn(Nt)?Kt.set(wt.next[or],"["+Cr+"]",Nt):Kt.set(wt.next[or],"["+Cr+"]",wt.link(Nt,{stable:!0}))}):Sn(Yt)?Kt.set(Or.next,"."+or,wt.link(ar,{stable:!0})):Kt.set(Or.next,"."+or,ar)}),jo(wt,Kt,Rt,!0,!0),[St,fr,Wt,Ar,Ht].forEach(function(or){var Yt=Rt.draw[or];if(Yt){var ar=Yt.append(wt,Kt);pn(ar)?Kt.set(Or.draw,"."+or,ar):Kt.set(Or.draw,"."+or,wt.link(ar),{stable:!0})}}),Object.keys(Rt.uniforms).forEach(function(or){var Yt=Rt.uniforms[or].append(wt,Kt);Array.isArray(Yt)&&(Yt="["+Yt.map(function(ar){return pn(ar)?ar:wt.link(ar,{stable:!0})})+"]"),Kt.set(Or.uniforms,"["+wt.link(Pt.id(or),{stable:!0})+"]",Yt)}),Object.keys(Rt.attributes).forEach(function(or){var Yt=Rt.attributes[or].append(wt,Kt),ar=wt.scopeAttrib(or);Object.keys(new Qr).forEach(function(Nt){Kt.set(ar,"."+Nt,Yt[Nt])})}),Rt.scopeVAO){var br=Rt.scopeVAO.append(wt,Kt);pn(br)?Kt.set(Or.vao,".targetVAO",br):Kt.set(Or.vao,".targetVAO",wt.link(br,{stable:!0}))}function mr(or){var Yt=Rt.shader[or];if(Yt){var ar=Yt.append(wt,Kt);pn(ar)?Kt.set(Or.shader,"."+or,ar):Kt.set(Or.shader,"."+or,wt.link(ar,{stable:!0}))}}mr(et),mr(dt),Object.keys(Rt.state).length>0&&(Kt(Jr,".dirty=true;"),Kt.exit(Jr,".dirty=true;")),Kt("a1(",wt.shared.context,",a0,",wt.batchId,");")}function Hi(wt){if(!(typeof wt!="object"||Fr(wt))){for(var Rt=Object.keys(wt),Kt=0;Kt=0;--di){var eo=Yn[di];eo&&eo(ua,null,0)}Ft.flush(),Ua&&Ua.update()}function Ri(){!li&&Yn.length>0&&(li=p.next(ui))}function cs(){li&&(p.cancel(ui),li=null)}function Ls(di){di.preventDefault(),Xr=!0,cs(),si.forEach(function(eo){eo()})}function Wi(di){Ft.getError(),Xr=!1,Kr.restore(),Hn.restore(),Fa.restore(),ha.restore(),la.restore(),vn.restore(),on.restore(),Ua&&Ua.restore(),Za.procs.refresh(),Ri(),Ya.forEach(function(eo){eo()})}pn&&(pn.addEventListener(Oo,Ls,!1),pn.addEventListener(gs,Wi,!1));function Ml(){Yn.length=0,cs(),pn&&(pn.removeEventListener(Oo,Ls),pn.removeEventListener(gs,Wi)),Hn.clear(),vn.clear(),la.clear(),on.clear(),ha.clear(),va.clear(),Fa.clear(),Ua&&Ua.clear(),xn.forEach(function(di){di()})}function Fo(di){function eo(br){var mr=u({},br);delete mr.uniforms,delete mr.attributes,delete mr.context,delete mr.vao,"stencil"in mr&&mr.stencil.op&&(mr.stencil.opBack=mr.stencil.opFront=mr.stencil.op,delete mr.stencil.op);function or(Yt){if(Yt in mr){var ar=mr[Yt];delete mr[Yt],Object.keys(ar).forEach(function(Nt){mr[Yt+"."+Nt]=ar[Nt]})}}return or("blend"),or("depth"),or("cull"),or("stencil"),or("polygonOffset"),or("scissor"),or("sample"),"vao"in br&&(mr.vao=br.vao),mr}function lo(br,mr){var or={},Yt={};return Object.keys(br).forEach(function(ar){var Nt=br[ar];if(c.isDynamic(Nt)){Yt[ar]=c.unbox(Nt,ar);return}else if(mr&&Array.isArray(Nt)){for(var Cr=0;Cr0)return wt.call(this,Or(br|0),br|0)}else if(Array.isArray(br)){if(br.length)return wt.call(this,br,br.length)}else return kn.call(this,br)}return u(Jr,{stats:Hi,destroy:function(){zo.destroy()}})}var Js=vn.setFBO=Fo({framebuffer:c.define.call(null,Bs,"framebuffer")});function Ns(di,eo){var lo=0;Za.procs.poll();var Lt=eo.color;Lt&&(Ft.clearColor(+Lt[0]||0,+Lt[1]||0,+Lt[2]||0,+Lt[3]||0),lo|=al),"depth"in eo&&(Ft.clearDepth(+eo.depth),lo|=Ds),"stencil"in eo&&(Ft.clearStencil(eo.stencil|0),lo|=gi),Ft.clear(lo)}function nl(di){if("framebuffer"in di)if(di.framebuffer&&di.framebuffer_reglType==="framebufferCube")for(var eo=0;eo<6;++eo)Js(u({framebuffer:di.framebuffer.faces[eo]},di),Ns);else Js(di,Ns);else Ns(null,di)}function As(di){Yn.push(di);function eo(){var lo=xu(Yn,di);function Lt(){var Vr=xu(Yn,Lt);Yn[Vr]=Yn[Yn.length-1],Yn.length-=1,Yn.length<=0&&cs()}Yn[lo]=Lt}return Ri(),{cancel:eo}}function Ms(){var di=Ha.viewport,eo=Ha.scissor_box;di[0]=di[1]=eo[0]=eo[1]=0,ua.viewportWidth=ua.framebufferWidth=ua.drawingBufferWidth=di[2]=eo[2]=Ft.drawingBufferWidth,ua.viewportHeight=ua.framebufferHeight=ua.drawingBufferHeight=di[3]=eo[3]=Ft.drawingBufferHeight}function Ps(){ua.tick+=1,ua.time=Os(),Ms(),Za.procs.poll()}function Ai(){ha.refresh(),Ms(),Za.procs.refresh(),Ua&&Ua.update()}function Os(){return(f()-Wn)/1e3}Ai();function jo(di,eo){var lo;switch(di){case"frame":return As(eo);case"lost":lo=si;break;case"restore":lo=Ya;break;case"destroy":lo=xn;break;default:}return lo.push(eo),{cancel:function(){for(var Lt=0;Lt=0},read:qa,destroy:Ml,_gl:Ft,_refresh:Ai,poll:function(){Ps(),Ua&&Ua.update()},now:Os,stats:_a,getCachedCode:fl,preloadCachedCode:hl});return Pt.onDone(null,Sl),Sl}return ic})}}),$1=xe({"src/lib/prepare_regl.js"(U,O){"use strict";var u=O2(),v=N8();O.exports=function(S,l,e){var t=S._fullLayout,a=!0;return t._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(e);return}if(!(r.pick&&!t._has("parcoords"))){try{r.regl=v({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:S._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:e||{}})}catch{a=!1}r.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(n){S&&S.emit&&S.emit("plotly_webglcontextlost",{event:n,layer:r.key})},!1)}}),a||u({container:t._glcontainer.node()}),a}}}),F3=xe({"src/traces/scattergl/plot.js"(c,O){"use strict";var u=d3(),v=M3(),w=x8(),S=B8(),l=Sr(),e=Uh().selectMode,t=$1(),a=Cl(),r=Y_(),n=c3().styleTextSelection,i={};function s(p,f,d,y){var o=p._size,b=p.width*y,M=p.height*y,A=o.l*y,E=o.b*y,g=o.r*y,T=o.t*y,m=o.w*y,h=o.h*y;return[A+f.domain[0]*m,E+d.domain[0]*h,b-g-(1-f.domain[1])*m,M-T-(1-d.domain[1])*h]}var c=O.exports=function(f,d,y){if(y.length){var o=f._fullLayout,b=d._scene,M=d.xaxis,A=d.yaxis,E,g;if(b){var T=t(f,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!T){b.init();return}var m=b.count,h=o._glcanvas.data()[0].regl;if(r(f,d,y),b.dirty){if((b.line2d||b.error2d)&&!(b.scatter2d||b.fill2d||b.glText)&&h.clear({color:!0,depth:!0}),b.error2d===!0&&(b.error2d=w(h)),b.line2d===!0&&(b.line2d=v(h)),b.scatter2d===!0&&(b.scatter2d=u(h)),b.fill2d===!0&&(b.fill2d=v(h)),b.glText===!0)for(b.glText=new Array(m),E=0;Eb.glText.length){var x=m-b.glText.length;for(E=0;EQ&&(isNaN($[re])||isNaN($[re+1]));)re-=2;X.positions=$.slice(Q,re+2)}return X}),b.line2d.update(b.lineOptions)),b.error2d){var C=(b.errorXOptions||[]).concat(b.errorYOptions||[]).map(function(X){return X||{positions:[],errors:[]}});b.error2d.update(C)}b.scatter2d&&b.scatter2d.update(b.markerOptions),b.fillOrder=l.repeat(null,m),b.fill2d&&(b.fillOptions=b.fillOptions.map(function(X,$){var Q=y[$];if(!(!X||!Q||!Q[0]||!Q[0].trace)){var re=Q[0],ue=re.trace,pe=re.t,ge=b.lineOptions[$],Te,Se,Ce=[];ue._ownfill&&Ce.push($),ue._nexttrace&&Ce.push($+1),Ce.length&&(b.fillOrder[$]=Ce);var Ue=[],Oe=ge&&ge.positions||pe.positions,_e,ce;if(ue.fill==="tozeroy"){for(_e=0;_e_e&&isNaN(Oe[ce+1]);)ce-=2;Oe[_e+1]!==0&&(Ue=[Oe[_e],0]),Ue=Ue.concat(Oe.slice(_e,ce+2)),Oe[ce+1]!==0&&(Ue=Ue.concat([Oe[ce],0]))}else if(ue.fill==="tozerox"){for(_e=0;_e_e&&isNaN(Oe[ce]);)ce-=2;Oe[_e]!==0&&(Ue=[0,Oe[_e+1]]),Ue=Ue.concat(Oe.slice(_e,ce+2)),Oe[ce]!==0&&(Ue=Ue.concat([0,Oe[ce+1]]))}else if(ue.fill==="toself"||ue.fill==="tonext"){for(Ue=[],Te=0,X.splitNull=!0,Se=0;Se-1;for(let[X]of y)if(X){var R=X.trace,k=X.t,B=k.index,N=R._length,q=k.x,Y=k.y;if(R.selectedpoints||I||z){if(I||(I=!0),R.selectedpoints){var ee=b.selectBatch[B]=R.selectedpoints,te={};for(g=0;gM&&d||bn,_;for(x?_=d.sizeAvg||Math.max(d.size,3):_=w(c,f),A=0;A{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,S(()=>{this.dirty=!1})),this)},a.prototype.update=function(...s){if(!s.length)return;for(let f=0;f_||!d.lower&&x<_)continue;let D=r(d.id,x,_),C=this.passes[D]||(this.passes[D]={});if(f.data&&(f.transpose?C.positions={x:{buffer:d.buffer,offset:_,count:M,stride:b},y:{buffer:d.buffer,offset:x,count:M,stride:b}}:C.positions={x:{buffer:d.buffer,offset:_*M,count:M},y:{buffer:d.buffer,offset:x*M,count:M}},C.bounds=n(d.bounds,x,_)),f.domain||f.viewport||f.data){let F=o?n(d.padding,x,_):d.padding;if(d.domain){let[I,z,R,k]=n(d.domain,x,_);C.viewport=[g+I*A+F[0],T+z*E+F[1],g+R*A-F[2],T+k*E-F[3]]}else C.viewport=[g+_*m+m*F[0],T+x*h+h*F[1],g+(_+1)*m-m*F[2],T+(x+1)*h-h*F[3]]}f.color&&(C.color=d.color),f.size&&(C.size=d.size),f.marker&&(C.marker=d.marker),f.borderSize&&(C.borderSize=d.borderSize),f.borderColor&&(C.borderColor=d.borderColor),f.opacity&&(C.opacity=d.opacity),f.range&&(C.range=y?n(d.range,x,_):d.range||C.bounds),d.passes.push(D)}return this},a.prototype.draw=function(...s){if(!s.length)this.scatter.draw();else{let c=[];for(let p=0;p{c[y+b]=f})}this.scatter.draw(...c)}return this},a.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function r(s,c,p){let f=s.id!=null?s.id:s,d=c,y=p;return f<<16|(d&255)<<8|y&255}function n(s,c,p){let f,d,y,o,b,M,A,E,g=s[c],T=s[p];return g.length>2?(f=g[0],y=g[2],d=g[1],o=g[3]):g.length?(f=d=g[0],y=o=g[1]):(f=g.x,d=g.y,y=g.x+g.width,o=g.y+g.height),T.length>2?(b=T[0],A=T[2],M=T[1],E=T[3]):T.length?(b=M=T[0],A=E=T[1]):(b=T.x,M=T.y,A=T.x+T.width,E=T.y+T.height),[b,d,A,o]}function i(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=e(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),X8=xe({"src/traces/splom/plot.js"(U,O){"use strict";var u=Y8(),v=Sr(),w=fu(),S=Uh().selectMode;O.exports=function(t,a,r){if(r.length)for(var n=0;n-1,z=S(d)||!!n.selectedpoints||I,R=!0;if(z){var k=n._length;if(n.selectedpoints){s.selectBatch=n.selectedpoints;var B=n.selectedpoints,N={};for(b=0;b=q[Y][0]&&N<=q[Y][1])return!0;return!1}function c(N){N.attr("x",-u.bar.captureWidth/2).attr("width",u.bar.captureWidth)}function p(N){N.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function f(N){if(!N.brush.filterSpecified)return"0,"+N.height;for(var q=d(N.brush.filter.getConsolidated(),N.height),Y=[0],ee,te,ae,j=q.length?q[0][0]:null,G=0;GN[1]+Y||q=.9*N[1]+.1*N[0]?"n":q<=.9*N[0]+.1*N[1]?"s":"ns"}function o(){v.select(document.body).style("cursor",null)}function b(N){N.attr("stroke-dasharray",f)}function M(N,q){var Y=v.select(N).selectAll(".highlight, .highlight-shadow"),ee=q?Y.transition().duration(u.bar.snapDuration).each("end",q):Y;b(ee)}function A(N,q){var Y=N.brush,ee=Y.filterSpecified,te=NaN,ae={},j;if(ee){var G=N.height,K=Y.filter.getConsolidated(),H=d(K,G),Z=NaN,X=NaN,$=NaN;for(j=0;j<=H.length;j++){var Q=H[j];if(Q&&Q[0]<=q&&q<=Q[1]){Z=j;break}else if(X=j?j-1:NaN,Q&&Q[0]>q){$=j;break}}if(te=Z,isNaN(te)&&(isNaN(X)||isNaN($)?te=isNaN(X)?$:X:te=q-H[X][1]=Te[0]&&ge<=Te[1]){ae.clickableOrdinalRange=Te;break}}}return ae}function E(N,q){v.event.sourceEvent.stopPropagation();var Y=q.height-v.mouse(N)[1]-2*u.verticalPadding,ee=q.unitToPaddedPx.invert(Y),te=q.brush,ae=A(q,Y),j=ae.interval,G=te.svgBrush;if(G.wasDragged=!1,G.grabbingBar=ae.region==="ns",G.grabbingBar){var K=j.map(q.unitToPaddedPx);G.grabPoint=Y-K[0]-u.verticalPadding,G.barLength=K[1]-K[0]}G.clickableOrdinalRange=ae.clickableOrdinalRange,G.stayingIntervals=q.multiselect&&te.filterSpecified?te.filter.getConsolidated():[],j&&(G.stayingIntervals=G.stayingIntervals.filter(function(H){return H[0]!==j[0]&&H[1]!==j[1]})),G.startExtent=ae.region?j[ae.region==="s"?1:0]:ee,q.parent.inBrushDrag=!0,G.brushStartCallback()}function g(N,q){v.event.sourceEvent.stopPropagation();var Y=q.height-v.mouse(N)[1]-2*u.verticalPadding,ee=q.brush.svgBrush;ee.wasDragged=!0,ee._dragging=!0,ee.grabbingBar?ee.newExtent=[Y-ee.grabPoint,Y+ee.barLength-ee.grabPoint].map(q.unitToPaddedPx.invert):ee.newExtent=[ee.startExtent,q.unitToPaddedPx.invert(Y)].sort(l),q.brush.filterSpecified=!0,ee.extent=ee.stayingIntervals.concat([ee.newExtent]),ee.brushCallback(q),M(N.parentNode)}function T(N,q){var Y=q.brush,ee=Y.filter,te=Y.svgBrush;te._dragging||(m(N,q),g(N,q),q.brush.svgBrush.wasDragged=!1),te._dragging=!1;var ae=v.event;ae.sourceEvent.stopPropagation();var j=te.grabbingBar;if(te.grabbingBar=!1,te.grabLocation=void 0,q.parent.inBrushDrag=!1,o(),!te.wasDragged){te.wasDragged=void 0,te.clickableOrdinalRange?Y.filterSpecified&&q.multiselect?te.extent.push(te.clickableOrdinalRange):(te.extent=[te.clickableOrdinalRange],Y.filterSpecified=!0):j?(te.extent=te.stayingIntervals,te.extent.length===0&&F(Y)):F(Y),te.brushCallback(q),M(N.parentNode),te.brushEndCallback(Y.filterSpecified?ee.getConsolidated():[]);return}var G=function(){ee.set(ee.getConsolidated())};if(q.ordinal){var K=q.unitTickvals;K[K.length-1]te.newExtent[0];te.extent=te.stayingIntervals.concat(H?[te.newExtent]:[]),te.extent.length||F(Y),te.brushCallback(q),H?M(N.parentNode,G):(G(),M(N.parentNode))}else G();te.brushEndCallback(Y.filterSpecified?ee.getConsolidated():[])}function m(N,q){var Y=q.height-v.mouse(N)[1]-2*u.verticalPadding,ee=A(q,Y),te="crosshair";ee.clickableOrdinalRange?te="pointer":ee.region&&(te=ee.region+"-resize"),v.select(document.body).style("cursor",te)}function h(N){N.on("mousemove",function(q){v.event.preventDefault(),q.parent.inBrushDrag||m(this,q)}).on("mouseleave",function(q){q.parent.inBrushDrag||o()}).call(v.behavior.drag().on("dragstart",function(q){E(this,q)}).on("drag",function(q){g(this,q)}).on("dragend",function(q){T(this,q)}))}function x(N,q){return N[0]-q[0]}function _(N,q,Y){var ee=Y._context.staticPlot,te=N.selectAll(".background").data(S);te.enter().append("rect").classed("background",!0).call(c).call(p).style("pointer-events",ee?"none":"auto").attr("transform",e(0,u.verticalPadding)),te.call(h).attr("height",function(G){return G.height-u.verticalPadding});var ae=N.selectAll(".highlight-shadow").data(S);ae.enter().append("line").classed("highlight-shadow",!0).attr("x",-u.bar.width/2).attr("stroke-width",u.bar.width+u.bar.strokeWidth).attr("stroke",q).attr("opacity",u.bar.strokeOpacity).attr("stroke-linecap","butt"),ae.attr("y1",function(G){return G.height}).call(b);var j=N.selectAll(".highlight").data(S);j.enter().append("line").classed("highlight",!0).attr("x",-u.bar.width/2).attr("stroke-width",u.bar.width-u.bar.strokeWidth).attr("stroke",u.bar.fillColor).attr("opacity",u.bar.fillOpacity).attr("stroke-linecap","butt"),j.attr("y1",function(G){return G.height}).call(b)}function D(N,q,Y){var ee=N.selectAll("."+u.cn.axisBrush).data(S,w);ee.enter().append("g").classed(u.cn.axisBrush,!0),_(ee,q,Y)}function C(N){return N.svgBrush.extent.map(function(q){return q.slice()})}function F(N){N.filterSpecified=!1,N.svgBrush.extent=[[-1/0,1/0]]}function I(N){return function(Y){var ee=Y.brush,te=C(ee),ae=te.slice();ee.filter.set(ae),N()}}function z(N){for(var q=N.slice(),Y=[],ee,te=q.shift();te;){for(ee=te.slice();(te=q.shift())&&te[0]<=ee[1];)ee[1]=Math.max(ee[1],te[1]);Y.push(ee)}return Y.length===1&&Y[0][0]>Y[0][1]&&(Y=[]),Y}function R(){var N=[],q,Y;return{set:function(ee){N=ee.map(function(te){return te.slice().sort(l)}).sort(x),N.length===1&&N[0][0]===-1/0&&N[0][1]===1/0&&(N=[[0,-1]]),q=z(N),Y=N.reduce(function(te,ae){return[Math.min(te[0],ae[0]),Math.max(te[1],ae[1])]},[1/0,-1/0])},get:function(){return N.slice()},getConsolidated:function(){return q},getBounds:function(){return Y}}}function k(N,q,Y,ee,te,ae){var j=R();return j.set(Y),{filter:j,filterSpecified:q,svgBrush:{extent:[],brushStartCallback:ee,brushCallback:I(te),brushEndCallback:ae}}}function B(N,q){if(Array.isArray(N[0])?(N=N.map(function(ee){return ee.sort(l)}),q.multiselect?N=z(N.sort(x)):N=[N[0]]):N=[N.sort(l)],q.tickvals){var Y=q.tickvals.slice().sort(l);if(N=N.map(function(ee){var te=[i(0,Y,ee[0],[]),i(1,Y,ee[1],[])];if(te[1]>te[0])return te}).filter(function(ee){return ee}),!N.length)return}return N.length>1?N:N[0]}O.exports={makeBrush:k,ensureAxisBrush:D,cleanRanges:B}}}),rL=xe({"src/traces/parcoords/defaults.js"(U,O){"use strict";var u=Sr(),v=vf().hasColorscale,w=Fc(),S=Gl().defaults,l=bf(),e=uo(),t=N3(),a=O3(),r=im().maxDimensionCount,n=Z1();function i(c,p,f,d,y){var o=y("line.color",f);if(v(c,"line")&&u.isArrayOrTypedArray(o)){if(o.length)return y("line.colorscale"),w(c,p,d,y,{prefix:"line.",cLetter:"c"}),o.length;p.line.color=f}return 1/0}function s(c,p,f,d){function y(E,g){return u.coerce(c,p,t.dimensions,E,g)}var o=y("values"),b=y("visible");if(o&&o.length||(b=p.visible=!1),b){y("label"),y("tickvals"),y("ticktext"),y("tickformat");var M=y("range");p._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:M},e.setConvert(p._ax,d.layout),y("multiselect");var A=y("constraintrange");A&&(p.constraintrange=a.cleanRanges(A,p))}}O.exports=function(p,f,d,y){function o(g,T){return u.coerce(p,f,t,g,T)}var b=p.dimensions;Array.isArray(b)&&b.length>r&&(u.log("parcoords traces support up to "+r+" dimensions at the moment"),b.splice(r));var M=l(p,f,{name:"dimensions",layout:y,handleItemDefaults:s}),A=i(p,f,d,y,o);S(f,y,o),(!Array.isArray(M)||!M.length)&&(f.visible=!1),n(f,M,"values",A);var E=u.extendFlat({},y.font,{size:Math.round(y.font.size/1.2)});u.coerceFont(o,"labelfont",E),u.coerceFont(o,"tickfont",E,{autoShadowDflt:!0}),u.coerceFont(o,"rangefont",E),o("labelangle"),o("labelside"),o("unselected.line.color"),o("unselected.line.opacity")}}}),aL=xe({"src/traces/parcoords/calc.js"(U,O){"use strict";var u=Sr().isArrayOrTypedArray,v=Bl(),w=Xh().wrap;O.exports=function(e,t){var a,r;return v.hasColorscale(t,"line")&&u(t.line.color)?(a=t.line.color,r=v.extractOpts(t.line).colorscale,v.calc(e,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=S(t._length),r=[[0,t.line.color],[1,t.line.color]]),w({lineColor:a,cscale:r})};function S(l){for(var e=new Array(l),t=0;t>>16,(U&65280)>>>8,U&255],alpha:1};if(typeof U=="number")return{space:"rgb",values:[U>>>16,(U&65280)>>>8,U&255],alpha:1};if(U=String(U).toLowerCase(),K1.default[U])w=K1.default[U].slice(),l="rgb";else if(U==="transparent")S=0,l="rgb",w=[0,0,0];else if(U[0]==="#"){var e=U.slice(1),t=e.length,a=t<=4;S=1,a?(w=[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)],t===4&&(S=parseInt(e[3]+e[3],16)/255)):(w=[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)],t===8&&(S=parseInt(e[6]+e[7],16)/255)),w[0]||(w[0]=0),w[1]||(w[1]=0),w[2]||(w[2]=0),l="rgb"}else if(v=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(U)){var r=v[1];l=r.replace(/a$/,"");var n=l==="cmyk"?4:l==="gray"?1:3;w=v[2].trim().split(/\s*[,\/]\s*|\s+/),l==="color"&&(l=w.shift()),w=w.map(function(i,s){if(i[i.length-1]==="%")return i=parseFloat(i)/100,s===3?i:l==="rgb"?i*255:l[0]==="h"||l[0]==="l"&&!s?i*100:l==="lab"?i*125:l==="lch"?s<2?i*150:i*360:l[0]==="o"&&!s?i:l==="oklab"?i*.4:l==="oklch"?s<2?i*.4:i*360:i;if(l[s]==="h"||s===2&&l[l.length-1]==="h"){if(J1[i]!==void 0)return J1[i];if(i.endsWith("deg"))return parseFloat(i);if(i.endsWith("turn"))return parseFloat(i)*360;if(i.endsWith("grad"))return parseFloat(i)*360/400;if(i.endsWith("rad"))return parseFloat(i)*180/Math.PI}return i==="none"?0:parseFloat(i)}),S=w.length>n?w.pop():1}else/[0-9](?:\s|\/|,)/.test(U)&&(w=U.match(/([0-9]+)/g).map(function(i){return parseFloat(i)}),l=((u=(O=U.match(/([a-z])/ig))==null?void 0:O.join(""))==null?void 0:u.toLowerCase())||"rgb");return{space:l,values:w,alpha:S}}var K1,U3,J1,iL=Pr({"node_modules/color-parse/index.js"(){K1=da(z2(),1),U3=nL,J1={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),om,j3=Pr({"node_modules/color-space/rgb.js"(){om={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),sm,oL=Pr({"node_modules/color-space/hsl.js"(){j3(),sm={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(U){var O=U[0]/360,u=U[1]/100,v=U[2]/100,w,S,l,e,t,a=0;if(u===0)return t=v*255,[t,t,t];for(S=v<.5?v*(1+u):v+u-v*u,w=2*v-S,e=[0,0,0];a<3;)l=O+1/3*-(a-1),l<0?l++:l>1&&l--,t=6*l<1?w+(S-w)*6*l:2*l<1?S:3*l<2?w+(S-w)*(2/3-l)*6:w,e[a++]=t*255;return e}},om.hsl=function(U){var O=U[0]/255,u=U[1]/255,v=U[2]/255,w=Math.min(O,u,v),S=Math.max(O,u,v),l=S-w,e,t,a;return S===w?e=0:O===S?e=(u-v)/l:u===S?e=2+(v-O)/l:v===S&&(e=4+(O-u)/l),e=Math.min(e*60,360),e<0&&(e+=360),a=(w+S)/2,S===w?t=0:a<=.5?t=l/(S+w):t=l/(2-S-w),[e,t*100,a*100]}}}),q3={};Xa(q3,{default:()=>sL});function sL(U){Array.isArray(U)&&U.raw&&(U=String.raw(...arguments)),U instanceof Number&&(U=+U);var O,u,v,w=U3(U);if(!w.space)return[];let S=w.space[0]==="h"?sm.min:om.min,l=w.space[0]==="h"?sm.max:om.max;return O=Array(3),O[0]=Math.min(Math.max(w.values[0],S[0]),l[0]),O[1]=Math.min(Math.max(w.values[1],S[1]),l[1]),O[2]=Math.min(Math.max(w.values[2],S[2]),l[2]),w.space[0]==="h"&&(O=sm.rgb(O)),O.push(Math.min(Math.max(w.alpha,0),1)),O}var lL=Pr({"node_modules/color-rgba/index.js"(){iL(),j3(),oL()}}),V3=xe({"src/traces/parcoords/helpers.js"(U){"use strict";var O=Sr().isTypedArray;U.convertTypedArray=function(u){return O(u)?Array.prototype.slice.call(u):u},U.isOrdinal=function(u){return!!u.tickvals},U.isVisible=function(u){return u.visible||!("visible"in u)}}}),uL=xe({"src/traces/parcoords/lines.js"(U,O){"use strict";var u=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` -`),v=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),w=im().maxDimensionCount,S=Sr(),l=1e-6,e=2048,t=new Uint8Array(4),a=new Uint8Array(4),r={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function n(T){T.read({x:0,y:0,width:1,height:1,data:t})}function i(T,m,h,x,_){var D=T._gl;D.enable(D.SCISSOR_TEST),D.scissor(m,h,x,_),T.clear({color:[0,0,0,0],depth:1})}function s(T,m,h,x,_,D){var C=D.key;function F(I){var z=Math.min(x,_-I*x);I===0&&(window.cancelAnimationFrame(h.currentRafs[C]),delete h.currentRafs[C],i(T,D.scissorX,D.scissorY,D.scissorWidth,D.viewBoxSize[1])),!h.clearOnly&&(D.count=2*z,D.offset=2*I*x,m(D),I*x+z<_&&(h.currentRafs[C]=window.requestAnimationFrame(function(){F(I+1)})),h.drawCompleted=!1)}h.drawCompleted||(n(T),h.drawCompleted=!0),F(0)}function c(T){return Math.max(l,Math.min(1-l,T))}function p(T,m){for(var h=new Array(256),x=0;x<256;x++)h[x]=T(x/255).concat(m);return h}function f(T,m){return(T>>>8*m)%256/255}function d(T,m,h){for(var x=new Array(T*(w+4)),_=0,D=0;DSe&&(Se=X[ue].dim1.canvasX,ge=ue);re===0&&i(_,0,0,z.canvasWidth,z.canvasHeight);var Ce=j(h);for(ue=0;ueue._length&&(ce=ce.slice(0,ue._length));var ie=ue.tickvals,se;function ne(ut,ot){return{val:ut,text:se[ot]}}function be(ut,ot){return ut.val-ot.val}if(w(ie)&&ie.length){v.isTypedArray(ie)&&(ie=Array.from(ie)),se=ue.ticktext,!w(se)||!se.length?se=ie.map(S(ue.tickformat)):se.length>ie.length?se=se.slice(0,ie.length):ie.length>se.length&&(ie=ie.slice(0,se.length));for(var De=1;De=ot||Zt>=yt)return;var vr=Ne.lineLayer.readPixel(It,yt-1-Zt),Ut=vr[3]!==0,Jt=Ut?vr[2]+256*(vr[1]+256*vr[0]):null,at={x:It,y:Zt,clientX:ut.clientX,clientY:ut.clientY,dataIndex:Ne.model.key,curveNumber:Jt};Jt!==ge&&(Ut?G.hover(at):G.unhover&&G.unhover(at),ge=Jt)}}),pe.style("opacity",function(Ne){return Ne.pick?0:1}),Z.style("background","rgba(255, 255, 255, 0)");var Se=Z.selectAll("."+y.cn.parcoords).data(ue,c);Se.exit().remove(),Se.enter().append("g").classed(y.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Se.attr("transform",function(Ne){return a(Ne.model.translateX,Ne.model.translateY)});var Ce=Se.selectAll("."+y.cn.parcoordsControlView).data(p,c);Ce.enter().append("g").classed(y.cn.parcoordsControlView,!0),Ce.attr("transform",function(Ne){return a(Ne.model.pad.l,Ne.model.pad.t)});var Ue=Ce.selectAll("."+y.cn.yAxis).data(function(Ne){return Ne.dimensions},c);Ue.enter().append("g").classed(y.cn.yAxis,!0),Ce.each(function(Ne){B(Ue,Ne,$)}),pe.each(function(Ne){if(Ne.viewModel){!Ne.lineLayer||G?Ne.lineLayer=b(this,Ne):Ne.lineLayer.update(Ne),(Ne.key||Ne.key===0)&&(Ne.viewModel[Ne.key]=Ne.lineLayer);var ut=!Ne.context||G;Ne.lineLayer.render(Ne.viewModel.panels,ut)}}),Ue.attr("transform",function(Ne){return a(Ne.xScale(Ne.xIndex),0)}),Ue.call(u.behavior.drag().origin(function(Ne){return Ne}).on("drag",function(Ne){var ut=Ne.parent;re.linePickActive(!1),Ne.x=Math.max(-y.overdrag,Math.min(Ne.model.width+y.overdrag,u.event.x)),Ne.canvasX=Ne.x*Ne.model.canvasPixelRatio,Ue.sort(function(ot,yt){return ot.x-yt.x}).each(function(ot,yt){ot.xIndex=yt,ot.x=Ne===ot?ot.x:ot.xScale(ot.xIndex),ot.canvasX=ot.x*ot.model.canvasPixelRatio}),B(Ue,ut,$),Ue.filter(function(ot){return Math.abs(Ne.xIndex-ot.xIndex)!==0}).attr("transform",function(ot){return a(ot.xScale(ot.xIndex),0)}),u.select(this).attr("transform",a(Ne.x,0)),Ue.each(function(ot,yt,At){At===Ne.parent.key&&(ut.dimensions[yt]=ot)}),ut.contextLayer&&ut.contextLayer.render(ut.panels,!1,!C(ut)),ut.focusLayer.render&&ut.focusLayer.render(ut.panels)}).on("dragend",function(Ne){var ut=Ne.parent;Ne.x=Ne.xScale(Ne.xIndex),Ne.canvasX=Ne.x*Ne.model.canvasPixelRatio,B(Ue,ut,$),u.select(this).attr("transform",function(ot){return a(ot.x,0)}),ut.contextLayer&&ut.contextLayer.render(ut.panels,!1,!C(ut)),ut.focusLayer&&ut.focusLayer.render(ut.panels),ut.pickLayer&&ut.pickLayer.render(ut.panels,!0),re.linePickActive(!0),G&&G.axesMoved&&G.axesMoved(ut.key,ut.dimensions.map(function(ot){return ot.crossfilterDimensionIndex}))})),Ue.exit().remove();var Oe=Ue.selectAll("."+y.cn.axisOverlays).data(p,c);Oe.enter().append("g").classed(y.cn.axisOverlays,!0),Oe.selectAll("."+y.cn.axis).remove();var _e=Oe.selectAll("."+y.cn.axis).data(p,c);_e.enter().append("g").classed(y.cn.axis,!0),_e.each(function(Ne){var ut=Ne.model.height/Ne.model.tickDistance,ot=Ne.domainScale,yt=ot.domain();u.select(this).call(u.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(ut,Ne.tickFormat).tickValues(Ne.ordinal?yt:null).tickFormat(function(At){return d.isOrdinal(Ne)?At:q(Ne.model.dimensions[Ne.visibleIndex],At)}).scale(ot)),n.font(_e.selectAll("text"),Ne.model.tickFont)}),_e.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),_e.selectAll("text").style("cursor","default");var ce=Oe.selectAll("."+y.cn.axisHeading).data(p,c);ce.enter().append("g").classed(y.cn.axisHeading,!0);var ie=ce.selectAll("."+y.cn.axisTitle).data(p,c);ie.enter().append("text").classed(y.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",K?"none":"auto"),ie.text(function(Ne){return Ne.label}).each(function(Ne){var ut=u.select(this);n.font(ut,Ne.model.labelFont),r.convertToTspans(ut,te)}).attr("transform",function(Ne){var ut=k(Ne.model.labelAngle,Ne.model.labelSide),ot=y.axisTitleOffset;return(ut.dir>0?"":a(0,2*ot+Ne.model.height))+t(ut.degrees)+a(-ot*ut.dx,-ot*ut.dy)}).attr("text-anchor",function(Ne){var ut=k(Ne.model.labelAngle,Ne.model.labelSide),ot=Math.abs(ut.dx),yt=Math.abs(ut.dy);return 2*ot>yt?ut.dir*ut.dx<0?"start":"end":"middle"});var se=Oe.selectAll("."+y.cn.axisExtent).data(p,c);se.enter().append("g").classed(y.cn.axisExtent,!0);var ne=se.selectAll("."+y.cn.axisExtentTop).data(p,c);ne.enter().append("g").classed(y.cn.axisExtentTop,!0),ne.attr("transform",a(0,-y.axisExtentOffset));var be=ne.selectAll("."+y.cn.axisExtentTopText).data(p,c);be.enter().append("text").classed(y.cn.axisExtentTopText,!0).call(z),be.text(function(Ne){return Y(Ne,!0)}).each(function(Ne){n.font(u.select(this),Ne.model.rangeFont)});var De=se.selectAll("."+y.cn.axisExtentBottom).data(p,c);De.enter().append("g").classed(y.cn.axisExtentBottom,!0),De.attr("transform",function(Ne){return a(0,Ne.model.height+y.axisExtentOffset)});var qe=De.selectAll("."+y.cn.axisExtentBottomText).data(p,c);qe.enter().append("text").classed(y.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(z),qe.text(function(Ne){return Y(Ne,!1)}).each(function(Ne){n.font(u.select(this),Ne.model.rangeFont)}),o.ensureAxisBrush(Oe,Q,te)}}}),H3=xe({"src/traces/parcoords/plot.js"(t,O){"use strict";var u=cL(),v=$1(),w=V3().isVisible,S={};function l(a,r,n){var i=r.indexOf(n),s=a.indexOf(i);return s===-1&&(s+=r.length),s}function e(a,r){return function(i,s){return l(a,r,i)-l(a,r,s)}}var t=O.exports=function(r,n){var i=r._fullLayout,s=v(r,[],S);if(s){var c={},p={},f={},d=i._size;n.forEach(function(A,E){var g=A[0].trace,T=f[E]=g.index;c[E]=r.data[T].dimensions,p[E]=r.data[T].dimensions.slice()});var y=function(A,E,g){var T=p[A][E],m=g.map(function(F){return F.slice()}),h="dimensions["+E+"].constraintrange",x=i._tracePreGUI[r._fullData[f[A]].uid];if(x[h]===void 0){var _=T.constraintrange;x[h]=_||null}var D=r._fullData[f[A]].dimensions[E];m.length?(m.length===1&&(m=m[0]),T.constraintrange=m,D.constraintrange=m.slice(),m=[m]):(delete T.constraintrange,delete D.constraintrange,m=null);var C={};C[h]=m,r.emit("plotly_restyle",[C,[f[A]]])},o=function(A){r.emit("plotly_hover",A)},b=function(A){r.emit("plotly_unhover",A)},M=function(A,E){var g=e(E,p[A].filter(w));c[A].sort(g),p[A].filter(function(T){return!w(T)}).sort(function(T){return p[A].indexOf(T)}).forEach(function(T){c[A].splice(c[A].indexOf(T),1),c[A].splice(p[A].indexOf(T),0,T)}),r.emit("plotly_restyle",[{dimensions:[c[A]]},[f[A]]])};u(r,n,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{filterChanged:y,hover:o,unhover:b,axesMoved:M})}};t.reglPrecompiled=S}}),fL=xe({"src/traces/parcoords/base_plot.js"(U){"use strict";var O=Na(),u=df().getModuleCalcData,v=H3(),w=fh();U.name="parcoords",U.plot=function(S){var l=u(S.calcdata,"parcoords")[0];l.length&&v(S,l)},U.clean=function(S,l,e,t){var a=t._has&&t._has("parcoords"),r=l._has&&l._has("parcoords");a&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},U.toSVG=function(S){var l=S._fullLayout._glimages,e=O.select(S).selectAll(".svg-container"),t=e.filter(function(r,n){return n===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var r=this,n=r.toDataURL("image/png"),i=l.append("svg:image");i.attr({xmlns:w.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})}t.each(a),window.setTimeout(function(){O.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),hL=xe({"src/traces/parcoords/base_index.js"(U,O){"use strict";O.exports={attributes:N3(),supplyDefaults:rL(),calc:aL(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:fL(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),dL=xe({"src/traces/parcoords/index.js"(U,O){"use strict";var u=hL();u.plot=H3(),O.exports=u}}),vL=xe({"lib/parcoords.js"(U,O){"use strict";O.exports=dL()}}),G3=xe({"src/traces/parcats/attributes.js"(U,O){"use strict";var u=oo().extendFlat,v=Rs(),w=vl(),S=pl(),{hovertemplateAttrs:l,templatefallbackAttrs:e}=js(),t=Gl().attributes,a=u({editType:"calc"},S("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});O.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:u({},v.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:w({editType:"calc"}),tickfont:w({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:a,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),pL=xe({"src/traces/parcats/defaults.js"(U,O){"use strict";var u=Sr(),v=vf().hasColorscale,w=Fc(),S=Gl().defaults,l=bf(),e=G3(),t=Z1(),a=rs().isTypedArraySpec;function r(i,s,c,p,f){f("line.shape"),f("line.hovertemplate"),f("line.hovertemplatefallback");var d=f("line.color",p.colorway[0]);if(v(i,"line")&&u.isArrayOrTypedArray(d)){if(d.length)return f("line.colorscale"),w(i,s,p,f,{prefix:"line.",cLetter:"c"}),d.length;s.line.color=c}return 1/0}function n(i,s){function c(M,A){return u.coerce(i,s,e.dimensions,M,A)}var p=c("values"),f=c("visible");if(p&&p.length||(f=s.visible=!1),f){c("label"),c("displayindex",s._index);var d=i.categoryarray,y=u.isArrayOrTypedArray(d)&&d.length>0||a(d),o;y&&(o="array");var b=c("categoryorder",o);b==="array"?(c("categoryarray"),c("ticktext")):(delete i.categoryarray,delete i.ticktext),!y&&b==="array"&&(s.categoryorder="trace")}}O.exports=function(s,c,p,f){function d(M,A){return u.coerce(s,c,e,M,A)}var y=l(s,c,{name:"dimensions",handleItemDefaults:n}),o=r(s,c,p,f,d);S(c,f,d),(!Array.isArray(y)||!y.length)&&(c.visible=!1),t(c,y,"values",o),d("hoveron"),d("hovertemplate"),d("hovertemplatefallback"),d("arrangement"),d("bundlecolors"),d("sortpaths"),d("counts");var b=f.font;u.coerceFont(d,"labelfont",b,{overrideDflt:{size:Math.round(b.size)}}),u.coerceFont(d,"tickfont",b,{autoShadowDflt:!0,overrideDflt:{size:Math.round(b.size/1.2)}})}}}),mL=xe({"src/traces/parcats/calc.js"(U,O){"use strict";var u=Xh().wrap,v=vf().hasColorscale,w=xf(),S=i_(),l=go(),e=Sr(),t=yn();O.exports=function(b,M){var A=e.filterVisible(M.dimensions);if(A.length===0)return[];var E=A.map(function(j){var G;if(j.categoryorder==="trace")G=null;else if(j.categoryorder==="array")G=j.categoryarray;else{G=S(j.values);for(var K=!0,H=0;H=o.length||b[o[M]]!==void 0)return!1;b[o[M]]=!0}return!0}}}),gL=xe({"src/traces/parcats/parcats.js"(U,O){"use strict";var u=Na(),v=(zv(),Ta(Yd)).interpolateNumber,w=rg(),S=wi(),l=hu(),e=Sr(),t=e.strTranslate,a=go(),r=el();function n(H,Z,X,$){var Q=Z._context.staticPlot,re=H.map(te.bind(0,Z,X)),ue=$.selectAll("g.parcatslayer").data([null]);ue.enter().append("g").attr("class","parcatslayer").style("pointer-events",Q?"none":"all");var pe=ue.selectAll("g.trace.parcats").data(re,i),ge=pe.enter().append("g").attr("class","trace parcats");pe.attr("transform",function(ne){return t(ne.x,ne.y)}),ge.append("g").attr("class","paths");var Te=pe.select("g.paths"),Se=Te.selectAll("path.path").data(function(ne){return ne.paths},i);Se.attr("fill",function(ne){return ne.model.color});var Ce=Se.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(ne){return ne.model.color}).attr("fill-opacity",0);b(Ce),Se.attr("d",function(ne){return ne.svgD}),Ce.empty()||Se.sort(c),Se.exit().remove(),Se.on("mouseover",p).on("mouseout",f).on("click",o),ge.append("g").attr("class","dimensions");var Ue=pe.select("g.dimensions"),Oe=Ue.selectAll("g.dimension").data(function(ne){return ne.dimensions},i);Oe.enter().append("g").attr("class","dimension"),Oe.attr("transform",function(ne){return t(ne.x,0)}),Oe.exit().remove();var _e=Oe.selectAll("g.category").data(function(ne){return ne.categories},i),ce=_e.enter().append("g").attr("class","category");_e.attr("transform",function(ne){return t(0,ne.y)}),ce.append("rect").attr("class","catrect").attr("pointer-events","none"),_e.select("rect.catrect").attr("fill","none").attr("width",function(ne){return ne.width}).attr("height",function(ne){return ne.height}),E(ce);var ie=_e.selectAll("rect.bandrect").data(function(ne){return ne.bands},i);ie.each(function(){e.raiseToTop(this)}),ie.attr("fill",function(ne){return ne.color});var se=ie.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(ne){return ne.color}).attr("fill-opacity",0);ie.attr("fill",function(ne){return ne.color}).attr("width",function(ne){return ne.width}).attr("height",function(ne){return ne.height}).attr("y",function(ne){return ne.y}).attr("cursor",function(ne){return ne.parcatsViewModel.arrangement==="fixed"?"default":ne.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),T(se),ie.exit().remove(),ce.append("text").attr("class","catlabel").attr("pointer-events","none"),_e.select("text.catlabel").attr("text-anchor",function(ne){return s(ne)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(ne){return s(ne)?ne.width+5:-5}).attr("y",function(ne){return ne.height/2}).text(function(ne){return ne.model.categoryLabel}).each(function(ne){a.font(u.select(this),ne.parcatsViewModel.categorylabelfont),r.convertToTspans(u.select(this),Z)}),ce.append("text").attr("class","dimlabel"),_e.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(ne){return ne.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(ne){return ne.width/2}).attr("y",-5).text(function(ne,be){return be===0?ne.parcatsViewModel.model.dimensions[ne.model.dimensionInd].dimensionLabel:null}).each(function(ne){a.font(u.select(this),ne.parcatsViewModel.labelfont)}),_e.selectAll("rect.bandrect").on("mouseover",z).on("mouseout",R),_e.exit().remove(),Oe.call(u.behavior.drag().origin(function(ne){return{x:ne.x,y:0}}).on("dragstart",k).on("drag",B).on("dragend",N)),pe.each(function(ne){ne.traceSelection=u.select(this),ne.pathSelection=u.select(this).selectAll("g.paths").selectAll("path.path"),ne.dimensionSelection=u.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),pe.exit().remove()}O.exports=function(H,Z,X,$){n(X,H,$,Z)};function i(H){return H.key}function s(H){var Z=H.parcatsViewModel.dimensions.length,X=H.parcatsViewModel.dimensions[Z-1].model.dimensionInd;return H.model.dimensionInd===X}function c(H,Z){return H.model.rawColor>Z.model.rawColor?1:H.model.rawColor"),Ne=u.mouse(Q)[0];l.loneHover({trace:re,x:_e-pe.left+ge.left,y:ce-pe.top+ge.top,text:qe,color:H.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ie,idealAlign:Ne<_e?"right":"left",hovertemplate:(re.line||{}).hovertemplate,hovertemplateLabels:be,eventData:[{data:re._input,fullData:re,count:se,probability:ne}]},{container:ue._hoverlayer.node(),outerContainer:ue._paper.node(),gd:Q})}}}function f(H){if(!H.parcatsViewModel.dragDimension&&(b(u.select(this)),l.loneUnhover(H.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),H.parcatsViewModel.pathSelection.sort(c),H.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var Z=d(H),X=y(H);H.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:Z,event:u.event,constraints:X})}}function d(H){for(var Z=[],X=q(H.parcatsViewModel),$=0;$S.mostReadable(Z.model.color)).attr("stroke-width",.3)}function A(H){H.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function E(H){H.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function g(H){H.attr("stroke","black").attr("stroke-width",1.5)}function T(H){H.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function m(H){var Z=H.parcatsViewModel.pathSelection,X=H.categoryViewModel.model.dimensionInd,$=H.categoryViewModel.model.categoryInd;return Z.filter(function(Q){return Q.model.categoryInds[X]===$&&Q.model.color===H.color})}function h(H){var Z=u.select(H.parentNode).selectAll("rect.bandrect");Z.each(function(X){var $=m(X);M($),$.each(function(){e.raiseToTop(this)})}),A(u.select(H.parentNode))}function x(H){var Z=u.select(H).datum(),X=m(Z);M(X),X.each(function(){e.raiseToTop(this)}),u.select(H.parentNode).selectAll("rect.bandrect").filter(function($){return $.color===Z.color}).each(function(){e.raiseToTop(this),g(u.select(this))})}function _(H,Z,X){var $=u.select(H).datum(),Q=$.categoryViewModel.model,re=$.parcatsViewModel.graphDiv,ue=u.select(H.parentNode).selectAll("rect.bandrect"),pe=[];ue.each(function(Te){var Se=m(Te);Se.each(function(Ce){Array.prototype.push.apply(pe,d(Ce))})});var ge={};ge[Q.dimensionInd]=Q.categoryValue,re.emit(Z,{points:pe,event:X,constraints:ge})}function D(H,Z,X){var $=u.select(H).datum(),Q=$.categoryViewModel.model,re=$.parcatsViewModel.graphDiv,ue=m($),pe=[];ue.each(function(Te){Array.prototype.push.apply(pe,d(Te))});var ge={};ge[Q.dimensionInd]=Q.categoryValue,$.rawColor!==void 0&&(ge.color=$.rawColor),re.emit(Z,{points:pe,event:X,constraints:ge})}function C(H,Z,X){H._fullLayout._calcInverseTransform(H);var $=H._fullLayout._invScaleX,Q=H._fullLayout._invScaleY,re=u.select(X.parentNode).select("rect.catrect"),ue=re.node().getBoundingClientRect(),pe=re.datum(),ge=pe.parcatsViewModel,Te=ge.model.dimensions[pe.model.dimensionInd],Se=ge.trace,Ce=ue.top+ue.height/2,Ue,Oe;ge.dimensions.length>1&&Te.displayInd===ge.dimensions.length-1?(Ue=ue.left,Oe="left"):(Ue=ue.left+ue.width,Oe="right");var _e=pe.model.count,ce=pe.model.categoryLabel,ie=_e/pe.parcatsViewModel.model.count,se={countLabel:_e,categoryLabel:ce,probabilityLabel:ie.toFixed(3)},ne=[];pe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ne.push(["Count:",se.countLabel].join(" ")),pe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ne.push(["P("+se.categoryLabel+"):",se.probabilityLabel].join(" "));var be=ne.join("
");return{trace:Se,x:$*(Ue-Z.left),y:Q*(Ce-Z.top),text:be,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:Oe,hovertemplate:Se.hovertemplate,hovertemplateLabels:se,eventData:[{data:Se._input,fullData:Se,count:_e,category:ce,probability:ie}]}}function F(H,Z,X){var $=[];return u.select(X.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Q=this;$.push(C(H,Z,Q))}),$}function I(H,Z,X){H._fullLayout._calcInverseTransform(H);var $=H._fullLayout._invScaleX,Q=H._fullLayout._invScaleY,re=X.getBoundingClientRect(),ue=u.select(X).datum(),pe=ue.categoryViewModel,ge=pe.parcatsViewModel,Te=ge.model.dimensions[pe.model.dimensionInd],Se=ge.trace,Ce=re.y+re.height/2,Ue,Oe;ge.dimensions.length>1&&Te.displayInd===ge.dimensions.length-1?(Ue=re.left,Oe="left"):(Ue=re.left+re.width,Oe="right");var _e=pe.model.categoryLabel,ce=ue.parcatsViewModel.model.count,ie=0;ue.categoryViewModel.bands.forEach(function(At){At.color===ue.color&&(ie+=At.count)});var se=pe.model.count,ne=0;ge.pathSelection.each(function(At){At.model.color===ue.color&&(ne+=At.model.count)});var be=ie/ce,De=ie/ne,qe=ie/se,Ne={countLabel:ie,categoryLabel:_e,probabilityLabel:be.toFixed(3)},ut=[];pe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ut.push(["Count:",Ne.countLabel].join(" ")),pe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(ut.push("P(color \u2229 "+_e+"): "+Ne.probabilityLabel),ut.push("P("+_e+" | color): "+De.toFixed(3)),ut.push("P(color | "+_e+"): "+qe.toFixed(3)));var ot=ut.join("
"),yt=S.mostReadable(ue.color);return{trace:Se,x:$*(Ue-Z.left),y:Q*(Ce-Z.top),text:ot,color:ue.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:yt,fontSize:10,idealAlign:Oe,hovertemplate:Se.hovertemplate,hovertemplateLabels:Ne,eventData:[{data:Se._input,fullData:Se,category:_e,count:ce,probability:be,categorycount:se,colorcount:ne,bandcolorcount:ie}]}}function z(H){if(!H.parcatsViewModel.dragDimension&&H.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var Z=u.mouse(this)[1];if(Z<-1)return;var X=H.parcatsViewModel.graphDiv,$=X._fullLayout,Q=$._paperdiv.node().getBoundingClientRect(),re=H.parcatsViewModel.hoveron,ue=this;if(re==="color"?(x(ue),D(ue,"plotly_hover",u.event)):(h(ue),_(ue,"plotly_hover",u.event)),H.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var pe;re==="category"?pe=C(X,Q,ue):re==="color"?pe=I(X,Q,ue):re==="dimension"&&(pe=F(X,Q,ue)),pe&&l.loneHover(pe,{container:$._hoverlayer.node(),outerContainer:$._paper.node(),gd:X})}}}function R(H){var Z=H.parcatsViewModel;if(!Z.dragDimension&&(b(Z.pathSelection),E(Z.dimensionSelection.selectAll("g.category")),T(Z.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),l.loneUnhover(Z.graphDiv._fullLayout._hoverlayer.node()),Z.pathSelection.sort(c),Z.hoverinfoItems.indexOf("skip")===-1)){var X=H.parcatsViewModel.hoveron,$=this;X==="color"?D($,"plotly_unhover",u.event):_($,"plotly_unhover",u.event)}}function k(H){H.parcatsViewModel.arrangement!=="fixed"&&(H.dragDimensionDisplayInd=H.model.displayInd,H.initialDragDimensionDisplayInds=H.parcatsViewModel.model.dimensions.map(function(Z){return Z.displayInd}),H.dragHasMoved=!1,H.dragCategoryDisplayInd=null,u.select(this).selectAll("g.category").select("rect.catrect").each(function(Z){var X=u.mouse(this)[0],$=u.mouse(this)[1];-2<=X&&X<=Z.width+2&&-2<=$&&$<=Z.height+2&&(H.dragCategoryDisplayInd=Z.model.displayInd,H.initialDragCategoryDisplayInds=H.model.categories.map(function(Q){return Q.displayInd}),Z.model.dragY=Z.y,e.raiseToTop(this.parentNode),u.select(this.parentNode).selectAll("rect.bandrect").each(function(Q){Q.y<$&&$<=Q.y+Q.height&&(H.potentialClickBand=this)}))}),H.parcatsViewModel.dragDimension=H,l.loneUnhover(H.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function B(H){if(H.parcatsViewModel.arrangement!=="fixed"&&(H.dragHasMoved=!0,H.dragDimensionDisplayInd!==null)){var Z=H.dragDimensionDisplayInd,X=Z-1,$=Z+1,Q=H.parcatsViewModel.dimensions[Z];if(H.dragCategoryDisplayInd!==null){var re=Q.categories[H.dragCategoryDisplayInd];re.model.dragY+=u.event.dy;var ue=re.model.dragY,pe=re.model.displayInd,ge=Q.categories,Te=ge[pe-1],Se=ge[pe+1];Te!==void 0&&ueSe.y+Se.height/2&&(re.model.displayInd=Se.model.displayInd,Se.model.displayInd=pe),H.dragCategoryDisplayInd=re.model.displayInd}if(H.dragCategoryDisplayInd===null||H.parcatsViewModel.arrangement==="freeform"){Q.model.dragX=u.event.x;var Ce=H.parcatsViewModel.dimensions[X],Ue=H.parcatsViewModel.dimensions[$];Ce!==void 0&&Q.model.dragXUe.x&&(Q.model.displayInd=Ue.model.displayInd,Ue.model.displayInd=H.dragDimensionDisplayInd),H.dragDimensionDisplayInd=Q.model.displayInd}G(H.parcatsViewModel),j(H.parcatsViewModel),ee(H.parcatsViewModel),Y(H.parcatsViewModel)}}function N(H){if(H.parcatsViewModel.arrangement!=="fixed"&&H.dragDimensionDisplayInd!==null){u.select(this).selectAll("text").attr("font-weight","normal");var Z={},X=q(H.parcatsViewModel),$=H.parcatsViewModel.model.dimensions.map(function(Ue){return Ue.displayInd}),Q=H.initialDragDimensionDisplayInds.some(function(Ue,Oe){return Ue!==$[Oe]});Q&&$.forEach(function(Ue,Oe){var _e=H.parcatsViewModel.model.dimensions[Oe].containerInd;Z["dimensions["+_e+"].displayindex"]=Ue});var re=!1;if(H.dragCategoryDisplayInd!==null){var ue=H.model.categories.map(function(Ue){return Ue.displayInd});if(re=H.initialDragCategoryDisplayInds.some(function(Ue,Oe){return Ue!==ue[Oe]}),re){var pe=H.model.categories.slice().sort(function(Ue,Oe){return Ue.displayInd-Oe.displayInd}),ge=pe.map(function(Ue){return Ue.categoryValue}),Te=pe.map(function(Ue){return Ue.categoryLabel});Z["dimensions["+H.model.containerInd+"].categoryarray"]=[ge],Z["dimensions["+H.model.containerInd+"].ticktext"]=[Te],Z["dimensions["+H.model.containerInd+"].categoryorder"]="array"}}if(H.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!H.dragHasMoved&&H.potentialClickBand&&(H.parcatsViewModel.hoveron==="color"?D(H.potentialClickBand,"plotly_click",u.event.sourceEvent):_(H.potentialClickBand,"plotly_click",u.event.sourceEvent)),H.model.dragX=null,H.dragCategoryDisplayInd!==null){var Se=H.parcatsViewModel.dimensions[H.dragDimensionDisplayInd].categories[H.dragCategoryDisplayInd];Se.model.dragY=null,H.dragCategoryDisplayInd=null}H.dragDimensionDisplayInd=null,H.parcatsViewModel.dragDimension=null,H.dragHasMoved=null,H.potentialClickBand=null,G(H.parcatsViewModel),j(H.parcatsViewModel);var Ce=u.transition().duration(300).ease("cubic-in-out");Ce.each(function(){ee(H.parcatsViewModel,!0),Y(H.parcatsViewModel,!0)}).each("end",function(){(Q||re)&&w.restyle(H.parcatsViewModel.graphDiv,Z,[X])})}}function q(H){for(var Z,X=H.graphDiv._fullData,$=0;$=0;ge--)Te+="C"+ue[ge]+","+(Z[ge+1]+$)+" "+re[ge]+","+(Z[ge]+$)+" "+(H[ge]+X[ge])+","+(Z[ge]+$),Te+="l-"+X[ge]+",0 ";return Te+="Z",Te}function j(H){var Z=H.dimensions,X=H.model,$=Z.map(function(vr){return vr.categories.map(function(Ut){return Ut.y})}),Q=H.model.dimensions.map(function(vr){return vr.categories.map(function(Ut){return Ut.displayInd})}),re=H.model.dimensions.map(function(vr){return vr.displayInd}),ue=H.dimensions.map(function(vr){return vr.model.dimensionInd}),pe=Z.map(function(vr){return vr.x}),ge=Z.map(function(vr){return vr.width}),Te=[];for(var Se in X.paths)X.paths.hasOwnProperty(Se)&&Te.push(X.paths[Se]);function Ce(vr){var Ut=vr.categoryInds.map(function(at,Ee){return Q[Ee][at]}),Jt=ue.map(function(at){return Ut[at]});return Jt}Te.sort(function(vr,Ut){var Jt=Ce(vr),at=Ce(Ut);return H.sortpaths==="backward"&&(Jt.reverse(),at.reverse()),Jt.push(vr.valueInds[0]),at.push(Ut.valueInds[0]),H.bundlecolors&&(Jt.unshift(vr.rawColor),at.unshift(Ut.rawColor)),Jtat?1:0});for(var Ue=new Array(Te.length),Oe=Z[0].model.count,_e=Z[0].categories.map(function(vr){return vr.height}).reduce(function(vr,Ut){return vr+Ut}),ce=0;ce0?se=_e*(ie.count/Oe):se=0;for(var ne=new Array($.length),be=0;be1?ue=(H.width-2*X-$)/(Q-1):ue=0,pe=X,ge=pe+ue*re;var Te=[],Se=H.model.maxCats,Ce=Z.categories.length,Ue=8,Oe=Z.count,_e=H.height-Ue*(Se-1),ce,ie,se,ne,be,De=(Se-Ce)*Ue/2,qe=Z.categories.map(function(Ne){return{displayInd:Ne.displayInd,categoryInd:Ne.categoryInd}});for(qe.sort(function(Ne,ut){return Ne.displayInd-ut.displayInd}),be=0;be0?ce=ie.count/Oe*_e:ce=0,se={key:ie.valueInds[0],model:ie,width:$,height:ce,y:ie.dragY!==null?ie.dragY:De,bands:[],parcatsViewModel:H},De=De+ce+Ue,Te.push(se);return{key:Z.dimensionInd,x:Z.dragX!==null?Z.dragX:ge,y:0,width:$,model:Z,categories:Te,parcatsViewModel:H,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),W3=xe({"src/traces/parcats/plot.js"(U,O){"use strict";var u=gL();O.exports=function(w,S,l,e){var t=w._fullLayout,a=t._paper,r=t._size;u(w,a,S,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},l,e)}}}),yL=xe({"src/traces/parcats/base_plot.js"(U){"use strict";var O=df().getModuleCalcData,u=W3(),v="parcats";U.name=v,U.plot=function(w,S,l,e){var t=O(w.calcdata,v);if(t.length){var a=t[0];u(w,a,l,e)}},U.clean=function(w,S,l,e){var t=e._has&&e._has("parcats"),a=S._has&&S._has("parcats");t&&!a&&e._paperdiv.selectAll(".parcats").remove()}}}),_L=xe({"src/traces/parcats/index.js"(U,O){"use strict";O.exports={attributes:G3(),supplyDefaults:pL(),calc:mL(),plot:W3(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:yL(),categories:["noOpacity"],meta:{}}}}),bL=xe({"lib/parcats.js"(U,O){"use strict";O.exports=_L()}}),xL=xe({"src/plots/map/styles/arcgis-sat-hybrid.js"(U,O){"use strict";O.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} + }`}),A={};return{regl:f,draw:u,atlas:A}},C.prototype.update=function(f){var u=this;if(typeof f=="string")f={text:f};else if(!f)return;f=x(f,{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),f.opacity!=null&&(Array.isArray(f.opacity)?this.opacity=f.opacity.map(function(se){return parseFloat(se)}):this.opacity=parseFloat(f.opacity)),f.viewport!=null&&(this.viewport=r(f.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(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]),f.kerning!=null&&(this.kerning=f.kerning),f.offset!=null&&(typeof f.offset=="number"&&(f.offset=[f.offset,0]),this.positionOffset=p(f.offset)),f.direction&&(this.direction=f.direction),f.range&&(this.range=f.range,this.scale=[1/(f.range[2]-f.range[0]),1/(f.range[3]-f.range[1])],this.translate=[-f.range[0],-f.range[1]]),f.scale&&(this.scale=f.scale),f.translate&&(this.translate=f.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!f.font&&(f.font=C.baseFontSize+"px sans-serif");var A=!1,b=!1;if(f.font&&(Array.isArray(f.font)?f.font:[f.font]).forEach(function(se,Te){if(typeof se=="string")try{se=v.parse(se)}catch{se=v.parse(C.baseFontSize+"px "+se)}else{var Fe=se.style,We=se.weight,Ge=se.stretch,gt=se.variant;se=v.parse(v.stringify(se)),Fe&&(se.style=Fe),We&&(se.weight=We),Ge&&(se.stretch=Ge),gt&&(se.variant=gt)}var mt=v.stringify({size:C.baseFontSize,family:se.family,stretch:S?se.stretch:void 0,variant:se.variant,weight:se.weight,style:se.style}),Tt=o(se.size),At=Math.round(Tt[0]*s(Tt[1]));if(At!==u.fontSize[Te]&&(b=!0,u.fontSize[Te]=At),(!u.font[Te]||mt!=u.font[Te].baseString)&&(A=!0,u.font[Te]=C.fonts[mt],!u.font[Te])){var Kt=se.family.join(", "),nr=[se.style];se.style!=se.variant&&nr.push(se.variant),se.variant!=se.weight&&nr.push(se.weight),S&&se.weight!=se.stretch&&nr.push(se.stretch),u.font[Te]={baseString:mt,family:Kt,weight:se.weight,stretch:se.stretch,style:se.style,variant:se.variant,width:{},kerning:{},metrics:h(Kt,{origin:"top",fontSize:C.baseFontSize,fontStyle:nr.join(" ")})},C.fonts[mt]=u.font[Te]}}),(A||b)&&this.font.forEach(function(se,Te){var Fe=v.stringify({size:u.fontSize[Te],family:se.family,stretch:S?se.stretch:void 0,variant:se.variant,weight:se.weight,style:se.style});if(u.fontAtlas[Te]=u.shader.atlas[Fe],!u.fontAtlas[Te]){var We=se.metrics;u.shader.atlas[Fe]=u.fontAtlas[Te]={fontString:Fe,step:Math.ceil(u.fontSize[Te]*We.bottom*.5)*2,em:u.fontSize[Te],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}f.text==null&&(f.text=u.text)}),typeof f.text=="string"&&f.position&&f.position.length>2){for(var z=Array(f.position.length*.5),I=0;I2){for(var B=!f.position[0].length,F=a.mallocFloat(this.count*2),P=0,j=0;P1?u.align[Te]:u.align[0]:u.align;if(typeof Fe=="number")return Fe;switch(Fe){case"right":case"end":return-se;case"center":case"centre":case"middle":return-se*.5}return 0})),this.baseline==null&&f.baseline==null&&(f.baseline=0),f.baseline!=null&&(this.baseline=f.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(se,Te){var Fe=(u.font[Te]||u.font[0]).metrics,We=0;return We+=Fe.bottom*.5,typeof se=="number"?We+=se-Fe.baseline:We+=-Fe[se],We*=-1,We})),f.color!=null)if(f.color||(f.color="transparent"),typeof f.color=="string"||!isNaN(f.color))this.color=e(f.color,"uint8");else{var Ae;if(typeof f.color[0]=="number"&&f.color.length>this.counts.length){var Me=f.color.length;Ae=a.mallocUint8(Me);for(var Ie=(f.color.subarray||f.color.slice).bind(f.color),Ue=0;Ue4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ge){var ue=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(ue);for(var ve=0;ve1?this.counts[ve]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ve]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ve*4,ve*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ve]:this.opacity,baseline:this.baselineOffset[ve]!=null?this.baselineOffset[ve]:this.baselineOffset[0],align:this.align?this.alignOffset[ve]!=null?this.alignOffset[ve]:this.alignOffset[0]:0,atlas:this.fontAtlas[ve]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ve*2,ve*2+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=[]}},C.prototype.destroy=function(){},C.prototype.kerning=!0,C.prototype.position={constant:new Float32Array(2)},C.prototype.translate=null,C.prototype.scale=null,C.prototype.font=null,C.prototype.text="",C.prototype.positionOffset=[0,0],C.prototype.opacity=1,C.prototype.color=new Uint8Array([0,0,0,255]),C.prototype.alignOffset=[0,0],C.maxAtlasSize=1024,C.atlasCanvas=document.createElement("canvas"),C.atlasContext=C.atlasCanvas.getContext("2d",{alpha:!1}),C.baseFontSize=64,C.fonts={};function _(T){return typeof T=="function"&&T._gl&&T.prop&&T.texture&&T.buffer}V.exports=C}}),Vy=Ee({"src/lib/prepare_regl.js"(J,V){"use strict";var v=Q3(),x=Zw();V.exports=function(k,l,e){var t=k._fullLayout,a=!0;return t._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(e);return}if(!(r.pick&&!t._has("parcoords"))){try{r.regl=x({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:k._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:e||{}})}catch{a=!1}r.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(n){k&&k.emit&&k.emit("plotly_webglcontextlost",{event:n,layer:r.key})},!1)}}),a||v({container:t._glcontainer.node()}),a}}}),Qw=Ee({"src/traces/scattergl/plot.js"(c,V){"use strict";var v=Cw(),x=qw(),E=S9(),k=U9(),l=Vr(),e=Gh().selectMode,t=Vy(),a=al(),r=lx(),n=Sw().styleTextSelection,o={};function s(m,h,p,g){var i=m._size,w=m.width*g,S=m.height*g,M=i.l*g,C=i.b*g,_=i.r*g,T=i.t*g,f=i.w*g,u=i.h*g;return[M+h.domain[0]*f,C+p.domain[0]*u,w-_-(1-h.domain[1])*f,S-T-(1-p.domain[1])*u]}var c=V.exports=function(h,p,g){if(g.length){var i=h._fullLayout,w=p._scene,S=p.xaxis,M=p.yaxis,C,_;if(w){var T=t(h,["ANGLE_instanced_arrays","OES_element_index_uint"],o);if(!T){w.init();return}var f=w.count,u=i._glcanvas.data()[0].regl;if(r(h,p,g),w.dirty){if((w.line2d||w.error2d)&&!(w.scatter2d||w.fill2d||w.glText)&&u.clear({color:!0,depth:!0}),w.error2d===!0&&(w.error2d=E(u)),w.line2d===!0&&(w.line2d=x(u)),w.scatter2d===!0&&(w.scatter2d=v(u)),w.fill2d===!0&&(w.fill2d=x(u)),w.glText===!0)for(w.glText=new Array(f),C=0;Cw.glText.length){var A=f-w.glText.length;for(C=0;Cee&&(isNaN($[ne])||isNaN($[ne+1]));)ne-=2;q.positions=$.slice(ee,ne+2)}return q}),w.line2d.update(w.lineOptions)),w.error2d){var I=(w.errorXOptions||[]).concat(w.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});w.error2d.update(I)}w.scatter2d&&w.scatter2d.update(w.markerOptions),w.fillOrder=l.repeat(null,f),w.fill2d&&(w.fillOptions=w.fillOptions.map(function(q,$){var ee=g[$];if(!(!q||!ee||!ee[0]||!ee[0].trace)){var ne=ee[0],fe=ne.trace,ye=ne.t,xe=w.lineOptions[$],Ae,Me,Ie=[];fe._ownfill&&Ie.push($),fe._nexttrace&&Ie.push($+1),Ie.length&&(w.fillOrder[$]=Ie);var Ue=[],qe=xe&&xe.positions||ye.positions,ke,ge;if(fe.fill==="tozeroy"){for(ke=0;keke&&isNaN(qe[ge+1]);)ge-=2;qe[ke+1]!==0&&(Ue=[qe[ke],0]),Ue=Ue.concat(qe.slice(ke,ge+2)),qe[ge+1]!==0&&(Ue=Ue.concat([qe[ge],0]))}else if(fe.fill==="tozerox"){for(ke=0;keke&&isNaN(qe[ge]);)ge-=2;qe[ke]!==0&&(Ue=[0,qe[ke+1]]),Ue=Ue.concat(qe.slice(ke,ge+2)),qe[ge]!==0&&(Ue=Ue.concat([0,qe[ge+1]]))}else if(fe.fill==="toself"||fe.fill==="tonext"){for(Ue=[],Ae=0,q.splitNull=!0,Me=0;Me-1;for(let[q]of g)if(q){var F=q.trace,P=q.t,j=P.index,U=F._length,Z=P.x,Q=P.y;if(F.selectedpoints||R||B){if(R||(R=!0),F.selectedpoints){var re=w.selectBatch[j]=F.selectedpoints,ae={};for(_=0;_S&&p||wn,b;for(A?b=p.sizeAvg||Math.max(p.size,3):b=E(c,h),M=0;M{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,k(()=>{this.dirty=!1})),this)},a.prototype.update=function(...s){if(!s.length)return;for(let h=0;hb||!p.lower&&A{c[g+w]=h})}this.scatter.draw(...c)}return this},a.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function r(s,c,m){let h=s.id!=null?s.id:s,p=c,g=m;return h<<16|(p&255)<<8|g&255}function n(s,c,m){let h,p,g,i,w,S,M,C,_=s[c],T=s[m];return _.length>2?(h=_[0],g=_[2],p=_[1],i=_[3]):_.length?(h=p=_[0],g=i=_[1]):(h=_.x,p=_.y,g=_.x+_.width,i=_.y+_.height),T.length>2?(w=T[0],M=T[2],S=T[1],C=T[3]):T.length?(w=S=T[0],M=C=T[1]):(w=T.x,S=T.y,M=T.x+T.width,C=T.y+T.height),[w,p,M,i]}function o(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=e(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),K9=Ee({"src/traces/splom/plot.js"(J,V){"use strict";var v=Z9(),x=Vr(),E=Xl(),k=Gh().selectMode;V.exports=function(t,a,r){if(r.length)for(var n=0;n-1,B=k(p)||!!n.selectedpoints||R,F=!0;if(B){var P=n._length;if(n.selectedpoints){s.selectBatch=n.selectedpoints;var j=n.selectedpoints,U={};for(w=0;w=Z[Q][0]&&U<=Z[Q][1])return!0;return!1}function c(U){U.attr("x",-v.bar.captureWidth/2).attr("width",v.bar.captureWidth)}function m(U){U.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function h(U){if(!U.brush.filterSpecified)return"0,"+U.height;for(var Z=p(U.brush.filter.getConsolidated(),U.height),Q=[0],re,ae,oe,H=Z.length?Z[0][0]:null,X=0;XU[1]+Q||Z=.9*U[1]+.1*U[0]?"n":Z<=.9*U[0]+.1*U[1]?"s":"ns"}function i(){x.select(document.body).style("cursor",null)}function w(U){U.attr("stroke-dasharray",h)}function S(U,Z){var Q=x.select(U).selectAll(".highlight, .highlight-shadow"),re=Z?Q.transition().duration(v.bar.snapDuration).each("end",Z):Q;w(re)}function M(U,Z){var Q=U.brush,re=Q.filterSpecified,ae=NaN,oe={},H;if(re){var X=U.height,K=Q.filter.getConsolidated(),G=p(K,X),Y=NaN,q=NaN,$=NaN;for(H=0;H<=G.length;H++){var ee=G[H];if(ee&&ee[0]<=Z&&Z<=ee[1]){Y=H;break}else if(q=H?H-1:NaN,ee&&ee[0]>Z){$=H;break}}if(ae=Y,isNaN(ae)&&(isNaN(q)||isNaN($)?ae=isNaN(q)?$:q:ae=Z-G[q][1]=Ae[0]&&xe<=Ae[1]){oe.clickableOrdinalRange=Ae;break}}}return oe}function C(U,Z){x.event.sourceEvent.stopPropagation();var Q=Z.height-x.mouse(U)[1]-2*v.verticalPadding,re=Z.unitToPaddedPx.invert(Q),ae=Z.brush,oe=M(Z,Q),H=oe.interval,X=ae.svgBrush;if(X.wasDragged=!1,X.grabbingBar=oe.region==="ns",X.grabbingBar){var K=H.map(Z.unitToPaddedPx);X.grabPoint=Q-K[0]-v.verticalPadding,X.barLength=K[1]-K[0]}X.clickableOrdinalRange=oe.clickableOrdinalRange,X.stayingIntervals=Z.multiselect&&ae.filterSpecified?ae.filter.getConsolidated():[],H&&(X.stayingIntervals=X.stayingIntervals.filter(function(G){return G[0]!==H[0]&&G[1]!==H[1]})),X.startExtent=oe.region?H[oe.region==="s"?1:0]:re,Z.parent.inBrushDrag=!0,X.brushStartCallback()}function _(U,Z){x.event.sourceEvent.stopPropagation();var Q=Z.height-x.mouse(U)[1]-2*v.verticalPadding,re=Z.brush.svgBrush;re.wasDragged=!0,re._dragging=!0,re.grabbingBar?re.newExtent=[Q-re.grabPoint,Q+re.barLength-re.grabPoint].map(Z.unitToPaddedPx.invert):re.newExtent=[re.startExtent,Z.unitToPaddedPx.invert(Q)].sort(l),Z.brush.filterSpecified=!0,re.extent=re.stayingIntervals.concat([re.newExtent]),re.brushCallback(Z),S(U.parentNode)}function T(U,Z){var Q=Z.brush,re=Q.filter,ae=Q.svgBrush;ae._dragging||(f(U,Z),_(U,Z),Z.brush.svgBrush.wasDragged=!1),ae._dragging=!1;var oe=x.event;oe.sourceEvent.stopPropagation();var H=ae.grabbingBar;if(ae.grabbingBar=!1,ae.grabLocation=void 0,Z.parent.inBrushDrag=!1,i(),!ae.wasDragged){ae.wasDragged=void 0,ae.clickableOrdinalRange?Q.filterSpecified&&Z.multiselect?ae.extent.push(ae.clickableOrdinalRange):(ae.extent=[ae.clickableOrdinalRange],Q.filterSpecified=!0):H?(ae.extent=ae.stayingIntervals,ae.extent.length===0&&N(Q)):N(Q),ae.brushCallback(Z),S(U.parentNode),ae.brushEndCallback(Q.filterSpecified?re.getConsolidated():[]);return}var X=function(){re.set(re.getConsolidated())};if(Z.ordinal){var K=Z.unitTickvals;K[K.length-1]ae.newExtent[0];ae.extent=ae.stayingIntervals.concat(G?[ae.newExtent]:[]),ae.extent.length||N(Q),ae.brushCallback(Z),G?S(U.parentNode,X):(X(),S(U.parentNode))}else X();ae.brushEndCallback(Q.filterSpecified?re.getConsolidated():[])}function f(U,Z){var Q=Z.height-x.mouse(U)[1]-2*v.verticalPadding,re=M(Z,Q),ae="crosshair";re.clickableOrdinalRange?ae="pointer":re.region&&(ae=re.region+"-resize"),x.select(document.body).style("cursor",ae)}function u(U){U.on("mousemove",function(Z){x.event.preventDefault(),Z.parent.inBrushDrag||f(this,Z)}).on("mouseleave",function(Z){Z.parent.inBrushDrag||i()}).call(x.behavior.drag().on("dragstart",function(Z){C(this,Z)}).on("drag",function(Z){_(this,Z)}).on("dragend",function(Z){T(this,Z)}))}function A(U,Z){return U[0]-Z[0]}function b(U,Z,Q){var re=Q._context.staticPlot,ae=U.selectAll(".background").data(k);ae.enter().append("rect").classed("background",!0).call(c).call(m).style("pointer-events",re?"none":"auto").attr("transform",e(0,v.verticalPadding)),ae.call(u).attr("height",function(X){return X.height-v.verticalPadding});var oe=U.selectAll(".highlight-shadow").data(k);oe.enter().append("line").classed("highlight-shadow",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width+v.bar.strokeWidth).attr("stroke",Z).attr("opacity",v.bar.strokeOpacity).attr("stroke-linecap","butt"),oe.attr("y1",function(X){return X.height}).call(w);var H=U.selectAll(".highlight").data(k);H.enter().append("line").classed("highlight",!0).attr("x",-v.bar.width/2).attr("stroke-width",v.bar.width-v.bar.strokeWidth).attr("stroke",v.bar.fillColor).attr("opacity",v.bar.fillOpacity).attr("stroke-linecap","butt"),H.attr("y1",function(X){return X.height}).call(w)}function z(U,Z,Q){var re=U.selectAll("."+v.cn.axisBrush).data(k,E);re.enter().append("g").classed(v.cn.axisBrush,!0),b(re,Z,Q)}function I(U){return U.svgBrush.extent.map(function(Z){return Z.slice()})}function N(U){U.filterSpecified=!1,U.svgBrush.extent=[[-1/0,1/0]]}function R(U){return function(Q){var re=Q.brush,ae=I(re),oe=ae.slice();re.filter.set(oe),U()}}function B(U){for(var Z=U.slice(),Q=[],re,ae=Z.shift();ae;){for(re=ae.slice();(ae=Z.shift())&&ae[0]<=re[1];)re[1]=Math.max(re[1],ae[1]);Q.push(re)}return Q.length===1&&Q[0][0]>Q[0][1]&&(Q=[]),Q}function F(){var U=[],Z,Q;return{set:function(re){U=re.map(function(ae){return ae.slice().sort(l)}).sort(A),U.length===1&&U[0][0]===-1/0&&U[0][1]===1/0&&(U=[[0,-1]]),Z=B(U),Q=U.reduce(function(ae,oe){return[Math.min(ae[0],oe[0]),Math.max(ae[1],oe[1])]},[1/0,-1/0])},get:function(){return U.slice()},getConsolidated:function(){return Z},getBounds:function(){return Q}}}function P(U,Z,Q,re,ae,oe){var H=F();return H.set(Q),{filter:H,filterSpecified:Z,svgBrush:{extent:[],brushStartCallback:re,brushCallback:R(ae),brushEndCallback:oe}}}function j(U,Z){if(Array.isArray(U[0])?(U=U.map(function(re){return re.sort(l)}),Z.multiselect?U=B(U.sort(A)):U=[U[0]]):U=[U.sort(l)],Z.tickvals){var Q=Z.tickvals.slice().sort(l);if(U=U.map(function(re){var ae=[o(0,Q,re[0],[]),o(1,Q,re[1],[])];if(ae[1]>ae[0])return ae}).filter(function(re){return re}),!U.length)return}return U.length>1?U:U[0]}V.exports={makeBrush:P,ensureAxisBrush:z,cleanRanges:j}}}),iL=Ee({"src/traces/parcoords/defaults.js"(J,V){"use strict";var v=Vr(),x=cf().hasColorscale,E=Cc(),k=kl().defaults,l=Mf(),e=uo(),t=r5(),a=n5(),r=jm().maxDimensionCount,n=Hy();function o(c,m,h,p,g){var i=g("line.color",h);if(x(c,"line")&&v.isArrayOrTypedArray(i)){if(i.length)return g("line.colorscale"),E(c,m,p,g,{prefix:"line.",cLetter:"c"}),i.length;m.line.color=h}return 1/0}function s(c,m,h,p){function g(C,_){return v.coerce(c,m,t.dimensions,C,_)}var i=g("values"),w=g("visible");if(i&&i.length||(w=m.visible=!1),w){g("label"),g("tickvals"),g("ticktext"),g("tickformat");var S=g("range");m._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:S},e.setConvert(m._ax,p.layout),g("multiselect");var M=g("constraintrange");M&&(m.constraintrange=a.cleanRanges(M,m))}}V.exports=function(m,h,p,g){function i(_,T){return v.coerce(m,h,t,_,T)}var w=m.dimensions;Array.isArray(w)&&w.length>r&&(v.log("parcoords traces support up to "+r+" dimensions at the moment"),w.splice(r));var S=l(m,h,{name:"dimensions",layout:g,handleItemDefaults:s}),M=o(m,h,p,g,i);k(h,g,i),(!Array.isArray(S)||!S.length)&&(h.visible=!1),n(h,S,"values",M);var C=v.extendFlat({},g.font,{size:Math.round(g.font.size/1.2)});v.coerceFont(i,"labelfont",C),v.coerceFont(i,"tickfont",C,{autoShadowDflt:!0}),v.coerceFont(i,"rangefont",C),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}}}),oL=Ee({"src/traces/parcoords/calc.js"(J,V){"use strict";var v=Vr().isArrayOrTypedArray,x=pl(),E=Qh().wrap;V.exports=function(e,t){var a,r;return x.hasColorscale(t,"line")&&v(t.line.color)?(a=t.line.color,r=x.extractOpts(t.line).colorscale,x.calc(e,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=k(t._length),r=[[0,t.line.color],[1,t.line.color]]),E({lineColor:a,cscale:r})};function k(l){for(var e=new Array(l),t=0;t 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),x=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),E=jm().maxDimensionCount,k=Vr(),l=1e-6,e=2048,t=new Uint8Array(4),a=new Uint8Array(4),r={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function n(T){T.read({x:0,y:0,width:1,height:1,data:t})}function o(T,f,u,A,b){var z=T._gl;z.enable(z.SCISSOR_TEST),z.scissor(f,u,A,b),T.clear({color:[0,0,0,0],depth:1})}function s(T,f,u,A,b,z){var I=z.key;function N(R){var B=Math.min(A,b-R*A);R===0&&(window.cancelAnimationFrame(u.currentRafs[I]),delete u.currentRafs[I],o(T,z.scissorX,z.scissorY,z.scissorWidth,z.viewBoxSize[1])),!u.clearOnly&&(z.count=2*B,z.offset=2*R*A,f(z),R*A+B>>8*f)%256/255}function p(T,f,u){for(var A=new Array(T*(E+4)),b=0,z=0;zMe&&(Me=q[fe].dim1.canvasX,xe=fe);ne===0&&o(b,0,0,B.canvasWidth,B.canvasHeight);var Ie=H(u);for(fe=0;fefe._length&&(ge=ge.slice(0,fe._length));var ue=fe.tickvals,ve;function se(gt,mt){return{val:gt,text:ve[mt]}}function Te(gt,mt){return gt.val-mt.val}if(E(ue)&&ue.length){x.isTypedArray(ue)&&(ue=Array.from(ue)),ve=fe.ticktext,!E(ve)||!ve.length?ve=ue.map(k(fe.tickformat)):ve.length>ue.length?ve=ve.slice(0,ue.length):ue.length>ve.length&&(ue=ue.slice(0,ve.length));for(var Fe=1;Fe=mt||nr>=Tt)return;var _r=Ge.lineLayer.readPixel(Kt,Tt-1-nr),Zt=_r[3]!==0,sr=Zt?_r[2]+256*(_r[1]+256*_r[0]):null,Ot={x:Kt,y:nr,clientX:gt.clientX,clientY:gt.clientY,dataIndex:Ge.model.key,curveNumber:sr};sr!==xe&&(Zt?X.hover(Ot):X.unhover&&X.unhover(Ot),xe=sr)}}),ye.style("opacity",function(Ge){return Ge.pick?0:1}),Y.style("background","rgba(255, 255, 255, 0)");var Me=Y.selectAll("."+g.cn.parcoords).data(fe,c);Me.exit().remove(),Me.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Me.attr("transform",function(Ge){return a(Ge.model.translateX,Ge.model.translateY)});var Ie=Me.selectAll("."+g.cn.parcoordsControlView).data(m,c);Ie.enter().append("g").classed(g.cn.parcoordsControlView,!0),Ie.attr("transform",function(Ge){return a(Ge.model.pad.l,Ge.model.pad.t)});var Ue=Ie.selectAll("."+g.cn.yAxis).data(function(Ge){return Ge.dimensions},c);Ue.enter().append("g").classed(g.cn.yAxis,!0),Ie.each(function(Ge){j(Ue,Ge,$)}),ye.each(function(Ge){if(Ge.viewModel){!Ge.lineLayer||X?Ge.lineLayer=w(this,Ge):Ge.lineLayer.update(Ge),(Ge.key||Ge.key===0)&&(Ge.viewModel[Ge.key]=Ge.lineLayer);var gt=!Ge.context||X;Ge.lineLayer.render(Ge.viewModel.panels,gt)}}),Ue.attr("transform",function(Ge){return a(Ge.xScale(Ge.xIndex),0)}),Ue.call(v.behavior.drag().origin(function(Ge){return Ge}).on("drag",function(Ge){var gt=Ge.parent;ne.linePickActive(!1),Ge.x=Math.max(-g.overdrag,Math.min(Ge.model.width+g.overdrag,v.event.x)),Ge.canvasX=Ge.x*Ge.model.canvasPixelRatio,Ue.sort(function(mt,Tt){return mt.x-Tt.x}).each(function(mt,Tt){mt.xIndex=Tt,mt.x=Ge===mt?mt.x:mt.xScale(mt.xIndex),mt.canvasX=mt.x*mt.model.canvasPixelRatio}),j(Ue,gt,$),Ue.filter(function(mt){return Math.abs(Ge.xIndex-mt.xIndex)!==0}).attr("transform",function(mt){return a(mt.xScale(mt.xIndex),0)}),v.select(this).attr("transform",a(Ge.x,0)),Ue.each(function(mt,Tt,At){At===Ge.parent.key&&(gt.dimensions[Tt]=mt)}),gt.contextLayer&>.contextLayer.render(gt.panels,!1,!I(gt)),gt.focusLayer.render&>.focusLayer.render(gt.panels)}).on("dragend",function(Ge){var gt=Ge.parent;Ge.x=Ge.xScale(Ge.xIndex),Ge.canvasX=Ge.x*Ge.model.canvasPixelRatio,j(Ue,gt,$),v.select(this).attr("transform",function(mt){return a(mt.x,0)}),gt.contextLayer&>.contextLayer.render(gt.panels,!1,!I(gt)),gt.focusLayer&>.focusLayer.render(gt.panels),gt.pickLayer&>.pickLayer.render(gt.panels,!0),ne.linePickActive(!0),X&&X.axesMoved&&X.axesMoved(gt.key,gt.dimensions.map(function(mt){return mt.crossfilterDimensionIndex}))})),Ue.exit().remove();var qe=Ue.selectAll("."+g.cn.axisOverlays).data(m,c);qe.enter().append("g").classed(g.cn.axisOverlays,!0),qe.selectAll("."+g.cn.axis).remove();var ke=qe.selectAll("."+g.cn.axis).data(m,c);ke.enter().append("g").classed(g.cn.axis,!0),ke.each(function(Ge){var gt=Ge.model.height/Ge.model.tickDistance,mt=Ge.domainScale,Tt=mt.domain();v.select(this).call(v.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(gt,Ge.tickFormat).tickValues(Ge.ordinal?Tt:null).tickFormat(function(At){return p.isOrdinal(Ge)?At:Z(Ge.model.dimensions[Ge.visibleIndex],At)}).scale(mt)),n.font(ke.selectAll("text"),Ge.model.tickFont)}),ke.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ke.selectAll("text").style("cursor","default");var ge=qe.selectAll("."+g.cn.axisHeading).data(m,c);ge.enter().append("g").classed(g.cn.axisHeading,!0);var ue=ge.selectAll("."+g.cn.axisTitle).data(m,c);ue.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",K?"none":"auto"),ue.text(function(Ge){return Ge.label}).each(function(Ge){var gt=v.select(this);n.font(gt,Ge.model.labelFont),r.convertToTspans(gt,ae)}).attr("transform",function(Ge){var gt=P(Ge.model.labelAngle,Ge.model.labelSide),mt=g.axisTitleOffset;return(gt.dir>0?"":a(0,2*mt+Ge.model.height))+t(gt.degrees)+a(-mt*gt.dx,-mt*gt.dy)}).attr("text-anchor",function(Ge){var gt=P(Ge.model.labelAngle,Ge.model.labelSide),mt=Math.abs(gt.dx),Tt=Math.abs(gt.dy);return 2*mt>Tt?gt.dir*gt.dx<0?"start":"end":"middle"});var ve=qe.selectAll("."+g.cn.axisExtent).data(m,c);ve.enter().append("g").classed(g.cn.axisExtent,!0);var se=ve.selectAll("."+g.cn.axisExtentTop).data(m,c);se.enter().append("g").classed(g.cn.axisExtentTop,!0),se.attr("transform",a(0,-g.axisExtentOffset));var Te=se.selectAll("."+g.cn.axisExtentTopText).data(m,c);Te.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(B),Te.text(function(Ge){return Q(Ge,!0)}).each(function(Ge){n.font(v.select(this),Ge.model.rangeFont)});var Fe=ve.selectAll("."+g.cn.axisExtentBottom).data(m,c);Fe.enter().append("g").classed(g.cn.axisExtentBottom,!0),Fe.attr("transform",function(Ge){return a(0,Ge.model.height+g.axisExtentOffset)});var We=Fe.selectAll("."+g.cn.axisExtentBottomText).data(m,c);We.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(B),We.text(function(Ge){return Q(Ge,!1)}).each(function(Ge){n.font(v.select(this),Ge.model.rangeFont)}),i.ensureAxisBrush(qe,ee,ae)}}}),i5=Ee({"src/traces/parcoords/plot.js"(t,V){"use strict";var v=lL(),x=Vy(),E=a5().isVisible,k={};function l(a,r,n){var o=r.indexOf(n),s=a.indexOf(o);return s===-1&&(s+=r.length),s}function e(a,r){return function(o,s){return l(a,r,o)-l(a,r,s)}}var t=V.exports=function(r,n){var o=r._fullLayout,s=x(r,[],k);if(s){var c={},m={},h={},p=o._size;n.forEach(function(M,C){var _=M[0].trace,T=h[C]=_.index;c[C]=r.data[T].dimensions,m[C]=r.data[T].dimensions.slice()});var g=function(M,C,_){var T=m[M][C],f=_.map(function(N){return N.slice()}),u="dimensions["+C+"].constraintrange",A=o._tracePreGUI[r._fullData[h[M]].uid];if(A[u]===void 0){var b=T.constraintrange;A[u]=b||null}var z=r._fullData[h[M]].dimensions[C];f.length?(f.length===1&&(f=f[0]),T.constraintrange=f,z.constraintrange=f.slice(),f=[f]):(delete T.constraintrange,delete z.constraintrange,f=null);var I={};I[u]=f,r.emit("plotly_restyle",[I,[h[M]]])},i=function(M){r.emit("plotly_hover",M)},w=function(M){r.emit("plotly_unhover",M)},S=function(M,C){var _=e(C,m[M].filter(E));c[M].sort(_),m[M].filter(function(T){return!E(T)}).sort(function(T){return m[M].indexOf(T)}).forEach(function(T){c[M].splice(c[M].indexOf(T),1),c[M].splice(m[M].indexOf(T),0,T)}),r.emit("plotly_restyle",[{dimensions:[c[M]]},[h[M]]])};v(r,n,{width:p.w,height:p.h,margin:{t:p.t,r:p.r,b:p.b,l:p.l}},{filterChanged:g,hover:i,unhover:w,axesMoved:S})}};t.reglPrecompiled=k}}),uL=Ee({"src/traces/parcoords/base_plot.js"(J){"use strict";var V=Hn(),v=uf().getModuleCalcData,x=i5(),E=mh();J.name="parcoords",J.plot=function(k){var l=v(k.calcdata,"parcoords")[0];l.length&&x(k,l)},J.clean=function(k,l,e,t){var a=t._has&&t._has("parcoords"),r=l._has&&l._has("parcoords");a&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},J.toSVG=function(k){var l=k._fullLayout._glimages,e=V.select(k).selectAll(".svg-container"),t=e.filter(function(r,n){return n===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var r=this,n=r.toDataURL("image/png"),o=l.append("svg:image");o.attr({xmlns:E.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})}t.each(a),window.setTimeout(function(){V.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),cL=Ee({"src/traces/parcoords/base_index.js"(J,V){"use strict";V.exports={attributes:r5(),supplyDefaults:iL(),calc:oL(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:uL(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),fL=Ee({"src/traces/parcoords/index.js"(J,V){"use strict";var v=cL();v.plot=i5(),V.exports=v}}),hL=Ee({"lib/parcoords.js"(J,V){"use strict";V.exports=fL()}}),o5=Ee({"src/traces/parcats/attributes.js"(J,V){"use strict";var v=vo().extendFlat,x=ia(),E=Xs(),k=$s(),{hovertemplateAttrs:l,templatefallbackAttrs:e}=Cs(),t=kl().attributes,a=v({editType:"calc"},k("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});V.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:v({},x.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:E({editType:"calc"}),tickfont:E({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:a,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),dL=Ee({"src/traces/parcats/defaults.js"(J,V){"use strict";var v=Vr(),x=cf().hasColorscale,E=Cc(),k=kl().defaults,l=Mf(),e=o5(),t=Hy(),a=vs().isTypedArraySpec;function r(o,s,c,m,h){h("line.shape"),h("line.hovertemplate"),h("line.hovertemplatefallback");var p=h("line.color",m.colorway[0]);if(x(o,"line")&&v.isArrayOrTypedArray(p)){if(p.length)return h("line.colorscale"),E(o,s,m,h,{prefix:"line.",cLetter:"c"}),p.length;s.line.color=c}return 1/0}function n(o,s){function c(S,M){return v.coerce(o,s,e.dimensions,S,M)}var m=c("values"),h=c("visible");if(m&&m.length||(h=s.visible=!1),h){c("label"),c("displayindex",s._index);var p=o.categoryarray,g=v.isArrayOrTypedArray(p)&&p.length>0||a(p),i;g&&(i="array");var w=c("categoryorder",i);w==="array"?(c("categoryarray"),c("ticktext")):(delete o.categoryarray,delete o.ticktext),!g&&w==="array"&&(s.categoryorder="trace")}}V.exports=function(s,c,m,h){function p(S,M){return v.coerce(s,c,e,S,M)}var g=l(s,c,{name:"dimensions",handleItemDefaults:n}),i=r(s,c,m,h,p);k(c,h,p),(!Array.isArray(g)||!g.length)&&(c.visible=!1),t(c,g,"values",i),p("hoveron"),p("hovertemplate"),p("hovertemplatefallback"),p("arrangement"),p("bundlecolors"),p("sortpaths"),p("counts");var w=h.font;v.coerceFont(p,"labelfont",w,{overrideDflt:{size:Math.round(w.size)}}),v.coerceFont(p,"tickfont",w,{autoShadowDflt:!0,overrideDflt:{size:Math.round(w.size/1.2)}})}}}),vL=Ee({"src/traces/parcats/calc.js"(J,V){"use strict";var v=Qh().wrap,x=cf().hasColorscale,E=Sf(),k=_b(),l=yo(),e=Vr(),t=mi();V.exports=function(w,S){var M=e.filterVisible(S.dimensions);if(M.length===0)return[];var C=M.map(function(H){var X;if(H.categoryorder==="trace")X=null;else if(H.categoryorder==="array")X=H.categoryarray;else{X=k(H.values);for(var K=!0,G=0;G=i.length||w[i[S]]!==void 0)return!1;w[i[S]]=!0}return!0}}}),pL=Ee({"src/traces/parcats/parcats.js"(J,V){"use strict";var v=Hn(),x=(Zv(),ra(iv)).interpolateNumber,E=Hg(),k=Qa(),l=$l(),e=Vr(),t=e.strTranslate,a=yo(),r=Fs();function n(Y,q,$,ee){var ne=q._context.staticPlot,fe=Y.map(oe.bind(0,q,$)),ye=ee.selectAll("g.parcatslayer").data([null]);ye.enter().append("g").attr("class","parcatslayer").style("pointer-events",ne?"none":"all");var xe=ye.selectAll("g.trace.parcats").data(fe,o),Ae=xe.enter().append("g").attr("class","trace parcats");xe.attr("transform",function(Te){return t(Te.x,Te.y)}),Ae.append("g").attr("class","paths");var Me=xe.select("g.paths"),Ie=Me.selectAll("path.path").data(function(Te){return Te.paths},o);Ie.attr("fill",function(Te){return Te.model.color});var Ue=Ie.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Te){return Te.model.color}).attr("fill-opacity",0);S(Ue),Ie.attr("d",function(Te){return Te.svgD}),Ue.empty()||Ie.sort(c),Ie.exit().remove(),Ie.on("mouseover",h).on("mouseout",p).on("click",w),Ae.append("g").attr("class","dimensions");var qe=xe.select("g.dimensions"),ke=qe.selectAll("g.dimension").data(function(Te){return Te.dimensions},o);ke.enter().append("g").attr("class","dimension"),ke.attr("transform",function(Te){return t(Te.x,0)}),ke.exit().remove();var ge=ke.selectAll("g.category").data(function(Te){return Te.categories},o),ue=ge.enter().append("g").attr("class","category");ge.attr("transform",function(Te){return t(0,Te.y)}),ue.append("rect").attr("class","catrect").attr("pointer-events","none"),ge.select("rect.catrect").attr("fill","none").attr("width",function(Te){return Te.width}).attr("height",function(Te){return Te.height}),_(ue);var ve=ge.selectAll("rect.bandrect").data(function(Te){return Te.bands},o);ve.each(function(){e.raiseToTop(this)}),ve.attr("fill",function(Te){return Te.color});var se=ve.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Te){return Te.color}).attr("fill-opacity",0);ve.attr("fill",function(Te){return Te.color}).attr("width",function(Te){return Te.width}).attr("height",function(Te){return Te.height}).attr("y",function(Te){return Te.y}).attr("cursor",function(Te){return Te.parcatsViewModel.arrangement==="fixed"?"default":Te.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),f(se),ve.exit().remove(),ue.append("text").attr("class","catlabel").attr("pointer-events","none"),ge.select("text.catlabel").attr("text-anchor",function(Te){return s(Te)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Te){return s(Te)?Te.width+5:-5}).attr("y",function(Te){return Te.height/2}).text(function(Te){return Te.model.categoryLabel}).each(function(Te){a.font(v.select(this),Te.parcatsViewModel.categorylabelfont),r.convertToTspans(v.select(this),q)}),ue.append("text").attr("class","dimlabel"),ge.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Te){return Te.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Te){return Te.width/2}).attr("y",-5).text(function(Te,Fe){return Fe===0?Te.parcatsViewModel.model.dimensions[Te.model.dimensionInd].dimensionLabel:null}).each(function(Te){a.font(v.select(this),Te.parcatsViewModel.labelfont)}),ge.selectAll("rect.bandrect").on("mouseover",F).on("mouseout",P),ge.exit().remove(),ke.call(v.behavior.drag().origin(function(Te){return{x:Te.x,y:0}}).on("dragstart",j).on("drag",U).on("dragend",Z)),xe.each(function(Te){Te.traceSelection=v.select(this),Te.pathSelection=v.select(this).selectAll("g.paths").selectAll("path.path"),Te.dimensionSelection=v.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),xe.exit().remove()}V.exports=function(Y,q,$,ee){n($,Y,ee,q)};function o(Y){return Y.key}function s(Y){var q=Y.parcatsViewModel.dimensions.length,$=Y.parcatsViewModel.dimensions[q-1].model.dimensionInd;return Y.model.dimensionInd===$}function c(Y,q){return Y.model.rawColor>q.model.rawColor?1:Y.model.rawColorne)return 1;if(ee!==ne){var fe=isNaN(ee),ye=isNaN(ne);if(fe!==ye)return fe?1:-1}}return Y.length-q.length}function h(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),M(v.select(this));var q=g(Y),$=i(Y);if(Y.parcatsViewModel.graphDiv.emit("plotly_hover",{points:q,event:v.event,constraints:$}),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ee=v.mouse(this)[0],ne=Y.parcatsViewModel.graphDiv,fe=Y.parcatsViewModel.trace,ye=ne._fullLayout,xe=ye._paperdiv.node().getBoundingClientRect(),Ae=Y.parcatsViewModel.graphDiv.getBoundingClientRect(),Me,Ie,Ue;for(Ue=0;Ue"),gt=v.mouse(ne)[0];l.loneHover({trace:fe,x:ge-xe.left+Ae.left,y:ue-xe.top+Ae.top,text:Ge,color:Y.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ve,idealAlign:gtk.mostReadable(q.model.color)).attr("stroke-width",.3)}function C(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function _(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function T(Y){Y.attr("stroke","black").attr("stroke-width",1.5)}function f(Y){Y.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function u(Y){var q=Y.parcatsViewModel.pathSelection,$=Y.categoryViewModel.model.dimensionInd,ee=Y.categoryViewModel.model.categoryInd;return q.filter(function(ne){return ne.model.categoryInds[$]===ee&&ne.model.color===Y.color})}function A(Y){var q=v.select(Y.parentNode).selectAll("rect.bandrect");q.each(function($){var ee=u($);M(ee),ee.each(function(){e.raiseToTop(this)})}),C(v.select(Y.parentNode))}function b(Y){var q=v.select(Y).datum(),$=u(q);M($),$.each(function(){e.raiseToTop(this)}),v.select(Y.parentNode).selectAll("rect.bandrect").filter(function(ee){return ee.color===q.color}).each(function(){e.raiseToTop(this),T(v.select(this))})}function z(Y,q,$){var ee=v.select(Y).datum(),ne=ee.categoryViewModel.model,fe=ee.parcatsViewModel.graphDiv,ye=v.select(Y.parentNode).selectAll("rect.bandrect"),xe=[];ye.each(function(Me){var Ie=u(Me);Ie.each(function(Ue){Array.prototype.push.apply(xe,g(Ue))})});var Ae={};Ae[ne.dimensionInd]=ne.categoryValue,fe.emit(q,{points:xe,event:$,constraints:Ae})}function I(Y,q,$){var ee=v.select(Y).datum(),ne=ee.categoryViewModel.model,fe=ee.parcatsViewModel.graphDiv,ye=u(ee),xe=[];ye.each(function(Me){Array.prototype.push.apply(xe,g(Me))});var Ae={};Ae[ne.dimensionInd]=ne.categoryValue,ee.rawColor!==void 0&&(Ae.color=ee.rawColor),fe.emit(q,{points:xe,event:$,constraints:Ae})}function N(Y,q,$){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ne=Y._fullLayout._invScaleY,fe=v.select($.parentNode).select("rect.catrect"),ye=fe.node().getBoundingClientRect(),xe=fe.datum(),Ae=xe.parcatsViewModel,Me=Ae.model.dimensions[xe.model.dimensionInd],Ie=Ae.trace,Ue=ye.top+ye.height/2,qe,ke;Ae.dimensions.length>1&&Me.displayInd===Ae.dimensions.length-1?(qe=ye.left,ke="left"):(qe=ye.left+ye.width,ke="right");var ge=xe.model.count,ue=xe.model.categoryLabel,ve=ge/xe.parcatsViewModel.model.count,se={countLabel:ge,categoryLabel:ue,probabilityLabel:ve.toFixed(3)},Te=[];xe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Te.push(["Count:",se.countLabel].join(" ")),xe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Te.push(["P("+se.categoryLabel+"):",se.probabilityLabel].join(" "));var Fe=Te.join("
");return{trace:Ie,x:ee*(qe-q.left),y:ne*(Ue-q.top),text:Fe,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:se,eventData:[{data:Ie._input,fullData:Ie,count:ge,category:ue,probability:ve}]}}function R(Y,q,$){var ee=[];return v.select($.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ne=this;ee.push(N(Y,q,ne))}),ee}function B(Y,q,$){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ne=Y._fullLayout._invScaleY,fe=$.getBoundingClientRect(),ye=v.select($).datum(),xe=ye.categoryViewModel,Ae=xe.parcatsViewModel,Me=Ae.model.dimensions[xe.model.dimensionInd],Ie=Ae.trace,Ue=fe.y+fe.height/2,qe,ke;Ae.dimensions.length>1&&Me.displayInd===Ae.dimensions.length-1?(qe=fe.left,ke="left"):(qe=fe.left+fe.width,ke="right");var ge=xe.model.categoryLabel,ue=ye.parcatsViewModel.model.count,ve=0;ye.categoryViewModel.bands.forEach(function(Kt){Kt.color===ye.color&&(ve+=Kt.count)});var se=xe.model.count,Te=0;Ae.pathSelection.each(function(Kt){Kt.model.color===ye.color&&(Te+=Kt.model.count)});var Fe=ve/ue,We=ve/Te,Ge=ve/se,gt={countLabel:ve,categoryLabel:ge,probabilityLabel:Fe.toFixed(3)},mt=[];xe.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&mt.push(["Count:",gt.countLabel].join(" ")),xe.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(mt.push("P(color \u2229 "+ge+"): "+gt.probabilityLabel),mt.push("P("+ge+" | color): "+We.toFixed(3)),mt.push("P(color | "+ge+"): "+Ge.toFixed(3)));var Tt=mt.join("
"),At=k.mostReadable(ye.color);return{trace:Ie,x:ee*(qe-q.left),y:ne*(Ue-q.top),text:Tt,color:ye.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:At,fontSize:10,idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:gt,eventData:[{data:Ie._input,fullData:Ie,category:ge,count:ue,probability:Fe,categorycount:se,colorcount:Te,bandcolorcount:ve}]}}function F(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var q=v.mouse(this)[1];if(q<-1)return;var $=Y.parcatsViewModel.graphDiv,ee=$._fullLayout,ne=ee._paperdiv.node().getBoundingClientRect(),fe=Y.parcatsViewModel.hoveron,ye=this;if(fe==="color"?(b(ye),I(ye,"plotly_hover",v.event)):(A(ye),z(ye,"plotly_hover",v.event)),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var xe;fe==="category"?xe=N($,ne,ye):fe==="color"?xe=B($,ne,ye):fe==="dimension"&&(xe=R($,ne,ye)),xe&&l.loneHover(xe,{container:ee._hoverlayer.node(),outerContainer:ee._paper.node(),gd:$})}}}function P(Y){var q=Y.parcatsViewModel;if(!q.dragDimension&&(S(q.pathSelection),_(q.dimensionSelection.selectAll("g.category")),f(q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),l.loneUnhover(q.graphDiv._fullLayout._hoverlayer.node()),q.pathSelection.sort(c),q.hoverinfoItems.indexOf("skip")===-1)){var $=Y.parcatsViewModel.hoveron,ee=this;$==="color"?I(ee,"plotly_unhover",v.event):z(ee,"plotly_unhover",v.event)}}function j(Y){Y.parcatsViewModel.arrangement!=="fixed"&&(Y.dragDimensionDisplayInd=Y.model.displayInd,Y.initialDragDimensionDisplayInds=Y.parcatsViewModel.model.dimensions.map(function(q){return q.displayInd}),Y.dragHasMoved=!1,Y.dragCategoryDisplayInd=null,v.select(this).selectAll("g.category").select("rect.catrect").each(function(q){var $=v.mouse(this)[0],ee=v.mouse(this)[1];-2<=$&&$<=q.width+2&&-2<=ee&&ee<=q.height+2&&(Y.dragCategoryDisplayInd=q.model.displayInd,Y.initialDragCategoryDisplayInds=Y.model.categories.map(function(ne){return ne.displayInd}),q.model.dragY=q.y,e.raiseToTop(this.parentNode),v.select(this.parentNode).selectAll("rect.bandrect").each(function(ne){ne.yIe.y+Ie.height/2&&(fe.model.displayInd=Ie.model.displayInd,Ie.model.displayInd=xe),Y.dragCategoryDisplayInd=fe.model.displayInd}if(Y.dragCategoryDisplayInd===null||Y.parcatsViewModel.arrangement==="freeform"){ne.model.dragX=v.event.x;var Ue=Y.parcatsViewModel.dimensions[$],qe=Y.parcatsViewModel.dimensions[ee];Ue!==void 0&&ne.model.dragXqe.x&&(ne.model.displayInd=qe.model.displayInd,qe.model.displayInd=Y.dragDimensionDisplayInd),Y.dragDimensionDisplayInd=ne.model.displayInd}K(Y.parcatsViewModel),X(Y.parcatsViewModel),ae(Y.parcatsViewModel),re(Y.parcatsViewModel)}}function Z(Y){if(Y.parcatsViewModel.arrangement!=="fixed"&&Y.dragDimensionDisplayInd!==null){v.select(this).selectAll("text").attr("font-weight","normal");var q={},$=Q(Y.parcatsViewModel),ee=Y.parcatsViewModel.model.dimensions.map(function(qe){return qe.displayInd}),ne=Y.initialDragDimensionDisplayInds.some(function(qe,ke){return qe!==ee[ke]});ne&&ee.forEach(function(qe,ke){var ge=Y.parcatsViewModel.model.dimensions[ke].containerInd;q["dimensions["+ge+"].displayindex"]=qe});var fe=!1;if(Y.dragCategoryDisplayInd!==null){var ye=Y.model.categories.map(function(qe){return qe.displayInd});if(fe=Y.initialDragCategoryDisplayInds.some(function(qe,ke){return qe!==ye[ke]}),fe){var xe=Y.model.categories.slice().sort(function(qe,ke){return qe.displayInd-ke.displayInd}),Ae=xe.map(function(qe){return qe.categoryValue}),Me=xe.map(function(qe){return qe.categoryLabel});q["dimensions["+Y.model.containerInd+"].categoryarray"]=[Ae],q["dimensions["+Y.model.containerInd+"].ticktext"]=[Me],q["dimensions["+Y.model.containerInd+"].categoryorder"]="array"}}if(Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!Y.dragHasMoved&&Y.potentialClickBand&&(Y.parcatsViewModel.hoveron==="color"?I(Y.potentialClickBand,"plotly_click",v.event.sourceEvent):z(Y.potentialClickBand,"plotly_click",v.event.sourceEvent)),Y.model.dragX=null,Y.dragCategoryDisplayInd!==null){var Ie=Y.parcatsViewModel.dimensions[Y.dragDimensionDisplayInd].categories[Y.dragCategoryDisplayInd];Ie.model.dragY=null,Y.dragCategoryDisplayInd=null}Y.dragDimensionDisplayInd=null,Y.parcatsViewModel.dragDimension=null,Y.dragHasMoved=null,Y.potentialClickBand=null,K(Y.parcatsViewModel),X(Y.parcatsViewModel);var Ue=v.transition().duration(300).ease("cubic-in-out");Ue.each(function(){ae(Y.parcatsViewModel,!0),re(Y.parcatsViewModel,!0)}).each("end",function(){(ne||fe)&&E.restyle(Y.parcatsViewModel.graphDiv,q,[$])})}}function Q(Y){for(var q,$=Y.graphDiv._fullData,ee=0;ee<$.length;ee++)if(Y.key===$[ee].uid){q=ee;break}return q}function re(Y,q){q===void 0&&(q=!1);function $(ee){return q?ee.transition():ee}Y.pathSelection.data(function(ee){return ee.paths},o),$(Y.pathSelection).attr("d",function(ee){return ee.svgD})}function ae(Y,q){q===void 0&&(q=!1);function $(Ae){return q?Ae.transition():Ae}Y.dimensionSelection.data(function(Ae){return Ae.dimensions},o);var ee=Y.dimensionSelection.selectAll("g.category").data(function(Ae){return Ae.categories},o);$(Y.dimensionSelection).attr("transform",function(Ae){return t(Ae.x,0)}),$(ee).attr("transform",function(Ae){return t(0,Ae.y)});var ne=ee.select(".dimlabel");ne.text(function(Ae,Me){return Me===0?Ae.parcatsViewModel.model.dimensions[Ae.model.dimensionInd].dimensionLabel:null});var fe=ee.select(".catlabel");fe.attr("text-anchor",function(Ae){return s(Ae)?"start":"end"}).attr("x",function(Ae){return s(Ae)?Ae.width+5:-5}).each(function(Ae){var Me,Ie;s(Ae)?(Me=Ae.width+5,Ie="start"):(Me=-5,Ie="end"),v.select(this).selectAll("tspan").attr("x",Me).attr("text-anchor",Ie)});var ye=ee.selectAll("rect.bandrect").data(function(Ae){return Ae.bands},o),xe=ye.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.color}).attr("fill-opacity",0);ye.attr("fill",function(Ae){return Ae.color}).attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}).attr("y",function(Ae){return Ae.y}),f(xe),ye.each(function(){e.raiseToTop(this)}),ye.exit().remove()}function oe(Y,q,$){var ee=$[0],ne=q.margin||{l:80,r:80,t:100,b:80},fe=ee.trace,ye=fe.domain,xe=q.width,Ae=q.height,Me=Math.floor(xe*(ye.x[1]-ye.x[0])),Ie=Math.floor(Ae*(ye.y[1]-ye.y[0])),Ue=ye.x[0]*xe+ne.l,qe=q.height-ye.y[1]*q.height+ne.t,ke=fe.line.shape,ge;fe.hoverinfo==="all"?ge=["count","probability"]:ge=(fe.hoverinfo||"").split("+");var ue={trace:fe,key:fe.uid,model:ee,x:Ue,y:qe,width:Me,height:Ie,hoveron:fe.hoveron,hoverinfoItems:ge,arrangement:fe.arrangement,bundlecolors:fe.bundlecolors,sortpaths:fe.sortpaths,labelfont:fe.labelfont,categorylabelfont:fe.tickfont,pathShape:ke,dragDimension:null,margin:ne,paths:[],dimensions:[],graphDiv:Y,traceSelection:null,pathSelection:null,dimensionSelection:null};return ee.dimensions&&(K(ue),X(ue)),ue}function H(Y,q,$,ee,ne){var fe=[],ye=[],xe,Ae;for(Ae=0;Ae<$.length-1;Ae++)xe=x($[Ae]+Y[Ae],Y[Ae+1]),fe.push(xe(ne)),ye.push(xe(1-ne));var Me="M "+Y[0]+","+q[0];for(Me+="l"+$[0]+",0 ",Ae=1;Ae<$.length;Ae++)Me+="C"+fe[Ae-1]+","+q[Ae-1]+" "+ye[Ae-1]+","+q[Ae]+" "+Y[Ae]+","+q[Ae],Me+="l"+$[Ae]+",0 ";for(Me+="l0,"+ee+" ",Me+="l -"+$[$.length-1]+",0 ",Ae=$.length-2;Ae>=0;Ae--)Me+="C"+ye[Ae]+","+(q[Ae+1]+ee)+" "+fe[Ae]+","+(q[Ae]+ee)+" "+(Y[Ae]+$[Ae])+","+(q[Ae]+ee),Me+="l-"+$[Ae]+",0 ";return Me+="Z",Me}function X(Y){var q=Y.dimensions,$=Y.model,ee=q.map(function(Zt){return Zt.categories.map(function(sr){return sr.y})}),ne=Y.model.dimensions.map(function(Zt){return Zt.categories.map(function(sr){return sr.displayInd})}),fe=Y.model.dimensions.map(function(Zt){return Zt.displayInd}),ye=Y.dimensions.map(function(Zt){return Zt.model.dimensionInd}),xe=q.map(function(Zt){return Zt.x}),Ae=q.map(function(Zt){return Zt.width}),Me=[];for(var Ie in $.paths)$.paths.hasOwnProperty(Ie)&&Me.push($.paths[Ie]);function Ue(Zt){var sr=Zt.categoryInds.map(function(vt,ht){return ne[ht][vt]}),Ot=ye.map(function(vt){return sr[vt]});return Ot}Me.sort(function(Zt,sr){var Ot=Ue(Zt),vt=Ue(sr);return Y.sortpaths==="backward"&&(Ot.reverse(),vt.reverse()),Ot.push(Zt.valueInds[0]),vt.push(sr.valueInds[0]),Y.bundlecolors&&(Ot.unshift(Zt.rawColor),vt.unshift(sr.rawColor)),m(Ot,vt)});for(var qe=new Array(Me.length),ke=q[0].model.count,ge=q[0].categories.map(function(Zt){return Zt.height}).reduce(function(Zt,sr){return Zt+sr}),ue=0;ue0?se=ge*(ve.count/ke):se=0;for(var Te=new Array(ee.length),Fe=0;Fe1?ye=(Y.width-2*$-ee)/(ne-1):ye=0,xe=$,Ae=xe+ye*fe;var Me=[],Ie=Y.model.maxCats,Ue=q.categories.length,qe=8,ke=q.count,ge=Y.height-qe*(Ie-1),ue,ve,se,Te,Fe,We=(Ie-Ue)*qe/2,Ge=q.categories.map(function(gt){return{displayInd:gt.displayInd,categoryInd:gt.categoryInd}});for(Ge.sort(function(gt,mt){return gt.displayInd-mt.displayInd}),Fe=0;Fe0?ue=ve.count/ke*ge:ue=0,se={key:ve.valueInds[0],model:ve,width:ee,height:ue,y:ve.dragY!==null?ve.dragY:We,bands:[],parcatsViewModel:Y},We=We+ue+qe,Me.push(se);return{key:q.dimensionInd,x:q.dragX!==null?q.dragX:Ae,y:0,width:ee,model:q,categories:Me,parcatsViewModel:Y,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),s5=Ee({"src/traces/parcats/plot.js"(J,V){"use strict";var v=pL();V.exports=function(E,k,l,e){var t=E._fullLayout,a=t._paper,r=t._size;v(E,a,k,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},l,e)}}}),mL=Ee({"src/traces/parcats/base_plot.js"(J){"use strict";var V=uf().getModuleCalcData,v=s5(),x="parcats";J.name=x,J.plot=function(E,k,l,e){var t=V(E.calcdata,x);if(t.length){var a=t[0];v(E,a,l,e)}},J.clean=function(E,k,l,e){var t=e._has&&e._has("parcats"),a=k._has&&k._has("parcats");t&&!a&&e._paperdiv.selectAll(".parcats").remove()}}}),gL=Ee({"src/traces/parcats/index.js"(J,V){"use strict";V.exports={attributes:o5(),supplyDefaults:dL(),calc:vL(),plot:s5(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:mL(),categories:["noOpacity"],meta:{}}}}),yL=Ee({"lib/parcats.js"(J,V){"use strict";V.exports=gL()}}),_L=Ee({"src/plots/map/styles/arcgis-sat-hybrid.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} @@ -2707,10 +2705,10 @@ void main() { {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),wL=xe({"src/plots/map/styles/arcgis-sat.js"(U,O){"use strict";O.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),Qd=xe({"src/plots/map/constants.js"(U,O){"use strict";var u=(vv(),Ta(Id)).default,v=xL(),w=wL(),S='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",i={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:w,"satellite-streets":v,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":a,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":n},s=u(i);O.exports={styleValueDflt:"basic",stylesMap:i,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),lm=xe({"src/plots/map/layout_attributes.js"(U,O){"use strict";var u=Sr(),v=wi().defaultLine,w=Gl().attributes,S=vl(),l=wu().textposition,e=Hl().overrideAll,t=Cs().templatedArray,a=Qd(),r=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var n=O.exports=e({_arrayAttrRegexps:[u.counterRegex("map",".layers",!0)],domain:w({name:"map"}),style:{valType:"any",values:a.styleValuesMap,dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:v},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:v}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:r,textposition:u.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),Q1=xe({"src/traces/scattermap/attributes.js"(U,O){"use strict";var{hovertemplateAttrs:u,texttemplateAttrs:v,templatefallbackAttrs:w}=js(),S=qh(),l=Ip(),e=wu(),t=lm(),a=Rs(),r=pl(),n=oo().extendFlat,i=Hl().overrideAll,s=lm(),c=l.line,p=l.marker;O.exports=i({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:n({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:n({},p.opacity,{dflt:1})},mode:n({},e.mode,{dflt:"markers"}),text:n({},e.text,{}),texttemplate:v({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:w({editType:"plot"}),hovertext:n({},e.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:e.connectgaps,marker:n({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:p.opacity,size:p.size,sizeref:p.sizeref,sizemin:p.sizemin,sizemode:p.sizemode},r("marker")),fill:l.fill,fillcolor:S(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:n({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:u(),hovertemplatefallback:w()},"calc","nested")}}),Y3=xe({"src/traces/scattermap/constants.js"(U,O){"use strict";var u=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];O.exports={isSupportedFont:function(v){return u.indexOf(v)!==-1}}}}),TL=xe({"src/traces/scattermap/defaults.js"(U,O){"use strict";var u=Sr(),v=Cl(),w=hh(),S=Eh(),l=kh(),e=Vh(),t=Q1(),a=Y3().isSupportedFont;O.exports=function(i,s,c,p){function f(x,_){return u.coerce(i,s,t,x,_)}function d(x,_){return u.coerce2(i,s,t,x,_)}var y=r(i,s,f);if(!y){s.visible=!1;return}if(f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),f("below"),v.hasMarkers(s)){w(i,s,c,p,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var o=s.marker;o.symbol!=="circle"&&(u.isArrayOrTypedArray(o.size)&&(o.size=o.size[0]),u.isArrayOrTypedArray(o.color)&&(o.color=o.color[0]))}v.hasLines(s)&&(S(i,s,c,p,f,{noDash:!0}),f("connectgaps"));var b=d("cluster.maxzoom"),M=d("cluster.step"),A=d("cluster.color",s.marker&&s.marker.color||c),E=d("cluster.size"),g=d("cluster.opacity"),T=b!==!1||M!==!1||A!==!1||E!==!1||g!==!1,m=f("cluster.enabled",T);if(m||v.hasText(s)){var h=p.font.family;l(i,s,p,f,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:p.font.weight,style:p.font.style,size:p.font.size,color:p.font.color}})}f("fill"),s.fill!=="none"&&e(i,s,c,f),u.coerceSelectionMarkerOpacity(s,f)};function r(n,i,s){var c=s("lon")||[],p=s("lat")||[],f=Math.min(c.length,p.length);return i._length=f,f}}}),X3=xe({"src/traces/scattermap/format_labels.js"(U,O){"use strict";var u=uo();O.exports=function(w,S,l){var e={},t=l[S.subplot]._subplot,a=t.mockAxis,r=w.lonlat;return e.lonLabel=u.tickText(a,a.c2l(r[0]),!0).text,e.latLabel=u.tickText(a,a.c2l(r[1]),!0).text,e}}}),$3=xe({"src/plots/map/convert_text_opts.js"(U,O){"use strict";var u=Sr();O.exports=function(w,S){var l=w.split(" "),e=l[0],t=l[1],a=u.isArrayOrTypedArray(S)?u.mean(S):S,r=.5+a/100,n=1.5+a/100,i=["",""],s=[0,0];switch(e){case"top":i[0]="top",s[1]=-n;break;case"bottom":i[0]="bottom",s[1]=n;break}switch(t){case"left":i[1]="right",s[0]=-r;break;case"right":i[1]="left",s[0]=r;break}var c;return i[0]&&i[1]?c=i.join("-"):i[0]?c=i[0]:i[1]?c=i[1]:c="center",{anchor:c,offset:s}}}}),AL=xe({"src/traces/scattermap/convert.js"(U,O){"use strict";var u=yn(),v=Sr(),w=Gn().BADNUM,S=J0(),l=Bl(),e=go(),t=n0(),a=Cl(),r=Y3().isSupportedFont,n=$3(),i=Kf().appendArrayPointValue,s=el().NEWLINES,c=el().BR_TAG_ALL;O.exports=function(g,T){var m=T[0].trace,h=m.visible===!0&&m._length!==0,x=m.fill!=="none",_=a.hasLines(m),D=a.hasMarkers(m),C=a.hasText(m),F=D&&m.marker.symbol==="circle",I=D&&m.marker.symbol!=="circle",z=m.cluster&&m.cluster.enabled,R=p("fill"),k=p("line"),B=p("circle"),N=p("symbol"),q={fill:R,line:k,circle:B,symbol:N};if(!h)return q;var Y;if((x||_)&&(Y=S.calcTraceToLineCoords(T)),x&&(R.geojson=S.makePolygon(Y),R.layout.visibility="visible",v.extendFlat(R.paint,{"fill-color":m.fillcolor})),_&&(k.geojson=S.makeLine(Y),k.layout.visibility="visible",v.extendFlat(k.paint,{"line-width":m.line.width,"line-color":m.line.color,"line-opacity":m.opacity})),F){var ee=f(T);B.geojson=ee.geojson,B.layout.visibility="visible",z&&(B.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":M(m.cluster.color,m.cluster.step),"circle-radius":M(m.cluster.size,m.cluster.step),"circle-opacity":M(m.cluster.opacity,m.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":A(m),"text-size":12}}),v.extendFlat(B.paint,{"circle-color":ee.mcc,"circle-radius":ee.mrc,"circle-opacity":ee.mo})}if(F&&z&&(B.filter=["!",["has","point_count"]]),(I||C)&&(N.geojson=d(T,g),v.extendFlat(N.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),I&&(v.extendFlat(N.layout,{"icon-size":m.marker.size/10}),"angle"in m.marker&&m.marker.angle!=="auto"&&v.extendFlat(N.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),N.layout["icon-allow-overlap"]=m.marker.allowoverlap,v.extendFlat(N.paint,{"icon-opacity":m.opacity*m.marker.opacity,"icon-color":m.marker.color,"icon-halo-color":m.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),C)){var te=(m.marker||{}).size,ae=n(m.textposition,te);v.extendFlat(N.layout,{"text-size":m.textfont.size,"text-anchor":ae.anchor,"text-offset":ae.offset,"text-font":A(m)}),v.extendFlat(N.paint,{"text-color":m.textfont.color,"text-opacity":m.opacity})}return q};function p(E){return{type:E,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function f(E){var g=E[0].trace,T=g.marker,m=g.selectedpoints,h=v.isArrayOrTypedArray(T.color),x=v.isArrayOrTypedArray(T.size),_=v.isArrayOrTypedArray(T.opacity),D;function C(te){return g.opacity*te}function F(te){return te/2}var I;h&&(l.hasColorscale(g,"marker")?I=l.makeColorScaleFuncFromTrace(T):I=v.identity);var z;x&&(z=t(g));var R;_&&(R=function(te){var ae=u(te)?+v.constrain(te,0,1):0;return C(ae)});var k=[];for(D=0;D850?D+=" Black":h>750?D+=" Extra Bold":h>650?D+=" Bold":h>550?D+=" Semi Bold":h>450?D+=" Medium":h>350?D+=" Regular":h>250?D+=" Light":h>150?D+=" Extra Light":D+=" Thin"):x.slice(0,2).join(" ")==="Open Sans"?(D="Open Sans",h>750?D+=" Extrabold":h>650?D+=" Bold":h>550?D+=" Semibold":h>350?D+=" Regular":D+=" Light"):x.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(D="Klokantech Noto Sans",x[3]==="CJK"&&(D+=" CJK"),D+=h>500?" Bold":" Regular")),_&&(D+=" Italic"),D==="Open Sans Regular Italic"?D="Open Sans Italic":D==="Open Sans Regular Bold"?D="Open Sans Bold":D==="Open Sans Regular Bold Italic"?D="Open Sans Bold Italic":D==="Klokantech Noto Sans Regular Italic"&&(D="Klokantech Noto Sans Italic"),r(D)||(D=T);var C=D.split(", ");return C}}}),ML=xe({"src/traces/scattermap/plot.js"(U,O){"use strict";var u=Sr(),v=AL(),w=Qd().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,a,r,n){this.type="scattermap",this.subplot=t,this.uid=a,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:w+a+"-fill",line:w+a+"-line",circle:w+a+"-circle",symbol:w+a+"-symbol",cluster:w+a+"-cluster",clusterCount:w+a+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,a,r){var n={type:"geojson",data:a.geojson};r&&r.enabled&&u.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[t]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[t],n)},e.setSourceData=function(t,a){this.subplot.map.getSource(this.sourceIds[t]).setData(a.geojson)},e.addLayer=function(t,a,r){var n={type:a.type,id:this.layerIds[t],source:this.sourceIds[t],layout:a.layout,paint:a.paint};a.filter&&(n.filter=a.filter);for(var i=this.layerIds[t],s,c=this.subplot.getMapLayers(),p=0;p=0;_--){var D=x[_];i.removeLayer(d.layerIds[D])}h||i.removeSource(d.sourceIds.circle)}function b(h){for(var x=S.nonCluster,_=0;_=0;_--){var D=x[_];i.removeLayer(d.layerIds[D]),h||i.removeSource(d.sourceIds[D])}}function A(h){f?o(h):M(h)}function E(h){p?y(h):b(h)}function g(){for(var h=p?S.cluster:S.nonCluster,x=0;x=0;n--){var i=r[n];a.removeLayer(this.layerIds[i]),a.removeSource(this.sourceIds[i])}},O.exports=function(a,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,s=n.visible!==!0,c=new l(a,n.uid,i,s),p=v(a.gd,r),f=c.below=a.belowLookup["trace-"+n.uid],d,y,o;if(i)for(c.addSource("circle",p.circle,n.cluster),d=0;d=0?Math.floor((n+180)/360):Math.ceil((n-180)/360),E=A*360,g=n-E;function T(z){var R=z.lonlat;if(R[0]===l||b&&y.indexOf(z.i+1)===-1)return 1/0;var k=v.modHalf(R[0],360),B=R[1],N=d.project([k,B]),q=N.x-p.c2p([g,B]),Y=N.y-f.c2p([k,i]),ee=Math.max(3,z.mrc||0);return Math.max(Math.sqrt(q*q+Y*Y)-ee,1-3/ee)}if(u.getClosest(s,T,r),r.index!==!1){var m=s[r.index],h=m.lonlat,x=[v.modHalf(h[0],360)+E,h[1]],_=p.c2p(x),D=f.c2p(x),C=m.mrc||1;r.x0=_-C,r.x1=_+C,r.y0=D-C,r.y1=D+C;var F={};F[c.subplot]={_subplot:d};var I=c._module.formatLabels(m,c,F);return r.lonLabel=I.lonLabel,r.latLabel=I.latLabel,r.color=w(c,m),r.extraText=a(c,m,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function a(r,n,i){if(r.hovertemplate)return;var s=n.hi||r.hoverinfo,c=s.split("+"),p=c.indexOf("all")!==-1,f=c.indexOf("lon")!==-1,d=c.indexOf("lat")!==-1,y=n.lonlat,o=[];function b(M){return M+"\xB0"}return p||f&&d?o.push("("+b(y[1])+", "+b(y[0])+")"):f?o.push(i.lon+b(y[0])):d&&o.push(i.lat+b(y[1])),(p||c.indexOf("text")!==-1)&&S(n,r,o),o.join("
")}O.exports={hoverPoints:t,getExtraText:a}}}),SL=xe({"src/traces/scattermap/event_data.js"(U,O){"use strict";O.exports=function(v,w){return v.lon=w.lon,v.lat=w.lat,v}}}),EL=xe({"src/traces/scattermap/select.js"(U,O){"use strict";var u=Sr(),v=Cl(),w=Gn().BADNUM;O.exports=function(l,e){var t=l.cd,a=l.xaxis,r=l.yaxis,n=[],i=t[0].trace,s;if(!v.hasMarkers(i))return[];if(e===!1)for(s=0;s1)return 1;for(var W=V,oe=0;oe<8;oe++){var me=this.sampleCurveX(W)-V;if(Math.abs(me)me?Pe=W:Ge=W,W=.5*(Ge-Pe)+Pe;return W},solve:function(V,P){return this.sampleCurveY(this.solveCurveX(V,P))}};var c=t(i);let p,f;function d(){return p==null&&(p=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),p}function y(){if(f==null&&(f=!1,d())){let P=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(P){for(let oe=0;oe<5*5;oe++){let me=4*oe;P.fillStyle=`rgb(${me},${me+1},${me+2})`,P.fillRect(oe%5,Math.floor(oe/5),1,1)}let W=P.getImageData(0,0,5,5).data;for(let oe=0;oe<5*5*4;oe++)if(oe%4!=3&&W[oe]!==oe){f=!0;break}}}return f||!1}function o(V,P,W,oe){let me=new c(V,P,W,oe);return ke=>me.solve(ke)}let b=o(.25,.1,.25,1);function M(V,P,W){return Math.min(W,Math.max(P,V))}function A(V,P,W){let oe=W-P,me=((V-P)%oe+oe)%oe+P;return me===P?W:me}function E(V,...P){for(let W of P)for(let oe in W)V[oe]=W[oe];return V}let g=1;function T(V,P,W){let oe={};for(let me in V)oe[me]=P.call(this,V[me],me,V);return oe}function m(V,P,W){let oe={};for(let me in V)P.call(this,V[me],me,V)&&(oe[me]=V[me]);return oe}function h(V){return Array.isArray(V)?V.map(h):typeof V=="object"&&V?T(V,h):V}let x={};function _(V){x[V]||(typeof console<"u"&&console.warn(V),x[V]=!0)}function D(V,P,W){return(W.y-V.y)*(P.x-V.x)>(P.y-V.y)*(W.x-V.x)}function C(V){return typeof WorkerGlobalScope<"u"&&V!==void 0&&V instanceof WorkerGlobalScope}let F=null;function I(V){return typeof ImageBitmap<"u"&&V instanceof ImageBitmap}let z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function R(V,P,W,oe,me){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let ke=new VideoFrame(V,{timestamp:0});try{let Pe=ke?.format;if(!Pe||!Pe.startsWith("BGR")&&!Pe.startsWith("RGB"))throw new Error(`Unrecognized format ${Pe}`);let Ge=Pe.startsWith("BGR"),tt=new Uint8ClampedArray(oe*me*4);if(yield ke.copyTo(tt,function(vt,kt,Gt,tr,lr){let xr=4*Math.max(-kt,0),Dr=(Math.max(0,Gt)-Gt)*tr*4+xr,sa=4*tr,ga=Math.max(0,kt),cn=Math.max(0,Gt);return{rect:{x:ga,y:cn,width:Math.min(vt.width,kt+tr)-ga,height:Math.min(vt.height,Gt+lr)-cn},layout:[{offset:Dr,stride:sa}]}}(V,P,W,oe,me)),Ge)for(let vt=0;vtC(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,G=function(V,P){if(/:\/\//.test(V.url)&&!/^https?:|^file:/.test(V.url)){let oe=ee(V.url);if(oe)return oe(V,P);if(C(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:V,targetMapId:te},P)}if(!(/^file:/.test(W=V.url)||/^file:/.test(j())&&!/^\w+:/.test(W))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(oe,me){return e(this,void 0,void 0,function*(){let ke=new Request(oe.url,{method:oe.method||"GET",body:oe.body,credentials:oe.credentials,headers:oe.headers,cache:oe.cache,referrer:j(),signal:me.signal});oe.type!=="json"||ke.headers.has("Accept")||ke.headers.set("Accept","application/json");let Pe=yield fetch(ke);if(!Pe.ok){let vt=yield Pe.blob();throw new ae(Pe.status,Pe.statusText,oe.url,vt)}let Ge;Ge=oe.type==="arrayBuffer"||oe.type==="image"?Pe.arrayBuffer():oe.type==="json"?Pe.json():Pe.text();let tt=yield Ge;if(me.signal.aborted)throw q();return{data:tt,cacheControl:Pe.headers.get("Cache-Control"),expires:Pe.headers.get("Expires")}})}(V,P);if(C(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:V,mustQueue:!0,targetMapId:te},P)}var W;return function(oe,me){return new Promise((ke,Pe)=>{var Ge;let tt=new XMLHttpRequest;tt.open(oe.method||"GET",oe.url,!0),oe.type!=="arrayBuffer"&&oe.type!=="image"||(tt.responseType="arraybuffer");for(let vt in oe.headers)tt.setRequestHeader(vt,oe.headers[vt]);oe.type==="json"&&(tt.responseType="text",!((Ge=oe.headers)===null||Ge===void 0)&&Ge.Accept||tt.setRequestHeader("Accept","application/json")),tt.withCredentials=oe.credentials==="include",tt.onerror=()=>{Pe(new Error(tt.statusText))},tt.onload=()=>{if(!me.signal.aborted)if((tt.status>=200&&tt.status<300||tt.status===0)&&tt.response!==null){let vt=tt.response;if(oe.type==="json")try{vt=JSON.parse(tt.response)}catch(kt){return void Pe(kt)}ke({data:vt,cacheControl:tt.getResponseHeader("Cache-Control"),expires:tt.getResponseHeader("Expires")})}else{let vt=new Blob([tt.response],{type:tt.getResponseHeader("Content-Type")});Pe(new ae(tt.status,tt.statusText,oe.url,vt))}},me.signal.addEventListener("abort",()=>{tt.abort(),Pe(q())}),tt.send(oe.body)})}(V,P)};function K(V){if(!V||V.indexOf("://")<=0||V.indexOf("data:image/")===0||V.indexOf("blob:")===0)return!0;let P=new URL(V),W=window.location;return P.protocol===W.protocol&&P.host===W.host}function H(V,P,W){W[V]&&W[V].indexOf(P)!==-1||(W[V]=W[V]||[],W[V].push(P))}function Z(V,P,W){if(W&&W[V]){let oe=W[V].indexOf(P);oe!==-1&&W[V].splice(oe,1)}}class X{constructor(P,W={}){E(this,W),this.type=P}}class $ extends X{constructor(P,W={}){super("error",E({error:P},W))}}class Q{on(P,W){return this._listeners=this._listeners||{},H(P,W,this._listeners),this}off(P,W){return Z(P,W,this._listeners),Z(P,W,this._oneTimeListeners),this}once(P,W){return W?(this._oneTimeListeners=this._oneTimeListeners||{},H(P,W,this._oneTimeListeners),this):new Promise(oe=>this.once(P,oe))}fire(P,W){typeof P=="string"&&(P=new X(P,W||{}));let oe=P.type;if(this.listens(oe)){P.target=this;let me=this._listeners&&this._listeners[oe]?this._listeners[oe].slice():[];for(let Ge of me)Ge.call(this,P);let ke=this._oneTimeListeners&&this._oneTimeListeners[oe]?this._oneTimeListeners[oe].slice():[];for(let Ge of ke)Z(oe,Ge,this._oneTimeListeners),Ge.call(this,P);let Pe=this._eventedParent;Pe&&(E(P,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Pe.fire(P))}else P instanceof $&&console.error(P.error);return this}listens(P){return this._listeners&&this._listeners[P]&&this._listeners[P].length>0||this._oneTimeListeners&&this._oneTimeListeners[P]&&this._oneTimeListeners[P].length>0||this._eventedParent&&this._eventedParent.listens(P)}setEventedParent(P,W){return this._eventedParent=P,this._eventedParentData=W,this}}var re={$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"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let ue=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function pe(V,P){let W={};for(let oe in V)oe!=="ref"&&(W[oe]=V[oe]);return ue.forEach(oe=>{oe in P&&(W[oe]=P[oe])}),W}function ge(V,P){if(Array.isArray(V)){if(!Array.isArray(P)||V.length!==P.length)return!1;for(let W=0;W`:V.itemType.kind==="value"?"array":`array<${P}>`}return V.kind}let he=[qe,Ne,ut,ot,yt,vr,At,Ee(It),Ut,Jt,at];function ye(V,P){if(P.kind==="error")return null;if(V.kind==="array"){if(P.kind==="array"&&(P.N===0&&P.itemType.kind==="value"||!ye(V.itemType,P.itemType))&&(typeof V.N!="number"||V.N===P.N))return null}else{if(V.kind===P.kind)return null;if(V.kind==="value"){for(let W of he)if(!ye(W,P))return null}}return`Expected ${Re(V)} but found ${Re(P)} instead.`}function Ie(V,P){return P.some(W=>W.kind===V.kind)}function Fe(V,P){return P.some(W=>W==="null"?V===null:W==="array"?Array.isArray(V):W==="object"?V&&!Array.isArray(V)&&typeof V=="object":W===typeof V)}function He(V,P){return V.kind==="array"&&P.kind==="array"?V.itemType.kind===P.itemType.kind&&typeof V.N=="number":V.kind===P.kind}let We=.96422,pt=.82521,ct=4/29,ft=6/29,mt=3*ft*ft,_t=ft*ft*ft,Bt=Math.PI/180,Et=180/Math.PI;function hr(V){return(V%=360)<0&&(V+=360),V}function $r([V,P,W,oe]){let me,ke,Pe=na((.2225045*(V=ca(V))+.7168786*(P=ca(P))+.0606169*(W=ca(W)))/1);V===P&&P===W?me=ke=Pe:(me=na((.4360747*V+.3850649*P+.1430804*W)/We),ke=na((.0139322*V+.0971045*P+.7141733*W)/pt));let Ge=116*Pe-16;return[Ge<0?0:Ge,500*(me-Pe),200*(Pe-ke),oe]}function ca(V){return V<=.04045?V/12.92:Math.pow((V+.055)/1.055,2.4)}function na(V){return V>_t?Math.pow(V,1/3):V/mt+ct}function wa([V,P,W,oe]){let me=(V+16)/116,ke=isNaN(P)?me:me+P/500,Pe=isNaN(W)?me:me-W/200;return me=1*fa(me),ke=We*fa(ke),Pe=pt*fa(Pe),[pa(3.1338561*ke-1.6168667*me-.4906146*Pe),pa(-.9787684*ke+1.9161415*me+.033454*Pe),pa(.0719453*ke-.2289914*me+1.4052427*Pe),oe]}function pa(V){return(V=V<=.00304?12.92*V:1.055*Math.pow(V,1/2.4)-.055)<0?0:V>1?1:V}function fa(V){return V>ft?V*V*V:mt*(V-ct)}function za(V){return parseInt(V.padEnd(2,V),16)/255}function Ia(V,P){return Va(P?V/100:V,0,1)}function Va(V,P,W){return Math.min(Math.max(P,V),W)}function Oa(V){return!V.some(Number.isNaN)}let tn={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]};class ka{constructor(P,W,oe,me=1,ke=!0){this.r=P,this.g=W,this.b=oe,this.a=me,ke||(this.r*=me,this.g*=me,this.b*=me,me||this.overwriteGetter("rgb",[P,W,oe,me]))}static parse(P){if(P instanceof ka)return P;if(typeof P!="string")return;let W=function(oe){if((oe=oe.toLowerCase().trim())==="transparent")return[0,0,0,0];let me=tn[oe];if(me){let[Pe,Ge,tt]=me;return[Pe/255,Ge/255,tt/255,1]}if(oe.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(oe)){let Pe=oe.length<6?1:2,Ge=1;return[za(oe.slice(Ge,Ge+=Pe)),za(oe.slice(Ge,Ge+=Pe)),za(oe.slice(Ge,Ge+=Pe)),za(oe.slice(Ge,Ge+Pe)||"ff")]}if(oe.startsWith("rgb")){let Pe=oe.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Pe){let[Ge,tt,vt,kt,Gt,tr,lr,xr,Dr,sa,ga,cn]=Pe,Da=[kt||" ",lr||" ",sa].join("");if(Da===" "||Da===" /"||Da===",,"||Da===",,,"){let en=[vt,tr,Dr].join(""),zn=en==="%%%"?100:en===""?255:0;if(zn){let mi=[Va(+tt/zn,0,1),Va(+Gt/zn,0,1),Va(+xr/zn,0,1),ga?Ia(+ga,cn):1];if(Oa(mi))return mi}}return}}let ke=oe.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ke){let[Pe,Ge,tt,vt,kt,Gt,tr,lr,xr]=ke,Dr=[tt||" ",kt||" ",tr].join("");if(Dr===" "||Dr===" /"||Dr===",,"||Dr===",,,"){let sa=[+Ge,Va(+vt,0,100),Va(+Gt,0,100),lr?Ia(+lr,xr):1];if(Oa(sa))return function([ga,cn,Da,en]){function zn(mi){let Ji=(mi+ga/30)%12,Uo=cn*Math.min(Da,1-Da);return Da-Uo*Math.max(-1,Math.min(Ji-3,9-Ji,1))}return ga=hr(ga),cn/=100,Da/=100,[zn(0),zn(8),zn(4),en]}(sa)}}}(P);return W?new ka(...W,!1):void 0}get rgb(){let{r:P,g:W,b:oe,a:me}=this,ke=me||1/0;return this.overwriteGetter("rgb",[P/ke,W/ke,oe/ke,me])}get hcl(){return this.overwriteGetter("hcl",function(P){let[W,oe,me,ke]=$r(P),Pe=Math.sqrt(oe*oe+me*me);return[Math.round(1e4*Pe)?hr(Math.atan2(me,oe)*Et):NaN,Pe,W,ke]}(this.rgb))}get lab(){return this.overwriteGetter("lab",$r(this.rgb))}overwriteGetter(P,W){return Object.defineProperty(this,P,{value:W}),W}toString(){let[P,W,oe,me]=this.rgb;return`rgba(${[P,W,oe].map(ke=>Math.round(255*ke)).join(",")},${me})`}}ka.black=new ka(0,0,0,1),ka.white=new ka(1,1,1,1),ka.transparent=new ka(0,0,0,0),ka.red=new ka(1,0,0,1);class oi{constructor(P,W,oe){this.sensitivity=P?W?"variant":"case":W?"accent":"base",this.locale=oe,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(P,W){return this.collator.compare(P,W)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class $n{constructor(P,W,oe,me,ke){this.text=P,this.image=W,this.scale=oe,this.fontStack=me,this.textColor=ke}}class bn{constructor(P){this.sections=P}static fromString(P){return new bn([new $n(P,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(P=>P.text.length!==0||P.image&&P.image.name.length!==0)}static factory(P){return P instanceof bn?P:bn.fromString(P)}toString(){return this.sections.length===0?"":this.sections.map(P=>P.text).join("")}}class ci{constructor(P){this.values=P.slice()}static parse(P){if(P instanceof ci)return P;if(typeof P=="number")return new ci([P,P,P,P]);if(Array.isArray(P)&&!(P.length<1||P.length>4)){for(let W of P)if(typeof W!="number")return;switch(P.length){case 1:P=[P[0],P[0],P[0],P[0]];break;case 2:P=[P[0],P[1],P[0],P[1]];break;case 3:P=[P[0],P[1],P[2],P[1]]}return new ci(P)}}toString(){return JSON.stringify(this.values)}}let hi=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Pi{constructor(P){this.values=P.slice()}static parse(P){if(P instanceof Pi)return P;if(Array.isArray(P)&&!(P.length<1)&&P.length%2==0){for(let W=0;W=0&&V<=255&&typeof P=="number"&&P>=0&&P<=255&&typeof W=="number"&&W>=0&&W<=255?oe===void 0||typeof oe=="number"&&oe>=0&&oe<=1?null:`Invalid rgba value [${[V,P,W,oe].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof oe=="number"?[V,P,W,oe]:[V,P,W]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function _n(V){if(V===null||typeof V=="string"||typeof V=="boolean"||typeof V=="number"||V instanceof ka||V instanceof oi||V instanceof bn||V instanceof ci||V instanceof Pi||V instanceof Jn)return!0;if(Array.isArray(V)){for(let P of V)if(!_n(P))return!1;return!0}if(typeof V=="object"){for(let P in V)if(!_n(V[P]))return!1;return!0}return!1}function Ln(V){if(V===null)return qe;if(typeof V=="string")return ut;if(typeof V=="boolean")return ot;if(typeof V=="number")return Ne;if(V instanceof ka)return yt;if(V instanceof oi)return Zt;if(V instanceof bn)return vr;if(V instanceof ci)return Ut;if(V instanceof Pi)return at;if(V instanceof Jn)return Jt;if(Array.isArray(V)){let P=V.length,W;for(let oe of V){let me=Ln(oe);if(W){if(W===me)continue;W=It;break}W=me}return Ee(W||It,P)}return At}function ji(V){let P=typeof V;return V===null?"":P==="string"||P==="number"||P==="boolean"?String(V):V instanceof ka||V instanceof bn||V instanceof ci||V instanceof Pi||V instanceof Jn?V.toString():JSON.stringify(V)}class Zi{constructor(P,W){this.type=P,this.value=W}static parse(P,W){if(P.length!==2)return W.error(`'literal' expression requires exactly one argument, but found ${P.length-1} instead.`);if(!_n(P[1]))return W.error("invalid value");let oe=P[1],me=Ln(oe),ke=W.expectedType;return me.kind!=="array"||me.N!==0||!ke||ke.kind!=="array"||typeof ke.N=="number"&&ke.N!==0||(me=ke),new Zi(me,oe)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class un{constructor(P){this.name="ExpressionEvaluationError",this.message=P}toJSON(){return this.message}}let rn={string:ut,number:Ne,boolean:ot,object:At};class nt{constructor(P,W){this.type=P,this.args=W}static parse(P,W){if(P.length<2)return W.error("Expected at least one argument.");let oe,me=1,ke=P[0];if(ke==="array"){let Ge,tt;if(P.length>2){let vt=P[1];if(typeof vt!="string"||!(vt in rn)||vt==="object")return W.error('The item type argument of "array" must be one of string, number, boolean',1);Ge=rn[vt],me++}else Ge=It;if(P.length>3){if(P[2]!==null&&(typeof P[2]!="number"||P[2]<0||P[2]!==Math.floor(P[2])))return W.error('The length argument to "array" must be a positive integer literal',2);tt=P[2],me++}oe=Ee(Ge,tt)}else{if(!rn[ke])throw new Error(`Types doesn't contain name = ${ke}`);oe=rn[ke]}let Pe=[];for(;meP.outputDefined())}}let Ke={"to-boolean":ot,"to-color":yt,"to-number":Ne,"to-string":ut};class Qt{constructor(P,W){this.type=P,this.args=W}static parse(P,W){if(P.length<2)return W.error("Expected at least one argument.");let oe=P[0];if(!Ke[oe])throw new Error(`Can't parse ${oe} as it is not part of the known types`);if((oe==="to-boolean"||oe==="to-string")&&P.length!==2)return W.error("Expected one argument.");let me=Ke[oe],ke=[];for(let Pe=1;Pe4?`Invalid rbga value ${JSON.stringify(W)}: expected an array containing either three or four numeric values.`:Ti(W[0],W[1],W[2],W[3]),!oe))return new ka(W[0]/255,W[1]/255,W[2]/255,W[3])}throw new un(oe||`Could not parse color from value '${typeof W=="string"?W:JSON.stringify(W)}'`)}case"padding":{let W;for(let oe of this.args){W=oe.evaluate(P);let me=ci.parse(W);if(me)return me}throw new un(`Could not parse padding from value '${typeof W=="string"?W:JSON.stringify(W)}'`)}case"variableAnchorOffsetCollection":{let W;for(let oe of this.args){W=oe.evaluate(P);let me=Pi.parse(W);if(me)return me}throw new un(`Could not parse variableAnchorOffsetCollection from value '${typeof W=="string"?W:JSON.stringify(W)}'`)}case"number":{let W=null;for(let oe of this.args){if(W=oe.evaluate(P),W===null)return 0;let me=Number(W);if(!isNaN(me))return me}throw new un(`Could not convert ${JSON.stringify(W)} to number.`)}case"formatted":return bn.fromString(ji(this.args[0].evaluate(P)));case"resolvedImage":return Jn.fromString(ji(this.args[0].evaluate(P)));default:return ji(this.args[0].evaluate(P))}}eachChild(P){this.args.forEach(P)}outputDefined(){return this.args.every(P=>P.outputDefined())}}let Xt=["Unknown","Point","LineString","Polygon"];class nr{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Xt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(P){let W=this._parseColorCache[P];return W||(W=this._parseColorCache[P]=ka.parse(P)),W}}class cr{constructor(P,W,oe=[],me,ke=new De,Pe=[]){this.registry=P,this.path=oe,this.key=oe.map(Ge=>`[${Ge}]`).join(""),this.scope=ke,this.errors=Pe,this.expectedType=me,this._isConstant=W}parse(P,W,oe,me,ke={}){return W?this.concat(W,oe,me)._parse(P,ke):this._parse(P,ke)}_parse(P,W){function oe(me,ke,Pe){return Pe==="assert"?new nt(ke,[me]):Pe==="coerce"?new Qt(ke,[me]):me}if(P!==null&&typeof P!="string"&&typeof P!="boolean"&&typeof P!="number"||(P=["literal",P]),Array.isArray(P)){if(P.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let me=P[0];if(typeof me!="string")return this.error(`Expression name must be a string, but found ${typeof me} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ke=this.registry[me];if(ke){let Pe=ke.parse(P,this);if(!Pe)return null;if(this.expectedType){let Ge=this.expectedType,tt=Pe.type;if(Ge.kind!=="string"&&Ge.kind!=="number"&&Ge.kind!=="boolean"&&Ge.kind!=="object"&&Ge.kind!=="array"||tt.kind!=="value")if(Ge.kind!=="color"&&Ge.kind!=="formatted"&&Ge.kind!=="resolvedImage"||tt.kind!=="value"&&tt.kind!=="string")if(Ge.kind!=="padding"||tt.kind!=="value"&&tt.kind!=="number"&&tt.kind!=="array")if(Ge.kind!=="variableAnchorOffsetCollection"||tt.kind!=="value"&&tt.kind!=="array"){if(this.checkSubtype(Ge,tt))return null}else Pe=oe(Pe,Ge,W.typeAnnotation||"coerce");else Pe=oe(Pe,Ge,W.typeAnnotation||"coerce");else Pe=oe(Pe,Ge,W.typeAnnotation||"coerce");else Pe=oe(Pe,Ge,W.typeAnnotation||"assert")}if(!(Pe instanceof Zi)&&Pe.type.kind!=="resolvedImage"&&this._isConstant(Pe)){let Ge=new nr;try{Pe=new Zi(Pe.type,Pe.evaluate(Ge))}catch(tt){return this.error(tt.message),null}}return Pe}return this.error(`Unknown expression "${me}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(P===void 0?"'undefined' value invalid. Use null instead.":typeof P=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof P} instead.`)}concat(P,W,oe){let me=typeof P=="number"?this.path.concat(P):this.path,ke=oe?this.scope.concat(oe):this.scope;return new cr(this.registry,this._isConstant,me,W||null,ke,this.errors)}error(P,...W){let oe=`${this.key}${W.map(me=>`[${me}]`).join("")}`;this.errors.push(new be(oe,P))}checkSubtype(P,W){let oe=ye(P,W);return oe&&this.error(oe),oe}}class rr{constructor(P,W){this.type=W.type,this.bindings=[].concat(P),this.result=W}evaluate(P){return this.result.evaluate(P)}eachChild(P){for(let W of this.bindings)P(W[1]);P(this.result)}static parse(P,W){if(P.length<4)return W.error(`Expected at least 3 arguments, but found ${P.length-1} instead.`);let oe=[];for(let ke=1;ke=oe.length)throw new un(`Array index out of bounds: ${W} > ${oe.length-1}.`);if(W!==Math.floor(W))throw new un(`Array index must be an integer, but found ${W} instead.`);return oe[W]}eachChild(P){P(this.index),P(this.input)}outputDefined(){return!1}}class Vt{constructor(P,W){this.type=ot,this.needle=P,this.haystack=W}static parse(P,W){if(P.length!==3)return W.error(`Expected 2 arguments, but found ${P.length-1} instead.`);let oe=W.parse(P[1],1,It),me=W.parse(P[2],2,It);return oe&&me?Ie(oe.type,[ot,ut,Ne,qe,It])?new Vt(oe,me):W.error(`Expected first argument to be of type boolean, string, number or null, but found ${Re(oe.type)} instead`):null}evaluate(P){let W=this.needle.evaluate(P),oe=this.haystack.evaluate(P);if(!oe)return!1;if(!Fe(W,["boolean","string","number","null"]))throw new un(`Expected first argument to be of type boolean, string, number or null, but found ${Re(Ln(W))} instead.`);if(!Fe(oe,["string","array"]))throw new un(`Expected second argument to be of type array or string, but found ${Re(Ln(oe))} instead.`);return oe.indexOf(W)>=0}eachChild(P){P(this.needle),P(this.haystack)}outputDefined(){return!0}}class er{constructor(P,W,oe){this.type=Ne,this.needle=P,this.haystack=W,this.fromIndex=oe}static parse(P,W){if(P.length<=2||P.length>=5)return W.error(`Expected 3 or 4 arguments, but found ${P.length-1} instead.`);let oe=W.parse(P[1],1,It),me=W.parse(P[2],2,It);if(!oe||!me)return null;if(!Ie(oe.type,[ot,ut,Ne,qe,It]))return W.error(`Expected first argument to be of type boolean, string, number or null, but found ${Re(oe.type)} instead`);if(P.length===4){let ke=W.parse(P[3],3,Ne);return ke?new er(oe,me,ke):null}return new er(oe,me)}evaluate(P){let W=this.needle.evaluate(P),oe=this.haystack.evaluate(P);if(!Fe(W,["boolean","string","number","null"]))throw new un(`Expected first argument to be of type boolean, string, number or null, but found ${Re(Ln(W))} instead.`);let me;if(this.fromIndex&&(me=this.fromIndex.evaluate(P)),Fe(oe,["string"])){let ke=oe.indexOf(W,me);return ke===-1?-1:[...oe.slice(0,ke)].length}if(Fe(oe,["array"]))return oe.indexOf(W,me);throw new un(`Expected second argument to be of type array or string, but found ${Re(Ln(oe))} instead.`)}eachChild(P){P(this.needle),P(this.haystack),this.fromIndex&&P(this.fromIndex)}outputDefined(){return!1}}class Tr{constructor(P,W,oe,me,ke,Pe){this.inputType=P,this.type=W,this.input=oe,this.cases=me,this.outputs=ke,this.otherwise=Pe}static parse(P,W){if(P.length<5)return W.error(`Expected at least 4 arguments, but found only ${P.length-1}.`);if(P.length%2!=1)return W.error("Expected an even number of arguments.");let oe,me;W.expectedType&&W.expectedType.kind!=="value"&&(me=W.expectedType);let ke={},Pe=[];for(let vt=2;vtNumber.MAX_SAFE_INTEGER)return tr.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof xr=="number"&&Math.floor(xr)!==xr)return tr.error("Numeric branch labels must be integer values.");if(oe){if(tr.checkSubtype(oe,Ln(xr)))return null}else oe=Ln(xr);if(ke[String(xr)]!==void 0)return tr.error("Branch labels must be unique.");ke[String(xr)]=Pe.length}let lr=W.parse(Gt,vt,me);if(!lr)return null;me=me||lr.type,Pe.push(lr)}let Ge=W.parse(P[1],1,It);if(!Ge)return null;let tt=W.parse(P[P.length-1],P.length-1,me);return tt?Ge.type.kind!=="value"&&W.concat(1).checkSubtype(oe,Ge.type)?null:new Tr(oe,me,Ge,ke,Pe,tt):null}evaluate(P){let W=this.input.evaluate(P);return(Ln(W)===this.inputType&&this.outputs[this.cases[W]]||this.otherwise).evaluate(P)}eachChild(P){P(this.input),this.outputs.forEach(P),P(this.otherwise)}outputDefined(){return this.outputs.every(P=>P.outputDefined())&&this.otherwise.outputDefined()}}class jr{constructor(P,W,oe){this.type=P,this.branches=W,this.otherwise=oe}static parse(P,W){if(P.length<4)return W.error(`Expected at least 3 arguments, but found only ${P.length-1}.`);if(P.length%2!=0)return W.error("Expected an odd number of arguments.");let oe;W.expectedType&&W.expectedType.kind!=="value"&&(oe=W.expectedType);let me=[];for(let Pe=1;PeW.outputDefined())&&this.otherwise.outputDefined()}}class Fr{constructor(P,W,oe,me){this.type=P,this.input=W,this.beginIndex=oe,this.endIndex=me}static parse(P,W){if(P.length<=2||P.length>=5)return W.error(`Expected 3 or 4 arguments, but found ${P.length-1} instead.`);let oe=W.parse(P[1],1,It),me=W.parse(P[2],2,Ne);if(!oe||!me)return null;if(!Ie(oe.type,[Ee(It),ut,It]))return W.error(`Expected first argument to be of type array or string, but found ${Re(oe.type)} instead`);if(P.length===4){let ke=W.parse(P[3],3,Ne);return ke?new Fr(oe.type,oe,me,ke):null}return new Fr(oe.type,oe,me)}evaluate(P){let W=this.input.evaluate(P),oe=this.beginIndex.evaluate(P),me;if(this.endIndex&&(me=this.endIndex.evaluate(P)),Fe(W,["string"]))return[...W].slice(oe,me).join("");if(Fe(W,["array"]))return W.slice(oe,me);throw new un(`Expected first argument to be of type array or string, but found ${Re(Ln(W))} instead.`)}eachChild(P){P(this.input),P(this.beginIndex),this.endIndex&&P(this.endIndex)}outputDefined(){return!1}}function kr(V,P){let W=V.length-1,oe,me,ke=0,Pe=W,Ge=0;for(;ke<=Pe;)if(Ge=Math.floor((ke+Pe)/2),oe=V[Ge],me=V[Ge+1],oe<=P){if(Ge===W||PP))throw new un("Input is not a number.");Pe=Ge-1}return 0}class ra{constructor(P,W,oe){this.type=P,this.input=W,this.labels=[],this.outputs=[];for(let[me,ke]of oe)this.labels.push(me),this.outputs.push(ke)}static parse(P,W){if(P.length-1<4)return W.error(`Expected at least 4 arguments, but found only ${P.length-1}.`);if((P.length-1)%2!=0)return W.error("Expected an even number of arguments.");let oe=W.parse(P[1],1,Ne);if(!oe)return null;let me=[],ke=null;W.expectedType&&W.expectedType.kind!=="value"&&(ke=W.expectedType);for(let Pe=1;Pe=Ge)return W.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',vt);let Gt=W.parse(tt,kt,ke);if(!Gt)return null;ke=ke||Gt.type,me.push([Ge,Gt])}return new ra(ke,oe,me)}evaluate(P){let W=this.labels,oe=this.outputs;if(W.length===1)return oe[0].evaluate(P);let me=this.input.evaluate(P);if(me<=W[0])return oe[0].evaluate(P);let ke=W.length;return me>=W[ke-1]?oe[ke-1].evaluate(P):oe[kr(W,me)].evaluate(P)}eachChild(P){P(this.input);for(let W of this.outputs)P(W)}outputDefined(){return this.outputs.every(P=>P.outputDefined())}}function ja(V){return V&&V.__esModule&&Object.prototype.hasOwnProperty.call(V,"default")?V.default:V}var La=Dn;function Dn(V,P,W,oe){this.cx=3*V,this.bx=3*(W-V)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*P,this.by=3*(oe-P)-this.cy,this.ay=1-this.cy-this.by,this.p1x=V,this.p1y=P,this.p2x=W,this.p2y=oe}Dn.prototype={sampleCurveX:function(V){return((this.ax*V+this.bx)*V+this.cx)*V},sampleCurveY:function(V){return((this.ay*V+this.by)*V+this.cy)*V},sampleCurveDerivativeX:function(V){return(3*this.ax*V+2*this.bx)*V+this.cx},solveCurveX:function(V,P){if(P===void 0&&(P=1e-6),V<0)return 0;if(V>1)return 1;for(var W=V,oe=0;oe<8;oe++){var me=this.sampleCurveX(W)-V;if(Math.abs(me)me?Pe=W:Ge=W,W=.5*(Ge-Pe)+Pe;return W},solve:function(V,P){return this.sampleCurveY(this.solveCurveX(V,P))}};var Mn=ja(La);function _i(V,P,W){return V+W*(P-V)}function ti(V,P,W){return V.map((oe,me)=>_i(oe,P[me],W))}let Si={number:_i,color:function(V,P,W,oe="rgb"){switch(oe){case"rgb":{let[me,ke,Pe,Ge]=ti(V.rgb,P.rgb,W);return new ka(me,ke,Pe,Ge,!1)}case"hcl":{let[me,ke,Pe,Ge]=V.hcl,[tt,vt,kt,Gt]=P.hcl,tr,lr;if(isNaN(me)||isNaN(tt))isNaN(me)?isNaN(tt)?tr=NaN:(tr=tt,Pe!==1&&Pe!==0||(lr=vt)):(tr=me,kt!==1&&kt!==0||(lr=ke));else{let cn=tt-me;tt>me&&cn>180?cn-=360:tt180&&(cn+=360),tr=me+W*cn}let[xr,Dr,sa,ga]=function([cn,Da,en,zn]){return cn=isNaN(cn)?0:cn*Bt,wa([en,Math.cos(cn)*Da,Math.sin(cn)*Da,zn])}([tr,lr??_i(ke,vt,W),_i(Pe,kt,W),_i(Ge,Gt,W)]);return new ka(xr,Dr,sa,ga,!1)}case"lab":{let[me,ke,Pe,Ge]=wa(ti(V.lab,P.lab,W));return new ka(me,ke,Pe,Ge,!1)}}},array:ti,padding:function(V,P,W){return new ci(ti(V.values,P.values,W))},variableAnchorOffsetCollection:function(V,P,W){let oe=V.values,me=P.values;if(oe.length!==me.length)throw new un(`Cannot interpolate values of different length. from: ${V.toString()}, to: ${P.toString()}`);let ke=[];for(let Pe=0;Petypeof kt!="number"||kt<0||kt>1))return W.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);me={name:"cubic-bezier",controlPoints:vt}}}if(P.length-1<4)return W.error(`Expected at least 4 arguments, but found only ${P.length-1}.`);if((P.length-1)%2!=0)return W.error("Expected an even number of arguments.");if(ke=W.parse(ke,2,Ne),!ke)return null;let Ge=[],tt=null;oe==="interpolate-hcl"||oe==="interpolate-lab"?tt=yt:W.expectedType&&W.expectedType.kind!=="value"&&(tt=W.expectedType);for(let vt=0;vt=kt)return W.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',tr);let xr=W.parse(Gt,lr,tt);if(!xr)return null;tt=tt||xr.type,Ge.push([kt,xr])}return He(tt,Ne)||He(tt,yt)||He(tt,Ut)||He(tt,at)||He(tt,Ee(Ne))?new ai(tt,oe,me,ke,Ge):W.error(`Type ${Re(tt)} is not interpolatable.`)}evaluate(P){let W=this.labels,oe=this.outputs;if(W.length===1)return oe[0].evaluate(P);let me=this.input.evaluate(P);if(me<=W[0])return oe[0].evaluate(P);let ke=W.length;if(me>=W[ke-1])return oe[ke-1].evaluate(P);let Pe=kr(W,me),Ge=ai.interpolationFactor(this.interpolation,me,W[Pe],W[Pe+1]),tt=oe[Pe].evaluate(P),vt=oe[Pe+1].evaluate(P);switch(this.operator){case"interpolate":return Si[this.type.kind](tt,vt,Ge);case"interpolate-hcl":return Si.color(tt,vt,Ge,"hcl");case"interpolate-lab":return Si.color(tt,vt,Ge,"lab")}}eachChild(P){P(this.input);for(let W of this.outputs)P(W)}outputDefined(){return this.outputs.every(P=>P.outputDefined())}}function Ao(V,P,W,oe){let me=oe-W,ke=V-W;return me===0?0:P===1?ke/me:(Math.pow(P,ke)-1)/(Math.pow(P,me)-1)}class yo{constructor(P,W){this.type=P,this.args=W}static parse(P,W){if(P.length<2)return W.error("Expectected at least one argument.");let oe=null,me=W.expectedType;me&&me.kind!=="value"&&(oe=me);let ke=[];for(let Ge of P.slice(1)){let tt=W.parse(Ge,1+ke.length,oe,void 0,{typeAnnotation:"omit"});if(!tt)return null;oe=oe||tt.type,ke.push(tt)}if(!oe)throw new Error("No output type");let Pe=me&&ke.some(Ge=>ye(me,Ge.type));return new yo(Pe?It:oe,ke)}evaluate(P){let W,oe=null,me=0;for(let ke of this.args)if(me++,oe=ke.evaluate(P),oe&&oe instanceof Jn&&!oe.available&&(W||(W=oe.name),oe=null,me===this.args.length&&(oe=W)),oe!==null)break;return oe}eachChild(P){this.args.forEach(P)}outputDefined(){return this.args.every(P=>P.outputDefined())}}function Vn(V,P){return V==="=="||V==="!="?P.kind==="boolean"||P.kind==="string"||P.kind==="number"||P.kind==="null"||P.kind==="value":P.kind==="string"||P.kind==="number"||P.kind==="value"}function Bo(V,P,W,oe){return oe.compare(P,W)===0}function Mo(V,P,W){let oe=V!=="=="&&V!=="!=";return class K5{constructor(ke,Pe,Ge){this.type=ot,this.lhs=ke,this.rhs=Pe,this.collator=Ge,this.hasUntypedArgument=ke.type.kind==="value"||Pe.type.kind==="value"}static parse(ke,Pe){if(ke.length!==3&&ke.length!==4)return Pe.error("Expected two or three arguments.");let Ge=ke[0],tt=Pe.parse(ke[1],1,It);if(!tt)return null;if(!Vn(Ge,tt.type))return Pe.concat(1).error(`"${Ge}" comparisons are not supported for type '${Re(tt.type)}'.`);let vt=Pe.parse(ke[2],2,It);if(!vt)return null;if(!Vn(Ge,vt.type))return Pe.concat(2).error(`"${Ge}" comparisons are not supported for type '${Re(vt.type)}'.`);if(tt.type.kind!==vt.type.kind&&tt.type.kind!=="value"&&vt.type.kind!=="value")return Pe.error(`Cannot compare types '${Re(tt.type)}' and '${Re(vt.type)}'.`);oe&&(tt.type.kind==="value"&&vt.type.kind!=="value"?tt=new nt(vt.type,[tt]):tt.type.kind!=="value"&&vt.type.kind==="value"&&(vt=new nt(tt.type,[vt])));let kt=null;if(ke.length===4){if(tt.type.kind!=="string"&&vt.type.kind!=="string"&&tt.type.kind!=="value"&&vt.type.kind!=="value")return Pe.error("Cannot use collator to compare non-string types.");if(kt=Pe.parse(ke[3],3,Zt),!kt)return null}return new K5(tt,vt,kt)}evaluate(ke){let Pe=this.lhs.evaluate(ke),Ge=this.rhs.evaluate(ke);if(oe&&this.hasUntypedArgument){let tt=Ln(Pe),vt=Ln(Ge);if(tt.kind!==vt.kind||tt.kind!=="string"&&tt.kind!=="number")throw new un(`Expected arguments for "${V}" to be (string, string) or (number, number), but found (${tt.kind}, ${vt.kind}) instead.`)}if(this.collator&&!oe&&this.hasUntypedArgument){let tt=Ln(Pe),vt=Ln(Ge);if(tt.kind!=="string"||vt.kind!=="string")return P(ke,Pe,Ge)}return this.collator?W(ke,Pe,Ge,this.collator.evaluate(ke)):P(ke,Pe,Ge)}eachChild(ke){ke(this.lhs),ke(this.rhs),this.collator&&ke(this.collator)}outputDefined(){return!0}}}let co=Mo("==",function(V,P,W){return P===W},Bo),Ro=Mo("!=",function(V,P,W){return P!==W},function(V,P,W,oe){return!Bo(0,P,W,oe)}),ao=Mo("<",function(V,P,W){return P",function(V,P,W){return P>W},function(V,P,W,oe){return oe.compare(P,W)>0}),Wo=Mo("<=",function(V,P,W){return P<=W},function(V,P,W,oe){return oe.compare(P,W)<=0}),Po=Mo(">=",function(V,P,W){return P>=W},function(V,P,W,oe){return oe.compare(P,W)>=0});class vi{constructor(P,W,oe){this.type=Zt,this.locale=oe,this.caseSensitive=P,this.diacriticSensitive=W}static parse(P,W){if(P.length!==2)return W.error("Expected one argument.");let oe=P[1];if(typeof oe!="object"||Array.isArray(oe))return W.error("Collator options argument must be an object.");let me=W.parse(oe["case-sensitive"]!==void 0&&oe["case-sensitive"],1,ot);if(!me)return null;let ke=W.parse(oe["diacritic-sensitive"]!==void 0&&oe["diacritic-sensitive"],1,ot);if(!ke)return null;let Pe=null;return oe.locale&&(Pe=W.parse(oe.locale,1,ut),!Pe)?null:new vi(me,ke,Pe)}evaluate(P){return new oi(this.caseSensitive.evaluate(P),this.diacriticSensitive.evaluate(P),this.locale?this.locale.evaluate(P):null)}eachChild(P){P(this.caseSensitive),P(this.diacriticSensitive),this.locale&&P(this.locale)}outputDefined(){return!1}}class zi{constructor(P,W,oe,me,ke){this.type=ut,this.number=P,this.locale=W,this.currency=oe,this.minFractionDigits=me,this.maxFractionDigits=ke}static parse(P,W){if(P.length!==3)return W.error("Expected two arguments.");let oe=W.parse(P[1],1,Ne);if(!oe)return null;let me=P[2];if(typeof me!="object"||Array.isArray(me))return W.error("NumberFormat options argument must be an object.");let ke=null;if(me.locale&&(ke=W.parse(me.locale,1,ut),!ke))return null;let Pe=null;if(me.currency&&(Pe=W.parse(me.currency,1,ut),!Pe))return null;let Ge=null;if(me["min-fraction-digits"]&&(Ge=W.parse(me["min-fraction-digits"],1,Ne),!Ge))return null;let tt=null;return me["max-fraction-digits"]&&(tt=W.parse(me["max-fraction-digits"],1,Ne),!tt)?null:new zi(oe,ke,Pe,Ge,tt)}evaluate(P){return new Intl.NumberFormat(this.locale?this.locale.evaluate(P):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(P):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(P):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(P):void 0}).format(this.number.evaluate(P))}eachChild(P){P(this.number),this.locale&&P(this.locale),this.currency&&P(this.currency),this.minFractionDigits&&P(this.minFractionDigits),this.maxFractionDigits&&P(this.maxFractionDigits)}outputDefined(){return!1}}class ho{constructor(P){this.type=vr,this.sections=P}static parse(P,W){if(P.length<2)return W.error("Expected at least one argument.");let oe=P[1];if(!Array.isArray(oe)&&typeof oe=="object")return W.error("First argument must be an image or text section.");let me=[],ke=!1;for(let Pe=1;Pe<=P.length-1;++Pe){let Ge=P[Pe];if(ke&&typeof Ge=="object"&&!Array.isArray(Ge)){ke=!1;let tt=null;if(Ge["font-scale"]&&(tt=W.parse(Ge["font-scale"],1,Ne),!tt))return null;let vt=null;if(Ge["text-font"]&&(vt=W.parse(Ge["text-font"],1,Ee(ut)),!vt))return null;let kt=null;if(Ge["text-color"]&&(kt=W.parse(Ge["text-color"],1,yt),!kt))return null;let Gt=me[me.length-1];Gt.scale=tt,Gt.font=vt,Gt.textColor=kt}else{let tt=W.parse(P[Pe],1,It);if(!tt)return null;let vt=tt.type.kind;if(vt!=="string"&&vt!=="value"&&vt!=="null"&&vt!=="resolvedImage")return W.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ke=!0,me.push({content:tt,scale:null,font:null,textColor:null})}}return new ho(me)}evaluate(P){return new bn(this.sections.map(W=>{let oe=W.content.evaluate(P);return Ln(oe)===Jt?new $n("",oe,null,null,null):new $n(ji(oe),null,W.scale?W.scale.evaluate(P):null,W.font?W.font.evaluate(P).join(","):null,W.textColor?W.textColor.evaluate(P):null)}))}eachChild(P){for(let W of this.sections)P(W.content),W.scale&&P(W.scale),W.font&&P(W.font),W.textColor&&P(W.textColor)}outputDefined(){return!1}}class ro{constructor(P){this.type=Jt,this.input=P}static parse(P,W){if(P.length!==2)return W.error("Expected two arguments.");let oe=W.parse(P[1],1,ut);return oe?new ro(oe):W.error("No image name provided.")}evaluate(P){let W=this.input.evaluate(P),oe=Jn.fromString(W);return oe&&P.availableImages&&(oe.available=P.availableImages.indexOf(W)>-1),oe}eachChild(P){P(this.input)}outputDefined(){return!1}}class es{constructor(P){this.type=Ne,this.input=P}static parse(P,W){if(P.length!==2)return W.error(`Expected 1 argument, but found ${P.length-1} instead.`);let oe=W.parse(P[1],1);return oe?oe.type.kind!=="array"&&oe.type.kind!=="string"&&oe.type.kind!=="value"?W.error(`Expected argument of type string or array, but found ${Re(oe.type)} instead.`):new es(oe):null}evaluate(P){let W=this.input.evaluate(P);if(typeof W=="string")return[...W].length;if(Array.isArray(W))return W.length;throw new un(`Expected value to be of type string or array, but found ${Re(Ln(W))} instead.`)}eachChild(P){P(this.input)}outputDefined(){return!1}}let Ho=8192;function is(V,P){let W=(180+V[0])/360,oe=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+V[1]*Math.PI/360)))/360,me=Math.pow(2,P.z);return[Math.round(W*me*Ho),Math.round(oe*me*Ho)]}function as(V,P){let W=Math.pow(2,P.z);return[(me=(V[0]/Ho+P.x)/W,360*me-180),(oe=(V[1]/Ho+P.y)/W,360/Math.PI*Math.atan(Math.exp((180-360*oe)*Math.PI/180))-90)];var oe,me}function vs(V,P){V[0]=Math.min(V[0],P[0]),V[1]=Math.min(V[1],P[1]),V[2]=Math.max(V[2],P[0]),V[3]=Math.max(V[3],P[1])}function Yo(V,P){return!(V[0]<=P[0]||V[2]>=P[2]||V[1]<=P[1]||V[3]>=P[3])}function po(V,P,W){let oe=V[0]-P[0],me=V[1]-P[1],ke=V[0]-W[0],Pe=V[1]-W[1];return oe*Pe-ke*me==0&&oe*ke<=0&&me*Pe<=0}function _s(V,P,W,oe){return(me=[oe[0]-W[0],oe[1]-W[1]])[0]*(ke=[P[0]-V[0],P[1]-V[1]])[1]-me[1]*ke[0]!=0&&!(!Xs(V,P,W,oe)||!Xs(W,oe,V,P));var me,ke}function qo(V,P,W){for(let oe of W)for(let me=0;me(me=V)[1]!=(Pe=Ge[tt+1])[1]>me[1]&&me[0]<(Pe[0]-ke[0])*(me[1]-ke[1])/(Pe[1]-ke[1])+ke[0]&&(oe=!oe)}var me,ke,Pe;return oe}function tl(V,P){for(let W of P)if(Io(V,W))return!0;return!1}function ts(V,P){for(let W of V)if(!Io(W,P))return!1;for(let W=0;W0&&Ge<0||Pe<0&&Ge>0}function ps(V,P,W){let oe=[];for(let me=0;meW[2]){let me=.5*oe,ke=V[0]-W[0]>me?-oe:W[0]-V[0]>me?oe:0;ke===0&&(ke=V[0]-W[2]>me?-oe:W[2]-V[0]>me?oe:0),V[0]+=ke}vs(P,V)}function fs(V,P,W,oe){let me=Math.pow(2,oe.z)*Ho,ke=[oe.x*Ho,oe.y*Ho],Pe=[];for(let Ge of V)for(let tt of Ge){let vt=[tt.x+ke[0],tt.y+ke[1]];xl(vt,P,W,me),Pe.push(vt)}return Pe}function Wl(V,P,W,oe){let me=Math.pow(2,oe.z)*Ho,ke=[oe.x*Ho,oe.y*Ho],Pe=[];for(let tt of V){let vt=[];for(let kt of tt){let Gt=[kt.x+ke[0],kt.y+ke[1]];vs(P,Gt),vt.push(Gt)}Pe.push(vt)}if(P[2]-P[0]<=me/2){(Ge=P)[0]=Ge[1]=1/0,Ge[2]=Ge[3]=-1/0;for(let tt of Pe)for(let vt of tt)xl(vt,P,W,me)}var Ge;return Pe}class Ss{constructor(P,W){this.type=ot,this.geojson=P,this.geometries=W}static parse(P,W){if(P.length!==2)return W.error(`'within' expression requires exactly one argument, but found ${P.length-1} instead.`);if(_n(P[1])){let oe=P[1];if(oe.type==="FeatureCollection"){let me=[];for(let ke of oe.features){let{type:Pe,coordinates:Ge}=ke.geometry;Pe==="Polygon"&&me.push(Ge),Pe==="MultiPolygon"&&me.push(...Ge)}if(me.length)return new Ss(oe,{type:"MultiPolygon",coordinates:me})}else if(oe.type==="Feature"){let me=oe.geometry.type;if(me==="Polygon"||me==="MultiPolygon")return new Ss(oe,oe.geometry)}else if(oe.type==="Polygon"||oe.type==="MultiPolygon")return new Ss(oe,oe)}return W.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(P){if(P.geometry()!=null&&P.canonicalID()!=null){if(P.geometryType()==="Point")return function(W,oe){let me=[1/0,1/0,-1/0,-1/0],ke=[1/0,1/0,-1/0,-1/0],Pe=W.canonicalID();if(oe.type==="Polygon"){let Ge=ps(oe.coordinates,ke,Pe),tt=fs(W.geometry(),me,ke,Pe);if(!Yo(me,ke))return!1;for(let vt of tt)if(!Io(vt,Ge))return!1}if(oe.type==="MultiPolygon"){let Ge=ml(oe.coordinates,ke,Pe),tt=fs(W.geometry(),me,ke,Pe);if(!Yo(me,ke))return!1;for(let vt of tt)if(!tl(vt,Ge))return!1}return!0}(P,this.geometries);if(P.geometryType()==="LineString")return function(W,oe){let me=[1/0,1/0,-1/0,-1/0],ke=[1/0,1/0,-1/0,-1/0],Pe=W.canonicalID();if(oe.type==="Polygon"){let Ge=ps(oe.coordinates,ke,Pe),tt=Wl(W.geometry(),me,ke,Pe);if(!Yo(me,ke))return!1;for(let vt of tt)if(!ts(vt,Ge))return!1}if(oe.type==="MultiPolygon"){let Ge=ml(oe.coordinates,ke,Pe),tt=Wl(W.geometry(),me,ke,Pe);if(!Yo(me,ke))return!1;for(let vt of tt)if(!qs(vt,Ge))return!1}return!0}(P,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let ls=class{constructor(V=[],P=(W,oe)=>Woe?1:0){if(this.data=V,this.length=this.data.length,this.compare=P,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(V){this.data.push(V),this._up(this.length++)}pop(){if(this.length===0)return;let V=this.data[0],P=this.data.pop();return--this.length>0&&(this.data[0]=P,this._down(0)),V}peek(){return this.data[0]}_up(V){let{data:P,compare:W}=this,oe=P[V];for(;V>0;){let me=V-1>>1,ke=P[me];if(W(oe,ke)>=0)break;P[V]=ke,V=me}P[V]=oe}_down(V){let{data:P,compare:W}=this,oe=this.length>>1,me=P[V];for(;V=0)break;P[V]=P[ke],V=ke}P[V]=me}};function No(V,P,W,oe,me){Do(V,P,W,oe||V.length-1,me||Jl)}function Do(V,P,W,oe,me){for(;oe>W;){if(oe-W>600){var ke=oe-W+1,Pe=P-W+1,Ge=Math.log(ke),tt=.5*Math.exp(2*Ge/3),vt=.5*Math.sqrt(Ge*tt*(ke-tt)/ke)*(Pe-ke/2<0?-1:1);Do(V,P,Math.max(W,Math.floor(P-Pe*tt/ke+vt)),Math.min(oe,Math.floor(P+(ke-Pe)*tt/ke+vt)),me)}var kt=V[P],Gt=W,tr=oe;for(hs(V,W,P),me(V[oe],kt)>0&&hs(V,W,oe);Gt0;)tr--}me(V[W],kt)===0?hs(V,W,tr):hs(V,++tr,oe),tr<=P&&(W=tr+1),P<=tr&&(oe=tr-1)}}function hs(V,P,W){var oe=V[P];V[P]=V[W],V[W]=oe}function Jl(V,P){return VP?1:0}function du(V,P){if(V.length<=1)return[V];let W=[],oe,me;for(let ke of V){let Pe=Ou(ke);Pe!==0&&(ke.area=Math.abs(Pe),me===void 0&&(me=Pe<0),me===Pe<0?(oe&&W.push(oe),oe=[ke]):oe.push(ke))}if(oe&&W.push(oe),P>1)for(let ke=0;ke1?(vt=P[tt+1][0],kt=P[tt+1][1]):lr>0&&(vt+=Gt/this.kx*lr,kt+=tr/this.ky*lr)),Gt=this.wrap(W[0]-vt)*this.kx,tr=(W[1]-kt)*this.ky;let xr=Gt*Gt+tr*tr;xr180;)P-=360;return P}}function _c(V,P){return P[0]-V[0]}function vu(V){return V[1]-V[0]+1}function pu(V,P){return V[1]>=V[0]&&V[1]V[1])return[null,null];let W=vu(V);if(P){if(W===2)return[V,null];let me=Math.floor(W/2);return[[V[0],V[0]+me],[V[0]+me,V[1]]]}if(W===1)return[V,null];let oe=Math.floor(W/2)-1;return[[V[0],V[0]+oe],[V[0]+oe+1,V[1]]]}function eu(V,P){if(!pu(P,V.length))return[1/0,1/0,-1/0,-1/0];let W=[1/0,1/0,-1/0,-1/0];for(let oe=P[0];oe<=P[1];++oe)vs(W,V[oe]);return W}function Vs(V){let P=[1/0,1/0,-1/0,-1/0];for(let W of V)for(let oe of W)vs(P,oe);return P}function os(V){return V[0]!==-1/0&&V[1]!==-1/0&&V[2]!==1/0&&V[3]!==1/0}function sl(V,P,W){if(!os(V)||!os(P))return NaN;let oe=0,me=0;return V[2]P[2]&&(oe=V[0]-P[2]),V[1]>P[3]&&(me=V[1]-P[3]),V[3]=oe)return oe;if(Yo(me,ke)){if(Mf(V,P))return 0}else if(Mf(P,V))return 0;let Pe=1/0;for(let Ge of V)for(let tt=0,vt=Ge.length,kt=vt-1;tt0;){let tt=Pe.pop();if(tt[0]>=ke)continue;let vt=tt[1],kt=P?50:100;if(vu(vt)<=kt){if(!pu(vt,V.length))return NaN;if(P){let Gt=Xo(V,vt,W,oe);if(isNaN(Gt)||Gt===0)return Gt;ke=Math.min(ke,Gt)}else for(let Gt=vt[0];Gt<=vt[1];++Gt){let tr=Af(V[Gt],W,oe);if(ke=Math.min(ke,tr),ke===0)return 0}}else{let Gt=mu(vt,P);so(Pe,ke,oe,V,Ge,Gt[0]),so(Pe,ke,oe,V,Ge,Gt[1])}}return ke}function Ll(V,P,W,oe,me,ke=1/0){let Pe=Math.min(ke,me.distance(V[0],W[0]));if(Pe===0)return Pe;let Ge=new ls([[0,[0,V.length-1],[0,W.length-1]]],_c);for(;Ge.length>0;){let tt=Ge.pop();if(tt[0]>=Pe)continue;let vt=tt[1],kt=tt[2],Gt=P?50:100,tr=oe?50:100;if(vu(vt)<=Gt&&vu(kt)<=tr){if(!pu(vt,V.length)&&pu(kt,W.length))return NaN;let lr;if(P&&oe)lr=bc(V,vt,W,kt,me),Pe=Math.min(Pe,lr);else if(P&&!oe){let xr=V.slice(vt[0],vt[1]+1);for(let Dr=kt[0];Dr<=kt[1];++Dr)if(lr=Tu(W[Dr],xr,me),Pe=Math.min(Pe,lr),Pe===0)return Pe}else if(!P&&oe){let xr=W.slice(kt[0],kt[1]+1);for(let Dr=vt[0];Dr<=vt[1];++Dr)if(lr=Tu(V[Dr],xr,me),Pe=Math.min(Pe,lr),Pe===0)return Pe}else lr=Hs(V,vt,W,kt,me),Pe=Math.min(Pe,lr)}else{let lr=mu(vt,P),xr=mu(kt,oe);qu(Ge,Pe,me,V,W,lr[0],xr[0]),qu(Ge,Pe,me,V,W,lr[0],xr[1]),qu(Ge,Pe,me,V,W,lr[1],xr[0]),qu(Ge,Pe,me,V,W,lr[1],xr[1])}}return Pe}function Qc(V){return V.type==="MultiPolygon"?V.coordinates.map(P=>({type:"Polygon",coordinates:P})):V.type==="MultiLineString"?V.coordinates.map(P=>({type:"LineString",coordinates:P})):V.type==="MultiPoint"?V.coordinates.map(P=>({type:"Point",coordinates:P})):[V]}class Au{constructor(P,W){this.type=Ne,this.geojson=P,this.geometries=W}static parse(P,W){if(P.length!==2)return W.error(`'distance' expression requires exactly one argument, but found ${P.length-1} instead.`);if(_n(P[1])){let oe=P[1];if(oe.type==="FeatureCollection")return new Au(oe,oe.features.map(me=>Qc(me.geometry)).flat());if(oe.type==="Feature")return new Au(oe,Qc(oe.geometry));if("type"in oe&&"coordinates"in oe)return new Au(oe,Qc(oe))}return W.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(P){if(P.geometry()!=null&&P.canonicalID()!=null){if(P.geometryType()==="Point")return function(W,oe){let me=W.geometry(),ke=me.flat().map(tt=>as([tt.x,tt.y],W.canonical));if(me.length===0)return NaN;let Pe=new fc(ke[0][1]),Ge=1/0;for(let tt of oe){switch(tt.type){case"Point":Ge=Math.min(Ge,Ll(ke,!1,[tt.coordinates],!1,Pe,Ge));break;case"LineString":Ge=Math.min(Ge,Ll(ke,!1,tt.coordinates,!0,Pe,Ge));break;case"Polygon":Ge=Math.min(Ge,hc(ke,!1,tt.coordinates,Pe,Ge))}if(Ge===0)return Ge}return Ge}(P,this.geometries);if(P.geometryType()==="LineString")return function(W,oe){let me=W.geometry(),ke=me.flat().map(tt=>as([tt.x,tt.y],W.canonical));if(me.length===0)return NaN;let Pe=new fc(ke[0][1]),Ge=1/0;for(let tt of oe){switch(tt.type){case"Point":Ge=Math.min(Ge,Ll(ke,!0,[tt.coordinates],!1,Pe,Ge));break;case"LineString":Ge=Math.min(Ge,Ll(ke,!0,tt.coordinates,!0,Pe,Ge));break;case"Polygon":Ge=Math.min(Ge,hc(ke,!0,tt.coordinates,Pe,Ge))}if(Ge===0)return Ge}return Ge}(P,this.geometries);if(P.geometryType()==="Polygon")return function(W,oe){let me=W.geometry();if(me.length===0||me[0].length===0)return NaN;let ke=du(me,0).map(tt=>tt.map(vt=>vt.map(kt=>as([kt.x,kt.y],W.canonical)))),Pe=new fc(ke[0][0][0][1]),Ge=1/0;for(let tt of oe)for(let vt of ke){switch(tt.type){case"Point":Ge=Math.min(Ge,hc([tt.coordinates],!1,vt,Pe,Ge));break;case"LineString":Ge=Math.min(Ge,hc(tt.coordinates,!0,vt,Pe,Ge));break;case"Polygon":Ge=Math.min(Ge,ns(vt,tt.coordinates,Pe,Ge))}if(Ge===0)return Ge}return Ge}(P,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let Zu={"==":co,"!=":Ro,">":Co,"<":ao,">=":Po,"<=":Wo,array:nt,at:xt,boolean:nt,case:jr,coalesce:yo,collator:vi,format:ho,image:ro,in:Vt,"index-of":er,interpolate:ai,"interpolate-hcl":ai,"interpolate-lab":ai,length:es,let:rr,literal:Zi,match:Tr,number:nt,"number-format":zi,object:nt,slice:Fr,step:ra,string:nt,"to-boolean":Qt,"to-color":Qt,"to-number":Qt,"to-string":Qt,var:Ze,within:Ss,distance:Au};class ll{constructor(P,W,oe,me){this.name=P,this.type=W,this._evaluate=oe,this.args=me}evaluate(P){return this._evaluate(P,this.args)}eachChild(P){this.args.forEach(P)}outputDefined(){return!1}static parse(P,W){let oe=P[0],me=ll.definitions[oe];if(!me)return W.error(`Unknown expression "${oe}". If you wanted a literal array, use ["literal", [...]].`,0);let ke=Array.isArray(me)?me[0]:me.type,Pe=Array.isArray(me)?[[me[1],me[2]]]:me.overloads,Ge=Pe.filter(([vt])=>!Array.isArray(vt)||vt.length===P.length-1),tt=null;for(let[vt,kt]of Ge){tt=new cr(W.registry,Bc,W.path,null,W.scope);let Gt=[],tr=!1;for(let lr=1;lr{return tr=Gt,Array.isArray(tr)?`(${tr.map(Re).join(", ")})`:`(${Re(tr.type)}...)`;var tr}).join(" | "),kt=[];for(let Gt=1;Gt{W=P?W&&Bc(oe):W&&oe instanceof Zi}),!!W&&Nc(V)&&xc(V,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Nc(V){if(V instanceof ll&&(V.name==="get"&&V.args.length===1||V.name==="feature-state"||V.name==="has"&&V.args.length===1||V.name==="properties"||V.name==="geometry-type"||V.name==="id"||/^filter-/.test(V.name))||V instanceof Ss||V instanceof Au)return!1;let P=!0;return V.eachChild(W=>{P&&!Nc(W)&&(P=!1)}),P}function tu(V){if(V instanceof ll&&V.name==="feature-state")return!1;let P=!0;return V.eachChild(W=>{P&&!tu(W)&&(P=!1)}),P}function xc(V,P){if(V instanceof ll&&P.indexOf(V.name)>=0)return!1;let W=!0;return V.eachChild(oe=>{W&&!xc(oe,P)&&(W=!1)}),W}function ru(V){return{result:"success",value:V}}function Qu(V){return{result:"error",value:V}}function $s(V){return V["property-type"]==="data-driven"||V["property-type"]==="cross-faded-data-driven"}function ec(V){return!!V.expression&&V.expression.parameters.indexOf("zoom")>-1}function Iu(V){return!!V.expression&&V.expression.interpolated}function us(V){return V instanceof Number?"number":V instanceof String?"string":V instanceof Boolean?"boolean":Array.isArray(V)?"array":V===null?"null":typeof V}function wc(V){return typeof V=="object"&&V!==null&&!Array.isArray(V)}function Sf(V){return V}function tf(V,P){let W=P.type==="color",oe=V.stops&&typeof V.stops[0][0]=="object",me=oe||!(oe||V.property!==void 0),ke=V.type||(Iu(P)?"exponential":"interval");if(W||P.type==="padding"){let kt=W?ka.parse:ci.parse;(V=ne({},V)).stops&&(V.stops=V.stops.map(Gt=>[Gt[0],kt(Gt[1])])),V.default=kt(V.default?V.default:P.default)}if(V.colorSpace&&(Pe=V.colorSpace)!=="rgb"&&Pe!=="hcl"&&Pe!=="lab")throw new Error(`Unknown color space: "${V.colorSpace}"`);var Pe;let Ge,tt,vt;if(ke==="exponential")Ge=Ef;else if(ke==="interval")Ge=Tc;else if(ke==="categorical"){Ge=rf,tt=Object.create(null);for(let kt of V.stops)tt[kt[0]]=kt[1];vt=typeof V.stops[0][0]}else{if(ke!=="identity")throw new Error(`Unknown function type "${ke}"`);Ge=Zs}if(oe){let kt={},Gt=[];for(let xr=0;xrxr[0]),evaluate:({zoom:xr},Dr)=>Ef({stops:tr,base:V.base},P,xr).evaluate(xr,Dr)}}if(me){let kt=ke==="exponential"?{name:"exponential",base:V.base!==void 0?V.base:1}:null;return{kind:"camera",interpolationType:kt,interpolationFactor:ai.interpolationFactor.bind(void 0,kt),zoomStops:V.stops.map(Gt=>Gt[0]),evaluate:({zoom:Gt})=>Ge(V,P,Gt,tt,vt)}}return{kind:"source",evaluate(kt,Gt){let tr=Gt&&Gt.properties?Gt.properties[V.property]:void 0;return tr===void 0?Vu(V.default,P.default):Ge(V,P,tr,tt,vt)}}}function Vu(V,P,W){return V!==void 0?V:P!==void 0?P:W!==void 0?W:void 0}function rf(V,P,W,oe,me){return Vu(typeof W===me?oe[W]:void 0,V.default,P.default)}function Tc(V,P,W){if(us(W)!=="number")return Vu(V.default,P.default);let oe=V.stops.length;if(oe===1||W<=V.stops[0][0])return V.stops[0][1];if(W>=V.stops[oe-1][0])return V.stops[oe-1][1];let me=kr(V.stops.map(ke=>ke[0]),W);return V.stops[me][1]}function Ef(V,P,W){let oe=V.base!==void 0?V.base:1;if(us(W)!=="number")return Vu(V.default,P.default);let me=V.stops.length;if(me===1||W<=V.stops[0][0])return V.stops[0][1];if(W>=V.stops[me-1][0])return V.stops[me-1][1];let ke=kr(V.stops.map(kt=>kt[0]),W),Pe=function(kt,Gt,tr,lr){let xr=lr-tr,Dr=kt-tr;return xr===0?0:Gt===1?Dr/xr:(Math.pow(Gt,Dr)-1)/(Math.pow(Gt,xr)-1)}(W,oe,V.stops[ke][0],V.stops[ke+1][0]),Ge=V.stops[ke][1],tt=V.stops[ke+1][1],vt=Si[P.type]||Sf;return typeof Ge.evaluate=="function"?{evaluate(...kt){let Gt=Ge.evaluate.apply(void 0,kt),tr=tt.evaluate.apply(void 0,kt);if(Gt!==void 0&&tr!==void 0)return vt(Gt,tr,Pe,V.colorSpace)}}:vt(Ge,tt,Pe,V.colorSpace)}function Zs(V,P,W){switch(P.type){case"color":W=ka.parse(W);break;case"formatted":W=bn.fromString(W.toString());break;case"resolvedImage":W=Jn.fromString(W.toString());break;case"padding":W=ci.parse(W);break;default:us(W)===P.type||P.type==="enum"&&P.values[W]||(W=void 0)}return Vu(W,V.default,P.default)}ll.register(Zu,{error:[{kind:"error"},[ut],(V,[P])=>{throw new un(P.evaluate(V))}],typeof:[ut,[It],(V,[P])=>Re(Ln(P.evaluate(V)))],"to-rgba":[Ee(Ne,4),[yt],(V,[P])=>{let[W,oe,me,ke]=P.evaluate(V).rgb;return[255*W,255*oe,255*me,ke]}],rgb:[yt,[Ne,Ne,Ne],ef],rgba:[yt,[Ne,Ne,Ne,Ne],ef],has:{type:ot,overloads:[[[ut],(V,[P])=>zc(P.evaluate(V),V.properties())],[[ut,At],(V,[P,W])=>zc(P.evaluate(V),W.evaluate(V))]]},get:{type:It,overloads:[[[ut],(V,[P])=>Ku(P.evaluate(V),V.properties())],[[ut,At],(V,[P,W])=>Ku(P.evaluate(V),W.evaluate(V))]]},"feature-state":[It,[ut],(V,[P])=>Ku(P.evaluate(V),V.featureState||{})],properties:[At,[],V=>V.properties()],"geometry-type":[ut,[],V=>V.geometryType()],id:[It,[],V=>V.id()],zoom:[Ne,[],V=>V.globals.zoom],"heatmap-density":[Ne,[],V=>V.globals.heatmapDensity||0],"line-progress":[Ne,[],V=>V.globals.lineProgress||0],accumulated:[It,[],V=>V.globals.accumulated===void 0?null:V.globals.accumulated],"+":[Ne,Ju(Ne),(V,P)=>{let W=0;for(let oe of P)W+=oe.evaluate(V);return W}],"*":[Ne,Ju(Ne),(V,P)=>{let W=1;for(let oe of P)W*=oe.evaluate(V);return W}],"-":{type:Ne,overloads:[[[Ne,Ne],(V,[P,W])=>P.evaluate(V)-W.evaluate(V)],[[Ne],(V,[P])=>-P.evaluate(V)]]},"/":[Ne,[Ne,Ne],(V,[P,W])=>P.evaluate(V)/W.evaluate(V)],"%":[Ne,[Ne,Ne],(V,[P,W])=>P.evaluate(V)%W.evaluate(V)],ln2:[Ne,[],()=>Math.LN2],pi:[Ne,[],()=>Math.PI],e:[Ne,[],()=>Math.E],"^":[Ne,[Ne,Ne],(V,[P,W])=>Math.pow(P.evaluate(V),W.evaluate(V))],sqrt:[Ne,[Ne],(V,[P])=>Math.sqrt(P.evaluate(V))],log10:[Ne,[Ne],(V,[P])=>Math.log(P.evaluate(V))/Math.LN10],ln:[Ne,[Ne],(V,[P])=>Math.log(P.evaluate(V))],log2:[Ne,[Ne],(V,[P])=>Math.log(P.evaluate(V))/Math.LN2],sin:[Ne,[Ne],(V,[P])=>Math.sin(P.evaluate(V))],cos:[Ne,[Ne],(V,[P])=>Math.cos(P.evaluate(V))],tan:[Ne,[Ne],(V,[P])=>Math.tan(P.evaluate(V))],asin:[Ne,[Ne],(V,[P])=>Math.asin(P.evaluate(V))],acos:[Ne,[Ne],(V,[P])=>Math.acos(P.evaluate(V))],atan:[Ne,[Ne],(V,[P])=>Math.atan(P.evaluate(V))],min:[Ne,Ju(Ne),(V,P)=>Math.min(...P.map(W=>W.evaluate(V)))],max:[Ne,Ju(Ne),(V,P)=>Math.max(...P.map(W=>W.evaluate(V)))],abs:[Ne,[Ne],(V,[P])=>Math.abs(P.evaluate(V))],round:[Ne,[Ne],(V,[P])=>{let W=P.evaluate(V);return W<0?-Math.round(-W):Math.round(W)}],floor:[Ne,[Ne],(V,[P])=>Math.floor(P.evaluate(V))],ceil:[Ne,[Ne],(V,[P])=>Math.ceil(P.evaluate(V))],"filter-==":[ot,[ut,It],(V,[P,W])=>V.properties()[P.value]===W.value],"filter-id-==":[ot,[It],(V,[P])=>V.id()===P.value],"filter-type-==":[ot,[ut],(V,[P])=>V.geometryType()===P.value],"filter-<":[ot,[ut,It],(V,[P,W])=>{let oe=V.properties()[P.value],me=W.value;return typeof oe==typeof me&&oe{let W=V.id(),oe=P.value;return typeof W==typeof oe&&W":[ot,[ut,It],(V,[P,W])=>{let oe=V.properties()[P.value],me=W.value;return typeof oe==typeof me&&oe>me}],"filter-id->":[ot,[It],(V,[P])=>{let W=V.id(),oe=P.value;return typeof W==typeof oe&&W>oe}],"filter-<=":[ot,[ut,It],(V,[P,W])=>{let oe=V.properties()[P.value],me=W.value;return typeof oe==typeof me&&oe<=me}],"filter-id-<=":[ot,[It],(V,[P])=>{let W=V.id(),oe=P.value;return typeof W==typeof oe&&W<=oe}],"filter->=":[ot,[ut,It],(V,[P,W])=>{let oe=V.properties()[P.value],me=W.value;return typeof oe==typeof me&&oe>=me}],"filter-id->=":[ot,[It],(V,[P])=>{let W=V.id(),oe=P.value;return typeof W==typeof oe&&W>=oe}],"filter-has":[ot,[It],(V,[P])=>P.value in V.properties()],"filter-has-id":[ot,[],V=>V.id()!==null&&V.id()!==void 0],"filter-type-in":[ot,[Ee(ut)],(V,[P])=>P.value.indexOf(V.geometryType())>=0],"filter-id-in":[ot,[Ee(It)],(V,[P])=>P.value.indexOf(V.id())>=0],"filter-in-small":[ot,[ut,Ee(It)],(V,[P,W])=>W.value.indexOf(V.properties()[P.value])>=0],"filter-in-large":[ot,[ut,Ee(It)],(V,[P,W])=>function(oe,me,ke,Pe){for(;ke<=Pe;){let Ge=ke+Pe>>1;if(me[Ge]===oe)return!0;me[Ge]>oe?Pe=Ge-1:ke=Ge+1}return!1}(V.properties()[P.value],W.value,0,W.value.length-1)],all:{type:ot,overloads:[[[ot,ot],(V,[P,W])=>P.evaluate(V)&&W.evaluate(V)],[Ju(ot),(V,P)=>{for(let W of P)if(!W.evaluate(V))return!1;return!0}]]},any:{type:ot,overloads:[[[ot,ot],(V,[P,W])=>P.evaluate(V)||W.evaluate(V)],[Ju(ot),(V,P)=>{for(let W of P)if(W.evaluate(V))return!0;return!1}]]},"!":[ot,[ot],(V,[P])=>!P.evaluate(V)],"is-supported-script":[ot,[ut],(V,[P])=>{let W=V.globals&&V.globals.isSupportedScript;return!W||W(P.evaluate(V))}],upcase:[ut,[ut],(V,[P])=>P.evaluate(V).toUpperCase()],downcase:[ut,[ut],(V,[P])=>P.evaluate(V).toLowerCase()],concat:[ut,Ju(It),(V,P)=>P.map(W=>ji(W.evaluate(V))).join("")],"resolved-locale":[ut,[Zt],(V,[P])=>P.evaluate(V).resolvedLocale()]});class au{constructor(P,W){var oe;this.expression=P,this._warningHistory={},this._evaluator=new nr,this._defaultValue=W?(oe=W).type==="color"&&wc(oe.default)?new ka(0,0,0,0):oe.type==="color"?ka.parse(oe.default)||null:oe.type==="padding"?ci.parse(oe.default)||null:oe.type==="variableAnchorOffsetCollection"?Pi.parse(oe.default)||null:oe.default===void 0?null:oe.default:null,this._enumValues=W&&W.type==="enum"?W.values:null}evaluateWithoutErrorHandling(P,W,oe,me,ke,Pe){return this._evaluator.globals=P,this._evaluator.feature=W,this._evaluator.featureState=oe,this._evaluator.canonical=me,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Pe,this.expression.evaluate(this._evaluator)}evaluate(P,W,oe,me,ke,Pe){this._evaluator.globals=P,this._evaluator.feature=W||null,this._evaluator.featureState=oe||null,this._evaluator.canonical=me,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Pe||null;try{let Ge=this.expression.evaluate(this._evaluator);if(Ge==null||typeof Ge=="number"&&Ge!=Ge)return this._defaultValue;if(this._enumValues&&!(Ge in this._enumValues))throw new un(`Expected value to be one of ${Object.keys(this._enumValues).map(tt=>JSON.stringify(tt)).join(", ")}, but found ${JSON.stringify(Ge)} instead.`);return Ge}catch(Ge){return this._warningHistory[Ge.message]||(this._warningHistory[Ge.message]=!0,typeof console<"u"&&console.warn(Ge.message)),this._defaultValue}}}function af(V){return Array.isArray(V)&&V.length>0&&typeof V[0]=="string"&&V[0]in Zu}function Fs(V,P){let W=new cr(Zu,Bc,[],P?function(me){let ke={color:yt,string:ut,number:Ne,enum:ut,boolean:ot,formatted:vr,padding:Ut,resolvedImage:Jt,variableAnchorOffsetCollection:at};return me.type==="array"?Ee(ke[me.value]||It,me.length):ke[me.type]}(P):void 0),oe=W.parse(V,void 0,void 0,void 0,P&&P.type==="string"?{typeAnnotation:"coerce"}:void 0);return oe?ru(new au(oe,P)):Qu(W.errors)}class Du{constructor(P,W){this.kind=P,this._styleExpression=W,this.isStateDependent=P!=="constant"&&!tu(W.expression)}evaluateWithoutErrorHandling(P,W,oe,me,ke,Pe){return this._styleExpression.evaluateWithoutErrorHandling(P,W,oe,me,ke,Pe)}evaluate(P,W,oe,me,ke,Pe){return this._styleExpression.evaluate(P,W,oe,me,ke,Pe)}}class Nl{constructor(P,W,oe,me){this.kind=P,this.zoomStops=oe,this._styleExpression=W,this.isStateDependent=P!=="camera"&&!tu(W.expression),this.interpolationType=me}evaluateWithoutErrorHandling(P,W,oe,me,ke,Pe){return this._styleExpression.evaluateWithoutErrorHandling(P,W,oe,me,ke,Pe)}evaluate(P,W,oe,me,ke,Pe){return this._styleExpression.evaluate(P,W,oe,me,ke,Pe)}interpolationFactor(P,W,oe){return this.interpolationType?ai.interpolationFactor(this.interpolationType,P,W,oe):0}}function Hu(V,P){let W=Fs(V,P);if(W.result==="error")return W;let oe=W.value.expression,me=Nc(oe);if(!me&&!$s(P))return Qu([new be("","data expressions not supported")]);let ke=xc(oe,["zoom"]);if(!ke&&!ec(P))return Qu([new be("","zoom expressions not supported")]);let Pe=Oc(oe);return Pe||ke?Pe instanceof be?Qu([Pe]):Pe instanceof ai&&!Iu(P)?Qu([new be("",'"interpolate" expressions cannot be used with this property')]):ru(Pe?new Nl(me?"camera":"composite",W.value,Pe.labels,Pe instanceof ai?Pe.interpolation:void 0):new Du(me?"constant":"source",W.value)):Qu([new be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class dc{constructor(P,W){this._parameters=P,this._specification=W,ne(this,tf(this._parameters,this._specification))}static deserialize(P){return new dc(P._parameters,P._specification)}static serialize(P){return{_parameters:P._parameters,_specification:P._specification}}}function Oc(V){let P=null;if(V instanceof rr)P=Oc(V.result);else if(V instanceof yo){for(let W of V.args)if(P=Oc(W),P)break}else(V instanceof ra||V instanceof ai)&&V.input instanceof ll&&V.input.name==="zoom"&&(P=V);return P instanceof be||V.eachChild(W=>{let oe=Oc(W);oe instanceof be?P=oe:!P&&oe?P=new be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):P&&oe&&P!==oe&&(P=new be("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),P}function nf(V){if(V===!0||V===!1)return!0;if(!Array.isArray(V)||V.length===0)return!1;switch(V[0]){case"has":return V.length>=2&&V[1]!=="$id"&&V[1]!=="$type";case"in":return V.length>=3&&(typeof V[1]!="string"||Array.isArray(V[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return V.length!==3||Array.isArray(V[1])||Array.isArray(V[2]);case"any":case"all":for(let P of V.slice(1))if(!nf(P)&&typeof P!="boolean")return!1;return!0;default:return!0}}let gu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Ru(V){if(V==null)return{filter:()=>!0,needGeometry:!1};nf(V)||(V=vc(V));let P=Fs(V,gu);if(P.result==="error")throw new Error(P.value.map(W=>`${W.key}: ${W.message}`).join(", "));return{filter:(W,oe,me)=>P.value.evaluate(W,oe,{},me),needGeometry:Xf(V)}}function Mu(V,P){return VP?1:0}function Xf(V){if(!Array.isArray(V))return!1;if(V[0]==="within"||V[0]==="distance")return!0;for(let P=1;P"||P==="<="||P===">="?kf(V[1],V[2],P):P==="any"?(W=V.slice(1),["any"].concat(W.map(vc))):P==="all"?["all"].concat(V.slice(1).map(vc)):P==="none"?["all"].concat(V.slice(1).map(vc).map(rl)):P==="in"?Yl(V[1],V.slice(2)):P==="!in"?rl(Yl(V[1],V.slice(2))):P==="has"?tc(V[1]):P!=="!has"||rl(tc(V[1]));var W}function kf(V,P,W){switch(V){case"$type":return[`filter-type-${W}`,P];case"$id":return[`filter-id-${W}`,P];default:return[`filter-${W}`,V,P]}}function Yl(V,P){if(P.length===0)return!1;switch(V){case"$type":return["filter-type-in",["literal",P]];case"$id":return["filter-id-in",["literal",P]];default:return P.length>200&&!P.some(W=>typeof W!=typeof P[0])?["filter-in-large",V,["literal",P.sort(Mu)]]:["filter-in-small",V,["literal",P]]}}function tc(V){switch(V){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",V]}}function rl(V){return["!",V]}function Gu(V){let P=typeof V;if(P==="number"||P==="boolean"||P==="string"||V==null)return JSON.stringify(V);if(Array.isArray(V)){let me="[";for(let ke of V)me+=`${Gu(ke)},`;return`${me}]`}let W=Object.keys(V).sort(),oe="{";for(let me=0;meoe.maximum?[new se(P,W,`${W} is greater than the maximum value ${oe.maximum}`)]:[]}function rc(V){let P=V.valueSpec,W=ws(V.value.type),oe,me,ke,Pe={},Ge=W!=="categorical"&&V.value.property===void 0,tt=!Ge,vt=us(V.value.stops)==="array"&&us(V.value.stops[0])==="array"&&us(V.value.stops[0][0])==="object",kt=Ol({key:V.key,value:V.value,valueSpec:V.styleSpec.function,validateSpec:V.validateSpec,style:V.style,styleSpec:V.styleSpec,objectElementValidators:{stops:function(lr){if(W==="identity")return[new se(lr.key,lr.value,'identity function may not have a "stops" property')];let xr=[],Dr=lr.value;return xr=xr.concat(jc({key:lr.key,value:Dr,valueSpec:lr.valueSpec,validateSpec:lr.validateSpec,style:lr.style,styleSpec:lr.styleSpec,arrayElementValidator:Gt})),us(Dr)==="array"&&Dr.length===0&&xr.push(new se(lr.key,Dr,"array must have at least one stop")),xr},default:function(lr){return lr.validateSpec({key:lr.key,value:lr.value,valueSpec:P,validateSpec:lr.validateSpec,style:lr.style,styleSpec:lr.styleSpec})}}});return W==="identity"&&Ge&&kt.push(new se(V.key,V.value,'missing required property "property"')),W==="identity"||V.value.stops||kt.push(new se(V.key,V.value,'missing required property "stops"')),W==="exponential"&&V.valueSpec.expression&&!Iu(V.valueSpec)&&kt.push(new se(V.key,V.value,"exponential functions not supported")),V.styleSpec.$version>=8&&(tt&&!$s(V.valueSpec)?kt.push(new se(V.key,V.value,"property functions not supported")):Ge&&!ec(V.valueSpec)&&kt.push(new se(V.key,V.value,"zoom functions not supported"))),W!=="categorical"&&!vt||V.value.property!==void 0||kt.push(new se(V.key,V.value,'"property" property is required')),kt;function Gt(lr){let xr=[],Dr=lr.value,sa=lr.key;if(us(Dr)!=="array")return[new se(sa,Dr,`array expected, ${us(Dr)} found`)];if(Dr.length!==2)return[new se(sa,Dr,`array length 2 expected, length ${Dr.length} found`)];if(vt){if(us(Dr[0])!=="object")return[new se(sa,Dr,`object expected, ${us(Dr[0])} found`)];if(Dr[0].zoom===void 0)return[new se(sa,Dr,"object stop key must have zoom")];if(Dr[0].value===void 0)return[new se(sa,Dr,"object stop key must have value")];if(ke&&ke>ws(Dr[0].zoom))return[new se(sa,Dr[0].zoom,"stop zoom values must appear in ascending order")];ws(Dr[0].zoom)!==ke&&(ke=ws(Dr[0].zoom),me=void 0,Pe={}),xr=xr.concat(Ol({key:`${sa}[0]`,value:Dr[0],valueSpec:{zoom:{}},validateSpec:lr.validateSpec,style:lr.style,styleSpec:lr.styleSpec,objectElementValidators:{zoom:qc,value:tr}}))}else xr=xr.concat(tr({key:`${sa}[0]`,value:Dr[0],valueSpec:{},validateSpec:lr.validateSpec,style:lr.style,styleSpec:lr.styleSpec},Dr));return af(Pl(Dr[1]))?xr.concat([new se(`${sa}[1]`,Dr[1],"expressions are not allowed in function stops.")]):xr.concat(lr.validateSpec({key:`${sa}[1]`,value:Dr[1],valueSpec:P,validateSpec:lr.validateSpec,style:lr.style,styleSpec:lr.styleSpec}))}function tr(lr,xr){let Dr=us(lr.value),sa=ws(lr.value),ga=lr.value!==null?lr.value:xr;if(oe){if(Dr!==oe)return[new se(lr.key,ga,`${Dr} stop domain type must match previous stop domain type ${oe}`)]}else oe=Dr;if(Dr!=="number"&&Dr!=="string"&&Dr!=="boolean")return[new se(lr.key,ga,"stop domain value must be a number, string, or boolean")];if(Dr!=="number"&&W!=="categorical"){let cn=`number expected, ${Dr} found`;return $s(P)&&W===void 0&&(cn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new se(lr.key,ga,cn)]}return W!=="categorical"||Dr!=="number"||isFinite(sa)&&Math.floor(sa)===sa?W!=="categorical"&&Dr==="number"&&me!==void 0&&sanew se(`${V.key}${oe.key}`,V.value,oe.message));let W=P.value.expression||P.value._styleExpression.expression;if(V.expressionContext==="property"&&V.propertyKey==="text-font"&&!W.outputDefined())return[new se(V.key,V.value,`Invalid data expression for "${V.propertyKey}". Output values must be contained as literals within the expression.`)];if(V.expressionContext==="property"&&V.propertyType==="layout"&&!tu(W))return[new se(V.key,V.value,'"feature-state" data expressions are not supported with layout properties.')];if(V.expressionContext==="filter"&&!tu(W))return[new se(V.key,V.value,'"feature-state" data expressions are not supported with filters.')];if(V.expressionContext&&V.expressionContext.indexOf("cluster")===0){if(!xc(W,["zoom","feature-state"]))return[new se(V.key,V.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(V.expressionContext==="cluster-initial"&&!Nc(W))return[new se(V.key,V.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function nu(V){let P=V.key,W=V.value,oe=V.valueSpec,me=[];return Array.isArray(oe.values)?oe.values.indexOf(ws(W))===-1&&me.push(new se(P,W,`expected one of [${oe.values.join(", ")}], ${JSON.stringify(W)} found`)):Object.keys(oe.values).indexOf(ws(W))===-1&&me.push(new se(P,W,`expected one of [${Object.keys(oe.values).join(", ")}], ${JSON.stringify(W)} found`)),me}function Ac(V){return nf(Pl(V.value))?ac(ne({},V,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Wu(V)}function Wu(V){let P=V.value,W=V.key;if(us(P)!=="array")return[new se(W,P,`array expected, ${us(P)} found`)];let oe=V.styleSpec,me,ke=[];if(P.length<1)return[new se(W,P,"filter array must have at least 1 element")];switch(ke=ke.concat(nu({key:`${W}[0]`,value:P[0],valueSpec:oe.filter_operator,style:V.style,styleSpec:V.styleSpec})),ws(P[0])){case"<":case"<=":case">":case">=":P.length>=2&&ws(P[1])==="$type"&&ke.push(new se(W,P,`"$type" cannot be use with operator "${P[0]}"`));case"==":case"!=":P.length!==3&&ke.push(new se(W,P,`filter array for operator "${P[0]}" must have 3 elements`));case"in":case"!in":P.length>=2&&(me=us(P[1]),me!=="string"&&ke.push(new se(`${W}[1]`,P[1],`string expected, ${me} found`)));for(let Pe=2;Pe{vt in W&&P.push(new se(oe,W[vt],`"${vt}" is prohibited for ref layers`))}),me.layers.forEach(vt=>{ws(vt.id)===Ge&&(tt=vt)}),tt?tt.ref?P.push(new se(oe,W.ref,"ref cannot reference another ref layer")):Pe=ws(tt.type):P.push(new se(oe,W.ref,`ref layer "${Ge}" not found`))}else if(Pe!=="background")if(W.source){let tt=me.sources&&me.sources[W.source],vt=tt&&ws(tt.type);tt?vt==="vector"&&Pe==="raster"?P.push(new se(oe,W.source,`layer "${W.id}" requires a raster source`)):vt!=="raster-dem"&&Pe==="hillshade"?P.push(new se(oe,W.source,`layer "${W.id}" requires a raster-dem source`)):vt==="raster"&&Pe!=="raster"?P.push(new se(oe,W.source,`layer "${W.id}" requires a vector source`)):vt!=="vector"||W["source-layer"]?vt==="raster-dem"&&Pe!=="hillshade"?P.push(new se(oe,W.source,"raster-dem source can only be used with layer type 'hillshade'.")):Pe!=="line"||!W.paint||!W.paint["line-gradient"]||vt==="geojson"&&tt.lineMetrics||P.push(new se(oe,W,`layer "${W.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):P.push(new se(oe,W,`layer "${W.id}" must specify a "source-layer"`)):P.push(new se(oe,W.source,`source "${W.source}" not found`))}else P.push(new se(oe,W,'missing required property "source"'));return P=P.concat(Ol({key:oe,value:W,valueSpec:ke.layer,style:V.style,styleSpec:V.styleSpec,validateSpec:V.validateSpec,objectElementValidators:{"*":()=>[],type:()=>V.validateSpec({key:`${oe}.type`,value:W.type,valueSpec:ke.layer.type,style:V.style,styleSpec:V.styleSpec,validateSpec:V.validateSpec,object:W,objectKey:"type"}),filter:Ac,layout:tt=>Ol({layer:W,key:tt.key,value:tt.value,style:tt.style,styleSpec:tt.styleSpec,validateSpec:tt.validateSpec,objectElementValidators:{"*":vt=>of(ne({layerType:Pe},vt))}}),paint:tt=>Ol({layer:W,key:tt.key,value:tt.value,style:tt.style,styleSpec:tt.styleSpec,validateSpec:tt.validateSpec,objectElementValidators:{"*":vt=>Hc(ne({layerType:Pe},vt))}})}})),P}function Mc(V){let P=V.value,W=V.key,oe=us(P);return oe!=="string"?[new se(W,P,`string expected, ${oe} found`)]:[]}let sf={promoteId:function({key:V,value:P}){if(us(P)==="string")return Mc({key:V,value:P});{let W=[];for(let oe in P)W.push(...Mc({key:`${V}.${oe}`,value:P[oe]}));return W}}};function Sc(V){let P=V.value,W=V.key,oe=V.styleSpec,me=V.style,ke=V.validateSpec;if(!P.type)return[new se(W,P,'"type" is required')];let Pe=ws(P.type),Ge;switch(Pe){case"vector":case"raster":return Ge=Ol({key:W,value:P,valueSpec:oe[`source_${Pe.replace("-","_")}`],style:V.style,styleSpec:oe,objectElementValidators:sf,validateSpec:ke}),Ge;case"raster-dem":return Ge=function(tt){var vt;let kt=(vt=tt.sourceName)!==null&&vt!==void 0?vt:"",Gt=tt.value,tr=tt.styleSpec,lr=tr.source_raster_dem,xr=tt.style,Dr=[],sa=us(Gt);if(Gt===void 0)return Dr;if(sa!=="object")return Dr.push(new se("source_raster_dem",Gt,`object expected, ${sa} found`)),Dr;let ga=ws(Gt.encoding)==="custom",cn=["redFactor","greenFactor","blueFactor","baseShift"],Da=tt.value.encoding?`"${tt.value.encoding}"`:"Default";for(let en in Gt)!ga&&cn.includes(en)?Dr.push(new se(en,Gt[en],`In "${kt}": "${en}" is only valid when "encoding" is set to "custom". ${Da} encoding found`)):lr[en]?Dr=Dr.concat(tt.validateSpec({key:en,value:Gt[en],valueSpec:lr[en],validateSpec:tt.validateSpec,style:xr,styleSpec:tr})):Dr.push(new se(en,Gt[en],`unknown property "${en}"`));return Dr}({sourceName:W,value:P,style:V.style,styleSpec:oe,validateSpec:ke}),Ge;case"geojson":if(Ge=Ol({key:W,value:P,valueSpec:oe.source_geojson,style:me,styleSpec:oe,validateSpec:ke,objectElementValidators:sf}),P.cluster)for(let tt in P.clusterProperties){let[vt,kt]=P.clusterProperties[tt],Gt=typeof vt=="string"?[vt,["accumulated"],["get",tt]]:vt;Ge.push(...ac({key:`${W}.${tt}.map`,value:kt,validateSpec:ke,expressionContext:"cluster-map"})),Ge.push(...ac({key:`${W}.${tt}.reduce`,value:Gt,validateSpec:ke,expressionContext:"cluster-reduce"}))}return Ge;case"video":return Ol({key:W,value:P,valueSpec:oe.source_video,style:me,validateSpec:ke,styleSpec:oe});case"image":return Ol({key:W,value:P,valueSpec:oe.source_image,style:me,validateSpec:ke,styleSpec:oe});case"canvas":return[new se(W,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return nu({key:`${W}.type`,value:P.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:me,validateSpec:ke,styleSpec:oe})}}function wl(V){let P=V.value,W=V.styleSpec,oe=W.light,me=V.style,ke=[],Pe=us(P);if(P===void 0)return ke;if(Pe!=="object")return ke=ke.concat([new se("light",P,`object expected, ${Pe} found`)]),ke;for(let Ge in P){let tt=Ge.match(/^(.*)-transition$/);ke=ke.concat(tt&&oe[tt[1]]&&oe[tt[1]].transition?V.validateSpec({key:Ge,value:P[Ge],valueSpec:W.transition,validateSpec:V.validateSpec,style:me,styleSpec:W}):oe[Ge]?V.validateSpec({key:Ge,value:P[Ge],valueSpec:oe[Ge],validateSpec:V.validateSpec,style:me,styleSpec:W}):[new se(Ge,P[Ge],`unknown property "${Ge}"`)])}return ke}function Su(V){let P=V.value,W=V.styleSpec,oe=W.sky,me=V.style,ke=us(P);if(P===void 0)return[];if(ke!=="object")return[new se("sky",P,`object expected, ${ke} found`)];let Pe=[];for(let Ge in P)Pe=Pe.concat(oe[Ge]?V.validateSpec({key:Ge,value:P[Ge],valueSpec:oe[Ge],style:me,styleSpec:W}):[new se(Ge,P[Ge],`unknown property "${Ge}"`)]);return Pe}function lf(V){let P=V.value,W=V.styleSpec,oe=W.terrain,me=V.style,ke=[],Pe=us(P);if(P===void 0)return ke;if(Pe!=="object")return ke=ke.concat([new se("terrain",P,`object expected, ${Pe} found`)]),ke;for(let Ge in P)ke=ke.concat(oe[Ge]?V.validateSpec({key:Ge,value:P[Ge],valueSpec:oe[Ge],validateSpec:V.validateSpec,style:me,styleSpec:W}):[new se(Ge,P[Ge],`unknown property "${Ge}"`)]);return ke}function Lf(V){let P=[],W=V.value,oe=V.key;if(Array.isArray(W)){let me=[],ke=[];for(let Pe in W)W[Pe].id&&me.includes(W[Pe].id)&&P.push(new se(oe,W,`all the sprites' ids must be unique, but ${W[Pe].id} is duplicated`)),me.push(W[Pe].id),W[Pe].url&&ke.includes(W[Pe].url)&&P.push(new se(oe,W,`all the sprites' URLs must be unique, but ${W[Pe].url} is duplicated`)),ke.push(W[Pe].url),P=P.concat(Ol({key:`${oe}[${Pe}]`,value:W[Pe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:V.validateSpec}));return P}return Mc({key:oe,value:W})}let Ec={"*":()=>[],array:jc,boolean:function(V){let P=V.value,W=V.key,oe=us(P);return oe!=="boolean"?[new se(W,P,`boolean expected, ${oe} found`)]:[]},number:qc,color:function(V){let P=V.key,W=V.value,oe=us(W);return oe!=="string"?[new se(P,W,`color expected, ${oe} found`)]:ka.parse(String(W))?[]:[new se(P,W,`color expected, "${W}" found`)]},constants:Uc,enum:nu,filter:Ac,function:rc,layer:Cf,object:Ol,source:Sc,light:wl,sky:Su,terrain:lf,projection:function(V){let P=V.value,W=V.styleSpec,oe=W.projection,me=V.style,ke=us(P);if(P===void 0)return[];if(ke!=="object")return[new se("projection",P,`object expected, ${ke} found`)];let Pe=[];for(let Ge in P)Pe=Pe.concat(oe[Ge]?V.validateSpec({key:Ge,value:P[Ge],valueSpec:oe[Ge],style:me,styleSpec:W}):[new se(Ge,P[Ge],`unknown property "${Ge}"`)]);return Pe},string:Mc,formatted:function(V){return Mc(V).length===0?[]:ac(V)},resolvedImage:function(V){return Mc(V).length===0?[]:ac(V)},padding:function(V){let P=V.key,W=V.value;if(us(W)==="array"){if(W.length<1||W.length>4)return[new se(P,W,`padding requires 1 to 4 values; ${W.length} values found`)];let oe={type:"number"},me=[];for(let ke=0;ke[]}})),V.constants&&(W=W.concat(Uc({key:"constants",value:V.constants,style:V,styleSpec:P,validateSpec:Fu}))),dr(W)}function _r(V){return function(P){return V(Rr(Hr({},P),{validateSpec:Fu}))}}function dr(V){return[].concat(V).sort((P,W)=>P.line-W.line)}function ea(V){return function(...P){return dr(V.apply(this,P))}}jt.source=ea(_r(Sc)),jt.sprite=ea(_r(Lf)),jt.glyphs=ea(_r(Mt)),jt.light=ea(_r(wl)),jt.sky=ea(_r(Su)),jt.terrain=ea(_r(lf)),jt.layer=ea(_r(Cf)),jt.filter=ea(_r(Ac)),jt.paintProperty=ea(_r(Hc)),jt.layoutProperty=ea(_r(of));let Aa=jt,Ga=Aa.light,fn=Aa.sky,gn=Aa.paintProperty,qn=Aa.layoutProperty;function Wa(V,P){let W=!1;if(P&&P.length)for(let oe of P)V.fire(new $(new Error(oe.message))),W=!0;return W}class $a{constructor(P,W,oe){let me=this.cells=[];if(P instanceof ArrayBuffer){this.arrayBuffer=P;let Pe=new Int32Array(this.arrayBuffer);P=Pe[0],this.d=(W=Pe[1])+2*(oe=Pe[2]);for(let tt=0;tt=Gt[xr+0]&&me>=Gt[xr+1])?(Ge[lr]=!0,Pe.push(kt[lr])):Ge[lr]=!1}}}}_forEachCell(P,W,oe,me,ke,Pe,Ge,tt){let vt=this._convertToCellCoord(P),kt=this._convertToCellCoord(W),Gt=this._convertToCellCoord(oe),tr=this._convertToCellCoord(me);for(let lr=vt;lr<=Gt;lr++)for(let xr=kt;xr<=tr;xr++){let Dr=this.d*xr+lr;if((!tt||tt(this._convertFromCellCoord(lr),this._convertFromCellCoord(xr),this._convertFromCellCoord(lr+1),this._convertFromCellCoord(xr+1)))&&ke.call(this,P,W,oe,me,Dr,Pe,Ge,tt))return}}_convertFromCellCoord(P){return(P-this.padding)/this.scale}_convertToCellCoord(P){return Math.max(0,Math.min(this.d-1,Math.floor(P*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let P=this.cells,W=3+this.cells.length+1+1,oe=0;for(let Pe=0;Pe=0)continue;let Pe=V[ke];me[ke]=sn[W].shallow.indexOf(ke)>=0?Pe:ki(Pe,P)}V instanceof Error&&(me.message=V.message)}if(me.$name)throw new Error("$name property is reserved for worker serialization logic.");return W!=="Object"&&(me.$name=W),me}function Vi(V){if(Ii(V))return V;if(Array.isArray(V))return V.map(Vi);if(typeof V!="object")throw new Error("can't deserialize object of type "+typeof V);let P=Ei(V)||"Object";if(!sn[P])throw new Error(`can't deserialize unregistered class ${P}`);let{klass:W}=sn[P];if(!W)throw new Error(`can't deserialize unregistered class ${P}`);if(W.deserialize)return W.deserialize(V);let oe=Object.create(W.prototype);for(let me of Object.keys(V)){if(me==="$name")continue;let ke=V[me];oe[me]=sn[P].shallow.indexOf(me)>=0?ke:Vi(ke)}return oe}class ni{constructor(){this.first=!0}update(P,W){let oe=Math.floor(P);return this.first?(this.first=!1,this.lastIntegerZoom=oe,this.lastIntegerZoomTime=0,this.lastZoom=P,this.lastFloorZoom=oe,!0):(this.lastFloorZoom>oe?(this.lastIntegerZoom=oe+1,this.lastIntegerZoomTime=W):this.lastFloorZoomV>=128&&V<=255,"Hangul Jamo":V=>V>=4352&&V<=4607,Khmer:V=>V>=6016&&V<=6143,"General Punctuation":V=>V>=8192&&V<=8303,"Letterlike Symbols":V=>V>=8448&&V<=8527,"Number Forms":V=>V>=8528&&V<=8591,"Miscellaneous Technical":V=>V>=8960&&V<=9215,"Control Pictures":V=>V>=9216&&V<=9279,"Optical Character Recognition":V=>V>=9280&&V<=9311,"Enclosed Alphanumerics":V=>V>=9312&&V<=9471,"Geometric Shapes":V=>V>=9632&&V<=9727,"Miscellaneous Symbols":V=>V>=9728&&V<=9983,"Miscellaneous Symbols and Arrows":V=>V>=11008&&V<=11263,"Ideographic Description Characters":V=>V>=12272&&V<=12287,"CJK Symbols and Punctuation":V=>V>=12288&&V<=12351,Katakana:V=>V>=12448&&V<=12543,Kanbun:V=>V>=12688&&V<=12703,"CJK Strokes":V=>V>=12736&&V<=12783,"Enclosed CJK Letters and Months":V=>V>=12800&&V<=13055,"CJK Compatibility":V=>V>=13056&&V<=13311,"Yijing Hexagram Symbols":V=>V>=19904&&V<=19967,"Private Use Area":V=>V>=57344&&V<=63743,"Vertical Forms":V=>V>=65040&&V<=65055,"CJK Compatibility Forms":V=>V>=65072&&V<=65103,"Small Form Variants":V=>V>=65104&&V<=65135,"Halfwidth and Fullwidth Forms":V=>V>=65280&&V<=65519};function no(V){for(let P of V)if(Vo(P.charCodeAt(0)))return!0;return!1}function wo(V){for(let P of V)if(!Jo(P.charCodeAt(0)))return!1;return!0}function Go(V){let P=V.map(W=>{try{return new RegExp(`\\p{sc=${W}}`,"u").source}catch{return null}}).filter(W=>W);return new RegExp(P.join("|"),"u")}let bs=Go(["Arab","Dupl","Mong","Ougr","Syrc"]);function Jo(V){return!bs.test(String.fromCodePoint(V))}let Es=Go(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Vo(V){return!(V!==746&&V!==747&&(V<4352||!(Rn["CJK Compatibility Forms"](V)&&!(V>=65097&&V<=65103)||Rn["CJK Compatibility"](V)||Rn["CJK Strokes"](V)||!(!Rn["CJK Symbols and Punctuation"](V)||V>=12296&&V<=12305||V>=12308&&V<=12319||V===12336)||Rn["Enclosed CJK Letters and Months"](V)||Rn["Ideographic Description Characters"](V)||Rn.Kanbun(V)||Rn.Katakana(V)&&V!==12540||!(!Rn["Halfwidth and Fullwidth Forms"](V)||V===65288||V===65289||V===65293||V>=65306&&V<=65310||V===65339||V===65341||V===65343||V>=65371&&V<=65503||V===65507||V>=65512&&V<=65519)||!(!Rn["Small Form Variants"](V)||V>=65112&&V<=65118||V>=65123&&V<=65126)||Rn["Vertical Forms"](V)||Rn["Yijing Hexagram Symbols"](V)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(V))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(V))||Es.test(String.fromCodePoint(V)))))}function yl(V){return!(Vo(V)||function(P){return!!(Rn["Latin-1 Supplement"](P)&&(P===167||P===169||P===174||P===177||P===188||P===189||P===190||P===215||P===247)||Rn["General Punctuation"](P)&&(P===8214||P===8224||P===8225||P===8240||P===8241||P===8251||P===8252||P===8258||P===8263||P===8264||P===8265||P===8273)||Rn["Letterlike Symbols"](P)||Rn["Number Forms"](P)||Rn["Miscellaneous Technical"](P)&&(P>=8960&&P<=8967||P>=8972&&P<=8991||P>=8996&&P<=9e3||P===9003||P>=9085&&P<=9114||P>=9150&&P<=9165||P===9167||P>=9169&&P<=9179||P>=9186&&P<=9215)||Rn["Control Pictures"](P)&&P!==9251||Rn["Optical Character Recognition"](P)||Rn["Enclosed Alphanumerics"](P)||Rn["Geometric Shapes"](P)||Rn["Miscellaneous Symbols"](P)&&!(P>=9754&&P<=9759)||Rn["Miscellaneous Symbols and Arrows"](P)&&(P>=11026&&P<=11055||P>=11088&&P<=11097||P>=11192&&P<=11243)||Rn["CJK Symbols and Punctuation"](P)||Rn.Katakana(P)||Rn["Private Use Area"](P)||Rn["CJK Compatibility Forms"](P)||Rn["Small Form Variants"](P)||Rn["Halfwidth and Fullwidth Forms"](P)||P===8734||P===8756||P===8757||P>=9984&&P<=10087||P>=10102&&P<=10131||P===65532||P===65533)}(V))}let Ws=Go(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function xs(V){return Ws.test(String.fromCodePoint(V))}function bi(V,P){return!(!P&&xs(V)||V>=2304&&V<=3583||V>=3840&&V<=4255||Rn.Khmer(V))}function ss(V){for(let P of V)if(xs(P.charCodeAt(0)))return!0;return!1}let ms=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(V){this.pluginStatus=V.pluginStatus,this.pluginURL=V.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(V){this.applyArabicShaping=V.applyArabicShaping,this.processBidirectionalText=V.processBidirectionalText,this.processStyledBidirectionalText=V.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class $o{constructor(P,W){this.zoom=P,W?(this.now=W.now,this.fadeDuration=W.fadeDuration,this.zoomHistory=W.zoomHistory,this.transition=W.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ni,this.transition={})}isSupportedScript(P){return function(W,oe){for(let me of W)if(!bi(me.charCodeAt(0),oe))return!1;return!0}(P,ms.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let P=this.zoom,W=P-Math.floor(P),oe=this.crossFadingFactor();return P>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:W+(1-W)*oe}:{fromScale:.5,toScale:1,t:1-(1-oe)*W}}}class ul{constructor(P,W){this.property=P,this.value=W,this.expression=function(oe,me){if(wc(oe))return new dc(oe,me);if(af(oe)){let ke=Hu(oe,me);if(ke.result==="error")throw new Error(ke.value.map(Pe=>`${Pe.key}: ${Pe.message}`).join(", "));return ke.value}{let ke=oe;return me.type==="color"&&typeof oe=="string"?ke=ka.parse(oe):me.type!=="padding"||typeof oe!="number"&&!Array.isArray(oe)?me.type==="variableAnchorOffsetCollection"&&Array.isArray(oe)&&(ke=Pi.parse(oe)):ke=ci.parse(oe),{kind:"constant",evaluate:()=>ke}}}(W===void 0?P.specification.default:W,P.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(P,W,oe){return this.property.possiblyEvaluate(this,P,W,oe)}}class yu{constructor(P){this.property=P,this.value=new ul(P,void 0)}transitioned(P,W){return new zu(this.property,this.value,W,E({},P.transition,this.transition),P.now)}untransitioned(){return new zu(this.property,this.value,null,{},0)}}class iu{constructor(P){this._properties=P,this._values=Object.create(P.defaultTransitionablePropertyValues)}getValue(P){return h(this._values[P].value.value)}setValue(P,W){Object.prototype.hasOwnProperty.call(this._values,P)||(this._values[P]=new yu(this._values[P].property)),this._values[P].value=new ul(this._values[P].property,W===null?void 0:h(W))}getTransition(P){return h(this._values[P].transition)}setTransition(P,W){Object.prototype.hasOwnProperty.call(this._values,P)||(this._values[P]=new yu(this._values[P].property)),this._values[P].transition=h(W)||void 0}serialize(){let P={};for(let W of Object.keys(this._values)){let oe=this.getValue(W);oe!==void 0&&(P[W]=oe);let me=this.getTransition(W);me!==void 0&&(P[`${W}-transition`]=me)}return P}transitioned(P,W){let oe=new Tl(this._properties);for(let me of Object.keys(this._values))oe._values[me]=this._values[me].transitioned(P,W._values[me]);return oe}untransitioned(){let P=new Tl(this._properties);for(let W of Object.keys(this._values))P._values[W]=this._values[W].untransitioned();return P}}class zu{constructor(P,W,oe,me,ke){this.property=P,this.value=W,this.begin=ke+me.delay||0,this.end=this.begin+me.duration||0,P.specification.transition&&(me.delay||me.duration)&&(this.prior=oe)}possiblyEvaluate(P,W,oe){let me=P.now||0,ke=this.value.possiblyEvaluate(P,W,oe),Pe=this.prior;if(Pe){if(me>this.end)return this.prior=null,ke;if(this.value.isDataDriven())return this.prior=null,ke;if(me=1)return 1;let vt=tt*tt,kt=vt*tt;return 4*(tt<.5?kt:3*(tt-vt)+kt-.75)}(Ge))}}return ke}}class Tl{constructor(P){this._properties=P,this._values=Object.create(P.defaultTransitioningPropertyValues)}possiblyEvaluate(P,W,oe){let me=new nc(this._properties);for(let ke of Object.keys(this._values))me._values[ke]=this._values[ke].possiblyEvaluate(P,W,oe);return me}hasTransition(){for(let P of Object.keys(this._values))if(this._values[P].prior)return!0;return!1}}class Eu{constructor(P){this._properties=P,this._values=Object.create(P.defaultPropertyValues)}hasValue(P){return this._values[P].value!==void 0}getValue(P){return h(this._values[P].value)}setValue(P,W){this._values[P]=new ul(this._values[P].property,W===null?void 0:h(W))}serialize(){let P={};for(let W of Object.keys(this._values)){let oe=this.getValue(W);oe!==void 0&&(P[W]=oe)}return P}possiblyEvaluate(P,W,oe){let me=new nc(this._properties);for(let ke of Object.keys(this._values))me._values[ke]=this._values[ke].possiblyEvaluate(P,W,oe);return me}}class Al{constructor(P,W,oe){this.property=P,this.value=W,this.parameters=oe}isConstant(){return this.value.kind==="constant"}constantOr(P){return this.value.kind==="constant"?this.value.value:P}evaluate(P,W,oe,me){return this.property.evaluate(this.value,this.parameters,P,W,oe,me)}}class nc{constructor(P){this._properties=P,this._values=Object.create(P.defaultPossiblyEvaluatedValues)}get(P){return this._values[P]}}class Xi{constructor(P){this.specification=P}possiblyEvaluate(P,W){if(P.isDataDriven())throw new Error("Value should not be data driven");return P.expression.evaluate(W)}interpolate(P,W,oe){let me=Si[this.specification.type];return me?me(P,W,oe):P}}class vo{constructor(P,W){this.specification=P,this.overrides=W}possiblyEvaluate(P,W,oe,me){return new Al(this,P.expression.kind==="constant"||P.expression.kind==="camera"?{kind:"constant",value:P.expression.evaluate(W,null,{},oe,me)}:P.expression,W)}interpolate(P,W,oe){if(P.value.kind!=="constant"||W.value.kind!=="constant")return P;if(P.value.value===void 0||W.value.value===void 0)return new Al(this,{kind:"constant",value:void 0},P.parameters);let me=Si[this.specification.type];if(me){let ke=me(P.value.value,W.value.value,oe);return new Al(this,{kind:"constant",value:ke},P.parameters)}return P}evaluate(P,W,oe,me,ke,Pe){return P.kind==="constant"?P.value:P.evaluate(W,oe,me,ke,Pe)}}class mf extends vo{possiblyEvaluate(P,W,oe,me){if(P.value===void 0)return new Al(this,{kind:"constant",value:void 0},W);if(P.expression.kind==="constant"){let ke=P.expression.evaluate(W,null,{},oe,me),Pe=P.property.specification.type==="resolvedImage"&&typeof ke!="string"?ke.name:ke,Ge=this._calculate(Pe,Pe,Pe,W);return new Al(this,{kind:"constant",value:Ge},W)}if(P.expression.kind==="camera"){let ke=this._calculate(P.expression.evaluate({zoom:W.zoom-1}),P.expression.evaluate({zoom:W.zoom}),P.expression.evaluate({zoom:W.zoom+1}),W);return new Al(this,{kind:"constant",value:ke},W)}return new Al(this,P.expression,W)}evaluate(P,W,oe,me,ke,Pe){if(P.kind==="source"){let Ge=P.evaluate(W,oe,me,ke,Pe);return this._calculate(Ge,Ge,Ge,W)}return P.kind==="composite"?this._calculate(P.evaluate({zoom:Math.floor(W.zoom)-1},oe,me),P.evaluate({zoom:Math.floor(W.zoom)},oe,me),P.evaluate({zoom:Math.floor(W.zoom)+1},oe,me),W):P.value}_calculate(P,W,oe,me){return me.zoom>me.zoomHistory.lastIntegerZoom?{from:P,to:W}:{from:oe,to:W}}interpolate(P){return P}}class kc{constructor(P){this.specification=P}possiblyEvaluate(P,W,oe,me){if(P.value!==void 0){if(P.expression.kind==="constant"){let ke=P.expression.evaluate(W,null,{},oe,me);return this._calculate(ke,ke,ke,W)}return this._calculate(P.expression.evaluate(new $o(Math.floor(W.zoom-1),W)),P.expression.evaluate(new $o(Math.floor(W.zoom),W)),P.expression.evaluate(new $o(Math.floor(W.zoom+1),W)),W)}}_calculate(P,W,oe,me){return me.zoom>me.zoomHistory.lastIntegerZoom?{from:P,to:W}:{from:oe,to:W}}interpolate(P){return P}}class ou{constructor(P){this.specification=P}possiblyEvaluate(P,W,oe,me){return!!P.expression.evaluate(W,null,{},oe,me)}interpolate(){return!1}}class Me{constructor(P){this.properties=P,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let W in P){let oe=P[W];oe.specification.overridable&&this.overridableProperties.push(W);let me=this.defaultPropertyValues[W]=new ul(oe,void 0),ke=this.defaultTransitionablePropertyValues[W]=new yu(oe);this.defaultTransitioningPropertyValues[W]=ke.untransitioned(),this.defaultPossiblyEvaluatedValues[W]=me.possiblyEvaluate({})}}}Pa("DataDrivenProperty",vo),Pa("DataConstantProperty",Xi),Pa("CrossFadedDataDrivenProperty",mf),Pa("CrossFadedProperty",kc),Pa("ColorRampProperty",ou);let L="-transition";class J extends Q{constructor(P,W){if(super(),this.id=P.id,this.type=P.type,this._featureFilter={filter:()=>!0,needGeometry:!1},P.type!=="custom"&&(this.metadata=P.metadata,this.minzoom=P.minzoom,this.maxzoom=P.maxzoom,P.type!=="background"&&(this.source=P.source,this.sourceLayer=P["source-layer"],this.filter=P.filter),W.layout&&(this._unevaluatedLayout=new Eu(W.layout)),W.paint)){this._transitionablePaint=new iu(W.paint);for(let oe in P.paint)this.setPaintProperty(oe,P.paint[oe],{validate:!1});for(let oe in P.layout)this.setLayoutProperty(oe,P.layout[oe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new nc(W.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(P){return P==="visibility"?this.visibility:this._unevaluatedLayout.getValue(P)}setLayoutProperty(P,W,oe={}){W!=null&&this._validate(qn,`layers.${this.id}.layout.${P}`,P,W,oe)||(P!=="visibility"?this._unevaluatedLayout.setValue(P,W):this.visibility=W)}getPaintProperty(P){return P.endsWith(L)?this._transitionablePaint.getTransition(P.slice(0,-11)):this._transitionablePaint.getValue(P)}setPaintProperty(P,W,oe={}){if(W!=null&&this._validate(gn,`layers.${this.id}.paint.${P}`,P,W,oe))return!1;if(P.endsWith(L))return this._transitionablePaint.setTransition(P.slice(0,-11),W||void 0),!1;{let me=this._transitionablePaint._values[P],ke=me.property.specification["property-type"]==="cross-faded-data-driven",Pe=me.value.isDataDriven(),Ge=me.value;this._transitionablePaint.setValue(P,W),this._handleSpecialPaintPropertyUpdate(P);let tt=this._transitionablePaint._values[P].value;return tt.isDataDriven()||Pe||ke||this._handleOverridablePaintPropertyUpdate(P,Ge,tt)}}_handleSpecialPaintPropertyUpdate(P){}_handleOverridablePaintPropertyUpdate(P,W,oe){return!1}isHidden(P){return!!(this.minzoom&&P=this.maxzoom)||this.visibility==="none"}updateTransitions(P){this._transitioningPaint=this._transitionablePaint.transitioned(P,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(P,W){P.getCrossfadeParameters&&(this._crossfadeParameters=P.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(P,void 0,W)),this.paint=this._transitioningPaint.possiblyEvaluate(P,void 0,W)}serialize(){let P={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&&(P.layout=P.layout||{},P.layout.visibility=this.visibility),m(P,(W,oe)=>!(W===void 0||oe==="layout"&&!Object.keys(W).length||oe==="paint"&&!Object.keys(W).length))}_validate(P,W,oe,me,ke={}){return(!ke||ke.validate!==!1)&&Wa(this,P.call(Aa,{key:W,layerType:this.type,objectKey:oe,value:me,styleSpec:re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let P in this.paint._values){let W=this.paint.get(P);if(W instanceof Al&&$s(W.property.specification)&&(W.value.kind==="source"||W.value.kind==="composite")&&W.value.isStateDependent)return!0}return!1}}let fe={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class de{constructor(P,W){this._structArray=P,this._pos1=W*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Ae{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(P,W){return P._trim(),W&&(P.isTransferred=!0,W.push(P.arrayBuffer)),{length:P.length,arrayBuffer:P.arrayBuffer}}static deserialize(P){let W=Object.create(this.prototype);return W.arrayBuffer=P.arrayBuffer,W.length=P.length,W.capacity=P.arrayBuffer.byteLength/W.bytesPerElement,W._refreshViews(),W}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(P){this.reserve(P),this.length=P}reserve(P){if(P>this.capacity){this.capacity=Math.max(P,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let W=this.uint8;this._refreshViews(),W&&this.uint8.set(W)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Ye(V,P=1){let W=0,oe=0;return{members:V.map(me=>{let ke=fe[me.type].BYTES_PER_ELEMENT,Pe=W=et(W,Math.max(P,ke)),Ge=me.components||1;return oe=Math.max(oe,ke),W+=ke*Ge,{name:me.name,type:me.type,components:Ge,offset:Pe}}),size:et(W,Math.max(oe,P)),alignment:P}}function et(V,P){return Math.ceil(V/P)*P}class dt extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W){let oe=this.length;return this.resize(oe+1),this.emplace(oe,P,W)}emplace(P,W,oe){let me=2*P;return this.int16[me+0]=W,this.int16[me+1]=oe,P}}dt.prototype.bytesPerElement=4,Pa("StructArrayLayout2i4",dt);class St extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,oe){let me=this.length;return this.resize(me+1),this.emplace(me,P,W,oe)}emplace(P,W,oe,me){let ke=3*P;return this.int16[ke+0]=W,this.int16[ke+1]=oe,this.int16[ke+2]=me,P}}St.prototype.bytesPerElement=6,Pa("StructArrayLayout3i6",St);class Ht extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,oe,me){let ke=this.length;return this.resize(ke+1),this.emplace(ke,P,W,oe,me)}emplace(P,W,oe,me,ke){let Pe=4*P;return this.int16[Pe+0]=W,this.int16[Pe+1]=oe,this.int16[Pe+2]=me,this.int16[Pe+3]=ke,P}}Ht.prototype.bytesPerElement=8,Pa("StructArrayLayout4i8",Ht);class Wt extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,oe,me,ke,Pe){let Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,P,W,oe,me,ke,Pe)}emplace(P,W,oe,me,ke,Pe,Ge){let tt=6*P;return this.int16[tt+0]=W,this.int16[tt+1]=oe,this.int16[tt+2]=me,this.int16[tt+3]=ke,this.int16[tt+4]=Pe,this.int16[tt+5]=Ge,P}}Wt.prototype.bytesPerElement=12,Pa("StructArrayLayout2i4i12",Wt);class fr extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,oe,me,ke,Pe){let Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,P,W,oe,me,ke,Pe)}emplace(P,W,oe,me,ke,Pe,Ge){let tt=4*P,vt=8*P;return this.int16[tt+0]=W,this.int16[tt+1]=oe,this.uint8[vt+4]=me,this.uint8[vt+5]=ke,this.uint8[vt+6]=Pe,this.uint8[vt+7]=Ge,P}}fr.prototype.bytesPerElement=8,Pa("StructArrayLayout2i4ub8",fr);class Ar extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(P,W){let oe=this.length;return this.resize(oe+1),this.emplace(oe,P,W)}emplace(P,W,oe){let me=2*P;return this.float32[me+0]=W,this.float32[me+1]=oe,P}}Ar.prototype.bytesPerElement=8,Pa("StructArrayLayout2f8",Ar);class Le extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W,oe,me,ke,Pe,Ge,tt,vt,kt){let Gt=this.length;return this.resize(Gt+1),this.emplace(Gt,P,W,oe,me,ke,Pe,Ge,tt,vt,kt)}emplace(P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt){let tr=10*P;return this.uint16[tr+0]=W,this.uint16[tr+1]=oe,this.uint16[tr+2]=me,this.uint16[tr+3]=ke,this.uint16[tr+4]=Pe,this.uint16[tr+5]=Ge,this.uint16[tr+6]=tt,this.uint16[tr+7]=vt,this.uint16[tr+8]=kt,this.uint16[tr+9]=Gt,P}}Le.prototype.bytesPerElement=20,Pa("StructArrayLayout10ui20",Le);class ze extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr){let lr=this.length;return this.resize(lr+1),this.emplace(lr,P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr)}emplace(P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr,lr){let xr=12*P;return this.int16[xr+0]=W,this.int16[xr+1]=oe,this.int16[xr+2]=me,this.int16[xr+3]=ke,this.uint16[xr+4]=Pe,this.uint16[xr+5]=Ge,this.uint16[xr+6]=tt,this.uint16[xr+7]=vt,this.int16[xr+8]=kt,this.int16[xr+9]=Gt,this.int16[xr+10]=tr,this.int16[xr+11]=lr,P}}ze.prototype.bytesPerElement=24,Pa("StructArrayLayout4i4ui4i24",ze);class je extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(P,W,oe){let me=this.length;return this.resize(me+1),this.emplace(me,P,W,oe)}emplace(P,W,oe,me){let ke=3*P;return this.float32[ke+0]=W,this.float32[ke+1]=oe,this.float32[ke+2]=me,P}}je.prototype.bytesPerElement=12,Pa("StructArrayLayout3f12",je);class Xe extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(P){let W=this.length;return this.resize(W+1),this.emplace(W,P)}emplace(P,W){return this.uint32[1*P+0]=W,P}}Xe.prototype.bytesPerElement=4,Pa("StructArrayLayout1ul4",Xe);class st extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W,oe,me,ke,Pe,Ge,tt,vt){let kt=this.length;return this.resize(kt+1),this.emplace(kt,P,W,oe,me,ke,Pe,Ge,tt,vt)}emplace(P,W,oe,me,ke,Pe,Ge,tt,vt,kt){let Gt=10*P,tr=5*P;return this.int16[Gt+0]=W,this.int16[Gt+1]=oe,this.int16[Gt+2]=me,this.int16[Gt+3]=ke,this.int16[Gt+4]=Pe,this.int16[Gt+5]=Ge,this.uint32[tr+3]=tt,this.uint16[Gt+8]=vt,this.uint16[Gt+9]=kt,P}}st.prototype.bytesPerElement=20,Pa("StructArrayLayout6i1ul2ui20",st);class Qe extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,oe,me,ke,Pe){let Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,P,W,oe,me,ke,Pe)}emplace(P,W,oe,me,ke,Pe,Ge){let tt=6*P;return this.int16[tt+0]=W,this.int16[tt+1]=oe,this.int16[tt+2]=me,this.int16[tt+3]=ke,this.int16[tt+4]=Pe,this.int16[tt+5]=Ge,P}}Qe.prototype.bytesPerElement=12,Pa("StructArrayLayout2i2i2i12",Qe);class ht extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,oe,me,ke){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,P,W,oe,me,ke)}emplace(P,W,oe,me,ke,Pe){let Ge=4*P,tt=8*P;return this.float32[Ge+0]=W,this.float32[Ge+1]=oe,this.float32[Ge+2]=me,this.int16[tt+6]=ke,this.int16[tt+7]=Pe,P}}ht.prototype.bytesPerElement=16,Pa("StructArrayLayout2f1f2i16",ht);class Dt extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,oe,me,ke,Pe){let Ge=this.length;return this.resize(Ge+1),this.emplace(Ge,P,W,oe,me,ke,Pe)}emplace(P,W,oe,me,ke,Pe,Ge){let tt=16*P,vt=4*P,kt=8*P;return this.uint8[tt+0]=W,this.uint8[tt+1]=oe,this.float32[vt+1]=me,this.float32[vt+2]=ke,this.int16[kt+6]=Pe,this.int16[kt+7]=Ge,P}}Dt.prototype.bytesPerElement=16,Pa("StructArrayLayout2ub2f2i16",Dt);class Ot extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W,oe){let me=this.length;return this.resize(me+1),this.emplace(me,P,W,oe)}emplace(P,W,oe,me){let ke=3*P;return this.uint16[ke+0]=W,this.uint16[ke+1]=oe,this.uint16[ke+2]=me,P}}Ot.prototype.bytesPerElement=6,Pa("StructArrayLayout3ui6",Ot);class $t extends Ae{_refreshViews(){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)}emplaceBack(P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr,lr,xr,Dr,sa,ga){let cn=this.length;return this.resize(cn+1),this.emplace(cn,P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr,lr,xr,Dr,sa,ga)}emplace(P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr,lr,xr,Dr,sa,ga,cn){let Da=24*P,en=12*P,zn=48*P;return this.int16[Da+0]=W,this.int16[Da+1]=oe,this.uint16[Da+2]=me,this.uint16[Da+3]=ke,this.uint32[en+2]=Pe,this.uint32[en+3]=Ge,this.uint32[en+4]=tt,this.uint16[Da+10]=vt,this.uint16[Da+11]=kt,this.uint16[Da+12]=Gt,this.float32[en+7]=tr,this.float32[en+8]=lr,this.uint8[zn+36]=xr,this.uint8[zn+37]=Dr,this.uint8[zn+38]=sa,this.uint32[en+10]=ga,this.int16[Da+22]=cn,P}}$t.prototype.bytesPerElement=48,Pa("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",$t);class ir extends Ae{_refreshViews(){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)}emplaceBack(P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr,lr,xr,Dr,sa,ga,cn,Da,en,zn,mi,Ji,Uo,$i,qi,To,fo){let io=this.length;return this.resize(io+1),this.emplace(io,P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr,lr,xr,Dr,sa,ga,cn,Da,en,zn,mi,Ji,Uo,$i,qi,To,fo)}emplace(P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr,lr,xr,Dr,sa,ga,cn,Da,en,zn,mi,Ji,Uo,$i,qi,To,fo,io){let Kn=32*P,Eo=16*P;return this.int16[Kn+0]=W,this.int16[Kn+1]=oe,this.int16[Kn+2]=me,this.int16[Kn+3]=ke,this.int16[Kn+4]=Pe,this.int16[Kn+5]=Ge,this.int16[Kn+6]=tt,this.int16[Kn+7]=vt,this.uint16[Kn+8]=kt,this.uint16[Kn+9]=Gt,this.uint16[Kn+10]=tr,this.uint16[Kn+11]=lr,this.uint16[Kn+12]=xr,this.uint16[Kn+13]=Dr,this.uint16[Kn+14]=sa,this.uint16[Kn+15]=ga,this.uint16[Kn+16]=cn,this.uint16[Kn+17]=Da,this.uint16[Kn+18]=en,this.uint16[Kn+19]=zn,this.uint16[Kn+20]=mi,this.uint16[Kn+21]=Ji,this.uint16[Kn+22]=Uo,this.uint32[Eo+12]=$i,this.float32[Eo+13]=qi,this.float32[Eo+14]=To,this.uint16[Kn+30]=fo,this.uint16[Kn+31]=io,P}}ir.prototype.bytesPerElement=64,Pa("StructArrayLayout8i15ui1ul2f2ui64",ir);class pr extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(P){let W=this.length;return this.resize(W+1),this.emplace(W,P)}emplace(P,W){return this.float32[1*P+0]=W,P}}pr.prototype.bytesPerElement=4,Pa("StructArrayLayout1f4",pr);class zr extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(P,W,oe){let me=this.length;return this.resize(me+1),this.emplace(me,P,W,oe)}emplace(P,W,oe,me){let ke=3*P;return this.uint16[6*P+0]=W,this.float32[ke+1]=oe,this.float32[ke+2]=me,P}}zr.prototype.bytesPerElement=12,Pa("StructArrayLayout1ui2f12",zr);class Wr extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W,oe){let me=this.length;return this.resize(me+1),this.emplace(me,P,W,oe)}emplace(P,W,oe,me){let ke=4*P;return this.uint32[2*P+0]=W,this.uint16[ke+2]=oe,this.uint16[ke+3]=me,P}}Wr.prototype.bytesPerElement=8,Pa("StructArrayLayout1ul2ui8",Wr);class ia extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W){let oe=this.length;return this.resize(oe+1),this.emplace(oe,P,W)}emplace(P,W,oe){let me=2*P;return this.uint16[me+0]=W,this.uint16[me+1]=oe,P}}ia.prototype.bytesPerElement=4,Pa("StructArrayLayout2ui4",ia);class Sa extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P){let W=this.length;return this.resize(W+1),this.emplace(W,P)}emplace(P,W){return this.uint16[1*P+0]=W,P}}Sa.prototype.bytesPerElement=2,Pa("StructArrayLayout1ui2",Sa);class ln extends Ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(P,W,oe,me){let ke=this.length;return this.resize(ke+1),this.emplace(ke,P,W,oe,me)}emplace(P,W,oe,me,ke){let Pe=4*P;return this.float32[Pe+0]=W,this.float32[Pe+1]=oe,this.float32[Pe+2]=me,this.float32[Pe+3]=ke,P}}ln.prototype.bytesPerElement=16,Pa("StructArrayLayout4f16",ln);class an extends de{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new n(this.anchorPointX,this.anchorPointY)}}an.prototype.size=20;class wn extends st{get(P){return new an(this,P)}}Pa("CollisionBoxArray",wn);class ei extends de{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(P){this._structArray.uint8[this._pos1+37]=P}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(P){this._structArray.uint8[this._pos1+38]=P}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(P){this._structArray.uint32[this._pos4+10]=P}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}ei.prototype.size=48;class Mi extends $t{get(P){return new ei(this,P)}}Pa("PlacedSymbolArray",Mi);class pi extends de{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(P){this._structArray.uint32[this._pos4+12]=P}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}pi.prototype.size=64;class Ki extends ir{get(P){return new pi(this,P)}}Pa("SymbolInstanceArray",Ki);class Lo extends pr{getoffsetX(P){return this.float32[1*P+0]}}Pa("GlyphOffsetArray",Lo);class bo extends St{getx(P){return this.int16[3*P+0]}gety(P){return this.int16[3*P+1]}gettileUnitDistanceFromAnchor(P){return this.int16[3*P+2]}}Pa("SymbolLineVertexArray",bo);class ds extends de{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}ds.prototype.size=12;class Zo extends zr{get(P){return new ds(this,P)}}Pa("TextAnchorOffsetArray",Zo);class Is extends de{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Is.prototype.size=8;class Ys extends Wr{get(P){return new Is(this,P)}}Pa("FeatureIndexArray",Ys);class Ks extends dt{}class ks extends dt{}class zs extends dt{}class Il extends Wt{}class _u extends fr{}class Xl extends Ar{}class il extends Le{}class ku extends ze{}class bu extends je{}class _l extends Xe{}class Dl extends Qe{}class le extends Dt{}class we extends Ot{}class Be extends ia{}let $e=Ye([{name:"a_pos",components:2,type:"Int16"}],4),{members:Je}=$e;class it{constructor(P=[]){this.segments=P}prepareSegment(P,W,oe,me){let ke=this.segments[this.segments.length-1];return P>it.MAX_VERTEX_ARRAY_LENGTH&&_(`Max vertices per segment is ${it.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${P}`),(!ke||ke.vertexLength+P>it.MAX_VERTEX_ARRAY_LENGTH||ke.sortKey!==me)&&(ke={vertexOffset:W.length,primitiveOffset:oe.length,vertexLength:0,primitiveLength:0},me!==void 0&&(ke.sortKey=me),this.segments.push(ke)),ke}get(){return this.segments}destroy(){for(let P of this.segments)for(let W in P.vaos)P.vaos[W].destroy()}static simpleSegment(P,W,oe,me){return new it([{vertexOffset:P,primitiveOffset:W,vertexLength:oe,primitiveLength:me,vaos:{},sortKey:0}])}}function Ct(V,P){return 256*(V=M(Math.floor(V),0,255))+M(Math.floor(P),0,255)}it.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Pa("SegmentVector",it);let bt=Ye([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var qt={exports:{}},sr={exports:{}};sr.exports=function(V,P){var W,oe,me,ke,Pe,Ge,tt,vt;for(oe=V.length-(W=3&V.length),me=P,Pe=3432918353,Ge=461845907,vt=0;vt>>16)*Pe&65535)<<16)&4294967295)<<15|tt>>>17))*Ge+(((tt>>>16)*Ge&65535)<<16)&4294967295)<<13|me>>>19))+((5*(me>>>16)&65535)<<16)&4294967295))+((58964+(ke>>>16)&65535)<<16);switch(tt=0,W){case 3:tt^=(255&V.charCodeAt(vt+2))<<16;case 2:tt^=(255&V.charCodeAt(vt+1))<<8;case 1:me^=tt=(65535&(tt=(tt=(65535&(tt^=255&V.charCodeAt(vt)))*Pe+(((tt>>>16)*Pe&65535)<<16)&4294967295)<<15|tt>>>17))*Ge+(((tt>>>16)*Ge&65535)<<16)&4294967295}return me^=V.length,me=2246822507*(65535&(me^=me>>>16))+((2246822507*(me>>>16)&65535)<<16)&4294967295,me=3266489909*(65535&(me^=me>>>13))+((3266489909*(me>>>16)&65535)<<16)&4294967295,(me^=me>>>16)>>>0};var ur=sr.exports,qr={exports:{}};qr.exports=function(V,P){for(var W,oe=V.length,me=P^oe,ke=0;oe>=4;)W=1540483477*(65535&(W=255&V.charCodeAt(ke)|(255&V.charCodeAt(++ke))<<8|(255&V.charCodeAt(++ke))<<16|(255&V.charCodeAt(++ke))<<24))+((1540483477*(W>>>16)&65535)<<16),me=1540483477*(65535&me)+((1540483477*(me>>>16)&65535)<<16)^(W=1540483477*(65535&(W^=W>>>24))+((1540483477*(W>>>16)&65535)<<16)),oe-=4,++ke;switch(oe){case 3:me^=(255&V.charCodeAt(ke+2))<<16;case 2:me^=(255&V.charCodeAt(ke+1))<<8;case 1:me=1540483477*(65535&(me^=255&V.charCodeAt(ke)))+((1540483477*(me>>>16)&65535)<<16)}return me=1540483477*(65535&(me^=me>>>13))+((1540483477*(me>>>16)&65535)<<16),(me^=me>>>15)>>>0};var Nr=ur,ya=qr.exports;qt.exports=Nr,qt.exports.murmur3=Nr,qt.exports.murmur2=ya;var Ea=t(qt.exports);class Zr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(P,W,oe,me){this.ids.push(oa(P)),this.positions.push(W,oe,me)}getPositions(P){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let W=oa(P),oe=0,me=this.ids.length-1;for(;oe>1;this.ids[Pe]>=W?me=Pe:oe=Pe+1}let ke=[];for(;this.ids[oe]===W;)ke.push({index:this.positions[3*oe],start:this.positions[3*oe+1],end:this.positions[3*oe+2]}),oe++;return ke}static serialize(P,W){let oe=new Float64Array(P.ids),me=new Uint32Array(P.positions);return ma(oe,me,0,oe.length-1),W&&W.push(oe.buffer,me.buffer),{ids:oe,positions:me}}static deserialize(P){let W=new Zr;return W.ids=P.ids,W.positions=P.positions,W.indexed=!0,W}}function oa(V){let P=+V;return!isNaN(P)&&P<=Number.MAX_SAFE_INTEGER?P:Ea(String(V))}function ma(V,P,W,oe){for(;W>1],ke=W-1,Pe=oe+1;for(;;){do ke++;while(V[ke]me);if(ke>=Pe)break;Ma(V,ke,Pe),Ma(P,3*ke,3*Pe),Ma(P,3*ke+1,3*Pe+1),Ma(P,3*ke+2,3*Pe+2)}Pe-W`u_${me}`),this.type=oe}setUniform(P,W,oe){P.set(oe.constantOr(this.value))}getBinding(P,W,oe){return this.type==="color"?new Bn(P,W):new aa(P,W)}}class Bi{constructor(P,W){this.uniformNames=W.map(oe=>`u_${oe}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(P,W){this.pixelRatioFrom=W.pixelRatio,this.pixelRatioTo=P.pixelRatio,this.patternFrom=W.tlbr,this.patternTo=P.tlbr}setUniform(P,W,oe,me){let ke=me==="u_pattern_to"?this.patternTo:me==="u_pattern_from"?this.patternFrom:me==="u_pixel_ratio_to"?this.pixelRatioTo:me==="u_pixel_ratio_from"?this.pixelRatioFrom:null;ke&&P.set(ke)}getBinding(P,W,oe){return oe.substr(0,9)==="u_pattern"?new Sn(P,W):new aa(P,W)}}class So{constructor(P,W,oe,me){this.expression=P,this.type=oe,this.maxValue=0,this.paintVertexAttributes=W.map(ke=>({name:`a_${ke}`,type:"Float32",components:oe==="color"?2:1,offset:0})),this.paintVertexArray=new me}populatePaintArray(P,W,oe,me,ke){let Pe=this.paintVertexArray.length,Ge=this.expression.evaluate(new $o(0),W,{},me,[],ke);this.paintVertexArray.resize(P),this._setPaintValue(Pe,P,Ge)}updatePaintArray(P,W,oe,me){let ke=this.expression.evaluate({zoom:0},oe,me);this._setPaintValue(P,W,ke)}_setPaintValue(P,W,oe){if(this.type==="color"){let me=xi(oe);for(let ke=P;ke`u_${Ge}_t`),this.type=oe,this.useIntegerZoom=me,this.zoom=ke,this.maxValue=0,this.paintVertexAttributes=W.map(Ge=>({name:`a_${Ge}`,type:"Float32",components:oe==="color"?4:2,offset:0})),this.paintVertexArray=new Pe}populatePaintArray(P,W,oe,me,ke){let Pe=this.expression.evaluate(new $o(this.zoom),W,{},me,[],ke),Ge=this.expression.evaluate(new $o(this.zoom+1),W,{},me,[],ke),tt=this.paintVertexArray.length;this.paintVertexArray.resize(P),this._setPaintValue(tt,P,Pe,Ge)}updatePaintArray(P,W,oe,me){let ke=this.expression.evaluate({zoom:this.zoom},oe,me),Pe=this.expression.evaluate({zoom:this.zoom+1},oe,me);this._setPaintValue(P,W,ke,Pe)}_setPaintValue(P,W,oe,me){if(this.type==="color"){let ke=xi(oe),Pe=xi(me);for(let Ge=P;Ge`#define HAS_UNIFORM_${me}`))}return P}getBinderAttributes(){let P=[];for(let W in this.binders){let oe=this.binders[W];if(oe instanceof So||oe instanceof Di)for(let me=0;me!0){this.programConfigurations={};for(let me of P)this.programConfigurations[me.id]=new Ts(me,W,oe);this.needsUpload=!1,this._featureMap=new Zr,this._bufferOffset=0}populatePaintArrays(P,W,oe,me,ke,Pe){for(let Ge in this.programConfigurations)this.programConfigurations[Ge].populatePaintArrays(P,W,me,ke,Pe);W.id!==void 0&&this._featureMap.add(W.id,oe,this._bufferOffset,P),this._bufferOffset=P,this.needsUpload=!0}updatePaintArrays(P,W,oe,me){for(let ke of oe)this.needsUpload=this.programConfigurations[ke.id].updatePaintArrays(P,this._featureMap,W,ke,me)||this.needsUpload}get(P){return this.programConfigurations[P]}upload(P){if(this.needsUpload){for(let W in this.programConfigurations)this.programConfigurations[W].upload(P);this.needsUpload=!1}}destroy(){for(let P in this.programConfigurations)this.programConfigurations[P].destroy()}}function Ds(V,P){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[V]||[V.replace(`${P}-`,"").replace(/-/g,"_")]}function gi(V,P,W){let oe={color:{source:Ar,composite:ln},number:{source:pr,composite:Ar}},me=function(ke){return{"line-pattern":{source:il,composite:il},"fill-pattern":{source:il,composite:il},"fill-extrusion-pattern":{source:il,composite:il}}[ke]}(V);return me&&me[W]||oe[P][W]}Pa("ConstantBinder",Ui),Pa("CrossFadedConstantBinder",Bi),Pa("SourceExpressionBinder",So),Pa("CrossFadedCompositeBinder",mo),Pa("CompositeExpressionBinder",Di),Pa("ProgramConfiguration",Ts,{omit:["_buffers"]}),Pa("ProgramConfigurationSet",al);let Qi=8192,Oo=Math.pow(2,14)-1,gs=-Oo-1;function Bs(V){let P=Qi/V.extent,W=V.loadGeometry();for(let oe=0;oePe.x+1||ttPe.y+1)&&_("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return W}function cl(V,P){return{type:V.type,id:V.id,properties:V.properties,geometry:P?Bs(V):[]}}function su(V,P,W,oe,me){V.emplaceBack(2*P+(oe+1)/2,2*W+(me+1)/2)}class xu{constructor(P){this.zoom=P.zoom,this.overscaling=P.overscaling,this.layers=P.layers,this.layerIds=this.layers.map(W=>W.id),this.index=P.index,this.hasPattern=!1,this.layoutVertexArray=new ks,this.indexArray=new we,this.segments=new it,this.programConfigurations=new al(P.layers,P.zoom),this.stateDependentLayerIds=this.layers.filter(W=>W.isStateDependent()).map(W=>W.id)}populate(P,W,oe){let me=this.layers[0],ke=[],Pe=null,Ge=!1;me.type==="circle"&&(Pe=me.layout.get("circle-sort-key"),Ge=!Pe.isConstant());for(let{feature:tt,id:vt,index:kt,sourceLayerIndex:Gt}of P){let tr=this.layers[0]._featureFilter.needGeometry,lr=cl(tt,tr);if(!this.layers[0]._featureFilter.filter(new $o(this.zoom),lr,oe))continue;let xr=Ge?Pe.evaluate(lr,{},oe):void 0,Dr={id:vt,properties:tt.properties,type:tt.type,sourceLayerIndex:Gt,index:kt,geometry:tr?lr.geometry:Bs(tt),patterns:{},sortKey:xr};ke.push(Dr)}Ge&&ke.sort((tt,vt)=>tt.sortKey-vt.sortKey);for(let tt of ke){let{geometry:vt,index:kt,sourceLayerIndex:Gt}=tt,tr=P[kt].feature;this.addFeature(tt,vt,kt,oe),W.featureIndex.insert(tr,vt,kt,Gt,this.index)}}update(P,W,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(P,W,this.stateDependentLayers,oe)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(P){this.uploaded||(this.layoutVertexBuffer=P.createVertexBuffer(this.layoutVertexArray,Je),this.indexBuffer=P.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(P),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(P,W,oe,me){for(let ke of W)for(let Pe of ke){let Ge=Pe.x,tt=Pe.y;if(Ge<0||Ge>=Qi||tt<0||tt>=Qi)continue;let vt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,P.sortKey),kt=vt.vertexLength;su(this.layoutVertexArray,Ge,tt,-1,-1),su(this.layoutVertexArray,Ge,tt,1,-1),su(this.layoutVertexArray,Ge,tt,1,1),su(this.layoutVertexArray,Ge,tt,-1,1),this.indexArray.emplaceBack(kt,kt+1,kt+2),this.indexArray.emplaceBack(kt,kt+3,kt+2),vt.vertexLength+=4,vt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,P,oe,{},me)}}function ic(V,P){for(let W=0;W1){if(Er(V,P))return!0;for(let oe=0;oe1?W:W.sub(P)._mult(me)._add(P))}function _a(V,P){let W,oe,me,ke=!1;for(let Pe=0;PeP.y!=me.y>P.y&&P.x<(me.x-oe.x)*(P.y-oe.y)/(me.y-oe.y)+oe.x&&(ke=!ke)}return ke}function Ra(V,P){let W=!1;for(let oe=0,me=V.length-1;oeP.y!=Pe.y>P.y&&P.x<(Pe.x-ke.x)*(P.y-ke.y)/(Pe.y-ke.y)+ke.x&&(W=!W)}return W}function Ba(V,P,W){let oe=W[0],me=W[2];if(V.xme.x&&P.x>me.x||V.yme.y&&P.y>me.y)return!1;let ke=D(V,P,W[0]);return ke!==D(V,P,W[1])||ke!==D(V,P,W[2])||ke!==D(V,P,W[3])}function Ua(V,P,W){let oe=P.paint.get(V).value;return oe.kind==="constant"?oe.value:W.programConfigurations.get(P.id).getMaxValue(V)}function Wn(V){return Math.sqrt(V[0]*V[0]+V[1]*V[1])}function Tn(V,P,W,oe,me){if(!P[0]&&!P[1])return V;let ke=n.convert(P)._mult(me);W==="viewport"&&ke._rotate(-oe);let Pe=[];for(let Ge=0;Gela(sa,Dr))}(vt,tt),lr=Gt?kt*Ge:kt;for(let xr of me)for(let Dr of xr){let sa=Gt?Dr:la(Dr,tt),ga=lr,cn=Hn([],[Dr.x,Dr.y,0,1],tt);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?ga*=cn[3]/Pe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(ga*=Pe.cameraToCenterDistance/cn[3]),Ve(tr,sa,ga))return!0}return!1}}function la(V,P){let W=Hn([],[V.x,V.y,0,1],P);return new n(W[0]/W[3],W[1]/W[3])}class vn extends xu{}let Za;Pa("HeatmapBucket",vn,{omit:["layers"]});var qa={get paint(){return Za=Za||new Me({"heatmap-radius":new vo(re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new vo(re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Xi(re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new ou(re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Xi(re.paint_heatmap["heatmap-opacity"])})}};function Ha(V,{width:P,height:W},oe,me){if(me){if(me instanceof Uint8ClampedArray)me=new Uint8Array(me.buffer);else if(me.length!==P*W*oe)throw new RangeError(`mismatched image size. expected: ${me.length} but got: ${P*W*oe}`)}else me=new Uint8Array(P*W*oe);return V.width=P,V.height=W,V.data=me,V}function pn(V,{width:P,height:W},oe){if(P===V.width&&W===V.height)return;let me=Ha({},{width:P,height:W},oe);Yn(V,me,{x:0,y:0},{x:0,y:0},{width:Math.min(V.width,P),height:Math.min(V.height,W)},oe),V.width=P,V.height=W,V.data=me.data}function Yn(V,P,W,oe,me,ke){if(me.width===0||me.height===0)return P;if(me.width>V.width||me.height>V.height||W.x>V.width-me.width||W.y>V.height-me.height)throw new RangeError("out of range source coordinates for image copy");if(me.width>P.width||me.height>P.height||oe.x>P.width-me.width||oe.y>P.height-me.height)throw new RangeError("out of range destination coordinates for image copy");let Pe=V.data,Ge=P.data;if(Pe===Ge)throw new Error("srcData equals dstData, so image is already copied");for(let tt=0;tt{P[V.evaluationKey]=tt;let vt=V.expression.evaluate(P);me.data[Pe+Ge+0]=Math.floor(255*vt.r/vt.a),me.data[Pe+Ge+1]=Math.floor(255*vt.g/vt.a),me.data[Pe+Ge+2]=Math.floor(255*vt.b/vt.a),me.data[Pe+Ge+3]=Math.floor(255*vt.a)};if(V.clips)for(let Pe=0,Ge=0;Pe80*W){Ge=1/0,tt=1/0;let kt=-1/0,Gt=-1/0;for(let tr=W;trkt&&(kt=lr),xr>Gt&&(Gt=xr)}vt=Math.max(kt-Ge,Gt-tt),vt=vt!==0?32767/vt:0}return nl(ke,Pe,W,Ge,tt,vt,0),Pe}function Js(V,P,W,oe,me){let ke;if(me===function(Pe,Ge,tt,vt){let kt=0;for(let Gt=Ge,tr=tt-vt;Gt0)for(let Pe=P;Pe=P;Pe-=oe)ke=kn(Pe/oe|0,V[Pe],V[Pe+1],ke);return ke&&Lt(ke,ke.next)&&(wt(ke),ke=ke.next),ke}function Ns(V,P){if(!V)return V;P||(P=V);let W,oe=V;do if(W=!1,oe.steiner||!Lt(oe,oe.next)&&lo(oe.prev,oe,oe.next)!==0)oe=oe.next;else{if(wt(oe),oe=P=oe.prev,oe===oe.next)break;W=!0}while(W||oe!==P);return P}function nl(V,P,W,oe,me,ke,Pe){if(!V)return;!Pe&&ke&&function(tt,vt,kt,Gt){let tr=tt;do tr.z===0&&(tr.z=hl(tr.x,tr.y,vt,kt,Gt)),tr.prevZ=tr.prev,tr.nextZ=tr.next,tr=tr.next;while(tr!==tt);tr.prevZ.nextZ=null,tr.prevZ=null,function(lr){let xr,Dr=1;do{let sa,ga=lr;lr=null;let cn=null;for(xr=0;ga;){xr++;let Da=ga,en=0;for(let mi=0;mi0||zn>0&&Da;)en!==0&&(zn===0||!Da||ga.z<=Da.z)?(sa=ga,ga=ga.nextZ,en--):(sa=Da,Da=Da.nextZ,zn--),cn?cn.nextZ=sa:lr=sa,sa.prevZ=cn,cn=sa;ga=Da}cn.nextZ=null,Dr*=2}while(xr>1)}(tr)}(V,oe,me,ke);let Ge=V;for(;V.prev!==V.next;){let tt=V.prev,vt=V.next;if(ke?Ms(V,oe,me,ke):As(V))P.push(tt.i,V.i,vt.i),wt(V),V=vt.next,Ge=vt.next;else if((V=vt)===Ge){Pe?Pe===1?nl(V=Ps(Ns(V),P),P,W,oe,me,ke,2):Pe===2&&Ai(V,P,W,oe,me,ke):nl(Ns(V),P,W,oe,me,ke,1);break}}}function As(V){let P=V.prev,W=V,oe=V.next;if(lo(P,W,oe)>=0)return!1;let me=P.x,ke=W.x,Pe=oe.x,Ge=P.y,tt=W.y,vt=oe.y,kt=meke?me>Pe?me:Pe:ke>Pe?ke:Pe,lr=Ge>tt?Ge>vt?Ge:vt:tt>vt?tt:vt,xr=oe.next;for(;xr!==P;){if(xr.x>=kt&&xr.x<=tr&&xr.y>=Gt&&xr.y<=lr&&di(me,Ge,ke,tt,Pe,vt,xr.x,xr.y)&&lo(xr.prev,xr,xr.next)>=0)return!1;xr=xr.next}return!0}function Ms(V,P,W,oe){let me=V.prev,ke=V,Pe=V.next;if(lo(me,ke,Pe)>=0)return!1;let Ge=me.x,tt=ke.x,vt=Pe.x,kt=me.y,Gt=ke.y,tr=Pe.y,lr=Gett?Ge>vt?Ge:vt:tt>vt?tt:vt,sa=kt>Gt?kt>tr?kt:tr:Gt>tr?Gt:tr,ga=hl(lr,xr,P,W,oe),cn=hl(Dr,sa,P,W,oe),Da=V.prevZ,en=V.nextZ;for(;Da&&Da.z>=ga&&en&&en.z<=cn;){if(Da.x>=lr&&Da.x<=Dr&&Da.y>=xr&&Da.y<=sa&&Da!==me&&Da!==Pe&&di(Ge,kt,tt,Gt,vt,tr,Da.x,Da.y)&&lo(Da.prev,Da,Da.next)>=0||(Da=Da.prevZ,en.x>=lr&&en.x<=Dr&&en.y>=xr&&en.y<=sa&&en!==me&&en!==Pe&&di(Ge,kt,tt,Gt,vt,tr,en.x,en.y)&&lo(en.prev,en,en.next)>=0))return!1;en=en.nextZ}for(;Da&&Da.z>=ga;){if(Da.x>=lr&&Da.x<=Dr&&Da.y>=xr&&Da.y<=sa&&Da!==me&&Da!==Pe&&di(Ge,kt,tt,Gt,vt,tr,Da.x,Da.y)&&lo(Da.prev,Da,Da.next)>=0)return!1;Da=Da.prevZ}for(;en&&en.z<=cn;){if(en.x>=lr&&en.x<=Dr&&en.y>=xr&&en.y<=sa&&en!==me&&en!==Pe&&di(Ge,kt,tt,Gt,vt,tr,en.x,en.y)&&lo(en.prev,en,en.next)>=0)return!1;en=en.nextZ}return!0}function Ps(V,P){let W=V;do{let oe=W.prev,me=W.next.next;!Lt(oe,me)&&Vr(oe,W,W.next,me)&&Hi(oe,me)&&Hi(me,oe)&&(P.push(oe.i,W.i,me.i),wt(W),wt(W.next),W=V=me),W=W.next}while(W!==V);return Ns(W)}function Ai(V,P,W,oe,me,ke){let Pe=V;do{let Ge=Pe.next.next;for(;Ge!==Pe.prev;){if(Pe.i!==Ge.i&&eo(Pe,Ge)){let tt=zo(Pe,Ge);return Pe=Ns(Pe,Pe.next),tt=Ns(tt,tt.next),nl(Pe,P,W,oe,me,ke,0),void nl(tt,P,W,oe,me,ke,0)}Ge=Ge.next}Pe=Pe.next}while(Pe!==V)}function Os(V,P){return V.x-P.x}function jo(V,P){let W=function(me,ke){let Pe=ke,Ge=me.x,tt=me.y,vt,kt=-1/0;do{if(tt<=Pe.y&&tt>=Pe.next.y&&Pe.next.y!==Pe.y){let Dr=Pe.x+(tt-Pe.y)*(Pe.next.x-Pe.x)/(Pe.next.y-Pe.y);if(Dr<=Ge&&Dr>kt&&(kt=Dr,vt=Pe.x=Pe.x&&Pe.x>=tr&&Ge!==Pe.x&&di(ttvt.x||Pe.x===vt.x&&fl(vt,Pe)))&&(vt=Pe,xr=Dr)}Pe=Pe.next}while(Pe!==Gt);return vt}(V,P);if(!W)return P;let oe=zo(W,V);return Ns(oe,oe.next),Ns(W,W.next)}function fl(V,P){return lo(V.prev,V,P.prev)<0&&lo(P.next,V,V.next)<0}function hl(V,P,W,oe,me){return(V=1431655765&((V=858993459&((V=252645135&((V=16711935&((V=(V-W)*me|0)|V<<8))|V<<4))|V<<2))|V<<1))|(P=1431655765&((P=858993459&((P=252645135&((P=16711935&((P=(P-oe)*me|0)|P<<8))|P<<4))|P<<2))|P<<1))<<1}function Sl(V){let P=V,W=V;do(P.x=(V-Pe)*(ke-Ge)&&(V-Pe)*(oe-Ge)>=(W-Pe)*(P-Ge)&&(W-Pe)*(ke-Ge)>=(me-Pe)*(oe-Ge)}function eo(V,P){return V.next.i!==P.i&&V.prev.i!==P.i&&!function(W,oe){let me=W;do{if(me.i!==W.i&&me.next.i!==W.i&&me.i!==oe.i&&me.next.i!==oe.i&&Vr(me,me.next,W,oe))return!0;me=me.next}while(me!==W);return!1}(V,P)&&(Hi(V,P)&&Hi(P,V)&&function(W,oe){let me=W,ke=!1,Pe=(W.x+oe.x)/2,Ge=(W.y+oe.y)/2;do me.y>Ge!=me.next.y>Ge&&me.next.y!==me.y&&Pe<(me.next.x-me.x)*(Ge-me.y)/(me.next.y-me.y)+me.x&&(ke=!ke),me=me.next;while(me!==W);return ke}(V,P)&&(lo(V.prev,V,P.prev)||lo(V,P.prev,P))||Lt(V,P)&&lo(V.prev,V,V.next)>0&&lo(P.prev,P,P.next)>0)}function lo(V,P,W){return(P.y-V.y)*(W.x-P.x)-(P.x-V.x)*(W.y-P.y)}function Lt(V,P){return V.x===P.x&&V.y===P.y}function Vr(V,P,W,oe){let me=En(lo(V,P,W)),ke=En(lo(V,P,oe)),Pe=En(lo(W,oe,V)),Ge=En(lo(W,oe,P));return me!==ke&&Pe!==Ge||!(me!==0||!Gr(V,W,P))||!(ke!==0||!Gr(V,oe,P))||!(Pe!==0||!Gr(W,V,oe))||!(Ge!==0||!Gr(W,P,oe))}function Gr(V,P,W){return P.x<=Math.max(V.x,W.x)&&P.x>=Math.min(V.x,W.x)&&P.y<=Math.max(V.y,W.y)&&P.y>=Math.min(V.y,W.y)}function En(V){return V>0?1:V<0?-1:0}function Hi(V,P){return lo(V.prev,V,V.next)<0?lo(V,P,V.next)>=0&&lo(V,V.prev,P)>=0:lo(V,P,V.prev)<0||lo(V,V.next,P)<0}function zo(V,P){let W=Rt(V.i,V.x,V.y),oe=Rt(P.i,P.x,P.y),me=V.next,ke=P.prev;return V.next=P,P.prev=V,W.next=me,me.prev=W,oe.next=W,W.prev=oe,ke.next=oe,oe.prev=ke,oe}function kn(V,P,W,oe){let me=Rt(V,P,W);return oe?(me.next=oe.next,me.prev=oe,oe.next.prev=me,oe.next=me):(me.prev=me,me.next=me),me}function wt(V){V.next.prev=V.prev,V.prev.next=V.next,V.prevZ&&(V.prevZ.nextZ=V.nextZ),V.nextZ&&(V.nextZ.prevZ=V.prevZ)}function Rt(V,P,W){return{i:V,x:P,y:W,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Kt(V,P,W){let oe=W.patternDependencies,me=!1;for(let ke of P){let Pe=ke.paint.get(`${V}-pattern`);Pe.isConstant()||(me=!0);let Ge=Pe.constantOr(null);Ge&&(me=!0,oe[Ge.to]=!0,oe[Ge.from]=!0)}return me}function Or(V,P,W,oe,me){let ke=me.patternDependencies;for(let Pe of P){let Ge=Pe.paint.get(`${V}-pattern`).value;if(Ge.kind!=="constant"){let tt=Ge.evaluate({zoom:oe-1},W,{},me.availableImages),vt=Ge.evaluate({zoom:oe},W,{},me.availableImages),kt=Ge.evaluate({zoom:oe+1},W,{},me.availableImages);tt=tt&&tt.name?tt.name:tt,vt=vt&&vt.name?vt.name:vt,kt=kt&&kt.name?kt.name:kt,ke[tt]=!0,ke[vt]=!0,ke[kt]=!0,W.patterns[Pe.id]={min:tt,mid:vt,max:kt}}}return W}class Jr{constructor(P){this.zoom=P.zoom,this.overscaling=P.overscaling,this.layers=P.layers,this.layerIds=this.layers.map(W=>W.id),this.index=P.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new zs,this.indexArray=new we,this.indexArray2=new Be,this.programConfigurations=new al(P.layers,P.zoom),this.segments=new it,this.segments2=new it,this.stateDependentLayerIds=this.layers.filter(W=>W.isStateDependent()).map(W=>W.id)}populate(P,W,oe){this.hasPattern=Kt("fill",this.layers,W);let me=this.layers[0].layout.get("fill-sort-key"),ke=!me.isConstant(),Pe=[];for(let{feature:Ge,id:tt,index:vt,sourceLayerIndex:kt}of P){let Gt=this.layers[0]._featureFilter.needGeometry,tr=cl(Ge,Gt);if(!this.layers[0]._featureFilter.filter(new $o(this.zoom),tr,oe))continue;let lr=ke?me.evaluate(tr,{},oe,W.availableImages):void 0,xr={id:tt,properties:Ge.properties,type:Ge.type,sourceLayerIndex:kt,index:vt,geometry:Gt?tr.geometry:Bs(Ge),patterns:{},sortKey:lr};Pe.push(xr)}ke&&Pe.sort((Ge,tt)=>Ge.sortKey-tt.sortKey);for(let Ge of Pe){let{geometry:tt,index:vt,sourceLayerIndex:kt}=Ge;if(this.hasPattern){let Gt=Or("fill",this.layers,Ge,this.zoom,W);this.patternFeatures.push(Gt)}else this.addFeature(Ge,tt,vt,oe,{});W.featureIndex.insert(P[vt].feature,tt,vt,kt,this.index)}}update(P,W,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(P,W,this.stateDependentLayers,oe)}addFeatures(P,W,oe){for(let me of this.patternFeatures)this.addFeature(me,me.geometry,me.index,W,oe)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(P){this.uploaded||(this.layoutVertexBuffer=P.createVertexBuffer(this.layoutVertexArray,Ml),this.indexBuffer=P.createIndexBuffer(this.indexArray),this.indexBuffer2=P.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(P),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(P,W,oe,me,ke){for(let Pe of du(W,500)){let Ge=0;for(let lr of Pe)Ge+=lr.length;let tt=this.segments.prepareSegment(Ge,this.layoutVertexArray,this.indexArray),vt=tt.vertexLength,kt=[],Gt=[];for(let lr of Pe){if(lr.length===0)continue;lr!==Pe[0]&&Gt.push(kt.length/2);let xr=this.segments2.prepareSegment(lr.length,this.layoutVertexArray,this.indexArray2),Dr=xr.vertexLength;this.layoutVertexArray.emplaceBack(lr[0].x,lr[0].y),this.indexArray2.emplaceBack(Dr+lr.length-1,Dr),kt.push(lr[0].x),kt.push(lr[0].y);for(let sa=1;sa>3}if(me--,oe===1||oe===2)ke+=V.readSVarint(),Pe+=V.readSVarint(),oe===1&&(P&&Ge.push(P),P=[]),P.push(new xa(ke,Pe));else{if(oe!==7)throw new Error("unknown command "+oe);P&&P.push(P[0].clone())}}return P&&Ge.push(P),Ge},mn.prototype.bbox=function(){var V=this._pbf;V.pos=this._geometry;for(var P=V.readVarint()+V.pos,W=1,oe=0,me=0,ke=0,Pe=1/0,Ge=-1/0,tt=1/0,vt=-1/0;V.pos>3}if(oe--,W===1||W===2)(me+=V.readSVarint())Ge&&(Ge=me),(ke+=V.readSVarint())vt&&(vt=ke);else if(W!==7)throw new Error("unknown command "+W)}return[Pe,tt,Ge,vt]},mn.prototype.toGeoJSON=function(V,P,W){var oe,me,ke=this.extent*Math.pow(2,W),Pe=this.extent*V,Ge=this.extent*P,tt=this.loadGeometry(),vt=mn.types[this.type];function kt(lr){for(var xr=0;xr>3;me=Pe===1?oe.readString():Pe===2?oe.readFloat():Pe===3?oe.readDouble():Pe===4?oe.readVarint64():Pe===5?oe.readVarint():Pe===6?oe.readSVarint():Pe===7?oe.readBoolean():null}return me}(W))}hn.prototype.feature=function(V){if(V<0||V>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[V];var P=this._pbf.readVarint()+this._pbf.pos;return new On(this._pbf,P,this.extent,this._keys,this._values)};var In=Fn;function fi(V,P,W){if(V===3){var oe=new In(W,W.readVarint()+W.pos);oe.length&&(P[oe.name]=oe)}}ta.VectorTile=function(V,P){this.layers=V.readFields(fi,{},P)},ta.VectorTileFeature=Zn,ta.VectorTileLayer=Fn;let Ko=ta.VectorTileFeature.types,dl=Math.pow(2,13);function Cu(V,P,W,oe,me,ke,Pe,Ge){V.emplaceBack(P,W,2*Math.floor(oe*dl)+Pe,me*dl*2,ke*dl*2,Math.round(Ge))}class pc{constructor(P){this.zoom=P.zoom,this.overscaling=P.overscaling,this.layers=P.layers,this.layerIds=this.layers.map(W=>W.id),this.index=P.index,this.hasPattern=!1,this.layoutVertexArray=new Il,this.centroidVertexArray=new Ks,this.indexArray=new we,this.programConfigurations=new al(P.layers,P.zoom),this.segments=new it,this.stateDependentLayerIds=this.layers.filter(W=>W.isStateDependent()).map(W=>W.id)}populate(P,W,oe){this.features=[],this.hasPattern=Kt("fill-extrusion",this.layers,W);for(let{feature:me,id:ke,index:Pe,sourceLayerIndex:Ge}of P){let tt=this.layers[0]._featureFilter.needGeometry,vt=cl(me,tt);if(!this.layers[0]._featureFilter.filter(new $o(this.zoom),vt,oe))continue;let kt={id:ke,sourceLayerIndex:Ge,index:Pe,geometry:tt?vt.geometry:Bs(me),properties:me.properties,type:me.type,patterns:{}};this.hasPattern?this.features.push(Or("fill-extrusion",this.layers,kt,this.zoom,W)):this.addFeature(kt,kt.geometry,Pe,oe,{}),W.featureIndex.insert(me,kt.geometry,Pe,Ge,this.index,!0)}}addFeatures(P,W,oe){for(let me of this.features){let{geometry:ke}=me;this.addFeature(me,ke,me.index,W,oe)}}update(P,W,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(P,W,this.stateDependentLayers,oe)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(P){this.uploaded||(this.layoutVertexBuffer=P.createVertexBuffer(this.layoutVertexArray,Cr),this.centroidVertexBuffer=P.createVertexBuffer(this.centroidVertexArray,Nt.members,!0),this.indexBuffer=P.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(P),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(P,W,oe,me,ke){for(let Pe of du(W,500)){let Ge={x:0,y:0,vertexCount:0},tt=0;for(let xr of Pe)tt+=xr.length;let vt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let xr of Pe){if(xr.length===0||lu(xr))continue;let Dr=0;for(let sa=0;sa=1){let cn=xr[sa-1];if(!Gc(ga,cn)){vt.vertexLength+4>it.MAX_VERTEX_ARRAY_LENGTH&&(vt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let Da=ga.sub(cn)._perp()._unit(),en=cn.dist(ga);Dr+en>32768&&(Dr=0),Cu(this.layoutVertexArray,ga.x,ga.y,Da.x,Da.y,0,0,Dr),Cu(this.layoutVertexArray,ga.x,ga.y,Da.x,Da.y,0,1,Dr),Ge.x+=2*ga.x,Ge.y+=2*ga.y,Ge.vertexCount+=2,Dr+=en,Cu(this.layoutVertexArray,cn.x,cn.y,Da.x,Da.y,0,0,Dr),Cu(this.layoutVertexArray,cn.x,cn.y,Da.x,Da.y,0,1,Dr),Ge.x+=2*cn.x,Ge.y+=2*cn.y,Ge.vertexCount+=2;let zn=vt.vertexLength;this.indexArray.emplaceBack(zn,zn+2,zn+1),this.indexArray.emplaceBack(zn+1,zn+2,zn+3),vt.vertexLength+=4,vt.primitiveLength+=2}}}}if(vt.vertexLength+tt>it.MAX_VERTEX_ARRAY_LENGTH&&(vt=this.segments.prepareSegment(tt,this.layoutVertexArray,this.indexArray)),Ko[P.type]!=="Polygon")continue;let kt=[],Gt=[],tr=vt.vertexLength;for(let xr of Pe)if(xr.length!==0){xr!==Pe[0]&&Gt.push(kt.length/2);for(let Dr=0;DrQi)||V.y===P.y&&(V.y<0||V.y>Qi)}function lu(V){return V.every(P=>P.x<0)||V.every(P=>P.x>Qi)||V.every(P=>P.y<0)||V.every(P=>P.y>Qi)}let $f;Pa("FillExtrusionBucket",pc,{omit:["layers","features"]});var pP={get paint(){return $f=$f||new Me({"fill-extrusion-opacity":new Xi(re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new vo(re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Xi(re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Xi(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new mf(re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new vo(re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new vo(re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Xi(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class mP extends J{constructor(P){super(P,pP)}createBucket(P){return new pc(P)}queryRadius(){return Wn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(P,W,oe,me,ke,Pe,Ge,tt){let vt=Tn(P,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Pe.angle,Ge),kt=this.paint.get("fill-extrusion-height").evaluate(W,oe),Gt=this.paint.get("fill-extrusion-base").evaluate(W,oe),tr=function(xr,Dr,sa,ga){let cn=[];for(let Da of xr){let en=[Da.x,Da.y,0,1];Hn(en,en,Dr),cn.push(new n(en[0]/en[3],en[1]/en[3]))}return cn}(vt,tt),lr=function(xr,Dr,sa,ga){let cn=[],Da=[],en=ga[8]*Dr,zn=ga[9]*Dr,mi=ga[10]*Dr,Ji=ga[11]*Dr,Uo=ga[8]*sa,$i=ga[9]*sa,qi=ga[10]*sa,To=ga[11]*sa;for(let fo of xr){let io=[],Kn=[];for(let Eo of fo){let xo=Eo.x,Qo=Eo.y,Rl=ga[0]*xo+ga[4]*Qo+ga[12],kl=ga[1]*xo+ga[5]*Qo+ga[13],Cc=ga[2]*xo+ga[6]*Qo+ga[14],lh=ga[3]*xo+ga[7]*Qo+ga[15],cf=Cc+mi,Lc=lh+Ji,Pf=Rl+Uo,If=kl+$i,Df=Cc+qi,Bu=lh+To,Pc=new n((Rl+en)/Lc,(kl+zn)/Lc);Pc.z=cf/Lc,io.push(Pc);let gf=new n(Pf/Bu,If/Bu);gf.z=Df/Bu,Kn.push(gf)}cn.push(io),Da.push(Kn)}return[cn,Da]}(me,Gt,kt,tt);return function(xr,Dr,sa){let ga=1/0;Pt(sa,Dr)&&(ga=Rw(sa,Dr[0]));for(let cn=0;cnW.id),this.index=P.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(W=>{this.gradients[W.id]={}}),this.layoutVertexArray=new _u,this.layoutVertexArray2=new Xl,this.indexArray=new we,this.programConfigurations=new al(P.layers,P.zoom),this.segments=new it,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(W=>W.isStateDependent()).map(W=>W.id)}populate(P,W,oe){this.hasPattern=Kt("line",this.layers,W);let me=this.layers[0].layout.get("line-sort-key"),ke=!me.isConstant(),Pe=[];for(let{feature:Ge,id:tt,index:vt,sourceLayerIndex:kt}of P){let Gt=this.layers[0]._featureFilter.needGeometry,tr=cl(Ge,Gt);if(!this.layers[0]._featureFilter.filter(new $o(this.zoom),tr,oe))continue;let lr=ke?me.evaluate(tr,{},oe):void 0,xr={id:tt,properties:Ge.properties,type:Ge.type,sourceLayerIndex:kt,index:vt,geometry:Gt?tr.geometry:Bs(Ge),patterns:{},sortKey:lr};Pe.push(xr)}ke&&Pe.sort((Ge,tt)=>Ge.sortKey-tt.sortKey);for(let Ge of Pe){let{geometry:tt,index:vt,sourceLayerIndex:kt}=Ge;if(this.hasPattern){let Gt=Or("line",this.layers,Ge,this.zoom,W);this.patternFeatures.push(Gt)}else this.addFeature(Ge,tt,vt,oe,{});W.featureIndex.insert(P[vt].feature,tt,vt,kt,this.index)}}update(P,W,oe){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(P,W,this.stateDependentLayers,oe)}addFeatures(P,W,oe){for(let me of this.patternFeatures)this.addFeature(me,me.geometry,me.index,W,oe)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(P){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=P.createVertexBuffer(this.layoutVertexArray2,bP)),this.layoutVertexBuffer=P.createVertexBuffer(this.layoutVertexArray,yP),this.indexBuffer=P.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(P),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(P){if(P.properties&&Object.prototype.hasOwnProperty.call(P.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(P.properties,"mapbox_clip_end"))return{start:+P.properties.mapbox_clip_start,end:+P.properties.mapbox_clip_end}}addFeature(P,W,oe,me,ke){let Pe=this.layers[0].layout,Ge=Pe.get("line-join").evaluate(P,{}),tt=Pe.get("line-cap"),vt=Pe.get("line-miter-limit"),kt=Pe.get("line-round-limit");this.lineClips=this.lineFeatureClips(P);for(let Gt of W)this.addLine(Gt,P,Ge,tt,vt,kt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,P,oe,ke,me)}addLine(P,W,oe,me,ke,Pe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let ga=0;ga=2&&P[tt-1].equals(P[tt-2]);)tt--;let vt=0;for(;vt0;if(Ji&&ga>vt){let To=tr.dist(lr);if(To>2*kt){let fo=tr.sub(tr.sub(lr)._mult(kt/To)._round());this.updateDistance(lr,fo),this.addCurrentVertex(fo,Dr,0,0,Gt),lr=fo}}let $i=lr&&xr,qi=$i?oe:Ge?"butt":me;if($i&&qi==="round"&&(znke&&(qi="bevel"),qi==="bevel"&&(zn>2&&(qi="flipbevel"),zn100)cn=sa.mult(-1);else{let To=zn*Dr.add(sa).mag()/Dr.sub(sa).mag();cn._perp()._mult(To*(Uo?-1:1))}this.addCurrentVertex(tr,cn,0,0,Gt),this.addCurrentVertex(tr,cn.mult(-1),0,0,Gt)}else if(qi==="bevel"||qi==="fakeround"){let To=-Math.sqrt(zn*zn-1),fo=Uo?To:0,io=Uo?0:To;if(lr&&this.addCurrentVertex(tr,Dr,fo,io,Gt),qi==="fakeround"){let Kn=Math.round(180*mi/Math.PI/20);for(let Eo=1;Eo2*kt){let fo=tr.add(xr.sub(tr)._mult(kt/To)._round());this.updateDistance(tr,fo),this.addCurrentVertex(fo,sa,0,0,Gt),tr=fo}}}}addCurrentVertex(P,W,oe,me,ke,Pe=!1){let Ge=W.y*me-W.x,tt=-W.y-W.x*me;this.addHalfVertex(P,W.x+W.y*oe,W.y-W.x*oe,Pe,!1,oe,ke),this.addHalfVertex(P,Ge,tt,Pe,!0,-me,ke),this.distance>Fw/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(P,W,oe,me,ke,Pe))}addHalfVertex({x:P,y:W},oe,me,ke,Pe,Ge,tt){let vt=.5*(this.lineClips?this.scaledDistance*(Fw-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((P<<1)+(ke?1:0),(W<<1)+(Pe?1:0),Math.round(63*oe)+128,Math.round(63*me)+128,1+(Ge===0?0:Ge<0?-1:1)|(63&vt)<<2,vt>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let kt=tt.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,kt),tt.primitiveLength++),Pe?this.e2=kt:this.e1=kt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(P,W){this.distance+=P.dist(W),this.updateScaledDistance()}}let zw,Bw;Pa("LineBucket",hy,{omit:["layers","patternFeatures"]});var Nw={get paint(){return Bw=Bw||new Me({"line-opacity":new vo(re.paint_line["line-opacity"]),"line-color":new vo(re.paint_line["line-color"]),"line-translate":new Xi(re.paint_line["line-translate"]),"line-translate-anchor":new Xi(re.paint_line["line-translate-anchor"]),"line-width":new vo(re.paint_line["line-width"]),"line-gap-width":new vo(re.paint_line["line-gap-width"]),"line-offset":new vo(re.paint_line["line-offset"]),"line-blur":new vo(re.paint_line["line-blur"]),"line-dasharray":new kc(re.paint_line["line-dasharray"]),"line-pattern":new mf(re.paint_line["line-pattern"]),"line-gradient":new ou(re.paint_line["line-gradient"])})},get layout(){return zw=zw||new Me({"line-cap":new Xi(re.layout_line["line-cap"]),"line-join":new vo(re.layout_line["line-join"]),"line-miter-limit":new Xi(re.layout_line["line-miter-limit"]),"line-round-limit":new Xi(re.layout_line["line-round-limit"]),"line-sort-key":new vo(re.layout_line["line-sort-key"])})}};class TP extends vo{possiblyEvaluate(P,W){return W=new $o(Math.floor(W.zoom),{now:W.now,fadeDuration:W.fadeDuration,zoomHistory:W.zoomHistory,transition:W.transition}),super.possiblyEvaluate(P,W)}evaluate(P,W,oe,me){return W=E({},W,{zoom:Math.floor(W.zoom)}),super.evaluate(P,W,oe,me)}}let cm;class AP extends J{constructor(P){super(P,Nw),this.gradientVersion=0,cm||(cm=new TP(Nw.paint.properties["line-width"].specification),cm.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(P){if(P==="line-gradient"){let W=this.gradientExpression();this.stepInterpolant=!!function(oe){return oe._styleExpression!==void 0}(W)&&W._styleExpression.expression instanceof ra,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(P,W){super.recalculate(P,W),this.paint._values["line-floorwidth"]=cm.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,P)}createBucket(P){return new hy(P)}queryRadius(P){let W=P,oe=Ow(Ua("line-width",this,W),Ua("line-gap-width",this,W)),me=Ua("line-offset",this,W);return oe/2+Math.abs(me)+Wn(this.paint.get("line-translate"))}queryIntersectsFeature(P,W,oe,me,ke,Pe,Ge){let tt=Tn(P,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Pe.angle,Ge),vt=Ge/2*Ow(this.paint.get("line-width").evaluate(W,oe),this.paint.get("line-gap-width").evaluate(W,oe)),kt=this.paint.get("line-offset").evaluate(W,oe);return kt&&(me=function(Gt,tr){let lr=[];for(let xr=0;xr=3){for(let sa=0;sa0?P+2*V:V}let MP=Ye([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),SP=Ye([{name:"a_projected_pos",components:3,type:"Float32"}],4);Ye([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let EP=Ye([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Ye([{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"}]);let Uw=Ye([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),kP=Ye([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function CP(V,P,W){return V.sections.forEach(oe=>{oe.text=function(me,ke,Pe){let Ge=ke.layout.get("text-transform").evaluate(Pe,{});return Ge==="uppercase"?me=me.toLocaleUpperCase():Ge==="lowercase"&&(me=me.toLocaleLowerCase()),ms.applyArabicShaping&&(me=ms.applyArabicShaping(me)),me}(oe.text,P,W)}),V}Ye([{name:"triangle",components:3,type:"Uint16"}]),Ye([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Ye([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Ye([{type:"Float32",name:"offsetX"}]),Ye([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Ye([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let zp={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var mc=24,jw=El,qw=function(V,P,W,oe,me){var ke,Pe,Ge=8*me-oe-1,tt=(1<>1,kt=-7,Gt=W?me-1:0,tr=W?-1:1,lr=V[P+Gt];for(Gt+=tr,ke=lr&(1<<-kt)-1,lr>>=-kt,kt+=Ge;kt>0;ke=256*ke+V[P+Gt],Gt+=tr,kt-=8);for(Pe=ke&(1<<-kt)-1,ke>>=-kt,kt+=oe;kt>0;Pe=256*Pe+V[P+Gt],Gt+=tr,kt-=8);if(ke===0)ke=1-vt;else{if(ke===tt)return Pe?NaN:1/0*(lr?-1:1);Pe+=Math.pow(2,oe),ke-=vt}return(lr?-1:1)*Pe*Math.pow(2,ke-oe)},Vw=function(V,P,W,oe,me,ke){var Pe,Ge,tt,vt=8*ke-me-1,kt=(1<>1,tr=me===23?Math.pow(2,-24)-Math.pow(2,-77):0,lr=oe?0:ke-1,xr=oe?1:-1,Dr=P<0||P===0&&1/P<0?1:0;for(P=Math.abs(P),isNaN(P)||P===1/0?(Ge=isNaN(P)?1:0,Pe=kt):(Pe=Math.floor(Math.log(P)/Math.LN2),P*(tt=Math.pow(2,-Pe))<1&&(Pe--,tt*=2),(P+=Pe+Gt>=1?tr/tt:tr*Math.pow(2,1-Gt))*tt>=2&&(Pe++,tt/=2),Pe+Gt>=kt?(Ge=0,Pe=kt):Pe+Gt>=1?(Ge=(P*tt-1)*Math.pow(2,me),Pe+=Gt):(Ge=P*Math.pow(2,Gt-1)*Math.pow(2,me),Pe=0));me>=8;V[W+lr]=255&Ge,lr+=xr,Ge/=256,me-=8);for(Pe=Pe<0;V[W+lr]=255&Pe,lr+=xr,Pe/=256,vt-=8);V[W+lr-xr]|=128*Dr};function El(V){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(V)?V:new Uint8Array(V||0),this.pos=0,this.type=0,this.length=this.buf.length}El.Varint=0,El.Fixed64=1,El.Bytes=2,El.Fixed32=5;var dy=4294967296,Hw=1/dy,Gw=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function $h(V){return V.type===El.Bytes?V.readVarint()+V.pos:V.pos+1}function qv(V,P,W){return W?4294967296*P+(V>>>0):4294967296*(P>>>0)+(V>>>0)}function Ww(V,P,W){var oe=P<=16383?1:P<=2097151?2:P<=268435455?3:Math.floor(Math.log(P)/(7*Math.LN2));W.realloc(oe);for(var me=W.pos-1;me>=V;me--)W.buf[me+oe]=W.buf[me]}function LP(V,P){for(var W=0;W>>8,V[W+2]=P>>>16,V[W+3]=P>>>24}function Yw(V,P){return(V[P]|V[P+1]<<8|V[P+2]<<16)+(V[P+3]<<24)}El.prototype={destroy:function(){this.buf=null},readFields:function(V,P,W){for(W=W||this.length;this.pos>3,ke=this.pos;this.type=7&oe,V(me,P,this),this.pos===ke&&this.skip(oe)}return P},readMessage:function(V,P){return this.readFields(V,P,this.readVarint()+this.pos)},readFixed32:function(){var V=fm(this.buf,this.pos);return this.pos+=4,V},readSFixed32:function(){var V=Yw(this.buf,this.pos);return this.pos+=4,V},readFixed64:function(){var V=fm(this.buf,this.pos)+fm(this.buf,this.pos+4)*dy;return this.pos+=8,V},readSFixed64:function(){var V=fm(this.buf,this.pos)+Yw(this.buf,this.pos+4)*dy;return this.pos+=8,V},readFloat:function(){var V=qw(this.buf,this.pos,!0,23,4);return this.pos+=4,V},readDouble:function(){var V=qw(this.buf,this.pos,!0,52,8);return this.pos+=8,V},readVarint:function(V){var P,W,oe=this.buf;return P=127&(W=oe[this.pos++]),W<128?P:(P|=(127&(W=oe[this.pos++]))<<7,W<128?P:(P|=(127&(W=oe[this.pos++]))<<14,W<128?P:(P|=(127&(W=oe[this.pos++]))<<21,W<128?P:function(me,ke,Pe){var Ge,tt,vt=Pe.buf;if(Ge=(112&(tt=vt[Pe.pos++]))>>4,tt<128||(Ge|=(127&(tt=vt[Pe.pos++]))<<3,tt<128)||(Ge|=(127&(tt=vt[Pe.pos++]))<<10,tt<128)||(Ge|=(127&(tt=vt[Pe.pos++]))<<17,tt<128)||(Ge|=(127&(tt=vt[Pe.pos++]))<<24,tt<128)||(Ge|=(1&(tt=vt[Pe.pos++]))<<31,tt<128))return qv(me,Ge,ke);throw new Error("Expected varint not more than 10 bytes")}(P|=(15&(W=oe[this.pos]))<<28,V,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var V=this.readVarint();return V%2==1?(V+1)/-2:V/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var V=this.readVarint()+this.pos,P=this.pos;return this.pos=V,V-P>=12&&Gw?function(W,oe,me){return Gw.decode(W.subarray(oe,me))}(this.buf,P,V):function(W,oe,me){for(var ke="",Pe=oe;Pe239?4:kt>223?3:kt>191?2:1;if(Pe+tr>me)break;tr===1?kt<128&&(Gt=kt):tr===2?(192&(Ge=W[Pe+1]))==128&&(Gt=(31&kt)<<6|63&Ge)<=127&&(Gt=null):tr===3?(tt=W[Pe+2],(192&(Ge=W[Pe+1]))==128&&(192&tt)==128&&((Gt=(15&kt)<<12|(63&Ge)<<6|63&tt)<=2047||Gt>=55296&&Gt<=57343)&&(Gt=null)):tr===4&&(tt=W[Pe+2],vt=W[Pe+3],(192&(Ge=W[Pe+1]))==128&&(192&tt)==128&&(192&vt)==128&&((Gt=(15&kt)<<18|(63&Ge)<<12|(63&tt)<<6|63&vt)<=65535||Gt>=1114112)&&(Gt=null)),Gt===null?(Gt=65533,tr=1):Gt>65535&&(Gt-=65536,ke+=String.fromCharCode(Gt>>>10&1023|55296),Gt=56320|1023&Gt),ke+=String.fromCharCode(Gt),Pe+=tr}return ke}(this.buf,P,V)},readBytes:function(){var V=this.readVarint()+this.pos,P=this.buf.subarray(this.pos,V);return this.pos=V,P},readPackedVarint:function(V,P){if(this.type!==El.Bytes)return V.push(this.readVarint(P));var W=$h(this);for(V=V||[];this.pos127;);else if(P===El.Bytes)this.pos=this.readVarint()+this.pos;else if(P===El.Fixed32)this.pos+=4;else{if(P!==El.Fixed64)throw new Error("Unimplemented type: "+P);this.pos+=8}},writeTag:function(V,P){this.writeVarint(V<<3|P)},realloc:function(V){for(var P=this.length||16;P268435455||V<0?function(P,W){var oe,me;if(P>=0?(oe=P%4294967296|0,me=P/4294967296|0):(me=~(-P/4294967296),4294967295^(oe=~(-P%4294967296))?oe=oe+1|0:(oe=0,me=me+1|0)),P>=18446744073709552e3||P<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");W.realloc(10),function(ke,Pe,Ge){Ge.buf[Ge.pos++]=127&ke|128,ke>>>=7,Ge.buf[Ge.pos++]=127&ke|128,ke>>>=7,Ge.buf[Ge.pos++]=127&ke|128,ke>>>=7,Ge.buf[Ge.pos++]=127&ke|128,Ge.buf[Ge.pos]=127&(ke>>>=7)}(oe,0,W),function(ke,Pe){var Ge=(7&ke)<<4;Pe.buf[Pe.pos++]|=Ge|((ke>>>=3)?128:0),ke&&(Pe.buf[Pe.pos++]=127&ke|((ke>>>=7)?128:0),ke&&(Pe.buf[Pe.pos++]=127&ke|((ke>>>=7)?128:0),ke&&(Pe.buf[Pe.pos++]=127&ke|((ke>>>=7)?128:0),ke&&(Pe.buf[Pe.pos++]=127&ke|((ke>>>=7)?128:0),ke&&(Pe.buf[Pe.pos++]=127&ke)))))}(me,W)}(V,this):(this.realloc(4),this.buf[this.pos++]=127&V|(V>127?128:0),V<=127||(this.buf[this.pos++]=127&(V>>>=7)|(V>127?128:0),V<=127||(this.buf[this.pos++]=127&(V>>>=7)|(V>127?128:0),V<=127||(this.buf[this.pos++]=V>>>7&127))))},writeSVarint:function(V){this.writeVarint(V<0?2*-V-1:2*V)},writeBoolean:function(V){this.writeVarint(!!V)},writeString:function(V){V=String(V),this.realloc(4*V.length),this.pos++;var P=this.pos;this.pos=function(oe,me,ke){for(var Pe,Ge,tt=0;tt55295&&Pe<57344){if(!Ge){Pe>56319||tt+1===me.length?(oe[ke++]=239,oe[ke++]=191,oe[ke++]=189):Ge=Pe;continue}if(Pe<56320){oe[ke++]=239,oe[ke++]=191,oe[ke++]=189,Ge=Pe;continue}Pe=Ge-55296<<10|Pe-56320|65536,Ge=null}else Ge&&(oe[ke++]=239,oe[ke++]=191,oe[ke++]=189,Ge=null);Pe<128?oe[ke++]=Pe:(Pe<2048?oe[ke++]=Pe>>6|192:(Pe<65536?oe[ke++]=Pe>>12|224:(oe[ke++]=Pe>>18|240,oe[ke++]=Pe>>12&63|128),oe[ke++]=Pe>>6&63|128),oe[ke++]=63&Pe|128)}return ke}(this.buf,V,this.pos);var W=this.pos-P;W>=128&&Ww(P,W,this),this.pos=P-1,this.writeVarint(W),this.pos+=W},writeFloat:function(V){this.realloc(4),Vw(this.buf,V,this.pos,!0,23,4),this.pos+=4},writeDouble:function(V){this.realloc(8),Vw(this.buf,V,this.pos,!0,52,8),this.pos+=8},writeBytes:function(V){var P=V.length;this.writeVarint(P),this.realloc(P);for(var W=0;W=128&&Ww(W,oe,this),this.pos=W-1,this.writeVarint(oe),this.pos+=oe},writeMessage:function(V,P,W){this.writeTag(V,El.Bytes),this.writeRawMessage(P,W)},writePackedVarint:function(V,P){P.length&&this.writeMessage(V,LP,P)},writePackedSVarint:function(V,P){P.length&&this.writeMessage(V,PP,P)},writePackedBoolean:function(V,P){P.length&&this.writeMessage(V,RP,P)},writePackedFloat:function(V,P){P.length&&this.writeMessage(V,IP,P)},writePackedDouble:function(V,P){P.length&&this.writeMessage(V,DP,P)},writePackedFixed32:function(V,P){P.length&&this.writeMessage(V,FP,P)},writePackedSFixed32:function(V,P){P.length&&this.writeMessage(V,zP,P)},writePackedFixed64:function(V,P){P.length&&this.writeMessage(V,BP,P)},writePackedSFixed64:function(V,P){P.length&&this.writeMessage(V,NP,P)},writeBytesField:function(V,P){this.writeTag(V,El.Bytes),this.writeBytes(P)},writeFixed32Field:function(V,P){this.writeTag(V,El.Fixed32),this.writeFixed32(P)},writeSFixed32Field:function(V,P){this.writeTag(V,El.Fixed32),this.writeSFixed32(P)},writeFixed64Field:function(V,P){this.writeTag(V,El.Fixed64),this.writeFixed64(P)},writeSFixed64Field:function(V,P){this.writeTag(V,El.Fixed64),this.writeSFixed64(P)},writeVarintField:function(V,P){this.writeTag(V,El.Varint),this.writeVarint(P)},writeSVarintField:function(V,P){this.writeTag(V,El.Varint),this.writeSVarint(P)},writeStringField:function(V,P){this.writeTag(V,El.Bytes),this.writeString(P)},writeFloatField:function(V,P){this.writeTag(V,El.Fixed32),this.writeFloat(P)},writeDoubleField:function(V,P){this.writeTag(V,El.Fixed64),this.writeDouble(P)},writeBooleanField:function(V,P){this.writeVarintField(V,!!P)}};var vy=t(jw);let py=3;function OP(V,P,W){V===1&&W.readMessage(UP,P)}function UP(V,P,W){if(V===3){let{id:oe,bitmap:me,width:ke,height:Pe,left:Ge,top:tt,advance:vt}=W.readMessage(jP,{});P.push({id:oe,bitmap:new si({width:ke+2*py,height:Pe+2*py},me),metrics:{width:ke,height:Pe,left:Ge,top:tt,advance:vt}})}}function jP(V,P,W){V===1?P.id=W.readVarint():V===2?P.bitmap=W.readBytes():V===3?P.width=W.readVarint():V===4?P.height=W.readVarint():V===5?P.left=W.readSVarint():V===6?P.top=W.readSVarint():V===7&&(P.advance=W.readVarint())}let Xw=py;function $w(V){let P=0,W=0;for(let Pe of V)P+=Pe.w*Pe.h,W=Math.max(W,Pe.w);V.sort((Pe,Ge)=>Ge.h-Pe.h);let oe=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(P/.95)),W),h:1/0}],me=0,ke=0;for(let Pe of V)for(let Ge=oe.length-1;Ge>=0;Ge--){let tt=oe[Ge];if(!(Pe.w>tt.w||Pe.h>tt.h)){if(Pe.x=tt.x,Pe.y=tt.y,ke=Math.max(ke,Pe.y+Pe.h),me=Math.max(me,Pe.x+Pe.w),Pe.w===tt.w&&Pe.h===tt.h){let vt=oe.pop();Ge=0&&oe>=P&&dm[this.text.charCodeAt(oe)];oe--)W--;this.text=this.text.substring(P,W),this.sectionIndex=this.sectionIndex.slice(P,W)}substring(P,W){let oe=new Hv;return oe.text=this.text.substring(P,W),oe.sectionIndex=this.sectionIndex.slice(P,W),oe.sections=this.sections,oe}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((P,W)=>Math.max(P,this.sections[W].scale),0)}addTextSection(P,W){this.text+=P.text,this.sections.push(Np.forText(P.scale,P.fontStack||W));let oe=this.sections.length-1;for(let me=0;me=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function hm(V,P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr,lr,xr){let Dr=Hv.fromFeature(V,me),sa;Gt===l.ah.vertical&&Dr.verticalizePunctuation();let{processBidirectionalText:ga,processStyledBidirectionalText:cn}=ms;if(ga&&Dr.sections.length===1){sa=[];let zn=ga(Dr.toString(),gy(Dr,vt,ke,P,oe,lr));for(let mi of zn){let Ji=new Hv;Ji.text=mi,Ji.sections=Dr.sections;for(let Uo=0;Uo0&&Zh>hf&&(hf=Zh)}else{let eh=Ji[Qs.fontStack],Wc=eh&&eh[$l];if(Wc&&Wc.rect)Xv=Wc.rect,Lu=Wc.metrics;else{let Zh=mi[Qs.fontStack],Hp=Zh&&Zh[$l];if(!Hp)continue;Lu=Hp.metrics}Zf=(Pc-Qs.scale)*mc}uh?(zn.verticalizable=!0,Rf.push({glyph:$l,imageName:Dh,x:Qo,y:Rl+Zf,vertical:uh,scale:Qs.scale,fontStack:Qs.fontStack,sectionIndex:Ul,metrics:Lu,rect:Xv}),Qo+=Rh*Qs.scale+Kn):(Rf.push({glyph:$l,imageName:Dh,x:Qo,y:Rl+Zf,vertical:uh,scale:Qs.scale,fontStack:Qs.fontStack,sectionIndex:Ul,metrics:Lu,rect:Xv}),Qo+=Lu.advance*Qs.scale+Kn)}Rf.length!==0&&(kl=Math.max(Qo-Kn,kl),GP(Rf,0,Rf.length-1,lh,hf)),Qo=0;let Qf=qi*Pc+hf;ff.lineOffset=Math.max(hf,gf),Rl+=Qf,Cc=Math.max(Qf,Cc),++cf}var Lc;let Pf=Rl-Bp,{horizontalAlign:If,verticalAlign:Df}=yy(To);(function(Bu,Pc,gf,ff,Rf,hf,Qf,Uf,Qs){let Ul=(Pc-gf)*Rf,$l=0;$l=hf!==Qf?-Uf*ff-Bp:(-ff*Qs+.5)*Qf;for(let Zf of Bu)for(let Lu of Zf.positionedGlyphs)Lu.x+=Ul,Lu.y+=$l})(zn.positionedLines,lh,If,Df,kl,Cc,qi,Pf,$i.length),zn.top+=-Df*Pf,zn.bottom=zn.top+Pf,zn.left+=-If*kl,zn.right=zn.left+kl}(en,P,W,oe,sa,Pe,Ge,tt,Gt,vt,tr,xr),!function(zn){for(let mi of zn)if(mi.positionedGlyphs.length!==0)return!1;return!0}(Da)&&en}let dm={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},qP={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},VP={40:!0};function Kw(V,P,W,oe,me,ke){if(P.imageName){let Pe=oe[P.imageName];return Pe?Pe.displaySize[0]*P.scale*mc/ke+me:0}{let Pe=W[P.fontStack],Ge=Pe&&Pe[V];return Ge?Ge.metrics.advance*P.scale+me:0}}function Jw(V,P,W,oe){let me=Math.pow(V-P,2);return oe?V=0,vt=0;for(let Gt=0;Gtvt){let kt=Math.ceil(ke/vt);me*=kt/Pe,Pe=kt}return{x1:oe,y1:me,x2:oe+ke,y2:me+Pe}}function r5(V,P,W,oe,me,ke){let Pe=V.image,Ge;if(Pe.content){let sa=Pe.content,ga=Pe.pixelRatio||1;Ge=[sa[0]/ga,sa[1]/ga,Pe.displaySize[0]-sa[2]/ga,Pe.displaySize[1]-sa[3]/ga]}let tt=P.left*ke,vt=P.right*ke,kt,Gt,tr,lr;W==="width"||W==="both"?(lr=me[0]+tt-oe[3],Gt=me[0]+vt+oe[1]):(lr=me[0]+(tt+vt-Pe.displaySize[0])/2,Gt=lr+Pe.displaySize[0]);let xr=P.top*ke,Dr=P.bottom*ke;return W==="height"||W==="both"?(kt=me[1]+xr-oe[0],tr=me[1]+Dr+oe[2]):(kt=me[1]+(xr+Dr-Pe.displaySize[1])/2,tr=kt+Pe.displaySize[1]),{image:Pe,top:kt,right:Gt,bottom:tr,left:lr,collisionPadding:Ge}}let Op=255,Ih=128,Td=Op*Ih;function a5(V,P){let{expression:W}=P;if(W.kind==="constant")return{kind:"constant",layoutSize:W.evaluate(new $o(V+1))};if(W.kind==="source")return{kind:"source"};{let{zoomStops:oe,interpolationType:me}=W,ke=0;for(;kePe.id),this.index=P.index,this.pixelRatio=P.pixelRatio,this.sourceLayerIndex=P.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Fa([]),this.placementViewportMatrix=Fa([]);let W=this.layers[0]._unevaluatedLayout._values;this.textSizeData=a5(this.zoom,W["text-size"]),this.iconSizeData=a5(this.zoom,W["icon-size"]);let oe=this.layers[0].layout,me=oe.get("symbol-sort-key"),ke=oe.get("symbol-z-order");this.canOverlap=_y(oe,"text-overlap","text-allow-overlap")!=="never"||_y(oe,"icon-overlap","icon-allow-overlap")!=="never"||oe.get("text-ignore-placement")||oe.get("icon-ignore-placement"),this.sortFeaturesByKey=ke!=="viewport-y"&&!me.isConstant(),this.sortFeaturesByY=(ke==="viewport-y"||ke==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,oe.get("symbol-placement")==="point"&&(this.writingModes=oe.get("text-writing-mode").map(Pe=>l.ah[Pe])),this.stateDependentLayerIds=this.layers.filter(Pe=>Pe.isStateDependent()).map(Pe=>Pe.id),this.sourceID=P.sourceID}createArrays(){this.text=new xy(new al(this.layers,this.zoom,P=>/^text/.test(P))),this.icon=new xy(new al(this.layers,this.zoom,P=>/^icon/.test(P))),this.glyphOffsetArray=new Lo,this.lineVertexArray=new bo,this.symbolInstances=new Ki,this.textAnchorOffsets=new Zo}calculateGlyphDependencies(P,W,oe,me,ke){for(let Pe=0;Pe0)&&(Pe.value.kind!=="constant"||Pe.value.value.length>0),kt=tt.value.kind!=="constant"||!!tt.value.value||Object.keys(tt.parameters).length>0,Gt=ke.get("symbol-sort-key");if(this.features=[],!vt&&!kt)return;let tr=W.iconDependencies,lr=W.glyphDependencies,xr=W.availableImages,Dr=new $o(this.zoom);for(let{feature:sa,id:ga,index:cn,sourceLayerIndex:Da}of P){let en=me._featureFilter.needGeometry,zn=cl(sa,en);if(!me._featureFilter.filter(Dr,zn,oe))continue;let mi,Ji;if(en||(zn.geometry=Bs(sa)),vt){let $i=me.getValueAndResolveTokens("text-field",zn,oe,xr),qi=bn.factory($i),To=this.hasRTLText=this.hasRTLText||$P(qi);(!To||ms.getRTLTextPluginStatus()==="unavailable"||To&&ms.isParsed())&&(mi=CP(qi,me,zn))}if(kt){let $i=me.getValueAndResolveTokens("icon-image",zn,oe,xr);Ji=$i instanceof Jn?$i:Jn.fromString($i)}if(!mi&&!Ji)continue;let Uo=this.sortFeaturesByKey?Gt.evaluate(zn,{},oe):void 0;if(this.features.push({id:ga,text:mi,icon:Ji,index:cn,sourceLayerIndex:Da,geometry:zn.geometry,properties:sa.properties,type:YP[sa.type],sortKey:Uo}),Ji&&(tr[Ji.name]=!0),mi){let $i=Pe.evaluate(zn,{},oe).join(","),qi=ke.get("text-rotation-alignment")!=="viewport"&&ke.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(l.ah.vertical)>=0;for(let To of mi.sections)if(To.image)tr[To.image.name]=!0;else{let fo=no(mi.toString()),io=To.fontStack||$i,Kn=lr[io]=lr[io]||{};this.calculateGlyphDependencies(To.text,Kn,qi,this.allowVerticalPlacement,fo)}}}ke.get("symbol-placement")==="line"&&(this.features=function(sa){let ga={},cn={},Da=[],en=0;function zn($i){Da.push(sa[$i]),en++}function mi($i,qi,To){let fo=cn[$i];return delete cn[$i],cn[qi]=fo,Da[fo].geometry[0].pop(),Da[fo].geometry[0]=Da[fo].geometry[0].concat(To[0]),fo}function Ji($i,qi,To){let fo=ga[qi];return delete ga[qi],ga[$i]=fo,Da[fo].geometry[0].shift(),Da[fo].geometry[0]=To[0].concat(Da[fo].geometry[0]),fo}function Uo($i,qi,To){let fo=To?qi[0][qi[0].length-1]:qi[0][0];return`${$i}:${fo.x}:${fo.y}`}for(let $i=0;$i$i.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((sa,ga)=>sa.sortKey-ga.sortKey)}update(P,W,oe){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(P,W,this.layers,oe),this.icon.programConfigurations.updatePaintArrays(P,W,this.layers,oe))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(P){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(P),this.iconCollisionBox.upload(P)),this.text.upload(P,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(P,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(P,W){let oe=this.lineVertexArray.length;if(P.segment!==void 0){let me=P.dist(W[P.segment+1]),ke=P.dist(W[P.segment]),Pe={};for(let Ge=P.segment+1;Ge=0;Ge--)Pe[Ge]={x:W[Ge].x,y:W[Ge].y,tileUnitDistanceFromAnchor:ke},Ge>0&&(ke+=W[Ge-1].dist(W[Ge]));for(let Ge=0;Ge0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(P,W){let oe=P.placedSymbolArray.get(W),me=oe.vertexStartIndex+4*oe.numGlyphs;for(let ke=oe.vertexStartIndex;keme[Ge]-me[tt]||ke[tt]-ke[Ge]),Pe}addToSortKeyRanges(P,W){let oe=this.sortKeyRanges[this.sortKeyRanges.length-1];oe&&oe.sortKey===W?oe.symbolInstanceEnd=P+1:this.sortKeyRanges.push({sortKey:W,symbolInstanceStart:P,symbolInstanceEnd:P+1})}sortFeatures(P){if(this.sortFeaturesByY&&this.sortedAngle!==P&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(P),this.sortedAngle=P,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let W of this.symbolInstanceIndexes){let oe=this.symbolInstances.get(W);this.featureSortOrder.push(oe.featureIndex),[oe.rightJustifiedTextSymbolIndex,oe.centerJustifiedTextSymbolIndex,oe.leftJustifiedTextSymbolIndex].forEach((me,ke,Pe)=>{me>=0&&Pe.indexOf(me)===ke&&this.addIndicesForPlacedSymbol(this.text,me)}),oe.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,oe.verticalPlacedTextSymbolIndex),oe.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,oe.placedIconSymbolIndex),oe.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,oe.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let n5,i5;Pa("SymbolBucket",Gv,{omit:["layers","collisionBoxArray","features","compareText"]}),Gv.MAX_GLYPHS=65535,Gv.addDynamicAttributes=by;var Ty={get paint(){return i5=i5||new Me({"icon-opacity":new vo(re.paint_symbol["icon-opacity"]),"icon-color":new vo(re.paint_symbol["icon-color"]),"icon-halo-color":new vo(re.paint_symbol["icon-halo-color"]),"icon-halo-width":new vo(re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new vo(re.paint_symbol["icon-halo-blur"]),"icon-translate":new Xi(re.paint_symbol["icon-translate"]),"icon-translate-anchor":new Xi(re.paint_symbol["icon-translate-anchor"]),"text-opacity":new vo(re.paint_symbol["text-opacity"]),"text-color":new vo(re.paint_symbol["text-color"],{runtimeType:yt,getOverride:V=>V.textColor,hasOverride:V=>!!V.textColor}),"text-halo-color":new vo(re.paint_symbol["text-halo-color"]),"text-halo-width":new vo(re.paint_symbol["text-halo-width"]),"text-halo-blur":new vo(re.paint_symbol["text-halo-blur"]),"text-translate":new Xi(re.paint_symbol["text-translate"]),"text-translate-anchor":new Xi(re.paint_symbol["text-translate-anchor"])})},get layout(){return n5=n5||new Me({"symbol-placement":new Xi(re.layout_symbol["symbol-placement"]),"symbol-spacing":new Xi(re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Xi(re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new vo(re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Xi(re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Xi(re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Xi(re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Xi(re.layout_symbol["icon-ignore-placement"]),"icon-optional":new Xi(re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Xi(re.layout_symbol["icon-rotation-alignment"]),"icon-size":new vo(re.layout_symbol["icon-size"]),"icon-text-fit":new Xi(re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Xi(re.layout_symbol["icon-text-fit-padding"]),"icon-image":new vo(re.layout_symbol["icon-image"]),"icon-rotate":new vo(re.layout_symbol["icon-rotate"]),"icon-padding":new vo(re.layout_symbol["icon-padding"]),"icon-keep-upright":new Xi(re.layout_symbol["icon-keep-upright"]),"icon-offset":new vo(re.layout_symbol["icon-offset"]),"icon-anchor":new vo(re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Xi(re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Xi(re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Xi(re.layout_symbol["text-rotation-alignment"]),"text-field":new vo(re.layout_symbol["text-field"]),"text-font":new vo(re.layout_symbol["text-font"]),"text-size":new vo(re.layout_symbol["text-size"]),"text-max-width":new vo(re.layout_symbol["text-max-width"]),"text-line-height":new Xi(re.layout_symbol["text-line-height"]),"text-letter-spacing":new vo(re.layout_symbol["text-letter-spacing"]),"text-justify":new vo(re.layout_symbol["text-justify"]),"text-radial-offset":new vo(re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Xi(re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new vo(re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new vo(re.layout_symbol["text-anchor"]),"text-max-angle":new Xi(re.layout_symbol["text-max-angle"]),"text-writing-mode":new Xi(re.layout_symbol["text-writing-mode"]),"text-rotate":new vo(re.layout_symbol["text-rotate"]),"text-padding":new Xi(re.layout_symbol["text-padding"]),"text-keep-upright":new Xi(re.layout_symbol["text-keep-upright"]),"text-transform":new vo(re.layout_symbol["text-transform"]),"text-offset":new vo(re.layout_symbol["text-offset"]),"text-allow-overlap":new Xi(re.layout_symbol["text-allow-overlap"]),"text-overlap":new Xi(re.layout_symbol["text-overlap"]),"text-ignore-placement":new Xi(re.layout_symbol["text-ignore-placement"]),"text-optional":new Xi(re.layout_symbol["text-optional"])})}};class o5{constructor(P){if(P.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=P.property.overrides?P.property.overrides.runtimeType:qe,this.defaultValue=P}evaluate(P){if(P.formattedSection){let W=this.defaultValue.property.overrides;if(W&&W.hasOverride(P.formattedSection))return W.getOverride(P.formattedSection)}return P.feature&&P.featureState?this.defaultValue.evaluate(P.feature,P.featureState):this.defaultValue.property.specification.default}eachChild(P){this.defaultValue.isConstant()||P(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Pa("FormatSectionOverride",o5,{omit:["defaultValue"]});class pm extends J{constructor(P){super(P,Ty)}recalculate(P,W){if(super.recalculate(P,W),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let oe=this.layout.get("text-writing-mode");if(oe){let me=[];for(let ke of oe)me.indexOf(ke)<0&&me.push(ke);this.layout._values["text-writing-mode"]=me}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(P,W,oe,me){let ke=this.layout.get(P).evaluate(W,{},oe,me),Pe=this._unevaluatedLayout._values[P];return Pe.isDataDriven()||af(Pe.value)||!ke?ke:function(Ge,tt){return tt.replace(/{([^{}]+)}/g,(vt,kt)=>Ge&&kt in Ge?String(Ge[kt]):"")}(W.properties,ke)}createBucket(P){return new Gv(P)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let P of Ty.paint.overridableProperties){if(!pm.hasPaintOverride(this.layout,P))continue;let W=this.paint.get(P),oe=new o5(W),me=new au(oe,W.property.specification),ke=null;ke=W.value.kind==="constant"||W.value.kind==="source"?new Du("source",me):new Nl("composite",me,W.value.zoomStops),this.paint._values[P]=new Al(W.property,ke,W.parameters)}}_handleOverridablePaintPropertyUpdate(P,W,oe){return!(!this.layout||W.isDataDriven()||oe.isDataDriven())&&pm.hasPaintOverride(this.layout,P)}static hasPaintOverride(P,W){let oe=P.get("text-field"),me=Ty.paint.properties[W],ke=!1,Pe=Ge=>{for(let tt of Ge)if(me.overrides&&me.overrides.hasOverride(tt))return void(ke=!0)};if(oe.value.kind==="constant"&&oe.value.value instanceof bn)Pe(oe.value.value.sections);else if(oe.value.kind==="source"){let Ge=vt=>{ke||(vt instanceof Zi&&Ln(vt.value)===vr?Pe(vt.value.sections):vt instanceof ho?Pe(vt.sections):vt.eachChild(Ge))},tt=oe.value;tt._styleExpression&&Ge(tt._styleExpression.expression)}return ke}}let s5;var ZP={get paint(){return s5=s5||new Me({"background-color":new Xi(re.paint_background["background-color"]),"background-pattern":new kc(re.paint_background["background-pattern"]),"background-opacity":new Xi(re.paint_background["background-opacity"])})}};class KP extends J{constructor(P){super(P,ZP)}}let l5;var JP={get paint(){return l5=l5||new Me({"raster-opacity":new Xi(re.paint_raster["raster-opacity"]),"raster-hue-rotate":new Xi(re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Xi(re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Xi(re.paint_raster["raster-brightness-max"]),"raster-saturation":new Xi(re.paint_raster["raster-saturation"]),"raster-contrast":new Xi(re.paint_raster["raster-contrast"]),"raster-resampling":new Xi(re.paint_raster["raster-resampling"]),"raster-fade-duration":new Xi(re.paint_raster["raster-fade-duration"])})}};class QP extends J{constructor(P){super(P,JP)}}class eI extends J{constructor(P){super(P,{}),this.onAdd=W=>{this.implementation.onAdd&&this.implementation.onAdd(W,W.painter.context.gl)},this.onRemove=W=>{this.implementation.onRemove&&this.implementation.onRemove(W,W.painter.context.gl)},this.implementation=P}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class tI{constructor(P){this._methodToThrottle=P,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let Ay=63710088e-1;class Ad{constructor(P,W){if(isNaN(P)||isNaN(W))throw new Error(`Invalid LngLat object: (${P}, ${W})`);if(this.lng=+P,this.lat=+W,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Ad(A(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(P){let W=Math.PI/180,oe=this.lat*W,me=P.lat*W,ke=Math.sin(oe)*Math.sin(me)+Math.cos(oe)*Math.cos(me)*Math.cos((P.lng-this.lng)*W);return Ay*Math.acos(Math.min(ke,1))}static convert(P){if(P instanceof Ad)return P;if(Array.isArray(P)&&(P.length===2||P.length===3))return new Ad(Number(P[0]),Number(P[1]));if(!Array.isArray(P)&&typeof P=="object"&&P!==null)return new Ad(Number("lng"in P?P.lng:P.lon),Number(P.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 [, ]")}}let u5=2*Math.PI*Ay;function c5(V){return u5*Math.cos(V*Math.PI/180)}function f5(V){return(180+V)/360}function h5(V){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+V*Math.PI/360)))/360}function d5(V,P){return V/c5(P)}function My(V){return 360/Math.PI*Math.atan(Math.exp((180-360*V)*Math.PI/180))-90}class Up{constructor(P,W,oe=0){this.x=+P,this.y=+W,this.z=+oe}static fromLngLat(P,W=0){let oe=Ad.convert(P);return new Up(f5(oe.lng),h5(oe.lat),d5(W,oe.lat))}toLngLat(){return new Ad(360*this.x-180,My(this.y))}toAltitude(){return this.z*c5(My(this.y))}meterInMercatorCoordinateUnits(){return 1/u5*(P=My(this.y),1/Math.cos(P*Math.PI/180));var P}}function v5(V,P,W){var oe=2*Math.PI*6378137/256/Math.pow(2,W);return[V*oe-2*Math.PI*6378137/2,P*oe-2*Math.PI*6378137/2]}class Sy{constructor(P,W,oe){if(!function(me,ke,Pe){return!(me<0||me>25||Pe<0||Pe>=Math.pow(2,me)||ke<0||ke>=Math.pow(2,me))}(P,W,oe))throw new Error(`x=${W}, y=${oe}, z=${P} outside of bounds. 0<=x<${Math.pow(2,P)}, 0<=y<${Math.pow(2,P)} 0<=z<=25 `);this.z=P,this.x=W,this.y=oe,this.key=jp(0,P,P,W,oe)}equals(P){return this.z===P.z&&this.x===P.x&&this.y===P.y}url(P,W,oe){let me=(Pe=this.y,Ge=this.z,tt=v5(256*(ke=this.x),256*(Pe=Math.pow(2,Ge)-Pe-1),Ge),vt=v5(256*(ke+1),256*(Pe+1),Ge),tt[0]+","+tt[1]+","+vt[0]+","+vt[1]);var ke,Pe,Ge,tt,vt;let kt=function(Gt,tr,lr){let xr,Dr="";for(let sa=Gt;sa>0;sa--)xr=1<1?"@2x":"").replace(/{quadkey}/g,kt).replace(/{bbox-epsg-3857}/g,me)}isChildOf(P){let W=this.z-P.z;return W>0&&P.x===this.x>>W&&P.y===this.y>>W}getTilePoint(P){let W=Math.pow(2,this.z);return new n((P.x*W-this.x)*Qi,(P.y*W-this.y)*Qi)}toString(){return`${this.z}/${this.x}/${this.y}`}}class p5{constructor(P,W){this.wrap=P,this.canonical=W,this.key=jp(P,W.z,W.z,W.x,W.y)}}class Jf{constructor(P,W,oe,me,ke){if(P= z; overscaledZ = ${P}; z = ${oe}`);this.overscaledZ=P,this.wrap=W,this.canonical=new Sy(oe,+me,+ke),this.key=jp(W,P,oe,me,ke)}clone(){return new Jf(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(P){return this.overscaledZ===P.overscaledZ&&this.wrap===P.wrap&&this.canonical.equals(P.canonical)}scaledTo(P){if(P>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${P}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-P;return P>this.canonical.z?new Jf(P,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Jf(P,this.wrap,P,this.canonical.x>>W,this.canonical.y>>W)}calculateScaledKey(P,W){if(P>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${P}; overscaledZ = ${this.overscaledZ}`);let oe=this.canonical.z-P;return P>this.canonical.z?jp(this.wrap*+W,P,this.canonical.z,this.canonical.x,this.canonical.y):jp(this.wrap*+W,P,P,this.canonical.x>>oe,this.canonical.y>>oe)}isChildOf(P){if(P.wrap!==this.wrap)return!1;let W=this.canonical.z-P.canonical.z;return P.overscaledZ===0||P.overscaledZ>W&&P.canonical.y===this.canonical.y>>W}children(P){if(this.overscaledZ>=P)return[new Jf(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let W=this.canonical.z+1,oe=2*this.canonical.x,me=2*this.canonical.y;return[new Jf(W,this.wrap,W,oe,me),new Jf(W,this.wrap,W,oe+1,me),new Jf(W,this.wrap,W,oe,me+1),new Jf(W,this.wrap,W,oe+1,me+1)]}isLessThan(P){return this.wrapP.wrap)&&(this.overscaledZP.overscaledZ)&&(this.canonical.xP.canonical.x)&&this.canonical.ythis.max&&(this.max=Gt),Gt=this.dim+1||W<-1||W>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(W+1)*this.stride+(P+1)}unpack(P,W,oe){return P*this.redFactor+W*this.greenFactor+oe*this.blueFactor-this.baseShift}getPixels(){return new Ya({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(P,W,oe){if(this.dim!==P.dim)throw new Error("dem dimension mismatch");let me=W*this.dim,ke=W*this.dim+this.dim,Pe=oe*this.dim,Ge=oe*this.dim+this.dim;switch(W){case-1:me=ke-1;break;case 1:ke=me+1}switch(oe){case-1:Pe=Ge-1;break;case 1:Ge=Pe+1}let tt=-W*this.dim,vt=-oe*this.dim;for(let kt=Pe;kt=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${P} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[P]}}class y5{constructor(P,W,oe,me,ke){this.type="Feature",this._vectorTileFeature=P,P._z=W,P._x=oe,P._y=me,this.properties=P.properties,this.id=ke}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(P){this._geometry=P}toJSON(){let P={geometry:this.geometry};for(let W in this)W!=="_geometry"&&W!=="_vectorTileFeature"&&(P[W]=this[W]);return P}}class _5{constructor(P,W){this.tileID=P,this.x=P.canonical.x,this.y=P.canonical.y,this.z=P.canonical.z,this.grid=new $a(Qi,16,0),this.grid3D=new $a(Qi,16,0),this.featureIndexArray=new Ys,this.promoteId=W}insert(P,W,oe,me,ke,Pe){let Ge=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(oe,me,ke);let tt=Pe?this.grid3D:this.grid;for(let vt=0;vt=0&&Gt[3]>=0&&tt.insert(Ge,Gt[0],Gt[1],Gt[2],Gt[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new ta.VectorTile(new vy(this.rawTileData)).layers,this.sourceLayerCoder=new g5(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(P,W,oe,me){this.loadVTLayers();let ke=P.params||{},Pe=Qi/P.tileSize/P.scale,Ge=Ru(ke.filter),tt=P.queryGeometry,vt=P.queryPadding*Pe,kt=x5(tt),Gt=this.grid.query(kt.minX-vt,kt.minY-vt,kt.maxX+vt,kt.maxY+vt),tr=x5(P.cameraQueryGeometry),lr=this.grid3D.query(tr.minX-vt,tr.minY-vt,tr.maxX+vt,tr.maxY+vt,(sa,ga,cn,Da)=>function(en,zn,mi,Ji,Uo){for(let qi of en)if(zn<=qi.x&&mi<=qi.y&&Ji>=qi.x&&Uo>=qi.y)return!0;let $i=[new n(zn,mi),new n(zn,Uo),new n(Ji,Uo),new n(Ji,mi)];if(en.length>2){for(let qi of $i)if(Ra(en,qi))return!0}for(let qi=0;qi(Da||(Da=Bs(en)),zn.queryIntersectsFeature(tt,en,mi,Da,this.z,P.transform,Pe,P.pixelPosMatrix)))}return xr}loadMatchingFeature(P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt){let tr=this.bucketLayerIDs[W];if(Pe&&!function(sa,ga){for(let cn=0;cn=0)return!0;return!1}(Pe,tr))return;let lr=this.sourceLayerCoder.decode(oe),xr=this.vtLayers[lr].feature(me);if(ke.needGeometry){let sa=cl(xr,!0);if(!ke.filter(new $o(this.tileID.overscaledZ),sa,this.tileID.canonical))return}else if(!ke.filter(new $o(this.tileID.overscaledZ),xr))return;let Dr=this.getId(xr,lr);for(let sa=0;sa{let Ge=P instanceof nc?P.get(Pe):null;return Ge&&Ge.evaluate?Ge.evaluate(W,oe,me):Ge})}function x5(V){let P=1/0,W=1/0,oe=-1/0,me=-1/0;for(let ke of V)P=Math.min(P,ke.x),W=Math.min(W,ke.y),oe=Math.max(oe,ke.x),me=Math.max(me,ke.y);return{minX:P,minY:W,maxX:oe,maxY:me}}function rI(V,P){return P-V}function w5(V,P,W,oe,me){let ke=[];for(let Pe=0;Pe=oe&&Gt.x>=oe||(kt.x>=oe?kt=new n(oe,kt.y+(oe-kt.x)/(Gt.x-kt.x)*(Gt.y-kt.y))._round():Gt.x>=oe&&(Gt=new n(oe,kt.y+(oe-kt.x)/(Gt.x-kt.x)*(Gt.y-kt.y))._round()),kt.y>=me&&Gt.y>=me||(kt.y>=me?kt=new n(kt.x+(me-kt.y)/(Gt.y-kt.y)*(Gt.x-kt.x),me)._round():Gt.y>=me&&(Gt=new n(kt.x+(me-kt.y)/(Gt.y-kt.y)*(Gt.x-kt.x),me)._round()),tt&&kt.equals(tt[tt.length-1])||(tt=[kt],ke.push(tt)),tt.push(Gt)))))}}return ke}Pa("FeatureIndex",_5,{omit:["rawTileData","sourceLayerCoder"]});class Md extends n{constructor(P,W,oe,me){super(P,W),this.angle=oe,me!==void 0&&(this.segment=me)}clone(){return new Md(this.x,this.y,this.angle,this.segment)}}function T5(V,P,W,oe,me){if(P.segment===void 0||W===0)return!0;let ke=P,Pe=P.segment+1,Ge=0;for(;Ge>-W/2;){if(Pe--,Pe<0)return!1;Ge-=V[Pe].dist(ke),ke=V[Pe]}Ge+=V[Pe].dist(V[Pe+1]),Pe++;let tt=[],vt=0;for(;Geoe;)vt-=tt.shift().angleDelta;if(vt>me)return!1;Pe++,Ge+=kt.dist(Gt)}return!0}function A5(V){let P=0;for(let W=0;Wvt){let xr=(vt-tt)/lr,Dr=Si.number(Gt.x,tr.x,xr),sa=Si.number(Gt.y,tr.y,xr),ga=new Md(Dr,sa,tr.angleTo(Gt),kt);return ga._round(),!Pe||T5(V,ga,Ge,Pe,P)?ga:void 0}tt+=lr}}function nI(V,P,W,oe,me,ke,Pe,Ge,tt){let vt=M5(oe,ke,Pe),kt=S5(oe,me),Gt=kt*Pe,tr=V[0].x===0||V[0].x===tt||V[0].y===0||V[0].y===tt;return P-Gt

=0&&en=0&&zn=0&&tr+vt<=kt){let mi=new Md(en,zn,cn,xr);mi._round(),oe&&!T5(V,mi,ke,oe,me)||lr.push(mi)}}Gt+=ga}return Ge||lr.length||Pe||(lr=E5(V,Gt/2,W,oe,me,ke,Pe,!0,tt)),lr}Pa("Anchor",Md);let Wv=Of;function k5(V,P,W,oe){let me=[],ke=V.image,Pe=ke.pixelRatio,Ge=ke.paddedRect.w-2*Wv,tt=ke.paddedRect.h-2*Wv,vt={x1:V.left,y1:V.top,x2:V.right,y2:V.bottom},kt=ke.stretchX||[[0,Ge]],Gt=ke.stretchY||[[0,tt]],tr=(Kn,Eo)=>Kn+Eo[1]-Eo[0],lr=kt.reduce(tr,0),xr=Gt.reduce(tr,0),Dr=Ge-lr,sa=tt-xr,ga=0,cn=lr,Da=0,en=xr,zn=0,mi=Dr,Ji=0,Uo=sa;if(ke.content&&oe){let Kn=ke.content,Eo=Kn[2]-Kn[0],xo=Kn[3]-Kn[1];(ke.textFitWidth||ke.textFitHeight)&&(vt=t5(V)),ga=mm(kt,0,Kn[0]),Da=mm(Gt,0,Kn[1]),cn=mm(kt,Kn[0],Kn[2]),en=mm(Gt,Kn[1],Kn[3]),zn=Kn[0]-ga,Ji=Kn[1]-Da,mi=Eo-cn,Uo=xo-en}let $i=vt.x1,qi=vt.y1,To=vt.x2-$i,fo=vt.y2-qi,io=(Kn,Eo,xo,Qo)=>{let Rl=gm(Kn.stretch-ga,cn,To,$i),kl=ym(Kn.fixed-zn,mi,Kn.stretch,lr),Cc=gm(Eo.stretch-Da,en,fo,qi),lh=ym(Eo.fixed-Ji,Uo,Eo.stretch,xr),cf=gm(xo.stretch-ga,cn,To,$i),Lc=ym(xo.fixed-zn,mi,xo.stretch,lr),Pf=gm(Qo.stretch-Da,en,fo,qi),If=ym(Qo.fixed-Ji,Uo,Qo.stretch,xr),Df=new n(Rl,Cc),Bu=new n(cf,Cc),Pc=new n(cf,Pf),gf=new n(Rl,Pf),ff=new n(kl/Pe,lh/Pe),Rf=new n(Lc/Pe,If/Pe),hf=P*Math.PI/180;if(hf){let Qs=Math.sin(hf),Ul=Math.cos(hf),$l=[Ul,-Qs,Qs,Ul];Df._matMult($l),Bu._matMult($l),gf._matMult($l),Pc._matMult($l)}let Qf=Kn.stretch+Kn.fixed,Uf=Eo.stretch+Eo.fixed;return{tl:Df,tr:Bu,bl:gf,br:Pc,tex:{x:ke.paddedRect.x+Wv+Qf,y:ke.paddedRect.y+Wv+Uf,w:xo.stretch+xo.fixed-Qf,h:Qo.stretch+Qo.fixed-Uf},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:ff,pixelOffsetBR:Rf,minFontScaleX:mi/Pe/To,minFontScaleY:Uo/Pe/fo,isSDF:W}};if(oe&&(ke.stretchX||ke.stretchY)){let Kn=C5(kt,Dr,lr),Eo=C5(Gt,sa,xr);for(let xo=0;xo0&&(Dr=Math.max(10,Dr),this.circleDiameter=Dr)}else{let tr=!((Gt=Pe.image)===null||Gt===void 0)&&Gt.content&&(Pe.image.textFitWidth||Pe.image.textFitHeight)?t5(Pe):{x1:Pe.left,y1:Pe.top,x2:Pe.right,y2:Pe.bottom};tr.y1=tr.y1*Ge-tt[0],tr.y2=tr.y2*Ge+tt[2],tr.x1=tr.x1*Ge-tt[3],tr.x2=tr.x2*Ge+tt[1];let lr=Pe.collisionPadding;if(lr&&(tr.x1-=lr[0]*Ge,tr.y1-=lr[1]*Ge,tr.x2+=lr[2]*Ge,tr.y2+=lr[3]*Ge),kt){let xr=new n(tr.x1,tr.y1),Dr=new n(tr.x2,tr.y1),sa=new n(tr.x1,tr.y2),ga=new n(tr.x2,tr.y2),cn=kt*Math.PI/180;xr._rotate(cn),Dr._rotate(cn),sa._rotate(cn),ga._rotate(cn),tr.x1=Math.min(xr.x,Dr.x,sa.x,ga.x),tr.x2=Math.max(xr.x,Dr.x,sa.x,ga.x),tr.y1=Math.min(xr.y,Dr.y,sa.y,ga.y),tr.y2=Math.max(xr.y,Dr.y,sa.y,ga.y)}P.emplaceBack(W.x,W.y,tr.x1,tr.y1,tr.x2,tr.y2,oe,me,ke)}this.boxEndIndex=P.length}}class iI{constructor(P=[],W=(oe,me)=>oeme?1:0){if(this.data=P,this.length=this.data.length,this.compare=W,this.length>0)for(let oe=(this.length>>1)-1;oe>=0;oe--)this._down(oe)}push(P){this.data.push(P),this._up(this.length++)}pop(){if(this.length===0)return;let P=this.data[0],W=this.data.pop();return--this.length>0&&(this.data[0]=W,this._down(0)),P}peek(){return this.data[0]}_up(P){let{data:W,compare:oe}=this,me=W[P];for(;P>0;){let ke=P-1>>1,Pe=W[ke];if(oe(me,Pe)>=0)break;W[P]=Pe,P=ke}W[P]=me}_down(P){let{data:W,compare:oe}=this,me=this.length>>1,ke=W[P];for(;P=0)break;W[P]=W[Pe],P=Pe}W[P]=ke}}function oI(V,P=1,W=!1){let oe=1/0,me=1/0,ke=-1/0,Pe=-1/0,Ge=V[0];for(let lr=0;lrke)&&(ke=xr.x),(!lr||xr.y>Pe)&&(Pe=xr.y)}let tt=Math.min(ke-oe,Pe-me),vt=tt/2,kt=new iI([],sI);if(tt===0)return new n(oe,me);for(let lr=oe;lrGt.d||!Gt.d)&&(Gt=lr,W&&console.log("found best %d after %d probes",Math.round(1e4*lr.d)/1e4,tr)),lr.max-Gt.d<=P||(vt=lr.h/2,kt.push(new Yv(lr.p.x-vt,lr.p.y-vt,vt,V)),kt.push(new Yv(lr.p.x+vt,lr.p.y-vt,vt,V)),kt.push(new Yv(lr.p.x-vt,lr.p.y+vt,vt,V)),kt.push(new Yv(lr.p.x+vt,lr.p.y+vt,vt,V)),tr+=4)}return W&&(console.log(`num probes: ${tr}`),console.log(`best distance: ${Gt.d}`)),Gt.p}function sI(V,P){return P.max-V.max}function Yv(V,P,W,oe){this.p=new n(V,P),this.h=W,this.d=function(me,ke){let Pe=!1,Ge=1/0;for(let tt=0;ttme.y!=xr.y>me.y&&me.x<(xr.x-lr.x)*(me.y-lr.y)/(xr.y-lr.y)+lr.x&&(Pe=!Pe),Ge=Math.min(Ge,Yr(me,lr,xr))}}return(Pe?1:-1)*Math.sqrt(Ge)}(this.p,oe),this.max=this.d+this.h*Math.SQRT2}var uf;l.aq=void 0,(uf=l.aq||(l.aq={}))[uf.center=1]="center",uf[uf.left=2]="left",uf[uf.right=3]="right",uf[uf.top=4]="top",uf[uf.bottom=5]="bottom",uf[uf["top-left"]=6]="top-left",uf[uf["top-right"]=7]="top-right",uf[uf["bottom-left"]=8]="bottom-left",uf[uf["bottom-right"]=9]="bottom-right";let Sd=7,Ey=Number.POSITIVE_INFINITY;function L5(V,P){return P[1]!==Ey?function(W,oe,me){let ke=0,Pe=0;switch(oe=Math.abs(oe),me=Math.abs(me),W){case"top-right":case"top-left":case"top":Pe=me-Sd;break;case"bottom-right":case"bottom-left":case"bottom":Pe=-me+Sd}switch(W){case"top-right":case"bottom-right":case"right":ke=-oe;break;case"top-left":case"bottom-left":case"left":ke=oe}return[ke,Pe]}(V,P[0],P[1]):function(W,oe){let me=0,ke=0;oe<0&&(oe=0);let Pe=oe/Math.SQRT2;switch(W){case"top-right":case"top-left":ke=Pe-Sd;break;case"bottom-right":case"bottom-left":ke=-Pe+Sd;break;case"bottom":ke=-oe+Sd;break;case"top":ke=oe-Sd}switch(W){case"top-right":case"bottom-right":me=-Pe;break;case"top-left":case"bottom-left":me=Pe;break;case"left":me=oe;break;case"right":me=-oe}return[me,ke]}(V,P[0])}function P5(V,P,W){var oe;let me=V.layout,ke=(oe=me.get("text-variable-anchor-offset"))===null||oe===void 0?void 0:oe.evaluate(P,{},W);if(ke){let Ge=ke.values,tt=[];for(let vt=0;vttr*mc);kt.startsWith("top")?Gt[1]-=Sd:kt.startsWith("bottom")&&(Gt[1]+=Sd),tt[vt+1]=Gt}return new Pi(tt)}let Pe=me.get("text-variable-anchor");if(Pe){let Ge;Ge=V._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[me.get("text-radial-offset").evaluate(P,{},W)*mc,Ey]:me.get("text-offset").evaluate(P,{},W).map(vt=>vt*mc);let tt=[];for(let vt of Pe)tt.push(vt,L5(vt,Ge));return new Pi(tt)}return null}function ky(V){switch(V){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function lI(V,P,W,oe,me,ke,Pe,Ge,tt,vt,kt){let Gt=ke.textMaxSize.evaluate(P,{});Gt===void 0&&(Gt=Pe);let tr=V.layers[0].layout,lr=tr.get("icon-offset").evaluate(P,{},kt),xr=D5(W.horizontal),Dr=Pe/24,sa=V.tilePixelRatio*Dr,ga=V.tilePixelRatio*Gt/24,cn=V.tilePixelRatio*Ge,Da=V.tilePixelRatio*tr.get("symbol-spacing"),en=tr.get("text-padding")*V.tilePixelRatio,zn=function(Kn,Eo,xo,Qo=1){let Rl=Kn.get("icon-padding").evaluate(Eo,{},xo),kl=Rl&&Rl.values;return[kl[0]*Qo,kl[1]*Qo,kl[2]*Qo,kl[3]*Qo]}(tr,P,kt,V.tilePixelRatio),mi=tr.get("text-max-angle")/180*Math.PI,Ji=tr.get("text-rotation-alignment")!=="viewport"&&tr.get("symbol-placement")!=="point",Uo=tr.get("icon-rotation-alignment")==="map"&&tr.get("symbol-placement")!=="point",$i=tr.get("symbol-placement"),qi=Da/2,To=tr.get("icon-text-fit"),fo;oe&&To!=="none"&&(V.allowVerticalPlacement&&W.vertical&&(fo=r5(oe,W.vertical,To,tr.get("icon-text-fit-padding"),lr,Dr)),xr&&(oe=r5(oe,xr,To,tr.get("icon-text-fit-padding"),lr,Dr)));let io=(Kn,Eo)=>{Eo.x<0||Eo.x>=Qi||Eo.y<0||Eo.y>=Qi||function(xo,Qo,Rl,kl,Cc,lh,cf,Lc,Pf,If,Df,Bu,Pc,gf,ff,Rf,hf,Qf,Uf,Qs,Ul,$l,Zf,Lu,Xv){let Dh=xo.addToLineVertexArray(Qo,Rl),Rh,uh,eh,Wc,Zh=0,Hp=0,B5=0,N5=0,zy=-1,By=-1,Kh={},O5=Ea("");if(xo.allowVerticalPlacement&&kl.vertical){let yf=Lc.layout.get("text-rotate").evaluate(Ul,{},Lu)+90;eh=new _m(Pf,Qo,If,Df,Bu,kl.vertical,Pc,gf,ff,yf),cf&&(Wc=new _m(Pf,Qo,If,Df,Bu,cf,hf,Qf,ff,yf))}if(Cc){let yf=Lc.layout.get("icon-rotate").evaluate(Ul,{}),th=Lc.layout.get("icon-text-fit")!=="none",ev=k5(Cc,yf,Zf,th),_h=cf?k5(cf,yf,Zf,th):void 0;uh=new _m(Pf,Qo,If,Df,Bu,Cc,hf,Qf,!1,yf),Zh=4*ev.length;let tv=xo.iconSizeData,Fh=null;tv.kind==="source"?(Fh=[Ih*Lc.layout.get("icon-size").evaluate(Ul,{})],Fh[0]>Td&&_(`${xo.layerIds[0]}: Value for "icon-size" is >= ${Op}. Reduce your "icon-size".`)):tv.kind==="composite"&&(Fh=[Ih*$l.compositeIconSizes[0].evaluate(Ul,{},Lu),Ih*$l.compositeIconSizes[1].evaluate(Ul,{},Lu)],(Fh[0]>Td||Fh[1]>Td)&&_(`${xo.layerIds[0]}: Value for "icon-size" is >= ${Op}. Reduce your "icon-size".`)),xo.addSymbols(xo.icon,ev,Fh,Qs,Uf,Ul,l.ah.none,Qo,Dh.lineStartIndex,Dh.lineLength,-1,Lu),zy=xo.icon.placedSymbolArray.length-1,_h&&(Hp=4*_h.length,xo.addSymbols(xo.icon,_h,Fh,Qs,Uf,Ul,l.ah.vertical,Qo,Dh.lineStartIndex,Dh.lineLength,-1,Lu),By=xo.icon.placedSymbolArray.length-1)}let U5=Object.keys(kl.horizontal);for(let yf of U5){let th=kl.horizontal[yf];if(!Rh){O5=Ea(th.text);let _h=Lc.layout.get("text-rotate").evaluate(Ul,{},Lu);Rh=new _m(Pf,Qo,If,Df,Bu,th,Pc,gf,ff,_h)}let ev=th.positionedLines.length===1;if(B5+=I5(xo,Qo,th,lh,Lc,ff,Ul,Rf,Dh,kl.vertical?l.ah.horizontal:l.ah.horizontalOnly,ev?U5:[yf],Kh,zy,$l,Lu),ev)break}kl.vertical&&(N5+=I5(xo,Qo,kl.vertical,lh,Lc,ff,Ul,Rf,Dh,l.ah.vertical,["vertical"],Kh,By,$l,Lu));let fI=Rh?Rh.boxStartIndex:xo.collisionBoxArray.length,hI=Rh?Rh.boxEndIndex:xo.collisionBoxArray.length,dI=eh?eh.boxStartIndex:xo.collisionBoxArray.length,vI=eh?eh.boxEndIndex:xo.collisionBoxArray.length,pI=uh?uh.boxStartIndex:xo.collisionBoxArray.length,mI=uh?uh.boxEndIndex:xo.collisionBoxArray.length,gI=Wc?Wc.boxStartIndex:xo.collisionBoxArray.length,yI=Wc?Wc.boxEndIndex:xo.collisionBoxArray.length,yh=-1,xm=(yf,th)=>yf&&yf.circleDiameter?Math.max(yf.circleDiameter,th):th;yh=xm(Rh,yh),yh=xm(eh,yh),yh=xm(uh,yh),yh=xm(Wc,yh);let j5=yh>-1?1:0;j5&&(yh*=Xv/mc),xo.glyphOffsetArray.length>=Gv.MAX_GLYPHS&&_("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ul.sortKey!==void 0&&xo.addToSortKeyRanges(xo.symbolInstances.length,Ul.sortKey);let _I=P5(Lc,Ul,Lu),[bI,xI]=function(yf,th){let ev=yf.length,_h=th?.values;if(_h?.length>0)for(let tv=0;tv<_h.length;tv+=2){let Fh=_h[tv+1];yf.emplaceBack(l.aq[_h[tv]],Fh[0],Fh[1])}return[ev,yf.length]}(xo.textAnchorOffsets,_I);xo.symbolInstances.emplaceBack(Qo.x,Qo.y,Kh.right>=0?Kh.right:-1,Kh.center>=0?Kh.center:-1,Kh.left>=0?Kh.left:-1,Kh.vertical||-1,zy,By,O5,fI,hI,dI,vI,pI,mI,gI,yI,If,B5,N5,Zh,Hp,j5,0,Pc,yh,bI,xI)}(V,Eo,Kn,W,oe,me,fo,V.layers[0],V.collisionBoxArray,P.index,P.sourceLayerIndex,V.index,sa,[en,en,en,en],Ji,tt,cn,zn,Uo,lr,P,ke,vt,kt,Pe)};if($i==="line")for(let Kn of w5(P.geometry,0,0,Qi,Qi)){let Eo=nI(Kn,Da,mi,W.vertical||xr,oe,24,ga,V.overscaling,Qi);for(let xo of Eo)xr&&uI(V,xr.text,qi,xo)||io(Kn,xo)}else if($i==="line-center"){for(let Kn of P.geometry)if(Kn.length>1){let Eo=aI(Kn,mi,W.vertical||xr,oe,24,ga);Eo&&io(Kn,Eo)}}else if(P.type==="Polygon")for(let Kn of du(P.geometry,0)){let Eo=oI(Kn,16);io(Kn[0],new Md(Eo.x,Eo.y,0))}else if(P.type==="LineString")for(let Kn of P.geometry)io(Kn,new Md(Kn[0].x,Kn[0].y,0));else if(P.type==="Point")for(let Kn of P.geometry)for(let Eo of Kn)io([Eo],new Md(Eo.x,Eo.y,0))}function I5(V,P,W,oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr,lr,xr){let Dr=function(cn,Da,en,zn,mi,Ji,Uo,$i){let qi=zn.layout.get("text-rotate").evaluate(Ji,{})*Math.PI/180,To=[];for(let fo of Da.positionedLines)for(let io of fo.positionedGlyphs){if(!io.rect)continue;let Kn=io.rect||{},Eo=Xw+1,xo=!0,Qo=1,Rl=0,kl=(mi||$i)&&io.vertical,Cc=io.metrics.advance*io.scale/2;if($i&&Da.verticalizable&&(Rl=fo.lineOffset/2-(io.imageName?-(mc-io.metrics.width*io.scale)/2:(io.scale-1)*mc)),io.imageName){let Qs=Uo[io.imageName];xo=Qs.sdf,Qo=Qs.pixelRatio,Eo=Of/Qo}let lh=mi?[io.x+Cc,io.y]:[0,0],cf=mi?[0,0]:[io.x+Cc+en[0],io.y+en[1]-Rl],Lc=[0,0];kl&&(Lc=cf,cf=[0,0]);let Pf=io.metrics.isDoubleResolution?2:1,If=(io.metrics.left-Eo)*io.scale-Cc+cf[0],Df=(-io.metrics.top-Eo)*io.scale+cf[1],Bu=If+Kn.w/Pf*io.scale/Qo,Pc=Df+Kn.h/Pf*io.scale/Qo,gf=new n(If,Df),ff=new n(Bu,Df),Rf=new n(If,Pc),hf=new n(Bu,Pc);if(kl){let Qs=new n(-Cc,Cc-Bp),Ul=-Math.PI/2,$l=mc/2-Cc,Zf=new n(5-Bp-$l,-(io.imageName?$l:0)),Lu=new n(...Lc);gf._rotateAround(Ul,Qs)._add(Zf)._add(Lu),ff._rotateAround(Ul,Qs)._add(Zf)._add(Lu),Rf._rotateAround(Ul,Qs)._add(Zf)._add(Lu),hf._rotateAround(Ul,Qs)._add(Zf)._add(Lu)}if(qi){let Qs=Math.sin(qi),Ul=Math.cos(qi),$l=[Ul,-Qs,Qs,Ul];gf._matMult($l),ff._matMult($l),Rf._matMult($l),hf._matMult($l)}let Qf=new n(0,0),Uf=new n(0,0);To.push({tl:gf,tr:ff,bl:Rf,br:hf,tex:Kn,writingMode:Da.writingMode,glyphOffset:lh,sectionIndex:io.sectionIndex,isSDF:xo,pixelOffsetTL:Qf,pixelOffsetBR:Uf,minFontScaleX:0,minFontScaleY:0})}return To}(0,W,Ge,me,ke,Pe,oe,V.allowVerticalPlacement),sa=V.textSizeData,ga=null;sa.kind==="source"?(ga=[Ih*me.layout.get("text-size").evaluate(Pe,{})],ga[0]>Td&&_(`${V.layerIds[0]}: Value for "text-size" is >= ${Op}. Reduce your "text-size".`)):sa.kind==="composite"&&(ga=[Ih*lr.compositeTextSizes[0].evaluate(Pe,{},xr),Ih*lr.compositeTextSizes[1].evaluate(Pe,{},xr)],(ga[0]>Td||ga[1]>Td)&&_(`${V.layerIds[0]}: Value for "text-size" is >= ${Op}. Reduce your "text-size".`)),V.addSymbols(V.text,Dr,ga,Ge,ke,Pe,vt,P,tt.lineStartIndex,tt.lineLength,tr,xr);for(let cn of kt)Gt[cn]=V.text.placedSymbolArray.length-1;return 4*Dr.length}function D5(V){for(let P in V)return V[P];return null}function uI(V,P,W,oe){let me=V.compareText;if(P in me){let ke=me[P];for(let Pe=ke.length-1;Pe>=0;Pe--)if(oe.dist(ke[Pe])>4;if(me!==1)throw new Error(`Got v${me} data when expected v1.`);let ke=R5[15&oe];if(!ke)throw new Error("Unrecognized array type.");let[Pe]=new Uint16Array(P,2,1),[Ge]=new Uint32Array(P,4,1);return new Cy(Ge,Pe,ke,P)}constructor(P,W=64,oe=Float64Array,me){if(isNaN(P)||P<0)throw new Error(`Unpexpected numItems value: ${P}.`);this.numItems=+P,this.nodeSize=Math.min(Math.max(+W,2),65535),this.ArrayType=oe,this.IndexArrayType=P<65536?Uint16Array:Uint32Array;let ke=R5.indexOf(this.ArrayType),Pe=2*P*this.ArrayType.BYTES_PER_ELEMENT,Ge=P*this.IndexArrayType.BYTES_PER_ELEMENT,tt=(8-Ge%8)%8;if(ke<0)throw new Error(`Unexpected typed array class: ${oe}.`);me&&me instanceof ArrayBuffer?(this.data=me,this.ids=new this.IndexArrayType(this.data,8,P),this.coords=new this.ArrayType(this.data,8+Ge+tt,2*P),this._pos=2*P,this._finished=!0):(this.data=new ArrayBuffer(8+Pe+Ge+tt),this.ids=new this.IndexArrayType(this.data,8,P),this.coords=new this.ArrayType(this.data,8+Ge+tt,2*P),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ke]),new Uint16Array(this.data,2,1)[0]=W,new Uint32Array(this.data,4,1)[0]=P)}add(P,W){let oe=this._pos>>1;return this.ids[oe]=oe,this.coords[this._pos++]=P,this.coords[this._pos++]=W,oe}finish(){let P=this._pos>>1;if(P!==this.numItems)throw new Error(`Added ${P} items when expected ${this.numItems}.`);return Ly(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(P,W,oe,me){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ke,coords:Pe,nodeSize:Ge}=this,tt=[0,ke.length-1,0],vt=[];for(;tt.length;){let kt=tt.pop()||0,Gt=tt.pop()||0,tr=tt.pop()||0;if(Gt-tr<=Ge){for(let sa=tr;sa<=Gt;sa++){let ga=Pe[2*sa],cn=Pe[2*sa+1];ga>=P&&ga<=oe&&cn>=W&&cn<=me&&vt.push(ke[sa])}continue}let lr=tr+Gt>>1,xr=Pe[2*lr],Dr=Pe[2*lr+1];xr>=P&&xr<=oe&&Dr>=W&&Dr<=me&&vt.push(ke[lr]),(kt===0?P<=xr:W<=Dr)&&(tt.push(tr),tt.push(lr-1),tt.push(1-kt)),(kt===0?oe>=xr:me>=Dr)&&(tt.push(lr+1),tt.push(Gt),tt.push(1-kt))}return vt}within(P,W,oe){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:me,coords:ke,nodeSize:Pe}=this,Ge=[0,me.length-1,0],tt=[],vt=oe*oe;for(;Ge.length;){let kt=Ge.pop()||0,Gt=Ge.pop()||0,tr=Ge.pop()||0;if(Gt-tr<=Pe){for(let sa=tr;sa<=Gt;sa++)z5(ke[2*sa],ke[2*sa+1],P,W)<=vt&&tt.push(me[sa]);continue}let lr=tr+Gt>>1,xr=ke[2*lr],Dr=ke[2*lr+1];z5(xr,Dr,P,W)<=vt&&tt.push(me[lr]),(kt===0?P-oe<=xr:W-oe<=Dr)&&(Ge.push(tr),Ge.push(lr-1),Ge.push(1-kt)),(kt===0?P+oe>=xr:W+oe>=Dr)&&(Ge.push(lr+1),Ge.push(Gt),Ge.push(1-kt))}return tt}}function Ly(V,P,W,oe,me,ke){if(me-oe<=W)return;let Pe=oe+me>>1;F5(V,P,Pe,oe,me,ke),Ly(V,P,W,oe,Pe-1,1-ke),Ly(V,P,W,Pe+1,me,1-ke)}function F5(V,P,W,oe,me,ke){for(;me>oe;){if(me-oe>600){let vt=me-oe+1,kt=W-oe+1,Gt=Math.log(vt),tr=.5*Math.exp(2*Gt/3),lr=.5*Math.sqrt(Gt*tr*(vt-tr)/vt)*(kt-vt/2<0?-1:1);F5(V,P,W,Math.max(oe,Math.floor(W-kt*tr/vt+lr)),Math.min(me,Math.floor(W+(vt-kt)*tr/vt+lr)),ke)}let Pe=P[2*W+ke],Ge=oe,tt=me;for(qp(V,P,oe,W),P[2*me+ke]>Pe&&qp(V,P,oe,me);GePe;)tt--}P[2*oe+ke]===Pe?qp(V,P,oe,tt):(tt++,qp(V,P,tt,me)),tt<=W&&(oe=tt+1),W<=tt&&(me=tt-1)}}function qp(V,P,W,oe){Py(V,W,oe),Py(P,2*W,2*oe),Py(P,2*W+1,2*oe+1)}function Py(V,P,W){let oe=V[P];V[P]=V[W],V[W]=oe}function z5(V,P,W,oe){let me=V-W,ke=P-oe;return me*me+ke*ke}var Iy;l.bg=void 0,(Iy=l.bg||(l.bg={})).create="create",Iy.load="load",Iy.fullLoad="fullLoad";let bm=null,Vp=[],Dy=1e3/60,Ry="loadTime",Fy="fullLoadTime",cI={mark(V){performance.mark(V)},frame(V){let P=V;bm!=null&&Vp.push(P-bm),bm=P},clearMetrics(){bm=null,Vp=[],performance.clearMeasures(Ry),performance.clearMeasures(Fy);for(let V in l.bg)performance.clearMarks(l.bg[V])},getPerformanceMetrics(){performance.measure(Ry,l.bg.create,l.bg.load),performance.measure(Fy,l.bg.create,l.bg.fullLoad);let V=performance.getEntriesByName(Ry)[0].duration,P=performance.getEntriesByName(Fy)[0].duration,W=Vp.length,oe=1/(Vp.reduce((ke,Pe)=>ke+Pe,0)/W/1e3),me=Vp.filter(ke=>ke>Dy).reduce((ke,Pe)=>ke+(Pe-Dy)/Dy,0);return{loadTime:V,fullLoadTime:P,fps:oe,percentDroppedFrames:me/(W+me)*100,totalFrames:W}}};l.$=class extends Ht{},l.A=ba,l.B=fn,l.C=function(V){if(F==null){let P=V.navigator?V.navigator.userAgent:null;F=!!V.safari||!(!P||!(/\b(iPad|iPhone|iPod)\b/.test(P)||P.match("Safari")&&!P.match("Chrome")))}return F},l.D=Xi,l.E=Q,l.F=class{constructor(V,P){this.target=V,this.mapId=P,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new tI(()=>this.process()),this.subscription=function(W,oe,me,ke){return W.addEventListener(oe,me,!1),{unsubscribe:()=>{W.removeEventListener(oe,me,!1)}}}(this.target,"message",W=>this.receive(W)),this.globalScope=C(self)?V:window}registerMessageHandler(V,P){this.messageHandlers[V]=P}sendAsync(V,P){return new Promise((W,oe)=>{let me=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[me]={resolve:W,reject:oe},P&&P.signal.addEventListener("abort",()=>{delete this.resolveRejects[me];let Ge={id:me,type:"",origin:location.origin,targetMapId:V.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ge)},{once:!0});let ke=[],Pe=Object.assign(Object.assign({},V),{id:me,sourceMapId:this.mapId,origin:location.origin,data:ki(V.data,ke)});this.target.postMessage(Pe,{transfer:ke})})}receive(V){let P=V.data,W=P.id;if(!(P.origin!=="file://"&&location.origin!=="file://"&&P.origin!=="resource://android"&&location.origin!=="resource://android"&&P.origin!==location.origin||P.targetMapId&&this.mapId!==P.targetMapId)){if(P.type===""){delete this.tasks[W];let oe=this.abortControllers[W];return delete this.abortControllers[W],void(oe&&oe.abort())}if(C(self)||P.mustQueue)return this.tasks[W]=P,this.taskQueue.push(W),void this.invoker.trigger();this.processTask(W,P)}}process(){if(this.taskQueue.length===0)return;let V=this.taskQueue.shift(),P=this.tasks[V];delete this.tasks[V],this.taskQueue.length>0&&this.invoker.trigger(),P&&this.processTask(V,P)}processTask(V,P){return e(this,void 0,void 0,function*(){if(P.type===""){let me=this.resolveRejects[V];return delete this.resolveRejects[V],me?void(P.error?me.reject(Vi(P.error)):me.resolve(Vi(P.data))):void 0}if(!this.messageHandlers[P.type])return void this.completeTask(V,new Error(`Could not find a registered handler for ${P.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let W=Vi(P.data),oe=new AbortController;this.abortControllers[V]=oe;try{let me=yield this.messageHandlers[P.type](P.sourceMapId,W,oe);this.completeTask(V,null,me)}catch(me){this.completeTask(V,me)}})}completeTask(V,P,W){let oe=[];delete this.abortControllers[V];let me={id:V,type:"",sourceMapId:this.mapId,origin:location.origin,error:P?ki(P):null,data:ki(W,oe)};this.target.postMessage(me,{transfer:oe})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.G=te,l.H=function(){var V=new ba(16);return ba!=Float32Array&&(V[1]=0,V[2]=0,V[3]=0,V[4]=0,V[6]=0,V[7]=0,V[8]=0,V[9]=0,V[11]=0,V[12]=0,V[13]=0,V[14]=0),V[0]=1,V[5]=1,V[10]=1,V[15]=1,V},l.I=my,l.J=function(V,P,W){var oe,me,ke,Pe,Ge,tt,vt,kt,Gt,tr,lr,xr,Dr=W[0],sa=W[1],ga=W[2];return P===V?(V[12]=P[0]*Dr+P[4]*sa+P[8]*ga+P[12],V[13]=P[1]*Dr+P[5]*sa+P[9]*ga+P[13],V[14]=P[2]*Dr+P[6]*sa+P[10]*ga+P[14],V[15]=P[3]*Dr+P[7]*sa+P[11]*ga+P[15]):(me=P[1],ke=P[2],Pe=P[3],Ge=P[4],tt=P[5],vt=P[6],kt=P[7],Gt=P[8],tr=P[9],lr=P[10],xr=P[11],V[0]=oe=P[0],V[1]=me,V[2]=ke,V[3]=Pe,V[4]=Ge,V[5]=tt,V[6]=vt,V[7]=kt,V[8]=Gt,V[9]=tr,V[10]=lr,V[11]=xr,V[12]=oe*Dr+Ge*sa+Gt*ga+P[12],V[13]=me*Dr+tt*sa+tr*ga+P[13],V[14]=ke*Dr+vt*sa+lr*ga+P[14],V[15]=Pe*Dr+kt*sa+xr*ga+P[15]),V},l.K=function(V,P,W){var oe=W[0],me=W[1],ke=W[2];return V[0]=P[0]*oe,V[1]=P[1]*oe,V[2]=P[2]*oe,V[3]=P[3]*oe,V[4]=P[4]*me,V[5]=P[5]*me,V[6]=P[6]*me,V[7]=P[7]*me,V[8]=P[8]*ke,V[9]=P[9]*ke,V[10]=P[10]*ke,V[11]=P[11]*ke,V[12]=P[12],V[13]=P[13],V[14]=P[14],V[15]=P[15],V},l.L=va,l.M=function(V,P){let W={};for(let oe=0;oe{let P=window.document.createElement("video");return P.muted=!0,new Promise(W=>{P.onloadstart=()=>{W(P)};for(let oe of V){let me=window.document.createElement("source");K(oe)||(P.crossOrigin="Anonymous"),me.src=oe,P.appendChild(me)}})},l.a4=function(){return g++},l.a5=wn,l.a6=Gv,l.a7=Ru,l.a8=cl,l.a9=y5,l.aA=function(V){if(V.type==="custom")return new eI(V);switch(V.type){case"background":return new KP(V);case"circle":return new ha(V);case"fill":return new Yt(V);case"fill-extrusion":return new mP(V);case"heatmap":return new ui(V);case"hillshade":return new Ls(V);case"line":return new AP(V);case"raster":return new QP(V);case"symbol":return new pm(V)}},l.aB=h,l.aC=function(V,P){if(!V)return[{command:"setStyle",args:[P]}];let W=[];try{if(!ge(V.version,P.version))return[{command:"setStyle",args:[P]}];ge(V.center,P.center)||W.push({command:"setCenter",args:[P.center]}),ge(V.zoom,P.zoom)||W.push({command:"setZoom",args:[P.zoom]}),ge(V.bearing,P.bearing)||W.push({command:"setBearing",args:[P.bearing]}),ge(V.pitch,P.pitch)||W.push({command:"setPitch",args:[P.pitch]}),ge(V.sprite,P.sprite)||W.push({command:"setSprite",args:[P.sprite]}),ge(V.glyphs,P.glyphs)||W.push({command:"setGlyphs",args:[P.glyphs]}),ge(V.transition,P.transition)||W.push({command:"setTransition",args:[P.transition]}),ge(V.light,P.light)||W.push({command:"setLight",args:[P.light]}),ge(V.terrain,P.terrain)||W.push({command:"setTerrain",args:[P.terrain]}),ge(V.sky,P.sky)||W.push({command:"setSky",args:[P.sky]}),ge(V.projection,P.projection)||W.push({command:"setProjection",args:[P.projection]});let oe={},me=[];(function(Pe,Ge,tt,vt){let kt;for(kt in Ge=Ge||{},Pe=Pe||{})Object.prototype.hasOwnProperty.call(Pe,kt)&&(Object.prototype.hasOwnProperty.call(Ge,kt)||Ce(kt,tt,vt));for(kt in Ge)Object.prototype.hasOwnProperty.call(Ge,kt)&&(Object.prototype.hasOwnProperty.call(Pe,kt)?ge(Pe[kt],Ge[kt])||(Pe[kt].type==="geojson"&&Ge[kt].type==="geojson"&&Oe(Pe,Ge,kt)?Te(tt,{command:"setGeoJSONSourceData",args:[kt,Ge[kt].data]}):Ue(kt,Ge,tt,vt)):Se(kt,Ge,tt))})(V.sources,P.sources,me,oe);let ke=[];V.layers&&V.layers.forEach(Pe=>{"source"in Pe&&oe[Pe.source]?W.push({command:"removeLayer",args:[Pe.id]}):ke.push(Pe)}),W=W.concat(me),function(Pe,Ge,tt){Ge=Ge||[];let vt=(Pe=Pe||[]).map(ce),kt=Ge.map(ce),Gt=Pe.reduce(ie,{}),tr=Ge.reduce(ie,{}),lr=vt.slice(),xr=Object.create(null),Dr,sa,ga,cn,Da;for(let en=0,zn=0;en@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(W,oe,me,ke)=>{let Pe=me||ke;return P[oe]=!Pe||Pe.toLowerCase(),""}),P["max-age"]){let W=parseInt(P["max-age"],10);isNaN(W)?delete P["max-age"]:P["max-age"]=W}return P},l.ab=function(V,P){let W=[];for(let oe in V)oe in P||W.push(oe);return W},l.ac=M,l.ad=function(V,P,W){var oe=Math.sin(W),me=Math.cos(W),ke=P[0],Pe=P[1],Ge=P[2],tt=P[3],vt=P[4],kt=P[5],Gt=P[6],tr=P[7];return P!==V&&(V[8]=P[8],V[9]=P[9],V[10]=P[10],V[11]=P[11],V[12]=P[12],V[13]=P[13],V[14]=P[14],V[15]=P[15]),V[0]=ke*me+vt*oe,V[1]=Pe*me+kt*oe,V[2]=Ge*me+Gt*oe,V[3]=tt*me+tr*oe,V[4]=vt*me-ke*oe,V[5]=kt*me-Pe*oe,V[6]=Gt*me-Ge*oe,V[7]=tr*me-tt*oe,V},l.ae=function(V){var P=new ba(16);return P[0]=V[0],P[1]=V[1],P[2]=V[2],P[3]=V[3],P[4]=V[4],P[5]=V[5],P[6]=V[6],P[7]=V[7],P[8]=V[8],P[9]=V[9],P[10]=V[10],P[11]=V[11],P[12]=V[12],P[13]=V[13],P[14]=V[14],P[15]=V[15],P},l.af=Hn,l.ag=function(V,P){let W=0,oe=0;if(V.kind==="constant")oe=V.layoutSize;else if(V.kind!=="source"){let{interpolationType:me,minZoom:ke,maxZoom:Pe}=V,Ge=me?M(ai.interpolationFactor(me,P,ke,Pe),0,1):0;V.kind==="camera"?oe=Si.number(V.minSize,V.maxSize,Ge):W=Ge}return{uSizeT:W,uSize:oe}},l.ai=function(V,{uSize:P,uSizeT:W},{lowerSize:oe,upperSize:me}){return V.kind==="source"?oe/Ih:V.kind==="composite"?Si.number(oe/Ih,me/Ih,W):P},l.aj=by,l.ak=function(V,P,W,oe){let me=P.y-V.y,ke=P.x-V.x,Pe=oe.y-W.y,Ge=oe.x-W.x,tt=Pe*ke-Ge*me;if(tt===0)return null;let vt=(Ge*(V.y-W.y)-Pe*(V.x-W.x))/tt;return new n(V.x+vt*ke,V.y+vt*me)},l.al=w5,l.am=ic,l.an=Fa,l.ao=function(V){let P=1/0,W=1/0,oe=-1/0,me=-1/0;for(let ke of V)P=Math.min(P,ke.x),W=Math.min(W,ke.y),oe=Math.max(oe,ke.x),me=Math.max(me,ke.y);return[P,W,oe,me]},l.ap=mc,l.ar=_y,l.as=function(V,P){var W=P[0],oe=P[1],me=P[2],ke=P[3],Pe=P[4],Ge=P[5],tt=P[6],vt=P[7],kt=P[8],Gt=P[9],tr=P[10],lr=P[11],xr=P[12],Dr=P[13],sa=P[14],ga=P[15],cn=W*Ge-oe*Pe,Da=W*tt-me*Pe,en=W*vt-ke*Pe,zn=oe*tt-me*Ge,mi=oe*vt-ke*Ge,Ji=me*vt-ke*tt,Uo=kt*Dr-Gt*xr,$i=kt*sa-tr*xr,qi=kt*ga-lr*xr,To=Gt*sa-tr*Dr,fo=Gt*ga-lr*Dr,io=tr*ga-lr*sa,Kn=cn*io-Da*fo+en*To+zn*qi-mi*$i+Ji*Uo;return Kn?(V[0]=(Ge*io-tt*fo+vt*To)*(Kn=1/Kn),V[1]=(me*fo-oe*io-ke*To)*Kn,V[2]=(Dr*Ji-sa*mi+ga*zn)*Kn,V[3]=(tr*mi-Gt*Ji-lr*zn)*Kn,V[4]=(tt*qi-Pe*io-vt*$i)*Kn,V[5]=(W*io-me*qi+ke*$i)*Kn,V[6]=(sa*en-xr*Ji-ga*Da)*Kn,V[7]=(kt*Ji-tr*en+lr*Da)*Kn,V[8]=(Pe*fo-Ge*qi+vt*Uo)*Kn,V[9]=(oe*qi-W*fo-ke*Uo)*Kn,V[10]=(xr*mi-Dr*en+ga*cn)*Kn,V[11]=(Gt*en-kt*mi-lr*cn)*Kn,V[12]=(Ge*$i-Pe*To-tt*Uo)*Kn,V[13]=(W*To-oe*$i+me*Uo)*Kn,V[14]=(Dr*Da-xr*zn-sa*cn)*Kn,V[15]=(kt*zn-Gt*Da+tr*cn)*Kn,V):null},l.at=ky,l.au=yy,l.av=Cy,l.aw=function(){let V={},P=re.$version;for(let W in re.$root){let oe=re.$root[W];if(oe.required){let me=null;me=W==="version"?P:oe.type==="array"?[]:{},me!=null&&(V[W]=me)}}return V},l.ax=ni,l.ay=j,l.az=function(V){V=V.slice();let P=Object.create(null);for(let W=0;W25||oe<0||oe>=1||W<0||W>=1)},l.bc=function(V,P){return V[0]=P[0],V[1]=0,V[2]=0,V[3]=0,V[4]=0,V[5]=P[1],V[6]=0,V[7]=0,V[8]=0,V[9]=0,V[10]=P[2],V[11]=0,V[12]=0,V[13]=0,V[14]=0,V[15]=1,V},l.bd=class extends St{},l.be=Ay,l.bf=cI,l.bh=ae,l.bi=function(V,P){Y.REGISTERED_PROTOCOLS[V]=P},l.bj=function(V){delete Y.REGISTERED_PROTOCOLS[V]},l.bk=function(V,P){let W={};for(let me=0;meio*mc)}let $i=Pe?"center":W.get("text-justify").evaluate(vt,{},V.canonical),qi=W.get("symbol-placement")==="point"?W.get("text-max-width").evaluate(vt,{},V.canonical)*mc:1/0,To=()=>{V.bucket.allowVerticalPlacement&&no(en)&&(xr.vertical=hm(Dr,V.glyphMap,V.glyphPositions,V.imagePositions,kt,qi,ke,Ji,"left",mi,ga,l.ah.vertical,!0,tr,Gt))};if(!Pe&&Uo){let fo=new Set;if($i==="auto")for(let Kn=0;Kne(void 0,void 0,void 0,function*(){if(V.byteLength===0)return createImageBitmap(new ImageData(1,1));let P=new Blob([new Uint8Array(V)],{type:"image/png"});try{return createImageBitmap(P)}catch(W){throw new Error(`Could not load image because of ${W.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.e=E,l.f=V=>new Promise((P,W)=>{let oe=new Image;oe.onload=()=>{P(oe),URL.revokeObjectURL(oe.src),oe.onload=null,window.requestAnimationFrame(()=>{oe.src=z})},oe.onerror=()=>W(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let me=new Blob([new Uint8Array(V)],{type:"image/png"});oe.src=V.byteLength?URL.createObjectURL(me):z}),l.g=ee,l.h=(V,P)=>G(E(V,{type:"json"}),P),l.i=C,l.j=$,l.k=X,l.l=(V,P)=>G(E(V,{type:"arrayBuffer"}),P),l.m=G,l.n=function(V){return new vy(V).readFields(OP,[])},l.o=si,l.p=$w,l.q=Me,l.r=Ga,l.s=K,l.t=Wa,l.u=Aa,l.v=re,l.w=_,l.x=function([V,P,W]){return P+=90,P*=Math.PI/180,W*=Math.PI/180,{x:V*Math.cos(P)*Math.sin(W),y:V*Math.sin(P)*Math.sin(W),z:V*Math.cos(W)}},l.y=Si,l.z=$o}),w("worker",["./shared"],function(l){"use strict";class e{constructor(Ee){this.keyCache={},Ee&&this.replace(Ee)}replace(Ee){this._layerConfigs={},this._layers={},this.update(Ee,[])}update(Ee,Re){for(let ye of Ee){this._layerConfigs[ye.id]=ye;let Ie=this._layers[ye.id]=l.aA(ye);Ie._featureFilter=l.a7(Ie.filter),this.keyCache[ye.id]&&delete this.keyCache[ye.id]}for(let ye of Re)delete this.keyCache[ye],delete this._layerConfigs[ye],delete this._layers[ye];this.familiesBySource={};let he=l.bk(Object.values(this._layerConfigs),this.keyCache);for(let ye of he){let Ie=ye.map(ft=>this._layers[ft.id]),Fe=Ie[0];if(Fe.visibility==="none")continue;let He=Fe.source||"",We=this.familiesBySource[He];We||(We=this.familiesBySource[He]={});let pt=Fe.sourceLayer||"_geojsonTileLayer",ct=We[pt];ct||(ct=We[pt]=[]),ct.push(Ie)}}}class t{constructor(Ee){let Re={},he=[];for(let He in Ee){let We=Ee[He],pt=Re[He]={};for(let ct in We){let ft=We[+ct];if(!ft||ft.bitmap.width===0||ft.bitmap.height===0)continue;let mt={x:0,y:0,w:ft.bitmap.width+2,h:ft.bitmap.height+2};he.push(mt),pt[ct]={rect:mt,metrics:ft.metrics}}}let{w:ye,h:Ie}=l.p(he),Fe=new l.o({width:ye||1,height:Ie||1});for(let He in Ee){let We=Ee[He];for(let pt in We){let ct=We[+pt];if(!ct||ct.bitmap.width===0||ct.bitmap.height===0)continue;let ft=Re[He][pt].rect;l.o.copy(ct.bitmap,Fe,{x:0,y:0},{x:ft.x+1,y:ft.y+1},ct.bitmap)}}this.image=Fe,this.positions=Re}}l.bl("GlyphAtlas",t);class a{constructor(Ee){this.tileID=new l.S(Ee.tileID.overscaledZ,Ee.tileID.wrap,Ee.tileID.canonical.z,Ee.tileID.canonical.x,Ee.tileID.canonical.y),this.uid=Ee.uid,this.zoom=Ee.zoom,this.pixelRatio=Ee.pixelRatio,this.tileSize=Ee.tileSize,this.source=Ee.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ee.showCollisionBoxes,this.collectResourceTiming=!!Ee.collectResourceTiming,this.returnDependencies=!!Ee.returnDependencies,this.promoteId=Ee.promoteId,this.inFlightDependencies=[]}parse(Ee,Re,he,ye){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ee,this.collisionBoxArray=new l.a5;let Ie=new l.bm(Object.keys(Ee.layers).sort()),Fe=new l.bn(this.tileID,this.promoteId);Fe.bucketLayerIDs=[];let He={},We={featureIndex:Fe,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:he},pt=Re.familiesBySource[this.source];for(let pa in pt){let fa=Ee.layers[pa];if(!fa)continue;fa.version===1&&l.w(`Vector tile source "${this.source}" layer "${pa}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let za=Ie.encode(pa),Ia=[];for(let Va=0;Va=Oa.maxzoom||Oa.visibility!=="none"&&(r(Va,this.zoom,he),(He[Oa.id]=Oa.createBucket({index:Fe.bucketLayerIDs.length,layers:Va,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:za,sourceID:this.source})).populate(Ia,We,this.tileID.canonical),Fe.bucketLayerIDs.push(Va.map(tn=>tn.id)))}}let ct=l.aF(We.glyphDependencies,pa=>Object.keys(pa).map(Number));this.inFlightDependencies.forEach(pa=>pa?.abort()),this.inFlightDependencies=[];let ft=Promise.resolve({});if(Object.keys(ct).length){let pa=new AbortController;this.inFlightDependencies.push(pa),ft=ye.sendAsync({type:"GG",data:{stacks:ct,source:this.source,tileID:this.tileID,type:"glyphs"}},pa)}let mt=Object.keys(We.iconDependencies),_t=Promise.resolve({});if(mt.length){let pa=new AbortController;this.inFlightDependencies.push(pa),_t=ye.sendAsync({type:"GI",data:{icons:mt,source:this.source,tileID:this.tileID,type:"icons"}},pa)}let Bt=Object.keys(We.patternDependencies),Et=Promise.resolve({});if(Bt.length){let pa=new AbortController;this.inFlightDependencies.push(pa),Et=ye.sendAsync({type:"GI",data:{icons:Bt,source:this.source,tileID:this.tileID,type:"patterns"}},pa)}let[hr,$r,ca]=yield Promise.all([ft,_t,Et]),na=new t(hr),wa=new l.bo($r,ca);for(let pa in He){let fa=He[pa];fa instanceof l.a6?(r(fa.layers,this.zoom,he),l.bp({bucket:fa,glyphMap:hr,glyphPositions:na.positions,imageMap:$r,imagePositions:wa.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):fa.hasPattern&&(fa instanceof l.bq||fa instanceof l.br||fa instanceof l.bs)&&(r(fa.layers,this.zoom,he),fa.addFeatures(We,this.tileID.canonical,wa.patternPositions))}return this.status="done",{buckets:Object.values(He).filter(pa=>!pa.isEmpty()),featureIndex:Fe,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:na.image,imageAtlas:wa,glyphMap:this.returnDependencies?hr:null,iconMap:this.returnDependencies?$r:null,glyphPositions:this.returnDependencies?na.positions:null}})}}function r(at,Ee,Re){let he=new l.z(Ee);for(let ye of at)ye.recalculate(he,Re)}class n{constructor(Ee,Re,he){this.actor=Ee,this.layerIndex=Re,this.availableImages=he,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ee,Re){return l._(this,void 0,void 0,function*(){let he=yield l.l(Ee.request,Re);try{return{vectorTile:new l.bt.VectorTile(new l.bu(he.data)),rawData:he.data,cacheControl:he.cacheControl,expires:he.expires}}catch(ye){let Ie=new Uint8Array(he.data),Fe=`Unable to parse the tile at ${Ee.request.url}, `;throw Fe+=Ie[0]===31&&Ie[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${ye.message}`,new Error(Fe)}})}loadTile(Ee){return l._(this,void 0,void 0,function*(){let Re=Ee.uid,he=!!(Ee&&Ee.request&&Ee.request.collectResourceTiming)&&new l.bv(Ee.request),ye=new a(Ee);this.loading[Re]=ye;let Ie=new AbortController;ye.abort=Ie;try{let Fe=yield this.loadVectorTile(Ee,Ie);if(delete this.loading[Re],!Fe)return null;let He=Fe.rawData,We={};Fe.expires&&(We.expires=Fe.expires),Fe.cacheControl&&(We.cacheControl=Fe.cacheControl);let pt={};if(he){let ft=he.finish();ft&&(pt.resourceTiming=JSON.parse(JSON.stringify(ft)))}ye.vectorTile=Fe.vectorTile;let ct=ye.parse(Fe.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Re]=ye,this.fetching[Re]={rawTileData:He,cacheControl:We,resourceTiming:pt};try{let ft=yield ct;return l.e({rawTileData:He.slice(0)},ft,We,pt)}finally{delete this.fetching[Re]}}catch(Fe){throw delete this.loading[Re],ye.status="done",this.loaded[Re]=ye,Fe}})}reloadTile(Ee){return l._(this,void 0,void 0,function*(){let Re=Ee.uid;if(!this.loaded||!this.loaded[Re])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let he=this.loaded[Re];if(he.showCollisionBoxes=Ee.showCollisionBoxes,he.status==="parsing"){let ye=yield he.parse(he.vectorTile,this.layerIndex,this.availableImages,this.actor),Ie;if(this.fetching[Re]){let{rawTileData:Fe,cacheControl:He,resourceTiming:We}=this.fetching[Re];delete this.fetching[Re],Ie=l.e({rawTileData:Fe.slice(0)},ye,He,We)}else Ie=ye;return Ie}if(he.status==="done"&&he.vectorTile)return he.parse(he.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ee){return l._(this,void 0,void 0,function*(){let Re=this.loading,he=Ee.uid;Re&&Re[he]&&Re[he].abort&&(Re[he].abort.abort(),delete Re[he])})}removeTile(Ee){return l._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ee.uid]&&delete this.loaded[Ee.uid]})}}class i{constructor(){this.loaded={}}loadTile(Ee){return l._(this,void 0,void 0,function*(){let{uid:Re,encoding:he,rawImageData:ye,redFactor:Ie,greenFactor:Fe,blueFactor:He,baseShift:We}=Ee,pt=ye.width+2,ct=ye.height+2,ft=l.b(ye)?new l.R({width:pt,height:ct},yield l.bw(ye,-1,-1,pt,ct)):ye,mt=new l.bx(Re,ft,he,Ie,Fe,He,We);return this.loaded=this.loaded||{},this.loaded[Re]=mt,mt})}removeTile(Ee){let Re=this.loaded,he=Ee.uid;Re&&Re[he]&&delete Re[he]}}function s(at,Ee){if(at.length!==0){c(at[0],Ee);for(var Re=1;Re=Math.abs(He)?Re-We+He:He-We+Re,Re=We}Re+he>=0!=!!Ee&&at.reverse()}var p=l.by(function at(Ee,Re){var he,ye=Ee&&Ee.type;if(ye==="FeatureCollection")for(he=0;he>31}function C(at,Ee){for(var Re=at.loadGeometry(),he=at.type,ye=0,Ie=0,Fe=Re.length,He=0;Heat},R=Math.fround||(k=new Float32Array(1),at=>(k[0]=+at,k[0]));var k;let B=3,N=5,q=6;class Y{constructor(Ee){this.options=Object.assign(Object.create(z),Ee),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ee){let{log:Re,minZoom:he,maxZoom:ye}=this.options;Re&&console.time("total time");let Ie=`prepare ${Ee.length} points`;Re&&console.time(Ie),this.points=Ee;let Fe=[];for(let We=0;We=he;We--){let pt=+Date.now();He=this.trees[We]=this._createTree(this._cluster(He,We)),Re&&console.log("z%d: %d clusters in %dms",We,He.numItems,+Date.now()-pt)}return Re&&console.timeEnd("total time"),this}getClusters(Ee,Re){let he=((Ee[0]+180)%360+360)%360-180,ye=Math.max(-90,Math.min(90,Ee[1])),Ie=Ee[2]===180?180:((Ee[2]+180)%360+360)%360-180,Fe=Math.max(-90,Math.min(90,Ee[3]));if(Ee[2]-Ee[0]>=360)he=-180,Ie=180;else if(he>Ie){let ft=this.getClusters([he,ye,180,Fe],Re),mt=this.getClusters([-180,ye,Ie,Fe],Re);return ft.concat(mt)}let He=this.trees[this._limitZoom(Re)],We=He.range(ae(he),j(Fe),ae(Ie),j(ye)),pt=He.data,ct=[];for(let ft of We){let mt=this.stride*ft;ct.push(pt[mt+N]>1?ee(pt,mt,this.clusterProps):this.points[pt[mt+B]])}return ct}getChildren(Ee){let Re=this._getOriginId(Ee),he=this._getOriginZoom(Ee),ye="No cluster with the specified id.",Ie=this.trees[he];if(!Ie)throw new Error(ye);let Fe=Ie.data;if(Re*this.stride>=Fe.length)throw new Error(ye);let He=this.options.radius/(this.options.extent*Math.pow(2,he-1)),We=Ie.within(Fe[Re*this.stride],Fe[Re*this.stride+1],He),pt=[];for(let ct of We){let ft=ct*this.stride;Fe[ft+4]===Ee&&pt.push(Fe[ft+N]>1?ee(Fe,ft,this.clusterProps):this.points[Fe[ft+B]])}if(pt.length===0)throw new Error(ye);return pt}getLeaves(Ee,Re,he){let ye=[];return this._appendLeaves(ye,Ee,Re=Re||10,he=he||0,0),ye}getTile(Ee,Re,he){let ye=this.trees[this._limitZoom(Ee)],Ie=Math.pow(2,Ee),{extent:Fe,radius:He}=this.options,We=He/Fe,pt=(he-We)/Ie,ct=(he+1+We)/Ie,ft={features:[]};return this._addTileFeatures(ye.range((Re-We)/Ie,pt,(Re+1+We)/Ie,ct),ye.data,Re,he,Ie,ft),Re===0&&this._addTileFeatures(ye.range(1-We/Ie,pt,1,ct),ye.data,Ie,he,Ie,ft),Re===Ie-1&&this._addTileFeatures(ye.range(0,pt,We/Ie,ct),ye.data,-1,he,Ie,ft),ft.features.length?ft:null}getClusterExpansionZoom(Ee){let Re=this._getOriginZoom(Ee)-1;for(;Re<=this.options.maxZoom;){let he=this.getChildren(Ee);if(Re++,he.length!==1)break;Ee=he[0].properties.cluster_id}return Re}_appendLeaves(Ee,Re,he,ye,Ie){let Fe=this.getChildren(Re);for(let He of Fe){let We=He.properties;if(We&&We.cluster?Ie+We.point_count<=ye?Ie+=We.point_count:Ie=this._appendLeaves(Ee,We.cluster_id,he,ye,Ie):Ie1,ct,ft,mt;if(pt)ct=te(Re,We,this.clusterProps),ft=Re[We],mt=Re[We+1];else{let Et=this.points[Re[We+B]];ct=Et.properties;let[hr,$r]=Et.geometry.coordinates;ft=ae(hr),mt=j($r)}let _t={type:1,geometry:[[Math.round(this.options.extent*(ft*Ie-he)),Math.round(this.options.extent*(mt*Ie-ye))]],tags:ct},Bt;Bt=pt||this.options.generateId?Re[We+B]:this.points[Re[We+B]].id,Bt!==void 0&&(_t.id=Bt),Fe.features.push(_t)}}_limitZoom(Ee){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ee),this.options.maxZoom+1))}_cluster(Ee,Re){let{radius:he,extent:ye,reduce:Ie,minPoints:Fe}=this.options,He=he/(ye*Math.pow(2,Re)),We=Ee.data,pt=[],ct=this.stride;for(let ft=0;ftRe&&(hr+=We[ca+N])}if(hr>Et&&hr>=Fe){let $r,ca=mt*Et,na=_t*Et,wa=-1,pa=((ft/ct|0)<<5)+(Re+1)+this.points.length;for(let fa of Bt){let za=fa*ct;if(We[za+2]<=Re)continue;We[za+2]=Re;let Ia=We[za+N];ca+=We[za]*Ia,na+=We[za+1]*Ia,We[za+4]=pa,Ie&&($r||($r=this._map(We,ft,!0),wa=this.clusterProps.length,this.clusterProps.push($r)),Ie($r,this._map(We,za)))}We[ft+4]=pa,pt.push(ca/hr,na/hr,1/0,pa,-1,hr),Ie&&pt.push(wa)}else{for(let $r=0;$r1)for(let $r of Bt){let ca=$r*ct;if(!(We[ca+2]<=Re)){We[ca+2]=Re;for(let na=0;na>5}_getOriginZoom(Ee){return(Ee-this.points.length)%32}_map(Ee,Re,he){if(Ee[Re+N]>1){let Fe=this.clusterProps[Ee[Re+q]];return he?Object.assign({},Fe):Fe}let ye=this.points[Ee[Re+B]].properties,Ie=this.options.map(ye);return he&&Ie===ye?Object.assign({},Ie):Ie}}function ee(at,Ee,Re){return{type:"Feature",id:at[Ee+B],properties:te(at,Ee,Re),geometry:{type:"Point",coordinates:[(he=at[Ee],360*(he-.5)),G(at[Ee+1])]}};var he}function te(at,Ee,Re){let he=at[Ee+N],ye=he>=1e4?`${Math.round(he/1e3)}k`:he>=1e3?Math.round(he/100)/10+"k":he,Ie=at[Ee+q],Fe=Ie===-1?{}:Object.assign({},Re[Ie]);return Object.assign(Fe,{cluster:!0,cluster_id:at[Ee+B],point_count:he,point_count_abbreviated:ye})}function ae(at){return at/360+.5}function j(at){let Ee=Math.sin(at*Math.PI/180),Re=.5-.25*Math.log((1+Ee)/(1-Ee))/Math.PI;return Re<0?0:Re>1?1:Re}function G(at){let Ee=(180-360*at)*Math.PI/180;return 360*Math.atan(Math.exp(Ee))/Math.PI-90}function K(at,Ee,Re,he){let ye=he,Ie=Ee+(Re-Ee>>1),Fe,He=Re-Ee,We=at[Ee],pt=at[Ee+1],ct=at[Re],ft=at[Re+1];for(let mt=Ee+3;mtye)Fe=mt,ye=_t;else if(_t===ye){let Bt=Math.abs(mt-Ie);Bthe&&(Fe-Ee>3&&K(at,Ee,Fe,he),at[Fe+2]=ye,Re-Fe>3&&K(at,Fe,Re,he))}function H(at,Ee,Re,he,ye,Ie){let Fe=ye-Re,He=Ie-he;if(Fe!==0||He!==0){let We=((at-Re)*Fe+(Ee-he)*He)/(Fe*Fe+He*He);We>1?(Re=ye,he=Ie):We>0&&(Re+=Fe*We,he+=He*We)}return Fe=at-Re,He=Ee-he,Fe*Fe+He*He}function Z(at,Ee,Re,he){let ye={id:at??null,type:Ee,geometry:Re,tags:he,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ee==="Point"||Ee==="MultiPoint"||Ee==="LineString")X(ye,Re);else if(Ee==="Polygon")X(ye,Re[0]);else if(Ee==="MultiLineString")for(let Ie of Re)X(ye,Ie);else if(Ee==="MultiPolygon")for(let Ie of Re)X(ye,Ie[0]);return ye}function X(at,Ee){for(let Re=0;Re0&&(Fe+=he?(ye*ct-pt*Ie)/2:Math.sqrt(Math.pow(pt-ye,2)+Math.pow(ct-Ie,2))),ye=pt,Ie=ct}let He=Ee.length-3;Ee[2]=1,K(Ee,0,He,Re),Ee[He+2]=1,Ee.size=Math.abs(Fe),Ee.start=0,Ee.end=Ee.size}function ue(at,Ee,Re,he){for(let ye=0;ye1?1:Re}function Te(at,Ee,Re,he,ye,Ie,Fe,He){if(he/=Ee,Ie>=(Re/=Ee)&&Fe=he)return null;let We=[];for(let pt of at){let ct=pt.geometry,ft=pt.type,mt=ye===0?pt.minX:pt.minY,_t=ye===0?pt.maxX:pt.maxY;if(mt>=Re&&_t=he)continue;let Bt=[];if(ft==="Point"||ft==="MultiPoint")Se(ct,Bt,Re,he,ye);else if(ft==="LineString")Ce(ct,Bt,Re,he,ye,!1,He.lineMetrics);else if(ft==="MultiLineString")Oe(ct,Bt,Re,he,ye,!1);else if(ft==="Polygon")Oe(ct,Bt,Re,he,ye,!0);else if(ft==="MultiPolygon")for(let Et of ct){let hr=[];Oe(Et,hr,Re,he,ye,!0),hr.length&&Bt.push(hr)}if(Bt.length){if(He.lineMetrics&&ft==="LineString"){for(let Et of Bt)We.push(Z(pt.id,ft,Et,pt.tags));continue}ft!=="LineString"&&ft!=="MultiLineString"||(Bt.length===1?(ft="LineString",Bt=Bt[0]):ft="MultiLineString"),ft!=="Point"&&ft!=="MultiPoint"||(ft=Bt.length===3?"Point":"MultiPoint"),We.push(Z(pt.id,ft,Bt,pt.tags))}}return We.length?We:null}function Se(at,Ee,Re,he,ye){for(let Ie=0;Ie=Re&&Fe<=he&&_e(Ee,at[Ie],at[Ie+1],at[Ie+2])}}function Ce(at,Ee,Re,he,ye,Ie,Fe){let He=Ue(at),We=ye===0?ce:ie,pt,ct,ft=at.start;for(let hr=0;hrRe&&(ct=We(He,$r,ca,wa,pa,Re),Fe&&(He.start=ft+pt*ct)):fa>he?za=Re&&(ct=We(He,$r,ca,wa,pa,Re),Ia=!0),za>he&&fa<=he&&(ct=We(He,$r,ca,wa,pa,he),Ia=!0),!Ie&&Ia&&(Fe&&(He.end=ft+pt*ct),Ee.push(He),He=Ue(at)),Fe&&(ft+=pt)}let mt=at.length-3,_t=at[mt],Bt=at[mt+1],Et=ye===0?_t:Bt;Et>=Re&&Et<=he&&_e(He,_t,Bt,at[mt+2]),mt=He.length-3,Ie&&mt>=3&&(He[mt]!==He[0]||He[mt+1]!==He[1])&&_e(He,He[0],He[1],He[2]),He.length&&Ee.push(He)}function Ue(at){let Ee=[];return Ee.size=at.size,Ee.start=at.start,Ee.end=at.end,Ee}function Oe(at,Ee,Re,he,ye,Ie){for(let Fe of at)Ce(Fe,Ee,Re,he,ye,Ie,!1)}function _e(at,Ee,Re,he){at.push(Ee,Re,he)}function ce(at,Ee,Re,he,ye,Ie){let Fe=(Ie-Ee)/(he-Ee);return _e(at,Ie,Re+(ye-Re)*Fe,1),Fe}function ie(at,Ee,Re,he,ye,Ie){let Fe=(Ie-Re)/(ye-Re);return _e(at,Ee+(he-Ee)*Fe,Ie,1),Fe}function se(at,Ee){let Re=[];for(let he=0;he0&&Ee.size<(ye?Fe:he))return void(Re.numPoints+=Ee.length/3);let He=[];for(let We=0;WeFe)&&(Re.numSimplified++,He.push(Ee[We],Ee[We+1])),Re.numPoints++;ye&&function(We,pt){let ct=0;for(let ft=0,mt=We.length,_t=mt-2;ft0===pt)for(let ft=0,mt=We.length;ft24)throw new Error("maxZoom should be in the 0-24 range");if(Re.promoteId&&Re.generateId)throw new Error("promoteId and generateId cannot be used together.");let ye=function(Ie,Fe){let He=[];if(Ie.type==="FeatureCollection")for(let We=0;We1&&console.time("creation"),_t=this.tiles[mt]=qe(Ee,Re,he,ye,pt),this.tileCoords.push({z:Re,x:he,y:ye}),ct)){ct>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Re,he,ye,_t.numFeatures,_t.numPoints,_t.numSimplified),console.timeEnd("creation"));let Ia=`z${Re}`;this.stats[Ia]=(this.stats[Ia]||0)+1,this.total++}if(_t.source=Ee,Ie==null){if(Re===pt.indexMaxZoom||_t.numPoints<=pt.indexMaxPoints)continue}else{if(Re===pt.maxZoom||Re===Ie)continue;if(Ie!=null){let Ia=Ie-Re;if(he!==Fe>>Ia||ye!==He>>Ia)continue}}if(_t.source=null,Ee.length===0)continue;ct>1&&console.time("clipping");let Bt=.5*pt.buffer/pt.extent,Et=.5-Bt,hr=.5+Bt,$r=1+Bt,ca=null,na=null,wa=null,pa=null,fa=Te(Ee,ft,he-Bt,he+hr,0,_t.minX,_t.maxX,pt),za=Te(Ee,ft,he+Et,he+$r,0,_t.minX,_t.maxX,pt);Ee=null,fa&&(ca=Te(fa,ft,ye-Bt,ye+hr,1,_t.minY,_t.maxY,pt),na=Te(fa,ft,ye+Et,ye+$r,1,_t.minY,_t.maxY,pt),fa=null),za&&(wa=Te(za,ft,ye-Bt,ye+hr,1,_t.minY,_t.maxY,pt),pa=Te(za,ft,ye+Et,ye+$r,1,_t.minY,_t.maxY,pt),za=null),ct>1&&console.timeEnd("clipping"),We.push(ca||[],Re+1,2*he,2*ye),We.push(na||[],Re+1,2*he,2*ye+1),We.push(wa||[],Re+1,2*he+1,2*ye),We.push(pa||[],Re+1,2*he+1,2*ye+1)}}getTile(Ee,Re,he){Ee=+Ee,Re=+Re,he=+he;let ye=this.options,{extent:Ie,debug:Fe}=ye;if(Ee<0||Ee>24)return null;let He=1<1&&console.log("drilling down to z%d-%d-%d",Ee,Re,he);let pt,ct=Ee,ft=Re,mt=he;for(;!pt&&ct>0;)ct--,ft>>=1,mt>>=1,pt=this.tiles[At(ct,ft,mt)];return pt&&pt.source?(Fe>1&&(console.log("found parent tile z%d-%d-%d",ct,ft,mt),console.time("drilling down")),this.splitTile(pt.source,ct,ft,mt,Ee,Re,he),Fe>1&&console.timeEnd("drilling down"),this.tiles[We]?be(this.tiles[We],Ie):null):null}}function At(at,Ee,Re){return 32*((1<{ft.properties=_t;let Bt={};for(let Et of mt)Bt[Et]=We[Et].evaluate(ct,ft);return Bt},Fe.reduce=(_t,Bt)=>{ft.properties=Bt;for(let Et of mt)ct.accumulated=_t[Et],_t[Et]=pt[Et].evaluate(ct,ft)},Fe}(Ee)).load((yield this._pendingData).features):(ye=yield this._pendingData,new yt(ye,Ee.geojsonVtOptions)),this.loaded={};let Ie={};if(he){let Fe=he.finish();Fe&&(Ie.resourceTiming={},Ie.resourceTiming[Ee.source]=JSON.parse(JSON.stringify(Fe)))}return Ie}catch(Ie){if(delete this._pendingRequest,l.bB(Ie))return{abandoned:!0};throw Ie}var ye})}getData(){return l._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ee){let Re=this.loaded;return Re&&Re[Ee.uid]?super.reloadTile(Ee):this.loadTile(Ee)}loadAndProcessGeoJSON(Ee,Re){return l._(this,void 0,void 0,function*(){let he=yield this.loadGeoJSON(Ee,Re);if(delete this._pendingRequest,typeof he!="object")throw new Error(`Input data given to '${Ee.source}' is not a valid GeoJSON object.`);if(p(he,!0),Ee.filter){let ye=l.bC(Ee.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(ye.result==="error")throw new Error(ye.value.map(Fe=>`${Fe.key}: ${Fe.message}`).join(", "));he={type:"FeatureCollection",features:he.features.filter(Fe=>ye.value.evaluate({zoom:0},Fe))}}return he})}loadGeoJSON(Ee,Re){return l._(this,void 0,void 0,function*(){let{promoteId:he}=Ee;if(Ee.request){let ye=yield l.h(Ee.request,Re);return this._dataUpdateable=Zt(ye.data,he)?vr(ye.data,he):void 0,ye.data}if(typeof Ee.data=="string")try{let ye=JSON.parse(Ee.data);return this._dataUpdateable=Zt(ye,he)?vr(ye,he):void 0,ye}catch{throw new Error(`Input data given to '${Ee.source}' is not a valid GeoJSON object.`)}if(!Ee.dataDiff)throw new Error(`Input data given to '${Ee.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ee.source}`);return function(ye,Ie,Fe){var He,We,pt,ct;if(Ie.removeAll&&ye.clear(),Ie.remove)for(let ft of Ie.remove)ye.delete(ft);if(Ie.add)for(let ft of Ie.add){let mt=It(ft,Fe);mt!=null&&ye.set(mt,ft)}if(Ie.update)for(let ft of Ie.update){let mt=ye.get(ft.id);if(mt==null)continue;let _t=!ft.removeAllProperties&&(((He=ft.removeProperties)===null||He===void 0?void 0:He.length)>0||((We=ft.addOrUpdateProperties)===null||We===void 0?void 0:We.length)>0);if((ft.newGeometry||ft.removeAllProperties||_t)&&(mt=Object.assign({},mt),ye.set(ft.id,mt),_t&&(mt.properties=Object.assign({},mt.properties))),ft.newGeometry&&(mt.geometry=ft.newGeometry),ft.removeAllProperties)mt.properties={};else if(((pt=ft.removeProperties)===null||pt===void 0?void 0:pt.length)>0)for(let Bt of ft.removeProperties)Object.prototype.hasOwnProperty.call(mt.properties,Bt)&&delete mt.properties[Bt];if(((ct=ft.addOrUpdateProperties)===null||ct===void 0?void 0:ct.length)>0)for(let{key:Bt,value:Et}of ft.addOrUpdateProperties)mt.properties[Bt]=Et}}(this._dataUpdateable,Ee.dataDiff,he),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ee){return l._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ee){return this._geoJSONIndex.getClusterExpansionZoom(Ee.clusterId)}getClusterChildren(Ee){return this._geoJSONIndex.getChildren(Ee.clusterId)}getClusterLeaves(Ee){return this._geoJSONIndex.getLeaves(Ee.clusterId,Ee.limit,Ee.offset)}}class Jt{constructor(Ee){this.self=Ee,this.actor=new l.F(Ee),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Re,he)=>{if(this.externalWorkerSourceTypes[Re])throw new Error(`Worker source with name "${Re}" already registered.`);this.externalWorkerSourceTypes[Re]=he},this.self.addProtocol=l.bi,this.self.removeProtocol=l.bj,this.self.registerRTLTextPlugin=Re=>{if(l.bD.isParsed())throw new Error("RTL text plugin already registered.");l.bD.setMethods(Re)},this.actor.registerMessageHandler("LDT",(Re,he)=>this._getDEMWorkerSource(Re,he.source).loadTile(he)),this.actor.registerMessageHandler("RDT",(Re,he)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(Re,he.source).removeTile(he)})),this.actor.registerMessageHandler("GCEZ",(Re,he)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(Re,he.type,he.source).getClusterExpansionZoom(he)})),this.actor.registerMessageHandler("GCC",(Re,he)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(Re,he.type,he.source).getClusterChildren(he)})),this.actor.registerMessageHandler("GCL",(Re,he)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(Re,he.type,he.source).getClusterLeaves(he)})),this.actor.registerMessageHandler("LD",(Re,he)=>this._getWorkerSource(Re,he.type,he.source).loadData(he)),this.actor.registerMessageHandler("GD",(Re,he)=>this._getWorkerSource(Re,he.type,he.source).getData()),this.actor.registerMessageHandler("LT",(Re,he)=>this._getWorkerSource(Re,he.type,he.source).loadTile(he)),this.actor.registerMessageHandler("RT",(Re,he)=>this._getWorkerSource(Re,he.type,he.source).reloadTile(he)),this.actor.registerMessageHandler("AT",(Re,he)=>this._getWorkerSource(Re,he.type,he.source).abortTile(he)),this.actor.registerMessageHandler("RMT",(Re,he)=>this._getWorkerSource(Re,he.type,he.source).removeTile(he)),this.actor.registerMessageHandler("RS",(Re,he)=>l._(this,void 0,void 0,function*(){if(!this.workerSources[Re]||!this.workerSources[Re][he.type]||!this.workerSources[Re][he.type][he.source])return;let ye=this.workerSources[Re][he.type][he.source];delete this.workerSources[Re][he.type][he.source],ye.removeSource!==void 0&&ye.removeSource(he)})),this.actor.registerMessageHandler("RM",Re=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[Re],delete this.availableImages[Re],delete this.workerSources[Re],delete this.demWorkerSources[Re]})),this.actor.registerMessageHandler("SR",(Re,he)=>l._(this,void 0,void 0,function*(){this.referrer=he})),this.actor.registerMessageHandler("SRPS",(Re,he)=>this._syncRTLPluginState(Re,he)),this.actor.registerMessageHandler("IS",(Re,he)=>l._(this,void 0,void 0,function*(){this.self.importScripts(he)})),this.actor.registerMessageHandler("SI",(Re,he)=>this._setImages(Re,he)),this.actor.registerMessageHandler("UL",(Re,he)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(Re).update(he.layers,he.removedIds)})),this.actor.registerMessageHandler("SL",(Re,he)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(Re).replace(he)}))}_setImages(Ee,Re){return l._(this,void 0,void 0,function*(){this.availableImages[Ee]=Re;for(let he in this.workerSources[Ee]){let ye=this.workerSources[Ee][he];for(let Ie in ye)ye[Ie].availableImages=Re}})}_syncRTLPluginState(Ee,Re){return l._(this,void 0,void 0,function*(){if(l.bD.isParsed())return l.bD.getState();if(Re.pluginStatus!=="loading")return l.bD.setState(Re),Re;let he=Re.pluginURL;if(this.self.importScripts(he),l.bD.isParsed()){let ye={pluginStatus:"loaded",pluginURL:he};return l.bD.setState(ye),ye}throw l.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${he}`)})}_getAvailableImages(Ee){let Re=this.availableImages[Ee];return Re||(Re=[]),Re}_getLayerIndex(Ee){let Re=this.layerIndexes[Ee];return Re||(Re=this.layerIndexes[Ee]=new e),Re}_getWorkerSource(Ee,Re,he){if(this.workerSources[Ee]||(this.workerSources[Ee]={}),this.workerSources[Ee][Re]||(this.workerSources[Ee][Re]={}),!this.workerSources[Ee][Re][he]){let ye={sendAsync:(Ie,Fe)=>(Ie.targetMapId=Ee,this.actor.sendAsync(Ie,Fe))};switch(Re){case"vector":this.workerSources[Ee][Re][he]=new n(ye,this._getLayerIndex(Ee),this._getAvailableImages(Ee));break;case"geojson":this.workerSources[Ee][Re][he]=new Ut(ye,this._getLayerIndex(Ee),this._getAvailableImages(Ee));break;default:this.workerSources[Ee][Re][he]=new this.externalWorkerSourceTypes[Re](ye,this._getLayerIndex(Ee),this._getAvailableImages(Ee))}}return this.workerSources[Ee][Re][he]}_getDEMWorkerSource(Ee,Re){return this.demWorkerSources[Ee]||(this.demWorkerSources[Ee]={}),this.demWorkerSources[Ee][Re]||(this.demWorkerSources[Ee][Re]=new i),this.demWorkerSources[Ee][Re]}}return l.i(self)&&(self.worker=new Jt(self)),Jt}),w("index",["exports","./shared"],function(l,e){"use strict";var t="4.7.1";let a,r,n={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:Me=>new Promise((L,J)=>{let fe=requestAnimationFrame(L);Me.signal.addEventListener("abort",()=>{cancelAnimationFrame(fe),J(e.c())})}),getImageData(Me,L=0){return this.getImageCanvasContext(Me).getImageData(-L,-L,Me.width+2*L,Me.height+2*L)},getImageCanvasContext(Me){let L=window.document.createElement("canvas"),J=L.getContext("2d",{willReadFrequently:!0});if(!J)throw new Error("failed to create canvas 2d context");return L.width=Me.width,L.height=Me.height,J.drawImage(Me,0,0,Me.width,Me.height),J},resolveURL:Me=>(a||(a=document.createElement("a")),a.href=Me,a.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(r==null&&(r=matchMedia("(prefers-reduced-motion: reduce)")),r.matches)}};class i{static testProp(L){if(!i.docStyle)return L[0];for(let J=0;J{window.removeEventListener("click",i.suppressClickInternal,!0)},0)}static getScale(L){let J=L.getBoundingClientRect();return{x:J.width/L.offsetWidth||1,y:J.height/L.offsetHeight||1,boundingClientRect:J}}static getPoint(L,J,fe){let de=J.boundingClientRect;return new e.P((fe.clientX-de.left)/J.x-L.clientLeft,(fe.clientY-de.top)/J.y-L.clientTop)}static mousePos(L,J){let fe=i.getScale(L);return i.getPoint(L,fe,J)}static touchPos(L,J){let fe=[],de=i.getScale(L);for(let Ae=0;Ae{c&&y(c),c=null,d=!0},p.onerror=()=>{f=!0,c=null},p.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Me){let L,J,fe,de;Me.resetRequestQueue=()=>{L=[],J=0,fe=0,de={}},Me.addThrottleControl=dt=>{let St=fe++;return de[St]=dt,St},Me.removeThrottleControl=dt=>{delete de[dt],Ye()},Me.getImage=(dt,St,Ht=!0)=>new Promise((Wt,fr)=>{s.supported&&(dt.headers||(dt.headers={}),dt.headers.accept="image/webp,*/*"),e.e(dt,{type:"image"}),L.push({abortController:St,requestParameters:dt,supportImageRefresh:Ht,state:"queued",onError:Ar=>{fr(Ar)},onSuccess:Ar=>{Wt(Ar)}}),Ye()});let Ae=dt=>e._(this,void 0,void 0,function*(){dt.state="running";let{requestParameters:St,supportImageRefresh:Ht,onError:Wt,onSuccess:fr,abortController:Ar}=dt,Le=Ht===!1&&!e.i(self)&&!e.g(St.url)&&(!St.headers||Object.keys(St.headers).reduce((Xe,st)=>Xe&&st==="accept",!0));J++;let ze=Le?et(St,Ar):e.m(St,Ar);try{let Xe=yield ze;delete dt.abortController,dt.state="completed",Xe.data instanceof HTMLImageElement||e.b(Xe.data)?fr(Xe):Xe.data&&fr({data:yield(je=Xe.data,typeof createImageBitmap=="function"?e.d(je):e.f(je)),cacheControl:Xe.cacheControl,expires:Xe.expires})}catch(Xe){delete dt.abortController,Wt(Xe)}finally{J--,Ye()}var je}),Ye=()=>{let dt=(()=>{for(let St of Object.keys(de))if(de[St]())return!0;return!1})()?e.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let St=J;St0;St++){let Ht=L.shift();Ht.abortController.signal.aborted?St--:Ae(Ht)}},et=(dt,St)=>new Promise((Ht,Wt)=>{let fr=new Image,Ar=dt.url,Le=dt.credentials;Le&&Le==="include"?fr.crossOrigin="use-credentials":(Le&&Le==="same-origin"||!e.s(Ar))&&(fr.crossOrigin="anonymous"),St.signal.addEventListener("abort",()=>{fr.src="",Wt(e.c())}),fr.fetchPriority="high",fr.onload=()=>{fr.onerror=fr.onload=null,Ht({data:fr})},fr.onerror=()=>{fr.onerror=fr.onload=null,St.signal.aborted||Wt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},fr.src=Ar})}(o||(o={})),o.resetRequestQueue();class b{constructor(L){this._transformRequestFn=L}transformRequest(L,J){return this._transformRequestFn&&this._transformRequestFn(L,J)||{url:L}}setTransformRequest(L){this._transformRequestFn=L}}function M(Me){var L=new e.A(3);return L[0]=Me[0],L[1]=Me[1],L[2]=Me[2],L}var A,E=function(Me,L,J){return Me[0]=L[0]-J[0],Me[1]=L[1]-J[1],Me[2]=L[2]-J[2],Me};A=new e.A(3),e.A!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0);var g=function(Me){var L=Me[0],J=Me[1];return L*L+J*J};function T(Me){let L=[];if(typeof Me=="string")L.push({id:"default",url:Me});else if(Me&&Me.length>0){let J=[];for(let{id:fe,url:de}of Me){let Ae=`${fe}${de}`;J.indexOf(Ae)===-1&&(J.push(Ae),L.push({id:fe,url:de}))}}return L}function m(Me,L,J){let fe=Me.split("?");return fe[0]+=`${L}${J}`,fe.join("?")}(function(){var Me=new e.A(2);e.A!=Float32Array&&(Me[0]=0,Me[1]=0)})();class h{constructor(L,J,fe,de){this.context=L,this.format=fe,this.texture=L.gl.createTexture(),this.update(J,de)}update(L,J,fe){let{width:de,height:Ae}=L,Ye=!(this.size&&this.size[0]===de&&this.size[1]===Ae||fe),{context:et}=this,{gl:dt}=et;if(this.useMipmap=!!(J&&J.useMipmap),dt.bindTexture(dt.TEXTURE_2D,this.texture),et.pixelStoreUnpackFlipY.set(!1),et.pixelStoreUnpack.set(1),et.pixelStoreUnpackPremultiplyAlpha.set(this.format===dt.RGBA&&(!J||J.premultiply!==!1)),Ye)this.size=[de,Ae],L instanceof HTMLImageElement||L instanceof HTMLCanvasElement||L instanceof HTMLVideoElement||L instanceof ImageData||e.b(L)?dt.texImage2D(dt.TEXTURE_2D,0,this.format,this.format,dt.UNSIGNED_BYTE,L):dt.texImage2D(dt.TEXTURE_2D,0,this.format,de,Ae,0,this.format,dt.UNSIGNED_BYTE,L.data);else{let{x:St,y:Ht}=fe||{x:0,y:0};L instanceof HTMLImageElement||L instanceof HTMLCanvasElement||L instanceof HTMLVideoElement||L instanceof ImageData||e.b(L)?dt.texSubImage2D(dt.TEXTURE_2D,0,St,Ht,dt.RGBA,dt.UNSIGNED_BYTE,L):dt.texSubImage2D(dt.TEXTURE_2D,0,St,Ht,de,Ae,dt.RGBA,dt.UNSIGNED_BYTE,L.data)}this.useMipmap&&this.isSizePowerOfTwo()&&dt.generateMipmap(dt.TEXTURE_2D)}bind(L,J,fe){let{context:de}=this,{gl:Ae}=de;Ae.bindTexture(Ae.TEXTURE_2D,this.texture),fe!==Ae.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(fe=Ae.LINEAR),L!==this.filter&&(Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_MAG_FILTER,L),Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_MIN_FILTER,fe||L),this.filter=L),J!==this.wrap&&(Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_WRAP_S,J),Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_WRAP_T,J),this.wrap=J)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:L}=this.context;L.deleteTexture(this.texture),this.texture=null}}function x(Me){let{userImage:L}=Me;return!!(L&&L.render&&L.render())&&(Me.data.replace(new Uint8Array(L.data.buffer)),!0)}class _ extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(L){if(this.loaded!==L&&(this.loaded=L,L)){for(let{ids:J,promiseResolve:fe}of this.requestors)fe(this._getImagesForIds(J));this.requestors=[]}}getImage(L){let J=this.images[L];if(J&&!J.data&&J.spriteData){let fe=J.spriteData;J.data=new e.R({width:fe.width,height:fe.height},fe.context.getImageData(fe.x,fe.y,fe.width,fe.height).data),J.spriteData=null}return J}addImage(L,J){if(this.images[L])throw new Error(`Image id ${L} already exist, use updateImage instead`);this._validate(L,J)&&(this.images[L]=J)}_validate(L,J){let fe=!0,de=J.data||J.spriteData;return this._validateStretch(J.stretchX,de&&de.width)||(this.fire(new e.j(new Error(`Image "${L}" has invalid "stretchX" value`))),fe=!1),this._validateStretch(J.stretchY,de&&de.height)||(this.fire(new e.j(new Error(`Image "${L}" has invalid "stretchY" value`))),fe=!1),this._validateContent(J.content,J)||(this.fire(new e.j(new Error(`Image "${L}" has invalid "content" value`))),fe=!1),fe}_validateStretch(L,J){if(!L)return!0;let fe=0;for(let de of L){if(de[0]{let de=!0;if(!this.isLoaded())for(let Ae of L)this.images[Ae]||(de=!1);this.isLoaded()||de?J(this._getImagesForIds(L)):this.requestors.push({ids:L,promiseResolve:J})})}_getImagesForIds(L){let J={};for(let fe of L){let de=this.getImage(fe);de||(this.fire(new e.k("styleimagemissing",{id:fe})),de=this.getImage(fe)),de?J[fe]={data:de.data.clone(),pixelRatio:de.pixelRatio,sdf:de.sdf,version:de.version,stretchX:de.stretchX,stretchY:de.stretchY,content:de.content,textFitWidth:de.textFitWidth,textFitHeight:de.textFitHeight,hasRenderCallback:!!(de.userImage&&de.userImage.render)}:e.w(`Image "${fe}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return J}getPixelSize(){let{width:L,height:J}=this.atlasImage;return{width:L,height:J}}getPattern(L){let J=this.patterns[L],fe=this.getImage(L);if(!fe)return null;if(J&&J.position.version===fe.version)return J.position;if(J)J.position.version=fe.version;else{let de={w:fe.data.width+2,h:fe.data.height+2,x:0,y:0},Ae=new e.I(de,fe);this.patterns[L]={bin:de,position:Ae}}return this._updatePatternAtlas(),this.patterns[L].position}bind(L){let J=L.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new h(L,this.atlasImage,J.RGBA),this.atlasTexture.bind(J.LINEAR,J.CLAMP_TO_EDGE)}_updatePatternAtlas(){let L=[];for(let Ae in this.patterns)L.push(this.patterns[Ae].bin);let{w:J,h:fe}=e.p(L),de=this.atlasImage;de.resize({width:J||1,height:fe||1});for(let Ae in this.patterns){let{bin:Ye}=this.patterns[Ae],et=Ye.x+1,dt=Ye.y+1,St=this.getImage(Ae).data,Ht=St.width,Wt=St.height;e.R.copy(St,de,{x:0,y:0},{x:et,y:dt},{width:Ht,height:Wt}),e.R.copy(St,de,{x:0,y:Wt-1},{x:et,y:dt-1},{width:Ht,height:1}),e.R.copy(St,de,{x:0,y:0},{x:et,y:dt+Wt},{width:Ht,height:1}),e.R.copy(St,de,{x:Ht-1,y:0},{x:et-1,y:dt},{width:1,height:Wt}),e.R.copy(St,de,{x:0,y:0},{x:et+Ht,y:dt},{width:1,height:Wt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(L){for(let J of L){if(this.callbackDispatchedThisFrame[J])continue;this.callbackDispatchedThisFrame[J]=!0;let fe=this.getImage(J);fe||e.w(`Image with ID: "${J}" was not found`),x(fe)&&this.updateImage(J,fe)}}}let D=1e20;function C(Me,L,J,fe,de,Ae,Ye,et,dt){for(let St=L;St-1);dt++,Ae[dt]=et,Ye[dt]=St,Ye[dt+1]=D}for(let et=0,dt=0;et65535)throw new Error("glyphs > 65535 not supported");if(fe.ranges[Ae])return{stack:L,id:J,glyph:de};if(!this.url)throw new Error("glyphsUrl is not set");if(!fe.requests[Ae]){let et=I.loadGlyphRange(L,Ae,this.url,this.requestManager);fe.requests[Ae]=et}let Ye=yield fe.requests[Ae];for(let et in Ye)this._doesCharSupportLocalGlyph(+et)||(fe.glyphs[+et]=Ye[+et]);return fe.ranges[Ae]=!0,{stack:L,id:J,glyph:Ye[J]||null}})}_doesCharSupportLocalGlyph(L){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(L))}_tinySDF(L,J,fe){let de=this.localIdeographFontFamily;if(!de||!this._doesCharSupportLocalGlyph(fe))return;let Ae=L.tinySDF;if(!Ae){let et="400";/bold/i.test(J)?et="900":/medium/i.test(J)?et="500":/light/i.test(J)&&(et="200"),Ae=L.tinySDF=new I.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:de,fontWeight:et})}let Ye=Ae.draw(String.fromCharCode(fe));return{id:fe,bitmap:new e.o({width:Ye.width||60,height:Ye.height||60},Ye.data),metrics:{width:Ye.glyphWidth/2||24,height:Ye.glyphHeight/2||24,left:Ye.glyphLeft/2+.5||0,top:Ye.glyphTop/2-27.5||-8,advance:Ye.glyphAdvance/2||24,isDoubleResolution:!0}}}}I.loadGlyphRange=function(Me,L,J,fe){return e._(this,void 0,void 0,function*(){let de=256*L,Ae=de+255,Ye=fe.transformRequest(J.replace("{fontstack}",Me).replace("{range}",`${de}-${Ae}`),"Glyphs"),et=yield e.l(Ye,new AbortController);if(!et||!et.data)throw new Error(`Could not load glyph range. range: ${L}, ${de}-${Ae}`);let dt={};for(let St of e.n(et.data))dt[St.id]=St;return dt})},I.TinySDF=class{constructor({fontSize:Me=24,buffer:L=3,radius:J=8,cutoff:fe=.25,fontFamily:de="sans-serif",fontWeight:Ae="normal",fontStyle:Ye="normal"}={}){this.buffer=L,this.cutoff=fe,this.radius=J;let et=this.size=Me+4*L,dt=this._createCanvas(et),St=this.ctx=dt.getContext("2d",{willReadFrequently:!0});St.font=`${Ye} ${Ae} ${Me}px ${de}`,St.textBaseline="alphabetic",St.textAlign="left",St.fillStyle="black",this.gridOuter=new Float64Array(et*et),this.gridInner=new Float64Array(et*et),this.f=new Float64Array(et),this.z=new Float64Array(et+1),this.v=new Uint16Array(et)}_createCanvas(Me){let L=document.createElement("canvas");return L.width=L.height=Me,L}draw(Me){let{width:L,actualBoundingBoxAscent:J,actualBoundingBoxDescent:fe,actualBoundingBoxLeft:de,actualBoundingBoxRight:Ae}=this.ctx.measureText(Me),Ye=Math.ceil(J),et=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(Ae-de))),dt=Math.min(this.size-this.buffer,Ye+Math.ceil(fe)),St=et+2*this.buffer,Ht=dt+2*this.buffer,Wt=Math.max(St*Ht,0),fr=new Uint8ClampedArray(Wt),Ar={data:fr,width:St,height:Ht,glyphWidth:et,glyphHeight:dt,glyphTop:Ye,glyphLeft:0,glyphAdvance:L};if(et===0||dt===0)return Ar;let{ctx:Le,buffer:ze,gridInner:je,gridOuter:Xe}=this;Le.clearRect(ze,ze,et,dt),Le.fillText(Me,ze,ze+Ye);let st=Le.getImageData(ze,ze,et,dt);Xe.fill(D,0,Wt),je.fill(0,0,Wt);for(let Qe=0;Qe0?$t*$t:0,je[Ot]=$t<0?$t*$t:0}}C(Xe,0,0,St,Ht,St,this.f,this.v,this.z),C(je,ze,ze,et,dt,St,this.f,this.v,this.z);for(let Qe=0;Qe1&&(dt=L[++et]);let Ht=Math.abs(St-dt.left),Wt=Math.abs(St-dt.right),fr=Math.min(Ht,Wt),Ar,Le=Ae/fe*(de+1);if(dt.isDash){let ze=de-Math.abs(Le);Ar=Math.sqrt(fr*fr+ze*ze)}else Ar=de-Math.sqrt(fr*fr+Le*Le);this.data[Ye+St]=Math.max(0,Math.min(255,Ar+128))}}}addRegularDash(L){for(let et=L.length-1;et>=0;--et){let dt=L[et],St=L[et+1];dt.zeroLength?L.splice(et,1):St&&St.isDash===dt.isDash&&(St.left=dt.left,L.splice(et,1))}let J=L[0],fe=L[L.length-1];J.isDash===fe.isDash&&(J.left=fe.left-this.width,fe.right=J.right+this.width);let de=this.width*this.nextRow,Ae=0,Ye=L[Ae];for(let et=0;et1&&(Ye=L[++Ae]);let dt=Math.abs(et-Ye.left),St=Math.abs(et-Ye.right),Ht=Math.min(dt,St);this.data[de+et]=Math.max(0,Math.min(255,(Ye.isDash?Ht:-Ht)+128))}}addDash(L,J){let fe=J?7:0,de=2*fe+1;if(this.nextRow+de>this.height)return e.w("LineAtlas out of space"),null;let Ae=0;for(let et=0;et{J.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Y]}numActive(){return Object.keys(this.active).length}}let te=Math.floor(n.hardwareConcurrency/2),ae,j;function G(){return ae||(ae=new ee),ae}ee.workerCount=e.C(globalThis)?Math.max(Math.min(te,3),1):1;class K{constructor(L,J){this.workerPool=L,this.actors=[],this.currentActor=0,this.id=J;let fe=this.workerPool.acquire(J);for(let de=0;de{J.remove()}),this.actors=[],L&&this.workerPool.release(this.id)}registerMessageHandler(L,J){for(let fe of this.actors)fe.registerMessageHandler(L,J)}}function H(){return j||(j=new K(G(),e.G),j.registerMessageHandler("GR",(Me,L,J)=>e.m(L,J))),j}function Z(Me,L){let J=e.H();return e.J(J,J,[1,1,0]),e.K(J,J,[.5*Me.width,.5*Me.height,1]),e.L(J,J,Me.calculatePosMatrix(L.toUnwrapped()))}function X(Me,L,J,fe,de,Ae){let Ye=function(Wt,fr,Ar){if(Wt)for(let Le of Wt){let ze=fr[Le];if(ze&&ze.source===Ar&&ze.type==="fill-extrusion")return!0}else for(let Le in fr){let ze=fr[Le];if(ze.source===Ar&&ze.type==="fill-extrusion")return!0}return!1}(de&&de.layers,L,Me.id),et=Ae.maxPitchScaleFactor(),dt=Me.tilesIn(fe,et,Ye);dt.sort($);let St=[];for(let Wt of dt)St.push({wrappedTileID:Wt.tileID.wrapped().key,queryResults:Wt.tile.queryRenderedFeatures(L,J,Me._state,Wt.queryGeometry,Wt.cameraQueryGeometry,Wt.scale,de,Ae,et,Z(Me.transform,Wt.tileID))});let Ht=function(Wt){let fr={},Ar={};for(let Le of Wt){let ze=Le.queryResults,je=Le.wrappedTileID,Xe=Ar[je]=Ar[je]||{};for(let st in ze){let Qe=ze[st],ht=Xe[st]=Xe[st]||{},Dt=fr[st]=fr[st]||[];for(let Ot of Qe)ht[Ot.featureIndex]||(ht[Ot.featureIndex]=!0,Dt.push(Ot))}}return fr}(St);for(let Wt in Ht)Ht[Wt].forEach(fr=>{let Ar=fr.feature,Le=Me.getFeatureState(Ar.layer["source-layer"],Ar.id);Ar.source=Ar.layer.source,Ar.layer["source-layer"]&&(Ar.sourceLayer=Ar.layer["source-layer"]),Ar.state=Le});return Ht}function $(Me,L){let J=Me.tileID,fe=L.tileID;return J.overscaledZ-fe.overscaledZ||J.canonical.y-fe.canonical.y||J.wrap-fe.wrap||J.canonical.x-fe.canonical.x}function Q(Me,L,J){return e._(this,void 0,void 0,function*(){let fe=Me;if(Me.url?fe=(yield e.h(L.transformRequest(Me.url,"Source"),J)).data:yield n.frameAsync(J),!fe)return null;let de=e.M(e.e(fe,Me),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in fe&&fe.vector_layers&&(de.vectorLayerIds=fe.vector_layers.map(Ae=>Ae.id)),de})}class re{constructor(L,J){L&&(J?this.setSouthWest(L).setNorthEast(J):Array.isArray(L)&&(L.length===4?this.setSouthWest([L[0],L[1]]).setNorthEast([L[2],L[3]]):this.setSouthWest(L[0]).setNorthEast(L[1])))}setNorthEast(L){return this._ne=L instanceof e.N?new e.N(L.lng,L.lat):e.N.convert(L),this}setSouthWest(L){return this._sw=L instanceof e.N?new e.N(L.lng,L.lat):e.N.convert(L),this}extend(L){let J=this._sw,fe=this._ne,de,Ae;if(L instanceof e.N)de=L,Ae=L;else{if(!(L instanceof re))return Array.isArray(L)?L.length===4||L.every(Array.isArray)?this.extend(re.convert(L)):this.extend(e.N.convert(L)):L&&("lng"in L||"lon"in L)&&"lat"in L?this.extend(e.N.convert(L)):this;if(de=L._sw,Ae=L._ne,!de||!Ae)return this}return J||fe?(J.lng=Math.min(de.lng,J.lng),J.lat=Math.min(de.lat,J.lat),fe.lng=Math.max(Ae.lng,fe.lng),fe.lat=Math.max(Ae.lat,fe.lat)):(this._sw=new e.N(de.lng,de.lat),this._ne=new e.N(Ae.lng,Ae.lat)),this}getCenter(){return new e.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.N(this.getWest(),this.getNorth())}getSouthEast(){return new e.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(L){let{lng:J,lat:fe}=e.N.convert(L),de=this._sw.lng<=J&&J<=this._ne.lng;return this._sw.lng>this._ne.lng&&(de=this._sw.lng>=J&&J>=this._ne.lng),this._sw.lat<=fe&&fe<=this._ne.lat&&de}static convert(L){return L instanceof re?L:L&&new re(L)}static fromLngLat(L,J=0){let fe=360*J/40075017,de=fe/Math.cos(Math.PI/180*L.lat);return new re(new e.N(L.lng-de,L.lat-fe),new e.N(L.lng+de,L.lat+fe))}adjustAntiMeridian(){let L=new e.N(this._sw.lng,this._sw.lat),J=new e.N(this._ne.lng,this._ne.lat);return new re(L,L.lng>J.lng?new e.N(J.lng+360,J.lat):J)}}class ue{constructor(L,J,fe){this.bounds=re.convert(this.validateBounds(L)),this.minzoom=J||0,this.maxzoom=fe||24}validateBounds(L){return Array.isArray(L)&&L.length===4?[Math.max(-180,L[0]),Math.max(-90,L[1]),Math.min(180,L[2]),Math.min(90,L[3])]:[-180,-90,180,90]}contains(L){let J=Math.pow(2,L.z),fe=Math.floor(e.O(this.bounds.getWest())*J),de=Math.floor(e.Q(this.bounds.getNorth())*J),Ae=Math.ceil(e.O(this.bounds.getEast())*J),Ye=Math.ceil(e.Q(this.bounds.getSouth())*J);return L.x>=fe&&L.x=de&&L.y{this._options.tiles=L}),this}setUrl(L){return this.setSourceProperty(()=>{this.url=L,this._options.url=L}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(L){return e._(this,void 0,void 0,function*(){let J=L.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),fe={request:this.map._requestManager.transformRequest(J,"Tile"),uid:L.uid,tileID:L.tileID,zoom:L.tileID.overscaledZ,tileSize:this.tileSize*L.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};fe.request.collectResourceTiming=this._collectResourceTiming;let de="RT";if(L.actor&&L.state!=="expired"){if(L.state==="loading")return new Promise((Ae,Ye)=>{L.reloadPromise={resolve:Ae,reject:Ye}})}else L.actor=this.dispatcher.getActor(),de="LT";L.abortController=new AbortController;try{let Ae=yield L.actor.sendAsync({type:de,data:fe},L.abortController);if(delete L.abortController,L.aborted)return;this._afterTileLoadWorkerResponse(L,Ae)}catch(Ae){if(delete L.abortController,L.aborted)return;if(Ae&&Ae.status!==404)throw Ae;this._afterTileLoadWorkerResponse(L,null)}})}_afterTileLoadWorkerResponse(L,J){if(J&&J.resourceTiming&&(L.resourceTiming=J.resourceTiming),J&&this.map._refreshExpiredTiles&&L.setExpiryData(J),L.loadVectorData(J,this.map.painter),L.reloadPromise){let fe=L.reloadPromise;L.reloadPromise=null,this.loadTile(L).then(fe.resolve).catch(fe.reject)}}abortTile(L){return e._(this,void 0,void 0,function*(){L.abortController&&(L.abortController.abort(),delete L.abortController),L.actor&&(yield L.actor.sendAsync({type:"AT",data:{uid:L.uid,type:this.type,source:this.id}}))})}unloadTile(L){return e._(this,void 0,void 0,function*(){L.unloadVectorData(),L.actor&&(yield L.actor.sendAsync({type:"RMT",data:{uid:L.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ge extends e.E{constructor(L,J,fe,de){super(),this.id=L,this.dispatcher=fe,this.setEventedParent(de),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},J),e.e(this,e.M(J,["url","scheme","tileSize"]))}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let L=yield Q(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,L&&(e.e(this,L),L.bounds&&(this.tileBounds=new ue(L.bounds,this.minzoom,this.maxzoom)),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})))}catch(L){this._tileJSONRequest=null,this.fire(new e.j(L))}})}loaded(){return this._loaded}onAdd(L){this.map=L,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(L){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),L(),this.load()}setTiles(L){return this.setSourceProperty(()=>{this._options.tiles=L}),this}setUrl(L){return this.setSourceProperty(()=>{this.url=L,this._options.url=L}),this}serialize(){return e.e({},this._options)}hasTile(L){return!this.tileBounds||this.tileBounds.contains(L.canonical)}loadTile(L){return e._(this,void 0,void 0,function*(){let J=L.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);L.abortController=new AbortController;try{let fe=yield o.getImage(this.map._requestManager.transformRequest(J,"Tile"),L.abortController,this.map._refreshExpiredTiles);if(delete L.abortController,L.aborted)return void(L.state="unloaded");if(fe&&fe.data){this.map._refreshExpiredTiles&&fe.cacheControl&&fe.expires&&L.setExpiryData({cacheControl:fe.cacheControl,expires:fe.expires});let de=this.map.painter.context,Ae=de.gl,Ye=fe.data;L.texture=this.map.painter.getTileTexture(Ye.width),L.texture?L.texture.update(Ye,{useMipmap:!0}):(L.texture=new h(de,Ye,Ae.RGBA,{useMipmap:!0}),L.texture.bind(Ae.LINEAR,Ae.CLAMP_TO_EDGE,Ae.LINEAR_MIPMAP_NEAREST)),L.state="loaded"}}catch(fe){if(delete L.abortController,L.aborted)L.state="unloaded";else if(fe)throw L.state="errored",fe}})}abortTile(L){return e._(this,void 0,void 0,function*(){L.abortController&&(L.abortController.abort(),delete L.abortController)})}unloadTile(L){return e._(this,void 0,void 0,function*(){L.texture&&this.map.painter.saveTileTexture(L.texture)})}hasTransition(){return!1}}class Te extends ge{constructor(L,J,fe,de){super(L,J,fe,de),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},J),this.encoding=J.encoding||"mapbox",this.redFactor=J.redFactor,this.greenFactor=J.greenFactor,this.blueFactor=J.blueFactor,this.baseShift=J.baseShift}loadTile(L){return e._(this,void 0,void 0,function*(){let J=L.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),fe=this.map._requestManager.transformRequest(J,"Tile");L.neighboringTiles=this._getNeighboringTiles(L.tileID),L.abortController=new AbortController;try{let de=yield o.getImage(fe,L.abortController,this.map._refreshExpiredTiles);if(delete L.abortController,L.aborted)return void(L.state="unloaded");if(de&&de.data){let Ae=de.data;this.map._refreshExpiredTiles&&de.cacheControl&&de.expires&&L.setExpiryData({cacheControl:de.cacheControl,expires:de.expires});let Ye=e.b(Ae)&&e.U()?Ae:yield this.readImageNow(Ae),et={type:this.type,uid:L.uid,source:this.id,rawImageData:Ye,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!L.actor||L.state==="expired"){L.actor=this.dispatcher.getActor();let dt=yield L.actor.sendAsync({type:"LDT",data:et});L.dem=dt,L.needsHillshadePrepare=!0,L.needsTerrainPrepare=!0,L.state="loaded"}}}catch(de){if(delete L.abortController,L.aborted)L.state="unloaded";else if(de)throw L.state="errored",de}})}readImageNow(L){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.V()){let J=L.width+2,fe=L.height+2;try{return new e.R({width:J,height:fe},yield e.W(L,-1,-1,J,fe))}catch{}}return n.getImageData(L,1)})}_getNeighboringTiles(L){let J=L.canonical,fe=Math.pow(2,J.z),de=(J.x-1+fe)%fe,Ae=J.x===0?L.wrap-1:L.wrap,Ye=(J.x+1+fe)%fe,et=J.x+1===fe?L.wrap+1:L.wrap,dt={};return dt[new e.S(L.overscaledZ,Ae,J.z,de,J.y).key]={backfilled:!1},dt[new e.S(L.overscaledZ,et,J.z,Ye,J.y).key]={backfilled:!1},J.y>0&&(dt[new e.S(L.overscaledZ,Ae,J.z,de,J.y-1).key]={backfilled:!1},dt[new e.S(L.overscaledZ,L.wrap,J.z,J.x,J.y-1).key]={backfilled:!1},dt[new e.S(L.overscaledZ,et,J.z,Ye,J.y-1).key]={backfilled:!1}),J.y+10&&e.e(Ae,{resourceTiming:de}),this.fire(new e.k("data",Object.assign(Object.assign({},Ae),{sourceDataType:"metadata"}))),this.fire(new e.k("data",Object.assign(Object.assign({},Ae),{sourceDataType:"content"})))}catch(fe){if(this._pendingLoads--,this._removed)return void this.fire(new e.k("dataabort",{dataType:"source"}));this.fire(new e.j(fe))}})}loaded(){return this._pendingLoads===0}loadTile(L){return e._(this,void 0,void 0,function*(){let J=L.actor?"RT":"LT";L.actor=this.actor;let fe={type:this.type,uid:L.uid,tileID:L.tileID,zoom:L.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};L.abortController=new AbortController;let de=yield this.actor.sendAsync({type:J,data:fe},L.abortController);delete L.abortController,L.unloadVectorData(),L.aborted||L.loadVectorData(de,this.map.painter,J==="RT")})}abortTile(L){return e._(this,void 0,void 0,function*(){L.abortController&&(L.abortController.abort(),delete L.abortController),L.aborted=!0})}unloadTile(L){return e._(this,void 0,void 0,function*(){L.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:L.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Ce=e.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Ue extends e.E{constructor(L,J,fe,de){super(),this.id=L,this.dispatcher=fe,this.coordinates=J.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(de),this.options=J}load(L){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let J=yield o.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,J&&J.data&&(this.image=J.data,L&&(this.coordinates=L),this._finishLoading())}catch(J){this._request=null,this._loaded=!0,this.fire(new e.j(J))}})}loaded(){return this._loaded}updateImage(L){return L.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=L.url,this.load(L.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(L){this.map=L,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(L){this.coordinates=L;let J=L.map(e.Z.fromLngLat);this.tileID=function(de){let Ae=1/0,Ye=1/0,et=-1/0,dt=-1/0;for(let fr of de)Ae=Math.min(Ae,fr.x),Ye=Math.min(Ye,fr.y),et=Math.max(et,fr.x),dt=Math.max(dt,fr.y);let St=Math.max(et-Ae,dt-Ye),Ht=Math.max(0,Math.floor(-Math.log(St)/Math.LN2)),Wt=Math.pow(2,Ht);return new e.a1(Ht,Math.floor((Ae+et)/2*Wt),Math.floor((Ye+dt)/2*Wt))}(J),this.minzoom=this.maxzoom=this.tileID.z;let fe=J.map(de=>this.tileID.getTilePoint(de)._round());return this._boundsArray=new e.$,this._boundsArray.emplaceBack(fe[0].x,fe[0].y,0,0),this._boundsArray.emplaceBack(fe[1].x,fe[1].y,e.X,0),this._boundsArray.emplaceBack(fe[3].x,fe[3].y,0,e.X),this._boundsArray.emplaceBack(fe[2].x,fe[2].y,e.X,e.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let L=this.map.painter.context,J=L.gl;this.boundsBuffer||(this.boundsBuffer=L.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new h(L,this.image,J.RGBA),this.texture.bind(J.LINEAR,J.CLAMP_TO_EDGE));let fe=!1;for(let de in this.tiles){let Ae=this.tiles[de];Ae.state!=="loaded"&&(Ae.state="loaded",Ae.texture=this.texture,fe=!0)}fe&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(L){return e._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(L.tileID.canonical)?(this.tiles[String(L.tileID.wrap)]=L,L.buckets={}):L.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Oe extends Ue{constructor(L,J,fe,de){super(L,J,fe,de),this.roundZoom=!0,this.type="video",this.options=J}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let L=this.options;this.urls=[];for(let J of L.urls)this.urls.push(this.map._requestManager.transformRequest(J,"Source").url);try{let J=yield e.a3(this.urls);if(this._loaded=!0,!J)return;this.video=J,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(J){this.fire(new e.j(J))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(L){if(this.video){let J=this.video.seekable;LJ.end(0)?this.fire(new e.j(new e.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${J.start(0)} and ${J.end(0)}-second mark.`))):this.video.currentTime=L}}getVideo(){return this.video}onAdd(L){this.map||(this.map=L,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let L=this.map.painter.context,J=L.gl;this.boundsBuffer||(this.boundsBuffer=L.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(J.LINEAR,J.CLAMP_TO_EDGE),J.texSubImage2D(J.TEXTURE_2D,0,0,0,J.RGBA,J.UNSIGNED_BYTE,this.video)):(this.texture=new h(L,this.video,J.RGBA),this.texture.bind(J.LINEAR,J.CLAMP_TO_EDGE));let fe=!1;for(let de in this.tiles){let Ae=this.tiles[de];Ae.state!=="loaded"&&(Ae.state="loaded",Ae.texture=this.texture,fe=!0)}fe&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class _e extends Ue{constructor(L,J,fe,de){super(L,J,fe,de),J.coordinates?Array.isArray(J.coordinates)&&J.coordinates.length===4&&!J.coordinates.some(Ae=>!Array.isArray(Ae)||Ae.length!==2||Ae.some(Ye=>typeof Ye!="number"))||this.fire(new e.j(new e.a2(`sources.${L}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.j(new e.a2(`sources.${L}`,null,'missing required property "coordinates"'))),J.animate&&typeof J.animate!="boolean"&&this.fire(new e.j(new e.a2(`sources.${L}`,null,'optional "animate" property must be a boolean value'))),J.canvas?typeof J.canvas=="string"||J.canvas instanceof HTMLCanvasElement||this.fire(new e.j(new e.a2(`sources.${L}`,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 e.j(new e.a2(`sources.${L}`,null,'missing required property "canvas"'))),this.options=J,this.animate=J.animate===void 0||J.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.j(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())})}getCanvas(){return this.canvas}onAdd(L){this.map=L,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let L=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,L=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,L=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let J=this.map.painter.context,fe=J.gl;this.boundsBuffer||(this.boundsBuffer=J.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?(L||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new h(J,this.canvas,fe.RGBA,{premultiply:!0});let de=!1;for(let Ae in this.tiles){let Ye=this.tiles[Ae];Ye.state!=="loaded"&&(Ye.state="loaded",Ye.texture=this.texture,de=!0)}de&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let L of[this.canvas.width,this.canvas.height])if(isNaN(L)||L<=0)return!0;return!1}}let ce={},ie=Me=>{switch(Me){case"geojson":return Se;case"image":return Ue;case"raster":return ge;case"raster-dem":return Te;case"vector":return pe;case"video":return Oe;case"canvas":return _e}return ce[Me]},se="RTLPluginLoaded";class ne extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=H()}_syncState(L){return this.status=L,this.dispatcher.broadcast("SRPS",{pluginStatus:L,pluginURL:this.url}).catch(J=>{throw this.status="error",J})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(L){return e._(this,arguments,void 0,function*(J,fe=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=n.resolveURL(J),!this.url)throw new Error(`requested url ${J} is invalid`);if(this.status==="unavailable"){if(!fe)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.k(se))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let be=null;function De(){return be||(be=new ne),be}class qe{constructor(L,J){this.timeAdded=0,this.fadeEndTime=0,this.tileID=L,this.uid=e.a4(),this.uses=0,this.tileSize=J,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(L){let J=L+this.timeAdded;JAe.getLayer(St)).filter(Boolean);if(dt.length!==0){et.layers=dt,et.stateDependentLayerIds&&(et.stateDependentLayers=et.stateDependentLayerIds.map(St=>dt.filter(Ht=>Ht.id===St)[0]));for(let St of dt)Ye[St.id]=et}}return Ye}(L.buckets,J.style),this.hasSymbolBuckets=!1;for(let de in this.buckets){let Ae=this.buckets[de];if(Ae instanceof e.a6){if(this.hasSymbolBuckets=!0,!fe)break;Ae.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let de in this.buckets){let Ae=this.buckets[de];if(Ae instanceof e.a6&&Ae.hasRTLText){this.hasRTLText=!0,De().lazyLoad();break}}this.queryPadding=0;for(let de in this.buckets){let Ae=this.buckets[de];this.queryPadding=Math.max(this.queryPadding,J.style.getLayer(de).queryRadius(Ae))}L.imageAtlas&&(this.imageAtlas=L.imageAtlas),L.glyphAtlasImage&&(this.glyphAtlasImage=L.glyphAtlasImage)}else this.collisionBoxArray=new e.a5}unloadVectorData(){for(let L in this.buckets)this.buckets[L].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(L){return this.buckets[L.id]}upload(L){for(let fe in this.buckets){let de=this.buckets[fe];de.uploadPending()&&de.upload(L)}let J=L.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new h(L,this.imageAtlas.image,J.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new h(L,this.glyphAtlasImage,J.ALPHA),this.glyphAtlasImage=null)}prepare(L){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(L,this.imageAtlasTexture)}queryRenderedFeatures(L,J,fe,de,Ae,Ye,et,dt,St,Ht){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:de,cameraQueryGeometry:Ae,scale:Ye,tileSize:this.tileSize,pixelPosMatrix:Ht,transform:dt,params:et,queryPadding:this.queryPadding*St},L,J,fe):{}}querySourceFeatures(L,J){let fe=this.latestFeatureIndex;if(!fe||!fe.rawTileData)return;let de=fe.loadVTLayers(),Ae=J&&J.sourceLayer?J.sourceLayer:"",Ye=de._geojsonTileLayer||de[Ae];if(!Ye)return;let et=e.a7(J&&J.filter),{z:dt,x:St,y:Ht}=this.tileID.canonical,Wt={z:dt,x:St,y:Ht};for(let fr=0;frfe)de=!1;else if(J)if(this.expirationTime{this.remove(L,Ae)},fe)),this.data[de].push(Ae),this.order.push(de),this.order.length>this.max){let Ye=this._getAndRemoveByKey(this.order[0]);Ye&&this.onRemove(Ye)}return this}has(L){return L.wrapped().key in this.data}getAndRemove(L){return this.has(L)?this._getAndRemoveByKey(L.wrapped().key):null}_getAndRemoveByKey(L){let J=this.data[L].shift();return J.timeout&&clearTimeout(J.timeout),this.data[L].length===0&&delete this.data[L],this.order.splice(this.order.indexOf(L),1),J.value}getByKey(L){let J=this.data[L];return J?J[0].value:null}get(L){return this.has(L)?this.data[L.wrapped().key][0].value:null}remove(L,J){if(!this.has(L))return this;let fe=L.wrapped().key,de=J===void 0?0:this.data[fe].indexOf(J),Ae=this.data[fe][de];return this.data[fe].splice(de,1),Ae.timeout&&clearTimeout(Ae.timeout),this.data[fe].length===0&&delete this.data[fe],this.onRemove(Ae.value),this.order.splice(this.order.indexOf(fe),1),this}setMaxSize(L){for(this.max=L;this.order.length>this.max;){let J=this._getAndRemoveByKey(this.order[0]);J&&this.onRemove(J)}return this}filter(L){let J=[];for(let fe in this.data)for(let de of this.data[fe])L(de.value)||J.push(de);for(let fe of J)this.remove(fe.value.tileID,fe)}}class ut{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(L,J,fe){let de=String(J);if(this.stateChanges[L]=this.stateChanges[L]||{},this.stateChanges[L][de]=this.stateChanges[L][de]||{},e.e(this.stateChanges[L][de],fe),this.deletedStates[L]===null){this.deletedStates[L]={};for(let Ae in this.state[L])Ae!==de&&(this.deletedStates[L][Ae]=null)}else if(this.deletedStates[L]&&this.deletedStates[L][de]===null){this.deletedStates[L][de]={};for(let Ae in this.state[L][de])fe[Ae]||(this.deletedStates[L][de][Ae]=null)}else for(let Ae in fe)this.deletedStates[L]&&this.deletedStates[L][de]&&this.deletedStates[L][de][Ae]===null&&delete this.deletedStates[L][de][Ae]}removeFeatureState(L,J,fe){if(this.deletedStates[L]===null)return;let de=String(J);if(this.deletedStates[L]=this.deletedStates[L]||{},fe&&J!==void 0)this.deletedStates[L][de]!==null&&(this.deletedStates[L][de]=this.deletedStates[L][de]||{},this.deletedStates[L][de][fe]=null);else if(J!==void 0)if(this.stateChanges[L]&&this.stateChanges[L][de])for(fe in this.deletedStates[L][de]={},this.stateChanges[L][de])this.deletedStates[L][de][fe]=null;else this.deletedStates[L][de]=null;else this.deletedStates[L]=null}getState(L,J){let fe=String(J),de=e.e({},(this.state[L]||{})[fe],(this.stateChanges[L]||{})[fe]);if(this.deletedStates[L]===null)return{};if(this.deletedStates[L]){let Ae=this.deletedStates[L][J];if(Ae===null)return{};for(let Ye in Ae)delete de[Ye]}return de}initializeTileState(L,J){L.setFeatureState(this.state,J)}coalesceChanges(L,J){let fe={};for(let de in this.stateChanges){this.state[de]=this.state[de]||{};let Ae={};for(let Ye in this.stateChanges[de])this.state[de][Ye]||(this.state[de][Ye]={}),e.e(this.state[de][Ye],this.stateChanges[de][Ye]),Ae[Ye]=this.state[de][Ye];fe[de]=Ae}for(let de in this.deletedStates){this.state[de]=this.state[de]||{};let Ae={};if(this.deletedStates[de]===null)for(let Ye in this.state[de])Ae[Ye]={},this.state[de][Ye]={};else for(let Ye in this.deletedStates[de]){if(this.deletedStates[de][Ye]===null)this.state[de][Ye]={};else for(let et of Object.keys(this.deletedStates[de][Ye]))delete this.state[de][Ye][et];Ae[Ye]=this.state[de][Ye]}fe[de]=fe[de]||{},e.e(fe[de],Ae)}if(this.stateChanges={},this.deletedStates={},Object.keys(fe).length!==0)for(let de in L)L[de].setFeatureState(fe,J)}}class ot extends e.E{constructor(L,J,fe){super(),this.id=L,this.dispatcher=fe,this.on("data",de=>this._dataHandler(de)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((de,Ae,Ye,et)=>{let dt=new(ie(Ae.type))(de,Ae,Ye,et);if(dt.id!==de)throw new Error(`Expected Source id to be ${de} instead of ${dt.id}`);return dt})(L,J,fe,this),this._tiles={},this._cache=new Ne(0,de=>this._unloadTile(de)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ut,this._didEmitContent=!1,this._updated=!1}onAdd(L){this.map=L,this._maxTileCacheSize=L?L._maxTileCacheSize:null,this._maxTileCacheZoomLevels=L?L._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(L)}onRemove(L){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(L)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let L in this._tiles){let J=this._tiles[L];if(J.state!=="loaded"&&J.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let L=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,L&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(L,J,fe){return e._(this,void 0,void 0,function*(){try{yield this._source.loadTile(L),this._tileLoaded(L,J,fe)}catch(de){L.state="errored",de.status!==404?this._source.fire(new e.j(de,{tile:L})):this.update(this.transform,this.terrain)}})}_unloadTile(L){this._source.unloadTile&&this._source.unloadTile(L)}_abortTile(L){this._source.abortTile&&this._source.abortTile(L),this._source.fire(new e.k("dataabort",{tile:L,coord:L.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(L){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let J in this._tiles){let fe=this._tiles[J];fe.upload(L),fe.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(L=>L.tileID).sort(yt).map(L=>L.key)}getRenderableIds(L){let J=[];for(let fe in this._tiles)this._isIdRenderable(fe,L)&&J.push(this._tiles[fe]);return L?J.sort((fe,de)=>{let Ae=fe.tileID,Ye=de.tileID,et=new e.P(Ae.canonical.x,Ae.canonical.y)._rotate(this.transform.angle),dt=new e.P(Ye.canonical.x,Ye.canonical.y)._rotate(this.transform.angle);return Ae.overscaledZ-Ye.overscaledZ||dt.y-et.y||dt.x-et.x}).map(fe=>fe.tileID.key):J.map(fe=>fe.tileID).sort(yt).map(fe=>fe.key)}hasRenderableParent(L){let J=this.findLoadedParent(L,0);return!!J&&this._isIdRenderable(J.tileID.key)}_isIdRenderable(L,J){return this._tiles[L]&&this._tiles[L].hasData()&&!this._coveredTiles[L]&&(J||!this._tiles[L].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let L in this._tiles)this._tiles[L].state!=="errored"&&this._reloadTile(L,"reloading")}}_reloadTile(L,J){return e._(this,void 0,void 0,function*(){let fe=this._tiles[L];fe&&(fe.state!=="loading"&&(fe.state=J),yield this._loadTile(fe,L,J))})}_tileLoaded(L,J,fe){L.timeAdded=n.now(),fe==="expired"&&(L.refreshedUponExpiration=!0),this._setTileReloadTimer(J,L),this.getSource().type==="raster-dem"&&L.dem&&this._backfillDEM(L),this._state.initializeTileState(L,this.map?this.map.painter:null),L.aborted||this._source.fire(new e.k("data",{dataType:"source",tile:L,coord:L.tileID}))}_backfillDEM(L){let J=this.getRenderableIds();for(let de=0;de1||(Math.abs(Ye)>1&&(Math.abs(Ye+dt)===1?Ye+=dt:Math.abs(Ye-dt)===1&&(Ye-=dt)),Ae.dem&&de.dem&&(de.dem.backfillBorder(Ae.dem,Ye,et),de.neighboringTiles&&de.neighboringTiles[St]&&(de.neighboringTiles[St].backfilled=!0)))}}getTile(L){return this.getTileByID(L.key)}getTileByID(L){return this._tiles[L]}_retainLoadedChildren(L,J,fe,de){for(let Ae in this._tiles){let Ye=this._tiles[Ae];if(de[Ae]||!Ye.hasData()||Ye.tileID.overscaledZ<=J||Ye.tileID.overscaledZ>fe)continue;let et=Ye.tileID;for(;Ye&&Ye.tileID.overscaledZ>J+1;){let St=Ye.tileID.scaledTo(Ye.tileID.overscaledZ-1);Ye=this._tiles[St.key],Ye&&Ye.hasData()&&(et=St)}let dt=et;for(;dt.overscaledZ>J;)if(dt=dt.scaledTo(dt.overscaledZ-1),L[dt.key]){de[et.key]=et;break}}}findLoadedParent(L,J){if(L.key in this._loadedParentTiles){let fe=this._loadedParentTiles[L.key];return fe&&fe.tileID.overscaledZ>=J?fe:null}for(let fe=L.overscaledZ-1;fe>=J;fe--){let de=L.scaledTo(fe),Ae=this._getLoadedTile(de);if(Ae)return Ae}}findLoadedSibling(L){return this._getLoadedTile(L)}_getLoadedTile(L){let J=this._tiles[L.key];return J&&J.hasData()?J:this._cache.getByKey(L.wrapped().key)}updateCacheSize(L){let J=Math.ceil(L.width/this._source.tileSize)+1,fe=Math.ceil(L.height/this._source.tileSize)+1,de=Math.floor(J*fe*(this._maxTileCacheZoomLevels===null?e.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),Ae=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,de):de;this._cache.setMaxSize(Ae)}handleWrapJump(L){let J=Math.round((L-(this._prevLng===void 0?L:this._prevLng))/360);if(this._prevLng=L,J){let fe={};for(let de in this._tiles){let Ae=this._tiles[de];Ae.tileID=Ae.tileID.unwrapTo(Ae.tileID.wrap+J),fe[Ae.tileID.key]=Ae}this._tiles=fe;for(let de in this._timers)clearTimeout(this._timers[de]),delete this._timers[de];for(let de in this._tiles)this._setTileReloadTimer(de,this._tiles[de])}}_updateCoveredAndRetainedTiles(L,J,fe,de,Ae,Ye){let et={},dt={},St=Object.keys(L),Ht=n.now();for(let Wt of St){let fr=L[Wt],Ar=this._tiles[Wt];if(!Ar||Ar.fadeEndTime!==0&&Ar.fadeEndTime<=Ht)continue;let Le=this.findLoadedParent(fr,J),ze=this.findLoadedSibling(fr),je=Le||ze||null;je&&(this._addTile(je.tileID),et[je.tileID.key]=je.tileID),dt[Wt]=fr}this._retainLoadedChildren(dt,de,fe,L);for(let Wt in et)L[Wt]||(this._coveredTiles[Wt]=!0,L[Wt]=et[Wt]);if(Ye){let Wt={},fr={};for(let Ar of Ae)this._tiles[Ar.key].hasData()?Wt[Ar.key]=Ar:fr[Ar.key]=Ar;for(let Ar in fr){let Le=fr[Ar].children(this._source.maxzoom);this._tiles[Le[0].key]&&this._tiles[Le[1].key]&&this._tiles[Le[2].key]&&this._tiles[Le[3].key]&&(Wt[Le[0].key]=L[Le[0].key]=Le[0],Wt[Le[1].key]=L[Le[1].key]=Le[1],Wt[Le[2].key]=L[Le[2].key]=Le[2],Wt[Le[3].key]=L[Le[3].key]=Le[3],delete fr[Ar])}for(let Ar in fr){let Le=fr[Ar],ze=this.findLoadedParent(Le,this._source.minzoom),je=this.findLoadedSibling(Le),Xe=ze||je||null;if(Xe){Wt[Xe.tileID.key]=L[Xe.tileID.key]=Xe.tileID;for(let st in Wt)Wt[st].isChildOf(Xe.tileID)&&delete Wt[st]}}for(let Ar in this._tiles)Wt[Ar]||(this._coveredTiles[Ar]=!0)}}update(L,J){if(!this._sourceLoaded||this._paused)return;let fe;this.transform=L,this.terrain=J,this.updateCacheSize(L),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?fe=L.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ht=>new e.S(Ht.canonical.z,Ht.wrap,Ht.canonical.z,Ht.canonical.x,Ht.canonical.y)):(fe=L.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:J}),this._source.hasTile&&(fe=fe.filter(Ht=>this._source.hasTile(Ht)))):fe=[];let de=L.coveringZoomLevel(this._source),Ae=Math.max(de-ot.maxOverzooming,this._source.minzoom),Ye=Math.max(de+ot.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Ht={};for(let Wt of fe)if(Wt.canonical.z>this._source.minzoom){let fr=Wt.scaledTo(Wt.canonical.z-1);Ht[fr.key]=fr;let Ar=Wt.scaledTo(Math.max(this._source.minzoom,Math.min(Wt.canonical.z,5)));Ht[Ar.key]=Ar}fe=fe.concat(Object.values(Ht))}let et=fe.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,et&&this.fire(new e.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let dt=this._updateRetainedTiles(fe,de);At(this._source.type)&&this._updateCoveredAndRetainedTiles(dt,Ae,Ye,de,fe,J);for(let Ht in dt)this._tiles[Ht].clearFadeHold();let St=e.ab(this._tiles,dt);for(let Ht of St){let Wt=this._tiles[Ht];Wt.hasSymbolBuckets&&!Wt.holdingForFade()?Wt.setHoldDuration(this.map._fadeDuration):Wt.hasSymbolBuckets&&!Wt.symbolFadeFinished()||this._removeTile(Ht)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let L in this._tiles)this._tiles[L].holdingForFade()&&this._removeTile(L)}_updateRetainedTiles(L,J){var fe;let de={},Ae={},Ye=Math.max(J-ot.maxOverzooming,this._source.minzoom),et=Math.max(J+ot.maxUnderzooming,this._source.minzoom),dt={};for(let St of L){let Ht=this._addTile(St);de[St.key]=St,Ht.hasData()||Jthis._source.maxzoom){let fr=St.children(this._source.maxzoom)[0],Ar=this.getTile(fr);if(Ar&&Ar.hasData()){de[fr.key]=fr;continue}}else{let fr=St.children(this._source.maxzoom);if(de[fr[0].key]&&de[fr[1].key]&&de[fr[2].key]&&de[fr[3].key])continue}let Wt=Ht.wasRequested();for(let fr=St.overscaledZ-1;fr>=Ye;--fr){let Ar=St.scaledTo(fr);if(Ae[Ar.key])break;if(Ae[Ar.key]=!0,Ht=this.getTile(Ar),!Ht&&Wt&&(Ht=this._addTile(Ar)),Ht){let Le=Ht.hasData();if((Le||!(!((fe=this.map)===null||fe===void 0)&&fe.cancelPendingTileRequestsWhileZooming)||Wt)&&(de[Ar.key]=Ar),Wt=Ht.wasRequested(),Le)break}}}return de}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let L in this._tiles){let J=[],fe,de=this._tiles[L].tileID;for(;de.overscaledZ>0;){if(de.key in this._loadedParentTiles){fe=this._loadedParentTiles[de.key];break}J.push(de.key);let Ae=de.scaledTo(de.overscaledZ-1);if(fe=this._getLoadedTile(Ae),fe)break;de=Ae}for(let Ae of J)this._loadedParentTiles[Ae]=fe}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let L in this._tiles){let J=this._tiles[L].tileID,fe=this._getLoadedTile(J);this._loadedSiblingTiles[J.key]=fe}}_addTile(L){let J=this._tiles[L.key];if(J)return J;J=this._cache.getAndRemove(L),J&&(this._setTileReloadTimer(L.key,J),J.tileID=L,this._state.initializeTileState(J,this.map?this.map.painter:null),this._cacheTimers[L.key]&&(clearTimeout(this._cacheTimers[L.key]),delete this._cacheTimers[L.key],this._setTileReloadTimer(L.key,J)));let fe=J;return J||(J=new qe(L,this._source.tileSize*L.overscaleFactor()),this._loadTile(J,L.key,J.state)),J.uses++,this._tiles[L.key]=J,fe||this._source.fire(new e.k("dataloading",{tile:J,coord:J.tileID,dataType:"source"})),J}_setTileReloadTimer(L,J){L in this._timers&&(clearTimeout(this._timers[L]),delete this._timers[L]);let fe=J.getExpiryTimeout();fe&&(this._timers[L]=setTimeout(()=>{this._reloadTile(L,"expired"),delete this._timers[L]},fe))}_removeTile(L){let J=this._tiles[L];J&&(J.uses--,delete this._tiles[L],this._timers[L]&&(clearTimeout(this._timers[L]),delete this._timers[L]),J.uses>0||(J.hasData()&&J.state!=="reloading"?this._cache.add(J.tileID,J,J.getExpiryTimeout()):(J.aborted=!0,this._abortTile(J),this._unloadTile(J))))}_dataHandler(L){let J=L.sourceDataType;L.dataType==="source"&&J==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&L.dataType==="source"&&J==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let L in this._tiles)this._removeTile(L);this._cache.reset()}tilesIn(L,J,fe){let de=[],Ae=this.transform;if(!Ae)return de;let Ye=fe?Ae.getCameraQueryGeometry(L):L,et=L.map(Le=>Ae.pointCoordinate(Le,this.terrain)),dt=Ye.map(Le=>Ae.pointCoordinate(Le,this.terrain)),St=this.getIds(),Ht=1/0,Wt=1/0,fr=-1/0,Ar=-1/0;for(let Le of dt)Ht=Math.min(Ht,Le.x),Wt=Math.min(Wt,Le.y),fr=Math.max(fr,Le.x),Ar=Math.max(Ar,Le.y);for(let Le=0;Le=0&&Qe[1].y+st>=0){let ht=et.map(Ot=>je.getTilePoint(Ot)),Dt=dt.map(Ot=>je.getTilePoint(Ot));de.push({tile:ze,tileID:je,queryGeometry:ht,cameraQueryGeometry:Dt,scale:Xe})}}return de}getVisibleCoordinates(L){let J=this.getRenderableIds(L).map(fe=>this._tiles[fe].tileID);for(let fe of J)fe.posMatrix=this.transform.calculatePosMatrix(fe.toUnwrapped());return J}hasTransition(){if(this._source.hasTransition())return!0;if(At(this._source.type)){let L=n.now();for(let J in this._tiles)if(this._tiles[J].fadeEndTime>=L)return!0}return!1}setFeatureState(L,J,fe){this._state.updateState(L=L||"_geojsonTileLayer",J,fe)}removeFeatureState(L,J,fe){this._state.removeFeatureState(L=L||"_geojsonTileLayer",J,fe)}getFeatureState(L,J){return this._state.getState(L=L||"_geojsonTileLayer",J)}setDependencies(L,J,fe){let de=this._tiles[L];de&&de.setDependencies(J,fe)}reloadTilesForDependencies(L,J){for(let fe in this._tiles)this._tiles[fe].hasDependency(L,J)&&this._reloadTile(fe,"reloading");this._cache.filter(fe=>!fe.hasDependency(L,J))}}function yt(Me,L){let J=Math.abs(2*Me.wrap)-+(Me.wrap<0),fe=Math.abs(2*L.wrap)-+(L.wrap<0);return Me.overscaledZ-L.overscaledZ||fe-J||L.canonical.y-Me.canonical.y||L.canonical.x-Me.canonical.x}function At(Me){return Me==="raster"||Me==="image"||Me==="video"}ot.maxOverzooming=10,ot.maxUnderzooming=3;class It{constructor(L,J){this.reset(L,J)}reset(L,J){this.points=L||[],this._distances=[0];for(let fe=1;fe0?(de-Ye)/et:0;return this.points[Ae].mult(1-dt).add(this.points[J].mult(dt))}}function Zt(Me,L){let J=!0;return Me==="always"||Me!=="never"&&L!=="never"||(J=!1),J}class vr{constructor(L,J,fe){let de=this.boxCells=[],Ae=this.circleCells=[];this.xCellCount=Math.ceil(L/fe),this.yCellCount=Math.ceil(J/fe);for(let Ye=0;Yethis.width||de<0||J>this.height)return[];let dt=[];if(L<=0&&J<=0&&this.width<=fe&&this.height<=de){if(Ae)return[{key:null,x1:L,y1:J,x2:fe,y2:de}];for(let St=0;St0}hitTestCircle(L,J,fe,de,Ae){let Ye=L-fe,et=L+fe,dt=J-fe,St=J+fe;if(et<0||Ye>this.width||St<0||dt>this.height)return!1;let Ht=[];return this._forEachCell(Ye,dt,et,St,this._queryCellCircle,Ht,{hitTest:!0,overlapMode:de,circle:{x:L,y:J,radius:fe},seenUids:{box:{},circle:{}}},Ae),Ht.length>0}_queryCell(L,J,fe,de,Ae,Ye,et,dt){let{seenUids:St,hitTest:Ht,overlapMode:Wt}=et,fr=this.boxCells[Ae];if(fr!==null){let Le=this.bboxes;for(let ze of fr)if(!St.box[ze]){St.box[ze]=!0;let je=4*ze,Xe=this.boxKeys[ze];if(L<=Le[je+2]&&J<=Le[je+3]&&fe>=Le[je+0]&&de>=Le[je+1]&&(!dt||dt(Xe))&&(!Ht||!Zt(Wt,Xe.overlapMode))&&(Ye.push({key:Xe,x1:Le[je],y1:Le[je+1],x2:Le[je+2],y2:Le[je+3]}),Ht))return!0}}let Ar=this.circleCells[Ae];if(Ar!==null){let Le=this.circles;for(let ze of Ar)if(!St.circle[ze]){St.circle[ze]=!0;let je=3*ze,Xe=this.circleKeys[ze];if(this._circleAndRectCollide(Le[je],Le[je+1],Le[je+2],L,J,fe,de)&&(!dt||dt(Xe))&&(!Ht||!Zt(Wt,Xe.overlapMode))){let st=Le[je],Qe=Le[je+1],ht=Le[je+2];if(Ye.push({key:Xe,x1:st-ht,y1:Qe-ht,x2:st+ht,y2:Qe+ht}),Ht)return!0}}}return!1}_queryCellCircle(L,J,fe,de,Ae,Ye,et,dt){let{circle:St,seenUids:Ht,overlapMode:Wt}=et,fr=this.boxCells[Ae];if(fr!==null){let Le=this.bboxes;for(let ze of fr)if(!Ht.box[ze]){Ht.box[ze]=!0;let je=4*ze,Xe=this.boxKeys[ze];if(this._circleAndRectCollide(St.x,St.y,St.radius,Le[je+0],Le[je+1],Le[je+2],Le[je+3])&&(!dt||dt(Xe))&&!Zt(Wt,Xe.overlapMode))return Ye.push(!0),!0}}let Ar=this.circleCells[Ae];if(Ar!==null){let Le=this.circles;for(let ze of Ar)if(!Ht.circle[ze]){Ht.circle[ze]=!0;let je=3*ze,Xe=this.circleKeys[ze];if(this._circlesCollide(Le[je],Le[je+1],Le[je+2],St.x,St.y,St.radius)&&(!dt||dt(Xe))&&!Zt(Wt,Xe.overlapMode))return Ye.push(!0),!0}}}_forEachCell(L,J,fe,de,Ae,Ye,et,dt){let St=this._convertToXCellCoord(L),Ht=this._convertToYCellCoord(J),Wt=this._convertToXCellCoord(fe),fr=this._convertToYCellCoord(de);for(let Ar=St;Ar<=Wt;Ar++)for(let Le=Ht;Le<=fr;Le++)if(Ae.call(this,L,J,fe,de,this.xCellCount*Le+Ar,Ye,et,dt))return}_convertToXCellCoord(L){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(L*this.xScale)))}_convertToYCellCoord(L){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(L*this.yScale)))}_circlesCollide(L,J,fe,de,Ae,Ye){let et=de-L,dt=Ae-J,St=fe+Ye;return St*St>et*et+dt*dt}_circleAndRectCollide(L,J,fe,de,Ae,Ye,et){let dt=(Ye-de)/2,St=Math.abs(L-(de+dt));if(St>dt+fe)return!1;let Ht=(et-Ae)/2,Wt=Math.abs(J-(Ae+Ht));if(Wt>Ht+fe)return!1;if(St<=dt||Wt<=Ht)return!0;let fr=St-dt,Ar=Wt-Ht;return fr*fr+Ar*Ar<=fe*fe}}function Ut(Me,L,J,fe,de){let Ae=e.H();return L?(e.K(Ae,Ae,[1/de,1/de,1]),J||e.ad(Ae,Ae,fe.angle)):e.L(Ae,fe.labelPlaneMatrix,Me),Ae}function Jt(Me,L,J,fe,de){if(L){let Ae=e.ae(Me);return e.K(Ae,Ae,[de,de,1]),J||e.ad(Ae,Ae,-fe.angle),Ae}return fe.glCoordMatrix}function at(Me,L,J,fe){let de;fe?(de=[Me,L,fe(Me,L),1],e.af(de,de,J)):(de=[Me,L,0,1],Et(de,de,J));let Ae=de[3];return{point:new e.P(de[0]/Ae,de[1]/Ae),signedDistanceFromCamera:Ae,isOccluded:!1}}function Ee(Me,L){return .5+Me/L*.5}function Re(Me,L){return Me.x>=-L[0]&&Me.x<=L[0]&&Me.y>=-L[1]&&Me.y<=L[1]}function he(Me,L,J,fe,de,Ae,Ye,et,dt,St,Ht,Wt,fr,Ar,Le){let ze=fe?Me.textSizeData:Me.iconSizeData,je=e.ag(ze,J.transform.zoom),Xe=[256/J.width*2+1,256/J.height*2+1],st=fe?Me.text.dynamicLayoutVertexArray:Me.icon.dynamicLayoutVertexArray;st.clear();let Qe=Me.lineVertexArray,ht=fe?Me.text.placedSymbolArray:Me.icon.placedSymbolArray,Dt=J.transform.width/J.transform.height,Ot=!1;for(let $t=0;$tMath.abs(J.x-L.x)*fe?{useVertical:!0}:(Me===e.ah.vertical?L.yJ.x)?{needsFlipping:!0}:null}function Fe(Me,L,J,fe,de,Ae,Ye,et,dt,St,Ht){let Wt=J/24,fr=L.lineOffsetX*Wt,Ar=L.lineOffsetY*Wt,Le;if(L.numGlyphs>1){let ze=L.glyphStartIndex+L.numGlyphs,je=L.lineStartIndex,Xe=L.lineStartIndex+L.lineLength,st=ye(Wt,et,fr,Ar,fe,L,Ht,Me);if(!st)return{notEnoughRoom:!0};let Qe=at(st.first.point.x,st.first.point.y,Ye,Me.getElevation).point,ht=at(st.last.point.x,st.last.point.y,Ye,Me.getElevation).point;if(de&&!fe){let Dt=Ie(L.writingMode,Qe,ht,St);if(Dt)return Dt}Le=[st.first];for(let Dt=L.glyphStartIndex+1;Dt0?Qe.point:function(Ot,$t,ir,pr,zr,Wr){return He(Ot,$t,ir,1,zr,Wr)}(Me.tileAnchorPoint,st,je,0,Ae,Me),Dt=Ie(L.writingMode,je,ht,St);if(Dt)return Dt}let ze=mt(Wt*et.getoffsetX(L.glyphStartIndex),fr,Ar,fe,L.segment,L.lineStartIndex,L.lineStartIndex+L.lineLength,Me,Ht);if(!ze||Me.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Le=[ze]}for(let ze of Le)e.aj(dt,ze.point,ze.angle);return{}}function He(Me,L,J,fe,de,Ae){let Ye=Me.add(Me.sub(L)._unit()),et=de!==void 0?at(Ye.x,Ye.y,de,Ae.getElevation).point:pt(Ye.x,Ye.y,Ae).point,dt=J.sub(et);return J.add(dt._mult(fe/dt.mag()))}function We(Me,L,J){let fe=L.projectionCache;if(fe.projections[Me])return fe.projections[Me];let de=new e.P(L.lineVertexArray.getx(Me),L.lineVertexArray.gety(Me)),Ae=pt(de.x,de.y,L);if(Ae.signedDistanceFromCamera>0)return fe.projections[Me]=Ae.point,fe.anyProjectionOccluded=fe.anyProjectionOccluded||Ae.isOccluded,Ae.point;let Ye=Me-J.direction;return function(et,dt,St,Ht,Wt){return He(et,dt,St,Ht,void 0,Wt)}(J.distanceFromAnchor===0?L.tileAnchorPoint:new e.P(L.lineVertexArray.getx(Ye),L.lineVertexArray.gety(Ye)),de,J.previousVertex,J.absOffsetX-J.distanceFromAnchor+1,L)}function pt(Me,L,J){let fe=Me+J.translation[0],de=L+J.translation[1],Ae;return!J.pitchWithMap&&J.projection.useSpecialProjectionForSymbols?(Ae=J.projection.projectTileCoordinates(fe,de,J.unwrappedTileID,J.getElevation),Ae.point.x=(.5*Ae.point.x+.5)*J.width,Ae.point.y=(.5*-Ae.point.y+.5)*J.height):(Ae=at(fe,de,J.labelPlaneMatrix,J.getElevation),Ae.isOccluded=!1),Ae}function ct(Me,L,J){return Me._unit()._perp()._mult(L*J)}function ft(Me,L,J,fe,de,Ae,Ye,et,dt){if(et.projectionCache.offsets[Me])return et.projectionCache.offsets[Me];let St=J.add(L);if(Me+dt.direction=de)return et.projectionCache.offsets[Me]=St,St;let Ht=We(Me+dt.direction,et,dt),Wt=ct(Ht.sub(J),Ye,dt.direction),fr=J.add(Wt),Ar=Ht.add(Wt);return et.projectionCache.offsets[Me]=e.ak(Ae,St,fr,Ar)||St,et.projectionCache.offsets[Me]}function mt(Me,L,J,fe,de,Ae,Ye,et,dt){let St=fe?Me-L:Me+L,Ht=St>0?1:-1,Wt=0;fe&&(Ht*=-1,Wt=Math.PI),Ht<0&&(Wt+=Math.PI);let fr,Ar=Ht>0?Ae+de:Ae+de+1;et.projectionCache.cachedAnchorPoint?fr=et.projectionCache.cachedAnchorPoint:(fr=pt(et.tileAnchorPoint.x,et.tileAnchorPoint.y,et).point,et.projectionCache.cachedAnchorPoint=fr);let Le,ze,je=fr,Xe=fr,st=0,Qe=0,ht=Math.abs(St),Dt=[],Ot;for(;st+Qe<=ht;){if(Ar+=Ht,Ar=Ye)return null;st+=Qe,Xe=je,ze=Le;let pr={absOffsetX:ht,direction:Ht,distanceFromAnchor:st,previousVertex:Xe};if(je=We(Ar,et,pr),J===0)Dt.push(Xe),Ot=je.sub(Xe);else{let zr,Wr=je.sub(Xe);zr=Wr.mag()===0?ct(We(Ar+Ht,et,pr).sub(je),J,Ht):ct(Wr,J,Ht),ze||(ze=Xe.add(zr)),Le=ft(Ar,zr,je,Ae,Ye,ze,J,et,pr),Dt.push(ze),Ot=Le.sub(ze)}Qe=Ot.mag()}let $t=Ot._mult((ht-st)/Qe)._add(ze||Xe),ir=Wt+Math.atan2(je.y-Xe.y,je.x-Xe.x);return Dt.push($t),{point:$t,angle:dt?ir:0,path:Dt}}let _t=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Bt(Me,L){for(let J=0;J=1;pi--)wn.push(ln.path[pi]);for(let pi=1;piKi.signedDistanceFromCamera<=0)?[]:pi.map(Ki=>Ki.point)}let Mi=[];if(wn.length>0){let pi=wn[0].clone(),Ki=wn[0].clone();for(let Lo=1;Lo=Wr.x&&Ki.x<=ia.x&&pi.y>=Wr.y&&Ki.y<=ia.y?[wn]:Ki.xia.x||Ki.yia.y?[]:e.al([wn],Wr.x,Wr.y,ia.x,ia.y)}for(let pi of Mi){Sa.reset(pi,.25*zr);let Ki=0;Ki=Sa.length<=.5*zr?1:Math.ceil(Sa.paddedLength/ei)+1;for(let Lo=0;Loat(de.x,de.y,fe,J.getElevation))}queryRenderedSymbols(L){if(L.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let J=[],fe=1/0,de=1/0,Ae=-1/0,Ye=-1/0;for(let Ht of L){let Wt=new e.P(Ht.x+hr,Ht.y+hr);fe=Math.min(fe,Wt.x),de=Math.min(de,Wt.y),Ae=Math.max(Ae,Wt.x),Ye=Math.max(Ye,Wt.y),J.push(Wt)}let et=this.grid.query(fe,de,Ae,Ye).concat(this.ignoredGrid.query(fe,de,Ae,Ye)),dt={},St={};for(let Ht of et){let Wt=Ht.key;if(dt[Wt.bucketInstanceId]===void 0&&(dt[Wt.bucketInstanceId]={}),dt[Wt.bucketInstanceId][Wt.featureIndex])continue;let fr=[new e.P(Ht.x1,Ht.y1),new e.P(Ht.x2,Ht.y1),new e.P(Ht.x2,Ht.y2),new e.P(Ht.x1,Ht.y2)];e.am(J,fr)&&(dt[Wt.bucketInstanceId][Wt.featureIndex]=!0,St[Wt.bucketInstanceId]===void 0&&(St[Wt.bucketInstanceId]=[]),St[Wt.bucketInstanceId].push(Wt.featureIndex))}return St}insertCollisionBox(L,J,fe,de,Ae,Ye){(fe?this.ignoredGrid:this.grid).insert({bucketInstanceId:de,featureIndex:Ae,collisionGroupID:Ye,overlapMode:J},L[0],L[1],L[2],L[3])}insertCollisionCircles(L,J,fe,de,Ae,Ye){let et=fe?this.ignoredGrid:this.grid,dt={bucketInstanceId:de,featureIndex:Ae,collisionGroupID:Ye,overlapMode:J};for(let St=0;St=this.screenRightBoundary||dethis.screenBottomBoundary}isInsideGrid(L,J,fe,de){return fe>=0&&L=0&&Jthis.projectAndGetPerspectiveRatio(fe,zr.x,zr.y,de,St));ir=pr.some(zr=>!zr.isOccluded),$t=pr.map(zr=>zr.point)}else ir=!0;return{box:e.ao($t),allPointsOccluded:!ir}}}function ca(Me,L,J){return L*(e.X/(Me.tileSize*Math.pow(2,J-Me.tileID.overscaledZ)))}class na{constructor(L,J,fe,de){this.opacity=L?Math.max(0,Math.min(1,L.opacity+(L.placed?J:-J))):de&&fe?1:0,this.placed=fe}isHidden(){return this.opacity===0&&!this.placed}}class wa{constructor(L,J,fe,de,Ae){this.text=new na(L?L.text:null,J,fe,Ae),this.icon=new na(L?L.icon:null,J,de,Ae)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class pa{constructor(L,J,fe){this.text=L,this.icon=J,this.skipFade=fe}}class fa{constructor(){this.invProjMatrix=e.H(),this.viewportMatrix=e.H(),this.circles=[]}}class za{constructor(L,J,fe,de,Ae){this.bucketInstanceId=L,this.featureIndex=J,this.sourceLayerIndex=fe,this.bucketIndex=de,this.tileID=Ae}}class Ia{constructor(L){this.crossSourceCollisions=L,this.maxGroupID=0,this.collisionGroups={}}get(L){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[L]){let J=++this.maxGroupID;this.collisionGroups[L]={ID:J,predicate:fe=>fe.collisionGroupID===J}}return this.collisionGroups[L]}}function Va(Me,L,J,fe,de){let{horizontalAlign:Ae,verticalAlign:Ye}=e.au(Me);return new e.P(-(Ae-.5)*L+fe[0]*de,-(Ye-.5)*J+fe[1]*de)}class Oa{constructor(L,J,fe,de,Ae,Ye){this.transform=L.clone(),this.terrain=fe,this.collisionIndex=new $r(this.transform,J),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=de,this.retainedQueryData={},this.collisionGroups=new Ia(Ae),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Ye,Ye&&(Ye.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(L){let J=this.terrain;return J?(fe,de)=>J.getElevation(L,fe,de):null}getBucketParts(L,J,fe,de){let Ae=fe.getBucket(J),Ye=fe.latestFeatureIndex;if(!Ae||!Ye||J.id!==Ae.layerIds[0])return;let et=fe.collisionBoxArray,dt=Ae.layers[0].layout,St=Ae.layers[0].paint,Ht=Math.pow(2,this.transform.zoom-fe.tileID.overscaledZ),Wt=fe.tileSize/e.X,fr=fe.tileID.toUnwrapped(),Ar=this.transform.calculatePosMatrix(fr),Le=dt.get("text-pitch-alignment")==="map",ze=dt.get("text-rotation-alignment")==="map",je=ca(fe,1,this.transform.zoom),Xe=this.collisionIndex.mapProjection.translatePosition(this.transform,fe,St.get("text-translate"),St.get("text-translate-anchor")),st=this.collisionIndex.mapProjection.translatePosition(this.transform,fe,St.get("icon-translate"),St.get("icon-translate-anchor")),Qe=Ut(Ar,Le,ze,this.transform,je),ht=null;if(Le){let Ot=Jt(Ar,Le,ze,this.transform,je);ht=e.L([],this.transform.labelPlaneMatrix,Ot)}this.retainedQueryData[Ae.bucketInstanceId]=new za(Ae.bucketInstanceId,Ye,Ae.sourceLayerIndex,Ae.index,fe.tileID);let Dt={bucket:Ae,layout:dt,translationText:Xe,translationIcon:st,posMatrix:Ar,unwrappedTileID:fr,textLabelPlaneMatrix:Qe,labelToScreenMatrix:ht,scale:Ht,textPixelRatio:Wt,holdingForFade:fe.holdingForFade(),collisionBoxArray:et,partiallyEvaluatedTextSize:e.ag(Ae.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Ae.sourceID)};if(de)for(let Ot of Ae.sortKeyRanges){let{sortKey:$t,symbolInstanceStart:ir,symbolInstanceEnd:pr}=Ot;L.push({sortKey:$t,symbolInstanceStart:ir,symbolInstanceEnd:pr,parameters:Dt})}else L.push({symbolInstanceStart:0,symbolInstanceEnd:Ae.symbolInstances.length,parameters:Dt})}attemptAnchorPlacement(L,J,fe,de,Ae,Ye,et,dt,St,Ht,Wt,fr,Ar,Le,ze,je,Xe,st,Qe){let ht=e.aq[L.textAnchor],Dt=[L.textOffset0,L.textOffset1],Ot=Va(ht,fe,de,Dt,Ae),$t=this.collisionIndex.placeCollisionBox(J,fr,dt,St,Ht,et,Ye,je,Wt.predicate,Qe,Ot);if((!st||this.collisionIndex.placeCollisionBox(st,fr,dt,St,Ht,et,Ye,Xe,Wt.predicate,Qe,Ot).placeable)&&$t.placeable){let ir;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Ar.crossTileID]&&this.prevPlacement.placements[Ar.crossTileID]&&this.prevPlacement.placements[Ar.crossTileID].text&&(ir=this.prevPlacement.variableOffsets[Ar.crossTileID].anchor),Ar.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Ar.crossTileID]={textOffset:Dt,width:fe,height:de,anchor:ht,textBoxScale:Ae,prevAnchor:ir},this.markUsedJustification(Le,ht,Ar,ze),Le.allowVerticalPlacement&&(this.markUsedOrientation(Le,ze,Ar),this.placedOrientations[Ar.crossTileID]=ze),{shift:Ot,placedGlyphBoxes:$t}}}placeLayerBucketPart(L,J,fe){let{bucket:de,layout:Ae,translationText:Ye,translationIcon:et,posMatrix:dt,unwrappedTileID:St,textLabelPlaneMatrix:Ht,labelToScreenMatrix:Wt,textPixelRatio:fr,holdingForFade:Ar,collisionBoxArray:Le,partiallyEvaluatedTextSize:ze,collisionGroup:je}=L.parameters,Xe=Ae.get("text-optional"),st=Ae.get("icon-optional"),Qe=e.ar(Ae,"text-overlap","text-allow-overlap"),ht=Qe==="always",Dt=e.ar(Ae,"icon-overlap","icon-allow-overlap"),Ot=Dt==="always",$t=Ae.get("text-rotation-alignment")==="map",ir=Ae.get("text-pitch-alignment")==="map",pr=Ae.get("icon-text-fit")!=="none",zr=Ae.get("symbol-z-order")==="viewport-y",Wr=ht&&(Ot||!de.hasIconData()||st),ia=Ot&&(ht||!de.hasTextData()||Xe);!de.collisionArrays&&Le&&de.deserializeCollisionBoxes(Le);let Sa=this._getTerrainElevationFunc(this.retainedQueryData[de.bucketInstanceId].tileID),ln=(an,wn,ei)=>{var Mi,pi;if(J[an.crossTileID])return;if(Ar)return void(this.placements[an.crossTileID]=new pa(!1,!1,!1));let Ki=!1,Lo=!1,bo=!0,ds=null,Zo={box:null,placeable:!1,offscreen:null},Is={box:null,placeable:!1,offscreen:null},Ys=null,Ks=null,ks=null,zs=0,Il=0,_u=0;wn.textFeatureIndex?zs=wn.textFeatureIndex:an.useRuntimeCollisionCircles&&(zs=an.featureIndex),wn.verticalTextFeatureIndex&&(Il=wn.verticalTextFeatureIndex);let Xl=wn.textBox;if(Xl){let _l=Be=>{let $e=e.ah.horizontal;if(de.allowVerticalPlacement&&!Be&&this.prevPlacement){let Je=this.prevPlacement.placedOrientations[an.crossTileID];Je&&(this.placedOrientations[an.crossTileID]=Je,$e=Je,this.markUsedOrientation(de,$e,an))}return $e},Dl=(Be,$e)=>{if(de.allowVerticalPlacement&&an.numVerticalGlyphVertices>0&&wn.verticalTextBox){for(let Je of de.writingModes)if(Je===e.ah.vertical?(Zo=$e(),Is=Zo):Zo=Be(),Zo&&Zo.placeable)break}else Zo=Be()},le=an.textAnchorOffsetStartIndex,we=an.textAnchorOffsetEndIndex;if(we===le){let Be=($e,Je)=>{let it=this.collisionIndex.placeCollisionBox($e,Qe,fr,dt,St,ir,$t,Ye,je.predicate,Sa);return it&&it.placeable&&(this.markUsedOrientation(de,Je,an),this.placedOrientations[an.crossTileID]=Je),it};Dl(()=>Be(Xl,e.ah.horizontal),()=>{let $e=wn.verticalTextBox;return de.allowVerticalPlacement&&an.numVerticalGlyphVertices>0&&$e?Be($e,e.ah.vertical):{box:null,offscreen:null}}),_l(Zo&&Zo.placeable)}else{let Be=e.aq[(pi=(Mi=this.prevPlacement)===null||Mi===void 0?void 0:Mi.variableOffsets[an.crossTileID])===null||pi===void 0?void 0:pi.anchor],$e=(it,Ct,bt)=>{let qt=it.x2-it.x1,sr=it.y2-it.y1,ur=an.textBoxScale,qr=pr&&Dt==="never"?Ct:null,Nr=null,ya=Qe==="never"?1:2,Ea="never";Be&&ya++;for(let Zr=0;Zr$e(Xl,wn.iconBox,e.ah.horizontal),()=>{let it=wn.verticalTextBox;return de.allowVerticalPlacement&&(!Zo||!Zo.placeable)&&an.numVerticalGlyphVertices>0&&it?$e(it,wn.verticalIconBox,e.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Zo&&(Ki=Zo.placeable,bo=Zo.offscreen);let Je=_l(Zo&&Zo.placeable);if(!Ki&&this.prevPlacement){let it=this.prevPlacement.variableOffsets[an.crossTileID];it&&(this.variableOffsets[an.crossTileID]=it,this.markUsedJustification(de,it.anchor,an,Je))}}}if(Ys=Zo,Ki=Ys&&Ys.placeable,bo=Ys&&Ys.offscreen,an.useRuntimeCollisionCircles){let _l=de.text.placedSymbolArray.get(an.centerJustifiedTextSymbolIndex),Dl=e.ai(de.textSizeData,ze,_l),le=Ae.get("text-padding");Ks=this.collisionIndex.placeCollisionCircles(Qe,_l,de.lineVertexArray,de.glyphOffsetArray,Dl,dt,St,Ht,Wt,fe,ir,je.predicate,an.collisionCircleDiameter,le,Ye,Sa),Ks.circles.length&&Ks.collisionDetected&&!fe&&e.w("Collisions detected, but collision boxes are not shown"),Ki=ht||Ks.circles.length>0&&!Ks.collisionDetected,bo=bo&&Ks.offscreen}if(wn.iconFeatureIndex&&(_u=wn.iconFeatureIndex),wn.iconBox){let _l=Dl=>this.collisionIndex.placeCollisionBox(Dl,Dt,fr,dt,St,ir,$t,et,je.predicate,Sa,pr&&ds?ds:void 0);Is&&Is.placeable&&wn.verticalIconBox?(ks=_l(wn.verticalIconBox),Lo=ks.placeable):(ks=_l(wn.iconBox),Lo=ks.placeable),bo=bo&&ks.offscreen}let il=Xe||an.numHorizontalGlyphVertices===0&&an.numVerticalGlyphVertices===0,ku=st||an.numIconVertices===0;il||ku?ku?il||(Lo=Lo&&Ki):Ki=Lo&&Ki:Lo=Ki=Lo&&Ki;let bu=Lo&&ks.placeable;if(Ki&&Ys.placeable&&this.collisionIndex.insertCollisionBox(Ys.box,Qe,Ae.get("text-ignore-placement"),de.bucketInstanceId,Is&&Is.placeable&&Il?Il:zs,je.ID),bu&&this.collisionIndex.insertCollisionBox(ks.box,Dt,Ae.get("icon-ignore-placement"),de.bucketInstanceId,_u,je.ID),Ks&&Ki&&this.collisionIndex.insertCollisionCircles(Ks.circles,Qe,Ae.get("text-ignore-placement"),de.bucketInstanceId,zs,je.ID),fe&&this.storeCollisionData(de.bucketInstanceId,ei,wn,Ys,ks,Ks),an.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(de.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[an.crossTileID]=new pa(Ki||Wr,Lo||ia,bo||de.justReloaded),J[an.crossTileID]=!0};if(zr){if(L.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let an=de.getSortedSymbolIndexes(this.transform.angle);for(let wn=an.length-1;wn>=0;--wn){let ei=an[wn];ln(de.symbolInstances.get(ei),de.collisionArrays[ei],ei)}}else for(let an=L.symbolInstanceStart;an=0&&(L.text.placedSymbolArray.get(et).crossTileID=Ae>=0&&et!==Ae?0:fe.crossTileID)}markUsedOrientation(L,J,fe){let de=J===e.ah.horizontal||J===e.ah.horizontalOnly?J:0,Ae=J===e.ah.vertical?J:0,Ye=[fe.leftJustifiedTextSymbolIndex,fe.centerJustifiedTextSymbolIndex,fe.rightJustifiedTextSymbolIndex];for(let et of Ye)L.text.placedSymbolArray.get(et).placedOrientation=de;fe.verticalPlacedTextSymbolIndex&&(L.text.placedSymbolArray.get(fe.verticalPlacedTextSymbolIndex).placedOrientation=Ae)}commit(L){this.commitTime=L,this.zoomAtLastRecencyCheck=this.transform.zoom;let J=this.prevPlacement,fe=!1;this.prevZoomAdjustment=J?J.zoomAdjustment(this.transform.zoom):0;let de=J?J.symbolFadeChange(L):1,Ae=J?J.opacities:{},Ye=J?J.variableOffsets:{},et=J?J.placedOrientations:{};for(let dt in this.placements){let St=this.placements[dt],Ht=Ae[dt];Ht?(this.opacities[dt]=new wa(Ht,de,St.text,St.icon),fe=fe||St.text!==Ht.text.placed||St.icon!==Ht.icon.placed):(this.opacities[dt]=new wa(null,de,St.text,St.icon,St.skipFade),fe=fe||St.text||St.icon)}for(let dt in Ae){let St=Ae[dt];if(!this.opacities[dt]){let Ht=new wa(St,de,!1,!1);Ht.isHidden()||(this.opacities[dt]=Ht,fe=fe||St.text.placed||St.icon.placed)}}for(let dt in Ye)this.variableOffsets[dt]||!this.opacities[dt]||this.opacities[dt].isHidden()||(this.variableOffsets[dt]=Ye[dt]);for(let dt in et)this.placedOrientations[dt]||!this.opacities[dt]||this.opacities[dt].isHidden()||(this.placedOrientations[dt]=et[dt]);if(J&&J.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");fe?this.lastPlacementChangeTime=L:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=J?J.lastPlacementChangeTime:L)}updateLayerOpacities(L,J){let fe={};for(let de of J){let Ae=de.getBucket(L);Ae&&de.latestFeatureIndex&&L.id===Ae.layerIds[0]&&this.updateBucketOpacities(Ae,de.tileID,fe,de.collisionBoxArray)}}updateBucketOpacities(L,J,fe,de){L.hasTextData()&&(L.text.opacityVertexArray.clear(),L.text.hasVisibleVertices=!1),L.hasIconData()&&(L.icon.opacityVertexArray.clear(),L.icon.hasVisibleVertices=!1),L.hasIconCollisionBoxData()&&L.iconCollisionBox.collisionVertexArray.clear(),L.hasTextCollisionBoxData()&&L.textCollisionBox.collisionVertexArray.clear();let Ae=L.layers[0],Ye=Ae.layout,et=new wa(null,0,!1,!1,!0),dt=Ye.get("text-allow-overlap"),St=Ye.get("icon-allow-overlap"),Ht=Ae._unevaluatedLayout.hasValue("text-variable-anchor")||Ae._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Wt=Ye.get("text-rotation-alignment")==="map",fr=Ye.get("text-pitch-alignment")==="map",Ar=Ye.get("icon-text-fit")!=="none",Le=new wa(null,0,dt&&(St||!L.hasIconData()||Ye.get("icon-optional")),St&&(dt||!L.hasTextData()||Ye.get("text-optional")),!0);!L.collisionArrays&&de&&(L.hasIconCollisionBoxData()||L.hasTextCollisionBoxData())&&L.deserializeCollisionBoxes(de);let ze=(Xe,st,Qe)=>{for(let ht=0;ht0,ir=this.placedOrientations[st.crossTileID],pr=ir===e.ah.vertical,zr=ir===e.ah.horizontal||ir===e.ah.horizontalOnly;if(Qe>0||ht>0){let ia=Jn(Ot.text);ze(L.text,Qe,pr?Ti:ia),ze(L.text,ht,zr?Ti:ia);let Sa=Ot.text.isHidden();[st.rightJustifiedTextSymbolIndex,st.centerJustifiedTextSymbolIndex,st.leftJustifiedTextSymbolIndex].forEach(wn=>{wn>=0&&(L.text.placedSymbolArray.get(wn).hidden=Sa||pr?1:0)}),st.verticalPlacedTextSymbolIndex>=0&&(L.text.placedSymbolArray.get(st.verticalPlacedTextSymbolIndex).hidden=Sa||zr?1:0);let ln=this.variableOffsets[st.crossTileID];ln&&this.markUsedJustification(L,ln.anchor,st,ir);let an=this.placedOrientations[st.crossTileID];an&&(this.markUsedJustification(L,"left",st,an),this.markUsedOrientation(L,an,st))}if($t){let ia=Jn(Ot.icon),Sa=!(Ar&&st.verticalPlacedIconSymbolIndex&&pr);st.placedIconSymbolIndex>=0&&(ze(L.icon,st.numIconVertices,Sa?ia:Ti),L.icon.placedSymbolArray.get(st.placedIconSymbolIndex).hidden=Ot.icon.isHidden()),st.verticalPlacedIconSymbolIndex>=0&&(ze(L.icon,st.numVerticalIconVertices,Sa?Ti:ia),L.icon.placedSymbolArray.get(st.verticalPlacedIconSymbolIndex).hidden=Ot.icon.isHidden())}let Wr=je&&je.has(Xe)?je.get(Xe):{text:null,icon:null};if(L.hasIconCollisionBoxData()||L.hasTextCollisionBoxData()){let ia=L.collisionArrays[Xe];if(ia){let Sa=new e.P(0,0);if(ia.textBox||ia.verticalTextBox){let ln=!0;if(Ht){let an=this.variableOffsets[Dt];an?(Sa=Va(an.anchor,an.width,an.height,an.textOffset,an.textBoxScale),Wt&&Sa._rotate(fr?this.transform.angle:-this.transform.angle)):ln=!1}if(ia.textBox||ia.verticalTextBox){let an;ia.textBox&&(an=pr),ia.verticalTextBox&&(an=zr),tn(L.textCollisionBox.collisionVertexArray,Ot.text.placed,!ln||an,Wr.text,Sa.x,Sa.y)}}if(ia.iconBox||ia.verticalIconBox){let ln=!!(!zr&&ia.verticalIconBox),an;ia.iconBox&&(an=ln),ia.verticalIconBox&&(an=!ln),tn(L.iconCollisionBox.collisionVertexArray,Ot.icon.placed,an,Wr.icon,Ar?Sa.x:0,Ar?Sa.y:0)}}}}if(L.sortFeatures(this.transform.angle),this.retainedQueryData[L.bucketInstanceId]&&(this.retainedQueryData[L.bucketInstanceId].featureSortOrder=L.featureSortOrder),L.hasTextData()&&L.text.opacityVertexBuffer&&L.text.opacityVertexBuffer.updateData(L.text.opacityVertexArray),L.hasIconData()&&L.icon.opacityVertexBuffer&&L.icon.opacityVertexBuffer.updateData(L.icon.opacityVertexArray),L.hasIconCollisionBoxData()&&L.iconCollisionBox.collisionVertexBuffer&&L.iconCollisionBox.collisionVertexBuffer.updateData(L.iconCollisionBox.collisionVertexArray),L.hasTextCollisionBoxData()&&L.textCollisionBox.collisionVertexBuffer&&L.textCollisionBox.collisionVertexBuffer.updateData(L.textCollisionBox.collisionVertexArray),L.text.opacityVertexArray.length!==L.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${L.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${L.text.layoutVertexArray.length}) / 4`);if(L.icon.opacityVertexArray.length!==L.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${L.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${L.icon.layoutVertexArray.length}) / 4`);if(L.bucketInstanceId in this.collisionCircleArrays){let Xe=this.collisionCircleArrays[L.bucketInstanceId];L.placementInvProjMatrix=Xe.invProjMatrix,L.placementViewportMatrix=Xe.viewportMatrix,L.collisionCircleArray=Xe.circles,delete this.collisionCircleArrays[L.bucketInstanceId]}}symbolFadeChange(L){return this.fadeDuration===0?1:(L-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(L){return Math.max(0,(this.transform.zoom-L)/1.5)}hasTransitions(L){return this.stale||L-this.lastPlacementChangeTimeL}setStale(){this.stale=!0}}function tn(Me,L,J,fe,de,Ae){fe&&fe.length!==0||(fe=[0,0,0,0]);let Ye=fe[0]-hr,et=fe[1]-hr,dt=fe[2]-hr,St=fe[3]-hr;Me.emplaceBack(L?1:0,J?1:0,de||0,Ae||0,Ye,et),Me.emplaceBack(L?1:0,J?1:0,de||0,Ae||0,dt,et),Me.emplaceBack(L?1:0,J?1:0,de||0,Ae||0,dt,St),Me.emplaceBack(L?1:0,J?1:0,de||0,Ae||0,Ye,St)}let ka=Math.pow(2,25),oi=Math.pow(2,24),$n=Math.pow(2,17),bn=Math.pow(2,16),ci=Math.pow(2,9),hi=Math.pow(2,8),Pi=Math.pow(2,1);function Jn(Me){if(Me.opacity===0&&!Me.placed)return 0;if(Me.opacity===1&&Me.placed)return 4294967295;let L=Me.placed?1:0,J=Math.floor(127*Me.opacity);return J*ka+L*oi+J*$n+L*bn+J*ci+L*hi+J*Pi+L}let Ti=0;function _n(){return{isOccluded:(Me,L,J)=>!1,getPitchedTextCorrection:(Me,L,J)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Me,L,J,fe){throw new Error("Not implemented.")},translatePosition:(Me,L,J,fe)=>function(de,Ae,Ye,et,dt=!1){if(!Ye[0]&&!Ye[1])return[0,0];let St=dt?et==="map"?de.angle:0:et==="viewport"?-de.angle:0;if(St){let Ht=Math.sin(St),Wt=Math.cos(St);Ye=[Ye[0]*Wt-Ye[1]*Ht,Ye[0]*Ht+Ye[1]*Wt]}return[dt?Ye[0]:ca(Ae,Ye[0],de.zoom),dt?Ye[1]:ca(Ae,Ye[1],de.zoom)]}(Me,L,J,fe),getCircleRadiusCorrection:Me=>1}}class Ln{constructor(L){this._sortAcrossTiles=L.layout.get("symbol-z-order")!=="viewport-y"&&!L.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(L,J,fe,de,Ae){let Ye=this._bucketParts;for(;this._currentTileIndexet.sortKey-dt.sortKey));this._currentPartIndex!this._forceFullPlacement&&n.now()-de>2;for(;this._currentPlacementIndex>=0;){let Ye=J[L[this._currentPlacementIndex]],et=this.placement.collisionIndex.transform.zoom;if(Ye.type==="symbol"&&(!Ye.minzoom||Ye.minzoom<=et)&&(!Ye.maxzoom||Ye.maxzoom>et)){if(this._inProgressLayer||(this._inProgressLayer=new Ln(Ye)),this._inProgressLayer.continuePlacement(fe[Ye.source],this.placement,this._showCollisionBoxes,Ye,Ae))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(L){return this.placement.commit(L),this.placement}}let Zi=512/e.X/2;class un{constructor(L,J,fe){this.tileID=L,this.bucketInstanceId=fe,this._symbolsByKey={};let de=new Map;for(let Ae=0;Ae({x:Math.floor(dt.anchorX*Zi),y:Math.floor(dt.anchorY*Zi)})),crossTileIDs:Ye.map(dt=>dt.crossTileID)};if(et.positions.length>128){let dt=new e.av(et.positions.length,16,Uint16Array);for(let{x:St,y:Ht}of et.positions)dt.add(St,Ht);dt.finish(),delete et.positions,et.index=dt}this._symbolsByKey[Ae]=et}}getScaledCoordinates(L,J){let{x:fe,y:de,z:Ae}=this.tileID.canonical,{x:Ye,y:et,z:dt}=J.canonical,St=Zi/Math.pow(2,dt-Ae),Ht=(et*e.X+L.anchorY)*St,Wt=de*e.X*Zi;return{x:Math.floor((Ye*e.X+L.anchorX)*St-fe*e.X*Zi),y:Math.floor(Ht-Wt)}}findMatches(L,J,fe){let de=this.tileID.canonical.zL)}}class rn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class nt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(L){let J=Math.round((L-this.lng)/360);if(J!==0)for(let fe in this.indexes){let de=this.indexes[fe],Ae={};for(let Ye in de){let et=de[Ye];et.tileID=et.tileID.unwrapTo(et.tileID.wrap+J),Ae[et.tileID.key]=et}this.indexes[fe]=Ae}this.lng=L}addBucket(L,J,fe){if(this.indexes[L.overscaledZ]&&this.indexes[L.overscaledZ][L.key]){if(this.indexes[L.overscaledZ][L.key].bucketInstanceId===J.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(L.overscaledZ,this.indexes[L.overscaledZ][L.key])}for(let Ae=0;AeL.overscaledZ)for(let et in Ye){let dt=Ye[et];dt.tileID.isChildOf(L)&&dt.findMatches(J.symbolInstances,L,de)}else{let et=Ye[L.scaledTo(Number(Ae)).key];et&&et.findMatches(J.symbolInstances,L,de)}}for(let Ae=0;Ae{J[fe]=!0});for(let fe in this.layerIndexes)J[fe]||delete this.layerIndexes[fe]}}let Qt=(Me,L)=>e.t(Me,L&&L.filter(J=>J.identifier!=="source.canvas")),Xt=e.aw();class nr extends e.E{constructor(L,J={}){super(),this._rtlPluginLoaded=()=>{for(let fe in this.sourceCaches){let de=this.sourceCaches[fe].getSource().type;de!=="vector"&&de!=="geojson"||this.sourceCaches[fe].reload()}},this.map=L,this.dispatcher=new K(G(),L._getMapId()),this.dispatcher.registerMessageHandler("GG",(fe,de)=>this.getGlyphs(fe,de)),this.dispatcher.registerMessageHandler("GI",(fe,de)=>this.getImages(fe,de)),this.imageManager=new _,this.imageManager.setEventedParent(this),this.glyphManager=new I(L._requestManager,J.localIdeographFontFamily),this.lineAtlas=new q(256,512),this.crossTileSymbolIndex=new Ke,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",e.ay()),De().on(se,this._rtlPluginLoaded),this.on("data",fe=>{if(fe.dataType!=="source"||fe.sourceDataType!=="metadata")return;let de=this.sourceCaches[fe.sourceId];if(!de)return;let Ae=de.getSource();if(Ae&&Ae.vectorLayerIds)for(let Ye in this._layers){let et=this._layers[Ye];et.source===Ae.id&&this._validateLayer(et)}})}loadURL(L,J={},fe){this.fire(new e.k("dataloading",{dataType:"style"})),J.validate=typeof J.validate!="boolean"||J.validate;let de=this.map._requestManager.transformRequest(L,"Style");this._loadStyleRequest=new AbortController;let Ae=this._loadStyleRequest;e.h(de,this._loadStyleRequest).then(Ye=>{this._loadStyleRequest=null,this._load(Ye.data,J,fe)}).catch(Ye=>{this._loadStyleRequest=null,Ye&&!Ae.signal.aborted&&this.fire(new e.j(Ye))})}loadJSON(L,J={},fe){this.fire(new e.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,J.validate=J.validate!==!1,this._load(L,J,fe)}).catch(()=>{})}loadEmpty(){this.fire(new e.k("dataloading",{dataType:"style"})),this._load(Xt,{validate:!1})}_load(L,J,fe){var de;let Ae=J.transformStyle?J.transformStyle(fe,L):L;if(!J.validate||!Qt(this,e.u(Ae))){this._loaded=!0,this.stylesheet=Ae;for(let Ye in Ae.sources)this.addSource(Ye,Ae.sources[Ye],{validate:!1});Ae.sprite?this._loadSprite(Ae.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Ae.glyphs),this._createLayers(),this.light=new k(this.stylesheet.light),this.sky=new N(this.stylesheet.sky),this.map.setTerrain((de=this.stylesheet.terrain)!==null&&de!==void 0?de:null),this.fire(new e.k("data",{dataType:"style"})),this.fire(new e.k("style.load"))}}_createLayers(){let L=e.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",L),this._order=L.map(J=>J.id),this._layers={},this._serializedLayers=null;for(let J of L){let fe=e.aA(J);fe.setEventedParent(this,{layer:{id:J.id}}),this._layers[J.id]=fe}}_loadSprite(L,J=!1,fe=void 0){let de;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(Ae,Ye,et,dt){return e._(this,void 0,void 0,function*(){let St=T(Ae),Ht=et>1?"@2x":"",Wt={},fr={};for(let{id:Ar,url:Le}of St){let ze=Ye.transformRequest(m(Le,Ht,".json"),"SpriteJSON");Wt[Ar]=e.h(ze,dt);let je=Ye.transformRequest(m(Le,Ht,".png"),"SpriteImage");fr[Ar]=o.getImage(je,dt)}return yield Promise.all([...Object.values(Wt),...Object.values(fr)]),function(Ar,Le){return e._(this,void 0,void 0,function*(){let ze={};for(let je in Ar){ze[je]={};let Xe=n.getImageCanvasContext((yield Le[je]).data),st=(yield Ar[je]).data;for(let Qe in st){let{width:ht,height:Dt,x:Ot,y:$t,sdf:ir,pixelRatio:pr,stretchX:zr,stretchY:Wr,content:ia,textFitWidth:Sa,textFitHeight:ln}=st[Qe];ze[je][Qe]={data:null,pixelRatio:pr,sdf:ir,stretchX:zr,stretchY:Wr,content:ia,textFitWidth:Sa,textFitHeight:ln,spriteData:{width:ht,height:Dt,x:Ot,y:$t,context:Xe}}}}return ze})}(Wt,fr)})}(L,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Ae=>{if(this._spriteRequest=null,Ae)for(let Ye in Ae){this._spritesImagesIds[Ye]=[];let et=this._spritesImagesIds[Ye]?this._spritesImagesIds[Ye].filter(dt=>!(dt in Ae)):[];for(let dt of et)this.imageManager.removeImage(dt),this._changedImages[dt]=!0;for(let dt in Ae[Ye]){let St=Ye==="default"?dt:`${Ye}:${dt}`;this._spritesImagesIds[Ye].push(St),St in this.imageManager.images?this.imageManager.updateImage(St,Ae[Ye][dt],!1):this.imageManager.addImage(St,Ae[Ye][dt]),J&&(this._changedImages[St]=!0)}}}).catch(Ae=>{this._spriteRequest=null,de=Ae,this.fire(new e.j(de))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),J&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"})),fe&&fe(de)})}_unloadSprite(){for(let L of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(L),this._changedImages[L]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}_validateLayer(L){let J=this.sourceCaches[L.source];if(!J)return;let fe=L.sourceLayer;if(!fe)return;let de=J.getSource();(de.type==="geojson"||de.vectorLayerIds&&de.vectorLayerIds.indexOf(fe)===-1)&&this.fire(new e.j(new Error(`Source layer "${fe}" does not exist on source "${de.id}" as specified by style layer "${L.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let L in this.sourceCaches)if(!this.sourceCaches[L].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(L,J=!1){let fe=this._serializedAllLayers();if(!L||L.length===0)return Object.values(J?e.aB(fe):fe);let de=[];for(let Ae of L)if(fe[Ae]){let Ye=J?e.aB(fe[Ae]):fe[Ae];de.push(Ye)}return de}_serializedAllLayers(){let L=this._serializedLayers;if(L)return L;L=this._serializedLayers={};let J=Object.keys(this._layers);for(let fe of J){let de=this._layers[fe];de.type!=="custom"&&(L[fe]=de.serialize())}return L}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let L in this.sourceCaches)if(this.sourceCaches[L].hasTransition())return!0;for(let L in this._layers)if(this._layers[L].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(L){if(!this._loaded)return;let J=this._changed;if(J){let de=Object.keys(this._updatedLayers),Ae=Object.keys(this._removedLayers);(de.length||Ae.length)&&this._updateWorkerLayers(de,Ae);for(let Ye in this._updatedSources){let et=this._updatedSources[Ye];if(et==="reload")this._reloadSource(Ye);else{if(et!=="clear")throw new Error(`Invalid action ${et}`);this._clearSource(Ye)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Ye in this._updatedPaintProps)this._layers[Ye].updateTransitions(L);this.light.updateTransitions(L),this.sky.updateTransitions(L),this._resetUpdates()}let fe={};for(let de in this.sourceCaches){let Ae=this.sourceCaches[de];fe[de]=Ae.used,Ae.used=!1}for(let de of this._order){let Ae=this._layers[de];Ae.recalculate(L,this._availableImages),!Ae.isHidden(L.zoom)&&Ae.source&&(this.sourceCaches[Ae.source].used=!0)}for(let de in fe){let Ae=this.sourceCaches[de];!!fe[de]!=!!Ae.used&&Ae.fire(new e.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:de}))}this.light.recalculate(L),this.sky.recalculate(L),this.z=L.zoom,J&&this.fire(new e.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let L=Object.keys(this._changedImages);if(L.length){for(let J in this.sourceCaches)this.sourceCaches[J].reloadTilesForDependencies(["icons","patterns"],L);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let L in this.sourceCaches)this.sourceCaches[L].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(L,J){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(L,!1),removedIds:J})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(L,J={}){var fe;this._checkLoaded();let de=this.serialize();if(L=J.transformStyle?J.transformStyle(de,L):L,((fe=J.validate)===null||fe===void 0||fe)&&Qt(this,e.u(L)))return!1;(L=e.aB(L)).layers=e.az(L.layers);let Ae=e.aC(de,L),Ye=this._getOperationsToPerform(Ae);if(Ye.unimplemented.length>0)throw new Error(`Unimplemented: ${Ye.unimplemented.join(", ")}.`);if(Ye.operations.length===0)return!1;for(let et of Ye.operations)et();return this.stylesheet=L,this._serializedLayers=null,!0}_getOperationsToPerform(L){let J=[],fe=[];for(let de of L)switch(de.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":J.push(()=>this.addLayer.apply(this,de.args));break;case"removeLayer":J.push(()=>this.removeLayer.apply(this,de.args));break;case"setPaintProperty":J.push(()=>this.setPaintProperty.apply(this,de.args));break;case"setLayoutProperty":J.push(()=>this.setLayoutProperty.apply(this,de.args));break;case"setFilter":J.push(()=>this.setFilter.apply(this,de.args));break;case"addSource":J.push(()=>this.addSource.apply(this,de.args));break;case"removeSource":J.push(()=>this.removeSource.apply(this,de.args));break;case"setLayerZoomRange":J.push(()=>this.setLayerZoomRange.apply(this,de.args));break;case"setLight":J.push(()=>this.setLight.apply(this,de.args));break;case"setGeoJSONSourceData":J.push(()=>this.setGeoJSONSourceData.apply(this,de.args));break;case"setGlyphs":J.push(()=>this.setGlyphs.apply(this,de.args));break;case"setSprite":J.push(()=>this.setSprite.apply(this,de.args));break;case"setSky":J.push(()=>this.setSky.apply(this,de.args));break;case"setTerrain":J.push(()=>this.map.setTerrain.apply(this,de.args));break;case"setTransition":J.push(()=>{});break;default:fe.push(de.command)}return{operations:J,unimplemented:fe}}addImage(L,J){if(this.getImage(L))return this.fire(new e.j(new Error(`An image named "${L}" already exists.`)));this.imageManager.addImage(L,J),this._afterImageUpdated(L)}updateImage(L,J){this.imageManager.updateImage(L,J)}getImage(L){return this.imageManager.getImage(L)}removeImage(L){if(!this.getImage(L))return this.fire(new e.j(new Error(`An image named "${L}" does not exist.`)));this.imageManager.removeImage(L),this._afterImageUpdated(L)}_afterImageUpdated(L){this._availableImages=this.imageManager.listImages(),this._changedImages[L]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(L,J,fe={}){if(this._checkLoaded(),this.sourceCaches[L]!==void 0)throw new Error(`Source "${L}" already exists.`);if(!J.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(J).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(J.type)>=0&&this._validate(e.u.source,`sources.${L}`,J,null,fe))return;this.map&&this.map._collectResourceTiming&&(J.collectResourceTiming=!0);let de=this.sourceCaches[L]=new ot(L,J,this.dispatcher);de.style=this,de.setEventedParent(this,()=>({isSourceLoaded:de.loaded(),source:de.serialize(),sourceId:L})),de.onAdd(this.map),this._changed=!0}removeSource(L){if(this._checkLoaded(),this.sourceCaches[L]===void 0)throw new Error("There is no source with this ID");for(let fe in this._layers)if(this._layers[fe].source===L)return this.fire(new e.j(new Error(`Source "${L}" cannot be removed while layer "${fe}" is using it.`)));let J=this.sourceCaches[L];delete this.sourceCaches[L],delete this._updatedSources[L],J.fire(new e.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:L})),J.setEventedParent(null),J.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(L,J){if(this._checkLoaded(),this.sourceCaches[L]===void 0)throw new Error(`There is no source with this ID=${L}`);let fe=this.sourceCaches[L].getSource();if(fe.type!=="geojson")throw new Error(`geojsonSource.type is ${fe.type}, which is !== 'geojson`);fe.setData(J),this._changed=!0}getSource(L){return this.sourceCaches[L]&&this.sourceCaches[L].getSource()}addLayer(L,J,fe={}){this._checkLoaded();let de=L.id;if(this.getLayer(de))return void this.fire(new e.j(new Error(`Layer "${de}" already exists on this map.`)));let Ae;if(L.type==="custom"){if(Qt(this,e.aD(L)))return;Ae=e.aA(L)}else{if("source"in L&&typeof L.source=="object"&&(this.addSource(de,L.source),L=e.aB(L),L=e.e(L,{source:de})),this._validate(e.u.layer,`layers.${de}`,L,{arrayIndex:-1},fe))return;Ae=e.aA(L),this._validateLayer(Ae),Ae.setEventedParent(this,{layer:{id:de}})}let Ye=J?this._order.indexOf(J):this._order.length;if(J&&Ye===-1)this.fire(new e.j(new Error(`Cannot add layer "${de}" before non-existing layer "${J}".`)));else{if(this._order.splice(Ye,0,de),this._layerOrderChanged=!0,this._layers[de]=Ae,this._removedLayers[de]&&Ae.source&&Ae.type!=="custom"){let et=this._removedLayers[de];delete this._removedLayers[de],et.type!==Ae.type?this._updatedSources[Ae.source]="clear":(this._updatedSources[Ae.source]="reload",this.sourceCaches[Ae.source].pause())}this._updateLayer(Ae),Ae.onAdd&&Ae.onAdd(this.map)}}moveLayer(L,J){if(this._checkLoaded(),this._changed=!0,!this._layers[L])return void this.fire(new e.j(new Error(`The layer '${L}' does not exist in the map's style and cannot be moved.`)));if(L===J)return;let fe=this._order.indexOf(L);this._order.splice(fe,1);let de=J?this._order.indexOf(J):this._order.length;J&&de===-1?this.fire(new e.j(new Error(`Cannot move layer "${L}" before non-existing layer "${J}".`))):(this._order.splice(de,0,L),this._layerOrderChanged=!0)}removeLayer(L){this._checkLoaded();let J=this._layers[L];if(!J)return void this.fire(new e.j(new Error(`Cannot remove non-existing layer "${L}".`)));J.setEventedParent(null);let fe=this._order.indexOf(L);this._order.splice(fe,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[L]=J,delete this._layers[L],this._serializedLayers&&delete this._serializedLayers[L],delete this._updatedLayers[L],delete this._updatedPaintProps[L],J.onRemove&&J.onRemove(this.map)}getLayer(L){return this._layers[L]}getLayersOrder(){return[...this._order]}hasLayer(L){return L in this._layers}setLayerZoomRange(L,J,fe){this._checkLoaded();let de=this.getLayer(L);de?de.minzoom===J&&de.maxzoom===fe||(J!=null&&(de.minzoom=J),fe!=null&&(de.maxzoom=fe),this._updateLayer(de)):this.fire(new e.j(new Error(`Cannot set the zoom range of non-existing layer "${L}".`)))}setFilter(L,J,fe={}){this._checkLoaded();let de=this.getLayer(L);if(de){if(!e.aE(de.filter,J))return J==null?(de.filter=void 0,void this._updateLayer(de)):void(this._validate(e.u.filter,`layers.${de.id}.filter`,J,null,fe)||(de.filter=e.aB(J),this._updateLayer(de)))}else this.fire(new e.j(new Error(`Cannot filter non-existing layer "${L}".`)))}getFilter(L){return e.aB(this.getLayer(L).filter)}setLayoutProperty(L,J,fe,de={}){this._checkLoaded();let Ae=this.getLayer(L);Ae?e.aE(Ae.getLayoutProperty(J),fe)||(Ae.setLayoutProperty(J,fe,de),this._updateLayer(Ae)):this.fire(new e.j(new Error(`Cannot style non-existing layer "${L}".`)))}getLayoutProperty(L,J){let fe=this.getLayer(L);if(fe)return fe.getLayoutProperty(J);this.fire(new e.j(new Error(`Cannot get style of non-existing layer "${L}".`)))}setPaintProperty(L,J,fe,de={}){this._checkLoaded();let Ae=this.getLayer(L);Ae?e.aE(Ae.getPaintProperty(J),fe)||(Ae.setPaintProperty(J,fe,de)&&this._updateLayer(Ae),this._changed=!0,this._updatedPaintProps[L]=!0,this._serializedLayers=null):this.fire(new e.j(new Error(`Cannot style non-existing layer "${L}".`)))}getPaintProperty(L,J){return this.getLayer(L).getPaintProperty(J)}setFeatureState(L,J){this._checkLoaded();let fe=L.source,de=L.sourceLayer,Ae=this.sourceCaches[fe];if(Ae===void 0)return void this.fire(new e.j(new Error(`The source '${fe}' does not exist in the map's style.`)));let Ye=Ae.getSource().type;Ye==="geojson"&&de?this.fire(new e.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Ye!=="vector"||de?(L.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),Ae.setFeatureState(de,L.id,J)):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(L,J){this._checkLoaded();let fe=L.source,de=this.sourceCaches[fe];if(de===void 0)return void this.fire(new e.j(new Error(`The source '${fe}' does not exist in the map's style.`)));let Ae=de.getSource().type,Ye=Ae==="vector"?L.sourceLayer:void 0;Ae!=="vector"||Ye?J&&typeof L.id!="string"&&typeof L.id!="number"?this.fire(new e.j(new Error("A feature id is required to remove its specific state property."))):de.removeFeatureState(Ye,L.id,J):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(L){this._checkLoaded();let J=L.source,fe=L.sourceLayer,de=this.sourceCaches[J];if(de!==void 0)return de.getSource().type!=="vector"||fe?(L.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),de.getFeatureState(fe,L.id)):void this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.j(new Error(`The source '${J}' does not exist in the map's style.`)))}getTransition(){return e.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let L=e.aF(this.sourceCaches,Ae=>Ae.serialize()),J=this._serializeByIds(this._order,!0),fe=this.map.getTerrain()||void 0,de=this.stylesheet;return e.aG({version:de.version,name:de.name,metadata:de.metadata,light:de.light,sky:de.sky,center:de.center,zoom:de.zoom,bearing:de.bearing,pitch:de.pitch,sprite:de.sprite,glyphs:de.glyphs,transition:de.transition,sources:L,layers:J,terrain:fe},Ae=>Ae!==void 0)}_updateLayer(L){this._updatedLayers[L.id]=!0,L.source&&!this._updatedSources[L.source]&&this.sourceCaches[L.source].getSource().type!=="raster"&&(this._updatedSources[L.source]="reload",this.sourceCaches[L.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(L){let J=Ye=>this._layers[Ye].type==="fill-extrusion",fe={},de=[];for(let Ye=this._order.length-1;Ye>=0;Ye--){let et=this._order[Ye];if(J(et)){fe[et]=Ye;for(let dt of L){let St=dt[et];if(St)for(let Ht of St)de.push(Ht)}}}de.sort((Ye,et)=>et.intersectionZ-Ye.intersectionZ);let Ae=[];for(let Ye=this._order.length-1;Ye>=0;Ye--){let et=this._order[Ye];if(J(et))for(let dt=de.length-1;dt>=0;dt--){let St=de[dt].feature;if(fe[St.layer.id]{let ir=Xe.featureSortOrder;if(ir){let pr=ir.indexOf(Ot.featureIndex);return ir.indexOf($t.featureIndex)-pr}return $t.featureIndex-Ot.featureIndex});for(let Ot of Dt)ht.push(Ot)}}for(let Xe in Le)Le[Xe].forEach(st=>{let Qe=st.feature,ht=St[et[Xe].source].getFeatureState(Qe.layer["source-layer"],Qe.id);Qe.source=Qe.layer.source,Qe.layer["source-layer"]&&(Qe.sourceLayer=Qe.layer["source-layer"]),Qe.state=ht});return Le}(this._layers,Ye,this.sourceCaches,L,J,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Ae)}querySourceFeatures(L,J){J&&J.filter&&this._validate(e.u.filter,"querySourceFeatures.filter",J.filter,null,J);let fe=this.sourceCaches[L];return fe?function(de,Ae){let Ye=de.getRenderableIds().map(St=>de.getTileByID(St)),et=[],dt={};for(let St=0;Stfr.getTileByID(Ar)).sort((Ar,Le)=>Le.tileID.overscaledZ-Ar.tileID.overscaledZ||(Ar.tileID.isLessThan(Le.tileID)?-1:1))}let Wt=this.crossTileSymbolIndex.addLayer(Ht,dt[Ht.source],L.center.lng);Ye=Ye||Wt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Ae=Ae||this._layerOrderChanged||fe===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(n.now(),L.zoom))&&(this.pauseablePlacement=new ji(L,this.map.terrain,this._order,Ae,J,fe,de,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,dt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(n.now()),et=!0),Ye&&this.pauseablePlacement.placement.setStale()),et||Ye)for(let St of this._order){let Ht=this._layers[St];Ht.type==="symbol"&&this.placement.updateLayerOpacities(Ht,dt[Ht.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(n.now())}_releaseSymbolFadeTiles(){for(let L in this.sourceCaches)this.sourceCaches[L].releaseSymbolFadeTiles()}getImages(L,J){return e._(this,void 0,void 0,function*(){let fe=yield this.imageManager.getImages(J.icons);this._updateTilesForChangedImages();let de=this.sourceCaches[J.source];return de&&de.setDependencies(J.tileID.key,J.type,J.icons),fe})}getGlyphs(L,J){return e._(this,void 0,void 0,function*(){let fe=yield this.glyphManager.getGlyphs(J.stacks),de=this.sourceCaches[J.source];return de&&de.setDependencies(J.tileID.key,J.type,[""]),fe})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(L,J={}){this._checkLoaded(),L&&this._validate(e.u.glyphs,"glyphs",L,null,J)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=L,this.glyphManager.entries={},this.glyphManager.setURL(L))}addSprite(L,J,fe={},de){this._checkLoaded();let Ae=[{id:L,url:J}],Ye=[...T(this.stylesheet.sprite),...Ae];this._validate(e.u.sprite,"sprite",Ye,null,fe)||(this.stylesheet.sprite=Ye,this._loadSprite(Ae,!0,de))}removeSprite(L){this._checkLoaded();let J=T(this.stylesheet.sprite);if(J.find(fe=>fe.id===L)){if(this._spritesImagesIds[L])for(let fe of this._spritesImagesIds[L])this.imageManager.removeImage(fe),this._changedImages[fe]=!0;J.splice(J.findIndex(fe=>fe.id===L),1),this.stylesheet.sprite=J.length>0?J:void 0,delete this._spritesImagesIds[L],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}else this.fire(new e.j(new Error(`Sprite "${L}" doesn't exists on this map.`)))}getSprite(){return T(this.stylesheet.sprite)}setSprite(L,J={},fe){this._checkLoaded(),L&&this._validate(e.u.sprite,"sprite",L,null,J)||(this.stylesheet.sprite=L,L?this._loadSprite(L,!0,fe):(this._unloadSprite(),fe&&fe(null)))}}var cr=e.Y([{name:"a_pos",type:"Int16",components:2}]);let rr={prelude:Ze(`#ifdef GL_ES +{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),bL=Ee({"src/plots/map/styles/arcgis-sat.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),cv=Ee({"src/plots/map/constants.js"(J,V){"use strict";var v=(Ev(),ra(Hd)).default,x=_L(),E=bL(),k='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:E,"satellite-streets":x,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:k,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":a,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":n},s=v(o);V.exports={styleValueDflt:"basic",stylesMap:o,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),Um=Ee({"src/plots/map/layout_attributes.js"(J,V){"use strict";var v=Vr(),x=Qa().defaultLine,E=kl().attributes,k=Xs(),l=ou().textposition,e=El().overrideAll,t=xs().templatedArray,a=cv(),r=k({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var n=V.exports=e({_arrayAttrRegexps:[v.counterRegex("map",".layers",!0)],domain:E({name:"map"}),style:{valType:"any",values:a.styleValuesMap,dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:x},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:x}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:r,textposition:v.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),Gy=Ee({"src/traces/scattermap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:v,texttemplateAttrs:x,templatefallbackAttrs:E}=Cs(),k=Yh(),l=l0(),e=ou(),t=Um(),a=ia(),r=$s(),n=vo().extendFlat,o=El().overrideAll,s=Um(),c=l.line,m=l.marker;V.exports=o({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:n({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:n({},m.opacity,{dflt:1})},mode:n({},e.mode,{dflt:"markers"}),text:n({},e.text,{}),texttemplate:x({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:n({},e.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:e.connectgaps,marker:n({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},r("marker")),fill:l.fill,fillcolor:k(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:n({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:v(),hovertemplatefallback:E()},"calc","nested")}}),l5=Ee({"src/traces/scattermap/constants.js"(J,V){"use strict";var v=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];V.exports={isSupportedFont:function(x){return v.indexOf(x)!==-1}}}}),xL=Ee({"src/traces/scattermap/defaults.js"(J,V){"use strict";var v=Vr(),x=al(),E=gh(),k=Rh(),l=Fh(),e=Xh(),t=Gy(),a=l5().isSupportedFont;V.exports=function(o,s,c,m){function h(A,b){return v.coerce(o,s,t,A,b)}function p(A,b){return v.coerce2(o,s,t,A,b)}var g=r(o,s,h);if(!g){s.visible=!1;return}if(h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("mode"),h("below"),x.hasMarkers(s)){E(o,s,c,m,h,{noLine:!0,noAngle:!0}),h("marker.allowoverlap"),h("marker.angle");var i=s.marker;i.symbol!=="circle"&&(v.isArrayOrTypedArray(i.size)&&(i.size=i.size[0]),v.isArrayOrTypedArray(i.color)&&(i.color=i.color[0]))}x.hasLines(s)&&(k(o,s,c,m,h,{noDash:!0}),h("connectgaps"));var w=p("cluster.maxzoom"),S=p("cluster.step"),M=p("cluster.color",s.marker&&s.marker.color||c),C=p("cluster.size"),_=p("cluster.opacity"),T=w!==!1||S!==!1||M!==!1||C!==!1||_!==!1,f=h("cluster.enabled",T);if(f||x.hasText(s)){var u=m.font.family;l(o,s,m,h,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(u)?u:"Open Sans Regular",weight:m.font.weight,style:m.font.style,size:m.font.size,color:m.font.color}})}h("fill"),s.fill!=="none"&&e(o,s,c,h),v.coerceSelectionMarkerOpacity(s,h)};function r(n,o,s){var c=s("lon")||[],m=s("lat")||[],h=Math.min(c.length,m.length);return o._length=h,h}}}),u5=Ee({"src/traces/scattermap/format_labels.js"(J,V){"use strict";var v=uo();V.exports=function(E,k,l){var e={},t=l[k.subplot]._subplot,a=t.mockAxis,r=E.lonlat;return e.lonLabel=v.tickText(a,a.c2l(r[0]),!0).text,e.latLabel=v.tickText(a,a.c2l(r[1]),!0).text,e}}}),c5=Ee({"src/plots/map/convert_text_opts.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k){var l=E.split(" "),e=l[0],t=l[1],a=v.isArrayOrTypedArray(k)?v.mean(k):k,r=.5+a/100,n=1.5+a/100,o=["",""],s=[0,0];switch(e){case"top":o[0]="top",s[1]=-n;break;case"bottom":o[0]="bottom",s[1]=n;break}switch(t){case"left":o[1]="right",s[0]=-r;break;case"right":o[1]="left",s[0]=r;break}var c;return o[0]&&o[1]?c=o.join("-"):o[0]?c=o[0]:o[1]?c=o[1]:c="center",{anchor:c,offset:s}}}}),wL=Ee({"src/traces/scattermap/convert.js"(J,V){"use strict";var v=mi(),x=Vr(),E=Qi().BADNUM,k=Dm(),l=pl(),e=yo(),t=U0(),a=al(),r=l5().isSupportedFont,n=c5(),o=Qf().appendArrayPointValue,s=Fs().NEWLINES,c=Fs().BR_TAG_ALL;V.exports=function(_,T){var f=T[0].trace,u=f.visible===!0&&f._length!==0,A=f.fill!=="none",b=a.hasLines(f),z=a.hasMarkers(f),I=a.hasText(f),N=z&&f.marker.symbol==="circle",R=z&&f.marker.symbol!=="circle",B=f.cluster&&f.cluster.enabled,F=m("fill"),P=m("line"),j=m("circle"),U=m("symbol"),Z={fill:F,line:P,circle:j,symbol:U};if(!u)return Z;var Q;if((A||b)&&(Q=k.calcTraceToLineCoords(T)),A&&(F.geojson=k.makePolygon(Q),F.layout.visibility="visible",x.extendFlat(F.paint,{"fill-color":f.fillcolor})),b&&(P.geojson=k.makeLine(Q),P.layout.visibility="visible",x.extendFlat(P.paint,{"line-width":f.line.width,"line-color":f.line.color,"line-opacity":f.opacity})),N){var re=h(T);j.geojson=re.geojson,j.layout.visibility="visible",B&&(j.filter=["!",["has","point_count"]],Z.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":S(f.cluster.color,f.cluster.step),"circle-radius":S(f.cluster.size,f.cluster.step),"circle-opacity":S(f.cluster.opacity,f.cluster.step)}},Z.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(f),"text-size":12}}),x.extendFlat(j.paint,{"circle-color":re.mcc,"circle-radius":re.mrc,"circle-opacity":re.mo})}if(N&&B&&(j.filter=["!",["has","point_count"]]),(R||I)&&(U.geojson=p(T,_),x.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),R&&(x.extendFlat(U.layout,{"icon-size":f.marker.size/10}),"angle"in f.marker&&f.marker.angle!=="auto"&&x.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=f.marker.allowoverlap,x.extendFlat(U.paint,{"icon-opacity":f.opacity*f.marker.opacity,"icon-color":f.marker.color,"icon-halo-color":f.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),I)){var ae=(f.marker||{}).size,oe=n(f.textposition,ae);x.extendFlat(U.layout,{"text-size":f.textfont.size,"text-anchor":oe.anchor,"text-offset":oe.offset,"text-font":M(f)}),x.extendFlat(U.paint,{"text-color":f.textfont.color,"text-opacity":f.opacity})}return Z};function m(C){return{type:C,geojson:k.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function h(C){var _=C[0].trace,T=_.marker,f=_.selectedpoints,u=x.isArrayOrTypedArray(T.color),A=x.isArrayOrTypedArray(T.size),b=x.isArrayOrTypedArray(T.opacity),z;function I(ae){return _.opacity*ae}function N(ae){return ae/2}var R;u&&(l.hasColorscale(_,"marker")?R=l.makeColorScaleFuncFromTrace(T):R=x.identity);var B;A&&(B=t(_));var F;b&&(F=function(ae){var oe=v(ae)?+x.constrain(ae,0,1):0;return I(oe)});var P=[];for(z=0;z850?z+=" Black":u>750?z+=" Extra Bold":u>650?z+=" Bold":u>550?z+=" Semi Bold":u>450?z+=" Medium":u>350?z+=" Regular":u>250?z+=" Light":u>150?z+=" Extra Light":z+=" Thin"):A.slice(0,2).join(" ")==="Open Sans"?(z="Open Sans",u>750?z+=" Extrabold":u>650?z+=" Bold":u>550?z+=" Semibold":u>350?z+=" Regular":z+=" Light"):A.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(z="Klokantech Noto Sans",A[3]==="CJK"&&(z+=" CJK"),z+=u>500?" Bold":" Regular")),b&&(z+=" Italic"),z==="Open Sans Regular Italic"?z="Open Sans Italic":z==="Open Sans Regular Bold"?z="Open Sans Bold":z==="Open Sans Regular Bold Italic"?z="Open Sans Bold Italic":z==="Klokantech Noto Sans Regular Italic"&&(z="Klokantech Noto Sans Italic"),r(z)||(z=T);var I=z.split(", ");return I}}}),TL=Ee({"src/traces/scattermap/plot.js"(J,V){"use strict";var v=Vr(),x=wL(),E=cv().traceLayerPrefix,k={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,a,r,n){this.type="scattermap",this.subplot=t,this.uid=a,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:E+a+"-fill",line:E+a+"-line",circle:E+a+"-circle",symbol:E+a+"-symbol",cluster:E+a+"-cluster",clusterCount:E+a+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,a,r){var n={type:"geojson",data:a.geojson};r&&r.enabled&&v.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[t]);o?o.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[t],n)},e.setSourceData=function(t,a){this.subplot.map.getSource(this.sourceIds[t]).setData(a.geojson)},e.addLayer=function(t,a,r){var n={type:a.type,id:this.layerIds[t],source:this.sourceIds[t],layout:a.layout,paint:a.paint};a.filter&&(n.filter=a.filter);for(var o=this.layerIds[t],s,c=this.subplot.getMapLayers(),m=0;m=0;b--){var z=A[b];o.removeLayer(p.layerIds[z])}u||o.removeSource(p.sourceIds.circle)}function w(u){for(var A=k.nonCluster,b=0;b=0;b--){var z=A[b];o.removeLayer(p.layerIds[z]),u||o.removeSource(p.sourceIds[z])}}function M(u){h?i(u):S(u)}function C(u){m?g(u):w(u)}function _(){for(var u=m?k.cluster:k.nonCluster,A=0;A=0;n--){var o=r[n];a.removeLayer(this.layerIds[o]),a.removeSource(this.sourceIds[o])}},V.exports=function(a,r){var n=r[0].trace,o=n.cluster&&n.cluster.enabled,s=n.visible!==!0,c=new l(a,n.uid,o,s),m=x(a.gd,r),h=c.below=a.belowLookup["trace-"+n.uid],p,g,i;if(o)for(c.addSource("circle",m.circle,n.cluster),p=0;p=0?Math.floor((n+180)/360):Math.ceil((n-180)/360),C=M*360,_=n-C;function T(B){var F=B.lonlat;if(F[0]===l||w&&g.indexOf(B.i+1)===-1)return 1/0;var P=x.modHalf(F[0],360),j=F[1],U=p.project([P,j]),Z=U.x-m.c2p([_,j]),Q=U.y-h.c2p([P,o]),re=Math.max(3,B.mrc||0);return Math.max(Math.sqrt(Z*Z+Q*Q)-re,1-3/re)}if(v.getClosest(s,T,r),r.index!==!1){var f=s[r.index],u=f.lonlat,A=[x.modHalf(u[0],360)+C,u[1]],b=m.c2p(A),z=h.c2p(A),I=f.mrc||1;r.x0=b-I,r.x1=b+I,r.y0=z-I,r.y1=z+I;var N={};N[c.subplot]={_subplot:p};var R=c._module.formatLabels(f,c,N);return r.lonLabel=R.lonLabel,r.latLabel=R.latLabel,r.color=E(c,f),r.extraText=a(c,f,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function a(r,n,o){if(r.hovertemplate)return;var s=n.hi||r.hoverinfo,c=s.split("+"),m=c.indexOf("all")!==-1,h=c.indexOf("lon")!==-1,p=c.indexOf("lat")!==-1,g=n.lonlat,i=[];function w(S){return S+"\xB0"}return m||h&&p?i.push("("+w(g[1])+", "+w(g[0])+")"):h?i.push(o.lon+w(g[0])):p&&i.push(o.lat+w(g[1])),(m||c.indexOf("text")!==-1)&&k(n,r,i),i.join("
")}V.exports={hoverPoints:t,getExtraText:a}}}),AL=Ee({"src/traces/scattermap/event_data.js"(J,V){"use strict";V.exports=function(x,E){return x.lon=E.lon,x.lat=E.lat,x}}}),ML=Ee({"src/traces/scattermap/select.js"(J,V){"use strict";var v=Vr(),x=al(),{BADNUM:E}=Qi();V.exports=function(l,e){var t;let{cd:a,xaxis:r,yaxis:n}=l,{trace:o}=a[0];if(!x.hasMarkers(o))return[];if(e===!1){for(let h of a)h.selected=0;return[]}let s=(t=r._subplot)==null?void 0:t.map,c=s?.getRenderWorldCopies()&&e.xmax>e.xmin?s.transform.worldSize:0,m=[];for(let h=0;h1)return 1;for(var W=d,te=0;te<8;te++){var le=this.sampleCurveX(W)-d;if(Math.abs(le)le?me=W:Ce=W,W=.5*(Ce-me)+me;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},r}(),s=a(o);let c,m;function h(){return c!=null||(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function p(){if(m==null&&(m=!1,h())){let d=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(d){for(let W=0;W<5*5;W++){let te=4*W;d.fillStyle=`rgb(${te},${te+1},${te+2})`,d.fillRect(W%5,Math.floor(W/5),1,1)}let L=d.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&L[W]!==W){m=!0;break}}}return m||!1}var g=1e-6,i=typeof Float32Array<"u"?Float32Array:Array;function w(){var D=new i(9);return i!=Float32Array&&(D[1]=0,D[2]=0,D[3]=0,D[5]=0,D[6]=0,D[7]=0),D[0]=1,D[4]=1,D[8]=1,D}function S(D){return D[0]=1,D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=1,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=1,D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1,D}function M(){var D=new i(3);return i!=Float32Array&&(D[0]=0,D[1]=0,D[2]=0),D}function C(D){var d=D[0],L=D[1],W=D[2];return Math.sqrt(d*d+L*L+W*W)}function _(D,d,L){var W=new i(3);return W[0]=D,W[1]=d,W[2]=L,W}function T(D,d,L){return D[0]=d[0]+L[0],D[1]=d[1]+L[1],D[2]=d[2]+L[2],D}function f(D,d,L){return D[0]=d[0]*L,D[1]=d[1]*L,D[2]=d[2]*L,D}function u(D,d,L){var W=d[0],te=d[1],le=d[2],pe=L[0],me=L[1],Ce=L[2];return D[0]=te*Ce-le*me,D[1]=le*pe-W*Ce,D[2]=W*me-te*pe,D}var A,b=C;function z(D,d,L){var W=d[0],te=d[1],le=d[2],pe=d[3];return D[0]=L[0]*W+L[4]*te+L[8]*le+L[12]*pe,D[1]=L[1]*W+L[5]*te+L[9]*le+L[13]*pe,D[2]=L[2]*W+L[6]*te+L[10]*le+L[14]*pe,D[3]=L[3]*W+L[7]*te+L[11]*le+L[15]*pe,D}function I(){var D=new i(4);return i!=Float32Array&&(D[0]=0,D[1]=0,D[2]=0),D[3]=1,D}function N(D,d,L,W){var te=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",le=Math.PI/360;d*=le,W*=le,L*=le;var pe=Math.sin(d),me=Math.cos(d),Ce=Math.sin(L),we=Math.cos(L),ze=Math.sin(W),Pe=Math.cos(W);switch(te){case"xyz":D[0]=pe*we*Pe+me*Ce*ze,D[1]=me*Ce*Pe-pe*we*ze,D[2]=me*we*ze+pe*Ce*Pe,D[3]=me*we*Pe-pe*Ce*ze;break;case"xzy":D[0]=pe*we*Pe-me*Ce*ze,D[1]=me*Ce*Pe-pe*we*ze,D[2]=me*we*ze+pe*Ce*Pe,D[3]=me*we*Pe+pe*Ce*ze;break;case"yxz":D[0]=pe*we*Pe+me*Ce*ze,D[1]=me*Ce*Pe-pe*we*ze,D[2]=me*we*ze-pe*Ce*Pe,D[3]=me*we*Pe+pe*Ce*ze;break;case"yzx":D[0]=pe*we*Pe+me*Ce*ze,D[1]=me*Ce*Pe+pe*we*ze,D[2]=me*we*ze-pe*Ce*Pe,D[3]=me*we*Pe-pe*Ce*ze;break;case"zxy":D[0]=pe*we*Pe-me*Ce*ze,D[1]=me*Ce*Pe+pe*we*ze,D[2]=me*we*ze+pe*Ce*Pe,D[3]=me*we*Pe-pe*Ce*ze;break;case"zyx":D[0]=pe*we*Pe-me*Ce*ze,D[1]=me*Ce*Pe+pe*we*ze,D[2]=me*we*ze-pe*Ce*Pe,D[3]=me*we*Pe+pe*Ce*ze;break;default:throw new Error("Unknown angle order "+te)}return D}function R(){var D=new i(2);return i!=Float32Array&&(D[0]=0,D[1]=0),D}function B(D,d){var L=new i(2);return L[0]=D,L[1]=d,L}M(),A=new i(4),i!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),M(),_(1,0,0),_(0,1,0),I(),I(),w(),R();let F=8192;function P(D,d,L){return d*(F/(D.tileSize*Math.pow(2,L-D.tileID.overscaledZ)))}function j(D){return D instanceof Error?D:new Error(typeof D=="string"?D:String(D))}function U(D,d){return(D%d+d)%d}function Z(D,d,L){return D*(1-L)+d*L}function Q(D){if(D<=0)return 0;if(D>=1)return 1;let d=D*D,L=d*D;return 4*(D<.5?L:3*(D-d)+L-.75)}function re(D,d,L,W){let te=new s(D,d,L,W);return le=>te.solve(le)}let ae=re(.25,.1,.25,1);function oe(D,d,L){return Math.min(L,Math.max(d,D))}function H(D,d,L){let W=L-d,te=((D-d)%W+W)%W+d;return te===d?L:te}function X(D,...d){for(let L of d)for(let W in L)D[W]=L[W];return D}let K=1;function G(D,d,L){let W={};for(let te in D)W[te]=d.call(this,D[te],te,D);return W}function Y(D,d,L){let W={};for(let te in D)d.call(this,D[te],te,D)&&(W[te]=D[te]);return W}function q(D){return Array.isArray(D)?D.map(q):typeof D=="object"&&D?G(D,q):D}let $={};function ee(D){$[D]||(typeof console<"u"&&console.warn(D),$[D]=!0)}function ne(D,d,L){return(L.y-D.y)*(d.x-D.x)>(d.y-D.y)*(L.x-D.x)}function fe(D){return typeof WorkerGlobalScope<"u"&&D!==void 0&&D instanceof WorkerGlobalScope}let ye=null;function xe(D){return typeof ImageBitmap<"u"&&D instanceof ImageBitmap}let Ae="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Me(D,d,L,W,te){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let le=new VideoFrame(D,{timestamp:0});try{let pe=le?.format;if(!pe||!pe.startsWith("BGR")&&!pe.startsWith("RGB"))throw new Error(`Unrecognized format ${pe}`);let me=pe.startsWith("BGR"),Ce=new Uint8ClampedArray(W*te*4);if(yield le.copyTo(Ce,function(we,ze,Pe,nt,Ve){let bt=4*Math.max(-ze,0),Et=(Math.max(0,Pe)-Pe)*nt*4+bt,er=4*nt,tr=Math.max(0,ze),xr=Math.max(0,Pe);return{rect:{x:tr,y:xr,width:Math.min(we.width,ze+nt)-tr,height:Math.min(we.height,Pe+Ve)-xr},layout:[{offset:Et,stride:er}]}}(D,d,L,W,te)),me)for(let we=0;we{D.removeEventListener(d,L,W)}}}function ke(D){return D*Math.PI/180}function ge(D){return D/Math.PI*180}let ue={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ve={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},se="AbortError";class Te extends Error{constructor(d=se){super(d instanceof Error?d.message:d),this.name=se,d instanceof Error&&d.stack&&(this.stack=d.stack)}}function Fe(D){return D instanceof Error&&D.name===se}function We(D){if(D.aborted)throw new Te(D.reason)}let Ge={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function gt(D){return Ge.REGISTERED_PROTOCOLS[D.substring(0,D.indexOf("://"))]}let mt="global-dispatcher";class Tt extends Error{constructor(d,L,W,te){super(`AJAXError: ${L} (${d}): ${W}`),this.status=d,this.statusText=L,this.url=W,this.body=te}}let At=()=>{var D;return fe(self)?(D=self.worker)===null||D===void 0?void 0:D.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},Kt=function(D,d){return e(this,void 0,void 0,function*(){var L,W;if(D.url.includes("://")&&!/^https?:|^file:/.test(D.url)){let te=gt(D.url);if(te){let le=yield te(D,d);return le.data||D.type!=="arrayBuffer"?le:X(le,{data:new ArrayBuffer(0)})}if(fe(self)&&(!((L=self.worker)===null||L===void 0)&&L.actor))return self.worker.actor.sendAsync({type:"GR",data:D,targetMapId:mt},d)}if(!(te=>{var le;return te.startsWith("file:")||((le=At())===null||le===void 0?void 0:le.startsWith("file:"))&&!/^\w+:/.test(te)})(D.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(te,le){return e(this,void 0,void 0,function*(){let pe=new Request(te.url,{method:te.method||"GET",body:te.body,credentials:te.credentials,headers:te.headers,cache:te.cache,referrer:At(),referrerPolicy:te.referrerPolicy,signal:le.signal}),me,Ce;te.type!=="json"||pe.headers.has("Accept")||pe.headers.set("Accept","application/json");try{me=yield fetch(pe)}catch(ze){throw Fe(ze)?ze:new Tt(0,j(ze).message,te.url,new Blob)}if(!me.ok){let ze=yield me.blob();throw new Tt(me.status,me.statusText,te.url,ze)}Ce=te.type==="arrayBuffer"||te.type==="image"?me.arrayBuffer():te.type==="json"?me.json():me.text();let we=yield Ce;return We(le.signal),{data:we,cacheControl:me.headers.get("Cache-Control"),expires:me.headers.get("Expires"),etag:me.headers.get("ETag")}})}(D,d);if(fe(self)&&(!((W=self.worker)===null||W===void 0)&&W.actor))return self.worker.actor.sendAsync({type:"GR",data:D,mustQueue:!0,targetMapId:mt},d)}return function(te,le){return new Promise((pe,me)=>{var Ce;let we=new XMLHttpRequest;we.open(te.method||"GET",te.url,!0),te.type!=="arrayBuffer"&&te.type!=="image"||(we.responseType="arraybuffer");for(let ze in te.headers)we.setRequestHeader(ze,te.headers[ze]);te.type==="json"&&(we.responseType="text",!((Ce=te.headers)===null||Ce===void 0)&&Ce.Accept||we.setRequestHeader("Accept","application/json")),we.withCredentials=te.credentials==="include",we.onerror=()=>{me(new Error(we.statusText))},we.onload=()=>{if(!le.signal.aborted)if((we.status>=200&&we.status<300||we.status===0)&&we.response!==null){let ze=we.response;if(te.type==="json")try{ze=JSON.parse(we.response)}catch(Pe){return void me(Pe)}pe({data:ze,cacheControl:we.getResponseHeader("Cache-Control"),expires:we.getResponseHeader("Expires"),etag:we.getResponseHeader("ETag")})}else{let ze=new Blob([we.response],{type:we.getResponseHeader("Content-Type")});me(new Tt(we.status,we.statusText,te.url,ze))}},le.signal.addEventListener("abort",()=>{we.abort(),me(new Te(le.signal.reason))}),we.send(te.body)})}(D,d)})};function nr(D){if(!D||D.indexOf("://")<=0||D.startsWith("data:image/")||D.startsWith("blob:"))return!0;let d=new URL(D),L=window.location;return d.protocol===L.protocol&&d.host===L.host}function _r(D,d,L){var W;!((W=L[D])===null||W===void 0)&&W.includes(d)||(L[D]||(L[D]=[]),L[D].push(d))}function Zt(D,d,L){if(L?.[D]){let W=L[D].indexOf(d);W!==-1&&L[D].splice(W,1)}}class sr{constructor(d,L={}){X(this,L),this.type=d}}class Ot extends sr{constructor(d,L={}){super("error",X({error:d},L))}}class vt{on(d,L){return this._listeners||(this._listeners={}),_r(d,L,this._listeners),{unsubscribe:()=>{this.off(d,L)}}}off(d,L){return Zt(d,L,this._listeners),Zt(d,L,this._oneTimeListeners),this}once(d,L){return L?(this._oneTimeListeners||(this._oneTimeListeners={}),_r(d,L,this._oneTimeListeners),this):new Promise(W=>this.once(d,W))}fire(d,L){var W,te;typeof d=="string"&&(d=new sr(d,L||{}));let le=d.type;if(this.listens(le)){d.target=this;let pe=!((W=this._listeners)===null||W===void 0)&&W[le]?this._listeners[le].slice():[];for(let we of pe)we.call(this,d);let me=!((te=this._oneTimeListeners)===null||te===void 0)&&te[le]?this._oneTimeListeners[le].slice():[];for(let we of me)Zt(le,we,this._oneTimeListeners),we.call(this,d);let Ce=this._eventedParent;Ce&&(X(d,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ce.fire(d))}else d instanceof Ot&&console.error(d.error);return this}listens(d){var L,W,te,le,pe;return((W=(L=this._listeners)===null||L===void 0?void 0:L[d])===null||W===void 0?void 0:W.length)>0||((le=(te=this._oneTimeListeners)===null||te===void 0?void 0:te[d])===null||le===void 0?void 0:le.length)>0||((pe=this._eventedParent)===null||pe===void 0?void 0:pe.listens(d))}setEventedParent(d,L){return this._eventedParent=d,this._eventedParentData=L,this}}var ht={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,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:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,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:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",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"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let Re=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Be(D,d){let L={};for(let W in D)W!=="ref"&&(L[W]=D[W]);return Re.forEach(W=>{W in d&&(L[W]=d[W])}),L}function He(D,d){if(Array.isArray(D)){if(!Array.isArray(d)||D.length!==d.length)return!1;for(let L=0;L`:D.itemType.kind==="value"?"array":`array<${d}>`}return D.kind}let Mi=[$t,It,ir,cr,fr,Ir,Un,ln,Fa(nn),jn,ua,Aa,Qn,ei];function ci(D,d){if(d.kind==="error")return null;if(D.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!ci(D.itemType,d.itemType))&&(typeof D.N!="number"||D.N===d.N))return null}else{if(D.kind===d.kind)return null;if(D.kind==="value"){for(let L of Mi)if(!ci(L,d))return null}}return`Expected ${ai(D)} but found ${ai(d)} instead.`}function ba(D,d){return d.some(L=>L.kind===D.kind)}function pa(D,d){return d.some(L=>L==="null"?D===null:L==="array"?Array.isArray(D):L==="object"?D&&!Array.isArray(D)&&typeof D=="object":L===typeof D)}function Ii(D,d){return D.kind==="array"&&d.kind==="array"?D.itemType.kind===d.itemType.kind&&typeof D.N=="number":D.kind===d.kind}let ho=.96422,da=.82521,Kn=4/29,ot=6/29,et=3*ot*ot,hr=ot*ot*ot,ur=Math.PI/180,Tr=180/Math.PI;function Rr(D){return(D%=360)<0&&(D+=360),D}function Fr([D,d,L,W]){let te,le,pe=kt((.2225045*(D=at(D))+.7168786*(d=at(d))+.0606169*(L=at(L)))/1);D===d&&d===L?te=le=pe:(te=kt((.4360747*D+.3850649*d+.1430804*L)/ho),le=kt((.0139322*D+.0971045*d+.7141733*L)/da));let me=116*pe-16;return[me<0?0:me,500*(te-pe),200*(pe-le),W]}function at(D){return D<=.04045?D/12.92:Math.pow((D+.055)/1.055,2.4)}function kt(D){return D>hr?Math.pow(D,1/3):D/et+Kn}function Ut([D,d,L,W]){let te=(D+16)/116,le=isNaN(d)?te:te+d/500,pe=isNaN(L)?te:te-L/200;return te=1*Er(te),le=ho*Er(le),pe=da*Er(pe),[ar(3.1338561*le-1.6168667*te-.4906146*pe),ar(-.9787684*le+1.9161415*te+.033454*pe),ar(.0719453*le-.2289914*te+1.4052427*pe),W]}function ar(D){return(D=D<=.00304?12.92*D:1.055*Math.pow(D,1/2.4)-.055)<0?0:D>1?1:D}function Er(D){return D>ot?D*D*D:et*(D-Kn)}let br=Object.hasOwn||function(D,d){return Object.prototype.hasOwnProperty.call(D,d)};function Or(D,d){return br(D,d)?D[d]:void 0}function Pr(D){return parseInt(D.padEnd(2,D),16)/255}function hn(D,d){return zn(d?D/100:D,0,1)}function zn(D,d,L){return Math.min(Math.max(d,D),L)}function Pn(D){return!D.some(Number.isNaN)}let Ca={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]};function ma(D,d,L){return D+L*(d-D)}function bi(D,d,L){return D.map((W,te)=>ma(W,d[te],L))}class ga{constructor(d,L,W,te=1,le=!0){this.r=d,this.g=L,this.b=W,this.a=te,le||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[d,L,W,te]))}static parse(d){if(d instanceof ga)return d;if(typeof d!="string")return;let L=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=Or(Ca,W);if(te){let[pe,me,Ce]=te;return[pe/255,me/255,Ce/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let pe=W.length<6?1:2,me=1;return[Pr(W.slice(me,me+=pe)),Pr(W.slice(me,me+=pe)),Pr(W.slice(me,me+=pe)),Pr(W.slice(me,me+pe)||"ff")]}if(W.startsWith("rgb")){let pe=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(pe){let[me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr]=pe,lr=[ze||" ",Ve||" ",er].join("");if(lr===" "||lr===" /"||lr===",,"||lr===",,,"){let Mr=[we,nt,Et].join(""),Xr=Mr==="%%%"?100:Mr===""?255:0;if(Xr){let an=[zn(+Ce/Xr,0,1),zn(+Pe/Xr,0,1),zn(+bt/Xr,0,1),tr?hn(+tr,xr):1];if(Pn(an))return an}}return}}let le=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(le){let[pe,me,Ce,we,ze,Pe,nt,Ve,bt]=le,Et=[Ce||" ",ze||" ",nt].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){let er=[+me,zn(+we,0,100),zn(+Pe,0,100),Ve?hn(+Ve,bt):1];if(Pn(er))return function([tr,xr,lr,Mr]){function Xr(an){let kn=(an+tr/30)%12,On=xr*Math.min(lr,1-lr);return lr-On*Math.max(-1,Math.min(kn-3,9-kn,1))}return tr=Rr(tr),xr/=100,lr/=100,[Xr(0),Xr(8),Xr(4),Mr]}(er)}}}(d);return L?new ga(...L,!1):void 0}get rgb(){let{r:d,g:L,b:W,a:te}=this,le=te||1/0;return this.overwriteGetter("rgb",[d/le,L/le,W/le,te])}get hcl(){return this.overwriteGetter("hcl",function(d){let[L,W,te,le]=Fr(d),pe=Math.sqrt(W*W+te*te);return[Math.round(1e4*pe)?Rr(Math.atan2(te,W)*Tr):NaN,pe,L,le]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Fr(this.rgb))}overwriteGetter(d,L){return Object.defineProperty(this,d,{value:L}),L}toString(){let[d,L,W,te]=this.rgb;return`rgba(${[d,L,W].map(le=>Math.round(255*le)).join(",")},${te})`}static interpolate(d,L,W,te="rgb"){switch(te){case"rgb":{let[le,pe,me,Ce]=bi(d.rgb,L.rgb,W);return new ga(le,pe,me,Ce,!1)}case"hcl":{let[le,pe,me,Ce]=d.hcl,[we,ze,Pe,nt]=L.hcl,Ve,bt;if(isNaN(le)||isNaN(we))isNaN(le)?isNaN(we)?Ve=NaN:(Ve=we,me!==1&&me!==0||(bt=ze)):(Ve=le,Pe!==1&&Pe!==0||(bt=pe));else{let lr=we-le;we>le&&lr>180?lr-=360:we180&&(lr+=360),Ve=le+W*lr}let[Et,er,tr,xr]=function([lr,Mr,Xr,an]){return lr=isNaN(lr)?0:lr*ur,Ut([Xr,Math.cos(lr)*Mr,Math.sin(lr)*Mr,an])}([Ve,bt??ma(pe,ze,W),ma(me,Pe,W),ma(Ce,nt,W)]);return new ga(Et,er,tr,xr,!1)}case"lab":{let[le,pe,me,Ce]=Ut(bi(d.lab,L.lab,W));return new ga(le,pe,me,Ce,!1)}}}}ga.black=new ga(0,0,0,1),ga.white=new ga(1,1,1,1),ga.transparent=new ga(0,0,0,0),ga.red=new ga(1,0,0,1);class eo{constructor(d,L,W){this.sensitivity=d?L?"variant":"case":L?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(d,L){return this.collator.compare(d,L)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let si=["bottom","center","top"];class Ao{constructor(d,L,W,te,le,pe){this.text=d,this.image=L,this.scale=W,this.fontStack=te,this.textColor=le,this.verticalAlign=pe}}class ro{constructor(d){this.sections=d}static fromString(d){return new ro([new Ao(d,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(d=>d.text.length!==0||d.image&&d.image.name.length!==0)}static factory(d){return d instanceof ro?d:ro.fromString(d)}toString(){return this.sections.length===0?"":this.sections.map(d=>d.text).join("")}}class Sa{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Sa)return d;if(typeof d=="number")return new Sa([d,d,d,d]);if(Array.isArray(d)&&!(d.length<1||d.length>4)){for(let L of d)if(typeof L!="number")return;switch(d.length){case 1:d=[d[0],d[0],d[0],d[0]];break;case 2:d=[d[0],d[1],d[0],d[1]];break;case 3:d=[d[0],d[1],d[2],d[1]]}return new Sa(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new Sa(bi(d.values,L.values,W))}}class Gi{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Gi)return d;if(typeof d=="number")return new Gi([d]);if(Array.isArray(d)){for(let L of d)if(typeof L!="number")return;return new Gi(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new Gi(bi(d.values,L.values,W))}}class ti{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof ti)return d;if(typeof d=="string"){let W=ga.parse(d);return W?new ti([W]):void 0}if(!Array.isArray(d))return;let L=[];for(let W of d){if(typeof W!="string")return;let te=ga.parse(W);if(!te)return;L.push(te)}return new ti(L)}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W,te="rgb"){let le=[];if(d.values.length!=L.values.length)throw new Error(`colorArray: Arrays have mismatched length (${d.values.length} vs. ${L.values.length}), cannot interpolate.`);for(let pe=0;pe=0&&D<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof L=="number"&&L>=0&&L<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[D,d,L,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[D,d,L,W]:[D,d,L]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function oi(D){if(D===null||typeof D=="string"||typeof D=="boolean"||typeof D=="number"||D instanceof Mo||D instanceof ga||D instanceof eo||D instanceof ro||D instanceof Sa||D instanceof Gi||D instanceof ti||D instanceof zi||D instanceof so)return!0;if(Array.isArray(D)){for(let d of D)if(!oi(d))return!1;return!0}if(typeof D=="object"){for(let d in D)if(!oi(D[d]))return!1;return!0}return!1}function ii(D){if(D===null)return $t;if(typeof D=="string")return ir;if(typeof D=="boolean")return cr;if(typeof D=="number")return It;if(D instanceof ga)return fr;if(D instanceof Mo)return Ir;if(D instanceof eo)return wn;if(D instanceof ro)return Un;if(D instanceof Sa)return jn;if(D instanceof Gi)return ua;if(D instanceof ti)return Aa;if(D instanceof zi)return ei;if(D instanceof so)return Qn;if(Array.isArray(D)){let d=D.length,L;for(let W of D){let te=ii(W);if(L){if(L===te)continue;L=nn;break}L=te}return Fa(L||nn,d)}return ln}function co(D){let d=typeof D;return D===null?"":d==="string"||d==="number"||d==="boolean"?String(D):D instanceof ga||D instanceof Mo||D instanceof ro||D instanceof Sa||D instanceof Gi||D instanceof ti||D instanceof zi||D instanceof so?D.toString():JSON.stringify(D)}class Wi{constructor(d,L){this.type=d,this.value=L}static parse(d,L){if(d.length!==2)return L.error(`'literal' expression requires exactly one argument, but found ${d.length-1} instead.`);if(!oi(d[1]))return L.error("invalid value");let W=d[1],te=ii(W),le=L.expectedType;return te.kind!=="array"||te.N!==0||!le||le.kind!=="array"||typeof le.N=="number"&&le.N!==0||(te=le),new Wi(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let Ho={string:ir,number:It,boolean:cr,object:ln};class Io{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W,te=1,le=d[0];if(le==="array"){let me,Ce;if(d.length>2){let we=d[1];if(typeof we!="string"||!(we in Ho)||we==="object")return L.error('The item type argument of "array" must be one of string, number, boolean',1);me=Ho[we],te++}else me=nn;if(d.length>3){if(d[2]!==null&&(typeof d[2]!="number"||d[2]<0||d[2]!==Math.floor(d[2])))return L.error('The length argument to "array" must be a positive integer literal',2);Ce=d[2],te++}W=Fa(me,Ce)}else{if(!Ho[le])throw new Error(`Types doesn't contain name = ${le}`);W=Ho[le]}let pe=[];for(;ted.outputDefined())}}let qo={"to-boolean":cr,"to-color":fr,"to-number":It,"to-string":ir};class Oo{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[0];if(!qo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&d.length!==2)return L.error("Expected one argument.");let te=qo[W],le=[];for(let pe=1;pe4?`Invalid rgba value ${JSON.stringify(L)}: expected an array containing either three or four numeric values.`:So(L[0],L[1],L[2],L[3]),!W))return new ga(L[0]/255,L[1]/255,L[2]/255,L[3])}throw new fi(W||`Could not parse color from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"padding":{let L;for(let W of this.args){L=W.evaluate(d);let te=Sa.parse(L);if(te)return te}throw new fi(`Could not parse padding from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"numberArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=Gi.parse(L);if(te)return te}throw new fi(`Could not parse numberArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"colorArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=ti.parse(L);if(te)return te}throw new fi(`Could not parse colorArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"variableAnchorOffsetCollection":{let L;for(let W of this.args){L=W.evaluate(d);let te=zi.parse(L);if(te)return te}throw new fi(`Could not parse variableAnchorOffsetCollection from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"number":{let L=null;for(let W of this.args){if(L=W.evaluate(d),L===null)return 0;let te=Number(L);if(!isNaN(te))return te}throw new fi(`Could not convert ${JSON.stringify(L)} to number.`)}case"formatted":return ro.fromString(co(this.args[0].evaluate(d)));case"resolvedImage":return so.fromString(co(this.args[0].evaluate(d)));case"projectionDefinition":return this.args[0].evaluate(d);default:return co(this.args[0].evaluate(d))}}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}let ws=["Unknown","Point","LineString","Polygon"];class Ko{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ws[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(d){let L=this._parseColorCache.get(d);return L||(L=ga.parse(d),this._parseColorCache.set(d,L)),L}}class ns{constructor(d,L,W=[],te,le=new on,pe=[]){this.registry=d,this.path=W,this.key=W.map(me=>`[${me}]`).join(""),this.scope=le,this.errors=pe,this.expectedType=te,this._isConstant=L}parse(d,L,W,te,le={}){return L?this.concat(L,W,te)._parse(d,le):this._parse(d,le)}_parse(d,L){function W(te,le,pe){return pe==="assert"?new Io(le,[te]):pe==="coerce"?new Oo(le,[te]):te}if(d!==null&&typeof d!="string"&&typeof d!="boolean"&&typeof d!="number"||(d=["literal",d]),Array.isArray(d)){if(d.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=d[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let le=this.registry[te];if(le){let pe=le.parse(d,this);if(!pe)return null;if(this.expectedType){let me=this.expectedType,Ce=pe.type;if(me.kind!=="string"&&me.kind!=="number"&&me.kind!=="boolean"&&me.kind!=="object"&&me.kind!=="array"||Ce.kind!=="value"){if(me.kind==="projectionDefinition"&&["string","array"].includes(Ce.kind)||["color","formatted","resolvedImage"].includes(me.kind)&&["value","string"].includes(Ce.kind)||["padding","numberArray"].includes(me.kind)&&["value","number","array"].includes(Ce.kind)||me.kind==="colorArray"&&["value","string","array"].includes(Ce.kind)||me.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(Ce.kind))pe=W(pe,me,L.typeAnnotation||"coerce");else if(this.checkSubtype(me,Ce))return null}else pe=W(pe,me,L.typeAnnotation||"assert")}if(!(pe instanceof Wi)&&pe.type.kind!=="resolvedImage"&&this._isConstant(pe)){let me=new Ko;try{pe=new Wi(pe.type,pe.evaluate(me))}catch(Ce){return this.error(Ce.message),null}}return pe}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(d===void 0?"'undefined' value invalid. Use null instead.":typeof d=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof d} instead.`)}concat(d,L,W){let te=typeof d=="number"?this.path.concat(d):this.path,le=W?this.scope.concat(W):this.scope;return new ns(this.registry,this._isConstant,te,L||null,le,this.errors)}error(d,...L){let W=`${this.key}${L.map(te=>`[${te}]`).join("")}`;this.errors.push(new Sr(W,d))}checkSubtype(d,L){let W=ci(d,L);return W&&this.error(W),W}}class wo{constructor(d,L){this.type=L.type,this.bindings=[].concat(d),this.result=L}evaluate(d){return this.result.evaluate(d)}eachChild(d){for(let L of this.bindings)d(L[1]);d(this.result)}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found ${d.length-1} instead.`);let W=[];for(let le=1;le=W.length)throw new fi(`Array index out of bounds: ${L} > ${W.length-1}.`);if(L!==Math.floor(L))throw new fi(`Array index must be an integer, but found ${L} instead.`);return W[L]}eachChild(d){d(this.index),d(this.input)}outputDefined(){return!1}}class lo{constructor(d,L){this.type=cr,this.needle=d,this.haystack=L}static parse(d,L){if(d.length!==3)return L.error(`Expected 2 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,nn),te=L.parse(d[2],2,nn);return W&&te?ba(W.type,[cr,ir,It,$t,nn])?new lo(W,te):L.error(`Expected first argument to be of type boolean, string, number or null, but found ${ai(W.type)} instead`):null}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!W)return!1;if(!pa(L,["boolean","string","number","null"]))throw new fi(`Expected first argument to be of type boolean, string, number or null, but found ${ai(ii(L))} instead.`);if(!pa(W,["string","array"]))throw new fi(`Expected second argument to be of type array or string, but found ${ai(ii(W))} instead.`);return W.indexOf(L)>=0}eachChild(d){d(this.needle),d(this.haystack)}outputDefined(){return!0}}class Go{constructor(d,L,W){this.type=It,this.needle=d,this.haystack=L,this.fromIndex=W}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,nn),te=L.parse(d[2],2,nn);if(!W||!te)return null;if(!ba(W.type,[cr,ir,It,$t,nn]))return L.error(`Expected first argument to be of type boolean, string, number or null, but found ${ai(W.type)} instead`);if(d.length===4){let le=L.parse(d[3],3,It);return le?new Go(W,te,le):null}return new Go(W,te)}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!pa(L,["boolean","string","number","null"]))throw new fi(`Expected first argument to be of type boolean, string, number or null, but found ${ai(ii(L))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(d)),pa(W,["string"])){let le=W.indexOf(L,te);return le===-1?-1:[...W.slice(0,le)].length}if(pa(W,["array"]))return W.indexOf(L,te);throw new fi(`Expected second argument to be of type array or string, but found ${ai(ii(W))} instead.`)}eachChild(d){d(this.needle),d(this.haystack),this.fromIndex&&d(this.fromIndex)}outputDefined(){return!1}}class mo{constructor(d,L,W,te,le,pe){this.inputType=d,this.type=L,this.input=W,this.cases=te,this.outputs=le,this.otherwise=pe}static parse(d,L){if(d.length<5)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if(d.length%2!=1)return L.error("Expected an even number of arguments.");let W,te;L.expectedType&&L.expectedType.kind!=="value"&&(te=L.expectedType);let le={},pe=[];for(let we=2;weNumber.MAX_SAFE_INTEGER)return nt.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return nt.error("Numeric branch labels must be integer values.");if(W){if(nt.checkSubtype(W,ii(bt)))return null}else W=ii(bt);if(le[String(bt)]!==void 0)return nt.error("Branch labels must be unique.");le[String(bt)]=pe.length}let Ve=L.parse(Pe,we,te);if(!Ve)return null;te=te||Ve.type,pe.push(Ve)}let me=L.parse(d[1],1,nn);if(!me)return null;let Ce=L.parse(d[d.length-1],d.length-1,te);return Ce?me.type.kind!=="value"&&L.concat(1).checkSubtype(W,me.type)?null:new mo(W,te,me,le,pe,Ce):null}evaluate(d){let L=this.input.evaluate(d);return(ii(L)===this.inputType&&this.outputs[this.cases[L]]||this.otherwise).evaluate(d)}eachChild(d){d(this.input),this.outputs.forEach(d),d(this.otherwise)}outputDefined(){return this.outputs.every(d=>d.outputDefined())&&this.otherwise.outputDefined()}}class us{constructor(d,L,W){this.type=d,this.branches=L,this.otherwise=W}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found only ${d.length-1}.`);if(d.length%2!=0)return L.error("Expected an odd number of arguments.");let W;L.expectedType&&L.expectedType.kind!=="value"&&(W=L.expectedType);let te=[];for(let pe=1;peL.outputDefined())&&this.otherwise.outputDefined()}}class Jo{constructor(d,L,W,te){this.type=d,this.input=L,this.beginIndex=W,this.endIndex=te}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,nn),te=L.parse(d[2],2,It);if(!W||!te)return null;if(!ba(W.type,[Fa(nn),ir,nn]))return L.error(`Expected first argument to be of type array or string, but found ${ai(W.type)} instead`);if(d.length===4){let le=L.parse(d[3],3,It);return le?new Jo(W.type,W,te,le):null}return new Jo(W.type,W,te)}evaluate(d){let L=this.input.evaluate(d),W=this.beginIndex.evaluate(d),te;if(this.endIndex&&(te=this.endIndex.evaluate(d)),pa(L,["string"]))return[...L].slice(W,te).join("");if(pa(L,["array"]))return L.slice(W,te);throw new fi(`Expected first argument to be of type array or string, but found ${ai(ii(L))} instead.`)}eachChild(d){d(this.input),d(this.beginIndex),this.endIndex&&d(this.endIndex)}outputDefined(){return!1}}function zs(D,d){let L=D.length-1,W,te,le=0,pe=L,me=0;for(;le<=pe;)if(me=Math.floor((le+pe)/2),W=D[me],te=D[me+1],W<=d){if(me===L||dd))throw new fi("Input is not a number.");pe=me-1}return 0}class Is{constructor(d,L,W){this.type=d,this.input=L,this.labels=[],this.outputs=[];for(let[te,le]of W)this.labels.push(te),this.outputs.push(le)}static parse(d,L){if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");let W=L.parse(d[1],1,It);if(!W)return null;let te=[],le=null;L.expectedType&&L.expectedType.kind!=="value"&&(le=L.expectedType);for(let pe=1;pe=me)return L.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',we);let Pe=L.parse(Ce,ze,le);if(!Pe)return null;le=le||Pe.type,te.push([me,Pe])}return new Is(le,W,te)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let le=L.length;return te>=L[le-1]?W[le-1].evaluate(d):W[zs(L,te)].evaluate(d)}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function es(D){return D&&D.__esModule&&Object.prototype.hasOwnProperty.call(D,"default")?D.default:D}var Zs,Ps,$o=function(){if(Ps)return Zs;function D(d,L,W,te){this.cx=3*d,this.bx=3*(W-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*L,this.by=3*(te-L)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=L,this.p2x=W,this.p2y=te}return Ps=1,Zs=D,D.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,L){if(L===void 0&&(L=1e-6),d<0)return 0;if(d>1)return 1;for(var W=d,te=0;te<8;te++){var le=this.sampleCurveX(W)-d;if(Math.abs(le)le?me=W:Ce=W,W=.5*(Ce-me)+me;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},Zs}(),Fo=es($o);class Ji{constructor(d,L,W,te,le){this.type=d,this.operator=L,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[pe,me]of le)this.labels.push(pe),this.outputs.push(me)}static interpolationFactor(d,L,W,te){let le=0;if(d.name==="exponential")le=Ro(L,d.base,W,te);else if(d.name==="linear")le=Ro(L,1,W,te);else if(d.name==="cubic-bezier"){let pe=d.controlPoints;le=new Fo(pe[0],pe[1],pe[2],pe[3]).solve(Ro(L,1,W,te))}return le}static parse(d,L){let[W,te,le,...pe]=d;if(!Array.isArray(te)||te.length===0)return L.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let we=te[1];if(typeof we!="number")return L.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:we}}else{if(te[0]!=="cubic-bezier")return L.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let we=te.slice(1);if(we.length!==4||we.some(ze=>typeof ze!="number"||ze<0||ze>1))return L.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:we}}}if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");if(le=L.parse(le,2,It),!le)return null;let me=[],Ce=null;W!=="interpolate-hcl"&&W!=="interpolate-lab"||L.expectedType==Aa?L.expectedType&&L.expectedType.kind!=="value"&&(Ce=L.expectedType):Ce=fr;for(let we=0;we=ze)return L.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',nt);let bt=L.parse(Pe,Ve,Ce);if(!bt)return null;Ce=Ce||bt.type,me.push([ze,bt])}return Ii(Ce,It)||Ii(Ce,Ir)||Ii(Ce,fr)||Ii(Ce,jn)||Ii(Ce,ua)||Ii(Ce,Aa)||Ii(Ce,ei)||Ii(Ce,Fa(It))?new Ji(Ce,W,te,le,me):L.error(`Type ${ai(Ce)} is not interpolatable.`)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let le=L.length;if(te>=L[le-1])return W[le-1].evaluate(d);let pe=zs(L,te),me=Ji.interpolationFactor(this.interpolation,te,L[pe],L[pe+1]),Ce=W[pe].evaluate(d),we=W[pe+1].evaluate(d);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return ma(Ce,we,me);case"color":return ga.interpolate(Ce,we,me);case"padding":return Sa.interpolate(Ce,we,me);case"colorArray":return ti.interpolate(Ce,we,me);case"numberArray":return Gi.interpolate(Ce,we,me);case"variableAnchorOffsetCollection":return zi.interpolate(Ce,we,me);case"array":return bi(Ce,we,me);case"projectionDefinition":return Mo.interpolate(Ce,we,me)}case"interpolate-hcl":switch(this.type.kind){case"color":return ga.interpolate(Ce,we,me,"hcl");case"colorArray":return ti.interpolate(Ce,we,me,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ga.interpolate(Ce,we,me,"lab");case"colorArray":return ti.interpolate(Ce,we,me,"lab")}}}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function Ro(D,d,L,W){let te=W-L,le=D-L;return te===0?0:d===1?le/te:(Math.pow(d,le)-1)/(Math.pow(d,te)-1)}let Ls={color:ga.interpolate,number:ma,padding:Sa.interpolate,numberArray:Gi.interpolate,colorArray:ti.interpolate,variableAnchorOffsetCollection:zi.interpolate,array:bi};class zl{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=null,te=L.expectedType;te&&te.kind!=="value"&&(W=te);let le=[];for(let me of d.slice(1)){let Ce=L.parse(me,1+le.length,W,void 0,{typeAnnotation:"omit"});if(!Ce)return null;W=W||Ce.type,le.push(Ce)}if(!W)throw new Error("No output type");let pe=te&&le.some(me=>ci(te,me.type));return new zl(pe?nn:W,le)}evaluate(d){let L,W=null,te=0;for(let le of this.args)if(te++,W=le.evaluate(d),W&&W instanceof so&&!W.available&&(L||(L=W.name),W=null,te===this.args.length&&(W=L)),W!==null)break;return W}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}function ml(D,d){return D==="=="||D==="!="?d.kind==="boolean"||d.kind==="string"||d.kind==="number"||d.kind==="null"||d.kind==="value":d.kind==="string"||d.kind==="number"||d.kind==="value"}function Ts(D,d,L,W){return W.compare(d,L)===0}function yl(D,d,L){let W=D!=="=="&&D!=="!=";return class uA{constructor(le,pe,me){this.type=cr,this.lhs=le,this.rhs=pe,this.collator=me,this.hasUntypedArgument=le.type.kind==="value"||pe.type.kind==="value"}static parse(le,pe){if(le.length!==3&&le.length!==4)return pe.error("Expected two or three arguments.");let me=le[0],Ce=pe.parse(le[1],1,nn);if(!Ce)return null;if(!ml(me,Ce.type))return pe.concat(1).error(`"${me}" comparisons are not supported for type '${ai(Ce.type)}'.`);let we=pe.parse(le[2],2,nn);if(!we)return null;if(!ml(me,we.type))return pe.concat(2).error(`"${me}" comparisons are not supported for type '${ai(we.type)}'.`);if(Ce.type.kind!==we.type.kind&&Ce.type.kind!=="value"&&we.type.kind!=="value")return pe.error(`Cannot compare types '${ai(Ce.type)}' and '${ai(we.type)}'.`);W&&(Ce.type.kind==="value"&&we.type.kind!=="value"?Ce=new Io(we.type,[Ce]):Ce.type.kind!=="value"&&we.type.kind==="value"&&(we=new Io(Ce.type,[we])));let ze=null;if(le.length===4){if(Ce.type.kind!=="string"&&we.type.kind!=="string"&&Ce.type.kind!=="value"&&we.type.kind!=="value")return pe.error("Cannot use collator to compare non-string types.");if(ze=pe.parse(le[3],3,wn),!ze)return null}return new uA(Ce,we,ze)}evaluate(le){let pe=this.lhs.evaluate(le),me=this.rhs.evaluate(le);if(W&&this.hasUntypedArgument){let Ce=ii(pe),we=ii(me);if(Ce.kind!==we.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new fi(`Expected arguments for "${D}" to be (string, string) or (number, number), but found (${Ce.kind}, ${we.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ce=ii(pe),we=ii(me);if(Ce.kind!=="string"||we.kind!=="string")return d(le,pe,me)}return this.collator?L(le,pe,me,this.collator.evaluate(le)):d(le,pe,me)}eachChild(le){le(this.lhs),le(this.rhs),this.collator&&le(this.collator)}outputDefined(){return!0}}}let mu=yl("==",function(D,d,L){return d===L},Ts),su=yl("!=",function(D,d,L){return d!==L},function(D,d,L,W){return!Ts(0,d,L,W)}),cc=yl("<",function(D,d,L){return d",function(D,d,L){return d>L},function(D,d,L,W){return W.compare(d,L)>0}),_l=yl("<=",function(D,d,L){return d<=L},function(D,d,L,W){return W.compare(d,L)<=0}),ju=yl(">=",function(D,d,L){return d>=L},function(D,d,L,W){return W.compare(d,L)>=0});class lu{constructor(d,L,W){this.type=wn,this.locale=W,this.caseSensitive=d,this.diacriticSensitive=L}static parse(d,L){if(d.length!==2)return L.error("Expected one argument.");let W=d[1];if(typeof W!="object"||Array.isArray(W))return L.error("Collator options argument must be an object.");let te=L.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,cr);if(!te)return null;let le=L.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,cr);if(!le)return null;let pe=null;return W.locale&&(pe=L.parse(W.locale,1,ir),!pe)?null:new lu(te,le,pe)}evaluate(d){return new eo(this.caseSensitive.evaluate(d),this.diacriticSensitive.evaluate(d),this.locale?this.locale.evaluate(d):null)}eachChild(d){d(this.caseSensitive),d(this.diacriticSensitive),this.locale&&d(this.locale)}outputDefined(){return!1}}class il{constructor(d,L,W,te,le,pe){this.type=ir,this.number=d,this.locale=L,this.currency=W,this.unit=te,this.minFractionDigits=le,this.maxFractionDigits=pe}static parse(d,L){if(d.length!==3)return L.error("Expected two arguments.");let W=L.parse(d[1],1,It);if(!W)return null;let te=d[2];if(typeof te!="object"||Array.isArray(te))return L.error("NumberFormat options argument must be an object.");let le=null;if(te.locale&&(le=L.parse(te.locale,1,ir),!le))return null;let pe=null;if(te.currency&&(pe=L.parse(te.currency,1,ir),!pe))return null;let me=null;if(te.unit&&(me=L.parse(te.unit,1,ir),!me))return null;if(pe&&me)return L.error("NumberFormat options `currency` and `unit` are mutually exclusive");let Ce=null;if(te["min-fraction-digits"]&&(Ce=L.parse(te["min-fraction-digits"],1,It),!Ce))return null;let we=null;return te["max-fraction-digits"]&&(we=L.parse(te["max-fraction-digits"],1,It),!we)?null:new il(W,le,pe,me,Ce,we)}evaluate(d){return new Intl.NumberFormat(this.locale?this.locale.evaluate(d):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(d):void 0,unit:this.unit?this.unit.evaluate(d):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(d):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(d):void 0}).format(this.number.evaluate(d))}eachChild(d){d(this.number),this.locale&&d(this.locale),this.currency&&d(this.currency),this.unit&&d(this.unit),this.minFractionDigits&&d(this.minFractionDigits),this.maxFractionDigits&&d(this.maxFractionDigits)}outputDefined(){return!1}}class As{constructor(d){this.type=Un,this.sections=d}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[1];if(!Array.isArray(W)&&typeof W=="object")return L.error("First argument must be an image or text section.");let te=[],le=!1;for(let pe=1;pe<=d.length-1;++pe){let me=d[pe];if(le&&typeof me=="object"&&!Array.isArray(me)){le=!1;let Ce=null;if(me["font-scale"]&&(Ce=L.parse(me["font-scale"],1,It),!Ce))return null;let we=null;if(me["text-font"]&&(we=L.parse(me["text-font"],1,Fa(ir)),!we))return null;let ze=null;if(me["text-color"]&&(ze=L.parse(me["text-color"],1,fr),!ze))return null;let Pe=null;if(me["vertical-align"]){if(typeof me["vertical-align"]=="string"&&!si.includes(me["vertical-align"]))return L.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${me["vertical-align"]}' instead.`);if(Pe=L.parse(me["vertical-align"],1,ir),!Pe)return null}let nt=te[te.length-1];nt.scale=Ce,nt.font=we,nt.textColor=ze,nt.verticalAlign=Pe}else{let Ce=L.parse(d[pe],1,nn);if(!Ce)return null;let we=Ce.type.kind;if(we!=="string"&&we!=="value"&&we!=="null"&&we!=="resolvedImage")return L.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");le=!0,te.push({content:Ce,scale:null,font:null,textColor:null,verticalAlign:null})}}return new As(te)}evaluate(d){return new ro(this.sections.map(L=>{let W=L.content.evaluate(d);return ii(W)===Qn?new Ao("",W,null,null,null,L.verticalAlign?L.verticalAlign.evaluate(d):null):new Ao(co(W),null,L.scale?L.scale.evaluate(d):null,L.font?L.font.evaluate(d).join(","):null,L.textColor?L.textColor.evaluate(d):null,L.verticalAlign?L.verticalAlign.evaluate(d):null)}))}eachChild(d){for(let L of this.sections)d(L.content),L.scale&&d(L.scale),L.font&&d(L.font),L.textColor&&d(L.textColor),L.verticalAlign&&d(L.verticalAlign)}outputDefined(){return!1}}class ms{constructor(d){this.type=Qn,this.input=d}static parse(d,L){if(d.length!==2)return L.error("Expected two arguments.");let W=L.parse(d[1],1,ir);return W?new ms(W):L.error("No image name provided.")}evaluate(d){let L=this.input.evaluate(d),W=so.fromString(L);return W&&d.availableImages&&(W.available=d.availableImages.indexOf(L)>-1),W}eachChild(d){d(this.input)}outputDefined(){return!1}}class Ms{constructor(d){this.type=It,this.input=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=L.parse(d[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?L.error(`Expected argument of type string or array, but found ${ai(W.type)} instead.`):new Ms(W):null}evaluate(d){let L=this.input.evaluate(d);if(typeof L=="string")return[...L].length;if(Array.isArray(L))return L.length;throw new fi(`Expected value to be of type string or array, but found ${ai(ii(L))} instead.`)}eachChild(d){d(this.input)}outputDefined(){return!1}}let ol=8192;function Su(D,d){let L=(180+D[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D[1]*Math.PI/360)))/360,te=Math.pow(2,d.z);return[Math.round(L*te*ol),Math.round(W*te*ol)]}function Eu(D,d){let L=Math.pow(2,d.z);return[(te=(D[0]/ol+d.x)/L,360*te-180),(W=(D[1]/ol+d.y)/L,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Uu(D,d){D[0]=Math.min(D[0],d[0]),D[1]=Math.min(D[1],d[1]),D[2]=Math.max(D[2],d[0]),D[3]=Math.max(D[3],d[1])}function fc(D,d){return!(D[0]<=d[0]||D[2]>=d[2]||D[1]<=d[1]||D[3]>=d[3])}function th(D,d,L){let W=D[0]-d[0],te=D[1]-d[1],le=D[0]-L[0],pe=D[1]-L[1];return W*pe-le*te==0&&W*le<=0&&te*pe<=0}function Cf(D,d,L,W){return(te=[W[0]-L[0],W[1]-L[1]])[0]*(le=[d[0]-D[0],d[1]-D[1]])[1]-te[1]*le[0]!=0&&!(!hf(D,d,L,W)||!hf(L,W,D,d));var te,le}function qu(D,d,L){for(let W of L)for(let te=0;te(te=D)[1]!=(pe=me[Ce+1])[1]>te[1]&&te[0]<(pe[0]-le[0])*(te[1]-le[1])/(pe[1]-le[1])+le[0]&&(W=!W)}var te,le,pe;return W}function Lf(D,d){for(let L of d)if(gs(D,L))return!0;return!1}function hc(D,d){for(let L of D)if(!gs(L,d))return!1;for(let L=0;L0&&me<0||pe<0&&me>0}function ku(D,d,L){let W=[];for(let te=0;teL[2]){let te=.5*W,le=D[0]-L[0]>te?-W:L[0]-D[0]>te?W:0;le===0&&(le=D[0]-L[2]>te?-W:L[2]-D[0]>te?W:0),D[0]+=le}Uu(d,D)}function Pc(D,d,L,W){let te=Math.pow(2,W.z)*ol,le=[W.x*ol,W.y*ol],pe=[];for(let me of D)for(let Ce of me){let we=[Ce.x+le[0],Ce.y+le[1]];Cu(we,d,L,te),pe.push(we)}return pe}function $c(D,d,L,W){let te=Math.pow(2,W.z)*ol,le=[W.x*ol,W.y*ol],pe=[];for(let Ce of D){let we=[];for(let ze of Ce){let Pe=[ze.x+le[0],ze.y+le[1]];Uu(d,Pe),we.push(Pe)}pe.push(we)}if(d[2]-d[0]<=te/2){(me=d)[0]=me[1]=1/0,me[2]=me[3]=-1/0;for(let Ce of pe)for(let we of Ce)Cu(we,d,L,te)}var me;return pe}class Zl{constructor(d,L){this.type=cr,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'within' expression requires exactly one argument, but found ${d.length-1} instead.`);if(oi(d[1])){let W=d[1];if(W.type==="FeatureCollection"){let te=[];for(let le of W.features){let{type:pe,coordinates:me}=le.geometry;pe==="Polygon"&&te.push(me),pe==="MultiPolygon"&&te.push(...me)}if(te.length)return new Zl(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new Zl(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new Zl(W,W)}return L.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],le=[1/0,1/0,-1/0,-1/0],pe=L.canonicalID();if(W.type==="Polygon"){let me=ku(W.coordinates,le,pe),Ce=Pc(L.geometry(),te,le,pe);if(!fc(te,le))return!1;for(let we of Ce)if(!gs(we,me))return!1}if(W.type==="MultiPolygon"){let me=dc(W.coordinates,le,pe),Ce=Pc(L.geometry(),te,le,pe);if(!fc(te,le))return!1;for(let we of Ce)if(!Lf(we,me))return!1}return!0}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],le=[1/0,1/0,-1/0,-1/0],pe=L.canonicalID();if(W.type==="Polygon"){let me=ku(W.coordinates,le,pe),Ce=$c(L.geometry(),te,le,pe);if(!fc(te,le))return!1;for(let we of Ce)if(!hc(we,me))return!1}if(W.type==="MultiPolygon"){let me=dc(W.coordinates,le,pe),Ce=$c(L.geometry(),te,le,pe);if(!fc(te,le))return!1;for(let we of Ce)if(!nc(we,me))return!1}return!0}(d,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let df=class{constructor(D=[],d=(L,W)=>LW?1:0){if(this.data=D,this.length=this.data.length,this.compare=d,this.length>0)for(let L=(this.length>>1)-1;L>=0;L--)this._down(L)}push(D){this.data.push(D),this._up(this.length++)}pop(){if(this.length===0)return;let D=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),D}peek(){return this.data[0]}_up(D){let{data:d,compare:L}=this,W=d[D];for(;D>0;){let te=D-1>>1,le=d[te];if(L(W,le)>=0)break;d[D]=le,D=te}d[D]=W}_down(D){let{data:d,compare:L}=this,W=this.length>>1,te=d[D];for(;D=0)break;d[D]=d[le],D=le}d[D]=te}};function Dc(D,d,L=0,W=D.length-1,te=Vu){for(;W>L;){if(W-L>600){let Ce=W-L+1,we=d-L+1,ze=Math.log(Ce),Pe=.5*Math.exp(2*ze/3),nt=.5*Math.sqrt(ze*Pe*(Ce-Pe)/Ce)*(we-Ce/2<0?-1:1);Dc(D,d,Math.max(L,Math.floor(d-we*Pe/Ce+nt)),Math.min(W,Math.floor(d+(Ce-we)*Pe/Ce+nt)),te)}let le=D[d],pe=L,me=W;for(Ic(D,L,d),te(D[W],le)>0&&Ic(D,L,W);pe0;)me--}te(D[L],le)===0?Ic(D,L,me):(me++,Ic(D,me,W)),me<=d&&(L=me+1),d<=me&&(W=me-1)}}function Ic(D,d,L){let W=D[d];D[d]=D[L],D[L]=W}function Vu(D,d){return Dd?1:0}function Rc(D,d){if(D.length<=1)return[D];let L=[],W,te;for(let le of D){let pe=vf(le);pe!==0&&(le.area=Math.abs(pe),te===void 0&&(te=pe<0),te===pe<0?(W&&L.push(W),W=[le]):W.push(le))}if(W&&L.push(W),d>1)for(let le=0;le1?(we=d[Ce+1][0],ze=d[Ce+1][1]):Ve>0&&(we+=Pe/this.kx*Ve,ze+=nt/this.ky*Ve)),Pe=this.wrap(L[0]-we)*this.kx,nt=(L[1]-ze)*this.ky;let bt=Pe*Pe+nt*nt;bt180;)d-=360;return d}}function zc(D,d){return d[0]-D[0]}function Hu(D){return D[1]-D[0]+1}function uu(D,d){return D[1]>=D[0]&&D[1]D[1])return[null,null];let L=Hu(D);if(d){if(L===2)return[D,null];let te=Math.floor(L/2);return[[D[0],D[0]+te],[D[0]+te,D[1]]]}if(L===1)return[D,null];let W=Math.floor(L/2)-1;return[[D[0],D[0]+W],[D[0]+W+1,D[1]]]}function Zc(D,d){if(!uu(d,D.length))return[1/0,1/0,-1/0,-1/0];let L=[1/0,1/0,-1/0,-1/0];for(let W=d[0];W<=d[1];++W)Uu(L,D[W]);return L}function gu(D){let d=[1/0,1/0,-1/0,-1/0];for(let L of D)for(let W of L)Uu(d,W);return d}function Pf(D){return D[0]!==-1/0&&D[1]!==-1/0&&D[2]!==1/0&&D[3]!==1/0}function bl(D,d,L){if(!Pf(D)||!Pf(d))return NaN;let W=0,te=0;return D[2]d[2]&&(W=D[0]-d[2]),D[1]>d[3]&&(te=D[1]-d[3]),D[3]=W)return W;if(fc(te,le)){if(Kc(D,d))return 0}else if(Kc(d,D))return 0;let pe=1/0;for(let me of D)for(let Ce=0,we=me.length,ze=we-1;Ce0;){let Ce=pe.pop();if(Ce[0]>=le)continue;let we=Ce[1],ze=d?50:100;if(Hu(we)<=ze){if(!uu(we,D.length))return NaN;if(d){let Pe=pc(D,we,L,W);if(isNaN(Pe)||Pe===0)return Pe;le=Math.min(le,Pe)}else for(let Pe=we[0];Pe<=we[1];++Pe){let nt=Yu(D[Pe],L,W);if(le=Math.min(le,nt),le===0)return 0}}else{let Pe=Gu(we,d);Df(pe,le,W,D,me,Pe[0]),Df(pe,le,W,D,me,Pe[1])}}return le}function Ll(D,d,L,W,te,le=1/0){let pe=Math.min(le,te.distance(D[0],L[0]));if(pe===0)return pe;let me=new df([[0,[0,D.length-1],[0,L.length-1]]],zc);for(;me.length>0;){let Ce=me.pop();if(Ce[0]>=pe)continue;let we=Ce[1],ze=Ce[2],Pe=d?50:100,nt=W?50:100;if(Hu(we)<=Pe&&Hu(ze)<=nt){if(!uu(we,D.length)&&uu(ze,L.length))return NaN;let Ve;if(d&&W)Ve=wl(D,we,L,ze,te),pe=Math.min(pe,Ve);else if(d&&!W){let bt=D.slice(we[0],we[1]+1);for(let Et=ze[0];Et<=ze[1];++Et)if(Ve=xl(L[Et],bt,te),pe=Math.min(pe,Ve),pe===0)return pe}else if(!d&&W){let bt=L.slice(ze[0],ze[1]+1);for(let Et=we[0];Et<=we[1];++Et)if(Ve=xl(D[Et],bt,te),pe=Math.min(pe,Ve),pe===0)return pe}else Ve=pf(D,we,L,ze,te),pe=Math.min(pe,Ve)}else{let Ve=Gu(we,d),bt=Gu(ze,W);cu(me,pe,te,D,L,Ve[0],bt[0]),cu(me,pe,te,D,L,Ve[0],bt[1]),cu(me,pe,te,D,L,Ve[1],bt[0]),cu(me,pe,te,D,L,Ve[1],bt[1])}}return pe}function If(D){return D.type==="MultiPolygon"?D.coordinates.map(d=>({type:"Polygon",coordinates:d})):D.type==="MultiLineString"?D.coordinates.map(d=>({type:"LineString",coordinates:d})):D.type==="MultiPoint"?D.coordinates.map(d=>({type:"Point",coordinates:d})):[D]}class yu{constructor(d,L){this.type=It,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'distance' expression requires exactly one argument, but found ${d.length-1} instead.`);if(oi(d[1])){let W=d[1];if(W.type==="FeatureCollection")return new yu(W,W.features.map(te=>If(te.geometry)).flat());if(W.type==="Feature")return new yu(W,If(W.geometry));if("type"in W&&"coordinates"in W)return new yu(W,If(W))}return L.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,W){let te=L.geometry(),le=te.flat().map(Ce=>Eu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let pe=new vc(le[0][1]),me=1/0;for(let Ce of W){switch(Ce.type){case"Point":me=Math.min(me,Ll(le,!1,[Ce.coordinates],!1,pe,me));break;case"LineString":me=Math.min(me,Ll(le,!1,Ce.coordinates,!0,pe,me));break;case"Polygon":me=Math.min(me,Cl(le,!1,Ce.coordinates,pe,me))}if(me===0)return me}return me}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=L.geometry(),le=te.flat().map(Ce=>Eu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let pe=new vc(le[0][1]),me=1/0;for(let Ce of W){switch(Ce.type){case"Point":me=Math.min(me,Ll(le,!0,[Ce.coordinates],!1,pe,me));break;case"LineString":me=Math.min(me,Ll(le,!0,Ce.coordinates,!0,pe,me));break;case"Polygon":me=Math.min(me,Cl(le,!0,Ce.coordinates,pe,me))}if(me===0)return me}return me}(d,this.geometries);if(d.geometryType()==="Polygon")return function(L,W){let te=L.geometry();if(te.length===0||te[0].length===0)return NaN;let le=Rc(te,0).map(Ce=>Ce.map(we=>we.map(ze=>Eu([ze.x,ze.y],L.canonical)))),pe=new vc(le[0][0][0][1]),me=1/0;for(let Ce of W)for(let we of le){switch(Ce.type){case"Point":me=Math.min(me,Cl([Ce.coordinates],!1,we,pe,me));break;case"LineString":me=Math.min(me,Cl(Ce.coordinates,!0,we,pe,me));break;case"Polygon":me=Math.min(me,cs(we,Ce.coordinates,pe,me))}if(me===0)return me}return me}(d,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Bc{constructor(d){this.type=nn,this.key=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=d[1];return W==null?L.error("Global state property must be defined."):typeof W!="string"?L.error(`Global state property must be string, but found ${typeof d[1]} instead.`):new Bc(W)}evaluate(d){var L;let W=(L=d.globals)===null||L===void 0?void 0:L.globalState;return W&&Object.keys(W).length!==0?Or(W,this.key):null}eachChild(){}outputDefined(){return!1}}let Tl={"==":mu,"!=":su,">":Bl,"<":cc,">=":ju,"<=":_l,array:Io,at:Di,boolean:Io,case:us,coalesce:zl,collator:lu,format:As,image:ms,in:lo,"index-of":Go,interpolate:Ji,"interpolate-hcl":Ji,"interpolate-lab":Ji,length:Ms,let:wo,literal:Wi,match:mo,number:Io,"number-format":il,object:Io,slice:Jo,step:Is,string:Io,"to-boolean":Oo,"to-color":Oo,"to-number":Oo,"to-string":Oo,var:No,within:Zl,distance:yu,"global-state":Bc};class ll{constructor(d,L,W,te){this.name=d,this.type=L,this._evaluate=W,this.args=te}evaluate(d){return this._evaluate(d,this.args)}eachChild(d){this.args.forEach(d)}outputDefined(){return!1}static parse(d,L){let W=d[0],te=ll.definitions[W];if(!te)return L.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let le=Array.isArray(te)?te[0]:te.type,pe=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,me=pe.filter(([we])=>!Array.isArray(we)||we.length===d.length-1),Ce=null;for(let[we,ze]of me){Ce=new ns(L.registry,Du,L.path,null,L.scope);let Pe=[],nt=!1;for(let Ve=1;Ve{return nt=Pe,Array.isArray(nt)?`(${nt.map(ai).join(", ")})`:`(${ai(nt.type)}...)`;var nt}).join(" | "),ze=[];for(let Pe=1;Pe{L=d?L&&Du(W):L&&W instanceof Wi}),!!L&&Iu(D)&&Qc(D,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function Iu(D){if(D instanceof ll&&(D.name==="get"&&D.args.length===1||D.name==="feature-state"||D.name==="has"&&D.args.length===1||D.name==="properties"||D.name==="geometry-type"||D.name==="id"||/^filter-/.test(D.name))||D instanceof Zl||D instanceof yu)return!1;let d=!0;return D.eachChild(L=>{d&&!Iu(L)&&(d=!1)}),d}function Xu(D){if(D instanceof ll&&D.name==="feature-state")return!1;let d=!0;return D.eachChild(L=>{d&&!Xu(L)&&(d=!1)}),d}function Qc(D,d){if(D instanceof ll&&d.indexOf(D.name)>=0)return!1;let L=!0;return D.eachChild(W=>{L&&!Qc(W,d)&&(L=!1)}),L}function ef(D){return{result:"success",value:D}}function _u(D){return{result:"error",value:D}}function $u(D){return D["property-type"]==="data-driven"||D["property-type"]==="cross-faded-data-driven"}function mc(D){return!!D.expression&&D.expression.parameters.indexOf("zoom")>-1}function Ru(D){return!!D.expression&&D.expression.interpolated}function zo(D){return D instanceof Number?"number":D instanceof String?"string":D instanceof Boolean?"boolean":Array.isArray(D)?"array":D===null?"null":typeof D}function gc(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)&&ii(D)===ln}function Vf(D){return D}function mf(D,d){let L=D.stops&&typeof D.stops[0][0]=="object",W=L||!(L||D.property!==void 0),te=D.type||(Ru(d)?"exponential":"interval"),le=function(ze){switch(ze.type){case"color":return ga.parse;case"padding":return Sa.parse;case"numberArray":return Gi.parse;case"colorArray":return ti.parse;default:return null}}(d);if(le&&((D=Wt({},D)).stops&&(D.stops=D.stops.map(ze=>[ze[0],le(ze[1])])),D.default=le(D.default?D.default:d.default)),D.colorSpace&&(pe=D.colorSpace)!=="rgb"&&pe!=="hcl"&&pe!=="lab")throw new Error(`Unknown color space: "${D.colorSpace}"`);var pe;let me=function(ze){switch(ze){case"exponential":return yf;case"interval":return Hf;case"categorical":return gf;case"identity":return ul;default:throw new Error(`Unknown function type "${ze}"`)}}(te),Ce,we;if(te==="categorical"){Ce=Object.create(null);for(let ze of D.stops)Ce[ze[0]]=ze[1];we=typeof D.stops[0][0]}if(L){let ze={},Pe=[];for(let bt=0;btbt[0]),evaluate:({zoom:bt},Et)=>yf({stops:nt,base:D.base},d,bt).evaluate(bt,Et)}}if(W){let ze=te==="exponential"?{name:"exponential",base:D.base!==void 0?D.base:1}:null;return{kind:"camera",interpolationType:ze,interpolationFactor:Ji.interpolationFactor.bind(void 0,ze),zoomStops:D.stops.map(Pe=>Pe[0]),evaluate:({zoom:Pe})=>me(D,d,Pe,Ce,we)}}return{kind:"source",evaluate(ze,Pe){let nt=Pe&&Pe.properties?Pe.properties[D.property]:void 0;return nt===void 0?tf(D.default,d.default):me(D,d,nt,Ce,we)}}}function tf(D,d,L){return D!==void 0?D:d!==void 0?d:L!==void 0?L:void 0}function gf(D,d,L,W,te){return tf(typeof L===te?W[L]:void 0,D.default,d.default)}function Hf(D,d,L){if(zo(L)!=="number")return tf(D.default,d.default);let W=D.stops.length;if(W===1||L<=D.stops[0][0])return D.stops[0][1];if(L>=D.stops[W-1][0])return D.stops[W-1][1];let te=zs(D.stops.map(le=>le[0]),L);return D.stops[te][1]}function yf(D,d,L){let W=D.base!==void 0?D.base:1;if(zo(L)!=="number")return tf(D.default,d.default);let te=D.stops.length;if(te===1||L<=D.stops[0][0])return D.stops[0][1];if(L>=D.stops[te-1][0])return D.stops[te-1][1];let le=zs(D.stops.map(ze=>ze[0]),L),pe=function(ze,Pe,nt,Ve){let bt=Ve-nt,Et=ze-nt;return bt===0?0:Pe===1?Et/bt:(Math.pow(Pe,Et)-1)/(Math.pow(Pe,bt)-1)}(L,W,D.stops[le][0],D.stops[le+1][0]),me=D.stops[le][1],Ce=D.stops[le+1][1],we=Ls[d.type]||Vf;return typeof me.evaluate=="function"?{evaluate(...ze){let Pe=me.evaluate.apply(void 0,ze),nt=Ce.evaluate.apply(void 0,ze);if(Pe!==void 0&&nt!==void 0)return we(Pe,nt,pe,D.colorSpace)}}:we(me,Ce,pe,D.colorSpace)}function ul(D,d,L){switch(d.type){case"color":L=ga.parse(L);break;case"formatted":L=ro.fromString(L.toString());break;case"resolvedImage":L=so.fromString(L.toString());break;case"padding":L=Sa.parse(L);break;case"colorArray":L=ti.parse(L);break;case"numberArray":L=Gi.parse(L);break;default:zo(L)===d.type||d.type==="enum"&&d.values[L]||(L=void 0)}return tf(L,D.default,d.default)}ll.register(Tl,{error:[{kind:"error"},[ir],(D,[d])=>{throw new fi(d.evaluate(D))}],typeof:[ir,[nn],(D,[d])=>ai(ii(d.evaluate(D)))],"to-rgba":[Fa(It,4),[fr],(D,[d])=>{let[L,W,te,le]=d.evaluate(D).rgb;return[255*L,255*W,255*te,le]}],rgb:[fr,[It,It,It],Jc],rgba:[fr,[It,It,It,It],Jc],has:{type:cr,overloads:[[[ir],(D,[d])=>Nc(d.evaluate(D),D.properties())],[[ir,ln],(D,[d,L])=>Nc(d.evaluate(D),L.evaluate(D))]]},get:{type:nn,overloads:[[[ir],(D,[d])=>Rf(d.evaluate(D),D.properties())],[[ir,ln],(D,[d,L])=>Rf(d.evaluate(D),L.evaluate(D))]]},"feature-state":[nn,[ir],(D,[d])=>Rf(d.evaluate(D),D.featureState||{})],properties:[ln,[],D=>D.properties()],"geometry-type":[ir,[],D=>D.geometryType()],id:[nn,[],D=>D.id()],zoom:[It,[],D=>D.globals.zoom],"heatmap-density":[It,[],D=>D.globals.heatmapDensity||0],elevation:[It,[],D=>D.globals.elevation||0],"line-progress":[It,[],D=>D.globals.lineProgress||0],accumulated:[nn,[],D=>D.globals.accumulated===void 0?null:D.globals.accumulated],"+":[It,fu(It),(D,d)=>{let L=0;for(let W of d)L+=W.evaluate(D);return L}],"*":[It,fu(It),(D,d)=>{let L=1;for(let W of d)L*=W.evaluate(D);return L}],"-":{type:It,overloads:[[[It,It],(D,[d,L])=>d.evaluate(D)-L.evaluate(D)],[[It],(D,[d])=>-d.evaluate(D)]]},"/":[It,[It,It],(D,[d,L])=>d.evaluate(D)/L.evaluate(D)],"%":[It,[It,It],(D,[d,L])=>d.evaluate(D)%L.evaluate(D)],ln2:[It,[],()=>Math.LN2],pi:[It,[],()=>Math.PI],e:[It,[],()=>Math.E],"^":[It,[It,It],(D,[d,L])=>Math.pow(d.evaluate(D),L.evaluate(D))],sqrt:[It,[It],(D,[d])=>Math.sqrt(d.evaluate(D))],log10:[It,[It],(D,[d])=>Math.log(d.evaluate(D))/Math.LN10],ln:[It,[It],(D,[d])=>Math.log(d.evaluate(D))],log2:[It,[It],(D,[d])=>Math.log(d.evaluate(D))/Math.LN2],sin:[It,[It],(D,[d])=>Math.sin(d.evaluate(D))],cos:[It,[It],(D,[d])=>Math.cos(d.evaluate(D))],tan:[It,[It],(D,[d])=>Math.tan(d.evaluate(D))],asin:[It,[It],(D,[d])=>Math.asin(d.evaluate(D))],acos:[It,[It],(D,[d])=>Math.acos(d.evaluate(D))],atan:[It,[It],(D,[d])=>Math.atan(d.evaluate(D))],min:[It,fu(It),(D,d)=>Math.min(...d.map(L=>L.evaluate(D)))],max:[It,fu(It),(D,d)=>Math.max(...d.map(L=>L.evaluate(D)))],abs:[It,[It],(D,[d])=>Math.abs(d.evaluate(D))],round:[It,[It],(D,[d])=>{let L=d.evaluate(D);return L<0?-Math.round(-L):Math.round(L)}],floor:[It,[It],(D,[d])=>Math.floor(d.evaluate(D))],ceil:[It,[It],(D,[d])=>Math.ceil(d.evaluate(D))],"filter-==":[cr,[ir,nn],(D,[d,L])=>D.properties()[d.value]===L.value],"filter-id-==":[cr,[nn],(D,[d])=>D.id()===d.value],"filter-type-==":[cr,[ir],(D,[d])=>D.geometryType()===d.value],"filter-<":[cr,[ir,nn],(D,[d,L])=>{let W=D.properties()[d.value],te=L.value;return typeof W==typeof te&&W{let L=D.id(),W=d.value;return typeof L==typeof W&&L":[cr,[ir,nn],(D,[d,L])=>{let W=D.properties()[d.value],te=L.value;return typeof W==typeof te&&W>te}],"filter-id->":[cr,[nn],(D,[d])=>{let L=D.id(),W=d.value;return typeof L==typeof W&&L>W}],"filter-<=":[cr,[ir,nn],(D,[d,L])=>{let W=D.properties()[d.value],te=L.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[cr,[nn],(D,[d])=>{let L=D.id(),W=d.value;return typeof L==typeof W&&L<=W}],"filter->=":[cr,[ir,nn],(D,[d,L])=>{let W=D.properties()[d.value],te=L.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[cr,[nn],(D,[d])=>{let L=D.id(),W=d.value;return typeof L==typeof W&&L>=W}],"filter-has":[cr,[nn],(D,[d])=>d.value in D.properties()],"filter-has-id":[cr,[],D=>D.id()!==null&&D.id()!==void 0],"filter-type-in":[cr,[Fa(ir)],(D,[d])=>d.value.indexOf(D.geometryType())>=0],"filter-id-in":[cr,[Fa(nn)],(D,[d])=>d.value.indexOf(D.id())>=0],"filter-in-small":[cr,[ir,Fa(nn)],(D,[d,L])=>L.value.indexOf(D.properties()[d.value])>=0],"filter-in-large":[cr,[ir,Fa(nn)],(D,[d,L])=>function(W,te,le,pe){for(;le<=pe;){let me=le+pe>>1;if(te[me]===W)return!0;te[me]>W?pe=me-1:le=me+1}return!1}(D.properties()[d.value],L.value,0,L.value.length-1)],all:{type:cr,overloads:[[[cr,cr],(D,[d,L])=>d.evaluate(D)&&L.evaluate(D)],[fu(cr),(D,d)=>{for(let L of d)if(!L.evaluate(D))return!1;return!0}]]},any:{type:cr,overloads:[[[cr,cr],(D,[d,L])=>d.evaluate(D)||L.evaluate(D)],[fu(cr),(D,d)=>{for(let L of d)if(L.evaluate(D))return!0;return!1}]]},"!":[cr,[cr],(D,[d])=>!d.evaluate(D)],"is-supported-script":[cr,[ir],(D,[d])=>{let L=D.globals&&D.globals.isSupportedScript;return!L||L(d.evaluate(D))}],upcase:[ir,[ir],(D,[d])=>d.evaluate(D).toUpperCase()],downcase:[ir,[ir],(D,[d])=>d.evaluate(D).toLowerCase()],concat:[ir,fu(nn),(D,d)=>d.map(L=>co(L.evaluate(D))).join("")],split:[Fa(ir),[ir,ir],(D,[d,L])=>d.evaluate(D).split(L.evaluate(D))],join:[ir,[Fa(ir),ir],(D,[d,L])=>d.evaluate(D).join(L.evaluate(D))],"resolved-locale":[ir,[wn],(D,[d])=>d.evaluate(D).resolvedLocale()]});class Pl{constructor(d,L,W){this.expression=d,this._warningHistory={},this._evaluator=new Ko,this._defaultValue=L?function(te){if(te.type==="color"&&gc(te.default))return new ga(0,0,0,0);switch(te.type){case"color":return ga.parse(te.default)||null;case"padding":return Sa.parse(te.default)||null;case"numberArray":return Gi.parse(te.default)||null;case"colorArray":return ti.parse(te.default)||null;case"variableAnchorOffsetCollection":return zi.parse(te.default)||null;case"projectionDefinition":return Mo.parse(te.default)||null;default:return te.default===void 0?null:te.default}}(L):null,this._enumValues=L&&L.type==="enum"?L.values:null,this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,le,pe){return this._globalState&&(d=un(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=le||null,this._evaluator.formattedSection=pe,this.expression.evaluate(this._evaluator)}evaluate(d,L,W,te,le,pe){this._globalState&&(d=un(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=le||null,this._evaluator.formattedSection=pe||null;try{let me=this.expression.evaluate(this._evaluator);if(me==null||typeof me=="number"&&me!=me)return this._defaultValue;if(this._enumValues&&!(me in this._enumValues))throw new fi(`Expected value to be one of ${Object.keys(this._enumValues).map(Ce=>JSON.stringify(Ce)).join(", ")}, but found ${JSON.stringify(me)} instead.`);return me}catch(me){return this._warningHistory[me.message]||(this._warningHistory[me.message]=!0,typeof console<"u"&&console.warn(me.message)),this._defaultValue}}}function yc(D){return Array.isArray(D)&&D.length>0&&typeof D[0]=="string"&&D[0]in Tl}function _c(D,d,L){let W=new ns(Tl,Du,[],d?function(le){let pe={color:fr,string:ir,number:It,enum:ir,boolean:cr,formatted:Un,padding:jn,numberArray:ua,colorArray:Aa,projectionDefinition:Ir,resolvedImage:Qn,variableAnchorOffsetCollection:ei};return le.type==="array"?Fa(pe[le.value]||nn,le.length):pe[le.type]}(d):void 0),te=W.parse(D,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return te?ef(new Pl(te,d,L)):_u(W.errors)}class bc{constructor(d,L,W){this.kind=d,this._styleExpression=L,this.isStateDependent=d!=="constant"&&!Xu(L.expression),this.globalStateRefs=wr(L.expression),this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,le,pe){return this._globalState&&(d=un(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,le,pe)}evaluate(d,L,W,te,le,pe){return this._globalState&&(d=un(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,le,pe)}}class ac{constructor(d,L,W,te,le){this.kind=d,this.zoomStops=W,this._styleExpression=L,this.isStateDependent=d!=="camera"&&!Xu(L.expression),this.globalStateRefs=wr(L.expression),this.interpolationType=te,this._globalState=le}evaluateWithoutErrorHandling(d,L,W,te,le,pe){return this._globalState&&(d=un(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,le,pe)}evaluate(d,L,W,te,le,pe){return this._globalState&&(d=un(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,le,pe)}interpolationFactor(d,L,W){return this.interpolationType?Ji.interpolationFactor(this.interpolationType,d,L,W):0}}function zt(D,d,L){let W=_c(D,d,L);if(W.result==="error")return W;let te=W.value.expression,le=Iu(te);if(!le&&!$u(d))return _u([new Sr("","data expressions not supported")]);let pe=Qc(te,["zoom"]);if(!pe&&!mc(d))return _u([new Sr("","zoom expressions not supported")]);let me=Br(te);return me||pe?me instanceof Sr?_u([me]):me instanceof Ji&&!Ru(d)?_u([new Sr("",'"interpolate" expressions cannot be used with this property')]):ef(me?new ac(le?"camera":"composite",W.value,me.labels,me instanceof Ji?me.interpolation:void 0,L):new bc(le?"constant":"source",W.value,L)):_u([new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class rr{constructor(d,L){this._parameters=d,this._specification=L,Wt(this,mf(this._parameters,this._specification))}static deserialize(d){return new rr(d._parameters,d._specification)}static serialize(d){return{_parameters:d._parameters,_specification:d._specification}}}function Br(D){let d=null;if(D instanceof wo)d=Br(D.result);else if(D instanceof zl){for(let L of D.args)if(d=Br(L),d)break}else(D instanceof Is||D instanceof Ji)&&D.input instanceof ll&&D.input.name==="zoom"&&(d=D);return d instanceof Sr||D.eachChild(L=>{let W=Br(L);W instanceof Sr?d=W:!d&&W?d=new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):d&&W&&d!==W&&(d=new Sr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),d}function wr(D,d=new Set){return D instanceof Bc&&d.add(D.key),D.eachChild(L=>{wr(L,d)}),d}function un(D,d){let{zoom:L,heatmapDensity:W,elevation:te,lineProgress:le,isSupportedScript:pe,accumulated:me}=D??{};return{zoom:L,heatmapDensity:W,elevation:te,lineProgress:le,isSupportedScript:pe,accumulated:me,globalState:d}}function Ln(D){if(D===!0||D===!1)return!0;if(!Array.isArray(D)||D.length===0)return!1;switch(D[0]){case"has":return D.length>=2&&D[1]!=="$id"&&D[1]!=="$type";case"in":return D.length>=3&&(typeof D[1]!="string"||Array.isArray(D[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return D.length!==3||Array.isArray(D[1])||Array.isArray(D[2]);case"any":case"all":for(let d of D.slice(1))if(!Ln(d)&&typeof d!="boolean")return!1;return!0;default:return!0}}let Vn={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Jn(D,d){if(D==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ln(D)||(D=Gn(D));let L=_c(D,Vn,d);if(L.result==="error")throw new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));return{filter:(W,te,le)=>L.value.evaluate(W,te,{},le),needGeometry:Pa(D),getGlobalStateRefs:()=>wr(L.value.expression)}}function ca(D,d){return Dd?1:0}function Pa(D){if(!Array.isArray(D))return!1;if(D[0]==="within"||D[0]==="distance")return!0;for(let d=1;d"||d==="<="||d===">="?oa(D[1],D[2],d):d==="any"?(L=D.slice(1),["any"].concat(L.map(Gn))):d==="all"?["all"].concat(D.slice(1).map(Gn)):d==="none"?["all"].concat(D.slice(1).map(Gn).map(qa)):d==="in"?fa(D[1],D.slice(2)):d==="!in"?qa(fa(D[1],D.slice(2))):d==="has"?La(D[1]):d!=="!has"||qa(La(D[1]));var L}function oa(D,d,L){switch(D){case"$type":return[`filter-type-${L}`,d];case"$id":return[`filter-id-${L}`,d];default:return[`filter-${L}`,D,d]}}function fa(D,d){if(d.length===0)return!1;switch(D){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(L=>typeof L!=typeof d[0])?["filter-in-large",D,["literal",d.sort(ca)]]:["filter-in-small",D,["literal",d]]}}function La(D){switch(D){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",D]}}function qa(D){return["!",D]}function Bi(D){let d=typeof D;if(d==="number"||d==="boolean"||d==="string"||D==null)return JSON.stringify(D);if(Array.isArray(D)){let te="[";for(let le of D)te+=`${Bi(le)},`;return`${te}]`}let L=Object.keys(D).sort(),W="{";for(let te=0;teW.maximum?[new Ht(d,L,`${L} is greater than the maximum value ${W.maximum}`)]:[]}function Vo(D){let d=D.valueSpec,L=_i(D.value.type),W,te,le,pe={},me=L!=="categorical"&&D.value.property===void 0,Ce=!me,we=zo(D.value.stops)==="array"&&zo(D.value.stops[0])==="array"&&zo(D.value.stops[0][0])==="object",ze=Ga({key:D.key,value:D.value,valueSpec:D.styleSpec.function,validateSpec:D.validateSpec,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{stops:function(Ve){if(L==="identity")return[new Ht(Ve.key,Ve.value,'identity function may not have a "stops" property')];let bt=[],Et=Ve.value;return bt=bt.concat(oo({key:Ve.key,value:Et,valueSpec:Ve.valueSpec,validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec,arrayElementValidator:Pe})),zo(Et)==="array"&&Et.length===0&&bt.push(new Ht(Ve.key,Et,"array must have at least one stop")),bt},default:function(Ve){return Ve.validateSpec({key:Ve.key,value:Ve.value,valueSpec:d,validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec})}}});return L==="identity"&&me&&ze.push(new Ht(D.key,D.value,'missing required property "property"')),L==="identity"||D.value.stops||ze.push(new Ht(D.key,D.value,'missing required property "stops"')),L==="exponential"&&D.valueSpec.expression&&!Ru(D.valueSpec)&&ze.push(new Ht(D.key,D.value,"exponential functions not supported")),D.styleSpec.$version>=8&&(Ce&&!$u(D.valueSpec)?ze.push(new Ht(D.key,D.value,"property functions not supported")):me&&!mc(D.valueSpec)&&ze.push(new Ht(D.key,D.value,"zoom functions not supported"))),L!=="categorical"&&!we||D.value.property!==void 0||ze.push(new Ht(D.key,D.value,'"property" property is required')),ze;function Pe(Ve){let bt=[],Et=Ve.value,er=Ve.key;if(zo(Et)!=="array")return[new Ht(er,Et,`array expected, ${zo(Et)} found`)];if(Et.length!==2)return[new Ht(er,Et,`array length 2 expected, length ${Et.length} found`)];if(we){if(zo(Et[0])!=="object")return[new Ht(er,Et,`object expected, ${zo(Et[0])} found`)];if(Et[0].zoom===void 0)return[new Ht(er,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new Ht(er,Et,"object stop key must have value")];if(le&&le>_i(Et[0].zoom))return[new Ht(er,Et[0].zoom,"stop zoom values must appear in ascending order")];_i(Et[0].zoom)!==le&&(le=_i(Et[0].zoom),te=void 0,pe={}),bt=bt.concat(Ga({key:`${er}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec,objectElementValidators:{zoom:go,value:nt}}))}else bt=bt.concat(nt({key:`${er}[0]`,value:Et[0],validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec},Et));return yc(Va(Et[1]))?bt.concat([new Ht(`${er}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(Ve.validateSpec({key:`${er}[1]`,value:Et[1],valueSpec:d,validateSpec:Ve.validateSpec,style:Ve.style,styleSpec:Ve.styleSpec}))}function nt(Ve,bt){let Et=zo(Ve.value),er=_i(Ve.value),tr=Ve.value!==null?Ve.value:bt;if(W){if(Et!==W)return[new Ht(Ve.key,tr,`${Et} stop domain type must match previous stop domain type ${W}`)]}else W=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new Ht(Ve.key,tr,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&L!=="categorical"){let xr=`number expected, ${Et} found`;return $u(d)&&L===void 0&&(xr+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ht(Ve.key,tr,xr)]}return L!=="categorical"||Et!=="number"||isFinite(er)&&Math.floor(er)===er?L!=="categorical"&&Et==="number"&&te!==void 0&&ernew Ht(`${D.key}${W.key}`,D.value,W.message));let L=d.value.expression||d.value._styleExpression.expression;if(D.expressionContext==="property"&&D.propertyKey==="text-font"&&!L.outputDefined())return[new Ht(D.key,D.value,`Invalid data expression for "${D.propertyKey}". Output values must be contained as literals within the expression.`)];if(D.expressionContext==="property"&&D.propertyType==="layout"&&!Xu(L))return[new Ht(D.key,D.value,'"feature-state" data expressions are not supported with layout properties.')];if(D.expressionContext==="filter"&&!Xu(L))return[new Ht(D.key,D.value,'"feature-state" data expressions are not supported with filters.')];if(D.expressionContext&&D.expressionContext.indexOf("cluster")===0){if(!Qc(L,["zoom","feature-state"]))return[new Ht(D.key,D.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(D.expressionContext==="cluster-initial"&&!Iu(L))return[new Ht(D.key,D.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Yo(D){let d=D.key,L=D.value,W=zo(L);return W!=="string"?[new Ht(d,L,`color expected, ${W} found`)]:ga.parse(String(L))?[]:[new Ht(d,L,`color expected, "${L}" found`)]}function as(D){let d=D.key,L=D.value,W=D.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(_i(L))===-1&&te.push(new Ht(d,L,`expected one of [${W.values.join(", ")}], ${JSON.stringify(L)} found`)):Object.keys(W.values).indexOf(_i(L))===-1&&te.push(new Ht(d,L,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(L)} found`)),te}function Bo(D){return Ln(Va(D.value))?Wo(Wt({},D,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Ks(D)}function Ks(D){let d=D.value,L=D.key;if(zo(d)!=="array")return[new Ht(L,d,`array expected, ${zo(d)} found`)];let W=D.styleSpec,te,le=[];if(d.length<1)return[new Ht(L,d,"filter array must have at least 1 element")];switch(le=le.concat(as({key:`${L}[0]`,value:d[0],valueSpec:W.filter_operator,style:D.style,styleSpec:D.styleSpec})),_i(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&_i(d[1])==="$type"&&le.push(new Ht(L,d,`"$type" cannot be use with operator "${d[0]}"`));case"==":case"!=":d.length!==3&&le.push(new Ht(L,d,`filter array for operator "${d[0]}" must have 3 elements`));case"in":case"!in":d.length>=2&&(te=zo(d[1]),te!=="string"&&le.push(new Ht(`${L}[1]`,d[1],`string expected, ${te} found`)));for(let pe=2;pe{Pe in te&&W.push(new Ht(le,te[Pe],`"${Pe}" is prohibited for ref layers`))}),pe.layers.forEach(Pe=>{_i(Pe.id)===we&&(ze=Pe)}),ze?ze.ref?W.push(new Ht(le,te.ref,"ref cannot reference another ref layer")):Ce=_i(ze.type):W.push(new Ht(le,te.ref,`ref layer "${we}" not found`))}else if(Ce!=="background")if(te.source){let ze=pe.sources&&pe.sources[te.source],Pe=ze&&_i(ze.type);ze?Pe==="vector"&&Ce==="raster"?W.push(new Ht(le,te.source,`layer "${te.id}" requires a raster source`)):Pe!=="raster-dem"&&Ce==="hillshade"||Pe!=="raster-dem"&&Ce==="color-relief"?W.push(new Ht(le,te.source,`layer "${te.id}" requires a raster-dem source`)):Pe==="raster"&&Ce!=="raster"?W.push(new Ht(le,te.source,`layer "${te.id}" requires a vector source`)):Pe!=="vector"||te["source-layer"]?Pe==="raster-dem"&&Ce!=="hillshade"&&Ce!=="color-relief"?W.push(new Ht(le,te.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):Ce!=="line"||!te.paint||!te.paint["line-gradient"]||Pe==="geojson"&&ze.lineMetrics||W.push(new Ht(le,te,`layer "${te.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):W.push(new Ht(le,te,`layer "${te.id}" must specify a "source-layer"`)):W.push(new Ht(le,te.source,`source "${te.source}" not found`))}else W.push(new Ht(le,te,'missing required property "source"'));return Ce==="raster"&&(!((d=te.paint)===null||d===void 0)&&d.resampling)&&(!((L=te.paint)===null||L===void 0)&&L["raster-resampling"])&&W.push(new Ht(le,te.paint,`layer "${te.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),W=W.concat(Ga({key:le,value:te,valueSpec:me.layer,style:D.style,styleSpec:D.styleSpec,validateSpec:D.validateSpec,objectElementValidators:{"*":()=>[],type:()=>D.validateSpec({key:`${le}.type`,value:te.type,valueSpec:me.layer.type,style:D.style,styleSpec:D.styleSpec,validateSpec:D.validateSpec,object:te,objectKey:"type"}),filter:Bo,layout:ze=>Ga({layer:te,key:ze.key,value:ze.value,style:ze.style,styleSpec:ze.styleSpec,validateSpec:ze.validateSpec,objectElementValidators:{"*":Pe=>vi(Wt({layerType:Ce},Pe))}}),paint:ze=>Ga({layer:te,key:ze.key,value:ze.value,style:ze.style,styleSpec:ze.styleSpec,validateSpec:ze.validateSpec,objectElementValidators:{"*":Pe=>ps(Wt({layerType:Ce},Pe))}})}})),W}function Ss(D){let d=D.value,L=D.key,W=zo(d);return W!=="string"?[new Ht(L,d,`string expected, ${W} found`)]:[]}let Ws={promoteId:function({key:D,value:d}){if(zo(d)==="string")return Ss({key:D,value:d});{let L=[];for(let W in d)L.push(...Ss({key:`${D}.${W}`,value:d[W]}));return L}}};function Dl(D){let d=D.value,L=D.key,W=D.styleSpec,te=D.style,le=D.validateSpec;if(!d.type)return[new Ht(L,d,'"type" is required')];let pe=_i(d.type),me;switch(pe){case"vector":case"raster":return me=Ga({key:L,value:d,valueSpec:W[`source_${pe.replace("-","_")}`],style:D.style,styleSpec:W,objectElementValidators:Ws,validateSpec:le}),me;case"raster-dem":return me=function(Ce){var we;let ze=(we=Ce.sourceName)!==null&&we!==void 0?we:"",Pe=Ce.value,nt=Ce.styleSpec,Ve=nt.source_raster_dem,bt=Ce.style,Et=[],er=zo(Pe);if(Pe===void 0)return Et;if(er!=="object")return Et.push(new Ht("source_raster_dem",Pe,`object expected, ${er} found`)),Et;let tr=_i(Pe.encoding)==="custom",xr=["redFactor","greenFactor","blueFactor","baseShift"],lr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let Mr in Pe)!tr&&xr.includes(Mr)?Et.push(new Ht(Mr,Pe[Mr],`In "${ze}": "${Mr}" is only valid when "encoding" is set to "custom". ${lr} encoding found`)):Ve[Mr]?Et=Et.concat(Ce.validateSpec({key:Mr,value:Pe[Mr],valueSpec:Ve[Mr],validateSpec:Ce.validateSpec,style:bt,styleSpec:nt})):Et.push(new Ht(Mr,Pe[Mr],`unknown property "${Mr}"`));return Et}({sourceName:L,value:d,style:D.style,styleSpec:W,validateSpec:le}),me;case"geojson":if(me=Ga({key:L,value:d,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:le,objectElementValidators:Ws}),d.cluster)for(let Ce in d.clusterProperties){let[we,ze]=d.clusterProperties[Ce],Pe=typeof we=="string"?[we,["accumulated"],["get",Ce]]:we;me.push(...Wo({key:`${L}.${Ce}.map`,value:ze,expressionContext:"cluster-map"})),me.push(...Wo({key:`${L}.${Ce}.reduce`,value:Pe,expressionContext:"cluster-reduce"}))}return me;case"video":return Ga({key:L,value:d,valueSpec:W.source_video,style:te,validateSpec:le,styleSpec:W});case"image":return Ga({key:L,value:d,valueSpec:W.source_image,style:te,validateSpec:le,styleSpec:W});case"canvas":return[new Ht(L,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return as({key:`${L}.type`,value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function Nl(D){let d=D.value,L=D.styleSpec,W=L.light,te=D.style,le=[],pe=zo(d);if(d===void 0)return le;if(pe!=="object")return le=le.concat([new Ht("light",d,`object expected, ${pe} found`)]),le;for(let me in d){let Ce=me.match(/^(.*)-transition$/);le=le.concat(Ce&&W[Ce[1]]&&W[Ce[1]].transition?D.validateSpec({key:me,value:d[me],valueSpec:L.transition,validateSpec:D.validateSpec,style:te,styleSpec:L}):W[me]?D.validateSpec({key:me,value:d[me],valueSpec:W[me],validateSpec:D.validateSpec,style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)])}return le}function Kl(D){let d=D.value,L=D.styleSpec,W=L.sky,te=D.style,le=zo(d);if(d===void 0)return[];if(le!=="object")return[new Ht("sky",d,`object expected, ${le} found`)];let pe=[];for(let me in d)pe=pe.concat(W[me]?D.validateSpec({key:me,value:d[me],valueSpec:W[me],style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)]);return pe}function Fu(D){let d=D.value,L=D.styleSpec,W=L.terrain,te=D.style,le=[],pe=zo(d);if(d===void 0)return le;if(pe!=="object")return le=le.concat([new Ht("terrain",d,`object expected, ${pe} found`)]),le;for(let me in d)le=le.concat(W[me]?D.validateSpec({key:me,value:d[me],valueSpec:W[me],validateSpec:D.validateSpec,style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)]);return le}function Al(D){let d=[],L=D.value,W=D.key;if(Array.isArray(L)){let te=[],le=[];for(let pe in L)L[pe].id&&te.includes(L[pe].id)&&d.push(new Ht(W,L,`all the sprites' ids must be unique, but ${L[pe].id} is duplicated`)),te.push(L[pe].id),L[pe].url&&le.includes(L[pe].url)&&d.push(new Ht(W,L,`all the sprites' URLs must be unique, but ${L[pe].url} is duplicated`)),le.push(L[pe].url),d=d.concat(Ga({key:`${W}[${pe}]`,value:L[pe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:D.validateSpec}));return d}return Ss({key:W,value:L})}function zu(D){return!!D&&D.constructor===Object}function bu(D){return zu(D.value)?[]:[new Ht(D.key,D.value,`object expected, ${zo(D.value)} found`)]}let ic={"*":()=>[],array:oo,boolean:function(D){let d=D.value,L=D.key,W=zo(d);return W!=="boolean"?[new Ht(L,d,`boolean expected, ${W} found`)]:[]},number:go,color:Yo,constants:Zi,enum:as,filter:Bo,function:Vo,layer:Xo,object:Ga,source:Dl,light:Nl,sky:Kl,terrain:Fu,projection:function(D){let d=D.value,L=D.styleSpec,W=L.projection,te=D.style,le=zo(d);if(d===void 0)return[];if(le!=="object")return[new Ht("projection",d,`object expected, ${le} found`)];let pe=[];for(let me in d)pe=pe.concat(W[me]?D.validateSpec({key:me,value:d[me],valueSpec:W[me],style:te,styleSpec:L}):[new Ht(me,d[me],`unknown property "${me}"`)]);return pe},projectionDefinition:function(D){let d=D.key,L=D.value;L=L instanceof String?L.valueOf():L;let W=zo(L);return W!=="array"||function(te){return Array.isArray(te)&&te.length===3&&typeof te[0]=="string"&&typeof te[1]=="string"&&typeof te[2]=="number"}(L)||function(te){return!!["interpolate","step","literal"].includes(te[0])}(L)?["array","string"].includes(W)?[]:[new Ht(d,L,`projection expected, invalid type "${W}" found`)]:[new Ht(d,L,`projection expected, invalid array ${JSON.stringify(L)} found`)]},string:Ss,formatted:function(D){return Ss(D).length===0?[]:Wo(D)},resolvedImage:function(D){return Ss(D).length===0?[]:Wo(D)},padding:function(D){let d=D.key,L=D.value;if(zo(L)==="array"){if(L.length<1||L.length>4)return[new Ht(d,L,`padding requires 1 to 4 values; ${L.length} values found`)];let W={type:"number"},te=[];for(let le=0;le[]}})),D.constants&&(L=L.concat(Zi({key:"constants",value:D.constants}))),Ql(L)}function Jl(D){return function(d){return D(Object.assign({},d,{validateSpec:Oc}))}}function Ql(D){return[].concat(D).sort((d,L)=>d.line-L.line)}function xu(D){return function(...d){return Ql(D.apply(this,d))}}hu.source=xu(Jl(Dl)),hu.sprite=xu(Jl(Al)),hu.glyphs=xu(Jl(Zu)),hu.light=xu(Jl(Nl)),hu.sky=xu(Jl(Kl)),hu.terrain=xu(Jl(Fu)),hu.state=xu(Jl(bu)),hu.layer=xu(Jl(Xo)),hu.filter=xu(Jl(Bo)),hu.paintProperty=xu(Jl(ps)),hu.layoutProperty=xu(Jl(vi));let rf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class Ff{constructor(d,L){this._globalState=L,this.setValue(d)}evaluate(){var d;return(d=this._literalValue)!==null&&d!==void 0?d:this._compiledValue.evaluate({})}setValue(d){if(d==null||d==="visible"||d==="none")return this._literalValue=d==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let L=_c(d,rf,this._globalState);if(L.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));this._literalValue=void 0,this._compiledValue=L.value,this._globalStateRefs=wr(L.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let xc=ht,rl=hu,Ol=rl.light,Bu=rl.sky,nf=rl.paintProperty,jc=rl.layoutProperty;function wu(D,d){let L=!1;if(d?.length)for(let W of d)D.fire(new Ot(new Error(W.message))),L=!0;return L}class jl{constructor(d,L,W){let te=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;let pe=new Int32Array(this.arrayBuffer);d=pe[0],this.d=(L=pe[1])+2*(W=pe[2]);for(let Ce=0;Ce=Pe[Ve+0]&&te>=Pe[Ve+1])?(me[nt]=!0,pe.push(ze[nt])):me[nt]=!1}}}_forEachCell(d,L,W,te,le,pe,me,Ce){let we=this._convertToCellCoord(d),ze=this._convertToCellCoord(L),Pe=this._convertToCellCoord(W),nt=this._convertToCellCoord(te);for(let Ve=we;Ve<=Pe;Ve++)for(let bt=ze;bt<=nt;bt++){let Et=this.d*bt+Ve;if((!Ce||Ce(this._convertFromCellCoord(Ve),this._convertFromCellCoord(bt),this._convertFromCellCoord(Ve+1),this._convertFromCellCoord(bt+1)))&&le.call(this,d,L,W,te,Et,pe,me,Ce))return}}_convertFromCellCoord(d){return(d-this.padding)/this.scale}_convertToCellCoord(d){return Math.max(0,Math.min(this.d-1,Math.floor(d*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let d=this.cells,L=3+this.cells.length+1+1,W=0;for(let pe of this.cells)W+=pe.length;let te=new Int32Array(L+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let le=L;for(let pe=0;peW?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=L):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${L}}`,"u").source}catch{return null}}).filter(L=>L);return new RegExp(d.join("|"),"u")}let sn=Wr(["Arab","Dupl","Mong","Ougr","Syrc"]);function gn(D){return!sn.test(String.fromCodePoint(D))}function Cn(D){return!(Yt(D)||(d=D,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(d))));var d}let Zn=Wr(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function ya(D){return Zn.test(String.fromCodePoint(D))}function Na(D,d){return!(!d&&ya(D)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(D)))}function wi(D){for(let d of D)if(ya(d.codePointAt(0)))return!0;return!1}let Yi=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(D){this.pluginStatus=D.pluginStatus,this.pluginURL=D.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(D){if(Yi.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=D.applyArabicShaping,this.processBidirectionalText=D.processBidirectionalText,this.processStyledBidirectionalText=D.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(D,d){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(D.pluginStatus!=="loading")return this.setState(D),D;let L=D.pluginURL,W=new Promise(le=>{this.loadScriptResolve=le});d(L);let te=new Promise(le=>setTimeout(()=>le(),this.TIMEOUT));if(yield Promise.race([W,te]),this.isParsed()){let le={pluginStatus:"loaded",pluginURL:L};return this.setState(le),le}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${L}`)})}};class Ti{constructor(d,L){this.isSupportedScript=_o,this.zoom=d,L?(this.now=L.now||0,this.fadeDuration=L.fadeDuration||0,this.zoomHistory=L.zoomHistory||new Nt,this.transition=L.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Nt,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let d=this.zoom,L=d-Math.floor(d),W=this.crossFadingFactor();return d>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:L+(1-L)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*L}}}function _o(D){return function(d,L){for(let W of d)if(!Na(W.codePointAt(0),L))return!1;return!0}(D,Yi.getRTLTextPluginStatus()==="loaded")}let bo="-transition";class Zo{constructor(d,L,W){this.property=d,this.value=L,this.expression=function(te,le,pe){if(gc(te))return new rr(te,le);if(yc(te)){let me=zt(te,le,pe);if(me.result==="error")throw new Error(me.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));return me.value}{let me=te;return le.type==="color"&&typeof te=="string"?me=ga.parse(te):le.type!=="padding"||typeof te!="number"&&!Array.isArray(te)?le.type!=="numberArray"||typeof te!="number"&&!Array.isArray(te)?le.type!=="colorArray"||typeof te!="string"&&!Array.isArray(te)?le.type==="variableAnchorOffsetCollection"&&Array.isArray(te)?me=zi.parse(te):le.type==="projectionDefinition"&&typeof te=="string"&&(me=Mo.parse(te)):me=ti.parse(te):me=Gi.parse(te):me=Sa.parse(te),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>me}}}(L===void 0?d.specification.default:L,d.specification,W)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(d,L,W){return this.property.possiblyEvaluate(this,d,L,W)}}class fs{constructor(d,L){this.property=d,this.value=new Zo(d,void 0,L)}transitioned(d,L){return new Es(this.property,this.value,L,X({},d.transition,this.transition),d.now)}untransitioned(){return new Es(this.property,this.value,null,{},0)}}class Po{constructor(d,L){this._properties=d,this._values=Object.create(d.defaultTransitionablePropertyValues),this._globalState=L}hasProperty(d){return d in this._properties.defaultTransitionablePropertyValues}getValue(d){return q(this._values[d].value.value)}setValue(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new fs(this._values[d].property,this._globalState)),this._values[d].value=new Zo(this._values[d].property,L===null?void 0:q(L),this._globalState)}getTransition(d){return q(this._values[d].transition)}setTransition(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new fs(this._values[d].property,this._globalState)),this._values[d].transition=q(L)||void 0}serialize(){let d={};for(let L of Object.keys(this._values)){let W=this.getValue(L);W!==void 0&&(d[L]=W);let te=this.getTransition(L);te!==void 0&&(d[`${L}${bo}`]=te)}return d}transitioned(d,L){let W=new cl(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(d,L._values[te]);return W}untransitioned(){let d=new cl(this._properties);for(let L of Object.keys(this._values))d._values[L]=this._values[L].untransitioned();return d}}class Es{constructor(d,L,W,te,le){this.property=d,this.value=L,this.begin=le+te.delay||0,this.end=this.begin+te.duration||0,d.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(d,L,W){let te=d.now||0,le=this.value.possiblyEvaluate(d,L,W),pe=this.prior;if(pe){if(te>this.end)return this.prior=null,le;if(this.value.isDataDriven())return this.prior=null,le;if(tete.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class Ku{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){if(d.value!==void 0){if(d.expression.kind==="constant"){let le=d.expression.evaluate(L,null,{},W,te);return this._calculate(le,le,le,L)}return this._calculate(d.expression.evaluate(new Ti(Math.floor(L.zoom-1),L)),d.expression.evaluate(new Ti(Math.floor(L.zoom),L)),d.expression.evaluate(new Ti(Math.floor(L.zoom+1),L)),L)}}_calculate(d,L,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class tu{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){return!!d.expression.evaluate(L,null,{},W,te)}interpolate(){return!1}}class Bs{constructor(d){this.properties=d,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let L in d){let W=d[L];W.specification.overridable&&this.overridableProperties.push(L);let te=this.defaultPropertyValues[L]=new Zo(W,void 0,void 0),le=this.defaultTransitionablePropertyValues[L]=new fs(W,void 0);this.defaultTransitioningPropertyValues[L]=le.untransitioned(),this.defaultPossiblyEvaluatedValues[L]=te.possiblyEvaluate({})}}}Ci("DataDrivenProperty",Vi),Ci("DataConstantProperty",Li),Ci("CrossFadedDataDrivenProperty",fl),Ci("CrossFadedProperty",Ku),Ci("ColorRampProperty",tu);let oc=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",du=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class hl extends vt{constructor(d,L,W){if(super(),this.id=d.id,this.type=d.type,this._globalState=W,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(te,le){return new Ff(te,le)}(this.visibility,W),d.type!=="custom"&&(this.metadata=d.metadata,this.minzoom=d.minzoom,this.maxzoom=d.maxzoom,d.type!=="background"&&(this.source=d.source,this.sourceLayer=d["source-layer"],this.filter=d.filter,this._featureFilter=Jn(d.filter,W)),L.layout&&(this._unevaluatedLayout=new ql(L.layout,W)),L.paint)){this._transitionablePaint=new Po(L.paint,W);for(let te in d.paint)this.setPaintProperty(te,d.paint[te],{validate:!1});for(let te in d.layout)this.setLayoutProperty(te,d.layout[te],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Tu(L.paint)}}setFilter(d){this.filter=d,this._featureFilter=Jn(d,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(d){var L;if(d==="visibility")return this.visibility;if(!((L=this._transitionablePaint)===null||L===void 0)&&L.hasProperty(d))throw new Error(d+oc);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${d}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(d)}getLayoutAffectingGlobalStateRefs(){let d=new Set;for(let L of this._visibilityExpression.getGlobalStateRefs())d.add(L);if(this._unevaluatedLayout)for(let L in this._unevaluatedLayout._values){let W=this._unevaluatedLayout._values[L];for(let te of W.getGlobalStateRefs())d.add(te)}for(let L of this._featureFilter.getGlobalStateRefs())d.add(L);return d}getPaintAffectingGlobalStateRefs(){var d;let L=new globalThis.Map;if(this._transitionablePaint)for(let W in this._transitionablePaint._values){let te=this._transitionablePaint._values[W].value;for(let le of te.getGlobalStateRefs()){let pe=(d=L.get(le))!==null&&d!==void 0?d:[];pe.push({name:W,value:te.value}),L.set(le,pe)}}return L}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(d,L,W={}){var te;if(d==="visibility")return this.visibility=L,this._visibilityExpression.setValue(L),void this.recalculateVisibility();!((te=this._transitionablePaint)===null||te===void 0)&&te.hasProperty(d)?this.fire(new Ot(new Error(d+oc))):L!=null&&this._validate(jc,`layers.${this.id}.layout.${d}`,d,L,W)||this._unevaluatedLayout.setValue(d,L)}getPaintProperty(d){var L,W;if(d.endsWith(bo)){let te=d.slice(0,-11);if(te==="visibility"||!((L=this._unevaluatedLayout)===null||L===void 0)&&L.hasProperty(te))throw new Error(d+du);return this._transitionablePaint.getTransition(te)}if(d==="visibility"||!((W=this._unevaluatedLayout)===null||W===void 0)&&W.hasProperty(d))throw new Error(d+du);return this._transitionablePaint.getValue(d)}setPaintProperty(d,L,W={}){var te;if(d==="visibility"||!((te=this._unevaluatedLayout)===null||te===void 0)&&te.hasProperty(d))return this.fire(new Ot(new Error(d+du))),!1;if(L!=null&&this._validate(nf,`layers.${this.id}.paint.${d}`,d,L,W))return!1;if(d.endsWith(bo))return this._transitionablePaint.setTransition(d.slice(0,-11),L||void 0),!1;{let le=this._transitionablePaint._values[d],pe=le.property.specification["property-type"]==="cross-faded-data-driven",me=le.value.isDataDriven(),Ce=le.value;this._transitionablePaint.setValue(d,L),this._handleSpecialPaintPropertyUpdate(d);let we=this._transitionablePaint._values[d].value;return we.isDataDriven()||me||pe||this._handleOverridablePaintPropertyUpdate(d,Ce,we)}}_handleSpecialPaintPropertyUpdate(d){}_handleOverridablePaintPropertyUpdate(d,L,W){return!1}isHidden(d=this.minzoom,L=!1){return!!(this.minzoom&&d<(L?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&d>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(d){this._transitioningPaint=this._transitionablePaint.transitioned(d,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(d,L){d.getCrossfadeParameters&&(this._crossfadeParameters=d.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(d,void 0,L)),this.paint=this._transitioningPaint.possiblyEvaluate(d,void 0,L)}serialize(){var d,L;let W={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:(d=this._unevaluatedLayout)===null||d===void 0?void 0:d.serialize(),paint:(L=this._transitionablePaint)===null||L===void 0?void 0:L.serialize()};return this.visibility&&(W.layout||(W.layout={}),W.layout.visibility=this.visibility),Y(W,(te,le)=>!(te===void 0||le==="layout"&&!Object.keys(te).length||le==="paint"&&!Object.keys(te).length))}_validate(d,L,W,te,le={}){return le?.validate!==!1&&wu(this,d.call(rl,{key:L,layerType:this.type,objectKey:W,value:te,styleSpec:ht,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let d in this.paint._values){let L=this.paint.get(d);if(L instanceof Js&&$u(L.property.specification)&&(L.value.kind==="source"||L.value.kind==="composite")&&L.value.isStateDependent)return!0}return!1}}let Uc;var he={get paint(){return Uc=Uc||new Bs({"raster-opacity":new Li(ht.paint_raster["raster-opacity"]),"raster-hue-rotate":new Li(ht.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Li(ht.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Li(ht.paint_raster["raster-brightness-max"]),"raster-saturation":new Li(ht.paint_raster["raster-saturation"]),"raster-contrast":new Li(ht.paint_raster["raster-contrast"]),resampling:new Li(ht.paint_raster.resampling),"raster-resampling":new Li(ht.paint_raster["raster-resampling"]),"raster-fade-duration":new Li(ht.paint_raster["raster-fade-duration"])})}};class Se extends hl{constructor(d,L){super(d,he,L)}}let je={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Qe{constructor(d,L){this._structArray=d,this._pos1=L*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class tt{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(d,L){return d._trim(),L&&(d.isTransferred=!0,L.push(d.arrayBuffer)),{length:d.length,arrayBuffer:d.arrayBuffer}}static deserialize(d){let L=Object.create(this.prototype);return L.arrayBuffer=d.arrayBuffer,L.length=d.length,L.capacity=d.arrayBuffer.byteLength/L.bytesPerElement,L._refreshViews(),L}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(d){this.reserve(d),this.length=d}reserve(d){if(d>this.capacity){this.capacity=Math.max(d,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let L=this.uint8;this._refreshViews(),L&&this.uint8.set(L)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ut(D,d=1){let L=0,W=0;return{members:D.map(te=>{let le=je[te.type].BYTES_PER_ELEMENT,pe=L=jt(L,Math.max(d,le)),me=te.components||1;return W=Math.max(W,le),L+=le*me,{name:te.name,type:te.type,components:me,offset:pe}}),size:jt(L,Math.max(W,d)),alignment:d}}function jt(D,d){return Math.ceil(D/d)*d}class St extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.int16[te+0]=L,this.int16[te+1]=W,d}}St.prototype.bytesPerElement=4,Ci("StructArrayLayout2i4",St);class Qt extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let le=3*d;return this.int16[le+0]=L,this.int16[le+1]=W,this.int16[le+2]=te,d}}Qt.prototype.bytesPerElement=6,Ci("StructArrayLayout3i6",Qt);class gr extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let le=this.length;return this.resize(le+1),this.emplace(le,d,L,W,te)}emplace(d,L,W,te,le){let pe=4*d;return this.int16[pe+0]=L,this.int16[pe+1]=W,this.int16[pe+2]=te,this.int16[pe+3]=le,d}}gr.prototype.bytesPerElement=8,Ci("StructArrayLayout4i8",gr);class yr extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,le,pe)}emplace(d,L,W,te,le,pe,me){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=le,this.int16[Ce+4]=pe,this.int16[Ce+5]=me,d}}yr.prototype.bytesPerElement=12,Ci("StructArrayLayout2i4i12",yr);class Kr extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,le,pe)}emplace(d,L,W,te,le,pe,me){let Ce=4*d,we=8*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.uint8[we+4]=te,this.uint8[we+5]=le,this.uint8[we+6]=pe,this.uint8[we+7]=me,d}}Kr.prototype.bytesPerElement=8,Ci("StructArrayLayout2i4ub8",Kr);class $r extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.float32[te+0]=L,this.float32[te+1]=W,d}}$r.prototype.bytesPerElement=8,Ci("StructArrayLayout2f8",$r);class bn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe,me,Ce,we,ze){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,d,L,W,te,le,pe,me,Ce,we,ze)}emplace(d,L,W,te,le,pe,me,Ce,we,ze,Pe){let nt=10*d;return this.uint16[nt+0]=L,this.uint16[nt+1]=W,this.uint16[nt+2]=te,this.uint16[nt+3]=le,this.uint16[nt+4]=pe,this.uint16[nt+5]=me,this.uint16[nt+6]=Ce,this.uint16[nt+7]=we,this.uint16[nt+8]=ze,this.uint16[nt+9]=Pe,d}}bn.prototype.bytesPerElement=20,Ci("StructArrayLayout10ui20",bn);class Rn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe,me,Ce){let we=this.length;return this.resize(we+1),this.emplace(we,d,L,W,te,le,pe,me,Ce)}emplace(d,L,W,te,le,pe,me,Ce,we){let ze=8*d;return this.uint16[ze+0]=L,this.uint16[ze+1]=W,this.uint16[ze+2]=te,this.uint16[ze+3]=le,this.uint16[ze+4]=pe,this.uint16[ze+5]=me,this.uint16[ze+6]=Ce,this.uint16[ze+7]=we,d}}Rn.prototype.bytesPerElement=16,Ci("StructArrayLayout8ui16",Rn);class rn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt){let Ve=this.length;return this.resize(Ve+1),this.emplace(Ve,d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt)}emplace(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve){let bt=12*d;return this.int16[bt+0]=L,this.int16[bt+1]=W,this.int16[bt+2]=te,this.int16[bt+3]=le,this.uint16[bt+4]=pe,this.uint16[bt+5]=me,this.uint16[bt+6]=Ce,this.uint16[bt+7]=we,this.int16[bt+8]=ze,this.int16[bt+9]=Pe,this.int16[bt+10]=nt,this.int16[bt+11]=Ve,d}}rn.prototype.bytesPerElement=24,Ci("StructArrayLayout4i4ui4i24",rn);class pn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let le=3*d;return this.float32[le+0]=L,this.float32[le+1]=W,this.float32[le+2]=te,d}}pn.prototype.bytesPerElement=12,Ci("StructArrayLayout3f12",pn);class xn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint32[1*d+0]=L,d}}xn.prototype.bytesPerElement=4,Ci("StructArrayLayout1ul4",xn);class Bn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe,me,Ce,we){let ze=this.length;return this.resize(ze+1),this.emplace(ze,d,L,W,te,le,pe,me,Ce,we)}emplace(d,L,W,te,le,pe,me,Ce,we,ze){let Pe=10*d,nt=5*d;return this.int16[Pe+0]=L,this.int16[Pe+1]=W,this.int16[Pe+2]=te,this.int16[Pe+3]=le,this.int16[Pe+4]=pe,this.int16[Pe+5]=me,this.uint32[nt+3]=Ce,this.uint16[Pe+8]=we,this.uint16[Pe+9]=ze,d}}Bn.prototype.bytesPerElement=20,Ci("StructArrayLayout6i1ul2ui20",Bn);class Fn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,le,pe)}emplace(d,L,W,te,le,pe,me){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=le,this.int16[Ce+4]=pe,this.int16[Ce+5]=me,d}}Fn.prototype.bytesPerElement=12,Ci("StructArrayLayout2i2i2i12",Fn);class mn extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le){let pe=this.length;return this.resize(pe+1),this.emplace(pe,d,L,W,te,le)}emplace(d,L,W,te,le,pe){let me=4*d,Ce=8*d;return this.float32[me+0]=L,this.float32[me+1]=W,this.float32[me+2]=te,this.int16[Ce+6]=le,this.int16[Ce+7]=pe,d}}mn.prototype.bytesPerElement=16,Ci("StructArrayLayout2f1f2i16",mn);class Ea extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,le,pe){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,le,pe)}emplace(d,L,W,te,le,pe,me){let Ce=16*d,we=4*d,ze=8*d;return this.uint8[Ce+0]=L,this.uint8[Ce+1]=W,this.float32[we+1]=te,this.float32[we+2]=le,this.int16[ze+6]=pe,this.int16[ze+7]=me,d}}Ea.prototype.bytesPerElement=16,Ci("StructArrayLayout2ub2f2i16",Ea);class Oa extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let le=3*d;return this.uint16[le+0]=L,this.uint16[le+1]=W,this.uint16[le+2]=te,d}}Oa.prototype.bytesPerElement=6,Ci("StructArrayLayout3ui6",Oa);class Ka extends tt{_refreshViews(){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)}emplaceBack(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr){let xr=this.length;return this.resize(xr+1),this.emplace(xr,d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr)}emplace(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr){let lr=24*d,Mr=12*d,Xr=48*d;return this.int16[lr+0]=L,this.int16[lr+1]=W,this.uint16[lr+2]=te,this.uint16[lr+3]=le,this.uint32[Mr+2]=pe,this.uint32[Mr+3]=me,this.uint32[Mr+4]=Ce,this.uint16[lr+10]=we,this.uint16[lr+11]=ze,this.uint16[lr+12]=Pe,this.float32[Mr+7]=nt,this.float32[Mr+8]=Ve,this.uint8[Xr+36]=bt,this.uint8[Xr+37]=Et,this.uint8[Xr+38]=er,this.uint32[Mr+10]=tr,this.int16[lr+22]=xr,d}}Ka.prototype.bytesPerElement=48,Ci("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Ka);class di extends tt{_refreshViews(){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)}emplaceBack(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr,lr,Mr,Xr,an,kn,On,_a,ta,Ba,Za){let Da=this.length;return this.resize(Da+1),this.emplace(Da,d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr,lr,Mr,Xr,an,kn,On,_a,ta,Ba,Za)}emplace(d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr,lr,Mr,Xr,an,kn,On,_a,ta,Ba,Za,Da){let na=32*d,li=16*d;return this.int16[na+0]=L,this.int16[na+1]=W,this.int16[na+2]=te,this.int16[na+3]=le,this.int16[na+4]=pe,this.int16[na+5]=me,this.int16[na+6]=Ce,this.int16[na+7]=we,this.uint16[na+8]=ze,this.uint16[na+9]=Pe,this.uint16[na+10]=nt,this.uint16[na+11]=Ve,this.uint16[na+12]=bt,this.uint16[na+13]=Et,this.uint16[na+14]=er,this.uint16[na+15]=tr,this.uint16[na+16]=xr,this.uint16[na+17]=lr,this.uint16[na+18]=Mr,this.uint16[na+19]=Xr,this.uint16[na+20]=an,this.uint16[na+21]=kn,this.uint16[na+22]=On,this.uint32[li+12]=_a,this.float32[li+13]=ta,this.float32[li+14]=Ba,this.uint16[na+30]=Za,this.uint16[na+31]=Da,d}}di.prototype.bytesPerElement=64,Ci("StructArrayLayout8i15ui1ul2f2ui64",di);class Oi extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.float32[1*d+0]=L,d}}Oi.prototype.bytesPerElement=4,Ci("StructArrayLayout1f4",Oi);class Pi extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let le=3*d;return this.uint16[6*d+0]=L,this.float32[le+1]=W,this.float32[le+2]=te,d}}Pi.prototype.bytesPerElement=12,Ci("StructArrayLayout1ui2f12",Pi);class ko extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let le=4*d;return this.uint32[2*d+0]=L,this.uint16[le+2]=W,this.uint16[le+3]=te,d}}ko.prototype.bytesPerElement=8,Ci("StructArrayLayout1ul2ui8",ko);class de extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.uint16[te+0]=L,this.uint16[te+1]=W,d}}de.prototype.bytesPerElement=4,Ci("StructArrayLayout2ui4",de);class y extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint16[1*d+0]=L,d}}y.prototype.bytesPerElement=2,Ci("StructArrayLayout1ui2",y);class O extends tt{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let le=this.length;return this.resize(le+1),this.emplace(le,d,L,W,te)}emplace(d,L,W,te,le){let pe=4*d;return this.float32[pe+0]=L,this.float32[pe+1]=W,this.float32[pe+2]=te,this.float32[pe+3]=le,d}}O.prototype.bytesPerElement=16,Ci("StructArrayLayout4f16",O);class ie extends Qe{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new t(this.anchorPointX,this.anchorPointY)}}ie.prototype.size=20;class ce extends Bn{get(d){return new ie(this,d)}}Ci("CollisionBoxArray",ce);class _e extends Qe{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(d){this._structArray.uint8[this._pos1+37]=d}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(d){this._structArray.uint8[this._pos1+38]=d}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(d){this._structArray.uint32[this._pos4+10]=d}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}_e.prototype.size=48;class De extends Ka{get(d){return new _e(this,d)}}Ci("PlacedSymbolArray",De);class Ne extends Qe{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(d){this._structArray.uint32[this._pos4+12]=d}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Ne.prototype.size=64;class Ye extends di{get(d){return new Ne(this,d)}}Ci("SymbolInstanceArray",Ye);class lt extends Oi{getoffsetX(d){return this.float32[1*d+0]}}Ci("GlyphOffsetArray",lt);class ct extends Qt{getx(d){return this.int16[3*d+0]}gety(d){return this.int16[3*d+1]}gettileUnitDistanceFromAnchor(d){return this.int16[3*d+2]}}Ci("SymbolLineVertexArray",ct);class Ft extends Qe{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Ft.prototype.size=12;class Gt extends Pi{get(d){return new Ft(this,d)}}Ci("TextAnchorOffsetArray",Gt);class Jt extends Qe{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Jt.prototype.size=8;class it extends ko{get(d){return new Jt(this,d)}}Ci("FeatureIndexArray",it);class Rt extends St{}class qt extends St{}class or extends St{}class vr extends yr{}class Ar extends Kr{}class dr extends $r{}class mr extends bn{}class qr extends Rn{}class Lr extends rn{}class cn extends pn{}class Nn extends xn{}class Dn extends Fn{}class qn extends Ea{}class _n extends Oa{}class vn extends de{}let Sn=ut([{name:"a_pos",components:2,type:"Int16"}],4),{members:Tn}=Sn;class Xn{constructor(d=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=d}prepareSegment(d,L,W,te){let le=this.segments[this.segments.length-1];return d>Xn.MAX_VERTEX_ARRAY_LENGTH&&ee(`Max vertices per segment is ${Xn.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${d}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Xn.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!le||le.vertexLength+d>Xn.MAX_VERTEX_ARRAY_LENGTH||le.sortKey!==te?this.createNewSegment(L,W,te):le}createNewSegment(d,L,W){let te={vertexOffset:d.length,primitiveOffset:L.length,vertexLength:0,primitiveLength:0,vaos:{}};return W!==void 0&&(te.sortKey=W),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(te),te}getOrCreateLatestSegment(d,L,W){return this.prepareSegment(0,d,L,W)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let d of this.segments)for(let L in d.vaos)d.vaos[L].destroy()}static simpleSegment(d,L,W,te){return new Xn([{vertexOffset:d,primitiveOffset:L,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function $n(D,d){return 256*(D=oe(Math.floor(D),0,255))+oe(Math.floor(d),0,255)}Xn.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Ci("SegmentVector",Xn);let Ha=ut([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),$a=ut([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var Si,Ma,xa,gi={exports:{}},Wa={exports:{}},Ya={exports:{}},Xa=function(){if(xa)return gi.exports;xa=1;var D=(Si||(Si=1,Wa.exports=function(L,W){var te,le,pe,me,Ce,we,ze,Pe;for(le=L.length-(te=3&L.length),pe=W,Ce=3432918353,we=461845907,Pe=0;Pe>>16)*Ce&65535)<<16)&4294967295)<<15|ze>>>17))*we+(((ze>>>16)*we&65535)<<16)&4294967295)<<13|pe>>>19))+((5*(pe>>>16)&65535)<<16)&4294967295))+((58964+(me>>>16)&65535)<<16);switch(ze=0,te){case 3:ze^=(255&L.charCodeAt(Pe+2))<<16;case 2:ze^=(255&L.charCodeAt(Pe+1))<<8;case 1:pe^=ze=(65535&(ze=(ze=(65535&(ze^=255&L.charCodeAt(Pe)))*Ce+(((ze>>>16)*Ce&65535)<<16)&4294967295)<<15|ze>>>17))*we+(((ze>>>16)*we&65535)<<16)&4294967295}return pe^=L.length,pe=2246822507*(65535&(pe^=pe>>>16))+((2246822507*(pe>>>16)&65535)<<16)&4294967295,pe=3266489909*(65535&(pe^=pe>>>13))+((3266489909*(pe>>>16)&65535)<<16)&4294967295,(pe^=pe>>>16)>>>0}),Wa.exports),d=(Ma||(Ma=1,Ya.exports=function(L,W){for(var te,le=L.length,pe=W^le,me=0;le>=4;)te=1540483477*(65535&(te=255&L.charCodeAt(me)|(255&L.charCodeAt(++me))<<8|(255&L.charCodeAt(++me))<<16|(255&L.charCodeAt(++me))<<24))+((1540483477*(te>>>16)&65535)<<16),pe=1540483477*(65535&pe)+((1540483477*(pe>>>16)&65535)<<16)^(te=1540483477*(65535&(te^=te>>>24))+((1540483477*(te>>>16)&65535)<<16)),le-=4,++me;switch(le){case 3:pe^=(255&L.charCodeAt(me+2))<<16;case 2:pe^=(255&L.charCodeAt(me+1))<<8;case 1:pe=1540483477*(65535&(pe^=255&L.charCodeAt(me)))+((1540483477*(pe>>>16)&65535)<<16)}return pe=1540483477*(65535&(pe^=pe>>>13))+((1540483477*(pe>>>16)&65535)<<16),(pe^=pe>>>15)>>>0}),Ya.exports);return gi.exports=D,gi.exports.murmur3=D,gi.exports.murmur2=d,gi.exports}(),pi=a(Xa);class Xi{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(d,L,W,te){this.ids.push(Eo(d)),this.positions.push(L,W,te)}getPositions(d){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let L=Eo(d),W=0,te=this.ids.length-1;for(;W>1;this.ids[pe]>=L?te=pe:W=pe+1}let le=[];for(;this.ids[W]===L;)le.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return le}static serialize(d,L){let W=new Float64Array(d.ids),te=new Uint32Array(d.positions);return yi(W,te,0,W.length-1),L&&L.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(d){let L=new Xi;return L.ids=d.ids,L.positions=d.positions,L.indexed=!0,L}}function Eo(D){let d=+D;return!isNaN(d)&&d<=Number.MAX_SAFE_INTEGER?d:pi(String(D))}function yi(D,d,L,W){for(;L>1],le=L-1,pe=W+1;for(;;){do le++;while(D[le]te);if(le>=pe)break;Ui(D,le,pe),Ui(d,3*le,3*pe),Ui(d,3*le+1,3*pe+1),Ui(d,3*le+2,3*pe+2)}pe-L`u_${te}`),this.type=W}setUniform(d,L,W){d.set(W.constantOr(this.value))}getBinding(d,L,W){return this.type==="color"?new qs(d,L):new To(d,L)}}class os{constructor(d,L){this.uniformNames=L.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(d,L){this.pixelRatioFrom=L.pixelRatio,this.pixelRatioTo=d.pixelRatio,this.patternFrom=L.tlbr,this.patternTo=d.tlbr}setConstantDashPositions(d,L){this.dashTo=[0,d.y,d.height,d.width],this.dashFrom=[0,L.y,L.height,L.width]}setUniform(d,L,W,te){let le=null;te==="u_pattern_to"?le=this.patternTo:te==="u_pattern_from"?le=this.patternFrom:te==="u_dasharray_to"?le=this.dashTo:te==="u_dasharray_from"?le=this.dashFrom:te==="u_pixel_ratio_to"?le=this.pixelRatioTo:te==="u_pixel_ratio_from"&&(le=this.pixelRatioFrom),le!==null&&d.set(le)}getBinding(d,L,W){return W.startsWith("u_pattern")||W.startsWith("u_dasharray_")?new jo(d,L):new To(d,L)}}class hs{constructor(d,L,W,te){this.expression=d,this.type=W,this.maxValue=0,this.paintVertexAttributes=L.map(le=>({name:`a_${le}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(d,L,W){let te=this.paintVertexArray.length,le=this.expression.evaluate(new Ti(0,W),L,{},W.canonical,[],W.formattedSection);this.paintVertexArray.resize(d),this._setPaintValue(te,d,le)}updatePaintArray(d,L,W,te,le){let pe=this.expression.evaluate(new Ti(0,le),W,te);this._setPaintValue(d,L,pe)}_setPaintValue(d,L,W){if(this.type==="color"){let te=Uo(W);for(let le=d;le`u_${me}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=le,this.maxValue=0,this.paintVertexAttributes=L.map(me=>({name:`a_${me}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new pe}populatePaintArray(d,L,W){let te=this.expression.evaluate(new Ti(this.zoom,W),L,{},W.canonical,[],W.formattedSection),le=this.expression.evaluate(new Ti(this.zoom+1,W),L,{},W.canonical,[],W.formattedSection),pe=this.paintVertexArray.length;this.paintVertexArray.resize(d),this._setPaintValue(pe,d,te,le)}updatePaintArray(d,L,W,te,le){let pe=this.expression.evaluate(new Ti(this.zoom,le),W,te),me=this.expression.evaluate(new Ti(this.zoom+1,le),W,te);this._setPaintValue(d,L,pe,me)}_setPaintValue(d,L,W,te){if(this.type==="color"){let le=Uo(W),pe=Uo(te);for(let me=d;me`#define HAS_UNIFORM_${te}`))}return d}getBinderAttributes(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof hs||W instanceof ss)for(let te of W.paintVertexAttributes)d.push(te.name);else if(W instanceof ks){let te=W.getVertexAttributes();for(let le of te)d.push(le.name)}}return d}getBinderUniforms(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof Qs||W instanceof os||W instanceof ss)for(let te of W.uniformNames)d.push(te)}return d}getPaintVertexBuffers(){return this._buffers}getUniforms(d,L){let W=[];for(let te in this.binders){let le=this.binders[te];if(le instanceof Qs||le instanceof os||le instanceof ss){for(let pe of le.uniformNames)if(L[pe]){let me=le.getBinding(d,L[pe],pe);W.push({name:pe,property:te,binding:me})}}}return W}setUniforms(d,L,W,te){for(let{name:le,property:pe,binding:me}of L)this.binders[pe].setUniform(me,te,W.get(pe),le)}updatePaintBuffers(d){this._buffers=[];for(let L in this.binders){let W=this.binders[L];if(d&&W instanceof ks){let te=d.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof hs||W instanceof ss)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(d){for(let L in this.binders){let W=this.binders[L];(W instanceof hs||W instanceof ss||W instanceof ks)&&W.upload(d)}this.updatePaintBuffers()}destroy(){for(let d in this.binders){let L=this.binders[d];(L instanceof hs||L instanceof ss||L instanceof ks)&&L.destroy()}}}class Do{constructor(d,L,W=()=>!0){this.programConfigurations={};for(let te of d)this.programConfigurations[te.id]=new Il(te,L,W);this.needsUpload=!1,this._featureMap=new Xi,this._bufferOffset=0}populatePaintArrays(d,L,W,te){for(let le in this.programConfigurations)this.programConfigurations[le].populatePaintArrays(d,L,te);L.id!==void 0&&this._featureMap.add(L.id,W,this._bufferOffset,d),this._bufferOffset=d,this.needsUpload=!0}updatePaintArrays(d,L,W,te){for(let le of W)this.needsUpload=this.programConfigurations[le.id].updatePaintArrays(d,this._featureMap,L,le,te)||this.needsUpload}get(d){return this.programConfigurations[d]}upload(d){if(this.needsUpload){for(let L in this.programConfigurations)this.programConfigurations[L].upload(d);this.needsUpload=!1}}destroy(){for(let d in this.programConfigurations)this.programConfigurations[d].destroy()}}function ru(D,d){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[D]||[D.replace(`${d}-`,"").replace(/-/g,"_")]}function Ns(D,d,L){let W={color:{source:$r,composite:O},number:{source:Oi,composite:$r}},te=function(le){return{"line-pattern":{source:mr,composite:mr},"fill-pattern":{source:mr,composite:mr},"fill-extrusion-pattern":{source:mr,composite:mr},"line-dasharray":{source:qr,composite:qr}}[le]}(D);return te?.[L]||W[d][L]}Ci("ConstantBinder",Qs),Ci("CrossFadedConstantBinder",os),Ci("SourceExpressionBinder",hs),Ci("CrossFadedPatternBinder",ts),Ci("CrossFadedDasharrayBinder",el),Ci("CompositeExpressionBinder",ss),Ci("ProgramConfiguration",Il,{omit:["_buffers"]}),Ci("ProgramConfigurationSet",Do);let Nu=Math.pow(2,14)-1,Vl=-Nu-1;function Hl(D){let d=F/D.extent,L=D.loadGeometry();for(let W of L)for(let te of W){let le=Math.round(te.x*d),pe=Math.round(te.y*d);te.x=oe(le,Vl,Nu),te.y=oe(pe,Vl,Nu),(lete.x+1||pete.y+1)&&ee("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return L}function Co(D,d){return{type:D.type,id:D.id,properties:D.properties,geometry:d?Hl(D):[]}}let is=-32768;function Hs(D,d,L,W,te){D.emplaceBack(is+8*d+W,is+8*L+te)}class fn{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new qt,this.indexArray=new _n,this.segments=new Xn,this.programConfigurations=new Do(d.layers,d.zoom),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){let te=this.layers[0],le=[],pe=null,me=!1,Ce=te.type==="heatmap";if(te.type==="circle"){let ze=te;pe=ze.layout.get("circle-sort-key"),me=!pe.isConstant(),Ce||(Ce=ze.paint.get("circle-pitch-alignment")==="map")}let we=Ce?L.subdivisionGranularity.circle:1;for(let{feature:ze,id:Pe,index:nt,sourceLayerIndex:Ve}of d){let bt=this.layers[0]._featureFilter.needGeometry,Et=Co(ze,bt);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),Et,W))continue;let er=me?pe.evaluate(Et,{},W):void 0,tr={id:Pe,properties:ze.properties,type:ze.type,sourceLayerIndex:Ve,index:nt,geometry:bt?Et.geometry:Hl(ze),patterns:{},sortKey:er};le.push(tr)}me&&le.sort((ze,Pe)=>ze.sortKey-Pe.sortKey);for(let ze of le){let{geometry:Pe,index:nt,sourceLayerIndex:Ve}=ze,bt=d[nt].feature;this.addFeature(ze,Pe,nt,W,we),L.featureIndex.insert(bt,Pe,nt,Ve,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,Tn),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(d,L,W,te,le=1){let pe;switch(le){case 1:pe=[0,7];break;case 3:pe=[0,2,5,7];break;case 5:pe=[0,1,3,4,6,7];break;case 7:pe=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${le}; valid values are 1, 3, 5, 7.`)}let me=pe.length;for(let Ce of L)for(let we of Ce){let ze=we.x,Pe=we.y;if(ze<0||ze>=F||Pe<0||Pe>=F)continue;let nt=this.segments.prepareSegment(me*me,this.layoutVertexArray,this.indexArray,d.sortKey),Ve=nt.vertexLength;for(let bt=0;bt1){if(Os(D,d))return!0;for(let W of d)if(en(W,D,L))return!0}for(let W of D)if(en(W,d,L))return!0;return!1}function Os(D,d){if(D.length===0||d.length===0)return!1;for(let L=0;L1?L:L.sub(d)._mult(te)._add(d))}function An(D,d){let L,W,te,le=!1;for(let pe of D){L=pe;for(let me=0,Ce=L.length-1;med.y!=te.y>d.y&&d.x<(te.x-W.x)*(d.y-W.y)/(te.y-W.y)+W.x&&(le=!le)}return le}function sa(D,d){let L=!1;for(let W=0,te=D.length-1;Wd.y!=pe.y>d.y&&d.x<(pe.x-le.x)*(d.y-le.y)/(pe.y-le.y)+le.x&&(L=!L)}return L}function wa(D,d,L){let W=L[0],te=L[2];if(D.xte.x&&d.x>te.x||D.yte.y&&d.y>te.y)return!1;let le=ne(D,d,L[0]);return le!==ne(D,d,L[1])||le!==ne(D,d,L[2])||le!==ne(D,d,L[3])}function Le(D,d,L){let W=d.paint.get(D).value;return W.kind==="constant"?W.value:L.programConfigurations.get(d.id).getMaxValue(D)}function Oe(D){return Math.sqrt(D[0]*D[0]+D[1]*D[1])}function Ke(D,d,L,W,te){if(!d[0]&&!d[1])return D;let le=t.convert(d)._mult(te);L==="viewport"&&le._rotate(-W);let pe=[];for(let me of D)pe.push(me.sub(le));return pe}function yt(D){let d=[];for(let L=0;Lva(lr,er,tr,xr))}(we,le,me,Ce),bt=ze),Mn({queryGeometry:Ve,size:bt,transform:le,unwrappedTileID:me,getElevation:Ce,pitchAlignment:nt,pitchScale:Pe},te)}}class za extends fn{}let Ua;Ci("HeatmapBucket",za,{omit:["layers"]});var Ja={get paint(){return Ua=Ua||new Bs({"heatmap-radius":new Vi(ht.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Vi(ht.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Li(ht.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tu(ht.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Li(ht.paint_heatmap["heatmap-opacity"])})}};function hi(D,{width:d,height:L},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==d*L*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${d*L*W}`)}else te=new Uint8Array(d*L*W);return D.width=d,D.height=L,D.data=te,D}function Ki(D,{width:d,height:L},W){if(d===D.width&&L===D.height)return;let te=hi({},{width:d,height:L},W);Qo(D,te,{x:0,y:0},{x:0,y:0},{width:Math.min(D.width,d),height:Math.min(D.height,L)},W),D.width=d,D.height=L,D.data=te.data}function Qo(D,d,L,W,te,le){if(te.width===0||te.height===0)return d;if(te.width>D.width||te.height>D.height||L.x>D.width-te.width||L.y>D.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>d.width||te.height>d.height||W.x>d.width-te.width||W.y>d.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let pe=D.data,me=d.data;if(pe===me)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{d[D.evaluationKey]=Ce;let we=D.expression.evaluate(d);te.setPixel(pe/4/L,me/4,we)};if(D.clips)for(let pe=0,me=0;pethis.max&&(this.max=Pe),Pe=this.dim+1||L<-1||L>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${d}, y: ${L}, dim: ${this.dim}`);return(L+1)*this.stride+(d+1)}unpack(d,L,W){return d*this.redFactor+L*this.greenFactor+W*this.blueFactor-this.baseShift}pack(d){return Ld(d,this.getUnpackVector())}getPixels(){return new ys({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(d,L,W){if(this.dim!==d.dim)throw new Error("dem dimension mismatch");let te=L*this.dim,le=L*this.dim+this.dim,pe=W*this.dim,me=W*this.dim+this.dim;switch(L){case-1:te=le-1;break;case 1:le=te+1}switch(W){case-1:pe=me-1;break;case 1:me=pe+1}let Ce=-L*this.dim,we=-W*this.dim;for(let ze=pe;ze0)for(let pe=d;pe=d;pe-=W)le=J5(pe/W|0,D[pe],D[pe+1],le);return le&&ip(le,le.next)&&(p0(le),le=le.next),le}function td(D,d){if(!D)return D;d||(d=D);let L,W=D;do if(L=!1,W.steiner||!ip(W,W.next)&&Ou(W.prev,W,W.next)!==0)W=W.next;else{if(p0(W),W=d=W.prev,W===W.next)break;L=!0}while(L||W!==d);return d}function Dd(D,d,L,W,te,le,pe){if(!D)return;!pe&&le&&function(Ce,we,ze,Pe){let nt=Ce;do nt.z===0&&(nt.z=a_(nt.x,nt.y,we,ze,Pe)),nt.prevZ=nt.prev,nt.nextZ=nt.next,nt=nt.next;while(nt!==Ce);nt.prevZ.nextZ=null,nt.prevZ=null,function(Ve){let bt,Et=1;do{let er,tr=Ve;Ve=null;let xr=null;for(bt=0;tr;){bt++;let lr=tr,Mr=0;for(let an=0;an0||Xr>0&&lr;)Mr!==0&&(Xr===0||!lr||tr.z<=lr.z)?(er=tr,tr=tr.nextZ,Mr--):(er=lr,lr=lr.nextZ,Xr--),xr?xr.nextZ=er:Ve=er,er.prevZ=xr,xr=er;tr=lr}xr.nextZ=null,Et*=2}while(bt>1)}(nt)}(D,W,te,le);let me=D;for(;D.prev!==D.next;){let Ce=D.prev,we=D.next;if(le?pI(D,W,te,le):h0(D))d.push(Ce.i,D.i,we.i),p0(D),D=we.next,me=we.next;else if((D=we)===me){pe?pe===1?Dd(D=mI(td(D),d),d,L,W,te,le,2):pe===2&&gI(D,d,L,W,te,le):Dd(td(D),d,L,W,te,le,1);break}}}function h0(D){let d=D.prev,L=D,W=D.next;if(Ou(d,L,W)>=0)return!1;let te=d.x,le=L.x,pe=W.x,me=d.y,Ce=L.y,we=W.y,ze=Math.min(te,le,pe),Pe=Math.min(me,Ce,we),nt=Math.max(te,le,pe),Ve=Math.max(me,Ce,we),bt=W.next;for(;bt!==d;){if(bt.x>=ze&&bt.x<=nt&&bt.y>=Pe&&bt.y<=Ve&&d0(te,me,le,Ce,pe,we,bt.x,bt.y)&&Ou(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function pI(D,d,L,W){let te=D.prev,le=D,pe=D.next;if(Ou(te,le,pe)>=0)return!1;let me=te.x,Ce=le.x,we=pe.x,ze=te.y,Pe=le.y,nt=pe.y,Ve=Math.min(me,Ce,we),bt=Math.min(ze,Pe,nt),Et=Math.max(me,Ce,we),er=Math.max(ze,Pe,nt),tr=a_(Ve,bt,d,L,W),xr=a_(Et,er,d,L,W),lr=D.prevZ,Mr=D.nextZ;for(;lr&&lr.z>=tr&&Mr&&Mr.z<=xr;){if(lr.x>=Ve&&lr.x<=Et&&lr.y>=bt&&lr.y<=er&&lr!==te&&lr!==pe&&d0(me,ze,Ce,Pe,we,nt,lr.x,lr.y)&&Ou(lr.prev,lr,lr.next)>=0||(lr=lr.prevZ,Mr.x>=Ve&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=er&&Mr!==te&&Mr!==pe&&d0(me,ze,Ce,Pe,we,nt,Mr.x,Mr.y)&&Ou(Mr.prev,Mr,Mr.next)>=0))return!1;Mr=Mr.nextZ}for(;lr&&lr.z>=tr;){if(lr.x>=Ve&&lr.x<=Et&&lr.y>=bt&&lr.y<=er&&lr!==te&&lr!==pe&&d0(me,ze,Ce,Pe,we,nt,lr.x,lr.y)&&Ou(lr.prev,lr,lr.next)>=0)return!1;lr=lr.prevZ}for(;Mr&&Mr.z<=xr;){if(Mr.x>=Ve&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=er&&Mr!==te&&Mr!==pe&&d0(me,ze,Ce,Pe,we,nt,Mr.x,Mr.y)&&Ou(Mr.prev,Mr,Mr.next)>=0)return!1;Mr=Mr.nextZ}return!0}function mI(D,d){let L=D;do{let W=L.prev,te=L.next.next;!ip(W,te)&&Z5(W,L,L.next,te)&&v0(W,te)&&v0(te,W)&&(d.push(W.i,L.i,te.i),p0(L),p0(L.next),L=D=te),L=L.next}while(L!==D);return td(L)}function gI(D,d,L,W,te,le){let pe=D;do{let me=pe.next.next;for(;me!==pe.prev;){if(pe.i!==me.i&&wI(pe,me)){let Ce=K5(pe,me);return pe=td(pe,pe.next),Ce=td(Ce,Ce.next),Dd(pe,d,L,W,te,le,0),void Dd(Ce,d,L,W,te,le,0)}me=me.next}pe=pe.next}while(pe!==D)}function yI(D,d){let L=D.x-d.x;return L===0&&(L=D.y-d.y,L===0)&&(L=(D.next.y-D.y)/(D.next.x-D.x)-(d.next.y-d.y)/(d.next.x-d.x)),L}function _I(D,d){let L=function(te,le){let pe=le,me=te.x,Ce=te.y,we,ze=-1/0;if(ip(te,pe))return pe;do{if(ip(te,pe.next))return pe.next;if(Ce<=pe.y&&Ce>=pe.next.y&&pe.next.y!==pe.y){let Et=pe.x+(Ce-pe.y)*(pe.next.x-pe.x)/(pe.next.y-pe.y);if(Et<=me&&Et>ze&&(ze=Et,we=pe.x=pe.x&&pe.x>=nt&&me!==pe.x&&$5(Cewe.x||pe.x===we.x&&bI(we,pe)))&&(we=pe,bt=Et)}pe=pe.next}while(pe!==Pe);return we}(D,d);if(!L)return d;let W=K5(L,D);return td(W,W.next),td(L,L.next)}function bI(D,d){return Ou(D.prev,D,d.prev)<0&&Ou(d.next,D,D.next)<0}function a_(D,d,L,W,te){return(D=1431655765&((D=858993459&((D=252645135&((D=16711935&((D=(D-L)*te|0)|D<<8))|D<<4))|D<<2))|D<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-W)*te|0)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function xI(D){let d=D,L=D;do(d.x=(D-pe)*(le-me)&&(D-pe)*(W-me)>=(L-pe)*(d-me)&&(L-pe)*(le-me)>=(te-pe)*(W-me)}function d0(D,d,L,W,te,le,pe,me){return!(D===pe&&d===me)&&$5(D,d,L,W,te,le,pe,me)}function wI(D,d){return D.next.i!==d.i&&D.prev.i!==d.i&&!function(L,W){let te=L;do{if(te.i!==L.i&&te.next.i!==L.i&&te.i!==W.i&&te.next.i!==W.i&&Z5(te,te.next,L,W))return!0;te=te.next}while(te!==L);return!1}(D,d)&&(v0(D,d)&&v0(d,D)&&function(L,W){let te=L,le=!1,pe=(L.x+W.x)/2,me=(L.y+W.y)/2;do te.y>me!=te.next.y>me&&te.next.y!==te.y&&pe<(te.next.x-te.x)*(me-te.y)/(te.next.y-te.y)+te.x&&(le=!le),te=te.next;while(te!==L);return le}(D,d)&&(Ou(D.prev,D,d.prev)||Ou(D,d.prev,d))||ip(D,d)&&Ou(D.prev,D,D.next)>0&&Ou(d.prev,d,d.next)>0)}function Ou(D,d,L){return(d.y-D.y)*(L.x-d.x)-(d.x-D.x)*(L.y-d.y)}function ip(D,d){return D.x===d.x&&D.y===d.y}function Z5(D,d,L,W){let te=Hm(Ou(D,d,L)),le=Hm(Ou(D,d,W)),pe=Hm(Ou(L,W,D)),me=Hm(Ou(L,W,d));return te!==le&&pe!==me||!(te!==0||!Vm(D,L,d))||!(le!==0||!Vm(D,W,d))||!(pe!==0||!Vm(L,D,W))||!(me!==0||!Vm(L,d,W))}function Vm(D,d,L){return d.x<=Math.max(D.x,L.x)&&d.x>=Math.min(D.x,L.x)&&d.y<=Math.max(D.y,L.y)&&d.y>=Math.min(D.y,L.y)}function Hm(D){return D>0?1:D<0?-1:0}function v0(D,d){return Ou(D.prev,D,D.next)<0?Ou(D,d,D.next)>=0&&Ou(D,D.prev,d)>=0:Ou(D,d,D.prev)<0||Ou(D,D.next,d)<0}function K5(D,d){let L=i_(D.i,D.x,D.y),W=i_(d.i,d.x,d.y),te=D.next,le=d.prev;return D.next=d,d.prev=D,L.next=te,te.prev=L,W.next=L,L.prev=W,le.next=W,W.prev=le,W}function J5(D,d,L,W){let te=i_(D,d,L);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function p0(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function i_(D,d,L){return{i:D,x:d,y:L,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class op{constructor(d,L){if(L>d)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=d,this._minGranularity=L}getGranularityForZoomLevel(d){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||L>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let W=0|Math.round(d),te=0|Math.round(L),le=this._getKey(W,te);if(this._vertexDictionary.has(le))return this._vertexDictionary.get(le);let pe=this._vertexBuffer.length/2;return this._vertexDictionary.set(le,pe),this._vertexBuffer.push(W,te),pe}_subdivideTrianglesScanline(d){if(this._granularity<2)return function(te,le){let pe=[];for(let me=0;me0?(pe.push(Ce),pe.push(ze),pe.push(we)):(pe.push(Ce),pe.push(we),pe.push(ze))}return pe}(this._vertexBuffer,d);let L=[],W=d.length;for(let te=0;te=1||Xr<=0)||tr&&(wele)){Pe>=te&&Pe<=le&&pe.push(W[(me+1)%3]);continue}!tr&&Mr>0&&pe.push(this._vertexToIndex(Ce+bt*Mr,we+Et*Mr));let an=Ce+bt*Math.max(Mr,0),kn=Ce+bt*Math.min(Xr,1);er||this._generateIntraEdgeVertices(pe,Ce,we,ze,Pe,an,kn),!tr&&Xr<1&&pe.push(this._vertexToIndex(Ce+bt*Xr,we+Et*Xr)),(tr||Pe>=te&&Pe<=le)&&pe.push(W[(me+1)%3]),!tr&&(Pe<=te||Pe>=le)&&this._generateInterEdgeVertices(pe,Ce,we,ze,Pe,nt,Ve,kn,te,le)}return pe}_generateIntraEdgeVertices(d,L,W,te,le,pe,me){let Ce=te-L,we=le-W,ze=we===0,Pe=ze?Math.min(L,te):Math.min(pe,me),nt=ze?Math.max(L,te):Math.max(pe,me),Ve=Math.floor(Pe/this._granularityCellSize)+1,bt=Math.ceil(nt/this._granularityCellSize)-1;if(ze?L=Ve;Et--){let er=Et*this._granularityCellSize;d.push(this._vertexToIndex(er,W+we*(er-L)/Ce))}}_generateInterEdgeVertices(d,L,W,te,le,pe,me,Ce,we,ze){let Pe=le-W,nt=pe-te,Ve=me-le,bt=(we-le)/Ve,Et=(ze-le)/Ve,er=Math.min(bt,Et),tr=Math.max(bt,Et),xr=te+nt*er,lr=Math.floor(Math.min(xr,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(xr,Ce)/this._granularityCellSize)-1,Xr=Ce=1||tr<=0){let On=W-me,_a=pe+(L-pe)*Math.min((we-me)/On,(ze-me)/On);lr=Math.floor(Math.min(_a,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(_a,Ce)/this._granularityCellSize)-1,Xr=Ce<_a}let kn=Pe>0?ze:we;if(Xr)for(let On=lr;On<=Mr;On++)d.push(this._vertexToIndex(On*this._granularityCellSize,kn));else for(let On=Mr;On>=lr;On--)d.push(this._vertexToIndex(On*this._granularityCellSize,kn))}_generateOutline(d){let L=[];for(let W of d){let te=hv(W,this._granularity,!0),le=this._pointArrayToIndices(te),pe=[];for(let me=1;mele!=(pe===sp)?(d.push(L),d.push(W),d.push(this._vertexToIndex(te,pe)),d.push(W),d.push(this._vertexToIndex(le,pe)),d.push(this._vertexToIndex(te,pe))):(d.push(W),d.push(L),d.push(this._vertexToIndex(te,pe)),d.push(this._vertexToIndex(le,pe)),d.push(W),d.push(this._vertexToIndex(te,pe)))}_fillPoles(d,L,W){let te=this._vertexBuffer,le=F,pe=d.length;for(let me=2;me80*Pe){er=we[0],tr=we[1];let lr=er,Mr=tr;for(let Xr=Pe;Xrlr&&(lr=an),kn>Mr&&(Mr=kn)}xr=Math.max(lr-er,Mr-tr),xr=xr!==0?32767/xr:0}return Dd(bt,Et,Pe,er,tr,xr,0),Et}(W,te),Ce=this._convertIndices(W,me);le=this._subdivideTrianglesScanline(Ce)}catch(me){console.error(me)}let pe=[];return L&&(pe=this._generateOutline(d)),this._ensureNoPoleVertices(),this._handlePoles(le),{verticesFlattened:this._vertexBuffer,indicesTriangles:le,indicesLineList:pe}}_convertIndices(d,L){let W=[];for(let te of L)W.push(this._vertexToIndex(d[2*te],d[2*te+1]));return W}_pointArrayToIndices(d){let L=[];for(let W of d)L.push(this._vertexToIndex(W.x,W.y));return L}}function Q5(D,d,L,W=!0){return new TI(L,d).subdividePolygonInternal(D,W)}function hv(D,d,L=!1){if(!D||D.length<1)return[];if(D.length<2)return[];let W=D[0],te=D[D.length-1],le=L&&(W.x!==te.x||W.y!==te.y);if(d<2)return le?[...D,D[0]]:[...D];let pe=Math.floor(F/d),me=[];me.push(new t(D[0].x,D[0].y));let Ce=D.length,we=le?Ce:Ce-1;for(let ze=0;ze0?(Math.floor(kn/pe)+1)*pe:(Math.ceil(kn/pe)-1)*pe,Ba=Mr>0?(Math.floor(On/pe)+1)*pe:(Math.ceil(On/pe)-1)*pe,Za=Math.abs(kn-ta),Da=Math.abs(On-Ba),na=Math.abs(kn-Et),li=Math.abs(On-er),xi=tr?Za/Xr:Number.POSITIVE_INFINITY,ui=xr?Da/an:Number.POSITIVE_INFINITY;if((na<=Za||!tr)&&(li<=Da||!xr))break;if(xi=0?pe-1:le-1,we=(me+1)%le,ze=D[2*d[Ce]],Pe=D[2*d[we]],nt=D[2*d[pe]],Ve=D[2*d[pe]+1],bt=D[2*d[me]+1],Et=!1;if(zePe)Et=!1;else{let er=bt-Ve,tr=-(D[2*d[me]]-nt),xr=Ve((Pe-nt)*er+(D[2*d[we]+1]-Ve)*tr)*xr&&(Et=!0)}if(Et){let er=d[Ce],tr=d[pe],xr=d[me];er!==tr&&er!==xr&&tr!==xr&&L.push(xr,tr,er),pe--,pe<0&&(pe=le-1)}else{let er=d[we],tr=d[pe],xr=d[me];er!==tr&&er!==xr&&tr!==xr&&L.push(xr,tr,er),me++,me>=le&&(me=0)}if(Ce===we)break}}function eT(D,d,L,W,te,le,pe,me,Ce){let we=te.length/2,ze=pe&&me&&Ce;if(weXn.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(nt,Ve),lr=xr.count,ta=!0,Ba=!0,Za=!0,Xr=0);let Da=g0(tr,bt,er,xr,kn,ta,Mr),na=g0(tr,bt,er,xr,On,Ba,Mr),li=g0(tr,bt,er,xr,_a,Za,Mr);Ve.emplaceBack(Xr+Da-lr,Xr+na-lr,Xr+li-lr),Mr.primitiveLength++}})(d,L,W,te,le,D),ze&&function(Pe,nt,Ve,bt,Et,er){let tr=[];for(let an=0;anXn.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(nt,Ve),lr=xr.count,ta=!0,Ba=!0,Xr=0);let Za=g0(tr,bt,er,xr,On,ta,Mr),Da=g0(tr,bt,er,xr,_a,Ba,Mr);Ve.emplaceBack(Xr+Za-lr,Xr+Da-lr),Mr.primitiveLength++}}(pe,L,me,te,Ce,D),d.forceNewSegmentOnNextPrepare(),pe?.forceNewSegmentOnNextPrepare()}function g0(D,d,L,W,te,le,pe){if(le){let me=W.count;return L(d[2*te],d[2*te+1]),D[te]=W.count,W.count++,pe.vertexLength++,me}return D[te]}class o_{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new or,this.indexArray=new _n,this.indexArray2=new vn,this.programConfigurations=new Do(d.layers,d.zoom),this.segments=new Xn,this.segments2=new Xn,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=jh("fill",this.layers,L);let te=this.layers[0].layout.get("fill-sort-key"),le=!te.isConstant(),pe=[];for(let{feature:me,id:Ce,index:we,sourceLayerIndex:ze}of d){let Pe=this.layers[0]._featureFilter.needGeometry,nt=Co(me,Pe);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),nt,W))continue;let Ve=le?te.evaluate(nt,{},W,L.availableImages):void 0,bt={id:Ce,properties:me.properties,type:me.type,sourceLayerIndex:ze,index:we,geometry:Pe?nt.geometry:Hl(me),patterns:{},sortKey:Ve};pe.push(bt)}le&&pe.sort((me,Ce)=>me.sortKey-Ce.sortKey);for(let me of pe){let{geometry:Ce,index:we,sourceLayerIndex:ze}=me;if(this.hasDependencies){let Pe=np("fill",this.layers,me,{zoom:this.zoom},L);this.patternFeatures.push(Pe)}else this.addFeature(me,Ce,we,W,{},L.subdivisionGranularity);L.featureIndex.insert(d[we].feature,Ce,we,ze,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}addFeatures(d,L,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,L,W,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,rp),this.indexBuffer=d.createIndexBuffer(this.indexArray),this.indexBuffer2=d.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(d,L,W,te,le,pe){for(let me of Rc(L,500)){let Ce=Q5(me,te,pe.fill.getGranularityForZoomLevel(te.z)),we=this.layoutVertexArray;eT((ze,Pe)=>{we.emplaceBack(ze,Pe)},this.segments,this.layoutVertexArray,this.indexArray,Ce.verticesFlattened,Ce.indicesTriangles,this.segments2,this.indexArray2,Ce.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:le,canonical:te})}}let tT,rT;Ci("FillBucket",o_,{omit:["layers","patternFeatures"]});var MI={get paint(){return rT=rT||new Bs({"fill-antialias":new Li(ht.paint_fill["fill-antialias"]),"fill-opacity":new Vi(ht.paint_fill["fill-opacity"]),"fill-color":new Vi(ht.paint_fill["fill-color"]),"fill-outline-color":new Vi(ht.paint_fill["fill-outline-color"]),"fill-translate":new Li(ht.paint_fill["fill-translate"]),"fill-translate-anchor":new Li(ht.paint_fill["fill-translate-anchor"]),"fill-pattern":new fl(ht.paint_fill["fill-pattern"])})},get layout(){return tT=tT||new Bs({"fill-sort-key":new Vi(ht.layout_fill["fill-sort-key"])})}};class SI extends hl{constructor(d,L){super(d,MI,L)}recalculate(d,L){super.recalculate(d,L);let W=this.paint._values["fill-outline-color"];W.value.kind==="constant"&&W.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new o_(d)}queryRadius(){return Oe(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:d,geometry:L,transform:W,pixelsToTileUnits:te}){return ao(Ke(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-W.bearingInRadians,te),L)}isTileClipped(){return!0}}let EI=ut([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),kI=ut([{name:"a_centroid",components:2,type:"Int16"}],4),{members:CI}=EI;class y0{constructor(d,L,W,te,le){this.properties={},this.extent=W,this.type=0,this.id=void 0,this._pbf=d,this._geometry=-1,this._keys=te,this._values=le,d.readFields(LI,this,L)}loadGeometry(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=[],te,le=1,pe=0,me=0,Ce=0;for(;d.pos>3}if(pe--,le===1||le===2)me+=d.readSVarint(),Ce+=d.readSVarint(),le===1&&(te&&W.push(te),te=[]),te&&te.push(new t(me,Ce));else{if(le!==7)throw new Error(`unknown command ${le}`);te&&te.push(te[0].clone())}}return te&&W.push(te),W}bbox(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=1,te=0,le=0,pe=0,me=1/0,Ce=-1/0,we=1/0,ze=-1/0;for(;d.pos>3}if(te--,W===1||W===2)le+=d.readSVarint(),pe+=d.readSVarint(),leCe&&(Ce=le),peze&&(ze=pe);else if(W!==7)throw new Error(`unknown command ${W}`)}return[me,we,Ce,ze]}toGeoJSON(d,L,W){let te=this.extent*Math.pow(2,W),le=this.extent*d,pe=this.extent*L,me=this.loadGeometry();function Ce(nt){return[360*(nt.x+le)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(nt.y+pe)/te)*Math.PI))-90]}function we(nt){return nt.map(Ce)}let ze;if(this.type===1){let nt=[];for(let bt of me)nt.push(bt[0]);let Ve=we(nt);ze=nt.length===1?{type:"Point",coordinates:Ve[0]}:{type:"MultiPoint",coordinates:Ve}}else if(this.type===2){let nt=me.map(we);ze=nt.length===1?{type:"LineString",coordinates:nt[0]}:{type:"MultiLineString",coordinates:nt}}else{if(this.type!==3)throw new Error("unknown feature type");{let nt=nT(me),Ve=[];for(let bt of nt)Ve.push(bt.map(we));ze=Ve.length===1?{type:"Polygon",coordinates:Ve[0]}:{type:"MultiPolygon",coordinates:Ve}}}let Pe={type:"Feature",geometry:ze,properties:this.properties};return this.id!=null&&(Pe.id=this.id),Pe}}function LI(D,d,L){D===1?d.id=L.readVarint():D===2?function(W,te){let le=W.readVarint()+W.pos;for(;W.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];let L=this._pbf.readVarint()+this._pbf.pos;return new y0(this._pbf,L,this.extent,this._keys,this._values)}}function II(D,d,L){D===15?d.version=L.readVarint():D===1?d.name=L.readString():D===5?d.extent=L.readVarint():D===2?d._features.push(L.pos):D===3?d._keys.push(L.readString()):D===4&&d._values.push(function(W){let te=null,le=W.readVarint()+W.pos;for(;W.pos>3;te=pe===1?W.readString():pe===2?W.readFloat():pe===3?W.readDouble():pe===4?W.readVarint64():pe===5?W.readVarint():pe===6?W.readSVarint():pe===7?W.readBoolean():null}if(te==null)throw new Error("unknown feature value");return te}(L))}class aT{constructor(d,L){this.layers=d.readFields(RI,{},L)}}function RI(D,d,L){if(D===3){let W=new DI(L,L.readVarint()+L.pos);W.length&&(d[W.name]=W)}}let s_=Math.pow(2,13);function _0(D,d,L,W,te,le,pe,me){D.emplaceBack(d,L,2*Math.floor(W*s_)+pe,te*s_*2,le*s_*2,Math.round(me))}class l_{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new vr,this.centroidVertexArray=new Rt,this.indexArray=new _n,this.programConfigurations=new Do(d.layers,d.zoom),this.segments=new Xn,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.features=[],this.hasDependencies=jh("fill-extrusion",this.layers,L);for(let{feature:te,id:le,index:pe,sourceLayerIndex:me}of d){let Ce=this.layers[0]._featureFilter.needGeometry,we=Co(te,Ce);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),we,W))continue;let ze={id:le,sourceLayerIndex:me,index:pe,geometry:Ce?we.geometry:Hl(te),properties:te.properties,type:te.type,patterns:{}};this.hasDependencies?this.features.push(np("fill-extrusion",this.layers,ze,{zoom:this.zoom},L)):this.addFeature(ze,ze.geometry,pe,W,{},L.subdivisionGranularity),L.featureIndex.insert(te,ze.geometry,pe,me,this.index,!0)}}addFeatures(d,L,W){for(let te of this.features){let{geometry:le}=te;this.addFeature(te,le,te.index,L,W,d.subdivisionGranularity)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,CI),this.centroidVertexBuffer=d.createVertexBuffer(this.centroidVertexArray,kI.members,!0),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(d,L,W,te,le,pe){for(let me of Rc(L,500)){let Ce={x:0,y:0,sampleCount:0},we=this.layoutVertexArray.length;this.processPolygon(Ce,te,d,me,pe);let ze=this.layoutVertexArray.length-we,Pe=Math.floor(Ce.x/Ce.sampleCount),nt=Math.floor(Ce.y/Ce.sampleCount);for(let Ve=0;Ve{_0(ze,Pe,nt,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,we.verticesFlattened,we.indicesTriangles)}_generateSideFaces(d,L){let W=0;for(let te=1;teXn.MAX_VERTEX_ARRAY_LENGTH&&(L.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let me=le.sub(pe)._perp()._unit(),Ce=pe.dist(le);W+Ce>32768&&(W=0),_0(this.layoutVertexArray,le.x,le.y,me.x,me.y,0,0,W),_0(this.layoutVertexArray,le.x,le.y,me.x,me.y,0,1,W),W+=Ce,_0(this.layoutVertexArray,pe.x,pe.y,me.x,me.y,0,0,W),_0(this.layoutVertexArray,pe.x,pe.y,me.x,me.y,0,1,W);let we=L.segment.vertexLength;this.indexArray.emplaceBack(we,we+2,we+1),this.indexArray.emplaceBack(we+1,we+2,we+3),L.segment.vertexLength+=4,L.segment.primitiveLength+=2}}}function FI(D,d){for(let L=0;LF)||D.y===d.y&&(D.y<0||D.y>F)}function iT(D){return D.every(d=>d.x<0)||D.every(d=>d.x>F)||D.every(d=>d.y<0)||D.every(d=>d.y>F)}let oT;Ci("FillExtrusionBucket",l_,{omit:["layers","features"]});var BI={get paint(){return oT=oT||new Bs({"fill-extrusion-opacity":new Li(ht["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Vi(ht["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Li(ht["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Li(ht["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fl(ht["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Vi(ht["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Vi(ht["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Li(ht["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class NI extends hl{constructor(d,L){super(d,BI,L)}createBucket(d){return new l_(d)}queryRadius(){return Oe(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:le,pixelsToTileUnits:pe,pixelPosMatrix:me}){let Ce=Ke(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-le.bearingInRadians,pe),we=this.paint.get("fill-extrusion-height").evaluate(L,W),ze=this.paint.get("fill-extrusion-base").evaluate(L,W),Pe=function(Ve,bt){let Et=[];for(let er of Ve){let tr=[er.x,er.y,0,1];z(tr,tr,bt),Et.push(new t(tr[0]/tr[3],tr[1]/tr[3]))}return Et}(Ce,me),nt=function(Ve,bt,Et,er){let tr=[],xr=[],lr=er[8]*bt,Mr=er[9]*bt,Xr=er[10]*bt,an=er[11]*bt,kn=er[8]*Et,On=er[9]*Et,_a=er[10]*Et,ta=er[11]*Et;for(let Ba of Ve){let Za=[],Da=[];for(let na of Ba){let li=na.x,xi=na.y,ui=er[0]*li+er[4]*xi+er[12],Ai=er[1]*li+er[5]*xi+er[13],Lo=er[2]*li+er[6]*xi+er[14],bs=er[3]*li+er[7]*xi+er[15],js=Lo+Xr,tl=bs+an,sf=ui+kn,vu=Ai+On,sc=Lo+_a,Ac=bs+ta,Yl=new t((ui+lr)/tl,(Ai+Mr)/tl);Yl.z=js/tl,Za.push(Yl);let Vc=new t(sf/Ac,vu/Ac);Vc.z=sc/Ac,Da.push(Vc)}tr.push(Za),xr.push(Da)}return[tr,xr]}(te,ze,we,me);return function(Ve,bt,Et){let er=1/0;ao(Et,bt)&&(er=sT(Et,bt[0]));for(let tr=0;tr>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let le=lT[15&W];if(!le)throw new Error("Unrecognized array type.");let[pe]=new Uint16Array(d,2,1),[me]=new Uint32Array(d,4,1);return new Wm(me,pe,le,d)}constructor(d,L=64,W=Float64Array,te){if(isNaN(d)||d<0)throw new Error(`Unpexpected numItems value: ${d}.`);this.numItems=+d,this.nodeSize=Math.min(Math.max(+L,2),65535),this.ArrayType=W,this.IndexArrayType=d<65536?Uint16Array:Uint32Array;let le=lT.indexOf(this.ArrayType),pe=2*d*this.ArrayType.BYTES_PER_ELEMENT,me=d*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-me%8)%8;if(le<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+me+Ce,2*d),this._pos=2*d,this._finished=!0):(this.data=new ArrayBuffer(8+pe+me+Ce),this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+me+Ce,2*d),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+le]),new Uint16Array(this.data,2,1)[0]=L,new Uint32Array(this.data,4,1)[0]=d)}add(d,L){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=d,this.coords[this._pos++]=L,W}finish(){let d=this._pos>>1;if(d!==this.numItems)throw new Error(`Added ${d} items when expected ${this.numItems}.`);return u_(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(d,L,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:le,coords:pe,nodeSize:me}=this,Ce=[0,le.length-1,0],we=[];for(;Ce.length;){let ze=Ce.pop()||0,Pe=Ce.pop()||0,nt=Ce.pop()||0;if(Pe-nt<=me){for(let er=nt;er<=Pe;er++){let tr=pe[2*er],xr=pe[2*er+1];tr>=d&&tr<=W&&xr>=L&&xr<=te&&we.push(le[er])}continue}let Ve=nt+Pe>>1,bt=pe[2*Ve],Et=pe[2*Ve+1];bt>=d&&bt<=W&&Et>=L&&Et<=te&&we.push(le[Ve]),(ze===0?d<=bt:L<=Et)&&(Ce.push(nt),Ce.push(Ve-1),Ce.push(1-ze)),(ze===0?W>=bt:te>=Et)&&(Ce.push(Ve+1),Ce.push(Pe),Ce.push(1-ze))}return we}within(d,L,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:le,nodeSize:pe}=this,me=[0,te.length-1,0],Ce=[],we=W*W;for(;me.length;){let ze=me.pop()||0,Pe=me.pop()||0,nt=me.pop()||0;if(Pe-nt<=pe){for(let er=nt;er<=Pe;er++)cT(le[2*er],le[2*er+1],d,L)<=we&&Ce.push(te[er]);continue}let Ve=nt+Pe>>1,bt=le[2*Ve],Et=le[2*Ve+1];cT(bt,Et,d,L)<=we&&Ce.push(te[Ve]),(ze===0?d-W<=bt:L-W<=Et)&&(me.push(nt),me.push(Ve-1),me.push(1-ze)),(ze===0?d+W>=bt:L+W>=Et)&&(me.push(Ve+1),me.push(Pe),me.push(1-ze))}return Ce}}function u_(D,d,L,W,te,le){if(te-W<=L)return;let pe=W+te>>1;uT(D,d,pe,W,te,le),u_(D,d,L,W,pe-1,1-le),u_(D,d,L,pe+1,te,1-le)}function uT(D,d,L,W,te,le){for(;te>W;){if(te-W>600){let we=te-W+1,ze=L-W+1,Pe=Math.log(we),nt=.5*Math.exp(2*Pe/3),Ve=.5*Math.sqrt(Pe*nt*(we-nt)/we)*(ze-we/2<0?-1:1);uT(D,d,L,Math.max(W,Math.floor(L-ze*nt/we+Ve)),Math.min(te,Math.floor(L+(we-ze)*nt/we+Ve)),le)}let pe=d[2*L+le],me=W,Ce=te;for(x0(D,d,W,L),d[2*te+le]>pe&&x0(D,d,W,te);mepe;)Ce--}d[2*W+le]===pe?x0(D,d,W,Ce):(Ce++,x0(D,d,Ce,te)),Ce<=L&&(W=Ce+1),L<=Ce&&(te=Ce-1)}}function x0(D,d,L,W){c_(D,L,W),c_(d,2*L,2*W),c_(d,2*L+1,2*W+1)}function c_(D,d,L){let W=D[d];D[d]=D[L],D[L]=W}function cT(D,d,L,W){let te=D-L,le=d-W;return te*te+le*le}function f_(D,d,L,W){let te=W,le=d+(L-d>>1),pe,me=L-d,Ce=D[d],we=D[d+1],ze=D[L],Pe=D[L+1];for(let nt=d+3;ntte)pe=nt,te=Ve;else if(Ve===te){let bt=Math.abs(nt-le);btW&&(pe-d>3&&f_(D,d,pe,W),D[pe+2]=te,L-pe>3&&f_(D,pe,L,W))}function OI(D,d,L,W,te,le){let pe=te-L,me=le-W;if(pe!==0||me!==0){let Ce=((D-L)*pe+(d-W)*me)/(pe*pe+me*me);Ce>1?(L=te,W=le):Ce>0&&(L+=pe*Ce,W+=me*Ce)}return pe=D-L,me=d-W,pe*pe+me*me}function qc(D,d,L,W){let te={type:d,geom:L},le={id:D??null,type:te.type,geometry:te.geom,tags:W,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(te.type){case"Point":case"MultiPoint":w0(le,te.geom);break;case"LineString":w0(le,te.geom.points);break;case"Polygon":w0(le,te.geom[0].points);break;case"MultiLineString":for(let pe of te.geom)w0(le,pe.points);break;case"MultiPolygon":for(let pe of te.geom)w0(le,pe[0].points)}return le}function h_(D){D.points.length>64&&(D.points=new Float64Array(D.points))}function w0(D,d){for(let L=0;L0&&(pe+=W?(te*ze-we*le)/2:Math.sqrt(Math.pow(we-te,2)+Math.pow(ze-le,2))),te=we,le=ze}let me=d.points.length-3;d.points[2]=1,L>0&&f_(d.points,0,me,L),d.points[me+2]=1,h_(d),d.size=Math.abs(pe),d.start=0,d.end=d.size}function p_(D,d,L,W){for(let te=0;te1?1:L}function Xm(D){let d={type:"Feature",geometry:jI(D),properties:D.tags};return D.id!=null&&(d.id=D.id),d}function jI(D){let{type:d,geometry:L}=D;switch(d){case"Point":return{type:d,coordinates:fT(L[0],L[1])};case"MultiPoint":return{type:d,coordinates:$m(L)};case"LineString":return{type:d,coordinates:$m(L.points)};case"MultiLineString":case"Polygon":return{type:d,coordinates:L.map(W=>$m(W.points))};case"MultiPolygon":return{type:d,coordinates:L.map(W=>W.map(te=>$m(te.points)))}}}function $m(D){let d=[];for(let L=0;L=(L/=d)&&pe=W)return null;let Ce=[];for(let we of D){let ze=te===_f.X?we.minX:we.minY,Pe=te===_f.X?we.maxX:we.maxY;if(ze>=L&&Pe=W))switch(we.type){case"Point":case"MultiPoint":UI(we,Ce,L,W,te);continue;case"LineString":qI(we,Ce,L,W,te,me);continue;case"MultiLineString":VI(we,Ce,L,W,te);continue;case"Polygon":HI(we,Ce,L,W,te);continue;case"MultiPolygon":GI(we,Ce,L,W,te);continue}}return Ce.length?Ce:null}function UI(D,d,L,W,te){let le=[];(function(pe,me,Ce,we,ze){for(let Pe=0;Pe=Ce&&nt<=we&&cp(me,pe[Pe],pe[Pe+1],pe[Pe+2])}})(D.geometry,le,L,W,te),le.length&&d.push(qc(D.id,le.length===3?"Point":"MultiPoint",le,D.tags))}function qI(D,d,L,W,te,le){let pe=[];if(vT(D.geometry,pe,L,W,te,!1,le.lineMetrics),pe.length)if(le.lineMetrics)for(let me of pe)d.push(qc(D.id,"LineString",me,D.tags));else d.push(pe.length>1?qc(D.id,"MultiLineString",pe,D.tags):qc(D.id,"LineString",pe[0],D.tags))}function VI(D,d,L,W,te){let le=[];m_(D.geometry,le,L,W,te,!1),le.length&&d.push(le.length!==1?qc(D.id,"MultiLineString",le,D.tags):qc(D.id,"LineString",le[0],D.tags))}function HI(D,d,L,W,te){let le=[];m_(D.geometry,le,L,W,te,!0),le.length&&d.push(qc(D.id,"Polygon",le,D.tags))}function GI(D,d,L,W,te){let le=[];for(let pe of D.geometry){let me=[];m_(pe,me,L,W,te,!0),me.length&&le.push(me)}le.length&&d.push(qc(D.id,"MultiPolygon",le,D.tags))}function vT(D,d,L,W,te,le,pe){let me=pT(D),Ce=te===_f.X?WI:YI,we,ze,Pe=D.start;for(let er=0;erL&&(ze=Ce(me,tr,xr,Mr,Xr,L),pe&&(me.start=Pe+we*ze)):an>W?kn=L&&(ze=Ce(me,tr,xr,Mr,Xr,L),On=!0),kn>W&&an<=W&&(ze=Ce(me,tr,xr,Mr,Xr,W),On=!0),!le&&On&&(pe&&(me.end=Pe+we*ze),d.push(me),me=pT(D)),pe&&(Pe+=we)}let nt=D.points.length-3,Ve=D.points[nt],bt=D.points[nt+1],Et=te===_f.X?Ve:bt;Et>=L&&Et<=W&&cp(me.points,Ve,bt,D.points[nt+2]),nt=me.points.length-3,le&&nt>=3&&(me.points[nt]!==me.points[0]||me.points[nt+1]!==me.points[1])&&cp(me.points,me.points[0],me.points[1],me.points[2]),me.points.length&&(h_(me),d.push(me))}function pT(D){return{points:[],size:D.size,start:D.start,end:D.end}}function m_(D,d,L,W,te,le){for(let pe of D)vT(pe,d,L,W,te,le,!1)}function cp(D,d,L,W){D.push(d,L,W)}function WI(D,d,L,W,te,le){let pe=(le-d)/(W-d);return cp(D.points,le,L+(te-L)*pe,1),pe}function YI(D,d,L,W,te,le){let pe=(le-L)/(te-L);return cp(D.points,d+(W-d)*pe,le,1),pe}function g_(D,d){let L=d.buffer/d.extent,W=D,te=rd(D,1,-1-L,L,_f.X,-1,2,d),le=rd(D,1,1-L,2+L,_f.X,-1,2,d);return(te||le)&&(W=rd(D,1,-L,1+L,_f.X,-1,2,d)||[],te&&(W=mT(te,1).concat(W)),le&&(W=W.concat(mT(le,-1)))),W}function mT(D,d){let L=[];for(let W of D)switch(W.type){case"Point":case"MultiPoint":{let te=XI(W.geometry,d);L.push(qc(W.id,W.type,te,W.tags));continue}case"LineString":{let te=y_(W.geometry,d);L.push(qc(W.id,W.type,te,W.tags));continue}case"MultiLineString":case"Polygon":{let te=[];for(let le of W.geometry)te.push(y_(le,d));L.push(qc(W.id,W.type,te,W.tags));continue}case"MultiPolygon":{let te=[];for(let le of W.geometry){let pe=[];for(let me of le)pe.push(y_(me,d));te.push(pe)}L.push(qc(W.id,W.type,te,W.tags));continue}}return L}function XI(D,d){let L=[];for(let W=0;W0||((te=d.addOrUpdateProperties)==null?void 0:te.length)>0;if(le){let me=D[0],Ce=d_({type:"FeatureCollection",features:[{type:"Feature",id:me.id,geometry:d.newGeometry,properties:pe?gT(me.tags,d):me.tags}]},L);return Ce=g_(Ce,L),Ce}if(pe){let me=[];for(let Ce of D){let we=Nr({},Ce);we.tags=gT(we.tags,d),me.push(we)}return me}return D}function gT(D,d){if(d.removeAllProperties)return{};let L=Nr({},D||{});if(d.removeProperties)for(let W of d.removeProperties)delete L[W];if(d.addOrUpdateProperties)for(let{key:W,value:te}of d.addOrUpdateProperties)L[W]=te;return L}(function(D){D[D.X=0]="X",D[D.Y=1]="Y"})(_f||(_f={}));let __={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:D=>D};class ZI{constructor(d){this.options=Object.assign(Object.create(__),d),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(d){let L=[];for(let W of d){if(!W.geometry)continue;let[te,le]=W.geometry.coordinates,[pe,me]=[lp(te),up(le)];L.push({id:W.id,type:"Point",geometry:[pe,me],tags:W.properties})}this.createIndex(L)}initialize(d){let L=[];for(let W of d)W.type==="Point"&&L.push(W);this.createIndex(L)}updateIndex(d,L,W){this.options=Object.assign(Object.create(__),W.clusterOptions),this.initialize(d)}createIndex(d){let{log:L,minZoom:W,maxZoom:te}=this.options;L&&console.time("total time");let le=`prepare ${d.length} points`;L&&console.time(le),this.points=d;let pe=[];for(let Ce=0;Ce=W;Ce--){let we=Date.now();me=this.trees[Ce]=this.createTree(this.cluster(me,Ce)),L&&console.log("z%d: %d clusters in %dms",Ce,me.numItems,Date.now()-we)}L&&console.timeEnd("total time")}getClusters(d,L){return this.getClustersInternal(d,L).map(W=>Xm(W))}getClustersInternal(d,L){let W=((d[0]+180)%360+360)%360-180,te=Math.max(-90,Math.min(90,d[1])),le=d[2]===180?180:((d[2]+180)%360+360)%360-180,pe=Math.max(-90,Math.min(90,d[3]));if(d[2]-d[0]>=360)W=-180,le=180;else if(W>le){let Pe=this.getClustersInternal([W,te,180,pe],L),nt=this.getClustersInternal([-180,te,le,pe],L);return Pe.concat(nt)}let me=this.trees[this.limitZoom(L)],Ce=me.range(lp(W),up(pe),lp(le),up(te)),we=me.flatData,ze=[];for(let Pe of Ce){let nt=this.stride*Pe;ze.push(we[nt+5]>1?KI(we,nt,this.clusterProps):this.points[we[nt+3]])}return ze}getChildren(d){let L=this.getOriginId(d),W=this.getOriginZoom(d),te=new Error("No cluster with the specified id: "+d),le=this.trees[W];if(!le)throw te;let pe=le.flatData;if(L*this.stride>=pe.length)throw te;let me=this.options.radius/(this.options.extent*Math.pow(2,W-1)),Ce=le.within(pe[L*this.stride],pe[L*this.stride+1],me),we=[];for(let ze of Ce){let Pe=ze*this.stride;pe[Pe+4]===d&&we.push(pe[Pe+5]>1?JI(pe,Pe,this.clusterProps):Xm(this.points[pe[Pe+3]]))}if(we.length===0)throw te;return we}getLeaves(d,L,W){let te=[];return this.appendLeaves(te,d,L=L||10,W=W||0,0),te}getTile(d,L,W){let te=this.trees[this.limitZoom(d)];if(!te)return null;let le=Math.pow(2,d),{extent:pe,radius:me}=this.options,Ce=me/pe,we=(W-Ce)/le,ze=(W+1+Ce)/le,Pe={transformed:!0,features:[],source:null,x:L,y:W,z:d};return this.addTileFeatures(te.range((L-Ce)/le,we,(L+1+Ce)/le,ze),te.flatData,L,W,le,Pe),L===0&&this.addTileFeatures(te.range(1-Ce/le,we,1,ze),te.flatData,le,W,le,Pe),L===le-1&&this.addTileFeatures(te.range(0,we,Ce/le,ze),te.flatData,-1,W,le,Pe),Pe}getClusterExpansionZoom(d){return this.getOriginZoom(d)}appendLeaves(d,L,W,te,le){let pe=this.getChildren(L);for(let me of pe){let Ce=me.properties;if(Ce?.cluster?le+Ce.point_count<=te?le+=Ce.point_count:le=this.appendLeaves(d,Ce.cluster_id,W,te,le):le1,ze,Pe,nt;if(we)ze=b_(L,Ce,this.clusterProps),Pe=L[Ce],nt=L[Ce+1];else{let Et=this.points[L[Ce+3]];ze=Et.tags,[Pe,nt]=Et.geometry}let Ve={type:1,geometry:[[Math.round(this.options.extent*(Pe*le-W)),Math.round(this.options.extent*(nt*le-te))]],tags:ze},bt;bt=we||this.options.generateId?L[Ce+3]:this.points[L[Ce+3]].id,bt!==void 0&&(Ve.id=bt),pe.features.push(Ve)}}limitZoom(d){return Math.max(this.options.minZoom,Math.min(Math.floor(+d),this.options.maxZoom+1))}cluster(d,L){let{radius:W,extent:te,reduce:le,minPoints:pe}=this.options,me=W/(te*Math.pow(2,L)),Ce=d.flatData,we=[],ze=this.stride;for(let Pe=0;PeL&&(er+=Ce[xr+5])}if(er>Et&&er>=pe){let tr,xr=nt*Et,lr=Ve*Et,Mr=-1,Xr=(Pe/ze<<5)+(L+1)+this.points.length;for(let an of bt){let kn=an*ze;if(Ce[kn+2]<=L)continue;Ce[kn+2]=L;let On=Ce[kn+5];xr+=Ce[kn]*On,lr+=Ce[kn+1]*On,Ce[kn+4]=Xr,le&&(tr||(tr=this.map(Ce,Pe,!0),Mr=this.clusterProps.length,this.clusterProps.push(tr)),le(tr,this.map(Ce,kn)))}Ce[Pe+4]=Xr,we.push(xr/er,lr/er,1/0,Xr,-1,er),le&&we.push(Mr)}else{for(let tr=0;tr1)for(let tr of bt){let xr=tr*ze;if(!(Ce[xr+2]<=L)){Ce[xr+2]=L;for(let lr=0;lr>5}getOriginZoom(d){return(d-this.points.length)%32}map(d,L,W){if(d[L+5]>1){let pe=this.clusterProps[d[L+6]];return W?Object.assign({},pe):pe}let te=this.points[d[L+3]].tags,le=this.options.map(te);return W&&le===te?Object.assign({},le):le}}function KI(D,d,L){return{id:D[d+3],type:"Point",tags:b_(D,d,L),geometry:[D[d],D[d+1]]}}function JI(D,d,L){return{type:"Feature",id:D[d+3],properties:b_(D,d,L),geometry:{type:"Point",coordinates:[hT(D[d]),dT(D[d+1])]}}}function b_(D,d,L){let W=D[d+5],te=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W,le=D[d+6],pe=le===-1?{}:Object.assign({},L[le]);return Object.assign(pe,{cluster:!0,cluster_id:D[d+3],point_count:W,point_count_abbreviated:te})}let x_="geojsonvt_clip_start",w_="geojsonvt_clip_end";function yT(D,d,L,W,te){let le=d===te.maxZoom?0:te.tolerance/((1<0&&d.size<(te?pe:W))return void(L.numPoints+=d.points.length/3);let me=[];for(let Ce=0;Cepe)&&(L.numSimplified++,me.push(d.points[Ce],d.points[Ce+1])),L.numPoints++;te&&function(Ce,we){let ze=0;for(let Pe=0,nt=Ce.length,Ve=nt-2;Pe0===we)for(let Pe=0,nt=Ce.length;Pe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(L),W.debug>1&&console.timeEnd("invalidating");let[te,le,pe]=[0,0,0],me=yT(d,te,le,pe,W);me.source=d;let Ce=Zm(te,le,pe);if(this.tiles[Ce]=me,this.tileCoords.push({z:te,x:le,y:pe,id:Ce}),W.debug){let we=`z${te}`;this.stats[we]=(this.stats[we]||0)+1,this.total++}}getClusterExpansionZoom(d){return null}getChildren(d){return null}getLeaves(d,L,W){return null}getTile(d,L,W){let{extent:te,debug:le}=this.options,pe=1<1&&console.log("drilling down to z%d-%d-%d",d,L,W);let Ce,we=d,ze=L,Pe=W;for(;!Ce&&we>0;)we--,ze>>=1,Pe>>=1,Ce=this.tiles[Zm(we,ze,Pe)];return Ce?.source?(le>1&&(console.log("found parent tile z%d-%d-%d",we,ze,Pe),console.time("drilling down")),this.splitTile(Ce.source,we,ze,Pe,d,L,W),le>1&&console.timeEnd("drilling down"),this.tiles[me]?_T(this.tiles[me],te):null):null}splitTile(d,L,W,te,le,pe,me){let Ce=[d,L,W,te],we=this.options,ze=we.debug;for(;Ce.length;){te=Ce.pop(),W=Ce.pop(),L=Ce.pop(),d=Ce.pop();let Pe=1<1&&console.time("creation"),Ve=this.tiles[nt]=yT(d,L,W,te,we),this.tileCoords.push({z:L,x:W,y:te,id:nt}),ze)){ze>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,W,te,Ve.numFeatures,Ve.numPoints,Ve.numSimplified),console.timeEnd("creation"));let On=`z${L}`;this.stats[On]=(this.stats[On]||0)+1,this.total++}if(Ve.source=d,le==null){if(L===we.indexMaxZoom||Ve.numPoints<=we.indexMaxPoints)continue}else{if(L===we.maxZoom||L===le)continue;if(le!=null){let On=le-L;if(W!==pe>>On||te!==me>>On)continue}}if(Ve.source=null,!d.length)continue;ze>1&&console.time("clipping");let bt=.5*we.buffer/we.extent,Et=.5-bt,er=.5+bt,tr=1+bt,xr=null,lr=null,Mr=null,Xr=null,an=rd(d,Pe,W-bt,W+er,_f.X,Ve.minX,Ve.maxX,we),kn=rd(d,Pe,W+Et,W+tr,_f.X,Ve.minX,Ve.maxX,we);an&&(xr=rd(an,Pe,te-bt,te+er,_f.Y,Ve.minY,Ve.maxY,we),lr=rd(an,Pe,te+Et,te+tr,_f.Y,Ve.minY,Ve.maxY,we)),kn&&(Mr=rd(kn,Pe,te-bt,te+er,_f.Y,Ve.minY,Ve.maxY,we),Xr=rd(kn,Pe,te+Et,te+tr,_f.Y,Ve.minY,Ve.maxY,we)),ze>1&&console.timeEnd("clipping"),Ce.push(xr||[],L+1,2*W,2*te),Ce.push(lr||[],L+1,2*W,2*te+1),Ce.push(Mr||[],L+1,2*W+1,2*te),Ce.push(Xr||[],L+1,2*W+1,2*te+1)}}invalidateTiles(d){if(!d.length)return;let L=this.options,{debug:W}=L,te=1/0,le=-1/0,pe=1/0,me=-1/0;for(let ze of d)te=Math.min(te,ze.minX),le=Math.max(le,ze.maxX),pe=Math.min(pe,ze.minY),me=Math.max(me,ze.maxY);let Ce=L.buffer/L.extent,we=new Set;for(let ze in this.tiles){let Pe=this.tiles[ze],nt=1<=bt||me=er)continue;let tr=!1;for(let xr of d)if(xr.maxX>=Ve&&xr.minX=Et&&xr.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Pe.z,Pe.x,Pe.y,Pe.numFeatures,Pe.numPoints,Pe.numSimplified);let xr=`z${Pe.z}`;this.stats[xr]=(this.stats[xr]||0)-1,this.total--}delete this.tiles[ze],we.add(ze)}}we.size&&(this.tileCoords=this.tileCoords.filter(ze=>!we.has(ze.id)))}}function Zm(D,d,L){return 32*((1<L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let L of this.layers)this.gradients[L.id]={};this.layoutVertexArray=new Ar,this.layoutVertexArray2=new dr,this.indexArray=new _n,this.programConfigurations=new Do(d.layers,d.zoom),this.segments=new Xn,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=jh("line",this.layers,L)||this.hasLineDasharray(this.layers);let te=this.layers[0].layout.get("line-sort-key"),le=!te.isConstant(),pe=[];for(let{feature:me,id:Ce,index:we,sourceLayerIndex:ze}of d){let Pe=this.layers[0]._featureFilter.needGeometry,nt=Co(me,Pe);if(!this.layers[0]._featureFilter.filter(new Ti(this.zoom),nt,W))continue;let Ve=le?te.evaluate(nt,{},W):void 0,bt={id:Ce,properties:me.properties,type:me.type,sourceLayerIndex:ze,index:we,geometry:Pe?nt.geometry:Hl(me),patterns:{},dashes:{},sortKey:Ve};pe.push(bt)}le&&pe.sort((me,Ce)=>me.sortKey-Ce.sortKey);for(let me of pe){let{geometry:Ce,index:we,sourceLayerIndex:ze}=me;this.hasDependencies?(jh("line",this.layers,L)?np("line",this.layers,me,{zoom:this.zoom},L):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,me,this.zoom,L),this.patternFeatures.push(me)):this.addFeature(me,Ce,we,W,{},{},L.subdivisionGranularity),L.featureIndex.insert(d[we].feature,Ce,we,ze,this.index)}}update(d,L,W,te){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W,dashPositions:te})}addFeatures(d,L,W,te){for(let le of this.patternFeatures)this.addFeature(le,le.geometry,le.index,L,W,te,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=d.createVertexBuffer(this.layoutVertexArray2,sR)),this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,iR),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(d){if(d.properties&&Object.hasOwn(d.properties,x_)&&Object.hasOwn(d.properties,w_))return{start:+d.properties[x_],end:+d.properties[w_]}}addFeature(d,L,W,te,le,pe,me){let Ce=this.layers[0].layout,we=Ce.get("line-join").evaluate(d,{}),ze=Ce.get("line-cap").evaluate(d,{}),Pe=Ce.get("line-miter-limit").evaluate(d,{}),nt=Ce.get("line-round-limit").evaluate(d,{});this.lineClips=this.lineFeatureClips(d);for(let Ve of L)this.addLine(Ve,d,we,ze,Pe,nt,te,me);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:le,dashPositions:pe,canonical:te})}addLine(d,L,W,te,le,pe,me,Ce){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,d=hv(d,me?Ce.line.getGranularityForZoomLevel(me.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let lr=0;lr=2&&d[ze-1].equals(d[ze-2]);)ze--;let Pe=0;for(;Pe0;if(_a&&lr>Pe){let Da=bt.dist(Et);if(Da>2*nt){let na=bt.sub(bt.sub(Et)._mult(nt/Da)._round());this.updateDistance(Et,na),this.addCurrentVertex(na,tr,0,0,Ve),Et=na}}let Ba=Et&&er,Za=Ba?W:we?"butt":te;if(Ba&&Za==="round"&&(knle&&(Za="bevel"),Za==="bevel"&&(kn>2&&(Za="flipbevel"),kn100)Mr=xr.mult(-1);else{let Da=kn*tr.add(xr).mag()/tr.sub(xr).mag();Mr._perp()._mult(Da*(ta?-1:1))}this.addCurrentVertex(bt,Mr,0,0,Ve),this.addCurrentVertex(bt,Mr.mult(-1),0,0,Ve)}else if(Za==="bevel"||Za==="fakeround"){let Da=-Math.sqrt(kn*kn-1),na=ta?Da:0,li=ta?0:Da;if(Et&&this.addCurrentVertex(bt,tr,na,li,Ve),Za==="fakeround"){let xi=Math.round(180*On/Math.PI/20);for(let ui=1;ui2*nt){let na=bt.add(er.sub(bt)._mult(nt/Da)._round());this.updateDistance(bt,na),this.addCurrentVertex(na,xr,0,0,Ve),bt=na}}}}addCurrentVertex(d,L,W,te,le,pe=!1){let me=L.y*te-L.x,Ce=-L.y-L.x*te;this.addHalfVertex(d,L.x+L.y*W,L.y-L.x*W,pe,!1,W,le),this.addHalfVertex(d,me,Ce,pe,!0,-te,le),this.distance>xT/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(d,L,W,te,le,pe))}addHalfVertex({x:d,y:L},W,te,le,pe,me,Ce){let we=.5*(this.lineClips?this.scaledDistance*(xT-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((d<<1)+(le?1:0),(L<<1)+(pe?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(me===0?0:me<0?-1:1)|(63&we)<<2,we>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let ze=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,ze,this.e2),Ce.primitiveLength++),pe?this.e2=ze:this.e1=ze}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(d,L){this.distance+=d.dist(L),this.updateScaledDistance()}hasLineDasharray(d){for(let L of d){let W=L.paint.get("line-dasharray");if(W&&!W.isConstant())return!0}return!1}addLineDashDependencies(d,L,W,te){for(let le of d){let pe=le.paint.get("line-dasharray");if(!pe||pe.value.kind==="constant")continue;let me=le.layout.get("line-cap").evaluate(L,{})==="round",Ce={dasharray:pe.value.evaluate({zoom:W-1},L,{}),round:me},we={dasharray:pe.value.evaluate({zoom:W},L,{}),round:me},ze={dasharray:pe.value.evaluate({zoom:W+1},L,{}),round:me},Pe=`${Ce.dasharray.join(",")},${Ce.round}`,nt=`${we.dasharray.join(",")},${we.round}`,Ve=`${ze.dasharray.join(",")},${ze.round}`;te.dashDependencies[Pe]=Ce,te.dashDependencies[nt]=we,te.dashDependencies[Ve]=ze,L.dashes[le.id]={min:Pe,mid:nt,max:Ve}}}}let wT,TT;Ci("LineBucket",A_,{omit:["layers","patternFeatures"]});var AT={get paint(){return TT=TT||new Bs({"line-opacity":new Vi(ht.paint_line["line-opacity"]),"line-color":new Vi(ht.paint_line["line-color"]),"line-translate":new Li(ht.paint_line["line-translate"]),"line-translate-anchor":new Li(ht.paint_line["line-translate-anchor"]),"line-width":new Vi(ht.paint_line["line-width"]),"line-gap-width":new Vi(ht.paint_line["line-gap-width"]),"line-offset":new Vi(ht.paint_line["line-offset"]),"line-blur":new Vi(ht.paint_line["line-blur"]),"line-dasharray":new fl(ht.paint_line["line-dasharray"]),"line-pattern":new fl(ht.paint_line["line-pattern"]),"line-gradient":new tu(ht.paint_line["line-gradient"])})},get layout(){return wT=wT||new Bs({"line-cap":new Vi(ht.layout_line["line-cap"]),"line-join":new Vi(ht.layout_line["line-join"]),"line-miter-limit":new Vi(ht.layout_line["line-miter-limit"]),"line-round-limit":new Vi(ht.layout_line["line-round-limit"]),"line-sort-key":new Vi(ht.layout_line["line-sort-key"])})}};class uR extends Vi{possiblyEvaluate(d,L){return L=new Ti(Math.floor(L.zoom),{now:L.now,fadeDuration:L.fadeDuration,zoomHistory:L.zoomHistory,transition:L.transition}),super.possiblyEvaluate(d,L)}evaluate(d,L,W,te){return L=X({},L,{zoom:Math.floor(L.zoom)}),super.evaluate(d,L,W,te)}}let Km;class cR extends hl{constructor(d,L){super(d,AT,L),this.gradientVersion=0,Km||(Km=new uR(AT.paint.properties["line-width"].specification),Km.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(d){if(d==="line-gradient"){let L=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(L)&&L._styleExpression.expression instanceof Is,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,L){super.recalculate(d,L),this.paint._values["line-floorwidth"]=Km.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new A_(d)}queryRadius(d){let L=d,W=MT(Le("line-width",this,L),Le("line-gap-width",this,L)),te=Le("line-offset",this,L);return W/2+Math.abs(te)+Oe(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:le,pixelsToTileUnits:pe}){let me=Ke(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-le.bearingInRadians,pe),Ce=pe/2*MT(this.paint.get("line-width").evaluate(L,W),this.paint.get("line-gap-width").evaluate(L,W)),we=this.paint.get("line-offset").evaluate(L,W);return we&&(te=function(ze,Pe){let nt=[];for(let Ve of ze){let bt=yt(Ve),Et=[];for(let er=0;er=3){for(let bt of Ve)if(sa(ze,bt))return!0}if(ds(ze,Ve,nt))return!0}return!1}(me,te,Ce)}isTileClipped(){return!0}}function MT(D,d){return d>0?d+2*D:D}let fR=ut([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),hR=ut([{name:"a_projected_pos",components:3,type:"Float32"}],4);ut([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let dR=ut([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ut([{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"}]);let ST=ut([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),vR=ut([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function pR(D,d,L){let W=d.layout.get("text-transform").evaluate(L,{});return W==="uppercase"?D=D.toLocaleUpperCase():W==="lowercase"&&(D=D.toLocaleLowerCase()),Yi.applyArabicShaping&&(D=Yi.applyArabicShaping(D)),D}function mR(D,d,L){for(let W of D.sections)W.text=pR(W.text,d,L);return D}ut([{name:"triangle",components:3,type:"Uint16"}]),ut([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ut([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ut([{type:"Float32",name:"offsetX"}]),ut([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ut([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var wc=24;let T0={"!":"\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","\u22EF":"\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"},gR={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},yR={40:!0};function ET(D,d,L,W,te,le){if("fontStack"in d){let pe=L[d.fontStack],me=pe?.[D];return me?me.metrics.advance*d.scale+te:0}{let pe=W[d.imageName];return pe?pe.displaySize[0]*d.scale*wc/le+te:0}}function kT(D,d,L,W){let te=Math.pow(D-d,2);return W?DMath.max(d,this.sections[L].scale),0)}getMaxImageSize(d){let L=0,W=0;for(let te=0;teW))}addImageSection(d){let L=d.image?d.image.name:"";if(L.length===0)return void ee("Can't add FormattedSection with an empty image.");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push({scale:1,verticalAlign:d.verticalAlign||"bottom",imageName:L}),this.sectionIndex.push(this.sections.length-1)):ee("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(d,L,W,te,le){let pe=[],me=this.determineAverageLineWidth(d,L,W,te,le),Ce=this.hasZeroWidthSpaces(),we=0,ze=0,Pe=this.text[Symbol.iterator](),nt=Pe.next(),Ve=this.text[Symbol.iterator]();Ve.next();let bt=Ve.next(),Et=this.text[Symbol.iterator]();Et.next(),Et.next();let er=Et.next();for(;!nt.done;){let tr=this.getSection(ze),xr=nt.value.codePointAt(0);if(Dr(xr)||(we+=ET(xr,tr,W,te,d,le)),!bt.done){let lr=Bt(xr),Mr=bt.value.codePointAt(0);(gR[xr]||lr||"imageName"in tr||!er.done&&yR[Mr])&&pe.push(CT(ze+1,we,me,pe,_R(xr,Mr,lr&&Ce),!1))}ze++,nt=Pe.next(),bt=Ve.next(),er=Et.next()}return LT(CT(this.length(),we,me,pe,0,!0))}determineAverageLineWidth(d,L,W,te,le){let pe=0,me=0;for(let Ce of this.text){let we=this.getSection(me);pe+=ET(Ce.codePointAt(0),we,W,te,d,le),me++}return pe/Math.max(1,Math.ceil(pe/L))}}let M_=4294967296,PT=1/M_,DT=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class Jm{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,L,W=this.length){for(;this.pos>3,pe=this.pos;this.type=7&te,d(le,L,this),this.pos===pe&&this.skip(te)}return L}readMessage(d,L){return this.readFields(d,L,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*M_;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*M_;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let L=this.buf,W,te;return te=L[this.pos++],W=127&te,te<128?W:(te=L[this.pos++],W|=(127&te)<<7,te<128?W:(te=L[this.pos++],W|=(127&te)<<14,te<128?W:(te=L[this.pos++],W|=(127&te)<<21,te<128?W:(te=L[this.pos],W|=(15&te)<<28,function(le,pe,me){let Ce=me.buf,we,ze;if(ze=Ce[me.pos++],we=(112&ze)>>4,ze<128||(ze=Ce[me.pos++],we|=(127&ze)<<3,ze<128)||(ze=Ce[me.pos++],we|=(127&ze)<<10,ze<128)||(ze=Ce[me.pos++],we|=(127&ze)<<17,ze<128)||(ze=Ce[me.pos++],we|=(127&ze)<<24,ze<128)||(ze=Ce[me.pos++],we|=(1&ze)<<31,ze<128))return hp(le,we,pe);throw new Error("Expected varint not more than 10 bytes")}(W,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,L=this.pos;return this.pos=d,d-L>=12&&DT?DT.decode(this.buf.subarray(L,d)):function(W,te,le){let pe="",me=te;for(;me239?4:Ce>223?3:Ce>191?2:1;if(me+Ve>le)break;Ve===1?Ce<128&&(nt=Ce):Ve===2?(we=W[me+1],(192&we)==128&&(nt=(31&Ce)<<6|63&we,nt<=127&&(nt=null))):Ve===3?(we=W[me+1],ze=W[me+2],(192&we)==128&&(192&ze)==128&&(nt=(15&Ce)<<12|(63&we)<<6|63&ze,(nt<=2047||nt>=55296&&nt<=57343)&&(nt=null))):Ve===4&&(we=W[me+1],ze=W[me+2],Pe=W[me+3],(192&we)==128&&(192&ze)==128&&(192&Pe)==128&&(nt=(15&Ce)<<18|(63&we)<<12|(63&ze)<<6|63&Pe,(nt<=65535||nt>=1114112)&&(nt=null))),nt===null?(nt=65533,Ve=1):nt>65535&&(nt-=65536,pe+=String.fromCharCode(nt>>>10&1023|55296),nt=56320|1023&nt),pe+=String.fromCharCode(nt),me+=Ve}return pe}(this.buf,L,d)}readBytes(){let d=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,d);return this.pos=d,L}readPackedVarint(d=[],L){let W=this.readPackedEnd();for(;this.pos127;);else if(L===2)this.pos=this.readVarint()+this.pos;else if(L===5)this.pos+=4;else{if(L!==1)throw new Error(`Unimplemented type: ${L}`);this.pos+=8}}writeTag(d,L){this.writeVarint(d<<3|L)}realloc(d){let L=this.length||16;for(;L268435455||d<0?function(L,W){let te,le;if(L>=0?(te=L%4294967296|0,le=L/4294967296|0):(te=~(-L%4294967296),le=~(-L/4294967296),4294967295^te?te=te+1|0:(te=0,le=le+1|0)),L>=18446744073709552e3||L<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");W.realloc(10),function(pe,me,Ce){Ce.buf[Ce.pos++]=127&pe|128,pe>>>=7,Ce.buf[Ce.pos++]=127&pe|128,pe>>>=7,Ce.buf[Ce.pos++]=127&pe|128,pe>>>=7,Ce.buf[Ce.pos++]=127&pe|128,Ce.buf[Ce.pos]=127&(pe>>>=7)}(te,0,W),function(pe,me){let Ce=(7&pe)<<4;me.buf[me.pos++]|=Ce|((pe>>>=3)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe|((pe>>>=7)?128:0),pe&&(me.buf[me.pos++]=127&pe)))))}(le,W)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let L=this.pos;this.pos=function(te,le,pe){for(let me,Ce,we=0;we55295&&me<57344){if(!Ce){me>56319||we+1===le.length?(te[pe++]=239,te[pe++]=191,te[pe++]=189):Ce=me;continue}if(me<56320){te[pe++]=239,te[pe++]=191,te[pe++]=189,Ce=me;continue}me=Ce-55296<<10|me-56320|65536,Ce=null}else Ce&&(te[pe++]=239,te[pe++]=191,te[pe++]=189,Ce=null);me<128?te[pe++]=me:(me<2048?te[pe++]=me>>6|192:(me<65536?te[pe++]=me>>12|224:(te[pe++]=me>>18|240,te[pe++]=me>>12&63|128),te[pe++]=me>>6&63|128),te[pe++]=63&me|128)}return pe}(this.buf,d,this.pos);let W=this.pos-L;W>=128&&IT(L,W,this),this.pos=L-1,this.writeVarint(W),this.pos+=W}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let L=d.length;this.writeVarint(L),this.realloc(L);for(let W=0;W=128&&IT(W,te,this),this.pos=W-1,this.writeVarint(te),this.pos+=te}writeMessage(d,L,W){this.writeTag(d,2),this.writeRawMessage(L,W)}writePackedVarint(d,L){L.length&&this.writeMessage(d,bR,L)}writePackedSVarint(d,L){L.length&&this.writeMessage(d,xR,L)}writePackedBoolean(d,L){L.length&&this.writeMessage(d,AR,L)}writePackedFloat(d,L){L.length&&this.writeMessage(d,wR,L)}writePackedDouble(d,L){L.length&&this.writeMessage(d,TR,L)}writePackedFixed32(d,L){L.length&&this.writeMessage(d,MR,L)}writePackedSFixed32(d,L){L.length&&this.writeMessage(d,SR,L)}writePackedFixed64(d,L){L.length&&this.writeMessage(d,ER,L)}writePackedSFixed64(d,L){L.length&&this.writeMessage(d,kR,L)}writeBytesField(d,L){this.writeTag(d,2),this.writeBytes(L)}writeFixed32Field(d,L){this.writeTag(d,5),this.writeFixed32(L)}writeSFixed32Field(d,L){this.writeTag(d,5),this.writeSFixed32(L)}writeFixed64Field(d,L){this.writeTag(d,1),this.writeFixed64(L)}writeSFixed64Field(d,L){this.writeTag(d,1),this.writeSFixed64(L)}writeVarintField(d,L){this.writeTag(d,0),this.writeVarint(L)}writeSVarintField(d,L){this.writeTag(d,0),this.writeSVarint(L)}writeStringField(d,L){this.writeTag(d,2),this.writeString(L)}writeFloatField(d,L){this.writeTag(d,5),this.writeFloat(L)}writeDoubleField(d,L){this.writeTag(d,1),this.writeDouble(L)}writeBooleanField(d,L){this.writeVarintField(d,+L)}}function hp(D,d,L){return L?4294967296*d+(D>>>0):4294967296*(d>>>0)+(D>>>0)}function IT(D,d,L){let W=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));L.realloc(W);for(let te=L.pos-1;te>=D;te--)L.buf[te+W]=L.buf[te]}function bR(D,d){for(let L=0;Lme.h-pe.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),L),h:1/0}],te=0,le=0;for(let pe of D)for(let me=W.length-1;me>=0;me--){let Ce=W[me];if(!(pe.w>Ce.w||pe.h>Ce.h)){if(pe.x=Ce.x,pe.y=Ce.y,le=Math.max(le,pe.y+pe.h),te=Math.max(te,pe.x+pe.w),pe.w===Ce.w&&pe.h===Ce.h){let we=W.pop();we&&meEt.toCodeUnitIndex(kn));let an=xr(Et.toString(),tr);for(let kn of an){let On=[...kn].map(()=>0);er.push(new fp(kn,Et.sections,On))}}else if(lr){er=[],tr=tr.map(_a=>Et.toCodeUnitIndex(_a));let an=0,kn=[];for(let _a of Et.text)kn.push(...Array(_a.length).fill(Et.sectionIndex[an])),an++;let On=lr(Et.text,kn,tr);for(let _a of On){let ta=[],Ba="";for(let Za of _a[0])ta.push(_a[1][Ba.length]),Ba+=Za;er.push(new fp(_a[0],Et.sections,ta))}}else er=function(an,kn){let On=[],_a=0;for(let ta of kn)On.push(an.substring(_a,ta)),_a=ta;return _awe){let ze=Math.ceil(le/we);te*=ze/pe,pe=ze}return{x1:W,y1:te,x2:W+le,y2:te+pe}}function NT(D,d,L,W,te,le){let pe=D.image,me;if(pe.content){let er=pe.content,tr=pe.pixelRatio||1;me=[er[0]/tr,er[1]/tr,pe.displaySize[0]-er[2]/tr,pe.displaySize[1]-er[3]/tr]}let Ce=d.left*le,we=d.right*le,ze,Pe,nt,Ve;L==="width"||L==="both"?(Ve=te[0]+Ce-W[3],Pe=te[0]+we+W[1]):(Ve=te[0]+(Ce+we-pe.displaySize[0])/2,Pe=Ve+pe.displaySize[0]);let bt=d.top*le,Et=d.bottom*le;return L==="height"||L==="both"?(ze=te[1]+bt-W[0],nt=te[1]+Et+W[2]):(ze=te[1]+(bt+Et-pe.displaySize[1])/2,nt=ze+pe.displaySize[1]),{image:pe,top:ze,right:Pe,bottom:nt,left:Ve,collisionPadding:me}}Ci("ImagePosition",S_),Ci("ImageAtlas",FT),l.ax=void 0,(Id=l.ax||(l.ax={}))[Id.none=0]="none",Id[Id.horizontal=1]="horizontal",Id[Id.vertical=2]="vertical",Id[Id.horizontalOnly=3]="horizontalOnly";let nd=128,Rd=32640;function OT(D,d){let{expression:L}=d;if(L.kind==="constant")return{kind:"constant",layoutSize:L.evaluate(new Ti(D+1))};if(L.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=L,le=0;for(;lepe.id),this.index=d.index,this.pixelRatio=d.pixelRatio,this.sourceLayerIndex=d.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let L=this.layers[0]._unevaluatedLayout._values;this.textSizeData=OT(this.zoom,L["text-size"]),this.iconSizeData=OT(this.zoom,L["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),le=W.get("symbol-z-order");this.canOverlap=k_(W,"text-overlap","text-allow-overlap")!=="never"||k_(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=le!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(le==="viewport-y"||le==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(pe=>l.ax[pe])),this.stateDependentLayerIds=this.layers.filter(pe=>pe.isStateDependent()).map(pe=>pe.id),this.sourceID=d.sourceID}createArrays(){this.text=new L_(new Do(this.layers,this.zoom,d=>d.startsWith("text"))),this.icon=new L_(new Do(this.layers,this.zoom,d=>d.startsWith("icon"))),this.glyphOffsetArray=new lt,this.lineVertexArray=new ct,this.symbolInstances=new Ye,this.textAnchorOffsets=new Gt}calculateGlyphDependencies(d,L,W,te,le){for(let pe of d)if(L[pe.codePointAt(0)]=!0,(W||te)&&le){let me=T0[pe];me&&(L[me.codePointAt(0)]=!0)}}populate(d,L,W){var te;let le=this.layers[0],pe=le.layout,me=pe.get("text-font"),Ce=pe.get("text-field"),we=pe.get("icon-image"),ze=(Ce.value.kind!=="constant"||Ce.value.value instanceof ro&&!Ce.value.value.isEmpty()||Ce.value.value.toString().length>0)&&(me.value.kind!=="constant"||me.value.value.length>0),Pe=we.value.kind!=="constant"||!!we.value.value||Object.keys(we.parameters).length>0,nt=pe.get("symbol-sort-key");if(this.features=[],!ze&&!Pe)return;let Ve=L.iconDependencies,bt=L.glyphDependencies,Et=L.availableImages,er=new Ti(this.zoom);for(let{feature:tr,id:xr,index:lr,sourceLayerIndex:Mr}of d){let Xr=le._featureFilter.needGeometry,an=Co(tr,Xr);if(!le._featureFilter.filter(er,an,W))continue;let kn,On;if(Xr||(an.geometry=Hl(tr)),ze){let ta=le.getValueAndResolveTokens("text-field",an,W,Et),Ba=ro.factory(ta);this.hasRTLText||(this.hasRTLText=OR(Ba)),(!this.hasRTLText||Yi.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Yi.isParsed())&&(kn=mR(Ba,le,an))}if(Pe){let ta=le.getValueAndResolveTokens("icon-image",an,W,Et);On=ta instanceof so?ta:so.fromString(ta)}if(!kn&&!On)continue;let _a=this.sortFeaturesByKey?nt.evaluate(an,{},W):void 0;if(this.features.push({id:xr,text:kn,icon:On,index:lr,sourceLayerIndex:Mr,geometry:an.geometry,properties:tr.properties,type:y0.types[tr.type],sortKey:_a}),On&&(Ve[On.name]=!0),kn){let ta=me.evaluate(an,{},W).join(","),Ba=pe.get("text-rotation-alignment")!=="viewport"&&pe.get("symbol-placement")!=="point";this.allowVerticalPlacement=(te=this.writingModes)===null||te===void 0?void 0:te.includes(l.ax.vertical);for(let Za of kn.sections)if(Za.image)Ve[Za.image.name]=!0;else{let Da=Ur(kn.toString()),na=Za.fontStack||ta;bt[na]||(bt[na]={}),this.calculateGlyphDependencies(Za.text,bt[na],Ba,this.allowVerticalPlacement,Da)}}}pe.get("symbol-placement")==="line"&&(this.features=function(tr){let xr={},lr={},Mr=[],Xr=0;function an(ta){Mr.push(tr[ta]),Xr++}function kn(ta,Ba,Za){let Da=lr[ta];return delete lr[ta],lr[Ba]=Da,Mr[Da].geometry[0].pop(),Mr[Da].geometry[0]=Mr[Da].geometry[0].concat(Za[0]),Da}function On(ta,Ba,Za){let Da=xr[Ba];return delete xr[Ba],xr[ta]=Da,Mr[Da].geometry[0].shift(),Mr[Da].geometry[0]=Za[0].concat(Mr[Da].geometry[0]),Da}function _a(ta,Ba,Za){let Da=Za?Ba[0][Ba[0].length-1]:Ba[0][0];return`${ta}:${Da.x}:${Da.y}`}for(let ta=0;tata.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((tr,xr)=>tr.sortKey-xr.sortKey)}update(d,L,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}),this.icon.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(d){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(d),this.iconCollisionBox.upload(d)),this.text.upload(d,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(d,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(d,L){let W=this.lineVertexArray.length;if(d.segment!==void 0){let te=d.dist(L[d.segment+1]),le=d.dist(L[d.segment]),pe={};for(let me=d.segment+1;me=0;me--)pe[me]={x:L[me].x,y:L[me].y,tileUnitDistanceFromAnchor:le},me>0&&(le+=L[me-1].dist(L[me]));for(let me=0;me0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(d,L){let W=d.placedSymbolArray.get(L),te=W.vertexStartIndex+4*W.numGlyphs;for(let le=W.vertexStartIndex;lete[me]-te[Ce]||le[Ce]-le[me]),pe}addToSortKeyRanges(d,L){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W?.sortKey===L?W.symbolInstanceEnd=d+1:this.sortKeyRanges.push({sortKey:L,symbolInstanceStart:d,symbolInstanceEnd:d+1})}sortFeatures(d){if(this.sortFeaturesByY&&this.sortedAngle!==d&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(d),this.sortedAngle=d,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let L of this.symbolInstanceIndexes){let W=this.symbolInstances.get(L);this.featureSortOrder.push(W.featureIndex);let te=[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex];for(let le=0;le=0&&te.indexOf(pe)===le&&this.addIndicesForPlacedSymbol(this.text,pe)}W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let jT,UT;Ci("SymbolBucket",dp,{omit:["layers","collisionBoxArray","features","compareText"]}),dp.MAX_GLYPHS=65535,dp.addDynamicAttributes=C_;var D_={get paint(){return UT=UT||new Bs({"icon-opacity":new Vi(ht.paint_symbol["icon-opacity"]),"icon-color":new Vi(ht.paint_symbol["icon-color"]),"icon-halo-color":new Vi(ht.paint_symbol["icon-halo-color"]),"icon-halo-width":new Vi(ht.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Vi(ht.paint_symbol["icon-halo-blur"]),"icon-translate":new Li(ht.paint_symbol["icon-translate"]),"icon-translate-anchor":new Li(ht.paint_symbol["icon-translate-anchor"]),"text-opacity":new Vi(ht.paint_symbol["text-opacity"]),"text-color":new Vi(ht.paint_symbol["text-color"],{runtimeType:fr,getOverride:D=>D.textColor,hasOverride:D=>!!D.textColor}),"text-halo-color":new Vi(ht.paint_symbol["text-halo-color"]),"text-halo-width":new Vi(ht.paint_symbol["text-halo-width"]),"text-halo-blur":new Vi(ht.paint_symbol["text-halo-blur"]),"text-translate":new Li(ht.paint_symbol["text-translate"]),"text-translate-anchor":new Li(ht.paint_symbol["text-translate-anchor"])})},get layout(){return jT=jT||new Bs({"symbol-placement":new Li(ht.layout_symbol["symbol-placement"]),"symbol-spacing":new Li(ht.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Li(ht.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Vi(ht.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Li(ht.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Li(ht.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Li(ht.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Li(ht.layout_symbol["icon-ignore-placement"]),"icon-optional":new Li(ht.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Li(ht.layout_symbol["icon-rotation-alignment"]),"icon-size":new Vi(ht.layout_symbol["icon-size"]),"icon-text-fit":new Li(ht.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Li(ht.layout_symbol["icon-text-fit-padding"]),"icon-image":new Vi(ht.layout_symbol["icon-image"]),"icon-rotate":new Vi(ht.layout_symbol["icon-rotate"]),"icon-padding":new Vi(ht.layout_symbol["icon-padding"]),"icon-keep-upright":new Li(ht.layout_symbol["icon-keep-upright"]),"icon-offset":new Vi(ht.layout_symbol["icon-offset"]),"icon-anchor":new Vi(ht.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Li(ht.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Li(ht.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Li(ht.layout_symbol["text-rotation-alignment"]),"text-field":new Vi(ht.layout_symbol["text-field"]),"text-font":new Vi(ht.layout_symbol["text-font"]),"text-size":new Vi(ht.layout_symbol["text-size"]),"text-max-width":new Vi(ht.layout_symbol["text-max-width"]),"text-line-height":new Li(ht.layout_symbol["text-line-height"]),"text-letter-spacing":new Vi(ht.layout_symbol["text-letter-spacing"]),"text-justify":new Vi(ht.layout_symbol["text-justify"]),"text-radial-offset":new Vi(ht.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Li(ht.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Vi(ht.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Vi(ht.layout_symbol["text-anchor"]),"text-max-angle":new Li(ht.layout_symbol["text-max-angle"]),"text-writing-mode":new Li(ht.layout_symbol["text-writing-mode"]),"text-rotate":new Vi(ht.layout_symbol["text-rotate"]),"text-padding":new Li(ht.layout_symbol["text-padding"]),"text-keep-upright":new Li(ht.layout_symbol["text-keep-upright"]),"text-transform":new Vi(ht.layout_symbol["text-transform"]),"text-offset":new Vi(ht.layout_symbol["text-offset"]),"text-allow-overlap":new Li(ht.layout_symbol["text-allow-overlap"]),"text-overlap":new Li(ht.layout_symbol["text-overlap"]),"text-ignore-placement":new Li(ht.layout_symbol["text-ignore-placement"]),"text-optional":new Li(ht.layout_symbol["text-optional"])})}};class qT{constructor(d){if(d.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=d.property.overrides?d.property.overrides.runtimeType:$t,this.defaultValue=d}evaluate(d){if(d.formattedSection){let L=this.defaultValue.property.overrides;if(L?.hasOverride(d.formattedSection))return L.getOverride(d.formattedSection)}return d.feature&&d.featureState?this.defaultValue.evaluate(d.feature,d.featureState):this.defaultValue.property.specification.default}eachChild(d){this.defaultValue.isConstant()||d(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Ci("FormatSectionOverride",qT,{omit:["defaultValue"]});class tg extends hl{constructor(d,L){super(d,D_,L)}recalculate(d,L){if(super.recalculate(d,L),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let W=this.layout.get("text-writing-mode");if(W){let te=[];for(let le of W)te.includes(le)||te.push(le);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(d,L,W,te){let le=this.layout.get(d).evaluate(L,{},W,te),pe=this._unevaluatedLayout._values[d];return pe.isDataDriven()||yc(pe.value)||!le?le:function(me,Ce){return Ce.replace(/{([^{}]+)}/g,(we,ze)=>me&&ze in me?String(me[ze]):"")}(L.properties,le)}createBucket(d){return new dp(d)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let d of D_.paint.overridableProperties){if(!tg.hasPaintOverride(this.layout,d))continue;let L=this.paint.get(d),W=new qT(L),te=new Pl(W,L.property.specification),le=null;le=L.value.kind==="constant"||L.value.kind==="source"?new bc("source",te):new ac("composite",te,L.value.zoomStops),this.paint._values[d]=new Js(L.property,le,L.parameters)}}_handleOverridablePaintPropertyUpdate(d,L,W){return!(!this.layout||L.isDataDriven()||W.isDataDriven())&&tg.hasPaintOverride(this.layout,d)}static hasPaintOverride(d,L){let W=d.get("text-field"),te=D_.paint.properties[L],le=!1,pe=me=>{var Ce;for(let we of me)if(!((Ce=te.overrides)===null||Ce===void 0)&&Ce.hasOverride(we))return void(le=!0)};if(W.value.kind==="constant"&&W.value.value instanceof ro)pe(W.value.value.sections);else if(W.value.kind==="source"||W.value.kind==="composite"){let me=we=>{le||(we instanceof Wi&&ii(we.value)===Un?pe(we.value.sections):we instanceof As?pe(we.sections):we.eachChild(me))},Ce=W.value;Ce._styleExpression&&me(Ce._styleExpression.expression)}return le}}let VT;var jR={get paint(){return VT=VT||new Bs({"background-color":new Li(ht.paint_background["background-color"]),"background-pattern":new Ku(ht.paint_background["background-pattern"]),"background-opacity":new Li(ht.paint_background["background-opacity"])})}};class UR extends hl{constructor(d,L){super(d,jR,L)}}class qR extends hl{constructor(d,L){super(d,{},L),this.onAdd=W=>{this.implementation.onAdd&&this.implementation.onAdd(W,W.painter.context.gl)},this.onRemove=W=>{this.implementation.onRemove&&this.implementation.onRemove(W,W.painter.context.gl)},this.implementation=d}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class VR{constructor(d){this._methodToThrottle=d,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var d;this._triggered||(this._triggered=!0,(d=this._channel)===null||d===void 0||d.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let HR={once:!0},I_=63710088e-1;class Fd{constructor(d,L){if(isNaN(d)||isNaN(L))throw new Error(`Invalid LngLat object: (${d}, ${L})`);if(this.lng=+d,this.lat=+L,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Fd(H(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(d){let L=Math.PI/180,W=this.lat*L,te=d.lat*L,le=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((d.lng-this.lng)*L);return I_*Math.acos(Math.min(le,1))}static convert(d){if(d instanceof Fd)return d;if(Array.isArray(d)&&(d.length===2||d.length===3))return new Fd(Number(d[0]),Number(d[1]));if(!Array.isArray(d)&&typeof d=="object"&&d!==null)return new Fd(Number("lng"in d?d.lng:d.lon),Number(d.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 [, ]")}}let HT=2*Math.PI*I_;function GT(D){return HT*Math.cos(D*Math.PI/180)}function WT(D){return(180+D)/360}function YT(D){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D*Math.PI/360)))/360}function XT(D,d){return D/GT(d)}function $T(D){return 360*D-180}function rg(D){return 360/Math.PI*Math.atan(Math.exp((180-360*D)*Math.PI/180))-90}function ZT(D,d){return D*GT(rg(d))}class A0{constructor(d,L,W=0){this.x=+d,this.y=+L,this.z=+W}static fromLngLat(d,L=0){let W=Fd.convert(d);return new A0(WT(W.lng),YT(W.lat),XT(L,W.lat))}toLngLat(){return new Fd($T(this.x),rg(this.y))}toAltitude(){return ZT(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/HT*(d=rg(this.y),1/Math.cos(d*Math.PI/180));var d}}function KT(D,d,L){var W=2*Math.PI*6378137/256/Math.pow(2,L);return[D*W-2*Math.PI*6378137/2,d*W-2*Math.PI*6378137/2]}class R_{constructor(d,L,W){if(!function(te,le,pe){return!(te<0||te>25||pe<0||pe>=Math.pow(2,te)||le<0||le>=Math.pow(2,te))}(d,L,W))throw new Error(`x=${L}, y=${W}, z=${d} outside of bounds. 0<=x<${Math.pow(2,d)}, 0<=y<${Math.pow(2,d)} 0<=z<=25 `);this.z=d,this.x=L,this.y=W,this.key=vp(0,d,d,L,W)}equals(d){return this.z===d.z&&this.x===d.x&&this.y===d.y}url(d,L,W){let te=(pe=this.y,me=this.z,Ce=KT(256*(le=this.x),256*(pe=Math.pow(2,me)-pe-1),me),we=KT(256*(le+1),256*(pe+1),me),Ce[0]+","+Ce[1]+","+we[0]+","+we[1]);var le,pe,me,Ce,we;let ze=function(Pe,nt,Ve){let bt="";for(let Et=Pe;Et>0;Et--){let er=1<1?"@2x":"").replace(/{quadkey}/g,ze).replace(/{bbox-epsg-3857}/g,te)}isChildOf(d){let L=this.z-d.z;return L>0&&d.x===this.x>>L&&d.y===this.y>>L}getTilePoint(d){let L=Math.pow(2,this.z);return new t((d.x*L-this.x)*F,(d.y*L-this.y)*F)}toString(){return`${this.z}/${this.x}/${this.y}`}}class JT{constructor(d,L){this.wrap=d,this.canonical=L,this.key=vp(d,L.z,L.z,L.x,L.y)}}class rh{constructor(d,L,W,te,le){if(this.terrainRttPosMatrix32f=null,d= z; overscaledZ = ${d}; z = ${W}`);this.overscaledZ=d,this.wrap=L,this.canonical=new R_(W,+te,+le),this.key=vp(L,d,W,te,le)}clone(){return new rh(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(d){return this.overscaledZ===d.overscaledZ&&this.wrap===d.wrap&&this.canonical.equals(d.canonical)}scaledTo(d){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let L=this.canonical.z-d;return d>this.canonical.z?new rh(d,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new rh(d,this.wrap,d,this.canonical.x>>L,this.canonical.y>>L)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(d,L){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-d;return d>this.canonical.z?vp(this.wrap*+L,d,this.canonical.z,this.canonical.x,this.canonical.y):vp(this.wrap*+L,d,d,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(d){if(d.wrap!==this.wrap||this.overscaledZ-d.overscaledZ<=0)return!1;if(d.overscaledZ===0)return this.overscaledZ>0;let L=this.canonical.z-d.canonical.z;return!(L<0)&&d.canonical.x===this.canonical.x>>L&&d.canonical.y===this.canonical.y>>L}children(d){if(this.overscaledZ>=d)return[new rh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let L=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new rh(L,this.wrap,L,W,te),new rh(L,this.wrap,L,W+1,te),new rh(L,this.wrap,L,W,te+1),new rh(L,this.wrap,L,W+1,te+1)]}isLessThan(d){return this.wrapd.wrap)&&(this.overscaledZd.overscaledZ)&&(this.canonical.xd.canonical.x)&&this.canonical.y=0&&d=0&&L=we)return null;let Pe=this.canonical.x+te,nt=this.wrap;return Pe<0?(nt-=Math.ceil(-Pe/we),Pe=(Pe%we+we)%we):Pe>=we&&(nt+=Math.floor(Pe/we),Pe%=we),{tileID:new rh(this.overscaledZ,nt,Ce,Pe,ze),x:pe,y:me}}}function vp(D,d,L,W,te){(D*=2)<0&&(D=-1*D-1);let le=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(d){return this.expandBy(-d)}map(d){let L=new dv;return L.extend(d(new t(this.minX,this.minY))),L.extend(d(new t(this.maxX,this.minY))),L.extend(d(new t(this.minX,this.maxY))),L.extend(d(new t(this.maxX,this.maxY))),L}static fromPoints(d){let L=new dv;for(let W of d)L.extend(W);return L}contains(d){return d.x>=this.minX&&d.x<=this.maxX&&d.y>=this.minY&&d.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(d){return!this.empty()&&!d.empty()&&d.minX>=this.minX&&d.maxX<=this.maxX&&d.minY>=this.minY&&d.maxY<=this.maxY}intersects(d){return!this.empty()&&!d.empty()&&d.minX<=this.maxX&&d.maxX>=this.minX&&d.minY<=this.maxY&&d.maxY>=this.minY}}class QT{constructor(d){this._stringToNumber={},this._numberToString=[];for(let L=0;L=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${d} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[d]}}class e6{constructor(d,L,W,te,le){this.type="Feature",this._vectorTileFeature=d,this._x=W,this._y=te,this._z=L,this.properties=d.properties,this.id=le}projectPoint(d,L,W,te){return[360*(d.x+L)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(d.y+W)/te)*Math.PI))-90]}projectLine(d,L,W,te){return d.map(le=>this.projectPoint(le,L,W,te))}get geometry(){if(this._geometry)return this._geometry;let d=this._vectorTileFeature,L=d.extent*Math.pow(2,this._z),W=d.extent*this._x,te=d.extent*this._y,le=d.loadGeometry();switch(d.type){case 1:{let pe=[];for(let Ce of le)pe.push(Ce[0]);let me=this.projectLine(pe,W,te,L);this._geometry=pe.length===1?{type:"Point",coordinates:me[0]}:{type:"MultiPoint",coordinates:me};break}case 2:{let pe=le.map(me=>this.projectLine(me,W,te,L));this._geometry=pe.length===1?{type:"LineString",coordinates:pe[0]}:{type:"MultiLineString",coordinates:pe};break}case 3:{let pe=nT(le),me=[];for(let Ce of pe)me.push(Ce.map(we=>this.projectLine(we,W,te,L)));this._geometry=me.length===1?{type:"Polygon",coordinates:me[0]}:{type:"MultiPolygon",coordinates:me};break}default:throw new Error(`unknown feature type: ${d.type}`)}return this._geometry}set geometry(d){this._geometry=d}toJSON(){let d={geometry:this.geometry};for(let L in this)L!=="_geometry"&&L!=="_vectorTileFeature"&&L!=="_x"&&L!=="_y"&&L!=="_z"&&(d[L]=this[L]);return d}}class pp{constructor(d,L,W){this._name=d,this.dataBuffer=L,typeof W=="number"?this._size=W:(this.nullabilityBuffer=W,this._size=W.size())}getValue(d){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(d)?null:this.getValueFromBuffer(d)}has(d){var L;return((L=this.nullabilityBuffer)==null?void 0:L.get(d))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class ng extends pp{}class F_ extends ng{getValueFromBuffer(d){return this.dataBuffer[d]}}class z_ extends ng{getValueFromBuffer(d){return this.dataBuffer[d]}}class t6 extends pp{constructor(d,L,W,te){super(d,L,te),this.delta=W}}class B_ extends t6{constructor(d,L,W,te){super(d,Int32Array.of(L),W,te)}getValueFromBuffer(d){return this.dataBuffer[0]+d*this.delta}}class N_ extends pp{constructor(d,L,W,te){super(d,te?Int32Array.of(L):Uint32Array.of(L),W)}getValueFromBuffer(d){return this.dataBuffer[0]}}class GR{constructor(d,L,W,te,le=4096){this._name=d,this._geometryVector=L,this._idVector=W,this._propertyVectors=te,this._extent=le}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(d){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(L=>[L.name,L]))),this.propertyVectorsMap.get(d)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let d=[],L=this.geometryVector.getGeometries();for(let W=0;W>>32-D;let j_=O_,ad=256;function U_(D,d){return D-D%d}function WR(D){let d=D>>>0;return((255&d)<<24|(65280&d)<<8|d>>>8&65280|d>>>24&255)>>>0}let q_=function(){if(!Number.isFinite(65536))return 65536;let D=U_(Math.floor(65536),ad);return D===0?ad:D}(),YR=3*q_/ad+q_|0;function n6(){let D=new Uint8Array(YR);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:D,byteContainerI32:new Int32Array(D.buffer,D.byteOffset,D.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function XR(D,d,L,W,te){switch(te){case 1:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0;me[we++]=nt>>>0&1,me[we++]=nt>>>1&1,me[we++]=nt>>>2&1,me[we++]=nt>>>3&1,me[we++]=nt>>>4&1,me[we++]=nt>>>5&1,me[we++]=nt>>>6&1,me[we++]=nt>>>7&1,me[we++]=nt>>>8&1,me[we++]=nt>>>9&1,me[we++]=nt>>>10&1,me[we++]=nt>>>11&1,me[we++]=nt>>>12&1,me[we++]=nt>>>13&1,me[we++]=nt>>>14&1,me[we++]=nt>>>15&1,me[we++]=nt>>>16&1,me[we++]=nt>>>17&1,me[we++]=nt>>>18&1,me[we++]=nt>>>19&1,me[we++]=nt>>>20&1,me[we++]=nt>>>21&1,me[we++]=nt>>>22&1,me[we++]=nt>>>23&1,me[we++]=nt>>>24&1,me[we++]=nt>>>25&1,me[we++]=nt>>>26&1,me[we++]=nt>>>27&1,me[we++]=nt>>>28&1,me[we++]=nt>>>29&1,me[we++]=nt>>>30&1,me[we++]=nt>>>31&1}})(D,d,L,W);break;case 2:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0;me[we++]=nt>>>0&3,me[we++]=nt>>>2&3,me[we++]=nt>>>4&3,me[we++]=nt>>>6&3,me[we++]=nt>>>8&3,me[we++]=nt>>>10&3,me[we++]=nt>>>12&3,me[we++]=nt>>>14&3,me[we++]=nt>>>16&3,me[we++]=nt>>>18&3,me[we++]=nt>>>20&3,me[we++]=nt>>>22&3,me[we++]=nt>>>24&3,me[we++]=nt>>>26&3,me[we++]=nt>>>28&3,me[we++]=nt>>>30&3,me[we++]=Ve>>>0&3,me[we++]=Ve>>>2&3,me[we++]=Ve>>>4&3,me[we++]=Ve>>>6&3,me[we++]=Ve>>>8&3,me[we++]=Ve>>>10&3,me[we++]=Ve>>>12&3,me[we++]=Ve>>>14&3,me[we++]=Ve>>>16&3,me[we++]=Ve>>>18&3,me[we++]=Ve>>>20&3,me[we++]=Ve>>>22&3,me[we++]=Ve>>>24&3,me[we++]=Ve>>>26&3,me[we++]=Ve>>>28&3,me[we++]=Ve>>>30&3}})(D,d,L,W);break;case 3:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0;me[we++]=nt>>>0&7,me[we++]=nt>>>3&7,me[we++]=nt>>>6&7,me[we++]=nt>>>9&7,me[we++]=nt>>>12&7,me[we++]=nt>>>15&7,me[we++]=nt>>>18&7,me[we++]=nt>>>21&7,me[we++]=nt>>>24&7,me[we++]=nt>>>27&7,me[we++]=7&(nt>>>30|(1&Ve)<<2),me[we++]=Ve>>>1&7,me[we++]=Ve>>>4&7,me[we++]=Ve>>>7&7,me[we++]=Ve>>>10&7,me[we++]=Ve>>>13&7,me[we++]=Ve>>>16&7,me[we++]=Ve>>>19&7,me[we++]=Ve>>>22&7,me[we++]=Ve>>>25&7,me[we++]=Ve>>>28&7,me[we++]=7&(Ve>>>31|(3&bt)<<1),me[we++]=bt>>>2&7,me[we++]=bt>>>5&7,me[we++]=bt>>>8&7,me[we++]=bt>>>11&7,me[we++]=bt>>>14&7,me[we++]=bt>>>17&7,me[we++]=bt>>>20&7,me[we++]=bt>>>23&7,me[we++]=bt>>>26&7,me[we++]=bt>>>29&7}})(D,d,L,W);break;case 4:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0,Et=le[ze++]>>>0;me[we++]=nt>>>0&15,me[we++]=nt>>>4&15,me[we++]=nt>>>8&15,me[we++]=nt>>>12&15,me[we++]=nt>>>16&15,me[we++]=nt>>>20&15,me[we++]=nt>>>24&15,me[we++]=nt>>>28&15,me[we++]=Ve>>>0&15,me[we++]=Ve>>>4&15,me[we++]=Ve>>>8&15,me[we++]=Ve>>>12&15,me[we++]=Ve>>>16&15,me[we++]=Ve>>>20&15,me[we++]=Ve>>>24&15,me[we++]=Ve>>>28&15,me[we++]=bt>>>0&15,me[we++]=bt>>>4&15,me[we++]=bt>>>8&15,me[we++]=bt>>>12&15,me[we++]=bt>>>16&15,me[we++]=bt>>>20&15,me[we++]=bt>>>24&15,me[we++]=bt>>>28&15,me[we++]=Et>>>0&15,me[we++]=Et>>>4&15,me[we++]=Et>>>8&15,me[we++]=Et>>>12&15,me[we++]=Et>>>16&15,me[we++]=Et>>>20&15,me[we++]=Et>>>24&15,me[we++]=Et>>>28&15}})(D,d,L,W);break;case 5:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0,Et=le[ze++]>>>0,er=le[ze++]>>>0;me[we++]=nt>>>0&31,me[we++]=nt>>>5&31,me[we++]=nt>>>10&31,me[we++]=nt>>>15&31,me[we++]=nt>>>20&31,me[we++]=nt>>>25&31,me[we++]=31&(nt>>>30|(7&Ve)<<2),me[we++]=Ve>>>3&31,me[we++]=Ve>>>8&31,me[we++]=Ve>>>13&31,me[we++]=Ve>>>18&31,me[we++]=Ve>>>23&31,me[we++]=31&(Ve>>>28|(1&bt)<<4),me[we++]=bt>>>1&31,me[we++]=bt>>>6&31,me[we++]=bt>>>11&31,me[we++]=bt>>>16&31,me[we++]=bt>>>21&31,me[we++]=bt>>>26&31,me[we++]=31&(bt>>>31|(15&Et)<<1),me[we++]=Et>>>4&31,me[we++]=Et>>>9&31,me[we++]=Et>>>14&31,me[we++]=Et>>>19&31,me[we++]=Et>>>24&31,me[we++]=31&(Et>>>29|(3&er)<<3),me[we++]=er>>>2&31,me[we++]=er>>>7&31,me[we++]=er>>>12&31,me[we++]=er>>>17&31,me[we++]=er>>>22&31,me[we++]=er>>>27&31}})(D,d,L,W);break;case 6:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0,Et=le[ze++]>>>0,er=le[ze++]>>>0,tr=le[ze++]>>>0;me[we++]=nt>>>0&63,me[we++]=nt>>>6&63,me[we++]=nt>>>12&63,me[we++]=nt>>>18&63,me[we++]=nt>>>24&63,me[we++]=63&(nt>>>30|(15&Ve)<<2),me[we++]=Ve>>>4&63,me[we++]=Ve>>>10&63,me[we++]=Ve>>>16&63,me[we++]=Ve>>>22&63,me[we++]=63&(Ve>>>28|(3&bt)<<4),me[we++]=bt>>>2&63,me[we++]=bt>>>8&63,me[we++]=bt>>>14&63,me[we++]=bt>>>20&63,me[we++]=bt>>>26&63,me[we++]=Et>>>0&63,me[we++]=Et>>>6&63,me[we++]=Et>>>12&63,me[we++]=Et>>>18&63,me[we++]=Et>>>24&63,me[we++]=63&(Et>>>30|(15&er)<<2),me[we++]=er>>>4&63,me[we++]=er>>>10&63,me[we++]=er>>>16&63,me[we++]=er>>>22&63,me[we++]=63&(er>>>28|(3&tr)<<4),me[we++]=tr>>>2&63,me[we++]=tr>>>8&63,me[we++]=tr>>>14&63,me[we++]=tr>>>20&63,me[we++]=tr>>>26&63}})(D,d,L,W);break;case 7:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0,Et=le[ze++]>>>0,er=le[ze++]>>>0,tr=le[ze++]>>>0,xr=le[ze++]>>>0;me[we++]=nt>>>0&127,me[we++]=nt>>>7&127,me[we++]=nt>>>14&127,me[we++]=nt>>>21&127,me[we++]=127&(nt>>>28|(7&Ve)<<4),me[we++]=Ve>>>3&127,me[we++]=Ve>>>10&127,me[we++]=Ve>>>17&127,me[we++]=Ve>>>24&127,me[we++]=127&(Ve>>>31|(63&bt)<<1),me[we++]=bt>>>6&127,me[we++]=bt>>>13&127,me[we++]=bt>>>20&127,me[we++]=127&(bt>>>27|(3&Et)<<5),me[we++]=Et>>>2&127,me[we++]=Et>>>9&127,me[we++]=Et>>>16&127,me[we++]=Et>>>23&127,me[we++]=127&(Et>>>30|(31&er)<<2),me[we++]=er>>>5&127,me[we++]=er>>>12&127,me[we++]=er>>>19&127,me[we++]=127&(er>>>26|(1&tr)<<6),me[we++]=tr>>>1&127,me[we++]=tr>>>8&127,me[we++]=tr>>>15&127,me[we++]=tr>>>22&127,me[we++]=127&(tr>>>29|(15&xr)<<3),me[we++]=xr>>>4&127,me[we++]=xr>>>11&127,me[we++]=xr>>>18&127,me[we++]=xr>>>25&127}})(D,d,L,W);break;case 8:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<8;Pe++){let nt=le[ze++]>>>0,Ve=le[ze++]>>>0,bt=le[ze++]>>>0,Et=le[ze++]>>>0,er=le[ze++]>>>0,tr=le[ze++]>>>0,xr=le[ze++]>>>0,lr=le[ze++]>>>0;me[we++]=nt>>>0&255,me[we++]=nt>>>8&255,me[we++]=nt>>>16&255,me[we++]=nt>>>24&255,me[we++]=Ve>>>0&255,me[we++]=Ve>>>8&255,me[we++]=Ve>>>16&255,me[we++]=Ve>>>24&255,me[we++]=bt>>>0&255,me[we++]=bt>>>8&255,me[we++]=bt>>>16&255,me[we++]=bt>>>24&255,me[we++]=Et>>>0&255,me[we++]=Et>>>8&255,me[we++]=Et>>>16&255,me[we++]=Et>>>24&255,me[we++]=er>>>0&255,me[we++]=er>>>8&255,me[we++]=er>>>16&255,me[we++]=er>>>24&255,me[we++]=tr>>>0&255,me[we++]=tr>>>8&255,me[we++]=tr>>>16&255,me[we++]=tr>>>24&255,me[we++]=xr>>>0&255,me[we++]=xr>>>8&255,me[we++]=xr>>>16&255,me[we++]=xr>>>24&255,me[we++]=lr>>>0&255,me[we++]=lr>>>8&255,me[we++]=lr>>>16&255,me[we++]=lr>>>24&255}})(D,d,L,W);break;case 16:(function(le,pe,me,Ce){let we=Ce,ze=pe;for(let Pe=0;Pe<128;Pe++){let nt=le[ze++]>>>0;me[we++]=65535&nt,me[we++]=nt>>>16&65535}})(D,d,L,W);break;default:(function(le,pe,me,Ce,we){let ze=j_[we]>>>0,Pe=pe,nt=0,Ve=le[Pe]>>>0,bt=Ce;for(let Et=0;Et<8;Et++){for(let er=0;er<32;er++)if(nt+we<=32)me[bt+er]=Ve>>>nt&ze,nt+=we,nt===32&&(nt=0,Pe++,er!==31&&(Ve=le[Pe]>>>0));else{let tr=32-nt,xr=Ve>>>nt;Pe++,Ve=le[Pe]>>>0;let lr=we-tr;me[bt+er]=(xr|(Ve&-1>>>32-lr>>>0)<>>0)}})(D,d,L,W,te)}return d+(te<<3)|0}function $R(D,d,L,W){if(L+2>d)throw new Error(`FastPFOR decode: byteContainer underflow at block=${W} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${L}, byteSize=${d})`);let te=D[L++],le=D[L++];if(te>32)throw new Error(`FastPFOR decode: invalid bitWidth=${te} at block=${W} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:te,exceptionCount:le,bytePosIn:L}}function ZR(D,d,L,W,te,le,pe,me,Ce){let{maxBits:we,exceptionBitWidth:ze,bytePosIn:Pe}=function(er,tr,xr,lr,Mr,Xr){if(xr+1>tr)throw new Error(`FastPFOR decode: exception header underflow at block=${Xr} (need 1 byte for maxBits, bytePos=${xr}, byteSize=${tr})`);let an=er[xr++];if(an32)throw new Error(`FastPFOR decode: invalid maxBits=${an} at block=${Xr} (bitWidth=${lr}, expected ${lr}..32)`);let kn=an-lr|0;if(kn<1||kn>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${kn} at block=${Xr} (bitWidth=${lr}, maxBits=${an})`);if(xr+Mr>tr)throw new Error(`FastPFOR decode: exception positions underflow at block=${Xr} (need=${Mr}, have=${tr-xr})`);return{maxBits:an,exceptionBitWidth:kn,bytePosIn:xr}}(te,le,pe,L,W,Ce);if(pe=Pe,ze===1){let er=1<Et)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${ze} (ptr=${bt}, need ${W}, size=${Et}) at block ${Ce}`);for(let er=0;erD.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${me} at pageStart=${pe} (expected > 0 and pageStart+whereMeta < encoded.length=${D.length})`);let Ce=pe+1|0,we=pe+me|0,ze=D[we]>>>0,Pe=ze+3>>>2,nt=we+1,Ve=nt+Pe;if(Ve>=D.length)throw new Error(`FastPFOR decode: invalid byteSize=${ze} (metaInts=${Pe}, pageStart=${pe}, packedEnd=${we}, byteContainerStart=${nt}) causes bitmapPos=${Ve} out of bounds (encoded.length=${D.length})`);let bt=function(tr,xr,lr,Mr){Mr.byteContainer.length>>2;if(3&Xr.byteOffset)for(let On=0;On>>8&255,Xr[ta+2|0]=_a>>>16&255,Xr[ta+3|0]=_a>>>24&255}else{let On=Mr.byteContainerI32;(!On||On.buffer!==Xr.buffer||On.byteOffset!==Xr.byteOffset||On.length>>2)),On.set(tr.subarray(xr,xr+an))}let kn=3&lr;if(kn>0){let On=0|tr[xr+an|0],_a=an<<2;for(let ta=0;ta>>(ta<<3)&255}return Xr}(D,nt,ze,le),Et=ze,er=function(tr,xr,lr){let Mr=0|tr[xr++],Xr=lr.dataToBePacked;for(let an=2;an<=32;an=an+1|0){if(!(Mr>>>an-1&1))continue;if(xr>=tr.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${an}, streamWordIndex=${xr}, needWords=1, availableWords=${tr.length-xr}, encodedWords=${tr.length})`);let kn=tr[xr++]>>>0,On=U_(kn+31,32),_a=kn*an+31>>>5;if(xr+_a>tr.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${an}, size=${kn}, streamWordIndex=${xr}, needWords=${_a}, availableWords=${tr.length-xr}, encodedWords=${tr.length})`);let ta=Xr[an];(!ta||ta.length>>5)|0,lr.exceptionSizes[an]=kn}return xr}(D,Ve,le);return le.dataPointers.fill(0),function(tr,xr,lr,Mr,Xr,an,kn,On,_a,ta){let Ba=0|lr,Za=0;for(let Da=0;Da0&&(Za=ZR(Xr,ui,li,xi,On,_a,Za,ta,Da))}if(Ba!==Mr)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${xr}, packedStart=${lr}, consumedPackedEnd=${Ba}, expectedPackedEnd=${Mr}, packedWords=${Mr-lr}, encoded.length=${tr.length})`)}(D,pe,Ce,we,d,0|W,te/ad|0,bt,Et,le),er}function JR(D,d,L,W,te){switch(te){case 2:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0;Pe[Ve++]=bt>>>0&3,Pe[Ve++]=bt>>>2&3,Pe[Ve++]=bt>>>4&3,Pe[Ve++]=bt>>>6&3,Pe[Ve++]=bt>>>8&3,Pe[Ve++]=bt>>>10&3,Pe[Ve++]=bt>>>12&3,Pe[Ve++]=bt>>>14&3,Pe[Ve++]=bt>>>16&3,Pe[Ve++]=bt>>>18&3,Pe[Ve++]=bt>>>20&3,Pe[Ve++]=bt>>>22&3,Pe[Ve++]=bt>>>24&3,Pe[Ve++]=bt>>>26&3,Pe[Ve++]=bt>>>28&3,Pe[Ve++]=bt>>>30&3,Pe[Ve++]=Et>>>0&3,Pe[Ve++]=Et>>>2&3,Pe[Ve++]=Et>>>4&3,Pe[Ve++]=Et>>>6&3,Pe[Ve++]=Et>>>8&3,Pe[Ve++]=Et>>>10&3,Pe[Ve++]=Et>>>12&3,Pe[Ve++]=Et>>>14&3,Pe[Ve++]=Et>>>16&3,Pe[Ve++]=Et>>>18&3,Pe[Ve++]=Et>>>20&3,Pe[Ve++]=Et>>>22&3,Pe[Ve++]=Et>>>24&3,Pe[Ve++]=Et>>>26&3,Pe[Ve++]=Et>>>28&3,Pe[Ve]=Et>>>30&3}(D,d,L,W);case 3:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0;Pe[Ve++]=bt>>>0&7,Pe[Ve++]=bt>>>3&7,Pe[Ve++]=bt>>>6&7,Pe[Ve++]=bt>>>9&7,Pe[Ve++]=bt>>>12&7,Pe[Ve++]=bt>>>15&7,Pe[Ve++]=bt>>>18&7,Pe[Ve++]=bt>>>21&7,Pe[Ve++]=bt>>>24&7,Pe[Ve++]=bt>>>27&7,Pe[Ve++]=7&(bt>>>30|(1&Et)<<2),Pe[Ve++]=Et>>>1&7,Pe[Ve++]=Et>>>4&7,Pe[Ve++]=Et>>>7&7,Pe[Ve++]=Et>>>10&7,Pe[Ve++]=Et>>>13&7,Pe[Ve++]=Et>>>16&7,Pe[Ve++]=Et>>>19&7,Pe[Ve++]=Et>>>22&7,Pe[Ve++]=Et>>>25&7,Pe[Ve++]=Et>>>28&7,Pe[Ve++]=7&(Et>>>31|(3&er)<<1),Pe[Ve++]=er>>>2&7,Pe[Ve++]=er>>>5&7,Pe[Ve++]=er>>>8&7,Pe[Ve++]=er>>>11&7,Pe[Ve++]=er>>>14&7,Pe[Ve++]=er>>>17&7,Pe[Ve++]=er>>>20&7,Pe[Ve++]=er>>>23&7,Pe[Ve++]=er>>>26&7,Pe[Ve]=er>>>29&7}(D,d,L,W);case 4:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0;Pe[Ve++]=bt>>>0&15,Pe[Ve++]=bt>>>4&15,Pe[Ve++]=bt>>>8&15,Pe[Ve++]=bt>>>12&15,Pe[Ve++]=bt>>>16&15,Pe[Ve++]=bt>>>20&15,Pe[Ve++]=bt>>>24&15,Pe[Ve++]=bt>>>28&15,Pe[Ve++]=Et>>>0&15,Pe[Ve++]=Et>>>4&15,Pe[Ve++]=Et>>>8&15,Pe[Ve++]=Et>>>12&15,Pe[Ve++]=Et>>>16&15,Pe[Ve++]=Et>>>20&15,Pe[Ve++]=Et>>>24&15,Pe[Ve++]=Et>>>28&15,Pe[Ve++]=er>>>0&15,Pe[Ve++]=er>>>4&15,Pe[Ve++]=er>>>8&15,Pe[Ve++]=er>>>12&15,Pe[Ve++]=er>>>16&15,Pe[Ve++]=er>>>20&15,Pe[Ve++]=er>>>24&15,Pe[Ve++]=er>>>28&15,Pe[Ve++]=tr>>>0&15,Pe[Ve++]=tr>>>4&15,Pe[Ve++]=tr>>>8&15,Pe[Ve++]=tr>>>12&15,Pe[Ve++]=tr>>>16&15,Pe[Ve++]=tr>>>20&15,Pe[Ve++]=tr>>>24&15,Pe[Ve]=tr>>>28&15}(D,d,L,W);case 5:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0;Pe[Ve++]=bt>>>0&31,Pe[Ve++]=bt>>>5&31,Pe[Ve++]=bt>>>10&31,Pe[Ve++]=bt>>>15&31,Pe[Ve++]=bt>>>20&31,Pe[Ve++]=bt>>>25&31,Pe[Ve++]=31&(bt>>>30|(7&Et)<<2),Pe[Ve++]=Et>>>3&31,Pe[Ve++]=Et>>>8&31,Pe[Ve++]=Et>>>13&31,Pe[Ve++]=Et>>>18&31,Pe[Ve++]=Et>>>23&31,Pe[Ve++]=31&(Et>>>28|(1&er)<<4),Pe[Ve++]=er>>>1&31,Pe[Ve++]=er>>>6&31,Pe[Ve++]=er>>>11&31,Pe[Ve++]=er>>>16&31,Pe[Ve++]=er>>>21&31,Pe[Ve++]=er>>>26&31,Pe[Ve++]=31&(er>>>31|(15&tr)<<1),Pe[Ve++]=tr>>>4&31,Pe[Ve++]=tr>>>9&31,Pe[Ve++]=tr>>>14&31,Pe[Ve++]=tr>>>19&31,Pe[Ve++]=tr>>>24&31,Pe[Ve++]=31&(tr>>>29|(3&xr)<<3),Pe[Ve++]=xr>>>2&31,Pe[Ve++]=xr>>>7&31,Pe[Ve++]=xr>>>12&31,Pe[Ve++]=xr>>>17&31,Pe[Ve++]=xr>>>22&31,Pe[Ve]=xr>>>27&31}(D,d,L,W);case 6:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0;Pe[Ve++]=bt>>>0&63,Pe[Ve++]=bt>>>6&63,Pe[Ve++]=bt>>>12&63,Pe[Ve++]=bt>>>18&63,Pe[Ve++]=bt>>>24&63,Pe[Ve++]=63&(bt>>>30|(15&Et)<<2),Pe[Ve++]=Et>>>4&63,Pe[Ve++]=Et>>>10&63,Pe[Ve++]=Et>>>16&63,Pe[Ve++]=Et>>>22&63,Pe[Ve++]=63&(Et>>>28|(3&er)<<4),Pe[Ve++]=er>>>2&63,Pe[Ve++]=er>>>8&63,Pe[Ve++]=er>>>14&63,Pe[Ve++]=er>>>20&63,Pe[Ve++]=er>>>26&63,Pe[Ve++]=tr>>>0&63,Pe[Ve++]=tr>>>6&63,Pe[Ve++]=tr>>>12&63,Pe[Ve++]=tr>>>18&63,Pe[Ve++]=tr>>>24&63,Pe[Ve++]=63&(tr>>>30|(15&xr)<<2),Pe[Ve++]=xr>>>4&63,Pe[Ve++]=xr>>>10&63,Pe[Ve++]=xr>>>16&63,Pe[Ve++]=xr>>>22&63,Pe[Ve++]=63&(xr>>>28|(3&lr)<<4),Pe[Ve++]=lr>>>2&63,Pe[Ve++]=lr>>>8&63,Pe[Ve++]=lr>>>14&63,Pe[Ve++]=lr>>>20&63,Pe[Ve]=lr>>>26&63}(D,d,L,W);case 7:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0;Pe[Ve++]=bt>>>0&127,Pe[Ve++]=bt>>>7&127,Pe[Ve++]=bt>>>14&127,Pe[Ve++]=bt>>>21&127,Pe[Ve++]=127&(bt>>>28|(7&Et)<<4),Pe[Ve++]=Et>>>3&127,Pe[Ve++]=Et>>>10&127,Pe[Ve++]=Et>>>17&127,Pe[Ve++]=Et>>>24&127,Pe[Ve++]=127&(Et>>>31|(63&er)<<1),Pe[Ve++]=er>>>6&127,Pe[Ve++]=er>>>13&127,Pe[Ve++]=er>>>20&127,Pe[Ve++]=127&(er>>>27|(3&tr)<<5),Pe[Ve++]=tr>>>2&127,Pe[Ve++]=tr>>>9&127,Pe[Ve++]=tr>>>16&127,Pe[Ve++]=tr>>>23&127,Pe[Ve++]=127&(tr>>>30|(31&xr)<<2),Pe[Ve++]=xr>>>5&127,Pe[Ve++]=xr>>>12&127,Pe[Ve++]=xr>>>19&127,Pe[Ve++]=127&(xr>>>26|(1&lr)<<6),Pe[Ve++]=lr>>>1&127,Pe[Ve++]=lr>>>8&127,Pe[Ve++]=lr>>>15&127,Pe[Ve++]=lr>>>22&127,Pe[Ve++]=127&(lr>>>29|(15&Mr)<<3),Pe[Ve++]=Mr>>>4&127,Pe[Ve++]=Mr>>>11&127,Pe[Ve++]=Mr>>>18&127,Pe[Ve]=Mr>>>25&127}(D,d,L,W);case 8:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0;Pe[Ve++]=bt>>>0&255,Pe[Ve++]=bt>>>8&255,Pe[Ve++]=bt>>>16&255,Pe[Ve++]=bt>>>24&255,Pe[Ve++]=Et>>>0&255,Pe[Ve++]=Et>>>8&255,Pe[Ve++]=Et>>>16&255,Pe[Ve++]=Et>>>24&255,Pe[Ve++]=er>>>0&255,Pe[Ve++]=er>>>8&255,Pe[Ve++]=er>>>16&255,Pe[Ve++]=er>>>24&255,Pe[Ve++]=tr>>>0&255,Pe[Ve++]=tr>>>8&255,Pe[Ve++]=tr>>>16&255,Pe[Ve++]=tr>>>24&255,Pe[Ve++]=xr>>>0&255,Pe[Ve++]=xr>>>8&255,Pe[Ve++]=xr>>>16&255,Pe[Ve++]=xr>>>24&255,Pe[Ve++]=lr>>>0&255,Pe[Ve++]=lr>>>8&255,Pe[Ve++]=lr>>>16&255,Pe[Ve++]=lr>>>24&255,Pe[Ve++]=Mr>>>0&255,Pe[Ve++]=Mr>>>8&255,Pe[Ve++]=Mr>>>16&255,Pe[Ve++]=Mr>>>24&255,Pe[Ve++]=Xr>>>0&255,Pe[Ve++]=Xr>>>8&255,Pe[Ve++]=Xr>>>16&255,Pe[Ve]=Xr>>>24&255}(D,d,L,W);case 9:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,an=we[ze+8]>>>0;Pe[Ve++]=bt>>>0&511,Pe[Ve++]=bt>>>9&511,Pe[Ve++]=bt>>>18&511,Pe[Ve++]=511&(bt>>>27|(15&Et)<<5),Pe[Ve++]=Et>>>4&511,Pe[Ve++]=Et>>>13&511,Pe[Ve++]=Et>>>22&511,Pe[Ve++]=511&(Et>>>31|(255&er)<<1),Pe[Ve++]=er>>>8&511,Pe[Ve++]=er>>>17&511,Pe[Ve++]=511&(er>>>26|(7&tr)<<6),Pe[Ve++]=tr>>>3&511,Pe[Ve++]=tr>>>12&511,Pe[Ve++]=tr>>>21&511,Pe[Ve++]=511&(tr>>>30|(127&xr)<<2),Pe[Ve++]=xr>>>7&511,Pe[Ve++]=xr>>>16&511,Pe[Ve++]=511&(xr>>>25|(3&lr)<<7),Pe[Ve++]=lr>>>2&511,Pe[Ve++]=lr>>>11&511,Pe[Ve++]=lr>>>20&511,Pe[Ve++]=511&(lr>>>29|(63&Mr)<<3),Pe[Ve++]=Mr>>>6&511,Pe[Ve++]=Mr>>>15&511,Pe[Ve++]=511&(Mr>>>24|(1&Xr)<<8),Pe[Ve++]=Xr>>>1&511,Pe[Ve++]=Xr>>>10&511,Pe[Ve++]=Xr>>>19&511,Pe[Ve++]=511&(Xr>>>28|(31&an)<<4),Pe[Ve++]=an>>>5&511,Pe[Ve++]=an>>>14&511,Pe[Ve]=an>>>23&511}(D,d,L,W);case 10:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,an=we[ze+8]>>>0,kn=we[ze+9]>>>0;Pe[Ve++]=bt>>>0&1023,Pe[Ve++]=bt>>>10&1023,Pe[Ve++]=bt>>>20&1023,Pe[Ve++]=1023&(bt>>>30|(255&Et)<<2),Pe[Ve++]=Et>>>8&1023,Pe[Ve++]=Et>>>18&1023,Pe[Ve++]=1023&(Et>>>28|(63&er)<<4),Pe[Ve++]=er>>>6&1023,Pe[Ve++]=er>>>16&1023,Pe[Ve++]=1023&(er>>>26|(15&tr)<<6),Pe[Ve++]=tr>>>4&1023,Pe[Ve++]=tr>>>14&1023,Pe[Ve++]=1023&(tr>>>24|(3&xr)<<8),Pe[Ve++]=xr>>>2&1023,Pe[Ve++]=xr>>>12&1023,Pe[Ve++]=xr>>>22&1023,Pe[Ve++]=lr>>>0&1023,Pe[Ve++]=lr>>>10&1023,Pe[Ve++]=lr>>>20&1023,Pe[Ve++]=1023&(lr>>>30|(255&Mr)<<2),Pe[Ve++]=Mr>>>8&1023,Pe[Ve++]=Mr>>>18&1023,Pe[Ve++]=1023&(Mr>>>28|(63&Xr)<<4),Pe[Ve++]=Xr>>>6&1023,Pe[Ve++]=Xr>>>16&1023,Pe[Ve++]=1023&(Xr>>>26|(15&an)<<6),Pe[Ve++]=an>>>4&1023,Pe[Ve++]=an>>>14&1023,Pe[Ve++]=1023&(an>>>24|(3&kn)<<8),Pe[Ve++]=kn>>>2&1023,Pe[Ve++]=kn>>>12&1023,Pe[Ve]=kn>>>22&1023}(D,d,L,W);case 11:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,an=we[ze+8]>>>0,kn=we[ze+9]>>>0,On=we[ze+10]>>>0;Pe[Ve++]=bt>>>0&2047,Pe[Ve++]=bt>>>11&2047,Pe[Ve++]=2047&(bt>>>22|(1&Et)<<10),Pe[Ve++]=Et>>>1&2047,Pe[Ve++]=Et>>>12&2047,Pe[Ve++]=2047&(Et>>>23|(3&er)<<9),Pe[Ve++]=er>>>2&2047,Pe[Ve++]=er>>>13&2047,Pe[Ve++]=2047&(er>>>24|(7&tr)<<8),Pe[Ve++]=tr>>>3&2047,Pe[Ve++]=tr>>>14&2047,Pe[Ve++]=2047&(tr>>>25|(15&xr)<<7),Pe[Ve++]=xr>>>4&2047,Pe[Ve++]=xr>>>15&2047,Pe[Ve++]=2047&(xr>>>26|(31&lr)<<6),Pe[Ve++]=lr>>>5&2047,Pe[Ve++]=lr>>>16&2047,Pe[Ve++]=2047&(lr>>>27|(63&Mr)<<5),Pe[Ve++]=Mr>>>6&2047,Pe[Ve++]=Mr>>>17&2047,Pe[Ve++]=2047&(Mr>>>28|(127&Xr)<<4),Pe[Ve++]=Xr>>>7&2047,Pe[Ve++]=Xr>>>18&2047,Pe[Ve++]=2047&(Xr>>>29|(255&an)<<3),Pe[Ve++]=an>>>8&2047,Pe[Ve++]=an>>>19&2047,Pe[Ve++]=2047&(an>>>30|(511&kn)<<2),Pe[Ve++]=kn>>>9&2047,Pe[Ve++]=kn>>>20&2047,Pe[Ve++]=2047&(kn>>>31|(1023&On)<<1),Pe[Ve++]=On>>>10&2047,Pe[Ve]=On>>>21&2047}(D,d,L,W);case 12:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,an=we[ze+8]>>>0,kn=we[ze+9]>>>0,On=we[ze+10]>>>0,_a=we[ze+11]>>>0;Pe[Ve++]=bt>>>0&4095,Pe[Ve++]=bt>>>12&4095,Pe[Ve++]=4095&(bt>>>24|(15&Et)<<8),Pe[Ve++]=Et>>>4&4095,Pe[Ve++]=Et>>>16&4095,Pe[Ve++]=4095&(Et>>>28|(255&er)<<4),Pe[Ve++]=er>>>8&4095,Pe[Ve++]=er>>>20&4095,Pe[Ve++]=tr>>>0&4095,Pe[Ve++]=tr>>>12&4095,Pe[Ve++]=4095&(tr>>>24|(15&xr)<<8),Pe[Ve++]=xr>>>4&4095,Pe[Ve++]=xr>>>16&4095,Pe[Ve++]=4095&(xr>>>28|(255&lr)<<4),Pe[Ve++]=lr>>>8&4095,Pe[Ve++]=lr>>>20&4095,Pe[Ve++]=Mr>>>0&4095,Pe[Ve++]=Mr>>>12&4095,Pe[Ve++]=4095&(Mr>>>24|(15&Xr)<<8),Pe[Ve++]=Xr>>>4&4095,Pe[Ve++]=Xr>>>16&4095,Pe[Ve++]=4095&(Xr>>>28|(255&an)<<4),Pe[Ve++]=an>>>8&4095,Pe[Ve++]=an>>>20&4095,Pe[Ve++]=kn>>>0&4095,Pe[Ve++]=kn>>>12&4095,Pe[Ve++]=4095&(kn>>>24|(15&On)<<8),Pe[Ve++]=On>>>4&4095,Pe[Ve++]=On>>>16&4095,Pe[Ve++]=4095&(On>>>28|(255&_a)<<4),Pe[Ve++]=_a>>>8&4095,Pe[Ve]=_a>>>20&4095}(D,d,L,W);case 16:return void function(we,ze,Pe,nt){let Ve=nt,bt=we[ze]>>>0,Et=we[ze+1]>>>0,er=we[ze+2]>>>0,tr=we[ze+3]>>>0,xr=we[ze+4]>>>0,lr=we[ze+5]>>>0,Mr=we[ze+6]>>>0,Xr=we[ze+7]>>>0,an=we[ze+8]>>>0,kn=we[ze+9]>>>0,On=we[ze+10]>>>0,_a=we[ze+11]>>>0,ta=we[ze+12]>>>0,Ba=we[ze+13]>>>0,Za=we[ze+14]>>>0,Da=we[ze+15]>>>0;Pe[Ve++]=bt>>>0&65535,Pe[Ve++]=bt>>>16&65535,Pe[Ve++]=Et>>>0&65535,Pe[Ve++]=Et>>>16&65535,Pe[Ve++]=er>>>0&65535,Pe[Ve++]=er>>>16&65535,Pe[Ve++]=tr>>>0&65535,Pe[Ve++]=tr>>>16&65535,Pe[Ve++]=xr>>>0&65535,Pe[Ve++]=xr>>>16&65535,Pe[Ve++]=lr>>>0&65535,Pe[Ve++]=lr>>>16&65535,Pe[Ve++]=Mr>>>0&65535,Pe[Ve++]=Mr>>>16&65535,Pe[Ve++]=Xr>>>0&65535,Pe[Ve++]=Xr>>>16&65535,Pe[Ve++]=an>>>0&65535,Pe[Ve++]=an>>>16&65535,Pe[Ve++]=kn>>>0&65535,Pe[Ve++]=kn>>>16&65535,Pe[Ve++]=On>>>0&65535,Pe[Ve++]=On>>>16&65535,Pe[Ve++]=_a>>>0&65535,Pe[Ve++]=_a>>>16&65535,Pe[Ve++]=ta>>>0&65535,Pe[Ve++]=ta>>>16&65535,Pe[Ve++]=Ba>>>0&65535,Pe[Ve++]=Ba>>>16&65535,Pe[Ve++]=Za>>>0&65535,Pe[Ve++]=Za>>>16&65535,Pe[Ve++]=Da>>>0&65535,Pe[Ve]=Da>>>16&65535}(D,d,L,W);case 32:for(let we=0;we<32;we=we+1|0)L[W+we|0]=0|D[d+we|0];return}let le=j_[te]>>>0,pe=d,me=0,Ce=D[pe]>>>0;for(let we=0;we<32;we++)if(me+te<=32)L[W+we]=Ce>>>me&le,me+=te,me===32&&(me=0,pe++,we!==31&&(Ce=D[pe]>>>0));else{let ze=32-me,Pe=Ce>>>me;pe++,Ce=D[pe]>>>0,L[W+we]=(Pe|(Ce&j_[te-ze]>>>0)<=64)throw new Error("Varint too long")}return d.set(te),L}function eF(D,d){let L,W;return W=D[d.get()],d.increment(),L=127&W,W<128?L:(W=D[d.get()],d.increment(),L|=(127&W)<<7,W<128?L:(W=D[d.get()],d.increment(),L|=(127&W)<<14,W<128?L:(W=D[d.get()],d.increment(),L|=(127&W)<<21,W<128?L:(W=D[d.get()],L|=(15&W)<<28,function(te,le,pe){let me,Ce;if(Ce=le[pe.get()],pe.increment(),me=(112&Ce)>>4,Ce<128||(Ce=le[pe.get()],pe.increment(),me|=(127&Ce)<<3,Ce<128)||(Ce=le[pe.get()],pe.increment(),me|=(127&Ce)<<10,Ce<128)||(Ce=le[pe.get()],pe.increment(),me|=(127&Ce)<<17,Ce<128)||(Ce=le[pe.get()],pe.increment(),me|=(127&Ce)<<24,Ce<128)||(Ce=le[pe.get()],pe.increment(),me|=(1&Ce)<<31,Ce<128))return 4294967296*me+(te>>>0);throw new Error("Expected varint not more than 10 bytes")}(L,D,d)))))}function nl(D){return D>>>1^-(1&D)}function Nf(D){return D>>BigInt("1")^-(BigInt("1")&D)}function gp(D){return D%2==1?(D+1)/-2:D/2}function V_(D,d,L){if(L===void 0){L=0;for(let le=0;le=4)for(;W=4)for(;W=4)for(let W=D[0];L>4],me=null;switch(pe){case af.DATA:me={dictionaryType:Object.values(Th)[15&le]};break;case af.OFFSET:me={offsetType:Object.values(vv)[15&le]};break;case af.LENGTH:me={lengthType:Object.values(nh)[15&le]}}te.increment();let Ce=W[te.get()],we=Object.values(_s)[Ce>>5],ze=Object.values(_s)[Ce>>2&7],Pe=Object.values(zd)[3&Ce];te.increment();let nt=bf(W,te,2),Ve=nt[0];return{physicalStreamType:pe,logicalStreamType:me,logicalLevelTechnique1:we,logicalLevelTechnique2:ze,physicalLevelTechnique:Pe,numValues:Ve,byteLength:nt[1],decompressedCount:Ve}}(D,d);return L.logicalLevelTechnique1===_s.MORTON?function(W,te,le){let pe=bf(te,le,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:W.decompressedCount,numBits:pe[0],coordinateShift:pe[1]}}(L,D,d):_s.RLE!==L.logicalLevelTechnique1&&_s.RLE!==L.logicalLevelTechnique2||zd.NONE===L.physicalLevelTechnique?L:function(W,te,le){let pe=bf(te,le,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:pe[1],runs:pe[0],numRleValues:pe[1]}}(L,D,d)}(function(D){D.PRESENT="PRESENT",D.DATA="DATA",D.OFFSET="OFFSET",D.LENGTH="LENGTH"})(af||(af={})),function(D){D.NONE="NONE",D.SINGLE="SINGLE",D.SHARED="SHARED",D.VERTEX="VERTEX",D.MORTON="MORTON",D.FSST="FSST"}(Th||(Th={})),function(D){D.VERTEX="VERTEX",D.INDEX="INDEX",D.STRING="STRING",D.KEY="KEY"}(vv||(vv={})),function(D){D.VAR_BINARY="VAR_BINARY",D.GEOMETRIES="GEOMETRIES",D.PARTS="PARTS",D.RINGS="RINGS",D.TRIANGLES="TRIANGLES",D.SYMBOL="SYMBOL",D.DICTIONARY="DICTIONARY"}(nh||(nh={})),function(D){D[D.FLAT=0]="FLAT",D[D.CONST=1]="CONST",D[D.SEQUENCE=2]="SEQUENCE",D[D.DICTIONARY=3]="DICTIONARY",D[D.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(Wl||(Wl={}));class Ah{constructor(d,L){this.values=d,this._size=L}get(d){let L=Math.floor(d/8);return(this.values[L]>>d%8&1)==1}set(d,L){let W=Math.floor(d/8);this.values[W]=this.values[W]|(L?1:0)<>d%8&1}size(){return this._size}getBuffer(){return this.values}}function yp(D,d,L){if(!d)return D;let W=d.size(),te=new D.constructor(W),le=0;for(let pe=0;pe=4)for(;Ve>>0;for(let nt=1;nt>>0;return Pe}(pe.logicalLevelTechnique2===_s.RLE?V_(le,pe.runs,pe.numRleValues):le);break;case _s.RLE:we=V_(le,pe.runs,pe.numRleValues);break;case _s.MORTON:G_(le),we=le;break;case _s.COMPONENTWISE_DELTA:we=function(ze){if(ze.length<2)return new Uint32Array(ze);let Pe=new Uint32Array(ze.length);Pe[0]=nl(ze[0])>>>0,Pe[1]=nl(ze[1])>>>0;for(let nt=2;nt>>0,Pe[nt+1]=Pe[nt-1]+nl(ze[nt+1])>>>0;return Pe}(le);break;case _s.NONE:we=le;break;default:throw new Error(`The specified Logical level technique is not supported: ${pe.logicalLevelTechnique1}`)}return Ce?yp(we,Ce,0):we}(_p(D,d,L),L,0,te)}function Nd(D,d,L){return function(W,te){if(te.logicalLevelTechnique1===_s.DELTA&&te.logicalLevelTechnique2===_s.NONE)return function(le){let pe=new Int32Array(le.length+1);pe[0]=0,pe[1]=nl(le[0]);let me=pe[1];for(let Ce=2;Ce!==pe.length;++Ce)me+=nl(le[Ce-1]),pe[Ce]=pe[Ce-1]+me;return new Uint32Array(pe)}(W);if(te.logicalLevelTechnique1===_s.RLE&&te.logicalLevelTechnique2===_s.NONE)return function(le,pe,me){let Ce=new Uint32Array(me+1);Ce[0]=0;let we=1,ze=Ce[0];for(let Pe=0;Pe>>2,Et=function(tr,xr){if(xr<=tr.encodedWords.length)return tr.encodedWords;let lr=new Uint32Array(Math.max(16,2*xr));return tr.encodedWords=lr,lr}(nt,bt);(function(tr,xr,lr,Mr){if(xr<0||lr<0||xr+lr>tr.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${xr}, byteLength=${lr}, bytes.length=${tr.length})`);let Xr=Math.floor(lr/4),an=lr%4!=0,kn=an?Xr+1:Xr;if(Mr.length0){let On=tr.byteOffset+xr;if(3&On)for(let _a=0;_a0){let On=0|tr[Mr];if(Mr=Mr+1|0,255&On)throw new Error(`FastPFOR decode: invalid alignedLength=${On} (expected multiple of 256)`);if(Xr+On>an.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${Xr}, alignedLength=${On}, out.length=${an.length})`);Mr=function(_a,ta,Ba,Za,Da,na){let li=Za+U_(Da,ad),xi=Za,ui=Ba;for(;xi!==li;){let Ai=Math.min(q_,li-xi);ui=KR(_a,ta,ui,xi,Ai,na),xi=xi+Ai|0}return ui}(tr,an,Mr,Xr,On,kn),Xr=Xr+On|0}return function(On,_a,ta,Ba,Za,Da){if(Da===0)return _a;let na=0,li=_a,xi=_a+ta,ui=Za,Ai=Za,Lo=Za+Da,bs=0,js=0;for(;li>>na&255;if(na+=8,li+=na>>>5,na&=31,bs|=(127&tl)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${js}, partial=${bs}, decoded=${Ai-ui}/${Da}, inPos=${li}, inEnd=${xi})`)}if(Ai!==Lo)throw new Error(`FastPFOR VByte: truncated stream (decoded=${Ai-ui}, expected=${Da}, consumedWords=${li-_a}/${ta}, vbyteStart=${_a}, vbyteEnd=${xi})`)}(tr,Mr,tr.length-Mr|0,an,Xr,xr-Xr|0),an}(Et.subarray(0,bt),we,nt.decoderWorkspace);return Pe.add(ze),er}(te,le,pe,me,function(Ce=16){if(Ce<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${Ce}`);let we=Math.max(16,0|Ce);return{encodedWords:new Uint32Array(we),decoderWorkspace:n6()}}(pe>>>2))}(D,L.numValues,L.byteLength,d);case zd.VARINT:return bf(D,d,L.numValues);case zd.NONE:{let te=d.get();d.add(L.byteLength);let le=D.subarray(te,d.get());return new Uint32Array(le)}default:throw new Error(`Specified physicalLevelTechnique ${W} is not supported (yet).`)}}function Y_(D,d,L){let W=_p(D,d,L);return W.length===1?W[0]:function(te){return te[1]}(W)}function l6(D,d,L){return function(W){if(W.length===2){let te=nl(W[1]);return[te,te]}return[nl(W[2]),nl(W[3])]}(_p(D,d,L))}function u6(D,d,L){return function(W){if(W.length===2){let te=Nf(W[1]);return[te,te]}return[Nf(W[2]),Nf(W[3])]}(mp(D,d,L.numValues))}function c6(D,d,L,W){return function(te,le,pe){let me;switch(le.logicalLevelTechnique1){case _s.DELTA:me=function(Ce){let we=new BigUint64Array(Ce.length);we[0]=BigInt.asUintN(64,Nf(Ce[0]));for(let ze=1;ze>1,d)-L}}function v6(D,d){let L=0;for(let W=0;W>W;return L}function bp(D,d,L,W,te,le,pe){return D===Bd.MORTON?function(me,Ce,we,ze,Pe,nt){let Ve=new Array(Pe?ze+1:ze);for(let bt=0;bt[Xr]),W+=lr,te+=lr}break;case Tc.LINESTRING:{let lr,Mr;er?(lr=Ve[te]-Ve[te-1],te++):lr=nt[W]-nt[W-1],W++,Et?(Mr=xp(tr,me,lr,!1),me+=2*lr):(Mr=bp(d.vertexBufferType,tr,bt,Ce,lr,!1,we),Ce+=lr),L[pe++]=[Mr],Pe&&le++}break;case Tc.POLYGON:{let lr=nt[W]-nt[W-1];W++;let Mr=new Array(lr-1),Xr,an=Ve[te]-Ve[te-1];if(te++,Et){Xr=xp(tr,me,an,!0),me+=2*an;for(let kn=0;kn0&&Et.push(Et[0]),nt.push(Et)}d[ze]=nt,le&&we++}break;case Tc.MULTIPOLYGON:{let Pe=le[we]-le[we-1];we++;let nt=[];for(let Ve=0;Ve0&&tr.push(tr[0]),nt.push(tr)}}d[ze]=nt}}return d}[Symbol.iterator](){return null}}function _6(D,d,L,W,te,le){return new tF(D,d,L,W,te,le)}class tF extends y6{constructor(d,L,W,te,le,pe){super(W,te,le,pe),this._numGeometries=d,this._geometryType=L}geometryType(d){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function b6(D,d,L,W,te){return new rF(D,d,L,W,te)}class rF extends y6{constructor(d,L,W,te,le){super(L,W,te,le),this._geometryTypes=d}geometryType(d){return this._geometryTypes[d]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function nF(D,d,L,W,te){let le=Of(D,L),pe,me,Ce,we;if(ag(le,W,D,L)===Wl.CONST){let xr=Y_(D,L,le),lr,Mr,Xr,an;for(let kn=0;knL?d[le++]:1);return W}function x6(D,d,L,W){let te=new Uint32Array(d[d.length-1]+1),le=0;te[0]=le;let pe=1,me=0;for(let Ce=0;Ce=nt);){let Ve=pe[we.increment()];if(Ve<=127){let bt=Ve+3,Et=pe[we.increment()],er=Math.min(Pe+bt,me);ze.fill(Et,Pe,er),Pe=er}else{let bt=256-Ve;for(let Et=0;Et=12?oF.decode(D.subarray(d,L)):function(W,te,le){let pe="",me=te;for(;me239?4:Ce>223?3:Ce>191?2:1;if(me+Ve>le)break;Ve===1?Ce<128&&(nt=Ce):Ve===2?(we=W[me+1],(192&we)==128&&(nt=(31&Ce)<<6|63&we,nt<=127&&(nt=null))):Ve===3?(we=W[me+1],ze=W[me+2],(192&we)==128&&(192&ze)==128&&(nt=(15&Ce)<<12|(63&we)<<6|63&ze,(nt<=2047||nt>=55296&&nt<=57343)&&(nt=null))):Ve===4&&(we=W[me+1],ze=W[me+2],Pe=W[me+3],(192&we)==128&&(192&ze)==128&&(192&Pe)==128&&(nt=(15&Ce)<<18|(63&we)<<12|(63&ze)<<6|63&Pe,(nt<=65535||nt>=1114112)&&(nt=null))),nt===null?(nt=65533,Ve=1):nt>65535&&(nt-=65536,pe+=String.fromCharCode(nt>>>10&1023|55296),nt=56320|1023&nt),pe+=String.fromCharCode(nt),me+=Ve}return pe}(D,d,L)}class K_ extends pp{constructor(d,L,W,te){super(d,W,te),this.offsetBuffer=L}}class T6 extends K_{constructor(d,L,W,te){super(d,L,W,te??L.length-1)}getValueFromBuffer(d){return Z_(this.dataBuffer,this.offsetBuffer[d],this.offsetBuffer[d+1])}}class wp extends K_{constructor(d,L,W,te,le){super(d,W,te,le??L.length),this.indexBuffer=L,this.indexBuffer=L}getValueFromBuffer(d){let L=this.indexBuffer[d];return Z_(this.dataBuffer,this.offsetBuffer[L],this.offsetBuffer[L+1])}}class A6 extends K_{constructor(d,L,W,te,le,pe,me){super(d,W,te,me),this.indexBuffer=L,this.symbolOffsetBuffer=le,this.symbolTableBuffer=pe}getValueFromBuffer(d){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(W,te,le){let pe=[],me=new Array(te.length).fill(0);for(let Ce=1;Ce=10}function E6(D){return D===30}function lF(D){if(D.type==="scalarType"){let d=D.scalarType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(d.type==="logicalType")return!1}else if(D.type==="complexType"){let d=D.complexType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",D),!1}function uF(D){var d;return D.type==="complexType"&&((d=D.complexType)==null?void 0:d.type)==="physicalType"&&D.complexType.physicalType===0}let cF=new TextDecoder;function J_(D,d){let L=bf(D,d,1)[0];if(L===0)return"";let W=d.get(),te=D.subarray(W,W+L);return d.add(L),cF.decode(te)}function k6(D,d){let L=bf(D,d,1)[0]>>>0;if(L<10||L>30)throw new Error(`Unsupported field type code ${L}. Supported: 10-29(scalars), 30(STRUCT)`);let W=M6(L);if(S6(L)&&(W.name=J_(D,d)),E6(L)){let te=bf(D,d,1)[0]>>>0;W.complexType.children=new Array(te);for(let le=0;le>>0,W=M6(L);if(!W)throw new Error(`Unsupported column type code ${L}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(S6(L)?W.name=J_(D,d):L>=0&&L<=3?W.name="id":L===4&&(W.name="geometry"),E6(L)){let te=bf(D,d,1)[0]>>>0,le=W.complexType;le.children=new Array(te);for(let pe=0;pe>>0,le=bf(D,d,1)[0]>>>0;W.columns=new Array(le);for(let pe=0;pe=4)for(;Xr>>0,Pe=me.get()+ze;if(Pe>W.length)throw new Error(`Block overruns tile: ${Pe} > ${W.length}`);if(bf(W,me,1)[0]>>>0!=1){me.set(Pe);continue}let[nt,Ve]=hF(W,me),bt=nt.featureTables[0],Et=null,er=null,tr=[],xr=0;for(let Mr of bt.columns){let Xr=Mr.name;if((we=Mr).type==="scalarType"&&((pe=we.scalarType)==null?void 0:pe.type)==="logicalType"&&we.scalarType.logicalType===0){let an=null;if(Mr.nullable){let On=Of(W,me),_a=me.get(),ta=M0(W,On.numValues,On.byteLength,me);me.set(_a+On.byteLength),an=new Ah(ta,On.numValues)}let kn=Of(W,me);xr=an?an.size():kn.decompressedCount,Et=dF(W,Mr,me,Xr,kn,an??xr,le)}else if(uF(Mr)){let an=bf(W,me,1)[0];if(xr===0){let kn=me.get();xr=Of(W,me).decompressedCount,me.set(kn)}er=nF(W,an,me,xr)}else{let an=lF(Mr)?bf(W,me,1)[0]:1;if(an===0)continue;let kn=sF(W,me,Mr,an,xr);if(kn)if(Array.isArray(kn))for(let On of kn)tr.push(On);else tr.push(kn)}}let lr=new GR(bt.name,er,Et,tr,Ve);Ce.push(lr),me.set(Pe)}var we;return Ce}(new Uint8Array(d));this.layers=L.reduce((W,te)=>Object.assign(Object.assign({},W),{[te.name]:new pF(te)}),{})}}class mF{constructor(d,L){this.feature=d,this.type=d.type,this.properties=d.tags?d.tags:{},this.extent=L,"id"in d&&(typeof d.id=="string"?this.id=parseInt(d.id,10):typeof d.id!="number"||isNaN(d.id)||(this.id=d.id))}loadGeometry(){let d=[],L=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let W of L){let te=[];for(let le of W)te.push(new t(le[0],le[1]));d.push(te)}return d}}let E0="_geojsonTileLayer";function gF(D,d,L=""){d.writeVarintField(15,D.version||1),d.writeStringField(1,D.name||""),d.writeVarintField(5,D.extent||4096);let W={jsonPrefix:L,keys:[],values:[],keycache:{},valuecache:{}};for(let pe=0;pe>31}function bF(D,d){let L=D.loadGeometry(),W=D.type,te=0,le=0;for(let pe of L){let me=1;W===1&&(me=pe.length),d.writeVarint(Q_(1,me));let Ce=W===3?pe.length-1:pe.length;for(let we=0;we=0&&ze[3]>=0&&Ce.insert(me,ze[0],ze[1],ze[2],ze[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new aT(new Jm(this.rawTileData)).layers:new C6(this.rawTileData).layers,this.sourceLayerCoder=new QT(this.vtLayers?Object.keys(this.vtLayers).sort():[E0])),this.vtLayers}query(d,L,W,te){this.loadVTLayers();let le=d.params,pe=F/d.tileSize/d.scale,me=Jn(le.filter,le.globalState),Ce=d.queryGeometry,we=d.queryPadding*pe,ze=dv.fromPoints(Ce),Pe=this.grid.query(ze.minX-we,ze.minY-we,ze.maxX+we,ze.maxY+we),nt=dv.fromPoints(d.cameraQueryGeometry).expandBy(we),Ve=this.grid3D.query(nt.minX,nt.minY,nt.maxX,nt.maxY,(er,tr,xr,lr)=>function(Mr,Xr,an,kn,On){for(let ta of Mr)if(Xr<=ta.x&&an<=ta.y&&kn>=ta.x&&On>=ta.y)return!0;let _a=[new t(Xr,an),new t(Xr,On),new t(kn,On),new t(kn,an)];if(Mr.length>2){for(let ta of _a)if(sa(Mr,ta))return!0}for(let ta=0;ta(xr||(xr=Hl(lr)),Mr.queryIntersectsFeature({queryGeometry:Ce,feature:lr,featureState:Xr,geometry:xr,zoom:this.z,transform:d.transform,pixelsToTileUnits:pe,pixelPosMatrix:d.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:d.getElevation})))}return bt}loadMatchingFeature(d,L,W,te,le,pe,me,Ce,we,ze,Pe){let nt=this.bucketLayerIDs[L];if(pe&&!nt.some(er=>pe.has(er)))return;let Ve=this.sourceLayerCoder.decode(W),bt=this.vtLayers[Ve].feature(te);if(le.needGeometry){let er=Co(bt,!0);if(!le.filter(new Ti(this.tileID.overscaledZ),er,this.tileID.canonical))return}else if(!le.filter(new Ti(this.tileID.overscaledZ),bt))return;let Et=this.getId(bt,Ve);for(let er of nt){if(pe&&!pe.has(er))continue;let tr=Ce[er];if(!tr)continue;let xr={};Et&&ze&&(xr=ze.getState(tr.sourceLayer||E0,Et));let lr=X({},we[er]);lr.paint=D6(lr.paint,tr.paint,bt,xr,me),lr.layout=D6(lr.layout,tr.layout,bt,xr,me);let Mr=!Pe||Pe(bt,tr,xr);if(!Mr)continue;let Xr=new e6(bt,this.z,this.x,this.y,Et);Xr.layer=lr;let an=d[er];an===void 0&&(an=d[er]=[]),an.push({featureIndex:te,feature:Xr,intersectionZ:Mr})}}lookupSymbolFeatures(d,L,W,te,le,pe,me,Ce){let we={};this.loadVTLayers();let ze=Jn(le.filterSpec,le.globalState);for(let Pe of d)this.loadMatchingFeature(we,W,te,Pe,ze,pe,me,Ce,L);return we}hasLayer(d){for(let L of this.bucketLayerIDs)for(let W of L)if(d===W)return!0;return!1}getId(d,L){var W;let te=d.id;return this.promoteId&&(te=d.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[L]],typeof te=="boolean"&&(te=Number(te)),te===void 0&&(!((W=d.properties)===null||W===void 0)&&W.cluster)&&this.promoteId&&(te=Number(d.properties.cluster_id))),te}}function D6(D,d,L,W,te){return G(D,(le,pe)=>{let me=d instanceof Tu?d.get(pe):null;return me?.evaluate?me.evaluate(L,W,te):me})}function wF(D,d){return d-D}function I6(D,d,L,W,te){let le=[];for(let pe of D){let me;for(let Ce=0;Ce=W&&ze.x>=W||(we.x>=W?we=new t(W,we.y+(W-we.x)/(ze.x-we.x)*(ze.y-we.y))._round():ze.x>=W&&(ze=new t(W,we.y+(W-we.x)/(ze.x-we.x)*(ze.y-we.y))._round()),we.y>=te&&ze.y>=te||(we.y>=te?we=new t(we.x+(te-we.y)/(ze.y-we.y)*(ze.x-we.x),te)._round():ze.y>=te&&(ze=new t(we.x+(te-we.y)/(ze.y-we.y)*(ze.x-we.x),te)._round()),me&&we.equals(me[me.length-1])||(me=[we],le.push(me)),me.push(ze)))))}}return le}function R6(D,d,L,W,te){switch(d){case 1:return function(le,pe,me,Ce){let we=[];for(let ze of le)for(let Pe of ze){let nt=Ce===0?Pe.x:Pe.y;nt>=pe&&nt<=me&&we.push([Pe])}return we}(D,L,W,te);case 2:return F6(D,L,W,te,!1);case 3:return F6(D,L,W,te,!0)}return[]}function TF(D,d,L,W,te){let le=W===0?AF:MF,pe=[],me=[];for(let ze=0;zed&&pe.push(le(Pe,nt,d)):Ve>L?bt=d&&(pe.push(le(Pe,nt,d)),Et=!0),bt>L&&Ve<=L&&(pe.push(le(Pe,nt,L)),Et=!0),!te&&Et&&(me.push(pe),pe=[])}let Ce=D.length-1,we=W===0?D[Ce].x:D[Ce].y;return we>=d&&we<=L&&pe.push(D[Ce]),te&&pe.length>0&&!pe[0].equals(pe[pe.length-1])&&pe.push(new t(pe[0].x,pe[0].y)),pe.length>0&&me.push(pe),me}function F6(D,d,L,W,te){let le=[];for(let pe of D){let me=TF(pe,d,L,W,te);me.length>0&&le.push(...me)}return le}function AF(D,d,L){return new t(L,D.y+(L-D.x)/(d.x-D.x)*(d.y-D.y))}function MF(D,d,L){return new t(D.x+(L-D.y)/(d.y-D.y)*(d.x-D.x),L)}Ci("FeatureIndex",P6,{omit:["rawTileData","sourceLayerCoder"]});class Od extends t{constructor(d,L,W,te){super(d,L),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new Od(this.x,this.y,this.angle,this.segment)}}function z6(D,d,L,W,te){if(d.segment===void 0||L===0)return!0;let le=d,pe=d.segment+1,me=0;for(;me>-L/2;){if(pe--,pe<0)return!1;me-=D[pe].dist(le),le=D[pe]}me+=D[pe].dist(D[pe+1]),pe++;let Ce=[],we=0;for(;meW;)we-=Ce.shift().angleDelta;if(we>te)return!1;pe++,me+=ze.dist(Pe)}return!0}function B6(D){let d=0;for(let L=0;Lwe){let bt=(we-Ce)/Ve,Et=Ls.number(Pe.x,nt.x,bt),er=Ls.number(Pe.y,nt.y,bt),tr=new Od(Et,er,nt.angleTo(Pe),ze);return tr._round(),!pe||z6(D,tr,me,pe,d)?tr:void 0}Ce+=Ve}}function EF(D,d,L,W,te,le,pe,me,Ce){let we=N6(W,le,pe),ze=O6(W,te),Pe=ze*pe,nt=D[0].x===0||D[0].x===Ce||D[0].y===0||D[0].y===Ce;return d-Pe=0&&Mr=0&&Xr=0&&nt+we<=ze){let an=new Od(Mr,Xr,xr,bt);an._round(),W&&!z6(D,an,le,W,te)||Ve.push(an)}}Pe+=tr}return me||Ve.length||pe||(Ve=j6(D,Pe/2,L,W,te,le,pe,!0,Ce)),Ve}function U6(D,d,L,W){let te=[],le=D.image,pe=le.pixelRatio,me=le.paddedRect.w-2,Ce=le.paddedRect.h-2,we={x1:D.left,y1:D.top,x2:D.right,y2:D.bottom},ze=le.stretchX||[[0,me]],Pe=le.stretchY||[[0,Ce]],nt=(na,li)=>na+li[1]-li[0],Ve=ze.reduce(nt,0),bt=Pe.reduce(nt,0),Et=me-Ve,er=Ce-bt,tr=0,xr=Ve,lr=0,Mr=bt,Xr=0,an=Et,kn=0,On=er;if(le.content&&W){let na=le.content,li=na[2]-na[0],xi=na[3]-na[1];(le.textFitWidth||le.textFitHeight)&&(we=BT(D)),tr=ig(ze,0,na[0]),lr=ig(Pe,0,na[1]),xr=ig(ze,na[0],na[2]),Mr=ig(Pe,na[1],na[3]),Xr=na[0]-tr,kn=na[1]-lr,an=li-xr,On=xi-Mr}let _a=we.x1,ta=we.y1,Ba=we.x2-_a,Za=we.y2-ta,Da=(na,li,xi,ui)=>{let Ai=og(na.stretch-tr,xr,Ba,_a),Lo=sg(na.fixed-Xr,an,na.stretch,Ve),bs=og(li.stretch-lr,Mr,Za,ta),js=sg(li.fixed-kn,On,li.stretch,bt),tl=og(xi.stretch-tr,xr,Ba,_a),sf=sg(xi.fixed-Xr,an,xi.stretch,Ve),vu=og(ui.stretch-lr,Mr,Za,ta),sc=sg(ui.fixed-kn,On,ui.stretch,bt),Ac=new t(Ai,bs),Yl=new t(tl,bs),Vc=new t(tl,vu),xf=new t(Ai,vu),wf=new t(Lo/pe,js/pe),Wf=new t(sf/pe,sc/pe),lf=d*Math.PI/180;if(lf){let Mc=Math.sin(lf),au=Math.cos(lf),Ju=[au,-Mc,Mc,au];Ac._matMult(Ju),Yl._matMult(Ju),xf._matMult(Ju),Vc._matMult(Ju)}let Yf=na.stretch+na.fixed,vh=li.stretch+li.fixed;return{tl:Ac,tr:Yl,bl:xf,br:Vc,tex:{x:le.paddedRect.x+1+Yf,y:le.paddedRect.y+1+vh,w:xi.stretch+xi.fixed-Yf,h:ui.stretch+ui.fixed-vh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:wf,pixelOffsetBR:Wf,minFontScaleX:an/pe/Ba,minFontScaleY:On/pe/Za,isSDF:L}};if(W&&(le.stretchX||le.stretchY)){let na=q6(ze,Et,Ve),li=q6(Pe,er,bt);for(let xi=0;xi0&&(Et=Math.max(10,Et),this.circleDiameter=Et)}else{let nt=!((Pe=pe.image)===null||Pe===void 0)&&Pe.content&&(pe.image.textFitWidth||pe.image.textFitHeight)?BT(pe):{x1:pe.left,y1:pe.top,x2:pe.right,y2:pe.bottom};nt.y1=nt.y1*me-Ce[0],nt.y2=nt.y2*me+Ce[2],nt.x1=nt.x1*me-Ce[3],nt.x2=nt.x2*me+Ce[1];let Ve=pe.collisionPadding;if(Ve&&(nt.x1-=Ve[0]*me,nt.y1-=Ve[1]*me,nt.x2+=Ve[2]*me,nt.y2+=Ve[3]*me),ze){let bt=new t(nt.x1,nt.y1),Et=new t(nt.x2,nt.y1),er=new t(nt.x1,nt.y2),tr=new t(nt.x2,nt.y2),xr=ze*Math.PI/180;bt._rotate(xr),Et._rotate(xr),er._rotate(xr),tr._rotate(xr),nt.x1=Math.min(bt.x,Et.x,er.x,tr.x),nt.x2=Math.max(bt.x,Et.x,er.x,tr.x),nt.y1=Math.min(bt.y,Et.y,er.y,tr.y),nt.y2=Math.max(bt.y,Et.y,er.y,tr.y)}d.emplaceBack(L.x,L.y,nt.x1,nt.y1,nt.x2,nt.y2,W,te,le)}this.boxEndIndex=d.length}}class kF{constructor(d=[],L=(W,te)=>Wte?1:0){if(this.data=d,this.length=this.data.length,this.compare=L,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(d){this.data.push(d),this._up(this.length++)}pop(){if(this.length===0)return;let d=this.data[0],L=this.data.pop();return--this.length>0&&(this.data[0]=L,this._down(0)),d}peek(){return this.data[0]}_up(d){let{data:L,compare:W}=this,te=L[d];for(;d>0;){let le=d-1>>1,pe=L[le];if(W(te,pe)>=0)break;L[d]=pe,d=le}L[d]=te}_down(d){let{data:L,compare:W}=this,te=this.length>>1,le=L[d];for(;d=0)break;L[d]=L[pe],d=pe}L[d]=le}}function CF(D,d=1){let L=dv.fromPoints(D[0]),W=Math.min(L.width(),L.height()),te=W/2,le=new kF([],LF),{minX:pe,minY:me,maxX:Ce,maxY:we}=L;if(W===0)return new t(pe,me);for(let nt=pe;ntPe.d||!Pe.d)&&(Pe=nt),nt.max-Pe.d<=d||(te=nt.h/2,le.push(new Tp(nt.p.x-te,nt.p.y-te,te,D)),le.push(new Tp(nt.p.x+te,nt.p.y-te,te,D)),le.push(new Tp(nt.p.x-te,nt.p.y+te,te,D)),le.push(new Tp(nt.p.x+te,nt.p.y+te,te,D)))}return ze.d>0&&Pe.d-ze.d<=d?ze.p:Pe.p}function LF(D,d){return d.max-D.max}class Tp{constructor(d,L,W,te){this.p=new t(d,L),this.h=W,this.d=function(le,pe){let me=!1,Ce=1/0;for(let we of pe)for(let ze=0,Pe=we.length,nt=Pe-1;zele.y!=bt.y>le.y&&le.x<(bt.x-Ve.x)*(le.y-Ve.y)/(bt.y-Ve.y)+Ve.x&&(me=!me),Ce=Math.min(Ce,dn(le,Ve,bt))}return(me?1:-1)*Math.sqrt(Ce)}(this.p,te),this.max=this.d+this.h*Math.SQRT2}}var of;l.aM=void 0,(of=l.aM||(l.aM={}))[of.center=1]="center",of[of.left=2]="left",of[of.right=3]="right",of[of.top=4]="top",of[of.bottom=5]="bottom",of[of["top-left"]=6]="top-left",of[of["top-right"]=7]="top-right",of[of["bottom-left"]=8]="bottom-left",of[of["bottom-right"]=9]="bottom-right";let eb=Number.POSITIVE_INFINITY;function V6(D,d){return d[1]!==eb?function(L,W,te){let le=0,pe=0;switch(W=Math.abs(W),te=Math.abs(te),L){case"top-right":case"top-left":case"top":pe=te-7;break;case"bottom-right":case"bottom-left":case"bottom":pe=7-te}switch(L){case"top-right":case"bottom-right":case"right":le=-W;break;case"top-left":case"bottom-left":case"left":le=W}return[le,pe]}(D,d[0],d[1]):function(L,W){let te=0,le=0;W<0&&(W=0);let pe=W/Math.SQRT2;switch(L){case"top-right":case"top-left":le=pe-7;break;case"bottom-right":case"bottom-left":le=7-pe;break;case"bottom":le=7-W;break;case"top":le=W-7}switch(L){case"top-right":case"bottom-right":te=-pe;break;case"top-left":case"bottom-left":te=pe;break;case"left":te=W;break;case"right":te=-W}return[te,le]}(D,d[0])}function H6(D,d,L){var W;let te=D.layout,le=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(d,{},L);if(le){let me=le.values,Ce=[];for(let we=0;went*wc);ze.startsWith("top")?Pe[1]-=7:ze.startsWith("bottom")&&(Pe[1]+=7),Ce[we+1]=Pe}return new zi(Ce)}let pe=te.get("text-variable-anchor");if(pe){let me;me=D._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(d,{},L)*wc,eb]:te.get("text-offset").evaluate(d,{},L).map(we=>we*wc);let Ce=[];for(let we of pe)Ce.push(we,V6(we,me));return new zi(Ce)}return null}function tb(D){switch(D){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function PF(D,d,L,W,te,le,pe,me,Ce,we,ze,Pe){let nt=le.textMaxSize.evaluate(d,{});nt===void 0&&(nt=pe);let Ve=D.layers[0].layout,bt=Ve.get("icon-offset").evaluate(d,{},ze),Et=W6(L.horizontal),er=pe/24,tr=D.tilePixelRatio*er,xr=D.tilePixelRatio*nt/24,lr=D.tilePixelRatio*me,Mr=D.tilePixelRatio*Ve.get("symbol-spacing"),Xr=Ve.get("text-padding")*D.tilePixelRatio,an=function(xi,ui,Ai,Lo=1){let bs=xi.get("icon-padding").evaluate(ui,{},Ai),js=bs?.values;return[js[0]*Lo,js[1]*Lo,js[2]*Lo,js[3]*Lo]}(Ve,d,ze,D.tilePixelRatio),kn=Ve.get("text-max-angle")/180*Math.PI,On=Ve.get("text-rotation-alignment")!=="viewport"&&Ve.get("symbol-placement")!=="point",_a=Ve.get("icon-rotation-alignment")==="map"&&Ve.get("symbol-placement")!=="point",ta=Ve.get("symbol-placement"),Ba=Mr/2,Za=Ve.get("icon-text-fit"),Da;W&&Za!=="none"&&(D.allowVerticalPlacement&&L.vertical&&(Da=NT(W,L.vertical,Za,Ve.get("icon-text-fit-padding"),bt,er)),Et&&(W=NT(W,Et,Za,Ve.get("icon-text-fit-padding"),bt,er)));let na=ze?Pe.line.getGranularityForZoomLevel(ze.z):1,li=(xi,ui)=>{ui.x<0||ui.x>=F||ui.y<0||ui.y>=F||function(Ai,Lo,bs,js,tl,sf,vu,sc,Ac,Yl,Vc,xf,wf,Wf,lf,Yf,vh,Mc,au,Ju,pu,Sc,id,Mh,k0){let jd=Ai.addToLineVertexArray(Lo,bs),pv,Ap,Mp,Sp,Y6=0,X6=0,$6=0,Z6=0,rb=-1,nb=-1,od={},K6=pi("");if(Ai.allowVerticalPlacement&&js.vertical){let Tf=sc.layout.get("text-rotate").evaluate(pu,{},Mh)+90;Mp=new lg(Ac,Lo,Yl,Vc,xf,js.vertical,wf,Wf,lf,Tf),vu&&(Sp=new lg(Ac,Lo,Yl,Vc,xf,vu,vh,Mc,lf,Tf))}if(tl){let Tf=sc.layout.get("icon-rotate").evaluate(pu,{}),ih=sc.layout.get("icon-text-fit")!=="none",mv=U6(tl,Tf,id,ih),Eh=vu?U6(vu,Tf,id,ih):void 0;Ap=new lg(Ac,Lo,Yl,Vc,xf,tl,vh,Mc,!1,Tf),Y6=4*mv.length;let gv=Ai.iconSizeData,Uh=null;gv.kind==="source"?(Uh=[nd*sc.layout.get("icon-size").evaluate(pu,{})],Uh[0]>Rd&&ee(`${Ai.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):gv.kind==="composite"&&(Uh=[nd*Sc.compositeIconSizes[0].evaluate(pu,{},Mh),nd*Sc.compositeIconSizes[1].evaluate(pu,{},Mh)],(Uh[0]>Rd||Uh[1]>Rd)&&ee(`${Ai.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),Ai.addSymbols(Ai.icon,mv,Uh,Ju,au,pu,l.ax.none,Lo,jd.lineStartIndex,jd.lineLength,-1,Mh),rb=Ai.icon.placedSymbolArray.length-1,Eh&&(X6=4*Eh.length,Ai.addSymbols(Ai.icon,Eh,Uh,Ju,au,pu,l.ax.vertical,Lo,jd.lineStartIndex,jd.lineLength,-1,Mh),nb=Ai.icon.placedSymbolArray.length-1)}let J6=Object.keys(js.horizontal);for(let Tf of J6){let ih=js.horizontal[Tf];if(!pv){K6=pi(ih.text);let Eh=sc.layout.get("text-rotate").evaluate(pu,{},Mh);pv=new lg(Ac,Lo,Yl,Vc,xf,ih,wf,Wf,lf,Eh)}let mv=ih.positionedLines.length===1;if($6+=G6(Ai,Lo,ih,sf,sc,lf,pu,Yf,jd,js.vertical?l.ax.horizontal:l.ax.horizontalOnly,mv?J6:[Tf],od,rb,Sc,Mh),mv)break}js.vertical&&(Z6+=G6(Ai,Lo,js.vertical,sf,sc,lf,pu,Yf,jd,l.ax.vertical,["vertical"],od,nb,Sc,Mh));let IF=pv?pv.boxStartIndex:Ai.collisionBoxArray.length,RF=pv?pv.boxEndIndex:Ai.collisionBoxArray.length,FF=Mp?Mp.boxStartIndex:Ai.collisionBoxArray.length,zF=Mp?Mp.boxEndIndex:Ai.collisionBoxArray.length,BF=Ap?Ap.boxStartIndex:Ai.collisionBoxArray.length,NF=Ap?Ap.boxEndIndex:Ai.collisionBoxArray.length,OF=Sp?Sp.boxStartIndex:Ai.collisionBoxArray.length,jF=Sp?Sp.boxEndIndex:Ai.collisionBoxArray.length,Sh=-1,ug=(Tf,ih)=>Tf?.circleDiameter?Math.max(Tf.circleDiameter,ih):ih;Sh=ug(pv,Sh),Sh=ug(Mp,Sh),Sh=ug(Ap,Sh),Sh=ug(Sp,Sh);let Q6=Sh>-1?1:0;Q6&&(Sh*=k0/wc),Ai.glyphOffsetArray.length>=dp.MAX_GLYPHS&&ee("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),pu.sortKey!==void 0&&Ai.addToSortKeyRanges(Ai.symbolInstances.length,pu.sortKey);let UF=H6(sc,pu,Mh),[qF,VF]=function(Tf,ih){let mv=Tf.length,Eh=ih?.values;if(Eh?.length>0)for(let gv=0;gv=0?od.right:-1,od.center>=0?od.center:-1,od.left>=0?od.left:-1,od.vertical||-1,rb,nb,K6,IF,RF,FF,zF,BF,NF,OF,jF,Yl,$6,Z6,Y6,X6,Q6,0,wf,Sh,qF,VF)}(D,ui,xi,L,W,te,Da,D.layers[0],D.collisionBoxArray,d.index,d.sourceLayerIndex,D.index,tr,[Xr,Xr,Xr,Xr],On,Ce,lr,an,_a,bt,d,le,we,ze,pe)};if(ta==="line")for(let xi of I6(d.geometry,0,0,F,F)){let ui=hv(xi,na),Ai=EF(ui,Mr,kn,L.vertical||Et,W,24,xr,D.overscaling,F);for(let Lo of Ai)Et&&DF(D,Et.text,Ba,Lo)||li(ui,Lo)}else if(ta==="line-center"){for(let xi of d.geometry)if(xi.length>1){let ui=hv(xi,na),Ai=SF(ui,kn,L.vertical||Et,W,24,xr);Ai&&li(ui,Ai)}}else if(d.type==="Polygon")for(let xi of Rc(d.geometry,0)){let ui=CF(xi,16);li(hv(xi[0],na,!0),new Od(ui.x,ui.y,0))}else if(d.type==="LineString")for(let xi of d.geometry){let ui=hv(xi,na);li(ui,new Od(ui[0].x,ui[0].y,0))}else if(d.type==="Point")for(let xi of d.geometry)for(let ui of xi)li([ui],new Od(ui.x,ui.y,0))}function G6(D,d,L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt){let Et=function(xr,lr,Mr,Xr,an,kn,On,_a){let ta=Xr.layout.get("text-rotate").evaluate(kn,{})*Math.PI/180,Ba=[];for(let Za of lr.positionedLines)for(let Da of Za.positionedGlyphs){if(!Da.rect)continue;let na=Da.rect||{},li=4,xi=!0,ui=1,Ai=0,Lo=(an||_a)&&Da.vertical,bs=Da.metrics.advance*Da.scale/2;if(_a&&lr.verticalizable&&(Ai=Za.lineOffset/2-(Da.imageName?-(wc-Da.metrics.width*Da.scale)/2:(Da.scale-1)*wc)),Da.imageName){let Mc=On[Da.imageName];xi=Mc.sdf,ui=Mc.pixelRatio,li=1/ui}let js=an?[Da.x+bs,Da.y]:[0,0],tl=an?[0,0]:[Da.x+bs+Mr[0],Da.y+Mr[1]-Ai],sf=[0,0];Lo&&(sf=tl,tl=[0,0]);let vu=Da.metrics.isDoubleResolution?2:1,sc=(Da.metrics.left-li)*Da.scale-bs+tl[0],Ac=(-Da.metrics.top-li)*Da.scale+tl[1],Yl=sc+na.w/vu*Da.scale/ui,Vc=Ac+na.h/vu*Da.scale/ui,xf=new t(sc,Ac),wf=new t(Yl,Ac),Wf=new t(sc,Vc),lf=new t(Yl,Vc);if(Lo){let Mc=new t(-bs,bs- -17),au=-Math.PI/2,Ju=12-bs,pu=new t(22-Ju,-(Da.imageName?Ju:0)),Sc=new t(...sf);xf._rotateAround(au,Mc)._add(pu)._add(Sc),wf._rotateAround(au,Mc)._add(pu)._add(Sc),Wf._rotateAround(au,Mc)._add(pu)._add(Sc),lf._rotateAround(au,Mc)._add(pu)._add(Sc)}if(ta){let Mc=Math.sin(ta),au=Math.cos(ta),Ju=[au,-Mc,Mc,au];xf._matMult(Ju),wf._matMult(Ju),Wf._matMult(Ju),lf._matMult(Ju)}let Yf=new t(0,0),vh=new t(0,0);Ba.push({tl:xf,tr:wf,bl:Wf,br:lf,tex:na,writingMode:lr.writingMode,glyphOffset:js,sectionIndex:Da.sectionIndex,isSDF:xi,pixelOffsetTL:Yf,pixelOffsetBR:vh,minFontScaleX:0,minFontScaleY:0})}return Ba}(0,L,me,te,le,pe,W,D.allowVerticalPlacement),er=D.textSizeData,tr=null;er.kind==="source"?(tr=[nd*te.layout.get("text-size").evaluate(pe,{})],tr[0]>Rd&&ee(`${D.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):er.kind==="composite"&&(tr=[nd*Ve.compositeTextSizes[0].evaluate(pe,{},bt),nd*Ve.compositeTextSizes[1].evaluate(pe,{},bt)],(tr[0]>Rd||tr[1]>Rd)&&ee(`${D.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),D.addSymbols(D.text,Et,tr,me,le,pe,we,d,Ce.lineStartIndex,Ce.lineLength,nt,bt);for(let xr of ze)Pe[xr]=D.text.placedSymbolArray.length-1;return 4*Et.length}function W6(D){for(let d in D)return D[d];return null}function DF(D,d,L,W){let te=D.compareText;if(d in te){let le=te[d];for(let pe=le.length-1;pe>=0;pe--)if(W.dist(le[pe])this.process()),this.subscription=qe(this.target,"message",L=>this.receive(L),!1),this.globalScope=fe(self)?D:window}registerMessageHandler(D,d){this.messageHandlers[D]=d}unregisterMessageHandler(D){delete this.messageHandlers[D]}sendAsync(D,d){return new Promise((L,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10),le=d?qe(d.signal,"abort",()=>{le?.unsubscribe(),delete this.resolveRejects[te];let Ce={id:te,type:"",origin:location.origin,targetMapId:D.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ce)},HR):null;this.resolveRejects[te]={resolve:Ce=>{le?.unsubscribe(),L(Ce)},reject:Ce=>{le?.unsubscribe(),W(Ce)}};let pe=[],me=Object.assign(Object.assign({},D),{id:te,sourceMapId:this.mapId,origin:location.origin,data:pt(D.data,pe)});this.target.postMessage(me,{transfer:pe})})}receive(D){let d=D.data,L=d.id,W=["file://","resource://android","null"],te=[d.origin,location.origin],le=d.origin===location.origin,pe=te.some(me=>W.includes(me));if((le||pe)&&(!d.targetMapId||this.mapId===d.targetMapId)){if(d.type===""){delete this.tasks[L];let me=this.abortControllers[L];return delete this.abortControllers[L],void(me&&me.abort())}if(fe(self)||d.mustQueue)return this.tasks[L]=d,this.taskQueue.push(L),void this.invoker.trigger();this.processTask(L,d)}}process(){if(this.taskQueue.length===0)return;let D=this.taskQueue.shift(),d=this.tasks[D];delete this.tasks[D],this.taskQueue.length>0&&this.invoker.trigger(),d&&this.processTask(D,d)}processTask(D,d){return e(this,void 0,void 0,function*(){if(d.type===""){let te=this.resolveRejects[D];return delete this.resolveRejects[D],te?void(d.error?te.reject(j(_t(d.error))):te.resolve(_t(d.data))):void 0}if(!this.messageHandlers[d.type])return void this.completeTask(D,new Error(`Could not find a registered handler for ${d.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let L=_t(d.data),W=new AbortController;this.abortControllers[D]=W;try{let te=yield this.messageHandlers[d.type](d.sourceMapId,L,W);this.completeTask(D,null,te)}catch(te){this.completeTask(D,j(te))}})}completeTask(D,d,L){let W=[];delete this.abortControllers[D];let te={id:D,type:"",sourceMapId:this.mapId,origin:location.origin,error:d?pt(d):null,data:pt(L,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.O=function(){var D=new i(16);return i!=Float32Array&&(D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[11]=0,D[12]=0,D[13]=0,D[14]=0),D[0]=1,D[5]=1,D[10]=1,D[15]=1,D},l.P=t,l.Q=function(D,d,L){var W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et=L[0],er=L[1],tr=L[2];return d===D?(D[12]=d[0]*Et+d[4]*er+d[8]*tr+d[12],D[13]=d[1]*Et+d[5]*er+d[9]*tr+d[13],D[14]=d[2]*Et+d[6]*er+d[10]*tr+d[14],D[15]=d[3]*Et+d[7]*er+d[11]*tr+d[15]):(te=d[1],le=d[2],pe=d[3],me=d[4],Ce=d[5],we=d[6],ze=d[7],Pe=d[8],nt=d[9],Ve=d[10],bt=d[11],D[0]=W=d[0],D[1]=te,D[2]=le,D[3]=pe,D[4]=me,D[5]=Ce,D[6]=we,D[7]=ze,D[8]=Pe,D[9]=nt,D[10]=Ve,D[11]=bt,D[12]=W*Et+me*er+Pe*tr+d[12],D[13]=te*Et+Ce*er+nt*tr+d[13],D[14]=le*Et+we*er+Ve*tr+d[14],D[15]=pe*Et+ze*er+bt*tr+d[15]),D},l.R=ys,l.S=function(D,d,L){var W=L[0],te=L[1],le=L[2];return D[0]=d[0]*W,D[1]=d[1]*W,D[2]=d[2]*W,D[3]=d[3]*W,D[4]=d[4]*te,D[5]=d[5]*te,D[6]=d[6]*te,D[7]=d[7]*te,D[8]=d[8]*le,D[9]=d[9]*le,D[10]=d[10]*le,D[11]=d[11]*le,D[12]=d[12],D[13]=d[13],D[14]=d[14],D[15]=d[15],D},l.T=kd,l.U=function(D,d,L){var W=d[0],te=d[1],le=d[2],pe=d[3],me=d[4],Ce=d[5],we=d[6],ze=d[7],Pe=d[8],nt=d[9],Ve=d[10],bt=d[11],Et=d[12],er=d[13],tr=d[14],xr=d[15],lr=L[0],Mr=L[1],Xr=L[2],an=L[3];return D[0]=lr*W+Mr*me+Xr*Pe+an*Et,D[1]=lr*te+Mr*Ce+Xr*nt+an*er,D[2]=lr*le+Mr*we+Xr*Ve+an*tr,D[3]=lr*pe+Mr*ze+Xr*bt+an*xr,D[4]=(lr=L[4])*W+(Mr=L[5])*me+(Xr=L[6])*Pe+(an=L[7])*Et,D[5]=lr*te+Mr*Ce+Xr*nt+an*er,D[6]=lr*le+Mr*we+Xr*Ve+an*tr,D[7]=lr*pe+Mr*ze+Xr*bt+an*xr,D[8]=(lr=L[8])*W+(Mr=L[9])*me+(Xr=L[10])*Pe+(an=L[11])*Et,D[9]=lr*te+Mr*Ce+Xr*nt+an*er,D[10]=lr*le+Mr*we+Xr*Ve+an*tr,D[11]=lr*pe+Mr*ze+Xr*bt+an*xr,D[12]=(lr=L[12])*W+(Mr=L[13])*me+(Xr=L[14])*Pe+(an=L[15])*Et,D[13]=lr*te+Mr*Ce+Xr*nt+an*er,D[14]=lr*le+Mr*we+Xr*Ve+an*tr,D[15]=lr*pe+Mr*ze+Xr*bt+an*xr,D},l.V=function(D,d){let L={};for(let W of d)W in D&&(L[W]=D[W]);return L},l.W=Fd,l.X=H,l.Y=YT,l.Z=WT,l._=e,l.a=Te,l.a$=function(D){var d=new i(3);return d[0]=D[0],d[1]=D[1],d[2]=D[2],d},l.a0=h,l.a1=p,l.a2=Me,l.a3=rh,l.a4=$T,l.a5=rg,l.a6=F,l.a7=A0,l.a8=dv,l.a9=25,l.aA=function(D){var d=D[0],L=D[1];return Math.sqrt(d*d+L*L)},l.aB=function(D){return D[0]=0,D[1]=0,D},l.aC=function(D,d,L){return D[0]=d[0]*L,D[1]=d[1]*L,D},l.aD=C_,l.aE=z,l.aF=function(D,d,L,W){let te=d.y-D.y,le=d.x-D.x,pe=W.y-L.y,me=W.x-L.x,Ce=pe*le-me*te;if(Ce===0)return null;let we=(me*(D.y-L.y)-pe*(D.x-L.x))/Ce;return new t(D.x+we*le,D.y+we*te)},l.aG=I6,l.aH=la,l.aI=function(D){let d=1/0,L=1/0,W=-1/0,te=-1/0;for(let le of D)d=Math.min(d,le.x),L=Math.min(L,le.y),W=Math.max(W,le.x),te=Math.max(te,le.y);return[d,L,W,te]},l.aJ=wc,l.aK=P,l.aL=function(D,d,L,W,te=!1){if(!L[0]&&!L[1])return[0,0];let le=te?W==="map"?-D.bearingInRadians:0:W==="viewport"?D.bearingInRadians:0;if(le){let pe=Math.sin(le),me=Math.cos(le);L=[L[0]*me-L[1]*pe,L[0]*pe+L[1]*me]}return[te?L[0]:P(d,L[0],D.zoom),te?L[1]:P(d,L[1],D.zoom)]},l.aN=k_,l.aO=tb,l.aP=E_,l.aQ=D=>D.type==="symbol",l.aR=Wm,l.aS=ut,l.aT=Gm,l.aU=Rt,l.aV=Xn,l.aW=_n,l.aX=ge,l.aY=ZT,l.aZ=f,l.a_=T,l.aa=R_,l.ab=D=>{let d=window.document.createElement("video");return d.muted=!0,new Promise(L=>{d.onloadstart=()=>{L(d)};for(let W of D){let te=window.document.createElement("source");nr(W)||(d.crossOrigin="Anonymous"),te.src=W,d.appendChild(te)}})},l.ac=Ht,l.ad=function(){return K++},l.ae=ce,l.af=dp,l.ag=E0,l.ah=Jn,l.ai=Co,l.aj=e6,l.ak=function(D){let d={};if(D.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(L,W,te,le)=>{let pe=te||le;return d[W]=!pe||pe.toLowerCase(),""}),d["max-age"]){let L=parseInt(d["max-age"],10);isNaN(L)?delete d["max-age"]:d["max-age"]=L}return d},l.al=oe,l.am=85.051129,l.an=ke,l.ao=function(D){return Math.pow(2,D)},l.ap=S,l.aq=XT,l.ar=function(D){return Math.log(D)/Math.LN2},l.as=function(D){var d=D[0],L=D[1];return d*d+L*L},l.at=function(D){if(!D.length)return new Set;let d=Math.max(...D.map(Ce=>Ce.canonical.z)),L=1/0,W=-1/0,te=1/0,le=-1/0,pe=[];for(let Ce of D){let{x:we,y:ze,z:Pe}=Ce.canonical,nt=Math.pow(2,d-Pe),Ve=we*nt,bt=ze*nt;pe.push({id:Ce,x:Ve,y:bt}),VeW&&(W=Ve),btle&&(le=bt)}let me=new Set;for(let Ce of pe)Ce.x!==L&&Ce.x!==W&&Ce.y!==te&&Ce.y!==le||me.add(Ce.id);return me},l.au=function(D,d){let L=Math.abs(2*D.wrap)-+(D.wrap<0),W=Math.abs(2*d.wrap)-+(d.wrap<0);return D.overscaledZ-d.overscaledZ||W-L||d.canonical.y-D.canonical.y||d.canonical.x-D.canonical.x},l.av=class{constructor(D,d){this.max=D,this.onRemove=d,this.reset()}reset(){for(let D in this.data)for(let d of this.data[D])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(D,d,L){let W=D.wrapped().key;this.data[W]===void 0&&(this.data[W]=[]);let te={value:d,timeout:void 0};if(L!==void 0&&(te.timeout=setTimeout(()=>{this.remove(D,te)},L)),this.data[W].push(te),this.order.push(W),this.order.length>this.max){let le=this._getAndRemoveByKey(this.order[0]);le&&this.onRemove(le)}return this}has(D){return D.wrapped().key in this.data}getAndRemove(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null}_getAndRemoveByKey(D){let d=this.data[D].shift();return d.timeout&&clearTimeout(d.timeout),this.data[D].length===0&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),d.value}getByKey(D){let d=this.data[D];return d?d[0].value:null}get(D){return this.has(D)?this.data[D.wrapped().key][0].value:null}remove(D,d){if(!this.has(D))return this;let L=D.wrapped().key,W=d===void 0?0:this.data[L].indexOf(d),te=this.data[L][W];return this.data[L].splice(W,1),te.timeout&&clearTimeout(te.timeout),this.data[L].length===0&&delete this.data[L],this.onRemove(te.value),this.order.splice(this.order.indexOf(L),1),this}setMaxSize(D){for(this.max=D;this.order.length>this.max;){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(D){let d=[];for(let L in this.data)for(let W of this.data[L])D(W.value)||d.push(W);for(let L of d)this.remove(L.value.tileID,L)}},l.aw=function(D,d){let L=0,W=0;if(D.kind==="constant")W=D.layoutSize;else if(D.kind!=="source"){let{interpolationType:te,minZoom:le,maxZoom:pe}=D,me=te?oe(Ji.interpolationFactor(te,d,le,pe),0,1):0;D.kind==="camera"?W=Ls.number(D.minSize,D.maxSize,me):L=me}return{uSizeT:L,uSize:W}},l.ay=function(D,{uSize:d,uSizeT:L},{lowerSize:W,upperSize:te}){return D.kind==="source"?W/nd:D.kind==="composite"?Ls.number(W/nd,te/nd,L):d},l.az=R,l.b=xe,l.b$=qs,l.b0=function(D,d,L){return D[0]=d[0]-L[0],D[1]=d[1]-L[1],D[2]=d[2]-L[2],D},l.b1=function(D,d){var L=d[0],W=d[1],te=d[2],le=L*L+W*W+te*te;return le>0&&(le=1/Math.sqrt(le)),D[0]=d[0]*le,D[1]=d[1]*le,D[2]=d[2]*le,D},l.b2=u,l.b3=function(D,d){return D[0]*d[0]+D[1]*d[1]+D[2]*d[2]},l.b4=function(D,d,L){return D[0]=d[0]*L[0],D[1]=d[1]*L[1],D[2]=d[2]*L[2],D[3]=d[3]*L[3],D},l.b5=C,l.b6=function(D,d,L){let W=d[0]*L[0]+d[1]*L[1]+d[2]*L[2];return W===0?null:(-(D[0]*L[0]+D[1]*L[1]+D[2]*L[2])-L[3])/W},l.b7=b,l.b8=function(D,d,L){return D[0]=d[0]*L,D[1]=d[1]*L,D[2]=d[2]*L,D[3]=d[3]*L,D},l.b9=function(D,d){return D[0]*d[0]+D[1]*d[1]+D[2]*d[2]+D[3]},l.bA=N,l.bB=function(D,d,L){var W=L[0],te=L[1],le=L[2],pe=L[3],me=d[0],Ce=d[1],we=d[2],ze=te*we-le*Ce,Pe=le*me-W*we,nt=W*Ce-te*me;return D[0]=me+pe*(ze+=ze)+te*(nt+=nt)-le*(Pe+=Pe),D[1]=Ce+pe*Pe+le*ze-W*nt,D[2]=we+pe*nt+W*Pe-te*ze,D},l.bC=function(D,d,L){let W=(te=[D[0],D[1],D[2],d[0],d[1],d[2],L[0],L[1],L[2]])[0]*((ze=te[8])*(pe=te[4])-(me=te[5])*(we=te[7]))+te[1]*(-ze*(le=te[3])+me*(Ce=te[6]))+te[2]*(we*le-pe*Ce);var te,le,pe,me,Ce,we,ze;if(W===0)return null;let Pe=u([],[d[0],d[1],d[2]],[L[0],L[1],L[2]]),nt=u([],[L[0],L[1],L[2]],[D[0],D[1],D[2]]),Ve=u([],[D[0],D[1],D[2]],[d[0],d[1],d[2]]),bt=f([],Pe,-D[3]);return T(bt,bt,f([],nt,-d[3])),T(bt,bt,f([],Ve,-L[3])),f(bt,bt,1/W),bt},l.bD=I_,l.bE=function(){return new Float64Array(4)},l.bF=function(D,d,L,W){var te=[],le=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],le[0]=te[0]*Math.cos(W)-te[1]*Math.sin(W),le[1]=te[0]*Math.sin(W)+te[1]*Math.cos(W),le[2]=te[2],D[0]=le[0]+L[0],D[1]=le[1]+L[1],D[2]=le[2]+L[2],D},l.bG=function(D,d,L,W){var te=[],le=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],le[0]=te[0],le[1]=te[1]*Math.cos(W)-te[2]*Math.sin(W),le[2]=te[1]*Math.sin(W)+te[2]*Math.cos(W),D[0]=le[0]+L[0],D[1]=le[1]+L[1],D[2]=le[2]+L[2],D},l.bH=function(D,d,L,W){var te=[],le=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],le[0]=te[2]*Math.sin(W)+te[0]*Math.cos(W),le[1]=te[1],le[2]=te[2]*Math.cos(W)-te[0]*Math.sin(W),D[0]=le[0]+L[0],D[1]=le[1]+L[1],D[2]=le[2]+L[2],D},l.bI=function(D,d,L){var W=Math.sin(L),te=Math.cos(L),le=d[0],pe=d[1],me=d[2],Ce=d[3],we=d[8],ze=d[9],Pe=d[10],nt=d[11];return d!==D&&(D[4]=d[4],D[5]=d[5],D[6]=d[6],D[7]=d[7],D[12]=d[12],D[13]=d[13],D[14]=d[14],D[15]=d[15]),D[0]=le*te-we*W,D[1]=pe*te-ze*W,D[2]=me*te-Pe*W,D[3]=Ce*te-nt*W,D[8]=le*W+we*te,D[9]=pe*W+ze*te,D[10]=me*W+Pe*te,D[11]=Ce*W+nt*te,D},l.bJ=function(D,d){let L=U(D,360),W=U(d,360),te=W-L,le=W>L?te-360:te+360;return Math.abs(te)0?pe:-pe},l.bM=function(D,d){let L=U(D,2*Math.PI),W=U(d,2*Math.PI);return Math.min(Math.abs(L-W),Math.abs(L-W+2*Math.PI),Math.abs(L-W-2*Math.PI))},l.bN=function(){let D={},d=ht.$version;for(let L in ht.$root){let W=ht.$root[L];if(W.required){let te=null;te=L==="version"?d:W.type==="array"?[]:{},te!=null&&(D[L]=te)}}return D},l.bO=At,l.bP=Nt,l.bQ=function D(d,L){if(Array.isArray(d)){if(!Array.isArray(L)||d.length!==L.length)return!1;for(let W=0;WD.type==="raster",l.bV=q,l.bW=function(D,d){if(!D)return[{command:"setStyle",args:[d]}];let L=[];try{if(!He(D.version,d.version))return[{command:"setStyle",args:[d]}];He(D.center,d.center)||L.push({command:"setCenter",args:[d.center]}),He(D.state,d.state)||L.push({command:"setGlobalState",args:[d.state]}),He(D.centerAltitude,d.centerAltitude)||L.push({command:"setCenterAltitude",args:[d.centerAltitude]}),He(D.zoom,d.zoom)||L.push({command:"setZoom",args:[d.zoom]}),He(D.bearing,d.bearing)||L.push({command:"setBearing",args:[d.bearing]}),He(D.pitch,d.pitch)||L.push({command:"setPitch",args:[d.pitch]}),He(D.roll,d.roll)||L.push({command:"setRoll",args:[d.roll]}),He(D.sprite,d.sprite)||L.push({command:"setSprite",args:[d.sprite]}),He(D.glyphs,d.glyphs)||L.push({command:"setGlyphs",args:[d.glyphs]}),He(D.transition,d.transition)||L.push({command:"setTransition",args:[d.transition]}),He(D.light,d.light)||L.push({command:"setLight",args:[d.light]}),He(D.terrain,d.terrain)||L.push({command:"setTerrain",args:[d.terrain]}),He(D.sky,d.sky)||L.push({command:"setSky",args:[d.sky]}),He(D.projection,d.projection)||L.push({command:"setProjection",args:[d.projection]});let W={},te=[];(function(pe,me,Ce,we){let ze;for(ze in me=me||{},pe=pe||{})Object.prototype.hasOwnProperty.call(pe,ze)&&(Object.prototype.hasOwnProperty.call(me,ze)||Je(ze,Ce,we));for(ze in me)Object.prototype.hasOwnProperty.call(me,ze)&&(Object.prototype.hasOwnProperty.call(pe,ze)?He(pe[ze],me[ze])||(pe[ze].type==="geojson"&&me[ze].type==="geojson"&&dt(pe,me,ze)?$e(Ce,{command:"setGeoJSONSourceData",args:[ze,me[ze].data]}):Mt(ze,me,Ce,we)):Ze(ze,me,Ce))})(D.sources,d.sources,te,W);let le=[];D.layers&&D.layers.forEach(pe=>{"source"in pe&&W[pe.source]?L.push({command:"removeLayer",args:[pe.id]}):le.push(pe)}),L=L.concat(te),function(pe,me,Ce){me=me||[];let we=(pe=pe||[]).map(Ct),ze=me.map(Ct),Pe=pe.reduce(Vt,{}),nt=me.reduce(Vt,{}),Ve=we.slice(),bt=Object.create(null),Et,er,tr,xr,lr;for(let Mr=0,Xr=0;Mrg?(te=Math.acos(le),pe=Math.sin(te),me=Math.sin((1-W)*te)/pe,Ce=Math.sin(W*te)/pe):(me=1-W,Ce=W),D[0]=me*we+Ce*Ve,D[1]=me*ze+Ce*bt,D[2]=me*Pe+Ce*Et,D[3]=me*nt+Ce*er,D},l.bm=function(D){let d=new Float64Array(9);var L,W,te,le,pe,me,Ce,we,ze,Pe,nt,Ve,bt,Et,er,tr,xr,lr;Pe=(te=(W=D)[0])*(Ce=te+te),nt=(le=W[1])*Ce,bt=(pe=W[2])*Ce,Et=pe*(we=le+le),tr=(me=W[3])*Ce,xr=me*we,lr=me*(ze=pe+pe),(L=d)[0]=1-(Ve=le*we)-(er=pe*ze),L[3]=nt-lr,L[6]=bt+xr,L[1]=nt+lr,L[4]=1-Pe-er,L[7]=Et-tr,L[2]=bt-xr,L[5]=Et+tr,L[8]=1-Pe-Ve;let Mr=ge(-Math.asin(oe(d[2],-1,1))),Xr,an;return Math.hypot(d[5],d[8])<.001?(Xr=0,an=-ge(Math.atan2(d[3],d[4]))):(Xr=ge(d[5]===0&&d[8]===0?0:Math.atan2(d[5],d[8])),an=ge(d[1]===0&&d[0]===0?0:Math.atan2(d[1],d[0]))),{roll:Xr,pitch:Mr+90,bearing:an}},l.bn=function(D,d){return D.roll==d.roll&&D.pitch==d.pitch&&D.bearing==d.bearing},l.bo=ga,l.bp=To,l.bq=sp,l.br=m0,l.bs=op,l.bt=Z,l.bu=Q,l.bv=Mo,l.bw=function(D,d,L,W,te){return Z(W,te,oe((D-d)/(L-d),0,1))},l.bx=function(D,d,L,W){return D[0]=d[0]+L[0]*W,D[1]=d[1]+L[1]*W,D[2]=d[2]+L[2]*W,D},l.by=U,l.bz=function(){return new Float64Array(3)},l.c=Ge,l.c$=_c,l.c0=class extends fo{constructor(D,d){super(D,d),this.current=Vs}set(D){if(D[12]!==this.current[12]||D[0]!==this.current[0])return this.current=D,void this.gl.uniformMatrix4fv(this.location,!1,D);for(let d=1;d<16;d++)if(D[d]!==this.current[d]){this.current=D,this.gl.uniformMatrix4fv(this.location,!1,D);break}}},l.c1=jo,l.c2=class extends fo{constructor(D,d){super(D,d),this.current=[0,0,0]}set(D){D[0]===this.current[0]&&D[1]===this.current[1]&&D[2]===this.current[2]||(this.current=D,this.gl.uniform3f(this.location,D[0],D[1],D[2]))}},l.c3=class extends fo{constructor(D,d){super(D,d),this.current=[0,0]}set(D){D[0]===this.current[0]&&D[1]===this.current[1]||(this.current=D,this.gl.uniform2f(this.location,D[0],D[1]))}},l.c4=w,l.c5=function(D,d){var L=Math.sin(d),W=Math.cos(d);return D[0]=W,D[1]=L,D[2]=0,D[3]=-L,D[4]=W,D[5]=0,D[6]=0,D[7]=0,D[8]=1,D},l.c6=function(D,d,L){var W=d[0],te=d[1],le=d[2];return D[0]=W*L[0]+te*L[3]+le*L[6],D[1]=W*L[1]+te*L[4]+le*L[7],D[2]=W*L[2]+te*L[5]+le*L[8],D},l.c7=function(D,d,L,W,te,le,pe){var me=1/(d-L),Ce=1/(W-te),we=1/(le-pe);return D[0]=-2*me,D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=-2*Ce,D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=2*we,D[11]=0,D[12]=(d+L)*me,D[13]=(te+W)*Ce,D[14]=(pe+le)*we,D[15]=1,D},l.c8=class extends fo{constructor(D,d){super(D,d),this.current=new Array}set(D){if(D!=this.current){this.current=D;let d=new Float32Array(4*D.length);for(let L=0;L25||W<0||W>=1||L<0||L>=1)},l.cE=function(D,d){return D[0]=d[0],D[1]=0,D[2]=0,D[3]=0,D[4]=0,D[5]=d[1],D[6]=0,D[7]=0,D[8]=0,D[9]=0,D[10]=d[2],D[11]=0,D[12]=0,D[13]=0,D[14]=0,D[15]=1,D},l.cF=class extends Qt{},l.cG=Tt,l.cH=function(D,d){Ge.REGISTERED_PROTOCOLS[D]=d},l.cI=function(D){delete Ge.REGISTERED_PROTOCOLS[D]},l.cJ=function(D,d){let L={};for(let te=0;teli*wc)}let Ba=Ce?"center":te.get("text-justify").evaluate(Pe,{},D.canonical),Za=te.get("symbol-placement")==="point"?te.get("text-max-width").evaluate(Pe,{},D.canonical)*wc:1/0,Da=()=>{D.bucket.allowVerticalPlacement&&Ur(an)&&(er.vertical=Qm(tr,D.glyphMap,D.glyphPositions,D.imagePositions,nt,Za,me,_a,"left",On,lr,l.ax.vertical,!0,bt,Ve))};if(!Ce&&ta){let na=new Set;if(Ba==="auto")for(let xi=0;xigF(me,Ce,le),W.layers[pe])}(D,L,d),L.finish()},l.cT=function(D,d,L,W,te,le){let pe=R6(D,d,L,te,0);return pe=R6(pe,d,W,le,1),pe},l.cU=class{constructor(D){this.maxEntries=D,this.map=new Map}get(D){let d=this.map.get(D);return d!==void 0&&(this.map.delete(D),this.map.set(D,d)),d}set(D,d){if(this.map.has(D))this.map.delete(D);else if(this.map.size>=this.maxEntries){let L=this.map.keys().next().value;this.map.delete(L)}this.map.set(D,d)}clear(){this.map.clear()}},l.cV=aT,l.cW=Jm,l.cX=C6,l.cY=function(D,d,L,W,te){return e(this,void 0,void 0,function*(){if(p())try{return yield Me(D,d,L,W,te)}catch{}return function(le,pe,me,Ce,we){let ze=le.width,Pe=le.height;Ie&&Ue||(Ie=new OffscreenCanvas(ze,Pe),Ue=Ie.getContext("2d",{willReadFrequently:!0})),Ie.width=ze,Ie.height=Pe,Ue.drawImage(le,0,0,ze,Pe);let nt=Ue.getImageData(pe,me,Ce,we);return Ue.clearRect(0,0,ze,Pe),nt.data}(D,d,L,W,te)})},l.cZ=Cd,l.c_=class{constructor(D,d){this.layers={[E0]:this},this.name=E0,this.version=d?d.version:1,this.extent=d?d.extent:4096,this.length=D.length,this.features=D}feature(D){return new mF(this.features[D],this.extent)}},l.ca=class extends mn{},l.cb=vR,l.cc=class extends Oa{},l.cd=Au,l.ce=function(D){return D<=1?1:Math.pow(2,Math.ceil(Math.log(D)/Math.LN2))},l.cf=nu,l.cg=function(D,d,L){var W=d[0],te=d[1],le=d[2],pe=L[3]*W+L[7]*te+L[11]*le+L[15];return D[0]=(L[0]*W+L[4]*te+L[8]*le+L[12])/(pe=pe||1),D[1]=(L[1]*W+L[5]*te+L[9]*le+L[13])/pe,D[2]=(L[2]*W+L[6]*te+L[10]*le+L[14])/pe,D},l.ch=class extends gr{},l.ci=class extends y{},l.cj=function(D,d){return D[0]===d[0]&&D[1]===d[1]&&D[2]===d[2]&&D[3]===d[3]&&D[4]===d[4]&&D[5]===d[5]&&D[6]===d[6]&&D[7]===d[7]&&D[8]===d[8]&&D[9]===d[9]&&D[10]===d[10]&&D[11]===d[11]&&D[12]===d[12]&&D[13]===d[13]&&D[14]===d[14]&&D[15]===d[15]},l.ck=function(D,d){var L=D[0],W=D[1],te=D[2],le=D[3],pe=D[4],me=D[5],Ce=D[6],we=D[7],ze=D[8],Pe=D[9],nt=D[10],Ve=D[11],bt=D[12],Et=D[13],er=D[14],tr=D[15],xr=d[0],lr=d[1],Mr=d[2],Xr=d[3],an=d[4],kn=d[5],On=d[6],_a=d[7],ta=d[8],Ba=d[9],Za=d[10],Da=d[11],na=d[12],li=d[13],xi=d[14],ui=d[15];return Math.abs(L-xr)<=g*Math.max(1,Math.abs(L),Math.abs(xr))&&Math.abs(W-lr)<=g*Math.max(1,Math.abs(W),Math.abs(lr))&&Math.abs(te-Mr)<=g*Math.max(1,Math.abs(te),Math.abs(Mr))&&Math.abs(le-Xr)<=g*Math.max(1,Math.abs(le),Math.abs(Xr))&&Math.abs(pe-an)<=g*Math.max(1,Math.abs(pe),Math.abs(an))&&Math.abs(me-kn)<=g*Math.max(1,Math.abs(me),Math.abs(kn))&&Math.abs(Ce-On)<=g*Math.max(1,Math.abs(Ce),Math.abs(On))&&Math.abs(we-_a)<=g*Math.max(1,Math.abs(we),Math.abs(_a))&&Math.abs(ze-ta)<=g*Math.max(1,Math.abs(ze),Math.abs(ta))&&Math.abs(Pe-Ba)<=g*Math.max(1,Math.abs(Pe),Math.abs(Ba))&&Math.abs(nt-Za)<=g*Math.max(1,Math.abs(nt),Math.abs(Za))&&Math.abs(Ve-Da)<=g*Math.max(1,Math.abs(Ve),Math.abs(Da))&&Math.abs(bt-na)<=g*Math.max(1,Math.abs(bt),Math.abs(na))&&Math.abs(Et-li)<=g*Math.max(1,Math.abs(Et),Math.abs(li))&&Math.abs(er-xi)<=g*Math.max(1,Math.abs(er),Math.abs(xi))&&Math.abs(tr-ui)<=g*Math.max(1,Math.abs(tr),Math.abs(ui))},l.cl=function(D,d){return D[0]=d[0],D[1]=d[1],D[2]=d[2],D[3]=d[3],D[4]=d[4],D[5]=d[5],D[6]=d[6],D[7]=d[7],D[8]=d[8],D[9]=d[9],D[10]=d[10],D[11]=d[11],D[12]=d[12],D[13]=d[13],D[14]=d[14],D[15]=d[15],D},l.cm=D=>D.type==="circle",l.cn=D=>D.type==="heatmap",l.co=D=>D.type==="line",l.cp=D=>D.type==="fill",l.cq=D=>D.type==="fill-extrusion",l.cr=D=>D.type==="hillshade",l.cs=D=>D.type==="color-relief",l.ct=D=>D.type==="background",l.cu=D=>D.type==="custom",l.cv=re,l.cw=function(D,d,L){if(d<=0)return D;let W=1/d;return L===void 0||Math.abs(L)<1e-10?Math.round(D*W)/W:(L>0?Math.ceil(D*W-1e-9):Math.floor(D*W+1e-10))/W},l.cx=function(D,d,L){let W=B(d.x-L.x,d.y-L.y),te=B(D.x-L.x,D.y-L.y);var le,pe;return ge(Math.atan2(W[0]*te[1]-W[1]*te[0],(le=W)[0]*(pe=te)[0]+le[1]*pe[1]))},l.cy=ae,l.cz=function(D,d){var L;if(!ve[d])return!1;let W=D?.target,te=((L=W?.ownerDocument)===null||L===void 0?void 0:L.defaultView)||window;return D instanceof te.MouseEvent||D instanceof te.WheelEvent},l.d=j,l.d0=class{constructor(D,d){let L=(d=this.options=Object.assign({},nR,d)).debug;if(L&&console.time("preprocess data"),d.maxZoom<0||d.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(d.promoteId&&d.generateId)throw new Error("promoteId and generateId cannot be used together.");let W=d_(D,d);L&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",d.indexMaxZoom,d.indexMaxPoints),console.time("generate tiles")),W=g_(W,d),d.updateable&&(this.source=W),this.initializeIndex(W,d)}initializeIndex(D,d){this.tileIndex=d.cluster?new ZI(d.clusterOptions):new rR(d),D.length&&this.tileIndex.initialize(D)}getTile(D,d,L){return d=+d,L=+L,(D=+D)<0||D>24?null:this.tileIndex.getTile(D,d,L)}updateData(D,d){let L=this.options;if(!L.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:W,source:te}=function(le,pe,me){let Ce=function(ze,Pe){var nt,Ve;return ze?{removeAll:ze.removeAll,remove:new Set(ze.remove||[]),add:new Map((nt=ze.add)==null?void 0:nt.map(bt=>[Pe.promoteId?bt.properties[Pe.promoteId]:bt.id,bt])),update:new Map((Ve=ze.update)==null?void 0:Ve.map(bt=>[bt.id,bt]))}:{remove:new Set,add:new Map,update:new Map}}(pe,me),we=[];if(Ce.removeAll&&(we=le,le=[]),Ce.remove.size||Ce.add.size){let ze=[];for(let Pe of le)(Ce.remove.has(Pe.id)||Ce.add.has(Pe.id))&&ze.push(Pe);if(ze.length){we.push(...ze);let Pe=new Set(ze.map(nt=>nt.id));le=le.filter(nt=>!Pe.has(nt.id))}if(Ce.add.size){let Pe=d_({type:"FeatureCollection",features:Array.from(Ce.add.values())},me);Pe=g_(Pe,me),we.push(...Pe),le.push(...Pe)}}if(Ce.update.size){let ze=new Map,Pe=[];for(let nt of le)Ce.update.has(nt.id)?ze.set(nt.id,[...ze.get(nt.id)||[],nt]):Pe.push(nt);for(let[nt,Ve]of Ce.update){let bt=ze.get(nt);if(!bt||bt.length===0)continue;let Et=$I(bt,Ve,me);we.push(...bt,...Et),Pe.push(...Et)}le=Pe}return{affected:we,source:le}}(this.source,D,L);d&&({affected:W,source:te}=this.filterUpdate(te,W,d)),W.length&&(this.source=te,this.tileIndex.updateIndex(te,W,L))}filterUpdate(D,d,L){let W=new Set;for(let te of D)te.id!=null&&(L(Xm(te))||(d.push(te),W.add(te.id)));return{affected:d,source:D=D.filter(te=>!W.has(te.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(D=>Xm(D))}}updateClusterOptions(D,d){let L=this.options.cluster;this.options.cluster=D,this.options.clusterOptions=d,L!=D?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(D){return this.tileIndex.getClusterExpansionZoom(D)}getClusterChildren(D){return this.tileIndex.getChildren(D)}getClusterLeaves(D,d,L){return this.tileIndex.getLeaves(D,d,L)}},l.d1=Yi,l.e=X,l.f=nr,l.g=gt,l.h=D=>e(void 0,void 0,void 0,function*(){if(D.byteLength===0)return createImageBitmap(new ImageData(1,1));let d=new Blob([new Uint8Array(D)],{type:"image/png"});try{return createImageBitmap(d)}catch(L){throw new Error(`Could not load image because of ${j(L).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.i=fe,l.j=D=>new Promise((d,L)=>{let W=new Image;W.onload=()=>{d(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>W.src=Ae)},W.onerror=()=>L(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(D)],{type:"image/png"});W.src=D.byteLength?URL.createObjectURL(te):Ae}),l.k=(D,d)=>Kt(X(D,{type:"json"}),d),l.l=Ot,l.m=Kt,l.n=sr,l.o=(D,d)=>Kt(X(D,{type:"arrayBuffer"}),d),l.p=RT,l.q=function(D){return new Jm(D).readFields(CR,[])},l.r=function(D){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(D))},l.s=qe,l.t=Ds,l.u=Bs,l.v=xc,l.w=ee,l.x=ht,l.y=Po,l.z=Ol}),E("worker",["./shared"],function(l){"use strict";class e{constructor(T,f){this.keyCache={},T&&this.replace(T,f)}replace(T,f){this._layerConfigs={},this._layers={},this.update(T,[],f)}update(T,f,u){for(let b of T){this._layerConfigs[b.id]=b;let z=this._layers[b.id]=l.bT(b,u);z._featureFilter=l.ah(z.filter,u),this.keyCache[b.id]&&delete this.keyCache[b.id]}for(let b of f)delete this.keyCache[b],delete this._layerConfigs[b],delete this._layers[b];this.familiesBySource={};let A=l.cJ(Object.values(this._layerConfigs),this.keyCache);for(let b of A){let z=b.map(P=>this._layers[P.id]),I=z[0];if(I.isHidden())continue;let N=I.source||"",R=this.familiesBySource[N];R||(R=this.familiesBySource[N]={});let B=I.sourceLayer||l.ag,F=R[B];F||(F=R[B]=[]),F.push(z)}}}class t{constructor(T){let f={},u=[];for(let I in T){let N=T[I],R=f[I]={};for(let B in N){let F=N[+B];if(!F||F.bitmap.width===0||F.bitmap.height===0)continue;let P={x:0,y:0,w:F.bitmap.width+2,h:F.bitmap.height+2};u.push(P),R[B]={rect:P,metrics:F.metrics}}}let{w:A,h:b}=l.p(u),z=new l.t({width:A||1,height:b||1});for(let I in T){let N=T[I];for(let R in N){let B=N[+R];if(!B||B.bitmap.width===0||B.bitmap.height===0)continue;let F=f[I][R].rect;l.t.copy(B.bitmap,z,{x:0,y:0},{x:F.x+1,y:F.y+1},B.bitmap)}}this.image=z,this.positions=f}}l.cK("GlyphAtlas",t);class a{constructor(T){this.tileID=new l.a3(T.tileID.overscaledZ,T.tileID.wrap,T.tileID.canonical.z,T.tileID.canonical.x,T.tileID.canonical.y),this.uid=T.uid,this.zoom=T.zoom,this.pixelRatio=T.pixelRatio,this.tileSize=T.tileSize,this.source=T.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=T.showCollisionBoxes,this.collectResourceTiming=!!T.collectResourceTiming,this.returnDependencies=!!T.returnDependencies,this.promoteId=T.promoteId,this.inFlightDependencies=[]}parse(T,f,u,A,b){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=T,this.collisionBoxArray=new l.ae;let z=new l.cL(Object.keys(T.layers).sort()),I=new l.cM(this.tileID,this.promoteId);I.bucketLayerIDs=[];let N={},R={featureIndex:I,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:u,subdivisionGranularity:b},B=f.familiesBySource[this.source];for(let q in B){let $=T.layers[q];if(!$)continue;$.version===1&&l.w(`Vector tile source "${this.source}" layer "${q}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ee=z.encode(q),ne=[];for(let fe=0;fe<$.length;fe++){let ye=$.feature(fe),xe=I.getId(ye,q);ne.push({feature:ye,id:xe,index:fe,sourceLayerIndex:ee})}for(let fe of B[q]){let ye=fe[0];ye.source!==this.source&&l.w(`layer.source = ${ye.source} does not equal this.source = ${this.source}`),ye.isHidden(this.zoom,!0)||(r(fe,this.zoom,u),(N[ye.id]=ye.createBucket({index:I.bucketLayerIDs.length,layers:fe,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ee,sourceID:this.source})).populate(ne,R,this.tileID.canonical),I.bucketLayerIDs.push(fe.map(xe=>xe.id)))}}let F=l.bY(R.glyphDependencies,q=>Object.keys(q).map(Number));for(let q of this.inFlightDependencies)q?.abort();this.inFlightDependencies=[];let P=Promise.resolve({});if(Object.keys(F).length){let q=new AbortController;this.inFlightDependencies.push(q),P=A.sendAsync({type:"GG",data:{stacks:F,source:this.source,tileID:this.tileID,type:"glyphs"}},q)}let j=Object.keys(R.iconDependencies),U=Promise.resolve({});if(j.length){let q=new AbortController;this.inFlightDependencies.push(q),U=A.sendAsync({type:"GI",data:{icons:j,source:this.source,tileID:this.tileID,type:"icons"}},q)}let Z=Object.keys(R.patternDependencies),Q=Promise.resolve({});if(Z.length){let q=new AbortController;this.inFlightDependencies.push(q),Q=A.sendAsync({type:"GI",data:{icons:Z,source:this.source,tileID:this.tileID,type:"patterns"}},q)}let re=R.dashDependencies,ae=Promise.resolve({});if(Object.keys(re).length){let q=new AbortController;this.inFlightDependencies.push(q),ae=A.sendAsync({type:"GDA",data:{dashes:re}},q)}let[oe,H,X,K]=yield Promise.all([P,U,Q,ae]),G=new t(oe),Y=new l.cN(H,X);for(let q in N){let $=N[q];$ instanceof l.af?(r($.layers,this.zoom,u),l.cO({bucket:$,glyphMap:oe,glyphPositions:G.positions,imageMap:H,imagePositions:Y.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:R.subdivisionGranularity})):$.hasDependencies&&($ instanceof l.cP||$ instanceof l.cQ||$ instanceof l.cR)&&(r($.layers,this.zoom,u),$.addFeatures(R,this.tileID.canonical,Y.patternPositions,K))}return this.status="done",{buckets:Object.values(N).filter(q=>!q.isEmpty()),featureIndex:I,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:G.image,imageAtlas:Y,dashPositions:K,glyphMap:this.returnDependencies?oe:null,iconMap:this.returnDependencies?H:null,glyphPositions:this.returnDependencies?G.positions:null}})}}function r(_,T,f){let u=new l.J(T);for(let A of _)A.recalculate(u,f)}class n{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(T,f){this.loading[T]=f}finishLoading(T){delete this.loading[T]}abort(T){let f=this.loading[T];f?.abort&&(f.abort.abort(),delete this.loading[T])}setParsing(T,f){this.parsing[T]=f}consumeParsing(T){let f=this.parsing[T];if(f)return delete this.parsing[T],f}clearParsing(T){delete this.parsing[T]}markLoaded(T,f){this.loaded[T]=f}getLoaded(T){let f=this.loaded[T];if(f)return f}removeLoaded(T){delete this.loaded[T]}clearLoaded(){this.loaded={}}}class o{constructor(T){this.start=`${T}#start`,this.end=`${T}#end`,this.measure=T,performance.mark(this.start)}finish(){performance.mark(this.end);let T=performance.getEntriesByName(this.measure);return T.length===0&&(performance.measure(this.measure,this.start,this.end),T=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),T}}class s{constructor(T,f,u,A,b){this.type=T,this.properties=u||{},this.extent=b,this.pointsArray=f,this.id=A}loadGeometry(){return this.pointsArray.map(T=>T.map(f=>new l.P(f.x,f.y)))}}class c{constructor(T,f,u){this.version=2,this._myFeatures=T,this.name=f,this.length=T.length,this.extent=u}feature(T){return this._myFeatures[T]}}class m{constructor(){this.layers={}}addLayer(T){this.layers[T.name]=T}}function h(_){let T=l.cS(_);return T.byteOffset===0&&T.byteLength===T.buffer.byteLength||(T=new Uint8Array(T)),{vectorTile:_,rawData:T.buffer}}function p(_,T,f){let{extent:u}=_,A=Math.pow(2,f.z-T.z),b=(f.x-T.x*A)*u,z=(f.y-T.y*A)*u,I=[];for(let N=0;N<_.length;N++){let R=_.feature(N),B=R.loadGeometry();for(let P of B)for(let j of P)j.x=j.x*A-b,j.y=j.y*A-z;let F=128;B=l.cT(B,R.type,-F,-F,u+F,u+F),B.length!==0&&I.push(new s(R.type,B,R.properties,R.id,u))}return new c(I,_.name,u)}class g{constructor(T,f,u){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new n,this.overzoomedTileResultCache=new l.cU(1e3)}loadVectorTile(T,f){try{return{vectorTile:T.encoding!=="mlt"?new l.cV(new l.cW(f)):new l.cX(f),rawData:f}}catch(u){let A=new Uint8Array(f),b=`Unable to parse the tile at ${T.request.url}, `;throw b+=A[0]===31&&A[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${l.d(u).message}`,new Error(b)}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,overzoomParameters:u}=T;u&&(T.request=u.overzoomRequest);let A=this._startRequestTiming(T),b=new a(T);this.tileState.startLoading(f,b);let z=new AbortController;b.abort=z;try{let I=yield l.o(T.request,z);if(T.etag&&T.etag===I.etag)return this.tileState.finishLoading(f),this._getEtagUnmodifiedResult(I,A);let N=this.loadVectorTile(T,I.data);if(this.tileState.finishLoading(f),!N)return null;let{vectorTile:R,rawData:B}=N;u&&({vectorTile:R,rawData:B}=this._getOverzoomTile(T,R));let F=this._getExpiryData(I),P=this._finishRequestTiming(A);b.vectorTile=R,this.tileState.markLoaded(f,b);let j={rawData:B,cacheControl:F,resourceTiming:P};this.tileState.setParsing(f,j);try{return yield this._parseWorkerTile(b,T,j)}finally{this.tileState.clearParsing(f)}}catch(I){throw this.tileState.finishLoading(f),b.status="done",this.tileState.markLoaded(f,b),I}})}_getEtagUnmodifiedResult(T,f){let u=this._getExpiryData(T),A=this._finishRequestTiming(f);return l.e({etagUnmodified:!0},u,A)}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:b,cacheControl:z,resourceTiming:I}=u;A=l.e({rawTileData:b.slice(0),encoding:f.encoding},A,z,I)}return A})}_getExpiryData({expires:T,cacheControl:f,etag:u}){let A={};return T&&(A.expires=T),f&&(A.cacheControl=f),u&&(A.etag=u),A}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T){let f=T?.finish();return f?{resourceTiming:JSON.parse(JSON.stringify(f))}:{}}_getOverzoomTile(T,f){var u;let{tileID:A,source:b,overzoomParameters:z}=T,{maxZoomTileID:I}=z,N=`${I.key}_${A.key}_${(u=T.request)===null||u===void 0?void 0:u.url}`,R=this.overzoomedTileResultCache.get(N);if(R)return R;let B=new m,F=this.layerIndex.familiesBySource[b];for(let j in F){let U=f.layers[j];if(!U)continue;let Z=p(U,I,A.canonical);Z.length>0&&B.addLayer(Z)}let P=h(B);return this.overzoomedTileResultCache.set(N,P),P}reloadTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}}class i{constructor(){this.loaded={}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,encoding:u,rawImageData:A,redFactor:b,greenFactor:z,blueFactor:I,baseShift:N}=T,R=A.width+2,B=A.height+2,F=l.b(A)?new l.R({width:R,height:B},yield l.cY(A,-1,-1,R,B)):A,P=new l.cZ(f,F,u,b,z,I,N);return this.loaded||(this.loaded={}),this.loaded[f]=P,P})}removeTile(T){let f=this.loaded,u=T.uid;f?.[u]&&delete f[u]}}class w{constructor(T,f,u,A=S){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new n,this._createGeoJSONIndex=A}loadVectorTile(T){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:f,x:u,y:A}=T.tileID.canonical,b=this._geoJSONIndex.getTile(f,u,A);return b?h(new l.c_(b.features,{version:2,extent:l.a6})):null}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f}=T,u=new a(T);u.abort=new AbortController;try{let A=this.loadVectorTile(T);if(!A)return null;let{vectorTile:b,rawData:z}=A;u.vectorTile=b,this.tileState.markLoaded(f,u);let I={rawData:z};this.tileState.setParsing(f,I);try{return yield this._parseWorkerTile(u,T,I)}finally{this.tileState.clearParsing(f)}}catch(A){throw u.status="done",this.tileState.markLoaded(f,u),A}})}_reloadLoadedTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:b}=u;A=l.e({rawTileData:b.slice(0),encoding:"mvt"},A)}return A})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}loadData(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort();let u=this._startRequestTiming(T);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(T,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let A={};return T.request&&(A.data=T.data),this._finishRequestTiming(u,T,A),A}catch(A){if(delete this._pendingRequest,!l.$(A))throw A;return{abandoned:!0}}})}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T,f,u){let A=T?.finish();A&&(u.resourceTiming={[f.source]:JSON.parse(JSON.stringify(A))})}reloadTile(T){return this.tileState.getLoaded(T.uid)?this._reloadLoadedTile(T):this.loadTile(T)}loadAndProcessGeoJSON(T,f){return l._(this,void 0,void 0,function*(){var u;if(T.request&&(T.data=(yield l.k(T.request,f)).data),T.data)return T.data=this._filterGeoJSON(T.data,T.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(T.data,T));if(T.dataDiff)return(u=this._geoJSONIndex)!==null&&u!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},T)),void this._geoJSONIndex.updateData(T.dataDiff,this._getFilterPredicate(T.filter));if(T.updateCluster&&this._geoJSONIndex.updateClusterOptions(T.geojsonVtOptions.cluster,M(T)),this._geoJSONIndex==null)throw new Error(`Input data given to '${T.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(T,f){if(T.type!=="FeatureCollection")return T;let u=this._getFilterPredicate(f);return u?{type:"FeatureCollection",features:T.features.filter(A=>u(A))}:T}_getFilterPredicate(T){if(typeof T!="boolean"&&!T?.length)return;let f=l.c$(T,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(f.result==="error")throw new Error(f.value.map(u=>`${u.key}: ${u.message}`).join(", "));return u=>f.value.evaluate({zoom:0},u)}removeSource(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort()})}getClusterExpansionZoom(T){return this._geoJSONIndex.getClusterExpansionZoom(T.clusterId)}getClusterChildren(T){return this._geoJSONIndex.getClusterChildren(T.clusterId)}getClusterLeaves(T){return this._geoJSONIndex.getClusterLeaves(T.clusterId,T.limit,T.offset)}}function S(_,T){let f=l.e(T.geojsonVtOptions||{},{updateable:!0,clusterOptions:M(T)});return new l.d0(_,f)}function M({geojsonVtOptions:_,clusterProperties:T}){if(!T||!_.clusterOptions)return _.clusterOptions;let f={},u={},A={accumulated:null,zoom:0},b={properties:null},z=Object.keys(T);for(let I of z){let[N,R]=T[I],B=l.c$(R),F=l.c$(typeof N=="string"?[N,["accumulated"],["get",I]]:N);f[I]=B.value,u[I]=F.value}return _.clusterOptions.map=I=>{b.properties=I;let N={};for(let R of z)N[R]=f[R].evaluate(A,b);return N},_.clusterOptions.reduce=(I,N)=>{b.properties=N;for(let R of z)A.accumulated=I[R],I[R]=u[R].evaluate(A,b)},_.clusterOptions}class C{constructor(T){this.self=T,this.actor=new l.N(T),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(f,u)=>{if(this.externalWorkerSourceTypes[f])throw new Error(`Worker source with name "${f}" already registered.`);this.externalWorkerSourceTypes[f]=u},this.self.addProtocol=l.cH,this.self.removeProtocol=l.cI,this.self.registerRTLTextPlugin=f=>{l.d1.setMethods(f)},this.self.makeRequest=l.m,this.actor.registerMessageHandler("LDT",(f,u)=>this._getDEMWorkerSource(f,u.source).loadTile(u)),this.actor.registerMessageHandler("RDT",(f,u)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(f,u.source).removeTile(u)})),this.actor.registerMessageHandler("GCEZ",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterExpansionZoom(u)})),this.actor.registerMessageHandler("GCC",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterChildren(u)})),this.actor.registerMessageHandler("GCL",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterLeaves(u)})),this.actor.registerMessageHandler("LD",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadData(u)),this.actor.registerMessageHandler("LT",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadTile(u)),this.actor.registerMessageHandler("RT",(f,u)=>this._getWorkerSource(f,u.type,u.source).reloadTile(u)),this.actor.registerMessageHandler("AT",(f,u)=>this._getWorkerSource(f,u.type,u.source).abortTile(u)),this.actor.registerMessageHandler("RMT",(f,u)=>this._getWorkerSource(f,u.type,u.source).removeTile(u)),this.actor.registerMessageHandler("RS",(f,u)=>l._(this,void 0,void 0,function*(){var A,b;if(!(!((b=(A=this.workerSources[f])===null||A===void 0?void 0:A[u.type])===null||b===void 0)&&b[u.source]))return;let z=this.workerSources[f][u.type][u.source];delete this.workerSources[f][u.type][u.source],z.removeSource!==void 0&&z.removeSource(u)})),this.actor.registerMessageHandler("RM",f=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[f],delete this.availableImages[f],delete this.workerSources[f],delete this.demWorkerSources[f],this.globalStates.delete(f)})),this.actor.registerMessageHandler("SR",(f,u)=>l._(this,void 0,void 0,function*(){this.referrer=u})),this.actor.registerMessageHandler("SRPS",(f,u)=>this._syncRTLPluginState(f,u)),this.actor.registerMessageHandler("IS",(f,u)=>l._(this,void 0,void 0,function*(){this.self.importScripts(u)})),this.actor.registerMessageHandler("SI",(f,u)=>this._setImages(f,u)),this.actor.registerMessageHandler("UL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).update(u.layers,u.removedIds,this._getGlobalState(f))})),this.actor.registerMessageHandler("UGS",(f,u)=>l._(this,void 0,void 0,function*(){let A=this._getGlobalState(f);for(let b in u)A[b]=u[b]})),this.actor.registerMessageHandler("SL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).replace(u,this._getGlobalState(f))}))}_getGlobalState(T){let f=this.globalStates.get(T);return f||(f={},this.globalStates.set(T,f)),f}_setImages(T,f){return l._(this,void 0,void 0,function*(){this.availableImages[T]=f;for(let u in this.workerSources[T]){let A=this.workerSources[T][u];for(let b in A)A[b].availableImages=f}})}_syncRTLPluginState(T,f){return l._(this,void 0,void 0,function*(){return yield l.d1.syncState(f,this.self.importScripts)})}_getAvailableImages(T){let f=this.availableImages[T];return f||(f=[]),f}_getLayerIndex(T){let f=this.layerIndexes[T];return f||(f=this.layerIndexes[T]=new e),f}_getWorkerSource(T,f,u){var A,b;if((A=this.workerSources)[T]||(A[T]={}),(b=this.workerSources[T])[f]||(b[f]={}),!this.workerSources[T][f][u]){let z={sendAsync:(I,N)=>(I.targetMapId=T,this.actor.sendAsync(I,N))};switch(f){case"vector":this.workerSources[T][f][u]=new g(z,this._getLayerIndex(T),this._getAvailableImages(T));break;case"geojson":this.workerSources[T][f][u]=new w(z,this._getLayerIndex(T),this._getAvailableImages(T));break;default:this.workerSources[T][f][u]=new this.externalWorkerSourceTypes[f](z,this._getLayerIndex(T),this._getAvailableImages(T))}}return this.workerSources[T][f][u]}_getDEMWorkerSource(T,f){var u,A;return(u=this.demWorkerSources)[T]||(u[T]={}),(A=this.demWorkerSources[T])[f]||(A[f]=new i),this.demWorkerSources[T][f]}}return l.i(self)&&(self.worker=new C(self)),C}),E("index",["exports","./shared"],function(l,e){"use strict";var t="5.24.0";function a(){var de=new e.A(4);return e.A!=Float32Array&&(de[1]=0,de[2]=0),de[0]=1,de[3]=1,de}let r,n,o,s={frame(de,y,O,ie){let ce=ie||window,_e=ce.requestAnimationFrame(Ne=>{De(),y(Ne)}),{unsubscribe:De}=e.s(de.signal,"abort",()=>{De(),ce.cancelAnimationFrame(_e),O(new e.a(de.signal.reason))},!1)},frameAsync(de,y){return new Promise((O,ie)=>{this.frame(de,O,ie,y)})},getImageData(de,y=0){return this.getImageCanvasContext(de).getImageData(-y,-y,de.width+2*y,de.height+2*y)},getImageCanvasContext(de){let y=window.document.createElement("canvas"),O=y.getContext("2d",{willReadFrequently:!0});if(!O)throw new Error("failed to create canvas 2d context");return y.width=de.width,y.height=de.height,O.drawImage(de,0,0,de.width,de.height),O},resolveURL:de=>(r||(r=document.createElement("a")),r.href=de,r.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return o!==void 0?o:!!matchMedia&&(n!=null||(n=matchMedia("(prefers-reduced-motion: reduce)")),n.matches)},set prefersReducedMotion(de){o=de}},c=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(de){this._frozenAt=de}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function m(){return c.getCurrentTime()}var h,p;class g{static create(y,O,ie){let ce=window.document.createElement(y);return O!==void 0&&(ce.className=O),ie&&ie.appendChild(ce),ce}static createNS(y,O){return window.document.createElementNS(y,O)}static disableDrag(){g.docStyle&&g.selectProp&&(g.userSelect=g.docStyle[g.selectProp],g.docStyle[g.selectProp]="none")}static enableDrag(){g.docStyle&&g.selectProp&&(g.docStyle[g.selectProp]=g.userSelect)}static suppressClickInternal(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",g.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",g.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",g.suppressClickInternal,!0)},0)}static getScale(y){let O=y.getBoundingClientRect();return{x:O.width/y.offsetWidth||1,y:O.height/y.offsetHeight||1,boundingClientRect:O}}static getPoint(y,O,ie){let ce=O.boundingClientRect;return new e.P((ie.clientX-ce.left)/O.x-y.clientLeft,(ie.clientY-ce.top)/O.y-y.clientTop)}static mousePos(y,O){let ie=g.getScale(y);return g.getPoint(y,ie,O)}static touchPos(y,O){let ie=[],ce=g.getScale(y);for(let _e of O)ie.push(g.getPoint(y,ce,_e));return ie}static sanitize(y){let O=new DOMParser().parseFromString(y,"text/html").body||document.createElement("body"),ie=O.querySelectorAll("script");for(let ce of ie)ce.remove();return g.clean(O),O.innerHTML}static isPossiblyDangerous(y,O){let ie=O.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(y)||!ie.includes("javascript:")&&!ie.includes("data:"))||!!y.startsWith("on")||void 0}static clean(y){let O=y.children;for(let ie of O)g.removeAttributes(ie),g.clean(ie)}static removeAttributes(y){for(let{name:O,value:ie}of y.attributes)g.isPossiblyDangerous(O,ie)&&y.removeAttribute(O)}}g.docStyle=typeof window<"u"&&((h=window.document)===null||h===void 0?void 0:h.documentElement.style),g.selectProp=!g.docStyle||"userSelect"in g.docStyle?"userSelect":"webkitUserSelect",function(de){let y,O,ie,ce;de.resetRequestQueue=()=>{y=[],O=0,ie=0,ce={}},de.addThrottleControl=Ye=>{let lt=ie++;return ce[lt]=Ye,lt},de.removeThrottleControl=Ye=>{delete ce[Ye],De()},de.getImage=(Ye,lt,ct=!0)=>new Promise((Ft,Gt)=>{Ye.headers||(Ye.headers={}),Ye.headers.accept="image/webp,*/*",e.e(Ye,{type:"image"}),y.push({abortController:lt,requestParameters:Ye,supportImageRefresh:ct,state:"queued",onError:Jt=>{Gt(Jt)},onSuccess:Jt=>{Ft(Jt)}}),De()});let _e=Ye=>e._(this,void 0,void 0,function*(){Ye.state="running";let{requestParameters:lt,supportImageRefresh:ct,onError:Ft,onSuccess:Gt,abortController:Jt}=Ye,it=ct===!1&&!e.i(self)&&!e.g(lt.url)&&(!lt.headers||Object.keys(lt.headers).reduce((or,vr)=>or&&vr==="accept",!0));O++;let Rt=it?Ne(lt,Jt):e.m(lt,Jt);try{let or=yield Rt;delete Ye.abortController,Ye.state="completed",or.data instanceof HTMLImageElement||e.b(or.data)?Gt(or):or.data&&Gt({data:yield(qt=or.data,typeof createImageBitmap=="function"?e.h(qt):e.j(qt)),cacheControl:or.cacheControl,expires:or.expires})}catch(or){delete Ye.abortController,Ft(e.d(or))}finally{O--,De()}var qt}),De=()=>{let Ye=(()=>{for(let lt of Object.keys(ce))if(ce[lt]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let lt=O;lt0;lt++){let ct=y.shift();ct.abortController.signal.aborted?lt--:_e(ct)}},Ne=(Ye,lt)=>new Promise((ct,Ft)=>{let Gt=new Image,Jt=Ye.url,it=Ye.credentials;it&&it==="include"?Gt.crossOrigin="use-credentials":(it&&it==="same-origin"||!e.f(Jt))&&(Gt.crossOrigin="anonymous"),lt.signal.addEventListener("abort",()=>{Gt.src="",Ft(new e.a(lt.signal.reason))}),Gt.fetchPriority="high",Gt.onload=()=>{Gt.onerror=Gt.onload=null,ct({data:Gt})},Gt.onerror=()=>{Gt.onerror=Gt.onload=null,lt.signal.aborted||Ft(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Gt.src=Jt})}(p||(p={})),p.resetRequestQueue();class i{constructor(y){this._transformRequestFn=y??null}transformRequest(y,O){return this._transformRequestFn&&this._transformRequestFn(y,O)||{url:y}}setTransformRequest(y){this._transformRequestFn=y}}function w(de){let y=[];if(typeof de=="string")y.push({id:"default",url:de});else if(de&&de.length>0){let O=[];for(let{id:ie,url:ce}of de){let _e=`${ie}${ce}`;O.includes(_e)||(O.push(_e),y.push({id:ie,url:ce}))}}return y}function S(de,y,O){try{let ie=new URL(de);return ie.pathname+=`${y}${O}`,ie.toString()}catch{throw new Error(`Invalid sprite URL "${de}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function M(de){let{userImage:y}=de;return!(!y?.render||!y.render()||(de.data.replace(new Uint8Array(y.data.buffer)),0))}class C extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let y of Object.keys(this.images))this.removeImage(y);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(y){if(this.loaded!==y&&(this.loaded=y,y)){for(let{ids:O,promiseResolve:ie}of this.requestors)ie(this._getImagesForIds(O));this.requestors=[]}}getImage(y){let O=this.images[y];if(O&&!O.data&&O.spriteData){let ie=O.spriteData;O.data=new e.R({width:ie.width,height:ie.height},ie.context.getImageData(ie.x,ie.y,ie.width,ie.height).data),O.spriteData=null}return O}addImage(y,O){if(this.images[y])throw new Error(`Image id ${y} already exist, use updateImage instead`);this._validate(y,O)&&(this.images[y]=O)}_validate(y,O){let ie=!0,ce=O.data||O.spriteData;return this._validateStretch(O.stretchX,ce?.width)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchX" value`))),ie=!1),this._validateStretch(O.stretchY,ce?.height)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchY" value`))),ie=!1),this._validateContent(O.content,O)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "content" value`))),ie=!1),ie}_validateStretch(y,O){if(!y)return!0;let ie=0;for(let ce of y){if(ce[0]=y[1]))}updateImage(y,O,ie=!0){let ce=this.getImage(y);if(ie&&(ce.data.width!==O.data.width||ce.data.height!==O.data.height))throw new Error(`size mismatch between old image (${ce.data.width}x${ce.data.height}) and new image (${O.data.width}x${O.data.height}).`);O.version=ce.version+1,this.images[y]=O,this.updatedImages[y]=!0}removeImage(y){var O;let ie=this.images[y];delete this.images[y],delete this.patterns[y],!((O=ie.userImage)===null||O===void 0)&&O.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(y){return new Promise((O,ie)=>{let ce=!0;if(!this.isLoaded())for(let _e of y)this.images[_e]||(ce=!1);this.isLoaded()||ce?O(this._getImagesForIds(y)):this.requestors.push({ids:y,promiseResolve:O})})}_getImagesForIds(y){var O;let ie={};for(let ce of y){let _e=this.getImage(ce);_e||(this.fire(new e.n("styleimagemissing",{id:ce})),_e=this.getImage(ce)),_e?ie[ce]={data:_e.data.clone(),pixelRatio:_e.pixelRatio,sdf:_e.sdf,version:_e.version,stretchX:_e.stretchX,stretchY:_e.stretchY,content:_e.content,textFitWidth:_e.textFitWidth,textFitHeight:_e.textFitHeight,hasRenderCallback:!!(!((O=_e.userImage)===null||O===void 0)&&O.render)}:e.w(`Image "${ce}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ie}getPixelSize(){let{width:y,height:O}=this.atlasImage;return{width:y,height:O}}getPattern(y){let O=this.patterns[y],ie=this.getImage(y);if(!ie)return null;if(O&&O.position.version===ie.version)return O.position;if(O)O.position.version=ie.version;else{let ce={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},_e=new e.I(ce,ie);this.patterns[y]={bin:ce,position:_e}}return this._updatePatternAtlas(),this.patterns[y].position}bind(y){let O=y.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(y,this.atlasImage,O.RGBA),this.atlasTexture.bind(O.LINEAR,O.CLAMP_TO_EDGE)}_updatePatternAtlas(){let y=[];for(let _e in this.patterns)y.push(this.patterns[_e].bin);let{w:O,h:ie}=e.p(y),ce=this.atlasImage;ce.resize({width:O||1,height:ie||1});for(let _e in this.patterns){let{bin:De}=this.patterns[_e],Ne=De.x+1,Ye=De.y+1,lt=this.getImage(_e).data,ct=lt.width,Ft=lt.height;e.R.copy(lt,ce,{x:0,y:0},{x:Ne,y:Ye},{width:ct,height:Ft}),e.R.copy(lt,ce,{x:0,y:Ft-1},{x:Ne,y:Ye-1},{width:ct,height:1}),e.R.copy(lt,ce,{x:0,y:0},{x:Ne,y:Ye+Ft},{width:ct,height:1}),e.R.copy(lt,ce,{x:ct-1,y:0},{x:Ne-1,y:Ye},{width:1,height:Ft}),e.R.copy(lt,ce,{x:0,y:0},{x:Ne+ct,y:Ye},{width:1,height:Ft})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(y){for(let O of y){if(this.callbackDispatchedThisFrame[O])continue;this.callbackDispatchedThisFrame[O]=!0;let ie=this.getImage(O);ie||e.w(`Image with ID: "${O}" was not found`),M(ie)&&this.updateImage(O,ie)}}cloneImages(){let y={};for(let O in this.images){let ie=this.images[O];y[O]=Object.assign(Object.assign({},ie),{data:ie.data?ie.data.clone():null})}return y}}let _=1e20,T=new Float64Array(256);for(let de=0;de<256;de++){let y=.5-Math.pow(de/255,.45454545454545453);T[de]=y*Math.abs(y)}function f(de,y,O,ie,ce,_e,De,Ne,Ye){for(let lt=y;lt-1);Ye++,_e[Ye]=Ne,De[Ye]=lt,De[Ye+1]=_}for(let Ne=0,Ye=0;Ne/[-\w]+/.test(ce)?ce:`'${CSS.escape(ce)}'`).join(",");return new b.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ie,fontWeight:this._fontWeight(O[0]),fontStyle:this._fontStyle(O[0]),lang:this.lang})}_fontStyle(y){return/italic/i.test(y)?"italic":/oblique/i.test(y)?"oblique":"normal"}_fontWeight(y){let O={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},ie;for(let[ce,_e]of Object.entries(O))new RegExp(`\\b${ce}\\b`,"i").test(y)&&(ie=`${_e}`);return ie}destroy(){for(let y in this.entries){let O=this.entries[y];O.tinySDF=null,O.ideographTinySDF=null,O.glyphs={},O.requests={},O.ranges={}}this.entries={}}}b.loadGlyphRange=function(de,y,O,ie){return e._(this,void 0,void 0,function*(){let ce=256*y,_e=ce+255,De=yield ie.transformRequest(O.replace("{fontstack}",de).replace("{range}",`${ce}-${_e}`),"Glyphs"),Ne=yield e.o(De,new AbortController);if(!Ne?.data)throw new Error(`Could not load glyph range. range: ${y}, ${ce}-${_e}`);let Ye={};for(let lt of e.q(Ne.data))Ye[lt.id]=lt;return Ye})},b.TinySDF=class{constructor({fontSize:de=24,buffer:y=3,radius:O=8,cutoff:ie=.25,fontFamily:ce="sans-serif",fontWeight:_e="normal",fontStyle:De="normal",lang:Ne=null}={}){this.buffer=y,this.radius=O,this.cutoff=ie,this.lang=Ne;let Ye=this.size=de+4*y,lt=this._createCanvas(Ye),ct=this.ctx=lt.getContext("2d",{willReadFrequently:!0});ct.font=`${De} ${_e} ${de}px ${ce}`,ct.textBaseline="alphabetic",ct.textAlign="left",ct.fillStyle="black",this.gridOuter=new Float64Array(Ye*Ye),this.gridInner=new Float64Array(Ye*Ye),this.f=new Float64Array(Ye),this.z=new Float64Array(Ye+1),this.v=new Uint16Array(Ye)}_createCanvas(de){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(de,de);let y=document.createElement("canvas");return y.width=y.height=de,y}draw(de){let{width:y,actualBoundingBoxAscent:O,actualBoundingBoxDescent:ie,actualBoundingBoxLeft:ce,actualBoundingBoxRight:_e}=this.ctx.measureText(de),De=Math.ceil(O),Ne=Math.floor(ce),Ye=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(_e)-Ne)),lt=Math.max(0,Math.min(this.size-this.buffer,De+Math.ceil(ie))),ct=Ye+2*this.buffer,Ft=lt+2*this.buffer,Gt=Math.max(ct*Ft,0),Jt=new Uint8ClampedArray(Gt),it={data:Jt,width:ct,height:Ft,glyphWidth:Ye,glyphHeight:lt,glyphTop:De,glyphLeft:Ne,glyphAdvance:y};if(Ye===0||lt===0)return it;let{ctx:Rt,buffer:qt,gridInner:or,gridOuter:vr}=this;this.lang&&(Rt.lang=this.lang),Rt.clearRect(qt,qt,Ye,lt),Rt.fillText(de,qt-Ne,qt+De);let Ar=Rt.getImageData(qt,qt,Ye,lt);vr.fill(_,0,Gt),or.fill(0,0,Gt);let dr=3;for(let Lr=0;Lr1&&(Ye=y[++Ne]);let ct=Math.abs(lt-Ye.left),Ft=Math.abs(lt-Ye.right),Gt=Math.min(ct,Ft),Jt,it=_e/ie*(ce+1);if(Ye.isDash){let Rt=ce-Math.abs(it);Jt=Math.sqrt(Gt*Gt+Rt*Rt)}else Jt=ce-Math.sqrt(Gt*Gt+it*it);this.data[De+lt]=Math.max(0,Math.min(255,Jt+128))}}}addRegularDash(y){for(let Ne=y.length-1;Ne>=0;--Ne){let Ye=y[Ne],lt=y[Ne+1];Ye.zeroLength?y.splice(Ne,1):lt&<.isDash===Ye.isDash&&(lt.left=Ye.left,y.splice(Ne,1))}let O=y[0],ie=y[y.length-1];O.isDash===ie.isDash&&(O.left=ie.left-this.width,ie.right=O.right+this.width);let ce=this.width*this.nextRow,_e=0,De=y[_e];for(let Ne=0;Ne1&&(De=y[++_e]);let Ye=Math.abs(Ne-De.left),lt=Math.abs(Ne-De.right),ct=Math.min(Ye,lt);this.data[ce+Ne]=Math.max(0,Math.min(255,(De.isDash?ct:-ct)+128))}}addDash(y,O){let ie=O?7:0,ce=2*ie+1;if(this.nextRow+ce>this.height)return e.w("LineAtlas out of space"),null;let _e=0;for(let Ne of y)_e+=Ne;if(_e!==0){let Ne=this.width/_e,Ye=this.getDashRanges(y,this.width,Ne);O?this.addRoundDash(Ye,Ne,ie):this.addRegularDash(Ye)}let De={y:this.nextRow+ie,height:2*ie,width:_e};return this.nextRow+=ce,this.dirty=!0,De}bind(y){let O=y.gl;this.texture?(O.bindTexture(O.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,O.texSubImage2D(O.TEXTURE_2D,0,0,0,this.width,this.height,O.ALPHA,O.UNSIGNED_BYTE,this.data))):(this.texture=O.createTexture(),O.bindTexture(O.TEXTURE_2D,this.texture),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_S,O.REPEAT),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_WRAP_T,O.REPEAT),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MIN_FILTER,O.LINEAR),O.texParameteri(O.TEXTURE_2D,O.TEXTURE_MAG_FILTER,O.LINEAR),O.texImage2D(O.TEXTURE_2D,0,O.ALPHA,this.width,this.height,0,O.ALPHA,O.UNSIGNED_BYTE,this.data))}}let P="maplibre_preloaded_worker_pool";class j{constructor(){this.active={}}acquire(y){if(!this.workers)for(this.workers=[];this.workers.lengthe.m(y,O))),Q}function H(de,y){let O=e.O();return e.Q(O,O,[1,1,0]),e.S(O,O,[.5*de.width,.5*de.height,1]),de.calculatePosMatrix?e.U(O,O,de.calculatePosMatrix(y.toUnwrapped())):O}function X(de,y,O,ie,ce,_e,De){var Ne;let Ye=function(Gt,Jt,it){if(Gt)for(let Rt of Gt){let qt=Jt[Rt];if(qt?.source===it&&qt.type==="fill-extrusion")return!0}else for(let Rt in Jt){let qt=Jt[Rt];if(qt.source===it&&qt.type==="fill-extrusion")return!0}return!1}((Ne=ce?.layers)!==null&&Ne!==void 0?Ne:null,y,de.id),lt=_e.maxPitchScaleFactor(),ct=de.tilesIn(ie,lt,Ye);ct.sort(K);let Ft=[];for(let Gt of ct)Ft.push({wrappedTileID:Gt.tileID.wrapped().key,queryResults:Gt.tile.queryRenderedFeatures(y,O,de.getState(),Gt.queryGeometry,Gt.cameraQueryGeometry,Gt.scale,ce,_e,lt,H(_e,Gt.tileID),De?(Jt,it)=>De(Gt.tileID,Jt,it):void 0)});return function(Gt,Jt){for(let it in Gt)for(let Rt of Gt[it])G(Rt,Jt);return Gt}(function(Gt){let Jt={},it={};for(let{queryResults:Rt,wrappedTileID:qt}of Gt){it[qt]||(it[qt]={});let or=it[qt];for(let vr in Rt){let Ar=Rt[vr];or[vr]||(or[vr]={});let dr=or[vr];Jt[vr]||(Jt[vr]=[]);for(let mr of Ar)dr[mr.featureIndex]||(dr[mr.featureIndex]=!0,Jt[vr].push(mr))}}return Jt}(Ft),de)}function K(de,y){let O=de.tileID,ie=y.tileID;return O.overscaledZ-ie.overscaledZ||O.canonical.y-ie.canonical.y||O.wrap-ie.wrap||O.canonical.x-ie.canonical.x}function G(de,y){let O=de.feature,ie=y.getFeatureState(O.layer["source-layer"],O.id);O.source=O.layer.source,O.layer["source-layer"]&&(O.sourceLayer=O.layer["source-layer"]),O.state=ie}function Y(de,y,O,ie){return e._(this,void 0,void 0,function*(){let ce=de;if(de.url?ce=(yield e.k(yield y.transformRequest(de.url,"Source"),O)).data:yield s.frameAsync(O,ie),!ce)return null;let _e=e.V(e.e(ce,de),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in ce&&ce.vector_layers&&(_e.vectorLayerIds=ce.vector_layers.map(De=>De.id)),_e})}class q{constructor(y,O){y&&(O?this.setSouthWest(y).setNorthEast(O):Array.isArray(y)&&(y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1])))}setNorthEast(y){return this._ne=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}setSouthWest(y){return this._sw=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}extend(y){let O=this._sw,ie=this._ne,ce,_e;if(y instanceof e.W)ce=y,_e=y;else{if(!(y instanceof q))return Array.isArray(y)?y.length===4||y.every(Array.isArray)?this.extend(q.convert(y)):this.extend(e.W.convert(y)):y&&("lng"in y||"lon"in y)&&"lat"in y?this.extend(e.W.convert(y)):this;if(ce=y._sw,_e=y._ne,!ce||!_e)return this}return O||ie?(O.lng=Math.min(ce.lng,O.lng),O.lat=Math.min(ce.lat,O.lat),ie.lng=Math.max(_e.lng,ie.lng),ie.lat=Math.max(_e.lat,ie.lat)):(this._sw=new e.W(ce.lng,ce.lat),this._ne=new e.W(_e.lng,_e.lat)),this}getCenter(){return new e.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.W(this.getWest(),this.getNorth())}getSouthEast(){return new e.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(y){let{lng:O,lat:ie}=e.W.convert(y),ce=this._sw.lng<=O&&O<=this._ne.lng;return this._sw.lng>this._ne.lng&&(ce=this._sw.lng>=O&&O>=this._ne.lng),this._sw.lat<=ie&&ie<=this._ne.lat&&ce}intersects(y){if(!((y=q.convert(y)).getNorth()>=this.getSouth()&&y.getSouth()<=this.getNorth()))return!1;let O=Math.abs(this.getEast()-this.getWest()),ie=Math.abs(y.getEast()-y.getWest());if(O>=360||ie>=360)return!0;let ce=e.X(this.getWest(),-180,180),_e=e.X(this.getEast(),-180,180),De=e.X(y.getWest(),-180,180),Ne=e.X(y.getEast(),-180,180),Ye=ce>_e,lt=De>Ne;return!(!Ye||!lt)||(Ye?Ne>=ce||De<=_e:lt?_e>=De||ce<=Ne:De<=_e&&Ne>=ce)}static convert(y){return y instanceof q?y:y&&new q(y)}static fromLngLat(y,O=0){let ie=360*O/40075017,ce=ie/Math.cos(Math.PI/180*y.lat);return new q(new e.W(y.lng-ce,y.lat-ie),new e.W(y.lng+ce,y.lat+ie))}adjustAntiMeridian(){let y=new e.W(this._sw.lng,this._sw.lat),O=new e.W(this._ne.lng,this._ne.lat);return new q(y,y.lng>O.lng?new e.W(O.lng+360,O.lat):O)}}class ${constructor(y,O,ie){this.bounds=q.convert(this.validateBounds(y)),this.minzoom=O||0,this.maxzoom=ie||24}validateBounds(y){return Array.isArray(y)&&y.length===4?[Math.max(-180,y[0]),Math.max(-90,y[1]),Math.min(180,y[2]),Math.min(90,y[3])]:[-180,-90,180,90]}contains(y){let O=Math.pow(2,y.z),ie=Math.floor(e.Z(this.bounds.getWest())*O),ce=Math.floor(e.Y(this.bounds.getNorth())*O),_e=Math.ceil(e.Z(this.bounds.getEast())*O),De=Math.ceil(e.Y(this.bounds.getSouth())*O);return y.x>=ie&&y.x<_e&&y.y>=ce&&y.y{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie={request:yield this.map._requestManager.transformRequest(O,"Tile"),uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(y),etag:y.etag};ie.request.collectResourceTiming=this._collectResourceTiming;let ce="RT";if(y.actor&&y.state!=="expired"){if(y.state==="loading")return new Promise((_e,De)=>{y.reloadPromise={resolve:_e,reject:De}})}else y.actor=this.dispatcher.getActor(),ce="LT";y.abortController=new AbortController;try{let _e=yield y.actor.sendAsync({type:ce,data:ie},y.abortController);if(delete y.abortController,y.aborted)return;this._afterTileLoadWorkerResponse(y,_e);let De={};return _e?.etagUnmodified&&(De.unmodified=!0),De}catch(_e){if(delete y.abortController,y.aborted)return;if(_e&&_e.status!==404)throw _e;this._afterTileLoadWorkerResponse(y,null)}})}_getOverzoomParameters(y){return e._(this,void 0,void 0,function*(){if(y.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let O=y.tileID.scaledTo(this.maxzoom).canonical,ie=O.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:O,overzoomRequest:yield this.map._requestManager.transformRequest(ie,"Tile")}})}_afterTileLoadWorkerResponse(y,O){if(O?.resourceTiming&&(y.resourceTiming=O.resourceTiming),O&&this.map._refreshExpiredTiles&&y.setExpiryData(O),y.etag=O?.etag,y.loadVectorData(O,this.map.painter),y.reloadPromise){let ie=y.reloadPromise;y.reloadPromise=null,this.loadTile(y).then(ie.resolve).catch(ie.reject)}}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.actor&&(yield y.actor.sendAsync({type:"AT",data:{uid:y.uid,type:this.type,source:this.id}}))})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),y.actor&&(yield y.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ne extends e.E{constructor(y,O,ie,ce){super(),this.id=y,this.dispatcher=ie,this.setEventedParent(ce),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},O),e.e(this,e.V(O,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(y=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let O=yield Y(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,O&&(e.e(this,O),O.bounds&&(this.tileBounds=new $(O.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:y})))}catch(O){this._tileJSONRequest=null,this._loaded=!0,e.$(O)||this.fire(new e.l(e.d(O)))}})}loaded(){return this._loaded}onAdd(y){this.map=y,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(y){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),y(),this.load(!0)}setTiles(y){return this.setSourceProperty(()=>{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}serialize(){return e.e({},this._options)}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);y.abortController=new AbortController;try{let ie=yield p.getImage(yield this.map._requestManager.transformRequest(O,"Tile"),y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ie?.data){this.map._refreshExpiredTiles&&(ie.cacheControl||ie.expires)&&y.setExpiryData({cacheControl:ie.cacheControl,expires:ie.expires});let ce=this.map.painter.context,_e=ce.gl,De=ie.data;y.texture=this.map.painter.getTileTexture(De.width),y.texture?y.texture.update(De,{useMipmap:!0}):(y.texture=new e.T(ce,De,_e.RGBA,{useMipmap:!0}),y.texture.bind(_e.LINEAR,_e.CLAMP_TO_EDGE,_e.LINEAR_MIPMAP_NEAREST)),y.state="loaded"}}catch(ie){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ie)throw y.state="errored",ie}})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController)})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.texture&&this.map.painter.saveTileTexture(y.texture)})}hasTransition(){return!1}}class fe extends ne{constructor(y,O,ie,ce){super(y,O,ie,ce),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},O),this.encoding=O.encoding||"mapbox",this.redFactor=O.redFactor,this.greenFactor=O.greenFactor,this.blueFactor=O.blueFactor,this.baseShift=O.baseShift}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie=yield this.map._requestManager.transformRequest(O,"Tile");y.neighboringTiles=this._getNeighboringTiles(y.tileID),y.abortController=new AbortController;try{let ce=yield p.getImage(ie,y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ce?.data){let _e=ce.data;this.map._refreshExpiredTiles&&(ce.cacheControl||ce.expires)&&y.setExpiryData({cacheControl:ce.cacheControl,expires:ce.expires});let De=e.b(_e)&&e.a0()?_e:yield this.readImageNow(_e),Ne={type:this.type,uid:y.uid,source:this.id,rawImageData:De,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(y.actor&&y.state!=="expired"&&y.state!=="reloading")return;y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor()),y.dem=yield y.actor.sendAsync({type:"LDT",data:Ne}),y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0,y.state="loaded"}}catch(ce){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ce)throw y.state="errored",ce}})}readImageNow(y){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.a1()){let O=y.width+2,ie=y.height+2;try{return new e.R({width:O,height:ie},yield e.a2(y,-1,-1,O,ie))}catch{}}return s.getImageData(y,1)})}_getNeighboringTiles(y){let O=y.canonical,ie=Math.pow(2,O.z),ce=(O.x-1+ie)%ie,_e=O.x===0?y.wrap-1:y.wrap,De=(O.x+1+ie)%ie,Ne=O.x+1===ie?y.wrap+1:y.wrap,Ye={};return Ye[new e.a3(y.overscaledZ,_e,O.z,ce,O.y).key]={backfilled:!1},Ye[new e.a3(y.overscaledZ,Ne,O.z,De,O.y).key]={backfilled:!1},O.y>0&&(Ye[new e.a3(y.overscaledZ,_e,O.z,ce,O.y-1).key]={backfilled:!1},Ye[new e.a3(y.overscaledZ,y.wrap,O.z,O.x,O.y-1).key]={backfilled:!1},Ye[new e.a3(y.overscaledZ,Ne,O.z,De,O.y-1).key]={backfilled:!1}),O.y+1_e.key===ie);ce>-1&&de.addOrUpdateProperties.splice(ce,1)}return(de.removeAllProperties||y.removeAllProperties)&&(O.removeAllProperties=!0),(de.removeProperties||y.removeProperties)&&(O.removeProperties=[...de.removeProperties||[],...y.removeProperties||[]]),(de.addOrUpdateProperties||y.addOrUpdateProperties)&&(O.addOrUpdateProperties=[...de.addOrUpdateProperties||[],...y.addOrUpdateProperties||[]]),(de.newGeometry||y.newGeometry)&&(O.newGeometry=y.newGeometry||de.newGeometry),O}function Ae(de){var y,O;if(!de)return{};let ie={};return ie.removeAll=de.removeAll,ie.remove=new Set(de.remove||[]),ie.add=new Map((y=de.add)===null||y===void 0?void 0:y.map(ce=>[ce.id,ce])),ie.update=new Map((O=de.update)===null||O===void 0?void 0:O.map(ce=>[ce.id,ce])),ie}function Me(de){return de&&de.length!==0?typeof de[0]=="number"?[de]:de.flatMap(y=>Me(y)):[]}function Ie(de){return de.type==="GeometryCollection"?de.geometries.flatMap(y=>Ie(y)):Me(de.coordinates)}function Ue(de){let y=new q,O;switch(de.type){case"FeatureCollection":O=de.features.flatMap(ie=>Ie(ie.geometry));break;case"Feature":O=Ie(de.geometry);break;default:O=Ie(de)}if(O.length===0)return y;for(let ie of O){let[ce,_e]=ie;y.extend([ce,_e])}return y}class qe extends e.E{constructor(y,O,ie,ce){super(),this.id=y,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:O.data},this.actor=ie.getActor(),this.setEventedParent(ce),this._data=typeof O.data=="string"?{url:O.data}:{geojson:O.data},this._options=e.e({},O),this._collectResourceTiming=O.collectResourceTiming,O.maxzoom!==void 0&&(this.maxzoom=O.maxzoom),O.type&&(this.type=O.type),O.attribution&&(this.attribution=O.attribution),this.promoteId=O.promoteId,O.clusterMaxZoom!==void 0&&this.maxzoom<=O.clusterMaxZoom&&e.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${O.clusterMaxZoom}".`),this.workerOptions=e.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(O.buffer!==void 0?O.buffer:128),tolerance:this._pixelsToTileUnits(O.tolerance!==void 0?O.tolerance:.375),extent:e.a6,maxZoom:this.maxzoom,lineMetrics:O.lineMetrics||!1,generateId:O.generateId||!1,promoteId:typeof O.promoteId=="string"?O.promoteId:void 0,cluster:O.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(O.clusterMaxZoom),minPoints:Math.max(2,O.clusterMinPoints||2),extent:e.a6,radius:this._pixelsToTileUnits(O.clusterRadius||50),log:!1,generateId:O.generateId||!1}},clusterProperties:O.clusterProperties,filter:O.filter},O.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(y){return y*(e.a6/this.tileSize)}_getClusterMaxZoom(y){let O=y?Math.round(y):this.maxzoom-1;return Number.isInteger(y)||y===void 0||e.w(`Integer expected for option 'clusterMaxZoom': provided value "${y}" rounded to "${O}"`),O}load(){return e._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(y){this.map=y,this.load()}setData(y,O){this._data=typeof y=="string"?{url:y}:{geojson:y},this._pendingWorkerUpdate={data:y};let ie=this._updateWorkerData();return O?ie:this}updateData(y,O){this._pendingWorkerUpdate.diff=function(ce,_e){if(!ce)return _e||{};if(!_e)return ce||{};let De=Ae(ce),Ne=Ae(_e);(function(lt,ct){ct.removeAll&&(lt.add.clear(),lt.update.clear(),lt.remove.clear(),ct.remove.clear());for(let Ft of ct.remove)lt.add.delete(Ft),lt.update.delete(Ft);for(let[Ft,Gt]of ct.update){let Jt=lt.update.get(Ft);Jt&&(ct.update.set(Ft,xe(Jt,Gt)),lt.update.delete(Ft))}})(De,Ne);let Ye={};if((De.removeAll||Ne.removeAll)&&(Ye.removeAll=!0),Ye.remove=new Set([...De.remove,...Ne.remove]),Ye.add=new Map([...De.add,...Ne.add]),Ye.update=new Map([...De.update,...Ne.update]),Ye.remove.size&&Ye.add.size)for(let lt of Ye.add.keys())Ye.remove.delete(lt);return function(lt){let ct={};return lt.removeAll&&(ct.removeAll=lt.removeAll),lt.remove&&(ct.remove=Array.from(lt.remove)),lt.add&&(ct.add=Array.from(lt.add.values())),lt.update&&(ct.update=Array.from(lt.update.values())),ct}(Ye)}(this._pendingWorkerUpdate.diff,y);let ie=this._updateWorkerData();return O?ie:this}getData(){return e._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return e._(this,void 0,void 0,function*(){return Ue(yield this.getData())})}setClusterOptions(y){return this.workerOptions.geojsonVtOptions.cluster=y.cluster,y.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(y.clusterRadius)),y.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(y.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(y){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:y,source:this.id}})}getClusterChildren(y){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:y,source:this.id}})}getClusterLeaves(y,O,ie){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:y,limit:O,offset:ie}})}_updateWorkerData(){return e._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void e.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:y,diff:O,updateCluster:ie}=this._pendingWorkerUpdate,ce=this._getLoadGeoJSONParameters(y,O,ie);y!==void 0?this._pendingWorkerUpdate.data=void 0:O?this._pendingWorkerUpdate.diff=void 0:ie&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(ce)})}_getLoadGeoJSONParameters(y,O,ie){return e._(this,void 0,void 0,function*(){let ce=e.e({type:this.type},this.workerOptions);return typeof y=="string"?(ce.request=yield this.map._requestManager.transformRequest(s.resolveURL(y),"Source"),ce.request.collectResourceTiming=this._collectResourceTiming,ce):y!==void 0?(ce.data=y,ce):O?(ce.dataDiff=O,ce):ie?(ce.updateCluster=!0,ce):void 0})}_dispatchWorkerUpdate(y){return e._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new e.n("dataloading",{dataType:"source"}));try{let O=yield y,ie=yield this.actor.sendAsync({type:"LD",data:O});if(this._isUpdatingWorker=!1,this._removed||ie.abandoned)return void this.fire(new e.n("dataabort",{dataType:"source"}));ie.data&&(this._data={geojson:ie.data});let ce=this._applyDiffToSource(O.dataDiff),_e=this._getShouldReloadTileOptions(ce),De={dataType:"source"};this._applyResourceTiming(De,ie),this.fire(new e.n("data",Object.assign(Object.assign({},De),{sourceDataType:"metadata"}))),this.fire(new e.n("data",Object.assign(Object.assign({},De),{sourceDataType:"content",shouldReloadTileOptions:_e})))}catch(O){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new e.n("dataabort",{dataType:"source"}));this.fire(new e.l(e.d(O)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(y,O){var ie;if(!this._collectResourceTiming)return;let ce=(ie=O.resourceTiming)===null||ie===void 0?void 0:ie[this.id];if(!ce)return;let _e=ce.slice(0);_e?.length&&e.e(y,{resourceTiming:_e})}_applyDiffToSource(y){if(!y)return;let O=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let ce=function(_e,De){let Ne=new Map;if(_e==null||_e.type==null)return Ne;if(_e.type==="Feature"){let Ye=ye(_e,De);return Ye==null?void 0:(Ne.set(Ye,_e),Ne)}if(_e.type==="FeatureCollection"){let Ye=new Set;for(let lt of _e.features){let ct=ye(lt,De);if(ct==null||Ye.has(ct))return;Ye.add(ct),Ne.set(ct,lt)}return Ne}}(this._data.geojson,O);if(!ce)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:ce}}if(!this._data.updateable)return;let ie=function(ce,_e,De){var Ne,Ye;let lt=[];if(_e.removeAll)ce.clear();else if(_e.remove)for(let ct of _e.remove){let Ft=ce.get(ct);Ft&&(lt.push(Ft.geometry),ce.delete(ct))}if(_e.add)for(let ct of _e.add){let Ft=ye(ct,De);if(Ft==null)continue;let Gt=ce.get(Ft);Gt&<.push(Gt.geometry),lt.push(ct.geometry),ce.set(Ft,ct)}if(_e.update)for(let ct of _e.update){let Ft=ce.get(ct.id);if(!Ft)continue;let Gt=!!ct.newGeometry,Jt=ct.removeAllProperties||((Ne=ct.removeProperties)===null||Ne===void 0?void 0:Ne.length)>0||((Ye=ct.addOrUpdateProperties)===null||Ye===void 0?void 0:Ye.length)>0;if(!Gt&&!Jt)continue;lt.push(Ft.geometry);let it=Object.assign({},Ft);if(ce.set(ct.id,it),Gt&&(lt.push(ct.newGeometry),it.geometry=ct.newGeometry),Jt){if(it.properties=ct.removeAllProperties?{}:Object.assign({},it.properties||{}),ct.removeProperties)for(let Rt of ct.removeProperties)delete it.properties[Rt];if(ct.addOrUpdateProperties)for(let{key:Rt,value:qt}of ct.addOrUpdateProperties)it.properties[Rt]=qt}}return lt}(this._data.updateable,y,O);return y.removeAll||this._options.cluster?void 0:ie}_getShouldReloadTileOptions(y){if(y)return{affectedBounds:y.filter(Boolean).map(O=>Ue(O))}}shouldReloadTile(y,{affectedBounds:O}){if(y.state==="loading")return!0;if(y.state==="unloaded")return!1;let{buffer:ie,extent:ce}=this.workerOptions.geojsonVtOptions,_e=function({x:De,y:Ne,z:Ye},lt=0){let ct=e.a4((De-lt)/Math.pow(2,Ye)),Ft=e.a5((Ne+1+lt)/Math.pow(2,Ye)),Gt=e.a4((De+1+lt)/Math.pow(2,Ye)),Jt=e.a5((Ne-lt)/Math.pow(2,Ye));return new q([ct,Ft],[Gt,Jt])}(y.tileID.canonical,ie/ce);for(let De of O)if(_e.intersects(De))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(y){return e._(this,void 0,void 0,function*(){let O=y.actor?"RT":"LT";y.actor=this.actor;let ie={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};y.abortController=new AbortController;let ce=yield this.actor.sendAsync({type:O,data:ie},y.abortController);delete y.abortController,y.unloadVectorData(),y.aborted||y.loadVectorData(ce,this.map.painter,O==="RT")})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.aborted=!0})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class ke extends e.E{constructor(y,O,ie,ce){super(),this.flippedWindingOrder=!1,this.id=y,this.dispatcher=ie,this.coordinates=O.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(ce),this.options=O}load(y){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let O=yield p.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,O?.data&&(this.image=O.data,y&&(this.coordinates=y),this._finishLoading())}catch(O){this._request=null,this._loaded=!0,e.$(O)||this.fire(new e.l(e.d(O)))}})}loaded(){return this._loaded}updateImage(y){return y.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=y.url,this.load(y.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(y){this.map=y,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(y){this.coordinates=y;let O=y.map(e.a7.fromLngLat);var ie;return this.tileID=function(ce){let _e=e.a8.fromPoints(ce),De=_e.width(),Ne=_e.height(),Ye=Math.max(De,Ne),lt=Math.max(0,Math.floor(-Math.log(Ye)/Math.LN2)),ct=Math.pow(2,lt);return new e.aa(lt,Math.floor((_e.minX+_e.maxX)/2*ct),Math.floor((_e.minY+_e.maxY)/2*ct))}(O),this.terrainTileRanges=this._getOverlappingTileRanges(O),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=O.map(ce=>this.tileID.getTilePoint(ce)._round()),this.flippedWindingOrder=((ie=this.tileCoords)[1].x-ie[0].x)*(ie[2].y-ie[0].y)-(ie[1].y-ie[0].y)*(ie[2].x-ie[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let y=this.map.painter.context,O=y.gl;this.texture||(this.texture=new e.T(y,this.image,O.RGBA),this.texture.bind(O.LINEAR,O.CLAMP_TO_EDGE));let ie=!1;for(let ce in this.tiles){let _e=this.tiles[ce];_e.state!=="loaded"&&(_e.state="loaded",_e.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(y){return e._(this,void 0,void 0,function*(){var O;!((O=this.tileID)===null||O===void 0)&&O.equals(y.tileID.canonical)?(this.tiles[String(y.tileID.wrap)]=y,y.buckets={}):y.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(y){let{minX:O,minY:ie,maxX:ce,maxY:_e}=e.a8.fromPoints(y),De={};for(let Ne=0;Ne<=e.a9;Ne++){let Ye=Math.pow(2,Ne),lt=Math.floor(O*Ye),ct=Math.floor(ie*Ye),Ft=Math.floor(ce*Ye),Gt=Math.floor(_e*Ye),Jt=(lt%Ye+Ye)%Ye,it=Ft%Ye,Rt=Math.floor(lt/Ye),qt=Math.floor(Ft/Ye);De[Ne]={minWrap:Rt,maxWrap:qt,minTileXWrapped:Jt,maxTileXWrapped:it,minTileY:ct,maxTileY:Gt}}return De}}class ge extends ke{constructor(y,O,ie,ce){super(y,O,ie,ce),this._onPlayingHandler=()=>{var _e;(_e=this.map)===null||_e===void 0||_e.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=O}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let y=this.options;this.urls=[];for(let O of y.urls)this.urls.push((yield this.map._requestManager.transformRequest(O,"Source")).url);try{let O=yield e.ab(this.urls);if(this._loaded=!0,!O)return;this.video=O,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(O){this.fire(new e.l(e.d(O)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(y){if(this.video){let O=this.video.seekable;yO.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${O.start(0)} and ${O.end(0)}-second mark.`))):this.video.currentTime=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let y=this.map.painter.context,O=y.gl;this.texture?this.video.paused||(this.texture.bind(O.LINEAR,O.CLAMP_TO_EDGE),O.texSubImage2D(O.TEXTURE_2D,0,0,0,O.RGBA,O.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(y,this.video,O.RGBA),this.texture.bind(O.LINEAR,O.CLAMP_TO_EDGE));let ie=!1;for(let ce in this.tiles){let _e=this.tiles[ce];_e.state!=="loaded"&&(_e.state="loaded",_e.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ue extends ke{constructor(y,O,ie,ce){super(y,O,ie,ce),O.coordinates?Array.isArray(O.coordinates)&&O.coordinates.length===4&&!O.coordinates.some(_e=>!Array.isArray(_e)||_e.length!==2||_e.some(De=>typeof De!="number"))||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "coordinates"'))),O.animate&&typeof O.animate!="boolean"&&this.fire(new e.l(new e.ac(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),O.canvas?typeof O.canvas=="string"||O.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${y}`,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 e.l(new e.ac(`sources.${y}`,null,'missing required property "canvas"'))),this.options=O,this.animate=O.animate===void 0||O.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.l(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())})}getCanvas(){return this.canvas}onAdd(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let O=this.map.painter.context,ie=O.gl;this.texture?(y||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(O,this.canvas,ie.RGBA,{premultiply:!0}),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let ce=!1;for(let _e in this.tiles){let De=this.tiles[_e];De.state!=="loaded"&&(De.state="loaded",De.texture=this.texture,ce=!0)}ce&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}}let ve={},se=de=>{switch(de){case"geojson":return qe;case"image":return ke;case"raster":return ne;case"raster-dem":return fe;case"vector":return ee;case"video":return ge;case"canvas":return ue}return ve[de]},Te="RTLPluginLoaded";class Fe extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=oe()}_syncState(y){return this.status=y,this.dispatcher.broadcast("SRPS",{pluginStatus:y,pluginURL:this.url}).catch(O=>{throw this.status="error",O})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(y){return e._(this,arguments,void 0,function*(O,ie=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(O),!this.url)throw new Error(`requested url ${O} is invalid`);if(this.status==="unavailable"){if(!ie)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(Te))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let We=null;function Ge(){return We||(We=new Fe),We}var gt,mt;(function(de){de[de.Base=0]="Base",de[de.Parent=1]="Parent"})(gt||(gt={})),function(de){de[de.Departing=0]="Departing",de[de.Incoming=1]="Incoming"}(mt||(mt={}));class Tt{constructor(y,O){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=y,this.uid=e.ad(),this.uses=0,this.tileSize=O,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(y){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(y||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:y,fadingDirection:O,fadingParentID:ie,fadeEndTime:ce}){this.resetFadeLogic(),this.fadingRole=y,this.fadingDirection=O,this.fadingParentID=ie,this.fadeEndTime=ce}setSelfFadeLogic(y){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=y}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=m(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(y){this.demTexture&&y.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(y,O,ie){if(y?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",y){y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestEncoding=y.encoding,this.latestFeatureIndex.rawTileData=y.rawTileData,this.latestFeatureIndex.encoding=y.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=function(ce,_e){let De={};if(!_e)return De;for(let Ne of ce){let Ye=Ne.layerIds.map(lt=>_e.getLayer(lt)).filter(Boolean);if(Ye.length!==0){Ne.layers=Ye,Ne.stateDependentLayerIds&&(Ne.stateDependentLayers=Ne.stateDependentLayerIds.map(lt=>Ye.filter(ct=>ct.id===lt)[0]));for(let lt of Ye)De[lt.id]=Ne}}return De}(y.buckets,O?.style),this.hasSymbolBuckets=!1;for(let ce in this.buckets){let _e=this.buckets[ce];if(_e instanceof e.af){if(this.hasSymbolBuckets=!0,!ie)break;_e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let ce in this.buckets){let _e=this.buckets[ce];if(_e instanceof e.af&&_e.hasRTLText){this.hasRTLText=!0,Ge().lazyLoad();break}}this.queryPadding=0;for(let ce in this.buckets){let _e=this.buckets[ce];this.queryPadding=Math.max(this.queryPadding,O.style.getLayer(ce).queryRadius(_e))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage),this.dashPositions=y.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(let y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(y){return this.buckets[y.id]}upload(y){for(let ie in this.buckets){let ce=this.buckets[ie];ce.uploadPending()&&ce.upload(y)}let O=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(y,this.imageAtlas.image,O.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(y,this.glyphAtlasImage,O.ALPHA),this.glyphAtlasImage=null)}prepare(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)}queryRenderedFeatures(y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft){var Gt;return!((Gt=this.latestFeatureIndex)===null||Gt===void 0)&&Gt.rawTileData?this.latestFeatureIndex.query({queryGeometry:ce,cameraQueryGeometry:_e,scale:De,tileSize:this.tileSize,pixelPosMatrix:ct,transform:Ye,params:Ne,queryPadding:this.queryPadding*lt,getElevation:Ft},y,O,ie):{}}querySourceFeatures(y,O){let ie=this.latestFeatureIndex;if(!ie?.rawTileData)return;let ce=ie.loadVTLayers(),_e=O?.sourceLayer?O.sourceLayer:"",De=ce[e.ag]||ce[_e];if(!De)return;let Ne=e.ah(O?.filter,O?.globalState),{z:Ye,x:lt,y:ct}=this.tileID.canonical,Ft={z:Ye,x:lt,y:ct};for(let Gt=0;Gtie)ce=!1;else if(O)if(this.expirationTime({zoom:0,x:0,y:0,wrap:mr,fullyVisible:!1}),Ar=[],dr=[];if(de.renderWorldCopies&&De.allowWorldCopies())for(let mr=1;mr<=3;mr++)Ar.push(vr(-mr)),Ar.push(vr(mr));for(Ar.push(vr(0));Ar.length>0;){let mr=Ar.pop(),qr=mr.x,Lr=mr.y,cn=mr.fullyVisible,Nn={x:qr,y:Lr,z:mr.zoom},Dn=De.getTileBoundingVolume(Nn,mr.wrap,de.elevation,y);if(!cn){let Sn=ht(O,Dn,ie);if(Sn===0)continue;cn=Sn===2}let qn=De.distanceToTile2d(ce.x,ce.y,Nn,Dn),_n=Ye;Ne&&(_n=(y.calculateTileZoom||He)(de.zoom+e.ar(de.tileSize/y.tileSize),qn,qt,or,de.fov)),_n=(y.roundZoom?Math.round:Math.floor)(_n),_n=Math.max(0,_n);let vn=Math.min(_n,ct);if(mr.wrap=De.getWrap(_e,Nn,mr.wrap),mr.zoom>=vn){if(mr.zoom>1),wrap:mr.wrap,fullyVisible:cn})}return dr.sort((mr,qr)=>mr.distanceSq-qr.distanceSq).map(mr=>mr.tileID)}let Je=e.a8.fromPoints([new e.P(0,0),new e.P(e.a6,e.a6)]);function Mt(de){return de==="raster"||de==="image"||de==="video"}function dt(de,y,O,ie,ce,_e,De){if(!y.hasData())return!1;let{tileID:Ne,fadingRole:Ye,fadingDirection:lt,fadingParentID:ct}=y;if(Ye===gt.Base&<===mt.Incoming&&ct)return O[ct.key]=ct,!0;let Ft=Math.max(Ne.overscaledZ-ce,_e);for(let Gt=Ne.overscaledZ-1;Gt>=Ft;Gt--){let Jt=Ne.scaledTo(Gt),it=de.getLoadedTile(Jt);if(it)return y.setCrossFadeLogic({fadingRole:gt.Base,fadingDirection:mt.Incoming,fadingParentID:it.tileID,fadeEndTime:ie+De}),it.setCrossFadeLogic({fadingRole:gt.Parent,fadingDirection:mt.Departing,fadeEndTime:ie+De}),O[Jt.key]=Jt,!0}return!1}function Dt(de,y,O,ie,ce,_e){if(!y.hasData())return!1;let De=y.tileID.children(ce),Ne=Ct(de,y,De,O,ie,ce,_e);if(Ne)return!0;for(let Ye of De)Ct(de,y,Ye.children(ce),O,ie,ce,_e)&&(Ne=!0);return Ne}function Ct(de,y,O,ie,ce,_e,De){if(O[0].overscaledZ>=_e)return!1;let Ne=!1;for(let Ye of O){let lt=de.getLoadedTile(Ye);if(!lt)continue;let{fadingRole:ct,fadingDirection:Ft,fadingParentID:Gt}=lt;ct===gt.Base&&Ft===mt.Departing&&Gt||(lt.setCrossFadeLogic({fadingRole:gt.Base,fadingDirection:mt.Departing,fadingParentID:y.tileID,fadeEndTime:ce+De}),y.setCrossFadeLogic({fadingRole:gt.Parent,fadingDirection:mt.Incoming,fadeEndTime:ce+De})),ie[Ye.key]=Ye,Ne=!0}return Ne}function Vt(de,y,O,ie){let ce=de.tileID;return!!de.selfFading||!de.hasData()&&!!y.has(ce)&&(de.setSelfFadeLogic(O+ie),!0)}function Ht(de,y){var O;de.needsHillshadePrepare=!0,de.needsTerrainPrepare=!0;let ie=y.tileID.canonical.x-de.tileID.canonical.x,ce=y.tileID.canonical.y-de.tileID.canonical.y,_e=Math.pow(2,de.tileID.canonical.z),De=y.tileID.key;ie===0&&ce===0||Math.abs(ce)>1||(Math.abs(ie)>1&&(Math.abs(ie+_e)===1?ie+=_e:Math.abs(ie-_e)===1&&(ie-=_e)),y.dem&&de.dem&&(de.dem.backfillBorder(y.dem,ie,ce),!((O=de.neighboringTiles)===null||O===void 0)&&O[De]&&(de.neighboringTiles[De].backfilled=!0)))}class Wt{constructor(){this._tiles={}}handleWrapJump(y){let O={};for(let ie in this._tiles){let ce=this._tiles[ie];ce.tileID=ce.tileID.unwrapTo(ce.tileID.wrap+y),O[ce.tileID.key]=ce}this._tiles=O}setFeatureState(y,O){for(let ie in this._tiles)this._tiles[ie].setFeatureState(y,O)}getAllTiles(){return Object.values(this._tiles)}getAllIds(y=!1){return y?Object.values(this._tiles).map(O=>O.tileID).sort(e.au).map(O=>O.key):Object.keys(this._tiles)}getTileById(y){return this._tiles[y]}setTile(y,O){this._tiles[y]=O}deleteTileById(y){delete this._tiles[y]}getLoadedTile(y){let O=this.getTileById(y.key);return O?.hasData()?O:null}isIdRenderable(y,O=!1){var ie;return(ie=this.getTileById(y))===null||ie===void 0?void 0:ie.isRenderable(O)}getRenderableIds(y=0,O){let ie=[];for(let ce of this.getAllIds())this.isIdRenderable(ce,O)&&ie.push(this.getTileById(ce));return O?ie.sort((ce,_e)=>{let De=ce.tileID,Ne=_e.tileID,Ye=new e.P(De.canonical.x,De.canonical.y)._rotate(-y),lt=new e.P(Ne.canonical.x,Ne.canonical.y)._rotate(-y);return De.overscaledZ-Ne.overscaledZ||lt.y-Ye.y||lt.x-Ye.x}).map(ce=>ce.tileID.key):ie.map(ce=>ce.tileID).sort(e.au).map(ce=>ce.key)}}class Sr extends e.E{constructor(y,O,ie){super(),this.id=y,this.dispatcher=ie,this.on("data",ce=>{this._dataHandler(ce)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((ce,_e,De,Ne)=>{let Ye=new(se(_e.type))(ce,_e,De,Ne);if(Ye.id!==ce)throw new Error(`Expected Source id to be ${ce} instead of ${Ye.id}`);return Ye})(y,O,ie,this),this._inViewTiles=new Wt,this._outOfViewCache=new e.av(0,ce=>this._unloadTile(ce)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new At,this._didEmitContent=!1,this._updated=!1}onAdd(y){var O;this.map=y,this._maxTileCacheSize=y?y._maxTileCacheSize:null,this._maxTileCacheZoomLevels=y?y._maxTileCacheZoomLevels:null,!((O=this._source)===null||O===void 0)&&O.onAdd&&this._source.onAdd(y)}onRemove(y){var O;for(let ie of this._inViewTiles.getAllTiles())ie.unloadVectorData();this.clearTiles(),!((O=this._source)===null||O===void 0)&&O.onRemove&&this._source.onRemove(y),this._inViewTiles=new Wt}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let y=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,y&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(y,O,ie){return e._(this,void 0,void 0,function*(){try{let ce=yield this._source.loadTile(y);this._tileLoaded(y,O,ie,ce)}catch(ce){y.state="errored",ce.status!==404?this._source.fire(new e.l(e.d(ce),{tile:y})):this.update(this.transform,this.terrain)}})}_unloadTile(y){this._source.unloadTile&&this._source.unloadTile(y)}_abortTile(y){this._source.abortTile&&this._source.abortTile(y),this._source.fire(new e.n("dataabort",{tile:y,coord:y.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(y){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let O of this._inViewTiles.getAllTiles())O.upload(y),O.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(y){var O;return this._inViewTiles.getRenderableIds((O=this.transform)===null||O===void 0?void 0:O.bearingInRadians,y)}hasRenderableParent(y){let O=y.overscaledZ-1;if(O>=this._source.minzoom){let ie=this.getLoadedTile(y.scaledTo(O));if(ie)return this._inViewTiles.isIdRenderable(ie.tileID.key)}return!1}reload(y,O=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let ie of this._inViewTiles.getAllIds()){let ce=this._inViewTiles.getTileById(ie);O&&!this._source.shouldReloadTile(ce,O)||(y?this._reloadTile(ie,"expired"):ce.state!=="errored"&&this._reloadTile(ie,"reloading"))}}}_reloadTile(y,O){return e._(this,void 0,void 0,function*(){let ie=this._inViewTiles.getTileById(y);ie&&(ie.state!=="loading"&&(ie.state=O),yield this._loadTile(ie,y,O))})}_tileLoaded(y,O,ie,ce){y.timeAdded=m(),y.selfFading&&(y.fadeEndTime=y.timeAdded+this._rasterFadeDuration),ie==="expired"&&(y.refreshedUponExpiration=!0),this._setTileReloadTimer(O,y),ce?.unmodified||(this.getSource().type==="raster-dem"&&y.dem&&function(_e,De){var Ne,Ye,lt;let ct=De.getRenderableIds();for(let Ft of ct){if(!(!((Ne=_e.neighboringTiles)===null||Ne===void 0)&&Ne[Ft]))continue;let Gt=De.getTileById(Ft);_e.neighboringTiles[Ft].backfilled||Ht(_e,Gt),!((lt=(Ye=Gt.neighboringTiles)===null||Ye===void 0?void 0:Ye[_e.tileID.key])===null||lt===void 0)&<.backfilled||Ht(Gt,_e)}}(y,this._inViewTiles),this._state.initializeTileState(y,this.map?this.map.painter:null),y.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:y,coord:y.tileID})))}getTile(y){return this.getTileByID(y.key)}getTileByID(y){return this._inViewTiles.getTileById(y)}_retainLoadedChildren(y,O){let ie=this._getLoadedDescendents(O),ce=new Set;for(let _e of O){let De=ie[_e.key];if(!De?.length){ce.add(_e);continue}let Ne=_e.overscaledZ+Sr.maxOverzooming,Ye=De.filter(Ft=>Ft.tileID.overscaledZ<=Ne);if(!Ye.length){ce.add(_e);continue}let lt=Math.min(...Ye.map(Ft=>Ft.tileID.overscaledZ)),ct=Ye.filter(Ft=>Ft.tileID.overscaledZ===lt).map(Ft=>Ft.tileID);for(let Ft of ct)y[Ft.key]=Ft;this._areDescendentsComplete(ct,lt,_e.overscaledZ)||ce.add(_e)}return ce}_getLoadedDescendents(y){var O;let ie={};for(let ce of this._inViewTiles.getAllTiles().filter(_e=>_e.hasData()))for(let _e of y)ce.tileID.isChildOf(_e)&&(ie[O=_e.key]||(ie[O]=[]),ie[_e.key].push(ce));return ie}_areDescendentsComplete(y,O,ie){return y.length===1&&y[0].isOverscaled()?y[0].overscaledZ===O:Math.pow(4,O-ie)===y.length}getLoadedTile(y){return this._inViewTiles.getLoadedTile(y)}updateCacheSize(y){let O=Math.ceil(y.width/this._source.tileSize)+1,ie=Math.ceil(y.height/this._source.tileSize)+1,ce=Math.floor(O*ie*(this._maxTileCacheZoomLevels===null?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),_e=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,ce):ce;this._outOfViewCache.setMaxSize(_e)}handleWrapJump(y){let O=Math.round((y-(this._prevLng===void 0?y:this._prevLng))/360);this._prevLng=y,O&&(this._inViewTiles.handleWrapJump(O),this._resetTileReloadTimers())}update(y,O){if(!this._sourceLoaded||this._paused)return;let ie;this.transform=y,this.terrain=O,this.updateCacheSize(y),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?ie=y.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ye=>new e.a3(Ye.canonical.z,Ye.wrap,Ye.canonical.z,Ye.canonical.x,Ye.canonical.y)):(ie=Ze(y,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?y.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:O,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(ie=ie.filter(Ye=>this._source.hasTile(Ye)))):ie=[],this.usedForTerrain&&(ie=this._addTerrainIdealTiles(ie));let ce=ie.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,ce&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let _e=$e(y,this._source),De=this._updateRetainedTiles(ie,_e),Ne=Mt(this._source.type);Ne&&this._rasterFadeDuration>0&&!O&&function(Ye,lt,ct,Ft,Gt,Jt,it){let Rt=m(),qt=e.at(lt);for(let or of lt){let vr=Ye.getTileById(or.key);vr.fadingDirection!==mt.Departing&&vr.fadeOpacity!==0||vr.resetFadeLogic(),dt(Ye,vr,ct,Rt,Ft,Gt,it)||Dt(Ye,vr,ct,Rt,Jt,it)||Vt(vr,qt,Rt,it)||vr.resetFadeLogic()}}(this._inViewTiles,ie,De,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),Ne?this._cleanUpRasterTiles(De):this._cleanUpVectorTiles(De)}_cleanUpRasterTiles(y){for(let O of this._inViewTiles.getAllIds())y[O]||this._removeTile(O)}_cleanUpVectorTiles(y){for(let O of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(O);y[O]?ie.clearSymbolFadeHold():ie.hasSymbolBuckets?ie.holdingForSymbolFade()?ie.symbolFadeFinished()&&this._removeTile(O):ie.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(O)}}_addTerrainIdealTiles(y){let O=[];for(let ie of y)if(ie.canonical.z>this._source.minzoom){let ce=ie.scaledTo(ie.canonical.z-1);O.push(ce);let _e=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));O.push(_e)}return y.concat(O)}releaseSymbolFadeTiles(){for(let y of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(y).holdingForSymbolFade()&&this._removeTile(y)}_updateRetainedTiles(y,O){var ie;let ce=new Set;for(let lt of y)this._addTile(lt).hasData()||ce.add(lt);let _e=y.reduce((lt,ct)=>(lt[ct.key]=ct,lt),{}),De=this._retainLoadedChildren(_e,ce),Ne={},Ye=Math.max(O-Sr.maxUnderzooming,this._source.minzoom);for(let lt of De){let ct=this._inViewTiles.getTileById(lt.key),Ft=ct?.wasRequested();for(let Gt=lt.overscaledZ-1;Gt>=Ye;--Gt){let Jt=lt.scaledTo(Gt);if(Ne[Jt.key])break;if(Ne[Jt.key]=!0,ct=this.getTile(Jt),!ct&&Ft&&(ct=this._addTile(Jt)),ct){let it=ct.hasData();if((it||!(!((ie=this.map)===null||ie===void 0)&&ie.cancelPendingTileRequestsWhileZooming)||Ft)&&(_e[Jt.key]=Jt),Ft=ct.wasRequested(),it)break}}}return _e}_addTile(y){let O=this._inViewTiles.getTileById(y.key);if(O)return O;O=this._outOfViewCache.getAndRemove(y),O&&(O.resetFadeLogic(),this._setTileReloadTimer(y.key,O),O.tileID=y,this._state.initializeTileState(O,this.map?this.map.painter:null));let ie=O;return O||(O=new Tt(y,this._source.tileSize*y.overscaleFactor()),this._loadTile(O,y.key,O.state)),O.uses++,this._inViewTiles.setTile(y.key,O),ie||this._source.fire(new e.n("dataloading",{tile:O,coord:O.tileID,dataType:"source"})),O}_setTileReloadTimer(y,O){this._clearTileReloadTimer(y);let ie=O.getExpiryTimeout();ie&&(this._timers[y]=setTimeout(()=>{this._reloadTile(y,"expired"),delete this._timers[y]},ie))}_clearTileReloadTimer(y){let O=this._timers[y];O&&(clearTimeout(O),delete this._timers[y])}_resetTileReloadTimers(){for(let y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(let y of this._inViewTiles.getAllIds()){let O=this._inViewTiles.getTileById(y);this._setTileReloadTimer(y,O)}}refreshTiles(y){for(let O of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(O);(this._inViewTiles.isIdRenderable(O)||ie.state=="errored")&&y.some(ce=>ce.equals(ie.tileID.canonical))&&this._reloadTile(O,"expired")}}_removeTile(y){let O=this._inViewTiles.getTileById(y);O&&(O.uses--,this._inViewTiles.deleteTileById(y),this._clearTileReloadTimer(y),O.uses>0||(O.hasData()&&O.state!=="reloading"?this._outOfViewCache.add(O.tileID,O,O.getExpiryTimeout()):(O.aborted=!0,this._abortTile(O),this._unloadTile(O))))}_dataHandler(y){y.dataType==="source"&&(y.sourceDataType!=="metadata"?y.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(y.sourceDataChanged,y.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let y of this._inViewTiles.getAllIds())this._removeTile(y);this._outOfViewCache.reset()}tilesIn(y,O,ie){let ce=[],_e=this.transform;if(!_e)return ce;let De=_e.getCoveringTilesDetailsProvider().allowWorldCopies(),Ne=ie?_e.getCameraQueryGeometry(y):y,Ye=Jt=>_e.screenPointToMercatorCoordinate(Jt,this.terrain),lt=this.transformBbox(y,Ye,!De),ct=this.transformBbox(Ne,Ye,!De),Ft=this.getIds(),Gt=e.a8.fromPoints(ct);for(let Jt of Ft){let it=this._inViewTiles.getTileById(Jt);if(it.holdingForSymbolFade())continue;let Rt=De?[it.tileID]:[it.tileID.unwrapTo(-1),it.tileID.unwrapTo(0)],qt=Math.pow(2,_e.zoom-it.tileID.overscaledZ),or=O*it.queryPadding*e.a6/it.tileSize/qt;for(let vr of Rt){let Ar=Gt.map(dr=>vr.getTilePoint(new e.a7(dr.x,dr.y)));if(Ar.expandBy(or),Ar.intersects(Je)){let dr=lt.map(qr=>vr.getTilePoint(qr)),mr=ct.map(qr=>vr.getTilePoint(qr));ce.push({tile:it,tileID:De?vr:vr.unwrapTo(0),queryGeometry:dr,cameraQueryGeometry:mr,scale:qt})}}}return ce}transformBbox(y,O,ie){let ce=y.map(O);if(ie){let _e=e.a8.fromPoints(y);_e.shrinkBy(.001*Math.min(_e.width(),_e.height()));let De=_e.map(O);e.a8.fromPoints(ce).covers(De)||(ce=ce.map(Ne=>Ne.x>.5?new e.a7(Ne.x-1,Ne.y,Ne.z):Ne))}return ce}getVisibleCoordinates(y){let O=this.getRenderableIds(y).map(ie=>this._inViewTiles.getTileById(ie).tileID);return this.transform&&this.transform.populateCache(O),O}hasTransition(){return!!this._source.hasTransition()||Mt(this._source.type)&&function(y,O){if(O<=0)return!1;let ie=m();for(let ce of y.getAllTiles())if(ce.fadeEndTime>=ie)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(y){this._rasterFadeDuration=y}setFeatureState(y,O,ie){y||(y=e.ag),this._state.updateState(y,O,ie)}removeFeatureState(y,O,ie){y||(y=e.ag),this._state.removeFeatureState(y,O,ie)}getFeatureState(y,O){return y||(y=e.ag),this._state.getState(y,O)}setDependencies(y,O,ie){let ce=this._inViewTiles.getTileById(y);ce&&ce.setDependencies(O,ie)}reloadTilesForDependencies(y,O){for(let ie of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(ie).hasDependency(y,O)&&this._reloadTile(ie,"reloading");this._outOfViewCache.filter(ie=>!ie.hasDependency(y,O))}areTilesLoaded(){for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}}Sr.maxUnderzooming=10,Sr.maxOverzooming=3;class on{constructor(y,O){this.reset(y,O)}reset(y,O){this.points=y||[],this._distances=[0];for(let ie=1;ie0?(ce-De)/Ne:0;return this.points[_e].mult(1-Ye).add(this.points[O].mult(Ye))}}function $t(de,y){let O=!0;return de==="always"||de!=="never"&&y!=="never"||(O=!1),O}class It{constructor(y,O,ie){let ce=this.boxCells=[],_e=this.circleCells=[];this.xCellCount=Math.ceil(y/ie),this.yCellCount=Math.ceil(O/ie);for(let De=0;Dethis.width||ce<0||O>this.height)return[];let Ye=[];if(y<=0&&O<=0&&this.width<=ie&&this.height<=ce){if(_e)return[{key:null,x1:y,y1:O,x2:ie,y2:ce}];for(let lt=0;lt0}hitTestCircle(y,O,ie,ce,_e){let De=y-ie,Ne=y+ie,Ye=O-ie,lt=O+ie;if(Ne<0||De>this.width||lt<0||Ye>this.height)return!1;let ct=[];return this._forEachCell(De,Ye,Ne,lt,this._queryCellCircle,ct,{hitTest:!0,overlapMode:ce,circle:{x:y,y:O,radius:ie},seenUids:{box:{},circle:{}}},_e),ct.length>0}_queryCell(y,O,ie,ce,_e,De,Ne,Ye){let{seenUids:lt,hitTest:ct,overlapMode:Ft}=Ne,Gt=this.boxCells[_e],Jt=1e-6;if(Gt!==null){let Rt=this.bboxes;for(let qt of Gt)if(!lt.box[qt]){lt.box[qt]=!0;let or=4*qt,vr=this.boxKeys[qt];if(y<=Rt[or+2]+Jt&&O<=Rt[or+3]+Jt&&ie>=Rt[or+0]-Jt&&ce>=Rt[or+1]-Jt&&(!Ye||Ye(vr))&&(!ct||!$t(Ft,vr.overlapMode))&&(De.push({key:vr,x1:Rt[or],y1:Rt[or+1],x2:Rt[or+2],y2:Rt[or+3]}),ct))return!0}}let it=this.circleCells[_e];if(it!==null){let Rt=this.circles;for(let qt of it)if(!lt.circle[qt]){lt.circle[qt]=!0;let or=3*qt,vr=this.circleKeys[qt];if(this._circleAndRectCollide(Rt[or],Rt[or+1],Rt[or+2],y,O,ie,ce)&&(!Ye||Ye(vr))&&(!ct||!$t(Ft,vr.overlapMode))){let Ar=Rt[or],dr=Rt[or+1],mr=Rt[or+2];if(De.push({key:vr,x1:Ar-mr,y1:dr-mr,x2:Ar+mr,y2:dr+mr}),ct)return!0}}}return!1}_queryCellCircle(y,O,ie,ce,_e,De,Ne,Ye){let{circle:lt,seenUids:ct,overlapMode:Ft}=Ne,Gt=this.boxCells[_e];if(Gt!==null){let it=this.bboxes;for(let Rt of Gt)if(!ct.box[Rt]){ct.box[Rt]=!0;let qt=4*Rt,or=this.boxKeys[Rt];if(this._circleAndRectCollide(lt.x,lt.y,lt.radius,it[qt+0],it[qt+1],it[qt+2],it[qt+3])&&(!Ye||Ye(or))&&!$t(Ft,or.overlapMode))return De.push(!0),!0}}let Jt=this.circleCells[_e];if(Jt!==null){let it=this.circles;for(let Rt of Jt)if(!ct.circle[Rt]){ct.circle[Rt]=!0;let qt=3*Rt,or=this.circleKeys[Rt];if(this._circlesCollide(it[qt],it[qt+1],it[qt+2],lt.x,lt.y,lt.radius)&&(!Ye||Ye(or))&&!$t(Ft,or.overlapMode))return De.push(!0),!0}}}_forEachCell(y,O,ie,ce,_e,De,Ne,Ye){let lt=this._convertToXCellCoord(y),ct=this._convertToYCellCoord(O),Ft=this._convertToXCellCoord(ie),Gt=this._convertToYCellCoord(ce);for(let Jt=lt;Jt<=Ft;Jt++)for(let it=ct;it<=Gt;it++)if(_e.call(this,y,O,ie,ce,this.xCellCount*it+Jt,De,Ne,Ye))return}_convertToXCellCoord(y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(y*this.xScale)))}_convertToYCellCoord(y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(y*this.yScale)))}_circlesCollide(y,O,ie,ce,_e,De){let Ne=ce-y,Ye=_e-O,lt=ie+De;return lt*lt>Ne*Ne+Ye*Ye}_circleAndRectCollide(y,O,ie,ce,_e,De,Ne){let Ye=(De-ce)/2,lt=Math.abs(y-(ce+Ye));if(lt>Ye+ie)return!1;let ct=(Ne-_e)/2,Ft=Math.abs(O-(_e+ct));if(Ft>ct+ie)return!1;if(lt<=Ye||Ft<=ct)return!0;let Gt=lt-Ye,Jt=Ft-ct;return Gt*Gt+Jt*Jt<=ie*ie}}function ir(de,y){let O=1/(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]),ie=1/(y[8]*y[8]+y[9]*y[9]+y[10]*y[10]),ce=y[0]*O,_e=y[4]*O,De=y[8]*ie,Ne=y[1]*O,Ye=y[5]*O,lt=y[9]*ie,ct=y[2]*O,Ft=y[6]*O,Gt=y[10]*ie;de[0]=ce,de[1]=_e,de[2]=De,de[4]=Ne,de[5]=Ye,de[6]=lt,de[8]=ct,de[9]=Ft,de[10]=Gt;let Jt=y[12],it=y[13],Rt=y[14];return de[12]=-ce*Jt-Ne*it-ct*Rt,de[13]=-_e*Jt-Ye*it-Ft*Rt,de[14]=-De*Jt-lt*it-Gt*Rt,de[3]=0,de[7]=0,de[11]=0,de[15]=1,de}let cr=e.O();function fr(de,y,O){let ie=e.O();if(!de){let{vecSouth:Ft,vecEast:Gt}=ln(y),Jt=a();Jt[0]=Gt[0],Jt[1]=Gt[1],Jt[2]=Ft[0],Jt[3]=Ft[1],ce=Jt,(ct=(De=(_e=Jt)[0])*(lt=_e[3])-(Ye=_e[2])*(Ne=_e[1]))&&(ce[0]=lt*(ct=1/ct),ce[1]=-Ne*ct,ce[2]=-Ye*ct,ce[3]=De*ct),ie[0]=Jt[0],ie[1]=Jt[1],ie[4]=Jt[2],ie[5]=Jt[3]}var ce,_e,De,Ne,Ye,lt,ct;return e.S(ie,ie,[1/O,1/O,1]),ie}function Ir(de,y,O,ie){if(de){let ce=e.O();if(!y){let{vecSouth:_e,vecEast:De}=ln(O);ce[0]=De[0],ce[1]=De[1],ce[4]=_e[0],ce[5]=_e[1]}return e.S(ce,ce,[ie,ie,1]),ce}return O.pixelsToClipSpaceMatrix}function ln(de){let y=Math.cos(de.rollInRadians),O=Math.sin(de.rollInRadians),ie=Math.cos(de.pitchInRadians),ce=Math.cos(de.bearingInRadians),_e=Math.sin(de.bearingInRadians),De=e.az();De[0]=-ce*ie*O-_e*y,De[1]=-_e*ie*O+ce*y;let Ne=e.aA(De);Ne<1e-9?e.aB(De):e.aC(De,De,1/Ne);let Ye=e.az();Ye[0]=ce*ie*y-_e*O,Ye[1]=_e*ie*y+ce*O;let lt=e.aA(Ye);return lt<1e-9?e.aB(Ye):e.aC(Ye,Ye,1/lt),{vecEast:Ye,vecSouth:De}}function nn(de,y,O,ie){let ce;ie?(ce=[de,y,ie(de,y),1],e.aE(ce,ce,O)):(ce=[de,y,0,1],Kn(ce,ce,O));let _e=ce[3];return{point:new e.P(ce[0]/_e,ce[1]/_e),signedDistanceFromCamera:_e,isOccluded:!1}}function wn(de,y){return .5+de/y*.5}function Un(de,y){return de.x>=-y[0]&&de.x<=y[0]&&de.y>=-y[1]&&de.y<=y[1]}function jn(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt){let Jt=O?de.textSizeData:de.iconSizeData,it=e.aw(Jt,y.transform.zoom),Rt=[256/y.width*2+1,256/y.height*2+1],qt=O?de.text.dynamicLayoutVertexArray:de.icon.dynamicLayoutVertexArray;qt.clear();let or=de.lineVertexArray,vr=O?de.text.placedSymbolArray:de.icon.placedSymbolArray,Ar=y.transform.width/y.transform.height,dr=!1;for(let mr=0;mrMath.abs(O.x-y.x)*ie?{useVertical:!0}:(de===e.ax.vertical?y.yO.x)?{needsFlipping:!0}:null}function Qn(de){let{projectionContext:y,pitchedLabelPlaneMatrixInverse:O,symbol:ie,fontSize:ce,flip:_e,keepUpright:De,glyphOffsetArray:Ne,dynamicLayoutVertexArray:Ye,aspectRatio:lt,rotateToLine:ct}=de,Ft=ce/24,Gt=ie.lineOffsetX*Ft,Jt=ie.lineOffsetY*Ft,it;if(ie.numGlyphs>1){let Rt=ie.glyphStartIndex+ie.numGlyphs,qt=ie.lineStartIndex,or=ie.lineStartIndex+ie.lineLength,vr=Aa(Ft,Ne,Gt,Jt,_e,ie,ct,y);if(!vr)return{notEnoughRoom:!0};let Ar=Mi(vr.first.point.x,vr.first.point.y,y,O),dr=Mi(vr.last.point.x,vr.last.point.y,y,O);if(De&&!_e){let mr=ua(ie.writingMode,Ar,dr,lt);if(mr)return mr}it=[vr.first];for(let mr=ie.glyphStartIndex+1;mr0?Ar.point:ei(y.tileAnchorPoint,vr,qt,1,y),mr=Mi(qt.x,qt.y,y,O),qr=Mi(dr.x,dr.y,y,O),Lr=ua(ie.writingMode,mr,qr,lt);if(Lr)return Lr}let Rt=Ii(Ft*Ne.getoffsetX(ie.glyphStartIndex),Gt,Jt,_e,ie.segment,ie.lineStartIndex,ie.lineStartIndex+ie.lineLength,y,ct);if(!Rt||y.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};it=[Rt]}for(let Rt of it)e.aD(Ye,Rt.point,Rt.angle);return{}}function ei(de,y,O,ie,ce){let _e=de.add(de.sub(y)._unit()),De=ai(_e.x,_e.y,ce).point,Ne=O.sub(De);return O.add(Ne._mult(ie/Ne.mag()))}function Fa(de,y,O){let ie=y.projectionCache;if(ie.projections[de])return ie.projections[de];let ce=new e.P(y.lineVertexArray.getx(de),y.lineVertexArray.gety(de)),_e=ai(ce.x,ce.y,y);if(_e.signedDistanceFromCamera>0)return ie.projections[de]=_e.point,ie.anyProjectionOccluded||(ie.anyProjectionOccluded=_e.isOccluded),_e.point;let De=de-O.direction;return ei(O.distanceFromAnchor===0?y.tileAnchorPoint:new e.P(y.lineVertexArray.getx(De),y.lineVertexArray.gety(De)),ce,O.previousVertex,O.absOffsetX-O.distanceFromAnchor+1,y)}function ai(de,y,O){let ie=de+O.translation[0],ce=y+O.translation[1],_e;return O.pitchWithMap?(_e=nn(ie,ce,O.pitchedLabelPlaneMatrix,O.getElevation),_e.isOccluded=!1):(_e=O.transform.projectTileCoordinates(ie,ce,O.unwrappedTileID,O.getElevation),_e.point.x=(.5*_e.point.x+.5)*O.width,_e.point.y=(.5*-_e.point.y+.5)*O.height),_e}function Mi(de,y,O,ie){if(O.pitchWithMap){let ce=[de,y,0,1];return e.aE(ce,ce,ie),O.transform.projectTileCoordinates(ce[0]/ce[3],ce[1]/ce[3],O.unwrappedTileID,O.getElevation).point}return{x:de/O.width*2-1,y:1-y/O.height*2}}function ci(de,y,O){return O.transform.projectTileCoordinates(de,y,O.unwrappedTileID,O.getElevation)}function ba(de,y,O){return de._unit()._perp()._mult(y*O)}function pa(de,y,O,ie,ce,_e,De,Ne,Ye){if(Ne.projectionCache.offsets[de])return Ne.projectionCache.offsets[de];let lt=O.add(y);if(de+Ye.direction=ce)return Ne.projectionCache.offsets[de]=lt,lt;let ct=Fa(de+Ye.direction,Ne,Ye),Ft=ba(ct.sub(O),De,Ye.direction),Gt=O.add(Ft),Jt=ct.add(Ft);return Ne.projectionCache.offsets[de]=e.aF(_e,lt,Gt,Jt)||lt,Ne.projectionCache.offsets[de]}function Ii(de,y,O,ie,ce,_e,De,Ne,Ye){let lt=ie?de-y:de+y,ct=lt>0?1:-1,Ft=0;ie&&(ct*=-1,Ft=Math.PI),ct<0&&(Ft+=Math.PI);let Gt,Jt=ct>0?_e+ce:_e+ce+1;Ne.projectionCache.cachedAnchorPoint?Gt=Ne.projectionCache.cachedAnchorPoint:(Gt=ai(Ne.tileAnchorPoint.x,Ne.tileAnchorPoint.y,Ne).point,Ne.projectionCache.cachedAnchorPoint=Gt);let it,Rt,qt=Gt,or=Gt,vr=0,Ar=0,dr=Math.abs(lt),mr=[],qr;for(;vr+Ar<=dr;){if(Jt+=ct,Jt<_e||Jt>=De)return null;vr+=Ar,or=qt,Rt=it;let Nn={absOffsetX:dr,direction:ct,distanceFromAnchor:vr,previousVertex:or};if(qt=Fa(Jt,Ne,Nn),O===0)mr.push(or),qr=qt.sub(or);else{let Dn,qn=qt.sub(or);Dn=qn.mag()===0?ba(Fa(Jt+ct,Ne,Nn).sub(qt),O,ct):ba(qn,O,ct),Rt||(Rt=or.add(Dn)),it=pa(Jt,Dn,qt,_e,De,Rt,O,Ne,Nn),mr.push(Rt),qr=it.sub(Rt)}Ar=qr.mag()}let Lr=qr._mult((dr-vr)/Ar)._add(Rt||or),cn=Ft+Math.atan2(qt.y-or.y,qt.x-or.x);return mr.push(Lr),{point:Lr,angle:Ye?cn:0,path:mr}}let ho=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function da(de,y){for(let O=0;O=1;$n--)Sn.push(_n.path[$n]);for(let $n=1;$nHa.signedDistanceFromCamera<=0)?[]:$n.map(Ha=>Ha.point)}let Xn=[];if(Sn.length>0){let $n=Sn[0].clone(),Ha=Sn[0].clone();for(let $a=1;$a=Nn.x&&Ha.x<=Dn.x&&$n.y>=Nn.y&&Ha.y<=Dn.y?[Sn]:Ha.xDn.x||Ha.yDn.y?[]:e.aG([Sn],Nn.x,Nn.y,Dn.x,Dn.y)}for(let $n of Xn){qn.reset($n,.25*cn);let Ha=0;Ha=qn.length<=.5*cn?1:Math.ceil(qn.paddedLength/Tn)+1;for(let $a=0;$a{let Ye=nn(Ne.x,Ne.y,De,_e.getElevation),lt=_e.transform.projectTileCoordinates(Ye.point.x,Ye.point.y,_e.unwrappedTileID,_e.getElevation);return lt.point.x=(.5*lt.point.x+.5)*_e.width,lt.point.y=(.5*-lt.point.y+.5)*_e.height,lt})}(y,O);return function(ce){let _e=0,De=0,Ne=0,Ye=0;for(let lt=0;ltDe&&(De=Ye,_e=Ne));return ce.slice(_e,_e+De)}(ie)}queryRenderedSymbols(y){if(y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let O=[],ie=new e.a8;for(let Ft of y){let Gt=new e.P(Ft.x+ot,Ft.y+ot);ie.extend(Gt),O.push(Gt)}let{minX:ce,minY:_e,maxX:De,maxY:Ne}=ie,Ye=this.grid.query(ce,_e,De,Ne).concat(this.ignoredGrid.query(ce,_e,De,Ne)),lt={},ct={};for(let Ft of Ye){let Gt=Ft.key;if(lt[Gt.bucketInstanceId]===void 0&&(lt[Gt.bucketInstanceId]={}),lt[Gt.bucketInstanceId][Gt.featureIndex])continue;let Jt=[new e.P(Ft.x1,Ft.y1),new e.P(Ft.x2,Ft.y1),new e.P(Ft.x2,Ft.y2),new e.P(Ft.x1,Ft.y2)];e.aH(O,Jt)&&(lt[Gt.bucketInstanceId][Gt.featureIndex]=!0,ct[Gt.bucketInstanceId]===void 0&&(ct[Gt.bucketInstanceId]=[]),ct[Gt.bucketInstanceId].push(Gt.featureIndex))}return ct}insertCollisionBox(y,O,ie,ce,_e,De){(ie?this.ignoredGrid:this.grid).insert({bucketInstanceId:ce,featureIndex:_e,collisionGroupID:De,overlapMode:O},y[0],y[1],y[2],y[3])}insertCollisionCircles(y,O,ie,ce,_e,De){let Ne=ie?this.ignoredGrid:this.grid,Ye={bucketInstanceId:ce,featureIndex:_e,collisionGroupID:De,overlapMode:O};for(let lt=0;lt=this.screenRightBoundary||cethis.screenBottomBoundary}isInsideGrid(y,O,ie,ce){return ie>=0&&y=0&&Othis.projectAndGetPerspectiveRatio(Tn.x,Tn.y,ce,lt,Ft));vn=Sn.some(Tn=>!Tn.isOccluded),_n=Sn.map(Tn=>new e.P(Tn.x,Tn.y))}else vn=!0;return{box:e.aI(_n),allPointsOccluded:!vn}}}class hr{constructor(y,O,ie,ce){this.opacity=y?Math.max(0,Math.min(1,y.opacity+(y.placed?O:-O))):ce&&ie?1:0,this.placed=ie}isHidden(){return this.opacity===0&&!this.placed}}class ur{constructor(y,O,ie,ce,_e){this.text=new hr(y?y.text:null,O,ie,_e),this.icon=new hr(y?y.icon:null,O,ce,_e)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tr{constructor(y,O,ie){this.text=y,this.icon=O,this.skipFade=ie}}class Rr{constructor(y,O,ie,ce,_e){this.bucketInstanceId=y,this.featureIndex=O,this.sourceLayerIndex=ie,this.bucketIndex=ce,this.tileID=_e}}class Fr{constructor(y){this.crossSourceCollisions=y,this.maxGroupID=0,this.collisionGroups={}}get(y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[y]){let O=++this.maxGroupID;this.collisionGroups[y]={ID:O,predicate:ie=>ie.collisionGroupID===O}}return this.collisionGroups[y]}}function at(de,y,O,ie,ce){let{horizontalAlign:_e,verticalAlign:De}=e.aP(de);return new e.P(-(_e-.5)*y+ie[0]*ce,-(De-.5)*O+ie[1]*ce)}class kt{constructor(y,O,ie,ce,_e){this.transform=y.clone(),this.terrain=O,this.collisionIndex=new et(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ie,this.retainedQueryData={},this.collisionGroups=new Fr(ce),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=_e,_e&&(_e.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(y){let O=this.terrain;return O?(ie,ce)=>O.getElevation(y,ie,ce):null}getBucketParts(y,O,ie,ce){let _e=ie.getBucket(O),De=ie.latestFeatureIndex;if(!_e||!De||O.id!==_e.layerIds[0])return;let Ne=ie.collisionBoxArray,Ye=_e.layers[0].layout,lt=_e.layers[0].paint,ct=Math.pow(2,this.transform.zoom-ie.tileID.overscaledZ),Ft=ie.tileSize/e.a6,Gt=ie.tileID.toUnwrapped(),Jt=Ye.get("text-rotation-alignment")==="map",it=e.aK(ie,1,this.transform.zoom),Rt=e.aL(this.collisionIndex.transform,ie,lt.get("text-translate"),lt.get("text-translate-anchor")),qt=e.aL(this.collisionIndex.transform,ie,lt.get("icon-translate"),lt.get("icon-translate-anchor")),or=fr(Jt,this.transform,it);this.retainedQueryData[_e.bucketInstanceId]=new Rr(_e.bucketInstanceId,De,_e.sourceLayerIndex,_e.index,ie.tileID);let vr={bucket:_e,layout:Ye,translationText:Rt,translationIcon:qt,unwrappedTileID:Gt,pitchedLabelPlaneMatrix:or,scale:ct,textPixelRatio:Ft,holdingForFade:ie.holdingForSymbolFade(),collisionBoxArray:Ne,partiallyEvaluatedTextSize:e.aw(_e.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(_e.sourceID)};if(ce)for(let Ar of _e.sortKeyRanges){let{sortKey:dr,symbolInstanceStart:mr,symbolInstanceEnd:qr}=Ar;y.push({sortKey:dr,symbolInstanceStart:mr,symbolInstanceEnd:qr,parameters:vr})}else y.push({symbolInstanceStart:0,symbolInstanceEnd:_e.symbolInstances.length,parameters:vr})}attemptAnchorPlacement(y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt,Jt,it,Rt,qt,or,vr,Ar,dr){var mr,qr,Lr;let cn=e.aM[y.textAnchor],Nn=[y.textOffset0,y.textOffset1],Dn=at(cn,ie,ce,Nn,_e),qn=this.collisionIndex.placeCollisionBox(O,Gt,Ye,lt,ct,Ne,De,qt,Ft.predicate,Ar,Dn,dr);if((!vr||this.collisionIndex.placeCollisionBox(vr,Gt,Ye,lt,ct,Ne,De,or,Ft.predicate,Ar,Dn,dr).placeable)&&qn.placeable){let _n;if(!((mr=this.prevPlacement)===null||mr===void 0)&&mr.variableOffsets[Jt.crossTileID]&&(!((Lr=(qr=this.prevPlacement)===null||qr===void 0?void 0:qr.placements[Jt.crossTileID])===null||Lr===void 0)&&Lr.text)&&(_n=this.prevPlacement.variableOffsets[Jt.crossTileID].anchor),Jt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Jt.crossTileID]={textOffset:Nn,width:ie,height:ce,anchor:cn,textBoxScale:_e,prevAnchor:_n},this.markUsedJustification(it,cn,Jt,Rt),it.allowVerticalPlacement&&(this.markUsedOrientation(it,Rt,Jt),this.placedOrientations[Jt.crossTileID]=Rt),{shift:Dn,placedGlyphBoxes:qn}}}placeLayerBucketPart(y,O,ie){let{bucket:ce,layout:_e,translationText:De,translationIcon:Ne,unwrappedTileID:Ye,pitchedLabelPlaneMatrix:lt,textPixelRatio:ct,holdingForFade:Ft,collisionBoxArray:Gt,partiallyEvaluatedTextSize:Jt,collisionGroup:it}=y.parameters,Rt=_e.get("text-optional"),qt=_e.get("icon-optional"),or=e.aN(_e,"text-overlap","text-allow-overlap"),vr=or==="always",Ar=e.aN(_e,"icon-overlap","icon-allow-overlap"),dr=Ar==="always",mr=_e.get("text-rotation-alignment")==="map",qr=_e.get("text-pitch-alignment")==="map",Lr=_e.get("icon-text-fit")!=="none",cn=_e.get("symbol-z-order")==="viewport-y",Nn=vr&&(dr||!ce.hasIconData()||qt),Dn=dr&&(vr||!ce.hasTextData()||Rt);!ce.collisionArrays&&Gt&&ce.deserializeCollisionBoxes(Gt);let qn=this.retainedQueryData[ce.bucketInstanceId].tileID,_n=this._getTerrainElevationFunc(qn),vn=this.transform.getFastPathSimpleProjectionMatrix(qn),Sn=(Tn,Xn,$n)=>{var Ha,$a;if(O[Tn.crossTileID])return;if(Ft)return void(this.placements[Tn.crossTileID]=new Tr(!1,!1,!1));let Si=!1,Ma=!1,xa=!0,gi=null,Wa={box:null,placeable:!1,offscreen:null,occluded:!1},Ya={placeable:!1},Xa=null,pi=null,Xi=null,Eo=0,yi=0,Ui=0;Xn.textFeatureIndex?Eo=Xn.textFeatureIndex:Tn.useRuntimeCollisionCircles&&(Eo=Tn.featureIndex),Xn.verticalTextFeatureIndex&&(yi=Xn.verticalTextFeatureIndex);let fo=Xn.textBox;if(fo){let Vs=hs=>{let ss=e.ax.horizontal;if(ce.allowVerticalPlacement&&!hs&&this.prevPlacement){let ks=this.prevPlacement.placedOrientations[Tn.crossTileID];ks&&(this.placedOrientations[Tn.crossTileID]=ks,ss=ks,this.markUsedOrientation(ce,ss,Tn))}return ss},Uo=(hs,ss)=>{if(ce.allowVerticalPlacement&&Tn.numVerticalGlyphVertices>0&&Xn.verticalTextBox){for(let ks of ce.writingModes)if(ks===e.ax.vertical?(Wa=ss(),Ya=Wa):Wa=hs(),Wa?.placeable)break}else Wa=hs()},Qs=Tn.textAnchorOffsetStartIndex,os=Tn.textAnchorOffsetEndIndex;if(os===Qs){let hs=(ss,ks)=>{let ts=this.collisionIndex.placeCollisionBox(ss,or,ct,qn,Ye,qr,mr,De,it.predicate,_n,void 0,vn);return ts?.placeable&&(this.markUsedOrientation(ce,ks,Tn),this.placedOrientations[Tn.crossTileID]=ks),ts};Uo(()=>hs(fo,e.ax.horizontal),()=>{let ss=Xn.verticalTextBox;return ce.allowVerticalPlacement&&Tn.numVerticalGlyphVertices>0&&ss?hs(ss,e.ax.vertical):{box:null,offscreen:null}}),Vs(Wa?.placeable)}else{let hs=e.aM[($a=(Ha=this.prevPlacement)===null||Ha===void 0?void 0:Ha.variableOffsets[Tn.crossTileID])===null||$a===void 0?void 0:$a.anchor],ss=(ts,el,Il)=>{let Do=ts.x2-ts.x1,ru=ts.y2-ts.y1,Ns=Tn.textBoxScale,Nu=Lr&&Ar==="never"?el:null,Vl=null,Hl=or==="never"?1:2,Co="never";hs&&Hl++;for(let is=0;isss(fo,Xn.iconBox,e.ax.horizontal),()=>{let ts=Xn.verticalTextBox;return ce.allowVerticalPlacement&&!Wa?.placeable&&Tn.numVerticalGlyphVertices>0&&ts?ss(ts,Xn.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Wa&&(Si=Wa.placeable,xa=Wa.offscreen);let ks=Vs(Wa?.placeable);if(!Si&&this.prevPlacement){let ts=this.prevPlacement.variableOffsets[Tn.crossTileID];ts&&(this.variableOffsets[Tn.crossTileID]=ts,this.markUsedJustification(ce,ts.anchor,Tn,ks))}}}if(Xa=Wa,Si=Xa?.placeable,xa=Xa?.offscreen,Tn.useRuntimeCollisionCircles&&Tn.centerJustifiedTextSymbolIndex>=0){let Vs=ce.text.placedSymbolArray.get(Tn.centerJustifiedTextSymbolIndex),Uo=e.ay(ce.textSizeData,Jt,Vs),Qs=_e.get("text-padding");pi=this.collisionIndex.placeCollisionCircles(or,Vs,ce.lineVertexArray,ce.glyphOffsetArray,Uo,Ye,lt,ie,qr,it.predicate,Tn.collisionCircleDiameter,Qs,De,_n),pi.circles.length&&pi.collisionDetected&&!ie&&e.w("Collisions detected, but collision boxes are not shown"),Si=vr||pi.circles.length>0&&!pi.collisionDetected,xa&&(xa=pi.offscreen)}if(Xn.iconFeatureIndex&&(Ui=Xn.iconFeatureIndex),Xn.iconBox){let Vs=Uo=>this.collisionIndex.placeCollisionBox(Uo,Ar,ct,qn,Ye,qr,mr,Ne,it.predicate,_n,Lr&&gi?gi:void 0,vn);Ya&&Ya.placeable&&Xn.verticalIconBox?(Xi=Vs(Xn.verticalIconBox),Ma=Xi.placeable):(Xi=Vs(Xn.iconBox),Ma=Xi.placeable),xa&&(xa=Xi.offscreen)}let To=Rt||Tn.numHorizontalGlyphVertices===0&&Tn.numVerticalGlyphVertices===0,jo=qt||Tn.numIconVertices===0;To||jo?jo?To||Ma&&(Ma=Si):Si=Ma&&Si:Ma=Si=Ma&&Si;let qs=Ma&&Xi.placeable;if(Si&&Xa.placeable&&this.collisionIndex.insertCollisionBox(Xa.box,or,_e.get("text-ignore-placement"),ce.bucketInstanceId,Ya&&Ya.placeable&&yi?yi:Eo,it.ID),qs&&this.collisionIndex.insertCollisionBox(Xi.box,Ar,_e.get("icon-ignore-placement"),ce.bucketInstanceId,Ui,it.ID),pi&&Si&&this.collisionIndex.insertCollisionCircles(pi.circles,or,_e.get("text-ignore-placement"),ce.bucketInstanceId,Eo,it.ID),ie&&this.storeCollisionData(ce.bucketInstanceId,$n,Xn,Xa,Xi,pi),Tn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(ce.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Tn.crossTileID]=new Tr((Si||Nn)&&!Xa?.occluded,(Ma||Dn)&&!Xi?.occluded,xa||ce.justReloaded),O[Tn.crossTileID]=!0};if(cn){if(y.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Tn=ce.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Xn=Tn.length-1;Xn>=0;--Xn){let $n=Tn[Xn];Sn(ce.symbolInstances.get($n),ce.collisionArrays[$n],$n)}}else for(let Tn=y.symbolInstanceStart;Tn=0&&(y.text.placedSymbolArray.get(Ne).crossTileID=_e>=0&&Ne!==_e?0:ie.crossTileID)}markUsedOrientation(y,O,ie){let ce=O===e.ax.horizontal||O===e.ax.horizontalOnly?O:0,_e=O===e.ax.vertical?O:0,De=[ie.leftJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.rightJustifiedTextSymbolIndex];for(let Ne of De)y.text.placedSymbolArray.get(Ne).placedOrientation=ce;ie.verticalPlacedTextSymbolIndex&&(y.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).placedOrientation=_e)}commit(y){this.commitTime=y,this.zoomAtLastRecencyCheck=this.transform.zoom;let O=this.prevPlacement,ie=!1;this.prevZoomAdjustment=O?O.zoomAdjustment(this.transform.zoom):0;let ce=O?O.symbolFadeChange(y):1,_e=O?O.opacities:{},De=O?O.variableOffsets:{},Ne=O?O.placedOrientations:{};for(let Ye in this.placements){let lt=this.placements[Ye],ct=_e[Ye];ct?(this.opacities[Ye]=new ur(ct,ce,lt.text,lt.icon),ie||(ie=lt.text!==ct.text.placed),ie||(ie=lt.icon!==ct.icon.placed)):(this.opacities[Ye]=new ur(null,ce,lt.text,lt.icon,lt.skipFade),ie||(ie=lt.text||lt.icon))}for(let Ye in _e){let lt=_e[Ye];if(!this.opacities[Ye]){let ct=new ur(lt,ce,!1,!1);ct.isHidden()||(this.opacities[Ye]=ct,ie||(ie=lt.text.placed),ie||(ie=lt.icon.placed))}}for(let Ye in De)this.variableOffsets[Ye]||!this.opacities[Ye]||this.opacities[Ye].isHidden()||(this.variableOffsets[Ye]=De[Ye]);for(let Ye in Ne)this.placedOrientations[Ye]||!this.opacities[Ye]||this.opacities[Ye].isHidden()||(this.placedOrientations[Ye]=Ne[Ye]);if(O&&O.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");ie?this.lastPlacementChangeTime=y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=O?O.lastPlacementChangeTime:y)}updateLayerOpacities(y,O){let ie={};for(let ce of O){let _e=ce.getBucket(y);_e&&ce.latestFeatureIndex&&y.id===_e.layerIds[0]&&this.updateBucketOpacities(_e,ce.tileID,ie,ce.collisionBoxArray)}}updateBucketOpacities(y,O,ie,ce){y.hasTextData()&&(y.text.opacityVertexArray.clear(),y.text.hasVisibleVertices=!1),y.hasIconData()&&(y.icon.opacityVertexArray.clear(),y.icon.hasVisibleVertices=!1),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexArray.clear(),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexArray.clear();let _e=y.layers[0],De=_e.layout,Ne=new ur(null,0,!1,!1,!0),Ye=De.get("text-allow-overlap"),lt=De.get("icon-allow-overlap"),ct=_e._unevaluatedLayout.hasValue("text-variable-anchor")||_e._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ft=De.get("text-rotation-alignment")==="map",Gt=De.get("text-pitch-alignment")==="map",Jt=De.get("icon-text-fit")!=="none",it=new ur(null,0,Ye&&(lt||!y.hasIconData()||De.get("icon-optional")),lt&&(Ye||!y.hasTextData()||De.get("text-optional")),!0);!y.collisionArrays&&ce&&(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData())&&y.deserializeCollisionBoxes(ce);let Rt=(or,vr,Ar)=>{for(let dr=0;dr0,cn=this.placedOrientations[vr.crossTileID],Nn=cn===e.ax.vertical,Dn=cn===e.ax.horizontal||cn===e.ax.horizontalOnly;if(Ar>0||dr>0){let _n=Pn(qr.text);Rt(y.text,Ar,Nn?Ca:_n),Rt(y.text,dr,Dn?Ca:_n);let vn=qr.text.isHidden(),Sn=[vr.rightJustifiedTextSymbolIndex,vr.centerJustifiedTextSymbolIndex,vr.leftJustifiedTextSymbolIndex];for(let $n of Sn)$n>=0&&(y.text.placedSymbolArray.get($n).hidden=vn||Nn?1:0);vr.verticalPlacedTextSymbolIndex>=0&&(y.text.placedSymbolArray.get(vr.verticalPlacedTextSymbolIndex).hidden=vn||Dn?1:0);let Tn=this.variableOffsets[vr.crossTileID];Tn&&this.markUsedJustification(y,Tn.anchor,vr,cn);let Xn=this.placedOrientations[vr.crossTileID];Xn&&(this.markUsedJustification(y,"left",vr,Xn),this.markUsedOrientation(y,Xn,vr))}if(Lr){let _n=Pn(qr.icon),vn=!(Jt&&vr.verticalPlacedIconSymbolIndex&&Nn);vr.placedIconSymbolIndex>=0&&(Rt(y.icon,vr.numIconVertices,vn?_n:Ca),y.icon.placedSymbolArray.get(vr.placedIconSymbolIndex).hidden=qr.icon.isHidden()),vr.verticalPlacedIconSymbolIndex>=0&&(Rt(y.icon,vr.numVerticalIconVertices,vn?Ca:_n),y.icon.placedSymbolArray.get(vr.verticalPlacedIconSymbolIndex).hidden=qr.icon.isHidden())}let qn=qt?.has(or)?qt.get(or):{text:null,icon:null};if(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData()){let _n=y.collisionArrays[or];if(_n){let vn=new e.P(0,0);if(_n.textBox||_n.verticalTextBox){let Sn=!0;if(ct){let Tn=this.variableOffsets[mr];Tn?(vn=at(Tn.anchor,Tn.width,Tn.height,Tn.textOffset,Tn.textBoxScale),Ft&&vn._rotate(Gt?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Sn=!1}if(_n.textBox||_n.verticalTextBox){let Tn;_n.textBox&&(Tn=Nn),_n.verticalTextBox&&(Tn=Dn),Ut(y.textCollisionBox.collisionVertexArray,qr.text.placed,!Sn||Tn,qn.text,vn.x,vn.y)}}if(_n.iconBox||_n.verticalIconBox){let Sn=!!(!Dn&&_n.verticalIconBox),Tn;_n.iconBox&&(Tn=Sn),_n.verticalIconBox&&(Tn=!Sn),Ut(y.iconCollisionBox.collisionVertexArray,qr.icon.placed,Tn,qn.icon,Jt?vn.x:0,Jt?vn.y:0)}}}}if(y.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[y.bucketInstanceId]&&(this.retainedQueryData[y.bucketInstanceId].featureSortOrder=y.featureSortOrder),y.hasTextData()&&y.text.opacityVertexBuffer&&y.text.opacityVertexBuffer.updateData(y.text.opacityVertexArray),y.hasIconData()&&y.icon.opacityVertexBuffer&&y.icon.opacityVertexBuffer.updateData(y.icon.opacityVertexArray),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexBuffer&&y.iconCollisionBox.collisionVertexBuffer.updateData(y.iconCollisionBox.collisionVertexArray),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexBuffer&&y.textCollisionBox.collisionVertexBuffer.updateData(y.textCollisionBox.collisionVertexArray),y.text.opacityVertexArray.length!==y.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);if(y.icon.opacityVertexArray.length!==y.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);y.bucketInstanceId in this.collisionCircleArrays&&(y.collisionCircleArray=this.collisionCircleArrays[y.bucketInstanceId],delete this.collisionCircleArrays[y.bucketInstanceId])}symbolFadeChange(y){return this.fadeDuration===0?1:(y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(y){return Math.max(0,(this.transform.zoom-y)/1.5)}hasTransitions(y){return this.stale||y-this.lastPlacementChangeTimey}setStale(){this.stale=!0}}function Ut(de,y,O,ie,ce,_e){ie&&ie.length!==0||(ie=[0,0,0,0]);let De=ie[0]-ot,Ne=ie[1]-ot,Ye=ie[2]-ot,lt=ie[3]-ot;de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,De,Ne),de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,Ye,Ne),de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,Ye,lt),de.emplaceBack(y?1:0,O?1:0,ce||0,_e||0,De,lt)}let ar=Math.pow(2,25),Er=Math.pow(2,24),br=Math.pow(2,17),Or=Math.pow(2,16),Pr=Math.pow(2,9),hn=Math.pow(2,8),zn=Math.pow(2,1);function Pn(de){if(de.opacity===0&&!de.placed)return 0;if(de.opacity===1&&de.placed)return 4294967295;let y=de.placed?1:0,O=Math.floor(127*de.opacity);return O*ar+y*Er+O*br+y*Or+O*Pr+y*hn+O*zn+y}let Ca=0;class ma{constructor(y){this._sortAcrossTiles=y.layout.get("symbol-z-order")!=="viewport-y"&&!y.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(y,O,ie,ce,_e){let De=this._bucketParts;for(;this._currentTileIndexNe.sortKey-Ye.sortKey));this._currentPartIndex!this._forceFullPlacement&&m()-ce>2;for(;this._currentPlacementIndex>=0;){let De=O[y[this._currentPlacementIndex]],Ne=this.placement.collisionIndex.transform.zoom;if(e.aQ(De)&&De.layout&&(!De.minzoom||De.minzoom<=Ne)&&(!De.maxzoom||De.maxzoom>Ne)){if(this._inProgressLayer||(this._inProgressLayer=new ma(De)),this._inProgressLayer.continuePlacement(ie[De.source],this.placement,this._showCollisionBoxes,De,_e))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(y){return this.placement.commit(y),this.placement}}let ga=512/e.a6/2;class eo{constructor(y,O,ie){this.tileID=y,this.bucketInstanceId=ie,this._symbolsByKey={};let ce=new Map;for(let _e=0;_e({x:Math.floor(Ye.anchorX*ga),y:Math.floor(Ye.anchorY*ga)})),crossTileIDs:De.map(Ye=>Ye.crossTileID)};if(Ne.positions.length>128){let Ye=new e.aR(Ne.positions.length,16,Uint16Array);for(let{x:lt,y:ct}of Ne.positions)Ye.add(lt,ct);Ye.finish(),delete Ne.positions,Ne.index=Ye}this._symbolsByKey[_e]=Ne}}getScaledCoordinates(y,O){let{x:ie,y:ce,z:_e}=this.tileID.canonical,{x:De,y:Ne,z:Ye}=O.canonical,lt=ga/Math.pow(2,Ye-_e),ct=(Ne*e.a6+y.anchorY)*lt,Ft=ce*e.a6*ga;return{x:Math.floor((De*e.a6+y.anchorX)*lt-ie*e.a6*ga),y:Math.floor(ct-Ft)}}findMatches(y,O,ie){let ce=this.tileID.canonical.zy)}}class si{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class Ao{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(y){let O=Math.round((y-this.lng)/360);if(O!==0)for(let ie in this.indexes){let ce=this.indexes[ie],_e={};for(let De in ce){let Ne=ce[De];Ne.tileID=Ne.tileID.unwrapTo(Ne.tileID.wrap+O),_e[Ne.tileID.key]=Ne}this.indexes[ie]=_e}this.lng=y}addBucket(y,O,ie){var ce,_e,De;if(!((ce=this.indexes[y.overscaledZ])===null||ce===void 0)&&ce[y.key]){if(this.indexes[y.overscaledZ][y.key].bucketInstanceId===O.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(y.overscaledZ,this.indexes[y.overscaledZ][y.key])}for(let Ye=0;Yey.overscaledZ)for(let ct in lt){let Ft=lt[ct];Ft.tileID.isChildOf(y)&&Ft.findMatches(O.symbolInstances,y,Ne)}else{let ct=lt[y.scaledTo(Number(Ye)).key];ct&&ct.findMatches(O.symbolInstances,y,Ne)}}for(let Ye=0;Ye 32766.5)) {return 0.0;} +#endif vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; #else return 0.0; #endif -}`),background:Ze(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:ti("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:ti("",`#define GLOBE_RADIUS 6371008.8 +uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos +);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); +if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len +);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:ti(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Ze(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; +}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:ti(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Ze(`varying vec3 v_data;varying float v_visibility; +}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:ti(`in vec3 v_data;in float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur @@ -2789,11 +2795,11 @@ void main() { #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); +vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; +}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur @@ -2809,16 +2815,32 @@ void main(void) { #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Ze("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Ze(`uniform highp float u_intensity;varying vec2 v_extrude; +vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { +#ifdef GLOBE +vec3 center_vector=projectToSphere(circle_center); +#endif +float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else { +#ifdef GLOBE +vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); +#else +vec4 projected_center=projectTileWithElevation(circle_center,ele); +#endif +corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);} +#ifdef GLOBE +vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); +#else +gl_Position=projectTileWithElevation(corner_position,ele); +#endif +} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:ti(Sa,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:ti(`uniform highp float u_intensity;in vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight -float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); +float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; +}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; @@ -2826,42 +2848,78 @@ const highp float ZERO=1.0/255.0/16.0; void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius -vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Ze(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; +vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0); +#ifdef GLOBE +vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); +#else +gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); +#endif +}`),heatmapTexture:ti(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(0.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:ti("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:ti("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:ti(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else +{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0)); #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(0.0); +fragColor=vec4(1.0); +#endif +}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:ti("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:ti(Sa,`in vec2 a_pos;void main() { +#ifdef GLOBE +gl_Position=projectTileFor3D(a_pos,0.0); +#else +gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Ze("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 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_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Ze("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Ze("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Ze(`#pragma mapbox: define highp vec4 color +}`),fill:ti(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity -gl_FragColor=color*opacity; +fragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +}`,`uniform vec2 u_fill_translate;in vec2 a_pos; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Ze(`varying vec2 v_pos; +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:ti(`in vec2 v_pos; +#ifdef GLOBE +in float v_depth; +#endif #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity -float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; +#ifdef GLOBE +out float v_depth; #endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Ze(`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; +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}`),fillOutlinePattern:ti(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; +#ifdef GLOBE +in float v_depth; +#endif #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2869,11 +2927,17 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; +vec2 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=texture(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=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; +#ifdef GLOBE +out float v_depth; #endif -}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2885,10 +2949,14 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Ze(`#ifdef GL_ES +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}`),fillPattern:ti(`#ifdef GL_ES precision highp float; #endif -uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2896,11 +2964,11 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; +vec2 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2912,15 +2980,15 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Ze(`varying vec4 v_color;void main() {gl_FragColor=v_color; +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);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);}`),fillExtrusion:ti(`in vec4 v_color;void main() {fragColor=v_color; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`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; +}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D -attribute vec2 a_centroid; +in vec2 a_centroid; #endif -varying vec4 v_color; +out vec4 v_color; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color @@ -2934,7 +3002,17 @@ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_off #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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;}`),fillExtrusionPattern:Ze(`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; +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +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;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0); +#ifdef GLOBE +mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); +#endif +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;}`),fillExtrusionPattern:ti(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from @@ -2948,15 +3026,18 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; +vec2 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=texture(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=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D -attribute vec2 a_centroid; +in vec2 a_centroid; +#endif +#ifdef GLOBE +out vec3 v_sphere_pos; #endif -varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from @@ -2976,22 +3057,38 @@ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_off #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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 +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos -: 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;}`),hillshadePrepare:Ze(`#ifdef GL_ES +: vec2(edgedistance,elevation*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;}`),hillshadePrepare:ti(`#ifdef GL_ES precision highp float; #endif -uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,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); +uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;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 exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,"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;}"),hillshade:Ze(`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; +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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;}"),hillshade:ti(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; #define PI 3.141592653589793 -void 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; +#define STANDARD 0 +#define COMBINED 1 +#define IGOR 2 +#define MULTIDIRECTIONAL 3 +#define BASIC 4 +float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;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_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else +{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else +{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:ti(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; +#ifdef GLOBE +in float v_depth; #endif -}`,"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;}"),line:Ze(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -2999,13 +3096,19 @@ void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -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);gl_FragColor=color*(alpha*opacity); +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);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 -attribute 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; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3019,25 +3122,37 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float 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 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),lineGradient:ti(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; +#ifdef GLOBE +in float v_depth; #endif -v_width2=vec2(outset,inset);}`),lineGradient:Ze(`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 vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -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);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 -attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth @@ -3049,16 +3164,22 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),linePattern:Ze(`#ifdef GL_ES +v_width2=vec2(outset,inset);}`),linePattern:ti(`#ifdef GL_ES precision highp float; #endif -uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width; +#ifdef GLOBE +in float v_depth; +#endif #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from @@ -3072,14 +3193,20 @@ void main() { #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset @@ -3101,32 +3228,48 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -float 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 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:ti(`uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; +#ifdef GLOBE +in float v_depth; #endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Ze(`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; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth -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 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); +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +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 sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -attribute 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; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3134,6 +3277,8 @@ attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur @@ -3142,48 +3287,112 @@ void main() { #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth -float 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; +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +float 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:ti(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +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);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} #endif -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);}`),raster:Ze(`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); #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; +#ifdef GLOBE +out float v_depth; #endif -}`,"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;}"),symbolIcon:Ze(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to void main() { +#pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +float 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;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),raster:ti(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in 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=texture(u_image0,v_pos0);vec4 color1=texture(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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5; +#ifdef GLOBE +if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} +#endif +v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:ti(`uniform sampler2D u_texture;in vec2 v_tex;in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_total_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;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;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Ze(`#define SDF_PX 8.0 -uniform 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; +u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}`),symbolSDF:ti(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -float 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 inner_edge=(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);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); +float 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 total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -3195,32 +3404,34 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Ze(`#define SDF_PX 8.0 +u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:ti(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 -uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +float total_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -3232,60 +3443,70 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Ze("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ze("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Ze("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Ze("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Ze(Me,L){let J=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,fe=L.match(/attribute ([\w]+) ([\w]+)/g),de=Me.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ae=L.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ye=Ae?Ae.concat(de):de,et={};return{fragmentSource:Me=Me.replace(J,(dt,St,Ht,Wt,fr)=>(et[fr]=!0,St==="define"?` -#ifndef HAS_UNIFORM_u_${fr} -varying ${Ht} ${Wt} ${fr}; +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,total_opacity,is_sdf);}`),terrain:ti("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:ti("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:ti("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:ti("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:ti(`#ifdef GL_ES +precision highp float; +#endif +in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 +);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:ti("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function ti(de,y){let O=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,ie=y.match(/in ([\w]+) ([\w]+)/g),ce=de.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),_e=y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),De=_e?_e.concat(ce):ce,Ne={};return{fragmentSource:de=de.replace(O,(Ye,lt,ct,Ft,Gt)=>(Ne[Gt]=!0,lt==="define"?` +#ifndef HAS_UNIFORM_u_${Gt} +in ${ct} ${Ft} ${Gt}; #else -uniform ${Ht} ${Wt} u_${fr}; +uniform ${ct} ${Ft} u_${Gt}; #endif `:` -#ifdef HAS_UNIFORM_u_${fr} - ${Ht} ${Wt} ${fr} = u_${fr}; -#endif -`)),vertexSource:L=L.replace(J,(dt,St,Ht,Wt,fr)=>{let Ar=Wt==="float"?"vec2":"vec4",Le=fr.match(/color/)?"color":Ar;return et[fr]?St==="define"?` -#ifndef HAS_UNIFORM_u_${fr} -uniform lowp float u_${fr}_t; -attribute ${Ht} ${Ar} a_${fr}; -varying ${Ht} ${Wt} ${fr}; +#ifdef HAS_UNIFORM_u_${Gt} + ${ct} ${Ft} ${Gt} = u_${Gt}; +#endif +`)),vertexSource:y=y.replace(O,(Ye,lt,ct,Ft,Gt)=>{let Jt=Ft==="float"?"vec2":"vec4",it=Gt.match(/color/)?"color":Jt;return Ne[Gt]?lt==="define"?` +#ifndef HAS_UNIFORM_u_${Gt} +uniform lowp float u_${Gt}_t; +in ${ct} ${Jt} a_${Gt}; +out ${ct} ${Ft} ${Gt}; #else -uniform ${Ht} ${Wt} u_${fr}; +uniform ${ct} ${Ft} u_${Gt}; #endif -`:Le==="vec4"?` -#ifndef HAS_UNIFORM_u_${fr} - ${fr} = a_${fr}; +`:it==="vec4"?` +#ifndef HAS_UNIFORM_u_${Gt} + ${Gt} = a_${Gt}; #else - ${Ht} ${Wt} ${fr} = u_${fr}; + ${ct} ${Ft} ${Gt} = u_${Gt}; #endif `:` -#ifndef HAS_UNIFORM_u_${fr} - ${fr} = unpack_mix_${Le}(a_${fr}, u_${fr}_t); +#ifndef HAS_UNIFORM_u_${Gt} + ${Gt} = unpack_mix_${it}(a_${Gt}, u_${Gt}_t); #else - ${Ht} ${Wt} ${fr} = u_${fr}; + ${ct} ${Ft} ${Gt} = u_${Gt}; #endif -`:St==="define"?` -#ifndef HAS_UNIFORM_u_${fr} -uniform lowp float u_${fr}_t; -attribute ${Ht} ${Ar} a_${fr}; +`:lt==="define"?` +#ifndef HAS_UNIFORM_u_${Gt} +uniform lowp float u_${Gt}_t; +in ${ct} ${Jt} a_${Gt}; #else -uniform ${Ht} ${Wt} u_${fr}; +uniform ${ct} ${Ft} u_${Gt}; #endif -`:Le==="vec4"?` -#ifndef HAS_UNIFORM_u_${fr} - ${Ht} ${Wt} ${fr} = a_${fr}; +`:it==="vec4"?` +#ifndef HAS_UNIFORM_u_${Gt} + ${ct} ${Ft} ${Gt} = a_${Gt}; #else - ${Ht} ${Wt} ${fr} = u_${fr}; + ${ct} ${Ft} ${Gt} = u_${Gt}; #endif `:` -#ifndef HAS_UNIFORM_u_${fr} - ${Ht} ${Wt} ${fr} = unpack_mix_${Le}(a_${fr}, u_${fr}_t); +#ifndef HAS_UNIFORM_u_${Gt} + ${ct} ${Ft} ${Gt} = unpack_mix_${it}(a_${Gt}, u_${Gt}_t); #else - ${Ht} ${Wt} ${fr} = u_${fr}; + ${ct} ${Ft} ${Gt} = u_${Gt}; #endif -`}),staticAttributes:fe,staticUniforms:Ye}}class xt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(L,J,fe,de,Ae,Ye,et,dt,St){this.context=L;let Ht=this.boundPaintVertexBuffers.length!==de.length;for(let Wt=0;!Ht&&Wt({u_matrix:Me,u_texture:0,u_ele_delta:L,u_fog_matrix:J,u_fog_color:fe?fe.properties.get("fog-color"):e.aM.white,u_fog_ground_blend:fe?fe.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:fe?fe.calculateFogBlendOpacity(de):0,u_horizon_color:fe?fe.properties.get("horizon-color"):e.aM.white,u_horizon_fog_blend:fe?fe.properties.get("horizon-fog-blend"):1});function er(Me){let L=[];for(let J=0;J({u_depth:new e.aH(Ot,$t.u_depth),u_terrain:new e.aH(Ot,$t.u_terrain),u_terrain_dim:new e.aI(Ot,$t.u_terrain_dim),u_terrain_matrix:new e.aJ(Ot,$t.u_terrain_matrix),u_terrain_unpack:new e.aK(Ot,$t.u_terrain_unpack),u_terrain_exaggeration:new e.aI(Ot,$t.u_terrain_exaggeration)}))(L,Dt),this.binderUniforms=fe?fe.getUniforms(L,Dt):[]}draw(L,J,fe,de,Ae,Ye,et,dt,St,Ht,Wt,fr,Ar,Le,ze,je,Xe,st){let Qe=L.gl;if(this.failedToCreate)return;if(L.program.set(this.program),L.setDepthMode(fe),L.setStencilMode(de),L.setColorMode(Ae),L.setCullFace(Ye),dt){L.activeTexture.set(Qe.TEXTURE2),Qe.bindTexture(Qe.TEXTURE_2D,dt.depthTexture),L.activeTexture.set(Qe.TEXTURE3),Qe.bindTexture(Qe.TEXTURE_2D,dt.texture);for(let Dt in this.terrainUniforms)this.terrainUniforms[Dt].set(dt[Dt])}for(let Dt in this.fixedUniforms)this.fixedUniforms[Dt].set(et[Dt]);ze&&ze.setUniforms(L,this.binderUniforms,Ar,{zoom:Le});let ht=0;switch(J){case Qe.LINES:ht=2;break;case Qe.TRIANGLES:ht=3;break;case Qe.LINE_STRIP:ht=1}for(let Dt of fr.get()){let Ot=Dt.vaos||(Dt.vaos={});(Ot[St]||(Ot[St]=new xt)).bind(L,this,Ht,ze?ze.getPaintVertexBuffers():[],Wt,Dt.vertexOffset,je,Xe,st),Qe.drawElements(J,Dt.primitiveLength*ht,Qe.UNSIGNED_SHORT,Dt.primitiveOffset*ht*2)}}}function jr(Me,L,J){let fe=1/ca(J,1,L.transform.tileZoom),de=Math.pow(2,J.tileID.overscaledZ),Ae=J.tileSize*Math.pow(2,L.transform.tileZoom)/de,Ye=Ae*(J.tileID.canonical.x+J.tileID.wrap*de),et=Ae*J.tileID.canonical.y;return{u_image:0,u_texsize:J.imageAtlasTexture.size,u_scale:[fe,Me.fromScale,Me.toScale],u_fade:Me.t,u_pixel_coord_upper:[Ye>>16,et>>16],u_pixel_coord_lower:[65535&Ye,65535&et]}}let Fr=(Me,L,J,fe)=>{let de=L.style.light,Ae=de.properties.get("position"),Ye=[Ae.x,Ae.y,Ae.z],et=function(){var St=new e.A(9);return e.A!=Float32Array&&(St[1]=0,St[2]=0,St[3]=0,St[5]=0,St[6]=0,St[7]=0),St[0]=1,St[4]=1,St[8]=1,St}();de.properties.get("anchor")==="viewport"&&function(St,Ht){var Wt=Math.sin(Ht),fr=Math.cos(Ht);St[0]=fr,St[1]=Wt,St[2]=0,St[3]=-Wt,St[4]=fr,St[5]=0,St[6]=0,St[7]=0,St[8]=1}(et,-L.transform.angle),function(St,Ht,Wt){var fr=Ht[0],Ar=Ht[1],Le=Ht[2];St[0]=fr*Wt[0]+Ar*Wt[3]+Le*Wt[6],St[1]=fr*Wt[1]+Ar*Wt[4]+Le*Wt[7],St[2]=fr*Wt[2]+Ar*Wt[5]+Le*Wt[8]}(Ye,Ye,et);let dt=de.properties.get("color");return{u_matrix:Me,u_lightpos:Ye,u_lightintensity:de.properties.get("intensity"),u_lightcolor:[dt.r,dt.g,dt.b],u_vertical_gradient:+J,u_opacity:fe}},kr=(Me,L,J,fe,de,Ae,Ye)=>e.e(Fr(Me,L,J,fe),jr(Ae,L,Ye),{u_height_factor:-Math.pow(2,de.overscaledZ)/Ye.tileSize/8}),ra=Me=>({u_matrix:Me}),ja=(Me,L,J,fe)=>e.e(ra(Me),jr(J,L,fe)),La=(Me,L)=>({u_matrix:Me,u_world:L}),Dn=(Me,L,J,fe,de)=>e.e(ja(Me,L,J,fe),{u_world:de}),Mn=(Me,L,J,fe)=>{let de=Me.transform,Ae,Ye;if(fe.paint.get("circle-pitch-alignment")==="map"){let et=ca(J,1,de.zoom);Ae=!0,Ye=[et,et]}else Ae=!1,Ye=de.pixelsToGLUnits;return{u_camera_to_center_distance:de.cameraToCenterDistance,u_scale_with_map:+(fe.paint.get("circle-pitch-scale")==="map"),u_matrix:Me.translatePosMatrix(L.posMatrix,J,fe.paint.get("circle-translate"),fe.paint.get("circle-translate-anchor")),u_pitch_with_map:+Ae,u_device_pixel_ratio:Me.pixelRatio,u_extrude_scale:Ye}},_i=(Me,L,J)=>({u_matrix:Me,u_inv_matrix:L,u_camera_to_center_distance:J.cameraToCenterDistance,u_viewport_size:[J.width,J.height]}),ti=(Me,L,J=1)=>({u_matrix:Me,u_color:L,u_overlay:0,u_overlay_scale:J}),Si=Me=>({u_matrix:Me}),ai=(Me,L,J,fe)=>({u_matrix:Me,u_extrude_scale:ca(L,1,J),u_intensity:fe}),Ao=(Me,L,J,fe)=>{let de=e.H();e.aP(de,0,Me.width,Me.height,0,0,1);let Ae=Me.context.gl;return{u_matrix:de,u_world:[Ae.drawingBufferWidth,Ae.drawingBufferHeight],u_image:J,u_color_ramp:fe,u_opacity:L.paint.get("heatmap-opacity")}};function yo(Me,L){let J=Math.pow(2,L.canonical.z),fe=L.canonical.y;return[new e.Z(0,fe/J).toLngLat().lat,new e.Z(0,(fe+1)/J).toLngLat().lat]}let Vn=(Me,L,J,fe)=>{let de=Me.transform;return{u_matrix:ao(Me,L,J,fe),u_ratio:1/ca(L,1,de.zoom),u_device_pixel_ratio:Me.pixelRatio,u_units_to_pixels:[1/de.pixelsToGLUnits[0],1/de.pixelsToGLUnits[1]]}},Bo=(Me,L,J,fe,de)=>e.e(Vn(Me,L,J,de),{u_image:0,u_image_height:fe}),Mo=(Me,L,J,fe,de)=>{let Ae=Me.transform,Ye=Ro(L,Ae);return{u_matrix:ao(Me,L,J,de),u_texsize:L.imageAtlasTexture.size,u_ratio:1/ca(L,1,Ae.zoom),u_device_pixel_ratio:Me.pixelRatio,u_image:0,u_scale:[Ye,fe.fromScale,fe.toScale],u_fade:fe.t,u_units_to_pixels:[1/Ae.pixelsToGLUnits[0],1/Ae.pixelsToGLUnits[1]]}},co=(Me,L,J,fe,de,Ae)=>{let Ye=Me.lineAtlas,et=Ro(L,Me.transform),dt=J.layout.get("line-cap")==="round",St=Ye.getDash(fe.from,dt),Ht=Ye.getDash(fe.to,dt),Wt=St.width*de.fromScale,fr=Ht.width*de.toScale;return e.e(Vn(Me,L,J,Ae),{u_patternscale_a:[et/Wt,-St.height/2],u_patternscale_b:[et/fr,-Ht.height/2],u_sdfgamma:Ye.width/(256*Math.min(Wt,fr)*Me.pixelRatio)/2,u_image:0,u_tex_y_a:St.y,u_tex_y_b:Ht.y,u_mix:de.t})};function Ro(Me,L){return 1/ca(Me,1,L.tileZoom)}function ao(Me,L,J,fe){return Me.translatePosMatrix(fe?fe.posMatrix:L.tileID.posMatrix,L,J.paint.get("line-translate"),J.paint.get("line-translate-anchor"))}let Co=(Me,L,J,fe,de)=>{return{u_matrix:Me,u_tl_parent:L,u_scale_parent:J,u_buffer_scale:1,u_fade_t:fe.mix,u_opacity:fe.opacity*de.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:de.paint.get("raster-brightness-min"),u_brightness_high:de.paint.get("raster-brightness-max"),u_saturation_factor:(Ye=de.paint.get("raster-saturation"),Ye>0?1-1/(1.001-Ye):-Ye),u_contrast_factor:(Ae=de.paint.get("raster-contrast"),Ae>0?1/(1-Ae):1+Ae),u_spin_weights:Wo(de.paint.get("raster-hue-rotate"))};var Ae,Ye};function Wo(Me){Me*=Math.PI/180;let L=Math.sin(Me),J=Math.cos(Me);return[(2*J+1)/3,(-Math.sqrt(3)*L-J+1)/3,(Math.sqrt(3)*L-J+1)/3]}let Po=(Me,L,J,fe,de,Ae,Ye,et,dt,St,Ht,Wt,fr,Ar)=>{let Le=Ye.transform;return{u_is_size_zoom_constant:+(Me==="constant"||Me==="source"),u_is_size_feature_constant:+(Me==="constant"||Me==="camera"),u_size_t:L?L.uSizeT:0,u_size:L?L.uSize:0,u_camera_to_center_distance:Le.cameraToCenterDistance,u_pitch:Le.pitch/360*2*Math.PI,u_rotate_symbol:+J,u_aspect_ratio:Le.width/Le.height,u_fade_change:Ye.options.fadeDuration?Ye.symbolFadeChange:1,u_matrix:et,u_label_plane_matrix:dt,u_coord_matrix:St,u_is_text:+Wt,u_pitch_with_map:+fe,u_is_along_line:de,u_is_variable_anchor:Ae,u_texsize:fr,u_texture:0,u_translation:Ht,u_pitched_scale:Ar}},vi=(Me,L,J,fe,de,Ae,Ye,et,dt,St,Ht,Wt,fr,Ar,Le)=>{let ze=Ye.transform;return e.e(Po(Me,L,J,fe,de,Ae,Ye,et,dt,St,Ht,Wt,fr,Le),{u_gamma_scale:fe?Math.cos(ze._pitch)*ze.cameraToCenterDistance:1,u_device_pixel_ratio:Ye.pixelRatio,u_is_halo:+Ar})},zi=(Me,L,J,fe,de,Ae,Ye,et,dt,St,Ht,Wt,fr,Ar)=>e.e(vi(Me,L,J,fe,de,Ae,Ye,et,dt,St,Ht,!0,Wt,!0,Ar),{u_texsize_icon:fr,u_texture_icon:1}),ho=(Me,L,J)=>({u_matrix:Me,u_opacity:L,u_color:J}),ro=(Me,L,J,fe,de,Ae)=>e.e(function(Ye,et,dt,St){let Ht=dt.imageManager.getPattern(Ye.from.toString()),Wt=dt.imageManager.getPattern(Ye.to.toString()),{width:fr,height:Ar}=dt.imageManager.getPixelSize(),Le=Math.pow(2,St.tileID.overscaledZ),ze=St.tileSize*Math.pow(2,dt.transform.tileZoom)/Le,je=ze*(St.tileID.canonical.x+St.tileID.wrap*Le),Xe=ze*St.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Ht.tl,u_pattern_br_a:Ht.br,u_pattern_tl_b:Wt.tl,u_pattern_br_b:Wt.br,u_texsize:[fr,Ar],u_mix:et.t,u_pattern_size_a:Ht.displaySize,u_pattern_size_b:Wt.displaySize,u_scale_a:et.fromScale,u_scale_b:et.toScale,u_tile_units_to_pixels:1/ca(St,1,dt.transform.tileZoom),u_pixel_coord_upper:[je>>16,Xe>>16],u_pixel_coord_lower:[65535&je,65535&Xe]}}(fe,Ae,J,de),{u_matrix:Me,u_opacity:L}),es={fillExtrusion:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_lightpos:new e.aN(Me,L.u_lightpos),u_lightintensity:new e.aI(Me,L.u_lightintensity),u_lightcolor:new e.aN(Me,L.u_lightcolor),u_vertical_gradient:new e.aI(Me,L.u_vertical_gradient),u_opacity:new e.aI(Me,L.u_opacity)}),fillExtrusionPattern:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_lightpos:new e.aN(Me,L.u_lightpos),u_lightintensity:new e.aI(Me,L.u_lightintensity),u_lightcolor:new e.aN(Me,L.u_lightcolor),u_vertical_gradient:new e.aI(Me,L.u_vertical_gradient),u_height_factor:new e.aI(Me,L.u_height_factor),u_image:new e.aH(Me,L.u_image),u_texsize:new e.aO(Me,L.u_texsize),u_pixel_coord_upper:new e.aO(Me,L.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(Me,L.u_pixel_coord_lower),u_scale:new e.aN(Me,L.u_scale),u_fade:new e.aI(Me,L.u_fade),u_opacity:new e.aI(Me,L.u_opacity)}),fill:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix)}),fillPattern:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_image:new e.aH(Me,L.u_image),u_texsize:new e.aO(Me,L.u_texsize),u_pixel_coord_upper:new e.aO(Me,L.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(Me,L.u_pixel_coord_lower),u_scale:new e.aN(Me,L.u_scale),u_fade:new e.aI(Me,L.u_fade)}),fillOutline:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_world:new e.aO(Me,L.u_world)}),fillOutlinePattern:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_world:new e.aO(Me,L.u_world),u_image:new e.aH(Me,L.u_image),u_texsize:new e.aO(Me,L.u_texsize),u_pixel_coord_upper:new e.aO(Me,L.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(Me,L.u_pixel_coord_lower),u_scale:new e.aN(Me,L.u_scale),u_fade:new e.aI(Me,L.u_fade)}),circle:(Me,L)=>({u_camera_to_center_distance:new e.aI(Me,L.u_camera_to_center_distance),u_scale_with_map:new e.aH(Me,L.u_scale_with_map),u_pitch_with_map:new e.aH(Me,L.u_pitch_with_map),u_extrude_scale:new e.aO(Me,L.u_extrude_scale),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_matrix:new e.aJ(Me,L.u_matrix)}),collisionBox:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_pixel_extrude_scale:new e.aO(Me,L.u_pixel_extrude_scale)}),collisionCircle:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_inv_matrix:new e.aJ(Me,L.u_inv_matrix),u_camera_to_center_distance:new e.aI(Me,L.u_camera_to_center_distance),u_viewport_size:new e.aO(Me,L.u_viewport_size)}),debug:(Me,L)=>({u_color:new e.aL(Me,L.u_color),u_matrix:new e.aJ(Me,L.u_matrix),u_overlay:new e.aH(Me,L.u_overlay),u_overlay_scale:new e.aI(Me,L.u_overlay_scale)}),clippingMask:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix)}),heatmap:(Me,L)=>({u_extrude_scale:new e.aI(Me,L.u_extrude_scale),u_intensity:new e.aI(Me,L.u_intensity),u_matrix:new e.aJ(Me,L.u_matrix)}),heatmapTexture:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_world:new e.aO(Me,L.u_world),u_image:new e.aH(Me,L.u_image),u_color_ramp:new e.aH(Me,L.u_color_ramp),u_opacity:new e.aI(Me,L.u_opacity)}),hillshade:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_image:new e.aH(Me,L.u_image),u_latrange:new e.aO(Me,L.u_latrange),u_light:new e.aO(Me,L.u_light),u_shadow:new e.aL(Me,L.u_shadow),u_highlight:new e.aL(Me,L.u_highlight),u_accent:new e.aL(Me,L.u_accent)}),hillshadePrepare:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_image:new e.aH(Me,L.u_image),u_dimension:new e.aO(Me,L.u_dimension),u_zoom:new e.aI(Me,L.u_zoom),u_unpack:new e.aK(Me,L.u_unpack)}),line:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_ratio:new e.aI(Me,L.u_ratio),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_units_to_pixels:new e.aO(Me,L.u_units_to_pixels)}),lineGradient:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_ratio:new e.aI(Me,L.u_ratio),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_units_to_pixels:new e.aO(Me,L.u_units_to_pixels),u_image:new e.aH(Me,L.u_image),u_image_height:new e.aI(Me,L.u_image_height)}),linePattern:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_texsize:new e.aO(Me,L.u_texsize),u_ratio:new e.aI(Me,L.u_ratio),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_image:new e.aH(Me,L.u_image),u_units_to_pixels:new e.aO(Me,L.u_units_to_pixels),u_scale:new e.aN(Me,L.u_scale),u_fade:new e.aI(Me,L.u_fade)}),lineSDF:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_ratio:new e.aI(Me,L.u_ratio),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_units_to_pixels:new e.aO(Me,L.u_units_to_pixels),u_patternscale_a:new e.aO(Me,L.u_patternscale_a),u_patternscale_b:new e.aO(Me,L.u_patternscale_b),u_sdfgamma:new e.aI(Me,L.u_sdfgamma),u_image:new e.aH(Me,L.u_image),u_tex_y_a:new e.aI(Me,L.u_tex_y_a),u_tex_y_b:new e.aI(Me,L.u_tex_y_b),u_mix:new e.aI(Me,L.u_mix)}),raster:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_tl_parent:new e.aO(Me,L.u_tl_parent),u_scale_parent:new e.aI(Me,L.u_scale_parent),u_buffer_scale:new e.aI(Me,L.u_buffer_scale),u_fade_t:new e.aI(Me,L.u_fade_t),u_opacity:new e.aI(Me,L.u_opacity),u_image0:new e.aH(Me,L.u_image0),u_image1:new e.aH(Me,L.u_image1),u_brightness_low:new e.aI(Me,L.u_brightness_low),u_brightness_high:new e.aI(Me,L.u_brightness_high),u_saturation_factor:new e.aI(Me,L.u_saturation_factor),u_contrast_factor:new e.aI(Me,L.u_contrast_factor),u_spin_weights:new e.aN(Me,L.u_spin_weights)}),symbolIcon:(Me,L)=>({u_is_size_zoom_constant:new e.aH(Me,L.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(Me,L.u_is_size_feature_constant),u_size_t:new e.aI(Me,L.u_size_t),u_size:new e.aI(Me,L.u_size),u_camera_to_center_distance:new e.aI(Me,L.u_camera_to_center_distance),u_pitch:new e.aI(Me,L.u_pitch),u_rotate_symbol:new e.aH(Me,L.u_rotate_symbol),u_aspect_ratio:new e.aI(Me,L.u_aspect_ratio),u_fade_change:new e.aI(Me,L.u_fade_change),u_matrix:new e.aJ(Me,L.u_matrix),u_label_plane_matrix:new e.aJ(Me,L.u_label_plane_matrix),u_coord_matrix:new e.aJ(Me,L.u_coord_matrix),u_is_text:new e.aH(Me,L.u_is_text),u_pitch_with_map:new e.aH(Me,L.u_pitch_with_map),u_is_along_line:new e.aH(Me,L.u_is_along_line),u_is_variable_anchor:new e.aH(Me,L.u_is_variable_anchor),u_texsize:new e.aO(Me,L.u_texsize),u_texture:new e.aH(Me,L.u_texture),u_translation:new e.aO(Me,L.u_translation),u_pitched_scale:new e.aI(Me,L.u_pitched_scale)}),symbolSDF:(Me,L)=>({u_is_size_zoom_constant:new e.aH(Me,L.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(Me,L.u_is_size_feature_constant),u_size_t:new e.aI(Me,L.u_size_t),u_size:new e.aI(Me,L.u_size),u_camera_to_center_distance:new e.aI(Me,L.u_camera_to_center_distance),u_pitch:new e.aI(Me,L.u_pitch),u_rotate_symbol:new e.aH(Me,L.u_rotate_symbol),u_aspect_ratio:new e.aI(Me,L.u_aspect_ratio),u_fade_change:new e.aI(Me,L.u_fade_change),u_matrix:new e.aJ(Me,L.u_matrix),u_label_plane_matrix:new e.aJ(Me,L.u_label_plane_matrix),u_coord_matrix:new e.aJ(Me,L.u_coord_matrix),u_is_text:new e.aH(Me,L.u_is_text),u_pitch_with_map:new e.aH(Me,L.u_pitch_with_map),u_is_along_line:new e.aH(Me,L.u_is_along_line),u_is_variable_anchor:new e.aH(Me,L.u_is_variable_anchor),u_texsize:new e.aO(Me,L.u_texsize),u_texture:new e.aH(Me,L.u_texture),u_gamma_scale:new e.aI(Me,L.u_gamma_scale),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_is_halo:new e.aH(Me,L.u_is_halo),u_translation:new e.aO(Me,L.u_translation),u_pitched_scale:new e.aI(Me,L.u_pitched_scale)}),symbolTextAndIcon:(Me,L)=>({u_is_size_zoom_constant:new e.aH(Me,L.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(Me,L.u_is_size_feature_constant),u_size_t:new e.aI(Me,L.u_size_t),u_size:new e.aI(Me,L.u_size),u_camera_to_center_distance:new e.aI(Me,L.u_camera_to_center_distance),u_pitch:new e.aI(Me,L.u_pitch),u_rotate_symbol:new e.aH(Me,L.u_rotate_symbol),u_aspect_ratio:new e.aI(Me,L.u_aspect_ratio),u_fade_change:new e.aI(Me,L.u_fade_change),u_matrix:new e.aJ(Me,L.u_matrix),u_label_plane_matrix:new e.aJ(Me,L.u_label_plane_matrix),u_coord_matrix:new e.aJ(Me,L.u_coord_matrix),u_is_text:new e.aH(Me,L.u_is_text),u_pitch_with_map:new e.aH(Me,L.u_pitch_with_map),u_is_along_line:new e.aH(Me,L.u_is_along_line),u_is_variable_anchor:new e.aH(Me,L.u_is_variable_anchor),u_texsize:new e.aO(Me,L.u_texsize),u_texsize_icon:new e.aO(Me,L.u_texsize_icon),u_texture:new e.aH(Me,L.u_texture),u_texture_icon:new e.aH(Me,L.u_texture_icon),u_gamma_scale:new e.aI(Me,L.u_gamma_scale),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_is_halo:new e.aH(Me,L.u_is_halo),u_translation:new e.aO(Me,L.u_translation),u_pitched_scale:new e.aI(Me,L.u_pitched_scale)}),background:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_opacity:new e.aI(Me,L.u_opacity),u_color:new e.aL(Me,L.u_color)}),backgroundPattern:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_opacity:new e.aI(Me,L.u_opacity),u_image:new e.aH(Me,L.u_image),u_pattern_tl_a:new e.aO(Me,L.u_pattern_tl_a),u_pattern_br_a:new e.aO(Me,L.u_pattern_br_a),u_pattern_tl_b:new e.aO(Me,L.u_pattern_tl_b),u_pattern_br_b:new e.aO(Me,L.u_pattern_br_b),u_texsize:new e.aO(Me,L.u_texsize),u_mix:new e.aI(Me,L.u_mix),u_pattern_size_a:new e.aO(Me,L.u_pattern_size_a),u_pattern_size_b:new e.aO(Me,L.u_pattern_size_b),u_scale_a:new e.aI(Me,L.u_scale_a),u_scale_b:new e.aI(Me,L.u_scale_b),u_pixel_coord_upper:new e.aO(Me,L.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(Me,L.u_pixel_coord_lower),u_tile_units_to_pixels:new e.aI(Me,L.u_tile_units_to_pixels)}),terrain:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_texture:new e.aH(Me,L.u_texture),u_ele_delta:new e.aI(Me,L.u_ele_delta),u_fog_matrix:new e.aJ(Me,L.u_fog_matrix),u_fog_color:new e.aL(Me,L.u_fog_color),u_fog_ground_blend:new e.aI(Me,L.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.aI(Me,L.u_fog_ground_blend_opacity),u_horizon_color:new e.aL(Me,L.u_horizon_color),u_horizon_fog_blend:new e.aI(Me,L.u_horizon_fog_blend)}),terrainDepth:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_ele_delta:new e.aI(Me,L.u_ele_delta)}),terrainCoords:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_texture:new e.aH(Me,L.u_texture),u_terrain_coords_id:new e.aI(Me,L.u_terrain_coords_id),u_ele_delta:new e.aI(Me,L.u_ele_delta)}),sky:(Me,L)=>({u_sky_color:new e.aL(Me,L.u_sky_color),u_horizon_color:new e.aL(Me,L.u_horizon_color),u_horizon:new e.aI(Me,L.u_horizon),u_sky_horizon_blend:new e.aI(Me,L.u_sky_horizon_blend)})};class Ho{constructor(L,J,fe){this.context=L;let de=L.gl;this.buffer=de.createBuffer(),this.dynamicDraw=!!fe,this.context.unbindVAO(),L.bindElementBuffer.set(this.buffer),de.bufferData(de.ELEMENT_ARRAY_BUFFER,J.arrayBuffer,this.dynamicDraw?de.DYNAMIC_DRAW:de.STATIC_DRAW),this.dynamicDraw||delete J.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(L){let J=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),J.bufferSubData(J.ELEMENT_ARRAY_BUFFER,0,L.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let is={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class as{constructor(L,J,fe,de){this.length=J.length,this.attributes=fe,this.itemSize=J.bytesPerElement,this.dynamicDraw=de,this.context=L;let Ae=L.gl;this.buffer=Ae.createBuffer(),L.bindVertexBuffer.set(this.buffer),Ae.bufferData(Ae.ARRAY_BUFFER,J.arrayBuffer,this.dynamicDraw?Ae.DYNAMIC_DRAW:Ae.STATIC_DRAW),this.dynamicDraw||delete J.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(L){if(L.length!==this.length)throw new Error(`Length of new data is ${L.length}, which doesn't match current length of ${this.length}`);let J=this.context.gl;this.bind(),J.bufferSubData(J.ARRAY_BUFFER,0,L.arrayBuffer)}enableAttributes(L,J){for(let fe=0;fe0){let Ot=e.H();e.aQ(Ot,Qe.placementInvProjMatrix,Me.transform.glCoordMatrix),e.aQ(Ot,Ot,Qe.placementViewportMatrix),dt.push({circleArray:Dt,circleOffset:Ht,transform:st.posMatrix,invTransform:Ot,coord:st}),St+=Dt.length/4,Ht=St}ht&&et.draw(Ae,Ye.LINES,Xo.disabled,ns.disabled,Me.colorModeForRenderPass(),so.disabled,{u_matrix:st.posMatrix,u_pixel_extrude_scale:[1/(Wt=Me.transform).width,1/Wt.height]},Me.style.map.terrain&&Me.style.map.terrain.getTerrainData(st),J.id,ht.layoutVertexBuffer,ht.indexBuffer,ht.segments,null,Me.transform.zoom,null,null,ht.collisionVertexBuffer)}var Wt;if(!de||!dt.length)return;let fr=Me.useProgram("collisionCircle"),Ar=new e.aR;Ar.resize(4*St),Ar._trim();let Le=0;for(let Xe of dt)for(let st=0;st=0&&(Xe[Qe.associatedIconIndex]={shiftedAnchor:ei,angle:Mi})}else Bt(Qe.numGlyphs,ze)}if(St){je.clear();let st=Me.icon.placedSymbolArray;for(let Qe=0;QeMe.style.map.terrain.getElevation(Wr,bt,qt):null,Ct=J.layout.get("text-rotation-alignment")==="map";he(Sa,Wr.posMatrix,Me,de,Il,Xl,Xe,St,Ct,ze,Wr.toUnwrapped(),Le.width,Le.height,il,it)}let _l=Wr.posMatrix,Dl=de&&ir||bu,le=st||Dl?Ll:Il,we=_u,Be=wn&&J.paint.get(de?"text-halo-width":"icon-halo-width").constantOr(1)!==0,$e;$e=wn?Sa.iconsInText?zi(ei.kind,Ki,Qe,Xe,st,Dl,Me,_l,le,we,il,bo,Ys,zr):vi(ei.kind,Ki,Qe,Xe,st,Dl,Me,_l,le,we,il,de,bo,!0,zr):Po(ei.kind,Ki,Qe,Xe,st,Dl,Me,_l,le,we,il,de,bo,zr);let Je={program:pi,buffers:ln,uniformValues:$e,atlasTexture:ds,atlasTextureIcon:Ks,atlasInterpolation:Zo,atlasInterpolationIcon:Is,isSDF:wn,hasHalo:Be};if(Dt&&Sa.canOverlap){Ot=!0;let it=ln.segments.get();for(let Ct of it)pr.push({segments:new e.a0([Ct]),sortKey:Ct.sortKey,state:Je,terrainData:Lo})}else pr.push({segments:ln.segments,sortKey:0,state:Je,terrainData:Lo})}Ot&&pr.sort((Wr,ia)=>Wr.sortKey-ia.sortKey);for(let Wr of pr){let ia=Wr.state;if(fr.activeTexture.set(Ar.TEXTURE0),ia.atlasTexture.bind(ia.atlasInterpolation,Ar.CLAMP_TO_EDGE),ia.atlasTextureIcon&&(fr.activeTexture.set(Ar.TEXTURE1),ia.atlasTextureIcon&&ia.atlasTextureIcon.bind(ia.atlasInterpolationIcon,Ar.CLAMP_TO_EDGE)),ia.isSDF){let Sa=ia.uniformValues;ia.hasHalo&&(Sa.u_is_halo=1,zc(ia.buffers,Wr.segments,J,Me,ia.program,$t,Ht,Wt,Sa,Wr.terrainData)),Sa.u_is_halo=0}zc(ia.buffers,Wr.segments,J,Me,ia.program,$t,Ht,Wt,ia.uniformValues,Wr.terrainData)}}function zc(Me,L,J,fe,de,Ae,Ye,et,dt,St){let Ht=fe.context;de.draw(Ht,Ht.gl.TRIANGLES,Ae,Ye,et,so.disabled,dt,St,J.id,Me.layoutVertexBuffer,Me.indexBuffer,L,J.paint,fe.transform.zoom,Me.programConfigurations.get(J.id),Me.dynamicLayoutVertexBuffer,Me.opacityVertexBuffer)}function Ku(Me,L,J,fe){let de=Me.context,Ae=de.gl,Ye=ns.disabled,et=new Hs([Ae.ONE,Ae.ONE],e.aM.transparent,[!0,!0,!0,!0]),dt=L.getBucket(J);if(!dt)return;let St=fe.key,Ht=J.heatmapFbos.get(St);Ht||(Ht=Bc(de,L.tileSize,L.tileSize),J.heatmapFbos.set(St,Ht)),de.bindFramebuffer.set(Ht.framebuffer),de.viewport.set([0,0,L.tileSize,L.tileSize]),de.clear({color:e.aM.transparent});let Wt=dt.programConfigurations.get(J.id),fr=Me.useProgram("heatmap",Wt),Ar=Me.style.map.terrain.getTerrainData(fe);fr.draw(de,Ae.TRIANGLES,Xo.disabled,Ye,et,so.disabled,ai(fe.posMatrix,L,Me.transform.zoom,J.paint.get("heatmap-intensity")),Ar,J.id,dt.layoutVertexBuffer,dt.indexBuffer,dt.segments,J.paint,Me.transform.zoom,Wt)}function Ju(Me,L,J){let fe=Me.context,de=fe.gl;fe.setColorMode(Me.colorModeForRenderPass());let Ae=Nc(fe,L),Ye=J.key,et=L.heatmapFbos.get(Ye);et&&(fe.activeTexture.set(de.TEXTURE0),de.bindTexture(de.TEXTURE_2D,et.colorAttachment.get()),fe.activeTexture.set(de.TEXTURE1),Ae.bind(de.LINEAR,de.CLAMP_TO_EDGE),Me.useProgram("heatmapTexture").draw(fe,de.TRIANGLES,Xo.disabled,ns.disabled,Me.colorModeForRenderPass(),so.disabled,Ao(Me,L,0,1),null,L.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments,L.paint,Me.transform.zoom),et.destroy(),L.heatmapFbos.delete(Ye))}function Bc(Me,L,J){var fe,de;let Ae=Me.gl,Ye=Ae.createTexture();Ae.bindTexture(Ae.TEXTURE_2D,Ye),Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_WRAP_S,Ae.CLAMP_TO_EDGE),Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_WRAP_T,Ae.CLAMP_TO_EDGE),Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_MIN_FILTER,Ae.LINEAR),Ae.texParameteri(Ae.TEXTURE_2D,Ae.TEXTURE_MAG_FILTER,Ae.LINEAR);let et=(fe=Me.HALF_FLOAT)!==null&&fe!==void 0?fe:Ae.UNSIGNED_BYTE,dt=(de=Me.RGBA16F)!==null&&de!==void 0?de:Ae.RGBA;Ae.texImage2D(Ae.TEXTURE_2D,0,dt,L,J,0,Ae.RGBA,et,null);let St=Me.createFramebuffer(L,J,!1,!1);return St.colorAttachment.set(Ye),St}function Nc(Me,L){return L.colorRampTexture||(L.colorRampTexture=new h(Me,L.colorRamp,Me.gl.RGBA)),L.colorRampTexture}function tu(Me,L,J,fe,de){if(!J||!fe||!fe.imageAtlas)return;let Ae=fe.imageAtlas.patternPositions,Ye=Ae[J.to.toString()],et=Ae[J.from.toString()];if(!Ye&&et&&(Ye=et),!et&&Ye&&(et=Ye),!Ye||!et){let dt=de.getPaintProperty(L);Ye=Ae[dt],et=Ae[dt]}Ye&&et&&Me.setConstantPatternPositions(Ye,et)}function xc(Me,L,J,fe,de,Ae,Ye){let et=Me.context.gl,dt="fill-pattern",St=J.paint.get(dt),Ht=St&&St.constantOr(1),Wt=J.getCrossfadeParameters(),fr,Ar,Le,ze,je;Ye?(Ar=Ht&&!J.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",fr=et.LINES):(Ar=Ht?"fillPattern":"fill",fr=et.TRIANGLES);let Xe=St.constantOr(null);for(let st of fe){let Qe=L.getTile(st);if(Ht&&!Qe.patternsLoaded())continue;let ht=Qe.getBucket(J);if(!ht)continue;let Dt=ht.programConfigurations.get(J.id),Ot=Me.useProgram(Ar,Dt),$t=Me.style.map.terrain&&Me.style.map.terrain.getTerrainData(st);Ht&&(Me.context.activeTexture.set(et.TEXTURE0),Qe.imageAtlasTexture.bind(et.LINEAR,et.CLAMP_TO_EDGE),Dt.updatePaintBuffers(Wt)),tu(Dt,dt,Xe,Qe,J);let ir=$t?st:null,pr=Me.translatePosMatrix(ir?ir.posMatrix:st.posMatrix,Qe,J.paint.get("fill-translate"),J.paint.get("fill-translate-anchor"));if(Ye){ze=ht.indexBuffer2,je=ht.segments2;let zr=[et.drawingBufferWidth,et.drawingBufferHeight];Le=Ar==="fillOutlinePattern"&&Ht?Dn(pr,Me,Wt,Qe,zr):La(pr,zr)}else ze=ht.indexBuffer,je=ht.segments,Le=Ht?ja(pr,Me,Wt,Qe):ra(pr);Ot.draw(Me.context,fr,de,Me.stencilModeForClipping(st),Ae,so.disabled,Le,$t,J.id,ht.layoutVertexBuffer,ze,je,J.paint,Me.transform.zoom,Dt)}}function ru(Me,L,J,fe,de,Ae,Ye){let et=Me.context,dt=et.gl,St="fill-extrusion-pattern",Ht=J.paint.get(St),Wt=Ht.constantOr(1),fr=J.getCrossfadeParameters(),Ar=J.paint.get("fill-extrusion-opacity"),Le=Ht.constantOr(null);for(let ze of fe){let je=L.getTile(ze),Xe=je.getBucket(J);if(!Xe)continue;let st=Me.style.map.terrain&&Me.style.map.terrain.getTerrainData(ze),Qe=Xe.programConfigurations.get(J.id),ht=Me.useProgram(Wt?"fillExtrusionPattern":"fillExtrusion",Qe);Wt&&(Me.context.activeTexture.set(dt.TEXTURE0),je.imageAtlasTexture.bind(dt.LINEAR,dt.CLAMP_TO_EDGE),Qe.updatePaintBuffers(fr)),tu(Qe,St,Le,je,J);let Dt=Me.translatePosMatrix(ze.posMatrix,je,J.paint.get("fill-extrusion-translate"),J.paint.get("fill-extrusion-translate-anchor")),Ot=J.paint.get("fill-extrusion-vertical-gradient"),$t=Wt?kr(Dt,Me,Ot,Ar,ze,fr,je):Fr(Dt,Me,Ot,Ar);ht.draw(et,et.gl.TRIANGLES,de,Ae,Ye,so.backCCW,$t,st,J.id,Xe.layoutVertexBuffer,Xe.indexBuffer,Xe.segments,J.paint,Me.transform.zoom,Qe,Me.style.map.terrain&&Xe.centroidVertexBuffer)}}function Qu(Me,L,J,fe,de,Ae,Ye){let et=Me.context,dt=et.gl,St=J.fbo;if(!St)return;let Ht=Me.useProgram("hillshade"),Wt=Me.style.map.terrain&&Me.style.map.terrain.getTerrainData(L);et.activeTexture.set(dt.TEXTURE0),dt.bindTexture(dt.TEXTURE_2D,St.colorAttachment.get()),Ht.draw(et,dt.TRIANGLES,de,Ae,Ye,so.disabled,((fr,Ar,Le,ze)=>{let je=Le.paint.get("hillshade-shadow-color"),Xe=Le.paint.get("hillshade-highlight-color"),st=Le.paint.get("hillshade-accent-color"),Qe=Le.paint.get("hillshade-illumination-direction")*(Math.PI/180);Le.paint.get("hillshade-illumination-anchor")==="viewport"&&(Qe-=fr.transform.angle);let ht=!fr.options.moving;return{u_matrix:ze?ze.posMatrix:fr.transform.calculatePosMatrix(Ar.tileID.toUnwrapped(),ht),u_image:0,u_latrange:yo(0,Ar.tileID),u_light:[Le.paint.get("hillshade-exaggeration"),Qe],u_shadow:je,u_highlight:Xe,u_accent:st}})(Me,J,fe,Wt?L:null),Wt,fe.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments)}function $s(Me,L,J,fe,de,Ae){let Ye=Me.context,et=Ye.gl,dt=L.dem;if(dt&&dt.data){let St=dt.dim,Ht=dt.stride,Wt=dt.getPixels();if(Ye.activeTexture.set(et.TEXTURE1),Ye.pixelStoreUnpackPremultiplyAlpha.set(!1),L.demTexture=L.demTexture||Me.getTileTexture(Ht),L.demTexture){let Ar=L.demTexture;Ar.update(Wt,{premultiply:!1}),Ar.bind(et.NEAREST,et.CLAMP_TO_EDGE)}else L.demTexture=new h(Ye,Wt,et.RGBA,{premultiply:!1}),L.demTexture.bind(et.NEAREST,et.CLAMP_TO_EDGE);Ye.activeTexture.set(et.TEXTURE0);let fr=L.fbo;if(!fr){let Ar=new h(Ye,{width:St,height:St,data:null},et.RGBA);Ar.bind(et.LINEAR,et.CLAMP_TO_EDGE),fr=L.fbo=Ye.createFramebuffer(St,St,!0,!1),fr.colorAttachment.set(Ar.texture)}Ye.bindFramebuffer.set(fr.framebuffer),Ye.viewport.set([0,0,St,St]),Me.useProgram("hillshadePrepare").draw(Ye,et.TRIANGLES,fe,de,Ae,so.disabled,((Ar,Le)=>{let ze=Le.stride,je=e.H();return e.aP(je,0,e.X,-e.X,0,0,1),e.J(je,je,[0,-e.X,0]),{u_matrix:je,u_image:1,u_dimension:[ze,ze],u_zoom:Ar.overscaledZ,u_unpack:Le.getUnpackVector()}})(L.tileID,dt),null,J.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments),L.needsHillshadePrepare=!1}}function ec(Me,L,J,fe,de,Ae){let Ye=fe.paint.get("raster-fade-duration");if(!Ae&&Ye>0){let et=n.now(),dt=(et-Me.timeAdded)/Ye,St=L?(et-L.timeAdded)/Ye:-1,Ht=J.getSource(),Wt=de.coveringZoomLevel({tileSize:Ht.tileSize,roundZoom:Ht.roundZoom}),fr=!L||Math.abs(L.tileID.overscaledZ-Wt)>Math.abs(Me.tileID.overscaledZ-Wt),Ar=fr&&Me.refreshedUponExpiration?1:e.ac(fr?dt:1-St,0,1);return Me.refreshedUponExpiration&&dt>=1&&(Me.refreshedUponExpiration=!1),L?{opacity:1,mix:1-Ar}:{opacity:Ar,mix:0}}return{opacity:1,mix:0}}let Iu=new e.aM(1,0,0,1),us=new e.aM(0,1,0,1),wc=new e.aM(0,0,1,1),Sf=new e.aM(1,0,1,1),tf=new e.aM(0,1,1,1);function Vu(Me,L,J,fe){Tc(Me,0,L+J/2,Me.transform.width,J,fe)}function rf(Me,L,J,fe){Tc(Me,L-J/2,0,J,Me.transform.height,fe)}function Tc(Me,L,J,fe,de,Ae){let Ye=Me.context,et=Ye.gl;et.enable(et.SCISSOR_TEST),et.scissor(L*Me.pixelRatio,J*Me.pixelRatio,fe*Me.pixelRatio,de*Me.pixelRatio),Ye.clear({color:Ae}),et.disable(et.SCISSOR_TEST)}function Ef(Me,L,J){let fe=Me.context,de=fe.gl,Ae=J.posMatrix,Ye=Me.useProgram("debug"),et=Xo.disabled,dt=ns.disabled,St=Me.colorModeForRenderPass(),Ht="$debug",Wt=Me.style.map.terrain&&Me.style.map.terrain.getTerrainData(J);fe.activeTexture.set(de.TEXTURE0);let fr=L.getTileByID(J.key).latestRawTileData,Ar=Math.floor((fr&&fr.byteLength||0)/1024),Le=L.getTile(J).tileSize,ze=512/Math.min(Le,512)*(J.overscaledZ/Me.transform.zoom)*.5,je=J.canonical.toString();J.overscaledZ!==J.canonical.z&&(je+=` => ${J.overscaledZ}`),function(Xe,st){Xe.initDebugOverlayCanvas();let Qe=Xe.debugOverlayCanvas,ht=Xe.context.gl,Dt=Xe.debugOverlayCanvas.getContext("2d");Dt.clearRect(0,0,Qe.width,Qe.height),Dt.shadowColor="white",Dt.shadowBlur=2,Dt.lineWidth=1.5,Dt.strokeStyle="white",Dt.textBaseline="top",Dt.font="bold 36px Open Sans, sans-serif",Dt.fillText(st,5,5),Dt.strokeText(st,5,5),Xe.debugOverlayTexture.update(Qe),Xe.debugOverlayTexture.bind(ht.LINEAR,ht.CLAMP_TO_EDGE)}(Me,`${je} ${Ar}kB`),Ye.draw(fe,de.TRIANGLES,et,dt,Hs.alphaBlended,so.disabled,ti(Ae,e.aM.transparent,ze),null,Ht,Me.debugBuffer,Me.quadTriangleIndexBuffer,Me.debugSegments),Ye.draw(fe,de.LINE_STRIP,et,dt,St,so.disabled,ti(Ae,e.aM.red),Wt,Ht,Me.debugBuffer,Me.tileBorderIndexBuffer,Me.debugSegments)}function Zs(Me,L,J){let fe=Me.context,de=fe.gl,Ae=Me.colorModeForRenderPass(),Ye=new Xo(de.LEQUAL,Xo.ReadWrite,Me.depthRangeFor3D),et=Me.useProgram("terrain"),dt=L.getTerrainMesh();fe.bindFramebuffer.set(null),fe.viewport.set([0,0,Me.width,Me.height]);for(let St of J){let Ht=Me.renderToTexture.getTexture(St),Wt=L.getTerrainData(St.tileID);fe.activeTexture.set(de.TEXTURE0),de.bindTexture(de.TEXTURE_2D,Ht.texture);let fr=Me.transform.calculatePosMatrix(St.tileID.toUnwrapped()),Ar=L.getMeshFrameDelta(Me.transform.zoom),Le=Me.transform.calculateFogMatrix(St.tileID.toUnwrapped()),ze=Vt(fr,Ar,Le,Me.style.sky,Me.transform.pitch);et.draw(fe,de.TRIANGLES,Ye,ns.disabled,Ae,so.backCCW,ze,Wt,"terrain",dt.vertexBuffer,dt.indexBuffer,dt.segments)}}class au{constructor(L,J,fe){this.vertexBuffer=L,this.indexBuffer=J,this.segments=fe}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class af{constructor(L,J){this.context=new Af(L),this.transform=J,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=ot.maxUnderzooming+ot.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Ke}resize(L,J,fe){if(this.width=Math.floor(L*fe),this.height=Math.floor(J*fe),this.pixelRatio=fe,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let de of this.style._order)this.style._layers[de].resize()}setup(){let L=this.context,J=new e.aX;J.emplaceBack(0,0),J.emplaceBack(e.X,0),J.emplaceBack(0,e.X),J.emplaceBack(e.X,e.X),this.tileExtentBuffer=L.createVertexBuffer(J,cr.members),this.tileExtentSegments=e.a0.simpleSegment(0,0,4,2);let fe=new e.aX;fe.emplaceBack(0,0),fe.emplaceBack(e.X,0),fe.emplaceBack(0,e.X),fe.emplaceBack(e.X,e.X),this.debugBuffer=L.createVertexBuffer(fe,cr.members),this.debugSegments=e.a0.simpleSegment(0,0,4,5);let de=new e.$;de.emplaceBack(0,0,0,0),de.emplaceBack(e.X,0,e.X,0),de.emplaceBack(0,e.X,0,e.X),de.emplaceBack(e.X,e.X,e.X,e.X),this.rasterBoundsBuffer=L.createVertexBuffer(de,Ce.members),this.rasterBoundsSegments=e.a0.simpleSegment(0,0,4,2);let Ae=new e.aX;Ae.emplaceBack(0,0),Ae.emplaceBack(1,0),Ae.emplaceBack(0,1),Ae.emplaceBack(1,1),this.viewportBuffer=L.createVertexBuffer(Ae,cr.members),this.viewportSegments=e.a0.simpleSegment(0,0,4,2);let Ye=new e.aZ;Ye.emplaceBack(0),Ye.emplaceBack(1),Ye.emplaceBack(3),Ye.emplaceBack(2),Ye.emplaceBack(0),this.tileBorderIndexBuffer=L.createIndexBuffer(Ye);let et=new e.aY;et.emplaceBack(0,1,2),et.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=L.createIndexBuffer(et);let dt=this.context.gl;this.stencilClearMode=new ns({func:dt.ALWAYS,mask:0},0,255,dt.ZERO,dt.ZERO,dt.ZERO)}clearStencil(){let L=this.context,J=L.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let fe=e.H();e.aP(fe,0,this.width,this.height,0,0,1),e.K(fe,fe,[J.drawingBufferWidth,J.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(L,J.TRIANGLES,Xo.disabled,this.stencilClearMode,Hs.disabled,so.disabled,Si(fe),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(L,J){if(this.currentStencilSource===L.source||!L.isTileClipped()||!J||!J.length)return;this.currentStencilSource=L.source;let fe=this.context,de=fe.gl;this.nextStencilID+J.length>256&&this.clearStencil(),fe.setColorMode(Hs.disabled),fe.setDepthMode(Xo.disabled);let Ae=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let Ye of J){let et=this._tileClippingMaskIDs[Ye.key]=this.nextStencilID++,dt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Ye);Ae.draw(fe,de.TRIANGLES,Xo.disabled,new ns({func:de.ALWAYS,mask:0},et,255,de.KEEP,de.KEEP,de.REPLACE),Hs.disabled,so.disabled,Si(Ye.posMatrix),dt,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let L=this.nextStencilID++,J=this.context.gl;return new ns({func:J.NOTEQUAL,mask:255},L,255,J.KEEP,J.KEEP,J.REPLACE)}stencilModeForClipping(L){let J=this.context.gl;return new ns({func:J.EQUAL,mask:255},this._tileClippingMaskIDs[L.key],0,J.KEEP,J.KEEP,J.REPLACE)}stencilConfigForOverlap(L){let J=this.context.gl,fe=L.sort((Ye,et)=>et.overscaledZ-Ye.overscaledZ),de=fe[fe.length-1].overscaledZ,Ae=fe[0].overscaledZ-de+1;if(Ae>1){this.currentStencilSource=void 0,this.nextStencilID+Ae>256&&this.clearStencil();let Ye={};for(let et=0;et({u_sky_color:Xe.properties.get("sky-color"),u_horizon_color:Xe.properties.get("horizon-color"),u_horizon:(st.height/2+st.getHorizon())*Qe,u_sky_horizon_blend:Xe.properties.get("sky-horizon-blend")*st.height/2*Qe}))(St,dt.style.map.transform,dt.pixelRatio),Ar=new Xo(Wt.LEQUAL,Xo.ReadWrite,[0,1]),Le=ns.disabled,ze=dt.colorModeForRenderPass(),je=dt.useProgram("sky");if(!St.mesh){let Xe=new e.aX;Xe.emplaceBack(-1,-1),Xe.emplaceBack(1,-1),Xe.emplaceBack(1,1),Xe.emplaceBack(-1,1);let st=new e.aY;st.emplaceBack(0,1,2),st.emplaceBack(0,2,3),St.mesh=new au(Ht.createVertexBuffer(Xe,cr.members),Ht.createIndexBuffer(st),e.a0.simpleSegment(0,0,Xe.length,st.length))}je.draw(Ht,Wt.TRIANGLES,Ar,Le,ze,so.disabled,fr,void 0,"sky",St.mesh.vertexBuffer,St.mesh.indexBuffer,St.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=J.showOverdrawInspector,this.depthRangeFor3D=[0,1-(L._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=fe.length-1;this.currentLayer>=0;this.currentLayer--){let dt=this.style._layers[fe[this.currentLayer]],St=de[dt.source],Ht=Ae[dt.source];this._renderTileClippingMasks(dt,Ht),this.renderLayer(this,St,dt,Ht)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerje.source&&!je.isHidden(Ht)?[St.sourceCaches[je.source]]:[]),Ar=fr.filter(je=>je.getSource().type==="vector"),Le=fr.filter(je=>je.getSource().type!=="vector"),ze=je=>{(!Wt||Wt.getSource().maxzoomze(je)),Wt||Le.forEach(je=>ze(je)),Wt}(this.style,this.transform.zoom);dt&&function(St,Ht,Wt){for(let fr=0;fr0),de&&(e.b0(J,fe),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Ae,Ye){let et=Ae.context,dt=et.gl,St=Hs.unblended,Ht=new Xo(dt.LEQUAL,Xo.ReadWrite,[0,1]),Wt=Ye.getTerrainMesh(),fr=Ye.sourceCache.getRenderableTiles(),Ar=Ae.useProgram("terrainDepth");et.bindFramebuffer.set(Ye.getFramebuffer("depth").framebuffer),et.viewport.set([0,0,Ae.width/devicePixelRatio,Ae.height/devicePixelRatio]),et.clear({color:e.aM.transparent,depth:1});for(let Le of fr){let ze=Ye.getTerrainData(Le.tileID),je={u_matrix:Ae.transform.calculatePosMatrix(Le.tileID.toUnwrapped()),u_ele_delta:Ye.getMeshFrameDelta(Ae.transform.zoom)};Ar.draw(et,dt.TRIANGLES,Ht,ns.disabled,St,so.backCCW,je,ze,"terrain",Wt.vertexBuffer,Wt.indexBuffer,Wt.segments)}et.bindFramebuffer.set(null),et.viewport.set([0,0,Ae.width,Ae.height])}(this,this.style.map.terrain),function(Ae,Ye){let et=Ae.context,dt=et.gl,St=Hs.unblended,Ht=new Xo(dt.LEQUAL,Xo.ReadWrite,[0,1]),Wt=Ye.getTerrainMesh(),fr=Ye.getCoordsTexture(),Ar=Ye.sourceCache.getRenderableTiles(),Le=Ae.useProgram("terrainCoords");et.bindFramebuffer.set(Ye.getFramebuffer("coords").framebuffer),et.viewport.set([0,0,Ae.width/devicePixelRatio,Ae.height/devicePixelRatio]),et.clear({color:e.aM.transparent,depth:1}),Ye.coordsIndex=[];for(let ze of Ar){let je=Ye.getTerrainData(ze.tileID);et.activeTexture.set(dt.TEXTURE0),dt.bindTexture(dt.TEXTURE_2D,fr.texture);let Xe={u_matrix:Ae.transform.calculatePosMatrix(ze.tileID.toUnwrapped()),u_terrain_coords_id:(255-Ye.coordsIndex.length)/255,u_texture:0,u_ele_delta:Ye.getMeshFrameDelta(Ae.transform.zoom)};Le.draw(et,dt.TRIANGLES,Ht,ns.disabled,St,so.backCCW,Xe,je,"terrain",Wt.vertexBuffer,Wt.indexBuffer,Wt.segments),Ye.coordsIndex.push(ze.tileID.key)}et.bindFramebuffer.set(null),et.viewport.set([0,0,Ae.width,Ae.height])}(this,this.style.map.terrain))}renderLayer(L,J,fe,de){if(!fe.isHidden(this.transform.zoom)&&(fe.type==="background"||fe.type==="custom"||(de||[]).length))switch(this.id=fe.id,fe.type){case"symbol":(function(Ae,Ye,et,dt,St){if(Ae.renderPass!=="translucent")return;let Ht=ns.disabled,Wt=Ae.colorModeForRenderPass();(et._unevaluatedLayout.hasValue("text-variable-anchor")||et._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(fr,Ar,Le,ze,je,Xe,st,Qe,ht){let Dt=Ar.transform,Ot=_n(),$t=je==="map",ir=Xe==="map";for(let pr of fr){let zr=ze.getTile(pr),Wr=zr.getBucket(Le);if(!Wr||!Wr.text||!Wr.text.segments.get().length)continue;let ia=e.ag(Wr.textSizeData,Dt.zoom),Sa=ca(zr,1,Ar.transform.zoom),ln=Ut(pr.posMatrix,ir,$t,Ar.transform,Sa),an=Le.layout.get("icon-text-fit")!=="none"&&Wr.hasIconData();if(ia){let wn=Math.pow(2,Dt.zoom-zr.tileID.overscaledZ),ei=Ar.style.map.terrain?(pi,Ki)=>Ar.style.map.terrain.getElevation(pr,pi,Ki):null,Mi=Ot.translatePosition(Dt,zr,st,Qe);Zu(Wr,$t,ir,ht,Dt,ln,pr.posMatrix,wn,ia,an,Ot,Mi,pr.toUnwrapped(),ei)}}}(dt,Ae,et,Ye,et.layout.get("text-rotation-alignment"),et.layout.get("text-pitch-alignment"),et.paint.get("text-translate"),et.paint.get("text-translate-anchor"),St),et.paint.get("icon-opacity").constantOr(1)!==0&&ef(Ae,Ye,et,dt,!1,et.paint.get("icon-translate"),et.paint.get("icon-translate-anchor"),et.layout.get("icon-rotation-alignment"),et.layout.get("icon-pitch-alignment"),et.layout.get("icon-keep-upright"),Ht,Wt),et.paint.get("text-opacity").constantOr(1)!==0&&ef(Ae,Ye,et,dt,!0,et.paint.get("text-translate"),et.paint.get("text-translate-anchor"),et.layout.get("text-rotation-alignment"),et.layout.get("text-pitch-alignment"),et.layout.get("text-keep-upright"),Ht,Wt),Ye.map.showCollisionBoxes&&(hc(Ae,Ye,et,dt,!0),hc(Ae,Ye,et,dt,!1))})(L,J,fe,de,this.style.placement.variableOffsets);break;case"circle":(function(Ae,Ye,et,dt){if(Ae.renderPass!=="translucent")return;let St=et.paint.get("circle-opacity"),Ht=et.paint.get("circle-stroke-width"),Wt=et.paint.get("circle-stroke-opacity"),fr=!et.layout.get("circle-sort-key").isConstant();if(St.constantOr(1)===0&&(Ht.constantOr(1)===0||Wt.constantOr(1)===0))return;let Ar=Ae.context,Le=Ar.gl,ze=Ae.depthModeForSublayer(0,Xo.ReadOnly),je=ns.disabled,Xe=Ae.colorModeForRenderPass(),st=[];for(let Qe=0;QeQe.sortKey-ht.sortKey);for(let Qe of st){let{programConfiguration:ht,program:Dt,layoutVertexBuffer:Ot,indexBuffer:$t,uniformValues:ir,terrainData:pr}=Qe.state;Dt.draw(Ar,Le.TRIANGLES,ze,je,Xe,so.disabled,ir,pr,et.id,Ot,$t,Qe.segments,et.paint,Ae.transform.zoom,ht)}})(L,J,fe,de);break;case"heatmap":(function(Ae,Ye,et,dt){if(et.paint.get("heatmap-opacity")===0)return;let St=Ae.context;if(Ae.style.map.terrain){for(let Ht of dt){let Wt=Ye.getTile(Ht);Ye.hasRenderableParent(Ht)||(Ae.renderPass==="offscreen"?Ku(Ae,Wt,et,Ht):Ae.renderPass==="translucent"&&Ju(Ae,et,Ht))}St.viewport.set([0,0,Ae.width,Ae.height])}else Ae.renderPass==="offscreen"?function(Ht,Wt,fr,Ar){let Le=Ht.context,ze=Le.gl,je=ns.disabled,Xe=new Hs([ze.ONE,ze.ONE],e.aM.transparent,[!0,!0,!0,!0]);(function(st,Qe,ht){let Dt=st.gl;st.activeTexture.set(Dt.TEXTURE1),st.viewport.set([0,0,Qe.width/4,Qe.height/4]);let Ot=ht.heatmapFbos.get(e.aU);Ot?(Dt.bindTexture(Dt.TEXTURE_2D,Ot.colorAttachment.get()),st.bindFramebuffer.set(Ot.framebuffer)):(Ot=Bc(st,Qe.width/4,Qe.height/4),ht.heatmapFbos.set(e.aU,Ot))})(Le,Ht,fr),Le.clear({color:e.aM.transparent});for(let st=0;st20&&Ht.texParameterf(Ht.TEXTURE_2D,St.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,St.extTextureFilterAnisotropicMax);let Wr=Ae.style.map.terrain&&Ae.style.map.terrain.getTerrainData(st),ia=Wr?st:null,Sa=ia?ia.posMatrix:Ae.transform.calculatePosMatrix(st.toUnwrapped(),Xe),ln=Co(Sa,pr||[0,0],ir||1,$t,et);Wt instanceof Ue?fr.draw(St,Ht.TRIANGLES,Qe,ns.disabled,Ar,so.disabled,ln,Wr,et.id,Wt.boundsBuffer,Ae.quadTriangleIndexBuffer,Wt.boundsSegments):fr.draw(St,Ht.TRIANGLES,Qe,Le[st.overscaledZ],Ar,so.disabled,ln,Wr,et.id,Ae.rasterBoundsBuffer,Ae.quadTriangleIndexBuffer,Ae.rasterBoundsSegments)}})(L,J,fe,de);break;case"background":(function(Ae,Ye,et,dt){let St=et.paint.get("background-color"),Ht=et.paint.get("background-opacity");if(Ht===0)return;let Wt=Ae.context,fr=Wt.gl,Ar=Ae.transform,Le=Ar.tileSize,ze=et.paint.get("background-pattern");if(Ae.isPatternMissing(ze))return;let je=!ze&&St.a===1&&Ht===1&&Ae.opaquePassEnabledForLayer()?"opaque":"translucent";if(Ae.renderPass!==je)return;let Xe=ns.disabled,st=Ae.depthModeForSublayer(0,je==="opaque"?Xo.ReadWrite:Xo.ReadOnly),Qe=Ae.colorModeForRenderPass(),ht=Ae.useProgram(ze?"backgroundPattern":"background"),Dt=dt||Ar.coveringTiles({tileSize:Le,terrain:Ae.style.map.terrain});ze&&(Wt.activeTexture.set(fr.TEXTURE0),Ae.imageManager.bind(Ae.context));let Ot=et.getCrossfadeParameters();for(let $t of Dt){let ir=dt?$t.posMatrix:Ae.transform.calculatePosMatrix($t.toUnwrapped()),pr=ze?ro(ir,Ht,Ae,ze,{tileID:$t,tileSize:Le},Ot):ho(ir,Ht,St),zr=Ae.style.map.terrain&&Ae.style.map.terrain.getTerrainData($t);ht.draw(Wt,fr.TRIANGLES,st,Xe,Qe,so.disabled,pr,zr,et.id,Ae.tileExtentBuffer,Ae.quadTriangleIndexBuffer,Ae.tileExtentSegments)}})(L,0,fe,de);break;case"custom":(function(Ae,Ye,et){let dt=Ae.context,St=et.implementation;if(Ae.renderPass==="offscreen"){let Ht=St.prerender;Ht&&(Ae.setCustomLayerDefaults(),dt.setColorMode(Ae.colorModeForRenderPass()),Ht.call(St,dt.gl,Ae.transform.customLayerMatrix()),dt.setDirty(),Ae.setBaseState())}else if(Ae.renderPass==="translucent"){Ae.setCustomLayerDefaults(),dt.setColorMode(Ae.colorModeForRenderPass()),dt.setStencilMode(ns.disabled);let Ht=St.renderingMode==="3d"?new Xo(Ae.context.gl.LEQUAL,Xo.ReadWrite,Ae.depthRangeFor3D):Ae.depthModeForSublayer(0,Xo.ReadOnly);dt.setDepthMode(Ht),St.render(dt.gl,Ae.transform.customLayerMatrix(),{farZ:Ae.transform.farZ,nearZ:Ae.transform.nearZ,fov:Ae.transform._fov,modelViewProjectionMatrix:Ae.transform.modelViewProjectionMatrix,projectionMatrix:Ae.transform.projectionMatrix}),dt.setDirty(),Ae.setBaseState(),dt.bindFramebuffer.set(null)}})(L,0,fe)}}translatePosMatrix(L,J,fe,de,Ae){if(!fe[0]&&!fe[1])return L;let Ye=Ae?de==="map"?this.transform.angle:0:de==="viewport"?-this.transform.angle:0;if(Ye){let St=Math.sin(Ye),Ht=Math.cos(Ye);fe=[fe[0]*Ht-fe[1]*St,fe[0]*St+fe[1]*Ht]}let et=[Ae?fe[0]:ca(J,fe[0],this.transform.zoom),Ae?fe[1]:ca(J,fe[1],this.transform.zoom),0],dt=new Float32Array(16);return e.J(dt,L,et),dt}saveTileTexture(L){let J=this._tileTextures[L.size[0]];J?J.push(L):this._tileTextures[L.size[0]]=[L]}getTileTexture(L){let J=this._tileTextures[L];return J&&J.length>0?J.pop():null}isPatternMissing(L){if(!L)return!1;if(!L.from||!L.to)return!0;let J=this.imageManager.getPattern(L.from.toString()),fe=this.imageManager.getPattern(L.to.toString());return!J||!fe}useProgram(L,J){this.cache=this.cache||{};let fe=L+(J?J.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[fe]||(this.cache[fe]=new Tr(this.context,rr[L],J,es[L],this._showOverdrawInspector,this.style.map.terrain)),this.cache[fe]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let L=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(L.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new h(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:L,drawingBufferHeight:J}=this.context.gl;return this.width!==L||this.height!==J}}class Fs{constructor(L,J){this.points=L,this.planes=J}static fromInvProjectionMatrix(L,J,fe){let de=Math.pow(2,fe),Ae=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(et=>{let dt=1/(et=e.af([],et,L))[3]/J*de;return e.b1(et,et,[dt,dt,1/et[3],dt])}),Ye=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(et=>{let dt=function(fr,Ar){var Le=Ar[0],ze=Ar[1],je=Ar[2],Xe=Le*Le+ze*ze+je*je;return Xe>0&&(Xe=1/Math.sqrt(Xe)),fr[0]=Ar[0]*Xe,fr[1]=Ar[1]*Xe,fr[2]=Ar[2]*Xe,fr}([],function(fr,Ar,Le){var ze=Ar[0],je=Ar[1],Xe=Ar[2],st=Le[0],Qe=Le[1],ht=Le[2];return fr[0]=je*ht-Xe*Qe,fr[1]=Xe*st-ze*ht,fr[2]=ze*Qe-je*st,fr}([],E([],Ae[et[0]],Ae[et[1]]),E([],Ae[et[2]],Ae[et[1]]))),St=-((Ht=dt)[0]*(Wt=Ae[et[1]])[0]+Ht[1]*Wt[1]+Ht[2]*Wt[2]);var Ht,Wt;return dt.concat(St)});return new Fs(Ae,Ye)}}class Du{constructor(L,J){this.min=L,this.max=J,this.center=function(fe,de,Ae){return fe[0]=.5*de[0],fe[1]=.5*de[1],fe[2]=.5*de[2],fe}([],function(fe,de,Ae){return fe[0]=de[0]+Ae[0],fe[1]=de[1]+Ae[1],fe[2]=de[2]+Ae[2],fe}([],this.min,this.max))}quadrant(L){let J=[L%2==0,L<2],fe=M(this.min),de=M(this.max);for(let Ae=0;Ae=0&&Ye++;if(Ye===0)return 0;Ye!==J.length&&(fe=!1)}if(fe)return 2;for(let de=0;de<3;de++){let Ae=Number.MAX_VALUE,Ye=-Number.MAX_VALUE;for(let et=0;etthis.max[de]-this.min[de])return 0}return 1}}class Nl{constructor(L=0,J=0,fe=0,de=0){if(isNaN(L)||L<0||isNaN(J)||J<0||isNaN(fe)||fe<0||isNaN(de)||de<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=L,this.bottom=J,this.left=fe,this.right=de}interpolate(L,J,fe){return J.top!=null&&L.top!=null&&(this.top=e.y.number(L.top,J.top,fe)),J.bottom!=null&&L.bottom!=null&&(this.bottom=e.y.number(L.bottom,J.bottom,fe)),J.left!=null&&L.left!=null&&(this.left=e.y.number(L.left,J.left,fe)),J.right!=null&&L.right!=null&&(this.right=e.y.number(L.right,J.right,fe)),this}getCenter(L,J){let fe=e.ac((this.left+L-this.right)/2,0,L),de=e.ac((this.top+J-this.bottom)/2,0,J);return new e.P(fe,de)}equals(L){return this.top===L.top&&this.bottom===L.bottom&&this.left===L.left&&this.right===L.right}clone(){return new Nl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Hu=85.051129;class dc{constructor(L,J,fe,de,Ae){this.tileSize=512,this._renderWorldCopies=Ae===void 0||!!Ae,this._minZoom=L||0,this._maxZoom=J||22,this._minPitch=fe??0,this._maxPitch=de??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Nl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let L=new dc(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return L.apply(this),L}apply(L){this.tileSize=L.tileSize,this.latRange=L.latRange,this.lngRange=L.lngRange,this.width=L.width,this.height=L.height,this._center=L._center,this._elevation=L._elevation,this.minElevationForCurrentTile=L.minElevationForCurrentTile,this.zoom=L.zoom,this.angle=L.angle,this._fov=L._fov,this._pitch=L._pitch,this._unmodified=L._unmodified,this._edgeInsets=L._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(L){this._minZoom!==L&&(this._minZoom=L,this.zoom=Math.max(this.zoom,L))}get maxZoom(){return this._maxZoom}set maxZoom(L){this._maxZoom!==L&&(this._maxZoom=L,this.zoom=Math.min(this.zoom,L))}get minPitch(){return this._minPitch}set minPitch(L){this._minPitch!==L&&(this._minPitch=L,this.pitch=Math.max(this.pitch,L))}get maxPitch(){return this._maxPitch}set maxPitch(L){this._maxPitch!==L&&(this._maxPitch=L,this.pitch=Math.min(this.pitch,L))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(L){L===void 0?L=!0:L===null&&(L=!1),this._renderWorldCopies=L}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(L){let J=-e.b3(L,-180,180)*Math.PI/180;this.angle!==J&&(this._unmodified=!1,this.angle=J,this._calcMatrices(),this.rotationMatrix=function(){var fe=new e.A(4);return e.A!=Float32Array&&(fe[1]=0,fe[2]=0),fe[0]=1,fe[3]=1,fe}(),function(fe,de,Ae){var Ye=de[0],et=de[1],dt=de[2],St=de[3],Ht=Math.sin(Ae),Wt=Math.cos(Ae);fe[0]=Ye*Wt+dt*Ht,fe[1]=et*Wt+St*Ht,fe[2]=Ye*-Ht+dt*Wt,fe[3]=et*-Ht+St*Wt}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(L){let J=e.ac(L,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==J&&(this._unmodified=!1,this._pitch=J,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(L){L=Math.max(.01,Math.min(60,L)),this._fov!==L&&(this._unmodified=!1,this._fov=L/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(L){let J=Math.min(Math.max(L,this.minZoom),this.maxZoom);this._zoom!==J&&(this._unmodified=!1,this._zoom=J,this.tileZoom=Math.max(0,Math.floor(J)),this.scale=this.zoomScale(J),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(L){L.lat===this._center.lat&&L.lng===this._center.lng||(this._unmodified=!1,this._center=L,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(L){L!==this._elevation&&(this._elevation=L,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(L){this._edgeInsets.equals(L)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,L,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(L){return this._edgeInsets.equals(L)}interpolatePadding(L,J,fe){this._unmodified=!1,this._edgeInsets.interpolate(L,J,fe),this._constrain(),this._calcMatrices()}coveringZoomLevel(L){let J=(L.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/L.tileSize));return Math.max(0,J)}getVisibleUnwrappedCoordinates(L){let J=[new e.b4(0,L)];if(this._renderWorldCopies){let fe=this.pointCoordinate(new e.P(0,0)),de=this.pointCoordinate(new e.P(this.width,0)),Ae=this.pointCoordinate(new e.P(this.width,this.height)),Ye=this.pointCoordinate(new e.P(0,this.height)),et=Math.floor(Math.min(fe.x,de.x,Ae.x,Ye.x)),dt=Math.floor(Math.max(fe.x,de.x,Ae.x,Ye.x)),St=1;for(let Ht=et-St;Ht<=dt+St;Ht++)Ht!==0&&J.push(new e.b4(Ht,L))}return J}coveringTiles(L){var J,fe;let de=this.coveringZoomLevel(L),Ae=de;if(L.minzoom!==void 0&&deL.maxzoom&&(de=L.maxzoom);let Ye=this.pointCoordinate(this.getCameraPoint()),et=e.Z.fromLngLat(this.center),dt=Math.pow(2,de),St=[dt*Ye.x,dt*Ye.y,0],Ht=[dt*et.x,dt*et.y,0],Wt=Fs.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,de),fr=L.minzoom||0;!L.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(fr=de);let Ar=L.terrain?2/Math.min(this.tileSize,L.tileSize)*this.tileSize:3,Le=Qe=>({aabb:new Du([Qe*dt,0,0],[(Qe+1)*dt,dt,0]),zoom:0,x:0,y:0,wrap:Qe,fullyVisible:!1}),ze=[],je=[],Xe=de,st=L.reparseOverscaled?Ae:de;if(this._renderWorldCopies)for(let Qe=1;Qe<=3;Qe++)ze.push(Le(-Qe)),ze.push(Le(Qe));for(ze.push(Le(0));ze.length>0;){let Qe=ze.pop(),ht=Qe.x,Dt=Qe.y,Ot=Qe.fullyVisible;if(!Ot){let Wr=Qe.aabb.intersects(Wt);if(Wr===0)continue;Ot=Wr===2}let $t=L.terrain?St:Ht,ir=Qe.aabb.distanceX($t),pr=Qe.aabb.distanceY($t),zr=Math.max(Math.abs(ir),Math.abs(pr));if(Qe.zoom===Xe||zr>Ar+(1<=fr){let Wr=Xe-Qe.zoom,ia=St[0]-.5-(ht<>1),ln=Qe.zoom+1,an=Qe.aabb.quadrant(Wr);if(L.terrain){let wn=new e.S(ln,Qe.wrap,ln,ia,Sa),ei=L.terrain.getMinMaxElevation(wn),Mi=(J=ei.minElevation)!==null&&J!==void 0?J:this.elevation,pi=(fe=ei.maxElevation)!==null&&fe!==void 0?fe:this.elevation;an=new Du([an.min[0],an.min[1],Mi],[an.max[0],an.max[1],pi])}ze.push({aabb:an,zoom:ln,x:ia,y:Sa,wrap:Qe.wrap,fullyVisible:Ot})}}return je.sort((Qe,ht)=>Qe.distanceSq-ht.distanceSq).map(Qe=>Qe.tileID)}resize(L,J){this.width=L,this.height=J,this.pixelsToGLUnits=[2/L,-2/J],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(L){return Math.pow(2,L)}scaleZoom(L){return Math.log(L)/Math.LN2}project(L){let J=e.ac(L.lat,-85.051129,Hu);return new e.P(e.O(L.lng)*this.worldSize,e.Q(J)*this.worldSize)}unproject(L){return new e.Z(L.x/this.worldSize,L.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(L){let J=this.elevation,fe=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,de=this.pointLocation(this.centerPoint,L),Ae=L.getElevationForLngLatZoom(de,this.tileZoom);if(!(this.elevation-Ae))return;let Ye=fe+J-Ae,et=Math.cos(this._pitch)*this.cameraToCenterDistance/Ye/e.b5(1,de.lat),dt=this.scaleZoom(et/this.tileSize);this._elevation=Ae,this._center=de,this.zoom=dt}setLocationAtPoint(L,J){let fe=this.pointCoordinate(J),de=this.pointCoordinate(this.centerPoint),Ae=this.locationCoordinate(L),Ye=new e.Z(Ae.x-(fe.x-de.x),Ae.y-(fe.y-de.y));this.center=this.coordinateLocation(Ye),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(L,J){return J?this.coordinatePoint(this.locationCoordinate(L),J.getElevationForLngLatZoom(L,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(L))}pointLocation(L,J){return this.coordinateLocation(this.pointCoordinate(L,J))}locationCoordinate(L){return e.Z.fromLngLat(L)}coordinateLocation(L){return L&&L.toLngLat()}pointCoordinate(L,J){if(J){let fr=J.pointCoordinate(L);if(fr!=null)return fr}let fe=[L.x,L.y,0,1],de=[L.x,L.y,1,1];e.af(fe,fe,this.pixelMatrixInverse),e.af(de,de,this.pixelMatrixInverse);let Ae=fe[3],Ye=de[3],et=fe[1]/Ae,dt=de[1]/Ye,St=fe[2]/Ae,Ht=de[2]/Ye,Wt=St===Ht?0:(0-St)/(Ht-St);return new e.Z(e.y.number(fe[0]/Ae,de[0]/Ye,Wt)/this.worldSize,e.y.number(et,dt,Wt)/this.worldSize)}coordinatePoint(L,J=0,fe=this.pixelMatrix){let de=[L.x*this.worldSize,L.y*this.worldSize,J,1];return e.af(de,de,fe),new e.P(de[0]/de[3],de[1]/de[3])}getBounds(){let L=Math.max(0,this.height/2-this.getHorizon());return new re().extend(this.pointLocation(new e.P(0,L))).extend(this.pointLocation(new e.P(this.width,L))).extend(this.pointLocation(new e.P(this.width,this.height))).extend(this.pointLocation(new e.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new re([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(L){L?(this.lngRange=[L.getWest(),L.getEast()],this.latRange=[L.getSouth(),L.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Hu])}calculateTileMatrix(L){let J=L.canonical,fe=this.worldSize/this.zoomScale(J.z),de=J.x+Math.pow(2,J.z)*L.wrap,Ae=e.an(new Float64Array(16));return e.J(Ae,Ae,[de*fe,J.y*fe,0]),e.K(Ae,Ae,[fe/e.X,fe/e.X,1]),Ae}calculatePosMatrix(L,J=!1){let fe=L.key,de=J?this._alignedPosMatrixCache:this._posMatrixCache;if(de[fe])return de[fe];let Ae=this.calculateTileMatrix(L);return e.L(Ae,J?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Ae),de[fe]=new Float32Array(Ae),de[fe]}calculateFogMatrix(L){let J=L.key,fe=this._fogMatrixCache;if(fe[J])return fe[J];let de=this.calculateTileMatrix(L);return e.L(de,this.fogMatrix,de),fe[J]=new Float32Array(de),fe[J]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(L,J){J=e.ac(+J,this.minZoom,this.maxZoom);let fe={center:new e.N(L.lng,L.lat),zoom:J},de=this.lngRange;if(!this._renderWorldCopies&&de===null){let Qe=179.9999999999;de=[-Qe,Qe]}let Ae=this.tileSize*this.zoomScale(fe.zoom),Ye=0,et=Ae,dt=0,St=Ae,Ht=0,Wt=0,{x:fr,y:Ar}=this.size;if(this.latRange){let Qe=this.latRange;Ye=e.Q(Qe[1])*Ae,et=e.Q(Qe[0])*Ae,et-Yeet&&(Xe=et-Qe)}if(de){let Qe=(dt+St)/2,ht=Le;this._renderWorldCopies&&(ht=e.b3(Le,Qe-Ae/2,Qe+Ae/2));let Dt=fr/2;ht-DtSt&&(je=St-Dt)}if(je!==void 0||Xe!==void 0){let Qe=new e.P(je??Le,Xe??ze);fe.center=this.unproject.call({worldSize:Ae},Qe).wrap()}return fe}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let L=this._unmodified,{center:J,zoom:fe}=this.getConstrained(this.center,this.zoom);this.center=J,this.zoom=fe,this._unmodified=L,this._constraining=!1}_calcMatrices(){if(!this.height)return;let L=this.centerOffset,J=this.point.x,fe=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=e.b5(1,this.center.lat)*this.worldSize;let de=e.an(new Float64Array(16));e.K(de,de,[this.width/2,-this.height/2,1]),e.J(de,de,[1,-1,0]),this.labelPlaneMatrix=de,de=e.an(new Float64Array(16)),e.K(de,de,[1,-1,1]),e.J(de,de,[-1,-1,0]),e.K(de,de,[2/this.width,2/this.height,1]),this.glCoordMatrix=de;let Ae=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Ye=Math.min(this.elevation,this.minElevationForCurrentTile),et=Ae-Ye*this._pixelPerMeter/Math.cos(this._pitch),dt=Ye<0?et:Ae,St=Math.PI/2+this._pitch,Ht=this._fov*(.5+L.y/this.height),Wt=Math.sin(Ht)*dt/Math.sin(e.ac(Math.PI-St-Ht,.01,Math.PI-.01)),fr=this.getHorizon(),Ar=2*Math.atan(fr/this.cameraToCenterDistance)*(.5+L.y/(2*fr)),Le=Math.sin(Ar)*dt/Math.sin(e.ac(Math.PI-St-Ar,.01,Math.PI-.01)),ze=Math.min(Wt,Le);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ze+dt),this.nearZ=this.height/50,de=new Float64Array(16),e.b6(de,this._fov,this.width/this.height,this.nearZ,this.farZ),de[8]=2*-L.x/this.width,de[9]=2*L.y/this.height,this.projectionMatrix=e.ae(de),e.K(de,de,[1,-1,1]),e.J(de,de,[0,0,-this.cameraToCenterDistance]),e.b7(de,de,this._pitch),e.ad(de,de,this.angle),e.J(de,de,[-J,-fe,0]),this.mercatorMatrix=e.K([],de,[this.worldSize,this.worldSize,this.worldSize]),e.K(de,de,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.L(new Float64Array(16),this.labelPlaneMatrix,de),e.J(de,de,[0,0,-this.elevation]),this.modelViewProjectionMatrix=de,this.invModelViewProjectionMatrix=e.as([],de),this.fogMatrix=new Float64Array(16),e.b6(this.fogMatrix,this._fov,this.width/this.height,Ae,this.farZ),this.fogMatrix[8]=2*-L.x/this.width,this.fogMatrix[9]=2*L.y/this.height,e.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),e.b7(this.fogMatrix,this.fogMatrix,this._pitch),e.ad(this.fogMatrix,this.fogMatrix,this.angle),e.J(this.fogMatrix,this.fogMatrix,[-J,-fe,0]),e.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=e.L(new Float64Array(16),this.labelPlaneMatrix,de);let je=this.width%2/2,Xe=this.height%2/2,st=Math.cos(this.angle),Qe=Math.sin(this.angle),ht=J-Math.round(J)+st*je+Qe*Xe,Dt=fe-Math.round(fe)+st*Xe+Qe*je,Ot=new Float64Array(de);if(e.J(Ot,Ot,[ht>.5?ht-1:ht,Dt>.5?Dt-1:Dt,0]),this.alignedModelViewProjectionMatrix=Ot,de=e.as(new Float64Array(16),this.pixelMatrix),!de)throw new Error("failed to invert matrix");this.pixelMatrixInverse=de,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let L=this.pointCoordinate(new e.P(0,0)),J=[L.x*this.worldSize,L.y*this.worldSize,0,1];return e.af(J,J,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let L=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(0,L))}getCameraQueryGeometry(L){let J=this.getCameraPoint();if(L.length===1)return[L[0],J];{let fe=J.x,de=J.y,Ae=J.x,Ye=J.y;for(let et of L)fe=Math.min(fe,et.x),de=Math.min(de,et.y),Ae=Math.max(Ae,et.x),Ye=Math.max(Ye,et.y);return[new e.P(fe,de),new e.P(Ae,de),new e.P(Ae,Ye),new e.P(fe,Ye),new e.P(fe,de)]}}lngLatToCameraDepth(L,J){let fe=this.locationCoordinate(L),de=[fe.x*this.worldSize,fe.y*this.worldSize,J,1];return e.af(de,de,this.modelViewProjectionMatrix),de[2]/de[3]}}function Oc(Me,L){let J,fe=!1,de=null,Ae=null,Ye=()=>{de=null,fe&&(Me.apply(Ae,J),de=setTimeout(Ye,L),fe=!1)};return(...et)=>(fe=!0,Ae=this,J=et,de||Ye(),de)}class nf{constructor(L){this._getCurrentHash=()=>{let J=window.location.hash.replace("#","");if(this._hashName){let fe;return J.split("&").map(de=>de.split("=")).forEach(de=>{de[0]===this._hashName&&(fe=de)}),(fe&&fe[1]||"").split("/")}return J.split("/")},this._onHashChange=()=>{let J=this._getCurrentHash();if(J.length>=3&&!J.some(fe=>isNaN(fe))){let fe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(J[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+J[2],+J[1]],zoom:+J[0],bearing:fe,pitch:+(J[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let J=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,J)},this._removeHash=()=>{let J=this._getCurrentHash();if(J.length===0)return;let fe=J.join("/"),de=fe;de.split("&").length>0&&(de=de.split("&")[0]),this._hashName&&(de=`${this._hashName}=${fe}`);let Ae=window.location.hash.replace(de,"");Ae.startsWith("#&")?Ae=Ae.slice(0,1)+Ae.slice(2):Ae==="#"&&(Ae="");let Ye=window.location.href.replace(/(#.+)?$/,Ae);Ye=Ye.replace("&&","&"),window.history.replaceState(window.history.state,null,Ye)},this._updateHash=Oc(this._updateHashUnthrottled,300),this._hashName=L&&encodeURIComponent(L)}addTo(L){return this._map=L,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(L){let J=this._map.getCenter(),fe=Math.round(100*this._map.getZoom())/100,de=Math.ceil((fe*Math.LN2+Math.log(512/360/.5))/Math.LN10),Ae=Math.pow(10,de),Ye=Math.round(J.lng*Ae)/Ae,et=Math.round(J.lat*Ae)/Ae,dt=this._map.getBearing(),St=this._map.getPitch(),Ht="";if(Ht+=L?`/${Ye}/${et}/${fe}`:`${fe}/${et}/${Ye}`,(dt||St)&&(Ht+="/"+Math.round(10*dt)/10),St&&(Ht+=`/${Math.round(St)}`),this._hashName){let Wt=this._hashName,fr=!1,Ar=window.location.hash.slice(1).split("&").map(Le=>{let ze=Le.split("=")[0];return ze===Wt?(fr=!0,`${ze}=${Ht}`):Le}).filter(Le=>Le);return fr||Ar.push(`${Wt}=${Ht}`),`#${Ar.join("&")}`}return`#${Ht}`}}let gu={linearity:.3,easing:e.b8(0,0,.3,1)},Ru=e.e({deceleration:2500,maxSpeed:1400},gu),Mu=e.e({deceleration:20,maxSpeed:1400},gu),Xf=e.e({deceleration:1e3,maxSpeed:360},gu),vc=e.e({deceleration:1e3,maxSpeed:90},gu);class kf{constructor(L){this._map=L,this.clear()}clear(){this._inertiaBuffer=[]}record(L){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:n.now(),settings:L})}_drainInertiaBuffer(){let L=this._inertiaBuffer,J=n.now();for(;L.length>0&&J-L[0].time>160;)L.shift()}_onMoveEnd(L){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let J={zoom:0,bearing:0,pitch:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:Ae}of this._inertiaBuffer)J.zoom+=Ae.zoomDelta||0,J.bearing+=Ae.bearingDelta||0,J.pitch+=Ae.pitchDelta||0,Ae.panDelta&&J.pan._add(Ae.panDelta),Ae.around&&(J.around=Ae.around),Ae.pinchAround&&(J.pinchAround=Ae.pinchAround);let fe=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,de={};if(J.pan.mag()){let Ae=tc(J.pan.mag(),fe,e.e({},Ru,L||{}));de.offset=J.pan.mult(Ae.amount/J.pan.mag()),de.center=this._map.transform.center,Yl(de,Ae)}if(J.zoom){let Ae=tc(J.zoom,fe,Mu);de.zoom=this._map.transform.zoom+Ae.amount,Yl(de,Ae)}if(J.bearing){let Ae=tc(J.bearing,fe,Xf);de.bearing=this._map.transform.bearing+e.ac(Ae.amount,-179,179),Yl(de,Ae)}if(J.pitch){let Ae=tc(J.pitch,fe,vc);de.pitch=this._map.transform.pitch+Ae.amount,Yl(de,Ae)}if(de.zoom||de.bearing){let Ae=J.pinchAround===void 0?J.around:J.pinchAround;de.around=Ae?this._map.unproject(Ae):this._map.getCenter()}return this.clear(),e.e(de,{noMoveStart:!0})}}function Yl(Me,L){(!Me.duration||Me.durationJ.unproject(dt)),et=Ae.reduce((dt,St,Ht,Wt)=>dt.add(St.div(Wt.length)),new e.P(0,0));super(L,{points:Ae,point:et,lngLats:Ye,lngLat:J.unproject(et),originalEvent:fe}),this._defaultPrevented=!1}}class Nf extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(L,J,fe){super(L,{originalEvent:fe}),this._defaultPrevented=!1}}class Uc{constructor(L,J){this._map=L,this._clickTolerance=J.clickTolerance}reset(){delete this._mousedownPos}wheel(L){return this._firePreventable(new Nf(L.type,this._map,L))}mousedown(L,J){return this._mousedownPos=J,this._firePreventable(new rl(L.type,this._map,L))}mouseup(L){this._map.fire(new rl(L.type,this._map,L))}click(L,J){this._mousedownPos&&this._mousedownPos.dist(J)>=this._clickTolerance||this._map.fire(new rl(L.type,this._map,L))}dblclick(L){return this._firePreventable(new rl(L.type,this._map,L))}mouseover(L){this._map.fire(new rl(L.type,this._map,L))}mouseout(L){this._map.fire(new rl(L.type,this._map,L))}touchstart(L){return this._firePreventable(new Gu(L.type,this._map,L))}touchmove(L){this._map.fire(new Gu(L.type,this._map,L))}touchend(L){this._map.fire(new Gu(L.type,this._map,L))}touchcancel(L){this._map.fire(new Gu(L.type,this._map,L))}_firePreventable(L){if(this._map.fire(L),L.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ws{constructor(L){this._map=L}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(L){this._map.fire(new rl(L.type,this._map,L))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new rl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(L){this._delayContextMenu?this._contextMenuEvent=L:this._ignoreContextMenu||this._map.fire(new rl(L.type,this._map,L)),this._map.listens("contextmenu")&&L.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Pl{constructor(L){this._map=L}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(L){return this.transform.pointLocation(e.P.convert(L),this._map.terrain)}}class Ol{constructor(L,J){this._map=L,this._tr=new Pl(L),this._el=L.getCanvasContainer(),this._container=L.getContainer(),this._clickTolerance=J.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(L,J){this.isEnabled()&&L.shiftKey&&L.button===0&&(i.disableDrag(),this._startPos=this._lastPos=J,this._active=!0)}mousemoveWindow(L,J){if(!this._active)return;let fe=J;if(this._lastPos.equals(fe)||!this._box&&fe.dist(this._startPos)Ae.fitScreenCoordinates(fe,de,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",L)}keydown(L){this._active&&L.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",L))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(L,J){return this._map.fire(new e.k(L,{originalEvent:J}))}}function jc(Me,L){if(Me.length!==L.length)throw new Error(`The number of touches and points are not equal - touches ${Me.length}, points ${L.length}`);let J={};for(let fe=0;fethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=L.timeStamp),fe.length===this.numTouches&&(this.centroid=function(de){let Ae=new e.P(0,0);for(let Ye of de)Ae._add(Ye);return Ae.div(de.length)}(J),this.touches=jc(fe,J)))}touchmove(L,J,fe){if(this.aborted||!this.centroid)return;let de=jc(fe,J);for(let Ae in this.touches){let Ye=de[Ae];(!Ye||Ye.dist(this.touches[Ae])>30)&&(this.aborted=!0)}}touchend(L,J,fe){if((!this.centroid||L.timeStamp-this.startTime>500)&&(this.aborted=!0),fe.length===0){let de=!this.aborted&&this.centroid;if(this.reset(),de)return de}}}class rc{constructor(L){this.singleTap=new qc(L),this.numTaps=L.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(L,J,fe){this.singleTap.touchstart(L,J,fe)}touchmove(L,J,fe){this.singleTap.touchmove(L,J,fe)}touchend(L,J,fe){let de=this.singleTap.touchend(L,J,fe);if(de){let Ae=L.timeStamp-this.lastTime<500,Ye=!this.lastTap||this.lastTap.dist(de)<30;if(Ae&&Ye||this.reset(),this.count++,this.lastTime=L.timeStamp,this.lastTap=de,this.count===this.numTaps)return this.reset(),de}}}class ac{constructor(L){this._tr=new Pl(L),this._zoomIn=new rc({numTouches:1,numTaps:2}),this._zoomOut=new rc({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(L,J,fe){this._zoomIn.touchstart(L,J,fe),this._zoomOut.touchstart(L,J,fe)}touchmove(L,J,fe){this._zoomIn.touchmove(L,J,fe),this._zoomOut.touchmove(L,J,fe)}touchend(L,J,fe){let de=this._zoomIn.touchend(L,J,fe),Ae=this._zoomOut.touchend(L,J,fe),Ye=this._tr;return de?(this._active=!0,L.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:et=>et.easeTo({duration:300,zoom:Ye.zoom+1,around:Ye.unproject(de)},{originalEvent:L})}):Ae?(this._active=!0,L.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:et=>et.easeTo({duration:300,zoom:Ye.zoom-1,around:Ye.unproject(Ae)},{originalEvent:L})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nu{constructor(L){this._enabled=!!L.enable,this._moveStateManager=L.moveStateManager,this._clickTolerance=L.clickTolerance||1,this._moveFunction=L.move,this._activateOnStart=!!L.activateOnStart,L.assignEvents(this),this.reset()}reset(L){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(L)}_move(...L){let J=this._moveFunction(...L);if(J.bearingDelta||J.pitchDelta||J.around||J.panDelta)return this._active=!0,J}dragStart(L,J){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(L)&&(this._moveStateManager.startMove(L),this._lastPoint=J.length?J[0]:J,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(L,J){if(!this.isEnabled())return;let fe=this._lastPoint;if(!fe)return;if(L.preventDefault(),!this._moveStateManager.isValidMoveEvent(L))return void this.reset(L);let de=J.length?J[0]:J;return!this._moved&&de.dist(fe){Me.mousedown=Me.dragStart,Me.mousemoveWindow=Me.dragMove,Me.mouseup=Me.dragEnd,Me.contextmenu=L=>{L.preventDefault()}},of=({enable:Me,clickTolerance:L,bearingDegreesPerPixelMoved:J=.8})=>{let fe=new Wu({checkCorrectEvent:de=>i.mouseButton(de)===0&&de.ctrlKey||i.mouseButton(de)===2});return new nu({clickTolerance:L,move:(de,Ae)=>({bearingDelta:(Ae.x-de.x)*J}),moveStateManager:fe,enable:Me,assignEvents:Hc})},Cf=({enable:Me,clickTolerance:L,pitchDegreesPerPixelMoved:J=-.5})=>{let fe=new Wu({checkCorrectEvent:de=>i.mouseButton(de)===0&&de.ctrlKey||i.mouseButton(de)===2});return new nu({clickTolerance:L,move:(de,Ae)=>({pitchDelta:(Ae.y-de.y)*J}),moveStateManager:fe,enable:Me,assignEvents:Hc})};class Mc{constructor(L,J){this._clickTolerance=L.clickTolerance||1,this._map=J,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(L){return L<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(L,J,fe){return this._calculateTransform(L,J,fe)}touchmove(L,J,fe){if(this._active){if(!this._shouldBePrevented(fe.length))return L.preventDefault(),this._calculateTransform(L,J,fe);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",L)}}touchend(L,J,fe){this._calculateTransform(L,J,fe),this._active&&this._shouldBePrevented(fe.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(L,J,fe){fe.length>0&&(this._active=!0);let de=jc(fe,J),Ae=new e.P(0,0),Ye=new e.P(0,0),et=0;for(let St in de){let Ht=de[St],Wt=this._touches[St];Wt&&(Ae._add(Ht),Ye._add(Ht.sub(Wt)),et++,de[St]=Ht)}if(this._touches=de,this._shouldBePrevented(et)||!Ye.mag())return;let dt=Ye.div(et);return this._sum._add(dt),this._sum.mag()Math.abs(Me.x)}class Fu extends sf{constructor(L){super(),this._currentTouchCount=0,this._map=L}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(L,J,fe){super.touchstart(L,J,fe),this._currentTouchCount=fe.length}_start(L){this._lastPoints=L,Ec(L[0].sub(L[1]))&&(this._valid=!1)}_move(L,J,fe){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let de=L[0].sub(this._lastPoints[0]),Ae=L[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(de,Ae,fe.timeStamp),this._valid?(this._lastPoints=L,this._active=!0,{pitchDelta:(de.y+Ae.y)/2*-.5}):void 0}gestureBeginsVertically(L,J,fe){if(this._valid!==void 0)return this._valid;let de=L.mag()>=2,Ae=J.mag()>=2;if(!de&&!Ae)return;if(!de||!Ae)return this._firstMove===void 0&&(this._firstMove=fe),fe-this._firstMove<100&&void 0;let Ye=L.y>0==J.y>0;return Ec(L)&&Ec(J)&&Ye}}let Mt={panStep:100,bearingStep:15,pitchStep:10};class jt{constructor(L){this._tr=new Pl(L);let J=Mt;this._panStep=J.panStep,this._bearingStep=J.bearingStep,this._pitchStep=J.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(L){if(L.altKey||L.ctrlKey||L.metaKey)return;let J=0,fe=0,de=0,Ae=0,Ye=0;switch(L.keyCode){case 61:case 107:case 171:case 187:J=1;break;case 189:case 109:case 173:J=-1;break;case 37:L.shiftKey?fe=-1:(L.preventDefault(),Ae=-1);break;case 39:L.shiftKey?fe=1:(L.preventDefault(),Ae=1);break;case 38:L.shiftKey?de=1:(L.preventDefault(),Ye=-1);break;case 40:L.shiftKey?de=-1:(L.preventDefault(),Ye=1);break;default:return}return this._rotationDisabled&&(fe=0,de=0),{cameraAnimation:et=>{let dt=this._tr;et.easeTo({duration:300,easeId:"keyboardHandler",easing:_r,zoom:J?Math.round(dt.zoom)+J*(L.shiftKey?2:1):dt.zoom,bearing:dt.bearing+fe*this._bearingStep,pitch:dt.pitch+de*this._pitchStep,offset:[-Ae*this._panStep,-Ye*this._panStep],center:dt.center},{originalEvent:L})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function _r(Me){return Me*(2-Me)}let dr=4.000244140625;class ea{constructor(L,J){this._onTimeout=fe=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(fe)},this._map=L,this._tr=new Pl(L),this._triggerRenderFrame=J,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(L){this._defaultZoomRate=L}setWheelZoomRate(L){this._wheelZoomRate=L}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(L){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!L&&L.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(L){return!!this._map.cooperativeGestures.isEnabled()&&!(L.ctrlKey||this._map.cooperativeGestures.isBypassed(L))}wheel(L){if(!this.isEnabled())return;if(this._shouldBePrevented(L))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",L);let J=L.deltaMode===WheelEvent.DOM_DELTA_LINE?40*L.deltaY:L.deltaY,fe=n.now(),de=fe-(this._lastWheelEventTime||0);this._lastWheelEventTime=fe,J!==0&&J%dr==0?this._type="wheel":J!==0&&Math.abs(J)<4?this._type="trackpad":de>400?(this._type=null,this._lastValue=J,this._timeout=setTimeout(this._onTimeout,40,L)):this._type||(this._type=Math.abs(de*J)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,J+=this._lastValue)),L.shiftKey&&J&&(J/=4),this._type&&(this._lastWheelEvent=L,this._delta-=J,this._active||this._start(L)),L.preventDefault()}_start(L){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let J=i.mousePos(this._map.getCanvas(),L),fe=this._tr;this._around=J.y>fe.transform.height/2-fe.transform.getHorizon()?e.N.convert(this._aroundCenter?fe.center:fe.unproject(J)):e.N.convert(fe.center),this._aroundPoint=fe.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let L=this._tr.transform;if(this._delta!==0){let dt=this._type==="wheel"&&Math.abs(this._delta)>dr?this._wheelZoomRate:this._defaultZoomRate,St=2/(1+Math.exp(-Math.abs(this._delta*dt)));this._delta<0&&St!==0&&(St=1/St);let Ht=typeof this._targetZoom=="number"?L.zoomScale(this._targetZoom):L.scale;this._targetZoom=Math.min(L.maxZoom,Math.max(L.minZoom,L.scaleZoom(Ht*St))),this._type==="wheel"&&(this._startZoom=L.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let J=typeof this._targetZoom=="number"?this._targetZoom:L.zoom,fe=this._startZoom,de=this._easing,Ae,Ye=!1,et=n.now()-this._lastWheelEventTime;if(this._type==="wheel"&&fe&&de&&et){let dt=Math.min(et/200,1),St=de(dt);Ae=e.y.number(fe,J,St),dt<1?this._frameId||(this._frameId=!0):Ye=!0}else Ae=J,Ye=!0;return this._active=!0,Ye&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Ye,zoomDelta:Ae-L.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(L){let J=e.b9;if(this._prevEase){let fe=this._prevEase,de=(n.now()-fe.start)/fe.duration,Ae=fe.easing(de+.01)-fe.easing(de),Ye=.27/Math.sqrt(Ae*Ae+1e-4)*.01,et=Math.sqrt(.0729-Ye*Ye);J=e.b8(Ye,et,.25,1)}return this._prevEase={start:n.now(),duration:L,easing:J},J}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Aa{constructor(L,J){this._clickZoom=L,this._tapZoom=J}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class Ga{constructor(L){this._tr=new Pl(L),this.reset()}reset(){this._active=!1}dblclick(L,J){return L.preventDefault(),{cameraAnimation:fe=>{fe.easeTo({duration:300,zoom:this._tr.zoom+(L.shiftKey?-1:1),around:this._tr.unproject(J)},{originalEvent:L})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class fn{constructor(){this._tap=new rc({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(L,J,fe){if(!this._swipePoint)if(this._tapTime){let de=J[0],Ae=L.timeStamp-this._tapTime<500,Ye=this._tapPoint.dist(de)<30;Ae&&Ye?fe.length>0&&(this._swipePoint=de,this._swipeTouch=fe[0].identifier):this.reset()}else this._tap.touchstart(L,J,fe)}touchmove(L,J,fe){if(this._tapTime){if(this._swipePoint){if(fe[0].identifier!==this._swipeTouch)return;let de=J[0],Ae=de.y-this._swipePoint.y;return this._swipePoint=de,L.preventDefault(),this._active=!0,{zoomDelta:Ae/128}}}else this._tap.touchmove(L,J,fe)}touchend(L,J,fe){if(this._tapTime)this._swipePoint&&fe.length===0&&this.reset();else{let de=this._tap.touchend(L,J,fe);de&&(this._tapTime=L.timeStamp,this._tapPoint=de)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class gn{constructor(L,J,fe){this._el=L,this._mousePan=J,this._touchPan=fe}enable(L){this._inertiaOptions=L||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class qn{constructor(L,J,fe){this._pitchWithRotate=L.pitchWithRotate,this._mouseRotate=J,this._mousePitch=fe}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Wa{constructor(L,J,fe,de){this._el=L,this._touchZoom=J,this._touchRotate=fe,this._tapDragZoom=de,this._rotationDisabled=!1,this._enabled=!0}enable(L){this._touchZoom.enable(L),this._rotationDisabled||this._touchRotate.enable(L),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class $a{constructor(L,J){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=L,this._options=J,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let L=this._map.getCanvasContainer();L.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",L);let J=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(J=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let fe=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),de=document.createElement("div");de.className="maplibregl-desktop-message",de.textContent=J,this._container.appendChild(de);let Ae=document.createElement("div");Ae.className="maplibregl-mobile-message",Ae.textContent=fe,this._container.appendChild(Ae),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(L){return L[this._bypassKey]}notifyGestureBlocked(L,J){this._enabled&&(this._map.fire(new e.k("cooperativegestureprevented",{gestureType:L,originalEvent:J})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let sn=Me=>Me.zoom||Me.drag||Me.pitch||Me.rotate;class Pa extends e.k{}function Qn(Me){return Me.panDelta&&Me.panDelta.mag()||Me.zoomDelta||Me.bearingDelta||Me.pitchDelta}class Ei{constructor(L,J){this.handleWindowEvent=de=>{this.handleEvent(de,`${de.type}Window`)},this.handleEvent=(de,Ae)=>{if(de.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Ye=de.type==="renderFrame"?void 0:de,et={needsRenderFrame:!1},dt={},St={},Ht=de.touches,Wt=Ht?this._getMapTouches(Ht):void 0,fr=Wt?i.touchPos(this._map.getCanvas(),Wt):i.mousePos(this._map.getCanvas(),de);for(let{handlerName:ze,handler:je,allowed:Xe}of this._handlers){if(!je.isEnabled())continue;let st;this._blockedByActive(St,Xe,ze)?je.reset():je[Ae||de.type]&&(st=je[Ae||de.type](de,fr,Wt),this.mergeHandlerResult(et,dt,st,ze,Ye),st&&st.needsRenderFrame&&this._triggerRenderFrame()),(st||je.isActive())&&(St[ze]=je)}let Ar={};for(let ze in this._previousActiveHandlers)St[ze]||(Ar[ze]=Ye);this._previousActiveHandlers=St,(Object.keys(Ar).length||Qn(et))&&(this._changes.push([et,dt,Ar]),this._triggerRenderFrame()),(Object.keys(St).length||Qn(et))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Le}=et;Le&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Le(this._map))},this._map=L,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new kf(L),this._bearingSnap=J.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(J);let fe=this._el;this._listeners=[[fe,"touchstart",{passive:!0}],[fe,"touchmove",{passive:!1}],[fe,"touchend",void 0],[fe,"touchcancel",void 0],[fe,"mousedown",void 0],[fe,"mousemove",void 0],[fe,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[fe,"mouseover",void 0],[fe,"mouseout",void 0],[fe,"dblclick",void 0],[fe,"click",void 0],[fe,"keydown",{capture:!1}],[fe,"keyup",void 0],[fe,"wheel",{passive:!1}],[fe,"contextmenu",void 0],[window,"blur",void 0]];for(let[de,Ae,Ye]of this._listeners)i.addEventListener(de,Ae,de===document?this.handleWindowEvent:this.handleEvent,Ye)}destroy(){for(let[L,J,fe]of this._listeners)i.removeEventListener(L,J,L===document?this.handleWindowEvent:this.handleEvent,fe)}_addDefaultHandlers(L){let J=this._map,fe=J.getCanvasContainer();this._add("mapEvent",new Uc(J,L));let de=J.boxZoom=new Ol(J,L);this._add("boxZoom",de),L.interactive&&L.boxZoom&&de.enable();let Ae=J.cooperativeGestures=new $a(J,L.cooperativeGestures);this._add("cooperativeGestures",Ae),L.cooperativeGestures&&Ae.enable();let Ye=new ac(J),et=new Ga(J);J.doubleClickZoom=new Aa(et,Ye),this._add("tapZoom",Ye),this._add("clickZoom",et),L.interactive&&L.doubleClickZoom&&J.doubleClickZoom.enable();let dt=new fn;this._add("tapDragZoom",dt);let St=J.touchPitch=new Fu(J);this._add("touchPitch",St),L.interactive&&L.touchPitch&&J.touchPitch.enable(L.touchPitch);let Ht=of(L),Wt=Cf(L);J.dragRotate=new qn(L,Ht,Wt),this._add("mouseRotate",Ht,["mousePitch"]),this._add("mousePitch",Wt,["mouseRotate"]),L.interactive&&L.dragRotate&&J.dragRotate.enable();let fr=(({enable:st,clickTolerance:Qe})=>{let ht=new Wu({checkCorrectEvent:Dt=>i.mouseButton(Dt)===0&&!Dt.ctrlKey});return new nu({clickTolerance:Qe,move:(Dt,Ot)=>({around:Ot,panDelta:Ot.sub(Dt)}),activateOnStart:!0,moveStateManager:ht,enable:st,assignEvents:Hc})})(L),Ar=new Mc(L,J);J.dragPan=new gn(fe,fr,Ar),this._add("mousePan",fr),this._add("touchPan",Ar,["touchZoom","touchRotate"]),L.interactive&&L.dragPan&&J.dragPan.enable(L.dragPan);let Le=new Lf,ze=new Su;J.touchZoomRotate=new Wa(fe,ze,Le,dt),this._add("touchRotate",Le,["touchPan","touchZoom"]),this._add("touchZoom",ze,["touchPan","touchRotate"]),L.interactive&&L.touchZoomRotate&&J.touchZoomRotate.enable(L.touchZoomRotate);let je=J.scrollZoom=new ea(J,()=>this._triggerRenderFrame());this._add("scrollZoom",je,["mousePan"]),L.interactive&&L.scrollZoom&&J.scrollZoom.enable(L.scrollZoom);let Xe=J.keyboard=new jt(J);this._add("keyboard",Xe),L.interactive&&L.keyboard&&J.keyboard.enable(),this._add("blockableMapEvent",new ws(J))}_add(L,J,fe){this._handlers.push({handlerName:L,handler:J,allowed:fe}),this._handlersById[L]=J}stop(L){if(!this._updatingCamera){for(let{handler:J}of this._handlers)J.reset();this._inertia.clear(),this._fireEvents({},{},L),this._changes=[]}}isActive(){for(let{handler:L}of this._handlers)if(L.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!sn(this._eventsInProgress)||this.isZooming()}_blockedByActive(L,J,fe){for(let de in L)if(de!==fe&&(!J||J.indexOf(de)<0))return!0;return!1}_getMapTouches(L){let J=[];for(let fe of L)this._el.contains(fe.target)&&J.push(fe);return J}mergeHandlerResult(L,J,fe,de,Ae){if(!fe)return;e.e(L,fe);let Ye={handlerName:de,originalEvent:fe.originalEvent||Ae};fe.zoomDelta!==void 0&&(J.zoom=Ye),fe.panDelta!==void 0&&(J.drag=Ye),fe.pitchDelta!==void 0&&(J.pitch=Ye),fe.bearingDelta!==void 0&&(J.rotate=Ye)}_applyChanges(){let L={},J={},fe={};for(let[de,Ae,Ye]of this._changes)de.panDelta&&(L.panDelta=(L.panDelta||new e.P(0,0))._add(de.panDelta)),de.zoomDelta&&(L.zoomDelta=(L.zoomDelta||0)+de.zoomDelta),de.bearingDelta&&(L.bearingDelta=(L.bearingDelta||0)+de.bearingDelta),de.pitchDelta&&(L.pitchDelta=(L.pitchDelta||0)+de.pitchDelta),de.around!==void 0&&(L.around=de.around),de.pinchAround!==void 0&&(L.pinchAround=de.pinchAround),de.noInertia&&(L.noInertia=de.noInertia),e.e(J,Ae),e.e(fe,Ye);this._updateMapTransform(L,J,fe),this._changes=[]}_updateMapTransform(L,J,fe){let de=this._map,Ae=de._getTransformForUpdate(),Ye=de.terrain;if(!(Qn(L)||Ye&&this._terrainMovement))return this._fireEvents(J,fe,!0);let{panDelta:et,zoomDelta:dt,bearingDelta:St,pitchDelta:Ht,around:Wt,pinchAround:fr}=L;fr!==void 0&&(Wt=fr),de._stop(!0),Wt=Wt||de.transform.centerPoint;let Ar=Ae.pointLocation(et?Wt.sub(et):Wt);St&&(Ae.bearing+=St),Ht&&(Ae.pitch+=Ht),dt&&(Ae.zoom+=dt),Ye?this._terrainMovement||!J.drag&&!J.zoom?J.drag&&this._terrainMovement?Ae.center=Ae.pointLocation(Ae.centerPoint.sub(et)):Ae.setLocationAtPoint(Ar,Wt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Ae.setLocationAtPoint(Ar,Wt)):Ae.setLocationAtPoint(Ar,Wt),de._applyUpdatedTransform(Ae),this._map._update(),L.noInertia||this._inertia.record(L),this._fireEvents(J,fe,!0)}_fireEvents(L,J,fe){let de=sn(this._eventsInProgress),Ae=sn(L),Ye={};for(let Wt in L){let{originalEvent:fr}=L[Wt];this._eventsInProgress[Wt]||(Ye[`${Wt}start`]=fr),this._eventsInProgress[Wt]=L[Wt]}!de&&Ae&&this._fireEvent("movestart",Ae.originalEvent);for(let Wt in Ye)this._fireEvent(Wt,Ye[Wt]);Ae&&this._fireEvent("move",Ae.originalEvent);for(let Wt in L){let{originalEvent:fr}=L[Wt];this._fireEvent(Wt,fr)}let et={},dt;for(let Wt in this._eventsInProgress){let{handlerName:fr,originalEvent:Ar}=this._eventsInProgress[Wt];this._handlersById[fr].isActive()||(delete this._eventsInProgress[Wt],dt=J[fr]||Ar,et[`${Wt}end`]=dt)}for(let Wt in et)this._fireEvent(Wt,et[Wt]);let St=sn(this._eventsInProgress),Ht=(de||Ae)&&!St;if(Ht&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Wt=this._map._getTransformForUpdate();Wt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Wt)}if(fe&&Ht){this._updatingCamera=!0;let Wt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),fr=Ar=>Ar!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Pa("renderFrame",{timeStamp:L})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Ii extends e.E{constructor(L,J){super(),this._renderFrameCallback=()=>{let fe=Math.min((n.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(fe)),fe<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=L,this._bearingSnap=J.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new e.N(this.transform.center.lng,this.transform.center.lat)}setCenter(L,J){return this.jumpTo({center:L},J)}panBy(L,J,fe){return L=e.P.convert(L).mult(-1),this.panTo(this.transform.center,e.e({offset:L},J),fe)}panTo(L,J,fe){return this.easeTo(e.e({center:L},J),fe)}getZoom(){return this.transform.zoom}setZoom(L,J){return this.jumpTo({zoom:L},J),this}zoomTo(L,J,fe){return this.easeTo(e.e({zoom:L},J),fe)}zoomIn(L,J){return this.zoomTo(this.getZoom()+1,L,J),this}zoomOut(L,J){return this.zoomTo(this.getZoom()-1,L,J),this}getBearing(){return this.transform.bearing}setBearing(L,J){return this.jumpTo({bearing:L},J),this}getPadding(){return this.transform.padding}setPadding(L,J){return this.jumpTo({padding:L},J),this}rotateTo(L,J,fe){return this.easeTo(e.e({bearing:L},J),fe)}resetNorth(L,J){return this.rotateTo(0,e.e({duration:1e3},L),J),this}resetNorthPitch(L,J){return this.easeTo(e.e({bearing:0,pitch:0,duration:1e3},L),J),this}snapToNorth(L,J){return Math.abs(this.getBearing()){if(this._zooming&&(de.zoom=e.y.number(Ae,je,$t)),this._rotating&&(de.bearing=e.y.number(Ye,St,$t)),this._pitching&&(de.pitch=e.y.number(et,Ht,$t)),this._padding&&(de.interpolatePadding(dt,Wt,$t),Ar=de.centerPoint.add(fr)),this.terrain&&!L.freezeElevation&&this._updateElevation($t),ht)de.setLocationAtPoint(ht,Dt);else{let ir=de.zoomScale(de.zoom-Ae),pr=je>Ae?Math.min(2,Qe):Math.max(.5,Qe),zr=Math.pow(pr,1-$t),Wr=de.unproject(Xe.add(st.mult($t*zr)).mult(ir));de.setLocationAtPoint(de.renderWorldCopies?Wr.wrap():Wr,Ar)}this._applyUpdatedTransform(de),this._fireMoveEvents(J)},$t=>{this.terrain&&L.freezeElevation&&this._finalizeElevation(),this._afterEase(J,$t)},L),this}_prepareEase(L,J,fe={}){this._moving=!0,J||fe.moving||this.fire(new e.k("movestart",L)),this._zooming&&!fe.zooming&&this.fire(new e.k("zoomstart",L)),this._rotating&&!fe.rotating&&this.fire(new e.k("rotatestart",L)),this._pitching&&!fe.pitching&&this.fire(new e.k("pitchstart",L))}_prepareElevation(L){this._elevationCenter=L,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(L,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(L){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let J=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(L<1&&J!==this._elevationTarget){let fe=this._elevationTarget-this._elevationStart;this._elevationStart+=L*(fe-(J-(fe*L+this._elevationStart))/(1-L)),this._elevationTarget=J}this.transform.elevation=e.y.number(this._elevationStart,this._elevationTarget,L)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(L){let J=L.getCameraPosition(),fe=this.terrain.getElevationForLngLatZoom(J.lngLat,L.zoom);if(J.altitudethis._elevateCameraIfInsideTerrain(de)),this.transformCameraUpdate&&J.push(de=>this.transformCameraUpdate(de)),!J.length)return;let fe=L.clone();for(let de of J){let Ae=fe.clone(),{center:Ye,zoom:et,pitch:dt,bearing:St,elevation:Ht}=de(Ae);Ye&&(Ae.center=Ye),et!==void 0&&(Ae.zoom=et),dt!==void 0&&(Ae.pitch=dt),St!==void 0&&(Ae.bearing=St),Ht!==void 0&&(Ae.elevation=Ht),fe.apply(Ae)}this.transform.apply(fe)}_fireMoveEvents(L){this.fire(new e.k("move",L)),this._zooming&&this.fire(new e.k("zoom",L)),this._rotating&&this.fire(new e.k("rotate",L)),this._pitching&&this.fire(new e.k("pitch",L))}_afterEase(L,J){if(this._easeId&&J&&this._easeId===J)return;delete this._easeId;let fe=this._zooming,de=this._rotating,Ae=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,fe&&this.fire(new e.k("zoomend",L)),de&&this.fire(new e.k("rotateend",L)),Ae&&this.fire(new e.k("pitchend",L)),this.fire(new e.k("moveend",L))}flyTo(L,J){var fe;if(!L.essential&&n.prefersReducedMotion){let wn=e.M(L,["center","zoom","bearing","pitch","around"]);return this.jumpTo(wn,J)}this.stop(),L=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.b9},L);let de=this._getTransformForUpdate(),Ae=de.zoom,Ye=de.bearing,et=de.pitch,dt=de.padding,St="bearing"in L?this._normalizeBearing(L.bearing,Ye):Ye,Ht="pitch"in L?+L.pitch:et,Wt="padding"in L?L.padding:de.padding,fr=e.P.convert(L.offset),Ar=de.centerPoint.add(fr),Le=de.pointLocation(Ar),{center:ze,zoom:je}=de.getConstrained(e.N.convert(L.center||Le),(fe=L.zoom)!==null&&fe!==void 0?fe:Ae);this._normalizeCenter(ze,de);let Xe=de.zoomScale(je-Ae),st=de.project(Le),Qe=de.project(ze).sub(st),ht=L.curve,Dt=Math.max(de.width,de.height),Ot=Dt/Xe,$t=Qe.mag();if("minZoom"in L){let wn=e.ac(Math.min(L.minZoom,Ae,je),de.minZoom,de.maxZoom),ei=Dt/de.zoomScale(wn-Ae);ht=Math.sqrt(ei/$t*2)}let ir=ht*ht;function pr(wn){let ei=(Ot*Ot-Dt*Dt+(wn?-1:1)*ir*ir*$t*$t)/(2*(wn?Ot:Dt)*ir*$t);return Math.log(Math.sqrt(ei*ei+1)-ei)}function zr(wn){return(Math.exp(wn)-Math.exp(-wn))/2}function Wr(wn){return(Math.exp(wn)+Math.exp(-wn))/2}let ia=pr(!1),Sa=function(wn){return Wr(ia)/Wr(ia+ht*wn)},ln=function(wn){return Dt*((Wr(ia)*(zr(ei=ia+ht*wn)/Wr(ei))-zr(ia))/ir)/$t;var ei},an=(pr(!0)-ia)/ht;if(Math.abs($t)<1e-6||!isFinite(an)){if(Math.abs(Dt-Ot)<1e-6)return this.easeTo(L,J);let wn=Ot0,Sa=ei=>Math.exp(wn*ht*ei)}return L.duration="duration"in L?+L.duration:1e3*an/("screenSpeed"in L?+L.screenSpeed/ht:+L.speed),L.maxDuration&&L.duration>L.maxDuration&&(L.duration=0),this._zooming=!0,this._rotating=Ye!==St,this._pitching=Ht!==et,this._padding=!de.isPaddingEqual(Wt),this._prepareEase(J,!1),this.terrain&&this._prepareElevation(ze),this._ease(wn=>{let ei=wn*an,Mi=1/Sa(ei);de.zoom=wn===1?je:Ae+de.scaleZoom(Mi),this._rotating&&(de.bearing=e.y.number(Ye,St,wn)),this._pitching&&(de.pitch=e.y.number(et,Ht,wn)),this._padding&&(de.interpolatePadding(dt,Wt,wn),Ar=de.centerPoint.add(fr)),this.terrain&&!L.freezeElevation&&this._updateElevation(wn);let pi=wn===1?ze:de.unproject(st.add(Qe.mult(ln(ei))).mult(Mi));de.setLocationAtPoint(de.renderWorldCopies?pi.wrap():pi,Ar),this._applyUpdatedTransform(de),this._fireMoveEvents(J)},()=>{this.terrain&&L.freezeElevation&&this._finalizeElevation(),this._afterEase(J)},L),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(L,J){var fe;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let de=this._onEaseEnd;delete this._onEaseEnd,de.call(this,J)}return L||(fe=this.handlers)===null||fe===void 0||fe.stop(!1),this}_ease(L,J,fe){fe.animate===!1||fe.duration===0?(L(1),J()):(this._easeStart=n.now(),this._easeOptions=fe,this._onEaseFrame=L,this._onEaseEnd=J,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(L,J){L=e.b3(L,-180,180);let fe=Math.abs(L-J);return Math.abs(L-360-J)180?-360:fe<-180?360:0}queryTerrainElevation(L){return this.terrain?this.terrain.getElevationForLngLatZoom(e.N.convert(L),this.transform.tileZoom)-this.transform.elevation:null}}let ki={compact:!0,customAttribution:'MapLibre'};class Vi{constructor(L=ki){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=J=>{!J||J.sourceDataType!=="metadata"&&J.sourceDataType!=="visibility"&&J.dataType!=="style"&&J.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=L}getDefaultPosition(){return"bottom-right"}onAdd(L){return this._map=L,this._compact=this.options.compact,this._container=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(L,J){let fe=this._map._getUIString(`AttributionControl.${J}`);L.title=fe,L.setAttribute("aria-label",fe)}_updateAttributions(){if(!this._map.style)return;let L=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?L=L.concat(this.options.customAttribution.map(de=>typeof de!="string"?"":de)):typeof this.options.customAttribution=="string"&&L.push(this.options.customAttribution)),this._map.style.stylesheet){let de=this._map.style.stylesheet;this.styleOwner=de.owner,this.styleId=de.id}let J=this._map.style.sourceCaches;for(let de in J){let Ae=J[de];if(Ae.used||Ae.usedForTerrain){let Ye=Ae.getSource();Ye.attribution&&L.indexOf(Ye.attribution)<0&&L.push(Ye.attribution)}}L=L.filter(de=>String(de).trim()),L.sort((de,Ae)=>de.length-Ae.length),L=L.filter((de,Ae)=>{for(let Ye=Ae+1;Ye=0)return!1;return!0});let fe=L.join(" | ");fe!==this._attribHTML&&(this._attribHTML=fe,L.length?(this._innerContainer.innerHTML=fe,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class ni{constructor(L={}){this._updateCompact=()=>{let J=this._container.children;if(J.length){let fe=J[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&fe.classList.add("maplibregl-compact"):fe.classList.remove("maplibregl-compact")}},this.options=L}getDefaultPosition(){return"bottom-left"}onAdd(L){this._map=L,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let J=i.create("a","maplibregl-ctrl-logo");return J.target="_blank",J.rel="noopener nofollow",J.href="https://maplibre.org/",J.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),J.setAttribute("rel","noopener nofollow"),this._container.appendChild(J),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class Rn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(L){let J=++this._id;return this._queue.push({callback:L,id:J,cancelled:!1}),J}remove(L){let J=this._currentlyRunning,fe=J?this._queue.concat(J):this._queue;for(let de of fe)if(de.id===L)return void(de.cancelled=!0)}run(L=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let J=this._currentlyRunning=this._queue;this._queue=[];for(let fe of J)if(!fe.cancelled&&(fe.callback(L),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var no=e.Y([{name:"a_pos3d",type:"Int16",components:3}]);class wo extends e.E{constructor(L){super(),this.sourceCache=L,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,L.usedForTerrain=!0,L.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(L,J){this.sourceCache.update(L,J),this._renderableTilesKeys=[];let fe={};for(let de of L.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:J}))fe[de.key]=!0,this._renderableTilesKeys.push(de.key),this._tiles[de.key]||(de.posMatrix=new Float64Array(16),e.aP(de.posMatrix,0,e.X,0,e.X,0,1),this._tiles[de.key]=new qe(de,this.tileSize));for(let de in this._tiles)fe[de]||delete this._tiles[de]}freeRtt(L){for(let J in this._tiles){let fe=this._tiles[J];(!L||fe.tileID.equals(L)||fe.tileID.isChildOf(L)||L.isChildOf(fe.tileID))&&(fe.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(L=>this.getTileByID(L))}getTileByID(L){return this._tiles[L]}getTerrainCoords(L){let J={};for(let fe of this._renderableTilesKeys){let de=this._tiles[fe].tileID;if(de.canonical.equals(L.canonical)){let Ae=L.clone();Ae.posMatrix=new Float64Array(16),e.aP(Ae.posMatrix,0,e.X,0,e.X,0,1),J[fe]=Ae}else if(de.canonical.isChildOf(L.canonical)){let Ae=L.clone();Ae.posMatrix=new Float64Array(16);let Ye=de.canonical.z-L.canonical.z,et=de.canonical.x-(de.canonical.x>>Ye<>Ye<>Ye;e.aP(Ae.posMatrix,0,St,0,St,0,1),e.J(Ae.posMatrix,Ae.posMatrix,[-et*St,-dt*St,0]),J[fe]=Ae}else if(L.canonical.isChildOf(de.canonical)){let Ae=L.clone();Ae.posMatrix=new Float64Array(16);let Ye=L.canonical.z-de.canonical.z,et=L.canonical.x-(L.canonical.x>>Ye<>Ye<>Ye;e.aP(Ae.posMatrix,0,e.X,0,e.X,0,1),e.J(Ae.posMatrix,Ae.posMatrix,[et*St,dt*St,0]),e.K(Ae.posMatrix,Ae.posMatrix,[1/2**Ye,1/2**Ye,0]),J[fe]=Ae}}return J}getSourceTile(L,J){let fe=this.sourceCache._source,de=L.overscaledZ-this.deltaZoom;if(de>fe.maxzoom&&(de=fe.maxzoom),de=fe.minzoom&&(!Ae||!Ae.dem);)Ae=this.sourceCache.getTileByID(L.scaledTo(de--).key);return Ae}tilesAfterTime(L=Date.now()){return Object.values(this._tiles).filter(J=>J.timeAdded>=L)}}class Go{constructor(L,J,fe){this.painter=L,this.sourceCache=new wo(J),this.options=fe,this.exaggeration=typeof fe.exaggeration=="number"?fe.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(L,J,fe,de=e.X){var Ae;if(!(J>=0&&J=0&&feL.canonical.z&&(L.canonical.z>=de?Ae=L.canonical.z-de:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ye=L.canonical.x-(L.canonical.x>>Ae<>Ae<>8<<4|Ae>>8,J[Ye+3]=0;let fe=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(J.buffer)),de=new h(L,fe,L.gl.RGBA,{premultiply:!1});return de.bind(L.gl.NEAREST,L.gl.CLAMP_TO_EDGE),this._coordsTexture=de,de}pointCoordinate(L){this.painter.maybeDrawDepthAndCoords(!0);let J=new Uint8Array(4),fe=this.painter.context,de=fe.gl,Ae=Math.round(L.x*this.painter.pixelRatio/devicePixelRatio),Ye=Math.round(L.y*this.painter.pixelRatio/devicePixelRatio),et=Math.round(this.painter.height/devicePixelRatio);fe.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),de.readPixels(Ae,et-Ye-1,1,1,de.RGBA,de.UNSIGNED_BYTE,J),fe.bindFramebuffer.set(null);let dt=J[0]+(J[2]>>4<<8),St=J[1]+((15&J[2])<<8),Ht=this.coordsIndex[255-J[3]],Wt=Ht&&this.sourceCache.getTileByID(Ht);if(!Wt)return null;let fr=this._coordsTextureSize,Ar=(1<L.id!==J),this._recentlyUsed.push(L.id)}stampObject(L){L.stamp=++this._stamp}getOrCreateFreeObject(){for(let J of this._recentlyUsed)if(!this._objects[J].inUse)return this._objects[J];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let L=this._createObject(this._objects.length);return this._objects.push(L),L}freeObject(L){L.inUse=!1}freeAllObjects(){for(let L of this._objects)this.freeObject(L)}isFull(){return!(this._objects.length!L.inUse)===!1}}let Jo={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class Es{constructor(L,J){this.painter=L,this.terrain=J,this.pool=new bs(L.context,30,J.sourceCache.tileSize*J.qualityFactor)}destruct(){this.pool.destruct()}getTexture(L){return this.pool.getObjectForId(L.rtt[this._stacks.length-1].id).texture}prepareForRender(L,J){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=L._order.filter(fe=>!L._layers[fe].isHidden(J)),this._coordsDescendingInv={};for(let fe in L.sourceCaches){this._coordsDescendingInv[fe]={};let de=L.sourceCaches[fe].getVisibleCoordinates();for(let Ae of de){let Ye=this.terrain.sourceCache.getTerrainCoords(Ae);for(let et in Ye)this._coordsDescendingInv[fe][et]||(this._coordsDescendingInv[fe][et]=[]),this._coordsDescendingInv[fe][et].push(Ye[et])}}this._coordsDescendingInvStr={};for(let fe of L._order){let de=L._layers[fe],Ae=de.source;if(Jo[de.type]&&!this._coordsDescendingInvStr[Ae]){this._coordsDescendingInvStr[Ae]={};for(let Ye in this._coordsDescendingInv[Ae])this._coordsDescendingInvStr[Ae][Ye]=this._coordsDescendingInv[Ae][Ye].map(et=>et.key).sort().join()}}for(let fe of this._renderableTiles)for(let de in this._coordsDescendingInvStr){let Ae=this._coordsDescendingInvStr[de][fe.tileID.key];Ae&&Ae!==fe.rttCoords[de]&&(fe.rtt=[])}}renderLayer(L){if(L.isHidden(this.painter.transform.zoom))return!1;let J=L.type,fe=this.painter,de=this._renderableLayerIds[this._renderableLayerIds.length-1]===L.id;if(Jo[J]&&(this._prevType&&Jo[this._prevType]||this._stacks.push([]),this._prevType=J,this._stacks[this._stacks.length-1].push(L.id),!de))return!0;if(Jo[this._prevType]||Jo[J]&&de){this._prevType=J;let Ae=this._stacks.length-1,Ye=this._stacks[Ae]||[];for(let et of this._renderableTiles){if(this.pool.isFull()&&(Zs(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(et),et.rtt[Ae]){let St=this.pool.getObjectForId(et.rtt[Ae].id);if(St.stamp===et.rtt[Ae].stamp){this.pool.useObject(St);continue}}let dt=this.pool.getOrCreateFreeObject();this.pool.useObject(dt),this.pool.stampObject(dt),et.rtt[Ae]={id:dt.id,stamp:dt.stamp},fe.context.bindFramebuffer.set(dt.fbo.framebuffer),fe.context.clear({color:e.aM.transparent,stencil:0}),fe.currentStencilSource=void 0;for(let St=0;St{Me.touchstart=Me.dragStart,Me.touchmoveWindow=Me.dragMove,Me.touchend=Me.dragEnd},bi={showCompass:!0,showZoom:!0,visualizePitch:!1};class ss{constructor(L,J,fe=!1){this.mousedown=Ye=>{this.startMouse(e.e({},Ye,{ctrlKey:!0,preventDefault:()=>Ye.preventDefault()}),i.mousePos(this.element,Ye)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Ye=>{this.moveMouse(Ye,i.mousePos(this.element,Ye))},this.mouseup=Ye=>{this.mouseRotate.dragEnd(Ye),this.mousePitch&&this.mousePitch.dragEnd(Ye),this.offTemp()},this.touchstart=Ye=>{Ye.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,Ye.targetTouches)[0],this.startTouch(Ye,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=Ye=>{Ye.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,Ye.targetTouches)[0],this.moveTouch(Ye,this._lastPos))},this.touchend=Ye=>{Ye.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let de=L.dragRotate._mouseRotate.getClickTolerance(),Ae=L.dragRotate._mousePitch.getClickTolerance();this.element=J,this.mouseRotate=of({clickTolerance:de,enable:!0}),this.touchRotate=(({enable:Ye,clickTolerance:et,bearingDegreesPerPixelMoved:dt=.8})=>{let St=new Vc;return new nu({clickTolerance:et,move:(Ht,Wt)=>({bearingDelta:(Wt.x-Ht.x)*dt}),moveStateManager:St,enable:Ye,assignEvents:xs})})({clickTolerance:de,enable:!0}),this.map=L,fe&&(this.mousePitch=Cf({clickTolerance:Ae,enable:!0}),this.touchPitch=(({enable:Ye,clickTolerance:et,pitchDegreesPerPixelMoved:dt=-.5})=>{let St=new Vc;return new nu({clickTolerance:et,move:(Ht,Wt)=>({pitchDelta:(Wt.y-Ht.y)*dt}),moveStateManager:St,enable:Ye,assignEvents:xs})})({clickTolerance:Ae,enable:!0})),i.addEventListener(J,"mousedown",this.mousedown),i.addEventListener(J,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(J,"touchcancel",this.reset)}startMouse(L,J){this.mouseRotate.dragStart(L,J),this.mousePitch&&this.mousePitch.dragStart(L,J),i.disableDrag()}startTouch(L,J){this.touchRotate.dragStart(L,J),this.touchPitch&&this.touchPitch.dragStart(L,J),i.disableDrag()}moveMouse(L,J){let fe=this.map,{bearingDelta:de}=this.mouseRotate.dragMove(L,J)||{};if(de&&fe.setBearing(fe.getBearing()+de),this.mousePitch){let{pitchDelta:Ae}=this.mousePitch.dragMove(L,J)||{};Ae&&fe.setPitch(fe.getPitch()+Ae)}}moveTouch(L,J){let fe=this.map,{bearingDelta:de}=this.touchRotate.dragMove(L,J)||{};if(de&&fe.setBearing(fe.getBearing()+de),this.touchPitch){let{pitchDelta:Ae}=this.touchPitch.dragMove(L,J)||{};Ae&&fe.setPitch(fe.getPitch()+Ae)}}off(){let L=this.element;i.removeEventListener(L,"mousedown",this.mousedown),i.removeEventListener(L,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(L,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let ms;function $o(Me,L,J){let fe=new e.N(Me.lng,Me.lat);if(Me=new e.N(Me.lng,Me.lat),L){let de=new e.N(Me.lng-360,Me.lat),Ae=new e.N(Me.lng+360,Me.lat),Ye=J.locationPoint(Me).distSqr(L);J.locationPoint(de).distSqr(L)180;){let de=J.locationPoint(Me);if(de.x>=0&&de.y>=0&&de.x<=J.width&&de.y<=J.height)break;Me.lng>J.center.lng?Me.lng-=360:Me.lng+=360}return Me.lng!==fe.lng&&J.locationPoint(Me).y>J.height/2-J.getHorizon()?Me:fe}let ul={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 yu(Me,L,J){let fe=Me.classList;for(let de in ul)fe.remove(`maplibregl-${J}-anchor-${de}`);fe.add(`maplibregl-${J}-anchor-${L}`)}class iu extends e.E{constructor(L){if(super(),this._onKeyPress=J=>{let fe=J.code,de=J.charCode||J.keyCode;fe!=="Space"&&fe!=="Enter"&&de!==32&&de!==13||this.togglePopup()},this._onMapClick=J=>{let fe=J.originalEvent.target,de=this._element;this._popup&&(fe===de||de.contains(fe))&&this.togglePopup()},this._update=J=>{var fe;if(!this._map)return;let de=this._map.loaded()&&!this._map.isMoving();(J?.type==="terrain"||J?.type==="render"&&!de)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?$o(this._lngLat,this._flatPos,this._map.transform):(fe=this._lngLat)===null||fe===void 0?void 0:fe.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Ae="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Ae=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Ae=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let Ye="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Ye="rotateX(0deg)":this._pitchAlignment==="map"&&(Ye=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||J&&J.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${ul[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Ye} ${Ae}`),n.frameAsync(new AbortController).then(()=>{this._updateOpacity(J&&J.type==="moveend")}).catch(()=>{})},this._onMove=J=>{if(!this._isDragging){let fe=this._clickTolerance||this._map._clickTolerance;this._isDragging=J.point.dist(this._pointerdownPos)>=fe}this._isDragging&&(this._pos=J.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.k("dragstart"))),this.fire(new e.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.k("dragend")),this._state="inactive"},this._addDragHandler=J=>{this._element.contains(J.originalEvent.target)&&(J.preventDefault(),this._positionDelta=J.point.sub(this._pos).add(this._offset),this._pointerdownPos=J.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=L&&L.anchor||"center",this._color=L&&L.color||"#3FB1CE",this._scale=L&&L.scale||1,this._draggable=L&&L.draggable||!1,this._clickTolerance=L&&L.clickTolerance||0,this._subpixelPositioning=L&&L.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=L&&L.rotation||0,this._rotationAlignment=L&&L.rotationAlignment||"auto",this._pitchAlignment=L&&L.pitchAlignment&&L.pitchAlignment!=="auto"?L.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(L?.opacity,L?.opacityWhenCovered),L&&L.element)this._element=L.element,this._offset=e.P.convert(L&&L.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let J=i.createNS("http://www.w3.org/2000/svg","svg"),fe=41,de=27;J.setAttributeNS(null,"display","block"),J.setAttributeNS(null,"height",`${fe}px`),J.setAttributeNS(null,"width",`${de}px`),J.setAttributeNS(null,"viewBox",`0 0 ${de} ${fe}`);let Ae=i.createNS("http://www.w3.org/2000/svg","g");Ae.setAttributeNS(null,"stroke","none"),Ae.setAttributeNS(null,"stroke-width","1"),Ae.setAttributeNS(null,"fill","none"),Ae.setAttributeNS(null,"fill-rule","evenodd");let Ye=i.createNS("http://www.w3.org/2000/svg","g");Ye.setAttributeNS(null,"fill-rule","nonzero");let et=i.createNS("http://www.w3.org/2000/svg","g");et.setAttributeNS(null,"transform","translate(3.0, 29.0)"),et.setAttributeNS(null,"fill","#000000");let dt=[{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"}];for(let Xe of dt){let st=i.createNS("http://www.w3.org/2000/svg","ellipse");st.setAttributeNS(null,"opacity","0.04"),st.setAttributeNS(null,"cx","10.5"),st.setAttributeNS(null,"cy","5.80029008"),st.setAttributeNS(null,"rx",Xe.rx),st.setAttributeNS(null,"ry",Xe.ry),et.appendChild(st)}let St=i.createNS("http://www.w3.org/2000/svg","g");St.setAttributeNS(null,"fill",this._color);let Ht=i.createNS("http://www.w3.org/2000/svg","path");Ht.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),St.appendChild(Ht);let Wt=i.createNS("http://www.w3.org/2000/svg","g");Wt.setAttributeNS(null,"opacity","0.25"),Wt.setAttributeNS(null,"fill","#000000");let fr=i.createNS("http://www.w3.org/2000/svg","path");fr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Wt.appendChild(fr);let Ar=i.createNS("http://www.w3.org/2000/svg","g");Ar.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ar.setAttributeNS(null,"fill","#FFFFFF");let Le=i.createNS("http://www.w3.org/2000/svg","g");Le.setAttributeNS(null,"transform","translate(8.0, 8.0)");let ze=i.createNS("http://www.w3.org/2000/svg","circle");ze.setAttributeNS(null,"fill","#000000"),ze.setAttributeNS(null,"opacity","0.25"),ze.setAttributeNS(null,"cx","5.5"),ze.setAttributeNS(null,"cy","5.5"),ze.setAttributeNS(null,"r","5.4999962");let je=i.createNS("http://www.w3.org/2000/svg","circle");je.setAttributeNS(null,"fill","#FFFFFF"),je.setAttributeNS(null,"cx","5.5"),je.setAttributeNS(null,"cy","5.5"),je.setAttributeNS(null,"r","5.4999962"),Le.appendChild(ze),Le.appendChild(je),Ye.appendChild(et),Ye.appendChild(St),Ye.appendChild(Wt),Ye.appendChild(Ar),Ye.appendChild(Le),J.appendChild(Ye),J.setAttributeNS(null,"height",fe*this._scale+"px"),J.setAttributeNS(null,"width",de*this._scale+"px"),this._element.appendChild(J),this._offset=e.P.convert(L&&L.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",J=>{J.preventDefault()}),this._element.addEventListener("mousedown",J=>{J.preventDefault()}),yu(this._element,this._anchor,"marker"),L&&L.className)for(let J of L.className.split(" "))this._element.classList.add(J);this._popup=null}addTo(L){return this.remove(),this._map=L,this._element.setAttribute("aria-label",L._getUIString("Marker.Title")),L.getCanvasContainer().appendChild(this._element),L.on("move",this._update),L.on("moveend",this._update),L.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(L){return this._lngLat=e.N.convert(L),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(L){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),L){if(!("offset"in L.options)){let de=Math.abs(13.5)/Math.SQRT2;L.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[de,-1*(38.1-13.5+de)],"bottom-right":[-de,-1*(38.1-13.5+de)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=L,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(L){return this._subpixelPositioning=L,this}getPopup(){return this._popup}togglePopup(){let L=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:L?(L.isOpen()?L.remove():(L.setLngLat(this._lngLat),L.addTo(this._map)),this):this}_updateOpacity(L=!1){var J,fe;if(!(!((J=this._map)===null||J===void 0)&&J.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(L)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let de=this._map,Ae=de.terrain.depthAtPoint(this._pos),Ye=de.terrain.getElevationForLngLatZoom(this._lngLat,de.transform.tileZoom);if(de.transform.lngLatToCameraDepth(this._lngLat,Ye)-Ae<.006)return void(this._element.style.opacity=this._opacity);let et=-this._offset.y/de.transform._pixelPerMeter,dt=Math.sin(de.getPitch()*Math.PI/180)*et,St=de.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Ht=de.transform.lngLatToCameraDepth(this._lngLat,Ye+dt)-St>.006;!((fe=this._popup)===null||fe===void 0)&&fe.isOpen()&&Ht&&this._popup.remove(),this._element.style.opacity=Ht?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(L){return this._offset=e.P.convert(L),this._update(),this}addClassName(L){this._element.classList.add(L)}removeClassName(L){this._element.classList.remove(L)}toggleClassName(L){return this._element.classList.toggle(L)}setDraggable(L){return this._draggable=!!L,this._map&&(L?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(L){return this._rotation=L||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(L){return this._rotationAlignment=L||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(L){return this._pitchAlignment=L&&L!=="auto"?L:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(L,J){return L===void 0&&J===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),L!==void 0&&(this._opacity=L),J!==void 0&&(this._opacityWhenCovered=J),this._map&&this._updateOpacity(!0),this}}let zu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Tl=0,Eu=!1,Al={maxWidth:100,unit:"metric"};function nc(Me,L,J){let fe=J&&J.maxWidth||100,de=Me._container.clientHeight/2,Ae=Me.unproject([0,de]),Ye=Me.unproject([fe,de]),et=Ae.distanceTo(Ye);if(J&&J.unit==="imperial"){let dt=3.2808*et;dt>5280?Xi(L,fe,dt/5280,Me._getUIString("ScaleControl.Miles")):Xi(L,fe,dt,Me._getUIString("ScaleControl.Feet"))}else J&&J.unit==="nautical"?Xi(L,fe,et/1852,Me._getUIString("ScaleControl.NauticalMiles")):et>=1e3?Xi(L,fe,et/1e3,Me._getUIString("ScaleControl.Kilometers")):Xi(L,fe,et,Me._getUIString("ScaleControl.Meters"))}function Xi(Me,L,J,fe){let de=function(Ae){let Ye=Math.pow(10,`${Math.floor(Ae)}`.length-1),et=Ae/Ye;return et=et>=10?10:et>=5?5:et>=3?3:et>=2?2:et>=1?1:function(dt){let St=Math.pow(10,Math.ceil(-Math.log(dt)/Math.LN10));return Math.round(dt*St)/St}(et),Ye*et}(J);Me.style.width=L*(de/J)+"px",Me.innerHTML=`${de} ${fe}`}let vo={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},mf=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function kc(Me){if(Me){if(typeof Me=="number"){let L=Math.round(Math.abs(Me)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,Me),"top-left":new e.P(L,L),"top-right":new e.P(-L,L),bottom:new e.P(0,-Me),"bottom-left":new e.P(L,-L),"bottom-right":new e.P(-L,-L),left:new e.P(Me,0),right:new e.P(-Me,0)}}if(Me instanceof e.P||Array.isArray(Me)){let L=e.P.convert(Me);return{center:L,top:L,"top-left":L,"top-right":L,bottom:L,"bottom-left":L,"bottom-right":L,left:L,right:L}}return{center:e.P.convert(Me.center||[0,0]),top:e.P.convert(Me.top||[0,0]),"top-left":e.P.convert(Me["top-left"]||[0,0]),"top-right":e.P.convert(Me["top-right"]||[0,0]),bottom:e.P.convert(Me.bottom||[0,0]),"bottom-left":e.P.convert(Me["bottom-left"]||[0,0]),"bottom-right":e.P.convert(Me["bottom-right"]||[0,0]),left:e.P.convert(Me.left||[0,0]),right:e.P.convert(Me.right||[0,0])}}return kc(new e.P(0,0))}let ou=t;l.AJAXError=e.bh,l.Evented=e.E,l.LngLat=e.N,l.MercatorCoordinate=e.Z,l.Point=e.P,l.addProtocol=e.bi,l.config=e.a,l.removeProtocol=e.bj,l.AttributionControl=Vi,l.BoxZoomHandler=Ol,l.CanvasSource=_e,l.CooperativeGesturesHandler=$a,l.DoubleClickZoomHandler=Aa,l.DragPanHandler=gn,l.DragRotateHandler=qn,l.EdgeInsets=Nl,l.FullscreenControl=class extends e.E{constructor(Me={}){super(),this._onFullscreenChange=()=>{var L;let J=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((L=J?.shadowRoot)===null||L===void 0)&&L.fullscreenElement;)J=J.shadowRoot.fullscreenElement;J===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,Me&&Me.container&&(Me.container instanceof HTMLElement?this._container=Me.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(Me){return this._map=Me,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Me=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",Me).setAttribute("aria-hidden","true"),Me.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Me=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Me),this._fullscreenButton.title=Me}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=Se,l.GeolocateControl=class extends e.E{constructor(Me){super(),this._onSuccess=L=>{if(this._map){if(this._isOutOfMapMaxBounds(L))return this._setErrorState(),this.fire(new e.k("outofmaxbounds",L)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=L,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(L),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(L),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.k("geolocate",L)),this._finish()}},this._updateCamera=L=>{let J=new e.N(L.coords.longitude,L.coords.latitude),fe=L.coords.accuracy,de=this._map.getBearing(),Ae=e.e({bearing:de},this.options.fitBoundsOptions),Ye=re.fromLngLat(J,fe);this._map.fitBounds(Ye,Ae,{geolocateSource:!0})},this._updateMarker=L=>{if(L){let J=new e.N(L.coords.longitude,L.coords.latitude);this._accuracyCircleMarker.setLngLat(J).addTo(this._map),this._userLocationDotMarker.setLngLat(J).addTo(this._map),this._accuracy=L.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=L=>{if(this._map){if(this.options.trackUserLocation)if(L.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let J=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=J,this._geolocateButton.setAttribute("aria-label",J),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(L.code===3&&Eu)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.k("error",L)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",L=>L.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=L=>{if(this._map){if(L===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let J=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=J,this._geolocateButton.setAttribute("aria-label",J)}else{let J=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=J,this._geolocateButton.setAttribute("aria-label",J)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new iu({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new iu({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",J=>{J.geolocateSource||this._watchState!=="ACTIVE_LOCK"||J.originalEvent&&J.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.k("trackuserlocationend")),this.fire(new e.k("userlocationlostfocus")))})}},this.options=e.e({},zu,Me)}onAdd(Me){return this._map=Me,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(L=!1){if(ms!==void 0&&!L)return ms;if(window.navigator.permissions===void 0)return ms=!!window.navigator.geolocation,ms;try{ms=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ms=!!window.navigator.geolocation}return ms})}().then(L=>this._finishSetupUI(L)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Tl=0,Eu=!1}_isOutOfMapMaxBounds(Me){let L=this._map.getMaxBounds(),J=Me.coords;return L&&(J.longitudeL.getEast()||J.latitudeL.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let Me=this._map.getBounds(),L=Me.getSouthEast(),J=Me.getNorthEast(),fe=L.distanceTo(J),de=Math.ceil(this._accuracy/(fe/this._map._container.clientHeight)*2);this._circleElement.style.width=`${de}px`,this._circleElement.style.height=`${de}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Tl--,Eu=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.k("trackuserlocationstart")),this.fire(new e.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let Me;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Tl++,Tl>1?(Me={maximumAge:6e5,timeout:0},Eu=!0):(Me=this.options.positionOptions,Eu=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Me)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},l.Hash=nf,l.ImageSource=Ue,l.KeyboardHandler=jt,l.LngLatBounds=re,l.LogoControl=ni,l.Map=class extends Ii{constructor(Me){e.bf.mark(e.bg.create);let L=Object.assign(Object.assign({},Ws),Me);if(L.minZoom!=null&&L.maxZoom!=null&&L.minZoom>L.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(L.minPitch!=null&&L.maxPitch!=null&&L.minPitch>L.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(L.minPitch!=null&&L.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(L.maxPitch!=null&&L.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new dc(L.minZoom,L.maxZoom,L.minPitch,L.maxPitch,L.renderWorldCopies),{bearingSnap:L.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new Rn,this._controls=[],this._mapId=e.a4(),this._contextLost=J=>{J.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new e.k("webglcontextlost",{originalEvent:J}))},this._contextRestored=J=>{this._setupPainter(),this.resize(),this._update(),this.fire(new e.k("webglcontextrestored",{originalEvent:J}))},this._onMapScroll=J=>{if(J.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=L.interactive,this._maxTileCacheSize=L.maxTileCacheSize,this._maxTileCacheZoomLevels=L.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=L.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=L.preserveDrawingBuffer===!0,this._antialias=L.antialias===!0,this._trackResize=L.trackResize===!0,this._bearingSnap=L.bearingSnap,this._refreshExpiredTiles=L.refreshExpiredTiles===!0,this._fadeDuration=L.fadeDuration,this._crossSourceCollisions=L.crossSourceCollisions===!0,this._collectResourceTiming=L.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Vo),L.locale),this._clickTolerance=L.clickTolerance,this._overridePixelRatio=L.pixelRatio,this._maxCanvasSize=L.maxCanvasSize,this.transformCameraUpdate=L.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=L.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=o.addThrottleControl(()=>this.isMoving()),this._requestManager=new b(L.transformRequest),typeof L.container=="string"){if(this._container=document.getElementById(L.container),!this._container)throw new Error(`Container '${L.container}' not found.`)}else{if(!(L.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=L.container}if(L.maxBounds&&this.setMaxBounds(L.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let J=!1,fe=Oc(de=>{this._trackResize&&!this._removed&&(this.resize(de),this.redraw())},50);this._resizeObserver=new ResizeObserver(de=>{J?fe(de):J=!0}),this._resizeObserver.observe(this._container)}this.handlers=new Ei(this,L),this._hash=L.hash&&new nf(typeof L.hash=="string"&&L.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:L.center,zoom:L.zoom,bearing:L.bearing,pitch:L.pitch}),L.bounds&&(this.resize(),this.fitBounds(L.bounds,e.e({},L.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=L.localIdeographFontFamily,this._validateStyle=L.validateStyle,L.style&&this.setStyle(L.style,{localIdeographFontFamily:L.localIdeographFontFamily}),L.attributionControl&&this.addControl(new Vi(typeof L.attributionControl=="boolean"?void 0:L.attributionControl)),L.maplibreLogo&&this.addControl(new ni,L.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",J=>{this._update(J.dataType==="style"),this.fire(new e.k(`${J.dataType}data`,J))}),this.on("dataloading",J=>{this.fire(new e.k(`${J.dataType}dataloading`,J))}),this.on("dataabort",J=>{this.fire(new e.k("sourcedataabort",J))})}_getMapId(){return this._mapId}addControl(Me,L){if(L===void 0&&(L=Me.getDefaultPosition?Me.getDefaultPosition():"top-right"),!Me||!Me.onAdd)return this.fire(new e.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let J=Me.onAdd(this);this._controls.push(Me);let fe=this._controlPositions[L];return L.indexOf("bottom")!==-1?fe.insertBefore(J,fe.firstChild):fe.appendChild(J),this}removeControl(Me){if(!Me||!Me.onRemove)return this.fire(new e.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let L=this._controls.indexOf(Me);return L>-1&&this._controls.splice(L,1),Me.onRemove(this),this}hasControl(Me){return this._controls.indexOf(Me)>-1}calculateCameraOptionsFromTo(Me,L,J,fe){return fe==null&&this.terrain&&(fe=this.terrain.getElevationForLngLatZoom(J,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Me,L,J,fe)}resize(Me){var L;let J=this._containerDimensions(),fe=J[0],de=J[1],Ae=this._getClampedPixelRatio(fe,de);if(this._resizeCanvas(fe,de,Ae),this.painter.resize(fe,de,Ae),this.painter.overLimit()){let et=this.painter.context.gl;this._maxCanvasSize=[et.drawingBufferWidth,et.drawingBufferHeight];let dt=this._getClampedPixelRatio(fe,de);this._resizeCanvas(fe,de,dt),this.painter.resize(fe,de,dt)}this.transform.resize(fe,de),(L=this._requestedCameraState)===null||L===void 0||L.resize(fe,de);let Ye=!this._moving;return Ye&&(this.stop(),this.fire(new e.k("movestart",Me)).fire(new e.k("move",Me))),this.fire(new e.k("resize",Me)),Ye&&this.fire(new e.k("moveend",Me)),this}_getClampedPixelRatio(Me,L){let{0:J,1:fe}=this._maxCanvasSize,de=this.getPixelRatio(),Ae=Me*de,Ye=L*de;return Math.min(Ae>J?J/Ae:1,Ye>fe?fe/Ye:1)*de}getPixelRatio(){var Me;return(Me=this._overridePixelRatio)!==null&&Me!==void 0?Me:devicePixelRatio}setPixelRatio(Me){this._overridePixelRatio=Me,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Me){return this.transform.setMaxBounds(re.convert(Me)),this._update()}setMinZoom(Me){if((Me=Me??-2)>=-2&&Me<=this.transform.maxZoom)return this.transform.minZoom=Me,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=Me,this._update(),this.getZoom()>Me&&this.setZoom(Me),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Me){if((Me=Me??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Me>=0&&Me<=this.transform.maxPitch)return this.transform.minPitch=Me,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(Me>=this.transform.minPitch)return this.transform.maxPitch=Me,this._update(),this.getPitch()>Me&&this.setPitch(Me),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Me){return this.transform.renderWorldCopies=Me,this._update()}project(Me){return this.transform.locationPoint(e.N.convert(Me),this.style&&this.terrain)}unproject(Me){return this.transform.pointLocation(e.P.convert(Me),this.terrain)}isMoving(){var Me;return this._moving||((Me=this.handlers)===null||Me===void 0?void 0:Me.isMoving())}isZooming(){var Me;return this._zooming||((Me=this.handlers)===null||Me===void 0?void 0:Me.isZooming())}isRotating(){var Me;return this._rotating||((Me=this.handlers)===null||Me===void 0?void 0:Me.isRotating())}_createDelegatedListener(Me,L,J){if(Me==="mouseenter"||Me==="mouseover"){let fe=!1;return{layers:L,listener:J,delegates:{mousemove:Ae=>{let Ye=L.filter(dt=>this.getLayer(dt)),et=Ye.length!==0?this.queryRenderedFeatures(Ae.point,{layers:Ye}):[];et.length?fe||(fe=!0,J.call(this,new rl(Me,this,Ae.originalEvent,{features:et}))):fe=!1},mouseout:()=>{fe=!1}}}}if(Me==="mouseleave"||Me==="mouseout"){let fe=!1;return{layers:L,listener:J,delegates:{mousemove:Ye=>{let et=L.filter(dt=>this.getLayer(dt));(et.length!==0?this.queryRenderedFeatures(Ye.point,{layers:et}):[]).length?fe=!0:fe&&(fe=!1,J.call(this,new rl(Me,this,Ye.originalEvent)))},mouseout:Ye=>{fe&&(fe=!1,J.call(this,new rl(Me,this,Ye.originalEvent)))}}}}{let fe=de=>{let Ae=L.filter(et=>this.getLayer(et)),Ye=Ae.length!==0?this.queryRenderedFeatures(de.point,{layers:Ae}):[];Ye.length&&(de.features=Ye,J.call(this,de),delete de.features)};return{layers:L,listener:J,delegates:{[Me]:fe}}}}_saveDelegatedListener(Me,L){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Me]=this._delegatedListeners[Me]||[],this._delegatedListeners[Me].push(L)}_removeDelegatedListener(Me,L,J){if(!this._delegatedListeners||!this._delegatedListeners[Me])return;let fe=this._delegatedListeners[Me];for(let de=0;deL.includes(Ye))){for(let Ye in Ae.delegates)this.off(Ye,Ae.delegates[Ye]);return void fe.splice(de,1)}}}on(Me,L,J){if(J===void 0)return super.on(Me,L);let fe=this._createDelegatedListener(Me,typeof L=="string"?[L]:L,J);this._saveDelegatedListener(Me,fe);for(let de in fe.delegates)this.on(de,fe.delegates[de]);return this}once(Me,L,J){if(J===void 0)return super.once(Me,L);let fe=typeof L=="string"?[L]:L,de=this._createDelegatedListener(Me,fe,J);for(let Ae in de.delegates){let Ye=de.delegates[Ae];de.delegates[Ae]=(...et)=>{this._removeDelegatedListener(Me,fe,J),Ye(...et)}}this._saveDelegatedListener(Me,de);for(let Ae in de.delegates)this.once(Ae,de.delegates[Ae]);return this}off(Me,L,J){return J===void 0?super.off(Me,L):(this._removeDelegatedListener(Me,typeof L=="string"?[L]:L,J),this)}queryRenderedFeatures(Me,L){if(!this.style)return[];let J,fe=Me instanceof e.P||Array.isArray(Me),de=fe?Me:[[0,0],[this.transform.width,this.transform.height]];if(L=L||(fe?{}:Me)||{},de instanceof e.P||typeof de[0]=="number")J=[e.P.convert(de)];else{let Ae=e.P.convert(de[0]),Ye=e.P.convert(de[1]);J=[Ae,new e.P(Ye.x,Ae.y),Ye,new e.P(Ae.x,Ye.y),Ae]}return this.style.queryRenderedFeatures(J,L,this.transform)}querySourceFeatures(Me,L){return this.style.querySourceFeatures(Me,L)}setStyle(Me,L){return(L=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},L)).diff!==!1&&L.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Me?(this._diffStyle(Me,L),this):(this._localIdeographFontFamily=L.localIdeographFontFamily,this._updateStyle(Me,L))}setTransformRequest(Me){return this._requestManager.setTransformRequest(Me),this}_getUIString(Me){let L=this._locale[Me];if(L==null)throw new Error(`Missing UI string '${Me}'`);return L}_updateStyle(Me,L){if(L.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Me,L));let J=this.style&&L.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Me)),Me?(this.style=new nr(this,L||{}),this.style.setEventedParent(this,{style:this.style}),typeof Me=="string"?this.style.loadURL(Me,L,J):this.style.loadJSON(Me,L,J),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new nr(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Me,L){if(typeof Me=="string"){let J=this._requestManager.transformRequest(Me,"Style");e.h(J,new AbortController).then(fe=>{this._updateDiff(fe.data,L)}).catch(fe=>{fe&&this.fire(new e.j(fe))})}else typeof Me=="object"&&this._updateDiff(Me,L)}_updateDiff(Me,L){try{this.style.setState(Me,L)&&this._update(!0)}catch(J){e.w(`Unable to perform style diff: ${J.message||J.error||J}. Rebuilding the style from scratch.`),this._updateStyle(Me,L)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.w("There is no style added to the map.")}addSource(Me,L){return this._lazyInitEmptyStyle(),this.style.addSource(Me,L),this._update(!0)}isSourceLoaded(Me){let L=this.style&&this.style.sourceCaches[Me];if(L!==void 0)return L.loaded();this.fire(new e.j(new Error(`There is no source with ID '${Me}'`)))}setTerrain(Me){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Me){let L=this.style.sourceCaches[Me.source];if(!L)throw new Error(`cannot load terrain, because there exists no source with ID: ${Me.source}`);this.terrain===null&&L.reload();for(let J in this.style._layers){let fe=this.style._layers[J];fe.type==="hillshade"&&fe.source===Me.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Go(this.painter,L,Me),this.painter.renderToTexture=new Es(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=J=>{J.dataType==="style"?this.terrain.sourceCache.freeRtt():J.dataType==="source"&&J.tile&&(J.sourceId!==Me.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(J.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new e.k("terrain",{terrain:Me})),this}getTerrain(){var Me,L;return(L=(Me=this.terrain)===null||Me===void 0?void 0:Me.options)!==null&&L!==void 0?L:null}areTilesLoaded(){let Me=this.style&&this.style.sourceCaches;for(let L in Me){let J=Me[L]._tiles;for(let fe in J){let de=J[fe];if(de.state!=="loaded"&&de.state!=="errored")return!1}}return!0}removeSource(Me){return this.style.removeSource(Me),this._update(!0)}getSource(Me){return this.style.getSource(Me)}addImage(Me,L,J={}){let{pixelRatio:fe=1,sdf:de=!1,stretchX:Ae,stretchY:Ye,content:et,textFitWidth:dt,textFitHeight:St}=J;if(this._lazyInitEmptyStyle(),!(L instanceof HTMLImageElement||e.b(L))){if(L.width===void 0||L.height===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Ht,height:Wt,data:fr}=L,Ar=L;return this.style.addImage(Me,{data:new e.R({width:Ht,height:Wt},new Uint8Array(fr)),pixelRatio:fe,stretchX:Ae,stretchY:Ye,content:et,textFitWidth:dt,textFitHeight:St,sdf:de,version:0,userImage:Ar}),Ar.onAdd&&Ar.onAdd(this,Me),this}}{let{width:Ht,height:Wt,data:fr}=n.getImageData(L);this.style.addImage(Me,{data:new e.R({width:Ht,height:Wt},fr),pixelRatio:fe,stretchX:Ae,stretchY:Ye,content:et,textFitWidth:dt,textFitHeight:St,sdf:de,version:0})}}updateImage(Me,L){let J=this.style.getImage(Me);if(!J)return this.fire(new e.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let fe=L instanceof HTMLImageElement||e.b(L)?n.getImageData(L):L,{width:de,height:Ae,data:Ye}=fe;if(de===void 0||Ae===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(de!==J.data.width||Ae!==J.data.height)return this.fire(new e.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let et=!(L instanceof HTMLImageElement||e.b(L));return J.data.replace(Ye,et),this.style.updateImage(Me,J),this}getImage(Me){return this.style.getImage(Me)}hasImage(Me){return Me?!!this.style.getImage(Me):(this.fire(new e.j(new Error("Missing required image id"))),!1)}removeImage(Me){this.style.removeImage(Me)}loadImage(Me){return o.getImage(this._requestManager.transformRequest(Me,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Me,L){return this._lazyInitEmptyStyle(),this.style.addLayer(Me,L),this._update(!0)}moveLayer(Me,L){return this.style.moveLayer(Me,L),this._update(!0)}removeLayer(Me){return this.style.removeLayer(Me),this._update(!0)}getLayer(Me){return this.style.getLayer(Me)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Me,L,J){return this.style.setLayerZoomRange(Me,L,J),this._update(!0)}setFilter(Me,L,J={}){return this.style.setFilter(Me,L,J),this._update(!0)}getFilter(Me){return this.style.getFilter(Me)}setPaintProperty(Me,L,J,fe={}){return this.style.setPaintProperty(Me,L,J,fe),this._update(!0)}getPaintProperty(Me,L){return this.style.getPaintProperty(Me,L)}setLayoutProperty(Me,L,J,fe={}){return this.style.setLayoutProperty(Me,L,J,fe),this._update(!0)}getLayoutProperty(Me,L){return this.style.getLayoutProperty(Me,L)}setGlyphs(Me,L={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Me,L),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Me,L,J={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Me,L,J,fe=>{fe||this._update(!0)}),this}removeSprite(Me){return this._lazyInitEmptyStyle(),this.style.removeSprite(Me),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Me,L={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Me,L,J=>{J||this._update(!0)}),this}setLight(Me,L={}){return this._lazyInitEmptyStyle(),this.style.setLight(Me,L),this._update(!0)}getLight(){return this.style.getLight()}setSky(Me){return this._lazyInitEmptyStyle(),this.style.setSky(Me),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Me,L){return this.style.setFeatureState(Me,L),this._update()}removeFeatureState(Me,L){return this.style.removeFeatureState(Me,L),this._update()}getFeatureState(Me){return this.style.getFeatureState(Me)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Me=0,L=0;return this._container&&(Me=this._container.clientWidth||400,L=this._container.clientHeight||300),[Me,L]}_setupContainer(){let Me=this._container;Me.classList.add("maplibregl-map");let L=this._canvasContainer=i.create("div","maplibregl-canvas-container",Me);this._interactive&&L.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",L),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let J=this._containerDimensions(),fe=this._getClampedPixelRatio(J[0],J[1]);this._resizeCanvas(J[0],J[1],fe);let de=this._controlContainer=i.create("div","maplibregl-control-container",Me),Ae=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Ye=>{Ae[Ye]=i.create("div",`maplibregl-ctrl-${Ye} `,de)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Me,L,J){this._canvas.width=Math.floor(J*Me),this._canvas.height=Math.floor(J*L),this._canvas.style.width=`${Me}px`,this._canvas.style.height=`${L}px`}_setupPainter(){let Me={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},L=null;this._canvas.addEventListener("webglcontextcreationerror",fe=>{L={requestedAttributes:Me},fe&&(L.statusMessage=fe.statusMessage,L.type=fe.type)},{once:!0});let J=this._canvas.getContext("webgl2",Me)||this._canvas.getContext("webgl",Me);if(!J){let fe="Failed to initialize WebGL";throw L?(L.message=fe,new Error(JSON.stringify(L))):new Error(fe)}this.painter=new af(J,this.transform),s.testSupport(J)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Me){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Me,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Me){return this._update(),this._renderTaskQueue.add(Me)}_cancelRenderFrame(Me){this._renderTaskQueue.remove(Me)}_render(Me){let L=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Me),this._removed)return;let J=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let de=this.transform.zoom,Ae=n.now();this.style.zoomHistory.update(de,Ae);let Ye=new e.z(de,{now:Ae,fadeDuration:L,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),et=Ye.crossFadingFactor();et===1&&et===this._crossFadingFactor||(J=!0,this._crossFadingFactor=et),this.style.update(Ye)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,L,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:L,showPadding:this.showPadding}),this.fire(new e.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.bf.mark(e.bg.load),this.fire(new e.k("load"))),this.style&&(this.style.hasTransitions()||J)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let fe=this._sourcesDirty||this._styleDirty||this._placementDirty;return fe||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.k("idle")),!this._loaded||this._fullyLoaded||fe||(this._fullyLoaded=!0,e.bf.mark(e.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Me;this._hash&&this._hash.remove();for(let J of this._controls)J.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),o.removeThrottleControl(this._imageQueueHandle),(Me=this._resizeObserver)===null||Me===void 0||Me.disconnect();let L=this.painter.context.gl.getExtension("WEBGL_lose_context");L?.loseContext&&L.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),e.bf.clearMetrics(),this._removed=!0,this.fire(new e.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(Me=>{e.bf.frame(Me),this._frameRequest=null,this._render(Me)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Me){this._showTileBoundaries!==Me&&(this._showTileBoundaries=Me,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Me){this._showPadding!==Me&&(this._showPadding=Me,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Me){this._showCollisionBoxes!==Me&&(this._showCollisionBoxes=Me,Me?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Me){this._showOverdrawInspector!==Me&&(this._showOverdrawInspector=Me,this._update())}get repaint(){return!!this._repaint}set repaint(Me){this._repaint!==Me&&(this._repaint=Me,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Me){this._vertices=Me,this._update()}get version(){return yl}getCameraTargetElevation(){return this.transform.elevation}},l.MapMouseEvent=rl,l.MapTouchEvent=Gu,l.MapWheelEvent=Nf,l.Marker=iu,l.NavigationControl=class{constructor(Me){this._updateZoomButtons=()=>{let L=this._map.getZoom(),J=L===this._map.getMaxZoom(),fe=L===this._map.getMinZoom();this._zoomInButton.disabled=J,this._zoomOutButton.disabled=fe,this._zoomInButton.setAttribute("aria-disabled",J.toString()),this._zoomOutButton.setAttribute("aria-disabled",fe.toString())},this._rotateCompassArrow=()=>{let L=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._compassIcon.style.transform=L},this._setButtonTitle=(L,J)=>{let fe=this._map._getUIString(`NavigationControl.${J}`);L.title=fe,L.setAttribute("aria-label",fe)},this.options=e.e({},bi,Me),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",L=>L.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",L=>this._map.zoomIn({},{originalEvent:L})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",L=>this._map.zoomOut({},{originalEvent:L})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",L=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:L}):this._map.resetNorth({},{originalEvent:L})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Me){return this._map=Me,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ss(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.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),this._handler.off(),delete this._handler),delete this._map}_createButton(Me,L){let J=i.create("button",Me,this._container);return J.type="button",J.addEventListener("click",L),J}},l.Popup=class extends e.E{constructor(Me){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.k("close"))),this),this._onMouseUp=L=>{this._update(L.point)},this._onMouseMove=L=>{this._update(L.point)},this._onDrag=L=>{this._update(L.point)},this._update=L=>{var J;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let et of this.options.className.split(" "))this._container.classList.add(et);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?$o(this._lngLat,this._flatPos,this._map.transform):(J=this._lngLat)===null||J===void 0?void 0:J.wrap(),this._trackPointer&&!L)return;let fe=this._flatPos=this._pos=this._trackPointer&&L?L:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&L?L:this._map.transform.locationPoint(this._lngLat));let de=this.options.anchor,Ae=kc(this.options.offset);if(!de){let et=this._container.offsetWidth,dt=this._container.offsetHeight,St;St=fe.y+Ae.bottom.ythis._map.transform.height-dt?["bottom"]:[],fe.xthis._map.transform.width-et/2&&St.push("right"),de=St.length===0?"bottom":St.join("-")}let Ye=fe.add(Ae[de]);this.options.subpixelPositioning||(Ye=Ye.round()),i.setTransform(this._container,`${ul[de]} translate(${Ye.x}px,${Ye.y}px)`),yu(this._container,de,"popup")},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(vo),Me)}addTo(Me){return this._map&&this.remove(),this._map=Me,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Me){return this._lngLat=e.N.convert(Me),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Me){return this.setDOMContent(document.createTextNode(Me))}setHTML(Me){let L=document.createDocumentFragment(),J=document.createElement("body"),fe;for(J.innerHTML=Me;fe=J.firstChild,fe;)L.appendChild(fe);return this.setDOMContent(L)}getMaxWidth(){var Me;return(Me=this._container)===null||Me===void 0?void 0:Me.style.maxWidth}setMaxWidth(Me){return this.options.maxWidth=Me,this._update(),this}setDOMContent(Me){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Me),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Me){return this._container&&this._container.classList.add(Me),this}removeClassName(Me){return this._container&&this._container.classList.remove(Me),this}setOffset(Me){return this.options.offset=Me,this._update(),this}toggleClassName(Me){if(this._container)return this._container.classList.toggle(Me)}setSubpixelPositioning(Me){this.options.subpixelPositioning=Me}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Me=this._container.querySelector(mf);Me&&Me.focus()}},l.RasterDEMTileSource=Te,l.RasterTileSource=ge,l.ScaleControl=class{constructor(Me){this._onMove=()=>{nc(this._map,this._container,this.options)},this.setUnit=L=>{this.options.unit=L,nc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Al),Me)}getDefaultPosition(){return"bottom-left"}onAdd(Me){return this._map=Me,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Me.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=ea,l.Style=nr,l.TerrainControl=class{constructor(Me){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=Me}onAdd(Me){return this._map=Me,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Fu,l.TwoFingersTouchRotateHandler=Lf,l.TwoFingersTouchZoomHandler=Su,l.TwoFingersTouchZoomRotateHandler=Wa,l.VectorTileSource=pe,l.VideoSource=Oe,l.addSourceType=(Me,L)=>e._(void 0,void 0,void 0,function*(){if(ie(Me))throw new Error(`A source type called "${Me}" already exists.`);((J,fe)=>{ce[J]=fe})(Me,L)}),l.clearPrewarmedResources=function(){let Me=ae;Me&&(Me.isPreloaded()&&Me.numActive()===1?(Me.release(Y),ae=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},l.getMaxParallelImageRequests=function(){return e.a.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return De().getRTLTextPluginStatus()},l.getVersion=function(){return ou},l.getWorkerCount=function(){return ee.workerCount},l.getWorkerUrl=function(){return e.a.WORKER_URL},l.importScriptInWorkers=function(Me){return H().broadcast("IS",Me)},l.prewarm=function(){G().acquire(Y)},l.setMaxParallelImageRequests=function(Me){e.a.MAX_PARALLEL_IMAGE_REQUESTS=Me},l.setRTLTextPlugin=function(Me,L){return De().setRTLTextPlugin(Me,L)},l.setWorkerCount=function(Me){ee.workerCount=Me},l.setWorkerUrl=function(Me){e.a.WORKER_URL=Me}});var S=u;return S})}}),CL=xe({"src/plots/map/layers.js"(U,O){"use strict";var u=Sr(),v=el().sanitizeHTML,w=$3(),S=Qd();function l(n,i){this.subplot=n,this.uid=n.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=t(i)},e.needsNewImage=function(n){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},e.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},e.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(n){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(n){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!t(n)){var s=r(n);i.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(n){if(n==="traces")for(var i=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function a(n){var i={},s={};switch(n.type){case"circle":u.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":u.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":u.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var c=n.symbol,p=w(c.textposition,c.iconsize);u.extendFlat(i,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":p.anchor,"text-offset":p.offset,"symbol-placement":c.placement}),u.extendFlat(s,{"icon-color":n.color,"text-color":c.textfont.color,"text-opacity":n.opacity});break;case"raster":u.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:i,paint:s}}function r(n){var i=n.sourcetype,s=n.source,c={type:i},p;return i==="geojson"?p="data":i==="vector"?p=typeof s=="string"?"url":"tiles":i==="raster"?(p="tiles",c.tileSize=256):i==="image"&&(p="url",c.coordinates=n.coordinates),c[p]=s,n.sourceattribution&&(c.attribution=v(n.sourceattribution)),c}O.exports=function(i,s,c){var p=new l(i,s);return p.update(c),p}}}),LL=xe({"src/plots/map/map.js"(U,O){"use strict";var u=kL(),v=Sr(),w=_d(),S=Ci(),l=uo(),e=Bf(),t=hu(),a=Uh(),r=a.drawMode,n=a.selectMode,i=yc().prepSelect,s=yc().clearOutline,c=yc().clearSelectionsCache,p=yc().selectOnClick,f=Qd(),d=CL();function y(T,m){this.id=m,this.gd=T;var h=T._fullLayout,x=T._context;this.container=h._glcontainer.node(),this.isStatic=x.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var o=y.prototype;o.plot=function(T,m,h){var x=this,_;x.map?_=new Promise(function(D,C){x.updateMap(T,m,D,C)}):_=new Promise(function(D,C){x.createMap(T,m,D,C)}),h.push(_)},o.createMap=function(T,m,h,x){var _=this,D=m[_.id],C=_.styleObj=E(D.style),F=D.bounds,I=F?[[F.west,F.south],[F.east,F.north]]:null;let z={container:_.div,style:C.style,center:g(D.center),zoom:D.zoom,bearing:D.bearing,pitch:D.pitch,maxBounds:I,interactive:!_.isStatic,preserveDrawingBuffer:_.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},R=D._fitBounds;R&&(z.bounds=[[R.west,R.south],[R.east,R.north]],z.fitBoundsOptions={padding:f.fitBoundsPadding});let k=_.map=new u.Map(z).addControl(new u.AttributionControl({compact:!0}));var B={};k.on("styleimagemissing",function(q){var Y=q.id;if(!B[Y]&&/^[a-zA-Z0-9-]+$/.test(Y)){B[Y]=!0;var ee=new Image(15,15);ee.onload=function(){k.addImage(Y,ee,{sdf:!0})},ee.crossOrigin="Anonymous",ee.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Y+".svg"}}),k.setTransformRequest(function(q){return q=q.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),q=q.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),q=q.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:q}}),k._canvas.style.left="0px",k._canvas.style.top="0px",_.rejectOnError(x),_.isStatic||_.initFx(T,m);var N=[];N.push(new Promise(function(q){k.once("load",q)})),N=N.concat(w.fetchTraceGeoData(T)),Promise.all(N).then(function(){R&&b(_,D),M(_,D),_.fillBelowLookup(T,m),_.updateData(T),_.updateLayout(m),_.resolveOnRender(h)}).catch(x)},o.updateMap=function(T,m,h,x){var _=this,D=_.map,C=m[this.id];_.rejectOnError(x);var F=[],I=E(C.style);JSON.stringify(_.styleObj)!==JSON.stringify(I)&&(_.styleObj=I,D.setStyle(I.style),_.traceHash={},F.push(new Promise(function(z){D.once("styledata",z)}))),F=F.concat(w.fetchTraceGeoData(T)),Promise.all(F).then(function(){_.fillBelowLookup(T,m),_.updateData(T);let z=C._fitBounds;z&&(D.fitBounds([[z.west,z.south],[z.east,z.north]],{padding:f.fitBoundsPadding,animate:!1}),b(_,C),M(_,C)),_.updateLayout(m),_.resolveOnRender(h)}).catch(x)};function b(T,m){let{center:h,zoom:x}=T.getView();m._input.center=m.center=h,m._input.zoom=m.zoom=x,m._input._fitView={center:Hr({},h),zoom:x}}function M(T,m){let h=T.getView();T.viewInitial={center:v.extendFlat({},h.center),bearing:m.bearing,pitch:m.pitch,zoom:h.zoom}}o.fillBelowLookup=function(T,m){var h=m[this.id],x=h.layers,_,D,C=this.belowLookup={},F=!1;for(_=0;_1)for(_=0;_-1&&p(I.originalEvent,x,[h.xaxis],[h.yaxis],h.id,F),z.indexOf("event")>-1&&t.click(x,I.originalEvent)}}},o.updateFx=function(T){var m=this,h=m.map,x=m.gd;if(m.isStatic)return;function _(I){var z=m.map.unproject(I);return[z.lng,z.lat]}var D=T.dragmode,C;C=function(I,z){if(z.isRect){var R=I.range={};R[m.id]=[_([z.xmin,z.ymin]),_([z.xmax,z.ymax])]}else{var k=I.lassoPoints={};k[m.id]=z.map(_)}};var F=m.dragOptions;m.dragOptions=v.extendDeep(F||{},{dragmode:T.dragmode,element:m.div,gd:x,plotinfo:{id:m.id,domain:T[m.id].domain,xaxis:m.xaxis,yaxis:m.yaxis,fillRangeItems:C},xaxes:[m.xaxis],yaxes:[m.yaxis],subplot:m.id}),h.off("click",m.onClickInPanHandler),n(D)||r(D)?(h.dragPan.disable(),h.on("zoomstart",m.clearOutline),m.dragOptions.prepFn=function(I,z,R){i(I,z,R,m.dragOptions,D)},e.init(m.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",m.clearOutline),m.div.onmousedown=null,m.div.ontouchstart=null,m.div.removeEventListener("touchstart",m.div._ontouchstart),m.onClickInPanHandler=m.onClickInPanFn(m.dragOptions),h.on("click",m.onClickInPanHandler))},o.updateFramework=function(T){var m=T[this.id].domain,h=T._size,x=this.div.style;x.width=h.w*(m.x[1]-m.x[0])+"px",x.height=h.h*(m.y[1]-m.y[0])+"px",x.left=h.l+m.x[0]*h.w+"px",x.top=h.t+(1-m.y[1])*h.h+"px",this.xaxis._offset=h.l+m.x[0]*h.w,this.xaxis._length=h.w*(m.x[1]-m.x[0]),this.yaxis._offset=h.t+(1-m.y[1])*h.h,this.yaxis._length=h.h*(m.y[1]-m.y[0])},o.updateLayers=function(T){var m=T[this.id],h=m.layers,x=this.layerList,_;if(h.length!==x.length){for(_=0;_PL});function PL(U,O){let u=[];for(let t of U){if(t.subplot!==O||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:a,lon:r}=t;if(!r||!a)continue;let n=Math.min(r.length,a.length);for(let i=0;im/2){var h=A.split("|").join("
");g.text(h).attr("data-unformatted",h).call(t.convertToTspans,n),T=e.bBox(g.node())}g.attr("transform",u(-3,-T.height+8)),E.insert("rect",".static-attribution").attr({x:-T.width-6,y:-T.height-3,width:T.width+6,height:T.height+3,fill:"rgba(255, 255, 255, 0.75)"});var x=1;T.width+6>m&&(x=m/(T.width+6));var _=[c.l+c.w*d.x[1],c.t+c.h*(1-d.y[0])];E.attr("transform",u(_[0],_[1])+v(x))}},U.updateFx=function(n){for(var i=n._fullLayout,s=i._subplots[r],c=0;c=0;a--)e.removeLayer(t[a][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},O.exports=function(t,a){var r=a[0].trace,n=new S(t,r.uid),i=n.sourceId,s=u(a),c=n.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(i,{type:"geojson",data:s.geojson}),n._addLayers(s,c),a[0].trace._glTrace=n,n}}}),NL=xe({"src/traces/choroplethmap/index.js"(U,O){"use strict";O.exports={attributes:J3(),supplyDefaults:zL(),colorbar:gp(),calc:r3(),plot:BL(),hoverPoints:n3(),eventData:i3(),selectPoints:o3(),styleOnSelect:function(u,v){if(v){var w=v[0].trace;w._glTrace.updateOnSelect(v)}},getBelow:function(u,v){for(var w=v.getMapLayers(),S=w.length-2;S>=0;S--){var l=w[S].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=S+1;e0?+d[p]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:M},properties:A})}}var g=S.extractOpts(r),T=g.reversescale?S.flipScale(g.colorscale):g.colorscale,m=T[0][1],h=w.opacity(m)<1?m:w.addOpacity(m,0),x=["interpolate",["linear"],["heatmap-density"],0,h];for(p=1;p=0;t--)l.removeLayer(e[t][1])},S.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},O.exports=function(e,t){var a=t[0].trace,r=new w(e,a.uid),n=r.sourceId,i=u(t),s=r.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(n,{type:"geojson",data:i.geojson}),r._addLayers(i,s),r}}}),HL=xe({"src/traces/densitymap/hover.js"(U,O){"use strict";var u=uo(),v=ey().hoverPoints,w=ey().getExtraText;O.exports=function(l,e,t){var a=v(l,e,t);if(a){var r=a[0],n=r.cd,i=n[0].trace,s=n[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=u.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=w(i,s,n[0].t.labels),[r]}}}}),GL=xe({"src/traces/densitymap/event_data.js"(U,O){"use strict";O.exports=function(v,w){return v.lon=w.lon,v.lat=w.lat,v.z=w.z,v}}}),WL=xe({"src/traces/densitymap/index.js"(U,O){"use strict";O.exports={attributes:ew(),supplyDefaults:UL(),colorbar:gp(),formatLabels:X3(),calc:jL(),plot:VL(),hoverPoints:HL(),eventData:GL(),getBelow:function(u,v){for(var w=v.getMapLayers(),S=0;Sb[D%b.length];o("color",y.label.map((D,C)=>w.addOpacity(M(C),.8))),o("customdata");var A=n.link||{},E=e.newContainer(i,"link");function g(D,C){return u.coerce(A,E,v.link,D,C)}g("label"),g("arrowlen"),g("source"),g("target"),g("value"),g("line.color"),g("line.width"),g("hoverinfo",n.hoverinfo),l(A,E,g,f),g("hovertemplate"),g("sort");var T=w.color(c.paper_bgcolor).luminosity()<.333,m=T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",h=g("color",m);function x(D){if(!w.isValid(D))return D;let C=w.color(D),F=C.alpha();return F<=.8?C.alpha(F+.2).rgb().string():T?w.brighten(C,10):w.adjustLightness(C,-10).rgb().string()}g("hovercolor",Array.isArray(h)?h.map(x):x(h)),g("customdata"),t(A,E,{name:"colorscales",handleItemDefaults:a}),S(i,c,p),p("orientation"),p("valueformat"),p("valuesuffix");let _=y.x.length&&y.y.length?"freeform":void 0;p("arrangement",_),u.coerceFont(p,"textfont",c.font,{autoShadowDflt:!0}),i._length=null};function a(r,n){function i(s,c){return u.coerce(r,n,v.link.colorscales,s,c)}i("label"),i("cmin"),i("cmax"),i("colorscale")}}}),rw=xe({"node_modules/strongly-connected-components/scc.js"(U,O){"use strict";O.exports=u;function u(v){for(var w=v.length,S=new Array(w),l=new Array(w),e=new Array(w),t=new Array(w),a=new Array(w),r=new Array(w),n=0;n0;){o=M[M.length-1];var A=v[o];if(t[o]=0&&r[o].push(a[g])}t[o]=E}else{if(l[o]===S[o]){for(var T=[],m=[],h=0,E=b.length-1;E>=0;--E){var x=b[E];if(e[x]=!1,T.push(x),m.push(r[x]),h+=r[x].length,a[x]=s.length,x===o){b.length=E;break}}s.push(T);for(var _=new Array(h),E=0;Eg&&(g=i.source[b]),i.target[b]>g&&(g=i.target[b]);var T=g+1;r.node._count=T;var m,h=r.node.groups,x={};for(b=0;b0&&l(z,T)&&l(R,T)&&!(x.hasOwnProperty(z)&&x.hasOwnProperty(R)&&x[z]===x[R])){x.hasOwnProperty(R)&&(R=x[R]),x.hasOwnProperty(z)&&(z=x[z]),z=+z,R=+R,d[z]=d[R]=!0;var k="";i.label&&i.label[b]&&(k=i.label[b]);var B=null;k&&y.hasOwnProperty(k)&&(B=y[k]),s.push({pointNumber:b,label:k,color:c?i.color[b]:i.color,hovercolor:p?i.hovercolor[b]:i.hovercolor,customdata:f?i.customdata[b]:i.customdata,concentrationscale:B,source:z,target:R,value:+I}),F.source.push(z),F.target.push(R)}}var N=T+h.length,q=S(n.color),Y=S(n.customdata),ee=[];for(b=0;bT-1,childrenNodes:[],pointNumber:b,label:te,color:q?n.color[b]:n.color,customdata:Y?n.customdata[b]:n.customdata})}var ae=!1;return a(N,F.source,F.target)&&(ae=!0),{circular:ae,links:s,nodes:ee,groups:h,groupLookup:x}}function a(r,n,i){for(var s=v.init2dArray(r,0),c=0;c1})}O.exports=function(n,i){var s=t(i);return w({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),ZL=xe({"node_modules/d3-quadtree/dist/d3-quadtree.js"(U,O){(function(u,v){typeof U=="object"&&typeof O<"u"?v(U):(u=u||self,v(u.d3=u.d3||{}))})(U,function(u){"use strict";function v(T){var m=+this._x.call(null,T),h=+this._y.call(null,T);return w(this.cover(m,h),m,h,T)}function w(T,m,h,x){if(isNaN(m)||isNaN(h))return T;var _,D=T._root,C={data:x},F=T._x0,I=T._y0,z=T._x1,R=T._y1,k,B,N,q,Y,ee,te,ae;if(!D)return T._root=C,T;for(;D.length;)if((Y=m>=(k=(F+z)/2))?F=k:z=k,(ee=h>=(B=(I+R)/2))?I=B:R=B,_=D,!(D=D[te=ee<<1|Y]))return _[te]=C,T;if(N=+T._x.call(null,D.data),q=+T._y.call(null,D.data),m===N&&h===q)return C.next=D,_?_[te]=C:T._root=C,T;do _=_?_[te]=new Array(4):T._root=new Array(4),(Y=m>=(k=(F+z)/2))?F=k:z=k,(ee=h>=(B=(I+R)/2))?I=B:R=B;while((te=ee<<1|Y)===(ae=(q>=B)<<1|N>=k));return _[ae]=D,_[te]=C,T}function S(T){var m,h,x=T.length,_,D,C=new Array(x),F=new Array(x),I=1/0,z=1/0,R=-1/0,k=-1/0;for(h=0;hR&&(R=_),Dk&&(k=D));if(I>R||z>k)return this;for(this.cover(I,z).cover(R,k),h=0;hT||T>=_||x>m||m>=D;)switch(z=(mR||(F=q.y0)>k||(I=q.x1)<_||(z=q.y1)=te)<<1|T>=ee)&&(q=B[B.length-1],B[B.length-1]=B[B.length-1-Y],B[B.length-1-Y]=q)}else{var ae=T-+this._x.call(null,N.data),j=m-+this._y.call(null,N.data),G=ae*ae+j*j;if(G=(B=(C+I)/2))?C=B:I=B,(Y=k>=(N=(F+z)/2))?F=N:z=N,m=h,!(h=h[ee=Y<<1|q]))return this;if(!h.length)break;(m[ee+1&3]||m[ee+2&3]||m[ee+3&3])&&(x=m,te=ee)}for(;h.data!==T;)if(_=h,!(h=h.next))return this;return(D=h.next)&&delete h.next,_?(D?_.next=D:delete _.next,this):m?(D?m[ee]=D:delete m[ee],(h=m[0]||m[1]||m[2]||m[3])&&h===(m[3]||m[2]||m[1]||m[0])&&!h.length&&(x?x[te]=h:this._root=h),this):(this._root=D,this)}function i(T){for(var m=0,h=T.length;m=d.length)return o!=null&&g.sort(o),b!=null?b(g):g;for(var x=-1,_=g.length,D=d[T++],C,F,I=S(),z,R=m();++x<_;)(z=I.get(C=D(F=g[x])+""))?z.push(F):I.set(C,[F]);return I.each(function(k,B){h(R,B,A(k,T,m,h))}),R}function E(g,T){if(++T>d.length)return g;var m,h=y[T-1];return b!=null&&T>=d.length?m=g.entries():(m=[],g.each(function(x,_){m.push({key:_,values:E(x,T)})})),h!=null?m.sort(function(x,_){return h(x.key,_.key)}):m}return M={object:function(g){return A(g,0,e,t)},map:function(g){return A(g,0,a,r)},entries:function(g){return E(A(g,0,a,r),0)},key:function(g){return d.push(g),M},sortKeys:function(g){return y[d.length-1]=g,M},sortValues:function(g){return o=g,M},rollup:function(g){return b=g,M}}}function e(){return{}}function t(d,y,o){d[y]=o}function a(){return S()}function r(d,y,o){d.set(y,o)}function n(){}var i=S.prototype;n.prototype=s.prototype={constructor:n,has:i.has,add:function(d){return d+="",this[v+d]=d,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function s(d,y){var o=new n;if(d instanceof n)d.each(function(A){o.add(A)});else if(d){var b=-1,M=d.length;if(y==null)for(;++b=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}S.prototype=w.prototype={constructor:S,on:function(a,r){var n=this._,i=l(a+"",n),s,c=-1,p=i.length;if(arguments.length<2){for(;++c0)for(var n=new Array(s),i=0,s,c;i=0&&T._call.call(null,m),T=T._next;--v}function o(){r=(a=i.now())+n,v=w=0;try{y()}finally{v=0,M(),r=0}}function b(){var T=i.now(),m=T-a;m>l&&(n-=m,a=T)}function M(){for(var T,m=e,h,x=1/0;m;)m._call?(x>m._time&&(x=m._time),T=m,m=m._next):(h=m._next,m._next=null,m=T?T._next=h:e=h);t=T,A(x)}function A(T){if(!v){w&&(w=clearTimeout(w));var m=T-r;m>24?(T<1/0&&(w=setTimeout(o,T-i.now()-n)),S&&(S=clearInterval(S))):(S||(a=i.now(),S=setInterval(b,l)),v=1,s(o))}}function E(T,m,h){var x=new f;return m=m==null?0:+m,x.restart(function(_){x.stop(),T(_+m)},m,h),x}function g(T,m,h){var x=new f,_=m;return m==null?(x.restart(T,m,h),x):(m=+m,h=h==null?c():+h,x.restart(function D(C){C+=_,x.restart(D,_+=m,h),T(C)},m,h),x)}u.interval=g,u.now=c,u.timeout=E,u.timer=d,u.timerFlush=y,Object.defineProperty(u,"__esModule",{value:!0})})}}),QL=xe({"node_modules/d3-force/dist/d3-force.js"(U,O){(function(u,v){typeof U=="object"&&typeof O<"u"?v(U,ZL(),aw(),KL(),JL()):v(u.d3=u.d3||{},u.d3,u.d3,u.d3,u.d3)})(U,function(u,v,w,S,l){"use strict";function e(T,m){var h;T==null&&(T=0),m==null&&(m=0);function x(){var _,D=h.length,C,F=0,I=0;for(_=0;_k.index){var Q=B-Z.x-Z.vx,re=N-Z.y-Z.vy,ue=Q*Q+re*re;ue<$*$&&(Q===0&&(Q=a(),ue+=Q*Q),re===0&&(re=a(),ue+=re*re),ue=($-(ue=Math.sqrt(ue)))/ue*x,k.vx+=(Q*=ue)*($=(X*=X)/(Y+X)),k.vy+=(re*=ue)*$,Z.vx-=Q*($=1-$),Z.vy-=re*$)}return}return j>B+$||KN+$||HI.r&&(I.r=I[z].r)}function F(){if(m){var I,z=m.length,R;for(h=new Array(z),I=0;I1?(Y==null?F.remove(q):F.set(q,N(Y)),m):F.get(q)},find:function(q,Y,ee){var te=0,ae=T.length,j,G,K,H,Z;for(ee==null?ee=1/0:ee*=ee,te=0;te1?(z.on(q,Y),m):z.on(q)}}}function M(){var T,m,h,x=t(-30),_,D=1,C=1/0,F=.81;function I(B){var N,q=T.length,Y=v.quadtree(T,f,d).visitAfter(R);for(h=B,N=0;N=C)return;(B.data!==m||B.next)&&(ee===0&&(ee=a(),j+=ee*ee),te===0&&(te=a(),j+=te*te),jS)if(!(Math.abs(o*f-d*y)>S)||!s)this._+="L"+(this._x1=a)+","+(this._y1=r);else{var M=n-c,A=i-p,E=f*f+d*d,g=M*M+A*A,T=Math.sqrt(E),m=Math.sqrt(b),h=s*Math.tan((v-Math.acos((E+b-g)/(2*T*m)))/2),x=h/m,_=h/T;Math.abs(x-1)>S&&(this._+="L"+(a+x*y)+","+(r+x*o)),this._+="A"+s+","+s+",0,0,"+ +(o*M>y*A)+","+(this._x1=a+_*f)+","+(this._y1=r+_*d)}},arc:function(a,r,n,i,s,c){a=+a,r=+r,n=+n,c=!!c;var p=n*Math.cos(i),f=n*Math.sin(i),d=a+p,y=r+f,o=1^c,b=c?i-s:s-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+d+","+y:(Math.abs(this._x1-d)>S||Math.abs(this._y1-y)>S)&&(this._+="L"+d+","+y),n&&(b<0&&(b=b%w+w),b>l?this._+="A"+n+","+n+",0,1,"+o+","+(a-p)+","+(r-f)+"A"+n+","+n+",0,1,"+o+","+(this._x1=d)+","+(this._y1=y):b>S&&(this._+="A"+n+","+n+",0,"+ +(b>=v)+","+o+","+(this._x1=a+n*Math.cos(s))+","+(this._y1=r+n*Math.sin(s))))},rect:function(a,r,n,i){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+r)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},u.path=t,Object.defineProperty(u,"__esModule",{value:!0})})}}),nw=xe({"node_modules/d3-shape/dist/d3-shape.js"(U,O){(function(u,v){typeof U=="object"&&typeof O<"u"?v(U,e7()):(u=u||self,v(u.d3=u.d3||{},u.d3))})(U,function(u,v){"use strict";function w(Ze){return function(){return Ze}}var S=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,a=Math.min,r=Math.sin,n=Math.sqrt,i=1e-12,s=Math.PI,c=s/2,p=2*s;function f(Ze){return Ze>1?0:Ze<-1?s:Math.acos(Ze)}function d(Ze){return Ze>=1?c:Ze<=-1?-c:Math.asin(Ze)}function y(Ze){return Ze.innerRadius}function o(Ze){return Ze.outerRadius}function b(Ze){return Ze.startAngle}function M(Ze){return Ze.endAngle}function A(Ze){return Ze&&Ze.padAngle}function E(Ze,xt,Vt,er,Tr,jr,Fr,kr){var ra=Vt-Ze,ja=er-xt,La=Fr-Tr,Dn=kr-jr,Mn=Dn*ra-La*ja;if(!(Mn*Mnho*ho+ro*ro&&(ao=Wo,Co=Po),{cx:ao,cy:Co,x01:-La,y01:-Dn,x11:ao*(Tr/Mo-1),y11:Co*(Tr/Mo-1)}}function T(){var Ze=y,xt=o,Vt=w(0),er=null,Tr=b,jr=M,Fr=A,kr=null;function ra(){var ja,La,Dn=+Ze.apply(this,arguments),Mn=+xt.apply(this,arguments),_i=Tr.apply(this,arguments)-c,ti=jr.apply(this,arguments)-c,Si=S(ti-_i),ai=ti>_i;if(kr||(kr=ja=v.path()),Mni))kr.moveTo(0,0);else if(Si>p-i)kr.moveTo(Mn*e(_i),Mn*r(_i)),kr.arc(0,0,Mn,_i,ti,!ai),Dn>i&&(kr.moveTo(Dn*e(ti),Dn*r(ti)),kr.arc(0,0,Dn,ti,_i,ai));else{var Ao=_i,yo=ti,Vn=_i,Bo=ti,Mo=Si,co=Si,Ro=Fr.apply(this,arguments)/2,ao=Ro>i&&(er?+er.apply(this,arguments):n(Dn*Dn+Mn*Mn)),Co=a(S(Mn-Dn)/2,+Vt.apply(this,arguments)),Wo=Co,Po=Co,vi,zi;if(ao>i){var ho=d(ao/Dn*r(Ro)),ro=d(ao/Mn*r(Ro));(Mo-=ho*2)>i?(ho*=ai?1:-1,Vn+=ho,Bo-=ho):(Mo=0,Vn=Bo=(_i+ti)/2),(co-=ro*2)>i?(ro*=ai?1:-1,Ao+=ro,yo-=ro):(co=0,Ao=yo=(_i+ti)/2)}var es=Mn*e(Ao),Ho=Mn*r(Ao),is=Dn*e(Bo),as=Dn*r(Bo);if(Co>i){var vs=Mn*e(yo),Yo=Mn*r(yo),po=Dn*e(Vn),_s=Dn*r(Vn),qo;if(Sii?Po>i?(vi=g(po,_s,es,Ho,Mn,Po,ai),zi=g(vs,Yo,is,as,Mn,Po,ai),kr.moveTo(vi.cx+vi.x01,vi.cy+vi.y01),Poi)||!(Mo>i)?kr.lineTo(is,as):Wo>i?(vi=g(is,as,vs,Yo,Dn,-Wo,ai),zi=g(es,Ho,po,_s,Dn,-Wo,ai),kr.lineTo(vi.cx+vi.x01,vi.cy+vi.y01),Wo=Mn;--_i)kr.point(yo[_i],Vn[_i]);kr.lineEnd(),kr.areaEnd()}ai&&(yo[Dn]=+Ze(Si,Dn,La),Vn[Dn]=+Vt(Si,Dn,La),kr.point(xt?+xt(Si,Dn,La):yo[Dn],er?+er(Si,Dn,La):Vn[Dn]))}if(Ao)return kr=null,Ao+""||null}function ja(){return D().defined(Tr).curve(Fr).context(jr)}return ra.x=function(La){return arguments.length?(Ze=typeof La=="function"?La:w(+La),xt=null,ra):Ze},ra.x0=function(La){return arguments.length?(Ze=typeof La=="function"?La:w(+La),ra):Ze},ra.x1=function(La){return arguments.length?(xt=La==null?null:typeof La=="function"?La:w(+La),ra):xt},ra.y=function(La){return arguments.length?(Vt=typeof La=="function"?La:w(+La),er=null,ra):Vt},ra.y0=function(La){return arguments.length?(Vt=typeof La=="function"?La:w(+La),ra):Vt},ra.y1=function(La){return arguments.length?(er=La==null?null:typeof La=="function"?La:w(+La),ra):er},ra.lineX0=ra.lineY0=function(){return ja().x(Ze).y(Vt)},ra.lineY1=function(){return ja().x(Ze).y(er)},ra.lineX1=function(){return ja().x(xt).y(Vt)},ra.defined=function(La){return arguments.length?(Tr=typeof La=="function"?La:w(!!La),ra):Tr},ra.curve=function(La){return arguments.length?(Fr=La,jr!=null&&(kr=Fr(jr)),ra):Fr},ra.context=function(La){return arguments.length?(La==null?jr=kr=null:kr=Fr(jr=La),ra):jr},ra}function F(Ze,xt){return xtZe?1:xt>=Ze?0:NaN}function I(Ze){return Ze}function z(){var Ze=I,xt=F,Vt=null,er=w(0),Tr=w(p),jr=w(0);function Fr(kr){var ra,ja=kr.length,La,Dn,Mn=0,_i=new Array(ja),ti=new Array(ja),Si=+er.apply(this,arguments),ai=Math.min(p,Math.max(-p,Tr.apply(this,arguments)-Si)),Ao,yo=Math.min(Math.abs(ai)/ja,jr.apply(this,arguments)),Vn=yo*(ai<0?-1:1),Bo;for(ra=0;ra0&&(Mn+=Bo);for(xt!=null?_i.sort(function(Mo,co){return xt(ti[Mo],ti[co])}):Vt!=null&&_i.sort(function(Mo,co){return Vt(kr[Mo],kr[co])}),ra=0,Dn=Mn?(ai-ja*Vn)/Mn:0;ra0?Bo*Dn:0)+Vn,ti[La]={data:kr[La],index:ra,value:Bo,startAngle:Si,endAngle:Ao,padAngle:yo};return ti}return Fr.value=function(kr){return arguments.length?(Ze=typeof kr=="function"?kr:w(+kr),Fr):Ze},Fr.sortValues=function(kr){return arguments.length?(xt=kr,Vt=null,Fr):xt},Fr.sort=function(kr){return arguments.length?(Vt=kr,xt=null,Fr):Vt},Fr.startAngle=function(kr){return arguments.length?(er=typeof kr=="function"?kr:w(+kr),Fr):er},Fr.endAngle=function(kr){return arguments.length?(Tr=typeof kr=="function"?kr:w(+kr),Fr):Tr},Fr.padAngle=function(kr){return arguments.length?(jr=typeof kr=="function"?kr:w(+kr),Fr):jr},Fr}var R=B(h);function k(Ze){this._curve=Ze}k.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Ze,xt){this._curve.point(xt*Math.sin(Ze),xt*-Math.cos(Ze))}};function B(Ze){function xt(Vt){return new k(Ze(Vt))}return xt._curve=Ze,xt}function N(Ze){var xt=Ze.curve;return Ze.angle=Ze.x,delete Ze.x,Ze.radius=Ze.y,delete Ze.y,Ze.curve=function(Vt){return arguments.length?xt(B(Vt)):xt()._curve},Ze}function q(){return N(D().curve(R))}function Y(){var Ze=C().curve(R),xt=Ze.curve,Vt=Ze.lineX0,er=Ze.lineX1,Tr=Ze.lineY0,jr=Ze.lineY1;return Ze.angle=Ze.x,delete Ze.x,Ze.startAngle=Ze.x0,delete Ze.x0,Ze.endAngle=Ze.x1,delete Ze.x1,Ze.radius=Ze.y,delete Ze.y,Ze.innerRadius=Ze.y0,delete Ze.y0,Ze.outerRadius=Ze.y1,delete Ze.y1,Ze.lineStartAngle=function(){return N(Vt())},delete Ze.lineX0,Ze.lineEndAngle=function(){return N(er())},delete Ze.lineX1,Ze.lineInnerRadius=function(){return N(Tr())},delete Ze.lineY0,Ze.lineOuterRadius=function(){return N(jr())},delete Ze.lineY1,Ze.curve=function(Fr){return arguments.length?xt(B(Fr)):xt()._curve},Ze}function ee(Ze,xt){return[(xt=+xt)*Math.cos(Ze-=Math.PI/2),xt*Math.sin(Ze)]}var te=Array.prototype.slice;function ae(Ze){return Ze.source}function j(Ze){return Ze.target}function G(Ze){var xt=ae,Vt=j,er=x,Tr=_,jr=null;function Fr(){var kr,ra=te.call(arguments),ja=xt.apply(this,ra),La=Vt.apply(this,ra);if(jr||(jr=kr=v.path()),Ze(jr,+er.apply(this,(ra[0]=ja,ra)),+Tr.apply(this,ra),+er.apply(this,(ra[0]=La,ra)),+Tr.apply(this,ra)),kr)return jr=null,kr+""||null}return Fr.source=function(kr){return arguments.length?(xt=kr,Fr):xt},Fr.target=function(kr){return arguments.length?(Vt=kr,Fr):Vt},Fr.x=function(kr){return arguments.length?(er=typeof kr=="function"?kr:w(+kr),Fr):er},Fr.y=function(kr){return arguments.length?(Tr=typeof kr=="function"?kr:w(+kr),Fr):Tr},Fr.context=function(kr){return arguments.length?(jr=kr??null,Fr):jr},Fr}function K(Ze,xt,Vt,er,Tr){Ze.moveTo(xt,Vt),Ze.bezierCurveTo(xt=(xt+er)/2,Vt,xt,Tr,er,Tr)}function H(Ze,xt,Vt,er,Tr){Ze.moveTo(xt,Vt),Ze.bezierCurveTo(xt,Vt=(Vt+Tr)/2,er,Vt,er,Tr)}function Z(Ze,xt,Vt,er,Tr){var jr=ee(xt,Vt),Fr=ee(xt,Vt=(Vt+Tr)/2),kr=ee(er,Vt),ra=ee(er,Tr);Ze.moveTo(jr[0],jr[1]),Ze.bezierCurveTo(Fr[0],Fr[1],kr[0],kr[1],ra[0],ra[1])}function X(){return G(K)}function $(){return G(H)}function Q(){var Ze=G(Z);return Ze.angle=Ze.x,delete Ze.x,Ze.radius=Ze.y,delete Ze.y,Ze}var re={draw:function(Ze,xt){var Vt=Math.sqrt(xt/s);Ze.moveTo(Vt,0),Ze.arc(0,0,Vt,0,p)}},ue={draw:function(Ze,xt){var Vt=Math.sqrt(xt/5)/2;Ze.moveTo(-3*Vt,-Vt),Ze.lineTo(-Vt,-Vt),Ze.lineTo(-Vt,-3*Vt),Ze.lineTo(Vt,-3*Vt),Ze.lineTo(Vt,-Vt),Ze.lineTo(3*Vt,-Vt),Ze.lineTo(3*Vt,Vt),Ze.lineTo(Vt,Vt),Ze.lineTo(Vt,3*Vt),Ze.lineTo(-Vt,3*Vt),Ze.lineTo(-Vt,Vt),Ze.lineTo(-3*Vt,Vt),Ze.closePath()}},pe=Math.sqrt(1/3),ge=pe*2,Te={draw:function(Ze,xt){var Vt=Math.sqrt(xt/ge),er=Vt*pe;Ze.moveTo(0,-Vt),Ze.lineTo(er,0),Ze.lineTo(0,Vt),Ze.lineTo(-er,0),Ze.closePath()}},Se=.8908130915292852,Ce=Math.sin(s/10)/Math.sin(7*s/10),Ue=Math.sin(p/10)*Ce,Oe=-Math.cos(p/10)*Ce,_e={draw:function(Ze,xt){var Vt=Math.sqrt(xt*Se),er=Ue*Vt,Tr=Oe*Vt;Ze.moveTo(0,-Vt),Ze.lineTo(er,Tr);for(var jr=1;jr<5;++jr){var Fr=p*jr/5,kr=Math.cos(Fr),ra=Math.sin(Fr);Ze.lineTo(ra*Vt,-kr*Vt),Ze.lineTo(kr*er-ra*Tr,ra*er+kr*Tr)}Ze.closePath()}},ce={draw:function(Ze,xt){var Vt=Math.sqrt(xt),er=-Vt/2;Ze.rect(er,er,Vt,Vt)}},ie=Math.sqrt(3),se={draw:function(Ze,xt){var Vt=-Math.sqrt(xt/(ie*3));Ze.moveTo(0,Vt*2),Ze.lineTo(-ie*Vt,-Vt),Ze.lineTo(ie*Vt,-Vt),Ze.closePath()}},ne=-.5,be=Math.sqrt(3)/2,De=1/Math.sqrt(12),qe=(De/2+1)*3,Ne={draw:function(Ze,xt){var Vt=Math.sqrt(xt/qe),er=Vt/2,Tr=Vt*De,jr=er,Fr=Vt*De+Vt,kr=-jr,ra=Fr;Ze.moveTo(er,Tr),Ze.lineTo(jr,Fr),Ze.lineTo(kr,ra),Ze.lineTo(ne*er-be*Tr,be*er+ne*Tr),Ze.lineTo(ne*jr-be*Fr,be*jr+ne*Fr),Ze.lineTo(ne*kr-be*ra,be*kr+ne*ra),Ze.lineTo(ne*er+be*Tr,ne*Tr-be*er),Ze.lineTo(ne*jr+be*Fr,ne*Fr-be*jr),Ze.lineTo(ne*kr+be*ra,ne*ra-be*kr),Ze.closePath()}},ut=[re,ue,Te,ce,_e,se,Ne];function ot(){var Ze=w(re),xt=w(64),Vt=null;function er(){var Tr;if(Vt||(Vt=Tr=v.path()),Ze.apply(this,arguments).draw(Vt,+xt.apply(this,arguments)),Tr)return Vt=null,Tr+""||null}return er.type=function(Tr){return arguments.length?(Ze=typeof Tr=="function"?Tr:w(Tr),er):Ze},er.size=function(Tr){return arguments.length?(xt=typeof Tr=="function"?Tr:w(+Tr),er):xt},er.context=function(Tr){return arguments.length?(Vt=Tr??null,er):Vt},er}function yt(){}function At(Ze,xt,Vt){Ze._context.bezierCurveTo((2*Ze._x0+Ze._x1)/3,(2*Ze._y0+Ze._y1)/3,(Ze._x0+2*Ze._x1)/3,(Ze._y0+2*Ze._y1)/3,(Ze._x0+4*Ze._x1+xt)/6,(Ze._y0+4*Ze._y1+Vt)/6)}function It(Ze){this._context=Ze}It.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:At(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ze,xt){switch(Ze=+Ze,xt=+xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ze,xt):this._context.moveTo(Ze,xt);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:At(this,Ze,xt);break}this._x0=this._x1,this._x1=Ze,this._y0=this._y1,this._y1=xt}};function Zt(Ze){return new It(Ze)}function vr(Ze){this._context=Ze}vr.prototype={areaStart:yt,areaEnd:yt,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);break}}},point:function(Ze,xt){switch(Ze=+Ze,xt=+xt,this._point){case 0:this._point=1,this._x2=Ze,this._y2=xt;break;case 1:this._point=2,this._x3=Ze,this._y3=xt;break;case 2:this._point=3,this._x4=Ze,this._y4=xt,this._context.moveTo((this._x0+4*this._x1+Ze)/6,(this._y0+4*this._y1+xt)/6);break;default:At(this,Ze,xt);break}this._x0=this._x1,this._x1=Ze,this._y0=this._y1,this._y1=xt}};function Ut(Ze){return new vr(Ze)}function Jt(Ze){this._context=Ze}Jt.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ze,xt){switch(Ze=+Ze,xt=+xt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Vt=(this._x0+4*this._x1+Ze)/6,er=(this._y0+4*this._y1+xt)/6;this._line?this._context.lineTo(Vt,er):this._context.moveTo(Vt,er);break;case 3:this._point=4;default:At(this,Ze,xt);break}this._x0=this._x1,this._x1=Ze,this._y0=this._y1,this._y1=xt}};function at(Ze){return new Jt(Ze)}function Ee(Ze,xt){this._basis=new It(Ze),this._beta=xt}Ee.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Ze=this._x,xt=this._y,Vt=Ze.length-1;if(Vt>0)for(var er=Ze[0],Tr=xt[0],jr=Ze[Vt]-er,Fr=xt[Vt]-Tr,kr=-1,ra;++kr<=Vt;)ra=kr/Vt,this._basis.point(this._beta*Ze[kr]+(1-this._beta)*(er+ra*jr),this._beta*xt[kr]+(1-this._beta)*(Tr+ra*Fr));this._x=this._y=null,this._basis.lineEnd()},point:function(Ze,xt){this._x.push(+Ze),this._y.push(+xt)}};var Re=function Ze(xt){function Vt(er){return xt===1?new It(er):new Ee(er,xt)}return Vt.beta=function(er){return Ze(+er)},Vt}(.85);function he(Ze,xt,Vt){Ze._context.bezierCurveTo(Ze._x1+Ze._k*(Ze._x2-Ze._x0),Ze._y1+Ze._k*(Ze._y2-Ze._y0),Ze._x2+Ze._k*(Ze._x1-xt),Ze._y2+Ze._k*(Ze._y1-Vt),Ze._x2,Ze._y2)}function ye(Ze,xt){this._context=Ze,this._k=(1-xt)/6}ye.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:he(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ze,xt){switch(Ze=+Ze,xt=+xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ze,xt):this._context.moveTo(Ze,xt);break;case 1:this._point=2,this._x1=Ze,this._y1=xt;break;case 2:this._point=3;default:he(this,Ze,xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ze,this._y0=this._y1,this._y1=this._y2,this._y2=xt}};var Ie=function Ze(xt){function Vt(er){return new ye(er,xt)}return Vt.tension=function(er){return Ze(+er)},Vt}(0);function Fe(Ze,xt){this._context=Ze,this._k=(1-xt)/6}Fe.prototype={areaStart:yt,areaEnd:yt,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);break}}},point:function(Ze,xt){switch(Ze=+Ze,xt=+xt,this._point){case 0:this._point=1,this._x3=Ze,this._y3=xt;break;case 1:this._point=2,this._context.moveTo(this._x4=Ze,this._y4=xt);break;case 2:this._point=3,this._x5=Ze,this._y5=xt;break;default:he(this,Ze,xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ze,this._y0=this._y1,this._y1=this._y2,this._y2=xt}};var He=function Ze(xt){function Vt(er){return new Fe(er,xt)}return Vt.tension=function(er){return Ze(+er)},Vt}(0);function We(Ze,xt){this._context=Ze,this._k=(1-xt)/6}We.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ze,xt){switch(Ze=+Ze,xt=+xt,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:he(this,Ze,xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=Ze,this._y0=this._y1,this._y1=this._y2,this._y2=xt}};var pt=function Ze(xt){function Vt(er){return new We(er,xt)}return Vt.tension=function(er){return Ze(+er)},Vt}(0);function ct(Ze,xt,Vt){var er=Ze._x1,Tr=Ze._y1,jr=Ze._x2,Fr=Ze._y2;if(Ze._l01_a>i){var kr=2*Ze._l01_2a+3*Ze._l01_a*Ze._l12_a+Ze._l12_2a,ra=3*Ze._l01_a*(Ze._l01_a+Ze._l12_a);er=(er*kr-Ze._x0*Ze._l12_2a+Ze._x2*Ze._l01_2a)/ra,Tr=(Tr*kr-Ze._y0*Ze._l12_2a+Ze._y2*Ze._l01_2a)/ra}if(Ze._l23_a>i){var ja=2*Ze._l23_2a+3*Ze._l23_a*Ze._l12_a+Ze._l12_2a,La=3*Ze._l23_a*(Ze._l23_a+Ze._l12_a);jr=(jr*ja+Ze._x1*Ze._l23_2a-xt*Ze._l12_2a)/La,Fr=(Fr*ja+Ze._y1*Ze._l23_2a-Vt*Ze._l12_2a)/La}Ze._context.bezierCurveTo(er,Tr,jr,Fr,Ze._x2,Ze._y2)}function ft(Ze,xt){this._context=Ze,this._alpha=xt}ft.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ze,xt){if(Ze=+Ze,xt=+xt,this._point){var Vt=this._x2-Ze,er=this._y2-xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Vt*Vt+er*er,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ze,xt):this._context.moveTo(Ze,xt);break;case 1:this._point=2;break;case 2:this._point=3;default:ct(this,Ze,xt);break}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=Ze,this._y0=this._y1,this._y1=this._y2,this._y2=xt}};var mt=function Ze(xt){function Vt(er){return xt?new ft(er,xt):new ye(er,0)}return Vt.alpha=function(er){return Ze(+er)},Vt}(.5);function _t(Ze,xt){this._context=Ze,this._alpha=xt}_t.prototype={areaStart:yt,areaEnd:yt,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);break}}},point:function(Ze,xt){if(Ze=+Ze,xt=+xt,this._point){var Vt=this._x2-Ze,er=this._y2-xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Vt*Vt+er*er,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Ze,this._y3=xt;break;case 1:this._point=2,this._context.moveTo(this._x4=Ze,this._y4=xt);break;case 2:this._point=3,this._x5=Ze,this._y5=xt;break;default:ct(this,Ze,xt);break}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=Ze,this._y0=this._y1,this._y1=this._y2,this._y2=xt}};var Bt=function Ze(xt){function Vt(er){return xt?new _t(er,xt):new Fe(er,0)}return Vt.alpha=function(er){return Ze(+er)},Vt}(.5);function Et(Ze,xt){this._context=Ze,this._alpha=xt}Et.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Ze,xt){if(Ze=+Ze,xt=+xt,this._point){var Vt=this._x2-Ze,er=this._y2-xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Vt*Vt+er*er,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:ct(this,Ze,xt);break}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=Ze,this._y0=this._y1,this._y1=this._y2,this._y2=xt}};var hr=function Ze(xt){function Vt(er){return xt?new Et(er,xt):new We(er,0)}return Vt.alpha=function(er){return Ze(+er)},Vt}(.5);function $r(Ze){this._context=Ze}$r.prototype={areaStart:yt,areaEnd:yt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Ze,xt){Ze=+Ze,xt=+xt,this._point?this._context.lineTo(Ze,xt):(this._point=1,this._context.moveTo(Ze,xt))}};function ca(Ze){return new $r(Ze)}function na(Ze){return Ze<0?-1:1}function wa(Ze,xt,Vt){var er=Ze._x1-Ze._x0,Tr=xt-Ze._x1,jr=(Ze._y1-Ze._y0)/(er||Tr<0&&-0),Fr=(Vt-Ze._y1)/(Tr||er<0&&-0),kr=(jr*Tr+Fr*er)/(er+Tr);return(na(jr)+na(Fr))*Math.min(Math.abs(jr),Math.abs(Fr),.5*Math.abs(kr))||0}function pa(Ze,xt){var Vt=Ze._x1-Ze._x0;return Vt?(3*(Ze._y1-Ze._y0)/Vt-xt)/2:xt}function fa(Ze,xt,Vt){var er=Ze._x0,Tr=Ze._y0,jr=Ze._x1,Fr=Ze._y1,kr=(jr-er)/3;Ze._context.bezierCurveTo(er+kr,Tr+kr*xt,jr-kr,Fr-kr*Vt,jr,Fr)}function za(Ze){this._context=Ze}za.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:fa(this,this._t0,pa(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Ze,xt){var Vt=NaN;if(Ze=+Ze,xt=+xt,!(Ze===this._x1&&xt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Ze,xt):this._context.moveTo(Ze,xt);break;case 1:this._point=2;break;case 2:this._point=3,fa(this,pa(this,Vt=wa(this,Ze,xt)),Vt);break;default:fa(this,this._t0,Vt=wa(this,Ze,xt));break}this._x0=this._x1,this._x1=Ze,this._y0=this._y1,this._y1=xt,this._t0=Vt}}};function Ia(Ze){this._context=new Va(Ze)}(Ia.prototype=Object.create(za.prototype)).point=function(Ze,xt){za.prototype.point.call(this,xt,Ze)};function Va(Ze){this._context=Ze}Va.prototype={moveTo:function(Ze,xt){this._context.moveTo(xt,Ze)},closePath:function(){this._context.closePath()},lineTo:function(Ze,xt){this._context.lineTo(xt,Ze)},bezierCurveTo:function(Ze,xt,Vt,er,Tr,jr){this._context.bezierCurveTo(xt,Ze,er,Vt,jr,Tr)}};function Oa(Ze){return new za(Ze)}function tn(Ze){return new Ia(Ze)}function ka(Ze){this._context=Ze}ka.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Ze=this._x,xt=this._y,Vt=Ze.length;if(Vt)if(this._line?this._context.lineTo(Ze[0],xt[0]):this._context.moveTo(Ze[0],xt[0]),Vt===2)this._context.lineTo(Ze[1],xt[1]);else for(var er=oi(Ze),Tr=oi(xt),jr=0,Fr=1;Fr=0;--xt)Tr[xt]=(Fr[xt]-Tr[xt+1])/jr[xt];for(jr[Vt-1]=(Ze[Vt]+Tr[Vt-1])/2,xt=0;xt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Ze,xt){switch(Ze=+Ze,xt=+xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(Ze,xt):this._context.moveTo(Ze,xt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,xt),this._context.lineTo(Ze,xt);else{var Vt=this._x*(1-this._t)+Ze*this._t;this._context.lineTo(Vt,this._y),this._context.lineTo(Vt,xt)}break}}this._x=Ze,this._y=xt}};function ci(Ze){return new bn(Ze,.5)}function hi(Ze){return new bn(Ze,0)}function Pi(Ze){return new bn(Ze,1)}function Jn(Ze,xt){if((Fr=Ze.length)>1)for(var Vt=1,er,Tr,jr=Ze[xt[0]],Fr,kr=jr.length;Vt=0;)Vt[xt]=xt;return Vt}function _n(Ze,xt){return Ze[xt]}function Ln(){var Ze=w([]),xt=Ti,Vt=Jn,er=_n;function Tr(jr){var Fr=Ze.apply(this,arguments),kr,ra=jr.length,ja=Fr.length,La=new Array(ja),Dn;for(kr=0;kr0){for(var Vt,er,Tr=0,jr=Ze[0].length,Fr;Tr0)for(var Vt,er=0,Tr,jr,Fr,kr,ra,ja=Ze[xt[0]].length;er0?(Tr[0]=Fr,Tr[1]=Fr+=jr):jr<0?(Tr[1]=kr,Tr[0]=kr+=jr):(Tr[0]=0,Tr[1]=jr)}function un(Ze,xt){if((Tr=Ze.length)>0){for(var Vt=0,er=Ze[xt[0]],Tr,jr=er.length;Vt0)||!((jr=(Tr=Ze[xt[0]]).length)>0))){for(var Vt=0,er=1,Tr,jr,Fr;erjr&&(jr=Tr,Vt=xt);return Vt}function Qt(Ze){var xt=Ze.map(Xt);return Ti(Ze).sort(function(Vt,er){return xt[Vt]-xt[er]})}function Xt(Ze){for(var xt=0,Vt=-1,er=Ze.length,Tr;++Vt[C(Ue,Oe,Te),Ue]));for(let[Ue,Oe]of Se.entries()){Oe.index=Ue;let{source:_e,target:ce}=Oe;typeof _e!="object"&&(_e=Oe.source=y(Ce,_e)),typeof ce!="object"&&(ce=Oe.target=y(Ce,ce)),_e.sourceLinks.push(Oe),ce.targetLinks.push(Oe)}if(z!=null)for(let{sourceLinks:Ue,targetLinks:Oe}of Te)Ue.sort(z),Oe.sort(z)}function ee({nodes:Te}){for(let Se of Te)Se.value=Se.fixedValue===void 0?Math.max(v.sum(Se.sourceLinks,c),v.sum(Se.targetLinks,c)):Se.fixedValue}function te({nodes:Te}){let Se=Te.length,Ce=new Set(Te),Ue=new Set,Oe=0;for(;Ce.size;){for(let _e of Ce){_e.depth=Oe;for(let{target:ce}of _e.sourceLinks)Ue.add(ce)}if(++Oe>Se)throw new Error("circular link");Ce=Ue,Ue=new Set}}function ae({nodes:Te}){let Se=Te.length,Ce=new Set(Te),Ue=new Set,Oe=0;for(;Ce.size;){for(let _e of Ce){_e.height=Oe;for(let{source:ce}of _e.targetLinks)Ue.add(ce)}if(++Oe>Se)throw new Error("circular link");Ce=Ue,Ue=new Set}}function j({nodes:Te}){let Se=v.max(Te,Oe=>Oe.depth)+1,Ce=(m-g-x)/(Se-1),Ue=new Array(Se);for(let Oe of Te){let _e=Math.max(0,Math.min(Se-1,Math.floor(F.call(null,Oe,Se))));Oe.layer=_e,Oe.x0=g+_e*Ce,Oe.x1=Oe.x0+x,Ue[_e]?Ue[_e].push(Oe):Ue[_e]=[Oe]}if(I)for(let Oe of Ue)Oe.sort(I);return Ue}function G(Te){let Se=v.min(Te,Ce=>(h-T-(Ce.length-1)*D)/v.sum(Ce,c));for(let Ce of Te){let Ue=T;for(let Oe of Ce){Oe.y0=Ue,Oe.y1=Ue+Oe.value*Se,Ue=Oe.y1+D;for(let _e of Oe.sourceLinks)_e.width=_e.value*Se}Ue=(h-Ue+D)/(Ce.length+1);for(let Oe=0;OeCe.length)-1)),G(Se);for(let Ce=0;Ce0))continue;let ne=(ie/se-ce.y0)*Se;ce.y0+=ne,ce.y1+=ne,re(ce)}I===void 0&&_e.sort(s),X(_e,Ce)}}function Z(Te,Se,Ce){for(let Ue=Te.length,Oe=Ue-2;Oe>=0;--Oe){let _e=Te[Oe];for(let ce of _e){let ie=0,se=0;for(let{target:be,value:De}of ce.sourceLinks){let qe=De*(be.layer-ce.layer);ie+=ge(ce,be)*qe,se+=qe}if(!(se>0))continue;let ne=(ie/se-ce.y0)*Se;ce.y0+=ne,ce.y1+=ne,re(ce)}I===void 0&&_e.sort(s),X(_e,Ce)}}function X(Te,Se){let Ce=Te.length>>1,Ue=Te[Ce];Q(Te,Ue.y0-D,Ce-1,Se),$(Te,Ue.y1+D,Ce+1,Se),Q(Te,h,Te.length-1,Se),$(Te,T,0,Se)}function $(Te,Se,Ce,Ue){for(;Ce1e-6&&(Oe.y0+=_e,Oe.y1+=_e),Se=Oe.y1+D}}function Q(Te,Se,Ce,Ue){for(;Ce>=0;--Ce){let Oe=Te[Ce],_e=(Oe.y1-Se)*Ue;_e>1e-6&&(Oe.y0-=_e,Oe.y1-=_e),Se=Oe.y0-D}}function re({sourceLinks:Te,targetLinks:Se}){if(z===void 0){for(let{source:{sourceLinks:Ce}}of Se)Ce.sort(i);for(let{target:{targetLinks:Ce}}of Te)Ce.sort(n)}}function ue(Te){if(z===void 0)for(let{sourceLinks:Se,targetLinks:Ce}of Te)Se.sort(i),Ce.sort(n)}function pe(Te,Se){let Ce=Te.y0-(Te.sourceLinks.length-1)*D/2;for(let{target:Ue,width:Oe}of Te.sourceLinks){if(Ue===Se)break;Ce+=Oe+D}for(let{source:Ue,width:Oe}of Se.targetLinks){if(Ue===Te)break;Ce-=Oe}return Ce}function ge(Te,Se){let Ce=Se.y0-(Se.targetLinks.length-1)*D/2;for(let{source:Ue,width:Oe}of Se.targetLinks){if(Ue===Te)break;Ce+=Oe+D}for(let{target:Ue,width:Oe}of Te.sourceLinks){if(Ue===Se)break;Ce-=Oe}return Ce}return q}function M(g){return[g.source.x1,g.y0]}function A(g){return[g.target.x0,g.y1]}function E(){return w.linkHorizontal().source(M).target(A)}u.sankey=b,u.sankeyCenter=a,u.sankeyJustify=t,u.sankeyLeft=l,u.sankeyLinkHorizontal=E,u.sankeyRight=e,Object.defineProperty(u,"__esModule",{value:!0})})}}),r7=xe({"node_modules/elementary-circuits-directed-graph/johnson.js"(U,O){var u=rw();O.exports=function(w,S){var l=[],e=[],t=[],a={},r=[],n;function i(A){t[A]=!1,a.hasOwnProperty(A)&&Object.keys(a[A]).forEach(function(E){delete a[A][E],t[E]&&i(E)})}function s(A){var E=!1;e.push(A),t[A]=!0;var g,T;for(g=0;g=A})}function f(A){p(A);for(var E=w,g=u(E),T=g.components.filter(function(F){return F.length>1}),m=1/0,h,x=0;x"u"?"undefined":s(ye))!=="object"&&(ye=Re.source=g(Ee,ye)),(typeof Ie>"u"?"undefined":s(Ie))!=="object"&&(Ie=Re.target=g(Ee,Ie)),ye.sourceLinks.push(Re),Ie.targetLinks.push(Re)}),at}function At(at){at.nodes.forEach(function(Ee){Ee.partOfCycle=!1,Ee.value=Math.max(v.sum(Ee.sourceLinks,d),v.sum(Ee.targetLinks,d)),Ee.sourceLinks.forEach(function(Re){Re.circular&&(Ee.partOfCycle=!0,Ee.circularLinkType=Re.circularLinkType)}),Ee.targetLinks.forEach(function(Re){Re.circular&&(Ee.partOfCycle=!0,Ee.circularLinkType=Re.circularLinkType)})})}function It(at){var Ee=0,Re=0,he=0,ye=0,Ie=v.max(at.nodes,function(Fe){return Fe.column});return at.links.forEach(function(Fe){Fe.circular&&(Fe.circularLinkType=="top"?Ee=Ee+Fe.width:Re=Re+Fe.width,Fe.target.column==0&&(ye=ye+Fe.width),Fe.source.column==Ie&&(he=he+Fe.width))}),Ee=Ee>0?Ee+m+h:Ee,Re=Re>0?Re+m+h:Re,he=he>0?he+m+h:he,ye=ye>0?ye+m+h:ye,{top:Ee,bottom:Re,left:ye,right:he}}function Zt(at,Ee){var Re=v.max(at.nodes,function(pt){return pt.column}),he=Ue-Se,ye=Oe-Ce,Ie=he+Ee.right+Ee.left,Fe=ye+Ee.top+Ee.bottom,He=he/Ie,We=ye/Fe;return Se=Se*He+Ee.left,Ue=Ee.right==0?Ue:Ue*He,Ce=Ce*We+Ee.top,Oe=Oe*We,at.nodes.forEach(function(pt){pt.x0=Se+pt.column*((Ue-Se-_e)/Re),pt.x1=pt.x0+_e}),We}function vr(at){var Ee,Re,he;for(Ee=at.nodes,Re=[],he=0;Ee.length;++he,Ee=Re,Re=[])Ee.forEach(function(ye){ye.depth=he,ye.sourceLinks.forEach(function(Ie){Re.indexOf(Ie.target)<0&&!Ie.circular&&Re.push(Ie.target)})});for(Ee=at.nodes,Re=[],he=0;Ee.length;++he,Ee=Re,Re=[])Ee.forEach(function(ye){ye.height=he,ye.targetLinks.forEach(function(Ie){Re.indexOf(Ie.source)<0&&!Ie.circular&&Re.push(Ie.source)})});at.nodes.forEach(function(ye){ye.column=Math.floor(se.call(null,ye,he))})}function Ut(at,Ee,Re){var he=w.nest().key(function(pt){return pt.column}).sortKeys(v.ascending).entries(at.nodes).map(function(pt){return pt.values});Fe(Re),We();for(var ye=1,Ie=Ee;Ie>0;--Ie)He(ye*=.99,Re),We();function Fe(pt){if(Ne){var ct=1/0;he.forEach(function(Bt){var Et=Oe*Ne/(Bt.length+1);ct=Et0))if(Bt==0&&_t==1)hr=Et.y1-Et.y0,Et.y0=Oe/2-hr/2,Et.y1=Oe/2+hr/2;else if(Bt==ft-1&&_t==1)hr=Et.y1-Et.y0,Et.y0=Oe/2-hr/2,Et.y1=Oe/2+hr/2;else{var $r=0,ca=v.mean(Et.sourceLinks,b),na=v.mean(Et.targetLinks,o);ca&&na?$r=(ca+na)/2:$r=ca||na;var wa=($r-y(Et))*pt;Et.y0+=wa,Et.y1+=wa}})})}function We(){he.forEach(function(pt){var ct,ft,mt=Ce,_t=pt.length,Bt;for(pt.sort(f),Bt=0;Bt<_t;++Bt)ct=pt[Bt],ft=mt-ct.y0,ft>0&&(ct.y0+=ft,ct.y1+=ft),mt=ct.y1+ce;if(ft=mt-ce-Oe,ft>0)for(mt=ct.y0-=ft,ct.y1-=ft,Bt=_t-2;Bt>=0;--Bt)ct=pt[Bt],ft=ct.y1+ce-mt,ft>0&&(ct.y0-=ft,ct.y1-=ft),mt=ct.y0})}}function Jt(at){at.nodes.forEach(function(Ee){Ee.sourceLinks.sort(p),Ee.targetLinks.sort(c)}),at.nodes.forEach(function(Ee){var Re=Ee.y0,he=Re,ye=Ee.y1,Ie=ye;Ee.sourceLinks.forEach(function(Fe){Fe.circular?(Fe.y0=ye-Fe.width/2,ye=ye-Fe.width):(Fe.y0=Re+Fe.width/2,Re+=Fe.width)}),Ee.targetLinks.forEach(function(Fe){Fe.circular?(Fe.y1=Ie-Fe.width/2,Ie=Ie-Fe.width):(Fe.y1=he+Fe.width/2,he+=Fe.width)})})}return ot}function D(Se,Ce,Ue){var Oe=0;if(Ue===null){for(var _e=[],ce=0;ceCe.source.column)}function z(Se,Ce){var Ue=0;Se.sourceLinks.forEach(function(_e){Ue=_e.circular&&!ge(_e,Ce)?Ue+1:Ue});var Oe=0;return Se.targetLinks.forEach(function(_e){Oe=_e.circular&&!ge(_e,Ce)?Oe+1:Oe}),Ue+Oe}function R(Se){var Ce=Se.source.sourceLinks,Ue=0;Ce.forEach(function(ce){Ue=ce.circular?Ue+1:Ue});var Oe=Se.target.targetLinks,_e=0;return Oe.forEach(function(ce){_e=ce.circular?_e+1:_e}),!(Ue>1||_e>1)}function k(Se,Ce,Ue){return Se.sort(q),Se.forEach(function(Oe,_e){var ce=0;if(ge(Oe,Ue)&&R(Oe))Oe.circularPathData.verticalBuffer=ce+Oe.width/2;else{var ie=0;for(ie;ie<_e;ie++)if(I(Se[_e],Se[ie])){var se=Se[ie].circularPathData.verticalBuffer+Se[ie].width/2+Ce;ce=se>ce?se:ce}Oe.circularPathData.verticalBuffer=ce+Oe.width/2}}),Se}function B(Se,Ce,Ue,Oe){var _e=5,ce=v.min(Se.links,function(ne){return ne.source.y0});Se.links.forEach(function(ne){ne.circular&&(ne.circularPathData={})});var ie=Se.links.filter(function(ne){return ne.circularLinkType=="top"});k(ie,Ce,Oe);var se=Se.links.filter(function(ne){return ne.circularLinkType=="bottom"});k(se,Ce,Oe),Se.links.forEach(function(ne){if(ne.circular){if(ne.circularPathData.arcRadius=ne.width+h,ne.circularPathData.leftNodeBuffer=_e,ne.circularPathData.rightNodeBuffer=_e,ne.circularPathData.sourceWidth=ne.source.x1-ne.source.x0,ne.circularPathData.sourceX=ne.source.x0+ne.circularPathData.sourceWidth,ne.circularPathData.targetX=ne.target.x0,ne.circularPathData.sourceY=ne.y0,ne.circularPathData.targetY=ne.y1,ge(ne,Oe)&&R(ne))ne.circularPathData.leftSmallArcRadius=h+ne.width/2,ne.circularPathData.leftLargeArcRadius=h+ne.width/2,ne.circularPathData.rightSmallArcRadius=h+ne.width/2,ne.circularPathData.rightLargeArcRadius=h+ne.width/2,ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=ne.source.y1+m+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=ne.source.y0-m-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius);else{var be=ne.source.column,De=ne.circularLinkType,qe=Se.links.filter(function(ot){return ot.source.column==be&&ot.circularLinkType==De});ne.circularLinkType=="bottom"?qe.sort(ee):qe.sort(Y);var Ne=0;qe.forEach(function(ot,yt){ot.circularLinkID==ne.circularLinkID&&(ne.circularPathData.leftSmallArcRadius=h+ne.width/2+Ne,ne.circularPathData.leftLargeArcRadius=h+ne.width/2+yt*Ce+Ne),Ne=Ne+ot.width}),be=ne.target.column,qe=Se.links.filter(function(ot){return ot.target.column==be&&ot.circularLinkType==De}),ne.circularLinkType=="bottom"?qe.sort(ae):qe.sort(te),Ne=0,qe.forEach(function(ot,yt){ot.circularLinkID==ne.circularLinkID&&(ne.circularPathData.rightSmallArcRadius=h+ne.width/2+Ne,ne.circularPathData.rightLargeArcRadius=h+ne.width/2+yt*Ce+Ne),Ne=Ne+ot.width}),ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=Math.max(Ue,ne.source.y1,ne.target.y1)+m+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=ce-m-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius)}ne.circularPathData.leftInnerExtent=ne.circularPathData.sourceX+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightInnerExtent=ne.circularPathData.targetX-ne.circularPathData.rightNodeBuffer,ne.circularPathData.leftFullExtent=ne.circularPathData.sourceX+ne.circularPathData.leftLargeArcRadius+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightFullExtent=ne.circularPathData.targetX-ne.circularPathData.rightLargeArcRadius-ne.circularPathData.rightNodeBuffer}if(ne.circular)ne.path=N(ne);else{var ut=S.linkHorizontal().source(function(ot){var yt=ot.source.x0+(ot.source.x1-ot.source.x0),At=ot.y0;return[yt,At]}).target(function(ot){var yt=ot.target.x0,At=ot.y1;return[yt,At]});ne.path=ut(ne)}})}function N(Se){var Ce="";return Se.circularLinkType=="top"?Ce="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 0 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY-Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 0 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 0 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY-Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 0 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY:Ce="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 1 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY+Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 1 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 1 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY+Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 1 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY,Ce}function q(Se,Ce){return j(Se)==j(Ce)?Se.circularLinkType=="bottom"?ee(Se,Ce):Y(Se,Ce):j(Ce)-j(Se)}function Y(Se,Ce){return Se.y0-Ce.y0}function ee(Se,Ce){return Ce.y0-Se.y0}function te(Se,Ce){return Se.y1-Ce.y1}function ae(Se,Ce){return Ce.y1-Se.y1}function j(Se){return Se.target.column-Se.source.column}function G(Se){return Se.target.x0-Se.source.x1}function K(Se,Ce){var Ue=F(Se),Oe=G(Ce)/Math.tan(Ue),_e=pe(Se)=="up"?Se.y1+Oe:Se.y1-Oe;return _e}function H(Se,Ce){var Ue=F(Se),Oe=G(Ce)/Math.tan(Ue),_e=pe(Se)=="up"?Se.y1-Oe:Se.y1+Oe;return _e}function Z(Se,Ce,Ue,Oe){Se.links.forEach(function(_e){if(!_e.circular&&_e.target.column-_e.source.column>1){var ce=_e.source.column+1,ie=_e.target.column-1,se=1,ne=ie-ce+1;for(se=1;ce<=ie;ce++,se++)Se.nodes.forEach(function(be){if(be.column==ce){var De=se/(ne+1),qe=Math.pow(1-De,3),Ne=3*De*Math.pow(1-De,2),ut=3*Math.pow(De,2)*(1-De),ot=Math.pow(De,3),yt=qe*_e.y0+Ne*_e.y0+ut*_e.y1+ot*_e.y1,At=yt-_e.width/2,It=yt+_e.width/2,Zt;At>be.y0&&Atbe.y0&&Itbe.y1&&$(vr,Zt,Ce,Ue)})):Atbe.y1&&(Zt=It-be.y0+10,be=$(be,Zt,Ce,Ue),Se.nodes.forEach(function(vr){T(vr,Oe)==T(be,Oe)||vr.column!=be.column||vr.y0be.y1&&$(vr,Zt,Ce,Ue)}))}})}})}function X(Se,Ce){return Se.y0>Ce.y0&&Se.y0Ce.y0&&Se.y1Ce.y1}function $(Se,Ce,Ue,Oe){return Se.y0+Ce>=Ue&&Se.y1+Ce<=Oe&&(Se.y0=Se.y0+Ce,Se.y1=Se.y1+Ce,Se.targetLinks.forEach(function(_e){_e.y1=_e.y1+Ce}),Se.sourceLinks.forEach(function(_e){_e.y0=_e.y0+Ce})),Se}function Q(Se,Ce,Ue,Oe){Se.nodes.forEach(function(_e){Oe&&_e.y+(_e.y1-_e.y0)>Ce&&(_e.y=_e.y-(_e.y+(_e.y1-_e.y0)-Ce));var ce=Se.links.filter(function(ne){return T(ne.source,Ue)==T(_e,Ue)}),ie=ce.length;ie>1&&ce.sort(function(ne,be){if(!ne.circular&&!be.circular){if(ne.target.column==be.target.column)return ne.y1-be.y1;if(ue(ne,be)){if(ne.target.column>be.target.column){var De=H(be,ne);return ne.y1-De}if(be.target.column>ne.target.column){var qe=H(ne,be);return qe-be.y1}}else return ne.y1-be.y1}if(ne.circular&&!be.circular)return ne.circularLinkType=="top"?-1:1;if(be.circular&&!ne.circular)return be.circularLinkType=="top"?1:-1;if(ne.circular&&be.circular)return ne.circularLinkType===be.circularLinkType&&ne.circularLinkType=="top"?ne.target.column===be.target.column?ne.target.y1-be.target.y1:be.target.column-ne.target.column:ne.circularLinkType===be.circularLinkType&&ne.circularLinkType=="bottom"?ne.target.column===be.target.column?be.target.y1-ne.target.y1:ne.target.column-be.target.column:ne.circularLinkType=="top"?-1:1});var se=_e.y0;ce.forEach(function(ne){ne.y0=se+ne.width/2,se=se+ne.width}),ce.forEach(function(ne,be){if(ne.circularLinkType=="bottom"){var De=be+1,qe=0;for(De;De1&&_e.sort(function(se,ne){if(!se.circular&&!ne.circular){if(se.source.column==ne.source.column)return se.y0-ne.y0;if(ue(se,ne)){if(ne.source.column0?"up":"down"}function ge(Se,Ce){return T(Se.source,Ce)==T(Se.target,Ce)}function Te(Se,Ce,Ue){var Oe=Se.nodes,_e=Se.links,ce=!1,ie=!1;if(_e.forEach(function(Ne){Ne.circularLinkType=="top"?ce=!0:Ne.circularLinkType=="bottom"&&(ie=!0)}),ce==!1||ie==!1){var se=v.min(Oe,function(Ne){return Ne.y0}),ne=v.max(Oe,function(Ne){return Ne.y1}),be=ne-se,De=Ue-Ce,qe=De/be;Oe.forEach(function(Ne){var ut=(Ne.y1-Ne.y0)*qe;Ne.y0=(Ne.y0-se)*qe,Ne.y1=Ne.y0+ut}),_e.forEach(function(Ne){Ne.y0=(Ne.y0-se)*qe,Ne.y1=(Ne.y1-se)*qe,Ne.width=Ne.width*qe})}}u.sankeyCircular=_,u.sankeyCenter=n,u.sankeyLeft=t,u.sankeyRight=a,u.sankeyJustify=r,Object.defineProperty(u,"__esModule",{value:!0})})}}),iw=xe({"src/traces/sankey/constants.js"(U,O){"use strict";O.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),n7=xe({"src/traces/sankey/render.js"(U,O){"use strict";var u=QL(),v=(zv(),Ta(Yd)).interpolateNumber,w=Na(),S=t7(),l=a7(),e=iw(),t=wi(),a=go(),r=Sr(),n=r.strTranslate,i=r.strRotate,s=Xh(),c=s.keyFun,p=s.repeat,f=s.unwrap,d=el(),y=Ci(),o=uc(),b=o.CAP_SHIFT,M=o.LINE_SPACING,A=3;function E(G,K,H){var Z=f(K),X=Z.trace,$=X.domain,Q=X.orientation==="h",re=X.node.pad,ue=X.node.thickness,pe={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[X.node.align],ge=G.width*($.x[1]-$.x[0]),Te=G.height*($.y[1]-$.y[0]),Se=Z._nodes,Ce=Z._links,Ue=Z.circular,Oe;Ue?Oe=l.sankeyCircular().circularLinkGap(0):Oe=S.sankey(),Oe.iterations(e.sankeyIterations).size(Q?[ge,Te]:[Te,ge]).nodeWidth(ue).nodePadding(re).nodeId(function(vr){return vr.pointNumber}).nodeAlign(pe).nodes(Se).links(Ce);function _e(vr){X[vr].sort==="input"&&(Ue?r.warn(`Circular Sankey diagrams do not support the "input" ${vr}.sort mode; falling back to the default sort.`):Oe[`${vr}Sort`](null))}_e("link"),_e("node");var ce=Oe();Oe.nodePadding()=Ee||(at=Ee-Jt.y0,at>1e-6&&(Jt.y0+=at,Jt.y1+=at)),Ee=Jt.y1+re})}function yt(vr){var Ut=vr.map(function(Ie,Fe){return{x0:Ie.x0,index:Fe}}).sort(function(Ie,Fe){return Ie.x0-Fe.x0}),Jt=[],at=-1,Ee,Re=-1/0,he;for(ie=0;ieRe+ue&&(at+=1,Ee=ye.x0),Re=ye.x0,Jt[at]||(Jt[at]=[]),Jt[at].push(ye),he=Ee-ye.x0,ye.x0+=he,ye.x1+=he}return Jt}if(X.node.x.length&&X.node.y.length){for(ie=0;ie0?" L "+X.targetX+" "+X.targetY:"")+"Z"):(H="M "+(X.targetX-K)+" "+(X.targetY-Z)+" L "+(X.rightInnerExtent-K)+" "+(X.targetY-Z)+" A "+(X.rightLargeArcRadius+Z)+" "+(X.rightSmallArcRadius+Z)+" 0 0 0 "+(X.rightFullExtent-Z-K)+" "+(X.targetY+X.rightSmallArcRadius)+" L "+(X.rightFullExtent-Z-K)+" "+X.verticalRightInnerExtent,$&&Q?H+=" A "+(X.rightLargeArcRadius+Z)+" "+(X.rightLargeArcRadius+Z)+" 0 0 0 "+(X.rightInnerExtent-Z-K)+" "+(X.verticalFullExtent+Z)+" L "+(X.rightFullExtent+Z-K-(X.rightLargeArcRadius-Z))+" "+(X.verticalFullExtent+Z)+" A "+(X.rightLargeArcRadius+Z)+" "+(X.rightLargeArcRadius+Z)+" 0 0 0 "+(X.leftFullExtent+Z)+" "+X.verticalLeftInnerExtent:$?H+=" A "+(X.rightLargeArcRadius-Z)+" "+(X.rightSmallArcRadius-Z)+" 0 0 1 "+(X.rightFullExtent-K-Z-(X.rightLargeArcRadius-Z))+" "+(X.verticalFullExtent-Z)+" L "+(X.leftFullExtent+Z+(X.rightLargeArcRadius-Z))+" "+(X.verticalFullExtent-Z)+" A "+(X.rightLargeArcRadius-Z)+" "+(X.rightSmallArcRadius-Z)+" 0 0 1 "+(X.leftFullExtent+Z)+" "+X.verticalLeftInnerExtent:H+=" A "+(X.rightLargeArcRadius+Z)+" "+(X.rightLargeArcRadius+Z)+" 0 0 0 "+(X.rightInnerExtent-K)+" "+(X.verticalFullExtent+Z)+" L "+X.leftInnerExtent+" "+(X.verticalFullExtent+Z)+" A "+(X.leftLargeArcRadius+Z)+" "+(X.leftLargeArcRadius+Z)+" 0 0 0 "+(X.leftFullExtent+Z)+" "+X.verticalLeftInnerExtent,H+=" L "+(X.leftFullExtent+Z)+" "+(X.sourceY+X.leftSmallArcRadius)+" A "+(X.leftLargeArcRadius+Z)+" "+(X.leftSmallArcRadius+Z)+" 0 0 0 "+X.leftInnerExtent+" "+(X.sourceY-Z)+" L "+X.sourceX+" "+(X.sourceY-Z)+" L "+X.sourceX+" "+(X.sourceY+Z)+" L "+X.leftInnerExtent+" "+(X.sourceY+Z)+" A "+(X.leftLargeArcRadius-Z)+" "+(X.leftSmallArcRadius-Z)+" 0 0 1 "+(X.leftFullExtent-Z)+" "+(X.sourceY+X.leftSmallArcRadius)+" L "+(X.leftFullExtent-Z)+" "+X.verticalLeftInnerExtent,$&&Q?H+=" A "+(X.rightLargeArcRadius-Z)+" "+(X.rightSmallArcRadius-Z)+" 0 0 1 "+(X.leftFullExtent-Z-(X.rightLargeArcRadius-Z))+" "+(X.verticalFullExtent-Z)+" L "+(X.rightFullExtent+Z-K+(X.rightLargeArcRadius-Z))+" "+(X.verticalFullExtent-Z)+" A "+(X.rightLargeArcRadius-Z)+" "+(X.rightSmallArcRadius-Z)+" 0 0 1 "+(X.rightFullExtent+Z-K)+" "+X.verticalRightInnerExtent:$?H+=" A "+(X.rightLargeArcRadius+Z)+" "+(X.rightLargeArcRadius+Z)+" 0 0 0 "+(X.leftFullExtent+Z)+" "+(X.verticalFullExtent+Z)+" L "+(X.rightFullExtent-K-Z)+" "+(X.verticalFullExtent+Z)+" A "+(X.rightLargeArcRadius+Z)+" "+(X.rightLargeArcRadius+Z)+" 0 0 0 "+(X.rightFullExtent+Z-K)+" "+X.verticalRightInnerExtent:H+=" A "+(X.leftLargeArcRadius-Z)+" "+(X.leftLargeArcRadius-Z)+" 0 0 1 "+X.leftInnerExtent+" "+(X.verticalFullExtent-Z)+" L "+(X.rightInnerExtent-K)+" "+(X.verticalFullExtent-Z)+" A "+(X.rightLargeArcRadius-Z)+" "+(X.rightLargeArcRadius-Z)+" 0 0 1 "+(X.rightFullExtent+Z-K)+" "+X.verticalRightInnerExtent,H+=" L "+(X.rightFullExtent+Z-K)+" "+(X.targetY+X.rightSmallArcRadius)+" A "+(X.rightLargeArcRadius-Z)+" "+(X.rightSmallArcRadius-Z)+" 0 0 1 "+(X.rightInnerExtent-K)+" "+(X.targetY+Z)+" L "+(X.targetX-K)+" "+(X.targetY+Z)+(K>0?" L "+X.targetX+" "+X.targetY:"")+"Z"),H}function m(){var G=.5;function K(H){var Z=H.linkArrowLength;if(H.link.circular)return T(H.link,Z);var X=Math.abs((H.link.target.x0-H.link.source.x1)/2);Z>X&&(Z=X);var $=H.link.source.x1,Q=H.link.target.x0-Z,re=v($,Q),ue=re(G),pe=re(1-G),ge=H.link.y0-H.link.width/2,Te=H.link.y0+H.link.width/2,Se=H.link.y1-H.link.width/2,Ce=H.link.y1+H.link.width/2,Ue="M"+$+","+ge,Oe="C"+ue+","+ge+" "+pe+","+Se+" "+Q+","+Se,_e="C"+pe+","+Ce+" "+ue+","+Te+" "+$+","+Te,ce=Z>0?"L"+(Q+Z)+","+(Se+H.link.width/2):"";return ce+="L"+Q+","+Ce,Ue+Oe+ce+_e+"Z"}return K}function h(G,K){var H=e.nodePadAcross,Z=G.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var X=K.dx,$=Math.max(.5,K.dy),Q="node_"+K.pointNumber;return K.group&&(Q=r.randstr()),K.trace=G.trace,K.curveNumber=G.trace.index,{index:K.pointNumber,key:Q,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:G.key,trace:G.trace,node:K,nodePad:G.nodePad,nodeLineColor:G.nodeLineColor,nodeLineWidth:G.nodeLineWidth,textFont:G.textFont,size:G.horizontal?G.height:G.width,visibleWidth:Math.ceil(X),visibleHeight:$,zoneX:-H,zoneY:-Z,zoneWidth:X+2*H,zoneHeight:$+2*Z,labelY:G.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:G.width,forceLayouts:G.forceLayouts,horizontal:G.horizontal,darkBackground:t.color(K.color).isDark(),rgb:t.rgb(K.color),alpha:t.color(K.color).alpha(),valueFormat:G.valueFormat,valueSuffix:G.valueSuffix,sankey:G.sankey,graph:G.graph,arrangement:G.arrangement,uniqueNodeLabelPathId:[G.guid,G.key,Q].join("_"),interactionState:G.interactionState,figure:G}}function x(G){G.attr("transform",function(K){return n(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function _(G){G.call(x)}function D(G,K){G.call(_),K.attr("d",m())}function C(G){G.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function F(G){return G.link.width>1||G.linkLineWidth>0}function I(G){var K=n(G.translateX,G.translateY);return K+(G.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function z(G,K,H){G.on(".basic",null).on("mouseover.basic",function(Z){!Z.interactionState.dragInProgress&&!Z.partOfGroup&&(H.hover(this,Z,K),Z.interactionState.hovered=[this,Z])}).on("mousemove.basic",function(Z){!Z.interactionState.dragInProgress&&!Z.partOfGroup&&(H.follow(this,Z),Z.interactionState.hovered=[this,Z])}).on("mouseout.basic",function(Z){!Z.interactionState.dragInProgress&&!Z.partOfGroup&&(H.unhover(this,Z,K),Z.interactionState.hovered=!1)}).on("click.basic",function(Z){Z.interactionState.hovered&&(H.unhover(this,Z,K),Z.interactionState.hovered=!1),!Z.interactionState.dragInProgress&&!Z.partOfGroup&&H.select(this,Z,K)})}function R(G,K,H,Z){var X=w.behavior.drag().origin(function($){return{x:$.node.x0+$.visibleWidth/2,y:$.node.y0+$.visibleHeight/2}}).on("dragstart",function($){if($.arrangement!=="fixed"&&(r.ensureSingle(Z._fullLayout._infolayer,"g","dragcover",function(re){Z._fullLayout._dragCover=re}),r.raiseToTop(this),$.interactionState.dragInProgress=$.node,ee($.node),$.interactionState.hovered&&(H.nodeEvents.unhover.apply(0,$.interactionState.hovered),$.interactionState.hovered=!1),$.arrangement==="snap")){var Q=$.traceId+"|"+$.key;$.forceLayouts[Q]?$.forceLayouts[Q].alpha(1):k(G,Q,$,Z),B(G,K,$,Q,Z)}}).on("drag",function($){if($.arrangement!=="fixed"){var Q=w.event.x,re=w.event.y;$.arrangement==="snap"?($.node.x0=Q-$.visibleWidth/2,$.node.x1=Q+$.visibleWidth/2,$.node.y0=re-$.visibleHeight/2,$.node.y1=re+$.visibleHeight/2):($.arrangement==="freeform"&&($.node.x0=Q-$.visibleWidth/2,$.node.x1=Q+$.visibleWidth/2),re=Math.max(0,Math.min($.size-$.visibleHeight/2,re)),$.node.y0=re-$.visibleHeight/2,$.node.y1=re+$.visibleHeight/2),ee($.node),$.arrangement!=="snap"&&($.sankey.update($.graph),D(G.filter(te($)),K))}}).on("dragend",function($){if($.arrangement!=="fixed"){$.interactionState.dragInProgress=!1;for(var Q=0;Q<$.node.childrenNodes.length;Q++)$.node.childrenNodes[Q].x=$.node.x,$.node.childrenNodes[Q].y=$.node.y;$.arrangement!=="snap"&&q($,Z)}});G.on(".drag",null).call(X)}function k(G,K,H,Z){ae(H.graph.nodes);var X=H.graph.nodes.filter(function($){return $.originalX===H.node.originalX}).filter(function($){return!$.partOfGroup});H.forceLayouts[K]=u.forceSimulation(X).alphaDecay(0).force("collide",u.forceCollide().radius(function($){return $.dy/2+H.nodePad/2}).strength(1).iterations(e.forceIterations)).force("constrain",N(G,K,X,H,Z)).stop()}function B(G,K,H,Z,X){window.requestAnimationFrame(function $(){var Q;for(Q=0;Q0)window.requestAnimationFrame($);else{var ue=H.node.originalX;H.node.x0=ue-H.visibleWidth/2,H.node.x1=ue+H.visibleWidth/2,q(H,X)}})}function N(G,K,H,Z){return function(){for(var $=0,Q=0;Q0&&Z.forceLayouts[K].alpha(0)}}function q(G,K){for(var H=[],Z=[],X=0;XF(_e)?t.rgb(_e.linkLineColor):_e.rgb).style("stroke-opacity",_e=>F(_e)?t.opacity(_e.linkLineColor):_e.alpha).style("fill",_e=>_e.rgb).style("fill-opacity",_e=>_e.alpha).style("stroke-width",_e=>F(_e)?_e.linkLineWidth:1).attr("d",m()),Te.style("opacity",function(){return G._context.staticPlot||Q||re?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Te.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Se=pe.selectAll("."+e.cn.sankeyNodeSet).data(p,c);Se.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Se.style("cursor",function(_e){switch(_e.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ce=Se.selectAll("."+e.cn.sankeyNode).data(function(_e){var ce=_e.graph.nodes;return Y(ce),ce.map(h.bind(null,_e))},c);Ce.enter().append("g").classed(e.cn.sankeyNode,!0).call(x).style("opacity",function(_e){return(G._context.staticPlot||Q)&&!_e.partOfGroup?1:0}),Ce.call(z,pe,X.nodeEvents).call(R,Te,X,G),Ce.transition().ease(e.ease).duration(e.duration).call(x).style("opacity",function(_e){return _e.partOfGroup?0:1}),Ce.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Ue=Ce.selectAll("."+e.cn.nodeRect).data(p);Ue.enter().append("rect").classed(e.cn.nodeRect,!0).call(C),Ue.style("stroke-width",function(_e){return _e.nodeLineWidth}).style("stroke",function(_e){return t.rgb(_e.nodeLineColor)}).style("stroke-opacity",function(_e){return t.opacity(_e.nodeLineColor)}).style("fill",_e=>_e.rgb).style("fill-opacity",_e=>_e.alpha),Ue.transition().ease(e.ease).duration(e.duration).call(C);var Oe=Ce.selectAll("."+e.cn.nodeLabel).data(p);Oe.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),Oe.attr("data-notex",1).text(function(_e){return _e.node.label}).each(function(_e){var ce=w.select(this);a.font(ce,_e.textFont),d.convertToTspans(ce,G)}).attr("text-anchor",function(_e){return _e.horizontal&&_e.left?"end":"start"}).attr("transform",function(_e){var ce=w.select(this),ie=d.lineCount(ce),se=_e.textFont.size*((ie-1)*M-b),ne=_e.nodeLineWidth/2+A,be=((_e.horizontal?_e.visibleHeight:_e.visibleWidth)-se)/2;_e.horizontal&&(_e.left?ne=-ne:ne+=_e.visibleWidth);var De=_e.horizontal?"":"scale(-1,1)"+i(90);return n(_e.horizontal?ne:be,_e.horizontal?be:ne)+De}),Oe.transition().ease(e.ease).duration(e.duration)}}}),ow=xe({"src/traces/sankey/plot.js"(U,O){"use strict";var u=Na(),v=Sr(),w=v.numberFormat,S=n7(),l=hu(),e=wi(),t=iw().cn,a=v._;function r(M){return M!==""}function n(M,A){return M.filter(function(E){return E.key===A.traceId})}function i(M,A){u.select(M).select("path").style("fill-opacity",A),u.select(M).select("rect").style("fill-opacity",A)}function s(M){u.select(M).select("text.name").style("fill","black")}function c(M){return function(A){return M.node.sourceLinks.indexOf(A.link)!==-1||M.node.targetLinks.indexOf(A.link)!==-1}}function p(M){return function(A){return A.node.sourceLinks.indexOf(M.link)!==-1||A.node.targetLinks.indexOf(M.link)!==-1}}function f(M,A,E){A&&E&&n(E,A).selectAll("."+t.sankeyLink).filter(c(A)).call(y.bind(0,A,E,!1))}function d(M,A,E){A&&E&&n(E,A).selectAll("."+t.sankeyLink).filter(c(A)).call(o.bind(0,A,E,!1))}function y(M,A,E,g){g.style("fill",function(T){if(!T.link.concentrationscale)return T.hoverRgb}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.hoverAlpha}),g.each(function(T){var m=T.link.label;m!==""&&n(A,M).selectAll("."+t.sankeyLink).filter(function(h){return h.link.label===m}).style("fill",function(h){if(!h.link.concentrationscale)return h.hoverRgb}).style("fill-opacity",function(h){if(!h.link.concentrationscale)return h.hoverAlpha})}),E&&n(A,M).selectAll("."+t.sankeyNode).filter(p(M)).call(f)}function o(M,A,E,g){g.style("fill",function(T){return T.rgb}).style("fill-opacity",function(T){return T.alpha}),g.each(function(T){var m=T.link.label;m!==""&&n(A,M).selectAll("."+t.sankeyLink).filter(function(h){return h.link.label===m}).style("fill",h=>h.rgb).style("fill-opacity",h=>h.alpha)}),E&&n(A,M).selectAll(t.sankeyNode).filter(p(M)).call(d)}function b(M,A){var E=M.hoverlabel||{},g=v.nestedProperty(E,A).get();return Array.isArray(g)?!1:g}O.exports=function(A,E){for(var g=A._fullLayout,T=g._paper,m=g._size,h=0;h"),color:b(j,"bgcolor")||e.addOpacity(X.color,1),borderColor:b(j,"bordercolor"),fontFamily:b(j,"font.family"),fontSize:b(j,"font.size"),fontColor:b(j,"font.color"),fontWeight:b(j,"font.weight"),fontStyle:b(j,"font.style"),fontVariant:b(j,"font.variant"),fontTextcase:b(j,"font.textcase"),fontLineposition:b(j,"font.lineposition"),fontShadow:b(j,"font.shadow"),nameLength:b(j,"namelength"),textAlign:b(j,"align"),idealAlign:u.event.x<$[0]?"right":"left",hovertemplate:j.hovertemplate,hovertemplateLabels:Q,eventData:[X]})}}var re=l.loneHover(G,{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:A,anchorIndex:H});re.each(function(){var ue=this;ae.link.concentrationscale||i(ue,.65),s(ue)})},B=function(te,ae,j){A._fullLayout.hovermode!==!1&&(u.select(te).call(o.bind(0,ae,j,!0)),ae.link.trace.link.hoverinfo!=="skip"&&(ae.link.fullData=ae.link.trace,A.emit("plotly_unhover",{event:u.event,points:[ae.link]})),l.loneUnhover(g._hoverlayer.node()))},N=function(te,ae,j){var G=ae.node;G.originalEvent=u.event,A._hoverdata=[G],u.select(te).call(d,ae,j),l.click(A,{target:!0})},q=function(te,ae,j){A._fullLayout.hovermode!==!1&&(u.select(te).call(f,ae,j),ae.node.trace.node.hoverinfo!=="skip"&&(ae.node.fullData=ae.node.trace,A.emit("plotly_hover",{event:u.event,points:[ae.node]})))},Y=function(te,ae){if(A._fullLayout.hovermode!==!1){var j=ae.node.trace.node;if(!(j.hoverinfo==="none"||j.hoverinfo==="skip")){var G=u.select(te).select("."+t.nodeRect),K=A._fullLayout._paperdiv.node().getBoundingClientRect(),H=G.node().getBoundingClientRect(),Z=H.left-2-K.left,X=H.right+2-K.left,$=H.top+H.height/4-K.top,Q={valueLabel:w(ae.valueFormat)(ae.node.value)+ae.valueSuffix};ae.node.fullData=ae.node.trace,A._fullLayout._calcInverseTransform(A);var re=A._fullLayout._invScaleX,ue=A._fullLayout._invScaleY,pe=l.loneHover({x0:re*Z,x1:re*X,y:ue*$,name:w(ae.valueFormat)(ae.node.value)+ae.valueSuffix,text:[ae.node.label,z+ae.node.targetLinks.length,R+ae.node.sourceLinks.length].filter(r).join("
"),color:b(j,"bgcolor")||ae.rgb,borderColor:b(j,"bordercolor"),fontFamily:b(j,"font.family"),fontSize:b(j,"font.size"),fontColor:b(j,"font.color"),fontWeight:b(j,"font.weight"),fontStyle:b(j,"font.style"),fontVariant:b(j,"font.variant"),fontTextcase:b(j,"font.textcase"),fontLineposition:b(j,"font.lineposition"),fontShadow:b(j,"font.shadow"),nameLength:b(j,"namelength"),textAlign:b(j,"align"),idealAlign:"left",hovertemplate:j.hovertemplate,hovertemplateLabels:Q,eventData:[ae.node]},{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:A});i(pe,.85),s(pe)}}},ee=function(te,ae,j){A._fullLayout.hovermode!==!1&&(u.select(te).call(d,ae,j),ae.node.trace.node.hoverinfo!=="skip"&&(ae.node.fullData=ae.node.trace,A.emit("plotly_unhover",{event:u.event,points:[ae.node]})),l.loneUnhover(g._hoverlayer.node()))};S(A,T,E,{width:m.w,height:m.h,margin:{t:m.t,r:m.r,b:m.b,l:m.l}},{linkEvents:{hover:D,follow:k,unhover:B,select:_},nodeEvents:{hover:q,follow:Y,unhover:ee,select:N}})}}}),i7=xe({"src/traces/sankey/base_plot.js"(U){"use strict";var O=Hl().overrideAll,u=df().getModuleCalcData,v=ow(),w=Nh(),S=Mh(),l=Bf(),e=yc().prepSelect,t=Sr(),a=Ci(),r="sankey";U.name=r,U.baseLayoutAttrOverrides=O({hoverlabel:w.hoverlabel},"plot","nested"),U.plot=function(i){var s=u(i.calcdata,r)[0];v(i,s),U.updateFx(i)},U.clean=function(i,s,c,p){var f=p._has&&p._has(r),d=s._has&&s._has(r);f&&!d&&(p._paperdiv.selectAll(".sankey").remove(),p._paperdiv.selectAll(".bgsankey").remove())},U.updateFx=function(i){for(var s=0;s0}O.exports=function(I,z,R,k){var B=I._fullLayout,N;M(R)&&k&&(N=k()),S.makeTraceGroups(B._indicatorlayer,z,"trace").each(function(q){var Y=q[0],ee=Y.trace,te=u.select(this),ae=ee._hasGauge,j=ee._isAngular,G=ee._isBullet,K=ee.domain,H={w:B._size.w*(K.x[1]-K.x[0]),h:B._size.h*(K.y[1]-K.y[0]),l:B._size.l+B._size.w*K.x[0],r:B._size.r+B._size.w*(1-K.x[1]),t:B._size.t+B._size.h*(1-K.y[1]),b:B._size.b+B._size.h*K.y[0]},Z=H.l+H.w/2,X=H.t+H.h/2,$=Math.min(H.w/2,H.h),Q=n.innerRadius*$,re,ue,pe,ge=ee.align||"center";if(ue=X,!ae)re=H.l+o[ge]*H.w,pe=function(ne){return x(ne,H.w,H.h)};else if(j&&(re=Z,ue=X+$/2,pe=function(ne){return _(ne,.9*Q)}),G){var Te=n.bulletPadding,Se=1-n.bulletNumberDomainSize+Te;re=H.l+(Se+(1-Se)*o[ge])*H.w,pe=function(ne){return x(ne,(n.bulletNumberDomainSize-Te)*H.w,H.h)}}g(I,te,q,{numbersX:re,numbersY:ue,numbersScaler:pe,transitionOpts:R,onComplete:N});var Ce,Ue;ae&&(Ce={range:ee.gauge.axis.range,color:ee.gauge.bgcolor,line:{color:ee.gauge.bordercolor,width:0},thickness:1},Ue={range:ee.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ee.gauge.bordercolor,width:ee.gauge.borderwidth},thickness:1});var Oe=te.selectAll("g.angular").data(j?q:[]);Oe.exit().remove();var _e=te.selectAll("g.angularaxis").data(j?q:[]);_e.exit().remove(),j&&E(I,te,q,{radius:$,innerRadius:Q,gauge:Oe,layer:_e,size:H,gaugeBg:Ce,gaugeOutline:Ue,transitionOpts:R,onComplete:N});var ce=te.selectAll("g.bullet").data(G?q:[]);ce.exit().remove();var ie=te.selectAll("g.bulletaxis").data(G?q:[]);ie.exit().remove(),G&&A(I,te,q,{gauge:ce,layer:ie,size:H,gaugeBg:Ce,gaugeOutline:Ue,transitionOpts:R,onComplete:N});var se=te.selectAll("text.title").data(q);se.exit().remove(),se.enter().append("text").classed("title",!0),se.attr("text-anchor",function(){return G?y.right:y[ee.title.align]}).text(ee.title.text).call(r.font,ee.title.font).call(i.convertToTspans,I),se.attr("transform",function(){var ne=H.l+H.w*o[ee.title.align],be,De=n.titlePadding,qe=r.bBox(se.node());if(ae){if(j)if(ee.gauge.axis.visible){var Ne=r.bBox(_e.node());be=Ne.top-De-qe.bottom}else be=H.t+H.h/2-$/2-qe.bottom-De;G&&(be=ue-(qe.top+qe.bottom)/2,ne=H.l-n.bulletPadding*H.w)}else be=ee._numbersTop-De-qe.bottom;return e(ne,be)})})};function A(F,I,z,R){var k=z[0].trace,B=R.gauge,N=R.layer,q=R.gaugeBg,Y=R.gaugeOutline,ee=R.size,te=k.domain,ae=R.transitionOpts,j=R.onComplete,G,K,H,Z,X;B.enter().append("g").classed("bullet",!0),B.attr("transform",e(ee.l,ee.t)),N.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),N.selectAll("g.xbulletaxistick,path,text").remove();var $=ee.h,Q=k.gauge.bar.thickness*$,re=te.x[0],ue=te.x[0]+(te.x[1]-te.x[0])*(k._hasNumber||k._hasDelta?1-n.bulletNumberDomainSize:1);G=h(F,k.gauge.axis),G._id="xbulletaxis",G.domain=[re,ue],G.setScale(),K=s.calcTicks(G),H=s.makeTransTickFn(G),Z=s.getTickSigns(G)[2],X=ee.t+ee.h,G.visible&&(s.drawTicks(F,G,{vals:G.ticks==="inside"?s.clipEnds(G,K):K,layer:N,path:s.makeTickPath(G,X,Z),transFn:H}),s.drawLabels(F,G,{vals:K,layer:N,transFn:H,labelFns:s.makeLabelFns(G,X)}));function pe(_e){_e.attr("width",function(ce){return Math.max(0,G.c2p(ce.range[1])-G.c2p(ce.range[0]))}).attr("x",function(ce){return G.c2p(ce.range[0])}).attr("y",function(ce){return .5*(1-ce.thickness)*$}).attr("height",function(ce){return ce.thickness*$})}var ge=[q].concat(k.gauge.steps),Te=B.selectAll("g.bg-bullet").data(ge);Te.enter().append("g").classed("bg-bullet",!0).append("rect"),Te.select("rect").call(pe).call(T),Te.exit().remove();var Se=B.selectAll("g.value-bullet").data([k.gauge.bar]);Se.enter().append("g").classed("value-bullet",!0).append("rect"),Se.select("rect").attr("height",Q).attr("y",($-Q)/2).call(T),M(ae)?Se.select("rect").transition().duration(ae.duration).ease(ae.easing).each("end",function(){j&&j()}).each("interrupt",function(){j&&j()}).attr("width",Math.max(0,G.c2p(Math.min(k.gauge.axis.range[1],z[0].y)))):Se.select("rect").attr("width",typeof z[0].y=="number"?Math.max(0,G.c2p(Math.min(k.gauge.axis.range[1],z[0].y))):0),Se.exit().remove();var Ce=z.filter(function(){return k.gauge.threshold.value||k.gauge.threshold.value===0}),Ue=B.selectAll("g.threshold-bullet").data(Ce);Ue.enter().append("g").classed("threshold-bullet",!0).append("line"),Ue.select("line").attr("x1",G.c2p(k.gauge.threshold.value)).attr("x2",G.c2p(k.gauge.threshold.value)).attr("y1",(1-k.gauge.threshold.thickness)/2*$).attr("y2",(1-(1-k.gauge.threshold.thickness)/2)*$).call(d.stroke,k.gauge.threshold.line.color).style("stroke-width",k.gauge.threshold.line.width),Ue.exit().remove();var Oe=B.selectAll("g.gauge-outline").data([Y]);Oe.enter().append("g").classed("gauge-outline",!0).append("rect"),Oe.select("rect").call(pe).call(T),Oe.exit().remove()}function E(F,I,z,R){var k=z[0].trace,B=R.size,N=R.radius,q=R.innerRadius,Y=R.gaugeBg,ee=R.gaugeOutline,te=[B.l+B.w/2,B.t+B.h/2+N/2],ae=R.gauge,j=R.layer,G=R.transitionOpts,K=R.onComplete,H=Math.PI/2;function Z(ut){var ot=k.gauge.axis.range[0],yt=k.gauge.axis.range[1],At=(ut-ot)/(yt-ot)*Math.PI-H;return At<-H?-H:At>H?H:At}function X(ut){return u.svg.arc().innerRadius((q+N)/2-ut/2*(N-q)).outerRadius((q+N)/2+ut/2*(N-q)).startAngle(-H)}function $(ut){ut.attr("d",function(ot){return X(ot.thickness).startAngle(Z(ot.range[0])).endAngle(Z(ot.range[1]))()})}var Q,re,ue,pe;ae.enter().append("g").classed("angular",!0),ae.attr("transform",e(te[0],te[1])),j.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),j.selectAll("g.xangularaxistick,path,text").remove(),Q=h(F,k.gauge.axis),Q.type="linear",Q.range=k.gauge.axis.range,Q._id="xangularaxis",Q.ticklabeloverflow="allow",Q.setScale();var ge=function(ut){return(Q.range[0]-ut.x)/(Q.range[1]-Q.range[0])*Math.PI+Math.PI},Te={},Se=s.makeLabelFns(Q,0),Ce=Se.labelStandoff;Te.xFn=function(ut){var ot=ge(ut);return Math.cos(ot)*Ce},Te.yFn=function(ut){var ot=ge(ut),yt=Math.sin(ot)>0?.2:1;return-Math.sin(ot)*(Ce+ut.fontSize*yt)+Math.abs(Math.cos(ot))*(ut.fontSize*a)},Te.anchorFn=function(ut){var ot=ge(ut),yt=Math.cos(ot);return Math.abs(yt)<.1?"middle":yt>0?"start":"end"},Te.heightFn=function(ut,ot,yt){var At=ge(ut);return-.5*(1+Math.sin(At))*yt};var Ue=function(ut){return e(te[0]+N*Math.cos(ut),te[1]-N*Math.sin(ut))};ue=function(ut){return Ue(ge(ut))};var Oe=function(ut){var ot=ge(ut);return Ue(ot)+"rotate("+-t(ot)+")"};if(re=s.calcTicks(Q),pe=s.getTickSigns(Q)[2],Q.visible){pe=Q.ticks==="inside"?-1:1;var _e=(Q.linewidth||1)/2;s.drawTicks(F,Q,{vals:re,layer:j,path:"M"+pe*_e+",0h"+pe*Q.ticklen,transFn:Oe}),s.drawLabels(F,Q,{vals:re,layer:j,transFn:ue,labelFns:Te})}var ce=[Y].concat(k.gauge.steps),ie=ae.selectAll("g.bg-arc").data(ce);ie.enter().append("g").classed("bg-arc",!0).append("path"),ie.select("path").call($).call(T),ie.exit().remove();var se=X(k.gauge.bar.thickness),ne=ae.selectAll("g.value-arc").data([k.gauge.bar]);ne.enter().append("g").classed("value-arc",!0).append("path");var be=ne.select("path");M(G)?(be.transition().duration(G.duration).ease(G.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",m(se,Z(z[0].lastY),Z(z[0].y))),k._lastValue=z[0].y):be.attr("d",typeof z[0].y=="number"?se.endAngle(Z(z[0].y)):"M0,0Z"),be.call(T),ne.exit().remove(),ce=[];var De=k.gauge.threshold.value;(De||De===0)&&ce.push({range:[De,De],color:k.gauge.threshold.color,line:{color:k.gauge.threshold.line.color,width:k.gauge.threshold.line.width},thickness:k.gauge.threshold.thickness});var qe=ae.selectAll("g.threshold-arc").data(ce);qe.enter().append("g").classed("threshold-arc",!0).append("path"),qe.select("path").call($).call(T),qe.exit().remove();var Ne=ae.selectAll("g.gauge-outline").data([ee]);Ne.enter().append("g").classed("gauge-outline",!0).append("path"),Ne.select("path").call($).call(T),Ne.exit().remove()}function g(F,I,z,R){var k=z[0].trace,B=R.numbersX,N=R.numbersY,q=k.align||"center",Y=y[q],ee=R.transitionOpts,te=R.onComplete,ae=S.ensureSingle(I,"g","numbers"),j,G,K,H=[];k._hasNumber&&H.push("number"),k._hasDelta&&(H.push("delta"),k.delta.position==="left"&&H.reverse());var Z=ae.selectAll("text").data(H);Z.enter().append("text"),Z.attr("text-anchor",function(){return Y}).attr("class",function(Ue){return Ue}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Z.exit().remove();function X(Ue,Oe,_e,ce){if(Ue.match("s")&&_e>=0!=ce>=0&&!Oe(_e).slice(-1).match(b)&&!Oe(ce).slice(-1).match(b)){var ie=Ue.slice().replace("s","f").replace(/\d+/,function(ne){return parseInt(ne)-1}),se=h(F,{tickformat:ie});return function(ne){return Math.abs(ne)<1?s.tickText(se,ne).text:Oe(ne)}}else return Oe}function $(){var Ue=h(F,{tickformat:k.number.valueformat},k._range);Ue.setScale(),s.prepTicks(Ue);var Oe=function(ne){return s.tickText(Ue,ne).text},_e=k.number.suffix,ce=k.number.prefix,ie=ae.select("text.number");function se(){var ne=typeof z[0].y=="number"?ce+Oe(z[0].y)+_e:"-";ie.text(ne).call(r.font,k.number.font).call(i.convertToTspans,F)}return M(ee)?ie.transition().duration(ee.duration).ease(ee.easing).each("end",function(){se(),te&&te()}).each("interrupt",function(){se(),te&&te()}).attrTween("text",function(){var ne=u.select(this),be=w(z[0].lastY,z[0].y);k._lastValue=z[0].y;var De=X(k.number.valueformat,Oe,z[0].lastY,z[0].y);return function(qe){ne.text(ce+De(be(qe))+_e)}}):se(),j=D(ce+Oe(z[0].y)+_e,k.number.font,Y,F),ie}function Q(){var Ue=h(F,{tickformat:k.delta.valueformat},k._range);Ue.setScale(),s.prepTicks(Ue);var Oe=function(qe){return s.tickText(Ue,qe).text},_e=k.delta.suffix,ce=k.delta.prefix,ie=function(qe){var Ne=k.delta.relative?qe.relativeDelta:qe.delta;return Ne},se=function(qe,Ne){return qe===0||typeof qe!="number"||isNaN(qe)?"-":(qe>0?k.delta.increasing.symbol:k.delta.decreasing.symbol)+ce+Ne(qe)+_e},ne=function(qe){return qe.delta>=0?k.delta.increasing.color:k.delta.decreasing.color};k._deltaLastValue===void 0&&(k._deltaLastValue=ie(z[0]));var be=ae.select("text.delta");be.call(r.font,k.delta.font).call(d.fill,ne({delta:k._deltaLastValue}));function De(){be.text(se(ie(z[0]),Oe)).call(d.fill,ne(z[0])).call(i.convertToTspans,F)}return M(ee)?be.transition().duration(ee.duration).ease(ee.easing).tween("text",function(){var qe=u.select(this),Ne=ie(z[0]),ut=k._deltaLastValue,ot=X(k.delta.valueformat,Oe,ut,Ne),yt=w(ut,Ne);return k._deltaLastValue=Ne,function(At){qe.text(se(yt(At),ot)),qe.call(d.fill,ne({delta:yt(At)}))}}).each("end",function(){De(),te&&te()}).each("interrupt",function(){De(),te&&te()}):De(),G=D(se(ie(z[0]),Oe),k.delta.font,Y,F),be}var re=k.mode+k.align,ue;if(k._hasDelta&&(ue=Q(),re+=k.delta.position+k.delta.font.size+k.delta.font.family+k.delta.valueformat,re+=k.delta.increasing.symbol+k.delta.decreasing.symbol,K=G),k._hasNumber&&($(),re+=k.number.font.size+k.number.font.family+k.number.valueformat+k.number.suffix+k.number.prefix,K=j),k._hasDelta&&k._hasNumber){var pe=[(j.left+j.right)/2,(j.top+j.bottom)/2],ge=[(G.left+G.right)/2,(G.top+G.bottom)/2],Te,Se,Ce=.75*k.delta.font.size;k.delta.position==="left"&&(Te=C(k,"deltaPos",0,-1*(j.width*o[k.align]+G.width*(1-o[k.align])+Ce),re,Math.min),Se=pe[1]-ge[1],K={width:j.width+G.width+Ce,height:Math.max(j.height,G.height),left:G.left+Te,right:j.right,top:Math.min(j.top,G.top+Se),bottom:Math.max(j.bottom,G.bottom+Se)}),k.delta.position==="right"&&(Te=C(k,"deltaPos",0,j.width*(1-o[k.align])+G.width*o[k.align]+Ce,re,Math.max),Se=pe[1]-ge[1],K={width:j.width+G.width+Ce,height:Math.max(j.height,G.height),left:j.left,right:G.right+Te,top:Math.min(j.top,G.top+Se),bottom:Math.max(j.bottom,G.bottom+Se)}),k.delta.position==="bottom"&&(Te=null,Se=G.height,K={width:Math.max(j.width,G.width),height:j.height+G.height,left:Math.min(j.left,G.left),right:Math.max(j.right,G.right),top:j.bottom-j.height,bottom:j.bottom+G.height}),k.delta.position==="top"&&(Te=null,Se=j.top,K={width:Math.max(j.width,G.width),height:j.height+G.height,left:Math.min(j.left,G.left),right:Math.max(j.right,G.right),top:j.bottom-j.height-G.height,bottom:j.bottom}),ue.attr({dx:Te,dy:Se})}(k._hasNumber||k._hasDelta)&&ae.attr("transform",function(){var Ue=R.numbersScaler(K);re+=Ue[2];var Oe=C(k,"numbersScale",1,Ue[0],re,Math.min),_e;k._scaleNumbers||(Oe=1),k._isAngular?_e=N-Oe*K.bottom:_e=N-Oe*(K.top+K.bottom)/2,k._numbersTop=Oe*K.top+_e;var ce=K[q];q==="center"&&(ce=(K.left+K.right)/2);var ie=B-Oe*ce;return ie=C(k,"numbersTranslate",0,ie,re,Math.max),e(ie,_e)+l(Oe)})}function T(F){F.each(function(I){d.stroke(u.select(this),I.line.color)}).each(function(I){d.fill(u.select(this),I.color)}).style("stroke-width",function(I){return I.line.width})}function m(F,I,z){return function(){var R=v(I,z);return function(k){return F.endAngle(R(k))()}}}function h(F,I,z){var R=F._fullLayout,k=S.extendFlat({type:"linear",ticks:"outside",range:z,showline:!0},I),B={type:"linear",_id:"x"+I._id},N={letter:"x",font:R.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function q(Y,ee){return S.coerce(k,B,f,Y,ee)}return c(k,B,q,N,R),p(k,B,q,N),B}function x(F,I,z){var R=Math.min(I/F.width,z/F.height);return[R,F,I+"x"+z]}function _(F,I){var z=Math.sqrt(F.width/2*(F.width/2)+F.height*F.height),R=I/z;return[R,F,I]}function D(F,I,z,R){var k=document.createElementNS("http://www.w3.org/2000/svg","text"),B=u.select(k);return B.text(F).attr("x",0).attr("y",0).attr("text-anchor",z).attr("data-unformatted",F).call(i.convertToTspans,R).call(r.font,I),r.bBox(B.node())}function C(F,I,z,R,k,B){var N="_cache"+I;F[N]&&F[N].key===k||(F[N]={key:k,value:z});var q=S.aggNums(B,null,[F[N].value,R],2);return F[N].value=q,q}}}),d7=xe({"src/traces/indicator/index.js"(U,O){"use strict";O.exports={moduleType:"trace",name:"indicator",basePlotModule:u7(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:sw(),supplyDefaults:c7().supplyDefaults,calc:f7().calc,plot:h7(),meta:{}}}}),v7=xe({"lib/indicator.js"(U,O){"use strict";O.exports=d7()}}),uw=xe({"src/traces/table/attributes.js"(U,O){"use strict";var u=Od(),v=oo().extendFlat,w=Hl().overrideAll,S=vl(),l=Gl().attributes,e=Kl().descriptionOnlyNumbers,t=O.exports=w({domain:l({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:v({},u.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:v({},S({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:v({},u.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:v({},S({arrayOk:!0}))}},"calc","from-root")}}),p7=xe({"src/traces/table/defaults.js"(U,O){"use strict";var u=Sr(),v=uw(),w=Gl().defaults;function S(l,e){for(var t=l.columnorder||[],a=l.header.values.length,r=t.slice(0,a),n=r.slice().sort(function(c,p){return c-p}),i=r.map(function(c){return n.indexOf(c)}),s=i.length;s",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"}}}}),g7=xe({"src/traces/table/data_preparation_helper.js"(U,O){"use strict";var u=cw(),v=oo().extendFlat,w=yn(),S=rs().isTypedArray,l=rs().isArrayOrTypedArray;O.exports=function(f,d){var y=a(d.cells.values),o=function(Y){return Y.slice(d.header.values.length,Y.length)},b=a(d.header.values);b.length&&!b[0].length&&(b[0]=[""],b=a(b));var M=b.concat(o(y).map(function(){return r((b[0]||[""]).length)})),A=d.domain,E=Math.floor(f._fullLayout._size.w*(A.x[1]-A.x[0])),g=Math.floor(f._fullLayout._size.h*(A.y[1]-A.y[0])),T=d.header.values.length?M[0].map(function(){return d.header.height}):[u.emptyHeaderHeight],m=y.length?y[0].map(function(){return d.cells.height}):[],h=T.reduce(t,0),x=g-h,_=x+u.uplift,D=s(m,_),C=s(T,h),F=i(C,[]),I=i(D,F),z={},R=d.columnorder;l(R)&&(R=Array.from(R)),R=R.concat(o(y.map(function(Y,ee){return ee})));var k=M.map(function(Y,ee){var te=l(d.columnwidth)?d.columnwidth[Math.min(ee,d.columnwidth.length-1)]:d.columnwidth;return w(te)?Number(te):1}),B=k.reduce(t,0);k=k.map(function(Y){return Y/B*E});var N=Math.max(e(d.header.line.width),e(d.cells.line.width)),q={key:d.uid+f._context.staticPlot,translateX:A.x[0]*f._fullLayout._size.w,translateY:f._fullLayout._size.h*(1-A.y[1]),size:f._fullLayout._size,width:E,maxLineWidth:N,height:g,columnOrder:R,groupHeight:g,rowBlocks:I,headerRowBlocks:F,scrollY:0,cells:v({},d.cells,{values:y}),headerCells:v({},d.header,{values:M}),gdColumns:M.map(function(Y){return Y[0]}),gdColumnsOriginalOrder:M.map(function(Y){return Y[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:M.map(function(Y,ee){var te=z[Y];z[Y]=(te||0)+1;var ae=Y+"__"+z[Y];return{key:ae,label:Y,specIndex:ee,xIndex:R[ee],xScale:n,x:void 0,calcdata:void 0,columnWidth:k[ee]}})};return q.columns.forEach(function(Y){Y.calcdata=q,Y.x=n(Y)}),q};function e(p){if(l(p)){for(var f=0,d=0;d=f||g===p.length-1)&&(d[o]=M,M.key=E++,M.firstRowIndex=A,M.lastRowIndex=g,M=c(),o+=b,A=g+1,b=0);return d}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),y7=xe({"src/traces/table/data_split_helpers.js"(U){"use strict";var O=oo().extendFlat;U.splitToPanels=function(v){var w=[0,0],S=O({},v,{key:"header",type:"header",page:0,prevPages:w,currentRepaint:[null,null],dragHandle:!0,values:v.calcdata.headerCells.values[v.specIndex],rowBlocks:v.calcdata.headerRowBlocks,calcdata:O({},v.calcdata,{cells:v.calcdata.headerCells})}),l=O({},v,{key:"cells1",type:"cells",page:0,prevPages:w,currentRepaint:[null,null],dragHandle:!1,values:v.calcdata.cells.values[v.specIndex],rowBlocks:v.calcdata.rowBlocks}),e=O({},v,{key:"cells2",type:"cells",page:1,prevPages:w,currentRepaint:[null,null],dragHandle:!1,values:v.calcdata.cells.values[v.specIndex],rowBlocks:v.calcdata.rowBlocks});return[l,e,S]},U.splitToCells=function(v){var w=u(v);return(v.values||[]).slice(w[0],w[1]).map(function(S,l){var e=typeof S=="string"&&S.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:w[0]+l,column:v,calcdata:v.calcdata,page:v.page,rowBlocks:v.rowBlocks,value:S}})};function u(v){var w=v.rowBlocks[v.page],S=w?w.rows[0].rowIndex:0,l=w?S+w.rows.length:0;return[S,l]}}}),fw=xe({"src/traces/table/plot.js"(U,O){"use strict";var u=cw(),v=Na(),w=Sr(),S=w.numberFormat,l=Xh(),e=go(),t=el(),a=Sr().raiseToTop,r=Sr().strTranslate,n=Sr().cancelTransition,i=g7(),s=y7(),c=wi();O.exports=function(re,ue){var pe=!re._context.staticPlot,ge=re._fullLayout._paper.selectAll("."+u.cn.table).data(ue.map(function(Ne){var ut=l.unwrap(Ne),ot=ut.trace;return i(re,ot)}),l.keyFun);ge.exit().remove(),ge.enter().append("g").classed(u.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),ge.attr("width",function(Ne){return Ne.width+Ne.size.l+Ne.size.r}).attr("height",function(Ne){return Ne.height+Ne.size.t+Ne.size.b}).attr("transform",function(Ne){return r(Ne.translateX,Ne.translateY)});var Te=ge.selectAll("."+u.cn.tableControlView).data(l.repeat,l.keyFun),Se=Te.enter().append("g").classed(u.cn.tableControlView,!0).style("box-sizing","content-box");if(pe){var Ce="onwheel"in document?"wheel":"mousewheel";Se.on("mousemove",function(Ne){Te.filter(function(ut){return Ne===ut}).call(o,re)}).on(Ce,function(Ne){if(!Ne.scrollbarState.wheeling){Ne.scrollbarState.wheeling=!0;var ut=Ne.scrollY+v.event.deltaY,ot=Y(re,Te,null,ut)(Ne);ot||(v.event.stopPropagation(),v.event.preventDefault()),Ne.scrollbarState.wheeling=!1}}).call(o,re,!0)}Te.attr("transform",function(Ne){return r(Ne.size.l,Ne.size.t)});var Ue=Te.selectAll("."+u.cn.scrollBackground).data(l.repeat,l.keyFun);Ue.enter().append("rect").classed(u.cn.scrollBackground,!0).attr("fill","none"),Ue.attr("width",function(Ne){return Ne.width}).attr("height",function(Ne){return Ne.height}),Te.each(function(Ne){e.setClipUrl(v.select(this),f(re,Ne),re)});var Oe=Te.selectAll("."+u.cn.yColumn).data(function(Ne){return Ne.columns},l.keyFun);Oe.enter().append("g").classed(u.cn.yColumn,!0),Oe.exit().remove(),Oe.attr("transform",function(Ne){return r(Ne.x,0)}),pe&&Oe.call(v.behavior.drag().origin(function(Ne){var ut=v.select(this);return z(ut,Ne,-u.uplift),a(this),Ne.calcdata.columnDragInProgress=!0,o(Te.filter(function(ot){return Ne.calcdata.key===ot.key}),re),Ne}).on("drag",function(Ne){var ut=v.select(this),ot=function(It){return(Ne===It?v.event.x:It.x)+It.columnWidth/2};Ne.x=Math.max(-u.overdrag,Math.min(Ne.calcdata.width+u.overdrag-Ne.columnWidth,v.event.x));var yt=y(Oe).filter(function(It){return It.calcdata.key===Ne.calcdata.key}),At=yt.sort(function(It,Zt){return ot(It)-ot(Zt)});At.forEach(function(It,Zt){It.xIndex=Zt,It.x=Ne===It?It.x:It.xScale(It)}),Oe.filter(function(It){return Ne!==It}).transition().ease(u.transitionEase).duration(u.transitionDuration).attr("transform",function(It){return r(It.x,0)}),ut.call(n).attr("transform",r(Ne.x,-u.uplift))}).on("dragend",function(Ne){var ut=v.select(this),ot=Ne.calcdata;Ne.x=Ne.xScale(Ne),Ne.calcdata.columnDragInProgress=!1,z(ut,Ne,0),F(re,ot,ot.columns.map(function(yt){return yt.xIndex}))})),Oe.each(function(Ne){e.setClipUrl(v.select(this),d(re,Ne),re)});var _e=Oe.selectAll("."+u.cn.columnBlock).data(s.splitToPanels,l.keyFun);_e.enter().append("g").classed(u.cn.columnBlock,!0).attr("id",function(Ne){return Ne.key}),_e.style("cursor",function(Ne){return Ne.dragHandle?"ew-resize":Ne.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var ce=_e.filter(k),ie=_e.filter(R);pe&&ie.call(v.behavior.drag().origin(function(Ne){return v.event.stopPropagation(),Ne}).on("drag",Y(re,Te,-1)).on("dragend",function(){})),b(re,Te,ce,_e),b(re,Te,ie,_e);var se=Te.selectAll("."+u.cn.scrollAreaClip).data(l.repeat,l.keyFun);se.enter().append("clipPath").classed(u.cn.scrollAreaClip,!0).attr("id",function(Ne){return f(re,Ne)});var ne=se.selectAll("."+u.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);ne.enter().append("rect").classed(u.cn.scrollAreaClipRect,!0).attr("x",-u.overdrag).attr("y",-u.uplift).attr("fill","none"),ne.attr("width",function(Ne){return Ne.width+2*u.overdrag}).attr("height",function(Ne){return Ne.height+u.uplift});var be=Oe.selectAll("."+u.cn.columnBoundary).data(l.repeat,l.keyFun);be.enter().append("g").classed(u.cn.columnBoundary,!0);var De=Oe.selectAll("."+u.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);De.enter().append("clipPath").classed(u.cn.columnBoundaryClippath,!0),De.attr("id",function(Ne){return d(re,Ne)});var qe=De.selectAll("."+u.cn.columnBoundaryRect).data(l.repeat,l.keyFun);qe.enter().append("rect").classed(u.cn.columnBoundaryRect,!0).attr("fill","none"),qe.attr("width",function(Ne){return Ne.columnWidth+2*p(Ne)}).attr("height",function(Ne){return Ne.calcdata.height+2*p(Ne)+u.uplift}).attr("x",function(Ne){return-p(Ne)}).attr("y",function(Ne){return-p(Ne)}),q(null,ie,Te)};function p(Q){return Math.ceil(Q.calcdata.maxLineWidth/2)}function f(Q,re){return"clip"+Q._fullLayout._uid+"_scrollAreaBottomClip_"+re.key}function d(Q,re){return"clip"+Q._fullLayout._uid+"_columnBoundaryClippath_"+re.calcdata.key+"_"+re.specIndex}function y(Q){return[].concat.apply([],Q.map(function(re){return re})).map(function(re){return re.__data__})}function o(Q,re,ue){function pe(Oe){var _e=Oe.rowBlocks;return K(_e,_e.length-1)+(_e.length?H(_e[_e.length-1],1/0):1)}var ge=Q.selectAll("."+u.cn.scrollbarKit).data(l.repeat,l.keyFun);ge.enter().append("g").classed(u.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),ge.each(function(Oe){var _e=Oe.scrollbarState;_e.totalHeight=pe(Oe),_e.scrollableAreaHeight=Oe.groupHeight-B(Oe),_e.currentlyVisibleHeight=Math.min(_e.totalHeight,_e.scrollableAreaHeight),_e.ratio=_e.currentlyVisibleHeight/_e.totalHeight,_e.barLength=Math.max(_e.ratio*_e.currentlyVisibleHeight,u.goldenRatio*u.scrollbarWidth),_e.barWiggleRoom=_e.currentlyVisibleHeight-_e.barLength,_e.wiggleRoom=Math.max(0,_e.totalHeight-_e.scrollableAreaHeight),_e.topY=_e.barWiggleRoom===0?0:Oe.scrollY/_e.wiggleRoom*_e.barWiggleRoom,_e.bottomY=_e.topY+_e.barLength,_e.dragMultiplier=_e.wiggleRoom/_e.barWiggleRoom}).attr("transform",function(Oe){var _e=Oe.width+u.scrollbarWidth/2+u.scrollbarOffset;return r(_e,B(Oe))});var Te=ge.selectAll("."+u.cn.scrollbar).data(l.repeat,l.keyFun);Te.enter().append("g").classed(u.cn.scrollbar,!0);var Se=Te.selectAll("."+u.cn.scrollbarSlider).data(l.repeat,l.keyFun);Se.enter().append("g").classed(u.cn.scrollbarSlider,!0),Se.attr("transform",function(Oe){return r(0,Oe.scrollbarState.topY||0)});var Ce=Se.selectAll("."+u.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ce.enter().append("line").classed(u.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",u.scrollbarWidth).attr("stroke-linecap","round").attr("y1",u.scrollbarWidth/2),Ce.attr("y2",function(Oe){return Oe.scrollbarState.barLength-u.scrollbarWidth/2}).attr("stroke-opacity",function(Oe){return Oe.columnDragInProgress||!Oe.scrollbarState.barWiggleRoom||ue?0:.4}),Ce.transition().delay(0).duration(0),Ce.transition().delay(u.scrollbarHideDelay).duration(u.scrollbarHideDuration).attr("stroke-opacity",0);var Ue=Te.selectAll("."+u.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);Ue.enter().append("line").classed(u.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",u.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Oe){var _e=v.event.y,ce=this.getBoundingClientRect(),ie=Oe.scrollbarState,se=_e-ce.top,ne=v.scale.linear().domain([0,ie.scrollableAreaHeight]).range([0,ie.totalHeight]).clamp(!0);ie.topY<=se&&se<=ie.bottomY||Y(re,Q,null,ne(se-ie.barLength/2))(Oe)}).call(v.behavior.drag().origin(function(Oe){return v.event.stopPropagation(),Oe.scrollbarState.scrollbarScrollInProgress=!0,Oe}).on("drag",Y(re,Q)).on("dragend",function(){})),Ue.attr("y2",function(Oe){return Oe.scrollbarState.scrollableAreaHeight}),re._context.staticPlot&&(Ce.remove(),Ue.remove())}function b(Q,re,ue,pe){var ge=M(ue),Te=A(ge);m(Te);var Se=E(Te);x(Se);var Ce=T(Te),Ue=g(Ce);h(Ue),_(Ue,re,pe,Q),G(Te)}function M(Q){var re=Q.selectAll("."+u.cn.columnCells).data(l.repeat,l.keyFun);return re.enter().append("g").classed(u.cn.columnCells,!0),re.exit().remove(),re}function A(Q){var re=Q.selectAll("."+u.cn.columnCell).data(s.splitToCells,function(ue){return ue.keyWithinBlock});return re.enter().append("g").classed(u.cn.columnCell,!0),re.exit().remove(),re}function E(Q){var re=Q.selectAll("."+u.cn.cellRect).data(l.repeat,function(ue){return ue.keyWithinBlock});return re.enter().append("rect").classed(u.cn.cellRect,!0),re}function g(Q){var re=Q.selectAll("."+u.cn.cellText).data(l.repeat,function(ue){return ue.keyWithinBlock});return re.enter().append("text").classed(u.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){v.event.stopPropagation()}),re}function T(Q){var re=Q.selectAll("."+u.cn.cellTextHolder).data(l.repeat,function(ue){return ue.keyWithinBlock});return re.enter().append("g").classed(u.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),re}function m(Q){Q.each(function(re,ue){var pe=re.calcdata.cells.font,ge=re.column.specIndex,Te={size:I(pe.size,ge,ue),color:I(pe.color,ge,ue),family:I(pe.family,ge,ue),weight:I(pe.weight,ge,ue),style:I(pe.style,ge,ue),variant:I(pe.variant,ge,ue),textcase:I(pe.textcase,ge,ue),lineposition:I(pe.lineposition,ge,ue),shadow:I(pe.shadow,ge,ue)};re.rowNumber=re.key,re.align=I(re.calcdata.cells.align,ge,ue),re.cellBorderWidth=I(re.calcdata.cells.line.width,ge,ue),re.font=Te})}function h(Q){Q.each(function(re){e.font(v.select(this),re.font)})}function x(Q){Q.attr("width",function(re){return re.column.columnWidth}).attr("stroke-width",function(re){return re.cellBorderWidth}).each(function(re){var ue=v.select(this);c.stroke(ue,I(re.calcdata.cells.line.color,re.column.specIndex,re.rowNumber)),c.fill(ue,I(re.calcdata.cells.fill.color,re.column.specIndex,re.rowNumber))})}function _(Q,re,ue,pe){Q.text(function(ge){var Te=ge.column.specIndex,Se=ge.rowNumber,Ce=ge.value,Ue=typeof Ce=="string",Oe=Ue&&Ce.match(/
/i),_e=!Ue||Oe;ge.mayHaveMarkup=Ue&&Ce.match(/[<&>]/);var ce=D(Ce);ge.latex=ce;var ie=ce?"":I(ge.calcdata.cells.prefix,Te,Se)||"",se=ce?"":I(ge.calcdata.cells.suffix,Te,Se)||"",ne=ce?null:I(ge.calcdata.cells.format,Te,Se)||null,be=ie+(ne?S(ne)(ge.value):ge.value)+se,De;ge.wrappingNeeded=!ge.wrapped&&!_e&&!ce&&(De=C(be)),ge.cellHeightMayIncrease=Oe||ce||ge.mayHaveMarkup||(De===void 0?C(be):De),ge.needsConvertToTspans=ge.mayHaveMarkup||ge.wrappingNeeded||ge.latex;var qe;if(ge.wrappingNeeded){var Ne=u.wrapSplitCharacter===" "?be.replace(/ge&&pe.push(Te),ge+=Ue}return pe}function q(Q,re,ue){var pe=y(re)[0];if(pe!==void 0){var ge=pe.rowBlocks,Te=pe.calcdata,Se=K(ge,ge.length),Ce=pe.calcdata.groupHeight-B(pe),Ue=Te.scrollY=Math.max(0,Math.min(Se-Ce,Te.scrollY)),Oe=N(ge,Ue,Ce);Oe.length===1&&(Oe[0]===ge.length-1?Oe.unshift(Oe[0]-1):Oe.push(Oe[0]+1)),Oe[0]%2&&Oe.reverse(),re.each(function(_e,ce){_e.page=Oe[ce],_e.scrollY=Ue}),re.attr("transform",function(_e){var ce=K(_e.rowBlocks,_e.page)-_e.scrollY;return r(0,ce)}),Q&&(ee(Q,ue,re,Oe,pe.prevPages,pe,0),ee(Q,ue,re,Oe,pe.prevPages,pe,1),o(ue,Q))}}function Y(Q,re,ue,pe){return function(Te){var Se=Te.calcdata?Te.calcdata:Te,Ce=re.filter(function(ce){return Se.key===ce.key}),Ue=ue||Se.scrollbarState.dragMultiplier,Oe=Se.scrollY;Se.scrollY=pe===void 0?Se.scrollY+Ue*v.event.dy:pe;var _e=Ce.selectAll("."+u.cn.yColumn).selectAll("."+u.cn.columnBlock).filter(R);return q(Q,_e,Ce),Se.scrollY===Oe}}function ee(Q,re,ue,pe,ge,Te,Se){var Ce=pe[Se]!==ge[Se];Ce&&(clearTimeout(Te.currentRepaint[Se]),Te.currentRepaint[Se]=setTimeout(function(){var Ue=ue.filter(function(Oe,_e){return _e===Se&&pe[_e]!==ge[_e]});b(Q,re,Ue,ue),ge[Se]=pe[Se]}))}function te(Q,re,ue,pe){return function(){var Te=v.select(re.parentNode);Te.each(function(Se){var Ce=Se.fragments;Te.selectAll("tspan.line").each(function(be,De){Ce[De].width=this.getComputedTextLength()});var Ue=Ce[Ce.length-1].width,Oe=Ce.slice(0,-1),_e=[],ce,ie,se=0,ne=Se.column.columnWidth-2*u.cellPad;for(Se.value="";Oe.length;)ce=Oe.shift(),ie=ce.width+Ue,se+ie>ne&&(Se.value+=_e.join(u.wrapSpacer)+u.lineBreaker,_e=[],se=0),_e.push(ce.text),se+=ie;se&&(Se.value+=_e.join(u.wrapSpacer)),Se.wrapped=!0}),Te.selectAll("tspan.line").remove(),_(Te.select("."+u.cn.cellText),ue,Q,pe),v.select(re.parentNode.parentNode).call(G)}}function ae(Q,re,ue,pe,ge){return function(){if(!ge.settledY){var Se=v.select(re.parentNode),Ce=X(ge),Ue=ge.key-Ce.firstRowIndex,Oe=Ce.rows[Ue].rowHeight,_e=ge.cellHeightMayIncrease?re.parentNode.getBoundingClientRect().height+2*u.cellPad:Oe,ce=Math.max(_e,Oe),ie=ce-Ce.rows[Ue].rowHeight;ie&&(Ce.rows[Ue].rowHeight=ce,Q.selectAll("."+u.cn.columnCell).call(G),q(null,Q.filter(R),0),o(ue,pe,!0)),Se.attr("transform",function(){var se=this,ne=se.parentNode,be=ne.getBoundingClientRect(),De=v.select(se.parentNode).select("."+u.cn.cellRect).node().getBoundingClientRect(),qe=se.transform.baseVal.consolidate(),Ne=De.top-be.top+(qe?qe.matrix.f:u.cellPad);return r(j(ge,v.select(se.parentNode).select("."+u.cn.cellTextHolder).node().getBoundingClientRect().width),Ne)}),ge.settledY=!0}}}function j(Q,re){switch(Q.align){case"left":return u.cellPad;case"right":return Q.column.columnWidth-(re||0)-u.cellPad;case"center":return(Q.column.columnWidth-(re||0))/2;default:return u.cellPad}}function G(Q){Q.attr("transform",function(re){var ue=re.rowBlocks[0].auxiliaryBlocks.reduce(function(Se,Ce){return Se+H(Ce,1/0)},0),pe=X(re),ge=H(pe,re.key),Te=ge+ue;return r(0,Te)}).selectAll("."+u.cn.cellRect).attr("height",function(re){return $(X(re),re.key).rowHeight})}function K(Q,re){for(var ue=0,pe=re-1;pe>=0;pe--)ue+=Z(Q[pe]);return ue}function H(Q,re){for(var ue=0,pe=0;peS.length&&(w=w.slice(0,S.length)):w=[],e=0;e90&&(f-=180,n=-n),{angle:f,flip:n,p:v.c2p(l,w,S),offsetMultplier:i}}}}),k7=xe({"src/traces/carpet/plot.js"(U,O){"use strict";var u=Na(),v=go(),w=hw(),S=dw(),l=E7(),e=el(),t=Sr(),a=t.strRotate,r=t.strTranslate,n=uc();O.exports=function(b,M,A,E){var g=b._context.staticPlot,T=M.xaxis,m=M.yaxis,h=b._fullLayout,x=h._clips;t.makeTraceGroups(E,A,"trace").each(function(_){var D=u.select(this),C=_[0],F=C.trace,I=F.aaxis,z=F.baxis,R=t.ensureSingle(D,"g","minorlayer"),k=t.ensureSingle(D,"g","majorlayer"),B=t.ensureSingle(D,"g","boundarylayer"),N=t.ensureSingle(D,"g","labellayer");D.style("opacity",F.opacity),s(T,m,k,I,"a",I._gridlines,!0,g),s(T,m,k,z,"b",z._gridlines,!0,g),s(T,m,R,I,"a",I._minorgridlines,!0,g),s(T,m,R,z,"b",z._minorgridlines,!0,g),s(T,m,B,I,"a-boundary",I._boundarylines,g),s(T,m,B,z,"b-boundary",z._boundarylines,g);var q=c(b,T,m,F,C,N,I._labels,"a-label"),Y=c(b,T,m,F,C,N,z._labels,"b-label");p(b,N,F,C,T,m,q,Y),i(F,C,x,T,m)})};function i(o,b,M,A,E){var g,T,m,h,x=M.select("#"+o._clipPathId);x.size()||(x=M.append("clipPath").classed("carpetclip",!0));var _=t.ensureSingle(x,"path","carpetboundary"),D=b.clipsegments,C=[];for(h=0;h0?"start":"end","data-notex":1}).call(v.font,D.font).text(D.text).call(e.convertToTspans,o),k=v.bBox(this);R.attr("transform",r(F.p[0],F.p[1])+a(F.angle)+r(D.axis.labelpadding*z,k.height*.3)),x=Math.max(x,k.width+D.axis.labelpadding)}),h.exit().remove(),_.maxExtent=x,_}function p(o,b,M,A,E,g,T,m){var h,x,_,D,C=t.aggNums(Math.min,null,M.a),F=t.aggNums(Math.max,null,M.a),I=t.aggNums(Math.min,null,M.b),z=t.aggNums(Math.max,null,M.b);h=.5*(C+F),x=I,_=M.ab2xy(h,x,!0),D=M.dxyda_rough(h,x),T.angle===void 0&&t.extendFlat(T,l(M,E,g,_,M.dxydb_rough(h,x))),y(o,b,M,A,_,D,M.aaxis,E,g,T,"a-title"),h=C,x=.5*(I+z),_=M.ab2xy(h,x,!0),D=M.dxydb_rough(h,x),m.angle===void 0&&t.extendFlat(m,l(M,E,g,_,M.dxyda_rough(h,x))),y(o,b,M,A,_,D,M.baxis,E,g,m,"b-title")}var f=n.LINE_SPACING,d=(1-n.MID_SHIFT)/f+1;function y(o,b,M,A,E,g,T,m,h,x,_){var D=[];T.title.text&&D.push(T.title.text);var C=b.selectAll("text."+_).data(D),F=x.maxExtent;C.enter().append("text").classed(_,!0),C.each(function(){var I=l(M,m,h,E,g);["start","both"].indexOf(T.showticklabels)===-1&&(F=0);var z=T.title.font.size;F+=z+T.title.offset;var R=x.angle+(x.flip<0?180:0),k=(R-I.angle+450)%360,B=k>90&&k<270,N=u.select(this);N.text(T.title.text).call(e.convertToTspans,o),B&&(F=(-e.lineCount(N)+d)*f*z-F),N.attr("transform",r(I.p[0],I.p[1])+a(I.angle)+r(0,F)).attr("text-anchor","middle").call(v.font,T.title.font)}),C.exit().remove()}}}),C7=xe({"src/traces/carpet/cheater_basis.js"(U,O){"use strict";var u=Sr().isArrayOrTypedArray;O.exports=function(v,w,S){var l,e,t,a,r,n,i=[],s=u(v)?v.length:v,c=u(w)?w.length:w,p=u(v)?v:null,f=u(w)?w:null;p&&(t=(p.length-1)/(p[p.length-1]-p[0])/(s-1)),f&&(a=(f.length-1)/(f[f.length-1]-f[0])/(c-1));var d,y=1/0,o=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=w.length,a=0;a0&&(H=S.dxydi([],q-1,ee,0,te),Q.push(ae[0]+H[0]/3),re.push(ae[1]+H[1]/3),Z=S.dxydi([],q-1,ee,1,te),Q.push(K[0]-Z[0]/3),re.push(K[1]-Z[1]/3)),Q.push(K[0]),re.push(K[1]),ae=K;else for(q=S.a2i(N),j=Math.floor(Math.max(0,Math.min(I-2,q))),G=q-j,ue.length=I,ue.crossLength=z,ue.xy=function(pe){return S.evalxy([],q,pe)},ue.dxy=function(pe,ge){return S.dxydj([],j,pe,G,ge)},Y=0;Y0&&(X=S.dxydj([],j,Y-1,G,0),Q.push(ae[0]+X[0]/3),re.push(ae[1]+X[1]/3),$=S.dxydj([],j,Y-1,G,1),Q.push(K[0]-$[0]/3),re.push(K[1]-$[1]/3)),Q.push(K[0]),re.push(K[1]),ae=K;return ue.axisLetter=l,ue.axis=E,ue.crossAxis=x,ue.value=N,ue.constvar=e,ue.index=p,ue.x=Q,ue.y=re,ue.smoothing=x.smoothing,ue}function B(N){var q,Y,ee,te,ae,j=[],G=[],K={};if(K.length=A.length,K.crossLength=h.length,l==="b")for(ee=Math.max(0,Math.min(z-2,N)),ae=Math.min(1,Math.max(0,N-ee)),K.xy=function(H){return S.evalxy([],H,N)},K.dxy=function(H,Z){return S.dxydi([],H,ee,Z,ae)},q=0;qA.length-1)&&g.push(v(B(a),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(p=s;pA.length-1)&&!(y<0||y>A.length-1))for(o=A[r],b=A[y],t=0;tA[A.length-1])&&T.push(v(k(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&m.push(v(B(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&m.push(v(B(A.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(n=5e-15,i=[Math.floor((A[A.length-1]-E.tick0)/E.dtick*(1+n)),Math.ceil((A[0]-E.tick0)/E.dtick/(1+n))].sort(function(N,q){return N-q}),s=i[0],c=i[1],p=s;p<=c;p++)f=E.tick0+E.dtick*p,g.push(v(k(f),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(p=s-1;pA[A.length-1])&&T.push(v(k(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&m.push(v(k(A[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&m.push(v(k(A[A.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}}}),I7=xe({"src/traces/carpet/calc_labels.js"(U,O){"use strict";var u=uo(),v=oo().extendFlat;O.exports=function(S,l){var e,t,a,r,n,i=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=v[c][e],a[s-e]=w[c][e];for(r.push({x:t,y:a,bicubic:n}),e=c,t=[],a=[];e>=0;e--)t[c-e]=v[e][0],a[c-e]=w[e][0];return r.push({x:t,y:a,bicubic:i}),r}}}),R7=xe({"src/traces/carpet/smooth_fill_2d_array.js"(U,O){"use strict";var u=Sr();O.exports=function(w,S,l){var e,t,a,r=[],n=[],i=w[0].length,s=w.length;function c(Y,ee){var te=0,ae,j=0;return Y>0&&(ae=w[ee][Y-1])!==void 0&&(j++,te+=ae),Y0&&(ae=w[ee-1][Y])!==void 0&&(j++,te+=ae),ee0&&t0&&eh);return u.log("Smoother converged to",x,"after",D,"iterations"),w}}}),F7=xe({"src/traces/carpet/constants.js"(U,O){"use strict";O.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),z7=xe({"src/traces/carpet/catmull_rom.js"(U,O){"use strict";var u=.5;O.exports=function(w,S,l,e){var t=w[0]-S[0],a=w[1]-S[1],r=l[0]-S[0],n=l[1]-S[1],i=Math.pow(t*t+a*a,u/2),s=Math.pow(r*r+n*n,u/2),c=(s*s*t-i*i*r)*e,p=(s*s*a-i*i*n)*e,f=s*(i+s)*3,d=i*(i+s)*3;return[[S[0]+(f&&c/f),S[1]+(f&&p/f)],[S[0]-(d&&c/d),S[1]-(d&&p/d)]]}}}),B7=xe({"src/traces/carpet/compute_control_points.js"(U,O){"use strict";var u=z7(),v=Sr().ensureArray;function w(S,l,e){var t=-.5*e[0]+1.5*l[0],a=-.5*e[1]+1.5*l[1];return[(2*t+S[0])/3,(2*a+S[1])/3]}O.exports=function(l,e,t,a,r,n){var i,s,c,p,f,d,y,o,b,M,A=t[0].length,E=t.length,g=r?3*A-2:A,T=n?3*E-2:E;for(l=v(l,T),e=v(e,T),c=0;cf&&gy&&Td||To},a.setScale=function(){var g=a._x,T=a._y,m=w(a._xctrl,a._yctrl,g,T,c.smoothing,p.smoothing);a._xctrl=m[0],a._yctrl=m[1],a.evalxy=S([a._xctrl,a._yctrl],i,s,c.smoothing,p.smoothing),a.dxydi=l([a._xctrl,a._yctrl],c.smoothing,p.smoothing),a.dxydj=e([a._xctrl,a._yctrl],c.smoothing,p.smoothing)},a.i2a=function(g){var T=Math.max(0,Math.floor(g[0]),i-2),m=g[0]-T;return(1-m)*r[T]+m*r[T+1]},a.j2b=function(g){var T=Math.max(0,Math.floor(g[1]),i-2),m=g[1]-T;return(1-m)*n[T]+m*n[T+1]},a.ij2ab=function(g){return[a.i2a(g[0]),a.j2b(g[1])]},a.a2i=function(g){var T=Math.max(0,Math.min(v(g,r),i-2)),m=r[T],h=r[T+1];return Math.max(0,Math.min(i-1,T+(g-m)/(h-m)))},a.b2j=function(g){var T=Math.max(0,Math.min(v(g,n),s-2)),m=n[T],h=n[T+1];return Math.max(0,Math.min(s-1,T+(g-m)/(h-m)))},a.ab2ij=function(g){return[a.a2i(g[0]),a.b2j(g[1])]},a.i2c=function(g,T){return a.evalxy([],g,T)},a.ab2xy=function(g,T,m){if(!m&&(gr[i-1]|Tn[s-1]))return[!1,!1];var h=a.a2i(g),x=a.b2j(T),_=a.evalxy([],h,x);if(m){var D=0,C=0,F=[],I,z,R,k;gr[i-1]?(I=i-2,z=1,D=(g-r[i-1])/(r[i-1]-r[i-2])):(I=Math.max(0,Math.min(i-2,Math.floor(h))),z=h-I),Tn[s-1]?(R=s-2,k=1,C=(T-n[s-1])/(n[s-1]-n[s-2])):(R=Math.max(0,Math.min(s-2,Math.floor(x))),k=x-R),D&&(a.dxydi(F,I,R,z,k),_[0]+=F[0]*D,_[1]+=F[1]*D),C&&(a.dxydj(F,I,R,z,k),_[0]+=F[0]*C,_[1]+=F[1]*C)}return _},a.c2p=function(g,T,m){return[T.c2p(g[0]),m.c2p(g[1])]},a.p2x=function(g,T,m){return[T.p2c(g[0]),m.p2c(g[1])]},a.dadi=function(g){var T=Math.max(0,Math.min(r.length-2,g));return r[T+1]-r[T]},a.dbdj=function(g){var T=Math.max(0,Math.min(n.length-2,g));return n[T+1]-n[T]},a.dxyda=function(g,T,m,h){var x=a.dxydi(null,g,T,m,h),_=a.dadi(g,m);return[x[0]/_,x[1]/_]},a.dxydb=function(g,T,m,h){var x=a.dxydj(null,g,T,m,h),_=a.dbdj(T,h);return[x[0]/_,x[1]/_]},a.dxyda_rough=function(g,T,m){var h=b*(m||.1),x=a.ab2xy(g+h,T,!0),_=a.ab2xy(g-h,T,!0);return[(x[0]-_[0])*.5/h,(x[1]-_[1])*.5/h]},a.dxydb_rough=function(g,T,m){var h=M*(m||.1),x=a.ab2xy(g,T+h,!0),_=a.ab2xy(g,T-h,!0);return[(x[0]-_[0])*.5/h,(x[1]-_[1])*.5/h]},a.dpdx=function(g){return g._m},a.dpdy=function(g){return g._m}}}}),q7=xe({"src/traces/carpet/calc.js"(U,O){"use strict";var u=uo(),v=Sr().isArray1D,w=C7(),S=L7(),l=P7(),e=I7(),t=D7(),a=Tg(),r=R7(),n=wg(),i=j7();O.exports=function(c,p){var f=u.getFromId(c,p.xaxis),d=u.getFromId(c,p.yaxis),y=p.aaxis,o=p.baxis,b=p.x,M=p.y,A=[];b&&v(b)&&A.push("x"),M&&v(M)&&A.push("y"),A.length&&n(p,y,o,"a","b",A);var E=p._a=p._a||p.a,g=p._b=p._b||p.b;b=p._x||p.x,M=p._y||p.y;var T={};if(p._cheater){var m=y.cheatertype==="index"?E.length:E,h=o.cheatertype==="index"?g.length:g;b=w(m,h,p.cheaterslope)}p._x=b=a(b),p._y=M=a(M),r(b,E,g),r(M,E,g),i(p),p.setScale();var x=S(b),_=S(M),D=.5*(x[1]-x[0]),C=.5*(x[1]+x[0]),F=.5*(_[1]-_[0]),I=.5*(_[1]+_[0]),z=1.3;return x=[C-D*z,C+D*z],_=[I-F*z,I+F*z],p._extremes[f._id]=u.findExtremes(f,x,{padded:!0}),p._extremes[d._id]=u.findExtremes(d,_,{padded:!0}),l(p,"a","b"),l(p,"b","a"),e(p,y),e(p,o),T.clipsegments=t(p._xctrl,p._yctrl,y,o),T.x=b,T.y=M,T.a=E,T.b=g,[T]}}}),V7=xe({"src/traces/carpet/index.js"(U,O){"use strict";O.exports={attributes:ry(),supplyDefaults:S7(),plot:k7(),calc:q7(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Nu(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),H7=xe({"lib/carpet.js"(U,O){"use strict";O.exports=V7()}}),vw=xe({"src/traces/scattercarpet/attributes.js"(U,O){"use strict";var u=qh(),v=wu(),w=Rs(),{hovertemplateAttrs:S,texttemplateAttrs:l,templatefallbackAttrs:e}=js(),t=pl(),a=oo().extendFlat,r=v.marker,n=v.line,i=r.line;O.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:a({},v.mode,{dflt:"markers"}),text:a({},v.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:a({},v.hovertext,{}),line:{color:n.color,width:n.width,dash:n.dash,backoff:n.backoff,shape:a({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:v.connectgaps,fill:a({},v.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:u(),marker:a({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:a({width:i.width,dash:i.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:v.textfont,textposition:v.textposition,selected:v.selected,unselected:v.unselected,hoverinfo:a({},w.hoverinfo,{flags:["a","b","text","name"]}),hoveron:v.hoveron,hovertemplate:S(),hovertemplatefallback:e(),zorder:v.zorder}}}),G7=xe({"src/traces/scattercarpet/defaults.js"(U,O){"use strict";var u=Sr(),v=jh(),w=Cl(),S=hh(),l=Eh(),e=cp(),t=kh(),a=Vh(),r=vw();O.exports=function(i,s,c,p){function f(E,g){return u.coerce(i,s,r,E,g)}f("carpet"),s.xaxis="x",s.yaxis="y";var d=f("a"),y=f("b"),o=Math.min(d.length,y.length);if(!o){s.visible=!1;return}s._length=o,f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext");var b=o0?T=E.labelprefix.replace(/ = $/,""):T=E._hovertitle,o.push(T+": "+g.toFixed(3)+E.labelsuffix)}if(!f.hovertemplate){var M=p.hi||f.hoverinfo,A=M.split("+");A.indexOf("all")!==-1&&(A=["a","b","text"]),A.indexOf("a")!==-1&&b(d.aaxis,p.a),A.indexOf("b")!==-1&&b(d.baxis,p.b),o.push("y: "+r.yLabel),A.indexOf("text")!==-1&&v(p,f,o),r.extraText=o.join("
")}return a}}}),Z7=xe({"src/traces/scattercarpet/event_data.js"(U,O){"use strict";O.exports=function(v,w,S,l,e){var t=l[e];return v.a=t.a,v.b=t.b,v.y=t.y,v}}}),K7=xe({"src/traces/scattercarpet/index.js"(U,O){"use strict";O.exports={attributes:vw(),supplyDefaults:G7(),colorbar:pf(),formatLabels:W7(),calc:Y7(),plot:X7(),style:Yf().style,styleOnSelect:Yf().styleOnSelect,hoverPoints:$7(),selectPoints:wv(),eventData:Z7(),moduleType:"trace",name:"scattercarpet",basePlotModule:Nu(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),J7=xe({"lib/scattercarpet.js"(U,O){"use strict";O.exports=K7()}}),pw=xe({"src/traces/contourcarpet/attributes.js"(U,O){"use strict";var u=mp(),v=w0(),w=pl(),S=oo().extendFlat,l=v.contours;O.exports=S({carpet:{valType:"string",editType:"calc"},z:u.z,a:u.x,a0:u.x0,da:u.dx,b:u.y,b0:u.y0,db:u.dy,text:u.text,hovertext:u.hovertext,transpose:u.transpose,atype:u.xtype,btype:u.ytype,fillcolor:v.fillcolor,autocontour:v.autocontour,ncontours:v.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:v.line.color,width:v.line.width,dash:v.line.dash,smoothing:v.line.smoothing,editType:"plot"},zorder:v.zorder},w("",{cLetter:"z",autoColorDflt:!1}))}}),mw=xe({"src/traces/contourcarpet/defaults.js"(U,O){"use strict";var u=Sr(),v=xg(),w=pw(),S=Db(),l=Fg(),e=zg();O.exports=function(a,r,n,i){function s(d,y){return u.coerce(a,r,w,d,y)}function c(d){return u.coerce2(a,r,w,d)}if(s("carpet"),a.a&&a.b){var p=v(a,r,s,i,"a","b");if(!p){r.visible=!1;return}s("text");var f=s("contours.type")==="constraint";f?S(a,r,s,i,n,{hasHover:!1}):(l(a,r,s,c),e(a,r,s,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;s("zorder")}}}),Q7=xe({"src/traces/contourcarpet/calc.js"(U,O){"use strict";var u=xf(),v=Sr(),w=wg(),S=Tg(),l=Ag(),e=Mg(),t=gb(),a=mw(),r=ay(),n=Ab();O.exports=function(c,p){var f=p._carpetTrace=r(c,p);if(!(!f||!f.visible||f.visible==="legendonly")){if(!p.a||!p.b){var d=c.data[f.index],y=c.data[p.index];y.a||(y.a=d.a),y.b||(y.b=d.b),a(y,p,p._defaultColor,c._fullLayout)}var o=i(c,p);return n(p,p._z),o}};function i(s,c){var p=c._carpetTrace,f=p.aaxis,d=p.baxis,y,o,b,M,A,E,g;f._minDtick=0,d._minDtick=0,v.isArray1D(c.z)&&w(c,f,d,"a","b",["z"]),y=c._a=c._a||c.a,M=c._b=c._b||c.b,y=y?f.makeCalcdata(c,"_a"):[],M=M?d.makeCalcdata(c,"_b"):[],o=c.a0||0,b=c.da||1,A=c.b0||0,E=c.db||1,g=c._z=S(c._z||c.z,c.transpose),c._emptypoints=e(g),l(g,c._emptypoints);var T=v.maxRowLength(g),m=c.xtype==="scaled"?"":y,h=t(c,m,o,b,T,f),x=c.ytype==="scaled"?"":M,_=t(c,x,A,E,g.length,d),D={a:h,b:_,z:g};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&u(s,c,{vals:g,containerStr:"",cLetter:"z"}),[D]}}}),e9=xe({"src/traces/carpet/axis_aligned_line.js"(U,O){"use strict";var u=Sr().isArrayOrTypedArray;O.exports=function(v,w,S,l){var e,t,a,r,n,i,s,c,p,f,d,y,o,b=u(S)?"a":"b",M=b==="a"?v.aaxis:v.baxis,A=M.smoothing,E=b==="a"?v.a2i:v.b2j,g=b==="a"?S:l,T=b==="a"?l:S,m=b==="a"?w.a.length:w.b.length,h=b==="a"?w.b.length:w.a.length,x=Math.floor(b==="a"?v.b2j(T):v.a2i(T)),_=b==="a"?function(ee){return v.evalxy([],ee,x)}:function(ee){return v.evalxy([],x,ee)};A&&(a=Math.max(0,Math.min(h-2,x)),r=x-a,t=b==="a"?function(ee,te){return v.dxydi([],ee,a,te,r)}:function(ee,te){return v.dxydj([],a,ee,r,te)});var D=E(g[0]),C=E(g[1]),F=D0?Math.floor:Math.ceil,R=F>0?Math.ceil:Math.floor,k=F>0?Math.min:Math.max,B=F>0?Math.max:Math.min,N=z(D+I),q=R(C-I);s=_(D);var Y=[[s]];for(e=N;e*F=0;ue--)$=B.clipsegments[ue],Q=v([],$.x,D.c2p),re=v([],$.y,C.c2p),Q.reverse(),re.reverse(),pe.push(w(Q,re,$.bicubic));var ge="M"+pe.join("L")+"Z";A(I,B.clipsegments,D,C,te,j),E(R,I,D,C,X,K,G,k,B,j,ge),d(I,ee,m,z,Y,h,k),S.setClipUrl(I,k._clipPathId,m)})};function f(T,m){var h,x,_,D,C,F,I,z,R;for(h=0;hee&&(x.max=ee),x.len=x.max-x.min}function o(T,m,h){var x=T.getPointAtLength(m),_=T.getPointAtLength(h),D=_.x-x.x,C=_.y-x.y,F=Math.sqrt(D*D+C*C);return[D/F,C/F]}function b(T){var m=Math.sqrt(T[0]*T[0]+T[1]*T[1]);return[T[0]/m,T[1]/m]}function M(T,m){var h=Math.abs(T[0]*m[0]+T[1]*m[1]),x=Math.sqrt(1-h*h);return x/h}function A(T,m,h,x,_,D){var C,F,I,z,R=l.ensureSingle(T,"g","contourbg"),k=R.selectAll("path").data(D==="fill"&&!_?[0]:[]);k.enter().append("path"),k.exit().remove();var B=[];for(z=0;z=0&&(N=Q,Y=ee):Math.abs(B[1]-N[1])=0&&(N=Q,Y=ee):l.log("endpt to newendpt is not vert. or horz.",B,N,Q)}if(Y>=0)break;z+=X(B,N),B=N}if(Y===m.edgepaths.length){l.log("unclosed perimeter path");break}I=Y,k=R.indexOf(I)===-1,k&&(I=R[0],z+=X(B,N)+"Z",B=null)}for(I=0;Ig):E=F>_,g=F;var I=f(_,D,C,F);I.pos=x,I.yc=(_+F)/2,I.i=h,I.dir=E?"increasing":"decreasing",I.x=I.pos,I.y=[C,D],T&&(I.orig_p=s[h]),M&&(I.tx=i.text[h]),A&&(I.htx=i.hovertext[h]),m.push(I)}else m.push({pos:x,empty:!0})}return i._extremes[p._id]=w.findExtremes(p,u.concat(o,y),{padded:!0}),m.length&&(m[0].t={labels:{open:v(n,"open:")+" ",high:v(n,"high:")+" ",low:v(n,"low:")+" ",close:v(n,"close:")+" "}}),m}function r(n,i,s){var c=s._minDiff;if(!c){var p=n._fullData,f=[];c=1/0;var d;for(d=0;d"+b.labels[x]+u.hoverLabelText(y,_,o.yhoverformat)):(C=v.extendFlat({},A),C.y0=C.y1=D,C.yLabelVal=_,C.yLabel=b.labels[x]+u.hoverLabelText(y,_,o.yhoverformat),C.name="",M.push(C),m[_]=C)}return M}function i(s,c,p,f){var d=s.cd,y=s.ya,o=d[0].trace,b=d[0].t,M=r(s,c,p,f);if(!M)return[];var A=M.index,E=d[A],g=M.index=E.i,T=E.dir;function m(I){return b.labels[I]+u.hoverLabelText(y,o[I][g],o.yhoverformat)}var h=E.hi||o.hoverinfo||"",x=h.split("+"),_=h==="all",D=_||x.indexOf("y")!==-1,C=_||x.indexOf("text")!==-1,F=D?[m("open"),m("high"),m("low"),m("close")+" "+t[T]]:[];return C&&l(E,o,F),M.extraText=F.join("
"),M.y0=M.y1=y.c2p(E.yc,!0),[M]}O.exports={hoverPoints:a,hoverSplit:n,hoverOnPoints:i}}}),bw=xe({"src/traces/ohlc/select.js"(U,O){"use strict";O.exports=function(v,w){var S=v.cd,l=v.xaxis,e=v.yaxis,t=[],a,r=S[0].t.bPos||0;if(w===!1)for(a=0;ac?function(o){return o<=0}:function(o){return o>=0};r.c2g=function(o){var b=r.c2l(o)-s;return(y(b)?b:0)+d},r.g2c=function(o){return r.l2c(o+s-d)},r.g2p=function(o){return o*f},r.c2p=function(o){return r.g2p(r.c2g(o))}}}function e(r,n){return n==="degrees"?w(r):r}function t(r,n){return n==="degrees"?S(r):r}function a(r,n){var i=r.type;if(i==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(p,f){return e(s(p),f)},r.c2d=function(p,f){return c(t(p,f))}}r.makeCalcdata=function(p,f){var d=p[f],y=p._length,o,b,M=function(m){return r.d2c(m,p.thetaunit)};if(d)for(o=new Array(y),b=0;b0?m:1/0},E=w(M,A),g=u.mod(E+1,M.length);return[M[E],M[g]]}function f(b){return Math.abs(b)>1e-10?b:0}function d(b,M,A){M=M||0,A=A||0;for(var E=b.length,g=new Array(E),T=0;T0?1:0}function v(t){var a=t[0],r=t[1];if(!isFinite(a)||!isFinite(r))return[1,0];var n=(a+1)*(a+1)+r*r;return[(a*a+r*r-1)/n,2*r/n]}function w(t,a){var r=a[0],n=a[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function S(t,a){return a*t.radius}function l(t,a,r,n){var i=w(t,v([r,a])),s=i[0],c=i[1],p=w(t,v([n,a])),f=p[0],d=p[1];if(a===0)return["M"+s+","+c,"L"+f+","+d].join(" ");var y=S(t,1/Math.abs(a));return["M"+s+","+c,"A"+y+","+y+" 0 0,"+(a<0?1:0)+" "+f+","+d].join(" ")}function e(t,a,r,n){var i=S(t,1/(a+1)),s=w(t,v([a,r])),c=s[0],p=s[1],f=w(t,v([a,n])),d=f[0],y=f[1];if(u(r)!==u(n)){var o=w(t,v([a,0])),b=o[0],M=o[1];return["M"+c+","+p,"A"+i+","+i+" 0 0,"+(0Ce?(Ue=Q,Oe=Q*Ce,ie=(re-Oe)/K.h/2,_e=[X[0],X[1]],ce=[$[0]+ie,$[1]-ie]):(Ue=re/Ce,Oe=re,ie=(Q-Ue)/K.w/2,_e=[X[0]+ie,X[1]-ie],ce=[$[0],$[1]]),j.xLength2=Ue,j.yLength2=Oe,j.xDomain2=_e,j.yDomain2=ce;var se=j.xOffset2=K.l+K.w*_e[0],ne=j.yOffset2=K.t+K.h*(1-ce[1]),be=j.radius=Ue/ge,De=j.innerRadius=j.getHole(ae)*be,qe=j.cx=se-be*pe[0],Ne=j.cy=ne+be*pe[3],ut=j.cxx=qe-se,ot=j.cyy=Ne-ne,yt=H.side,At;yt==="counterclockwise"?(At=yt,yt="top"):yt==="clockwise"&&(At=yt,yt="bottom"),j.radialAxis=j.mockAxis(te,ae,H,{_id:"x",side:yt,_trueSide:At,domain:[De/K.w,be/K.w]}),j.angularAxis=j.mockAxis(te,ae,Z,{side:"right",domain:[0,Math.PI],autorange:!1}),j.doAutoRange(te,ae),j.updateAngularAxis(te,ae),j.updateRadialAxis(te,ae),j.updateRadialAxisTitle(te,ae),j.xaxis=j.mockCartesianAxis(te,ae,{_id:"x",domain:_e}),j.yaxis=j.mockCartesianAxis(te,ae,{_id:"y",domain:ce});var It=j.pathSubplot();j.clipPaths.forTraces.select("path").attr("d",It).attr("transform",l(ut,ot)),G.frontplot.attr("transform",l(se,ne)).call(t.setClipUrl,j._hasClipOnAxisFalse?null:j.clipIds.forTraces,j.gd),G.bg.attr("d",It).attr("transform",l(qe,Ne)).call(e.fill,ae.bgcolor)},B.mockAxis=function(te,ae,j,G){var K=w.extendFlat({},j,G);return i(K,ae,te),K},B.mockCartesianAxis=function(te,ae,j){var G=this,K=G.isSmith,H=j._id,Z=w.extendFlat({type:"linear"},j);n(Z,te);var X={x:[0,2],y:[1,3]};return Z.setRange=function(){var $=G.sectorBBox,Q=X[H],re=G.radialAxis._rl,ue=(re[1]-re[0])/(1-G.getHole(ae));Z.range=[$[Q[0]]*ue,$[Q[1]]*ue]},Z.isPtWithinRange=H==="x"&&!K?function($){return G.isPtInside($)}:function(){return!0},Z.setRange(),Z.setScale(),Z},B.doAutoRange=function(te,ae){var j=this,G=j.gd,K=j.radialAxis,H=j.getRadial(ae);s(G,K);var Z=K.range;if(H.range=Z.slice(),H._input.range=Z.slice(),K._rl=[K.r2l(Z[0],null,"gregorian"),K.r2l(Z[1],null,"gregorian")],K.minallowed!==void 0){var X=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],X):K._rl[0]=Math.max(K._rl[0],X)}if(K.maxallowed!==void 0){var $=K.r2l(K.maxallowed);K._rl[0]90&&re<=270&&(ue.tickangle=180);var Te=ge?function(be){var De=C(j,x([be.x,0]));return l(De[0]-X,De[1]-$)}:function(be){return l(ue.l2p(be.x)+Z,0)},Se=ge?function(be){return D(j,be.x,-1/0,1/0)}:function(be){return j.pathArc(ue.r2p(be.x)+Z)},Ce=N(Q);if(j.radialTickLayout!==Ce&&(K["radial-axis"].selectAll(".xtick").remove(),j.radialTickLayout=Ce),pe){ue.setScale();var Ue=0,Oe=ge?(ue.tickvals||[]).filter(function(be){return be>=0}).map(function(be){return r.tickText(ue,be,!0,!1)}):r.calcTicks(ue),_e=ge?Oe:r.clipEnds(ue,Oe),ce=r.getTickSigns(ue)[2];ge&&((ue.ticks==="top"&&ue.side==="bottom"||ue.ticks==="bottom"&&ue.side==="top")&&(ce=-ce),ue.ticks==="top"&&ue.side==="top"&&(Ue=-ue.ticklen),ue.ticks==="bottom"&&ue.side==="bottom"&&(Ue=ue.ticklen)),r.drawTicks(G,ue,{vals:Oe,layer:K["radial-axis"],path:r.makeTickPath(ue,0,ce),transFn:Te,crisp:!1}),r.drawGrid(G,ue,{vals:_e,layer:K["radial-grid"],path:Se,transFn:w.noop,crisp:!1}),r.drawLabels(G,ue,{vals:Oe,layer:K["radial-axis"],transFn:Te,labelFns:r.makeLabelFns(ue,Ue)})}var ie=j.radialAxisAngle=j.vangles?R(Y(z(Q.angle),j.vangles)):Q.angle,se=l(X,$),ne=se+S(-ie);ee(K["radial-axis"],pe&&(Q.showticklabels||Q.ticks),{transform:ne}),ee(K["radial-grid"],pe&&Q.showgrid,{transform:ge?"":se}),ee(K["radial-line"].select("line"),pe&&Q.showline,{x1:ge?-H:Z,y1:0,x2:H,y2:0,transform:ne}).attr("stroke-width",Q.linewidth).call(e.stroke,Q.linecolor)},B.updateRadialAxisTitle=function(te,ae,j){if(!this.isSmith){var G=this,K=G.gd,H=G.radius,Z=G.cx,X=G.cy,$=G.getRadial(ae),Q=G.id+"title",re=0;if($.title){var ue=t.bBox(G.layers["radial-axis"].node()).height,pe=$.title.font.size,ge=$.side;re=ge==="top"?pe:ge==="counterclockwise"?-(ue+pe*.4):ue+pe*.8}var Te=j!==void 0?j:G.radialAxisAngle,Se=z(Te),Ce=Math.cos(Se),Ue=Math.sin(Se),Oe=Z+H/2*Ce+re*Ue,_e=X-H/2*Ue+re*Ce;G.layers["radial-axis-title"]=d.draw(K,Q,{propContainer:$,propName:G.id+".radialaxis.title.text",placeholder:F(K,"Click to enter radial axis title"),attributes:{x:Oe,y:_e,"text-anchor":"middle"},transform:{rotate:-Te}})}},B.updateAngularAxis=function(te,ae){var j=this,G=j.gd,K=j.layers,H=j.radius,Z=j.innerRadius,X=j.cx,$=j.cy,Q=j.getAngular(ae),re=j.angularAxis,ue=j.isSmith;ue||(j.fillViewInitialKey("angularaxis.rotation",Q.rotation),re.setGeometry(),re.setScale());var pe=ue?function(De){var qe=C(j,x([0,De.x]));return Math.atan2(qe[0]-X,qe[1]-$)-Math.PI/2}:function(De){return re.t2g(De.x)};re.type==="linear"&&re.thetaunit==="radians"&&(re.tick0=R(re.tick0),re.dtick=R(re.dtick));var ge=function(De){return l(X+H*Math.cos(De),$-H*Math.sin(De))},Te=ue?function(De){var qe=C(j,x([0,De.x]));return l(qe[0],qe[1])}:function(De){return ge(pe(De))},Se=ue?function(De){var qe=C(j,x([0,De.x])),Ne=Math.atan2(qe[0]-X,qe[1]-$)-Math.PI/2;return l(qe[0],qe[1])+S(-R(Ne))}:function(De){var qe=pe(De);return ge(qe)+S(-R(qe))},Ce=ue?function(De){return _(j,De.x,0,1/0)}:function(De){var qe=pe(De),Ne=Math.cos(qe),ut=Math.sin(qe);return"M"+[X+Z*Ne,$-Z*ut]+"L"+[X+H*Ne,$-H*ut]},Ue=r.makeLabelFns(re,0),Oe=Ue.labelStandoff,_e={};_e.xFn=function(De){var qe=pe(De);return Math.cos(qe)*Oe},_e.yFn=function(De){var qe=pe(De),Ne=Math.sin(qe)>0?.2:1;return-Math.sin(qe)*(Oe+De.fontSize*Ne)+Math.abs(Math.cos(qe))*(De.fontSize*g)},_e.anchorFn=function(De){var qe=pe(De),Ne=Math.cos(qe);return Math.abs(Ne)<.1?"middle":Ne>0?"start":"end"},_e.heightFn=function(De,qe,Ne){var ut=pe(De);return-.5*(1+Math.sin(ut))*Ne};var ce=N(Q);j.angularTickLayout!==ce&&(K["angular-axis"].selectAll("."+re._id+"tick").remove(),j.angularTickLayout=ce);var ie=ue?[1/0].concat(re.tickvals||[]).map(function(De){return r.tickText(re,De,!0,!1)}):r.calcTicks(re);ue&&(ie[0].text="\u221E",ie[0].fontSize*=1.75);var se;if(ae.gridshape==="linear"?(se=ie.map(pe),w.angleDelta(se[0],se[1])<0&&(se=se.slice().reverse())):se=null,j.vangles=se,re.type==="category"&&(ie=ie.filter(function(De){return w.isAngleInsideSector(pe(De),j.sectorInRad)})),re.visible){var ne=re.ticks==="inside"?-1:1,be=(re.linewidth||1)/2;r.drawTicks(G,re,{vals:ie,layer:K["angular-axis"],path:"M"+ne*be+",0h"+ne*re.ticklen,transFn:Se,crisp:!1}),r.drawGrid(G,re,{vals:ie,layer:K["angular-grid"],path:Ce,transFn:w.noop,crisp:!1}),r.drawLabels(G,re,{vals:ie,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Te,labelFns:_e})}ee(K["angular-line"].select("path"),Q.showline,{d:j.pathSubplot(),transform:l(X,$)}).attr("stroke-width",Q.linewidth).call(e.stroke,Q.linecolor)},B.updateFx=function(te,ae){if(!this.gd._context.staticPlot){var j=!this.isSmith;j&&(this.updateAngularDrag(te),this.updateRadialDrag(te,ae,0),this.updateRadialDrag(te,ae,1)),this.updateHoverAndMainDrag(te)}},B.updateHoverAndMainDrag=function(te){var ae=this,j=ae.isSmith,G=ae.gd,K=ae.layers,H=te._zoomlayer,Z=T.MINZOOM,X=T.OFFEDGE,$=ae.radius,Q=ae.innerRadius,re=ae.cx,ue=ae.cy,pe=ae.cxx,ge=ae.cyy,Te=ae.sectorInRad,Se=ae.vangles,Ce=ae.radialAxis,Ue=m.clampTiny,Oe=m.findXYatLength,_e=m.findEnclosingVertexAngles,ce=T.cornerHalfWidth,ie=T.cornerLen/2,se,ne,be=c.makeDragger(K,"path","maindrag",te.dragmode===!1?"none":"crosshair");u.select(be).attr("d",ae.pathSubplot()).attr("transform",l(re,ue)),be.onmousemove=function(_t){f.hover(G,_t,ae.id),G._fullLayout._lasthover=be,G._fullLayout._hoversubplot=ae.id},be.onmouseout=function(_t){G._dragging||p.unhover(G,_t)};var De={element:be,gd:G,subplot:ae.id,plotinfo:{id:ae.id,xaxis:ae.xaxis,yaxis:ae.yaxis},xaxes:[ae.xaxis],yaxes:[ae.yaxis]},qe,Ne,ut,ot,yt,At,It,Zt,vr;function Ut(_t,Bt){return Math.sqrt(_t*_t+Bt*Bt)}function Jt(_t,Bt){return Ut(_t-pe,Bt-ge)}function at(_t,Bt){return Math.atan2(ge-Bt,_t-pe)}function Ee(_t,Bt){return[_t*Math.cos(Bt),_t*Math.sin(-Bt)]}function Re(_t,Bt){if(_t===0)return ae.pathSector(2*ce);var Et=ie/_t,hr=Bt-Et,$r=Bt+Et,ca=Math.max(0,Math.min(_t,$)),na=ca-ce,wa=ca+ce;return"M"+Ee(na,hr)+"A"+[na,na]+" 0,0,0 "+Ee(na,$r)+"L"+Ee(wa,$r)+"A"+[wa,wa]+" 0,0,1 "+Ee(wa,hr)+"Z"}function he(_t,Bt,Et){if(_t===0)return ae.pathSector(2*ce);var hr=Ee(_t,Bt),$r=Ee(_t,Et),ca=Ue((hr[0]+$r[0])/2),na=Ue((hr[1]+$r[1])/2),wa,pa;if(ca&&na){var fa=na/ca,za=-1/fa,Ia=Oe(ce,fa,ca,na);wa=Oe(ie,za,Ia[0][0],Ia[0][1]),pa=Oe(ie,za,Ia[1][0],Ia[1][1])}else{var Va,Oa;na?(Va=ie,Oa=ce):(Va=ce,Oa=ie),wa=[[ca-Va,na-Oa],[ca+Va,na-Oa]],pa=[[ca-Va,na+Oa],[ca+Va,na+Oa]]}return"M"+wa.join("L")+"L"+pa.reverse().join("L")+"Z"}function ye(){ut=null,ot=null,yt=ae.pathSubplot(),At=!1;var _t=G._fullLayout[ae.id];It=e.color(_t.bgcolor).luminosity(),Zt=c.makeZoombox(H,It,re,ue,yt),Zt.attr("fill-rule","evenodd"),vr=c.makeCorners(H,re,ue),b(G)}function Ie(_t,Bt){return Bt=Math.max(Math.min(Bt,$),Q),_tZ?(_t-1&&_t===1&&o(Bt,G,[ae.xaxis],[ae.yaxis],ae.id,De),Et.indexOf("event")>-1&&f.click(G,Bt,ae.id)}De.prepFn=function(_t,Bt,Et){var hr=G._fullLayout.dragmode,$r=be.getBoundingClientRect();G._fullLayout._calcInverseTransform(G);var ca=G._fullLayout._invTransform;se=G._fullLayout._invScaleX,ne=G._fullLayout._invScaleY;var na=w.apply3DTransform(ca)(Bt-$r.left,Et-$r.top);if(qe=na[0],Ne=na[1],Se){var wa=m.findPolygonOffset($,Te[0],Te[1],Se);qe+=pe+wa[0],Ne+=ge+wa[1]}switch(hr){case"zoom":De.clickFn=mt,j||(Se?De.moveFn=pt:De.moveFn=He,De.doneFn=ct,ye(_t,Bt,Et));break;case"select":case"lasso":y(_t,Bt,Et,De,hr);break}},p.init(De)},B.updateRadialDrag=function(te,ae,j){var G=this,K=G.gd,H=G.layers,Z=G.radius,X=G.innerRadius,$=G.cx,Q=G.cy,re=G.radialAxis,ue=T.radialDragBoxSize,pe=ue/2;if(!re.visible)return;var ge=z(G.radialAxisAngle),Te=re._rl,Se=Te[0],Ce=Te[1],Ue=Te[j],Oe=.75*(Te[1]-Te[0])/(1-G.getHole(ae))/Z,_e,ce,ie;j?(_e=$+(Z+pe)*Math.cos(ge),ce=Q-(Z+pe)*Math.sin(ge),ie="radialdrag"):(_e=$+(X-pe)*Math.cos(ge),ce=Q-(X-pe)*Math.sin(ge),ie="radialdrag-inner");var se=c.makeRectDragger(H,ie,"crosshair",-pe,-pe,ue,ue),ne={element:se,gd:K};te.dragmode===!1&&(ne.dragmode=!1),ee(u.select(se),re.visible&&X0!=(j?qe>Se:qe=90||K>90&&H>=450?ge=1:X<=0&&Q<=0?ge=0:ge=Math.max(X,Q),K<=180&&H>=180||K>180&&H>=540?re=-1:Z>=0&&$>=0?re=0:re=Math.min(Z,$),K<=270&&H>=270||K>270&&H>=630?ue=-1:X>=0&&Q>=0?ue=0:ue=Math.min(X,Q),H>=360?pe=1:Z<=0&&$<=0?pe=0:pe=Math.max(Z,$),[re,ue,pe,ge]}function Y(te,ae){var j=function(K){return w.angleDist(te,K)},G=w.findIndexOfMin(ae,j);return ae[G]}function ee(te,ae,j){return ae?(te.attr("display",null),te.attr(j)):te&&te.attr("display","none"),te}}}),Mw=xe({"src/plots/polar/layout_attributes.js"(U,O){"use strict";var u=sc(),v=$c(),w=Gl().attributes,S=Sr().extendFlat,l=Hl().overrideAll,e=l({color:v.color,showline:S({},v.showline,{dflt:!0}),linecolor:v.linecolor,linewidth:v.linewidth,showgrid:S({},v.showgrid,{dflt:!0}),gridcolor:v.gridcolor,gridwidth:v.gridwidth,griddash:v.griddash},"plot","from-root"),t=l({tickmode:v.minor.tickmode,nticks:v.nticks,tick0:v.tick0,dtick:v.dtick,tickvals:v.tickvals,ticktext:v.ticktext,ticks:v.ticks,ticklen:v.ticklen,tickwidth:v.tickwidth,tickcolor:v.tickcolor,ticklabelstep:v.ticklabelstep,showticklabels:v.showticklabels,labelalias:v.labelalias,minorloglabels:v.minorloglabels,showtickprefix:v.showtickprefix,tickprefix:v.tickprefix,showticksuffix:v.showticksuffix,ticksuffix:v.ticksuffix,showexponent:v.showexponent,exponentformat:v.exponentformat,minexponent:v.minexponent,separatethousands:v.separatethousands,tickfont:v.tickfont,tickangle:v.tickangle,tickformat:v.tickformat,tickformatstops:v.tickformatstops,layer:v.layer},"plot","from-root"),a={visible:S({},v.visible,{dflt:!0}),type:S({},v.type,{values:["-","linear","log","date","category"]}),autotypenumbers:v.autotypenumbers,autorangeoptions:{minallowed:v.autorangeoptions.minallowed,maxallowed:v.autorangeoptions.maxallowed,clipmin:v.autorangeoptions.clipmin,clipmax:v.autorangeoptions.clipmax,include:v.autorangeoptions.include,editType:"plot"},autorange:S({},v.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:S({},v.minallowed,{editType:"plot"}),maxallowed:S({},v.maxallowed,{editType:"plot"}),range:S({},v.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:v.categoryorder,categoryarray:v.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:v.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:S({},v.title.text,{editType:"plot",dflt:""}),font:S({},v.title.font,{editType:"plot"}),editType:"plot"},hoverformat:v.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(a,e,t);var r={visible:S({},v.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:v.autotypenumbers,categoryorder:v.categoryorder,categoryarray:v.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:v.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(r,e,t),O.exports={domain:w({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:u.background},radialaxis:a,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),d9=xe({"src/plots/polar/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=wi(),w=Cs(),S=Av(),l=df().getSubplotData,e=mv(),t=sp(),a=Rd(),r=Fd(),n=og(),i=v0(),s=__(),c=lp(),p=Mw(),f=ww(),d=iy(),y=d.axisNames;function o(M,A,E,g){var T=E("bgcolor");g.bgColor=v.combine(T,g.paper_bgcolor);var m=E("sector");E("hole");var h=l(g.fullData,d.name,g.id),x=g.layoutOut,_;function D(pe,ge){return E(_+"."+pe,ge)}for(var C=0;C")}}O.exports={hoverPoints:v,makeHoverPointText:w}}}),m9=xe({"src/traces/scatterpolar/index.js"(U,O){"use strict";O.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:sy(),categories:["polar","symbols","showLegend","scatter-like"],attributes:um(),supplyDefaults:ly().supplyDefaults,colorbar:pf(),formatLabels:uy(),calc:v9(),plot:p9(),style:Yf().style,styleOnSelect:Yf().styleOnSelect,hoverPoints:cy().hoverPoints,selectPoints:wv(),meta:{}}}}),g9=xe({"lib/scatterpolar.js"(U,O){"use strict";O.exports=m9()}}),Sw=xe({"src/traces/scatterpolargl/attributes.js"(U,O){"use strict";var u=um(),{cliponaxis:v,hoveron:w}=u,S=Br(u,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:a},fill:r,fillcolor:n,marker:i,textfont:s,textposition:c}=tm();O.exports=Rr(Hr({},S),{connectgaps:l,fill:r,fillcolor:n,line:{color:e,dash:t,editType:"calc",width:a},marker:i,textfont:s,textposition:c})}}),y9=xe({"src/traces/scatterpolargl/defaults.js"(U,O){"use strict";var u=Sr(),v=Cl(),w=ly().handleRThetaDefaults,S=hh(),l=Eh(),e=kh(),t=Vh(),a=jh().PTS_LINESONLY,r=Sw();O.exports=function(i,s,c,p){function f(y,o){return u.coerce(i,s,r,y,o)}var d=w(i,s,p,f);if(!d){s.visible=!1;return}f("thetaunit"),f("mode",d=t&&(g.marker.cluster=b.tree),g.marker&&(g.markerSel.positions=g.markerUnsel.positions=g.marker.positions=x),g.line&&x.length>1&&e.extendFlat(g.line,l.linePositions(n,o,x)),g.text&&(e.extendFlat(g.text,{positions:x},l.textPosition(n,o,g.text,g.marker)),e.extendFlat(g.textSel,{positions:x},l.textPosition(n,o,g.text,g.markerSel)),e.extendFlat(g.textUnsel,{positions:x},l.textPosition(n,o,g.text,g.markerUnsel))),g.fill&&!f.fill2d&&(f.fill2d=!0),g.marker&&!f.scatter2d&&(f.scatter2d=!0),g.line&&!f.line2d&&(f.line2d=!0),g.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(g.line),f.fillOptions.push(g.fill),f.markerOptions.push(g.marker),f.markerSelectedOptions.push(g.markerSel),f.markerUnselectedOptions.push(g.markerUnsel),f.textOptions.push(g.text),f.textSelectedOptions.push(g.textSel),f.textUnselectedOptions.push(g.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),b.x=_,b.y=D,b.rawx=_,b.rawy=D,b.r=A,b.theta=E,b.positions=x,b._scene=f,b.index=f.count,f.count++}}),w(n,i,s)}},O.exports.reglPrecompiled=a}}),A9=xe({"src/traces/scatterpolargl/index.js"(U,O){"use strict";var u=w9();u.plot=T9(),O.exports=u}}),M9=xe({"lib/scatterpolargl.js"(U,O){"use strict";O.exports=A9()}}),Ew=xe({"src/traces/barpolar/attributes.js"(U,O){"use strict";var{hovertemplateAttrs:u,templatefallbackAttrs:v}=js(),w=oo().extendFlat,S=um(),l=Gh();O.exports={r:S.r,theta:S.theta,r0:S.r0,dr:S.dr,theta0:S.theta0,dtheta:S.dtheta,thetaunit:S.thetaunit,base:w({},l.base,{}),offset:w({},l.offset,{}),width:w({},l.width,{}),text:w({},l.text,{}),hovertext:w({},l.hovertext,{}),marker:e(),hoverinfo:S.hoverinfo,hovertemplate:u(),hovertemplatefallback:v(),selected:l.selected,unselected:l.unselected};function e(){var t=w({},l.marker);return delete t.cornerradius,t}}}),kw=xe({"src/traces/barpolar/layout_attributes.js"(U,O){"use strict";O.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),S9=xe({"src/traces/barpolar/defaults.js"(U,O){"use strict";var u=Sr(),v=ly().handleRThetaDefaults,w=pg(),S=Ew();O.exports=function(e,t,a,r){function n(s,c){return u.coerce(e,t,S,s,c)}var i=v(e,t,r,n);if(!i){t.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),w(e,t,n,a,r),u.coerceSelectionMarkerOpacity(t,n)}}}),E9=xe({"src/traces/barpolar/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=kw();O.exports=function(w,S,l){var e={},t;function a(i,s){return u.coerce(w[t]||{},S[t],v,i,s)}for(var r=0;r0?(p=s,f=c):(p=c,f=s);var d=l.findEnclosingVertexAngles(p,t.vangles)[0],y=l.findEnclosingVertexAngles(f,t.vangles)[1],o=[d,(p+f)/2,y];return l.pathPolygonAnnulus(n,i,p,f,o,a,r)}:function(n,i,s,c){return w.pathAnnulus(n,i,s,c,a,r)}}}}),C9=xe({"src/traces/barpolar/hover.js"(U,O){"use strict";var u=hu(),v=Sr(),w=vp().getTraceColor,S=v.fillText,l=cy().makeHoverPointText,e=oy().isPtInsidePolygon;O.exports=function(a,r,n){var i=a.cd,s=i[0].trace,c=a.subplot,p=c.radialAxis,f=c.angularAxis,d=c.vangles,y=d?e:v.isPtInsideSector,o=a.maxHoverDistance,b=f._period||2*Math.PI,M=Math.abs(p.g2p(Math.sqrt(r*r+n*n))),A=Math.atan2(n,r);p.range[0]>p.range[1]&&(A+=Math.PI);var E=function(h){return y(M,A,[h.rp0,h.rp1],[h.thetag0,h.thetag1],d)?o+Math.min(1,Math.abs(h.thetag1-h.thetag0)/b)-1+(h.rp1-M)/(h.rp1-h.rp0)-1:1/0};if(u.getClosest(i,E,a),a.index!==!1){var g=a.index,T=i[g];a.x0=a.x1=T.ct[0],a.y0=a.y1=T.ct[1];var m=v.extendFlat({},T,{r:T.s,theta:T.p});return S(T,s,a),l(m,s,c,a),a.hovertemplate=s.hovertemplate,a.color=w(s,T),a.xLabelVal=a.yLabelVal=void 0,T.s<0&&(a.idealAlign="left"),[a]}}}}),L9=xe({"src/traces/barpolar/index.js"(U,O){"use strict";O.exports={moduleType:"trace",name:"barpolar",basePlotModule:sy(),categories:["polar","bar","showLegend"],attributes:Ew(),layoutAttributes:kw(),supplyDefaults:S9(),supplyLayoutDefaults:E9(),calc:Cw().calc,crossTraceCalc:Cw().crossTraceCalc,plot:k9(),colorbar:pf(),formatLabels:uy(),style:ph().style,styleOnSelect:ph().styleOnSelect,hoverPoints:C9(),selectPoints:pp(),meta:{}}}}),P9=xe({"lib/barpolar.js"(U,O){"use strict";O.exports=L9()}}),Lw=xe({"src/plots/smith/constants.js"(U,O){"use strict";O.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),Pw=xe({"src/plots/smith/layout_attributes.js"(U,O){"use strict";var u=sc(),v=$c(),w=Gl().attributes,S=Sr().extendFlat,l=Hl().overrideAll,e=l({color:v.color,showline:S({},v.showline,{dflt:!0}),linecolor:v.linecolor,linewidth:v.linewidth,showgrid:S({},v.showgrid,{dflt:!0}),gridcolor:v.gridcolor,gridwidth:v.gridwidth,griddash:v.griddash},"plot","from-root"),t=l({ticklen:v.ticklen,tickwidth:S({},v.tickwidth,{dflt:2}),tickcolor:v.tickcolor,showticklabels:v.showticklabels,labelalias:v.labelalias,showtickprefix:v.showtickprefix,tickprefix:v.tickprefix,showticksuffix:v.showticksuffix,ticksuffix:v.ticksuffix,tickfont:v.tickfont,tickformat:v.tickformat,hoverformat:v.hoverformat,layer:v.layer},"plot","from-root"),a=S({visible:S({},v.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:S({},v.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=S({visible:S({},v.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:v.ticks,editType:"calc"},e,t);O.exports={domain:w({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:u.background},realaxis:a,imaginaryaxis:r,editType:"calc"}}}),I9=xe({"src/plots/smith/layout_defaults.js"(U,O){"use strict";var u=Sr(),v=wi(),w=Cs(),S=Av(),l=df().getSubplotData,e=Fd(),t=Rd(),a=v0(),r=Oh(),n=Pw(),i=Lw(),s=i.axisNames,c=f(function(d){return u.isTypedArray(d)&&(d=Array.from(d)),d.slice().reverse().map(function(y){return-y}).concat([0]).concat(d)},String);function p(d,y,o,b){var M=o("bgcolor");b.bgColor=v.combine(M,b.paper_bgcolor);var A=l(b.fullData,i.name,b.id),E=b.layoutOut,g;function T(N,q){return o(g+"."+N,q)}for(var m=0;m")}}O.exports={hoverPoints:v,makeHoverPointText:w}}}),O9=xe({"src/traces/scattersmith/index.js"(U,O){"use strict";O.exports={moduleType:"trace",name:"scattersmith",basePlotModule:D9(),categories:["smith","symbols","showLegend","scatter-like"],attributes:Iw(),supplyDefaults:R9(),colorbar:pf(),formatLabels:F9(),calc:z9(),plot:B9(),style:Yf().style,styleOnSelect:Yf().styleOnSelect,hoverPoints:N9().hoverPoints,selectPoints:wv(),meta:{}}}}),U9=xe({"lib/scattersmith.js"(U,O){"use strict";O.exports=O9()}}),Dw=xe({"src/traces/quiver/attributes.js"(U,O){"use strict";var u=Rs(),v=js().hovertemplateAttrs,w=Kl().axisHoverFormat,S=oo().extendFlat,l=pl(),e=Rc().dash,t=Od(),a=wu(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:a.x0,dx:a.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:a.y0,dy:a.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},anglemode:{valType:"enumerated",values:["paper","data"],dflt:"axis",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:w("x"),yhoverformat:w("y"),uhoverformat:w("u","noDate"),vhoverformat:w("v","noDate"),hoverinfo:S({},u.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:v({},{keys:["x","y","u","v","text","name"]}),text:a.text,textposition:a.textposition,textfont:a.textfont,marker:S({arrowsize:S({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};O.exports=r}}),j9=xe({"src/traces/quiver/defaults.js"(U,O){"use strict";var u=Sr(),v=Dw(),w=_v(),S=vf().hasColorscale,l=Fc();O.exports=function(t,a,r,n){function i(M,A){return u.coerce(t,a,v,M,A)}var s=w(t,a,n,i);if(!s){a.visible=!1;return}var c=i("u"),p=i("v");if(!u.isArrayOrTypedArray(c)||c.length===0){a.u=new Array(s);for(var f=0;fC&&(C=s[q]),c[q]I&&(I=c[q]),aeR&&(R=ae),jB&&(B=j);var G=Math.sqrt(ae*ae+j*j);if(G>y&&(y=G),Gb&&(b=K))}}else Y.x=S,Y.y=S}if(r._maxNorm=y,m==="scaled"||T==="paper"){let ge=(C-D)*(I-F)/p;ge===0?r._scaleFactor=1/r._maxNorm:r._scaleFactor=Math.sqrt(ge)/r._maxNorm}else r._scaleFactor=1;r._scaleFactor*=r.sizeref;let H=new Array(p),Z=new Array(p),X=new Array(p),$=new Array(p);for(var Q,re,q=0;qp.i&&isFinite(f[p.i]))d=f[p.i];else{var y=i.u&&i.u[p.i]||0,o=i.v&&i.v[p.i]||0;d=Math.sqrt(y*y+o*o)}return c(d)})}function t(n){var i=u.select(n).selectAll("g.trace.quiver");i.each(function(s){r(n,s,u.select(this))})}function a(n,i,s){r(n,i,s)}function r(n,i,s){var c=i[0].trace,p=c.marker||{},f=p.line||{},d=v.isArrayOrTypedArray(p.color)?void 0:p.color,y=c._hasColorscale;if(s)if(c.selectedpoints){var o=(c.selected||{}).marker||{},b=(c.unselected||{}).marker||{},M=o.line||{},A=b.line||{};s.selectAll("path.js-line").each(function(g){var T=u.select(this),m=!g.selected,h=m?b.color:o.color,x=m?A.width!==void 0?A.width:f.width:M.width!==void 0?M.width:f.width;h?(w.lineGroupStyle(T,x,h,f.dash),T.style("stroke-opacity",1)):(w.lineGroupStyle(T,x,d,f.dash),y&&e(T,c),T.style("stroke-opacity",m?l:1))}),w.selectedTextStyle(s.selectAll("text"),c)}else{var E=s.selectAll("path.js-line");E.call(w.lineGroupStyle,f.width,d,f.dash),y&&e(E,c),E.style("stroke-opacity",1),w.textPointStyle(s.selectAll("text"),c,n)}}O.exports={style:t,styleOnSelect:a,colorscaleStroke:e}}}),H9=xe({"src/traces/quiver/plot.js"(U,O){"use strict";var u=Na(),v=Sr(),w=go(),S=fy().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,a=.7;O.exports=function(i,s,c,p,f,d){var y,o,b=!f,M=!!f&&f.duration>0;if(y=p.selectAll("g.trace").data(c,function(E){return E[0].trace.uid}),y.enter().append("g").attr("class",function(E){return"trace quiver trace"+E[0].trace.uid}).style("stroke-miterlimit",2),y.order(),M){d&&(o=d());var A=u.transition().duration(f.duration).ease(f.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()});A.each(function(){p.selectAll("g.trace").each(function(E,g){r(i,g,s,E,c,this,f)})})}else y.each(function(E,g){r(i,g,s,E,c,this,f)});b&&y.exit().remove()};function r(n,i,s,c,p,f,d){var y=c[0].trace,o=s.xaxis,b=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=u.select(f);var M=u.select(f).selectAll("g.lines").data([c]);M.enter().append("g").classed("lines",!0),w.setClipUrl(M,s.layerClipId,n);var A=M.selectAll("path.js-line").data(c);A.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),A.exit().remove();let E=y._maxNorm||0,g=y.anglemode,T=y.sizemode,m=y.sizeref,h=y.anchor,x=g==="paper"?y._scaleFactor*Math.sqrt(Math.abs(o._m*b._m)):y._scaleFactor,_=y.marker.arrowsize;A.each(function(k){let B=u.select(this);if(k.x===void 0||k.y===void 0){B.attr("d",null);return}let N=(g==="paper"?k._u*Math.sign(o._m):u.round(o._m*k._u))*x,q=(g==="paper"?k._v*Math.sign(b._m):u.round(b._m*k._v))*x,Y=(y._input.marker||{}).arrowsize!==void 0;var ee,te,ae,j;h==="tip"?(ee=o.c2p(k.x)-N,ae=b.c2p(k.y)-q,te=o.c2p(k.x),j=b.c2p(k.y)):h==="center"?(ee=o.c2p(k.x)-N/2,ae=b.c2p(k.y)-q/2,te=o.c2p(k.x)+N/2,j=b.c2p(k.y)+q/2):(ee=o.c2p(k.x),ae=b.c2p(k.y),te=o.c2p(k.x)+N,j=b.c2p(k.y)+q),k._px0=ee,k._py0=ae,k._px1=te,k._py1=j;var G=y.marker.line.width;Y||(G=Math.max(G,t));let K=Math.sqrt((te-ee)*(te-ee)+(j-ae)*(j-ae)),H=a*K,Z=Math.min(e*_*G,H),X=Math.atan2(j-ae,te-ee),$=te-Z*Math.cos(X-l),Q=j-Z*Math.sin(X-l),re=te-Z*Math.cos(X+l),ue=j-Z*Math.sin(X+l),pe="M"+ee+","+ae+"L"+te+","+j+"L"+$+","+Q+"L"+te+","+j+"L"+re+","+ue;B.attr("d",pe)});var D=y.marker||{},C=D.line||{},F=v.isArrayOrTypedArray(D.color)?void 0:D.color;w.lineGroupStyle(A,C.width,F,C.dash),y._hasColorscale&&S(A,y);var I=u.select(f).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),w.setClipUrl(I,s.layerClipId,n);var z=I.selectAll("g.textpoint").data(c);if(z.enter().append("g").classed("textpoint",!0).append("text"),z.exit().remove(),z.each(function(k){var B=u.select(this),N=w.translatePoint(k,B.select("text"),o,b);N||B.remove()}),z.selectAll("text").call(w.textPointStyle,y,n).each(function(k){var B=o.c2p(k.x),N=b.c2p(k.y);u.select(this).selectAll("tspan.line").each(function(){u.select(this).attr({x:B,y:N})})}),d&&d.duration>0){var R=u.transition().duration(d.duration).ease(d.easing);A.transition(R).style("opacity",1)}}}}),G9=xe({"src/traces/quiver/hover.js"(U,O){"use strict";var u=Sr(),v=hu(),w=hp();function S(l,e,t,a,r,n){let i=r-t,s=n-a,c=i*i+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-a)*(e-a));var p=((l-t)*i+(e-a)*s)/c;p=Math.max(0,Math.min(1,p));let f=t+p*i,d=a+p*s;return Math.sqrt((l-f)*(l-f)+(e-d)*(e-d))}O.exports=function(e,t,a,r){var n=e.cd,i=n[0].trace,s=e.xa,c=e.ya,p=s.c2p(t),f=c.c2p(a),d=function(T){return T._px0===void 0?1/0:S(p,f,T._px0,T._py0,T._px1,T._py1)};if(v.getClosest(n,d,e),e.index!==!1){var y=n[e.index],o=s.c2p(y.x,!0),b=c.c2p(y.y,!0),M=Math.sqrt((p-o)*(p-o)+(f-b)*(f-b));e.index=y.i;var A=i.u?i.u[y.i]:0,E=i.v?i.v[y.i]:0,g="u: "+A+", v: "+E;return u.extendFlat(e,{color:w(i,y),x0:o-3,x1:o+3,xLabelVal:y.x,y0:b-3,y1:b+3,yLabelVal:y.y,uLabelVal:A,vLabelVal:E,extraText:g,spikeDistance:M,hovertemplate:i.hovertemplate}),u.fillText(y,i,e),[e]}}}}),W9=xe({"src/traces/quiver/format_labels.js"(U,O){"use strict";var u=uo(),v=Sr();O.exports=function(S,l,e){var t={},a={_fullLayout:e},r=u.getFromTrace(a,l,"x"),n=u.getFromTrace(a,l,"y"),i=S.x,s=S.y;t.xLabel=u.tickText(r,r.c2l(i),!0).text,t.yLabel=u.tickText(n,n.c2l(s),!0).text;var c=l.u?l.u[S.i]:0,p=l.v?l.v[S.i]:0,f=l.uhoverformat,d=l.vhoverformat;return t.uLabel=f?v.numberFormat(f)(c):String(c),t.vLabel=d?v.numberFormat(d)(p):String(p),t}}}),Y9=xe({"src/traces/quiver/event_data.js"(U,O){"use strict";O.exports=function(v,w,S,l,e){return v.x=w.x,v.y=w.y,v.u=S.u?S.u[e]:void 0,v.v=S.v?S.v[e]:void 0,v}}}),X9=xe({"src/traces/quiver/index.js"(U,O){"use strict";O.exports={moduleType:"trace",name:"quiver",basePlotModule:Nu(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:Dw(),supplyDefaults:j9(),calc:q9(),crossTraceCalc:V9(),plot:H9(),style:fy().style,styleOnSelect:fy().styleOnSelect,hoverPoints:G9(),formatLabels:W9(),eventData:Y9(),selectPoints:wv(),colorbar:pf(),animatable:!0,meta:{}}}}),$9=xe({"lib/quiver.js"(U,O){"use strict";O.exports=X9()}}),Tf=xe({"node_modules/world-calendars/dist/main.js"(U,O){var u=cc();function v(){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={}}u(v.prototype,{instance:function(a,r){a=(a||"gregorian").toLowerCase(),r=r||"";var n=this._localCals[a+"-"+r];if(!n&&this.calendars[a]&&(n=new this.calendars[a](r),this._localCals[a+"-"+r]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,a);return n},newDate:function(a,r,n,i,s){return i=(a!=null&&a.year?a.calendar():typeof i=="string"?this.instance(i,s):i)||this.instance(),i.newDate(a,r,n)},substituteDigits:function(a){return function(r){return(r+"").replace(/[0-9]/g,function(n){return a[n]})}},substituteChineseDigits:function(a,r){return function(n){for(var i="",s=0;n>0;){var c=n%10;i=(c===0?"":a[c]+r[s])+i,s++,n=Math.floor(n/10)}return i.indexOf(a[1]+r[1])===0&&(i=i.substr(1)),i||a[0]}}});function w(a,r,n,i){if(this._calendar=a,this._year=r,this._month=n,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(a,r){return a=""+a,"000000".substring(0,r-a.length)+a}u(w.prototype,{newDate:function(a,r,n){return this._calendar.newDate(a??this,r,n)},year:function(a){return arguments.length===0?this._year:this.set(a,"y")},month:function(a){return arguments.length===0?this._month:this.set(a,"m")},day:function(a){return arguments.length===0?this._day:this.set(a,"d")},date:function(a,r,n){if(!this._calendar.isValid(a,r,n))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=a,this._month=r,this._day=n,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(a,r){return this._calendar.add(this,a,r)},set:function(a,r){return this._calendar.set(this,a,r)},compareTo:function(a){if(this._calendar.name!==a._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,a._calendar.local.name);var r=this._year!==a._year?this._year-a._year:this._month!==a._month?this.monthOfYear()-a.monthOfYear():this._day-a._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(a){return this._calendar.fromJD(a)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(a){return this._calendar.fromJSDate(a)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function l(){this.shortYearCutoff="+10"}u(l.prototype,{_validateLevel:0,newDate:function(a,r,n){return a==null?this.today():(a.year&&(this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),n=a.day(),r=a.month(),a=a.year()),new w(this,a,r,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+S(Math.abs(r.year()),4)},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(a,r){var n=this._validate(a,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(a,r){var n=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(a)+this.minMonth;return this._validate(a,n,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),n},daysInYear:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(a,r,n){var i=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(a,r,n){var i=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(a,r,n){return this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(a,r,n){return this._validate(a,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(a,this._add(a,r,n),r,n)},_add:function(a,r,n){if(this._validateLevel++,n==="d"||n==="w"){var i=a.toJD()+r*(n==="w"?this.daysInWeek():1),s=a.calendar().fromJD(i);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=a.year()+(n==="y"?r:0),p=a.monthOfYear()+(n==="m"?r:0),s=a.day(),f=function(o){for(;pb-1+o.minMonth;)c++,p-=b,b=o.monthsInYear(c)};n==="y"?(a.month()!==this.fromMonthOfYear(c,p)&&(p=this.newDate(c,a.month(),this.minDay).monthOfYear()),p=Math.min(p,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,p)))):n==="m"&&(f(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,p))));var d=[c,this.fromMonthOfYear(c,p),s];return this._validateLevel--,d}catch(y){throw this._validateLevel--,y}},_correctAdd:function(a,r,n,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(r[0]===0||a.year()>0!=r[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],c=n<0?-1:1;r=this._add(a,n*s[0]+c*s[1],s[2])}return a.date(r[0],r[1],r[2])},set:function(a,r,n){this._validate(a,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var i=n==="y"?r:a.year(),s=n==="m"?r:a.month(),c=n==="d"?r:a.day();return(n==="y"||n==="m")&&(c=Math.min(c,this.daysInMonth(i,s))),a.date(i,s,c)},isValid:function(a,r,n){this._validateLevel++;var i=this.hasYearZero||a!==0;if(i){var s=this.newDate(a,r,this.minDay);i=r>=this.minMonth&&r-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),y=s-(d>2.5?4716:4715);return y<=0&&y--,this.newDate(y,d,f)},toJSDate:function(a,r,n){var i=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(i.year(),i.month()-1,i.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(a){return this.newDate(a.getFullYear(),a.getMonth()+1,a.getDate())}});var t=O.exports=new v;t.cdate=w,t.baseCalendar=l,t.calendars.gregorian=e}}),Z9=xe({"node_modules/world-calendars/dist/plus.js"(){var U=cc(),O=Tf();U(O.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"}),O.local=O.regionalOptions[""],U(O.cdate.prototype,{formatDate:function(u,v){return typeof u!="string"&&(v=u,u=""),this._calendar.formatDate(u||"",this,v)}}),U(O.baseCalendar.prototype,{UNIX_EPOCH:O.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:O.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,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(u,v,w){if(typeof u!="string"&&(w=v,v=u,u=""),!v)return"";if(v.calendar()!==this)throw O.local.invalidFormat||O.regionalOptions[""].invalidFormat;u=u||this.local.dateFormat,w=w||{};for(var S=w.dayNamesShort||this.local.dayNamesShort,l=w.dayNames||this.local.dayNames,e=w.monthNumbers||this.local.monthNumbers,t=w.monthNamesShort||this.local.monthNamesShort,a=w.monthNames||this.local.monthNames,r=w.calculateWeek||this.local.calculateWeek,n=function(A,E){for(var g=1;M+g1},i=function(A,E,g,T){var m=""+E;if(n(A,T))for(;m.length1},b=function(D,C){var F=o(D,C),I=[2,3,F?4:2,F?4:2,10,11,20]["oyYJ@!".indexOf(D)+1],z=new RegExp("^-?\\d{1,"+I+"}"),R=v.substring(m).match(z);if(!R)throw(O.local.missingNumberAt||O.regionalOptions[""].missingNumberAt).replace(/\{0\}/,m);return m+=R[0].length,parseInt(R[0],10)},M=this,A=function(){if(typeof a=="function"){o("m");var D=a.call(M,v.substring(m));return m+=D.length,D}return b("m")},E=function(D,C,F,I){for(var z=o(D,I)?F:C,R=0;R-1){c=1,p=f;for(var _=this.daysInMonth(s,c);p>_;_=this.daysInMonth(s,c))c++,p-=_}return i>-1?this.fromJD(i):this.newDate(s,c,p)},determineDate:function(u,v,w,S,l){w&&typeof w!="object"&&(l=S,S=w,w=null),typeof S!="string"&&(l=S,S="");var e=this,t=function(a){try{return e.parseDate(S,a,l)}catch{}a=a.toLowerCase();for(var r=(a.match(/^c/)&&w?w.newDate():null)||e.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=n.exec(a);i;)r.add(parseInt(i[1],10),i[2]||"d"),i=n.exec(a);return r};return v=v?v.newDate():null,u=u==null?v:typeof u=="string"?t(u):typeof u=="number"?isNaN(u)||u===1/0||u===-1/0?v:e.today().add(u,"d"):e.newDate(u),u}})}}),K9=xe({"node_modules/world-calendars/dist/calendars/chinese.js"(){var U=Tf(),O=cc(),u=U.instance();function v(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}v.prototype=new U.baseCalendar,O(v.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,s){if(typeof i=="string"){var c=i.match(S);return c?c[0]:""}var p=this._validateYear(i),f=i.month(),d=""+this.toChineseMonth(p,f);return s&&d.length<2&&(d="0"+d),this.isIntercalaryMonth(p,f)&&(d+="i"),d},monthNames:function(i){if(typeof i=="string"){var s=i.match(l);return s?s[0]:""}var c=this._validateYear(i),p=i.month(),f=this.toChineseMonth(c,p),d=["\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"][f-1];return this.isIntercalaryMonth(c,p)&&(d="\u95F0"+d),d},monthNamesShort:function(i){if(typeof i=="string"){var s=i.match(e);return s?s[0]:""}var c=this._validateYear(i),p=i.month(),f=this.toChineseMonth(c,p),d=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][f-1];return this.isIntercalaryMonth(c,p)&&(d="\u95F0"+d),d},parseMonth:function(i,s){i=this._validateYear(i);var c=parseInt(s),p;if(isNaN(c))s[0]==="\u95F0"&&(p=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var f=s[s.length-1];p=f==="i"||f==="I"}var d=this.toMonthIndex(i,c,p);return d},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(i,s){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw s.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,s,c){var p=this.intercalaryMonth(i),f=c&&s!==p;if(f||s<1||s>12)throw U.local.invalidMonth.replace(/\{0\}/,this.local.name);var d;return p?!c&&s<=p?d=s-1:d=s:d=s-1,d},toChineseMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var c=this.intercalaryMonth(i),p=c?12:11;if(s<0||s>p)throw U.local.invalidMonth.replace(/\{0\}/,this.local.name);var f;return c?s>13;return c},isIntercalaryMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var c=this.intercalaryMonth(i);return!!c&&c===s},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,s,c){var p=this._validateYear(i,U.local.invalidyear),f=a[p-a[0]],d=f>>9&4095,y=f>>5&15,o=f&31,b;b=u.newDate(d,y,o),b.add(4-(b.dayOfWeek()||7),"d");var M=this.toJD(i,s,c)-b.toJD();return 1+Math.floor(M/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,s){i.year&&(s=i.month(),i=i.year()),i=this._validateYear(i);var c=t[i-t[0]],p=c>>13,f=p?12:11;if(s>f)throw U.local.invalidMonth.replace(/\{0\}/,this.local.name);var d=c&1<<12-s?30:29;return d},weekDay:function(i,s,c){return(this.dayOfWeek(i,s,c)||7)<6},toJD:function(i,s,c){var p=this._validate(i,d,c,U.local.invalidDate);i=this._validateYear(p.year()),s=p.month(),c=p.day();var f=this.isIntercalaryMonth(i,s),d=this.toChineseMonth(i,s),y=n(i,d,c,f);return u.toJD(y.year,y.month,y.day)},fromJD:function(i){var s=u.fromJD(i),c=r(s.year(),s.month(),s.day()),p=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,p,c.day)},fromString:function(i){var s=i.match(w),c=this._validateYear(+s[1]),p=+s[2],f=!!s[3],d=this.toMonthIndex(c,p,f),y=+s[4];return this.newDate(c,d,y)},add:function(i,s,c){var p=i.year(),f=i.month(),d=this.isIntercalaryMonth(p,f),y=this.toChineseMonth(p,f),o=Object.getPrototypeOf(v.prototype).add.call(this,i,s,c);if(c==="y"){var b=o.year(),M=o.month(),A=this.isIntercalaryMonth(b,y),E=d&&A?this.toMonthIndex(b,y,!0):this.toMonthIndex(b,y,!1);E!==M&&o.month(E)}return o}});var w=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,S=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;U.calendars.chinese=v;var t=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function r(i,s,c,p){var f,d;if(typeof i=="object")f=i,d=s||{};else{var y=typeof i=="number"&&i>=1888&&i<=2111;if(!y)throw new Error("Solar year outside range 1888-2111");var o=typeof s=="number"&&s>=1&&s<=12;if(!o)throw new Error("Solar month outside range 1 - 12");var b=typeof c=="number"&&c>=1&&c<=31;if(!b)throw new Error("Solar day outside range 1 - 31");f={year:i,month:s,day:c},d=p||{}}var M=a[f.year-a[0]],A=f.year<<9|f.month<<5|f.day;d.year=A>=M?f.year:f.year-1,M=a[d.year-a[0]];var E=M>>9&4095,g=M>>5&15,T=M&31,m,h=new Date(E,g-1,T),x=new Date(f.year,f.month-1,f.day);m=Math.round((x-h)/(24*3600*1e3));var _=t[d.year-t[0]],D;for(D=0;D<13;D++){var C=_&1<<12-D?30:29;if(m>13;return!F||D=1888&&i<=2111;if(!o)throw new Error("Lunar year outside range 1888-2111");var b=typeof s=="number"&&s>=1&&s<=12;if(!b)throw new Error("Lunar month outside range 1 - 12");var M=typeof c=="number"&&c>=1&&c<=30;if(!M)throw new Error("Lunar day outside range 1 - 30");var A;typeof p=="object"?(A=!1,d=p):(A=!!p,d=f||{}),y={year:i,month:s,day:c,isIntercalary:A}}var E;E=y.day-1;var g=t[y.year-t[0]],T=g>>13,m;T&&(y.month>T||y.isIntercalary)?m=y.month:m=y.month-1;for(var h=0;h>9&4095,C=_>>5&15,F=_&31,I=new Date(D,C-1,F+E);return d.year=I.getFullYear(),d.month=1+I.getMonth(),d.day=I.getDate(),d}}}),J9=xe({"node_modules/world-calendars/dist/calendars/coptic.js"(){var U=Tf(),O=cc();function u(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}u.prototype=new U.baseCalendar,O(u.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var w=this._validate(S,this.minMonth,this.minDay,U.local.invalidYear),S=w.year()+(w.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,U.local.invalidYear||U.regionalOptions[""].invalidYear),13},weekOfYear:function(v,w,S){var l=this.newDate(v,w,S);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(v,w){var S=this._validate(v,w,this.minDay,U.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(v,w,S){return(this.dayOfWeek(v,w,S)||7)<6},toJD:function(v,w,S){var l=this._validate(v,w,S,U.local.invalidDate);return v=l.year(),v<0&&v++,l.day()+(l.month()-1)*30+(v-1)*365+Math.floor(v/4)+this.jdEpoch-1},fromJD:function(v){var w=Math.floor(v)+.5-this.jdEpoch,S=Math.floor((w-Math.floor((w+366)/1461))/365)+1;S<=0&&S--,w=Math.floor(v)+.5-this.newDate(S,1,1).toJD();var l=Math.floor(w/30)+1,e=w-(l-1)*30+1;return this.newDate(S,l,e)}}),U.calendars.coptic=u}}),Q9=xe({"node_modules/world-calendars/dist/calendars/discworld.js"(){var U=Tf(),O=cc();function u(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}u.prototype=new U.baseCalendar,O(u.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(w){return this._validate(w,this.minMonth,this.minDay,U.local.invalidYear),!1},monthsInYear:function(w){return this._validate(w,this.minMonth,this.minDay,U.local.invalidYear),13},daysInYear:function(w){return this._validate(w,this.minMonth,this.minDay,U.local.invalidYear),400},weekOfYear:function(w,S,l){var e=this.newDate(w,S,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(w,S){var l=this._validate(w,S,this.minDay,U.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(w,S,l){var e=this._validate(w,S,l,U.local.invalidDate);return(e.day()+1)%8},weekDay:function(w,S,l){var e=this.dayOfWeek(w,S,l);return e>=2&&e<=6},extraInfo:function(w,S,l){var e=this._validate(w,S,l,U.local.invalidDate);return{century:v[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(w,S,l){var e=this._validate(w,S,l,U.local.invalidDate);return w=e.year()+(e.year()<0?1:0),S=e.month(),l=e.day(),l+(S>1?16:0)+(S>2?(S-2)*32:0)+(w-1)*400+this.jdEpoch-1},fromJD:function(w){w=Math.floor(w+.5)-Math.floor(this.jdEpoch)-1;var S=Math.floor(w/400)+1;w-=(S-1)*400,w+=w>15?16:0;var l=Math.floor(w/32)+1,e=w-(l-1)*32+1;return this.newDate(S<=0?S-1:S,l,e)}});var v={20:"Fruitbat",21:"Anchovy"};U.calendars.discworld=u}}),eP=xe({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var U=Tf(),O=cc();function u(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}u.prototype=new U.baseCalendar,O(u.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,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(S){var w=this._validate(S,this.minMonth,this.minDay,U.local.invalidYear),S=w.year()+(w.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,U.local.invalidYear||U.regionalOptions[""].invalidYear),13},weekOfYear:function(v,w,S){var l=this.newDate(v,w,S);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(v,w){var S=this._validate(v,w,this.minDay,U.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(v,w,S){return(this.dayOfWeek(v,w,S)||7)<6},toJD:function(v,w,S){var l=this._validate(v,w,S,U.local.invalidDate);return v=l.year(),v<0&&v++,l.day()+(l.month()-1)*30+(v-1)*365+Math.floor(v/4)+this.jdEpoch-1},fromJD:function(v){var w=Math.floor(v)+.5-this.jdEpoch,S=Math.floor((w-Math.floor((w+366)/1461))/365)+1;S<=0&&S--,w=Math.floor(v)+.5-this.newDate(S,1,1).toJD();var l=Math.floor(w/30)+1,e=w-(l-1)*30+1;return this.newDate(S,l,e)}}),U.calendars.ethiopian=u}}),tP=xe({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var U=Tf(),O=cc();function u(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}u.prototype=new U.baseCalendar,O(u.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(w){var S=this._validate(w,this.minMonth,this.minDay,U.local.invalidYear);return this._leapYear(S.year())},_leapYear:function(w){return w=w<0?w+1:w,v(w*7+1,19)<7},monthsInYear:function(w){return this._validate(w,this.minMonth,this.minDay,U.local.invalidYear),this._leapYear(w.year?w.year():w)?13:12},weekOfYear:function(w,S,l){var e=this.newDate(w,S,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(w){var S=this._validate(w,this.minMonth,this.minDay,U.local.invalidYear);return w=S.year(),this.toJD(w===-1?1:w+1,7,1)-this.toJD(w,7,1)},daysInMonth:function(w,S){return w.year&&(S=w.month(),w=w.year()),this._validate(w,S,this.minDay,U.local.invalidMonth),S===12&&this.leapYear(w)||S===8&&v(this.daysInYear(w),10)===5?30:S===9&&v(this.daysInYear(w),10)===3?29:this.daysPerMonth[S-1]},weekDay:function(w,S,l){return this.dayOfWeek(w,S,l)!==6},extraInfo:function(w,S,l){var e=this._validate(w,S,l,U.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(w,S,l){var e=this._validate(w,S,l,U.local.invalidDate);w=e.year(),S=e.month(),l=e.day();var t=w<=0?w+1:w,a=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(S<7){for(var r=7;r<=this.monthsInYear(w);r++)a+=this.daysInMonth(w,r);for(var r=1;r=this.toJD(S===-1?1:S+1,7,1);)S++;for(var l=wthis.toJD(S,l,this.daysInMonth(S,l));)l++;var e=w-this.toJD(S,l,1)+1;return this.newDate(S,l,e)}});function v(w,S){return w-S*Math.floor(w/S)}U.calendars.hebrew=u}}),rP=xe({"node_modules/world-calendars/dist/calendars/islamic.js"(){var U=Tf(),O=cc();function u(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}u.prototype=new U.baseCalendar,O(u.prototype,{name:"Islamic",jdEpoch:19484395e-1,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(v){var w=this._validate(v,this.minMonth,this.minDay,U.local.invalidYear);return(w.year()*11+14)%30<11},weekOfYear:function(v,w,S){var l=this.newDate(v,w,S);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(v){return this.leapYear(v)?355:354},daysInMonth:function(v,w){var S=this._validate(v,w,this.minDay,U.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===12&&this.leapYear(S.year())?1:0)},weekDay:function(v,w,S){return this.dayOfWeek(v,w,S)!==5},toJD:function(v,w,S){var l=this._validate(v,w,S,U.local.invalidDate);return v=l.year(),w=l.month(),S=l.day(),v=v<=0?v+1:v,S+Math.ceil(29.5*(w-1))+(v-1)*354+Math.floor((3+11*v)/30)+this.jdEpoch-1},fromJD:function(v){v=Math.floor(v)+.5;var w=Math.floor((30*(v-this.jdEpoch)+10646)/10631);w=w<=0?w-1:w;var S=Math.min(12,Math.ceil((v-29-this.toJD(w,1,1))/29.5)+1),l=v-this.toJD(w,S,1)+1;return this.newDate(w,S,l)}}),U.calendars.islamic=u}}),aP=xe({"node_modules/world-calendars/dist/calendars/julian.js"(){var U=Tf(),O=cc();function u(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}u.prototype=new U.baseCalendar,O(u.prototype,{name:"Julian",jdEpoch:17214235e-1,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(S){var w=this._validate(S,this.minMonth,this.minDay,U.local.invalidYear),S=w.year()<0?w.year()+1:w.year();return S%4===0},weekOfYear:function(v,w,S){var l=this.newDate(v,w,S);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(v,w){var S=this._validate(v,w,this.minDay,U.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===2&&this.leapYear(S.year())?1:0)},weekDay:function(v,w,S){return(this.dayOfWeek(v,w,S)||7)<6},toJD:function(v,w,S){var l=this._validate(v,w,S,U.local.invalidDate);return v=l.year(),w=l.month(),S=l.day(),v<0&&v++,w<=2&&(v--,w+=12),Math.floor(365.25*(v+4716))+Math.floor(30.6001*(w+1))+S-1524.5},fromJD:function(v){var w=Math.floor(v+.5),S=w+1524,l=Math.floor((S-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((S-e)/30.6001),a=t-Math.floor(t<14?1:13),r=l-Math.floor(a>2?4716:4715),n=S-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,a,n)}}),U.calendars.julian=u}}),nP=xe({"node_modules/world-calendars/dist/calendars/mayan.js"(){var U=Tf(),O=cc();function u(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}u.prototype=new U.baseCalendar,O(u.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(S){return this._validate(S,this.minMonth,this.minDay,U.local.invalidYear),!1},formatYear:function(S){var l=this._validate(S,this.minMonth,this.minDay,U.local.invalidYear);S=l.year();var e=Math.floor(S/400);S=S%400,S+=S<0?400:0;var t=Math.floor(S/20);return e+"."+t+"."+S%20},forYear:function(S){if(S=S.split("."),S.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,U.local.invalidYear),18},weekOfYear:function(S,l,e){return this._validate(S,l,e,U.local.invalidDate),0},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,U.local.invalidYear),360},daysInMonth:function(S,l){return this._validate(S,l,this.minDay,U.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(S,l,e){var t=this._validate(S,l,e,U.local.invalidDate);return t.day()},weekDay:function(S,l,e){return this._validate(S,l,e,U.local.invalidDate),!0},extraInfo:function(S,l,e){var t=this._validate(S,l,e,U.local.invalidDate),a=t.toJD(),r=this._toHaab(a),n=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(S){S-=this.jdEpoch;var l=v(S+8+17*20,365);return[Math.floor(l/20)+1,v(l,20)]},_toTzolkin:function(S){return S-=this.jdEpoch,[w(S+20,20),w(S+4,13)]},toJD:function(S,l,e){var t=this._validate(S,l,e,U.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(S){S=Math.floor(S)+.5-this.jdEpoch;var l=Math.floor(S/360);S=S%360,S+=S<0?360:0;var e=Math.floor(S/20),t=S%20;return this.newDate(l,e,t)}});function v(S,l){return S-l*Math.floor(S/l)}function w(S,l){return v(S-1,l)+1}U.calendars.mayan=u}}),iP=xe({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var U=Tf(),O=cc();function u(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}u.prototype=new U.baseCalendar;var v=U.instance("gregorian");O(u.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,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(w){var S=this._validate(w,this.minMonth,this.minDay,U.local.invalidYear||U.regionalOptions[""].invalidYear);return v.leapYear(S.year()+(S.year()<1?1:0)+1469)},weekOfYear:function(w,S,l){var e=this.newDate(w,S,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(w,S){var l=this._validate(w,S,this.minDay,U.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(w,S,l){return(this.dayOfWeek(w,S,l)||7)<6},toJD:function(t,S,l){var e=this._validate(t,S,l,U.local.invalidMonth),t=e.year();t<0&&t++;for(var a=e.day(),r=1;r=this.toJD(S+1,1,1);)S++;for(var l=w-Math.floor(this.toJD(S,1,1)+.5)+1,e=1;l>this.daysInMonth(S,e);)l-=this.daysInMonth(S,e),e++;return this.newDate(S,e,l)}}),U.calendars.nanakshahi=u}}),oP=xe({"node_modules/world-calendars/dist/calendars/nepali.js"(){var U=Tf(),O=cc();function u(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}u.prototype=new U.baseCalendar,O(u.prototype,{name:"Nepali",jdEpoch:17007095e-1,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(v){return this.daysInYear(v)!==this.daysPerYear},weekOfYear:function(v,w,S){var l=this.newDate(v,w,S);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(v){var w=this._validate(v,this.minMonth,this.minDay,U.local.invalidYear);if(v=w.year(),typeof this.NEPALI_CALENDAR_DATA[v]>"u")return this.daysPerYear;for(var S=0,l=this.minMonth;l<=12;l++)S+=this.NEPALI_CALENDAR_DATA[v][l];return S},daysInMonth:function(v,w){return v.year&&(w=v.month(),v=v.year()),this._validate(v,w,this.minDay,U.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[v]>"u"?this.daysPerMonth[w-1]:this.NEPALI_CALENDAR_DATA[v][w]},weekDay:function(v,w,S){return this.dayOfWeek(v,w,S)!==6},toJD:function(v,w,S){var l=this._validate(v,w,S,U.local.invalidDate);v=l.year(),w=l.month(),S=l.day();var e=U.instance(),t=0,a=w,r=v;this._createMissingCalendarData(v);var n=v-(a>9||a===9&&S>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(w!==9&&(t=S,a--);a!==9;)a<=0&&(a=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][a],a--;return w===9?(t+=S-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(n))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(n,1,1).add(t,"d").toJD()},fromJD:function(v){var w=U.instance(),S=w.fromJD(v),l=S.year(),e=S.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var a=9,r=this.NEPALI_CALENDAR_DATA[t][0],n=this.NEPALI_CALENDAR_DATA[t][a]-r+1;e>n;)a++,a>12&&(a=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][a];var i=this.NEPALI_CALENDAR_DATA[t][a]-(n-e);return this.newDate(t,a,i)},_createMissingCalendarData:function(v){var w=this.daysPerMonth.slice(0);w.unshift(17);for(var S=v-1;S"u"&&(this.NEPALI_CALENDAR_DATA[S]=w)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),U.calendars.nepali=u}}),sP=xe({"node_modules/world-calendars/dist/calendars/persian.js"(){var U=Tf(),O=cc();function u(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}function v(w){var S=w-475;w<0&&S++;var l=.242197,e=l*S,t=l*(S+1),a=e-Math.floor(e),r=t-Math.floor(t);return a>r}u.prototype=new U.baseCalendar,O(u.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(w){var S=this._validate(w,this.minMonth,this.minDay,U.local.invalidYear);return v(S.year())},weekOfYear:function(w,S,l){var e=this.newDate(w,S,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(w,S){var l=this._validate(w,S,this.minDay,U.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(w,S,l){return this.dayOfWeek(w,S,l)!==5},toJD:function(w,S,l){var e=this._validate(w,S,l,U.local.invalidDate);w=e.year(),S=e.month(),l=e.day();var t=0;if(w>0)for(var a=1;a0?w-1:w)*365+t+this.jdEpoch-1},fromJD:function(w){w=Math.floor(w)+.5;var S=475+(w-this.toJD(475,1,1))/365.242197,l=Math.floor(S);l<=0&&l--,w>this.toJD(l,12,v(l)?30:29)&&(l++,l===0&&l++);var e=w-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),a=w-this.toJD(l,t,1)+1;return this.newDate(l,t,a)}}),U.calendars.persian=u,U.calendars.jalali=u}}),lP=xe({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var U=Tf(),O=cc(),u=U.instance();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new U.baseCalendar,O(v.prototype,{name:"Taiwan",jdEpoch:24194025e-1,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(l){var S=this._validate(l,this.minMonth,this.minDay,U.local.invalidYear),l=this._t2gYear(S.year());return u.leapYear(l)},weekOfYear:function(t,S,l){var e=this._validate(t,this.minMonth,this.minDay,U.local.invalidYear),t=this._t2gYear(e.year());return u.weekOfYear(t,e.month(),e.day())},daysInMonth:function(w,S){var l=this._validate(w,S,this.minDay,U.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(w,S,l){return(this.dayOfWeek(w,S,l)||7)<6},toJD:function(t,S,l){var e=this._validate(t,S,l,U.local.invalidDate),t=this._t2gYear(e.year());return u.toJD(t,e.month(),e.day())},fromJD:function(w){var S=u.fromJD(w),l=this._g2tYear(S.year());return this.newDate(l,S.month(),S.day())},_t2gYear:function(w){return w+this.yearsOffset+(w>=-this.yearsOffset&&w<=-1?1:0)},_g2tYear:function(w){return w-this.yearsOffset-(w>=1&&w<=this.yearsOffset?1:0)}}),U.calendars.taiwan=v}}),uP=xe({"node_modules/world-calendars/dist/calendars/thai.js"(){var U=Tf(),O=cc(),u=U.instance();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new U.baseCalendar,O(v.prototype,{name:"Thai",jdEpoch:15230985e-1,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(l){var S=this._validate(l,this.minMonth,this.minDay,U.local.invalidYear),l=this._t2gYear(S.year());return u.leapYear(l)},weekOfYear:function(t,S,l){var e=this._validate(t,this.minMonth,this.minDay,U.local.invalidYear),t=this._t2gYear(e.year());return u.weekOfYear(t,e.month(),e.day())},daysInMonth:function(w,S){var l=this._validate(w,S,this.minDay,U.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(w,S,l){return(this.dayOfWeek(w,S,l)||7)<6},toJD:function(t,S,l){var e=this._validate(t,S,l,U.local.invalidDate),t=this._t2gYear(e.year());return u.toJD(t,e.month(),e.day())},fromJD:function(w){var S=u.fromJD(w),l=this._g2tYear(S.year());return this.newDate(l,S.month(),S.day())},_t2gYear:function(w){return w-this.yearsOffset-(w>=1&&w<=this.yearsOffset?1:0)},_g2tYear:function(w){return w+this.yearsOffset+(w>=-this.yearsOffset&&w<=-1?1:0)}}),U.calendars.thai=v}}),cP=xe({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var U=Tf(),O=cc();function u(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}u.prototype=new U.baseCalendar,O(u.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(w){var S=this._validate(w,this.minMonth,this.minDay,U.local.invalidYear);return this.daysInYear(S.year())===355},weekOfYear:function(w,S,l){var e=this.newDate(w,S,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(w){for(var S=0,l=1;l<=12;l++)S+=this.daysInMonth(w,l);return S},daysInMonth:function(w,S){for(var l=this._validate(w,S,this.minDay,U.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,a=0;ae)return v[t]-v[t-1];t++}return 30},weekDay:function(w,S,l){return this.dayOfWeek(w,S,l)!==5},toJD:function(w,S,l){var e=this._validate(w,S,l,U.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,a=e.day()+v[t-1]-1;return a+24e5-.5},fromJD:function(w){for(var S=w-24e5+.5,l=0,e=0;eS);e++)l++;var t=l+15292,a=Math.floor((t-1)/12),r=a+1,n=t-12*a,i=S-v[l-1]+1;return this.newDate(r,n,i)},isValid:function(w,S,l){var e=U.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(w=w.year!=null?w.year:w,e=w>=1276&&w<=1500),e},_validate:function(w,S,l,e){var t=U.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),U.calendars.ummalqura=u;var v=[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]}}),fP=xe({"src/components/calendars/calendars.js"(U,O){"use strict";O.exports=Tf(),Z9(),K9(),J9(),Q9(),eP(),tP(),rP(),aP(),nP(),iP(),oP(),sP(),lP(),uP(),cP()}}),hP=xe({"src/components/calendars/index.js"(U,O){"use strict";var u=fP(),v=Sr(),w=Gn(),S=w.EPOCHJD,l=w.ONEDAY,e={valType:"enumerated",values:v.sortObjectKeys(u.calendars),editType:"calc",dflt:"gregorian"},t=function(g,T,m,h){var x={};return x[m]=e,v.coerce(g,T,x,m,h)},a=function(g,T,m,h){for(var x=0;x{zt.preventDefault(),zt.stopPropagation(),zt.clipboardData.setData("text",rt),lt.removeEventListener("copy",Tt,!0)};lt.addEventListener("copy",Tt,!0),document.execCommand("copy")}gt.copyText=ve})(G5||(G5={}));var Zl;(function(gt){function ve(zt){let Lr=window.getComputedStyle(zt),gr=parseFloat(Lr.borderTopWidth)||0,Mr=parseFloat(Lr.borderLeftWidth)||0,Ur=parseFloat(Lr.borderRightWidth)||0,wr=parseFloat(Lr.borderBottomWidth)||0,Ir=parseFloat(Lr.paddingTop)||0,Hr=parseFloat(Lr.paddingLeft)||0,Rr=parseFloat(Lr.paddingRight)||0,Br=parseFloat(Lr.paddingBottom)||0,Pr=Mr+Hr+Rr+Ur,xe=gr+Ir+Br+wr;return{borderTop:gr,borderLeft:Mr,borderRight:Ur,borderBottom:wr,paddingTop:Ir,paddingLeft:Hr,paddingRight:Rr,paddingBottom:Br,horizontalSum:Pr,verticalSum:xe}}gt.boxSizing=ve;function rt(zt){let Lr=window.getComputedStyle(zt),gr=parseFloat(Lr.minWidth)||0,Mr=parseFloat(Lr.minHeight)||0,Ur=parseFloat(Lr.maxWidth)||1/0,wr=parseFloat(Lr.maxHeight)||1/0;return Ur=Math.max(gr,Ur),wr=Math.max(Mr,wr),{minWidth:gr,minHeight:Mr,maxWidth:Ur,maxHeight:wr}}gt.sizeLimits=rt;function lt(zt,Lr,gr){let Mr=zt.getBoundingClientRect();return Lr>=Mr.left&&Lr=Mr.top&&gr=gr.bottom)){if(Mr.topgr.bottom&&Mr.height>=gr.height){zt.scrollTop-=gr.top-Mr.top;return}if(Mr.topgr.height){zt.scrollTop-=gr.bottom-Mr.bottom;return}if(Mr.bottom>gr.bottom&&Mr.height{let wr=Element.prototype;return wr.matches||wr.matchesSelector||wr.mozMatchesSelector||wr.msMatchesSelector||wr.oMatchesSelector||wr.webkitMatchesSelector||function(Ir){let Hr=this,Rr=Hr.ownerDocument?Hr.ownerDocument.querySelectorAll(Ir):[];return Array.prototype.indexOf.call(Rr,Hr)!==-1}})();function ve(wr){wr=wr.split(",",1)[0];let Ir=0,Hr=0,Rr=0;function Br(Pr){let xe=wr.match(Pr);return xe===null?!1:(wr=wr.slice(xe[0].length),!0)}for(wr=wr.replace(Ur," $1 ");wr.length>0;){if(Br(rt)){Ir++;continue}if(Br(lt)){Hr++;continue}if(Br(Tt)){Hr++;continue}if(Br(Lr)){Rr++;continue}if(Br(gr)){Hr++;continue}if(Br(zt)){Rr++;continue}if(!Br(Mr))return 0}return Ir=Math.min(Ir,255),Hr=Math.min(Hr,255),Rr=Math.min(Rr,255),Ir<<16|Hr<<8|Rr}gt.calculateSingle=ve;let rt=/^#[^\s\+>~#\.\[:]+/,lt=/^\.[^\s\+>~#\.\[:]+/,Tt=/^\[[^\]]+\]/,zt=/^[^\s\+>~#\.\[:]+/,Lr=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,gr=/^:[^\s\+>~#\.\[:]+/,Mr=/^[\s\+>~\*]+/,Ur=/:not\(([^\)]+)\)/g})(bh||(bh={}));var ed=Jh(rv());var $v=class{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return this._size===0}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let ve=this._first;for(;ve;)yield ve.value,ve=ve.next}*retro(){let ve=this._last;for(;ve;)yield ve.value,ve=ve.prev}*nodes(){let ve=this._first;for(;ve;)yield ve,ve=ve.next}*retroNodes(){let ve=this._last;for(;ve;)yield ve,ve=ve.prev}assign(ve){this.clear();for(let rt of ve)this.addLast(rt)}push(ve){this.addLast(ve)}pop(){return this.removeLast()}shift(ve){this.addFirst(ve)}unshift(){return this.removeFirst()}addFirst(ve){let rt=new Qh.LinkedListNode(this,ve);return this._first?(rt.next=this._first,this._first.prev=rt,this._first=rt):(this._first=rt,this._last=rt),this._size++,rt}addLast(ve){let rt=new Qh.LinkedListNode(this,ve);return this._last?(rt.prev=this._last,this._last.next=rt,this._last=rt):(this._first=rt,this._last=rt),this._size++,rt}insertBefore(ve,rt){if(!rt||rt===this._first)return this.addFirst(ve);if(!(rt instanceof Qh.LinkedListNode)||rt.list!==this)throw new Error("Reference node is not owned by the list.");let lt=new Qh.LinkedListNode(this,ve),Tt=rt,zt=Tt.prev;return lt.next=Tt,lt.prev=zt,Tt.prev=lt,zt.next=lt,this._size++,lt}insertAfter(ve,rt){if(!rt||rt===this._last)return this.addLast(ve);if(!(rt instanceof Qh.LinkedListNode)||rt.list!==this)throw new Error("Reference node is not owned by the list.");let lt=new Qh.LinkedListNode(this,ve),Tt=rt,zt=Tt.next;return lt.next=zt,lt.prev=Tt,Tt.next=lt,zt.prev=lt,this._size++,lt}removeFirst(){let ve=this._first;if(ve)return ve===this._last?(this._first=null,this._last=null):(this._first=ve.next,this._first.prev=null),ve.list=null,ve.next=null,ve.prev=null,this._size--,ve.value}removeLast(){let ve=this._last;if(ve)return ve===this._first?(this._first=null,this._last=null):(this._last=ve.prev,this._last.next=null),ve.list=null,ve.next=null,ve.prev=null,this._size--,ve.value}removeNode(ve){if(!(ve instanceof Qh.LinkedListNode)||ve.list!==this)throw new Error("Node is not owned by the list.");let rt=ve;rt===this._first&&rt===this._last?(this._first=null,this._last=null):rt===this._first?(this._first=rt.next,this._first.prev=null):rt===this._last?(this._last=rt.prev,this._last.next=null):(rt.next.prev=rt.prev,rt.prev.next=rt.next),rt.list=null,rt.next=null,rt.prev=null,this._size--}clear(){let ve=this._first;for(;ve;){let rt=ve.next;ve.list=null,ve.prev=null,ve.next=null,ve=rt}this._first=null,this._last=null,this._size=0}};(function(gt){function ve(rt){let lt=new gt;return lt.assign(rt),lt}gt.from=ve})($v||($v={}));var Qh;(function(gt){class ve{constructor(lt,Tt){this.list=null,this.next=null,this.prev=null,this.list=lt,this.value=Tt}}gt.LinkedListNode=ve})(Qh||(Qh={}));var jf=class{constructor(ve){this.type=ve}get isConflatable(){return!1}conflate(ve){return!1}},Ed=class extends jf{get isConflatable(){return!0}conflate(ve){return!0}},Gi;(function(gt){let ve=null,rt=(ii=>Ni=>{let An=!1;return ii.then(()=>!An&&Ni()),()=>{An=!0}})(Promise.resolve());function lt(ii,Ni){let An=Hr.get(ii);if(!An||An.length===0){Xa(ii,Ni);return}(0,ed.every)((0,ed.retro)(An),yn=>yn?xe(yn,ii,Ni):!0)&&Xa(ii,Ni)}gt.sendMessage=lt;function Tt(ii,Ni){if(!Ni.isConflatable){Ka(ii,Ni);return}(0,ed.some)(Ir,yi=>yi.handler!==ii||!yi.msg||yi.msg.type!==Ni.type||!yi.msg.isConflatable?!1:yi.msg.conflate(Ni))||Ka(ii,Ni)}gt.postMessage=Tt;function zt(ii,Ni){let An=Hr.get(ii);An&&An.indexOf(Ni)!==-1||(An?An.push(Ni):Hr.set(ii,[Ni]))}gt.installMessageHook=zt;function Lr(ii,Ni){let An=Hr.get(ii);if(!An)return;let yi=An.indexOf(Ni);yi!==-1&&(An[yi]=null,Ta(An))}gt.removeMessageHook=Lr;function gr(ii){let Ni=Hr.get(ii);Ni&&Ni.length>0&&(ed.ArrayExt.fill(Ni,null),Ta(Ni));for(let An of Ir)An.handler===ii&&(An.handler=null,An.msg=null)}gt.clearData=gr;function Mr(){Pr||ve===null||(ve(),ve=null,Pr=!0,da(),Pr=!1)}gt.flush=Mr;function Ur(){return Br}gt.getExceptionHandler=Ur;function wr(ii){let Ni=Br;return Br=ii,Ni}gt.setExceptionHandler=wr;let Ir=new $v,Hr=new WeakMap,Rr=new Set,Br=ii=>{console.error(ii)},Pr=!1;function xe(ii,Ni,An){let yi=!0;try{typeof ii=="function"?yi=ii(Ni,An):yi=ii.messageHook(Ni,An)}catch(yn){Br(yn)}return yi}function Xa(ii,Ni){try{ii.processMessage(Ni)}catch(An){Br(An)}}function Ka(ii,Ni){Ir.addLast({handler:ii,msg:Ni}),ve===null&&(ve=rt(da))}function da(){if(ve=null,Ir.isEmpty)return;let ii={handler:null,msg:null};for(Ir.addLast(ii);;){let Ni=Ir.removeFirst();if(Ni===ii)return;Ni.handler&&Ni.msg&<(Ni.handler,Ni.msg)}}function Ta(ii){Rr.size===0&&rt(Ja),Rr.add(ii)}function Ja(){Rr.forEach(Pn),Rr.clear()}function Pn(ii){ed.ArrayExt.removeAllWhere(ii,Na)}function Na(ii){return ii===null}})(Gi||(Gi={}));var qf=class{constructor(ve){this._pid=av.nextPID(),this.name=ve.name,this._create=ve.create,this._coerce=ve.coerce||null,this._compare=ve.compare||null,this._changed=ve.changed||null}get(ve){let rt,lt=av.ensureMap(ve);return this._pid in lt?rt=lt[this._pid]:rt=lt[this._pid]=this._createValue(ve),rt}set(ve,rt){let lt,Tt=av.ensureMap(ve);this._pid in Tt?lt=Tt[this._pid]:lt=Tt[this._pid]=this._createValue(ve);let zt=this._coerceValue(ve,rt);this._maybeNotify(ve,lt,Tt[this._pid]=zt)}coerce(ve){let rt,lt=av.ensureMap(ve);this._pid in lt?rt=lt[this._pid]:rt=lt[this._pid]=this._createValue(ve);let Tt=this._coerceValue(ve,rt);this._maybeNotify(ve,rt,lt[this._pid]=Tt)}_createValue(ve){let rt=this._create;return rt(ve)}_coerceValue(ve,rt){let lt=this._coerce;return lt?lt(ve,rt):rt}_compareValue(ve,rt){let lt=this._compare;return lt?lt(ve,rt):ve===rt}_maybeNotify(ve,rt,lt){let Tt=this._changed;Tt&&!this._compareValue(rt,lt)&&Tt(ve,rt,lt)}};(function(gt){function ve(rt){av.ownerData.delete(rt)}gt.clearData=ve})(qf||(qf={}));var av;(function(gt){gt.ownerData=new WeakMap,gt.nextPID=(()=>{let rt=0;return()=>`pid-${`${Math.random()}`.slice(2)}-${rt++}`})();function ve(rt){let lt=gt.ownerData.get(rt);return lt||(lt=Object.create(null),gt.ownerData.set(rt,lt),lt)}gt.ensureMap=ve})(av||(av={}));var Mm=Jh(rv()),kI=Jh(Am()),jl=class{constructor(ve){this.sender=ve}connect(ve,rt){return rh.connect(this,ve,rt)}disconnect(ve,rt){return rh.disconnect(this,ve,rt)}emit(ve){rh.emit(this,ve)}};(function(gt){function ve(Mr,Ur){rh.disconnectBetween(Mr,Ur)}gt.disconnectBetween=ve;function rt(Mr){rh.disconnectSender(Mr)}gt.disconnectSender=rt;function lt(Mr){rh.disconnectReceiver(Mr)}gt.disconnectReceiver=lt;function Tt(Mr){rh.disconnectAll(Mr)}gt.disconnectAll=Tt;function zt(Mr){rh.disconnectAll(Mr)}gt.clearData=zt;function Lr(){return rh.exceptionHandler}gt.getExceptionHandler=Lr;function gr(Mr){let Ur=rh.exceptionHandler;return rh.exceptionHandler=Mr,Ur}gt.setExceptionHandler=gr})(jl||(jl={}));var rh;(function(gt){gt.exceptionHandler=Ka=>{console.error(Ka)};function ve(Ka,da,Ta){Ta=Ta||void 0;let Ja=Mr.get(Ka.sender);if(Ja||(Ja=[],Mr.set(Ka.sender,Ja)),Hr(Ja,Ka,da,Ta))return!1;let Pn=Ta||da,Na=Ur.get(Pn);Na||(Na=[],Ur.set(Pn,Na));let ii={signal:Ka,slot:da,thisArg:Ta};return Ja.push(ii),Na.push(ii),!0}gt.connect=ve;function rt(Ka,da,Ta){Ta=Ta||void 0;let Ja=Mr.get(Ka.sender);if(!Ja||Ja.length===0)return!1;let Pn=Hr(Ja,Ka,da,Ta);if(!Pn)return!1;let Na=Ta||da,ii=Ur.get(Na);return Pn.signal=null,Br(Ja),Br(ii),!0}gt.disconnect=rt;function lt(Ka,da){let Ta=Mr.get(Ka);if(!Ta||Ta.length===0)return;let Ja=Ur.get(da);if(!(!Ja||Ja.length===0)){for(let Pn of Ja)Pn.signal&&Pn.signal.sender===Ka&&(Pn.signal=null);Br(Ta),Br(Ja)}}gt.disconnectBetween=lt;function Tt(Ka){let da=Mr.get(Ka);if(!(!da||da.length===0)){for(let Ta of da){if(!Ta.signal)continue;let Ja=Ta.thisArg||Ta.slot;Ta.signal=null,Br(Ur.get(Ja))}Br(da)}}gt.disconnectSender=Tt;function zt(Ka){let da=Ur.get(Ka);if(!(!da||da.length===0)){for(let Ta of da){if(!Ta.signal)continue;let Ja=Ta.signal.sender;Ta.signal=null,Br(Mr.get(Ja))}Br(da)}}gt.disconnectReceiver=zt;function Lr(Ka){Tt(Ka),zt(Ka)}gt.disconnectAll=Lr;function gr(Ka,da){let Ta=Mr.get(Ka.sender);if(!(!Ta||Ta.length===0))for(let Ja=0,Pn=Ta.length;JaPn.signal===da&&Pn.slot===Ta&&Pn.thisArg===Ja)}function Rr(Ka,da){let{signal:Ta,slot:Ja,thisArg:Pn}=Ka;try{Ja.call(Pn,Ta.sender,da)}catch(Na){gt.exceptionHandler(Na)}}function Br(Ka){wr.size===0&&Ir(Pr),wr.add(Ka)}function Pr(){wr.forEach(xe),wr.clear()}function xe(Ka){Mm.ArrayExt.removeAllWhere(Ka,Xa)}function Xa(Ka){return Ka.signal===null}})(rh||(rh={}));var kd=class{constructor(ve){this._fn=ve}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let ve=this._fn;this._fn=null,ve()}};var Gp=class{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(ve=>{ve.dispose()}),this._items.clear())}contains(ve){return this._items.has(ve)}add(ve){this._items.add(ve)}remove(ve){this._items.delete(ve)}clear(){this._items.clear()}};(function(gt){function ve(rt){let lt=new gt;for(let Tt of rt)lt.add(Tt);return lt}gt.from=ve})(Gp||(Gp={}));var Sm=class extends Gp{constructor(){super(...arguments),this._disposed=new jl(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),jl.clearData(this))}};(function(gt){function ve(rt){let lt=new gt;for(let Tt of rt)lt.add(Tt);return lt}gt.from=ve})(Sm||(Sm={}));var Vf=class gt{constructor(ve){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:rt,edge:lt,distance:Tt}=this._scrollTarget,zt=zf.SCROLL_EDGE_SIZE-Tt,Lr=Math.pow(zt/zf.SCROLL_EDGE_SIZE,2),gr=Math.max(1,Math.round(Lr*zf.SCROLL_EDGE_SIZE));switch(lt){case"top":rt.scrollTop-=gr;break;case"left":rt.scrollLeft-=gr;break;case"right":rt.scrollLeft+=gr;break;case"bottom":rt.scrollTop+=gr;break}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=ve.document||document,this.mimeData=ve.mimeData,this.dragImage=ve.dragImage||null,this.proposedAction=ve.proposedAction||"copy",this.supportedActions=ve.supportedActions||"all",this.source=ve.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let ve=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});zf.dispatchDragLeave(this,this._currentTarget,null,ve)}this._finalize("none")}}get isDisposed(){return this._disposed}start(ve,rt){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(ve,rt),this._promise=new Promise(Tt=>{this._resolve=Tt});let lt=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:ve,clientY:rt});return document.dispatchEvent(lt),this._promise}handleEvent(ve){switch(ve.type){case"pointermove":this._evtPointerMove(ve);break;case"pointerup":this._evtPointerUp(ve);break;case"keydown":this._evtKeyDown(ve);break;default:ve.preventDefault(),ve.stopPropagation();break}}moveDragImage(ve,rt){if(!this.dragImage)return;let lt=this.dragImage.style;lt.transform=`translate(${ve}px, ${rt}px)`}_evtPointerMove(ve){ve.preventDefault(),ve.stopPropagation(),this._updateCurrentTarget(ve),this._updateDragScroll(ve),this.moveDragImage(ve.clientX,ve.clientY)}_evtPointerUp(ve){if(ve.preventDefault(),ve.stopPropagation(),ve.button!==0)return;if(this._updateCurrentTarget(ve),!this._currentTarget){this._finalize("none");return}if(this._dropAction==="none"){zf.dispatchDragLeave(this,this._currentTarget,null,ve),this._finalize("none");return}let rt=zf.dispatchDrop(this,this._currentTarget,ve);this._finalize(rt)}_evtKeyDown(ve){ve.preventDefault(),ve.stopPropagation(),ve.keyCode===27&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(ve){let rt=zf.findScrollTarget(ve);!this._scrollTarget&&!rt||(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=rt)}_updateCurrentTarget(ve){let rt=this._currentTarget,lt=this._currentTarget,Tt=this._currentElement,zt=zf.findElementBehindBackdrop(ve,this.document);this._currentElement=zt,zt!==Tt&&zt!==lt&&zf.dispatchDragExit(this,lt,zt,ve),zt!==Tt&&zt!==lt&&(lt=zf.dispatchDragEnter(this,zt,lt,ve)),lt!==rt&&(this._currentTarget=lt,zf.dispatchDragLeave(this,rt,lt,ve));let Lr=zf.dispatchDragOver(this,lt,ve);this._setDropAction(Lr)}_attachDragImage(ve,rt){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let lt=this.dragImage.style;lt.pointerEvents="none",lt.position="fixed",lt.transform=`translate(${ve}px, ${rt}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let ve=this.dragImage.parentNode;ve&&ve.removeChild(this.dragImage)}_setDropAction(ve){if(ve=zf.validateAction(ve,this.supportedActions),!(this._override&&this._dropAction===ve))switch(ve){case"none":this._dropAction=ve,this._override=gt.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=ve,this._override=gt.overrideCursor("copy",this.document);break;case"link":this._dropAction=ve,this._override=gt.overrideCursor("alias",this.document);break;case"move":this._dropAction=ve,this._override=gt.overrideCursor("move",this.document);break}}_finalize(ve){let rt=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,rt&&rt(ve)}};(function(gt){class ve extends DragEvent{constructor(Tt,zt){super(zt.type,{bubbles:!0,cancelable:!0,altKey:Tt.altKey,button:Tt.button,clientX:Tt.clientX,clientY:Tt.clientY,ctrlKey:Tt.ctrlKey,detail:0,metaKey:Tt.metaKey,relatedTarget:zt.related,screenX:Tt.screenX,screenY:Tt.screenY,shiftKey:Tt.shiftKey,view:window});let{drag:Lr}=zt;this.dropAction="none",this.mimeData=Lr.mimeData,this.proposedAction=Lr.proposedAction,this.supportedActions=Lr.supportedActions,this.source=Lr.source}}gt.Event=ve;function rt(lt,Tt=document){return zf.overrideCursor(lt,Tt)}gt.overrideCursor=rt})(Vf||(Vf={}));var zf;(function(gt){gt.SCROLL_EDGE_SIZE=20;function ve(Ta,Ja){return Ir[Ta]&Hr[Ja]?Ta:"none"}gt.validateAction=ve;function rt(Ta,Ja=document){if(Ta){if(lt&&Ta==lt.event)return lt.element;gt.cursorBackdrop.style.zIndex="-1000";let Pn=Ja.elementFromPoint(Ta.clientX,Ta.clientY);return gt.cursorBackdrop.style.zIndex="",lt={event:Ta,element:Pn},Pn}else{let Pn=gt.cursorBackdrop.style.transform;if(Tt&&Pn===Tt.transform)return Tt.element;let Na=gt.cursorBackdrop.getBoundingClientRect();gt.cursorBackdrop.style.zIndex="-1000";let ii=Ja.elementFromPoint(Na.left+Na.width/2,Na.top+Na.height/2);return gt.cursorBackdrop.style.zIndex="",Tt={transform:Pn,element:ii},ii}}gt.findElementBehindBackdrop=rt;let lt=null,Tt=null;function zt(Ta){let Ja=Ta.clientX,Pn=Ta.clientY,Na=rt(Ta);for(;Na;Na=Na.parentElement){if(!Na.hasAttribute("data-lm-dragscroll"))continue;let ii=0,Ni=0;Na===document.body&&(ii=window.pageXOffset,Ni=window.pageYOffset);let An=Na.getBoundingClientRect(),yi=An.top+Ni,yn=An.left+ii,Gn=yn+An.width,ys=yi+An.height;if(Ja=Gn||Pn=ys)continue;let Us=Ja-yn+1,rs=Pn-yi+1,Gs=Gn-Ja,Pu=ys-Pn,Vl=Math.min(Us,rs,Gs,Pu);if(Vl>gt.SCROLL_EDGE_SIZE)continue;let Fl;switch(Vl){case Pu:Fl="bottom";break;case rs:Fl="top";break;case Gs:Fl="right";break;case Us:Fl="left";break;default:throw"unreachable"}let uu=Na.scrollWidth-Na.clientWidth,cu=Na.scrollHeight-Na.clientHeight,Ic;switch(Fl){case"top":Ic=cu>0&&Na.scrollTop>0;break;case"left":Ic=uu>0&&Na.scrollLeft>0;break;case"right":Ic=uu>0&&Na.scrollLeft0&&Na.scrollTop{Pn===da&>.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",Br,!0),gt.cursorBackdrop.removeEventListener("scroll",Pr,!0),Na.removeChild(gt.cursorBackdrop))})}gt.overrideCursor=Rr;function Br(Ta){gt.cursorBackdrop&&(gt.cursorBackdrop.style.transform=`translate(${Ta.clientX}px, ${Ta.clientY}px)`)}function Pr(Ta){if(!gt.cursorBackdrop)return;let Ja=rt();if(!Ja)return;let Pn=Ja.closest("[data-lm-dragscroll]");Pn&&(Pn.scrollTop+=gt.cursorBackdrop.scrollTop-Xa,Pn.scrollLeft+=gt.cursorBackdrop.scrollLeft-Xa,xe())}function xe(){gt.cursorBackdrop.scrollTop=Xa,gt.cursorBackdrop.scrollLeft=Xa}let Xa=500;function Ka(){let Ta=document.createElement("div");return Ta.classList.add("lm-cursor-backdrop"),Ta}let da=0;gt.cursorBackdrop=Ka()})(zf||(zf={}));var W5=Jh(rv()),_f=Jh(Am());function Zv(){return Oy.keyboardLayout}var Wp=class gt{constructor(ve,rt,lt=[]){this.name=ve,this._codes=rt,this._keys=gt.extractKeys(rt),this._modifierKeys=gt.convertToKeySet(lt)}keys(){return Object.keys(this._keys)}isValidKey(ve){return ve in this._keys}isModifierKey(ve){return ve in this._modifierKeys}keyForKeydownEvent(ve){return this._codes[ve.keyCode]||""}};(function(gt){function ve(lt){let Tt=Object.create(null);for(let zt in lt)Tt[lt[zt]]=!0;return Tt}gt.extractKeys=ve;function rt(lt){let Tt=Object(null);for(let zt=0,Lr=lt.length;zt{this._commands.delete(ve),this._commandChanged.emit({id:ve,type:"removed"})})}notifyCommandChanged(ve){if(ve!==void 0&&!this._commands.has(ve))throw new Error(`Command '${ve}' is not registered.`);this._commandChanged.emit({id:ve,type:ve?"changed":"many-changed"})}describedBy(ve,rt=_f.JSONExt.emptyObject){var lt;let Tt=this._commands.get(ve);return Promise.resolve((lt=Tt?.describedBy.call(void 0,rt))!==null&<!==void 0?lt:{args:null})}label(ve,rt=_f.JSONExt.emptyObject){var lt;let Tt=this._commands.get(ve);return(lt=Tt?.label.call(void 0,rt))!==null&<!==void 0?lt:""}mnemonic(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.mnemonic.call(void 0,rt):-1}icon(ve,rt=_f.JSONExt.emptyObject){var lt;return(lt=this._commands.get(ve))===null||lt===void 0?void 0:lt.icon.call(void 0,rt)}iconClass(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.iconClass.call(void 0,rt):""}iconLabel(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.iconLabel.call(void 0,rt):""}caption(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.caption.call(void 0,rt):""}usage(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.usage.call(void 0,rt):""}className(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.className.call(void 0,rt):""}dataset(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.dataset.call(void 0,rt):{}}isEnabled(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.isEnabled.call(void 0,rt):!1}isToggled(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.isToggled.call(void 0,rt):!1}isToggleable(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.isToggleable:!1}isVisible(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);return lt?lt.isVisible.call(void 0,rt):!1}execute(ve,rt=_f.JSONExt.emptyObject){let lt=this._commands.get(ve);if(!lt)return Promise.reject(new Error(`Command '${ve}' not registered.`));let Tt;try{Tt=lt.execute.call(void 0,rt)}catch(Lr){Tt=Promise.reject(Lr)}let zt=Promise.resolve(Tt);return this._commandExecuted.emit({id:ve,args:rt,result:zt}),zt}addKeyBinding(ve){let rt=wh.createKeyBinding(ve);return this._keyBindings.push(rt),this._keyBindingChanged.emit({binding:rt,type:"added"}),new kd(()=>{W5.ArrayExt.removeFirstOf(this._keyBindings,rt),this._keyBindingChanged.emit({binding:rt,type:"removed"})})}processKeydownEvent(ve){if(ve.defaultPrevented||this._replaying)return;let rt=gt.keystrokeForKeydownEvent(ve);if(!rt){this._replayKeydownEvents(),this._clearPendingState();return}if(gt.isModifierKeyPressed(ve)){let{exact:Lr}=wh.matchKeyBinding(this._keyBindings,[rt],ve);Lr?(ve.preventDefault(),ve.stopPropagation(),this._startModifierTimer(Lr)):this._clearModifierTimer();return}this._keystrokes.push(rt);let{exact:lt,partial:Tt}=wh.matchKeyBinding(this._keyBindings,this._keystrokes,ve),zt=Tt.length!==0;if(!lt&&!zt){this._replayKeydownEvents(),this._clearPendingState();return}if((lt?.preventDefault||Tt.some(Lr=>Lr.preventDefault))&&(ve.preventDefault(),ve.stopPropagation()),this._keydownEvents.push(ve),lt&&!zt){this._executeKeyBinding(lt),this._clearPendingState();return}lt&&(this._exactKeyMatch=lt),this._startTimer()}holdKeyBindingExecution(ve,rt){this._holdKeyBindingPromises.set(ve,rt)}processKeyupEvent(ve){this._clearModifierTimer()}_startModifierTimer(ve){this._clearModifierTimer(),this._timerModifierID=window.setTimeout(()=>{this._executeKeyBinding(ve)},wh.modifierkeyTimeOut)}_clearModifierTimer(){this._timerModifierID!==0&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout(()=>{this._onPendingTimeout()},wh.CHORD_TIMEOUT)}_clearTimer(){this._timerID!==0&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){this._keydownEvents.length!==0&&(this._replaying=!0,this._keydownEvents.forEach(wh.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(ve){if(this._holdKeyBindingPromises.size!==0){let zt=[...this._keydownEvents],Lr=(await Promise.race([Promise.all(zt.map(async gr=>{var Mr;return(Mr=this._holdKeyBindingPromises.get(gr))!==null&&Mr!==void 0?Mr:Promise.resolve(!0)})),new Promise(gr=>{setTimeout(()=>gr([!1]),wh.KEYBINDING_HOLD_TIMEOUT)})])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!Lr)return}let{command:rt,args:lt}=ve,Tt={_luminoEvent:{type:"keybinding",keys:ve.keys},...lt};if(!this.hasCommand(rt)||!this.isEnabled(rt,Tt)){let zt=this.hasCommand(rt)?"enabled":"registered",gr=`Cannot execute key binding '${ve.keys.join(", ")}':`,Mr=`command '${rt}' is not ${zt}.`;console.warn(`${gr} ${Mr}`);return}await this.execute(rt,Tt)}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}};(function(gt){function ve(gr){let Mr="",Ur=!1,wr=!1,Ir=!1,Hr=!1;for(let Rr of gr.split(/\s+/))Rr==="Accel"?Ff.IS_MAC?wr=!0:Ir=!0:Rr==="Alt"?Ur=!0:Rr==="Cmd"?wr=!0:Rr==="Ctrl"?Ir=!0:Rr==="Shift"?Hr=!0:Rr.length>0&&(Mr=Rr);return{cmd:wr,ctrl:Ir,alt:Ur,shift:Hr,key:Mr}}gt.parseKeystroke=ve;function rt(gr){let Mr="",Ur=ve(gr);return Ur.ctrl&&(Mr+="Ctrl "),Ur.alt&&(Mr+="Alt "),Ur.shift&&(Mr+="Shift "),Ur.cmd&&Ff.IS_MAC&&(Mr+="Cmd "),Ur.key?Mr+Ur.key:Mr.trim()}gt.normalizeKeystroke=rt;function lt(gr){let Mr;return Ff.IS_WIN?Mr=gr.winKeys||gr.keys:Ff.IS_MAC?Mr=gr.macKeys||gr.keys:Mr=gr.linuxKeys||gr.keys,Mr.map(rt)}gt.normalizeKeys=lt;function Tt(gr){return typeof gr=="string"?Mr(gr):gr.map(Mr).join(", ");function Mr(Ur){let wr=[],Ir=Ff.IS_MAC?" ":"+",Hr=ve(Ur);return Hr.ctrl&&wr.push("Ctrl"),Hr.alt&&wr.push("Alt"),Hr.shift&&wr.push("Shift"),Ff.IS_MAC&&Hr.cmd&&wr.push("Cmd"),wr.push(Hr.key),wr.map(wh.formatKey).join(Ir)}}gt.formatKeystroke=Tt;function zt(gr){let Mr=Zv(),Ur=Mr.keyForKeydownEvent(gr);return Mr.isModifierKey(Ur)}gt.isModifierKeyPressed=zt;function Lr(gr){let Mr=Zv(),Ur=Mr.keyForKeydownEvent(gr),wr=[];return gr.ctrlKey&&wr.push("Ctrl"),gr.altKey&&wr.push("Alt"),gr.shiftKey&&wr.push("Shift"),gr.metaKey&&Ff.IS_MAC&&wr.push("Cmd"),Mr.isModifierKey(Ur)||wr.push(Ur),wr.join(" ")}gt.keystrokeForKeydownEvent=Lr})(td||(td={}));var wh;(function(gt){gt.CHORD_TIMEOUT=1e3,gt.KEYBINDING_HOLD_TIMEOUT=1e3,gt.modifierkeyTimeOut=500;function ve(da){return{execute:da.execute,describedBy:Br(typeof da.describedBy=="function"?da.describedBy:{args:null,...da.describedBy},()=>({args:null})),label:Br(da.label,Mr),mnemonic:Br(da.mnemonic,Ur),icon:Br(da.icon,Rr),iconClass:Br(da.iconClass,Mr),iconLabel:Br(da.iconLabel,Mr),caption:Br(da.caption,Mr),usage:Br(da.usage,Mr),className:Br(da.className,Mr),dataset:Br(da.dataset,Hr),isEnabled:da.isEnabled||wr,isToggled:da.isToggled||Ir,isToggleable:da.isToggleable||!!da.isToggled,isVisible:da.isVisible||wr}}gt.createCommand=ve;function rt(da){var Ta;return{keys:td.normalizeKeys(da),selector:Pr(da),command:da.command,args:da.args||_f.JSONExt.emptyObject,preventDefault:(Ta=da.preventDefault)!==null&&Ta!==void 0?Ta:!0}}gt.createKeyBinding=rt;function lt(da,Ta,Ja){let Pn=null,Na=[],ii=1/0,Ni=0;for(let An=0,yi=da.length;Anii)continue;let Us=xh.calculateSpecificity(yn.selector);(!Pn||ys=Ni)&&(Pn=yn,ii=ys,Ni=Us)}return{exact:Pn,partial:Na}}gt.matchKeyBinding=lt;function Tt(da){da.target.dispatchEvent(Ka(da))}gt.replayKeyEvent=Tt;function zt(da){return Ff.IS_MAC?Lr.hasOwnProperty(da)?Lr[da]:da:gr.hasOwnProperty(da)?gr[da]:da}gt.formatKey=zt;let Lr={Backspace:"\u232B",Tab:"\u21E5",Enter:"\u23CE",Shift:"\u21E7",Ctrl:"\u2303",Alt:"\u2325",Escape:"\u238B",PageUp:"\u21DE",PageDown:"\u21DF",End:"\u2198",Home:"\u2196",ArrowLeft:"\u2190",ArrowUp:"\u2191",ArrowRight:"\u2192",ArrowDown:"\u2193",Delete:"\u2326",Cmd:"\u2318"},gr={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},Mr=()=>"",Ur=()=>-1,wr=()=>!0,Ir=()=>!1,Hr=()=>({}),Rr=()=>{};function Br(da,Ta){return da===void 0?Ta:typeof da=="function"?da:()=>da}function Pr(da){if(da.selector.indexOf(",")!==-1)throw new Error(`Selector cannot contain commas: ${da.selector}`);if(!xh.isValid(da.selector))throw new Error(`Invalid selector: ${da.selector}`);return da.selector}function xe(da,Ta){if(da.lengthTa.length?2:1}function Xa(da,Ta){let Ja=Ta.target,Pn=Ta.currentTarget;for(let Na=0;Ja!==null;Ja=Ja.parentElement,++Na){if(Ja.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(xh.matches(Ja,da))return Na;if(Ja===Pn)return-1}return-1}function Ka(da){let Ta=document.createEvent("Event"),Ja=da.bubbles||!0,Pn=da.cancelable||!0;return Ta.initEvent(da.type||"keydown",Ja,Pn),Ta.key=da.key||"",Ta.keyCode=da.keyCode||0,Ta.which=da.keyCode||0,Ta.ctrlKey=da.ctrlKey||!1,Ta.altKey=da.altKey||!1,Ta.shiftKey=da.shiftKey||!1,Ta.metaKey=da.metaKey||!1,Ta.view=da.view||window,Ta}})(wh||(wh={}));var Kv=Jh(rv()),Jv=class{constructor(ve){this.type="text",this.content=ve}},Yp=class{constructor(ve,rt,lt,Tt){this.type="element",this.tag=ve,this.attrs=rt,this.children=lt,this.renderer=Tt}};function ql(gt){let ve={},rt,lt=[];for(let zt=1,Lr=arguments.length;zt=Xa.length){rt(Pr[Ta],Rr);continue}let Ja=Xa[Ta],Pn=Pr[Ta];if(Ja===Pn){Ka=Ka.nextSibling;continue}if(Ja.type==="text"&&Pn.type==="text"){Ka.textContent!==Pn.content&&(Ka.textContent=Pn.content),Ka=Ka.nextSibling;continue}if(Ja.type==="text"||Pn.type==="text"){Kv.ArrayExt.insert(Xa,Ta,Pn),rt(Pn,Rr,Ka);continue}if(!Ja.renderer!=!Pn.renderer){Kv.ArrayExt.insert(Xa,Ta,Pn),rt(Pn,Rr,Ka);continue}let Na=Pn.attrs.key;if(Na&&Na in xe){let Ni=xe[Na];Ni.vNode!==Ja&&(Kv.ArrayExt.move(Xa,Xa.indexOf(Ni.vNode,Ta+1),Ta),Rr.insertBefore(Ni.element,Ka),Ja=Ni.vNode,Ka=Ni.element)}if(Ja===Pn){Ka=Ka.nextSibling;continue}let ii=Ja.attrs.key;if(ii&&ii!==Na){Kv.ArrayExt.insert(Xa,Ta,Pn),rt(Pn,Rr,Ka);continue}if(Ja.tag!==Pn.tag){Kv.ArrayExt.insert(Xa,Ta,Pn),rt(Pn,Rr,Ka);continue}gr(Ka,Ja.attrs,Pn.attrs),Pn.renderer?Pn.renderer.render(Ka,{attrs:Pn.attrs,children:Pn.children}):lt(Ka,Ja.children,Pn.children),Ka=Ka.nextSibling}Tt(Rr,Xa,da,!0)}gt.updateContent=lt;function Tt(Rr,Br,Pr,xe){for(let Xa=Br.length-1;Xa>=Pr;--Xa){let Ka=Br[Xa],da=xe?Rr.lastChild:Rr.childNodes[Xa];Ka.type==="text"||(Ka.renderer&&Ka.renderer.unrender?Ka.renderer.unrender(da,{attrs:Ka.attrs,children:Ka.children}):Tt(da,Ka.children,0,!1)),xe&&Rr.removeChild(da)}}let zt={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function Lr(Rr,Br){for(let Pr in Br)Pr in zt||(Pr.substr(0,2)==="on"?Rr[Pr]=Br[Pr]:Rr.setAttribute(Pr,Br[Pr]));Br.className!==void 0&&Rr.setAttribute("class",Br.className),Br.htmlFor!==void 0&&Rr.setAttribute("for",Br.htmlFor),Br.dataset&&Mr(Rr,Br.dataset),Br.style&&wr(Rr,Br.style)}function gr(Rr,Br,Pr){if(Br===Pr)return;let xe;for(xe in Br)xe in zt||xe in Pr||(xe.substr(0,2)==="on"?Rr[xe]=null:Rr.removeAttribute(xe));for(xe in Pr)xe in zt||Br[xe]===Pr[xe]||(xe.substr(0,2)==="on"?Rr[xe]=Pr[xe]:Rr.setAttribute(xe,Pr[xe]));Br.className!==Pr.className&&(Pr.className!==void 0?Rr.setAttribute("class",Pr.className):Rr.removeAttribute("class")),Br.htmlFor!==Pr.htmlFor&&(Pr.htmlFor!==void 0?Rr.setAttribute("for",Pr.htmlFor):Rr.removeAttribute("for")),Br.dataset!==Pr.dataset&&Ur(Rr,Br.dataset||{},Pr.dataset||{}),Br.style!==Pr.style&&Ir(Rr,Br.style||{},Pr.style||{})}function Mr(Rr,Br){for(let Pr in Br)Rr.setAttribute(`data-${Pr}`,Br[Pr])}function Ur(Rr,Br,Pr){for(let xe in Br)xe in Pr||Rr.removeAttribute(`data-${xe}`);for(let xe in Pr)Br[xe]!==Pr[xe]&&Rr.setAttribute(`data-${xe}`,Pr[xe])}function wr(Rr,Br){let Pr=Rr.style,xe;for(xe in Br)Pr[xe]=Br[xe]}function Ir(Rr,Br,Pr){let xe=Rr.style,Xa;for(Xa in Br)Xa in Pr||(xe[Xa]="");for(Xa in Pr)Br[Xa]!==Pr[Xa]&&(xe[Xa]=Pr[Xa])}function Hr(Rr,Br){let Pr=Rr.firstChild,xe=Object.create(null);for(let Xa of Br)Xa.type==="element"&&Xa.attrs.key&&(xe[Xa.attrs.key]={vNode:Xa,element:Pr}),Pr=Pr.nextSibling;return xe}})(nv||(nv={}));var Bh=class{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}},ah;(function(gt){function ve(zt,Lr){let gr=zt.length;if(gr===0)return Lr;let Mr=0,Ur=0,wr=0,Ir=0,Hr=0;for(let Pr=0;Pr0&&(Ir+=xe.stretch,Hr++)}if(Lr===wr)return 0;if(Lr<=Mr){for(let Pr=0;Pr=Ur){for(let Pr=0;Pr0&&Pr>Rr;){let xe=Pr,Xa=Ir;for(let Ka=0;Ka0&&Pr>Rr;){let xe=Pr/Br;for(let Xa=0;Xa0&&Pr>Rr;){let xe=Pr,Xa=Ir;for(let Ka=0;Ka=da.maxSize?(Pr-=da.maxSize-da.size,Ir-=da.stretch,da.size=da.maxSize,da.done=!0,Br--,Hr--):(Pr-=Ta,da.size+=Ta)}}for(;Br>0&&Pr>Rr;){let xe=Pr/Br;for(let Xa=0;Xa=Ka.maxSize?(Pr-=Ka.maxSize-Ka.size,Ka.size=Ka.maxSize,Ka.done=!0,Br--):(Pr-=xe,Ka.size+=xe))}}}return 0}gt.calc=ve;function rt(zt,Lr,gr){zt.length===0||gr===0||(gr>0?lt(zt,Lr,gr):Tt(zt,Lr,-gr))}gt.adjust=rt;function lt(zt,Lr,gr){let Mr=0;for(let Hr=0;Hr<=Lr;++Hr){let Rr=zt[Hr];Mr+=Rr.maxSize-Rr.size}let Ur=0;for(let Hr=Lr+1,Rr=zt.length;Hr=0&&wr>0;--Hr){let Rr=zt[Hr],Br=Rr.maxSize-Rr.size;Br>=wr?(Rr.sizeHint=Rr.size+wr,wr=0):(Rr.sizeHint=Rr.size+Br,wr-=Br)}let Ir=gr;for(let Hr=Lr+1,Rr=zt.length;Hr0;++Hr){let Br=zt[Hr],Pr=Br.size-Br.minSize;Pr>=Ir?(Br.sizeHint=Br.size-Ir,Ir=0):(Br.sizeHint=Br.size-Pr,Ir-=Pr)}}function Tt(zt,Lr,gr){let Mr=0;for(let Hr=Lr+1,Rr=zt.length;Hr0;++Hr){let Br=zt[Hr],Pr=Br.maxSize-Br.size;Pr>=wr?(Br.sizeHint=Br.size+wr,wr=0):(Br.sizeHint=Br.size+Pr,wr-=Pr)}let Ir=gr;for(let Hr=Lr;Hr>=0&&Ir>0;--Hr){let Rr=zt[Hr],Br=Rr.size-Rr.minSize;Br>=Ir?(Rr.sizeHint=Rr.size-Ir,Ir=0):(Rr.sizeHint=Rr.size-Br,Ir-=Br)}}})(ah||(ah={}));var Xp=class{constructor(ve){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new jl(this),this._isDisposed=!1,this.owner=ve.owner,ve.label!==void 0&&(this._label=ve.label),ve.mnemonic!==void 0&&(this._mnemonic=ve.mnemonic),ve.icon!==void 0&&(this._icon=ve.icon),ve.iconClass!==void 0&&(this._iconClass=ve.iconClass),ve.iconLabel!==void 0&&(this._iconLabel=ve.iconLabel),ve.caption!==void 0&&(this._caption=ve.caption),ve.className!==void 0&&(this._className=ve.className),ve.closable!==void 0&&(this._closable=ve.closable),this._dataset=ve.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(ve){this._label!==ve&&(this._label=ve,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(ve){this._mnemonic!==ve&&(this._mnemonic=ve,this._changed.emit(void 0))}get icon(){return this._icon}set icon(ve){this._icon!==ve&&(this._icon=ve,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(ve){this._iconClass!==ve&&(this._iconClass=ve,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(ve){this._iconLabel!==ve&&(this._iconLabel=ve,this._changed.emit(void 0))}get caption(){return this._caption}set caption(ve){this._caption!==ve&&(this._caption=ve,this._changed.emit(void 0))}get className(){return this._className}set className(ve){this._className!==ve&&(this._className=ve,this._changed.emit(void 0))}get closable(){return this._closable}set closable(ve){this._closable!==ve&&(this._closable=ve,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(ve){this._dataset!==ve&&(this._dataset=ve,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,jl.clearData(this))}},to=class gt{constructor(ve={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new jl(this),this._hiddenMode=gt.HiddenMode.Display,this.node=Em.createNode(ve),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(gt.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&>.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),jl.clearData(this),Gi.clearData(this),qf.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(gt.Flag.IsDisposed)}get isAttached(){return this.testFlag(gt.Flag.IsAttached)}get isHidden(){return this.testFlag(gt.Flag.IsHidden)}get isVisible(){return this.testFlag(gt.Flag.IsVisible)}get title(){return Em.titleProperty.get(this)}get id(){return this.node.id}set id(ve){this.node.id=ve}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(ve){this._hiddenMode!==ve&&(this.isHidden&&this._toggleHidden(!1),ve==gt.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=ve,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(ve){if(this._parent!==ve){if(ve&&this.contains(ve))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let rt=new gt.ChildMessage("child-removed",this);Gi.sendMessage(this._parent,rt)}if(this._parent=ve,this._parent&&!this._parent.isDisposed){let rt=new gt.ChildMessage("child-added",this);Gi.sendMessage(this._parent,rt)}this.isDisposed||Gi.sendMessage(this,gt.Msg.ParentChanged)}}get layout(){return this._layout}set layout(ve){if(this._layout!==ve){if(this.testFlag(gt.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(ve.parent)throw new Error("Cannot change layout parent.");this._layout=ve,ve.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(ve){for(let rt=ve;rt;rt=rt._parent)if(rt===this)return!0;return!1}hasClass(ve){return this.node.classList.contains(ve)}addClass(ve){this.node.classList.add(ve)}removeClass(ve){this.node.classList.remove(ve)}toggleClass(ve,rt){return rt===!0?(this.node.classList.add(ve),!0):rt===!1?(this.node.classList.remove(ve),!1):this.node.classList.toggle(ve)}update(){Gi.postMessage(this,gt.Msg.UpdateRequest)}fit(){Gi.postMessage(this,gt.Msg.FitRequest)}activate(){Gi.postMessage(this,gt.Msg.ActivateRequest)}close(){Gi.sendMessage(this,gt.Msg.CloseRequest)}show(){if(this.testFlag(gt.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&Gi.sendMessage(this,gt.Msg.BeforeShow),this.clearFlag(gt.Flag.IsHidden),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&Gi.sendMessage(this,gt.Msg.AfterShow),this.parent)){let ve=new gt.ChildMessage("child-shown",this);Gi.sendMessage(this.parent,ve)}}hide(){if(!this.testFlag(gt.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&Gi.sendMessage(this,gt.Msg.BeforeHide),this.setFlag(gt.Flag.IsHidden),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&Gi.sendMessage(this,gt.Msg.AfterHide),this.parent)){let ve=new gt.ChildMessage("child-hidden",this);Gi.sendMessage(this.parent,ve)}}setHidden(ve){ve?this.hide():this.show()}testFlag(ve){return(this._flags&ve)!==0}setFlag(ve){this._flags|=ve}clearFlag(ve){this._flags&=~ve}processMessage(ve){switch(ve.type){case"resize":this.notifyLayout(ve),this.onResize(ve);break;case"update-request":this.notifyLayout(ve),this.onUpdateRequest(ve);break;case"fit-request":this.notifyLayout(ve),this.onFitRequest(ve);break;case"before-show":this.notifyLayout(ve),this.onBeforeShow(ve);break;case"after-show":this.setFlag(gt.Flag.IsVisible),this.notifyLayout(ve),this.onAfterShow(ve);break;case"before-hide":this.notifyLayout(ve),this.onBeforeHide(ve);break;case"after-hide":this.clearFlag(gt.Flag.IsVisible),this.notifyLayout(ve),this.onAfterHide(ve);break;case"before-attach":this.notifyLayout(ve),this.onBeforeAttach(ve);break;case"after-attach":!this.isHidden&&(!this.parent||this.parent.isVisible)&&this.setFlag(gt.Flag.IsVisible),this.setFlag(gt.Flag.IsAttached),this.notifyLayout(ve),this.onAfterAttach(ve);break;case"before-detach":this.notifyLayout(ve),this.onBeforeDetach(ve);break;case"after-detach":this.clearFlag(gt.Flag.IsVisible),this.clearFlag(gt.Flag.IsAttached),this.notifyLayout(ve),this.onAfterDetach(ve);break;case"activate-request":this.notifyLayout(ve),this.onActivateRequest(ve);break;case"close-request":this.notifyLayout(ve),this.onCloseRequest(ve);break;case"child-added":this.notifyLayout(ve),this.onChildAdded(ve);break;case"child-removed":this.notifyLayout(ve),this.onChildRemoved(ve);break;default:this.notifyLayout(ve);break}}notifyLayout(ve){this._layout&&this._layout.processParentMessage(ve)}onCloseRequest(ve){this.parent?this.parent=null:this.isAttached&>.detach(this)}onResize(ve){}onUpdateRequest(ve){}onFitRequest(ve){}onActivateRequest(ve){}onBeforeShow(ve){}onAfterShow(ve){}onBeforeHide(ve){}onAfterHide(ve){}onBeforeAttach(ve){}onAfterAttach(ve){}onBeforeDetach(ve){}onAfterDetach(ve){}onChildAdded(ve){}onChildRemoved(ve){}_toggleHidden(ve){if(ve)switch(this._hiddenMode){case gt.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case gt.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case gt.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1";break}else switch(this._hiddenMode){case gt.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case gt.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case gt.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex="";break}}};(function(gt){(function(zt){zt[zt.Display=0]="Display",zt[zt.Scale=1]="Scale",zt[zt.ContentVisibility=2]="ContentVisibility"})(gt.HiddenMode||(gt.HiddenMode={})),function(zt){zt[zt.IsDisposed=1]="IsDisposed",zt[zt.IsAttached=2]="IsAttached",zt[zt.IsHidden=4]="IsHidden",zt[zt.IsVisible=8]="IsVisible",zt[zt.DisallowLayout=16]="DisallowLayout"}(gt.Flag||(gt.Flag={})),function(zt){zt.BeforeShow=new jf("before-show"),zt.AfterShow=new jf("after-show"),zt.BeforeHide=new jf("before-hide"),zt.AfterHide=new jf("after-hide"),zt.BeforeAttach=new jf("before-attach"),zt.AfterAttach=new jf("after-attach"),zt.BeforeDetach=new jf("before-detach"),zt.AfterDetach=new jf("after-detach"),zt.ParentChanged=new jf("parent-changed"),zt.UpdateRequest=new Ed("update-request"),zt.FitRequest=new Ed("fit-request"),zt.ActivateRequest=new Ed("activate-request"),zt.CloseRequest=new Ed("close-request")}(gt.Msg||(gt.Msg={}));class ve extends jf{constructor(Lr,gr){super(Lr),this.child=gr}}gt.ChildMessage=ve;class rt extends jf{constructor(Lr,gr){super("resize"),this.width=Lr,this.height=gr}}gt.ResizeMessage=rt,function(zt){zt.UnknownSize=new zt(-1,-1)}(rt=gt.ResizeMessage||(gt.ResizeMessage={}));function lt(zt,Lr,gr=null){if(zt.parent)throw new Error("Cannot attach a child widget.");if(zt.isAttached||zt.node.isConnected)throw new Error("Widget is already attached.");if(!Lr.isConnected)throw new Error("Host is not attached.");Gi.sendMessage(zt,gt.Msg.BeforeAttach),Lr.insertBefore(zt.node,gr),Gi.sendMessage(zt,gt.Msg.AfterAttach)}gt.attach=lt;function Tt(zt){if(zt.parent)throw new Error("Cannot detach a child widget.");if(!zt.isAttached||!zt.node.isConnected)throw new Error("Widget is not attached.");Gi.sendMessage(zt,gt.Msg.BeforeDetach),zt.node.parentNode.removeChild(zt.node),Gi.sendMessage(zt,gt.Msg.AfterDetach)}gt.detach=Tt})(to||(to={}));var Em;(function(gt){gt.titleProperty=new qf({name:"title",create:rt=>new Xp({owner:rt})});function ve(rt){return rt.node||document.createElement(rt.tag||"div")}gt.createNode=ve})(Em||(Em={}));var od=class{constructor(ve={}){this._disposed=!1,this._parent=null,this._fitPolicy=ve.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,jl.clearData(this),qf.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(ve){if(this._parent!==ve){if(this._parent)throw new Error("Cannot change parent widget.");if(ve.layout!==this)throw new Error("Invalid parent widget.");this._parent=ve,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(ve){if(this._fitPolicy!==ve&&(this._fitPolicy=ve,this._parent)){let rt=this._parent.node.style;rt.minWidth="",rt.minHeight="",rt.maxWidth="",rt.maxHeight="",this._parent.fit()}}processParentMessage(ve){switch(ve.type){case"resize":this.onResize(ve);break;case"update-request":this.onUpdateRequest(ve);break;case"fit-request":this.onFitRequest(ve);break;case"before-show":this.onBeforeShow(ve);break;case"after-show":this.onAfterShow(ve);break;case"before-hide":this.onBeforeHide(ve);break;case"after-hide":this.onAfterHide(ve);break;case"before-attach":this.onBeforeAttach(ve);break;case"after-attach":this.onAfterAttach(ve);break;case"before-detach":this.onBeforeDetach(ve);break;case"after-detach":this.onAfterDetach(ve);break;case"child-removed":this.onChildRemoved(ve);break;case"child-shown":this.onChildShown(ve);break;case"child-hidden":this.onChildHidden(ve);break}}init(){for(let ve of this)ve.parent=this.parent}onResize(ve){for(let rt of this)Gi.sendMessage(rt,to.ResizeMessage.UnknownSize)}onUpdateRequest(ve){for(let rt of this)Gi.sendMessage(rt,to.ResizeMessage.UnknownSize)}onBeforeAttach(ve){for(let rt of this)Gi.sendMessage(rt,ve)}onAfterAttach(ve){for(let rt of this)Gi.sendMessage(rt,ve)}onBeforeDetach(ve){for(let rt of this)Gi.sendMessage(rt,ve)}onAfterDetach(ve){for(let rt of this)Gi.sendMessage(rt,ve)}onBeforeShow(ve){for(let rt of this)rt.isHidden||Gi.sendMessage(rt,ve)}onAfterShow(ve){for(let rt of this)rt.isHidden||Gi.sendMessage(rt,ve)}onBeforeHide(ve){for(let rt of this)rt.isHidden||Gi.sendMessage(rt,ve)}onAfterHide(ve){for(let rt of this)rt.isHidden||Gi.sendMessage(rt,ve)}onChildRemoved(ve){this.removeWidget(ve.child)}onFitRequest(ve){}onChildShown(ve){}onChildHidden(ve){}};(function(gt){function ve(zt){return Qv.horizontalAlignmentProperty.get(zt)}gt.getHorizontalAlignment=ve;function rt(zt,Lr){Qv.horizontalAlignmentProperty.set(zt,Lr)}gt.setHorizontalAlignment=rt;function lt(zt){return Qv.verticalAlignmentProperty.get(zt)}gt.getVerticalAlignment=lt;function Tt(zt,Lr){Qv.verticalAlignmentProperty.set(zt,Lr)}gt.setVerticalAlignment=Tt})(od||(od={}));var sv=class{constructor(ve){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=ve,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let ve=this.widget.node.style;ve.position="",ve.top="",ve.left="",ve.width="",ve.height="",ve.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let ve=Zl.sizeLimits(this.widget.node);this._minWidth=ve.minWidth,this._minHeight=ve.minHeight,this._maxWidth=ve.maxWidth,this._maxHeight=ve.maxHeight}update(ve,rt,lt,Tt){let zt=Math.max(this._minWidth,Math.min(lt,this._maxWidth)),Lr=Math.max(this._minHeight,Math.min(Tt,this._maxHeight));if(zt"center",changed:ve}),gt.verticalAlignmentProperty=new qf({name:"verticalAlignment",create:()=>"top",changed:ve});function ve(rt){rt.parent&&rt.parent.layout&&rt.parent.update()}})(Qv||(Qv={}));var ep=class extends od{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(ve){this.insertWidget(this._widgets.length,ve)}insertWidget(ve,rt){rt.parent=this.parent;let lt=this._widgets.indexOf(rt),Tt=Math.max(0,Math.min(ve,this._widgets.length));if(lt===-1){Li.ArrayExt.insert(this._widgets,Tt,rt),this.parent&&this.attachWidget(Tt,rt);return}Tt===this._widgets.length&&Tt--,lt!==Tt&&(Li.ArrayExt.move(this._widgets,lt,Tt),this.parent&&this.moveWidget(lt,Tt,rt))}removeWidget(ve){this.removeWidgetAt(this._widgets.indexOf(ve))}removeWidgetAt(ve){let rt=Li.ArrayExt.removeAt(this._widgets,ve);rt&&this.parent&&this.detachWidget(ve,rt)}init(){super.init();let ve=0;for(let rt of this)this.attachWidget(ve++,rt)}attachWidget(ve,rt){let lt=this.parent.node.children[ve];this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.BeforeAttach),this.parent.node.insertBefore(rt.node,lt),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.AfterAttach)}moveWidget(ve,rt,lt){this.parent.isAttached&&Gi.sendMessage(lt,to.Msg.BeforeDetach),this.parent.node.removeChild(lt.node),this.parent.isAttached&&Gi.sendMessage(lt,to.Msg.AfterDetach);let Tt=this.parent.node.children[rt];this.parent.isAttached&&Gi.sendMessage(lt,to.Msg.BeforeAttach),this.parent.node.insertBefore(lt.node,Tt),this.parent.isAttached&&Gi.sendMessage(lt,to.Msg.AfterAttach)}detachWidget(ve,rt){this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.BeforeDetach),this.parent.node.removeChild(rt.node),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.AfterDetach)}},$p;(function(gt){function ve(rt){return Math.max(0,Math.floor(rt))}gt.clampDimension=ve})($p||($p={}));var Zp=$p,sd=class gt extends ep{constructor(ve){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=ve.renderer,ve.orientation!==void 0&&(this._orientation=ve.orientation),ve.alignment!==void 0&&(this._alignment=ve.alignment),ve.spacing!==void 0&&(this._spacing=$p.clampDimension(ve.spacing))}dispose(){for(let ve of this._items)ve.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(ve){this._orientation!==ve&&(this._orientation=ve,this.parent&&(this.parent.dataset.orientation=ve,this.parent.fit()))}get alignment(){return this._alignment}set alignment(ve){this._alignment!==ve&&(this._alignment=ve,this.parent&&(this.parent.dataset.alignment=ve,this.parent.update()))}get spacing(){return this._spacing}set spacing(ve){ve=$p.clampDimension(ve),this._spacing!==ve&&(this._spacing=ve,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map(ve=>ve.size)}relativeSizes(){return nd.normalize(this._sizers.map(ve=>ve.size))}setRelativeSizes(ve,rt=!0){let lt=this._sizers.length,Tt=ve.slice(0,lt);for(;Tt.length0&&(zt.sizeHint=zt.size);ah.adjust(this._sizers,ve,Tt),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(ve,rt){let lt=new sv(rt),Tt=nd.createHandle(this.renderer),zt=nd.averageSize(this._sizers),Lr=nd.createSizer(zt);Li.ArrayExt.insert(this._items,ve,lt),Li.ArrayExt.insert(this._sizers,ve,Lr),Li.ArrayExt.insert(this._handles,ve,Tt),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.BeforeAttach),this.parent.node.appendChild(rt.node),this.parent.node.appendChild(Tt),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.AfterAttach),this.parent.fit()}moveWidget(ve,rt,lt){Li.ArrayExt.move(this._items,ve,rt),Li.ArrayExt.move(this._sizers,ve,rt),Li.ArrayExt.move(this._handles,ve,rt),this.parent.fit()}detachWidget(ve,rt){let lt=Li.ArrayExt.removeAt(this._items,ve),Tt=Li.ArrayExt.removeAt(this._handles,ve);Li.ArrayExt.removeAt(this._sizers,ve),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.BeforeDetach),this.parent.node.removeChild(rt.node),this.parent.node.removeChild(Tt),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.AfterDetach),lt.dispose(),this.parent.fit()}onBeforeShow(ve){super.onBeforeShow(ve),this.parent.update()}onBeforeAttach(ve){super.onBeforeAttach(ve),this.parent.fit()}onChildShown(ve){this.parent.fit()}onChildHidden(ve){this.parent.fit()}onResize(ve){this.parent.isVisible&&this._update(ve.width,ve.height)}onUpdateRequest(ve){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(ve){this.parent.isAttached&&this._fit()}updateItemPosition(ve,rt,lt,Tt,zt,Lr,gr){let Mr=this._items[ve];if(Mr.isHidden)return;let Ur=this._handles[ve].style;rt?(lt+=this.widgetOffset,Mr.update(lt,Tt,gr,zt),lt+=gr,Ur.top=`${Tt}px`,Ur.left=`${lt}px`,Ur.width=`${this._spacing}px`,Ur.height=`${zt}px`):(Tt+=this.widgetOffset,Mr.update(lt,Tt,Lr,gr),Tt+=gr,Ur.top=`${Tt}px`,Ur.left=`${lt}px`,Ur.width=`${Lr}px`,Ur.height=`${this._spacing}px`)}_fit(){let ve=0,rt=-1;for(let Mr=0,Ur=this._items.length;Mr0&&(Ir.sizeHint=Ir.size),wr.isHidden){Ir.minSize=0,Ir.maxSize=0;continue}wr.fit(),Ir.stretch=gt.getStretch(wr.widget),lt?(Ir.minSize=wr.minWidth,Ir.maxSize=wr.maxWidth,Tt+=wr.minWidth,zt=Math.max(zt,wr.minHeight)):(Ir.minSize=wr.minHeight,Ir.maxSize=wr.maxHeight,zt+=wr.minHeight,Tt=Math.max(Tt,wr.minWidth))}let Lr=this._box=Zl.boxSizing(this.parent.node);Tt+=Lr.horizontalSum,zt+=Lr.verticalSum;let gr=this.parent.node.style;gr.minWidth=`${Tt}px`,gr.minHeight=`${zt}px`,this._dirty=!0,this.parent.parent&&Gi.sendMessage(this.parent.parent,to.Msg.FitRequest),this._dirty&&Gi.sendMessage(this.parent,to.Msg.UpdateRequest)}_update(ve,rt){this._dirty=!1;let lt=0;for(let Ir=0,Hr=this._items.length;Ir0){let Ir;if(wr?Ir=Math.max(0,Lr-this._fixed):Ir=Math.max(0,gr-this._fixed),this._hasNormedSizes){for(let Rr of this._sizers)Rr.sizeHint*=Ir;this._hasNormedSizes=!1}let Hr=ah.calc(this._sizers,Ir);if(Hr>0)switch(this._alignment){case"start":break;case"center":Mr=0,Ur=Hr/2;break;case"end":Mr=0,Ur=Hr;break;case"justify":Mr=Hr/lt,Ur=0;break;default:throw"unreachable"}}for(let Ir=0,Hr=this._items.length;Ir0,coerce:(Lr,gr)=>Math.max(0,Math.floor(gr)),changed:zt});function ve(Lr){let gr=new Bh;return gr.sizeHint=Math.floor(Lr),gr}gt.createSizer=ve;function rt(Lr){let gr=Lr.createHandle();return gr.style.position="absolute",gr.style.contain="style",gr}gt.createHandle=rt;function lt(Lr){return Lr.reduce((gr,Mr)=>gr+Mr.size,0)/Lr.length||0}gt.averageSize=lt;function Tt(Lr){let gr=Lr.length;if(gr===0)return[];let Mr=Lr.reduce((Ur,wr)=>Ur+Math.abs(wr),0);return Mr===0?Lr.map(Ur=>1/gr):Lr.map(Ur=>Ur/Mr)}gt.normalize=Tt;function zt(Lr){Lr.parent&&Lr.parent.layout instanceof sd&&Lr.parent.fit()}})(nd||(nd={}));var Uy=class extends sd{constructor(ve){super({...ve,orientation:ve.orientation||"vertical"}),this._titles=[],this.titleSpace=ve.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(ve){ve=Zp.clampDimension(ve),this.widgetOffset!==ve&&(this.widgetOffset=ve,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(ve,rt){let lt=this._titles[ve],Tt=lt.classList.contains("lm-mod-expanded"),zt=km.createTitle(this.renderer,rt.title,Tt);this._titles[ve]=zt,this.parent.node.replaceChild(zt,lt)}insertWidget(ve,rt){rt.id||(rt.id=`id-${id.UUID.uuid4()}`),super.insertWidget(ve,rt)}attachWidget(ve,rt){let lt=km.createTitle(this.renderer,rt.title);Li.ArrayExt.insert(this._titles,ve,lt),this.parent.node.appendChild(lt),rt.node.setAttribute("role","region"),rt.node.setAttribute("aria-labelledby",lt.id),super.attachWidget(ve,rt)}moveWidget(ve,rt,lt){Li.ArrayExt.move(this._titles,ve,rt),super.moveWidget(ve,rt,lt)}detachWidget(ve,rt){let lt=Li.ArrayExt.removeAt(this._titles,ve);this.parent.node.removeChild(lt),super.detachWidget(ve,rt)}updateItemPosition(ve,rt,lt,Tt,zt,Lr,gr){let Mr=this._titles[ve].style;Mr.top=`${Tt}px`,Mr.left=`${lt}px`,Mr.height=`${this.widgetOffset}px`,rt?Mr.width=`${zt}px`:Mr.width=`${Lr}px`,super.updateItemPosition(ve,rt,lt,Tt,zt,Lr,gr)}},km;(function(gt){function ve(rt,lt,Tt=!0){let zt=rt.createSectionTitle(lt);return zt.style.position="absolute",zt.style.contain="strict",zt.setAttribute("aria-label",`${lt.label} Section`),zt.setAttribute("aria-expanded",Tt?"true":"false"),zt.setAttribute("aria-controls",lt.owner.id),Tt&&zt.classList.add("lm-mod-expanded"),zt}gt.createTitle=ve})(km||(km={}));var Cm=class extends to{constructor(ve={}){super(),this.addClass("lm-Panel"),this.layout=jy.createLayout(ve)}get widgets(){return this.layout.widgets}addWidget(ve){this.layout.addWidget(ve)}insertWidget(ve,rt){this.layout.insertWidget(ve,rt)}},jy;(function(gt){function ve(rt){return rt.layout||new ep}gt.createLayout=ve})(jy||(jy={}));var lv=class extends Cm{constructor(ve={}){super({layout:qy.createLayout(ve)}),this._handleMoved=new jl(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(ve){this.layout.orientation=ve}get alignment(){return this.layout.alignment}set alignment(ve){this.layout.alignment=ve}get spacing(){return this.layout.spacing}set spacing(ve){this.layout.spacing=ve}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(ve,rt=!0){this.layout.setRelativeSizes(ve,rt)}handleEvent(ve){switch(ve.type){case"pointerdown":this._evtPointerDown(ve);break;case"pointermove":this._evtPointerMove(ve);break;case"pointerup":this._evtPointerUp(ve);break;case"keydown":this._evtKeyDown(ve);break;case"contextmenu":ve.preventDefault(),ve.stopPropagation();break}}onBeforeAttach(ve){this.node.addEventListener("pointerdown",this)}onAfterDetach(ve){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(ve){ve.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(ve){ve.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(ve){this._pressData&&(ve.preventDefault(),ve.stopPropagation()),ve.keyCode===27&&this._releaseMouse()}_evtPointerDown(ve){if(ve.button!==0)return;let rt=this.layout,lt=Li.ArrayExt.findFirstIndex(rt.handles,Ur=>Ur.contains(ve.target));if(lt===-1)return;ve.preventDefault(),ve.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let Tt,zt=rt.handles[lt],Lr=zt.getBoundingClientRect();rt.orientation==="horizontal"?Tt=ve.clientX-Lr.left:Tt=ve.clientY-Lr.top;let gr=window.getComputedStyle(zt),Mr=Vf.overrideCursor(gr.cursor);this._pressData={index:lt,delta:Tt,override:Mr}}_evtPointerMove(ve){ve.preventDefault(),ve.stopPropagation();let rt,lt=this.layout,Tt=this.node.getBoundingClientRect();lt.orientation==="horizontal"?rt=ve.clientX-Tt.left-this._pressData.delta:rt=ve.clientY-Tt.top-this._pressData.delta,lt.moveHandle(this._pressData.index,rt)}_evtPointerUp(ve){ve.button===0&&(ve.preventDefault(),ve.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}};(function(gt){class ve{createHandle(){let zt=document.createElement("div");return zt.className="lm-SplitPanel-handle",zt}}gt.Renderer=ve,gt.defaultRenderer=new ve;function rt(Tt){return sd.getStretch(Tt)}gt.getStretch=rt;function lt(Tt,zt){sd.setStretch(Tt,zt)}gt.setStretch=lt})(lv||(lv={}));var qy;(function(gt){function ve(rt){return rt.layout||new sd({renderer:rt.renderer||lv.defaultRenderer,orientation:rt.orientation,alignment:rt.alignment,spacing:rt.spacing})}gt.createLayout=ve})(qy||(qy={}));var Kp=class extends lv{constructor(ve={}){super({...ve,layout:Vy.createLayout(ve)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new jl(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(ve){this.layout.titleSpace=ve}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(ve){super.addWidget(ve),ve.title.changed.connect(this._onTitleChanged,this)}collapse(ve){let rt=this.layout.widgets[ve];rt&&!rt.isHidden&&this._toggleExpansion(ve)}expand(ve){let rt=this.layout.widgets[ve];rt&&rt.isHidden&&this._toggleExpansion(ve)}insertWidget(ve,rt){super.insertWidget(ve,rt),rt.title.changed.connect(this._onTitleChanged,this)}handleEvent(ve){switch(super.handleEvent(ve),ve.type){case"click":this._evtClick(ve);break;case"keydown":this._eventKeyDown(ve);break}}onBeforeAttach(ve){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(ve)}onAfterDetach(ve){super.onAfterDetach(ve),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(ve){let rt=Li.ArrayExt.findFirstIndex(this.widgets,lt=>lt.contains(ve.owner));rt>=0&&(this.layout.updateTitle(rt,ve.owner),this.update())}_computeWidgetSize(ve){let rt=this.layout,lt=rt.widgets[ve];if(!lt)return;let Tt=lt.isHidden,zt=rt.absoluteSizes(),Lr=(Tt?-1:1)*this.spacing,gr=zt.reduce((Ur,wr)=>Ur+wr),Mr=[...zt];if(Tt){let Ur=this._widgetSizesCache.get(lt);if(!Ur)return;Mr[ve]+=Ur;let wr=Mr.map(Ir=>Ir-Ur>0).lastIndexOf(!0);wr===-1?Mr.forEach((Ir,Hr)=>{Hr!==ve&&(Mr[Hr]-=zt[Hr]/gr*(Ur-Lr))}):Mr[wr]-=Ur-Lr}else{let Ur=zt[ve];this._widgetSizesCache.set(lt,Ur),Mr[ve]=0;let wr=Mr.map(Ir=>Ir>0).lastIndexOf(!0);if(wr===-1)return;Mr[wr]=zt[wr]+Ur+Lr}return Mr.map(Ur=>Ur/(gr+Lr))}_evtClick(ve){let rt=ve.target;if(rt){let lt=Li.ArrayExt.findFirstIndex(this.titles,Tt=>Tt.contains(rt));lt>=0&&(ve.preventDefault(),ve.stopPropagation(),this._toggleExpansion(lt))}}_eventKeyDown(ve){if(ve.defaultPrevented)return;let rt=ve.target,lt=!1;if(rt){let Tt=Li.ArrayExt.findFirstIndex(this.titles,zt=>zt.contains(rt));if(Tt>=0){let zt=ve.keyCode.toString();if(ve.key.match(/Space|Enter/)||zt.match(/13|32/))rt.click(),lt=!0;else if(this.orientation==="horizontal"?ve.key.match(/ArrowLeft|ArrowRight/)||zt.match(/37|39/):ve.key.match(/ArrowUp|ArrowDown/)||zt.match(/38|40/)){let Lr=ve.key.match(/ArrowLeft|ArrowUp/)||zt.match(/37|38/)?-1:1,gr=this.titles.length,Mr=(Tt+gr+Lr)%gr;this.titles[Mr].focus(),lt=!0}else ve.key==="End"||zt==="35"?(this.titles[this.titles.length-1].focus(),lt=!0):(ve.key==="Home"||zt==="36")&&(this.titles[0].focus(),lt=!0)}lt&&ve.preventDefault()}}_toggleExpansion(ve){let rt=this.titles[ve],lt=this.layout.widgets[ve],Tt=this._computeWidgetSize(ve);Tt&&this.setRelativeSizes(Tt,!1),lt.isHidden?(rt.classList.add("lm-mod-expanded"),rt.setAttribute("aria-expanded","true"),lt.show()):(rt.classList.remove("lm-mod-expanded"),rt.setAttribute("aria-expanded","false"),lt.hide()),this._expansionToggled.emit(ve)}};(function(gt){class ve extends lv.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++ve._nInstance}createCollapseIcon(lt){return document.createElement("span")}createSectionTitle(lt){let Tt=document.createElement("h3");Tt.setAttribute("tabindex","0"),Tt.id=this.createTitleKey(lt),Tt.className=this.titleClassName;for(let gr in lt.dataset)Tt.dataset[gr]=lt.dataset[gr];let zt=Tt.appendChild(this.createCollapseIcon(lt));zt.className="lm-AccordionPanel-titleCollapser";let Lr=Tt.appendChild(document.createElement("span"));return Lr.className="lm-AccordionPanel-titleLabel",Lr.textContent=lt.label,Lr.title=lt.caption||lt.label,Tt}createTitleKey(lt){let Tt=this._titleKeys.get(lt);return Tt===void 0&&(Tt=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(lt,Tt)),Tt}}ve._nInstance=0,gt.Renderer=ve,gt.defaultRenderer=new ve})(Kp||(Kp={}));var Vy;(function(gt){function ve(rt){return rt.layout||new Uy({renderer:rt.renderer||Kp.defaultRenderer,orientation:rt.orientation,alignment:rt.alignment,spacing:rt.spacing,titleSpace:rt.titleSpace})}gt.createLayout=ve})(Vy||(Vy={}));var zh=class gt extends ep{constructor(ve={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",ve.direction!==void 0&&(this._direction=ve.direction),ve.alignment!==void 0&&(this._alignment=ve.alignment),ve.spacing!==void 0&&(this._spacing=Zp.clampDimension(ve.spacing))}dispose(){for(let ve of this._items)ve.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(ve){this._direction!==ve&&(this._direction=ve,this.parent&&(this.parent.dataset.direction=ve,this.parent.fit()))}get alignment(){return this._alignment}set alignment(ve){this._alignment!==ve&&(this._alignment=ve,this.parent&&(this.parent.dataset.alignment=ve,this.parent.update()))}get spacing(){return this._spacing}set spacing(ve){ve=Zp.clampDimension(ve),this._spacing!==ve&&(this._spacing=ve,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(ve,rt){Li.ArrayExt.insert(this._items,ve,new sv(rt)),Li.ArrayExt.insert(this._sizers,ve,new Bh),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.BeforeAttach),this.parent.node.appendChild(rt.node),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.AfterAttach),this.parent.fit()}moveWidget(ve,rt,lt){Li.ArrayExt.move(this._items,ve,rt),Li.ArrayExt.move(this._sizers,ve,rt),this.parent.update()}detachWidget(ve,rt){let lt=Li.ArrayExt.removeAt(this._items,ve);Li.ArrayExt.removeAt(this._sizers,ve),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.BeforeDetach),this.parent.node.removeChild(rt.node),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.AfterDetach),lt.dispose(),this.parent.fit()}onBeforeShow(ve){super.onBeforeShow(ve),this.parent.update()}onBeforeAttach(ve){super.onBeforeAttach(ve),this.parent.fit()}onChildShown(ve){this.parent.fit()}onChildHidden(ve){this.parent.fit()}onResize(ve){this.parent.isVisible&&this._update(ve.width,ve.height)}onUpdateRequest(ve){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(ve){this.parent.isAttached&&this._fit()}_fit(){let ve=0;for(let gr=0,Mr=this._items.length;gr0)switch(this._alignment){case"start":break;case"center":Ur=0,wr=Mr/2;break;case"end":Ur=0,wr=Mr;break;case"justify":Ur=Mr/lt,wr=0;break;default:throw"unreachable"}for(let Ir=0,Hr=this._items.length;Ir0,coerce:(Tt,zt)=>Math.max(0,Math.floor(zt)),changed:lt}),gt.sizeBasisProperty=new qf({name:"sizeBasis",create:()=>0,coerce:(Tt,zt)=>Math.max(0,Math.floor(zt)),changed:lt});function ve(Tt){return Tt==="left-to-right"||Tt==="right-to-left"}gt.isHorizontal=ve;function rt(Tt){return Math.max(0,Math.floor(Tt))}gt.clampSpacing=rt;function lt(Tt){Tt.parent&&Tt.parent.layout instanceof zh&&Tt.parent.fit()}})(iv||(iv={}));var Lm=class extends Cm{constructor(ve={}){super({layout:Hy.createLayout(ve)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(ve){this.layout.direction=ve}get alignment(){return this.layout.alignment}set alignment(ve){this.layout.alignment=ve}get spacing(){return this.layout.spacing}set spacing(ve){this.layout.spacing=ve}onChildAdded(ve){ve.child.addClass("lm-BoxPanel-child")}onChildRemoved(ve){ve.child.removeClass("lm-BoxPanel-child")}};(function(gt){function ve(zt){return zh.getStretch(zt)}gt.getStretch=ve;function rt(zt,Lr){zh.setStretch(zt,Lr)}gt.setStretch=rt;function lt(zt){return zh.getSizeBasis(zt)}gt.getSizeBasis=lt;function Tt(zt,Lr){zh.setSizeBasis(zt,Lr)}gt.setSizeBasis=Tt})(Lm||(Lm={}));var Hy;(function(gt){function ve(rt){return rt.layout||new zh(rt)}gt.createLayout=ve})(Hy||(Hy={}));var Pm=class gt extends to{constructor(ve){super({node:ad.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(to.Flag.DisallowLayout),this.commands=ve.commands,this.renderer=ve.renderer||gt.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(ve){let rt=ad.createItem(this.commands,ve);return this._items.push(rt),this.refresh(),rt}addItems(ve){let rt=ve.map(lt=>ad.createItem(this.commands,lt));return rt.forEach(lt=>this._items.push(lt)),this.refresh(),rt}removeItem(ve){this.removeItemAt(this._items.indexOf(ve))}removeItemAt(ve){Li.ArrayExt.removeAt(this._items,ve)&&this.refresh()}clearItems(){this._items.length!==0&&(this._items.length=0,this.refresh())}refresh(){if(this._results=null,this.inputNode.value!==""){let ve=this.node.getElementsByClassName("lm-close-icon")[0];ve.style.display="inherit"}else{let ve=this.node.getElementsByClassName("lm-close-icon")[0];ve.style.display="none"}this.update()}handleEvent(ve){switch(ve.type){case"click":this._evtClick(ve);break;case"keydown":this._evtKeyDown(ve);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused();break}}onBeforeAttach(ve){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(ve){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(ve){this.update(),super.onAfterShow(ve)}onActivateRequest(ve){if(this.isAttached){let rt=this.inputNode;rt.focus(),rt.select()}}onUpdateRequest(ve){if(this.isHidden)return;let rt=this.inputNode.value,lt=this.contentNode,Tt=this._results;if(Tt||(Tt=this._results=ad.search(this._items,rt),this._activeIndex=rt?Li.ArrayExt.findFirstIndex(Tt,ad.canActivate):-1),!rt&&Tt.length===0){rd.render(null,lt);return}if(rt&&Tt.length===0){let Mr=this.renderer.renderEmptyMessage({query:rt});rd.render(Mr,lt);return}let zt=this.renderer,Lr=this._activeIndex,gr=new Array(Tt.length);for(let Mr=0,Ur=Tt.length;Mr=Tt.length)lt.scrollTop=0;else{let Mr=lt.children[Lr];Zl.scrollIntoViewIfNeeded(lt,Mr)}}_evtClick(ve){if(ve.button!==0)return;if(ve.target.classList.contains("lm-close-icon")){this.inputNode.value="",this.refresh();return}let rt=Li.ArrayExt.findFirstIndex(this.contentNode.children,lt=>lt.contains(ve.target));rt!==-1&&(ve.preventDefault(),ve.stopPropagation(),this._execute(rt))}_evtKeyDown(ve){if(!(ve.altKey||ve.ctrlKey||ve.metaKey||ve.shiftKey))switch(ve.keyCode){case 13:ve.preventDefault(),ve.stopPropagation(),this._execute(this._activeIndex);break;case 38:ve.preventDefault(),ve.stopPropagation(),this._activatePreviousItem();break;case 40:ve.preventDefault(),ve.stopPropagation(),this._activateNextItem();break}}_activateNextItem(){if(!this._results||this._results.length===0)return;let ve=this._activeIndex,rt=this._results.length,lt=veii-Ni),Pn=Ka.slice(0,Ja),Na=Ka.slice(Ja);for(let ii=0,Ni=Na.length;iiPr.command===Rr&&id.JSONExt.deepEqual(Pr.args,Br))||null}}})(ad||(ad={}));var ov=class gt extends to{constructor(ve){super({node:Hf.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new jl(this),this._menuRequested=new jl(this),this.addClass("lm-Menu"),this.setFlag(to.Flag.DisallowLayout),this.commands=ve.commands,this.renderer=ve.renderer||gt.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let ve=this;for(;ve._parentMenu;)ve=ve._parentMenu;return ve}get leafMenu(){let ve=this;for(;ve._childMenu;)ve=ve._childMenu;return ve}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(ve){this.activeIndex=ve?this._items.indexOf(ve):-1}get activeIndex(){return this._activeIndex}set activeIndex(ve){(ve<0||ve>=this._items.length)&&(ve=-1),ve!==-1&&!Hf.canActivate(this._items[ve])&&(ve=-1),this._activeIndex!==ve&&(this._activeIndex=ve,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let ve=this._items.length,rt=this._activeIndex,lt=rt{this.activeIndex=gr}})}rd.render(Lr,this.contentNode)}onCloseRequest(ve){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let rt=this._childMenu;rt&&(this._childIndex=-1,this._childMenu=null,rt._parentMenu=null,rt.close());let lt=this._parentMenu;lt&&(this._parentMenu=null,lt._childIndex=-1,lt._childMenu=null,lt.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(ve)}_evtKeyDown(ve){ve.preventDefault(),ve.stopPropagation();let rt=ve.keyCode;if(rt===13){this.triggerActiveItem();return}if(rt===27){this.close();return}if(rt===37){this._parentMenu?this.close():this._menuRequested.emit("previous");return}if(rt===38){this.activatePreviousItem();return}if(rt===39){let Lr=this.activeItem;Lr&&Lr.type==="submenu"?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next");return}if(rt===40){this.activateNextItem();return}let lt=Zv().keyForKeydownEvent(ve);if(!lt)return;let Tt=this._activeIndex+1,zt=Hf.findMnemonic(this._items,lt,Tt);zt.index!==-1&&!zt.multiple?(this.activeIndex=zt.index,this.triggerActiveItem()):zt.index!==-1?this.activeIndex=zt.index:zt.auto!==-1&&(this.activeIndex=zt.auto)}_evtMouseUp(ve){ve.button===0&&(ve.preventDefault(),ve.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(ve){let rt=Li.ArrayExt.findFirstIndex(this.contentNode.children,Tt=>Zl.hitTest(Tt,ve.clientX,ve.clientY));if(rt===this._activeIndex)return;if(this.activeIndex=rt,rt=this.activeIndex,rt===this._childIndex){this._cancelOpenTimer(),this._cancelCloseTimer();return}this._childIndex!==-1&&this._startCloseTimer(),this._cancelOpenTimer();let lt=this.activeItem;!lt||lt.type!=="submenu"||!lt.submenu||this._startOpenTimer()}_evtMouseEnter(ve){for(let rt=this._parentMenu;rt;rt=rt._parentMenu)rt._cancelOpenTimer(),rt._cancelCloseTimer(),rt.activeIndex=rt._childIndex}_evtMouseLeave(ve){if(this._cancelOpenTimer(),!this._childMenu){this.activeIndex=-1;return}let{clientX:rt,clientY:lt}=ve;if(Zl.hitTest(this._childMenu.node,rt,lt)){this._cancelCloseTimer();return}this.activeIndex=-1,this._startCloseTimer()}_evtMouseDown(ve){this._parentMenu||(Hf.hitTestMenus(this,ve.clientX,ve.clientY)?(ve.preventDefault(),ve.stopPropagation()):this.close())}_openChildMenu(ve=!1){let rt=this.activeItem;if(!rt||rt.type!=="submenu"||!rt.submenu){this._closeChildMenu();return}let lt=rt.submenu;if(lt===this._childMenu)return;gt.saveWindowData(),this._closeChildMenu(),this._childMenu=lt,this._childIndex=this._activeIndex,lt._parentMenu=this,Gi.sendMessage(this,to.Msg.UpdateRequest);let Tt=this.contentNode.children[this._activeIndex];Hf.openSubmenu(lt,Tt),ve&&(lt.activeIndex=-1,lt.activateNextItem()),lt.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){this._openTimerID===0&&(this._openTimerID=window.setTimeout(()=>{this._openTimerID=0,this._openChildMenu()},Hf.TIMER_DELAY))}_startCloseTimer(){this._closeTimerID===0&&(this._closeTimerID=window.setTimeout(()=>{this._closeTimerID=0,this._closeChildMenu()},Hf.TIMER_DELAY))}_cancelOpenTimer(){this._openTimerID!==0&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){this._closeTimerID!==0&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){Hf.saveWindowData()}};(function(gt){class ve{renderItem(lt){let Tt=this.createItemClass(lt),zt=this.createItemDataset(lt),Lr=this.createItemARIA(lt);return ql.li({className:Tt,dataset:zt,tabindex:"0",onfocus:lt.onfocus,...Lr},this.renderIcon(lt),this.renderLabel(lt),this.renderShortcut(lt),this.renderSubmenu(lt))}renderIcon(lt){let Tt=this.createIconClass(lt);return ql.div({className:Tt},lt.item.icon,lt.item.iconLabel)}renderLabel(lt){let Tt=this.formatLabel(lt);return ql.div({className:"lm-Menu-itemLabel"},Tt)}renderShortcut(lt){let Tt=this.formatShortcut(lt);return ql.div({className:"lm-Menu-itemShortcut"},Tt)}renderSubmenu(lt){return ql.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(lt){let Tt="lm-Menu-item";lt.item.isEnabled||(Tt+=" lm-mod-disabled"),lt.item.isToggled&&(Tt+=" lm-mod-toggled"),lt.item.isVisible||(Tt+=" lm-mod-hidden"),lt.active&&(Tt+=" lm-mod-active"),lt.collapsed&&(Tt+=" lm-mod-collapsed");let zt=lt.item.className;return zt&&(Tt+=` ${zt}`),Tt}createItemDataset(lt){let Tt,{type:zt,command:Lr,dataset:gr}=lt.item;return zt==="command"?Tt={...gr,type:zt,command:Lr}:Tt={...gr,type:zt},Tt}createIconClass(lt){let Tt="lm-Menu-itemIcon",zt=lt.item.iconClass;return zt?`${Tt} ${zt}`:Tt}createItemARIA(lt){let Tt={};switch(lt.item.type){case"separator":Tt.role="presentation";break;case"submenu":Tt["aria-haspopup"]="true",lt.item.isEnabled||(Tt["aria-disabled"]="true");break;default:lt.item.isEnabled||(Tt["aria-disabled"]="true"),Tt.role="menuitem"}return Tt}formatLabel(lt){let{label:Tt,mnemonic:zt}=lt.item;if(zt<0||zt>=Tt.length)return Tt;let Lr=Tt.slice(0,zt),gr=Tt.slice(zt+1),Mr=Tt[zt],Ur=ql.span({className:"lm-Menu-itemMnemonic"},Mr);return[Lr,Ur,gr]}formatShortcut(lt){let Tt=lt.item.keyBinding;return Tt?td.formatKeystroke(Tt.keys):null}}gt.Renderer=ve,gt.defaultRenderer=new ve})(ov||(ov={}));var Hf;(function(gt){gt.TIMER_DELAY=300,gt.SUBMENU_OVERLAP=3;let ve=null,rt=0;function lt(){return rt>0?(rt--,ve):wr()}function Tt(){ve=wr(),rt++}gt.saveWindowData=Tt;function zt(){let Pr=document.createElement("div"),xe=document.createElement("ul");return xe.className="lm-Menu-content",Pr.appendChild(xe),xe.setAttribute("role","menu"),Pr.tabIndex=0,Pr}gt.createNode=zt;function Lr(Pr){return Pr.type!=="separator"&&Pr.isEnabled&&Pr.isVisible}gt.canActivate=Lr;function gr(Pr,xe){return new Br(Pr.commands,xe)}gt.createItem=gr;function Mr(Pr,xe,Xa){for(let Ka=Pr;Ka;Ka=Ka.childMenu)if(Zl.hitTest(Ka.node,xe,Xa))return!0;return!1}gt.hitTestMenus=Mr;function Ur(Pr){let xe=new Array(Pr.length);Li.ArrayExt.fill(xe,!1);let Xa=0,Ka=Pr.length;for(;Xa=0;--da){let Ja=Pr[da];if(Ja.isVisible){if(Ja.type!=="separator")break;xe[da]=!0}}let Ta=!1;for(;++XaNa+Ni&&(xe=Na+Ni-ys),!da&&Xa+Us>ii+An&&(Xa>ii+An?Xa=ii+An-Us:Xa=Xa-Us),Gn.transform=`translate(${Math.max(0,xe)}px, ${Math.max(0,Xa)}px`,Gn.opacity="1"}gt.openRootMenu=Ir;function Hr(Pr,xe){let Xa=lt(),Ka=Xa.pageXOffset,da=Xa.pageYOffset,Ta=Xa.clientWidth,Ja=Xa.clientHeight;Gi.sendMessage(Pr,to.Msg.UpdateRequest);let Pn=Ja,Na=Pr.node,ii=Na.style;ii.opacity="0",ii.maxHeight=`${Pn}px`,to.attach(Pr,document.body);let{width:Ni,height:An}=Na.getBoundingClientRect(),yi=Zl.boxSizing(Pr.node),yn=xe.getBoundingClientRect(),Gn=yn.right-gt.SUBMENU_OVERLAP;Gn+Ni>Ka+Ta&&(Gn=yn.left+gt.SUBMENU_OVERLAP-Ni);let ys=yn.top-yi.borderTop-yi.paddingTop;ys+An>da+Ja&&(ys=yn.bottom+yi.borderBottom+yi.paddingBottom-An),ii.transform=`translate(${Math.max(0,Gn)}px, ${Math.max(0,ys)}px`,ii.opacity="1"}gt.openSubmenu=Hr;function Rr(Pr,xe,Xa){let Ka=-1,da=-1,Ta=!1,Ja=xe.toUpperCase();for(let Pn=0,Na=Pr.length;Pn=0&&yiKa.command===xe&&id.JSONExt.deepEqual(Ka.args,Xa))||null}return null}}})(Hf||(Hf={}));var Y5;(function(gt){function ve(Lr,gr){let Mr=lt(Lr.selector),Ur=Lr.rank!==void 0?Lr.rank:1/0;return{...Lr,selector:Mr,rank:Ur,id:gr}}gt.createItem=ve;function rt(Lr,gr,Mr,Ur){let wr=gr.target;if(!wr)return null;let Ir=gr.currentTarget;if(!Ir||!Ir.contains(wr)&&(wr=document.elementFromPoint(gr.clientX,gr.clientY),!wr||!Ir.contains(wr)))return null;let Hr=[],Rr=Lr.slice();for(;wr!==null;){let Br=[];for(let Pr=0,xe=Rr.length;Pr=this._titles.length)&&(ve=-1),this._currentIndex===ve)return;let rt=this._currentIndex,lt=this._titles[rt]||null,Tt=ve,zt=this._titles[Tt]||null;this._currentIndex=Tt,this._previousTitle=lt,this.update(),this._currentChanged.emit({previousIndex:rt,previousTitle:lt,currentIndex:Tt,currentTitle:zt})}get name(){return this._name}set name(ve){this._name=ve,ve?this.contentNode.setAttribute("aria-label",ve):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(ve){this._orientation!==ve&&(this._releaseMouse(),this._orientation=ve,this.dataset.orientation=ve,this.contentNode.setAttribute("aria-orientation",ve))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(ve){this._addButtonEnabled!==ve&&(this._addButtonEnabled=ve,ve?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(ve){return this.insertTab(this._titles.length,ve)}insertTab(ve,rt){this._releaseMouse();let lt=ch.asTitle(rt),Tt=this._titles.indexOf(lt),zt=Math.max(0,Math.min(ve,this._titles.length));return Tt===-1?(Li.ArrayExt.insert(this._titles,zt,lt),lt.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(zt,lt),lt):(zt===this._titles.length&&zt--,Tt===zt||(Li.ArrayExt.move(this._titles,Tt,zt),this.update(),this._adjustCurrentForMove(Tt,zt)),lt)}removeTab(ve){this.removeTabAt(this._titles.indexOf(ve))}removeTabAt(ve){this._releaseMouse();let rt=Li.ArrayExt.removeAt(this._titles,ve);rt&&(rt.changed.disconnect(this._onTitleChanged,this),rt===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(ve,rt))}clearTabs(){if(this._titles.length===0)return;this._releaseMouse();for(let lt of this._titles)lt.changed.disconnect(this._onTitleChanged,this);let ve=this.currentIndex,rt=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),ve!==-1&&this._currentChanged.emit({previousIndex:ve,previousTitle:rt,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(ve){switch(ve.type){case"pointerdown":this._evtPointerDown(ve);break;case"pointermove":this._evtPointerMove(ve);break;case"pointerup":this._evtPointerUp(ve);break;case"dblclick":this._evtDblClick(ve);break;case"keydown":ve.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(ve):this._evtKeyDown(ve);break;case"contextmenu":ve.preventDefault(),ve.stopPropagation();break}}onBeforeAttach(ve){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(ve){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(ve){var rt;let lt=this._titles,Tt=this.renderer,zt=this.currentTitle,Lr=new Array(lt.length),gr=(rt=this._getCurrentTabindex())!==null&&rt!==void 0?rt:this._currentIndex>-1?this._currentIndex:0;for(let Mr=0,Ur=lt.length;MrZl.hitTest(Lr,ve.clientX,ve.clientY));if(lt===-1)return;let Tt=this.titles[lt],zt=rt[lt].querySelector(".lm-TabBar-tabLabel");if(zt&&zt.contains(ve.target)){let Lr=Tt.label||"",gr=zt.innerHTML;zt.innerHTML="";let Mr=document.createElement("input");Mr.classList.add("lm-TabBar-tabInput"),Mr.value=Lr,zt.appendChild(Mr);let Ur=()=>{Mr.removeEventListener("blur",Ur),zt.innerHTML=gr,this.node.addEventListener("keydown",this)};Mr.addEventListener("dblclick",wr=>wr.stopPropagation()),Mr.addEventListener("blur",Ur),Mr.addEventListener("keydown",wr=>{wr.key==="Enter"?(Mr.value!==""&&(Tt.label=Tt.caption=Mr.value),Ur()):wr.key==="Escape"&&Ur()}),this.node.removeEventListener("keydown",this),Mr.select(),Mr.focus(),zt.children.length>0&&zt.children[0].focus()}}_evtKeyDownCapturing(ve){ve.eventPhase===Event.CAPTURING_PHASE&&(ve.preventDefault(),ve.stopPropagation(),ve.key==="Escape"&&this._releaseMouse())}_evtKeyDown(ve){var rt,lt,Tt;if(!(ve.key==="Tab"||ve.eventPhase===Event.CAPTURING_PHASE)){if(ve.key==="Enter"||ve.key==="Spacebar"||ve.key===" "){let zt=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(zt))ve.preventDefault(),ve.stopPropagation(),this._addRequested.emit();else{let Lr=Li.ArrayExt.findFirstIndex(this.contentNode.children,gr=>gr.contains(zt));Lr>=0&&(ve.preventDefault(),ve.stopPropagation(),this.currentIndex=Lr)}}else if(LI.includes(ve.key)){let zt=[...this.contentNode.children];if(this.addButtonEnabled&&zt.push(this.addButtonNode),zt.length<=1)return;ve.preventDefault(),ve.stopPropagation();let Lr=zt.indexOf(document.activeElement);Lr===-1&&(Lr=this._currentIndex);let gr;ve.key==="ArrowRight"&&this._orientation==="horizontal"||ve.key==="ArrowDown"&&this._orientation==="vertical"?gr=(rt=zt[Lr+1])!==null&&rt!==void 0?rt:zt[0]:ve.key==="ArrowLeft"&&this._orientation==="horizontal"||ve.key==="ArrowUp"&&this._orientation==="vertical"?gr=(lt=zt[Lr-1])!==null&<!==void 0?lt:zt[zt.length-1]:ve.key==="Home"?gr=zt[0]:ve.key==="End"&&(gr=zt[zt.length-1]),gr&&((Tt=zt[Lr])===null||Tt===void 0||Tt.setAttribute("tabindex","-1"),gr?.setAttribute("tabindex","0"),gr.focus())}}}_evtPointerDown(ve){if(ve.button!==0&&ve.button!==1||this._dragData||ve.target.classList.contains("lm-TabBar-tabInput"))return;let rt=this.addButtonEnabled&&this.addButtonNode.contains(ve.target),lt=this.contentNode.children,Tt=Li.ArrayExt.findFirstIndex(lt,Lr=>Zl.hitTest(Lr,ve.clientX,ve.clientY));if(Tt===-1&&!rt||(ve.preventDefault(),ve.stopPropagation(),this._dragData={tab:lt[Tt],index:Tt,pressX:ve.clientX,pressY:ve.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),ve.button===1||rt))return;let zt=lt[Tt].querySelector(this.renderer.closeIconSelector);zt&&zt.contains(ve.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===Tt?this.currentIndex=-1:this.currentIndex=Tt,this.currentIndex!==-1&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(ve){let rt=this._dragData;if(!rt)return;ve.preventDefault(),ve.stopPropagation();let lt=this.contentNode.children;if(!(!rt.dragActive&&!ch.dragExceeded(rt,ve))){if(!rt.dragActive){let Tt=rt.tab.getBoundingClientRect();this._orientation==="horizontal"?(rt.tabPos=rt.tab.offsetLeft,rt.tabSize=Tt.width,rt.tabPressPos=rt.pressX-Tt.left):(rt.tabPos=rt.tab.offsetTop,rt.tabSize=Tt.height,rt.tabPressPos=rt.pressY-Tt.top),rt.tabPressOffset={x:rt.pressX-Tt.left,y:rt.pressY-Tt.top},rt.tabLayout=ch.snapTabLayout(lt,this._orientation),rt.contentRect=this.contentNode.getBoundingClientRect(),rt.override=Vf.overrideCursor("default"),rt.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),rt.dragActive=!0}if(!rt.detachRequested&&ch.detachExceeded(rt,ve)){rt.detachRequested=!0;let Tt=rt.index,zt=ve.clientX,Lr=ve.clientY,gr=lt[Tt],Mr=this._titles[Tt];if(this._tabDetachRequested.emit({index:Tt,title:Mr,tab:gr,clientX:zt,clientY:Lr,offset:rt.tabPressOffset}),rt.dragAborted)return}ch.layoutTabs(lt,rt,ve,this._orientation)}}_evtPointerUp(ve){if(ve.button!==0&&ve.button!==1)return;let rt=this._dragData;if(!rt)return;if(ve.preventDefault(),ve.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!rt.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(ve.target)){this._addRequested.emit(void 0);return}let zt=this.contentNode.children,Lr=Li.ArrayExt.findFirstIndex(zt,Ur=>Zl.hitTest(Ur,ve.clientX,ve.clientY));if(Lr!==rt.index)return;let gr=this._titles[Lr];if(!gr.closable)return;if(ve.button===1){this._tabCloseRequested.emit({index:Lr,title:gr});return}let Mr=zt[Lr].querySelector(this.renderer.closeIconSelector);if(Mr&&Mr.contains(ve.target)){this._tabCloseRequested.emit({index:Lr,title:gr});return}return}if(ve.button!==0)return;ch.finalizeTabPosition(rt,this._orientation),rt.tab.classList.remove("lm-mod-dragging");let lt=ch.parseTransitionDuration(rt.tab);setTimeout(()=>{if(rt.dragAborted)return;this._dragData=null,ch.resetTabPositions(this.contentNode.children,this._orientation),rt.override.dispose(),this.removeClass("lm-mod-dragging");let Tt=rt.index,zt=rt.targetIndex;zt===-1||Tt===zt||(Li.ArrayExt.move(this._titles,Tt,zt),this._adjustCurrentForMove(Tt,zt),this._tabMoved.emit({fromIndex:Tt,toIndex:zt,title:this._titles[zt]}),Gi.sendMessage(this,to.Msg.UpdateRequest))},lt)}_releaseMouse(){let ve=this._dragData;ve&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),ve.dragAborted=!0,ve.dragActive&&(ch.resetTabPositions(this.contentNode.children,this._orientation),ve.override.dispose(),ve.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(ve,rt){let lt=this.currentTitle,Tt=this._currentIndex,zt=this.insertBehavior;if(zt==="select-tab"||zt==="select-tab-if-needed"&&Tt===-1){this._currentIndex=ve,this._previousTitle=lt,this._currentChanged.emit({previousIndex:Tt,previousTitle:lt,currentIndex:ve,currentTitle:rt});return}Tt>=ve&&this._currentIndex++}_adjustCurrentForMove(ve,rt){this._currentIndex===ve?this._currentIndex=rt:this._currentIndex=rt?this._currentIndex++:this._currentIndex>ve&&this._currentIndex<=rt&&this._currentIndex--}_adjustCurrentForRemove(ve,rt){let lt=this._currentIndex,Tt=this.removeBehavior;if(lt!==ve){lt>ve&&this._currentIndex--;return}if(this._titles.length===0){this._currentIndex=-1,this._currentChanged.emit({previousIndex:ve,previousTitle:rt,currentIndex:-1,currentTitle:null});return}if(Tt==="select-tab-after"){this._currentIndex=Math.min(ve,this._titles.length-1),this._currentChanged.emit({previousIndex:ve,previousTitle:rt,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if(Tt==="select-tab-before"){this._currentIndex=Math.max(0,ve-1),this._currentChanged.emit({previousIndex:ve,previousTitle:rt,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if(Tt==="select-previous-tab"){this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(ve,this._titles.length-1),this._currentChanged.emit({previousIndex:ve,previousTitle:rt,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}this._currentIndex=-1,this._currentChanged.emit({previousIndex:ve,previousTitle:rt,currentIndex:-1,currentTitle:null})}_onTitleChanged(ve){this.update()}};(function(gt){class ve{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++ve._nInstance}renderTab(lt){let Tt=lt.title.caption,zt=this.createTabKey(lt),Lr=zt,gr=this.createTabStyle(lt),Mr=this.createTabClass(lt),Ur=this.createTabDataset(lt),wr=this.createTabARIA(lt);return lt.title.closable?ql.li({id:Lr,key:zt,className:Mr,title:Tt,style:gr,dataset:Ur,...wr},this.renderIcon(lt),this.renderLabel(lt),this.renderCloseIcon(lt)):ql.li({id:Lr,key:zt,className:Mr,title:Tt,style:gr,dataset:Ur,...wr},this.renderIcon(lt),this.renderLabel(lt))}renderIcon(lt){let{title:Tt}=lt,zt=this.createIconClass(lt);return ql.div({className:zt},Tt.icon,Tt.iconLabel)}renderLabel(lt){return ql.div({className:"lm-TabBar-tabLabel"},lt.title.label)}renderCloseIcon(lt){return ql.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(lt){let Tt=this._tabKeys.get(lt.title);return Tt===void 0&&(Tt=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(lt.title,Tt)),Tt}createTabStyle(lt){return{zIndex:`${lt.zIndex}`}}createTabClass(lt){let Tt="lm-TabBar-tab";return lt.title.className&&(Tt+=` ${lt.title.className}`),lt.title.closable&&(Tt+=" lm-mod-closable"),lt.current&&(Tt+=" lm-mod-current"),Tt}createTabDataset(lt){return lt.title.dataset}createTabARIA(lt){var Tt;return{role:"tab","aria-selected":lt.current.toString(),tabindex:`${(Tt=lt.tabIndex)!==null&&Tt!==void 0?Tt:"-1"}`}}createIconClass(lt){let Tt="lm-TabBar-tabIcon",zt=lt.title.iconClass;return zt?`${Tt} ${zt}`:Tt}}ve._nInstance=0,gt.Renderer=ve,gt.defaultRenderer=new ve,gt.addButtonSelector=".lm-TabBar-addButton"})(tp||(tp={}));var ch;(function(gt){gt.DRAG_THRESHOLD=5,gt.DETACH_THRESHOLD=20;function ve(){let wr=document.createElement("div"),Ir=document.createElement("ul");Ir.setAttribute("role","tablist"),Ir.className="lm-TabBar-content",wr.appendChild(Ir);let Hr=document.createElement("div");return Hr.className="lm-TabBar-addButton lm-mod-hidden",Hr.setAttribute("tabindex","-1"),Hr.setAttribute("role","button"),wr.appendChild(Hr),wr}gt.createNode=ve;function rt(wr){return wr instanceof Xp?wr:new Xp(wr)}gt.asTitle=rt;function lt(wr){let Ir=window.getComputedStyle(wr);return 1e3*(parseFloat(Ir.transitionDuration)||0)}gt.parseTransitionDuration=lt;function Tt(wr,Ir){let Hr=new Array(wr.length);for(let Rr=0,Br=wr.length;Rr=gt.DRAG_THRESHOLD||Rr>=gt.DRAG_THRESHOLD}gt.dragExceeded=zt;function Lr(wr,Ir){let Hr=wr.contentRect;return Ir.clientX=Hr.right+gt.DETACH_THRESHOLD||Ir.clientY=Hr.bottom+gt.DETACH_THRESHOLD}gt.detachExceeded=Lr;function gr(wr,Ir,Hr,Rr){let Br,Pr,xe,Xa;Rr==="horizontal"?(Br=Ir.pressX,Pr=Hr.clientX-Ir.contentRect.left,xe=Hr.clientX,Xa=Ir.contentRect.width):(Br=Ir.pressY,Pr=Hr.clientY-Ir.contentRect.top,xe=Hr.clientY,Xa=Ir.contentRect.height);let Ka=Ir.index,da=Pr-Ir.tabPressPos,Ta=da+Ir.tabSize;for(let Ja=0,Pn=wr.length;Ja>1);if(JaIr.index&&Ta>Ni)Na=`${-Ir.tabSize-ii.margin}px`,Ka=Math.max(Ka,Ja);else if(Ja===Ir.index){let An=xe-Br,yi=Xa-(Ir.tabPos+Ir.tabSize);Na=`${Math.max(-Ir.tabPos,Math.min(An,yi))}px`}else Na="";Rr==="horizontal"?wr[Ja].style.left=Na:wr[Ja].style.top=Na}Ir.targetIndex=Ka}gt.layoutTabs=gr;function Mr(wr,Ir){let Hr;Ir==="horizontal"?Hr=wr.contentRect.width:Hr=wr.contentRect.height;let Rr;if(wr.targetIndex===wr.index)Rr=0;else if(wr.targetIndex>wr.index){let xe=wr.tabLayout[wr.targetIndex];Rr=xe.pos+xe.size-wr.tabSize-wr.tabPos}else Rr=wr.tabLayout[wr.targetIndex].pos-wr.tabPos;let Br=Hr-(wr.tabPos+wr.tabSize),Pr=Math.max(-wr.tabPos,Math.min(Rr,Br));Ir==="horizontal"?wr.tab.style.left=`${Pr}px`:wr.tab.style.top=`${Pr}px`}gt.finalizeTabPosition=Mr;function Ur(wr,Ir){for(let Hr of wr)Ir==="horizontal"?Hr.style.left="":Hr.style.top=""}gt.resetTabPositions=Ur})(ch||(ch={}));var Gy=class extends od{constructor(ve){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=ve.renderer,ve.spacing!==void 0&&(this._spacing=Zp.clampDimension(ve.spacing)),this._document=ve.document||document,this._hiddenMode=ve.hiddenMode!==void 0?ve.hiddenMode:to.HiddenMode.Display}dispose(){let ve=this[Symbol.iterator]();this._items.forEach(rt=>{rt.dispose()}),this._box=null,this._root=null,this._items.clear();for(let rt of ve)rt.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(ve){if(this._hiddenMode!==ve){this._hiddenMode=ve;for(let rt of this.tabBars())if(rt.titles.length>1)for(let lt of rt.titles)lt.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(ve){ve=Zp.clampDimension(ve),this._spacing!==ve&&(this._spacing=ve,this.parent&&this.parent.fit())}get isEmpty(){return this._root===null}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,Li.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,Li.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,Li.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,Li.empty)()}handles(){return this._root?this._root.iterHandles():(0,Li.empty)()}moveHandle(ve,rt,lt){let Tt=ve.classList.contains("lm-mod-hidden");if(!this._root||Tt)return;let zt=this._root.findSplitNode(ve);if(!zt)return;let Lr;zt.node.orientation==="horizontal"?Lr=rt-ve.offsetLeft:Lr=lt-ve.offsetTop,Lr!==0&&(zt.node.holdSizes(),ah.adjust(zt.node.sizers,zt.index,Lr),this.parent&&this.parent.update())}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(ve){let rt=new Set,lt;ve.main?lt=gc.normalizeAreaConfig(ve.main,rt):lt=null;let Tt=this.widgets(),zt=this.tabBars(),Lr=this.handles();this._root=null;for(let gr of Tt)rt.has(gr)||(gr.parent=null);for(let gr of zt)gr.dispose();for(let gr of Lr)gr.parentNode&&gr.parentNode.removeChild(gr);for(let gr of rt)gr.parent=this.parent;lt?this._root=gc.realizeAreaConfig(lt,{createTabBar:gr=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):this._root=null,this.parent&&(rt.forEach(gr=>{this.attachWidget(gr)}),this.parent.fit())}addWidget(ve,rt={}){let lt=rt.ref||null,Tt=rt.mode||"tab-after",zt=null;if(this._root&<&&(zt=this._root.findTabNode(lt)),lt&&!zt)throw new Error("Reference widget is not in the layout.");switch(ve.parent=this.parent,Tt){case"tab-after":this._insertTab(ve,lt,zt,!0);break;case"tab-before":this._insertTab(ve,lt,zt,!1);break;case"split-top":this._insertSplit(ve,lt,zt,"vertical",!1);break;case"split-left":this._insertSplit(ve,lt,zt,"horizontal",!1);break;case"split-right":this._insertSplit(ve,lt,zt,"horizontal",!0);break;case"split-bottom":this._insertSplit(ve,lt,zt,"vertical",!0);break;case"merge-top":this._insertSplit(ve,lt,zt,"vertical",!1,!0);break;case"merge-left":this._insertSplit(ve,lt,zt,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(ve,lt,zt,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(ve,lt,zt,"vertical",!0,!0);break}this.parent&&(this.attachWidget(ve),this.parent.fit())}removeWidget(ve){this._removeWidget(ve),this.parent&&(this.detachWidget(ve),this.parent.fit())}hitTestTabAreas(ve,rt){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=Zl.boxSizing(this.parent.node));let lt=this.parent.node.getBoundingClientRect(),Tt=ve-lt.left-this._box.borderLeft,zt=rt-lt.top-this._box.borderTop,Lr=this._root.hitTestTabNodes(Tt,zt);if(!Lr)return null;let{tabBar:gr,top:Mr,left:Ur,width:wr,height:Ir}=Lr,Hr=this._box.borderLeft+this._box.borderRight,Rr=this._box.borderTop+this._box.borderBottom,Br=lt.width-Hr-(Ur+wr),Pr=lt.height-Rr-(Mr+Ir);return{tabBar:gr,x:Tt,y:zt,top:Mr,left:Ur,right:Br,bottom:Pr,width:wr,height:Ir}}init(){super.init();for(let ve of this)this.attachWidget(ve);for(let ve of this.handles())this.parent.node.appendChild(ve);this.parent.fit()}attachWidget(ve){this.parent.node!==ve.node.parentNode&&(this._items.set(ve,new sv(ve)),this.parent.isAttached&&Gi.sendMessage(ve,to.Msg.BeforeAttach),this.parent.node.appendChild(ve.node),this.parent.isAttached&&Gi.sendMessage(ve,to.Msg.AfterAttach))}detachWidget(ve){if(this.parent.node!==ve.node.parentNode)return;this.parent.isAttached&&Gi.sendMessage(ve,to.Msg.BeforeDetach),this.parent.node.removeChild(ve.node),this.parent.isAttached&&Gi.sendMessage(ve,to.Msg.AfterDetach);let rt=this._items.get(ve);rt&&(this._items.delete(ve),rt.dispose())}onBeforeShow(ve){super.onBeforeShow(ve),this.parent.update()}onBeforeAttach(ve){super.onBeforeAttach(ve),this.parent.fit()}onChildShown(ve){this.parent.fit()}onChildHidden(ve){this.parent.fit()}onResize(ve){this.parent.isVisible&&this._update(ve.width,ve.height)}onUpdateRequest(ve){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(ve){this.parent.isAttached&&this._fit()}_removeWidget(ve){if(!this._root)return;let rt=this._root.findTabNode(ve);if(!rt)return;if(gc.removeAria(ve),rt.tabBar.titles.length>1){if(rt.tabBar.removeTab(ve.title),this._hiddenMode===to.HiddenMode.Scale&&rt.tabBar.titles.length==1){let Hr=rt.tabBar.titles[0].owner;Hr.hiddenMode=to.HiddenMode.Display}return}if(rt.tabBar.dispose(),this._root===rt){this._root=null;return}this._root.holdAllSizes();let lt=rt.parent;rt.parent=null;let Tt=Li.ArrayExt.removeFirstOf(lt.children,rt),zt=Li.ArrayExt.removeAt(lt.handles,Tt);if(Li.ArrayExt.removeAt(lt.sizers,Tt),zt.parentNode&&zt.parentNode.removeChild(zt),lt.children.length>1){lt.syncHandles();return}let Lr=lt.parent;lt.parent=null;let gr=lt.children[0],Mr=lt.handles[0];if(lt.children.length=0,lt.handles.length=0,lt.sizers.length=0,Mr.parentNode&&Mr.parentNode.removeChild(Mr),this._root===lt){gr.parent=null,this._root=gr;return}let Ur=Lr,wr=Ur.children.indexOf(lt);if(gr instanceof gc.TabLayoutNode){gr.parent=Ur,Ur.children[wr]=gr;return}let Ir=Li.ArrayExt.removeAt(Ur.handles,wr);Li.ArrayExt.removeAt(Ur.children,wr),Li.ArrayExt.removeAt(Ur.sizers,wr),Ir.parentNode&&Ir.parentNode.removeChild(Ir);for(let Hr=0,Rr=gr.children.length;Hr=this._left+this._width||Br=this._top+this._height?null:this}createConfig(){let Rr=this.tabBar.titles.map(Pr=>Pr.owner),Br=this.tabBar.currentIndex;return{type:"tab-area",widgets:Rr,currentIndex:Br}}holdAllSizes(){}fit(Rr,Br){let Pr=0,xe=0,Xa=1/0,Ka=1/0,da=Br.get(this.tabBar),Ta=this.tabBar.currentTitle,Ja=Ta?Br.get(Ta.owner):void 0,[Pn,Na]=this.sizers;return da&&da.fit(),Ja&&Ja.fit(),da&&!da.isHidden?(Pr=Math.max(Pr,da.minWidth),xe+=da.minHeight,Pn.minSize=da.minHeight,Pn.maxSize=da.maxHeight):(Pn.minSize=0,Pn.maxSize=0),Ja&&!Ja.isHidden?(Pr=Math.max(Pr,Ja.minWidth),xe+=Ja.minHeight,Na.minSize=Ja.minHeight,Na.maxSize=1/0):(Na.minSize=0,Na.maxSize=1/0),{minWidth:Pr,minHeight:xe,maxWidth:Xa,maxHeight:Ka}}update(Rr,Br,Pr,xe,Xa,Ka){this._top=Br,this._left=Rr,this._width=Pr,this._height=xe;let da=Ka.get(this.tabBar),Ta=this.tabBar.currentTitle,Ja=Ta?Ka.get(Ta.owner):void 0;if(ah.calc(this.sizers,xe),da&&!da.isHidden){let Pn=this.sizers[0].size;da.update(Rr,Br,Pr,Pn),Br+=Pn}if(Ja&&!Ja.isHidden){let Pn=this.sizers[1].size;Ja.update(Rr,Br,Pr,Pn)}}}gt.TabLayoutNode=Tt;class zt{constructor(Rr){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=Rr}*iterAllWidgets(){for(let Rr of this.children)yield*Rr.iterAllWidgets()}*iterUserWidgets(){for(let Rr of this.children)yield*Rr.iterUserWidgets()}*iterSelectedWidgets(){for(let Rr of this.children)yield*Rr.iterSelectedWidgets()}*iterTabBars(){for(let Rr of this.children)yield*Rr.iterTabBars()}*iterHandles(){yield*this.handles;for(let Rr of this.children)yield*Rr.iterHandles()}findTabNode(Rr){for(let Br=0,Pr=this.children.length;Brxe.createConfig());return{type:"split-area",orientation:Rr,children:Pr,sizes:Br}}syncHandles(){this.handles.forEach((Rr,Br)=>{Rr.setAttribute("data-orientation",this.orientation),Br===this.handles.length-1?Rr.classList.add("lm-mod-hidden"):Rr.classList.remove("lm-mod-hidden")})}holdSizes(){for(let Rr of this.sizers)Rr.sizeHint=Rr.size}holdAllSizes(){for(let Rr of this.children)Rr.holdAllSizes();this.holdSizes()}normalizeSizes(){let Rr=this.sizers.length;if(Rr===0)return;this.holdSizes();let Br=this.sizers.reduce((Pr,xe)=>Pr+xe.sizeHint,0);if(Br===0)for(let Pr of this.sizers)Pr.size=Pr.sizeHint=1/Rr;else for(let Pr of this.sizers)Pr.size=Pr.sizeHint/=Br;this.normalized=!0}createNormalizedSizes(){let Rr=this.sizers.length;if(Rr===0)return[];let Br=this.sizers.map(xe=>xe.size),Pr=Br.reduce((xe,Xa)=>xe+Xa,0);if(Pr===0)for(let xe=Br.length-1;xe>-1;xe--)Br[xe]=1/Rr;else for(let xe=Br.length-1;xe>-1;xe--)Br[xe]/=Pr;return Br}fit(Rr,Br){let Pr=this.orientation==="horizontal",xe=Math.max(0,this.children.length-1)*Rr,Xa=Pr?xe:0,Ka=Pr?0:xe,da=1/0,Ta=1/0;for(let Ja=0,Pn=this.children.length;Ja=Br.length)&&(Pr=0),{type:"tab-area",widgets:Br,currentIndex:Pr}}function Ur(Hr,Rr){let Br=Hr.orientation,Pr=[],xe=[];for(let Xa=0,Ka=Hr.children.length;Xa{let Ka=lt(xe,Rr,Br),da=ve(Hr.sizes[Xa]),Ta=Rr.createHandle();Pr.children.push(Ka),Pr.handles.push(Ta),Pr.sizers.push(da),Ka.parent=Pr}),Pr.syncHandles(),Pr.normalizeSizes(),Pr}})(gc||(gc={}));var Im=class gt extends to{constructor(ve={}){super(),this._drag=null,this._tabsMovable=!0,this._tabsConstrained=!1,this._addButtonEnabled=!1,this._pressData=null,this._layoutModified=new jl(this),this._addRequested=new jl(this),this.addClass("lm-DockPanel"),this._document=ve.document||document,this._mode=ve.mode||"multiple-document",this._renderer=ve.renderer||gt.defaultRenderer,this._edges=ve.edges||oc.DEFAULT_EDGES,ve.tabsMovable!==void 0&&(this._tabsMovable=ve.tabsMovable),ve.tabsConstrained!==void 0&&(this._tabsConstrained=ve.tabsConstrained),ve.addButtonEnabled!==void 0&&(this._addButtonEnabled=ve.addButtonEnabled),this.dataset.mode=this._mode;let rt={createTabBar:()=>this._createTabBar(),createHandle:()=>this._createHandle()};this.layout=new Gy({document:this._document,renderer:rt,spacing:ve.spacing,hiddenMode:ve.hiddenMode}),this.overlay=ve.overlay||new gt.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(ve){this.layout.hiddenMode=ve}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(ve){this.layout.spacing=ve}get mode(){return this._mode}set mode(ve){if(this._mode===ve)return;this._mode=ve,this.dataset.mode=ve;let rt=this.layout;switch(ve){case"multiple-document":for(let lt of rt.tabBars())lt.show();break;case"single-document":rt.restoreLayout(oc.createSingleDocumentConfig(this));break;default:throw"unreachable"}Gi.postMessage(this,oc.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(ve){this._tabsMovable=ve;for(let rt of this.tabBars())rt.tabsMovable=ve}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(ve){this._tabsConstrained=ve}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(ve){this._addButtonEnabled=ve;for(let rt of this.tabBars())rt.addButtonEnabled=ve}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(ve){let rt=(0,Li.find)(this.tabBars(),lt=>lt.titles.indexOf(ve.title)!==-1);if(!rt)throw new Error("Widget is not contained in the dock panel.");rt.currentTitle=ve.title}activateWidget(ve){this.selectWidget(ve),ve.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(ve){this._mode="multiple-document",this.layout.restoreLayout(ve),(Ff.IS_EDGE||Ff.IS_IE)&&Gi.flush(),Gi.postMessage(this,oc.LayoutModified)}addWidget(ve,rt={}){this._mode==="single-document"?this.layout.addWidget(ve):this.layout.addWidget(ve,rt),Gi.postMessage(this,oc.LayoutModified)}processMessage(ve){ve.type==="layout-modified"?this._layoutModified.emit(void 0):super.processMessage(ve)}handleEvent(ve){switch(ve.type){case"lm-dragenter":this._evtDragEnter(ve);break;case"lm-dragleave":this._evtDragLeave(ve);break;case"lm-dragover":this._evtDragOver(ve);break;case"lm-drop":this._evtDrop(ve);break;case"pointerdown":this._evtPointerDown(ve);break;case"pointermove":this._evtPointerMove(ve);break;case"pointerup":this._evtPointerUp(ve);break;case"keydown":this._evtKeyDown(ve);break;case"contextmenu":ve.preventDefault(),ve.stopPropagation();break}}onBeforeAttach(ve){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(ve){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(ve){oc.isGeneratedTabBarProperty.get(ve.child)||ve.child.addClass("lm-DockPanel-widget")}onChildRemoved(ve){oc.isGeneratedTabBarProperty.get(ve.child)||(ve.child.removeClass("lm-DockPanel-widget"),Gi.postMessage(this,oc.LayoutModified))}_evtDragEnter(ve){ve.mimeData.hasData("application/vnd.lumino.widget-factory")&&(ve.preventDefault(),ve.stopPropagation())}_evtDragLeave(ve){ve.preventDefault(),!(this._tabsConstrained&&ve.source!==this)&&(ve.stopPropagation(),this.overlay.hide(1))}_evtDragOver(ve){ve.preventDefault(),this._tabsConstrained&&ve.source!==this||this._showOverlay(ve.clientX,ve.clientY)==="invalid"?ve.dropAction="none":(ve.stopPropagation(),ve.dropAction=ve.proposedAction)}_evtDrop(ve){if(ve.preventDefault(),this.overlay.hide(0),ve.proposedAction==="none"){ve.dropAction="none";return}let{clientX:rt,clientY:lt}=ve,{zone:Tt,target:zt}=oc.findDropTarget(this,rt,lt,this._edges);if(this._tabsConstrained&&ve.source!==this||Tt==="invalid"){ve.dropAction="none";return}let gr=ve.mimeData.getData("application/vnd.lumino.widget-factory");if(typeof gr!="function"){ve.dropAction="none";return}let Mr=gr();if(!(Mr instanceof to)){ve.dropAction="none";return}if(Mr.contains(this)){ve.dropAction="none";return}let Ur=zt?oc.getDropRef(zt.tabBar):null;switch(Tt){case"root-all":this.addWidget(Mr);break;case"root-top":this.addWidget(Mr,{mode:"split-top"});break;case"root-left":this.addWidget(Mr,{mode:"split-left"});break;case"root-right":this.addWidget(Mr,{mode:"split-right"});break;case"root-bottom":this.addWidget(Mr,{mode:"split-bottom"});break;case"widget-all":this.addWidget(Mr,{mode:"tab-after",ref:Ur});break;case"widget-top":this.addWidget(Mr,{mode:"split-top",ref:Ur});break;case"widget-left":this.addWidget(Mr,{mode:"split-left",ref:Ur});break;case"widget-right":this.addWidget(Mr,{mode:"split-right",ref:Ur});break;case"widget-bottom":this.addWidget(Mr,{mode:"split-bottom",ref:Ur});break;case"widget-tab":this.addWidget(Mr,{mode:"tab-after",ref:Ur});break;default:throw"unreachable"}ve.dropAction=ve.proposedAction,ve.stopPropagation(),this.activateWidget(Mr)}_evtKeyDown(ve){ve.preventDefault(),ve.stopPropagation(),ve.keyCode===27&&(this._releaseMouse(),Gi.postMessage(this,oc.LayoutModified))}_evtPointerDown(ve){if(ve.button!==0)return;let rt=this.layout,lt=ve.target,Tt=(0,Li.find)(rt.handles(),wr=>wr.contains(lt));if(!Tt)return;ve.preventDefault(),ve.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let zt=Tt.getBoundingClientRect(),Lr=ve.clientX-zt.left,gr=ve.clientY-zt.top,Mr=window.getComputedStyle(Tt),Ur=Vf.overrideCursor(Mr.cursor,this._document);this._pressData={handle:Tt,deltaX:Lr,deltaY:gr,override:Ur}}_evtPointerMove(ve){if(!this._pressData)return;ve.preventDefault(),ve.stopPropagation();let rt=this.node.getBoundingClientRect(),lt=ve.clientX-rt.left-this._pressData.deltaX,Tt=ve.clientY-rt.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,lt,Tt)}_evtPointerUp(ve){ve.button===0&&(ve.preventDefault(),ve.stopPropagation(),this._releaseMouse(),Gi.postMessage(this,oc.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(ve,rt){let{zone:lt,target:Tt}=oc.findDropTarget(this,ve,rt,this._edges);if(lt==="invalid")return this.overlay.hide(100),lt;let zt,Lr,gr,Mr,Ur=Zl.boxSizing(this.node),wr=this.node.getBoundingClientRect();switch(lt){case"root-all":zt=Ur.paddingTop,Lr=Ur.paddingLeft,gr=Ur.paddingRight,Mr=Ur.paddingBottom;break;case"root-top":zt=Ur.paddingTop,Lr=Ur.paddingLeft,gr=Ur.paddingRight,Mr=wr.height*oc.GOLDEN_RATIO;break;case"root-left":zt=Ur.paddingTop,Lr=Ur.paddingLeft,gr=wr.width*oc.GOLDEN_RATIO,Mr=Ur.paddingBottom;break;case"root-right":zt=Ur.paddingTop,Lr=wr.width*oc.GOLDEN_RATIO,gr=Ur.paddingRight,Mr=Ur.paddingBottom;break;case"root-bottom":zt=wr.height*oc.GOLDEN_RATIO,Lr=Ur.paddingLeft,gr=Ur.paddingRight,Mr=Ur.paddingBottom;break;case"widget-all":zt=Tt.top,Lr=Tt.left,gr=Tt.right,Mr=Tt.bottom;break;case"widget-top":zt=Tt.top,Lr=Tt.left,gr=Tt.right,Mr=Tt.bottom+Tt.height/2;break;case"widget-left":zt=Tt.top,Lr=Tt.left,gr=Tt.right+Tt.width/2,Mr=Tt.bottom;break;case"widget-right":zt=Tt.top,Lr=Tt.left+Tt.width/2,gr=Tt.right,Mr=Tt.bottom;break;case"widget-bottom":zt=Tt.top+Tt.height/2,Lr=Tt.left,gr=Tt.right,Mr=Tt.bottom;break;case"widget-tab":{let Ir=Tt.tabBar.node.getBoundingClientRect().height;zt=Tt.top,Lr=Tt.left,gr=Tt.right,Mr=Tt.bottom+Tt.height-Ir;break}default:throw"unreachable"}return this.overlay.show({top:zt,left:Lr,right:gr,bottom:Mr}),lt}_createTabBar(){let ve=this._renderer.createTabBar(this._document);return oc.isGeneratedTabBarProperty.set(ve,!0),this._mode==="single-document"&&ve.hide(),ve.tabsMovable=this._tabsMovable,ve.allowDeselect=!1,ve.addButtonEnabled=this._addButtonEnabled,ve.removeBehavior="select-previous-tab",ve.insertBehavior="select-tab-if-needed",ve.tabMoved.connect(this._onTabMoved,this),ve.currentChanged.connect(this._onCurrentChanged,this),ve.tabCloseRequested.connect(this._onTabCloseRequested,this),ve.tabDetachRequested.connect(this._onTabDetachRequested,this),ve.tabActivateRequested.connect(this._onTabActivateRequested,this),ve.addRequested.connect(this._onTabAddRequested,this),ve}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){Gi.postMessage(this,oc.LayoutModified)}_onCurrentChanged(ve,rt){let{previousTitle:lt,currentTitle:Tt}=rt;lt&<.owner.hide(),Tt&&Tt.owner.show(),(Ff.IS_EDGE||Ff.IS_IE)&&Gi.flush(),Gi.postMessage(this,oc.LayoutModified)}_onTabAddRequested(ve){this._addRequested.emit(ve)}_onTabActivateRequested(ve,rt){rt.title.owner.activate()}_onTabCloseRequested(ve,rt){rt.title.owner.close()}_onTabDetachRequested(ve,rt){if(this._drag)return;ve.releaseMouse();let{title:lt,tab:Tt,clientX:zt,clientY:Lr,offset:gr}=rt,Mr=new id.MimeData,Ur=()=>lt.owner;Mr.setData("application/vnd.lumino.widget-factory",Ur);let wr=Tt.cloneNode(!0);gr&&(wr.style.top=`-${gr.y}px`,wr.style.left=`-${gr.x}px`),this._drag=new Vf({document:this._document,mimeData:Mr,dragImage:wr,proposedAction:"move",supportedActions:"move",source:this}),Tt.classList.add("lm-mod-hidden");let Ir=()=>{this._drag=null,Tt.classList.remove("lm-mod-hidden")};this._drag.start(zt,Lr).then(Ir)}};(function(gt){class ve{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(Tt){let zt=this.node.style;zt.top=`${Tt.top}px`,zt.left=`${Tt.left}px`,zt.right=`${Tt.right}px`,zt.bottom=`${Tt.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(Tt){if(!this._hidden){if(Tt<=0){clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden");return}this._timer===-1&&(this._timer=window.setTimeout(()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")},Tt))}}}gt.Overlay=ve;class rt{createTabBar(Tt){let zt=new tp({document:Tt});return zt.addClass("lm-DockPanel-tabBar"),zt}createHandle(){let Tt=document.createElement("div");return Tt.className="lm-DockPanel-handle",Tt}}gt.Renderer=rt,gt.defaultRenderer=new rt})(Im||(Im={}));var oc;(function(gt){gt.GOLDEN_RATIO=.618,gt.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},gt.LayoutModified=new Ed("layout-modified"),gt.isGeneratedTabBarProperty=new qf({name:"isGeneratedTabBar",create:()=>!1});function ve(Tt){if(Tt.isEmpty)return{main:null};let zt=Array.from(Tt.widgets()),Lr=Tt.selectedWidgets().next().value,gr=Lr?zt.indexOf(Lr):-1;return{main:{type:"tab-area",widgets:zt,currentIndex:gr}}}gt.createSingleDocumentConfig=ve;function rt(Tt,zt,Lr,gr){if(!Zl.hitTest(Tt.node,zt,Lr))return{zone:"invalid",target:null};let Mr=Tt.layout;if(Mr.isEmpty)return{zone:"root-all",target:null};if(Tt.mode==="multiple-document"){let da=Tt.node.getBoundingClientRect(),Ta=zt-da.left+1,Ja=Lr-da.top+1,Pn=da.right-zt,Na=da.bottom-Lr;switch(Math.min(Ja,Pn,Na,Ta)){case Ja:if(JaPr&&Hr>Pr&&Ir>xe&&Rr>xe)return{zone:"widget-all",target:Ur};wr/=Pr,Ir/=xe,Hr/=Pr,Rr/=xe;let Xa=Math.min(wr,Ir,Hr,Rr),Ka;switch(Xa){case wr:Ka="widget-left";break;case Ir:Ka="widget-top";break;case Hr:Ka="widget-right";break;case Rr:Ka="widget-bottom";break;default:throw"unreachable"}return{zone:Ka,target:Ur}}gt.findDropTarget=rt;function lt(Tt){return Tt.titles.length===0?null:Tt.currentTitle?Tt.currentTitle.owner:Tt.titles[Tt.titles.length-1].owner}gt.getDropRef=lt})(oc||(oc={}));var Jp=class gt extends od{constructor(ve={}){super(ve),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new Bh],this._columnSizers=[new Bh],this._box=null,ve.rowCount!==void 0&&Yc.reallocSizers(this._rowSizers,ve.rowCount),ve.columnCount!==void 0&&Yc.reallocSizers(this._columnSizers,ve.columnCount),ve.rowSpacing!==void 0&&(this._rowSpacing=Yc.clampValue(ve.rowSpacing)),ve.columnSpacing!==void 0&&(this._columnSpacing=Yc.clampValue(ve.columnSpacing))}dispose(){for(let ve of this._items){let rt=ve.widget;ve.dispose(),rt.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(ve){ve!==this.rowCount&&(Yc.reallocSizers(this._rowSizers,ve),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(ve){ve!==this.columnCount&&(Yc.reallocSizers(this._columnSizers,ve),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(ve){ve=Yc.clampValue(ve),this._rowSpacing!==ve&&(this._rowSpacing=ve,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(ve){ve=Yc.clampValue(ve),this._columnSpacing!==ve&&(this._columnSpacing=ve,this.parent&&this.parent.fit())}rowStretch(ve){let rt=this._rowSizers[ve];return rt?rt.stretch:-1}setRowStretch(ve,rt){let lt=this._rowSizers[ve];lt&&(rt=Yc.clampValue(rt),lt.stretch!==rt&&(lt.stretch=rt,this.parent&&this.parent.update()))}columnStretch(ve){let rt=this._columnSizers[ve];return rt?rt.stretch:-1}setColumnStretch(ve,rt){let lt=this._columnSizers[ve];lt&&(rt=Yc.clampValue(rt),lt.stretch!==rt&&(lt.stretch=rt,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(let ve of this._items)yield ve.widget}addWidget(ve){Li.ArrayExt.findFirstIndex(this._items,lt=>lt.widget===ve)===-1&&(this._items.push(new sv(ve)),this.parent&&this.attachWidget(ve))}removeWidget(ve){let rt=Li.ArrayExt.findFirstIndex(this._items,Tt=>Tt.widget===ve);if(rt===-1)return;let lt=Li.ArrayExt.removeAt(this._items,rt);this.parent&&this.detachWidget(ve),lt.dispose()}init(){super.init();for(let ve of this)this.attachWidget(ve)}attachWidget(ve){this.parent.isAttached&&Gi.sendMessage(ve,to.Msg.BeforeAttach),this.parent.node.appendChild(ve.node),this.parent.isAttached&&Gi.sendMessage(ve,to.Msg.AfterAttach),this.parent.fit()}detachWidget(ve){this.parent.isAttached&&Gi.sendMessage(ve,to.Msg.BeforeDetach),this.parent.node.removeChild(ve.node),this.parent.isAttached&&Gi.sendMessage(ve,to.Msg.AfterDetach),this.parent.fit()}onBeforeShow(ve){super.onBeforeShow(ve),this.parent.update()}onBeforeAttach(ve){super.onBeforeAttach(ve),this.parent.fit()}onChildShown(ve){this.parent.fit()}onChildHidden(ve){this.parent.fit()}onResize(ve){this.parent.isVisible&&this._update(ve.width,ve.height)}onUpdateRequest(ve){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(ve){this.parent.isAttached&&this._fit()}_fit(){for(let Mr=0,Ur=this.rowCount;Mr!Mr.isHidden);for(let Mr=0,Ur=ve.length;Mr({row:0,column:0,rowSpan:1,columnSpan:1}),changed:gr});function ve(Mr){let Ur=Math.max(0,Math.floor(Mr.row||0)),wr=Math.max(0,Math.floor(Mr.column||0)),Ir=Math.max(1,Math.floor(Mr.rowSpan||0)),Hr=Math.max(1,Math.floor(Mr.columnSpan||0));return{row:Ur,column:wr,rowSpan:Ir,columnSpan:Hr}}gt.normalizeConfig=ve;function rt(Mr){return Math.max(0,Math.floor(Mr))}gt.clampValue=rt;function lt(Mr,Ur){let wr=gt.cellConfigProperty.get(Mr.widget),Ir=gt.cellConfigProperty.get(Ur.widget);return wr.rowSpan-Ir.rowSpan}gt.rowSpanCmp=lt;function Tt(Mr,Ur){let wr=gt.cellConfigProperty.get(Mr.widget),Ir=gt.cellConfigProperty.get(Ur.widget);return wr.columnSpan-Ir.columnSpan}gt.columnSpanCmp=Tt;function zt(Mr,Ur){for(Ur=Math.max(1,Math.floor(Ur));Mr.lengthUr&&(Mr.length=Ur)}gt.reallocSizers=zt;function Lr(Mr,Ur,wr,Ir){if(wr=Ir)return;let Rr=(Ir-Hr)/(wr-Ur+1);for(let Br=Ur;Br<=wr;++Br)Mr[Br].minSize+=Rr}gt.distributeMin=Lr;function gr(Mr){Mr.parent&&Mr.parent.layout instanceof Jp&&Mr.parent.fit()}})(Yc||(Yc={}));var Dm=class gt extends to{constructor(ve={}){super({node:Rm.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(to.Flag.DisallowLayout),this.renderer=ve.renderer||gt.defaultRenderer,this._forceItemsPosition=ve.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=ve.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(ve){this.activeIndex=ve?this._menus.indexOf(ve):-1}get activeIndex(){return this._activeIndex}set activeIndex(ve){(ve<0||ve>=this._menus.length)&&(ve=-1),ve>-1&&this._menus[ve].items.length===0&&(ve=-1),this._activeIndex!==ve&&(this._activeIndex=ve,this.update())}get menus(){return this._menus}openActiveMenu(){this._activeIndex!==-1&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(ve,rt=!0){this.insertMenu(this._menus.length,ve,rt)}insertMenu(ve,rt,lt=!0){this._closeChildMenu();let Tt=this._menus.indexOf(rt),zt=Math.max(0,Math.min(ve,this._menus.length));if(Tt===-1){Li.ArrayExt.insert(this._menus,zt,rt),rt.addClass("lm-MenuBar-menu"),rt.aboutToClose.connect(this._onMenuAboutToClose,this),rt.menuRequested.connect(this._onMenuMenuRequested,this),rt.title.changed.connect(this._onTitleChanged,this),lt&&this.update();return}zt===this._menus.length&&zt--,Tt!==zt&&(Li.ArrayExt.move(this._menus,Tt,zt),lt&&this.update())}removeMenu(ve,rt=!0){this.removeMenuAt(this._menus.indexOf(ve),rt)}removeMenuAt(ve,rt=!0){this._closeChildMenu();let lt=Li.ArrayExt.removeAt(this._menus,ve);lt&&(lt.aboutToClose.disconnect(this._onMenuAboutToClose,this),lt.menuRequested.disconnect(this._onMenuMenuRequested,this),lt.title.changed.disconnect(this._onTitleChanged,this),lt.removeClass("lm-MenuBar-menu"),rt&&this.update())}clearMenus(){if(this._menus.length!==0){this._closeChildMenu();for(let ve of this._menus)ve.aboutToClose.disconnect(this._onMenuAboutToClose,this),ve.menuRequested.disconnect(this._onMenuMenuRequested,this),ve.title.changed.disconnect(this._onTitleChanged,this),ve.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(ve){switch(ve.type){case"keydown":this._evtKeyDown(ve);break;case"mousedown":this._evtMouseDown(ve);break;case"mousemove":this._evtMouseMove(ve);break;case"focusout":this._evtFocusOut(ve);break;case"contextmenu":ve.preventDefault(),ve.stopPropagation();break}}onBeforeAttach(ve){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(ve){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(ve){this.isAttached&&this._focusItemAt(0)}onResize(ve){this.update(),super.onResize(ve)}onUpdateRequest(ve){var rt;let lt=this._menus,Tt=this.renderer,zt=this._activeIndex,Lr=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:lt.length,Mr=0,Ur=!1;gr=this._overflowMenu!==null?gr-1:gr;let wr=new Array(gr);for(let Ir=0;Ir{this._tabFocusIndex=Ir,this.activeIndex=Ir}}),Mr+=this._menuItemSizes[Ir],lt[Ir].title.label===this._overflowMenuOptions.title&&(Ur=!0,gr--);if(this._overflowMenuOptions.isVisible){if(this._overflowIndex>-1&&!Ur){if(this._overflowMenu===null){let Ir=(rt=this._overflowMenuOptions.title)!==null&&rt!==void 0?rt:"...";this._overflowMenu=new ov({commands:new td}),this._overflowMenu.title.label=Ir,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let Ir=lt.length-2;Ir>=gr;Ir--){let Hr=this.menus[Ir];Hr.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:Hr}),this.removeMenu(Hr,!1)}wr[gr]=Tt.renderItem({title:this._overflowMenu.title,active:gr===zt&<[gr].items.length!==0,tabbable:gr===Lr,disabled:lt[gr].items.length===0,onfocus:()=>{this._tabFocusIndex=gr,this.activeIndex=gr}}),gr++}else if(this._overflowMenu!==null){let Ir=this._overflowMenu.items,Hr=this.node.offsetWidth,Rr=this._overflowMenu.items.length;for(let Br=0;Brthis._menuItemSizes[Pr]){let xe=Ir[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(gr,xe,!1),wr[gr]=Tt.renderItem({title:xe.title,active:!1,tabbable:gr===Lr,disabled:lt[gr].items.length===0,onfocus:()=>{this._tabFocusIndex=gr,this.activeIndex=gr}}),gr++}}this._overflowMenu.items.length===0&&(this.removeMenu(this._overflowMenu,!1),wr.pop(),this._overflowMenu=null,this._overflowIndex=-1)}}rd.render(wr,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;let ve=this.contentNode.childNodes,rt=this.node.offsetWidth,lt=0,Tt=-1,zt=ve.length;if(this._menuItemSizes.length==0)for(let Lr=0;Lrrt&&Tt===-1&&(Tt=Lr)}else for(let Lr=0;Lrrt){Tt=Lr;break}this._overflowIndex=Tt}_evtKeyDown(ve){let rt=ve.keyCode;if(rt===9){this.activeIndex=-1;return}if(ve.preventDefault(),ve.stopPropagation(),rt===13||rt===32||rt===38||rt===40){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;this.openActiveMenu();return}if(rt===27){this._closeChildMenu(),this._focusItemAt(this.activeIndex);return}if(rt===37||rt===39){let Lr=rt===37?-1:1,gr=this._tabFocusIndex+Lr,Mr=this._menus.length;for(let Ur=0;UrZl.hitTest(lt,ve.clientX,ve.clientY));if(rt===-1){this._closeChildMenu();return}if(ve.button===0)if(this._childMenu)this._closeChildMenu(),this.activeIndex=rt;else{ve.preventDefault();let lt=this._positionForMenu(rt);ov.saveWindowData(),this.activeIndex=rt,this._openChildMenu(lt)}}_evtMouseMove(ve){let rt=Li.ArrayExt.findFirstIndex(this.contentNode.children,Tt=>Zl.hitTest(Tt,ve.clientX,ve.clientY));if(rt===this._activeIndex||rt===-1&&this._childMenu)return;let lt=rt>=0&&this._childMenu?this._positionForMenu(rt):null;ov.saveWindowData(),this.activeIndex=rt,lt&&this._openChildMenu(lt)}_positionForMenu(ve){let rt=this.contentNode.children[ve],{left:lt,bottom:Tt}=rt.getBoundingClientRect();return{top:Tt,left:lt}}_evtFocusOut(ve){!this._childMenu&&!this.node.contains(ve.relatedTarget)&&(this.activeIndex=-1)}_focusItemAt(ve){let rt=this.contentNode.childNodes[ve];rt&&rt.focus()}_openChildMenu(ve={}){let rt=this.activeMenu;if(!rt){this._closeChildMenu();return}let lt=this._childMenu;if(lt===rt)return;this._childMenu=rt,lt?lt.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,Gi.sendMessage(this,to.Msg.UpdateRequest);let{left:Tt,top:zt}=ve;(typeof Tt>"u"||typeof zt>"u")&&({left:Tt,top:zt}=this._positionForMenu(this._activeIndex)),lt||this.addClass("lm-mod-active"),rt.items.length>0&&rt.open(Tt,zt,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let ve=this._childMenu;this._childMenu=null,ve.close(),this.activeIndex=-1}_onMenuAboutToClose(ve){ve===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(ve,rt){if(ve!==this._childMenu)return;let lt=this._activeIndex,Tt=this._menus.length;switch(rt){case"next":this.activeIndex=lt===Tt-1?0:lt+1;break;case"previous":this.activeIndex=lt===0?Tt-1:lt-1;break}this.openActiveMenu()}_onTitleChanged(){this.update()}};(function(gt){class ve{renderItem(lt){let Tt=this.createItemClass(lt),zt=this.createItemDataset(lt),Lr=this.createItemARIA(lt);return ql.li({className:Tt,dataset:zt,...lt.disabled?{}:{tabindex:lt.tabbable?"0":"-1"},onfocus:lt.onfocus,...Lr},this.renderIcon(lt),this.renderLabel(lt))}renderIcon(lt){let Tt=this.createIconClass(lt);return ql.div({className:Tt},lt.title.icon,lt.title.iconLabel)}renderLabel(lt){let Tt=this.formatLabel(lt);return ql.div({className:"lm-MenuBar-itemLabel"},Tt)}createItemClass(lt){let Tt="lm-MenuBar-item";return lt.title.className&&(Tt+=` ${lt.title.className}`),lt.active&&!lt.disabled&&(Tt+=" lm-mod-active"),Tt}createItemDataset(lt){return lt.title.dataset}createItemARIA(lt){return{role:"menuitem","aria-haspopup":"true","aria-disabled":lt.disabled?"true":"false"}}createIconClass(lt){let Tt="lm-MenuBar-itemIcon",zt=lt.title.iconClass;return zt?`${Tt} ${zt}`:Tt}formatLabel(lt){let{label:Tt,mnemonic:zt}=lt.title;if(zt<0||zt>=Tt.length)return Tt;let Lr=Tt.slice(0,zt),gr=Tt.slice(zt+1),Mr=Tt[zt],Ur=ql.span({className:"lm-MenuBar-itemMnemonic"},Mr);return[Lr,Ur,gr]}}gt.Renderer=ve,gt.defaultRenderer=new ve})(Dm||(Dm={}));var Rm;(function(gt){function ve(){let lt=document.createElement("div"),Tt=document.createElement("ul");return Tt.className="lm-MenuBar-content",lt.appendChild(Tt),Tt.setAttribute("role","menubar"),lt}gt.createNode=ve;function rt(lt,Tt,zt){let Lr=-1,gr=-1,Mr=!1,Ur=Tt.toUpperCase();for(let wr=0,Ir=lt.length;wr=0&&Br1&&this.widgets.forEach(rt=>{rt.hiddenMode=this._hiddenMode}))}dispose(){for(let ve of this._items)ve.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(ve,rt){this._hiddenMode===to.HiddenMode.Scale&&this._items.length>0?(this._items.length===1&&(this.widgets[0].hiddenMode=to.HiddenMode.Scale),rt.hiddenMode=to.HiddenMode.Scale):rt.hiddenMode=to.HiddenMode.Display,Li.ArrayExt.insert(this._items,ve,new sv(rt)),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.BeforeAttach),this.parent.node.appendChild(rt.node),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.AfterAttach),this.parent.fit()}moveWidget(ve,rt,lt){Li.ArrayExt.move(this._items,ve,rt),this.parent.update()}detachWidget(ve,rt){let lt=Li.ArrayExt.removeAt(this._items,ve);this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.BeforeDetach),this.parent.node.removeChild(rt.node),this.parent.isAttached&&Gi.sendMessage(rt,to.Msg.AfterDetach),lt.widget.node.style.zIndex="",this._hiddenMode===to.HiddenMode.Scale&&(rt.hiddenMode=to.HiddenMode.Display,this._items.length===1&&(this._items[0].widget.hiddenMode=to.HiddenMode.Display)),lt.dispose(),this.parent.fit()}onBeforeShow(ve){super.onBeforeShow(ve),this.parent.update()}onBeforeAttach(ve){super.onBeforeAttach(ve),this.parent.fit()}onChildShown(ve){this.parent.fit()}onChildHidden(ve){this.parent.fit()}onResize(ve){this.parent.isVisible&&this._update(ve.width,ve.height)}onUpdateRequest(ve){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(ve){this.parent.isAttached&&this._fit()}_fit(){let ve=0,rt=0;for(let zt=0,Lr=this._items.length;zt{this.createGraph(this._model)})}renderModel(ve){if(this.hasGraphElement())return Promise.resolve();this._model=ve;let rt=ve.data["image/png"];return rt!=null?(this.updateImage(rt),Promise.resolve()):this.createGraph(ve)}hasGraphElement(){return this.node.querySelector(".plot-container")!==null}updateImage(ve){this.hideGraph(),this._img_el.src="data:image/png;base64,"+ve,this.showImage()}hideGraph(){let ve=this.node.querySelector(".plot-container");ve!=null&&(ve.style.display="none")}showGraph(){let ve=this.node.querySelector(".plot-container");ve!=null&&(ve.style.display="block")}hideImage(){let ve=this.node.querySelector(".plot-img");ve!=null&&(ve.style.display="none")}showImage(){let ve=this.node.querySelector(".plot-img");ve!=null&&(ve.style.display="block")}createGraph(ve){let{data:rt,layout:lt,frames:Tt,config:zt}=ve.data[this._mimeType];return lt.height||(lt.height=360),(async()=>(gt.Plotly===null&&(gt.Plotly=await Promise.resolve().then(()=>Jh(Q5())),gt._resolveLoadingPlotly()),gt.loadingPlotly))().then(()=>gt.Plotly.react(this.node,rt,lt,zt)).then(gr=>{this.showGraph(),this.hideImage(),this.update(),Tt&>.Plotly.addFrames(this.node,Tt),this.node.offsetWidth>0&&this.node.offsetHeight>0&>.Plotly.toImage(gr,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then(Mr=>{let Ur=Mr.split(",")[1];ve.data["image/png"]!==Ur&&ve.setData({data:{...ve.data,"image/png":Ur}})}),this.node.on("plotly_webglcontextlost",()=>{let Mr=ve.data["image/png"];if(Mr!=null)return this.updateImage(Mr),Promise.resolve()})})}onAfterShow(ve){this.update()}onResize(ve){this.update()}onUpdateRequest(ve){gt.Plotly&&this.isVisible&&this.hasGraphElement()&>.Plotly.redraw(this.node).then(()=>{gt.Plotly.Plots.resize(this.node)})}static{this.Plotly=null}static{this.loadingPlotly=new Promise(ve=>{gt._resolveLoadingPlotly=ve})}},DI={safe:!0,mimeTypes:[eT],createRenderer:gt=>new Yy(gt)},RI=[{id:"@jupyterlab/plotly-extension:factory",rendererFactory:DI,rank:2,dataType:"json",fileTypes:[{name:"plotly",mimeTypes:[eT],extensions:[".plotly",".plotly.json"],iconClass:II}],documentWidgetFactoryOptions:{name:"Plotly",primaryFileType:"plotly",fileTypes:["plotly","json"],defaultFor:["plotly"]}}],RD=RI;export{eT as MIME_TYPE,Yy as RenderedPlotly,RD as default,DI as rendererFactory}; +`}),staticAttributes:ie,staticUniforms:De}}class fi{constructor(y,O,ie){this.vertexBuffer=y,this.indexBuffer=O,this.segments=ie}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var xo=e.aS([{name:"a_pos",type:"Int16",components:2}]);let zi="#define PROJECTION_MERCATOR",so="mercator";class Mo{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return so}get shaderDefine(){return zi}get shaderPreludeCode(){return Gi.projectionMercator}get vertexShaderPreludeCode(){return Gi.projectionMercator.vertexSource}get subdivisionGranularity(){return e.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(y){}getMeshFromTileID(y,O,ie,ce,_e){if(this._cachedMesh)return this._cachedMesh;let De=new e.aU;De.emplaceBack(0,0),De.emplaceBack(e.a6,0),De.emplaceBack(0,e.a6),De.emplaceBack(e.a6,e.a6);let Ne=y.createVertexBuffer(De,xo.members),Ye=e.aV.simpleSegment(0,0,4,2),lt=new e.aW;lt.emplaceBack(1,0,2),lt.emplaceBack(1,2,3);let ct=y.createIndexBuffer(lt);return this._cachedMesh=new fi(Ne,ct,Ye),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(y){}}class So{constructor(y=0,O=0,ie=0,ce=0){if(isNaN(y)||y<0||isNaN(O)||O<0||isNaN(ie)||ie<0||isNaN(ce)||ce<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=y,this.bottom=O,this.left=ie,this.right=ce}interpolate(y,O,ie){return O.top!=null&&y.top!=null&&(this.top=e.H.number(y.top,O.top,ie)),O.bottom!=null&&y.bottom!=null&&(this.bottom=e.H.number(y.bottom,O.bottom,ie)),O.left!=null&&y.left!=null&&(this.left=e.H.number(y.left,O.left,ie)),O.right!=null&&y.right!=null&&(this.right=e.H.number(y.right,O.right,ie)),this}getCenter(y,O){let ie=e.al((this.left+y-this.right)/2,0,y),ce=e.al((this.top+O-this.bottom)/2,0,O);return new e.P(ie,ce)}equals(y){return this.top===y.top&&this.bottom===y.bottom&&this.left===y.left&&this.right===y.right}clone(){return new So(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function oi(de,y){if(!de.renderWorldCopies||de.lngRange)return;let O=y.lng-de.center.lng;y.lng+=O>180?-360:O<-180?360:0}function ii(de){return Math.max(0,Math.floor(de))}class co{constructor(y,O){var ie;this.applyConstrain=(ce,_e)=>this._constrainOverride!==null?this._constrainOverride(ce,_e):this._callbacks.defaultConstrain(ce,_e),this._callbacks=y,this._tileSize=512,this._renderWorldCopies=O?.renderWorldCopies===void 0||!!O?.renderWorldCopies,this._minZoom=O?.minZoom||0,this._maxZoom=O?.maxZoom||22,this._minPitch=O?.minPitch==null?0:O?.minPitch,this._maxPitch=O?.maxPitch==null?60:O?.maxPitch,this._constrainOverride=(ie=O?.constrainOverride)!==null&&ie!==void 0?ie:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=ii(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new So,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(y,O,ie){this._constrainOverride=y.constrainOverride,this._latRange=y.latRange,this._lngRange=y.lngRange,this._width=y.width,this._height=y.height,this._center=y.center,this._elevation=y.elevation,this._minElevationForCurrentTile=y.minElevationForCurrentTile,this._zoom=y.zoom,this._tileZoom=ii(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=y.bearingInRadians,this._fovInRadians=y.fovInRadians,this._pitchInRadians=y.pitchInRadians,this._rollInRadians=y.rollInRadians,this._unmodified=y.unmodified,this._edgeInsets=new So(y.padding.top,y.padding.bottom,y.padding.left,y.padding.right),this._minZoom=y.minZoom,this._maxZoom=y.maxZoom,this._minPitch=y.minPitch,this._maxPitch=y.maxPitch,this._renderWorldCopies=y.renderWorldCopies,this._cameraToCenterDistance=y.cameraToCenterDistance,this._nearZ=y.nearZ,this._farZ=y.farZ,this._autoCalculateNearFarZ=!ie&&y.autoCalculateNearFarZ,O&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(y){this._minElevationForCurrentTile=y}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(y){this._minZoom!==y&&(this._minZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(y){this._maxZoom!==y&&(this._maxZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(y){this._minPitch!==y&&(this._minPitch=y,this.setPitch(Math.max(this.pitch,y)))}get maxPitch(){return this._maxPitch}setMaxPitch(y){this._maxPitch!==y&&(this._maxPitch=y,this.setPitch(Math.min(this.pitch,y)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(y){y===void 0?y=!0:y===null&&(y=!1),this._renderWorldCopies=y}get constrainOverride(){return this._constrainOverride}setConstrainOverride(y){y===void 0&&(y=null),this._constrainOverride!==y&&(this._constrainOverride=y,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(y){let O=e.X(y,-180,180)*Math.PI/180;var ie,ce,_e,De,Ne,Ye,lt,ct,Ft;this._bearingInRadians!==O&&(this._unmodified=!1,this._bearingInRadians=O,this._calcMatrices(),this._rotationMatrix=a(),ie=this._rotationMatrix,_e=-this._bearingInRadians,De=(ce=this._rotationMatrix)[0],Ne=ce[1],Ye=ce[2],lt=ce[3],ct=Math.sin(_e),Ft=Math.cos(_e),ie[0]=De*Ft+Ye*ct,ie[1]=Ne*Ft+lt*ct,ie[2]=De*-ct+Ye*Ft,ie[3]=Ne*-ct+lt*Ft)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(y){let O=e.al(y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==O&&(this._unmodified=!1,this._pitchInRadians=O,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(y){let O=y/180*Math.PI;this._rollInRadians!==O&&(this._unmodified=!1,this._rollInRadians=O,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(y){y=e.al(y,.1,150),this.fov!==y&&(this._unmodified=!1,this._fovInRadians=e.an(y),this._calcMatrices())}get zoom(){return this._zoom}setZoom(y){let O=this.applyConstrain(this._center,y).zoom;this._zoom!==O&&(this._unmodified=!1,this._zoom=O,this._tileZoom=Math.max(0,Math.floor(O)),this._scale=e.ao(O),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(y){y.lat===this._center.lat&&y.lng===this._center.lng||(this._unmodified=!1,this._center=y,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(y){y!==this._elevation&&(this._elevation=y,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(y){this._edgeInsets.equals(y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,y,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(y,O){this._autoCalculateNearFarZ=!1,this._nearZ=y,this._farZ=O,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(y){return this._edgeInsets.equals(y)}interpolatePadding(y,O,ie){this._unmodified=!1,this._edgeInsets.interpolate(y,O,ie),this.constrainInternal(),this._calcMatrices()}resize(y,O,ie=!0){this._width=y,this._height=O,ie&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var y,O;return((y=this._latRange)===null||y===void 0?void 0:y.length)!==2||((O=this._lngRange)===null||O===void 0?void 0:O.length)!==2?null:new q([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(y){y?(this._lngRange=[y.getWest(),y.getEast()],this._latRange=[y.getSouth(),y.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(y,O){if(O.length===1)return[O[0],y];{let{minX:ie,minY:ce,maxX:_e,maxY:De}=e.a8.fromPoints(O).extend(y);return[new e.P(ie,ce),new e.P(_e,ce),new e.P(_e,De),new e.P(ie,De),new e.P(ie,ce)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let y=this._unmodified,{center:O,zoom:ie}=this.applyConstrain(this.center,this.zoom);this.setCenter(O),this.setZoom(ie),this._unmodified=y,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let y=e.ap(new Float64Array(16));e.S(y,y,[this._width/2,-this._height/2,1]),e.Q(y,y,[1,-1,0]),this._clipSpaceToPixelsMatrix=y,y=e.ap(new Float64Array(16)),e.S(y,y,[1,-1,1]),e.Q(y,y,[-1,-1,0]),e.S(y,y,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=y,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){let _e=ie!==void 0?ie:this.bearing,De=ce=ce!==void 0?ce:this.pitch,{distanceToCenter:Ne,clampedElevation:Ye}=this._distanceToCenterFromAltElevationPitch(O,this.elevation,De),{x:lt,y:ct}=vt(De,_e),Ft=e.a7.fromLngLat(y,O),Gt,Jt,it=e.aY(1,Ft.y),Rt=0;do{if(Rt+=1,Rt>10)break;Jt=Ne/it,Gt=new e.a7(Ft.x+lt*Jt,Ft.y+ct*Jt),it=1/Gt.meterInMercatorCoordinateUnits()}while(Math.abs(Ne-Jt*it)>1e-12);return{center:Gt.toLngLat(),elevation:Ye,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/Jt/this.tileSize)}}recalculateZoomAndCenter(y){if(this.elevation-y==0)return;let O=1/this.worldSize,ie=e.aq(1,this.center.lat)*this.worldSize,ce=e.a7.fromLngLat(this.center,this.elevation),_e=ce.x/O,De=ce.y/O,Ne=ce.z/O,Ye=this.pitch,lt=this.bearing,{x:ct,y:Ft,z:Gt}=vt(Ye,lt),Jt=this.cameraToCenterDistance,it=_e+Jt*-ct,Rt=De+Jt*-Ft,qt=Ne+Jt*Gt,{distanceToCenter:or,clampedElevation:vr}=this._distanceToCenterFromAltElevationPitch(qt/ie,y,Ye),Ar=or*ie,dr=new e.a7((it+ct*Ar)*O,(Rt+Ft*Ar)*O,0).toLngLat(),mr=e.aq(1,dr.lat),qr=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/or/mr/this.tileSize);this._elevation=vr,this._center=dr,this.setZoom(qr)}_distanceToCenterFromAltElevationPitch(y,O,ie){let ce=-Math.cos(e.an(ie)),_e=y-O,De,Ne=O;return ce*_e>=0||Math.abs(ce)<.1?(De=1e4,Ne=y+De*ce):De=-_e/ce,{distanceToCenter:De,clampedElevation:Ne}}getCameraPoint(){let y=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(y*Math.sin(this.rollInRadians),y*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/y).toLngLat()}getMercatorTileCoordinates(y){if(!y)return[0,0,1,1];let O=y.canonical.z>=0?1<this.max[0]||y.aabb.min[1]>this.max[1]||y.aabb.min[2]>this.max[2]||y.aabb.max[0]0?(O+=y[ce]*this.min[ce],ie+=y[ce]*this.max[ce]):(ie+=y[ce]*this.min[ce],O+=y[ce]*this.max[ce]);return O>=0?2:ie<0?0:1}}class Ho{distanceToTile2d(y,O,ie,ce){let _e=ce,De=_e.distanceX([y,O]),Ne=_e.distanceY([y,O]);return Math.hypot(De,Ne)}getWrap(y,O,ie){return ie}getTileBoundingVolume(y,O,ie,ce){var _e,De;let Ne=0,Ye=0;if(ce?.terrain){let ct=new e.a3(y.z,O,y.z,y.x,y.y),Ft=ce.terrain.getMinMaxElevation(ct);Ne=(_e=Ft.minElevation)!==null&&_e!==void 0?_e:Math.min(0,ie),Ye=(De=Ft.maxElevation)!==null&&De!==void 0?De:Math.max(0,ie)}let lt=1<ce}allowWorldCopies(){return!0}prepareNextFrame(){}}class Io{constructor(y,O,ie){this.points=y,this.planes=O,this.aabb=ie}static fromInvProjectionMatrix(y,O=1,ie=0,ce,_e){let De=_e?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],Ne=Math.pow(2,ie),Ye=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Gt=>function(Jt,it,Rt,qt){let or=e.aE([],Jt,it),vr=1/or[3]/Rt*qt;return e.b4(or,or,[vr,vr,1/or[3],vr])}(Gt,y,O,Ne));ce&&function(Gt,Jt,it,Rt){let qt=Rt?4:0,or=Rt?0:4,vr=0,Ar=[],dr=[];for(let Lr=0;Lr<4;Lr++){let cn=e.b0([],Gt[Lr+or],Gt[Lr+qt]),Nn=e.b5(cn);e.aZ(cn,cn,1/Nn),Ar.push(Nn),dr.push(cn)}for(let Lr=0;Lr<4;Lr++){let cn=e.b6(Gt[Lr+qt],dr[Lr],it);vr=cn!==null&&cn>=0?Math.max(vr,cn):Math.max(vr,Ar[Lr])}let mr=function(Lr,cn){let Nn=e.b0([],Lr[cn[0]],Lr[cn[1]]),Dn=e.b0([],Lr[cn[2]],Lr[cn[1]]),qn=[0,0,0,0];return e.b1(qn,e.b2([],Nn,Dn)),qn[3]=-e.b3(qn,Lr[cn[0]]),qn}(Gt,Jt),qr=function(Lr,cn){let Nn=e.b7(Lr),Dn=e.b8([],Lr,1/Nn),qn=e.b0([],cn,e.aZ([],Dn,e.b3(cn,Dn))),_n=e.b7(qn);if(_n>0){let vn=Math.sqrt(1-Dn[3]*Dn[3]),Sn=e.aZ([],Dn,-Dn[3]),Tn=e.a_([],Sn,e.aZ([],qn,vn/_n));return e.b9(cn,Tn)}return null}(it,mr);if(qr!==null){let Lr=qr/e.b3(dr[0],mr);vr=Math.min(vr,Lr)}for(let Lr=0;Lr<4;Lr++){let cn=Math.min(vr,Ar[Lr]);Gt[Lr+or]=[Gt[Lr+qt][0]+dr[Lr][0]*cn,Gt[Lr+qt][1]+dr[Lr][1]*cn,Gt[Lr+qt][2]+dr[Lr][2]*cn,1]}}(Ye,De[0],ce,_e);let lt=De.map(Gt=>{let Jt=e.b0([],Ye[Gt[0]],Ye[Gt[1]]),it=e.b0([],Ye[Gt[2]],Ye[Gt[1]]),Rt=e.b1([],e.b2([],Jt,it)),qt=-e.b3(Rt,Ye[Gt[1]]);return Rt.concat(qt)}),ct=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Ft=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let Gt of Ye)for(let Jt=0;Jt<3;Jt++)ct[Jt]=Math.min(ct[Jt],Gt[Jt]),Ft[Jt]=Math.max(Ft[Jt],Gt[Jt]);return new Io(Ye,lt,new Wi(ct,Ft))}}class qo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,O,ie){this._helper.interpolatePadding(y,O,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,O,ie=!0){this._helper.resize(y,O,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,O){this._helper.overrideNearFarZ(y,O)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(y,O){}constructor(y){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(O,ie)=>{ie=e.al(+ie,this.minZoom,this.maxZoom);let ce={center:new e.W(O.lng,O.lat),zoom:ie},_e=this._helper._lngRange;if(!this._helper._renderWorldCopies&&_e===null){let dr=179.9999999999;_e=[-dr,dr]}let De=this.tileSize*e.ao(ce.zoom),Ne=0,Ye=De,lt=0,ct=De,Ft=0,Gt=0,{x:Jt,y:it}=this.size;if(this._helper._latRange){let dr=this._helper._latRange;Ne=e.Y(dr[1])*De,Ye=e.Y(dr[0])*De,Ye-NeYe&&(vr=Ye-dr)}if(_e){let dr=(lt+ct)/2,mr=Rt;this._helper._renderWorldCopies&&(mr=e.X(Rt,dr-De/2,dr+De/2));let qr=Jt/2;mr-qrct&&(or=ct-qr)}if(or!==void 0||vr!==void 0){let dr=new e.P(or??Rt,vr??qt);ce.center=_r(De,dr).wrap()}return ce},this.applyConstrain=(O,ie)=>this._helper.applyConstrain(O,ie),this._helper=new co({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(O,ie)=>this.defaultConstrain(O,ie)},y),this._coveringTilesDetailsProvider=new Ho}clone(){let y=new qo;return y.apply(this,!1),y}apply(y,O,ie){this._helper.apply(y,O,ie)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(y){let O=[new e.ba(0,y)];if(this._helper._renderWorldCopies){let ie=this.screenPointToMercatorCoordinate(new e.P(0,0)),ce=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),_e=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),De=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),Ne=Math.floor(Math.min(ie.x,ce.x,_e.x,De.x)),Ye=Math.floor(Math.max(ie.x,ce.x,_e.x,De.x)),lt=1;for(let ct=Ne-lt;ct<=Ye+lt;ct++)ct!==0&&O.push(new e.ba(ct,y))}return O}getCameraFrustum(){return Io.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(y){let O=this.screenPointToLocation(this.centerPoint,y),ie=y?y.getElevationForLngLatZoom(O,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(ie)}setLocationAtPoint(y,O){let ie=e.aq(this.elevation,this.center.lat),ce=this.screenPointToMercatorCoordinateAtZ(O,ie),_e=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,ie),De=e.a7.fromLngLat(y),Ne=new e.a7(De.x-(ce.x-_e.x),De.y-(ce.y-_e.y));this.setCenter(Ne?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(y,O){return O?this.coordinatePoint(e.a7.fromLngLat(y),O.getElevationForLngLat(y,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(y))}screenPointToLocation(y,O){var ie;return(ie=this.screenPointToMercatorCoordinate(y,O))===null||ie===void 0?void 0:ie.toLngLat()}screenPointToMercatorCoordinate(y,O){if(O){let ie=O.pointCoordinate(y);if(ie!=null)return ie}return this.screenPointToMercatorCoordinateAtZ(y)}screenPointToMercatorCoordinateAtZ(y,O){let ie=O||0,ce=[y.x,y.y,0,1],_e=[y.x,y.y,1,1];e.aE(ce,ce,this._pixelMatrixInverse),e.aE(_e,_e,this._pixelMatrixInverse);let De=ce[3],Ne=_e[3],Ye=ce[1]/De,lt=_e[1]/Ne,ct=ce[2]/De,Ft=_e[2]/Ne,Gt=ct===Ft?0:(ie-ct)/(Ft-ct);return new e.a7(e.H.number(ce[0]/De,_e[0]/Ne,Gt)/this.worldSize,e.H.number(Ye,lt,Gt)/this.worldSize,ie)}coordinatePoint(y,O=0,ie=this._pixelMatrix){let ce=[y.x*this.worldSize,y.y*this.worldSize,O,1];return e.aE(ce,ce,ie),new e.P(ce[0]/ce[3],ce[1]/ce[3])}getBounds(){let y=Math.max(0,this._helper._height/2-Zt(this));return new q().extend(this.screenPointToLocation(new e.P(0,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(y,O){return O?O.pointCoordinate(y)!=null:y.y>this.height/2-Zt(this)}calculatePosMatrix(y,O=!1,ie){var ce;let _e=(ce=y.key)!==null&&ce!==void 0?ce:e.bb(y.wrap,y.canonical.z,y.canonical.z,y.canonical.x,y.canonical.y),De=O?this._alignedPosMatrixCache:this._posMatrixCache;if(De.has(_e)){let lt=De.get(_e);return ie?lt.f32:lt.f64}let Ne=sr(y,this.worldSize);e.U(Ne,O?this._alignedProjMatrix:this._viewProjMatrix,Ne);let Ye={f64:Ne,f32:new Float32Array(Ne)};return De.set(_e,Ye),ie?Ye.f32:Ye.f64}calculateFogMatrix(y){let O=y.key,ie=this._fogMatrixCacheF32;if(ie.has(O))return ie.get(O);let ce=sr(y,this.worldSize);return e.U(ce,this._fogMatrix,ce),ie.set(O,new Float32Array(ce)),ie.get(O)}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){return this._helper.calculateCenterFromCameraLngLatAlt(y,O,ie,ce)}_calculateNearFarZIfNeeded(y,O,ie){if(!this._helper.autoCalculateNearFarZ)return;let ce=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),_e=y-ce*this._helper._pixelPerMeter/Math.cos(O),De=ce<0?_e:y,Ne=Math.PI/2+this.pitchInRadians,Ye=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+ie.y/this.height),lt=Math.sin(Ye)*De/Math.sin(e.al(Math.PI-Ne-Ye,.01,Math.PI-.01)),ct=Zt(this),Ft=Math.atan(ct/this._helper.cameraToCenterDistance),Gt=e.an(.75),Jt=Ft>Gt?2*Ft*(.5+ie.y/(2*ct)):Gt,it=Math.sin(Jt)*De/Math.sin(e.al(Math.PI-Ne-Jt,.01,Math.PI-.01)),Rt=Math.min(lt,it);this._helper._farZ=1.01*(Math.cos(Math.PI/2-O)*Rt+De),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let y=this.centerOffset,O=nr(this.worldSize,this.center),ie=O.x,ce=O.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;let _e=e.an(Math.min(this.pitch,Kt)),De=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(_e)),Ne;var Ye,lt;this._calculateNearFarZIfNeeded(De,_e,y),Ne=new Float64Array(16),e.bc(Ne,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ye=this._invProjMatrix)[0]=1/(lt=Ne)[0],Ye[1]=0,Ye[2]=0,Ye[3]=0,Ye[4]=0,Ye[5]=1/lt[5],Ye[6]=0,Ye[7]=0,Ye[8]=0,Ye[9]=0,Ye[10]=0,Ye[11]=1/lt[14],Ye[12]=0,Ye[13]=0,Ye[14]=-1,Ye[15]=lt[10]/lt[14],Ne[8]=2*-y.x/this._helper._width,Ne[9]=2*y.y/this._helper._height,this._projectionMatrix=e.bd(Ne),e.S(Ne,Ne,[1,-1,1]),e.Q(Ne,Ne,[0,0,-this._helper.cameraToCenterDistance]),e.be(Ne,Ne,-this.rollInRadians),e.bf(Ne,Ne,this.pitchInRadians),e.be(Ne,Ne,-this.bearingInRadians),e.Q(Ne,Ne,[-ie,-ce,0]),this._mercatorMatrix=e.S([],Ne,[this.worldSize,this.worldSize,this.worldSize]),e.S(Ne,Ne,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,Ne),e.Q(Ne,Ne,[0,0,-this.elevation]),this._viewProjMatrix=Ne,this._invViewProjMatrix=e.bg([],Ne);let ct=[0,0,-1,1];e.aE(ct,ct,this._invViewProjMatrix),this._cameraPosition=[ct[0]/ct[3],ct[1]/ct[3],ct[2]/ct[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,De,this._helper._farZ),this._fogMatrix[8]=2*-y.x/this.width,this._fogMatrix[9]=2*y.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-ie,-ce,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,Ne);let Ft=this._helper._width%2/2,Gt=this._helper._height%2/2,Jt=Math.cos(this.bearingInRadians),it=Math.sin(-this.bearingInRadians),Rt=ie-Math.round(ie)+Jt*Ft+it*Gt,qt=ce-Math.round(ce)+Jt*Gt+it*Ft,or=new Float64Array(Ne);if(e.Q(or,or,[Rt>.5?Rt-1:Rt,qt>.5?qt-1:qt,0]),this._alignedProjMatrix=or,Ne=e.bg(new Float64Array(16),this._pixelMatrix),!Ne)throw new Error("failed to invert matrix");this._pixelMatrixInverse=Ne,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let y=this.screenPointToMercatorCoordinate(new e.P(0,0)),O=[y.x*this.worldSize,y.y*this.worldSize,0,1];return e.aE(O,O,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/y).toLngLat()}lngLatToCameraDepth(y,O){let ie=e.a7.fromLngLat(y),ce=[ie.x*this.worldSize,ie.y*this.worldSize,O,1];return e.aE(ce,ce,this._viewProjMatrix),ce[2]/ce[3]}getProjectionData(y){let{overscaledTileID:O,aligned:ie,applyTerrainMatrix:ce}=y,_e=this._helper.getMercatorTileCoordinates(O),De=O?this.calculatePosMatrix(O,ie,!0):null,Ne;return Ne=O?.terrainRttPosMatrix32f&&ce?O.terrainRttPosMatrix32f:De||e.bh(),{mainMatrix:Ne,tileMercatorCoords:_e,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:Ne}}isLocationOccluded(y){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(y,O,ie){return 1}transformLightDirection(y){return e.a$(y)}getRayDirectionFromPixel(y){throw new Error("Not implemented.")}projectTileCoordinates(y,O,ie,ce){let _e=this.calculatePosMatrix(ie),De;ce?(De=[y,O,ce(y,O),1],e.aE(De,De,_e)):(De=[y,O,0,1],Kn(De,De,_e));let Ne=De[3];return{point:new e.P(De[0]/Ne,De[1]/Ne),signedDistanceFromCamera:Ne,isOccluded:!1}}populateCache(y){for(let O of y)this.calculatePosMatrix(O)}getMatrixForModel(y,O){let ie=e.a7.fromLngLat(y,O),ce=ie.meterInMercatorCoordinateUnits(),_e=e.bi();return e.Q(_e,_e,[ie.x,ie.y,ie.z]),e.be(_e,_e,Math.PI),e.bf(_e,_e,Math.PI/2),e.S(_e,_e,[-ce,ce,ce]),_e}getProjectionDataForCustomLayer(y=!0){let O=new e.a3(0,0,0,0,0),ie=this.getProjectionData({overscaledTileID:O,applyGlobeMatrix:y}),ce=sr(O,this.worldSize);e.U(ce,this._viewProjMatrix,ce),ie.tileMercatorCoords=[0,0,1,1];let _e=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],De=e.bj();return e.S(De,ce,_e),ie.fallbackMatrix=De,ie.mainMatrix=De,ie}getFastPathSimpleProjectionMatrix(y){return this.calculatePosMatrix(y)}}function Oo(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ws(de){if(de.useSlerp)if(de.k<1){let y=e.bk(de.startEulerAngles.roll,de.startEulerAngles.pitch,de.startEulerAngles.bearing),O=e.bk(de.endEulerAngles.roll,de.endEulerAngles.pitch,de.endEulerAngles.bearing),ie=new Float64Array(4);e.bl(ie,y,O,de.k);let ce=e.bm(ie);de.tr.setRoll(ce.roll),de.tr.setPitch(ce.pitch),de.tr.setBearing(ce.bearing)}else de.tr.setRoll(de.endEulerAngles.roll),de.tr.setPitch(de.endEulerAngles.pitch),de.tr.setBearing(de.endEulerAngles.bearing);else de.tr.setRoll(e.H.number(de.startEulerAngles.roll,de.endEulerAngles.roll,de.k)),de.tr.setPitch(e.H.number(de.startEulerAngles.pitch,de.endEulerAngles.pitch,de.k)),de.tr.setBearing(e.H.number(de.startEulerAngles.bearing,de.endEulerAngles.bearing,de.k))}function Ko(de,y,O,ie,ce){let _e=ce.padding,De=nr(ce.worldSize,O.getNorthWest()),Ne=nr(ce.worldSize,O.getNorthEast()),Ye=nr(ce.worldSize,O.getSouthEast()),lt=nr(ce.worldSize,O.getSouthWest()),ct=e.an(-ie),Ft=De.rotate(ct),Gt=Ne.rotate(ct),Jt=Ye.rotate(ct),it=lt.rotate(ct),Rt=new e.P(Math.max(Ft.x,Gt.x,it.x,Jt.x),Math.max(Ft.y,Gt.y,it.y,Jt.y)),qt=new e.P(Math.min(Ft.x,Gt.x,it.x,Jt.x),Math.min(Ft.y,Gt.y,it.y,Jt.y)),or=Rt.sub(qt),vr=(ce.width-(_e.left+_e.right+y.left+y.right))/or.x,Ar=(ce.height-(_e.top+_e.bottom+y.top+y.bottom))/or.y;if(Ar<0||vr<0)return void Oo();let dr=Math.min(e.ar(ce.scale*Math.min(vr,Ar)),de.maxZoom),mr=e.P.convert(de.offset),qr=new e.P((y.left-y.right)/2,(y.top-y.bottom)/2).rotate(e.an(ie)),Lr=mr.add(qr).mult(ce.scale/e.ao(dr));return{center:_r(ce.worldSize,De.add(Ye).div(2).sub(Lr)),zoom:dr,bearing:ie}}class ns{get useGlobeControls(){return!1}handlePanInertia(y,O){let ie=y.mag(),ce=Math.abs(Zt(O));return{easingOffset:y.mult(Math.min(.75*ce/ie,1)),easingCenter:O.center}}handleMapControlsRollPitchBearingZoom(y,O){y.bearingDelta&&O.setBearing(O.bearing+y.bearingDelta),y.pitchDelta&&O.setPitch(O.pitch+y.pitchDelta),y.rollDelta&&O.setRoll(O.roll+y.rollDelta),y.zoomDelta&&O.setZoom(O.zoom+y.zoomDelta)}handleMapControlsPan(y,O,ie){y.around.distSqr(O.centerPoint)<.01||O.setLocationAtPoint(ie,y.around)}cameraForBoxAndBearing(y,O,ie,ce,_e){return Ko(y,O,ie,ce,_e)}handleJumpToCenterZoom(y,O){y.zoom!==(O.zoom!==void 0?+O.zoom:y.zoom)&&y.setZoom(+O.zoom),O.center!==void 0&&y.setCenter(e.W.convert(O.center))}handleEaseTo(y,O){let ie=y.zoom,ce=y.padding,_e={roll:y.roll,pitch:y.pitch,bearing:y.bearing},De={roll:O.roll===void 0?y.roll:O.roll,pitch:O.pitch===void 0?y.pitch:O.pitch,bearing:O.bearing===void 0?y.bearing:O.bearing},Ne=O.zoom!==void 0,Ye=!y.isPaddingEqual(O.padding),lt=!1,ct=Ne?+O.zoom:y.zoom,Ft=y.centerPoint.add(O.offsetAsPoint),Gt=y.screenPointToLocation(Ft),{center:Jt,zoom:it}=y.applyConstrain(e.W.convert(O.center||Gt),ct??ie);oi(y,Jt);let Rt=nr(y.worldSize,Gt),qt=nr(y.worldSize,Jt).sub(Rt),or=e.ao(it-ie);return lt=it!==ie,{easeFunc:vr=>{if(lt&&y.setZoom(e.H.number(ie,it,vr)),e.bn(_e,De)||ws({startEulerAngles:_e,endEulerAngles:De,tr:y,k:vr,useSlerp:_e.roll!=De.roll}),Ye&&(y.interpolatePadding(ce,O.padding,vr),Ft=y.centerPoint.add(O.offsetAsPoint)),O.around)y.setLocationAtPoint(O.around,O.aroundPoint);else{let Ar=e.ao(y.zoom-ie),dr=it>ie?Math.min(2,or):Math.max(.5,or),mr=Math.pow(dr,1-vr),qr=_r(y.worldSize,Rt.add(qt.mult(vr*mr)).mult(Ar));y.setLocationAtPoint(y.renderWorldCopies?qr.wrap():qr,Ft)}},isZooming:lt,elevationCenter:Jt}}handleFlyTo(y,O){let ie=O.zoom!==void 0,ce=y.zoom,_e=y.applyConstrain(e.W.convert(O.center||O.locationAtOffset),ie?+O.zoom:ce),De=_e.center,Ne=_e.zoom;oi(y,De);let Ye=nr(y.worldSize,O.locationAtOffset),lt=nr(y.worldSize,De).sub(Ye),ct=lt.mag(),Ft=e.ao(Ne-ce),Gt;if(O.minZoom!==void 0){let Jt=Math.min(+O.minZoom,ce,Ne),it=y.applyConstrain(De,Jt).zoom;Gt=e.ao(it-ce)}return{easeFunc:(Jt,it,Rt,qt)=>{y.setZoom(Jt===1?Ne:ce+e.ar(it));let or=Jt===1?De:_r(y.worldSize,Ye.add(lt.mult(Rt)).mult(it));y.setLocationAtPoint(y.renderWorldCopies?or.wrap():or,qt)},scaleOfZoom:Ft,targetCenter:De,scaleOfMinZoom:Gt,pixelPathLength:ct}}}class wo{constructor(y,O,ie){this.blendFunction=y,this.blendColor=O,this.mask=ie}}wo.Replace=[1,0],wo.disabled=new wo(wo.Replace,e.bo.transparent,[!1,!1,!1,!1]),wo.unblended=new wo(wo.Replace,e.bo.transparent,[!0,!0,!0,!0]),wo.alphaBlended=new wo([1,771],e.bo.transparent,[!0,!0,!0,!0]);let No=2305;class Di{constructor(y,O,ie){this.enable=y,this.mode=O,this.frontFace=ie}}Di.disabled=new Di(!1,1029,No),Di.backCCW=new Di(!0,1029,No),Di.frontCCW=new Di(!0,1028,No);class lo{constructor(y,O,ie){this.func=y,this.mask=O,this.range=ie}}lo.ReadOnly=!1,lo.ReadWrite=!0,lo.disabled=new lo(519,lo.ReadOnly,[0,1]);let Go=7680;class mo{constructor(y,O,ie,ce,_e,De){this.test=y,this.ref=O,this.mask=ie,this.fail=ce,this.depthFail=_e,this.pass=De}}function us(de){return typeof WebGL2RenderingContext<"u"&&de instanceof WebGL2RenderingContext}mo.disabled=new mo({func:519,mask:0},0,0,Go,Go,Go);class Jo{get awaitingQuery(){return!!this._readbackQueue}constructor(y){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=y;let O=y.context,ie=O.gl;this._texFormat=ie.RGBA,this._texType=ie.UNSIGNED_BYTE;let ce=new e.aU;ce.emplaceBack(-1,-1),ce.emplaceBack(2,-1),ce.emplaceBack(-1,2);let _e=new e.aW;_e.emplaceBack(0,1,2),this._fullscreenTriangle=new fi(O.createVertexBuffer(ce,xo.members),O.createIndexBuffer(_e),e.aV.simpleSegment(0,0,ce.length,_e.length)),this._resultBuffer=new Uint8Array(4),O.activeTexture.set(ie.TEXTURE1);let De=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,De),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.NEAREST),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.NEAREST),ie.texImage2D(ie.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=O.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(De),us(ie)&&(this._pbo=ie.createBuffer(),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,this._pbo),ie.bufferData(ie.PIXEL_PACK_BUFFER,4,ie.STREAM_READ),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,null))}destroy(){let y=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),y.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(y,O){let ie=this._updateCount;return this._readbackQueue?ie>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():ie>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(y,O),this._updateCount++,this._measuredError}_bindFramebuffer(){let y=this._cachedRenderContext.context,O=y.gl;y.activeTexture.set(O.TEXTURE1),O.bindTexture(O.TEXTURE_2D,this._fbo.colorAttachment.get()),y.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(y,O){let ie=this._cachedRenderContext.context,ce=ie.gl;if(this._bindFramebuffer(),ie.viewport.set([0,0,this._texWidth,this._texHeight]),ie.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(ie,ce.TRIANGLES,lo.disabled,mo.disabled,wo.unblended,Di.disabled,((_e,De)=>({u_input:_e,u_output_expected:De}))(y,O),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&us(ce)){ce.bindBuffer(ce.PIXEL_PACK_BUFFER,this._pbo),ce.readBuffer(ce.COLOR_ATTACHMENT0),ce.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),ce.bindBuffer(ce.PIXEL_PACK_BUFFER,null);let _e=ce.fenceSync(ce.SYNC_GPU_COMMANDS_COMPLETE,0);ce.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:_e}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let y=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&us(y)){let O=y.clientWaitSync(this._readbackQueue.sync,0,0);if(O===y.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(O===y.TIMEOUT_EXPIRED)return;y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.getBufferSubData(y.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),y.bindBuffer(y.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Jo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(y){let O=0;return O+=y[0]/256,O+=y[1]/65536,O+=y[2]/16777216,y[3]<127&&(O=-O),O/128}}let zs=e.a6/128;function Is(de,y){let O=de.granularity!==void 0?Math.max(de.granularity,1):1,ie=O+(de.generateBorders?2:0),ce=O+(de.extendToNorthPole||de.generateBorders?1:0)+(de.extendToSouthPole||de.generateBorders?1:0),_e=ie+1,De=ce+1,Ne=de.generateBorders?-1:0,Ye=de.generateBorders||de.extendToNorthPole?-1:0,lt=O+(de.generateBorders?1:0),ct=O+(de.generateBorders||de.extendToSouthPole?1:0),Ft=_e*De,Gt=ie*ce*6,Jt=_e*De>65536;if(Jt&&y==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let it=Jt||y==="32bit",Rt=new Int16Array(2*Ft),qt=0;for(let Ar=Ye;Ar<=ct;Ar++)for(let dr=Ne;dr<=lt;dr++){let mr=dr/O*e.a6;dr===-1&&(mr=-zs),dr===O+1&&(mr=e.a6+zs);let qr=Ar/O*e.a6;Ar===-1&&(qr=de.extendToNorthPole?e.bq:-zs),Ar===O+1&&(qr=de.extendToSouthPole?e.br:e.a6+zs),Rt[qt++]=mr,Rt[qt++]=qr}let or=it?new Uint32Array(Gt):new Uint16Array(Gt),vr=0;for(let Ar=0;Ar0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(y){this._mercatorProjection.updateGPUdependent(y),this._verticalPerspectiveProjection.updateGPUdependent(y)}getMeshFromTileID(y,O,ie,ce,_e){return this.currentProjection.getMeshFromTileID(y,O,ie,ce,_e)}setProjection(y){this._transitionable.setValue("type",y?.type||"mercator")}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}setErrorQueryLatitudeDegrees(y){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(y),this._mercatorProjection.setErrorQueryLatitudeDegrees(y)}}function Fo(de){let y=Ls(de.worldSize,de.center.lat);return 2*Math.PI*y}function Ji(de,y,O,ie,ce){let _e=1/(1<1e-6){let ie=de[0]/O,ce=Math.acos(de[2]/O),_e=(ie>0?ce:-ce)/Math.PI*180;return new e.W(e.X(_e,-180,180),y)}return new e.W(0,y)}function ml(de){return Math.cos(de*Math.PI/180)}function Ts(de,y){let O=ml(de),ie=ml(y);return e.ar(ie/O)}function yl(de,y){let O=de.rotate(y.bearingInRadians),ie=y.zoom+Ts(y.center.lat,0),ce=e.bt(1/ml(y.center.lat),1/ml(Math.min(Math.abs(y.center.lat),60)),e.bw(ie,7,3,0,1)),_e=360/Fo({worldSize:y.worldSize,center:{lat:y.center.lat}});return new e.W(y.center.lng-O.x*_e*ce,e.al(y.center.lat+O.y*_e,-e.am,e.am))}function mu(de){let y=.5*de,O=Math.sin(y),ie=Math.cos(y);return Math.log(O+ie)-Math.log(ie-O)}function su(de,y,O,ie){let ce=de.lat+O*ie;if(Math.abs(O)>1){let _e=(Math.sign(de.lat+O)!==Math.sign(de.lat)?-Math.abs(de.lat):Math.abs(de.lat))*Math.PI/180,De=Math.abs(de.lat+O)*Math.PI/180,Ne=mu(_e+ie*(De-_e)),Ye=mu(_e),lt=mu(De);return new e.W(de.lng+y*((Ne-Ye)/(lt-Ye)),ce)}return new e.W(de.lng+y*ie,ce)}class cc{constructor(y){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=y}swapBuffers(){if(!this._hadAnyChanges)return;let y=this._cachePrevious;this._cachePrevious=this._cache,this._cache=y,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(y,O,ie,ce){let _e=`${y.z}_${y.x}_${y.y}_${ce?.terrain?"t":""}`,De=this._cache.get(_e);if(De)return De;let Ne=this._cachePrevious.get(_e);if(Ne)return this._cache.set(_e,Ne),Ne;let Ye=this._boundingVolumeFactory(y,O,ie,ce);return this._cache.set(_e,Ye),this._hadAnyChanges=!0,Ye}}class Bl{constructor(y,O,ie,ce){this.min=ie,this.max=ce,this.points=y,this.planes=O}static fromAabb(y,O){let ie=[];for(let ce=0;ce<8;ce++)ie.push([1&~ce?y[0]:O[0],(ce>>1&1)==1?O[1]:y[1],(ce>>2&1)==1?O[2]:y[2]]);return new Bl(ie,[[-1,0,0,O[0]],[1,0,0,-y[0]],[0,-1,0,O[1]],[0,1,0,-y[1]],[0,0,-1,O[2]],[0,0,1,-y[2]]],y,O)}static fromCenterSizeAngles(y,O,ie){let ce=e.bA([],ie[0],ie[1],ie[2]),_e=e.bB([],[O[0],0,0],ce),De=e.bB([],[0,O[1],0],ce),Ne=e.bB([],[0,0,O[2]],ce),Ye=[...y],lt=[...y];for(let Ft=0;Ft<8;Ft++)for(let Gt=0;Gt<3;Gt++){let Jt=y[Gt]+_e[Gt]*(1&~Ft?-1:1)+De[Gt]*((Ft>>1&1)==1?1:-1)+Ne[Gt]*((Ft>>2&1)==1?1:-1);Ye[Gt]=Math.min(Ye[Gt],Jt),lt[Gt]=Math.max(lt[Gt],Jt)}let ct=[];for(let Ft=0;Ft<8;Ft++){let Gt=[...y];e.a_(Gt,Gt,e.aZ([],_e,1&~Ft?-1:1)),e.a_(Gt,Gt,e.aZ([],De,(Ft>>1&1)==1?1:-1)),e.a_(Gt,Gt,e.aZ([],Ne,(Ft>>2&1)==1?1:-1)),ct.push(Gt)}return new Bl(ct,[[..._e,-e.b3(_e,ct[0])],[...De,-e.b3(De,ct[0])],[...Ne,-e.b3(Ne,ct[0])],[-_e[0],-_e[1],-_e[2],-e.b3(_e,ct[7])],[-De[0],-De[1],-De[2],-e.b3(De,ct[7])],[-Ne[0],-Ne[1],-Ne[2],-e.b3(Ne,ct[7])]],Ye,lt)}intersectsFrustum(y){let O=!0,ie=this.points.length,ce=this.planes.length,_e=y.planes.length,De=y.points.length;for(let Ne=0;Ne<_e;Ne++){let Ye=y.planes[Ne],lt=0;for(let ct=0;ct=0&<++}if(lt===0)return 0;lt=0&<++}if(lt===0)return 0}return 1}intersectsPlane(y){let O=this.points.length,ie=0;for(let ce=0;ce=0&&ie++}return ie===O?2:ie===0?0:1}}function _l(de,y,O){let ie=de-y;return ie<0?-ie:Math.max(0,ie-O)}function ju(de,y,O,ie,ce){let _e=de-O,De;return De=_e<0?Math.min(-_e,1+_e-ce):_e>ce?Math.min(Math.max(_e-ce,0),1-_e):0,Math.max(De,_l(y,ie,ce))}class lu{constructor(){this._boundingVolumeCache=new cc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(y,O,ie,ce){let _e=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(y,O,ie,ce){return this._boundingVolumeCache.getTileBoundingVolume(y,O,ie,ce)}_computeTileBoundingVolume(y,O,ie,ce){var _e,De;let Ne=0,Ye=0;if(ce?.terrain){let lt=new e.a3(y.z,O,y.z,y.x,y.y),ct=ce.terrain.getMinMaxElevation(lt);Ne=(_e=ct.minElevation)!==null&&_e!==void 0?_e:Math.min(0,ie),Ye=(De=ct.maxElevation)!==null&&De!==void 0?De:Math.max(0,ie)}if(Ne/=e.bD,Ye/=e.bD,Ne+=1,Ye+=1,y.z<=0)return Bl.fromAabb([-Ye,-Ye,-Ye],[Ye,Ye,Ye]);if(y.z===1)return Bl.fromAabb([y.x===0?-Ye:0,y.y===0?0:-Ye,-Ye],[y.x===0?0:Ye,y.y===0?Ye:0,Ye]);{let lt=[Ji(0,0,y.x,y.y,y.z),Ji(e.a6,0,y.x,y.y,y.z),Ji(e.a6,e.a6,y.x,y.y,y.z),Ji(0,e.a6,y.x,y.y,y.z)],ct=[];for(let qn of lt)ct.push(e.aZ([],qn,Ye));if(Ye!==Ne)for(let qn of lt)ct.push(e.aZ([],qn,Ne));y.y===0&&ct.push([0,1,0]),y.y===(1<=(1<{let ce=e.al(O.lat,-e.am,e.am),_e=e.al(+ie,this.minZoom+Ts(0,ce),this.maxZoom);return{center:new e.W(O.lng,ce),zoom:_e}},this.applyConstrain=(O,ie)=>this._helper.applyConstrain(O,ie),this._helper=new co({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(O,ie)=>this.defaultConstrain(O,ie)},y),this._coveringTilesDetailsProvider=new lu}clone(){let y=new As;return y.apply(this,!1),y}apply(y,O,ie){this._globeLatitudeErrorCorrectionRadians=ie||0,this._helper.apply(y,O)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let y=e.bz();return y[0]=this._cameraPosition[0],y[1]=this._cameraPosition[1],y[2]=this._cameraPosition[2],y}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(y){let{overscaledTileID:O,applyGlobeMatrix:ie}=y,ce=this._helper.getMercatorTileCoordinates(O);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:ce,clippingPlane:this._cachedClippingPlane,projectionTransition:ie?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(y){let O=this.pitchInRadians,ie=this.cameraToCenterDistance/y,ce=Math.sin(O)*ie,_e=Math.cos(O)*ie+1,De=1/Math.sqrt(ce*ce+_e*_e)*1,Ne=-ce,Ye=_e,lt=Math.sqrt(Ne*Ne+Ye*Ye);Ne/=lt,Ye/=lt;let ct=[0,Ne,Ye];e.bF(ct,ct,[0,0,0],-this.bearingInRadians),e.bG(ct,ct,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(ct,ct,[0,0,0],this.center.lng*Math.PI/180);let Ft=1/e.b5(ct);return e.aZ(ct,ct,Ft),[...ct,-De*Ft]}isLocationOccluded(y){return!this.isSurfacePointVisible(Ro(y))}transformLightDirection(y){let O=this._helper._center.lng*Math.PI/180,ie=this._helper._center.lat*Math.PI/180,ce=Math.cos(ie),_e=[Math.sin(O)*ce,Math.sin(ie),Math.cos(O)*ce],De=[_e[2],0,-_e[0]],Ne=[0,0,0];e.b2(Ne,De,_e),e.b1(De,De),e.b1(Ne,Ne);let Ye=[0,0,0];return e.b1(Ye,[De[0]*y[0]+Ne[0]*y[1]+_e[0]*y[2],De[1]*y[0]+Ne[1]*y[1]+_e[1]*y[2],De[2]*y[0]+Ne[2]*y[1]+_e[2]*y[2]]),Ye}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(y,O,ie){let ce=function(Ne,Ye,lt){let ct=1/(1<_e&&(_e=Gt),JtNe&&(Ne=Jt)}let ct=[lt.lng+De,lt.lat+Ye,lt.lng+_e,lt.lat+Ne];return this.isSurfacePointOnScreen([0,1,0])&&(ct[3]=90,ct[0]=-180,ct[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(ct[1]=-90,ct[0]=-180,ct[2]=180),new q(ct)}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){return this._helper.calculateCenterFromCameraLngLatAlt(y,O,ie,ce)}setLocationAtPoint(y,O){let ie=Ro(this.unprojectScreenPoint(O)),ce=Ro(y),_e=e.bz();e.bK(_e);let De=e.bz();e.bH(De,ie,_e,-this.center.lng*Math.PI/180),e.bG(De,De,_e,this.center.lat*Math.PI/180);let Ne=ce[0]*ce[0]+ce[2]*ce[2],Ye=De[0]*De[0];if(Ne=-or&&it<=or,Ar=qt>=-or&&qt<=or,dr,mr;if(vr&&Ar){let Nn=this.center.lng*Math.PI/180,Dn=this.center.lat*Math.PI/180;e.bM(Ft,Nn)+e.bM(it,Dn)=0}isSurfacePointOnScreen(y){if(!this.isSurfacePointVisible(y))return!1;let O=e.bE();return e.aE(O,[...y,1],this._globeViewProjMatrixNoCorrection),O[0]/=O[3],O[1]/=O[3],O[2]/=O[3],O[0]>-1&&O[0]<1&&O[1]>-1&&O[1]<1&&O[2]>-1&&O[2]<1}rayPlanetIntersection(y,O){let ie=e.b3(y,O),ce=e.bz(),_e=e.bz();e.aZ(_e,O,ie),e.b0(ce,y,_e);let De=1-e.b3(ce,ce);if(De<0)return null;let Ne=e.b3(y,y)-1,Ye=-ie+(ie<0?1:-1)*Math.sqrt(De),lt=Ne/Ye,ct=Ye;return{tMin:Math.min(lt,ct),tMax:Math.max(lt,ct)}}unprojectScreenPoint(y){let O=this._cameraPosition,ie=this.getRayDirectionFromPixel(y),ce=this.rayPlanetIntersection(O,ie);if(ce){let ct=e.bz();e.a_(ct,O,[ie[0]*ce.tMin,ie[1]*ce.tMin,ie[2]*ce.tMin]);let Ft=e.bz();return e.b1(Ft,ct),zl(Ft)}let _e=this._cachedClippingPlane,De=_e[0]*ie[0]+_e[1]*ie[1]+_e[2]*ie[2],Ne=-e.b9(_e,O)/De,Ye=e.bz();if(Ne>0)e.a_(Ye,O,[ie[0]*Ne,ie[1]*Ne,ie[2]*Ne]);else{let ct=e.bz();e.a_(ct,O,[2*ie[0],2*ie[1],2*ie[2]]);let Ft=e.b9(this._cachedClippingPlane,ct);e.b0(Ye,ct,[this._cachedClippingPlane[0]*Ft,this._cachedClippingPlane[1]*Ft,this._cachedClippingPlane[2]*Ft])}let lt=function(ct){let Ft=e.bz();return Ft[0]=ct[0]*-ct[3],Ft[1]=ct[1]*-ct[3],Ft[2]=ct[2]*-ct[3],{center:Ft,radius:Math.sqrt(1-ct[3]*ct[3])}}(_e);return zl(function(ct,Ft,Gt){let Jt=e.bz();e.b0(Jt,Gt,ct);let it=e.bz();return e.bx(it,ct,Jt,Ft/e.b7(Jt)),it}(lt.center,lt.radius,Ye))}getMatrixForModel(y,O){let ie=e.W.convert(y),ce=1/e.bD,_e=e.bi();return e.bI(_e,_e,ie.lng/180*Math.PI),e.bf(_e,_e,-ie.lat/180*Math.PI),e.Q(_e,_e,[0,0,1+O/e.bD]),e.bf(_e,_e,.5*Math.PI),e.S(_e,_e,[ce,ce,ce]),_e}getProjectionDataForCustomLayer(y=!0){let O=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:y});return O.tileMercatorCoords=[0,0,1,1],O}getFastPathSimpleProjectionMatrix(y){}}class ms{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,O,ie){this._helper.interpolatePadding(y,O,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,O,ie=!0){this._helper.resize(y,O,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,O){this._helper.overrideNearFarZ(y,O)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(y,O){this._globeness=y,this._globeLatitudeErrorCorrectionRadians=O,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(y){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(O,ie)=>this.currentTransform.defaultConstrain(O,ie),this.applyConstrain=(O,ie)=>this._helper.applyConstrain(O,ie),this._helper=new co({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(O,ie)=>this.defaultConstrain(O,ie)},y),this._globeness=1,this._mercatorTransform=new qo,this._verticalPerspectiveTransform=new As}clone(){let y=new ms;return y._globeness=this._globeness,y._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,y.apply(this,!1),y}apply(y,O){this._helper.apply(y,O),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(y){let O=this._mercatorTransform.getProjectionData(y),ie=this._verticalPerspectiveTransform.getProjectionData(y);return{mainMatrix:this.isGlobeRendering?ie.mainMatrix:O.mainMatrix,clippingPlane:ie.clippingPlane,tileMercatorCoords:ie.tileMercatorCoords,projectionTransition:y.applyGlobeMatrix?this._globeness:0,fallbackMatrix:O.fallbackMatrix}}isLocationOccluded(y){return this.currentTransform.isLocationOccluded(y)}transformLightDirection(y){return this.currentTransform.transformLightDirection(y)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(y,O,ie){let ce=this._mercatorTransform.getPitchedTextCorrection(y,O,ie),_e=this._verticalPerspectiveTransform.getPitchedTextCorrection(y,O,ie);return e.bt(ce,_e,this._globeness)}projectTileCoordinates(y,O,ie,ce){return this.currentTransform.projectTileCoordinates(y,O,ie,ce)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(y){return this.currentTransform.calculateFogMatrix(y)}getVisibleUnwrappedCoordinates(y){return this.currentTransform.getVisibleUnwrappedCoordinates(y)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(y){this._mercatorTransform.recalculateZoomAndCenter(y),this._verticalPerspectiveTransform.recalculateZoomAndCenter(y)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(y,O){return this.currentTransform.lngLatToCameraDepth(y,O)}populateCache(y){this._mercatorTransform.populateCache(y),this._verticalPerspectiveTransform.populateCache(y)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(y,O,ie,ce){return this._helper.calculateCenterFromCameraLngLatAlt(y,O,ie,ce)}setLocationAtPoint(y,O){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(y,O),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(y,O),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(y,O){return this.currentTransform.locationToScreenPoint(y,O)}screenPointToMercatorCoordinate(y,O){return this.currentTransform.screenPointToMercatorCoordinate(y,O)}screenPointToLocation(y,O){return this.currentTransform.screenPointToLocation(y,O)}isPointOnMapSurface(y,O){return this.currentTransform.isPointOnMapSurface(y,O)}getRayDirectionFromPixel(y){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(y)}getMatrixForModel(y,O){return this.currentTransform.getMatrixForModel(y,O)}getProjectionDataForCustomLayer(y=!0){let O=this._mercatorTransform.getProjectionDataForCustomLayer(y);if(!this.isGlobeRendering)return O;let ie=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(y);return ie.fallbackMatrix=O.mainMatrix,ie}getFastPathSimpleProjectionMatrix(y){return this.currentTransform.getFastPathSimpleProjectionMatrix(y)}}class Ms{get useGlobeControls(){return!0}handlePanInertia(y,O){let ie=yl(y,O);return Math.abs(ie.lng-O.center.lng)>180&&(ie.lng=O.center.lng+179.5*Math.sign(ie.lng-O.center.lng)),{easingCenter:ie,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(y,O){let ie=y.around,ce=O.screenPointToLocation(ie);y.bearingDelta&&O.setBearing(O.bearing+y.bearingDelta),y.pitchDelta&&O.setPitch(O.pitch+y.pitchDelta),y.rollDelta&&O.setRoll(O.roll+y.rollDelta);let _e=O.zoom;y.zoomDelta&&O.setZoom(O.zoom+y.zoomDelta);let De=O.zoom-_e;if(De===0)return;let Ne=e.bJ(O.center.lng,ce.lng),Ye=Ne/(Math.abs(Ne/180)+1),lt=e.bJ(O.center.lat,ce.lat),ct=O.getRayDirectionFromPixel(ie),Ft=O.cameraPosition,Gt=-1*e.b3(Ft,ct),Jt=e.bz();e.a_(Jt,Ft,[ct[0]*Gt,ct[1]*Gt,ct[2]*Gt]);let it=e.b5(Jt)-1,Rt=Math.exp(.5*-Math.max(it-.3,0)),qt=Ls(O.worldSize,O.center.lat)/Math.min(O.width,O.height),or=e.bw(qt,.9,.5,1,.25),vr=(1-e.ao(-De))*Math.min(Rt,or),Ar=O.center.lat,dr=O.zoom,mr=new e.W(O.center.lng+Ye*vr,e.al(O.center.lat+lt*vr,-e.am,e.am));O.setLocationAtPoint(ce,ie);let qr=O.center,Lr=e.bw(Math.abs(Ne),45,85,0,1),cn=e.bw(qt,.75,.35,0,1),Nn=Math.pow(Math.max(Lr,cn),.25),Dn=e.bJ(qr.lng,mr.lng),qn=e.bJ(qr.lat,mr.lat);O.setCenter(new e.W(qr.lng+Dn*Nn,qr.lat+qn*Nn).wrap()),O.setZoom(dr+Ts(Ar,O.center.lat))}handleMapControlsPan(y,O,ie){if(!y.panDelta)return;let ce=O.center.lat,_e=O.zoom;O.setCenter(yl(y.panDelta,O).wrap()),O.setZoom(_e+Ts(ce,O.center.lat))}cameraForBoxAndBearing(y,O,ie,ce,_e){let De=Ko(y,O,ie,ce,_e),Ne=O.left/_e.width*2-1,Ye=(_e.width-O.right)/_e.width*2-1,lt=O.top/_e.height*-2+1,ct=(_e.height-O.bottom)/_e.height*-2+1,Ft=e.bJ(ie.getWest(),ie.getEast())<0,Gt=Ft?ie.getEast():ie.getWest(),Jt=Ft?ie.getWest():ie.getEast(),it=Math.max(ie.getNorth(),ie.getSouth()),Rt=Math.min(ie.getNorth(),ie.getSouth()),qt=Gt+.5*e.bJ(Gt,Jt),or=it+.5*e.bJ(it,Rt),vr=_e.clone();vr.setCenter(De.center),vr.setBearing(De.bearing),vr.setPitch(0),vr.setRoll(0),vr.setZoom(De.zoom);let Ar=vr.modelViewProjectionMatrix,dr=[Ro(ie.getNorthWest()),Ro(ie.getNorthEast()),Ro(ie.getSouthWest()),Ro(ie.getSouthEast()),Ro(new e.W(Jt,or)),Ro(new e.W(Gt,or)),Ro(new e.W(qt,it)),Ro(new e.W(qt,Rt))],mr=Ro(De.center),qr=Number.POSITIVE_INFINITY;for(let Lr of dr)Ne<0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"x",Ne))),Ye>0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"x",Ye))),lt>0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"y",lt))),ct<0&&(qr=Ms.getLesserNonNegativeNonNull(qr,Ms.solveVectorScale(Lr,mr,Ar,"y",ct)));if(Number.isFinite(qr)&&qr!==0)return De.zoom=Math.min(vr.zoom+e.ar(qr),y.maxZoom),De;Oo()}handleJumpToCenterZoom(y,O){let ie=y.center.lat,ce=y.applyConstrain(O.center?e.W.convert(O.center):y.center,y.zoom).center;y.setCenter(ce.wrap());let _e=O.zoom!==void 0?+O.zoom:y.zoom+Ts(ie,ce.lat);y.zoom!==_e&&y.setZoom(_e)}handleEaseTo(y,O){let ie=y.zoom,ce=y.center,_e=y.padding,De={roll:y.roll,pitch:y.pitch,bearing:y.bearing},Ne={roll:O.roll===void 0?y.roll:O.roll,pitch:O.pitch===void 0?y.pitch:O.pitch,bearing:O.bearing===void 0?y.bearing:O.bearing},Ye=O.zoom!==void 0,lt=!y.isPaddingEqual(O.padding),ct=!1,Ft=O.center?e.W.convert(O.center):ce,Gt=y.applyConstrain(Ft,ie).center;oi(y,Gt);let Jt=y.clone();Jt.setCenter(Gt),Jt.setZoom(Ye?+O.zoom:ie+Ts(ce.lat,Ft.lat)),Jt.setBearing(O.bearing);let it=new e.P(e.al(y.centerPoint.x+O.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+O.offsetAsPoint.y,0,y.height));Jt.setLocationAtPoint(Gt,it);let Rt=(O.offset&&O.offsetAsPoint.mag())>0?Jt.center:Gt,qt=Ye?+O.zoom:ie+Ts(ce.lat,Rt.lat),or=ie+Ts(ce.lat,0),vr=qt+Ts(Rt.lat,0),Ar=e.bJ(ce.lng,Rt.lng),dr=e.bJ(ce.lat,Rt.lat),mr=e.ao(vr-or);return ct=qt!==ie,{easeFunc:qr=>{if(e.bn(De,Ne)||ws({startEulerAngles:De,endEulerAngles:Ne,tr:y,k:qr,useSlerp:De.roll!=Ne.roll}),lt&&y.interpolatePadding(_e,O.padding,qr),O.around)e.w("Easing around a point is not supported under globe projection."),y.setLocationAtPoint(O.around,O.aroundPoint);else{let Lr=vr>or?Math.min(2,mr):Math.max(.5,mr),cn=Math.pow(Lr,1-qr),Nn=su(ce,Ar,dr,qr*cn);y.setCenter(Nn.wrap())}if(ct){let Lr=e.H.number(or,vr,qr)+Ts(0,y.center.lat);y.setZoom(Lr)}},isZooming:ct,elevationCenter:Rt}}handleFlyTo(y,O){let ie=O.zoom!==void 0,ce=y.center,_e=y.zoom,De=y.padding,Ne=!y.isPaddingEqual(O.padding),Ye=y.applyConstrain(e.W.convert(O.center||O.locationAtOffset),_e).center,lt=ie?+O.zoom:y.zoom+Ts(y.center.lat,Ye.lat),ct=y.clone();ct.setCenter(Ye),ct.setZoom(lt),ct.setBearing(O.bearing);let Ft=new e.P(e.al(y.centerPoint.x+O.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+O.offsetAsPoint.y,0,y.height));ct.setLocationAtPoint(Ye,Ft);let Gt=ct.center;oi(y,Gt);let Jt=function(dr,mr,qr){let Lr=Ro(mr),cn=Ro(qr),Nn=e.b3(Lr,cn),Dn=Math.acos(Nn),qn=Fo(dr);return Dn/(2*Math.PI)*qn}(y,ce,Gt),it=_e+Ts(ce.lat,0),Rt=lt+Ts(Gt.lat,0),qt=e.ao(Rt-it),or;if(typeof O.minZoom=="number"){let dr=+O.minZoom+Ts(Gt.lat,0),mr=Math.min(dr,it,Rt)+Ts(0,Gt.lat),qr=y.applyConstrain(Gt,mr).zoom+Ts(Gt.lat,0);or=e.ao(qr-it)}let vr=e.bJ(ce.lng,Gt.lng),Ar=e.bJ(ce.lat,Gt.lat);return{easeFunc:(dr,mr,qr,Lr)=>{let cn=su(ce,vr,Ar,qr);Ne&&y.interpolatePadding(De,O.padding,dr);let Nn=dr===1?Gt:cn;y.setCenter(Nn.wrap());let Dn=it+e.ar(mr);y.setZoom(dr===1?lt:Dn+Ts(0,Nn.lat))},scaleOfZoom:qt,targetCenter:Gt,scaleOfMinZoom:or,pixelPathLength:Jt}}static solveVectorScale(y,O,ie,ce,_e){let De=ce==="x"?[ie[0],ie[4],ie[8],ie[12]]:[ie[1],ie[5],ie[9],ie[13]],Ne=[ie[3],ie[7],ie[11],ie[15]],Ye=y[0]*De[0]+y[1]*De[1]+y[2]*De[2],lt=y[0]*Ne[0]+y[1]*Ne[1]+y[2]*Ne[2],ct=O[0]*De[0]+O[1]*De[1]+O[2]*De[2],Ft=O[0]*Ne[0]+O[1]*Ne[1]+O[2]*Ne[2];return ct+_e*lt===Ye+_e*Ft||Ne[3]*(Ye-ct)+De[3]*(Ft-lt)+Ye*Ft==ct*lt?null:(ct+De[3]-_e*Ft-_e*Ne[3])/(ct-Ye-_e*Ft+_e*lt)}static getLesserNonNegativeNonNull(y,O){return O!==null&&O>=0&&Oe.C(de,y?.filter(O=>O.identifier!=="source.canvas")),Eu=e.bN();class Uu extends e.E{constructor(y,O={}){var ie,ce;super(),this._rtlPluginLoaded=()=>{for(let De in this.tileManagers){let Ne=this.tileManagers[De].getSource().type;Ne!=="vector"&&Ne!=="geojson"||this.tileManagers[De].reload()}},this.map=y,this.dispatcher=new ae(re(),y._getMapId()),this.dispatcher.registerMessageHandler("GG",(De,Ne)=>this.getGlyphs(De,Ne)),this.dispatcher.registerMessageHandler("GI",(De,Ne)=>this.getImages(De,Ne)),this.dispatcher.registerMessageHandler("GDA",(De,Ne)=>this.getDashes(De,Ne)),this.imageManager=new C,this.imageManager.setEventedParent(this);let _e=((ie=y._container)===null||ie===void 0?void 0:ie.lang)||typeof document<"u"&&((ce=document.documentElement)===null||ce===void 0?void 0:ce.lang)||void 0;this.glyphManager=new b(y._requestManager,O.localIdeographFontFamily,_e),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new ro,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),Ge().on(Te,this._rtlPluginLoaded),this.on("data",De=>{if(De.dataType!=="source"||De.sourceDataType!=="metadata")return;let Ne=this.tileManagers[De.sourceId];if(!Ne)return;let Ye=Ne.getSource();if(Ye?.vectorLayerIds)for(let lt in this._layers){let ct=this._layers[lt];ct.source===Ye.id&&this._validateLayer(ct)}})}_setInitialValues(){var y;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((y=this.crossTileSymbolIndex)===null||y===void 0?void 0:y.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(y,O){var ie,ce,_e;this._checkLoaded();let De=O===null?(_e=(ce=(ie=this.stylesheet.state)===null||ie===void 0?void 0:ie[y])===null||ce===void 0?void 0:ce.default)!==null&&_e!==void 0?_e:null:O;if(e.bQ(De,this._globalState[y]))return this;this._globalState[y]=De,this._applyGlobalStateChanges([y])}getGlobalState(){return this._globalState}setGlobalState(y){this._checkLoaded();let O=[];for(let ie in y)!e.bQ(this._globalState[ie],y[ie].default)&&(O.push(ie),this._globalState[ie]=y[ie].default);this._applyGlobalStateChanges(O)}_applyGlobalStateChanges(y){if(y.length===0)return;let O=new Set,ie={};for(let ce of y){ie[ce]=this._globalState[ce];for(let _e in this._layers){let De=this._layers[_e],Ne=De.getLayoutAffectingGlobalStateRefs(),Ye=De.getPaintAffectingGlobalStateRefs(),lt=De.getVisibilityAffectingGlobalStateRefs();if(Ne.has(ce)&&O.add(De.source),Ye.has(ce))for(let{name:ct,value:Ft}of Ye.get(ce))this._updatePaintProperty(De,ct,Ft);lt?.has(ce)&&(De.recalculateVisibility(),this._updateLayer(De))}}this.dispatcher.broadcast("UGS",ie);for(let ce in this.tileManagers)O.has(ce)&&(this._reloadSource(ce),this._changed=!0)}loadURL(y){return e._(this,arguments,void 0,function*(O,ie={},ce){this.fire(new e.n("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate,this._loadStyleRequest=new AbortController;let _e=this._loadStyleRequest;try{let De=yield this.map._requestManager.transformRequest(O,"Style");e.bR(_e.signal);let Ne=yield e.k(De,_e);this._loadStyleRequest===_e&&(this._loadStyleRequest=null),this._load(Ne.data,ie,ce)}catch(De){this._loadStyleRequest===_e&&(this._loadStyleRequest=null),De&&!_e.signal.aborted&&this.fire(new e.l(e.d(De)))}})}loadJSON(y,O={},ie){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,O.validate=O.validate!==!1,this._load(y,O,ie)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(Eu,{validate:!1})}_load(y,O,ie){var ce,_e;let De=O.transformStyle?O.transformStyle(ie,y):y;if(!O.validate||!Su(this,e.F(De))){De=Object.assign({},De),this._loaded=!0,this.stylesheet=De;for(let Ne in De.sources)this.addSource(Ne,De.sources[Ne],{validate:!1});De.sprite?this._loadSprite(De.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(De.glyphs),this._createLayers(),this.light=new N(this.stylesheet.light),this._setProjectionInternal(((ce=this.stylesheet.projection)===null||ce===void 0?void 0:ce.type)||"mercator"),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((_e=this.stylesheet.terrain)!==null&&_e!==void 0?_e:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var y,O,ie;let ce=e.bS(this.stylesheet.layers);this.setGlobalState((y=this.stylesheet.state)!==null&&y!==void 0?y:null),this.dispatcher.broadcast("SL",ce),this._order=ce.map(_e=>_e.id),this._layers={},this._serializedLayers=null;for(let _e of ce){let De=e.bT(_e,this._globalState);if(De.setEventedParent(this,{layer:{id:_e.id}}),this._layers[_e.id]=De,e.bU(De)&&this.tileManagers[De.source]){let Ne=(ie=(O=_e.paint)===null||O===void 0?void 0:O["raster-fade-duration"])!==null&&ie!==void 0?ie:De.paint.get("raster-fade-duration");this.tileManagers[De.source].setRasterFadeDuration(Ne)}}}_loadSprite(y,O=!1,ie=void 0){this.imageManager.setLoaded(!1);let ce=new AbortController,_e;this._spriteRequest=ce,function(De,Ne,Ye,lt){return e._(this,void 0,void 0,function*(){let ct=w(De),Ft=Ye>1?"@2x":"",Gt={},Jt={};for(let{id:it,url:Rt}of ct){let qt=yield Ne.transformRequest(S(Rt,Ft,".json"),"SpriteJSON");Gt[it]=e.k(qt,lt);let or=yield Ne.transformRequest(S(Rt,Ft,".png"),"SpriteImage");Jt[it]=p.getImage(or,lt)}return yield Promise.all([...Object.values(Gt),...Object.values(Jt)]),function(it,Rt){return e._(this,void 0,void 0,function*(){let qt={};for(let or in it){qt[or]={};let vr=s.getImageCanvasContext((yield Rt[or]).data),Ar=(yield it[or]).data;for(let dr in Ar){let{width:mr,height:qr,x:Lr,y:cn,sdf:Nn,pixelRatio:Dn,stretchX:qn,stretchY:_n,content:vn,textFitWidth:Sn,textFitHeight:Tn}=Ar[dr];qt[or][dr]={data:null,pixelRatio:Dn,sdf:Nn,stretchX:qn,stretchY:_n,content:vn,textFitWidth:Sn,textFitHeight:Tn,spriteData:{width:mr,height:qr,x:Lr,y:cn,context:vr}}}}return qt})}(Gt,Jt)})}(y,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(De=>{if(this._spriteRequest=null,De)for(let Ne in De){this._spritesImagesIds[Ne]=[];let Ye=this._spritesImagesIds[Ne]?this._spritesImagesIds[Ne].filter(lt=>!(lt in De)):[];for(let lt of Ye)this.imageManager.removeImage(lt),this._changedImages[lt]=!0;for(let lt in De[Ne]){let ct=Ne==="default"?lt:`${Ne}:${lt}`;this._spritesImagesIds[Ne].push(ct),ct in this.imageManager.images?this.imageManager.updateImage(ct,De[Ne][lt],!1):this.imageManager.addImage(ct,De[Ne][lt]),O&&(this._changedImages[ct]=!0)}}}).catch(De=>{this._spriteRequest=null,_e=De,ce.signal.aborted||this.fire(new e.l(_e))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),O&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),ie&&ie(_e)})}_unloadSprite(){for(let y of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(y),this._changedImages[y]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(y){let O=this.tileManagers[y.source];if(!O)return;let ie=y.sourceLayer;if(!ie)return;let ce=O.getSource();(ce.type==="geojson"||ce.vectorLayerIds&&!ce.vectorLayerIds.includes(ie))&&this.fire(new e.l(new Error(`Source layer "${ie}" does not exist on source "${ce.id}" as specified by style layer "${y.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let y in this.tileManagers)if(!this.tileManagers[y].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(y,O=!1){let ie=this._serializedAllLayers();if(!y||y.length===0)return Object.values(O?e.bV(ie):ie);let ce=[];for(let _e of y)if(ie[_e]){let De=O?e.bV(ie[_e]):ie[_e];ce.push(De)}return ce}_serializedAllLayers(){let y=this._serializedLayers;if(y)return y;y=this._serializedLayers={};let O=Object.keys(this._layers);for(let ie of O){let ce=this._layers[ie];ce.type!=="custom"&&(y[ie]=ce.serialize())}return y}hasTransitions(){var y,O,ie;if(!((y=this.light)===null||y===void 0)&&y.hasTransition()||!((O=this.sky)===null||O===void 0)&&O.hasTransition()||!((ie=this.projection)===null||ie===void 0)&&ie.hasTransition())return!0;for(let ce in this.tileManagers)if(this.tileManagers[ce].hasTransition())return!0;for(let ce in this._layers)if(this._layers[ce].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(y){if(!this._loaded)return;let O=this._changed;if(O){let ce=Object.keys(this._updatedLayers),_e=Object.keys(this._removedLayers);(ce.length||_e.length)&&this._updateWorkerLayers(ce,_e);for(let De in this._updatedSources){let Ne=this._updatedSources[De];if(Ne==="reload")this._reloadSource(De);else{if(Ne!=="clear")throw new Error(`Invalid action ${Ne}`);this._clearSource(De)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let De in this._updatedPaintProps)this._layers[De].updateTransitions(y);this.light.updateTransitions(y),this.sky.updateTransitions(y),this._resetUpdates()}let ie={};for(let ce in this.tileManagers){let _e=this.tileManagers[ce];ie[ce]=_e.used,_e.used=!1}for(let ce of this._order){let _e=this._layers[ce];_e.recalculate(y,this._availableImages),!_e.isHidden(y.zoom)&&_e.source&&(this.tileManagers[_e.source].used=!0)}for(let ce in ie){let _e=this.tileManagers[ce];!!ie[ce]!=!!_e.used&&_e.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:ce}))}this.light.recalculate(y),this.sky.recalculate(y),this.projection.recalculate(y),this.z=y.zoom,O&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let y=Object.keys(this._changedImages);if(y.length){for(let O in this.tileManagers)this.tileManagers[O].reloadTilesForDependencies(["icons","patterns"],y);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let y in this.tileManagers)this.tileManagers[y].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(y,O){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(y,!1),removedIds:O})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(y,O={}){var ie;this._checkLoaded();let ce=this.serialize();if(y=O.transformStyle?O.transformStyle(ce,y):y,((ie=O.validate)===null||ie===void 0||ie)&&Su(this,e.F(y)))return!1;(y=e.bV(y)).layers=e.bS(y.layers);let _e=e.bW(ce,y),De=this._getOperationsToPerform(_e);if(De.unimplemented.length>0)throw new Error(`Unimplemented: ${De.unimplemented.join(", ")}.`);if(De.operations.length===0)return!1;for(let Ne of De.operations)Ne();return this.stylesheet=y,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(y){let O=[],ie=[];for(let ce of y)switch(ce.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":O.push(()=>this.addLayer.apply(this,ce.args));break;case"removeLayer":O.push(()=>this.removeLayer.apply(this,ce.args));break;case"setPaintProperty":O.push(()=>this.setPaintProperty.apply(this,ce.args));break;case"setLayoutProperty":O.push(()=>this.setLayoutProperty.apply(this,ce.args));break;case"setFilter":O.push(()=>this.setFilter.apply(this,ce.args));break;case"addSource":O.push(()=>this.addSource.apply(this,ce.args));break;case"removeSource":O.push(()=>this.removeSource.apply(this,ce.args));break;case"setLayerZoomRange":O.push(()=>this.setLayerZoomRange.apply(this,ce.args));break;case"setLight":O.push(()=>this.setLight.apply(this,ce.args));break;case"setGeoJSONSourceData":O.push(()=>this.setGeoJSONSourceData.apply(this,ce.args));break;case"setGlyphs":O.push(()=>this.setGlyphs.apply(this,ce.args));break;case"setSprite":O.push(()=>this.setSprite.apply(this,ce.args));break;case"setTerrain":O.push(()=>this.map.setTerrain.apply(this,ce.args));break;case"setSky":O.push(()=>this.setSky.apply(this,ce.args));break;case"setProjection":this.setProjection.apply(this,ce.args);break;case"setGlobalState":O.push(()=>this.setGlobalState.apply(this,ce.args));break;case"setTransition":O.push(()=>{});break;default:ie.push(ce.command)}return{operations:O,unimplemented:ie}}addImage(y,O){if(this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" already exists.`)));this.imageManager.addImage(y,O),this._afterImageUpdated(y)}updateImage(y,O){this.imageManager.updateImage(y,O)}getImage(y){return this.imageManager.getImage(y)}removeImage(y){if(!this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" does not exist.`)));this.imageManager.removeImage(y),this._afterImageUpdated(y)}_afterImageUpdated(y){this._availableImages=this.imageManager.listImages(),this._changedImages[y]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(y,O,ie={}){var ce;if(this._checkLoaded(),this.tileManagers[y]!==void 0)throw new Error(`Source "${y}" already exists.`);if(!O.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(O).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(O.type)&&this._validate(e.F.source,`sources.${y}`,O,null,ie))return;!((ce=this.map)===null||ce===void 0)&&ce._collectResourceTiming&&(O.collectResourceTiming=!0);let _e=this.tileManagers[y]=new Sr(y,O,this.dispatcher);_e.style=this,_e.setEventedParent(this,()=>({isSourceLoaded:_e.loaded(),source:_e.serialize(),sourceId:y})),_e.onAdd(this.map),this._changed=!0}removeSource(y){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);for(let ie in this._layers)if(this._layers[ie].source===y)return this.fire(new e.l(new Error(`Source "${y}" cannot be removed while layer "${ie}" is using it.`)));let O=this.tileManagers[y];delete this.tileManagers[y],delete this._updatedSources[y],O.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:y})),O.setEventedParent(null),O.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(y,O){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);let ie=this.tileManagers[y].getSource();if(ie.type!=="geojson")throw new Error(`geojsonSource.type is ${ie.type}, which is !== 'geojson`);ie.setData(O),this._changed=!0}getSource(y){var O;return(O=this.tileManagers[y])===null||O===void 0?void 0:O.getSource()}addLayer(y,O,ie={}){this._checkLoaded();let ce=y.id;if(this.getLayer(ce))return void this.fire(new e.l(new Error(`Layer "${ce}" already exists on this map.`)));let _e;if(y.type==="custom"){if(Su(this,e.bX(y)))return;_e=e.bT(y,this._globalState)}else{if("source"in y&&typeof y.source=="object"&&(this.addSource(ce,y.source),y=e.bV(y),y=e.e(y,{source:ce})),this._validate(e.F.layer,`layers.${ce}`,y,{arrayIndex:-1},ie))return;_e=e.bT(y,this._globalState),this._validateLayer(_e),_e.setEventedParent(this,{layer:{id:ce}})}let De=O?this._order.indexOf(O):this._order.length;if(O&&De===-1)this.fire(new e.l(new Error(`Cannot add layer "${ce}" before non-existing layer "${O}".`)));else{if(this._order.splice(De,0,ce),this._layerOrderChanged=!0,this._layers[ce]=_e,this._removedLayers[ce]&&_e.source&&_e.type!=="custom"){let Ne=this._removedLayers[ce];delete this._removedLayers[ce],Ne.type!==_e.type?this._updatedSources[_e.source]="clear":(this._updatedSources[_e.source]="reload",this.tileManagers[_e.source].pause())}this._updateLayer(_e),_e.onAdd&&_e.onAdd(this.map)}}moveLayer(y,O){if(this._checkLoaded(),this._changed=!0,!this._layers[y])return void this.fire(new e.l(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));if(y===O)return;let ie=this._order.indexOf(y);this._order.splice(ie,1);let ce=O?this._order.indexOf(O):this._order.length;O&&ce===-1?this.fire(new e.l(new Error(`Cannot move layer "${y}" before non-existing layer "${O}".`))):(this._order.splice(ce,0,y),this._layerOrderChanged=!0)}removeLayer(y){this._checkLoaded();let O=this._layers[y];if(!O)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${y}".`)));O.setEventedParent(null);let ie=this._order.indexOf(y);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[y]=O,delete this._layers[y],this._serializedLayers&&delete this._serializedLayers[y],delete this._updatedLayers[y],delete this._updatedPaintProps[y],O.onRemove&&O.onRemove(this.map)}getLayer(y){return this._layers[y]}getLayersOrder(){return[...this._order]}hasLayer(y){return y in this._layers}setLayerZoomRange(y,O,ie){this._checkLoaded();let ce=this.getLayer(y);ce?ce.minzoom===O&&ce.maxzoom===ie||(O!=null&&(ce.minzoom=O),ie!=null&&(ce.maxzoom=ie),this._updateLayer(ce)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)))}setFilter(y,O,ie={}){this._checkLoaded();let ce=this.getLayer(y);if(ce){if(!e.bQ(ce.filter,O))return O==null?(ce.setFilter(void 0),void this._updateLayer(ce)):void(this._validate(e.F.filter,`layers.${ce.id}.filter`,O,null,ie)||(ce.setFilter(e.bV(O)),this._updateLayer(ce)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${y}".`)))}getFilter(y){return e.bV(this.getLayer(y).filter)}setLayoutProperty(y,O,ie,ce={}){this._checkLoaded();let _e=this.getLayer(y);_e?e.bQ(_e.getLayoutProperty(O),ie)||(_e.setLayoutProperty(O,ie,ce),this._updateLayer(_e)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}getLayoutProperty(y,O){let ie=this.getLayer(y);if(ie)return ie.getLayoutProperty(O);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${y}".`)))}setPaintProperty(y,O,ie,ce={}){this._checkLoaded();let _e=this.getLayer(y);_e?e.bQ(_e.getPaintProperty(O),ie)||this._updatePaintProperty(_e,O,ie,ce):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}_updatePaintProperty(y,O,ie,ce={}){y.setPaintProperty(O,ie,ce)&&this._updateLayer(y),e.bU(y)&&O==="raster-fade-duration"&&this.tileManagers[y.source].setRasterFadeDuration(ie),this._changed=!0,this._updatedPaintProps[y.id]=!0,this._serializedLayers=null}getPaintProperty(y,O){return this.getLayer(y).getPaintProperty(O)}setFeatureState(y,O){this._checkLoaded();let ie=y.source,ce=y.sourceLayer,_e=this.tileManagers[ie];if(_e===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let De=_e.getSource().type;De==="geojson"&&ce?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):De!=="vector"||ce?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),_e.setFeatureState(ce,y.id,O)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(y,O){this._checkLoaded();let ie=y.source,ce=this.tileManagers[ie];if(ce===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let _e=ce.getSource().type,De=_e==="vector"?y.sourceLayer:void 0;_e!=="vector"||De?O&&typeof y.id!="string"&&typeof y.id!="number"?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):ce.removeFeatureState(De,y.id,O):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(y){this._checkLoaded();let O=y.source,ie=y.sourceLayer,ce=this.tileManagers[O];if(ce!==void 0)return ce.getSource().type!=="vector"||ie?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),ce.getFeatureState(ie,y.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${O}' does not exist in the map's style.`)))}getTransition(){var y;return e.e({duration:300,delay:0},(y=this.stylesheet)===null||y===void 0?void 0:y.transition)}serialize(){if(!this._loaded)return;let y=e.bY(this.tileManagers,_e=>_e.serialize()),O=this._serializeByIds(this._order,!0),ie=this.map.getTerrain()||void 0,ce=this.stylesheet;return e.bZ({version:ce.version,name:ce.name,metadata:ce.metadata,light:ce.light,sky:ce.sky,center:ce.center,zoom:ce.zoom,bearing:ce.bearing,pitch:ce.pitch,sprite:ce.sprite,glyphs:ce.glyphs,transition:ce.transition,projection:ce.projection,sources:y,layers:O,terrain:ie},_e=>_e!==void 0)}_updateLayer(y){this._updatedLayers[y.id]=!0,y.source&&!this._updatedSources[y.source]&&this.tileManagers[y.source].getSource().type!=="raster"&&(this._updatedSources[y.source]="reload",this.tileManagers[y.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(y){let O=De=>this._layers[De].type==="fill-extrusion",ie={},ce=[];for(let De=this._order.length-1;De>=0;De--){let Ne=this._order[De];if(O(Ne)){ie[Ne]=De;for(let Ye of y){let lt=Ye[Ne];if(lt)for(let ct of lt)ce.push(ct)}}}ce.sort((De,Ne)=>Ne.intersectionZ-De.intersectionZ);let _e=[];for(let De=this._order.length-1;De>=0;De--){let Ne=this._order[De];if(O(Ne))for(let Ye=ce.length-1;Ye>=0;Ye--){let lt=ce[Ye].feature;if(ie[lt.layer.id]this.map.terrain.getElevation(ct,Ft,Gt):void 0));return this.placement&&_e.push(function(lt,ct,Ft,Gt,Jt,it,Rt){let qt={},or=it.queryRenderedSymbols(Gt),vr=[];for(let Ar of Object.keys(or).map(Number))vr.push(Rt[Ar]);vr.sort(K);for(let Ar of vr){let dr=Ar.featureIndex.lookupSymbolFeatures(or[Ar.bucketInstanceId],ct,Ar.bucketIndex,Ar.sourceLayerIndex,{filterSpec:Jt.filter,globalState:Jt.globalState},Jt.layers,Jt.availableImages,lt);for(let mr in dr){qt[mr]||(qt[mr]=[]);let qr=dr[mr];qr.sort((Lr,cn)=>{let Nn=Ar.featureSortOrder;if(Nn){let Dn=Nn.indexOf(Lr.featureIndex);return Nn.indexOf(cn.featureIndex)-Dn}return cn.featureIndex-Lr.featureIndex});for(let Lr of qr)qt[mr].push(Lr)}}return function(Ar,dr,mr){for(let qr in Ar)for(let Lr of Ar[qr])G(Lr,mr[dr[qr].source]);return Ar}(qt,lt,Ft)}(this._layers,De,this.tileManagers,y,Ye,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(_e)}querySourceFeatures(y,O){O?.filter&&this._validate(e.F.filter,"querySourceFeatures.filter",O.filter,null,O);let ie=this.tileManagers[y];return ie?function(ce,_e){let De=ce.getRenderableIds().map(lt=>ce.getTileByID(lt)),Ne=[],Ye={};for(let lt of De){let ct=lt.tileID.canonical.key;Ye[ct]||(Ye[ct]=!0,lt.querySourceFeatures(Ne,_e))}return Ne}(ie,O?Object.assign(Object.assign({},O),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(y,O={}){this._checkLoaded();let ie=this.light.getLight(),ce=!1;for(let De in y)if(!e.bQ(y[De],ie[De])){ce=!0;break}if(!ce)return;let _e={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(y,O),this.light.updateTransitions(_e)}getProjection(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.projection}setProjection(y){this._checkLoaded();let O=y??{type:"mercator"};if(this.stylesheet.projection=y,this.projection){if(this.projection.name===O.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(O.type)}getSky(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.sky}setSky(y,O={}){this._checkLoaded();let ie=this.getSky(),ce=!1;if(!y&&!ie)return;if(y&&!ie)ce=!0;else if(!y&&ie)ce=!0;else for(let De in y)if(!e.bQ(y[De],ie[De])){ce=!0;break}if(!ce)return;let _e={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=y,this.sky.setSky(y,O),this.sky.updateTransitions(_e)}_setProjectionInternal(y){let O=function(ie,ce){let _e={constrainOverride:ce};if(Array.isArray(ie)){let De=new $o({type:ie});return{projection:De,transform:new ms(_e),cameraHelper:new ol(De)}}switch(ie){case"mercator":return{projection:new Mo,transform:new qo(_e),cameraHelper:new ns};case"globe":{let De=new $o({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:De,transform:new ms(_e),cameraHelper:new ol(De)}}case"vertical-perspective":return{projection:new Zs,transform:new As(_e),cameraHelper:new Ms};default:return e.w(`Unknown projection name: ${ie}. Falling back to mercator projection.`),{projection:new Mo,transform:new qo(_e),cameraHelper:new ns}}}(y,this.map.transformConstrain);this.projection=O.projection,this.map.migrateProjection(O.transform,O.cameraHelper);for(let ie in this.tileManagers)this.tileManagers[ie].reload()}_validate(y,O,ie,ce,_e={}){return _e?.validate!==!1&&Su(this,y.call(e.F,e.e({key:O,style:this.serialize(),value:ie,styleSpec:e.x},ce)))}_remove(y=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Ge().off(Te,this._rtlPluginLoaded);for(let O in this._layers)this._layers[O].setEventedParent(null);for(let O in this.tileManagers){let ie=this.tileManagers[O];ie.setEventedParent(null),ie.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),y&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(y)}_clearSource(y){this.tileManagers[y].clearTiles()}_reloadSource(y){this.tileManagers[y].resume(),this.tileManagers[y].reload()}_updateSources(y){for(let O in this.tileManagers)this.tileManagers[O].update(y,this.map.terrain)}_generateCollisionBoxes(){for(let y in this.tileManagers)this._reloadSource(y)}_updatePlacement(y,O,ie,ce,_e=!1){let De=!1,Ne=!1,Ye={};for(let lt of this._order){let ct=this._layers[lt];if(ct.type!=="symbol")continue;if(!Ye[ct.source]){let Gt=this.tileManagers[ct.source];Ye[ct.source]=Gt.getRenderableIds(!0).map(Jt=>Gt.getTileByID(Jt)).sort((Jt,it)=>it.tileID.overscaledZ-Jt.tileID.overscaledZ||(Jt.tileID.isLessThan(it.tileID)?-1:1))}let Ft=this.crossTileSymbolIndex.addLayer(ct,Ye[ct.source],y.center.lng);De||(De=Ft)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),_e||(_e=this._layerOrderChanged||ie===0),(_e||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(m(),y.zoom))&&(this.pauseablePlacement=new bi(y,this.map.terrain,this._order,_e,O,ie,ce,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ye),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(m()),Ne=!0),De&&this.pauseablePlacement.placement.setStale()),Ne||De)for(let lt of this._order){let ct=this._layers[lt];ct.type==="symbol"&&this.placement.updateLayerOpacities(ct,Ye[ct.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(m())}_releaseSymbolFadeTiles(){for(let y in this.tileManagers)this.tileManagers[y].releaseSymbolFadeTiles()}getImages(y,O){return e._(this,void 0,void 0,function*(){let ie=yield this.imageManager.getImages(O.icons);this._updateTilesForChangedImages();let ce=this.tileManagers[O.source];return ce&&ce.setDependencies(O.tileID.key,O.type,O.icons),ie})}getGlyphs(y,O){return e._(this,void 0,void 0,function*(){let ie=yield this.glyphManager.getGlyphs(O.stacks),ce=this.tileManagers[O.source];return ce&&ce.setDependencies(O.tileID.key,O.type,[""]),ie})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(y,O={}){this._checkLoaded(),y&&this._validate(e.F.glyphs,"glyphs",y,null,O)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=y,this.glyphManager.entries={},this.glyphManager.setURL(y))}getDashes(y,O){return e._(this,void 0,void 0,function*(){let ie={};for(let[ce,_e]of Object.entries(O.dashes))ie[ce]=this.lineAtlas.getDash(_e.dasharray,_e.round);return ie})}addSprite(y,O,ie={},ce){this._checkLoaded();let _e=[{id:y,url:O}],De=[...w(this.stylesheet.sprite),..._e];this._validate(e.F.sprite,"sprite",De,null,ie)||(this.stylesheet.sprite=De,this._loadSprite(_e,!0,ce))}removeSprite(y){this._checkLoaded();let O=w(this.stylesheet.sprite);if(O.find(ie=>ie.id===y)){if(this._spritesImagesIds[y])for(let ie of this._spritesImagesIds[y])this.imageManager.removeImage(ie),this._changedImages[ie]=!0;O.splice(O.findIndex(ie=>ie.id===y),1),this.stylesheet.sprite=O.length>0?O:void 0,delete this._spritesImagesIds[y],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${y}" doesn't exists on this map.`)))}getSprite(){return w(this.stylesheet.sprite)}setSprite(y,O={},ie){this._checkLoaded(),y&&this._validate(e.F.sprite,"sprite",y,null,O)||(this.stylesheet.sprite=y,y?this._loadSprite(y,!0,ie):(this._unloadSprite(),ie&&ie(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let y in this.tileManagers){let O=this.tileManagers[y];O.setEventedParent(null),O.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let y in this._layers){let O=this._layers[y];O.setEventedParent(null),O.onRemove&&O.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var fc=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class th{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(y,O,ie,ce,_e,De,Ne,Ye,lt){this.context=y;let ct=this.boundPaintVertexBuffers.length!==ce.length;for(let Ft=0;!ct&&Ft({u_texture:0,u_ele_delta:de,u_fog_matrix:y,u_fog_color:O?O.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:O?O.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:ce?0:O?O.calculateFogBlendOpacity(ie):0,u_horizon_color:O?O.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:O?O.properties.get("horizon-fog-blend"):1,u_is_globe_mode:ce?1:0}),qu={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function gs(de){let y=[];for(let O of de){if(O===null)continue;let ie=O.split(" ");y.push(ie.pop())}return y}class Lf{constructor(y,O,ie,ce,_e,De,Ne,Ye,lt=[]){let ct=y.gl;this.program=ct.createProgram();let Ft=gs(O.staticAttributes),Gt=ie?ie.getBinderAttributes():[],Jt=Ft.concat(Gt),it=Gi.prelude.staticUniforms?gs(Gi.prelude.staticUniforms):[],Rt=Ne.staticUniforms?gs(Ne.staticUniforms):[],qt=O.staticUniforms?gs(O.staticUniforms):[],or=ie?ie.getBinderUniforms():[],vr=it.concat(Rt).concat(qt).concat(or),Ar=[];for(let Dn of vr)Ar.includes(Dn)||Ar.push(Dn);let dr=ie?ie.defines():[];us(ct)&&dr.unshift("#version 300 es"),_e&&dr.push("#define OVERDRAW_INSPECTOR;"),De&&dr.push("#define TERRAIN3D;"),Ye&&dr.push(Ye),lt&&dr.push(...lt);let mr=dr.concat(Gi.prelude.fragmentSource,Ne.fragmentSource,O.fragmentSource).join(` +`),qr=dr.concat(Gi.prelude.vertexSource,Ne.vertexSource,O.vertexSource).join(` +`);us(ct)||(mr=function(Dn){return Dn.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(mr),qr=function(Dn){return Dn.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(qr));let Lr=ct.createShader(ct.FRAGMENT_SHADER);if(ct.isContextLost())return void(this.failedToCreate=!0);if(ct.shaderSource(Lr,mr),ct.compileShader(Lr),!ct.getShaderParameter(Lr,ct.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ct.getShaderInfoLog(Lr)}`);ct.attachShader(this.program,Lr);let cn=ct.createShader(ct.VERTEX_SHADER);if(ct.isContextLost())return void(this.failedToCreate=!0);if(ct.shaderSource(cn,qr),ct.compileShader(cn),!ct.getShaderParameter(cn,ct.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ct.getShaderInfoLog(cn)}`);ct.attachShader(this.program,cn),this.attributes={};let Nn={};this.numAttributes=Jt.length;for(let Dn=0;Dn({u_depth:new e.b_(Dn,qn.u_depth),u_terrain:new e.b_(Dn,qn.u_terrain),u_terrain_dim:new e.bp(Dn,qn.u_terrain_dim),u_terrain_matrix:new e.c0(Dn,qn.u_terrain_matrix),u_terrain_unpack:new e.c1(Dn,qn.u_terrain_unpack),u_terrain_exaggeration:new e.bp(Dn,qn.u_terrain_exaggeration)}))(y,Nn),this.projectionUniforms=((Dn,qn)=>({u_projection_matrix:new e.c0(Dn,qn.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(Dn,qn.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(Dn,qn.u_projection_clipping_plane),u_projection_transition:new e.bp(Dn,qn.u_projection_transition),u_projection_fallback_matrix:new e.c0(Dn,qn.u_projection_fallback_matrix)}))(y,Nn),this.binderUniforms=ie?ie.getUniforms(y,Nn):[]}draw(y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt,Jt,it,Rt,qt,or,vr,Ar){var dr;let mr=y.gl;if(this.failedToCreate)return;if(y.program.set(this.program),y.setDepthMode(ie),y.setStencilMode(ce),y.setColorMode(_e),y.setCullFace(De),Ye){y.activeTexture.set(mr.TEXTURE2),mr.bindTexture(mr.TEXTURE_2D,Ye.depthTexture),y.activeTexture.set(mr.TEXTURE3),mr.bindTexture(mr.TEXTURE_2D,Ye.texture);for(let Lr in this.terrainUniforms)this.terrainUniforms[Lr].set(Ye[Lr])}if(lt)for(let Lr in lt)this.projectionUniforms[qu[Lr]].set(lt[Lr]);if(Ne)for(let Lr in this.fixedUniforms)this.fixedUniforms[Lr].set(Ne[Lr]);qt&&qt.setUniforms(y,this.binderUniforms,it,{zoom:Rt});let qr=0;switch(O){case mr.LINES:qr=2;break;case mr.TRIANGLES:qr=3;break;case mr.LINE_STRIP:qr=1}for(let Lr of Jt.get())Lr.vaos||(Lr.vaos={}),(dr=Lr.vaos)[ct]||(dr[ct]=new th),Lr.vaos[ct].bind(y,this,Ft,qt?qt.getPaintVertexBuffers():[],Gt,Lr.vertexOffset,or,vr,Ar),mr.drawElements(O,Lr.primitiveLength*qr,mr.UNSIGNED_SHORT,Lr.primitiveOffset*qr*2)}}function hc(de,y,O){let ie=1/e.aK(O,1,y.transform.tileZoom),ce=Math.pow(2,O.tileID.overscaledZ),_e=O.tileSize*Math.pow(2,y.transform.tileZoom)/ce,De=_e*(O.tileID.canonical.x+O.tileID.wrap*ce),Ne=_e*O.tileID.canonical.y;return{u_image:0,u_texsize:O.imageAtlasTexture.size,u_scale:[ie,de.fromScale,de.toScale],u_fade:de.t,u_pixel_coord_upper:[De>>16,Ne>>16],u_pixel_coord_lower:[65535&De,65535&Ne]}}let nc=(de,y,O,ie)=>{let ce=de.style.light,_e=ce.properties.get("position"),De=[_e.x,_e.y,_e.z],Ne=e.c4();ce.properties.get("anchor")==="viewport"&&e.c5(Ne,de.transform.bearingInRadians),e.c6(De,De,Ne);let Ye=de.transform.transformLightDirection(De),lt=ce.properties.get("color");return{u_lightpos:De,u_lightpos_globe:Ye,u_lightintensity:ce.properties.get("intensity"),u_lightcolor:[lt.r,lt.g,lt.b],u_vertical_gradient:+y,u_opacity:O,u_fill_translate:ie}},hf=(de,y,O,ie,ce,_e,De)=>e.e(nc(de,y,O,ie),hc(_e,de,De),{u_height_factor:-Math.pow(2,ce.overscaledZ)/De.tileSize/8}),ku=(de,y,O,ie)=>e.e(hc(y,de,O),{u_fill_translate:ie}),dc=(de,y)=>({u_world:de,u_fill_translate:y}),Cu=(de,y,O,ie,ce)=>e.e(ku(de,y,O,ce),{u_world:ie}),Pc=(de,y,O,ie,ce)=>{let _e=de.transform,De,Ne,Ye=0;if(O.paint.get("circle-pitch-alignment")==="map"){let lt=e.aK(y,1,_e.zoom);De=!0,Ne=[lt,lt],Ye=lt/(e.a6*Math.pow(2,y.tileID.overscaledZ))*2*Math.PI*ce}else De=!1,Ne=_e.pixelsToGLUnits;return{u_camera_to_center_distance:_e.cameraToCenterDistance,u_scale_with_map:+(O.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+De,u_device_pixel_ratio:de.pixelRatio,u_extrude_scale:Ne,u_globe_extrude_scale:Ye,u_translate:ie}},$c=de=>({u_pixel_extrude_scale:[1/de.width,1/de.height]}),Zl=de=>({u_viewport_size:[de.width,de.height]}),df=(de,y=1)=>({u_color:de,u_overlay:0,u_overlay_scale:y}),Dc=(de,y,O,ie)=>{let ce=e.aK(de,1,y)/(e.a6*Math.pow(2,de.tileID.overscaledZ))*2*Math.PI*ie;return{u_extrude_scale:e.aK(de,1,y),u_intensity:O,u_globe_extrude_scale:ce}},Ic=(de,y,O,ie)=>{let ce=e.O();e.c7(ce,0,de.width,de.height,0,0,1);let _e=de.context.gl;return{u_matrix:ce,u_world:[_e.drawingBufferWidth,_e.drawingBufferHeight],u_image:O,u_color_ramp:ie,u_opacity:y.paint.get("heatmap-opacity")}},Vu=(de,y,O)=>{let ie=O.paint.get("hillshade-accent-color"),ce;switch(O.paint.get("hillshade-method")){case"basic":ce=4;break;case"combined":ce=1;break;case"igor":ce=2;break;case"multidirectional":ce=3;break;default:ce=0}let _e=O.getIlluminationProperties();for(let De=0;De<_e.directionRadians.length;De++)O.paint.get("hillshade-illumination-anchor")==="viewport"&&(_e.directionRadians[De]+=de.transform.bearingInRadians);return{u_image:0,u_latrange:Lu(0,y.tileID),u_exaggeration:O.paint.get("hillshade-exaggeration"),u_altitudes:_e.altitudeRadians,u_azimuths:_e.directionRadians,u_accent:ie,u_method:ce,u_highlights:_e.highlightColor,u_shadows:_e.shadowColor}},Rc=(de,y)=>{let O=y.stride,ie=e.O();return e.c7(ie,0,e.a6,-e.a6,0,0,1),e.Q(ie,ie,[0,-e.a6,0]),{u_matrix:ie,u_image:1,u_dimension:[O,O],u_zoom:de.overscaledZ,u_unpack:y.getUnpackVector()}};function Lu(de,y){let O=Math.pow(2,y.canonical.z),ie=y.canonical.y;return[new e.a7(0,ie/O).toLngLat().lat,new e.a7(0,(ie+1)/O).toLngLat().lat]}let vf=(de,y,O=0)=>({u_image:0,u_unpack:y.getUnpackVector(),u_dimension:[y.stride,y.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:O,u_opacity:de.paint.get("color-relief-opacity")}),sl=(de,y,O,ie)=>{let ce=de.transform;return{u_translation:uu(de,y,O),u_ratio:ie/e.aK(y,1,ce.zoom),u_device_pixel_ratio:de.pixelRatio,u_units_to_pixels:[1/ce.pixelsToGLUnits[0],1/ce.pixelsToGLUnits[1]]}},Fc=(de,y,O,ie,ce)=>e.e(sl(de,y,O,ie),{u_image:0,u_image_height:ce}),Pu=(de,y,O,ie,ce)=>{let _e=de.transform,De=Hu(y,_e);return{u_translation:uu(de,y,O),u_texsize:y.imageAtlasTexture.size,u_ratio:ie/e.aK(y,1,_e.zoom),u_device_pixel_ratio:de.pixelRatio,u_image:0,u_scale:[De,ce.fromScale,ce.toScale],u_fade:ce.t,u_units_to_pixels:[1/_e.pixelsToGLUnits[0],1/_e.pixelsToGLUnits[1]]}},vc=(de,y,O,ie,ce)=>{let _e=Hu(y,de.transform);return e.e(sl(de,y,O,ie),{u_tileratio:_e,u_crossfade_from:ce.fromScale,u_crossfade_to:ce.toScale,u_image:0,u_mix:ce.t,u_lineatlas_width:de.lineAtlas.width,u_lineatlas_height:de.lineAtlas.height})},zc=(de,y,O,ie,ce,_e)=>{let De=Hu(y,de.transform);return e.e(sl(de,y,O,ie),{u_image:0,u_image_height:_e,u_tileratio:De,u_crossfade_from:ce.fromScale,u_crossfade_to:ce.toScale,u_image_dash:1,u_mix:ce.t,u_lineatlas_width:de.lineAtlas.width,u_lineatlas_height:de.lineAtlas.height})};function Hu(de,y){return 1/e.aK(de,1,y.tileZoom)}function uu(de,y,O){return e.aL(de.transform,y,O.paint.get("line-translate"),O.paint.get("line-translate-anchor"))}let Gu=(de,y,O,ie,ce)=>{return{u_tl_parent:de,u_scale_parent:y,u_buffer_scale:1,u_fade_t:O.mix,u_opacity:O.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(De=ie.paint.get("raster-saturation"),De>0?1-1/(1.001-De):-De),u_contrast_factor:(_e=ie.paint.get("raster-contrast"),_e>0?1/(1-_e):1+_e),u_spin_weights:Zc(ie.paint.get("raster-hue-rotate")),u_coords_top:[ce[0].x,ce[0].y,ce[1].x,ce[1].y],u_coords_bottom:[ce[3].x,ce[3].y,ce[2].x,ce[2].y]};var _e,De};function Zc(de){de*=Math.PI/180;let y=Math.sin(de),O=Math.cos(de);return[(2*O+1)/3,(-Math.sqrt(3)*y-O+1)/3,(Math.sqrt(3)*y-O+1)/3]}let gu=(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt)=>{let Jt=De.transform;return{u_is_size_zoom_constant:+(de==="constant"||de==="source"),u_is_size_feature_constant:+(de==="constant"||de==="camera"),u_size_t:y?y.uSizeT:0,u_size:y?y.uSize:0,u_camera_to_center_distance:Jt.cameraToCenterDistance,u_pitch:Jt.pitch/360*2*Math.PI,u_rotate_symbol:+O,u_aspect_ratio:Jt.width/Jt.height,u_fade_change:De.options.fadeDuration?De.symbolFadeChange:1,u_label_plane_matrix:Ne,u_coord_matrix:Ye,u_is_text:+ct,u_pitch_with_map:+ie,u_is_along_line:ce,u_is_variable_anchor:_e,u_texsize:Ft,u_texture:0,u_translation:lt,u_pitched_scale:Gt}},Pf=(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt,Jt)=>{let it=De.transform;return e.e(gu(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Jt),{u_gamma_scale:ie?Math.cos(it.pitch*Math.PI/180)*it.cameraToCenterDistance:1,u_device_pixel_ratio:De.pixelRatio,u_is_halo:Gt?1:0,u_is_plain:1})},bl=(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct,Ft,Gt)=>e.e(Pf(de,y,O,ie,ce,_e,De,Ne,Ye,lt,!0,ct,!0,Gt),{u_texsize_icon:Ft,u_texture_icon:1}),xl=(de,y)=>({u_opacity:de,u_color:y}),Wu=(de,y,O,ie,ce)=>e.e(function(_e,De,Ne,Ye){let lt=Ne.imageManager.getPattern(_e.from.toString()),ct=Ne.imageManager.getPattern(_e.to.toString()),{width:Ft,height:Gt}=Ne.imageManager.getPixelSize(),Jt=Math.pow(2,Ye.tileID.overscaledZ),it=Ye.tileSize*Math.pow(2,Ne.transform.tileZoom)/Jt,Rt=it*(Ye.tileID.canonical.x+Ye.tileID.wrap*Jt),qt=it*Ye.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:lt.tl,u_pattern_br_a:lt.br,u_pattern_tl_b:ct.tl,u_pattern_br_b:ct.br,u_texsize:[Ft,Gt],u_mix:De.t,u_pattern_size_a:lt.displaySize,u_pattern_size_b:ct.displaySize,u_scale_a:De.fromScale,u_scale_b:De.toScale,u_tile_units_to_pixels:1/e.aK(Ye,1,Ne.transform.tileZoom),u_pixel_coord_upper:[Rt>>16,qt>>16],u_pixel_coord_lower:[65535&Rt,65535&qt]}}(O,ce,y,ie),{u_opacity:de}),wl=(de,y)=>{},pf={fillExtrusion:(de,y)=>({u_lightpos:new e.c2(de,y.u_lightpos),u_lightpos_globe:new e.c2(de,y.u_lightpos_globe),u_lightintensity:new e.bp(de,y.u_lightintensity),u_lightcolor:new e.c2(de,y.u_lightcolor),u_vertical_gradient:new e.bp(de,y.u_vertical_gradient),u_opacity:new e.bp(de,y.u_opacity),u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillExtrusionPattern:(de,y)=>({u_lightpos:new e.c2(de,y.u_lightpos),u_lightpos_globe:new e.c2(de,y.u_lightpos_globe),u_lightintensity:new e.bp(de,y.u_lightintensity),u_lightcolor:new e.c2(de,y.u_lightcolor),u_vertical_gradient:new e.bp(de,y.u_vertical_gradient),u_height_factor:new e.bp(de,y.u_height_factor),u_opacity:new e.bp(de,y.u_opacity),u_fill_translate:new e.c3(de,y.u_fill_translate),u_image:new e.b_(de,y.u_image),u_texsize:new e.c3(de,y.u_texsize),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade)}),fill:(de,y)=>({u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillPattern:(de,y)=>({u_image:new e.b_(de,y.u_image),u_texsize:new e.c3(de,y.u_texsize),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade),u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillOutline:(de,y)=>({u_world:new e.c3(de,y.u_world),u_fill_translate:new e.c3(de,y.u_fill_translate)}),fillOutlinePattern:(de,y)=>({u_world:new e.c3(de,y.u_world),u_image:new e.b_(de,y.u_image),u_texsize:new e.c3(de,y.u_texsize),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade),u_fill_translate:new e.c3(de,y.u_fill_translate)}),circle:(de,y)=>({u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_scale_with_map:new e.b_(de,y.u_scale_with_map),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_extrude_scale:new e.c3(de,y.u_extrude_scale),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(de,y.u_globe_extrude_scale),u_translate:new e.c3(de,y.u_translate)}),collisionBox:(de,y)=>({u_pixel_extrude_scale:new e.c3(de,y.u_pixel_extrude_scale)}),collisionCircle:(de,y)=>({u_viewport_size:new e.c3(de,y.u_viewport_size)}),debug:(de,y)=>({u_color:new e.b$(de,y.u_color),u_overlay:new e.b_(de,y.u_overlay),u_overlay_scale:new e.bp(de,y.u_overlay_scale)}),depth:wl,clippingMask:wl,heatmap:(de,y)=>({u_extrude_scale:new e.bp(de,y.u_extrude_scale),u_intensity:new e.bp(de,y.u_intensity),u_globe_extrude_scale:new e.bp(de,y.u_globe_extrude_scale)}),heatmapTexture:(de,y)=>({u_matrix:new e.c0(de,y.u_matrix),u_world:new e.c3(de,y.u_world),u_image:new e.b_(de,y.u_image),u_color_ramp:new e.b_(de,y.u_color_ramp),u_opacity:new e.bp(de,y.u_opacity)}),hillshade:(de,y)=>({u_image:new e.b_(de,y.u_image),u_latrange:new e.c3(de,y.u_latrange),u_exaggeration:new e.bp(de,y.u_exaggeration),u_altitudes:new e.c9(de,y.u_altitudes),u_azimuths:new e.c9(de,y.u_azimuths),u_accent:new e.b$(de,y.u_accent),u_method:new e.b_(de,y.u_method),u_shadows:new e.c8(de,y.u_shadows),u_highlights:new e.c8(de,y.u_highlights)}),hillshadePrepare:(de,y)=>({u_matrix:new e.c0(de,y.u_matrix),u_image:new e.b_(de,y.u_image),u_dimension:new e.c3(de,y.u_dimension),u_zoom:new e.bp(de,y.u_zoom),u_unpack:new e.c1(de,y.u_unpack)}),colorRelief:(de,y)=>({u_image:new e.b_(de,y.u_image),u_unpack:new e.c1(de,y.u_unpack),u_dimension:new e.c3(de,y.u_dimension),u_elevation_stops:new e.b_(de,y.u_elevation_stops),u_color_stops:new e.b_(de,y.u_color_stops),u_color_ramp_size:new e.b_(de,y.u_color_ramp_size),u_opacity:new e.bp(de,y.u_opacity)}),line:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels)}),lineGradient:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_image:new e.b_(de,y.u_image),u_image_height:new e.bp(de,y.u_image_height)}),linePattern:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_texsize:new e.c3(de,y.u_texsize),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_image:new e.b_(de,y.u_image),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_scale:new e.c2(de,y.u_scale),u_fade:new e.bp(de,y.u_fade)}),lineSDF:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_image:new e.b_(de,y.u_image),u_mix:new e.bp(de,y.u_mix),u_tileratio:new e.bp(de,y.u_tileratio),u_crossfade_from:new e.bp(de,y.u_crossfade_from),u_crossfade_to:new e.bp(de,y.u_crossfade_to),u_lineatlas_width:new e.bp(de,y.u_lineatlas_width),u_lineatlas_height:new e.bp(de,y.u_lineatlas_height)}),lineGradientSDF:(de,y)=>({u_translation:new e.c3(de,y.u_translation),u_ratio:new e.bp(de,y.u_ratio),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(de,y.u_units_to_pixels),u_image:new e.b_(de,y.u_image),u_image_height:new e.bp(de,y.u_image_height),u_tileratio:new e.bp(de,y.u_tileratio),u_crossfade_from:new e.bp(de,y.u_crossfade_from),u_crossfade_to:new e.bp(de,y.u_crossfade_to),u_image_dash:new e.b_(de,y.u_image_dash),u_mix:new e.bp(de,y.u_mix),u_lineatlas_width:new e.bp(de,y.u_lineatlas_width),u_lineatlas_height:new e.bp(de,y.u_lineatlas_height)}),raster:(de,y)=>({u_tl_parent:new e.c3(de,y.u_tl_parent),u_scale_parent:new e.bp(de,y.u_scale_parent),u_buffer_scale:new e.bp(de,y.u_buffer_scale),u_fade_t:new e.bp(de,y.u_fade_t),u_opacity:new e.bp(de,y.u_opacity),u_image0:new e.b_(de,y.u_image0),u_image1:new e.b_(de,y.u_image1),u_brightness_low:new e.bp(de,y.u_brightness_low),u_brightness_high:new e.bp(de,y.u_brightness_high),u_saturation_factor:new e.bp(de,y.u_saturation_factor),u_contrast_factor:new e.bp(de,y.u_contrast_factor),u_spin_weights:new e.c2(de,y.u_spin_weights),u_coords_top:new e.c1(de,y.u_coords_top),u_coords_bottom:new e.c1(de,y.u_coords_bottom)}),symbolIcon:(de,y)=>({u_is_size_zoom_constant:new e.b_(de,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(de,y.u_is_size_feature_constant),u_size_t:new e.bp(de,y.u_size_t),u_size:new e.bp(de,y.u_size),u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_pitch:new e.bp(de,y.u_pitch),u_rotate_symbol:new e.b_(de,y.u_rotate_symbol),u_aspect_ratio:new e.bp(de,y.u_aspect_ratio),u_fade_change:new e.bp(de,y.u_fade_change),u_label_plane_matrix:new e.c0(de,y.u_label_plane_matrix),u_coord_matrix:new e.c0(de,y.u_coord_matrix),u_is_text:new e.b_(de,y.u_is_text),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_is_along_line:new e.b_(de,y.u_is_along_line),u_is_variable_anchor:new e.b_(de,y.u_is_variable_anchor),u_texsize:new e.c3(de,y.u_texsize),u_texture:new e.b_(de,y.u_texture),u_translation:new e.c3(de,y.u_translation),u_pitched_scale:new e.bp(de,y.u_pitched_scale)}),symbolSDF:(de,y)=>({u_is_size_zoom_constant:new e.b_(de,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(de,y.u_is_size_feature_constant),u_size_t:new e.bp(de,y.u_size_t),u_size:new e.bp(de,y.u_size),u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_pitch:new e.bp(de,y.u_pitch),u_rotate_symbol:new e.b_(de,y.u_rotate_symbol),u_aspect_ratio:new e.bp(de,y.u_aspect_ratio),u_fade_change:new e.bp(de,y.u_fade_change),u_label_plane_matrix:new e.c0(de,y.u_label_plane_matrix),u_coord_matrix:new e.c0(de,y.u_coord_matrix),u_is_text:new e.b_(de,y.u_is_text),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_is_along_line:new e.b_(de,y.u_is_along_line),u_is_variable_anchor:new e.b_(de,y.u_is_variable_anchor),u_texsize:new e.c3(de,y.u_texsize),u_texture:new e.b_(de,y.u_texture),u_gamma_scale:new e.bp(de,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_is_halo:new e.b_(de,y.u_is_halo),u_is_plain:new e.b_(de,y.u_is_plain),u_translation:new e.c3(de,y.u_translation),u_pitched_scale:new e.bp(de,y.u_pitched_scale)}),symbolTextAndIcon:(de,y)=>({u_is_size_zoom_constant:new e.b_(de,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(de,y.u_is_size_feature_constant),u_size_t:new e.bp(de,y.u_size_t),u_size:new e.bp(de,y.u_size),u_camera_to_center_distance:new e.bp(de,y.u_camera_to_center_distance),u_pitch:new e.bp(de,y.u_pitch),u_rotate_symbol:new e.b_(de,y.u_rotate_symbol),u_aspect_ratio:new e.bp(de,y.u_aspect_ratio),u_fade_change:new e.bp(de,y.u_fade_change),u_label_plane_matrix:new e.c0(de,y.u_label_plane_matrix),u_coord_matrix:new e.c0(de,y.u_coord_matrix),u_is_text:new e.b_(de,y.u_is_text),u_pitch_with_map:new e.b_(de,y.u_pitch_with_map),u_is_along_line:new e.b_(de,y.u_is_along_line),u_is_variable_anchor:new e.b_(de,y.u_is_variable_anchor),u_texsize:new e.c3(de,y.u_texsize),u_texsize_icon:new e.c3(de,y.u_texsize_icon),u_texture:new e.b_(de,y.u_texture),u_texture_icon:new e.b_(de,y.u_texture_icon),u_gamma_scale:new e.bp(de,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(de,y.u_device_pixel_ratio),u_is_halo:new e.b_(de,y.u_is_halo),u_translation:new e.c3(de,y.u_translation),u_pitched_scale:new e.bp(de,y.u_pitched_scale)}),background:(de,y)=>({u_opacity:new e.bp(de,y.u_opacity),u_color:new e.b$(de,y.u_color)}),backgroundPattern:(de,y)=>({u_opacity:new e.bp(de,y.u_opacity),u_image:new e.b_(de,y.u_image),u_pattern_tl_a:new e.c3(de,y.u_pattern_tl_a),u_pattern_br_a:new e.c3(de,y.u_pattern_br_a),u_pattern_tl_b:new e.c3(de,y.u_pattern_tl_b),u_pattern_br_b:new e.c3(de,y.u_pattern_br_b),u_texsize:new e.c3(de,y.u_texsize),u_mix:new e.bp(de,y.u_mix),u_pattern_size_a:new e.c3(de,y.u_pattern_size_a),u_pattern_size_b:new e.c3(de,y.u_pattern_size_b),u_scale_a:new e.bp(de,y.u_scale_a),u_scale_b:new e.bp(de,y.u_scale_b),u_pixel_coord_upper:new e.c3(de,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(de,y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(de,y.u_tile_units_to_pixels)}),terrain:(de,y)=>({u_texture:new e.b_(de,y.u_texture),u_ele_delta:new e.bp(de,y.u_ele_delta),u_fog_matrix:new e.c0(de,y.u_fog_matrix),u_fog_color:new e.b$(de,y.u_fog_color),u_fog_ground_blend:new e.bp(de,y.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(de,y.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(de,y.u_horizon_color),u_horizon_fog_blend:new e.bp(de,y.u_horizon_fog_blend),u_is_globe_mode:new e.bp(de,y.u_is_globe_mode)}),terrainDepth:(de,y)=>({u_ele_delta:new e.bp(de,y.u_ele_delta)}),terrainCoords:(de,y)=>({u_texture:new e.b_(de,y.u_texture),u_terrain_coords_id:new e.bp(de,y.u_terrain_coords_id),u_ele_delta:new e.bp(de,y.u_ele_delta)}),projectionErrorMeasurement:(de,y)=>({u_input:new e.bp(de,y.u_input),u_output_expected:new e.bp(de,y.u_output_expected)}),atmosphere:(de,y)=>({u_sun_pos:new e.c2(de,y.u_sun_pos),u_atmosphere_blend:new e.bp(de,y.u_atmosphere_blend),u_globe_position:new e.c2(de,y.u_globe_position),u_globe_radius:new e.bp(de,y.u_globe_radius),u_inv_proj_matrix:new e.c0(de,y.u_inv_proj_matrix)}),sky:(de,y)=>({u_sky_color:new e.b$(de,y.u_sky_color),u_horizon_color:new e.b$(de,y.u_horizon_color),u_horizon:new e.c3(de,y.u_horizon),u_horizon_normal:new e.c3(de,y.u_horizon_normal),u_sky_horizon_blend:new e.bp(de,y.u_sky_horizon_blend),u_sky_blend:new e.bp(de,y.u_sky_blend)})};class Yu{constructor(y,O,ie){this.context=y;let ce=y.gl;this.buffer=ce.createBuffer(),this.dynamicDraw=!!ie,this.context.unbindVAO(),y.bindElementBuffer.set(this.buffer),ce.bufferData(ce.ELEMENT_ARRAY_BUFFER,O.arrayBuffer,this.dynamicDraw?ce.DYNAMIC_DRAW:ce.STATIC_DRAW),this.dynamicDraw||O.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(y){let O=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),O.bufferSubData(O.ELEMENT_ARRAY_BUFFER,0,y.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let pc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Kc{constructor(y,O,ie,ce){this.length=O.length,this.attributes=ie,this.itemSize=O.bytesPerElement,this.dynamicDraw=ce,this.context=y;let _e=y.gl;this.buffer=_e.createBuffer(),y.bindVertexBuffer.set(this.buffer),_e.bufferData(_e.ARRAY_BUFFER,O.arrayBuffer,this.dynamicDraw?_e.DYNAMIC_DRAW:_e.STATIC_DRAW),this.dynamicDraw||O.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(y){if(y.length!==this.length)throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);let O=this.context.gl;this.bind(),O.bufferSubData(O.ARRAY_BUFFER,0,y.arrayBuffer)}enableAttributes(y,O){for(let ie of this.attributes){let ce=O.attributes[ie.name];ce!==void 0&&y.enableVertexAttribArray(ce)}}setVertexAttribPointers(y,O,ie){for(let ce of this.attributes){let _e=O.attributes[ce.name];_e!==void 0&&y.vertexAttribPointer(_e,ce.components,y[pc[ce.type]],!1,this.itemSize,ce.offset+this.itemSize*(ie||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class cs{constructor(y){this.gl=y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(y){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class Df extends cs{getDefault(){return e.bo.transparent}set(y){let O=this.current;(y.r!==O.r||y.g!==O.g||y.b!==O.b||y.a!==O.a||this.dirty)&&(this.gl.clearColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class cu extends cs{getDefault(){return 1}set(y){(y!==this.current||this.dirty)&&(this.gl.clearDepth(y),this.current=y,this.dirty=!1)}}class Cl extends cs{getDefault(){return 0}set(y){(y!==this.current||this.dirty)&&(this.gl.clearStencil(y),this.current=y,this.dirty=!1)}}class Ll extends cs{getDefault(){return[!0,!0,!0,!0]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||y[2]!==O[2]||y[3]!==O[3]||this.dirty)&&(this.gl.colorMask(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class If extends cs{getDefault(){return!0}set(y){(y!==this.current||this.dirty)&&(this.gl.depthMask(y),this.current=y,this.dirty=!1)}}class yu extends cs{getDefault(){return 255}set(y){(y!==this.current||this.dirty)&&(this.gl.stencilMask(y),this.current=y,this.dirty=!1)}}class Bc extends cs{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(y){let O=this.current;(y.func!==O.func||y.ref!==O.ref||y.mask!==O.mask||this.dirty)&&(this.gl.stencilFunc(y.func,y.ref,y.mask),this.current=y,this.dirty=!1)}}class Tl extends cs{getDefault(){let y=this.gl;return[y.KEEP,y.KEEP,y.KEEP]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||y[2]!==O[2]||this.dirty)&&(this.gl.stencilOp(y[0],y[1],y[2]),this.current=y,this.dirty=!1)}}class ll extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.STENCIL_TEST):O.disable(O.STENCIL_TEST),this.current=y,this.dirty=!1}}class Jc extends cs{getDefault(){return[0,1]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||this.dirty)&&(this.gl.depthRange(y[0],y[1]),this.current=y,this.dirty=!1)}}class Nc extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.DEPTH_TEST):O.disable(O.DEPTH_TEST),this.current=y,this.dirty=!1}}class Rf extends cs{getDefault(){return this.gl.LESS}set(y){(y!==this.current||this.dirty)&&(this.gl.depthFunc(y),this.current=y,this.dirty=!1)}}class fu extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.BLEND):O.disable(O.BLEND),this.current=y,this.dirty=!1}}class Du extends cs{getDefault(){let y=this.gl;return[y.ONE,y.ZERO]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||this.dirty)&&(this.gl.blendFunc(y[0],y[1]),this.current=y,this.dirty=!1)}}class Iu extends cs{getDefault(){return e.bo.transparent}set(y){let O=this.current;(y.r!==O.r||y.g!==O.g||y.b!==O.b||y.a!==O.a||this.dirty)&&(this.gl.blendColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class Xu extends cs{getDefault(){return this.gl.FUNC_ADD}set(y){(y!==this.current||this.dirty)&&(this.gl.blendEquation(y),this.current=y,this.dirty=!1)}}class Qc extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;y?O.enable(O.CULL_FACE):O.disable(O.CULL_FACE),this.current=y,this.dirty=!1}}class ef extends cs{getDefault(){return this.gl.BACK}set(y){(y!==this.current||this.dirty)&&(this.gl.cullFace(y),this.current=y,this.dirty=!1)}}class _u extends cs{getDefault(){return this.gl.CCW}set(y){(y!==this.current||this.dirty)&&(this.gl.frontFace(y),this.current=y,this.dirty=!1)}}class $u extends cs{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}}class mc extends cs{getDefault(){return this.gl.TEXTURE0}set(y){(y!==this.current||this.dirty)&&(this.gl.activeTexture(y),this.current=y,this.dirty=!1)}}class Ru extends cs{getDefault(){let y=this.gl;return[0,0,y.drawingBufferWidth,y.drawingBufferHeight]}set(y){let O=this.current;(y[0]!==O[0]||y[1]!==O[1]||y[2]!==O[2]||y[3]!==O[3]||this.dirty)&&(this.gl.viewport(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class zo extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindFramebuffer(O.FRAMEBUFFER,y),this.current=y,this.dirty=!1}}class gc extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindRenderbuffer(O.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class Vf extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindTexture(O.TEXTURE_2D,y),this.current=y,this.dirty=!1}}class mf extends cs{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.bindBuffer(O.ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class tf extends cs{getDefault(){return null}set(y){let O=this.gl;O.bindBuffer(O.ELEMENT_ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class gf extends cs{getDefault(){return null}set(y){var O;if(y===this.current&&!this.dirty)return;let ie=this.gl;us(ie)?ie.bindVertexArray(y):(O=ie.getExtension("OES_vertex_array_object"))===null||O===void 0||O.bindVertexArrayOES(y),this.current=y,this.dirty=!1}}class Hf extends cs{getDefault(){return 4}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.pixelStorei(O.UNPACK_ALIGNMENT,y),this.current=y,this.dirty=!1}}class yf extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),this.current=y,this.dirty=!1}}class ul extends cs{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let O=this.gl;O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,y),this.current=y,this.dirty=!1}}class Pl extends cs{constructor(y,O){super(y),this.context=y,this.parent=O}getDefault(){return null}}class yc extends Pl{setDirty(){this.dirty=!0}set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let O=this.gl;O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_2D,y,0),this.current=y,this.dirty=!1}}class _c extends Pl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let O=this.gl;O.framebufferRenderbuffer(O.FRAMEBUFFER,O.DEPTH_ATTACHMENT,O.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class bc extends Pl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let O=this.gl;O.framebufferRenderbuffer(O.FRAMEBUFFER,O.DEPTH_STENCIL_ATTACHMENT,O.RENDERBUFFER,y),this.current=y,this.dirty=!1}}let ac="Framebuffer is not complete";class zt{constructor(y,O,ie,ce,_e){this.context=y,this.width=O,this.height=ie;let De=y.gl,Ne=this.framebuffer=De.createFramebuffer();if(this.colorAttachment=new yc(y,Ne),ce)this.depthAttachment=_e?new bc(y,Ne):new _c(y,Ne);else if(_e)throw new Error("Stencil cannot be set without depth");if(De.checkFramebufferStatus(De.FRAMEBUFFER)!==De.FRAMEBUFFER_COMPLETE)throw new Error(ac)}destroy(){let y=this.context.gl,O=this.colorAttachment.get();if(O&&y.deleteTexture(O),this.depthAttachment){let ie=this.depthAttachment.get();ie&&y.deleteRenderbuffer(ie)}y.deleteFramebuffer(this.framebuffer)}}class rr{constructor(y){var O,ie;if(this.gl=y,this.clearColor=new Df(this),this.clearDepth=new cu(this),this.clearStencil=new Cl(this),this.colorMask=new Ll(this),this.depthMask=new If(this),this.stencilMask=new yu(this),this.stencilFunc=new Bc(this),this.stencilOp=new Tl(this),this.stencilTest=new ll(this),this.depthRange=new Jc(this),this.depthTest=new Nc(this),this.depthFunc=new Rf(this),this.blend=new fu(this),this.blendFunc=new Du(this),this.blendColor=new Iu(this),this.blendEquation=new Xu(this),this.cullFace=new Qc(this),this.cullFaceSide=new ef(this),this.frontFace=new _u(this),this.program=new $u(this),this.activeTexture=new mc(this),this.viewport=new Ru(this),this.bindFramebuffer=new zo(this),this.bindRenderbuffer=new gc(this),this.bindTexture=new Vf(this),this.bindVertexBuffer=new mf(this),this.bindElementBuffer=new tf(this),this.bindVertexArray=new gf(this),this.pixelStoreUnpack=new Hf(this),this.pixelStoreUnpackPremultiplyAlpha=new yf(this),this.pixelStoreUnpackFlipY=new ul(this),this.extTextureFilterAnisotropic=y.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE),us(y)){this.HALF_FLOAT=y.HALF_FLOAT;let ce=y.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(O=y.RGBA16F)!==null&&O!==void 0?O:ce?.RGBA16F_EXT,this.RGB16F=(ie=y.RGB16F)!==null&&ie!==void 0?ie:ce?.RGB16F_EXT,y.getExtension("EXT_color_buffer_float")}else{y.getExtension("EXT_color_buffer_half_float"),y.getExtension("OES_texture_half_float_linear");let ce=y.getExtension("OES_texture_half_float");this.HALF_FLOAT=ce?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(y,O){return new Yu(this,y,O)}createVertexBuffer(y,O,ie){return new Kc(this,y,O,ie)}createRenderbuffer(y,O,ie){let ce=this.gl,_e=ce.createRenderbuffer();return this.bindRenderbuffer.set(_e),ce.renderbufferStorage(ce.RENDERBUFFER,y,O,ie),this.bindRenderbuffer.set(null),_e}createFramebuffer(y,O,ie,ce){return new zt(this,y,O,ie,ce)}clear({color:y,depth:O,stencil:ie}){let ce=this.gl,_e=0;y&&(_e|=ce.COLOR_BUFFER_BIT,this.clearColor.set(y),this.colorMask.set([!0,!0,!0,!0])),O!==void 0&&(_e|=ce.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(O),this.depthMask.set(!0)),ie!==void 0&&(_e|=ce.STENCIL_BUFFER_BIT,this.clearStencil.set(ie),this.stencilMask.set(255)),ce.clear(_e)}setCullFace(y){y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(y.mode),this.frontFace.set(y.frontFace))}setDepthMode(y){y.func!==this.gl.ALWAYS||y.mask?(this.depthTest.set(!0),this.depthFunc.set(y.func),this.depthMask.set(y.mask),this.depthRange.set(y.range)):this.depthTest.set(!1)}setStencilMode(y){y.test.func!==this.gl.ALWAYS||y.mask?(this.stencilTest.set(!0),this.stencilMask.set(y.mask),this.stencilOp.set([y.fail,y.depthFail,y.pass]),this.stencilFunc.set({func:y.test.func,ref:y.ref,mask:y.test.mask})):this.stencilTest.set(!1)}setColorMode(y){e.bQ(y.blendFunction,wo.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(y.blendFunction),this.blendColor.set(y.blendColor)),this.colorMask.set(y.mask)}createVertexArray(){var y;return us(this.gl)?this.gl.createVertexArray():(y=this.gl.getExtension("OES_vertex_array_object"))===null||y===void 0?void 0:y.createVertexArrayOES()}deleteVertexArray(y){var O;us(this.gl)?this.gl.deleteVertexArray(y):(O=this.gl.getExtension("OES_vertex_array_object"))===null||O===void 0||O.deleteVertexArrayOES(y)}unbindVAO(){this.bindVertexArray.set(null)}}let Br;function wr(de,y,O,ie,ce){var _e,De;let Ne=de.context,Ye=de.transform,lt=Ne.gl,ct=de.useProgram("collisionBox"),Ft=[],Gt=0,Jt=0;for(let Ar of ie){let dr=y.getTile(Ar).getBucket(O);if(!dr)continue;let mr=ce?dr.textCollisionBox:dr.iconCollisionBox,qr=dr.collisionCircleArray;qr.length>0&&(Ft.push({circleArray:qr,circleOffset:Jt,coord:Ar}),Gt+=qr.length/4,Jt=Gt),mr&&ct.draw(Ne,lt.LINES,lo.disabled,mo.disabled,de.colorModeForRenderPass(),Di.disabled,$c(de.transform),(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(Ar),Ye.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),O.id,mr.layoutVertexBuffer,mr.indexBuffer,mr.segments,null,de.transform.zoom,null,null,mr.collisionVertexBuffer)}if(!ce||!Ft.length)return;let it=de.useProgram("collisionCircle"),Rt=new e.ca;Rt.resize(4*Gt),Rt._trim();let qt=0;for(let Ar of Ft)for(let dr=0;dr=0&&(Rt[or.associatedIconIndex]={shiftedAnchor:Tn,angle:Xn})}else da(or.numGlyphs,Jt)}if(Ye){it.clear();let qt=de.icon.placedSymbolArray;for(let or=0;orde.style.map.terrain.getElevation(Sn,Do,ru):null,Il=O.layout.get("text-rotation-alignment")==="map";jn(Xn,de,ce,fo,ts,Ar,lt,Il,Sn.toUnwrapped(),or.width,or.height,jo,el)}let Qs=ce&&Nn||Uo,os=dr||Qs?un:Ar?fo:de.transform.clipSpaceToPixelsMatrix,hs=$a&&O.paint.get(ce?"text-halo-width":"icon-halo-width").constantOr(1)!==0,ss;ss=$a?Xn.iconsInText?bl(Si.kind,gi,mr,Ar,dr,Qs,de,os,To,jo,Ya,Eo,qn):Pf(Si.kind,gi,mr,Ar,dr,Qs,de,os,To,jo,ce,Ya,hs,qn):gu(Si.kind,gi,mr,Ar,dr,Qs,de,os,To,jo,ce,Ya,qn);let ks={program:xa,buffers:$n,uniformValues:ss,projectionData:qs,atlasTexture:Xa,atlasTextureIcon:yi,atlasInterpolation:pi,atlasInterpolationIcon:Xi,isSDF:$a,hasHalo:hs};if(qr&&Xn.canOverlap){Lr=!0;let ts=$n.segments.get();for(let el of ts)Dn.push({segments:new e.aV([el]),sortKey:el.sortKey,state:ks,terrainData:Wa})}else Dn.push({segments:$n.segments,sortKey:0,state:ks,terrainData:Wa})}Lr&&Dn.sort((Sn,Tn)=>Sn.sortKey-Tn.sortKey);let _n=(it=O.paint.get(ce?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&it!==void 0?it:1/0,vn=O.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||_n>1;for(let Sn of Dn){let Tn=Sn.state;Rt.activeTexture.set(qt.TEXTURE0),Tn.atlasTexture.bind(Tn.atlasInterpolation,qt.CLAMP_TO_EDGE),Tn.atlasTextureIcon&&(Rt.activeTexture.set(qt.TEXTURE1),Tn.atlasTextureIcon&&Tn.atlasTextureIcon.bind(Tn.atlasInterpolationIcon,qt.CLAMP_TO_EDGE));let Xn=Tn.isSDF&&Tn.hasHalo;if(Xn){let $n=Tn.uniformValues;$n.u_is_halo=1,vn&&($n.u_is_plain=0,Gn(Tn.buffers,Sn.segments,O,de,Tn.program,cn,ct,Ft,$n,Tn.projectionData,Sn.terrainData),$n.u_is_halo=0,$n.u_is_plain=1)}Gn(Tn.buffers,Sn.segments,O,de,Tn.program,cn,ct,Ft,Tn.uniformValues,Tn.projectionData,Sn.terrainData),Xn&&!vn&&(Tn.uniformValues.u_is_halo=0)}}function Gn(de,y,O,ie,ce,_e,De,Ne,Ye,lt,ct){let Ft=ie.context;ce.draw(Ft,Ft.gl.TRIANGLES,_e,De,Ne,Di.backCCW,Ye,ct,lt,O.id,de.layoutVertexBuffer,de.indexBuffer,y,O.paint,ie.transform.zoom,de.programConfigurations.get(O.id),de.dynamicLayoutVertexBuffer,de.opacityVertexBuffer)}function oa(de,y,O,ie,ce){let _e=de.context,De=_e.gl,Ne=mo.disabled,Ye=new wo([De.ONE,De.ONE],e.bo.transparent,[!0,!0,!0,!0]),lt=y.getBucket(O);if(!lt)return;let ct=ie.key,Ft=O.heatmapFbos.get(ct);Ft||(Ft=La(_e,y.tileSize,y.tileSize),O.heatmapFbos.set(ct,Ft)),_e.bindFramebuffer.set(Ft.framebuffer),_e.viewport.set([0,0,y.tileSize,y.tileSize]),_e.clear({color:e.bo.transparent});let Gt=lt.programConfigurations.get(O.id),Jt=de.useProgram("heatmap",Gt,!ce),it=de.transform.getProjectionData({overscaledTileID:y.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Rt=de.style.map.terrain.getTerrainData(ie);Jt.draw(_e,De.TRIANGLES,lo.disabled,Ne,Ye,Di.disabled,Dc(y,de.transform.zoom,O.paint.get("heatmap-intensity"),1),Rt,it,O.id,lt.layoutVertexBuffer,lt.indexBuffer,lt.segments,O.paint,de.transform.zoom,Gt)}function fa(de,y,O,ie,ce){let _e=de.context,De=_e.gl,Ne=de.transform;_e.setColorMode(de.colorModeForRenderPass());let Ye=qa(_e,y),lt=O.key,ct=y.heatmapFbos.get(lt);if(!ct)return;_e.activeTexture.set(De.TEXTURE0),De.bindTexture(De.TEXTURE_2D,ct.colorAttachment.get()),_e.activeTexture.set(De.TEXTURE1),Ye.bind(De.LINEAR,De.CLAMP_TO_EDGE);let Ft=Ne.getProjectionData({overscaledTileID:O,applyTerrainMatrix:ce,applyGlobeMatrix:!ie});de.useProgram("heatmapTexture").draw(_e,De.TRIANGLES,lo.disabled,mo.disabled,de.colorModeForRenderPass(),Di.disabled,Ic(de,y,0,1),null,Ft,y.id,de.rasterBoundsBuffer,de.quadTriangleIndexBuffer,de.rasterBoundsSegments,y.paint,Ne.zoom),ct.destroy(),y.heatmapFbos.delete(lt)}function La(de,y,O){var ie,ce;let _e=de.gl,De=_e.createTexture();_e.bindTexture(_e.TEXTURE_2D,De),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_WRAP_S,_e.CLAMP_TO_EDGE),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_WRAP_T,_e.CLAMP_TO_EDGE),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_MIN_FILTER,_e.LINEAR),_e.texParameteri(_e.TEXTURE_2D,_e.TEXTURE_MAG_FILTER,_e.LINEAR);let Ne=(ie=de.HALF_FLOAT)!==null&&ie!==void 0?ie:_e.UNSIGNED_BYTE,Ye=(ce=de.RGBA16F)!==null&&ce!==void 0?ce:_e.RGBA;_e.texImage2D(_e.TEXTURE_2D,0,Ye,y,O,0,_e.RGBA,Ne,null);let lt=de.createFramebuffer(y,O,!1,!1);return lt.colorAttachment.set(De),lt}function qa(de,y){return y.colorRampTexture||(y.colorRampTexture=new e.T(de,y.colorRamp,de.gl.RGBA)),y.colorRampTexture}function Bi(de,y,O,ie,ce,_e,De,Ne){let Ye=256;if(ce.stepInterpolant){let lt=y.getSource().maxzoom,ct=De.canonical.z===lt?Math.ceil(1<de.options.anisotropicFilterPitch&&Jt.texParameterf(Jt.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax);let Sn=(ct=de.style.map.terrain)===null||ct===void 0?void 0:ct.getTerrainData(Lr),Tn=Rt.getProjectionData({overscaledTileID:Lr,aligned:vr,applyGlobeMatrix:!lt,applyTerrainMatrix:!0}),Xn=Gu(_n,qn,vn.fadeMix,O,Ne),$n=qt.getMeshFromTileID(Gt,Lr.canonical,_e,De,"raster");it.draw(Gt,Jt.TRIANGLES,cn,ce?ce[Lr.overscaledZ]:mo.disabled,or,Ye?Di.frontCCW:Di.backCCW,Xn,Sn,Tn,O.id,$n.vertexBuffer,$n.indexBuffer,$n.segments)}}function Ks(de,y,O,ie){let ce={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(O===0||ie)return ce;if(de.fadingParentID){let _e=y.getLoadedTile(de.fadingParentID);if(!_e)return ce;let De=Math.pow(2,_e.tileID.overscaledZ-de.tileID.overscaledZ),Ne=[de.tileID.canonical.x*De%1,de.tileID.canonical.y*De%1],Ye=function(lt,ct,Ft){let Gt=m(),Jt=(Gt-ct.timeAdded)/Ft,it=lt.fadingDirection===mt.Incoming,Rt=e.al((Gt-lt.timeAdded)/Ft,0,1),qt=e.al(1-Jt,0,1),or=it?Rt:qt;return{tileOpacity:or,parentTileOpacity:it?qt:Rt,fadeMix:{opacity:1,mix:1-or}}}(de,_e,O);return{parentTile:_e,parentScaleBy:De,parentTopLeft:Ne,fadeValues:Ye}}if(de.selfFading){let _e=function(De,Ne){let Ye=(m()-De.timeAdded)/Ne,lt=e.al(Ye,0,1);return{tileOpacity:lt,fadeMix:{opacity:lt,mix:0}}}(de,O);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:_e}}return ce}let Rs=new e.bo(1,0,0,1),ps=new e.bo(0,1,0,1),vi=new e.bo(0,0,1,1),Xo=new e.bo(1,0,1,1),Ss=new e.bo(0,1,1,1);function Ws(de,y,O,ie){Nl(de,0,y+O/2,de.transform.width,O,ie)}function Dl(de,y,O,ie){Nl(de,y-O/2,0,O,de.transform.height,ie)}function Nl(de,y,O,ie,ce,_e){let De=de.context,Ne=De.gl;Ne.enable(Ne.SCISSOR_TEST),Ne.scissor(y*de.pixelRatio,O*de.pixelRatio,ie*de.pixelRatio,ce*de.pixelRatio),De.clear({color:_e}),Ne.disable(Ne.SCISSOR_TEST)}function Kl(de,y,O){var ie;let ce=de.context,_e=ce.gl,De=de.useProgram("debug"),Ne=lo.disabled,Ye=mo.disabled,lt=de.colorModeForRenderPass(),ct="$debug",Ft=(ie=de.style.map.terrain)===null||ie===void 0?void 0:ie.getTerrainData(O);ce.activeTexture.set(_e.TEXTURE0);let Gt=y.getTileByID(O.key).latestRawTileData,Jt=Math.floor((Gt?.byteLength||0)/1024),it=y.getTile(O).tileSize,Rt=512/Math.min(it,512)*(O.overscaledZ/de.transform.zoom)*.5,qt=O.canonical.toString();O.overscaledZ!==O.canonical.z&&(qt+=` => ${O.overscaledZ}`),function(vr,Ar){vr.initDebugOverlayCanvas();let dr=vr.debugOverlayCanvas,mr=vr.context.gl,qr=vr.debugOverlayCanvas.getContext("2d");qr.clearRect(0,0,dr.width,dr.height),qr.shadowColor="white",qr.shadowBlur=2,qr.lineWidth=1.5,qr.strokeStyle="white",qr.textBaseline="top",qr.font="bold 36px Open Sans, sans-serif",qr.fillText(Ar,5,5),qr.strokeText(Ar,5,5),vr.debugOverlayTexture.update(dr),vr.debugOverlayTexture.bind(mr.LINEAR,mr.CLAMP_TO_EDGE)}(de,`${qt} ${Jt}kB`);let or=de.transform.getProjectionData({overscaledTileID:O,applyGlobeMatrix:!0,applyTerrainMatrix:!0});De.draw(ce,_e.TRIANGLES,Ne,Ye,wo.alphaBlended,Di.disabled,df(e.bo.transparent,Rt),null,or,ct,de.debugBuffer,de.quadTriangleIndexBuffer,de.debugSegments),De.draw(ce,_e.LINE_STRIP,Ne,Ye,lt,Di.disabled,df(e.bo.red),Ft,or,ct,de.debugBuffer,de.tileBorderIndexBuffer,de.debugSegments)}function Fu(de,y,O,ie){let{isRenderingGlobe:ce}=ie,_e=de.context,De=_e.gl,Ne=de.transform,Ye=de.colorModeForRenderPass(),lt=de.getDepthModeFor3D(),ct=de.useProgram("terrain");_e.bindFramebuffer.set(null),_e.viewport.set([0,0,de.width,de.height]);for(let Ft of O){let Gt=y.getTerrainMesh(Ft.tileID),Jt=de.renderToTexture.getTexture(Ft),it=y.getTerrainData(Ft.tileID);_e.activeTexture.set(De.TEXTURE0),De.bindTexture(De.TEXTURE_2D,Jt.texture);let Rt=y.getMeshFrameDelta(Ne.zoom),qt=Ne.calculateFogMatrix(Ft.tileID.toUnwrapped()),or=Cf(Rt,qt,de.style.sky,Ne.pitch,ce),vr=Ne.getProjectionData({overscaledTileID:Ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ct.draw(_e,De.TRIANGLES,lt,mo.disabled,Ye,Di.backCCW,or,it,vr,"terrain",Gt.vertexBuffer,Gt.indexBuffer,Gt.segments)}}function Al(de,y){if(!y.mesh){let O=new e.aU;O.emplaceBack(-1,-1),O.emplaceBack(1,-1),O.emplaceBack(1,1),O.emplaceBack(-1,1);let ie=new e.aW;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),y.mesh=new fi(de.createVertexBuffer(O,xo.members),de.createIndexBuffer(ie),e.aV.simpleSegment(0,0,O.length,ie.length))}return y.mesh}let zu={symbol:function(de,y,O,ie,ce,_e){if(de.renderPass!=="translucent")return;let{isRenderingToTexture:De}=_e,Ne=mo.disabled,Ye=de.colorModeForRenderPass();(O._unevaluatedLayout.hasValue("text-variable-anchor")||O._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(lt,ct,Ft,Gt,Jt,it,Rt,qt,or){var vr;let Ar=ct.transform,dr=ct.style.map.terrain,mr=Jt==="map",qr=it==="map";for(let Lr of lt){let cn=Gt.getTile(Lr),Nn=cn.getBucket(Ft);if(!(!((vr=Nn?.text)===null||vr===void 0)&&vr.segments.get().length))continue;let Dn=e.aw(Nn.textSizeData,Ar.zoom),qn=e.aK(cn,1,ct.transform.zoom),_n=fr(mr,ct.transform,qn),vn=Ft.layout.get("icon-text-fit")!=="none"&&Nn.hasIconData();if(Dn){let Sn=Math.pow(2,Ar.zoom-cn.tileID.overscaledZ),Tn=dr?(Xn,$n)=>dr.getElevation(Lr,Xn,$n):null;Jn(Nn,mr,qr,or,Ar,_n,Sn,Dn,vn,e.aL(Ar,cn,Rt,qt),Lr.toUnwrapped(),Tn)}}}(ie,de,O,y,O.layout.get("text-rotation-alignment"),O.layout.get("text-pitch-alignment"),O.paint.get("text-translate"),O.paint.get("text-translate-anchor"),ce),O.paint.get("icon-opacity").constantOr(1)!==0&&Pa(de,y,O,ie,!1,O.paint.get("icon-translate"),O.paint.get("icon-translate-anchor"),O.layout.get("icon-rotation-alignment"),O.layout.get("icon-pitch-alignment"),O.layout.get("icon-keep-upright"),Ne,Ye,De),O.paint.get("text-opacity").constantOr(1)!==0&&Pa(de,y,O,ie,!0,O.paint.get("text-translate"),O.paint.get("text-translate-anchor"),O.layout.get("text-rotation-alignment"),O.layout.get("text-pitch-alignment"),O.layout.get("text-keep-upright"),Ne,Ye,De),y.map.showCollisionBoxes&&(wr(de,y,O,ie,!0),wr(de,y,O,ie,!1))},circle:function(de,y,O,ie,ce){var _e;if(de.renderPass!=="translucent")return;let{isRenderingToTexture:De}=ce,Ne=O.paint.get("circle-opacity"),Ye=O.paint.get("circle-stroke-width"),lt=O.paint.get("circle-stroke-opacity"),ct=!O.layout.get("circle-sort-key").isConstant();if(Ne.constantOr(1)===0&&(Ye.constantOr(1)===0||lt.constantOr(1)===0))return;let Ft=de.context,Gt=Ft.gl,Jt=de.transform,it=de.getDepthModeForSublayer(0,lo.ReadOnly),Rt=mo.disabled,qt=de.colorModeForRenderPass(),or=[],vr=Jt.getCircleRadiusCorrection();for(let Ar of ie){let dr=y.getTile(Ar),mr=dr.getBucket(O);if(!mr)continue;let qr=O.paint.get("circle-translate"),Lr=O.paint.get("circle-translate-anchor"),cn=e.aL(Jt,dr,qr,Lr),Nn=mr.programConfigurations.get(O.id),Dn=de.useProgram("circle",Nn),qn=mr.layoutVertexBuffer,_n=mr.indexBuffer,vn=(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(Ar),Sn={programConfiguration:Nn,program:Dn,layoutVertexBuffer:qn,indexBuffer:_n,uniformValues:Pc(de,dr,O,cn,vr),terrainData:vn,projectionData:Jt.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!De,applyTerrainMatrix:!0})};if(ct){let Tn=mr.segments.get();for(let Xn of Tn)or.push({segments:new e.aV([Xn]),sortKey:Xn.sortKey,state:Sn})}else or.push({segments:mr.segments,sortKey:0,state:Sn})}ct&&or.sort((Ar,dr)=>Ar.sortKey-dr.sortKey);for(let Ar of or){let{programConfiguration:dr,program:mr,layoutVertexBuffer:qr,indexBuffer:Lr,uniformValues:cn,terrainData:Nn,projectionData:Dn}=Ar.state;mr.draw(Ft,Gt.TRIANGLES,it,Rt,qt,Di.backCCW,cn,Nn,Dn,O.id,qr,Lr,Ar.segments,O.paint,de.transform.zoom,dr)}},heatmap:function(de,y,O,ie,ce){if(O.paint.get("heatmap-opacity")===0)return;let _e=de.context,{isRenderingToTexture:De,isRenderingGlobe:Ne}=ce;if(de.style.map.terrain){for(let Ye of ie){let lt=y.getTile(Ye);y.hasRenderableParent(Ye)||(de.renderPass==="offscreen"?oa(de,lt,O,Ye,Ne):de.renderPass==="translucent"&&fa(de,O,Ye,De,Ne))}_e.viewport.set([0,0,de.width,de.height])}else de.renderPass==="offscreen"?function(Ye,lt,ct,Ft){let Gt=Ye.context,Jt=Gt.gl,it=Ye.transform,Rt=mo.disabled,qt=new wo([Jt.ONE,Jt.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(or,vr,Ar){let dr=or.gl;or.activeTexture.set(dr.TEXTURE1),or.viewport.set([0,0,vr.width/4,vr.height/4]);let mr=Ar.heatmapFbos.get(e.cd);mr?(dr.bindTexture(dr.TEXTURE_2D,mr.colorAttachment.get()),or.bindFramebuffer.set(mr.framebuffer)):(mr=La(or,vr.width/4,vr.height/4),Ar.heatmapFbos.set(e.cd,mr))})(Gt,Ye,ct),Gt.clear({color:e.bo.transparent});for(let or of Ft){if(lt.hasRenderableParent(or))continue;let vr=lt.getTile(or),Ar=vr.getBucket(ct);if(!Ar)continue;let dr=Ar.programConfigurations.get(ct.id),mr=Ye.useProgram("heatmap",dr),qr=it.getProjectionData({overscaledTileID:or,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Lr=it.getCircleRadiusCorrection();mr.draw(Gt,Jt.TRIANGLES,lo.disabled,Rt,qt,Di.backCCW,Dc(vr,it.zoom,ct.paint.get("heatmap-intensity"),Lr),null,qr,ct.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,ct.paint,it.zoom,dr)}Gt.viewport.set([0,0,Ye.width,Ye.height])}(de,y,O,ie):de.renderPass==="translucent"&&function(Ye,lt){let ct=Ye.context,Ft=ct.gl;ct.setColorMode(Ye.colorModeForRenderPass());let Gt=lt.heatmapFbos.get(e.cd);Gt&&(ct.activeTexture.set(Ft.TEXTURE0),Ft.bindTexture(Ft.TEXTURE_2D,Gt.colorAttachment.get()),ct.activeTexture.set(Ft.TEXTURE1),qa(ct,lt).bind(Ft.LINEAR,Ft.CLAMP_TO_EDGE),Ye.useProgram("heatmapTexture").draw(ct,Ft.TRIANGLES,lo.disabled,mo.disabled,Ye.colorModeForRenderPass(),Di.disabled,Ic(Ye,lt,0,1),null,null,lt.id,Ye.viewportBuffer,Ye.quadTriangleIndexBuffer,Ye.viewportSegments,lt.paint,Ye.transform.zoom))}(de,O)},line:function(de,y,O,ie,ce){var _e;if(de.renderPass!=="translucent")return;let{isRenderingToTexture:De}=ce,Ne=O.paint.get("line-opacity"),Ye=O.paint.get("line-width");if(Ne.constantOr(1)===0||Ye.constantOr(1)===0)return;let lt=de.getDepthModeForSublayer(0,lo.ReadOnly),ct=de.colorModeForRenderPass(),Ft=O.paint.get("line-dasharray"),Gt=Ft.constantOr(1),Jt=O.paint.get("line-pattern"),it=Jt.constantOr(1),Rt=O.paint.get("line-gradient"),qt=O.getCrossfadeParameters(),or;or=it?"linePattern":Gt&&Rt?"lineGradientSDF":Gt?"lineSDF":Rt?"lineGradient":"line";let vr=de.context,Ar=vr.gl,dr=de.transform,mr=!0;for(let qr of ie){let Lr=y.getTile(qr);if(it&&!Lr.patternsLoaded())continue;let cn=Lr.getBucket(O);if(!cn)continue;let Nn=cn.programConfigurations.get(O.id),Dn=de.context.program.get(),qn=de.useProgram(or,Nn),_n=mr||qn.program!==Dn,vn=(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(qr),Sn=Jt.constantOr(null),Tn=Ft?.constantOr(null);if(Sn&&Lr.imageAtlas){let Si=Lr.imageAtlas,Ma=Si.patternPositions[Sn.to.toString()],xa=Si.patternPositions[Sn.from.toString()];Ma&&xa&&Nn.setConstantPatternPositions(Ma,xa)}else if(Tn){let Si=O.layout.get("line-cap").constantOr(null)==="round",Ma=de.lineAtlas.getDash(Tn.to,Si),xa=de.lineAtlas.getDash(Tn.from,Si);Nn.setConstantDashPositions(Ma,xa)}let Xn=dr.getProjectionData({overscaledTileID:qr,applyGlobeMatrix:!De,applyTerrainMatrix:!0}),$n=dr.getPixelScale(),Ha;it?(Ha=Pu(de,Lr,O,$n,qt),Ni(vr,Ar,Lr,Nn,qt)):Gt&&Rt?(Ha=zc(de,Lr,O,$n,qt,cn.lineClipsArray.length),Va(de,y,vr,Ar,O,cn,qr,Nn,qt)):Gt?(Ha=vc(de,Lr,O,$n,qt),Zi(de,vr,Ar,Nn,_n,qt)):Rt?(Ha=Fc(de,Lr,O,$n,cn.lineClipsArray.length),_i(de,y,vr,Ar,O,cn,qr)):Ha=sl(de,Lr,O,$n);let $a=de.stencilModeForClipping(qr);qn.draw(vr,Ar.TRIANGLES,lt,$a,ct,Di.disabled,Ha,vn,Xn,O.id,cn.layoutVertexBuffer,cn.indexBuffer,cn.segments,O.paint,de.transform.zoom,Nn,cn.layoutVertexBuffer2),mr=!1}},fill:function(de,y,O,ie,ce){let _e=O.paint.get("fill-color"),De=O.paint.get("fill-opacity");if(De.constantOr(1)===0)return;let{isRenderingToTexture:Ne}=ce,Ye=de.colorModeForRenderPass(),lt=O.paint.get("fill-pattern"),ct=de.opaquePassEnabledForLayer()&&!lt.constantOr(1)&&_e.constantOr(e.bo.transparent).a===1&&De.constantOr(0)===1?"opaque":"translucent";if(de.renderPass===ct){let Ft=de.getDepthModeForSublayer(1,de.renderPass==="opaque"?lo.ReadWrite:lo.ReadOnly);oo(de,y,O,ie,Ft,Ye,!1,Ne)}if(de.renderPass==="translucent"&&O.paint.get("fill-antialias")){let Ft=de.getDepthModeForSublayer(O.getPaintProperty("fill-outline-color")?2:0,lo.ReadOnly);oo(de,y,O,ie,Ft,Ye,!0,Ne)}},fillExtrusion:function(de,y,O,ie,ce){let _e=O.paint.get("fill-extrusion-opacity");if(_e===0)return;let{isRenderingToTexture:De}=ce;if(de.renderPass==="translucent"){let Ne=new lo(de.context.gl.LEQUAL,lo.ReadWrite,de.depthRangeFor3D);if(_e!==1||O.paint.get("fill-extrusion-pattern").constantOr(1))go(de,y,O,ie,Ne,mo.disabled,wo.disabled,De),go(de,y,O,ie,Ne,de.stencilModeFor3D(),de.colorModeForRenderPass(),De);else{let Ye=de.colorModeForRenderPass();go(de,y,O,ie,Ne,mo.disabled,Ye,De)}}},hillshade:function(de,y,O,ie,ce){if(de.renderPass!=="offscreen"&&de.renderPass!=="translucent")return;let{isRenderingToTexture:_e}=ce,De=de.context,Ne=de.style.projection.useSubdivision,Ye=de.getDepthModeForSublayer(0,lo.ReadOnly),lt=de.colorModeForRenderPass();if(de.renderPass==="offscreen")(function(ct,Ft,Gt,Jt,it,Rt,qt){let or=ct.context,vr=or.gl,Ar=Jt.paint.get("resampling")==="nearest"?vr.NEAREST:vr.LINEAR;for(let dr of Gt){let mr=Ft.getTile(dr),qr=mr.dem;if(!qr?.data||!mr.needsHillshadePrepare)continue;let Lr=qr.dim,cn=qr.stride,Nn=qr.getPixels();if(or.activeTexture.set(vr.TEXTURE1),or.pixelStoreUnpackPremultiplyAlpha.set(!1),mr.demTexture||(mr.demTexture=ct.getTileTexture(cn)),mr.demTexture){let qn=mr.demTexture;qn.update(Nn,{premultiply:!1}),qn.bind(vr.NEAREST,vr.CLAMP_TO_EDGE)}else mr.demTexture=new e.T(or,Nn,vr.RGBA,{premultiply:!1}),mr.demTexture.bind(vr.NEAREST,vr.CLAMP_TO_EDGE);or.activeTexture.set(vr.TEXTURE0);let Dn=mr.fbo;if(!Dn){let qn=new e.T(or,{width:Lr,height:Lr,data:null},vr.RGBA);qn.bind(Ar,vr.CLAMP_TO_EDGE),Dn=mr.fbo=or.createFramebuffer(Lr,Lr,!0,!1),Dn.colorAttachment.set(qn.texture)}or.bindFramebuffer.set(Dn.framebuffer),or.viewport.set([0,0,Lr,Lr]),ct.useProgram("hillshadePrepare").draw(or,vr.TRIANGLES,it,Rt,qt,Di.disabled,Rc(mr.tileID,qr),null,null,Jt.id,ct.rasterBoundsBuffer,ct.quadTriangleIndexBuffer,ct.rasterBoundsSegments),mr.needsHillshadePrepare=!1}})(de,y,ie,O,Ye,mo.disabled,lt),De.viewport.set([0,0,de.width,de.height]);else if(de.renderPass==="translucent")if(Ne){let[ct,Ft,Gt]=de.stencilConfigForOverlapTwoPass(ie);Vo(de,y,O,Gt,ct,Ye,lt,!1,_e),Vo(de,y,O,Gt,Ft,Ye,lt,!0,_e)}else{let[ct,Ft]=de.getStencilConfigForOverlapAndUpdateStencilID(ie);Vo(de,y,O,Ft,ct,Ye,lt,!1,_e)}},colorRelief:function(de,y,O,ie,ce){if(de.renderPass!=="translucent"||!ie.length)return;let{isRenderingToTexture:_e}=ce,De=de.style.projection.useSubdivision,Ne=de.getDepthModeForSublayer(0,lo.ReadOnly),Ye=de.colorModeForRenderPass();if(De){let[lt,ct,Ft]=de.stencilConfigForOverlapTwoPass(ie);Yo(de,y,O,Ft,lt,Ne,Ye,!1,_e),Yo(de,y,O,Ft,ct,Ne,Ye,!0,_e)}else{let[lt,ct]=de.getStencilConfigForOverlapAndUpdateStencilID(ie);Yo(de,y,O,ct,lt,Ne,Ye,!1,_e)}},raster:function(de,y,O,ie,ce){if(de.renderPass!=="translucent"||O.paint.get("raster-opacity")===0||!ie.length)return;let{isRenderingToTexture:_e}=ce,De=y.getSource(),Ne=de.style.projection.useSubdivision;if(De instanceof ke)Bo(de,y,O,ie,null,!1,!1,De.tileCoords,De.flippedWindingOrder,_e);else if(Ne){let[Ye,lt,ct]=de.stencilConfigForOverlapTwoPass(ie);Bo(de,y,O,ct,Ye,!1,!0,as,!1,_e),Bo(de,y,O,ct,lt,!0,!0,as,!1,_e)}else{let[Ye,lt]=de.getStencilConfigForOverlapAndUpdateStencilID(ie);Bo(de,y,O,lt,Ye,!1,!0,as,!1,_e)}},background:function(de,y,O,ie,ce){var _e;let De=O.paint.get("background-color"),Ne=O.paint.get("background-opacity");if(Ne===0)return;let{isRenderingToTexture:Ye}=ce,lt=de.context,ct=lt.gl,Ft=de.style.projection,Gt=de.transform,Jt=Gt.tileSize,it=O.paint.get("background-pattern");if(de.isPatternMissing(it))return;let Rt=!it&&De.a===1&&Ne===1&&de.opaquePassEnabledForLayer()?"opaque":"translucent";if(de.renderPass!==Rt)return;let qt=mo.disabled,or=de.getDepthModeForSublayer(0,Rt==="opaque"?lo.ReadWrite:lo.ReadOnly),vr=de.colorModeForRenderPass(),Ar=de.useProgram(it?"backgroundPattern":"background"),dr=ie||Ze(Gt,{tileSize:Jt,terrain:de.style.map.terrain});it&&(lt.activeTexture.set(ct.TEXTURE0),de.imageManager.bind(de.context));let mr=O.getCrossfadeParameters();for(let qr of dr){let Lr=Gt.getProjectionData({overscaledTileID:qr,applyGlobeMatrix:!Ye,applyTerrainMatrix:!0}),cn=it?Wu(Ne,de,it,{tileID:qr,tileSize:Jt},mr):xl(Ne,De),Nn=(_e=de.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(qr),Dn=Ft.getMeshFromTileID(lt,qr.canonical,!1,!0,"raster");Ar.draw(lt,ct.TRIANGLES,or,qt,vr,Di.backCCW,cn,Nn,Lr,O.id,Dn.vertexBuffer,Dn.indexBuffer,Dn.segments)}},sky:function(de,y){let O=de.context,ie=O.gl,ce=((ct,Ft,Gt)=>{let Jt=Math.cos(Ft.rollInRadians),it=Math.sin(Ft.rollInRadians),Rt=Zt(Ft),qt=Ft.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ct.properties.get("sky-color"),u_horizon_color:ct.properties.get("horizon-color"),u_horizon:[(Ft.width/2-Rt*it)*Gt,(Ft.height/2+Rt*Jt)*Gt],u_horizon_normal:[-it,Jt],u_sky_horizon_blend:ct.properties.get("sky-horizon-blend")*Ft.height/2*Gt,u_sky_blend:qt}})(y,de.style.map.transform,de.pixelRatio),_e=new lo(ie.LEQUAL,lo.ReadWrite,[0,1]),De=mo.disabled,Ne=de.colorModeForRenderPass(),Ye=de.useProgram("sky"),lt=Al(O,y);Ye.draw(O,ie.TRIANGLES,_e,De,Ne,Di.disabled,ce,null,void 0,"sky",lt.vertexBuffer,lt.indexBuffer,lt.segments)},atmosphere:function(de,y,O){let ie=de.context,ce=ie.gl,_e=de.useProgram("atmosphere"),De=new lo(ce.LEQUAL,lo.ReadOnly,[0,1]),Ne=de.transform,Ye=function(qt,or){let vr=qt.properties.get("position"),Ar=[-vr.x,-vr.y,-vr.z],dr=e.ap(new Float64Array(16));return qt.properties.get("anchor")==="map"&&(e.be(dr,dr,or.rollInRadians),e.bf(dr,dr,-or.pitchInRadians),e.be(dr,dr,or.bearingInRadians),e.bf(dr,dr,or.center.lat*Math.PI/180),e.bI(dr,dr,-or.center.lng*Math.PI/180)),e.cg(Ar,Ar,dr),Ar}(O,de.transform),lt=Ne.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ct=y.properties.get("atmosphere-blend")*lt.projectionTransition;if(ct===0)return;let Ft=Ls(Ne.worldSize,Ne.center.lat),Gt=Ne.inverseProjectionMatrix,Jt=new Float64Array(4);Jt[3]=1,e.aE(Jt,Jt,Ne.modelViewProjectionMatrix),Jt[0]/=Jt[3],Jt[1]/=Jt[3],Jt[2]/=Jt[3],Jt[3]=1,e.aE(Jt,Jt,Gt),Jt[0]/=Jt[3],Jt[1]/=Jt[3],Jt[2]/=Jt[3],Jt[3]=1;let it=((qt,or,vr,Ar,dr)=>({u_sun_pos:qt,u_atmosphere_blend:or,u_globe_position:vr,u_globe_radius:Ar,u_inv_proj_matrix:dr}))(Ye,ct,[Jt[0],Jt[1],Jt[2]],Ft,Gt),Rt=Al(ie,y);_e.draw(ie,ce.TRIANGLES,De,mo.disabled,wo.alphaBlended,Di.disabled,it,null,null,"atmosphere",Rt.vertexBuffer,Rt.indexBuffer,Rt.segments)},custom:function(de,y,O,ie){let{isRenderingGlobe:ce}=ie,_e=de.context,De=O.implementation,Ne=de.style.projection,Ye=de.transform,lt=Ye.getProjectionDataForCustomLayer(ce),ct={farZ:Ye.farZ,nearZ:Ye.nearZ,fov:Ye.fov*Math.PI/180,modelViewProjectionMatrix:Ye.modelViewProjectionMatrix,projectionMatrix:Ye.projectionMatrix,shaderData:{variantName:Ne.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; +uniform mat4 u_projection_matrix; +${Ne.shaderPreludeCode.vertexSource}`,define:Ne.shaderDefine},defaultProjectionData:lt},Ft=De.renderingMode?De.renderingMode:"2d";if(de.renderPass==="offscreen"){let Gt=De.prerender;Gt&&(de.setCustomLayerDefaults(),_e.setColorMode(de.colorModeForRenderPass()),Gt.call(De,_e.gl,ct),_e.setDirty(),de.setBaseState())}else if(de.renderPass==="translucent"){de.setCustomLayerDefaults(),_e.setColorMode(de.colorModeForRenderPass()),_e.setStencilMode(mo.disabled);let Gt=Ft==="3d"?de.getDepthModeFor3D():de.getDepthModeForSublayer(0,lo.ReadOnly);_e.setDepthMode(Gt),De.render(_e.gl,ct),_e.setDirty(),de.setBaseState(),_e.bindFramebuffer.set(null)}},debug:function(de,y,O){for(let ie of O)Kl(de,y,ie)},debugPadding:function(de){let y=de.transform.padding;Ws(de,de.transform.height-(y.top||0),3,Rs),Ws(de,y.bottom||0,3,ps),Dl(de,y.left||0,3,vi),Dl(de,de.transform.width-(y.right||0),3,Xo);let O=de.transform.centerPoint;(function(ie,ce,_e,De){Nl(ie,ce-1,_e-10,2,20,De),Nl(ie,ce-10,_e-1,20,2,De)})(de,O.x,de.transform.height-O.y,Ss)},terrainDepth:function(de,y){let O=de.context,ie=O.gl,ce=de.transform,_e=wo.unblended,De=new lo(ie.LEQUAL,lo.ReadWrite,[0,1]),Ne=y.tileManager.getRenderableTiles(),Ye=de.useProgram("terrainDepth");O.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),O.viewport.set([0,0,de.width/devicePixelRatio,de.height/devicePixelRatio]),O.clear({color:e.bo.transparent,depth:1});for(let lt of Ne){let ct=y.getTerrainMesh(lt.tileID),Ft=y.getTerrainData(lt.tileID),Gt=ce.getProjectionData({overscaledTileID:lt.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Jt={u_ele_delta:y.getMeshFrameDelta(ce.zoom)};Ye.draw(O,ie.TRIANGLES,De,mo.disabled,_e,Di.backCCW,Jt,Ft,Gt,"terrain",ct.vertexBuffer,ct.indexBuffer,ct.segments)}O.bindFramebuffer.set(null),O.viewport.set([0,0,de.width,de.height])},terrainCoords:function(de,y){let O=de.context,ie=O.gl,ce=de.transform,_e=wo.unblended,De=new lo(ie.LEQUAL,lo.ReadWrite,[0,1]),Ne=y.getCoordsTexture(),Ye=y.tileManager.getRenderableTiles(),lt=de.useProgram("terrainCoords");O.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),O.viewport.set([0,0,de.width/devicePixelRatio,de.height/devicePixelRatio]),O.clear({color:e.bo.transparent,depth:1}),y.coordsIndex=[];for(let ct of Ye){let Ft=y.getTerrainMesh(ct.tileID),Gt=y.getTerrainData(ct.tileID);O.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,Ne.texture);let Jt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(ce.zoom)},it=ce.getProjectionData({overscaledTileID:ct.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});lt.draw(O,ie.TRIANGLES,De,mo.disabled,_e,Di.backCCW,Jt,Gt,it,"terrain",Ft.vertexBuffer,Ft.indexBuffer,Ft.segments),y.coordsIndex.push(ct.tileID.key)}O.bindFramebuffer.set(null),O.viewport.set([0,0,de.width,de.height])}};class bu{constructor(y,O){this.drawFunctions=zu,this.context=new rr(y),this.transform=O,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Sr.maxOverzooming+Sr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new ro}resize(y,O,ie){if(this.width=Math.floor(y*ie),this.height=Math.floor(O*ie),this.pixelRatio=ie,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let ce of this.style._order)this.style._layers[ce].resize()}setup(){let y=this.context,O=new e.aU;O.emplaceBack(0,0),O.emplaceBack(e.a6,0),O.emplaceBack(0,e.a6),O.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=y.createVertexBuffer(O,xo.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);let ie=new e.aU;ie.emplaceBack(0,0),ie.emplaceBack(e.a6,0),ie.emplaceBack(0,e.a6),ie.emplaceBack(e.a6,e.a6),this.debugBuffer=y.createVertexBuffer(ie,xo.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);let ce=new e.ch;ce.emplaceBack(0,0,0,0),ce.emplaceBack(e.a6,0,e.a6,0),ce.emplaceBack(0,e.a6,0,e.a6),ce.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=y.createVertexBuffer(ce,fc.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);let _e=new e.aU;_e.emplaceBack(0,0),_e.emplaceBack(e.a6,0),_e.emplaceBack(0,e.a6),_e.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=y.createVertexBuffer(_e,xo.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);let De=new e.aU;De.emplaceBack(0,0),De.emplaceBack(1,0),De.emplaceBack(0,1),De.emplaceBack(1,1),this.viewportBuffer=y.createVertexBuffer(De,xo.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);let Ne=new e.ci;Ne.emplaceBack(0),Ne.emplaceBack(1),Ne.emplaceBack(3),Ne.emplaceBack(2),Ne.emplaceBack(0),this.tileBorderIndexBuffer=y.createIndexBuffer(Ne);let Ye=new e.aW;Ye.emplaceBack(1,0,2),Ye.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=y.createIndexBuffer(Ye);let lt=this.context.gl;this.stencilClearMode=new mo({func:lt.ALWAYS,mask:0},0,255,lt.ZERO,lt.ZERO,lt.ZERO),this.tileExtentMesh=new fi(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let y=this.context,O=y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let ie=e.O();e.c7(ie,0,this.width,this.height,0,0,1),e.S(ie,ie,[O.drawingBufferWidth,O.drawingBufferHeight,0]);let ce={mainMatrix:ie,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:ie};this.useProgram("clippingMask",null,!0).draw(y,O.TRIANGLES,lo.disabled,this.stencilClearMode,wo.disabled,Di.disabled,null,null,ce,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(y,O,ie){if(this.currentStencilSource===y.source||!y.isTileClipped()||!O?.length)return;this.currentStencilSource=y.source,this.nextStencilID+O.length>256&&this.clearStencil();let ce=this.context;ce.setColorMode(wo.disabled),ce.setDepthMode(lo.disabled);let _e={};for(let De of O)_e[De.key]=this.nextStencilID++;this._renderTileMasks(_e,O,ie,!0),this._renderTileMasks(_e,O,ie,!1),this._tileClippingMaskIDs=_e}_renderTileMasks(y,O,ie,ce){var _e;let De=this.context,Ne=De.gl,Ye=this.style.projection,lt=this.transform,ct=this.useProgram("clippingMask");for(let Ft of O){let Gt=y[Ft.key],Jt=(_e=this.style.map.terrain)===null||_e===void 0?void 0:_e.getTerrainData(Ft),it=Ye.getMeshFromTileID(this.context,Ft.canonical,ce,!0,"stencil"),Rt=lt.getProjectionData({overscaledTileID:Ft,applyGlobeMatrix:!ie,applyTerrainMatrix:!0});ct.draw(De,Ne.TRIANGLES,lo.disabled,new mo({func:Ne.ALWAYS,mask:0},Gt,255,Ne.KEEP,Ne.KEEP,Ne.REPLACE),wo.disabled,ie?Di.disabled:Di.backCCW,null,Jt,Rt,"$clipping",it.vertexBuffer,it.indexBuffer,it.segments)}}_renderTilesDepthBuffer(){var y;let O=this.context,ie=O.gl,ce=this.style.projection,_e=this.transform,De=this.useProgram("depth"),Ne=this.getDepthModeFor3D(),Ye=Ze(_e,{tileSize:_e.tileSize});for(let lt of Ye){let ct=(y=this.style.map.terrain)===null||y===void 0?void 0:y.getTerrainData(lt),Ft=ce.getMeshFromTileID(this.context,lt.canonical,!0,!0,"raster"),Gt=_e.getProjectionData({overscaledTileID:lt,applyGlobeMatrix:!0,applyTerrainMatrix:!0});De.draw(O,ie.TRIANGLES,Ne,mo.disabled,wo.disabled,Di.backCCW,null,ct,Gt,"$clipping",Ft.vertexBuffer,Ft.indexBuffer,Ft.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let y=this.nextStencilID++,O=this.context.gl;return new mo({func:O.NOTEQUAL,mask:255},y,255,O.KEEP,O.KEEP,O.REPLACE)}stencilModeForClipping(y){let O=this.context.gl;return new mo({func:O.EQUAL,mask:255},this._tileClippingMaskIDs[y.key],0,O.KEEP,O.KEEP,O.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(y){let O=this.context.gl,ie=y.sort((De,Ne)=>Ne.overscaledZ-De.overscaledZ),ce=ie[ie.length-1].overscaledZ,_e=ie[0].overscaledZ-ce+1;if(_e>1){this.currentStencilSource=void 0,this.nextStencilID+_e>256&&this.clearStencil();let De={};for(let Ne=0;Ne<_e;Ne++)De[Ne+ce]=new mo({func:O.GEQUAL,mask:255},Ne+this.nextStencilID,255,O.KEEP,O.KEEP,O.REPLACE);return this.nextStencilID+=_e,[De,ie]}return[{[ce]:mo.disabled},ie]}stencilConfigForOverlapTwoPass(y){let O=this.context.gl,ie=y.sort((De,Ne)=>Ne.overscaledZ-De.overscaledZ),ce=ie[ie.length-1].overscaledZ,_e=ie[0].overscaledZ-ce+1;if(this.clearStencil(),_e>1){let De={},Ne={};for(let Ye=0;Ye<_e;Ye++)De[Ye+ce]=new mo({func:O.GREATER,mask:255},_e+1+Ye,255,O.KEEP,O.KEEP,O.REPLACE),Ne[Ye+ce]=new mo({func:O.GREATER,mask:255},1+Ye,255,O.KEEP,O.KEEP,O.REPLACE);return this.nextStencilID=2*_e+1,[De,Ne,ie]}return this.nextStencilID=3,[{[ce]:new mo({func:O.GREATER,mask:255},2,255,O.KEEP,O.KEEP,O.REPLACE)},{[ce]:new mo({func:O.GREATER,mask:255},1,255,O.KEEP,O.KEEP,O.REPLACE)},ie]}colorModeForRenderPass(){let y=this.context.gl;return this._showOverdrawInspector?new wo([y.CONSTANT_COLOR,y.ONE],new e.bo(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?wo.unblended:wo.alphaBlended}getDepthModeForSublayer(y,O,ie){if(!this.opaquePassEnabledForLayer())return lo.disabled;let ce=1-((1+this.currentLayer)*this.numSublayers+y)*this.depthEpsilon;return new lo(ie||this.context.gl.LEQUAL,O,[ce,ce])}getDepthModeFor3D(){return new lo(this.context.gl.LEQUAL,lo.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer0};for(let Jt in Ne){let it=Ne[Jt];it.used&&it.prepare(this.context),Ye[Jt]=it.getVisibleCoordinates(!1),lt[Jt]=Ye[Jt].slice().reverse(),ct[Jt]=it.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Jt=0;Jtthis.useProgram(Jt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:O.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=O.showOverdrawInspector,this.depthRangeFor3D=[0,1-(y._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=De.length-1;this.currentLayer>=0;this.currentLayer--){let Jt=this.style._layers[De[this.currentLayer]],it=Ne[Jt.source],Rt=Ye[Jt.source];this._renderTileClippingMasks(Jt,Rt,!1),this.renderLayer(this,it,Jt,Rt,Ft)}this.renderPass="translucent";let Gt=!1;for(this.currentLayer=0;this.currentLayermr.source&&!mr.isHidden(Rt)?[it.tileManagers[mr.source]]:[]),vr=or.filter(mr=>mr.getSource().type==="vector"),Ar=or.filter(mr=>mr.getSource().type!=="vector"),dr=mr=>{(!qt||qt.getSource().maxzoom0?O.pop():null}isPatternMissing(y){if(!y)return!1;if(!y.from||!y.to)return!0;let O=this.imageManager.getPattern(y.from.toString()),ie=this.imageManager.getPattern(y.to.toString());return!O||!ie}useProgram(y,O,ie=!1,ce=[]){var _e;this.cache||(this.cache={});let De=!!this.style.map.terrain,Ne=this.style.projection,Ye=ie?Gi.projectionMercator:Ne.shaderPreludeCode,lt=ie?zi:Ne.shaderDefine,ct=y+(O?O.cacheKey:"")+`/${ie?so:Ne.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(De?"/terrain":"")+(ce?`/${ce.join("/")}`:"");return(_e=this.cache)[ct]||(_e[ct]=new Lf(this.context,Gi[y],O,pf[y],this._showOverdrawInspector,De,Ye,lt,ce)),this.cache[ct]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let y=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(y.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var y,O;if(this._tileTextures){for(let ie in this._tileTextures){let ce=this._tileTextures[ie];if(ce)for(let _e of ce)_e.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((y=this.tileExtentMesh.vertexBuffer)===null||y===void 0||y.destroy()),this.tileExtentMesh&&((O=this.tileExtentMesh.indexBuffer)===null||O===void 0||O.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let ie in this.cache){let ce=this.cache[ie];ce?.program&&this.context.gl.deleteProgram(ce.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:y,drawingBufferHeight:O}=this.context.gl;return this.width!==y||this.height!==O}}function ic(de,y){let O,ie=!1,ce=null,_e=()=>{ce=null,ie&&(de(...O),ce=setTimeout(_e,y),ie=!1)};return(...De)=>(ie=!0,O=De,ce||_e(),ce)}bu.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Oc{constructor(y){this._getCurrentHash=()=>{let O=window.location.hash.replace("#","");if(this._hashName){let ie,ce=O.split("&").map(_e=>_e.split("="));for(let _e of ce)_e[0]===this._hashName&&(ie=_e);return(ie&&ie[1]||"").split("/")}return O.split("/")},this._onHashChange=()=>{let O=this._getCurrentHash();if(!this._isValidHash(O))return!1;let ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(O[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+O[2],+O[1]],zoom:+O[0],bearing:ie,pitch:+(O[4]||0)}),!0},this._updateHashUnthrottled=()=>{let O=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,O)},this._removeHash=()=>{let O=this._getCurrentHash();if(O.length===0)return;let ie=O.join("/"),ce=ie;ce.split("&").length>0&&(ce=ce.split("&")[0]),this._hashName&&(ce=`${this._hashName}=${ie}`);let _e=window.location.hash.replace(ce,"");_e.startsWith("#&")?_e=_e.slice(0,1)+_e.slice(2):_e==="#"&&(_e="");let De=window.location.href.replace(/(#.+)?$/,_e);De=De.replace("&&","&"),window.history.replaceState(window.history.state,null,De)},this._updateHash=ic(this._updateHashUnthrottled,300),this._hashName=y&&encodeURIComponent(y)}addTo(y){return this._map=y,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(y){let O=this._map.getCenter(),ie=Math.round(100*this._map.getZoom())/100,ce=Math.ceil((ie*Math.LN2+Math.log(512/360/.5))/Math.LN10),_e=Math.pow(10,ce),De=Math.round(O.lng*_e)/_e,Ne=Math.round(O.lat*_e)/_e,Ye=this._map.getBearing(),lt=this._map.getPitch(),ct="";if(ct+=y?`/${De}/${Ne}/${ie}`:`${ie}/${Ne}/${De}`,(Ye||lt)&&(ct+="/"+Math.round(10*Ye)/10),lt&&(ct+=`/${Math.round(lt)}`),this._hashName){let Ft=this._hashName,Gt=!1,Jt=window.location.hash.slice(1).split("&").map(it=>{let Rt=it.split("=")[0];return Rt===Ft?(Gt=!0,`${Rt}=${ct}`):it}).filter(it=>it);return Gt||Jt.push(`${Ft}=${ct}`),`#${Jt.join("&")}`}return`#${ct}`}_isValidHash(y){if(y.length<3||y.some(isNaN))return!1;try{new e.W(+y[2],+y[1])}catch{return!1}let O=+y[0],ie=+(y[3]||0),ce=+(y[4]||0);return O>=this._map.getMinZoom()&&O<=this._map.getMaxZoom()&&ie>=-180&&ie<=180&&ce>=this._map.getMinPitch()&&ce<=this._map.getMaxPitch()}}let Zu={linearity:.3,easing:e.cv(0,0,.3,1)},hu=e.e({deceleration:2500,maxSpeed:1400},Zu),Jl=e.e({deceleration:20,maxSpeed:1400},Zu),Ql=e.e({deceleration:1e3,maxSpeed:360},Zu),xu=e.e({deceleration:1e3,maxSpeed:90},Zu),rf=e.e({deceleration:1e3,maxSpeed:360},Zu);class Ff{constructor(y){this._map=y,this.clear()}clear(){this._inertiaBuffer=[]}record(y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:m(),settings:y})}_drainInertiaBuffer(){let y=this._inertiaBuffer,O=m();for(;y.length>0&&O-y[0].time>160;)y.shift()}_onMoveEnd(y){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let O={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:_e}of this._inertiaBuffer)O.zoom+=_e.zoomDelta||0,O.bearing+=_e.bearingDelta||0,O.pitch+=_e.pitchDelta||0,O.roll+=_e.rollDelta||0,_e.panDelta&&O.pan._add(_e.panDelta),_e.around&&(O.around=_e.around),_e.pinchAround&&(O.pinchAround=_e.pinchAround);let ie=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,ce={};if(O.pan.mag()){let _e=rl(O.pan.mag(),ie,e.e({},hu,y||{})),De=O.pan.mult(_e.amount/O.pan.mag()),Ne=this._map.cameraHelper.handlePanInertia(De,this._map.transform);ce.center=Ne.easingCenter,ce.offset=Ne.easingOffset,xc(ce,_e)}if(O.zoom){let _e=rl(O.zoom,ie,Jl);ce.zoom=e.cw(this._map.transform.zoom+_e.amount,this._map.getZoomSnap(),_e.amount),xc(ce,_e)}if(O.bearing){let _e=rl(O.bearing,ie,Ql);ce.bearing=this._map.transform.bearing+e.al(_e.amount,-179,179),xc(ce,_e)}if(O.pitch){let _e=rl(O.pitch,ie,xu);ce.pitch=this._map.transform.pitch+_e.amount,xc(ce,_e)}if(O.roll){let _e=rl(O.roll,ie,rf);ce.roll=this._map.transform.roll+e.al(_e.amount,-179,179),xc(ce,_e)}if(ce.zoom||ce.bearing){let _e=O.pinchAround===void 0?O.around:O.pinchAround;ce.around=_e?this._map.unproject(_e):this._map.getCenter()}return this.clear(),e.e(ce,{noMoveStart:!0})}}function xc(de,y){(!de.duration||de.durationO.unproject(Ye)),Ne=_e.reduce((Ye,lt,ct,Ft)=>Ye.add(lt.div(Ft.length)),new e.P(0,0));super(y,{points:_e,point:Ne,lngLats:De,lngLat:O.unproject(Ne),originalEvent:ie}),this._defaultPrevented=!1}}class nf extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(y,O,ie){super(y,{originalEvent:ie}),this._defaultPrevented=!1}}class jc{constructor(y,O){this._map=y,this._clickTolerance=O.clickTolerance}reset(){delete this._mousedownPos}wheel(y){return this._firePreventable(new nf(y.type,this._map,y))}mousedown(y,O){return this._mousedownPos=O,this._firePreventable(new Ol(y.type,this._map,y))}mouseup(y){this._map.fire(new Ol(y.type,this._map,y))}click(y,O){this._mousedownPos&&this._mousedownPos.dist(O)>=this._clickTolerance||this._map.fire(new Ol(y.type,this._map,y))}dblclick(y){return this._firePreventable(new Ol(y.type,this._map,y))}mouseover(y){this._map.fire(new Ol(y.type,this._map,y))}mouseout(y){this._map.fire(new Ol(y.type,this._map,y))}touchstart(y){return this._firePreventable(new Bu(y.type,this._map,y))}touchmove(y){this._map.fire(new Bu(y.type,this._map,y))}touchend(y){this._map.fire(new Bu(y.type,this._map,y))}touchcancel(y){this._map.fire(new Bu(y.type,this._map,y))}_firePreventable(y){if(this._map.fire(y),y.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class wu{constructor(y){this._map=y}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(y){this._map.fire(new Ol(y.type,this._map,y))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Ol("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(y){this._delayContextMenu?this._contextMenuEvent=y:this._ignoreContextMenu||this._map.fire(new Ol(y.type,this._map,y)),this._map.listens("contextmenu")&&y.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class jl{constructor(y){this._map=y}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(y){return this.transform.screenPointToLocation(e.P.convert(y),this._map.terrain)}}class Ul{constructor(y,O){this._map=y,this._tr=new jl(y),this._el=y.getCanvasContainer(),this._container=y.getContainer(),this._clickTolerance=O.clickTolerance||1,O.boxZoom&&typeof O.boxZoom=="object"&&(this._boxZoomEnd=O.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(y,O){this.isEnabled()&&y.shiftKey&&y.button===0&&(g.disableDrag(),this._startPos=this._lastPos=O,this._active=!0)}mousemoveWindow(y,O){if(!this._active)return;let ie=O;if(this._lastPos.equals(ie)||!this._box&&ie.dist(this._startPos)_e.fitScreenCoordinates(ie,ce,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",y)}keydown(y){this._active&&y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",y))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),g.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(y,O){return this._map.fire(new e.n(y,{originalEvent:O}))}}function Ci(de,y){if(de.length!==y.length)throw new Error(`The number of touches and points are not equal - touches ${de.length}, points ${y.length}`);let O={};for(let ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=y.timeStamp),ie.length===this.numTouches&&(this.centroid=function(ce){let _e=new e.P(0,0);for(let De of ce)_e._add(De);return _e.div(ce.length)}(O),this.touches=Ci(ie,O)))}touchmove(y,O,ie){if(this.aborted||!this.centroid)return;let ce=Ci(ie,O);for(let _e in this.touches){let De=ce[_e];(!De||De.dist(this.touches[_e])>30)&&(this.aborted=!0)}}touchend(y,O,ie){if((!this.centroid||y.timeStamp-this.startTime>500)&&(this.aborted=!0),ie.length===0){let ce=!this.aborted&&this.centroid;if(this.reset(),ce)return ce}}}class Xe{constructor(y){this.singleTap=new eu(y),this.numTaps=y.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(y,O,ie){this.singleTap.touchstart(y,O,ie)}touchmove(y,O,ie){this.singleTap.touchmove(y,O,ie)}touchend(y,O,ie){let ce=this.singleTap.touchend(y,O,ie);if(ce){let _e=y.timeStamp-this.lastTime<500,De=!this.lastTap||this.lastTap.dist(ce)<30;if(_e&&De||this.reset(),this.count++,this.lastTime=y.timeStamp,this.lastTap=ce,this.count===this.numTaps)return this.reset(),ce}}}class rt{constructor(y){this._tr=new jl(y),this._zoomIn=new Xe({numTouches:1,numTaps:2}),this._zoomOut=new Xe({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(y,O,ie){this._zoomIn.touchstart(y,O,ie),this._zoomOut.touchstart(y,O,ie)}touchmove(y,O,ie){this._zoomIn.touchmove(y,O,ie),this._zoomOut.touchmove(y,O,ie)}touchend(y,O,ie){let ce=this._zoomIn.touchend(y,O,ie),_e=this._zoomOut.touchend(y,O,ie),De=this._tr;return ce?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ne=>Ne.easeTo({duration:300,zoom:e.cw(De.zoom+1,Ne.getZoomSnap()),around:De.unproject(ce)},{originalEvent:y})}):_e?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:Ne=>Ne.easeTo({duration:300,zoom:e.cw(De.zoom-1,Ne.getZoomSnap()),around:De.unproject(_e)},{originalEvent:y})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class pt{constructor(y){this._enabled=!!y.enable,this._moveStateManager=y.moveStateManager,this._clickTolerance=y.clickTolerance||1,this._moveFunction=y.move,this._activateOnStart=!!y.activateOnStart,y.assignEvents(this),this.reset()}reset(y){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(y)}_move(...y){let O=this._moveFunction(...y);if(O.bearingDelta||O.pitchDelta||O.rollDelta||O.around||O.panDelta)return this._active=!0,O}dragStart(y,O){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(y)&&(this._moveStateManager.startMove(y),this._lastPoint=Array.isArray(O)?O[0]:O,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(y,O){if(!this.isEnabled())return;let ie=this._lastPoint;if(!ie)return;if(y.preventDefault(),!this._moveStateManager.isValidMoveEvent(y))return void this.reset(y);let ce=Array.isArray(O)?O[0]:O;return!this._moved&&ce.dist(ie)!0}),O=new Dr){this.mouseMoveStateManager=y,this.oneFingerTouchMoveStateManager=O}_executeRelevantHandler(y,O,ie){return y instanceof MouseEvent?O(y):typeof TouchEvent<"u"&&y instanceof TouchEvent?ie(y):void 0}startMove(y){this._executeRelevantHandler(y,O=>{this.mouseMoveStateManager.startMove(O)},O=>{this.oneFingerTouchMoveStateManager.startMove(O)})}endMove(y){this._executeRelevantHandler(y,O=>{this.mouseMoveStateManager.endMove(O)},O=>{this.oneFingerTouchMoveStateManager.endMove(O)})}isValidStartEvent(y){return this._executeRelevantHandler(y,O=>this.mouseMoveStateManager.isValidStartEvent(O),O=>this.oneFingerTouchMoveStateManager.isValidStartEvent(O))}isValidMoveEvent(y){return this._executeRelevantHandler(y,O=>this.mouseMoveStateManager.isValidMoveEvent(O),O=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(O))}isValidEndEvent(y){return this._executeRelevantHandler(y,O=>this.mouseMoveStateManager.isValidEndEvent(O),O=>this.oneFingerTouchMoveStateManager.isValidEndEvent(O))}}let kr=de=>{de.mousedown=de.dragStart,de.mousemoveWindow=de.dragMove,de.mouseup=de.dragEnd,de.contextmenu=y=>{y.preventDefault()}};class Wr{constructor(y,O){this._clickTolerance=y.clickTolerance||1,this._map=O,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(y){return y<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(y,O,ie){return this._calculateTransform(y,O,ie)}touchmove(y,O,ie){if(this._active){if(!this._shouldBePrevented(ie.length))return y.preventDefault(),this._calculateTransform(y,O,ie);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",y)}}touchend(y,O,ie){this._calculateTransform(y,O,ie),this._active&&this._shouldBePrevented(ie.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(y,O,ie){ie.length>0&&(this._active=!0);let ce=Ci(ie,O),_e=new e.P(0,0),De=new e.P(0,0),Ne=0;for(let lt in ce){let ct=ce[lt],Ft=this._touches[lt];Ft&&(_e._add(ct),De._add(ct.sub(Ft)),Ne++,ce[lt]=ct)}if(this._touches=ce,this._shouldBePrevented(Ne)||!De.mag())return;let Ye=De.div(Ne);return this._sum._add(Ye),this._sum.mag()Math.abs(de.x)}class Yi extends sn{constructor(y){super(),this._currentTouchCount=0,this._map=y}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(y,O,ie){super.touchstart(y,O,ie),this._currentTouchCount=ie.length}_start(y){this._lastPoints=y,wi(y[0].sub(y[1]))&&(this._valid=!1)}_move(y,O,ie){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let ce=y[0].sub(this._lastPoints[0]),_e=y[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(ce,_e,ie.timeStamp),this._valid?(this._lastPoints=y,this._active=!0,{pitchDelta:(ce.y+_e.y)/2*-.5}):void 0}gestureBeginsVertically(y,O,ie){if(this._valid!==void 0)return this._valid;let ce=y.mag()>=2,_e=O.mag()>=2;if(!ce&&!_e)return;if(!ce||!_e)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;let De=y.y>0==O.y>0;return wi(y)&&wi(O)&&De}}let Ti={panStep:100,bearingStep:15,pitchStep:10};class _o{constructor(y){this._tr=new jl(y);let O=Ti;this._panStep=O.panStep,this._bearingStep=O.bearingStep,this._pitchStep=O.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(y){if(y.altKey||y.ctrlKey||y.metaKey)return;let O=0,ie=0,ce=0,_e=0,De=0;switch(y.keyCode){case 61:case 107:case 171:case 187:O=1;break;case 189:case 109:case 173:O=-1;break;case 37:y.shiftKey?ie=-1:(y.preventDefault(),_e=-1);break;case 39:y.shiftKey?ie=1:(y.preventDefault(),_e=1);break;case 38:y.shiftKey?ce=1:(y.preventDefault(),De=-1);break;case 40:y.shiftKey?ce=-1:(y.preventDefault(),De=1);break;default:return}return this._rotationDisabled&&(ie=0,ce=0),{cameraAnimation:Ne=>{let Ye=this._tr;Ne.easeTo({duration:300,easeId:"keyboardHandler",easing:bo,zoom:O?e.cw(Ye.zoom+O*(y.shiftKey?2:1),Ne.getZoomSnap()):Ye.zoom,bearing:Ye.bearing+ie*this._bearingStep,pitch:Ye.pitch+ce*this._pitchStep,offset:[-_e*this._panStep,-De*this._panStep],center:Ye.center},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function bo(de){return de*(2-de)}let Zo=4.000244140625,fs=1/450;class Po{constructor(y,O){this._onTimeout=ie=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ie)},this._map=y,this._tr=new jl(y),this._triggerRenderFrame=O,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=fs}setZoomRate(y){this._defaultZoomRate=y}setWheelZoomRate(y){this._wheelZoomRate=y}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!y&&y.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(y){return!!this._map.cooperativeGestures.isEnabled()&&!(y.ctrlKey||this._map.cooperativeGestures.isBypassed(y))}wheel(y){if(!this.isEnabled())return;if(this._shouldBePrevented(y))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",y);let O=y.deltaMode===WheelEvent.DOM_DELTA_LINE?40*y.deltaY:y.deltaY,ie=m(),ce=ie-(this._lastWheelEventTime||0);this._lastWheelEventTime=ie,O!==0&&O%Zo==0?this._type="wheel":O!==0&&Math.abs(O)<4?this._type="trackpad":ce>400?(this._type=null,this._lastValue=O,this._timeout=setTimeout(this._onTimeout,40,y)):this._type||(this._type=Math.abs(ce*O)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,O+=this._lastValue)),y.shiftKey&&O&&(O/=4),this._type&&(this._lastWheelEvent=y,this._delta-=O,this._active||this._start(y)),y.preventDefault()}_start(y){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let O=g.mousePos(this._map.getCanvas(),y),ie=this._tr;this._aroundPoint=this._aroundCenter?ie.transform.locationToScreenPoint(e.W.convert(ie.center)):O,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let y=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let Ne=y.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=Ne),typeof this._targetZoom=="number"&&(this._targetZoom+=Ne)}if(this._delta!==0){let Ne=this._type==="wheel"&&Math.abs(this._delta)>Zo?this._wheelZoomRate:this._defaultZoomRate,Ye=2/(1+Math.exp(-Math.abs(this._delta*Ne)));this._delta<0&&Ye!==0&&(Ye=1/Ye);let lt=typeof this._targetZoom!="number"?y.scale:e.ao(this._targetZoom),ct=y.applyConstrain(y.getCameraLngLat(),e.ar(lt*Ye)).zoom,Ft=this._map.getZoomSnap();if(this._type==="wheel"&&Ft>0){let Gt=e.cw(y.zoom,Ft);this._targetZoom=e.cw(ct,Ft,ct-Gt)}else this._targetZoom=ct;this._type==="wheel"&&(this._startZoom=y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let O=typeof this._targetZoom!="number"?y.zoom:this._targetZoom,ie=this._startZoom,ce=this._easing,_e,De=!1;if(this._type==="wheel"&&ie&&ce){let Ne=m()-this._lastWheelEventTime,Ye=Math.min((Ne+5)/200,1),lt=ce(Ye);_e=e.H.number(ie,O,lt),Ye<1?this._needsRerender=!0:De=!0}else _e=O,De=!0;return this._active=!0,De&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=_e,{noInertia:!0,needsRenderFrame:!De,zoomDelta:_e-y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(y){let O=e.cy;if(this._prevEase){let ie=this._prevEase,ce=(m()-ie.start)/ie.duration,_e=ie.easing(ce+.01)-ie.easing(ce),De=.27/Math.sqrt(_e*_e+1e-4)*.01,Ne=Math.sqrt(.0729-De*De);O=e.cv(De,Ne,.25,1)}return this._prevEase={start:m(),duration:y,easing:O},O}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Es{constructor(y,O){this._clickZoom=y,this._tapZoom=O}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class cl{constructor(y){this._tr=new jl(y),this.reset()}reset(){this._active=!1}dblclick(y,O){return y.preventDefault(),{cameraAnimation:ie=>{ie.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(y.shiftKey?-1:1),ie.getZoomSnap()),around:this._tr.unproject(O)},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ql{constructor(){this._tap=new Xe({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(y){this._zoomRate=y??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(y,O,ie){if(!this._swipePoint)if(this._tapTime){let ce=O[0],_e=y.timeStamp-this._tapTime<500,De=this._tapPoint.dist(ce)<30;_e&&De?ie.length>0&&(this._swipePoint=ce,this._swipeTouch=ie[0].identifier):this.reset()}else this._tap.touchstart(y,O,ie)}touchmove(y,O,ie){if(this._tapTime){if(this._swipePoint){if(ie[0].identifier!==this._swipeTouch)return;let ce=O[0],_e=ce.y-this._swipePoint.y;return this._swipePoint=ce,y.preventDefault(),this._active=!0,{zoomDelta:_e/128*this._zoomRate}}}else this._tap.touchmove(y,O,ie)}touchend(y,O,ie){if(this._tapTime)this._swipePoint&&ie.length===0&&this.reset();else{let ce=this._tap.touchend(y,O,ie);ce&&(this._tapTime=y.timeStamp,this._tapPoint=ce)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Js{constructor(y,O,ie){this._el=y,this._mousePan=O,this._touchPan=ie}enable(y){this._inertiaOptions=y||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Tu{constructor(y,O,ie,ce){this._pitchWithRotate=y.pitchWithRotate,this._rollEnabled=y.rollEnabled,this._mouseRotate=O,this._mousePitch=ie,this._mouseRoll=ce}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class Li{constructor(y,O,ie,ce){this._el=y,this._touchZoom=O,this._touchRotate=ie,this._tapDragZoom=ce,this._rotationDisabled=!1,this._enabled=!0}enable(y){this._touchZoom.enable(y),this._rotationDisabled||this._touchRotate.enable(y),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(y){this._touchZoom.setZoomRate(y),this._tapDragZoom.setZoomRate(y)}setZoomThreshold(y){this._touchZoom.setZoomThreshold(y)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Vi{constructor(y,O){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=y,this._options=O,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let y=this._map.getCanvasContainer();y.classList.add("maplibregl-cooperative-gestures"),this._container=g.create("div","maplibregl-cooperative-gesture-screen",y);let O=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(O=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let ie=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),ce=document.createElement("div");ce.className="maplibregl-desktop-message",ce.textContent=O,this._container.appendChild(ce);let _e=document.createElement("div");_e.className="maplibregl-mobile-message",_e.textContent=ie,this._container.appendChild(_e),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(y){return y[this._bypassKey]}notifyGestureBlocked(y,O){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:y,originalEvent:O})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let fl=de=>de.zoom||de.drag||de.roll||de.pitch||de.rotate;class Ku extends e.n{}function tu(de){var y;return((y=de.panDelta)===null||y===void 0?void 0:y.mag())||de.zoomDelta||de.bearingDelta||de.pitchDelta||de.rollDelta}class Bs{get _ownerDocument(){var y;return((y=this._el)===null||y===void 0?void 0:y.ownerDocument)||document}get _ownerWindow(){var y,O;return((O=(y=this._el)===null||y===void 0?void 0:y.ownerDocument)===null||O===void 0?void 0:O.defaultView)||window}constructor(y,O){this.handleWindowEvent=ce=>{this.handleEvent(ce,`${ce.type}Window`)},this.handleEvent=(ce,_e)=>{if(ce.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let De=ce.type==="renderFrame"?void 0:ce,Ne={needsRenderFrame:!1},Ye={},lt={};for(let{handlerName:Gt,handler:Jt,allowed:it}of this._handlers){if(!Jt.isEnabled())continue;let Rt;if(this._blockedByActive(lt,it,Gt))Jt.reset();else if(Jt[_e||ce.type]){if(e.cz(ce,_e||ce.type)){let qt=g.mousePos(this._map.getCanvas(),ce);Rt=Jt[_e||ce.type](ce,qt)}else if(e.cA(ce,_e||ce.type)){let qt=this._getMapTouches(ce.touches),or=g.touchPos(this._map.getCanvas(),qt);Rt=Jt[_e||ce.type](ce,or,qt)}else e.cB(_e||ce.type)||(Rt=Jt[_e||ce.type](ce));this.mergeHandlerResult(Ne,Ye,Rt,Gt,De),Rt?.needsRenderFrame&&this._triggerRenderFrame()}(Rt||Jt.isActive())&&(lt[Gt]=Jt)}let ct={};for(let Gt in this._previousActiveHandlers)lt[Gt]||(ct[Gt]=De);this._previousActiveHandlers=lt,(Object.keys(ct).length||tu(Ne))&&(this._changes.push([Ne,Ye,ct]),this._triggerRenderFrame()),(Object.keys(lt).length||tu(Ne))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Ft}=Ne;Ft&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ft(this._map))},this._map=y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Ff(y),this._bearingSnap=O.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(O);let ie=this._el;this._listeners=[[ie,"touchstart",{passive:!0}],[ie,"touchmove",{passive:!1}],[ie,"touchend",void 0],[ie,"touchcancel",void 0],[ie,"mousedown",void 0],[ie,"mousemove",void 0],[ie,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[ie,"mouseover",void 0],[ie,"mouseout",void 0],[ie,"dblclick",void 0],[ie,"click",void 0],[ie,"keydown",{capture:!1}],[ie,"keyup",void 0],[ie,"wheel",{passive:!1}],[ie,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[ce,_e,De]of this._listeners)ce.addEventListener(_e,ce===this._ownerDocument?this.handleWindowEvent:this.handleEvent,De)}destroy(){for(let[y,O,ie]of this._listeners)y.removeEventListener(O,y===this._ownerDocument?this.handleWindowEvent:this.handleEvent,ie)}_addDefaultHandlers(y){let O=this._map,ie=O.getCanvasContainer();this._add("mapEvent",new jc(O,y));let ce=O.boxZoom=new Ul(O,y);this._add("boxZoom",ce),y.interactive&&y.boxZoom&&ce.enable();let _e=O.cooperativeGestures=new Vi(O,y.cooperativeGestures);this._add("cooperativeGestures",_e),y.cooperativeGestures&&_e.enable();let De=new rt(O),Ne=new cl(O);O.doubleClickZoom=new Es(Ne,De),this._add("tapZoom",De),this._add("clickZoom",Ne),y.interactive&&y.doubleClickZoom&&O.doubleClickZoom.enable();let Ye=new ql;this._add("tapDragZoom",Ye);let lt=O.touchPitch=new Yi(O);this._add("touchPitch",lt),y.interactive&&y.touchPitch&&O.touchPitch.enable(y.touchPitch);let ct=()=>O.project(O.getCenter()),Ft=function({enable:dr,clickTolerance:mr,aroundCenter:qr=!0,minPixelCenterThreshold:Lr=100,rotateDegreesPerPixelMoved:cn=.8},Nn){let Dn=new Yt({checkCorrectEvent:qn=>qn.button===0&&qn.ctrlKey||qn.button===2&&!qn.ctrlKey});return new pt({clickTolerance:mr,move:(qn,_n)=>{let vn=Nn();if(qr&&Math.abs(vn.y-qn.y)>Lr)return{bearingDelta:e.cx(new e.P(qn.x,_n.y),_n,vn)};let Sn=(_n.x-qn.x)*cn;return qr&&_n.ycn.button===0&&cn.ctrlKey||cn.button===2});return new pt({clickTolerance:mr,move:(cn,Nn)=>({pitchDelta:(Nn.y-cn.y)*qr}),moveStateManager:Lr,enable:dr,assignEvents:kr})}(y),Jt=function({enable:dr,clickTolerance:mr,rollDegreesPerPixelMoved:qr=.3},Lr){let cn=new Yt({checkCorrectEvent:Nn=>Nn.button===2&&Nn.ctrlKey});return new pt({clickTolerance:mr,move:(Nn,Dn)=>{let qn=Lr(),_n=(Dn.x-Nn.x)*qr;return Dn.yLr.button===0&&!Lr.ctrlKey});return new pt({clickTolerance:mr,move:(Lr,cn)=>({around:cn,panDelta:cn.sub(Lr)}),activateOnStart:!0,moveStateManager:qr,enable:dr,assignEvents:kr})}(y),Rt=new Wr(y,O);O.dragPan=new Js(ie,it,Rt),this._add("mousePan",it),this._add("touchPan",Rt,["touchZoom","touchRotate"]),y.interactive&&y.dragPan&&O.dragPan.enable(y.dragPan);let qt=new Na,or=new Zn;O.touchZoomRotate=new Li(ie,or,qt,Ye),this._add("touchRotate",qt,["touchPan","touchZoom"]),this._add("touchZoom",or,["touchPan","touchRotate"]),y.interactive&&y.touchZoomRotate&&O.touchZoomRotate.enable(y.touchZoomRotate),this._add("blockableMapEvent",new wu(O));let vr=O.scrollZoom=new Po(O,()=>this._triggerRenderFrame());this._add("scrollZoom",vr,["mousePan"]),y.interactive&&y.scrollZoom&&O.scrollZoom.enable(y.scrollZoom);let Ar=O.keyboard=new _o(O);this._add("keyboard",Ar),y.interactive&&y.keyboard&&O.keyboard.enable()}_add(y,O,ie){this._handlers.push({handlerName:y,handler:O,allowed:ie}),this._handlersById[y]=O}stop(y){if(!this._updatingCamera){for(let{handler:O}of this._handlers)O.reset();this._inertia.clear(),this._fireEvents({},{},y),this._changes=[]}}isActive(){for(let{handler:y}of this._handlers)if(y.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!fl(this._eventsInProgress)||this.isZooming()}_blockedByActive(y,O,ie){for(let ce in y)if(ce!==ie&&!O?.includes(ce))return!0;return!1}_getMapTouches(y){let O=[];for(let ie of y)this._el.contains(ie.target)&&O.push(ie);return O}mergeHandlerResult(y,O,ie,ce,_e){if(!ie)return;e.e(y,ie);let De={handlerName:ce,originalEvent:ie.originalEvent||_e};ie.zoomDelta!==void 0&&(O.zoom=De),ie.panDelta!==void 0&&(O.drag=De),ie.rollDelta!==void 0&&(O.roll=De),ie.pitchDelta!==void 0&&(O.pitch=De),ie.bearingDelta!==void 0&&(O.rotate=De)}_applyChanges(){let y={},O={},ie={};for(let[ce,_e,De]of this._changes)ce.panDelta&&(y.panDelta=(y.panDelta||new e.P(0,0))._add(ce.panDelta)),ce.zoomDelta&&(y.zoomDelta=(y.zoomDelta||0)+ce.zoomDelta),ce.bearingDelta&&(y.bearingDelta=(y.bearingDelta||0)+ce.bearingDelta),ce.pitchDelta&&(y.pitchDelta=(y.pitchDelta||0)+ce.pitchDelta),ce.rollDelta&&(y.rollDelta=(y.rollDelta||0)+ce.rollDelta),ce.around!==void 0&&(y.around=ce.around),ce.pinchAround!==void 0&&(y.pinchAround=ce.pinchAround),ce.noInertia&&(y.noInertia=ce.noInertia),e.e(O,_e),e.e(ie,De);this._updateMapTransform(y,O,ie),this._changes=[]}_updateMapTransform(y,O,ie){let ce=this._map,_e=ce._getTransformForUpdate(),De=ce.terrain;if(!(tu(y)||De&&this._terrainMovement))return void this._fireEvents(O,ie,!0);ce._stop(!0);let{panDelta:Ne,zoomDelta:Ye,bearingDelta:lt,pitchDelta:ct,rollDelta:Ft,around:Gt,pinchAround:Jt}=y;Jt!==void 0&&(Gt=Jt),Gt||(Gt=ce.transform.centerPoint),De&&!_e.isPointOnMapSurface(Gt)&&(Gt=_e.centerPoint);let it={panDelta:Ne,zoomDelta:Ye,rollDelta:Ft,pitchDelta:ct,bearingDelta:lt,around:Gt};this._map.cameraHelper.useGlobeControls&&!_e.isPointOnMapSurface(Gt)&&(Gt=_e.centerPoint);let Rt=Gt.distSqr(_e.centerPoint)<.01?_e.center:_e.screenPointToLocation(Ne?Gt.sub(Ne):Gt);this._handleMapControls({terrain:De,tr:_e,deltasForHelper:it,preZoomAroundLoc:Rt,combinedEventsInProgress:O,panDelta:Ne}),ce._applyUpdatedTransform(_e),this._map._update(),y.noInertia||this._inertia.record(y),this._fireEvents(O,ie,!0)}_handleMapControls({terrain:y,tr:O,deltasForHelper:ie,preZoomAroundLoc:ce,combinedEventsInProgress:_e,panDelta:De}){let Ne=this._map.cameraHelper;if(Ne.handleMapControlsRollPitchBearingZoom(ie,O),y)return Ne.useGlobeControls?(this._terrainMovement||!_e.drag&&!_e.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void Ne.handleMapControlsPan(ie,O,ce)):this._terrainMovement||!_e.drag&&!_e.zoom?void(_e.drag&&this._terrainMovement&&De?O.setCenter(O.screenPointToLocation(O.centerPoint.sub(De))):Ne.handleMapControlsPan(ie,O,ce)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void Ne.handleMapControlsPan(ie,O,ce));Ne.handleMapControlsPan(ie,O,ce)}_fireEvents(y,O,ie){let ce=fl(this._eventsInProgress),_e=fl(y),De={};for(let Ft in y){let{originalEvent:Gt}=y[Ft];this._eventsInProgress[Ft]||(De[`${Ft}start`]=Gt),this._eventsInProgress[Ft]=y[Ft]}!ce&&_e&&this._fireEvent("movestart",_e.originalEvent);for(let Ft in De)this._fireEvent(Ft,De[Ft]);_e&&this._fireEvent("move",_e.originalEvent);for(let Ft in y){let{originalEvent:Gt}=y[Ft];this._fireEvent(Ft,Gt)}let Ne={},Ye;for(let Ft in this._eventsInProgress){let{handlerName:Gt,originalEvent:Jt}=this._eventsInProgress[Ft];this._handlersById[Gt].isActive()||(delete this._eventsInProgress[Ft],Ye=O[Gt]||Jt,Ne[`${Ft}end`]=Ye)}for(let Ft in Ne)this._fireEvent(Ft,Ne[Ft]);let lt=fl(this._eventsInProgress),ct=(ce||_e)&&!lt;if(ct&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ft=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Ft.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Ft)}if(ie&&ct){this._updatingCamera=!0;let Ft=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Gt=Jt=>Jt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Ku("renderFrame",{timeStamp:y})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class oc extends e.E{constructor(y,O,ie){super(),this._renderFrameCallback=()=>{let ce=Math.min((m()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(ce)),ce<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=y,this._bearingSnap=ie.bearingSnap,this._zoomSnap=ie.zoomSnap,this.cameraHelper=O,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(y,O){y.apply(this.transform,!0),this.transform=y,this.cameraHelper=O}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(y,O){return this.jumpTo({center:y},O)}getCenterElevation(){return this.transform.elevation}setCenterElevation(y,O){return this.jumpTo({elevation:y},O),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(y){this._centerClampedToGround=y}panBy(y,O,ie){return y=e.P.convert(y).mult(-1),this.panTo(this.transform.center,e.e({offset:y},O),ie)}panTo(y,O,ie){return this.easeTo(e.e({center:y},O),ie)}getZoom(){return this.transform.zoom}setZoom(y,O){return this.jumpTo({zoom:y},O),this}zoomTo(y,O,ie){return this.easeTo(e.e({zoom:y},O),ie)}zoomIn(y,O){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),y,O),this}zoomOut(y,O){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),y,O),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(y,O){return y!=this.transform.fov&&(this.transform.setFov(y),this.fire(new e.n("movestart",O)).fire(new e.n("move",O)).fire(new e.n("moveend",O))),this}getBearing(){return this.transform.bearing}setZoomSnap(y){return this._zoomSnap=y,this}getZoomSnap(){return this._zoomSnap}setBearing(y,O){return this.jumpTo({bearing:y},O),this}getPadding(){return this.transform.padding}setPadding(y,O){return this.jumpTo({padding:y},O),this}rotateTo(y,O,ie){return this.easeTo(e.e({bearing:y},O),ie)}resetNorth(y,O){return this.rotateTo(0,e.e({duration:1e3},y),O),this}resetNorthPitch(y,O){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},y),O),this}snapToNorth(y,O){return Math.abs(this.getBearing()){Rt.easeFunc(qt),this.terrain&&!y.freezeElevation&&this._updateElevation(qt),this._applyUpdatedTransform(ie),this._fireMoveEvents(O)},qt=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(O,qt)},y),this}_prepareEase(y,O,ie={}){this._moving=!0,O||ie.moving||this.fire(new e.n("movestart",y)),this._zooming&&!ie.zooming&&this.fire(new e.n("zoomstart",y)),this._rotating&&!ie.rotating&&this.fire(new e.n("rotatestart",y)),this._pitching&&!ie.pitching&&this.fire(new e.n("pitchstart",y)),this._rolling&&!ie.rolling&&this.fire(new e.n("rollstart",y))}_prepareElevation(y){this._elevationCenter=y,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(y,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(y){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let O=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(y<1&&O!==this._elevationTarget){let ie=this._elevationTarget-this._elevationStart;this._elevationStart+=y*(ie-(O-(ie*y+this._elevationStart))/(1-y)),this._elevationTarget=O}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,y))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(y){if(!this.terrain&&y.elevation>=0&&y.pitch<=90)return{};let O=y.getCameraLngLat(),ie=y.getCameraAltitude(),ce=this.terrain?this.terrain.getElevationForLngLatZoom(O,y.zoom):0;if(iethis._elevateCameraIfInsideTerrain(ce)),this.transformCameraUpdate&&O.push(ce=>this.transformCameraUpdate(ce)),!O.length)return;let ie=y.clone();for(let ce of O){let _e=ie.clone(),{center:De,zoom:Ne,roll:Ye,pitch:lt,bearing:ct,elevation:Ft}=ce(_e);De&&_e.setCenter(De),Ft!==void 0&&_e.setElevation(Ft),Ne!==void 0&&_e.setZoom(Ne),Ye!==void 0&&_e.setRoll(Ye),lt!==void 0&&_e.setPitch(lt),ct!==void 0&&_e.setBearing(ct),ie.apply(_e,!1)}this.transform.apply(ie,!1)}_fireMoveEvents(y){this.fire(new e.n("move",y)),this._zooming&&this.fire(new e.n("zoom",y)),this._rotating&&this.fire(new e.n("rotate",y)),this._pitching&&this.fire(new e.n("pitch",y)),this._rolling&&this.fire(new e.n("roll",y))}_afterEase(y,O){if(this._easeId&&O&&this._easeId===O)return;delete this._easeId;let ie=this._zooming,ce=this._rotating,_e=this._pitching,De=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,ie&&this.fire(new e.n("zoomend",y)),ce&&this.fire(new e.n("rotateend",y)),_e&&this.fire(new e.n("pitchend",y)),De&&this.fire(new e.n("rollend",y)),this.fire(new e.n("moveend",y))}flyTo(y,O){if(!y.essential&&s.prefersReducedMotion){let _n=e.V(y,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(_n,O)}this.stop(),"zoom"in(y=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},y))&&this._zoomSnap&&(y.zoom=e.cw(y.zoom,this._zoomSnap));let ie=this._getTransformForUpdate(),ce=ie.bearing,_e=ie.pitch,De=ie.roll,Ne=ie.padding,Ye="bearing"in y?this._normalizeBearing(y.bearing,ce):ce,lt="pitch"in y?+y.pitch:_e,ct="roll"in y?this._normalizeBearing(y.roll,De):De,Ft="padding"in y?y.padding:ie.padding,Gt=e.P.convert(y.offset),Jt=ie.centerPoint.add(Gt),it=ie.screenPointToLocation(Jt),Rt=this.cameraHelper.handleFlyTo(ie,{bearing:Ye,pitch:lt,roll:ct,padding:Ft,locationAtOffset:it,offsetAsPoint:Gt,center:y.center,minZoom:y.minZoom,zoom:y.zoom}),qt=y.curve,or=Math.max(ie.width,ie.height),vr=or/Rt.scaleOfZoom,Ar=Rt.pixelPathLength;typeof Rt.scaleOfMinZoom=="number"&&(qt=Math.sqrt(or/Rt.scaleOfMinZoom/Ar*2));let dr=qt*qt;function mr(_n){let vn=(vr*vr-or*or+(_n?-1:1)*dr*dr*Ar*Ar)/(2*(_n?vr:or)*dr*Ar);return Math.log(Math.sqrt(vn*vn+1)-vn)}function qr(_n){return(Math.exp(_n)-Math.exp(-_n))/2}function Lr(_n){return(Math.exp(_n)+Math.exp(-_n))/2}let cn=mr(!1),Nn=function(_n){return Lr(cn)/Lr(cn+qt*_n)},Dn=function(_n){return or*((Lr(cn)*(qr(vn=cn+qt*_n)/Lr(vn))-qr(cn))/dr)/Ar;var vn},qn=(mr(!0)-cn)/qt;if(Math.abs(Ar)<2e-6||!isFinite(qn)){if(Math.abs(or-vr)<1e-6)return this.easeTo(y,O);let _n=vr0,Nn=vn=>Math.exp(_n*qt*vn)}return y.duration="duration"in y?+y.duration:1e3*qn/("screenSpeed"in y?+y.screenSpeed/qt:+y.speed),y.maxDuration&&y.duration>y.maxDuration&&(y.duration=0),this._zooming=!0,this._rotating=ce!==Ye,this._pitching=lt!==_e,this._rolling=ct!==De,this._padding=!ie.isPaddingEqual(Ft),this._prepareEase(O,!1),this.terrain&&this._prepareElevation(Rt.targetCenter),this._ease(_n=>{let vn=_n*qn,Sn=1/Nn(vn),Tn=Dn(vn);this._rotating&&ie.setBearing(e.H.number(ce,Ye,_n)),this._pitching&&ie.setPitch(e.H.number(_e,lt,_n)),this._rolling&&ie.setRoll(e.H.number(De,ct,_n)),this._padding&&(ie.interpolatePadding(Ne,Ft,_n),Jt=ie.centerPoint.add(Gt)),Rt.easeFunc(_n,Sn,Tn,Jt),this.terrain&&!y.freezeElevation&&this._updateElevation(_n),this._applyUpdatedTransform(ie),this._fireMoveEvents(O)},()=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(O)},y),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(y,O){var ie;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let ce=this._onEaseEnd;delete this._onEaseEnd,ce.call(this,O)}return y||(ie=this.handlers)===null||ie===void 0||ie.stop(!1),this}_ease(y,O,ie){ie.animate===!1||ie.duration===0?(y(1),O()):(this._easeStart=m(),this._easeOptions=ie,this._onEaseFrame=y,this._onEaseEnd=O,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(y,O){y=e.X(y,-180,180);let ie=Math.abs(y-O);return Math.abs(y-360-O)MapLibre
'};class hl{constructor(y=du){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=O=>{!O||O.sourceDataType!=="metadata"&&O.sourceDataType!=="visibility"&&O.dataType!=="style"&&O.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=y}getDefaultPosition(){return"bottom-right"}onAdd(y){return this._map=y,this._compact=this.options.compact,this._container=g.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=g.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=g.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(y,O){let ie=this._map._getUIString(`AttributionControl.${O}`);y.title=ie,y.setAttribute("aria-label",ie)}_updateAttributions(){if(!this._map.style)return;let y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?y=y.concat(this.options.customAttribution.map(ce=>typeof ce!="string"?"":ce)):typeof this.options.customAttribution=="string"&&y.push(this.options.customAttribution)),this._map.style.stylesheet){let ce=this._map.style.stylesheet;this.styleOwner=ce.owner,this.styleId=ce.id}let O=this._map.style.tileManagers;for(let ce in O){let _e=O[ce];if(_e.used||_e.usedForTerrain){let De=_e.getSource();De.attribution&&!y.includes(De.attribution)&&y.push(De.attribution)}}y=y.filter(ce=>String(ce).trim()),y.sort((ce,_e)=>ce.length-_e.length),y=y.filter((ce,_e)=>{for(let De=_e+1;De{let O=this._container.children;if(O.length){let ie=O[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&ie.classList.add("maplibregl-compact"):ie.classList.remove("maplibregl-compact")}},this.options=y}getDefaultPosition(){return"bottom-left"}onAdd(y){var O;this._map=y,this._compact=(O=this.options)===null||O===void 0?void 0:O.compact,this._container=g.create("div","maplibregl-ctrl");let ie=g.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class he{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(y){let O=++this._id;return this._queue.push({callback:y,id:O,cancelled:!1}),O}remove(y){let O=this._currentlyRunning,ie=O?this._queue.concat(O):this._queue;for(let ce of ie)if(ce.id===y)return void(ce.cancelled=!0)}run(y=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let O=this._currentlyRunning=this._queue;this._queue=[];for(let ie of O)if(!ie.cancelled&&(ie.callback(y),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Se=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class je extends e.E{constructor(y){super(),this._lastTilesetChange=m(),this.tileManager=y,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=y._source.tileSize*2**this.deltaZoom,y.usedForTerrain=!0,y.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(y,O){this.tileManager.update(y,O),this._renderableTilesKeys=[];let ie={};for(let ce of Ze(y,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:O,calculateTileZoom:this.tileManager._source.calculateTileZoom}))ie[ce.key]=!0,this._renderableTilesKeys.push(ce.key),this._tiles[ce.key]||(ce.terrainRttPosMatrix32f=new Float64Array(16),e.c7(ce.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[ce.key]=new Tt(ce,this.tileSize),this._lastTilesetChange=m());for(let ce in this._tiles)ie[ce]||delete this._tiles[ce]}freeRtt(y){for(let O in this._tiles){let ie=this._tiles[O];(!y||ie.tileID.equals(y)||ie.tileID.isChildOf(y)||y.isChildOf(ie.tileID))&&(ie.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(y=>this.getTileByID(y))}getTileByID(y){return this._tiles[y]}getTerrainCoords(y,O){return O?this._getTerrainCoordsForTileRanges(y,O):this._getTerrainCoordsForRegularTile(y)}_getTerrainCoordsForRegularTile(y){let O={};for(let ie of this._renderableTilesKeys){let ce=this._tiles[ie].tileID,_e=y.clone(),De=e.bj();if(ce.canonical.equals(y.canonical))e.c7(De,0,e.a6,e.a6,0,0,1);else if(ce.canonical.isChildOf(y.canonical)){let Ne=ce.canonical.z-y.canonical.z,Ye=ce.canonical.x-(ce.canonical.x>>Ne<>Ne<>Ne;e.c7(De,0,ct,ct,0,0,1),e.Q(De,De,[-Ye*ct,-lt*ct,0])}else{if(!y.canonical.isChildOf(ce.canonical))continue;{let Ne=y.canonical.z-ce.canonical.z,Ye=y.canonical.x-(y.canonical.x>>Ne<>Ne<>Ne;e.c7(De,0,e.a6,e.a6,0,0,1),e.Q(De,De,[Ye*ct,lt*ct,0]),e.S(De,De,[1/2**Ne,1/2**Ne,0])}}_e.terrainRttPosMatrix32f=new Float32Array(De),O[ie]=_e}return O}_getTerrainCoordsForTileRanges(y,O){let ie={};for(let ce of this._renderableTilesKeys){let _e=this._tiles[ce].tileID;if(!this._isWithinTileRanges(_e,O))continue;let De=y.clone(),Ne=e.bj();if(_e.canonical.z===y.canonical.z){let Ye=y.canonical.x-_e.canonical.x+y.wrap*(1<y.canonical.z){let Ye=_e.canonical.z-y.canonical.z,lt=_e.canonical.x-(_e.canonical.x>>Ye<>Ye<>Ye),Gt=y.canonical.y-(_e.canonical.y>>Ye),Jt=e.a6>>Ye;e.c7(Ne,0,Jt,Jt,0,0,1),e.Q(Ne,Ne,[-lt*Jt+Ft*e.a6,-ct*Jt+Gt*e.a6,0])}else{let Ye=y.canonical.z-_e.canonical.z,lt=y.canonical.x-(y.canonical.x>>Ye<>Ye<>Ye)-_e.canonical.x,Gt=(y.canonical.y>>Ye)-_e.canonical.y,Jt=e.a6<_e.maxzoom&&(De=_e.maxzoom),De<_e.minzoom)return;(ie=this._sourceTileCache)[ce=y.key]||(ie[ce]=y.scaledTo(De).key);let Ne=this.findTileInCaches(this._sourceTileCache[y.key]);if(!Ne?.dem&&O)for(;De>=_e.minzoom&&!Ne?.dem;)Ne=this.findTileInCaches(y.scaledTo(De--).key);return Ne}findTileInCaches(y){let O=this.tileManager.getTileByID(y);return O||(O=this.tileManager._outOfViewCache.getByKey(y),O)}anyTilesAfterTime(y=Date.now()){return this._lastTilesetChange>=y}_isWithinTileRanges(y,O){let ie=O[y.canonical.z];return!!ie&&(y.wrap>ie.minWrap||y.wrap=ie.minTileXWrapped&&y.canonical.x<=ie.maxTileXWrapped&&y.canonical.y>=ie.minTileY&&y.canonical.y<=ie.maxTileY)}}class Qe{constructor(y,O,ie){this._meshCache={},this.painter=y,this.tileManager=new je(O),this.options=ie,this.exaggeration=typeof ie.exaggeration=="number"?ie.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let y in this._meshCache)this._meshCache[y].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(y,O,ie,ce=e.a6){var _e;let De=y.normalizeCoordinates(O,ie,ce);if(!De)return 0;let Ne=this.getTerrainData(De.tileID),Ye=(_e=Ne.tile)===null||_e===void 0?void 0:_e.dem;if(!Ye)return 0;let lt=e.cC([],[De.x/ce*e.a6,De.y/ce*e.a6],Ne.u_terrain_matrix),ct=[lt[0]*Ye.dim,lt[1]*Ye.dim],Ft=Math.floor(ct[0]),Gt=Math.floor(ct[1]),Jt=ct[0]-Ft,it=ct[1]-Gt;return Ye.get(Ft,Gt)*(1-Jt)*(1-it)+Ye.get(Ft+1,Gt)*Jt*(1-it)+Ye.get(Ft,Gt+1)*(1-Jt)*it+Ye.get(Ft+1,Gt+1)*Jt*it}getElevationForLngLatZoom(y,O){if(!e.cD(O,y.wrap()))return 0;let{tileID:ie,mercatorX:ce,mercatorY:_e}=this._getOverscaledTileIDFromLngLatZoom(y,O);return this.getElevation(ie,ce%e.a6,_e%e.a6,e.a6)}getElevationForLngLat(y,O){let ie=Ze(O,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),ce=0;for(let _e of ie)_e.canonical.z>ce&&(ce=Math.min(_e.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(y,ce)}getElevation(y,O,ie,ce=e.a6){return this.getDEMElevation(y,O,ie,ce)*this.exaggeration}getTerrainData(y){var O,ie;if(!this._emptyDemTexture){let De=this.painter.context,Ne=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(De,Ne,De.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(De,new e.R({width:1,height:1}),De.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(De.gl.NEAREST,De.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}let ce=this.tileManager.getSourceTile(y,!0);if(ce?.dem&&(!ce.demTexture||ce.needsTerrainPrepare)){let De=this.painter.context;ce.demTexture=this.painter.getTileTexture(ce.dem.stride),ce.demTexture?ce.demTexture.update(ce.dem.getPixels(),{premultiply:!1}):ce.demTexture=new e.T(De,ce.dem.getPixels(),De.gl.RGBA,{premultiply:!1}),ce.demTexture.bind(De.gl.NEAREST,De.gl.CLAMP_TO_EDGE),ce.needsTerrainPrepare=!1}let _e=ce&&ce.toString()+ce.tileID.key+y.key;if(_e&&!this._demMatrixCache[_e]){let De=this.tileManager.getSource().maxzoom,Ne=y.canonical.z-ce.tileID.canonical.z;y.overscaledZ>y.canonical.z&&(y.canonical.z>=De?Ne=y.canonical.z-De:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ye=y.canonical.x-(y.canonical.x>>Ne<>Ne<>8<<4|_e>>8,O[De+3]=0;let ie=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(O.buffer)),ce=new e.T(y,ie,y.gl.RGBA,{premultiply:!1});return ce.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._coordsTexture=ce,ce}pointCoordinate(y){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let O=new Uint8Array(4),ie=this.painter.context,ce=ie.gl,_e=Math.round(y.x*this.painter.pixelRatio/devicePixelRatio),De=Math.round(y.y*this.painter.pixelRatio/devicePixelRatio),Ne=Math.round(this.painter.height/devicePixelRatio);ie.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),ce.readPixels(_e,Ne-De-1,1,1,ce.RGBA,ce.UNSIGNED_BYTE,O),ie.bindFramebuffer.set(null);let Ye=O[0]+(O[2]>>4<<8),lt=O[1]+((15&O[2])<<8),ct=this.coordsIndex[255-O[3]],Ft=ct&&this.tileManager.getTileByID(ct);if(!Ft)return null;let Gt=this._coordsTextureSize,Jt=(1<0,ce=ie&&y.canonical.y===0,_e=ie&&y.canonical.y===(1<y.id!==O),this._recentlyUsed.push(y.id)}stampObject(y){y.stamp=++this._stamp}getOrCreateFreeObject(){for(let O of this._recentlyUsed)if(!this._objects[O].inUse)return this._objects[O];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let y=this._createObject(this._objects.length);return this._objects.push(y),y}freeObject(y){y.inUse=!1}freeAllObjects(){for(let y of this._objects)this.freeObject(y)}isFull(){return!(this._objects.length!y.inUse)===!1}}let ut={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class jt{constructor(y,O){this.painter=y,this.terrain=O,this.pool=new tt(y.context,30,O.tileManager.tileSize*O.qualityFactor)}destruct(){this.pool.destruct()}getTexture(y){return this.pool.getObjectForId(y.rtt[this._stacks.length-1].id).texture}prepareForRender(y,O){var ie,ce,_e;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=y._order.filter(De=>!y._layers[De].isHidden(O)),this._coordsAscending={};for(let De in y.tileManagers){this._coordsAscending[De]={};let Ne=y.tileManagers[De].getVisibleCoordinates(),Ye=y.tileManagers[De].getSource(),lt=Ye instanceof ke?Ye.terrainTileRanges:null;for(let ct of Ne){let Ft=this.terrain.tileManager.getTerrainCoords(ct,lt);for(let Gt in Ft)(_e=this._coordsAscending[De])[Gt]||(_e[Gt]=[]),this._coordsAscending[De][Gt].push(Ft[Gt])}}this._rttFingerprints={};for(let De of y._order){let Ne=y._layers[De],Ye=Ne.source;if(ut[Ne.type]&&!this._rttFingerprints[Ye]){this._rttFingerprints[Ye]={};let lt=(ce=(ie=y.tileManagers[Ye])===null||ie===void 0?void 0:ie.getState().revision)!==null&&ce!==void 0?ce:0;for(let ct in this._coordsAscending[Ye])this._rttFingerprints[Ye][ct]=`${this._coordsAscending[Ye][ct].map(Ft=>Ft.key).sort().join()}#${lt}`}}for(let De of this._renderableTiles)for(let Ne in this._rttFingerprints){let Ye=this._rttFingerprints[Ne][De.tileID.key];Ye&&Ye!==De.rttFingerprint[Ne]&&(De.rtt=[])}}renderLayer(y,O){if(y.isHidden(this.painter.transform.zoom))return!1;let ie=Object.assign(Object.assign({},O),{isRenderingToTexture:!0}),ce=y.type,_e=this.painter,De=this._renderableLayerIds[this._renderableLayerIds.length-1]===y.id;if(ut[ce]&&(this._prevType&&ut[this._prevType]||this._stacks.push([]),this._prevType=ce,this._stacks[this._stacks.length-1].push(y.id),!De))return!0;if(ut[this._prevType]||ut[ce]&&De){this._prevType=ce;let Ne=this._stacks.length-1,Ye=this._stacks[Ne]||[];for(let lt of this._renderableTiles){if(this.pool.isFull()&&(Fu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(lt),lt.rtt[Ne]){let Ft=this.pool.getObjectForId(lt.rtt[Ne].id);if(Ft.stamp===lt.rtt[Ne].stamp){this.pool.useObject(Ft);continue}}let ct=this.pool.getOrCreateFreeObject();this.pool.useObject(ct),this.pool.stampObject(ct),lt.rtt[Ne]={id:ct.id,stamp:ct.stamp},_e.context.bindFramebuffer.set(ct.fbo.framebuffer),_e.context.clear({color:e.bo.transparent,stencil:0}),_e.currentStencilSource=void 0;for(let Ft of Ye){let Gt=_e.style._layers[Ft],Jt=Gt.source?this._coordsAscending[Gt.source][lt.tileID.key]:[lt.tileID];_e.context.viewport.set([0,0,ct.fbo.width,ct.fbo.height]),_e._renderTileClippingMasks(Gt,Jt,!0),_e.renderLayer(_e,_e.style.tileManagers[Gt.source],Gt,Jt,ie),Gt.source&&(lt.rttFingerprint[Gt.source]=this._rttFingerprints[Gt.source][lt.tileID.key])}}return Fu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects(),ut[ce]}return!1}}let St={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Qt=t,gr={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:du,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},yr=class extends oc{get _ownerWindow(){var de,y;return((y=(de=this._container)===null||de===void 0?void 0:de.ownerDocument)===null||y===void 0?void 0:y.defaultView)||window}constructor(de){var y,O,ie;let ce=Object.assign(Object.assign(Object.assign({},gr),de),{canvasContextAttributes:Object.assign(Object.assign({},gr.canvasContextAttributes),de.canvasContextAttributes)});if(ce.minZoom!=null&&ce.maxZoom!=null&&ce.minZoom>ce.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(ce.minPitch!=null&&ce.maxPitch!=null&&ce.minPitch>ce.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(ce.minPitch!=null&&ce.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(ce.maxPitch!=null&&ce.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let _e=new qo,De=new ns;ce.minZoom!==void 0&&_e.setMinZoom(ce.minZoom),ce.maxZoom!==void 0&&_e.setMaxZoom(ce.maxZoom),ce.minPitch!==void 0&&_e.setMinPitch(ce.minPitch),ce.maxPitch!==void 0&&_e.setMaxPitch(ce.maxPitch),ce.renderWorldCopies!==void 0&&_e.setRenderWorldCopies(ce.renderWorldCopies),ce.transformConstrain!==null&&_e.setConstrainOverride(ce.transformConstrain),super(_e,De,{bearingSnap:ce.bearingSnap,zoomSnap:ce.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new he,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ye=>{if(Ye.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let lt of Object.values(this.style._layers))if(lt.type==="custom"&&console.warn(`Custom layer with id '${lt.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),lt._listeners)for(let[ct]of Object.entries(lt._listeners))console.warn(`Custom layer with id '${lt.id}' had event listeners for event '${ct}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:Ye}))}else this.fire(new e.n("webglcontextlost",{originalEvent:Ye}))},this._contextRestored=Ye=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:Ye}))},this._onMapScroll=Ye=>{if(Ye.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=ce.interactive,this._maxTileCacheSize=ce.maxTileCacheSize,this._maxTileCacheZoomLevels=ce.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},ce.canvasContextAttributes),this._trackResize=ce.trackResize===!0,this._bearingSnap=ce.bearingSnap,this._zoomSnap=ce.zoomSnap,this._centerClampedToGround=ce.centerClampedToGround,this._refreshExpiredTiles=ce.refreshExpiredTiles===!0,this._fadeDuration=ce.fadeDuration,this._crossSourceCollisions=ce.crossSourceCollisions===!0,this._collectResourceTiming=ce.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},St),ce.locale),this._clickTolerance=ce.clickTolerance,this._overridePixelRatio=ce.pixelRatio,this._maxCanvasSize=ce.maxCanvasSize,this._zoomLevelsToOverscale=ce.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=ce.transformCameraUpdate,this.transformConstrain=ce.transformConstrain,this.cancelPendingTileRequestsWhileZooming=ce.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(ce.anisotropicFilterPitch),ce.reduceMotion!==void 0&&(s.prefersReducedMotion=ce.reduceMotion),this._imageQueueHandle=p.addThrottleControl(()=>this.isMoving()),this._requestManager=new i(ce.transformRequest),this._container=this._resolveContainer(ce.container),ce.maxBounds&&this.setMaxBounds(ce.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Bs(this,ce),this._hash=ce.hash?new Oc(typeof ce.hash=="string"&&ce.hash||void 0).addTo(this):void 0,!((y=this._hash)===null||y===void 0)&&y._onHashChange()||(this.jumpTo({center:ce.center,elevation:ce.elevation,zoom:ce.zoom,bearing:ce.bearing,pitch:ce.pitch,roll:ce.roll}),ce.bounds&&(this.resize(),this.fitBounds(ce.bounds,e.e({},ce.fitBoundsOptions,{duration:0}))));let Ne=typeof ce.style=="string"||((ie=(O=ce.style)===null||O===void 0?void 0:O.projection)===null||ie===void 0?void 0:ie.type)!=="globe";this.resize(null,Ne),this._localIdeographFontFamily=ce.localIdeographFontFamily,this._validateStyle=ce.validateStyle,ce.style&&this.setStyle(ce.style,{localIdeographFontFamily:ce.localIdeographFontFamily}),ce.attributionControl&&this.addControl(new hl(typeof ce.attributionControl=="boolean"?void 0:ce.attributionControl)),ce.maplibreLogo&&this.addControl(new Uc,ce.logoPosition),this.on("style.load",()=>{if(Ne||this._resizeTransform(),this.transform.unmodified){let Ye=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ye)}}),this.on("data",Ye=>{this._update(Ye.dataType==="style"),this.fire(new e.n(`${Ye.dataType}data`,Ye))}),this.on("dataloading",Ye=>{this.fire(new e.n(`${Ye.dataType}dataloading`,Ye))}),this.on("dataabort",Ye=>{this.fire(new e.n("sourcedataabort",Ye))})}_getMapId(){return this._mapId}setGlobalStateProperty(de,y){return this.style.setGlobalStateProperty(de,y),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(de,y){if(y===void 0&&(y=de.getDefaultPosition?de.getDefaultPosition():"top-right"),!de?.onAdd)return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let O=de.onAdd(this);this._controls.push(de);let ie=this._controlPositions[y];return y.includes("bottom")?ie.insertBefore(O,ie.firstChild):ie.appendChild(O),this}removeControl(de){if(!de?.onRemove)return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let y=this._controls.indexOf(de);return y>-1&&this._controls.splice(y,1),de.onRemove(this),this}hasControl(de){return this._controls.includes(de)}coveringTiles(de){return Ze(this.transform,de)}calculateCameraOptionsFromTo(de,y,O,ie){return ie==null&&this.terrain&&(ie=this.terrain.getElevationForLngLat(O,this.transform)),super.calculateCameraOptionsFromTo(de,y,O,ie)}resize(de,y=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(y);let O=!this._moving;return O&&(this.stop(),this.fire(new e.n("movestart",de)).fire(new e.n("move",de))),this.fire(new e.n("resize",de)),O&&this.fire(new e.n("moveend",de)),this}_resizeInternal(de=!0){let[y,O]=this._containerDimensions(),ie=this._getClampedPixelRatio(y,O);if(this._resizeCanvas(y,O,ie),this.painter.resize(y,O,ie),this.painter.overLimit()){let ce=this.painter.context.gl;this._maxCanvasSize=[ce.drawingBufferWidth,ce.drawingBufferHeight];let _e=this._getClampedPixelRatio(y,O);this._resizeCanvas(y,O,_e),this.painter.resize(y,O,_e)}this._resizeTransform(de)}_resizeTransform(de=!0){var y;let[O,ie]=this._containerDimensions();this.transform.resize(O,ie,de),(y=this._requestedCameraState)===null||y===void 0||y.resize(O,ie,de)}_getClampedPixelRatio(de,y){let{0:O,1:ie}=this._maxCanvasSize,ce=this.getPixelRatio(),_e=de*ce,De=y*ce;return Math.min(_e>O?O/_e:1,De>ie?ie/De:1)*ce}getPixelRatio(){var de;return(de=this._overridePixelRatio)!==null&&de!==void 0?de:devicePixelRatio}setPixelRatio(de){this._overridePixelRatio=de,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(de){return this.transform.setMaxBounds(q.convert(de)),this._update()}setMinZoom(de){if((de=de??-2)>=-2&&de<=this.transform.maxZoom){let y=this.transform.zoom,O=this._getTransformForUpdate();return O.setMinZoom(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(de){if((de=de??22)>=this.transform.minZoom){let y=this.transform.zoom,O=this._getTransformForUpdate();return O.setMaxZoom(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(de){if((de=de??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(de>=0&&de<=this.transform.maxPitch){let y=this.transform.pitch,O=this._getTransformForUpdate();return O.setMinPitch(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(de){if((de=de??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(de>=this.transform.minPitch){let y=this.transform.pitch,O=this._getTransformForUpdate();return O.setMaxPitch(de),this._applyUpdatedTransform(O),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(de){if((de=de??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(de<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=de,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(de){return this.transform.setRenderWorldCopies(de),this._update()}setTransformConstrain(de){return this.transform.setConstrainOverride(de),this._update()}project(de){return this.transform.locationToScreenPoint(e.W.convert(de),this.style&&this.terrain)}unproject(de){return this.transform.screenPointToLocation(e.P.convert(de),this.terrain)}isMoving(){var de;return this._moving||((de=this.handlers)===null||de===void 0?void 0:de.isMoving())}isZooming(){var de;return this._zooming||((de=this.handlers)===null||de===void 0?void 0:de.isZooming())}isRotating(){var de;return this._rotating||((de=this.handlers)===null||de===void 0?void 0:de.isRotating())}_createDelegatedListener(de,y,O){if(de==="mouseenter"||de==="mouseover"){let ie=!1;return{layers:y,listener:O,delegates:{mousemove:_e=>{let De=y.filter(Ye=>this.getLayer(Ye)),Ne=De.length!==0?this.queryRenderedFeatures(_e.point,{layers:De}):[];Ne.length?ie||(ie=!0,O.call(this,new Ol(de,this,_e.originalEvent,{features:Ne}))):ie=!1},mouseout:()=>{ie=!1}}}}if(de==="mouseleave"||de==="mouseout"){let ie=!1;return{layers:y,listener:O,delegates:{mousemove:De=>{let Ne=y.filter(Ye=>this.getLayer(Ye));(Ne.length!==0?this.queryRenderedFeatures(De.point,{layers:Ne}):[]).length?ie=!0:ie&&(ie=!1,O.call(this,new Ol(de,this,De.originalEvent)))},mouseout:De=>{ie&&(ie=!1,O.call(this,new Ol(de,this,De.originalEvent)))}}}}{let ie=ce=>{let _e=y.filter(Ne=>this.getLayer(Ne)),De=_e.length!==0?this.queryRenderedFeatures(ce.point,{layers:_e}):[];De.length&&(ce.features=De,O.call(this,ce),delete ce.features)};return{layers:y,listener:O,delegates:{[de]:ie}}}}_saveDelegatedListener(de,y){var O;this._delegatedListeners||(this._delegatedListeners={}),(O=this._delegatedListeners)[de]||(O[de]=[]),this._delegatedListeners[de].push(y)}_removeDelegatedListener(de,y,O){var ie;if(!(!((ie=this._delegatedListeners)===null||ie===void 0)&&ie[de]))return;let ce=this._delegatedListeners[de];for(let _e=0;_ey.includes(Ne))){for(let Ne in De.delegates)this.off(Ne,De.delegates[Ne]);return void ce.splice(_e,1)}}}on(de,y,O){if(O===void 0)return super.on(de,y);let ie=typeof y=="string"?[y]:y,ce=this._createDelegatedListener(de,ie,O);this._saveDelegatedListener(de,ce);for(let _e in ce.delegates)this.on(_e,ce.delegates[_e]);return{unsubscribe:()=>{this._removeDelegatedListener(de,ie,O)}}}once(de,y,O){if(O===void 0)return super.once(de,y);let ie=typeof y=="string"?[y]:y,ce=this._createDelegatedListener(de,ie,O);for(let _e in ce.delegates){let De=ce.delegates[_e];ce.delegates[_e]=(...Ne)=>{this._removeDelegatedListener(de,ie,O),De(...Ne)}}this._saveDelegatedListener(de,ce);for(let _e in ce.delegates)this.once(_e,ce.delegates[_e]);return this}off(de,y,O){return O===void 0?super.off(de,y):(this._removeDelegatedListener(de,typeof y=="string"?[y]:y,O),this)}queryRenderedFeatures(de,y){if(!this.style)return[];let O,ie=de instanceof e.P||Array.isArray(de),ce=ie?de:[[0,0],[this.transform.width,this.transform.height]];if(y||(y=(ie?{}:de)||{}),ce instanceof e.P||typeof ce[0]=="number")O=[e.P.convert(ce)];else{let _e=e.P.convert(ce[0]),De=e.P.convert(ce[1]);O=[_e,new e.P(De.x,_e.y),De,new e.P(_e.x,De.y),_e]}return this.style.queryRenderedFeatures(O,y,this.transform)}querySourceFeatures(de,y){return this.style.querySourceFeatures(de,y)}setStyle(de,y){return(y=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&de?(this._diffStyle(de,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(de,y))}setTransformRequest(de){return this._requestManager.setTransformRequest(de),this}_getUIString(de){let y=this._locale[de];if(y==null)throw new Error(`Missing UI string '${de}'`);return y}_updateStyle(de,y){var O,ie,ce;if((O=this._diffStyleRequest)===null||O===void 0||O.abort(),this._diffStyleRequest=null,y.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(de,y));let _e=this.style&&y.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!de)),de?(this.style=new Uu(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof de=="string"?this.style.loadURL(de,y,_e):this.style.loadJSON(de,y,_e),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(ce=(ie=this.style)===null||ie===void 0?void 0:ie.projection)===null||ce===void 0||ce.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Uu(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(de,y){return e._(this,void 0,void 0,function*(){var O;if((O=this._diffStyleRequest)===null||O===void 0||O.abort(),typeof de=="string"){let ie=de;this._diffStyleRequest=new AbortController;let ce=this._diffStyleRequest;try{let _e=yield this._requestManager.transformRequest(ie,"Style");if(ce.signal.aborted)return void(this._diffStyleRequest=null);let De=yield e.k(_e,ce);this._diffStyleRequest=null,this._updateDiff(De.data,y)}catch(_e){this._diffStyleRequest=null,e.$(_e)||this.fire(new e.l(e.d(_e)))}}else typeof de=="object"&&(this._diffStyleRequest=null,this._updateDiff(de,y))})}_updateDiff(de,y){try{this.style.setState(de,y)&&this._update(!0)}catch(O){e.w(`Unable to perform style diff: ${e.d(O).message}. Rebuilding the style from scratch.`),this._updateStyle(de,y)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(de,y){return this._lazyInitEmptyStyle(),this.style.addSource(de,y),this._update(!0)}isSourceLoaded(de){var y;let O=(y=this.style)===null||y===void 0?void 0:y.tileManagers[de];if(O!==void 0)return O.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${de}'`)))}setTerrain(de){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),de){let y=this.style.tileManagers[de.source];if(!y)throw new Error(`cannot load terrain, because there exists no source with ID: ${de.source}`);this.terrain===null&&y.reload();for(let O in this.style._layers){let ie=this.style._layers[O];ie.type==="hillshade"&&ie.source===de.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),ie.type==="color-relief"&&ie.source===de.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Qe(this.painter,y,de),this.painter.renderToTexture=new jt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=O=>{var ie;O.dataType==="style"?this.terrain.tileManager.freeRtt():O.dataType==="source"&&O.tile&&(O.sourceId!==de.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((ie=O.source)===null||ie===void 0?void 0:ie.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(O.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:de})),this}getTerrain(){var de,y;return(y=(de=this.terrain)===null||de===void 0?void 0:de.options)!==null&&y!==void 0?y:null}areTilesLoaded(){var de;let y=(de=this.style)===null||de===void 0?void 0:de.tileManagers;for(let O of Object.values(y))if(!O.areTilesLoaded())return!1;return!0}removeSource(de){return this.style.removeSource(de),this._update(!0)}getSource(de){return this.style.getSource(de)}setSourceTileLodParams(de,y,O){if(O){let ie=this.getSource(O);if(!ie)throw new Error(`There is no source with ID "${O}", cannot set LOD parameters`);ie.calculateTileZoom=Be(Math.max(1,de),Math.max(1,y))}else for(let ie in this.style.tileManagers)this.style.tileManagers[ie].getSource().calculateTileZoom=Be(Math.max(1,de),Math.max(1,y));return this._update(!0),this}refreshTiles(de,y){let O=this.style.tileManagers[de];if(!O)throw new Error(`There is no tile manager with ID "${de}", cannot refresh tile`);y===void 0?O.reload(!0):O.refreshTiles(y.map(ie=>new e.aa(ie.z,ie.x,ie.y)))}addImage(de,y,O={}){let{pixelRatio:ie=1,sdf:ce=!1,stretchX:_e,stretchY:De,content:Ne,textFitWidth:Ye,textFitHeight:lt}=O;if(this._lazyInitEmptyStyle(),!(y instanceof HTMLImageElement||e.b(y))){if(y.width===void 0||y.height===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:ct,height:Ft,data:Gt}=y,Jt=y;return this.style.addImage(de,{data:new e.R({width:ct,height:Ft},new Uint8Array(Gt)),pixelRatio:ie,stretchX:_e,stretchY:De,content:Ne,textFitWidth:Ye,textFitHeight:lt,sdf:ce,version:0,userImage:Jt}),Jt.onAdd&&Jt.onAdd(this,de),this}}{let{width:ct,height:Ft,data:Gt}=s.getImageData(y);this.style.addImage(de,{data:new e.R({width:ct,height:Ft},Gt),pixelRatio:ie,stretchX:_e,stretchY:De,content:Ne,textFitWidth:Ye,textFitHeight:lt,sdf:ce,version:0})}}updateImage(de,y){let O=this.style.getImage(de);if(!O)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let ie=y instanceof HTMLImageElement||e.b(y)?s.getImageData(y):y,{width:ce,height:_e,data:De}=ie;if(ce===void 0||_e===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(ce!==O.data.width||_e!==O.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let Ne=!(y instanceof HTMLImageElement||e.b(y));return O.data.replace(De,Ne),this.style.updateImage(de,O),this}getImage(de){return this.style.getImage(de)}hasImage(de){return de?!!this.style.getImage(de):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(de){this.style.removeImage(de)}loadImage(de){return e._(this,void 0,void 0,function*(){return p.getImage(yield this._requestManager.transformRequest(de,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(de,y){return this._lazyInitEmptyStyle(),this.style.addLayer(de,y),this._update(!0)}moveLayer(de,y){return this.style.moveLayer(de,y),this._update(!0)}removeLayer(de){return this.style.removeLayer(de),this._update(!0)}getLayer(de){return this.style.getLayer(de)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(de,y,O){return this.style.setLayerZoomRange(de,y,O),this._update(!0)}setFilter(de,y,O={}){return this.style.setFilter(de,y,O),this._update(!0)}getFilter(de){return this.style.getFilter(de)}setPaintProperty(de,y,O,ie={}){return this.style.setPaintProperty(de,y,O,ie),this._update(!0)}getPaintProperty(de,y){return this.style.getPaintProperty(de,y)}setLayoutProperty(de,y,O,ie={}){return this.style.setLayoutProperty(de,y,O,ie),this._update(!0)}getLayoutProperty(de,y){return this.style.getLayoutProperty(de,y)}setGlyphs(de,y={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(de,y),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(de,y,O={}){return this._lazyInitEmptyStyle(),this.style.addSprite(de,y,O,ie=>{ie||this._update(!0)}),this}removeSprite(de){return this._lazyInitEmptyStyle(),this.style.removeSprite(de),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(de,y={}){return this._lazyInitEmptyStyle(),this.style.setSprite(de,y,O=>{O||this._update(!0)}),this}setLight(de,y={}){return this._lazyInitEmptyStyle(),this.style.setLight(de,y),this._update(!0)}getLight(){return this.style.getLight()}setSky(de,y={}){return this._lazyInitEmptyStyle(),this.style.setSky(de,y),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(de,y){return this.style.setFeatureState(de,y),this._update()}removeFeatureState(de,y){return this.style.removeFeatureState(de,y),this._update()}getFeatureState(de){return this.style.getFeatureState(de)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let de=0,y=0;return this._container&&(de=this._container.clientWidth||400,y=this._container.clientHeight||300),[de,y]}_setupResizeObserver(){var de;let y=!1,O=ic(ce=>{this._trackResize&&!this._removed&&(this.resize(ce),this.redraw())},50),ie=(de=this._ownerWindow.ResizeObserver)!==null&&de!==void 0?de:ResizeObserver;this._resizeObserver=new ie(ce=>{y?O(ce):y=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(de){if(typeof de=="string"){let y=document.getElementById(de);if(!y)throw new Error(`Container '${de}' not found.`);return y}if(de instanceof HTMLElement||de&&typeof de=="object"&&de.nodeType===1)return de;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let de=this._container;de.classList.add("maplibregl-map");let y=this._canvasContainer=g.create("div","maplibregl-canvas-container",de);this._interactive&&y.classList.add("maplibregl-interactive"),this._canvas=g.create("canvas","maplibregl-canvas",y),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let O=this._containerDimensions(),ie=this._getClampedPixelRatio(O[0],O[1]);this._resizeCanvas(O[0],O[1],ie);let ce=this._controlContainer=g.create("div","maplibregl-control-container",de),_e=this._controlPositions={};for(let De of["top-left","top-right","bottom-left","bottom-right"])_e[De]=g.create("div",`maplibregl-ctrl-${De} `,ce);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(de,y,O){this._canvas.width=Math.floor(O*de),this._canvas.height=Math.floor(O*y),this._canvas.style.width=`${de}px`,this._canvas.style.height=`${y}px`}_setupPainter(){let de=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),y=null;this._canvas.addEventListener("webglcontextcreationerror",ie=>{y={requestedAttributes:de},ie&&(y.statusMessage=ie.statusMessage,y.type=ie.type)},{once:!0});let O=null;if(O=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,de):this._canvas.getContext("webgl2",de)||this._canvas.getContext("webgl",de),!O){let ie="Failed to initialize WebGL";throw y?(y.message=ie,new Error(JSON.stringify(y))):new Error(ie)}this.painter=new bu(O,this.transform)}migrateProjection(de,y){super.migrateProjection(de,y),this.painter.transform=de,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(de){var y;return!((y=this.style)===null||y===void 0)&&y._loaded?(this._styleDirty||(this._styleDirty=de),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(de){return this._update(),this._renderTaskQueue.add(de)}_cancelRenderFrame(de){this._renderTaskQueue.remove(de)}_render(de){var y,O,ie,ce,_e,De;let Ne=this._idleTriggered?this._fadeDuration:0,Ye=((y=this.style.projection)===null||y===void 0?void 0:y.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(de),this._removed)return;let lt=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Gt=this.transform.zoom,Jt=m();this.style.zoomHistory.update(Gt,Jt);let it=new e.J(Gt,{now:Jt,fadeDuration:Ne,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Rt=it.crossFadingFactor();Rt===1&&Rt===this._crossFadingFactor||(lt=!0,this._crossFadingFactor=Rt),this.style.update(it)}let ct=((O=this.style.projection)===null||O===void 0?void 0:O.transitionState)>0!==Ye;(ie=this.style.projection)===null||ie===void 0||ie.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((ce=this.style.projection)===null||ce===void 0?void 0:ce.transitionState,(_e=this.style.projection)===null||_e===void 0?void 0:_e.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ct)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(De=this.style)===null||De===void 0?void 0:De._updatePlacement(this.transform,this.showCollisionBoxes,Ne,this._crossSourceCollisions,ct),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:Ne,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||lt)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Ft=this._sourcesDirty||this._styleDirty||this._placementDirty;return Ft||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||Ft||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var de,y;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(de=this._diffStyleRequest)===null||de===void 0||de.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),p.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();let O=this.painter.context.gl.getExtension("WEBGL_lose_context");O?.loseContext&&O.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frame(this._frameRequest,de=>{this._frameRequest=null;try{this._render(de)}catch(y){if(!e.$(y)&&!function(O){return O.message===ac}(y))throw y}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(de){this._showTileBoundaries!==de&&(this._showTileBoundaries=de,this._update())}get showPadding(){return!!this._showPadding}set showPadding(de){this._showPadding!==de&&(this._showPadding=de,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(de){this._showCollisionBoxes!==de&&(this._showCollisionBoxes=de,de?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(de){this._showOverdrawInspector!==de&&(this._showOverdrawInspector=de,this._update())}get repaint(){return!!this._repaint}set repaint(de){this._repaint!==de&&(this._repaint=de,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(de){this._vertices=de,this._update()}get version(){return Qt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(de){return this._lazyInitEmptyStyle(),this.style.setProjection(de),this._update(!0)}},Kr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class $r{constructor(y,O,ie=!1){this.mousedown=_e=>{this.startMove(_e,g.mousePos(this.element,_e)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=_e=>{this.move(_e,g.mousePos(this.element,_e))},this.mouseup=_e=>{this._rotatePitchHandler.dragEnd(_e),this.offTemp()},this.touchstart=_e=>{_e.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=g.touchPos(this.element,_e.targetTouches)[0],this.startMove(_e,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=_e=>{_e.targetTouches.length!==1?this.reset():(this._lastPos=g.touchPos(this.element,_e.targetTouches)[0],this.move(_e,this._lastPos))},this.touchend=_e=>{_e.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=O;let ce=new Ur;this._rotatePitchHandler=new pt({clickTolerance:3,move:(_e,De)=>{let Ne=O.getBoundingClientRect(),Ye=new e.P((Ne.bottom-Ne.top)/2,(Ne.right-Ne.left)/2);return{bearingDelta:e.cx(new e.P(_e.x,De.y),De,Ye),pitchDelta:ie?-.5*(De.y-_e.y):void 0}},moveStateManager:ce,enable:!0,assignEvents:()=>{}}),this.map=y,O.addEventListener("mousedown",this.mousedown),O.addEventListener("touchstart",this.touchstart,{passive:!1}),O.addEventListener("touchcancel",this.reset)}startMove(y,O){this._rotatePitchHandler.dragStart(y,O),g.disableDrag()}move(y,O){let ie=this.map,{bearingDelta:ce,pitchDelta:_e}=this._rotatePitchHandler.dragMove(y,O)||{};ce&&ie.setBearing(ie.getBearing()+ce),_e&&ie.setPitch(ie.getPitch()+_e)}off(){let y=this.element;y.removeEventListener("mousedown",this.mousedown),y.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),y.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){g.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let bn;function Rn(de,y,O,ie=!1){if(ie||!O.getCoveringTilesDetailsProvider().allowWorldCopies())return de?.wrap();let ce=new e.W(de.lng,de.lat);if(de=new e.W(de.lng,de.lat),y){let _e=new e.W(de.lng-360,de.lat),De=new e.W(de.lng+360,de.lat),Ne=O.locationToScreenPoint(de).distSqr(y);O.locationToScreenPoint(_e).distSqr(y)180;){let _e=O.locationToScreenPoint(de);if(_e.x>=0&&_e.y>=0&&_e.x<=O.width&&_e.y<=O.height)break;de.lng>O.center.lng?de.lng-=360:de.lng+=360}return de.lng!==ce.lng&&O.isPointOnMapSurface(O.locationToScreenPoint(de))?de:ce}let rn={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 pn(de,y,O){let ie=de.classList;for(let ce in rn)ie.remove(`maplibregl-${O}-anchor-${ce}`);ie.add(`maplibregl-${O}-anchor-${y}`)}class xn extends e.E{constructor(y){if(super(),this._onClick=O=>{this.fire(new e.n("click",{originalEvent:O}))},this._onKeyPress=O=>{O.code!=="Space"&&O.code!=="Enter"||this.togglePopup()},this._onMapClick=O=>{let ie=O.originalEvent.target,ce=this._element;this._popup&&(ie===ce||ce.contains(ie))&&this.togglePopup()},this._update=O=>{if(!this._map)return;let ie=this._map.loaded()&&!this._map.isMoving();(O?.type==="terrain"||O?.type==="render"&&!ie)&&this._map.once("render",this._update),this._lngLat=Rn(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let ce="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?ce=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(ce=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let _e="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?_e="rotateX(0deg)":this._pitchAlignment==="map"&&(_e=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||O&&O.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${rn[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${_e} ${ce}`,s.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(O?.type==="moveend")}).catch(()=>{})},this._onMove=O=>{if(!this._isDragging){let ie=this._clickTolerance||this._map._clickTolerance;this._isDragging=O.point.dist(this._pointerdownPos)>=ie}this._isDragging&&(this._pos=O.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.n("dragstart"))),this.fire(new e.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.n("dragend")),this._state="inactive"},this._addDragHandler=O=>{this._element.contains(O.originalEvent.target)&&(O.preventDefault(),this._positionDelta=O.point.sub(this._pos).add(this._offset),this._pointerdownPos=O.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=y?.anchor||"center",this._color=y?.color||"#3FB1CE",this._scale=y?.scale||1,this._draggable=y?.draggable||!1,this._clickTolerance=y?.clickTolerance||0,this._subpixelPositioning=y?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=y?.rotation||0,this._rotationAlignment=y?.rotationAlignment||"auto",this._pitchAlignment=y?.pitchAlignment&&y.pitchAlignment!=="auto"?y.pitchAlignment:this._rotationAlignment,this.setOpacity(y?.opacity,y?.opacityWhenCovered),y?.element)this._element=y.element,this._offset=e.P.convert(y?.offset||[0,0]);else{this._defaultMarker=!0,this._element=g.create("div");let O=g.createNS("http://www.w3.org/2000/svg","svg"),ie=41,ce=27;O.setAttributeNS(null,"display","block"),O.setAttributeNS(null,"height",`${ie}px`),O.setAttributeNS(null,"width",`${ce}px`),O.setAttributeNS(null,"viewBox",`0 0 ${ce} ${ie}`);let _e=g.createNS("http://www.w3.org/2000/svg","g");_e.setAttributeNS(null,"stroke","none"),_e.setAttributeNS(null,"stroke-width","1"),_e.setAttributeNS(null,"fill","none"),_e.setAttributeNS(null,"fill-rule","evenodd");let De=g.createNS("http://www.w3.org/2000/svg","g");De.setAttributeNS(null,"fill-rule","nonzero");let Ne=g.createNS("http://www.w3.org/2000/svg","g");Ne.setAttributeNS(null,"transform","translate(3.0, 29.0)"),Ne.setAttributeNS(null,"fill","#000000");let Ye=[{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"}];for(let or of Ye){let vr=g.createNS("http://www.w3.org/2000/svg","ellipse");vr.setAttributeNS(null,"opacity","0.04"),vr.setAttributeNS(null,"cx","10.5"),vr.setAttributeNS(null,"cy","5.80029008"),vr.setAttributeNS(null,"rx",or.rx),vr.setAttributeNS(null,"ry",or.ry),Ne.appendChild(vr)}let lt=g.createNS("http://www.w3.org/2000/svg","g");lt.setAttributeNS(null,"fill",this._color);let ct=g.createNS("http://www.w3.org/2000/svg","path");ct.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),lt.appendChild(ct);let Ft=g.createNS("http://www.w3.org/2000/svg","g");Ft.setAttributeNS(null,"opacity","0.25"),Ft.setAttributeNS(null,"fill","#000000");let Gt=g.createNS("http://www.w3.org/2000/svg","path");Gt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ft.appendChild(Gt);let Jt=g.createNS("http://www.w3.org/2000/svg","g");Jt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Jt.setAttributeNS(null,"fill","#FFFFFF");let it=g.createNS("http://www.w3.org/2000/svg","g");it.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Rt=g.createNS("http://www.w3.org/2000/svg","circle");Rt.setAttributeNS(null,"fill","#000000"),Rt.setAttributeNS(null,"opacity","0.25"),Rt.setAttributeNS(null,"cx","5.5"),Rt.setAttributeNS(null,"cy","5.5"),Rt.setAttributeNS(null,"r","5.4999962");let qt=g.createNS("http://www.w3.org/2000/svg","circle");qt.setAttributeNS(null,"fill","#FFFFFF"),qt.setAttributeNS(null,"cx","5.5"),qt.setAttributeNS(null,"cy","5.5"),qt.setAttributeNS(null,"r","5.4999962"),it.appendChild(Rt),it.appendChild(qt),De.appendChild(Ne),De.appendChild(lt),De.appendChild(Ft),De.appendChild(Jt),De.appendChild(it),O.appendChild(De),O.setAttributeNS(null,"height",ie*this._scale+"px"),O.setAttributeNS(null,"width",ce*this._scale+"px"),this._element.appendChild(O),this._offset=e.P.convert(y?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",O=>{O.preventDefault()}),this._element.addEventListener("mousedown",O=>{O.preventDefault()}),pn(this._element,this._anchor,"marker"),y?.className)for(let O of y.className.split(" "))this._element.classList.add(O);this._popup=null}addTo(y){return this.remove(),this._map=y,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",y._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),y.getCanvasContainer().appendChild(this._element),y.on("move",this._update),y.on("moveend",this._update),y.on("terrain",this._update),y.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=e.W.convert(y),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(y){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),y){if(!("offset"in y.options)){let ce=Math.abs(13.5)/Math.SQRT2;y.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[ce,-1*(38.1-13.5+ce)],"bottom-right":[-ce,-1*(38.1-13.5+ce)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=y,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(y){return this._subpixelPositioning=y,this}getPopup(){return this._popup}togglePopup(){let y=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:y?(y.isOpen()?y.remove():(y.setLngLat(this._lngLat),y.addTo(this._map)),this):this}_updateOpacity(y=!1){var O,ie;let ce=(O=this._map)===null||O===void 0?void 0:O.terrain,_e=this._map.transform.isLocationOccluded(this._lngLat);if(!ce||_e){let Jt=_e?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Jt&&(this._element.style.opacity=Jt,this._element.classList.toggle("maplibregl-marker-covered",_e)))}if(y)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let De=this._map,Ne=De.terrain.depthAtPoint(this._pos),Ye=De.terrain.getElevationForLngLat(this._lngLat,De.transform);if(De.transform.lngLatToCameraDepth(this._lngLat,Ye)-Ne<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let lt=-this._offset.y/De.transform.pixelsPerMeter,ct=Math.sin(De.getPitch()*Math.PI/180)*lt,Ft=De.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=De.transform.lngLatToCameraDepth(this._lngLat,Ye+ct)-Ft>.006;!((ie=this._popup)===null||ie===void 0)&&ie.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",Gt)}getOffset(){return this._offset}setOffset(y){return this._offset=e.P.convert(y),this._update(),this}addClassName(y){this._element.classList.add(y)}removeClassName(y){this._element.classList.remove(y)}toggleClassName(y){return this._element.classList.toggle(y)}setDraggable(y){return this._draggable=!!y,this._map&&(y?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(y){return this._rotation=y||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(y){return this._rotationAlignment=y||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(y){return this._pitchAlignment=y&&y!=="auto"?y:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(y,O){return(this._opacity===void 0||y===void 0&&O===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),y!==void 0&&(this._opacity=String(y)),O!==void 0&&(this._opacityWhenCovered=String(O)),this._map&&this._updateOpacity(!0),this}}let Bn={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Fn=0,mn=!1,Ea={maxWidth:100,unit:"metric"};function Oa(de,y,O){let ie=O?.maxWidth||100,ce=de._container.clientHeight/2,_e=de._container.clientWidth/2,De=de.unproject([_e-ie/2,ce]),Ne=de.unproject([_e+ie/2,ce]),Ye=Math.round(de.project(Ne).x-de.project(De).x),lt=Math.min(ie,Ye,de._container.clientWidth),ct=De.distanceTo(Ne);if(O?.unit==="imperial"){let Ft=3.2808*ct;Ft>5280?Ka(y,lt,Ft/5280,de._getUIString("ScaleControl.Miles")):Ka(y,lt,Ft,de._getUIString("ScaleControl.Feet"))}else O?.unit==="nautical"?Ka(y,lt,ct/1852,de._getUIString("ScaleControl.NauticalMiles")):ct>=1e3?Ka(y,lt,ct/1e3,de._getUIString("ScaleControl.Kilometers")):Ka(y,lt,ct,de._getUIString("ScaleControl.Meters"))}function Ka(de,y,O,ie){let ce=function(_e){let De=Math.pow(10,`${Math.floor(_e)}`.length-1),Ne=_e/De;return Ne=Ne>=10?10:Ne>=5?5:Ne>=3?3:Ne>=2?2:Ne>=1?1:function(Ye){let lt=Math.pow(10,Math.ceil(-Math.log(Ye)/Math.LN10));return Math.round(Ye*lt)/lt}(Ne),De*Ne}(O);de.style.width=y*(ce/O)+"px",de.innerHTML=`${ce} ${ie}`}let di={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},Oi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Pi(de){if(de){if(typeof de=="number"){let y=Math.round(Math.abs(de)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,de),"top-left":new e.P(y,y),"top-right":new e.P(-y,y),bottom:new e.P(0,-de),"bottom-left":new e.P(y,-y),"bottom-right":new e.P(-y,-y),left:new e.P(de,0),right:new e.P(-de,0)}}if(de instanceof e.P||Array.isArray(de)){let y=e.P.convert(de);return{center:y,top:y,"top-left":y,"top-right":y,bottom:y,"bottom-left":y,"bottom-right":y,left:y,right:y}}return{center:e.P.convert(de.center||[0,0]),top:e.P.convert(de.top||[0,0]),"top-left":e.P.convert(de["top-left"]||[0,0]),"top-right":e.P.convert(de["top-right"]||[0,0]),bottom:e.P.convert(de.bottom||[0,0]),"bottom-left":e.P.convert(de["bottom-left"]||[0,0]),"bottom-right":e.P.convert(de["bottom-right"]||[0,0]),left:e.P.convert(de.left||[0,0]),right:e.P.convert(de.right||[0,0])}}return Pi(new e.P(0,0))}let ko=t;l.AJAXError=e.cG,l.EXTENT=e.a6,l.Event=e.n,l.Evented=e.E,l.LngLat=e.W,l.MercatorCoordinate=e.a7,l.Point=e.P,l.addProtocol=e.cH,l.config=e.c,l.removeProtocol=e.cI,l.AttributionControl=hl,l.BoxZoomHandler=Ul,l.CanvasSource=ue,l.CooperativeGesturesHandler=Vi,l.DoubleClickZoomHandler=Es,l.DragPanHandler=Js,l.DragRotateHandler=Tu,l.EdgeInsets=So,l.FullscreenControl=class extends e.E{constructor(de={}){var y;super(),this._onFullscreenChange=()=>{var O;let ie=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((O=ie?.shadowRoot)===null||O===void 0)&&O.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(y=de.pseudo)!==null&&y!==void 0&&y,de?.container&&(de.container instanceof HTMLElement?this._container=de.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(de){return this._map=de,this._container||(this._container=this._map.getContainer()),this._controlContainer=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let de=this._fullscreenButton=g.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);g.create("span","maplibregl-ctrl-icon",de).setAttribute("aria-hidden","true"),de.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let de=this._getTitle();this._fullscreenButton.setAttribute("aria-label",de),this._fullscreenButton.title=de}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=qe,l.GeolocateControl=class extends e.E{constructor(de){super(),this._onSuccess=y=>{if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",y)),this._finish()}},this._updateCamera=y=>{let O=new e.W(y.coords.longitude,y.coords.latitude),ie=y.coords.accuracy,ce=this._map.getBearing(),_e=e.e({bearing:ce},this.options.fitBoundsOptions),De=q.fromLngLat(O,ie);this._map.fitBounds(De,_e,{geolocateSource:!0})},this._updateMarker=y=>{if(y){let O=new e.W(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(O).addTo(this._map),this._userLocationDotMarker.setLngLat(O).addTo(this._map),this._accuracy=y.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=y=>{if(this._map){if(y.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let O=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&mn)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",y)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=y=>{if(!this._map)return;let O=y?.[0]instanceof ResizeObserverEntry;y.geolocateSource||this._watchState!=="ACTIVE_LOCK"||O||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",y=>{y.preventDefault()}),this._geolocateButton=g.create("button","maplibregl-ctrl-geolocate",this._container),g.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=y=>{if(this._map){if(y===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let O=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O)}else{let O=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=O,this._geolocateButton.setAttribute("aria-label",O)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=g.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new xn({element:this._dotElement}),this._circleElement=g.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new xn({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},Bn,de)}onAdd(de){return this._map=de,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(y=!1){if(bn!==void 0&&!y)return bn;if(window.navigator.permissions===void 0)return bn=!!window.navigator.geolocation,bn;try{bn=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{bn=!!window.navigator.geolocation}return bn})}().then(y=>this._finishSetupUI(y)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Fn=0,mn=!1}_isOutOfMapMaxBounds(de){let y=this._map.getMaxBounds(),O=de.coords;return y&&(O.longitudey.getEast()||O.latitudey.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let de=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&de))return;let y=this._map.project(de),O=this._map.unproject([y.x+100,y.y]),ie=de.distanceTo(O)/100,ce=2*this._accuracy/ie;this._circleElement.style.width=`${ce.toFixed(2)}px`,this._circleElement.style.height=`${ce.toFixed(2)}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Fn--,mn=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.n("trackuserlocationstart")),this.fire(new e.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let de;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Fn++,Fn>1?(de={maximumAge:6e5,timeout:0},mn=!0):(de=this.options.positionOptions,mn=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,de)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},l.GlobeControl=class{constructor(){this._toggleProjection=()=>{var de;let y=(de=this._map.getProjection())===null||de===void 0?void 0:de.type;this._map.setProjection(y!=="mercator"&&y?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var de;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((de=this._map.getProjection())===null||de===void 0?void 0:de.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(de){return this._map=de,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=g.create("button","maplibregl-ctrl-globe",this._container),g.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},l.Hash=Oc,l.ImageSource=ke,l.KeyboardHandler=_o,l.LngLatBounds=q,l.LogoControl=Uc,l.Map=yr,l.MapLibreMap=yr,l.MapMouseEvent=Ol,l.MapTouchEvent=Bu,l.MapWheelEvent=nf,l.Marker=xn,l.NavigationControl=class{constructor(de){this._updateZoomButtons=()=>{let y=this._map.getZoom(),O=y===this._map.getMaxZoom(),ie=y===this._map.getMinZoom();this._zoomInButton.disabled=O,this._zoomOutButton.disabled=ie,this._zoomInButton.setAttribute("aria-disabled",O.toString()),this._zoomOutButton.setAttribute("aria-disabled",ie.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(y,O)=>{let ie=this._map._getUIString(`NavigationControl.${O}`);y.title=ie,y.setAttribute("aria-label",ie)},this.options=e.e({},Kr,de),this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",y=>y.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",y=>this._map.zoomIn({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",y=>this._map.zoomOut({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",y=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:y}):this._map.resetNorth({},{originalEvent:y})}),this._compassIcon=g.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(de){return this._map=de,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new $r(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(de,y){let O=g.create("button",de,this._container);return O.type="button",O.addEventListener("click",y),O}},l.Popup=class extends e.E{constructor(de){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=y=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=g.create("div","maplibregl-popup",this._map.getContainer()),this._tip=g.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let Ne of this.options.className.split(" "))this._container.classList.add(Ne);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let O;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Rn(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),y&&"point"in y&&y.point&&(O=y.point),this._trackPointer&&!O)return;let ie=this._flatPos=this._pos=this._trackPointer&&O?O:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&O?O:this._map.transform.locationToScreenPoint(this._lngLat));let ce=this.options.anchor,_e=Pi(this.options.offset);if(!ce){let Ne=this._container.offsetWidth,Ye=this._container.offsetHeight,lt=function(Ft){var Gt,Jt,it,Rt;return Ft?{top:(Gt=Ft.top)!==null&&Gt!==void 0?Gt:0,right:(Jt=Ft.right)!==null&&Jt!==void 0?Jt:0,bottom:(it=Ft.bottom)!==null&&it!==void 0?it:0,left:(Rt=Ft.left)!==null&&Rt!==void 0?Rt:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding),ct;ct=ie.y+_e.bottom.ythis._map.transform.height-Ye-lt.bottom?["bottom"]:[],ie.xthis._map.transform.width-Ne/2-lt.right&&ct.push("right"),ce=ct.length===0?"bottom":ct.join("-")}let De=ie.add(_e[ce]);this.options.subpixelPositioning||(De=De.round()),this._container.style.transform=`${rn[ce]} translate(${De.x}px,${De.y}px)`,pn(this._container,ce,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(di),de)}addTo(de){return this._map&&this.remove(),this._map=de,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(de){return this._lngLat=e.W.convert(de),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(de){return this.setDOMContent(document.createTextNode(de))}setHTML(de){let y=document.createDocumentFragment(),O=document.createElement("body"),ie;for(O.innerHTML=de;ie=O.firstChild,ie;)y.appendChild(ie);return this.setDOMContent(y)}getMaxWidth(){var de;return(de=this._container)===null||de===void 0?void 0:de.style.maxWidth}setMaxWidth(de){return this.options.maxWidth=de,this._update(),this}setDOMContent(de){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=g.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(de),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(de){return this._container&&this._container.classList.add(de),this}removeClassName(de){return this._container&&this._container.classList.remove(de),this}setOffset(de){return this.options.offset=de,this._update(),this}toggleClassName(de){if(this._container)return this._container.classList.toggle(de)}setSubpixelPositioning(de){this.options.subpixelPositioning=de}setPadding(de){this.options.padding=de,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=g.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let de=this._container.querySelector(Oi);de&&de.focus()}},l.RasterDEMTileSource=fe,l.RasterTileSource=ne,l.ScaleControl=class{constructor(de){this._onMove=()=>{Oa(this._map,this._container,this.options)},this.setUnit=y=>{this.options.unit=y,Oa(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},Ea),de)}getDefaultPosition(){return"bottom-left"}onAdd(de){return this._map=de,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-scale",de.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=Po,l.Style=Uu,l.TerrainControl=class{constructor(de){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=de}onAdd(de){return this._map=de,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=g.create("button","maplibregl-ctrl-terrain",this._container),g.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Yi,l.TwoFingersTouchRotateHandler=Na,l.TwoFingersTouchZoomHandler=Zn,l.TwoFingersTouchZoomRotateHandler=Li,l.VectorTileSource=ee,l.VideoSource=ge,l.addSourceType=(de,y)=>e._(void 0,void 0,void 0,function*(){if(se(de))throw new Error(`A source type called "${de}" already exists.`);((O,ie)=>{ve[O]=ie})(de,y)}),l.clearPrewarmedResources=function(){let de=Z;de&&(de.isPreloaded()&&de.numActive()===1?(de.release(P),Z=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},l.createTileMesh=Is,l.getGlobalDispatcher=oe,l.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Ge().getRTLTextPluginStatus()},l.getVersion=function(){return ko},l.getWorkerCount=function(){return j.workerCount},l.getWorkerUrl=function(){return e.c.WORKER_URL},l.importScriptInWorkers=function(de){return oe().broadcast("IS",de)},l.isTimeFrozen=function(){return c.isFrozen()},l.now=m,l.prewarm=function(){re().acquire(P)},l.restoreNow=function(){c.restoreNow()},l.setMaxParallelImageRequests=function(de){e.c.MAX_PARALLEL_IMAGE_REQUESTS=de},l.setNow=function(de){c.setNow(de)},l.setRTLTextPlugin=function(de,y){return Ge().setRTLTextPlugin(de,y)},l.setWorkerCount=function(de){j.workerCount=de},l.setWorkerUrl=function(de){e.c.WORKER_URL=de}});var k=v;return k})}}),EL=Ee({"src/plots/map/layers.js"(J,V){"use strict";var v=Vr(),x=Fs().sanitizeHTML,E=c5(),k=cv();function l(n,o){this.subplot=n,this.uid=n.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=k.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=t(o)},e.needsNewImage=function(n){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},e.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},e.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(n){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(n){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!t(n)){var s=r(n);o.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(n){if(n==="traces")for(var o=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function a(n){var o={},s={};switch(n.type){case"circle":v.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":v.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":v.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var c=n.symbol,m=E(c.textposition,c.iconsize);v.extendFlat(o,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":m.anchor,"text-offset":m.offset,"symbol-placement":c.placement}),v.extendFlat(s,{"icon-color":n.color,"text-color":c.textfont.color,"text-opacity":n.opacity});break;case"raster":v.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:o,paint:s}}function r(n){var o=n.sourcetype,s=n.source,c={type:o},m;return o==="geojson"?m="data":o==="vector"?m=typeof s=="string"?"url":"tiles":o==="raster"?(m="tiles",c.tileSize=256):o==="image"&&(m="url",c.coordinates=n.coordinates),c[m]=s,n.sourceattribution&&(c.attribution=x(n.sourceattribution)),c}V.exports=function(o,s,c){var m=new l(o,s);return m.update(c),m}}}),kL=Ee({"src/plots/map/map.js"(J,V){"use strict";var v=SL(),x=Vr(),E=Md(),k=Ri(),l=uo(),e=qf(),t=$l(),a=Gh(),r=a.drawMode,n=a.selectMode,o=uc().prepSelect,s=uc().clearOutline,c=uc().clearSelectionsCache,m=uc().selectOnClick,h=cv(),p=EL();function g(T,f){this.id=f,this.gd=T;var u=T._fullLayout,A=T._context;this.container=u._glcontainer.node(),this.isStatic=A.staticPlot,this.uid=u._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(u),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var i=g.prototype;i.plot=function(T,f,u){var A=this,b;A.map?b=new Promise(function(z,I){A.updateMap(T,f,z,I)}):b=new Promise(function(z,I){A.createMap(T,f,z,I)}),u.push(b)},i.createMap=function(T,f,u,A){var b=this,z=f[b.id],I=b.styleObj=C(z.style),N=z.bounds,R=N?[[N.west,N.south],[N.east,N.north]]:null;let B={container:b.div,style:I.style,center:_(z.center),zoom:z.zoom,bearing:z.bearing,pitch:z.pitch,maxBounds:R,interactive:!b.isStatic,canvasContextAttributes:{preserveDrawingBuffer:b.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},F=z._fitBounds;F&&(B.bounds=[[F.west,F.south],[F.east,F.north]],B.fitBoundsOptions={padding:h.fitBoundsPadding});let P=b.map=new v.Map(B).addControl(new v.AttributionControl({compact:!0}));var j={};P.on("styleimagemissing",function(Z){var Q=Z.id;if(!j[Q]&&/^[a-zA-Z0-9-]+$/.test(Q)){j[Q]=!0;var re=new Image(15,15);re.onload=function(){P.addImage(Q,re,{sdf:!0})},re.crossOrigin="Anonymous",re.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Q+".svg"}}),P.setTransformRequest(function(Z){return Z=Z.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),Z=Z.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),Z=Z.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:Z}}),P._canvas.style.left="0px",P._canvas.style.top="0px",b.rejectOnError(A),b.isStatic||b.initFx(T,f);var U=[];U.push(new Promise(function(Z){P.once("load",Z)})),U=U.concat(E.fetchTraceGeoData(T)),Promise.all(U).then(function(){F&&w(b,z),S(b,z),b.fillBelowLookup(T,f),b.updateData(T),b.updateLayout(f),b.resolveOnRender(u)}).catch(A)},i.updateMap=function(T,f,u,A){var b=this,z=b.map,I=f[this.id];b.rejectOnError(A);var N=[],R=C(I.style);JSON.stringify(b.styleObj)!==JSON.stringify(R)&&(b.styleObj=R,z.setStyle(R.style),b.traceHash={},N.push(new Promise(function(B){z.once("styledata",B)}))),N=N.concat(E.fetchTraceGeoData(T)),Promise.all(N).then(function(){b.fillBelowLookup(T,f),b.updateData(T);let B=I._fitBounds;B&&(z.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:h.fitBoundsPadding,animate:!1}),w(b,I),S(b,I)),b.updateLayout(f),b.resolveOnRender(u)}).catch(A)};function w(T,f){let{center:u,zoom:A}=T.getView();f._input.center=f.center=u,f._input.zoom=f.zoom=A,f._input._fitView={center:Nr({},u),zoom:A}}function S(T,f){let u=T.getView();T.viewInitial={center:x.extendFlat({},u.center),bearing:f.bearing,pitch:f.pitch,zoom:u.zoom}}i.fillBelowLookup=function(T,f){var u=f[this.id],A=u.layers,b,z,I=this.belowLookup={},N=!1;for(b=0;b1)for(b=0;bf.project(A).x,_subplot:f},f.yaxis={_id:"y",c2p:A=>f.project(A).y,_subplot:f},f.updateFramework(T),f.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(f.mockAxis,T)},i.initFx=function(T,f){var u=this,A=u.gd,b=u.map;b.on("moveend",function(N){if(u.map){var R=A._fullLayout;if(N.originalEvent||u.wheeling){var B=R[u.id];k.call("_storeDirectGUIEdit",A.layout,R._preGUI,u.getViewEdits(B));var F=u.getView();B._input.center=B.center=F.center,B._input.zoom=B.zoom=F.zoom,B._input.bearing=B.bearing=F.bearing,B._input.pitch=B.pitch=F.pitch,A.emit("plotly_relayout",u.getViewEditsWithDerived(F))}N.originalEvent&&N.originalEvent.type==="mouseup"?u.dragging=!1:u.wheeling&&(u.wheeling=!1),R&&R._rehover&&R._rehover()}}),b.on("wheel",function(){u.wheeling=!0}),b.on("mousemove",function(N){var R=u.div.getBoundingClientRect(),B=[N.originalEvent.offsetX,N.originalEvent.offsetY];N.target.getBoundingClientRect=function(){return R},u.xaxis.p2c=function(){return b.unproject(B).lng},u.yaxis.p2c=function(){return b.unproject(B).lat},A._fullLayout._rehover=function(){A._fullLayout._hoversubplot===u.id&&A._fullLayout[u.id]&&t.hover(A,N,u.id)},t.hover(A,N,u.id),A._fullLayout._hoversubplot=u.id});function z(){t.loneUnhover(f._hoverlayer)}b.on("dragstart",function(){u.dragging=!0,z()}),b.on("zoomstart",z),b.on("mouseout",function(){A._fullLayout._hoversubplot=null});function I(){var N=u.getView();A.emit("plotly_relayouting",u.getViewEditsWithDerived(N))}b.on("drag",I),b.on("zoom",I),b.on("dblclick",function(){var N=A._fullLayout[u.id];k.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,u.getViewEdits(N));var R=u.viewInitial;b.setCenter(_(R.center)),b.setZoom(R.zoom),b.setBearing(R.bearing),b.setPitch(R.pitch);var B=u.getView();N._input.center=N.center=B.center,N._input.zoom=N.zoom=B.zoom,N._input.bearing=N.bearing=B.bearing,N._input.pitch=N.pitch=B.pitch,A.emit("plotly_doubleclick",null),A.emit("plotly_relayout",u.getViewEditsWithDerived(B))}),u.clearOutline=function(){c(u.dragOptions),s(u.dragOptions.gd)},u.onClickInPanFn=function(N){return function(R){var B=A._fullLayout.clickmode;B.indexOf("select")>-1&&m(R.originalEvent,A,[u.xaxis],[u.yaxis],u.id,N),B.indexOf("event")>-1&&t.click(A,R.originalEvent)}}},i.updateFx=function(T){var f=this,u=f.map,A=f.gd;if(f.isStatic)return;function b(R){var B=f.map.unproject(R);return[B.lng,B.lat]}var z=T.dragmode,I;I=function(R,B){if(B.isRect){var F=R.range={};F[f.id]=[b([B.xmin,B.ymin]),b([B.xmax,B.ymax])]}else{var P=R.lassoPoints={};P[f.id]=B.map(b)}};var N=f.dragOptions;f.dragOptions=x.extendDeep(N||{},{dragmode:T.dragmode,element:f.div,gd:A,plotinfo:{id:f.id,domain:T[f.id].domain,xaxis:f.xaxis,yaxis:f.yaxis,fillRangeItems:I},xaxes:[f.xaxis],yaxes:[f.yaxis],subplot:f.id}),u.off("click",f.onClickInPanHandler),n(z)||r(z)?(u.dragPan.disable(),u.on("zoomstart",f.clearOutline),f.dragOptions.prepFn=function(R,B,F){o(R,B,F,f.dragOptions,z)},e.init(f.dragOptions)):(u.dragPan.enable(),u.off("zoomstart",f.clearOutline),f.div.onmousedown=null,f.div.ontouchstart=null,f.div.removeEventListener("touchstart",f.div._ontouchstart),f.onClickInPanHandler=f.onClickInPanFn(f.dragOptions),u.on("click",f.onClickInPanHandler))},i.updateFramework=function(T){var f=T[this.id].domain,u=T._size,A=this.div.style;A.width=u.w*(f.x[1]-f.x[0])+"px",A.height=u.h*(f.y[1]-f.y[0])+"px",A.left=u.l+f.x[0]*u.w+"px",A.top=u.t+(1-f.y[1])*u.h+"px",this.xaxis._offset=u.l+f.x[0]*u.w,this.xaxis._length=u.w*(f.x[1]-f.x[0]),this.yaxis._offset=u.t+(1-f.y[1])*u.h,this.yaxis._length=u.h*(f.y[1]-f.y[0])},i.updateLayers=function(T){var f=T[this.id],u=f.layers,A=this.layerList,b;if(u.length!==A.length){for(b=0;bCL});function CL(J,V){let v=[];for(let t of J){if(t.subplot!==V||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:a,lon:r}=t;if(!r||!a)continue;let n=Math.min(r.length,a.length);for(let o=0;of/2){var u=M.split("|").join("
");_.text(u).attr("data-unformatted",u).call(t.convertToTspans,n),T=e.bBox(_.node())}_.attr("transform",v(-3,-T.height+8)),C.insert("rect",".static-attribution").attr({x:-T.width-6,y:-T.height-3,width:T.width+6,height:T.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;T.width+6>f&&(A=f/(T.width+6));var b=[c.l+c.w*p.x[1],c.t+c.h*(1-p.y[0])];C.attr("transform",v(b[0],b[1])+x(A))}},J.updateFx=function(n){for(var o=n._fullLayout,s=o._subplots[r],c=0;c=0;a--)e.removeLayer(t[a][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,a){var r=a[0].trace,n=new k(t,r.uid),o=n.sourceId,s=v(a),c=n.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),n._addLayers(s,c),a[0].trace._glTrace=n,n}}}),zL=Ee({"src/traces/choroplethmap/index.js"(J,V){"use strict";V.exports={attributes:d5(),supplyDefaults:RL(),colorbar:Xp(),calc:pw(),plot:FL(),hoverPoints:mw(),eventData:gw(),selectPoints:yw(),styleOnSelect:function(v,x){if(x){var E=x[0].trace;E._glTrace.updateOnSelect(x)}},getBelow:function(v,x){for(var E=x.getMapLayers(),k=E.length-2;k>=0;k--){var l=E[k].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=k+1;e0?+p[m]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:M})}}var _=k.extractOpts(r),T=_.reversescale?k.flipScale(_.colorscale):_.colorscale,f=T[0][1],u=E.opacity(f)<1?f:E.addOpacity(f,0),A=["interpolate",["linear"],["heatmap-density"],0,u];for(m=1;m=0;t--)l.removeLayer(e[t][1])},k.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},V.exports=function(e,t){var a=t[0].trace,r=new E(e,a.uid),n=r.sourceId,o=v(t),s=r.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(n,{type:"geojson",data:o.geojson}),r._addLayers(o,s),r}}}),qL=Ee({"src/traces/densitymap/hover.js"(J,V){"use strict";var v=uo(),x=Wy().hoverPoints,E=Wy().getExtraText;V.exports=function(l,e,t){var a=x(l,e,t);if(a){var r=a[0],n=r.cd,o=n[0].trace,s=n[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=v.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=E(o,s,n[0].t.labels),[r]}}}}),VL=Ee({"src/traces/densitymap/event_data.js"(J,V){"use strict";V.exports=function(x,E){return x.lon=E.lon,x.lat=E.lat,x.z=E.z,x}}}),HL=Ee({"src/traces/densitymap/index.js"(J,V){"use strict";V.exports={attributes:p5(),supplyDefaults:NL(),colorbar:Xp(),formatLabels:u5(),calc:OL(),plot:UL(),hoverPoints:qL(),eventData:VL(),getBelow:function(v,x){for(var E=x.getMapLayers(),k=0;kw[z%w.length];i("color",g.label.map((z,I)=>E.addOpacity(S(I),.8))),i("customdata");var M=n.link||{},C=e.newContainer(o,"link");function _(z,I){return v.coerce(M,C,x.link,z,I)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",n.hoverinfo),l(M,C,_,h),_("hovertemplate"),_("sort");var T=E.luminosity(c.paper_bgcolor)<.333,f=T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",u=_("color",f);function A(z){if(!E.isValid(z))return z;let I=E.opacity(z);return I<=.8?E.addOpacity(z,I+.2):T?E.brighten(z,10):E.adjustLightness(z,-10)}_("hovercolor",Array.isArray(u)?u.map(A):A(u)),_("customdata"),t(M,C,{name:"colorscales",handleItemDefaults:a}),k(o,c,m),m("orientation"),m("direction"),m("valueformat"),m("valuesuffix");let b=g.x.length&&g.y.length?"freeform":void 0;m("arrangement",b),v.coerceFont(m,"textfont",c.font,{autoShadowDflt:!0}),o._length=null};function a(r,n){function o(s,c){return v.coerce(r,n,x.link.colorscales,s,c)}o("label"),o("cmin"),o("cmax"),o("colorscale")}}}),g5=Ee({"node_modules/strongly-connected-components/scc.js"(J,V){"use strict";V.exports=v;function v(x){for(var E=x.length,k=new Array(E),l=new Array(E),e=new Array(E),t=new Array(E),a=new Array(E),r=new Array(E),n=0;n0;){i=S[S.length-1];var M=x[i];if(t[i]=0&&r[i].push(a[_])}t[i]=C}else{if(l[i]===k[i]){for(var T=[],f=[],u=0,C=w.length-1;C>=0;--C){var A=w[C];if(e[A]=!1,T.push(A),f.push(r[A]),u+=r[A].length,a[A]=s.length,A===i){w.length=C;break}}s.push(T);for(var b=new Array(u),C=0;C_&&(_=o.source[w]),o.target[w]>_&&(_=o.target[w]);var T=_+1;r.node._count=T;var f,u=r.node.groups,A={};for(w=0;w0&&l(B,T)&&l(F,T)&&!(A.hasOwnProperty(B)&&A.hasOwnProperty(F)&&A[B]===A[F])){A.hasOwnProperty(F)&&(F=A[F]),A.hasOwnProperty(B)&&(B=A[B]),B=+B,F=+F,p[B]=p[F]=!0;var P="";o.label&&o.label[w]&&(P=o.label[w]);var j=null;P&&g.hasOwnProperty(P)&&(j=g[P]),s.push({pointNumber:w,label:P,color:c?o.color[w]:o.color,hovercolor:m?o.hovercolor[w]:o.hovercolor,customdata:h?o.customdata[w]:o.customdata,concentrationscale:j,source:B,target:F,value:+R}),N.source.push(B),N.target.push(F)}}var U=T+u.length,Z=k(n.color),Q=k(n.customdata),re=[];for(w=0;wT-1,childrenNodes:[],pointNumber:w,label:ae,color:Z?n.color[w]:n.color,customdata:Q?n.customdata[w]:n.customdata})}var oe=!1;return a(U,N.source,N.target)&&(oe=!0),{circular:oe,links:s,nodes:re,groups:u,groupLookup:A}}function a(r,n,o){for(var s=x.init2dArray(r,0),c=0;c1})}V.exports=function(n,o){var s=t(o);return E({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),XL=Ee({"node_modules/d3-quadtree/dist/d3-quadtree.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J):(v=v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";function x(T){var f=+this._x.call(null,T),u=+this._y.call(null,T);return E(this.cover(f,u),f,u,T)}function E(T,f,u,A){if(isNaN(f)||isNaN(u))return T;var b,z=T._root,I={data:A},N=T._x0,R=T._y0,B=T._x1,F=T._y1,P,j,U,Z,Q,re,ae,oe;if(!z)return T._root=I,T;for(;z.length;)if((Q=f>=(P=(N+B)/2))?N=P:B=P,(re=u>=(j=(R+F)/2))?R=j:F=j,b=z,!(z=z[ae=re<<1|Q]))return b[ae]=I,T;if(U=+T._x.call(null,z.data),Z=+T._y.call(null,z.data),f===U&&u===Z)return I.next=z,b?b[ae]=I:T._root=I,T;do b=b?b[ae]=new Array(4):T._root=new Array(4),(Q=f>=(P=(N+B)/2))?N=P:B=P,(re=u>=(j=(R+F)/2))?R=j:F=j;while((ae=re<<1|Q)===(oe=(Z>=j)<<1|U>=P));return b[oe]=z,b[ae]=I,T}function k(T){var f,u,A=T.length,b,z,I=new Array(A),N=new Array(A),R=1/0,B=1/0,F=-1/0,P=-1/0;for(u=0;uF&&(F=b),zP&&(P=z));if(R>F||B>P)return this;for(this.cover(R,B).cover(F,P),u=0;uT||T>=b||A>f||f>=z;)switch(B=(fF||(N=Z.y0)>P||(R=Z.x1)=ae)<<1|T>=re)&&(Z=j[j.length-1],j[j.length-1]=j[j.length-1-Q],j[j.length-1-Q]=Z)}else{var oe=T-+this._x.call(null,U.data),H=f-+this._y.call(null,U.data),X=oe*oe+H*H;if(X=(j=(I+R)/2))?I=j:R=j,(Q=P>=(U=(N+B)/2))?N=U:B=U,f=u,!(u=u[re=Q<<1|Z]))return this;if(!u.length)break;(f[re+1&3]||f[re+2&3]||f[re+3&3])&&(A=f,ae=re)}for(;u.data!==T;)if(b=u,!(u=u.next))return this;return(z=u.next)&&delete u.next,b?(z?b.next=z:delete b.next,this):f?(z?f[re]=z:delete f[re],(u=f[0]||f[1]||f[2]||f[3])&&u===(f[3]||f[2]||f[1]||f[0])&&!u.length&&(A?A[ae]=u:this._root=u),this):(this._root=z,this)}function o(T){for(var f=0,u=T.length;f=p.length)return i!=null&&_.sort(i),w!=null?w(_):_;for(var A=-1,b=_.length,z=p[T++],I,N,R=k(),B,F=f();++Ap.length)return _;var f,u=g[T-1];return w!=null&&T>=p.length?f=_.entries():(f=[],_.each(function(A,b){f.push({key:b,values:C(A,T)})})),u!=null?f.sort(function(A,b){return u(A.key,b.key)}):f}return S={object:function(_){return M(_,0,e,t)},map:function(_){return M(_,0,a,r)},entries:function(_){return C(M(_,0,a,r),0)},key:function(_){return p.push(_),S},sortKeys:function(_){return g[p.length-1]=_,S},sortValues:function(_){return i=_,S},rollup:function(_){return w=_,S}}}function e(){return{}}function t(p,g,i){p[g]=i}function a(){return k()}function r(p,g,i){p.set(g,i)}function n(){}var o=k.prototype;n.prototype=s.prototype={constructor:n,has:o.has,add:function(p){return p+="",this[x+p]=p,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function s(p,g){var i=new n;if(p instanceof n)p.each(function(M){i.add(M)});else if(p){var w=-1,S=p.length;if(g==null)for(;++w=0&&(o=n.slice(s+1),n=n.slice(0,s)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:o}})}k.prototype=E.prototype={constructor:k,on:function(a,r){var n=this._,o=l(a+"",n),s,c=-1,m=o.length;if(arguments.length<2){for(;++c0)for(var n=new Array(s),o=0,s,c;o=0&&T._call.call(null,f),T=T._next;--x}function i(){r=(a=o.now())+n,x=E=0;try{g()}finally{x=0,S(),r=0}}function w(){var T=o.now(),f=T-a;f>l&&(n-=f,a=T)}function S(){for(var T,f=e,u,A=1/0;f;)f._call?(A>f._time&&(A=f._time),T=f,f=f._next):(u=f._next,f._next=null,f=T?T._next=u:e=u);t=T,M(A)}function M(T){if(!x){E&&(E=clearTimeout(E));var f=T-r;f>24?(T<1/0&&(E=setTimeout(i,T-o.now()-n)),k&&(k=clearInterval(k))):(k||(a=o.now(),k=setInterval(w,l)),x=1,s(i))}}function C(T,f,u){var A=new h;return f=f==null?0:+f,A.restart(function(b){A.stop(),T(b+f)},f,u),A}function _(T,f,u){var A=new h,b=f;return f==null?(A.restart(T,f,u),A):(f=+f,u=u==null?c():+u,A.restart(function z(I){I+=b,A.restart(z,b+=f,u),T(I)},f,u),A)}v.interval=_,v.now=c,v.timeout=C,v.timer=p,v.timerFlush=g,Object.defineProperty(v,"__esModule",{value:!0})})}}),KL=Ee({"node_modules/d3-force/dist/d3-force.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J,XL(),y5(),$L(),ZL()):x(v.d3=v.d3||{},v.d3,v.d3,v.d3,v.d3)})(J,function(v,x,E,k,l){"use strict";function e(T,f){var u;T==null&&(T=0),f==null&&(f=0);function A(){var b,z=u.length,I,N=0,R=0;for(b=0;bP.index){var ee=j-Y.x-Y.vx,ne=U-Y.y-Y.vy,fe=ee*ee+ne*ne;fe<$*$&&(ee===0&&(ee=a(),fe+=ee*ee),ne===0&&(ne=a(),fe+=ne*ne),fe=($-(fe=Math.sqrt(fe)))/fe*A,P.vx+=(ee*=fe)*($=(q*=q)/(Q+q)),P.vy+=(ne*=fe)*$,Y.vx-=ee*($=1-$),Y.vy-=ne*$)}return}return H>j+$||KU+$||GR.r&&(R.r=R[B].r)}function N(){if(f){var R,B=f.length,F;for(u=new Array(B),R=0;R1?(Q==null?N.remove(Z):N.set(Z,U(Q)),f):N.get(Z)},find:function(Z,Q,re){var ae=0,oe=T.length,H,X,K,G,Y;for(re==null?re=1/0:re*=re,ae=0;ae1?(B.on(Z,Q),f):B.on(Z)}}}function S(){var T,f,u,A=t(-30),b,z=1,I=1/0,N=.81;function R(j){var U,Z=T.length,Q=x.quadtree(T,h,p).visitAfter(F);for(u=j,U=0;U=I)return;(j.data!==f||j.next)&&(re===0&&(re=a(),H+=re*re),ae===0&&(ae=a(),H+=ae*ae),HIt?1:$t>=It?0:NaN}function E($t){let It=$t,ir=$t;$t.length===1&&(It=(ln,nn)=>$t(ln)-nn,ir=k($t));function cr(ln,nn,wn,Un){for(wn==null&&(wn=0),Un==null&&(Un=ln.length);wn>>1;ir(ln[jn],nn)<0?wn=jn+1:Un=jn}return wn}function fr(ln,nn,wn,Un){for(wn==null&&(wn=0),Un==null&&(Un=ln.length);wn>>1;ir(ln[jn],nn)>0?Un=jn:wn=jn+1}return wn}function Ir(ln,nn,wn,Un){wn==null&&(wn=0),Un==null&&(Un=ln.length);let jn=cr(ln,nn,wn,Un-1);return jn>wn&&It(ln[jn-1],nn)>-It(ln[jn],nn)?jn-1:jn}return{left:cr,center:Ir,right:fr}}function k($t){return(It,ir)=>x($t(It),ir)}function l($t){return $t===null?NaN:+$t}function*e($t,It){if(It===void 0)for(let ir of $t)ir!=null&&(ir=+ir)>=ir&&(yield ir);else{let ir=-1;for(let cr of $t)(cr=It(cr,++ir,$t))!=null&&(cr=+cr)>=cr&&(yield cr)}}let t=E(x),a=t.right,r=t.left,n=E(l).center;function o($t,It){let ir=0;if(It===void 0)for(let cr of $t)cr!=null&&(cr=+cr)>=cr&&++ir;else{let cr=-1;for(let fr of $t)(fr=It(fr,++cr,$t))!=null&&(fr=+fr)>=fr&&++ir}return ir}function s($t){return $t.length|0}function c($t){return!($t>0)}function m($t){return typeof $t!="object"||"length"in $t?$t:Array.from($t)}function h($t){return It=>$t(...It)}function p(...$t){let It=typeof $t[$t.length-1]=="function"&&h($t.pop());$t=$t.map(m);let ir=$t.map(s),cr=$t.length-1,fr=new Array(cr+1).fill(0),Ir=[];if(cr<0||ir.some(c))return Ir;for(;;){Ir.push(fr.map((nn,wn)=>$t[wn][nn]));let ln=cr;for(;++fr[ln]===ir[ln];){if(ln===0)return It?Ir.map(It):Ir;fr[ln--]=0}}}function g($t,It){var ir=0,cr=0;return Float64Array.from($t,It===void 0?fr=>ir+=+fr||0:fr=>ir+=+It(fr,cr++,$t)||0)}function i($t,It){return It<$t?-1:It>$t?1:It>=$t?0:NaN}function w($t,It){let ir=0,cr,fr=0,Ir=0;if(It===void 0)for(let ln of $t)ln!=null&&(ln=+ln)>=ln&&(cr=ln-fr,fr+=cr/++ir,Ir+=cr*(ln-fr));else{let ln=-1;for(let nn of $t)(nn=It(nn,++ln,$t))!=null&&(nn=+nn)>=nn&&(cr=nn-fr,fr+=cr/++ir,Ir+=cr*(nn-fr))}if(ir>1)return Ir/(ir-1)}function S($t,It){let ir=w($t,It);return ir&&Math.sqrt(ir)}function M($t,It){let ir,cr;if(It===void 0)for(let fr of $t)fr!=null&&(ir===void 0?fr>=fr&&(ir=cr=fr):(ir>fr&&(ir=fr),cr=Ir&&(ir=cr=Ir):(ir>Ir&&(ir=Ir),cr0){for(ln=It[--ir];ir>0&&(cr=ln,fr=It[--ir],ln=cr+fr,Ir=fr-(ln-cr),!Ir););ir>0&&(Ir<0&&It[ir-1]<0||Ir>0&&It[ir-1]>0)&&(fr=Ir*2,cr=ln+fr,fr==cr-ln&&(ln=cr))}return ln}}function _($t,It){let ir=new C;if(It===void 0)for(let cr of $t)(cr=+cr)&&ir.add(cr);else{let cr=-1;for(let fr of $t)(fr=+It(fr,++cr,$t))&&ir.add(fr)}return+ir}function T($t,It){let ir=new C,cr=-1;return Float64Array.from($t,It===void 0?fr=>ir.add(+fr||0):fr=>ir.add(+It(fr,++cr,$t)||0))}class f extends Map{constructor(It,ir=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:ir}}),It!=null)for(let[cr,fr]of It)this.set(cr,fr)}get(It){return super.get(A(this,It))}has(It){return super.has(A(this,It))}set(It,ir){return super.set(b(this,It),ir)}delete(It){return super.delete(z(this,It))}}class u extends Set{constructor(It,ir=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:ir}}),It!=null)for(let cr of It)this.add(cr)}has(It){return super.has(A(this,It))}add(It){return super.add(b(this,It))}delete(It){return super.delete(z(this,It))}}function A({_intern:$t,_key:It},ir){let cr=It(ir);return $t.has(cr)?$t.get(cr):ir}function b({_intern:$t,_key:It},ir){let cr=It(ir);return $t.has(cr)?$t.get(cr):($t.set(cr,ir),ir)}function z({_intern:$t,_key:It},ir){let cr=It(ir);return $t.has(cr)&&(ir=$t.get(ir),$t.delete(cr)),ir}function I($t){return $t!==null&&typeof $t=="object"?$t.valueOf():$t}function N($t){return $t}function R($t,...It){return Q($t,N,N,It)}function B($t,...It){return Q($t,Array.from,N,It)}function F($t,It,...ir){return Q($t,N,It,ir)}function P($t,It,...ir){return Q($t,Array.from,It,ir)}function j($t,...It){return Q($t,N,Z,It)}function U($t,...It){return Q($t,Array.from,Z,It)}function Z($t){if($t.length!==1)throw new Error("duplicate key");return $t[0]}function Q($t,It,ir,cr){return function fr(Ir,ln){if(ln>=cr.length)return ir(Ir);let nn=new f,wn=cr[ln++],Un=-1;for(let jn of Ir){let Aa=wn(jn,++Un,Ir),ua=nn.get(Aa);ua?ua.push(jn):nn.set(Aa,[jn])}for(let[jn,Aa]of nn)nn.set(jn,fr(Aa,ln));return It(nn)}($t,0)}function re($t,It){return Array.from(It,ir=>$t[ir])}function ae($t,...It){if(typeof $t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");$t=Array.from($t);let[ir=x]=It;if(ir.length===1||It.length>1){let cr=Uint32Array.from($t,(fr,Ir)=>Ir);return It.length>1?(It=It.map(fr=>$t.map(fr)),cr.sort((fr,Ir)=>{for(let ln of It){let nn=x(ln[fr],ln[Ir]);if(nn)return nn}})):(ir=$t.map(ir),cr.sort((fr,Ir)=>x(ir[fr],ir[Ir]))),re($t,cr)}return $t.sort(ir)}function oe($t,It,ir){return(It.length===1?ae(F($t,It,ir),([cr,fr],[Ir,ln])=>x(fr,ln)||x(cr,Ir)):ae(R($t,ir),([cr,fr],[Ir,ln])=>It(fr,ln)||x(cr,Ir))).map(([cr])=>cr)}var H=Array.prototype,X=H.slice;function K($t){return function(){return $t}}var G=Math.sqrt(50),Y=Math.sqrt(10),q=Math.sqrt(2);function $($t,It,ir){var cr,fr=-1,Ir,ln,nn;if(It=+It,$t=+$t,ir=+ir,$t===It&&ir>0)return[$t];if((cr=It<$t)&&(Ir=$t,$t=It,It=Ir),(nn=ee($t,It,ir))===0||!isFinite(nn))return[];if(nn>0){let wn=Math.round($t/nn),Un=Math.round(It/nn);for(wn*nn<$t&&++wn,Un*nn>It&&--Un,ln=new Array(Ir=Un-wn+1);++frIt&&--Un,ln=new Array(Ir=Un-wn+1);++fr=0?(Ir>=G?10:Ir>=Y?5:Ir>=q?2:1)*Math.pow(10,fr):-Math.pow(10,-fr)/(Ir>=G?10:Ir>=Y?5:Ir>=q?2:1)}function ne($t,It,ir){var cr=Math.abs(It-$t)/Math.max(0,ir),fr=Math.pow(10,Math.floor(Math.log(cr)/Math.LN10)),Ir=cr/fr;return Ir>=G?fr*=10:Ir>=Y?fr*=5:Ir>=q&&(fr*=2),It<$t?-fr:fr}function fe($t,It,ir){let cr;for(;;){let fr=ee($t,It,ir);if(fr===cr||fr===0||!isFinite(fr))return[$t,It];fr>0?($t=Math.floor($t/fr)*fr,It=Math.ceil(It/fr)*fr):fr<0&&($t=Math.ceil($t*fr)/fr,It=Math.floor(It*fr)/fr),cr=fr}}function ye($t){return Math.ceil(Math.log(o($t))/Math.LN2)+1}function xe(){var $t=N,It=M,ir=ye;function cr(fr){Array.isArray(fr)||(fr=Array.from(fr));var Ir,ln=fr.length,nn,wn=new Array(ln);for(Ir=0;Ir=Aa)if(ai>=Aa&&It===M){let ci=ee(jn,Aa,Mi);isFinite(ci)&&(ci>0?Aa=(Math.floor(Aa/ci)+1)*ci:ci<0&&(Aa=(Math.ceil(Aa*-ci)+1)/-ci))}else ua.pop()}for(var Qn=ua.length;ua[0]<=jn;)ua.shift(),--Qn;for(;ua[Qn-1]>Aa;)ua.pop(),--Qn;var ei=new Array(Qn+1),Fa;for(Ir=0;Ir<=Qn;++Ir)Fa=ei[Ir]=[],Fa.x0=Ir>0?ua[Ir-1]:jn,Fa.x1=Ir=cr)&&(ir=cr);else{let cr=-1;for(let fr of $t)(fr=It(fr,++cr,$t))!=null&&(ir=fr)&&(ir=fr)}return ir}function Me($t,It){let ir;if(It===void 0)for(let cr of $t)cr!=null&&(ir>cr||ir===void 0&&cr>=cr)&&(ir=cr);else{let cr=-1;for(let fr of $t)(fr=It(fr,++cr,$t))!=null&&(ir>fr||ir===void 0&&fr>=fr)&&(ir=fr)}return ir}function Ie($t,It,ir=0,cr=$t.length-1,fr=x){for(;cr>ir;){if(cr-ir>600){let wn=cr-ir+1,Un=It-ir+1,jn=Math.log(wn),Aa=.5*Math.exp(2*jn/3),ua=.5*Math.sqrt(jn*Aa*(wn-Aa)/wn)*(Un-wn/2<0?-1:1),Qn=Math.max(ir,Math.floor(It-Un*Aa/wn+ua)),ei=Math.min(cr,Math.floor(It+(wn-Un)*Aa/wn+ua));Ie($t,It,Qn,ei,fr)}let Ir=$t[It],ln=ir,nn=cr;for(Ue($t,ir,It),fr($t[cr],Ir)>0&&Ue($t,ir,cr);ln0;)--nn}fr($t[ir],Ir)===0?Ue($t,ir,nn):(++nn,Ue($t,nn,cr)),nn<=It&&(ir=nn+1),It<=nn&&(cr=nn-1)}return $t}function Ue($t,It,ir){let cr=$t[It];$t[It]=$t[ir],$t[ir]=cr}function qe($t,It,ir){if($t=Float64Array.from(e($t,ir)),!!(cr=$t.length)){if((It=+It)<=0||cr<2)return Me($t);if(It>=1)return Ae($t);var cr,fr=(cr-1)*It,Ir=Math.floor(fr),ln=Ae(Ie($t,Ir).subarray(0,Ir+1)),nn=Me($t.subarray(Ir+1));return ln+(nn-ln)*(fr-Ir)}}function ke($t,It,ir=l){if(cr=$t.length){if((It=+It)<=0||cr<2)return+ir($t[0],0,$t);if(It>=1)return+ir($t[cr-1],cr-1,$t);var cr,fr=(cr-1)*It,Ir=Math.floor(fr),ln=+ir($t[Ir],Ir,$t),nn=+ir($t[Ir+1],Ir+1,$t);return ln+(nn-ln)*(fr-Ir)}}function ge($t,It,ir){return Math.ceil((ir-It)/(2*(qe($t,.75)-qe($t,.25))*Math.pow(o($t),-1/3)))}function ue($t,It,ir){return Math.ceil((ir-It)/(3.5*S($t)*Math.pow(o($t),-1/3)))}function ve($t,It){let ir,cr=-1,fr=-1;if(It===void 0)for(let Ir of $t)++fr,Ir!=null&&(ir=Ir)&&(ir=Ir,cr=fr);else for(let Ir of $t)(Ir=It(Ir,++fr,$t))!=null&&(ir=Ir)&&(ir=Ir,cr=fr);return cr}function se($t,It){let ir=0,cr=0;if(It===void 0)for(let fr of $t)fr!=null&&(fr=+fr)>=fr&&(++ir,cr+=fr);else{let fr=-1;for(let Ir of $t)(Ir=It(Ir,++fr,$t))!=null&&(Ir=+Ir)>=Ir&&(++ir,cr+=Ir)}if(ir)return cr/ir}function Te($t,It){return qe($t,.5,It)}function*Fe($t){for(let It of $t)yield*ni(It)}function We($t){return Array.from(Fe($t))}function Ge($t,It){let ir,cr=-1,fr=-1;if(It===void 0)for(let Ir of $t)++fr,Ir!=null&&(ir>Ir||ir===void 0&&Ir>=Ir)&&(ir=Ir,cr=fr);else for(let Ir of $t)(Ir=It(Ir,++fr,$t))!=null&&(ir>Ir||ir===void 0&&Ir>=Ir)&&(ir=Ir,cr=fr);return cr}function gt($t,It=mt){let ir=[],cr,fr=!1;for(let Ir of $t)fr&&ir.push(It(cr,Ir)),cr=Ir,fr=!0;return ir}function mt($t,It){return[$t,It]}function Tt($t,It,ir){$t=+$t,It=+It,ir=(fr=arguments.length)<2?(It=$t,$t=0,1):fr<3?1:+ir;for(var cr=-1,fr=Math.max(0,Math.ceil((It-$t)/ir))|0,Ir=new Array(fr);++cr0:x(ln,ln)===0)&&(ir=Ir,fr=ln,cr=!0)}}else for(let fr of $t)(cr?It(fr,ir)>0:It(fr,fr)===0)&&(ir=fr,cr=!0);return ir}function _r($t,It=x){if(It.length===1)return ve($t,It);let ir,cr=-1,fr=-1;for(let Ir of $t)++fr,(cr<0?It(Ir,Ir)===0:It(Ir,ir)>0)&&(ir=Ir,cr=fr);return cr}function Zt($t,It){let ir=Kt($t,It);return ir<0?void 0:ir}var sr=Ot(Math.random);function Ot($t){return function(ir,cr=0,fr=ir.length){let Ir=fr-(cr=+cr);for(;Ir;){let ln=$t()*Ir--|0,nn=ir[Ir+cr];ir[Ir+cr]=ir[ln+cr],ir[ln+cr]=nn}return ir}}function vt($t,It){let ir=0;if(It===void 0)for(let cr of $t)(cr=+cr)&&(ir+=cr);else{let cr=-1;for(let fr of $t)(fr=+It(fr,++cr,$t))&&(ir+=fr)}return ir}function ht($t){if(!(Ir=$t.length))return[];for(var It=-1,ir=Me($t,Re),cr=new Array(ir);++ItIt(ir,cr,$t))}function Mt($t,It,ir){if(typeof It!="function")throw new TypeError("reducer is not a function");let cr=$t[Symbol.iterator](),fr,Ir,ln=-1;if(arguments.length<3){if({done:fr,value:ir}=cr.next(),fr)return;++ln}for(;{done:fr,value:Ir}=cr.next(),!fr;)ir=It(ir,Ir,++ln,$t);return ir}function dt($t){if(typeof $t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from($t).reverse()}function Dt($t,...It){$t=new Set($t);for(let ir of It)for(let cr of ir)$t.delete(cr);return $t}function Ct($t,It){let ir=It[Symbol.iterator](),cr=new Set;for(let fr of $t){if(cr.has(fr))return!1;let Ir,ln;for(;({value:Ir,done:ln}=ir.next())&&!ln;){if(Object.is(fr,Ir))return!1;cr.add(Ir)}}return!0}function Vt($t){return $t instanceof Set?$t:new Set($t)}function Ht($t,...It){$t=new Set($t),It=It.map(Vt);e:for(let ir of $t)for(let cr of It)if(!cr.has(ir)){$t.delete(ir);continue e}return $t}function Wt($t,It){let ir=$t[Symbol.iterator](),cr=new Set;for(let fr of It){if(cr.has(fr))continue;let Ir,ln;for(;{value:Ir,done:ln}=ir.next();){if(ln)return!1;if(cr.add(Ir),Object.is(fr,Ir))break}}return!0}function Sr($t,It){return Wt(It,$t)}function on(...$t){let It=new Set;for(let ir of $t)for(let cr of ir)It.add(cr);return It}v.Adder=C,v.InternMap=f,v.InternSet=u,v.ascending=x,v.bin=xe,v.bisect=a,v.bisectCenter=n,v.bisectLeft=r,v.bisectRight=a,v.bisector=E,v.count=o,v.cross=p,v.cumsum=g,v.descending=i,v.deviation=S,v.difference=Dt,v.disjoint=Ct,v.every=He,v.extent=M,v.fcumsum=T,v.filter=Ze,v.fsum=_,v.greatest=nr,v.greatestIndex=_r,v.group=R,v.groupSort=oe,v.groups=B,v.histogram=xe,v.index=j,v.indexes=U,v.intersection=Ht,v.least=At,v.leastIndex=Kt,v.map=Je,v.max=Ae,v.maxIndex=ve,v.mean=se,v.median=Te,v.merge=We,v.min=Me,v.minIndex=Ge,v.nice=fe,v.pairs=gt,v.permute=re,v.quantile=qe,v.quantileSorted=ke,v.quickselect=Ie,v.range=Tt,v.reduce=Mt,v.reverse=dt,v.rollup=F,v.rollups=P,v.scan=Zt,v.shuffle=sr,v.shuffler=Ot,v.some=$e,v.sort=ae,v.subset=Sr,v.sum=vt,v.superset=Wt,v.thresholdFreedmanDiaconis=ge,v.thresholdScott=ue,v.thresholdSturges=ye,v.tickIncrement=ee,v.tickStep=ne,v.ticks=$,v.transpose=ht,v.union=on,v.variance=w,v.zip=Be,Object.defineProperty(v,"__esModule",{value:!0})})}}),QL=Ee({"node_modules/d3-path/dist/d3-path.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J):(v=v||self,x(v.d3=v.d3||{}))})(J,function(v){"use strict";var x=Math.PI,E=2*x,k=1e-6,l=E-k;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t(){return new e}e.prototype=t.prototype={constructor:e,moveTo:function(a,r){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(a,r){this._+="L"+(this._x1=+a)+","+(this._y1=+r)},quadraticCurveTo:function(a,r,n,o){this._+="Q"+ +a+","+ +r+","+(this._x1=+n)+","+(this._y1=+o)},bezierCurveTo:function(a,r,n,o,s,c){this._+="C"+ +a+","+ +r+","+ +n+","+ +o+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(a,r,n,o,s){a=+a,r=+r,n=+n,o=+o,s=+s;var c=this._x1,m=this._y1,h=n-a,p=o-r,g=c-a,i=m-r,w=g*g+i*i;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=a)+","+(this._y1=r);else if(w>k)if(!(Math.abs(i*h-p*g)>k)||!s)this._+="L"+(this._x1=a)+","+(this._y1=r);else{var S=n-c,M=o-m,C=h*h+p*p,_=S*S+M*M,T=Math.sqrt(C),f=Math.sqrt(w),u=s*Math.tan((x-Math.acos((C+w-_)/(2*T*f)))/2),A=u/f,b=u/T;Math.abs(A-1)>k&&(this._+="L"+(a+A*g)+","+(r+A*i)),this._+="A"+s+","+s+",0,0,"+ +(i*S>g*M)+","+(this._x1=a+b*h)+","+(this._y1=r+b*p)}},arc:function(a,r,n,o,s,c){a=+a,r=+r,n=+n,c=!!c;var m=n*Math.cos(o),h=n*Math.sin(o),p=a+m,g=r+h,i=1^c,w=c?o-s:s-o;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+p+","+g:(Math.abs(this._x1-p)>k||Math.abs(this._y1-g)>k)&&(this._+="L"+p+","+g),n&&(w<0&&(w=w%E+E),w>l?this._+="A"+n+","+n+",0,1,"+i+","+(a-m)+","+(r-h)+"A"+n+","+n+",0,1,"+i+","+(this._x1=p)+","+(this._y1=g):w>k&&(this._+="A"+n+","+n+",0,"+ +(w>=x)+","+i+","+(this._x1=a+n*Math.cos(s))+","+(this._y1=r+n*Math.sin(s))))},rect:function(a,r,n,o){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+r)+"h"+ +n+"v"+ +o+"h"+-n+"Z"},toString:function(){return this._}},v.path=t,Object.defineProperty(v,"__esModule",{value:!0})})}}),_5=Ee({"node_modules/d3-shape/dist/d3-shape.js"(J,V){(function(v,x){typeof J=="object"&&typeof V<"u"?x(J,QL()):(v=v||self,x(v.d3=v.d3||{},v.d3))})(J,function(v,x){"use strict";function E(at){return function(){return at}}var k=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,a=Math.min,r=Math.sin,n=Math.sqrt,o=1e-12,s=Math.PI,c=s/2,m=2*s;function h(at){return at>1?0:at<-1?s:Math.acos(at)}function p(at){return at>=1?c:at<=-1?-c:Math.asin(at)}function g(at){return at.innerRadius}function i(at){return at.outerRadius}function w(at){return at.startAngle}function S(at){return at.endAngle}function M(at){return at&&at.padAngle}function C(at,kt,Ut,ar,Er,br,Or,Pr){var hn=Ut-at,zn=ar-kt,Pn=Or-Er,Ca=Pr-br,ma=Ca*hn-Pn*zn;if(!(ma*maco*co+Wi*Wi&&(zi=Mo,so=So),{cx:zi,cy:so,x01:-Pn,y01:-Ca,x11:zi*(Er/ti-1),y11:so*(Er/ti-1)}}function T(){var at=g,kt=i,Ut=E(0),ar=null,Er=w,br=S,Or=M,Pr=null;function hn(){var zn,Pn,Ca=+at.apply(this,arguments),ma=+kt.apply(this,arguments),bi=Er.apply(this,arguments)-c,ga=br.apply(this,arguments)-c,eo=k(ga-bi),si=ga>bi;if(Pr||(Pr=zn=x.path()),mao))Pr.moveTo(0,0);else if(eo>m-o)Pr.moveTo(ma*e(bi),ma*r(bi)),Pr.arc(0,0,ma,bi,ga,!si),Ca>o&&(Pr.moveTo(Ca*e(ga),Ca*r(ga)),Pr.arc(0,0,Ca,ga,bi,si));else{var Ao=bi,ro=ga,Sa=bi,Gi=ga,ti=eo,fi=eo,xo=Or.apply(this,arguments)/2,zi=xo>o&&(ar?+ar.apply(this,arguments):n(Ca*Ca+ma*ma)),so=a(k(ma-Ca)/2,+Ut.apply(this,arguments)),Mo=so,So=so,oi,ii;if(zi>o){var co=p(zi/Ca*r(xo)),Wi=p(zi/ma*r(xo));(ti-=co*2)>o?(co*=si?1:-1,Sa+=co,Gi-=co):(ti=0,Sa=Gi=(bi+ga)/2),(fi-=Wi*2)>o?(Wi*=si?1:-1,Ao+=Wi,ro-=Wi):(fi=0,Ao=ro=(bi+ga)/2)}var Ho=ma*e(Ao),Io=ma*r(Ao),qo=Ca*e(Gi),Oo=Ca*r(Gi);if(so>o){var ws=ma*e(ro),Ko=ma*r(ro),ns=Ca*e(Sa),wo=Ca*r(Sa),No;if(eoo?So>o?(oi=_(ns,wo,Ho,Io,ma,So,si),ii=_(ws,Ko,qo,Oo,ma,So,si),Pr.moveTo(oi.cx+oi.x01,oi.cy+oi.y01),Soo)||!(ti>o)?Pr.lineTo(qo,Oo):Mo>o?(oi=_(qo,Oo,ws,Ko,Ca,-Mo,si),ii=_(Ho,Io,ns,wo,Ca,-Mo,si),Pr.lineTo(oi.cx+oi.x01,oi.cy+oi.y01),Mo=ma;--bi)Pr.point(ro[bi],Sa[bi]);Pr.lineEnd(),Pr.areaEnd()}si&&(ro[Ca]=+at(eo,Ca,Pn),Sa[Ca]=+Ut(eo,Ca,Pn),Pr.point(kt?+kt(eo,Ca,Pn):ro[Ca],ar?+ar(eo,Ca,Pn):Sa[Ca]))}if(Ao)return Pr=null,Ao+""||null}function zn(){return z().defined(Er).curve(Or).context(br)}return hn.x=function(Pn){return arguments.length?(at=typeof Pn=="function"?Pn:E(+Pn),kt=null,hn):at},hn.x0=function(Pn){return arguments.length?(at=typeof Pn=="function"?Pn:E(+Pn),hn):at},hn.x1=function(Pn){return arguments.length?(kt=Pn==null?null:typeof Pn=="function"?Pn:E(+Pn),hn):kt},hn.y=function(Pn){return arguments.length?(Ut=typeof Pn=="function"?Pn:E(+Pn),ar=null,hn):Ut},hn.y0=function(Pn){return arguments.length?(Ut=typeof Pn=="function"?Pn:E(+Pn),hn):Ut},hn.y1=function(Pn){return arguments.length?(ar=Pn==null?null:typeof Pn=="function"?Pn:E(+Pn),hn):ar},hn.lineX0=hn.lineY0=function(){return zn().x(at).y(Ut)},hn.lineY1=function(){return zn().x(at).y(ar)},hn.lineX1=function(){return zn().x(kt).y(Ut)},hn.defined=function(Pn){return arguments.length?(Er=typeof Pn=="function"?Pn:E(!!Pn),hn):Er},hn.curve=function(Pn){return arguments.length?(Or=Pn,br!=null&&(Pr=Or(br)),hn):Or},hn.context=function(Pn){return arguments.length?(Pn==null?br=Pr=null:Pr=Or(br=Pn),hn):br},hn}function N(at,kt){return ktat?1:kt>=at?0:NaN}function R(at){return at}function B(){var at=R,kt=N,Ut=null,ar=E(0),Er=E(m),br=E(0);function Or(Pr){var hn,zn=Pr.length,Pn,Ca,ma=0,bi=new Array(zn),ga=new Array(zn),eo=+ar.apply(this,arguments),si=Math.min(m,Math.max(-m,Er.apply(this,arguments)-eo)),Ao,ro=Math.min(Math.abs(si)/zn,br.apply(this,arguments)),Sa=ro*(si<0?-1:1),Gi;for(hn=0;hn0&&(ma+=Gi);for(kt!=null?bi.sort(function(ti,fi){return kt(ga[ti],ga[fi])}):Ut!=null&&bi.sort(function(ti,fi){return Ut(Pr[ti],Pr[fi])}),hn=0,Ca=ma?(si-zn*Sa)/ma:0;hn0?Gi*Ca:0)+Sa,ga[Pn]={data:Pr[Pn],index:hn,value:Gi,startAngle:eo,endAngle:Ao,padAngle:ro};return ga}return Or.value=function(Pr){return arguments.length?(at=typeof Pr=="function"?Pr:E(+Pr),Or):at},Or.sortValues=function(Pr){return arguments.length?(kt=Pr,Ut=null,Or):kt},Or.sort=function(Pr){return arguments.length?(Ut=Pr,kt=null,Or):Ut},Or.startAngle=function(Pr){return arguments.length?(ar=typeof Pr=="function"?Pr:E(+Pr),Or):ar},Or.endAngle=function(Pr){return arguments.length?(Er=typeof Pr=="function"?Pr:E(+Pr),Or):Er},Or.padAngle=function(Pr){return arguments.length?(br=typeof Pr=="function"?Pr:E(+Pr),Or):br},Or}var F=j(u);function P(at){this._curve=at}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(at,kt){this._curve.point(kt*Math.sin(at),kt*-Math.cos(at))}};function j(at){function kt(Ut){return new P(at(Ut))}return kt._curve=at,kt}function U(at){var kt=at.curve;return at.angle=at.x,delete at.x,at.radius=at.y,delete at.y,at.curve=function(Ut){return arguments.length?kt(j(Ut)):kt()._curve},at}function Z(){return U(z().curve(F))}function Q(){var at=I().curve(F),kt=at.curve,Ut=at.lineX0,ar=at.lineX1,Er=at.lineY0,br=at.lineY1;return at.angle=at.x,delete at.x,at.startAngle=at.x0,delete at.x0,at.endAngle=at.x1,delete at.x1,at.radius=at.y,delete at.y,at.innerRadius=at.y0,delete at.y0,at.outerRadius=at.y1,delete at.y1,at.lineStartAngle=function(){return U(Ut())},delete at.lineX0,at.lineEndAngle=function(){return U(ar())},delete at.lineX1,at.lineInnerRadius=function(){return U(Er())},delete at.lineY0,at.lineOuterRadius=function(){return U(br())},delete at.lineY1,at.curve=function(Or){return arguments.length?kt(j(Or)):kt()._curve},at}function re(at,kt){return[(kt=+kt)*Math.cos(at-=Math.PI/2),kt*Math.sin(at)]}var ae=Array.prototype.slice;function oe(at){return at.source}function H(at){return at.target}function X(at){var kt=oe,Ut=H,ar=A,Er=b,br=null;function Or(){var Pr,hn=ae.call(arguments),zn=kt.apply(this,hn),Pn=Ut.apply(this,hn);if(br||(br=Pr=x.path()),at(br,+ar.apply(this,(hn[0]=zn,hn)),+Er.apply(this,hn),+ar.apply(this,(hn[0]=Pn,hn)),+Er.apply(this,hn)),Pr)return br=null,Pr+""||null}return Or.source=function(Pr){return arguments.length?(kt=Pr,Or):kt},Or.target=function(Pr){return arguments.length?(Ut=Pr,Or):Ut},Or.x=function(Pr){return arguments.length?(ar=typeof Pr=="function"?Pr:E(+Pr),Or):ar},Or.y=function(Pr){return arguments.length?(Er=typeof Pr=="function"?Pr:E(+Pr),Or):Er},Or.context=function(Pr){return arguments.length?(br=Pr??null,Or):br},Or}function K(at,kt,Ut,ar,Er){at.moveTo(kt,Ut),at.bezierCurveTo(kt=(kt+ar)/2,Ut,kt,Er,ar,Er)}function G(at,kt,Ut,ar,Er){at.moveTo(kt,Ut),at.bezierCurveTo(kt,Ut=(Ut+Er)/2,ar,Ut,ar,Er)}function Y(at,kt,Ut,ar,Er){var br=re(kt,Ut),Or=re(kt,Ut=(Ut+Er)/2),Pr=re(ar,Ut),hn=re(ar,Er);at.moveTo(br[0],br[1]),at.bezierCurveTo(Or[0],Or[1],Pr[0],Pr[1],hn[0],hn[1])}function q(){return X(K)}function $(){return X(G)}function ee(){var at=X(Y);return at.angle=at.x,delete at.x,at.radius=at.y,delete at.y,at}var ne={draw:function(at,kt){var Ut=Math.sqrt(kt/s);at.moveTo(Ut,0),at.arc(0,0,Ut,0,m)}},fe={draw:function(at,kt){var Ut=Math.sqrt(kt/5)/2;at.moveTo(-3*Ut,-Ut),at.lineTo(-Ut,-Ut),at.lineTo(-Ut,-3*Ut),at.lineTo(Ut,-3*Ut),at.lineTo(Ut,-Ut),at.lineTo(3*Ut,-Ut),at.lineTo(3*Ut,Ut),at.lineTo(Ut,Ut),at.lineTo(Ut,3*Ut),at.lineTo(-Ut,3*Ut),at.lineTo(-Ut,Ut),at.lineTo(-3*Ut,Ut),at.closePath()}},ye=Math.sqrt(1/3),xe=ye*2,Ae={draw:function(at,kt){var Ut=Math.sqrt(kt/xe),ar=Ut*ye;at.moveTo(0,-Ut),at.lineTo(ar,0),at.lineTo(0,Ut),at.lineTo(-ar,0),at.closePath()}},Me=.8908130915292852,Ie=Math.sin(s/10)/Math.sin(7*s/10),Ue=Math.sin(m/10)*Ie,qe=-Math.cos(m/10)*Ie,ke={draw:function(at,kt){var Ut=Math.sqrt(kt*Me),ar=Ue*Ut,Er=qe*Ut;at.moveTo(0,-Ut),at.lineTo(ar,Er);for(var br=1;br<5;++br){var Or=m*br/5,Pr=Math.cos(Or),hn=Math.sin(Or);at.lineTo(hn*Ut,-Pr*Ut),at.lineTo(Pr*ar-hn*Er,hn*ar+Pr*Er)}at.closePath()}},ge={draw:function(at,kt){var Ut=Math.sqrt(kt),ar=-Ut/2;at.rect(ar,ar,Ut,Ut)}},ue=Math.sqrt(3),ve={draw:function(at,kt){var Ut=-Math.sqrt(kt/(ue*3));at.moveTo(0,Ut*2),at.lineTo(-ue*Ut,-Ut),at.lineTo(ue*Ut,-Ut),at.closePath()}},se=-.5,Te=Math.sqrt(3)/2,Fe=1/Math.sqrt(12),We=(Fe/2+1)*3,Ge={draw:function(at,kt){var Ut=Math.sqrt(kt/We),ar=Ut/2,Er=Ut*Fe,br=ar,Or=Ut*Fe+Ut,Pr=-br,hn=Or;at.moveTo(ar,Er),at.lineTo(br,Or),at.lineTo(Pr,hn),at.lineTo(se*ar-Te*Er,Te*ar+se*Er),at.lineTo(se*br-Te*Or,Te*br+se*Or),at.lineTo(se*Pr-Te*hn,Te*Pr+se*hn),at.lineTo(se*ar+Te*Er,se*Er-Te*ar),at.lineTo(se*br+Te*Or,se*Or-Te*br),at.lineTo(se*Pr+Te*hn,se*hn-Te*Pr),at.closePath()}},gt=[ne,fe,Ae,ge,ke,ve,Ge];function mt(){var at=E(ne),kt=E(64),Ut=null;function ar(){var Er;if(Ut||(Ut=Er=x.path()),at.apply(this,arguments).draw(Ut,+kt.apply(this,arguments)),Er)return Ut=null,Er+""||null}return ar.type=function(Er){return arguments.length?(at=typeof Er=="function"?Er:E(Er),ar):at},ar.size=function(Er){return arguments.length?(kt=typeof Er=="function"?Er:E(+Er),ar):kt},ar.context=function(Er){return arguments.length?(Ut=Er??null,ar):Ut},ar}function Tt(){}function At(at,kt,Ut){at._context.bezierCurveTo((2*at._x0+at._x1)/3,(2*at._y0+at._y1)/3,(at._x0+2*at._x1)/3,(at._y0+2*at._y1)/3,(at._x0+4*at._x1+kt)/6,(at._y0+4*at._y1+Ut)/6)}function Kt(at){this._context=at}Kt.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:At(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(at,kt):this._context.moveTo(at,kt);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:At(this,at,kt);break}this._x0=this._x1,this._x1=at,this._y0=this._y1,this._y1=kt}};function nr(at){return new Kt(at)}function _r(at){this._context=at}_r.prototype={areaStart:Tt,areaEnd:Tt,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);break}}},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1,this._x2=at,this._y2=kt;break;case 1:this._point=2,this._x3=at,this._y3=kt;break;case 2:this._point=3,this._x4=at,this._y4=kt,this._context.moveTo((this._x0+4*this._x1+at)/6,(this._y0+4*this._y1+kt)/6);break;default:At(this,at,kt);break}this._x0=this._x1,this._x1=at,this._y0=this._y1,this._y1=kt}};function Zt(at){return new _r(at)}function sr(at){this._context=at}sr.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var Ut=(this._x0+4*this._x1+at)/6,ar=(this._y0+4*this._y1+kt)/6;this._line?this._context.lineTo(Ut,ar):this._context.moveTo(Ut,ar);break;case 3:this._point=4;default:At(this,at,kt);break}this._x0=this._x1,this._x1=at,this._y0=this._y1,this._y1=kt}};function Ot(at){return new sr(at)}function vt(at,kt){this._basis=new Kt(at),this._beta=kt}vt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var at=this._x,kt=this._y,Ut=at.length-1;if(Ut>0)for(var ar=at[0],Er=kt[0],br=at[Ut]-ar,Or=kt[Ut]-Er,Pr=-1,hn;++Pr<=Ut;)hn=Pr/Ut,this._basis.point(this._beta*at[Pr]+(1-this._beta)*(ar+hn*br),this._beta*kt[Pr]+(1-this._beta)*(Er+hn*Or));this._x=this._y=null,this._basis.lineEnd()},point:function(at,kt){this._x.push(+at),this._y.push(+kt)}};var ht=function at(kt){function Ut(ar){return kt===1?new Kt(ar):new vt(ar,kt)}return Ut.beta=function(ar){return at(+ar)},Ut}(.85);function Re(at,kt,Ut){at._context.bezierCurveTo(at._x1+at._k*(at._x2-at._x0),at._y1+at._k*(at._y2-at._y0),at._x2+at._k*(at._x1-kt),at._y2+at._k*(at._y1-Ut),at._x2,at._y2)}function Be(at,kt){this._context=at,this._k=(1-kt)/6}Be.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:Re(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(at,kt):this._context.moveTo(at,kt);break;case 1:this._point=2,this._x1=at,this._y1=kt;break;case 2:this._point=3;default:Re(this,at,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var He=function at(kt){function Ut(ar){return new Be(ar,kt)}return Ut.tension=function(ar){return at(+ar)},Ut}(0);function $e(at,kt){this._context=at,this._k=(1-kt)/6}$e.prototype={areaStart:Tt,areaEnd:Tt,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);break}}},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1,this._x3=at,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=at,this._y4=kt);break;case 2:this._point=3,this._x5=at,this._y5=kt;break;default:Re(this,at,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ze=function at(kt){function Ut(ar){return new $e(ar,kt)}return Ut.tension=function(ar){return at(+ar)},Ut}(0);function Je(at,kt){this._context=at,this._k=(1-kt)/6}Je.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(at,kt){switch(at=+at,kt=+kt,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:Re(this,at,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Mt=function at(kt){function Ut(ar){return new Je(ar,kt)}return Ut.tension=function(ar){return at(+ar)},Ut}(0);function dt(at,kt,Ut){var ar=at._x1,Er=at._y1,br=at._x2,Or=at._y2;if(at._l01_a>o){var Pr=2*at._l01_2a+3*at._l01_a*at._l12_a+at._l12_2a,hn=3*at._l01_a*(at._l01_a+at._l12_a);ar=(ar*Pr-at._x0*at._l12_2a+at._x2*at._l01_2a)/hn,Er=(Er*Pr-at._y0*at._l12_2a+at._y2*at._l01_2a)/hn}if(at._l23_a>o){var zn=2*at._l23_2a+3*at._l23_a*at._l12_a+at._l12_2a,Pn=3*at._l23_a*(at._l23_a+at._l12_a);br=(br*zn+at._x1*at._l23_2a-kt*at._l12_2a)/Pn,Or=(Or*zn+at._y1*at._l23_2a-Ut*at._l12_2a)/Pn}at._context.bezierCurveTo(ar,Er,br,Or,at._x2,at._y2)}function Dt(at,kt){this._context=at,this._alpha=kt}Dt.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(at,kt){if(at=+at,kt=+kt,this._point){var Ut=this._x2-at,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(at,kt):this._context.moveTo(at,kt);break;case 1:this._point=2;break;case 2:this._point=3;default:dt(this,at,kt);break}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=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ct=function at(kt){function Ut(ar){return kt?new Dt(ar,kt):new Be(ar,0)}return Ut.alpha=function(ar){return at(+ar)},Ut}(.5);function Vt(at,kt){this._context=at,this._alpha=kt}Vt.prototype={areaStart:Tt,areaEnd:Tt,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);break}}},point:function(at,kt){if(at=+at,kt=+kt,this._point){var Ut=this._x2-at,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=at,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=at,this._y4=kt);break;case 2:this._point=3,this._x5=at,this._y5=kt;break;default:dt(this,at,kt);break}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=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ht=function at(kt){function Ut(ar){return kt?new Vt(ar,kt):new $e(ar,0)}return Ut.alpha=function(ar){return at(+ar)},Ut}(.5);function Wt(at,kt){this._context=at,this._alpha=kt}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(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(at,kt){if(at=+at,kt=+kt,this._point){var Ut=this._x2-at,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(Ut*Ut+ar*ar,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:dt(this,at,kt);break}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=at,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Sr=function at(kt){function Ut(ar){return kt?new Wt(ar,kt):new Je(ar,0)}return Ut.alpha=function(ar){return at(+ar)},Ut}(.5);function on(at){this._context=at}on.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(at,kt){at=+at,kt=+kt,this._point?this._context.lineTo(at,kt):(this._point=1,this._context.moveTo(at,kt))}};function $t(at){return new on(at)}function It(at){return at<0?-1:1}function ir(at,kt,Ut){var ar=at._x1-at._x0,Er=kt-at._x1,br=(at._y1-at._y0)/(ar||Er<0&&-0),Or=(Ut-at._y1)/(Er||ar<0&&-0),Pr=(br*Er+Or*ar)/(ar+Er);return(It(br)+It(Or))*Math.min(Math.abs(br),Math.abs(Or),.5*Math.abs(Pr))||0}function cr(at,kt){var Ut=at._x1-at._x0;return Ut?(3*(at._y1-at._y0)/Ut-kt)/2:kt}function fr(at,kt,Ut){var ar=at._x0,Er=at._y0,br=at._x1,Or=at._y1,Pr=(br-ar)/3;at._context.bezierCurveTo(ar+Pr,Er+Pr*kt,br-Pr,Or-Pr*Ut,br,Or)}function Ir(at){this._context=at}Ir.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:fr(this,this._t0,cr(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(at,kt){var Ut=NaN;if(at=+at,kt=+kt,!(at===this._x1&&kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(at,kt):this._context.moveTo(at,kt);break;case 1:this._point=2;break;case 2:this._point=3,fr(this,cr(this,Ut=ir(this,at,kt)),Ut);break;default:fr(this,this._t0,Ut=ir(this,at,kt));break}this._x0=this._x1,this._x1=at,this._y0=this._y1,this._y1=kt,this._t0=Ut}}};function ln(at){this._context=new nn(at)}(ln.prototype=Object.create(Ir.prototype)).point=function(at,kt){Ir.prototype.point.call(this,kt,at)};function nn(at){this._context=at}nn.prototype={moveTo:function(at,kt){this._context.moveTo(kt,at)},closePath:function(){this._context.closePath()},lineTo:function(at,kt){this._context.lineTo(kt,at)},bezierCurveTo:function(at,kt,Ut,ar,Er,br){this._context.bezierCurveTo(kt,at,ar,Ut,br,Er)}};function wn(at){return new Ir(at)}function Un(at){return new ln(at)}function jn(at){this._context=at}jn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var at=this._x,kt=this._y,Ut=at.length;if(Ut)if(this._line?this._context.lineTo(at[0],kt[0]):this._context.moveTo(at[0],kt[0]),Ut===2)this._context.lineTo(at[1],kt[1]);else for(var ar=Aa(at),Er=Aa(kt),br=0,Or=1;Or=0;--kt)Er[kt]=(Or[kt]-Er[kt+1])/br[kt];for(br[Ut-1]=(at[Ut]+Er[Ut-1])/2,kt=0;kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(at,kt){switch(at=+at,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(at,kt):this._context.moveTo(at,kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kt),this._context.lineTo(at,kt);else{var Ut=this._x*(1-this._t)+at*this._t;this._context.lineTo(Ut,this._y),this._context.lineTo(Ut,kt)}break}}this._x=at,this._y=kt}};function ei(at){return new Qn(at,.5)}function Fa(at){return new Qn(at,0)}function ai(at){return new Qn(at,1)}function Mi(at,kt){if((Or=at.length)>1)for(var Ut=1,ar,Er,br=at[kt[0]],Or,Pr=br.length;Ut=0;)Ut[kt]=kt;return Ut}function ba(at,kt){return at[kt]}function pa(){var at=E([]),kt=ci,Ut=Mi,ar=ba;function Er(br){var Or=at.apply(this,arguments),Pr,hn=br.length,zn=Or.length,Pn=new Array(zn),Ca;for(Pr=0;Pr0){for(var Ut,ar,Er=0,br=at[0].length,Or;Er0)for(var Ut,ar=0,Er,br,Or,Pr,hn,zn=at[kt[0]].length;ar0?(Er[0]=Or,Er[1]=Or+=br):br<0?(Er[1]=Pr,Er[0]=Pr+=br):(Er[0]=0,Er[1]=br)}function da(at,kt){if((Er=at.length)>0){for(var Ut=0,ar=at[kt[0]],Er,br=ar.length;Ut0)||!((br=(Er=at[kt[0]]).length)>0))){for(var Ut=0,ar=1,Er,br,Or;arbr&&(br=Er,Ut=kt);return Ut}function hr(at){var kt=at.map(ur);return ci(at).sort(function(Ut,ar){return kt[Ut]-kt[ar]})}function ur(at){for(var kt=0,Ut=-1,ar=at.length,Er;++Ut[I(Ue,qe,Ae),Ue]));for(let[Ue,qe]of Me.entries()){qe.index=Ue;let{source:ke,target:ge}=qe;typeof ke!="object"&&(ke=qe.source=g(Ie,ke)),typeof ge!="object"&&(ge=qe.target=g(Ie,ge)),ke.sourceLinks.push(qe),ge.targetLinks.push(qe)}if(B!=null)for(let{sourceLinks:Ue,targetLinks:qe}of Ae)Ue.sort(B),qe.sort(B)}function re({nodes:Ae}){for(let Me of Ae)Me.value=Me.fixedValue===void 0?Math.max(x.sum(Me.sourceLinks,c),x.sum(Me.targetLinks,c)):Me.fixedValue}function ae({nodes:Ae}){let Me=Ae.length,Ie=new Set(Ae),Ue=new Set,qe=0;for(;Ie.size;){for(let ke of Ie){ke.depth=qe;for(let{target:ge}of ke.sourceLinks)Ue.add(ge)}if(++qe>Me)throw new Error("circular link");Ie=Ue,Ue=new Set}}function oe({nodes:Ae}){let Me=Ae.length,Ie=new Set(Ae),Ue=new Set,qe=0;for(;Ie.size;){for(let ke of Ie){ke.height=qe;for(let{source:ge}of ke.targetLinks)Ue.add(ge)}if(++qe>Me)throw new Error("circular link");Ie=Ue,Ue=new Set}}function H({nodes:Ae}){let Me=x.max(Ae,qe=>qe.depth)+1,Ie=(f-_-A)/(Me-1),Ue=new Array(Me);for(let qe of Ae){let ke=Math.max(0,Math.min(Me-1,Math.floor(N.call(null,qe,Me))));qe.layer=ke,qe.x0=_+ke*Ie,qe.x1=qe.x0+A,Ue[ke]?Ue[ke].push(qe):Ue[ke]=[qe]}if(R)for(let qe of Ue)qe.sort(R);return Ue}function X(Ae){let Me=x.min(Ae,Ie=>(u-T-(Ie.length-1)*z)/x.sum(Ie,c));for(let Ie of Ae){let Ue=T;for(let qe of Ie){qe.y0=Ue,qe.y1=Ue+qe.value*Me,Ue=qe.y1+z;for(let ke of qe.sourceLinks)ke.width=ke.value*Me}Ue=(u-Ue+z)/(Ie.length+1);for(let qe=0;qeIe.length)-1)),X(Me);for(let Ie=0;Ie0))continue;let se=(ue/ve-ge.y0)*Me;ge.y0+=se,ge.y1+=se,ne(ge)}R===void 0&&ke.sort(s),q(ke,Ie)}}function Y(Ae,Me,Ie){for(let Ue=Ae.length,qe=Ue-2;qe>=0;--qe){let ke=Ae[qe];for(let ge of ke){let ue=0,ve=0;for(let{target:Te,value:Fe}of ge.sourceLinks){let We=Fe*(Te.layer-ge.layer);ue+=xe(ge,Te)*We,ve+=We}if(!(ve>0))continue;let se=(ue/ve-ge.y0)*Me;ge.y0+=se,ge.y1+=se,ne(ge)}R===void 0&&ke.sort(s),q(ke,Ie)}}function q(Ae,Me){let Ie=Ae.length>>1,Ue=Ae[Ie];ee(Ae,Ue.y0-z,Ie-1,Me),$(Ae,Ue.y1+z,Ie+1,Me),ee(Ae,u,Ae.length-1,Me),$(Ae,T,0,Me)}function $(Ae,Me,Ie,Ue){for(;Ie1e-6&&(qe.y0+=ke,qe.y1+=ke),Me=qe.y1+z}}function ee(Ae,Me,Ie,Ue){for(;Ie>=0;--Ie){let qe=Ae[Ie],ke=(qe.y1-Me)*Ue;ke>1e-6&&(qe.y0-=ke,qe.y1-=ke),Me=qe.y0-z}}function ne({sourceLinks:Ae,targetLinks:Me}){if(B===void 0){for(let{source:{sourceLinks:Ie}}of Me)Ie.sort(o);for(let{target:{targetLinks:Ie}}of Ae)Ie.sort(n)}}function fe(Ae){if(B===void 0)for(let{sourceLinks:Me,targetLinks:Ie}of Ae)Me.sort(o),Ie.sort(n)}function ye(Ae,Me){let Ie=Ae.y0-(Ae.sourceLinks.length-1)*z/2;for(let{target:Ue,width:qe}of Ae.sourceLinks){if(Ue===Me)break;Ie+=qe+z}for(let{source:Ue,width:qe}of Me.targetLinks){if(Ue===Ae)break;Ie-=qe}return Ie}function xe(Ae,Me){let Ie=Me.y0-(Me.targetLinks.length-1)*z/2;for(let{source:Ue,width:qe}of Me.targetLinks){if(Ue===Ae)break;Ie+=qe+z}for(let{target:Ue,width:qe}of Ae.sourceLinks){if(Ue===Me)break;Ie-=qe}return Ie}return Z}function S(_){return[_.source.x1,_.y0]}function M(_){return[_.target.x0,_.y1]}function C(){return E.linkHorizontal().source(S).target(M)}v.sankey=w,v.sankeyCenter=a,v.sankeyJustify=t,v.sankeyLeft=l,v.sankeyLinkHorizontal=C,v.sankeyRight=e,Object.defineProperty(v,"__esModule",{value:!0})})}}),tP=Ee({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(J,V){(function(v,x){x(typeof J=="object"&&typeof V<"u"?J:v.d3=v.d3||{})})(J,function(v){"use strict";function x(K,G){return KG?1:K>=G?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)<0?q=ee+1:$=ee}return q},right:function(G,Y,q,$){for(q==null&&(q=0),$==null&&($=G.length);q<$;){var ee=q+$>>>1;K(G[ee],Y)>0?$=ee:q=ee+1}return q}}}function k(K){return function(G,Y){return x(K(G),Y)}}var l=E(x),e=l.right,t=l.left;function a(K,G){G==null&&(G=r);for(var Y=0,q=K.length-1,$=K[0],ee=new Array(q<0?0:q);YK?1:G>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,G){var Y=K.length,q=0,$=-1,ee=0,ne,fe,ye=0;if(G==null)for(;++$1)return ye/(q-1)}function m(K,G){var Y=c(K,G);return Y&&Math.sqrt(Y)}function h(K,G){var Y=K.length,q=-1,$,ee,ne;if(G==null){for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$))}else for(;++q=$)for(ee=ne=$;++q$&&(ee=$),ne<$&&(ne=$));return[ee,ne]}var p=Array.prototype,g=p.slice,i=p.map;function w(K){return function(){return K}}function S(K){return K}function M(K,G,Y){K=+K,G=+G,Y=($=arguments.length)<2?(G=K,K=0,1):$<3?1:+Y;for(var q=-1,$=Math.max(0,Math.ceil((G-K)/Y))|0,ee=new Array($);++q<$;)ee[q]=K+q*Y;return ee}var C=Math.sqrt(50),_=Math.sqrt(10),T=Math.sqrt(2);function f(K,G,Y){var q,$=-1,ee,ne,fe;if(G=+G,K=+K,Y=+Y,K===G&&Y>0)return[K];if((q=G0)for(K=Math.ceil(K/fe),G=Math.floor(G/fe),ne=new Array(ee=Math.ceil(G-K+1));++$=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,$):-Math.pow(10,-$)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,G,Y){var q=Math.abs(G-K)/Math.max(0,Y),$=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/$;return ee>=C?$*=10:ee>=_?$*=5:ee>=T&&($*=2),GMe;)Ie.pop(),--Ue;var qe=new Array(Ue+1),ke;for(ee=0;ee<=Ue;++ee)ke=qe[ee]=[],ke.x0=ee>0?Ie[ee-1]:Ae,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,$=(q-1)*G,ee=Math.floor($),ne=+Y(K[ee],ee,K),fe=+Y(K[ee+1],ee+1,K);return ne+(fe-ne)*($-ee)}}function N(K,G,Y){return K=i.call(K,s).sort(x),Math.ceil((Y-G)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function R(K,G,Y){return Math.ceil((Y-G)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++qee&&(ee=$)}else for(;++q=$)for(ee=$;++qee&&(ee=$);return ee}function F(K,G){var Y=K.length,q=Y,$=-1,ee,ne=0;if(G==null)for(;++$=0;)for(ne=K[G],Y=ne.length;--Y>=0;)ee[--$]=ne[Y];return ee}function U(K,G){var Y=K.length,q=-1,$,ee;if(G==null){for(;++q=$)for(ee=$;++q$&&(ee=$)}else for(;++q=$)for(ee=$;++q$&&(ee=$);return ee}function Z(K,G){for(var Y=G.length,q=new Array(Y);Y--;)q[Y]=K[G[Y]];return q}function Q(K,G){if(Y=K.length){var Y,q=0,$=0,ee,ne=K[$];for(G==null&&(G=x);++q=M})}function h(M){m(M);for(var C=E,_=v(C),T=_.components.filter(function(N){return N.length>1}),f=1/0,u,A=0;A"u"?"undefined":s(Be))!=="object"&&(Be=ht.source=_(vt,Be)),(typeof He>"u"?"undefined":s(He))!=="object"&&(He=ht.target=_(vt,He)),Be.sourceLinks.push(ht),He.targetLinks.push(ht)}),Ot}function At(Ot){Ot.nodes.forEach(function(vt){vt.partOfCycle=!1,vt.value=Math.max(x.sum(vt.sourceLinks,p),x.sum(vt.targetLinks,p)),vt.sourceLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)}),vt.targetLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)})})}function Kt(Ot){var vt=0,ht=0,Re=0,Be=0,He=x.max(Ot.nodes,function($e){return $e.column});return Ot.links.forEach(function($e){$e.circular&&($e.circularLinkType=="top"?vt=vt+$e.width:ht=ht+$e.width,$e.target.column==0&&(Be=Be+$e.width),$e.source.column==He&&(Re=Re+$e.width))}),vt=vt>0?vt+f+u:vt,ht=ht>0?ht+f+u:ht,Re=Re>0?Re+f+u:Re,Be=Be>0?Be+f+u:Be,{top:vt,bottom:ht,left:Be,right:Re}}function nr(Ot,vt){var ht=x.max(Ot.nodes,function(Mt){return Mt.column}),Re=Ue-Me,Be=qe-Ie,He=Re+vt.right+vt.left,$e=Be+vt.top+vt.bottom,Ze=Re/He,Je=Be/$e;return Me=Me*Ze+vt.left,Ue=vt.right==0?Ue:Ue*Ze,Ie=Ie*Je+vt.top,qe=qe*Je,Ot.nodes.forEach(function(Mt){Mt.x0=Me+Mt.column*((Ue-Me-ke)/ht),Mt.x1=Mt.x0+ke}),Je}function _r(Ot){var vt,ht,Re;for(vt=Ot.nodes,ht=[],Re=0;vt.length;++Re,vt=ht,ht=[])vt.forEach(function(Be){Be.depth=Re,Be.sourceLinks.forEach(function(He){ht.indexOf(He.target)<0&&!He.circular&&ht.push(He.target)})});for(vt=Ot.nodes,ht=[],Re=0;vt.length;++Re,vt=ht,ht=[])vt.forEach(function(Be){Be.height=Re,Be.targetLinks.forEach(function(He){ht.indexOf(He.source)<0&&!He.circular&&ht.push(He.source)})});Ot.nodes.forEach(function(Be){Be.column=Math.floor(ve.call(null,Be,Re))})}function Zt(Ot,vt,ht){var Re=E.nest().key(function(Mt){return Mt.column}).sortKeys(x.ascending).entries(Ot.nodes).map(function(Mt){return Mt.values});$e(ht),Je();for(var Be=1,He=vt;He>0;--He)Ze(Be*=.99,ht),Je();function $e(Mt){if(Ge){var dt=1/0;Re.forEach(function(Ht){var Wt=qe*Ge/(Ht.length+1);dt=Wt0))if(Ht==0&&Vt==1)Sr=Wt.y1-Wt.y0,Wt.y0=qe/2-Sr/2,Wt.y1=qe/2+Sr/2;else if(Ht==Dt-1&&Vt==1)Sr=Wt.y1-Wt.y0,Wt.y0=qe/2-Sr/2,Wt.y1=qe/2+Sr/2;else{var on=0,$t=x.mean(Wt.sourceLinks,w),It=x.mean(Wt.targetLinks,i);$t&&It?on=($t+It)/2:on=$t||It;var ir=(on-g(Wt))*Mt;Wt.y0+=ir,Wt.y1+=ir}})})}function Je(){Re.forEach(function(Mt){var dt,Dt,Ct=Ie,Vt=Mt.length,Ht;for(Mt.sort(h),Ht=0;Ht0&&(dt.y0+=Dt,dt.y1+=Dt),Ct=dt.y1+ge;if(Dt=Ct-ge-qe,Dt>0)for(Ct=dt.y0-=Dt,dt.y1-=Dt,Ht=Vt-2;Ht>=0;--Ht)dt=Mt[Ht],Dt=dt.y1+ge-Ct,Dt>0&&(dt.y0-=Dt,dt.y1-=Dt),Ct=dt.y0})}}function sr(Ot){Ot.nodes.forEach(function(vt){vt.sourceLinks.sort(m),vt.targetLinks.sort(c)}),Ot.nodes.forEach(function(vt){var ht=vt.y0,Re=ht,Be=vt.y1,He=Be;vt.sourceLinks.forEach(function($e){$e.circular?($e.y0=Be-$e.width/2,Be=Be-$e.width):($e.y0=ht+$e.width/2,ht+=$e.width)}),vt.targetLinks.forEach(function($e){$e.circular?($e.y1=He-$e.width/2,He=He-$e.width):($e.y1=Re+$e.width/2,Re+=$e.width)})})}return mt}function z(Me,Ie,Ue){var qe=0;if(Ue===null){for(var ke=[],ge=0;geIe.source.column)}function B(Me,Ie){var Ue=0;Me.sourceLinks.forEach(function(ke){Ue=ke.circular&&!xe(ke,Ie)?Ue+1:Ue});var qe=0;return Me.targetLinks.forEach(function(ke){qe=ke.circular&&!xe(ke,Ie)?qe+1:qe}),Ue+qe}function F(Me){var Ie=Me.source.sourceLinks,Ue=0;Ie.forEach(function(ge){Ue=ge.circular?Ue+1:Ue});var qe=Me.target.targetLinks,ke=0;return qe.forEach(function(ge){ke=ge.circular?ke+1:ke}),!(Ue>1||ke>1)}function P(Me,Ie,Ue){return Me.sort(Z),Me.forEach(function(qe,ke){var ge=0;if(xe(qe,Ue)&&F(qe))qe.circularPathData.verticalBuffer=ge+qe.width/2;else{var ue=0;for(ue;uege?ve:ge}qe.circularPathData.verticalBuffer=ge+qe.width/2}}),Me}function j(Me,Ie,Ue,qe){var ke=5,ge=x.min(Me.links,function(se){return se.source.y0});Me.links.forEach(function(se){se.circular&&(se.circularPathData={})});var ue=Me.links.filter(function(se){return se.circularLinkType=="top"});P(ue,Ie,qe);var ve=Me.links.filter(function(se){return se.circularLinkType=="bottom"});P(ve,Ie,qe),Me.links.forEach(function(se){if(se.circular){if(se.circularPathData.arcRadius=se.width+u,se.circularPathData.leftNodeBuffer=ke,se.circularPathData.rightNodeBuffer=ke,se.circularPathData.sourceWidth=se.source.x1-se.source.x0,se.circularPathData.sourceX=se.source.x0+se.circularPathData.sourceWidth,se.circularPathData.targetX=se.target.x0,se.circularPathData.sourceY=se.y0,se.circularPathData.targetY=se.y1,xe(se,qe)&&F(se))se.circularPathData.leftSmallArcRadius=u+se.width/2,se.circularPathData.leftLargeArcRadius=u+se.width/2,se.circularPathData.rightSmallArcRadius=u+se.width/2,se.circularPathData.rightLargeArcRadius=u+se.width/2,se.circularLinkType=="bottom"?(se.circularPathData.verticalFullExtent=se.source.y1+f+se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.rightLargeArcRadius):(se.circularPathData.verticalFullExtent=se.source.y0-f-se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.rightLargeArcRadius);else{var Te=se.source.column,Fe=se.circularLinkType,We=Me.links.filter(function(mt){return mt.source.column==Te&&mt.circularLinkType==Fe});se.circularLinkType=="bottom"?We.sort(re):We.sort(Q);var Ge=0;We.forEach(function(mt,Tt){mt.circularLinkID==se.circularLinkID&&(se.circularPathData.leftSmallArcRadius=u+se.width/2+Ge,se.circularPathData.leftLargeArcRadius=u+se.width/2+Tt*Ie+Ge),Ge=Ge+mt.width}),Te=se.target.column,We=Me.links.filter(function(mt){return mt.target.column==Te&&mt.circularLinkType==Fe}),se.circularLinkType=="bottom"?We.sort(oe):We.sort(ae),Ge=0,We.forEach(function(mt,Tt){mt.circularLinkID==se.circularLinkID&&(se.circularPathData.rightSmallArcRadius=u+se.width/2+Ge,se.circularPathData.rightLargeArcRadius=u+se.width/2+Tt*Ie+Ge),Ge=Ge+mt.width}),se.circularLinkType=="bottom"?(se.circularPathData.verticalFullExtent=Math.max(Ue,se.source.y1,se.target.y1)+f+se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent-se.circularPathData.rightLargeArcRadius):(se.circularPathData.verticalFullExtent=ge-f-se.circularPathData.verticalBuffer,se.circularPathData.verticalLeftInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.leftLargeArcRadius,se.circularPathData.verticalRightInnerExtent=se.circularPathData.verticalFullExtent+se.circularPathData.rightLargeArcRadius)}se.circularPathData.leftInnerExtent=se.circularPathData.sourceX+se.circularPathData.leftNodeBuffer,se.circularPathData.rightInnerExtent=se.circularPathData.targetX-se.circularPathData.rightNodeBuffer,se.circularPathData.leftFullExtent=se.circularPathData.sourceX+se.circularPathData.leftLargeArcRadius+se.circularPathData.leftNodeBuffer,se.circularPathData.rightFullExtent=se.circularPathData.targetX-se.circularPathData.rightLargeArcRadius-se.circularPathData.rightNodeBuffer}if(se.circular)se.path=U(se);else{var gt=k.linkHorizontal().source(function(mt){var Tt=mt.source.x0+(mt.source.x1-mt.source.x0),At=mt.y0;return[Tt,At]}).target(function(mt){var Tt=mt.target.x0,At=mt.y1;return[Tt,At]});se.path=gt(se)}})}function U(Me){var Ie="";return Me.circularLinkType=="top"?Ie="M"+Me.circularPathData.sourceX+" "+Me.circularPathData.sourceY+" L"+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.sourceY+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftSmallArcRadius+" 0 0 0 "+Me.circularPathData.leftFullExtent+" "+(Me.circularPathData.sourceY-Me.circularPathData.leftSmallArcRadius)+" L"+Me.circularPathData.leftFullExtent+" "+Me.circularPathData.verticalLeftInnerExtent+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftLargeArcRadius+" 0 0 0 "+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.verticalFullExtent+" L"+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.verticalFullExtent+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightLargeArcRadius+" 0 0 0 "+Me.circularPathData.rightFullExtent+" "+Me.circularPathData.verticalRightInnerExtent+" L"+Me.circularPathData.rightFullExtent+" "+(Me.circularPathData.targetY-Me.circularPathData.rightSmallArcRadius)+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightSmallArcRadius+" 0 0 0 "+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.targetY+" L"+Me.circularPathData.targetX+" "+Me.circularPathData.targetY:Ie="M"+Me.circularPathData.sourceX+" "+Me.circularPathData.sourceY+" L"+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.sourceY+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftSmallArcRadius+" 0 0 1 "+Me.circularPathData.leftFullExtent+" "+(Me.circularPathData.sourceY+Me.circularPathData.leftSmallArcRadius)+" L"+Me.circularPathData.leftFullExtent+" "+Me.circularPathData.verticalLeftInnerExtent+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftLargeArcRadius+" 0 0 1 "+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.verticalFullExtent+" L"+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.verticalFullExtent+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightLargeArcRadius+" 0 0 1 "+Me.circularPathData.rightFullExtent+" "+Me.circularPathData.verticalRightInnerExtent+" L"+Me.circularPathData.rightFullExtent+" "+(Me.circularPathData.targetY+Me.circularPathData.rightSmallArcRadius)+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightSmallArcRadius+" 0 0 1 "+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.targetY+" L"+Me.circularPathData.targetX+" "+Me.circularPathData.targetY,Ie}function Z(Me,Ie){return H(Me)==H(Ie)?Me.circularLinkType=="bottom"?re(Me,Ie):Q(Me,Ie):H(Ie)-H(Me)}function Q(Me,Ie){return Me.y0-Ie.y0}function re(Me,Ie){return Ie.y0-Me.y0}function ae(Me,Ie){return Me.y1-Ie.y1}function oe(Me,Ie){return Ie.y1-Me.y1}function H(Me){return Me.target.column-Me.source.column}function X(Me){return Me.target.x0-Me.source.x1}function K(Me,Ie){var Ue=N(Me),qe=X(Ie)/Math.tan(Ue),ke=ye(Me)=="up"?Me.y1+qe:Me.y1-qe;return ke}function G(Me,Ie){var Ue=N(Me),qe=X(Ie)/Math.tan(Ue),ke=ye(Me)=="up"?Me.y1-qe:Me.y1+qe;return ke}function Y(Me,Ie,Ue,qe){Me.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var ge=ke.source.column+1,ue=ke.target.column-1,ve=1,se=ue-ge+1;for(ve=1;ge<=ue;ge++,ve++)Me.nodes.forEach(function(Te){if(Te.column==ge){var Fe=ve/(se+1),We=Math.pow(1-Fe,3),Ge=3*Fe*Math.pow(1-Fe,2),gt=3*Math.pow(Fe,2)*(1-Fe),mt=Math.pow(Fe,3),Tt=We*ke.y0+Ge*ke.y0+gt*ke.y1+mt*ke.y1,At=Tt-ke.width/2,Kt=Tt+ke.width/2,nr;At>Te.y0&&AtTe.y0&&KtTe.y1&&$(_r,nr,Ie,Ue)})):AtTe.y1&&(nr=Kt-Te.y0+10,Te=$(Te,nr,Ie,Ue),Me.nodes.forEach(function(_r){T(_r,qe)==T(Te,qe)||_r.column!=Te.column||_r.y0Te.y1&&$(_r,nr,Ie,Ue)}))}})}})}function q(Me,Ie){return Me.y0>Ie.y0&&Me.y0Ie.y0&&Me.y1Ie.y1}function $(Me,Ie,Ue,qe){return Me.y0+Ie>=Ue&&Me.y1+Ie<=qe&&(Me.y0=Me.y0+Ie,Me.y1=Me.y1+Ie,Me.targetLinks.forEach(function(ke){ke.y1=ke.y1+Ie}),Me.sourceLinks.forEach(function(ke){ke.y0=ke.y0+Ie})),Me}function ee(Me,Ie,Ue,qe){Me.nodes.forEach(function(ke){qe&&ke.y+(ke.y1-ke.y0)>Ie&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-Ie));var ge=Me.links.filter(function(se){return T(se.source,Ue)==T(ke,Ue)}),ue=ge.length;ue>1&&ge.sort(function(se,Te){if(!se.circular&&!Te.circular){if(se.target.column==Te.target.column)return se.y1-Te.y1;if(fe(se,Te)){if(se.target.column>Te.target.column){var Fe=G(Te,se);return se.y1-Fe}if(Te.target.column>se.target.column){var We=G(se,Te);return We-Te.y1}}else return se.y1-Te.y1}if(se.circular&&!Te.circular)return se.circularLinkType=="top"?-1:1;if(Te.circular&&!se.circular)return Te.circularLinkType=="top"?1:-1;if(se.circular&&Te.circular)return se.circularLinkType===Te.circularLinkType&&se.circularLinkType=="top"?se.target.column===Te.target.column?se.target.y1-Te.target.y1:Te.target.column-se.target.column:se.circularLinkType===Te.circularLinkType&&se.circularLinkType=="bottom"?se.target.column===Te.target.column?Te.target.y1-se.target.y1:se.target.column-Te.target.column:se.circularLinkType=="top"?-1:1});var ve=ke.y0;ge.forEach(function(se){se.y0=ve+se.width/2,ve=ve+se.width}),ge.forEach(function(se,Te){if(se.circularLinkType=="bottom"){var Fe=Te+1,We=0;for(Fe;Fe1&&ke.sort(function(ve,se){if(!ve.circular&&!se.circular){if(ve.source.column==se.source.column)return ve.y0-se.y0;if(fe(ve,se)){if(se.source.column0?"up":"down"}function xe(Me,Ie){return T(Me.source,Ie)==T(Me.target,Ie)}function Ae(Me,Ie,Ue){var qe=Me.nodes,ke=Me.links,ge=!1,ue=!1;if(ke.forEach(function(Ge){Ge.circularLinkType=="top"?ge=!0:Ge.circularLinkType=="bottom"&&(ue=!0)}),ge==!1||ue==!1){var ve=x.min(qe,function(Ge){return Ge.y0}),se=x.max(qe,function(Ge){return Ge.y1}),Te=se-ve,Fe=Ue-Ie,We=Fe/Te;qe.forEach(function(Ge){var gt=(Ge.y1-Ge.y0)*We;Ge.y0=(Ge.y0-ve)*We,Ge.y1=Ge.y0+gt}),ke.forEach(function(Ge){Ge.y0=(Ge.y0-ve)*We,Ge.y1=(Ge.y1-ve)*We,Ge.width=Ge.width*We})}}v.sankeyCircular=b,v.sankeyCenter=n,v.sankeyLeft=t,v.sankeyRight=a,v.sankeyJustify=r,Object.defineProperty(v,"__esModule",{value:!0})})}}),b5=Ee({"src/traces/sankey/constants.js"(J,V){"use strict";V.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),aP=Ee({"src/traces/sankey/render.js"(J,V){"use strict";var v=KL(),x=(Zv(),ra(iv)).interpolateNumber,E=Hn(),k=eP(),l=nP(),e=b5(),t=Qa(),a=yo(),r=Vr(),n=r.strTranslate,o=r.strRotate,s=Qh(),c=s.keyFun,m=s.repeat,h=s.unwrap,p=Fs(),g=Ri(),i=rc(),w=i.CAP_SHIFT,S=i.LINE_SPACING,M=3;function C(X,K,G){var Y=h(K),q=Y.trace,$=q.domain,ee=q.orientation==="h",ne=q.direction==="reversed",fe=q.node.pad,ye=q.node.thickness,xe={justify:k.sankeyJustify,left:k.sankeyLeft,right:k.sankeyRight,center:k.sankeyCenter}[q.node.align],Ae=X.width*($.x[1]-$.x[0]),Me=X.height*($.y[1]-$.y[0]),Ie=Y._nodes,Ue=Y._links,qe=Y.circular,ke;qe?ke=l.sankeyCircular().circularLinkGap(0):ke=k.sankey(),ke.iterations(e.sankeyIterations).size(ee?[Ae,Me]:[Me,Ae]).nodeWidth(ye).nodePadding(fe).nodeId(function(Zt){return Zt.pointNumber}).nodeAlign(xe).nodes(Ie).links(Ue);function ge(Zt){q[Zt].sort==="input"&&(qe?r.warn(`Circular Sankey diagrams do not support the "input" ${Zt}.sort mode; falling back to the default sort.`):ke[`${Zt}Sort`](null))}ge("link"),ge("node");var ue=ke();ke.nodePadding()=ht||(vt=ht-Ot.y0,vt>1e-6&&(Ot.y0+=vt,Ot.y1+=vt)),ht=Ot.y1+fe})}function At(Zt){var sr=Zt.map(function($e,Ze){return{x0:$e.x0,index:Ze}}).sort(function($e,Ze){return $e.x0-Ze.x0}),Ot=[],vt=-1,ht,Re=-1/0,Be;for(ve=0;veRe+ye&&(vt+=1,ht=He.x0),Re=He.x0,Ot[vt]||(Ot[vt]=[]),Ot[vt].push(He),Be=ht-He.x0,He.x0+=Be,He.x1+=Be}return Ot}if(q.node.x.length&&q.node.y.length){for(ve=0;ve0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(G="M "+(q.targetX-K)+" "+(q.targetY-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.targetY-Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightSmallArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent-Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-Y-K)+" "+q.verticalRightInnerExtent,$&&ee?G+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-Y-K)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent+Y-K-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:$?G+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent-K-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.leftFullExtent+Y+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:G+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+Y)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+Y)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent,G+=" L "+(q.leftFullExtent+Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftSmallArcRadius+Y)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY+Y)+" L "+q.leftInnerExtent+" "+(q.sourceY+Y)+" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Y)+" "+q.verticalLeftInnerExtent,$&&ee?G+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.rightFullExtent+Y-K+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:$?G+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent-K-Y)+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:G+=" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftLargeArcRadius-Y)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightLargeArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent,G+=" L "+(q.rightFullExtent+Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+Y)+" L "+(q.targetX-K)+" "+(q.targetY+Y)+(K>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),G}function f(){var X=.5;function K(G){var Y=G.linkArrowLength;if(G.link.circular)return T(G.link,Y);var q=Math.abs((G.link.target.x0-G.link.source.x1)/2);Y>q&&(Y=q);var $=G.link.source.x1,ee=G.link.target.x0-Y,ne=x($,ee),fe=ne(X),ye=ne(1-X),xe=G.link.y0-G.link.width/2,Ae=G.link.y0+G.link.width/2,Me=G.link.y1-G.link.width/2,Ie=G.link.y1+G.link.width/2,Ue="M"+$+","+xe,qe="C"+fe+","+xe+" "+ye+","+Me+" "+ee+","+Me,ke="C"+ye+","+Ie+" "+fe+","+Ae+" "+$+","+Ae,ge=Y>0?"L"+(ee+Y)+","+(Me+G.link.width/2):"";return ge+="L"+ee+","+Ie,Ue+qe+ge+ke+"Z"}return K}function u(X,K){var G=e.nodePadAcross,Y=X.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var q=K.dx,$=Math.max(.5,K.dy),ee="node_"+K.pointNumber;return K.group&&(ee=r.randstr()),K.trace=X.trace,K.curveNumber=X.trace.index,{index:K.pointNumber,key:ee,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:X.key,trace:X.trace,node:K,nodePad:X.nodePad,nodeLineColor:X.nodeLineColor,nodeLineWidth:X.nodeLineWidth,textFont:X.textFont,size:X.horizontal?X.height:X.width,visibleWidth:Math.ceil(q),visibleHeight:$,zoneX:-G,zoneY:-Y,zoneWidth:q+2*G,zoneHeight:$+2*Y,labelY:X.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:X.width,forceLayouts:X.forceLayouts,horizontal:X.horizontal,reversed:X.reversed,rgb:t.rgb(K.color),alpha:t.parse(K.color).alpha,valueFormat:X.valueFormat,valueSuffix:X.valueSuffix,sankey:X.sankey,graph:X.graph,arrangement:X.arrangement,uniqueNodeLabelPathId:[X.guid,X.key,ee].join("_"),interactionState:X.interactionState,figure:X}}function A(X){X.attr("transform",function(K){return n(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function b(X){X.call(A)}function z(X,K){X.call(b),K.attr("d",f())}function I(X){X.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function N(X){return X.link.width>1||X.linkLineWidth>0}function R(X){return X.horizontal?X.reversed?n(X.translateX+X.width,X.translateY)+"matrix(-1 0 0 1 0 0)":n(X.translateX,X.translateY)+"matrix(1 0 0 1 0 0)":X.reversed?n(X.translateX,X.translateY+X.height)+"matrix(0 -1 1 0 0 0)":n(X.translateX,X.translateY)+"matrix(0 1 1 0 0 0)"}function B(X,K,G){X.on(".basic",null).on("mouseover.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(G.hover(this,Y,K),Y.interactionState.hovered=[this,Y])}).on("mousemove.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(G.follow(this,Y),Y.interactionState.hovered=[this,Y])}).on("mouseout.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(G.unhover(this,Y,K),Y.interactionState.hovered=!1)}).on("click.basic",function(Y){Y.interactionState.hovered&&(G.unhover(this,Y,K),Y.interactionState.hovered=!1),!Y.interactionState.dragInProgress&&!Y.partOfGroup&&G.select(this,Y,K)})}function F(X,K,G,Y){var q=E.behavior.drag().origin(function($){return{x:$.node.x0+$.visibleWidth/2,y:$.node.y0+$.visibleHeight/2}}).on("dragstart",function($){if($.arrangement!=="fixed"&&(r.ensureSingle(Y._fullLayout._infolayer,"g","dragcover",function(ne){Y._fullLayout._dragCover=ne}),r.raiseToTop(this),$.interactionState.dragInProgress=$.node,re($.node),$.interactionState.hovered&&(G.nodeEvents.unhover.apply(0,$.interactionState.hovered),$.interactionState.hovered=!1),$.arrangement==="snap")){var ee=$.traceId+"|"+$.key;$.forceLayouts[ee]?$.forceLayouts[ee].alpha(1):P(X,ee,$,Y),j(X,K,$,ee,Y)}}).on("drag",function($){if($.arrangement!=="fixed"){var ee=E.event.x,ne=E.event.y;$.arrangement==="snap"?($.node.x0=ee-$.visibleWidth/2,$.node.x1=ee+$.visibleWidth/2,$.node.y0=ne-$.visibleHeight/2,$.node.y1=ne+$.visibleHeight/2):($.arrangement==="freeform"&&($.node.x0=ee-$.visibleWidth/2,$.node.x1=ee+$.visibleWidth/2),ne=Math.max(0,Math.min($.size-$.visibleHeight/2,ne)),$.node.y0=ne-$.visibleHeight/2,$.node.y1=ne+$.visibleHeight/2),re($.node),$.arrangement!=="snap"&&($.sankey.update($.graph),z(X.filter(ae($)),K))}}).on("dragend",function($){if($.arrangement!=="fixed"){$.interactionState.dragInProgress=!1;for(var ee=0;ee<$.node.childrenNodes.length;ee++)$.node.childrenNodes[ee].x=$.node.x,$.node.childrenNodes[ee].y=$.node.y;$.arrangement!=="snap"&&Z($,Y)}});X.on(".drag",null).call(q)}function P(X,K,G,Y){oe(G.graph.nodes);var q=G.graph.nodes.filter(function($){return $.originalX===G.node.originalX}).filter(function($){return!$.partOfGroup});G.forceLayouts[K]=v.forceSimulation(q).alphaDecay(0).force("collide",v.forceCollide().radius(function($){return $.dy/2+G.nodePad/2}).strength(1).iterations(e.forceIterations)).force("constrain",U(X,K,q,G,Y)).stop()}function j(X,K,G,Y,q){window.requestAnimationFrame(function $(){var ee;for(ee=0;ee0)window.requestAnimationFrame($);else{var fe=G.node.originalX;G.node.x0=fe-G.visibleWidth/2,G.node.x1=fe+G.visibleWidth/2,Z(G,q)}})}function U(X,K,G,Y){return function(){for(var $=0,ee=0;ee0&&Y.forceLayouts[K].alpha(0)}}function Z(X,K){for(var G=[],Y=[],q=0;qN(ke)?t.rgb(ke.linkLineColor):ke.rgb).style("stroke-opacity",ke=>N(ke)?t.opacity(ke.linkLineColor):ke.alpha).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha).style("stroke-width",ke=>N(ke)?ke.linkLineWidth:1).attr("d",f()),Ae.style("opacity",function(){return X._context.staticPlot||ee||ne?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Ae.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Me=ye.selectAll("."+e.cn.sankeyNodeSet).data(m,c);Me.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Me.style("cursor",function(ke){switch(ke.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ie=Me.selectAll("."+e.cn.sankeyNode).data(function(ke){var ge=ke.graph.nodes;return Q(ge),ge.map(u.bind(null,ke))},c);Ie.enter().append("g").classed(e.cn.sankeyNode,!0).call(A).style("opacity",function(ke){return(X._context.staticPlot||ee)&&!ke.partOfGroup?1:0}),Ie.call(B,ye,q.nodeEvents).call(F,Ae,q,X),Ie.transition().ease(e.ease).duration(e.duration).call(A).style("opacity",function(ke){return ke.partOfGroup?0:1}),Ie.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Ue=Ie.selectAll("."+e.cn.nodeRect).data(m);Ue.enter().append("rect").classed(e.cn.nodeRect,!0).call(I),Ue.style("stroke-width",function(ke){return ke.nodeLineWidth}).style("stroke",function(ke){return t.rgb(ke.nodeLineColor)}).style("stroke-opacity",function(ke){return t.opacity(ke.nodeLineColor)}).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha),Ue.transition().ease(e.ease).duration(e.duration).call(I);var qe=Ie.selectAll("."+e.cn.nodeLabel).data(m);qe.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),qe.attr("data-notex",1).text(function(ke){return ke.node.label}).each(function(ke){var ge=E.select(this);a.font(ge,ke.textFont),p.convertToTspans(ge,X)}).attr("text-anchor",function(ke){return ke.horizontal&&ke.left!==ke.reversed?"end":"start"}).attr("transform",function(ke){var ge=E.select(this),ue=p.lineCount(ge),ve=ke.textFont.size*((ue-1)*S-w),se=ke.nodeLineWidth/2+M;if(!ke.horizontal){var We=ke.reversed?(ke.visibleWidth+ve)/2:(ke.visibleWidth-ve)/2,Te=ke.reversed?o(90):"scale(-1,1)"+o(90);return n(We,se)+Te}var Fe=se,We=(ke.visibleHeight-ve)/2;return ke.left?Fe=-Fe:Fe+=ke.visibleWidth,n(Fe,We)+(ke.reversed?"scale(-1,1)":"")}),qe.transition().ease(e.ease).duration(e.duration)}}}),x5=Ee({"src/traces/sankey/plot.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=x.numberFormat,k=aP(),l=$l(),e=Qa(),t=b5().cn,a=x._;function r(S){return S!==""}function n(S,M){return S.filter(function(C){return C.key===M.traceId})}function o(S,M){v.select(S).select("path").style("fill-opacity",M),v.select(S).select("rect").style("fill-opacity",M)}function s(S){v.select(S).select("text.name").style("fill","black")}function c(S){return function(M){return S.node.sourceLinks.indexOf(M.link)!==-1||S.node.targetLinks.indexOf(M.link)!==-1}}function m(S){return function(M){return M.node.sourceLinks.indexOf(S.link)!==-1||M.node.targetLinks.indexOf(S.link)!==-1}}function h(S,M,C){M&&C&&n(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(g.bind(0,M,C,!1))}function p(S,M,C){M&&C&&n(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(i.bind(0,M,C,!1))}function g(S,M,C,_){_.style("fill",function(T){if(!T.link.concentrationscale)return T.hoverRgb}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.hoverAlpha}),_.each(function(T){var f=T.link.label;f!==""&&n(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",function(u){if(!u.link.concentrationscale)return u.hoverRgb}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.hoverAlpha})}),C&&n(M,S).selectAll("."+t.sankeyNode).filter(m(S)).call(h)}function i(S,M,C,_){_.style("fill",function(T){return T.rgb}).style("fill-opacity",function(T){return T.alpha}),_.each(function(T){var f=T.link.label;f!==""&&n(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",u=>u.rgb).style("fill-opacity",u=>u.alpha)}),C&&n(M,S).selectAll(t.sankeyNode).filter(m(S)).call(p)}function w(S,M){var C=S.hoverlabel||{},_=x.nestedProperty(C,M).get();return Array.isArray(_)?!1:_}V.exports=function(M,C){for(var _=M._fullLayout,T=_._paper,f=_._size,u=0;u"),color:w(H,"bgcolor")||e.addOpacity(q.color,1),borderColor:w(H,"bordercolor"),fontFamily:w(H,"font.family"),fontSize:w(H,"font.size"),fontColor:w(H,"font.color"),fontWeight:w(H,"font.weight"),fontStyle:w(H,"font.style"),fontVariant:w(H,"font.variant"),fontTextcase:w(H,"font.textcase"),fontLineposition:w(H,"font.lineposition"),fontShadow:w(H,"font.shadow"),nameLength:w(H,"namelength"),textAlign:w(H,"align"),idealAlign:v.event.x<$[0]?"right":"left",hovertemplate:H.hovertemplate,hovertemplateLabels:ee,eventData:[q]})}}var ne=l.loneHover(X,{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M,anchorIndex:G});ne.each(function(){var fe=this;oe.link.concentrationscale||o(fe,.65),s(fe)})},j=function(ae,oe,H){M._fullLayout.hovermode!==!1&&(v.select(ae).call(i.bind(0,oe,H,!0)),oe.link.trace.link.hoverinfo!=="skip"&&(oe.link.fullData=oe.link.trace,M.emit("plotly_unhover",{event:v.event,points:[oe.link]})),l.loneUnhover(_._hoverlayer.node()))},U=function(ae,oe,H){var X=oe.node;X.originalEvent=v.event,M._hoverdata=[X],v.select(ae).call(p,oe,H),l.click(M,{target:!0})},Z=function(ae,oe,H){M._fullLayout.hovermode!==!1&&(v.select(ae).call(h,oe,H),oe.node.trace.node.hoverinfo!=="skip"&&(oe.node.fullData=oe.node.trace,M.emit("plotly_hover",{event:v.event,points:[oe.node]})))},Q=function(ae,oe){if(M._fullLayout.hovermode!==!1){var H=oe.node.trace.node;if(!(H.hoverinfo==="none"||H.hoverinfo==="skip")){var X=v.select(ae).select("."+t.nodeRect),K=M._fullLayout._paperdiv.node().getBoundingClientRect(),G=X.node().getBoundingClientRect(),Y=G.left-2-K.left,q=G.right+2-K.left,$=G.top+G.height/4-K.top,ee={valueLabel:E(oe.valueFormat)(oe.node.value)+oe.valueSuffix};oe.node.fullData=oe.node.trace,M._fullLayout._calcInverseTransform(M);var ne=M._fullLayout._invScaleX,fe=M._fullLayout._invScaleY,ye=l.loneHover({x0:ne*Y,x1:ne*q,y:fe*$,name:E(oe.valueFormat)(oe.node.value)+oe.valueSuffix,text:[oe.node.label,B+oe.node.targetLinks.length,F+oe.node.sourceLinks.length].filter(r).join("
"),color:w(H,"bgcolor")||oe.rgb,borderColor:w(H,"bordercolor"),fontFamily:w(H,"font.family"),fontSize:w(H,"font.size"),fontColor:w(H,"font.color"),fontWeight:w(H,"font.weight"),fontStyle:w(H,"font.style"),fontVariant:w(H,"font.variant"),fontTextcase:w(H,"font.textcase"),fontLineposition:w(H,"font.lineposition"),fontShadow:w(H,"font.shadow"),nameLength:w(H,"namelength"),textAlign:w(H,"align"),idealAlign:"left",hovertemplate:H.hovertemplate,hovertemplateLabels:ee,eventData:[oe.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M});o(ye,.85),s(ye)}}},re=function(ae,oe,H){M._fullLayout.hovermode!==!1&&(v.select(ae).call(p,oe,H),oe.node.trace.node.hoverinfo!=="skip"&&(oe.node.fullData=oe.node.trace,M.emit("plotly_unhover",{event:v.event,points:[oe.node]})),l.loneUnhover(_._hoverlayer.node()))};k(M,T,C,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:z,follow:P,unhover:j,select:b},nodeEvents:{hover:Z,follow:Q,unhover:re,select:U}})}}}),iP=Ee({"src/traces/sankey/base_plot.js"(J){"use strict";var V=El().overrideAll,v=uf().getModuleCalcData,x=x5(),E=Ei(),k=Dh(),l=qf(),e=uc().prepSelect,t=Vr(),a=Ri(),r="sankey";J.name=r,J.baseLayoutAttrOverrides=V({hoverlabel:E.hoverlabel},"plot","nested"),J.plot=function(o){var s=v(o.calcdata,r)[0];x(o,s),J.updateFx(o)},J.clean=function(o,s,c,m){var h=m._has&&m._has(r),p=s._has&&s._has(r);h&&!p&&(m._paperdiv.selectAll(".sankey").remove(),m._paperdiv.selectAll(".bgsankey").remove())},J.updateFx=function(o){for(var s=0;s0}V.exports=function(R,B,F,P){var j=R._fullLayout,U;S(F)&&P&&(U=P()),k.makeTraceGroups(j._indicatorlayer,B,"trace").each(function(Z){var Q=Z[0],re=Q.trace,ae=v.select(this),oe=re._hasGauge,H=re._isAngular,X=re._isBullet,K=re.domain,G={w:j._size.w*(K.x[1]-K.x[0]),h:j._size.h*(K.y[1]-K.y[0]),l:j._size.l+j._size.w*K.x[0],r:j._size.r+j._size.w*(1-K.x[1]),t:j._size.t+j._size.h*(1-K.y[1]),b:j._size.b+j._size.h*K.y[0]},Y=G.l+G.w/2,q=G.t+G.h/2,$=Math.min(G.w/2,G.h),ee=n.innerRadius*$,ne,fe,ye,xe=re.align||"center";if(fe=q,!oe)ne=G.l+i[xe]*G.w,ye=function(se){return A(se,G.w,G.h)};else if(H&&(ne=Y,fe=q+$/2,ye=function(se){return b(se,.9*ee)}),X){var Ae=n.bulletPadding,Me=1-n.bulletNumberDomainSize+Ae;ne=G.l+(Me+(1-Me)*i[xe])*G.w,ye=function(se){return A(se,(n.bulletNumberDomainSize-Ae)*G.w,G.h)}}_(R,ae,Z,{numbersX:ne,numbersY:fe,numbersScaler:ye,transitionOpts:F,onComplete:U});var Ie,Ue;oe&&(Ie={range:re.gauge.axis.range,color:re.gauge.bgcolor,line:{color:re.gauge.bordercolor,width:0},thickness:1},Ue={range:re.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:re.gauge.bordercolor,width:re.gauge.borderwidth},thickness:1});var qe=ae.selectAll("g.angular").data(H?Z:[]);qe.exit().remove();var ke=ae.selectAll("g.angularaxis").data(H?Z:[]);ke.exit().remove(),H&&C(R,ae,Z,{radius:$,innerRadius:ee,gauge:qe,layer:ke,size:G,gaugeBg:Ie,gaugeOutline:Ue,transitionOpts:F,onComplete:U});var ge=ae.selectAll("g.bullet").data(X?Z:[]);ge.exit().remove();var ue=ae.selectAll("g.bulletaxis").data(X?Z:[]);ue.exit().remove(),X&&M(R,ae,Z,{gauge:ge,layer:ue,size:G,gaugeBg:Ie,gaugeOutline:Ue,transitionOpts:F,onComplete:U});var ve=ae.selectAll("text.title").data(Z);ve.exit().remove(),ve.enter().append("text").classed("title",!0),ve.attr("text-anchor",function(){return X?g.right:g[re.title.align]}).text(re.title.text).call(r.font,re.title.font).call(o.convertToTspans,R),ve.attr("transform",function(){var se=G.l+G.w*i[re.title.align],Te,Fe=n.titlePadding,We=r.bBox(ve.node());if(oe){if(H)if(re.gauge.axis.visible){var Ge=r.bBox(ke.node());Te=Ge.top-Fe-We.bottom}else Te=G.t+G.h/2-$/2-We.bottom-Fe;X&&(Te=fe-(We.top+We.bottom)/2,se=G.l-n.bulletPadding*G.w)}else Te=re._numbersTop-Fe-We.bottom;return e(se,Te)})})};function M(N,R,B,F){var P=B[0].trace,j=F.gauge,U=F.layer,Z=F.gaugeBg,Q=F.gaugeOutline,re=F.size,ae=P.domain,oe=F.transitionOpts,H=F.onComplete,X,K,G,Y,q;j.enter().append("g").classed("bullet",!0),j.attr("transform",e(re.l,re.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var $=re.h,ee=P.gauge.bar.thickness*$,ne=ae.x[0],fe=ae.x[0]+(ae.x[1]-ae.x[0])*(P._hasNumber||P._hasDelta?1-n.bulletNumberDomainSize:1);X=u(N,P.gauge.axis),X._id="xbulletaxis",X.domain=[ne,fe],X.setScale(),K=s.calcTicks(X),G=s.makeTransTickFn(X),Y=s.getTickSigns(X)[2],q=re.t+re.h,X.visible&&(s.drawTicks(N,X,{vals:X.ticks==="inside"?s.clipEnds(X,K):K,layer:U,path:s.makeTickPath(X,q,Y),transFn:G}),s.drawLabels(N,X,{vals:K,layer:U,transFn:G,labelFns:s.makeLabelFns(X,q)}));function ye(ke){ke.attr("width",function(ge){return Math.max(0,X.c2p(ge.range[1])-X.c2p(ge.range[0]))}).attr("x",function(ge){return X.c2p(ge.range[0])}).attr("y",function(ge){return .5*(1-ge.thickness)*$}).attr("height",function(ge){return ge.thickness*$})}var xe=[Z].concat(P.gauge.steps),Ae=j.selectAll("g.bg-bullet").data(xe);Ae.enter().append("g").classed("bg-bullet",!0).append("rect"),Ae.select("rect").call(ye).call(T),Ae.exit().remove();var Me=j.selectAll("g.value-bullet").data([P.gauge.bar]);Me.enter().append("g").classed("value-bullet",!0).append("rect"),Me.select("rect").attr("height",ee).attr("y",($-ee)/2).call(T),S(oe)?Me.select("rect").transition().duration(oe.duration).ease(oe.easing).each("end",function(){H&&H()}).each("interrupt",function(){H&&H()}).attr("width",Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y)))):Me.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y))):0),Me.exit().remove();var Ie=B.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),Ue=j.selectAll("g.threshold-bullet").data(Ie);Ue.enter().append("g").classed("threshold-bullet",!0).append("line"),Ue.select("line").attr("x1",X.c2p(P.gauge.threshold.value)).attr("x2",X.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*$).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*$).call(p.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),Ue.exit().remove();var qe=j.selectAll("g.gauge-outline").data([Q]);qe.enter().append("g").classed("gauge-outline",!0).append("rect"),qe.select("rect").call(ye).call(T),qe.exit().remove()}function C(N,R,B,F){var P=B[0].trace,j=F.size,U=F.radius,Z=F.innerRadius,Q=F.gaugeBg,re=F.gaugeOutline,ae=[j.l+j.w/2,j.t+j.h/2+U/2],oe=F.gauge,H=F.layer,X=F.transitionOpts,K=F.onComplete,G=Math.PI/2;function Y(gt){var mt=P.gauge.axis.range[0],Tt=P.gauge.axis.range[1],At=(gt-mt)/(Tt-mt)*Math.PI-G;return At<-G?-G:At>G?G:At}function q(gt){return v.svg.arc().innerRadius((Z+U)/2-gt/2*(U-Z)).outerRadius((Z+U)/2+gt/2*(U-Z)).startAngle(-G)}function $(gt){gt.attr("d",function(mt){return q(mt.thickness).startAngle(Y(mt.range[0])).endAngle(Y(mt.range[1]))()})}var ee,ne,fe,ye;oe.enter().append("g").classed("angular",!0),oe.attr("transform",e(ae[0],ae[1])),H.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),H.selectAll("g.xangularaxistick,path,text").remove(),ee=u(N,P.gauge.axis),ee.type="linear",ee.range=P.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var xe=function(gt){return(ee.range[0]-gt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Ae={},Me=s.makeLabelFns(ee,0),Ie=Me.labelStandoff;Ae.xFn=function(gt){var mt=xe(gt);return Math.cos(mt)*Ie},Ae.yFn=function(gt){var mt=xe(gt),Tt=Math.sin(mt)>0?.2:1;return-Math.sin(mt)*(Ie+gt.fontSize*Tt)+Math.abs(Math.cos(mt))*(gt.fontSize*a)},Ae.anchorFn=function(gt){var mt=xe(gt),Tt=Math.cos(mt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Ae.heightFn=function(gt,mt,Tt){var At=xe(gt);return-.5*(1+Math.sin(At))*Tt};var Ue=function(gt){return e(ae[0]+U*Math.cos(gt),ae[1]-U*Math.sin(gt))};fe=function(gt){return Ue(xe(gt))};var qe=function(gt){var mt=xe(gt);return Ue(mt)+"rotate("+-t(mt)+")"};if(ne=s.calcTicks(ee),ye=s.getTickSigns(ee)[2],ee.visible){ye=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;s.drawTicks(N,ee,{vals:ne,layer:H,path:"M"+ye*ke+",0h"+ye*ee.ticklen,transFn:qe}),s.drawLabels(N,ee,{vals:ne,layer:H,transFn:fe,labelFns:Ae})}var ge=[Q].concat(P.gauge.steps),ue=oe.selectAll("g.bg-arc").data(ge);ue.enter().append("g").classed("bg-arc",!0).append("path"),ue.select("path").call($).call(T),ue.exit().remove();var ve=q(P.gauge.bar.thickness),se=oe.selectAll("g.value-arc").data([P.gauge.bar]);se.enter().append("g").classed("value-arc",!0).append("path");var Te=se.select("path");S(X)?(Te.transition().duration(X.duration).ease(X.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",f(ve,Y(B[0].lastY),Y(B[0].y))),P._lastValue=B[0].y):Te.attr("d",typeof B[0].y=="number"?ve.endAngle(Y(B[0].y)):"M0,0Z"),Te.call(T),se.exit().remove(),ge=[];var Fe=P.gauge.threshold.value;(Fe||Fe===0)&&ge.push({range:[Fe,Fe],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var We=oe.selectAll("g.threshold-arc").data(ge);We.enter().append("g").classed("threshold-arc",!0).append("path"),We.select("path").call($).call(T),We.exit().remove();var Ge=oe.selectAll("g.gauge-outline").data([re]);Ge.enter().append("g").classed("gauge-outline",!0).append("path"),Ge.select("path").call($).call(T),Ge.exit().remove()}function _(N,R,B,F){var P=B[0].trace,j=F.numbersX,U=F.numbersY,Z=P.align||"center",Q=g[Z],re=F.transitionOpts,ae=F.onComplete,oe=k.ensureSingle(R,"g","numbers"),H,X,K,G=[];P._hasNumber&&G.push("number"),P._hasDelta&&(G.push("delta"),P.delta.position==="left"&&G.reverse());var Y=oe.selectAll("text").data(G);Y.enter().append("text"),Y.attr("text-anchor",function(){return Q}).attr("class",function(Ue){return Ue}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Y.exit().remove();function q(Ue,qe,ke,ge){if(Ue.match("s")&&ke>=0!=ge>=0&&!qe(ke).slice(-1).match(w)&&!qe(ge).slice(-1).match(w)){var ue=Ue.slice().replace("s","f").replace(/\d+/,function(se){return parseInt(se)-1}),ve=u(N,{tickformat:ue});return function(se){return Math.abs(se)<1?s.tickText(ve,se).text:qe(se)}}else return qe}function $(){var Ue=u(N,{tickformat:P.number.valueformat},P._range);Ue.setScale(),s.prepTicks(Ue);var qe=function(se){return s.tickText(Ue,se).text},ke=P.number.suffix,ge=P.number.prefix,ue=oe.select("text.number");function ve(){var se=typeof B[0].y=="number"?ge+qe(B[0].y)+ke:"-";ue.text(se).call(r.font,P.number.font).call(o.convertToTspans,N)}return S(re)?ue.transition().duration(re.duration).ease(re.easing).each("end",function(){ve(),ae&&ae()}).each("interrupt",function(){ve(),ae&&ae()}).attrTween("text",function(){var se=v.select(this),Te=E(B[0].lastY,B[0].y);P._lastValue=B[0].y;var Fe=q(P.number.valueformat,qe,B[0].lastY,B[0].y);return function(We){se.text(ge+Fe(Te(We))+ke)}}):ve(),H=z(ge+qe(B[0].y)+ke,P.number.font,Q,N),ue}function ee(){var Ue=u(N,{tickformat:P.delta.valueformat},P._range);Ue.setScale(),s.prepTicks(Ue);var qe=function(We){return s.tickText(Ue,We).text},ke=P.delta.suffix,ge=P.delta.prefix,ue=function(We){var Ge=P.delta.relative?We.relativeDelta:We.delta;return Ge},ve=function(We,Ge){return We===0||typeof We!="number"||isNaN(We)?"-":(We>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+ge+Ge(We)+ke},se=function(We){return We.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=ue(B[0]));var Te=oe.select("text.delta");Te.call(r.font,P.delta.font).call(p.fill,se({delta:P._deltaLastValue}));function Fe(){Te.text(ve(ue(B[0]),qe)).call(p.fill,se(B[0])).call(o.convertToTspans,N)}return S(re)?Te.transition().duration(re.duration).ease(re.easing).tween("text",function(){var We=v.select(this),Ge=ue(B[0]),gt=P._deltaLastValue,mt=q(P.delta.valueformat,qe,gt,Ge),Tt=E(gt,Ge);return P._deltaLastValue=Ge,function(At){We.text(ve(Tt(At),mt)),We.call(p.fill,se({delta:Tt(At)}))}}).each("end",function(){Fe(),ae&&ae()}).each("interrupt",function(){Fe(),ae&&ae()}):Fe(),X=z(ve(ue(B[0]),qe),P.delta.font,Q,N),Te}var ne=P.mode+P.align,fe;if(P._hasDelta&&(fe=ee(),ne+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,ne+=P.delta.increasing.symbol+P.delta.decreasing.symbol,K=X),P._hasNumber&&($(),ne+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,K=H),P._hasDelta&&P._hasNumber){var ye=[(H.left+H.right)/2,(H.top+H.bottom)/2],xe=[(X.left+X.right)/2,(X.top+X.bottom)/2],Ae,Me,Ie=.75*P.delta.font.size;P.delta.position==="left"&&(Ae=I(P,"deltaPos",0,-1*(H.width*i[P.align]+X.width*(1-i[P.align])+Ie),ne,Math.min),Me=ye[1]-xe[1],K={width:H.width+X.width+Ie,height:Math.max(H.height,X.height),left:X.left+Ae,right:H.right,top:Math.min(H.top,X.top+Me),bottom:Math.max(H.bottom,X.bottom+Me)}),P.delta.position==="right"&&(Ae=I(P,"deltaPos",0,H.width*(1-i[P.align])+X.width*i[P.align]+Ie,ne,Math.max),Me=ye[1]-xe[1],K={width:H.width+X.width+Ie,height:Math.max(H.height,X.height),left:H.left,right:X.right+Ae,top:Math.min(H.top,X.top+Me),bottom:Math.max(H.bottom,X.bottom+Me)}),P.delta.position==="bottom"&&(Ae=null,Me=X.height,K={width:Math.max(H.width,X.width),height:H.height+X.height,left:Math.min(H.left,X.left),right:Math.max(H.right,X.right),top:H.bottom-H.height,bottom:H.bottom+X.height}),P.delta.position==="top"&&(Ae=null,Me=H.top,K={width:Math.max(H.width,X.width),height:H.height+X.height,left:Math.min(H.left,X.left),right:Math.max(H.right,X.right),top:H.bottom-H.height-X.height,bottom:H.bottom}),fe.attr({dx:Ae,dy:Me})}(P._hasNumber||P._hasDelta)&&oe.attr("transform",function(){var Ue=F.numbersScaler(K);ne+=Ue[2];var qe=I(P,"numbersScale",1,Ue[0],ne,Math.min),ke;P._scaleNumbers||(qe=1),P._isAngular?ke=U-qe*K.bottom:ke=U-qe*(K.top+K.bottom)/2,P._numbersTop=qe*K.top+ke;var ge=K[Z];Z==="center"&&(ge=(K.left+K.right)/2);var ue=j-qe*ge;return ue=I(P,"numbersTranslate",0,ue,ne,Math.max),e(ue,ke)+l(qe)})}function T(N){N.each(function(R){p.stroke(v.select(this),R.line.color)}).each(function(R){p.fill(v.select(this),R.color)}).style("stroke-width",function(R){return R.line.width})}function f(N,R,B){return function(){var F=x(R,B);return function(P){return N.endAngle(F(P))()}}}function u(N,R,B){var F=N._fullLayout,P=k.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},R),j={type:"linear",_id:"x"+R._id},U={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function Z(Q,re){return k.coerce(P,j,h,Q,re)}return c(P,j,Z,U,F),m(P,j,Z,U),j}function A(N,R,B){var F=Math.min(R/N.width,B/N.height);return[F,N,R+"x"+B]}function b(N,R){var B=Math.sqrt(N.width/2*(N.width/2)+N.height*N.height),F=R/B;return[F,N,R]}function z(N,R,B,F){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),j=v.select(P);return j.text(N).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",N).call(o.convertToTspans,F).call(r.font,R),r.bBox(j.node())}function I(N,R,B,F,P,j){var U="_cache"+R;N[U]&&N[U].key===P||(N[U]={key:P,value:B});var Z=k.aggNums(j,null,[N[U].value,F],2);return N[U].value=Z,Z}}}),dP=Ee({"src/traces/indicator/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"indicator",basePlotModule:uP(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:w5(),supplyDefaults:cP().supplyDefaults,calc:fP().calc,plot:hP(),meta:{}}}}),vP=Ee({"lib/indicator.js"(J,V){"use strict";V.exports=dP()}}),A5=Ee({"src/traces/table/attributes.js"(J,V){"use strict";var v=Kd(),x=vo().extendFlat,E=El().overrideAll,k=Xs(),l=kl().attributes,e=Fl().descriptionOnlyNumbers,t=V.exports=E({domain:l({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:x({},v.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:x({},k({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:x({},v.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:x({},k({arrayOk:!0}))}},"calc","from-root")}}),pP=Ee({"src/traces/table/defaults.js"(J,V){"use strict";var v=Vr(),x=A5(),E=kl().defaults;function k(l,e){for(var t=l.columnorder||[],a=l.header.values.length,r=t.slice(0,a),n=r.slice().sort(function(c,m){return c-m}),o=r.map(function(c){return n.indexOf(c)}),s=o.length;s",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"}}}}),gP=Ee({"src/traces/table/data_preparation_helper.js"(J,V){"use strict";var v=M5(),x=vo().extendFlat,E=mi(),k=vs().isTypedArray,l=vs().isArrayOrTypedArray;V.exports=function(h,p){var g=a(p.cells.values),i=function(Q){return Q.slice(p.header.values.length,Q.length)},w=a(p.header.values);w.length&&!w[0].length&&(w[0]=[""],w=a(w));var S=w.concat(i(g).map(function(){return r((w[0]||[""]).length)})),M=p.domain,C=Math.floor(h._fullLayout._size.w*(M.x[1]-M.x[0])),_=Math.floor(h._fullLayout._size.h*(M.y[1]-M.y[0])),T=p.header.values.length?S[0].map(function(){return p.header.height}):[v.emptyHeaderHeight],f=g.length?g[0].map(function(){return p.cells.height}):[],u=T.reduce(t,0),A=_-u,b=A+v.uplift,z=s(f,b),I=s(T,u),N=o(I,[]),R=o(z,N),B={},F=p.columnorder;l(F)&&(F=Array.from(F)),F=F.concat(i(g.map(function(Q,re){return re})));var P=S.map(function(Q,re){var ae=l(p.columnwidth)?p.columnwidth[Math.min(re,p.columnwidth.length-1)]:p.columnwidth;return E(ae)?Number(ae):1}),j=P.reduce(t,0);P=P.map(function(Q){return Q/j*C});var U=Math.max(e(p.header.line.width),e(p.cells.line.width)),Z={key:p.uid+h._context.staticPlot,translateX:M.x[0]*h._fullLayout._size.w,translateY:h._fullLayout._size.h*(1-M.y[1]),size:h._fullLayout._size,width:C,maxLineWidth:U,height:_,columnOrder:F,groupHeight:_,rowBlocks:R,headerRowBlocks:N,scrollY:0,cells:x({},p.cells,{values:g}),headerCells:x({},p.header,{values:S}),gdColumns:S.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:S.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:S.map(function(Q,re){var ae=B[Q];B[Q]=(ae||0)+1;var oe=Q+"__"+B[Q];return{key:oe,label:Q,specIndex:re,xIndex:F[re],xScale:n,x:void 0,calcdata:void 0,columnWidth:P[re]}})};return Z.columns.forEach(function(Q){Q.calcdata=Z,Q.x=n(Q)}),Z};function e(m){if(l(m)){for(var h=0,p=0;p=h||_===m.length-1)&&(p[i]=S,S.key=C++,S.firstRowIndex=M,S.lastRowIndex=_,S=c(),i+=w,M=_+1,w=0);return p}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),yP=Ee({"src/traces/table/data_split_helpers.js"(J){"use strict";var V=vo().extendFlat;J.splitToPanels=function(x){var E=[0,0],k=V({},x,{key:"header",type:"header",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!0,values:x.calcdata.headerCells.values[x.specIndex],rowBlocks:x.calcdata.headerRowBlocks,calcdata:V({},x.calcdata,{cells:x.calcdata.headerCells})}),l=V({},x,{key:"cells1",type:"cells",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks}),e=V({},x,{key:"cells2",type:"cells",page:1,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:x.calcdata.cells.values[x.specIndex],rowBlocks:x.calcdata.rowBlocks});return[l,e,k]},J.splitToCells=function(x){var E=v(x);return(x.values||[]).slice(E[0],E[1]).map(function(k,l){var e=typeof k=="string"&&k.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:E[0]+l,column:x,calcdata:x.calcdata,page:x.page,rowBlocks:x.rowBlocks,value:k}})};function v(x){var E=x.rowBlocks[x.page],k=E?E.rows[0].rowIndex:0,l=E?k+E.rows.length:0;return[k,l]}}}),S5=Ee({"src/traces/table/plot.js"(J,V){"use strict";var v=M5(),x=Hn(),E=Vr(),k=E.numberFormat,l=Qh(),e=yo(),t=Fs(),a=Vr().raiseToTop,r=Vr().strTranslate,n=Vr().cancelTransition,o=gP(),s=yP(),c=Qa();V.exports=function(ne,fe){var ye=!ne._context.staticPlot,xe=ne._fullLayout._paper.selectAll("."+v.cn.table).data(fe.map(function(Ge){var gt=l.unwrap(Ge),mt=gt.trace;return o(ne,mt)}),l.keyFun);xe.exit().remove(),xe.enter().append("g").classed(v.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),xe.attr("width",function(Ge){return Ge.width+Ge.size.l+Ge.size.r}).attr("height",function(Ge){return Ge.height+Ge.size.t+Ge.size.b}).attr("transform",function(Ge){return r(Ge.translateX,Ge.translateY)});var Ae=xe.selectAll("."+v.cn.tableControlView).data(l.repeat,l.keyFun),Me=Ae.enter().append("g").classed(v.cn.tableControlView,!0).style("box-sizing","content-box");if(ye){var Ie="onwheel"in document?"wheel":"mousewheel";Me.on("mousemove",function(Ge){Ae.filter(function(gt){return Ge===gt}).call(i,ne)}).on(Ie,function(Ge){if(!Ge.scrollbarState.wheeling){Ge.scrollbarState.wheeling=!0;var gt=Ge.scrollY+x.event.deltaY,mt=Q(ne,Ae,null,gt)(Ge);mt||(x.event.stopPropagation(),x.event.preventDefault()),Ge.scrollbarState.wheeling=!1}}).call(i,ne,!0)}Ae.attr("transform",function(Ge){return r(Ge.size.l,Ge.size.t)});var Ue=Ae.selectAll("."+v.cn.scrollBackground).data(l.repeat,l.keyFun);Ue.enter().append("rect").classed(v.cn.scrollBackground,!0).attr("fill","none"),Ue.attr("width",function(Ge){return Ge.width}).attr("height",function(Ge){return Ge.height}),Ae.each(function(Ge){e.setClipUrl(x.select(this),h(ne,Ge),ne)});var qe=Ae.selectAll("."+v.cn.yColumn).data(function(Ge){return Ge.columns},l.keyFun);qe.enter().append("g").classed(v.cn.yColumn,!0),qe.exit().remove(),qe.attr("transform",function(Ge){return r(Ge.x,0)}),ye&&qe.call(x.behavior.drag().origin(function(Ge){var gt=x.select(this);return B(gt,Ge,-v.uplift),a(this),Ge.calcdata.columnDragInProgress=!0,i(Ae.filter(function(mt){return Ge.calcdata.key===mt.key}),ne),Ge}).on("drag",function(Ge){var gt=x.select(this),mt=function(Kt){return(Ge===Kt?x.event.x:Kt.x)+Kt.columnWidth/2};Ge.x=Math.max(-v.overdrag,Math.min(Ge.calcdata.width+v.overdrag-Ge.columnWidth,x.event.x));var Tt=g(qe).filter(function(Kt){return Kt.calcdata.key===Ge.calcdata.key}),At=Tt.sort(function(Kt,nr){return mt(Kt)-mt(nr)});At.forEach(function(Kt,nr){Kt.xIndex=nr,Kt.x=Ge===Kt?Kt.x:Kt.xScale(Kt)}),qe.filter(function(Kt){return Ge!==Kt}).transition().ease(v.transitionEase).duration(v.transitionDuration).attr("transform",function(Kt){return r(Kt.x,0)}),gt.call(n).attr("transform",r(Ge.x,-v.uplift))}).on("dragend",function(Ge){var gt=x.select(this),mt=Ge.calcdata;Ge.x=Ge.xScale(Ge),Ge.calcdata.columnDragInProgress=!1,B(gt,Ge,0),N(ne,mt,mt.columns.map(function(Tt){return Tt.xIndex}))})),qe.each(function(Ge){e.setClipUrl(x.select(this),p(ne,Ge),ne)});var ke=qe.selectAll("."+v.cn.columnBlock).data(s.splitToPanels,l.keyFun);ke.enter().append("g").classed(v.cn.columnBlock,!0).attr("id",function(Ge){return Ge.key}),ke.style("cursor",function(Ge){return Ge.dragHandle?"ew-resize":Ge.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var ge=ke.filter(P),ue=ke.filter(F);ye&&ue.call(x.behavior.drag().origin(function(Ge){return x.event.stopPropagation(),Ge}).on("drag",Q(ne,Ae,-1)).on("dragend",function(){})),w(ne,Ae,ge,ke),w(ne,Ae,ue,ke);var ve=Ae.selectAll("."+v.cn.scrollAreaClip).data(l.repeat,l.keyFun);ve.enter().append("clipPath").classed(v.cn.scrollAreaClip,!0).attr("id",function(Ge){return h(ne,Ge)});var se=ve.selectAll("."+v.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);se.enter().append("rect").classed(v.cn.scrollAreaClipRect,!0).attr("x",-v.overdrag).attr("y",-v.uplift).attr("fill","none"),se.attr("width",function(Ge){return Ge.width+2*v.overdrag}).attr("height",function(Ge){return Ge.height+v.uplift});var Te=qe.selectAll("."+v.cn.columnBoundary).data(l.repeat,l.keyFun);Te.enter().append("g").classed(v.cn.columnBoundary,!0);var Fe=qe.selectAll("."+v.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Fe.enter().append("clipPath").classed(v.cn.columnBoundaryClippath,!0),Fe.attr("id",function(Ge){return p(ne,Ge)});var We=Fe.selectAll("."+v.cn.columnBoundaryRect).data(l.repeat,l.keyFun);We.enter().append("rect").classed(v.cn.columnBoundaryRect,!0).attr("fill","none"),We.attr("width",function(Ge){return Ge.columnWidth+2*m(Ge)}).attr("height",function(Ge){return Ge.calcdata.height+2*m(Ge)+v.uplift}).attr("x",function(Ge){return-m(Ge)}).attr("y",function(Ge){return-m(Ge)}),Z(null,ue,Ae)};function m(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function h(ee,ne){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+ne.key}function p(ee,ne){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+ne.calcdata.key+"_"+ne.specIndex}function g(ee){return[].concat.apply([],ee.map(function(ne){return ne})).map(function(ne){return ne.__data__})}function i(ee,ne,fe){function ye(qe){var ke=qe.rowBlocks;return K(ke,ke.length-1)+(ke.length?G(ke[ke.length-1],1/0):1)}var xe=ee.selectAll("."+v.cn.scrollbarKit).data(l.repeat,l.keyFun);xe.enter().append("g").classed(v.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),xe.each(function(qe){var ke=qe.scrollbarState;ke.totalHeight=ye(qe),ke.scrollableAreaHeight=qe.groupHeight-j(qe),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,v.goldenRatio*v.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:qe.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(qe){var ke=qe.width+v.scrollbarWidth/2+v.scrollbarOffset;return r(ke,j(qe))});var Ae=xe.selectAll("."+v.cn.scrollbar).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(v.cn.scrollbar,!0);var Me=Ae.selectAll("."+v.cn.scrollbarSlider).data(l.repeat,l.keyFun);Me.enter().append("g").classed(v.cn.scrollbarSlider,!0),Me.attr("transform",function(qe){return r(0,qe.scrollbarState.topY||0)});var Ie=Me.selectAll("."+v.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ie.enter().append("line").classed(v.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",v.scrollbarWidth).attr("stroke-linecap","round").attr("y1",v.scrollbarWidth/2),Ie.attr("y2",function(qe){return qe.scrollbarState.barLength-v.scrollbarWidth/2}).attr("stroke-opacity",function(qe){return qe.columnDragInProgress||!qe.scrollbarState.barWiggleRoom||fe?0:.4}),Ie.transition().delay(0).duration(0),Ie.transition().delay(v.scrollbarHideDelay).duration(v.scrollbarHideDuration).attr("stroke-opacity",0);var Ue=Ae.selectAll("."+v.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);Ue.enter().append("line").classed(v.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",v.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(qe){var ke=x.event.y,ge=this.getBoundingClientRect(),ue=qe.scrollbarState,ve=ke-ge.top,se=x.scale.linear().domain([0,ue.scrollableAreaHeight]).range([0,ue.totalHeight]).clamp(!0);ue.topY<=ve&&ve<=ue.bottomY||Q(ne,ee,null,se(ve-ue.barLength/2))(qe)}).call(x.behavior.drag().origin(function(qe){return x.event.stopPropagation(),qe.scrollbarState.scrollbarScrollInProgress=!0,qe}).on("drag",Q(ne,ee)).on("dragend",function(){})),Ue.attr("y2",function(qe){return qe.scrollbarState.scrollableAreaHeight}),ne._context.staticPlot&&(Ie.remove(),Ue.remove())}function w(ee,ne,fe,ye){var xe=S(fe),Ae=M(xe);f(Ae);var Me=C(Ae);A(Me);var Ie=T(Ae),Ue=_(Ie);u(Ue),b(Ue,ne,ye,ee),X(Ae)}function S(ee){var ne=ee.selectAll("."+v.cn.columnCells).data(l.repeat,l.keyFun);return ne.enter().append("g").classed(v.cn.columnCells,!0),ne.exit().remove(),ne}function M(ee){var ne=ee.selectAll("."+v.cn.columnCell).data(s.splitToCells,function(fe){return fe.keyWithinBlock});return ne.enter().append("g").classed(v.cn.columnCell,!0),ne.exit().remove(),ne}function C(ee){var ne=ee.selectAll("."+v.cn.cellRect).data(l.repeat,function(fe){return fe.keyWithinBlock});return ne.enter().append("rect").classed(v.cn.cellRect,!0),ne}function _(ee){var ne=ee.selectAll("."+v.cn.cellText).data(l.repeat,function(fe){return fe.keyWithinBlock});return ne.enter().append("text").classed(v.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){x.event.stopPropagation()}),ne}function T(ee){var ne=ee.selectAll("."+v.cn.cellTextHolder).data(l.repeat,function(fe){return fe.keyWithinBlock});return ne.enter().append("g").classed(v.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ne}function f(ee){ee.each(function(ne,fe){var ye=ne.calcdata.cells.font,xe=ne.column.specIndex,Ae={size:R(ye.size,xe,fe),color:R(ye.color,xe,fe),family:R(ye.family,xe,fe),weight:R(ye.weight,xe,fe),style:R(ye.style,xe,fe),variant:R(ye.variant,xe,fe),textcase:R(ye.textcase,xe,fe),lineposition:R(ye.lineposition,xe,fe),shadow:R(ye.shadow,xe,fe)};ne.rowNumber=ne.key,ne.align=R(ne.calcdata.cells.align,xe,fe),ne.cellBorderWidth=R(ne.calcdata.cells.line.width,xe,fe),ne.font=Ae})}function u(ee){ee.each(function(ne){e.font(x.select(this),ne.font)})}function A(ee){ee.attr("width",function(ne){return ne.column.columnWidth}).attr("stroke-width",function(ne){return ne.cellBorderWidth}).each(function(ne){var fe=x.select(this);c.stroke(fe,R(ne.calcdata.cells.line.color,ne.column.specIndex,ne.rowNumber)),c.fill(fe,R(ne.calcdata.cells.fill.color,ne.column.specIndex,ne.rowNumber))})}function b(ee,ne,fe,ye){ee.text(function(xe){var Ae=xe.column.specIndex,Me=xe.rowNumber,Ie=xe.value,Ue=typeof Ie=="string",qe=Ue&&Ie.match(/
/i),ke=!Ue||qe;xe.mayHaveMarkup=Ue&&Ie.match(/[<&>]/);var ge=z(Ie);xe.latex=ge;var ue=ge?"":R(xe.calcdata.cells.prefix,Ae,Me)||"",ve=ge?"":R(xe.calcdata.cells.suffix,Ae,Me)||"",se=ge?null:R(xe.calcdata.cells.format,Ae,Me)||null,Te=ue+(se?k(se)(xe.value):xe.value)+ve,Fe;xe.wrappingNeeded=!xe.wrapped&&!ke&&!ge&&(Fe=I(Te)),xe.cellHeightMayIncrease=qe||ge||xe.mayHaveMarkup||(Fe===void 0?I(Te):Fe),xe.needsConvertToTspans=xe.mayHaveMarkup||xe.wrappingNeeded||xe.latex;var We;if(xe.wrappingNeeded){var Ge=v.wrapSplitCharacter===" "?Te.replace(/xe&&ye.push(Ae),xe+=Ue}return ye}function Z(ee,ne,fe){var ye=g(ne)[0];if(ye!==void 0){var xe=ye.rowBlocks,Ae=ye.calcdata,Me=K(xe,xe.length),Ie=ye.calcdata.groupHeight-j(ye),Ue=Ae.scrollY=Math.max(0,Math.min(Me-Ie,Ae.scrollY)),qe=U(xe,Ue,Ie);qe.length===1&&(qe[0]===xe.length-1?qe.unshift(qe[0]-1):qe.push(qe[0]+1)),qe[0]%2&&qe.reverse(),ne.each(function(ke,ge){ke.page=qe[ge],ke.scrollY=Ue}),ne.attr("transform",function(ke){var ge=K(ke.rowBlocks,ke.page)-ke.scrollY;return r(0,ge)}),ee&&(re(ee,fe,ne,qe,ye.prevPages,ye,0),re(ee,fe,ne,qe,ye.prevPages,ye,1),i(fe,ee))}}function Q(ee,ne,fe,ye){return function(Ae){var Me=Ae.calcdata?Ae.calcdata:Ae,Ie=ne.filter(function(ge){return Me.key===ge.key}),Ue=fe||Me.scrollbarState.dragMultiplier,qe=Me.scrollY;Me.scrollY=ye===void 0?Me.scrollY+Ue*x.event.dy:ye;var ke=Ie.selectAll("."+v.cn.yColumn).selectAll("."+v.cn.columnBlock).filter(F);return Z(ee,ke,Ie),Me.scrollY===qe}}function re(ee,ne,fe,ye,xe,Ae,Me){var Ie=ye[Me]!==xe[Me];Ie&&(clearTimeout(Ae.currentRepaint[Me]),Ae.currentRepaint[Me]=setTimeout(function(){var Ue=fe.filter(function(qe,ke){return ke===Me&&ye[ke]!==xe[ke]});w(ee,ne,Ue,fe),xe[Me]=ye[Me]}))}function ae(ee,ne,fe,ye){return function(){var Ae=x.select(ne.parentNode);Ae.each(function(Me){var Ie=Me.fragments;Ae.selectAll("tspan.line").each(function(Te,Fe){Ie[Fe].width=this.getComputedTextLength()});var Ue=Ie[Ie.length-1].width,qe=Ie.slice(0,-1),ke=[],ge,ue,ve=0,se=Me.column.columnWidth-2*v.cellPad;for(Me.value="";qe.length;)ge=qe.shift(),ue=ge.width+Ue,ve+ue>se&&(Me.value+=ke.join(v.wrapSpacer)+v.lineBreaker,ke=[],ve=0),ke.push(ge.text),ve+=ue;ve&&(Me.value+=ke.join(v.wrapSpacer)),Me.wrapped=!0}),Ae.selectAll("tspan.line").remove(),b(Ae.select("."+v.cn.cellText),fe,ee,ye),x.select(ne.parentNode.parentNode).call(X)}}function oe(ee,ne,fe,ye,xe){return function(){if(!xe.settledY){var Me=x.select(ne.parentNode),Ie=q(xe),Ue=xe.key-Ie.firstRowIndex,qe=Ie.rows[Ue].rowHeight,ke=xe.cellHeightMayIncrease?ne.parentNode.getBoundingClientRect().height+2*v.cellPad:qe,ge=Math.max(ke,qe),ue=ge-Ie.rows[Ue].rowHeight;ue&&(Ie.rows[Ue].rowHeight=ge,ee.selectAll("."+v.cn.columnCell).call(X),Z(null,ee.filter(F),0),i(fe,ye,!0)),Me.attr("transform",function(){var ve=this,se=ve.parentNode,Te=se.getBoundingClientRect(),Fe=x.select(ve.parentNode).select("."+v.cn.cellRect).node().getBoundingClientRect(),We=ve.transform.baseVal.consolidate(),Ge=Fe.top-Te.top+(We?We.matrix.f:v.cellPad);return r(H(xe,x.select(ve.parentNode).select("."+v.cn.cellTextHolder).node().getBoundingClientRect().width),Ge)}),xe.settledY=!0}}}function H(ee,ne){switch(ee.align){case"left":return v.cellPad;case"right":return ee.column.columnWidth-(ne||0)-v.cellPad;case"center":return(ee.column.columnWidth-(ne||0))/2;default:return v.cellPad}}function X(ee){ee.attr("transform",function(ne){var fe=ne.rowBlocks[0].auxiliaryBlocks.reduce(function(Me,Ie){return Me+G(Ie,1/0)},0),ye=q(ne),xe=G(ye,ne.key),Ae=xe+fe;return r(0,Ae)}).selectAll("."+v.cn.cellRect).attr("height",function(ne){return $(q(ne),ne.key).rowHeight})}function K(ee,ne){for(var fe=0,ye=ne-1;ye>=0;ye--)fe+=Y(ee[ye]);return fe}function G(ee,ne){for(var fe=0,ye=0;yek.length&&(E=E.slice(0,k.length)):E=[],e=0;e90&&(h-=180,n=-n),{angle:h,flip:n,p:x.c2p(l,E,k),offsetMultplier:o}}}}),kP=Ee({"src/traces/carpet/plot.js"(J,V){"use strict";var v=Hn(),x=yo(),E=E5(),k=k5(),l=EP(),e=Fs(),t=Vr(),a=t.strRotate,r=t.strTranslate,n=rc();V.exports=function(w,S,M,C){var _=w._context.staticPlot,T=S.xaxis,f=S.yaxis,u=w._fullLayout,A=u._clips;t.makeTraceGroups(C,M,"trace").each(function(b){var z=v.select(this),I=b[0],N=I.trace,R=N.aaxis,B=N.baxis,F=t.ensureSingle(z,"g","minorlayer"),P=t.ensureSingle(z,"g","majorlayer"),j=t.ensureSingle(z,"g","boundarylayer"),U=t.ensureSingle(z,"g","labellayer");z.style("opacity",N.opacity),s(T,f,P,R,"a",R._gridlines,!0,_),s(T,f,P,B,"b",B._gridlines,!0,_),s(T,f,F,R,"a",R._minorgridlines,!0,_),s(T,f,F,B,"b",B._minorgridlines,!0,_),s(T,f,j,R,"a-boundary",R._boundarylines,_),s(T,f,j,B,"b-boundary",B._boundarylines,_);var Z=c(w,T,f,N,I,U,R._labels,"a-label"),Q=c(w,T,f,N,I,U,B._labels,"b-label");m(w,U,N,I,T,f,Z,Q),o(N,I,A,T,f)})};function o(i,w,S,M,C){var _,T,f,u,A=S.select("#"+i._clipPathId);A.size()||(A=S.append("clipPath").classed("carpetclip",!0));var b=t.ensureSingle(A,"path","carpetboundary"),z=w.clipsegments,I=[];for(u=0;u0?"start":"end","data-notex":1}).call(x.font,z.font).text(z.text).call(e.convertToTspans,i),P=x.bBox(this);F.attr("transform",r(N.p[0],N.p[1])+a(N.angle)+r(z.axis.labelpadding*B,P.height*.3)),A=Math.max(A,P.width+z.axis.labelpadding)}),u.exit().remove(),b.maxExtent=A,b}function m(i,w,S,M,C,_,T,f){var u,A,b,z,I=t.aggNums(Math.min,null,S.a),N=t.aggNums(Math.max,null,S.a),R=t.aggNums(Math.min,null,S.b),B=t.aggNums(Math.max,null,S.b);u=.5*(I+N),A=R,b=S.ab2xy(u,A,!0),z=S.dxyda_rough(u,A),T.angle===void 0&&t.extendFlat(T,l(S,C,_,b,S.dxydb_rough(u,A))),g(i,w,S,M,b,z,S.aaxis,C,_,T,"a-title"),u=I,A=.5*(R+B),b=S.ab2xy(u,A,!0),z=S.dxydb_rough(u,A),f.angle===void 0&&t.extendFlat(f,l(S,C,_,b,S.dxyda_rough(u,A))),g(i,w,S,M,b,z,S.baxis,C,_,f,"b-title")}var h=n.LINE_SPACING,p=(1-n.MID_SHIFT)/h+1;function g(i,w,S,M,C,_,T,f,u,A,b){var z=[];T.title.text&&z.push(T.title.text);var I=w.selectAll("text."+b).data(z),N=A.maxExtent;I.enter().append("text").classed(b,!0),I.each(function(){var R=l(S,f,u,C,_);["start","both"].indexOf(T.showticklabels)===-1&&(N=0);var B=T.title.font.size;N+=B+T.title.offset;var F=A.angle+(A.flip<0?180:0),P=(F-R.angle+450)%360,j=P>90&&P<270,U=v.select(this);U.text(T.title.text).call(e.convertToTspans,i),j&&(N=(-e.lineCount(U)+p)*h*B-N),U.attr("transform",r(R.p[0],R.p[1])+a(R.angle)+r(0,N)).attr("text-anchor","middle").call(x.font,T.title.font)}),I.exit().remove()}}}),CP=Ee({"src/traces/carpet/cheater_basis.js"(J,V){"use strict";var v=Vr().isArrayOrTypedArray;V.exports=function(x,E,k){var l,e,t,a,r,n,o=[],s=v(x)?x.length:x,c=v(E)?E.length:E,m=v(x)?x:null,h=v(E)?E:null;m&&(t=(m.length-1)/(m[m.length-1]-m[0])/(s-1)),h&&(a=(h.length-1)/(h[h.length-1]-h[0])/(c-1));var p,g=1/0,i=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=E.length,a=0;a0&&(G=k.dxydi([],Z-1,re,0,ae),ee.push(oe[0]+G[0]/3),ne.push(oe[1]+G[1]/3),Y=k.dxydi([],Z-1,re,1,ae),ee.push(K[0]-Y[0]/3),ne.push(K[1]-Y[1]/3)),ee.push(K[0]),ne.push(K[1]),oe=K;else for(Z=k.a2i(U),H=Math.floor(Math.max(0,Math.min(R-2,Z))),X=Z-H,fe.length=R,fe.crossLength=B,fe.xy=function(ye){return k.evalxy([],Z,ye)},fe.dxy=function(ye,xe){return k.dxydj([],H,ye,X,xe)},Q=0;Q0&&(q=k.dxydj([],H,Q-1,X,0),ee.push(oe[0]+q[0]/3),ne.push(oe[1]+q[1]/3),$=k.dxydj([],H,Q-1,X,1),ee.push(K[0]-$[0]/3),ne.push(K[1]-$[1]/3)),ee.push(K[0]),ne.push(K[1]),oe=K;return fe.axisLetter=l,fe.axis=C,fe.crossAxis=A,fe.value=U,fe.constvar=e,fe.index=m,fe.x=ee,fe.y=ne,fe.smoothing=A.smoothing,fe}function j(U){var Z,Q,re,ae,oe,H=[],X=[],K={};if(K.length=M.length,K.crossLength=u.length,l==="b")for(re=Math.max(0,Math.min(B-2,U)),oe=Math.min(1,Math.max(0,U-re)),K.xy=function(G){return k.evalxy([],G,U)},K.dxy=function(G,Y){return k.dxydi([],G,re,Y,oe)},Z=0;ZM.length-1)&&_.push(x(j(a),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s;mM.length-1)&&!(g<0||g>M.length-1))for(i=M[r],w=M[g],t=0;tM[M.length-1])&&T.push(x(P(p),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&f.push(x(j(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(x(j(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(n=5e-15,o=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+n)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+n))].sort(function(U,Z){return U-Z}),s=o[0],c=o[1],m=s;m<=c;m++)h=C.tick0+C.dtick*m,_.push(x(P(h),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s-1;mM[M.length-1])&&T.push(x(P(p),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&f.push(x(P(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(x(P(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),DP=Ee({"src/traces/carpet/calc_labels.js"(J,V){"use strict";var v=uo(),x=vo().extendFlat;V.exports=function(k,l){var e,t,a,r,n,o=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=x[c][e],a[s-e]=E[c][e];for(r.push({x:t,y:a,bicubic:n}),e=c,t=[],a=[];e>=0;e--)t[c-e]=x[e][0],a[c-e]=E[e][0];return r.push({x:t,y:a,bicubic:o}),r}}}),RP=Ee({"src/traces/carpet/smooth_fill_2d_array.js"(J,V){"use strict";var v=Vr();V.exports=function(E,k,l){var e,t,a,r=[],n=[],o=E[0].length,s=E.length;function c(Q,re){var ae=0,oe,H=0;return Q>0&&(oe=E[re][Q-1])!==void 0&&(H++,ae+=oe),Q0&&(oe=E[re-1][Q])!==void 0&&(H++,ae+=oe),re0&&t0&&eu);return v.log("Smoother converged to",A,"after",z,"iterations"),E}}}),FP=Ee({"src/traces/carpet/constants.js"(J,V){"use strict";V.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),zP=Ee({"src/traces/carpet/catmull_rom.js"(J,V){"use strict";var v=.5;V.exports=function(E,k,l,e){var t=E[0]-k[0],a=E[1]-k[1],r=l[0]-k[0],n=l[1]-k[1],o=Math.pow(t*t+a*a,v/2),s=Math.pow(r*r+n*n,v/2),c=(s*s*t-o*o*r)*e,m=(s*s*a-o*o*n)*e,h=s*(o+s)*3,p=o*(o+s)*3;return[[k[0]+(h&&c/h),k[1]+(h&&m/h)],[k[0]-(p&&c/p),k[1]-(p&&m/p)]]}}}),BP=Ee({"src/traces/carpet/compute_control_points.js"(J,V){"use strict";var v=zP(),x=Vr().ensureArray;function E(k,l,e){var t=-.5*e[0]+1.5*l[0],a=-.5*e[1]+1.5*l[1];return[(2*t+k[0])/3,(2*a+k[1])/3]}V.exports=function(l,e,t,a,r,n){var o,s,c,m,h,p,g,i,w,S,M=t[0].length,C=t.length,_=r?3*M-2:M,T=n?3*C-2:C;for(l=x(l,T),e=x(e,T),c=0;ch&&_g&&Tp||Ti},a.setScale=function(){var _=a._x,T=a._y,f=E(a._xctrl,a._yctrl,_,T,c.smoothing,m.smoothing);a._xctrl=f[0],a._yctrl=f[1],a.evalxy=k([a._xctrl,a._yctrl],o,s,c.smoothing,m.smoothing),a.dxydi=l([a._xctrl,a._yctrl],c.smoothing,m.smoothing),a.dxydj=e([a._xctrl,a._yctrl],c.smoothing,m.smoothing)},a.i2a=function(_){var T=Math.max(0,Math.floor(_[0]),o-2),f=_[0]-T;return(1-f)*r[T]+f*r[T+1]},a.j2b=function(_){var T=Math.max(0,Math.floor(_[1]),o-2),f=_[1]-T;return(1-f)*n[T]+f*n[T+1]},a.ij2ab=function(_){return[a.i2a(_[0]),a.j2b(_[1])]},a.a2i=function(_){var T=Math.max(0,Math.min(x(_,r),o-2)),f=r[T],u=r[T+1];return Math.max(0,Math.min(o-1,T+(_-f)/(u-f)))},a.b2j=function(_){var T=Math.max(0,Math.min(x(_,n),s-2)),f=n[T],u=n[T+1];return Math.max(0,Math.min(s-1,T+(_-f)/(u-f)))},a.ab2ij=function(_){return[a.a2i(_[0]),a.b2j(_[1])]},a.i2c=function(_,T){return a.evalxy([],_,T)},a.ab2xy=function(_,T,f){if(!f&&(_r[o-1]|Tn[s-1]))return[!1,!1];var u=a.a2i(_),A=a.b2j(T),b=a.evalxy([],u,A);if(f){var z=0,I=0,N=[],R,B,F,P;_r[o-1]?(R=o-2,B=1,z=(_-r[o-1])/(r[o-1]-r[o-2])):(R=Math.max(0,Math.min(o-2,Math.floor(u))),B=u-R),Tn[s-1]?(F=s-2,P=1,I=(T-n[s-1])/(n[s-1]-n[s-2])):(F=Math.max(0,Math.min(s-2,Math.floor(A))),P=A-F),z&&(a.dxydi(N,R,F,B,P),b[0]+=N[0]*z,b[1]+=N[1]*z),I&&(a.dxydj(N,R,F,B,P),b[0]+=N[0]*I,b[1]+=N[1]*I)}return b},a.c2p=function(_,T,f){return[T.c2p(_[0]),f.c2p(_[1])]},a.p2x=function(_,T,f){return[T.p2c(_[0]),f.p2c(_[1])]},a.dadi=function(_){var T=Math.max(0,Math.min(r.length-2,_));return r[T+1]-r[T]},a.dbdj=function(_){var T=Math.max(0,Math.min(n.length-2,_));return n[T+1]-n[T]},a.dxyda=function(_,T,f,u){var A=a.dxydi(null,_,T,f,u),b=a.dadi(_,f);return[A[0]/b,A[1]/b]},a.dxydb=function(_,T,f,u){var A=a.dxydj(null,_,T,f,u),b=a.dbdj(T,u);return[A[0]/b,A[1]/b]},a.dxyda_rough=function(_,T,f){var u=w*(f||.1),A=a.ab2xy(_+u,T,!0),b=a.ab2xy(_-u,T,!0);return[(A[0]-b[0])*.5/u,(A[1]-b[1])*.5/u]},a.dxydb_rough=function(_,T,f){var u=S*(f||.1),A=a.ab2xy(_,T+u,!0),b=a.ab2xy(_,T-u,!0);return[(A[0]-b[0])*.5/u,(A[1]-b[1])*.5/u]},a.dpdx=function(_){return _._m},a.dpdy=function(_){return _._m}}}}),qP=Ee({"src/traces/carpet/calc.js"(J,V){"use strict";var v=uo(),x=Vr().isArray1D,E=CP(),k=LP(),l=PP(),e=DP(),t=IP(),a=f1(),r=RP(),n=c1(),o=UP();V.exports=function(c,m){var h=v.getFromId(c,m.xaxis),p=v.getFromId(c,m.yaxis),g=m.aaxis,i=m.baxis,w=m.x,S=m.y,M=[];w&&x(w)&&M.push("x"),S&&x(S)&&M.push("y"),M.length&&n(m,g,i,"a","b",M);var C=m._a=m._a||m.a,_=m._b=m._b||m.b;w=m._x||m.x,S=m._y||m.y;var T={};if(m._cheater){var f=g.cheatertype==="index"?C.length:C,u=i.cheatertype==="index"?_.length:_;w=E(f,u,m.cheaterslope)}m._x=w=a(w),m._y=S=a(S),r(w,C,_),r(S,C,_),o(m),m.setScale();var A=k(w),b=k(S),z=.5*(A[1]-A[0]),I=.5*(A[1]+A[0]),N=.5*(b[1]-b[0]),R=.5*(b[1]+b[0]),B=1.3;return A=[I-z*B,I+z*B],b=[R-N*B,R+N*B],m._extremes[h._id]=v.findExtremes(h,A,{padded:!0}),m._extremes[p._id]=v.findExtremes(p,b,{padded:!0}),l(m,"a","b"),l(m,"b","a"),e(m,g),e(m,i),T.clipsegments=t(m._xctrl,m._yctrl,g,i),T.x=w,T.y=S,T.a=C,T.b=_,[T]}}}),VP=Ee({"src/traces/carpet/index.js"(J,V){"use strict";V.exports={attributes:Xy(),supplyDefaults:SP(),plot:kP(),calc:qP(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Mu(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),HP=Ee({"lib/carpet.js"(J,V){"use strict";V.exports=VP()}}),C5=Ee({"src/traces/scattercarpet/attributes.js"(J,V){"use strict";var v=Yh(),x=ou(),E=ia(),{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=Cs(),t=$s(),a=vo().extendFlat,r=x.marker,n=x.line,o=r.line;V.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:a({},x.mode,{dflt:"markers"}),text:a({},x.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:a({},x.hovertext,{}),line:{color:n.color,width:n.width,dash:n.dash,backoff:n.backoff,shape:a({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:x.connectgaps,fill:a({},x.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:v(),marker:a({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:a({width:o.width,dash:o.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:x.textfont,textposition:x.textposition,selected:x.selected,unselected:x.unselected,hoverinfo:a({},E.hoverinfo,{flags:["a","b","text","name"]}),hoveron:x.hoveron,hovertemplate:k(),hovertemplatefallback:e(),zorder:x.zorder}}}),GP=Ee({"src/traces/scattercarpet/defaults.js"(J,V){"use strict";var v=Vr(),x=Wh(),E=al(),k=gh(),l=Rh(),e=Up(),t=Fh(),a=Xh(),r=C5();V.exports=function(o,s,c,m){function h(C,_){return v.coerce(o,s,r,C,_)}h("carpet"),s.xaxis="x",s.yaxis="y";var p=h("a"),g=h("b"),i=Math.min(p.length,g.length);if(!i){s.visible=!1;return}s._length=i,h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext");var w=i0?T=C.labelprefix.replace(/ = $/,""):T=C._hovertitle,i.push(T+": "+_.toFixed(3)+C.labelsuffix)}if(!h.hovertemplate){var S=m.hi||h.hoverinfo,M=S.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&w(p.aaxis,m.a),M.indexOf("b")!==-1&&w(p.baxis,m.b),i.push("y: "+r.yLabel),M.indexOf("text")!==-1&&x(m,h,i),r.extraText=i.join("
")}return a}}}),ZP=Ee({"src/traces/scattercarpet/event_data.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){var t=l[e];return x.a=t.a,x.b=t.b,x.y=t.y,x}}}),KP=Ee({"src/traces/scattercarpet/index.js"(J,V){"use strict";V.exports={attributes:C5(),supplyDefaults:GP(),colorbar:ff(),formatLabels:WP(),calc:YP(),plot:XP(),style:eh().style,styleOnSelect:eh().styleOnSelect,hoverPoints:$P(),selectPoints:Fv(),eventData:ZP(),moduleType:"trace",name:"scattercarpet",basePlotModule:Mu(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),JP=Ee({"lib/scattercarpet.js"(J,V){"use strict";V.exports=KP()}}),L5=Ee({"src/traces/contourcarpet/attributes.js"(J,V){"use strict";var v=Yp(),x=am(),E=$s(),k=vo().extendFlat,l=x.contours;V.exports=k({carpet:{valType:"string",editType:"calc"},z:v.z,a:v.x,a0:v.x0,da:v.dx,b:v.y,b0:v.y0,db:v.dy,text:v.text,hovertext:v.hovertext,transpose:v.transpose,atype:v.xtype,btype:v.ytype,fillcolor:x.fillcolor,autocontour:x.autocontour,ncontours:x.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:x.line.color,width:x.line.width,dash:x.line.dash,smoothing:x.line.smoothing,editType:"plot"},zorder:x.zorder},E("",{cLetter:"z",autoColorDflt:!1}))}}),P5=Ee({"src/traces/contourcarpet/defaults.js"(J,V){"use strict";var v=Vr(),x=u1(),E=L5(),k=Xx(),l=T1(),e=A1();V.exports=function(a,r,n,o){function s(p,g){return v.coerce(a,r,E,p,g)}function c(p){return v.coerce2(a,r,E,p)}if(s("carpet"),a.a&&a.b){var m=x(a,r,s,o,"a","b");if(!m){r.visible=!1;return}s("text");var h=s("contours.type")==="constraint";h?k(a,r,s,o,n,{hasHover:!1}):(l(a,r,s,c),e(a,r,s,o,{hasHover:!1}))}else r._defaultColor=n,r._length=null;s("zorder")}}}),QP=Ee({"src/traces/contourcarpet/calc.js"(J,V){"use strict";var v=Sf(),x=Vr(),E=c1(),k=f1(),l=h1(),e=d1(),t=Dx(),a=P5(),r=$y(),n=Ox();V.exports=function(c,m){var h=m._carpetTrace=r(c,m);if(!(!h||!h.visible||h.visible==="legendonly")){if(!m.a||!m.b){var p=c.data[h.index],g=c.data[m.index];g.a||(g.a=p.a),g.b||(g.b=p.b),a(g,m,m._defaultColor,c._fullLayout)}var i=o(c,m);return n(m,m._z),i}};function o(s,c){var m=c._carpetTrace,h=m.aaxis,p=m.baxis,g,i,w,S,M,C,_;h._minDtick=0,p._minDtick=0,x.isArray1D(c.z)&&E(c,h,p,"a","b",["z"]),g=c._a=c._a||c.a,S=c._b=c._b||c.b,g=g?h.makeCalcdata(c,"_a"):[],S=S?p.makeCalcdata(c,"_b"):[],i=c.a0||0,w=c.da||1,M=c.b0||0,C=c.db||1,_=c._z=k(c._z||c.z,c.transpose),c._emptypoints=e(_),l(_,c._emptypoints);var T=x.maxRowLength(_),f=c.xtype==="scaled"?"":g,u=t(c,f,i,w,T,h),A=c.ytype==="scaled"?"":S,b=t(c,A,M,C,_.length,p),z={a:u,b,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&v(s,c,{vals:_,containerStr:"",cLetter:"z"}),[z]}}}),eD=Ee({"src/traces/carpet/axis_aligned_line.js"(J,V){"use strict";var v=Vr().isArrayOrTypedArray;V.exports=function(x,E,k,l){var e,t,a,r,n,o,s,c,m,h,p,g,i,w=v(k)?"a":"b",S=w==="a"?x.aaxis:x.baxis,M=S.smoothing,C=w==="a"?x.a2i:x.b2j,_=w==="a"?k:l,T=w==="a"?l:k,f=w==="a"?E.a.length:E.b.length,u=w==="a"?E.b.length:E.a.length,A=Math.floor(w==="a"?x.b2j(T):x.a2i(T)),b=w==="a"?function(re){return x.evalxy([],re,A)}:function(re){return x.evalxy([],A,re)};M&&(a=Math.max(0,Math.min(u-2,A)),r=A-a,t=w==="a"?function(re,ae){return x.dxydi([],re,a,ae,r)}:function(re,ae){return x.dxydj([],a,re,r,ae)});var z=C(_[0]),I=C(_[1]),N=z0?Math.floor:Math.ceil,F=N>0?Math.ceil:Math.floor,P=N>0?Math.min:Math.max,j=N>0?Math.max:Math.min,U=B(z+R),Z=F(I-R);s=b(z);var Q=[[s]];for(e=U;e*N=0;fe--)$=j.clipsegments[fe],ee=x([],$.x,z.c2p),ne=x([],$.y,I.c2p),ee.reverse(),ne.reverse(),ye.push(E(ee,ne,$.bicubic));var xe="M"+ye.join("L")+"Z";M(R,j.clipsegments,z,I,ae,H),C(F,R,z,I,q,K,X,P,j,H,xe),p(R,re,f,B,Q,u,P),k.setClipUrl(R,P._clipPathId,f)})};function h(T,f){var u,A,b,z,I,N,R,B,F;for(u=0;ure&&(A.max=re),A.len=A.max-A.min}function i(T,f,u){var A=T.getPointAtLength(f),b=T.getPointAtLength(u),z=b.x-A.x,I=b.y-A.y,N=Math.sqrt(z*z+I*I);return[z/N,I/N]}function w(T){var f=Math.sqrt(T[0]*T[0]+T[1]*T[1]);return[T[0]/f,T[1]/f]}function S(T,f){var u=Math.abs(T[0]*f[0]+T[1]*f[1]),A=Math.sqrt(1-u*u);return A/u}function M(T,f,u,A,b,z){var I,N,R,B,F=l.ensureSingle(T,"g","contourbg"),P=F.selectAll("path").data(z==="fill"&&!b?[0]:[]);P.enter().append("path"),P.exit().remove();var j=[];for(B=0;B=0&&(U=ee,Q=re):Math.abs(j[1]-U[1])=0&&(U=ee,Q=re):l.log("endpt to newendpt is not vert. or horz.",j,U,ee)}if(Q>=0)break;B+=q(j,U),j=U}if(Q===f.edgepaths.length){l.log("unclosed perimeter path");break}R=Q,P=F.indexOf(R)===-1,P&&(R=F[0],B+=q(j,U)+"Z",j=null)}for(R=0;R_):C=N>b,_=N;var R=h(b,z,I,N);R.pos=A,R.yc=(b+N)/2,R.i=u,R.dir=C?"increasing":"decreasing",R.x=R.pos,R.y=[I,z],T&&(R.orig_p=s[u]),S&&(R.tx=o.text[u]),M&&(R.htx=o.hovertext[u]),f.push(R)}else f.push({pos:A,empty:!0})}return o._extremes[m._id]=E.findExtremes(m,v.concat(i,g),{padded:!0}),f.length&&(f[0].t={labels:{open:x(n,"open:")+" ",high:x(n,"high:")+" ",low:x(n,"low:")+" ",close:x(n,"close:")+" "}}),f}function r(n,o,s){var c=s._minDiff;if(!c){var m=n._fullData,h=[];c=1/0;var p;for(p=0;p"+w.labels[A]+v.hoverLabelText(g,b,i.yhoverformat)):(I=x.extendFlat({},M),I.y0=I.y1=z,I.yLabelVal=b,I.yLabel=w.labels[A]+v.hoverLabelText(g,b,i.yhoverformat),I.name="",S.push(I),f[b]=I)}return S}function o(s,c,m,h){var p=s.cd,g=s.ya,i=p[0].trace,w=p[0].t,S=r(s,c,m,h);if(!S)return[];var M=S.index,C=p[M],_=S.index=C.i,T=C.dir;function f(R){return w.labels[R]+v.hoverLabelText(g,i[R][_],i.yhoverformat)}var u=C.hi||i.hoverinfo||"",A=u.split("+"),b=u==="all",z=b||A.indexOf("y")!==-1,I=b||A.indexOf("text")!==-1,N=z?[f("open"),f("high"),f("low"),f("close")+" "+t[T]]:[];return I&&l(C,i,N),S.extraText=N.join("
"),S.y0=S.y1=g.c2p(C.yc,!0),[S]}V.exports={hoverPoints:a,hoverSplit:n,hoverOnPoints:o}}}),F5=Ee({"src/traces/ohlc/select.js"(J,V){"use strict";V.exports=function(x,E){var k=x.cd,l=x.xaxis,e=x.yaxis,t=[],a,r=k[0].t.bPos||0;if(E===!1)for(a=0;ac?function(i){return i<=0}:function(i){return i>=0};r.c2g=function(i){var w=r.c2l(i)-s;return(g(w)?w:0)+p},r.g2c=function(i){return r.l2c(i+s-p)},r.g2p=function(i){return i*h},r.c2p=function(i){return r.g2p(r.c2g(i))}}}function e(r,n){return n==="degrees"?E(r):r}function t(r,n){return n==="degrees"?k(r):r}function a(r,n){var o=r.type;if(o==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(m,h){return e(s(m),h)},r.c2d=function(m,h){return c(t(m,h))}}r.makeCalcdata=function(m,h){var p=m[h],g=m._length,i,w,S=function(f){return r.d2c(f,m.thetaunit)};if(p)for(i=new Array(g),w=0;w0?f:1/0},C=E(S,M),_=v.mod(C+1,S.length);return[S[C],S[_]]}function h(w){return Math.abs(w)>1e-10?w:0}function p(w,S,M){S=S||0,M=M||0;for(var C=w.length,_=new Array(C),T=0;T0?1:0}function x(t){var a=t[0],r=t[1];if(!isFinite(a)||!isFinite(r))return[1,0];var n=(a+1)*(a+1)+r*r;return[(a*a+r*r-1)/n,2*r/n]}function E(t,a){var r=a[0],n=a[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function k(t,a){return a*t.radius}function l(t,a,r,n){var o=E(t,x([r,a])),s=o[0],c=o[1],m=E(t,x([n,a])),h=m[0],p=m[1];if(a===0)return["M"+s+","+c,"L"+h+","+p].join(" ");var g=k(t,1/Math.abs(a));return["M"+s+","+c,"A"+g+","+g+" 0 0,"+(a<0?1:0)+" "+h+","+p].join(" ")}function e(t,a,r,n){var o=k(t,1/(a+1)),s=E(t,x([a,r])),c=s[0],m=s[1],h=E(t,x([a,n])),p=h[0],g=h[1];if(v(r)!==v(n)){var i=E(t,x([a,0])),w=i[0],S=i[1];return["M"+c+","+m,"A"+o+","+o+" 0 0,"+(0Ie?(Ue=ee,qe=ee*Ie,ue=(ne-qe)/K.h/2,ke=[q[0],q[1]],ge=[$[0]+ue,$[1]-ue]):(Ue=ne/Ie,qe=ne,ue=(ee-Ue)/K.w/2,ke=[q[0]+ue,q[1]-ue],ge=[$[0],$[1]]),H.xLength2=Ue,H.yLength2=qe,H.xDomain2=ke,H.yDomain2=ge;var ve=H.xOffset2=K.l+K.w*ke[0],se=H.yOffset2=K.t+K.h*(1-ge[1]),Te=H.radius=Ue/xe,Fe=H.innerRadius=H.getHole(oe)*Te,We=H.cx=ve-Te*ye[0],Ge=H.cy=se+Te*ye[3],gt=H.cxx=We-ve,mt=H.cyy=Ge-se,Tt=G.side,At;Tt==="counterclockwise"?(At=Tt,Tt="top"):Tt==="clockwise"&&(At=Tt,Tt="bottom"),H.radialAxis=H.mockAxis(ae,oe,G,{_id:"x",side:Tt,_trueSide:At,domain:[Fe/K.w,Te/K.w]}),H.angularAxis=H.mockAxis(ae,oe,Y,{side:"right",domain:[0,Math.PI],autorange:!1}),H.doAutoRange(ae,oe),H.updateAngularAxis(ae,oe),H.updateRadialAxis(ae,oe),H.updateRadialAxisTitle(ae,oe),H.xaxis=H.mockCartesianAxis(ae,oe,{_id:"x",domain:ke}),H.yaxis=H.mockCartesianAxis(ae,oe,{_id:"y",domain:ge});var Kt=H.pathSubplot();H.clipPaths.forTraces.select("path").attr("d",Kt).attr("transform",l(gt,mt)),X.frontplot.attr("transform",l(ve,se)).call(t.setClipUrl,H._hasClipOnAxisFalse?null:H.clipIds.forTraces,H.gd),X.bg.attr("d",Kt).attr("transform",l(We,Ge)).call(e.fill,oe.bgcolor)},j.mockAxis=function(ae,oe,H,X){var K=E.extendFlat({},H,X);return o(K,oe,ae),K},j.mockCartesianAxis=function(ae,oe,H){var X=this,K=X.isSmith,G=H._id,Y=E.extendFlat({type:"linear"},H);n(Y,ae);var q={x:[0,2],y:[1,3]};return Y.setRange=function(){var $=X.sectorBBox,ee=q[G],ne=X.radialAxis._rl,fe=(ne[1]-ne[0])/(1-X.getHole(oe));Y.range=[$[ee[0]]*fe,$[ee[1]]*fe]},Y.isPtWithinRange=G==="x"&&!K?function($){return X.isPtInside($)}:function(){return!0},Y.setRange(),Y.setScale(),Y},j.doAutoRange=function(ae,oe){var H=this,X=H.gd,K=H.radialAxis,G=H.getRadial(oe);s(X,K);var Y=K.range;if(G.range=Y.slice(),G._input.range=Y.slice(),K._rl=[K.r2l(Y[0],null,"gregorian"),K.r2l(Y[1],null,"gregorian")],K.minallowed!==void 0){var q=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],q):K._rl[0]=Math.max(K._rl[0],q)}if(K.maxallowed!==void 0){var $=K.r2l(K.maxallowed);K._rl[0]90&&ne<=270&&(fe.tickangle=180);var Ae=xe?function(Te){var Fe=I(H,A([Te.x,0]));return l(Fe[0]-q,Fe[1]-$)}:function(Te){return l(fe.l2p(Te.x)+Y,0)},Me=xe?function(Te){return z(H,Te.x,-1/0,1/0)}:function(Te){return H.pathArc(fe.r2p(Te.x)+Y)},Ie=U(ee);if(H.radialTickLayout!==Ie&&(K["radial-axis"].selectAll(".xtick").remove(),H.radialTickLayout=Ie),ye){fe.setScale();var Ue=0,qe=xe?(fe.tickvals||[]).filter(function(Te){return Te>=0}).map(function(Te){return r.tickText(fe,Te,!0,!1)}):r.calcTicks(fe),ke=xe?qe:r.clipEnds(fe,qe),ge=r.getTickSigns(fe)[2];xe&&((fe.ticks==="top"&&fe.side==="bottom"||fe.ticks==="bottom"&&fe.side==="top")&&(ge=-ge),fe.ticks==="top"&&fe.side==="top"&&(Ue=-fe.ticklen),fe.ticks==="bottom"&&fe.side==="bottom"&&(Ue=fe.ticklen)),r.drawTicks(X,fe,{vals:qe,layer:K["radial-axis"],path:r.makeTickPath(fe,0,ge),transFn:Ae,crisp:!1}),r.drawGrid(X,fe,{vals:ke,layer:K["radial-grid"],path:Me,transFn:E.noop,crisp:!1}),r.drawLabels(X,fe,{vals:qe,layer:K["radial-axis"],transFn:Ae,labelFns:r.makeLabelFns(fe,Ue)})}var ue=H.radialAxisAngle=H.vangles?F(Q(B(ee.angle),H.vangles)):ee.angle,ve=l(q,$),se=ve+k(-ue);re(K["radial-axis"],ye&&(ee.showticklabels||ee.ticks),{transform:se}),re(K["radial-grid"],ye&&ee.showgrid,{transform:xe?"":ve}),re(K["radial-line"].select("line"),ye&&ee.showline,{x1:xe?-G:Y,y1:0,x2:G,y2:0,transform:se}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateRadialAxisTitle=function(ae,oe,H){if(!this.isSmith){var X=this,K=X.gd,G=X.radius,Y=X.cx,q=X.cy,$=X.getRadial(oe),ee=X.id+"title",ne=0;if($.title){var fe=t.bBox(X.layers["radial-axis"].node()).height,ye=$.title.font.size,xe=$.side;ne=xe==="top"?ye:xe==="counterclockwise"?-(fe+ye*.4):fe+ye*.8}var Ae=H!==void 0?H:X.radialAxisAngle,Me=B(Ae),Ie=Math.cos(Me),Ue=Math.sin(Me),qe=Y+G/2*Ie+ne*Ue,ke=q-G/2*Ue+ne*Ie;X.layers["radial-axis-title"]=p.draw(K,ee,{propContainer:$,propName:X.id+".radialaxis.title.text",placeholder:N(K,"Click to enter radial axis title"),attributes:{x:qe,y:ke,"text-anchor":"middle"},transform:{rotate:-Ae}})}},j.updateAngularAxis=function(ae,oe){var H=this,X=H.gd,K=H.layers,G=H.radius,Y=H.innerRadius,q=H.cx,$=H.cy,ee=H.getAngular(oe),ne=H.angularAxis,fe=H.isSmith;fe||(H.fillViewInitialKey("angularaxis.rotation",ee.rotation),ne.setGeometry(),ne.setScale());var ye=fe?function(Fe){var We=I(H,A([0,Fe.x]));return Math.atan2(We[0]-q,We[1]-$)-Math.PI/2}:function(Fe){return ne.t2g(Fe.x)};ne.type==="linear"&&ne.thetaunit==="radians"&&(ne.tick0=F(ne.tick0),ne.dtick=F(ne.dtick));var xe=function(Fe){return l(q+G*Math.cos(Fe),$-G*Math.sin(Fe))},Ae=fe?function(Fe){var We=I(H,A([0,Fe.x]));return l(We[0],We[1])}:function(Fe){return xe(ye(Fe))},Me=fe?function(Fe){var We=I(H,A([0,Fe.x])),Ge=Math.atan2(We[0]-q,We[1]-$)-Math.PI/2;return l(We[0],We[1])+k(-F(Ge))}:function(Fe){var We=ye(Fe);return xe(We)+k(-F(We))},Ie=fe?function(Fe){return b(H,Fe.x,0,1/0)}:function(Fe){var We=ye(Fe),Ge=Math.cos(We),gt=Math.sin(We);return"M"+[q+Y*Ge,$-Y*gt]+"L"+[q+G*Ge,$-G*gt]},Ue=r.makeLabelFns(ne,0),qe=Ue.labelStandoff,ke={};ke.xFn=function(Fe){var We=ye(Fe);return Math.cos(We)*qe},ke.yFn=function(Fe){var We=ye(Fe),Ge=Math.sin(We)>0?.2:1;return-Math.sin(We)*(qe+Fe.fontSize*Ge)+Math.abs(Math.cos(We))*(Fe.fontSize*_)},ke.anchorFn=function(Fe){var We=ye(Fe),Ge=Math.cos(We);return Math.abs(Ge)<.1?"middle":Ge>0?"start":"end"},ke.heightFn=function(Fe,We,Ge){var gt=ye(Fe);return-.5*(1+Math.sin(gt))*Ge};var ge=U(ee);H.angularTickLayout!==ge&&(K["angular-axis"].selectAll("."+ne._id+"tick").remove(),H.angularTickLayout=ge);var ue=fe?[1/0].concat(ne.tickvals||[]).map(function(Fe){return r.tickText(ne,Fe,!0,!1)}):r.calcTicks(ne);fe&&(ue[0].text="\u221E",ue[0].fontSize*=1.75);var ve;if(oe.gridshape==="linear"?(ve=ue.map(ye),E.angleDelta(ve[0],ve[1])<0&&(ve=ve.slice().reverse())):ve=null,H.vangles=ve,ne.type==="category"&&(ue=ue.filter(function(Fe){return E.isAngleInsideSector(ye(Fe),H.sectorInRad)})),ne.visible){var se=ne.ticks==="inside"?-1:1,Te=(ne.linewidth||1)/2;r.drawTicks(X,ne,{vals:ue,layer:K["angular-axis"],path:"M"+se*Te+",0h"+se*ne.ticklen,transFn:Me,crisp:!1}),r.drawGrid(X,ne,{vals:ue,layer:K["angular-grid"],path:Ie,transFn:E.noop,crisp:!1}),r.drawLabels(X,ne,{vals:ue,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Ae,labelFns:ke})}re(K["angular-line"].select("path"),ee.showline,{d:H.pathSubplot(),transform:l(q,$)}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateFx=function(ae,oe){if(!this.gd._context.staticPlot){var H=!this.isSmith;H&&(this.updateAngularDrag(ae),this.updateRadialDrag(ae,oe,0),this.updateRadialDrag(ae,oe,1)),this.updateHoverAndMainDrag(ae)}},j.updateHoverAndMainDrag=function(ae){var oe=this,H=oe.isSmith,X=oe.gd,K=oe.layers,G=ae._zoomlayer,Y=T.MINZOOM,q=T.OFFEDGE,$=oe.radius,ee=oe.innerRadius,ne=oe.cx,fe=oe.cy,ye=oe.cxx,xe=oe.cyy,Ae=oe.sectorInRad,Me=oe.vangles,Ie=oe.radialAxis,Ue=f.clampTiny,qe=f.findXYatLength,ke=f.findEnclosingVertexAngles,ge=T.cornerHalfWidth,ue=T.cornerLen/2,ve,se,Te=c.makeDragger(K,"path","maindrag",ae.dragmode===!1?"none":"crosshair");v.select(Te).attr("d",oe.pathSubplot()).attr("transform",l(ne,fe)),Te.onmousemove=function(Vt){h.hover(X,Vt,oe.id),X._fullLayout._lasthover=Te,X._fullLayout._hoversubplot=oe.id},Te.onmouseout=function(Vt){X._dragging||m.unhover(X,Vt)};var Fe={element:Te,gd:X,subplot:oe.id,plotinfo:{id:oe.id,xaxis:oe.xaxis,yaxis:oe.yaxis},xaxes:[oe.xaxis],yaxes:[oe.yaxis]},We,Ge,gt,mt,Tt,At,Kt,nr,_r;function Zt(Vt,Ht){return Math.sqrt(Vt*Vt+Ht*Ht)}function sr(Vt,Ht){return Zt(Vt-ye,Ht-xe)}function Ot(Vt,Ht){return Math.atan2(xe-Ht,Vt-ye)}function vt(Vt,Ht){return[Vt*Math.cos(Ht),Vt*Math.sin(-Ht)]}function ht(Vt,Ht){if(Vt===0)return oe.pathSector(2*ge);var Wt=ue/Vt,Sr=Ht-Wt,on=Ht+Wt,$t=Math.max(0,Math.min(Vt,$)),It=$t-ge,ir=$t+ge;return"M"+vt(It,Sr)+"A"+[It,It]+" 0,0,0 "+vt(It,on)+"L"+vt(ir,on)+"A"+[ir,ir]+" 0,0,1 "+vt(ir,Sr)+"Z"}function Re(Vt,Ht,Wt){if(Vt===0)return oe.pathSector(2*ge);var Sr=vt(Vt,Ht),on=vt(Vt,Wt),$t=Ue((Sr[0]+on[0])/2),It=Ue((Sr[1]+on[1])/2),ir,cr;if($t&&It){var fr=It/$t,Ir=-1/fr,ln=qe(ge,fr,$t,It);ir=qe(ue,Ir,ln[0][0],ln[0][1]),cr=qe(ue,Ir,ln[1][0],ln[1][1])}else{var nn,wn;It?(nn=ue,wn=ge):(nn=ge,wn=ue),ir=[[$t-nn,It-wn],[$t+nn,It-wn]],cr=[[$t-nn,It+wn],[$t+nn,It+wn]]}return"M"+ir.join("L")+"L"+cr.reverse().join("L")+"Z"}function Be(){gt=null,mt=null,Tt=oe.pathSubplot(),At=!1;var Vt=X._fullLayout[oe.id];Kt=e.luminosity(Vt.bgcolor),nr=c.makeZoombox(G,Kt,ne,fe,Tt),nr.attr("fill-rule","evenodd"),_r=c.makeCorners(G,ne,fe),w(X)}function He(Vt,Ht){return Ht=Math.max(Math.min(Ht,$),ee),VtY?(Vt-1&&Vt===1&&i(Ht,X,[oe.xaxis],[oe.yaxis],oe.id,Fe),Wt.indexOf("event")>-1&&h.click(X,Ht,oe.id)}Fe.prepFn=function(Vt,Ht,Wt){var Sr=X._fullLayout.dragmode,on=Te.getBoundingClientRect();X._fullLayout._calcInverseTransform(X);var $t=X._fullLayout._invTransform;ve=X._fullLayout._invScaleX,se=X._fullLayout._invScaleY;var It=E.apply3DTransform($t)(Ht-on.left,Wt-on.top);if(We=It[0],Ge=It[1],Me){var ir=f.findPolygonOffset($,Ae[0],Ae[1],Me);We+=ye+ir[0],Ge+=xe+ir[1]}switch(Sr){case"zoom":Fe.clickFn=Ct,H||(Me?Fe.moveFn=Mt:Fe.moveFn=Ze,Fe.doneFn=dt,Be(Vt,Ht,Wt));break;case"select":case"lasso":g(Vt,Ht,Wt,Fe,Sr);break}},m.init(Fe)},j.updateRadialDrag=function(ae,oe,H){var X=this,K=X.gd,G=X.layers,Y=X.radius,q=X.innerRadius,$=X.cx,ee=X.cy,ne=X.radialAxis,fe=T.radialDragBoxSize,ye=fe/2;if(!ne.visible)return;var xe=B(X.radialAxisAngle),Ae=ne._rl,Me=Ae[0],Ie=Ae[1],Ue=Ae[H],qe=.75*(Ae[1]-Ae[0])/(1-X.getHole(oe))/Y,ke,ge,ue;H?(ke=$+(Y+ye)*Math.cos(xe),ge=ee-(Y+ye)*Math.sin(xe),ue="radialdrag"):(ke=$+(q-ye)*Math.cos(xe),ge=ee-(q-ye)*Math.sin(xe),ue="radialdrag-inner");var ve=c.makeRectDragger(G,ue,"crosshair",-ye,-ye,fe,fe),se={element:ve,gd:K};ae.dragmode===!1&&(se.dragmode=!1),re(v.select(ve),ne.visible&&q0!=(H?We>Me:We=90||K>90&&G>=450?xe=1:q<=0&&ee<=0?xe=0:xe=Math.max(q,ee),K<=180&&G>=180||K>180&&G>=540?ne=-1:Y>=0&&$>=0?ne=0:ne=Math.min(Y,$),K<=270&&G>=270||K>270&&G>=630?fe=-1:q>=0&&ee>=0?fe=0:fe=Math.min(q,ee),G>=360?ye=1:Y<=0&&$<=0?ye=0:ye=Math.max(Y,$),[ne,fe,ye,xe]}function Q(ae,oe){var H=function(K){return E.angleDist(ae,K)},X=E.findIndexOfMin(oe,H);return oe[X]}function re(ae,oe,H){return oe?(ae.attr("display",null),ae.attr(H)):ae&&ae.attr("display","none"),ae}}}),j5=Ee({"src/plots/polar/layout_attributes.js"(J,V){"use strict";var v=rs(),x=Gc(),E=kl().attributes,k=Vr().extendFlat,l=El().overrideAll,e=l({color:x.color,showline:k({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:k({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),t=l({tickmode:x.minor.tickmode,nticks:x.nticks,tick0:x.tick0,dtick:x.dtick,tickvals:x.tickvals,ticktext:x.ticktext,ticks:x.ticks,ticklen:x.ticklen,tickwidth:x.tickwidth,tickcolor:x.tickcolor,ticklabelstep:x.ticklabelstep,showticklabels:x.showticklabels,labelalias:x.labelalias,minorloglabels:x.minorloglabels,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,showexponent:x.showexponent,exponentformat:x.exponentformat,minexponent:x.minexponent,separatethousands:x.separatethousands,tickfont:x.tickfont,tickangle:x.tickangle,tickformat:x.tickformat,tickformatstops:x.tickformatstops,layer:x.layer},"plot","from-root"),a={visible:k({},x.visible,{dflt:!0}),type:k({},x.type,{values:["-","linear","log","date","category"]}),autotypenumbers:x.autotypenumbers,autorangeoptions:{minallowed:x.autorangeoptions.minallowed,maxallowed:x.autorangeoptions.maxallowed,clipmin:x.autorangeoptions.clipmin,clipmax:x.autorangeoptions.clipmax,include:x.autorangeoptions.include,editType:"plot"},autorange:k({},x.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:k({},x.minallowed,{editType:"plot"}),maxallowed:k({},x.maxallowed,{editType:"plot"}),range:k({},x.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:x.categoryorder,categoryarray:x.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:x.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:k({},x.title.text,{editType:"plot",dflt:""}),font:k({},x.title.font,{editType:"plot"}),editType:"plot"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(a,e,t);var r={visible:k({},x.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:x.autotypenumbers,categoryorder:x.categoryorder,categoryarray:x.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:x.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(r,e,t),V.exports={domain:E({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:v.background},radialaxis:a,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),dD=Ee({"src/plots/polar/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=xs(),k=Bv(),l=uf().getSubplotData,e=Cv(),t=Np(),a=Wd(),r=Yd(),n=Xg(),o=Z0(),s=Rb(),c=Op(),m=j5(),h=B5(),p=Ky(),g=p.axisNames;function i(S,M,C,_){var T=C("bgcolor");_.bgColor=x.combine(T,_.paper_bgcolor);var f=C("sector");C("hole");var u=l(_.fullData,p.name,_.id),A=_.layoutOut,b;function z(ye,xe){return C(b+"."+ye,xe)}for(var I=0;I")}}V.exports={hoverPoints:x,makeHoverPointText:E}}}),mD=Ee({"src/traces/scatterpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:Qy(),categories:["polar","symbols","showLegend","scatter-like"],attributes:qm(),supplyDefaults:e_().supplyDefaults,colorbar:ff(),formatLabels:t_(),calc:vD(),plot:pD(),style:eh().style,styleOnSelect:eh().styleOnSelect,hoverPoints:r_().hoverPoints,selectPoints:Fv(),meta:{}}}}),gD=Ee({"lib/scatterpolar.js"(J,V){"use strict";V.exports=mD()}}),U5=Ee({"src/traces/scatterpolargl/attributes.js"(J,V){"use strict";var v=qm(),{cliponaxis:x,hoveron:E}=v,k=En(v,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:a},fill:r,fillcolor:n,marker:o,textfont:s,textposition:c}=Rm();V.exports=Qr(Nr({},k),{connectgaps:l,fill:r,fillcolor:n,line:{color:e,dash:t,editType:"calc",width:a},marker:o,textfont:s,textposition:c})}}),yD=Ee({"src/traces/scatterpolargl/defaults.js"(J,V){"use strict";var v=Vr(),x=al(),E=e_().handleRThetaDefaults,k=gh(),l=Rh(),e=Fh(),t=Xh(),a=Wh().PTS_LINESONLY,r=U5();V.exports=function(o,s,c,m){function h(g,i){return v.coerce(o,s,r,g,i)}var p=E(o,s,m,h);if(!p){s.visible=!1;return}h("thetaunit"),h("mode",p=t&&(_.marker.cluster=w.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=A),_.line&&A.length>1&&e.extendFlat(_.line,l.linePositions(n,i,A)),_.text&&(e.extendFlat(_.text,{positions:A},l.textPosition(n,i,_.text,_.marker)),e.extendFlat(_.textSel,{positions:A},l.textPosition(n,i,_.text,_.markerSel)),e.extendFlat(_.textUnsel,{positions:A},l.textPosition(n,i,_.text,_.markerUnsel))),_.fill&&!h.fill2d&&(h.fill2d=!0),_.marker&&!h.scatter2d&&(h.scatter2d=!0),_.line&&!h.line2d&&(h.line2d=!0),_.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(_.line),h.fillOptions.push(_.fill),h.markerOptions.push(_.marker),h.markerSelectedOptions.push(_.markerSel),h.markerUnselectedOptions.push(_.markerUnsel),h.textOptions.push(_.text),h.textSelectedOptions.push(_.textSel),h.textUnselectedOptions.push(_.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),w.x=b,w.y=z,w.rawx=b,w.rawy=z,w.r=M,w.theta=C,w.positions=A,w._scene=h,w.index=h.count,h.count++}}),E(n,o,s)}},V.exports.reglPrecompiled=a}}),AD=Ee({"src/traces/scatterpolargl/index.js"(J,V){"use strict";var v=wD();v.plot=TD(),V.exports=v}}),MD=Ee({"lib/scatterpolargl.js"(J,V){"use strict";V.exports=AD()}}),q5=Ee({"src/traces/barpolar/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:v,templatefallbackAttrs:x}=Cs(),E=vo().extendFlat,k=qm(),l=Zh();V.exports={r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,base:E({},l.base,{}),offset:E({},l.offset,{}),width:E({},l.width,{}),text:E({},l.text,{}),hovertext:E({},l.hovertext,{}),marker:e(),hoverinfo:k.hoverinfo,hovertemplate:v(),hovertemplatefallback:x(),selected:l.selected,unselected:l.unselected};function e(){var t=E({},l.marker);return delete t.cornerradius,t}}}),V5=Ee({"src/traces/barpolar/layout_attributes.js"(J,V){"use strict";V.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),SD=Ee({"src/traces/barpolar/defaults.js"(J,V){"use strict";var v=Vr(),x=e_().handleRThetaDefaults,E=n1(),k=q5();V.exports=function(e,t,a,r){function n(s,c){return v.coerce(e,t,k,s,c)}var o=x(e,t,r,n);if(!o){t.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),E(e,t,n,a,r),v.coerceSelectionMarkerOpacity(t,n)}}}),ED=Ee({"src/traces/barpolar/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=V5();V.exports=function(E,k,l){var e={},t;function a(o,s){return v.coerce(E[t]||{},k[t],x,o,s)}for(var r=0;r0?(m=s,h=c):(m=c,h=s);var p=l.findEnclosingVertexAngles(m,t.vangles)[0],g=l.findEnclosingVertexAngles(h,t.vangles)[1],i=[p,(m+h)/2,g];return l.pathPolygonAnnulus(n,o,m,h,i,a,r)}:function(n,o,s,c){return E.pathAnnulus(n,o,s,c,a,r)}}}}),CD=Ee({"src/traces/barpolar/hover.js"(J,V){"use strict";var v=$l(),x=Vr(),E=Gp().getTraceColor,k=x.fillText,l=r_().makeHoverPointText,e=Jy().isPtInsidePolygon;V.exports=function(a,r,n){var o=a.cd,s=o[0].trace,c=a.subplot,m=c.radialAxis,h=c.angularAxis,p=c.vangles,g=p?e:x.isPtInsideSector,i=a.maxHoverDistance,w=h._period||2*Math.PI,S=Math.abs(m.g2p(Math.sqrt(r*r+n*n))),M=Math.atan2(n,r);m.range[0]>m.range[1]&&(M+=Math.PI);var C=function(u){return g(S,M,[u.rp0,u.rp1],[u.thetag0,u.thetag1],p)?i+Math.min(1,Math.abs(u.thetag1-u.thetag0)/w)-1+(u.rp1-S)/(u.rp1-u.rp0)-1:1/0};if(v.getClosest(o,C,a),a.index!==!1){var _=a.index,T=o[_];a.x0=a.x1=T.ct[0],a.y0=a.y1=T.ct[1];var f=x.extendFlat({},T,{r:T.s,theta:T.p});return k(T,s,a),l(f,s,c,a),a.hovertemplate=s.hovertemplate,a.color=E(s,T),a.xLabelVal=a.yLabelVal=void 0,T.s<0&&(a.idealAlign="left"),[a]}}}}),LD=Ee({"src/traces/barpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"barpolar",basePlotModule:Qy(),categories:["polar","bar","showLegend"],attributes:q5(),layoutAttributes:V5(),supplyDefaults:SD(),supplyLayoutDefaults:ED(),calc:H5().calc,crossTraceCalc:H5().crossTraceCalc,plot:kD(),colorbar:ff(),formatLabels:t_(),style:bh().style,styleOnSelect:bh().styleOnSelect,hoverPoints:CD(),selectPoints:Wp(),meta:{}}}}),PD=Ee({"lib/barpolar.js"(J,V){"use strict";V.exports=LD()}}),G5=Ee({"src/plots/smith/constants.js"(J,V){"use strict";V.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),W5=Ee({"src/plots/smith/layout_attributes.js"(J,V){"use strict";var v=rs(),x=Gc(),E=kl().attributes,k=Vr().extendFlat,l=El().overrideAll,e=l({color:x.color,showline:k({},x.showline,{dflt:!0}),linecolor:x.linecolor,linewidth:x.linewidth,showgrid:k({},x.showgrid,{dflt:!0}),gridcolor:x.gridcolor,gridwidth:x.gridwidth,griddash:x.griddash},"plot","from-root"),t=l({ticklen:x.ticklen,tickwidth:k({},x.tickwidth,{dflt:2}),tickcolor:x.tickcolor,showticklabels:x.showticklabels,labelalias:x.labelalias,showtickprefix:x.showtickprefix,tickprefix:x.tickprefix,showticksuffix:x.showticksuffix,ticksuffix:x.ticksuffix,tickfont:x.tickfont,tickformat:x.tickformat,hoverformat:x.hoverformat,layer:x.layer},"plot","from-root"),a=k({visible:k({},x.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:k({},x.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=k({visible:k({},x.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:x.ticks,editType:"calc"},e,t);V.exports={domain:E({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:v.background},realaxis:a,imaginaryaxis:r,editType:"calc"}}}),DD=Ee({"src/plots/smith/layout_defaults.js"(J,V){"use strict";var v=Vr(),x=Qa(),E=xs(),k=Bv(),l=uf().getSubplotData,e=Yd(),t=Wd(),a=Z0(),r=Hh(),n=W5(),o=G5(),s=o.axisNames,c=h(function(p){return v.isTypedArray(p)&&(p=Array.from(p)),p.slice().reverse().map(function(g){return-g}).concat([0]).concat(p)},String);function m(p,g,i,w){var S=i("bgcolor");w.bgColor=x.combine(S,w.paper_bgcolor);var M=l(w.fullData,o.name,w.id),C=w.layoutOut,_;function T(U,Z){return i(_+"."+U,Z)}for(var f=0;f")}}V.exports={hoverPoints:x,makeHoverPointText:E}}}),OD=Ee({"src/traces/scattersmith/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scattersmith",basePlotModule:ID(),categories:["smith","symbols","showLegend","scatter-like"],attributes:Y5(),supplyDefaults:RD(),colorbar:ff(),formatLabels:FD(),calc:zD(),plot:BD(),style:eh().style,styleOnSelect:eh().styleOnSelect,hoverPoints:ND().hoverPoints,selectPoints:Fv(),meta:{}}}}),jD=Ee({"lib/scattersmith.js"(J,V){"use strict";V.exports=OD()}}),X5=Ee({"src/traces/quiver/attributes.js"(J,V){"use strict";var v=ia(),x=Cs().hovertemplateAttrs,E=Fl().axisHoverFormat,k=vo().extendFlat,l=$s(),e=kc().dash,t=Kd(),a=ou(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:a.x0,dx:a.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:a.y0,dy:a.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:E("x"),yhoverformat:E("y"),uhoverformat:E("u","noDate"),vhoverformat:E("v","noDate"),hoverinfo:k({},v.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:x({},{keys:["x","y","u","v","text","name"]}),text:a.text,textposition:a.textposition,textfont:a.textfont,marker:k({arrowsize:k({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};V.exports=r}}),UD=Ee({"src/traces/quiver/defaults.js"(J,V){"use strict";var v=Vr(),x=X5(),E=Dv(),k=cf().hasColorscale,l=Cc();V.exports=function(t,a,r,n){function o(S,M){return v.coerce(t,a,x,S,M)}var s=E(t,a,n,o);if(!s){a.visible=!1;return}var c=o("u"),m=o("v");if(!v.isArrayOrTypedArray(c)||c.length===0){a.u=new Array(s);for(var h=0;hN&&(N=c[Q]),m[Q]B&&(B=m[Q]),HP&&(P=H),XU&&(U=X);var K=Math.sqrt(H*H+X*X);if(K>i&&(i=K),KS&&(S=G))}}else re.x=k,re.y=k}if(n._maxNorm=i,u==="scaled"||A==="paper"){let Ae=N-I,Me=B-R;var Y;Ae===0&&Me===0?Y=1:Y=(Ae+Me+Math.sqrt((Ae-Me)*(Ae-Me)+4*Z*Ae*Me))/(2*(Z-1)),Y*=t,n._scaleFactor=Y/n._maxNorm}else n._scaleFactor=1;n._scaleFactor*=n.lengthfactor;let q=new Array(h),$=new Array(h),ee=new Array(h),ne=new Array(h);for(var fe,ye,Q=0;Qm.i&&isFinite(h[m.i]))p=h[m.i];else{var g=o.u&&o.u[m.i]||0,i=o.v&&o.v[m.i]||0;p=Math.sqrt(g*g+i*i)}return c(p)})}function t(n){var o=v.select(n).selectAll("g.trace.quiver");o.each(function(s){r(n,s,v.select(this))})}function a(n,o,s){r(n,o,s)}function r(n,o,s){var c=o[0].trace,m=c.marker||{},h=m.line||{},p=x.isArrayOrTypedArray(m.color)?void 0:m.color,g=c._hasColorscale;if(s)if(c.selectedpoints){var i=(c.selected||{}).marker||{},w=(c.unselected||{}).marker||{},S=i.line||{},M=w.line||{};s.selectAll("path.js-line").each(function(_){var T=v.select(this),f=!_.selected,u=f?w.color:i.color,A=f?M.width!==void 0?M.width:h.width:S.width!==void 0?S.width:h.width;u?(E.lineGroupStyle(T,A,u,h.dash),T.style("stroke-opacity",1)):(E.lineGroupStyle(T,A,p,h.dash),g&&e(T,c),T.style("stroke-opacity",f?l:1))}),E.selectedTextStyle(s.selectAll("text"),c)}else{var C=s.selectAll("path.js-line");C.call(E.lineGroupStyle,h.width,p,h.dash),g&&e(C,c),C.style("stroke-opacity",1),E.textPointStyle(s.selectAll("text"),c,n)}}V.exports={style:t,styleOnSelect:a,colorscaleStroke:e}}}),HD=Ee({"src/traces/quiver/plot.js"(J,V){"use strict";var v=Hn(),x=Vr(),E=yo(),k=n_().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,a=.7;V.exports=function(o,s,c,m,h,p){var g,i,w=!h,S=!!h&&h.duration>0;if(g=m.selectAll("g.trace").data(c,function(C){return C[0].trace.uid}),g.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),g.order(),S){p&&(i=p());var M=v.transition().duration(h.duration).ease(h.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()});M.each(function(){m.selectAll("g.trace").each(function(C,_){r(o,_,s,C,c,this,h)})})}else g.each(function(C,_){r(o,_,s,C,c,this,h)});w&&g.exit().remove()};function r(n,o,s,c,m,h,p){var g=c[0].trace,i=s.xaxis,w=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=v.select(h);var S=v.select(h).selectAll("g.lines").data([c]);S.enter().append("g").classed("lines",!0),E.setClipUrl(S,s.layerClipId,n);var M=S.selectAll("path.js-line").data(c);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:_=0,arrowref:T}=g,f=T==="paper"?g._scaleFactor*Math.sqrt(Math.abs(i._m*w._m)):g._scaleFactor,u=g.marker.arrowsize;M.each(function(B){let F=v.select(this);if(B.x===void 0||B.y===void 0){F.attr("d",null);return}let P=(T==="paper"?B._u*Math.sign(i._m):v.round(i._m*B._u))*f,j=(T==="paper"?B._v*Math.sign(w._m):v.round(w._m*B._v))*f,U=(g._input.marker||{}).arrowsize!==void 0;var Z,Q,re,ae;C==="tip"?(Z=i.c2p(B.x)-P,re=w.c2p(B.y)-j,Q=i.c2p(B.x),ae=w.c2p(B.y)):C==="center"?(Z=i.c2p(B.x)-P/2,re=w.c2p(B.y)-j/2,Q=i.c2p(B.x)+P/2,ae=w.c2p(B.y)+j/2):(Z=i.c2p(B.x),re=w.c2p(B.y),Q=i.c2p(B.x)+P,ae=w.c2p(B.y)+j),B._px0=Z,B._py0=re,B._px1=Q,B._py1=ae;var oe=g.marker.line.width;U||(oe=Math.max(oe,t));let H=Math.sqrt((Q-Z)*(Q-Z)+(ae-re)*(ae-re)),X=a*H,K=Math.min(e*u*oe,X),G=Math.atan2(ae-re,Q-Z),Y=Q-K*Math.cos(G-l),q=ae-K*Math.sin(G-l),$=Q-K*Math.cos(G+l),ee=ae-K*Math.sin(G+l),ne="M"+Z+","+re+"L"+Q+","+ae+"L"+Y+","+q+"L"+Q+","+ae+"L"+$+","+ee;F.attr("d",ne)});var A=g.marker||{},b=A.line||{},z=x.isArrayOrTypedArray(A.color)?void 0:A.color;E.lineGroupStyle(M,b.width,z,b.dash),g._hasColorscale&&k(M,g);var I=v.select(h).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),E.setClipUrl(I,s.layerClipId,n);var N=I.selectAll("g.textpoint").data(c);if(N.enter().append("g").classed("textpoint",!0).append("text"),N.exit().remove(),N.each(function(B){var F=v.select(this),P=E.translatePoint(B,F.select("text"),i,w);P||F.remove()}),N.selectAll("text").call(E.textPointStyle,g,n).each(function(B){var F=i.c2p(B.x),P=w.c2p(B.y);v.select(this).selectAll("tspan.line").each(function(){v.select(this).attr({x:F,y:P})})}),p&&p.duration>0){var R=v.transition().duration(p.duration).ease(p.easing);M.transition(R).style("opacity",1)}}}}),GD=Ee({"src/traces/quiver/hover.js"(J,V){"use strict";var v=Vr(),x=$l(),E=Vp();function k(l,e,t,a,r,n){let o=r-t,s=n-a,c=o*o+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-a)*(e-a));var m=((l-t)*o+(e-a)*s)/c;m=Math.max(0,Math.min(1,m));let h=t+m*o,p=a+m*s;return Math.sqrt((l-h)*(l-h)+(e-p)*(e-p))}V.exports=function(e,t,a,r){var n=e.cd,o=n[0].trace,s=e.xa,c=e.ya,m=s.c2p(t),h=c.c2p(a),p=function(T){return T._px0===void 0?1/0:k(m,h,T._px0,T._py0,T._px1,T._py1)};if(x.getClosest(n,p,e),e.index!==!1){var g=n[e.index],i=s.c2p(g.x,!0),w=c.c2p(g.y,!0),S=Math.sqrt((m-i)*(m-i)+(h-w)*(h-w));e.index=g.i;var M=o.u?o.u[g.i]:0,C=o.v?o.v[g.i]:0,_="u: "+M+", v: "+C;return v.extendFlat(e,{color:E(o,g),x0:i-3,x1:i+3,xLabelVal:g.x,y0:w-3,y1:w+3,yLabelVal:g.y,uLabelVal:M,vLabelVal:C,extraText:_,spikeDistance:S,hovertemplate:o.hovertemplate}),v.fillText(g,o,e),[e]}}}}),WD=Ee({"src/traces/quiver/format_labels.js"(J,V){"use strict";var v=uo(),x=Vr();V.exports=function(k,l,e){var t={},a={_fullLayout:e},r=v.getFromTrace(a,l,"x"),n=v.getFromTrace(a,l,"y"),o=k.x,s=k.y;t.xLabel=v.tickText(r,r.c2l(o),!0).text,t.yLabel=v.tickText(n,n.c2l(s),!0).text;var c=l.u?l.u[k.i]:0,m=l.v?l.v[k.i]:0,h=l.uhoverformat,p=l.vhoverformat;return t.uLabel=h?x.numberFormat(h)(c):String(c),t.vLabel=p?x.numberFormat(p)(m):String(m),t}}}),YD=Ee({"src/traces/quiver/event_data.js"(J,V){"use strict";V.exports=function(x,E,k,l,e){return x.x=E.x,x.y=E.y,x.u=k.u?k.u[e]:void 0,x.v=k.v?k.v[e]:void 0,x}}}),XD=Ee({"src/traces/quiver/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"quiver",basePlotModule:Mu(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:X5(),supplyDefaults:UD(),calc:qD(),crossTraceCalc:VD(),plot:HD(),style:n_().style,styleOnSelect:n_().styleOnSelect,hoverPoints:GD(),formatLabels:WD(),eventData:YD(),selectPoints:Fv(),colorbar:ff(),animatable:!0,meta:{}}}}),$D=Ee({"lib/quiver.js"(J,V){"use strict";V.exports=XD()}}),kf=Ee({"node_modules/world-calendars/dist/main.js"(J,V){var v=Lc();function x(){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={}}v(x.prototype,{instance:function(a,r){a=(a||"gregorian").toLowerCase(),r=r||"";var n=this._localCals[a+"-"+r];if(!n&&this.calendars[a]&&(n=new this.calendars[a](r),this._localCals[a+"-"+r]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,a);return n},newDate:function(a,r,n,o,s){return o=(a!=null&&a.year?a.calendar():typeof o=="string"?this.instance(o,s):o)||this.instance(),o.newDate(a,r,n)},substituteDigits:function(a){return function(r){return(r+"").replace(/[0-9]/g,function(n){return a[n]})}},substituteChineseDigits:function(a,r){return function(n){for(var o="",s=0;n>0;){var c=n%10;o=(c===0?"":a[c]+r[s])+o,s++,n=Math.floor(n/10)}return o.indexOf(a[1]+r[1])===0&&(o=o.substr(1)),o||a[0]}}});function E(a,r,n,o){if(this._calendar=a,this._year=r,this._month=n,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function k(a,r){return a=""+a,"000000".substring(0,r-a.length)+a}v(E.prototype,{newDate:function(a,r,n){return this._calendar.newDate(a??this,r,n)},year:function(a){return arguments.length===0?this._year:this.set(a,"y")},month:function(a){return arguments.length===0?this._month:this.set(a,"m")},day:function(a){return arguments.length===0?this._day:this.set(a,"d")},date:function(a,r,n){if(!this._calendar.isValid(a,r,n))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=a,this._month=r,this._day=n,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(a,r){return this._calendar.add(this,a,r)},set:function(a,r){return this._calendar.set(this,a,r)},compareTo:function(a){if(this._calendar.name!==a._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,a._calendar.local.name);var r=this._year!==a._year?this._year-a._year:this._month!==a._month?this.monthOfYear()-a.monthOfYear():this._day-a._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(a){return this._calendar.fromJD(a)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(a){return this._calendar.fromJSDate(a)},toString:function(){return(this.year()<0?"-":"")+k(Math.abs(this.year()),4)+"-"+k(this.month(),2)+"-"+k(this.day(),2)}});function l(){this.shortYearCutoff="+10"}v(l.prototype,{_validateLevel:0,newDate:function(a,r,n){return a==null?this.today():(a.year&&(this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),n=a.day(),r=a.month(),a=a.year()),new E(this,a,r,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+k(Math.abs(r.year()),4)},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(a,r){var n=this._validate(a,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(a,r){var n=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(a)+this.minMonth;return this._validate(a,n,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),n},daysInYear:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(a,r,n){var o=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(a,r,n){var o=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(a,r,n){return this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(a,r,n){return this._validate(a,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(a,this._add(a,r,n),r,n)},_add:function(a,r,n){if(this._validateLevel++,n==="d"||n==="w"){var o=a.toJD()+r*(n==="w"?this.daysInWeek():1),s=a.calendar().fromJD(o);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=a.year()+(n==="y"?r:0),m=a.monthOfYear()+(n==="m"?r:0),s=a.day(),h=function(i){for(;mw-1+i.minMonth;)c++,m-=w,w=i.monthsInYear(c)};n==="y"?(a.month()!==this.fromMonthOfYear(c,m)&&(m=this.newDate(c,a.month(),this.minDay).monthOfYear()),m=Math.min(m,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m)))):n==="m"&&(h(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m))));var p=[c,this.fromMonthOfYear(c,m),s];return this._validateLevel--,p}catch(g){throw this._validateLevel--,g}},_correctAdd:function(a,r,n,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(r[0]===0||a.year()>0!=r[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[o],c=n<0?-1:1;r=this._add(a,n*s[0]+c*s[1],s[2])}return a.date(r[0],r[1],r[2])},set:function(a,r,n){this._validate(a,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var o=n==="y"?r:a.year(),s=n==="m"?r:a.month(),c=n==="d"?r:a.day();return(n==="y"||n==="m")&&(c=Math.min(c,this.daysInMonth(o,s))),a.date(o,s,c)},isValid:function(a,r,n){this._validateLevel++;var o=this.hasYearZero||a!==0;if(o){var s=this.newDate(a,r,this.minDay);o=r>=this.minMonth&&r-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),g=s-(p>2.5?4716:4715);return g<=0&&g--,this.newDate(g,p,h)},toJSDate:function(a,r,n){var o=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(o.year(),o.month()-1,o.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(a){return this.newDate(a.getFullYear(),a.getMonth()+1,a.getDate())}});var t=V.exports=new x;t.cdate=E,t.baseCalendar=l,t.calendars.gregorian=e}}),ZD=Ee({"node_modules/world-calendars/dist/plus.js"(){var J=Lc(),V=kf();J(V.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"}),V.local=V.regionalOptions[""],J(V.cdate.prototype,{formatDate:function(v,x){return typeof v!="string"&&(x=v,v=""),this._calendar.formatDate(v||"",this,x)}}),J(V.baseCalendar.prototype,{UNIX_EPOCH:V.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:V.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,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(v,x,E){if(typeof v!="string"&&(E=x,x=v,v=""),!x)return"";if(x.calendar()!==this)throw V.local.invalidFormat||V.regionalOptions[""].invalidFormat;v=v||this.local.dateFormat,E=E||{};for(var k=E.dayNamesShort||this.local.dayNamesShort,l=E.dayNames||this.local.dayNames,e=E.monthNumbers||this.local.monthNumbers,t=E.monthNamesShort||this.local.monthNamesShort,a=E.monthNames||this.local.monthNames,r=E.calculateWeek||this.local.calculateWeek,n=function(M,C){for(var _=1;S+_1},o=function(M,C,_,T){var f=""+C;if(n(M,T))for(;f.length<_;)f="0"+f;return f},s=function(M,C,_,T){return n(M)?T[C]:_[C]},c=this,m=function(M){return typeof e=="function"?e.call(c,M,n("m")):g(o("m",M.month(),2))},h=function(M,C){return C?typeof a=="function"?a.call(c,M):a[M.month()-c.minMonth]:typeof t=="function"?t.call(c,M):t[M.month()-c.minMonth]},p=this.local.digits,g=function(M){return E.localNumbers&&p?p(M):M},i="",w=!1,S=0;S1},w=function(z,I){var N=i(z,I),R=[2,3,N?4:2,N?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],B=new RegExp("^-?\\d{1,"+R+"}"),F=x.substring(f).match(B);if(!F)throw(V.local.missingNumberAt||V.regionalOptions[""].missingNumberAt).replace(/\{0\}/,f);return f+=F[0].length,parseInt(F[0],10)},S=this,M=function(){if(typeof a=="function"){i("m");var z=a.call(S,x.substring(f));return f+=z.length,z}return w("m")},C=function(z,I,N,R){for(var B=i(z,R)?N:I,F=0;F-1){c=1,m=h;for(var b=this.daysInMonth(s,c);m>b;b=this.daysInMonth(s,c))c++,m-=b}return o>-1?this.fromJD(o):this.newDate(s,c,m)},determineDate:function(v,x,E,k,l){E&&typeof E!="object"&&(l=k,k=E,E=null),typeof k!="string"&&(l=k,k="");var e=this,t=function(a){try{return e.parseDate(k,a,l)}catch{}a=a.toLowerCase();for(var r=(a.match(/^c/)&&E?E.newDate():null)||e.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=n.exec(a);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=n.exec(a);return r};return x=x?x.newDate():null,v=v==null?x:typeof v=="string"?t(v):typeof v=="number"?isNaN(v)||v===1/0||v===-1/0?x:e.today().add(v,"d"):e.newDate(v),v}})}}),KD=Ee({"node_modules/world-calendars/dist/calendars/chinese.js"(){var J=kf(),V=Lc(),v=J.instance();function x(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}x.prototype=new J.baseCalendar,V(x.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,s){if(typeof o=="string"){var c=o.match(k);return c?c[0]:""}var m=this._validateYear(o),h=o.month(),p=""+this.toChineseMonth(m,h);return s&&p.length<2&&(p="0"+p),this.isIntercalaryMonth(m,h)&&(p+="i"),p},monthNames:function(o){if(typeof o=="string"){var s=o.match(l);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),p=["\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"][h-1];return this.isIntercalaryMonth(c,m)&&(p="\u95F0"+p),p},monthNamesShort:function(o){if(typeof o=="string"){var s=o.match(e);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),p=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][h-1];return this.isIntercalaryMonth(c,m)&&(p="\u95F0"+p),p},parseMonth:function(o,s){o=this._validateYear(o);var c=parseInt(s),m;if(isNaN(c))s[0]==="\u95F0"&&(m=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var h=s[s.length-1];m=h==="i"||h==="I"}var p=this.toMonthIndex(o,c,m);return p},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(o,s){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw s.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,s,c){var m=this.intercalaryMonth(o),h=c&&s!==m;if(h||s<1||s>12)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var p;return m?!c&&s<=m?p=s-1:p=s:p=s-1,p},toChineseMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o),m=c?12:11;if(s<0||s>m)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var h;return c?s>13;return c},isIntercalaryMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o);return!!c&&c===s},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,s,c){var m=this._validateYear(o,J.local.invalidyear),h=a[m-a[0]],p=h>>9&4095,g=h>>5&15,i=h&31,w;w=v.newDate(p,g,i),w.add(4-(w.dayOfWeek()||7),"d");var S=this.toJD(o,s,c)-w.toJD();return 1+Math.floor(S/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,s){o.year&&(s=o.month(),o=o.year()),o=this._validateYear(o);var c=t[o-t[0]],m=c>>13,h=m?12:11;if(s>h)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var p=c&1<<12-s?30:29;return p},weekDay:function(o,s,c){return(this.dayOfWeek(o,s,c)||7)<6},toJD:function(o,s,c){var m=this._validate(o,p,c,J.local.invalidDate);o=this._validateYear(m.year()),s=m.month(),c=m.day();var h=this.isIntercalaryMonth(o,s),p=this.toChineseMonth(o,s),g=n(o,p,c,h);return v.toJD(g.year,g.month,g.day)},fromJD:function(o){var s=v.fromJD(o),c=r(s.year(),s.month(),s.day()),m=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,m,c.day)},fromString:function(o){var s=o.match(E),c=this._validateYear(+s[1]),m=+s[2],h=!!s[3],p=this.toMonthIndex(c,m,h),g=+s[4];return this.newDate(c,p,g)},add:function(o,s,c){var m=o.year(),h=o.month(),p=this.isIntercalaryMonth(m,h),g=this.toChineseMonth(m,h),i=Object.getPrototypeOf(x.prototype).add.call(this,o,s,c);if(c==="y"){var w=i.year(),S=i.month(),M=this.isIntercalaryMonth(w,g),C=p&&M?this.toMonthIndex(w,g,!0):this.toMonthIndex(w,g,!1);C!==S&&i.month(C)}return i}});var E=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,k=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;J.calendars.chinese=x;var t=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function r(o,s,c,m){var h,p;if(typeof o=="object")h=o,p=s||{};else{var g=typeof o=="number"&&o>=1888&&o<=2111;if(!g)throw new Error("Solar year outside range 1888-2111");var i=typeof s=="number"&&s>=1&&s<=12;if(!i)throw new Error("Solar month outside range 1 - 12");var w=typeof c=="number"&&c>=1&&c<=31;if(!w)throw new Error("Solar day outside range 1 - 31");h={year:o,month:s,day:c},p=m||{}}var S=a[h.year-a[0]],M=h.year<<9|h.month<<5|h.day;p.year=M>=S?h.year:h.year-1,S=a[p.year-a[0]];var C=S>>9&4095,_=S>>5&15,T=S&31,f,u=new Date(C,_-1,T),A=new Date(h.year,h.month-1,h.day);f=Math.round((A-u)/(24*3600*1e3));var b=t[p.year-t[0]],z;for(z=0;z<13;z++){var I=b&1<<12-z?30:29;if(f>13;return!N||z=1888&&o<=2111;if(!i)throw new Error("Lunar year outside range 1888-2111");var w=typeof s=="number"&&s>=1&&s<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var S=typeof c=="number"&&c>=1&&c<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var M;typeof m=="object"?(M=!1,p=m):(M=!!m,p=h||{}),g={year:o,month:s,day:c,isIntercalary:M}}var C;C=g.day-1;var _=t[g.year-t[0]],T=_>>13,f;T&&(g.month>T||g.isIntercalary)?f=g.month:f=g.month-1;for(var u=0;u>9&4095,I=b>>5&15,N=b&31,R=new Date(z,I-1,N+C);return p.year=R.getFullYear(),p.month=1+R.getMonth(),p.day=R.getDate(),p}}}),JD=Ee({"node_modules/world-calendars/dist/calendars/coptic.js"(){var J=kf(),V=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return(this.dayOfWeek(x,E,k)||7)<6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),x<0&&x++,l.day()+(l.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var E=Math.floor(x)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(x)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.coptic=v}}),QD=Ee({"node_modules/world-calendars/dist/calendars/discworld.js"(){var J=kf(),V=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),!1},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),13},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),400},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return(e.day()+1)%8},weekDay:function(E,k,l){var e=this.dayOfWeek(E,k,l);return e>=2&&e<=6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{century:x[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return E=e.year()+(e.year()<0?1:0),k=e.month(),l=e.day(),l+(k>1?16:0)+(k>2?(k-2)*32:0)+(E-1)*400+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E+.5)-Math.floor(this.jdEpoch)-1;var k=Math.floor(E/400)+1;E-=(k-1)*400,E+=E>15?16:0;var l=Math.floor(E/32)+1,e=E-(l-1)*32+1;return this.newDate(k<=0?k-1:k,l,e)}});var x={20:"Fruitbat",21:"Anchovy"};J.calendars.discworld=v}}),eI=Ee({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var J=kf(),V=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(x){return this._validate(x,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return(this.dayOfWeek(x,E,k)||7)<6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),x<0&&x++,l.day()+(l.month()-1)*30+(x-1)*365+Math.floor(x/4)+this.jdEpoch-1},fromJD:function(x){var E=Math.floor(x)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(x)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.ethiopian=v}}),tI=Ee({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var J=kf(),V=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this._leapYear(k.year())},_leapYear:function(E){return E=E<0?E+1:E,x(E*7+1,19)<7},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),this._leapYear(E.year?E.year():E)?13:12},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return E=k.year(),this.toJD(E===-1?1:E+1,7,1)-this.toJD(E,7,1)},daysInMonth:function(E,k){return E.year&&(k=E.month(),E=E.year()),this._validate(E,k,this.minDay,J.local.invalidMonth),k===12&&this.leapYear(E)||k===8&&x(this.daysInYear(E),10)===5?30:k===9&&x(this.daysInYear(E),10)===3?29:this.daysPerMonth[k-1]},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=E<=0?E+1:E,a=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(k<7){for(var r=7;r<=this.monthsInYear(E);r++)a+=this.daysInMonth(E,r);for(var r=1;r=this.toJD(k===-1?1:k+1,7,1);)k++;for(var l=Ethis.toJD(k,l,this.daysInMonth(k,l));)l++;var e=E-this.toJD(k,l,1)+1;return this.newDate(k,l,e)}});function x(E,k){return E-k*Math.floor(E/k)}J.calendars.hebrew=v}}),rI=Ee({"node_modules/world-calendars/dist/calendars/islamic.js"(){var J=kf(),V=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Islamic",jdEpoch:19484395e-1,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(x){var E=this._validate(x,this.minMonth,this.minDay,J.local.invalidYear);return(E.year()*11+14)%30<11},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(x){return this.leapYear(x)?355:354},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===12&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return this.dayOfWeek(x,E,k)!==5},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),E=l.month(),k=l.day(),x=x<=0?x+1:x,k+Math.ceil(29.5*(E-1))+(x-1)*354+Math.floor((3+11*x)/30)+this.jdEpoch-1},fromJD:function(x){x=Math.floor(x)+.5;var E=Math.floor((30*(x-this.jdEpoch)+10646)/10631);E=E<=0?E-1:E;var k=Math.min(12,Math.ceil((x-29-this.toJD(E,1,1))/29.5)+1),l=x-this.toJD(E,k,1)+1;return this.newDate(E,k,l)}}),J.calendars.islamic=v}}),nI=Ee({"node_modules/world-calendars/dist/calendars/julian.js"(){var J=kf(),V=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Julian",jdEpoch:17214235e-1,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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()<0?E.year()+1:E.year();return k%4===0},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(x,E){var k=this._validate(x,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===2&&this.leapYear(k.year())?1:0)},weekDay:function(x,E,k){return(this.dayOfWeek(x,E,k)||7)<6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);return x=l.year(),E=l.month(),k=l.day(),x<0&&x++,E<=2&&(x--,E+=12),Math.floor(365.25*(x+4716))+Math.floor(30.6001*(E+1))+k-1524.5},fromJD:function(x){var E=Math.floor(x+.5),k=E+1524,l=Math.floor((k-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((k-e)/30.6001),a=t-Math.floor(t<14?1:13),r=l-Math.floor(a>2?4716:4715),n=k-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,a,n)}}),J.calendars.julian=v}}),aI=Ee({"node_modules/world-calendars/dist/calendars/mayan.js"(){var J=kf(),V=Lc();function v(k){this.local=this.regionalOptions[k||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.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(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),!1},formatYear:function(k){var l=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear);k=l.year();var e=Math.floor(k/400);k=k%400,k+=k<0?400:0;var t=Math.floor(k/20);return e+"."+t+"."+k%20},forYear:function(k){if(k=k.split("."),k.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),18},weekOfYear:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),0},daysInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),360},daysInMonth:function(k,l){return this._validate(k,l,this.minDay,J.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()},weekDay:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),!0},extraInfo:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate),a=t.toJD(),r=this._toHaab(a),n=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(k){k-=this.jdEpoch;var l=x(k+8+17*20,365);return[Math.floor(l/20)+1,x(l,20)]},_toTzolkin:function(k){return k-=this.jdEpoch,[E(k+20,20),E(k+4,13)]},toJD:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(k){k=Math.floor(k)+.5-this.jdEpoch;var l=Math.floor(k/360);k=k%360,k+=k<0?360:0;var e=Math.floor(k/20),t=k%20;return this.newDate(l,e,t)}});function x(k,l){return k-l*Math.floor(k/l)}function E(k,l){return x(k-1,l)+1}J.calendars.mayan=v}}),iI=Ee({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var J=kf(),V=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar;var x=J.instance("gregorian");V(v.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear);return x.leapYear(k.year()+(k.year()<1?1:0)+1469)},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidMonth),t=e.year();t<0&&t++;for(var a=e.day(),r=1;r=this.toJD(k+1,1,1);)k++;for(var l=E-Math.floor(this.toJD(k,1,1)+.5)+1,e=1;l>this.daysInMonth(k,e);)l-=this.daysInMonth(k,e),e++;return this.newDate(k,e,l)}}),J.calendars.nanakshahi=v}}),oI=Ee({"node_modules/world-calendars/dist/calendars/nepali.js"(){var J=kf(),V=Lc();function v(x){this.local=this.regionalOptions[x||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Nepali",jdEpoch:17007095e-1,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(x){return this.daysInYear(x)!==this.daysPerYear},weekOfYear:function(x,E,k){var l=this.newDate(x,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(x){var E=this._validate(x,this.minMonth,this.minDay,J.local.invalidYear);if(x=E.year(),typeof this.NEPALI_CALENDAR_DATA[x]>"u")return this.daysPerYear;for(var k=0,l=this.minMonth;l<=12;l++)k+=this.NEPALI_CALENDAR_DATA[x][l];return k},daysInMonth:function(x,E){return x.year&&(E=x.month(),x=x.year()),this._validate(x,E,this.minDay,J.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[x]>"u"?this.daysPerMonth[E-1]:this.NEPALI_CALENDAR_DATA[x][E]},weekDay:function(x,E,k){return this.dayOfWeek(x,E,k)!==6},toJD:function(x,E,k){var l=this._validate(x,E,k,J.local.invalidDate);x=l.year(),E=l.month(),k=l.day();var e=J.instance(),t=0,a=E,r=x;this._createMissingCalendarData(x);var n=x-(a>9||a===9&&k>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(E!==9&&(t=k,a--);a!==9;)a<=0&&(a=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][a],a--;return E===9?(t+=k-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(n))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(n,1,1).add(t,"d").toJD()},fromJD:function(x){var E=J.instance(),k=E.fromJD(x),l=k.year(),e=k.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var a=9,r=this.NEPALI_CALENDAR_DATA[t][0],n=this.NEPALI_CALENDAR_DATA[t][a]-r+1;e>n;)a++,a>12&&(a=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][a];var o=this.NEPALI_CALENDAR_DATA[t][a]-(n-e);return this.newDate(t,a,o)},_createMissingCalendarData:function(x){var E=this.daysPerMonth.slice(0);E.unshift(17);for(var k=x-1;k"u"&&(this.NEPALI_CALENDAR_DATA[k]=E)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),J.calendars.nepali=v}}),sI=Ee({"node_modules/world-calendars/dist/calendars/persian.js"(){var J=kf(),V=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}function x(E){var k=E-475;E<0&&k++;var l=.242197,e=l*k,t=l*(k+1),a=e-Math.floor(e),r=t-Math.floor(t);return a>r}v.prototype=new J.baseCalendar,V(v.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return x(k.year())},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=0;if(E>0)for(var a=1;a0?E-1:E)*365+t+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E)+.5;var k=475+(E-this.toJD(475,1,1))/365.242197,l=Math.floor(k);l<=0&&l--,E>this.toJD(l,12,x(l)?30:29)&&(l++,l===0&&l++);var e=E-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),a=E-this.toJD(l,t,1)+1;return this.newDate(l,t,a)}}),J.calendars.persian=v,J.calendars.jalali=v}}),lI=Ee({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var J=kf(),V=Lc(),v=J.instance();function x(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}x.prototype=new J.baseCalendar,V(x.prototype,{name:"Taiwan",jdEpoch:24194025e-1,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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return v.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return v.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return v.toJD(t,e.month(),e.day())},fromJD:function(E){var k=v.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)},_g2tYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)}}),J.calendars.taiwan=x}}),uI=Ee({"node_modules/world-calendars/dist/calendars/thai.js"(){var J=kf(),V=Lc(),v=J.instance();function x(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}x.prototype=new J.baseCalendar,V(x.prototype,{name:"Thai",jdEpoch:15230985e-1,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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return v.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return v.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return v.toJD(t,e.month(),e.day())},fromJD:function(E){var k=v.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)},_g2tYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)}}),J.calendars.thai=x}}),cI=Ee({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var J=kf(),V=Lc();function v(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}v.prototype=new J.baseCalendar,V(v.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this.daysInYear(k.year())===355},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){for(var k=0,l=1;l<=12;l++)k+=this.daysInMonth(E,l);return k},daysInMonth:function(E,k){for(var l=this._validate(E,k,this.minDay,J.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,a=0;ae)return x[t]-x[t-1];t++}return 30},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,a=e.day()+x[t-1]-1;return a+24e5-.5},fromJD:function(E){for(var k=E-24e5+.5,l=0,e=0;ek);e++)l++;var t=l+15292,a=Math.floor((t-1)/12),r=a+1,n=t-12*a,o=k-x[l-1]+1;return this.newDate(r,n,o)},isValid:function(E,k,l){var e=J.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(E=E.year!=null?E.year:E,e=E>=1276&&E<=1500),e},_validate:function(E,k,l,e){var t=J.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),J.calendars.ummalqura=v;var x=[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]}}),fI=Ee({"src/components/calendars/calendars.js"(J,V){"use strict";V.exports=kf(),ZD(),KD(),JD(),QD(),eI(),tI(),rI(),nI(),aI(),iI(),oI(),sI(),lI(),uI(),cI()}}),hI=Ee({"src/components/calendars/index.js"(J,V){"use strict";var v=fI(),x=Vr(),E=Qi(),k=E.EPOCHJD,l=E.ONEDAY,e={valType:"enumerated",values:x.sortObjectKeys(v.calendars),editType:"calc",dflt:"gregorian"},t=function(_,T,f,u){var A={};return A[f]=e,x.coerce(_,T,A,f,u)},a=function(_,T,f,u){for(var A=0;A{Xt.preventDefault(),Xt.stopPropagation(),Xt.clipboardData.setData("text",st),ft.removeEventListener("copy",Lt,!0)};ft.addEventListener("copy",Lt,!0),document.execCommand("copy")}xt.copyText=be})(nA||(nA={}));var Rl;(function(xt){function be(Xt){let Hr=window.getComputedStyle(Xt),Cr=parseFloat(Hr.borderTopWidth)||0,jr=parseFloat(Hr.borderLeftWidth)||0,Jr=parseFloat(Hr.borderRightWidth)||0,zr=parseFloat(Hr.borderBottomWidth)||0,Gr=parseFloat(Hr.paddingTop)||0,tn=parseFloat(Hr.paddingLeft)||0,Yr=parseFloat(Hr.paddingRight)||0,Nr=parseFloat(Hr.paddingBottom)||0,Qr=jr+tn+Yr+Jr,En=Cr+Gr+Nr+zr;return{borderTop:Cr,borderLeft:jr,borderRight:Jr,borderBottom:zr,paddingTop:Gr,paddingLeft:tn,paddingRight:Yr,paddingBottom:Nr,horizontalSum:Qr,verticalSum:En}}xt.boxSizing=be;function st(Xt){let Hr=window.getComputedStyle(Xt),Cr=parseFloat(Hr.minWidth)||0,jr=parseFloat(Hr.minHeight)||0,Jr=parseFloat(Hr.maxWidth)||1/0,zr=parseFloat(Hr.maxHeight)||1/0;return Jr=Math.max(Cr,Jr),zr=Math.max(jr,zr),{minWidth:Cr,minHeight:jr,maxWidth:Jr,maxHeight:zr}}xt.sizeLimits=st;function ft(Xt,Hr,Cr){let jr=Xt.getBoundingClientRect();return Hr>=jr.left&&Hr=jr.top&&Cr=Cr.bottom)){if(jr.topCr.bottom&&jr.height>=Cr.height){Xt.scrollTop-=Cr.top-jr.top;return}if(jr.topCr.height){Xt.scrollTop-=Cr.bottom-jr.bottom;return}if(jr.bottom>Cr.bottom&&jr.height{let zr=Element.prototype;return zr.matches||zr.matchesSelector||zr.mozMatchesSelector||zr.msMatchesSelector||zr.oMatchesSelector||zr.webkitMatchesSelector||function(Gr){let tn=this,Yr=tn.ownerDocument?tn.ownerDocument.querySelectorAll(Gr):[];return Array.prototype.indexOf.call(Yr,tn)!==-1}})();function be(zr){zr=zr.split(",",1)[0];let Gr=0,tn=0,Yr=0;function Nr(Qr){let En=zr.match(Qr);return En===null?!1:(zr=zr.slice(En[0].length),!0)}for(zr=zr.replace(Jr," $1 ");zr.length>0;){if(Nr(st)){Gr++;continue}if(Nr(ft)){tn++;continue}if(Nr(Lt)){tn++;continue}if(Nr(Hr)){Yr++;continue}if(Nr(Cr)){tn++;continue}if(Nr(Xt)){Yr++;continue}if(!Nr(jr))return 0}return Gr=Math.min(Gr,255),tn=Math.min(tn,255),Yr=Math.min(Yr,255),Gr<<16|tn<<8|Yr}xt.calculateSingle=be;let st=/^#[^\s\+>~#\.\[:]+/,ft=/^\.[^\s\+>~#\.\[:]+/,Lt=/^\[[^\]]+\]/,Xt=/^[^\s\+>~#\.\[:]+/,Hr=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,Cr=/^:[^\s\+>~#\.\[:]+/,jr=/^[\s\+>~\*]+/,Jr=/:not\(([^\)]+)\)/g})(kh||(kh={}));var ud=sd(yv());var Ep=class{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return this._size===0}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let be=this._first;for(;be;)yield be.value,be=be.next}*retro(){let be=this._last;for(;be;)yield be.value,be=be.prev}*nodes(){let be=this._first;for(;be;)yield be,be=be.next}*retroNodes(){let be=this._last;for(;be;)yield be,be=be.prev}assign(be){this.clear();for(let st of be)this.addLast(st)}push(be){this.addLast(be)}pop(){return this.removeLast()}shift(be){this.addFirst(be)}unshift(){return this.removeFirst()}addFirst(be){let st=new ld.LinkedListNode(this,be);return this._first?(st.next=this._first,this._first.prev=st,this._first=st):(this._first=st,this._last=st),this._size++,st}addLast(be){let st=new ld.LinkedListNode(this,be);return this._last?(st.prev=this._last,this._last.next=st,this._last=st):(this._first=st,this._last=st),this._size++,st}insertBefore(be,st){if(!st||st===this._first)return this.addFirst(be);if(!(st instanceof ld.LinkedListNode)||st.list!==this)throw new Error("Reference node is not owned by the list.");let ft=new ld.LinkedListNode(this,be),Lt=st,Xt=Lt.prev;return ft.next=Lt,ft.prev=Xt,Lt.prev=ft,Xt.next=ft,this._size++,ft}insertAfter(be,st){if(!st||st===this._last)return this.addLast(be);if(!(st instanceof ld.LinkedListNode)||st.list!==this)throw new Error("Reference node is not owned by the list.");let ft=new ld.LinkedListNode(this,be),Lt=st,Xt=Lt.next;return ft.next=Xt,ft.prev=Lt,Lt.next=ft,Xt.prev=ft,this._size++,ft}removeFirst(){let be=this._first;if(be)return be===this._last?(this._first=null,this._last=null):(this._first=be.next,this._first.prev=null),be.list=null,be.next=null,be.prev=null,this._size--,be.value}removeLast(){let be=this._last;if(be)return be===this._first?(this._first=null,this._last=null):(this._last=be.prev,this._last.next=null),be.list=null,be.next=null,be.prev=null,this._size--,be.value}removeNode(be){if(!(be instanceof ld.LinkedListNode)||be.list!==this)throw new Error("Node is not owned by the list.");let st=be;st===this._first&&st===this._last?(this._first=null,this._last=null):st===this._first?(this._first=st.next,this._first.prev=null):st===this._last?(this._last=st.prev,this._last.next=null):(st.next.prev=st.prev,st.prev.next=st.next),st.list=null,st.next=null,st.prev=null,this._size--}clear(){let be=this._first;for(;be;){let st=be.next;be.list=null,be.prev=null,be.next=null,be=st}this._first=null,this._last=null,this._size=0}};(function(xt){function be(st){let ft=new xt;return ft.assign(st),ft}xt.from=be})(Ep||(Ep={}));var ld;(function(xt){class be{constructor(ft,Lt){this.list=null,this.next=null,this.prev=null,this.list=ft,this.value=Lt}}xt.LinkedListNode=be})(ld||(ld={}));var Xf=class{constructor(be){this.type=be}get isConflatable(){return!1}conflate(be){return!1}},Ud=class extends Xf{get isConflatable(){return!0}conflate(be){return!0}},$i;(function(xt){let be=null,st=(ni=>qi=>{let Ta=!1;return ni.then(()=>!Ta&&qi()),()=>{Ta=!0}})(Promise.resolve());function ft(ni,qi){let Ta=tn.get(ni);if(!Ta||Ta.length===0){In(ni,qi);return}(0,ud.every)((0,ud.retro)(Ta),ki=>ki?En(ki,ni,qi):!0)&&In(ni,qi)}xt.sendMessage=ft;function Lt(ni,qi){if(!qi.isConflatable){Ee(ni,qi);return}(0,ud.some)(Gr,Hn=>Hn.handler!==ni||!Hn.msg||Hn.msg.type!==qi.type||!Hn.msg.isConflatable?!1:Hn.msg.conflate(qi))||Ee(ni,qi)}xt.postMessage=Lt;function Xt(ni,qi){let Ta=tn.get(ni);Ta&&Ta.indexOf(qi)!==-1||(Ta?Ta.push(qi):tn.set(ni,[qi]))}xt.installMessageHook=Xt;function Hr(ni,qi){let Ta=tn.get(ni);if(!Ta)return;let Hn=Ta.indexOf(qi);Hn!==-1&&(Ta[Hn]=null,Wn(Ta))}xt.removeMessageHook=Hr;function Cr(ni){let qi=tn.get(ni);qi&&qi.length>0&&(ud.ArrayExt.fill(qi,null),Wn(qi));for(let Ta of Gr)Ta.handler===ni&&(Ta.handler=null,Ta.msg=null)}xt.clearData=Cr;function jr(){Qr||be===null||(be(),be=null,Qr=!0,yn(),Qr=!1)}xt.flush=jr;function Jr(){return Nr}xt.getExceptionHandler=Jr;function zr(ni){let qi=Nr;return Nr=ni,qi}xt.setExceptionHandler=zr;let Gr=new Ep,tn=new WeakMap,Yr=new Set,Nr=ni=>{console.error(ni)},Qr=!1;function En(ni,qi,Ta){let Hn=!0;try{typeof ni=="function"?Hn=ni(qi,Ta):Hn=ni.messageHook(qi,Ta)}catch(ki){Nr(ki)}return Hn}function In(ni,qi){try{ni.processMessage(qi)}catch(Ta){Nr(Ta)}}function Ee(ni,qi){Gr.addLast({handler:ni,msg:qi}),be===null&&(be=st(yn))}function yn(){if(be=null,Gr.isEmpty)return;let ni={handler:null,msg:null};for(Gr.addLast(ni);;){let qi=Gr.removeFirst();if(qi===ni)return;qi.handler&&qi.msg&&ft(qi.handler,qi.msg)}}function Wn(ni){Yr.size===0&&st(Yn),Yr.add(ni)}function Yn(){Yr.forEach(ra),Yr.clear()}function ra(ni){ud.ArrayExt.removeAllWhere(ni,ri)}function ri(ni){return ni===null}})($i||($i={}));var $f=class{constructor(be){this._pid=_v.nextPID(),this.name=be.name,this._create=be.create,this._coerce=be.coerce||null,this._compare=be.compare||null,this._changed=be.changed||null}get(be){let st,ft=_v.ensureMap(be);return this._pid in ft?st=ft[this._pid]:st=ft[this._pid]=this._createValue(be),st}set(be,st){let ft,Lt=_v.ensureMap(be);this._pid in Lt?ft=Lt[this._pid]:ft=Lt[this._pid]=this._createValue(be);let Xt=this._coerceValue(be,st);this._maybeNotify(be,ft,Lt[this._pid]=Xt)}coerce(be){let st,ft=_v.ensureMap(be);this._pid in ft?st=ft[this._pid]:st=ft[this._pid]=this._createValue(be);let Lt=this._coerceValue(be,st);this._maybeNotify(be,st,ft[this._pid]=Lt)}_createValue(be){let st=this._create;return st(be)}_coerceValue(be,st){let ft=this._coerce;return ft?ft(be,st):st}_compareValue(be,st){let ft=this._compare;return ft?ft(be,st):be===st}_maybeNotify(be,st,ft){let Lt=this._changed;Lt&&!this._compareValue(st,ft)&&Lt(be,st,ft)}};(function(xt){function be(st){_v.ownerData.delete(st)}xt.clearData=be})($f||($f={}));var _v;(function(xt){xt.ownerData=new WeakMap,xt.nextPID=(()=>{let st=0;return()=>`pid-${`${Math.random()}`.slice(2)}-${st++}`})();function be(st){let ft=xt.ownerData.get(st);return ft||(ft=Object.create(null),xt.ownerData.set(st,ft),ft)}xt.ensureMap=be})(_v||(_v={}));var dg=sd(yv()),ZF=sd(hg()),Ml=class{constructor(be){this.sender=be}connect(be,st){return oh.connect(this,be,st)}disconnect(be,st){return oh.disconnect(this,be,st)}emit(be){oh.emit(this,be)}};(function(xt){function be(jr,Jr){oh.disconnectBetween(jr,Jr)}xt.disconnectBetween=be;function st(jr){oh.disconnectSender(jr)}xt.disconnectSender=st;function ft(jr){oh.disconnectReceiver(jr)}xt.disconnectReceiver=ft;function Lt(jr){oh.disconnectAll(jr)}xt.disconnectAll=Lt;function Xt(jr){oh.disconnectAll(jr)}xt.clearData=Xt;function Hr(){return oh.exceptionHandler}xt.getExceptionHandler=Hr;function Cr(jr){let Jr=oh.exceptionHandler;return oh.exceptionHandler=jr,Jr}xt.setExceptionHandler=Cr})(Ml||(Ml={}));var oh;(function(xt){xt.exceptionHandler=Ee=>{console.error(Ee)};function be(Ee,yn,Wn){Wn=Wn||void 0;let Yn=jr.get(Ee.sender);if(Yn||(Yn=[],jr.set(Ee.sender,Yn)),tn(Yn,Ee,yn,Wn))return!1;let ra=Wn||yn,ri=Jr.get(ra);ri||(ri=[],Jr.set(ra,ri));let ni={signal:Ee,slot:yn,thisArg:Wn};return Yn.push(ni),ri.push(ni),!0}xt.connect=be;function st(Ee,yn,Wn){Wn=Wn||void 0;let Yn=jr.get(Ee.sender);if(!Yn||Yn.length===0)return!1;let ra=tn(Yn,Ee,yn,Wn);if(!ra)return!1;let ri=Wn||yn,ni=Jr.get(ri);return ra.signal=null,Nr(Yn),Nr(ni),!0}xt.disconnect=st;function ft(Ee,yn){let Wn=jr.get(Ee);if(!Wn||Wn.length===0)return;let Yn=Jr.get(yn);if(!(!Yn||Yn.length===0)){for(let ra of Yn)ra.signal&&ra.signal.sender===Ee&&(ra.signal=null);Nr(Wn),Nr(Yn)}}xt.disconnectBetween=ft;function Lt(Ee){let yn=jr.get(Ee);if(!(!yn||yn.length===0)){for(let Wn of yn){if(!Wn.signal)continue;let Yn=Wn.thisArg||Wn.slot;Wn.signal=null,Nr(Jr.get(Yn))}Nr(yn)}}xt.disconnectSender=Lt;function Xt(Ee){let yn=Jr.get(Ee);if(!(!yn||yn.length===0)){for(let Wn of yn){if(!Wn.signal)continue;let Yn=Wn.signal.sender;Wn.signal=null,Nr(jr.get(Yn))}Nr(yn)}}xt.disconnectReceiver=Xt;function Hr(Ee){Lt(Ee),Xt(Ee)}xt.disconnectAll=Hr;function Cr(Ee,yn){let Wn=jr.get(Ee.sender);if(!(!Wn||Wn.length===0))for(let Yn=0,ra=Wn.length;Ynra.signal===yn&&ra.slot===Wn&&ra.thisArg===Yn)}function Yr(Ee,yn){let{signal:Wn,slot:Yn,thisArg:ra}=Ee;try{Yn.call(ra,Wn.sender,yn)}catch(ri){xt.exceptionHandler(ri)}}function Nr(Ee){zr.size===0&&Gr(Qr),zr.add(Ee)}function Qr(){zr.forEach(En),zr.clear()}function En(Ee){dg.ArrayExt.removeAllWhere(Ee,In)}function In(Ee){return Ee.signal===null}})(oh||(oh={}));var qd=class{constructor(be){this._fn=be}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let be=this._fn;this._fn=null,be()}};var C0=class{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(be=>{be.dispose()}),this._items.clear())}contains(be){return this._items.has(be)}add(be){this._items.add(be)}remove(be){this._items.delete(be)}clear(){this._items.clear()}};(function(xt){function be(st){let ft=new xt;for(let Lt of st)ft.add(Lt);return ft}xt.from=be})(C0||(C0={}));var vg=class extends C0{constructor(){super(...arguments),this._disposed=new Ml(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),Ml.clearData(this))}};(function(xt){function be(st){let ft=new xt;for(let Lt of st)ft.add(Lt);return ft}xt.from=be})(vg||(vg={}));var Zf=class xt{constructor(be){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:st,edge:ft,distance:Lt}=this._scrollTarget,Xt=Uf.SCROLL_EDGE_SIZE-Lt,Hr=Math.pow(Xt/Uf.SCROLL_EDGE_SIZE,2),Cr=Math.max(1,Math.round(Hr*Uf.SCROLL_EDGE_SIZE));switch(ft){case"top":st.scrollTop-=Cr;break;case"left":st.scrollLeft-=Cr;break;case"right":st.scrollLeft+=Cr;break;case"bottom":st.scrollTop+=Cr;break}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=be.document||document,this.mimeData=be.mimeData,this.dragImage=be.dragImage||null,this.proposedAction=be.proposedAction||"copy",this.supportedActions=be.supportedActions||"all",this.source=be.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let be=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});Uf.dispatchDragLeave(this,this._currentTarget,null,be)}this._finalize("none")}}get isDisposed(){return this._disposed}start(be,st){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(be,st),this._promise=new Promise(Lt=>{this._resolve=Lt});let ft=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:be,clientY:st});return document.dispatchEvent(ft),this._promise}handleEvent(be){switch(be.type){case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"keydown":this._evtKeyDown(be);break;default:be.preventDefault(),be.stopPropagation();break}}moveDragImage(be,st){if(!this.dragImage)return;let ft=this.dragImage.style;ft.transform=`translate(${be}px, ${st}px)`}_evtPointerMove(be){be.preventDefault(),be.stopPropagation(),this._updateCurrentTarget(be),this._updateDragScroll(be),this.moveDragImage(be.clientX,be.clientY)}_evtPointerUp(be){if(be.preventDefault(),be.stopPropagation(),be.button!==0)return;if(this._updateCurrentTarget(be),!this._currentTarget){this._finalize("none");return}if(this._dropAction==="none"){Uf.dispatchDragLeave(this,this._currentTarget,null,be),this._finalize("none");return}let st=Uf.dispatchDrop(this,this._currentTarget,be);this._finalize(st)}_evtKeyDown(be){be.preventDefault(),be.stopPropagation(),be.keyCode===27&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(be){let st=Uf.findScrollTarget(be);!this._scrollTarget&&!st||(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=st)}_updateCurrentTarget(be){let st=this._currentTarget,ft=this._currentTarget,Lt=this._currentElement,Xt=Uf.findElementBehindBackdrop(be,this.document);this._currentElement=Xt,Xt!==Lt&&Xt!==ft&&Uf.dispatchDragExit(this,ft,Xt,be),Xt!==Lt&&Xt!==ft&&(ft=Uf.dispatchDragEnter(this,Xt,ft,be)),ft!==st&&(this._currentTarget=ft,Uf.dispatchDragLeave(this,st,ft,be));let Hr=Uf.dispatchDragOver(this,ft,be);this._setDropAction(Hr)}_attachDragImage(be,st){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let ft=this.dragImage.style;ft.pointerEvents="none",ft.position="fixed",ft.transform=`translate(${be}px, ${st}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let be=this.dragImage.parentNode;be&&be.removeChild(this.dragImage)}_setDropAction(be){if(be=Uf.validateAction(be,this.supportedActions),!(this._override&&this._dropAction===be))switch(be){case"none":this._dropAction=be,this._override=xt.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=be,this._override=xt.overrideCursor("copy",this.document);break;case"link":this._dropAction=be,this._override=xt.overrideCursor("alias",this.document);break;case"move":this._dropAction=be,this._override=xt.overrideCursor("move",this.document);break}}_finalize(be){let st=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,st&&st(be)}};(function(xt){class be extends DragEvent{constructor(Lt,Xt){super(Xt.type,{bubbles:!0,cancelable:!0,altKey:Lt.altKey,button:Lt.button,clientX:Lt.clientX,clientY:Lt.clientY,ctrlKey:Lt.ctrlKey,detail:0,metaKey:Lt.metaKey,relatedTarget:Xt.related,screenX:Lt.screenX,screenY:Lt.screenY,shiftKey:Lt.shiftKey,view:window});let{drag:Hr}=Xt;this.dropAction="none",this.mimeData=Hr.mimeData,this.proposedAction=Hr.proposedAction,this.supportedActions=Hr.supportedActions,this.source=Hr.source}}xt.Event=be;function st(ft,Lt=document){return Uf.overrideCursor(ft,Lt)}xt.overrideCursor=st})(Zf||(Zf={}));var Uf;(function(xt){xt.SCROLL_EDGE_SIZE=20;function be(Wn,Yn){return Gr[Wn]&tn[Yn]?Wn:"none"}xt.validateAction=be;function st(Wn,Yn=document){if(Wn){if(ft&&Wn==ft.event)return ft.element;xt.cursorBackdrop.style.zIndex="-1000";let ra=Yn.elementFromPoint(Wn.clientX,Wn.clientY);return xt.cursorBackdrop.style.zIndex="",ft={event:Wn,element:ra},ra}else{let ra=xt.cursorBackdrop.style.transform;if(Lt&&ra===Lt.transform)return Lt.element;let ri=xt.cursorBackdrop.getBoundingClientRect();xt.cursorBackdrop.style.zIndex="-1000";let ni=Yn.elementFromPoint(ri.left+ri.width/2,ri.top+ri.height/2);return xt.cursorBackdrop.style.zIndex="",Lt={transform:ra,element:ni},ni}}xt.findElementBehindBackdrop=st;let ft=null,Lt=null;function Xt(Wn){let Yn=Wn.clientX,ra=Wn.clientY,ri=st(Wn);for(;ri;ri=ri.parentElement){if(!ri.hasAttribute("data-lm-dragscroll"))continue;let ni=0,qi=0;ri===document.body&&(ni=window.pageXOffset,qi=window.pageYOffset);let Ta=ri.getBoundingClientRect(),Hn=Ta.top+qi,ki=Ta.left+ni,ji=ki+Ta.width,ls=Hn+Ta.height;if(Yn=ji||ra=ls)continue;let Ys=Yn-ki+1,mi=ra-Hn+1,Qi=ji-Yn,iu=ls-ra,Us=Math.min(Ys,mi,Qi,iu);if(Us>xt.SCROLL_EDGE_SIZE)continue;let vs;switch(Us){case iu:vs="bottom";break;case mi:vs="top";break;case Qi:vs="right";break;case Ys:vs="left";break;default:throw"unreachable"}let dl=ri.scrollWidth-ri.clientWidth,ec=ri.scrollHeight-ri.clientHeight,Ec;switch(vs){case"top":Ec=ec>0&&ri.scrollTop>0;break;case"left":Ec=dl>0&&ri.scrollLeft>0;break;case"right":Ec=dl>0&&ri.scrollLeft0&&ri.scrollTop{ra===yn&&xt.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",Nr,!0),xt.cursorBackdrop.removeEventListener("scroll",Qr,!0),ri.removeChild(xt.cursorBackdrop))})}xt.overrideCursor=Yr;function Nr(Wn){xt.cursorBackdrop&&(xt.cursorBackdrop.style.transform=`translate(${Wn.clientX}px, ${Wn.clientY}px)`)}function Qr(Wn){if(!xt.cursorBackdrop)return;let Yn=st();if(!Yn)return;let ra=Yn.closest("[data-lm-dragscroll]");ra&&(ra.scrollTop+=xt.cursorBackdrop.scrollTop-In,ra.scrollLeft+=xt.cursorBackdrop.scrollLeft-In,En())}function En(){xt.cursorBackdrop.scrollTop=In,xt.cursorBackdrop.scrollLeft=In}let In=500;function Ee(){let Wn=document.createElement("div");return Wn.classList.add("lm-cursor-backdrop"),Wn}let yn=0;xt.cursorBackdrop=Ee()})(Uf||(Uf={}));var aA=sd(yv()),Af=sd(hg());function kp(){return ib.keyboardLayout}var L0=class xt{constructor(be,st,ft=[]){this.name=be,this._codes=st,this._keys=xt.extractKeys(st),this._modifierKeys=xt.convertToKeySet(ft)}keys(){return Object.keys(this._keys)}isValidKey(be){return be in this._keys}isModifierKey(be){return be in this._modifierKeys}keyForKeydownEvent(be){return this._codes[be.keyCode]||""}};(function(xt){function be(ft){let Lt=Object.create(null);for(let Xt in ft)Lt[ft[Xt]]=!0;return Lt}xt.extractKeys=be;function st(ft){let Lt=Object(null);for(let Xt=0,Hr=ft.length;Xt{this._commands.delete(be),this._commandChanged.emit({id:be,type:"removed"})})}notifyCommandChanged(be){if(be!==void 0&&!this._commands.has(be))throw new Error(`Command '${be}' is not registered.`);this._commandChanged.emit({id:be,type:be?"changed":"many-changed"})}describedBy(be,st=Af.JSONExt.emptyObject){var ft;let Lt=this._commands.get(be);return Promise.resolve((ft=Lt?.describedBy.call(void 0,st))!==null&&ft!==void 0?ft:{args:null})}label(be,st=Af.JSONExt.emptyObject){var ft;let Lt=this._commands.get(be);return(ft=Lt?.label.call(void 0,st))!==null&&ft!==void 0?ft:""}mnemonic(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.mnemonic.call(void 0,st):-1}icon(be,st=Af.JSONExt.emptyObject){var ft;return(ft=this._commands.get(be))===null||ft===void 0?void 0:ft.icon.call(void 0,st)}iconClass(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.iconClass.call(void 0,st):""}iconLabel(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.iconLabel.call(void 0,st):""}caption(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.caption.call(void 0,st):""}usage(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.usage.call(void 0,st):""}className(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.className.call(void 0,st):""}dataset(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.dataset.call(void 0,st):{}}isEnabled(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isEnabled.call(void 0,st):!1}isToggled(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isToggled.call(void 0,st):!1}isToggleable(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isToggleable:!1}isVisible(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);return ft?ft.isVisible.call(void 0,st):!1}execute(be,st=Af.JSONExt.emptyObject){let ft=this._commands.get(be);if(!ft)return Promise.reject(new Error(`Command '${be}' not registered.`));let Lt;try{Lt=ft.execute.call(void 0,st)}catch(Hr){Lt=Promise.reject(Hr)}let Xt=Promise.resolve(Lt);return this._commandExecuted.emit({id:be,args:st,result:Xt}),Xt}addKeyBinding(be){let st=Lh.createKeyBinding(be);return this._keyBindings.push(st),this._keyBindingChanged.emit({binding:st,type:"added"}),new qd(()=>{aA.ArrayExt.removeFirstOf(this._keyBindings,st),this._keyBindingChanged.emit({binding:st,type:"removed"})})}processKeydownEvent(be){if(be.defaultPrevented||this._replaying)return;let st=xt.keystrokeForKeydownEvent(be);if(!st){this._replayKeydownEvents(),this._clearPendingState();return}if(xt.isModifierKeyPressed(be)){let{exact:Hr}=Lh.matchKeyBinding(this._keyBindings,[st],be);Hr?(be.preventDefault(),be.stopPropagation(),this._startModifierTimer(Hr)):this._clearModifierTimer();return}this._keystrokes.push(st);let{exact:ft,partial:Lt}=Lh.matchKeyBinding(this._keyBindings,this._keystrokes,be),Xt=Lt.length!==0;if(!ft&&!Xt){this._replayKeydownEvents(),this._clearPendingState();return}if((ft?.preventDefault||Lt.some(Hr=>Hr.preventDefault))&&(be.preventDefault(),be.stopPropagation()),this._keydownEvents.push(be),ft&&!Xt){this._executeKeyBinding(ft),this._clearPendingState();return}ft&&(this._exactKeyMatch=ft),this._startTimer()}holdKeyBindingExecution(be,st){this._holdKeyBindingPromises.set(be,st)}processKeyupEvent(be){this._clearModifierTimer()}_startModifierTimer(be){this._clearModifierTimer(),this._timerModifierID=window.setTimeout(()=>{this._executeKeyBinding(be)},Lh.modifierkeyTimeOut)}_clearModifierTimer(){this._timerModifierID!==0&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout(()=>{this._onPendingTimeout()},Lh.CHORD_TIMEOUT)}_clearTimer(){this._timerID!==0&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){this._keydownEvents.length!==0&&(this._replaying=!0,this._keydownEvents.forEach(Lh.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(be){if(this._holdKeyBindingPromises.size!==0){let Xt=[...this._keydownEvents],Hr=(await Promise.race([Promise.all(Xt.map(async Cr=>{var jr;return(jr=this._holdKeyBindingPromises.get(Cr))!==null&&jr!==void 0?jr:Promise.resolve(!0)})),new Promise(Cr=>{setTimeout(()=>Cr([!1]),Lh.KEYBINDING_HOLD_TIMEOUT)})])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!Hr)return}let{command:st,args:ft}=be,Lt={_luminoEvent:{type:"keybinding",keys:be.keys},...ft};if(!this.hasCommand(st)||!this.isEnabled(st,Lt)){let Xt=this.hasCommand(st)?"enabled":"registered",Cr=`Cannot execute key binding '${be.keys.join(", ")}':`,jr=`command '${st}' is not ${Xt}.`;console.warn(`${Cr} ${jr}`);return}await this.execute(st,Lt)}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}};(function(xt){function be(Cr){let jr="",Jr=!1,zr=!1,Gr=!1,tn=!1;for(let Yr of Cr.split(/\s+/))Yr==="Accel"?jf.IS_MAC?zr=!0:Gr=!0:Yr==="Alt"?Jr=!0:Yr==="Cmd"?zr=!0:Yr==="Ctrl"?Gr=!0:Yr==="Shift"?tn=!0:Yr.length>0&&(jr=Yr);return{cmd:zr,ctrl:Gr,alt:Jr,shift:tn,key:jr}}xt.parseKeystroke=be;function st(Cr){let jr="",Jr=be(Cr);return Jr.ctrl&&(jr+="Ctrl "),Jr.alt&&(jr+="Alt "),Jr.shift&&(jr+="Shift "),Jr.cmd&&jf.IS_MAC&&(jr+="Cmd "),Jr.key?jr+Jr.key:jr.trim()}xt.normalizeKeystroke=st;function ft(Cr){let jr;return jf.IS_WIN?jr=Cr.winKeys||Cr.keys:jf.IS_MAC?jr=Cr.macKeys||Cr.keys:jr=Cr.linuxKeys||Cr.keys,jr.map(st)}xt.normalizeKeys=ft;function Lt(Cr){return typeof Cr=="string"?jr(Cr):Cr.map(jr).join(", ");function jr(Jr){let zr=[],Gr=jf.IS_MAC?" ":"+",tn=be(Jr);return tn.ctrl&&zr.push("Ctrl"),tn.alt&&zr.push("Alt"),tn.shift&&zr.push("Shift"),jf.IS_MAC&&tn.cmd&&zr.push("Cmd"),zr.push(tn.key),zr.map(Lh.formatKey).join(Gr)}}xt.formatKeystroke=Lt;function Xt(Cr){let jr=kp(),Jr=jr.keyForKeydownEvent(Cr);return jr.isModifierKey(Jr)}xt.isModifierKeyPressed=Xt;function Hr(Cr){let jr=kp(),Jr=jr.keyForKeydownEvent(Cr),zr=[];return Cr.ctrlKey&&zr.push("Ctrl"),Cr.altKey&&zr.push("Alt"),Cr.shiftKey&&zr.push("Shift"),Cr.metaKey&&jf.IS_MAC&&zr.push("Cmd"),jr.isModifierKey(Jr)||zr.push(Jr),zr.join(" ")}xt.keystrokeForKeydownEvent=Hr})(cd||(cd={}));var Lh;(function(xt){xt.CHORD_TIMEOUT=1e3,xt.KEYBINDING_HOLD_TIMEOUT=1e3,xt.modifierkeyTimeOut=500;function be(yn){return{execute:yn.execute,describedBy:Nr(typeof yn.describedBy=="function"?yn.describedBy:{args:null,...yn.describedBy},()=>({args:null})),label:Nr(yn.label,jr),mnemonic:Nr(yn.mnemonic,Jr),icon:Nr(yn.icon,Yr),iconClass:Nr(yn.iconClass,jr),iconLabel:Nr(yn.iconLabel,jr),caption:Nr(yn.caption,jr),usage:Nr(yn.usage,jr),className:Nr(yn.className,jr),dataset:Nr(yn.dataset,tn),isEnabled:yn.isEnabled||zr,isToggled:yn.isToggled||Gr,isToggleable:yn.isToggleable||!!yn.isToggled,isVisible:yn.isVisible||zr}}xt.createCommand=be;function st(yn){var Wn;return{keys:cd.normalizeKeys(yn),selector:Qr(yn),command:yn.command,args:yn.args||Af.JSONExt.emptyObject,preventDefault:(Wn=yn.preventDefault)!==null&&Wn!==void 0?Wn:!0}}xt.createKeyBinding=st;function ft(yn,Wn,Yn){let ra=null,ri=[],ni=1/0,qi=0;for(let Ta=0,Hn=yn.length;Tani)continue;let Ys=Ch.calculateSpecificity(ki.selector);(!ra||ls=qi)&&(ra=ki,ni=ls,qi=Ys)}return{exact:ra,partial:ri}}xt.matchKeyBinding=ft;function Lt(yn){yn.target.dispatchEvent(Ee(yn))}xt.replayKeyEvent=Lt;function Xt(yn){return jf.IS_MAC?Hr.hasOwnProperty(yn)?Hr[yn]:yn:Cr.hasOwnProperty(yn)?Cr[yn]:yn}xt.formatKey=Xt;let Hr={Backspace:"\u232B",Tab:"\u21E5",Enter:"\u23CE",Shift:"\u21E7",Ctrl:"\u2303",Alt:"\u2325",Escape:"\u238B",PageUp:"\u21DE",PageDown:"\u21DF",End:"\u2198",Home:"\u2196",ArrowLeft:"\u2190",ArrowUp:"\u2191",ArrowRight:"\u2192",ArrowDown:"\u2193",Delete:"\u2326",Cmd:"\u2318"},Cr={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},jr=()=>"",Jr=()=>-1,zr=()=>!0,Gr=()=>!1,tn=()=>({}),Yr=()=>{};function Nr(yn,Wn){return yn===void 0?Wn:typeof yn=="function"?yn:()=>yn}function Qr(yn){if(yn.selector.indexOf(",")!==-1)throw new Error(`Selector cannot contain commas: ${yn.selector}`);if(!Ch.isValid(yn.selector))throw new Error(`Invalid selector: ${yn.selector}`);return yn.selector}function En(yn,Wn){if(yn.lengthWn.length?2:1}function In(yn,Wn){let Yn=Wn.target,ra=Wn.currentTarget;for(let ri=0;Yn!==null;Yn=Yn.parentElement,++ri){if(Yn.hasAttribute("data-lm-suppress-shortcuts"))return-1;if(Ch.matches(Yn,yn))return ri;if(Yn===ra)return-1}return-1}function Ee(yn){let Wn=document.createEvent("Event"),Yn=yn.bubbles||!0,ra=yn.cancelable||!0;return Wn.initEvent(yn.type||"keydown",Yn,ra),Wn.key=yn.key||"",Wn.keyCode=yn.keyCode||0,Wn.which=yn.keyCode||0,Wn.ctrlKey=yn.ctrlKey||!1,Wn.altKey=yn.altKey||!1,Wn.shiftKey=yn.shiftKey||!1,Wn.metaKey=yn.metaKey||!1,Wn.view=yn.view||window,Wn}})(Lh||(Lh={}));var Cp=sd(yv()),Lp=class{constructor(be){this.type="text",this.content=be}},P0=class{constructor(be,st,ft,Lt){this.type="element",this.tag=be,this.attrs=st,this.children=ft,this.renderer=Lt}};function Sl(xt){let be={},st,ft=[];for(let Xt=1,Hr=arguments.length;Xt=In.length){st(Qr[Wn],Yr);continue}let Yn=In[Wn],ra=Qr[Wn];if(Yn===ra){Ee=Ee.nextSibling;continue}if(Yn.type==="text"&&ra.type==="text"){Ee.textContent!==ra.content&&(Ee.textContent=ra.content),Ee=Ee.nextSibling;continue}if(Yn.type==="text"||ra.type==="text"){Cp.ArrayExt.insert(In,Wn,ra),st(ra,Yr,Ee);continue}if(!Yn.renderer!=!ra.renderer){Cp.ArrayExt.insert(In,Wn,ra),st(ra,Yr,Ee);continue}let ri=ra.attrs.key;if(ri&&ri in En){let qi=En[ri];qi.vNode!==Yn&&(Cp.ArrayExt.move(In,In.indexOf(qi.vNode,Wn+1),Wn),Yr.insertBefore(qi.element,Ee),Yn=qi.vNode,Ee=qi.element)}if(Yn===ra){Ee=Ee.nextSibling;continue}let ni=Yn.attrs.key;if(ni&&ni!==ri){Cp.ArrayExt.insert(In,Wn,ra),st(ra,Yr,Ee);continue}if(Yn.tag!==ra.tag){Cp.ArrayExt.insert(In,Wn,ra),st(ra,Yr,Ee);continue}Cr(Ee,Yn.attrs,ra.attrs),ra.renderer?ra.renderer.render(Ee,{attrs:ra.attrs,children:ra.children}):ft(Ee,Yn.children,ra.children),Ee=Ee.nextSibling}Lt(Yr,In,yn,!0)}xt.updateContent=ft;function Lt(Yr,Nr,Qr,En){for(let In=Nr.length-1;In>=Qr;--In){let Ee=Nr[In],yn=En?Yr.lastChild:Yr.childNodes[In];Ee.type==="text"||(Ee.renderer&&Ee.renderer.unrender?Ee.renderer.unrender(yn,{attrs:Ee.attrs,children:Ee.children}):Lt(yn,Ee.children,0,!1)),En&&Yr.removeChild(yn)}}let Xt={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};function Hr(Yr,Nr){for(let Qr in Nr)Qr in Xt||(Qr.substr(0,2)==="on"?Yr[Qr]=Nr[Qr]:Yr.setAttribute(Qr,Nr[Qr]));Nr.className!==void 0&&Yr.setAttribute("class",Nr.className),Nr.htmlFor!==void 0&&Yr.setAttribute("for",Nr.htmlFor),Nr.dataset&&jr(Yr,Nr.dataset),Nr.style&&zr(Yr,Nr.style)}function Cr(Yr,Nr,Qr){if(Nr===Qr)return;let En;for(En in Nr)En in Xt||En in Qr||(En.substr(0,2)==="on"?Yr[En]=null:Yr.removeAttribute(En));for(En in Qr)En in Xt||Nr[En]===Qr[En]||(En.substr(0,2)==="on"?Yr[En]=Qr[En]:Yr.setAttribute(En,Qr[En]));Nr.className!==Qr.className&&(Qr.className!==void 0?Yr.setAttribute("class",Qr.className):Yr.removeAttribute("class")),Nr.htmlFor!==Qr.htmlFor&&(Qr.htmlFor!==void 0?Yr.setAttribute("for",Qr.htmlFor):Yr.removeAttribute("for")),Nr.dataset!==Qr.dataset&&Jr(Yr,Nr.dataset||{},Qr.dataset||{}),Nr.style!==Qr.style&&Gr(Yr,Nr.style||{},Qr.style||{})}function jr(Yr,Nr){for(let Qr in Nr)Yr.setAttribute(`data-${Qr}`,Nr[Qr])}function Jr(Yr,Nr,Qr){for(let En in Nr)En in Qr||Yr.removeAttribute(`data-${En}`);for(let En in Qr)Nr[En]!==Qr[En]&&Yr.setAttribute(`data-${En}`,Qr[En])}function zr(Yr,Nr){let Qr=Yr.style,En;for(En in Nr)Qr[En]=Nr[En]}function Gr(Yr,Nr,Qr){let En=Yr.style,In;for(In in Nr)In in Qr||(En[In]="");for(In in Qr)Nr[In]!==Qr[In]&&(En[In]=Qr[In])}function tn(Yr,Nr){let Qr=Yr.firstChild,En=Object.create(null);for(let In of Nr)In.type==="element"&&In.attrs.key&&(En[In.attrs.key]={vNode:In,element:Qr}),Qr=Qr.nextSibling;return En}})(bv||(bv={}));var Vh=class{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}},sh;(function(xt){function be(Xt,Hr){let Cr=Xt.length;if(Cr===0)return Hr;let jr=0,Jr=0,zr=0,Gr=0,tn=0;for(let Qr=0;Qr0&&(Gr+=En.stretch,tn++)}if(Hr===zr)return 0;if(Hr<=jr){for(let Qr=0;Qr=Jr){for(let Qr=0;Qr0&&Qr>Yr;){let En=Qr,In=Gr;for(let Ee=0;Ee0&&Qr>Yr;){let En=Qr/Nr;for(let In=0;In0&&Qr>Yr;){let En=Qr,In=Gr;for(let Ee=0;Ee=yn.maxSize?(Qr-=yn.maxSize-yn.size,Gr-=yn.stretch,yn.size=yn.maxSize,yn.done=!0,Nr--,tn--):(Qr-=Wn,yn.size+=Wn)}}for(;Nr>0&&Qr>Yr;){let En=Qr/Nr;for(let In=0;In=Ee.maxSize?(Qr-=Ee.maxSize-Ee.size,Ee.size=Ee.maxSize,Ee.done=!0,Nr--):(Qr-=En,Ee.size+=En))}}}return 0}xt.calc=be;function st(Xt,Hr,Cr){Xt.length===0||Cr===0||(Cr>0?ft(Xt,Hr,Cr):Lt(Xt,Hr,-Cr))}xt.adjust=st;function ft(Xt,Hr,Cr){let jr=0;for(let tn=0;tn<=Hr;++tn){let Yr=Xt[tn];jr+=Yr.maxSize-Yr.size}let Jr=0;for(let tn=Hr+1,Yr=Xt.length;tn=0&&zr>0;--tn){let Yr=Xt[tn],Nr=Yr.maxSize-Yr.size;Nr>=zr?(Yr.sizeHint=Yr.size+zr,zr=0):(Yr.sizeHint=Yr.size+Nr,zr-=Nr)}let Gr=Cr;for(let tn=Hr+1,Yr=Xt.length;tn0;++tn){let Nr=Xt[tn],Qr=Nr.size-Nr.minSize;Qr>=Gr?(Nr.sizeHint=Nr.size-Gr,Gr=0):(Nr.sizeHint=Nr.size-Qr,Gr-=Qr)}}function Lt(Xt,Hr,Cr){let jr=0;for(let tn=Hr+1,Yr=Xt.length;tn0;++tn){let Nr=Xt[tn],Qr=Nr.maxSize-Nr.size;Qr>=zr?(Nr.sizeHint=Nr.size+zr,zr=0):(Nr.sizeHint=Nr.size+Qr,zr-=Qr)}let Gr=Cr;for(let tn=Hr;tn>=0&&Gr>0;--tn){let Yr=Xt[tn],Nr=Yr.size-Yr.minSize;Nr>=Gr?(Yr.sizeHint=Yr.size-Gr,Gr=0):(Yr.sizeHint=Yr.size-Nr,Gr-=Nr)}}})(sh||(sh={}));var D0=class{constructor(be){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new Ml(this),this._isDisposed=!1,this.owner=be.owner,be.label!==void 0&&(this._label=be.label),be.mnemonic!==void 0&&(this._mnemonic=be.mnemonic),be.icon!==void 0&&(this._icon=be.icon),be.iconClass!==void 0&&(this._iconClass=be.iconClass),be.iconLabel!==void 0&&(this._iconLabel=be.iconLabel),be.caption!==void 0&&(this._caption=be.caption),be.className!==void 0&&(this._className=be.className),be.closable!==void 0&&(this._closable=be.closable),this._dataset=be.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(be){this._label!==be&&(this._label=be,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(be){this._mnemonic!==be&&(this._mnemonic=be,this._changed.emit(void 0))}get icon(){return this._icon}set icon(be){this._icon!==be&&(this._icon=be,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(be){this._iconClass!==be&&(this._iconClass=be,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(be){this._iconLabel!==be&&(this._iconLabel=be,this._changed.emit(void 0))}get caption(){return this._caption}set caption(be){this._caption!==be&&(this._caption=be,this._changed.emit(void 0))}get className(){return this._className}set className(be){this._className!==be&&(this._className=be,this._changed.emit(void 0))}get closable(){return this._closable}set closable(be){this._closable!==be&&(this._closable=be,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(be){this._dataset!==be&&(this._dataset=be,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,Ml.clearData(this))}},to=class xt{constructor(be={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new Ml(this),this._hiddenMode=xt.HiddenMode.Display,this.node=pg.createNode(be),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(xt.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&xt.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),Ml.clearData(this),$i.clearData(this),$f.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(xt.Flag.IsDisposed)}get isAttached(){return this.testFlag(xt.Flag.IsAttached)}get isHidden(){return this.testFlag(xt.Flag.IsHidden)}get isVisible(){return this.testFlag(xt.Flag.IsVisible)}get title(){return pg.titleProperty.get(this)}get id(){return this.node.id}set id(be){this.node.id=be}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(be){this._hiddenMode!==be&&(this.isHidden&&this._toggleHidden(!1),be==xt.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=be,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(be){if(this._parent!==be){if(be&&this.contains(be))throw new Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let st=new xt.ChildMessage("child-removed",this);$i.sendMessage(this._parent,st)}if(this._parent=be,this._parent&&!this._parent.isDisposed){let st=new xt.ChildMessage("child-added",this);$i.sendMessage(this._parent,st)}this.isDisposed||$i.sendMessage(this,xt.Msg.ParentChanged)}}get layout(){return this._layout}set layout(be){if(this._layout!==be){if(this.testFlag(xt.Flag.DisallowLayout))throw new Error("Cannot set widget layout.");if(this._layout)throw new Error("Cannot change widget layout.");if(be.parent)throw new Error("Cannot change layout parent.");this._layout=be,be.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(be){for(let st=be;st;st=st._parent)if(st===this)return!0;return!1}hasClass(be){return this.node.classList.contains(be)}addClass(be){this.node.classList.add(be)}removeClass(be){this.node.classList.remove(be)}toggleClass(be,st){return st===!0?(this.node.classList.add(be),!0):st===!1?(this.node.classList.remove(be),!1):this.node.classList.toggle(be)}update(){$i.postMessage(this,xt.Msg.UpdateRequest)}fit(){$i.postMessage(this,xt.Msg.FitRequest)}activate(){$i.postMessage(this,xt.Msg.ActivateRequest)}close(){$i.sendMessage(this,xt.Msg.CloseRequest)}show(){if(this.testFlag(xt.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.BeforeShow),this.clearFlag(xt.Flag.IsHidden),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.AfterShow),this.parent)){let be=new xt.ChildMessage("child-shown",this);$i.sendMessage(this.parent,be)}}hide(){if(!this.testFlag(xt.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.BeforeHide),this.setFlag(xt.Flag.IsHidden),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&$i.sendMessage(this,xt.Msg.AfterHide),this.parent)){let be=new xt.ChildMessage("child-hidden",this);$i.sendMessage(this.parent,be)}}setHidden(be){be?this.hide():this.show()}testFlag(be){return(this._flags&be)!==0}setFlag(be){this._flags|=be}clearFlag(be){this._flags&=~be}processMessage(be){switch(be.type){case"resize":this.notifyLayout(be),this.onResize(be);break;case"update-request":this.notifyLayout(be),this.onUpdateRequest(be);break;case"fit-request":this.notifyLayout(be),this.onFitRequest(be);break;case"before-show":this.notifyLayout(be),this.onBeforeShow(be);break;case"after-show":this.setFlag(xt.Flag.IsVisible),this.notifyLayout(be),this.onAfterShow(be);break;case"before-hide":this.notifyLayout(be),this.onBeforeHide(be);break;case"after-hide":this.clearFlag(xt.Flag.IsVisible),this.notifyLayout(be),this.onAfterHide(be);break;case"before-attach":this.notifyLayout(be),this.onBeforeAttach(be);break;case"after-attach":!this.isHidden&&(!this.parent||this.parent.isVisible)&&this.setFlag(xt.Flag.IsVisible),this.setFlag(xt.Flag.IsAttached),this.notifyLayout(be),this.onAfterAttach(be);break;case"before-detach":this.notifyLayout(be),this.onBeforeDetach(be);break;case"after-detach":this.clearFlag(xt.Flag.IsVisible),this.clearFlag(xt.Flag.IsAttached),this.notifyLayout(be),this.onAfterDetach(be);break;case"activate-request":this.notifyLayout(be),this.onActivateRequest(be);break;case"close-request":this.notifyLayout(be),this.onCloseRequest(be);break;case"child-added":this.notifyLayout(be),this.onChildAdded(be);break;case"child-removed":this.notifyLayout(be),this.onChildRemoved(be);break;default:this.notifyLayout(be);break}}notifyLayout(be){this._layout&&this._layout.processParentMessage(be)}onCloseRequest(be){this.parent?this.parent=null:this.isAttached&&xt.detach(this)}onResize(be){}onUpdateRequest(be){}onFitRequest(be){}onActivateRequest(be){}onBeforeShow(be){}onAfterShow(be){}onBeforeHide(be){}onAfterHide(be){}onBeforeAttach(be){}onAfterAttach(be){}onBeforeDetach(be){}onAfterDetach(be){}onChildAdded(be){}onChildRemoved(be){}_toggleHidden(be){if(be)switch(this._hiddenMode){case xt.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case xt.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case xt.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1";break}else switch(this._hiddenMode){case xt.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case xt.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case xt.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex="";break}}};(function(xt){(function(Xt){Xt[Xt.Display=0]="Display",Xt[Xt.Scale=1]="Scale",Xt[Xt.ContentVisibility=2]="ContentVisibility"})(xt.HiddenMode||(xt.HiddenMode={})),function(Xt){Xt[Xt.IsDisposed=1]="IsDisposed",Xt[Xt.IsAttached=2]="IsAttached",Xt[Xt.IsHidden=4]="IsHidden",Xt[Xt.IsVisible=8]="IsVisible",Xt[Xt.DisallowLayout=16]="DisallowLayout"}(xt.Flag||(xt.Flag={})),function(Xt){Xt.BeforeShow=new Xf("before-show"),Xt.AfterShow=new Xf("after-show"),Xt.BeforeHide=new Xf("before-hide"),Xt.AfterHide=new Xf("after-hide"),Xt.BeforeAttach=new Xf("before-attach"),Xt.AfterAttach=new Xf("after-attach"),Xt.BeforeDetach=new Xf("before-detach"),Xt.AfterDetach=new Xf("after-detach"),Xt.ParentChanged=new Xf("parent-changed"),Xt.UpdateRequest=new Ud("update-request"),Xt.FitRequest=new Ud("fit-request"),Xt.ActivateRequest=new Ud("activate-request"),Xt.CloseRequest=new Ud("close-request")}(xt.Msg||(xt.Msg={}));class be extends Xf{constructor(Hr,Cr){super(Hr),this.child=Cr}}xt.ChildMessage=be;class st extends Xf{constructor(Hr,Cr){super("resize"),this.width=Hr,this.height=Cr}}xt.ResizeMessage=st,function(Xt){Xt.UnknownSize=new Xt(-1,-1)}(st=xt.ResizeMessage||(xt.ResizeMessage={}));function ft(Xt,Hr,Cr=null){if(Xt.parent)throw new Error("Cannot attach a child widget.");if(Xt.isAttached||Xt.node.isConnected)throw new Error("Widget is already attached.");if(!Hr.isConnected)throw new Error("Host is not attached.");$i.sendMessage(Xt,xt.Msg.BeforeAttach),Hr.insertBefore(Xt.node,Cr),$i.sendMessage(Xt,xt.Msg.AfterAttach)}xt.attach=ft;function Lt(Xt){if(Xt.parent)throw new Error("Cannot detach a child widget.");if(!Xt.isAttached||!Xt.node.isConnected)throw new Error("Widget is not attached.");$i.sendMessage(Xt,xt.Msg.BeforeDetach),Xt.node.parentNode.removeChild(Xt.node),$i.sendMessage(Xt,xt.Msg.AfterDetach)}xt.detach=Lt})(to||(to={}));var pg;(function(xt){xt.titleProperty=new $f({name:"title",create:st=>new D0({owner:st})});function be(st){return st.node||document.createElement(st.tag||"div")}xt.createNode=be})(pg||(pg={}));var pd=class{constructor(be={}){this._disposed=!1,this._parent=null,this._fitPolicy=be.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,Ml.clearData(this),$f.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(be){if(this._parent!==be){if(this._parent)throw new Error("Cannot change parent widget.");if(be.layout!==this)throw new Error("Invalid parent widget.");this._parent=be,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(be){if(this._fitPolicy!==be&&(this._fitPolicy=be,this._parent)){let st=this._parent.node.style;st.minWidth="",st.minHeight="",st.maxWidth="",st.maxHeight="",this._parent.fit()}}processParentMessage(be){switch(be.type){case"resize":this.onResize(be);break;case"update-request":this.onUpdateRequest(be);break;case"fit-request":this.onFitRequest(be);break;case"before-show":this.onBeforeShow(be);break;case"after-show":this.onAfterShow(be);break;case"before-hide":this.onBeforeHide(be);break;case"after-hide":this.onAfterHide(be);break;case"before-attach":this.onBeforeAttach(be);break;case"after-attach":this.onAfterAttach(be);break;case"before-detach":this.onBeforeDetach(be);break;case"after-detach":this.onAfterDetach(be);break;case"child-removed":this.onChildRemoved(be);break;case"child-shown":this.onChildShown(be);break;case"child-hidden":this.onChildHidden(be);break}}init(){for(let be of this)be.parent=this.parent}onResize(be){for(let st of this)$i.sendMessage(st,to.ResizeMessage.UnknownSize)}onUpdateRequest(be){for(let st of this)$i.sendMessage(st,to.ResizeMessage.UnknownSize)}onBeforeAttach(be){for(let st of this)$i.sendMessage(st,be)}onAfterAttach(be){for(let st of this)$i.sendMessage(st,be)}onBeforeDetach(be){for(let st of this)$i.sendMessage(st,be)}onAfterDetach(be){for(let st of this)$i.sendMessage(st,be)}onBeforeShow(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onAfterShow(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onBeforeHide(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onAfterHide(be){for(let st of this)st.isHidden||$i.sendMessage(st,be)}onChildRemoved(be){this.removeWidget(be.child)}onFitRequest(be){}onChildShown(be){}onChildHidden(be){}};(function(xt){function be(Xt){return Pp.horizontalAlignmentProperty.get(Xt)}xt.getHorizontalAlignment=be;function st(Xt,Hr){Pp.horizontalAlignmentProperty.set(Xt,Hr)}xt.setHorizontalAlignment=st;function ft(Xt){return Pp.verticalAlignmentProperty.get(Xt)}xt.getVerticalAlignment=ft;function Lt(Xt,Hr){Pp.verticalAlignmentProperty.set(Xt,Hr)}xt.setVerticalAlignment=Lt})(pd||(pd={}));var Tv=class{constructor(be){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=be,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let be=this.widget.node.style;be.position="",be.top="",be.left="",be.width="",be.height="",be.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let be=Rl.sizeLimits(this.widget.node);this._minWidth=be.minWidth,this._minHeight=be.minHeight,this._maxWidth=be.maxWidth,this._maxHeight=be.maxHeight}update(be,st,ft,Lt){let Xt=Math.max(this._minWidth,Math.min(ft,this._maxWidth)),Hr=Math.max(this._minHeight,Math.min(Lt,this._maxHeight));if(Xt"center",changed:be}),xt.verticalAlignmentProperty=new $f({name:"verticalAlignment",create:()=>"top",changed:be});function be(st){st.parent&&st.parent.layout&&st.parent.update()}})(Pp||(Pp={}));var Dp=class extends pd{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(be){this.insertWidget(this._widgets.length,be)}insertWidget(be,st){st.parent=this.parent;let ft=this._widgets.indexOf(st),Lt=Math.max(0,Math.min(be,this._widgets.length));if(ft===-1){Fi.ArrayExt.insert(this._widgets,Lt,st),this.parent&&this.attachWidget(Lt,st);return}Lt===this._widgets.length&&Lt--,ft!==Lt&&(Fi.ArrayExt.move(this._widgets,ft,Lt),this.parent&&this.moveWidget(ft,Lt,st))}removeWidget(be){this.removeWidgetAt(this._widgets.indexOf(be))}removeWidgetAt(be){let st=Fi.ArrayExt.removeAt(this._widgets,be);st&&this.parent&&this.detachWidget(be,st)}init(){super.init();let be=0;for(let st of this)this.attachWidget(be++,st)}attachWidget(be,st){let ft=this.parent.node.children[be];this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.insertBefore(st.node,ft),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach)}moveWidget(be,st,ft){this.parent.isAttached&&$i.sendMessage(ft,to.Msg.BeforeDetach),this.parent.node.removeChild(ft.node),this.parent.isAttached&&$i.sendMessage(ft,to.Msg.AfterDetach);let Lt=this.parent.node.children[st];this.parent.isAttached&&$i.sendMessage(ft,to.Msg.BeforeAttach),this.parent.node.insertBefore(ft.node,Lt),this.parent.isAttached&&$i.sendMessage(ft,to.Msg.AfterAttach)}detachWidget(be,st){this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach)}},I0;(function(xt){function be(st){return Math.max(0,Math.floor(st))}xt.clampDimension=be})(I0||(I0={}));var R0=I0,md=class xt extends Dp{constructor(be){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=be.renderer,be.orientation!==void 0&&(this._orientation=be.orientation),be.alignment!==void 0&&(this._alignment=be.alignment),be.spacing!==void 0&&(this._spacing=I0.clampDimension(be.spacing))}dispose(){for(let be of this._items)be.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(be){this._orientation!==be&&(this._orientation=be,this.parent&&(this.parent.dataset.orientation=be,this.parent.fit()))}get alignment(){return this._alignment}set alignment(be){this._alignment!==be&&(this._alignment=be,this.parent&&(this.parent.dataset.alignment=be,this.parent.update()))}get spacing(){return this._spacing}set spacing(be){be=I0.clampDimension(be),this._spacing!==be&&(this._spacing=be,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map(be=>be.size)}relativeSizes(){return dd.normalize(this._sizers.map(be=>be.size))}setRelativeSizes(be,st=!0){let ft=this._sizers.length,Lt=be.slice(0,ft);for(;Lt.length0&&(Xt.sizeHint=Xt.size);sh.adjust(this._sizers,be,Lt),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(be,st){let ft=new Tv(st),Lt=dd.createHandle(this.renderer),Xt=dd.averageSize(this._sizers),Hr=dd.createSizer(Xt);Fi.ArrayExt.insert(this._items,be,ft),Fi.ArrayExt.insert(this._sizers,be,Hr),Fi.ArrayExt.insert(this._handles,be,Lt),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.appendChild(st.node),this.parent.node.appendChild(Lt),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach),this.parent.fit()}moveWidget(be,st,ft){Fi.ArrayExt.move(this._items,be,st),Fi.ArrayExt.move(this._sizers,be,st),Fi.ArrayExt.move(this._handles,be,st),this.parent.fit()}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._items,be),Lt=Fi.ArrayExt.removeAt(this._handles,be);Fi.ArrayExt.removeAt(this._sizers,be),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.node.removeChild(Lt),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach),ft.dispose(),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}updateItemPosition(be,st,ft,Lt,Xt,Hr,Cr){let jr=this._items[be];if(jr.isHidden)return;let Jr=this._handles[be].style;st?(ft+=this.widgetOffset,jr.update(ft,Lt,Cr,Xt),ft+=Cr,Jr.top=`${Lt}px`,Jr.left=`${ft}px`,Jr.width=`${this._spacing}px`,Jr.height=`${Xt}px`):(Lt+=this.widgetOffset,jr.update(ft,Lt,Hr,Cr),Lt+=Cr,Jr.top=`${Lt}px`,Jr.left=`${ft}px`,Jr.width=`${Hr}px`,Jr.height=`${this._spacing}px`)}_fit(){let be=0,st=-1;for(let jr=0,Jr=this._items.length;jr0&&(Gr.sizeHint=Gr.size),zr.isHidden){Gr.minSize=0,Gr.maxSize=0;continue}zr.fit(),Gr.stretch=xt.getStretch(zr.widget),ft?(Gr.minSize=zr.minWidth,Gr.maxSize=zr.maxWidth,Lt+=zr.minWidth,Xt=Math.max(Xt,zr.minHeight)):(Gr.minSize=zr.minHeight,Gr.maxSize=zr.maxHeight,Xt+=zr.minHeight,Lt=Math.max(Lt,zr.minWidth))}let Hr=this._box=Rl.boxSizing(this.parent.node);Lt+=Hr.horizontalSum,Xt+=Hr.verticalSum;let Cr=this.parent.node.style;Cr.minWidth=`${Lt}px`,Cr.minHeight=`${Xt}px`,this._dirty=!0,this.parent.parent&&$i.sendMessage(this.parent.parent,to.Msg.FitRequest),this._dirty&&$i.sendMessage(this.parent,to.Msg.UpdateRequest)}_update(be,st){this._dirty=!1;let ft=0;for(let Gr=0,tn=this._items.length;Gr0){let Gr;if(zr?Gr=Math.max(0,Hr-this._fixed):Gr=Math.max(0,Cr-this._fixed),this._hasNormedSizes){for(let Yr of this._sizers)Yr.sizeHint*=Gr;this._hasNormedSizes=!1}let tn=sh.calc(this._sizers,Gr);if(tn>0)switch(this._alignment){case"start":break;case"center":jr=0,Jr=tn/2;break;case"end":jr=0,Jr=tn;break;case"justify":jr=tn/ft,Jr=0;break;default:throw"unreachable"}}for(let Gr=0,tn=this._items.length;Gr0,coerce:(Hr,Cr)=>Math.max(0,Math.floor(Cr)),changed:Xt});function be(Hr){let Cr=new Vh;return Cr.sizeHint=Math.floor(Hr),Cr}xt.createSizer=be;function st(Hr){let Cr=Hr.createHandle();return Cr.style.position="absolute",Cr.style.contain="style",Cr}xt.createHandle=st;function ft(Hr){return Hr.reduce((Cr,jr)=>Cr+jr.size,0)/Hr.length||0}xt.averageSize=ft;function Lt(Hr){let Cr=Hr.length;if(Cr===0)return[];let jr=Hr.reduce((Jr,zr)=>Jr+Math.abs(zr),0);return jr===0?Hr.map(Jr=>1/Cr):Hr.map(Jr=>Jr/jr)}xt.normalize=Lt;function Xt(Hr){Hr.parent&&Hr.parent.layout instanceof md&&Hr.parent.fit()}})(dd||(dd={}));var ob=class extends md{constructor(be){super({...be,orientation:be.orientation||"vertical"}),this._titles=[],this.titleSpace=be.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(be){be=R0.clampDimension(be),this.widgetOffset!==be&&(this.widgetOffset=be,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(be,st){let ft=this._titles[be],Lt=ft.classList.contains("lm-mod-expanded"),Xt=mg.createTitle(this.renderer,st.title,Lt);this._titles[be]=Xt,this.parent.node.replaceChild(Xt,ft)}insertWidget(be,st){st.id||(st.id=`id-${vd.UUID.uuid4()}`),super.insertWidget(be,st)}attachWidget(be,st){let ft=mg.createTitle(this.renderer,st.title);Fi.ArrayExt.insert(this._titles,be,ft),this.parent.node.appendChild(ft),st.node.setAttribute("role","region"),st.node.setAttribute("aria-labelledby",ft.id),super.attachWidget(be,st)}moveWidget(be,st,ft){Fi.ArrayExt.move(this._titles,be,st),super.moveWidget(be,st,ft)}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._titles,be);this.parent.node.removeChild(ft),super.detachWidget(be,st)}updateItemPosition(be,st,ft,Lt,Xt,Hr,Cr){let jr=this._titles[be].style;jr.top=`${Lt}px`,jr.left=`${ft}px`,jr.height=`${this.widgetOffset}px`,st?jr.width=`${Xt}px`:jr.width=`${Hr}px`,super.updateItemPosition(be,st,ft,Lt,Xt,Hr,Cr)}},mg;(function(xt){function be(st,ft,Lt=!0){let Xt=st.createSectionTitle(ft);return Xt.style.position="absolute",Xt.style.contain="strict",Xt.setAttribute("aria-label",`${ft.label} Section`),Xt.setAttribute("aria-expanded",Lt?"true":"false"),Xt.setAttribute("aria-controls",ft.owner.id),Lt&&Xt.classList.add("lm-mod-expanded"),Xt}xt.createTitle=be})(mg||(mg={}));var gg=class extends to{constructor(be={}){super(),this.addClass("lm-Panel"),this.layout=sb.createLayout(be)}get widgets(){return this.layout.widgets}addWidget(be){this.layout.addWidget(be)}insertWidget(be,st){this.layout.insertWidget(be,st)}},sb;(function(xt){function be(st){return st.layout||new Dp}xt.createLayout=be})(sb||(sb={}));var Av=class extends gg{constructor(be={}){super({layout:lb.createLayout(be)}),this._handleMoved=new Ml(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(be){this.layout.orientation=be}get alignment(){return this.layout.alignment}set alignment(be){this.layout.alignment=be}get spacing(){return this.layout.spacing}set spacing(be){this.layout.spacing=be}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(be,st=!0){this.layout.setRelativeSizes(be,st)}handleEvent(be){switch(be.type){case"pointerdown":this._evtPointerDown(be);break;case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"keydown":this._evtKeyDown(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("pointerdown",this)}onAfterDetach(be){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(be){be.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(be){be.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(be){this._pressData&&(be.preventDefault(),be.stopPropagation()),be.keyCode===27&&this._releaseMouse()}_evtPointerDown(be){if(be.button!==0)return;let st=this.layout,ft=Fi.ArrayExt.findFirstIndex(st.handles,Jr=>Jr.contains(be.target));if(ft===-1)return;be.preventDefault(),be.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let Lt,Xt=st.handles[ft],Hr=Xt.getBoundingClientRect();st.orientation==="horizontal"?Lt=be.clientX-Hr.left:Lt=be.clientY-Hr.top;let Cr=window.getComputedStyle(Xt),jr=Zf.overrideCursor(Cr.cursor);this._pressData={index:ft,delta:Lt,override:jr}}_evtPointerMove(be){be.preventDefault(),be.stopPropagation();let st,ft=this.layout,Lt=this.node.getBoundingClientRect();ft.orientation==="horizontal"?st=be.clientX-Lt.left-this._pressData.delta:st=be.clientY-Lt.top-this._pressData.delta,ft.moveHandle(this._pressData.index,st)}_evtPointerUp(be){be.button===0&&(be.preventDefault(),be.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}};(function(xt){class be{createHandle(){let Xt=document.createElement("div");return Xt.className="lm-SplitPanel-handle",Xt}}xt.Renderer=be,xt.defaultRenderer=new be;function st(Lt){return md.getStretch(Lt)}xt.getStretch=st;function ft(Lt,Xt){md.setStretch(Lt,Xt)}xt.setStretch=ft})(Av||(Av={}));var lb;(function(xt){function be(st){return st.layout||new md({renderer:st.renderer||Av.defaultRenderer,orientation:st.orientation,alignment:st.alignment,spacing:st.spacing})}xt.createLayout=be})(lb||(lb={}));var F0=class extends Av{constructor(be={}){super({...be,layout:ub.createLayout(be)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new Ml(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(be){this.layout.titleSpace=be}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(be){super.addWidget(be),be.title.changed.connect(this._onTitleChanged,this)}collapse(be){let st=this.layout.widgets[be];st&&!st.isHidden&&this._toggleExpansion(be)}expand(be){let st=this.layout.widgets[be];st&&st.isHidden&&this._toggleExpansion(be)}insertWidget(be,st){super.insertWidget(be,st),st.title.changed.connect(this._onTitleChanged,this)}handleEvent(be){switch(super.handleEvent(be),be.type){case"click":this._evtClick(be);break;case"keydown":this._eventKeyDown(be);break}}onBeforeAttach(be){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(be)}onAfterDetach(be){super.onAfterDetach(be),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(be){let st=Fi.ArrayExt.findFirstIndex(this.widgets,ft=>ft.contains(be.owner));st>=0&&(this.layout.updateTitle(st,be.owner),this.update())}_computeWidgetSize(be){let st=this.layout,ft=st.widgets[be];if(!ft)return;let Lt=ft.isHidden,Xt=st.absoluteSizes(),Hr=(Lt?-1:1)*this.spacing,Cr=Xt.reduce((Jr,zr)=>Jr+zr),jr=[...Xt];if(Lt){let Jr=this._widgetSizesCache.get(ft);if(!Jr)return;jr[be]+=Jr;let zr=jr.map(Gr=>Gr-Jr>0).lastIndexOf(!0);zr===-1?jr.forEach((Gr,tn)=>{tn!==be&&(jr[tn]-=Xt[tn]/Cr*(Jr-Hr))}):jr[zr]-=Jr-Hr}else{let Jr=Xt[be];this._widgetSizesCache.set(ft,Jr),jr[be]=0;let zr=jr.map(Gr=>Gr>0).lastIndexOf(!0);if(zr===-1)return;jr[zr]=Xt[zr]+Jr+Hr}return jr.map(Jr=>Jr/(Cr+Hr))}_evtClick(be){let st=be.target;if(st){let ft=Fi.ArrayExt.findFirstIndex(this.titles,Lt=>Lt.contains(st));ft>=0&&(be.preventDefault(),be.stopPropagation(),this._toggleExpansion(ft))}}_eventKeyDown(be){if(be.defaultPrevented)return;let st=be.target,ft=!1;if(st){let Lt=Fi.ArrayExt.findFirstIndex(this.titles,Xt=>Xt.contains(st));if(Lt>=0){let Xt=be.keyCode.toString();if(be.key.match(/Space|Enter/)||Xt.match(/13|32/))st.click(),ft=!0;else if(this.orientation==="horizontal"?be.key.match(/ArrowLeft|ArrowRight/)||Xt.match(/37|39/):be.key.match(/ArrowUp|ArrowDown/)||Xt.match(/38|40/)){let Hr=be.key.match(/ArrowLeft|ArrowUp/)||Xt.match(/37|38/)?-1:1,Cr=this.titles.length,jr=(Lt+Cr+Hr)%Cr;this.titles[jr].focus(),ft=!0}else be.key==="End"||Xt==="35"?(this.titles[this.titles.length-1].focus(),ft=!0):(be.key==="Home"||Xt==="36")&&(this.titles[0].focus(),ft=!0)}ft&&be.preventDefault()}}_toggleExpansion(be){let st=this.titles[be],ft=this.layout.widgets[be],Lt=this._computeWidgetSize(be);Lt&&this.setRelativeSizes(Lt,!1),ft.isHidden?(st.classList.add("lm-mod-expanded"),st.setAttribute("aria-expanded","true"),ft.show()):(st.classList.remove("lm-mod-expanded"),st.setAttribute("aria-expanded","false"),ft.hide()),this._expansionToggled.emit(be)}};(function(xt){class be extends Av.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++be._nInstance}createCollapseIcon(ft){return document.createElement("span")}createSectionTitle(ft){let Lt=document.createElement("h3");Lt.setAttribute("tabindex","0"),Lt.id=this.createTitleKey(ft),Lt.className=this.titleClassName;for(let Cr in ft.dataset)Lt.dataset[Cr]=ft.dataset[Cr];let Xt=Lt.appendChild(this.createCollapseIcon(ft));Xt.className="lm-AccordionPanel-titleCollapser";let Hr=Lt.appendChild(document.createElement("span"));return Hr.className="lm-AccordionPanel-titleLabel",Hr.textContent=ft.label,Hr.title=ft.caption||ft.label,Lt}createTitleKey(ft){let Lt=this._titleKeys.get(ft);return Lt===void 0&&(Lt=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(ft,Lt)),Lt}}be._nInstance=0,xt.Renderer=be,xt.defaultRenderer=new be})(F0||(F0={}));var ub;(function(xt){function be(st){return st.layout||new ob({renderer:st.renderer||F0.defaultRenderer,orientation:st.orientation,alignment:st.alignment,spacing:st.spacing,titleSpace:st.titleSpace})}xt.createLayout=be})(ub||(ub={}));var qh=class xt extends Dp{constructor(be={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",be.direction!==void 0&&(this._direction=be.direction),be.alignment!==void 0&&(this._alignment=be.alignment),be.spacing!==void 0&&(this._spacing=R0.clampDimension(be.spacing))}dispose(){for(let be of this._items)be.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(be){this._direction!==be&&(this._direction=be,this.parent&&(this.parent.dataset.direction=be,this.parent.fit()))}get alignment(){return this._alignment}set alignment(be){this._alignment!==be&&(this._alignment=be,this.parent&&(this.parent.dataset.alignment=be,this.parent.update()))}get spacing(){return this._spacing}set spacing(be){be=R0.clampDimension(be),this._spacing!==be&&(this._spacing=be,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(be,st){Fi.ArrayExt.insert(this._items,be,new Tv(st)),Fi.ArrayExt.insert(this._sizers,be,new Vh),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.appendChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach),this.parent.fit()}moveWidget(be,st,ft){Fi.ArrayExt.move(this._items,be,st),Fi.ArrayExt.move(this._sizers,be,st),this.parent.update()}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._items,be);Fi.ArrayExt.removeAt(this._sizers,be),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach),ft.dispose(),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_fit(){let be=0;for(let Cr=0,jr=this._items.length;Cr0)switch(this._alignment){case"start":break;case"center":Jr=0,zr=jr/2;break;case"end":Jr=0,zr=jr;break;case"justify":Jr=jr/ft,zr=0;break;default:throw"unreachable"}for(let Gr=0,tn=this._items.length;Gr0,coerce:(Lt,Xt)=>Math.max(0,Math.floor(Xt)),changed:ft}),xt.sizeBasisProperty=new $f({name:"sizeBasis",create:()=>0,coerce:(Lt,Xt)=>Math.max(0,Math.floor(Xt)),changed:ft});function be(Lt){return Lt==="left-to-right"||Lt==="right-to-left"}xt.isHorizontal=be;function st(Lt){return Math.max(0,Math.floor(Lt))}xt.clampSpacing=st;function ft(Lt){Lt.parent&&Lt.parent.layout instanceof qh&&Lt.parent.fit()}})(xv||(xv={}));var yg=class extends gg{constructor(be={}){super({layout:cb.createLayout(be)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(be){this.layout.direction=be}get alignment(){return this.layout.alignment}set alignment(be){this.layout.alignment=be}get spacing(){return this.layout.spacing}set spacing(be){this.layout.spacing=be}onChildAdded(be){be.child.addClass("lm-BoxPanel-child")}onChildRemoved(be){be.child.removeClass("lm-BoxPanel-child")}};(function(xt){function be(Xt){return qh.getStretch(Xt)}xt.getStretch=be;function st(Xt,Hr){qh.setStretch(Xt,Hr)}xt.setStretch=st;function ft(Xt){return qh.getSizeBasis(Xt)}xt.getSizeBasis=ft;function Lt(Xt,Hr){qh.setSizeBasis(Xt,Hr)}xt.setSizeBasis=Lt})(yg||(yg={}));var cb;(function(xt){function be(st){return st.layout||new qh(st)}xt.createLayout=be})(cb||(cb={}));var _g=class xt extends to{constructor(be){super({node:hd.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(to.Flag.DisallowLayout),this.commands=be.commands,this.renderer=be.renderer||xt.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(be){let st=hd.createItem(this.commands,be);return this._items.push(st),this.refresh(),st}addItems(be){let st=be.map(ft=>hd.createItem(this.commands,ft));return st.forEach(ft=>this._items.push(ft)),this.refresh(),st}removeItem(be){this.removeItemAt(this._items.indexOf(be))}removeItemAt(be){Fi.ArrayExt.removeAt(this._items,be)&&this.refresh()}clearItems(){this._items.length!==0&&(this._items.length=0,this.refresh())}refresh(){if(this._results=null,this.inputNode.value!==""){let be=this.node.getElementsByClassName("lm-close-icon")[0];be.style.display="inherit"}else{let be=this.node.getElementsByClassName("lm-close-icon")[0];be.style.display="none"}this.update()}handleEvent(be){switch(be.type){case"click":this._evtClick(be);break;case"keydown":this._evtKeyDown(be);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused();break}}onBeforeAttach(be){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(be){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(be){this.update(),super.onAfterShow(be)}onActivateRequest(be){if(this.isAttached){let st=this.inputNode;st.focus(),st.select()}}onUpdateRequest(be){if(this.isHidden)return;let st=this.inputNode.value,ft=this.contentNode,Lt=this._results;if(Lt||(Lt=this._results=hd.search(this._items,st),this._activeIndex=st?Fi.ArrayExt.findFirstIndex(Lt,hd.canActivate):-1),!st&&Lt.length===0){fd.render(null,ft);return}if(st&&Lt.length===0){let jr=this.renderer.renderEmptyMessage({query:st});fd.render(jr,ft);return}let Xt=this.renderer,Hr=this._activeIndex,Cr=new Array(Lt.length);for(let jr=0,Jr=Lt.length;jr=Lt.length)ft.scrollTop=0;else{let jr=ft.children[Hr];Rl.scrollIntoViewIfNeeded(ft,jr)}}_evtClick(be){if(be.button!==0)return;if(be.target.classList.contains("lm-close-icon")){this.inputNode.value="",this.refresh();return}let st=Fi.ArrayExt.findFirstIndex(this.contentNode.children,ft=>ft.contains(be.target));st!==-1&&(be.preventDefault(),be.stopPropagation(),this._execute(st))}_evtKeyDown(be){if(!(be.altKey||be.ctrlKey||be.metaKey||be.shiftKey))switch(be.keyCode){case 13:be.preventDefault(),be.stopPropagation(),this._execute(this._activeIndex);break;case 38:be.preventDefault(),be.stopPropagation(),this._activatePreviousItem();break;case 40:be.preventDefault(),be.stopPropagation(),this._activateNextItem();break}}_activateNextItem(){if(!this._results||this._results.length===0)return;let be=this._activeIndex,st=this._results.length,ft=beni-qi),ra=Ee.slice(0,Yn),ri=Ee.slice(Yn);for(let ni=0,qi=ri.length;niQr.command===Yr&&vd.JSONExt.deepEqual(Qr.args,Nr))||null}}})(hd||(hd={}));var wv=class xt extends to{constructor(be){super({node:Kf.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new Ml(this),this._menuRequested=new Ml(this),this.addClass("lm-Menu"),this.setFlag(to.Flag.DisallowLayout),this.commands=be.commands,this.renderer=be.renderer||xt.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let be=this;for(;be._parentMenu;)be=be._parentMenu;return be}get leafMenu(){let be=this;for(;be._childMenu;)be=be._childMenu;return be}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(be){this.activeIndex=be?this._items.indexOf(be):-1}get activeIndex(){return this._activeIndex}set activeIndex(be){(be<0||be>=this._items.length)&&(be=-1),be!==-1&&!Kf.canActivate(this._items[be])&&(be=-1),this._activeIndex!==be&&(this._activeIndex=be,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let be=this._items.length,st=this._activeIndex,ft=st{this.activeIndex=Cr}})}fd.render(Hr,this.contentNode)}onCloseRequest(be){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let st=this._childMenu;st&&(this._childIndex=-1,this._childMenu=null,st._parentMenu=null,st.close());let ft=this._parentMenu;ft&&(this._parentMenu=null,ft._childIndex=-1,ft._childMenu=null,ft.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(be)}_evtKeyDown(be){be.preventDefault(),be.stopPropagation();let st=be.keyCode;if(st===13){this.triggerActiveItem();return}if(st===27){this.close();return}if(st===37){this._parentMenu?this.close():this._menuRequested.emit("previous");return}if(st===38){this.activatePreviousItem();return}if(st===39){let Hr=this.activeItem;Hr&&Hr.type==="submenu"?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next");return}if(st===40){this.activateNextItem();return}let ft=kp().keyForKeydownEvent(be);if(!ft)return;let Lt=this._activeIndex+1,Xt=Kf.findMnemonic(this._items,ft,Lt);Xt.index!==-1&&!Xt.multiple?(this.activeIndex=Xt.index,this.triggerActiveItem()):Xt.index!==-1?this.activeIndex=Xt.index:Xt.auto!==-1&&(this.activeIndex=Xt.auto)}_evtMouseUp(be){be.button===0&&(be.preventDefault(),be.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(be){let st=Fi.ArrayExt.findFirstIndex(this.contentNode.children,Lt=>Rl.hitTest(Lt,be.clientX,be.clientY));if(st===this._activeIndex)return;if(this.activeIndex=st,st=this.activeIndex,st===this._childIndex){this._cancelOpenTimer(),this._cancelCloseTimer();return}this._childIndex!==-1&&this._startCloseTimer(),this._cancelOpenTimer();let ft=this.activeItem;!ft||ft.type!=="submenu"||!ft.submenu||this._startOpenTimer()}_evtMouseEnter(be){for(let st=this._parentMenu;st;st=st._parentMenu)st._cancelOpenTimer(),st._cancelCloseTimer(),st.activeIndex=st._childIndex}_evtMouseLeave(be){if(this._cancelOpenTimer(),!this._childMenu){this.activeIndex=-1;return}let{clientX:st,clientY:ft}=be;if(Rl.hitTest(this._childMenu.node,st,ft)){this._cancelCloseTimer();return}this.activeIndex=-1,this._startCloseTimer()}_evtMouseDown(be){this._parentMenu||(Kf.hitTestMenus(this,be.clientX,be.clientY)?(be.preventDefault(),be.stopPropagation()):this.close())}_openChildMenu(be=!1){let st=this.activeItem;if(!st||st.type!=="submenu"||!st.submenu){this._closeChildMenu();return}let ft=st.submenu;if(ft===this._childMenu)return;xt.saveWindowData(),this._closeChildMenu(),this._childMenu=ft,this._childIndex=this._activeIndex,ft._parentMenu=this,$i.sendMessage(this,to.Msg.UpdateRequest);let Lt=this.contentNode.children[this._activeIndex];Kf.openSubmenu(ft,Lt),be&&(ft.activeIndex=-1,ft.activateNextItem()),ft.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){this._openTimerID===0&&(this._openTimerID=window.setTimeout(()=>{this._openTimerID=0,this._openChildMenu()},Kf.TIMER_DELAY))}_startCloseTimer(){this._closeTimerID===0&&(this._closeTimerID=window.setTimeout(()=>{this._closeTimerID=0,this._closeChildMenu()},Kf.TIMER_DELAY))}_cancelOpenTimer(){this._openTimerID!==0&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){this._closeTimerID!==0&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){Kf.saveWindowData()}};(function(xt){class be{renderItem(ft){let Lt=this.createItemClass(ft),Xt=this.createItemDataset(ft),Hr=this.createItemARIA(ft);return Sl.li({className:Lt,dataset:Xt,tabindex:"0",onfocus:ft.onfocus,...Hr},this.renderIcon(ft),this.renderLabel(ft),this.renderShortcut(ft),this.renderSubmenu(ft))}renderIcon(ft){let Lt=this.createIconClass(ft);return Sl.div({className:Lt},ft.item.icon,ft.item.iconLabel)}renderLabel(ft){let Lt=this.formatLabel(ft);return Sl.div({className:"lm-Menu-itemLabel"},Lt)}renderShortcut(ft){let Lt=this.formatShortcut(ft);return Sl.div({className:"lm-Menu-itemShortcut"},Lt)}renderSubmenu(ft){return Sl.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(ft){let Lt="lm-Menu-item";ft.item.isEnabled||(Lt+=" lm-mod-disabled"),ft.item.isToggled&&(Lt+=" lm-mod-toggled"),ft.item.isVisible||(Lt+=" lm-mod-hidden"),ft.active&&(Lt+=" lm-mod-active"),ft.collapsed&&(Lt+=" lm-mod-collapsed");let Xt=ft.item.className;return Xt&&(Lt+=` ${Xt}`),Lt}createItemDataset(ft){let Lt,{type:Xt,command:Hr,dataset:Cr}=ft.item;return Xt==="command"?Lt={...Cr,type:Xt,command:Hr}:Lt={...Cr,type:Xt},Lt}createIconClass(ft){let Lt="lm-Menu-itemIcon",Xt=ft.item.iconClass;return Xt?`${Lt} ${Xt}`:Lt}createItemARIA(ft){let Lt={};switch(ft.item.type){case"separator":Lt.role="presentation";break;case"submenu":Lt["aria-haspopup"]="true",ft.item.isEnabled||(Lt["aria-disabled"]="true");break;default:ft.item.isEnabled||(Lt["aria-disabled"]="true"),Lt.role="menuitem"}return Lt}formatLabel(ft){let{label:Lt,mnemonic:Xt}=ft.item;if(Xt<0||Xt>=Lt.length)return Lt;let Hr=Lt.slice(0,Xt),Cr=Lt.slice(Xt+1),jr=Lt[Xt],Jr=Sl.span({className:"lm-Menu-itemMnemonic"},jr);return[Hr,Jr,Cr]}formatShortcut(ft){let Lt=ft.item.keyBinding;return Lt?cd.formatKeystroke(Lt.keys):null}}xt.Renderer=be,xt.defaultRenderer=new be})(wv||(wv={}));var Kf;(function(xt){xt.TIMER_DELAY=300,xt.SUBMENU_OVERLAP=3;let be=null,st=0;function ft(){return st>0?(st--,be):zr()}function Lt(){be=zr(),st++}xt.saveWindowData=Lt;function Xt(){let Qr=document.createElement("div"),En=document.createElement("ul");return En.className="lm-Menu-content",Qr.appendChild(En),En.setAttribute("role","menu"),Qr.tabIndex=0,Qr}xt.createNode=Xt;function Hr(Qr){return Qr.type!=="separator"&&Qr.isEnabled&&Qr.isVisible}xt.canActivate=Hr;function Cr(Qr,En){return new Nr(Qr.commands,En)}xt.createItem=Cr;function jr(Qr,En,In){for(let Ee=Qr;Ee;Ee=Ee.childMenu)if(Rl.hitTest(Ee.node,En,In))return!0;return!1}xt.hitTestMenus=jr;function Jr(Qr){let En=new Array(Qr.length);Fi.ArrayExt.fill(En,!1);let In=0,Ee=Qr.length;for(;In=0;--yn){let Yn=Qr[yn];if(Yn.isVisible){if(Yn.type!=="separator")break;En[yn]=!0}}let Wn=!1;for(;++Inri+qi&&(En=ri+qi-ls),!yn&&In+Ys>ni+Ta&&(In>ni+Ta?In=ni+Ta-Ys:In=In-Ys),ji.transform=`translate(${Math.max(0,En)}px, ${Math.max(0,In)}px`,ji.opacity="1"}xt.openRootMenu=Gr;function tn(Qr,En){let In=ft(),Ee=In.pageXOffset,yn=In.pageYOffset,Wn=In.clientWidth,Yn=In.clientHeight;$i.sendMessage(Qr,to.Msg.UpdateRequest);let ra=Yn,ri=Qr.node,ni=ri.style;ni.opacity="0",ni.maxHeight=`${ra}px`,to.attach(Qr,document.body);let{width:qi,height:Ta}=ri.getBoundingClientRect(),Hn=Rl.boxSizing(Qr.node),ki=En.getBoundingClientRect(),ji=ki.right-xt.SUBMENU_OVERLAP;ji+qi>Ee+Wn&&(ji=ki.left+xt.SUBMENU_OVERLAP-qi);let ls=ki.top-Hn.borderTop-Hn.paddingTop;ls+Ta>yn+Yn&&(ls=ki.bottom+Hn.borderBottom+Hn.paddingBottom-Ta),ni.transform=`translate(${Math.max(0,ji)}px, ${Math.max(0,ls)}px`,ni.opacity="1"}xt.openSubmenu=tn;function Yr(Qr,En,In){let Ee=-1,yn=-1,Wn=!1,Yn=En.toUpperCase();for(let ra=0,ri=Qr.length;ra=0&&HnEe.command===En&&vd.JSONExt.deepEqual(Ee.args,In))||null}return null}}})(Kf||(Kf={}));var iA;(function(xt){function be(Hr,Cr){let jr=ft(Hr.selector),Jr=Hr.rank!==void 0?Hr.rank:1/0;return{...Hr,selector:jr,rank:Jr,id:Cr}}xt.createItem=be;function st(Hr,Cr,jr,Jr){let zr=Cr.target;if(!zr)return null;let Gr=Cr.currentTarget;if(!Gr||!Gr.contains(zr)&&(zr=document.elementFromPoint(Cr.clientX,Cr.clientY),!zr||!Gr.contains(zr)))return null;let tn=[],Yr=Hr.slice();for(;zr!==null;){let Nr=[];for(let Qr=0,En=Yr.length;Qr=this._titles.length)&&(be=-1),this._currentIndex===be)return;let st=this._currentIndex,ft=this._titles[st]||null,Lt=be,Xt=this._titles[Lt]||null;this._currentIndex=Lt,this._previousTitle=ft,this.update(),this._currentChanged.emit({previousIndex:st,previousTitle:ft,currentIndex:Lt,currentTitle:Xt})}get name(){return this._name}set name(be){this._name=be,be?this.contentNode.setAttribute("aria-label",be):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(be){this._orientation!==be&&(this._releaseMouse(),this._orientation=be,this.dataset.orientation=be,this.contentNode.setAttribute("aria-orientation",be))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(be){this._addButtonEnabled!==be&&(this._addButtonEnabled=be,be?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(be){return this.insertTab(this._titles.length,be)}insertTab(be,st){this._releaseMouse();let ft=ph.asTitle(st),Lt=this._titles.indexOf(ft),Xt=Math.max(0,Math.min(be,this._titles.length));return Lt===-1?(Fi.ArrayExt.insert(this._titles,Xt,ft),ft.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(Xt,ft),ft):(Xt===this._titles.length&&Xt--,Lt===Xt||(Fi.ArrayExt.move(this._titles,Lt,Xt),this.update(),this._adjustCurrentForMove(Lt,Xt)),ft)}removeTab(be){this.removeTabAt(this._titles.indexOf(be))}removeTabAt(be){this._releaseMouse();let st=Fi.ArrayExt.removeAt(this._titles,be);st&&(st.changed.disconnect(this._onTitleChanged,this),st===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(be,st))}clearTabs(){if(this._titles.length===0)return;this._releaseMouse();for(let ft of this._titles)ft.changed.disconnect(this._onTitleChanged,this);let be=this.currentIndex,st=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),be!==-1&&this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(be){switch(be.type){case"pointerdown":this._evtPointerDown(be);break;case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"dblclick":this._evtDblClick(be);break;case"keydown":be.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(be):this._evtKeyDown(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(be){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(be){var st;let ft=this._titles,Lt=this.renderer,Xt=this.currentTitle,Hr=new Array(ft.length),Cr=(st=this._getCurrentTabindex())!==null&&st!==void 0?st:this._currentIndex>-1?this._currentIndex:0;for(let jr=0,Jr=ft.length;jrRl.hitTest(Hr,be.clientX,be.clientY));if(ft===-1)return;let Lt=this.titles[ft],Xt=st[ft].querySelector(".lm-TabBar-tabLabel");if(Xt&&Xt.contains(be.target)){let Hr=Lt.label||"",Cr=Xt.innerHTML;Xt.innerHTML="";let jr=document.createElement("input");jr.classList.add("lm-TabBar-tabInput"),jr.value=Hr,Xt.appendChild(jr);let Jr=()=>{jr.removeEventListener("blur",Jr),Xt.innerHTML=Cr,this.node.addEventListener("keydown",this)};jr.addEventListener("dblclick",zr=>zr.stopPropagation()),jr.addEventListener("blur",Jr),jr.addEventListener("keydown",zr=>{zr.key==="Enter"?(jr.value!==""&&(Lt.label=Lt.caption=jr.value),Jr()):zr.key==="Escape"&&Jr()}),this.node.removeEventListener("keydown",this),jr.select(),jr.focus(),Xt.children.length>0&&Xt.children[0].focus()}}_evtKeyDownCapturing(be){be.eventPhase===Event.CAPTURING_PHASE&&(be.preventDefault(),be.stopPropagation(),be.key==="Escape"&&this._releaseMouse())}_evtKeyDown(be){var st,ft,Lt;if(!(be.key==="Tab"||be.eventPhase===Event.CAPTURING_PHASE)){if(be.key==="Enter"||be.key==="Spacebar"||be.key===" "){let Xt=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(Xt))be.preventDefault(),be.stopPropagation(),this._addRequested.emit();else{let Hr=Fi.ArrayExt.findFirstIndex(this.contentNode.children,Cr=>Cr.contains(Xt));Hr>=0&&(be.preventDefault(),be.stopPropagation(),this.currentIndex=Hr)}}else if(JF.includes(be.key)){let Xt=[...this.contentNode.children];if(this.addButtonEnabled&&Xt.push(this.addButtonNode),Xt.length<=1)return;be.preventDefault(),be.stopPropagation();let Hr=Xt.indexOf(document.activeElement);Hr===-1&&(Hr=this._currentIndex);let Cr;be.key==="ArrowRight"&&this._orientation==="horizontal"||be.key==="ArrowDown"&&this._orientation==="vertical"?Cr=(st=Xt[Hr+1])!==null&&st!==void 0?st:Xt[0]:be.key==="ArrowLeft"&&this._orientation==="horizontal"||be.key==="ArrowUp"&&this._orientation==="vertical"?Cr=(ft=Xt[Hr-1])!==null&&ft!==void 0?ft:Xt[Xt.length-1]:be.key==="Home"?Cr=Xt[0]:be.key==="End"&&(Cr=Xt[Xt.length-1]),Cr&&((Lt=Xt[Hr])===null||Lt===void 0||Lt.setAttribute("tabindex","-1"),Cr?.setAttribute("tabindex","0"),Cr.focus())}}}_evtPointerDown(be){if(be.button!==0&&be.button!==1||this._dragData||be.target.classList.contains("lm-TabBar-tabInput"))return;let st=this.addButtonEnabled&&this.addButtonNode.contains(be.target),ft=this.contentNode.children,Lt=Fi.ArrayExt.findFirstIndex(ft,Hr=>Rl.hitTest(Hr,be.clientX,be.clientY));if(Lt===-1&&!st||(be.preventDefault(),be.stopPropagation(),this._dragData={tab:ft[Lt],index:Lt,pressX:be.clientX,pressY:be.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),be.button===1||st))return;let Xt=ft[Lt].querySelector(this.renderer.closeIconSelector);Xt&&Xt.contains(be.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===Lt?this.currentIndex=-1:this.currentIndex=Lt,this.currentIndex!==-1&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(be){let st=this._dragData;if(!st)return;be.preventDefault(),be.stopPropagation();let ft=this.contentNode.children;if(!(!st.dragActive&&!ph.dragExceeded(st,be))){if(!st.dragActive){let Lt=st.tab.getBoundingClientRect();this._orientation==="horizontal"?(st.tabPos=st.tab.offsetLeft,st.tabSize=Lt.width,st.tabPressPos=st.pressX-Lt.left):(st.tabPos=st.tab.offsetTop,st.tabSize=Lt.height,st.tabPressPos=st.pressY-Lt.top),st.tabPressOffset={x:st.pressX-Lt.left,y:st.pressY-Lt.top},st.tabLayout=ph.snapTabLayout(ft,this._orientation),st.contentRect=this.contentNode.getBoundingClientRect(),st.override=Zf.overrideCursor("default"),st.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),st.dragActive=!0}if(!st.detachRequested&&ph.detachExceeded(st,be)){st.detachRequested=!0;let Lt=st.index,Xt=be.clientX,Hr=be.clientY,Cr=ft[Lt],jr=this._titles[Lt];if(this._tabDetachRequested.emit({index:Lt,title:jr,tab:Cr,clientX:Xt,clientY:Hr,offset:st.tabPressOffset}),st.dragAborted)return}ph.layoutTabs(ft,st,be,this._orientation)}}_evtPointerUp(be){if(be.button!==0&&be.button!==1)return;let st=this._dragData;if(!st)return;if(be.preventDefault(),be.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!st.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(be.target)){this._addRequested.emit(void 0);return}let Xt=this.contentNode.children,Hr=Fi.ArrayExt.findFirstIndex(Xt,Jr=>Rl.hitTest(Jr,be.clientX,be.clientY));if(Hr!==st.index)return;let Cr=this._titles[Hr];if(!Cr.closable)return;if(be.button===1){this._tabCloseRequested.emit({index:Hr,title:Cr});return}let jr=Xt[Hr].querySelector(this.renderer.closeIconSelector);if(jr&&jr.contains(be.target)){this._tabCloseRequested.emit({index:Hr,title:Cr});return}return}if(be.button!==0)return;ph.finalizeTabPosition(st,this._orientation),st.tab.classList.remove("lm-mod-dragging");let ft=ph.parseTransitionDuration(st.tab);setTimeout(()=>{if(st.dragAborted)return;this._dragData=null,ph.resetTabPositions(this.contentNode.children,this._orientation),st.override.dispose(),this.removeClass("lm-mod-dragging");let Lt=st.index,Xt=st.targetIndex;Xt===-1||Lt===Xt||(Fi.ArrayExt.move(this._titles,Lt,Xt),this._adjustCurrentForMove(Lt,Xt),this._tabMoved.emit({fromIndex:Lt,toIndex:Xt,title:this._titles[Xt]}),$i.sendMessage(this,to.Msg.UpdateRequest))},ft)}_releaseMouse(){let be=this._dragData;be&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),be.dragAborted=!0,be.dragActive&&(ph.resetTabPositions(this.contentNode.children,this._orientation),be.override.dispose(),be.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(be,st){let ft=this.currentTitle,Lt=this._currentIndex,Xt=this.insertBehavior;if(Xt==="select-tab"||Xt==="select-tab-if-needed"&&Lt===-1){this._currentIndex=be,this._previousTitle=ft,this._currentChanged.emit({previousIndex:Lt,previousTitle:ft,currentIndex:be,currentTitle:st});return}Lt>=be&&this._currentIndex++}_adjustCurrentForMove(be,st){this._currentIndex===be?this._currentIndex=st:this._currentIndex=st?this._currentIndex++:this._currentIndex>be&&this._currentIndex<=st&&this._currentIndex--}_adjustCurrentForRemove(be,st){let ft=this._currentIndex,Lt=this.removeBehavior;if(ft!==be){ft>be&&this._currentIndex--;return}if(this._titles.length===0){this._currentIndex=-1,this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:-1,currentTitle:null});return}if(Lt==="select-tab-after"){this._currentIndex=Math.min(be,this._titles.length-1),this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if(Lt==="select-tab-before"){this._currentIndex=Math.max(0,be-1),this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if(Lt==="select-previous-tab"){this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(be,this._titles.length-1),this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}this._currentIndex=-1,this._currentChanged.emit({previousIndex:be,previousTitle:st,currentIndex:-1,currentTitle:null})}_onTitleChanged(be){this.update()}};(function(xt){class be{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++be._nInstance}renderTab(ft){let Lt=ft.title.caption,Xt=this.createTabKey(ft),Hr=Xt,Cr=this.createTabStyle(ft),jr=this.createTabClass(ft),Jr=this.createTabDataset(ft),zr=this.createTabARIA(ft);return ft.title.closable?Sl.li({id:Hr,key:Xt,className:jr,title:Lt,style:Cr,dataset:Jr,...zr},this.renderIcon(ft),this.renderLabel(ft),this.renderCloseIcon(ft)):Sl.li({id:Hr,key:Xt,className:jr,title:Lt,style:Cr,dataset:Jr,...zr},this.renderIcon(ft),this.renderLabel(ft))}renderIcon(ft){let{title:Lt}=ft,Xt=this.createIconClass(ft);return Sl.div({className:Xt},Lt.icon,Lt.iconLabel)}renderLabel(ft){return Sl.div({className:"lm-TabBar-tabLabel"},ft.title.label)}renderCloseIcon(ft){return Sl.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(ft){let Lt=this._tabKeys.get(ft.title);return Lt===void 0&&(Lt=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(ft.title,Lt)),Lt}createTabStyle(ft){return{zIndex:`${ft.zIndex}`}}createTabClass(ft){let Lt="lm-TabBar-tab";return ft.title.className&&(Lt+=` ${ft.title.className}`),ft.title.closable&&(Lt+=" lm-mod-closable"),ft.current&&(Lt+=" lm-mod-current"),Lt}createTabDataset(ft){return ft.title.dataset}createTabARIA(ft){var Lt;return{role:"tab","aria-selected":ft.current.toString(),tabindex:`${(Lt=ft.tabIndex)!==null&&Lt!==void 0?Lt:"-1"}`}}createIconClass(ft){let Lt="lm-TabBar-tabIcon",Xt=ft.title.iconClass;return Xt?`${Lt} ${Xt}`:Lt}}be._nInstance=0,xt.Renderer=be,xt.defaultRenderer=new be,xt.addButtonSelector=".lm-TabBar-addButton"})(Ip||(Ip={}));var ph;(function(xt){xt.DRAG_THRESHOLD=5,xt.DETACH_THRESHOLD=20;function be(){let zr=document.createElement("div"),Gr=document.createElement("ul");Gr.setAttribute("role","tablist"),Gr.className="lm-TabBar-content",zr.appendChild(Gr);let tn=document.createElement("div");return tn.className="lm-TabBar-addButton lm-mod-hidden",tn.setAttribute("tabindex","-1"),tn.setAttribute("role","button"),zr.appendChild(tn),zr}xt.createNode=be;function st(zr){return zr instanceof D0?zr:new D0(zr)}xt.asTitle=st;function ft(zr){let Gr=window.getComputedStyle(zr);return 1e3*(parseFloat(Gr.transitionDuration)||0)}xt.parseTransitionDuration=ft;function Lt(zr,Gr){let tn=new Array(zr.length);for(let Yr=0,Nr=zr.length;Yr=xt.DRAG_THRESHOLD||Yr>=xt.DRAG_THRESHOLD}xt.dragExceeded=Xt;function Hr(zr,Gr){let tn=zr.contentRect;return Gr.clientX=tn.right+xt.DETACH_THRESHOLD||Gr.clientY=tn.bottom+xt.DETACH_THRESHOLD}xt.detachExceeded=Hr;function Cr(zr,Gr,tn,Yr){let Nr,Qr,En,In;Yr==="horizontal"?(Nr=Gr.pressX,Qr=tn.clientX-Gr.contentRect.left,En=tn.clientX,In=Gr.contentRect.width):(Nr=Gr.pressY,Qr=tn.clientY-Gr.contentRect.top,En=tn.clientY,In=Gr.contentRect.height);let Ee=Gr.index,yn=Qr-Gr.tabPressPos,Wn=yn+Gr.tabSize;for(let Yn=0,ra=zr.length;Yn>1);if(YnGr.index&&Wn>qi)ri=`${-Gr.tabSize-ni.margin}px`,Ee=Math.max(Ee,Yn);else if(Yn===Gr.index){let Ta=En-Nr,Hn=In-(Gr.tabPos+Gr.tabSize);ri=`${Math.max(-Gr.tabPos,Math.min(Ta,Hn))}px`}else ri="";Yr==="horizontal"?zr[Yn].style.left=ri:zr[Yn].style.top=ri}Gr.targetIndex=Ee}xt.layoutTabs=Cr;function jr(zr,Gr){let tn;Gr==="horizontal"?tn=zr.contentRect.width:tn=zr.contentRect.height;let Yr;if(zr.targetIndex===zr.index)Yr=0;else if(zr.targetIndex>zr.index){let En=zr.tabLayout[zr.targetIndex];Yr=En.pos+En.size-zr.tabSize-zr.tabPos}else Yr=zr.tabLayout[zr.targetIndex].pos-zr.tabPos;let Nr=tn-(zr.tabPos+zr.tabSize),Qr=Math.max(-zr.tabPos,Math.min(Yr,Nr));Gr==="horizontal"?zr.tab.style.left=`${Qr}px`:zr.tab.style.top=`${Qr}px`}xt.finalizeTabPosition=jr;function Jr(zr,Gr){for(let tn of zr)Gr==="horizontal"?tn.style.left="":tn.style.top=""}xt.resetTabPositions=Jr})(ph||(ph={}));var fb=class extends pd{constructor(be){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=be.renderer,be.spacing!==void 0&&(this._spacing=R0.clampDimension(be.spacing)),this._document=be.document||document,this._hiddenMode=be.hiddenMode!==void 0?be.hiddenMode:to.HiddenMode.Display}dispose(){let be=this[Symbol.iterator]();this._items.forEach(st=>{st.dispose()}),this._box=null,this._root=null,this._items.clear();for(let st of be)st.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(be){if(this._hiddenMode!==be){this._hiddenMode=be;for(let st of this.tabBars())if(st.titles.length>1)for(let ft of st.titles)ft.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(be){be=R0.clampDimension(be),this._spacing!==be&&(this._spacing=be,this.parent&&this.parent.fit())}get isEmpty(){return this._root===null}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,Fi.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,Fi.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,Fi.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,Fi.empty)()}handles(){return this._root?this._root.iterHandles():(0,Fi.empty)()}moveHandle(be,st,ft){let Lt=be.classList.contains("lm-mod-hidden");if(!this._root||Lt)return;let Xt=this._root.findSplitNode(be);if(!Xt)return;let Hr;Xt.node.orientation==="horizontal"?Hr=st-be.offsetLeft:Hr=ft-be.offsetTop,Hr!==0&&(Xt.node.holdSizes(),sh.adjust(Xt.node.sizers,Xt.index,Hr),this.parent&&this.parent.update())}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(be){let st=new Set,ft;be.main?ft=lc.normalizeAreaConfig(be.main,st):ft=null;let Lt=this.widgets(),Xt=this.tabBars(),Hr=this.handles();this._root=null;for(let Cr of Lt)st.has(Cr)||(Cr.parent=null);for(let Cr of Xt)Cr.dispose();for(let Cr of Hr)Cr.parentNode&&Cr.parentNode.removeChild(Cr);for(let Cr of st)Cr.parent=this.parent;ft?this._root=lc.realizeAreaConfig(ft,{createTabBar:Cr=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):this._root=null,this.parent&&(st.forEach(Cr=>{this.attachWidget(Cr)}),this.parent.fit())}addWidget(be,st={}){let ft=st.ref||null,Lt=st.mode||"tab-after",Xt=null;if(this._root&&ft&&(Xt=this._root.findTabNode(ft)),ft&&!Xt)throw new Error("Reference widget is not in the layout.");switch(be.parent=this.parent,Lt){case"tab-after":this._insertTab(be,ft,Xt,!0);break;case"tab-before":this._insertTab(be,ft,Xt,!1);break;case"split-top":this._insertSplit(be,ft,Xt,"vertical",!1);break;case"split-left":this._insertSplit(be,ft,Xt,"horizontal",!1);break;case"split-right":this._insertSplit(be,ft,Xt,"horizontal",!0);break;case"split-bottom":this._insertSplit(be,ft,Xt,"vertical",!0);break;case"merge-top":this._insertSplit(be,ft,Xt,"vertical",!1,!0);break;case"merge-left":this._insertSplit(be,ft,Xt,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(be,ft,Xt,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(be,ft,Xt,"vertical",!0,!0);break}this.parent&&(this.attachWidget(be),this.parent.fit())}removeWidget(be){this._removeWidget(be),this.parent&&(this.detachWidget(be),this.parent.fit())}hitTestTabAreas(be,st){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=Rl.boxSizing(this.parent.node));let ft=this.parent.node.getBoundingClientRect(),Lt=be-ft.left-this._box.borderLeft,Xt=st-ft.top-this._box.borderTop,Hr=this._root.hitTestTabNodes(Lt,Xt);if(!Hr)return null;let{tabBar:Cr,top:jr,left:Jr,width:zr,height:Gr}=Hr,tn=this._box.borderLeft+this._box.borderRight,Yr=this._box.borderTop+this._box.borderBottom,Nr=ft.width-tn-(Jr+zr),Qr=ft.height-Yr-(jr+Gr);return{tabBar:Cr,x:Lt,y:Xt,top:jr,left:Jr,right:Nr,bottom:Qr,width:zr,height:Gr}}init(){super.init();for(let be of this)this.attachWidget(be);for(let be of this.handles())this.parent.node.appendChild(be);this.parent.fit()}attachWidget(be){this.parent.node!==be.node.parentNode&&(this._items.set(be,new Tv(be)),this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeAttach),this.parent.node.appendChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterAttach))}detachWidget(be){if(this.parent.node!==be.node.parentNode)return;this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeDetach),this.parent.node.removeChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterDetach);let st=this._items.get(be);st&&(this._items.delete(be),st.dispose())}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_removeWidget(be){if(!this._root)return;let st=this._root.findTabNode(be);if(!st)return;if(lc.removeAria(be),st.tabBar.titles.length>1){if(st.tabBar.removeTab(be.title),this._hiddenMode===to.HiddenMode.Scale&&st.tabBar.titles.length==1){let tn=st.tabBar.titles[0].owner;tn.hiddenMode=to.HiddenMode.Display}return}if(st.tabBar.dispose(),this._root===st){this._root=null;return}this._root.holdAllSizes();let ft=st.parent;st.parent=null;let Lt=Fi.ArrayExt.removeFirstOf(ft.children,st),Xt=Fi.ArrayExt.removeAt(ft.handles,Lt);if(Fi.ArrayExt.removeAt(ft.sizers,Lt),Xt.parentNode&&Xt.parentNode.removeChild(Xt),ft.children.length>1){ft.syncHandles();return}let Hr=ft.parent;ft.parent=null;let Cr=ft.children[0],jr=ft.handles[0];if(ft.children.length=0,ft.handles.length=0,ft.sizers.length=0,jr.parentNode&&jr.parentNode.removeChild(jr),this._root===ft){Cr.parent=null,this._root=Cr;return}let Jr=Hr,zr=Jr.children.indexOf(ft);if(Cr instanceof lc.TabLayoutNode){Cr.parent=Jr,Jr.children[zr]=Cr;return}let Gr=Fi.ArrayExt.removeAt(Jr.handles,zr);Fi.ArrayExt.removeAt(Jr.children,zr),Fi.ArrayExt.removeAt(Jr.sizers,zr),Gr.parentNode&&Gr.parentNode.removeChild(Gr);for(let tn=0,Yr=Cr.children.length;tn=this._left+this._width||Nr=this._top+this._height?null:this}createConfig(){let Yr=this.tabBar.titles.map(Qr=>Qr.owner),Nr=this.tabBar.currentIndex;return{type:"tab-area",widgets:Yr,currentIndex:Nr}}holdAllSizes(){}fit(Yr,Nr){let Qr=0,En=0,In=1/0,Ee=1/0,yn=Nr.get(this.tabBar),Wn=this.tabBar.currentTitle,Yn=Wn?Nr.get(Wn.owner):void 0,[ra,ri]=this.sizers;return yn&&yn.fit(),Yn&&Yn.fit(),yn&&!yn.isHidden?(Qr=Math.max(Qr,yn.minWidth),En+=yn.minHeight,ra.minSize=yn.minHeight,ra.maxSize=yn.maxHeight):(ra.minSize=0,ra.maxSize=0),Yn&&!Yn.isHidden?(Qr=Math.max(Qr,Yn.minWidth),En+=Yn.minHeight,ri.minSize=Yn.minHeight,ri.maxSize=1/0):(ri.minSize=0,ri.maxSize=1/0),{minWidth:Qr,minHeight:En,maxWidth:In,maxHeight:Ee}}update(Yr,Nr,Qr,En,In,Ee){this._top=Nr,this._left=Yr,this._width=Qr,this._height=En;let yn=Ee.get(this.tabBar),Wn=this.tabBar.currentTitle,Yn=Wn?Ee.get(Wn.owner):void 0;if(sh.calc(this.sizers,En),yn&&!yn.isHidden){let ra=this.sizers[0].size;yn.update(Yr,Nr,Qr,ra),Nr+=ra}if(Yn&&!Yn.isHidden){let ra=this.sizers[1].size;Yn.update(Yr,Nr,Qr,ra)}}}xt.TabLayoutNode=Lt;class Xt{constructor(Yr){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=Yr}*iterAllWidgets(){for(let Yr of this.children)yield*Yr.iterAllWidgets()}*iterUserWidgets(){for(let Yr of this.children)yield*Yr.iterUserWidgets()}*iterSelectedWidgets(){for(let Yr of this.children)yield*Yr.iterSelectedWidgets()}*iterTabBars(){for(let Yr of this.children)yield*Yr.iterTabBars()}*iterHandles(){yield*this.handles;for(let Yr of this.children)yield*Yr.iterHandles()}findTabNode(Yr){for(let Nr=0,Qr=this.children.length;NrEn.createConfig());return{type:"split-area",orientation:Yr,children:Qr,sizes:Nr}}syncHandles(){this.handles.forEach((Yr,Nr)=>{Yr.setAttribute("data-orientation",this.orientation),Nr===this.handles.length-1?Yr.classList.add("lm-mod-hidden"):Yr.classList.remove("lm-mod-hidden")})}holdSizes(){for(let Yr of this.sizers)Yr.sizeHint=Yr.size}holdAllSizes(){for(let Yr of this.children)Yr.holdAllSizes();this.holdSizes()}normalizeSizes(){let Yr=this.sizers.length;if(Yr===0)return;this.holdSizes();let Nr=this.sizers.reduce((Qr,En)=>Qr+En.sizeHint,0);if(Nr===0)for(let Qr of this.sizers)Qr.size=Qr.sizeHint=1/Yr;else for(let Qr of this.sizers)Qr.size=Qr.sizeHint/=Nr;this.normalized=!0}createNormalizedSizes(){let Yr=this.sizers.length;if(Yr===0)return[];let Nr=this.sizers.map(En=>En.size),Qr=Nr.reduce((En,In)=>En+In,0);if(Qr===0)for(let En=Nr.length-1;En>-1;En--)Nr[En]=1/Yr;else for(let En=Nr.length-1;En>-1;En--)Nr[En]/=Qr;return Nr}fit(Yr,Nr){let Qr=this.orientation==="horizontal",En=Math.max(0,this.children.length-1)*Yr,In=Qr?En:0,Ee=Qr?0:En,yn=1/0,Wn=1/0;for(let Yn=0,ra=this.children.length;Yn=Nr.length)&&(Qr=0),{type:"tab-area",widgets:Nr,currentIndex:Qr}}function Jr(tn,Yr){let Nr=tn.orientation,Qr=[],En=[];for(let In=0,Ee=tn.children.length;In{let Ee=ft(En,Yr,Nr),yn=be(tn.sizes[In]),Wn=Yr.createHandle();Qr.children.push(Ee),Qr.handles.push(Wn),Qr.sizers.push(yn),Ee.parent=Qr}),Qr.syncHandles(),Qr.normalizeSizes(),Qr}})(lc||(lc={}));var bg=class xt extends to{constructor(be={}){super(),this._drag=null,this._tabsMovable=!0,this._tabsConstrained=!1,this._addButtonEnabled=!1,this._pressData=null,this._layoutModified=new Ml(this),this._addRequested=new Ml(this),this.addClass("lm-DockPanel"),this._document=be.document||document,this._mode=be.mode||"multiple-document",this._renderer=be.renderer||xt.defaultRenderer,this._edges=be.edges||Qu.DEFAULT_EDGES,be.tabsMovable!==void 0&&(this._tabsMovable=be.tabsMovable),be.tabsConstrained!==void 0&&(this._tabsConstrained=be.tabsConstrained),be.addButtonEnabled!==void 0&&(this._addButtonEnabled=be.addButtonEnabled),this.dataset.mode=this._mode;let st={createTabBar:()=>this._createTabBar(),createHandle:()=>this._createHandle()};this.layout=new fb({document:this._document,renderer:st,spacing:be.spacing,hiddenMode:be.hiddenMode}),this.overlay=be.overlay||new xt.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(be){this.layout.hiddenMode=be}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(be){this.layout.spacing=be}get mode(){return this._mode}set mode(be){if(this._mode===be)return;this._mode=be,this.dataset.mode=be;let st=this.layout;switch(be){case"multiple-document":for(let ft of st.tabBars())ft.show();break;case"single-document":st.restoreLayout(Qu.createSingleDocumentConfig(this));break;default:throw"unreachable"}$i.postMessage(this,Qu.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(be){this._tabsMovable=be;for(let st of this.tabBars())st.tabsMovable=be}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(be){this._tabsConstrained=be}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(be){this._addButtonEnabled=be;for(let st of this.tabBars())st.addButtonEnabled=be}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(be){let st=(0,Fi.find)(this.tabBars(),ft=>ft.titles.indexOf(be.title)!==-1);if(!st)throw new Error("Widget is not contained in the dock panel.");st.currentTitle=be.title}activateWidget(be){this.selectWidget(be),be.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(be){this._mode="multiple-document",this.layout.restoreLayout(be),(jf.IS_EDGE||jf.IS_IE)&&$i.flush(),$i.postMessage(this,Qu.LayoutModified)}addWidget(be,st={}){this._mode==="single-document"?this.layout.addWidget(be):this.layout.addWidget(be,st),$i.postMessage(this,Qu.LayoutModified)}processMessage(be){be.type==="layout-modified"?this._layoutModified.emit(void 0):super.processMessage(be)}handleEvent(be){switch(be.type){case"lm-dragenter":this._evtDragEnter(be);break;case"lm-dragleave":this._evtDragLeave(be);break;case"lm-dragover":this._evtDragOver(be);break;case"lm-drop":this._evtDrop(be);break;case"pointerdown":this._evtPointerDown(be);break;case"pointermove":this._evtPointerMove(be);break;case"pointerup":this._evtPointerUp(be);break;case"keydown":this._evtKeyDown(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(be){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(be){Qu.isGeneratedTabBarProperty.get(be.child)||be.child.addClass("lm-DockPanel-widget")}onChildRemoved(be){Qu.isGeneratedTabBarProperty.get(be.child)||(be.child.removeClass("lm-DockPanel-widget"),$i.postMessage(this,Qu.LayoutModified))}_evtDragEnter(be){be.mimeData.hasData("application/vnd.lumino.widget-factory")&&(be.preventDefault(),be.stopPropagation())}_evtDragLeave(be){be.preventDefault(),!(this._tabsConstrained&&be.source!==this)&&(be.stopPropagation(),this.overlay.hide(1))}_evtDragOver(be){be.preventDefault(),this._tabsConstrained&&be.source!==this||this._showOverlay(be.clientX,be.clientY)==="invalid"?be.dropAction="none":(be.stopPropagation(),be.dropAction=be.proposedAction)}_evtDrop(be){if(be.preventDefault(),this.overlay.hide(0),be.proposedAction==="none"){be.dropAction="none";return}let{clientX:st,clientY:ft}=be,{zone:Lt,target:Xt}=Qu.findDropTarget(this,st,ft,this._edges);if(this._tabsConstrained&&be.source!==this||Lt==="invalid"){be.dropAction="none";return}let Cr=be.mimeData.getData("application/vnd.lumino.widget-factory");if(typeof Cr!="function"){be.dropAction="none";return}let jr=Cr();if(!(jr instanceof to)){be.dropAction="none";return}if(jr.contains(this)){be.dropAction="none";return}let Jr=Xt?Qu.getDropRef(Xt.tabBar):null;switch(Lt){case"root-all":this.addWidget(jr);break;case"root-top":this.addWidget(jr,{mode:"split-top"});break;case"root-left":this.addWidget(jr,{mode:"split-left"});break;case"root-right":this.addWidget(jr,{mode:"split-right"});break;case"root-bottom":this.addWidget(jr,{mode:"split-bottom"});break;case"widget-all":this.addWidget(jr,{mode:"tab-after",ref:Jr});break;case"widget-top":this.addWidget(jr,{mode:"split-top",ref:Jr});break;case"widget-left":this.addWidget(jr,{mode:"split-left",ref:Jr});break;case"widget-right":this.addWidget(jr,{mode:"split-right",ref:Jr});break;case"widget-bottom":this.addWidget(jr,{mode:"split-bottom",ref:Jr});break;case"widget-tab":this.addWidget(jr,{mode:"tab-after",ref:Jr});break;default:throw"unreachable"}be.dropAction=be.proposedAction,be.stopPropagation(),this.activateWidget(jr)}_evtKeyDown(be){be.preventDefault(),be.stopPropagation(),be.keyCode===27&&(this._releaseMouse(),$i.postMessage(this,Qu.LayoutModified))}_evtPointerDown(be){if(be.button!==0)return;let st=this.layout,ft=be.target,Lt=(0,Fi.find)(st.handles(),zr=>zr.contains(ft));if(!Lt)return;be.preventDefault(),be.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let Xt=Lt.getBoundingClientRect(),Hr=be.clientX-Xt.left,Cr=be.clientY-Xt.top,jr=window.getComputedStyle(Lt),Jr=Zf.overrideCursor(jr.cursor,this._document);this._pressData={handle:Lt,deltaX:Hr,deltaY:Cr,override:Jr}}_evtPointerMove(be){if(!this._pressData)return;be.preventDefault(),be.stopPropagation();let st=this.node.getBoundingClientRect(),ft=be.clientX-st.left-this._pressData.deltaX,Lt=be.clientY-st.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,ft,Lt)}_evtPointerUp(be){be.button===0&&(be.preventDefault(),be.stopPropagation(),this._releaseMouse(),$i.postMessage(this,Qu.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(be,st){let{zone:ft,target:Lt}=Qu.findDropTarget(this,be,st,this._edges);if(ft==="invalid")return this.overlay.hide(100),ft;let Xt,Hr,Cr,jr,Jr=Rl.boxSizing(this.node),zr=this.node.getBoundingClientRect();switch(ft){case"root-all":Xt=Jr.paddingTop,Hr=Jr.paddingLeft,Cr=Jr.paddingRight,jr=Jr.paddingBottom;break;case"root-top":Xt=Jr.paddingTop,Hr=Jr.paddingLeft,Cr=Jr.paddingRight,jr=zr.height*Qu.GOLDEN_RATIO;break;case"root-left":Xt=Jr.paddingTop,Hr=Jr.paddingLeft,Cr=zr.width*Qu.GOLDEN_RATIO,jr=Jr.paddingBottom;break;case"root-right":Xt=Jr.paddingTop,Hr=zr.width*Qu.GOLDEN_RATIO,Cr=Jr.paddingRight,jr=Jr.paddingBottom;break;case"root-bottom":Xt=zr.height*Qu.GOLDEN_RATIO,Hr=Jr.paddingLeft,Cr=Jr.paddingRight,jr=Jr.paddingBottom;break;case"widget-all":Xt=Lt.top,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom;break;case"widget-top":Xt=Lt.top,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom+Lt.height/2;break;case"widget-left":Xt=Lt.top,Hr=Lt.left,Cr=Lt.right+Lt.width/2,jr=Lt.bottom;break;case"widget-right":Xt=Lt.top,Hr=Lt.left+Lt.width/2,Cr=Lt.right,jr=Lt.bottom;break;case"widget-bottom":Xt=Lt.top+Lt.height/2,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom;break;case"widget-tab":{let Gr=Lt.tabBar.node.getBoundingClientRect().height;Xt=Lt.top,Hr=Lt.left,Cr=Lt.right,jr=Lt.bottom+Lt.height-Gr;break}default:throw"unreachable"}return this.overlay.show({top:Xt,left:Hr,right:Cr,bottom:jr}),ft}_createTabBar(){let be=this._renderer.createTabBar(this._document);return Qu.isGeneratedTabBarProperty.set(be,!0),this._mode==="single-document"&&be.hide(),be.tabsMovable=this._tabsMovable,be.allowDeselect=!1,be.addButtonEnabled=this._addButtonEnabled,be.removeBehavior="select-previous-tab",be.insertBehavior="select-tab-if-needed",be.tabMoved.connect(this._onTabMoved,this),be.currentChanged.connect(this._onCurrentChanged,this),be.tabCloseRequested.connect(this._onTabCloseRequested,this),be.tabDetachRequested.connect(this._onTabDetachRequested,this),be.tabActivateRequested.connect(this._onTabActivateRequested,this),be.addRequested.connect(this._onTabAddRequested,this),be}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){$i.postMessage(this,Qu.LayoutModified)}_onCurrentChanged(be,st){let{previousTitle:ft,currentTitle:Lt}=st;ft&&ft.owner.hide(),Lt&&Lt.owner.show(),(jf.IS_EDGE||jf.IS_IE)&&$i.flush(),$i.postMessage(this,Qu.LayoutModified)}_onTabAddRequested(be){this._addRequested.emit(be)}_onTabActivateRequested(be,st){st.title.owner.activate()}_onTabCloseRequested(be,st){st.title.owner.close()}_onTabDetachRequested(be,st){if(this._drag)return;be.releaseMouse();let{title:ft,tab:Lt,clientX:Xt,clientY:Hr,offset:Cr}=st,jr=new vd.MimeData,Jr=()=>ft.owner;jr.setData("application/vnd.lumino.widget-factory",Jr);let zr=Lt.cloneNode(!0);Cr&&(zr.style.top=`-${Cr.y}px`,zr.style.left=`-${Cr.x}px`),this._drag=new Zf({document:this._document,mimeData:jr,dragImage:zr,proposedAction:"move",supportedActions:"move",source:this}),Lt.classList.add("lm-mod-hidden");let Gr=()=>{this._drag=null,Lt.classList.remove("lm-mod-hidden")};this._drag.start(Xt,Hr).then(Gr)}};(function(xt){class be{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(Lt){let Xt=this.node.style;Xt.top=`${Lt.top}px`,Xt.left=`${Lt.left}px`,Xt.right=`${Lt.right}px`,Xt.bottom=`${Lt.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(Lt){if(!this._hidden){if(Lt<=0){clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden");return}this._timer===-1&&(this._timer=window.setTimeout(()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")},Lt))}}}xt.Overlay=be;class st{createTabBar(Lt){let Xt=new Ip({document:Lt});return Xt.addClass("lm-DockPanel-tabBar"),Xt}createHandle(){let Lt=document.createElement("div");return Lt.className="lm-DockPanel-handle",Lt}}xt.Renderer=st,xt.defaultRenderer=new st})(bg||(bg={}));var Qu;(function(xt){xt.GOLDEN_RATIO=.618,xt.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},xt.LayoutModified=new Ud("layout-modified"),xt.isGeneratedTabBarProperty=new $f({name:"isGeneratedTabBar",create:()=>!1});function be(Lt){if(Lt.isEmpty)return{main:null};let Xt=Array.from(Lt.widgets()),Hr=Lt.selectedWidgets().next().value,Cr=Hr?Xt.indexOf(Hr):-1;return{main:{type:"tab-area",widgets:Xt,currentIndex:Cr}}}xt.createSingleDocumentConfig=be;function st(Lt,Xt,Hr,Cr){if(!Rl.hitTest(Lt.node,Xt,Hr))return{zone:"invalid",target:null};let jr=Lt.layout;if(jr.isEmpty)return{zone:"root-all",target:null};if(Lt.mode==="multiple-document"){let yn=Lt.node.getBoundingClientRect(),Wn=Xt-yn.left+1,Yn=Hr-yn.top+1,ra=yn.right-Xt,ri=yn.bottom-Hr;switch(Math.min(Yn,ra,ri,Wn)){case Yn:if(YnQr&&tn>Qr&&Gr>En&&Yr>En)return{zone:"widget-all",target:Jr};zr/=Qr,Gr/=En,tn/=Qr,Yr/=En;let In=Math.min(zr,Gr,tn,Yr),Ee;switch(In){case zr:Ee="widget-left";break;case Gr:Ee="widget-top";break;case tn:Ee="widget-right";break;case Yr:Ee="widget-bottom";break;default:throw"unreachable"}return{zone:Ee,target:Jr}}xt.findDropTarget=st;function ft(Lt){return Lt.titles.length===0?null:Lt.currentTitle?Lt.currentTitle.owner:Lt.titles[Lt.titles.length-1].owner}xt.getDropRef=ft})(Qu||(Qu={}));var z0=class xt extends pd{constructor(be={}){super(be),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new Vh],this._columnSizers=[new Vh],this._box=null,be.rowCount!==void 0&&Hc.reallocSizers(this._rowSizers,be.rowCount),be.columnCount!==void 0&&Hc.reallocSizers(this._columnSizers,be.columnCount),be.rowSpacing!==void 0&&(this._rowSpacing=Hc.clampValue(be.rowSpacing)),be.columnSpacing!==void 0&&(this._columnSpacing=Hc.clampValue(be.columnSpacing))}dispose(){for(let be of this._items){let st=be.widget;be.dispose(),st.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(be){be!==this.rowCount&&(Hc.reallocSizers(this._rowSizers,be),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(be){be!==this.columnCount&&(Hc.reallocSizers(this._columnSizers,be),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(be){be=Hc.clampValue(be),this._rowSpacing!==be&&(this._rowSpacing=be,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(be){be=Hc.clampValue(be),this._columnSpacing!==be&&(this._columnSpacing=be,this.parent&&this.parent.fit())}rowStretch(be){let st=this._rowSizers[be];return st?st.stretch:-1}setRowStretch(be,st){let ft=this._rowSizers[be];ft&&(st=Hc.clampValue(st),ft.stretch!==st&&(ft.stretch=st,this.parent&&this.parent.update()))}columnStretch(be){let st=this._columnSizers[be];return st?st.stretch:-1}setColumnStretch(be,st){let ft=this._columnSizers[be];ft&&(st=Hc.clampValue(st),ft.stretch!==st&&(ft.stretch=st,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(let be of this._items)yield be.widget}addWidget(be){Fi.ArrayExt.findFirstIndex(this._items,ft=>ft.widget===be)===-1&&(this._items.push(new Tv(be)),this.parent&&this.attachWidget(be))}removeWidget(be){let st=Fi.ArrayExt.findFirstIndex(this._items,Lt=>Lt.widget===be);if(st===-1)return;let ft=Fi.ArrayExt.removeAt(this._items,st);this.parent&&this.detachWidget(be),ft.dispose()}init(){super.init();for(let be of this)this.attachWidget(be)}attachWidget(be){this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeAttach),this.parent.node.appendChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterAttach),this.parent.fit()}detachWidget(be){this.parent.isAttached&&$i.sendMessage(be,to.Msg.BeforeDetach),this.parent.node.removeChild(be.node),this.parent.isAttached&&$i.sendMessage(be,to.Msg.AfterDetach),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_fit(){for(let jr=0,Jr=this.rowCount;jr!jr.isHidden);for(let jr=0,Jr=be.length;jr({row:0,column:0,rowSpan:1,columnSpan:1}),changed:Cr});function be(jr){let Jr=Math.max(0,Math.floor(jr.row||0)),zr=Math.max(0,Math.floor(jr.column||0)),Gr=Math.max(1,Math.floor(jr.rowSpan||0)),tn=Math.max(1,Math.floor(jr.columnSpan||0));return{row:Jr,column:zr,rowSpan:Gr,columnSpan:tn}}xt.normalizeConfig=be;function st(jr){return Math.max(0,Math.floor(jr))}xt.clampValue=st;function ft(jr,Jr){let zr=xt.cellConfigProperty.get(jr.widget),Gr=xt.cellConfigProperty.get(Jr.widget);return zr.rowSpan-Gr.rowSpan}xt.rowSpanCmp=ft;function Lt(jr,Jr){let zr=xt.cellConfigProperty.get(jr.widget),Gr=xt.cellConfigProperty.get(Jr.widget);return zr.columnSpan-Gr.columnSpan}xt.columnSpanCmp=Lt;function Xt(jr,Jr){for(Jr=Math.max(1,Math.floor(Jr));jr.lengthJr&&(jr.length=Jr)}xt.reallocSizers=Xt;function Hr(jr,Jr,zr,Gr){if(zr=Gr)return;let Yr=(Gr-tn)/(zr-Jr+1);for(let Nr=Jr;Nr<=zr;++Nr)jr[Nr].minSize+=Yr}xt.distributeMin=Hr;function Cr(jr){jr.parent&&jr.parent.layout instanceof z0&&jr.parent.fit()}})(Hc||(Hc={}));var xg=class xt extends to{constructor(be={}){super({node:wg.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(to.Flag.DisallowLayout),this.renderer=be.renderer||xt.defaultRenderer,this._forceItemsPosition=be.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=be.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(be){this.activeIndex=be?this._menus.indexOf(be):-1}get activeIndex(){return this._activeIndex}set activeIndex(be){(be<0||be>=this._menus.length)&&(be=-1),be>-1&&this._menus[be].items.length===0&&(be=-1),this._activeIndex!==be&&(this._activeIndex=be,this.update())}get menus(){return this._menus}openActiveMenu(){this._activeIndex!==-1&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(be,st=!0){this.insertMenu(this._menus.length,be,st)}insertMenu(be,st,ft=!0){this._closeChildMenu();let Lt=this._menus.indexOf(st),Xt=Math.max(0,Math.min(be,this._menus.length));if(Lt===-1){Fi.ArrayExt.insert(this._menus,Xt,st),st.addClass("lm-MenuBar-menu"),st.aboutToClose.connect(this._onMenuAboutToClose,this),st.menuRequested.connect(this._onMenuMenuRequested,this),st.title.changed.connect(this._onTitleChanged,this),ft&&this.update();return}Xt===this._menus.length&&Xt--,Lt!==Xt&&(Fi.ArrayExt.move(this._menus,Lt,Xt),ft&&this.update())}removeMenu(be,st=!0){this.removeMenuAt(this._menus.indexOf(be),st)}removeMenuAt(be,st=!0){this._closeChildMenu();let ft=Fi.ArrayExt.removeAt(this._menus,be);ft&&(ft.aboutToClose.disconnect(this._onMenuAboutToClose,this),ft.menuRequested.disconnect(this._onMenuMenuRequested,this),ft.title.changed.disconnect(this._onTitleChanged,this),ft.removeClass("lm-MenuBar-menu"),st&&this.update())}clearMenus(){if(this._menus.length!==0){this._closeChildMenu();for(let be of this._menus)be.aboutToClose.disconnect(this._onMenuAboutToClose,this),be.menuRequested.disconnect(this._onMenuMenuRequested,this),be.title.changed.disconnect(this._onTitleChanged,this),be.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(be){switch(be.type){case"keydown":this._evtKeyDown(be);break;case"mousedown":this._evtMouseDown(be);break;case"mousemove":this._evtMouseMove(be);break;case"focusout":this._evtFocusOut(be);break;case"contextmenu":be.preventDefault(),be.stopPropagation();break}}onBeforeAttach(be){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(be){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(be){this.isAttached&&this._focusItemAt(0)}onResize(be){this.update(),super.onResize(be)}onUpdateRequest(be){var st;let ft=this._menus,Lt=this.renderer,Xt=this._activeIndex,Hr=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:ft.length,jr=0,Jr=!1;Cr=this._overflowMenu!==null?Cr-1:Cr;let zr=new Array(Cr);for(let Gr=0;Gr{this._tabFocusIndex=Gr,this.activeIndex=Gr}}),jr+=this._menuItemSizes[Gr],ft[Gr].title.label===this._overflowMenuOptions.title&&(Jr=!0,Cr--);if(this._overflowMenuOptions.isVisible){if(this._overflowIndex>-1&&!Jr){if(this._overflowMenu===null){let Gr=(st=this._overflowMenuOptions.title)!==null&&st!==void 0?st:"...";this._overflowMenu=new wv({commands:new cd}),this._overflowMenu.title.label=Gr,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let Gr=ft.length-2;Gr>=Cr;Gr--){let tn=this.menus[Gr];tn.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:tn}),this.removeMenu(tn,!1)}zr[Cr]=Lt.renderItem({title:this._overflowMenu.title,active:Cr===Xt&&ft[Cr].items.length!==0,tabbable:Cr===Hr,disabled:ft[Cr].items.length===0,onfocus:()=>{this._tabFocusIndex=Cr,this.activeIndex=Cr}}),Cr++}else if(this._overflowMenu!==null){let Gr=this._overflowMenu.items,tn=this.node.offsetWidth,Yr=this._overflowMenu.items.length;for(let Nr=0;Nrthis._menuItemSizes[Qr]){let En=Gr[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(Cr,En,!1),zr[Cr]=Lt.renderItem({title:En.title,active:!1,tabbable:Cr===Hr,disabled:ft[Cr].items.length===0,onfocus:()=>{this._tabFocusIndex=Cr,this.activeIndex=Cr}}),Cr++}}this._overflowMenu.items.length===0&&(this.removeMenu(this._overflowMenu,!1),zr.pop(),this._overflowMenu=null,this._overflowIndex=-1)}}fd.render(zr,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;let be=this.contentNode.childNodes,st=this.node.offsetWidth,ft=0,Lt=-1,Xt=be.length;if(this._menuItemSizes.length==0)for(let Hr=0;Hrst&&Lt===-1&&(Lt=Hr)}else for(let Hr=0;Hrst){Lt=Hr;break}this._overflowIndex=Lt}_evtKeyDown(be){let st=be.keyCode;if(st===9){this.activeIndex=-1;return}if(be.preventDefault(),be.stopPropagation(),st===13||st===32||st===38||st===40){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;this.openActiveMenu();return}if(st===27){this._closeChildMenu(),this._focusItemAt(this.activeIndex);return}if(st===37||st===39){let Hr=st===37?-1:1,Cr=this._tabFocusIndex+Hr,jr=this._menus.length;for(let Jr=0;JrRl.hitTest(ft,be.clientX,be.clientY));if(st===-1){this._closeChildMenu();return}if(be.button===0)if(this._childMenu)this._closeChildMenu(),this.activeIndex=st;else{be.preventDefault();let ft=this._positionForMenu(st);wv.saveWindowData(),this.activeIndex=st,this._openChildMenu(ft)}}_evtMouseMove(be){let st=Fi.ArrayExt.findFirstIndex(this.contentNode.children,Lt=>Rl.hitTest(Lt,be.clientX,be.clientY));if(st===this._activeIndex||st===-1&&this._childMenu)return;let ft=st>=0&&this._childMenu?this._positionForMenu(st):null;wv.saveWindowData(),this.activeIndex=st,ft&&this._openChildMenu(ft)}_positionForMenu(be){let st=this.contentNode.children[be],{left:ft,bottom:Lt}=st.getBoundingClientRect();return{top:Lt,left:ft}}_evtFocusOut(be){!this._childMenu&&!this.node.contains(be.relatedTarget)&&(this.activeIndex=-1)}_focusItemAt(be){let st=this.contentNode.childNodes[be];st&&st.focus()}_openChildMenu(be={}){let st=this.activeMenu;if(!st){this._closeChildMenu();return}let ft=this._childMenu;if(ft===st)return;this._childMenu=st,ft?ft.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,$i.sendMessage(this,to.Msg.UpdateRequest);let{left:Lt,top:Xt}=be;(typeof Lt>"u"||typeof Xt>"u")&&({left:Lt,top:Xt}=this._positionForMenu(this._activeIndex)),ft||this.addClass("lm-mod-active"),st.items.length>0&&st.open(Lt,Xt,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let be=this._childMenu;this._childMenu=null,be.close(),this.activeIndex=-1}_onMenuAboutToClose(be){be===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(be,st){if(be!==this._childMenu)return;let ft=this._activeIndex,Lt=this._menus.length;switch(st){case"next":this.activeIndex=ft===Lt-1?0:ft+1;break;case"previous":this.activeIndex=ft===0?Lt-1:ft-1;break}this.openActiveMenu()}_onTitleChanged(){this.update()}};(function(xt){class be{renderItem(ft){let Lt=this.createItemClass(ft),Xt=this.createItemDataset(ft),Hr=this.createItemARIA(ft);return Sl.li({className:Lt,dataset:Xt,...ft.disabled?{}:{tabindex:ft.tabbable?"0":"-1"},onfocus:ft.onfocus,...Hr},this.renderIcon(ft),this.renderLabel(ft))}renderIcon(ft){let Lt=this.createIconClass(ft);return Sl.div({className:Lt},ft.title.icon,ft.title.iconLabel)}renderLabel(ft){let Lt=this.formatLabel(ft);return Sl.div({className:"lm-MenuBar-itemLabel"},Lt)}createItemClass(ft){let Lt="lm-MenuBar-item";return ft.title.className&&(Lt+=` ${ft.title.className}`),ft.active&&!ft.disabled&&(Lt+=" lm-mod-active"),Lt}createItemDataset(ft){return ft.title.dataset}createItemARIA(ft){return{role:"menuitem","aria-haspopup":"true","aria-disabled":ft.disabled?"true":"false"}}createIconClass(ft){let Lt="lm-MenuBar-itemIcon",Xt=ft.title.iconClass;return Xt?`${Lt} ${Xt}`:Lt}formatLabel(ft){let{label:Lt,mnemonic:Xt}=ft.title;if(Xt<0||Xt>=Lt.length)return Lt;let Hr=Lt.slice(0,Xt),Cr=Lt.slice(Xt+1),jr=Lt[Xt],Jr=Sl.span({className:"lm-MenuBar-itemMnemonic"},jr);return[Hr,Jr,Cr]}}xt.Renderer=be,xt.defaultRenderer=new be})(xg||(xg={}));var wg;(function(xt){function be(){let ft=document.createElement("div"),Lt=document.createElement("ul");return Lt.className="lm-MenuBar-content",ft.appendChild(Lt),Lt.setAttribute("role","menubar"),ft}xt.createNode=be;function st(ft,Lt,Xt){let Hr=-1,Cr=-1,jr=!1,Jr=Lt.toUpperCase();for(let zr=0,Gr=ft.length;zr=0&&Nr1&&this.widgets.forEach(st=>{st.hiddenMode=this._hiddenMode}))}dispose(){for(let be of this._items)be.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(be,st){this._hiddenMode===to.HiddenMode.Scale&&this._items.length>0?(this._items.length===1&&(this.widgets[0].hiddenMode=to.HiddenMode.Scale),st.hiddenMode=to.HiddenMode.Scale):st.hiddenMode=to.HiddenMode.Display,Fi.ArrayExt.insert(this._items,be,new Tv(st)),this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeAttach),this.parent.node.appendChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterAttach),this.parent.fit()}moveWidget(be,st,ft){Fi.ArrayExt.move(this._items,be,st),this.parent.update()}detachWidget(be,st){let ft=Fi.ArrayExt.removeAt(this._items,be);this.parent.isAttached&&$i.sendMessage(st,to.Msg.BeforeDetach),this.parent.node.removeChild(st.node),this.parent.isAttached&&$i.sendMessage(st,to.Msg.AfterDetach),ft.widget.node.style.zIndex="",this._hiddenMode===to.HiddenMode.Scale&&(st.hiddenMode=to.HiddenMode.Display,this._items.length===1&&(this._items[0].widget.hiddenMode=to.HiddenMode.Display)),ft.dispose(),this.parent.fit()}onBeforeShow(be){super.onBeforeShow(be),this.parent.update()}onBeforeAttach(be){super.onBeforeAttach(be),this.parent.fit()}onChildShown(be){this.parent.fit()}onChildHidden(be){this.parent.fit()}onResize(be){this.parent.isVisible&&this._update(be.width,be.height)}onUpdateRequest(be){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(be){this.parent.isAttached&&this._fit()}_fit(){let be=0,st=0;for(let Xt=0,Hr=this._items.length;Xt{this.createGraph(this._model)})}renderModel(be){if(this.hasGraphElement())return Promise.resolve();this._model=be;let st=be.data["image/png"];return st!=null?(this.updateImage(st),Promise.resolve()):this.createGraph(be)}hasGraphElement(){return this.node.querySelector(".plot-container")!==null}updateImage(be){this.hideGraph(),this._img_el.src="data:image/png;base64,"+be,this.showImage()}hideGraph(){let be=this.node.querySelector(".plot-container");be!=null&&(be.style.display="none")}showGraph(){let be=this.node.querySelector(".plot-container");be!=null&&(be.style.display="block")}hideImage(){let be=this.node.querySelector(".plot-img");be!=null&&(be.style.display="none")}showImage(){let be=this.node.querySelector(".plot-img");be!=null&&(be.style.display="block")}createGraph(be){let{data:st,layout:ft,frames:Lt,config:Xt}=be.data[this._mimeType];return ft.height||(ft.height=360),(async()=>(xt.Plotly===null&&(xt.Plotly=await Promise.resolve().then(()=>sd(fA())),xt._resolveLoadingPlotly()),xt.loadingPlotly))().then(()=>xt.Plotly.react(this.node,st,ft,Xt)).then(Cr=>{this.showGraph(),this.hideImage(),this.update(),Lt&&xt.Plotly.addFrames(this.node,Lt),this.node.offsetWidth>0&&this.node.offsetHeight>0&&xt.Plotly.toImage(Cr,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then(jr=>{let Jr=jr.split(",")[1];be.data["image/png"]!==Jr&&be.setData({data:{...be.data,"image/png":Jr}})}),this.node.on("plotly_webglcontextlost",()=>{let jr=be.data["image/png"];if(jr!=null)return this.updateImage(jr),Promise.resolve()})})}onAfterShow(be){this.update()}onResize(be){this.update()}onUpdateRequest(be){xt.Plotly&&this.isVisible&&this.hasGraphElement()&&xt.Plotly.redraw(this.node).then(()=>{xt.Plotly.Plots.resize(this.node)})}static{this.Plotly=null}static{this.loadingPlotly=new Promise(be=>{xt._resolveLoadingPlotly=be})}},tz={safe:!0,mimeTypes:[hA],createRenderer:xt=>new db(xt)},rz=[{id:"@jupyterlab/plotly-extension:factory",rendererFactory:tz,rank:2,dataType:"json",fileTypes:[{name:"plotly",mimeTypes:[hA],extensions:[".plotly",".plotly.json"],iconClass:ez}],documentWidgetFactoryOptions:{name:"Plotly",primaryFileType:"plotly",fileTypes:["plotly","json"],defaultFor:["plotly"]}}],sB=rz;export{hA as MIME_TYPE,db as RenderedPlotly,sB as default,tz as rendererFactory}; /*! Bundled license information: plotly.js/dist/plotly.js: @@ -3361,7 +3582,7 @@ plotly.js/dist/plotly.js: maplibre-gl/dist/maplibre-gl.js: (** * MapLibre GL JS - * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt + * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.24.0/LICENSE.txt *) *) */ diff --git a/js/package-lock.json b/js/package-lock.json index 9972ea97e0..f77db23cc4 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -11,7 +11,7 @@ "dependencies": { "@lumino/widgets": "~2.4.0", "lodash-es": "^4.17.21", - "plotly.js": "4.0.0-rc.0" + "plotly.js": "4.0.0" }, "devDependencies": { "@jupyter/builder": "^1.2.2", @@ -638,58 +638,73 @@ "@lumino/virtualdom": "^2.0.2" } }, - "node_modules/@mapbox/geojson-rewind": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/@mapbox/geojson-rewind/-/geojson-rewind-0.5.2.tgz", - "integrity": "sha512-tJaT+RbYGJYStt7wI3cq4Nl4SXxG8W7JDG5DMJu97V25RnbNg3QtQtf+KD+VLjNpWKYsRvXDNmNrBgEETr1ifA==", - "dependencies": { - "get-stream": "^6.0.1", - "minimist": "^1.2.6" - }, - "bin": { - "geojson-rewind": "geojson-rewind" - } - }, "node_modules/@mapbox/jsonlint-lines-primitives": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.2.tgz", - "integrity": "sha512-rY0o9A5ECsTQRVhv7tL/OyDpGAoUB4tTvLiW1DSzQGq4bvTPhNw1VpSNjDJc5GFZ2XuyOtSWSVN05qOtcD71qQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@mapbox/jsonlint-lines-primitives/-/jsonlint-lines-primitives-2.0.3.tgz", + "integrity": "sha512-0SElaV0uMxEnxzBhhX9WTuPyUeMsAN/SS0i16tjuba4/mio63MG9khjC1a0JAiPGXAwvwm4UfHJURCN7nyudQg==", + "license": "MIT", "engines": { - "node": ">= 0.6" + "node": ">= 22" } }, "node_modules/@mapbox/point-geometry": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-0.1.0.tgz", - "integrity": "sha512-6j56HdLTwWGO0fJPlrZtdU/B13q8Uwmo18Ck2GnGgN9PCFyKTZ3UbXeEdRFh18i9XQ92eH2VdtpJHpBD3aripQ==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@mapbox/point-geometry/-/point-geometry-1.1.0.tgz", + "integrity": "sha512-YGcBz1cg4ATXDCM/71L9xveh4dynfGmcLDqufR+nQQy3fKwsAZsWd/x4621/6uJaeB9mwOHE6hPeDgXz9uViUQ==", + "license": "ISC" + }, + "node_modules/@mapbox/tiny-sdf": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.2.0.tgz", + "integrity": "sha512-LVL4wgI9YAum5V+LNVQO6QgFBPw7/MIIY4XJPNsPDMrjEwcE+JfKk1LuIl8GnF197ejVdC9QdPaxrx5gfgdGXg==", + "license": "BSD-2-Clause" + }, + "node_modules/@mapbox/unitbezier": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz", + "integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==", + "license": "BSD-2-Clause" }, "node_modules/@mapbox/vector-tile": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-1.3.1.tgz", - "integrity": "sha512-MCEddb8u44/xfQ3oD+Srl/tNcQoqTw3goGk2oLsrFxOTc3dUp+kAnby3PvAeeBYSMSjSPD1nd1AJA6W49WnoUw==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@mapbox/vector-tile/-/vector-tile-2.0.5.tgz", + "integrity": "sha512-pXj8m7KTsqZt+1jsE0xIpGvqTSbblfkuEJL/NJmNePMtEwxO8V3XMDo9WMSfDeqHvCtBI9Lmt4mGcGR10zecmw==", + "license": "BSD-3-Clause", "dependencies": { - "@mapbox/point-geometry": "~0.1.0" + "@mapbox/point-geometry": "~1.1.0", + "@types/geojson": "^7946.0.16", + "pbf": "^4.0.2" } }, "node_modules/@mapbox/whoots-js": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@mapbox/whoots-js/-/whoots-js-3.1.0.tgz", "integrity": "sha512-Es6WcD0nO5l+2BOQS4uLfNPYQaNDfbot3X1XUoloz+x0mPDS3eeORZJl06HXjwBG1fOGwCRnzK88LMdxKRrd6Q==", + "license": "ISC", "engines": { "node": ">=6.0.0" } }, + "node_modules/@maplibre/geojson-vt": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@maplibre/geojson-vt/-/geojson-vt-6.1.1.tgz", + "integrity": "sha512-FVMOcmSP/yqol45t7StApEyTL5/vmqBCuFhH9n+fFuINenhaX+YgHHIt1yJ86S8kln3uJLcMvmEU2cfn6E2eCQ==", + "license": "ISC", + "dependencies": { + "kdbush": "^4.1.0" + } + }, "node_modules/@maplibre/maplibre-gl-style-spec": { - "version": "20.4.0", - "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-20.4.0.tgz", - "integrity": "sha512-AzBy3095fTFPjDjmWpR2w6HVRAZJ6hQZUCwk5Plz6EyfnfuQW1odeW5i2Ai47Y6TBA2hQnC+azscjBSALpaWgw==", + "version": "24.10.0", + "resolved": "https://registry.npmjs.org/@maplibre/maplibre-gl-style-spec/-/maplibre-gl-style-spec-24.10.0.tgz", + "integrity": "sha512-lichxSiagMEBBrqHF0trtMQH9RKh+9jUlIJl0qW0QHvt2H/tbvUWdE+ZzI2Jd0/pT7j/iavLonlPu7EQ/ixTOw==", + "license": "ISC", "dependencies": { "@mapbox/jsonlint-lines-primitives": "~2.0.2", - "@mapbox/unitbezier": "^0.0.1", + "@mapbox/unitbezier": "^1.0.0", "json-stringify-pretty-compact": "^4.0.0", "minimist": "^1.2.8", - "quickselect": "^2.0.0", - "rw": "^1.3.3", + "quickselect": "^3.0.0", "tinyqueue": "^3.0.0" }, "bin": { @@ -699,14 +714,42 @@ } }, "node_modules/@maplibre/maplibre-gl-style-spec/node_modules/@mapbox/unitbezier": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz", - "integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==" + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-1.0.0.tgz", + "integrity": "sha512-fqd515fjBmANKGGsQ286E2Wvj/XvDFpGzwJxq4CI6jMQue6Oy04uCKp+JWKF00xRTmk6cEu1jPJ9p3xqH8YWqQ==", + "license": "BSD-2-Clause" }, - "node_modules/@maplibre/maplibre-gl-style-spec/node_modules/tinyqueue": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-3.0.0.tgz", - "integrity": "sha512-gRa9gwYU3ECmQYv3lslts5hxuIa90veaEcxDYuu3QGOIAEM2mOZkVHp48ANJuu1CURtRdHKUBY5Lm1tHV+sD4g==" + "node_modules/@maplibre/mlt": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@maplibre/mlt/-/mlt-1.2.0.tgz", + "integrity": "sha512-g45M8gEI4sMO3X9ib4K7n3ZKFf0qQOL+NMkHCnEK51lOrYFHiEssOuZncx1+miIgi1IEE2NcbRMcq8RBkL+QHA==", + "license": "(MIT OR Apache-2.0)", + "dependencies": { + "@mapbox/point-geometry": "^1.1.0" + } + }, + "node_modules/@maplibre/vt-pbf": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@maplibre/vt-pbf/-/vt-pbf-4.3.2.tgz", + "integrity": "sha512-j6p0AdjvAR19Z3XaCysle7A4ZSo08tYOzxD0Y9NQylwPAkwJJeYub5b2eVucdeDh7erhv69DahoLOevDRERRUw==", + "license": "MIT", + "dependencies": { + "@mapbox/point-geometry": "^1.1.0", + "@types/geojson": "^7946.0.16", + "pbf": "^5.1.0" + } + }, + "node_modules/@maplibre/vt-pbf/node_modules/pbf": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-5.1.2.tgz", + "integrity": "sha512-mnvGdvOrIvJOBGUEdGkrVXjN8E/VkIJCkf2eS1DH2yv82ORUlLttmDt0rWY38yYZmVwciZwBUvHM20qxBZf40w==", + "license": "BSD-3-Clause", + "dependencies": { + "resolve-protobuf-schema": "^2.1.0" + }, + "bin": { + "pbf": "bin/pbf" + } }, "node_modules/@module-federation/error-codes": { "version": "2.8.2", @@ -845,12 +888,13 @@ ] }, "node_modules/@turf/area": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@turf/area/-/area-7.2.0.tgz", - "integrity": "sha512-zuTTdQ4eoTI9nSSjerIy4QwgvxqwJVciQJ8tOPuMHbXJ9N/dNjI7bU8tasjhxas/Cx3NE9NxVHtNpYHL0FSzoA==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@turf/area/-/area-7.4.0.tgz", + "integrity": "sha512-B7q5f6QwKIxxbl4/L59lAYA+FF7h2hv6st96PuKue0TGCYGSxAG/lV8LHSPUSOuOrLywN4jytJcKK3vOFBs7Nw==", + "license": "MIT", "dependencies": { - "@turf/helpers": "^7.2.0", - "@turf/meta": "^7.2.0", + "@turf/helpers": "7.4.0", + "@turf/meta": "7.4.0", "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" }, @@ -859,12 +903,13 @@ } }, "node_modules/@turf/centroid": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@turf/centroid/-/centroid-7.2.0.tgz", - "integrity": "sha512-yJqDSw25T7P48au5KjvYqbDVZ7qVnipziVfZ9aSo7P2/jTE7d4BP21w0/XLi3T/9bry/t9PR1GDDDQljN4KfDw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@turf/centroid/-/centroid-7.4.0.tgz", + "integrity": "sha512-WglCFe+TnMqeYa/LcbUp37NgIF0zHTNYmlxwUm40fyyzyLsYeDq4dgFWLTYpvRNqb5oIMV6xsBjSf+vCPtVJ6w==", + "license": "MIT", "dependencies": { - "@turf/helpers": "^7.2.0", - "@turf/meta": "^7.2.0", + "@turf/helpers": "7.4.0", + "@turf/meta": "7.4.0", "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" }, @@ -873,9 +918,10 @@ } }, "node_modules/@turf/helpers": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.2.0.tgz", - "integrity": "sha512-cXo7bKNZoa7aC7ydLmUR02oB3IgDe7MxiPuRz3cCtYQHn+BJ6h1tihmamYDWWUlPHgSNF0i3ATc4WmDECZafKw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@turf/helpers/-/helpers-7.4.0.tgz", + "integrity": "sha512-7PAwLZqOdRzTI5g9bHvUwlloAXPDH/mlajtryk0tw4ZwGMtmXsAyF4QundsAMfy4u48Fyd3AUqMXY0SMxqJGWg==", + "license": "MIT", "dependencies": { "@types/geojson": "^7946.0.10", "tslib": "^2.8.1" @@ -885,12 +931,14 @@ } }, "node_modules/@turf/meta": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.2.0.tgz", - "integrity": "sha512-igzTdHsQc8TV1RhPuOLVo74Px/hyPrVgVOTgjWQZzt3J9BVseCdpfY/0cJBdlSRI4S/yTmmHl7gAqjhpYH5Yaw==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/@turf/meta/-/meta-7.4.0.tgz", + "integrity": "sha512-3cLUvlEyDuSnMSzrjhaLAEiYR8xhbfWyTVQlrlEw40xL81d4KF4PqUWbjTXKpXZStdYbet2GCurl79KMypNw6g==", + "license": "MIT", "dependencies": { - "@turf/helpers": "^7.2.0", - "@types/geojson": "^7946.0.10" + "@turf/helpers": "7.4.0", + "@types/geojson": "^7946.0.10", + "tslib": "^2.8.1" }, "funding": { "url": "https://opencollective.com/turf" @@ -939,15 +987,8 @@ "node_modules/@types/geojson": { "version": "7946.0.16", "resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.16.tgz", - "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==" - }, - "node_modules/@types/geojson-vt": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@types/geojson-vt/-/geojson-vt-3.2.5.tgz", - "integrity": "sha512-qDO7wqtprzlpe8FfQ//ClPV9xiuoh2nkIgiouIptON9w5jvD/fA4szvP9GBlDVdJ5dldAl0kX/sy3URbWwLx0g==", - "dependencies": { - "@types/geojson": "*" - } + "integrity": "sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==", + "license": "MIT" }, "node_modules/@types/json-schema": { "version": "7.0.15", @@ -956,21 +997,6 @@ "dev": true, "peer": true }, - "node_modules/@types/mapbox__point-geometry": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@types/mapbox__point-geometry/-/mapbox__point-geometry-0.1.4.tgz", - "integrity": "sha512-mUWlSxAmYLfwnRBmgYV86tgYmMIICX4kza8YnE/eIlywGe2XoOxlpVnXWwir92xRLjwyarqwpu2EJKD2pk0IUA==" - }, - "node_modules/@types/mapbox__vector-tile": { - "version": "1.3.4", - "resolved": "https://registry.npmjs.org/@types/mapbox__vector-tile/-/mapbox__vector-tile-1.3.4.tgz", - "integrity": "sha512-bpd8dRn9pr6xKvuEBQup8pwQfD4VUyqO/2deGjfpe6AwC8YRlyEipvefyRJUSiCJTZuCb8Pl1ciVV5ekqJ96Bg==", - "dependencies": { - "@types/geojson": "*", - "@types/mapbox__point-geometry": "*", - "@types/pbf": "*" - } - }, "node_modules/@types/node": { "version": "22.13.10", "resolved": "https://registry.npmjs.org/@types/node/-/node-22.13.10.tgz", @@ -981,25 +1007,12 @@ "undici-types": "~6.20.0" } }, - "node_modules/@types/pbf": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/pbf/-/pbf-3.0.5.tgz", - "integrity": "sha512-j3pOPiEcWZ34R6a6mN07mUkM4o4Lwf6hPNt8eilOeZhTFbxFXmKhvXl9Y28jotFPaI1bpPDJsbCprUoNke6OrA==" - }, "node_modules/@types/plotly.js": { "version": "2.35.2", "resolved": "https://registry.npmjs.org/@types/plotly.js/-/plotly.js-2.35.2.tgz", "integrity": "sha512-tn0Kp7F6VWiu96jknCvR/PcdIGIATeIK+Z5WXH3bEvG6CRwUNfhy34yBhfPYmTea7mMQxXvTZKGMm6/Y4wxESg==", "dev": true }, - "node_modules/@types/supercluster": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/@types/supercluster/-/supercluster-7.1.3.tgz", - "integrity": "sha512-Z0pOY34GDFl3Q6hUFYf3HkTwKEE02e7QgtJppBt+beEAxnyOpJua+voGFvxINBHa06GwLFFym7gRPY2SiKIfIA==", - "dependencies": { - "@types/geojson": "*" - } - }, "node_modules/@webassemblyjs/ast": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.14.1.tgz", @@ -1178,7 +1191,8 @@ "node_modules/abs-svg-path": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/abs-svg-path/-/abs-svg-path-0.1.1.tgz", - "integrity": "sha512-d8XPSGjfyzlXC3Xx891DJRyZfqk5JU0BJrDQcsWomFIV1/BIzPW5HDH5iDdWpqWaav0YVIEzT1RHTwWr0FFshA==" + "integrity": "sha512-d8XPSGjfyzlXC3Xx891DJRyZfqk5JU0BJrDQcsWomFIV1/BIzPW5HDH5iDdWpqWaav0YVIEzT1RHTwWr0FFshA==", + "license": "MIT" }, "node_modules/acorn": { "version": "7.4.1", @@ -1276,11 +1290,6 @@ "resolved": "https://registry.npmjs.org/array-range/-/array-range-1.0.1.tgz", "integrity": "sha512-shdaI1zT3CVNL2hnx9c0JMc0ZogGaxDs5e85akgHWKYa0yVbIyp06Ind3dVkTj/uuFrzaHBOyqFzo+VV6aXgtA==" }, - "node_modules/array-rearrange": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/array-rearrange/-/array-rearrange-2.2.2.tgz", - "integrity": "sha512-UfobP5N12Qm4Qu4fwLDIi2v6+wZsSf6snYSxAMeKhrh37YGnNWZPRmVEKc/2wfms53TLQnzfpG8wCx2Y/6NG1w==" - }, "node_modules/base64-arraybuffer": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-1.0.2.tgz", @@ -1302,7 +1311,8 @@ "node_modules/bitmap-sdf": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/bitmap-sdf/-/bitmap-sdf-1.0.4.tgz", - "integrity": "sha512-1G3U4n5JE6RAiALMxu0p1XmeZkTeCwGKykzsLTCqVzfSDaN6S7fKnkIkfejogz+iwqBWc0UYAIKnKHNN7pSfDg==" + "integrity": "sha512-1G3U4n5JE6RAiALMxu0p1XmeZkTeCwGKykzsLTCqVzfSDaN6S7fKnkIkfejogz+iwqBWc0UYAIKnKHNN7pSfDg==", + "license": "MIT" }, "node_modules/bl": { "version": "2.2.1", @@ -1436,19 +1446,6 @@ "node": ">=6" } }, - "node_modules/color": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/color/-/color-5.0.3.tgz", - "integrity": "sha512-ezmVcLR3xAVp8kYOm4GS45ZLLgIE6SPAFoduLr6hTDajwb3KZ2F46gulK3XpcwRFb5KKGCSezCBAY4Dw4HsyXA==", - "license": "MIT", - "dependencies": { - "color-convert": "^3.1.3", - "color-string": "^2.1.3" - }, - "engines": { - "node": ">=18" - } - }, "node_modules/color-alpha": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/color-alpha/-/color-alpha-1.0.4.tgz", @@ -1514,70 +1511,11 @@ "color-space": "^2.0.0" } }, - "node_modules/color-parse": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/color-parse/-/color-parse-2.0.0.tgz", - "integrity": "sha512-g2Z+QnWsdHLppAbrpcFWo629kLOnOPtpxYV69GCqm92gqSgyXbzlfyN3MXs0412fPBkFmiuS+rXposgBgBa6Kg==", - "dependencies": { - "color-name": "^1.0.0" - } - }, - "node_modules/color-rgba": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/color-rgba/-/color-rgba-3.0.0.tgz", - "integrity": "sha512-PPwZYkEY3M2THEHHV6Y95sGUie77S7X8v+h1r6LSAPF3/LL2xJ8duUXSrkic31Nzc4odPwHgUbiX/XuTYzQHQg==", - "dependencies": { - "color-parse": "^2.0.0", - "color-space": "^2.0.0" - } - }, "node_modules/color-space": { "version": "2.3.1", "resolved": "https://registry.npmjs.org/color-space/-/color-space-2.3.1.tgz", "integrity": "sha512-5DJdKYwoDji3ik/i0xSn+SiwXsfwr+1FEcCMUz2GS5speGCfGSbBMOLd84SDUBOuX8y4CvdFJmOBBJuC4wp7sQ==" }, - "node_modules/color-string": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-2.1.4.tgz", - "integrity": "sha512-Bb6Cq8oq0IjDOe8wJmi4JeNn763Xs9cfrBcaylK1tPypWzyoy2G3l90v9k64kjphl/ZJjPIShFztenRomi8WTg==", - "license": "MIT", - "dependencies": { - "color-name": "^2.0.0" - }, - "engines": { - "node": ">=18" - } - }, - "node_modules/color-string/node_modules/color-name": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.1.1.tgz", - "integrity": "sha512-p2FdgwVx1a9yWBHP2wI0VgShkDpgN4kZISkxdNipGBJWpa5G6b04OINlVWCyJj0JmfvcPrgqt95E9k8yvaOJFg==", - "license": "MIT", - "engines": { - "node": ">=12.20" - } - }, - "node_modules/color/node_modules/color-convert": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-3.1.3.tgz", - "integrity": "sha512-fasDH2ont2GqF5HpyO4w0+BcewlhHEZOFn9c1ckZdHpJ56Qb7MHhH/IcJZbBGgvdtwdwNbLvxiBEdg336iA9Sg==", - "license": "MIT", - "dependencies": { - "color-name": "^2.0.0" - }, - "engines": { - "node": ">=14.6" - } - }, - "node_modules/color/node_modules/color-name": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-2.1.1.tgz", - "integrity": "sha512-p2FdgwVx1a9yWBHP2wI0VgShkDpgN4kZISkxdNipGBJWpa5G6b04OINlVWCyJj0JmfvcPrgqt95E9k8yvaOJFg==", - "license": "MIT", - "engines": { - "node": ">=12.20" - } - }, "node_modules/commander": { "version": "9.5.0", "resolved": "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz", @@ -1673,6 +1611,15 @@ "node": ">=4" } }, + "node_modules/culori": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/culori/-/culori-4.0.2.tgz", + "integrity": "sha512-1+BhOB8ahCn4O0cep0Sh2l9KCOfOdY+BXJnKMHFFzDEouSr/el18QwXEMRlOj9UY5nCeA8UN3a/82rUWRBeyBw==", + "license": "MIT", + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + } + }, "node_modules/d": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/d/-/d-1.0.2.tgz", @@ -1811,6 +1758,7 @@ "version": "3.2.7", "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "license": "MIT", "dependencies": { "ms": "^2.1.1" } @@ -1828,15 +1776,6 @@ "resolved": "https://registry.npmjs.org/detect-kerning/-/detect-kerning-2.1.2.tgz", "integrity": "sha512-I3JIbrnKPAntNLl1I6TpSQQdQ4AutYzv/sKMFKbepawV/hlH0GmYKhUoOEMd4xqaUHT+Bm0f4127lh5qs1m1tw==" }, - "node_modules/draw-svg-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/draw-svg-path/-/draw-svg-path-1.0.0.tgz", - "integrity": "sha512-P8j3IHxcgRMcY6sDzr0QvJDLzBnJJqpTG33UZ2Pvp8rw0apCHhJCWqYprqrXjrgHnJ6tuhP1iTJSAodPDHxwkg==", - "dependencies": { - "abs-svg-path": "~0.1.1", - "normalize-svg-path": "~0.1.0" - } - }, "node_modules/dtype": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/dtype/-/dtype-2.0.0.tgz", @@ -2278,26 +2217,16 @@ "resolved": "https://registry.npmjs.org/get-canvas-context/-/get-canvas-context-1.0.2.tgz", "integrity": "sha512-LnpfLf/TNzr9zVOGiIY6aKCz8EKuXmlYNV7CM2pUjBa/B+c2I15tS7KLySep75+FuerJdmArvJLcsAXWEy2H0A==" }, - "node_modules/get-stream": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", - "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/gl-mat4": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/gl-mat4/-/gl-mat4-1.2.0.tgz", "integrity": "sha512-sT5C0pwB1/e9G9AvAoLsoaJtbMGjfd/jfxo8jMCKqYYEnjZuFvqV5rehqar0538EmssjdDeiEWnKyBSTw7quoA==" }, "node_modules/gl-matrix": { - "version": "3.4.3", - "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.3.tgz", - "integrity": "sha512-wcCp8vu8FT22BnvKVPjXa/ICBWRq/zjFfdofZy1WSpQZpphblv12/bOQLBC1rMM7SGOFS9ltVmKOHil5+Ml7gA==" + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/gl-matrix/-/gl-matrix-3.4.4.tgz", + "integrity": "sha512-latSnyDNt/8zYUB6VIJ6PCh2jBjJX6gnDsoCZ7LyW7GkqrD51EWwa9qCoGixj8YqBtETQK/xY7OmpTF8xz1DdQ==", + "license": "MIT" }, "node_modules/gl-text": { "version": "1.4.0", @@ -2344,19 +2273,6 @@ "dev": true, "peer": true }, - "node_modules/global-prefix": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-4.0.0.tgz", - "integrity": "sha512-w0Uf9Y9/nyHinEk5vMJKRie+wa4kR5hmDbEhGGds/kG1PwGLLHKRoNMeJOyCQjjBkANlnScqgzcFwGHgmgLkVA==", - "dependencies": { - "ini": "^4.1.3", - "kind-of": "^6.0.3", - "which": "^4.0.0" - }, - "engines": { - "node": ">=16" - } - }, "node_modules/glsl-inject-defines": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/glsl-inject-defines/-/glsl-inject-defines-1.0.3.tgz", @@ -2583,6 +2499,7 @@ "version": "0.4.24", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "license": "MIT", "dependencies": { "safer-buffer": ">= 2.1.2 < 3" }, @@ -2602,38 +2519,11 @@ "postcss": "^8.1.0" } }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" }, - "node_modules/ini": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/ini/-/ini-4.1.3.tgz", - "integrity": "sha512-X7rqawQBvfdjS10YU1y1YVreA3SsLrW9dX2CewP2EbBJM4ypVNLDkO5y04gejPwKIY9lR+7r9gn3rFPt/kmWFg==", - "engines": { - "node": "^14.17.0 || ^16.13.0 || >=18.0.0" - } - }, "node_modules/is-browser": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-browser/-/is-browser-2.1.0.tgz", @@ -2672,18 +2562,11 @@ "node": ">=0.10.0" } }, - "node_modules/is-iexplorer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-iexplorer/-/is-iexplorer-1.0.0.tgz", - "integrity": "sha512-YeLzceuwg3K6O0MLM3UyUUjKAlyULetwryFp1mHy1I5PfArK0AEqlfa+MR4gkJjcbuJXoDJCvXbyqZVf5CR2Sg==", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/is-mobile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-mobile/-/is-mobile-4.0.0.tgz", - "integrity": "sha512-mlcHZA84t1qLSuWkt2v0I2l61PYdyQDt4aG1mLIXF5FDMm4+haBCxCPYSr/uwqQNRk1MiTizn0ypEuRAOLRAew==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-mobile/-/is-mobile-5.0.0.tgz", + "integrity": "sha512-Tz/yndySvLAEXh+Uk8liFCxOwVH6YutuR74utvOcu7I9Di+DwM0mtdPVZNaVvvBUM2OXxne/NhOs1zAO7riusQ==", + "license": "MIT" }, "node_modules/is-obj": { "version": "1.0.1", @@ -2721,21 +2604,14 @@ "node_modules/is-svg-path": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-svg-path/-/is-svg-path-1.0.2.tgz", - "integrity": "sha512-Lj4vePmqpPR1ZnRctHv8ltSh1OrSxHkhUkd7wi+VQdcdP15/KvQFyk7LhNuM7ZW0EVbJz8kZLVmL9quLrfq4Kg==" + "integrity": "sha512-Lj4vePmqpPR1ZnRctHv8ltSh1OrSxHkhUkd7wi+VQdcdP15/KvQFyk7LhNuM7ZW0EVbJz8kZLVmL9quLrfq4Kg==", + "license": "MIT" }, "node_modules/isarray": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==" }, - "node_modules/isexe": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-3.1.1.tgz", - "integrity": "sha512-LpB/54B+/2J5hqQ7imZHfdU31OlgQqx7ZicVlkm9kzg9/w8GKLEcFfJl/t7DCEDueOyBAD6zCCwTO6Fzs0NoEQ==", - "engines": { - "node": ">=16" - } - }, "node_modules/isobject": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", @@ -2792,7 +2668,8 @@ "node_modules/json-stringify-pretty-compact": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/json-stringify-pretty-compact/-/json-stringify-pretty-compact-4.0.0.tgz", - "integrity": "sha512-3CNZ2DnrpByG9Nqj6Xo8vqbjT4F6N+tb4Gb28ESAZjYZ5yqvmc56J+/kuIwkaAMOyblTQhUW7PxMkUb8Q36N3Q==" + "integrity": "sha512-3CNZ2DnrpByG9Nqj6Xo8vqbjT4F6N+tb4Gb28ESAZjYZ5yqvmc56J+/kuIwkaAMOyblTQhUW7PxMkUb8Q36N3Q==", + "license": "MIT" }, "node_modules/jsonfile": { "version": "6.1.0", @@ -2807,14 +2684,16 @@ } }, "node_modules/kdbush": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.0.2.tgz", - "integrity": "sha512-WbCVYJ27Sz8zi9Q7Q0xHC+05iwkm3Znipc2XTlrnJbsHMYktW4hPhXUE8Ys1engBrvffoSCqbil1JQAa7clRpA==" + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/kdbush/-/kdbush-4.1.0.tgz", + "integrity": "sha512-e9vurzrXJQrFX6ckpHP3bvj5l+9CnYzkxDNnNQ1h2QTqdWsUAJgXiKdGNcOa1EY85dU8KbQ+z/FdQdB7P+9yfQ==", + "license": "ISC" }, "node_modules/kind-of": { "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -2843,7 +2722,8 @@ "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", - "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==" + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "license": "MIT" }, "node_modules/lru-cache": { "version": "11.5.2", @@ -2872,36 +2752,30 @@ } }, "node_modules/maplibre-gl": { - "version": "4.7.1", - "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-4.7.1.tgz", - "integrity": "sha512-lgL7XpIwsgICiL82ITplfS7IGwrB1OJIw/pCvprDp2dhmSSEBgmPzYRvwYYYvJGJD7fxUv1Tvpih4nZ6VrLuaA==", + "version": "5.24.0", + "resolved": "https://registry.npmjs.org/maplibre-gl/-/maplibre-gl-5.24.0.tgz", + "integrity": "sha512-ALyFxgtd5R+65UqZ/++lOqwWcC0SNho9c27fYSyLmG7AfnAul2o46F05aDJGPbFU57wos9dgcIySHs0Xe6ia3A==", + "license": "BSD-3-Clause", "dependencies": { - "@mapbox/geojson-rewind": "^0.5.2", "@mapbox/jsonlint-lines-primitives": "^2.0.2", - "@mapbox/point-geometry": "^0.1.0", - "@mapbox/tiny-sdf": "^2.0.6", + "@mapbox/point-geometry": "^1.1.0", + "@mapbox/tiny-sdf": "^2.1.0", "@mapbox/unitbezier": "^0.0.1", - "@mapbox/vector-tile": "^1.3.1", + "@mapbox/vector-tile": "^2.0.4", "@mapbox/whoots-js": "^3.1.0", - "@maplibre/maplibre-gl-style-spec": "^20.3.1", - "@types/geojson": "^7946.0.14", - "@types/geojson-vt": "3.2.5", - "@types/mapbox__point-geometry": "^0.1.4", - "@types/mapbox__vector-tile": "^1.3.4", - "@types/pbf": "^3.0.5", - "@types/supercluster": "^7.1.3", - "earcut": "^3.0.0", - "geojson-vt": "^4.0.2", - "gl-matrix": "^3.4.3", - "global-prefix": "^4.0.0", + "@maplibre/geojson-vt": "^6.1.0", + "@maplibre/maplibre-gl-style-spec": "^24.8.1", + "@maplibre/mlt": "^1.1.8", + "@maplibre/vt-pbf": "^4.3.0", + "@types/geojson": "^7946.0.16", + "earcut": "^3.0.2", + "gl-matrix": "^3.4.4", "kdbush": "^4.0.2", "murmurhash-js": "^1.0.0", - "pbf": "^3.3.0", - "potpack": "^2.0.0", + "pbf": "^4.0.1", + "potpack": "^2.1.0", "quickselect": "^3.0.0", - "supercluster": "^8.0.1", - "tinyqueue": "^3.0.0", - "vt-pbf": "^3.1.3" + "tinyqueue": "^3.0.0" }, "engines": { "node": ">=16.14.0", @@ -2911,48 +2785,11 @@ "url": "https://github.com/maplibre/maplibre-gl-js?sponsor=1" } }, - "node_modules/maplibre-gl/node_modules/@mapbox/tiny-sdf": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/@mapbox/tiny-sdf/-/tiny-sdf-2.0.6.tgz", - "integrity": "sha512-qMqa27TLw+ZQz5Jk+RcwZGH7BQf5G/TrutJhspsca/3SHwmgKQ1iq+d3Jxz5oysPVYTGP6aXxCo5Lk9Er6YBAA==" - }, - "node_modules/maplibre-gl/node_modules/@mapbox/unitbezier": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/@mapbox/unitbezier/-/unitbezier-0.0.1.tgz", - "integrity": "sha512-nMkuDXFv60aBr9soUG5q+GvZYL+2KZHVvsqFCzqnkGEf46U2fvmytHaEVc1/YZbiLn8X+eR3QzX1+dwDO1lxlw==" - }, "node_modules/maplibre-gl/node_modules/earcut": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.0.1.tgz", - "integrity": "sha512-0l1/0gOjESMeQyYaK5IDiPNvFeu93Z/cO0TjZh9eZ1vyCtZnA7KMZ8rQggpsJHIbGSdrqYq9OhuveadOVHCshw==" - }, - "node_modules/maplibre-gl/node_modules/geojson-vt": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/geojson-vt/-/geojson-vt-4.0.2.tgz", - "integrity": "sha512-AV9ROqlNqoZEIJGfm1ncNjEXfkz2hdFlZf0qkVfmkwdKa8vj7H16YUOT81rJw1rdFhyEDlN2Tds91p/glzbl5A==" - }, - "node_modules/maplibre-gl/node_modules/potpack": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/potpack/-/potpack-2.0.0.tgz", - "integrity": "sha512-Q+/tYsFU9r7xoOJ+y/ZTtdVQwTWfzjbiXBDMM/JKUux3+QPP02iUuIoeBQ+Ot6oEDlC+/PGjB/5A3K7KKb7hcw==" - }, - "node_modules/maplibre-gl/node_modules/quickselect": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-3.0.0.tgz", - "integrity": "sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==" - }, - "node_modules/maplibre-gl/node_modules/supercluster": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/supercluster/-/supercluster-8.0.1.tgz", - "integrity": "sha512-IiOea5kJ9iqzD2t7QJq/cREyLHTtSmUT6gQsweojg9WH2sYJqZK9SswTu6jrscO6D1G5v5vYZ9ru/eq85lXeZQ==", - "dependencies": { - "kdbush": "^4.0.2" - } - }, - "node_modules/maplibre-gl/node_modules/tinyqueue": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-3.0.0.tgz", - "integrity": "sha512-gRa9gwYU3ECmQYv3lslts5hxuIa90veaEcxDYuu3QGOIAEM2mOZkVHp48ANJuu1CURtRdHKUBY5Lm1tHV+sD4g==" + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/earcut/-/earcut-3.2.3.tgz", + "integrity": "sha512-vnS4AVwp1KHAF13i1vp1/2D5evWy3k5u/iW/B81QVsUZtV8cv2tU0b2VNFlqvh4kYwrFMDdjPCfAmfyJW9y14Q==", + "license": "ISC" }, "node_modules/math-log2": { "version": "1.0.1", @@ -3027,7 +2864,8 @@ "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "license": "MIT" }, "node_modules/murmurhash-js": { "version": "1.0.0", @@ -3061,6 +2899,7 @@ "version": "2.9.1", "resolved": "https://registry.npmjs.org/needle/-/needle-2.9.1.tgz", "integrity": "sha512-6R9fqJ5Zcmf+uYaFgdIHmLwNldn5HbK8L5ybn7Uz+ylX/rnOsSp1AHcvQSrCaFN+qNM1wpymHqD7mVasEOlHGQ==", + "license": "MIT", "dependencies": { "debug": "^3.2.6", "iconv-lite": "^0.4.4", @@ -3093,9 +2932,13 @@ "peer": true }, "node_modules/normalize-svg-path": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/normalize-svg-path/-/normalize-svg-path-0.1.0.tgz", - "integrity": "sha512-1/kmYej2iedi5+ROxkRESL/pI02pkg0OBnaR4hJkSIX6+ORzepwbuUXfrdZaPjysTsJInj0Rj5NuX027+dMBvA==" + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/normalize-svg-path/-/normalize-svg-path-1.1.0.tgz", + "integrity": "sha512-r9KHKG2UUeB5LoTouwDzBy2VxXlHsiM6fyLQvnJa0S5hrhzqElH/CH7TUGhT1fVvIYBIKf3OpY4YJ4CK+iaqHg==", + "license": "MIT", + "dependencies": { + "svg-arc-to-cubic-bezier": "^3.0.0" + } }, "node_modules/number-is-integer": { "version": "1.0.1", @@ -3138,9 +2981,10 @@ } }, "node_modules/parse-svg-path": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/parse-svg-path/-/parse-svg-path-0.1.2.tgz", - "integrity": "sha512-JyPSBnkTJ0AI8GGJLfMXvKq42cj5c006fnLz6fXy6zfoVjJizi8BNTpu8on8ziI1cKy9d9DGNuY17Ce7wuejpQ==" + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/parse-svg-path/-/parse-svg-path-0.2.0.tgz", + "integrity": "sha512-Tf7FFIrguPKQwzD4pWnYkR2VOv3raoHeKED80Bm+BYHI3KxC8KsgsGC5+fSMzAGDA6UEk4bHvmi+RsjmL3khpg==", + "license": "MIT" }, "node_modules/parse-unit": { "version": "1.0.1", @@ -3176,11 +3020,11 @@ } }, "node_modules/pbf": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/pbf/-/pbf-3.3.0.tgz", - "integrity": "sha512-XDF38WCH3z5OV/OVa8GKUNtLAyneuzbCisx7QUCF8Q6Nutx0WnJrQe5O+kOtBlLfRNUws98Y58Lblp+NJG5T4Q==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/pbf/-/pbf-4.0.2.tgz", + "integrity": "sha512-J0ajxARhZfpUEebxYs1vhMGMuLSXtBe1e+fFPDrf2uA2hgo+UshKfNUWOz92HJNz6/NFEXseQPddnHkTreWRqg==", + "license": "BSD-3-Clause", "dependencies": { - "ieee754": "^1.1.12", "resolve-protobuf-schema": "^2.1.0" }, "bin": { @@ -3204,23 +3048,21 @@ "dev": true }, "node_modules/plotly.js": { - "version": "4.0.0-rc.0", - "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-4.0.0-rc.0.tgz", - "integrity": "sha512-dKmF+zZhXzsaKgrwWmuI0B/nkcOW3g4RYM70yCBNKr7xMv0gyN37/YGuw9w/6wyJeCMQsWGocwQO97BFDIC+Tw==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/plotly.js/-/plotly.js-4.0.0.tgz", + "integrity": "sha512-HegSI/5zMSl0vqGfGubSaPgWviSMsIsCI8WjLjCh4W2WOgSfVl2LZ+qbzrRvdshxqUAXAwUnLp45jQ3ph3tzxw==", "license": "MIT", "dependencies": { "@plotly/d3": "3.8.2", "@plotly/d3-sankey": "0.12.3", "@plotly/d3-sankey-circular": "0.33.1", "@plotly/regl": "^2.1.2", - "@turf/area": "^7.1.0", - "@turf/centroid": "^7.1.0", - "@turf/meta": "^7.1.0", + "@turf/area": "^7.3.5", + "@turf/centroid": "^7.3.5", + "@turf/meta": "^7.3.5", "base64-arraybuffer": "^1.0.2", - "color": "^5.0.0", - "color-normalize": "1.5.0", - "color-rgba": "3.0.0", "country-iso-search": "^0.1.1", + "culori": "^4.0.2", "d3-force": "^1.2.1", "d3-format": "^1.4.5", "d3-geo": "^1.12.1", @@ -3228,26 +3070,26 @@ "d3-hierarchy": "^1.1.9", "d3-interpolate": "^3.0.1", "d3-time": "^1.1.0", - "d3-time-format": "^2.2.3", + "d3-time-format": "^2.3.0", "fast-isnumeric": "^1.1.4", "gl-mat4": "^1.2.0", "gl-text": "^1.4.0", "has-hover": "^1.0.1", "has-passive-events": "^1.0.0", - "is-mobile": "^4.0.0", - "maplibre-gl": "^4.7.1", + "is-mobile": "^5.0.0", + "maplibre-gl": "^5.24.0", "mouse-event-offset": "^3.0.2", "native-promise-only": "^0.8.1", - "parse-svg-path": "^0.1.2", + "parse-svg-path": "^0.2.0", "point-in-polygon": "^1.1.0", "polybooljs": "^1.2.2", - "probe-image-size": "^7.2.3", + "probe-image-size": "^7.3.0", "regl-error2d": "^2.0.12", "regl-line2d": "^3.1.3", - "regl-scatter2d": "^3.3.1", + "regl-scatter2d": "^3.4.0", "regl-splom": "^1.0.14", "strongly-connected-components": "^1.0.1", - "svg-path-sdf": "^1.1.3", + "svg-path-sdf": "^2.0.0", "topojson-client": "^3.1.0", "webgl-context": "^2.2.0", "world-calendars": "^1.0.4" @@ -3372,10 +3214,27 @@ "integrity": "sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==", "dev": true }, + "node_modules/potpack": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/potpack/-/potpack-2.1.0.tgz", + "integrity": "sha512-pcaShQc1Shq0y+E7GqJqvZj8DTthWV1KeHGdi0Z6IAin2Oi3JnLCOfwnCo84qc+HAp52wT9nK9H7FAJp5a44GQ==", + "license": "ISC" + }, "node_modules/probe-image-size": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/probe-image-size/-/probe-image-size-7.2.3.tgz", - "integrity": "sha512-HubhG4Rb2UH8YtV4ba0Vp5bQ7L78RTONYu/ujmCu5nBI8wGv24s4E9xSKBi0N1MowRpxk76pFCpJtW0KPzOK0w==", + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/probe-image-size/-/probe-image-size-7.4.0.tgz", + "integrity": "sha512-cdEprVtZxV+awMde9X+4jILBFYh4CARxVrQaMl4wY4YcPWbul9jntXrIW95NInBDyJwcVUP3U0T6yukN8rMBaQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/puzrin" + }, + { + "type": "github", + "url": "https://github.com/sponsors/nodeca" + } + ], + "license": "MIT", "dependencies": { "lodash.merge": "^4.6.2", "needle": "^2.5.2", @@ -3397,14 +3256,16 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" }, "node_modules/protocol-buffers-schema": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.0.tgz", - "integrity": "sha512-TdDRD+/QNdrCGCE7v8340QyuXd4kIWIgapsE2+n/SaGiSSbomYl4TjHlvIoCWRpE7wFt02EpB35VVA2ImcBVqw==" + "version": "3.6.1", + "resolved": "https://registry.npmjs.org/protocol-buffers-schema/-/protocol-buffers-schema-3.6.1.tgz", + "integrity": "sha512-VG2K63Igkiv9p76tk1lilczEK1cT+kCjKtkdhw1dQZV3k3IXJbd3o6Ho8b9zJZaHSnT2hKe4I+ObmX9w6m5SmQ==", + "license": "MIT" }, "node_modules/quickselect": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-2.0.0.tgz", - "integrity": "sha512-RKJ22hX8mHe3Y6wH/N3wCM6BWtjaxIyyUIkpHOvfFnxdI4yD4tBXEBKSbriGujF6jnSVkJrffuo6vxACiSSxIw==" + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/quickselect/-/quickselect-3.0.0.tgz", + "integrity": "sha512-XdjUArbK4Bm5fLLvlm5KpTFOiOThgfWWI4axAZDWg4E/0mKdZyI9tNEfds27qCi1ze/vwTR16kvmmGhRra3c2g==", + "license": "ISC" }, "node_modules/raf": { "version": "3.4.1", @@ -3487,44 +3348,23 @@ } }, "node_modules/regl-scatter2d": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/regl-scatter2d/-/regl-scatter2d-3.3.1.tgz", - "integrity": "sha512-seOmMIVwaCwemSYz/y4WE0dbSO9svNFSqtTh5RE57I7PjGo3tcUYKtH0MTSoshcAsreoqN8HoCtnn8wfHXXfKQ==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/regl-scatter2d/-/regl-scatter2d-3.4.0.tgz", + "integrity": "sha512-DavKQlHsI+iHZuLgOL+yGkg+sPd94CS+7FCBWkcQ6s/TbaNfUsF9eN591fjjSWIoKrGNfb/SEGhsXR5lXjqZ2w==", + "license": "MIT", "dependencies": { "@plotly/point-cluster": "^3.1.9", - "array-range": "^1.0.1", - "array-rearrange": "^2.2.2", - "clamp": "^1.0.1", + "array-bounds": "^1.0.1", "color-id": "^1.1.0", "color-normalize": "^1.5.0", - "color-rgba": "^2.1.1", "flatten-vertex-data": "^1.0.2", "glslify": "^7.0.0", - "is-iexplorer": "^1.0.0", - "object-assign": "^4.1.1", "parse-rect": "^1.2.0", "pick-by-alias": "^1.2.0", "to-float32": "^1.1.0", "update-diff": "^1.1.0" } }, - "node_modules/regl-scatter2d/node_modules/color-parse": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/color-parse/-/color-parse-1.4.3.tgz", - "integrity": "sha512-BADfVl/FHkQkyo8sRBwMYBqemqsgnu7JZAwUgvBvuwwuNUZAhSvLTbsEErS5bQXzOjDR0dWzJ4vXN2Q+QoPx0A==", - "dependencies": { - "color-name": "^1.0.0" - } - }, - "node_modules/regl-scatter2d/node_modules/color-rgba": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/color-rgba/-/color-rgba-2.4.0.tgz", - "integrity": "sha512-Nti4qbzr/z2LbUWySr7H9dk3Rl7gZt7ihHAxlgT4Ho90EXWkjtkL1avTleu9yeGuqrt/chxTB6GKK8nZZ6V0+Q==", - "dependencies": { - "color-parse": "^1.4.2", - "color-space": "^2.0.0" - } - }, "node_modules/regl-splom": { "version": "1.0.14", "resolved": "https://registry.npmjs.org/regl-splom/-/regl-splom-1.0.14.tgz", @@ -3572,15 +3412,11 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/resolve-protobuf-schema/-/resolve-protobuf-schema-2.1.0.tgz", "integrity": "sha512-kI5ffTiZWmJaS/huM8wZfEMer1eRd7oJQhDuxeCLe3t7N7mX3z94CN0xPxBQxFYQTSNz9T0i+v6inKqSdK8xrQ==", + "license": "MIT", "dependencies": { "protocol-buffers-schema": "^3.3.1" } }, - "node_modules/rw": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/rw/-/rw-1.3.3.tgz", - "integrity": "sha512-PdhdWy89SiZogBLaw42zdeqtRJ//zFd2PgQavcICDUgJT5oW10QCRKbJ6bg4r0/UY2M6BWd5tkxuGFRvCkgfHQ==" - }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -3603,12 +3439,17 @@ "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT" }, "node_modules/sax": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", - "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==" + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.6.1.tgz", + "integrity": "sha512-42tBVwLWnaQvW5zc4HbZrTuWccECCZfBi92FDuwtqxasH+JbPB3/FOKb1m222K42R4WxuxzzMsTswfzgtSu64Q==", + "license": "BlueOak-1.0.0", + "engines": { + "node": ">=11.0.0" + } }, "node_modules/schema-utils": { "version": "4.3.0", @@ -3718,6 +3559,7 @@ "version": "0.3.1", "resolved": "https://registry.npmjs.org/stream-parser/-/stream-parser-0.3.1.tgz", "integrity": "sha512-bJ/HgKq41nlKvlhccD5kaCr/P+Hu0wPNKPJOH7en+YrJu/9EgqUF+88w5Jb6KNcjOFMhfX4B2asfeAtIGuHObQ==", + "license": "MIT", "dependencies": { "debug": "2" } @@ -3726,6 +3568,7 @@ "version": "2.6.9", "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "license": "MIT", "dependencies": { "ms": "2.0.0" } @@ -3733,7 +3576,8 @@ "node_modules/stream-parser/node_modules/ms": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==" + "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", + "license": "MIT" }, "node_modules/stream-shift": { "version": "1.0.3", @@ -3792,12 +3636,14 @@ "node_modules/svg-arc-to-cubic-bezier": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/svg-arc-to-cubic-bezier/-/svg-arc-to-cubic-bezier-3.2.0.tgz", - "integrity": "sha512-djbJ/vZKZO+gPoSDThGNpKDO+o+bAeA4XQKovvkNCqnIS2t+S4qnLAGQhyyrulhCFRl1WWzAp0wUDV8PpTVU3g==" + "integrity": "sha512-djbJ/vZKZO+gPoSDThGNpKDO+o+bAeA4XQKovvkNCqnIS2t+S4qnLAGQhyyrulhCFRl1WWzAp0wUDV8PpTVU3g==", + "license": "ISC" }, "node_modules/svg-path-bounds": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/svg-path-bounds/-/svg-path-bounds-1.0.2.tgz", "integrity": "sha512-H4/uAgLWrppIC0kHsb2/dWUYSmb4GE5UqH06uqWBcg6LBjX2fu0A8+JrO2/FJPZiSsNOKZAhyFFgsLTdYUvSqQ==", + "license": "MIT", "dependencies": { "abs-svg-path": "^0.1.1", "is-svg-path": "^1.0.1", @@ -3805,26 +3651,30 @@ "parse-svg-path": "^0.1.2" } }, - "node_modules/svg-path-bounds/node_modules/normalize-svg-path": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/normalize-svg-path/-/normalize-svg-path-1.1.0.tgz", - "integrity": "sha512-r9KHKG2UUeB5LoTouwDzBy2VxXlHsiM6fyLQvnJa0S5hrhzqElH/CH7TUGhT1fVvIYBIKf3OpY4YJ4CK+iaqHg==", - "dependencies": { - "svg-arc-to-cubic-bezier": "^3.0.0" - } + "node_modules/svg-path-bounds/node_modules/parse-svg-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/parse-svg-path/-/parse-svg-path-0.1.2.tgz", + "integrity": "sha512-JyPSBnkTJ0AI8GGJLfMXvKq42cj5c006fnLz6fXy6zfoVjJizi8BNTpu8on8ziI1cKy9d9DGNuY17Ce7wuejpQ==", + "license": "MIT" }, "node_modules/svg-path-sdf": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/svg-path-sdf/-/svg-path-sdf-1.1.3.tgz", - "integrity": "sha512-vJJjVq/R5lSr2KLfVXVAStktfcfa1pNFjFOgyJnzZFXlO/fDZ5DmM8FpnSKKzLPfEYTVeXuVBTHF296TpxuJVg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/svg-path-sdf/-/svg-path-sdf-2.0.0.tgz", + "integrity": "sha512-vcYvz5ZR0hxZvuJE3ft4StgkpuSBPUrrfWdkTRtDhGZ1v+Qel64Sk/uZwYhxWYkjj2WTCMeaM2VYdE/bZR1tjg==", + "license": "MIT", "dependencies": { "bitmap-sdf": "^1.0.0", - "draw-svg-path": "^1.0.0", "is-svg-path": "^1.0.1", "parse-svg-path": "^0.1.2", "svg-path-bounds": "^1.0.1" } }, + "node_modules/svg-path-sdf/node_modules/parse-svg-path": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/parse-svg-path/-/parse-svg-path-0.1.2.tgz", + "integrity": "sha512-JyPSBnkTJ0AI8GGJLfMXvKq42cj5c006fnLz6fXy6zfoVjJizi8BNTpu8on8ziI1cKy9d9DGNuY17Ce7wuejpQ==", + "license": "MIT" + }, "node_modules/tapable": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz", @@ -3918,6 +3768,12 @@ "xtend": "~4.0.1" } }, + "node_modules/tinyqueue": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/tinyqueue/-/tinyqueue-3.0.0.tgz", + "integrity": "sha512-gRa9gwYU3ECmQYv3lslts5hxuIa90veaEcxDYuu3QGOIAEM2mOZkVHp48ANJuu1CURtRdHKUBY5Lm1tHV+sD4g==", + "license": "ISC" + }, "node_modules/to-float32": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/to-float32/-/to-float32-1.1.0.tgz", @@ -4048,16 +3904,6 @@ "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, - "node_modules/vt-pbf": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/vt-pbf/-/vt-pbf-3.1.3.tgz", - "integrity": "sha512-2LzDFzt0mZKZ9IpVF2r69G9bXaP2Q2sArJCmcCgvfTdCCZzSyz4aCLoQyUilu37Ll56tCblIZrXFIjNUpGIlmA==", - "dependencies": { - "@mapbox/point-geometry": "0.1.0", - "@mapbox/vector-tile": "^1.3.1", - "pbf": "^3.2.1" - } - }, "node_modules/watchpack": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.4.2.tgz", @@ -4169,20 +4015,6 @@ "node": ">=10.13.0" } }, - "node_modules/which": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/which/-/which-4.0.0.tgz", - "integrity": "sha512-GlaYyEb07DPxYCKhKzplCWBJtvxZcZMrL+4UkrTSJHHPyZU4mYYTv3qaOe77H7EODLSSopAUFAc6W8U4yqvscg==", - "dependencies": { - "isexe": "^3.1.1" - }, - "bin": { - "node-which": "bin/which.js" - }, - "engines": { - "node": "^16.13.0 || >=18.0.0" - } - }, "node_modules/wildcard": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.1.tgz", diff --git a/js/package.json b/js/package.json index f54ed733d0..57cb3c95c3 100644 --- a/js/package.json +++ b/js/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "lodash-es": "^4.17.21", - "plotly.js": "4.0.0-rc.0", + "plotly.js": "4.0.0", "@lumino/widgets": "~2.4.0" }, "devDependencies": { diff --git a/plotly/graph_objs/_box.py b/plotly/graph_objs/_box.py index 06c2e28e0a..a63f433de4 100644 --- a/plotly/graph_objs/_box.py +++ b/plotly/graph_objs/_box.py @@ -224,8 +224,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_carpet.py b/plotly/graph_objs/_carpet.py index cc79584aa4..5726b5c8ce 100644 --- a/plotly/graph_objs/_carpet.py +++ b/plotly/graph_objs/_carpet.py @@ -210,8 +210,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_contour.py b/plotly/graph_objs/_contour.py index b387db2ddd..9ad16f0805 100644 --- a/plotly/graph_objs/_contour.py +++ b/plotly/graph_objs/_contour.py @@ -325,8 +325,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to contour.colorscale diff --git a/plotly/graph_objs/_contourcarpet.py b/plotly/graph_objs/_contourcarpet.py index ffc12c3b45..cfd12f4e5f 100644 --- a/plotly/graph_objs/_contourcarpet.py +++ b/plotly/graph_objs/_contourcarpet.py @@ -424,8 +424,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to contourcarpet.colorscale diff --git a/plotly/graph_objs/_figure.py b/plotly/graph_objs/_figure.py index 22b68f46be..1c452a6e53 100644 --- a/plotly/graph_objs/_figure.py +++ b/plotly/graph_objs/_figure.py @@ -10872,7 +10872,7 @@ def add_pie( def add_quiver( self, anchor=None, - anglemode=None, + arrowref=None, customdata=None, dx=None, dy=None, @@ -10885,6 +10885,8 @@ def add_quiver( legendgrouptitle=None, legendrank=None, legendwidth=None, + lengthfactor=None, + lengthmode=None, marker=None, meta=None, name=None, @@ -10892,8 +10894,6 @@ def add_quiver( selected=None, selectedpoints=None, showlegend=None, - sizemode=None, - sizeref=None, text=None, textfont=None, textposition=None, @@ -10930,15 +10930,15 @@ def add_quiver( Parameters ---------- anchor - Sets the arrows' anchor with respect to their (x,y) - positions. Use "tail" to place (x,y) at the base, "tip" - to place (x,y) at the head, or "center" to center the - arrow on (x,y). - anglemode - Sets the mode used to determine the angle of the arrow - vectors. If "paper", u/v are interpreted in pixel + Sets the vector arrows' anchor with respect to their + (x,y) positions. Use "tail" to place (x,y) at the base, + "tip" to place (x,y) at the head, or "center" to center + the vector arrow on (x,y). + arrowref + Determines how the u/v vector components are + interpreted. If "paper", u/v are interpreted in pixel coordinates and the rendered vector angle does not - change regardless of the axes scales. If "data", u/v + change regardless of the axis scales. If "data", u/v are interpreted in data coordinates and the rendered vector angle may change, e.g. if zooming in along a single axis @@ -11026,6 +11026,17 @@ def add_quiver( legendwidth Sets the width (in px or fraction) of the legend for this trace. + lengthfactor + Adjusts the drawn length of the vector arrows. The + arrow length is determined by the values of u and v, + then optionally rescaled when `lengthmode` is "scaled", + then multiplied by `lengthfactor`. + lengthmode + Determines whether vector arrows are drawn according to + their raw lengths, or scaled based on the maximum + vector length and point density. Note: When `arrowref` + is "paper" vectors are always scaled and `lengthmode` + "raw" is ignored. marker :class:`plotly.graph_objects.quiver.Marker` instance or dict with compatible properties @@ -11060,17 +11071,6 @@ def add_quiver( showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - sizemode - Determines whether arrows are drawn according to their - raw lengths, or scaled based on the maximum vector - length and point density. Note: When `anglemode` is - "data" arrows are alwyas scaled and `sizemode` "raw" is - ignored. - sizeref - Adjusts the arrow size scaling. The arrow length is - determined by the vector norm multiplied by `sizeref`, - optionally normalized when `sizemode` is "scaled" - (`sizeref` is applied after scaling). text Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the @@ -11085,7 +11085,7 @@ def add_quiver( Sets the positions of the `text` elements with respects to the (x,y) coordinates. u - Sets the x components of the arrow vectors. + Sets the x components of the vector arrows. uhoverformat Sets the hover text formatting rule for `u` using d3 formatting mini-languages which are very similar to @@ -11118,7 +11118,7 @@ def add_quiver( :class:`plotly.graph_objects.quiver.Unselected` instance or dict with compatible properties v - Sets the y components of the arrow vectors. + Sets the y components of the vector arrows. vhoverformat Sets the hover text formatting rule for `v` using d3 formatting mini-languages which are very similar to @@ -11131,7 +11131,7 @@ def add_quiver( a legend item (provided that the legend itself is visible). x - Sets the x coordinates of the arrow locations. + Sets the x coordinates of the vector arrow locations. x0 Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting @@ -11155,7 +11155,7 @@ def add_quiver( display *09~15~23.46*By default the values are formatted using `xaxis.hoverformat`. y - Sets the y coordinates of the arrow locations. + Sets the y coordinates of the vector arrow locations. y0 Alternate to `y`. Builds a linear space of y coordinates. Use with `dy` where `y0` is the starting @@ -11207,7 +11207,7 @@ def add_quiver( new_trace = Quiver( anchor=anchor, - anglemode=anglemode, + arrowref=arrowref, customdata=customdata, dx=dx, dy=dy, @@ -11220,6 +11220,8 @@ def add_quiver( legendgrouptitle=legendgrouptitle, legendrank=legendrank, legendwidth=legendwidth, + lengthfactor=lengthfactor, + lengthmode=lengthmode, marker=marker, meta=meta, name=name, @@ -11227,8 +11229,6 @@ def add_quiver( selected=selected, selectedpoints=selectedpoints, showlegend=showlegend, - sizemode=sizemode, - sizeref=sizeref, text=text, textfont=textfont, textposition=textposition, @@ -11256,6 +11256,7 @@ def add_sankey( self, arrangement=None, customdata=None, + direction=None, domain=None, hoverinfo=None, hoverlabel=None, @@ -11303,6 +11304,12 @@ def add_sankey( listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements + direction + Sets the direction of the flow along the `orientation` + axis. With `forward` (the default), sources are on the + left (horizontal) or top (vertical). With `reversed`, + sources are on the right (horizontal) or bottom + (vertical). domain :class:`plotly.graph_objects.sankey.Domain` instance or dict with compatible properties @@ -11364,7 +11371,10 @@ def add_sankey( node The nodes of the Sankey plot. orientation - Sets the orientation of the Sankey diagram. + Sets the orientation of the Sankey diagram. With `h` + (the default), the flow runs horizontally. With `v`, + the flow runs vertically. Use `direction` to control + which side the sources are placed on. selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -11430,6 +11440,7 @@ def add_sankey( new_trace = Sankey( arrangement=arrangement, customdata=customdata, + direction=direction, domain=domain, hoverinfo=hoverinfo, hoverlabel=hoverlabel, diff --git a/plotly/graph_objs/_figurewidget.py b/plotly/graph_objs/_figurewidget.py index c77308f706..4e2259a5f7 100644 --- a/plotly/graph_objs/_figurewidget.py +++ b/plotly/graph_objs/_figurewidget.py @@ -10874,7 +10874,7 @@ def add_pie( def add_quiver( self, anchor=None, - anglemode=None, + arrowref=None, customdata=None, dx=None, dy=None, @@ -10887,6 +10887,8 @@ def add_quiver( legendgrouptitle=None, legendrank=None, legendwidth=None, + lengthfactor=None, + lengthmode=None, marker=None, meta=None, name=None, @@ -10894,8 +10896,6 @@ def add_quiver( selected=None, selectedpoints=None, showlegend=None, - sizemode=None, - sizeref=None, text=None, textfont=None, textposition=None, @@ -10932,15 +10932,15 @@ def add_quiver( Parameters ---------- anchor - Sets the arrows' anchor with respect to their (x,y) - positions. Use "tail" to place (x,y) at the base, "tip" - to place (x,y) at the head, or "center" to center the - arrow on (x,y). - anglemode - Sets the mode used to determine the angle of the arrow - vectors. If "paper", u/v are interpreted in pixel + Sets the vector arrows' anchor with respect to their + (x,y) positions. Use "tail" to place (x,y) at the base, + "tip" to place (x,y) at the head, or "center" to center + the vector arrow on (x,y). + arrowref + Determines how the u/v vector components are + interpreted. If "paper", u/v are interpreted in pixel coordinates and the rendered vector angle does not - change regardless of the axes scales. If "data", u/v + change regardless of the axis scales. If "data", u/v are interpreted in data coordinates and the rendered vector angle may change, e.g. if zooming in along a single axis @@ -11028,6 +11028,17 @@ def add_quiver( legendwidth Sets the width (in px or fraction) of the legend for this trace. + lengthfactor + Adjusts the drawn length of the vector arrows. The + arrow length is determined by the values of u and v, + then optionally rescaled when `lengthmode` is "scaled", + then multiplied by `lengthfactor`. + lengthmode + Determines whether vector arrows are drawn according to + their raw lengths, or scaled based on the maximum + vector length and point density. Note: When `arrowref` + is "paper" vectors are always scaled and `lengthmode` + "raw" is ignored. marker :class:`plotly.graph_objects.quiver.Marker` instance or dict with compatible properties @@ -11062,17 +11073,6 @@ def add_quiver( showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - sizemode - Determines whether arrows are drawn according to their - raw lengths, or scaled based on the maximum vector - length and point density. Note: When `anglemode` is - "data" arrows are alwyas scaled and `sizemode` "raw" is - ignored. - sizeref - Adjusts the arrow size scaling. The arrow length is - determined by the vector norm multiplied by `sizeref`, - optionally normalized when `sizemode` is "scaled" - (`sizeref` is applied after scaling). text Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the @@ -11087,7 +11087,7 @@ def add_quiver( Sets the positions of the `text` elements with respects to the (x,y) coordinates. u - Sets the x components of the arrow vectors. + Sets the x components of the vector arrows. uhoverformat Sets the hover text formatting rule for `u` using d3 formatting mini-languages which are very similar to @@ -11120,7 +11120,7 @@ def add_quiver( :class:`plotly.graph_objects.quiver.Unselected` instance or dict with compatible properties v - Sets the y components of the arrow vectors. + Sets the y components of the vector arrows. vhoverformat Sets the hover text formatting rule for `v` using d3 formatting mini-languages which are very similar to @@ -11133,7 +11133,7 @@ def add_quiver( a legend item (provided that the legend itself is visible). x - Sets the x coordinates of the arrow locations. + Sets the x coordinates of the vector arrow locations. x0 Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting @@ -11157,7 +11157,7 @@ def add_quiver( display *09~15~23.46*By default the values are formatted using `xaxis.hoverformat`. y - Sets the y coordinates of the arrow locations. + Sets the y coordinates of the vector arrow locations. y0 Alternate to `y`. Builds a linear space of y coordinates. Use with `dy` where `y0` is the starting @@ -11209,7 +11209,7 @@ def add_quiver( new_trace = Quiver( anchor=anchor, - anglemode=anglemode, + arrowref=arrowref, customdata=customdata, dx=dx, dy=dy, @@ -11222,6 +11222,8 @@ def add_quiver( legendgrouptitle=legendgrouptitle, legendrank=legendrank, legendwidth=legendwidth, + lengthfactor=lengthfactor, + lengthmode=lengthmode, marker=marker, meta=meta, name=name, @@ -11229,8 +11231,6 @@ def add_quiver( selected=selected, selectedpoints=selectedpoints, showlegend=showlegend, - sizemode=sizemode, - sizeref=sizeref, text=text, textfont=textfont, textposition=textposition, @@ -11258,6 +11258,7 @@ def add_sankey( self, arrangement=None, customdata=None, + direction=None, domain=None, hoverinfo=None, hoverlabel=None, @@ -11305,6 +11306,12 @@ def add_sankey( listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements + direction + Sets the direction of the flow along the `orientation` + axis. With `forward` (the default), sources are on the + left (horizontal) or top (vertical). With `reversed`, + sources are on the right (horizontal) or bottom + (vertical). domain :class:`plotly.graph_objects.sankey.Domain` instance or dict with compatible properties @@ -11366,7 +11373,10 @@ def add_sankey( node The nodes of the Sankey plot. orientation - Sets the orientation of the Sankey diagram. + Sets the orientation of the Sankey diagram. With `h` + (the default), the flow runs horizontally. With `v`, + the flow runs vertically. Use `direction` to control + which side the sources are placed on. selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -11432,6 +11442,7 @@ def add_sankey( new_trace = Sankey( arrangement=arrangement, customdata=customdata, + direction=direction, domain=domain, hoverinfo=hoverinfo, hoverlabel=hoverlabel, diff --git a/plotly/graph_objs/_layout.py b/plotly/graph_objs/_layout.py index 124ff58e3d..11c340e5cc 100644 --- a/plotly/graph_objs/_layout.py +++ b/plotly/graph_objs/_layout.py @@ -472,7 +472,9 @@ def clickanywhere(self): within the plot area, not just over traces. When clicking where there is no trace data, the event will have an empty `points` array but will include `xvals` and `yvals` with click - coordinates in data space. + coordinates in data space, and `xPixel` and `yPixel` with click + coordinates in pixels, relative to the top-left corner of the + graph div. The 'clickanywhere' property is a boolean and must be specified as: - A boolean value: True or False @@ -974,7 +976,10 @@ def hoveranywhere(self): position within the plot area, not just over traces. When the cursor is not over a trace, the event will have an empty `points` array but will include `xvals` and `yvals` with cursor - coordinates in data space. + coordinates in data space, and `xPixel` and `yPixel` with + cursor coordinates in pixels, relative to the top-left corner + of the graph div. A `plotly_unhover` event fires when the + cursor leaves the plot area. The 'hoveranywhere' property is a boolean and must be specified as: - A boolean value: True or False @@ -1364,8 +1369,11 @@ def paper_bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -1412,8 +1420,11 @@ def plot_bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -2267,7 +2278,9 @@ def _prop_descriptions(self): When clicking where there is no trace data, the event will have an empty `points` array but will include `xvals` and `yvals` with click coordinates in data - space. + space, and `xPixel` and `yPixel` with click coordinates + in pixels, relative to the top-left corner of the graph + div. clickmode Determines the mode of single click interactions. "event" is the default value and emits the @@ -2400,7 +2413,11 @@ def _prop_descriptions(self): position within the plot area, not just over traces. When the cursor is not over a trace, the event will have an empty `points` array but will include `xvals` - and `yvals` with cursor coordinates in data space. + and `yvals` with cursor coordinates in data space, and + `xPixel` and `yPixel` with cursor coordinates in + pixels, relative to the top-left corner of the graph + div. A `plotly_unhover` event fires when the cursor + leaves the plot area. hoverdistance Sets the default distance (in pixels) to look for data to add hover labels (-1 means no cutoff, 0 means no @@ -2870,7 +2887,9 @@ def __init__( When clicking where there is no trace data, the event will have an empty `points` array but will include `xvals` and `yvals` with click coordinates in data - space. + space, and `xPixel` and `yPixel` with click coordinates + in pixels, relative to the top-left corner of the graph + div. clickmode Determines the mode of single click interactions. "event" is the default value and emits the @@ -3003,7 +3022,11 @@ def __init__( position within the plot area, not just over traces. When the cursor is not over a trace, the event will have an empty `points` array but will include `xvals` - and `yvals` with cursor coordinates in data space. + and `yvals` with cursor coordinates in data space, and + `xPixel` and `yPixel` with cursor coordinates in + pixels, relative to the top-left corner of the graph + div. A `plotly_unhover` event fires when the cursor + leaves the plot area. hoverdistance Sets the default distance (in pixels) to look for data to add hover labels (-1 means no cutoff, 0 means no diff --git a/plotly/graph_objs/_mesh3d.py b/plotly/graph_objs/_mesh3d.py index 4ccf5f5648..1df2f00ad7 100644 --- a/plotly/graph_objs/_mesh3d.py +++ b/plotly/graph_objs/_mesh3d.py @@ -216,8 +216,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to mesh3d.colorscale diff --git a/plotly/graph_objs/_quiver.py b/plotly/graph_objs/_quiver.py index 9afafa1cdc..ebd83830a3 100644 --- a/plotly/graph_objs/_quiver.py +++ b/plotly/graph_objs/_quiver.py @@ -10,7 +10,7 @@ class Quiver(_BaseTraceType): _path_str = "quiver" _valid_props = { "anchor", - "anglemode", + "arrowref", "customdata", "dx", "dy", @@ -23,6 +23,8 @@ class Quiver(_BaseTraceType): "legendgrouptitle", "legendrank", "legendwidth", + "lengthfactor", + "lengthmode", "marker", "meta", "name", @@ -30,8 +32,6 @@ class Quiver(_BaseTraceType): "selected", "selectedpoints", "showlegend", - "sizemode", - "sizeref", "text", "textfont", "textposition", @@ -57,9 +57,10 @@ class Quiver(_BaseTraceType): @property def anchor(self): """ - Sets the arrows' anchor with respect to their (x,y) positions. - Use "tail" to place (x,y) at the base, "tip" to place (x,y) at - the head, or "center" to center the arrow on (x,y). + Sets the vector arrows' anchor with respect to their (x,y) + positions. Use "tail" to place (x,y) at the base, "tip" to + place (x,y) at the head, or "center" to center the vector arrow + on (x,y). The 'anchor' property is an enumeration that may be specified as: - One of the following enumeration values: @@ -76,16 +77,16 @@ def anchor(self, val): self["anchor"] = val @property - def anglemode(self): + def arrowref(self): """ - Sets the mode used to determine the angle of the arrow vectors. - If "paper", u/v are interpreted in pixel coordinates and the - rendered vector angle does not change regardless of the axes + Determines how the u/v vector components are interpreted. If + "paper", u/v are interpreted in pixel coordinates and the + rendered vector angle does not change regardless of the axis scales. If "data", u/v are interpreted in data coordinates and the rendered vector angle may change, e.g. if zooming in along a single axis - The 'anglemode' property is an enumeration that may be specified as: + The 'arrowref' property is an enumeration that may be specified as: - One of the following enumeration values: ['paper', 'data'] @@ -93,11 +94,11 @@ def anglemode(self): ------- Any """ - return self["anglemode"] + return self["arrowref"] - @anglemode.setter - def anglemode(self, val): - self["anglemode"] = val + @arrowref.setter + def arrowref(self, val): + self["arrowref"] = val @property def customdata(self): @@ -374,6 +375,49 @@ def legendwidth(self): def legendwidth(self, val): self["legendwidth"] = val + @property + def lengthfactor(self): + """ + Adjusts the drawn length of the vector arrows. The arrow length + is determined by the values of u and v, then optionally + rescaled when `lengthmode` is "scaled", then multiplied by + `lengthfactor`. + + The 'lengthfactor' property is a number and may be specified as: + - An int or float in the interval [0, inf] + + Returns + ------- + int|float + """ + return self["lengthfactor"] + + @lengthfactor.setter + def lengthfactor(self, val): + self["lengthfactor"] = val + + @property + def lengthmode(self): + """ + Determines whether vector arrows are drawn according to their + raw lengths, or scaled based on the maximum vector length and + point density. Note: When `arrowref` is "paper" vectors are + always scaled and `lengthmode` "raw" is ignored. + + The 'lengthmode' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['scaled', 'raw'] + + Returns + ------- + Any + """ + return self["lengthmode"] + + @lengthmode.setter + def lengthmode(self, val): + self["lengthmode"] = val + @property def marker(self): """ @@ -517,49 +561,6 @@ def showlegend(self): def showlegend(self, val): self["showlegend"] = val - @property - def sizemode(self): - """ - Determines whether arrows are drawn according to their raw - lengths, or scaled based on the maximum vector length and point - density. Note: When `anglemode` is "data" arrows are alwyas - scaled and `sizemode` "raw" is ignored. - - The 'sizemode' property is an enumeration that may be specified as: - - One of the following enumeration values: - ['scaled', 'raw'] - - Returns - ------- - Any - """ - return self["sizemode"] - - @sizemode.setter - def sizemode(self, val): - self["sizemode"] = val - - @property - def sizeref(self): - """ - Adjusts the arrow size scaling. The arrow length is determined - by the vector norm multiplied by `sizeref`, optionally - normalized when `sizemode` is "scaled" (`sizeref` is applied - after scaling). - - 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 - @property def text(self): """ @@ -632,7 +633,7 @@ def textposition(self, val): @property def u(self): """ - Sets the x components of the arrow vectors. + Sets the x components of the vector arrows. The 'u' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -743,7 +744,7 @@ def unselected(self, val): @property def v(self): """ - Sets the y components of the arrow vectors. + Sets the y components of the vector arrows. The 'v' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -805,7 +806,7 @@ def visible(self, val): @property def x(self): """ - Sets the x coordinates of the arrow locations. + Sets the x coordinates of the vector arrow locations. The 'x' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -894,7 +895,7 @@ def xhoverformat(self, val): @property def y(self): """ - Sets the y coordinates of the arrow locations. + Sets the y coordinates of the vector arrow locations. The 'y' property is an array that may be specified as a tuple, list, numpy array, or pandas Series @@ -988,15 +989,15 @@ def type(self): def _prop_descriptions(self): return """\ anchor - Sets the arrows' anchor with respect to their (x,y) - positions. Use "tail" to place (x,y) at the base, "tip" - to place (x,y) at the head, or "center" to center the - arrow on (x,y). - anglemode - Sets the mode used to determine the angle of the arrow - vectors. If "paper", u/v are interpreted in pixel + Sets the vector arrows' anchor with respect to their + (x,y) positions. Use "tail" to place (x,y) at the base, + "tip" to place (x,y) at the head, or "center" to center + the vector arrow on (x,y). + arrowref + Determines how the u/v vector components are + interpreted. If "paper", u/v are interpreted in pixel coordinates and the rendered vector angle does not - change regardless of the axes scales. If "data", u/v + change regardless of the axis scales. If "data", u/v are interpreted in data coordinates and the rendered vector angle may change, e.g. if zooming in along a single axis @@ -1084,6 +1085,17 @@ def _prop_descriptions(self): legendwidth Sets the width (in px or fraction) of the legend for this trace. + lengthfactor + Adjusts the drawn length of the vector arrows. The + arrow length is determined by the values of u and v, + then optionally rescaled when `lengthmode` is "scaled", + then multiplied by `lengthfactor`. + lengthmode + Determines whether vector arrows are drawn according to + their raw lengths, or scaled based on the maximum + vector length and point density. Note: When `arrowref` + is "paper" vectors are always scaled and `lengthmode` + "raw" is ignored. marker :class:`plotly.graph_objects.quiver.Marker` instance or dict with compatible properties @@ -1118,17 +1130,6 @@ def _prop_descriptions(self): showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - sizemode - Determines whether arrows are drawn according to their - raw lengths, or scaled based on the maximum vector - length and point density. Note: When `anglemode` is - "data" arrows are alwyas scaled and `sizemode` "raw" is - ignored. - sizeref - Adjusts the arrow size scaling. The arrow length is - determined by the vector norm multiplied by `sizeref`, - optionally normalized when `sizemode` is "scaled" - (`sizeref` is applied after scaling). text Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the @@ -1143,7 +1144,7 @@ def _prop_descriptions(self): Sets the positions of the `text` elements with respects to the (x,y) coordinates. u - Sets the x components of the arrow vectors. + Sets the x components of the vector arrows. uhoverformat Sets the hover text formatting rule for `u` using d3 formatting mini-languages which are very similar to @@ -1176,7 +1177,7 @@ def _prop_descriptions(self): :class:`plotly.graph_objects.quiver.Unselected` instance or dict with compatible properties v - Sets the y components of the arrow vectors. + Sets the y components of the vector arrows. vhoverformat Sets the hover text formatting rule for `v` using d3 formatting mini-languages which are very similar to @@ -1189,7 +1190,7 @@ def _prop_descriptions(self): a legend item (provided that the legend itself is visible). x - Sets the x coordinates of the arrow locations. + Sets the x coordinates of the vector arrow locations. x0 Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting @@ -1213,7 +1214,7 @@ def _prop_descriptions(self): display *09~15~23.46*By default the values are formatted using `xaxis.hoverformat`. y - Sets the y coordinates of the arrow locations. + Sets the y coordinates of the vector arrow locations. y0 Alternate to `y`. Builds a linear space of y coordinates. Use with `dy` where `y0` is the starting @@ -1242,7 +1243,7 @@ def __init__( self, arg=None, anchor=None, - anglemode=None, + arrowref=None, customdata=None, dx=None, dy=None, @@ -1255,6 +1256,8 @@ def __init__( legendgrouptitle=None, legendrank=None, legendwidth=None, + lengthfactor=None, + lengthmode=None, marker=None, meta=None, name=None, @@ -1262,8 +1265,6 @@ def __init__( selected=None, selectedpoints=None, showlegend=None, - sizemode=None, - sizeref=None, text=None, textfont=None, textposition=None, @@ -1300,15 +1301,15 @@ def __init__( dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.Quiver` anchor - Sets the arrows' anchor with respect to their (x,y) - positions. Use "tail" to place (x,y) at the base, "tip" - to place (x,y) at the head, or "center" to center the - arrow on (x,y). - anglemode - Sets the mode used to determine the angle of the arrow - vectors. If "paper", u/v are interpreted in pixel + Sets the vector arrows' anchor with respect to their + (x,y) positions. Use "tail" to place (x,y) at the base, + "tip" to place (x,y) at the head, or "center" to center + the vector arrow on (x,y). + arrowref + Determines how the u/v vector components are + interpreted. If "paper", u/v are interpreted in pixel coordinates and the rendered vector angle does not - change regardless of the axes scales. If "data", u/v + change regardless of the axis scales. If "data", u/v are interpreted in data coordinates and the rendered vector angle may change, e.g. if zooming in along a single axis @@ -1396,6 +1397,17 @@ def __init__( legendwidth Sets the width (in px or fraction) of the legend for this trace. + lengthfactor + Adjusts the drawn length of the vector arrows. The + arrow length is determined by the values of u and v, + then optionally rescaled when `lengthmode` is "scaled", + then multiplied by `lengthfactor`. + lengthmode + Determines whether vector arrows are drawn according to + their raw lengths, or scaled based on the maximum + vector length and point density. Note: When `arrowref` + is "paper" vectors are always scaled and `lengthmode` + "raw" is ignored. marker :class:`plotly.graph_objects.quiver.Marker` instance or dict with compatible properties @@ -1430,17 +1442,6 @@ def __init__( showlegend Determines whether or not an item corresponding to this trace is shown in the legend. - sizemode - Determines whether arrows are drawn according to their - raw lengths, or scaled based on the maximum vector - length and point density. Note: When `anglemode` is - "data" arrows are alwyas scaled and `sizemode` "raw" is - ignored. - sizeref - Adjusts the arrow size scaling. The arrow length is - determined by the vector norm multiplied by `sizeref`, - optionally normalized when `sizemode` is "scaled" - (`sizeref` is applied after scaling). text Sets text elements associated with each (x,y) pair. If a single string, the same string appears over all the @@ -1455,7 +1456,7 @@ def __init__( Sets the positions of the `text` elements with respects to the (x,y) coordinates. u - Sets the x components of the arrow vectors. + Sets the x components of the vector arrows. uhoverformat Sets the hover text formatting rule for `u` using d3 formatting mini-languages which are very similar to @@ -1488,7 +1489,7 @@ def __init__( :class:`plotly.graph_objects.quiver.Unselected` instance or dict with compatible properties v - Sets the y components of the arrow vectors. + Sets the y components of the vector arrows. vhoverformat Sets the hover text formatting rule for `v` using d3 formatting mini-languages which are very similar to @@ -1501,7 +1502,7 @@ def __init__( a legend item (provided that the legend itself is visible). x - Sets the x coordinates of the arrow locations. + Sets the x coordinates of the vector arrow locations. x0 Alternate to `x`. Builds a linear space of x coordinates. Use with `dx` where `x0` is the starting @@ -1525,7 +1526,7 @@ def __init__( display *09~15~23.46*By default the values are formatted using `xaxis.hoverformat`. y - Sets the y coordinates of the arrow locations. + Sets the y coordinates of the vector arrow locations. y0 Alternate to `y`. Builds a linear space of y coordinates. Use with `dy` where `y0` is the starting @@ -1574,7 +1575,7 @@ def __init__( self._validate = kwargs.pop("_validate", True) self._set_property("anchor", arg, anchor) - self._set_property("anglemode", arg, anglemode) + self._set_property("arrowref", arg, arrowref) self._set_property("customdata", arg, customdata) self._set_property("dx", arg, dx) self._set_property("dy", arg, dy) @@ -1587,6 +1588,8 @@ def __init__( self._set_property("legendgrouptitle", arg, legendgrouptitle) self._set_property("legendrank", arg, legendrank) self._set_property("legendwidth", arg, legendwidth) + self._set_property("lengthfactor", arg, lengthfactor) + self._set_property("lengthmode", arg, lengthmode) self._set_property("marker", arg, marker) self._set_property("meta", arg, meta) self._set_property("name", arg, name) @@ -1594,8 +1597,6 @@ def __init__( self._set_property("selected", arg, selected) self._set_property("selectedpoints", arg, selectedpoints) self._set_property("showlegend", arg, showlegend) - self._set_property("sizemode", arg, sizemode) - self._set_property("sizeref", arg, sizeref) self._set_property("text", arg, text) self._set_property("textfont", arg, textfont) self._set_property("textposition", arg, textposition) diff --git a/plotly/graph_objs/_sankey.py b/plotly/graph_objs/_sankey.py index 6f48f93515..b9022006bc 100644 --- a/plotly/graph_objs/_sankey.py +++ b/plotly/graph_objs/_sankey.py @@ -11,6 +11,7 @@ class Sankey(_BaseTraceType): _valid_props = { "arrangement", "customdata", + "direction", "domain", "hoverinfo", "hoverlabel", @@ -80,6 +81,28 @@ def customdata(self): def customdata(self, val): self["customdata"] = val + @property + def direction(self): + """ + Sets the direction of the flow along the `orientation` axis. + With `forward` (the default), sources are on the left + (horizontal) or top (vertical). With `reversed`, sources are on + the right (horizontal) or bottom (vertical). + + The 'direction' property is an enumeration that may be specified as: + - One of the following enumeration values: + ['forward', 'reversed'] + + Returns + ------- + Any + """ + return self["direction"] + + @direction.setter + def direction(self, val): + self["direction"] = val + @property def domain(self): """ @@ -340,7 +363,10 @@ def node(self, val): @property def orientation(self): """ - Sets the orientation of the Sankey diagram. + Sets the orientation of the Sankey diagram. With `h` (the + default), the flow runs horizontally. With `v`, the flow runs + vertically. Use `direction` to control which side the sources + are placed on. The 'orientation' property is an enumeration that may be specified as: - One of the following enumeration values: @@ -533,6 +559,12 @@ def _prop_descriptions(self): listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements + direction + Sets the direction of the flow along the `orientation` + axis. With `forward` (the default), sources are on the + left (horizontal) or top (vertical). With `reversed`, + sources are on the right (horizontal) or bottom + (vertical). domain :class:`plotly.graph_objects.sankey.Domain` instance or dict with compatible properties @@ -594,7 +626,10 @@ def _prop_descriptions(self): node The nodes of the Sankey plot. orientation - Sets the orientation of the Sankey diagram. + Sets the orientation of the Sankey diagram. With `h` + (the default), the flow runs horizontally. With `v`, + the flow runs vertically. Use `direction` to control + which side the sources are placed on. selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -647,6 +682,7 @@ def __init__( arg=None, arrangement=None, customdata=None, + direction=None, domain=None, hoverinfo=None, hoverlabel=None, @@ -695,6 +731,12 @@ def __init__( listening to hover, click and selection events. Note that, "scatter" traces also appends customdata items in the markers DOM elements + direction + Sets the direction of the flow along the `orientation` + axis. With `forward` (the default), sources are on the + left (horizontal) or top (vertical). With `reversed`, + sources are on the right (horizontal) or bottom + (vertical). domain :class:`plotly.graph_objects.sankey.Domain` instance or dict with compatible properties @@ -756,7 +798,10 @@ def __init__( node The nodes of the Sankey plot. orientation - Sets the orientation of the Sankey diagram. + Sets the orientation of the Sankey diagram. With `h` + (the default), the flow runs horizontally. With `v`, + the flow runs vertically. Use `direction` to control + which side the sources are placed on. selectedpoints Array containing integer indices of selected points. Has an effect only for traces that support selections. @@ -829,6 +874,7 @@ def __init__( self._set_property("arrangement", arg, arrangement) self._set_property("customdata", arg, customdata) + self._set_property("direction", arg, direction) self._set_property("domain", arg, domain) self._set_property("hoverinfo", arg, hoverinfo) self._set_property("hoverlabel", arg, hoverlabel) diff --git a/plotly/graph_objs/_scatter.py b/plotly/graph_objs/_scatter.py index f4cf48711c..d4c4f891ba 100644 --- a/plotly/graph_objs/_scatter.py +++ b/plotly/graph_objs/_scatter.py @@ -286,8 +286,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_scatter3d.py b/plotly/graph_objs/_scatter3d.py index 47aac00650..6ac1754404 100644 --- a/plotly/graph_objs/_scatter3d.py +++ b/plotly/graph_objs/_scatter3d.py @@ -635,8 +635,11 @@ def surfacecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_scattercarpet.py b/plotly/graph_objs/_scattercarpet.py index 63822cdd4d..dcad800261 100644 --- a/plotly/graph_objs/_scattercarpet.py +++ b/plotly/graph_objs/_scattercarpet.py @@ -190,8 +190,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_scattergeo.py b/plotly/graph_objs/_scattergeo.py index 2eee11a6ed..acae81456c 100644 --- a/plotly/graph_objs/_scattergeo.py +++ b/plotly/graph_objs/_scattergeo.py @@ -149,8 +149,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_scattergl.py b/plotly/graph_objs/_scattergl.py index d9cda413ef..1d8a06ff6b 100644 --- a/plotly/graph_objs/_scattergl.py +++ b/plotly/graph_objs/_scattergl.py @@ -231,8 +231,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_scattermap.py b/plotly/graph_objs/_scattermap.py index 37f90917a0..9b1d49b1de 100644 --- a/plotly/graph_objs/_scattermap.py +++ b/plotly/graph_objs/_scattermap.py @@ -166,8 +166,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_scatterpolar.py b/plotly/graph_objs/_scatterpolar.py index 8365008626..3c3ff54644 100644 --- a/plotly/graph_objs/_scatterpolar.py +++ b/plotly/graph_objs/_scatterpolar.py @@ -195,8 +195,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_scatterpolargl.py b/plotly/graph_objs/_scatterpolargl.py index 9210ef4534..93b017b0ca 100644 --- a/plotly/graph_objs/_scatterpolargl.py +++ b/plotly/graph_objs/_scatterpolargl.py @@ -183,8 +183,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_scattersmith.py b/plotly/graph_objs/_scattersmith.py index c7e403e7e4..34b5c49d79 100644 --- a/plotly/graph_objs/_scattersmith.py +++ b/plotly/graph_objs/_scattersmith.py @@ -152,8 +152,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_scatterternary.py b/plotly/graph_objs/_scatterternary.py index 076bbb668c..579188482b 100644 --- a/plotly/graph_objs/_scatterternary.py +++ b/plotly/graph_objs/_scatterternary.py @@ -217,8 +217,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/_violin.py b/plotly/graph_objs/_violin.py index 3d28cf455f..7ae5f517e5 100644 --- a/plotly/graph_objs/_violin.py +++ b/plotly/graph_objs/_violin.py @@ -159,8 +159,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/bar/_error_x.py b/plotly/graph_objs/bar/_error_x.py index cf2dd4ef6b..8e5e9774d8 100644 --- a/plotly/graph_objs/bar/_error_x.py +++ b/plotly/graph_objs/bar/_error_x.py @@ -75,8 +75,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/bar/_error_y.py b/plotly/graph_objs/bar/_error_y.py index 35f15b7686..1179f91317 100644 --- a/plotly/graph_objs/bar/_error_y.py +++ b/plotly/graph_objs/bar/_error_y.py @@ -74,8 +74,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/bar/_hoverlabel.py b/plotly/graph_objs/bar/_hoverlabel.py index 1e810afb90..b0a29ce9fb 100644 --- a/plotly/graph_objs/bar/_hoverlabel.py +++ b/plotly/graph_objs/bar/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/bar/_insidetextfont.py b/plotly/graph_objs/bar/_insidetextfont.py index 5f57d9753b..85aff82684 100644 --- a/plotly/graph_objs/bar/_insidetextfont.py +++ b/plotly/graph_objs/bar/_insidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/bar/_marker.py b/plotly/graph_objs/bar/_marker.py index e109ad4ff4..353b327a8e 100644 --- a/plotly/graph_objs/bar/_marker.py +++ b/plotly/graph_objs/bar/_marker.py @@ -152,8 +152,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to bar.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/bar/_outsidetextfont.py b/plotly/graph_objs/bar/_outsidetextfont.py index 189cbd8647..de2ef17cf6 100644 --- a/plotly/graph_objs/bar/_outsidetextfont.py +++ b/plotly/graph_objs/bar/_outsidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/bar/_textfont.py b/plotly/graph_objs/bar/_textfont.py index 1c30dd8b8b..c0f26784c0 100644 --- a/plotly/graph_objs/bar/_textfont.py +++ b/plotly/graph_objs/bar/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/bar/hoverlabel/_font.py b/plotly/graph_objs/bar/hoverlabel/_font.py index 295a86bec0..b4656b3799 100644 --- a/plotly/graph_objs/bar/hoverlabel/_font.py +++ b/plotly/graph_objs/bar/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/bar/legendgrouptitle/_font.py b/plotly/graph_objs/bar/legendgrouptitle/_font.py index 0833f59028..4896e93a08 100644 --- a/plotly/graph_objs/bar/legendgrouptitle/_font.py +++ b/plotly/graph_objs/bar/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/bar/marker/_colorbar.py b/plotly/graph_objs/bar/marker/_colorbar.py index 3db8624c8d..c80b652e60 100644 --- a/plotly/graph_objs/bar/marker/_colorbar.py +++ b/plotly/graph_objs/bar/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/bar/marker/_line.py b/plotly/graph_objs/bar/marker/_line.py index 61e0f82215..92b01a992b 100644 --- a/plotly/graph_objs/bar/marker/_line.py +++ b/plotly/graph_objs/bar/marker/_line.py @@ -148,8 +148,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to bar.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/bar/marker/_pattern.py b/plotly/graph_objs/bar/marker/_pattern.py index d209f50937..b2a4c3e124 100644 --- a/plotly/graph_objs/bar/marker/_pattern.py +++ b/plotly/graph_objs/bar/marker/_pattern.py @@ -34,8 +34,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -63,8 +66,11 @@ def fgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/bar/marker/colorbar/_tickfont.py b/plotly/graph_objs/bar/marker/colorbar/_tickfont.py index 53d14dfd89..3caa4f7b74 100644 --- a/plotly/graph_objs/bar/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/bar/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/bar/marker/colorbar/title/_font.py b/plotly/graph_objs/bar/marker/colorbar/title/_font.py index fa7cdbde8c..3f47964318 100644 --- a/plotly/graph_objs/bar/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/bar/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/bar/selected/_marker.py b/plotly/graph_objs/bar/selected/_marker.py index ada2ffa935..0efa8a4be9 100644 --- a/plotly/graph_objs/bar/selected/_marker.py +++ b/plotly/graph_objs/bar/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/bar/selected/_textfont.py b/plotly/graph_objs/bar/selected/_textfont.py index 4c1db09e62..f9407d70d9 100644 --- a/plotly/graph_objs/bar/selected/_textfont.py +++ b/plotly/graph_objs/bar/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/bar/unselected/_marker.py b/plotly/graph_objs/bar/unselected/_marker.py index 274ce24354..64f87c2950 100644 --- a/plotly/graph_objs/bar/unselected/_marker.py +++ b/plotly/graph_objs/bar/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/bar/unselected/_textfont.py b/plotly/graph_objs/bar/unselected/_textfont.py index 6ed0bf2174..72e03e36c3 100644 --- a/plotly/graph_objs/bar/unselected/_textfont.py +++ b/plotly/graph_objs/bar/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/barpolar/_hoverlabel.py b/plotly/graph_objs/barpolar/_hoverlabel.py index 405ad0398e..ca116bd794 100644 --- a/plotly/graph_objs/barpolar/_hoverlabel.py +++ b/plotly/graph_objs/barpolar/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/barpolar/_marker.py b/plotly/graph_objs/barpolar/_marker.py index b53325f459..6e1a976e0d 100644 --- a/plotly/graph_objs/barpolar/_marker.py +++ b/plotly/graph_objs/barpolar/_marker.py @@ -151,8 +151,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to barpolar.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/barpolar/hoverlabel/_font.py b/plotly/graph_objs/barpolar/hoverlabel/_font.py index ba654fe8ed..e67de5e3ba 100644 --- a/plotly/graph_objs/barpolar/hoverlabel/_font.py +++ b/plotly/graph_objs/barpolar/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/barpolar/legendgrouptitle/_font.py b/plotly/graph_objs/barpolar/legendgrouptitle/_font.py index 74fce43b1c..f01489da13 100644 --- a/plotly/graph_objs/barpolar/legendgrouptitle/_font.py +++ b/plotly/graph_objs/barpolar/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/barpolar/marker/_colorbar.py b/plotly/graph_objs/barpolar/marker/_colorbar.py index 52f38cbe9a..dcef63c291 100644 --- a/plotly/graph_objs/barpolar/marker/_colorbar.py +++ b/plotly/graph_objs/barpolar/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/barpolar/marker/_line.py b/plotly/graph_objs/barpolar/marker/_line.py index af2736aefc..82e19a53ea 100644 --- a/plotly/graph_objs/barpolar/marker/_line.py +++ b/plotly/graph_objs/barpolar/marker/_line.py @@ -148,8 +148,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to barpolar.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/barpolar/marker/_pattern.py b/plotly/graph_objs/barpolar/marker/_pattern.py index 86d857c2d1..d4cd6336b0 100644 --- a/plotly/graph_objs/barpolar/marker/_pattern.py +++ b/plotly/graph_objs/barpolar/marker/_pattern.py @@ -34,8 +34,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -63,8 +66,11 @@ def fgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py b/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py index a86194ed37..d94e46e7ec 100644 --- a/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/barpolar/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py b/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py index 48d36f268f..c3409d639e 100644 --- a/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/barpolar/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/barpolar/selected/_marker.py b/plotly/graph_objs/barpolar/selected/_marker.py index ea46b08c78..d249b446a6 100644 --- a/plotly/graph_objs/barpolar/selected/_marker.py +++ b/plotly/graph_objs/barpolar/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/barpolar/selected/_textfont.py b/plotly/graph_objs/barpolar/selected/_textfont.py index 7646199cb5..239e5da6f9 100644 --- a/plotly/graph_objs/barpolar/selected/_textfont.py +++ b/plotly/graph_objs/barpolar/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/barpolar/unselected/_marker.py b/plotly/graph_objs/barpolar/unselected/_marker.py index c93e2a94f3..c72821c4e9 100644 --- a/plotly/graph_objs/barpolar/unselected/_marker.py +++ b/plotly/graph_objs/barpolar/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/barpolar/unselected/_textfont.py b/plotly/graph_objs/barpolar/unselected/_textfont.py index af29bfe55b..a653a631d1 100644 --- a/plotly/graph_objs/barpolar/unselected/_textfont.py +++ b/plotly/graph_objs/barpolar/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/box/_hoverlabel.py b/plotly/graph_objs/box/_hoverlabel.py index f6d7985724..e60e57dbf8 100644 --- a/plotly/graph_objs/box/_hoverlabel.py +++ b/plotly/graph_objs/box/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/box/_line.py b/plotly/graph_objs/box/_line.py index 26c967e81c..9520d002ce 100644 --- a/plotly/graph_objs/box/_line.py +++ b/plotly/graph_objs/box/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/box/_marker.py b/plotly/graph_objs/box/_marker.py index 88e4df5dee..f7f0efb1bb 100644 --- a/plotly/graph_objs/box/_marker.py +++ b/plotly/graph_objs/box/_marker.py @@ -53,8 +53,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -115,8 +118,11 @@ def outliercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/box/hoverlabel/_font.py b/plotly/graph_objs/box/hoverlabel/_font.py index cccc458452..fc88b335c5 100644 --- a/plotly/graph_objs/box/hoverlabel/_font.py +++ b/plotly/graph_objs/box/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/box/legendgrouptitle/_font.py b/plotly/graph_objs/box/legendgrouptitle/_font.py index 1a02d853ad..b8db031323 100644 --- a/plotly/graph_objs/box/legendgrouptitle/_font.py +++ b/plotly/graph_objs/box/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/box/marker/_line.py b/plotly/graph_objs/box/marker/_line.py index 63939f6747..4e2a30ef78 100644 --- a/plotly/graph_objs/box/marker/_line.py +++ b/plotly/graph_objs/box/marker/_line.py @@ -25,8 +25,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -51,8 +54,11 @@ def outliercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/box/selected/_marker.py b/plotly/graph_objs/box/selected/_marker.py index f2e36f8bb0..8178680f30 100644 --- a/plotly/graph_objs/box/selected/_marker.py +++ b/plotly/graph_objs/box/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/box/unselected/_marker.py b/plotly/graph_objs/box/unselected/_marker.py index 711f1f9652..fa2a59d827 100644 --- a/plotly/graph_objs/box/unselected/_marker.py +++ b/plotly/graph_objs/box/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/candlestick/_decreasing.py b/plotly/graph_objs/candlestick/_decreasing.py index 5463fa8e19..d6e4e040cc 100644 --- a/plotly/graph_objs/candlestick/_decreasing.py +++ b/plotly/graph_objs/candlestick/_decreasing.py @@ -24,8 +24,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/candlestick/_hoverlabel.py b/plotly/graph_objs/candlestick/_hoverlabel.py index 33e98c554b..c1ef694df1 100644 --- a/plotly/graph_objs/candlestick/_hoverlabel.py +++ b/plotly/graph_objs/candlestick/_hoverlabel.py @@ -52,8 +52,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -78,8 +81,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/candlestick/_increasing.py b/plotly/graph_objs/candlestick/_increasing.py index ca585f3fca..a356254ef6 100644 --- a/plotly/graph_objs/candlestick/_increasing.py +++ b/plotly/graph_objs/candlestick/_increasing.py @@ -24,8 +24,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/candlestick/decreasing/_line.py b/plotly/graph_objs/candlestick/decreasing/_line.py index 39749884ad..5a83c9cfb1 100644 --- a/plotly/graph_objs/candlestick/decreasing/_line.py +++ b/plotly/graph_objs/candlestick/decreasing/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/candlestick/hoverlabel/_font.py b/plotly/graph_objs/candlestick/hoverlabel/_font.py index a90db38651..fe9b28517e 100644 --- a/plotly/graph_objs/candlestick/hoverlabel/_font.py +++ b/plotly/graph_objs/candlestick/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/candlestick/increasing/_line.py b/plotly/graph_objs/candlestick/increasing/_line.py index d418c77e2b..e6d13bf6b5 100644 --- a/plotly/graph_objs/candlestick/increasing/_line.py +++ b/plotly/graph_objs/candlestick/increasing/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/candlestick/legendgrouptitle/_font.py b/plotly/graph_objs/candlestick/legendgrouptitle/_font.py index 2b9926af2b..1a47a3a4e3 100644 --- a/plotly/graph_objs/candlestick/legendgrouptitle/_font.py +++ b/plotly/graph_objs/candlestick/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/carpet/_aaxis.py b/plotly/graph_objs/carpet/_aaxis.py index 017537b9c9..92856ae8a0 100644 --- a/plotly/graph_objs/carpet/_aaxis.py +++ b/plotly/graph_objs/carpet/_aaxis.py @@ -229,8 +229,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -292,8 +295,11 @@ def endlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -377,8 +383,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -525,8 +534,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -586,8 +598,11 @@ def minorgridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -918,8 +933,11 @@ def startlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/carpet/_baxis.py b/plotly/graph_objs/carpet/_baxis.py index dbccd164c0..f5092ad753 100644 --- a/plotly/graph_objs/carpet/_baxis.py +++ b/plotly/graph_objs/carpet/_baxis.py @@ -229,8 +229,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -292,8 +295,11 @@ def endlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -377,8 +383,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -525,8 +534,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -586,8 +598,11 @@ def minorgridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -918,8 +933,11 @@ def startlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/carpet/_font.py b/plotly/graph_objs/carpet/_font.py index b94f832504..de91061182 100644 --- a/plotly/graph_objs/carpet/_font.py +++ b/plotly/graph_objs/carpet/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/carpet/aaxis/_tickfont.py b/plotly/graph_objs/carpet/aaxis/_tickfont.py index f985893275..40374d95ce 100644 --- a/plotly/graph_objs/carpet/aaxis/_tickfont.py +++ b/plotly/graph_objs/carpet/aaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/carpet/aaxis/title/_font.py b/plotly/graph_objs/carpet/aaxis/title/_font.py index a11f734731..f92a7176e8 100644 --- a/plotly/graph_objs/carpet/aaxis/title/_font.py +++ b/plotly/graph_objs/carpet/aaxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/carpet/baxis/_tickfont.py b/plotly/graph_objs/carpet/baxis/_tickfont.py index 88040a2de6..244499f8f4 100644 --- a/plotly/graph_objs/carpet/baxis/_tickfont.py +++ b/plotly/graph_objs/carpet/baxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/carpet/baxis/title/_font.py b/plotly/graph_objs/carpet/baxis/title/_font.py index 809921a577..8f2dbbd822 100644 --- a/plotly/graph_objs/carpet/baxis/title/_font.py +++ b/plotly/graph_objs/carpet/baxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/carpet/legendgrouptitle/_font.py b/plotly/graph_objs/carpet/legendgrouptitle/_font.py index 3dfaa3bc8e..9cf9721a46 100644 --- a/plotly/graph_objs/carpet/legendgrouptitle/_font.py +++ b/plotly/graph_objs/carpet/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/choropleth/_colorbar.py b/plotly/graph_objs/choropleth/_colorbar.py index 02ea563012..c914e12c90 100644 --- a/plotly/graph_objs/choropleth/_colorbar.py +++ b/plotly/graph_objs/choropleth/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/choropleth/_hoverlabel.py b/plotly/graph_objs/choropleth/_hoverlabel.py index 8ef0712f75..c0aa256117 100644 --- a/plotly/graph_objs/choropleth/_hoverlabel.py +++ b/plotly/graph_objs/choropleth/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/choropleth/colorbar/_tickfont.py b/plotly/graph_objs/choropleth/colorbar/_tickfont.py index 9374a8a390..981ed84d21 100644 --- a/plotly/graph_objs/choropleth/colorbar/_tickfont.py +++ b/plotly/graph_objs/choropleth/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/choropleth/colorbar/title/_font.py b/plotly/graph_objs/choropleth/colorbar/title/_font.py index e19133cd47..89b7e4e442 100644 --- a/plotly/graph_objs/choropleth/colorbar/title/_font.py +++ b/plotly/graph_objs/choropleth/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/choropleth/hoverlabel/_font.py b/plotly/graph_objs/choropleth/hoverlabel/_font.py index d52a7f0016..c362bff003 100644 --- a/plotly/graph_objs/choropleth/hoverlabel/_font.py +++ b/plotly/graph_objs/choropleth/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/choropleth/legendgrouptitle/_font.py b/plotly/graph_objs/choropleth/legendgrouptitle/_font.py index bdfdb8a7dc..2117cc8cb9 100644 --- a/plotly/graph_objs/choropleth/legendgrouptitle/_font.py +++ b/plotly/graph_objs/choropleth/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/choropleth/marker/_line.py b/plotly/graph_objs/choropleth/marker/_line.py index 495fb6e67e..b70e5c275d 100644 --- a/plotly/graph_objs/choropleth/marker/_line.py +++ b/plotly/graph_objs/choropleth/marker/_line.py @@ -25,8 +25,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/choroplethmap/_colorbar.py b/plotly/graph_objs/choroplethmap/_colorbar.py index 67d817f8fb..553ba88cce 100644 --- a/plotly/graph_objs/choroplethmap/_colorbar.py +++ b/plotly/graph_objs/choroplethmap/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/choroplethmap/_hoverlabel.py b/plotly/graph_objs/choroplethmap/_hoverlabel.py index 3e0ab9b8a1..b071664802 100644 --- a/plotly/graph_objs/choroplethmap/_hoverlabel.py +++ b/plotly/graph_objs/choroplethmap/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py b/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py index d1015feb40..8c81acb960 100644 --- a/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py +++ b/plotly/graph_objs/choroplethmap/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/choroplethmap/colorbar/title/_font.py b/plotly/graph_objs/choroplethmap/colorbar/title/_font.py index 981a2fa687..e7b0d189b7 100644 --- a/plotly/graph_objs/choroplethmap/colorbar/title/_font.py +++ b/plotly/graph_objs/choroplethmap/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/choroplethmap/hoverlabel/_font.py b/plotly/graph_objs/choroplethmap/hoverlabel/_font.py index bff583f766..481a029cf9 100644 --- a/plotly/graph_objs/choroplethmap/hoverlabel/_font.py +++ b/plotly/graph_objs/choroplethmap/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py b/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py index cd23587e5b..b3fde39ea2 100644 --- a/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/choroplethmap/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/choroplethmap/marker/_line.py b/plotly/graph_objs/choroplethmap/marker/_line.py index 92de2c068b..d24aea9e3c 100644 --- a/plotly/graph_objs/choroplethmap/marker/_line.py +++ b/plotly/graph_objs/choroplethmap/marker/_line.py @@ -25,8 +25,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/cone/_colorbar.py b/plotly/graph_objs/cone/_colorbar.py index ab8c985c23..d83aa48d22 100644 --- a/plotly/graph_objs/cone/_colorbar.py +++ b/plotly/graph_objs/cone/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/cone/_hoverlabel.py b/plotly/graph_objs/cone/_hoverlabel.py index 3f3f10a326..9161e5ea95 100644 --- a/plotly/graph_objs/cone/_hoverlabel.py +++ b/plotly/graph_objs/cone/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/cone/colorbar/_tickfont.py b/plotly/graph_objs/cone/colorbar/_tickfont.py index 60b969435f..6a0ae3cdfb 100644 --- a/plotly/graph_objs/cone/colorbar/_tickfont.py +++ b/plotly/graph_objs/cone/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/cone/colorbar/title/_font.py b/plotly/graph_objs/cone/colorbar/title/_font.py index b30482b7ea..70e27f682f 100644 --- a/plotly/graph_objs/cone/colorbar/title/_font.py +++ b/plotly/graph_objs/cone/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/cone/hoverlabel/_font.py b/plotly/graph_objs/cone/hoverlabel/_font.py index 9b96df794f..fe222b6f67 100644 --- a/plotly/graph_objs/cone/hoverlabel/_font.py +++ b/plotly/graph_objs/cone/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/cone/legendgrouptitle/_font.py b/plotly/graph_objs/cone/legendgrouptitle/_font.py index cb66482bcb..b0143eaf44 100644 --- a/plotly/graph_objs/cone/legendgrouptitle/_font.py +++ b/plotly/graph_objs/cone/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contour/_colorbar.py b/plotly/graph_objs/contour/_colorbar.py index fdab25b377..486a9a9817 100644 --- a/plotly/graph_objs/contour/_colorbar.py +++ b/plotly/graph_objs/contour/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contour/_hoverlabel.py b/plotly/graph_objs/contour/_hoverlabel.py index c5b07389e8..66e0f1ecd5 100644 --- a/plotly/graph_objs/contour/_hoverlabel.py +++ b/plotly/graph_objs/contour/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/contour/_line.py b/plotly/graph_objs/contour/_line.py index 290e924943..856a9144ec 100644 --- a/plotly/graph_objs/contour/_line.py +++ b/plotly/graph_objs/contour/_line.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contour/_textfont.py b/plotly/graph_objs/contour/_textfont.py index 81dba5e0ce..cf3a61d113 100644 --- a/plotly/graph_objs/contour/_textfont.py +++ b/plotly/graph_objs/contour/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contour/colorbar/_tickfont.py b/plotly/graph_objs/contour/colorbar/_tickfont.py index ce928daf7f..a472112b71 100644 --- a/plotly/graph_objs/contour/colorbar/_tickfont.py +++ b/plotly/graph_objs/contour/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contour/colorbar/title/_font.py b/plotly/graph_objs/contour/colorbar/title/_font.py index bf4634e080..dcc9e3e2f7 100644 --- a/plotly/graph_objs/contour/colorbar/title/_font.py +++ b/plotly/graph_objs/contour/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contour/contours/_labelfont.py b/plotly/graph_objs/contour/contours/_labelfont.py index 099bf1754b..4a076dcc05 100644 --- a/plotly/graph_objs/contour/contours/_labelfont.py +++ b/plotly/graph_objs/contour/contours/_labelfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contour/hoverlabel/_font.py b/plotly/graph_objs/contour/hoverlabel/_font.py index ca62f76dee..a854eff44d 100644 --- a/plotly/graph_objs/contour/hoverlabel/_font.py +++ b/plotly/graph_objs/contour/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/contour/legendgrouptitle/_font.py b/plotly/graph_objs/contour/legendgrouptitle/_font.py index 1deb1a34f3..90e206505e 100644 --- a/plotly/graph_objs/contour/legendgrouptitle/_font.py +++ b/plotly/graph_objs/contour/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contourcarpet/_colorbar.py b/plotly/graph_objs/contourcarpet/_colorbar.py index 828135f580..06ebf54633 100644 --- a/plotly/graph_objs/contourcarpet/_colorbar.py +++ b/plotly/graph_objs/contourcarpet/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contourcarpet/_line.py b/plotly/graph_objs/contourcarpet/_line.py index 7eebf5dd59..f3f59ffe31 100644 --- a/plotly/graph_objs/contourcarpet/_line.py +++ b/plotly/graph_objs/contourcarpet/_line.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py b/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py index a02fbdbb28..3e437fc9e6 100644 --- a/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py +++ b/plotly/graph_objs/contourcarpet/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contourcarpet/colorbar/title/_font.py b/plotly/graph_objs/contourcarpet/colorbar/title/_font.py index 5b93d35014..57299d6ba7 100644 --- a/plotly/graph_objs/contourcarpet/colorbar/title/_font.py +++ b/plotly/graph_objs/contourcarpet/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contourcarpet/contours/_labelfont.py b/plotly/graph_objs/contourcarpet/contours/_labelfont.py index d6199e3647..ff7915d295 100644 --- a/plotly/graph_objs/contourcarpet/contours/_labelfont.py +++ b/plotly/graph_objs/contourcarpet/contours/_labelfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py b/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py index fdf5535973..75edb2e709 100644 --- a/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py +++ b/plotly/graph_objs/contourcarpet/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/densitymap/_colorbar.py b/plotly/graph_objs/densitymap/_colorbar.py index fc6ecfcdca..65f94cfb4b 100644 --- a/plotly/graph_objs/densitymap/_colorbar.py +++ b/plotly/graph_objs/densitymap/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/densitymap/_hoverlabel.py b/plotly/graph_objs/densitymap/_hoverlabel.py index 796fe10ff6..f610105b12 100644 --- a/plotly/graph_objs/densitymap/_hoverlabel.py +++ b/plotly/graph_objs/densitymap/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/densitymap/colorbar/_tickfont.py b/plotly/graph_objs/densitymap/colorbar/_tickfont.py index 6286e217b3..ef4b7ea469 100644 --- a/plotly/graph_objs/densitymap/colorbar/_tickfont.py +++ b/plotly/graph_objs/densitymap/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/densitymap/colorbar/title/_font.py b/plotly/graph_objs/densitymap/colorbar/title/_font.py index ffad744b6f..7b20063ae2 100644 --- a/plotly/graph_objs/densitymap/colorbar/title/_font.py +++ b/plotly/graph_objs/densitymap/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/densitymap/hoverlabel/_font.py b/plotly/graph_objs/densitymap/hoverlabel/_font.py index 955621118f..dd7e906dd2 100644 --- a/plotly/graph_objs/densitymap/hoverlabel/_font.py +++ b/plotly/graph_objs/densitymap/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/densitymap/legendgrouptitle/_font.py b/plotly/graph_objs/densitymap/legendgrouptitle/_font.py index dde61e82d8..6725ae6426 100644 --- a/plotly/graph_objs/densitymap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/densitymap/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/funnel/_connector.py b/plotly/graph_objs/funnel/_connector.py index 58c943aa6b..bb931b5370 100644 --- a/plotly/graph_objs/funnel/_connector.py +++ b/plotly/graph_objs/funnel/_connector.py @@ -22,8 +22,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/funnel/_hoverlabel.py b/plotly/graph_objs/funnel/_hoverlabel.py index 8216c9b0a9..f987e8e920 100644 --- a/plotly/graph_objs/funnel/_hoverlabel.py +++ b/plotly/graph_objs/funnel/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnel/_insidetextfont.py b/plotly/graph_objs/funnel/_insidetextfont.py index bb5bb2ea30..622bfa34e7 100644 --- a/plotly/graph_objs/funnel/_insidetextfont.py +++ b/plotly/graph_objs/funnel/_insidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnel/_marker.py b/plotly/graph_objs/funnel/_marker.py index 9ba65595f2..0e43b84ed2 100644 --- a/plotly/graph_objs/funnel/_marker.py +++ b/plotly/graph_objs/funnel/_marker.py @@ -150,8 +150,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to funnel.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/funnel/_outsidetextfont.py b/plotly/graph_objs/funnel/_outsidetextfont.py index 2380971351..9ad5172eff 100644 --- a/plotly/graph_objs/funnel/_outsidetextfont.py +++ b/plotly/graph_objs/funnel/_outsidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnel/_textfont.py b/plotly/graph_objs/funnel/_textfont.py index 8e53a8688f..f2bbcd1d6c 100644 --- a/plotly/graph_objs/funnel/_textfont.py +++ b/plotly/graph_objs/funnel/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnel/connector/_line.py b/plotly/graph_objs/funnel/connector/_line.py index 8c99d37951..725ea1812f 100644 --- a/plotly/graph_objs/funnel/connector/_line.py +++ b/plotly/graph_objs/funnel/connector/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/funnel/hoverlabel/_font.py b/plotly/graph_objs/funnel/hoverlabel/_font.py index ca553e98cb..d7cc53125e 100644 --- a/plotly/graph_objs/funnel/hoverlabel/_font.py +++ b/plotly/graph_objs/funnel/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnel/legendgrouptitle/_font.py b/plotly/graph_objs/funnel/legendgrouptitle/_font.py index b74aa39ea5..75bf4782ed 100644 --- a/plotly/graph_objs/funnel/legendgrouptitle/_font.py +++ b/plotly/graph_objs/funnel/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/funnel/marker/_colorbar.py b/plotly/graph_objs/funnel/marker/_colorbar.py index 3e99d813da..a2a233e50f 100644 --- a/plotly/graph_objs/funnel/marker/_colorbar.py +++ b/plotly/graph_objs/funnel/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/funnel/marker/_line.py b/plotly/graph_objs/funnel/marker/_line.py index 9fe595b051..5b452f1f2e 100644 --- a/plotly/graph_objs/funnel/marker/_line.py +++ b/plotly/graph_objs/funnel/marker/_line.py @@ -148,8 +148,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to funnel.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py b/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py index 6496623237..ca7d2a6a6d 100644 --- a/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/funnel/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/funnel/marker/colorbar/title/_font.py b/plotly/graph_objs/funnel/marker/colorbar/title/_font.py index 790deafb23..f19941b3cc 100644 --- a/plotly/graph_objs/funnel/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/funnel/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/funnelarea/_hoverlabel.py b/plotly/graph_objs/funnelarea/_hoverlabel.py index 7956da4c52..533367809c 100644 --- a/plotly/graph_objs/funnelarea/_hoverlabel.py +++ b/plotly/graph_objs/funnelarea/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnelarea/_insidetextfont.py b/plotly/graph_objs/funnelarea/_insidetextfont.py index 64f2791fb4..a7935147b2 100644 --- a/plotly/graph_objs/funnelarea/_insidetextfont.py +++ b/plotly/graph_objs/funnelarea/_insidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnelarea/_textfont.py b/plotly/graph_objs/funnelarea/_textfont.py index 24c1b5b75f..c777a70b9f 100644 --- a/plotly/graph_objs/funnelarea/_textfont.py +++ b/plotly/graph_objs/funnelarea/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnelarea/hoverlabel/_font.py b/plotly/graph_objs/funnelarea/hoverlabel/_font.py index 7e0bc2f31f..b77e8cd25a 100644 --- a/plotly/graph_objs/funnelarea/hoverlabel/_font.py +++ b/plotly/graph_objs/funnelarea/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py b/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py index a151528835..013d0e69a4 100644 --- a/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py +++ b/plotly/graph_objs/funnelarea/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/funnelarea/marker/_line.py b/plotly/graph_objs/funnelarea/marker/_line.py index 5e14aad525..306aee77d1 100644 --- a/plotly/graph_objs/funnelarea/marker/_line.py +++ b/plotly/graph_objs/funnelarea/marker/_line.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnelarea/marker/_pattern.py b/plotly/graph_objs/funnelarea/marker/_pattern.py index 76092d03e6..cb6413f26a 100644 --- a/plotly/graph_objs/funnelarea/marker/_pattern.py +++ b/plotly/graph_objs/funnelarea/marker/_pattern.py @@ -34,8 +34,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -63,8 +66,11 @@ def fgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/funnelarea/title/_font.py b/plotly/graph_objs/funnelarea/title/_font.py index b83643e7d2..d0260e1aef 100644 --- a/plotly/graph_objs/funnelarea/title/_font.py +++ b/plotly/graph_objs/funnelarea/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/heatmap/_colorbar.py b/plotly/graph_objs/heatmap/_colorbar.py index 561121754d..a8de957197 100644 --- a/plotly/graph_objs/heatmap/_colorbar.py +++ b/plotly/graph_objs/heatmap/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/heatmap/_hoverlabel.py b/plotly/graph_objs/heatmap/_hoverlabel.py index 2bca3fc930..6d9d63dd88 100644 --- a/plotly/graph_objs/heatmap/_hoverlabel.py +++ b/plotly/graph_objs/heatmap/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/heatmap/_textfont.py b/plotly/graph_objs/heatmap/_textfont.py index 4d44454904..7161920cda 100644 --- a/plotly/graph_objs/heatmap/_textfont.py +++ b/plotly/graph_objs/heatmap/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/heatmap/colorbar/_tickfont.py b/plotly/graph_objs/heatmap/colorbar/_tickfont.py index 190ebb2f04..82a9525ca1 100644 --- a/plotly/graph_objs/heatmap/colorbar/_tickfont.py +++ b/plotly/graph_objs/heatmap/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/heatmap/colorbar/title/_font.py b/plotly/graph_objs/heatmap/colorbar/title/_font.py index 20c1151846..e62d38cc78 100644 --- a/plotly/graph_objs/heatmap/colorbar/title/_font.py +++ b/plotly/graph_objs/heatmap/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/heatmap/hoverlabel/_font.py b/plotly/graph_objs/heatmap/hoverlabel/_font.py index 821c9ce436..3f70d6e78f 100644 --- a/plotly/graph_objs/heatmap/hoverlabel/_font.py +++ b/plotly/graph_objs/heatmap/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/heatmap/legendgrouptitle/_font.py b/plotly/graph_objs/heatmap/legendgrouptitle/_font.py index a1b8204751..796b542264 100644 --- a/plotly/graph_objs/heatmap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/heatmap/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/_error_x.py b/plotly/graph_objs/histogram/_error_x.py index 22c6b01e52..af0322d607 100644 --- a/plotly/graph_objs/histogram/_error_x.py +++ b/plotly/graph_objs/histogram/_error_x.py @@ -75,8 +75,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/_error_y.py b/plotly/graph_objs/histogram/_error_y.py index 744c3eef28..4100b6ffce 100644 --- a/plotly/graph_objs/histogram/_error_y.py +++ b/plotly/graph_objs/histogram/_error_y.py @@ -74,8 +74,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/_hoverlabel.py b/plotly/graph_objs/histogram/_hoverlabel.py index e91d931d56..6bbbf530db 100644 --- a/plotly/graph_objs/histogram/_hoverlabel.py +++ b/plotly/graph_objs/histogram/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/histogram/_insidetextfont.py b/plotly/graph_objs/histogram/_insidetextfont.py index fa84524d65..692fa2cbe5 100644 --- a/plotly/graph_objs/histogram/_insidetextfont.py +++ b/plotly/graph_objs/histogram/_insidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/_marker.py b/plotly/graph_objs/histogram/_marker.py index e482875325..499a809323 100644 --- a/plotly/graph_objs/histogram/_marker.py +++ b/plotly/graph_objs/histogram/_marker.py @@ -152,8 +152,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to histogram.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/histogram/_outsidetextfont.py b/plotly/graph_objs/histogram/_outsidetextfont.py index df77cfba87..b87f6dc5ea 100644 --- a/plotly/graph_objs/histogram/_outsidetextfont.py +++ b/plotly/graph_objs/histogram/_outsidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/_textfont.py b/plotly/graph_objs/histogram/_textfont.py index 2a6f1bacad..61f83467bc 100644 --- a/plotly/graph_objs/histogram/_textfont.py +++ b/plotly/graph_objs/histogram/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/hoverlabel/_font.py b/plotly/graph_objs/histogram/hoverlabel/_font.py index 4f5a0d01ac..9b8bd369ee 100644 --- a/plotly/graph_objs/histogram/hoverlabel/_font.py +++ b/plotly/graph_objs/histogram/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/histogram/legendgrouptitle/_font.py b/plotly/graph_objs/histogram/legendgrouptitle/_font.py index e83b3c5ceb..77b802dad2 100644 --- a/plotly/graph_objs/histogram/legendgrouptitle/_font.py +++ b/plotly/graph_objs/histogram/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/marker/_colorbar.py b/plotly/graph_objs/histogram/marker/_colorbar.py index 5788e6fcd9..aa6d130e72 100644 --- a/plotly/graph_objs/histogram/marker/_colorbar.py +++ b/plotly/graph_objs/histogram/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/marker/_line.py b/plotly/graph_objs/histogram/marker/_line.py index 2542b8b586..c8bcf8c3d1 100644 --- a/plotly/graph_objs/histogram/marker/_line.py +++ b/plotly/graph_objs/histogram/marker/_line.py @@ -148,8 +148,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to histogram.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/histogram/marker/_pattern.py b/plotly/graph_objs/histogram/marker/_pattern.py index 463e50c31d..b46e46feb2 100644 --- a/plotly/graph_objs/histogram/marker/_pattern.py +++ b/plotly/graph_objs/histogram/marker/_pattern.py @@ -34,8 +34,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -63,8 +66,11 @@ def fgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py b/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py index 37bc7f903a..2273b3b37b 100644 --- a/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/histogram/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/marker/colorbar/title/_font.py b/plotly/graph_objs/histogram/marker/colorbar/title/_font.py index f5c66ed12c..a24f3f8d3c 100644 --- a/plotly/graph_objs/histogram/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/histogram/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/selected/_marker.py b/plotly/graph_objs/histogram/selected/_marker.py index f00b9cb44f..9b23288efe 100644 --- a/plotly/graph_objs/histogram/selected/_marker.py +++ b/plotly/graph_objs/histogram/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/selected/_textfont.py b/plotly/graph_objs/histogram/selected/_textfont.py index 3a6bd9e3c6..0be8cb6128 100644 --- a/plotly/graph_objs/histogram/selected/_textfont.py +++ b/plotly/graph_objs/histogram/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/unselected/_marker.py b/plotly/graph_objs/histogram/unselected/_marker.py index b3f1fe8756..567169714e 100644 --- a/plotly/graph_objs/histogram/unselected/_marker.py +++ b/plotly/graph_objs/histogram/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram/unselected/_textfont.py b/plotly/graph_objs/histogram/unselected/_textfont.py index d0870adf67..344e5fd674 100644 --- a/plotly/graph_objs/histogram/unselected/_textfont.py +++ b/plotly/graph_objs/histogram/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2d/_colorbar.py b/plotly/graph_objs/histogram2d/_colorbar.py index d4681620da..3d07723403 100644 --- a/plotly/graph_objs/histogram2d/_colorbar.py +++ b/plotly/graph_objs/histogram2d/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2d/_hoverlabel.py b/plotly/graph_objs/histogram2d/_hoverlabel.py index 0c772385e5..e7bbf8d76e 100644 --- a/plotly/graph_objs/histogram2d/_hoverlabel.py +++ b/plotly/graph_objs/histogram2d/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/histogram2d/_textfont.py b/plotly/graph_objs/histogram2d/_textfont.py index 556216d3a4..05946834bc 100644 --- a/plotly/graph_objs/histogram2d/_textfont.py +++ b/plotly/graph_objs/histogram2d/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2d/colorbar/_tickfont.py b/plotly/graph_objs/histogram2d/colorbar/_tickfont.py index 66e9ebdc99..cd6d0f871d 100644 --- a/plotly/graph_objs/histogram2d/colorbar/_tickfont.py +++ b/plotly/graph_objs/histogram2d/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2d/colorbar/title/_font.py b/plotly/graph_objs/histogram2d/colorbar/title/_font.py index 11e24c0bb7..a1ce0ca9e5 100644 --- a/plotly/graph_objs/histogram2d/colorbar/title/_font.py +++ b/plotly/graph_objs/histogram2d/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2d/hoverlabel/_font.py b/plotly/graph_objs/histogram2d/hoverlabel/_font.py index 84586264b8..0b31d6cbdc 100644 --- a/plotly/graph_objs/histogram2d/hoverlabel/_font.py +++ b/plotly/graph_objs/histogram2d/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py b/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py index 146f8ae094..0e168cce70 100644 --- a/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py +++ b/plotly/graph_objs/histogram2d/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2dcontour/_colorbar.py b/plotly/graph_objs/histogram2dcontour/_colorbar.py index b682322998..517e3396d8 100644 --- a/plotly/graph_objs/histogram2dcontour/_colorbar.py +++ b/plotly/graph_objs/histogram2dcontour/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2dcontour/_hoverlabel.py b/plotly/graph_objs/histogram2dcontour/_hoverlabel.py index 07245911a6..c3af2349b4 100644 --- a/plotly/graph_objs/histogram2dcontour/_hoverlabel.py +++ b/plotly/graph_objs/histogram2dcontour/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/histogram2dcontour/_line.py b/plotly/graph_objs/histogram2dcontour/_line.py index 41c0a6da7d..9e1f5ddfbe 100644 --- a/plotly/graph_objs/histogram2dcontour/_line.py +++ b/plotly/graph_objs/histogram2dcontour/_line.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2dcontour/_textfont.py b/plotly/graph_objs/histogram2dcontour/_textfont.py index 81f2fb3f07..79478501ba 100644 --- a/plotly/graph_objs/histogram2dcontour/_textfont.py +++ b/plotly/graph_objs/histogram2dcontour/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py b/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py index 0f53d13258..74f668b429 100644 --- a/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py +++ b/plotly/graph_objs/histogram2dcontour/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py b/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py index 887451a568..3ab1b64c99 100644 --- a/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py +++ b/plotly/graph_objs/histogram2dcontour/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py b/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py index ca4d71c6cf..d97197abf6 100644 --- a/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py +++ b/plotly/graph_objs/histogram2dcontour/contours/_labelfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py b/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py index fe649b4067..0543cd44c8 100644 --- a/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py +++ b/plotly/graph_objs/histogram2dcontour/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py b/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py index c54329e3de..10c563c532 100644 --- a/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py +++ b/plotly/graph_objs/histogram2dcontour/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/icicle/_hoverlabel.py b/plotly/graph_objs/icicle/_hoverlabel.py index 4766e0f59e..873326624b 100644 --- a/plotly/graph_objs/icicle/_hoverlabel.py +++ b/plotly/graph_objs/icicle/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/icicle/_insidetextfont.py b/plotly/graph_objs/icicle/_insidetextfont.py index 9f4f1014d0..5866f074c5 100644 --- a/plotly/graph_objs/icicle/_insidetextfont.py +++ b/plotly/graph_objs/icicle/_insidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/icicle/_outsidetextfont.py b/plotly/graph_objs/icicle/_outsidetextfont.py index 29d2f6c462..ff0d47828c 100644 --- a/plotly/graph_objs/icicle/_outsidetextfont.py +++ b/plotly/graph_objs/icicle/_outsidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/icicle/_root.py b/plotly/graph_objs/icicle/_root.py index e92475d27f..6d8945fffd 100644 --- a/plotly/graph_objs/icicle/_root.py +++ b/plotly/graph_objs/icicle/_root.py @@ -24,8 +24,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/icicle/_textfont.py b/plotly/graph_objs/icicle/_textfont.py index 68f85fac2b..165c4aef0d 100644 --- a/plotly/graph_objs/icicle/_textfont.py +++ b/plotly/graph_objs/icicle/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/icicle/hoverlabel/_font.py b/plotly/graph_objs/icicle/hoverlabel/_font.py index 42f7556969..3c8c40cb1b 100644 --- a/plotly/graph_objs/icicle/hoverlabel/_font.py +++ b/plotly/graph_objs/icicle/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/icicle/legendgrouptitle/_font.py b/plotly/graph_objs/icicle/legendgrouptitle/_font.py index f7ca21a406..3da3372426 100644 --- a/plotly/graph_objs/icicle/legendgrouptitle/_font.py +++ b/plotly/graph_objs/icicle/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/icicle/marker/_colorbar.py b/plotly/graph_objs/icicle/marker/_colorbar.py index ce191067a6..772e01404d 100644 --- a/plotly/graph_objs/icicle/marker/_colorbar.py +++ b/plotly/graph_objs/icicle/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/icicle/marker/_line.py b/plotly/graph_objs/icicle/marker/_line.py index d102a3dd21..68d75a06b9 100644 --- a/plotly/graph_objs/icicle/marker/_line.py +++ b/plotly/graph_objs/icicle/marker/_line.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/icicle/marker/_pattern.py b/plotly/graph_objs/icicle/marker/_pattern.py index 6e3f04c21f..058ddf39cb 100644 --- a/plotly/graph_objs/icicle/marker/_pattern.py +++ b/plotly/graph_objs/icicle/marker/_pattern.py @@ -34,8 +34,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -63,8 +66,11 @@ def fgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py b/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py index 4a51015720..efff585c80 100644 --- a/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/icicle/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/icicle/marker/colorbar/title/_font.py b/plotly/graph_objs/icicle/marker/colorbar/title/_font.py index 12fecea4a6..b6b839d4d5 100644 --- a/plotly/graph_objs/icicle/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/icicle/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/icicle/pathbar/_textfont.py b/plotly/graph_objs/icicle/pathbar/_textfont.py index 1f45fc03c7..0a268c85f7 100644 --- a/plotly/graph_objs/icicle/pathbar/_textfont.py +++ b/plotly/graph_objs/icicle/pathbar/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/image/_hoverlabel.py b/plotly/graph_objs/image/_hoverlabel.py index baaa39dc80..58f0553bed 100644 --- a/plotly/graph_objs/image/_hoverlabel.py +++ b/plotly/graph_objs/image/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/image/hoverlabel/_font.py b/plotly/graph_objs/image/hoverlabel/_font.py index a8da8b2b26..c428ed7a41 100644 --- a/plotly/graph_objs/image/hoverlabel/_font.py +++ b/plotly/graph_objs/image/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/image/legendgrouptitle/_font.py b/plotly/graph_objs/image/legendgrouptitle/_font.py index 2f9f7376b0..69f04a5daf 100644 --- a/plotly/graph_objs/image/legendgrouptitle/_font.py +++ b/plotly/graph_objs/image/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/_gauge.py b/plotly/graph_objs/indicator/_gauge.py index dca5605f5c..0778b0eb37 100644 --- a/plotly/graph_objs/indicator/_gauge.py +++ b/plotly/graph_objs/indicator/_gauge.py @@ -72,8 +72,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -97,8 +100,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/delta/_decreasing.py b/plotly/graph_objs/indicator/delta/_decreasing.py index 88c2c44471..aafa745562 100644 --- a/plotly/graph_objs/indicator/delta/_decreasing.py +++ b/plotly/graph_objs/indicator/delta/_decreasing.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/delta/_font.py b/plotly/graph_objs/indicator/delta/_font.py index 29746b8e28..d691cf2e2f 100644 --- a/plotly/graph_objs/indicator/delta/_font.py +++ b/plotly/graph_objs/indicator/delta/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/delta/_increasing.py b/plotly/graph_objs/indicator/delta/_increasing.py index 945428439c..7e8f27ac11 100644 --- a/plotly/graph_objs/indicator/delta/_increasing.py +++ b/plotly/graph_objs/indicator/delta/_increasing.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/gauge/_axis.py b/plotly/graph_objs/indicator/gauge/_axis.py index 64b497d039..aad7847e31 100644 --- a/plotly/graph_objs/indicator/gauge/_axis.py +++ b/plotly/graph_objs/indicator/gauge/_axis.py @@ -350,8 +350,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/gauge/_bar.py b/plotly/graph_objs/indicator/gauge/_bar.py index 6861258cf1..c01686f53d 100644 --- a/plotly/graph_objs/indicator/gauge/_bar.py +++ b/plotly/graph_objs/indicator/gauge/_bar.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/gauge/_step.py b/plotly/graph_objs/indicator/gauge/_step.py index 0de349efeb..053446d2f5 100644 --- a/plotly/graph_objs/indicator/gauge/_step.py +++ b/plotly/graph_objs/indicator/gauge/_step.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/gauge/axis/_tickfont.py b/plotly/graph_objs/indicator/gauge/axis/_tickfont.py index 7624833628..96571f9f33 100644 --- a/plotly/graph_objs/indicator/gauge/axis/_tickfont.py +++ b/plotly/graph_objs/indicator/gauge/axis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/gauge/bar/_line.py b/plotly/graph_objs/indicator/gauge/bar/_line.py index 320be69df4..08f1d582aa 100644 --- a/plotly/graph_objs/indicator/gauge/bar/_line.py +++ b/plotly/graph_objs/indicator/gauge/bar/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/gauge/step/_line.py b/plotly/graph_objs/indicator/gauge/step/_line.py index be63114070..a68097b6a9 100644 --- a/plotly/graph_objs/indicator/gauge/step/_line.py +++ b/plotly/graph_objs/indicator/gauge/step/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/gauge/threshold/_line.py b/plotly/graph_objs/indicator/gauge/threshold/_line.py index 413d456445..deafbcef50 100644 --- a/plotly/graph_objs/indicator/gauge/threshold/_line.py +++ b/plotly/graph_objs/indicator/gauge/threshold/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/legendgrouptitle/_font.py b/plotly/graph_objs/indicator/legendgrouptitle/_font.py index f4789c4570..80c8e94d53 100644 --- a/plotly/graph_objs/indicator/legendgrouptitle/_font.py +++ b/plotly/graph_objs/indicator/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/number/_font.py b/plotly/graph_objs/indicator/number/_font.py index 9fd07bb94f..515c1325a3 100644 --- a/plotly/graph_objs/indicator/number/_font.py +++ b/plotly/graph_objs/indicator/number/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/indicator/title/_font.py b/plotly/graph_objs/indicator/title/_font.py index 2382dc0ee2..caecc2ad4b 100644 --- a/plotly/graph_objs/indicator/title/_font.py +++ b/plotly/graph_objs/indicator/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/isosurface/_colorbar.py b/plotly/graph_objs/isosurface/_colorbar.py index 022f4ba67e..7b545032e5 100644 --- a/plotly/graph_objs/isosurface/_colorbar.py +++ b/plotly/graph_objs/isosurface/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/isosurface/_contour.py b/plotly/graph_objs/isosurface/_contour.py index f200d6b918..c50ed4511c 100644 --- a/plotly/graph_objs/isosurface/_contour.py +++ b/plotly/graph_objs/isosurface/_contour.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/isosurface/_hoverlabel.py b/plotly/graph_objs/isosurface/_hoverlabel.py index 1a340957a5..b17454d659 100644 --- a/plotly/graph_objs/isosurface/_hoverlabel.py +++ b/plotly/graph_objs/isosurface/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/isosurface/colorbar/_tickfont.py b/plotly/graph_objs/isosurface/colorbar/_tickfont.py index b676617aeb..69e9fcd26b 100644 --- a/plotly/graph_objs/isosurface/colorbar/_tickfont.py +++ b/plotly/graph_objs/isosurface/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/isosurface/colorbar/title/_font.py b/plotly/graph_objs/isosurface/colorbar/title/_font.py index f8b66d0dd8..a938e32cb5 100644 --- a/plotly/graph_objs/isosurface/colorbar/title/_font.py +++ b/plotly/graph_objs/isosurface/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/isosurface/hoverlabel/_font.py b/plotly/graph_objs/isosurface/hoverlabel/_font.py index 316d964d7c..4eefe8750c 100644 --- a/plotly/graph_objs/isosurface/hoverlabel/_font.py +++ b/plotly/graph_objs/isosurface/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/isosurface/legendgrouptitle/_font.py b/plotly/graph_objs/isosurface/legendgrouptitle/_font.py index f0634df27d..7905a5c915 100644 --- a/plotly/graph_objs/isosurface/legendgrouptitle/_font.py +++ b/plotly/graph_objs/isosurface/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_activeselection.py b/plotly/graph_objs/layout/_activeselection.py index 35d7b4404b..5db8f538db 100644 --- a/plotly/graph_objs/layout/_activeselection.py +++ b/plotly/graph_objs/layout/_activeselection.py @@ -22,8 +22,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_activeshape.py b/plotly/graph_objs/layout/_activeshape.py index aa29d4aa1e..20ed480050 100644 --- a/plotly/graph_objs/layout/_activeshape.py +++ b/plotly/graph_objs/layout/_activeshape.py @@ -22,8 +22,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_annotation.py b/plotly/graph_objs/layout/_annotation.py index 9f98a4884c..b6a9507d6f 100644 --- a/plotly/graph_objs/layout/_annotation.py +++ b/plotly/graph_objs/layout/_annotation.py @@ -88,8 +88,11 @@ def arrowcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -315,8 +318,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -340,8 +346,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_font.py b/plotly/graph_objs/layout/_font.py index 3551275365..a375106f0f 100644 --- a/plotly/graph_objs/layout/_font.py +++ b/plotly/graph_objs/layout/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_geo.py b/plotly/graph_objs/layout/_geo.py index 83cd965750..09cf89396e 100644 --- a/plotly/graph_objs/layout/_geo.py +++ b/plotly/graph_objs/layout/_geo.py @@ -55,8 +55,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -99,8 +102,11 @@ def coastlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -142,8 +148,11 @@ def countrycolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -236,8 +245,11 @@ def framecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -279,8 +291,11 @@ def lakecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -304,8 +319,11 @@ def landcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -367,8 +385,11 @@ def oceancolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -432,8 +453,11 @@ def rivercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -640,8 +664,11 @@ def subunitcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_hoverlabel.py b/plotly/graph_objs/layout/_hoverlabel.py index 0be763e3ba..06bfe4a66f 100644 --- a/plotly/graph_objs/layout/_hoverlabel.py +++ b/plotly/graph_objs/layout/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -76,8 +79,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_legend.py b/plotly/graph_objs/layout/_legend.py index e761050c8b..3281187ad4 100644 --- a/plotly/graph_objs/layout/_legend.py +++ b/plotly/graph_objs/layout/_legend.py @@ -53,8 +53,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -78,8 +81,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_modebar.py b/plotly/graph_objs/layout/_modebar.py index 0a0a4df2d7..6f4cddba8c 100644 --- a/plotly/graph_objs/layout/_modebar.py +++ b/plotly/graph_objs/layout/_modebar.py @@ -31,8 +31,11 @@ def activecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -82,8 +85,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -107,8 +113,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_newshape.py b/plotly/graph_objs/layout/_newshape.py index ef9e424c76..4e83ef2fb7 100644 --- a/plotly/graph_objs/layout/_newshape.py +++ b/plotly/graph_objs/layout/_newshape.py @@ -65,8 +65,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_polar.py b/plotly/graph_objs/layout/_polar.py index 859a5cc9a5..c8bc4103a6 100644 --- a/plotly/graph_objs/layout/_polar.py +++ b/plotly/graph_objs/layout/_polar.py @@ -95,8 +95,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_scene.py b/plotly/graph_objs/layout/_scene.py index aa838acb73..7a279697f4 100644 --- a/plotly/graph_objs/layout/_scene.py +++ b/plotly/graph_objs/layout/_scene.py @@ -124,8 +124,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_shape.py b/plotly/graph_objs/layout/_shape.py index d985cb4e76..46de729b41 100644 --- a/plotly/graph_objs/layout/_shape.py +++ b/plotly/graph_objs/layout/_shape.py @@ -76,8 +76,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_slider.py b/plotly/graph_objs/layout/_slider.py index 4c663e678c..8fce0adbb9 100644 --- a/plotly/graph_objs/layout/_slider.py +++ b/plotly/graph_objs/layout/_slider.py @@ -66,8 +66,11 @@ def activebgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -91,8 +94,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -116,8 +122,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -371,8 +380,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_smith.py b/plotly/graph_objs/layout/_smith.py index 91650b316d..797cad748c 100644 --- a/plotly/graph_objs/layout/_smith.py +++ b/plotly/graph_objs/layout/_smith.py @@ -22,8 +22,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_ternary.py b/plotly/graph_objs/layout/_ternary.py index d2d6947634..c9cb61d779 100644 --- a/plotly/graph_objs/layout/_ternary.py +++ b/plotly/graph_objs/layout/_ternary.py @@ -60,8 +60,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_updatemenu.py b/plotly/graph_objs/layout/_updatemenu.py index d8f48a4ce6..fb54c888b2 100644 --- a/plotly/graph_objs/layout/_updatemenu.py +++ b/plotly/graph_objs/layout/_updatemenu.py @@ -61,8 +61,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -86,8 +89,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_xaxis.py b/plotly/graph_objs/layout/_xaxis.py index b72475b7c1..edc4c73998 100644 --- a/plotly/graph_objs/layout/_xaxis.py +++ b/plotly/graph_objs/layout/_xaxis.py @@ -343,8 +343,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -416,8 +419,11 @@ def dividercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -566,8 +572,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -734,8 +743,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -1408,8 +1420,11 @@ def spikecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -1566,8 +1581,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -2158,8 +2176,11 @@ def zerolinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/_yaxis.py b/plotly/graph_objs/layout/_yaxis.py index 95c4f2048c..74075d9760 100644 --- a/plotly/graph_objs/layout/_yaxis.py +++ b/plotly/graph_objs/layout/_yaxis.py @@ -365,8 +365,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -438,8 +441,11 @@ def dividercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -588,8 +594,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -756,8 +765,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -1416,8 +1428,11 @@ def spikecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -1574,8 +1589,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -2166,8 +2184,11 @@ def zerolinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/annotation/_font.py b/plotly/graph_objs/layout/annotation/_font.py index ff713edcb4..8b24dc1b31 100644 --- a/plotly/graph_objs/layout/annotation/_font.py +++ b/plotly/graph_objs/layout/annotation/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/annotation/_hoverlabel.py b/plotly/graph_objs/layout/annotation/_hoverlabel.py index a3200f622a..fa2714c50c 100644 --- a/plotly/graph_objs/layout/annotation/_hoverlabel.py +++ b/plotly/graph_objs/layout/annotation/_hoverlabel.py @@ -24,8 +24,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -51,8 +54,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/annotation/hoverlabel/_font.py b/plotly/graph_objs/layout/annotation/hoverlabel/_font.py index cc380f82e9..bd3b30f929 100644 --- a/plotly/graph_objs/layout/annotation/hoverlabel/_font.py +++ b/plotly/graph_objs/layout/annotation/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/coloraxis/_colorbar.py b/plotly/graph_objs/layout/coloraxis/_colorbar.py index 1f1ffed0a4..e712c43305 100644 --- a/plotly/graph_objs/layout/coloraxis/_colorbar.py +++ b/plotly/graph_objs/layout/coloraxis/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py b/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py index 628b62d3c4..aca3122054 100644 --- a/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py +++ b/plotly/graph_objs/layout/coloraxis/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py b/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py index 7960105fb2..ca870691ec 100644 --- a/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py +++ b/plotly/graph_objs/layout/coloraxis/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/geo/_lataxis.py b/plotly/graph_objs/layout/geo/_lataxis.py index 3c7464e3d8..fb0fd94f0d 100644 --- a/plotly/graph_objs/layout/geo/_lataxis.py +++ b/plotly/graph_objs/layout/geo/_lataxis.py @@ -48,8 +48,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/geo/_lonaxis.py b/plotly/graph_objs/layout/geo/_lonaxis.py index 47cc03a211..b41da12eff 100644 --- a/plotly/graph_objs/layout/geo/_lonaxis.py +++ b/plotly/graph_objs/layout/geo/_lonaxis.py @@ -48,8 +48,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/hoverlabel/_font.py b/plotly/graph_objs/layout/hoverlabel/_font.py index c8550f6dc6..91fee001e6 100644 --- a/plotly/graph_objs/layout/hoverlabel/_font.py +++ b/plotly/graph_objs/layout/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py b/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py index fe2a96ee27..5c8a5b0dfe 100644 --- a/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py +++ b/plotly/graph_objs/layout/hoverlabel/_grouptitlefont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/legend/_font.py b/plotly/graph_objs/layout/legend/_font.py index b9b11a37ca..1d6cff1f18 100644 --- a/plotly/graph_objs/layout/legend/_font.py +++ b/plotly/graph_objs/layout/legend/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/legend/_grouptitlefont.py b/plotly/graph_objs/layout/legend/_grouptitlefont.py index bb65e0d750..7931526596 100644 --- a/plotly/graph_objs/layout/legend/_grouptitlefont.py +++ b/plotly/graph_objs/layout/legend/_grouptitlefont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/legend/title/_font.py b/plotly/graph_objs/layout/legend/title/_font.py index 231465fc2f..dc0708db5d 100644 --- a/plotly/graph_objs/layout/legend/title/_font.py +++ b/plotly/graph_objs/layout/legend/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/map/_layer.py b/plotly/graph_objs/layout/map/_layer.py index 72c9b4327b..83d8d3b243 100644 --- a/plotly/graph_objs/layout/map/_layer.py +++ b/plotly/graph_objs/layout/map/_layer.py @@ -87,8 +87,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/map/layer/_fill.py b/plotly/graph_objs/layout/map/layer/_fill.py index 6ebdcb3aba..a89134d2e8 100644 --- a/plotly/graph_objs/layout/map/layer/_fill.py +++ b/plotly/graph_objs/layout/map/layer/_fill.py @@ -23,8 +23,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/map/layer/symbol/_textfont.py b/plotly/graph_objs/layout/map/layer/symbol/_textfont.py index 7195a6ed50..f1962a40d2 100644 --- a/plotly/graph_objs/layout/map/layer/symbol/_textfont.py +++ b/plotly/graph_objs/layout/map/layer/symbol/_textfont.py @@ -20,8 +20,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/newselection/_line.py b/plotly/graph_objs/layout/newselection/_line.py index 0cd061f724..42a4156db1 100644 --- a/plotly/graph_objs/layout/newselection/_line.py +++ b/plotly/graph_objs/layout/newselection/_line.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/newshape/_line.py b/plotly/graph_objs/layout/newshape/_line.py index 32aa564d13..61a700cba2 100644 --- a/plotly/graph_objs/layout/newshape/_line.py +++ b/plotly/graph_objs/layout/newshape/_line.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/newshape/label/_font.py b/plotly/graph_objs/layout/newshape/label/_font.py index 62bc4b3aa7..8f6daf743d 100644 --- a/plotly/graph_objs/layout/newshape/label/_font.py +++ b/plotly/graph_objs/layout/newshape/label/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py b/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py index 36666ff5e2..acde72344f 100644 --- a/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py +++ b/plotly/graph_objs/layout/newshape/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/polar/_angularaxis.py b/plotly/graph_objs/layout/polar/_angularaxis.py index e5b353ba54..16880399f2 100644 --- a/plotly/graph_objs/layout/polar/_angularaxis.py +++ b/plotly/graph_objs/layout/polar/_angularaxis.py @@ -154,8 +154,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -262,8 +265,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -406,8 +412,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -759,8 +768,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/polar/_radialaxis.py b/plotly/graph_objs/layout/polar/_radialaxis.py index 9bd436b815..5a2507d91a 100644 --- a/plotly/graph_objs/layout/polar/_radialaxis.py +++ b/plotly/graph_objs/layout/polar/_radialaxis.py @@ -282,8 +282,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -371,8 +374,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -515,8 +521,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -911,8 +920,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py b/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py index 3b827fa999..3d13847089 100644 --- a/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py +++ b/plotly/graph_objs/layout/polar/angularaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py b/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py index ccf9508a7e..1d703133c4 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py +++ b/plotly/graph_objs/layout/polar/radialaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/polar/radialaxis/title/_font.py b/plotly/graph_objs/layout/polar/radialaxis/title/_font.py index 26cad816a4..76bbf19363 100644 --- a/plotly/graph_objs/layout/polar/radialaxis/title/_font.py +++ b/plotly/graph_objs/layout/polar/radialaxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/_annotation.py b/plotly/graph_objs/layout/scene/_annotation.py index 8273130ebb..863f637579 100644 --- a/plotly/graph_objs/layout/scene/_annotation.py +++ b/plotly/graph_objs/layout/scene/_annotation.py @@ -82,8 +82,11 @@ def arrowcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -223,8 +226,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -248,8 +254,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/_xaxis.py b/plotly/graph_objs/layout/scene/_xaxis.py index a60ebde679..1acdc25c7f 100644 --- a/plotly/graph_objs/layout/scene/_xaxis.py +++ b/plotly/graph_objs/layout/scene/_xaxis.py @@ -150,8 +150,11 @@ def backgroundcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -262,8 +265,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -351,8 +357,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -447,8 +456,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -833,8 +845,11 @@ def spikecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -942,8 +957,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -1298,8 +1316,11 @@ def zerolinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/_yaxis.py b/plotly/graph_objs/layout/scene/_yaxis.py index b334ee2712..bb3ef6f04d 100644 --- a/plotly/graph_objs/layout/scene/_yaxis.py +++ b/plotly/graph_objs/layout/scene/_yaxis.py @@ -150,8 +150,11 @@ def backgroundcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -262,8 +265,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -351,8 +357,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -447,8 +456,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -833,8 +845,11 @@ def spikecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -942,8 +957,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -1298,8 +1316,11 @@ def zerolinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/_zaxis.py b/plotly/graph_objs/layout/scene/_zaxis.py index c55e9db1f6..10ef12bcb7 100644 --- a/plotly/graph_objs/layout/scene/_zaxis.py +++ b/plotly/graph_objs/layout/scene/_zaxis.py @@ -150,8 +150,11 @@ def backgroundcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -262,8 +265,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -351,8 +357,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -447,8 +456,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -833,8 +845,11 @@ def spikecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -942,8 +957,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -1298,8 +1316,11 @@ def zerolinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/annotation/_font.py b/plotly/graph_objs/layout/scene/annotation/_font.py index 1c0c8be593..95c6c61080 100644 --- a/plotly/graph_objs/layout/scene/annotation/_font.py +++ b/plotly/graph_objs/layout/scene/annotation/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py b/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py index c3171d58d1..95ed679110 100644 --- a/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py +++ b/plotly/graph_objs/layout/scene/annotation/_hoverlabel.py @@ -24,8 +24,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -51,8 +54,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py b/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py index b904afe91e..665528b7ed 100644 --- a/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py +++ b/plotly/graph_objs/layout/scene/annotation/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/xaxis/_tickfont.py b/plotly/graph_objs/layout/scene/xaxis/_tickfont.py index f2b70abb9e..29c627064b 100644 --- a/plotly/graph_objs/layout/scene/xaxis/_tickfont.py +++ b/plotly/graph_objs/layout/scene/xaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/xaxis/title/_font.py b/plotly/graph_objs/layout/scene/xaxis/title/_font.py index e473ea1309..284485b649 100644 --- a/plotly/graph_objs/layout/scene/xaxis/title/_font.py +++ b/plotly/graph_objs/layout/scene/xaxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/yaxis/_tickfont.py b/plotly/graph_objs/layout/scene/yaxis/_tickfont.py index ecc22213d3..020b706d78 100644 --- a/plotly/graph_objs/layout/scene/yaxis/_tickfont.py +++ b/plotly/graph_objs/layout/scene/yaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/yaxis/title/_font.py b/plotly/graph_objs/layout/scene/yaxis/title/_font.py index 1bc9e81167..ae548cdcb4 100644 --- a/plotly/graph_objs/layout/scene/yaxis/title/_font.py +++ b/plotly/graph_objs/layout/scene/yaxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/zaxis/_tickfont.py b/plotly/graph_objs/layout/scene/zaxis/_tickfont.py index f9711dccd7..d74903770a 100644 --- a/plotly/graph_objs/layout/scene/zaxis/_tickfont.py +++ b/plotly/graph_objs/layout/scene/zaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/scene/zaxis/title/_font.py b/plotly/graph_objs/layout/scene/zaxis/title/_font.py index 8ac4326d9c..ebcfb202ab 100644 --- a/plotly/graph_objs/layout/scene/zaxis/title/_font.py +++ b/plotly/graph_objs/layout/scene/zaxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/selection/_line.py b/plotly/graph_objs/layout/selection/_line.py index 57e17c6802..d8a2d2ba1a 100644 --- a/plotly/graph_objs/layout/selection/_line.py +++ b/plotly/graph_objs/layout/selection/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/shape/_line.py b/plotly/graph_objs/layout/shape/_line.py index 0ccc054b51..d808e17dc3 100644 --- a/plotly/graph_objs/layout/shape/_line.py +++ b/plotly/graph_objs/layout/shape/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/shape/label/_font.py b/plotly/graph_objs/layout/shape/label/_font.py index 619539cc74..f11567c6dd 100644 --- a/plotly/graph_objs/layout/shape/label/_font.py +++ b/plotly/graph_objs/layout/shape/label/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py b/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py index 6aa1439c6f..415c536a00 100644 --- a/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py +++ b/plotly/graph_objs/layout/shape/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/slider/_font.py b/plotly/graph_objs/layout/slider/_font.py index f72e184cd4..46f8d5e0f7 100644 --- a/plotly/graph_objs/layout/slider/_font.py +++ b/plotly/graph_objs/layout/slider/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/slider/currentvalue/_font.py b/plotly/graph_objs/layout/slider/currentvalue/_font.py index 24f4ceeabc..3f5706725c 100644 --- a/plotly/graph_objs/layout/slider/currentvalue/_font.py +++ b/plotly/graph_objs/layout/slider/currentvalue/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/smith/_imaginaryaxis.py b/plotly/graph_objs/layout/smith/_imaginaryaxis.py index a98b5ef851..91e4dbdcce 100644 --- a/plotly/graph_objs/layout/smith/_imaginaryaxis.py +++ b/plotly/graph_objs/layout/smith/_imaginaryaxis.py @@ -50,8 +50,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -75,8 +78,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -219,8 +225,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -358,8 +367,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/smith/_realaxis.py b/plotly/graph_objs/layout/smith/_realaxis.py index 6f71d670d6..93ad8e8e92 100644 --- a/plotly/graph_objs/layout/smith/_realaxis.py +++ b/plotly/graph_objs/layout/smith/_realaxis.py @@ -52,8 +52,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -77,8 +80,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -221,8 +227,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -402,8 +411,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py b/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py index fdf8080605..6612b88fea 100644 --- a/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py +++ b/plotly/graph_objs/layout/smith/imaginaryaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/smith/realaxis/_tickfont.py b/plotly/graph_objs/layout/smith/realaxis/_tickfont.py index 32a63aaf21..bf30e67c7d 100644 --- a/plotly/graph_objs/layout/smith/realaxis/_tickfont.py +++ b/plotly/graph_objs/layout/smith/realaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/ternary/_aaxis.py b/plotly/graph_objs/layout/ternary/_aaxis.py index 44c5451c12..3a9f810643 100644 --- a/plotly/graph_objs/layout/ternary/_aaxis.py +++ b/plotly/graph_objs/layout/ternary/_aaxis.py @@ -65,8 +65,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -154,8 +157,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -298,8 +304,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -585,8 +594,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/ternary/_baxis.py b/plotly/graph_objs/layout/ternary/_baxis.py index 565116918d..3d708f5758 100644 --- a/plotly/graph_objs/layout/ternary/_baxis.py +++ b/plotly/graph_objs/layout/ternary/_baxis.py @@ -65,8 +65,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -154,8 +157,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -298,8 +304,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -585,8 +594,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/ternary/_caxis.py b/plotly/graph_objs/layout/ternary/_caxis.py index 100c400e7f..041305f927 100644 --- a/plotly/graph_objs/layout/ternary/_caxis.py +++ b/plotly/graph_objs/layout/ternary/_caxis.py @@ -65,8 +65,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -154,8 +157,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -298,8 +304,11 @@ def linecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -585,8 +594,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py b/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py index 91abc93e44..fa17ba960b 100644 --- a/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py +++ b/plotly/graph_objs/layout/ternary/aaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/ternary/aaxis/title/_font.py b/plotly/graph_objs/layout/ternary/aaxis/title/_font.py index 6ac468bec0..75464244be 100644 --- a/plotly/graph_objs/layout/ternary/aaxis/title/_font.py +++ b/plotly/graph_objs/layout/ternary/aaxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/ternary/baxis/_tickfont.py b/plotly/graph_objs/layout/ternary/baxis/_tickfont.py index 241fc5e3d8..19db1d6f3e 100644 --- a/plotly/graph_objs/layout/ternary/baxis/_tickfont.py +++ b/plotly/graph_objs/layout/ternary/baxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/ternary/baxis/title/_font.py b/plotly/graph_objs/layout/ternary/baxis/title/_font.py index 24590bec92..c655f6c90e 100644 --- a/plotly/graph_objs/layout/ternary/baxis/title/_font.py +++ b/plotly/graph_objs/layout/ternary/baxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/ternary/caxis/_tickfont.py b/plotly/graph_objs/layout/ternary/caxis/_tickfont.py index cb0e6cb2ac..76bc1cba1a 100644 --- a/plotly/graph_objs/layout/ternary/caxis/_tickfont.py +++ b/plotly/graph_objs/layout/ternary/caxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/ternary/caxis/title/_font.py b/plotly/graph_objs/layout/ternary/caxis/title/_font.py index e5e2f014ab..57c7a74e13 100644 --- a/plotly/graph_objs/layout/ternary/caxis/title/_font.py +++ b/plotly/graph_objs/layout/ternary/caxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/title/_font.py b/plotly/graph_objs/layout/title/_font.py index 1d5df6f683..af10951362 100644 --- a/plotly/graph_objs/layout/title/_font.py +++ b/plotly/graph_objs/layout/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/title/subtitle/_font.py b/plotly/graph_objs/layout/title/subtitle/_font.py index 7da48fed20..b245e05175 100644 --- a/plotly/graph_objs/layout/title/subtitle/_font.py +++ b/plotly/graph_objs/layout/title/subtitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/updatemenu/_font.py b/plotly/graph_objs/layout/updatemenu/_font.py index 098b364e8a..0d448c0755 100644 --- a/plotly/graph_objs/layout/updatemenu/_font.py +++ b/plotly/graph_objs/layout/updatemenu/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/xaxis/_minor.py b/plotly/graph_objs/layout/xaxis/_minor.py index 7695588d19..b5fcc47f83 100644 --- a/plotly/graph_objs/layout/xaxis/_minor.py +++ b/plotly/graph_objs/layout/xaxis/_minor.py @@ -72,8 +72,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -205,8 +208,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/xaxis/_rangeselector.py b/plotly/graph_objs/layout/xaxis/_rangeselector.py index fbd623f6df..4da5bbc783 100644 --- a/plotly/graph_objs/layout/xaxis/_rangeselector.py +++ b/plotly/graph_objs/layout/xaxis/_rangeselector.py @@ -35,8 +35,11 @@ def activecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -60,8 +63,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -85,8 +91,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/xaxis/_rangeslider.py b/plotly/graph_objs/layout/xaxis/_rangeslider.py index 03bb34be96..3ef33b3e81 100644 --- a/plotly/graph_objs/layout/xaxis/_rangeslider.py +++ b/plotly/graph_objs/layout/xaxis/_rangeslider.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -76,8 +79,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/xaxis/_tickfont.py b/plotly/graph_objs/layout/xaxis/_tickfont.py index 13d88f2f69..5c6819ce9d 100644 --- a/plotly/graph_objs/layout/xaxis/_tickfont.py +++ b/plotly/graph_objs/layout/xaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/xaxis/rangeselector/_font.py b/plotly/graph_objs/layout/xaxis/rangeselector/_font.py index 58523c07ea..6744229640 100644 --- a/plotly/graph_objs/layout/xaxis/rangeselector/_font.py +++ b/plotly/graph_objs/layout/xaxis/rangeselector/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/xaxis/title/_font.py b/plotly/graph_objs/layout/xaxis/title/_font.py index 74f19b6cb0..927a35178f 100644 --- a/plotly/graph_objs/layout/xaxis/title/_font.py +++ b/plotly/graph_objs/layout/xaxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/yaxis/_minor.py b/plotly/graph_objs/layout/yaxis/_minor.py index a548d50e1b..6e57bdf896 100644 --- a/plotly/graph_objs/layout/yaxis/_minor.py +++ b/plotly/graph_objs/layout/yaxis/_minor.py @@ -72,8 +72,11 @@ def gridcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -205,8 +208,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/yaxis/_tickfont.py b/plotly/graph_objs/layout/yaxis/_tickfont.py index 7d56af87fb..93130bc2b1 100644 --- a/plotly/graph_objs/layout/yaxis/_tickfont.py +++ b/plotly/graph_objs/layout/yaxis/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/layout/yaxis/title/_font.py b/plotly/graph_objs/layout/yaxis/title/_font.py index e71f548598..d89905bdcf 100644 --- a/plotly/graph_objs/layout/yaxis/title/_font.py +++ b/plotly/graph_objs/layout/yaxis/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/mesh3d/_colorbar.py b/plotly/graph_objs/mesh3d/_colorbar.py index 7f2d14c6fa..945f75b73e 100644 --- a/plotly/graph_objs/mesh3d/_colorbar.py +++ b/plotly/graph_objs/mesh3d/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/mesh3d/_contour.py b/plotly/graph_objs/mesh3d/_contour.py index 82ae20130d..cba4c0ee2e 100644 --- a/plotly/graph_objs/mesh3d/_contour.py +++ b/plotly/graph_objs/mesh3d/_contour.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/mesh3d/_hoverlabel.py b/plotly/graph_objs/mesh3d/_hoverlabel.py index 2dd2f72198..427f90feb5 100644 --- a/plotly/graph_objs/mesh3d/_hoverlabel.py +++ b/plotly/graph_objs/mesh3d/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/mesh3d/colorbar/_tickfont.py b/plotly/graph_objs/mesh3d/colorbar/_tickfont.py index 31a9a2e38d..d3d2161e29 100644 --- a/plotly/graph_objs/mesh3d/colorbar/_tickfont.py +++ b/plotly/graph_objs/mesh3d/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/mesh3d/colorbar/title/_font.py b/plotly/graph_objs/mesh3d/colorbar/title/_font.py index 25014dffeb..64eac27a33 100644 --- a/plotly/graph_objs/mesh3d/colorbar/title/_font.py +++ b/plotly/graph_objs/mesh3d/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/mesh3d/hoverlabel/_font.py b/plotly/graph_objs/mesh3d/hoverlabel/_font.py index 382a58a3d1..1a126cfdb1 100644 --- a/plotly/graph_objs/mesh3d/hoverlabel/_font.py +++ b/plotly/graph_objs/mesh3d/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py b/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py index e5609c267d..18e9aa184e 100644 --- a/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py +++ b/plotly/graph_objs/mesh3d/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/ohlc/_hoverlabel.py b/plotly/graph_objs/ohlc/_hoverlabel.py index 174af28522..e0c4f6a66c 100644 --- a/plotly/graph_objs/ohlc/_hoverlabel.py +++ b/plotly/graph_objs/ohlc/_hoverlabel.py @@ -52,8 +52,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -78,8 +81,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/ohlc/decreasing/_line.py b/plotly/graph_objs/ohlc/decreasing/_line.py index 3340c478f5..05aad6ed43 100644 --- a/plotly/graph_objs/ohlc/decreasing/_line.py +++ b/plotly/graph_objs/ohlc/decreasing/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/ohlc/hoverlabel/_font.py b/plotly/graph_objs/ohlc/hoverlabel/_font.py index 234d5ad6a3..0d9d193c9a 100644 --- a/plotly/graph_objs/ohlc/hoverlabel/_font.py +++ b/plotly/graph_objs/ohlc/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/ohlc/increasing/_line.py b/plotly/graph_objs/ohlc/increasing/_line.py index 0a534a1423..9bd3ad1785 100644 --- a/plotly/graph_objs/ohlc/increasing/_line.py +++ b/plotly/graph_objs/ohlc/increasing/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/ohlc/legendgrouptitle/_font.py b/plotly/graph_objs/ohlc/legendgrouptitle/_font.py index 4f7f1a35e1..fb2633919d 100644 --- a/plotly/graph_objs/ohlc/legendgrouptitle/_font.py +++ b/plotly/graph_objs/ohlc/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcats/_labelfont.py b/plotly/graph_objs/parcats/_labelfont.py index cf580431ff..faa6f553e3 100644 --- a/plotly/graph_objs/parcats/_labelfont.py +++ b/plotly/graph_objs/parcats/_labelfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcats/_line.py b/plotly/graph_objs/parcats/_line.py index 6631327f59..610f7511a5 100644 --- a/plotly/graph_objs/parcats/_line.py +++ b/plotly/graph_objs/parcats/_line.py @@ -150,8 +150,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to parcats.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/parcats/_tickfont.py b/plotly/graph_objs/parcats/_tickfont.py index be56df0a63..236affe2a8 100644 --- a/plotly/graph_objs/parcats/_tickfont.py +++ b/plotly/graph_objs/parcats/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcats/legendgrouptitle/_font.py b/plotly/graph_objs/parcats/legendgrouptitle/_font.py index 4ac1440174..1244ac9d9f 100644 --- a/plotly/graph_objs/parcats/legendgrouptitle/_font.py +++ b/plotly/graph_objs/parcats/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcats/line/_colorbar.py b/plotly/graph_objs/parcats/line/_colorbar.py index ef513d7c13..39290aec24 100644 --- a/plotly/graph_objs/parcats/line/_colorbar.py +++ b/plotly/graph_objs/parcats/line/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcats/line/colorbar/_tickfont.py b/plotly/graph_objs/parcats/line/colorbar/_tickfont.py index d9261a59e9..36f6b4b6a3 100644 --- a/plotly/graph_objs/parcats/line/colorbar/_tickfont.py +++ b/plotly/graph_objs/parcats/line/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcats/line/colorbar/title/_font.py b/plotly/graph_objs/parcats/line/colorbar/title/_font.py index fbfc43ca6d..938903ca10 100644 --- a/plotly/graph_objs/parcats/line/colorbar/title/_font.py +++ b/plotly/graph_objs/parcats/line/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcoords/_labelfont.py b/plotly/graph_objs/parcoords/_labelfont.py index 09c7755f11..008a7e8300 100644 --- a/plotly/graph_objs/parcoords/_labelfont.py +++ b/plotly/graph_objs/parcoords/_labelfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcoords/_line.py b/plotly/graph_objs/parcoords/_line.py index cb4fe26470..09e6e84604 100644 --- a/plotly/graph_objs/parcoords/_line.py +++ b/plotly/graph_objs/parcoords/_line.py @@ -147,8 +147,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to parcoords.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/parcoords/_rangefont.py b/plotly/graph_objs/parcoords/_rangefont.py index 82e459ae47..9eff8dd9bf 100644 --- a/plotly/graph_objs/parcoords/_rangefont.py +++ b/plotly/graph_objs/parcoords/_rangefont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcoords/_tickfont.py b/plotly/graph_objs/parcoords/_tickfont.py index ecf8feb3fb..b43932ed76 100644 --- a/plotly/graph_objs/parcoords/_tickfont.py +++ b/plotly/graph_objs/parcoords/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcoords/legendgrouptitle/_font.py b/plotly/graph_objs/parcoords/legendgrouptitle/_font.py index 9298a820e9..234872ae5d 100644 --- a/plotly/graph_objs/parcoords/legendgrouptitle/_font.py +++ b/plotly/graph_objs/parcoords/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcoords/line/_colorbar.py b/plotly/graph_objs/parcoords/line/_colorbar.py index 16bcacf507..a8559ea37d 100644 --- a/plotly/graph_objs/parcoords/line/_colorbar.py +++ b/plotly/graph_objs/parcoords/line/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py b/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py index d23c882fbc..138a3208e4 100644 --- a/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py +++ b/plotly/graph_objs/parcoords/line/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcoords/line/colorbar/title/_font.py b/plotly/graph_objs/parcoords/line/colorbar/title/_font.py index b311a93625..01c6914c70 100644 --- a/plotly/graph_objs/parcoords/line/colorbar/title/_font.py +++ b/plotly/graph_objs/parcoords/line/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/parcoords/unselected/_line.py b/plotly/graph_objs/parcoords/unselected/_line.py index 757cf3f1c0..f74d15a17f 100644 --- a/plotly/graph_objs/parcoords/unselected/_line.py +++ b/plotly/graph_objs/parcoords/unselected/_line.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/pie/_hoverlabel.py b/plotly/graph_objs/pie/_hoverlabel.py index 7428c50111..2ecd31791e 100644 --- a/plotly/graph_objs/pie/_hoverlabel.py +++ b/plotly/graph_objs/pie/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/pie/_insidetextfont.py b/plotly/graph_objs/pie/_insidetextfont.py index f906716ef5..da3715ea6e 100644 --- a/plotly/graph_objs/pie/_insidetextfont.py +++ b/plotly/graph_objs/pie/_insidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/pie/_outsidetextfont.py b/plotly/graph_objs/pie/_outsidetextfont.py index d1b933eac7..b7042a9c77 100644 --- a/plotly/graph_objs/pie/_outsidetextfont.py +++ b/plotly/graph_objs/pie/_outsidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/pie/_textfont.py b/plotly/graph_objs/pie/_textfont.py index 7e49921361..59eff17300 100644 --- a/plotly/graph_objs/pie/_textfont.py +++ b/plotly/graph_objs/pie/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/pie/hoverlabel/_font.py b/plotly/graph_objs/pie/hoverlabel/_font.py index 8988710fda..3c0f2909a3 100644 --- a/plotly/graph_objs/pie/hoverlabel/_font.py +++ b/plotly/graph_objs/pie/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/pie/legendgrouptitle/_font.py b/plotly/graph_objs/pie/legendgrouptitle/_font.py index cb7f9edb87..0a3960cfa3 100644 --- a/plotly/graph_objs/pie/legendgrouptitle/_font.py +++ b/plotly/graph_objs/pie/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/pie/marker/_line.py b/plotly/graph_objs/pie/marker/_line.py index 24b3348f22..6d3a1a03e2 100644 --- a/plotly/graph_objs/pie/marker/_line.py +++ b/plotly/graph_objs/pie/marker/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/pie/marker/_pattern.py b/plotly/graph_objs/pie/marker/_pattern.py index 4cb0781224..2feb5fcb32 100644 --- a/plotly/graph_objs/pie/marker/_pattern.py +++ b/plotly/graph_objs/pie/marker/_pattern.py @@ -34,8 +34,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -63,8 +66,11 @@ def fgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/pie/title/_font.py b/plotly/graph_objs/pie/title/_font.py index 933a221b84..37ada3772f 100644 --- a/plotly/graph_objs/pie/title/_font.py +++ b/plotly/graph_objs/pie/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/quiver/_hoverlabel.py b/plotly/graph_objs/quiver/_hoverlabel.py index 70fd5c119f..be2dab00c4 100644 --- a/plotly/graph_objs/quiver/_hoverlabel.py +++ b/plotly/graph_objs/quiver/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/quiver/_marker.py b/plotly/graph_objs/quiver/_marker.py index a9b68b45b4..80d23c4fac 100644 --- a/plotly/graph_objs/quiver/_marker.py +++ b/plotly/graph_objs/quiver/_marker.py @@ -27,7 +27,7 @@ class Marker(_BaseTraceHierarchyType): @property def arrowsize(self): """ - Sets the size of the arrow head relative to + Sets the size of the vector arrowhead relative to `marker.line.width`. A value of 1 (default) gives a head about 3x as wide as the line. @@ -170,8 +170,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to quiver.marker.colorscale - A list or array of any of the above @@ -346,7 +349,7 @@ def showscale(self, val): def _prop_descriptions(self): return """\ arrowsize - Sets the size of the arrow head relative to + Sets the size of the vector arrowhead relative to `marker.line.width`. A value of 1 (default) gives a head about 3x as wide as the line. autocolorscale @@ -454,7 +457,7 @@ def __init__( dict of properties compatible with this constructor or an instance of :class:`plotly.graph_objs.quiver.Marker` arrowsize - Sets the size of the arrow head relative to + Sets the size of the vector arrowhead relative to `marker.line.width`. A value of 1 (default) gives a head about 3x as wide as the line. autocolorscale diff --git a/plotly/graph_objs/quiver/_textfont.py b/plotly/graph_objs/quiver/_textfont.py index a59ae1e019..313ee08aa4 100644 --- a/plotly/graph_objs/quiver/_textfont.py +++ b/plotly/graph_objs/quiver/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/quiver/hoverlabel/_font.py b/plotly/graph_objs/quiver/hoverlabel/_font.py index 2468dbcbae..f4d7ba4b02 100644 --- a/plotly/graph_objs/quiver/hoverlabel/_font.py +++ b/plotly/graph_objs/quiver/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/quiver/legendgrouptitle/_font.py b/plotly/graph_objs/quiver/legendgrouptitle/_font.py index 3cdb3f9a85..18ac3f8414 100644 --- a/plotly/graph_objs/quiver/legendgrouptitle/_font.py +++ b/plotly/graph_objs/quiver/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/quiver/marker/_colorbar.py b/plotly/graph_objs/quiver/marker/_colorbar.py index 42e86c133b..659ef4f29f 100644 --- a/plotly/graph_objs/quiver/marker/_colorbar.py +++ b/plotly/graph_objs/quiver/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/quiver/marker/_line.py b/plotly/graph_objs/quiver/marker/_line.py index 0fdadbc41f..62e58b5166 100644 --- a/plotly/graph_objs/quiver/marker/_line.py +++ b/plotly/graph_objs/quiver/marker/_line.py @@ -37,7 +37,7 @@ def dash(self, val): @property def width(self): """ - Sets the width (in px) of the arrow lines. + Sets the width (in px) of the vector arrow lines. The 'width' property is a number and may be specified as: - An int or float in the interval [0, inf] @@ -61,7 +61,7 @@ def _prop_descriptions(self): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). width - Sets the width (in px) of the arrow lines. + Sets the width (in px) of the vector arrow lines. """ def __init__(self, arg=None, dash=None, width=None, **kwargs): @@ -80,7 +80,7 @@ def __init__(self, arg=None, dash=None, width=None, **kwargs): "longdashdot") or a dash length list in px (eg "5px,10px,2px,2px"). width - Sets the width (in px) of the arrow lines. + Sets the width (in px) of the vector arrow lines. Returns ------- diff --git a/plotly/graph_objs/quiver/marker/colorbar/_tickfont.py b/plotly/graph_objs/quiver/marker/colorbar/_tickfont.py index 35d95d6322..9b8094e01b 100644 --- a/plotly/graph_objs/quiver/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/quiver/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/quiver/marker/colorbar/title/_font.py b/plotly/graph_objs/quiver/marker/colorbar/title/_font.py index 65d260d2a8..c1627bb9f0 100644 --- a/plotly/graph_objs/quiver/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/quiver/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/quiver/selected/_marker.py b/plotly/graph_objs/quiver/selected/_marker.py index be1acf5952..bb4ac8647e 100644 --- a/plotly/graph_objs/quiver/selected/_marker.py +++ b/plotly/graph_objs/quiver/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/quiver/selected/_textfont.py b/plotly/graph_objs/quiver/selected/_textfont.py index ccefc92946..71f798aa85 100644 --- a/plotly/graph_objs/quiver/selected/_textfont.py +++ b/plotly/graph_objs/quiver/selected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/quiver/unselected/_marker.py b/plotly/graph_objs/quiver/unselected/_marker.py index f31772e954..aa429c5b0a 100644 --- a/plotly/graph_objs/quiver/unselected/_marker.py +++ b/plotly/graph_objs/quiver/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/quiver/unselected/_textfont.py b/plotly/graph_objs/quiver/unselected/_textfont.py index 52df17c04d..d249ddbf02 100644 --- a/plotly/graph_objs/quiver/unselected/_textfont.py +++ b/plotly/graph_objs/quiver/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/sankey/_hoverlabel.py b/plotly/graph_objs/sankey/_hoverlabel.py index 16380babab..1afe5aeea0 100644 --- a/plotly/graph_objs/sankey/_hoverlabel.py +++ b/plotly/graph_objs/sankey/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sankey/_link.py b/plotly/graph_objs/sankey/_link.py index b46fc27171..58df4bad8d 100644 --- a/plotly/graph_objs/sankey/_link.py +++ b/plotly/graph_objs/sankey/_link.py @@ -60,8 +60,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -150,8 +153,11 @@ def hovercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sankey/_node.py b/plotly/graph_objs/sankey/_node.py index 205892071c..aa72e6a6fe 100644 --- a/plotly/graph_objs/sankey/_node.py +++ b/plotly/graph_objs/sankey/_node.py @@ -63,8 +63,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sankey/_textfont.py b/plotly/graph_objs/sankey/_textfont.py index f58df1d24d..07ffe96d60 100644 --- a/plotly/graph_objs/sankey/_textfont.py +++ b/plotly/graph_objs/sankey/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/sankey/hoverlabel/_font.py b/plotly/graph_objs/sankey/hoverlabel/_font.py index 4f79e26bfc..3fc1c3fa2d 100644 --- a/plotly/graph_objs/sankey/hoverlabel/_font.py +++ b/plotly/graph_objs/sankey/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sankey/legendgrouptitle/_font.py b/plotly/graph_objs/sankey/legendgrouptitle/_font.py index 42ce2212dc..5c37f11ab4 100644 --- a/plotly/graph_objs/sankey/legendgrouptitle/_font.py +++ b/plotly/graph_objs/sankey/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/sankey/link/_hoverlabel.py b/plotly/graph_objs/sankey/link/_hoverlabel.py index 96b44e27fa..9f8e8ec1fd 100644 --- a/plotly/graph_objs/sankey/link/_hoverlabel.py +++ b/plotly/graph_objs/sankey/link/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sankey/link/_line.py b/plotly/graph_objs/sankey/link/_line.py index 8e64a7b640..b193ab4db5 100644 --- a/plotly/graph_objs/sankey/link/_line.py +++ b/plotly/graph_objs/sankey/link/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sankey/link/hoverlabel/_font.py b/plotly/graph_objs/sankey/link/hoverlabel/_font.py index 6e1be067c3..13398c26ed 100644 --- a/plotly/graph_objs/sankey/link/hoverlabel/_font.py +++ b/plotly/graph_objs/sankey/link/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sankey/node/_hoverlabel.py b/plotly/graph_objs/sankey/node/_hoverlabel.py index ad7632bcae..b3a1118fea 100644 --- a/plotly/graph_objs/sankey/node/_hoverlabel.py +++ b/plotly/graph_objs/sankey/node/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sankey/node/_line.py b/plotly/graph_objs/sankey/node/_line.py index 460a1d8b89..00f298ce1a 100644 --- a/plotly/graph_objs/sankey/node/_line.py +++ b/plotly/graph_objs/sankey/node/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sankey/node/hoverlabel/_font.py b/plotly/graph_objs/sankey/node/hoverlabel/_font.py index 56813e856c..10f77f289f 100644 --- a/plotly/graph_objs/sankey/node/hoverlabel/_font.py +++ b/plotly/graph_objs/sankey/node/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatter/_error_x.py b/plotly/graph_objs/scatter/_error_x.py index a789cfecb1..acf3bd0711 100644 --- a/plotly/graph_objs/scatter/_error_x.py +++ b/plotly/graph_objs/scatter/_error_x.py @@ -75,8 +75,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter/_error_y.py b/plotly/graph_objs/scatter/_error_y.py index 9aa029e10e..6b512033ca 100644 --- a/plotly/graph_objs/scatter/_error_y.py +++ b/plotly/graph_objs/scatter/_error_y.py @@ -74,8 +74,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter/_fillpattern.py b/plotly/graph_objs/scatter/_fillpattern.py index df52ba8486..63a3927d08 100644 --- a/plotly/graph_objs/scatter/_fillpattern.py +++ b/plotly/graph_objs/scatter/_fillpattern.py @@ -34,8 +34,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -63,8 +66,11 @@ def fgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatter/_hoverlabel.py b/plotly/graph_objs/scatter/_hoverlabel.py index 509dc542ee..1213eb126d 100644 --- a/plotly/graph_objs/scatter/_hoverlabel.py +++ b/plotly/graph_objs/scatter/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatter/_line.py b/plotly/graph_objs/scatter/_line.py index 64a1be0137..55e04d5f66 100644 --- a/plotly/graph_objs/scatter/_line.py +++ b/plotly/graph_objs/scatter/_line.py @@ -52,8 +52,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter/_marker.py b/plotly/graph_objs/scatter/_marker.py index 42da34bd8e..49eb37394f 100644 --- a/plotly/graph_objs/scatter/_marker.py +++ b/plotly/graph_objs/scatter/_marker.py @@ -201,8 +201,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatter.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatter/_textfont.py b/plotly/graph_objs/scatter/_textfont.py index 0aa5bcc7b5..143e9a1b2f 100644 --- a/plotly/graph_objs/scatter/_textfont.py +++ b/plotly/graph_objs/scatter/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatter/hoverlabel/_font.py b/plotly/graph_objs/scatter/hoverlabel/_font.py index bb0223bdd6..c7320f80d8 100644 --- a/plotly/graph_objs/scatter/hoverlabel/_font.py +++ b/plotly/graph_objs/scatter/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatter/legendgrouptitle/_font.py b/plotly/graph_objs/scatter/legendgrouptitle/_font.py index 5fa6262c8f..45934f384a 100644 --- a/plotly/graph_objs/scatter/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatter/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter/marker/_colorbar.py b/plotly/graph_objs/scatter/marker/_colorbar.py index 2330eb5823..8cf2b6a3be 100644 --- a/plotly/graph_objs/scatter/marker/_colorbar.py +++ b/plotly/graph_objs/scatter/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter/marker/_gradient.py b/plotly/graph_objs/scatter/marker/_gradient.py index 972894aba9..f42ab4f792 100644 --- a/plotly/graph_objs/scatter/marker/_gradient.py +++ b/plotly/graph_objs/scatter/marker/_gradient.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatter/marker/_line.py b/plotly/graph_objs/scatter/marker/_line.py index 1a527017b2..7713759d83 100644 --- a/plotly/graph_objs/scatter/marker/_line.py +++ b/plotly/graph_objs/scatter/marker/_line.py @@ -149,8 +149,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatter.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py index 83021c3f39..3ec47de65f 100644 --- a/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatter/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter/marker/colorbar/title/_font.py b/plotly/graph_objs/scatter/marker/colorbar/title/_font.py index 96dcffe2c1..2feaff5105 100644 --- a/plotly/graph_objs/scatter/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatter/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter/selected/_marker.py b/plotly/graph_objs/scatter/selected/_marker.py index 8ad09d471b..b1606c7271 100644 --- a/plotly/graph_objs/scatter/selected/_marker.py +++ b/plotly/graph_objs/scatter/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter/selected/_textfont.py b/plotly/graph_objs/scatter/selected/_textfont.py index aef09ef228..64bf5a97cf 100644 --- a/plotly/graph_objs/scatter/selected/_textfont.py +++ b/plotly/graph_objs/scatter/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter/unselected/_marker.py b/plotly/graph_objs/scatter/unselected/_marker.py index 154bd76869..e31a34a5cf 100644 --- a/plotly/graph_objs/scatter/unselected/_marker.py +++ b/plotly/graph_objs/scatter/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter/unselected/_textfont.py b/plotly/graph_objs/scatter/unselected/_textfont.py index fb5f331302..f2dc3666d3 100644 --- a/plotly/graph_objs/scatter/unselected/_textfont.py +++ b/plotly/graph_objs/scatter/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter3d/_error_x.py b/plotly/graph_objs/scatter3d/_error_x.py index 3125144aa8..2581cd32c2 100644 --- a/plotly/graph_objs/scatter3d/_error_x.py +++ b/plotly/graph_objs/scatter3d/_error_x.py @@ -75,8 +75,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter3d/_error_y.py b/plotly/graph_objs/scatter3d/_error_y.py index 80f3ec1914..570671ba93 100644 --- a/plotly/graph_objs/scatter3d/_error_y.py +++ b/plotly/graph_objs/scatter3d/_error_y.py @@ -75,8 +75,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter3d/_error_z.py b/plotly/graph_objs/scatter3d/_error_z.py index aa564c9a65..0ec6da86ca 100644 --- a/plotly/graph_objs/scatter3d/_error_z.py +++ b/plotly/graph_objs/scatter3d/_error_z.py @@ -74,8 +74,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter3d/_hoverlabel.py b/plotly/graph_objs/scatter3d/_hoverlabel.py index ce06d4f7c9..8d1f60c104 100644 --- a/plotly/graph_objs/scatter3d/_hoverlabel.py +++ b/plotly/graph_objs/scatter3d/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatter3d/_line.py b/plotly/graph_objs/scatter3d/_line.py index 100409556f..f901d088cc 100644 --- a/plotly/graph_objs/scatter3d/_line.py +++ b/plotly/graph_objs/scatter3d/_line.py @@ -149,8 +149,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatter3d.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatter3d/_marker.py b/plotly/graph_objs/scatter3d/_marker.py index 3437ac4a11..c7e6a9c56c 100644 --- a/plotly/graph_objs/scatter3d/_marker.py +++ b/plotly/graph_objs/scatter3d/_marker.py @@ -155,8 +155,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatter3d.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatter3d/_textfont.py b/plotly/graph_objs/scatter3d/_textfont.py index 3ab7f79fc9..4416eaf2e5 100644 --- a/plotly/graph_objs/scatter3d/_textfont.py +++ b/plotly/graph_objs/scatter3d/_textfont.py @@ -20,8 +20,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatter3d/hoverlabel/_font.py b/plotly/graph_objs/scatter3d/hoverlabel/_font.py index 5c8fdae9fb..68837a8ece 100644 --- a/plotly/graph_objs/scatter3d/hoverlabel/_font.py +++ b/plotly/graph_objs/scatter3d/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py b/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py index b28671d41a..c65379d772 100644 --- a/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatter3d/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter3d/line/_colorbar.py b/plotly/graph_objs/scatter3d/line/_colorbar.py index 6d7148c29c..fbc04e76fd 100644 --- a/plotly/graph_objs/scatter3d/line/_colorbar.py +++ b/plotly/graph_objs/scatter3d/line/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py b/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py index 15047652d8..49c45e1035 100644 --- a/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatter3d/line/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py b/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py index d140c161c1..b75401ae6f 100644 --- a/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py +++ b/plotly/graph_objs/scatter3d/line/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter3d/marker/_colorbar.py b/plotly/graph_objs/scatter3d/marker/_colorbar.py index f91c4b5e07..56fff7c6a1 100644 --- a/plotly/graph_objs/scatter3d/marker/_colorbar.py +++ b/plotly/graph_objs/scatter3d/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter3d/marker/_line.py b/plotly/graph_objs/scatter3d/marker/_line.py index 1335ed5ae3..ada00a6ade 100644 --- a/plotly/graph_objs/scatter3d/marker/_line.py +++ b/plotly/graph_objs/scatter3d/marker/_line.py @@ -148,8 +148,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatter3d.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py index 21ec500da0..03423c4cbb 100644 --- a/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatter3d/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py b/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py index cbcc801e0e..a1d9e114b7 100644 --- a/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatter3d/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattercarpet/_hoverlabel.py b/plotly/graph_objs/scattercarpet/_hoverlabel.py index edd7fd6f45..a2481985e5 100644 --- a/plotly/graph_objs/scattercarpet/_hoverlabel.py +++ b/plotly/graph_objs/scattercarpet/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattercarpet/_line.py b/plotly/graph_objs/scattercarpet/_line.py index f11b494faf..094bda5a4a 100644 --- a/plotly/graph_objs/scattercarpet/_line.py +++ b/plotly/graph_objs/scattercarpet/_line.py @@ -44,8 +44,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattercarpet/_marker.py b/plotly/graph_objs/scattercarpet/_marker.py index 97c7f9adc5..88c57e2fd9 100644 --- a/plotly/graph_objs/scattercarpet/_marker.py +++ b/plotly/graph_objs/scattercarpet/_marker.py @@ -201,8 +201,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scattercarpet.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scattercarpet/_textfont.py b/plotly/graph_objs/scattercarpet/_textfont.py index 45289cc437..4a36cbd40c 100644 --- a/plotly/graph_objs/scattercarpet/_textfont.py +++ b/plotly/graph_objs/scattercarpet/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattercarpet/hoverlabel/_font.py b/plotly/graph_objs/scattercarpet/hoverlabel/_font.py index 1cda6db3cf..98d7b0602d 100644 --- a/plotly/graph_objs/scattercarpet/hoverlabel/_font.py +++ b/plotly/graph_objs/scattercarpet/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py b/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py index 9df223ffe4..ec35248e31 100644 --- a/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattercarpet/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattercarpet/marker/_colorbar.py b/plotly/graph_objs/scattercarpet/marker/_colorbar.py index 34bef11b5e..abce50f51a 100644 --- a/plotly/graph_objs/scattercarpet/marker/_colorbar.py +++ b/plotly/graph_objs/scattercarpet/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattercarpet/marker/_gradient.py b/plotly/graph_objs/scattercarpet/marker/_gradient.py index 209c281215..ee8670adc6 100644 --- a/plotly/graph_objs/scattercarpet/marker/_gradient.py +++ b/plotly/graph_objs/scattercarpet/marker/_gradient.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattercarpet/marker/_line.py b/plotly/graph_objs/scattercarpet/marker/_line.py index ef7afa012b..87dbb68e13 100644 --- a/plotly/graph_objs/scattercarpet/marker/_line.py +++ b/plotly/graph_objs/scattercarpet/marker/_line.py @@ -149,8 +149,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scattercarpet.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py index 7542ca23be..7dacc12cfd 100644 --- a/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattercarpet/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py b/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py index 6062583472..70fa386352 100644 --- a/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattercarpet/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattercarpet/selected/_marker.py b/plotly/graph_objs/scattercarpet/selected/_marker.py index 33c38c9029..c7c153e0fe 100644 --- a/plotly/graph_objs/scattercarpet/selected/_marker.py +++ b/plotly/graph_objs/scattercarpet/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattercarpet/selected/_textfont.py b/plotly/graph_objs/scattercarpet/selected/_textfont.py index 13eba24253..7a7aaae1be 100644 --- a/plotly/graph_objs/scattercarpet/selected/_textfont.py +++ b/plotly/graph_objs/scattercarpet/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattercarpet/unselected/_marker.py b/plotly/graph_objs/scattercarpet/unselected/_marker.py index 8a893b9a0a..c2e4b87562 100644 --- a/plotly/graph_objs/scattercarpet/unselected/_marker.py +++ b/plotly/graph_objs/scattercarpet/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattercarpet/unselected/_textfont.py b/plotly/graph_objs/scattercarpet/unselected/_textfont.py index 75efa4ac08..4e39d79141 100644 --- a/plotly/graph_objs/scattercarpet/unselected/_textfont.py +++ b/plotly/graph_objs/scattercarpet/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergeo/_hoverlabel.py b/plotly/graph_objs/scattergeo/_hoverlabel.py index a983ab3582..4824d08149 100644 --- a/plotly/graph_objs/scattergeo/_hoverlabel.py +++ b/plotly/graph_objs/scattergeo/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattergeo/_line.py b/plotly/graph_objs/scattergeo/_line.py index 3db2bbdbbb..d1c932d9c3 100644 --- a/plotly/graph_objs/scattergeo/_line.py +++ b/plotly/graph_objs/scattergeo/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergeo/_marker.py b/plotly/graph_objs/scattergeo/_marker.py index 167c66db35..63153705a9 100644 --- a/plotly/graph_objs/scattergeo/_marker.py +++ b/plotly/graph_objs/scattergeo/_marker.py @@ -202,8 +202,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scattergeo.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scattergeo/_textfont.py b/plotly/graph_objs/scattergeo/_textfont.py index 4d3a58a804..966a2be7a8 100644 --- a/plotly/graph_objs/scattergeo/_textfont.py +++ b/plotly/graph_objs/scattergeo/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattergeo/hoverlabel/_font.py b/plotly/graph_objs/scattergeo/hoverlabel/_font.py index dd33fc4075..f3caa0d967 100644 --- a/plotly/graph_objs/scattergeo/hoverlabel/_font.py +++ b/plotly/graph_objs/scattergeo/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py b/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py index 813b973f62..dd50cc0a10 100644 --- a/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattergeo/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergeo/marker/_colorbar.py b/plotly/graph_objs/scattergeo/marker/_colorbar.py index 2b2823814a..4c941651d8 100644 --- a/plotly/graph_objs/scattergeo/marker/_colorbar.py +++ b/plotly/graph_objs/scattergeo/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergeo/marker/_gradient.py b/plotly/graph_objs/scattergeo/marker/_gradient.py index 91ccb24a11..5d2d966826 100644 --- a/plotly/graph_objs/scattergeo/marker/_gradient.py +++ b/plotly/graph_objs/scattergeo/marker/_gradient.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattergeo/marker/_line.py b/plotly/graph_objs/scattergeo/marker/_line.py index 307063071b..1e620d0e34 100644 --- a/plotly/graph_objs/scattergeo/marker/_line.py +++ b/plotly/graph_objs/scattergeo/marker/_line.py @@ -149,8 +149,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scattergeo.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py index 5c154431a5..22c04b80b9 100644 --- a/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattergeo/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py b/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py index acb4496530..fda15f8a2a 100644 --- a/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattergeo/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergeo/selected/_marker.py b/plotly/graph_objs/scattergeo/selected/_marker.py index be76585719..83d61c0227 100644 --- a/plotly/graph_objs/scattergeo/selected/_marker.py +++ b/plotly/graph_objs/scattergeo/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergeo/selected/_textfont.py b/plotly/graph_objs/scattergeo/selected/_textfont.py index 51d3fd5254..0e0c4a2be0 100644 --- a/plotly/graph_objs/scattergeo/selected/_textfont.py +++ b/plotly/graph_objs/scattergeo/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergeo/unselected/_marker.py b/plotly/graph_objs/scattergeo/unselected/_marker.py index 13fc08e729..de616f37b0 100644 --- a/plotly/graph_objs/scattergeo/unselected/_marker.py +++ b/plotly/graph_objs/scattergeo/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergeo/unselected/_textfont.py b/plotly/graph_objs/scattergeo/unselected/_textfont.py index d251b9e5aa..5a076aacef 100644 --- a/plotly/graph_objs/scattergeo/unselected/_textfont.py +++ b/plotly/graph_objs/scattergeo/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/_error_x.py b/plotly/graph_objs/scattergl/_error_x.py index 991a918813..2bd164fd7b 100644 --- a/plotly/graph_objs/scattergl/_error_x.py +++ b/plotly/graph_objs/scattergl/_error_x.py @@ -75,8 +75,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/_error_y.py b/plotly/graph_objs/scattergl/_error_y.py index 378f258534..c811a528ce 100644 --- a/plotly/graph_objs/scattergl/_error_y.py +++ b/plotly/graph_objs/scattergl/_error_y.py @@ -74,8 +74,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/_hoverlabel.py b/plotly/graph_objs/scattergl/_hoverlabel.py index 07843f8071..1bb2802a43 100644 --- a/plotly/graph_objs/scattergl/_hoverlabel.py +++ b/plotly/graph_objs/scattergl/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattergl/_line.py b/plotly/graph_objs/scattergl/_line.py index 310b1dc843..6f0c5ed02b 100644 --- a/plotly/graph_objs/scattergl/_line.py +++ b/plotly/graph_objs/scattergl/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/_marker.py b/plotly/graph_objs/scattergl/_marker.py index cae80de19b..d4ef261886 100644 --- a/plotly/graph_objs/scattergl/_marker.py +++ b/plotly/graph_objs/scattergl/_marker.py @@ -176,8 +176,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scattergl.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scattergl/_textfont.py b/plotly/graph_objs/scattergl/_textfont.py index 5c8962de39..baf4344569 100644 --- a/plotly/graph_objs/scattergl/_textfont.py +++ b/plotly/graph_objs/scattergl/_textfont.py @@ -20,8 +20,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattergl/hoverlabel/_font.py b/plotly/graph_objs/scattergl/hoverlabel/_font.py index 859b45ec9d..efa5984daa 100644 --- a/plotly/graph_objs/scattergl/hoverlabel/_font.py +++ b/plotly/graph_objs/scattergl/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattergl/legendgrouptitle/_font.py b/plotly/graph_objs/scattergl/legendgrouptitle/_font.py index 3bdc1237d5..c2427344ee 100644 --- a/plotly/graph_objs/scattergl/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattergl/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/marker/_colorbar.py b/plotly/graph_objs/scattergl/marker/_colorbar.py index 60056f9b8b..44f41a87b1 100644 --- a/plotly/graph_objs/scattergl/marker/_colorbar.py +++ b/plotly/graph_objs/scattergl/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/marker/_line.py b/plotly/graph_objs/scattergl/marker/_line.py index c878f7e18d..04461bfe06 100644 --- a/plotly/graph_objs/scattergl/marker/_line.py +++ b/plotly/graph_objs/scattergl/marker/_line.py @@ -148,8 +148,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scattergl.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py index 3234985165..8e08668079 100644 --- a/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattergl/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py b/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py index 54cb19a929..3e63ad3f41 100644 --- a/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattergl/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/selected/_marker.py b/plotly/graph_objs/scattergl/selected/_marker.py index 3a69b99cf5..c778c5d493 100644 --- a/plotly/graph_objs/scattergl/selected/_marker.py +++ b/plotly/graph_objs/scattergl/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/selected/_textfont.py b/plotly/graph_objs/scattergl/selected/_textfont.py index fc77aa23b9..958bb69f7f 100644 --- a/plotly/graph_objs/scattergl/selected/_textfont.py +++ b/plotly/graph_objs/scattergl/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/unselected/_marker.py b/plotly/graph_objs/scattergl/unselected/_marker.py index a4fa6b29bf..138e48ca0e 100644 --- a/plotly/graph_objs/scattergl/unselected/_marker.py +++ b/plotly/graph_objs/scattergl/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattergl/unselected/_textfont.py b/plotly/graph_objs/scattergl/unselected/_textfont.py index a9563b26dc..f446200384 100644 --- a/plotly/graph_objs/scattergl/unselected/_textfont.py +++ b/plotly/graph_objs/scattergl/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattermap/_cluster.py b/plotly/graph_objs/scattermap/_cluster.py index 13044fbaeb..b2a4422c98 100644 --- a/plotly/graph_objs/scattermap/_cluster.py +++ b/plotly/graph_objs/scattermap/_cluster.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattermap/_hoverlabel.py b/plotly/graph_objs/scattermap/_hoverlabel.py index 79badb43b9..c4bc164a08 100644 --- a/plotly/graph_objs/scattermap/_hoverlabel.py +++ b/plotly/graph_objs/scattermap/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattermap/_line.py b/plotly/graph_objs/scattermap/_line.py index 2cc7eed570..3231cb6e9d 100644 --- a/plotly/graph_objs/scattermap/_line.py +++ b/plotly/graph_objs/scattermap/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattermap/_marker.py b/plotly/graph_objs/scattermap/_marker.py index 0540566de0..562cb033c2 100644 --- a/plotly/graph_objs/scattermap/_marker.py +++ b/plotly/graph_objs/scattermap/_marker.py @@ -196,8 +196,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scattermap.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scattermap/_textfont.py b/plotly/graph_objs/scattermap/_textfont.py index 16c03c0311..74ce86f186 100644 --- a/plotly/graph_objs/scattermap/_textfont.py +++ b/plotly/graph_objs/scattermap/_textfont.py @@ -20,8 +20,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattermap/hoverlabel/_font.py b/plotly/graph_objs/scattermap/hoverlabel/_font.py index d5c37f2c87..62a7b94fea 100644 --- a/plotly/graph_objs/scattermap/hoverlabel/_font.py +++ b/plotly/graph_objs/scattermap/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattermap/legendgrouptitle/_font.py b/plotly/graph_objs/scattermap/legendgrouptitle/_font.py index db67834719..dfa19c747f 100644 --- a/plotly/graph_objs/scattermap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattermap/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattermap/marker/_colorbar.py b/plotly/graph_objs/scattermap/marker/_colorbar.py index daca0ca60d..595be5834d 100644 --- a/plotly/graph_objs/scattermap/marker/_colorbar.py +++ b/plotly/graph_objs/scattermap/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py index cf414df930..c73d09717e 100644 --- a/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattermap/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py b/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py index 14513465f4..c0b73e84cc 100644 --- a/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattermap/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattermap/selected/_marker.py b/plotly/graph_objs/scattermap/selected/_marker.py index 06838205b0..c6c72aab62 100644 --- a/plotly/graph_objs/scattermap/selected/_marker.py +++ b/plotly/graph_objs/scattermap/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattermap/unselected/_marker.py b/plotly/graph_objs/scattermap/unselected/_marker.py index 11c456d84c..591a12efdb 100644 --- a/plotly/graph_objs/scattermap/unselected/_marker.py +++ b/plotly/graph_objs/scattermap/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolar/_hoverlabel.py b/plotly/graph_objs/scatterpolar/_hoverlabel.py index b05c82475c..ada8b0a488 100644 --- a/plotly/graph_objs/scatterpolar/_hoverlabel.py +++ b/plotly/graph_objs/scatterpolar/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterpolar/_line.py b/plotly/graph_objs/scatterpolar/_line.py index 28501699b0..7eabd36e9f 100644 --- a/plotly/graph_objs/scatterpolar/_line.py +++ b/plotly/graph_objs/scatterpolar/_line.py @@ -44,8 +44,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolar/_marker.py b/plotly/graph_objs/scatterpolar/_marker.py index a1b2a100ca..a33344d2c5 100644 --- a/plotly/graph_objs/scatterpolar/_marker.py +++ b/plotly/graph_objs/scatterpolar/_marker.py @@ -201,8 +201,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatterpolar.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatterpolar/_textfont.py b/plotly/graph_objs/scatterpolar/_textfont.py index 5d55b04c33..285ec822da 100644 --- a/plotly/graph_objs/scatterpolar/_textfont.py +++ b/plotly/graph_objs/scatterpolar/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterpolar/hoverlabel/_font.py b/plotly/graph_objs/scatterpolar/hoverlabel/_font.py index e83dc4aee5..33fbdb5066 100644 --- a/plotly/graph_objs/scatterpolar/hoverlabel/_font.py +++ b/plotly/graph_objs/scatterpolar/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py b/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py index 36e169c9d5..a0c4af0d4d 100644 --- a/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatterpolar/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolar/marker/_colorbar.py b/plotly/graph_objs/scatterpolar/marker/_colorbar.py index 26a81636f6..a1dbeab26d 100644 --- a/plotly/graph_objs/scatterpolar/marker/_colorbar.py +++ b/plotly/graph_objs/scatterpolar/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolar/marker/_gradient.py b/plotly/graph_objs/scatterpolar/marker/_gradient.py index 885ec854c7..d29122a6c8 100644 --- a/plotly/graph_objs/scatterpolar/marker/_gradient.py +++ b/plotly/graph_objs/scatterpolar/marker/_gradient.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterpolar/marker/_line.py b/plotly/graph_objs/scatterpolar/marker/_line.py index 4154b86094..4b0649b6ca 100644 --- a/plotly/graph_objs/scatterpolar/marker/_line.py +++ b/plotly/graph_objs/scatterpolar/marker/_line.py @@ -149,8 +149,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatterpolar.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py index 63914384e3..435ca4f428 100644 --- a/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatterpolar/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py b/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py index 98d7ce5e97..a8b50d86bb 100644 --- a/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatterpolar/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolar/selected/_marker.py b/plotly/graph_objs/scatterpolar/selected/_marker.py index 01e8d56608..dfe7d19826 100644 --- a/plotly/graph_objs/scatterpolar/selected/_marker.py +++ b/plotly/graph_objs/scatterpolar/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolar/selected/_textfont.py b/plotly/graph_objs/scatterpolar/selected/_textfont.py index dcec848225..0c656ee728 100644 --- a/plotly/graph_objs/scatterpolar/selected/_textfont.py +++ b/plotly/graph_objs/scatterpolar/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolar/unselected/_marker.py b/plotly/graph_objs/scatterpolar/unselected/_marker.py index 60b886f645..0a2b7bb543 100644 --- a/plotly/graph_objs/scatterpolar/unselected/_marker.py +++ b/plotly/graph_objs/scatterpolar/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolar/unselected/_textfont.py b/plotly/graph_objs/scatterpolar/unselected/_textfont.py index c8797540ca..9982292b9b 100644 --- a/plotly/graph_objs/scatterpolar/unselected/_textfont.py +++ b/plotly/graph_objs/scatterpolar/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolargl/_hoverlabel.py b/plotly/graph_objs/scatterpolargl/_hoverlabel.py index 0db6aa16cc..654ae79dcb 100644 --- a/plotly/graph_objs/scatterpolargl/_hoverlabel.py +++ b/plotly/graph_objs/scatterpolargl/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterpolargl/_line.py b/plotly/graph_objs/scatterpolargl/_line.py index ffca364019..6994a669ce 100644 --- a/plotly/graph_objs/scatterpolargl/_line.py +++ b/plotly/graph_objs/scatterpolargl/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolargl/_marker.py b/plotly/graph_objs/scatterpolargl/_marker.py index 66be43064b..a90ff69b57 100644 --- a/plotly/graph_objs/scatterpolargl/_marker.py +++ b/plotly/graph_objs/scatterpolargl/_marker.py @@ -176,8 +176,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatterpolargl.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatterpolargl/_textfont.py b/plotly/graph_objs/scatterpolargl/_textfont.py index 45da35f46a..af6edf3fb5 100644 --- a/plotly/graph_objs/scatterpolargl/_textfont.py +++ b/plotly/graph_objs/scatterpolargl/_textfont.py @@ -20,8 +20,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py b/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py index 0012ea27ba..a5d5260897 100644 --- a/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py +++ b/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py b/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py index 011a306334..a1c9b0208f 100644 --- a/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatterpolargl/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolargl/marker/_colorbar.py b/plotly/graph_objs/scatterpolargl/marker/_colorbar.py index 51e8bc7ae0..07f9239f01 100644 --- a/plotly/graph_objs/scatterpolargl/marker/_colorbar.py +++ b/plotly/graph_objs/scatterpolargl/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolargl/marker/_line.py b/plotly/graph_objs/scatterpolargl/marker/_line.py index d92fe6a0bc..2108008e08 100644 --- a/plotly/graph_objs/scatterpolargl/marker/_line.py +++ b/plotly/graph_objs/scatterpolargl/marker/_line.py @@ -148,8 +148,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatterpolargl.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py index 935f75fde4..b2a1ccb96f 100644 --- a/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatterpolargl/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py b/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py index 95f8fdd49d..a875425690 100644 --- a/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatterpolargl/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolargl/selected/_marker.py b/plotly/graph_objs/scatterpolargl/selected/_marker.py index 25f2b05cf4..cf3d60d2db 100644 --- a/plotly/graph_objs/scatterpolargl/selected/_marker.py +++ b/plotly/graph_objs/scatterpolargl/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolargl/selected/_textfont.py b/plotly/graph_objs/scatterpolargl/selected/_textfont.py index ff545f2ea2..d8b89246f9 100644 --- a/plotly/graph_objs/scatterpolargl/selected/_textfont.py +++ b/plotly/graph_objs/scatterpolargl/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolargl/unselected/_marker.py b/plotly/graph_objs/scatterpolargl/unselected/_marker.py index 4d9732593d..693931d9dd 100644 --- a/plotly/graph_objs/scatterpolargl/unselected/_marker.py +++ b/plotly/graph_objs/scatterpolargl/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterpolargl/unselected/_textfont.py b/plotly/graph_objs/scatterpolargl/unselected/_textfont.py index d5fe3ff0d9..713d1b9f04 100644 --- a/plotly/graph_objs/scatterpolargl/unselected/_textfont.py +++ b/plotly/graph_objs/scatterpolargl/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattersmith/_hoverlabel.py b/plotly/graph_objs/scattersmith/_hoverlabel.py index 04b3594a9f..9fdc6a8da9 100644 --- a/plotly/graph_objs/scattersmith/_hoverlabel.py +++ b/plotly/graph_objs/scattersmith/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattersmith/_line.py b/plotly/graph_objs/scattersmith/_line.py index 0003268bde..1d4be1fb42 100644 --- a/plotly/graph_objs/scattersmith/_line.py +++ b/plotly/graph_objs/scattersmith/_line.py @@ -44,8 +44,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattersmith/_marker.py b/plotly/graph_objs/scattersmith/_marker.py index 5ccc1043fd..aee151a4bf 100644 --- a/plotly/graph_objs/scattersmith/_marker.py +++ b/plotly/graph_objs/scattersmith/_marker.py @@ -201,8 +201,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scattersmith.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scattersmith/_textfont.py b/plotly/graph_objs/scattersmith/_textfont.py index 4ef1524d66..c6eab95c20 100644 --- a/plotly/graph_objs/scattersmith/_textfont.py +++ b/plotly/graph_objs/scattersmith/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattersmith/hoverlabel/_font.py b/plotly/graph_objs/scattersmith/hoverlabel/_font.py index ed1924d92a..417300e6fe 100644 --- a/plotly/graph_objs/scattersmith/hoverlabel/_font.py +++ b/plotly/graph_objs/scattersmith/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py b/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py index 071706983d..a39ac4b7b8 100644 --- a/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scattersmith/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattersmith/marker/_colorbar.py b/plotly/graph_objs/scattersmith/marker/_colorbar.py index 98b14637ba..a174873784 100644 --- a/plotly/graph_objs/scattersmith/marker/_colorbar.py +++ b/plotly/graph_objs/scattersmith/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattersmith/marker/_gradient.py b/plotly/graph_objs/scattersmith/marker/_gradient.py index 37eba899a5..021deaac0b 100644 --- a/plotly/graph_objs/scattersmith/marker/_gradient.py +++ b/plotly/graph_objs/scattersmith/marker/_gradient.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scattersmith/marker/_line.py b/plotly/graph_objs/scattersmith/marker/_line.py index e34c6c084a..d724ffae38 100644 --- a/plotly/graph_objs/scattersmith/marker/_line.py +++ b/plotly/graph_objs/scattersmith/marker/_line.py @@ -149,8 +149,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scattersmith.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py b/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py index c67236ffd2..4462f5e08f 100644 --- a/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scattersmith/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py b/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py index 1412f6a955..917654a542 100644 --- a/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scattersmith/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattersmith/selected/_marker.py b/plotly/graph_objs/scattersmith/selected/_marker.py index 94c2f17020..a8249aee59 100644 --- a/plotly/graph_objs/scattersmith/selected/_marker.py +++ b/plotly/graph_objs/scattersmith/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattersmith/selected/_textfont.py b/plotly/graph_objs/scattersmith/selected/_textfont.py index 1db3b41415..b857b1db05 100644 --- a/plotly/graph_objs/scattersmith/selected/_textfont.py +++ b/plotly/graph_objs/scattersmith/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattersmith/unselected/_marker.py b/plotly/graph_objs/scattersmith/unselected/_marker.py index c775bdf47c..c6cadaff61 100644 --- a/plotly/graph_objs/scattersmith/unselected/_marker.py +++ b/plotly/graph_objs/scattersmith/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scattersmith/unselected/_textfont.py b/plotly/graph_objs/scattersmith/unselected/_textfont.py index 800d70b9a5..95f3d56c95 100644 --- a/plotly/graph_objs/scattersmith/unselected/_textfont.py +++ b/plotly/graph_objs/scattersmith/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterternary/_hoverlabel.py b/plotly/graph_objs/scatterternary/_hoverlabel.py index 29253c273b..3c38907b50 100644 --- a/plotly/graph_objs/scatterternary/_hoverlabel.py +++ b/plotly/graph_objs/scatterternary/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterternary/_line.py b/plotly/graph_objs/scatterternary/_line.py index 375abfce47..8a5d70f846 100644 --- a/plotly/graph_objs/scatterternary/_line.py +++ b/plotly/graph_objs/scatterternary/_line.py @@ -44,8 +44,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterternary/_marker.py b/plotly/graph_objs/scatterternary/_marker.py index 30177dfc1e..23054e4a37 100644 --- a/plotly/graph_objs/scatterternary/_marker.py +++ b/plotly/graph_objs/scatterternary/_marker.py @@ -201,8 +201,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatterternary.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatterternary/_textfont.py b/plotly/graph_objs/scatterternary/_textfont.py index 985b849185..6d22ea7aa4 100644 --- a/plotly/graph_objs/scatterternary/_textfont.py +++ b/plotly/graph_objs/scatterternary/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterternary/hoverlabel/_font.py b/plotly/graph_objs/scatterternary/hoverlabel/_font.py index e6984e1b59..9eea255174 100644 --- a/plotly/graph_objs/scatterternary/hoverlabel/_font.py +++ b/plotly/graph_objs/scatterternary/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py b/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py index 51ecbe47bf..7b087e552f 100644 --- a/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py +++ b/plotly/graph_objs/scatterternary/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterternary/marker/_colorbar.py b/plotly/graph_objs/scatterternary/marker/_colorbar.py index 34796dbdf4..039b142501 100644 --- a/plotly/graph_objs/scatterternary/marker/_colorbar.py +++ b/plotly/graph_objs/scatterternary/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterternary/marker/_gradient.py b/plotly/graph_objs/scatterternary/marker/_gradient.py index dac60655f7..9ae2001a3d 100644 --- a/plotly/graph_objs/scatterternary/marker/_gradient.py +++ b/plotly/graph_objs/scatterternary/marker/_gradient.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/scatterternary/marker/_line.py b/plotly/graph_objs/scatterternary/marker/_line.py index 9d5959c0f8..9756d510b2 100644 --- a/plotly/graph_objs/scatterternary/marker/_line.py +++ b/plotly/graph_objs/scatterternary/marker/_line.py @@ -149,8 +149,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to scatterternary.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py b/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py index be47045417..8a86e99e22 100644 --- a/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/scatterternary/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py b/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py index e02fa210aa..834e2c1dd3 100644 --- a/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/scatterternary/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterternary/selected/_marker.py b/plotly/graph_objs/scatterternary/selected/_marker.py index 4e0840b0bf..0f3b21ca1f 100644 --- a/plotly/graph_objs/scatterternary/selected/_marker.py +++ b/plotly/graph_objs/scatterternary/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterternary/selected/_textfont.py b/plotly/graph_objs/scatterternary/selected/_textfont.py index fd03380425..72d3ac8b88 100644 --- a/plotly/graph_objs/scatterternary/selected/_textfont.py +++ b/plotly/graph_objs/scatterternary/selected/_textfont.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterternary/unselected/_marker.py b/plotly/graph_objs/scatterternary/unselected/_marker.py index c1fdb2fe65..a052176d2f 100644 --- a/plotly/graph_objs/scatterternary/unselected/_marker.py +++ b/plotly/graph_objs/scatterternary/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/scatterternary/unselected/_textfont.py b/plotly/graph_objs/scatterternary/unselected/_textfont.py index ac9dfada16..ebb9974d2f 100644 --- a/plotly/graph_objs/scatterternary/unselected/_textfont.py +++ b/plotly/graph_objs/scatterternary/unselected/_textfont.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/splom/_hoverlabel.py b/plotly/graph_objs/splom/_hoverlabel.py index c90a4f479f..acb7018266 100644 --- a/plotly/graph_objs/splom/_hoverlabel.py +++ b/plotly/graph_objs/splom/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/splom/_marker.py b/plotly/graph_objs/splom/_marker.py index 58b38e51ed..86b1f5a9d5 100644 --- a/plotly/graph_objs/splom/_marker.py +++ b/plotly/graph_objs/splom/_marker.py @@ -176,8 +176,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to splom.marker.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/splom/hoverlabel/_font.py b/plotly/graph_objs/splom/hoverlabel/_font.py index 4169ace273..e75f8774d1 100644 --- a/plotly/graph_objs/splom/hoverlabel/_font.py +++ b/plotly/graph_objs/splom/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/splom/legendgrouptitle/_font.py b/plotly/graph_objs/splom/legendgrouptitle/_font.py index 63c21f9a96..ea4d4971b6 100644 --- a/plotly/graph_objs/splom/legendgrouptitle/_font.py +++ b/plotly/graph_objs/splom/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/splom/marker/_colorbar.py b/plotly/graph_objs/splom/marker/_colorbar.py index 09404963e8..1ef542c5b7 100644 --- a/plotly/graph_objs/splom/marker/_colorbar.py +++ b/plotly/graph_objs/splom/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/splom/marker/_line.py b/plotly/graph_objs/splom/marker/_line.py index 640099a00b..f118397e54 100644 --- a/plotly/graph_objs/splom/marker/_line.py +++ b/plotly/graph_objs/splom/marker/_line.py @@ -148,8 +148,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A number that will be interpreted as a color according to splom.marker.line.colorscale - A list or array of any of the above diff --git a/plotly/graph_objs/splom/marker/colorbar/_tickfont.py b/plotly/graph_objs/splom/marker/colorbar/_tickfont.py index 84735ccc09..cac1f2e0d4 100644 --- a/plotly/graph_objs/splom/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/splom/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/splom/marker/colorbar/title/_font.py b/plotly/graph_objs/splom/marker/colorbar/title/_font.py index e316b110b5..00ea5438bb 100644 --- a/plotly/graph_objs/splom/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/splom/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/splom/selected/_marker.py b/plotly/graph_objs/splom/selected/_marker.py index 3a461aac1b..2e2fee08b1 100644 --- a/plotly/graph_objs/splom/selected/_marker.py +++ b/plotly/graph_objs/splom/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/splom/unselected/_marker.py b/plotly/graph_objs/splom/unselected/_marker.py index 8e9d0254cb..7b4a88d04b 100644 --- a/plotly/graph_objs/splom/unselected/_marker.py +++ b/plotly/graph_objs/splom/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/streamtube/_colorbar.py b/plotly/graph_objs/streamtube/_colorbar.py index 75314bbacc..a3cb9f1c37 100644 --- a/plotly/graph_objs/streamtube/_colorbar.py +++ b/plotly/graph_objs/streamtube/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/streamtube/_hoverlabel.py b/plotly/graph_objs/streamtube/_hoverlabel.py index 05a1d10820..e090022d17 100644 --- a/plotly/graph_objs/streamtube/_hoverlabel.py +++ b/plotly/graph_objs/streamtube/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/streamtube/colorbar/_tickfont.py b/plotly/graph_objs/streamtube/colorbar/_tickfont.py index 48b21fede0..5ecf8ab310 100644 --- a/plotly/graph_objs/streamtube/colorbar/_tickfont.py +++ b/plotly/graph_objs/streamtube/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/streamtube/colorbar/title/_font.py b/plotly/graph_objs/streamtube/colorbar/title/_font.py index 98e10ac3be..c5256d9fef 100644 --- a/plotly/graph_objs/streamtube/colorbar/title/_font.py +++ b/plotly/graph_objs/streamtube/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/streamtube/hoverlabel/_font.py b/plotly/graph_objs/streamtube/hoverlabel/_font.py index dc475ae962..3b7f40c6a4 100644 --- a/plotly/graph_objs/streamtube/hoverlabel/_font.py +++ b/plotly/graph_objs/streamtube/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/streamtube/legendgrouptitle/_font.py b/plotly/graph_objs/streamtube/legendgrouptitle/_font.py index 6247cff2c3..f147117cfc 100644 --- a/plotly/graph_objs/streamtube/legendgrouptitle/_font.py +++ b/plotly/graph_objs/streamtube/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/sunburst/_hoverlabel.py b/plotly/graph_objs/sunburst/_hoverlabel.py index e7d616e289..a722b80290 100644 --- a/plotly/graph_objs/sunburst/_hoverlabel.py +++ b/plotly/graph_objs/sunburst/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sunburst/_insidetextfont.py b/plotly/graph_objs/sunburst/_insidetextfont.py index 5f5a641075..857b767aa4 100644 --- a/plotly/graph_objs/sunburst/_insidetextfont.py +++ b/plotly/graph_objs/sunburst/_insidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sunburst/_outsidetextfont.py b/plotly/graph_objs/sunburst/_outsidetextfont.py index f7fc4ab7cd..159a7c6f8c 100644 --- a/plotly/graph_objs/sunburst/_outsidetextfont.py +++ b/plotly/graph_objs/sunburst/_outsidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sunburst/_root.py b/plotly/graph_objs/sunburst/_root.py index 77c2be0608..126f4a9e4c 100644 --- a/plotly/graph_objs/sunburst/_root.py +++ b/plotly/graph_objs/sunburst/_root.py @@ -24,8 +24,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/sunburst/_textfont.py b/plotly/graph_objs/sunburst/_textfont.py index b0950d5fd1..2302ba41c9 100644 --- a/plotly/graph_objs/sunburst/_textfont.py +++ b/plotly/graph_objs/sunburst/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sunburst/hoverlabel/_font.py b/plotly/graph_objs/sunburst/hoverlabel/_font.py index a6579da65d..9267ab5973 100644 --- a/plotly/graph_objs/sunburst/hoverlabel/_font.py +++ b/plotly/graph_objs/sunburst/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sunburst/legendgrouptitle/_font.py b/plotly/graph_objs/sunburst/legendgrouptitle/_font.py index c51fac7e1d..f9834aaf47 100644 --- a/plotly/graph_objs/sunburst/legendgrouptitle/_font.py +++ b/plotly/graph_objs/sunburst/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/sunburst/marker/_colorbar.py b/plotly/graph_objs/sunburst/marker/_colorbar.py index 1295c463c2..281dcb2812 100644 --- a/plotly/graph_objs/sunburst/marker/_colorbar.py +++ b/plotly/graph_objs/sunburst/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/sunburst/marker/_line.py b/plotly/graph_objs/sunburst/marker/_line.py index c291d4034d..d49e21c0d2 100644 --- a/plotly/graph_objs/sunburst/marker/_line.py +++ b/plotly/graph_objs/sunburst/marker/_line.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sunburst/marker/_pattern.py b/plotly/graph_objs/sunburst/marker/_pattern.py index 54fbe3c534..c8652916ca 100644 --- a/plotly/graph_objs/sunburst/marker/_pattern.py +++ b/plotly/graph_objs/sunburst/marker/_pattern.py @@ -34,8 +34,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -63,8 +66,11 @@ def fgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py b/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py index 8c50f7d2e9..8d1de1f9ab 100644 --- a/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/sunburst/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py b/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py index 597633520d..09bfe888d5 100644 --- a/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/sunburst/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/surface/_colorbar.py b/plotly/graph_objs/surface/_colorbar.py index f35855e95a..1000836979 100644 --- a/plotly/graph_objs/surface/_colorbar.py +++ b/plotly/graph_objs/surface/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/surface/_hoverlabel.py b/plotly/graph_objs/surface/_hoverlabel.py index 36061fca04..0971070bb4 100644 --- a/plotly/graph_objs/surface/_hoverlabel.py +++ b/plotly/graph_objs/surface/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/surface/colorbar/_tickfont.py b/plotly/graph_objs/surface/colorbar/_tickfont.py index a3bb9f3227..266783dd5c 100644 --- a/plotly/graph_objs/surface/colorbar/_tickfont.py +++ b/plotly/graph_objs/surface/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/surface/colorbar/title/_font.py b/plotly/graph_objs/surface/colorbar/title/_font.py index 04cd6bafcf..9cfe43e022 100644 --- a/plotly/graph_objs/surface/colorbar/title/_font.py +++ b/plotly/graph_objs/surface/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/surface/contours/_x.py b/plotly/graph_objs/surface/contours/_x.py index e6cea371d7..7bb77cf3cc 100644 --- a/plotly/graph_objs/surface/contours/_x.py +++ b/plotly/graph_objs/surface/contours/_x.py @@ -34,8 +34,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -97,8 +100,11 @@ def highlightcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/surface/contours/_y.py b/plotly/graph_objs/surface/contours/_y.py index c888723598..315d6e4014 100644 --- a/plotly/graph_objs/surface/contours/_y.py +++ b/plotly/graph_objs/surface/contours/_y.py @@ -34,8 +34,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -97,8 +100,11 @@ def highlightcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/surface/contours/_z.py b/plotly/graph_objs/surface/contours/_z.py index e97eb1d0ae..f0945aedd3 100644 --- a/plotly/graph_objs/surface/contours/_z.py +++ b/plotly/graph_objs/surface/contours/_z.py @@ -34,8 +34,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -97,8 +100,11 @@ def highlightcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/surface/hoverlabel/_font.py b/plotly/graph_objs/surface/hoverlabel/_font.py index 00d2ee9041..7f42dbe31b 100644 --- a/plotly/graph_objs/surface/hoverlabel/_font.py +++ b/plotly/graph_objs/surface/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/surface/legendgrouptitle/_font.py b/plotly/graph_objs/surface/legendgrouptitle/_font.py index e484a6e66b..40cdbfb63e 100644 --- a/plotly/graph_objs/surface/legendgrouptitle/_font.py +++ b/plotly/graph_objs/surface/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/table/_hoverlabel.py b/plotly/graph_objs/table/_hoverlabel.py index 995cfc5b36..9fd3803af5 100644 --- a/plotly/graph_objs/table/_hoverlabel.py +++ b/plotly/graph_objs/table/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/table/cells/_fill.py b/plotly/graph_objs/table/cells/_fill.py index 2c5f67a5f1..745aaa6ec6 100644 --- a/plotly/graph_objs/table/cells/_fill.py +++ b/plotly/graph_objs/table/cells/_fill.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/table/cells/_font.py b/plotly/graph_objs/table/cells/_font.py index 293726a33f..e0a9a86d9f 100644 --- a/plotly/graph_objs/table/cells/_font.py +++ b/plotly/graph_objs/table/cells/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/table/cells/_line.py b/plotly/graph_objs/table/cells/_line.py index 7996da457f..57ca73dd17 100644 --- a/plotly/graph_objs/table/cells/_line.py +++ b/plotly/graph_objs/table/cells/_line.py @@ -20,8 +20,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/table/header/_fill.py b/plotly/graph_objs/table/header/_fill.py index defe191ecf..f8e1bd5c0f 100644 --- a/plotly/graph_objs/table/header/_fill.py +++ b/plotly/graph_objs/table/header/_fill.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/table/header/_font.py b/plotly/graph_objs/table/header/_font.py index e2b824502f..378a82df44 100644 --- a/plotly/graph_objs/table/header/_font.py +++ b/plotly/graph_objs/table/header/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/table/header/_line.py b/plotly/graph_objs/table/header/_line.py index e854ce335a..67df92baf7 100644 --- a/plotly/graph_objs/table/header/_line.py +++ b/plotly/graph_objs/table/header/_line.py @@ -20,8 +20,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/table/hoverlabel/_font.py b/plotly/graph_objs/table/hoverlabel/_font.py index 10159a3e50..901c37c742 100644 --- a/plotly/graph_objs/table/hoverlabel/_font.py +++ b/plotly/graph_objs/table/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/table/legendgrouptitle/_font.py b/plotly/graph_objs/table/legendgrouptitle/_font.py index cc3fc2ff7d..ee90e8c421 100644 --- a/plotly/graph_objs/table/legendgrouptitle/_font.py +++ b/plotly/graph_objs/table/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/treemap/_hoverlabel.py b/plotly/graph_objs/treemap/_hoverlabel.py index 581af4b194..797be2b54f 100644 --- a/plotly/graph_objs/treemap/_hoverlabel.py +++ b/plotly/graph_objs/treemap/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/treemap/_insidetextfont.py b/plotly/graph_objs/treemap/_insidetextfont.py index 6e89b17609..a3374afaf0 100644 --- a/plotly/graph_objs/treemap/_insidetextfont.py +++ b/plotly/graph_objs/treemap/_insidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/treemap/_outsidetextfont.py b/plotly/graph_objs/treemap/_outsidetextfont.py index 799763c6a2..b41f2c61f0 100644 --- a/plotly/graph_objs/treemap/_outsidetextfont.py +++ b/plotly/graph_objs/treemap/_outsidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/treemap/_root.py b/plotly/graph_objs/treemap/_root.py index 5bff351da0..e1ce59e4f4 100644 --- a/plotly/graph_objs/treemap/_root.py +++ b/plotly/graph_objs/treemap/_root.py @@ -24,8 +24,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/treemap/_textfont.py b/plotly/graph_objs/treemap/_textfont.py index 5b5e2f3435..91b59eafef 100644 --- a/plotly/graph_objs/treemap/_textfont.py +++ b/plotly/graph_objs/treemap/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/treemap/hoverlabel/_font.py b/plotly/graph_objs/treemap/hoverlabel/_font.py index 04f4a4846a..b8109a803f 100644 --- a/plotly/graph_objs/treemap/hoverlabel/_font.py +++ b/plotly/graph_objs/treemap/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/treemap/legendgrouptitle/_font.py b/plotly/graph_objs/treemap/legendgrouptitle/_font.py index 8d04fec75d..65d89fa0ab 100644 --- a/plotly/graph_objs/treemap/legendgrouptitle/_font.py +++ b/plotly/graph_objs/treemap/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/treemap/marker/_colorbar.py b/plotly/graph_objs/treemap/marker/_colorbar.py index e22317be34..541f7912d8 100644 --- a/plotly/graph_objs/treemap/marker/_colorbar.py +++ b/plotly/graph_objs/treemap/marker/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/treemap/marker/_line.py b/plotly/graph_objs/treemap/marker/_line.py index e59ceab80b..7ffe603e4a 100644 --- a/plotly/graph_objs/treemap/marker/_line.py +++ b/plotly/graph_objs/treemap/marker/_line.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/treemap/marker/_pattern.py b/plotly/graph_objs/treemap/marker/_pattern.py index 477bf00659..bab0825219 100644 --- a/plotly/graph_objs/treemap/marker/_pattern.py +++ b/plotly/graph_objs/treemap/marker/_pattern.py @@ -34,8 +34,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -63,8 +66,11 @@ def fgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py b/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py index cd2cec58b2..6b20b091bc 100644 --- a/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py +++ b/plotly/graph_objs/treemap/marker/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/treemap/marker/colorbar/title/_font.py b/plotly/graph_objs/treemap/marker/colorbar/title/_font.py index 770d2eb816..381f8d2508 100644 --- a/plotly/graph_objs/treemap/marker/colorbar/title/_font.py +++ b/plotly/graph_objs/treemap/marker/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/treemap/pathbar/_textfont.py b/plotly/graph_objs/treemap/pathbar/_textfont.py index 8fc6ec0fda..1c0f02ff3e 100644 --- a/plotly/graph_objs/treemap/pathbar/_textfont.py +++ b/plotly/graph_objs/treemap/pathbar/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/violin/_box.py b/plotly/graph_objs/violin/_box.py index d596e6909d..407d9fb227 100644 --- a/plotly/graph_objs/violin/_box.py +++ b/plotly/graph_objs/violin/_box.py @@ -22,8 +22,11 @@ def fillcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/violin/_hoverlabel.py b/plotly/graph_objs/violin/_hoverlabel.py index c6f6ae308c..6ca7ace41f 100644 --- a/plotly/graph_objs/violin/_hoverlabel.py +++ b/plotly/graph_objs/violin/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/violin/_line.py b/plotly/graph_objs/violin/_line.py index 0ad1549341..3c7da386fe 100644 --- a/plotly/graph_objs/violin/_line.py +++ b/plotly/graph_objs/violin/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/violin/_marker.py b/plotly/graph_objs/violin/_marker.py index 0553a98705..b64e7778ae 100644 --- a/plotly/graph_objs/violin/_marker.py +++ b/plotly/graph_objs/violin/_marker.py @@ -53,8 +53,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -115,8 +118,11 @@ def outliercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/violin/_meanline.py b/plotly/graph_objs/violin/_meanline.py index 952032f979..374cc6134e 100644 --- a/plotly/graph_objs/violin/_meanline.py +++ b/plotly/graph_objs/violin/_meanline.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/violin/box/_line.py b/plotly/graph_objs/violin/box/_line.py index 580421e0fb..cfe03e343b 100644 --- a/plotly/graph_objs/violin/box/_line.py +++ b/plotly/graph_objs/violin/box/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/violin/hoverlabel/_font.py b/plotly/graph_objs/violin/hoverlabel/_font.py index b4c4d0fc43..8af0c4ee3a 100644 --- a/plotly/graph_objs/violin/hoverlabel/_font.py +++ b/plotly/graph_objs/violin/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/violin/legendgrouptitle/_font.py b/plotly/graph_objs/violin/legendgrouptitle/_font.py index a6bcb0e350..36987ef082 100644 --- a/plotly/graph_objs/violin/legendgrouptitle/_font.py +++ b/plotly/graph_objs/violin/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/violin/marker/_line.py b/plotly/graph_objs/violin/marker/_line.py index e7aa95b285..058b3ead41 100644 --- a/plotly/graph_objs/violin/marker/_line.py +++ b/plotly/graph_objs/violin/marker/_line.py @@ -25,8 +25,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -51,8 +54,11 @@ def outliercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/violin/selected/_marker.py b/plotly/graph_objs/violin/selected/_marker.py index 7ae8888dc0..ad36ef1c46 100644 --- a/plotly/graph_objs/violin/selected/_marker.py +++ b/plotly/graph_objs/violin/selected/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/violin/unselected/_marker.py b/plotly/graph_objs/violin/unselected/_marker.py index a1c83a3394..29a62ac196 100644 --- a/plotly/graph_objs/violin/unselected/_marker.py +++ b/plotly/graph_objs/violin/unselected/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/volume/_colorbar.py b/plotly/graph_objs/volume/_colorbar.py index e38cccbc55..a06d323860 100644 --- a/plotly/graph_objs/volume/_colorbar.py +++ b/plotly/graph_objs/volume/_colorbar.py @@ -70,8 +70,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -95,8 +98,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -328,8 +334,11 @@ def outlinecolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- @@ -557,8 +566,11 @@ def tickcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/volume/_contour.py b/plotly/graph_objs/volume/_contour.py index 1dfe49dbab..346a5c983b 100644 --- a/plotly/graph_objs/volume/_contour.py +++ b/plotly/graph_objs/volume/_contour.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/volume/_hoverlabel.py b/plotly/graph_objs/volume/_hoverlabel.py index 235c5e5174..c26d7b1a74 100644 --- a/plotly/graph_objs/volume/_hoverlabel.py +++ b/plotly/graph_objs/volume/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/volume/colorbar/_tickfont.py b/plotly/graph_objs/volume/colorbar/_tickfont.py index e4e330c67b..273e44ff6d 100644 --- a/plotly/graph_objs/volume/colorbar/_tickfont.py +++ b/plotly/graph_objs/volume/colorbar/_tickfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/volume/colorbar/title/_font.py b/plotly/graph_objs/volume/colorbar/title/_font.py index b86955d334..2ae3208fd1 100644 --- a/plotly/graph_objs/volume/colorbar/title/_font.py +++ b/plotly/graph_objs/volume/colorbar/title/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/volume/hoverlabel/_font.py b/plotly/graph_objs/volume/hoverlabel/_font.py index 00d3cdd38b..b284b0a175 100644 --- a/plotly/graph_objs/volume/hoverlabel/_font.py +++ b/plotly/graph_objs/volume/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/volume/legendgrouptitle/_font.py b/plotly/graph_objs/volume/legendgrouptitle/_font.py index f471b3c5a1..cd40c8c2e3 100644 --- a/plotly/graph_objs/volume/legendgrouptitle/_font.py +++ b/plotly/graph_objs/volume/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/waterfall/_hoverlabel.py b/plotly/graph_objs/waterfall/_hoverlabel.py index 02198e04fb..a5dccbe755 100644 --- a/plotly/graph_objs/waterfall/_hoverlabel.py +++ b/plotly/graph_objs/waterfall/_hoverlabel.py @@ -51,8 +51,11 @@ def bgcolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns @@ -77,8 +80,11 @@ def bordercolor(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/waterfall/_insidetextfont.py b/plotly/graph_objs/waterfall/_insidetextfont.py index f3e7a6b4f2..6bf55ae0af 100644 --- a/plotly/graph_objs/waterfall/_insidetextfont.py +++ b/plotly/graph_objs/waterfall/_insidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/waterfall/_outsidetextfont.py b/plotly/graph_objs/waterfall/_outsidetextfont.py index 96638dbbf4..8cdb784bb3 100644 --- a/plotly/graph_objs/waterfall/_outsidetextfont.py +++ b/plotly/graph_objs/waterfall/_outsidetextfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/waterfall/_textfont.py b/plotly/graph_objs/waterfall/_textfont.py index 6d57cf56b0..5f34cec754 100644 --- a/plotly/graph_objs/waterfall/_textfont.py +++ b/plotly/graph_objs/waterfall/_textfont.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/waterfall/connector/_line.py b/plotly/graph_objs/waterfall/connector/_line.py index 2163c5bbbd..e26bcabbbd 100644 --- a/plotly/graph_objs/waterfall/connector/_line.py +++ b/plotly/graph_objs/waterfall/connector/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/waterfall/decreasing/_marker.py b/plotly/graph_objs/waterfall/decreasing/_marker.py index c1688a5201..f5aabccafb 100644 --- a/plotly/graph_objs/waterfall/decreasing/_marker.py +++ b/plotly/graph_objs/waterfall/decreasing/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/waterfall/decreasing/marker/_line.py b/plotly/graph_objs/waterfall/decreasing/marker/_line.py index d940dd53ae..f554d3cd9b 100644 --- a/plotly/graph_objs/waterfall/decreasing/marker/_line.py +++ b/plotly/graph_objs/waterfall/decreasing/marker/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/waterfall/hoverlabel/_font.py b/plotly/graph_objs/waterfall/hoverlabel/_font.py index 8f0ceb4a09..5dc93ded0e 100644 --- a/plotly/graph_objs/waterfall/hoverlabel/_font.py +++ b/plotly/graph_objs/waterfall/hoverlabel/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ - A list or array of any of the above Returns diff --git a/plotly/graph_objs/waterfall/increasing/_marker.py b/plotly/graph_objs/waterfall/increasing/_marker.py index d462a69cec..0a01422ecb 100644 --- a/plotly/graph_objs/waterfall/increasing/_marker.py +++ b/plotly/graph_objs/waterfall/increasing/_marker.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/waterfall/increasing/marker/_line.py b/plotly/graph_objs/waterfall/increasing/marker/_line.py index aac6bb68b7..91cc641d8a 100644 --- a/plotly/graph_objs/waterfall/increasing/marker/_line.py +++ b/plotly/graph_objs/waterfall/increasing/marker/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/waterfall/legendgrouptitle/_font.py b/plotly/graph_objs/waterfall/legendgrouptitle/_font.py index eba0499ca8..85d2843b92 100644 --- a/plotly/graph_objs/waterfall/legendgrouptitle/_font.py +++ b/plotly/graph_objs/waterfall/legendgrouptitle/_font.py @@ -30,8 +30,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/waterfall/totals/_marker.py b/plotly/graph_objs/waterfall/totals/_marker.py index 335cce979c..f5911cfcdc 100644 --- a/plotly/graph_objs/waterfall/totals/_marker.py +++ b/plotly/graph_objs/waterfall/totals/_marker.py @@ -23,8 +23,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/graph_objs/waterfall/totals/marker/_line.py b/plotly/graph_objs/waterfall/totals/marker/_line.py index 452c360b20..3058df4551 100644 --- a/plotly/graph_objs/waterfall/totals/marker/_line.py +++ b/plotly/graph_objs/waterfall/totals/marker/_line.py @@ -22,8 +22,11 @@ def color(self): - rgba (e.g. 'rgba(255, 0, 0, 0.5)', 'rgba(255 0 0 / 0.5)') - hsl (e.g. 'hsl(0, 100%, 50%)', 'hsl(0deg 100% 50%)') - hsla (e.g. 'hsla(0, 100%, 50%, 0.5)', 'hsla(0deg 100% 50% / 0.5)') - - hwb (e.g. 'hwb(0, 0%, 100%)', 'hwb(0 0% 100%)') - - a named CSS color: see https://plotly.com/python/css-colors/ for a list + - hwb (e.g. 'hwb(0 0% 100%)') + - lab/lch/oklab/oklch (e.g. 'oklch(0.7 0.15 180)') + - color (e.g. 'color(display-p3 1 0 0)') + - named colors (full list: https://www.w3.org/TR/css-color-4/#named-color) + - Any other supported CSS 4 color format: https://www.w3.org/TR/css-color-4/ Returns ------- diff --git a/plotly/labextension/package.json b/plotly/labextension/package.json index 025750f698..6672b55234 100644 --- a/plotly/labextension/package.json +++ b/plotly/labextension/package.json @@ -19,7 +19,7 @@ }, "dependencies": { "lodash-es": "^4.17.21", - "plotly.js": "4.0.0-rc.0", + "plotly.js": "4.0.0", "@lumino/widgets": "~2.4.0" }, "devDependencies": { @@ -33,7 +33,7 @@ "outputDir": "../plotly/labextension", "webpackConfig": "./webpack.config.js", "_build": { - "load": "static/remoteEntry.6f562cd20e5f2f4a.js", + "load": "static/remoteEntry.a36ed21aaa877c35.js", "mimeExtension": "./mimeExtension" } } diff --git a/plotly/labextension/static/0.a64aa5a9e512eb3f.js b/plotly/labextension/static/0.a64aa5a9e512eb3f.js deleted file mode 100644 index 093fa01701..0000000000 --- a/plotly/labextension/static/0.a64aa5a9e512eb3f.js +++ /dev/null @@ -1,3288 +0,0 @@ -(self.rspackChunkjupyterlab_plotly=self.rspackChunkjupyterlab_plotly||[]).push([[0],{2(e,t,r){"use strict";let n,i,a,o,s,l,c,u,h,f,d,p;r.r(t);var m,g,y,v,x,b,_,w,k,T,A,M,S=r(3),E=Object.create,C=Object.defineProperty,L=Object.getOwnPropertyDescriptor,I=Object.getOwnPropertyNames,P=Object.getPrototypeOf,z=Object.prototype.hasOwnProperty,O=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),D=(e,t,r)=>(r=null!=e?E(P(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let n of I(t))z.call(e,n)||void 0===n||C(e,n,{get:()=>t[n],enumerable:!(r=L(t,n))||r.enumerable});return e})(!t&&e&&e.__esModule?r:C(r,"default",{value:e,enumerable:!0}),e)),R=O((e,t)=>{var r,n;r=e,n=function(e){var t;function r(e,t){let r=0;for(let n of e)if(!1===t(n,r++))return!1;return!0}e.ArrayExt=void 0,function(e){function t(e,r,n=0,i=-1){let a,o=e.length;if(0===o)return -1;n=n<0?Math.max(0,n+o):Math.min(n,o-1),a=(i=i<0?Math.max(0,i+o):Math.min(i,o-1))=r)return;let n=e[t];for(let n=t+1;n0;){let n=s>>1,i=o+n;0>r(e[i],t)?(o=i+1,s-=n+1):s=n}return o},e.upperBound=function(e,t,r,n=0,i=-1){let a=e.length;if(0===a)return 0;n=n<0?Math.max(0,n+a):Math.min(n,a-1),i=i<0?Math.max(0,i+a):Math.min(i,a-1);let o=n,s=i-n+1;for(;s>0;){let n=s>>1,i=o+n;r(e[i],t)>0?s=n:(o=i+1,s-=n+1)}return o},e.shallowEqual=function(e,t,r){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0,i=e.length;n=o&&(n=a<0?o-1:o),void 0===i?i=a<0?-1:o:i<0?i=Math.max(i+o,a<0?-1:0):i>=o&&(i=a<0?o-1:o),r=a<0&&i>=n||a>0&&n>=i?0:a<0?Math.floor((i-n+1)/a+1):Math.floor((i-n-1)/a+1);let s=[];for(let t=0;t=(n=n<0?Math.max(0,n+i):Math.min(n,i-1)))return;let o=n-r+1;if(t>0?t%=o:t<0&&(t=(t%o+o)%o),0===t)return;let s=r+t;a(e,r,s-1),a(e,s,n),a(e,r,n)},e.fill=function(e,t,r=0,n=-1){let i,a=e.length;if(0!==a){r=r<0?Math.max(0,r+a):Math.min(r,a-1),i=(n=n<0?Math.max(0,n+a):Math.min(n,a-1))t;--r)e[r]=e[r-1];e[t]=r},e.removeAt=o,e.removeFirstOf=function(e,r,n=0,i=-1){let a=t(e,r,n,i);return -1!==a&&o(e,a),a},e.removeLastOf=function(e,t,n=-1,i=0){let a=r(e,t,n,i);return -1!==a&&o(e,a),a},e.removeAllOf=function(e,t,r=0,n=-1){let i=e.length;if(0===i)return 0;r=r<0?Math.max(0,r+i):Math.min(r,i-1),n=n<0?Math.max(0,n+i):Math.min(n,i-1);let a=0;for(let o=0;o=r&&o<=n&&e[o]===t||n=r)&&e[o]===t?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=i-a),a},e.removeFirstWhere=function(e,t,r=0,i=-1){let a,s=n(e,t,r,i);return -1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeLastWhere=function(e,t,r=-1,n=0){let a,s=i(e,t,r,n);return -1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeAllWhere=function(e,t,r=0,n=-1){let i=e.length;if(0===i)return 0;r=r<0?Math.max(0,r+i):Math.min(r,i-1),n=n<0?Math.max(0,n+i):Math.min(n,i-1);let a=0;for(let o=0;o=r&&o<=n&&t(e[o],o)||n=r)&&t(e[o],o)?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=i-a),a}}(e.ArrayExt||(e.ArrayExt={})),(t||(t={})).rangeLength=function(e,t,r){return 0===r?1/0:e>t&&r>0||et)}}(e.StringExt||(e.StringExt={})),e.chain=function*(...e){for(let t of e)yield*t},e.each=function(e,t){let r=0;for(let n of e)if(!1===t(n,r++))return},e.empty=function*(){},e.enumerate=function*(e,t=0){for(let r of e)yield[t++,r]},e.every=r,e.filter=function*(e,t){let r=0;for(let n of e)t(n,r++)&&(yield n)},e.find=function(e,t){let r=0;for(let n of e)if(t(n,r++))return n},e.findIndex=function(e,t){let r=0;for(let n of e)if(t(n,r++))return r-1;return -1},e.map=function*(e,t){let r=0;for(let n of e)yield t(n,r++)},e.max=function(e,t){let r;for(let n of e){if(void 0===r){r=n;continue}t(n,r)>0&&(r=n)}return r},e.min=function(e,t){let r;for(let n of e){if(void 0===r){r=n;continue}0>t(n,r)&&(r=n)}return r},e.minmax=function(e,t){let r=!0,n,i;for(let a of e)r?(n=a,i=a,r=!1):0>t(a,n)?n=a:t(a,i)>0&&(i=a);return r?void 0:[n,i]},e.once=function*(e){yield e},e.range=function*(e,r,n){void 0===r?(r=e,e=0,n=1):void 0===n&&(n=1);let i=t.rangeLength(e,r,n);for(let t=0;t-1;t--)yield e[t]},e.some=function(e,t){let r=0;for(let n of e)if(t(n,r++))return!0;return!1},e.stride=function*(e,t){let r=0;for(let n of e)r++%t==0&&(yield n)},e.take=function*(e,t){if(t<1)return;let r=e[Symbol.iterator](),n;for(;0e[Symbol.iterator]()),n=t.map(e=>e.next());for(;r(n,e=>!e.done);n=t.map(e=>e.next()))yield n.map(e=>e.value)}},"object"==typeof e&&"u">typeof t?n(e):"function"==typeof define&&define.amd?define(["exports"],n):n((r="u">typeof globalThis?globalThis:r||self).lumino_algorithm={})}),j=O((e,t)=>{var r,n;r=e,n=function(e,t){let r;e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function r(e){return Array.isArray(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=r;e.isObject=function(e){return!t(e)&&!r(e)},e.deepEqual=function e(n,i){if(n===i)return!0;if(t(n)||t(i))return!1;let a=r(n),o=r(i);return a===o&&(a&&o?function(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let n=0,i=t.length;n{if(n===e.provides)return!0;let o=r.get(n);if(!o)return!1;let s=t.get(o),l=[...s.requires,...s.optional];return 0!==l.length&&(a.push(o),!!l.some(i)||(a.pop(),!1))};if(!e.provides||0===n.length)return;let a=[e.id];if(n.some(i))throw ReferenceError(`Cycle detected: ${a.join(" -> ")}.`)},i.findDependents=function(e,r,n){let i=[],a=e=>{let t=r.get(e),a=[...t.requires,...t.optional];i.push(...a.reduce((t,r)=>{let i=n.get(r);return i&&t.push([e,i]),t},[]))};for(let e of r.keys())a(e);let o=i.filter(t=>t[1]===e),s=0;for(;o.length>s;){let e=o.length;for(let e of new Set(o.map(e=>e[0])))i.filter(t=>t[1]===e).forEach(e=>{o.includes(e)||o.push(e)});s=e}let l=t.topologicSort(o),c=l.findIndex(t=>t===e);return -1===c?[e]:l.slice(0,c+1)},i.collectStartupPlugins=function(e,t){let r=new Set;for(let t of e.keys())!0===e.get(t).autoStart&&r.add(t);if(t.startPlugins)for(let e of t.startPlugins)r.add(e);if(t.ignorePlugins)for(let e of t.ignorePlugins)r.delete(e);return Array.from(r)};e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(r="u">typeof window&&(window.crypto||window.msCrypto)||null)&&"function"==typeof r.getRandomValues?function(e){return r.getRandomValues(e)}:function(e){let t=0;for(let r=0,n=e.length;r>>0),e[r]=255&t,t>>>=8},e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){let t=new Uint8Array(16),r=Array(256);for(let e=0;e<16;++e)r[e]="0"+e.toString(16);for(let e=16;e<256;++e)r[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return -1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return -1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PluginRegistry=class{constructor(e={}){this._application=null,this._validatePlugin=()=>!0,this._plugins=new Map,this._services=new Map,e.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=e.validatePlugin)}get application(){return this._application}set application(e){if(null!==this._application)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=e}get deferredPlugins(){return Array.from(this._plugins).filter(([e,t])=>"defer"===t.autoStart).map(([e,t])=>e)}getPluginDescription(e){var t,r;return null!=(r=null==(t=this._plugins.get(e))?void 0:t.description)?r:""}hasPlugin(e){return this._plugins.has(e)}isPluginActivated(e){var t,r;return null!=(r=null==(t=this._plugins.get(e))?void 0:t.activated)&&r}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(e){if(this._plugins.has(e.id))throw TypeError(`Plugin '${e.id}' is already registered.`);if(!this._validatePlugin(e))throw Error(`Plugin '${e.id}' is not valid.`);let t=n.createPluginData(e);n.ensureNoCycle(t,this._plugins,this._services),t.provides&&this._services.set(t.provides,t.id),this._plugins.set(t.id,t)}registerPlugins(e){for(let t of e)this.registerPlugin(t)}deregisterPlugin(e,t){let r=this._plugins.get(e);if(r){if(r.activated&&!t)throw Error(`Plugin '${e}' is still active.`);this._plugins.delete(e)}}async activatePlugin(e){let t=this._plugins.get(e);if(!t)throw ReferenceError(`Plugin '${e}' is not registered.`);if(t.activated)return;if(t.promise)return t.promise;let r=t.requires.map(e=>this.resolveRequiredService(e)),n=t.optional.map(e=>this.resolveOptionalService(e));return t.promise=Promise.all([...r,...n]).then(e=>t.activate.apply(void 0,[this.application,...e])).then(e=>{t.service=e,t.activated=!0,t.promise=null}).catch(e=>{throw t.promise=null,e}),t.promise}async activatePlugins(e,t={}){switch(e){case"defer":{let e=this.deferredPlugins.filter(e=>this._plugins.get(e).autoStart).map(e=>this.activatePlugin(e));await Promise.all(e);break}case"startUp":{let e=n.collectStartupPlugins(this._plugins,t).map(async e=>{try{return await this.activatePlugin(e)}catch(t){console.error(`Plugin '${e}' failed to activate.`,t)}});await Promise.all(e)}}}async deactivatePlugin(e){let t=this._plugins.get(e);if(!t)throw ReferenceError(`Plugin '${e}' is not registered.`);if(!t.activated)return[];if(!t.deactivate)throw TypeError(`Plugin '${e}'#deactivate() method missing`);let r=n.findDependents(e,this._plugins,this._services),i=r.map(e=>this._plugins.get(e));for(let t of i)if(!t.deactivate)throw TypeError(`Plugin ${t.id}#deactivate() method missing (depends on ${e})`);for(let e of i){let t=[...e.requires,...e.optional].map(e=>{let t=this._services.get(e);return t?this._plugins.get(t).service:null});await e.deactivate(this.application,...t),e.service=null,e.activated=!1}return r.pop(),r}async resolveRequiredService(e){let t=this._services.get(e);if(!t)throw TypeError(`No provider for: ${e.name}.`);let r=this._plugins.get(t);return r.activated||await this.activatePlugin(t),r.service}async resolveOptionalService(e){let t=this._services.get(e);if(!t)return null;let r=this._plugins.get(t);if(!r.activated)try{await this.activatePlugin(t)}catch(e){return console.error(e),null}return r.service}},e.PromiseDelegate=class{constructor(){this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=t??"",this._tokenStructuralPropertyT=null}}},"object"==typeof e&&"u">typeof t?n(e,R()):"function"==typeof define&&define.amd?define(["exports","@lumino/algorithm"],n):n((r="u">typeof globalThis?globalThis:r||self).lumino_coreutils={},r.lumino_algorithm)}),F=O((e,t)=>{var r,n;r="u">typeof self?self:e,n=()=>{var e=(()=>{var e=Object.create,t=Object.defineProperty,r=Object.defineProperties,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,r,n)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,h=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&u(e,r,t[r]);if(o)for(var r of o(t))c.call(t,r)&&u(e,r,t[r]);return e},f=(e,t,r)=>function(){if(r)throw r[0];try{return e&&(t=(0,e[a(e)[0]])(e=0)),t}catch(e){throw r=[e],e}},d=(e,t)=>function(){try{return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},p=(e,r)=>{for(var n in r)t(e,n,{get:r[n],enumerable:!0})},m=(e,r,i,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of a(r))l.call(e,s)||s===i||t(e,s,{get:()=>r[s],enumerable:!(o=n(r,s))||o.enumerable});return e},g=(r,n,i)=>(i=null!=r?e(s(r)):{},m(!n&&r&&r.__esModule?i:t(i,"default",{value:r,enumerable:!0}),r)),y=e=>m(t({},"__esModule",{value:!0}),e),v=d({"src/version.js"(e){e.version="4.0.0-rc.0"}}),x=d({"node_modules/native-promise-only/lib/npo.src.js"(e,t){var r,n;r="Promise",n="u">typeof window?window:e,n[r]=n[r]||function(){var e,t,r,n=Object.prototype.toString,i="u">typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,n){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==n})}}catch{e=function(e,t,r){return e[t]=r,e}}function a(e,n){r.add(e,n),t||(t=i(r.drain))}function o(e){var t,r=typeof e;return null!=e&&("object"==r||"function"==r)&&(t=e.then),"function"==typeof t&&t}function s(){for(var e=0;e0&&a(s,r))}catch(e){c.call(new h(r),e)}}}function c(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(s,t))}function u(e,t,r,n){for(var i=0;itypeof t&&t.exports&&(t.exports=n[r])}}),b=d({"node_modules/@plotly/d3/d3.js"(e,t){(function(){var e={version:"3.8.2"},r=[].slice,n=function(e){return r.call(e)},i=self.document;function a(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(i)try{n(i.documentElement.childNodes)[0].nodeType}catch{n=function(e){for(var t=e.length,r=Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),i)try{i.createElement("DIV").style.setProperty("opacity",0,"")}catch{var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,h=u.setProperty;s.setAttribute=function(e,t){l.call(this,e,t+"")},s.setAttributeNS=function(e,t,r){c.call(this,e,t,r+"")},u.setProperty=function(e,t,r){h.call(this,e,t+"",r)}}function f(e,t){return et?1:e>=t?0:NaN}function d(e){return null===e?NaN:+e}function p(e){return!isNaN(e)}function m(e){return{left:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;0>e(t[a],r)?n=a+1:i=a}return n},right:function(t,r,n,i){for(arguments.length<3&&(n=0),arguments.length<4&&(i=t.length);n>>1;e(t[a],r)>0?i=a:n=a+1}return n}}}e.ascending=f,e.descending=function(e,t){return te?1:t>=e?0:NaN},e.min=function(e,t){var r,n,i=-1,a=e.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},e.max=function(e,t){var r,n,i=-1,a=e.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},e.extent=function(e,t){var r,n,i,a=-1,o=e.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)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t&&Math.sqrt(t)};var g=m(f);function y(e){return e.length}e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return m(1===e.length?function(t,r){return f(e(t),r)}:e)},e.shuffle=function(e,t,r){(a=arguments.length)<3&&(r=e.length,a<2&&(t=0));for(var n,i,a=r-t;a;)i=Math.random()*a--|0,n=e[a+t],e[a+t]=e[i+t],e[i+t]=n;return e},e.permute=function(e,t){for(var r=t.length,n=Array(r);r--;)n[r]=e[t[r]];return n},e.pairs=function(e){for(var t=0,r=e.length-1,n=e[0],i=Array(r<0?0:r);t=0;)for(t=(n=e[i]).length;--t>=0;)r[--o]=n[t];return r};var v=Math.abs;function x(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function b(){this._=Object.create(null)}function _(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function w(e){return"\0"===(e+="")[0]?e.slice(1):e}function k(e){return _(e)in this._}function T(e){return(e=_(e))in this._&&delete this._[e]}function A(){var e=[];for(var t in this._)e.push(w(t));return e}function M(){var e=0;for(var t in this._)++e;return e}function S(){for(var e in this._)return!1;return!0}function E(){this._=Object.create(null)}function C(e){return e}function L(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,n=I.length;rt;)i.push(n/a);else for(;(n=e+r*++o)=i.length)return r?r.call(n,a):t?a.sort(t):a;for(var l,c,u,h,f=-1,d=a.length,p=i[s++],m=new b;++f=i.length)return t;var n=[],o=a[r++];return t.forEach(function(t,i){n.push({key:t,values:e(i,r)})}),o?n.sort(function(e,t){return o(e.key,t.key)}):n}(o(e.map,t,0),0)},n.key=function(e){return i.push(e),n},n.sortKeys=function(e){return a[i.length-1]=e,n},n.sortValues=function(e){return t=e,n},n.rollup=function(e){return r=e,n},n},e.set=function(e){var t=new E;if(e)for(var r=0,n=e.length;r=0&&(n=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(n):this[e].on(n,t);if(2==arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(n,null);return this}},e.event=null,e.requote=function(e){return e.replace(F,"\\$&")};var F=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,B={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function N(e){return B(e,H),e}var U=function(e,t){return t.querySelector(e)},V=function(e,t){return t.querySelectorAll(e)},q=function(e,t){var r=e.matches||e[L(e,"matchesSelector")];return(q=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(U=function(e,t){return Sizzle(e,t)[0]||null},V=Sizzle,q=Sizzle.matchesSelector),e.selection=function(){return e.select(i.documentElement)};var H=e.selection.prototype=[];function G(e){return"function"==typeof e?e:function(){return U(e,this)}}function W(e){return"function"==typeof e?e:function(){return V(e,this)}}H.select=function(e){var t,r,n,i,a=[];e=G(e);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),X.hasOwnProperty(r)?{space:X[r],local:e}:e}},H.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var n=this.node();return(t=e.ns.qualify(t)).local?n.getAttributeNS(t.space,t.local):n.getAttribute(t)}for(r in t)this.each(Z(r,t[r]));return this}return this.each(Z(t,r))},H.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),n=(e=J(e)).length,i=-1;if(t=r.classList){for(;++i=0;)(r=n[i])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},H.sort=function(e){e=es.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(t=t.slice(0,o));var l=ef.get(t);function c(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}return l&&(t=l,s=ep),o?r?function(){var e=s(r,n(arguments));c.call(this),this.addEventListener(t,this[a]=e,e.$=i),e._=r}:c:r?P:function(){var r,n=RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var i in this)if(r=i.match(n)){var a=this[i];this.removeEventListener(r[1],a,a.$),delete this[i]}}}e.selection.enter=ec,e.selection.enter.prototype=eu,eu.append=H.append,eu.empty=H.empty,eu.node=H.node,eu.call=H.call,eu.size=H.size,eu.select=function(e){for(var t,r,n,i,a,o=[],s=-1,l=this.length;++s=n&&(n=t+1);!(o=s[n])&&++n1?eA:e<-1?-eA:Math.asin(e)}function eC(e){return((e=Math.exp(e))+1/e)/2}var eL=Math.SQRT2;e.interpolateZoom=function(e,t){var r,n,i=e[0],a=e[1],o=e[2],s=t[0],l=t[1],c=t[2],u=s-i,h=l-a,f=u*u+h*h;if(f0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){c&&c.domain(l.range().map(function(e){return(e-f.x)/f.k}).map(l.invert)),h&&h.domain(u.range().map(function(e){return(e-f.y)/f.k}).map(u.invert))}function E(e){g++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function L(e){--g||(e({type:"zoomend"}),r=null)}function I(){var t=this,r=_.of(t,arguments),n=0,i=e.select(o(t)).on(v,function(){n=1,A(e.mouse(t),a),C(r)}).on(x,function(){i.on(v,null).on(x,null),s(n),L(r)}),a=k(e.mouse(t)),s=ey(t);nH.call(t),E(r)}function P(){var t,r=this,n=_.of(r,arguments),i={},a=0,o=".zoom-"+e.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],h=e.select(r),d=ey(r);function p(){var n=e.touches(r);return t=f.k,n.forEach(function(e){e.identifier in i&&(i[e.identifier]=k(e))}),n}function m(){var t=e.event.target;e.select(t).on(l,g).on(c,v),u.push(t);for(var n=e.event.changedTouches,o=0,h=n.length;o1){var y=d[0],x=d[1],b=y[0]-x[0],_=y[1]-x[1];a=b*b+_*_}}function g(){var o,l,c,u,h=e.touches(r);nH.call(r);for(var f=0,d=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))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,i=(r=r<0?0:r>1?1:r)<=.5?r*(1+t):r+t-r*t,n=2*r-i,new eZ(a(e+120),a(e),a(e-120))}function eF(t,r,n){return this instanceof eF?(this.h=+t,this.c=+r,void(this.l=+n)):arguments.length<2?t instanceof eF?new eF(t.h,t.c,t.l):t instanceof eU?eG(t.l,t.a,t.b):eG((t=e2((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new eF(t,r,n)}eR.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new eD(this.h,this.s,this.l/e)},eR.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new eD(this.h,this.s,e*this.l)},eR.rgb=function(){return ej(this.h,this.s,this.l)},e.hcl=eF;var eB=eF.prototype=new eO;function eN(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new eU(r,Math.cos(e*=eM)*t,Math.sin(e)*t)}function eU(e,t,r){return this instanceof eU?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof eU?new eU(e.l,e.a,e.b):e instanceof eF?eN(e.h,e.c,e.l):e2((e=eZ(e)).r,e.g,e.b):new eU(e,t,r)}eB.brighter=function(e){return new eF(this.h,this.c,Math.min(100,this.l+eV*(arguments.length?e:1)))},eB.darker=function(e){return new eF(this.h,this.c,Math.max(0,this.l-eV*(arguments.length?e:1)))},eB.rgb=function(){return eN(this.h,this.c,this.l).rgb()},e.lab=eU;var eV=18,eq=eU.prototype=new eO;function eH(e,t,r){var n=(e+16)/116,i=n+t/500,a=n-r/200;return i=.95047*eW(i),new eZ(eX(3.2404542*i-1.5371385*(n=+eW(n))-.4985314*(a=1.08883*eW(a))),eX(-.969266*i+1.8760108*n+.041556*a),eX(.0556434*i-.2040259*n+1.0572252*a))}function eG(e,t,r){return e>0?new eF(Math.atan2(r,t)*eS,Math.sqrt(t*t+r*r),e):new eF(NaN,NaN,e)}function eW(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function eY(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function eX(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function eZ(e,t,r){return this instanceof eZ?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof eZ?new eZ(e.r,e.g,e.b):e0(""+e,eZ,ej):new eZ(e,t,r)}function e$(e){return new eZ(e>>16,e>>8&255,255&e)}function eK(e){return e$(e)+""}eq.brighter=function(e){return new eU(Math.min(100,this.l+eV*(arguments.length?e:1)),this.a,this.b)},eq.darker=function(e){return new eU(Math.max(0,this.l-eV*(arguments.length?e:1)),this.a,this.b)},eq.rgb=function(){return eH(this.l,this.a,this.b)},e.rgb=eZ;var eJ=eZ.prototype=new eO;function eQ(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function e0(e,t,r){var n,i,a,o=0,s=0,l=0;if(n=/([a-z]+)\((.*)\)/.exec(e=e.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 t(e5(i[0]),e5(i[1]),e5(i[2]))}return(a=e4.get(e))?t(a.r,a.g,a.b):(null==e||"#"!==e.charAt(0)||isNaN(a=parseInt(e.slice(1),16))||(4===e.length?(o=(o=(3840&a)>>4)>>4|o,s=(s=240&a)>>4|s,l=(l=15&a)<<4|l):7===e.length&&(o=(0xff0000&a)>>16,s=(65280&a)>>8,l=255&a)),t(o,s,l))}function e1(e,t,r){var n,i,a=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),s=o-a,l=(o+a)/2;return s?(i=l<.5?s/(o+a):s/(2-o-a),n=(e==o?(t-r)/s+6*(t0&&l<1?0:n),new eD(n,i,l)}function e2(e,t,r){e=e3(e);var n=eY((.4124564*e+.3575761*(t=e3(t))+.1804375*(r=e3(r)))/.95047),i=eY((.2126729*e+.7151522*t+.072175*r)/1);return eU(116*i-16,500*(n-i),200*(i-eY((.0193339*e+.119192*t+.9503041*r)/1.08883)))}function e3(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function e5(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}eJ.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,n=this.b;return t||r||n?(t&&t<30&&(t=30),r&&r<30&&(r=30),n&&n<30&&(n=30),new eZ(Math.min(255,t/e),Math.min(255,r/e),Math.min(255,n/e))):new eZ(30,30,30)},eJ.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new eZ(e*this.r,e*this.g,e*this.b)},eJ.hsl=function(){return e1(this.r,this.g,this.b)},eJ.toString=function(){return"#"+eQ(this.r)+eQ(this.g)+eQ(this.b)};var e4=e.map({aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32});function e6(e){return"function"==typeof e?e:function(){return e}}function e8(e){return function(t,r,n){return 2==arguments.length&&"function"==typeof r&&(n=r,r=null),e9(t,r,e,n)}}function e9(t,r,i,a){var o,s={},l=e.dispatch("beforesend","progress","load","error"),c={},u=new XMLHttpRequest,h=null;function f(){var e,t,r,n=u.status;if(!n&&((t=(e=u).responseType)&&"text"!==t?e.response:e.responseText)||n>=200&&n<300||304===n){try{r=i.call(s,u)}catch(e){l.error.call(s,e);return}l.load.call(s,r)}else l.error.call(s,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(t)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=f:u.onreadystatechange=function(){u.readyState>3&&f()},u.onprogress=function(t){var r=e.event;e.event=t;try{l.progress.call(s,u)}finally{e.event=r}},s.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?c[e]:(null==t?delete c[e]:c[e]=t+"",s)},s.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",s):r},s.responseType=function(e){return arguments.length?(h=e,s):h},s.response=function(e){return i=e,s},["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(n(arguments)))}}),s.send=function(e,n,i){if(2==arguments.length&&"function"==typeof n&&(i=n,n=null),u.open(e,t,!0),null==r||"accept"in c||(c.accept=r+",*/*"),u.setRequestHeader)for(var a in c)u.setRequestHeader(a,c[a]);return null!=r&&u.overrideMimeType&&u.overrideMimeType(r),null!=h&&(u.responseType=h),null!=i&&s.on("error",i).on("load",function(e){i(null,e)}),l.beforesend.call(s,u),u.send(n??null),s},s.abort=function(){return u.abort(),s},e.rebind(s,l,"on"),null==a?s:s.get(1===(o=a).length?function(e,t){o(null==e?t:null)}:o)}e4.forEach(function(e,t){e4.set(e,e$(t))}),e.functor=e6,e.xhr=e8(C),e.dsv=function(e,t){var r=RegExp('["'+e+` -]`),n=e.charCodeAt(0);function i(e,r,n){arguments.length<3&&(n=r,r=null);var i=e9(e,t,null==r?a:o(r),n);return i.row=function(e){return arguments.length?i.response(null==(r=e)?a:o(e)):r},i}function a(e){return i.parse(e.responseText)}function o(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var r;return i.parseRows(e,function(e,n){if(r)return r(e,n-1);var i=function(t){for(var r={},n=e.length,i=0;i=l)return o;if(i)return i=!1,a;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(tr),tr=setTimeout(ta,t)),tt=0):(tt=1,tn(ta))}function to(){for(var e=Date.now(),t=e7;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function ts(){for(var e,t=e7,r=1/0;t;)t.c?(t.t1&&0>=(t=e[a[o-2]],r=e[a[o-1]],n=e[s],(r[0]-t[0])*(n[1]-t[1])-(r[1]-t[1])*(n[0]-t[0]));)--o;a[o++]=s}return a.slice(0,o)}function th(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){ti.apply(this,arguments)},e.timer.flush=function(){to(),ts()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.geom={},e.geom.hull=function(e){var t=tl,r=tc;if(arguments.length)return n(e);function n(e){if(e.length<3)return[];var n,i=e6(t),a=e6(r),o=e.length,s=[],l=[];for(n=0;n=0;--n)d.push(e[s[c[n]][2]]);for(n=+h;n=-e_)){var d=l*l+c*c,p=u*u+h*h,m=(h*d-c*p)/f,g=(l*p-u*d)/f,h=g+s,y=tw.pop()||new tC;y.arc=e,y.site=i,y.x=m+o,y.y=h+Math.sqrt(m*m+g*g),y.cy=h,e.circle=y;for(var v=null,x=tb._;x;)if(y.y1e-6)s=s.L;else if((i=a-function(e,t){var r=e.N;if(r)return tM(r,t);var n=e.site;return n.y===t?n.x:1/0}(s,o))>1e-6){if(!s.R){t=s;break}s=s.R}else{n>-1e-6?(t=s.P,r=s):i>-1e-6?(t=s,r=s.N):t=r=s;break}var l=tT(e);if(tv.insert(t,l),!(!t&&!r)){if(t===r){tI(t),r=tT(t.site),tv.insert(l,r),l.edge=r.edge=tz(t.site,l.site),tL(t),tL(r);return}if(!r){l.edge=tz(t.site,l.site);return}tI(t),tI(r);var c=t.site,u=c.x,h=c.y,f=e.x-u,d=e.y-h,p=r.site,m=p.x-u,g=p.y-h,y=2*(f*g-d*m),v=f*f+d*d,x=m*m+g*g,b={x:(g*v-d*x)/y+u,y:(f*x-m*v)/y+h};tO(r.edge,c,p,b),l.edge=tz(c,e,null,b),r.edge=tz(e,p,null,b),tL(t),tL(r)}}(a),r=a.x,n=a.y),a=e.pop();else if(i)!function(e){var t=e.circle,r=t.x,n=t.cy,i={x:r,y:n},a=e.P,o=e.N,s=[e];tA(e);for(var l=a;l.circle&&1e-6>v(r-l.circle.x)&&1e-6>v(n-l.circle.cy);)a=l.P,s.unshift(l),tA(l),l=a;s.unshift(l),tI(l);for(var c=o;c.circle&&1e-6>v(r-c.circle.x)&&1e-6>v(n-c.circle.cy);)o=c.N,s.push(c),tA(c),c=o;s.push(c),tI(c);var u,h=s.length;for(u=1;u0)){if(a/=p,p<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=n-l,!(!p&&a<0)){if(a/=p,p<0){if(a>d)return;a>f&&(f=a)}else if(p>0){if(a0)){if(a/=m,m<0){if(a0){if(a>d)return;a>f&&(f=a)}if(a=i-c,!(!m&&a<0)){if(a/=m,m<0){if(a>d)return;a>f&&(f=a)}else if(m>0){if(a0&&(e.a={x:l+f*p,y:c+f*m}),d<1&&(e.b={x:l+d*p,y:c+d*m}),e}}}}}),l=o.length;l--;)(!function(e,t){var r=e.b;if(r)return!0;var n,i,a=e.a,o=t[0][0],s=t[1][0],l=t[0][1],c=t[1][1],u=e.l,h=e.r,f=u.x,d=u.y,p=h.x,m=h.y,g=(f+p)/2;if(m===d){if(g=s)return;if(f>p){if(a){if(a.y>=c)return}else a={x:g,y:l};r={x:g,y:c}}else{if(a){if(a.y1)if(f>p){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.xv(a.a.x-a.b.x)&&1e-6>v(a.a.y-a.b.y))&&(a.a=a.b=null,o.splice(l,1))}(t),function(e){for(var t,r,n,i,a,o,s,l,c,u,h=e[0][0],f=e[1][0],d=e[0][1],p=e[1][1],m=ty,g=m.length;g--;)if(!(!(a=m[g])||!a.prepare()))for(l=(s=a.edges).length,o=0;o1e-6||v(i-r)>1e-6)&&(s.splice(o,0,new tD(function(e,t,r){var n=new tP(e,null);return n.a=t,n.b=r,tg.push(n),n}(a.site,u,1e-6>v(n-h)&&p-i>1e-6?{x:h,y:1e-6>v(t-h)?r:p}:1e-6>v(i-p)&&f-n>1e-6?{x:1e-6>v(r-p)?t:f,y:p}:1e-6>v(n-f)&&i-d>1e-6?{x:f,y:1e-6>v(t-f)?r:d}:1e-6>v(i-d)&&n-h>1e-6?{x:1e-6>v(r-d)?t:h,y:d}:null),a.site,null)),++l)}(t));var o={cells:ty,edges:tg};return tv=tb=tg=ty=null,o}function tV(e,t){return t.y-e.y||t.x-e.x}tS.prototype.prepare=function(){for(var e,t=this.edges,r=t.length;r--;)(e=t[r].edge).b&&e.a||t.splice(r,1);return t.sort(tE),t.length},tD.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tR.prototype={insert:function(e,t){var r,n,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=tN(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)n=r.U,r===n.L?(i=n.R)&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.R&&(tF(this,r),r=(e=r).U),r.C=!1,n.C=!0,tB(this,n)):(i=n.L)&&i.C?(r.C=i.C=!1,n.C=!0,e=n):(e===r.L&&(tB(this,r),r=(e=r).U),r.C=!1,n.C=!0,tF(this,n)),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,r,n,i=e.U,a=e.L,o=e.R;if(r=a?o?tN(o):a:o,i?i.L===e?i.L=r:i.R=r:this._=r,a&&o?(n=r.C,r.C=e.C,r.L=a,a.U=r,r!==o?(i=r.U,r.U=e.U,e=r.R,i.L=e,r.R=o,o.U=r):(r.U=i,i=r,e=r.R)):(n=e.C,e=r),e&&(e.U=i),!n){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,tF(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,tB(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,tF(this,i),e=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,tB(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,tF(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,tB(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}},e.geom.voronoi=function(e){var t=tl,r=tc,n=t,i=r,a=tq;if(e)return o(e);function o(e){var t=Array(e.length),r=a[0][0],n=a[0][1],i=a[1][0],o=a[1][1];return tU(s(e),a).cells.forEach(function(a,s){var l=a.edges,c=a.site;(t[s]=l.length?l.map(function(e){var t=e.start();return[t.x,t.y]}):c.x>=r&&c.x<=i&&c.y>=n&&c.y<=o?[[r,o],[i,o],[i,n],[r,n]]:[]).point=e[s]}),t}function s(e){return e.map(function(e,t){return{x:1e-6*Math.round(n(e,t)/1e-6),y:1e-6*Math.round(i(e,t)/1e-6),i:t}})}return o.links=function(e){return tU(s(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},o.triangles=function(e){var t=[];return tU(s(e)).cells.forEach(function(r,n){for(var i,a,o,s,l=r.site,c=r.edges.sort(tE),u=-1,h=c.length,f=c[h-1].edge,d=f.l===l?f.r:f.l;++u(i=l,a=s,o=d,(i.x-o.x)*(a.y-i.y)-(i.x-a.x)*(o.y-i.y))&&t.push([e[n],e[s.i],e[d.i]])}}),t},o.x=function(e){return arguments.length?(n=e6(t=e),o):t},o.y=function(e){return arguments.length?(i=e6(r=e),o):r},o.clipExtent=function(e){return arguments.length?(a=e??tq,o):a===tq?null:a},o.size=function(e){return arguments.length?o.clipExtent(e&&[[0,0],e]):a===tq?null:a&&a[1]},o};var tq=[[-1e6,-1e6],[1e6,1e6]];function tH(e){return e.x}function tG(e){return e.y}function tW(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function tY(t,r){t=e.rgb(t),r=e.rgb(r);var n=t.r,i=t.g,a=t.b,o=r.r-n,s=r.g-i,l=r.b-a;return function(e){return"#"+eQ(Math.round(n+o*e))+eQ(Math.round(i+s*e))+eQ(Math.round(a+l*e))}}function tX(e,t){var r,n={},i={};for(r in e)r in t?n[r]=tQ(e[r],t[r]):i[r]=e[r];for(r in t)r in e||(i[r]=t[r]);return function(e){for(r in n)i[r]=n[r](e);return i}}function tZ(e,t){return e*=1,t*=1,function(r){return e*(1-r)+t*r}}function t$(e,t){var r,n,i,a=tK.lastIndex=tJ.lastIndex=0,o=-1,s=[],l=[];for(e+="",t+="";(r=tK.exec(e))&&(n=tJ.exec(t));)(i=n.index)>a&&(i=t.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:tZ(r,n)})),a=tJ.lastIndex;return am&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(h=0;hm&&(m=b),_>g&&(g=_),c.push(b),u.push(_)}var w=m-d,k=g-p;function T(e,t,r,n,i,a,o,s){if(!(isNaN(r)||isNaN(n)))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(v(l-r)+v(c-n)<.01)A(e,t,r,n,i,a,o,s);else{var u=e.point;e.x=e.y=e.point=null,A(e,u,l,c,i,a,o,s),A(e,t,r,n,i,a,o,s)}else e.x=r,e.y=n,e.point=t}else A(e,t,r,n,i,a,o,s)}function A(e,t,r,n,i,a,o,s){var l=(i+o)*.5,c=(a+s)*.5,u=r>=l,h=n>=c,f=h<<1|u;e.leaf=!1,e=e.nodes[f]||(e.nodes[f]=tW()),u?i=l:o=l,h?a=c:s=c,T(e,t,r,n,i,a,o,s)}w>k?g=p+w:m=d+k;var M=tW();if(M.add=function(e){T(M,e,+y(e,++h),+x(e,h),d,p,m,g)},M.visit=function(e){!function e(t,r,n,i,a,o){if(!t(r,n,i,a,o)){var s=(n+a)*.5,l=(i+o)*.5,c=r.nodes;c[0]&&e(t,c[0],n,i,s,l),c[1]&&e(t,c[1],s,i,a,l),c[2]&&e(t,c[2],n,l,s,o),c[3]&&e(t,c[3],s,l,a,o)}}(e,M,d,p,m,g)},M.find=function(e){var t,r,n,i,a,o,s,l,c;return t=M,r=e[0],n=e[1],c=1/0,function e(t,u,h,f,d){if(!(u>o||h>s||f=b,k=n>=_,T=k<<1|w,A=T+4;T=0&&!(n=e.interpolators[i](t,r)););return n}function t0(e,t){var r,n=[],i=[],a=e.length,o=t.length,s=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function t7(e){return 1-Math.cos(e*eA)}function re(e){return Math.pow(2,10*(e-1))}function rt(e){return 1-Math.sqrt(1-e*e)}function rr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function rn(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function ri(e){var t,r,n,i=[e.a,e.b],a=[e.c,e.d],o=ro(i),s=ra(i,a),l=ro((t=a,r=i,n=-s,t[0]+=n*r[0],t[1]+=n*r[1],t))||0;i[0]*a[1]=0?e.slice(0,n):e,a=n>=0?e.slice(n+1):"in";return i=t2.get(i)||t1,t=(a=t3.get(a)||C)(i.apply(null,r.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var n=t.h,i=t.c,a=t.l,o=r.h-n,s=r.c-i,l=r.l-a;return 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),function(e){return eN(n+o*e,i+s*e,a+l*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var n=t.h,i=t.s,a=t.l,o=r.h-n,s=r.s-i,l=r.l-a;return 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),function(e){return ej(n+o*e,i+s*e,a+l*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var n=t.l,i=t.a,a=t.b,o=r.l-n,s=r.a-i,l=r.b-a;return function(e){return eH(n+o*e,i+s*e,a+l*e)+""}},e.interpolateRound=rn,e.transform=function(t){var r=i.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new ri(t?t.matrix:rs)})(t)},ri.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rs={a:1,b:0,c:0,d:1,e:0,f:0};function rl(e){return e.length?e.pop()+",":""}function rc(t,r){var n,i,a,o,s=[],l=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push("translate(",null,",",null,")");n.push({i:i-4,x:tZ(e[0],t[0])},{i:i-2,x:tZ(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,s,l),n=t.rotate,i=r.rotate,n!==i?(n-i>180?i+=360:i-n>180&&(n+=360),l.push({i:s.push(rl(s)+"rotate(",null,")")-2,x:tZ(n,i)})):i&&s.push(rl(s)+"rotate("+i+")"),a=t.skew,o=r.skew,a!==o?l.push({i:s.push(rl(s)+"skewX(",null,")")-2,x:tZ(a,o)}):o&&s.push(rl(s)+"skewX("+o+")"),function(e,t,r,n){if(e[0]!==t[0]||e[1]!==t[1]){var i=r.push(rl(r)+"scale(",null,",",null,")");n.push({i:i-4,x:tZ(e[0],t[0])},{i:i-2,x:tZ(e[1],t[1])})}else(1!==t[0]||1!==t[1])&&r.push(rl(r)+"scale("+t+")")}(t.scale,r.scale,s,l),t=r=null,function(e){for(var t,r=-1,n=l.length;++r0?n=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:n=0})):e>0&&(l.start({type:"start",alpha:n=e}),t=ti(s.tick)),s):n},s.start=function(){var e,t,r,n=y.length,l=v.length,u=c[0],p=c[1];for(e=0;e=0;)i.push(n[r])}function rw(e,t){for(var r=[e],n=[];null!=(e=r.pop());)if(n.push(e),(a=e.children)&&(i=a.length))for(var i,a,o=-1;++o=0;)c.push(s=o[a]),s.parent=l,s.depth=l.depth+1;r&&(l.value=0),l.children=o}else r&&(l.value=+r.call(n,l,l.depth)||0),delete l.children;return rw(i,function(t){var n,i;e&&(n=t.children)&&n.sort(e),r&&(i=t.parent)&&(i.value+=t.value)}),u}return n.sort=function(t){return arguments.length?(e=t,n):e},n.children=function(e){return arguments.length?(t=e,n):t},n.value=function(e){return arguments.length?(r=e,n):r},n.revalue=function(e){return r&&(r_(e,function(e){e.children&&(e.value=0)}),rw(e,function(e){var t;e.children||(e.value=+r.call(n,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)})),e},n},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function n(e,n){var i=t.call(this,e,n);return function e(t,r,n,i){var a=t.children;if(t.x=r,t.y=t.depth*i,t.dx=n,t.dy=i,a&&(o=a.length)){var o,s,l,c=-1;for(n=t.value?n/t.value:0;++cs&&(s=n),o.push(n)}for(r=0;ri&&(n=r,i=t);return n}function rR(e){return e.reduce(rj,0)}function rj(e,t){return e+t[1]}function rF(e,t){return rB(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function rB(e,t){for(var r=-1,n=+e[0],i=(e[1]-n)/t,a=[];++r<=t;)a[r]=i*r+n;return a}function rN(t){return[e.min(t),e.max(t)]}function rU(e,t){return e.value-t.value}function rV(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function rq(e,t){e._pack_next=t,t._pack_prev=e}function rH(e,t){var r=t.x-e.x,n=t.y-e.y,i=e.r+t.r;return .999*i*i>r*r+n*n}function rG(e){if((t=e.children)&&(l=t.length)){var t,r,n,i,a,o,s,l,c=1/0,u=-1/0,h=1/0,f=-1/0;if(t.forEach(rW),(r=t[0]).x=-r.r,r.y=0,x(r),l>1&&((n=t[1]).x=n.r,n.y=0,x(n),l>2))for(rX(r,n,i=t[2]),x(i),rV(r,i),r._pack_prev=i,rV(i,n),n=r._pack_next,a=3;a0)for(o=-1;++o=h[0]&&l<=h[1]&&(s=c[e.bisect(f,l,1,p)-1],s.y+=m,s.push(a[o]));return c}return a.value=function(e){return arguments.length?(r=e,a):r},a.range=function(e){return arguments.length?(n=e6(e),a):n},a.bins=function(e){return arguments.length?(i="number"==typeof e?function(t){return rB(t,e)}:e6(e),a):i},a.frequency=function(e){return arguments.length?(t=!!e,a):t},a},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(rU),n=0,i=[1,1];function a(e,a){var o=r.call(this,e,a),s=o[0],l=i[0],c=i[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,rw(s,function(e){e.r=+u(e.value)}),rw(s,rG),n){var h=n*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;rw(s,function(e){e.r+=h}),rw(s,rG),rw(s,function(e){e.r-=h})}return function e(t,r,n,i){var a=t.children;if(t.x=r+=i*t.x,t.y=n+=i*t.y,t.r*=i,a)for(var o=-1,s=a.length;++od.x&&(d=e),e.depth>p.depth&&(p=e)});var m=r(f,d)/2-f.x,g=n[0]/(d.x+r(d,f)/2+m),y=n[1]/(p.depth||1);r_(u,function(e){e.x=(e.x+m)*g,e.y=e.depth*y})}return c}function o(e){var t=e.children,n=e.parent.children,i=e.i?n[e.i-1]:null;if(t.length){!function(e){for(var t,r=0,n=0,i=e.children,a=i.length;--a>=0;)t=i[a],t.z+=r,t.m+=r,r+=t.s+(n+=t.c)}(e);var a=(t[0].z+t[t.length-1].z)/2;i?(e.z=i.z+r(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+r(e._,i._));e.parent.A=function(e,t,n){if(t){for(var i,a,o,s,l=e,c=e,u=t,h=l.parent.children[0],f=l.m,d=c.m,p=u.m,m=h.m;u=rK(u),l=r$(l),u&&l;){h=r$(h),(c=rK(c)).a=e,(s=u.z+p-l.z-f+r(u._,l._))>0&&(function(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}((i=u,a=e,o=n,i.a.parent===a.parent?i.a:o),e,s),f+=s,d+=s),p+=u.m,f+=l.m,m+=h.m,d+=c.m}u&&!rK(c)&&(c.t=u,c.m+=p-d),l&&!r$(h)&&(h.t=l,h.m+=f-m,n=e)}return n}(e,i,e.parent.A||n[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=n[0],e.y=e.depth*n[1]}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(i=null==(n=e)?l:null,a):i?null:n},a.nodeSize=function(e){return arguments.length?(i=null==(n=e)?null:l,a):i?n:null},rb(a,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=rZ,n=[1,1],i=!1;function a(a,o){var s,l=t.call(this,a,o),c=l[0],u=0;rw(c,function(t){var n,i,a=t.children;a&&a.length?(t.x=(n=a).reduce(function(e,t){return e+t.x},0)/n.length,i=a,t.y=1+e.max(i,function(e){return e.y})):(t.x=s?u+=r(t,s):0,t.y=0,s=t)});var h=function e(t){var r=t.children;return r&&r.length?e(r[0]):t}(c),f=function e(t){var r,n=t.children;return n&&(r=n.length)?e(n[r-1]):t}(c),d=h.x-r(h,f)/2,p=f.x+r(f,h)/2;return rw(c,i?function(e){e.x=(e.x-c.x)*n[0],e.y=(c.y-e.y)*n[1]}:function(e){e.x=(e.x-d)/(p-d)*n[0],e.y=(1-(c.y?e.y/c.y:1))*n[1]}),l}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(i=null==(n=e),a):i?null:n},a.nodeSize=function(e){return arguments.length?(i=null!=(n=e),a):i?n:null},rb(a,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),n=Math.round,i=[1,1],a=null,o=rJ,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,n,i=-1,a=e.length;++ir.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o0;)f.push(n=d[a-1]),f.area+=n.area,"squarify"!==l||(i=function(e,t){for(var r,n=e.area,i=0,a=1/0,o=-1,s=e.length;++oi&&(i=r));return n*=n,t*=t,n?Math.max(t*i*c/n,n/(t*a*c)):1/0}(f,m))<=p?(d.pop(),p=i):(f.area-=f.pop().area,h(f,m,s,!1),m=Math.min(s.dx,s.dy),f.length=f.area=0,p=1/0);f.length&&(h(f,m,s,!0),f.length=f.area=0),r.forEach(e)}})(a),s&&(t=n),n}return f.size=function(e){return arguments.length?(i=e,f):i},f.padding=function(e){var t;return arguments.length?(o=null==(a=e)?rJ:"function"==(t=typeof e)?function(t){var r=e.call(f,t,t.depth);return null==r?rJ(t):rQ(t,"number"==typeof r?[r,r,r,r]:r)}:("number"===t&&(e=[e,e,e,e]),function(t){return rQ(t,e)}),f):a},f.round=function(e){return arguments.length?(n=e?Math.round:Number,f):n!=Number},f.sticky=function(e){return arguments.length?(s=e,t=null,f):s},f.ratio=function(e){return arguments.length?(c=e,f):c},f.mode=function(e){return arguments.length?(l=e+"",f):l},rb(f,r)},e.random={normal:function(e,t){var r=arguments.length;return r<2&&(t=1),r<1&&(e=0),function(){var r,n,i;do i=(r=2*Math.random()-1)*r+(n=2*Math.random()-1)*n;while(!i||i>1);return e+t*r*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?r6:r2,s=i?rh:ru;return a=e(t,r,s,n),o=e(r,t,s,tQ),l}function l(e){return a(e)}return l.invert=function(e){return o(e)},l.domain=function(e){return arguments.length?(t=e.map(Number),s()):t},l.range=function(e){return arguments.length?(r=e,s()):r},l.rangeRound=function(e){return l.range(e).interpolate(rn)},l.clamp=function(e){return arguments.length?(i=e,s()):i},l.interpolate=function(e){return arguments.length?(n=e,s()):n},l.ticks=function(e){return ne(t,e)},l.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},l.nice=function(e){return r9(t,e),s()},l.copy=function(){return e(t,r,n,i)},s()}([0,1],[0,1],tQ,!1)},e.scale.log=function(){return function e(t,r,n,i){function a(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(r)}function o(e){return n?Math.pow(r,e):-Math.pow(r,-e)}function s(e){return t(a(e))}return s.invert=function(e){return o(t.invert(e))},s.domain=function(e){return arguments.length?(n=e[0]>=0,t.domain((i=e.map(Number)).map(a)),s):i},s.base=function(e){return arguments.length?(r=+e,t.domain(i.map(a)),s):r},s.nice=function(){var e=r3(i.map(a),n?Math:nt);return t.domain(e),i=e.map(o),s},s.ticks=function(){var e=r0(i),t=[],s=e[0],l=e[1],c=Math.floor(a(s)),u=Math.ceil(a(l)),h=r%1?2:r;if(isFinite(u-c)){if(n){for(;c0;f--)t.push(o(c)*f);for(c=0;t[c]l;u--);t=t.slice(c,u)}return t},s.copy=function(){return e(t.copy(),r,n,i)},r8(s,t)}(e.scale.linear().domain([0,1]),10,!0,[1,10])};var nt={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function nr(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}e.scale.pow=function(){return function e(t,r,n){var i=nr(r),a=nr(1/r);function o(e){return t(i(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((n=e.map(Number)).map(i)),o):n},o.ticks=function(e){return ne(n,e)},o.tickFormat=function(e,t){return d3_scale_linearTickFormat(n,e,t)},o.nice=function(e){return o.domain(r9(n,e))},o.exponent=function(e){return arguments.length?(i=nr(r=e),a=nr(1/r),t.domain(n.map(i)),o):r},o.copy=function(){return e(t.copy(),r,n)},r8(o,t)}(e.scale.linear(),1,[0,1])},e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return function t(r,n){var i,a,o;function s(e){return a[((i.get(e)||("range"===n.t?i.set(e,r.push(e)):NaN))-1)%a.length]}function l(t,n){return e.range(r.length).map(function(e){return t+n*e})}return s.domain=function(e){if(!arguments.length)return r;r=[],i=new b;for(var t,a=-1,o=e.length;++a0?i[e-1]:r[0],eh?0:1;if(c=eT)return l(c,d)+(s?l(s,1-d):"")+"Z";var p,m,g,y,v,x,b,_,w,k,T,A,M=0,S=0,E=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=n===nl?Math.sqrt(s*s+c*c):+n.apply(this,arguments),d||(S*=-1),c&&(S=eE(g/c*Math.sin(y))),s&&(M=eE(g/s*Math.sin(y)))),c){v=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)<=ew?0:1;if(S&&np(v,x,b,_)===d^C){var L=(u+h)/2;v=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else v=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 I=Math.abs(u-h+2*M)<=ew?0:1;if(M&&np(w,k,T,A)===1-d^I){var P=(u+h)/2;w=s*Math.cos(P),k=s*Math.sin(P),T=A=null}}else w=k=0;if(f>1e-6&&(p=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function nm(e,t,r,n,i){var a=e[0]-t[0],o=e[1]-t[1],s=(i?n:-n)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=e[0]+l,h=e[1]+c,f=t[0]+l,d=t[1]+c,p=(u+f)/2,m=(h+d)/2,g=f-u,y=d-h,v=g*g+y*y,x=r-n,b=u*d-f*h,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*v-b*b)),w=(b*y-g*_)/v,k=(-b*g-y*_)/v,T=(b*y+g*_)/v,A=(-b*g+y*_)/v,M=w-p,S=k-m,E=T-p,C=A-m;return M*M+S*S>E*E+C*C&&(w=T,k=A),[[w-l,k-c],[w*r/x,k*r/x]]}function ng(){return!0}function ny(e){var t=tl,r=tc,n=ng,i=nx,a=i.key,o=.7;function s(a){var s,l=[],c=[],u=-1,h=a.length,f=e6(t),d=e6(r);function p(){l.push("M",i(e(c),o))}for(;++u1&&i.push("H",n[0]),i.join("")},"step-before":n_,"step-after":nw,basis:nA,"basis-open":function(e){if(e.length<4)return nx(e);for(var t,r=[],n=-1,i=e.length,a=[0],o=[0];++n<3;)t=e[n],a.push(t[0]),o.push(t[1]);for(r.push(nM(nC,a)+","+nM(nC,o)),--n;++nv(t=nI(e[s],e[s+1]))?o[s]=o[s+1]=0:(i=(r=o[s]/t)*r+(n=o[s+1]/t)*n)>9&&(i=3*t/Math.sqrt(i),o[s]=i*r,o[s+1]=i*n);for(s=-1;++s<=l;)a.push([(i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])))||0,o[s]*i||0]);return a}(e))}});function nx(e){return e.length>1?e.join("L"):e+"Z"}function nb(e){return e.join("L")+"Z"}function n_(e){for(var t=0,r=e.length,n=e[0],i=[n[0],",",n[1]];++t1){s=t[1],a=e[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;cew)+",1 "+t}return a.radius=function(e){return arguments.length?(r=e6(e),a):r},a.source=function(t){return arguments.length?(e=e6(t),a):e},a.target=function(e){return arguments.length?(t=e6(e),a):t},a.startAngle=function(e){return arguments.length?(n=e6(e),a):n},a.endAngle=function(e){return arguments.length?(i=e6(e),a):i},a},e.svg.diagonal=function(){var e=nO,t=nD,r=nj;function n(n,i){var a=e.call(this,n,i),o=t.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(t){return arguments.length?(e=e6(t),n):e},n.target=function(e){return arguments.length?(t=e6(e),n):t},n.projection=function(e){return arguments.length?(r=e,n):r},n},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=nj,n=t.projection;return t.projection=function(e){var t;return arguments.length?n((t=r=e,function(){var e=t.apply(this,arguments),r=e[0],n=e[1]-eA;return[r*Math.cos(n),r*Math.sin(n)]})):r},t},e.svg.symbol=function(){var e=nB,t=nF;function r(r,n){return(nU.get(e.call(this,r,n))||nN)(t.call(this,r,n))}return r.type=function(t){return arguments.length?(e=e6(t),r):e},r.size=function(e){return arguments.length?(t=e6(e),r):t},r};var nU=e.map({circle:nN,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*nq)),r=t*nq;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/nV),r=t*nV/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/nV),r=t*nV/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=nU.keys();var nV=Math.sqrt(3),nq=Math.tan(30*eM);H.transition=function(e){for(var t,r,n=nY||++n$,i=nQ(e),a=[],o=nX||{time:Date.now(),ease:t9,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--f].call(e,o);if(a>=1)return h.event&&h.event.end.call(e,e.__data__,t),--u.count?delete u[n]:delete e[r],1}h||(o=ti(function(e){var t=h.delay;if(o.t=t+a,t<=e)return f(e-t);o.c=f},0,a=i.time),h=u[n]={tween:new b,time:a,timer:o,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++u.count)}nZ.call=H.call,nZ.empty=H.empty,nZ.node=H.node,nZ.size=H.size,e.transition=function(t,r){return t&&t.transition?nY?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=nZ,nZ.select=function(e){var t,r,n,i=this.id,a=this.namespace,o=[];e=G(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function m(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var h,g,y=this,v=e.select(e.event.target),x=n.of(y,arguments),b=e.select(y),_=v.datum(),w=!/^(n|s)$/.test(_)&&i,k=!/^(e|w)$/.test(_)&&a,T=v.classed("extent"),A=ey(y),M=e.mouse(y),S=e.select(o(y)).on("keydown.brush",function(){32==e.event.keyCode&&(T||(h=null,M[0]-=s[1],M[1]-=l[1],T=2),D())}).on("keyup.brush",function(){32==e.event.keyCode&&2==T&&(M[0]+=s[1],M[1]+=l[1],T=0,D())});if(e.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",P):S.on("mousemove.brush",L).on("mouseup.brush",P),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(_);g=[s[1-E]-M[0],l[1-C]-M[1]],M[0]=s[E],M[1]=l[C]}else e.event.altKey&&(h=M.slice());function L(){var t=e.mouse(y),r=!1;g&&(t[0]+=g[0],t[1]+=g[1]),T||(e.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),M[0]=s[+(t[0]0))return o;do o.push(a=new Date(+t)),i(t,n),e(t);while(a=r)for(;e(r),!t(r);)r.setTime(r-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;i(e,-1),!t(e););else for(;--r>=0;)for(;i(e,1),!t(e););})},a&&(s.count=function(n,i){return t.setTime(+n),r.setTime(+i),e(t),e(r),Math.floor(a(t,r))},s.every=function(e){return isFinite(e=Math.floor(e))&&e>0?e>1?s.filter(o?function(t){return o(t)%e==0}:function(t){return s.count(0,t)%e==0}):s:null}),s}var i=n(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});i.every=function(e){return isFinite(e=Math.floor(e))&&e>0?e>1?n(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):i:null};var a=i.range,o=n(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),s=o.range,l=n(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getMinutes()}),c=l.range,u=n(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),h=u.range,f=n(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5},function(e){return e.getDate()-1}),d=f.range;function p(e){return n(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5})}var m=p(0),g=p(1),y=p(2),v=p(3),x=p(4),b=p(5),_=p(6),w=m.range,k=g.range,T=y.range,A=v.range,M=x.range,S=b.range,E=_.range,C=n(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),L=C.range,I=n(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});I.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)}):null};var P=I.range,z=n(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getUTCMinutes()}),O=z.range,D=n(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()}),R=D.range,j=n(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1}),F=j.range;function B(e){return n(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}var N=B(0),U=B(1),V=B(2),q=B(3),H=B(4),G=B(5),W=B(6),Y=N.range,X=U.range,Z=V.range,$=q.range,K=H.range,J=G.range,Q=W.range,ee=n(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),et=ee.range,er=n(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});er.every=function(e){return isFinite(e=Math.floor(e))&&e>0?n(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)}):null};var en=er.range;e.timeDay=f,e.timeDays=d,e.timeFriday=b,e.timeFridays=S,e.timeHour=u,e.timeHours=h,e.timeInterval=n,e.timeMillisecond=i,e.timeMilliseconds=a,e.timeMinute=l,e.timeMinutes=c,e.timeMonday=g,e.timeMondays=k,e.timeMonth=C,e.timeMonths=L,e.timeSaturday=_,e.timeSaturdays=E,e.timeSecond=o,e.timeSeconds=s,e.timeSunday=m,e.timeSundays=w,e.timeThursday=x,e.timeThursdays=M,e.timeTuesday=y,e.timeTuesdays=T,e.timeWednesday=v,e.timeWednesdays=A,e.timeWeek=m,e.timeWeeks=w,e.timeYear=I,e.timeYears=P,e.utcDay=j,e.utcDays=F,e.utcFriday=G,e.utcFridays=J,e.utcHour=D,e.utcHours=R,e.utcMillisecond=i,e.utcMilliseconds=a,e.utcMinute=z,e.utcMinutes=O,e.utcMonday=U,e.utcMondays=X,e.utcMonth=ee,e.utcMonths=et,e.utcSaturday=W,e.utcSaturdays=Q,e.utcSecond=o,e.utcSeconds=s,e.utcSunday=N,e.utcSundays=Y,e.utcThursday=H,e.utcThursdays=K,e.utcTuesday=V,e.utcTuesdays=Z,e.utcWednesday=q,e.utcWednesdays=$,e.utcWeek=N,e.utcWeeks=Y,e.utcYear=er,e.utcYears=en,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),w=d({"node_modules/d3-time-format/dist/d3-time-format.js"(e,t){var r,n;r=e,n=function(e,t){function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function n(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function i(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function a(e){var a=e.dateTime,o=e.date,l=e.time,c=e.periods,u=e.days,h=e.shortDays,f=e.months,ev=e.shortMonths,ex=d(c),eb=p(c),e_=d(u),ew=p(u),ek=d(h),eT=p(h),eA=d(f),eM=p(f),eS=d(ev),eE=p(ev),eC={a:function(e){return h[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return ev[e.getMonth()]},B:function(e){return f[e.getMonth()]},c:null,d:D,e:D,f:N,H:R,I:j,j:F,L:B,m:U,M:V,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:eg,s:ey,S:q,u:H,U:G,V:W,w:Y,W:X,x:null,X:null,y:Z,Y:$,Z:K,"%":em},eL={a:function(e){return h[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return ev[e.getUTCMonth()]},B:function(e){return f[e.getUTCMonth()]},c:null,d:J,e:J,f:en,H:Q,I:ee,j:et,L:er,m:ei,M:ea,p:function(e){return c[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:eg,s:ey,S:eo,u:es,U:el,V:ec,w:eu,W:eh,x:null,X:null,y:ef,Y:ed,Z:ep,"%":em},eI={a:function(e,t,r){var n=ek.exec(t.slice(r));return n?(e.w=eT[n[0].toLowerCase()],r+n[0].length):-1},A:function(e,t,r){var n=e_.exec(t.slice(r));return n?(e.w=ew[n[0].toLowerCase()],r+n[0].length):-1},b:function(e,t,r){var n=eS.exec(t.slice(r));return n?(e.m=eE[n[0].toLowerCase()],r+n[0].length):-1},B:function(e,t,r){var n=eA.exec(t.slice(r));return n?(e.m=eM[n[0].toLowerCase()],r+n[0].length):-1},c:function(e,t,r){return eO(e,a,t,r)},d:A,e:A,f:I,H:S,I:S,j:M,L:L,m:T,M:E,p:function(e,t,r){var n=ex.exec(t.slice(r));return n?(e.p=eb[n[0].toLowerCase()],r+n[0].length):-1},q:k,Q:z,s:O,S:C,u:g,U:y,V:v,w:m,W:x,x:function(e,t,r){return eO(e,o,t,r)},X:function(e,t,r){return eO(e,l,t,r)},y:_,Y:b,Z:w,"%":P};function eP(e,t){return function(r){var n,i,a,o=[],l=-1,c=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in c||(c.w=1),"Z"in c?(s=(l=(s=n(i(c.y,0,1))).getUTCDay())>4||0===l?t.utcMonday.ceil(s):t.utcMonday(s),s=t.utcDay.offset(s,(c.V-1)*7),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(s=(l=(s=r(i(c.y,0,1))).getDay())>4||0===l?t.timeMonday.ceil(s):t.timeMonday(s),s=t.timeDay.offset(s,(c.V-1)*7),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:+("W"in c)),l="Z"in c?n(i(c.y,0,1)).getUTCDay():r(i(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,n(c)):r(c)}}function eO(e,t,r,n){for(var i,a,o=0,l=t.length,c=r.length;o=c)return -1;if(37===(i=t.charCodeAt(o++))){if(!(a=eI[(i=t.charAt(o++))in s?t.charAt(o++):i])||(n=a(e,r,n))<0)return -1}else if(i!=r.charCodeAt(n++))return -1}return n}return eC.x=eP(o,eC),eC.X=eP(l,eC),eC.c=eP(a,eC),eL.x=eP(o,eL),eL.X=eP(l,eL),eL.c=eP(a,eL),{format:function(e){var t=eP(e+="",eC);return t.toString=function(){return e},t},parse:function(e){var t=ez(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=eP(e+="",eL);return t.toString=function(){return e},t},utcParse:function(e){var t=ez(e+="",!0);return t.toString=function(){return e},t}}}var o,s={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function h(e,t,r){var n=e<0?"-":"",i=(n?-e:e)+"",a=i.length;return n+(a68?1900:2e3),r+n[0].length):-1}function w(e,t,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return n?(e.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function k(e,t,r){var n=l.exec(t.slice(r,r+1));return n?(e.q=3*n[0]-3,r+n[0].length):-1}function T(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.m=n[0]-1,r+n[0].length):-1}function A(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.d=+n[0],r+n[0].length):-1}function M(e,t,r){var n=l.exec(t.slice(r,r+3));return n?(e.m=0,e.d=+n[0],r+n[0].length):-1}function S(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.H=+n[0],r+n[0].length):-1}function E(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.M=+n[0],r+n[0].length):-1}function C(e,t,r){var n=l.exec(t.slice(r,r+2));return n?(e.S=+n[0],r+n[0].length):-1}function L(e,t,r){var n=l.exec(t.slice(r,r+3));return n?(e.L=+n[0],r+n[0].length):-1}function I(e,t,r){var n=l.exec(t.slice(r,r+6));return n?(e.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function P(e,t,r){var n=c.exec(t.slice(r,r+1));return n?r+n[0].length:-1}function z(e,t,r){var n=l.exec(t.slice(r));return n?(e.Q=+n[0],r+n[0].length):-1}function O(e,t,r){var n=l.exec(t.slice(r));return n?(e.s=+n[0],r+n[0].length):-1}function D(e,t){return h(e.getDate(),t,2)}function R(e,t){return h(e.getHours(),t,2)}function j(e,t){return h(e.getHours()%12||12,t,2)}function F(e,r){return h(1+t.timeDay.count(t.timeYear(e),e),r,3)}function B(e,t){return h(e.getMilliseconds(),t,3)}function N(e,t){return B(e,t)+"000"}function U(e,t){return h(e.getMonth()+1,t,2)}function V(e,t){return h(e.getMinutes(),t,2)}function q(e,t){return h(e.getSeconds(),t,2)}function H(e){var t=e.getDay();return 0===t?7:t}function G(e,r){return h(t.timeSunday.count(t.timeYear(e)-1,e),r,2)}function W(e,r){var n=e.getDay();return e=n>=4||0===n?t.timeThursday(e):t.timeThursday.ceil(e),h(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),r,2)}function Y(e){return e.getDay()}function X(e,r){return h(t.timeMonday.count(t.timeYear(e)-1,e),r,2)}function Z(e,t){return h(e.getFullYear()%100,t,2)}function $(e,t){return h(e.getFullYear()%1e4,t,4)}function K(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+h(t/60|0,"0",2)+h(t%60,"0",2)}function J(e,t){return h(e.getUTCDate(),t,2)}function Q(e,t){return h(e.getUTCHours(),t,2)}function ee(e,t){return h(e.getUTCHours()%12||12,t,2)}function et(e,r){return h(1+t.utcDay.count(t.utcYear(e),e),r,3)}function er(e,t){return h(e.getUTCMilliseconds(),t,3)}function en(e,t){return er(e,t)+"000"}function ei(e,t){return h(e.getUTCMonth()+1,t,2)}function ea(e,t){return h(e.getUTCMinutes(),t,2)}function eo(e,t){return h(e.getUTCSeconds(),t,2)}function es(e){var t=e.getUTCDay();return 0===t?7:t}function el(e,r){return h(t.utcSunday.count(t.utcYear(e)-1,e),r,2)}function ec(e,r){var n=e.getUTCDay();return e=n>=4||0===n?t.utcThursday(e):t.utcThursday.ceil(e),h(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),r,2)}function eu(e){return e.getUTCDay()}function eh(e,r){return h(t.utcMonday.count(t.utcYear(e)-1,e),r,2)}function ef(e,t){return h(e.getUTCFullYear()%100,t,2)}function ed(e,t){return h(e.getUTCFullYear()%1e4,t,4)}function ep(){return"+0000"}function em(){return"%"}function eg(e){return+e}function ey(e){return Math.floor(e/1e3)}function ev(t){return e.timeFormat=(o=a(t)).format,e.timeParse=o.parse,e.utcFormat=o.utcFormat,e.utcParse=o.utcParse,o}ev({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ex="%Y-%m-%dT%H:%M:%S.%LZ",eb=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat(ex),e_=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse(ex);e.isoFormat=eb,e.isoParse=e_,e.timeFormatDefaultLocale=ev,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?n(e,_()):n((r=r||self).d3=r.d3||{},r.d3)}}),k=d({"node_modules/d3-format/dist/d3-format.js"(e,t){var r;r=e,function(e){function t(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,n=e.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+e.slice(r+1)]}function r(e){return(e=t(Math.abs(e)))?e[1]:NaN}var n,i,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){var t;if(!(t=a.exec(e)))throw Error("invalid format: "+e);return new s({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function s(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function l(e,r){var n=t(e,r);if(!n)return e+"";var i=n[0],a=n[1];return a<0?"0."+Array(-a).join("0")+i:i.length>a+1?i.slice(0,a+1)+"."+i.slice(a+1):i+Array(a-i.length+2).join("0")}o.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var c={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return l(100*e,t)},r:l,s:function(e,r){var i=t(e,r);if(!i)return e+"";var a=i[0],o=i[1],s=o-(n=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+Array(1-s).join("0")+t(e,Math.max(0,r+s-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function u(e){return e}var h=Array.prototype.map,f=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function d(e){var t,i,a,s=void 0===e.grouping||void 0===e.thousands?u:(t=h.call(e.grouping,Number),i=e.thousands+"",function(e,r){for(var n=e.length,a=[],o=0,s=t[0],l=0;n>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(n-=s,n+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(i)}),l=void 0===e.currency?"":e.currency[0]+"",d=void 0===e.currency?"":e.currency[1]+"",p=void 0===e.decimal?".":e.decimal+"",m=void 0===e.numerals?u:(a=h.call(e.numerals,String),function(e){return e.replace(/[0-9]/g,function(e){return a[+e]})}),g=void 0===e.percent?"%":e.percent+"",y=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function x(e){var t=(e=o(e)).fill,r=e.align,i=e.sign,a=e.symbol,u=e.zero,h=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):c[w]||(void 0===b&&(b=12),_=!0,w="g"),(u||"0"===t&&"="===r)&&(u=!0,t="0",r="=");var k="$"===a?l:"#"===a&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",T="$"===a?d:/[%p]/.test(w)?g:"",A=c[w],M=/[defgprs%]/.test(w);function S(e){var a,o,l,c=k,d=T;if("c"===w)d=A(e)+d,e="";else{var g=(e*=1)<0||1/e<0;if(e=isNaN(e)?v:A(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,n=1,i=-1;n0&&(i=0)}return i>0?e.slice(0,i)+e.slice(t+1):e}(e)),g&&0==+e&&"+"!==i&&(g=!1),c=(g?"("===i?i:y:"-"===i||"("===i?"":i)+c,d=("s"===w?f[8+n/3]:"")+d+(g&&"("===i?")":""),M){for(a=-1,o=e.length;++a(l=e.charCodeAt(a))||l>57){d=(46===l?p+e.slice(a+1):e.slice(a))+d,e=e.slice(0,a);break}}}x&&!u&&(e=s(e,1/0));var S=c.length+e.length+d.length,E=S>1)+c+e+d+E.slice(S);break;default:e=E+c+e+d}return m(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:x,formatPrefix:function(e,t){var n=x(((e=o(e)).type="f",e)),i=3*Math.max(-8,Math.min(8,Math.floor(r(t)/3))),a=Math.pow(10,-i),s=f[8+i/3];return function(e){return n(a*e)+s}}}}function p(t){return e.format=(i=d(t)).format,e.formatPrefix=i.formatPrefix,i}p({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=s,e.formatDefaultLocale=p,e.formatLocale=d,e.formatSpecifier=o,e.precisionFixed=function(e){return Math.max(0,-r(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(t)/3)))-r(Math.abs(e)))},e.precisionRound=function(e,t){return Math.max(0,r(t=Math.abs(t)-(e=Math.abs(e)))-r(e))+1},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r="u">typeof globalThis?globalThis:r||self).d3=r.d3||{})}}),T=d({"node_modules/is-string-blank/index.js"(e,t){t.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}}}),A=d({"node_modules/fast-isnumeric/index.js"(e,t){var r=T();t.exports=function(e){var t=typeof e;if("string"===t){var n=e;if(0==(e*=1)&&r(n))return!1}else if("number"!==t)return!1;return e-e<1}}}),M=d({"src/constants/numerical.js"(e,t){t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}}),E=d({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(e,t){var r;r=e,function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array>"u"?[]:new Uint8Array(256),n=0;n>4,h[c++]=(15&i)<<4|a>>2,h[c++]=(3&a)<<6|63&o;return u},e.encode=function(e){var r,n=new Uint8Array(e),i=n.length,a="";for(r=0;r>2],a+=t[(3&n[r])<<4|n[r+1]>>4],a+=t[(15&n[r+1])<<2|n[r+2]>>6],a+=t[63&n[r+2]];return i%3==2?a=a.substring(0,a.length-1)+"=":i%3==1&&(a=a.substring(0,a.length-2)+"=="),a},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r="u">typeof globalThis?globalThis:r||self)["base64-arraybuffer"]={})}}),C=d({"src/lib/is_plain_object.js"(e,t){t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}}}),L=d({"src/lib/array.js"(e){var t=E().decode,r=C(),n=Array.isArray,i=ArrayBuffer,a=DataView;function o(e){return i.isView(e)&&!(e instanceof a)}function s(e){return n(e)||o(e)}e.isTypedArray=o,e.isArrayOrTypedArray=s,e.isArray1D=function(e){return!s(e[0])},e.ensureArray=function(e,t){return n(e)||(e=[]),e.length=t,e};var l={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};function c(e){return e.constructor===ArrayBuffer}function u(e,t,r){if(s(e))if(!s(e[0]))return e.length;else{for(var n=r,i=0;i2)return c[t]=2|c[t],f.set(e,null);if(h){for(o=t;o0)return Math.log(e)/Math.LN10;var n=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(n)||(n=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),n}}}),D=d({"src/lib/relink_private.js"(e,t){var r=L().isArrayOrTypedArray,n=C();t.exports=function e(t,i){for(var a in i){var o=i[a],s=t[a];if(s!==o)if("_"===a.charAt(0)||"function"==typeof o){if(a in t)continue;t[a]=o}else if(r(o)&&r(s)&&n(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),c=0;ct/2?e-Math.round(e/t)*t:e}p(R,{mod:()=>j,modHalf:()=>F});var B,N=f({"src/lib/mod.ts"(){}}),U=d({"src/lib/extend.js"(e){var t=C(),r=Array.isArray;function n(e,i,a,o){var s,l,c,u,h,f,d=e[0],p=e.length;if(2===p&&r(d)&&r(e[1])&&0===d.length){if(function(e,t){var r,n;for(r=0;rtypeof u||a)&&(d[l]=u);return d}e.extendFlat=function(){return n(arguments,!1,!1,!1)},e.extendDeep=function(){return n(arguments,!0,!1,!1)},e.extendDeepAll=function(){return n(arguments,!0,!0,!1)},e.extendDeepNoArrays=function(){return n(arguments,!0,!1,!0)}}}),V=d({"src/plots/font_attributes.js"(e,t){t.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;void 0===n&&(n=r);var i={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(i.valType="enumerated",i.values=i.extras,i.extras=void 0,i.min=void 0,i.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:i,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}}}),q=d({"src/components/fx/constants.js"(e,t){t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),H=d({"src/components/fx/layout_attributes.js"(e,t){var r=q(),n=V(),i=n({editType:"none"});i.family.dflt=r.HOVERFONT,i.size.dflt=r.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:i,grouptitlefont:n({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}}}),G=d({"src/components/fx/attributes.js"(e,t){var r=V(),n=H().hoverlabel,i=U().extendFlat;t.exports={hoverlabel:{bgcolor:i({},n.bgcolor,{arrayOk:!0}),bordercolor:i({},n.bordercolor,{arrayOk:!0}),font:r({arrayOk:!0,editType:"none"}),align:i({},n.align,{arrayOk:!0}),namelength:i({},n.namelength,{arrayOk:!0}),showarrow:i({},n.showarrow),editType:"none"}}}}),W=d({"src/plots/attributes.js"(e,t){var r=V(),n=G();t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:r({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:n.hoverlabel,uirevision:{valType:"any",editType:"none"}}}}),Y=f({"node_modules/color-string/node_modules/color-name/index.js"(){B={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]}}});function X(e,t,r){return Math.min(Math.max(t,e),r)}function Z(e){let t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var $,K,J,Q,ee=f({"node_modules/color-string/index.js"(){for(let e in Y(),$=Object.create(null),B)Object.hasOwn(B,e)&&($[B[e]]=e);(K={to:{},get:{}}).get=function(e){let t,r;switch(e.slice(0,3).toLowerCase()){case"hsl":t=K.get.hsl(e),r="hsl";break;case"hwb":t=K.get.hwb(e),r="hwb";break;default:t=K.get.rgb(e),r="rgb"}return t?{model:r,value:t}:null},K.get.rgb=function(e){if(!e)return null;let t=[0,0,0,1],r,n,i;if(r=e.match(/^#([a-f\d]{6})([a-f\d]{2})?$/i)){for(i=r[2],r=r[1],n=0;n<3;n++){let e=2*n;t[n]=Number.parseInt(r.slice(e,e+2),16)}i&&(t[3]=Number.parseInt(i,16)/255)}else if(r=e.match(/^#([a-f\d]{3,4})$/i)){for(i=(r=r[1])[3],n=0;n<3;n++)t[n]=Number.parseInt(r[n]+r[n],16);i&&(t[3]=Number.parseInt(i+i,16)/255)}else if(r=e.match(/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i)){for(n=0;n<3;n++)t[n]=Number.parseFloat(r[n+1]);r[4]&&(t[3]=r[5]?.01*Number.parseFloat(r[4]):Number.parseFloat(r[4]))}else{if(!(r=e.match(/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i)))return(r=e.toLowerCase().match(/^(\w+)$/))?"transparent"===r[1]?[0,0,0,0]:Object.hasOwn(B,r[1])?((t=B[r[1]].slice())[3]=1,t):null:null;for(n=0;n<3;n++)t[n]=Math.round(2.55*Number.parseFloat(r[n+1]));r[4]&&(t[3]=r[5]?.01*Number.parseFloat(r[4]):Number.parseFloat(r[4]))}for(n=0;n<3;n++)t[n]=X(t[n],0,255);return t[3]=X(t[3],0,1),t},K.get.hsl=function(e){if(!e)return null;let t=e.match(/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){let e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,X(Number.parseFloat(t[2]),0,100),X(Number.parseFloat(t[3]),0,100),X(Number.isNaN(e)?1:e,0,1)]}return null},K.get.hwb=function(e){if(!e)return null;let t=e.match(/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i);if(t){let e=Number.parseFloat(t[4]);return[(Number.parseFloat(t[1])%360+360)%360,X(Number.parseFloat(t[2]),0,100),X(Number.parseFloat(t[3]),0,100),X(Number.isNaN(e)?1:e,0,1)]}return null},K.to.hex=function(...e){return"#"+Z(e[0])+Z(e[1])+Z(e[2])+(e[3]<1?Z(Math.round(255*e[3])):"")},K.to.rgb=function(...e){return e.length<4||1===e[3]?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"},K.to.rgb.percent=function(...e){let t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||1===e[3]?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"},K.to.hsl=function(...e){return e.length<4||1===e[3]?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"},K.to.hwb=function(...e){let t="";return e.length>=4&&1!==e[3]&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"},K.to.keyword=function(...e){return $[e.slice(0,3)]},J=K}}),et=f({"node_modules/color/node_modules/color-name/index.js"(){Q={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]}}});function er(e){return Math.min(Math.max(0,e>.0031308?1.055*e**.4166666666666667-.055:12.92*e),1)}function en(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}var ei,ea,eo,es,el=f({"node_modules/color/node_modules/color-convert/conversions.js"(){for(let e of(et(),ei={},Object.keys(Q)))ei[Q[e]]=e;for(let e of(eo=ea={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},es=(6/29)**3,Object.keys(ea))){if(!("channels"in ea[e]))throw Error("missing channels property: "+e);if(!("labels"in ea[e]))throw Error("missing channel labels property: "+e);if(ea[e].labels.length!==ea[e].channels)throw Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=ea[e];delete ea[e].channels,delete ea[e].labels,Object.defineProperty(ea[e],"channels",{value:t}),Object.defineProperty(ea[e],"labels",{value:r})}ea.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=a-i,s;switch(a){case i:s=0;break;case t:s=(r-n)/o;break;case r:s=2+(n-t)/o;break;case n:s=4+(t-r)/o}(s=Math.min(60*s,360))<0&&(s+=360);let l=(i+a)/2;return[s,100*(a===i?0:l<=.5?o/(a+i):o/(2-a-i)),100*l]},ea.rgb.hsv=function(e){let t,r,n,i,a,o=e[0]/255,s=e[1]/255,l=e[2]/255,c=Math.max(o,s,l),u=c-Math.min(o,s,l),h=function(e){return(c-e)/6/u+.5};if(0===u)i=0,a=0;else{switch(a=u/c,t=h(o),r=h(s),n=h(l),c){case o:i=n-r;break;case s:i=1/3+t-n;break;case l:i=2/3+r-t}i<0?i+=1:i>1&&(i-=1)}return[360*i,100*a,100*c]},ea.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2];return[ea.rgb.hsl(e)[0],1/255*Math.min(t,Math.min(r,n))*100,100*(n=1-1/255*Math.max(t,Math.max(r,n)))]},ea.rgb.oklab=function(e){let t=en(e[0]/255),r=en(e[1]/255),n=en(e[2]/255),i=Math.cbrt(.4122214708*t+.5363325363*r+.0514459929*n),a=Math.cbrt(.2119034982*t+.6806995451*r+.1073969566*n),o=Math.cbrt(.0883024619*t+.2817188376*r+.6299787005*n);return[100*(.2104542553*i+.793617785*a-.0040720468*o),100*(1.9779984951*i-2.428592205*a+.4505937099*o),100*(.0259040371*i+.7827717662*a-.808675766*o)]},ea.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.min(1-t,1-r,1-n);return[100*((1-t-i)/(1-i)||0),100*((1-r-i)/(1-i)||0),100*((1-n-i)/(1-i)||0),100*i]},ea.rgb.keyword=function(e){let t=ei[e];if(t)return t;let r=1/0,n;for(let t of Object.keys(Q)){let i=Q[t],a=(e[0]-i[0])**2+(e[1]-i[1])**2+(e[2]-i[2])**2;aes?r**(1/3):7.787*r+16/116,[116*(n=n>es?n**(1/3):7.787*n+16/116)-16,500*(r-n),200*(n-(i=i>es?i**(1/3):7.787*i+16/116))]},ea.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,i,a;if(0===r)return[a=255*n,a,a];let o=n<.5?n*(1+r):n+r-n*r,s=2*n-o,l=[0,0,0];for(let e=0;e<3;e++)(i=t+-(1/3*(e-1)))<0&&i++,i>1&&i--,a=6*i<1?s+(o-s)*6*i:2*i<1?o:3*i<2?s+(o-s)*(2/3-i)*6:s,l[e]=255*a;return l},ea.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,i=r,a=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,i*=a<=1?a:2-a;let o=(n+r)/2;return[t,100*(0===n?2*i/(a+i):2*r/(n+r)),100*o]},ea.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*n*(1-r),s=255*n*(1-r*a),l=255*n*(1-r*(1-a));switch(n*=255,i){case 0:return[n,l,o];case 1:return[s,n,o];case 2:return[o,n,l];case 3:return[o,s,n];case 4:return[l,o,n];case 5:return[n,o,s]}},ea.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,i=Math.max(n,.01),a,o;o=(2-r)*n;let s=(2-r)*i;return[t,100*(a=(a=r*i/(s<=1?s:2-s))||0),100*(o/=2)]},ea.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,i=r+n,a;i>1&&(r/=i,n/=i);let o=Math.floor(6*t),s=1-n;a=6*t-o,1&o&&(a=1-a);let l=r+a*(s-r),c,u,h;switch(o){default:case 6:case 0:c=s,u=l,h=r;break;case 1:c=l,u=s,h=r;break;case 2:c=r,u=s,h=l;break;case 3:c=r,u=l,h=s;break;case 4:c=l,u=r,h=s;break;case 5:c=s,u=r,h=l}return[255*c,255*u,255*h]},ea.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i))]},ea.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i,a,o;return i=3.2404542*t+-1.5371385*r+-.4985314*n,a=-.969266*t+1.8760108*r+.041556*n,o=.0556434*t+-.2040259*r+1.0572252*n,i=er(i),[255*i,255*(a=er(a)),255*(o=er(o))]},ea.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];return t/=95.047,r/=100,n/=108.883,t=t>es?t**(1/3):7.787*t+16/116,[116*(r=r>es?r**(1/3):7.787*r+16/116)-16,500*(t-r),200*(r-(n=n>es?n**(1/3):7.787*n+16/116))]},ea.xyz.oklab=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i=Math.cbrt(.8189330101*t+.3618667424*r-.1288597137*n),a=Math.cbrt(.0329845436*t+.9293118715*r+.0361456387*n),o=Math.cbrt(.0482003018*t+.2643662691*r+.633851707*n);return[100*(.2104542553*i+.793617785*a-.0040720468*o),100*(1.9779984951*i-2.428592205*a+.4505937099*o),100*(.0259040371*i+.7827717662*a-.808675766*o)]},ea.oklab.oklch=function(e){return ea.lab.lch(e)},ea.oklab.xyz=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i=(.999999998*t+.396337792*r+.215803758*n)**3,a=(1.000000008*t-.105561342*r-.063854175*n)**3,o=(1.000000055*t-.089484182*r-1.291485538*n)**3;return[100*(1.227013851*i-.55779998*a+.281256149*o),100*(-.040580178*i+1.11225687*a-.071676679*o),100*(-.076381285*i-.421481978*a+1.58616322*o)]},ea.oklab.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,i=(t+.3963377774*r+.2158037573*n)**3,a=(t-.1055613458*r-.0638541728*n)**3,o=(t-.0894841775*r-1.291485548*n)**3;return[255*er(4.0767416621*i-3.3077115913*a+.2309699292*o),255*er(-1.2684380046*i+2.6097574011*a-.3413193965*o),255*er(-.0041960863*i-.7034186147*a+1.707614701*o)]},ea.oklch.oklab=function(e){return ea.lch.lab(e)},ea.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],i,a,o;i=r/500+(a=(t+16)/116),o=a-n/200;let s=a**3,l=i**3,c=o**3;return a=(s>es?s:(a-16/116)/7.787)*100,[i=(l>es?l:(i-16/116)/7.787)*95.047,a,o=(c>es?c:(o-16/116)/7.787)*108.883]},ea.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],i;return(i=360*Math.atan2(n,r)/2/Math.PI)<0&&(i+=360),[t,Math.sqrt(r*r+n*n),i]},ea.lch.lab=function(e){let t=e[0],r=e[1],n=e[2]/360*2*Math.PI;return[t,r*Math.cos(n),r*Math.sin(n)]},ea.rgb.ansi16=function(e,t=null){let[r,n,i]=e,a=null===t?ea.rgb.hsv(e)[2]:t;if(0===(a=Math.round(a/50)))return 30;let o=30+(Math.round(i/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return 2===a&&(o+=60),o},ea.hsv.ansi16=function(e){return ea.rgb.ansi16(ea.hsv.rgb(e),e[2])},ea.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t>>4==r>>4&&r>>4==n>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)},ea.ansi16.rgb=function(e){let t=(e=e[0])%10;if(0===t||7===t)return e>50&&(t+=3.5),[t=t/10.5*255,t,t];let r=(Math.trunc(e>50)+1)*.5;return[(1&t)*r*255,(t>>1&1)*r*255,(t>>2&1)*r*255]},ea.ansi256.rgb=function(e){let t;if((e=e[0])>=232){let t=(e-232)*10+8;return[t,t,t]}return[Math.floor((e-=16)/36)/5*255,Math.floor((t=e%36)/6)/5*255,t%6/5*255]},ea.rgb.hex=function(e){let t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".slice(t.length)+t},ea.hex.rgb=function(e){let t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let r=t[0];3===t[0].length&&(r=[...r].map(e=>e+e).join(""));let n=Number.parseInt(r,16);return[n>>16&255,n>>8&255,255&n]},ea.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,i=Math.max(Math.max(t,r),n),a=Math.min(Math.min(t,r),n),o=i-a;return[360*((o<=0?0:i===t?(r-n)/o%6:i===r?2+(n-t)/o:4+(t-r)/o)/6%1),100*o,100*(o<1?a/(1-o):0)]},ea.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),i=0;return n<1&&(i=(r-.5*n)/(1-n)),[e[0],100*n,100*i]},ea.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},ea.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(0===r)return[255*n,255*n,255*n];let i=[0,0,0],a=t%1*6,o=a%1,s=1-o,l=0;switch(Math.floor(a)){case 0:i[0]=1,i[1]=o,i[2]=0;break;case 1:i[0]=s,i[1]=1,i[2]=0;break;case 2:i[0]=0,i[1]=1,i[2]=o;break;case 3:i[0]=0,i[1]=s,i[2]=1;break;case 4:i[0]=o,i[1]=0,i[2]=1;break;default:i[0]=1,i[1]=0,i[2]=s}return l=(1-r)*n,[(r*i[0]+l)*255,(r*i[1]+l)*255,(r*i[2]+l)*255]},ea.hcg.hsv=function(e){let t=e[1]/100,r=t+e[2]/100*(1-t),n=0;return r>0&&(n=t/r),[e[0],100*n,100*r]},ea.hcg.hsl=function(e){let t=e[1]/100,r=e[2]/100*(1-t)+.5*t,n=0;return r>0&&r<.5?n=t/(2*r):r>=.5&&r<1&&(n=t/(2*(1-r))),[e[0],100*n,100*r]},ea.hcg.hwb=function(e){let t=e[1]/100,r=t+e[2]/100*(1-t);return[e[0],(r-t)*100,(1-r)*100]},ea.hwb.hcg=function(e){let t=e[1]/100,r=1-e[2]/100,n=r-t,i=0;return n<1&&(i=(r-n)/(1-n)),[e[0],100*n,100*i]},ea.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},ea.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},ea.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},ea.gray.hsl=function(e){return[0,0,e[0]]},ea.gray.hsv=ea.gray.hsl,ea.gray.hwb=function(e){return[0,100,e[0]]},ea.gray.cmyk=function(e){return[0,0,0,e[0]]},ea.gray.lab=function(e){return[e[0],0,0]},ea.gray.hex=function(e){let t=255&Math.round(e[0]/100*255),r=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(r.length)+r},ea.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}});function ec(e){let t=function(e){let t=function(){let e={},t=Object.keys(eo);for(let{length:r}=t,n=0;n0;){let e=r.pop(),n=Object.keys(eo[e]);for(let{length:i}=n,a=0;a1&&(t=r);let n=e(t);if("object"==typeof n)for(let{length:e}=n,t=0;t1&&(t=r),e(t))};return"conversion"in e&&(t.conversion=e.conversion),t}(n)}}ef=eh}}),em={};function eg(e,t){let r,n;if(!(this instanceof eg))return new eg(e,t);if(t&&t in eb&&(t=null),t&&!(t in ef))throw Error("Unknown model: "+t);if(null==e)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof eg)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if("string"==typeof e){let t=J.get(e);if(null===t)throw Error("Unable to parse color from string: "+e);this.model=t.model,n=ef[this.model].channels,this.color=t.value.slice(0,n),this.valpha="number"==typeof t.value[n]?t.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=ef[this.model].channels;let r=Array.prototype.slice.call(e,0,n);this.color=ex(r,n),this.valpha="number"==typeof e[n]?e[n]:1}else if("number"==typeof e)this.model="rgb",this.color=[e>>16&255,e>>8&255,255&e],this.valpha=1;else{this.valpha=1;let t=Object.keys(e);"alpha"in e&&(t.splice(t.indexOf("alpha"),1),this.valpha="number"==typeof e.alpha?e.alpha:0);let n=t.sort().join("");if(!(n in e_))throw Error("Unable to parse color from object: "+JSON.stringify(e));this.model=e_[n];let{labels:i}=ef[this.model],a=[];for(r=0;rek});var eb,e_,ew,ek,eT=f({"node_modules/color/index.js"(){for(let e of(ee(),ep(),eb=["keyword","gray","hex"],e_={},Object.keys(ef)))e_[[...ef[e].labels].sort().join("")]=e;for(let e of(ew={},eg.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in J.to?this:this.rgb(),r=1===(t=t.round("number"==typeof e?e:1)).valpha?t.color:[...t.color,this.valpha];return J.to[t.model](...r)},percentString(e){let t=this.rgb().round("number"==typeof e?e:1),r=1===t.valpha?t.color:[...t.color,this.valpha];return J.to.rgb.percent(...r)},array(){return 1===this.valpha?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=ef[this.model],{labels:r}=ef[this.model];for(let n=0;n(e%360+360)%360),saturationl:ey("hsl",1,ev(100)),lightness:ey("hsl",2,ev(100)),saturationv:ey("hsv",1,ev(100)),value:ey("hsv",2,ev(100)),chroma:ey("hcg",1,ev(100)),gray:ey("hcg",2,ev(100)),white:ey("hwb",1,ev(100)),wblack:ey("hwb",2,ev(100)),cyan:ey("cmyk",0,ev(100)),magenta:ey("cmyk",1,ev(100)),yellow:ey("cmyk",2,ev(100)),black:ey("cmyk",3,ev(100)),x:ey("xyz",0,ev(95.047)),y:ey("xyz",1,ev(100)),z:ey("xyz",2,ev(108.833)),l:ey("lab",0,ev(100)),a:ey("lab",1),b:ey("lab",2),keyword(e){return void 0!==e?new eg(e):ef[this.model].keyword(this.color)},hex(e){return void 0!==e?new eg(e):J.to.hex(...this.rgb().round().color)},hexa(e){if(void 0!==e)return new eg(e);let t=this.rgb().round().color,r=Math.round(255*this.valpha).toString(16).toUpperCase();return 1===r.length&&(r="0"+r),J.to.hex(...t)+r},rgbNumber(){let e=this.rgb().color;return(255&e[0])<<16|(255&e[1])<<8|255&e[2]},luminosity(){let e=this.rgb().color,t=[];for(let[r,n]of e.entries()){let e=n/255;t[r]=e<=.04045?e/12.92:((e+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(2126*e[0]+7152*e[1]+722*e[2])/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=.3*e[0]+.59*e[1]+.11*e[2];return eg.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r=(r+e)%360)<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),n=this.rgb(),i=void 0===t?.5:t,a=2*i-1,o=r.alpha()-n.alpha(),s=((a*o==-1?a:(a+o)/(1+a*o))+1)/2,l=1-s;return eg.rgb(s*r.red()+l*n.red(),s*r.green()+l*n.green(),s*r.blue()+l*n.blue(),r.alpha()*i+n.alpha()*(1-i))}},Object.keys(ef))){if(eb.includes(e))continue;let{channels:t}=ef[e];eg.prototype[e]=function(...t){var r;return this.model===e?new eg(this):t.length>0?new eg(t,e):new eg([...Array.isArray(r=ef[this.model][e].raw(this.color))?r:[r],this.valpha],e)},eg[e]=function(...r){let n=r[0];return"number"==typeof n&&(n=ex(r,t)),new eg(n,e)}}ek=eg}}),eA=d({"src/plot_api/plot_config.js"(e,t){var r={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},n={};(function e(t,r){for(var n in t){var i=t[n];i.valType?r[n]=i.dflt:(r[n]||(r[n]={}),e(i,r[n]))}})(r,n),t.exports={configAttributes:r,dfltConfig:n}}}),eM=d({"src/lib/notifier.js"(e,t){var r=b(),n=A(),i=[];t.exports=function(e,t,a){if((null==(o=a?._context)?void 0:o.displayNotifier)!==!1&&-1===i.indexOf(e)){i.push(e);var o,s=1e3;n(t)?s=t:"long"===t&&(s=3e3);var l=r.select("body").selectAll(".plotly-notifier").data([0]);l.enter().append("div").classed("plotly-notifier",!0),l.selectAll(".notifier-note").data(i).enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(e){var n=r.select(this);n.append("button").classed("notifier-close",!0).html("×").on("click",function(){n.transition().call(c)});for(var i=n.append("p"),a=e.split(//g),o=0;o1){var t=["LOG:"];for(e=0;e1){var i=[];for(e=0;e"),"long")}},i.warn=function(){var e;if(r.logging>0){var t=["WARN:"];for(e=0;e0){var i=[];for(e=0;e"),"stick")}},i.error=function(){var e;if(r.logging>0){var t=["ERROR:"];for(e=0;e0){var i=[];for(e=0;e"),"stick")}}}}),eE=d({"src/components/color/attributes.js"(e){e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11}}),eC=d({"src/components/color/index.js"(e,t){var r=(eT(),y(em)).default,{warn:n}=eS(),{background:i,defaultLine:a,defaults:o,lightLine:s}=eE(),l=e=>{"string"==typeof e&&(e=e.trim());try{return r(e)}catch{return n(`Invalid color specifier: "${e}". Defaulting to "#000"`),r("#000")}},c=e=>{let{r:t,g:r,b:n}=l(e).rgb().object();return`rgb(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)})`},u=(e,t)=>{t||(t=i);let r=l(e).rgb().object();if(null!=r.alpha||(r.alpha=1),1===r.alpha)return l(e).rgb().string();let n=l(t).rgb().object();null!=n.alpha||(n.alpha=1);let a=1===n.alpha?n:{r:255*(1-n.alpha)+n.r*n.alpha,g:255*(1-n.alpha)+n.g*n.alpha,b:255*(1-n.alpha)+n.b*n.alpha};return l({r:a.r*(1-r.alpha)+r.r*r.alpha,g:a.g*(1-r.alpha)+r.g*r.alpha,b:a.b*(1-r.alpha)+r.b*r.alpha}).rgb().string()},h=(e,t)=>{let r=l(e);return r.lightness(r.lightness()+t)};t.exports={addOpacity:(e,t)=>{let r=l(e).rgb().object();return`rgba(${Math.round(r.r)}, ${Math.round(r.g)}, ${Math.round(r.b)}, ${t})`},adjustLightness:h,background:i,brighten:(e,t)=>{var r;t=0===t?0:t||10;let n=l(e).rgb().object(),i=Math.round(t/100*255);return l({r:Math.max(0,Math.min(255,n.r+i)),g:Math.max(0,Math.min(255,n.g+i)),b:Math.max(0,Math.min(255,n.b+i))}).alpha(null!=(r=n.alpha)?r:1).rgb().string()},color:l,combine:u,contrast:(e,t,r)=>{let n=l(e);return 1!==n.alpha()&&(n=l(u(e,i))),(n.isDark()?t?h(n,t):l(i):r?h(n,-r):l(a)).rgb().string()},defaultLine:a,defaults:o,equals:(e,t)=>!!(e&&t&&l(e).rgb().string()===l(t).rgb().string()),fill:(e,t)=>{let r=l(t);e.style({fill:c(t),"fill-opacity":r.alpha()})},interpolate:(e,t,r)=>{let n=l(e).rgb().object(),i=l(t).rgb().object();return l({r:r*n.r+(1-r)*i.r,g:r*n.g+(1-r)*i.g,b:r*n.b+(1-r)*i.b}).rgb().string()},isValid:e=>{if("string"!=typeof e)return!1;try{return!!r(e.trim())}catch{return!1}},lightLine:s,mix:(e,t,r)=>l(e).mix(l(t),r/100).rgb().string(),mostReadable:(e,t=["#000","#fff"])=>{let r,n=-1/0;for(let i of t){let t=l(e).contrast(l(i));t>n&&(n=t,r=l(i).rgb().string())}return r},opacity:e=>e?l(e).alpha():0,rgb:c,stroke:(e,t)=>{let r=l(t);e.style({stroke:c(t),"stroke-opacity":r.alpha()})}}}}),eL=d({"src/components/colorscale/scales.js"(e,t){var r=eC(),n={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},i=n.RdBu;function a(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var n=0;nez});var eO,eD=f({"src/lib/regex.ts"(){eO="([2-9]|[1-9][0-9]+)?"}}),eR=d({"src/lib/coerce.js"(e){var t=A(),r=U().extendFlat,n=W(),i=eL(),a=eC(),o=eI().DESELECTDIM,s=I(),l=(eD(),y(eP)).counter,c=(N(),y(R)).modHalf,u=L().isArrayOrTypedArray,h=L().isTypedArraySpec,f=L().decodeTypedArraySpec;function d(t,r){var n=e.valObjectMeta[r.valType];if(r.arrayOk&&u(t))return!0;if(n.validateFunction)return n.validateFunction(t,r);var i={},a=i;return n.coerceFunction(t,{set:function(e){a=e}},i,r),a!==i}e.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(u(e)?e:h(e)?f(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e*=1),-1===n.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e*=1);for(var r=t.values,n=0;n!0===e||!1===e;i(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,r,n,i){h(e)&&(e=f(e)),!t(e)||void 0!==i.min&&ei.max?r.set(n):r.set(+e)}},integer:{coerceFunction:function(e,r,n,i){-1!==(i.extras||[]).indexOf(e)?r.set(e):(h(e)&&(e=f(e)),e%1||!t(e)||void 0!==i.min&&ei.max?r.set(n):r.set(+e))}},string:{coerceFunction:function(e,t,r,n){if("string"!=typeof e){var i="number"==typeof e;!0!==n.strict&&i?t.set(String(e)):t.set(r)}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){h(e)&&(e=f(e)),a.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every(e=>a.isValid(e))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(i.get(e,r))}},angle:{coerceFunction:function(e,r,n){h(e)&&(e=f(e)),"auto"===e?r.set("auto"):t(e)?r.set(c(+e,360)):r.set(n)}},subplotid:{coerceFunction:function(e,t,r,n){var i=n.regex||l(r);let a=e=>"string"==typeof e&&i.test(e);a(e)||n.arrayOk&&u(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!l(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if(-1!==(n.extras||[]).indexOf(e))return void t.set(e);if("string"!=typeof e)return void t.set(r);for(var i=e.split("+"),a=0;aMath.abs(I)?null:(E*=I=1/I,C*=I,L*=I,i=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],l=t[1],c=t[2],u=t[3],h=t[4],f=t[5],d=t[6],p=t[7],m=t[8],g=t[9],y=t[10],v=t[11],x=E*E*o+a,b=C*E*o+L*i,_=L*E*o-C*i,w=E*C*o-L*i,k=C*C*o+a,T=L*C*o+E*i,A=E*L*o+C*i,M=C*L*o-E*i,S=L*L*o+a,e[0]=s*x+h*b+m*_,e[1]=l*x+f*b+g*_,e[2]=c*x+d*b+y*_,e[3]=u*x+p*b+v*_,e[4]=s*w+h*k+m*T,e[5]=l*w+f*k+g*T,e[6]=c*w+d*k+y*T,e[7]=u*w+p*k+v*T,e[8]=s*A+h*M+m*S,e[9]=l*A+f*M+g*S,e[10]=c*A+d*M+y*S,e[11]=u*A+p*M+v*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}}}),eK=d({"node_modules/gl-mat4/rotateX.js"(e,t){t.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+c*n,e[5]=o*i+u*n,e[6]=s*i+h*n,e[7]=l*i+f*n,e[8]=c*i-a*n,e[9]=u*i-o*n,e[10]=h*i-s*n,e[11]=f*i-l*n,e}}}),eJ=d({"node_modules/gl-mat4/rotateY.js"(e,t){t.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-c*n,e[1]=o*i-u*n,e[2]=s*i-h*n,e[3]=l*i-f*n,e[8]=a*n+c*i,e[9]=o*n+u*i,e[10]=s*n+h*i,e[11]=l*n+f*i,e}}}),eQ=d({"node_modules/gl-mat4/rotateZ.js"(e,t){t.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],f=t[7];return t!==e&&(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[0]=a*i+c*n,e[1]=o*i+u*n,e[2]=s*i+h*n,e[3]=l*i+f*n,e[4]=c*i-a*n,e[5]=u*i-o*n,e[6]=h*i-s*n,e[7]=f*i-l*n,e}}}),e0=d({"node_modules/gl-mat4/fromRotation.js"(e,t){t.exports=function(e,t,r){var n,i,a,o=r[0],s=r[1],l=r[2],c=Math.sqrt(o*o+s*s+l*l);return 1e-6>Math.abs(c)?null:(o*=c=1/c,s*=c,l*=c,n=Math.sin(t),a=1-(i=Math.cos(t)),e[0]=o*o*a+i,e[1]=s*o*a+l*n,e[2]=l*o*a-s*n,e[3]=0,e[4]=o*s*a-l*n,e[5]=s*s*a+i,e[6]=l*s*a+o*n,e[7]=0,e[8]=o*l*a+s*n,e[9]=s*l*a-o*n,e[10]=l*l*a+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}}}),e1=d({"node_modules/gl-mat4/fromRotationTranslation.js"(e,t){t.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=n+n,l=i+i,c=a+a,u=n*s,h=n*l,f=n*c,d=i*l,p=i*c,m=a*c,g=o*s,y=o*l,v=o*c;return e[0]=1-(d+m),e[1]=h+v,e[2]=f-y,e[3]=0,e[4]=h-v,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=f+y,e[9]=p-g,e[10]=1-(u+d),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}}}),e2=d({"node_modules/gl-mat4/fromScaling.js"(e,t){t.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),e3=d({"node_modules/gl-mat4/fromTranslation.js"(e,t){t.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}}}),e5=d({"node_modules/gl-mat4/fromXRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),e4=d({"node_modules/gl-mat4/fromYRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),e6=d({"node_modules/gl-mat4/fromZRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),e8=d({"node_modules/gl-mat4/fromQuat.js"(e,t){t.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r+r,s=n+n,l=i+i,c=r*o,u=n*o,h=n*s,f=i*o,d=i*s,p=i*l,m=a*o,g=a*s,y=a*l;return e[0]=1-h-p,e[1]=u+y,e[2]=f-g,e[3]=0,e[4]=u-y,e[5]=1-c-p,e[6]=d+m,e[7]=0,e[8]=f+g,e[9]=d-m,e[10]=1-c-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),e9=d({"node_modules/gl-mat4/frustum.js"(e,t){t.exports=function(e,t,r,n,i,a,o){var s=1/(r-t),l=1/(i-n),c=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(i+n)*l,e[10]=(o+a)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*c,e[15]=0,e}}}),e7=d({"node_modules/gl-mat4/perspective.js"(e,t){t.exports=function(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}}}),te=d({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(e,t){t.exports=function(e,t,r,n){var i=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),c=2/(i+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(i-a)*c*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}}}),tt=d({"node_modules/gl-mat4/ortho.js"(e,t){t.exports=function(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*c,e[15]=1,e}}}),tr=d({"node_modules/gl-mat4/lookAt.js"(e,t){var r=eV();t.exports=function(e,t,n,i){var a,o,s,l,c,u,h,f,d,p,m=t[0],g=t[1],y=t[2],v=i[0],x=i[1],b=i[2],_=n[0],w=n[1],k=n[2];return 1e-6>Math.abs(m-_)&&1e-6>Math.abs(g-w)&&1e-6>Math.abs(y-k)?r(e):(p=1/Math.sqrt((h=m-_)*h+(f=g-w)*f+(d=y-k)*d),h*=p,f*=p,d*=p,(p=Math.sqrt((a=x*d-b*f)*a+(o=b*h-v*d)*o+(s=v*f-x*h)*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),(p=Math.sqrt((l=f*s-d*o)*l+(c=d*a-h*s)*c+(u=h*o-f*a)*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),e[0]=a,e[1]=l,e[2]=h,e[3]=0,e[4]=o,e[5]=c,e[6]=f,e[7]=0,e[8]=s,e[9]=u,e[10]=d,e[11]=0,e[12]=-(a*m+o*g+s*y),e[13]=-(l*m+c*g+u*y),e[14]=-(h*m+f*g+d*y),e[15]=1,e)}}}),tn=d({"node_modules/gl-mat4/str.js"(e,t){t.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}}}),ti=d({"node_modules/gl-mat4/index.js"(e,t){t.exports={create:eB(),clone:eN(),copy:eU(),identity:eV(),transpose:eq(),invert:eH(),adjoint:eG(),determinant:eW(),multiply:eY(),translate:eX(),scale:eZ(),rotate:e$(),rotateX:eK(),rotateY:eJ(),rotateZ:eQ(),fromRotation:e0(),fromRotationTranslation:e1(),fromScaling:e2(),fromTranslation:e3(),fromXRotation:e5(),fromYRotation:e4(),fromZRotation:e6(),fromQuat:e8(),frustum:e9(),perspective:e7(),perspectiveFromFieldOfView:te(),ortho:tt(),lookAt:tr(),str:tn()}}}),ta=d({"src/lib/matrix.js"(e){var t=ti();e.init2dArray=function(e,t){for(var r=Array(e),n=0;nh({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>h({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e}),e.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})}}),tf=d({"src/components/shapes/label_texttemplate.js"(e,t){function r(e,t){return t?t.d2l(e):e}function n(e){return e.x0shift||0}function i(e){return e.x1shift||0}function a(e){return e.y0shift||0}function o(e){return e.y1shift||0}function s(e,t){return r(e.x1,t)+i(e)-r(e.x0,t)-n(e)}function l(e,t,n){return r(e.y1,n)+o(e)-r(e.y0,n)-a(e)}t.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:l(e,t,r)/s(e,t)},dx:s,dy:l,width:function(e,t){return Math.abs(s(e,t))},height:function(e,t,r){return Math.abs(l(e,t,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(s(e,t),2)+Math.pow(l(e,t,r),2))},xcenter:function(e,t){var a;return a=(r(e.x1,t)+i(e)+r(e.x0,t)+n(e))/2,t?t.l2d(a):a},ycenter:function(e,t,n){var i;return i=(r(e.y1,n)+o(e)+r(e.y0,n)+a(e))/2,n?n.l2d(i):i},simpleXVariables:["x0","x1","y0","y1","dy","height","ycenter"],simpleYVariables:["x0","x1","y0","y1","dx","width","xcenter"]}}}),td=d({"src/components/shapes/draw_newshape/attributes.js"(e,t){var r=tl().overrideAll,n=W(),i=V(),a=tc().dash,o=U().extendFlat,{shapeTexttemplateAttrs:s,templatefallbackAttrs:l}=th(),c=tf();t.exports=r({newshape:{visible:o({},n.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:o({},n.legend,{}),legendgroup:o({},n.legendgroup,{}),legendgrouptitle:{text:o({},n.legendgrouptitle.text,{}),font:i({})},legendrank:o({},n.legendrank,{}),legendwidth:o({},n.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:o({},a,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:o({},n.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:s({newshape:!0},{keys:Object.keys(c)}),texttemplatefallback:l({editType:"arraydraw"}),font:i({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),tp=d({"src/components/selections/draw_newselection/attributes.js"(e,t){var r=tc().dash;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:(0,U().extendFlat)({},r,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),tm=d({"src/plots/pad_attributes.js"(e,t){t.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}}}),tg=d({"src/plots/layout_attributes.js"(e,t){var r=V(),n=ts(),i=eE(),a=td(),o=tp(),s=tm(),l=U().extendFlat,c=r({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=i.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:l(s({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:i.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:i.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:i.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:a.newshape,activeshape:a.activeshape,newselection:o.newselection,activeselection:o.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:l({},n.transition,{editType:"none"})}}}),ty=d({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var e=document.createElement("style");e.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",e.textContent=".maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}",document.head.appendChild(e)}}}),tv=d({"src/registry.js"(e){var t=eS(),r=ej(),n=eF(),i=(to().addStyleRule,U()),a=W(),o=tg(),s=i.extendFlat,l=i.extendDeepAll;function c(t){if(t.layoutAttributes){var r=t.layoutAttributes._arrayAttrRegexps;if(r)for(var i=0;i=t&&n<=r?n:l}if("string"!=typeof n&&"number"!=typeof n)return l;n=String(n);var y=b(i),_=n.charAt(0);y&&("G"===_||"g"===_)&&(n=n.slice(1),i="");var w=y&&"chinese"===i.slice(0,7),k=n.match(w?v:g);if(!k)return l;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(y){if(2===T.length)return l;T=Number(T);try{var L,I=p.getComponentMethod("calendars","getCal")(i);if(w){var P="i"===A.charAt(A.length-1);A=parseInt(A,10),L=I.newDate(T,I.toMonthIndex(T,A,P),M)}else L=I.newDate(T,Number(A),M)}catch{return l}return L?(L.toJD()-d)*c+S*u+E*h+C*f:l}T=2===T.length?(Number(T)+2e3-x)%100+x:Number(T);var z=new Date(Date.UTC(2e3,A-=1,M,S,E));return z.setUTCFullYear(T),z.getUTCMonth()!==A||z.getUTCDate()!==M?l:z.getTime()+C*f},t=e.MIN_MS=e.dateTime2ms("-9999"),r=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==l};var k=90*c,T=3*u,S=5*h;function E(e,t,r,n,i){if((t||r||n||i)&&(e+=" "+_(t,2)+":"+_(r,2),(n||i)&&(e+=":"+_(n,2),i))){for(var a=4;i%10==0;)a-=1,i/=10;e+="."+_(i,a)}return e}e.ms2DateTime=function(e,n,i){if("number"!=typeof e||!(e>=t&&e<=r))return l;n||(n=0);var a,s,g,y,v,x,_=Math.floor(10*o(e+.05,1)),w=Math.round(e-_/10);if(b(i)){var A=Math.floor(w/c)+d,M=Math.floor(o(e,c));try{a=p.getComponentMethod("calendars","getCal")(i).fromJD(A).formatDate("yyyy-mm-dd")}catch{a=m("G%Y-%m-%d")(new Date(w))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;s=n=t+c&&e<=r-c))return l;var i=Math.floor(10*o(e+.05,1)),a=new Date(Math.round(e-i/10));return E(n("%Y-%m-%d")(a),a.getHours(),a.getMinutes(),a.getSeconds(),10*a.getUTCMilliseconds()+i)},e.cleanDate=function(t,r,n){if(t===l)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(b(n))return a.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,n))return a.error("unrecognized date",t),r;return t};var C=/%\d?f/g,L=/%h/g,I={1:"1",2:"1",3:"2",4:"2"};function P(e,t,r,n){e=e.replace(C,function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).slice(2).replace(/0+$/,"")||"0"});var i=new Date(Math.floor(t+.05));if(e=e.replace(L,function(){return I[r("%q")(i)]}),b(n))try{e=p.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch{return"Invalid"}return r(e)(i)}var z=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(e,t,r,n,a,s){if(a=b(a)&&a,!t)if("y"===r)t=s.year;else if("m"===r)t=s.month;else{if("d"!==r)return function(e,t){var r=o(e+.05,c),n=_(Math.floor(r/u),2)+":"+_(o(Math.floor(r/h),60),2);if("M"!==t){i(t)||(t=0);var a=(100+Math.min(o(e/f,60),z[t])).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+a}return n}(e,r)+` -`+P(s.dayMonthYear,e,n,a);t=s.dayMonth+` -`+s.year}return P(t,e,n,a)};var O=3*c;e.incrementMonth=function(e,t,r){r=b(r)&&r;var n=o(e,c);if(e=Math.round(e-n),r)try{var i=Math.round(e/c)+d,s=p.getComponentMethod("calendars","getCal")(r),l=s.fromJD(i);return t%12?s.add(l,t,"m"):s.add(l,t/12,"y"),(l.toJD()-d)*c+n}catch{a.error("invalid ms "+e+" in calendar "+r)}var u=new Date(e+O);return u.setUTCMonth(u.getUTCMonth()+t)+n-O},e.findExactDates=function(e,t){for(var r,n,a=0,o=0,s=0,l=0,u=b(t)&&p.getComponentMethod("calendars","getCal")(t),h=0;ht}function l(e,t){return e>=t}e.findBin=function(e,n,i){if(t(n.start))return i?Math.ceil((e-n.start)/n.size-1e-9)-1:Math.floor((e-n.start)/n.size+1e-9);var c,u,h=0,f=n.length,d=0,p=f>1?(n[f-1]-n[0])/(f-1):1;for(u=p>=0?i?a:o:i?l:s,e+=1e-9*p*(i?-1:1)*(p>=0?1:-1);h90&&r.log("Long binary search..."),h-1},e.sorterAsc=function(e,t){return e-t},e.sorterDes=function(e,t){return t-e},e.distinctVals=function(t){var r=t.slice();for(r.sort(e.sorterAsc),n=r.length-1;n>-1&&r[n]===i;n--);for(var n,a,o=r[n]-r[0]||1,s=o/(n||1)/1e4,l=[],c=0;c<=n;c++){var u=r[c],h=u-a;void 0===a?(l.push(u),a=u):h>s&&(o=Math.min(o,h),l.push(u),a=u)}return{vals:l,minDiff:o}},e.roundUp=function(e,t,r){for(var n,i=0,a=t.length-1,o=0,s=+!r,l=+!!r,c=r?Math.ceil:Math.floor;i0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()},e.findIndexOfMin=function(e,t){t=t||n;for(var r,i=1/0,a=0;atT});var tT,tA=f({"src/lib/sort_object_keys.ts"(){tT=tk}}),tM=d({"src/lib/stats.js"(e){var t=A(),r=L().isArrayOrTypedArray;e.aggNums=function(n,i,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),t(i)||(i=!1),r(a[0])){for(l=Array(o),s=0;se.length-1)return e[e.length-1];var n=r%1;return n*e[Math.ceil(r)]+(1-n)*e[Math.floor(r)]}}}),tS=d({"src/lib/angles.js"(e,t){var r=(N(),y(R)),n=r.mod,i=r.modHalf,a=Math.PI,o=2*a;function s(e){return Math.abs(e[1]-e[0])>o-1e-14}function l(e,t){return i(t-e,o)}function c(e,t){if(s(t))return!0;t[0](i=n(i,o))&&(i+=o);var r,i,a=n(e,o),l=a+o;return a>=r&&a<=i||l>=r&&l<=i}function u(e,t,r,n,i,l,c){i=i||0,l=l||0;var u,h,f,d,p,m,g=s([r,n]);function y(e,t){return[e*Math.cos(t)+i,l-e*Math.sin(t)]}g?(h=0,f=a,d=o):r=i&&e<=a)},pathArc:function(e,t,r,n,i){return u(null,e,t,r,n,i,0)},pathSector:function(e,t,r,n,i){return u(null,e,t,r,n,i,1)},pathAnnulus:function(e,t,r,n,i,a){return u(e,t,r,n,i,a,1)}}}}),tE=d({"src/lib/anchor_utils.js"(e){e.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},e.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},e.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},e.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},e.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},e.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}}}),tC=d({"src/lib/geometry2d.js"(e){var t,r,n,i=(N(),y(R)).mod;function a(e,t,r,n,i,a,o,s){var l=r-e,c=i-e,u=o-i,h=n-t,f=a-t,d=s-a,p=l*d-u*h;if(0===p)return null;var m=(c*d-u*f)/p,g=(c*h-l*f)/p;return g<0||g>1||m<0||m>1?null:{x:e+l*m,y:t+h*m}}function o(e,t,r,n,i){var a=n*e+i*t;if(a<0)return n*n+i*i;if(a>r){var o=n-e,s=i-t;return o*o+s*s}var l=n*t-i*e;return l*l/r}e.segmentsIntersect=a,e.segmentDistance=function(e,t,r,n,i,s,l,c){if(a(e,t,r,n,i,s,l,c))return 0;var u=r-e,h=n-t,f=l-i,d=c-s,p=u*u+h*h,m=f*f+d*d;return Math.sqrt(Math.min(o(u,h,p,i-e,s-t),o(u,h,p,l-e,c-t),o(f,d,m,e-i,t-s),o(f,d,m,r-i,n-s)))},e.getTextLocation=function(e,a,o,s){if((e!==r||s!==n)&&(t={},r=e,n=s),t[o])return t[o];var l=e.getPointAtLength(i(o-s/2,a)),c=e.getPointAtLength(i(o+s/2,a)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=e.getPointAtLength(i(o,a)),f={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return t[o]=f,f},e.clearLocationCache=function(){r=null},e.getVisibleSegment=function(e,t,r){var n,i,a=t.left,o=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),h=u;function f(t){var r=e.getPointAtLength(t);0===t?n=r:t===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 d=f(c);d;){if((c+=d+r)>h)return;d=f(c)}for(d=f(h);d;){if(c>(h-=d+r))return;d=f(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&.1>Math.abs(n.x-i.x)&&.1>Math.abs(n.y-i.y)}},e.findPointOnPath=function(e,t,r,n){n=n||{};for(var i,a,o,s=n.pathLength||e.getTotalLength(),l=n.tolerance||.001,c=n.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,h=0,f=0,d=s;h0?d=i:f=i,h++;return a}}}),tL=d({"src/lib/throttle.js"(e){var t={};function r(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}e.throttle=function(e,n,i){var a=t[e],o=Date.now();if(!a){for(var s in t)t[s].tsa.ts+n)?l():a.timer=setTimeout(function(){l(),a.timer=null},n)},e.done=function(e){var r=t[e];return r&&r.timer?new Promise(function(e){var t=r.onDone;r.onDone=function(){t&&t(),e(),r.onDone=null}}):Promise.resolve()},e.clear=function(n){if(n)r(t[n]),delete t[n];else for(var i in t)e.clear(i)}}}),tI=d({"src/lib/clear_responsive.js"(e,t){t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}}}),tP=d({"node_modules/is-mobile/index.js"(e,t){t.exports=a,t.exports.isMobile=a,t.exports.default=a;var r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,n=/CrOS/,i=/android|ipad|playbook|silk/i;function a(e){e||(e={});let t=e.ua;if(!t&&"u">typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;let a=r.test(t)&&!n.test(t)||!!e.tablet&&i.test(t);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(a=!0),a}}}),tz=d({"src/lib/preserve_drawing_buffer.js"(e,t){var r=A(),n=tP();t.exports=function(e){if("string"!=typeof(i=e&&e.hasOwnProperty("userAgent")?e.userAgent:("u">typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t)))return!0;var t,i,a=n({ua:{headers:{"user-agent":i}},tablet:!0,featureDetect:!1});if(!a){for(var o=i.split(" "),s=1;s-1;l--){var c=o[l];if("Version/"===c.slice(0,8)){var u=c.slice(8).split(".")[0];if(r(u)&&(u*=1),u>=13)return!0}}}return a}}}),tO=d({"src/lib/make_trace_groups.js"(e,t){var r=b();t.exports=function(e,t,n){var i=e.selectAll("g."+n.replace(/\s/g,".")).data(t,function(e){return e[0].trace.uid});i.exit().remove(),i.enter().append("g").attr("class",n),i.order();var a=e.classed("rangeplot")?"nodeRangePlot3":"node3";return i.each(function(e){e[0][a]=r.select(this)}),i}}}),tD=d({"src/lib/localize.js"(e,t){var r=tv();t.exports=function(e,t){for(var n=e._context.locale,i=0;i<2;i++){for(var a=e._context.locales,o=0;o<2;o++){var s=(a[n]||{}).dictionary;if(s){var l=s[t];if(l)return l}a=r.localeRegistry}var c=n.split("-")[0];if(c===n)break;n=c}return t}}}),tR=d({"src/lib/filter_unique.js"(e,t){t.exports=function(e){for(var t={},r=[],n=0,i=0;i1?(r*e+r*t)/r:e+t,i=String(n).length;if(i>16){var a=String(t).length;if(i>=String(e).length+a){var o=parseFloat(n).toPrecision(12);-1===o.indexOf("e+")&&(n=+o)}}return n}}}),tB={};function tN(e){return"string"==typeof e&&(e=e.replace(tq,"")),(0,tU.default)(e)?Number(e):tV.BADNUM}p(tB,{default:()=>tH});var tU,tV,tq,tH,tG=f({"src/lib/clean_number.ts"(){tU=g(A()),tV=g(M()),tq=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,tH=tN}}),tW=d({"src/lib/slugify.js"(e,t){var r=/<[^>]*>/g,n=/[\p{S}\p{P}]/gu,i=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,a=/�/g,o=/\s+/g,s="-".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=RegExp(s+"{3,}","g"),c=RegExp(s+"$","g");t.exports=function(e,t=60){var s,u=("function"==typeof(s=e??"").toWellFormed?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))).replace(a,"").replace(r," ").replace(n,e=>"-"===e?e:"").toLowerCase().trim().replace(o,"-").replace(i,"").replace(l,"-");return u.length<=t?u:Array.from(u).slice(0,t).join("").replace(c,"")}}}),tY=d({"src/lib/index.js"(e,t){var n=b(),a=w().utcFormat,o=k().format,s=A(),l=M(),c=l.FP_SAFE,u=-c,f=l.BADNUM,d=t.exports={};d.adjustFormat=function(e){return!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e)?e:"0.f"===e?"~f":/^\d%/.test(e)?"~%":/^\ds/.test(e)?"~s":!/^[~,.0$]/.test(e)&&/[&fps]/.test(e)?"~"+e:e};var p={};d.warnBadFormat=function(e){var t=String(e);p[t]||(p[t]=1,d.warn('encountered bad format: "'+t+'"'))},d.noFormat=function(e){return String(e)},d.numberFormat=function(e){var t;try{t=o(d.adjustFormat(e))}catch{return d.warnBadFormat(e),d.noFormat}return t},d.nestedProperty=I(),d.keyedContainer=P(),d.relativeAttr=z(),d.isPlainObject=C(),d.toLogRange=O(),d.relinkPrivateKeys=D();var m=L();d.isArrayBuffer=m.isArrayBuffer,d.isTypedArray=m.isTypedArray,d.isArrayOrTypedArray=m.isArrayOrTypedArray,d.isArray1D=m.isArray1D,d.ensureArray=m.ensureArray,d.concat=m.concat,d.maxRowLength=m.maxRowLength,d.minRowLength=m.minRowLength;var g=(N(),y(R));d.mod=g.mod,d.modHalf=g.modHalf;var v=eR();d.valObjectMeta=v.valObjectMeta,d.coerce=v.coerce,d.coerce2=v.coerce2,d.coerceFont=v.coerceFont,d.coercePattern=v.coercePattern,d.coerceHoverinfo=v.coerceHoverinfo,d.coerceSelectionMarkerOpacity=v.coerceSelectionMarkerOpacity,d.validate=v.validate;var x=tx();d.dateTime2ms=x.dateTime2ms,d.isDateTime=x.isDateTime,d.ms2DateTime=x.ms2DateTime,d.ms2DateTimeLocal=x.ms2DateTimeLocal,d.cleanDate=x.cleanDate,d.isJSDate=x.isJSDate,d.formatDate=x.formatDate,d.incrementMonth=x.incrementMonth,d.dateTick0=x.dateTick0,d.dfltRange=x.dfltRange,d.findExactDates=x.findExactDates,d.MIN_MS=x.MIN_MS,d.MAX_MS=x.MAX_MS;var _=t_();d.findBin=_.findBin,d.sorterAsc=_.sorterAsc,d.sorterDes=_.sorterDes,d.distinctVals=_.distinctVals,d.roundUp=_.roundUp,d.sort=_.sort,d.findIndexOfMin=_.findIndexOfMin,d.sortObjectKeys=(tA(),y(tw)).default;var T=tM();d.aggNums=T.aggNums,d.len=T.len,d.mean=T.mean,d.geometricMean=T.geometricMean,d.median=T.median,d.midRange=T.midRange,d.variance=T.variance,d.stdev=T.stdev,d.interp=T.interp;var S=ta();d.init2dArray=S.init2dArray,d.transposeRagged=S.transposeRagged,d.dot=S.dot,d.translationMatrix=S.translationMatrix,d.rotationMatrix=S.rotationMatrix,d.rotationXYMatrix=S.rotationXYMatrix,d.apply3DTransform=S.apply3DTransform,d.apply2DTransform=S.apply2DTransform,d.apply2DTransform2=S.apply2DTransform2,d.convertCssMatrix=S.convertCssMatrix,d.inverseTransformMatrix=S.inverseTransformMatrix;var E=tS();d.deg2rad=E.deg2rad,d.rad2deg=E.rad2deg,d.angleDelta=E.angleDelta,d.angleDist=E.angleDist,d.isFullCircle=E.isFullCircle,d.isAngleInsideSector=E.isAngleInsideSector,d.isPtInsideSector=E.isPtInsideSector,d.pathArc=E.pathArc,d.pathSector=E.pathSector,d.pathAnnulus=E.pathAnnulus;var j=tE();d.isLeftAnchor=j.isLeftAnchor,d.isCenterAnchor=j.isCenterAnchor,d.isRightAnchor=j.isRightAnchor,d.isTopAnchor=j.isTopAnchor,d.isMiddleAnchor=j.isMiddleAnchor,d.isBottomAnchor=j.isBottomAnchor;var F=tC();d.segmentsIntersect=F.segmentsIntersect,d.segmentDistance=F.segmentDistance,d.getTextLocation=F.getTextLocation,d.clearLocationCache=F.clearLocationCache,d.getVisibleSegment=F.getVisibleSegment,d.findPointOnPath=F.findPointOnPath;var B=U();d.extendFlat=B.extendFlat,d.extendDeep=B.extendDeep,d.extendDeepAll=B.extendDeepAll,d.extendDeepNoArrays=B.extendDeepNoArrays;var V=eS();d.log=V.log,d.warn=V.warn,d.error=V.error,d.counterRegex=(eD(),y(eP)).counter;var q=tL();d.throttle=q.throttle,d.throttleDone=q.done,d.clearThrottle=q.clear;var H=to();d.getGraphDiv=H.getGraphDiv,d.isPlotDiv=H.isPlotDiv,d.removeElement=H.removeElement,d.addStyleRule=H.addStyleRule,d.addRelatedStyleRule=H.addRelatedStyleRule,d.deleteRelatedStyleRule=H.deleteRelatedStyleRule,d.setStyleOnHover=H.setStyleOnHover,d.getFullTransformMatrix=H.getFullTransformMatrix,d.getElementTransformMatrix=H.getElementTransformMatrix,d.getElementAndAncestors=H.getElementAndAncestors,d.equalDomRects=H.equalDomRects,d.clearResponsive=tI(),d.preserveDrawingBuffer=tz(),d.makeTraceGroups=tO(),d._=tD(),d.notifier=eM(),d.filterUnique=tR(),d.filterVisible=tj(),d.pushUnique=eF(),d.increment=tF(),d.cleanNumber=(tG(),y(tB)).default,d.slugify=tW(),d.ensureNumber=function(e){return s(e)?(e=Number(e))>c||e=t))&&s(e)&&e>=0&&e%1==0},d.noop=ej(),d.identity=tb(),d.repeat=function(e,t){for(var r=Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},d.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},d.simpleMap=function(e,t,r,n,i){for(var a=e.length,o=Array(a),s=0;s=Math.pow(2,r)?i>10?(d.warn("randstr failed uniqueness"),s):e(t,r,n,(i||0)+1):s},d.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r["_"+t]=e,r},d.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,n,i,a,o=e.length,s=2*o,l=2*t-1,c=Array(l),u=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+=e[i]*c[n];u[r]=a}return u},d.syncOrAsync=function(e,t,r){var n;function i(){return d.syncOrAsync(e,t,r)}for(;e.length;)if((n=(0,e.splice(0,1)[0])(t))&&n.then)return n.then(i);return r&&r(t)},d.stripTrailingSlash=function(e){return"/"===e.slice(-1)?e.slice(0,-1):e},d.noneOrAll=function(e,t,r){if(e){var n,i=!1,a=!0;for(n=0;n0?t:0})},d.fillArray=function(e,t,r,n){if(n=n||d.identity,d.isArrayOrTypedArray(e))for(var i=0;iY.test(window.navigator.userAgent);var X=/Firefox\/(\d+)\.\d+/;d.getFirefoxVersion=function(){var e=X.exec(window.navigator.userAgent);if(e&&2===e.length){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},d.isD3Selection=function(e){return e instanceof n.selection},d.ensureSingle=function(e,t,r,n){var i=e.select(t+(r?"."+r:""));if(i.size())return i;var a=e.append(t);return r&&a.classed(r,!0),n&&a.call(n),a},d.ensureSingleById=function(e,t,r,n){var i=e.select(t+"#"+r);if(i.size())return i;var a=e.append(t).attr("id",r);return n&&a.call(n),a},d.objectFromPath=function(e,t){for(var r,n=e.split("."),i=r={},a=0;a1?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},d.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var J=/^\w*$/;d.templateString=function(e,t){var r={};return e.replace(d.TEMPLATE_STRING_REGEX,function(e,n){var i;return J.test(n)?i=t[n]:(r[n]=r[n]||d.nestedProperty(t,n).get,i=r[n](!0)),void 0!==i?i:""})};var Q={max:10,count:0,name:"hovertemplate"};d.hovertemplateString=e=>ei(r(h({},e),i({opts:Q})));var ee={max:10,count:0,name:"texttemplate"};d.texttemplateString=e=>ei(r(h({},e),i({opts:ee})));var et=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,er={max:10,count:0,name:"texttemplate",parseMultDiv:!0};d.texttemplateStringForShapes=e=>ei(r(h({},e),i({opts:er})));var en=/^[:|\|]/;function ei({data:e=[],locale:t,fallback:r,labels:n={},opts:i,template:o}){return o.replace(d.TEMPLATE_STRING_REGEX,(o,s,l)=>{let c,u=["xother","yother"].includes(s),h=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),p=["xother_","yother_"].includes(s),m=u||h||p||f;(h||f)&&(s=s.substring(1)),(p||f)&&(s=s.substring(0,s.length-1));let g=null,y=null;if(i.parseMultDiv){var v,x,b,_=(x=(v=s).match(et))?{key:x[1],op:x[2],number:Number(x[3])}:{key:v,op:null,number:null};s=_.key,g=_.op,y=_.number}if(m){if(void 0===n[s])return"";c=n[s]}else for(let t of e)if(t){if(t.hasOwnProperty(s)){c=t[s];break}if(J.test(s)||(c=d.nestedProperty(t,s).get(!0)),void 0!==c)break}if(void 0===c){let{count:e,max:t,name:n}=i,a=!1===r?o:r;return e=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 ea=2e9;d.seedPseudoRandom=function(){ea=2e9},d.pseudoRandom=function(){var e=ea;return 0x19999999>Math.abs((ea=(69069*ea+1)%0x100000000)-e)?d.pseudoRandom():ea/0x100000000},d.fillText=function(e,t,r){var n=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},i=d.extractOption(e,t,"htx","hovertext");if(d.isValidTextValue(i))return n(i);var a=d.extractOption(e,t,"tx","text");if(d.isValidTextValue(a))return n(a)},d.isValidTextValue=function(e){return e||0===e},d.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(c=1):c=0,d.strTranslate(i-c*(r+o),a-c*(n+s))+d.strScale(c)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")},d.setTransormAndDisplay=function(e,t){e.attr("transform",d.getTextTransform(t)),e.style("display",t.scale?null:"none")},d.ensureUniformFontSize=function(e,t){var r=d.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},d.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)},d.bigFont=function(e){return Math.round(1.2*e)};var eo=d.getFirefoxVersion(),es=null!==eo&&eo<86;d.getPositionFromD3Event=function(){return es?[n.event.layerX,n.event.layerY]:[n.event.offsetX,n.event.offsetY]}}}),tX=d({"build/plotcss.js"(){var e,t,r=tY(),n={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.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(t in n)e=t.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),r.addStyleRule(e,n[t])}}),tZ=d({"node_modules/is-browser/client.js"(e,t){t.exports=!0}}),t$=d({"node_modules/has-hover/index.js"(e,t){var r=tZ();t.exports="function"==typeof window.matchMedia?!window.matchMedia("(hover: none)").matches:r}}),tK=d({"node_modules/events/events.js"(e,t){var r,n="object"==typeof Reflect?Reflect:null,i=n&&"function"==typeof n.apply?n.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(e,t){return new Promise(function(r,n){var i,a,o;function s(r){e.removeListener(t,l),n(r)}function l(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}g(e,t,l,{once:!0}),"error"!==t&&(i=e,a=s,o={once:!0},"function"==typeof i.on&&g(i,"error",a,o))})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,n){var i,a,o;if(l(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=n?[r,o]:[o,r]:n?o.unshift(r):o.push(r),(i=c(e))>0&&o.length>i&&!o.warned){o.warned=!0;var s=Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=h.bind(n);return i.listener=r,n.wrapFn=i,i}function d(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var o,s=Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else for(var c=l.length,u=m(l,c),r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,i=a;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return d(this,e,!0)},o.prototype.rawListeners=function(e){return d(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}}}),tJ=d({"src/lib/events.js"(e,t){var r=tK().EventEmitter;t.exports={init:function(e){if(e._ev instanceof r)return e;var t=new r,n=new r;return e._ev=t,e._internalEv=n,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=n.on.bind(n),e._internalOnce=n.once.bind(n),e._removeInternalListener=n.removeListener.bind(n),e._removeAllInternalListeners=n.removeAllListeners.bind(n),e.emit=function(e,r){t.emit(e,r),n.emit(e,r)},"function"==typeof e.addEventListener&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,i=e._ev;if(i){var a=i._events[t];if(a){for(a=Array.isArray(a)?a:[a],n=0;nn.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},i.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},i.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},i.undo=function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=a.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!x(o))return!1;e=a[i][o]}else e=a[i]}else e=a}}return e}function x(e){return e===Math.round(e)&&e>=0}function b(t){var r,n;return r=t,e.crawl(r,function(t,r,n){!e.isValObject(t)&&u(t)&&(t.role="object")}),n=t,e.crawl(n,function(e,t,r){if(e){var n=e[m];n&&(delete e[m],r[t]={items:{}},r[t].items[n]=e,r[t].role="object")}}),!function e(t){for(var r in t)if(u(t[r]))e(t[r]);else if(Array.isArray(t[r]))for(var n=0;n=a&&(i._input||{})._templateitemname;s&&(o=a);var l,c=r+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][n]=s)}function h(e,r){s?t.nestedProperty(l[c],e).set(r):l[c+"."+e]=r}function f(){var e=l;return u(),e}return u(),{modifyBase:function(e,t){l[e]=t},modifyItem:h,getUpdateObj:f,applyUpdate:function(r,n){r&&h(r,n);var i=f();for(var a in i)t.nestedProperty(e,a).set(i[a])}}}}}),t3=d({"src/plots/cartesian/constants.js"(e,t){var r=(eD(),y(eP)).counter;t.exports={idRegex:{x:r("x","( domain)?"),y:r("y","( domain)?")},attrRegex:r("[xy]axis"),xAxisMatch:r("xaxis"),yAxisMatch:r("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),t5=d({"src/plots/cartesian/axis_ids.js"(e){var t=tv(),r=t3();function n(e,t){if(t&&t.length){for(var r=0;rn?1:-1:(e.slice(1)||1)-(t.slice(1)||1)},e.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},e.isLinked=function(e,t){return n(t,e._axisMatchGroups)||n(t,e._axisConstraintGroups)}}}),t4=d({"src/components/shapes/handle_outline.js"(e,t){t.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}}}),t6=d({"src/traces/scatter/layout_attributes.js"(e,t){t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),t8=d({"src/plots/get_data.js"(e){var t=tv();t3().SUBPLOT_PATTERN,e.getSubplotCalcData=function(e,r,n){var i=t.subplotsRegistry[r];if(!i)return[];for(var a=i.attr,o=[],s=0;s0?".":"")+a;r.isPlainObject(s)?o(s,t,l,i+1):t(l,a,s)}})}e.manageCommandObserver=function(t,i,a,o){var s={},l=!0;i&&i._commandObserver&&(s=i._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,a,s.lookupTable);if(i&&i._commandObserver){if(c)return s;if(i._commandObserver.remove)return i._commandObserver.remove(),i._commandObserver=null,s}if(c){n(t,c,s.cache),s.check=function(){if(l){var e=n(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;h1&&z.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,S.linkSubplots(f,l,h,a),S.cleanPlot(f,l,h,a);var B=!!(a._has&&a._has("cartesian")),N=!!(l._has&&l._has("cartesian"));B&&!N?a._bgLayer.remove():N&&!B&&(l._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&p({_fullLayout:a}),function(e,t){var r,n=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var i=0;i0){var h=1-2*s;n=Math.round(h*n),a=Math.round(h*a)}}var f=S.layoutAttributes.width.min,d=S.layoutAttributes.height.min;n1,m=!t.height&&Math.abs(r.height-a)>1;(m||p)&&(p&&(r.width=n),m&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:n,height:a}),S.sanitizeMargins(r)},S.supplyLayoutModuleDefaults=function(e,t,r,n){var i,a,o,l=s.componentsRegistry,c=t._basePlotModules,h=s.subplotsRegistry.cartesian;for(i in l)(o=l[i]).includeBasePlot&&o.includeBasePlot(e,t);for(var f in c.length||c.push(h),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),h.finalizeSubplots(e,t)),t._subplots)t._subplots[f].sort(u.subplotSort);for(a=0;a1&&(r.l/=y,r.r/=y)}if(d){var v=(r.t+r.b)/d;v>1&&(r.t/=v,r.b/=v)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,w=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:w,size:r.b+g},t:{val:_,size:r.t+g}},m[t]=1}else delete p[t],delete m[t];if(!n._replotting)return S.doAutoMargin(e)}},S.doAutoMargin=function(e){var t,r,n=e._fullLayout,a=n.width,o=n.height;n._size||(n._size={}),O(n);var l=n._size,c=n.margin,h={t:0,b:0,l:0,r:0},f=u.extendFlat({},l),p=c.l,m=c.r,g=c.t,y=c.b,v=n._pushmargin,x=n._pushmarginIds,b=n.minreducedwidth,_=n.minreducedheight;if(!1!==c.autoexpand){for(var w in v)x[w]||delete v[w];var k=e._fullLayout._reservedMargin;for(var T in k)for(var A in k[T]){var M=k[T][A];h[A]=Math.max(h[A],M)}for(var E in v.base={l:{val:0,size:p},r:{val:1,size:m},t:{val:1,size:g},b:{val:0,size:y}},h){var C=0;for(var L in v)"base"!==L&&i(v[L][E].size)&&(C=v[L][E].size>C?v[L][E].size:C);var I=Math.max(0,c[E]-C);h[E]=Math.max(0,h[E]-I)}for(var P in v){var z=v[P].l||{},D=v[P].b||{},R=z.val,j=z.size,F=D.val,B=D.size,N=a-h.r-h.l,U=o-h.t-h.b;for(var V in v){if(i(j)&&v[V].r){var q=v[V].r.val,H=v[V].r.size;if(q>R){var G=(j*q+(H-N)*R)/(q-R),W=(H*(1-R)+(j-N)*(1-q))/(q-R);G+W>p+m&&(p=G,m=W)}}if(i(B)&&v[V].t){var Y=v[V].t.val,X=v[V].t.size;if(Y>F){var Z=(B*Y+(X-U)*F)/(Y-F),$=(X*(1-F)+(B-U)*(1-Y))/(Y-F);Z+$>y+g&&(y=Z,g=$)}}}}}var K=u.constrain(a-c.l-c.r,2,b),J=u.constrain(o-c.t-c.b,2,_),Q=Math.max(0,a-K),ee=Math.max(0,o-J);if(Q){var et=(p+m)/Q;et>1&&(p/=et,m/=et)}if(ee){var er=(y+g)/ee;er>1&&(y/=er,g/=er)}if(l.l=Math.round(p)+h.l,l.r=Math.round(m)+h.r,l.t=Math.round(g)+h.t,l.b=Math.round(y)+h.b,l.p=Math.round(c.pad),l.w=Math.round(a)-l.l-l.r,l.h=Math.round(o)-l.t-l.b,!n._replotting&&(S.didMarginChange(f,l)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=d.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in n?n._redrawFromAutoMarginCount++:n._redrawFromAutoMarginCount=1;var en=3*(1+Object.keys(x).length);if(n._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return s.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var a=0,o=0;function l(){return a++,function(){var t;o++,n||o!==a||(t=i,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return s.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(t)))}}r.runFn(l),setTimeout(l())})}],a=u.syncOrAsync(i,e);return a&&a.then||(a=Promise.resolve()),a.then(function(){return e})}S.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},S.graphJson=function(e,t=!1,r="json",n=!1,i=!1){(n&&t&&!e._fullData||n&&!t&&!e._fullLayout)&&S.supplyDefaults(e);var o=n?e._fullData:e.data,s=n?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function c(e,t){if("function"==typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var r={};return Object.keys(e).sort().forEach(function(n){if(-1===["_","["].indexOf(n.charAt(0))){if("function"==typeof e[n]){t&&(r[n]="_function");return}r[n]=c(e[n],t)}}),r}var n=Array.isArray(e),i=u.isTypedArray(e);if((n||i)&&e.dtype&&e.shape){var o=e.bdata;return c({dtype:e.dtype,shape:e.shape,bdata:u.isArrayBuffer(o)?a.encode(o):o},t)}return n?e.map(function(e){return c(e,t)}):i?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var h={data:(o||[]).map(function(e){var r=c(e);return t&&delete r.fit,r})};if(!t&&(h.layout=c(s),n)){var f=s._size;h.layout.computed={margin:{b:f.b,l:f.l,r:f.r,t:f.t}}}return l&&(h.frames=c(l)),i&&(h.config=c(e._context,!0)),"object"===r?h:JSON.stringify(h)},S.modifyFrames=function(e,t){var r,n,i,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;re?e.match(o):null;e.matchTex=s,e.convertToTspans=function(o,p,b){var M=o.text(),S=!o.attr("data-notex")&&p&&p._context.typesetMath&&"u">typeof MathJax&&s(M),L=t.select(o.node().parentNode);if(!L.empty()){var I=o.attr("class")?o.attr("class").split(" ")[0]:"text";return I+="-math",L.selectAll("svg."+I).remove(),L.selectAll("g."+I+"-group").remove(),o.style("display",null).attr({"data-unformatted":M,"data-math":"N"}),S?(p&&p._promises||[]).push(new Promise(function(e){let i;o.style("display","none");var a,s,h,f,d=parseInt(o.node().style.fontSize,10),p={fontSize:d},m=o.attr("text-anchor");a=S[2],s=p,h=function(t,r,i){L.selectAll("svg."+I).remove(),L.selectAll("g."+I+"-group").remove();var a=t&&t.select("svg");if(!a||!a.node()){P(),e();return}o.style("display","none");var s=L.append("g").classed(I+"-group",!0).attr({"pointer-events":"none","data-unformatted":M,"data-math":"Y"});s.node().appendChild(a.node()),r&&r.node()&&a.node().insertBefore(r.node().cloneNode(!0),a.node().firstChild);var l=i.width,c=i.height;a.attr({class:I,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":p.fontSize+"px"});var u=o.node().style.fill||"black",h=a.select("g");h.attr({fill:u,stroke:u});var f=h.node().getBoundingClientRect(),g=f.width,y=f.height;(g>l||y>c)&&(a.style("overflow","hidden"),g=(f=a.node().getBoundingClientRect()).width,y=f.height);var v=+o.attr("x"),x=+o.attr("y"),_=-(d||o.node().getBoundingClientRect().height)/4;"y"===I[0]?s.attr({transform:"rotate("+[-90,v,x]+")"+n(-g/2,_-y/2)}):"l"===I[0]?x=_-y/2:"a"===I[0]&&0!==I.indexOf("atitle")?(v=0,x=_):(v-=g*("middle"===m?.5:+("end"===m)),x=x+_-y/2),a.attr({x:v,y:x}),b&&b.call(o,s),e(s)},3!==(i=parseInt((MathJax.version||"").split(".")[0]))&&4!==i?r.warn("Unsupported MathJax version:",MathJax.version):Promise.resolve().then(function(){if(!u){let e=MathJax._.output.svg_ts.SVG,t=r.extendFlat({},MathJax.config.svg,{fontCache:"local"});4===i&&(t.linebreaks=r.extendFlat({},t.linebreaks,{inline:!1})),u=MathJax._.mathjax.mathjax.document(document,r.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new e(t)}))}let e="math-output-"+r.randstr({},64);f=t.select("body").append("div").attr({id:e}).style({visibility:"hidden",position:"absolute","font-size":s.fontSize+"px"});let n=a.replace(l,"\\lt ").replace(c,"\\gt ").replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return u.convert(n,{display:!1})}).then(function(e){f.node().appendChild(e)})}).then(function(){let e=f.select(".MathJax"),t=!e.empty()&&f.select("svg").node();if(t){let r=t.getBoundingClientRect(),n=e.select("defs");h(e,n,r)}else r.log("There was an error in the tex syntax.",a),h();f.remove()}).catch(e=>{r.log("MathJax typesetting failed.",a,e),f&&f.remove(),h()})})):P(),o}function P(){L.empty()||(I=o.attr("class")+"-math",L.select("svg."+I).remove()),o.text("").style("white-space","pre"),function(e,n){n=n.replace(m," ");var o,s=!1,l=[],c=-1;function u(){c++;var r=document.createElementNS(i.svg,"tspan");t.select(r).attr({class:"line",dy:c*a+"em"}),e.appendChild(r),o=r;var n=l;if(l=[{node:r}],n.length>1)for(var s=1;s.",n);var t=l.pop();e!==t.type&&r.log("Start tag <"+t.type+"> doesnt match end tag <"+e+">. Pretending it did match.",n),o=l[l.length-1].node}(P);else{var O=I[4],D={type:P},R=T(O,x);if(R?(R=R.replace(A,"$1 fill:"),z&&(R+=";"+z)):z&&(R=z),R&&(D.style=R),"a"===P){s=!0;var j=T(O,_);if(j){var F=C(j);F&&(D.href=F,D.target=T(O,w)||"_blank",D.popup=T(O,k))}}p(D)}}return s}(o.node(),M)&&o.style("pointer-events","all"),e.positionText(o),b&&b.call(o)}};var l=/(<|<|<)/g,c=/(>|>|>)/g,u=null,h={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",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"},d={sub:"-0.21em",sup:"0.42em"},p=["http:","https:","mailto:","",void 0,":"],m=e.NEWLINES=/(\r\n?|\n)/g,g=/(<[^<>]*>)/,y=/<(\/?)([^ >]*)(\s+(.*))?>/i,v=//i;e.BR_TAG_ALL=//gi;var x=/(^|[\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(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&E(n)}var A=/(^|;)\s*color:/;e.plainText=function(e,t){t=t||{};for(var r=void 0!==t.len&&-1!==t.len?t.len:1/0,n=void 0!==t.allowedTags?t.allowedTags:["br"],i=e.split(g),a=[],o="",s=0,l=0;l3?a.push(c.slice(0,Math.max(0,d-3))+"..."):a.push(c.slice(0,d));break}o=""}}return a.join("")};var M={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},S=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(e){return e.replace(S,function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.slice(2),16):parseInt(t.slice(1),10)):M[t])||e})}function C(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),n=document.createElement("a");r.href=e,n.href=t;var i=r.protocol,a=n.protocol;return -1!==p.indexOf(i)&&-1!==p.indexOf(a)?t:""}function L(e,t,n){var i,a,o,s=n.horizontalAlign,l=n.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-i.height}:"middle"===l?function(){return c.top+(c.height-i.height)/2}:function(){return c.top},o="right"===s?function(){return c.right-i.width}:"center"===s?function(){return c.left+(c.width-i.width)/2}:function(){return c.left},function(){i=this.node().getBoundingClientRect();var e=o()-u.left,t=a()-u.top,s=n.gd||{};if(n.gd){s._fullLayout._calcInverseTransform(s);var l=r.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}e.convertEntities=E,e.sanitizeHTML=function(e){e=e.replace(m," ");for(var r=document.createElement("p"),n=r,i=[],a=e.split(g),o=0;o=0;n--,i++){var a=e[n];r[i]=[1-a[0],a[1]]}return r}function f(e,t){t=t||{};for(var i=e.domain,o=e.range,s=o.length,l=Array(s),c=0;cm-d?d=m-(p-m):p-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}}}),rw=d({"src/components/colorscale/index.js"(e,t){var r=eL(),n=rn();t.exports={moduleType:"component",name:"colorscale",attributes:rs(),layoutAttributes:rl(),supplyLayoutDefaults:rx(),handleDefaults:rv(),crossTraceDefaults:rb(),calc:r_(),scales:r.scales,defaultScale:r.defaultScale,getScale:r.get,isValidScale:r.isValid,hasColorscale:n.hasColorscale,extractOpts:n.extractOpts,extractScale:n.extractScale,flipScale:n.flipScale,makeColorScaleFunc:n.makeColorScaleFunc,makeColorScaleFuncFromTrace:n.makeColorScaleFuncFromTrace}}}),rk=d({"src/traces/scatter/subtypes.js"(e,t){var r=tY(),n=L().isTypedArraySpec;t.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){var t=e.marker;return r.isPlainObject(t)&&(r.isArrayOrTypedArray(t.size)||n(t.size))}}}}),rT=d({"src/traces/scatter/make_bubble_size_func.js"(e,t){var r=A();t.exports=function(e,t){t||(t=2);var n=e.marker,i=n.sizeref||1,a=n.sizemin||0,o="area"===n.sizemode?function(e){return Math.sqrt(e/i)}:function(e){return e/i};return function(e){var n=o(e/t);return r(n)&&n>0?Math.max(n,a):0}}}}),rA=d({"src/components/fx/helpers.js"(e){var t=tY();e.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var n=t.xaxes||[],i=t.yaxes||[],a=0;a=0&&r.index2&&(t.push([n].concat(a.splice(0,2))),s="l",n="m"==n?"l":"L");;){if(a.length==r[s])return a.unshift(n),t.push(a);if(a.length=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}S.symbolNumber=function(e){if(d(e))e*=1;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=S.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=P||e>=400?0:Math.floor(Math.max(e,0))};var O=f("~f"),D={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function R(e,t,r,n,i,a,o,s,l,c){var f,d=i.length;"linear"===n?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:c}:"radial"===n&&(f={node:"radialGradient",reversed:c});for(var p=Array(d),g=0;g=0&&void 0===e.i&&(e.i=a.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):void 0===e.mo?o.opacity:e.mo),n.ms2mrc){l="various"===e.ms||"various"===o.size?3:n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var l,c=S.symbolNumber(e.mx||o.symbol)||0;e.om=c%200>=100;var u=en(e,r),f=J(e,r);t.attr("d",z(c,l,u,f))}var d,p,g,y=!1;if(e.so)g=s.outlierwidth,p=s.outliercolor,d=o.outliercolor;else{var v=(s||{}).width;g=(e.mlw+1||v+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,p="mlc"in e?e.mlcc=n.lineScale(e.mlc):h.isArrayOrTypedArray(s.color)?m.defaultLine:s.color,h.isArrayOrTypedArray(o.color)&&(d=m.defaultLine,y=!0),d="mc"in e?e.mcc=n.markerScale(e.mc):o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(d=n.selectedColorFn(e))}let x=e.mld||(s||{}).dash;if(x&&S.dashLine(t,x,g),e.om)t.call(m.stroke,d).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=o.gradient,_=e.mgt;_?y=!0:_=b&&b.type,h.isArrayOrTypedArray(_)&&(D[_=_[0]]||(_=0));var w=o.pattern,k=S.getPatternAttr,T=w&&(k(w.shape,e.i,"")||k(w.path,e.i,""));if(_&&"none"!==_){var A=e.mgc;A?y=!0:A=b.color;var M=r.uid;y&&(M+="-"+e.i),S.gradient(t,i,M,_,[[0,A],[1,d]],"fill")}else if(T){var E=!1,C=w.fgcolor;!C&&a&&a.color&&(C=a.color,E=!0);var L=k(C,e.i,a&&a.color||null),I=k(w.bgcolor,e.i,null),P=w.fgopacity,O=k(w.size,e.i,8),R=k(w.solidity,e.i,.3);E=E||e.mcc||h.isArrayOrTypedArray(w.shape)||h.isArrayOrTypedArray(w.path)||h.isArrayOrTypedArray(w.bgcolor)||h.isArrayOrTypedArray(w.fgcolor)||h.isArrayOrTypedArray(w.size)||h.isArrayOrTypedArray(w.solidity);var j=r.uid;E&&(j+="-"+e.i),S.pattern(t,"point",i,j,T,O,R,e.mcc,w.fillmode,I,L,P)}else h.isArrayOrTypedArray(d)?m.fill(t,d[e.i]):m.fill(t,d);g&&m.stroke(t,p)}},S.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=S.tryColorscale(r,""),t.lineScale=S.tryColorscale(r,"line"),p.traceIs(e,"symbols")&&(t.ms2mrc=k.isBubble(e)?T(e):function(){return(r.size||6)/2}),e.selectedpoints&&h.extendFlat(t,S.makeSelectedPointStyleFns(e)),t},S.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.marker||{},a=r.marker||{},o=n.marker||{},s=i.opacity,l=a.opacity,c=o.opacity,u=void 0!==l,f=void 0!==c;(h.isArrayOrTypedArray(s)||u||f)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?i.opacity:e.mo;return e.selected?u?l:t:f?c:w*t});var d=i.color,m=a.color,g=o.color;(m||g)&&(t.selectedColorFn=function(e){var t=e.mcc||d;return e.selected?m||t:g||t});var y=i.size,v=a.size,x=o.size,b=void 0!==v,_=void 0!==x;return p.traceIs(e,"symbols")&&(b||_)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?b?v/2:t:_?x/2:t}),t},S.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},i=e.textfont||{},a=r.textfont||{},o=n.textfont||{},s=i.color,l=a.color,c=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:c||(l?t:m.addOpacity(t,w))},t},S.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=S.makeSelectedPointStyleFns(t),n=t.marker||{},i=[];r.selectedOpacityFn&&i.push(function(e,t){e.style("opacity",r.selectedOpacityFn(t))}),r.selectedColorFn&&i.push(function(e,t){m.fill(e,r.selectedColorFn(t))}),r.selectedSizeFn&&i.push(function(e,i){var a=i.mx||n.symbol||0,o=r.selectedSizeFn(i);e.attr("d",z(S.symbolNumber(a),o,en(i,t),J(i,t))),i.mrc2=o}),i.length&&e.each(function(e){for(var t=u.select(this),r=0;r0?r:0}function N(e,t,r){return r&&(e=W(e)),t?V(e[1]):U(e[0])}function U(e){var t=u.round(e,2);return r=t,t}function V(e){var t=u.round(e,2);return n=t,t}function q(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,h=(c*c*a-l*l*s)*n,f=3*c*(l+c),d=3*l*(l+c);return[[U(t[0]+(f&&u/f)),V(t[1]+(f&&h/f))],[U(t[0]-(d&&u/d)),V(t[1]-(d&&h/d))]]}S.textPointStyle=function(e,t,r){if(e.size()){if(t.selectedpoints){var n;n=S.makeSelectedTextStyleFns(t).selectedTextColorFn}var i=t.texttemplate,a=r._fullLayout;e.each(function(e){var o=u.select(this),s=i?h.extractOption(e,t,"txt","texttemplate"):h.extractOption(e,t,"tx","text");if(!s&&0!==s)return void o.remove();if(i){var l=t._module.formatLabels,c=l?l(e,t,a):{},f={};M(f,t,e.i),s=h.texttemplateString({data:[f,e,t._meta],fallback:t.texttemplatefallback,labels:c,locale:a._d3locale,template:s})}var d=e.tp||t.textposition,p=B(e,t),m=n?n(e):e.tc||t.textfont.color;o.call(S.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:p,color:m}).text(s).call(v.convertToTspans,r).call(F,d,p,e.mrc)})}},S.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=S.makeSelectedTextStyleFns(t);e.each(function(e){var n=u.select(this),i=r.selectedTextColorFn(e),a=e.tp||t.textposition,o=B(e,t);m.fill(n,i);var s=p.traceIs(t,"bar-like");F(n,a,o,e.mrc2||e.mrc,s)})}},S.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,n="M"+e[0],i=[];for(r=1;r=u||_>=d&&_<=u)&&(w<=p&&w>=f||w>=p&&w<=f)&&(e=[_,w])}return e}S.steps=function(e){var t=H[e]||G;return function(e){for(var r="M"+U(e[0][0])+","+V(e[0][1]),n=e.length,i=1;i=1e4&&(S.savedBBoxes={},Y=0),r&&(S.savedBBoxes[r]=m),Y++,h.extendFlat({},m)},S.setClipUrl=function(e,t,r){e.attr("clip-path",Z(t,r))},S.getTranslate=function(e){var t=e.attr?"attr":"getAttribute",r=(e[t]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(e,t,r){return[t,r].join(" ")}).split(" ");return{x:+r[0]||0,y:+r[1]||0}},S.setTranslate=function(e,t,r){var n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",a=e[n]("transform")||"";return t=t||0,r=r||0,a=(a=a.replace(/(\btranslate\(.*?\);?)/,"").trim()+y(t,r)).trim(),e[i]("transform",a),a},S.getScale=function(e){var t=e.attr?"attr":"getAttribute",r=(e[t]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(e,t,r){return[t,r].join(" ")}).split(" ");return{x:+r[0]||1,y:+r[1]||1}},S.setScale=function(e,t,r){var n=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",a=e[n]("transform")||"";return t=t||1,r=r||1,a=(a=a.replace(/(\bscale\(.*?\);?)/,"").trim()+("scale("+t+","+r)+")").trim(),e[i]("transform",a),a};var $=/\s*sc.*/;S.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var n=1===t&&1===r?"":"scale("+t+","+r+")";e.each(function(){var e=(this.getAttribute("transform")||"").replace($,"");e+=n,e=e.trim(),this.setAttribute("transform",e)})}};var K=/translate\([^)]*\)\s*$/;function J(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}S.setTextPointsScale=function(e,t,r){e&&e.each(function(){var e,n=u.select(this),i=n.select("text");if(i.node()){var a=parseFloat(i.attr("x")||0),o=parseFloat(i.attr("y")||0),s=(n.attr("transform")||"").match(K);e=1===t&&1===r?[]:[y(a,o),"scale("+t+","+r+")",y(-a,-o)],s&&e.push(s),n.attr("transform",e.join(""))}})},S.getMarkerStandoff=J;var Q=Math.atan2,ee=Math.cos,et=Math.sin;function er(e,t){var r=t[0],n=t[1];return[r*ee(e)-n*et(e),r*et(e)+n*ee(e)]}function en(e,t){var r=e.ma;void 0===r&&(!d(r=t.marker.angle)||h.isArrayOrTypedArray(r))&&(r=0);var n,u,f=t.marker.angleref;if("previous"===f||"north"===f){if(t._geo){var p=t._geo.project(e.lonlat);n=p[0],u=p[1]}else{var m=t._xA,g=t._yA;if(!m||!g)return 90;n=m.c2p(e.x),u=g.c2p(e.y)}if(t._geo){var y,v=e.lonlat[0],x=e.lonlat[1],b=t._geo.project([v,x+1e-5]),_=t._geo.project([v+1e-5,x]),w=Q(_[1]-u,_[0]-n),k=Q(b[1]-u,b[0]-n);if("north"===f)y=r/180*Math.PI;else if("previous"===f){var T=x/180*Math.PI,A=a/180*Math.PI,M=i/180*Math.PI-v/180*Math.PI;y=-Q(ee(A)*et(M),et(A)*ee(T)-ee(A)*et(T)*ee(M))-Math.PI,i=v,a=x}var S=er(w,[ee(y),0]),E=er(k,[et(y),0]);r=Q(S[1]+E[1],S[0]+E[0])/Math.PI*180,"previous"===f&&(c!==t.uid||e.i!==l+1)&&(r=null)}if("previous"===f&&!t._geo)if(c===t.uid&&e.i===l+1&&d(n)&&d(u)){var C=n-o,L=u-s,I=t.line&&t.line.shape||"",P=I.slice(I.length-1);"h"===P&&(L=0),"v"===P&&(C=0),r+=Q(L,C)/Math.PI*180+90}else r=null}return o=n,s=u,l=e.i,c=t.uid,r}S.getMarkerAngle=en}}),rC=d({"src/components/titles/index.js"(e,t){var r=b(),n=A(),i=t7(),a=tv(),o=tY(),s=o.strTranslate,l=rE(),c=eC(),u=rr(),h=eI(),f=rt().OPPOSITE_SIDE,d=/ [XY][0-9]* /;t.exports={draw:function(e,t,p){var m,g=e._fullLayout,y=p.propContainer,v=p.propName,x=p.placeholder,b=p.traceIndex,_=p.avoid||{},w=p.attributes,k=p.transform,T=p.containerGroup,A=1,M=y.title,S=(M&&M.text?M.text:"").trim(),E=!1,C=M&&M.font?M.font:{},L=C.family,I=C.size,P=C.color,z=C.weight,O=C.style,D=C.variant,R=C.textcase,j=C.lineposition,F=C.shadow,B=!!p.subtitlePropName,N=p.subtitlePlaceholder,U=(y.title||{}).subtitle||{text:"",font:{}},V=(U.text||"").trim(),q=!1,H=1,G=U.font,W=G.family,Y=G.size,X=G.color,Z=G.weight,$=G.style,K=G.variant,J=G.textcase,Q=G.lineposition,ee=G.shadow;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":-1!==v.indexOf("colorbar")&&(m="colorbarTitleText");var et=e._context.edits[m];function er(e,t){return void 0!==e&&void 0!==t&&e.replace(d," % ")===t.replace(d," % ")}""===S?A=0:er(S,x)&&(et||(S=""),A=.2,E=!0),B&&(""===V?H=0:er(V,N)&&(et||(V=""),H=.2,q=!0)),p._meta?S=o.templateString(S,p._meta):g._meta&&(S=o.templateString(S,g._meta));var en,ei=S||V||et;T||(T=o.ensureSingle(g._infolayer,"g","g-"+t),en=g._hColorbarMoveTitle);var ea=T.selectAll("text."+t).data(ei?[0]:[]);ea.enter().append("text"),ea.text(S).attr("class",t),ea.exit().remove();var eo=null,es=t+"-subtitle",el=V||et;if(B&&((eo=T.selectAll("text."+es).data(el?[0]:[])).enter().append("text"),eo.text(V).attr("class",es),eo.exit().remove()),!ei)return T;function ec(e,t){o.syncOrAsync([eu,eh],{title:e,subtitle:t})}function eu(n){var a,h=n.title,f=n.subtitle;if(!k&&en&&(k={}),k?(a="",k.rotate&&(a+="rotate("+[k.rotate,w.x,w.y]+")"),(k.offset||en)&&(a+=s(0,(k.offset||0)-(en||0)))):a=null,h.attr("transform",a),h.style("opacity",A*c.opacity(P)).call(l.font,{color:c.rgb(P),size:r.round(I,2),family:L,weight:z,style:O,variant:D,textcase:R,shadow:F,lineposition:j}).attr(w).call(u.convertToTspans,e,function(e){if(e){var t=r.select(e.node().parentNode).select("."+es);if(!t.empty()){var n=e.node().getBBox();if(n.height){var i=n.y+n.height+1.6*Y;t.attr("y",i)}}}}),f&&!f.empty()){var d=T.select("."+t+"-math-group"),p=h.node().getBBox(),m=d.node()?d.node().getBBox():void 0,g=m?m.y+m.height+1.6*Y:p.y+p.height+1.6*Y,y=o.extendFlat({},w,{y:g});f.attr("transform",a),f.style("opacity",H*c.opacity(X)).call(l.font,{color:c.rgb(X),size:r.round(Y,2),family:W,weight:Z,style:$,variant:K,textcase:J,shadow:ee,lineposition:Q}).attr(y).call(u.convertToTspans,e)}return i.previousPromises(e)}function eh(t){var i=t.title,a=r.select(i.node().parentNode);if(_&&_.selection&&_.side&&S){a.attr("transform",null);var c=f[_.side],u="left"===_.side||"top"===_.side?-1:1,h=n(_.pad)?_.pad:2,d=l.bBox(a.node()),p={t:0,b:0,l:0,r:0},m=e._fullLayout._reservedMargin;for(var v in m)for(var x in m[v]){var b=m[v][x];p[x]=Math.max(p[x],b)}var w={left:p.l,top:p.t,right:g.width-p.r,bottom:g.height-p.b},k=_.maxShift||u*(w[_.side]-d[_.side]),T=0;if(k<0)T=k;else{var A=_.offsetLeft||0,M=_.offsetTop||0;d.left-=A,d.right-=A,d.top-=M,d.bottom-=M,_.selection.each(function(){var e=l.bBox(this);o.bBoxIntersect(d,e,h)&&(T=Math.max(T,u*(e[_.side]-d[c])+h))}),y._titleScoot=Math.abs(T=Math.min(k,T))}if(T>0||k<0){var E={left:[-T,0],right:[T,0],top:[0,-T],bottom:[0,T]}[_.side];a.attr("transform",s(E[0],E[1]))}}}function ef(e,t){e.text(t).on("mouseover.opacity",function(){r.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})}if(ea.call(ec,eo),et&&(S?ea.on(".opacity",null):(ef(ea,x),E=!0),ea.call(u.makeEditable,{gd:e}).on("edit",function(t){void 0!==b?a.call("_guiRestyle",e,v,t,b):a.call("_guiRelayout",e,v,t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ec)}).on("input",function(e){this.text(e||" ").call(u.positionText,w.x,w.y)}),B)){if(B&&!S){var ed=ea.node().getBBox(),ep=ed.y+ed.height+1.6*Y;eo.attr("y",ep)}V?eo.on(".opacity",null):(ef(eo,N),q=!0),eo.call(u.makeEditable,{gd:e}).on("edit",function(t){a.call("_guiRelayout",e,"title.subtitle.text",t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ec)}).on("input",function(e){this.text(e||" ").call(u.positionText,eo.attr("x"),eo.attr("y"))})}return ea.classed("js-placeholder",E),eo&&!eo.empty()&&eo.classed("js-placeholder",q),T},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}}}),rL=d({"src/plots/cartesian/set_convert.js"(e,t){var r=b(),n=w().utcFormat,i=tY(),a=i.numberFormat,o=A(),s=i.cleanNumber,l=i.ms2DateTime,c=i.dateTime2ms,u=i.ensureNumber,h=i.isArrayOrTypedArray,f=M(),d=f.FP_SAFE,p=f.BADNUM,m=f.LOG_CLIP,g=f.ONEWEEK,y=f.ONEDAY,v=f.ONEHOUR,x=f.ONEMIN,_=f.ONESEC,k=t5(),T=t3(),S=T.HOUR_PATTERN,E=T.WEEKDAY_PATTERN;function C(e){return Math.pow(10,e)}t.exports=function(e,t){t=t||{};var f=e._id||"x",b=f.charAt(0);function w(t,r){if(t>0)return Math.log(t)/Math.LN10;if(!(t<=0)||!r||!e.range||2!==e.range.length)return p;var n=e.range[0],i=e.range[1];return .5*(n+i-2*m*Math.abs(n-i))}function A(t,r,n,a){if((a||{}).msUTC&&o(t))return+t;var s=c(t,n||e.calendar);if(s===p)if(!o(t))return p;else{t*=1;var l=Math.floor(10*i.mod(t+.05,1));s=c(new Date(Math.round(t-l/10)))+l/10}return s}function M(t,r,n){return l(t,r,n||e.calendar)}function L(t){return e._categories[Math.round(t)]}function I(t){if(null!=t){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return p}function P(t){if(e._categoriesMap)return e._categoriesMap[t]}function z(e){var t=P(e);return void 0!==t?t:o(e)?+e:void 0}function O(e){return o(e)?+e:P(e)}function D(e,t,n){return r.round(n+t*e,2)}var R=function(t){return o(t)?D(t,e._m,e._b):p},j=function(t){var r;return r=e._m,(t-e._b)/r};if(e.rangebreaks){var F="y"===b;R=function(t){if(!o(t))return p;var r=e._rangebreaks.length;if(!r)return D(t,e._m,e._b);var n=F;e.range[0]>e.range[1]&&(n=!n);for(var i=n?-1:1,a=i*t,s=0,l=0;lu)s=l+1;else{s=a<(c+u)/2?l:l+1;break}}var h=e._B[s]||0;return isFinite(h)?D(t,e._m2,h):0},j=function(t){var r,n,i=e._rangebreaks.length;if(!i)return r=e._m,(t-e._b)/r;for(var a=0,o=0;oe._rangebreaks[o].pmax&&(a=o+1);return n=e._m2,(t-e._B[a])/n}}e.c2l="log"===e.type?w:u,e.l2c="log"===e.type?C:u,e.l2p=R,e.p2l=j,e.c2p="log"===e.type?function(e,t){return R(w(e,t))}:R,e.p2c="log"===e.type?function(e){return C(j(e))}:j,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=u,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=j,e.cleanPos=u):"log"===e.type?(e.d2r=e.d2l=function(e,t){return w(s(e),t)},e.r2d=e.r2c=function(e){return C(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=u,e.c2r=w,e.l2d=C,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return C(j(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=j,e.cleanPos=u):"date"===e.type?(e.d2r=e.r2d=i.identity,e.d2c=e.r2c=e.d2l=e.r2l=A,e.c2d=e.c2r=e.l2d=e.l2r=M,e.d2p=e.r2p=function(t,r,n){return e.l2p(A(t,0,n))},e.p2d=e.p2r=function(e,t,r){return M(j(e),t,r)},e.cleanPos=function(t){return i.cleanDate(t,p,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=I,e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=z,e.r2c=function(t){var r=O(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=u,e.r2l=O,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:u(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=z,e.r2c=function(t){var r=z(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=P,e.l2r=e.c2r=u,e.r2l=z,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(j(e))},e.r2p=e.d2p,e.p2r=j,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:u(e)},e.setupMultiCategory=function(r){var n,a,o=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length){for(var l in s)if(l!==f){var c=t[k.id2name(l)];o=o.concat(c._traceIndices)}}var u=[[0,{}],[0,{}]],d=[];for(n=0;nl[1]&&(a[+!s]=n,o[1]=l[1]),o[0]>=o[1])if(void 0!==r){var c=l[0]+1;void 0!==n&&(c=Math.min(c,l[1])),a[+!s]=e.l2r(c)}else void 0!==n&&(a[+!!s]=e.l2r(l[1]-1))}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var n,a,s=i.nestedProperty(e,t).get();if(a=(a="date"===e.type?i.dfltRange(e.calendar):"y"===b?T.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||T.DFLTRANGEX).slice(),("tozero"===e.rangemode||"nonnegative"===e.rangemode)&&(a[0]=0),!s||2!==s.length)return void i.nestedProperty(e,t).set(a);var l=null===s[0],c=null===s[1];for("date"!==e.type||e.autorange||(s[0]=i.cleanDate(s[0],p,e.calendar),s[1]=i.cleanDate(s[1],p,e.calendar)),n=0;n<2;n++)if("date"===e.type){if(!i.isDateTime(s[n],e.calendar)){e[t]=a;break}if(e.r2l(s[0])===e.r2l(s[1])){var u=i.constrain(e.r2l(s[0]),i.MIN_MS+1e3,i.MAX_MS-1e3);s[0]=e.l2r(u-1e3),s[1]=e.l2r(u+1e3);break}}else{if(!o(s[n]))if(!(l||c)&&o(s[1-n]))s[n]=s[1-n]*(n?10:.1);else{e[t]=a;break}if(s[n]<-d?s[n]=-d:s[n]>d&&(s[n]=d),s[0]===s[1]){var h=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=h,s[1]+=h}}},e.setScale=function(r){var n,i,a=t._size;if(e.overlaying){var o=k.getFromId({_fullLayout:t},e.overlaying);e.domain=o.domain}var s=r&&e._r?"_r":"range",l=e.calendar;e.cleanRange(s);var c=e.r2l(e[s][0],l),u=e.r2l(e[s][1],l),h="y"===b;if(h?(e._offset=a.t+(1-e.domain[1])*a.h,e._length=a.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=a.l+e.domain[0]*a.w,e._length=a.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(n=0;nu&&(f=!f),f&&e._rangebreaks.reverse();var d=f?-1:1;for(e._m2=d*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(h?u:c)),n=0;na&&(a+=7,oa&&(a+=24,o=n&&o=n&&t=s.min&&(es.max&&(s.max=n),a=!1)}a&&c.push({min:e,max:n})}};for(n=0;n2*s}(h,t))return"date";var g="strict"!==n.autotypenumbers;return!function(e,t){for(var r=e.length,n=c(r),a=0,o=0,u={},h=0;h2*a}(h,g)?!function(e,t){for(var n,i=e.length,a=0;a0&&((A=L-s(b)-l(w))>I?M/A>P&&(k=b,T=w,P=M/A):M/L>P&&(k={val:b.val,nopad:1},T={val:w.val,nopad:1},P=M/L));if(m===g){var z=m-1,O=m+1;if(E)if(0===m)a=[0,1];else{var D=(m>0?h:u).reduce(function(e,t){return Math.max(e,l(t))},0),R=m/(1-Math.min(.5,D/L));a=m>0?[0,R]:[R,0]}else a=C?[Math.max(0,z),Math.max(1,O)]:[z,O]}else E?(k.val>=0&&(k={val:0,nopad:1}),T.val<=0&&(T={val:0,nopad:1})):C&&(k.val-P*s(k)<0&&(k={val:0,nopad:1}),T.val<=0&&(T={val:1,nopad:1})),P=(T.val-k.val-f(t,b.val,w.val))/(L-s(k)-l(T)),a=[k.val-P*s(k),T.val+P*l(T)];return a=_(a,t),t.limitRange&&t.limitRange(),v&&a.reverse(),i.simpleMap(a,t.l2r||Number)}function f(e,t,r){var n=0;if(e.rangebreaks)for(var i=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),E=M((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=M(r.vpadplus||r.vpad),L=M(r.vpadminus||r.vpad);if(!T){if(f=1/0,d=-1/0,k)for(i=0;i0&&(f=o),o>d&&o-a&&(f=o),o>d&&o=z;i--)P(i);return{min:p,max:x,opts:r}},concatExtremes:p};function m(e,t,r,n,i){for(var a=n.tozero,o=n.extrapad,s=!0,l=0;l=r&&(c.extrapad||!o)){s=!1;break}i(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=a&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function g(e){return n(e)&&Math.abs(e)=t}function x(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))<(r=e.d2l(r))}function _(e,t){if(!t||!t.autorangeoptions)return e;var r,n,a,o,s=e[0],l=e[1],c=t.autorangeoptions.include;if(void 0!==c){var u=t.d2l(s),h=t.d2l(l);i.isArrayOrTypedArray(c)||(c=[c]);for(var f=0;f=d&&(u=d,s=d),h<=d&&(h=d,l=d)}}return r=s,s=(n=t.autorangeoptions)&&void 0!==n.minallowed&&x(t,n.minallowed,n.maxallowed)?n.minallowed:n&&void 0!==n.clipmin&&x(t,n.clipmin,n.clipmax)?Math.max(r,t.d2l(n.clipmin)):r,a=l,[s,l=(o=t.autorangeoptions)&&void 0!==o.maxallowed&&x(t,o.minallowed,o.maxallowed)?o.maxallowed:o&&void 0!==o.clipmax&&x(t,o.clipmin,o.clipmax)?Math.min(a,t.d2l(o.clipmax)):a]}}}),rz=d({"src/plots/cartesian/axes.js"(e,t){var r=b(),n=A(),i=t7(),a=tv(),o=tY(),s=o.strTranslate,l=rr(),c=rC(),u=eC(),h=rE(),f=ra(),d=ru(),p=(t3(),M()),m=p.ONEMAXYEAR,g=p.ONEAVGYEAR,y=p.ONEMINYEAR,v=p.ONEMAXQUARTER,x=p.ONEAVGQUARTER,_=p.ONEMINQUARTER,w=p.ONEMAXMONTH,k=p.ONEAVGMONTH,T=p.ONEMINMONTH,S=p.ONEWEEK,E=p.ONEDAY,C=E/2,L=p.ONEHOUR,I=p.ONEMIN,P=p.ONESEC,z=p.ONEMILLI,O=p.ONEMICROSEC,D=p.MINUS_SIGN,R=p.BADNUM,j={K:"zeroline"},F={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},U={K:"tick",L:"text"},V={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},q=rt(),H=q.MID_SHIFT,G=q.CAP_SHIFT,W=q.LINE_SPACING,Y=q.OPPOSITE_SIDE,X=t.exports={};X.setConvert=rL();var Z=rI(),$=t5(),K=$.idSort,J=$.isLinked;X.id2name=$.id2name,X.name2id=$.name2id,X.cleanId=$.cleanId,X.list=$.list,X.listIds=$.listIds,X.getFromId=$.getFromId,X.getFromTrace=$.getFromTrace;var Q=rP();function ee(e){var t=(e[1]-e[0])*1e-4;return[e[0]-t,e[1]+t]}X.getAutoRange=Q.getAutoRange,X.findExtremes=Q.findExtremes,X.coerceRef=function(e,t,r,n,i,a){var s=n.charAt(n.length-1),l=r._fullLayout._subplots[s+"axis"],c=n+"ref",u={};return i||(i=l[0]||("string"==typeof a?a:a[0])),a||(a=i),l=l.concat(l.map(function(e){return e+" domain"})),u[c]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:i},o.coerce(e,t,u,c)},X.coerceRefArray=function(e,t,r,n,i,a,s){let l=n.charAt(n.length-1);var c=r._fullLayout._subplots[l+"axis"];let u=n+"ref";var h=e[u];i||(i=c[0]||("string"==typeof a?a:a[0])),c=(c=c.concat(c.map(e=>e+" domain"))).concat(a||[]),h.length>s?(o.warn("Array attribute "+u+" has more entries than expected, truncating to "+s),h=h.slice(0,s)):h.lengthMath.abs((e/t+.5)%1-.5)}function ea(e,t){return .001>Math.abs(e/t-1)}function eo(e){return+e.substring(1)}function es(e,t){return e.rangebreaks&&(t=t.filter(function(t){return e.maskBreaks(t.x)!==R})),t}function el(e,t){var r=ee(o.simpleMap(e.range,e.r2l)),n=Math.min(r[0],r[1]),i=Math.max(r[0],r[1]),a="category"===e.type?e.d2l_noadd:e.d2l;"log"===e.type&&"L"!==String(e.dtick).charAt(0)&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var s=[],l=0;l<=1;l++)if(!(void 0!==t&&(t&&l||!1===t&&!l))&&!(l&&!e.minor)){var c=l?e.minor.tickvals:e.tickvals,u=l?[]:e.ticktext;if(c){o.isArrayOrTypedArray(u)||(u=[]);var h=-1,f=-1;if(!l)for(var d=0;dn&&pn&&g2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},X.saveRangeInitial=function(e,t){for(var r=X.list(e,"",!0),n=!1,i=0;i.3*f||u(i)||u(a))){var d=r.dtick/2;e+=e+d.8){var s=Number(r.slice(1));a.exactYears>.8&&s%12==0?e=X.tickIncrement(e,"M6","reverse")+1.5*E:a.exactMonths>.8?e=X.tickIncrement(e,"M1","reverse")+15.5*E:e-=C;var l=X.tickIncrement(e,r);if(l<=n)return l}return e}(v,e,y,l,a)),m=v,g=0;m<=c;)m=X.tickIncrement(m,y,!1,a),g++;return{start:t.c2r(v,0,a),end:t.c2r(m,0,a),size:y,_dataSpan:c-l}},X.prepMinorTicks=function(e,t,r){var i,a;if(!(null!=(i=t.minor)&&i.dtick)){delete e.dtick;var s,l=t.dtick&&n(t._tmin);if(l){var c=X.tickIncrement(t._tmin,t.dtick,!0);s=[t._tmin,.99*c+.01*t._tmin]}else{var u=o.simpleMap(t.range,t.r2l);s=[u[0],.8*u[0]+.2*u[1]]}if(e.range=o.simpleMap(s,t.l2r),e._isMinor=!0,X.prepTicks(e,r),l){var h=n(t.dtick),f=n(e.dtick),d=h?t.dtick:+t.dtick.substring(1),p=f?e.dtick:+e.dtick.substring(1);h&&f?ei(d,p)?d===2*S&&p===2*E&&(e.dtick=S):d===2*S&&p===3*E?e.dtick=S:d!==S||(t._input.minor||{}).nticks?ea(d/p,2.5)?e.dtick=d/2:e.dtick=d:e.dtick=E:"M"===String(t.dtick).charAt(0)?f?e.dtick="M1":ei(d,p)?d>=12&&2===p&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?ei(d,p)||(e.dtick=ea(d/p,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}(null==(a=t.minor)?void 0:a._tick0Init)===void 0&&(e.tick0=t.tick0)},X.prepTicks=function(e,t){var r=o.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var i,a=e.nticks;a||("category"===e.type||"multicategory"===e.type?(i=e.tickfont?o.bigFont(e.tickfont.size||12):15,a=e._length/i):(i="y"===e._id.charAt(0)?40:80,a=o.constrain(e._length/i,4,9)+1),"radialaxis"===e._name&&(a*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(a*=100),e._roughDTick=Math.abs(r[1]-r[0])/a,X.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){function t(){return!(n(e.dtick)||"M"!==e.dtick.charAt(0))}var r,i=t(),a=X.getTickFormat(e);if(a){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(r=L,o&&!i&&e.dtickeo(e.dtick):e.dtickeo(e.dtick):e.dtick<_)&&(e.dtick="M3")):/%[Yy]/.test(a)&&(r=g,o&&(i?12>eo(e.dtick):e.dticke.range[1],u=!e.ticklabelindex||o.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],h=o.simpleMap(e.range,e.r2l,void 0,void 0,t),f=h[1]=+!N;U--){var V,q=!U;U?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):N&&(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var H=U?e:o.extendFlat({},e,N?e.minor:{minor:{}});if(q?X.prepMinorTicks(H,e,t):X.prepTicks(H,t),"array"===H.tickmode){U?(D=[],A=el(e,!q)):(j=[],M=el(e,!q));continue}if("sync"===H.tickmode){D=[],A=function(e){var t=e._mainAxis,r=[];if(t._vals){for(var n=-1,i=-1,a=0;a=Y:et<=Y;et=X.tickIncrement(et,er,f,a)){if(U&&J++,H.rangebreaks&&!f){if(et=p)break}if(D.length>b||et===Q)break;Q=et;var ei={value:function(e,t,r){if(![r,e,t].every(n)||0===r)return e;let i=Math.round((e-t)/r),a=t+i*r;return e!==a&&Math.abs(e-a)<1e-6*Math.abs(r)?a:e}(et,en,er)};U?(et===K&&(ei.first=!0),$&&et!==(0|et)&&(ei.simpleLabel=!0),s>1&&J%s&&(ei.skipLabel=!0),D.push(ei)):(ei.minor=!0,j.push(ei))}}if(!j||j.length<3?u=!1:(ex=(j[2].value-j[1].value)*(c?-1:1),eb=e.tickformat,(/%f/.test(eb)?ex>=O:/%L/.test(eb)?ex>=z:/%[SX]/.test(eb)?ex>=P:/%M/.test(eb)?ex>=I:/%[HI]/.test(eb)?ex>=L:/%p/.test(eb)?ex>=C:/%[Aadejuwx]/.test(eb)?ex>=E:/%[UVW]/.test(eb)?ex>=S:/%[Bbm]/.test(eb)?ex>=T:/%[q]/.test(eb)?ex>=_:!/%[Yy]/.test(eb)||ex>=y)||(u=!1,j=j.slice(1))),u){var ea=D.concat(j);l&&D.length&&(ea=ea.slice(1)),(ea=ea.sort(function(e,t){return e.value-t.value}).filter(function(e,t,r){return 0===t||e.value!==r[t-1].value})).map(function(e,t){return void 0!==e.minor||e.skipLabel?null:t}).filter(function(e){return null!==e}).forEach(function(e){u.map(function(t){var r=e+t;r>=0&&r0?n-1:n,s=n);var l=e[o].value,c=Math.abs(e[s].value-l),u=r||c,h=0;u>=y?h=c>=y&&c<=m?c:g:r===x&&u>=_?h=c>=_&&c<=v?c:x:u>=T?h=c>=T&&c<=w?c:k:r===S&&u>=S?h=S:u>=E?h=E:r===C&&u>=C?h=C:r===L&&u>=L&&(h=L),h>=c&&(h=c,i=!0);var f=a+h;if(t.rangebreaks&&h>0){for(var d=0,p=0;p<84;p++){var b=(p+.5)/84;t.maskBreaks(a*(1-b)+b*f)!==R&&d++}(h*=d/84)||(e[n].drop=!0),i&&c>S&&(h=c)}(h>0||0===n)&&(e[n].periodX=a+h/2)}}(F,e,e._definedDelta),e.rangebreaks){var em="y"===e._id.charAt(0),eg=1;"auto"===e.tickmode&&(eg=e.tickfont?e.tickfont.size:12);var ey=NaN;for(e_=D.length-1;e_>-1;e_--){if(D[e_].drop){D.splice(e_,1);continue}D[e_].value=ej(D[e_].value,e);var ev=e.c2p(D[e_].value);(em?ey>ev-eg:eyp||np&&(r.periodX=p),n10||"01-01"!==i.slice(5)?e._tickround="d":e._tickround=t.slice(1)%12==0?"y":"m";else if(t>=E&&a<=10||t>=15*E)e._tickround="d";else if(t>=I&&a<=16||t>=L)e._tickround="M";else if(t>=P&&a<=19||t>=I)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(n(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);n(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.floor(Math.log(Math.max(Math.abs(s[0]),Math.abs(s[1])))/Math.LN10+.01);Math.abs(l)>(void 0===e.minexponent?3:e.minexponent)&&(e_(e.exponentformat)&&"SI extended"!==e.exponentformat&&!ew(l)||e_(e.exponentformat)&&"SI extended"===e.exponentformat&&!ek(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}function ev(e,t,r){var n=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:n.size,font:n.family,fontWeight:n.weight,fontStyle:n.style,fontVariant:n.variant,fontTextcase:n.textcase,fontLineposition:n.lineposition,fontShadow:n.shadow,fontColor:n.color}}X.autoTicks=function(e,t,r){var i;function a(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=o.dateTick0(e.calendar,0);var s=2*t;if(s>g)t/=g,i=a(10),e.dtick="M"+12*eg(t,i,ec);else if(s>k)e.dtick="M"+eg(t/=k,1,eu);else if(s>E){if(e.dtick=eg(t,E,e._hasDayOfWeekBreaks?[1,2,7,14]:ef),!r){var l=X.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=o.dateTick0(e.calendar,2):e.tick0=o.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else s>L?e.dtick=eg(t,L,eu):s>I?e.dtick=eg(t,I,eh):s>P?e.dtick=eg(t,P,eh):(i=a(10),e.dtick=eg(t,i,ec))}else if("log"===e.type){e.tick0=0;var u=o.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(1>Math.abs(u[1]-u[0])){var h=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/h,i=a(10),e.dtick="L"+eg(t,i,ec)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):eR(e)?(e.tick0=0,e.dtick=eg(t,i=1,em)):(e.tick0=0,i=a(10),e.dtick=eg(t,i,ec));if(0===e.dtick&&(e.dtick=1),!n(e.dtick)&&"string"!=typeof e.dtick){var f=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(f)}},X.tickIncrement=function(e,t,i,a){var s=i?-1:1;if(n(t))return o.increment(e,s*t);var l=t.charAt(0),c=s*Number(t.slice(1));if("M"===l)return o.incrementMonth(e,c,a);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?ep:ed,h=e+.01*s,f=o.roundUp(o.mod(h,1),u,i);return Math.floor(h)+Math.log(r.round(Math.pow(10,f),1))/Math.LN10}throw"unrecognized dtick "+String(t)},X.tickFirst=function(e,t){var i=e.r2l||Number,a=o.simpleMap(e.range,i,void 0,void 0,t),s=a[1]=0&&r<=e._length?t:null};if(A&&o.isArrayOrTypedArray(e.ticktext)){var L=o.simpleMap(e.range,e.r2l),I=(Math.abs(L[1]-L[0])-(e._lBreaks||0))/1e4;for(_=0;_ ")}else e._prevDateHead=l,c+="
"+l;t.text=c}(e,T,r,M):"log"===S?function(e,t,r,i){var a=e.dtick,s=t.x,l=e.tickformat,c="string"==typeof a&&a.charAt(0);if("never"===i&&(i=""),r&&"L"!==c&&(a="L3",c="L"),l||"L"===c)t.text=eT(Math.pow(10,s),e,i,r);else if(n(a)||"D"===c&&("complete"===e.minorloglabels||.1>o.mod(s+.01,1))){"complete"!==e.minorloglabels||.1>o.mod(s+.01,1)||(t.fontSize*=.75);var u=Math.pow(10,s).toExponential(0).split("e"),h=+u[1],f=Math.abs(h),d=e.exponentformat;"power"===d||e_(d)&&"SI extended"!==d&&ew(h)||e_(d)&&"SI extended"===d&&ek(h)?(t.text=u[0],f>0&&(t.text+="x10"),"1x10"===t.text&&(t.text="10"),0!==h&&1!==h&&(t.text+=""+(h>0?"":D)+f+""),t.fontSize*=1.25):("e"===d||"E"===d)&&f>2?t.text=u[0]+d+(h>0?"+":D)+f:(t.text=eT(Math.pow(10,s),e,"","fakehover"),"D1"===a&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else if("D"===c)t.text="none"===e.minorloglabels?"":String(Math.round(Math.pow(10,o.mod(s,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if("D1"===e.dtick){var p=String(t.text).charAt(0);("0"===p||"1"===p)&&("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(s<0?.5:.25)))}}(e,T,M,z):"category"===S?(s=e,l=T,void 0===(c=s._categories[Math.round(l.x)])&&(c=""),l.text=String(c)):"multicategory"===S?(u=e,h=T,f=r,d=Math.round(h.x),m=void 0===(p=u._categories[d]||[])[1]?"":String(p[1]),g=void 0===p[0]?"":String(p[0]),f?h.text=g+" - "+m:(h.text=m,h.text2=g)):eR(e)?function(e,t,r,n,i){if("radians"!==e.thetaunit||r)t.text=eT(t.x,e,i,n);else{var a=t.x/180;if(0===a)t.text="0";else{var s=function(e){function t(e,t){return 1e-6>=Math.abs(e-t)}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),n=e*r,i=Math.abs(function e(r,n){return t(n,0)?r:e(n,r%n)}(n,r));return[Math.round(n/i),Math.round(r/i)]}(a);if(s[1]>=100)t.text=eT(o.deg2rad(t.x),e,i,n);else{var l=t.x<0;1===s[1]?1===s[0]?t.text="π":t.text=s[0]+"π":t.text=["",s[0],"","⁄","",s[1],"","π"].join(""),l&&(t.text=D+t.text)}}}}(e,T,r,M,z):(y=e,v=T,x=M,"never"===(b=z)?b="":"all"===y.showexponent&&1e-6>Math.abs(v.x/y.dtick)&&(b="hide"),v.text=eT(v.x,y,b,x)),i||(e.tickprefix&&!P(e.showtickprefix)&&(T.text=e.tickprefix+T.text),e.ticksuffix&&!P(e.showticksuffix)&&(T.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(T.text)){var O=e.labelalias[T.text];"string"==typeof O&&(T.text=O)}return("boundaries"===e.tickson||e.showdividers)&&(T.xbnd=[C(T.x-.5),C(T.x+e.dtick-.5)]),T},X.hoverLabelText=function(e,t,r){r&&(e=o.extendFlat({},e,{hoverformat:r}));var n=o.isArrayOrTypedArray(t)?t[0]:t,i=o.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==i&&i!==n)return X.hoverLabelText(e,n,r)+" - "+X.hoverLabelText(e,i,r);var a="log"===e.type&&n<=0,s=X.tickText(e,e.c2l(a?-n:n),"hover").text;return a?0===n?"0":D+s:s};var ex=["f","p","n","μ","m","","k","M","G","T"],eb=["q","r","y","z","a",...ex,"P","E","Z","Y","R","Q"],e_=e=>["SI","SI extended","B"].includes(e);function ew(e){return e>14||e<-15}function ek(e){return e>32||e<-30}function eT(e,t,r,i){var a,s,l,c=e<0,u=t._tickround,h=r||t.exponentformat||"B",f=t._tickexponent,d=X.getTickFormat(t),p=t.separatethousands;if(i){var m={exponentformat:h,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:n(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};ey(m),u=(Number(m._tickround)||0)+4,f=m._tickexponent,t.hoverformat&&(d=t.hoverformat)}if(d)return t._numFormat(d)(e).replace(/-/g,D);"none"===h&&(f=0);let g=Math.pow(10,-u)/2;if((e=Math.abs(e))"+l+"":"B"===h&&9===f?e+="B":e_(h)&&(e+="SI extended"===h?eb[f/3+10]:ex[f/3+5])),c?D+e:e}function eA(e,t){if(e){var r=Object.keys(V).reduce(function(e,r){return -1!==t.indexOf(r)&&V[r].forEach(function(t){e[t]=1}),e},{});Object.keys(e).forEach(function(t){r[t]||(1===t.length?e[t]=0:delete e[t])})}}function eM(e){return void 0!==e.periodX?e.periodX:e.x}function eS(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}function eE(e){var t=e.title.font.size,r=(e.title.text.match(l.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(G+r*W):r?t*(r+1)*W:t}function eL(e,t){var r=e.l2p(t);return r>1&&r=i.min&&e0)switch(e.type){case"date":case"linear":for(t=0;t=n(e))}(e.dtick,n.dtickrange,i)){r=n;break}break;case"log":for(t=0;t=0,o=0>=a(e,t[1]);return(r||i)&&(n||o)}(e.dtick,n.dtickrange)){r=n;break}}return r?r.value:e.tickformat},X.getSubplots=function(e,t){var r=e._fullLayout._subplots,n=r.cartesian.concat(r.gl2d||[]),i=t?X.findSubplotsWithAxis(n,t):n;return i.sort(function(e,t){var r=e.slice(1).split("y"),n=t.slice(1).split("y");return r[0]===n[0]?r[1]-n[1]:r[0]-n[0]}),i},X.findSubplotsWithAxis=function(e,t){for(var r=new RegExp("x"===t._id.charAt(0)?"^"+t._id+"y":t._id+"$"),n=[],i=0;i=0&&i.unshift(i.splice(n,1).shift())}});var s={false:{left:0,right:0}};return o.syncOrAsync(i.map(function(t){return function(){if(t){var n=X.getFromId(e,t);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=a;var i=X.drawOne(e,n,r);return n._shiftPusher&&eN(n,n._fullDepth||0,s,!0),n._r=n.range.slice(),n._rl=o.simpleMap(n._r,n.r2l),i}}}))},X.drawOne=function(e,t,r){var n,s,f,d=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];t.setScale();var m=e._fullLayout,g=t._id,y=g.charAt(0),v=X.counterLetter(g),x=m._plots[t._mainSubplot],b="above traces"===t.zerolinelayer;if(x){if(t._shiftPusher=t.autoshift||-1!==p.indexOf(t._id)||-1!==p.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var _=t.linewidth/2||0;"inside"===t.ticks&&(_+=t.ticklen),eN(t,_,d,!0),eN(t,t.shift||0,d,!1)}(!0!==r.skipTitle||void 0===t._shift)&&(C=t,L=d,t._shift=C.autoshift?L[C.overlaying][C.side]:C.shift||0);var w=x[y+"axislayer"],k=t._mainLinePosition,T=k+=t._shift,A=t._mainMirrorPosition,M=t._vals=X.calcTicks(t),S=[t.mirror,T,A].join("_");for(n=0;n0?r.bottom-u:0,h))));var f=0,d=0;if(t._shiftPusher&&(f=Math.max(h,r.height>0?"l"===l?u-r.left:r.right-u:0),t.title.text!==m._dfltTitle[y]&&(d=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(d+=eE(t))),t._fullDepth=Math.max(f,d)),t.automargin){n={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],g="number"==typeof t._shift?t._shift:0;if("x"===y){if("b"===l?n[l]=t._depth:(n[l]=t._depth=Math.max(r.width>0?u-r.top:0,h),p.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(n.xr=1,n.r=x);var b=t._offset-r.left;b>0&&(n.xl=0,n.l=b)}}else if("l"===l?(t._depth=Math.max(r.height>0?u-r.left:0,h),n[l]=t._depth-g):(t._depth=Math.max(r.height>0?r.right-u:0,h),n[l]=t._depth+g,p.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(n.yb=0,n.b=_);var w=t._offset-r.top;w>0&&(n.yt=1,n.t=w)}n[v]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==m._dfltTitle[y]&&(n[l]+=eE(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((o={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(o[c]+=h),!0===t.mirror||"ticks"===t.mirror?o[v]=t._anchorAxis.domain[p[1]]:("all"===t.mirror||"allticks"===t.mirror)&&(o[v]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}ep&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(eA(n,t.automargin),eA(o,t.automargin)),i.autoMargin(e,eP(t),n),i.autoMargin(e,ez(t),o),i.autoMargin(e,eO(t),s)}),o.syncOrAsync(ef)}}function em(e){var r=g+(e||"tick");return E[r]||(E[r]=function(e,t,r){var n,i,a,o;if(e._selections[t].size())n=1/0,i=-1/0,a=1/0,o=-1/0,e._selections[t].each(function(){var e=eI(this);if("none"!==e.node().style.display){var t=h.bBox(e.node().parentNode);n=Math.min(n,t.top),i=Math.max(i,t.bottom),a=Math.min(a,t.left),o=Math.max(o,t.right)}});else{var s=X.makeLabelFns(e,r);n=i=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:n,bottom:i,left:a,right:o,height:i-n,width:o-a}}(t,r,T)),E[r]}},X.getTickSigns=function(e,t){var r=e._id.charAt(0),n=e.side===({x:"top",y:"right"})[r]?1:-1,i=[-1,1,n,-n];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(i=i.map(function(e){return-e})),e.side&&i.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),i},X.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},X.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(e){return -1!==t.indexOf(e)},i=n("top"),a=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),c="boundaries"!==r&&(s||a||i||o);if(!c&&!l)return[0,0];var u=e.side,h=c?(e.tickwidth||0)/2:0,f=3,d=e.tickfont?e.tickfont.size:12;return(s||i)&&(h+=d*G,f+=(e.linewidth||0)/2),(a||o)&&(h+=(e.linewidth||0)/2,f+=3),l&&"top"===u&&(f-=d*(1-G)),(a||i)&&(h=-h),("bottom"===u||"right"===u)&&(f=-f),[c?h:0,l?f:0]}(e),r=e.ticklabelshift||0,n=e.ticklabelstandoff||0,i=t[0],a=t[1],o=e.range[0]>e.range[1],l=e.ticklabelposition&&-1!==e.ticklabelposition.indexOf("inside");if(r&&(r*=o?-1:1),n){var c=e.side;n*=l&&("top"===c||"left"===c)||!l&&("bottom"===c||"right"===c)?1:-1}return"x"===e._id.charAt(0)?function(t){return s(i+e._offset+e.l2p(eM(t))+r,a+n)}:function(t){return s(a+n,i+e._offset+e.l2p(eM(t))+r)}},X.makeTickPath=function(e,t,r,n){n||(n={});var i=n.minor;if(i&&!e.minor)return"";var a=void 0!==n.len?n.len:i?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r},X.makeLabelFns=function(e,t,r){var i=e.ticklabelposition||"",a=e.tickson||"",s=function(e){return -1!==i.indexOf(e)},l=s("top"),c=s("left"),u=s("right"),h=s("bottom"),f="boundaries"!==a&&(h||c||l||u),d=s("inside"),p="inside"===i&&"inside"===e.ticks||!d&&"outside"===e.ticks&&"boundaries"!==a,m=0,g=0,y=p?e.ticklen:0;if(d?y*=-1:f&&(y=0),p&&(m+=y,r)){var v=o.deg2rad(r);m=y*Math.cos(v)+1,g=y*Math.sin(v)}e.showticklabels&&(p||e.showline)&&(m+=.2*e.tickfont.size);var x,b,_,w,k,T={labelStandoff:m+=(e.linewidth||1)/2*(d?-1:1),labelShift:g},A=0,M=e.side,S=e._id.charAt(0),E=e.tickangle;if("x"===S)w=(k=!d&&"bottom"===M||d&&"top"===M)?1:-1,d&&(w*=-1),x=g*w,b=t+m*w,_=k?1:-.2,90===Math.abs(E)&&(d?_+=H:_=-90===E&&"bottom"===M?G:90===E&&"top"===M?H:.5,A=H/2*(E/90)),T.xFn=function(e){return e.dx+x+A*e.fontSize},T.yFn=function(e){return e.dy+b+e.fontSize*_},T.anchorFn=function(e,t){if(f){if(c)return"end";if(u)return"start"}return n(t)&&0!==t&&180!==t?t*w<0!==d?"end":"start":"middle"},T.heightFn=function(t,r,n){return r<-60||r>60?-.5*n:"top"===e.side!==d?-n:0};else if("y"===S){if(w=(k=!d&&"left"===M||d&&"right"===M)?1:-1,d&&(w*=-1),x=m,b=g*w,_=0,d||90!==Math.abs(E)||(_=-90===E&&"left"===M||90===E&&"right"===M?G:.5),d){var C=n(E)?+E:0;0!==C&&(A=Math.abs(Math.sin(o.deg2rad(C)))*G*w,_=0)}T.xFn=function(e){return e.dx+t-(x+e.fontSize*_)*w+A*e.fontSize},T.yFn=function(e){return e.dy+b+e.fontSize*H},T.anchorFn=function(e,t){return n(t)&&90===Math.abs(t)?"middle":k?"end":"start"},T.heightFn=function(t,r,n){return"right"===e.side&&(r*=-1),r<-30?-n:r<30?-.5*n:0}}return T},X.drawTicks=function(e,t,n){n=n||{};var i=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?n.vals.filter(function(e){return e.minor&&!e.noTick}):[]).concat(t.ticks?n.vals.filter(function(e){return!e.minor&&!e.noTick}):[]),o=n.layer.selectAll("path."+i).data(a,eS);o.exit().remove(),o.enter().append("path").classed(i,1).classed("ticks",1).classed("crisp",!1!==n.crisp).each(function(e){return u.stroke(r.select(this),e.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(r){return h.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",n.path).style("display",null),eB(t,[N]),o.attr("transform",n.transFn)},X.drawGrid=function(e,t,n){if(n=n||{},"sync"!==t.tickmode){var i=t._id+"grid",a=t.minor&&t.minor.showgrid,o=a?n.vals.filter(function(e){return e.minor}):[],s=t.showgrid?n.vals.filter(function(e){return!e.minor}):[],l=n.counterAxis;if(l&&X.shouldShowZeroLine(e,t,l))for(var c="array"===t.tickmode,f=0;f=0;y--){var v=y?m:g;if(v){var x=v.selectAll("path."+i).data(y?s:o,eS);x.exit().remove(),x.enter().append("path").classed(i,1).classed("crisp",!1!==n.crisp),x.attr("transform",n.transFn).attr("d",n.path).each(function(e){return u.stroke(r.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(e){return h.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(e){return(e.minor?p:t._gw)+"px"}).style("display",null),"function"==typeof n.path&&x.attr("d",n.path)}}eB(t,[F,B])}},X.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",i=X.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+n).data(i?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",!1!==r.crisp).each(function(){r.layer.selectAll("path").sort(function(e,t){return K(e.id,t.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,t.zerolinecolor||u.defaultLine).style("stroke-width",h.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),eB(t,[j])},X.drawLabels=function(e,t,i){i=i||{};var a=e._fullLayout,c=t._id,u="above traces"===t.zerolinelayer,f=i.cls||c+"tick",d=i.vals.filter(function(e){return e.text}),p=i.labelFns,m=i.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[f],y=i.layer.selectAll("g."+f).data(t.showticklabels?d:[],eS),v=[];function x(e,a){e.each(function(e){var o=r.select(this),c=o.select(".text-math-group"),u=p.anchorFn(e,a),f=i.transFn.call(o.node(),e)+(n(a)&&0!=+a?" rotate("+a+","+p.xFn(e)+","+(p.yFn(e)-e.fontSize/2)+")":""),d=l.lineCount(o),m=W*e.fontSize,g=p.heightFn(e,n(a)?+a:0,(d-1)*m);if(g&&(f+=s(0,g)),c.empty()){var y=o.select("text");y.attr({transform:f,"text-anchor":u}),y.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var v=h.bBox(c.node()).width;c.attr("transform",f+s(v*({end:-.5,start:.5})[u],0))}})}y.enter().append("g").classed(f,1).append("text").attr("text-anchor","middle").each(function(t){var n=r.select(this),i=e._promises.length;n.call(l.positionText,p.xFn(t),p.yFn(t)).call(h.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(l.convertToTspans,e),e._promises[i]?v.push(e._promises.pop().then(function(){x(n,m)})):x(n,m)}),eB(t,[U]),y.exit().remove(),i.repositionOnUpdate&&y.each(function(e){r.select(this).select("text").call(l.positionText,p.xFn(e),p.yFn(e))}),t._adjustTickLabelsOverflow=function(){var n=t.ticklabeloverflow;if(!(!n||"allow"===n)){var i=-1!==n.indexOf("hide"),s="x"===t._id.charAt(0),l=0,c=s?e._fullLayout.width:e._fullLayout.height;if(-1!==n.indexOf("domain")){var u=o.simpleMap(t.range,t.r2l);l=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var f=Math.min(l,c),d=Math.max(l,c),p=t.side,m=1/0,g=-1/0;for(var v in y.each(function(e){var n=r.select(this);if(n.select(".text-math-group").empty()){var a=h.bBox(n.node()),o=0;s?(a.right>d||a.leftd||a.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+n._id]?l.style("display","none"):"tick"!==e.K||i||"none"===l.node().style.display||l.style("display",null)})})})})},x(y,g+1?g:m);var b=null;t._selections&&(t._selections[f]=y);var _=[function(){return v.length&&Promise.all(v)}];t.automargin&&a._redrawFromAutoMarginCount&&90===g?(b=g,_.push(function(){x(y,g)})):_.push(function(){if(x(y,m),d.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=t.autotickangles[0];var e,r=0,n=[],a=1;y.each(function(e){r=Math.max(r,e.fontSize);var i=t.l2p(e.x),o=eI(this),s=h.bBox(o.node());a=Math.max(a,l.lineCount(o)),n.push({top:0,bottom:10,height:10,left:i-s.width/2,right:i+s.width/2+2,width:s.width+2})});var s=("boundaries"===t.tickson||t.showdividers)&&!i.secondary,c=d.length,u=Math.abs((d[c-1].x-d[0].x)*t._m)/(c-1),f=s?u/2:u,p=Math.sqrt(Math.pow(f,2)+Math.pow(s?t.ticklen:1.25*r*a,2)),g=f/p,v=t.autotickangles.map(function(e){return e*Math.PI/180}),_=v.find(function(e){return Math.abs(Math.cos(e))<=g});void 0===_&&(_=v.reduce(function(e,t){return Math.abs(Math.cos(e))R*D&&(P=D,C[E]=L[E]=z[E])}var V=Math.abs(P-I);V-A>0?(V-=A,A*=1+A/V):A=0,"y"!==t._id.charAt(0)&&(A=-A),C[S]=k.p2r(k.r2p(L[S])+M*A),"min"===k.autorange||"max reversed"===k.autorange?(C[0]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0):("max"===k.autorange||"min reversed"===k.autorange)&&(C[1]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[k._name+".range"]=C}var q=o.syncOrAsync(_);return q&&q.then&&e._promises.push(q),q},X.getPxPosition=function(e,t){var r,n=e._fullLayout._size,i=t._id.charAt(0),a=t.side;return("free"!==t.anchor?r=t._anchorAxis:"x"===i?r={_offset:n.t+(1-(t.position||0))*n.h,_length:0}:"y"===i&&(r={_offset:n.l+(t.position||0)*n.w+t._shift,_length:0}),"top"===a||"left"===a)?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},X.shouldShowZeroLine=function(e,t,r){var n=o.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===R)&&(eL(t,0)||!function(e,t,r,n){var i=r._mainAxis;if(i){var a=e._fullLayout,o=t._id.charAt(0),s=X.counterLetter(t._id),l=t._offset+(Math.abs(n[0])1)for(n=1;n4/3-s?o:s}}}),rB=d({"src/components/dragelement/cursor.js"(e,t){var r=tY(),n=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,i,a){return e="left"===i?0:"center"===i?1:"right"===i?2:r.constrain(Math.floor(3*e),0,2),n[t="bottom"===a?0:"middle"===a?1:"top"===a?2:r.constrain(Math.floor(3*t),0,2)][e]}}}),rN=d({"src/components/dragelement/unhover.js"(e,t){var r=tJ(),n=tL(),i=to().getGraphDiv,a=q(),o=t.exports={};o.wrapped=function(e,t,r){(e=i(e))._fullLayout&&n.clear(e._fullLayout._uid+a.HOVERID),o.raw(e,t,r)},o.raw=function(e,t){var n=e._fullLayout,i=e._hoverdata;t||(t={}),!(t.target&&!e._dragged&&!1===r.triggerHandler(e,"plotly_beforehover",t))&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&i&&e.emit("plotly_unhover",{event:t,points:i}))}}}),rU=d({"src/components/dragelement/index.js"(e,t){var r=rR(),n=t$(),i=rj(),a=tY().removeElement,o=t3(),s=t.exports={};s.align=rF(),s.getCursor=rB();var l=rN();function c(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=0x3b9ac9ff,t.background="none",document.body.appendChild(e),e}function u(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=l.wrapped,s.unhoverRaw=l.raw,s.init=function(e){var t,r,l,h,f,d,p,m,g=e.gd,y=1,v=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._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=e.clampFn||function(e,t,r){return Math.abs(e)"u"&&typeof i.clientY>"u"&&(i.clientX=t,i.clientY=r),(l=new Date().getTime())-g._mouseDownTimev&&(y=Math.max(y-1,1)),g._dragged)e.doneFn&&e.doneFn();else{var r;d.target===p?r=d:(r={target:p,srcElement:p,toElement:p},Object.keys(d).concat(Object.keys(d.__proto__)).forEach(e=>{var t=d[e];r[e]||"function"==typeof t||(r[e]=t)})),e.clickFn&&e.clickFn(y,r),m||p.dispatchEvent(new MouseEvent("click",t))}g._dragging=!1,g._dragged=!1}},s.coverSlip=c}}),rV=d({"src/lib/setcursor.js"(e,t){t.exports=function(e,t){(e.attr("class")||"").split(" ").forEach(function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)}),t&&e.classed("cursor-"+t,!0)}}}),rq=d({"src/lib/override_cursor.js"(e,t){var r=rV(),n="data-savedcursor";t.exports=function(e,t){var i=e.attr(n);if(t){if(!i){for(var a=(e.attr("class")||"").split(" "),o=0;ot.legend.length)for(var n=t.legend.length;n+("legend"===e));if(!1===S&&(c[e]=void 0),!(!1===S&&!f.uirevision)&&(p("uirevision",c.uirevision),!1!==S)){p("borderwidth");var E,C,L,I=p("orientation"),P=p("yref"),z=p("xref"),O="h"===I,D="paper"===P,R="paper"===z,j="left";if(O?(E=0,r.getComponentMethod("rangeslider","isVisible")(t.xaxis)?D?(C=1.1,L="bottom"):(C=1,L="top"):D?(C=-.1,L="top"):(C=0,L="bottom")):(C=1,L="auto",R?E=1.02:(E=1,j="right")),n.coerce(f,d,{x:{valType:"number",editType:"legend",min:R?-2:0,max:R?3:1,dflt:E}},"x"),n.coerce(f,d,{y:{valType:"number",editType:"legend",min:D?-2:0,max:D?3:1,dflt:C}},"y"),p("traceorder",w),l.isGrouped(c[e])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",j),p("yanchor",L),p("maxheight"),p("valign"),n.noneOrAll(f,d,["x","y"]),p("title.text")){p("title.side",O?"left":"top");var F=n.extendFlat({},m,{size:n.bigFont(m.size)});n.coerceFont(p,"title.font",F);let e=h>1;p("titleclick",!!e&&"toggle"),p("titledoubleclick",!!e&&"toggleothers")}}}function B(e){return r.traceIs(e,"pie-like")&&null!=e._length&&(Array.isArray(e.legend)||Array.isArray(e.showlegend))}})(g,e,t,h,m.length),t[g]&&(t[g]._id=g),t._legends.push(g)}}}}),rY=d({"src/components/legend/handle_click.js"(e){var t=tv(),r=tY(),n=r.pushUnique,i=rG(),a=!0;e.handleItemClick=function(e,i,o,s){var l=i._fullLayout;if(i._dragged||i._editing)return;var c=e.data()[0][0];if(c.groupTitle&&c.noClick)return;var u=o.groupclick;"toggle"===s&&"toggleothers"===o.itemdoubleclick&&a&&i.data&&i._context.showTips&&(r.notifier(r._(i,"Double-click on legend to isolate one trace"),"long",i),a=!1);var h="togglegroup"===u,f=l.hiddenlabels?l.hiddenlabels.slice():[],d=i._fullData;let p=(l.shapes||[]).filter(e=>e.showlegend||e.legendgroup);var m=d.concat(p),g=c.trace;g._isShape&&(g=l.shapes[g.index]);var y,v,x,b,_,w=g.legendgroup,k={},T=[],A=[],M=[],S=(l.shapes||[]).map(function(e){return e._input}),E=!1;function C(e,t){if(!(c.groupTitle&&!h)){var r,n,i,a=e._isShape,o=e.index;void 0===o&&(o=e._index);var s=!1!==e.visible&&t;a?(S[o].visible=s,E=!0):(r=o,n=T.indexOf(r),(i=k.visible)||(i=k.visible=[]),-1===T.indexOf(r)&&(T.push(r),n=T.length-1),i[n]=s)}}var L=g.legend;if(!g._isShape&&t.traceIs(g,"pie-like")){var I=c.label,P=f.indexOf(I);if("toggle"===s)-1===P?f.push(I):f.splice(P,1);else if("toggleothers"===s){var z=-1!==P,O=[];for(y=0;ye.showlegend||e.legendgroup),c=o.concat(l);function u(e){return(e.legend||"legend")===s}"toggle"===n?(p=!c.some(function(e){return u(e)&&!0===e.visible}),m=!1):(p=!0,m=!c.some(function(e){return!u(e)&&!0===e.visible&&!1!==e.showlegend}));let h={visible:[]},f=[],d=(a.shapes||[]).map(function(e){return e._input});for(var p,m,g=!1,y=0;yI&&(C=I)}S[o][0]._groupMinRank=C,S[o][0]._preGroupSort=o}var P=function(e,t){return(r(e.trace.legendrank)?e.trace.legendrank[e.i]:e.trace.legendrank)-(r(t.trace.legendrank)?t.trace.legendrank[t.i]:t.trace.legendrank)||e._preSort-t._preSort};for(S.forEach(function(e,t){e[0]._preGroupSort=t}),S.sort(function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort}),o=0;or?r:e}t.exports=function(e,t,g){var y=t._fullLayout;g||(g=y.legend);var v="constant"===g.itemsizing,x=g.itemwidth,b=a((x+2*f.itemGap)/2,0),_=function(e,t,r,n){var i;if(e+1)i=e;else{if(!t||!(t.width>0))return 0;i=t.width}return v?n:Math.min(i,r)};function w(e,i,a){var c=e[0].trace,u=c.marker||{},h=u.line||{},f=u.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",d=a?c.visible&&c.type===a:n.traceIs(c,"bar"),p=r.select(i).select("g.legendpoints").selectAll("path.legend"+a).data(d?[e]:[]);p.enter().append("path").classed("legend"+a,!0).attr("d",f).attr("transform",b),p.exit().remove(),p.each(function(e){var n=r.select(this),i=e[0],a=_(i.mlw,u.line,5,2);n.style("stroke-width",a+"px");var f=i.mcc;if(!g._inHover&&"mc"in i){var d=l(u),p=d.mid;void 0===p&&(p=(d.max+d.min)/2),f=o.tryColorscale(u,"")(p)}var y=f||i.mc||u.color,v=u.pattern,x=o.getPatternAttr,b=v&&(x(v.shape,0,"")||x(v.path,0,""));if(b){var w=x(v.bgcolor,0,null),k=x(v.fgcolor,0,null),T=v.fgopacity,A=m(v.size,8,10),M=m(v.solidity,.5,1),S="legend-"+c.uid;n.call(o.pattern,"legend",t,S,b,A,M,f,v.fillmode,w,k,T)}else n.call(s.fill,y);a&&s.stroke(n,i.mlc||h.color)})}function k(e,a,o){var s=e[0],l=s.trace,c=o?l.visible&&l.type===o:n.traceIs(l,o),f=r.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(c?[e]:[]);if(f.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),f.exit().remove(),f.size()){var d=l.marker||{},p=_(h(d.line.width,s.pts),d.line,5,2),m="pieLike",g=i.minExtend(l,{marker:{line:{width:p}}},m);u(f,i.minExtend(s,{trace:g},m),g,t)}}e.each(function(e){var t=r.select(this),n=i.ensureSingle(t,"g","layers");n.style("opacity",e[0].trace.opacity);var o=g.indentation,s=g.valign,l=e[0].lineHeight,c=e[0].height;if(("middle"!==s||0!==o)&&l&&c){var u=g.indentation;n.attr("transform",a(u,.5*(l-c+3)*({top:1,bottom:-1})[s]||0))}else n.attr("transform",null);n.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),n.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=n.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)}).each(function(e){var n,a=e[0].trace,c=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":c=[["M-15,-2V4H15V-2Z"]],n=!0;break;case"choropleth":case"choroplethmap":c=[["M-6,-6V6H6V-6Z"]],n=!0;break;case"densitymap":c=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],n="radial";break;case"cone":c=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],n=!1;break;case"streamtube":c=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],n=!1;break;case"surface":c=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],n=!0;break;case"mesh3d":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!1;break;case"volume":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],n=!0;break;case"isosurface":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],n=!1}var u=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(c);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",b).style("stroke-miterlimit",1),u.exit().remove(),u.each(function(e,c){var u,h=r.select(this),f=l(a),p=f.colorscale,m=f.reversescale;if(p){if(!n){var g=p.length;u=0===c?p[m?g-1:0][1]:1===c?p[m?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var y=a.vertexcolor||a.facecolor||a.color;u=i.isArrayOrTypedArray(y)?y[c]||y[0]:y}h.attr("d",e[0]),u?h.call(s.fill,u):h.call(function(e){if(e.size()){var r="legendfill-"+a.uid;o.gradient(e,t,r,d(m,"radial"===n),p,"fill")}})})}).each(function(e){var t=e[0].trace,n="waterfall"===t.type;if(e[0]._distinct&&n){var i=e[0].trace[e[0].dir].marker;return e[0].mc=i.color,e[0].mlw=i.line.width,e[0].mlc=i.line.color,w(e,this,"waterfall")}var a=[];t.visible&&n&&(a=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),o.exit().remove(),o.each(function(e){var n=r.select(this),i=t[e[0]].marker,a=_(void 0,i.line,5,2);n.attr("d",e[1]).style("stroke-width",a+"px").call(s.fill,i.color),a&&n.call(s.stroke,i.line.color)})}).each(function(e){w(e,this,"funnel")}).each(function(e){w(e,this)}).each(function(e){var a=e[0].trace,l=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.visible&&n.traceIs(a,"box-violin")?[e]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),l.exit().remove(),l.each(function(){var e=r.select(this);if(("all"===a.boxpoints||"all"===a.points)&&0===s.opacity(a.fillcolor)&&0===s.opacity((a.line||{}).color)){var n=i.minExtend(a,{marker:{size:v?12:i.constrain(a.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,n,t)}else{var c=_(void 0,a.line,5,2);e.style("stroke-width",c+"px").call(s.fill,a.fillcolor),c&&s.stroke(e,a.line.color)}})}).each(function(e){k(e,this,"funnelarea")}).each(function(e){k(e,this,"pie")}).each(function(e){var n,a,s=p(e),u=s.showFill,h=s.showLine,f=s.showGradientLine,m=s.showGradientFill,g=s.anyFill,y=s.anyLine,v=e[0],b=v.trace,w=l(b),k=w.colorscale,T=w.reversescale,A=c.hasMarkers(b)||!g?"M5,0":y?"M5,-2":"M5,-3",M=r.select(this),S=M.select(".legendfill").selectAll("path").data(u||m?[e]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",A+"h"+x+"v6h-"+x+"z").call(function(e){if(e.size())if(u)o.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;o.gradient(e,t,r,d(T),k,"fill")}}),h||f){var E=_(void 0,b.line,10,5);a=i.minExtend(b,{line:{width:E}}),n=[i.minExtend(v,{trace:a})]}var C=M.select(".legendlines").selectAll("path").data(h||f?[n]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",A+(f?"l"+x+",0.0001":"h"+x)).call(h?o.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;o.lineGroupStyle(e),o.gradient(e,t,r,d(T),k,"stroke")}})}).each(function(e){var n,a,s=p(e),l=s.anyFill,u=s.anyLine,h=s.showLine,f=s.showMarker,d=e[0],m=d.trace,g=!f&&!u&&!l&&c.hasText(m);function y(e,t,r,n){var a=i.nestedProperty(m,e).get(),o=i.isArrayOrTypedArray(a)&&t?t(a):a;if(v&&o&&void 0!==n&&(o=n),r){if(or[1])return r[1]}return o}function x(e){return d._distinct&&d.index&&e[d.index]?e[d.index]:e[0]}if(f||g||h){var _={},w={};if(f){_.mc=y("marker.color",x),_.mx="scattermap"===m.type?"circle":y("marker.symbol",x),_.mo=y("marker.opacity",i.mean,[.2,1]),_.mlc=y("marker.line.color",x),_.mlw=y("marker.line.width",i.mean,[0,5],2),_.mld=y("marker.line.dash",x),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var k=y("marker.size",i.mean,[2,16],12);_.ms=k,w.marker.size=k}h&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(_.tx="Aa",_.tp=y("textposition",x),_.ts=10,_.tc=y("textfont.color",x),_.tf=y("textfont.family",x),_.tw=y("textfont.weight",x),_.ty=y("textfont.style",x),_.tv=y("textfont.variant",x),_.tC=y("textfont.textcase",x),_.tE=y("textfont.lineposition",x),_.tS=y("textfont.shadow",x)),n=[i.minExtend(d,_)],(a=i.minExtend(m,w)).selectedpoints=null,a.texttemplate=null}var T=r.select(this).select("g.legendpoints"),A=T.selectAll("path.scatterpts").data(f?n:[]);A.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),A.exit().remove(),A.call(o.pointStyle,a,t),f&&(n[0].mrc=3);var M=T.selectAll("g.pointtext").data(g?n:[]);M.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),M.exit().remove(),M.selectAll("text").call(o.textPointStyle,a,t)}).each(function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);n.enter().append("path").classed("legendcandle",!0).attr("d",function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",b).style("stroke-miterlimit",1),n.exit().remove(),n.each(function(e,n){var i=r.select(this),a=t[n?"increasing":"decreasing"],o=_(void 0,a.line,5,2);i.style("stroke-width",o+"px").call(s.fill,a.fillcolor),o&&s.stroke(i,a.line.color)})}).each(function(e){var t=e[0].trace,n=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);n.enter().append("path").classed("legendohlc",!0).attr("d",function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",b).style("stroke-miterlimit",1),n.exit().remove(),n.each(function(e,n){var i=r.select(this),a=t[n?"increasing":"decreasing"],l=_(void 0,a.line,5,2);i.style("fill","none").call(o.dashLine,a.line.dash,l),l&&s.stroke(i,a.line.color)})})}}}),r0=d({"src/components/legend/draw.js"(e,t){var r=b(),n=tY(),i=t7(),a=tv(),o=tJ(),s=rU(),l=rE(),c=eC(),u=rr(),h=rY().handleItemClick,f=rY().handleTitleClick,d=rX(),p=rt(),m=p.LINE_SPACING,g=p.FROM_TL,y=p.FROM_BR,v=rZ(),x=rQ(),_=rG(),w=/^legend[0-9]*$/;function k(e,t){var h,p,b=t||{},w=e._fullLayout,k=_.getId(b),S=b._inHover;if(S?(p=b.layer,h="hover"):(p=w._infolayer,h=k),p){if(h+=w._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),S){if(!b.entries)return;P=v(b.entries,b)}else{for(var P,z,O=(e.calcdata||[]).slice(),D=w.shapes,R=0;R1)}var B=w.hiddenlabels||[];if(!S&&(!w.showlegend||!P.length))return p.selectAll("."+k).remove(),w._topdefs.select("#"+h).remove(),i.autoMargin(e,k);var N=n.ensureSingle(p,"g",k,function(e){S||e.attr("pointer-events","all")}),U=n.ensureSingleById(w._topdefs,"clipPath",h,function(e){e.append("rect")}),V=n.ensureSingle(N,"rect","bg",function(e){e.attr("shape-rendering","crispEdges")});V.call(c.stroke,b.bordercolor).call(c.fill,b.bgcolor).style("stroke-width",b.borderwidth+"px");var q=n.ensureSingle(N,"g","scrollbox"),H=b.title;b._titleWidth=0,b._titleHeight=0,H.text?((z=n.ensureSingle(q,"text",k+"titletext")).attr("text-anchor","start").call(l.font,H.font).text(H.text),C(z,q,e,b,1),!S&&(b.titleclick||b.titledoubleclick)&&function(e,t,i,s){if(t._fullData.some(function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(s):t===s)&&a.traceIs(e,"pie-like")}))return;let l=t._context.doubleClickDelay;var u,h=1;let d=n.ensureSingle(e,"rect",s+"titletoggle",function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(d.on("mousedown",function(){(u=new Date().getTime())-t._legendMouseDownTimel&&(h=Math.max(h-1,1));let e={event:r.event,legendId:s,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(1===h&&i.titleclick){if(!1===o.triggerHandler(t,"plotly_legendtitleclick",e))return;i._titleClickTimeout=setTimeout(function(){t._fullLayout&&f(t,i,i.titleclick)},l)}else 2===h&&(i._titleClickTimeout&&clearTimeout(i._titleClickTimeout),t._legendMouseDownTime=0,!1!==o.triggerHandler(t,"plotly_legendtitledoubleclick",e)&&i.titledoubleclick&&f(t,i,i.titledoubleclick))}))}(q,e,b,k)):(q.selectAll("."+k+"titletext").remove(),q.selectAll("."+k+"titletoggle").remove());var G=n.ensureSingle(N,"rect","scrollbar",function(e){e.attr(d.scrollBarEnterAttrs).call(c.fill,d.scrollBarColor)}),W=q.selectAll("g.groups").data(P);W.enter().append("g").attr("class","groups"),W.exit().remove();var Y=W.selectAll("g.traces").data(n.identity);Y.enter().append("g").attr("class","traces"),Y.exit().remove(),Y.style("opacity",function(t){let r=t[0],n=r.trace;if(r.groupTitle){let t=n.legendgroup,r=(w.shapes||[]).filter(function(e){return e.showlegend});return e._fullData.concat(r).some(function(e){return e.legendgroup===t&&(e.legend||"legend")===k&&!0===e.visible})?1:.5}return a.traceIs(n,"pie-like")?-1!==B.indexOf(t[0].label)?.5:1:"legendonly"===n.visible?.5:1}).each(function(){r.select(this).call(M,e,b)}).call(x,e,b).each(function(t){S||t[0].groupTitle&&"toggleitem"===b.groupclick||r.select(this).call(E,e,k)}),n.syncOrAsync([i.previousPromises,function(){return function(e,t,n,i,a){var o,s,c,h,f=e._fullLayout,p=_.getId(i);i||(i=f[p]);var g=f._size,y=_.isVertical(i),v=_.isGrouped(i),x="fraction"===i.entrywidthmode,b=i.borderwidth,w=2*b,k=d.itemGap,A=i.indentation+i.itemwidth+2*k,M=2*(b+k),S=I(i),E=i.y<0||0===i.y&&"top"===S,C=i.y>1||1===i.y&&"bottom"===S,P=i.tracegroupgap,z={};let{orientation:O,yref:D}=i,{maxheight:R}=i,j=E||C||"v"!==O||"paper"!==D;R||(R=j?.5:1);let F=j?f.height:g.h;i._maxHeight=Math.max(R>1?R:R*F,30);var B=0;i._width=0,i._height=0;var N=(s=0,c=0,(h=(o=i).title.side)&&(-1!==h.indexOf("left")&&(s=o._titleWidth),-1!==h.indexOf("top")&&(c=o._titleHeight)),[s,c]);if(y)n.each(function(e){var t=e[0].height;l.setTranslate(this,b+N[0],b+N[1]+i._height+t/2+k),i._height+=t,i._width=Math.max(i._width,e[0].width)}),B=A+i._width,i._width+=k+A+w,i._height+=M,v&&(t.each(function(e,t){l.setTranslate(this,0,t*i.tracegroupgap)}),i._height+=(i._lgroupsLength-1)*i.tracegroupgap);else{var U=L(i),V=i.x<0||0===i.x&&"right"===U,q=i.x>1||1===i.x&&"left"===U,H=C||E,G=f.width/2;i._maxWidth=Math.max(V?H&&"left"===U?g.l+g.w:G:q?H&&"right"===U?g.r+g.w:G:g.w,2*A);var W=0,Y=0;n.each(function(e){var t=T(e,i,A);W=Math.max(W,t),Y+=t}),B=null;var X=0;if(v){var Z=0,$=0,K=0;t.each(function(){var e=0,t=0;r.select(this).selectAll("g.traces").each(function(r){var n=T(r,i,A),a=r[0].height;l.setTranslate(this,N[0],N[1]+b+k+a/2+t),t+=a,e=Math.max(e,n),z[r[0].trace.legendgroup]=e});var n=e+k;$>0&&n+b+$>i._maxWidth?(X=Math.max(X,$),$=0,K+=Z+P,Z=t):Z=Math.max(Z,t),l.setTranslate(this,$,K),$+=n}),i._width=Math.max(X,$)+b,i._height=K+Z+M}else{var J=n.size(),Q=Y+w+(J-1)*k=i._maxWidth&&(X=Math.max(X,en),et=0,er+=ee,i._height+=ee,ee=0),l.setTranslate(this,N[0]+b+et,N[1]+b+er+t/2+k),en=et+r+k,et+=n,ee=Math.max(ee,t)}),Q?(i._width=et+w,i._height=ee+M):(i._width=Math.max(X,en)+w,i._height+=ee+M)}}i._width=Math.ceil(Math.max(i._width+N[0],i._titleWidth+2*(b+d.titlePad))),i._height=Math.ceil(Math.max(i._height+N[1],i._titleHeight+2*(b+d.itemGap))),i._effHeight=Math.min(i._height,i._maxHeight);var ei=e._context.edits,ea=ei.legendText||ei.legendPosition;n.each(function(e){var t=r.select(this).select("."+p+"toggle"),n=e[0].height,a=e[0].trace.legendgroup,o=T(e,i,A);v&&""!==a&&(o=z[a]);var s=ea?A:B||o;y||x||(s+=k/2),l.setRect(t,0,-n/2,s,n)});var eo=a.select("."+p+"titletext");eo.node()&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var n=t.title.font.size*m,i=0,a=e.node(),o=l.bBox(a).width;"top center"===t.title.side?i=.5*(t._width-2*r-2*d.titlePad-o):"top right"===t.title.side&&(i=t._width-2*r-2*d.titlePad-o),u.positionText(e,r+d.titlePad+i,r+n)}}(eo,i,b);var es=a.select("."+p+"titletoggle");if(es.size()&&eo.node()){var el=eo.attr("x")||0,ec=d.titlePad;l.setRect(es,el-ec,b,i._titleWidth+2*ec,i._titleHeight+2*ec)}}(e,W,Y,b,q)},function(){var t,o,c,u,f=w._size,m=b.borderwidth,v="paper"===b.xref,x="paper"===b.yref;if(H.text){let t=(w.shapes||[]).filter(function(e){return e.showlegend}),r=e._fullData.concat(t).some(function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(k):t===k)&&!0===e.visible});z.style("opacity",r?1:.5)}if(!S){if(function(e,t,r,n){var a=e._fullLayout,o=a[t],s=L(o),l=I(o),c="paper"===o.xref,u="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var h=o.y<.5?"b":"t",f=o.x<.5?"l":"r",d={r:a.width-r,l:r+o._width,b:a.height-n,t:n+o._effHeight};if(c&&u)return i.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*g[s],r:o._width*y[s],b:o._effHeight*y[l],t:o._effHeight*g[l]});c?e._fullLayout._reservedMargin[t][h]=d[h]:u||"v"===o.orientation?e._fullLayout._reservedMargin[t][f]=d[f]:e._fullLayout._reservedMargin[t][h]=d[h]}(e,k,R=v?f.l+f.w*b.x-g[L(b)]*b._width:w.width*b.x-g[L(b)]*b._width,j=x?f.t+f.h*(1-b.y)-g[I(b)]*b._effHeight:w.height*(1-b.y)-g[I(b)]*b._effHeight))return;if(w.margin.autoexpand){var _=R,T=j;R=v?n.constrain(R,0,w.width-b._width):_,j=x?n.constrain(j,0,w.height-b._effHeight):T,R!==_&&n.log("Constrain "+k+".x to make legend fit inside graph"),j!==T&&n.log("Constrain "+k+".y to make legend fit inside graph")}l.setTranslate(N,R,j)}if(G.on(".drag",null),N.on("wheel",null),S||b._height<=b._maxHeight||e._context.staticPlot){var M=b._effHeight;S&&(M=b._height),V.attr({width:b._width-m,height:M-m,x:m/2,y:m/2}),l.setTranslate(q,0,0),U.select("rect").attr({width:b._width-2*m,height:M-2*m,x:m,y:m}),l.setClipUrl(q,h,e),l.setRect(G,0,0,0,0),delete b._scrollY}else{var E=Math.max(d.scrollBarMinHeight,b._effHeight*b._effHeight/b._height),C=b._effHeight-E-2*d.scrollBarMargin,P=b._height-b._effHeight,O=C/P,D=Math.min(b._scrollY||0,P);V.attr({width:b._width-2*m+d.scrollBarWidth+d.scrollBarMargin,height:b._effHeight-m,x:m/2,y:m/2}),U.select("rect").attr({width:b._width-2*m+d.scrollBarWidth+d.scrollBarMargin,height:b._effHeight-2*m,x:m,y:m+D}),l.setClipUrl(q,h,e),K(D,E,O),N.on("wheel",function(){K(D=n.constrain(b._scrollY+r.event.deltaY/P*C,0,P),E,O),0!==D&&D!==P&&r.event.preventDefault()});var R,j,F,B,W,Y=function(e,t,r){var i=(r-t)/O+e;return n.constrain(i,0,P)},X=function(e,t,r){var i=(t-r)/O+e;return n.constrain(i,0,P)},Z=r.behavior.drag().on("dragstart",function(){var e=r.event.sourceEvent;F="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,W=D}).on("drag",function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||(B="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,K(D=Y(W,F,B),E,O))});G.call(Z);var $=r.behavior.drag().on("dragstart",function(){var e=r.event.sourceEvent;"touchstart"===e.type&&(F=e.changedTouches[0].clientY,W=D)}).on("drag",function(){var e=r.event.sourceEvent;"touchmove"===e.type&&(B=e.changedTouches[0].clientY,K(D=X(W,F,B),E,O))});q.call($)}function K(t,r,n){b._scrollY=e._fullLayout[k]._scrollY=t,l.setTranslate(q,0,-t),l.setRect(G,b._width,d.scrollBarMargin+t*n,d.scrollBarWidth,r),U.select("rect").attr("y",m+t)}e._context.edits.legendPosition&&(N.classed("cursor-move",!0),s.init({element:N.node(),gd:e,prepFn:function(e){if(e.target!==G.node()){var t=l.getTranslate(N);c=t.x,u=t.y}},moveFn:function(e,r){if(void 0!==c&&void 0!==u){var n=c+e,i=u+r;l.setTranslate(N,n,i),t=s.align(n,b._width,f.l,f.l+f.w,b.xanchor),o=s.align(i+b._height,-b._height,f.t+f.h,f.t,b.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==o){var r={};r[k+".x"]=t,r[k+".y"]=o,a.call("_guiRelayout",e,r)}},clickFn:function(t,r){var n=p.selectAll("g.traces").filter(function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom});n.size()>0&&A(e,b,n,t,r)}}))}],e)}}function T(e,t,r){var n=e[0],i=n.width,a=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return"fraction"===a?t._maxWidth*o:r+(o||i)}function A(e,t,r,n,i){var s=e._fullLayout,l=r.data()[0][0].trace,c=t.itemclick,u=t.itemdoubleclick,f={event:i,node:r.node(),curveNumber:l.index,expandedIndex:l.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:s};l._group&&(f.group=l._group),a.traceIs(l,"pie-like")&&(f.label=r.datum()[0].label);var d=o.triggerHandler(e,"plotly_legendclick",f);if(1===n){if(!1===d)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&c&&h(r,e,t,c)},e._context.doubleClickDelay)}else 2===n&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==o.triggerHandler(e,"plotly_legenddoubleclick",f)&&!1!==d&&u&&h(r,e,t,u))}function M(e,t,r){var i,o,s=_.getId(r),c=e.data()[0][0],h=c.trace,f=a.traceIs(h,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!f,m=r._maxNameLength;c.groupTitle?(i=c.groupTitle.text,o=c.groupTitle.font):(o=r.font,r.entries?i=c.text:(i=f?c.label:h.name,h._meta&&(i=n.templateString(i,h._meta))));var g=n.ensureSingle(e,"text",s+"text");g.attr("text-anchor","start").call(l.font,o).text(p?S(i,m):i);var y=r.indentation+r.itemwidth+2*d.itemGap;u.positionText(g,y,0),p?g.call(u.makeEditable,{gd:t,text:i}).call(C,e,t,r).on("edit",function(n){this.text(S(n,m)).call(C,e,t,r);var i={};return i.name=n,c.trace._isShape?a.call("_guiRelayout",t,"shapes["+h.index+"].name",i.name):a.call("_guiRestyle",t,i,h.index)}):C(g,e,t,r)}function S(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function E(e,t,i){var a,o=t._context.doubleClickDelay,s=1,l=n.ensureSingle(e,"rect",i+"toggle",function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){(a=new Date().getTime())-t._legendMouseDownTimeo&&(s=Math.max(s-1,1)),A(t,n,e,s,r.event)}}))}function C(e,t,r,n,i){n._inHover&&e.attr("data-notex",!0),u.convertToTspans(e,r,function(){!function(e,t,r,n){var i=e.data()[0][0],a=i&&i.trace.showlegend;if(Array.isArray(a)&&(a=!1!==a[i.i]),!r._inHover&&i&&!a)return e.remove();var o=e.select("g[class*=math-group]"),s=o.node(),c=_.getId(r);r||(r=t._fullLayout[c]);var h,f,p=r.borderwidth,g=(1===n?r.title.font:i.groupTitle?i.groupTitle.font:r.font).size*m;if(s){var y=l.bBox(s);h=y.height,f=y.width,1===n?l.setTranslate(o,p,p+.75*h):l.setTranslate(o,0,.25*h)}else{var v=e.select("."+c+(1===n?"title":"")+"text"),x=u.lineCount(v),b=v.node();if(h=g*x,f=b?l.bBox(b).width:0,1===n)"left"===r.title.side&&(f+=2*d.itemGap),u.positionText(v,p+d.titlePad,p+g);else{var w=2*d.itemGap+r.indentation+r.itemwidth;i.groupTitle&&(w=d.itemGap,f-=r.indentation+r.itemwidth),u.positionText(v,w,-g*((x-1)/2-.3))}}1===n?(r._titleWidth=f,r._titleHeight=h):(i.lineHeight=g,i.height=Math.max(h,16)+3,i.width=f)}(t,r,n,i)})}function L(e){return n.isRightAnchor(e)?"right":n.isCenterAnchor(e)?"center":"left"}function I(e){return n.isBottomAnchor(e)?"bottom":n.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e,t){if(t)k(e,t);else{var n=e._fullLayout,i=n._legends;n._infolayer.selectAll('[class^="legend"]').each(function(){var e=r.select(this),t=e.attr("class").split(" ")[0];t.match(w)&&-1===i.indexOf(t)&&e.remove()});for(var a=0;aZ[0]._length||eb<0||eb>$[0]._length)return f.unhoverRaw(e,a)}else ex="xpx"in a?a.xpx:Z[0]._length/2,eb="ypx"in a?a.ypx:$[0]._length/2;if(a.pointerX=ex+Z[0]._offset,a.pointerY=eb+$[0]._offset,er="xval"in a?g.flat(b,a.xval):g.p2c(Z,ex),en="yval"in a?g.flat(b,a.yval):g.p2c($,eb),!r(er[0])||!r(en[0]))return n.warn("Fx.hover failed",a,e),f.unhoverRaw(e,a)}_.clickanywhere&&(e._hoverXVals=er,e._hoverYVals=en,e._hoverXAxes=Z,e._hoverYAxes=$);var eT=1/0;function eA(t,i){for(ea=0;eaep&&(em.splice(0,ep),eT=em[0].distance),M&&0!==et&&0===em.length){ed.distance=et,ed.index=!1;var u=es._module.hoverPoints(ed,eh,ef,"closest",{hoverLayer:_._hoverlayer});if(u&&(u=u.filter(function(e){return e.spikeDistance<=et})),u&&u.length){var f,p=u.filter(function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap});if(p.length){var m=p[0];r(m.x0)&&r(m.y0)&&(f=eS(m),(!ey.vLinePoint||ey.vLinePoint.spikeDistance>f.spikeDistance)&&(ey.vLinePoint=f))}var y=u.filter(function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap});if(y.length){var v=y[0];r(v.x0)&&r(v.y0)&&(f=eS(v),(!ey.hLinePoint||ey.hLinePoint.spikeDistance>f.spikeDistance)&&(ey.hLinePoint=f))}}}}}function eM(e,t,r){for(var n,i=null,a=1/0,o=0;oe.trace.index===eO.trace.index):[eO]).length;eA(U("x",eO,_),U("y",eO,_));var eR,ej=[],eF={},eB=0,eN=function(e){var t=C[e.trace.type]?P(e):e.trace.index;if(eF[t]){var r=eF[t]-1,n=ej[r];r>0&&Math.abs(e.distance)eD-1;eR--)eN(em[eR]);em=ej,eL()}var eU=e._hoverdata,eV=[],eq=V(e),eH=H(e);for(let e of em){var eG=g.makeEventData(e,e.trace,e.cd);if(!1!==e.hovertemplate){var eW=!1;e.cd[e.index]&&e.cd[e.index].ht&&(eW=e.cd[e.index].ht),e.hovertemplate=eW||e.trace.hovertemplate||!1}if(e.xa&&e.ya){var eY=e.x0+e.xa._offset,eX=e.x1+e.xa._offset,eZ=e.y0+e.ya._offset,e$=e.y1+e.ya._offset;eG.bbox={x0:Math.min(eY,eX)+eH,x1:Math.max(eY,eX)+eH,y0:Math.min(eZ,e$)+eq,y1:Math.max(eZ,e$)+eq},eG.xPixel=(eY+eX)/2,eG.yPixel=(eZ+e$)/2}e.eventData=[eG],eV.push(eG)}e._hoverdata=eV;var eK="y"===E&&(eg.length>1||em.length>1)||"closest"===E&&ev&&em.length>1,eJ=h.combine(_.plot_bgcolor||h.background,_.paper_bgcolor),eQ=O(em,{gd:e,hovermode:E,rotateLabels:eK,bgColor:eJ,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),e0=eQ.hoverLabels;if(g.isUnifiedHover(E)||(function(e,t,r,n){var i,a,o,s,l,c,u,h=t?"xa":"ya",f=t?"ya":"xa",d=0,p=1,m=e.size(),g=Array(m),y=0,v=n.minX,x=n.maxX,b=n.minY,_=n.maxY,w=function(e){return e*r._invScaleX},T=function(e){return e*r._invScaleY};function A(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,a>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=a;i=!1}if(!(o<.01)){if(a<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=o;i=!1}if(i){var n=0;for(s=0;st.pmax&&n++;for(s=e.length-1;s>=0&&!(n<=0);s--)(c=e[s]).pos>t.pmax-1&&(c.del=!0,n--);for(s=0;s=0;l--)e[l].dp-=o;for(s=e.length-1;s>=0&&!(n<=0);s--)(c=e[s]).pos+c.dp+c.size>t.pmax&&(c.del=!0,n--)}}}for(e.each(function(e){var n=e[h],i=e[f],a="x"===n._id.charAt(0),o=n.range;0===y&&o&&o[0]>o[1]!==a&&(p=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,d=R(e,t),m=e.anchor,A="end"===m?-1:1;if("middle"===m)u=(c=e.crossPos+(a?T(d.y-e.by/2):w(e.bx/2+e.tx2width/2)))+(a?T(e.by):w(e.bx));else if(a)u=(c=e.crossPos+T(S+d.y)-T(e.by/2-S))+T(e.by);else{var M=w(A*S+d.x),E=M+w(A*e.bx);c=e.crossPos+Math.min(M,E),u=e.crossPos+Math.max(M,E)}a?void 0!==b&&void 0!==_&&Math.min(u,_)-Math.max(c,b)>1&&("left"===i.side?(s=i._mainLinePosition,l=r.width):l=i._mainLinePosition):void 0!==v&&void 0!==x&&Math.min(u,x)-Math.max(c,v)>1&&("top"===i.side?(s=i._mainLinePosition,l=r.height):l=i._mainLinePosition)}g[y++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?k:1)/2,pmin:s,pmax:l}]}),g.sort(function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)});!i&&d<=m;){for(d++,i=!0,s=0;s.01){for(l=E.length-1;l>=0;l--)E[l].dp+=a;for(M.push.apply(M,E),g.splice(s+1,1),u=0,l=M.length-1;l>=0;l--)u+=M[l].dp;for(o=u/M.length,l=M.length-1;l>=0;l--)M[l].dp-=o;i=!1}else s++}g.forEach(A)}for(s=g.length-1;s>=0;s--){var I=g[s];for(l=I.length-1;l>=0;l--){var P=I[l],z=P.datum;z.offset=P.dp,z.del=P.del}}}(e0,eK,_,eQ.commonLabelBoundingBox),j(e0,eK,_._invScaleX,_._invScaleY)),u&&u.tagName){var e1=m.getComponentMethod("annotations","hasClickToShow")(e,eV);c(t.select(u),e1?"pointer":"")}var e2=function(e,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var r=t.length-1;r>=0;r--){var n=t[r],i=e._hoverdata[r];if(n.curveNumber!==i.curveNumber||String(n.pointNumber)!==String(i.pointNumber)||String(n.pointNumbers)!==String(i.pointNumbers)||n.binNumber!==i.binNumber)return!0}return!1}(e,eU);function e3(t){e.emit("plotly_hover",{event:a,points:t,xaxes:Z,yaxes:$,xvals:er,yvals:en})}u&&!l&&(e2||_.hoveranywhere)&&(eU&&e2&&e.emit("plotly_unhover",{event:a,points:eU}),e3(e._hoverdata))}(e,a,o,l,u)})},e.loneHover=function(e,r){var n=!0;Array.isArray(e)||(n=!1,e=[e]);var i=r.gd,a=V(i),o=H(i),s=O(e.map(function(e){var t=e._x0||e.x0||e.x||0,n=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(t,n),f=Math.max(t,n),d=Math.min(s,l),p=Math.max(s,l),g=e.trace;if(m.traceIs(g,"gl3d")){var y=i._fullLayout[g.scene]._scene.container,v=y.offsetLeft,x=y.offsetTop;u+=v,f+=v,d+=x,p+=x}c.bbox={x0:u+o,x1:f+o,y0:d+a,y1:p+a},c.xPixel=(t+n)/2,c.yPixel=(s+l)/2,r.inOut_bbox&&r.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||h.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}}),{gd:i,hovermode:"closest",rotateLabels:!1,bgColor:r.bgColor||h.background,container:t.select(r.container),outerContainer:r.outerContainer||r.container}).hoverLabels,l=0,c=0;return s.sort(function(e,t){return e.y0-t.y0}).each(function(e,t){var n=e.y0-e.by/2;n-5([\s\S]*)<\/extra>/;function O(e,r){var i=r.gd,s=i._fullLayout,c=r.hovermode,f=r.rotateLabels,d=r.bgColor,p=r.container,b=r.outerContainer,w=r.commonLabelOpts||{};if(0===e.length)return[[]];var k=r.fontFamily||y.HOVERFONT,T=r.fontSize||y.HOVERFONTSIZE,A=r.fontWeight||s.font.weight,M=r.fontStyle||s.font.style,C=r.fontVariant||s.font.variant,L=r.fontTextcase||s.font.textcase,I=r.fontLineposition||s.font.lineposition,z=r.fontShadow||s.font.shadow,O=e[0],R=O.xa,j=O.ya,F=c.charAt(0),B=F+"Label",N=O[B];if(void 0===N&&"multicategory"===R.type)for(var U=0;Us.width-_&&(P=s.width-_),r.attr("d","M"+(y-P)+",0L"+(y-P+S)+","+b+S+"H"+_+"v"+b+(2*E+x.height)+"H"+-_+"V"+b+S+"H"+(y-P-S)+"Z"),Q.minX=(y=P)-_,Q.maxX=y+_,"top"===R.side?(Q.minY=v-(2*E+x.height),Q.maxY=v-E):(Q.minY=v+E,Q.maxY=v+(2*E+x.height))}else{"right"===j.side?(D="start",F=1,B="",y=R._offset+R._length):(D="end",F=-1,B="-",y=R._offset),v=j._offset+(O.y0+O.y1)/2,o.attr("text-anchor",D),r.attr("d","M0,0L"+B+S+","+S+"V"+(E+x.height/2)+"h"+B+(2*E+x.width)+"V-"+(E+x.height/2)+"H"+B+S+"V-"+S+"Z"),Q.minY=v-(E+x.height/2),Q.maxY=v+(E+x.height/2),"right"===j.side?(Q.minX=y+S,Q.maxX=y+S+(2*E+x.width)):(Q.minX=y-S-(2*E+x.width),Q.maxX=y-S);var D,F,B,U,V=x.height/2,H=q-x.top-V,W="clip"+s._uid+"commonlabel"+j._id;if(y"none"!==e.hoverinfo);if(0===t.length)return[];var ee,et,er,en,ei=s.hoverlabel,ea=ei.font,eo=t[0],es=(("x unified"===c?eo.xa:eo.ya).unifiedhovertitle||{}).text,el={showlegend:!0,legend:{title:{text:es?n.hovertemplateString({data:"x unified"===c?[{xa:eo.xa,x:eo.xVal}]:[{ya:eo.ya,y:eo.yVal}],fallback:eo.trace.hovertemplatefallback,locale:s._d3locale,template:es}):N,font:ea},font:ea,bgcolor:ei.bgcolor,bordercolor:ei.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:s.legend?s.legend.traceorder:void 0,orientation:"v"}},ec={font:ea};v(el,ec,i._fullData);var eu=ec.legend;eu.entries=[];for(var eh=0;eh=0?ee:et+e_=0?et:eS+e_=0?ey:ev+ew=0?ev:eE+ew=0,("top"===e.idealAlign||!K)&&J?(B-=V/2,e.anchor="end"):K?(B+=V/2,e.anchor="start"):e.anchor="middle",e.crossPos=B;else{if(e.pos=B,K=F+U/2+Q<=H,J=F-U/2-Q>=0,("left"===e.idealAlign||!K)&&J)F-=U/2,e.anchor="end";else if(K)F+=U/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,et=F+ee-H,er=F-ee;et>0&&(F-=et),er<0&&(F+=-er)}e.crossPos=F}w.attr("text-anchor",e.anchor),O&&P.attr("text-anchor",e.anchor),r.attr("transform",a(F,B)+(f?o(_):""))}),{hoverLabels:eC,commonLabelBoundingBox:Q}}function D(e,t,r,i,a,o){var s,l,c="",u="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=n.templateString(e.name,e.trace._meta)),c=N(e.name,e.nameLength));var h=r.charAt(0);void 0!==e.zLabel?(void 0!==e.xLabel&&(u+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(u+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmap"!==e.trace.type&&(u+=(u?"z: ":"")+e.zLabel)):t&&e[h+"Label"]===a?u=e[("x"===h?"y":"x")+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(u=e.yLabel):u=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",(e.text||0===e.text)&&!Array.isArray(e.text)&&(u+=(u?"
":"")+e.text),void 0!==e.extraText&&(u+=(u?"
":"")+e.extraText),o&&""===u&&!e.hovertemplate&&(""===c&&o.remove(),u=c),null!=(l=null==(s=e.trace)?void 0:s.hoverlabel)&&l.split&&(e.hovertemplate="");let{hovertemplate:f=!1}=e;if(f){let t=e.hovertemplateLabels||e;e[h+"Label"]!==a&&(t[h+"other"]=t[h+"Val"],t[h+"otherLabel"]=t[h+"Label"]),u=(u=n.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:t,locale:i._d3locale,template:f})).replace(z,(t,r)=>(c=N(r,e.nameLength),""))}return[u,c]}function R(e,t){var r=0,n=e.offset;return t&&(n*=-M,r=e.offset*T),{x:r,y:n}}function j(e,r,n,i){var a=function(e){return e*n},o=function(e){return e*i};e.each(function(e){var n=t.select(this);if(e.del)return n.remove();var i,s,c,h,f=n.select("text.nums"),d=e.anchor,p="end"===d?-1:1,m=(c=(s=(i=({start:1,end:-1,middle:0})[e.anchor])*(S+E))+i*(e.txwidth+E),"middle"===e.anchor&&(s-=e.tx2width/2,c+=e.txwidth/2+E),{alignShift:i,textShiftX:s,text2ShiftX:c}),g=R(e,r),y=g.x,v=g.y,x="middle"===d,b=!("hoverlabel"in e.trace)||e.trace.hoverlabel.showarrow;h=x?"M-"+a(e.bx/2+e.tx2width/2)+","+o(v-e.by/2)+"h"+a(e.bx)+"v"+o(e.by)+"h-"+a(e.bx)+"Z":b?"M0,0L"+a(p*S+y)+","+o(S+v)+"v"+o(e.by/2-S)+"h"+a(p*e.bx)+"v-"+o(e.by)+"H"+a(p*S+y)+"V"+o(v-S)+"Z":"M"+a(p*S+y)+","+o(v-e.by/2)+"h"+a(p*e.bx)+"v"+o(e.by)+"h"+a(-p*e.bx)+"Z",n.select("path").attr("d",h);var _=y+m.textShiftX,w=v+e.ty0-e.by/2+E,k=e.textAlign||"auto";"auto"!==k&&("left"===k&&"start"!==d?(f.attr("text-anchor","start"),_=x?-e.bx/2-e.tx2width/2+E:-e.bx-E):"right"===k&&"end"!==d&&(f.attr("text-anchor","end"),_=x?e.bx/2-e.tx2width/2-E:e.bx+E)),f.call(l.positionText,a(_),o(w)),e.tx2width&&(n.select("text.name").call(l.positionText,a(m.text2ShiftX+m.alignShift*E+y),o(v+e.ty0-e.by/2+E)),n.select("rect").call(u.setRect,a(m.text2ShiftX+(m.alignShift-1)*e.tx2width/2+y),o(v-e.by/2-1),a(e.tx2width),o(e.by+2)))})}function F(e,t,r){var n,i,a=r.container,o=r.fullLayout,s=o._size,l=r.event,c=!!t.hLinePoint,f=!!t.vLinePoint;if(a.selectAll(".spikeline").remove(),f||c){var p=h.combine(o.plot_bgcolor,o.paper_bgcolor);if(c){var m,g,y=t.hLinePoint;n=y&&y.xa,"cursor"===(i=y&&y.ya).spikesnap?(m=l.pointerX,g=l.pointerY):(m=n._offset+y.x,g=i._offset+y.y);var v,x,b=1.5>h.color(y.color).contrast(h.color(p))?h.contrast(p):y.color,_=i.spikemode,w=i.spikethickness,k=i.spikecolor||b,T=d.getPxPosition(e,i);if(-1!==_.indexOf("toaxis")||-1!==_.indexOf("across")){if(-1!==_.indexOf("toaxis")&&(v=T,x=m),-1!==_.indexOf("across")){var A=i._counterDomainMin,M=i._counterDomainMax;"free"===i.anchor&&(A=Math.min(A,i.position),M=Math.max(M,i.position)),v=s.l+A*s.w,x=s.l+M*s.w}a.insert("line",":first-child").attr({x1:v,x2:x,y1:g,y2:g,"stroke-width":w,stroke:k,"stroke-dasharray":u.dashStyle(i.spikedash,w)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:v,x2:x,y1:g,y2:g,"stroke-width":w+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==_.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:T+("right"!==i.side?w:-w),cy:g,r:w,fill:k}).classed("spikeline",!0)}if(f){var S,E,C=t.vLinePoint;n=C&&C.xa,i=C&&C.ya,"cursor"===n.spikesnap?(S=l.pointerX,E=l.pointerY):(S=n._offset+C.x,E=i._offset+C.y);var L,I,P=1.5>h.color(C.color).contrast(h.color(p))?h.contrast(p):C.color,z=n.spikemode,O=n.spikethickness,D=n.spikecolor||P,R=d.getPxPosition(e,n);if(-1!==z.indexOf("toaxis")||-1!==z.indexOf("across")){if(-1!==z.indexOf("toaxis")&&(L=R,I=E),-1!==z.indexOf("across")){var j=n._counterDomainMin,F=n._counterDomainMax;"free"===n.anchor&&(j=Math.min(j,n.position),F=Math.max(F,n.position)),L=s.t+(1-F)*s.h,I=s.t+(1-j)*s.h}a.insert("line",":first-child").attr({x1:S,x2:S,y1:L,y2:I,"stroke-width":O,stroke:D,"stroke-dasharray":u.dashStyle(n.spikedash,O)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:S,x2:S,y1:L,y2:I,"stroke-width":O+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==z.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:S,cy:R-("top"!==n.side?O:-O),r:O,fill:D}).classed("spikeline",!0)}}}function B(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function N(e,t){return l.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function U(e,t,r){var n=t[e+"a"],i=t[e+"Val"],a=t.cd[0];if("category"===n.type||"multicategory"===n.type)i=n._categoriesMap[i];else if("date"===n.type){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var c=s[e+"End"];void 0===c&&(c=s[e]);var u=c-l;"end"===o?i+=u:"middle"===o&&(i+=u/2)}i=n.d2c(i)}return a&&a.t&&a.t.posLetter===n._id&&("group"===r.boxmode||"group"===r.violinmode)&&(i+=a.t.dPos),i}var V=e=>e.offsetTop+e.clientTop,H=e=>e.offsetLeft+e.clientLeft;function G(e,t){var r=e._fullLayout,i=t.getBoundingClientRect(),a=i.left,o=i.top,s=a+i.width,l=o+i.height,c=n.apply3DTransform(r._invTransform)(a,o),u=n.apply3DTransform(r._invTransform)(s,l),h=c[0],f=c[1],d=u[0],p=u[1];return{x:h,y:f,width:d-h,height:p-f,top:Math.min(f,p),left:Math.min(h,d),right:Math.max(h,d),bottom:Math.max(f,p)}}}}),r2=d({"src/components/fx/hoverlabel_defaults.js"(e,t){var r=tY(),n=eC(),i=rA().isUnifiedHover;t.exports=function(e,t,a,o){o=o||{};var s=t.legend;function l(e){o.font[e]||(o.font[e]=s?t.legend.font[e]:t.font[e])}t&&i(t.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=n.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",o.bgcolor),a("hoverlabel.bordercolor",o.bordercolor),a("hoverlabel.namelength",o.namelength),a("hoverlabel.showarrow",o.showarrow),r.coerceFont(a,"hoverlabel.font",o.font),a("hoverlabel.align",o.align)}}}),r3=d({"src/components/fx/layout_global_defaults.js"(e,t){var r=tY(),n=r2(),i=H();t.exports=function(e,t){n(e,t,function(n,a){return r.coerce(e,t,i,n,a)})}}}),r5=d({"src/components/fx/defaults.js"(e,t){var r=tY(),n=G(),i=r2();t.exports=function(e,t,a,o){var s=r.extendFlat({},o.hoverlabel);t.hovertemplate&&(s.namelength=-1),i(e,t,function(i,a){return r.coerce(e,t,n,i,a)},s)}}}),r4=d({"src/components/fx/hovermode_defaults.js"(e,t){var r=tY(),n=H();t.exports=function(e,t){function i(i,a){return void 0!==t[i]?t[i]:r.coerce(e,t,n,i,a)}return i("clickmode"),i("hoversubplots"),i("hoveranywhere"),i("clickanywhere"),i("hovermode")}}}),r6=d({"src/components/fx/layout_defaults.js"(e,t){var r=tY(),n=H(),i=r4(),a=r2();t.exports=function(e,t){function o(i,a){return r.coerce(e,t,n,i,a)}var s=i(e,t);s&&(o("hoverdistance"),o("spikedistance"),-1!==s.indexOf("unified")&&o("hoversort")),"select"===o("dragmode")&&o("selectdirection");var l=t._has("map"),c=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((l||c)&&1===u||l&&c&&2===u)&&(t.dragmode="pan"),a(e,t,o),r.coerceFont(o,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),r8=d({"src/components/fx/calc.js"(e,t){var r=tY(),n=tv();function i(e,t,n,i){i=i||r.identity,Array.isArray(e)&&(t[0][n]=i(e))}t.exports=function(e){for(var t=e.calcdata,a=e._fullLayout,o=0;o plotly-logomark "}}}}),nn=d({"src/components/shapes/draw_newshape/constants.js"(e,t){t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),ni=d({"src/components/selections/helpers.js"(e,t){var r=tY().strTranslate;function n(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}t.exports={p2r:n,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t=+("y"===e._id.charAt(0));return function(r){return n(e,r[t])}},getTransform:function(e){return r(e.xaxis._offset,e.yaxis._offset)}}}}),na=d({"src/components/shapes/draw_newshape/helpers.js"(e){var t=rM(),r=nn(),n=r.CIRCLE_SIDES,i=r.SQRT2,a=ni(),o=a.p2r,s=a.r2p,l=[0,3,4,5,6,1,2],c=[0,3,4,1,2];function u(e,t){return 1e-6>=Math.abs(e-t)}function h(e,t){var r=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+n*n)}e.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&ue+ +(void 0!==a[t.charAt(0)].drawn),0)},e.getDataToPixel=function(t,r,n,a,o){var s,l=t._fullLayout._size;if(r)if("domain"===o)s=function(e){return r._length*(a?1-e:e)+r._offset};else{var c=e.shapePositionToRange(r);s=function(e){var t=i(r,n);return r._offset+r.r2p(c(e,!0))+t},"date"===r.type&&(s=e.decodeDate(s))}else s=a?function(e){return l.t+l.h*(1-e)}:function(e){return l.l+l.w*e};return s},e.getPixelToData=function(t,r,n,i){var a,o=t._fullLayout._size;if(r)if("domain"===i)a=function(e){var t=(e-r._offset)/r._length;return n?1-t:t};else{var s=e.rangeToShapePosition(r);a=function(e){return s(r.p2r(e-r._offset))}}else a=n?function(e){return 1-(e-o.t)/o.h}:function(e){return(e-o.l)/o.w};return a},e.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(e);return 1===Math.round(t%2)?r+.5:r},e.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&"paper"!==r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}},e.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref];return n?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}},e.getPathString=function(a,o){let s=o.type,l=n.getRefType(o.xref),c=n.getRefType(o.yref),u=a._fullLayout._size;function h(t,r,n,i){var a;if(t)if("domain"===r)a=i?function(e){return t._offset+t._length*(1-e)}:function(e){return t._offset+t._length*e};else{let r=e.shapePositionToRange(t);a=function(e){return t._offset+t.r2p(r(e,!0))},"path"===n&&"date"===t.type&&(a=e.decodeDate(a))}else a=i?function(e){return u.t+u.h*(1-e)}:function(e){return u.l+u.w*e};return a}if("array"===l?(k=[],y=o.xref.map(function(e){return n.getFromId(a,e)}),k=o.xref.map(function(e,t){return h(y[t],n.getRefType(e),s,!1)})):k=h(y=n.getFromId(a,o.xref),l,s,!1),"array"===c?(T=[],v=o.yref.map(function(e){return n.getFromId(a,e)}),T=o.yref.map(function(e,t){return h(v[t],n.getRefType(e),s,!0)})):T=h(v=n.getFromId(a,o.yref),c,s,!0),"path"===s){var f,d,p,m,g;let e,n,i,a,s,l,c;return f=o,d=k,p=T,e=f.path,n=f.xsizemode,i=f.ysizemode,a=f.xanchor,s=f.yanchor,l=Array.isArray(f.xref),c=Array.isArray(f.yref),m=0,g=0,e.replace(t.segmentRE,function(e){var o=0,u=e.charAt(0),h=t.paramIsX[u],f=t.paramIsY[u],y=t.numParams[u];let v=void 0!==h.drawn,x=void 0!==f.drawn,b=l?d[m]:d,_=c?p[g]:p;var w=e.slice(1).replace(t.paramRE,function(e){return h[o]?e="pixel"===n?b(a)+Number(e):b(e):f[o]&&(e="pixel"===i?_(s)-Number(e):_(e)),++o>y&&(e="X"),e});return o>y&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+e)),v&&m++,x&&g++,u+w})}if("array"===l)x=i(y[0],o.x0shift),b=i(y[1],o.x1shift),A=k[0](o.x0)+x,M=k[1](o.x1)+b;else if(x=i(y,o.x0shift),b=i(y,o.x1shift),"pixel"===o.xsizemode){let e=k(o.xanchor);A=e+o.x0+x,M=e+o.x1+b}else A=k(o.x0)+x,M=k(o.x1)+b;if("array"===c)_=i(v[0],o.y0shift),w=i(v[1],o.y1shift),S=T[0](o.y0)+_,E=T[1](o.y1)+w;else if(_=i(v,o.y0shift),w=i(v,o.y1shift),"pixel"===o.ysizemode){let e=T(o.yanchor);S=e-o.y0+_,E=e-o.y1+w}else S=T(o.y0)+_,E=T(o.y1)+w;if("line"===s)return"M"+A+","+S+"L"+M+","+E;if("rect"===s)return"M"+A+","+S+"H"+M+"V"+E+"H"+A+"Z";var y,v,x,b,_,w,k,T,A,M,S,E,C=(A+M)/2,L=(S+E)/2,I=Math.abs(C-A),P=Math.abs(L-S),z="A"+I+","+P,O=C+I+","+L;return"M"+O+z+" 0 1,1 "+C+","+(L-P)+z+" 0 0,1 "+O+"Z"},e.getPixelShift=i}}),nu=d({"src/components/shapes/display_labels.js"(e,t){var r=tY(),n=rz(),i=rr(),a=rE(),o=na().readPaths,s=nc(),l=s.getPathString,c=tf(),u=rt().FROM_TL;t.exports=function(e,t,h,f){if(f.selectAll(".shape-label").remove(),h.label.text||h.label.texttemplate){if(h.label.texttemplate){var d={};if("path"!==h.type){var p=n.getFromId(e,h.xref),m=n.getFromId(e,h.yref);let t=Array.isArray(h.xref),r=Array.isArray(h.yref);for(var g in c){var y="function"==typeof c[g],v=!t||c.simpleXVariables.includes(g),x=!r||c.simpleYVariables.includes(g);if(y&&v&&x){var b=c[g](h,p,m);void 0!==b&&(d[g]=b)}}}_=r.texttemplateStringForShapes({data:[d],fallback:h.label.texttemplatefallback,locale:e._fullLayout._d3locale,template:h.label.texttemplate})}else _=h.label.text;var _,w,k,T,A,M=h.label.font,S=f.append("g").attr({"data-index":t}).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(_);if(h.path){var E=o(l(e,h),e);w=1/0,T=1/0,k=-1/0,A=-1/0;for(var C=0;Cs.getDataToPixel(e,n,r,!1,i)(t),m=(t,r,n,i)=>s.getDataToPixel(e,n,r,!0,i)(t);if("pixel"===h.xsizemode){let e=p(h.xanchor,void 0,i,c),t=s.getPixelShift(i,h.x0shift),r=s.getPixelShift(i,h.x1shift);w=e+h.x0+t,k=e+h.x1+r}else w=p(h.x0,h.x0shift,i,c),k=p(h.x1,h.x1shift,a,u);if("pixel"===h.ysizemode){let e=m(h.yanchor,void 0,o,f),t=s.getPixelShift(o,h.y0shift),r=s.getPixelShift(o,h.y1shift);T=e-h.y0+t,A=e-h.y1+r}else T=m(h.y0,h.y0shift,o,f),A=m(h.y1,h.y1shift,l,d)}var D=h.label.textangle;"auto"===D&&(D="line"===h.type?function(e,t,r,n){var i;return i=Math.abs(r-e),-180/Math.PI*Math.atan2(r>=e?t-n:n-t,i)}(w,T,k,A):0),S.call(function(t){return t.call(a.font,M).attr({}),i.convertToTspans(t,e),t});var R=function(e,t,r,n,i,a,o){var s,l,c,h,f=i.label.textposition,d=i.label.textangle,p=i.label.padding,m=i.type,g=Math.PI/180*a,y=Math.sin(g),v=Math.cos(g),x=i.label.xanchor,b=i.label.yanchor;if("line"===m){"start"===f?(s=e,l=t):"end"===f?(s=r,l=n):(s=(e+r)/2,l=(t+n)/2),"auto"===x&&(x="start"===f?"auto"===d?r>e?"left":re?"right":re?"right":re?"left":r1&&(2!==e.length||"Z"!==e[1][0])&&(0===S&&(e[0][0]="M"),t[M]=e,L(),I())}}()}}function U(e,r){(function(e,r){if(t.length)for(var n=0;nS?(L=k,O="y0",I=S,D="y1"):(L=S,O="y1",I=k,D="y0"),eo(r),ec(c,o),n=t,i=o,s=e,l=i.xref,u=i.yref,f=a.getFromId(s,l),d=a.getFromId(s,u),p="","paper"===l||f.autorange||(p+=l),"paper"===u||d.autorange||(p+=u),h.setClipUrl(n,p?"clip"+s._fullLayout._uid+p:null,s),ea.moveFn="move"===B?es:el,ea.altKey=r.altKey)},doneFn:function(){_(e)||(m(t),eu(c),T(t,e,o),n.call("_guiRelayout",e,u.getUpdateObj()))},clickFn:function(){_(e)||eu(c)}};function eo(r){if(_(e)){B=null;return}if(V)B="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var n=ea.element.getBoundingClientRect(),i=n.right-n.left,a=n.bottom-n.top,o=r.clientX-n.left,s=r.clientY-n.top,l=!q&&i>10&&a>10&&!r.shiftKey?d.getCursor(o/i,1-s/a):"move";m(t,l),B=l.split("-")[0]}}function es(r,n){if("path"===o.type){var i=function(e){return e},a=i,u=i;N?H("xanchor",o.xanchor=er(E+r)):(a=function(e){return er(ee(e)+r)},W&&"date"===W.type&&(a=y.encodeDate(a))),U?H("yanchor",o.yanchor=en(C+n)):(u=function(e){return en(et(e)+n)},X&&"date"===X.type&&(u=y.encodeDate(u))),H("path",o.path=A(F,a,u))}else N?H("xanchor",o.xanchor=er(E+r)):(H("x0",o.x0=er(w+r)),H("x1",o.x1=er(M+r))),U?H("yanchor",o.yanchor=en(C+n)):(H("y0",o.y0=en(k+n)),H("y1",o.y1=en(S+n)));t.attr("d",v(e,o)),ec(c,o),l(e,s,o,G)}function el(r,n){if(q){var i=function(e){return e},a=i,u=i;N?H("xanchor",o.xanchor=er(E+r)):(a=function(e){return er(ee(e)+r)},W&&"date"===W.type&&(a=y.encodeDate(a))),U?H("yanchor",o.yanchor=en(C+n)):(u=function(e){return en(et(e)+n)},X&&"date"===X.type&&(u=y.encodeDate(u))),H("path",o.path=A(F,a,u))}else if(V){if("resize-over-start-point"===B){var h=w+r,f=U?k-n:k+n;H("x0",o.x0=N?h:er(h)),H("y0",o.y0=U?f:en(f))}else if("resize-over-end-point"===B){var d=M+r,p=U?S-n:S+n;H("x1",o.x1=N?d:er(d)),H("y1",o.y1=U?p:en(p))}}else{var m=function(e){return -1!==B.indexOf(e)},g=m("n"),x=m("s"),b=m("w"),_=m("e"),T=g?L+n:L,Y=x?I+n:I,Z=b?P+r:P,$=_?z+r:z;U&&(g&&(T=L-n),x&&(Y=I-n)),(!U&&Y-T>10||U&&T-Y>10)&&(H(O,o[O]=U?T:en(T)),H(D,o[D]=U?Y:en(Y))),$-Z>10&&(H(R,o[R]=N?Z:er(Z)),H(j,o[j]=N?$:er($)))}t.attr("d",v(e,o)),ec(c,o),l(e,s,o,G)}function ec(e,t){(N||U)&&function(){var r="path"!==t.type,n=e.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=ee(N?t.xanchor:i.midRange(r?[t.x0,t.x1]:y.extractPathCoords(t.path,g.paramIsX))),o=et(U?t.yanchor:i.midRange(r?[t.y0,t.y1]:y.extractPathCoords(t.path,g.paramIsY)));if(a=y.roundPositionForSharpStrokeRendering(a,1),o=y.roundPositionForSharpStrokeRendering(o,1),N&&U){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(N){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 eu(e){e.selectAll(".visual-cue").remove()}d.init(ea),ei.node().onmousemove=eo}(e,F,b,t,c,S):!0===b.editable&&F.style("pointer-events",D||u.opacity(I)*L<=.5?"stroke":"all");F.node().addEventListener("click",function(){var t=e,r=F;if(w(t)){var n=+r.node().getAttribute("data-index");if(n>=0){if(n===t._fullLayout._activeShapeIndex)return void M(t);t._fullLayout._activeShapeIndex=n,t._fullLayout._deactivateShape=M,x(t)}}}),function(e,t,r){if(!r?.id)return;let n=t.node();function i(e){var t;let n=r.mainplotinfo||r,i=null==(t=n?.draglayer)?void 0:t.select(".nsewdrag").node();return i?{clientX:e.clientX,clientY:e.clientY,target:i}:null}n.addEventListener("mousemove",t=>{if(!e._dragging&&e._fullLayout.hoveranywhere){let n=i(t);n&&p.hover(e,n,r.id)}}),n.addEventListener("click",t=>{if(!e._dragged&&e._fullLayout.clickanywhere){let n=i(t);n&&p.click(e,n,r.id)}})}(e,F,k)}("above"===b.layer?e._fullLayout._shapeUpperLayer:b.xref.includes("paper")||b.yref.includes("paper")?e._fullLayout._shapeLowerLayer:"between"!==b.layer||S?k._hadPlotinfo?(k.mainplotinfo||k).shapelayer:e._fullLayout._shapeLowerLayer:k.shapelayerBetween)}function T(e,t,r){let n=r.xref,o=r.yref;if(Array.isArray(n)||Array.isArray(o)){let s="clip"+t._fullLayout._uid+"shape"+r._index,l=function(e,t,r){let n=e._fullLayout._size;function i(t,r){let i=(Array.isArray(t)?t:[t]).map(t=>a.getFromId(e,t)).filter(Boolean);return i.length?[Math.min(...i.map(function(e){return e._offset})),Math.max(...i.map(function(e){return e._offset+e._length}))]:r?[n.t,n.t+n.h]:[n.l,n.l+n.w]}let o=i(t,!1),s=i(r,!0);return{x:o[0],y:s[0],width:o[1]-o[0],height:s[1]-s[0]}}(t,n,o);i.ensureSingleById(t._fullLayout._clips,"clipPath",s,function(e){e.append("rect")}).select("rect").attr(l),h.setClipUrl(e,s,t)}else{let r=(n+o).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");h.setClipUrl(e,r?"clip"+t._fullLayout._uid+r:null,t)}}function A(e,t,r){return e.replace(g.segmentRE,function(e){var n=0,i=e.charAt(0),a=g.paramIsX[i],o=g.paramIsY[i],s=g.numParams[i];return i+e.slice(1).replace(g.paramRE,function(e){return n>=s||(a[n]?e=t(e):o[n]&&(e=r(e)),n++),e})})}function M(e){w(e)&&e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,x(e))}t.exports={draw:x,drawOne:k,eraseActiveShape:function(e){if(w(e)){c(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t-e),[h,f]=a.invert(l.midPt),{minscale:d}=i.projection,p=null!=(n=i.projection.maxscale)?n:1/0,m=Math.min(d,p),g=Math.max(d,p),y="in"===o?2*s:.5*s;y>g?y=g:ynv});var ny,nv,nx=f({"src/components/modebar/attributes.ts"(){ny=g(nm()),nv={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:"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`."},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:`Determines which predefined modebar buttons to add. Please note that these buttons will only be shown if they are compatible with all trace types used in a graph. Similar to \`config.modeBarButtonsToAdd\` option. This may include *${ny.default.backButtons.join("*, *")}*.`},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:`Determines which predefined modebar buttons to remove. Similar to \`config.modeBarButtonsToRemove\` option. This may include *${ny.default.foreButtons.join("*, *")}*.`}}}}),nb=d({"src/components/modebar/defaults.js"(e,t){var r=tY(),n=eC(),i=t2(),a=(nx(),y(ng)).default;t.exports=function(e,t){var o=e.modebar||{},s=i.newContainer(t,"modebar");function l(e,t){return r.coerce(o,s,a,e,t)}l("orientation"),l("bgcolor",n.addOpacity(t.paper_bgcolor,.5));var c=n.contrast(n.rgb(t.modebar.bgcolor));l("color",n.addOpacity(c,.3)),l("activecolor",n.addOpacity(c,.7)),l("uirevision",t.uirevision),l("add"),l("remove")}}}),n_=d({"src/components/modebar/modebar.js"(e,t){var r=b(),n=A(),i=tY(),a=nr(),o=v().version,s=new DOMParser;function l(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var c=l.prototype;c.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this.element.setAttribute("role","toolbar"),this._uid=a,this.element.className="modebar modebar--custom","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===n.modebar.orientation&&(this.element.className+=" vertical",t=t.reverse());var o=n.modebar;document.querySelectorAll("#"+a+" .modebar-group").forEach(function(e){e.style.backgroundColor=o.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,c=this.locale!==r.locale;if(this.locale=r.locale,(s||l||c)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var u=this.getLogo();r.watermark&&(u.className=u.className+" watermark"),"v"===n.modebar.orientation?this.element.insertBefore(u,this.element.childNodes[0]):this.element.appendChild(u),this.hasLogo=!0}this.updateActiveButton(),i.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+o.activecolor,"fill: "+o.color,this.element)},c.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(e){var r=t.createGroup();e.forEach(function(e){var n=e.name;if(!n)throw Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(n))throw Error("button name '"+n+"' is taken");t.buttonsNames.push(n);var i=t.createButton(e);t.buttonElements.push(i),r.appendChild(i)}),t.element.appendChild(r)})},c.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e},c.createButton=function(e){var t=this,n=document.createElement("button");n.setAttribute("type","button"),n.setAttribute("rel","tooltip"),n.className="modebar-btn";var i=e.title;void 0===i?i=e.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&(n.setAttribute("data-title",i),n.setAttribute("aria-label",i)),void 0!==e.attr&&n.setAttribute("data-attr",e.attr);var o=e.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),n.setAttribute("data-val",o)),"function"!=typeof e.click)throw Error("must provide button 'click' function in button config");n.addEventListener("click",function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)}),n.setAttribute("data-toggle",e.toggle||!1),e.toggle&&r.select(n).classed("active",!0);var s=e.icon;return"function"==typeof s?n.appendChild(s()):n.appendChild(this.createIcon(s||a.question)),n.setAttribute("data-gravity",e.gravity||"n"),n},c.createIcon=function(e){var t,r=n(e.height)?Number(e.height):e.ascent-e.descent,i="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(i,"svg")).setAttribute("viewBox",["0 0",e.width,r].join(" ")),t.setAttribute("class","icon");var a=document.createElementNS(i,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):void 0!==e.ascent&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(a)}return e.svg&&(t=s.parseFromString(e.svg,"application/xml").childNodes[0]),t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},c.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,n=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(e){var a=e.getAttribute("data-val")||!0,o=e.getAttribute("data-attr"),s="true"===e.getAttribute("data-toggle"),l=r.select(e),c=function(e,r){var n=t.modebar,i=e.querySelector(".icon path");i&&(r||e.matches(":hover")?i.style.fill=n.activecolor:i.style.fill=n.color)};if(s){if(o===n){var u=!l.classed("active");l.classed("active",u),c(e,u)}}else{var h=null===o?o:i.nestedProperty(t,o).get();l.classed("active",h===a),c(e,h===a)}})},c.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r1?(I=["toggleHover"],P=["resetViews"]):y?(L=["zoomInGeo","zoomOutGeo"],I=["hoverClosestGeo"],P=["resetGeo"]):g?(I=["hoverClosest3d"],P=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(L=["zoomInMap","zoomOutMap"],I=["toggleHover"],P=["resetViewMap"]):v?I=["hoverClosestPie"]:T?(I=["hoverClosestCartesian","hoverCompareCartesian"],P=["resetViewSankey"]):I=["toggleHover"],m&&I.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(e){for(var t=0;tn?i.slice(n):a.slice(r))+o:i+a+e*t:o}function d(e,t){var r=e._inputDomain,n=l[e.constraintoward],i=r[0]+(r[1]-r[0])*n;e.domain=e._input.domain=[i+(r[0]-i)/t,i+(r[1]-i)/t],e.setScale()}e.handleDefaults=function(e,r,a){var s,l,f,d,p,m,g,y,v=a.axIds,x=a.axHasImage,b=r._axisConstraintGroups=[],_=r._axisMatchGroups=[];for(s=0;ss*v&&!w)){for(i=0;iP&&RL&&(L=R);f/=(L-C)/(2*I),C=c.l2r(C),L=c.l2r(L),c.range=c._input.range=M=e[1]||i[1]<=e[0])&&a[0]t[0])return!0}return!1}(V,q,N)&&-1===S.indexOf(v)){var G=H.node(),W=E.bg=i.ensureSingle(H,"rect","bg");G.insertBefore(W.node(),G.childNodes[0]),B.push(S)}else H.select("rect.bg").remove(),N.push([V,q]),U||(F.push(S),B.push(S))}var Y=P._bgLayer.selectAll(".bg").data(F);for(Y.enter().append("rect").classed("bg",!0),Y.exit().remove(),Y.each(function(e){P._plots[e].bg=t.select(this)}),M=0;M.5?"t":"b",l=e._fullLayout.margin[s],c=0;return"paper"===t.yref?c=r+t.pad.t+t.pad.b:"container"===t.yref&&(n=e._fullLayout.height,i=0,"middle"===o&&(i+=r/2),"t"===s?("top"===o&&(i+=r),i+=n-a*n):("bottom"===o&&(i+=r),i+=a*n),c=i+t.pad.t+t.pad.b),c>l?c:0}(e,k,I);if(P>0){(function(e,t,r,a){var o,s,l="title.automargin",c=e._fullLayout.title,u=c.y>.5?"t":"b",h={x:c.x,y:c.y,t:0,b:0},f={};"paper"===c.yref&&(o="paper"===c.yref?e._fullLayout._size.h:e._fullLayout.height,s=i.isTopAnchor(c)?t:t-a,!(i.isTopAnchor(c)&&"t"===u||i.isBottomAnchor(c)&&"b"===u)&&("b"===u?o-s:s)=0;k--){var T=i.append("path").attr(m).style("opacity",k?.1:g).call(a.stroke,v).call(a.fill,y).call(o.dashLine,k?"solid":b,k?4+x:x);if(function(e,t,r){var n=r.xref+r.yref;o.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}(T,e,f),_){var A=s(e.layout,"selections",f);T.style({cursor:"move"});var M={element:T.node(),plotinfo:p,gd:e,editHelpers:A,isActiveSelection:!0};n(r(l,e),T,M)}else T.style("pointer-events",k?"all":"none");w[k]=T}var S=w[0];w[1].node().addEventListener("click",function(){var t=e,r=S;if(h(t)){var n=+r.node().getAttribute("data-index");if(n>=0){if(n===t._fullLayout._activeSelectionIndex)return void d(t);t._fullLayout._activeSelectionIndex=n,t._fullLayout._deactivateSelection=d,u(t)}}})}(e._fullLayout._selectionLayer)}function d(e){h(e)&&e._fullLayout._activeSelectionIndex>=0&&(i(e),delete e._fullLayout._activeSelectionIndex,u(e))}t.exports={draw:u,drawOne:f,activateLastSelection:function(e){if(h(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=d,u(e)}}}}}),nE=d({"node_modules/polybooljs/lib/build-log.js"(e,t){t.exports=function(){var e,t=0,r=!1;function n(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return n("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return n("div_seg",{seg:e,pt:t}),n("chop",{seg:e,pt:t})},statusRemove:function(e){return n("pop_seg",{seg:e})},segmentUpdate:function(e){return n("seg_update",{seg:e})},segmentNew:function(e,t){return n("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return n("rem_seg",{seg:e})},tempStatus:function(e,t,r){return n("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return n("rewind",{seg:e})},status:function(e,t,r){return n("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,n("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),n("log",{txt:e})},reset:function(){return n("reset")},selected:function(e){return n("selected",{segs:e})},chainStart:function(e){return n("chain_start",{seg:e})},chainRemoveHead:function(e,t){return n("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return n("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return n("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return n("chain_match",{index:e})},chainClose:function(e){return n("chain_close",{index:e})},chainAddHead:function(e,t){return n("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return n("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return n("chain_con",{index1:e,index2:t})},chainReverse:function(e){return n("chain_rev",{index:e})},chainJoin:function(e,t){return n("chain_join",{index1:e,index2:t})},done:function(){return n("done")}}}}}),nC=d({"node_modules/polybooljs/lib/epsilon.js"(e,t){t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,n){var i=r[0],a=r[1],o=n[0],s=n[1],l=t[0];return(o-i)*(t[1]-a)-(s-a)*(l-i)>=-e},pointBetween:function(t,r,n){var i=t[1]-r[1],a=n[0]-r[0],o=t[0]-r[0],s=n[1]-r[1],l=o*a+i*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-i>e&&(a-c)*(i-u)/(o-u)+c-n>e&&(s=!s),a=c,o=u}return s}};return t}}}),nL=d({"node_modules/polybooljs/lib/linked-list.js"(e,t){t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,i=e.root.next;null!==i;){if(r(i)){t.prev=i.prev,t.next=i,i.prev.next=t,i.prev=t;return}n=i,i=i.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;null!==n&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(e){return e.prev=r,e.next=n,r.next=e,null!==n&&(n.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}}}),nI=d({"node_modules/polybooljs/lib/intersecter.js"(e,t){var r=nL();t.exports=function(e,t,n){function i(e,t,r){return{id:n?n.segmentId():-1,start:e,end:t,myFill:{above:r.myFill.above,below:r.myFill.below},otherFill:null}}var a=r.create();function o(e,r){a.insertBefore(e,function(n){var i,a,o,s,l,c;return i=e.isStart,a=e.pt,o=n.isStart,s=n.pt,l=n.other.pt,(0!==(c=t.pointsCompare(a,s))?c:t.pointsSame(r,l)?0:i!==o?i?1:-1:t.pointAboveOrOnLine(r,o?s:l,o?l:s)?1:-1)<0})}function s(e,t){var n,i,a=(o(n=r.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null}),e.end),n);return i=r.node({isStart:!1,pt:e.end,seg:e,primary:t,other:a,status:null}),a.other=i,o(i,a.pt),a}function l(e,t){var r=i(t,e.seg.end,e.seg);return n&&n.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,o(e.other,e.pt),s(r,e.primary)}function c(i,o){var s=r.create();function c(e,r){var i=e.seg,a=r.seg,o=i.start,s=i.end,c=a.start,u=a.end;n&&n.checkIntersection(i,a);var h=t.linesIntersect(o,s,c,u);if(!1===h){if(!t.pointsCollinear(o,s,c)||t.pointsSame(o,u)||t.pointsSame(s,c))return!1;var f=t.pointsSame(o,c),d=t.pointsSame(s,u);if(f&&d)return r;var p=!f&&t.pointBetween(o,c,u),m=!d&&t.pointBetween(s,c,u);if(f)return m?l(r,s):l(e,u),r;p&&(d||(m?l(r,s):l(e,u)),l(r,o))}else 0===h.alongA&&(-1===h.alongB?l(e,c):0===h.alongB?l(e,h.pt):1===h.alongB&&l(e,u)),0===h.alongB&&(-1===h.alongA?l(r,o):0===h.alongA?l(r,h.pt):1===h.alongA&&l(r,s));return!1}for(var u=[];!a.isEmpty();){var h=a.getHead();if(n&&n.vert(h.pt[0]),h.isStart){n&&n.segmentNew(h.seg,h.primary);var f,d,p=function(e){return s.findTransition(function(r){var n,i,a,o,s;return n=r.ev,i=e.seg.start,a=e.seg.end,o=n.seg.start,s=n.seg.end,(t.pointsCollinear(i,o,s)?t.pointsCollinear(a,o,s)||t.pointAboveOrOnLine(a,o,s)?1:-1:t.pointAboveOrOnLine(i,o,s)?1:-1)>0})}(h),m=p.before?p.before.ev:null,g=p.after?p.after.ev:null;n&&n.tempStatus(h.seg,!!m&&m.seg,!!g&&g.seg);var y=function(){if(m){var e=c(h,m);if(e)return e}return!!g&&c(h,g)}();if(y&&(e?(f=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=h.seg.myFill,n&&n.segmentUpdate(y.seg),h.other.remove(),h.remove()),a.getHead()!==h){n&&n.rewind(h.seg);continue}e?(f=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,g?h.seg.myFill.below=g.seg.myFill.above:h.seg.myFill.below=i,f?h.seg.myFill.above=!h.seg.myFill.below:h.seg.myFill.above=h.seg.myFill.below):null===h.seg.otherFill&&(d=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:i,h.seg.otherFill={above:d,below:d}),n&&n.status(h.seg,!!m&&m.seg,!!g&&g.seg),h.other.status=p.insert(r.node({ev:h}))}else{var v=h.status;if(null===v)throw Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(v.prev)&&s.exists(v.next)&&c(v.prev.ev,v.next.ev),n&&n.statusRemove(v.ev.seg),v.remove(),!h.primary){var x=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=x}u.push(h.seg)}a.getHead().remove()}return n&&n.done(),u}return e?{addRegion:function(e){for(var r,i=e[e.length-1],a=0;aa!=d>a&&i<(f-u)*(a-h)/(d-h)+u&&(o=!o)}return o}}}),nj=d({"src/lib/polygon.js"(e,t){var r=ta().dot,n=M().BADNUM,i=t.exports={};i.tester=function(e){var t,r=e.slice(),i=r[0][0],a=i,o=r[0][1],s=o;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),t=1;ta||c===n||cs||t&&l(e))}:function(e,t){var l=e[0],c=e[1];if(l===n||la||c===n||cs)return!1;var u,h,f,d,p,m=r.length,g=r[0][0],y=r[0][1],v=0;for(u=1;uMath.max(h,g)||c>Math.max(f,y)))if(cu||Math.abs(r(o,f))>i)return!0;return!1},i.filter=function(e,t){var r=[e[0]],n=0,a=0;function o(o){e.push(o);var s=r.length,l=n;r.splice(a+1);for(var c=l+1;c1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}}}),nF=d({"src/components/selections/constants.js"(e,t){t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),nB=d({"src/components/selections/select.js"(e,t){var r=nD(),n=nR(),i=tv(),a=rE().dashStyle,o=eC(),s=r7(),l=rA().makeEventData,c=ne(),u=c.freeMode,h=c.rectMode,f=c.drawMode,d=c.openMode,p=c.selectMode,m=nc(),g=nl(),y=nh(),v=t4().clearOutline,x=na(),b=x.handleEllipse,_=x.readPaths,w=no().newShapes,k=ns(),T=nS().activateLastSelection,A=tY(),M=A.sorterAsc,S=nj(),E=tL(),C=t5().getFromId,L=nt(),I=nM().redrawReglTraces,P=nF(),z=P.MINSELECT,O=S.filter,D=S.tester,R=ni(),j=R.p2r,F=R.axValue,B=R.getTransform;function N(e){return void 0!==e.subplot}function U(e,t,r,n,i,a,o){var s,l,c,u,h,f,p,m,g,v=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if((_=v)&&Array.isArray(_)&&!0!==_[0].hoverOnBox){H(e,t,a);var _,w,k=function(e,t){var r,n,i=e[0],a=-1,o=[];for(n=0;n0?function(e,t){var r,n,i,a=[];for(i=0;i0&&a.push(r);if(1===a.length&&a[0]===t.searchInfo&&(n=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(i=0;in.selectedpoints.indexOf(t.pointNumbers[i]))return!1;return!0}return!1}(s,k):function(e){var t,r,n=0;for(r=0;r1||(n+=t.selectedpoints.length)>1))return!1;return 1===n}(s)&&(f=Z(k))){for(o&&o.remove(),g=0;g=0&&a._fullLayout._deactivateShape(a),a._fullLayout._activeSelectionIndex>=0&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,s=f(r),l=p(r);if(s||l){var c,u,h=o.selectAll(".select-outline-"+n.id);h&&a._fullLayout._outlining&&(s&&(c=w(h,e)),c&&i.call("_guiRelayout",a,{shapes:c}),l&&!N(e)&&(u=k(h,e)),u&&(a._fullLayout._noEmitSelectedAtStart=!0,i.call("_guiRelayout",a,{selections:u}).then(function(){t&&T(a)})),a._fullLayout._outlining=!1)}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function W(e){return e._id}function Y(e,t,r,n){if(!e.calcdata)return[];var i,a,o,s=[],l=t.map(W),c=r.map(W);for(o=0;o0?n[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(i)>-1}function $(e,t,r){var n,a;for(n=0;n-1&&t;if(!a&&t){var ep=en(e,!0);if(ep.length){var em=ep[0].xref,eg=ep[0].yref;if(em&&eg){var ey=eo(ep);es([C(e,em,"x"),C(e,eg,"y")])(ef,ey)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ed&&el(e,ef),d._reselect=!1}if(!a&&d._deselect){var ev=d._deselect;(function(e,t,r){for(var n=0;n=0)return void S._fullLayout._deactivateShape(S);if(!_){var r=C.clickmode;E.done(eE).then(function(){if(E.clear(eE),2===e){for(ew.remove(),ea=0;ea-1&&U(t,S,n.xaxes,n.yaxes,n.subplot,n,ew),"event"===r&&el(S,void 0);s.click(S,t,j.id)}).catch(A.error)}},n.doneFn=function(){eM.remove(),E.done(eE).then(function(){E.clear(eE),!L&&ei&&n.selectionDefs&&(ei.subtract=e_,n.selectionDefs.push(ei),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,en)),(L||_)&&G(n,L),n.doneFnCompleted&&n.doneFnCompleted(eC),w&&el(S,eh)}).catch(A.error)}},clearOutline:v,clearSelectionsCache:G,selectOnClick:U}}}),nN=d({"src/components/annotations/arrow_paths.js"(e,t){t.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}]}}),nU=d({"src/constants/axis_placeable_objects.js"(e,t){t.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by *domain* (separated by a space), the position behaves like for *paper*, but refers to the distance in fractions of the domain length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e,"axis and a",e,"position of 0.5 refers to the point between the",t,"and the",r,"of the domain of the second",e,"axis."].join(" ")}}}}),nV=d({"src/components/annotations/attributes.js"(e,t){var r=nN(),n=V(),i=t3(),a=t2().templatedArray;nU(),t.exports=a("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:n({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:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.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:n({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})}}),nq=d({"src/traces/scatter/constants.js"(e,t){t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),nH=d({"src/traces/scatter/fillcolor_attribute.js"(e,t){t.exports=function(e){return{valType:"color",editType:"style",anim:!0}}}}),nG=d({"src/traces/scatter/attributes.js"(e,t){var r=ri().axisHoverFormat,{hovertemplateAttrs:n,texttemplateAttrs:i,templatefallbackAttrs:a}=th(),o=rs(),s=V(),l=tc().dash,c=tc().pattern,u=rE(),h=nq(),f=U().extendFlat,d=nH();function p(e){return{valType:"any",dflt:0,editType:"calc"}}function m(e){return{valType:"any",editType:"calc"}}function g(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:p("x"),yperiod:p("y"),xperiod0:m("x0"),yperiod0:m("y0"),xperiodalignment:g("x"),yperiodalignment:g("y"),xhoverformat:r("x"),yhoverformat:r("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:i(),texttemplatefallback:a({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:n({},{keys:h.eventDataKeys}),hovertemplatefallback:a(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:f({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:d(!0),fillgradient:f({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:c,marker:f({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:f({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:f({},l,{arrayOk:!0}),editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),nW=d({"src/components/selections/attributes.js"(e,t){var r=nV(),n=nG().line,i=tc().dash,a=U().extendFlat,o=tl().overrideAll,s=t2().templatedArray;nU(),t.exports=o(s("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:a({},r.xref,{}),yref:a({},r.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:n.color,width:a({},n.width,{min:1,dflt:1}),dash:a({},i,{dflt:"dot"})}}),"arraydraw","from-root")}}),nY=d({"src/components/selections/defaults.js"(e,t){var r=tY(),n=rz(),i=rp(),a=nW(),o=nc();function s(e,t,i){function s(n,i){return r.coerce(e,t,a,n,i)}var l=s("path"),c="path"!==s("type",l?"path":"rect");c&&delete t.path,s("opacity"),s("line.color"),s("line.width"),s("line.dash");for(var u=["x","y"],h=0;h<2;h++){var f,d,p,m=u[h],g={_fullLayout:i},y=n.coerceRef(e,t,g,m);if((f=n.getFromId(g,y))._selectionIndices.push(t._index),p=o.rangeToShapePosition(f),d=o.shapePositionToRange(f),c){var v=m+"0",x=m+"1",b=e[v],_=e[x];e[v]=d(e[v],!0),e[x]=d(e[x],!0),n.coercePosition(t,g,s,y,v),n.coercePosition(t,g,s,y,x);var w=t[v],k=t[x];void 0!==w&&void 0!==k&&(t[v]=p(w),t[x]=p(k),e[v]=b,e[x]=_)}}c&&r.noneOrAll(e,t,["x0","x1","y0","y1"])}t.exports=function(e,t){i(e,t,{name:"selections",handleItemDefaults:s});for(var r=t.selections,n=0;n.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",s(r,n)).attr("d",i+"Z")}function F(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform",s(t,r)).attr("d","M0,0Z")}function B(e,t,r,n,i,a){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),N(e,t,i,a)}function N(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function U(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function V(e){I&&e.data&&e._context.showTips&&(n.notifier(n._(e,"Double-click to zoom back out"),"long",e),I=!1)}function q(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,L)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function H(e,t,r,i,a){for(var o,s,l,c,u=!1,h={},f={},d=(a||{}).xaHash,p=(a||{}).yaHash,m=0;m=0)return void s._fullLayout._deactivateShape(s);var c=s._fullLayout.clickmode;if(U(s),2!==n||eC||function(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];eg&&(r=r.concat(el)),ey&&(r=r.concat(ec)),em.xaxes&&(r=r.concat(em.xaxes)),em.yaxes&&(r=r.concat(em.yaxes));var n,i,a={};if("reset+autosize"===t)for(t="autosize",i=0;i-1&&M(a,s,el,ec,t.id,eP),c.indexOf("event")>-1&&h.click(s,a,t.id);else if(1===n&&eC){var u,f,d,p,m=b?ea:ei,g=+("s"!==b&&"w"!==I),y=m._name+".range["+g+"]",v=(u=m,f=g,p=Math.abs((d=u.range[f])-u.range[1-f]),"date"===u.type?d:"log"===u.type?i("."+(Math.ceil(Math.max(0,-Math.log(p)/Math.LN10))+3)+"g")(Math.pow(10,d)):i("."+String(Math.floor(Math.log(Math.abs(d))/Math.LN10)-Math.floor(Math.log(p)/Math.LN10)+4)+"g")(d)),x="left",_="middle";if(m.fixedrange)return;b?(_="n"===b?"top":"bottom","right"===m.side&&(x="right")):"e"===I&&(x="right"),s._context.showAxisRangeEntryBoxes&&r.select(eI).call(l.makeEditable,{gd:s,immediate:!0,background:s._fullLayout.paper_bgcolor,text:String(v),fill:m.tickfont?m.tickfont.color:"#444",horizontalAlign:x,verticalAlign:_}).on("edit",function(e){var t=m.d2r(e);void 0!==t&&o.call("_guiRelayout",s,y,t)})}}function eD(t,r){if(e._transitioningWithDuration)return!1;var n,i,a,o,s=Math.max(0,Math.min(ef,eA*t+X)),l=Math.max(0,Math.min(ed,eM*r+Z)),c=Math.abs(s-X),u=Math.abs(l-Z);function h(){ee="",$.r=$.l,$.t=$.b,er.attr("d","M0,0Z")}if($.l=Math.min(X,s),$.r=Math.max(X,s),$.t=Math.min(Z,l),$.b=Math.max(Z,l),ep.isSubplotConstrained)c>L||u>L?(ee="xy",c/ef>u/ed?(u=c*ed/ef,Z>l?$.t=Z-u:$.b=Z+u):(c=u*ef/ed,X>s?$.l=X-c:$.r=X+c),er.attr("d",q($))):h();else if(em.isSubplotConstrained)if(c>L||u>L){ee="xy";var f=Math.min($.l/ef,(ed-$.b)/ed),d=Math.max($.r/ef,(ed-$.t)/ed);$.l=f*ef,$.r=d*ef,$.b=(1-f)*ed,$.t=(1-d)*ed,er.attr("d",q($))}else h();else{!ey||u0){if(em.isSubplotConstrained||!eg&&1===ey.length){for(a=0;a=0?Math.min(l,.9):1/(1/Math.max(l,-.3)+3.222)));var l,c=s.l2r(i);!1!==c&&void 0!==c&&(s.range[t]=c)}}return n._length*(n._rl[t]-i)/(n._rl[t]-n._rl[a])}}function eq(e,t){for(var r=em.isSubplotConstrained?({x:ec,y:el})[e]:em[e+"axes"],n=em.isSubplotConstrained?({x:el,y:ec})[e]:[],i=0;i1&&(void 0!==a.maxallowed&&ex===(a.range[0]1&&(void 0!==s.maxallowed&&eb===(s.range[0]1&&n.warn("Full array edits are incompatible with other edits",f);var x=l[""][""];if(s(x))t.set(null);else{if(!Array.isArray(x))return n.warn("Unrecognized full array edit value",f,x),!0;t.set(x)}return!g&&(d(y,v),p(e),!0)}var b,_,w,k,T,A,M,S,E=Object.keys(l).map(Number).sort(i),C=t.get(),L=C||[],I=u(v,f).get(),P=[],z=-1,O=L.length;for(b=0;bL.length-!M){n.warn("index out of range",f,w);continue}if(void 0!==A)T.length>1&&n.warn("Insertion & removal are incompatible with edits to the same index.",f,w),s(A)?P.push(w):M?("add"===A&&(A={}),L.splice(w,0,A),I&&I.splice(w,0,{})):n.warn("Unrecognized full object edit value",f,w,A),-1===z&&(z=w);else for(_=0;_=0;b--)L.splice(P[b],1),I&&I.splice(P[b],1);if(L.length?C||t.set(L):t.set(null),g)return!1;if(d(y,v),m!==r){if(-1===z)h=E;else{for(O=Math.max(L.length,O),h=[],b=0;b=z);b++)h.push(w);for(b=z;b0&&n.log("Clearing previous rejected promises from queue."),e._promises=[]},e.cleanLayout=function(t){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 r,a=(i.subplotsRegistry.cartesian||{}).attrRegex,s=((i.subplotsRegistry.polar||{}).attrRegex,(i.subplotsRegistry.ternary||{}).attrRegex,(i.subplotsRegistry.gl3d||{}).attrRegex,Object.keys(t));for(r=0;r3?(v.x=1.02,v.xanchor="left"):v.x<-2&&(v.x=-.02,v.xanchor="right"),v.y>3?(v.y=1.02,v.yanchor="bottom"):v.y<-2&&(v.y=-.02,v.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var a=0;a0)return e.slice(0,t)}e.hasParent=function(e,t){for(var r=m(t);r;){if(r in e)return!0;r=m(r)}return!1},e.clearAxisTypes=function(e,t,r){for(var i=0;i{let r=(...e)=>e.every(e=>n.isPlainObject(e))||e.every(e=>Array.isArray(e));if([e,t].every(e=>Array.isArray(e))){if(e.length!==t.length)return!1;for(let n=0;nn.isPlainObject(e))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let i=e[n],a=t[n];if(i!==a&&!(r(i,a)&&g(i,a)))return!1}return!0}return!1};e.collectionsAreEqual=g}}),n2=d({"src/plot_api/plot_api.js"(e){var t=b(),r=A(),n=t$(),i=tY(),a=i.nestedProperty,o=tJ(),s=tQ(),l=tv(),c=t1(),u=t7(),h=rz(),f=rD(),d=ra(),p=rE(),m=eC(),g=nJ().initInteractions,y=re(),v=n$().clearOutline,x=eA().dfltConfig,_=n0(),w=n1(),k=nM(),T=tl(),M=t3().AX_NAME_PATTERN,S=0;function E(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function C(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){i.error(e)}}function L(e,t){C(e,m.combine(t,"white"))}function I(e,r){if(!e._context){e._context=i.extendDeep({},x);var a=t.select("base");e._context._baseUrl=a.size()&&a.attr("href")?window.location.href.split("#")[0]:""}var o,s,l,c=e._context;if(r){for(s=Object.keys(r),o=0;o=e.data.length||i<-e.data.length)throw Error(r+" must be valid indices for gd.data.");if(t.indexOf(i,n+1)>-1||i>=0&&t.indexOf(-e.data.length+i)>-1||i<0&&t.indexOf(e.data.length+i)>-1)throw Error("each index in "+r+" must be unique.")}}function O(e,t,r){if(!Array.isArray(e.data))throw Error("gd.data must be an array.");if(typeof t>"u")throw Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),z(e,t,"currentIndices"),"u">typeof r&&!Array.isArray(r)&&(r=[r]),"u">typeof r&&z(e,r,"newIndices"),"u">typeof r&&t.length!==r.length)throw Error("current and new indices must be of equal length.")}function D(e,t,n,o,s){var l=i.isPlainObject(o);if(!Array.isArray(e.data))throw Error("gd.data must be an array");if(!i.isPlainObject(t))throw Error("update must be a key:value object");if(typeof n>"u")throw Error("indices must be an integer or array of integers");for(var c in z(e,n,"indices"),t){if(!Array.isArray(t[c])||t[c].length!==n.length)throw Error("attribute "+c+" must be an array of length equal to indices array length");if(l&&(!(c in o)||!Array.isArray(o[c])||o[c].length!==t[c].length))throw Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}for(var u=function(e,t,n,o){var s,l,c,u,h=i.isPlainObject(o),f=[];for(var d in Array.isArray(n)||(n=[n]),n=P(n,e.data.length-1),t)for(var p=0;p0&&"string"!=typeof z.parts[R];)R--;var j=z.parts[R],N=z.parts[R-1]+"."+j,U=z.parts.slice(0,R).join("."),V=a(e.layout,U).get(),q=a(u,U).get(),H=z.get();if(void 0!==O){A[P]=O,S[P]="reverse"===j?O:F(H);var X=c.getLayoutValObject(u,z.parts);if(X&&X.impliedEdits&&null!==O)for(var $ in X.impliedEdits)E(i.relativeAttr(P,$),X.impliedEdits[$]);if(-1!==["width","height"].indexOf(P))if(O){E("autosize",null);var K="height"===P?"width":"height";E(K,u[K])}else u[P]=e._initialAutoSize[P];else if("autosize"===P)E("width",O?null:u.width),E("height",O?null:u.height);else if(N.match(G))I(N),a(u,U+"._inputRange").set(null);else if(N.match(W)){I(N),a(u,U+"._inputRange").set(null);var J=a(u,U).get();J._inputDomain&&(J._input.domain=J._inputDomain.slice())}else N.match(Y)&&a(u,U+"._inputDomain").set(null);if("type"===j){C=V;var Q="linear"===q.type&&"log"===O,ee="log"===q.type&&"linear"===O;if(Q||ee){if(C&&C.range)if(q.autorange)Q&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var et=C.range[0],er=C.range[1];Q?(et<=0&&er<=0&&E(U+".autorange",!0),et<=0?et=er/1e6:er<=0&&(er=et/1e6),E(U+".range[0]",Math.log(et)/Math.LN10),E(U+".range[1]",Math.log(er)/Math.LN10)):(E(U+".range[0]",Math.pow(10,et)),E(U+".range[1]",Math.pow(10,er)))}else E(U+".autorange",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[z.parts[0]]&&"radialaxis"===z.parts[1]&&delete u[z.parts[0]]._subplot.viewInitial["radialaxis.range"],l.getComponentMethod("annotations","convertCoords")(e,q,O,E),l.getComponentMethod("images","convertCoords")(e,q,O,E)}else E(U+".autorange",!0),E(U+".range",null);a(u,U+"._inputRange").set(null)}else if(j.match(M)){var en=a(u,P).get(),ei=(O||{}).type;ei&&"-"!==ei||(ei="linear"),l.getComponentMethod("annotations","convertCoords")(e,en,ei,E),l.getComponentMethod("images","convertCoords")(e,en,ei,E)}var ea=_.containerArrayMatch(P);if(ea){r=ea.array,n=ea.index;var eo=ea.property,es=X||{editType:"calc"};""!==n&&""===eo&&(_.isAddVal(O)?S[P]=null:_.isRemoveVal(O)?S[P]=(a(s,r).get()||[])[n]:i.warn("unrecognized full object value",t)),T.update(k,es),y[r]||(y[r]={});var el=y[r][n];el||(el=y[r][n]={}),el[eo]=O,delete t[P]}else"reverse"===j?(V.range?V.range.reverse():(E(U+".autorange",!0),V.range=[1,0]),q.autorange?k.calc=!0:k.plot=!0):("dragmode"===P&&(!1===O&&!1!==H||!1!==O&&!1===H)||u._has("scatter-like")&&u._has("regl")&&"dragmode"===P&&("lasso"===O||"select"===O)&&"lasso"!==H&&"select"!==H?k.plot=!0:X?T.update(k,X):k.calc=!0,z.set(O))}}for(r in y)_.applyContainerArrayChanges(e,d(s,r),y[r],k,d)||(k.plot=!0);for(var ec in L){var eu=(C=h.getFromId(e,ec))&&C._constraintGroup;if(eu)for(var eh in k.calc=!0,eu)L[eh]||(h.getFromId(e,eh)._constraintShrinkable=!0)}(Z(e)||t.height||t.width)&&(k.plot=!0);var ef=u.shapes;for(n=0;n1;)if(n.pop(),void 0!==(r=a(t,n.join(".")+".uirevision").get()))return r;return t.uirevision}function er(e,t){var r=i.isPlainObject(e),n=Array.isArray(e);return r||n?(r&&i.isPlainObject(t)||n&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function en(e,t,r,n){var a,o,s,l=n.getValObject,c=n.flags,u=n.immutable,h=n.inArray,f=n.arrayIndex;function d(){var e=a.editType;h&&-1!==e.indexOf("arraydraw")?i.pushUnique(c.arrays[h],f):(T.update(c,a),"none"!==e&&c.nChanges++,n.transition&&a.anim&&c.nChangesAnim++,(G.test(s)||W.test(s))&&(c.rangesAltered[r[0]]=1),"datarevision"===o&&(c.newDataRevision=1))}function p(e){return"data_array"===e.valType||e.arrayOk}for(o in e){if(c.calc&&!n.transition)return;var m=e[o],g=t[o],y=r.concat(o);if(s=y.join("."),"_"!==o.charAt(0)&&"function"!=typeof m&&m!==g){if(("tick0"===o||"dtick"===o)&&"geo"!==r[0]){var v=t.tickmode;if("auto"===v||"array"===v||!v)continue}if(!("range"===o&&t.autorange)&&("zmin"!==o&&"zmax"!==o||"contourcarpet"!==t.type)&&(a=l(y))&&!(a._compareAsJSON&&JSON.stringify(m)===JSON.stringify(g))){var x,b=a.valType,_=p(a),w=Array.isArray(m),k=Array.isArray(g);if(w&&k){var A="_input_"+o,M=e[A],S=t[A];if(Array.isArray(M)&&M===S)continue}if(void 0===g)_&&w?c.calc=!0:d();else if(a._isLinkedToArray){var E=[],C=!1;h||(c.arrays[o]=E);var L=Math.min(m.length,g.length),I=Math.max(m.length,g.length);if(L!==I)if("arraydraw"===a.editType)C=!0;else{d();continue}for(x=0;x=a.length?e.transitionOpts=a[c]:e.transitionOpts=a[0]:e.transitionOpts=a,c++,e}var f,d,p=[],m=null==t,g=Array.isArray(t);if(!m&&!g&&i.isPlainObject(t))p.push({type:"object",data:h(i.extendFlat({},t))});else if(m||-1!==["string","number"].indexOf(typeof t))for(f=0;f0&&xx)&&b.push(d);p=b}}p.length>0?function(t){if(0!==t.length){for(var i,c=0;c=o.length?o[0]:o[h]:o),m=(f=c,Array.isArray(a)?f>=a.length?a[0]:a[f]:a);m.duration=Math.min(m.duration,p.duration);var g={frame:d,name:t[c].name,frameOpts:p,transitionOpts:m};c===t.length-1&&(g.onComplete=function(e){var t=0;return function(){if(e&&2==++t)return e()}}(s),g.onInterrupt=l),n._frameQueue.push(g)}"immediate"===r.mode&&(n._lastFrameAt=-1/0),n._animationRaf||(e.emit("plotly_animating"),n._lastFrameAt=-1/0,n._timeToNext=0,n._runningTransitions=0,n._currentFrame=null,(i=function(){n._animationRaf=window.requestAnimationFrame(i),Date.now()-n._lastFrameAt>n._timeToNext&&function(){n._currentFrame&&n._currentFrame.onComplete&&n._currentFrame.onComplete();var t=n._currentFrame=n._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,n._lastFrameAt=Date.now(),n._timeToNext=t.frameOpts.duration,u.transition(e,t.frame.data,t.frame.layout,w.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then(function(){t.onComplete&&t.onComplete()}),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(n._animationRaf),n._animationRaf=null}()})())}}(p):(e.emit("plotly_animated"),s())})},e.addFrames=function(e,t,r){if(e=i.getGraphDiv(e),null==t)return Promise.resolve();if(!i.isPlotDiv(e))throw Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,a,o,l,c=e._transitionData._frames,h=e._transitionData._frameHash;if(!Array.isArray(t))throw Error("addFrames failure: frameList must be an Array of frame definitions"+t);var f=c.length+2*t.length,d=[],p={};for(n=t.length-1;n>=0;n--)if(i.isPlainObject(t[n])){var m=t[n].name,g=(h[m]||p[m]||{}).name,y=t[n].name,v=h[g]||p[g];g&&y&&"number"==typeof y&&v&&S<5&&(S++,i.warn('addFrames: overwriting frame "'+(h[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===S&&i.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[m]={name:m},d.push({frame:u.supplyFrameDefaults(t[n]),index:r&&void 0!==r[n]&&null!==r[n]?r[n]:f+n})}d.sort(function(e,t){return e.index>t.index?-1:+(e.index=0;n--){if("number"==typeof(a=d[n].frame).name&&i.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;h[a.name="frame "+e._transitionData._counter++];);if(h[a.name]){for(o=0;o=0;r--)n=t[r],o.push({type:"delete",index:n}),l.unshift({type:"insert",index:n,value:a[n]});var c=u.modifyFrames,h=u.modifyFrames,f=[e,l],d=[e,o];return s&&s.add(e,c,f,h,d),u.modifyFrames(e,o)},e.addTraces=function t(r,n,a){r=i.getGraphDiv(r);var o,l,c=[],u=e.deleteTraces,h=[r,c],f=[r,n];for(function(e,t,r){var n,i;if(!Array.isArray(e.data))throw Error("gd.data must be an array.");if(typeof t>"u")throw Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;ntypeof r&&!Array.isArray(r)&&(r=[r]),"u">typeof r&&r.length!==t.length)throw Error("if indices is specified, traces.length must equal indices.length")}(r,n,a),Array.isArray(n)||(n=[n]),n=n.map(function(e){return i.extendFlat({},e)}),w.cleanData(n),o=0;o"u")return l=e.redraw(r),s.add(r,u,h,t,f),l;Array.isArray(a)||(a=[a]);try{O(r,c,a)}catch(e){throw r.data.splice(r.data.length-n.length,n.length),e}return s.startSequence(r),s.add(r,u,h,t,f),l=e.moveTraces(r,c,a),s.stopSequence(r),l},e.deleteTraces=function t(r,n){r=i.getGraphDiv(r);var a,o,l=[],c=e.addTraces,u=[r,l,n],h=[r,n];if(typeof n>"u")throw Error("indices must be an integer or array of integers.");for(Array.isArray(n)||(n=[n]),z(r,n,"indices"),(n=P(n,r.data.length-1)).sort(i.sorterDes),a=0;a=0&&r"u")for(a=[],o=0;o=0&&r[e,t._ev.listeners(e)]);h=e.newPlot(t,r,n,o).then(()=>{for(let[e,r]of i)r.forEach(r=>t.on(e,r));return e.react(t,r,n,o)})}else{t.data=r||[],w.cleanData(t.data),t.layout=n||{},w.cleanLayout(t.layout),function(e,t,r,n){var o,s,l,c,u,h,f,d,p,m,g=n._preGUI,y=[],v={},x={};for(o in g){if(u=ee(o,J)){if(p=u.head,m=u.tail,(c=(l=a(n,s=u.attr||p+".uirevision").get())&&et(s,t))&&c===l){if(null===(h=g[o])&&(h=void 0),er(d=(f=a(t,o)).get(),h)){void 0===d&&"autorange"===m&&y.push(p),f.set(F(a(n,o).get()));continue}else if("autorange"===m||"range["===m.slice(0,6)){var b=g[p+".range[0]"],_=g[p+".range[1]"],w=g[p+".autorange"];if(w||null===w&&null===b&&null===_){if(!(p in v)){var k=a(t,p).get();v[p]=k&&(k.autorange||!1!==k.autorange&&(!k.range||2!==k.range.length))}if(v[p]){f.set(F(a(n,o).get()));continue}}}}}else i.warn("unrecognized GUI edit: "+o);delete g[o],u&&"range["===u.tail.slice(0,6)&&(x[u.head]=1)}for(var T=0;T(m||t.emit("plotly_react",{config:o,data:r,layout:n}),t))},e.redraw=function(t){if(t=i.getGraphDiv(t),!i.isPlotDiv(t))throw Error("This element is not a Plotly plot: "+t);return w.cleanData(t.data),w.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then(function(){return t.emit("plotly_redraw"),t})},e.relayout=V,e.restyle=j,e.setPlotConfig=function(e){return i.extendFlat(x,e)},e.update=$,e._guiRelayout=K(V),e._guiRestyle=K(j),e._guiUpdate=K($),e._storeDirectGUIEdit=function(e,t,r){for(var n in r){var i=a(e,n);N(n,i.get(),r[n],t)}}}}),n3=d({"src/snapshot/helpers.js"(e){var t=tv();e.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0},e.getRedrawFunc=function(e){return function(){t.getComponentMethod("colorbar","draw")(e)}},e.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},e.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var r=window.URL||window.webkitURL;e.createObjectURL=function(e){return r.createObjectURL(e)},e.revokeObjectURL=function(e){return r.revokeObjectURL(e)},e.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),i=0;i{let t=e.toLowerCase();return l.includes(t)?e:c.includes(t)?"<":u.includes(t)?">":e.includes("<")||e.includes(">")?"":f.html(e).text()}),f.remove(),M=(M=(M=d).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(s,"'")}}}),n4=d({"src/snapshot/svgtoimg.js"(e,t){var r=tY(),n=tK().EventEmitter,i=n3();t.exports=function(e){var t=e.emitter||new n,a=new Promise(function(n,a){var o,s,l=window.Image,c=e.svg,u=e.format||"png",h=e.canvas,f=e.scale||1,d=e.width||300,p=e.height||150,m=f*d,g=f*p,y=h.getContext("2d",{willReadFrequently:!0}),v=new l;"svg"===u||r.isSafari()?s=i.encodeSVG(c):(o=i.createBlob(c,"svg"),s=i.createObjectURL(o)),h.width=m,h.height=g,v.onload=function(){var r;switch(o=null,i.revokeObjectURL(s),"svg"!==u&&y.drawImage(v,0,0,m,g),u){case"jpeg":r=h.toDataURL("image/jpeg");break;case"png":r=h.toDataURL("image/png");break;case"webp":r=h.toDataURL("image/webp");break;case"svg":r=s;break;default:var l="Image format is not jpeg, png, svg or webp.";if(a(Error(l)),!e.promise)return t.emit("error",l)}n(r),e.promise||t.emit("success",r)},v.onerror=function(r){if(o=null,i.revokeObjectURL(s),a(r),!e.promise)return t.emit("error",r)},v.src=s});return e.promise?a:t}}}),n6=d({"src/plot_api/to_image.js"(e,t){var r=A(),n=n2(),i=t7(),a=tY(),o=n3(),s=n5(),l=n4(),c=v().version,u={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){function h(e){return!(e in t)||a.validate(t[e],u[e])}if(t=t||{},a.isPlainObject(e)?(f=e.data||[],d=e.layout||{},p=e.config||{},m={}):(e=a.getGraphDiv(e),f=a.extendDeep([],e.data),d=a.extendDeep({},e.layout),p=e._context,m=e._fullLayout||{}),!h("width")&&null!==t.width||!h("height")&&null!==t.height)throw Error("Height and width should be pixel values.");if(!h("format"))throw Error("Export format is not "+a.join2(u.format.values,", "," or ")+".");var f,d,p,m,g={};function y(e,r){return a.coerce(t,g,u,e,r)}var v=y("format"),x=y("width"),b=y("height"),_=y("scale"),w=y("setBackground"),k=y("imageDataOnly"),T=document.createElement("div");T.style.position="absolute",T.style.left="-5000px",document.body.appendChild(T);var A=a.extendFlat({},d);x?A.width=x:null===t.width&&r(m.width)&&(A.width=m.width),b?A.height=b:null===t.height&&r(m.height)&&(A.height=m.height);var M=a.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=o.getRedrawFunc(T);function E(){return new Promise(function(e){setTimeout(e,o.getDelay(T._fullLayout))})}function C(){return new Promise(function(e,t){var r=s(T,v,_),u=T._fullLayout.width,h=T._fullLayout.height;function f(){n.purge(T),document.body.removeChild(T)}if("full-json"===v){var d=i.graphJson(T,!1,"object",!0,!0);return d.version=c,d=JSON.stringify(d),f(),e(k?d:o.encodeJSON(d))}if(f(),"svg"===v)return e(k?r:o.encodeSVG(r));var p=document.createElement("canvas");p.id=a.randstr(),l({format:v,width:u,height:h,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)})}return new Promise(function(e,t){n.newPlot(T,f,A,M).then(S).then(E).then(C).then(function(t){e(k?t.replace(o.IMAGE_URL_PREFIX,""):t)}).catch(function(e){t(e)})})}}}),n8=d({"src/plot_api/validate.js"(e,t){var r=tY(),n=t7(),i=t1(),a=eA().dfltConfig,o=r.isPlainObject,s=Array.isArray,l=r.isArrayOrTypedArray;function c(e,t,n,i,a,u){u=u||[];for(var h=Object.keys(e),d=0;dv.length&&i.push(f("unused",a,g.concat(v.length)));var T,A,M,S,E,C,L,I=v.length,P=Array.isArray(k);if(P&&(I=Math.min(I,k.length)),2===x.dimensions)for(S=0;Sv[S].length&&i.push(f("unused",a,g.concat(S,v[S].length)));var z=v[S].length;for(M=0;M<(P?Math.min(z,k[S].length):z);M++)E=P?k[S][M]:k,C=y[S][M],L=v[S][M],r.validate(C,E)?L!==C&&L!==+C&&i.push(f("dynamic",a,g.concat(S,M),C,L)):i.push(f("value",a,g.concat(S,M),C))}else i.push(f("array",a,g.concat(S),y[S]));else for(S=0;S1&&d.push(f("object","layout"))),n.supplyDefaults(p);for(var m=p._fullData,g=l.length,y=0;yw?h.push({code:"unused",traceType:y,templateCount:_,dataCount:w}):w>_&&h.push({code:"reused",traceType:y,templateCount:_,dataCount:w})}}else h.push({code:"data"});if(function e(t,n){for(var i in t)if("_"!==i.charAt(0)){var a=t[i],o=d(t,i,n);r(a)?(Array.isArray(t)&&!1===a._template&&a.templateitemname&&h.push({code:"missing",path:o,templateitemname:a.templateitemname}),e(a,o)):Array.isArray(a)&&function(e){for(var t=0;t=0;h--){var f=e[h];if("scatter"===f.type&&f.xaxis===c.xaxis&&f.yaxis===c.yaxis){f.opacity=void 0;break}}}}}}}),im=d({"src/traces/scatter/layout_defaults.js"(e,t){var r=tY(),n=t6();t.exports=function(e,t){var i,a="group"===t.barmode;"group"===t.scattermode&&(i=a?t.bargap:.2,r.coerce(e,t,n,"scattergap",i))}}}),ig=d({"src/plots/cartesian/align_period.js"(e,t){var r=A(),n=tY(),i=n.dateTime2ms,a=n.incrementMonth,o=M().ONEAVGMONTH;t.exports=function(e,t,n,s){if("date"!==t.type)return{vals:s};var l=e[n+"periodalignment"];if(!l)return{vals:s};var c,u=e[n+"period"];if(r(u)){if((u*=1)<=0)return{vals:s}}else if("string"==typeof u&&"M"===u.charAt(0)){var h=+u.substring(1);if(!(h>0)||Math.round(h)!==h)return{vals:s};c=h}for(var f=t.calendar,d="start"===l,p="end"===l,m=e[n+"period0"],g=i(m,f)||0,y=[],v=[],x=[],b=s.length,_=0;_A;)T=a(T,-c,f);for(;T<=A;)T=a(T,c,f);k=a(T,-c,f)}else{for(w=Math.round((A-g)/u),T=g+w*u;T>A;)T-=u;for(;T<=A;)T+=u;k=T-u}y[_]=d?k:p?T:(k+T)/2,v[_]=k,x[_]=T}return{vals:y,starts:v,ends:x}}}}),iy=d({"src/traces/scatter/colorscale_calc.js"(e,t){var r=rn().hasColorscale,n=r_(),i=rk();t.exports=function(e,t){i.hasLines(t)&&r(t,"line")&&n(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),i.hasMarkers(t)&&(r(t,"marker")&&n(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),r(t,"marker.line")&&n(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),iv=d({"src/traces/scatter/arrays_to_calcdata.js"(e,t){var r=tY();t.exports=function(e,t){for(var n=0;np&&L[y].gap;)y--;for(x=L[y].s,g=L.length-1;g>y;g--)L[g].s=x;for(;ph+c||!r(u))}for(var d=0;di(e))):i(e.text);let a=e.outsidetextfont.size*u*r+c;return{ppadplus:t.some(e=>e.s<0)?a:0,ppadminus:t.some(e=>e.s>=0)?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function b(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,n=t.yaxis,i=e._fullLayout,o=e._fullData,s=e.calcdata,l=[],c=[],u=0;uS[h]&&h0?o:s)/(C._m*P*(C._m>0?o:s)))),a*=1e3}if(l===i){if(I&&(l=C.c2p(n.y,!0)),l===i)return!1;l*=1e3}return[a,l]}function Y(e,t,r,n){var i=r-e,a=n-t,o=.5-e,s=.5-t,l=i*i+a*a,c=i*o+a*s;if(c>0&&ceo||e[1]el)return[u(e[0],ea,eo),u(e[1],es,el)]}function eh(e,t){if(e[0]===t[0]&&(e[0]===ea||e[0]===eo)||e[1]===t[1]&&(e[1]===es||e[1]===el))return!0}function ef(e,t,r){return function(n,i){var a,o=eu(n),s=eu(i),c=[];if(o&&s&&eh(o,s))return c;o&&c.push(o),s&&c.push(s);var u=2*l.constrain((n[e]+i[e])/2,t,r)-((o||n)[e]+(s||i)[e]);return u&&(a=o&&s?u>0==o[e]>s[e]?o:s:o||s,a[e]+=u),c}}function ed(e){var t=e[0],r=e[1],n=t===H[G-1][0],i=r===H[G-1][1];if(!(n&&i))if(G>1){var a=t===H[G-2][0],o=r===H[G-2][1];n&&(t===ea||t===eo)&&a?o?G--:H[G-1]=e:i&&(r===es||r===el)&&o?a?G--:H[G-1]=e:H[G++]=e}else H[G++]=e}function ep(e){H[G-1][0]!==e[0]&&H[G-1][1]!==e[1]&&ed([ee,et]),ed(e),er=null,ee=et=0}"linear"===F||"spline"===F?n=function(e,t){for(var r=[],n=0,i=0;i<4;i++){var a=ec[i],o=c(e[0],e[1],t[0],t[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&&Z(o,e)eo?eo:0,Q=t[1]el?el:0,J||Q){if(G)if(er){var r,i,o,s=n(er,t);s.length>1&&(ep(s[0]),H[G++]=s[1])}else en=n(H[G-1],t)[0],H[G++]=en;else H[G++]=[J||t[0],Q||t[1]];var l=H[G-1];J&&Q&&(l[0]!==J||l[1]!==Q)?(er&&(ee!==J&&et!==Q?ed(ee&&et?(r=er,i=t[0]-r[0],o=(t[1]-r[1])/i,(r[1]*t[0]-t[1]*r[0])/i>0?[o>0?ea:eo,el]:[o>0?eo:ea,es]):[ee||J,et||Q]):ee&&et&&ed([ee,et])),ed([J,Q])):ee-J&&et-Q&&ed([J||ee,Q||et]),er=t,ee=J,et=Q}else er&&ep(n(er,t)[0]),H[G++]=t}for(a=0;aX(g,ey))break;d=g,(k=x[0]*v[0]+x[1]*v[1])>_?(_=k,p=g,y=!1):k=e.length||!g)break;eg(g),f=g}}er&&ed([ee||er[0],et||er[1]]),U.push(H.slice(0,G))}var ev=F.slice(F.length-1);if(O&&"h"!==ev&&"v"!==ev){for(var ex=!1,eb=-1,e_=[],ew=0;ew=0?l=d:(l=d=f,f++),l=c[0]&&e.x<=c[1]&&e.y>=u[0]&&e.y<=u[1]}),p=Math.ceil(d.length/f),m=0;a.forEach(function(t,r){var n=t[0].trace;l.hasMarkers(n)&&n.marker.maxdisplayed>0&&r0;function x(e){return v?e.transition():e}var b=u.xaxis,_=u.yaxis,w=f[0].trace,k=w.line,T=r.select(p),A=a(T,"g","errorbars"),M=a(T,"g","lines"),S=a(T,"g","points"),E=a(T,"g","text");if(n.getComponentMethod("errorbars","plot")(e,A,u,m),!0===w.visible){x(T).style("opacity",w.opacity);var C,L,I=w.fill.charAt(w.fill.length-1);"x"!==I&&"y"!==I&&(I=""),"y"===I?(j=1,F=_.c2p(0,!0)):"x"===I&&(j=0,F=b.c2p(0,!0)),f[0][u.isRangePlot?"nodeRangePlot3":"node3"]=T;var P="",z=[],O=w._prevtrace,D=null,R=null;O&&(P=O._prevRevpath||"",L=O._nextFill,z=O._ownPolygons,D=O._fillsegments,R=O._fillElement);var j,F,B,N,U,V,q,H,G,W="",Y="",X=[];w._polygons=[];var Z=[],$=[],K=i.noop;if(C=w._ownFill,l.hasLines(w)||"none"!==w.fill){L&&L.datum(f),-1!==["hv","vh","hvh","vhv"].indexOf(k.shape)?(U=s.steps(k.shape),V=s.steps(k.shape.split("").reverse().join(""))):U=V="spline"===k.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),k.smoothing):s.smoothopen(e,k.smoothing)}:function(e){return"M"+e.join("L")},Z=Array(($=c(f,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(k.width||1,3)/4,shape:k.shape,backoff:k.backoff,simplify:k.simplify,fill:w.fill})).length);var J=0;for(g=0;g<$.length;g++){var Q,ee=$[g];Q&&I?Q.push.apply(Q,ee):(Q=ee.slice(),Z[J]=Q,J++)}w._fillElement=null,w._fillExclusionElement=R,w._fillsegments=Z.slice(0,J),Z=w._fillsegments,$.length&&(q=$[0][0].slice(),G=(H=$[$.length-1])[H.length-1].slice()),K=function(e){return function(t){if(B=U(t),N=V(t.reverse()),W?I?(W+="L"+B.slice(1),Y=N+"L"+Y.slice(1)):(W+="Z"+B,Y=N+"Z"+Y):(W=B,Y=N),l.hasLines(w)){var n=r.select(this);if(n.datum(f),e)x(n.style("opacity",0).attr("d",B).call(s.lineGroupStyle)).style("opacity",1);else{var i=x(n);i.attr("d",B),s.singleLineStyle(f,i)}}}}}var et=M.selectAll(".js-line").data($);x(et.exit()).style("opacity",0).remove(),et.each(K(!1)),et.enter().append("path").classed("js-line",!0).style("vector-effect",y?"none":"non-scaling-stroke").call(s.lineGroupStyle).each(K(!0)),s.setClipUrl(et,u.layerClipId,e);var er=function(){var e=Array(Z.length);for(g=0;g0,x=u(e,t,n);((m=i.selectAll("g.trace").data(x,function(e){return e[0].trace.uid})).enter().append("g").attr("class",function(e){return"trace scatter trace"+e[0].trace.uid}).style("stroke-miterlimit",2),m.order(),h=e,d=m,p=t,d.each(function(e){var t=a(r.select(this),"g","fills");s.setClipUrl(t,p.layerClipId,h);var n=e[0].trace;n._ownFill=null,n._nextFill=null;var i=[];n._ownfill&&i.push("_ownFill"),n._nexttrace&&i.push("_nextFill");var l=t.selectAll("g").data(i,o);l.enter().append("g"),l.exit().remove(),l.order().each(function(e){n[e]=a(r.select(this),"path","js-fill")})}),v)?(c&&(g=c()),r.transition().duration(l.duration).ease(l.easing).each("end",function(){g&&g()}).each("interrupt",function(){g&&g()}).each(function(){i.selectAll("g.trace").each(function(r,n){f(e,n,t,r,x,this,l)})})):m.each(function(r,n){f(e,n,t,r,x,this,l)}),y&&m.exit().remove(),i.selectAll("path:not([d])").remove()}}}),iE=d({"src/traces/scatter/marker_colorbar.js"(e,t){t.exports={container:"marker",min:"cmin",max:"cmax"}}}),iC=d({"src/traces/scatter/format_labels.js"(e,t){var r=rz();t.exports=function(e,t,n){var i={},a={_fullLayout:n},o=r.getFromTrace(a,t,"x"),s=r.getFromTrace(a,t,"y"),l=e.orig_x;void 0===l&&(l=e.x);var c=e.orig_y;return void 0===c&&(c=e.y),i.xLabel=r.tickText(o,o.c2l(l),!0).text,i.yLabel=r.tickText(s,s.c2l(c),!0).text,i}}}),iL=d({"src/traces/scatter/style.js"(e,t){var r=b(),n=rE(),i=tv();function a(e,t,r){n.pointStyle(e.selectAll("path.point"),t,r)}function o(e,t,r){n.textPointStyle(e.selectAll("text"),t,r)}t.exports={style:function(e){var t=r.select(e).selectAll("g.trace.scatter");t.style("opacity",function(e){return e[0].trace.opacity}),t.selectAll("g.points").each(function(t){a(r.select(this),t.trace||t[0].trace,e)}),t.selectAll("g.text").each(function(t){o(r.select(this),t.trace||t[0].trace,e)}),t.selectAll("g.trace path.js-line").call(n.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(n.fillGroupStyle,e,!1),i.getComponentMethod("errorbars","style")(t)},stylePoints:a,styleText:o,styleOnSelect:function(e,t,r){var i=t[0].trace;i.selectedpoints?(n.selectedPointStyle(r.selectAll("path.point"),i),n.selectedTextStyle(r.selectAll("text"),i)):(a(r,i,e),o(r,i,e))}}}}),iI=d({"src/traces/scatter/get_trace_color.js"(e,t){var r=eC(),n=rk();t.exports=function(e,t){if("lines"===e.mode)return(i=e.line.color)&&r.opacity(i)?i:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var i,a,o=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(a=o&&r.opacity(o)?o:s&&r.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?.3>r.opacity(a)?r.addOpacity(a,.3):a:(i=(e.line||{}).color)&&r.opacity(i)&&n.hasLines(e)&&e.line.width?i:e.fillcolor}}}),iP=d({"src/traces/scatter/hover.js"(e,t){var r=tY(),n=r7(),i=tv(),a=iI(),o=eC(),s=r.fillText;t.exports=function(e,t,l,c){var u=e.cd,h=u[0].trace,f=e.xa,d=e.ya,p=f.c2p(t),m=d.c2p(l),g=[p,m],y=h.hoveron||"",v=-1!==h.mode.indexOf("markers")?3:.5,x=!!h.xperiodalignment,b=!!h.yperiodalignment;if(-1!==y.indexOf("points")){var _=function(e){var t=Math.max(v,e.mrc||0),r=f.c2p(e.x)-p,n=d.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+n*n)-t,1-v/t)},w=n.getDistanceFunction(c,function(e){if(x){var t=f.c2p(e.xStart),r=f.c2p(e.xEnd);return p>=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,a=Math.abs(f.c2p(e.x)-p);return a=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var n=Math.max(3,e.mrc||0),i=1-1/n,a=Math.abs(d.c2p(e.y)-m);return ac!=(s=r[t][1])>=c&&(i=r[t-1][0],a=r[t][0],s-o&&(h=Math.min(h,n=i+(a-i)*(c-o)/(s-o)),p=Math.max(p,n)));return{x0:h=Math.max(h,0),x1:p=Math.min(p,f._length),y0:c,y1:c}}(h._polygons);null===P&&(P={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var z=o.defaultLine;return o.opacity(h.fillcolor)?z=h.fillcolor:o.opacity((h.line||{}).color)&&(z=h.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:P.x0,x1:P.x1,y0:P.y0,y1:P.y1,color:z,hovertemplate:!1}),delete e.index,h.text&&!r.isArrayOrTypedArray(h.text)?e.text=String(h.text):e.text=h.name,[e]}}}}),iz=d({"src/traces/scatter/select.js"(e,t){var r=rk();t.exports=function(e,t){var n,i,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],h=s[0].trace;if(h.mode&&!r.hasMarkers(h)&&!r.hasText(h))return[];if(!1===t)for(n=0;n0&&(i["_"+r+"axes"]||{})[t]||(i[r+"axis"]||r)===t&&(a(i,r)||(i[r]||[]).length||i[r+"0"]))return i}}(t,s,l);if(c){if("histogram"===c.type&&l===({v:"y",h:"x"})[c.orientation||"v"]){e.type="linear";return}var u=l+"calendar",h=c[u],f={noMultiCategory:!r(c,"cartesian")||r(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l===({h:"x",v:"y"})[c.orientation||"v"]&&(f.noMultiCategory=!0),f.autotypenumbers=e.autotypenumbers,a(c,l)){var d=i(c),p=[];for(o=0;o0||r(o);s&&(a="array");var l,c=n("categoryorder",a);"array"===c&&(l=n("categoryarray")),s||"array"!==c||(c=t.categoryorder="trace"),"trace"===c?t._initialCategories=[]:"array"===c?t._initialCategories=l.slice():(l=(function(e,t){var r,n,i,a=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],n=0;n=2){var l,c,u="";if(2===o.length){for(l=0;l<2;l++)if(c=b(o[l])){u=g;break}}var h=a("pattern",u);if(h===g)for(l=0;l<2;l++)(c=b(o[l]))&&(t.bounds[l]=o[l]=c-1);if(h)for(l=0;l<2;l++)switch(c=o[l],h){case g:if(!r(c)||(c*=1)!==Math.floor(c)||c<0||c>=7){t.enabled=!1;return}t.bounds[l]=o[l]=c;break;case y:if(!r(c)||(c*=1)<0||c>24){t.enabled=!1;return}t.bounds[l]=o[l]=c}if(!1===n.autorange){var f=n.range;if(f[0]f[1]){t.enabled=!1;return}}else if(o[0]>f[0]&&o[1]b[1]-1/4096&&(t.domain=s),n.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return i("layer"),t}}}),iN=d({"src/plots/cartesian/layout_defaults.js"(e,t){var r=tY(),n=eC(),i=rA().isUnifiedHover,a=r4(),o=t2(),s=tg(),l=ra(),c=iD(),u=iF(),h=nA(),f=iB(),d=t5(),p=d.id2name,m=d.name2id,g=t3().AX_ID_PATTERN,y=tv(),v=y.traceIs,x=y.getComponentMethod;function b(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}t.exports=function(e,t,y){var _,w,k=t.autotypenumbers,T={},A={},M={},S={},E={},C={},L={},I={},P={},z={};for(_=0;_ rect").call(a.setTranslate,0,0).call(a.setScale,1,1),e.plot.call(a.setTranslate,t._offset,r._offset).call(a.setScale,1,1);var n=e.plot.selectAll(".scatterlayer .trace");n.selectAll(".point").call(a.setPointGroupScale,1,1),n.selectAll(".textpoint").call(a.setTextPointsScale,1,1),n.call(a.hideOutsideRangePoints,e)}l&&(h=l());var h,f,d,p,m=r.ease(s.easing);return e._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(p),p=null,function(){for(var r={},i=0;is.duration?(function(){for(var r={},i=0;i1,m=t.mainplotinfo;if(!t.mainplot||p)if(d)t.xlines=u(n,"path","xlines-above"),t.ylines=u(n,"path","ylines-above"),t.xaxislayer=u(n,"g","xaxislayer-above"),t.yaxislayer=u(n,"g","yaxislayer-above");else{if(!a){var g=u(n,"g","layer-subplot");t.shapelayer=u(g,"g","shapelayer"),t.imagelayer=u(g,"g","imagelayer"),m&&p?(t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer):(t.minorGridlayer=u(n,"g","minor-gridlayer"),t.gridlayer=u(n,"g","gridlayer"),t.zerolinelayer=u(n,"g","zerolinelayer"));var y=u(n,"g","layer-between");t.shapelayerBetween=u(y,"g","shapelayer"),t.imagelayerBetween=u(y,"g","imagelayer"),u(n,"path","xlines-below"),u(n,"path","ylines-below"),t.overlinesBelow=u(n,"g","overlines-below"),u(n,"g","xaxislayer-below"),u(n,"g","yaxislayer-below"),t.overaxesBelow=u(n,"g","overaxes-below")}t.overplot=u(n,"g","overplot"),t.plot=u(t.overplot,"g",i),m&&p?t.zerolinelayerAbove=m.zerolinelayerAbove:t.zerolinelayerAbove=u(n,"g","zerolinelayer-above"),a||(t.xlines=u(n,"path","xlines-above"),t.ylines=u(n,"path","ylines-above"),t.overlinesAbove=u(n,"g","overlines-above"),u(n,"g","xaxislayer-above"),u(n,"g","yaxislayer-above"),t.overaxesAbove=u(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+o),t.ylines=n.select(".ylines-"+c),t.xaxislayer=n.select(".xaxislayer-"+o),t.yaxislayer=n.select(".yaxislayer-"+c))}else{var v=m.plotgroup,x=i+"-x",b=i+"-y";t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer,t.zerolinelayerAbove=m.zerolinelayerAbove,u(m.overlinesBelow,"path",x),u(m.overlinesBelow,"path",b),u(m.overaxesBelow,"g",x),u(m.overaxesBelow,"g",b),t.plot=u(m.overplot,"g",i),u(m.overlinesAbove,"path",x),u(m.overlinesAbove,"path",b),u(m.overaxesAbove,"g",x),u(m.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+o).select("."+x),t.ylines=v.select(".overlines-"+c).select("."+b),t.xaxislayer=v.select(".overaxes-"+o).select("."+x),t.yaxislayer=v.select(".overaxes-"+c).select("."+b)}a||(d||(h(t.minorGridlayer,"g",t.xaxis._id),h(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(e){return e[0]}).sort(s.idSort),h(t.gridlayer,"g",t.xaxis._id),h(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(e){return e[0]}).sort(s.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function m(e,r){if(e){var n={};for(var i in e.each(function(e){var i=e[0];t.select(this).remove(),g(i,r),n[i]=!0}),r._plots)for(var a=r._plots[i],o=a.overlays||[],s=0;s0){var g=m.id;if(-1!==g.indexOf(f))continue;g+=f+(u+1),m=n.extendFlat({},m,{id:g,plot:o._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var y,v=[],x=0;x1&&(w+=f+_),b.push(n+w),r=0;r=0,x=t.indexOf("end")>=0,b=p.backoff*g+a.standoff,_=m.backoff*y+a.startstandoff;if("line"===d.nodeName){c={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=c.x-u.x,k=c.y-u.y;if(f=(h=Math.atan2(k,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+k*k))return void D();if(b){if(b*b>w*w+k*k)return void D();var T=b*Math.cos(h),A=b*Math.sin(h);u.x+=T,u.y+=A,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+k*k)return void D();var M=_*Math.cos(h),S=_*Math.sin(h);c.x-=M,c.y-=S,e.attr({x1:c.x,y1:c.y})}}else if("path"===d.nodeName){var E=d.getTotalLength(),C="";if(E2/3?"right":"center"),({center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5})[t]}for(var X=!1,Z=["x","y"],$=0;$1)&&(ei===en?((ep=ea.r2fraction(t["a"+er]))<0||ep>1)&&(X=!0):X=!0),K=ea._offset+ea.r2p(t[er]),ee=.5}else{var em="domain"===ed;"x"===er?(Q=t[er],K=em?ea._offset+ea._length*Q:K=k.l+k.w*Q):(Q=1-t[er],K=em?ea._offset+ea._length*Q:K=k.t+k.h*Q),ee=t.showarrow?.5:Q}if(t.showarrow){ef.head=K;var eg=t["a"+er];if(et=es*Y(.5,t.xanchor)-el*Y(.5,t.yanchor),ei===en){var ey=s.getRefType(ei);"domain"===ey?("y"===er&&(eg=1-eg),ef.tail=ea._offset+ea._length*eg):"paper"===ey?"y"===er?(eg=1-eg,ef.tail=k.t+k.h*eg):ef.tail=k.l+k.w*eg:ef.tail=ea._offset+ea.r2p(eg),J=et}else ef.tail=K+eg,J=et+eg;ef.text=ef.tail+et;var ev=w["x"===er?"width":"height"];if("paper"===en&&(ef.head=a.constrain(ef.head,1,ev-1)),"pixel"===ei){var ex=-Math.max(ef.tail-3,ef.text),eb=Math.min(ef.tail+3,ef.text)-ev;ex>0?(ef.tail+=ex,ef.text+=ex):eb>0&&(ef.tail-=eb,ef.text-=eb)}ef.tail+=eh,ef.head+=eh}else J=et=ec*Y(ee,eu),ef.text=K+et;ef.text+=eh,et+=eh,J+=eh,t["_"+er+"padplus"]=ec/2+J,t["_"+er+"padminus"]=ec/2-J,t["_"+er+"size"]=ec,t["_"+er+"shift"]=et}if(X)return void j.remove();var e_=0,ew=0;if("left"!==t.align&&(e_=(D-_)*("center"===t.align?.5:1)),"top"!==t.valign&&(ew=(q-A)*("middle"===t.valign?.5:1)),p)u.select("svg").attr({x:B+e_-1,y:B+ew}).call(c.setClipUrl,U?C:null,e);else{var ek=B+ew-b.top,eT=B+e_-b.left;G.call(h.positionText,eT,ek).call(c.setClipUrl,U?C:null,e)}V.select("rect").call(c.setRect,B,B,D,q),N.call(c.setRect,F/2,F/2,H-F,W-F),j.call(c.setTranslate,Math.round(L.x.text-H/2),Math.round(L.y.text-W/2)),z.attr({transform:"rotate("+I+","+L.x.text+","+L.y.text+")"});var eA=function(r,i){P.selectAll(".annotation-arrow-g").remove();var s=L.x.head,u=L.y.head,h=L.x.tail+r,f=L.y.tail+i,p=L.x.text+r,b=L.y.text+i,_=a.rotationXYMatrix(I,p,b),w=a.apply2DTransform(_),A=a.apply2DTransform2(_),C=+N.attr("width"),O=+N.attr("height"),D=p-.5*C,R=D+C,F=b-.5*O,B=F+O,U=[[D,F,D,B],[D,B,R,B],[R,B,R,F],[R,F,D,F]].map(A);if(!U.reduce(function(e,t){return!!a.segmentsIntersect(s,u,s+1e6,u+1e6,t[0],t[1],t[2],t[3])^e},!1)){U.forEach(function(e){var t=a.segmentsIntersect(h,f,s,u,e[0],e[1],e[2],e[3]);t&&(h=t.x,f=t.y)});var V=t.arrowwidth,q=t.arrowcolor,H=t.arrowside,G=P.append("g").style({opacity:l.opacity(q)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+h+","+f+"L"+s+","+u).style("stroke-width",V+"px").call(l.stroke,l.rgb(q));if(m(W,H,t),T.annotationPosition&&W.node().parentNode&&!g){var Y=s,X=u;if(t.standoff){var Z=Math.sqrt(Math.pow(s-h,2)+Math.pow(u-f,2));Y+=t.standoff*(h-s)/Z,X+=t.standoff*(f-u)/Z}var $,K,J=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Y)+","+(f-X),transform:o(Y,X)}).style("stroke-width",V+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");d.init({element:J.node(),gd:e,prepFn:function(){var e=c.getTranslate(j);$=e.x,K=e.y,v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0)},moveFn:function(e,r){var n=w($,K),i=n[0]+e,a=n[1]+r;j.call(c.setTranslate,i,a),S("x",y(v,e,"x",k,t)),S("y",y(x,r,"y",k,t)),t.axref===t.xref&&S("ax",y(v,e,"ax",k,t)),t.ayref===t.yref&&S("ay",y(x,r,"ay",k,t)),G.attr("transform",o(e,r)),z.attr({transform:"rotate("+I+","+i+","+a+")"})},doneFn:function(){n.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&eA(0,0),O&&d.init({element:j.node(),gd:e,prepFn:function(){r=z.attr("transform")},moveFn:function(e,n){var i="pointer";if(t.showarrow)t.axref===t.xref?S("ax",y(v,e,"ax",k,t)):S("ax",t.ax+e),t.ayref===t.yref?S("ay",y(x,n,"ay",k.w,t)):S("ay",t.ay+n),eA(e,n);else{if(g)return;if(v)a=y(v,e,"x",k,t);else{var a,s,l=t._xsize/k.w,c=t.x+(t._xshift-t.xshift)/k.w-l/2;a=d.align(c+e/k.w,l,0,1,t.xanchor)}if(x)s=y(x,n,"y",k,t);else{var u=t._ysize/k.h,h=t.y-(t._yshift+t.yshift)/k.h-u/2;s=d.align(h-n/k.h,u,0,1,t.yanchor)}S("x",a),S("y",s),v&&x||(i=d.getCursor(v?.5:a,x?.5:s,t.xanchor,t.yanchor))}z.attr({transform:o(e,n)+r}),f(j,i)},clickFn:function(r,n){t.captureevents&&e.emit("plotly_clickannotation",R(n))},doneFn:function(){f(j),n.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}T.annotationText?G.call(h.makeEditable,{delegate:j,gd:e}).call(W).on("edit",function(r){t.text=r,this.call(W),S("text",r),v&&v.autorange&&M(v._name+".autorange",!0),x&&x.autorange&&M(x._name+".autorange",!0),n.call("_guiRelayout",e,E())}):G.call(W)}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var o,s,l=a(e,t),c=l.on,u=l.off.concat(l.explicitOff),h={},f=e._fullLayout.annotations;if(c.length||u.length){for(o=0;o1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=n(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*a[0],t.yaxis.r2l(l.y)*a[1],t.zaxis.r2l(l.z)*a[2]]),r(e.graphDiv,l,s,e.id,l._xa,l._ya))}}}}),i3=d({"src/components/annotations3d/index.js"(e,t){var r=tv(),n=tY();t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:iJ()}}},layoutAttributes:iJ(),handleDefaults:iQ(),includeBasePlot:function(e,t){var i=r.subplotsRegistry.gl3d;if(i)for(var a=i.attrRegex,o=Object.keys(e),s=0;s{var l,g,y,v,x=a+"anchor",b="x"===a?f:d,_={_fullLayout:i};let w=e[a+"ref"];if(Array.isArray(w)&&w.length>0){let r=o.countDefiningCoords(u,c,a);v=n.coerceRefArray(e,t,_,a,void 0,"paper",r),t["_"+a+"refArray"]=!0}else v=n.coerceRef(e,t,_,a,void 0,"paper");if(Array.isArray(v))v.forEach(function(e){"range"===n.getRefType(e)&&(l=n.getFromId(_,e))&&-1===l._shapeIndices.indexOf(t._index)&&l._shapeIndices.push(t._index)}),h&&[0,1].forEach(function(i){let c=v[i];"range"===n.getRefType(c)?(l=n.getFromId(_,c),g=o.shapePositionToRange(l),y=o.rangeToShapePosition(l),("category"===l.type||"multicategory"===l.type)&&s(a+i+"shift")):g=y=r.identity;let u=a+i,h=e[u];if(e[u]=g(e[u],!0),"pixel"===b?s(u,m[i]):n.coercePosition(t,_,s,c,u,p[i]),t[u]=y(t[u]),e[u]=h,0===i&&"pixel"===b){let r=e[x];e[x]=g(e[x],!0),n.coercePosition(t,_,s,c,x,.25),t[x]=y(t[x]),e[x]=r}});else{if("range"===n.getRefType(v)?((l=n.getFromId(_,v))._shapeIndices.push(t._index),y=o.rangeToShapePosition(l),g=o.shapePositionToRange(l),h&&("category"===l.type||"multicategory"===l.type)&&(s(a+"0shift"),s(a+"1shift"))):g=y=r.identity,h){let r=a+"0",i=a+"1",o=e[r],l=e[i];e[r]=g(e[r],!0),e[i]=g(e[i],!0),"pixel"===b?(s(r,m[0]),s(i,m[1])):(n.coercePosition(t,_,s,v,r,p[0]),n.coercePosition(t,_,s,v,i,p[1])),t[r]=y(t[r]),t[i]=y(t[i]),e[r]=o,e[i]=l}if("pixel"===b){let r=e[x];e[x]=g(e[x],!0),n.coercePosition(t,_,s,v,x,.25),t[x]=y(t[x]),e[x]=r}}}),h&&r.noneOrAll(e,t,["x0","x1","y0","y1"]);var g,y,v="line"===u;if(h&&(g=s("label.texttemplate"),s("label.texttemplatefallback")),g||(y=s("label.text")),y||g){s("label.textangle");var x=s("label.textposition",v?"middle":"middle center");s("label.xanchor"),s("label.yanchor",v?"bottom":-1!==x.indexOf("top")?"top":-1!==x.indexOf("bottom")?"bottom":"middle"),s("label.padding"),r.coerceFont(s,"label.font",i.font)}}t.exports=function(e,t){i(e,t,{name:"shapes",handleItemDefaults:s})}}}),i6=d({"src/components/shapes/draw_newshape/defaults.js"(e,t){var r=eC(),n=tY();t.exports=function(e,t,i){if(i("newshape.visible"),i("newshape.name"),i("newshape.showlegend"),i("newshape.legend"),i("newshape.legendwidth"),i("newshape.legendgroup"),i("newshape.legendgrouptitle.text"),n.coerceFont(i,"newshape.legendgrouptitle.font"),i("newshape.legendrank"),i("newshape.drawdirection"),i("newshape.layer"),i("newshape.fillcolor"),i("newshape.fillrule"),i("newshape.opacity"),i("newshape.line.width")){var a=(e||{}).plot_bgcolor||"#FFF";i("newshape.line.color",r.contrast(a)),i("newshape.line.dash")}var o="drawline"===e.dragmode,s=i("newshape.label.text"),l=i("newshape.label.texttemplate");if(i("newshape.label.texttemplatefallback"),s||l){i("newshape.label.textangle");var c=i("newshape.label.textposition",o?"middle":"middle center");i("newshape.label.xanchor"),i("newshape.label.yanchor",o?"bottom":-1!==c.indexOf("top")?"top":-1!==c.indexOf("bottom")?"bottom":"middle"),i("newshape.label.padding"),n.coerceFont(i,"newshape.label.font",t.font)}i("activeshape.fillcolor"),i("activeshape.opacity")}}}),i8=d({"src/components/shapes/calc_autorange.js"(e,t){var r=tY(),n=rz(),i=nl(),a=nc();function o(e,t,r){let o=t[r+"ref"],s="x"===r?i.paramIsX:i.paramIsY;function l(e,t){"paper"===e||"domain"===n.getRefType(e)||(c[e]||(c[e]=[]),c[e].push(t))}let c={};if("path"===t.type&&t.path){let e=t.path.match(i.segmentRE)||[];for(var u=0,h=0;hr&&(l(o[u],n[r]),u++)}}else l(o[0],t[r+"0"]),l(o[1],t[r+"1"]);let f={};for(let t in c){let r=n.getFromId(e,t);if(r){var d="category"===r.type||"multicategory"===r.type?r.r2c:r.d2c;"date"===r.type&&(d=a.decodeDate(d)),f[r._id]=c[t].map(d)}}return f}function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,n,o,s,l){var c=e/2;if("pixel"!==t)return{ppad:c};var u=s?a.extractPathCoords(s,l?i.paramIsY:i.paramIsX):[n,o],h=r.aggNums(Math.max,null,u),f=r.aggNums(Math.min,null,u),d=f<0?Math.abs(f)+c:c,p=h>0?h+c:c;return{ppad:c,ppadplus:l?d:p,ppadminus:l?p:d}}function u(e,t,r){var n,o,s="x"===e._id.charAt(0)?"x":"y",l="category"===e.type||"multicategory"===e.type,c=0,u=0,h=l?e.r2c:e.d2c;if("scaled"===t[s+"sizemode"]?(n=t[s+"0"],o=t[s+"1"],l&&(c=t[s+"0shift"],u=t[s+"1shift"])):(n=t[s+"anchor"],o=t[s+"anchor"]),void 0!==n)return[h(n)+c,h(o)+u];if(t.path){var f,d,p,m,g=1/0,y=-1/0,v=t.path.match(i.segmentRE);for("date"===e.type&&(h=a.decodeDate(h)),f=0;fy&&(y=m));if(y>=g)return[g,y]}}t.exports=function(e){var t=e._fullLayout,a=r.filterVisible(t.shapes);if(!(!a.length||!e._fullData.length))for(var c=0;c{f=n.getFromId(e,t),h._extremes[f._id]=n.findExtremes(f,r,s(h))}):"paper"!==h.xref&&"domain"!==p&&(d=u(f=n.getFromId(e,h.xref),h,i.paramIsX))&&(h._extremes[f._id]=n.findExtremes(f,d,s(h))),"array"===m?Object.entries(o(e,h,"y")).forEach(([t,r])=>{f=n.getFromId(e,t),h._extremes[f._id]=n.findExtremes(f,r,l(h))}):"paper"!==h.yref&&"domain"!==m&&(d=u(f=n.getFromId(e,h.yref),h,i.paramIsY))&&(h._extremes[f._id]=n.findExtremes(f,d,l(h)))}}}}),i9=d({"src/components/shapes/index.js"(e,t){var r=nf();t.exports={moduleType:"component",name:"shapes",layoutAttributes:i5(),supplyLayoutDefaults:i4(),supplyDrawNewShapeDefaults:i6(),includeBasePlot:nZ()("shapes"),calcAutorange:i8(),draw:r.draw,drawOne:r.drawOne}}}),i7=d({"src/components/images/attributes.js"(e,t){var r=t3(),n=t2().templatedArray;nU(),t.exports=n("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),ae=d({"src/components/images/defaults.js"(e,t){var r=tY(),n=rz(),i=rp(),a=i7();function o(e,t,i){function o(n,i){return r.coerce(e,t,a,n,i)}var s=o("source");if(!o("visible",!!s))return t;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:i},c=["x","y"],u=0;u<2;u++){var h=c[u],f=n.coerceRef(e,t,l,h,"paper",void 0);"paper"!==f&&n.getFromId(l,f)._imgIndices.push(t._index),n.coercePosition(t,l,o,f,h,0)}return t}t.exports=function(e,t){i(e,t,{name:"images",handleItemDefaults:o})}}}),at=d({"src/components/images/draw.js"(e,t){var r=b(),n=rE(),i=rz(),a=t5(),o=re();t.exports=function(e){var t,s,l=e._fullLayout,c=[],u={},h=[];for(s=0;s0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),r.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),r.coerceFont(o,"font",a.font),o("bgcolor",a.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function l(e,t){function n(n,i){return r.coerce(e,t,o,n,i)}n("visible","skip"===e.method||Array.isArray(e.args))&&(n("method"),n("args"),n("args2"),n("label"),n("execute"))}t.exports=function(e,t){n(e,t,{name:a,handleItemDefaults:s})}}}),as=d({"src/components/updatemenus/scrollbox.js"(e,t){t.exports=o;var r=b(),n=eC(),i=rE(),a=tY();function o(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}o.barWidth=2,o.barLength=20,o.barRadius=2,o.barPad=1,o.barColor="#808BA4",o.prototype.enable=function(e,t,a){var s=this.gd._fullLayout,l=s.width,c=s.height;this.position=e;var u,h,f,d,p=this.position.l,m=this.position.w,g=this.position.t,y=this.position.h,v=this.position.direction,x="down"===v,b="left"===v,_="up"===v,w=m,k=y;x||b||"right"===v||_||(this.position.direction="down",x=!0),x||_?(h=(u=p)+w,x?k=(d=Math.min((f=g)+k,c))-f:(f=Math.max((d=g+k)-k,0),k=d-f)):(d=(f=g)+k,b?(u=Math.max((h=p+w)-w,0),w=h-u):w=(h=Math.min((u=p)+w,l))-u),this._box={l:u,t:f,w:w,h:k};var T=m>w,A=o.barLength+2*o.barPad,M=o.barWidth+2*o.barPad,S=g+y;S+M>c&&(S=c-M);var E=this.container.selectAll("rect.scrollbar-horizontal").data(T?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(n.fill,o.barColor),T?(this.hbar=E.attr({rx:o.barRadius,ry:o.barRadius,x:p,y:S,width:A,height:M}),this._hbarXMin=p+A/2,this._hbarTranslateMax=w-A):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=y>k,L=o.barWidth+2*o.barPad,I=o.barLength+2*o.barPad,P=p+m;P+L>l&&(P=l-L);var z=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(n.fill,o.barColor),C?(this.vbar=z.attr({rx:o.barRadius,ry:o.barRadius,x:P,y:g,width:L,height:I}),this._vbarYMin=g+I/2,this._vbarTranslateMax=k-I):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var O=this.id,D=u-.5,R=C?h+L+.5:h+.5,j=f-.5,F=T?d+M+.5:d+.5,B=s._topdefs.selectAll("#"+O).data(T||C?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",O).append("rect"),T||C?(this._clipRect=B.select("rect").attr({x:Math.floor(D),y:Math.floor(j),width:Math.ceil(R)-Math.floor(D),height:Math.ceil(F)-Math.floor(j)}),this.container.call(i.setClipUrl,O,this.gd),this.bg.attr({x:p,y:g,width:m,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(i.setClipUrl,null),delete this._clipRect),T||C){var N=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(N);var U=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));T&&this.hbar.on(".drag",null).call(U),C&&this.vbar.on(".drag",null).call(U)}this.setTranslate(t,a)},o.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)},o.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},o.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},o.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var n=e+this._hbarXMin,i=n+this._hbarTranslateMax;e=(a.constrain(r.event.x,n,i)-n)/(i-n)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,s=o+this._vbarTranslateMax;t=(a.constrain(r.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},o.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(e=a.constrain(e||0,0,r),t=a.constrain(t||0,0,n),this.translateX=e,this.translateY=t,this.container.call(i.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var o=e/r;this.hbar.call(i.setTranslate,e+o*this._hbarTranslateMax,t)}if(this.vbar){var s=t/n;this.vbar.call(i.setTranslate,e,t+s*this._vbarTranslateMax)}}}}),al=d({"src/components/updatemenus/draw.js"(e,t){var r=b(),n=t7(),i=eC(),a=rE(),o=tY(),s=rr(),l=t2().arrayEditor,c=rt().LINE_SPACING,u=ai(),h=as();function f(e){return e._index}function d(e,t){return+e.attr(u.menuIndexAttrName)===t._index}function p(e,t,r,n,i,a,o,s){t.active=o,l(e.layout,u.name,t).applyUpdate("active",o),"buttons"===t.type?g(e,n,null,null,t):"dropdown"===t.type&&(i.attr(u.menuIndexAttrName,"-1"),m(e,n,i,a,t),s||g(e,n,i,a,t))}function m(e,t,r,n,i){var s=o.ensureSingle(t,"g",u.headerClassName,function(e){e.style("pointer-events","all")}),l=i._dims,c=i.active,h=i.buttons[c]||u.blankHeaderOpts,f={y:i.pad.t,yPad:0,x:i.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};s.call(y,i,h,e).call(A,i,f,p),o.ensureSingle(t,"text",u.headerArrowClassName,function(e){e.attr("text-anchor","end").call(a.font,i.font).text(u.arrowSymbol[i.direction])}).attr({x:l.headerWidth-u.arrowOffsetX+i.pad.l,y:l.headerHeight/2+u.textOffsetY+i.pad.t}),s.on("click",function(){r.call(M,String(d(r,i)?-1:i._index)),g(e,t,r,n,i)}),s.on("mouseover",function(){s.call(w)}),s.on("mouseout",function(){s.call(k,i)}),a.setTranslate(t,l.lx,l.ly)}function g(e,t,i,a,s){i||(i=t).attr("pointer-events","all");var l,c,h,f=-1==+i.attr(u.menuIndexAttrName)&&"buttons"!==s.type?[]:s.buttons,d="dropdown"===s.type?u.dropdownButtonClassName:u.buttonClassName,m=i.selectAll("g."+d).data(o.filterVisible(f)),g=m.enter().append("g").classed(d,!0),v=m.exit();"dropdown"===s.type?(g.attr("opacity","0").transition().attr("opacity","1"),v.transition().attr("opacity","0").remove()):v.remove();var x=0,b=0,T=s._dims,M=-1!==["up","down"].indexOf(s.direction);"dropdown"===s.type&&(M?b=T.headerHeight+u.gapButtonHeader:x=T.headerWidth+u.gapButtonHeader),"dropdown"===s.type&&"up"===s.direction&&(b=-u.gapButtonHeader+u.gapButton-T.openHeight),"dropdown"===s.type&&"left"===s.direction&&(x=-u.gapButtonHeader+u.gapButton-T.openWidth);var S={x:T.lx+x+s.pad.l,y:T.ly+b+s.pad.t,yPad:u.gapButton,xPad:u.gapButton,index:0},E={l:S.x+s.borderwidth,t:S.y+s.borderwidth};m.each(function(o,l){var c=r.select(this);c.call(y,s,o,e).call(A,s,S),c.on("click",function(){r.event.defaultPrevented||(o.execute&&(o.args2&&s.active===l?(p(e,s,o,t,i,a,-1),n.executeAPICommand(e,o.method,o.args2)):(p(e,s,o,t,i,a,l),n.executeAPICommand(e,o.method,o.args))),e.emit("plotly_buttonclicked",{menu:s,button:o,active:s.active}))}),c.on("mouseover",function(){c.call(w)}),c.on("mouseout",function(){c.call(k,s),m.call(_,s)})}),m.call(_,s),M?(E.w=Math.max(T.openWidth,T.headerWidth),E.h=S.y-E.t):(E.w=S.x-E.l,E.h=Math.max(T.openHeight,T.headerHeight)),E.direction=s.direction,a&&(m.size()?function(e,t,r){var n,i,a,o=t.direction,s=t._dims,l=t.active;if("up"===o||"down"===o)for(i=0,a=0;a0?[0]:[]);if(v.enter().append("g").classed(u.containerClassName,!0).style("cursor","pointer"),v.exit().each(function(){r.select(this).selectAll("g."+u.headerGroupClassName).each(l)}).remove(),0!==i.length){var x=v.selectAll("g."+u.headerGroupClassName).data(i,f);x.enter().append("g").classed(u.headerGroupClassName,!0);for(var b=o.ensureSingle(v,"g",u.dropdownButtonGroupClassName,function(e){e.style("pointer-events","all")}),_=0;_0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*u.gripWidth,t._dims.currentValueTotalHeight))}}function S(e,t){var r=e._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,t))}function E(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function C(e,t,r){var n=r._dims,s=o.ensureSingle(e,"rect",u.railTouchRectClass,function(n){n.call(T,t,e,r).style("pointer-events","all")});s.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,u.tickOffset+r.ticklen+n.labelHeight)}).call(i.fill,r.bgcolor).attr("opacity",0),a.setTranslate(s,0,n.currentValueTotalHeight)}function L(e,t){var r=t._dims,n=r.inputAreaLength-2*u.railInset,s=o.ensureSingle(e,"rect",u.railRectClass);s.attr({width:n,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(i.stroke,t.bordercolor).call(i.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),a.setTranslate(s,u.railInset,(r.inputAreaWidth-u.railWidth)*.5+r.currentValueTotalHeight)}t.exports=function(e){var t=e._context.staticPlot,i=e._fullLayout,s=function(e,t){for(var r=e[u.name],n=[],i=0;i0?[0]:[]);function h(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),n.autoMargin(e,m(t))}if(c.enter().append("g").classed(u.containerClassName,!0).style("cursor",t?null:"ew-resize"),c.exit().each(function(){r.select(this).selectAll("g."+u.groupClassName).each(h)}).remove(),0!==s.length){var f=c.selectAll("g."+u.groupClassName).data(s,g);f.enter().append("g").classed(u.groupClassName,!0),f.exit().each(h).remove();for(var b=0;b0?e.touches[0].clientX:0}function g(e,t,r,n){var i=a.ensureSingle(e,"rect",p.bgClassName,function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),c=n.borderwidth%2==0?n.borderwidth:n.borderwidth-1,u=-n._offsetShift,h=s.crispRound(t,n.borderwidth);i.attr({width:n._width+c,height:n._height+c,transform:o(u,u),"stroke-width":h}).call(l.stroke,n.bordercolor).call(l.fill,n.bgcolor)}function y(e,t,r,n){var i=t._fullLayout;a.ensureSingleById(i._topdefs,"clipPath",n._clipId,function(e){e.append("rect").attr({x:0,y:0})}).select("rect").attr({width:n._width,height:n._height})}function v(e,t,n,o){var l,c=t.calcdata,f=e.selectAll("g."+p.rangePlotClassName).data(n._subplotsWith,a.identity);f.enter().append("g").attr("class",function(e){return p.rangePlotClassName+" "+e}).call(s.setClipUrl,o._clipId,t),f.order(),f.exit().remove(),f.each(function(e,a){var s=r.select(this),f=h.getFromId(t,e,"y"),d=f._name,p=o[d],m={data:[],layout:{xaxis:{type:n.type,domain:[0,1],range:o.range.slice(),calendar:n.calendar},width:o._width,height:o._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};n.rangebreaks&&(m.layout.xaxis.rangebreaks=n.rangebreaks),m.layout[d]={type:f.type,domain:[0,1],range:"match"!==p.rangemode?p.range.slice():f.range.slice(),calendar:f.calendar},f.rangebreaks&&(m.layout[d].rangebreaks=f.rangebreaks),i.supplyDefaults(m);var g=m._fullLayout.xaxis,y=m._fullLayout[d];g.clearCalc(),g.setScale(),y.clearCalc(),y.setScale();var v={id:e,plotgroup:s,xaxis:g,yaxis:y,isRangePlot:!0};0===a?l=v:(v.mainplot="xy",v.mainplotinfo=l),u.rangePlot(t,v,function(e,t){for(var r=[],n=0;n=n.max)t=F[r+1];else if(e=n.pmax)t=F[r+1];else if(ei._length||v+_<0)return;u=y+_,f=v+_;break;case l:if(b="col-resize",y+_>i._length)return;u=y+_,f=v;break;case c:if(b="col-resize",v+_<0)return;u=y,f=v+_;break;default:b="ew-resize",u=g,f=g+_}if(f0)){var m=function(e,t,r){for(var n=r.filter(function(r){return t[r].anchor===e._id}),i=0,a=0;a1))return void delete t.grid;f||d||p||"independent"===T("pattern")&&(f=!0),g._hasSubplotGrid=f;var x,b,_=T("roworder"),w=f?.2:.1,k=f?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:c("x",T,w,x,v),y:c("y",T,k,b,y,"top to bottom"===_)}}function T(e,t){return r.coerce(n,g,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(!(!r||!r._domains)){var n,i,a,o,s,c,h,f=e.grid||{},d=t._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,y="independent"===r.pattern,v=r._axisMap={};if(p){var x=f.subplots||[];c=r.subplots=Array(m);var b=1;for(n=0;n0,h=e._context.staticPlot;t.each(function(t){var f,d=t[0].trace,p=d.error_x||{},m=d.error_y||{};d.ids&&(f=function(e){return e.id});var g=a.hasMarkers(d)&&d.marker.maxdisplayed>0;m.visible||p.visible||(t=[]);var y=r.select(this).selectAll("g.errorbar").data(t,f);if(y.exit().remove(),t.length){p.visible||y.selectAll("path.xerror").remove(),m.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var v=y.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),i.setClipUrl(y,o.layerClipId,e),y.each(function(e){var t=r.select(this),i=(a=e,o=l,f=c,d={x:o.c2p(a.x),y:f.c2p(a.y)},void 0!==a.yh&&(d.yh=f.c2p(a.yh),d.ys=f.c2p(a.ys),n(d.ys)||(d.noYS=!0,d.ys=f.c2p(a.ys,!0))),void 0!==a.xh&&(d.xh=o.c2p(a.xh),d.xs=o.c2p(a.xs),n(d.xs)||(d.noXS=!0,d.xs=o.c2p(a.xs,!0))),d);if(!(g&&!e.vis)){var a,o,f,d,y,v=t.select("path.yerror");if(m.visible&&n(i.x)&&n(i.yh)&&n(i.ys)){var x=m.width;y="M"+(i.x-x)+","+i.yh+"h"+2*x+"m-"+x+",0V"+i.ys,i.noYS||(y+="m-"+x+",0h"+2*x),v.size()?u&&(v=v.transition().duration(s.duration).ease(s.easing)):v=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0),v.attr("d",y)}else v.remove();var b=t.select("path.xerror");if(p.visible&&n(i.y)&&n(i.xh)&&n(i.xs)){var _=(p.copy_ystyle?m:p).width;y="M"+i.xh+","+(i.y-_)+"v"+2*_+"m0,-"+_+"H"+i.xs,i.noXS||(y+="m0,-"+_+"v"+2*_),b.size()?u&&(b=b.transition().duration(s.duration).ease(s.easing)):b=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0),b.attr("d",y)}else b.remove()}})}})}}}),aR=d({"src/components/errorbars/style.js"(e,t){var r=b(),n=eC();t.exports=function(e){e.each(function(e){var t=e[0].trace,i=t.error_y||{},a=t.error_x||{},o=r.select(this);o.selectAll("path.yerror").style("stroke-width",i.thickness+"px").call(n.stroke,i.color),a.copy_ystyle&&(a=i),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(n.stroke,a.color)})}}}),aj=d({"src/components/errorbars/index.js"(e,t){var r=tY(),n=tl().overrideAll,i=aI(),a={error_x:r.extendFlat({},i),error_y:r.extendFlat({},i)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var o={error_x:r.extendFlat({},i),error_y:r.extendFlat({},i),error_z:r.extendFlat({},i)};delete o.error_x.copy_ystyle,delete o.error_y.copy_ystyle,delete o.error_z.copy_ystyle,delete o.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:n(o,"calc","nested"),scattergl:n(a,"calc","nested")}},supplyDefaults:aP(),calc:aO(),makeComputeError:az(),plot:aD(),style:aR(),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}}}),aF=d({"src/components/colorbar/constants.js"(e,t){t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),aB=d({"src/components/colorbar/draw.js"(e,t){var r=b(),n=t7(),i=tv(),a=rz(),o=rU(),s=tY(),l=s.strTranslate,c=U().extendFlat,u=rV(),h=rE(),f=eC(),d=rC(),p=rr(),m=rn().flipScale,g=iF(),y=iB(),v=ra(),x=rt(),_=x.LINE_SPACING,w=x.FROM_TL,k=x.FROM_BR,T=aF().cn;t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+T.colorbar).data(function(e){var t,r,n,i,a=e._fullLayout,o=e.calcdata,s=[];function l(e){return c(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){"function"==typeof i.calc?i.calc(e,n,t):(t._fillgradient=r.reversescale?m(r.colorscale):r.colorscale,t._zrange=[r[i.min],r[i.max]])}for(var h=0;h0?r>=s:r<=s));n++)r>c&&r0?r>=s:r<=s));n++)r>t[0]&&r1){var ef=Math.pow(10,Math.floor(Math.log(eh)/Math.LN10));ec*=ef*s.roundUp(eh/ef,[2,5,10]),(Math.abs(G.start)/G.size+1e-6)%1<2e-6&&(es.tick0=0)}es.dtick=ec}es.domain=o?[ea+I/j.h,ea+J-I/j.h]:[ea+L/j.w,ea+J-L/j.w],es.setScale(),e.attr("transform",l(Math.round(j.l),Math.round(j.t)));var ed,ep=e.select("."+T.cbtitleunshift).attr("transform",l(-Math.round(j.l),-Math.round(j.t))),em=es.ticklabelposition,eg=es.title.font.size,ey=e.select("."+T.cbaxis),ev=0,ex=0;function eb(r,n){var a={propContainer:es,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:R._dfltTitle.colorbar,containerGroup:e.select("."+T.cbtitle)},o="h"===r.charAt(0)?r.slice(1):"h"+r;e.selectAll("."+o+",."+o+"-math-group").remove(),d.draw(i,r,c(a,n||{}))}return s.syncOrAsync([n.previousPromises,function(){if(o&&el||!o&&!el){var e,t;"top"===U&&(e=L+j.l+Q*P,t=I+j.t+ee*(1-ea-J)+3+.75*eg),"bottom"===U&&(e=L+j.l+Q*P,t=I+j.t+ee*(1-ea)-3-.25*eg),"right"===U&&(t=I+j.t+ee*z+3+.75*eg,e=L+j.l+Q*ea),eb(es._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}})}},function(){if(!o&&!el||o&&el){var n,c=e.select("."+T.cbtitle),u=c.select("text"),d=[-A/2,A/2],m=c.select(".h"+es._id+"title-math-group").node(),g=15.6;if(u.node()&&(g=parseInt(u.node().style.fontSize,10)*_),m?(ex=(n=h.bBox(m)).width,(ev=n.height)>g&&(d[1]-=(ev-g)/2)):u.node()&&!u.classed(T.jsPlaceholder)&&(ex=(n=h.bBox(u.node())).width,ev=n.height),o){if(ev){if(ev+=5,"top"===U)es.domain[1]-=ev/j.h,d[1]*=-1;else{es.domain[0]+=ev/j.h;var y=p.lineCount(u);d[1]+=(1-y)*g}c.attr("transform",l(d[0],d[1])),es.setScale()}}else ex&&("right"===U&&(es.domain[0]+=(ex+eg/2)/j.w),c.attr("transform",l(d[0],d[1])),es.setScale())}e.selectAll("."+T.cbfills+",."+T.cblines).attr("transform",o?l(0,Math.round(j.h*(1-es.domain[1]))):l(Math.round(j.w*es.domain[0]),0)),ey.attr("transform",o?l(0,Math.round(-j.t)):l(Math.round(-j.l),0));var v=e.select("."+T.cbfills).selectAll("rect."+T.cbfill).attr("style","").data(Y);v.enter().append("rect").classed(T.cbfill,!0).attr("style",""),v.exit().remove();var x=V.map(es.c2p).map(Math.round).sort(function(e,t){return e-t});v.each(function(e,n){var a=[0===n?V[0]:(Y[n]+Y[n-1])/2,n===Y.length-1?V[1]:(Y[n]+Y[n+1])/2].map(es.c2p).map(Math.round);o&&(a[1]=s.constrain(a[1]+(a[1]>a[0])?1:-1,x[0],x[1]));var l=r.select(this).attr(o?"x":"y",et).attr(o?"y":"x",r.min(a)).attr(o?"width":"height",Math.max(Z,2)).attr(o?"height":"width",Math.max(r.max(a)-r.min(a),2));if(t._fillgradient)h.gradient(l,i,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var c=H(e).replace("e-","");l.attr("fill",f.color(c).hex())}});var b=e.select("."+T.cblines).selectAll("path."+T.cbline).data(B.color&&B.width?X:[]);b.enter().append("path").classed(T.cbline,!0),b.exit().remove(),b.each(function(e){var t=Math.round(es.c2p(e))+B.width/2%1;r.select(this).attr("d","M"+(o?et+","+t:t+","+et)+(o?"h":"v")+Z).call(h.lineGroupStyle,B.width,q(e),B.dash)}),ey.selectAll("g."+es._id+"tick,path").remove();var w=et+Z+(A||0)/2-("outside"===t.ticks),k=a.calcTicks(es),M=a.getTickSigns(es)[2];return a.drawTicks(i,es,{vals:"inside"===es.ticks?a.clipEnds(es,k):k,layer:ey,path:a.makeTickPath(es,w,M),transFn:a.makeTransTickFn(es)}),a.drawLabels(i,es,{vals:k,layer:ey,transFn:a.makeTransTickLabelFn(es),labelFns:a.makeLabelFns(es,w)})},function(){if(o&&!el||!o&&el){var e,n,a=es.position||0,s=es._offset+es._length/2;if("right"===U)n=s,e=j.l+Q*a+10+eg*(es.showticklabels?1:.5);else if(e=s,"bottom"===U&&(n=j.t+ee*a+10+(-1===em.indexOf("inside")?es.tickfont.size:0)+("inside"!==es.ticks&&t.ticklen||0)),"top"===U){var l=N.text.split("
").length;n=j.t+ee*a+10-Z-_*eg*l}eb((o?"h":"v")+es._id+"title",{avoid:{selection:r.select(i).selectAll("g."+es._id+"tick"),side:U,offsetTop:o?0:j.t,offsetLeft:o?j.l:0,maxShift:o?R.width:R.height},attributes:{x:e,y:n,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},n.previousPromises,function(){var r,a=Z+A/2;-1===em.indexOf("inside")&&(r=h.bBox(ey.node()),a+=o?r.width:r.height),ed=ep.select("text");var s=0,c=o&&"top"===U,d=!o&&"right"===U,p=0;if(ed.node()&&!ed.classed(T.jsPlaceholder)){var g,y=ep.select(".h"+es._id+"title-math-group").node();y&&(o&&el||!o&&!el)?(s=(r=h.bBox(y)).width,g=r.height):(s=(r=h.bBox(ep.node())).right-j.l-(o?et:eo),g=r.bottom-j.t-(o?eo:et),o||"top"!==U||(a+=r.height,p=r.height)),d&&(ed.attr("transform",l(s/2+eg/2,0)),s*=2),a=Math.max(a,o?s:g)}var v=(o?L:I)*2+a+M+A/2,_=0;!o&&N.text&&"bottom"===C&&z<=0&&(_=v/2,v+=_,p+=_),R._hColorbarMoveTitle=_,R._hColorbarMoveCBTitle=p;var F=M+A,B=(o?et:eo)-F/2-(o?L:0),V=(o?eo:et)-(o?K:I+p-_);e.select("."+T.cbbg).attr("x",B).attr("y",V).attr(o?"width":"height",Math.max(v-_,2)).attr(o?"height":"width",Math.max(K+F,2)).call(f.fill,S).call(f.stroke,t.bordercolor).style("stroke-width",M);var q=d?Math.max(s-10,0):0;e.selectAll("."+T.cboutline).attr("x",(o?et:eo+L)+q).attr("y",(o?eo+I-K:et)+(c?ev:0)).attr(o?"width":"height",Math.max(Z,2)).attr(o?"height":"width",Math.max(K-(o?2*I+ev:2*L+q),2)).call(f.stroke,t.outlinecolor).style({fill:"none","stroke-width":A});var H=o?er*v:0,G=o?0:(1-en)*v-p;if(H=D?j.l-H:-H,G=O?j.t-G:-G,e.attr("transform",l(H,G)),!o&&(M||f.opacity(S)&&!f.equals(R.paper_bgcolor,S))){var W=ey.selectAll("text"),Y=W[0].length,X=e.select("."+T.cbbg).node(),$=h.bBox(X),J=h.getTranslate(e);W.each(function(e,t){var r=Y-1;if(0===t||t===r){var n,i=h.bBox(this),a=h.getTranslate(this);if(t===r){var o=i.right+a.x;(n=$.right+J.x+eo-M-2+P-o)>0&&(n=0)}else if(0===t){var s=i.left+a.x;(n=$.left+J.x+eo+M+2-s)<0&&(n=0)}n&&(Y<3?this.setAttribute("transform","translate("+n+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Q={},ee=w[E],ei=k[E],ea=w[C],ec=k[C],eu=v-Z;o?("pixels"===m?(Q.y=z,Q.t=K*ea,Q.b=K*ec):(Q.t=Q.b=0,Q.yt=z+u*ea,Q.yb=z-u*ec),"pixels"===b?(Q.x=P,Q.l=v*ee,Q.r=v*ei):(Q.l=eu*ee,Q.r=eu*ei,Q.xl=P-x*ee,Q.xr=P+x*ei)):("pixels"===m?(Q.x=P,Q.l=K*ee,Q.r=K*ei):(Q.l=Q.r=0,Q.xl=P+u*ee,Q.xr=P-u*ei),"pixels"===b?(Q.y=1-z,Q.t=v*ea,Q.b=v*ec):(Q.t=eu*ea,Q.b=eu*ec,Q.yt=z-x*ea,Q.yb=z+x*ec));var eh=t.y<.5?"b":"t",ef=t.x<.5?"l":"r";i._fullLayout._reservedMargin[t._id]={};var ex={r:R.width-B-H,l:B+Q.r,b:R.height-V-G,t:V+Q.b};D&&O?n.autoMargin(i,t._id,Q):D?i._fullLayout._reservedMargin[t._id][eh]=ex[eh]:O||o?i._fullLayout._reservedMargin[t._id][ef]=ex[ef]:i._fullLayout._reservedMargin[t._id][eh]=ex[eh]}],i)}(L,t,e);I&&I.then&&(e._promises||[]).push(I),e._context.edits.colorbarPosition&&(m=L,x=t,b=e,E="v"===x.orientation,C=b._fullLayout._size,o.init({element:m.node(),gd:b,prepFn:function(){A=m.attr("transform"),u(m)},moveFn:function(e,t){m.attr("transform",A+l(e,t)),M=o.align((E?x._uFrac:x._vFrac)+e/C.w,E?x._thickFrac:x._lenFrac,0,1,x.xanchor),S=o.align((E?x._vFrac:1-x._uFrac)-t/C.h,E?x._lenFrac:x._thickFrac,0,1,x.yanchor),u(m,o.getCursor(M,S,x.xanchor,x.yanchor))},doneFn:function(){if(u(m),void 0!==M&&void 0!==S){var e={};e[x._propPrefix+"x"]=M,e[x._propPrefix+"y"]=S,void 0!==x._traceIndex?i.call("_guiRestyle",b,e,x._traceIndex):i.call("_guiRelayout",b,e)}}}))}),t.exit().each(function(t){n.autoMargin(e,t._id)}).remove(),t.order()}}}}),aN=d({"src/components/colorbar/index.js"(e,t){t.exports={moduleType:"component",name:"colorbar",attributes:ro(),supplyDefaults:ry(),draw:aB().draw,hasColorbar:rc()}}}),aU=d({"src/components/legend/index.js"(e,t){t.exports={moduleType:"component",name:"legend",layoutAttributes:rH(),supplyLayoutDefaults:rW(),draw:r0(),style:rQ()}}}),aV=d({"src/locale-en.js"(e,t){t.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"}}}}),aq=d({"src/locale-en-us.js"(e,t){t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),aH=d({"src/snapshot/cloneplot.js"(e,t){var r=tv(),n=tY(),i=n.extendFlat,a=n.extendDeep;function o(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}t.exports=function(e,t){var n,s=e.data,l=e.layout,c=a([],s),u=a({},l,o(t.tileClass));if(e._context,t.width&&(u.width=t.width),t.height&&(u.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){u.annotations=[];var h=Object.keys(u);for(n=0;n-1&&(u[h[n]].title={text:""});for(n=0;n=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&r(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function d(e,t,r,i,a,o){var s=!1!==(o=o||{}).moduleHasSelected,l=!1!==o.moduleHasUnselected,c=!1!==o.moduleHasConstrain,u=!1!==o.moduleHasCliponaxis,f=!1!==o.moduleHasTextangle,d=!1!==o.moduleHasInsideanchor,p=!!o.hasPathbar,m=Array.isArray(a)||"auto"===a,g=m||"inside"===a,y=m||"outside"===a;if(g||y){var v=h(i,"textfont",r.font),x=n.extendFlat({},v),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,h(i,"insidetextfont",x),p){var _=n.extendFlat({},v);b&&delete _.color,h(i,"pathbar.textfont",_)}y&&h(i,"outsidetextfont",v),s&&i("selected.textfont.color"),l&&i("unselected.textfont.color"),c&&i("constraintext"),u&&i("cliponaxis"),f&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}g&&d&&i("insidetextanchor")}t.exports={supplyDefaults:function(e,t,r,c){function h(r,i){return n.coerce(e,t,u,r,i)}if(!o(e,t,c,h)){t.visible=!1;return}s(e,t,c,h),h("xhoverformat"),h("yhoverformat"),h("zorder"),h("orientation",t.x&&!t.y?"h":"v"),h("base"),h("offset"),h("width"),h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback");var f=h("textposition");d(e,t,c,h,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l(e,t,h,r,c);var p=(t.marker.line||{}).color,m=a.getComponentMethod("errorbars","supplyDefaults");m(e,t,p||i.defaultLine,{axis:"y"}),m(e,t,p||i.defaultLine,{axis:"x",inherit:"y"}),n.coerceSelectionMarkerOpacity(t,h)},crossTraceDefaults:function(e,t){var r,i;function a(e,t){return n.coerce(i._input,i,u,e,t)}for(var o=0;o0&&!f[y]&&(h=!0)),f[y]=!0,g.visible&&"histogram"===g.type&&"category"!==n.getFromId({_fullLayout:t},g["v"===g.orientation?"xaxis":"yaxis"]).type&&(u=!0)}}c?("overlay"!==d&&l("barnorm"),l("bargap",u&&!h?0:.2),l("bargroupgap"),t.barcornerradius=o(l("barcornerradius"))):delete t.barmode}}}),a0=d({"src/traces/bar/arrays_to_calcdata.js"(e,t){var r=tY();t.exports=function(e,t){for(var n=0;na))return t}return void 0!==n?n:e.dflt},e.coerceColor=function(e,r,n){return t.isValid(r)?r:void 0!==n?n:e.dflt},e.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t*=1),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},e.getValue=function(e,t){var r;return n(e)?t1||0===i.bargap&&0===i.bargroupgap&&!e[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(t){d(r.select(this),t[0].trace,e)}),o.getComponentMethod("errorbars","style")(t)},styleTextPoints:p,styleOnSelect:function(e,t,n){var s,l,c,u,h,f,p=t[0].trace;p.selectedpoints?(s=n,l=p,c=e,i.selectedPointStyle(s.selectAll("path"),l),u=s.selectAll("text"),h=l,f=c,u.each(function(e){var t,n=r.select(this);if(e.selected){t=a.ensureUniformFontSize(f,m(n,e,h,f));var o=h.selected.textfont&&h.selected.textfont.color;o&&(t.color=o),i.font(n,t)}else i.selectedTextStyle(n,h)})):(d(n,p,e),o.getComponentMethod("errorbars","style")(n))},getInsideTextFont:y,getOutsideTextFont:v,getBarColor:_,resizeText:s}}}),a4=d({"src/traces/bar/plot.js"(e,t){var r=b(),n=A(),i=tY(),a=rr(),o=eC(),s=rE(),l=tv(),c=rz().tickText,u=a2(),h=u.recordMinTextSize,f=u.clearMinTextSize,d=a5(),p=a3(),m=iw(),g=aZ(),y=g.text,v=g.textposition,x=rA().appendArrayPointValue,_=m.TEXTPAD;function w(e){return e.id}function k(e,t,r,n){var i;return!t.uniformtext.mode&&T(r)?(n&&(i=n()),e.transition().duration(r.duration).ease(r.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()})):e}function T(e){return e&&e.duration>0}function M(e,t,r,n,i){return!(e<0)&&!(t<0)&&(r<=e&&n<=t||r<=t&&n<=e||(i?e>=t/n*r:t>=e/r*n))}function S(e){return"auto"===e?0:e}function E(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),i=Math.abs(Math.cos(r));return{x:e.width*i+e.height*n,y:e.width*n+e.height*i}}function C(e,t,r,n,i,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor,u="end"===c,h="start"===c,f=((a.leftToRight||0)+1)/2,d=1-f,p=a.hasB,m=a.r,g=a.overhead,y=i.width,v=i.height,x=Math.abs(t-e),b=Math.abs(n-r),w=x>2*_&&b>2*_?_:0;x-=2*w,b-=2*w;var k=S(l);"auto"===l&&!(y<=x&&v<=b)&&(y>x||v>b)&&(!(y>b||v>x)||y_){var C,L,I,P,z,O,D,R,j,F,B,N,U,V,q,H,G,W=(C=e,L=t,I=r,P=n,z=M,O=m,D=g,R=o,j=p,V=Math.max(0,Math.abs(L-C)-2*_),q=Math.max(0,Math.abs(P-I)-2*_),H=O-_,G=D?H-Math.sqrt(H*H-(H-D)*(H-D)):H,z.y/z.x>=q/(V-(j?2*H:R?H-D:2*G))?N=q/z.y:z.y/z.x<=(q-(j?2*H:R?2*G:H-D))/V?N=V/z.x:!j&&R?(F=z.x*z.x+z.y*z.y/4,N=(-(B=-2*z.x*(V-H)-z.y*(q/2-H))+Math.sqrt(B*B-4*F*((V-H)*(V-H)+(q/2-H)*(q/2-H)-H*H)))/(2*F)):j?(F=(z.x*z.x+z.y*z.y)/4,N=(-(B=-z.x*(V/2-H)-z.y*(q/2-H))+Math.sqrt(B*B-4*F*((V/2-H)*(V/2-H)+(q/2-H)*(q/2-H)-H*H)))/(2*F)):(F=z.x*z.x/4+z.y*z.y,N=(-(B=-z.x*(V/2-H)-2*z.y*(q-H))+Math.sqrt(B*B-4*F*((V/2-H)*(V/2-H)+(q-H)*(q-H)-H*H)))/(2*F)),N=Math.min(1,N),U=R?Math.max(0,H-Math.sqrt(Math.max(0,H*H-(H-(q-z.y*N)/2)*(H-(q-z.y*N)/2)))-D):Math.max(0,H-Math.sqrt(Math.max(0,H*H-(H-(V-z.x*N)/2)*(H-(V-z.x*N)/2)))-D),{scale:N,pad:U});T=W.scale,A=W.pad}else T=1,s&&(T=Math.min(1,x/M.x,b/M.y)),A=0;var Y=i.left*d+i.right*f,X=(i.top+i.bottom)/2,Z=(e+_)*d+(t-_)*f,$=(r+n)/2,K=0,J=0;if(h||u){var Q=(o?M.x:M.y)/2;m&&(u||p)&&(w+=A);var ee=o?eo.opacity(Q)||J>.01?W:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?W(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(O=Y(O,U,B),U=Y(U,O,B),V=Y(V,q,!B),q=Y(q,V,!B));var X,Z,$,K,J,Q,ee,et=B?A.c2p:L.c2p;ee=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var er,en,ei=R||D?function(e,t){if(!e)return 0;var r=Math.abs(B?q-V:U-O),n=Math.abs(B?U-O:q-V),i=Y(Math.abs(et(ee,!0)-et(0,!0))),a=u.hasB?Math.min(r/2,n/2):Math.min(r/2,i);return Y(Math.max(Math.min("%"===t?Math.min(50,e)/100*r:e,a),0))}(m.cornerradiusvalue,m.cornerradiusform):0,ea="M"+O+","+V+"V"+q+"H"+U+"V"+V+"Z",eo=0;if(ei&&u.s){var es,el,ec,eu=0==((es=u.s0)>0)-(es<0)||((el=u.s)>0)-(el<0)==((ec=u.s0)>0)-(ec<0)?u.s1:u.s0;if((eo=Y(u.hasB?0:Math.abs(et(ee,!0)-et(eu,!0))))0?Math.sqrt(eo*(2*ei-eo)):0,eg=eh>0?Math.max:Math.min;er="M"+O+","+V+"V"+(q-ep*ef)+"H"+eg(U-(ei-eo)*eh,O)+"A "+ei+","+ei+" 0 0 "+ed+" "+U+","+(q-ei*ef-em)+"V"+(V+ei*ef+em)+"A "+ei+","+ei+" 0 0 "+ed+" "+eg(U-(ei-eo)*eh,O)+","+(V+ep*ef)+"Z"}else if(u.hasB)er="M"+(O+ei*eh)+","+V+"A "+ei+","+ei+" 0 0 "+ed+" "+O+","+(V+ei*ef)+"V"+(q-ei*ef)+"A "+ei+","+ei+" 0 0 "+ed+" "+(O+ei*eh)+","+q+"H"+(U-ei*eh)+"A "+ei+","+ei+" 0 0 "+ed+" "+U+","+(q-ei*ef)+"V"+(V+ei*ef)+"A "+ei+","+ei+" 0 0 "+ed+" "+(U-ei*eh)+","+V+"Z";else{var ey=(en=Math.abs(q-V)+eo)0?Math.sqrt(eo*(2*ei-eo)):0,ex=ef>0?Math.max:Math.min;er="M"+(O+ey*eh)+","+V+"V"+ex(q-(ei-eo)*ef,V)+"A "+ei+","+ei+" 0 0 "+ed+" "+(O+ei*eh-ev)+","+q+"H"+(U-ei*eh+ev)+"A "+ei+","+ei+" 0 0 "+ed+" "+(U-ey*eh)+","+ex(q-(ei-eo)*ef,V)+"V"+V+"Z"}}else er=ea}else er=ea;var eb=k(i.ensureSingle(T,"path"),I,g,b);if(eb.style("vector-effect",P?"none":"non-scaling-stroke").attr("d",isNaN((U-O)*(q-V))||H&&e._context.staticPlot?"M0,0Z":er).call(s.setClipUrl,t.layerClipId,e),!I.uniformtext.mode&&N){var e_=s.makePointStyleFns(f);s.singlePointStyle(u,eb,f,e_,e)}(function(e,t,r,n,o,l,u,f,m,g,b,w,T){var A,L,I,P,z,O,D,R,j,F,B,N,U,V,q,H,G,W,Y,X,Z,$,K,J,Q,ee,et=t.xaxis,er=t.yaxis,en=e._fullLayout;function ei(t,r,n){return i.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+ee,"text-anchor":"middle","data-notex":1}).call(s.font,n).call(a.convertToTspans,e)}var ea=n[0].trace,eo="h"===ea.orientation,es=(ex=en,eb=n,e_=o,ew=et,ek=er,eT=(eA=eb[0].trace).texttemplate?function(e,t,r,n,a){var o,s=t[0].trace,l=i.castOption(s,r,"texttemplate");if(!l)return"";var u,h,f,d,p="histogram"===s.type,m="waterfall"===s.type,g="funnel"===s.type,y="h"===s.orientation;function v(e){return c(d,d.c2l(e),!0).text}y?(u="y",h=a,f="x",d=n):(u="x",h=n,f="y",d=a);var b=t[r],_={};_.label=b.p,_.labelLabel=_[u+"Label"]=(o=b.p,c(h,h.c2l(o),!0).text);var w=i.castOption(s,b.i,"text");(0===w||w)&&(_.text=w),_.value=b.s,_.valueLabel=_[f+"Label"]=v(b.s);var k={};x(k,s,b.i),(p||void 0===k.x)&&(k.x=y?_.value:_.label),(p||void 0===k.y)&&(k.y=y?_.label:_.value),(p||void 0===k.xLabel)&&(k.xLabel=y?_.valueLabel:_.labelLabel),(p||void 0===k.yLabel)&&(k.yLabel=y?_.labelLabel:_.valueLabel),m&&(_.delta=+b.rawS||b.s,_.deltaLabel=v(_.delta),_.final=b.v,_.finalLabel=v(_.final),_.initial=_.final-_.delta,_.initialLabel=v(_.initial)),g&&(_.value=b.s,_.valueLabel=v(_.value),_.percentInitial=b.begR,_.percentInitialLabel=i.formatPercent(b.begR),_.percentPrevious=b.difR,_.percentPreviousLabel=i.formatPercent(b.difR),_.percentTotal=b.sumR,_.percenTotalLabel=i.formatPercent(b.sumR));var T=i.castOption(s,b.i,"customdata");return T&&(_.customdata=T),i.texttemplateString({data:[k,_,s._meta],fallback:s.texttemplatefallback,labels:_,locale:e._d3locale,template:l})}(ex,eb,e_,ew,ek):eA.textinfo?function(e,t,r,n){var a=e[0].trace,o="h"===a.orientation,s="waterfall"===a.type,l="funnel"===a.type;function u(e){return c(o?r:n,+e,!0).text}var h,f=a.textinfo,d=e[t],p=f.split("+"),m=[],g=function(e){return -1!==p.indexOf(e)};if(g("label")&&m.push(c(o?n:r,e[t].p,!0).text),g("text")&&(0===(h=i.castOption(a,d.i,"text"))||h)&&m.push(h),s){var y=+d.rawS||d.s,v=d.v;g("initial")&&m.push(u(v-y)),g("delta")&&m.push(u(y)),g("final")&&m.push(u(v))}if(l){g("value")&&m.push(u(d.s));var x=0;g("percent initial")&&x++,g("percent previous")&&x++,g("percent total")&&x++;var b=x>1;g("percent initial")&&(h=i.formatPercent(d.begR),b&&(h+=" of initial"),m.push(h)),g("percent previous")&&(h=i.formatPercent(d.difR),b&&(h+=" of previous"),m.push(h)),g("percent total")&&(h=i.formatPercent(d.sumR),b&&(h+=" of total"),m.push(h))}return m.join("
")}(eb,e_,ew,ek):p.getValue(eA.text,e_),p.coerceString(y,eT));eM=ea,eS=o,eE=p.getValue(eM.textposition,eS),ee=p.coerceEnumerated(v,eE);var el="stack"===w.mode||"relative"===w.mode,ec=n[o],eu=!el||ec._outmost,eh=ec.hasB,ef=g&&g-b>_;if(!es||"none"===ee||(ec.isBlank||l===u||f===m)&&("auto"===ee||"inside"===ee))return r.select("text").remove();var ed=en.font,ep=d.getBarColor(n[o],ea),em=d.getInsideTextFont(ea,o,ed,ep),eg=d.getOutsideTextFont(ea,o,ed),ey=ea.insidetextanchor||"end",ev=r.datum();eo?"log"===et.type&&ev.s0<=0&&(l=et.range[0]0&&eP>0;eR=ef?eh?M(eO-2*g,eD,eI,eP,eo)||M(eO,eD-2*g,eI,eP,eo):eo?M(eO-(g-b),eD,eI,eP,eo)||M(eO,eD-2*(g-b),eI,eP,eo):M(eO,eD-(g-b),eI,eP,eo)||M(eO-2*(g-b),eD,eI,eP,eo):M(eO,eD,eI,eP,eo),ej&&eR?ee="inside":(ee="outside",eC.remove(),eC=null)}else ee="inside";if(!eC){var eF=(eC=ei(r,es,ez=i.ensureUniformFontSize(e,"outside"===ee?eg:em))).attr("transform");if(eC.attr("transform",""),eI=(eL=s.bBox(eC.node())).width,eP=eL.height,eC.attr("transform",eF),eI<=0||eP<=0)return eC.remove()}var eB,eN=ea.textangle;(eB="outside"===ee?(A=l,L=u,I=f,P=m,z=eL,R=!!(O={isHorizontal:eo,constrained:"both"===ea.constraintext||"outside"===ea.constraintext,angle:eN}).isHorizontal,j=!!O.constrained,F=O.angle||0,B=z.width,N=z.height,U=Math.abs(L-A),V=Math.abs(P-I),D=R?V>2*_?_:0:U>2*_?_:0,q=1,j&&(q=R?Math.min(1,V/N):Math.min(1,U/B)),G=E(z,H=S(F)),W=(R?G.x:G.y)/2,Y=(z.left+z.right)/2,X=(z.top+z.bottom)/2,Z=(A+L)/2,$=(I+P)/2,K=0,J=0,Q=R?L0?t+=r:u<0&&(t-=r)}return t}function z(e){var t=u,n=e.b,i=P(e);return r.inbox(n-t,i-t,_+(i-t)/(i-n)-1)}var O=e[h+"a"],D=e[f+"a"];m=Math.abs(O.r2c(O.range[1])-O.r2c(O.range[0]));var R=r.getDistanceFunction(i,d,p,function(e){return(d(e)+p(e))/2});if(r.getClosest(g,R,e),!1!==e.index&&g[e.index].p!==l){x||k||(E=function(e){return Math.min(T(e),e.p-v.bargroupwidth/2)},C=function(e){return Math.max(A(e),e.p+v.bargroupwidth/2)});var j,F,B,N=g[e.index],U=y.base?N.b+N.s:N.s;e[f+"0"]=e[f+"1"]=D.c2p(N[f],!0),e[f+"LabelVal"]=U;var V=v.extents[v.extents.round(N.p)];e[h+"0"]=O.c2p(x?E(N):V[0],!0),e[h+"1"]=O.c2p(x?C(N):V[1],!0);var q=void 0!==N.orig_p;return e[h+"LabelVal"]=q?N.orig_p:N.p,e.labelLabel=s(O,e[h+"LabelVal"],y[h+"hoverformat"]),e.valueLabel=s(D,e[f+"LabelVal"],y[f+"hoverformat"]),e.baseLabel=s(D,N.b,y[f+"hoverformat"]),j=u,F=N.b,B=P(N),e.spikeDistance=(r.inbox(F-j,B-j,w+(B-j)/(B-F)-1)+L(T(N),A(N),w))/2,e[h+"Spike"]=O.c2p(N.p,!0),a(N,y,e),e.hovertemplate=y.hovertemplate,e}}function u(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=o(e,t);return i.opacity(r)?r:i.opacity(n)&&a?n:void 0}t.exports={hoverPoints:function(e,t,r,i,a){var o=c(e,t,r,i,a);if(o){var s=o.cd,l=s[0].trace,h=s[o.index];return o.color=u(l,h),n.getComponentMethod("errorbars","hoverInfo")(h,l,o),[o]}},hoverOnBars:c,getTraceColor:u}}}),a8=d({"src/traces/bar/event_data.js"(e,t){t.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}}}),a9=d({"src/traces/bar/select.js"(e,t){t.exports=function(e,t){var r,n=e.cd,i=e.xaxis,a=e.yaxis,o=n[0].trace,s="funnel"===o.type,l="h"===o.orientation,c=[];if(!1===t)for(r=0;r0?(g="v",y=x>0?Math.min(_,b):Math.min(b)):x>0?(g="h",y=Math.min(_)):y=0;if(!y){t.visible=!1;return}t._length=y;var S=i("orientation",g);t._hasPreCompStats?"v"===S&&0===x?(i("x0",0),i("dx",1)):"h"===S&&0===v&&(i("y0",0),i("dy",1)):"v"===S&&0===x?i("x0"):"h"===S&&0===v&&i("y0"),n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],a)}function u(e,t,n,i){var a=i.prefix,o=r.coerce2(e,t,l,"marker.outliercolor"),s=n("marker.line.outliercolor"),c="outliers";t._hasPreCompStats?c="all":(o||s)&&(c="suspectedoutliers");var u=n(a+"points",c);u?(n("jitter",.3*("all"===u)),n("pointpos","all"===u?-1.5:0),n("marker.symbol"),n("marker.opacity"),n("marker.size"),n("marker.angle"),n("marker.color",t.line.color),n("marker.line.color"),n("marker.line.width"),"suspectedoutliers"===u&&(n("marker.line.outliercolor",t.marker.color),n("marker.line.outlierwidth")),n("selected.marker.color"),n("unselected.marker.color"),n("selected.marker.size"),n("unselected.marker.size"),n("text"),n("hovertext")):delete t.marker;var h=n("hoveron");("all"===h||-1!==h.indexOf("points"))&&(n("hovertemplate"),n("hovertemplatefallback")),r.coerceSelectionMarkerOpacity(t,n)}t.exports={supplyDefaults:function(e,t,n,o){function s(n,i){return r.coerce(e,t,l,n,i)}if(c(e,t,s,o),!1!==t.visible){a(e,t,o,s),s("xhoverformat"),s("yhoverformat");var h=t._hasPreCompStats;h&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||n),s("line.width"),s("fillcolor",i.addOpacity(t.line.color,.5));var f=!1;if(h){var d=s("mean"),p=s("sd");d&&d.length&&(f=!0,p&&p.length&&(f="sd"))}s("whiskerwidth");var m,g=s("sizemode");"quartiles"===g&&(m=s("boxmean",f)),s("showwhiskers","quartiles"===g),("sd"===g||"sd"===m)&&s("sdmultiple"),s("width"),s("quartilemethod");var y=!1;if(h){var v=s("notchspan");v&&v.length&&(y=!0)}else r.validate(e.notchwidth,l.notchwidth)&&(y=!0);s("notched",y)&&s("notchwidth"),u(e,t,s,{prefix:"box"}),s("zorder")}},crossTraceDefaults:function(e,t){var n,i;function a(e){return r.coerce(i._input,i,l,e)}for(var s=0;sE.uf};if(t._hasPreCompStats){var U=t[x],V=function(e){return v.d2c((t[e]||[])[l])},q=1/0,H=-1/0;for(l=0;l=E.q1&&E.q3>=E.med){var W,Y=V("lowerfence");E.lf=Y!==o&&Y<=E.q1?Y:f(E,L,I);var X=V("upperfence");E.uf=X!==o&&X>=E.q3?X:d(E,L,I);var Z=V("mean");E.mean=Z!==o?Z:I?a.mean(L,I):(E.q1+E.q3)/2;var $=V("sd");E.sd=Z!==o&&$>=0?$:I?a.stdev(L,I,E.mean):E.q3-E.q1,E.lo=p(E),E.uo=m(E);var K=V("notchspan");K=K!==o&&K>0?K:g(E,I),E.ln=E.med-K,E.un=E.med+K;var J=E.lf,Q=E.uf;t.boxpoints&&L.length&&(J=Math.min(J,L[0]),Q=Math.max(Q,L[I-1])),t.notched&&(J=Math.min(J,E.ln),Q=Math.max(Q,E.un)),E.min=J,E.max=Q}else a.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join(` -`)),W=E.med!==o?E.med:E.q1!==o?E.q3!==o?(E.q1+E.q3)/2:E.q1:E.q3!==o?E.q3:0,E.med=W,E.q1=E.q3=W,E.lf=E.uf=W,E.mean=E.sd=W,E.ln=E.un=W,E.min=E.max=W;q=Math.min(q,E.min),H=Math.max(H,E.max),E.pts2=C.filter(N),M.push(E)}}t._extremes[v._id]=n.findExtremes(v,[q,H],{padded:!0})}else{var ee,et,er=v.makeCalcdata(t,x),en=function(e,t){for(var r=e.length,n=Array(r+1),i=0;i=0&&eo0){((E={}).pos=E[_]=F[l],C=E.pts=ea[l].sort(u),I=(L=E[x]=C.map(h)).length,E.min=L[0],E.max=L[I-1],E.mean=a.mean(L,I),E.sd=a.stdev(L,I,E.mean)*t.sdmultiple,E.med=a.interp(L,.5),I%2&&(eu||eh))?(eu?(ee=L.slice(0,I/2),et=L.slice(I/2+1)):eh&&(ee=L.slice(0,I/2+1),et=L.slice(I/2)),E.q1=a.interp(ee,.5),E.q3=a.interp(et,.5)):(E.q1=a.interp(L,.25),E.q3=a.interp(L,.75)),E.lf=f(E,L,I),E.uf=d(E,L,I),E.lo=p(E),E.uo=m(E);var ef=g(E,I);E.ln=E.med-ef,E.un=E.med+ef,es=Math.min(es,E.ln),el=Math.max(el,E.un),E.pts2=C.filter(N),M.push(E)}t.notched&&a.isTypedArray(er)&&(er=Array.from(er)),t._extremes[v._id]=n.findExtremes(v,t.notched?er.concat([es,el]):er,{padded:!0})}return function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(M[0].t={num:k[S],dPos:B,posLetter:_,valLetter:x,labels:{med:s(e,"median:"),min:s(e,"min:"),q1:s(e,"q1:"),q3:s(e,"q3:"),max:s(e,"max:"),mean:"sd"===t.boxmean||"sd"===t.sizemode?s(e,"mean \xb1 σ:").replace("σ",1===t.sdmultiple?"σ":t.sdmultiple+"σ"):s(e,"mean:"),lf:s(e,"lower fence:"),uf:s(e,"upper fence:")}},k[S]++,M):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function c(e,t,r){for(var n in l)a.isArrayOrTypedArray(t[n])&&(Array.isArray(r)?a.isArrayOrTypedArray(t[n][r[0]])&&(e[l[n]]=t[n][r[0]][r[1]]):e[l[n]]=t[n][r])}function u(e,t){return e.v-t.v}function h(e){return e.v}function f(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(a.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function d(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(a.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function p(e){return 4*e.q1-3*e.q3}function m(e){return 4*e.q3-3*e.q1}function g(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}}}),oo=d({"src/traces/box/cross_trace_calc.js"(e,t){var r=rz(),n=tY(),i=nA().getAxisGroup,a=["v","h"];function o(e,t,a,o){var s,l,c,u=t.calcdata,h=t._fullLayout,f=o._id,d=f.charAt(0),p=[],m=0;for(s=0;s1,b=1-h[e+"gap"],_=1-h[e+"groupgap"];for(s=0;s0;if("positive"===C?(O=w*(E?1:.5),R=V,D=R=T):"negative"===C?(O=R=T,D=w*(E?1:.5),j=V):(O=D=w,R=j=V),H){var G=M.pointpos,W=M.jitter,Y=M.marker.size/2,X=0;G+W>=0&&((X=V*(G+W))>O?(q=!0,N=Y,F=X):X>R&&(N=Y,F=O)),X<=O&&(F=O);var Z=0;G-W<=0&&((Z=-V*(G-W))>D?(q=!0,U=Y,B=Z):Z>j&&(U=Y,B=D)),Z<=D&&(B=D)}else F=O,B=D;var $=Array(c.length);for(l=0;le.lo&&(x.so=!0)}return a});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(i.translatePoints,o,s)}function s(e,t,i,a){var o,s,l=t.val,c=t.pos,u=!!c.rangebreaks,h=a.bPos,f=a.bPosPxOffset||0,d=i.boxmean||(i.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=e.selectAll("path.mean").data("box"===i.type&&i.boxmean||"violin"===i.type&&i.box.visible&&i.meanline.visible?n.identity:[]);p.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),p.exit().remove(),p.each(function(e){var t=c.c2l(e.pos+h,!0),n=c.l2p(t-o)+f,a=c.l2p(t+s)+f,p=u?(n+a)/2:c.l2p(t)+f,m=l.c2p(e.mean,!0),g=l.c2p(e.mean-e.sd,!0),y=l.c2p(e.mean+e.sd,!0);"h"===i.orientation?r.select(this).attr("d","M"+m+","+n+"V"+a+("sd"===d?"m0,0L"+g+","+p+"L"+m+","+n+"L"+y+","+p+"Z":"")):r.select(this).attr("d","M"+n+","+m+"H"+a+("sd"===d?"m0,0L"+p+","+g+"L"+n+","+m+"L"+p+","+y+"Z":""))})}t.exports={plot:function(e,t,i,l){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis;n.makeTraceGroups(l,i,"trace boxes").each(function(e){var t,n,i=r.select(this),l=e[0],f=l.t,d=l.trace;(f.wdPos=f.bdPos*d.whiskerwidth,!0!==d.visible||f.empty)?i.remove():("h"===d.orientation?(t=h,n=u):(t=u,n=h),a(i,{pos:t,val:n},d,f,c),o(i,{x:u,y:h},d,f),s(i,{pos:t,val:n},d,f))})},plotBoxAndWhiskers:a,plotPoints:o,plotBoxMean:s}}}),ol=d({"src/traces/box/style.js"(e,t){var r=b(),n=eC(),i=rE();t.exports={style:function(e,t,a){var o=a||r.select(e).selectAll("g.trace.boxes");o.style("opacity",function(e){return e[0].trace.opacity}),o.each(function(t){var a=r.select(this),o=t[0].trace,s=o.line.width;function l(e,t,r,i){e.style("stroke-width",t+"px").call(n.stroke,r).call(n.fill,i)}var c=a.selectAll("path.box");if("candlestick"===o.type)c.each(function(e){if(!e.empty){var t=r.select(this),n=o[e.dir];l(t,n.line.width,n.line.color,n.fillcolor),t.style("opacity",o.selectedpoints&&!e.selected?.3:1)}});else{l(c,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(n.stroke,o.line.color);var u=a.selectAll("path.point");i.pointStyle(u,o,e)}})},styleOnSelect:function(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?i.selectedPointStyle(a,n):i.pointStyle(a,n,e)}}}}),oc=d({"src/traces/box/hover.js"(e,t){var r=rz(),n=tY(),i=r7(),a=eC(),o=n.fillText;function s(e,t,o,s){var l,c,u,h,f,d,p,m,g,y,v,x,b,_,w=e.cd,k=e.xa,T=e.ya,A=w[0].trace,M=w[0].t,S="violin"===A.type,E=M.bdPos,C=M.wHover,L=function(e){return h.c2l(e.pos)+M.bPos-h.c2l(p)};S&&"both"!==A.side?("positive"===A.side&&(y=function(e){var t=L(e);return i.inbox(t,t+C,v)},b=E,_=0),"negative"===A.side&&(y=function(e){var t=L(e);return i.inbox(t-C,t,v)},b=0,_=E)):(y=function(e){var t=L(e);return i.inbox(t-C,t+C,v)},b=_=E),l=S?function(e){return i.inbox(e.span[0]-d,e.span[1]-d,v)}:function(e){return i.inbox(e.min-d,e.max-d,v)},"h"===A.orientation?(d=t,p=o,m=l,g=y,c="y",h=T,u="x",f=k):(d=o,p=t,m=y,g=l,c="x",h=k,u="y",f=T);var I=Math.min(1,E/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));function P(e){return(m(e)+g(e))/2}v=e.maxHoverDistance-I,x=e.maxSpikeDistance-I;var z=i.getDistanceFunction(s,m,g,P);if(i.getClosest(w,z,e),!1===e.index)return[];var O=w[e.index],D=A.line.color,R=(A.marker||{}).color;a.opacity(D)&&A.line.width?e.color=D:a.opacity(R)&&A.boxpoints?e.color=R:e.color=A.fillcolor,e[c+"0"]=h.c2p(O.pos+M.bPos-_,!0),e[c+"1"]=h.c2p(O.pos+M.bPos+b,!0),e[c+"LabelVal"]=void 0!==O.orig_p?O.orig_p:O.pos;var j=c+"Spike";e.spikeDistance=P(O)*x/v,e[j]=h.c2p(O.pos,!0);var F=A.boxmean||"sd"===A.sizemode||(A.meanline||{}).visible,B=A.boxpoints||A.points,N=B&&F?["max","uf","q3","med","mean","q1","lf","min"]:B&&!F?["max","uf","q3","med","q1","lf","min"]:!B&&F?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],U=f.range[1]0&&(a=!0);for(var l=0;la){var o=a-n[e];return n[e]=a,o}}return 0},max:function(e,t,n,i){var a=i[t];if(r(a)){if(a=Number(a),!r(n[e]))return n[e]=a,a;else if(n[e]a){var l=f(t,o,s),c=f(r,o,s),u=+(e!==n);return l[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}(u,e,t,s,r,i))l=u;else break}return l}function h(e,t){return t&&e>l?e>a?e>1.1*n?n:e>1.1*i?i:a:e>o?o:e>s?s:l:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function f(e,t,r){var i=t.c2d(e,n,r).split("-");return""===i[0]&&(i.unshift(),i[0]="-"+i[0]),i}t.exports=function(e,t,r,i,o){var s,l,h=-1.1*t,f=-.1*t,d=e-f,p=r[0],m=r[1],g=Math.min(u(p+f,p+d,i,o),u(m+f,m+d,i,o)),y=Math.min(u(p+h,p+f,i,o),u(m+h,m+f,i,o));if(g>y&&ya){var v=s===n?1:6,x=s===n?"M12":"M1";return function(t,r){var a=i.c2d(t,n,o),s=a.indexOf("-",v);s>0&&(a=a.slice(0,s));var u=i.d2c(a,0,o);if(uo.r2l(F)&&(N=a.tickIncrement(N,_.size,!0,p)),O.start=o.l2r(N),j||n.nestedProperty(t,v+".start").set(O.start)}var U=_.end,V=o.r2l(z.end),q=void 0!==V;if((_.endFound||q)&&V!==o.r2l(U)){var H=q?V:n.aggNums(Math.max,null,m);O.end=o.l2r(H),q||n.nestedProperty(t,v+".start").set(O.end)}var G="autobin"+s;return!1===t._input[G]&&(t._input[v]=n.extendFlat({},t[v]||{}),delete t._input[G],delete t[G]),[O,m]}t.exports={calc:function(e,t){var i,p,m,g,y,v=[],x=[],b="h"===t.orientation,_=a.getFromId(e,b?t.yaxis:t.xaxis),w=b?"y":"x",k={x:"y",y:"x"}[w],T=t[w+"calendar"],A=t.cumulative,M=d(e,t,_,w),S=M[0],E=M[1],C="string"==typeof S.size,L=[],I=C?L:S,P=[],z=[],O=[],D=0,R=t.histnorm,j=t.histfunc,F=-1!==R.indexOf("density");A.enabled&&F&&(R=R.replace(/ ?density$/,""),F=!1);var B,N="max"===j||"min"===j?null:0,U=c.count,V=u[R],q=!1,H=function(e){return _.r2c(e,0,T)};for(n.isArrayOrTypedArray(t[k])&&"count"!==j&&(B=t[k],q="avg"===j,U=c[j]),p=H(S.start),g=H(S.end)+(p-a.tickIncrement(p,S.size,!1,T))/1e6;p=0&&y=0;n--)s(n);else if("increasing"===t){for(n=1;n=0;n--)e[n]+=e[n+1];"exclude"===r&&(e.push(0),e.shift())}}(x,A.direction,A.currentbin);var Q=Math.min(v.length,x.length),ee=[],et=0,er=Q-1;for(p=0;p=et;p--)if(x[p]){er=p;break}for(p=et;p<=er;p++)if(r(v[p])&&r(x[p])){var en={p:v[p],s:x[p],b:0};A.enabled||(en.pts=O[p],X?en.ph0=en.ph1=O[p].length?E[O[p][0]]:v[p]:(t._computePh=!0,en.ph0=i(L[p]),en.ph1=i(L[p+1],!0))),ee.push(en)}return 1===ee.length&&(ee[0].width1=a.tickIncrement(ee[0].p,S.size,!1,T)-ee[0].p),o(t,"marker")&&s(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),o(t,"marker.line")&&s(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),l(ee,t),n.isArrayOrTypedArray(t.selectedpoints)&&n.tagSelected(ee,t,K),ee},calcAllAutoBins:d}}}),oT=d({"src/traces/histogram2d/calc.js"(e,t){var r=tY(),n=rz(),i=ox(),a=ob(),o=o_(),s=ow(),l=ok().calcAllAutoBins;function c(e,t,r,n){var i,a=Array(e);if(n)for(i=0;iC&&A.splice(C,A.length-C),E.length>C&&E.splice(C,E.length-C);var L=[],I=[],P=[],z="string"==typeof T.size,O="string"==typeof S.size,D=[],R=[],j=z?D:T,F=O?R:S,B=0,N=[],U=[],V=t.histnorm,q=t.histfunc,H=-1!==V.indexOf("density"),G="max"===q||"min"===q?null:0,W=i.count,Y=a[V],X=!1,Z=[],$=[],K="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";K&&"count"!==q&&(X="avg"===q,W=i[q]);var J=T.size,Q=_(T.start),ee=_(T.end)+(Q-n.tickIncrement(Q,J,!1,x))/1e6;for(d=Q;d=0&&m=0&&gm&&(y=Math.max(y,Math.abs(e[a][o]-p)/(g-m))))}return y}t.exports=function(e,t){var n,a=1;for(i(e,t),n=0;n.01;n++)a=i(e,t,.5-.25*Math.min(1,.5*a));return a>.01&&r.log("interp2d didn't converge quickly",a),e}}}),oE=d({"src/traces/heatmap/find_empties.js"(e,t){var r=tY().maxRowLength;t.exports=function(e){var t,n,i,a,o,s,l,c,u=[],h={},f=[],d=e[0],p=[],m=[0,0,0],g=r(e);for(n=0;n=0;o--)(s=((h[[(n=(a=f[o])[0])-1,i=a[1]]]||m)[2]+(h[[n+1,i]]||m)[2]+(h[[n,i-1]]||m)[2]+(h[[n,i+1]]||m)[2])/20)&&(l[a]=[n,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(e,t){return t[2]-e[2]})}}}),oC=d({"src/traces/heatmap/make_bound_array.js"(e,t){var r=tv(),n=tY().isArrayOrTypedArray;t.exports=function(e,t,i,a,o,s){var l,c,u,h=[],f=r.traceIs(e,"contour"),d=r.traceIs(e,"histogram");if(n(t)&&t.length>1&&!d&&"category"!==s.type){var p=t.length;if(!(p<=o))return f?t.slice(0,o):t.slice(0,o+1);if(f)h=Array.from(t).slice(0,o);else if(1===o)h="log"===s.type?[.5*t[0],2*t[0]]:[t[0]-.5,t[0]+.5];else if("log"===s.type){for(h=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],u=1;u1){var t=(e[e.length-1]-e[0])/(e.length-1),r=Math.abs(t/100);for(T=0;Tr)return!1}return!0}(M.rangebreaks||S.rangebreaks)&&(k=function(e,t,r){for(var n=[],i=-1,a=0;a0;)k=T.c2p(F[C]),C--;for(k0;)E=A.c2p(B[C]),C--;E=T._length||k<=0||S>=A._length||E<=0){P.selectAll("image").data([]).exit().remove(),v(P);return}"fast"===X?(Q=G,ee=H):(Q=$,ee=K);var J=document.createElement("canvas");J.width=Q,J.height=ee;var Q,ee,et,er,en=J.getContext("2d",{willReadFrequently:!0}),ei=h(O,{noNumericCheck:!0,returnArray:!0});"fast"===X?(et=W?function(e){return G-1-e}:o.identity,er=Y?function(e){return H-1-e}:o.identity):(et=function(e){return o.constrain(Math.round(T.c2p(F[e])-b),0,$)},er=function(e){return o.constrain(Math.round(A.c2p(B[e])-S),0,K)});var ea,eo,es,el,ec=er(0),eu=[ec,ec],eh=+!W,ef=+!Y,ed=0,ep=0,em=0,eg=0;function ey(e,t=0){if(void 0===e)return[0,0,0,0];var r=ei(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),ed+=t,ep+=r[0]*t,em+=r[1]*t,eg+=r[2]*t,r}if("default"!==X){var ev,ex=0;try{ev=new Uint8Array(Q*ee*4)}catch{ev=Array(Q*ee*4)}if("smooth"===X){var eb,e_,ew,ek=N||F,eT=U||B,eA=Array(ek.length),eM=Array(eT.length),eS=Array($),eE=N?_:x,eC=U?_:x;for(C=0;CeW||eW>A._length))for(L=eq;LeZ||eZ>T._length)){var e$=l({x:eX,y:eY},O,e._fullLayout);e$.x=eX,e$.y=eY;var eK=z.z[C][L];void 0===eK?(e$.z="",e$.zLabel=""):(e$.z=eK,e$.zLabel=a.tickText(eF,eK,"hover").text);var eJ=z.text&&z.text[C]&&z.text[C][L];(void 0===eJ||!1===eJ)&&(eJ=""),e$.text=eJ;var eQ=o.texttemplateString({data:[e$,O._meta],fallback:O.texttemplatefallback,labels:e$,locale:e._fullLayout._d3locale,template:eR});if(eQ){var e0=eQ.split("
"),e1=e0.length,e2=0;for(I=0;I=_[0].length||d<0||d>_.length)return}else{if(r.inbox(t-x[0],t-x[x.length-1],0)>0||r.inbox(s-b[0],s-b[b.length-1],0)>0)return;if(p){for(M=[2*x[0]-x[1]],E=1;E=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),o1=d({"src/traces/contour/attributes.js"(e,t){var r=op(),n=nG(),i=ri(),a=i.axisHoverFormat,o=i.descriptionOnlyNumbers,s=rs(),l=tc().dash,c=V(),u=U().extendFlat,h=o0(),f=h.COMPARISON_OPS2,d=h.INTERVAL_OPS,p=n.line;t.exports=u({z:r.z,x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:n.xperiod0,yperiod0:n.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,text:r.text,hovertext:r.hovertext,transpose:r.transpose,xtype:r.xtype,ytype:r.ytype,xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:u({},r.texttemplate,{}),texttemplatefallback:r.texttemplatefallback,textfont:u({},r.textfont,{}),hoverongaps:r.hoverongaps,connectgaps:u({},r.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:c({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:o("contour label")},operation:{valType:"enumerated",values:[].concat(f).concat(d),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:u({},p.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:l,smoothing:u({},p.smoothing,{}),editType:"plot"},zorder:n.zorder},s("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),o2=d({"src/traces/histogram2dcontour/attributes.js"(e,t){var r=oX(),n=o1(),i=rs(),a=ri().axisHoverFormat,o=U().extendFlat;t.exports=o({x:r.x,y:r.y,z:r.z,marker:r.marker,histnorm:r.histnorm,histfunc:r.histfunc,nbinsx:r.nbinsx,xbins:r.xbins,nbinsy:r.nbinsy,ybins:r.ybins,autobinx:r.autobinx,autobiny:r.autobiny,bingroup:r.bingroup,xbingroup:r.xbingroup,ybingroup:r.ybingroup,autocontour:n.autocontour,ncontours:n.ncontours,contours:n.contours,line:{color:n.line.color,width:o({},n.line.width,{dflt:.5}),dash:n.line.dash,smoothing:n.line.smoothing,editType:"plot"},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:n.texttemplate,texttemplatefallback:n.texttemplatefallback,textfont:n.textfont},i("",{cLetter:"z",editTypeOverride:"calc"}))}}),o3=d({"src/traces/contour/contours_defaults.js"(e,t){t.exports=function(e,t,r,n){var i=n("contours.start"),a=n("contours.end"),o=r("contours.size");((!1===i||!1===a?t.autocontour=!0:r("autocontour",!1))||!o)&&r("ncontours")}}}),o5=d({"src/traces/contour/label_defaults.js"(e,t){var r=tY();t.exports=function(e,t,n,i){if(i||(i={}),e("contours.showlabels")){var a=t.font;r.coerceFont(e,"contours.labelfont",a,{overrideDflt:{color:n}}),e("contours.labelformat")}!1!==i.hasHover&&e("zhoverformat")}}}),o4=d({"src/traces/contour/style_defaults.js"(e,t){var r=rv(),n=o5();t.exports=function(e,t,i,a,o){var s,l=i("contours.coloring"),c="";"fill"===l&&(s=i("contours.showlines")),!1!==s&&("lines"!==l&&(c=i("line.color","#000")),i("line.width",.5),i("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,r(e,t,a,i,{prefix:"",cLetter:"z"})),i("line.smoothing"),n(i,a,c,o)}}}),o6=d({"src/traces/histogram2dcontour/defaults.js"(e,t){var r=tY(),n=oZ(),i=o3(),a=o4(),o=og(),s=o2();t.exports=function(e,t,l,c){function u(n,i){return r.coerce(e,t,s,n,i)}n(e,t,u,c),!1!==t.visible&&(i(e,t,u,function(n){return r.coerce2(e,t,s,n)}),a(e,t,u,c),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),u("hovertemplatefallback"),t.contours&&"heatmap"===t.contours.coloring&&o(u,c))}}}),o8=d({"src/traces/contour/set_contours.js"(e,t){var r=rz(),n=tY();function i(e,t,n){var i={type:"linear",range:[e,t]};return r.autoTicks(i,(t-e)/(n||15)),i}t.exports=function(e,t){var a=e.contours;if(e.autocontour){var o=e.zmin,s=e.zmax;(e.zauto||void 0===o)&&(o=n.aggNums(Math.min,null,t)),(e.zauto||void 0===s)&&(s=n.aggNums(Math.max,null,t));var l=i(o,s,e.ncontours);a.size=l.dtick,a.start=r.tickFirst(l),l.range.reverse(),a.end=r.tickFirst(l),a.start===o&&(a.start+=a.size),a.end===s&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),e._input.contours||(e._input.contours={}),n.extendFlat(e._input.contours,{start:a.start,end:a.end,size:a.size}),e._input.autocontour=!0}else if("constraint"!==a.type){var c=a.start,u=a.end,h=e._input.contours;c>u&&(a.start=h.start=u,u=a.end=h.end=c,c=a.start),a.size>0||(h.size=a.size=c===u?1:i(c,u,e.ncontours).dtick)}}}}),o9=d({"src/traces/contour/end_plus.js"(e,t){t.exports=function(e){return e.end+e.size/1e6}}}),o7=d({"src/traces/contour/calc.js"(e,t){var r=rw(),n=oL(),i=o8(),a=o9();t.exports=function(e,t){var o=n(e,t),s=o[0].z;i(t,s);var l,c=t.contours,u=r.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var h=c.start,f=a(c),d=c.size||1,p=Math.floor((f-h)/d)+1;isFinite(d)||(d=1,p=1);var m=h-d/2,g=m+p*d;l=[m,g]}else l=s;return r.calc(e,t,{vals:l,cLetter:"z"}),o}}}),se=d({"src/traces/contour/constants.js"(e,t){t.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}}}}),st=d({"src/traces/contour/make_crossings.js"(e,t){var r=se();t.exports=function(e){var t,n,i,a,o,s,l,c,u,h=e[0].z,f=h.length,d=h[0].length,p=2===f||2===d;for(n=0;ne?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}((c=e[u]).level,s))&&(c.crossings[o]=l,-1!==i.indexOf(l)&&(c.starts.push([t,n]),p&&-1!==i.indexOf(l,i.indexOf(l)+1)&&c.starts.push([t,n])))}}}),sr=d({"src/traces/contour/find_all_paths.js"(e,t){var r=tY(),n=se();function i(e,t,r,n){return Math.abs(e[0]-t[0])20&&u?208===c||1114===c?f=0===h[0]?1:-1:d=0===h[1]?1:-1:-1!==n.BOTTOMSTART.indexOf(c)?d=1:-1!==n.LEFTSTART.indexOf(c)?f=1:-1!==n.TOPSTART.indexOf(c)?d=-1:f=-1,[f,d]),v=[o(e,t,[-y[0],-y[1]])],x=e.z.length,b=e.z[0].length,_=t.slice(),w=y.slice();for(p=0;p<1e4;p++){if(g>20?(g=n.CHOOSESADDLE[g][0>(y[0]||y[1])?0:1],e.crossings[m]=n.SADDLEREMAINDER[g]):delete e.crossings[m],!(y=n.NEWDELTA[g])){r.log("Found bad marching index:",g,t,e.level);break}v.push(o(e,t,y)),t[0]+=y[0],t[1]+=y[1],m=t.join(","),i(v[v.length-1],v[v.length-2],s,l)&&v.pop();var k=y[0]&&(t[0]<0||t[0]>b-2)||y[1]&&(t[1]<0||t[1]>x-2);if(t[0]===_[0]&&t[1]===_[1]&&y[0]===w[0]&&y[1]===w[1]||a&&k)break;g=e.crossings[m]}1e4===p&&r.log("Infinite loop in contour?");var T,A,M,S,E,C,L,I,P,z,O,D=i(v[0],v[v.length-1],s,l),R=0,j=.2*e.smoothing,F=[],B=0;for(p=1;p=B;p--)if((T=F[p])=B&&T+F[A]I&&P--,e.edgepaths[P]=O.concat(v,z));break}q||(e.edgepaths[I]=v.concat(z))}for(I=0;I":o(">"),"<":o("<"),"=":o("=")}}}),si=d({"src/traces/contour/empty_pathinfo.js"(e,t){var r=tY(),n=sn(),i=o9();t.exports=function(e,t,a){for(var o="constraint"===e.type?n[e._operation](e.value):e,s=o.size,l=[],c=i(o),u=a.trace._carpetTrace,h=u?{xaxis:u.aaxis,yaxis:u.baxis,x:a.a,y:a.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:a.x,y:a.y},f=o.start;f1e3){r.warn("Too many contours, clipping at 1000",e);break}return l}}}),sa=d({"src/traces/contour/convert_to_constraints.js"(e,t){var r=tY();function n(e){return r.extendFlat({},e,{edgepaths:r.extendDeep([],e.edgepaths),paths:r.extendDeep([],e.paths),starts:r.extendDeep([],e.starts)})}t.exports=function(e,t){var i,a,o,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&r.warn("Contour data invalid for the specified inequality operation."),a=e[0],i=0;io.level||o.starts.length&&a===o.level)}break;case"constraint":if(n.prefixBoundary=!1,n.edgepaths.length)return;var s=n.x.length,l=n.y.length,c=-1/0,u=1/0;for(r=0;r":d>c&&(n.prefixBoundary=!0);break;case"<":(dc||n.starts.length&&f===u)&&(n.prefixBoundary=!0);break;case"][":h=Math.min(d[0],d[1]),f=Math.max(d[0],d[1]),hc&&(n.prefixBoundary=!0)}}}}}),ss=d({"src/traces/contour/plot.js"(e){var t=b(),r=tY(),n=rE(),i=rw(),a=rr(),o=rz(),s=rL(),l=oz(),c=st(),u=sr(),h=si(),f=sa(),d=so(),p=se(),m=p.LABELOPTIMIZER;function g(e,t){var i,a,o,s,l,c,u="",h=0,f=e.edgepaths.map(function(e,t){return t}),d=!0;function p(e){return .01>Math.abs(e[0]-t[2][0])}for(;f.length;){for(c=n.smoothopen(e.edgepaths[h],e.smoothing),u+=d?c:c.replace(/^M/,"L"),f.splice(f.indexOf(h),1),i=e.edgepaths[h][e.edgepaths[h].length-1],s=-1,o=0;o<4;o++){if(!i){r.log("Missing end?",h,e);break}for(.01>Math.abs(i[1]-t[0][1])&&!p(i)?a=t[1]:.01>Math.abs(i[0]-t[0][0])?a=t[0]:.01>Math.abs(i[1]-t[2][1])?a=t[3]:p(i)&&(a=t[2]),l=0;lMath.abs(i[0]-a[0])?.01>Math.abs(i[0]-m[0])&&(m[1]-i[1])*(a[1]-m[1])>=0&&(a=m,s=l):.01>Math.abs(i[1]-a[1])?.01>Math.abs(i[1]-m[1])&&(m[0]-i[0])*(a[0]-m[0])>=0&&(a=m,s=l):r.log("endpt to newendpt is not vert. or horz.",i,a,m)}if(i=a,s>=0)break;u+="L"+a}if(s===e.edgepaths.length){r.log("unclosed perimeter path");break}h=s,(d=-1===f.indexOf(h))&&(h=f[0],u+="Z")}for(h=0;hi.center?i.right-s:s-i.left)/(u+Math.abs(Math.sin(c)*o)),d=(l>i.middle?i.bottom-l:l-i.top)/(Math.abs(h)+Math.cos(c)*o);if(f<1||d<1)return 1/0;var p=m.EDGECOST*(1/(f-1)+1/(d-1));p+=m.ANGLECOST*c*c;for(var g=s-u,y=l-h,v=s+u,x=l+h,b=0;b2*m.MAXCOST)break;d&&(s/=2),l=(o=c-s/2)+1.5*s}if(f<=m.MAXCOST)return u},e.addLabelData=function(e,t,r,n){var i=t.fontSize,a=t.width+i/3,o=Math.max(0,t.height-i/3),s=e.x,l=e.y,c=e.theta,u=Math.sin(c),h=Math.cos(c),f=function(e,t){return[s+e*h-t*u,l+e*u+t*h]},d=[f(-a/2,-o/2),f(-a/2,o/2),f(a/2,o/2),f(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:c,level:t.level,width:a,height:o}),n.push(d)},e.drawLabels=function(e,n,i,o,s){var l=e.selectAll("text").data(n,function(e){return e.text+","+e.x+","+e.y+","+e.theta});if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(e){var r=e.x+Math.sin(e.theta)*e.dy,n=e.y-Math.cos(e.theta)*e.dy;t.select(this).text(e.text).attr({x:r,y:n,transform:"rotate("+180*e.theta/Math.PI+" "+r+" "+n+")"}).call(a.convertToTspans,i)}),s){for(var c="",u=0;u=v)&&(a<=y&&(a=y),o>=v&&(o=v),l=Math.floor((o-a)/s)+1,c=0),f=0;fy&&(m.unshift(y),g.unshift(g[0])),m[m.length-1]2?p.value=p.value.slice(2):0===p.length?p.value=[0,1]:p.length<2?(m=parseFloat(p.value[0]),p.value=[m,m+1]):p.value=[parseFloat(p.value[0]),parseFloat(p.value[1])]:r(p.value)&&(m=parseFloat(p.value),p.value=[m,m+1])):(d("contours.value",0),r(p.value)||(l(p.value)?p.value=parseFloat(p.value[0]):p.value=0)),"="===b?g=x.showlines=!0:(g=i("contours.showlines"),v=i("fillcolor",a((e.line||{}).color||h,.5))),g&&(y=i("line.color",v&&o(v)?a(t.fillcolor,1):h),i("line.width",2),i("line.dash")),i("line.smoothing"),n(i,s,y,f)}}}),sm=d({"src/traces/contour/defaults.js"(e,t){var r=tY(),n=om(),i=ii(),a=sp(),o=o3(),s=o4(),l=og(),c=o1();t.exports=function(e,t,u,h){function f(n,i){return r.coerce(e,t,c,n,i)}if(!n(e,t,f,h)){t.visible=!1;return}i(e,t,h,f),f("xhoverformat"),f("yhoverformat"),f("text"),f("hovertext"),f("hoverongaps"),f("hovertemplate"),f("hovertemplatefallback");var d="constraint"===f("contours.type");f("connectgaps",r.isArray1D(t.z)),d?a(e,t,f,h,u):(o(e,t,f,function(n){return r.coerce2(e,t,c,n)}),s(e,t,f,h)),t.contours&&"heatmap"===t.contours.coloring&&l(f,h),f("zorder")}}}),sg=d({"src/traces/contour/index.js"(e,t){t.exports={attributes:o1(),supplyDefaults:sm(),calc:o7(),plot:ss().plot,style:sc(),colorbar:su(),hoverPoints:sh(),moduleType:"trace",name:"contour",basePlotModule:iV(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),sy=d({"lib/contour.js"(e,t){t.exports=sg()}}),sv=d({"src/traces/scatterternary/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=th(),a=nH(),o=nG(),s=W(),l=rs(),c=tc().dash,u=U().extendFlat,h=o.marker,f=o.line,d=h.line;t.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:u({},o.mode,{dflt:"markers"}),text:u({},o.text,{}),texttemplate:n({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:u({},o.hovertext,{}),line:{color:f.color,width:f.width,dash:c,backoff:f.backoff,shape:u({},f.shape,{values:["linear","spline"]}),smoothing:f.smoothing,editType:"calc"},connectgaps:o.connectgaps,cliponaxis:o.cliponaxis,fill:u({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:a(),marker:u({symbol:h.symbol,opacity:h.opacity,angle:h.angle,angleref:h.angleref,standoff:h.standoff,maxdisplayed:h.maxdisplayed,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,line:u({width:d.width,dash:d.dash,editType:"calc"},l("marker.line")),gradient:h.gradient,editType:"calc"},l("marker")),textfont:o.textfont,textposition:o.textposition,selected:o.selected,unselected:o.unselected,hoverinfo:u({},s.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o.hoveron,hovertemplate:r(),hovertemplatefallback:i()}}}),sx=d({"src/traces/scatterternary/defaults.js"(e,t){var r=tY(),n=nq(),i=rk(),a=io(),o=is(),s=il(),l=ic(),c=iu(),u=sv();t.exports=function(e,t,h,f){function d(n,i){return r.coerce(e,t,u,n,i)}var p,m=d("a"),g=d("b"),y=d("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),y&&(p=Math.min(p,y.length))):p=y?Math.min(p,y.length):0):g&&y&&(p=Math.min(g.length,y.length)),!p){t.visible=!1;return}t._length=p,d("sum"),d("text"),d("hovertext"),"fills"!==t.hoveron&&(d("hovertemplate"),d("hovertemplatefallback")),d("mode",p"),o.hovertemplate=f.hovertemplate,a}function x(e,t){y.push(e._hovertitle+": "+t)}}}}),sT=d({"src/traces/scatterternary/event_data.js"(e,t){t.exports=function(e,t,r,n,i){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),n[i]){var a=n[i];e.a=a.a,e.b=a.b,e.c=a.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}}}),sA=d({"src/plots/ternary/ternary.js"(e,t){var r=b(),n=tv(),i=tY(),a=i.strTranslate,o=i._,s=eC(),l=rE(),c=rL(),u=U().extendFlat,h=t7(),f=rz(),d=rU(),p=r7(),m=ne(),g=m.freeMode,y=m.rectMode,v=rC(),x=n$().prepSelect,_=n$().selectOnClick,w=n$().clearOutline,k=n$().clearSelectionsCache,T=t3();function A(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=A;var M=A.prototype;M.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},M.plot=function(e,t){var r=t[this.id],n=t._size;this._hasClipOnAxisFalse=!1;for(var i=0;iS*b?i=(o=b)*S:o=(i=x)/S,h=y*i/x,f=v*o/b,r=t.l+t.w*m-i/2,n=t.t+t.h*(1-g)-o/2,d.x0=r,d.y0=n,d.w=i,d.h=o,d.sum=_,d.xaxis={type:"linear",range:[w+2*T-_,_-w-2*k],domain:[m-h/2,m+h/2],_id:"x"},c(d.xaxis,d.graphDiv._fullLayout),d.xaxis.setScale(),d.xaxis.isPtWithinRange=function(e){return e.a>=d.aaxis.range[0]&&e.a<=d.aaxis.range[1]&&e.b>=d.baxis.range[1]&&e.b<=d.baxis.range[0]&&e.c>=d.caxis.range[1]&&e.c<=d.caxis.range[0]},d.yaxis={type:"linear",range:[w,_-k-T],domain:[g-f/2,g+f/2],_id:"y"},c(d.yaxis,d.graphDiv._fullLayout),d.yaxis.setScale(),d.yaxis.isPtWithinRange=function(){return!0};var A=d.yaxis.domain[0],M=d.aaxis=u({},e.aaxis,{range:[w,_-k-T],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[A,A+f*S],anchor:"free",position:0,_id:"y",_length:i});c(M,d.graphDiv._fullLayout),M.setScale();var E=d.baxis=u({},e.baxis,{range:[_-w-T,k],side:"bottom",domain:d.xaxis.domain,anchor:"free",position:0,_id:"x",_length:i});c(E,d.graphDiv._fullLayout),E.setScale();var C=d.caxis=u({},e.caxis,{range:[_-w-k,T],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[A,A+f*S],anchor:"free",position:0,_id:"y",_length:i});c(C,d.graphDiv._fullLayout),C.setScale();var L="M"+r+","+(n+o)+"h"+i+"l-"+i/2+",-"+o+"Z";d.clipDef.select("path").attr("d",L),d.layers.plotbg.select("path").attr("d",L);var I="M0,"+o+"h"+i+"l-"+i/2+",-"+o+"Z";d.clipDefRelative.select("path").attr("d",I);var P=a(r,n);d.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",P),d.clipDefRelative.select("path").attr("transform",null);var z=a(r-E._offset,n+o);d.layers.baxis.attr("transform",z),d.layers.bgrid.attr("transform",z);var O=a(r+i/2,n)+"rotate(30)"+a(0,-M._offset);d.layers.aaxis.attr("transform",O),d.layers.agrid.attr("transform",O);var D=a(r+i/2,n)+"rotate(-30)"+a(0,-C._offset);d.layers.caxis.attr("transform",D),d.layers.cgrid.attr("transform",D),d.drawAxes(!0),d.layers.aline.select("path").attr("d",M.showline?"M"+r+","+(n+o)+"l"+i/2+",-"+o:"M0,0").call(s.stroke,M.linecolor||"#000").style("stroke-width",(M.linewidth||0)+"px"),d.layers.bline.select("path").attr("d",E.showline?"M"+r+","+(n+o)+"h"+i:"M0,0").call(s.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),d.layers.cline.select("path").attr("d",C.showline?"M"+(r+i/2)+","+n+"l"+i/2+","+o:"M0,0").call(s.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),d.graphDiv._context.staticPlot||d.initInteractions(),l.setClipUrl(d.layers.frontplot,d._hasClipOnAxisFalse?null:d.clipId,d.graphDiv)},M.drawAxes=function(e){var t=this.graphDiv,r=this.id.slice(7)+"title",n=this.layers,i=this.aaxis,a=this.baxis,s=this.caxis;if(this.drawAx(i),this.drawAx(a),this.drawAx(s),e){var l=Math.max(i.showticklabels?i.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;n["a-title"]=v.draw(t,"a"+r,{propContainer:i,propName:this.id+".aaxis.title.text",placeholder:o(t,"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(t,"b"+r,{propContainer:a,propName:this.id+".baxis.title.text",placeholder:o(t,"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(t,"c"+r,{propContainer:s,propName:this.id+".caxis.title.text",placeholder:o(t,"Click to enter Component C title"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*s.title.font.size+c,"text-anchor":"middle"}})}},M.drawAx=function(e){var t,r=this.graphDiv,n=e._name,a=n.charAt(0),o=e._id,s=this.layers[n],l=a+"tickLayout",c=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);this[l]!==c&&(s.selectAll("."+o+"tick").remove(),this[l]=c),e.setScale();var u=f.calcTicks(e),h=f.clipEnds(e,u),d=f.makeTransTickFn(e),p=f.getTickSigns(e)[2],m=i.deg2rad(30),g=p*(e.linewidth||1)/2,y=p*e.ticklen,v=this.w,x=this.h,b="b"===a?"M0,"+g+"l"+Math.sin(m)*y+","+Math.cos(m)*y:"M"+g+",0l"+Math.cos(m)*y+","+-Math.sin(m)*y,_={a:"M0,0l"+x+",-"+v/2,b:"M0,0l-"+v/2+",-"+x,c:"M0,0l-"+x+","+v/2}[a];f.drawTicks(r,e,{vals:"inside"===e.ticks?h:u,layer:s,path:b,transFn:d,crisp:!1}),f.drawGrid(r,e,{vals:h,layer:this.layers[a+"grid"],path:_,transFn:d,crisp:!1}),f.drawLabels(r,e,{vals:u,layer:s,transFn:d,labelFns:f.makeLabelFns(e,0,30)})};var E=T.MINZOOM/2+.87,C="m-0.87,.5h"+E+"v3h-"+(E+5.2)+"l"+(E/2+2.6)+",-"+(.87*E+4.5)+"l2.6,1.5l-"+E/2+","+.87*E+"Z",L="m0.87,.5h-"+E+"v3h"+(E+5.2)+"l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-2.6,1.5l"+E/2+","+.87*E+"Z",I="m0,1l"+E/2+","+.87*E+"l2.6,-1.5l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-"+(E/2+2.6)+","+(.87*E+4.5)+"l2.6,1.5l"+E/2+",-"+.87*E+"Z",P=!0;function z(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}M.clearOutline=function(){k(this.dragOptions),w(this.dragOptions.gd)},M.initInteractions=function(){var e,t,r,c,u,h,f,m,v,b,w,k,A=this,M=A.layers.plotbg.select("path").node(),E=A.graphDiv,O=E._fullLayout._zoomlayer;function D(e){var t={};return t[A.id+".aaxis.min"]=e.a,t[A.id+".baxis.min"]=e.b,t[A.id+".caxis.min"]=e.c,t}function R(e,t){var r=E._fullLayout.clickmode;z(E),2===e&&(E.emit("plotly_doubleclick",null),n.call("_guiRelayout",E,D({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&_(t,E,[A.xaxis],[A.yaxis],A.id,A.dragOptions),r.indexOf("event")>-1&&p.click(E,t,A.id)}this.dragOptions={element:M,gd:E,plotinfo:{id:A.id,domain:E._fullLayout[A.id].domain,xaxis:A.xaxis,yaxis:A.yaxis},subplot:A.id,prepFn:function(n,o,l){A.dragOptions.xaxes=[A.xaxis],A.dragOptions.yaxes=[A.yaxis],w=E._fullLayout._invScaleX,k=E._fullLayout._invScaleY;var d,p,_,T,S,C=A.dragOptions.dragmode=E._fullLayout.dragmode;g(C)?A.dragOptions.minDrag=1:A.dragOptions.minDrag=void 0,"zoom"===C?(A.dragOptions.moveFn=B,A.dragOptions.clickFn=R,A.dragOptions.doneFn=N,d=o,p=l,e=d-(_=M.getBoundingClientRect()).left,t=p-_.top,E._fullLayout._calcInverseTransform(E),T=E._fullLayout._invTransform,e=(S=i.apply3DTransform(T)(e,t))[0],t=S[1],u=r={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},c=A.aaxis.range[1]-r.a,h=s.color(A.graphDiv._fullLayout[A.id].bgcolor).luminosity(),f="M0,"+A.h+"L"+A.w/2+", 0L"+A.w+","+A.h+"Z",m=!1,v=O.append("path").attr("class","zoombox").attr("transform",a(A.x0,A.y0)).style({fill:h>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",f),b=O.append("path").attr("class","zoombox-corners").attr("transform",a(A.x0,A.y0)).style({fill:s.background,stroke:s.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),A.clearOutline(E)):"pan"===C?(A.dragOptions.moveFn=U,A.dragOptions.clickFn=R,A.dragOptions.doneFn=V,u=r={a:A.aaxis.range[0],b:A.baxis.range[1],c:A.caxis.range[1]},A.clearOutline(E)):(y(C)||g(C))&&x(n,o,l,A.dragOptions,C)}};function j(e,t){return 1-(e+(A.h-t)/Math.sqrt(3))/A.w}function F(e,t){return(e-(A.h-t)/Math.sqrt(3))/A.w}function B(n,i){var a=e+n*w,o=t+i*k,s=Math.max(0,Math.min(1,1-t/A.h,1-o/A.h)),l=Math.max(0,Math.min(1,j(e,t),j(a,o))),d=Math.max(0,Math.min(1,F(e,t),F(a,o))),p=(s/2+d)*A.w,g=(1-s/2-l)*A.w,y=(p+g)/2,x=g-p,_=(1-s)*A.h,M=_-x/S;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),b.transition().style("opacity",1).duration(200),m=!0),E.emit("plotly_relayouting",D(u))}function N(){z(E),u!==r&&(n.call("_guiRelayout",E,D(u)),P&&E.data&&E._context.showTips&&(i.notifier(o(E,"Double-click to zoom back out"),"long",E),P=!1))}function U(e,t){var n=e/A.xaxis._m,o=t/A.yaxis._m,s=[(u={a:r.a-o,b:r.b+(n+o)/2,c:r.c-(n-o)/2}).a,u.b,u.c].sort(i.sorterAsc),c={a:s.indexOf(u.a),b:s.indexOf(u.b),c:s.indexOf(u.c)};s[0]<0&&(s[1]+s[0]/2<0?(s[2]+=s[0]+s[1],s[0]=s[1]=0):(s[2]+=s[0]/2,s[1]+=s[0]/2,s[0]=0),u={a:s[c.a],b:s[c.b],c:s[c.c]},t=(r.a-u.a)*A.yaxis._m,e=(r.c-u.c-r.b+u.b)*A.xaxis._m);var h=a(A.x0+e,A.y0+t);A.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var f=a(-e,-t);A.clipDefRelative.select("path").attr("transform",f),A.aaxis.range=[u.a,A.sum-u.b-u.c],A.baxis.range=[A.sum-u.a-u.c,u.b],A.caxis.range=[A.sum-u.a-u.b,u.c],A.drawAxes(!1),A._hasClipOnAxisFalse&&A.plotContainer.select(".scatterlayer").selectAll(".trace").call(l.hideOutsideRangePoints,A),E.emit("plotly_relayouting",D(u))}function V(){n.call("_guiRelayout",E,D(u))}M.onmousemove=function(e){p.hover(E,e,A.id),E._fullLayout._lasthover=M,E._fullLayout._hoversubplot=A.id},M.onmouseout=function(e){E._dragging||d.unhover(E,e)},d.init(this.dragOptions)}}}),sM=d({"src/plots/ternary/layout_attributes.js"(e,t){var r=eE(),n=aC().attributes,i=ra(),a=tl().overrideAll,o=U().extendFlat,s={title:{text:i.title.text,font:i.title.font},color:i.color,tickmode:i.minor.tickmode,nticks:o({},i.nticks,{dflt:6,min:1}),tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,ticklabelstep:i.ticklabelstep,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickfont:i.tickfont,tickangle:i.tickangle,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:o({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:o({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash,layer:i.layer,min:{valType:"number",dflt:0,min:0}},l=t.exports=a({domain:n({name:"ternary"}),bgcolor:{valType:"color",dflt:r.background},sum:{valType:"number",dflt:1,min:0},aaxis:s,baxis:s,caxis:s},"plot","from-root");l.uirevision={valType:"any",editType:"none"},l.aaxis.uirevision=l.baxis.uirevision=l.caxis.uirevision={valType:"any",editType:"none"}}}),sS=d({"src/plots/subplot_defaults.js"(e,t){var r=tY(),n=t2(),i=aC().defaults;t.exports=function(e,t,a,o){var s,l,c=o.type,u=o.attributes,h=o.handleDefaults,f=o.partition||"x",d=t._subplots[c],p=d.length,m=p&&d[0].replace(/\d+$/,"");function g(e,t){return r.coerce(s,l,u,e,t)}for(var y=0;y=m&&(b.min=0,_.min=0,w.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}t.exports=function(e,t,r){a(e,t,r,{type:"ternary",attributes:h,handleDefaults:d,font:t.font,paper_bgcolor:t.paper_bgcolor})}}}),sC=d({"src/plots/ternary/index.js"(e){var t=sA(),r=t8().getSubplotCalcData,n=tY().counterRegex,i="ternary";e.name=i;var a=e.attr="subplot";e.idRoot=i,e.idRegex=e.attrRegex=n(i),(e.attributes={})[a]={valType:"subplotid",dflt:"ternary",editType:"calc"},e.layoutAttributes=sM(),e.supplyLayoutDefaults=sE(),e.plot=function(e){for(var n=e._fullLayout,a=e.calcdata,o=n._subplots[i],s=0;s0){var b,_,w,k,T,A=e.xa,M=e.ya;"h"===p.orientation?(T=t,b="y",w=M,_="x",k=A):(T=s,b="x",w=A,_="y",k=M);var S=d[e.index];if(T>=S.span[0]&&T<=S.span[1]){var E=n.extendFlat({},e),C=k.c2p(T,!0),L=o.getKdeValue(S,p,T),I=o.getPositionOnKdePath(S,p,C),P=w._offset,z=w._length;E[b+"0"]=I[0],E[b+"1"]=I[1],E[_+"0"]=E[_+"1"]=C,E[_+"Label"]=_+": "+i.hoverLabelText(k,T,p[_+"hoverformat"])+", "+d[0].t.labels.kde+" "+L.toFixed(3);for(var O=0,D=0;D path").each(function(e){if(!e.isBlank){var t=s.marker;r.select(this).call(i.fill,e.mc||t.color).call(i.stroke,e.mlc||t.line.color).call(n.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}}),l(o,s,e),o.selectAll(".regions").each(function(){r.select(this).selectAll("path").style("stroke-width",0).call(i.fill,s.connector.fillcolor)}),o.selectAll(".lines").each(function(){var e=s.connector.line;n.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)})})}}}}),s0=d({"src/traces/funnel/hover.js"(e,t){var r=eC().opacity,n=a6().hoverOnBars,i=tY().formatPercent;t.exports=function(e,t,a,o,s){var l=n(e,t,a,o,s);if(l){var c,u,h,f,d,p,m=l.cd,g=m[0].trace,y="h"===g.orientation,v=m[l.index];l[(y?"x":"y")+"LabelVal"]=v.s,l.percentInitial=v.begR,l.percentInitialLabel=i(v.begR,1),l.percentPrevious=v.difR,l.percentPreviousLabel=i(v.difR,1),l.percentTotal=v.sumR,l.percentTotalLabel=i(v.sumR,1);var x=v.hi||g.hoverinfo,b=[];if(x&&"none"!==x&&"skip"!==x){var _="all"===x,w=x.split("+"),k=function(e){return _||-1!==w.indexOf(e)};k("percent initial")&&b.push(l.percentInitialLabel+" of initial"),k("percent previous")&&b.push(l.percentPreviousLabel+" of previous"),k("percent total")&&b.push(l.percentTotalLabel+" of total")}return l.extraText=b.join("
"),c=g,u=v,h=c.marker,f=u.mc||h.color,d=u.mlc||h.line.color,p=u.mlw||h.line.width,l.color=r(f)?f:r(d)&&p?d:void 0,[l]}}}}),s1=d({"src/traces/funnel/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(e.percentInitial=t.percentInitial),"percentPrevious"in t&&(e.percentPrevious=t.percentPrevious),"percentTotal"in t&&(e.percentTotal=t.percentTotal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),s2=d({"src/traces/funnel/index.js"(e,t){t.exports={attributes:sG(),layoutAttributes:sW(),supplyDefaults:sY().supplyDefaults,crossTraceDefaults:sY().crossTraceDefaults,supplyLayoutDefaults:sX(),calc:s$(),crossTraceCalc:sK(),plot:sJ(),style:sQ().style,hoverPoints:s0(),eventData:s1(),selectPoints:a9(),moduleType:"trace",name:"funnel",basePlotModule:iV(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),s3=d({"lib/funnel.js"(e,t){t.exports=s2()}}),s5=d({"src/traces/waterfall/constants.js"(e,t){t.exports={eventDataKeys:["initial","delta","final"]}}}),s4=d({"src/traces/waterfall/attributes.js"(e,t){var r=aZ(),n=nG().line,i=W(),a=ri().axisHoverFormat,{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=th(),c=s5(),u=U().extendFlat,h=eC();function f(e){return{marker:{color:u({},r.marker.color,{arrayOk:!1,editType:"style"}),line:{color:u({},r.marker.line.color,{arrayOk:!1,editType:"style"}),width:u({},r.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}t.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),hovertext:r.hovertext,hovertemplate:o({},{keys:c.eventDataKeys}),hovertemplatefallback:l(),hoverinfo:u({},i.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:s({editType:"plot"},{keys:c.eventDataKeys.concat(["label"])}),texttemplatefallback:l({editType:"plot"}),text:r.text,textposition:r.textposition,insidetextanchor:r.insidetextanchor,textangle:r.textangle,textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:r.outsidetextfont,constraintext:r.constraintext,cliponaxis:r.cliponaxis,orientation:r.orientation,offset:r.offset,width:r.width,increasing:f("increasing"),decreasing:f("decreasing"),totals:f("intermediate sums and total"),connector:{line:{color:u({},n.color,{dflt:h.defaultLine}),width:u({},n.width,{editType:"plot"}),dash:n.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup,zorder:r.zorder}}}),s6=d({"src/traces/waterfall/layout_attributes.js"(e,t){t.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"}}}}),s8=d({"src/constants/delta.js"(e,t){t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}}),s9=d({"src/traces/waterfall/defaults.js"(e,t){var r=tY(),n=id(),i=aJ().handleText,a=ir(),o=ii(),s=s4(),l=eC(),c=s8(),u=c.INCREASING.COLOR,h=c.DECREASING.COLOR;function f(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",l.defaultLine),e(t+".marker.line.width")}t.exports={supplyDefaults:function(e,t,n,l){function c(n,i){return r.coerce(e,t,s,n,i)}if(!a(e,t,l,c)){t.visible=!1;return}o(e,t,l,c),c("xhoverformat"),c("yhoverformat"),c("measure"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var d=c("textposition");i(e,t,l,c,d,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==t.textposition&&(c("texttemplate"),c("texttemplatefallback"),t.texttemplate||c("textinfo")),f(c,"increasing",u),f(c,"decreasing",h),f(c,"totals","#4499FF"),c("connector.visible")&&(c("connector.mode"),c("connector.line.width")&&(c("connector.line.color"),c("connector.line.dash"))),c("zorder")},crossTraceDefaults:function(e,t){var i;function a(e){return r.coerce(i._input,i,s,e)}if("group"===t.waterfallmode)for(var o=0;o0&&(l?T+="M"+w[0]+","+k[1]+"V"+k[0]:T+="M"+w[1]+","+k[0]+"H"+w[0]),"between"!==c&&(e.isSum||t path").each(function(e){if(!e.isBlank){var t=s[e.dir].marker;r.select(this).call(i.fill,t.color).call(i.stroke,t.line.color).call(n.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}}),l(o,s,e),o.selectAll(".lines").each(function(){var e=s.connector.line;n.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)})})}}}}),li=d({"src/traces/waterfall/hover.js"(e,t){var r=rz().hoverLabelText,n=eC().opacity,i=a6().hoverOnBars,a=s8(),o={increasing:a.INCREASING.SYMBOL,decreasing:a.DECREASING.SYMBOL};t.exports=function(e,t,a,s,l){var c=i(e,t,a,s,l);if(c){var u,h,f,d,p=c.cd,m=p[0].trace,g="h"===m.orientation,y=g?"x":"y",v=g?e.xa:e.ya,x=p[c.index],b=x.isSum?x.b+x.s:x.rawS;c.initial=x.b+x.s-b,c.delta=b,c.final=c.initial+c.delta;var _=S(Math.abs(c.delta));c.deltaLabel=b<0?"("+_+")":_,c.finalLabel=S(c.final),c.initialLabel=S(c.initial);var w=x.hi||m.hoverinfo,k=[];if(w&&"none"!==w&&"skip"!==w){var T="all"===w,A=w.split("+"),M=function(e){return T||-1!==A.indexOf(e)};x.isSum||(!M("final")||M(g?"x":"y")||k.push(c.finalLabel),M("delta")&&(b<0?k.push(c.deltaLabel+" "+o.decreasing):k.push(c.deltaLabel+" "+o.increasing)),M("initial")&&k.push("Initial: "+c.initialLabel))}return k.length&&(c.extraText=k.join("
")),h=(u=m[x.dir].marker).color,f=u.line.color,d=u.line.width,c.color=n(h)?h:n(f)&&d?f:void 0,[c]}function S(e){return r(v,e,m[y+"hoverformat"])}}}}),la=d({"src/traces/waterfall/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"initial"in t&&(e.initial=t.initial),"delta"in t&&(e.delta=t.delta),"final"in t&&(e.final=t.final),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),lo=d({"src/traces/waterfall/index.js"(e,t){t.exports={attributes:s4(),layoutAttributes:s6(),supplyDefaults:s9().supplyDefaults,crossTraceDefaults:s9().crossTraceDefaults,supplyLayoutDefaults:s7(),calc:le(),crossTraceCalc:lt(),plot:lr(),style:ln().style,hoverPoints:li(),eventData:la(),selectPoints:a9(),moduleType:"trace",name:"waterfall",basePlotModule:iV(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),ls=d({"lib/waterfall.js"(e,t){t.exports=lo()}}),ll=d({"src/traces/image/constants.js"(e,t){t.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%",""]}}}}}),lc={};p(lc,{default:()=>lv});var lu,lh,lf,ld,lp,lm,lg,ly,lv,lx=f({"src/traces/image/attributes.ts"(){for(let e of(lu=g(U()),lh=g(W()),lf=g(th()),ld=g(nG()),lp=g(ll()),lg=[],ly=[],lm=["rgb","rgba","rgba256","hsl","hsla"])){let t=lp.colormodel[e];lg.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),ly.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}lv={source:{valType:"string",editType:"calc",description:'Specifies the data URI of the image to be visualized. The URI consists of "data:image/[][;base64\\\\],"'},z:{valType:"data_array",editType:"calc",description:"A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."},colormodel:{valType:"enumerated",values:lm,editType:"calc",description:"Color model used to map the numerical color components described in `z` into colors. If `source` is specified, this attribute will be set to `rgba256` otherwise it defaults to `rgb`."},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:"Picks a smoothing algorithm used to smooth `z` data. This only applies for image traces that use the `source` attribute."},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component. Note that the default value will depend on the colormodel.",lg.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component. Note that the default value will depend on the colormodel.",ly.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:"Set the image's x position. The left edge of the image (or the right edge if the x axis is reversed or dx is negative) will be found at xmin=x0-dx/2"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:"Set the image's y position. The top edge of the image (or the bottom edge if the y axis is NOT reversed or if dy is negative) will be found at ymin=y0-dy/2. By default when an image trace is included, the y axis will be reversed so that the image is right-side-up, but you can disable this by setting yaxis.autorange=true or by providing an explicit y axis range."},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,lu.extendFlat)({},lh.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,lf.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,lf.templatefallbackAttrs)(),zorder:ld.zorder}}}),lb=d({"src/traces/image/defaults.js"(e,t){var r=tY(),n=(lx(),y(lc)).default,i=ll(),a=n3().IMAGE_URL_PREFIX;t.exports=function(e,t){function o(i,a){return r.coerce(e,t,n,i,a)}o("source"),t.source&&!t.source.match(a)&&delete t.source,t._hasSource=!!t.source;var s,l=o("z");if(t._hasZ=!(void 0===l||!l.length||!l[0]||!l[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}o("x0"),o("y0"),o("dx"),o("dy"),t._hasZ?(o("colormodel","rgb"),o("zmin",(s=i.colormodel[t.colormodel]).zminDflt||s.min),o("zmax",s.zmaxDflt||s.max)):t._hasSource&&(t.colormodel="rgba256",s=i.colormodel[t.colormodel],t.zmin=s.zminDflt,t.zmax=s.zmaxDflt),o("zsmooth"),o("text"),o("hovertext"),o("hovertemplate"),o("hovertemplatefallback"),t._length=null,o("zorder")}}}),l_=d({"node_modules/inherits/inherits_browser.js"(e,t){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}}),lw=d({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/stream-browser.js"(e,t){t.exports=tK().EventEmitter}}),lk=d({"node_modules/base64-js/index.js"(e){e.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return(r+n)*3/4-n},e.toByteArray=function(e){var t,r,n=s(e),o=n[0],l=n[1],c=new a((o+l)*3/4-l),u=0,h=l>0?o-4:o;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},e.fromByteArray=function(e){for(var t,r=e.length,i=r%3,a=[],o=0,s=r-i;o>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===i?a.push(n[(t=e[r-1])>>2]+n[t<<4&63]+"=="):2===i&&a.push(n[(t=(e[r-2]<<8)+e[r-1])>>10]+n[t>>4&63]+n[t<<2&63]+"="),a.join("")};var t,r,n=[],i=[],a="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(t=0,r=o.length;t0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}i[45]=62,i[95]=63}}),lT=d({"node_modules/ieee754/index.js"(e){e.read=function(e,t,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,h=r?i-1:0,f=r?-1:1,d=e[t+h];for(h+=f,a=d&(1<<-u)-1,d>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=c}return(d?-1:1)*o*Math.pow(2,a-n)},e.write=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=5960464477539062e-23*(23===i),d=n?0:a-1,p=n?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=f/l:t+=f*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=p,o/=256,c-=8);e[r+d-p]|=128*m}}}),lA=d({"node_modules/buffer/index.js"(e){var t=lk(),r=lT(),n="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function i(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return o(e,t,r)}function o(e,t,r){if("string"==typeof e){var n=e,o=t;if(("string"!=typeof o||""===o)&&(o="utf8"),!a.isEncoding(o))throw TypeError("Unknown encoding: "+o);let r=0|f(n,o),s=i(r),l=s.write(n,o);return l!==r&&(s=s.slice(0,l)),s}if(ArrayBuffer.isView(e)){var s=e;if(D(s,Uint8Array)){let e=new Uint8Array(s);return u(e.buffer,e.byteOffset,e.byteLength)}return c(s)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(D(e,ArrayBuffer)||e&&D(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(D(e,SharedArrayBuffer)||e&&D(e.buffer,SharedArrayBuffer)))return u(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return a.from(l,t,r);let d=function(e){if(a.isBuffer(e)){let t=0|h(e.length),r=i(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?i(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(d)return d;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return s(e),i(e<0?0:0|h(e))}function c(e){let t=e.length<0?0:0|h(e.length),r=i(t);for(let n=0;n=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function f(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||D(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(i)return n?-1:P(e).length;t=(""+t).toLowerCase(),i=!0}}function d(e,r,n){let i=!1;if((void 0===r||r<0)&&(r=0),r>this.length||((void 0===n||n>this.length)&&(n=this.length),n<=0)||(n>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function g(e,t,r,n,i){let a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){let n=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){let r=!0;for(let n=0;n239?4:t>223?3:t>191?2:1;if(i+o<=r){let r,n,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:(192&(r=e[i+1]))==128&&(l=(31&t)<<6|63&r)>127&&(a=l);break;case 3:r=e[i+1],n=e[i+2],(192&r)==128&&(192&n)==128&&(l=(15&t)<<12|(63&r)<<6|63&n)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],(192&r)==128&&(192&n)==128&&(192&s)==128&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,n.push(a>>>10&1023|55296),a=56320|1023&a),n.push(a),i+=o}var a=n;let o=a.length;if(o<=4096)return String.fromCharCode.apply(String,a);let s="",l=0;for(;lr)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,i,o){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function b(e,t,r,n,i){E(t,n,i,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function _(e,t,r,n,i){E(t,n,i,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function w(e,t,r,n,i,a){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function k(e,t,n,i,a){return t*=1,n>>>=0,a||w(e,t,n,4,34028234663852886e22,-34028234663852886e22),r.write(e,t,n,i,23,4),n+4}function T(e,t,n,i,a){return t*=1,n>>>=0,a||w(e,t,n,8,17976931348623157e292,-17976931348623157e292),r.write(e,t,n,i,52,8),n+8}e.Buffer=a,e.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=0x7fffffff,a.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch{return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return o(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return s(e),e<=0?i(e):void 0!==t?"string"==typeof r?i(e).fill(t,r):i(e).fill(t):i(e)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(D(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),D(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,a=Math.min(r,n);in.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else if(a.isBuffer(t))t.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=t.length}return n},a.byteLength=f,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(t+=" ... "),""},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,i){if(D(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;let o=i-n,s=r-t,l=Math.min(o,s),c=this.slice(n,i),u=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let d=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let i;r=Number(r)||0;let a=e.length-r;n?(n=Number(n))>a&&(n=a):n=a;let o=t.length;for(n>o/2&&(n=o/2),i=0;i>8,i.push(r%256),i.push(n);return i}(e,this.length-u),this,u,h);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||v(e,t,this.length);let n=this[e],i=1,a=0;for(;++a>>=0,t>>>=0,r||v(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=j(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&L(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],i=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(n)+(BigInt(i)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&L(e,this.length-8);let n=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],i=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<>>=0,t>>>=0,r||v(e,t,this.length);let n=this[e],i=1,a=0;for(;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||v(e,t,this.length);let n=t,i=1,a=this[e+--n];for(;n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),128&this[e]?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=j(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&L(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&L(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<>>=0,t||v(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;x(this,e,t,r,n,0)}let i=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;x(this,e,t,r,n,0)}let i=r-1,a=1;for(this[t+i]=255&e;--i>=0&&(a*=256);)this[t+i]=e/a&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=j(function(e,t=0){return b(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=j(function(e,t=0){return _(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){let n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let i=0,a=1,o=0;for(this[t]=255&e;++i>>=0,!n){let n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let i=r-1,a=1,o=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===o&&0!==this[t+i+1]&&(o=1),this[t+i]=(e/a|0)-o&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=j(function(e,t=0){return b(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=j(function(e,t=0){return _(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return T(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return T(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function E(e,t,r,n,i,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${(a+1)*8}${n}`:`>= -(2${n} ** ${(a+1)*8-1}${n}) and < 2 ** ${(a+1)*8-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new A.ERR_OUT_OF_RANGE("value",i,e)}C(i,"offset"),(void 0===n[i]||void 0===n[i+a])&&L(i,n.length-(a+1))}function C(e,t){if("number"!=typeof e)throw new A.ERR_INVALID_ARG_TYPE(t,"number",e)}function L(e,t,r){throw Math.floor(e)!==e?(C(e,r),new A.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new A.ERR_BUFFER_OUT_OF_BOUNDS:new A.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}M("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),M("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),M("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?i=S(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=S(i)),i+="n"),n+=` It must be ${t}. Received ${i}`},RangeError);var I=/[^+/0-9A-Za-z-_]/g;function P(e,t){t=t||1/0;let r,n=e.length,i=null,a=[];for(let o=0;o55295&&r<57344){if(!i){if(r>56319||o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function z(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(I,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function O(e,t,r,n){let i;for(i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function D(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var R=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function j(e){return typeof BigInt>"u"?F:e}function F(){throw Error("BigInt not supported")}}}),lM=d({"node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var n in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var i=Object.getOwnPropertySymbols(e);if(1!==i.length||i[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}}}),lS=d({"node_modules/has-tostringtag/shams.js"(e,t){var r=lM();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),lE=d({"node_modules/es-object-atoms/index.js"(e,t){t.exports=Object}}),lC=d({"node_modules/es-errors/index.js"(e,t){t.exports=Error}}),lL=d({"node_modules/es-errors/eval.js"(e,t){t.exports=EvalError}}),lI=d({"node_modules/es-errors/range.js"(e,t){t.exports=RangeError}}),lP=d({"node_modules/es-errors/ref.js"(e,t){t.exports=ReferenceError}}),lz=d({"node_modules/es-errors/syntax.js"(e,t){t.exports=SyntaxError}}),lO=d({"node_modules/es-errors/type.js"(e,t){t.exports=TypeError}}),lD=d({"node_modules/es-errors/uri.js"(e,t){t.exports=URIError}}),lR=d({"node_modules/math-intrinsics/abs.js"(e,t){t.exports=Math.abs}}),lj=d({"node_modules/math-intrinsics/floor.js"(e,t){t.exports=Math.floor}}),lF=d({"node_modules/math-intrinsics/max.js"(e,t){t.exports=Math.max}}),lB=d({"node_modules/math-intrinsics/min.js"(e,t){t.exports=Math.min}}),lN=d({"node_modules/math-intrinsics/pow.js"(e,t){t.exports=Math.pow}}),lU=d({"node_modules/math-intrinsics/round.js"(e,t){t.exports=Math.round}}),lV=d({"node_modules/math-intrinsics/isNaN.js"(e,t){t.exports=Number.isNaN||function(e){return e!=e}}}),lq=d({"node_modules/math-intrinsics/sign.js"(e,t){var r=lV();t.exports=function(e){return r(e)||0===e?e:e<0?-1:1}}}),lH=d({"node_modules/gopd/gOPD.js"(e,t){t.exports=Object.getOwnPropertyDescriptor}}),lG=d({"node_modules/gopd/index.js"(e,t){var r=lH();if(r)try{r([],"length")}catch{r=null}t.exports=r}}),lW=d({"node_modules/es-define-property/index.js"(e,t){var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}t.exports=r}}),lY=d({"node_modules/has-symbols/index.js"(e,t){var r="u">typeof Symbol&&Symbol,n=lM();t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&n()}}}),lX=d({"node_modules/get-proto/Reflect.getPrototypeOf.js"(e,t){t.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null}}),lZ=d({"node_modules/get-proto/Object.getPrototypeOf.js"(e,t){t.exports=lE().getPrototypeOf||null}}),l$=d({"node_modules/function-bind/implementation.js"(e,t){var r=Object.prototype.toString,n=Math.max,i=function(e,t){for(var r=[],n=0;ntypeof Reflect&&Reflect&&Reflect.apply}}),l1=d({"node_modules/call-bind-apply-helpers/actualApply.js"(e,t){var r=lK(),n=lQ(),i=lJ();t.exports=l0()||r.call(i,n)}}),l2=d({"node_modules/call-bind-apply-helpers/index.js"(e,t){var r=lK(),n=lO(),i=lJ(),a=l1();t.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new n("a function is required");return a(r,i,e)}}}),l3=d({"node_modules/dunder-proto/get.js"(e,t){var r,n=l2(),i=lG();try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!r&&i&&i(Object.prototype,"__proto__"),o=Object,s=o.getPrototypeOf;t.exports=a&&"function"==typeof a.get?n([a.get]):"function"==typeof s&&function(e){return s(null==e?e:o(e))}}}),l5=d({"node_modules/get-proto/index.js"(e,t){var r=lX(),n=lZ(),i=l3();t.exports=r?function(e){return r(e)}:n?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return n(e)}:i?function(e){return i(e)}:null}}),l4=d({"node_modules/hasown/index.js"(e,t){var r=Function.prototype.call,n=Object.prototype.hasOwnProperty;t.exports=lK().call(r,n)}}),l6=d({"node_modules/get-intrinsic/index.js"(e,t){var r,n=lE(),i=lC(),a=lL(),o=lI(),s=lP(),l=lz(),c=lO(),u=lD(),h=lR(),f=lj(),d=lF(),p=lB(),m=lN(),g=lU(),y=lq(),v=Function,x=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch{}},b=lG(),_=lW(),w=function(){throw new c},k=b?function(){try{return arguments.callee,w}catch{try{return b(arguments,"callee").get}catch{return w}}}():w,T=lY()(),A=l5(),M=lZ(),S=lX(),E=lQ(),C=lJ(),L={},I=typeof Uint8Array>"u"||!A?r:A(Uint8Array),P={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":T&&A?A([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&A?A(A([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":!(typeof Map>"u")&&T&&A?A(new Map()[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":n,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":!(typeof Set>"u")&&T&&A?A(new Set()[Symbol.iterator]()):r,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&A?A(""[Symbol.iterator]()):r,"%Symbol%":T?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":k,"%TypedArray%":I,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":C,"%Function.prototype.apply%":E,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":M,"%Math.abs%":h,"%Math.floor%":f,"%Math.max%":d,"%Math.min%":p,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":S};if(A)try{null.error}catch(e){z=A(A(e)),P["%Error.prototype%"]=z}var z,O=function e(t){var r;if("%AsyncFunction%"===t)r=x("async function () {}");else if("%GeneratorFunction%"===t)r=x("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=x("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var i=e("%AsyncGenerator%");i&&A&&(r=A(i.prototype))}return P[t]=r,r},D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=lK(),j=l4(),F=R.call(C,Array.prototype.concat),B=R.call(E,Array.prototype.splice),N=R.call(C,String.prototype.replace),U=R.call(C,String.prototype.slice),V=R.call(C,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,G=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var n=[];return N(e,q,function(e,t,r,i){n[n.length]=r?N(i,H,"$1"):t||e}),n},W=function(e,t){var r,n=e;if(j(D,n)&&(n="%"+(r=D[n])[0]+"%"),j(P,n)){var i=P[n];if(i===L&&(i=O(n)),typeof i>"u"&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:i}}throw new l("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===V(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=G(e),n=r.length>0?r[0]:"",i=W("%"+n+"%",t),a=i.name,o=i.value,s=!1,u=i.alias;u&&(n=u[0],B(r,F([0,1],u)));for(var h=1,f=!0;h=r.length){var g=b(o,d);o=(f=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[d]}else f=j(o,d),o=o[d];f&&!s&&(P[a]=o)}}return o}}}),l8=d({"node_modules/define-data-property/index.js"(e,t){var r=lW(),n=lz(),i=lO(),a=lG();t.exports=function(e,t,o){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!a&&a(e,t);if(r)r(e,t,{configurable:null===c&&h?h.configurable:!c,enumerable:null===s&&h?h.enumerable:!s,value:o,writable:null===l&&h?h.writable:!l});else if(!u&&(s||l||c))throw new n("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=o}}}),l9=d({"node_modules/has-property-descriptors/index.js"(e,t){var r=lW(),n=function(){return!!r};n.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch{return!0}},t.exports=n}}),l7=d({"node_modules/set-function-length/index.js"(e,t){var r=l6(),n=l8(),i=l9()(),a=lG(),o=lO(),s=r("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],l=!0,c=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(l=!1),u&&!u.writable&&(c=!1)}return(l||c||!r)&&(i?n(e,"length",t,!0,!0):n(e,"length",t)),e}}}),ce=d({"node_modules/call-bind/index.js"(e,t){var r=lK(),n=l6(),i=l7(),a=lO(),o=n("%Function.prototype.apply%"),s=n("%Function.prototype.call%"),l=n("%Reflect.apply%",!0)||r.call(s,o),c=lW(),u=n("%Math.max%");t.exports=function(e){if("function"!=typeof e)throw new a("a function is required");var t=l(r,s,arguments);return i(t,1+u(0,e.length-(arguments.length-1)),!0)};var h=function(){return l(r,o,arguments)};c?c(t.exports,"apply",{value:h}):t.exports.apply=h}}),ct=d({"node_modules/call-bind/callBound.js"(e,t){var r=l6(),n=ce(),i=n(r("String.prototype.indexOf"));t.exports=function(e,t){var a=r(e,!!t);return"function"==typeof a&&i(e,".prototype.")>-1?n(a):a}}}),cr=d({"node_modules/is-arguments/index.js"(e,t){var r=lS()(),n=ct()("Object.prototype.toString"),i=function(e){return(!r||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===n(e)},a=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==n(e)&&"[object Function]"===n(e.callee)},o=function(){return i(arguments)}();i.isLegacyArguments=a,t.exports=o?i:a}}),cn=d({"node_modules/is-generator-function/index.js"(e,t){var r,n=Object.prototype.toString,i=Function.prototype.toString,a=/^\s*(?:function)?\*/,o=lS()(),s=Object.getPrototypeOf,l=function(){if(!o)return!1;try{return Function("return function*() {}")()}catch{}};t.exports=function(e){if("function"!=typeof e)return!1;if(a.test(i.call(e)))return!0;if(!o)return"[object GeneratorFunction]"===n.call(e);if(!s)return!1;if(typeof r>"u"){var t=l();r=!!t&&s(t)}return s(e)===r}}}),ci=d({"node_modules/is-callable/index.js"(e,t){var r,n,i,a=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{n=Object.defineProperty({},"length",{get:function(){throw i}}),i={},o(function(){throw 42},null,n)}catch(e){e!==i&&(o=null)}else o=null;var s=/^\s*class\b/,l=function(e){try{var t=a.call(e);return s.test(t)}catch{return!1}},c=function(e){try{return!l(e)&&(a.call(e),!0)}catch{return!1}},u=Object.prototype.toString,h="function"==typeof Symbol&&!!Symbol.toStringTag,f=!(0 in[,]),d=function(){return!1};"object"==typeof document&&(r=document.all,u.call(r)===u.call(document.all)&&(d=function(e){if((f||!e)&&(typeof e>"u"||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch{}return!1})),t.exports=o?function(e){if(d(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,n)}catch(e){if(e!==i)return!1}return!l(e)&&c(e)}:function(e){if(d(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;if(h)return c(e);if(l(e))return!1;var t=u.call(e);return("[object Function]"===t||"[object GeneratorFunction]"===t||!!/^\[object HTML/.test(t))&&c(e)}}}),ca=d({"node_modules/for-each/index.js"(e,t){var r=ci(),n=Object.prototype.toString,i=Object.prototype.hasOwnProperty,a=function(e,t,r){for(var n=0,a=e.length;n=3&&(l=i),"[object Array]"===n.call(e)?a(e,t,l):"string"==typeof e?o(e,t,l):s(e,t,l)}}}),co=d({"node_modules/available-typed-arrays/index.js"(e,t){var r=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],n=typeof globalThis>"u"?window:globalThis;t.exports=function(){for(var e=[],t=0;t"u"?window:globalThis,u=n(),h=a("String.prototype.slice"),f=Object.getPrototypeOf,d=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?t:"Object"===t&&g(e)}return o?m(e):null}}}),cl=d({"node_modules/is-typed-array/index.js"(e,t){var r=ca(),n=co(),i=ct(),a=i("Object.prototype.toString"),o=lS()(),s=lG(),l=typeof globalThis>"u"?window:globalThis,c=n(),u=i("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1)}}}),cc=d({"node_modules/util/support/types.js"(e){var t,r,n=cr(),i=cn(),a=cs(),o=cl();function s(e){return e.call.bind(e)}var l="u">typeof BigInt,c="u">typeof Symbol,u=s(Object.prototype.toString),h=s(Number.prototype.valueOf),f=s(String.prototype.valueOf),d=s(Boolean.prototype.valueOf);function p(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch{return!1}}function m(e){return"[object Map]"===u(e)}function g(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function v(e){return"[object WeakSet]"===u(e)}function x(e){return"[object ArrayBuffer]"===u(e)}function b(e){return!(typeof ArrayBuffer>"u")&&(x.working?x(e):e instanceof ArrayBuffer)}function _(e){return"[object DataView]"===u(e)}function w(e){return!(typeof DataView>"u")&&(_.working?_(e):e instanceof DataView)}l&&(t=s(BigInt.prototype.valueOf)),c&&(r=s(Symbol.prototype.valueOf)),e.isArgumentsObject=n,e.isGeneratorFunction=i,e.isTypedArray=o,e.isPromise=function(e){return"u">typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||w(e)},e.isUint8Array=function(e){return"Uint8Array"===a(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===a(e)},e.isUint16Array=function(e){return"Uint16Array"===a(e)},e.isUint32Array=function(e){return"Uint32Array"===a(e)},e.isInt8Array=function(e){return"Int8Array"===a(e)},e.isInt16Array=function(e){return"Int16Array"===a(e)},e.isInt32Array=function(e){return"Int32Array"===a(e)},e.isFloat32Array=function(e){return"Float32Array"===a(e)},e.isFloat64Array=function(e){return"Float64Array"===a(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===a(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===a(e)},m.working="u">typeof Map&&m(new Map),e.isMap=function(e){return!(typeof Map>"u")&&(m.working?m(e):e instanceof Map)},g.working="u">typeof Set&&g(new Set),e.isSet=function(e){return!(typeof Set>"u")&&(g.working?g(e):e instanceof Set)},y.working="u">typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(e){return!(typeof WeakMap>"u")&&(y.working?y(e):e instanceof WeakMap)},v.working="u">typeof WeakSet&&v(new WeakSet),e.isWeakSet=function(e){return v(e)},x.working="u">typeof ArrayBuffer&&x(new ArrayBuffer),e.isArrayBuffer=b,_.working="u">typeof ArrayBuffer&&"u">typeof DataView&&_(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=w;var k="u">typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function T(e){return"[object SharedArrayBuffer]"===u(e)}function A(e){return!(typeof k>"u")&&(typeof T.working>"u"&&(T.working=T(new k)),T.working?T(e):e instanceof k)}function M(e){return p(e,h)}function S(e){return p(e,f)}function E(e){return p(e,d)}function C(e){return l&&p(e,t)}function L(e){return c&&p(e,r)}e.isSharedArrayBuffer=A,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.isNumberObject=M,e.isStringObject=S,e.isBooleanObject=E,e.isBigIntObject=C,e.isSymbolObject=L,e.isBoxedPrimitive=function(e){return M(e)||S(e)||E(e)||C(e)||L(e)},e.isAnyArrayBuffer=function(e){return"u">typeof Uint8Array&&(b(e)||A(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw Error(t+" is not supported in userland")}})})}}),cu=d({"node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}}}),ch=d({"(disabled):node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch{return"[Circular]"}default:return e}}),l=i[n];ntypeof S&&!0===S.noDeprecation)return t;if(typeof S>"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(S.throwDeprecation)throw Error(r);S.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var n={},i=/^$/;function a(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(r)?n.showHidden=r:r&&e._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),l(n,t,n.depth)}function o(e,t){var r=a.styles[t];return r?"\x1b["+a.colors[r][0]+"m"+e+"\x1b["+a.colors[r][1]+"m":e}function s(e,t){return e}function l(t,r,n){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,a,o,s,v,w,k=r.inspect(n,t);return m(k)||(k=l(t,k,n)),k}var T=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return p(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}(t,r);if(T)return T;var M=Object.keys(r),S=(v={},M.forEach(function(e,t){v[e]=!0}),v);if(t.showHidden&&(M=Object.getOwnPropertyNames(r)),b(r)&&(M.indexOf("message")>=0||M.indexOf("description")>=0))return c(r);if(0===M.length){if(_(r)){var E=r.name?": "+r.name:"";return t.stylize("[Function"+E+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(b(r))return c(r)}var C="",L=!1,I=["{","}"];return(h(r)&&(L=!0,I=["[","]"]),_(r)&&(C=" [Function"+(r.name?": "+r.name:"")+"]"),y(r)&&(C=" "+RegExp.prototype.toString.call(r)),x(r)&&(C=" "+Date.prototype.toUTCString.call(r)),b(r)&&(C=" "+c(r)),0!==M.length||L&&0!=r.length)?n<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),w=L?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o=0&&s++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?o[0]+(""===a?"":a+` - `)+" "+i.join(`, - `)+" "+o[1]:o[0]+a+" "+i.join(", ")+" "+o[1]):I[0]+C+I[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,r,n,i,a){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),A(n,i)||(o="["+i+"]"),s||(0>e.seen.indexOf(c.value)?(s=d(r)?l(e,c.value,null):l(e,c.value,r-1)).indexOf(` -`)>-1&&(s=a?s.split(` -`).map(function(e){return" "+e}).join(` -`).slice(2):` -`+s.split(` -`).map(function(e){return" "+e}).join(` -`)):s=e.stylize("[Circular]","special")),g(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function d(e){return null===e}function p(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function y(e){return v(e)&&"[object RegExp]"===w(e)}function v(e){return"object"==typeof e&&null!==e}function x(e){return v(e)&&"[object Date]"===w(e)}function b(e){return v(e)&&("[object Error]"===w(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}i=RegExp("^"+"false".replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()+"$","i"),e.debuglog=function(t){if(!n[t=t.toUpperCase()])if(i.test(t)){var r=S.pid;n[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else n[t]=function(){};return n[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=cc(),e.isArray=h,e.isBoolean=f,e.isNull=d,e.isNullOrUndefined=function(e){return null==e},e.isNumber=p,e.isString=m,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=g,e.isRegExp=y,e.types.isRegExp=y,e.isObject=v,e.isDate=x,e.types.isDate=x,e.isError=b,e.types.isNativeError=b,e.isFunction=_,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||typeof e>"u"},e.isBuffer=cu();var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[k((t=new Date).getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":"),[t.getDate(),T[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=l_(),e._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var M="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function E(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(M&&e[M]){var r=e[M];if("function"!=typeof r)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,M,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return n.alloc(0);for(var t,r,i=n.allocUnsafe(e>>>0),a=this.head,o=0;a;)t=a.data,r=o,n.prototype.copy.call(t,i,r),o+=a.data.length,a=a.next;return i}},{key:"consume",value:function(e,t){var r;return ei.length?i.length:e;if(a===i.length?n+=i:n+=i.slice(0,e),0==(e-=a)){a===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(a));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=n.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var a=r.data,o=e>a.length?a.length:e;if(a.copy(t,t.length-e,0,o),0==(e-=o)){o===a.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=a.slice(o));break}++i}return this.length-=i,t}},{key:a,value:function(e,t){return i(this,function(e){for(var t=1;t2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}n("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),n("ERR_INVALID_ARG_TYPE",function(e,t,r){if("string"==typeof t&&(n="not ",t.substr(0,n.length)===n)?(l="must not be",t=t.replace(/^not /,"")):l="must be",a=" argument",(void 0===o||o>e.length)&&(o=e.length),e.substring(o-a.length,o)===a)c="The ".concat(e," ").concat(l," ").concat(i(t,"type"));else{var n,a,o,s,l,c,u=("number"!=typeof s&&(s=0),s+1>e.length||-1===e.indexOf(".",s))?"argument":"property";c='The "'.concat(e,'" ').concat(u," ").concat(l," ").concat(i(t,"type"))}return c+". Received type ".concat(typeof r)},TypeError),n("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),n("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),n("ERR_STREAM_PREMATURE_CLOSE","Premature close"),n("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),n("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),n("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),n("ERR_STREAM_WRITE_AFTER_END","write after end"),n("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),n("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),n("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r}}),cm=d({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(e,t){var r=cp().codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,n,i){var a=null!=t.highWaterMark?t.highWaterMark:i?t[n]:null;if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new r(i?n:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}}}),cg=d({"node_modules/util-deprecate/browser.js"(e,t){t.exports=function(e,t){if(r("noDeprecation"))return e;var n=!1;return function(){if(!n){if(r("throwDeprecation"))throw Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),n=!0}return e.apply(this,arguments)}};function r(e){try{if(!window.localStorage)return!1}catch{return!1}var t=window.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}}}),cy=d({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(e,t){function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var r=t,n=e,i=r.entry;for(r.entry=null;i;){var a=i.callback;n.pendingcb--,a(void 0),i=i.next}n.corkedRequestsFree.next=r}}t.exports=k,k.WritableState=w;var n,i,a={deprecate:cg()},o=lw(),s=lA().Buffer,l=window.Uint8Array||function(){},c=cd(),u=cm().getHighWaterMark,h=cp().codes,f=h.ERR_INVALID_ARG_TYPE,d=h.ERR_METHOD_NOT_IMPLEMENTED,p=h.ERR_MULTIPLE_CALLBACK,m=h.ERR_STREAM_CANNOT_PIPE,g=h.ERR_STREAM_DESTROYED,y=h.ERR_STREAM_NULL_VALUES,v=h.ERR_STREAM_WRITE_AFTER_END,x=h.ERR_UNKNOWN_ENCODING,b=c.errorOrDestroy;function _(){}function w(e,t,i){n=n||cv(),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=u(this,e,"writableHighWaterMark",i),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new p;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,n?(S.nextTick(i,t),S.nextTick(L,e,r),e._writableState.errorEmitted=!0,b(e,t)):(i(t),e._writableState.errorEmitted=!0,b(e,t),L(e,r));else{var a=E(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||M(e,r),n?S.nextTick(A,e,r,a,i):A(e,r,a,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function k(e){var t=this instanceof(n=n||cv());if(!t&&!i.call(k,this))return new k(e);this._writableState=new w(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function T(e,t,r,n,i,a,o){t.writelen=n,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new g("write")):r?e._writev(i,t.onwrite):e._write(i,a,t.onwrite),t.sync=!1}function A(e,t,r,n){var i,a;r||(i=e,0===(a=t).length&&a.needDrain&&(a.needDrain=!1,i.emit("drain"))),t.pendingcb--,n(),L(e,t)}function M(e,t){t.bufferProcessing=!0;var n=t.bufferedRequest;if(e._writev&&n&&n.next){var i=Array(t.bufferedRequestCount),a=t.corkedRequestsFree;a.entry=n;for(var o=0,s=!0;n;)i[o]=n,n.isBuf||(s=!1),n=n.next,o+=1;i.allBuffers=s,T(e,t,!0,t.length,i,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;n;){var l=n.chunk,c=n.encoding,u=n.callback,h=t.objectMode?1:l.length;if(T(e,t,!1,h,l,c,u),n=n.next,t.bufferedRequestCount--,t.writing)break}null===n&&(t.lastBufferedRequest=null)}t.bufferedRequest=n,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),L(e,t)})}function L(e,t){var r=E(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,S.nextTick(C,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}l_()(k,o),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(i=Function.prototype[Symbol.hasInstance],Object.defineProperty(k,Symbol.hasInstance,{value:function(e){return!!i.call(this,e)||this===k&&e&&e._writableState instanceof w}})):i=function(e){return e instanceof this},k.prototype.pipe=function(){b(this,new m)},k.prototype.write=function(e,t,r){var n,i,a,o,c,u,h,d=this._writableState,p=!1,m=!d.objectMode&&(n=e,s.isBuffer(n)||n instanceof l);return m&&!s.isBuffer(e)&&(i=e,e=s.from(i)),"function"==typeof t&&(r=t,t=null),m?t="buffer":t||(t=d.defaultEncoding),"function"!=typeof r&&(r=_),d.ending?(a=r,b(this,o=new v),S.nextTick(a,o)):(m||(c=e,u=r,null===c?h=new y:"string"==typeof c||d.objectMode||(h=new f("chunk",["string","Buffer"],c)),!h||(b(this,h),S.nextTick(u,h),0)))&&(d.pendingcb++,p=function(e,t,r,n,i,a){if(!r){var o,l,c=(o=n,l=i,t.objectMode||!1===t.decodeStrings||"string"!=typeof o||(o=s.from(o,l)),o);n!==c&&(r=!0,i="buffer",n=c)}var u=t.objectMode?1:n.length;t.length+=u;var h=t.length-1))throw new x(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(k.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(k.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),k.prototype._write=function(e,t,r){r(new d("_write()"))},k.prototype._writev=null,k.prototype.end=function(e,t,r){var n,i,a,o=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||(n=this,i=o,a=r,i.ending=!0,L(n,i),a&&(i.finished?S.nextTick(a):n.once("finish",a)),i.ended=!0,n.writable=!1),this},Object.defineProperty(k.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(k.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),k.prototype.destroy=c.destroy,k.prototype._undestroy=c.undestroy,k.prototype._destroy=function(e,t){t(e)}}}),cv=d({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_duplex.js"(e,t){var r,n,i,a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var o=cT(),s=cy();for(l_()(l,o),r=a(s.prototype),i=0;i>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function o(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}e.StringDecoder=n,n.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},n.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}),c_=d({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(e,t){var r=cp().codes.ERR_STREAM_PREMATURE_CLOSE;function n(){}t.exports=function e(t,i,a){if("function"==typeof i)return e(t,null,i);i||(i={}),o=a||n,s=!1,a=function(){if(!s){s=!0;for(var e=arguments.length,t=Array(e),r=0;r0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===o.prototype||(l=t,t=o.from(l)),i)u.endEmitted?b(e,new x):A(e,u,t,!0);else if(u.ended)b(e,new y);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?A(e,u,t,!1):L(e,u)):A(e,u,t,!1)}else i||(u.reading=!1,L(e,u));return!u.ended&&(u.lengtht.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;n("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(n("emitReadable",t.flowing),t.emittedReadable=!0,S.nextTick(C,e))}function C(e){var t=e._readableState;n("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,D(e)}function L(e,t){t.readingMore||(t.readingMore=!0,S.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function z(e){n("readable nexttick read 0"),e.read(0)}function O(e,t){n("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),D(e),t.flowing&&!t.reading&&e.read(0)}function D(e){var t=e._readableState;for(n("flow",t.flowing);t.flowing&&null!==e.read(););}function R(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function j(e){var t=e._readableState;n("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,S.nextTick(F,t,e))}function F(e,t){if(n("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function B(e,t){for(var r=0,n=e.length;r=r.highWaterMark:r.length>0)||r.ended))return n("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?j(this):E(this),null;if(0===(e=M(e,r))&&r.ended)return 0===r.length&&j(this),null;var a=r.needReadable;return n("need readable",a),(0===r.length||r.length-e0?R(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),i!==e&&r.ended&&j(this)),null!==t&&this.emit("data",t),t},k.prototype._read=function(e){b(this,new v("_read()"))},k.prototype.pipe=function(e,t){var r,a=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,n("pipe count=%d opts=%j",o.pipesCount,t);var s=t&&!1===t.end||e===S.stdout||e===S.stderr?m:l;function l(){n("onend"),e.end()}o.endEmitted?S.nextTick(s):a.once("end",s),e.on("unpipe",function t(r,i){n("onunpipe"),r===a&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,n("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",f),e.removeListener("unpipe",t),a.removeListener("end",l),a.removeListener("end",m),a.removeListener("data",h),u=!0,o.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c())});var c=(r=a,function(){var e=r._readableState;n("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&i(r,"data")&&(e.flowing=!0,D(r))});e.on("drain",c);var u=!1;function h(t){n("ondata");var r=e.write(t);n("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!u&&(n("false write response, pause",o.awaitDrain),o.awaitDrain++),a.pause())}function f(t){n("onerror",t),m(),e.removeListener("error",f),0===i(e,"error")&&b(e,t)}function d(){e.removeListener("finish",p),m()}function p(){n("onfinish"),e.removeListener("close",d),m()}function m(){n("unpipe"),a.unpipe(e)}return a.on("data",h),!function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",f),e.once("close",d),e.once("finish",p),e.emit("pipe",a),o.flowing||(n("pipe resume"),a.resume()),e},k.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==i.flowing&&this.resume()):"readable"!==e||i.endEmitted||i.readableListening||(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,n("on readable",i.length,i.reading),i.length?E(this):i.reading||S.nextTick(z,this)),r},k.prototype.addListener=k.prototype.on,k.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&S.nextTick(P,this),r},k.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&S.nextTick(P,this),t},k.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(n("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,S.nextTick(O,e,t))),r.paused=!1,this},k.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},k.prototype.wrap=function(e){var t=this,r=this._readableState,i=!1;for(var a in e.on("end",function(){if(n("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(a){n("wrapped data"),r.decoder&&(a=r.decoder.write(a)),r.objectMode&&null==a||!r.objectMode&&(!a||!a.length)||t.push(a)||(i=!0,e.pause())}),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){n("wrapped _read",t),i&&(i=!1,e.resume())},this},"function"==typeof Symbol&&(k.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=cw()),u(this)}),Object.defineProperty(k.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(k.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(k.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),k._fromList=R,Object.defineProperty(k.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(k.from=function(e,t){return void 0===h&&(h=ck()),h(k,e,t)})}}),cA=d({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_transform.js"(e,t){t.exports=c;var r=cp().codes,n=r.ERR_METHOD_NOT_IMPLEMENTED,i=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=r.ERR_TRANSFORM_WITH_LENGTH_0,s=cv();function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new i);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length0,l=o=function(e){h||(h=e),e&&f.forEach(s),m||(f.forEach(s),c(h))},u=!1,o=function(){u||(u=!0,l.apply(void 0,arguments))},d=!1,e.on("close",function(){d=!0}),void 0===r&&(r=c_()),r(e,{readable:m,writable:i},function(e){if(e)return o(e);d=!0,o()}),p=!1,function(t){if(!d&&!p){if(p=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();o(t||new a("pipe"))}}});return t.reduce(l)}}}),cE=d({"node_modules/stream-browserify/index.js"(e,t){t.exports=n;var r=tK().EventEmitter;function n(){r.call(this)}l_()(n,r),n.Readable=cT(),n.Writable=cy(),n.Duplex=cv(),n.Transform=cA(),n.PassThrough=cM(),n.finished=c_(),n.pipeline=cS(),n.Stream=n,n.prototype.pipe=function(e,t){var n=this;function i(t){e.writable&&!1===e.write(t)&&n.pause&&n.pause()}function a(){n.readable&&n.resume&&n.resume()}n.on("data",i),e.on("drain",a),e._isStdio||t&&!1===t.end||(n.on("end",s),n.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){n.removeListener("data",i),e.removeListener("drain",a),n.removeListener("end",s),n.removeListener("close",l),n.removeListener("error",c),e.removeListener("error",c),n.removeListener("end",u),n.removeListener("close",u),e.removeListener("close",u)}return n.on("error",c),e.on("error",c),n.on("end",u),n.on("close",u),e.on("close",u),e.emit("pipe",n),e}}}),cC=d({"node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n=o)return e;switch(e){case"%s":return String(i[n++]);case"%d":return Number(i[n++]);case"%j":try{return JSON.stringify(i[n++])}catch{return"[Circular]"}default:return e}}),l=i[n];ntypeof S&&!0===S.noDeprecation)return t;if(typeof S>"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(S.throwDeprecation)throw Error(r);S.traceDeprecation?console.trace(r):console.error(r),n=!0}return t.apply(this,arguments)}};var n={},i=/^$/;function a(t,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),f(r)?n.showHidden=r:r&&e._extend(n,r),g(n.showHidden)&&(n.showHidden=!1),g(n.depth)&&(n.depth=2),g(n.colors)&&(n.colors=!1),g(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=o),l(n,t,n.depth)}function o(e,t){var r=a.styles[t];return r?"\x1b["+a.colors[r][0]+"m"+e+"\x1b["+a.colors[r][1]+"m":e}function s(e,t){return e}function l(t,r,n){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&!(r.constructor&&r.constructor.prototype===r)){var i,a,o,s,v,w,k=r.inspect(n,t);return m(k)||(k=l(t,k,n)),k}var T=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return p(t)?e.stylize(""+t,"number"):f(t)?e.stylize(""+t,"boolean"):d(t)?e.stylize("null","null"):void 0}(t,r);if(T)return T;var M=Object.keys(r),S=(v={},M.forEach(function(e,t){v[e]=!0}),v);if(t.showHidden&&(M=Object.getOwnPropertyNames(r)),b(r)&&(M.indexOf("message")>=0||M.indexOf("description")>=0))return c(r);if(0===M.length){if(_(r)){var E=r.name?": "+r.name:"";return t.stylize("[Function"+E+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(b(r))return c(r)}var C="",L=!1,I=["{","}"];return(h(r)&&(L=!0,I=["[","]"]),_(r)&&(C=" [Function"+(r.name?": "+r.name:"")+"]"),y(r)&&(C=" "+RegExp.prototype.toString.call(r)),x(r)&&(C=" "+Date.prototype.toUTCString.call(r)),b(r)&&(C=" "+c(r)),0!==M.length||L&&0!=r.length)?n<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),w=L?function(e,t,r,n,i){for(var a=[],o=0,s=t.length;o=0&&s++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?o[0]+(""===a?"":a+` - `)+" "+i.join(`, - `)+" "+o[1]:o[0]+a+" "+i.join(", ")+" "+o[1]):I[0]+C+I[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,r,n,i,a){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,i)||{value:t[i]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),A(n,i)||(o="["+i+"]"),s||(0>e.seen.indexOf(c.value)?(s=d(r)?l(e,c.value,null):l(e,c.value,r-1)).indexOf(` -`)>-1&&(s=a?s.split(` -`).map(function(e){return" "+e}).join(` -`).slice(2):` -`+s.split(` -`).map(function(e){return" "+e}).join(` -`)):s=e.stylize("[Circular]","special")),g(o)){if(a&&i.match(/^\d+$/))return s;(o=JSON.stringify(""+i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function f(e){return"boolean"==typeof e}function d(e){return null===e}function p(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function y(e){return v(e)&&"[object RegExp]"===w(e)}function v(e){return"object"==typeof e&&null!==e}function x(e){return v(e)&&"[object Date]"===w(e)}function b(e){return v(e)&&("[object Error]"===w(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function k(e){return e<10?"0"+e.toString(10):e.toString(10)}i=RegExp("^"+"false".replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()+"$","i"),e.debuglog=function(t){if(!n[t=t.toUpperCase()])if(i.test(t)){var r=S.pid;n[t]=function(){var n=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,n)}}else n[t]=function(){};return n[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=cc(),e.isArray=h,e.isBoolean=f,e.isNull=d,e.isNullOrUndefined=function(e){return null==e},e.isNumber=p,e.isString=m,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=g,e.isRegExp=y,e.types.isRegExp=y,e.isObject=v,e.isDate=x,e.types.isDate=x,e.isError=b,e.types.isNativeError=b,e.isFunction=_,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||typeof e>"u"},e.isBuffer=cu();var T=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[k((t=new Date).getHours()),k(t.getMinutes()),k(t.getSeconds())].join(":"),[t.getDate(),T[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=l_(),e._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var M="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function E(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(M&&e[M]){var r=e[M];if("function"!=typeof r)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,M,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,n=new Promise(function(e,n){t=e,r=n}),i=[],a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var e,t=i(l);return e=o?Reflect.construct(t,arguments,i(this).constructor):t.apply(this,arguments),function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var n=e;if(void 0===n)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(this,e)});function l(r,n,i){var a;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,l),(a=s.call(this,"string"==typeof t?t:t(r,n,i))).code=e,a}return Object.defineProperty(l,"prototype",{writable:!1}),l}(a);s[e]=o}function c(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",function(e,t,n){if(void 0===a&&(a=cY()),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(u="must not be",t=t.replace(/^not /,"")):u="must be",o=" argument",(void 0===s||s>e.length)&&(s=e.length),e.substring(s-o.length,s)===o)h="The ".concat(e," ").concat(u," ").concat(c(t,"type"));else{var i,o,s,l,u,h,f=("number"!=typeof l&&(l=0),l+1>e.length||-1===e.indexOf(".",l))?"argument":"property";h='The "'.concat(e,'" ').concat(f," ").concat(u," ").concat(c(t,"type"))}return h+". Received type ".concat(r(n))},TypeError),l("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===o&&(o=cC());var n=o.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",function(e,t,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(r(n)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(i,".")},TypeError),l("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",i=t.length;switch(t=t.map(function(e){return'"'.concat(e,'"')}),i){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,i-1).join(", "),n+=", and ".concat(t[i-1]," arguments")}return"".concat(n," must be specified")},TypeError),t.exports.codes=s}}),cI=d({"node_modules/assert/build/internal/assert/assertion_error.js"(e,t){function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function n(e){for(var t=1;ttypeof t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return l(e,arguments,h(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)})(e)}function l(e,t,r){return(l=c()?Reflect.construct.bind():function(e,t,r){var n=[null];n.push.apply(n,t);var i=new(Function.bind.apply(e,n));return r&&u(i,r.prototype),i}).apply(null,arguments)}function c(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e){return(f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var d=cC().inspect,p=cL().codes.ERR_INVALID_ARG_TYPE;function m(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var g="",y="",v="",x="",b={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(t){r[t]=e[t]}),Object.defineProperty(r,"message",{value:e.message}),r}function w(e){return d(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}t.exports=function(e,t){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");k.prototype=Object.create(e&&e.prototype,{constructor:{value:k,writable:!0,configurable:!0}}),Object.defineProperty(k,"prototype",{writable:!1}),e&&u(k,e);var r,s,l=(r=c(),function(){var e,t=h(k);return e=r?Reflect.construct(t,arguments,h(this).constructor):t.apply(this,arguments),a(this,e)});function k(e){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,k),"object"!==f(e)||null===e)throw new p("options","Object",e);var t,r=e.message,n=e.operator,i=e.stackStartFn,s=e.actual,c=e.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=l.call(this,String(r));else if(S.stderr&&S.stderr.isTTY&&(S.stderr&&S.stderr.getColorDepth&&1!==S.stderr.getColorDepth()?(g="\x1b[34m",y="\x1b[32m",x="\x1b[39m",v="\x1b[31m"):(g="",y="",x="",v="")),"object"===f(s)&&null!==s&&"object"===f(c)&&null!==c&&"stack"in s&&s instanceof Error&&"stack"in c&&c instanceof Error&&(s=_(s),c=_(c)),"deepStrictEqual"===n||"strictEqual"===n)t=l.call(this,function(e,t,r){var n="",i="",a=0,o="",s=!1,l=w(e),c=l.split(` -`),u=w(t).split(` -`),h=0,d="";if("strictEqual"===r&&"object"===f(e)&&"object"===f(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===c.length&&1===u.length&&c[0]!==u[0]){var p=c[0].length+u[0].length;if(p<=10){if(("object"!==f(e)||null===e)&&("object"!==f(t)||null===t)&&(0!==e||0!==t))return"".concat(b[r],` - -`)+"".concat(c[0]," !== ").concat(u[0],` -`)}else if("strictEqualObject"!==r&&p<(S.stderr&&S.stderr.isTTY?S.stderr.columns:80)){for(;c[0][h]===u[0][h];)h++;h>2&&(d=` - `.concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",h),"^"),h=0)}}for(var _=c[c.length-1],k=u[u.length-1];_===k&&(h++<2?o=` - `.concat(_).concat(o):n=_,c.pop(),u.pop(),0!==c.length&&0!==u.length);)_=c[c.length-1],k=u[u.length-1];var T=Math.max(c.length,u.length);if(0===T){var A=l.split(` -`);if(A.length>30)for(A[26]="".concat(g,"...").concat(x);A.length>27;)A.pop();return"".concat(b.notIdentical,` - -`).concat(A.join(` -`),` -`)}h>3&&(o=` -`.concat(g,"...").concat(x).concat(o),s=!0),""!==n&&(o=` - `.concat(n).concat(o),n="");var M=0,E=b[r]+` -`.concat(y,"+ actual").concat(x," ").concat(v,"- expected").concat(x),C=" ".concat(g,"...").concat(x," Lines skipped");for(h=0;h1&&h>2&&(L>4?(i+=` -`.concat(g,"...").concat(x),s=!0):L>3&&(i+=` - `.concat(u[h-2]),M++),i+=` - `.concat(u[h-1]),M++),a=h,n+=` -`.concat(v,"-").concat(x," ").concat(u[h]),M++;else if(u.length1&&h>2&&(L>4?(i+=` -`.concat(g,"...").concat(x),s=!0):L>3&&(i+=` - `.concat(c[h-2]),M++),i+=` - `.concat(c[h-1]),M++),a=h,i+=` -`.concat(y,"+").concat(x," ").concat(c[h]),M++;else{var I=u[h],P=c[h],z=P!==I&&(!m(P,",")||P.slice(0,-1)!==I);z&&m(I,",")&&I.slice(0,-1)===P&&(z=!1,P+=","),z?(L>1&&h>2&&(L>4?(i+=` -`.concat(g,"...").concat(x),s=!0):L>3&&(i+=` - `.concat(c[h-2]),M++),i+=` - `.concat(c[h-1]),M++),a=h,i+=` -`.concat(y,"+").concat(x," ").concat(P),n+=` -`.concat(v,"-").concat(x," ").concat(I),M+=2):(i+=n,n="",(1===L||0===h)&&(i+=` - `.concat(P),M++))}if(M>20&&h30)for(d[26]="".concat(g,"...").concat(x);d.length>27;)d.pop();t=1===d.length?l.call(this,"".concat(h," ").concat(d[0])):l.call(this,"".concat(h,` - -`).concat(d.join(` -`),` -`))}else{var T=w(s),A="",M=b[n];"notDeepEqual"===n||"notEqual"===n?(T="".concat(b[n],` - -`).concat(T)).length>1024&&(T="".concat(T.slice(0,1021),"...")):(A="".concat(w(c)),T.length>512&&(T="".concat(T.slice(0,509),"...")),A.length>512&&(A="".concat(A.slice(0,509),"...")),"deepEqual"===n||"equal"===n?T="".concat(M,` - -`).concat(T,` - -should equal - -`):A=" ".concat(n," ").concat(A)),t=l.call(this,"".concat(T).concat(A))}return Error.stackTraceLimit=u,t.generatedMessage=!r,Object.defineProperty(o(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=s,t.expected=c,t.operator=n,Error.captureStackTrace&&Error.captureStackTrace(o(t),i),t.stack,t.name="AssertionError",a(t)}return s=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return d(this,n(n({},t),{},{customInspect:!1,depth:0}))}}],function(e,t){for(var r=0;r=0&&"[object Function]"===r.call(e.callee)),n}}}),cz=d({"node_modules/object-keys/implementation.js"(e,t){var r,n,i,a,o,s,l,c,u,h,f,d;Object.keys||(n=Object.prototype.hasOwnProperty,i=Object.prototype.toString,a=cP(),s=!(o=Object.prototype.propertyIsEnumerable).call({toString:null},"toString"),l=o.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},f=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!h["$"+e]&&n.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{u(window[e])}catch{return!0}}catch{return!0}return!1}(),d=function(e){if(typeof window>"u"||!f)return u(e);try{return u(e)}catch{return!1}},r=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),o=a(e),u=t&&"[object String]"===i.call(e),h=[];if(!t&&!r&&!o)throw TypeError("Object.keys called on a non-object");var f=l&&r;if(u&&e.length>0&&!n.call(e,0))for(var p=0;p0)for(var m=0;m2?arguments[2]:{},o=r(t);n&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;stypeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=0x100000000}function P(e){return Object.keys(e).filter(I).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function z(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i1?r-1:0),i=1;i0){var o=e;if(!((o=String(o)).length>100)){var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(s){var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*l;case"days":case"day":case"d":return 864e5*l;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*l;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*l;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*l;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:break}}}return}if("number"===a&&!1===isNaN(e)){return t.long?r(n=e,864e5,"day")||r(n,36e5,"hour")||r(n,6e4,"minute")||r(n,1e3,"second")||n+" ms":(i=e)>=864e5?Math.round(i/864e5)+"d":i>=36e5?Math.round(i/36e5)+"h":i>=6e4?Math.round(i/6e4)+"m":i>=1e3?Math.round(i/1e3)+"s":i+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}),cZ=d({"node_modules/stream-parser/node_modules/debug/src/debug.js"(e,t){var r;function n(t){function n(){if(n.enabled){var t=+new Date;n.diff=t-(r||t),n.prev=r,n.curr=t,r=t;for(var i=Array(arguments.length),a=0;atypeof S&&"env"in S&&(t=S.env.DEBUG),t}(e=t.exports=cZ()).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),r){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var i=0,a=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(i++,"%c"===e&&(a=i))}),t.splice(a,0,n)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch{}},e.load=r,e.useColors=function(){return"u">typeof window&&!!window.process&&"renderer"===window.process.type||"u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage="u">typeof chrome&&"u">typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(r())}}),cK=d({"node_modules/stream-parser/index.js"(e,t){var r=cY(),n=c$()("stream-parser");function i(e){n("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=-1,e._parserCallback=null,"function"==typeof e.push&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function a(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||i(this),n("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=0}function o(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||i(this),n("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=1}function s(e,t){r(!this._parserCallback,'There is already a "callback" set!'),r(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||i(this),n("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=2}function l(e,t,r){this._parserInit||i(this),n("write(%o bytes)",e.length),"function"==typeof t&&(r=t),h(this,e,null,r)}function c(e,t,r){this._parserInit||i(this),n("transform(%o bytes)",e.length),"function"!=typeof t&&(t=this._parserOutput),h(this,e,t,r)}function u(e,t,r,i){if(e._parserBytesLeft-=t.length,n("%o bytes left for stream piece",e._parserBytesLeft),0===e._parserState?(e._parserBuffers.push(t),e._parserBuffered+=t.length):2===e._parserState&&r(t),0!==e._parserBytesLeft)return i;var a=e._parserCallback;if(a&&0===e._parserState&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),0!==e._parserState&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=-1,e._parserBuffers.splice(0),a){var o=[];t&&o.push(t),r&&o.push(r);var s=a.length>o.length;s&&o.push(f(i));var l=a.apply(e,o);if(!s||i===l)return i}}t.exports=function(e){var t=e&&"function"==typeof e._transform,r=e&&"function"==typeof e._write;if(!t&&!r)throw Error("must pass a Writable or Transform stream in");n("extending Parser into stream"),e._bytes=a,e._skipBytes=o,t&&(e._passthrough=s),t?e._transform=c:e._write=l};var h=f(function e(t,r,n,i){return t._parserBytesLeft<=0?i(Error("got data but not currently parsing anything")):r.length<=t._parserBytesLeft?function(){return u(t,r,n,i)}:function(){var a=r.slice(0,t._parserBytesLeft);return u(t,a,n,function(o){return o?i(o):r.length>a.length?function(){return e(t,r.slice(a.length),n,i)}:void 0})}});function f(e){return function(){for(var t=e.apply(this,arguments);"function"==typeof t;)t=t();return t}}}}),cJ=d({"node_modules/probe-image-size/lib/common.js"(e){var t=cE().Transform,r=cK();function n(){t.call(this,{readableObjectMode:!0})}function i(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}n.prototype=Object.create(t.prototype),n.prototype.constructor=n,r(n.prototype),e.ParserStream=n,e.sliceEq=function(e,t,r){for(var n=t,i=0;i>4&15,i=15&e[4],o=e[5]>>4&15,s=r(e,6),l=8,c=0;ct.width||e.width===t.width&&e.height>t.height?e:t}),l=o.reduce(function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t}),s.width>l.height||s.width===l.height&&s.height>l.width?s:l),u=1;t.transforms.forEach(function(e){var t={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===e.type&&(0===e.value?u=r[u]:(u=t[u=r[u]],u=t[u])),"irot"===e.type)for(var n=0;n0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}},n.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?256*t[e]+t[e+1]:t[e]+256*t[e+1]},n.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?0x1000000*t[e]+65536*t[e+1]+256*t[e+2]+t[e+3]:t[e]+256*t[e+1]+65536*t[e+2]+0x1000000*t[e+3]},n.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},n.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},n.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return this.input[t];case 6:return(r=this.input[t])|(128&r)*0x1fffffe;case 3:return this.read_uint16(t);case 8:return(r=this.read_uint16(t))|(32768&r)*131070;case 4:return this.read_uint32(t);case 9:return 0|(r=this.read_uint32(t));default:return null}},n.prototype.scan_ifd=function(e,t,n){var i=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw r("unexpected EOF","EBADDATA");for(var d=[],p=h,m=0;m0&&(this.ifds_to_read.push({id:o,offset:d[0]}),f=!0),!1===n({is_big_endian:this.big_endian,ifd:e,tag:o,format:s,count:l,entry_offset:t+this.start,data_length:u,data_offset:h+this.start,value:d,is_subifd_link:f})){this.aborted=!0;return}t+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},t.exports.ExifParser=n,t.exports.get_orientation=function(e){var t=0;try{return new n(e,0,e.length).each(function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1}),t}catch{return -1}}}}),c1=d({"node_modules/probe-image-size/lib/parse_sync/avif.js"(e,t){var r=cJ().str2arr,n=cJ().sliceEq,i=cJ().readUInt32BE,a=cQ(),o=c0(),s=r("ftyp");t.exports=function(e){if(n(e,4,s)){var t=a.unbox(e,0);if(t){var r=a.getMimeType(t.data);if(r){for(var l,c=t.end;;){var u=a.unbox(e,c);if(!u)break;if(c=u.end,"mdat"===u.boxtype)return;if("meta"===u.boxtype){l=u.data;break}}if(l){var h=a.readSizeFromMeta(l);if(h){var f={width:h.width,height:h.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(f.variants=h.variants),h.orientation&&(f.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=e.length){var d=i(e,h.exif_location.offset),p=e.slice(h.exif_location.offset+d+4,h.exif_location.offset+h.exif_location.length),m=o.get_orientation(p);m>0&&(f.orientation=m)}return f}}}}}}}}),c2=d({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(e,t){var r=cJ().str2arr,n=cJ().sliceEq,i=cJ().readUInt16LE,a=r("BM");t.exports=function(e){if(!(e.length<26)&&n(e,0,a))return{width:i(e,18),height:i(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),c3=d({"node_modules/probe-image-size/lib/parse_sync/gif.js"(e,t){var r=cJ().str2arr,n=cJ().sliceEq,i=cJ().readUInt16LE,a=r("GIF87a"),o=r("GIF89a");t.exports=function(e){if(!(e.length<10)&&!(!n(e,0,a)&&!n(e,0,o)))return{width:i(e,6),height:i(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),c5=d({"node_modules/probe-image-size/lib/parse_sync/ico.js"(e,t){var r=cJ().readUInt16LE;t.exports=function(e){var t=r(e,0),n=r(e,2),i=r(e,4);if(!(0!==t||1!==n||!i)){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),c4=d({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(e,t){var r=cJ().readUInt16BE,n=cJ().str2arr,i=cJ().sliceEq,a=c0(),o=n("Exif\0\0");t.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var n,s,l=e[t++];255===l;)l=e[t++];if(208<=l&&l<=217||1===l)s=0;else{if(!(192<=l)||!(l<=254)||e.length-t<2)return;s=r(e,t)-2,t+=2}if(217===l||218===l)return;if(225===l&&s>=10&&i(e,t,o)&&(n=a.get_orientation(e.slice(t+6,t+s))),s>=5&&192<=l&&l<=207&&196!==l&&200!==l&&204!==l){if(e.length-t0&&(c.orientation=n),c}t+=s}}}}),c6=d({"node_modules/probe-image-size/lib/parse_sync/png.js"(e,t){var r=cJ().str2arr,n=cJ().sliceEq,i=cJ().readUInt32BE,a=r(`\x89PNG\r - -`),o=r("IHDR");t.exports=function(e){if(!(e.length<24)&&n(e,0,a)&&n(e,12,o))return{width:i(e,16),height:i(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),c8=d({"node_modules/probe-image-size/lib/parse_sync/psd.js"(e,t){var r=cJ().str2arr,n=cJ().sliceEq,i=cJ().readUInt32BE,a=r("8BPS\0\x01");t.exports=function(e){if(!(e.length<22)&&n(e,0,a))return{width:i(e,18),height:i(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),c9=d({"node_modules/probe-image-size/lib/parse_sync/svg.js"(e,t){function r(e){return"number"==typeof e&&isFinite(e)&&e>0}var n=/<[-_.:a-zA-Z0-9][^>]*>/,i=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,a=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,o=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,s=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,l=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function c(e){return l.test(e)?e.match(l)[0]:"px"}t.exports=function(e){if(function(e){var t,r=0,n=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(r=3);re.length)){for(;t+8=10?r=r||function(e,t){if(157===e[t+3]&&1===e[t+4]&&42===e[t+5])return{width:16383&i(e,t+6),height:16383&i(e,t+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}(e,t+8):"VP8L"===f&&d>=9?r=r||function(e,t){if(47===e[t]){var r=a(e,t+1);return{width:(16383&r)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}(e,t+8):"VP8X"===f&&d>=10?r=r||{width:(e[(h=t+8)+6]<<16|e[h+5]<<8|e[h+4])+1,height:(e[h+9]<0&&(r.orientation=c),r}}}}}),ut=d({"node_modules/probe-image-size/lib/parsers_sync.js"(e,t){t.exports={avif:c1(),bmp:c2(),gif:c3(),ico:c5(),jpeg:c4(),png:c6(),psd:c8(),svg:c9(),tiff:c7(),webp:ue()}}}),ur=d({"node_modules/probe-image-size/sync.js"(e,t){var r=ut();t.exports=function(e){for(var t=Object.keys(r),n=0;n0;)g=h.c2p(w+b*M),b--;for(b=0;void 0===v&&b0;)x=f.c2p(k+b*S),b--;gO[0];if(D||R){var j=m+E/2,F=v+C/2;P+="transform:"+i(j+"px",F+"px")+"scale("+(D?-1:1)+","+(R?-1:1)+")"+i(-j+"px",-F+"px")+";"}}I.attr("style",P);var B=new Promise(function(e){if(u._hasZ)e();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===T&&u._canvas.el.height===A&&u._canvas.source===u.source)e();else{var t=document.createElement("canvas");t.width=T,t.height=A;var r=t.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var n=u._image;n.onload=function(){r.drawImage(n,0,0),u._canvas={el:t,source:u.source},e()},n.setAttribute("src",u.source)}}).then(function(){var e;if(u._hasZ)e=L(function(e,t){var r=_[t][e];return n.isTypedArray(r)&&(r=Array.from(r)),r}).toDataURL("image/png");else if(u._hasSource)if(p)e=u.source;else{var t=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,T,A).data;e=L(function(e,r){var n=4*(r*T+e);return[t[n],t[n+1],t[n+2],t[n+3]]}).toDataURL("image/png")}I.attr({"xlink:href":e,height:C,width:E,x:m,y:v})});e._promises.push(B)})}}}),uo=d({"src/traces/image/style.js"(e,t){var r=b();t.exports=function(e){r.select(e).selectAll(".im image").style("opacity",function(e){return e[0].trace.opacity})}}}),us=d({"src/traces/image/hover.js"(e,t){var r=r7(),n=tY(),i=n.isArrayOrTypedArray,a=ll();t.exports=function(e,t,o){var s=e.cd[0],l=s.trace,c=e.xa,u=e.ya;if(!(r.inbox(t-s.x0,t-(s.x0+s.w*l.dx),0)>0||r.inbox(o-s.y0,o-(s.y0+s.h*l.dy),0)>0)){var h,f=Math.floor((t-s.x0)/l.dx),d=Math.floor(Math.abs(o-s.y0)/l.dy);if(l._hasZ?h=s.z[d][f]:l._hasSource&&(h=l._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(f,d,1,1).data),h){var p,m,g=s.hi||l.hoverinfo;if(g){var y=g.split("+");-1!==y.indexOf("all")&&(y=["color"]),-1!==y.indexOf("color")&&(m=!0)}var v=a.colormodel[l.colormodel],x=v.colormodel||l.colormodel,b=x.length,_=l._scaler(h),w=v.suffix,k=[];(l.hovertemplate||m)&&(k.push("["+[_[0]+w[0],_[1]+w[1],_[2]+w[2]].join(", ")),4===b&&k.push(", "+_[3]+w[3]),k.push("]"),k=k.join(""),e.extraText=x.toUpperCase()+": "+k),i(l.hovertext)&&i(l.hovertext[d])?p=l.hovertext[d][f]:i(l.text)&&i(l.text[d])&&(p=l.text[d][f]);var T=u.c2p(s.y0+(d+.5)*l.dy),A=s.x0+(f+.5)*l.dx,M=s.y0+(d+.5)*l.dy,S="["+h.slice(0,l.colormodel.length).join(", ")+"]";return[n.extendFlat(e,{index:[d,f],x0:c.c2p(s.x0+f*l.dx),x1:c.c2p(s.x0+(f+1)*l.dx),y0:T,y1:T,color:_,xVal:A,xLabelVal:A,yVal:M,yLabelVal:M,zLabelVal:S,text:p,hovertemplateLabels:{zLabel:S,colorLabel:k,"color[0]Label":_[0]+w[0],"color[1]Label":_[1]+w[1],"color[2]Label":_[2]+w[2],"color[3]Label":_[3]+w[3]}})]}}}}}),ul=d({"src/traces/image/event_data.js"(e,t){t.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||(e.z=t.color),e}}}),uc=d({"src/traces/image/index.js"(e,t){t.exports={attributes:(lx(),y(lc)).default,supplyDefaults:lb(),calc:ui(),plot:ua(),style:uo(),hoverPoints:us(),eventData:ul(),moduleType:"trace",name:"image",basePlotModule:iV(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),uu=d({"lib/image.js"(e,t){t.exports=uc()}}),uh=d({"src/traces/pie/attributes.js"(e,t){var r=W(),n=aC().attributes,i=V(),a=eE(),{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=th(),c=U().extendFlat,u=tc().pattern,h=i({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.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:a.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:u,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({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:l(),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:l({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},h,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},h,{}),outsidetextfont:c({},h,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:c({},r.showlegend,{arrayOk:!0}),legend:c({},r.legend,{arrayOk:!0}),legendrank:c({},r.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},h,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:n({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:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),uf=d({"src/traces/pie/defaults.js"(e,t){var r=A(),n=tY(),i=uh(),a=aC().defaults,o=aJ().handleText,s=tY().coercePattern;function l(e,t){var i=n.isArrayOrTypedArray(e),a=n.isArrayOrTypedArray(t),o=Math.min(i?e.length:1/0,a?t.length:1/0);if(isFinite(o)||(o=0),o&&a){for(var s,l=0;l0){s=!0;break}}s||(o=0)}return{hasLabels:i,hasValues:a,len:o}}function c(e,t,r,n,i){n("marker.line.width")&&n("marker.line.color",i?void 0:r.paper_bgcolor);var a=n("marker.colors");s(n,"marker.pattern",a),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}t.exports={handleLabelsAndValues:l,handleMarkerDefaults:c,supplyDefaults:function(e,t,r,s){function u(r,a){return n.coerce(e,t,i,r,a)}var h,f=l(u("labels"),u("values")),d=f.len;if(t._hasLabels=f.hasLabels,t._hasValues=f.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),!d){t.visible=!1;return}t._length=d,c(e,t,s,u,!0),u("scalegroup");var p=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(h=u("textinfo",n.isArrayOrTypedArray(p)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||h&&"none"!==h){var g=u("textposition");o(e,t,s,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&u("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&u("insidetextorientation")}else"none"===h&&u("textposition","none");a(t,s,u);var y=u("hole");if(u("title.text")){var v=u("title.position",y?"middle center":"top center");y||"middle center"!==v||(t.title.position="top center"),n.coerceFont(u,"title.font",s.font)}u("sort"),u("direction"),u("rotation"),u("pull")}}}}),ud=d({"src/traces/pie/layout_attributes.js"(e,t){t.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),up=d({"src/traces/pie/layout_defaults.js"(e,t){var r=tY(),n=ud();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("hiddenlabels"),i("piecolorway",t.colorway),i("extendpiecolors")}}}),um=d({"src/traces/pie/calc.js"(e,t){var r=A(),n=eC(),i={};function a(e){return function(t,r){if(!t||!n.isValid(t))return!1;let i=n.color(t).rgb().string();return e[r]||(e[r]=i),i}}function o(e,t){var r,i=JSON.stringify(e),a=t[i];if(!a){for(a=e.slice(),r=0;r=0}),("funnelarea"===t.type?y:t.sort)&&o.sort(function(e,t){return t.v-e.v}),o[0]&&(o[0].vTotal=g),o},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,s=n[r+"colorway"],l=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(s=o(s,i));for(var c=0,u=0;u"),name:h.hovertemplate||-1!==f.indexOf("name")?h.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:m.castOption(_.bgcolor,e.pts)||e.color,borderColor:m.castOption(_.bordercolor,e.pts),fontFamily:m.castOption(w.family,e.pts),fontSize:m.castOption(w.size,e.pts),fontColor:m.castOption(w.color,e.pts),nameLength:m.castOption(_.namelength,e.pts),textAlign:m.castOption(_.align,e.pts),hovertemplate:m.castOption(h.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[g(e,h)]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t,inOut_bbox:k}),e.bbox=k[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[g(e,h)],event:r.event})}}),e.on("mouseout",function(e){var n=t._fullLayout,a=t._fullData[c.index],o=r.select(this).datum();c._hasHoverEvent&&(e.originalEvent=r.event,t.emit("plotly_unhover",{points:[g(o,a)],event:r.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(i.loneUnhover(n._hoverlayer.node()),c._hasHoverLabel=!1)}),e.on("click",function(e){var n=t._fullLayout,a=t._fullData[c.index];t._dragging||!1===n.hovermode||(t._hoverdata=[g(e,a)],i.click(t,r.event))})}function x(e,t,r){var n=m.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=m.castOption(e._input.textfont.color,t.pts));var i=m.castOption(e.insidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||r.family,o=m.castOption(e.insidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||r.size,s=m.castOption(e.insidetextfont.weight,t.pts)||m.castOption(e.textfont.weight,t.pts)||r.weight,l=m.castOption(e.insidetextfont.style,t.pts)||m.castOption(e.textfont.style,t.pts)||r.style,c=m.castOption(e.insidetextfont.variant,t.pts)||m.castOption(e.textfont.variant,t.pts)||r.variant,u=m.castOption(e.insidetextfont.textcase,t.pts)||m.castOption(e.textfont.textcase,t.pts)||r.textcase,h=m.castOption(e.insidetextfont.lineposition,t.pts)||m.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=m.castOption(e.insidetextfont.shadow,t.pts)||m.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||a.contrast(t.color),family:i,size:o,weight:s,style:l,variant:c,textcase:u,lineposition:h,shadow:f}}function _(e,t){for(var r,n,i=0;il&&l>u||c=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(h||d){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.5),"rad")}}if(s||p||h){if((a={scale:i*n*2/Math.sqrt(e.width*e.width+e.height*e.height),rCenter:1-i,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,a.scale>=1)return a;m.push(a)}(p||d)&&((a=k(e,n,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a)),(p||f)&&((a=T(e,n,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a));for(var v=0,x=0,b=0;b=1)break}return m[v]}function k(e,t,r,n,i){t=Math.max(0,t-2*p);var a=e.width/e.height,o=S(a,n,t,r);return{scale:2*o/e.height,rCenter:A(a,o/t),rotate:M(i)}}function T(e,t,r,n,i){t=Math.max(0,t-2*p);var a=e.height/e.width,o=S(a,n,t,r);return{scale:2*o/e.width,rCenter:A(a,o/t),rotate:M(i+Math.PI/2)}}function A(e,t){return Math.cos(t)-e*t}function M(e){return(180/Math.PI*e+720)%180-90}function S(e,t,r,n){var i=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(i*i+.5)+i),n/(Math.sqrt(e*e+n/2)+e))}function E(e,t){var r=t.pxmid[0],n=t.pxmid[1],i=e.width/2,a=e.height/2;return r<0&&(i*=-1),n<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:i+Math.abs(a)*(i>0?1:-1)/2,y:a/(1+r*r/(n*n)),outside:!0}}function C(e,t){var r,n,i,a=1,o=1,s=e.trace,l={x:e.cx,y:e.cy},c={tx:0,ty:0};c.ty+=s.title.font.size,i=I(s),-1!==s.title.position.indexOf("top")?(l.y-=(1+i)*e.r,c.ty-=e.titleBox.height):-1!==s.title.position.indexOf("bottom")&&(l.y+=(1+i)*e.r);var u=(r=e.r,r/(void 0===(n=e.trace.aspectratio)?1:n)),h=t.w*(s.domain.x[1]-s.domain.x[0])/2;return -1!==s.title.position.indexOf("left")?(h+=u,l.x-=(1+i)*u,c.tx+=e.titleBox.width/2):-1!==s.title.position.indexOf("center")?h*=2:-1!==s.title.position.indexOf("right")&&(h+=u,l.x+=(1+i)*u,c.tx-=e.titleBox.width/2),a=h/e.titleBox.width,o=L(e,t)/e.titleBox.height,{x:l.x,y:l.y,scale:Math.min(a,o),tx:c.tx,ty:c.ty}}function L(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function I(e){var t,r=e.pull;if(!r)return 0;if(s.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function P(e,t){for(var r=[],n=0;n1?l=(s=r.r)/i.aspectratio:s=(l=r.r)*i.aspectratio,s*=(1+i.baseratio)/2,o=s*l),c=Math.min(c,o/r.vTotal));for(n=0;n")}if(a){var x=s.castOption(i,t.i,"texttemplate");if(x){var b={label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,n.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,n.separators),color:t.color,text:t.text,customdata:s.castOption(i,t.i,"customdata")},_=m.getFirstFilled(i.text,t.pts);(y(_)||""===_)&&(b.text=_),t.text=s.texttemplateString({data:[b,i._meta],fallback:i.texttemplatefallback,labels:b,locale:e._fullLayout._d3locale,template:x})}else t.text=""}}function D(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),i=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*n-o*i,e.textY=a*i+o*n,e.noCenter=!0}t.exports={plot:function(e,t){var i=e._context.staticPlot,h=e._fullLayout,p=h._size;d("pie",h),_(t,e),P(t,p);var g=s.makeTraceGroups(h._pielayer,t,"trace").each(function(t){var d=r.select(this),g=t[0],y=g.trace;(function(e){var t,r,n,i=e[0],a=i.r,o=i.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/i.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;ti.vTotal/2),r.halfangle=Math.PI*Math.min(r.v/i.vTotal,.5),r.ring=1-o.hole,r.rInscribed=r.v!==i.vTotal||i.trace.hole?Math.min(1/(1+1/Math.sin(r.halfangle)),r.ring/2):1)})(t),d.attr("stroke-linejoin","round"),d.each(function(){var b,_,k=r.select(this).selectAll("g.slice").data(t);k.enter().append("g").classed("slice",!0),k.exit().remove();var T=[[[],[]],[[],[]]],A=!1;k.each(function(n,a){if(n.hidden)return void r.select(this).selectAll("path,g").remove();n.pointNumber=n.i,n.curveNumber=y.index,T[n.pxmid[1]<0?0:1][n.pxmid[0]<0?0:1].push(n);var l=g.cx,c=g.cy,d=r.select(this),p=d.selectAll("path.surface").data([n]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":i?"none":"all"}),d.call(v,e,t),y.pull){var b=+m.castOption(y.pull,n.pts)||0;b>0&&(l+=b*n.pxmid[0],c+=b*n.pxmid[1])}function _(e,t,r,i){var a=i*(t[0]-e[0]),o=i*(t[1]-e[1]);return"a"+i*g.r+","+i*g.r+" 0 "+n.largeArc+(r?" 1 ":" 0 ")+a+","+o}n.cxFinal=l,n.cyFinal=c;var k=y.hole;if(n.v===g.vTotal){var M="M"+(l+n.px0[0])+","+(c+n.px0[1])+_(n.px0,n.pxmid,!0,1)+_(n.pxmid,n.px0,!0,1)+"Z";k?p.attr("d","M"+(l+k*n.px0[0])+","+(c+k*n.px0[1])+_(n.px0,n.pxmid,!1,k)+_(n.pxmid,n.px0,!1,k)+"Z"+M):p.attr("d",M)}else{var S=_(n.px0,n.px1,!0,1);if(k){var C=1-k;p.attr("d","M"+(l+k*n.px1[0])+","+(c+k*n.px1[1])+_(n.px1,n.px0,!1,k)+"l"+C*n.px0[0]+","+C*n.px0[1]+S+"Z")}else p.attr("d","M"+l+","+c+"l"+n.px0[0]+","+n.px0[1]+S+"Z")}O(e,n,g);var L=m.castOption(y.textposition,n.pts),I=d.selectAll("g.slicetext").data(n.text&&"none"!==L?[0]:[]);I.enter().append("g").classed("slicetext",!0),I.exit().remove(),I.each(function(){var i=s.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),d=s.ensureUniformFontSize(e,"outside"===L?(p=y,v=n,b=h.font,{color:m.castOption(p.outsidetextfont.color,v.pts)||m.castOption(p.textfont.color,v.pts)||b.color,family:m.castOption(p.outsidetextfont.family,v.pts)||m.castOption(p.textfont.family,v.pts)||b.family,size:m.castOption(p.outsidetextfont.size,v.pts)||m.castOption(p.textfont.size,v.pts)||b.size,weight:m.castOption(p.outsidetextfont.weight,v.pts)||m.castOption(p.textfont.weight,v.pts)||b.weight,style:m.castOption(p.outsidetextfont.style,v.pts)||m.castOption(p.textfont.style,v.pts)||b.style,variant:m.castOption(p.outsidetextfont.variant,v.pts)||m.castOption(p.textfont.variant,v.pts)||b.variant,textcase:m.castOption(p.outsidetextfont.textcase,v.pts)||m.castOption(p.textfont.textcase,v.pts)||b.textcase,lineposition:m.castOption(p.outsidetextfont.lineposition,v.pts)||m.castOption(p.textfont.lineposition,v.pts)||b.lineposition,shadow:m.castOption(p.outsidetextfont.shadow,v.pts)||m.castOption(p.textfont.shadow,v.pts)||b.shadow}):x(y,n,h.font));i.text(n.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,d).call(u.convertToTspans,e);var p,v,b,_,k=o.bBox(i.node());if("outside"===L)_=E(k,n);else if(_=w(k,n,g),"auto"===L&&_.scale<1){var T=s.ensureUniformFontSize(e,y.outsidetextfont);i.call(o.font,T),_=E(k=o.bBox(i.node()),n)}var M=_.textPosAngle,S=void 0===M?n.pxmid:z(g.r,M);if(_.targetX=l+S[0]*_.rCenter+(_.x||0),_.targetY=c+S[1]*_.rCenter+(_.y||0),D(_,k),_.outside){var C=_.targetY;n.yLabelMin=C-k.height/2,n.yLabelMid=C,n.yLabelMax=C+k.height/2,n.labelExtraX=0,n.labelExtraY=0,A=!0}_.fontSize=d.size,f(y.type,_,h),t[a].transform=_,s.setTransormAndDisplay(i,_)})});var M=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);if(M.enter().append("g").classed("titletext",!0),M.exit().remove(),M.each(function(){var t,n,i,a=s.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),h=y.title.text;y._meta&&(h=s.templateString(h,y._meta)),a.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,y.title.font).call(u.convertToTspans,e),i="middle center"===y.title.position?(n=Math.sqrt((t=g).titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height),{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/n,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}):C(g,p),a.attr("transform",c(i.x,i.y)+l(Math.min(1,i.scale))+c(i.tx,i.ty))}),A&&function(e,t){var r,n,i,a,o,l,c,u,h,f,d,p,g;function y(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}for(n=0;n<2;n++)for(i=n?y:v,o=n?Math.max:Math.min,c=n?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,l=r?1:-1,(u=e[n][r]).sort(i),f=(h=e[1-n][r]).concat(u),p=[],d=0;d0&&(e.labelExtraY=x),s.isArrayOrTypedArray(t.pull))for(u=0;u=(m.castOption(t.pull,h.pts)||0))&&((e.pxmid[1]-h.pxmid[1])*c>0?(x=h.cyFinal+o(h.px0[1],h.px1[1])-g-e.labelExtraY)*c>0&&(e.labelExtraY+=x):(y+e.labelExtraY-v)*c>0&&(i=3*l*Math.abs(u-f.indexOf(e)),(d=h.cxFinal+a(h.px0[0],h.px1[0])+i-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=d)))}(p[d],x)}}}(T,y),b=k,_=y,b.each(function(e){var t=r.select(this);if(!e.labelExtraX&&!e.labelExtraY)return void t.select("path.textline").remove();var n=t.select("g.slicetext text");e.transform.targetX+=e.labelExtraX,e.transform.targetY+=e.labelExtraY,s.setTransormAndDisplay(n,e.transform);var i=e.cxFinal+e.pxmid[0],o="M"+i+","+(e.cyFinal+e.pxmid[1]),l=(e.yLabelMax-e.yLabelMin)*(e.pxmid[0]<0?-1:1)/4;if(e.labelExtraX){var c=e.labelExtraX*e.pxmid[1]/e.pxmid[0],u=e.yLabelMid+e.labelExtraY-(e.cyFinal+e.pxmid[1]);Math.abs(c)>Math.abs(u)?o+="l"+u*e.pxmid[0]/e.pxmid[1]+","+u+"H"+(i+e.labelExtraX+l):o+="l"+e.labelExtraX+","+c+"v"+(u-c)+"h"+l}else o+="V"+(e.yLabelMid+e.labelExtraY)+"h"+l;s.ensureSingle(t,"path","textline").call(a.stroke,_.outsidetextfont.color).attr({"stroke-width":Math.min(2,_.outsidetextfont.size/8),d:o,fill:"none"})}),A&&y.automargin){var S=o.bBox(d.node()),L=y.domain,I=p.w*(L.x[1]-L.x[0]),P=p.h*(L.y[1]-L.y[0]),R=(.5*I-g.r)/p.w,j=(.5*P-g.r)/p.h;n.autoMargin(e,"pie."+y.uid+".automargin",{xl:L.x[0]-R,xr:L.x[1]+R,yb:L.y[0]-j,yt:L.y[1]+j,l:Math.max(g.cx-g.r-S.left,0),r:Math.max(S.right-(g.cx+g.r),0),b:Math.max(S.bottom-(g.cy+g.r),0),t:Math.max(g.cy-g.r-S.top,0),pad:5})}})});setTimeout(function(){g.selectAll("tspan").each(function(){var e=r.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))})},0)},formatSliceLabel:O,transformInsideText:w,determineInsideTextFont:x,positionTitleOutside:C,prerenderTitles:_,layoutAreas:P,attachFxHandlers:v,computeTransform:D}}}),uv=d({"src/traces/pie/style.js"(e,t){var r=b(),n=rJ(),i=a2().resizeText;t.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");i(e,t,"pie"),t.each(function(t){var i=t[0].trace,a=r.select(this);a.style({opacity:i.opacity}),a.selectAll("path.surface").each(function(t){r.select(this).call(n,t,i,e)})})}}}),ux=d({"src/traces/pie/base_plot.js"(e){var t=t7();e.name="pie",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),ub=d({"src/traces/pie/index.js"(e,t){t.exports={attributes:uh(),supplyDefaults:uf().supplyDefaults,supplyLayoutDefaults:up(),layoutAttributes:ud(),calc:um().calc,crossTraceCalc:um().crossTraceCalc,plot:uy().plot,style:uv(),styleOne:rJ(),moduleType:"trace",name:"pie",basePlotModule:ux(),categories:["pie-like","pie","showLegend"],meta:{}}}}),u_=d({"lib/pie.js"(e,t){t.exports=ub()}}),uw=d({"src/traces/sunburst/base_plot.js"(e){var t=t7();e.name="sunburst",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),uk=d({"src/traces/sunburst/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),uT=d({"src/traces/sunburst/attributes.js"(e,t){var r=W(),{hovertemplateAttrs:n,texttemplateAttrs:i,templatefallbackAttrs:a}=th(),o=rs(),s=aC().attributes,l=uh(),c=uk(),u=U().extendFlat,h=tc().pattern;t.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:u({colors:{valType:"data_array",editType:"calc"},line:{color:u({},l.marker.line.color,{dflt:null}),width:u({},l.marker.line.width,{dflt:1}),editType:"calc"},pattern:h,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:l.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:a({editType:"plot"}),hovertext:l.hovertext,hoverinfo:u({},r.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:n({},{keys:c.eventDataKeys}),hovertemplatefallback:a(),textfont:l.textfont,insidetextorientation:l.insidetextorientation,insidetextfont:l.insidetextfont,outsidetextfont:u({},l.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:l.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:s({name:"sunburst",trace:!0,editType:"calc"})}}}),uA=d({"src/traces/sunburst/layout_attributes.js"(e,t){t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),uM=d({"src/traces/sunburst/defaults.js"(e,t){var r=tY(),n=uT(),i=aC().defaults,a=aJ().handleText,o=uf().handleMarkerDefaults,s=rw(),l=s.hasColorscale,c=s.handleDefaults;t.exports=function(e,t,s,u){function h(i,a){return r.coerce(e,t,n,i,a)}var f=h("labels"),d=h("parents");if(!f||!f.length||!d||!d.length){t.visible=!1;return}var p=h("values");h(p&&p.length?"branchvalues":"count"),h("level"),h("maxdepth"),o(e,t,u,h);var m=t._hasColorscale=l(e,"marker","colors")||(e.marker||{}).coloraxis;m&&c(e,t,u,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",m?1:.7);var g=h("text");h("texttemplate"),h("texttemplatefallback"),t.texttemplate||h("textinfo",r.isArrayOrTypedArray(g)?"text+label":"label"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),a(e,t,u,h,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("insidetextorientation"),h("sort"),h("rotation"),h("root.color"),i(t,u,h),t._length=null}}}),uS=d({"src/traces/sunburst/layout_defaults.js"(e,t){var r=tY(),n=uA();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("sunburstcolorway",t.colorway),i("extendsunburstcolors")}}}),uE=d({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(e,t){var r;r=e,function(e){function t(e,t){return e.parent===t.parent?1:2}function r(e,t){return e+t.x}function n(e,t){return Math.max(e,t.y)}function i(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;--n>=0;)t+=r[n].value;else t=1;e.value=t}function a(e,t){var r,n,i,a,s,u=new c(e),h=+e.value&&(u.value=e.value),f=[u];for(null==t&&(t=o);r=f.pop();)if(h&&(r.value=+r.data.value),(i=t(r.data))&&(s=i.length))for(r.children=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(e){return e.children}function s(e){e.data=e.data.data}function l(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function c(e){this.data=e,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(i)},each:function(e){var t,r,n,i,a=this,o=[a];do for(t=o.reverse(),o=[];a=t.pop();)if(e(a),r=a.children)for(n=0,i=r.length;n=0;--r)i.push(t[r]);return this},sum:function(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,n=t.children,i=n&&n.length;--i>=0;)r+=n[i].value;t.value=r})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}(t,e),n=[t];t!==r;)n.push(t=t.parent);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each(function(t){e.push(t)}),e},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function h(e){for(var t,r,n=0,i=(e=function(e){for(var t,r,n=e.length;n;)r=Math.random()*n--|0,t=e[n],e[n]=e[r],e[r]=t;return e}(u.call(e))).length,a=[];n0&&r*r>n*n+i*i}function p(e,t){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=e.x-n*s-a*l,r.y=e.y-n*l+a*s):(n=(c+i-o)/(2*c),a=Math.sqrt(Math.max(0,i/c-n*n)),r.x=t.x+n*s-a*l,r.y=t.y+n*l+a*s)):(r.x=t.x+r.r,r.y=t.y)}function v(e,t){var r=e.r+t.r-1e-6,n=t.x-e.x,i=t.y-e.y;return r>0&&r*r>n*n+i*i}function x(e){var t=e._,r=e.next._,n=t.r+r.r,i=(t.x*r.r+r.x*t.r)/n,a=(t.y*r.r+r.y*t.r)/n;return i*i+a*a}function b(e){this._=e,this.next=null,this.previous=null}function _(e){var t,r,n,i,a,o,s,l,c,u,f;if(!(i=e.length))return 0;if((t=e[0]).x=0,t.y=0,!(i>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(i>2))return t.r+r.r;y(r,t,n=e[2]),t=new b(t),r=new b(r),n=new b(n),t.next=n.previous=r,r.next=t.previous=n,n.next=r.previous=t;e:for(s=3;sf&&(f=s),(d=Math.max(f/(g=u*u*m),g/h))>p){u-=s;break}p=d}y.push(o={value:u,dice:l1?t:1)},r}(N),q=function e(t){function r(e,r,n,i,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,c,u,h=-1,f=o.length,d=e.value;++h1?t:1)},r}(N);e.cluster=function(){var e=t,i=1,a=1,o=!1;function s(t){var s,l=0;t.eachAfter(function(t){var i=t.children;i?(t.x=i.reduce(r,0)/i.length,t.y=1+i.reduce(n,0)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)});var c=function(e){for(var t;t=e.children;)e=t[0];return e}(t),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(t),h=c.x-e(c,u)/2,f=u.x+e(u,c)/2;return t.eachAfter(o?function(e){e.x=(e.x-t.x)*i,e.y=(t.y-e.y)*a}:function(e){e.x=(e.x-h)/(f-h)*i,e.y=(1-(t.y?e.y/t.y:1))*a})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(o=!1,i=+e[0],a=+e[1],s):o?null:[i,a]},s.nodeSize=function(e){return arguments.length?(o=!0,i=+e[0],a=+e[1],s):o?[i,a]:null},s},e.hierarchy=a,e.pack=function(){var e=null,t=1,r=1,n=k;function i(i){return i.x=t/2,i.y=r/2,e?i.eachBefore(M(e)).eachAfter(S(n,.5)).eachBefore(E(1)):i.eachBefore(M(A)).eachAfter(S(k,1)).eachAfter(S(n,i.r/Math.min(t,r))).eachBefore(E(Math.min(t,r)/(2*i.r))),i}return i.radius=function(t){return arguments.length?(e=null==t?null:w(t),i):e},i.size=function(e){return arguments.length?(t=+e[0],r=+e[1],i):[t,r]},i.padding=function(e){return arguments.length?(n="function"==typeof e?e:T(+e),i):n},i},e.packEnclose=h,e.packSiblings=function(e){return _(e),e},e.partition=function(){var e=1,t=1,r=0,n=!1;function i(i){var a,o,s=i.height+1;return i.x0=i.y0=r,i.x1=e,i.y1=t/s,i.eachBefore((a=t,o=s,function(e){e.children&&L(e,e.x0,a*(e.depth+1)/o,e.x1,a*(e.depth+2)/o);var t=e.x0,n=e.y0,i=e.x1-r,s=e.y1-r;i0)throw Error("cycle");return a}return r.id=function(t){return arguments.length?(e=w(t),r):e},r.parentId=function(e){return arguments.length?(t=w(e),r):t},r},e.tree=function(){var e=D,t=1,r=1,n=null;function i(i){var l=function(e){for(var t,r,n,i,a,o=new F(e,0),s=[o];t=s.pop();)if(n=t._.children)for(t.children=Array(a=n.length),i=a-1;i>=0;--i)s.push(r=t.children[i]=new F(n[i],i)),r.parent=t;return(o.parent=new F(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(e){e.xu.x&&(u=e),e.depth>h.depth&&(h=e)});var f=c===u?1:e(c,u)/2,d=f-c.x,p=t/(u.x+f+d),m=r/(h.depth||1);i.eachBefore(function(e){e.x=(e.x+d)*p,e.y=e.depth*m})}return i}function a(t){var r=t.children,n=t.parent.children,i=t.i?n[t.i-1]:null;if(r){!function(e){for(var t,r=0,n=0,i=e.children,a=i.length;--a>=0;)t=i[a],t.z+=r,t.m+=r,r+=t.s+(n+=t.c)}(t);var a=(r[0].z+r[r.length-1].z)/2;i?(t.z=i.z+e(t._,i._),t.m=t.z-a):t.z=a}else i&&(t.z=i.z+e(t._,i._));t.parent.A=function(t,r,n){if(r){for(var i,a,o,s=t,l=t,c=r,u=s.parent.children[0],h=s.m,f=l.m,d=c.m,p=u.m;c=j(c),s=R(s),c&&s;)u=R(u),(l=j(l)).a=t,(o=c.z+d-s.z-h+e(c._,s._))>0&&(function(e,t,r){var n=r/(t.i-e.i);t.c-=n,t.s+=r,e.c+=n,t.z+=r,t.m+=r}((i=c,a=n,i.a.parent===t.parent?i.a:a),t,o),h+=o,f+=o),d+=c.m,h+=s.m,p+=u.m,f+=l.m;c&&!j(l)&&(l.t=c,l.m+=d-f),s&&!R(u)&&(u.t=s,u.m+=h-p,n=t)}return n}(t,i,t.parent.A||n[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return i.separation=function(t){return arguments.length?(e=t,i):e},i.size=function(e){return arguments.length?(n=!1,t=+e[0],r=+e[1],i):n?null:[t,r]},i.nodeSize=function(e){return arguments.length?(n=!0,t=+e[0],r=+e[1],i):n?[t,r]:null},i},e.treemap=function(){var e=V,t=!1,r=1,n=1,i=[0],a=k,o=k,s=k,l=k,c=k;function u(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(h),i=[0],t&&e.eachBefore(C),e}function h(t){var r=i[t.depth],n=t.x0+r,u=t.y0+r,h=t.x1-r,f=t.y1-r;h=r-1){var u=s[t];u.x0=i,u.y0=a,u.x1=o,u.y1=l;return}for(var h=c[t],f=n/2+h,d=t+1,p=r-1;d>>1;c[m]l-a){var v=(i*y+o*g)/n;e(t,d,g,i,a,v,l),e(d,r,y,v,a,o,l)}else{var x=(a*y+l*g)/n;e(t,d,g,i,a,o,x),e(d,r,y,i,x,o,l)}}(0,l,e.value,t,r,n,i)},e.treemapDice=L,e.treemapResquarify=q,e.treemapSlice=B,e.treemapSliceDice=function(e,t,r,n,i){(1&e.depth?B:L)(e,t,r,n,i)},e.treemapSquarify=V,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),uC=d({"src/traces/sunburst/calc.js"(e){var t=uE(),r=A(),n=tY(),i=rw().makeColorScaleFuncFromTrace,a=um().makePullColorFn,o=um().generateExtendedColors,s=rw().calc,l=M().ALMOST_EQUAL,c={},u={},h={};e.calc=function(e,o){var c,u,h,f=e._fullLayout,d=o.ids,p=n.isArrayOrTypedArray(d),m=o.labels,g=o.parents,y=o.values,v=n.isArrayOrTypedArray(y),x=[],b={},_={},w=function(e){return e||"number"==typeof e},k=function(e){return!v||r(y[e])&&y[e]>=0};p?(c=Math.min(d.length,g.length),u=function(e){return w(d[e])&&k(e)},h=function(e){return String(d[e])}):(c=Math.min(m.length,g.length),u=function(e){return w(m[e])&&k(e)},h=function(e){return String(m[e])}),v&&(c=Math.min(c,y.length));for(var T=0;T1){for(var E=n.randstr(),C=0;C>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?uN(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?uN(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=u7.exec(e))?new uq(t[1],t[2],t[3],1):(t=he.exec(e))?new uq(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=ht.exec(e))?uN(t[1],t[2],t[3],t[4]):(t=hr.exec(e))?uN(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=hn.exec(e))?u$(t[1],t[2]/100,t[3]/100,1):(t=hi.exec(e))?u$(t[1],t[2]/100,t[3]/100,t[4]):ha.hasOwnProperty(e)?uB(ha[e]):"transparent"===e?new uq(NaN,NaN,NaN,0):null}function uB(e){return new uq(e>>16&255,e>>8&255,255&e,1)}function uN(e,t,r,n){return n<=0&&(e=t=r=NaN),new uq(e,t,r,n)}function uU(e){return e instanceof uz||(e=uF(e)),e?new uq((e=e.rgb()).r,e.g,e.b,e.opacity):new uq}function uV(e,t,r,n){return 1==arguments.length?uU(e):new uq(e,t,r,n??1)}function uq(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function uH(){return`#${uZ(this.r)}${uZ(this.g)}${uZ(this.b)}`}function uG(){return`#${uZ(this.r)}${uZ(this.g)}${uZ(this.b)}${uZ((isNaN(this.opacity)?1:this.opacity)*255)}`}function uW(){let e=uY(this.opacity);return`${1===e?"rgb(":"rgba("}${uX(this.r)}, ${uX(this.g)}, ${uX(this.b)}${1===e?")":`, ${e})`}`}function uY(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function uX(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function uZ(e){return((e=uX(e))<16?"0":"")+e.toString(16)}function u$(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new uQ(e,t,r,n)}function uK(e){if(e instanceof uQ)return new uQ(e.h,e.s,e.l,e.opacity);if(e instanceof uz||(e=uF(e)),!e)return new uQ;if(e instanceof uQ)return e;var t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),a=Math.max(t,r,n),o=NaN,s=a-i,l=(a+i)/2;return s?(o=t===a?(r-n)/s+(r0&&l<1?0:o,new uQ(o,s,l,e.opacity)}function uJ(e,t,r,n){return 1==arguments.length?uK(e):new uQ(e,t,r,n??1)}function uQ(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function u0(e){return(e=(e||0)%360)<0?e+360:e}function u1(e){return Math.max(0,Math.min(1,e||0))}function u2(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var u3,u5,u4,u6,u8,u9,u7,he,ht,hr,hn,hi,ha,ho,hs,hl=f({"node_modules/d3-color/src/color.js"(){uP(),u5=1/(u3=.7),u4="\\s*([+-]?\\d+)\\s*",u6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",u8="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",u9=/^#([0-9a-f]{3,8})$/,u7=RegExp(`^rgb\\(${u4},${u4},${u4}\\)$`),he=RegExp(`^rgb\\(${u8},${u8},${u8}\\)$`),ht=RegExp(`^rgba\\(${u4},${u4},${u4},${u6}\\)$`),hr=RegExp(`^rgba\\(${u8},${u8},${u8},${u6}\\)$`),hn=RegExp(`^hsl\\(${u6},${u8},${u8}\\)$`),hi=RegExp(`^hsla\\(${u6},${u8},${u8},${u6}\\)$`),ha={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},uL(uz,uF,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:uO,formatHex:uO,formatHex8:uD,formatHsl:uR,formatRgb:uj,toString:uj}),uL(uq,uV,uI(uz,{brighter(e){return e=null==e?u5:Math.pow(u5,e),new uq(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?u3:Math.pow(u3,e),new uq(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new uq(uX(this.r),uX(this.g),uX(this.b),uY(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uH,formatHex:uH,formatHex8:uG,formatRgb:uW,toString:uW})),uL(uQ,uJ,uI(uz,{brighter(e){return e=null==e?u5:Math.pow(u5,e),new uQ(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?u3:Math.pow(u3,e),new uQ(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,i=2*r-n;return new uq(u2(e>=240?e-240:e+120,i,n),u2(e,i,n),u2(e<120?e+240:e-120,i,n),this.opacity)},clamp(){return new uQ(u0(this.h),u1(this.s),u1(this.l),uY(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=uY(this.opacity);return`${1===e?"hsl(":"hsla("}${u0(this.h)}, ${100*u1(this.s)}%, ${100*u1(this.l)}%${1===e?")":`, ${e})`}`}}))}}),hc=f({"node_modules/d3-color/src/math.js"(){ho=Math.PI/180,hs=180/Math.PI}});function hu(e){if(e instanceof hf)return new hf(e.l,e.a,e.b,e.opacity);if(e instanceof hv)return hx(e);e instanceof uq||(e=uU(e));var t,r,n=hg(e.r),i=hg(e.g),a=hg(e.b),o=hd((.2225045*n+.7168786*i+.0606169*a)/h_);return n===i&&i===a?t=r=o:(t=hd((.4360747*n+.3850649*i+.1430804*a)/hb),r=hd((.0139322*n+.0971045*i+.7141733*a)/hw)),new hf(116*o-16,500*(t-o),200*(o-r),e.opacity)}function hh(e,t,r,n){return 1==arguments.length?hu(e):new hf(e,t,r,n??1)}function hf(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function hd(e){return e>hM?Math.pow(e,.3333333333333333):e/hA+hk}function hp(e){return e>hT?e*e*e:hA*(e-hk)}function hm(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055)}function hg(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function hy(e,t,r,n){return 1==arguments.length?function(e){if(e instanceof hv)return new hv(e.h,e.c,e.l,e.opacity);if(e instanceof hf||(e=hu(e)),0===e.a&&0===e.b)return new hv(NaN,0=1?(r=1,t-1):Math.floor(r*t),i=e[n],a=e[n+1],o=n>0?e[n-1]:2*i-a,s=n()=>e}});function hG(e,t){return function(r){return e+r*t}}function hW(e,t){var r=t-e;return r?hG(e,r>180||r<-180?r-360*Math.round(r/360):r):hV(isNaN(e)?t:e)}function hY(e,t){var r=t-e;return r?hG(e,r):hV(isNaN(e)?t:e)}var hX=f({"node_modules/d3-interpolate/src/color.js"(){hH()}});function hZ(e){return function(t){var r,n,i=t.length,a=Array(i),o=Array(i),s=Array(i);for(r=0;rs&&(o=t.slice(s,o),c[l]?c[l]+=o:c[++l]=o),(i=i[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,u.push({i:l,x:h9(i,a)})),s=fi.lastIndex;return s180?l+=360:l-s>180&&(s+=360),f.push({i:h.push(i(h)+"rotate(",null,n)-2,x:h9(s,l)})):l&&h.push(i(h)+"rotate("+l+n),c=a.skewX,u=o.skewX,c!==u?f.push({i:h.push(i(h)+"skewX(",null,n)-2,x:h9(c,u)}):u&&h.push(i(h)+"skewX("+u+n),function(e,t,r,n,a,o){if(e!==r||t!==n){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:h9(e,r)},{i:s-2,x:h9(t,n)})}else(1!==r||1!==n)&&a.push(i(a)+"scale("+r+","+n+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,h,f),a=o=null,function(e){for(var t,r=-1,n=f.length;++rfo,interpolateArray:()=>h3,interpolateBasis:()=>hB,interpolateBasisClosed:()=>hU,interpolateCubehelix:()=>fN,interpolateCubehelixLong:()=>fU,interpolateDate:()=>h6,interpolateDiscrete:()=>fl,interpolateHcl:()=>fR,interpolateHclLong:()=>fj,interpolateHsl:()=>fL,interpolateHslLong:()=>fI,interpolateHue:()=>fu,interpolateLab:()=>fz,interpolateNumber:()=>h9,interpolateNumberArray:()=>h0,interpolateObject:()=>fe,interpolateRgb:()=>h$,interpolateRgbBasis:()=>hK,interpolateRgbBasisClosed:()=>hJ,interpolateRound:()=>ff,interpolateString:()=>fr,interpolateTransformCss:()=>fk,interpolateTransformSvg:()=>fT,interpolateZoom:()=>fS,piecewise:()=>fq,quantize:()=>fG});var fX=f({"node_modules/d3-interpolate/src/index.js"(){fs(),h4(),hN(),hq(),h8(),fc(),fh(),h7(),h2(),ft(),fd(),fa(),fA(),fE(),hQ(),fP(),fO(),fF(),fV(),fH(),fW()}}),fZ=d({"src/traces/sunburst/fill_one.js"(e,t){var r=rE(),n=eC();t.exports=function(e,t,i,a,o){var s=t.data.data,l=s.i,c=o||s.color;if(l>=0){t.i=s.i;var u=i.marker;u.pattern&&u.colors&&u.pattern.shape||(u.color=c,t.color=c),r.pointStyle(e,i,a,t)}else n.fill(e,c)}}}),f$=d({"src/traces/sunburst/style.js"(e,t){var r=b(),n=eC(),i=tY(),a=a2().resizeText,o=fZ();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=i.castOption(r,c,"marker.line.color")||n.defaultLine,h=i.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(n.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");a(e,t,"sunburst"),t.each(function(t){var n=r.select(this),i=t[0].trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(t){r.select(this).call(s,t,i,e)})})},styleOne:s}}}),fK=d({"src/traces/sunburst/helpers.js"(e){var t=tY(),r=eC(),n=rV(),i=r$();function a(e){return e.data.data.pid}e.findEntryWithLevel=function(t,r){var n;return r&&t.eachAfter(function(t){if(e.getPtId(t)===r)return n=t.copy()}),n||t},e.findEntryWithChild=function(t,r){var n;return t.eachAfter(function(t){for(var i=t.children||[],a=0;a0)},e.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},e.isHeader=function(t,r){return!(e.isLeaf(t)||t.depth===r._maxDepth-1)},e.getParent=function(t,r){return e.findEntryWithLevel(t,a(r))},e.listPath=function(t,r){var n=t.parent;if(!n)return[];var i=r?[n.data[r]]:[n];return e.listPath(n,r).concat(i)},e.getPath=function(t){return e.listPath(t,"label").join("/")+"/"},e.formatValue=i.formatPieValue,e.formatPercent=function(e,r){var n=t.formatPercent(e,0);return"0%"===n&&(n=i.formatPiePercent(e,r)),n}}}),fJ=d({"src/traces/sunburst/fx.js"(e,t){var r=b(),n=tv(),i=rA().appendArrayPointValue,a=r7(),o=tY(),s=tJ(),l=fK(),c=r$().formatPieValue;function u(e,t,r){for(var n=e.data.data,a={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},o=0;o"),name:A||I("name")?v.name:void 0,color:T("hoverlabel.bgcolor")||x.color,borderColor:T("hoverlabel.bordercolor"),fontFamily:T("hoverlabel.font.family"),fontSize:T("hoverlabel.font.size"),fontColor:T("hoverlabel.font.color"),fontWeight:T("hoverlabel.font.weight"),fontStyle:T("hoverlabel.font.style"),fontVariant:T("hoverlabel.font.variant"),nameLength:T("hoverlabel.namelength"),textAlign:T("hoverlabel.align"),hovertemplate:A,hovertemplateLabels:E,eventData:h};g&&(j.x0=P-n.rInscribed*n.rpx1,j.x1=P+n.rInscribed*n.rpx1,j.idealAlign=n.pxmid[0]<0?"left":"right"),y&&(j.x=P,j.idealAlign=P<0?"left":"right");var F=[];a.loneHover(j,{container:s._hoverlayer.node(),outerContainer:s._paper.node(),gd:i,inOut_bbox:F}),h[0].bbox=F[0],p._hasHoverLabel=!0}if(y){var B=e.select("path.surface");f.styleOne(B,n,v,i,{hovered:!0})}p._hasHoverEvent=!0,i.emit("plotly_hover",{points:h||[u(n,v,f.eventDataKeys)],event:r.event})}}),e.on("mouseout",function(t){var n=i._fullLayout,o=i._fullData[p.index],s=r.select(this).datum();if(p._hasHoverEvent&&(t.originalEvent=r.event,i.emit("plotly_unhover",{points:[u(s,o,f.eventDataKeys)],event:r.event}),p._hasHoverEvent=!1),p._hasHoverLabel&&(a.loneUnhover(n._hoverlayer.node()),p._hasHoverLabel=!1),y){var l=e.select("path.surface");f.styleOne(l,s,o,i,{hovered:!1})}}),e.on("click",function(e){var t=i._fullLayout,o=i._fullData[p.index],c=g&&(l.isHierarchyRoot(e)||l.isLeaf(e)),h=l.getPtId(e),d=l.isEntry(e)?l.findEntryWithChild(m,h):l.findEntryWithLevel(m,h),y=l.getPtId(d),v={points:[u(e,o,f.eventDataKeys)],event:r.event};c||(v.nextLevel=y);var x=s.triggerHandler(i,"plotly_"+p.type+"click",v);if(!1!==x&&t.hovermode&&(i._hoverdata=[u(e,o,f.eventDataKeys)],a.click(i,r.event)),!c&&!1!==x&&!i._dragging&&!i._transitioning){n.call("_storeDirectGUIEdit",o,t._tracePreGUI[o.uid],{level:o.level});var b={data:[{level:y}],traces:[p.index]},_={frame:{redraw:!1,duration:f.transitionTime},transition:{duration:f.transitionTime,easing:f.transitionEasing},mode:"immediate",fromcurrent:!0};a.loneUnhover(t._hoverlayer.node()),n.call("animate",i,b,_)}})}}}),fQ=d({"src/traces/sunburst/plot.js"(e){var t=b(),r=uE(),n=(fX(),y(fY)).interpolate,i=rE(),a=tY(),o=rr(),s=a2(),l=s.recordMinTextSize,c=s.clearMinTextSize,u=uy(),h=r$().getRotationAngle,f=u.computeTransform,d=u.transformInsideText,p=f$().styleOne,m=a5().resizeText,g=fJ(),v=uk(),x=fK();function _(s,c,u,m){var y,b=s._context.staticPlot,_=s._fullLayout,k=!_.uniformtext.mode&&x.hasTransition(m),T=t.select(u).selectAll("g.slice"),A=c[0],M=A.trace,S=A.hierarchy,E=x.findEntryWithLevel(S,M.level),C=x.getMaxDepth(M),L=_._size,I=M.domain,P=L.w*(I.x[1]-I.x[0]),z=L.h*(I.y[1]-I.y[0]),O=.5*Math.min(P,z),D=A.cx=L.l+L.w*(I.x[1]+I.x[0])/2,R=A.cy=L.t+L.h*(1-I.y[0])-z/2;if(!E)return T.remove();var j=null,F={};k&&T.each(function(e){F[x.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!j&&x.isEntry(e)&&(j=e)});var B=(y=E,r.partition().size([2*Math.PI,y.height+1])(y)).descendants(),N=E.height+1,U=0,V=C;A.hasMultipleRoots&&x.isHierarchyRoot(E)&&(B=B.slice(1),N-=1,U=1,V+=1),B=B.filter(function(e){return e.y1<=V});var q=h(M.rotation);q&&B.forEach(function(e){e.x0+=q,e.x1+=q});var H=Math.min(N,C),G=function(e){return(e-U)/H*O},W=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},Y=function(e){return a.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,D,R)},X=function(e){return D+w(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},Z=function(e){return R+w(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(T=T.data(B,x.getPtId)).enter().append("g").classed("slice",!0),k?T.exit().transition().each(function(){var e=t.select(this);e.select("path.surface").transition().attrTween("d",function(e){var t=function(e){var t,r=x.getPtId(e),i=F[r],a=F[x.getPtId(E)];if(a){var o=(e.x1>a.x1?2*Math.PI:0)+q;t=e.rpx1$?2*Math.PI:0)+q;t={x0:o,x1:o}}else t={rpx0:O,rpx1:O},a.extendFlat(t,Q(e));else t={rpx0:0,rpx1:0};else t={x0:q,x1:q};return n(t,i)}(e);return function(e){return Y(t(e))}}):m.attr("d",Y),h.call(g,E,s,c,{eventDataKeys:v.eventDataKeys,transitionTime:v.CLICK_TRANSITION_TIME,transitionEasing:v.CLICK_TRANSITION_EASING}).call(x.setSliceCursor,s,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:s._transitioning}),m.call(p,r,M,s);var y=a.ensureSingle(h,"g","slicetext"),w=a.ensureSingle(y,"text","",function(e){e.attr("data-notex",1)}),T=a.ensureUniformFontSize(s,x.determineTextFont(M,r,_.font));w.text(e.formatSliceLabel(r,E,M,c,_)).classed("slicetext",!0).attr("text-anchor","middle").call(i.font,T).call(o.convertToTspans,s);var S=i.bBox(w.node());r.transform=d(S,r,A),r.transform.targetX=X(r),r.transform.targetY=Z(r);var C=function(e,t){var r=e.transform;return f(r,t),r.fontSize=T.size,l(M.type,r,_),a.getTextTransform(r)};k?w.transition().attrTween("transform",function(e){var t=function(e){var t,r=F[x.getPtId(e)],i=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{textPosAngle:i.textPosAngle,scale:0,rotate:i.rotate,rCenter:i.rCenter,x:i.x,y:i.y}},j)if(e.parent)if($){var o=e.x1>$?2*Math.PI:0;t.x0=t.x1=o}else a.extendFlat(t,Q(e));else t.x0=t.x1=q;else t.x0=t.x1=q;var s=n(t.transform.textPosAngle,e.transform.textPosAngle),c=n(t.rpx1,e.rpx1),u=n(t.x0,e.x0),h=n(t.x1,e.x1),f=n(t.transform.scale,i.scale),d=n(t.transform.rotate,i.rotate),p=0===i.rCenter?3:0===t.transform.rCenter?1/3:1,m=n(t.transform.rCenter,i.rCenter);return function(e){var t=c(e),r=u(e),n=h(e),a=m(Math.pow(e,p)),o={pxmid:W(t,(r+n)/2),rpx1:t,transform:{textPosAngle:s(e),rCenter:a,x:i.x,y:i.y}};return l(M.type,i,_),{transform:{targetX:X(o),targetY:Z(o),scale:f(e),rotate:d(e),rCenter:a}}}}(e);return function(e){return C(t(e),S)}}):w.attr("transform",C(r,S))})}function w(e){var t,r;return t=e.rpx1,[t*Math.sin(r=e.transform.textPosAngle),-t*Math.cos(r)]}e.plot=function(e,r,n,i){var a,o,s=e._fullLayout,l=s._sunburstlayer,u=!n,h=!s.uniformtext.mode&&x.hasTransition(n);(c("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(r,function(e){return e[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),h)?(i&&(o=i()),t.transition().duration(n.duration).ease(n.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){l.selectAll("g.trace").each(function(t){_(e,t,this,n)})})):(a.each(function(t){_(e,t,this,n)}),s.uniformtext.mode&&m(e,s._sunburstlayer.selectAll(".trace"),"sunburst")),u&&a.exit().remove()},e.formatSliceLabel=function(e,t,r,n,i){var o=r.texttemplate,s=r.textinfo;if(!o&&(!s||"none"===s))return"";var l=i.separators,c=n[0],u=e.data.data,h=c.hierarchy,f=x.isHierarchyRoot(e),d=x.getParent(h,e),p=x.getValue(e);if(!o){var m,g=s.split("+"),y=function(e){return -1!==g.indexOf(e)},v=[];if(y("label")&&u.label&&v.push(u.label),u.hasOwnProperty("v")&&y("value")&&v.push(x.formatValue(u.v,l)),!f){y("current path")&&v.push(x.getPath(e.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(e){m=x.formatPercent(w,l),_&&(m+=" of "+e),v.push(m)};y("percent parent")&&!f&&(w=p/x.getValue(d),k("parent")),y("percent entry")&&(w=p/x.getValue(t),k("entry")),y("percent root")&&(w=p/x.getValue(h),k("root"))}}return y("text")&&(m=a.castOption(r,u.i,"text"),a.isValidTextValue(m)&&v.push(m)),v.join("
")}var T=a.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=x.formatValue(u.v,l)),A.currentPath=x.getPath(e.data),f||(A.percentParent=p/x.getValue(d),A.percentParentLabel=x.formatPercent(A.percentParent,l),A.parent=x.getPtLabel(d)),A.percentEntry=p/x.getValue(t),A.percentEntryLabel=x.formatPercent(A.percentEntry,l),A.entry=x.getPtLabel(t),A.percentRoot=p/x.getValue(h),A.percentRootLabel=x.formatPercent(A.percentRoot,l),A.root=x.getPtLabel(h),u.hasOwnProperty("color")&&(A.color=u.color);var M=a.castOption(r,u.i,"text");return(a.isValidTextValue(M)||""===M)&&(A.text=M),A.customdata=a.castOption(r,u.i,"customdata"),a.texttemplateString({data:[A,r._meta],fallback:r.texttemplatefallback,labels:A,locale:i._d3locale,template:T})}}}),f0=d({"src/traces/sunburst/index.js"(e,t){t.exports={moduleType:"trace",name:"sunburst",basePlotModule:uw(),categories:[],animatable:!0,attributes:uT(),layoutAttributes:uA(),supplyDefaults:uM(),supplyLayoutDefaults:uS(),calc:uC().calc,crossTraceCalc:uC().crossTraceCalc,plot:fQ().plot,style:f$().style,colorbar:iE(),meta:{}}}}),f1=d({"lib/sunburst.js"(e,t){t.exports=f0()}}),f2=d({"src/traces/treemap/base_plot.js"(e){var t=t7();e.name="treemap",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),f3=d({"src/traces/treemap/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),f5=d({"src/traces/treemap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=th(),a=rs(),o=aC().attributes,s=uh(),l=uT(),c=f3(),u=U().extendFlat,h=tc().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:u({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:l.marker.colors,pattern:h,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:l.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:n({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:i({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:c.eventDataKeys}),hovertemplatefallback:i(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}}}),f4=d({"src/traces/treemap/layout_attributes.js"(e,t){t.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),f6=d({"src/traces/treemap/defaults.js"(e,t){var r=tY(),n=f5(),i=eC(),a=aC().defaults,o=aJ().handleText,s=iw().TEXTPAD,l=uf().handleMarkerDefaults,c=rw(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,f){function d(i,a){return r.coerce(e,t,n,i,a)}var p=d("labels"),m=d("parents");if(!p||!p.length||!m||!m.length){t.visible=!1;return}var g=d("values");d(g&&g.length?"branchvalues":"count"),d("level"),d("maxdepth"),"squarify"===d("tiling.packing")&&d("tiling.squarifyratio"),d("tiling.flip"),d("tiling.pad");var y=d("text");d("texttemplate"),d("texttemplatefallback"),t.texttemplate||d("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback");var v=d("pathbar.visible");o(e,t,f,d,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("textposition");var x=-1!==t.textposition.indexOf("bottom");l(e,t,f,d),(t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis)?h(e,t,f,d,{prefix:"marker.",cLetter:"c"}):d("marker.depthfade",!(t.marker.colors||[]).length);var b=2*t.textfont.size;d("marker.pad.t",x?b/4:b),d("marker.pad.l",b/4),d("marker.pad.r",b/4),d("marker.pad.b",x?b:b/4),d("marker.cornerradius"),t._hovered={marker:{line:{width:2,color:i.contrast(f.paper_bgcolor)}}},v&&(d("pathbar.thickness",t.pathbar.textfont.size+2*s),d("pathbar.side"),d("pathbar.edgeshape")),d("sort"),d("root.color"),a(t,f,d),t._length=null}}}),f8=d({"src/traces/treemap/layout_defaults.js"(e,t){var r=tY(),n=f4();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("treemapcolorway",t.colorway),i("extendtreemapcolors")}}}),f9=d({"src/traces/treemap/calc.js"(e){var t=uC();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("treemap",e)}}}),f7=d({"src/traces/treemap/flip_tree.js"(e,t){t.exports=function e(t,r,n){n.swapXY&&(i=t.x0,t.x0=t.y0,t.y0=i,i=t.x1,t.x1=t.y1,t.y1=i),n.flipX&&(i=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-i),n.flipY&&(i=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-i);var i,a=t.children;if(a)for(var o=0;o0)for(var b=0;b").join(" ")||"";var p=n.ensureSingle(f,"g","slicetext"),k=n.ensureSingle(p,"text","",function(e){e.attr("data-notex",1)}),C=n.ensureUniformFontSize(e,c.determineTextFont(L,o,E.font,{onPathbar:!0}));k.text(o._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(i.font,C).call(a.convertToTspans,e),o.textBB=i.bBox(k.node()),o.transform=b(o,{fontSize:C.size,onPathbar:!0}),o.transform.fontSize=C.size,w?k.transition().attrTween("transform",function(e){var t=A(e,!0,M,[m,g]);return function(e){return _(t(e))}}):k.attr("transform",_(o))})}}}),dn=d({"src/traces/treemap/plot_one.js"(e,t){var r=b(),n=(fX(),y(fY)).interpolate,i=fK(),a=tY(),o=iw().TEXTPAD,s=a4().toMoveInsideBar,l=a2().recordMinTextSize,c=f3(),u=dr();function h(e){return i.isHierarchyRoot(e)?"":i.getPtId(e)}t.exports=function(e,t,f,d,p){var m=e._fullLayout,g=t[0],y=g.trace,v="icicle"===y.type,x=g.hierarchy,b=i.findEntryWithLevel(x,y.level),_=r.select(f),w=_.selectAll("g.pathbar"),k=_.selectAll("g.slice");if(!b){w.remove(),k.remove();return}var T=i.isHierarchyRoot(b),A=!m.uniformtext.mode&&i.hasTransition(d),M=i.getMaxDepth(y),S=m._size,E=y.domain,C=S.w*(E.x[1]-E.x[0]),L=S.h*(E.y[1]-E.y[0]),I=y.pathbar.thickness,P=y.marker.line.width+c.gapWithPathbar,z=y.pathbar.visible?y.pathbar.side.indexOf("bottom")>-1?L+P:-(I+P):0,O={x0:C,x1:C,y0:z,y1:z+I},D=function(e,t,r){var n=y.tiling.pad,i=function(e){return e-n<=t.x0},a=function(e){return e+n>=t.x1},o=function(e){return e-n<=t.y0},s=function(e){return e+n>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:i(e.x0-n)?0:a(e.x0-n)?r[0]:e.x0,x1:i(e.x1+n)?0:a(e.x1+n)?r[0]:e.x1,y0:o(e.y0-n)?0:s(e.y0-n)?r[1]:e.y0,y1:o(e.y1+n)?0:s(e.y1+n)?r[1]:e.y1}},R=null,j={},F={},B=null,N=function(e,t){return t?j[h(e)]:F[h(e)]},U=function(e,t,r,n){if(t)return j[h(x)]||O;var i=F[y.level]||r;return e.data.depth-b.data.depth=(n-=(v?Q:Q.r)-o)){var d,p=(r+n)/2;r=p,n=p}ei?i<(d=a-(v?Q:Q.b))&&d"===J?(l.x-=a,c.x-=a,u.x-=a,h.x-=a):"/"===J?(u.x-=a,h.x-=a,o.x-=a/2,s.x-=a/2):"\\"===J?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):"<"===J&&(o.x-=a,s.x-=a),K(l),K(h),K(o),K(c),K(u),K(s),"M"+(l.x+",")+l.y+"L"+(c.x+",")+c.y+"L"+(s.x+",")+s.y+"L"+(u.x+",")+u.y+"L"+(h.x+",")+h.y+"L"+(o.x+",")+o.y+"Z"},toMoveInsideSlice:ea,makeUpdateSliceInterpolator:el,makeUpdateTextInterpolator:ec,handleSlicesExit:eu,hasTransition:A,strTransform:eh}):w.remove()}}}),di=d({"src/traces/treemap/draw.js"(e,t){var r=b(),n=fK(),i=a2().clearMinTextSize,a=a5().resizeText,o=dn();t.exports=function(e,t,s,l,c){var u,h,f=c.type,d=c.drawDescendants,p=e._fullLayout,m=p["_"+f+"layer"],g=!s;(i(f,p),(u=m.selectAll("g.trace."+f).data(t,function(e){return e[0].trace.uid})).enter().append("g").classed("trace",!0).classed(f,!0),u.order(),!p.uniformtext.mode&&n.hasTransition(s))?(l&&(h=l()),r.transition().duration(s.duration).ease(s.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).each(function(){m.selectAll("g.trace").each(function(t){o(e,t,this,s,d)})})):(u.each(function(t){o(e,t,this,s,d)}),p.uniformtext.mode&&a(e,m.selectAll(".trace"),f)),g&&u.exit().remove()}}}),da=d({"src/traces/treemap/draw_descendants.js"(e,t){var r=b(),n=tY(),i=rE(),a=rr(),o=de(),s=dt().styleOne,l=f3(),c=fK(),u=fJ(),h=fQ().formatSliceLabel;t.exports=function(e,t,f,d,p){var m=p.width,g=p.height,y=p.viewX,v=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,k=p.handleSlicesExit,T=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M=p.prevEntry,S=e._context.staticPlot,E=e._fullLayout,C=t[0].trace,L=-1!==C.textposition.indexOf("left"),I=-1!==C.textposition.indexOf("right"),P=-1!==C.textposition.indexOf("bottom"),z=!P&&!C.marker.pad.t||P&&!C.marker.pad.b,O=o(f,[m,g],{packing:C.tiling.packing,squarifyratio:C.tiling.squarifyratio,flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1,pad:{inner:C.tiling.pad,top:C.marker.pad.t,left:C.marker.pad.l,right:C.marker.pad.r,bottom:C.marker.pad.b}}).descendants(),D=1/0,R=-1/0;O.forEach(function(e){var t=e.depth;t>=C._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(D=Math.min(D,t),R=Math.max(R,t))}),d=d.data(O,c.getPtId),C._maxVisibleLayers=isFinite(R)?R-D+1:0,d.enter().append("g").classed("slice",!0),k(d,!1,{},[m,g],x),d.order();var j=null;if(w&&M){var F=c.getPtId(M);d.each(function(e){null===j&&c.getPtId(e)===F&&(j={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})})}var B=function(){return j||{x0:0,x1:m,y0:0,y1:g}},N=d;return w&&(N=N.transition().each("end",function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(o){var d=c.isHeader(o,C);o._x0=y(o.x0),o._x1=y(o.x1),o._y0=v(o.y0),o._y1=v(o.y1),o._hoverX=y(o.x1-C.marker.pad.r),o._hoverY=v(P?o.y1-C.marker.pad.b/2:o.y0+C.marker.pad.t/2);var p=r.select(this),k=n.ensureSingle(p,"path","surface",function(e){e.style("pointer-events",S?"none":"all")});w?k.transition().attrTween("d",function(e){var t=T(e,!1,B(),[m,g]);return function(e){return x(t(e))}}):k.attr("d",x),p.call(u,f,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),k.call(s,o,C,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":d?o._text=z?"":c.getPtLabel(o)||"":o._text=h(o,f,C,t,E)||"";var M=n.ensureSingle(p,"g","slicetext"),O=n.ensureSingle(M,"text","",function(e){e.attr("data-notex",1)}),D=n.ensureUniformFontSize(e,c.determineTextFont(C,o,E.font)),R=o._text||" ",j=d&&-1===R.indexOf("
");O.text(R).classed("slicetext",!0).attr("text-anchor",I?"end":L||j?"start":"middle").call(i.font,D).call(a.convertToTspans,e),o.textBB=i.bBox(O.node()),o.transform=b(o,{fontSize:D.size,isHeader:d}),o.transform.fontSize=D.size,w?O.transition().attrTween("transform",function(e){var t=A(e,!1,B(),[m,g]);return function(e){return _(t(e))}}):O.attr("transform",_(o))}),j}}}),ds=d({"src/traces/treemap/plot.js"(e,t){var r=di(),n=da();t.exports=function(e,t,i,a){return r(e,t,i,a,{type:"treemap",drawDescendants:n})}}}),dl=d({"src/traces/treemap/index.js"(e,t){t.exports={moduleType:"trace",name:"treemap",basePlotModule:f2(),categories:[],animatable:!0,attributes:f5(),layoutAttributes:f4(),supplyDefaults:f6(),supplyLayoutDefaults:f8(),calc:f9().calc,crossTraceCalc:f9().crossTraceCalc,plot:ds(),style:dt().style,colorbar:iE(),meta:{}}}}),dc=d({"lib/treemap.js"(e,t){t.exports=dl()}}),du=d({"src/traces/icicle/base_plot.js"(e){var t=t7();e.name="icicle",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),dh=d({"src/traces/icicle/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=th(),a=rs(),o=aC().attributes,s=uh(),l=uT(),c=f5(),u=f3(),h=U().extendFlat,f=tc().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:c.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:h({colors:l.marker.colors,line:l.marker.line,pattern:f,editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),leaf:l.leaf,pathbar:c.pathbar,text:s.text,textinfo:l.textinfo,texttemplate:n({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),texttemplatefallback:i({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:u.eventDataKeys}),hovertemplatefallback:i(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c.outsidetextfont,textposition:c.textposition,sort:s.sort,root:l.root,domain:o({name:"icicle",trace:!0,editType:"calc"})}}}),df=d({"src/traces/icicle/layout_attributes.js"(e,t){t.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),dd=d({"src/traces/icicle/defaults.js"(e,t){var r=tY(),n=dh(),i=eC(),a=aC().defaults,o=aJ().handleText,s=iw().TEXTPAD,l=uf().handleMarkerDefaults,c=rw(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,f){function d(i,a){return r.coerce(e,t,n,i,a)}var p=d("labels"),m=d("parents");if(!p||!p.length||!m||!m.length){t.visible=!1;return}var g=d("values");d(g&&g.length?"branchvalues":"count"),d("level"),d("maxdepth"),d("tiling.orientation"),d("tiling.flip"),d("tiling.pad");var y=d("text");d("texttemplate"),d("texttemplatefallback"),t.texttemplate||d("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback");var v=d("pathbar.visible");o(e,t,f,d,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("textposition"),l(e,t,f,d);var x=t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis;x&&h(e,t,f,d,{prefix:"marker.",cLetter:"c"}),d("leaf.opacity",x?1:.7),t._hovered={marker:{line:{width:2,color:i.contrast(f.paper_bgcolor)}}},v&&(d("pathbar.thickness",t.pathbar.textfont.size+2*s),d("pathbar.side"),d("pathbar.edgeshape")),d("sort"),d("root.color"),a(t,f,d),t._length=null}}}),dp=d({"src/traces/icicle/layout_defaults.js"(e,t){var r=tY(),n=df();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("iciclecolorway",t.colorway),i("extendiciclecolors")}}}),dm=d({"src/traces/icicle/calc.js"(e){var t=uC();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("icicle",e)}}}),dg=d({"src/traces/icicle/partition.js"(e,t){var r=uE(),n=f7();t.exports=function(e,t,i){var a=i.flipX,o=i.flipY,s="h"===i.orientation,l=i.maxDepth,c=t[0],u=t[1];l&&(c=(e.height+1)*t[0]/Math.min(e.height+1,l),u=(e.height+1)*t[1]/Math.min(e.height+1,l));var h=r.partition().padding(i.pad.inner).size(s?[t[1],c]:[t[0],u])(e);return(s||a||o)&&n(h,t,{swapXY:s,flipX:a,flipY:o}),h}}}),dy=d({"src/traces/icicle/style.js"(e,t){var r=b(),n=eC(),i=tY(),a=a2().resizeText,o=fZ();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=i.castOption(r,c,"marker.line.color")||n.defaultLine,h=i.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(n.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");a(e,t,"icicle"),t.each(function(t){var n=r.select(this),i=t[0].trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(t){r.select(this).call(s,t,i,e)})})},styleOne:s}}}),dv=d({"src/traces/icicle/draw_descendants.js"(e,t){var r=b(),n=tY(),i=rE(),a=rr(),o=dg(),s=dy().styleOne,l=f3(),c=fK(),u=fJ(),h=fQ().formatSliceLabel;t.exports=function(e,t,f,d,p){var m=p.width,g=p.height,y=p.viewX,v=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,k=p.handleSlicesExit,T=p.makeUpdateSliceInterpolator,A=p.makeUpdateTextInterpolator,M=p.prevEntry,S=e._context.staticPlot,E=e._fullLayout,C=t[0].trace,L=-1!==C.textposition.indexOf("left"),I=-1!==C.textposition.indexOf("right"),P=-1!==C.textposition.indexOf("bottom"),z=o(f,[m,g],{flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1,orientation:C.tiling.orientation,pad:{inner:C.tiling.pad},maxDepth:C._maxDepth}).descendants(),O=1/0,D=-1/0;z.forEach(function(e){var t=e.depth;t>=C._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(O=Math.min(O,t),D=Math.max(D,t))}),d=d.data(z,c.getPtId),C._maxVisibleLayers=isFinite(D)?D-O+1:0,d.enter().append("g").classed("slice",!0),k(d,!1,{},[m,g],x),d.order();var R=null;if(w&&M){var j=c.getPtId(M);d.each(function(e){null===R&&c.getPtId(e)===j&&(R={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})})}var F=function(){return R||{x0:0,x1:m,y0:0,y1:g}},B=d;return w&&(B=B.transition().each("end",function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),B.each(function(o){o._x0=y(o.x0),o._x1=y(o.x1),o._y0=v(o.y0),o._y1=v(o.y1),o._hoverX=y(o.x1-C.tiling.pad),o._hoverY=v(P?o.y1-C.tiling.pad/2:o.y0+C.tiling.pad/2);var d=r.select(this),p=n.ensureSingle(d,"path","surface",function(e){e.style("pointer-events",S?"none":"all")});w?p.transition().attrTween("d",function(e){var t=T(e,!1,F(),[m,g],{orientation:C.tiling.orientation,flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1});return function(e){return x(t(e))}}):p.attr("d",x),d.call(u,f,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),p.call(s,o,C,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":o._text=h(o,f,C,t,E)||"";var k=n.ensureSingle(d,"g","slicetext"),M=n.ensureSingle(k,"text","",function(e){e.attr("data-notex",1)}),z=n.ensureUniformFontSize(e,c.determineTextFont(C,o,E.font));M.text(o._text||" ").classed("slicetext",!0).attr("text-anchor",I?"end":L?"start":"middle").call(i.font,z).call(a.convertToTspans,e),o.textBB=i.bBox(M.node()),o.transform=b(o,{fontSize:z.size}),o.transform.fontSize=z.size,w?M.transition().attrTween("transform",function(e){var t=A(e,!1,F(),[m,g]);return function(e){return _(t(e))}}):M.attr("transform",_(o))}),R}}}),dx=d({"src/traces/icicle/plot.js"(e,t){var r=di(),n=dv();t.exports=function(e,t,i,a){return r(e,t,i,a,{type:"icicle",drawDescendants:n})}}}),db=d({"src/traces/icicle/index.js"(e,t){t.exports={moduleType:"trace",name:"icicle",basePlotModule:du(),categories:[],animatable:!0,attributes:dh(),layoutAttributes:df(),supplyDefaults:dd(),supplyLayoutDefaults:dp(),calc:dm().calc,crossTraceCalc:dm().crossTraceCalc,plot:dx(),style:dy().style,colorbar:iE(),meta:{}}}}),d_=d({"lib/icicle.js"(e,t){t.exports=db()}}),dw=d({"src/traces/funnelarea/base_plot.js"(e){var t=t7();e.name="funnelarea",e.plot=function(r,n,i,a){t.plotBasePlot(e.name,r,n,i,a)},e.clean=function(r,n,i,a){t.cleanBasePlot(e.name,r,n,i,a)}}}),dk=d({"src/traces/funnelarea/attributes.js"(e,t){var r=uh(),n=W(),i=aC().attributes,{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=th(),l=U().extendFlat;t.exports={labels:r.labels,label0:r.label0,dlabel:r.dlabel,values:r.values,marker:{colors:r.marker.colors,line:{color:l({},r.marker.line.color,{dflt:null}),width:l({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:r.marker.pattern,editType:"calc"},text:r.text,hovertext:r.hovertext,scalegroup:l({},r.scalegroup,{}),textinfo:l({},r.textinfo,{flags:["label","text","value","percent"]}),texttemplate:o({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:s({editType:"plot"}),hoverinfo:l({},n.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:a({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:s(),textposition:l({},r.textposition,{values:["inside","none"],dflt:"inside"}),textfont:r.textfont,insidetextfont:r.insidetextfont,title:{text:r.title.text,font:r.title.font,position:l({},r.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"}}}}),dT=d({"src/traces/funnelarea/layout_attributes.js"(e,t){t.exports={hiddenlabels:ud().hiddenlabels,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),dA=d({"src/traces/funnelarea/defaults.js"(e,t){var r=tY(),n=dk(),i=aC().defaults,a=aJ().handleText,o=uf().handleLabelsAndValues,s=uf().handleMarkerDefaults;t.exports=function(e,t,l,c){function u(i,a){return r.coerce(e,t,n,i,a)}var h,f=o(u("labels"),u("values")),d=f.len;if(t._hasLabels=f.hasLabels,t._hasValues=f.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),!d){t.visible=!1;return}t._length=d,s(e,t,c,u),u("scalegroup");var p=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(h=u("textinfo",Array.isArray(p)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||h&&"none"!==h){var g=u("textposition");a(e,t,c,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===h&&u("textposition","none");i(t,c,u),u("title.text")&&(u("title.position"),r.coerceFont(u,"title.font",c.font)),u("aspectratio"),u("baseratio")}}}),dM=d({"src/traces/funnelarea/layout_defaults.js"(e,t){var r=tY(),n=dT();t.exports=function(e,t){function i(i,a){return r.coerce(e,t,n,i,a)}i("hiddenlabels"),i("funnelareacolorway",t.colorway),i("extendfunnelareacolors")}}}),dS=d({"src/traces/funnelarea/calc.js"(e,t){var r=um();t.exports={calc:function(e,t){return r.calc(e,t)},crossTraceCalc:function(e){r.crossTraceCalc(e,{type:"funnelarea"})}}}}),dE=d({"src/traces/funnelarea/plot.js"(e,t){var r=b(),n=rE(),i=tY(),a=i.strScale,o=i.strTranslate,s=rr(),l=a4().toMoveInsideBar,c=a2(),u=c.recordMinTextSize,h=c.clearMinTextSize,f=r$(),d=uy(),p=d.attachFxHandlers,m=d.determineInsideTextFont,g=d.layoutAreas,y=d.prerenderTitles,v=d.positionTitleOutside,x=d.formatSliceLabel;function _(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}t.exports=function(e,t){var c=e._context.staticPlot,d=e._fullLayout;h("funnelarea",d),y(t,e),g(t,d._size),i.makeTraceGroups(d._funnelarealayer,t,"trace").each(function(t){var h=r.select(this),g=t[0],y=g.trace;(function(e){if(e.length){var t,r,n=e[0],i=n.trace,a=i.aspectratio,o=i.baseratio;o>.999&&(o=.999);var s,l=Math.pow(o,2),c=n.vTotal,u=c*l/(1-l)/c,h=[];for(h.push(S()),t=e.length-1;t>-1;t--)if(!(r=e[t]).hidden){var f=r.v/c;u+=f,h.push(S())}var d=1/0,p=-1/0;for(t=0;t-1;t--)if(!(r=e[t]).hidden){var k,T,A=h[w+=1][0],M=h[w][1];r.TL=[-A,M],r.TR=[A,M],r.BL=b,r.BR=_,r.pxmid=(k=r.TR,T=r.BR,[.5*(k[0]+T[0]),.5*(k[1]+T[1])]),b=r.TL,_=r.TR}}function S(){var e,t={x:e=Math.sqrt(u),y:-e};return[t.x,t.y]}})(t),h.each(function(){var h=r.select(this).selectAll("g.slice").data(t);h.enter().append("g").classed("slice",!0),h.exit().remove(),h.each(function(a,o){if(a.hidden)return void r.select(this).selectAll("path,g").remove();a.pointNumber=a.i,a.curveNumber=y.index;var h=g.cx,v=g.cy,b=r.select(this),w=b.selectAll("path.surface").data([a]);w.enter().append("path").classed("surface",!0).style({"pointer-events":c?"none":"all"}),b.call(p,e,t);var k="M"+(h+a.TR[0])+","+(v+a.TR[1])+_(a.TR,a.BR)+_(a.BR,a.BL)+_(a.BL,a.TL)+"Z";w.attr("d",k),x(e,a,g);var T=f.castOption(y.textposition,a.pts),A=b.selectAll("g.slicetext").data(a.text&&"none"!==T?[0]:[]);A.enter().append("g").classed("slicetext",!0),A.exit().remove(),A.each(function(){var c=i.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),f=i.ensureUniformFontSize(e,m(y,a,d.font));c.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(n.font,f).call(s.convertToTspans,e);var p,g=n.bBox(c.node()),x=Math.min(a.BL[1],a.BR[1])+v,b=Math.max(a.TL[1],a.TR[1])+v;(p=l(Math.max(a.TL[0],a.BL[0])+h,Math.min(a.TR[0],a.BR[0])+h,x,b,g,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=f.size,u(y.type,p,d),t[o].transform=p,i.setTransormAndDisplay(c,p)})});var b=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);b.enter().append("g").classed("titletext",!0),b.exit().remove(),b.each(function(){var t=i.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),l=y.title.text;y._meta&&(l=i.templateString(l,y._meta)),t.text(l).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(n.font,y.title.font).call(s.convertToTspans,e);var c=v(g,d._size);t.attr("transform",o(c.x,c.y)+a(Math.min(1,c.scale))+o(c.tx,c.ty))})})})}}}),dC=d({"src/traces/funnelarea/style.js"(e,t){var r=b(),n=rJ(),i=a2().resizeText;t.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");i(e,t,"funnelarea"),t.each(function(t){var i=t[0].trace,a=r.select(this);a.style({opacity:i.opacity}),a.selectAll("path.surface").each(function(t){r.select(this).call(n,t,i,e)})})}}}),dL=d({"src/traces/funnelarea/index.js"(e,t){t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:dw(),categories:["pie-like","funnelarea","showLegend"],attributes:dk(),layoutAttributes:dT(),supplyDefaults:dA(),supplyLayoutDefaults:dM(),calc:dS().calc,crossTraceCalc:dS().crossTraceCalc,plot:dE(),style:dC(),styleOne:rJ(),meta:{}}}}),dI=d({"lib/funnelarea.js"(e,t){t.exports=dL()}}),dP=d({"stackgl_modules/index.js"(e,t){var r={1964:function(e,t,r){e.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot3d:r(4100),gl_scatter3d:r(8418),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(e,t,r){var n=r(7507),i=r(3778),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var n=e,i=t;if(("string"!=typeof i||""===i)&&(i="utf8"),!s.isEncoding(i))throw TypeError("Unknown encoding: "+i);var a=0|p(n,i),l=o(a),c=l.write(n,i);return c!==a&&(l=l.slice(0,c)),l}if(ArrayBuffer.isView(e)){var u=e;if(C(u,Uint8Array)){var m=new Uint8Array(u);return f(m.buffer,m.byteOffset,m.byteLength)}return h(u)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(C(e,SharedArrayBuffer)||e&&C(e.buffer,SharedArrayBuffer)))return f(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var g=e.valueOf&&e.valueOf();if(null!=g&&g!==e)return s.from(g,t,r);var y=function(e){if(s.isBuffer(e)){var t=0|d(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(y)return y;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|d(e))}function h(e){for(var t=e.length<0?0:0|d(e.length),r=o(t),n=0;n=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;for(var i=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return S(e).length;default:if(i)return n?-1:M(e).length;t=(""+t).toLowerCase(),i=!0}}function m(e,t,r){var i,a,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",a=t;a0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(a=r*=1)!=a&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return -1;r=e.length-1}else if(r<0)if(!i)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,n)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){var a,o=1,s=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var u=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var h=!0,f=0;f239?4:c>223?3:c>191?2:1;if(i+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:(192&(a=e[i+1]))==128&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[i+1],o=e[i+2],(192&a)==128&&(192&o)==128&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&(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}var f=n,d=f.length;if(d<=4096)return String.fromCharCode.apply(String,f);for(var p="",m=0;mr)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,n,i,a){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw RangeError("Index out of range")}function w(e,t,r,n,i,a){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function k(e,t,r,n,a){return t*=1,r>>>=0,a||w(e,t,r,4,34028234663852886e22,-34028234663852886e22),i.write(e,t,r,n,23,4),r+4}function T(e,t,r,n,a){return t*=1,r>>>=0,a||w(e,t,r,8,17976931348623157e292,-17976931348623157e292),i.write(e,t,r,n,52,8),r+8}t.hp=s,t.IS=50,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch{return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return c(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,n=t.length,i=0,a=Math.min(r,n);in.length?s.from(a).copy(n,i):Uint8Array.prototype.set.call(n,a,i);else if(s.isBuffer(a))a.copy(n,i);else throw TypeError('"list" argument must be an Array of Buffers');i+=a.length}return n},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,r,n,i){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,i>>>=0,this===e)return 0;for(var a=i-n,o=r-t,l=Math.min(a,o),c=this.slice(n,i),u=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var i,a,o,s,l,c,u,h,f=this.length-t;if((void 0===r||r>f)&&(r=f),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var d=!1;;)switch(n){case"hex":return function(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var a=t.length;n>a/2&&(n=a/2);for(var o=0;o>8,i.push(r%256),i.push(n);return i}(e,this.length-u),this,u,h);default:if(d)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),d=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,a=0;++a>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),128&this[e]?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),i.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),i.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,n){if(e*=1,t>>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var a=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!n){var i=Math.pow(2,8*r)-1;_(this,e,t,r,i,0)}var a=r-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,n){if(e*=1,t>>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>>=0,!n){var i=Math.pow(2,8*r-1);_(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return T(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return T(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,n){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i55295&&r<57344){if(!i){if(r>56319||o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=(i-55296<<10|r-56320)+65536}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function S(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(A,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function E(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function C(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var L=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var n=16*r,i=0;i<16;++i)t[n+i]=e[r]+e[i];return t}()},9216:function(e){e.exports=i,e.exports.isMobile=i,e.exports.default=i;let t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,n=/android|ipad|playbook|silk/i;function i(e){e||(e={});let i=e.ua;if(!i&&"u">typeof navigator&&(i=navigator.userAgent),i&&i.headers&&"string"==typeof i.headers["user-agent"]&&(i=i.headers["user-agent"]),"string"!=typeof i)return!1;let a=t.test(i)&&!r.test(i)||!!e.tablet&&n.test(i);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==i.indexOf("Macintosh")&&-1!==i.indexOf("Safari")&&(a=!0),a}},6296:function(e,t,r){e.exports=function(e){var t=(e=e||{}).eye||[0,0,1],r=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],c=e.mode||"turntable",u=n(),h=i(),f=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,t,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,t,r,s),f.setDistanceLimits(l[0],l[1]),f.lookAt(0,t,r,s),new o({turntable:u,orbit:h,matrix:f},c)};var n=r(7261),i=r(9977),a=r(1811);function o(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map(function(t){return e[t]}),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.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;s.flush=function(e){for(var t=this._controllerList,r=0;r"u"?r(1538):WeakMap,i=r(2762),a=r(8116),o=new n;e.exports=function(e){var t=o.get(e),r=t&&(t._triangleBuffer.handle||t._triangleBuffer.buffer);if(!r||!e.isBuffer(r)){var n=i(e,new Float32Array([-1,-1,-1,4,4,-1]));(t=a(e,[{buffer:n,type:e.FLOAT,size:2}]))._triangleBuffer=n,o.set(e,t)}t.bind(),e.drawArrays(e.TRIANGLES,0,3),t.unbind()}},1085:function(e,t,r){var n=r(1371);e.exports=function(e,t,r){t="number"==typeof t?t:1,r=r||": ";var i=e.split(/\r?\n/),a=String(i.length+t-1).length;return i.map(function(e,i){var o=i+t,s=String(o).length;return n(o,a-s)+r+e}).join(` -`)}},3952:function(e,t,r){e.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[0];for(var r=e[0].length,i=[e[0]],a=[0],o=1;o0?o-4:o;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===s&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===s&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,a=[],o=0,s=n-i;o>18&63]+r[i>>12&63]+r[i>>6&63]+r[63&i]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===i?a.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===i&&a.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),a.join("")};for(var r=[],n=[],i="u">typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n[45]=62,n[95]=63},3865:function(e,t,r){var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[1]).add(t[0].mul(e[1])),e[1].mul(t[1]))}},1318:function(e){e.exports=function(e,t){return e[0].mul(t[1]).cmp(t[0].mul(e[1]))}},8697:function(e,t,r){var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[1]),e[1].mul(t[0]))}},7842:function(e,t,r){var n=r(6330),i=r(1533),a=r(2651),o=r(6768),s=r(869),l=r(8697);e.exports=function e(t,r){if(n(t))return r?l(t,e(r)):[t[0].clone(),t[1].clone()];var c,u,h=0;if(i(t))c=t.clone();else if("string"==typeof t)c=o(t);else{if(0===t)return[a(0),a(1)];if(t===Math.floor(t))c=a(t);else{for(;t!==Math.floor(t);)t*=1157920892373162e62,h-=256;c=a(t)}}if(n(r))c.mul(r[1]),u=r[0].clone();else if(i(r))u=r.clone();else if("string"==typeof r)u=o(r);else if(r)if(r===Math.floor(r))u=a(r);else{for(;r!==Math.floor(r);)r*=1157920892373162e62,h+=256;u=a(r)}else u=a(1);return h>0?c=c.ushln(h):h<0&&(u=u.ushln(-h)),s(c,u)}},6330:function(e,t,r){var n=r(1533);e.exports=function(e){return Array.isArray(e)&&2===e.length&&n(e[0])&&n(e[1])}},5716:function(e,t,r){var n=r(6859);e.exports=function(e){return e.cmp(new n(0))}},1369:function(e,t,r){var n=r(5716);e.exports=function(e){var t=e.length,r=e.words,i=0;if(1===t)i=r[0];else if(2===t)i=r[0]+0x4000000*r[1];else for(var a=0;a20?52:r+32}},1533:function(e,t,r){r(6859),e.exports=function(e){return e&&"object"==typeof e&&!!e.words}},2651:function(e,t,r){var n=r(6859),i=r(2361);e.exports=function(e){var t=i.exponent(e);return t<52?new n(e):new n(e*Math.pow(2,52-t)).ushln(t-52)}},869:function(e,t,r){var n=r(2651),i=r(5716);e.exports=function(e,t){var r=i(e),a=i(t);if(0===r)return[n(0),n(1)];if(0===a)return[n(0),n(0)];a<0&&(e=e.neg(),t=t.neg());var o=e.gcd(t);return o.cmpn(1)?[e.div(o),t.div(o)]:[e,t]}},6768:function(e,t,r){var n=r(6859);e.exports=function(e){return new n(e)}},6504:function(e,t,r){var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[0]),e[1].mul(t[1]))}},7721:function(e,t,r){var n=r(5716);e.exports=function(e){return n(e[0])*n(e[1])}},5572:function(e,t,r){var n=r(869);e.exports=function(e,t){return n(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},946:function(e,t,r){var n=r(1369),i=r(4025);e.exports=function(e){var t=e[0],r=e[1];if(0===t.cmpn(0))return 0;var a=t.abs().divmod(r.abs()),o=n(a.div),s=a.mod,l=t.negative!==r.negative?-1:1;if(0===s.cmpn(0))return l*o;if(o){var c=i(o)+4,u=n(s.ushln(c).divRound(r));return l*(o+u*Math.pow(2,-c))}var h=r.bitLength()-s.bitLength()+53,u=n(s.ushln(h).divRound(r));return h<1023?l*u*Math.pow(2,-h):l*(u*=11125369292536007e-324)*Math.pow(2,1023-h)}},2478:function(e){function t(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,i=o-1):n=o+1}return a}function r(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,i=o-1):n=o+1}return a}function n(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,n=o+1):i=o-1}return a}function i(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,n=o+1):i=o-1}return a}function a(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?n=a+1:i=a-1}return -1}function o(e,t,r,n,i,a){return"function"==typeof r?a(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):a(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}e.exports={ge:function(e,r,n,i,a){return o(e,r,n,i,a,t)},gt:function(e,t,n,i,a){return o(e,t,n,i,a,r)},lt:function(e,t,r,i,a){return o(e,t,r,i,a,n)},le:function(e,t,r,n,a){return o(e,t,r,n,a,i)},eq:function(e,t,r,n,i){return o(e,t,r,n,i,a)}}},8828:function(e,t){function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),0xff00ff&e&&(t-=8),0xf0f0f0f&e&&(t-=4),0x33333333&e&&(t-=2),0x55555555&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=0x7fffffff,t.INT_MIN=-0x80000000,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},t.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},t.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},t.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},t.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},6859:function(e,t,r){!function(e,t){function n(e,t){if(!e)throw Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{c="u">typeof window&&"u">typeof window.Buffer?window.Buffer:r(7790).Buffer}catch{}function o(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var n=o(e,r);return r-1>=t&&(n|=o(e,r-1)<<4),n}function l(e,t,r,n){for(var i=0,a=Math.min(e.length,r),o=t;o=49?i+=s-49+10:s>=17?i+=s-17+10:i+=s}return i}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return 0>e.cmp(t)?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i=0;i-=3)o=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[a]|=o<>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(i=0,a=0;i>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var n=0;n=t;n-=2)i=s(e,t,n)<=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(a-=18,o+=1,this.words[o]|=i>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=0x3ffffff;i*=t)n++;n--,i=i/t|0;for(var a=e.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,u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,0x2000000,0x290d741,0x1000000,0x2e90edd,0x39aa400,0x267bf47,0x1000000,0x290d741,1e7,0x12959c3,0x222c000,0x3bd7765,7529536,0xadcea1,0x1000000,0x1704f61,0x206fc40,0x2cddcf9,64e6,4084101,5153632,6436343,7962624,9765625,0xb54ba0,0xdaf26b,0x1069c00,0x138f9ad,243e5,0x1b4d89f,0x2000000,0x25528a1,0x2b54a20,0x3216b93,0x39aa400];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],a=0|t.words[0],o=i*a,s=0x3ffffff&o,l=o/0x4000000|0;r.words[0]=s;for(var c=1;c>>26,h=0x3ffffff&l,f=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=f;d++){var p=c-d|0;u+=(o=(i=0|e.words[p])*(a=0|t.words[d])+h)/0x4000000|0,h=0x3ffffff&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(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,i=0,a=0,o=0;o>>24-i&0xffffff,(i+=2)>=26&&(i-=26,o--),r=0!==a||o!==this.length-1?u[6-l.length]+l+r:l+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],d=f[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=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 e=this.words[0];return 2===this.length?e+=0x4000000*this.words[1]:3===this.length&&1===this.words[2]?e+=0x10000000000000+0x4000000*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return n("u">typeof c),this.toArrayLike(c,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,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=new e(a),c=this.clone();if("le"===t){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),l[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i0&&(this.words[i]=~this.words[i]&0x3ffffff>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var t,r,n,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(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,n=this.iadd(e);return e.negative=1,n._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(t=this,r=e):(t=e,r=this);for(var a=0,o=0;o>26,this.words[o]=0x3ffffff&n;for(;0!==a&&o>26,this.words[o]=0x3ffffff&n;if(0===a&&o>>13,d=0|o[1],p=8191&d,m=d>>>13,g=0|o[2],y=8191&g,v=g>>>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,I=0|o[7],P=8191&I,z=I>>>13,O=0|o[8],D=8191&O,R=O>>>13,j=0|o[9],F=8191&j,B=j>>>13,N=0|s[0],U=8191&N,V=N>>>13,q=0|s[1],H=8191&q,G=q>>>13,W=0|s[2],Y=8191&W,X=W>>>13,Z=0|s[3],$=8191&Z,K=Z>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,et=0|s[5],er=8191&et,en=et>>>13,ei=0|s[6],ea=8191&ei,eo=ei>>>13,es=0|s[7],el=8191&es,ec=es>>>13,eu=0|s[8],eh=8191&eu,ef=eu>>>13,ed=0|s[9],ep=8191&ed,em=ed>>>13;r.negative=e.negative^t.negative,r.length=19,n=Math.imul(h,U),i=(i=Math.imul(h,V))+Math.imul(f,U)|0,a=Math.imul(f,V);var eg=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eg>>>26)|0,eg&=0x3ffffff,n=Math.imul(p,U),i=(i=Math.imul(p,V))+Math.imul(m,U)|0,a=Math.imul(m,V),n=n+Math.imul(h,H)|0,i=(i=i+Math.imul(h,G)|0)+Math.imul(f,H)|0,a=a+Math.imul(f,G)|0;var ey=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ey>>>26)|0,ey&=0x3ffffff,n=Math.imul(y,U),i=(i=Math.imul(y,V))+Math.imul(v,U)|0,a=Math.imul(v,V),n=n+Math.imul(p,H)|0,i=(i=i+Math.imul(p,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0,n=n+Math.imul(h,Y)|0,i=(i=i+Math.imul(h,X)|0)+Math.imul(f,Y)|0,a=a+Math.imul(f,X)|0;var ev=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ev>>>26)|0,ev&=0x3ffffff,n=Math.imul(b,U),i=(i=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),n=n+Math.imul(y,H)|0,i=(i=i+Math.imul(y,G)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,G)|0,n=n+Math.imul(p,Y)|0,i=(i=i+Math.imul(p,X)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,X)|0,n=n+Math.imul(h,$)|0,i=(i=i+Math.imul(h,K)|0)+Math.imul(f,$)|0,a=a+Math.imul(f,K)|0;var ex=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ex>>>26)|0,ex&=0x3ffffff,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(y,Y)|0,i=(i=i+Math.imul(y,X)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,X)|0,n=n+Math.imul(p,$)|0,i=(i=i+Math.imul(p,K)|0)+Math.imul(m,$)|0,a=a+Math.imul(m,K)|0,n=n+Math.imul(h,Q)|0,i=(i=i+Math.imul(h,ee)|0)+Math.imul(f,Q)|0,a=a+Math.imul(f,ee)|0;var eb=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eb>>>26)|0,eb&=0x3ffffff,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,Y)|0,i=(i=i+Math.imul(b,X)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,X)|0,n=n+Math.imul(y,$)|0,i=(i=i+Math.imul(y,K)|0)+Math.imul(v,$)|0,a=a+Math.imul(v,K)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,n=n+Math.imul(h,er)|0,i=(i=i+Math.imul(h,en)|0)+Math.imul(f,er)|0,a=a+Math.imul(f,en)|0;var e_=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(e_>>>26)|0,e_&=0x3ffffff,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,Y)|0,i=(i=i+Math.imul(k,X)|0)+Math.imul(T,Y)|0,a=a+Math.imul(T,X)|0,n=n+Math.imul(b,$)|0,i=(i=i+Math.imul(b,K)|0)+Math.imul(_,$)|0,a=a+Math.imul(_,K)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,ee)|0,n=n+Math.imul(p,er)|0,i=(i=i+Math.imul(p,en)|0)+Math.imul(m,er)|0,a=a+Math.imul(m,en)|0,n=n+Math.imul(h,ea)|0,i=(i=i+Math.imul(h,eo)|0)+Math.imul(f,ea)|0,a=a+Math.imul(f,eo)|0;var ew=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ew>>>26)|0,ew&=0x3ffffff,n=Math.imul(P,U),i=(i=Math.imul(P,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,Y)|0,i=(i=i+Math.imul(M,X)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,X)|0,n=n+Math.imul(k,$)|0,i=(i=i+Math.imul(k,K)|0)+Math.imul(T,$)|0,a=a+Math.imul(T,K)|0,n=n+Math.imul(b,Q)|0,i=(i=i+Math.imul(b,ee)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,ee)|0,n=n+Math.imul(y,er)|0,i=(i=i+Math.imul(y,en)|0)+Math.imul(v,er)|0,a=a+Math.imul(v,en)|0,n=n+Math.imul(p,ea)|0,i=(i=i+Math.imul(p,eo)|0)+Math.imul(m,ea)|0,a=a+Math.imul(m,eo)|0,n=n+Math.imul(h,el)|0,i=(i=i+Math.imul(h,ec)|0)+Math.imul(f,el)|0,a=a+Math.imul(f,ec)|0;var ek=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ek>>>26)|0,ek&=0x3ffffff,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(P,H)|0,i=(i=i+Math.imul(P,G)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,G)|0,n=n+Math.imul(C,Y)|0,i=(i=i+Math.imul(C,X)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,X)|0,n=n+Math.imul(M,$)|0,i=(i=i+Math.imul(M,K)|0)+Math.imul(S,$)|0,a=a+Math.imul(S,K)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(T,Q)|0,a=a+Math.imul(T,ee)|0,n=n+Math.imul(b,er)|0,i=(i=i+Math.imul(b,en)|0)+Math.imul(_,er)|0,a=a+Math.imul(_,en)|0,n=n+Math.imul(y,ea)|0,i=(i=i+Math.imul(y,eo)|0)+Math.imul(v,ea)|0,a=a+Math.imul(v,eo)|0,n=n+Math.imul(p,el)|0,i=(i=i+Math.imul(p,ec)|0)+Math.imul(m,el)|0,a=a+Math.imul(m,ec)|0,n=n+Math.imul(h,eh)|0,i=(i=i+Math.imul(h,ef)|0)+Math.imul(f,eh)|0,a=a+Math.imul(f,ef)|0;var eT=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eT>>>26)|0,eT&=0x3ffffff,n=Math.imul(F,U),i=(i=Math.imul(F,V))+Math.imul(B,U)|0,a=Math.imul(B,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(P,Y)|0,i=(i=i+Math.imul(P,X)|0)+Math.imul(z,Y)|0,a=a+Math.imul(z,X)|0,n=n+Math.imul(C,$)|0,i=(i=i+Math.imul(C,K)|0)+Math.imul(L,$)|0,a=a+Math.imul(L,K)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,n=n+Math.imul(k,er)|0,i=(i=i+Math.imul(k,en)|0)+Math.imul(T,er)|0,a=a+Math.imul(T,en)|0,n=n+Math.imul(b,ea)|0,i=(i=i+Math.imul(b,eo)|0)+Math.imul(_,ea)|0,a=a+Math.imul(_,eo)|0,n=n+Math.imul(y,el)|0,i=(i=i+Math.imul(y,ec)|0)+Math.imul(v,el)|0,a=a+Math.imul(v,ec)|0,n=n+Math.imul(p,eh)|0,i=(i=i+Math.imul(p,ef)|0)+Math.imul(m,eh)|0,a=a+Math.imul(m,ef)|0,n=n+Math.imul(h,ep)|0,i=(i=i+Math.imul(h,em)|0)+Math.imul(f,ep)|0,a=a+Math.imul(f,em)|0;var eA=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eA>>>26)|0,eA&=0x3ffffff,n=Math.imul(F,H),i=(i=Math.imul(F,G))+Math.imul(B,H)|0,a=Math.imul(B,G),n=n+Math.imul(D,Y)|0,i=(i=i+Math.imul(D,X)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,X)|0,n=n+Math.imul(P,$)|0,i=(i=i+Math.imul(P,K)|0)+Math.imul(z,$)|0,a=a+Math.imul(z,K)|0,n=n+Math.imul(C,Q)|0,i=(i=i+Math.imul(C,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,n=n+Math.imul(M,er)|0,i=(i=i+Math.imul(M,en)|0)+Math.imul(S,er)|0,a=a+Math.imul(S,en)|0,n=n+Math.imul(k,ea)|0,i=(i=i+Math.imul(k,eo)|0)+Math.imul(T,ea)|0,a=a+Math.imul(T,eo)|0,n=n+Math.imul(b,el)|0,i=(i=i+Math.imul(b,ec)|0)+Math.imul(_,el)|0,a=a+Math.imul(_,ec)|0,n=n+Math.imul(y,eh)|0,i=(i=i+Math.imul(y,ef)|0)+Math.imul(v,eh)|0,a=a+Math.imul(v,ef)|0,n=n+Math.imul(p,ep)|0,i=(i=i+Math.imul(p,em)|0)+Math.imul(m,ep)|0,a=a+Math.imul(m,em)|0;var eM=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eM>>>26)|0,eM&=0x3ffffff,n=Math.imul(F,Y),i=(i=Math.imul(F,X))+Math.imul(B,Y)|0,a=Math.imul(B,X),n=n+Math.imul(D,$)|0,i=(i=i+Math.imul(D,K)|0)+Math.imul(R,$)|0,a=a+Math.imul(R,K)|0,n=n+Math.imul(P,Q)|0,i=(i=i+Math.imul(P,ee)|0)+Math.imul(z,Q)|0,a=a+Math.imul(z,ee)|0,n=n+Math.imul(C,er)|0,i=(i=i+Math.imul(C,en)|0)+Math.imul(L,er)|0,a=a+Math.imul(L,en)|0,n=n+Math.imul(M,ea)|0,i=(i=i+Math.imul(M,eo)|0)+Math.imul(S,ea)|0,a=a+Math.imul(S,eo)|0,n=n+Math.imul(k,el)|0,i=(i=i+Math.imul(k,ec)|0)+Math.imul(T,el)|0,a=a+Math.imul(T,ec)|0,n=n+Math.imul(b,eh)|0,i=(i=i+Math.imul(b,ef)|0)+Math.imul(_,eh)|0,a=a+Math.imul(_,ef)|0,n=n+Math.imul(y,ep)|0,i=(i=i+Math.imul(y,em)|0)+Math.imul(v,ep)|0,a=a+Math.imul(v,em)|0;var eS=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eS>>>26)|0,eS&=0x3ffffff,n=Math.imul(F,$),i=(i=Math.imul(F,K))+Math.imul(B,$)|0,a=Math.imul(B,K),n=n+Math.imul(D,Q)|0,i=(i=i+Math.imul(D,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,n=n+Math.imul(P,er)|0,i=(i=i+Math.imul(P,en)|0)+Math.imul(z,er)|0,a=a+Math.imul(z,en)|0,n=n+Math.imul(C,ea)|0,i=(i=i+Math.imul(C,eo)|0)+Math.imul(L,ea)|0,a=a+Math.imul(L,eo)|0,n=n+Math.imul(M,el)|0,i=(i=i+Math.imul(M,ec)|0)+Math.imul(S,el)|0,a=a+Math.imul(S,ec)|0,n=n+Math.imul(k,eh)|0,i=(i=i+Math.imul(k,ef)|0)+Math.imul(T,eh)|0,a=a+Math.imul(T,ef)|0,n=n+Math.imul(b,ep)|0,i=(i=i+Math.imul(b,em)|0)+Math.imul(_,ep)|0,a=a+Math.imul(_,em)|0;var eE=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eE>>>26)|0,eE&=0x3ffffff,n=Math.imul(F,Q),i=(i=Math.imul(F,ee))+Math.imul(B,Q)|0,a=Math.imul(B,ee),n=n+Math.imul(D,er)|0,i=(i=i+Math.imul(D,en)|0)+Math.imul(R,er)|0,a=a+Math.imul(R,en)|0,n=n+Math.imul(P,ea)|0,i=(i=i+Math.imul(P,eo)|0)+Math.imul(z,ea)|0,a=a+Math.imul(z,eo)|0,n=n+Math.imul(C,el)|0,i=(i=i+Math.imul(C,ec)|0)+Math.imul(L,el)|0,a=a+Math.imul(L,ec)|0,n=n+Math.imul(M,eh)|0,i=(i=i+Math.imul(M,ef)|0)+Math.imul(S,eh)|0,a=a+Math.imul(S,ef)|0,n=n+Math.imul(k,ep)|0,i=(i=i+Math.imul(k,em)|0)+Math.imul(T,ep)|0,a=a+Math.imul(T,em)|0;var eC=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eC>>>26)|0,eC&=0x3ffffff,n=Math.imul(F,er),i=(i=Math.imul(F,en))+Math.imul(B,er)|0,a=Math.imul(B,en),n=n+Math.imul(D,ea)|0,i=(i=i+Math.imul(D,eo)|0)+Math.imul(R,ea)|0,a=a+Math.imul(R,eo)|0,n=n+Math.imul(P,el)|0,i=(i=i+Math.imul(P,ec)|0)+Math.imul(z,el)|0,a=a+Math.imul(z,ec)|0,n=n+Math.imul(C,eh)|0,i=(i=i+Math.imul(C,ef)|0)+Math.imul(L,eh)|0,a=a+Math.imul(L,ef)|0,n=n+Math.imul(M,ep)|0,i=(i=i+Math.imul(M,em)|0)+Math.imul(S,ep)|0,a=a+Math.imul(S,em)|0;var eL=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eL>>>26)|0,eL&=0x3ffffff,n=Math.imul(F,ea),i=(i=Math.imul(F,eo))+Math.imul(B,ea)|0,a=Math.imul(B,eo),n=n+Math.imul(D,el)|0,i=(i=i+Math.imul(D,ec)|0)+Math.imul(R,el)|0,a=a+Math.imul(R,ec)|0,n=n+Math.imul(P,eh)|0,i=(i=i+Math.imul(P,ef)|0)+Math.imul(z,eh)|0,a=a+Math.imul(z,ef)|0,n=n+Math.imul(C,ep)|0,i=(i=i+Math.imul(C,em)|0)+Math.imul(L,ep)|0,a=a+Math.imul(L,em)|0;var eI=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eI>>>26)|0,eI&=0x3ffffff,n=Math.imul(F,el),i=(i=Math.imul(F,ec))+Math.imul(B,el)|0,a=Math.imul(B,ec),n=n+Math.imul(D,eh)|0,i=(i=i+Math.imul(D,ef)|0)+Math.imul(R,eh)|0,a=a+Math.imul(R,ef)|0,n=n+Math.imul(P,ep)|0,i=(i=i+Math.imul(P,em)|0)+Math.imul(z,ep)|0,a=a+Math.imul(z,em)|0;var eP=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(eP>>>26)|0,eP&=0x3ffffff,n=Math.imul(F,eh),i=(i=Math.imul(F,ef))+Math.imul(B,eh)|0,a=Math.imul(B,ef),n=n+Math.imul(D,ep)|0,i=(i=i+Math.imul(D,em)|0)+Math.imul(R,ep)|0,a=a+Math.imul(R,em)|0;var ez=(c+n|0)+((8191&i)<<13)|0;c=(a+(i>>>13)|0)+(ez>>>26)|0,ez&=0x3ffffff,n=Math.imul(F,ep),i=(i=Math.imul(F,em))+Math.imul(B,ep)|0,a=Math.imul(B,em);var eO=(c+n|0)+((8191&i)<<13)|0;return c=(a+(i>>>13)|0)+(eO>>>26)|0,eO&=0x3ffffff,l[0]=eg,l[1]=ey,l[2]=ev,l[3]=ex,l[4]=eb,l[5]=e_,l[6]=ew,l[7]=ek,l[8]=eT,l[9]=eA,l[10]=eM,l[11]=eS,l[12]=eE,l[13]=eC,l[14]=eL,l[15]=eI,l[16]=eP,l[17]=ez,l[18]=eO,0!==c&&(l[19]=c,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=d),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?d(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,a=0;a>>26)|0)>>>26,o&=0x3ffffff}r.words[a]=s,n=o,o=i}return 0!==n?r.words[a]=n:r.length--,r.strip()}(this,e,t):m(this,e,t)},g.prototype.makeRBT=function(e){for(var t=Array(e),r=a.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,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*t;o>=26,t+=(i/0x4000000|0)+(a>>>26),this.words[r]=0x3ffffff&a}return 0!==t&&(this.words[r]=t,this.length++),this.length=0===e?1:this.length,this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r>>i}return t}(e);if(0===t.length)return new a(1);for(var r=this,n=0;n=0);var t,r=e%26,i=(e-r)/26,a=0x3ffffff>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t=0);var i=t?(t-t%26)/26:0,a=e%26,o=Math.min((e-a)/26,this.length),s=0x3ffffff^0x3ffffff>>>a<o)for(this.length-=o,l=0;l=0&&(0!==c||l>=i);l--){var u=0|this.words[l];this.words[l]=c<<26-a|u>>>a,c=u&s}return r&&0!==c&&(r.words[r.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return!(this.length<=r)&&!!(this.words[r]&1<=0);var t=e%26,r=(e-t)/26;return(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=0x3ffffff^0x3ffffff>>>t<=0x4000000;t++)this.words[t]-=0x4000000,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(n("number"==typeof e),n(e<0x4000000),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/0x4000000|0),this.words[i+r]=0x3ffffff&o}for(;i>26,this.words[i+r]=0x3ffffff&o;if(0===s)return this.strip();for(n(-1===s),s=0,i=0;i>26,this.words[i]=0x3ffffff&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,n=this.clone(),i=e,o=0|i.words[i.length-1];0!=(r=26-this._countBits(o))&&(i=i.ushln(r),n.iushln(r),o=0|i.words[i.length-1]);var s,l=n.length-i.length;if("mod"!==t){(s=new a(null)).length=l+1,s.words=Array(s.length);for(var c=0;c=0;h--){var f=(0|n.words[i.length+h])*0x4000000+(0|n.words[i.length+h-1]);for(f=Math.min(f/o|0,0x3ffffff),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"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},a.prototype.divmod=function(e,t,r){var i,o,s;return(n(!e.isZero()),this.isZero())?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(i=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:i,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(i=s.div.neg()),{div:i,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||0>this.cmp(e)?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),a=r.cmp(n);return a<0||1===i&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){n(e<=0x3ffffff);for(var t=0x4000000%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},a.prototype.idivn=function(e){n(e<=0x3ffffff);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+0x4000000*t;this.words[r]=i/e|0,t=i%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var f=0,d=1;!(t.words[0]&d)&&f<26;++f,d<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(i.isOdd()||o.isOdd())&&(i.iadd(u),o.isub(h)),i.iushrn(1),o.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(s),o.isub(l)):(r.isub(t),s.isub(i),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t,r=this,i=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var o=new a(1),s=new a(0),l=i.clone();r.cmpn(1)>0&&i.cmpn(1)>0;){for(var c=0,u=1;!(r.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,f=1;!(i.words[0]&f)&&h<26;++h,f<<=1);if(h>0)for(i.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(i)>=0?(r.isub(i),o.isub(s)):(i.isub(r),s.isub(o))}return 0>(t=0===r.cmpn(1)?o:s).cmpn(0)&&t.iadd(e),t},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var a=t;t=r,r=a}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(1&this.words[0])==0},a.prototype.isOdd=function(){return(1&this.words[0])==1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<>>26,s&=0x3ffffff,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(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=0x3ffffff,"Number is too big");var i=0|this.words[0];t=i===e?0:ie.length)return 1;if(this.length=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){ni&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return -1===this.cmpn(e)},a.prototype.lt=function(e){return -1===this.cmp(e)},a.prototype.lten=function(e){return 0>=this.cmpn(e)},a.prototype.lte=function(e){return 0>=this.cmp(e)},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new k(e)},a.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},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(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function T(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new a(null);return e.words=Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},i(x,v),x.prototype.split=function(e,t){for(var r=Math.min(e.length,9),n=0;n>>22,i=a}i>>>=22,e.words[n-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){var t;if(y[e])return y[e];if("k256"===e)t=new x;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else if("p25519"===e)t=new w;else throw Error("Unknown prime "+e);return y[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n((e.negative|t.negative)==0,"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,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(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=o;0!==d.cmp(s);){for(var m=d,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var h=c>>u&1;if(i!==r[0]&&(i=this.sqr(i)),0===h&&0===o){s=0;continue}o<<=1,o|=h,(4==++s||0===n&&0===u)&&(i=this.mul(i,r[o]),s=0,o=0)}l=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new T(e)},i(T,k),T.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},T.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},T.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),a=i;return i.cmp(this.m)>=0?a=i.isub(this.m):0>i.cmpn(0)&&(a=i.iadd(this.m)),a._forceRed(this)},T.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):0>i.cmpn(0)&&(o=i.iadd(this.m)),o._forceRed(this)},T.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6204:function(e){e.exports=function(e){var t,r,n,i=e.length,a=0;for(t=0;t>>1;if(!(u<=0)){var h,f=i.mallocDouble(2*u*l),d=i.mallocInt32(l);if((l=s(e,u,f,d))>0){if(1===u&&n)a.init(l),h=a.sweepComplete(u,r,0,l,f,d,0,l,f,d);else{var p=i.mallocDouble(2*u*c),m=i.mallocInt32(c);(c=s(t,u,p,m))>0&&(a.init(l+c),h=1===u?a.sweepBipartite(u,r,0,l,f,d,0,c,p,m):o(u,r,n,l,f,d,c,p,m),i.free(p),i.free(m))}i.free(f),i.free(d)}return h}}}function c(e,t){n.push([e,t])}},2455:function(e,t){function r(e){return e?function(e,t,r,n,i,a,o,s,l,c,u){return i-n>l-s?function(e,t,r,n,i,a,o,s,l,c,u){for(var h=2*e,f=n,d=h*n;fc-l?n?function(e,t,r,n,i,a,o,s,l,c,u){for(var h=2*e,f=n,d=h*n;f0;){var I=6*(C-=1),P=y[I],z=y[I+1],O=y[I+2],D=y[I+3],R=y[I+4],j=y[I+5],F=2*C,B=v[F],N=v[F+1],U=1&j,V=!!(16&j),q=u,H=b,G=w,W=k;if(U&&(q=w,H=k,G=u,W=b),!(2&j&&(O=d(e,P,z,O,q,H,N),z>=O))&&!(4&j&&(z=p(e,P,z,O,q,H,B))>=O)){var Y=O-z,X=R-D;if(V){if(e*Y*(Y+X)<4194304){if(void 0!==(E=l.scanComplete(e,P,t,z,O,q,H,D,R,G,W)))return E;continue}}else if(e*Math.min(Y,X)<128){if(void 0!==(E=o(e,P,t,U,z,O,q,H,D,R,G,W)))return E;continue}else if(e*Y*X<4194304){if(void 0!==(E=l.scanBipartite(e,P,t,U,z,O,q,H,D,R,G,W)))return E;continue}var Z=h(e,P,z,O,q,H,B,N);if(z=p0)&&!(p1>=hi)"),f=u("lo===p0"),d=u("lo>>1,u=2*e,h=c,f=a[u*c+t];sr&&i[h+t]>c;--u,h-=o){for(var f=h,d=h+o,p=0;p=y?(h=g,f=y):m>=x?(h=p,f=m):(h=v,f=x):y>=x?(h=g,f=y):x>=m?(h=p,f=m):(h=v,f=x);for(var b=u*(l-1),_=u*h,w=0;wh;++h,l+=s)if(i[l+t]===o)if(u===h)u+=1,c+=s;else{for(var f=0;s>f;++f){var d=i[l+f];i[l+f]=i[c],i[c++]=d}var p=a[h];a[h]=a[u],a[u++]=p}return u},"loh;++h,l+=s)if(i[l+t]f;++f){var d=i[l+f];i[l+f]=i[c],i[c++]=d}var p=a[h];a[h]=a[u],a[u++]=p}return u},"lo<=p0":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,f=r;n>f;++f,l+=s)if(i[l+h]<=o)if(u===f)u+=1,c+=s;else{for(var d=0;s>d;++d){var p=i[l+d];i[l+d]=i[c],i[c++]=p}var m=a[f];a[f]=a[u],a[u++]=m}return u},"hi<=p0":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,f=r;n>f;++f,l+=s)if(i[l+h]<=o)if(u===f)u+=1,c+=s;else{for(var d=0;s>d;++d){var p=i[l+d];i[l+d]=i[c],i[c++]=p}var m=a[f];a[f]=a[u],a[u++]=m}return u},"lof;++f,l+=s){var d=i[l+t],p=i[l+h];if(dm;++m){var g=i[l+m];i[l+m]=i[c],i[c++]=g}var y=a[f];a[f]=a[u],a[u++]=y}}return u},"lo<=p0&&p0<=hi":function(e,t,r,n,i,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,f=r;n>f;++f,l+=s){var d=i[l+t],p=i[l+h];if(d<=o&&o<=p)if(u===f)u+=1,c+=s;else{for(var m=0;s>m;++m){var g=i[l+m];i[l+m]=i[c],i[c++]=g}var y=a[f];a[f]=a[u],a[u++]=y}}return u},"!(lo>=p0)&&!(p1>=hi)":function(e,t,r,n,i,a,o,s){for(var l=2*e,c=l*r,u=c,h=r,f=e+t,d=r;n>d;++d,c+=l){var p=i[c+t],m=i[c+f];if(!(p>=o)&&!(s>=m))if(h===d)h+=1,u+=l;else{for(var g=0;l>g;++g){var y=i[c+g];i[c+g]=i[u],i[u++]=y}var v=a[d];a[d]=a[h],a[h++]=v}}return h}}},4192:function(e){function t(e,t,r){for(var n=2*(e+1),i=e+1;i<=t;++i){for(var a=r[n++],o=r[n++],s=i,l=n-2;s-- >e;){var c=r[l-2],u=r[l-1];if(cr[t+1])}function o(e,t,r,n){var i=n[e*=2];return i>1,p=d-u,m=d+u,g=h,y=p,v=d,x=m,b=f,_=s+1,w=l-1,k=0;a(g,y,c)&&(k=g,g=y,y=k),a(x,b,c)&&(k=x,x=b,b=k),a(g,v,c)&&(k=g,g=v,v=k),a(y,v,c)&&(k=y,y=v,v=k),a(g,x,c)&&(k=g,g=x,x=k),a(v,x,c)&&(k=v,v=x,x=k),a(y,b,c)&&(k=y,y=b,b=k),a(y,v,c)&&(k=y,y=v,v=k),a(x,b,c)&&(k=x,x=b,b=k);for(var T=c[2*y],A=c[2*y+1],M=c[2*x],S=c[2*x+1],E=2*g,C=2*v,L=2*b,I=2*h,P=2*d,z=2*f,O=0;O<2;++O){var D=c[E+O],R=c[C+O],j=c[L+O];c[I+O]=D,c[P+O]=R,c[z+O]=j}n(p,s,c),n(m,l,c);for(var F=_;F<=w;++F)if(o(F,T,A,c))F!==_&&r(F,_,c),++_;else if(!o(F,M,S,c))for(;;)if(o(w,M,S,c)){o(w,T,A,c)?(function(e,t,r,n){e*=2,t*=2,r*=2;var i=n[e],a=n[e+1];n[e]=n[t],n[e+1]=n[t+1],n[t]=n[r],n[t+1]=n[r+1],n[r]=i,n[r+1]=a}(F,_,w,c),++_):r(F,w,c),--w;break}else{if(--w>>1;a(f,M);for(var S=0,E=0,w=0;w=0x10000000)C=C-0x10000000|0,d(l,c,E--,C);else if(C>=0)d(o,s,S--,C);else if(C<=-0x10000000){C=-C-0x10000000|0;for(var L=0;L>>1;a(f,E);for(var C=0,L=0,I=0,T=0;T>1==f[2*T+3]>>1&&(z=2,T+=1),P<0){for(var O=-(P>>1)-1,D=0;D>1)-1;0===z?d(o,s,C--,O):1===z?d(l,c,L--,O):2===z&&d(u,h,I--,O)}}},scanBipartite:function(e,t,r,n,i,l,c,u,h,m,g,y){var v=0,x=2*e,b=t+e,_=1,w=1;n?w=0x10000000:_=0x10000000;for(var k=i;k>>1;a(f,S);for(var E=0,k=0;k=0x10000000?(L=!n,T-=0x10000000):(L=!!n,T-=1),L)p(o,s,E++,T);else{var I=y[T],P=x*T,z=g[P+t+1],O=g[P+t+1+e];e:for(var D=0;D>>1;a(f,_);for(var w=0,y=0;y<_;++y){var k=0|f[2*y+1];if(k<0){var v=-k;if(v>=0x10000000)o[w++]=v-0x10000000;else{var T=d[v-=1],A=m*v,M=h[A+t+1],S=h[A+t+1+e];e:for(var E=0;E=0;--E)if(o[E]===v){for(var P=E+1;Pn(e[i],e[a],e[o],e[s])&&r.push(i,a)}}r(2478),e.exports=function(e,t){for(var r=[],a=e.length,o=t.stars,s=0;sn(e[s],e[u],e[h],e[f])&&r.push(s,u)}}for(;r.length>0;){for(var u=r.pop(),s=r.pop(),h=-1,f=-1,l=o[s],p=1;p=0||(t.flip(s,u),i(e,t,r,h,s,f),i(e,t,r,s,f,h),i(e,t,r,f,u,h),i(e,t,r,u,h,f))}}},5023:function(e,t,r){var n,i=r(2478);function a(e,t,r,n,i,a,o){this.cells=e,this.neighbor=t,this.flags=n,this.constraint=r,this.active=i,this.next=a,this.boundary=o}function o(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}e.exports=function(e,t,r){var n=function(e,t){for(var r=e.cells(),n=r.length,i=0;i0||l.length>0;){for(;s.length>0;){var d=s.pop();if(c[d]!==-i){c[d]=i,u[d];for(var p=0;p<3;++p){var m=f[3*d+p];m>=0&&0===c[m]&&(h[3*d+p]?l.push(m):(s.push(m),c[m]=i))}}}var g=l;l=s,s=g,l.length=0,i=-i}var y=function(e,t,r){for(var n=0,i=0;im[0]&&h.push(new o(m,p,2,f),new o(p,m,1,f))}h.sort(s);for(var g=h[0].a[0]-(1+Math.abs(h[0].a[0]))*2220446049250313e-31,y=[new a([g,1],[g,0],-1,[],[],[],[])],v=[],f=0,x=h.length;f1&&i(r[f[d-2]],r[f[d-1]],a)>0;)e.push([f[d-1],f[d-2],o]),d-=1;f.length=d,f.push(o);for(var p=h.upperIds,d=p.length;d>1&&0>i(r[p[d-2]],r[p[d-1]],a);)e.push([p[d-2],p[d-1],o]),d-=1;p.length=d,p.push(o)}}(v,y,e,b.a,b.idx):2===_?function(e,t){var r=n.le(e,t,c),i=e[r],o=i.upperIds,s=o[o.length-1];i.upperIds=[s],e.splice(r+1,0,new a(t.a,t.b,t.idx,[s],o))}(y,b):function(e,t){var r=t.a;t.a=t.b,t.b=r;var i=n.eq(e,t,c),a=e[i];e[i-1].upperIds=a.upperIds,e.splice(i,1)}(y,b)}return v}},5542:function(e,t,r){var n=r(2478);function i(e,t){this.stars=e,this.edges=t}e.exports=function(e,t){for(var r=Array(e),n=0;n=0}}(),a.removeTriangle=function(e,t,r){var n=this.stars;o(n[e],t,r),o(n[t],r,e),o(n[r],e,t)},a.addTriangle=function(e,t,r){var n=this.stars;n[e].push(t,r),n[t].push(r,e),n[r].push(e,t)},a.opposite=function(e,t){for(var r=this.stars[t],n=1,i=r.length;n=0;--a){var x=n[a],b=t[u=x[0]],_=b[0],w=b[1],k=e[_],T=e[w];if(0>(k[0]-T[0]||k[1]-T[1])){var A=_;_=w,w=A}b[0]=_;var M,S=b[1]=x[1];for(i&&(M=b[2]);a>0&&n[a-1][0]===u;){var x=n[--a],E=x[1];i?t.push([S,E,M]):t.push([S,E]),S=E}i?t.push([S,w,M]):t.push([S,w])}return f}(e,v,k,A=_,x),y(v,S=p(e,M,T),x),S||k.length>0||A.length>0;)I=!0;if(r&&I){n.length=0,r.length=0;for(var C=0;Ct[2]))}function y(e,t,r){if(0!==e.length){if(t)for(var n=0;nd+1)throw Error(h+" map requires nshades to be at least size "+u.length);m=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"==typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=u.map(function(e){return Math.round(e.index*d)}),m[0]=Math.min(Math.max(m[0],0),1),m[1]=Math.min(Math.max(m[1],0),1);var t,r,l,c,u,h,f,d,p,m,g,y=u.map(function(e,t){var r=u[t].index,n=u[t].rgb.slice();return 4===n.length&&n[3]>=0&&n[3]<=1||(n[3]=m[0]+(m[1]-m[0])*r),n}),p=[];for(g=0;g0||l(e,t,a)?-1:1:0===s?c>0||l(e,t,r)?1:-1:i(c-s)}var h=n(e,t,r);return h>0?o>0&&n(e,t,a)>0?1:-1:h<0?o>0||n(e,t,a)>0?1:-1:n(e,t,a)>0||l(e,t,r)?1:-1};var n=r(3250),i=r(8572),a=r(9362),o=r(5382),s=r(8210);function l(e,t,r){var n=a(e[0],-t[0]),i=a(e[1],-t[1]),l=a(r[0],-t[0]),c=a(r[1],-t[1]),u=s(o(n,l),o(i,c));return u[u.length-1]>=0}},8572:function(e){e.exports=function(e){return e<0?-1:+(e>0)}},8507:function(e){e.exports=function(e,n){var i=e.length,a=e.length-n.length;if(a)return a;switch(i){case 0:return 0;case 1:return e[0]-n[0];case 2:return e[0]+e[1]-n[0]-n[1]||t(e[0],e[1])-t(n[0],n[1]);case 3:var o=e[0]+e[1],s=n[0]+n[1];if(a=o+e[2]-(s+n[2]))return a;var l=t(e[0],e[1]),c=t(n[0],n[1]);return t(l,e[2])-t(c,n[2])||t(l+e[2],o)-t(c+n[2],s);case 4:var u=e[0],h=e[1],f=e[2],d=e[3],p=n[0],m=n[1],g=n[2],y=n[3];return u+h+f+d-(p+m+g+y)||t(u,h,f,d)-t(p,m,g,y,p)||t(u+h,u+f,u+d,h+f,h+d,f+d)-t(p+m,p+g,p+y,m+g,m+y,g+y)||t(u+h+f,u+h+d,u+f+d,h+f+d)-t(p+m+g,p+m+y,p+g+y,m+g+y);default:for(var v=e.slice().sort(r),x=n.slice().sort(r),b=0;be[r][0]&&(r=n);return tr?[[r],[t]]:[[t]]}},4750:function(e,t,r){e.exports=function(e){var t=n(e),r=t.length;if(r<=2)return[];for(var i=Array(r),a=t[r-1],o=0;o=t[l]&&(s+=1);a[o]=s}}return e}(n(function(e,t){for(var r=e.length,n=Array(r),i=0;it.indexOf(i)&&(n[a++]=e[i]);return n}(e,r),!0),r)}};var n=r(8954),i=r(3952)},4769:function(e){e.exports=function(e,t,r,n,i,a){var o=i-1,s=i*i,l=o*o,c=(1+2*i)*l,u=i*l,h=s*(3-2*i),f=s*o;if(e.length){a||(a=Array(e.length));for(var d=e.length-1;d>=0;--d)a[d]=c*e[d]+u*t[d]+h*r[d]+f*n[d];return a}return c*e+u*t+h*r+f*n},e.exports.derivative=function(e,t,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(e.length){a||(a=Array(e.length));for(var u=e.length-1;u>=0;--u)a[u]=o*e[u]+s*t[u]+l*r[u]+c*n[u];return a}return o*e+s*t+l*r[u]+c*n}},7642:function(e,t,r){var n=r(8954),i=r(1682);function a(e,t){this.point=e,this.index=t}function o(e,t){for(var r=e.point,n=t.point,i=r.length,a=0;a=2)return!1;e[r]=n}return!0}):_.filter(function(e){for(var t=0;t<=s;++t){var r=y[e[t]];if(r<0)return!1;e[t]=r}return!0}),1&s)for(var u=0;u<_.length;++u){var b=_[u],f=b[0];b[0]=b[1],b[1]=f}return _}},2361:function(e){var t=!1;if("u">typeof Float64Array){var r=new Float64Array(1),n=new Uint32Array(r.buffer);(r[0]=1,t=!0,0x3ff00000===n[1])?(e.exports=function(e){return r[0]=e,[n[0],n[1]]},e.exports.pack=function(e,t){return n[0]=e,n[1]=t,r[0]},e.exports.lo=function(e){return r[0]=e,n[0]},e.exports.hi=function(e){return r[0]=e,n[1]}):0x3ff00000===n[0]?(e.exports=function(e){return r[0]=e,[n[1],n[0]]},e.exports.pack=function(e,t){return n[1]=e,n[0]=t,r[0]},e.exports.lo=function(e){return r[0]=e,n[1]},e.exports.hi=function(e){return r[0]=e,n[0]}):t=!1}if(!t){var i=new Buffer(8);e.exports=function(e){return i.writeDoubleLE(e,0,!0),[i.readUInt32LE(0,!0),i.readUInt32LE(4,!0)]},e.exports.pack=function(e,t){return i.writeUInt32LE(e,0,!0),i.writeUInt32LE(t,4,!0),i.readDoubleLE(0,!0)},e.exports.lo=function(e){return i.writeDoubleLE(e,0,!0),i.readUInt32LE(0,!0)},e.exports.hi=function(e){return i.writeDoubleLE(e,0,!0),i.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),n=e.exports.hi(t),i=1048575&n;return 0x7ff00000&n&&(i+=1048576),[r,i]},e.exports.denormalized=function(t){return!(0x7ff00000&e.exports.hi(t))}},1338:function(e){e.exports=function(e,t){switch(typeof t>"u"&&(t=0),typeof e){case"number":if(e>0){var r,n,i=0|e,a=t;for(r=Array(i),n=0;n=r-1)for(var f=l.length-1,p=e-t[r-1],d=0;d=r-1)for(var u=s.length-1,h=(t[r-1],0);h=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e0;--h)n.push(a(l[h-1],c[h-1],arguments[h])),i.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var f=r;f>0;--f){var d=a(c[f-1],u[f-1],arguments[f]);n.push(d),i.push((d-n[o++])*h)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),n.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||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=e-t,h=u>1e-6?1/u:0;this._time.push(e);for(var f=r;f>0;--f){var d=arguments[f];n.push(a(l[f-1],c[f-1],n[o++]+d)),i.push(d*h)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--h)n.push(a(l[h],c[h],n[o]+u*i[o])),i.push(0),o+=1}}},3840:function(e){function t(e,t,r,n,i,a){this._color=e,this.key=t,this.value=r,this.left=n,this.right=i,this._count=a}function r(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function n(e,r){return new t(e,r.key,r.value,r.left,r.right,r._count)}function i(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function a(e,t){this._compare=e,this.root=t}e.exports=function(e){return new a(e||u,null)};var o=a.prototype;function s(e,t){this.tree=e,this._stack=t}Object.defineProperty(o,"keys",{get:function(){var e=[];return this.forEach(function(t,r){e.push(t)}),e}}),Object.defineProperty(o,"values",{get:function(){var e=[];return this.forEach(function(t,r){e.push(r)}),e}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(e,r){for(var o=this._compare,s=this.root,l=[],c=[];s;){var u=o(e,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new t(0,e,r,null,null,1));for(var h=l.length-2;h>=0;--h){var s=l[h];c[h]<=0?l[h]=new t(s._color,s.key,s.value,l[h+1],s.right,s._count+1):l[h]=new t(s._color,s.key,s.value,s.left,l[h+1],s._count+1)}for(var h=l.length-1;h>1;--h){var f=l[h-1],s=l[h];if(1===f._color||1===s._color)break;var d=l[h-2];if(d.left===f)if(f.left===s){var p=d.right;if(p&&0===p._color)f._color=1,d.right=n(1,p),d._color=0,h-=1;else{if(d._color=0,d.left=f.right,f._color=1,f.right=d,l[h-2]=f,l[h-1]=s,i(d),i(f),h>=3){var m=l[h-3];m.left===d?m.left=f:m.right=f}break}}else{var p=d.right;if(p&&0===p._color)f._color=1,d.right=n(1,p),d._color=0,h-=1;else{if(f.right=s.left,d._color=0,d.left=s.right,s._color=1,s.left=f,s.right=d,l[h-2]=s,l[h-1]=f,i(d),i(f),i(s),h>=3){var m=l[h-3];m.left===d?m.left=s:m.right=s}break}}else if(f.right===s){var p=d.left;if(p&&0===p._color)f._color=1,d.left=n(1,p),d._color=0,h-=1;else{if(d._color=0,d.right=f.left,f._color=1,f.left=d,l[h-2]=f,l[h-1]=s,i(d),i(f),h>=3){var m=l[h-3];m.right===d?m.right=f:m.left=f}break}}else{var p=d.left;if(p&&0===p._color)f._color=1,d.left=n(1,p),d._color=0,h-=1;else{if(f.left=s.right,d._color=0,d.right=s.left,s._color=1,s.right=f,s.left=d,l[h-2]=s,l[h-1]=f,i(d),i(f),i(s),h>=3){var m=l[h-3];m.right===d?m.right=s:m.left=s}break}}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return function e(t,r){if(r.left){var n=e(t,r.left);if(n)return n}var n=t(r.key,r.value);return n||(r.right?e(t,r.right):void 0)}(e,this.root);case 2:return function e(t,r,n,i){if(0>=r(t,i.key)){if(i.left){var a=e(t,r,n,i.left);if(a)return a}var a=n(i.key,i.value);if(a)return a}if(i.right)return e(t,r,n,i.right)}(t,this._compare,e,this.root);case 3:return this._compare(t,r)>=0?void 0:function e(t,r,n,i,a){var o,s=n(t,a.key),l=n(r,a.key);return s<=0&&(a.left&&(o=e(t,r,n,i,a.left))||l>0&&(o=i(a.key,a.value)))?o:l>0&&a.right?e(t,r,n,i,a.right):void 0}(t,r,this._compare,e,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new s(this,e)}}),Object.defineProperty(o,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new s(this,e)}}),o.at=function(e){if(e<0)return new s(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e=t.right._count)break;t=t.right}else break}return new s(this,[])},o.ge=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a<=0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new s(this,n)},o.gt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a<0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new s(this,n)},o.lt=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a>0&&(i=n.length),r=a<=0?r.left:r.right}return n.length=i,new s(this,n)},o.le=function(e){for(var t=this._compare,r=this.root,n=[],i=0;r;){var a=t(e,r.key);n.push(r),a>=0&&(i=n.length),r=a<0?r.left:r.right}return n.length=i,new s(this,n)},o.find=function(e){for(var t=this._compare,r=this.root,n=[];r;){var i=t(e,r.key);if(n.push(r),0===i)return new s(this,n);r=i<=0?r.left:r.right}return new s(this,[])},o.remove=function(e){var t=this.find(e);return t?t.remove():this},o.get=function(e){for(var t=this._compare,r=this.root;r;){var n=t(e,r.key);if(0===n)return r.value;r=n<=0?r.left:r.right}};var l=s.prototype;function c(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function u(e,t){return et)}Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new s(this.tree,this._stack.slice())},l.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var o=Array(e.length),s=e[e.length-1];o[o.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=e.length-2;l>=0;--l){var s=e[l];s.left===e[l+1]?o[l]=new t(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count)}if((s=o[o.length-1]).left&&s.right){var u=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var h=o[u-1];o.push(new t(s._color,h.key,h.value,s.left,s.right,s._count)),o[u-1].key=s.key,o[u-1].value=s.value;for(var l=o.length-2;l>=u;--l)s=o[l],o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);o[u-1].left=o[u]}if(0===(s=o[o.length-1])._color){var f=o[o.length-2];f.left===s?f.left=null:f.right===s&&(f.right=null),o.pop();for(var l=0;l=0;--l){if(t=e[l],0===l){t._color=1;return}if((a=e[l-1]).left===t){if((o=a.right).right&&0===o.right._color){if(s=(o=a.right=r(o)).right=r(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,t._color=1,a._color=1,s._color=1,i(a),i(o),l>1){var c=e[l-2];c.left===a?c.left=o:c.right=o}e[l-1]=o;return}if(o.left&&0===o.left._color){if(s=(o=a.right=r(o)).left=r(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,t._color=1,i(a),i(o),i(s),l>1){var c=e[l-2];c.left===a?c.left=s:c.right=s}e[l-1]=s;return}if(1===o._color)if(0===a._color){a._color=1,a.right=n(0,o);return}else{a.right=n(0,o);continue}if(a.right=(o=r(o)).left,o.left=a,o._color=a._color,a._color=0,i(a),i(o),l>1){var c=e[l-2];c.left===a?c.left=o:c.right=o}e[l-1]=o,e[l]=a,l+11){var c=e[l-2];c.right===a?c.right=o:c.left=o}e[l-1]=o;return}if(o.right&&0===o.right._color){if(s=(o=a.left=r(o)).right=r(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,t._color=1,i(a),i(o),i(s),l>1){var c=e[l-2];c.right===a?c.right=s:c.left=s}e[l-1]=s;return}if(1===o._color)if(0===a._color){a._color=1,a.left=n(0,o);return}else{a.left=n(0,o);continue}if(a.left=(o=r(o)).right,o.right=a,o._color=a._color,a._color=0,i(a),i(o),l>1){var c=e[l-2];c.right===a?c.right=o:c.left=o}e[l-1]=o,e[l]=a,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var n=t.length-2;n>=0;--n)t[n+1]===t[n].right&&(++e,t[n].left&&(e+=t[n].left._count));return e},enumerable:!0}),l.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),l.update=function(e){var r=this._stack;if(0===r.length)throw Error("Can't update empty node!");var n=Array(r.length),i=r[r.length-1];n[n.length-1]=new t(i._color,i.key,e,i.left,i.right,i._count);for(var o=r.length-2;o>=0;--o)(i=r[o]).left===r[o+1]?n[o]=new t(i._color,i.key,i.value,n[o+1],i.right,i._count):n[o]=new t(i._color,i.key,i.value,i.left,n[o+1],i._count);return new a(this.tree._compare,n[0])},l.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},3837:function(e,t,r){e.exports=function(e,t){var r=new d(e);return r.update(t),r};var n=r(4935),i=r(501),a=r(5304),o=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=ArrayBuffer,u=DataView;function h(e){return Array.isArray(e)||c.isView(e)&&!(e instanceof u)}function f(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function d(e){this.gl=e,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(e)}var p=d.prototype;function m(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}p.update=function(e){function t(t,r,n){if(n in e){var i,a=e[n],o=this[n];(t?h(a)&&h(a[0]):h(a))?this[n]=i=[r(a[0]),r(a[1]),r(a[2])]:this[n]=i=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(i[s]!==o[s])return!0}return!1}e=e||{};var r,a=t.bind(this,!1,Number),o=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,function(e){if(h(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]}),u=!1,f=!1;if("bounds"in e)for(var d=e.bounds,p=0;p<2;++p)for(var m=0;m<3;++m)d[p][m]!==this.bounds[p][m]&&(f=!0),this.bounds[p][m]=d[p][m];if("ticks"in e){r=e.ticks,u=!0,this.autoTicks=!1;for(var p=0;p<3;++p)this.tickSpacing[p]=0}else a("tickSpacing")&&(this.autoTicks=!0,f=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),f=!0,u=!0,this._firstInit=!1),f&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(var p=0;p<3;++p)r[p].sort(function(e,t){return e.x-t.x});s.equal(r,this.ticks)?u=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(u=!0),l("tickFontStyle")&&(u=!0),l("tickFontWeight")&&(u=!0),l("tickFontVariant")&&(u=!0),a("tickSize"),a("tickAngle"),a("tickPad"),c("tickColor");var g=l("labels");l("labelFont")&&(g=!0),l("labelFontStyle")&&(g=!0),l("labelFontWeight")&&(g=!0),l("labelFontVariant")&&(g=!0),o("labelEnable"),a("labelSize"),a("labelPad"),c("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),c("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),c("lineTickColor"),o("gridEnable"),a("gridWidth"),c("gridColor"),o("zeroEnable"),c("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),c("backgroundColor");var y=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],v=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(g||u)&&this._text.update(this.bounds,this.labels,y,this.ticks,v):this._text=n(this.gl,this.bounds,this.labels,y,this.ticks,v),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=i(this.gl,this.bounds,this.ticks))};var g=[new m,new m,new m],y=[0,0,0],v={model:l,view:l,projection:l,_ortho:!1};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(e){};var x=[0,0,0],b=[0,0,0],_=[0,0,0];p.draw=function(e){e=e||v;for(var t,r,n,i=this.gl,a=e.model||l,s=e.view||l,c=e.projection||l,u=this.bounds,h=e._ortho||!1,d=o(a,s,c,u,h),p=d.cubeEdges,m=d.axis,w=s[12],k=s[13],T=s[14],A=s[15],M=h?2:1,S=M*this.pixelRatio*(c[3]*w+c[7]*k+c[11]*T+c[15]*A)/i.drawingBufferHeight,E=0;E<3;++E)this.lastCubeProps.cubeEdges[E]=p[E],this.lastCubeProps.axis[E]=m[E];for(var E=0;E<3;++E)!function(e,t,r,n,i){for(var a=e.primalOffset,o=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=n[t],u=0;u<3;++u)if(t!==u){var h=a,f=s,d=o,p=l;c&1<0?(d[u]=-1,p[u]=0):(d[u]=0,p[u]=1)}}(g[E],E,this.bounds,p,m);for(var i=this.gl,E=0;E<3;++E)this.backgroundEnable[E]?y[E]=m[E]:y[E]=0;this._background.draw(a,s,c,u,y,this.backgroundColor),this._lines.bind(a,s,c,this);for(var E=0;E<3;++E){var C=[0,0,0];m[E]>0?C[E]=u[1][E]:C[E]=u[0][E];for(var L=0;L<2;++L){var I=(E+1+L)%3,P=(E+1+(1^L))%3;this.gridEnable[I]&&this._lines.drawGrid(I,P,this.bounds,C,this.gridColor[I],this.gridWidth[I]*this.pixelRatio)}for(var L=0;L<2;++L){var I=(E+1+L)%3,P=(E+1+(1^L))%3;this.zeroEnable[P]&&0>=Math.min(u[0][P],u[1][P])&&Math.max(u[0][P],u[1][P])>=0&&this._lines.drawZero(I,P,this.bounds,C,this.zeroLineColor[P],this.zeroLineWidth[P]*this.pixelRatio)}}for(var E=0;E<3;++E){this.lineEnable[E]&&this._lines.drawAxisLine(E,this.bounds,g[E].primalOffset,this.lineColor[E],this.lineWidth[E]*this.pixelRatio),this.lineMirror[E]&&this._lines.drawAxisLine(E,this.bounds,g[E].mirrorOffset,this.lineColor[E],this.lineWidth[E]*this.pixelRatio);for(var z=f(x,g[E].primalMinor),O=f(b,g[E].mirrorMinor),D=this.lineTickLength,L=0;L<3;++L){var R=S/a[5*L];z[L]*=D[L]*R,O[L]*=D[L]*R}this.lineTickEnable[E]&&this._lines.drawAxisTicks(E,g[E].primalOffset,z,this.lineTickColor[E],this.lineTickWidth[E]*this.pixelRatio),this.lineTickMirror[E]&&this._lines.drawAxisTicks(E,g[E].mirrorOffset,O,this.lineTickColor[E],this.lineTickWidth[E]*this.pixelRatio)}function j(e){(n=[0,0,0])[e]=1}this._lines.unbind(),this._text.bind(a,s,c,this.pixelRatio);for(var E=0;E<3;++E){for(var F=g[E].primalMinor,B=g[E].mirrorMinor,N=f(_,g[E].primalOffset),L=0;L<3;++L)this.lineTickEnable[E]&&(N[L]+=S*F[L]*Math.max(this.lineTickLength[L],0)/a[5*L]);var U=[0,0,0];if(U[E]=1,this.tickEnable[E]){-3600===this.tickAngle[E]?(this.tickAngle[E]=0,this.tickAlign[E]="auto"):this.tickAlign[E]=-1,r=1,"auto"===(t=[this.tickAlign[E],.5,r])[0]?t[0]=0:t[0]=parseInt(""+t[0]),n=[0,0,0],function(e,t,r){var n=(e+1)%3,i=(e+2)%3,a=t[n],o=t[i],s=r[n],l=r[i];if(a>0&&l>0||a>0&&l<0)return j(n);a<0&&l>0||a<0&&l<0?j(n):o>0&&s>0||o>0&&s<0||o<0&&s>0?j(i):o<0&&s<0&&j(i)}(E,F,B);for(var L=0;L<3;++L)N[L]+=S*F[L]*this.tickPad[L]/a[5*L];this._text.drawTicks(E,this.tickSize[E],this.tickAngle[E],N,this.tickColor[E],U,n,t)}if(this.labelEnable[E]){r=0,n=[0,0,0],this.labels[E].length>4&&(j(E),r=1),"auto"===(t=[this.labelAlign[E],.5,r])[0]?t[0]=0:t[0]=parseInt(""+t[0]);for(var L=0;L<3;++L)N[L]+=S*F[L]*this.labelPad[L]/a[5*L];N[E]+=.5*(u[0][E]+u[1][E]),this._text.drawLabel(E,this.labelSize[E],this.labelAngle[E],N,this.labelColor[E],[0,0,0],n,t)}}this._text.unbind()},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(e,t,r){e.exports=function(e){for(var t=[],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],d=-1;d<=1;d+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=d,f[l]=d;for(var p=-1;p<=1;p+=2){h[c]=p;for(var m=-1;m<=1;m+=2)h[u]=m,t.push(h[0],h[1],h[2],f[0],f[1],f[2]),s+=1}var g=c;c=u,u=g}var y=n(e,new Float32Array(t)),v=n(e,new Uint16Array(r),e.ELEMENT_ARRAY_BUFFER),x=i(e,[{buffer:y,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:e.FLOAT,size:3,offset:12,stride:24}],v),b=a(e);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(e,y,x,b)};var n=r(2762),i=r(8116),a=r(1879).bg;function o(e,t,r,n){this.gl=e,this.buffer=t,this.vao=r,this.shader=n}var s=o.prototype;s.draw=function(e,t,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:e,view:t,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()}},6429:function(e,t,r){e.exports=function(e,t,r,f,y){i(s,t,e),i(s,r,s);for(var v=0,x=0;x<2;++x){u[2]=f[x][2];for(var b=0;b<2;++b){u[1]=f[b][1];for(var _=0;_<2;++_)u[0]=f[_][0],function(e,t,r){for(var n=0;n<4;++n){e[n]=r[12+n];for(var i=0;i<3;++i)e[n]+=t[i]*r[4*i+n]}}(l[v],u,s),v+=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;y&&(c[x][2]*=-1),k<0&&(w<0||c[x][2]o(c[I],c[P],c[z],h)||(L?E=1:C=1)}if(E<0||C<0){C>E&&(w|=1<E){w|=1<c[x][1])&&(R=x);for(var j=-1,x=0;x<3;++x){var F=R^1<c[B][0]&&(B=F)}}p[0]=p[1]=p[2]=0,p[n.log2(j^R)]=R&j,p[n.log2(R^B)]=R&B;var N=7^B;N===w||N===D?(N=7^j,p[n.log2(B^N)]=N&B):p[n.log2(j^N)]=N&j;for(var U=w,A=0;A<3;++A)U&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? - b - PI : - b; -} - -float look_horizontal_or_vertical(float a, float ratio) { - // ratio controls the ratio between being horizontal to (vertical + horizontal) - // if ratio is set to 0.5 then it is 50%, 50%. - // when using a higher ratio e.g. 0.75 the result would - // likely be more horizontal than vertical. - - float b = positive_angle(a); - - return - (b < ( ratio) * HALF_PI) ? 0.0 : - (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : - (b < (2.0 + ratio) * HALF_PI) ? 0.0 : - (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : - 0.0; -} - -float roundTo(float a, float b) { - return float(b * floor((a + 0.5 * b) / b)); -} - -float look_round_n_directions(float a, int n) { - float b = positive_angle(a); - float div = TWO_PI / float(n); - float c = roundTo(b, div); - return look_upwards(c); -} - -float applyAlignOption(float rawAngle, float delta) { - return - (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions - (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical - (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis - (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards - (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal - rawAngle; // otherwise return back raw input angle -} - -bool isAxisTitle = (axis.x == 0.0) && - (axis.y == 0.0) && - (axis.z == 0.0); - -void main() { - //Compute world offset - float axisDistance = position.z; - vec3 dataPosition = axisDistance * axis + offset; - - float beta = angle; // i.e. user defined attributes for each tick - - float axisAngle; - float clipAngle; - float flip; - - if (enableAlign) { - axisAngle = (isAxisTitle) ? HALF_PI : - computeViewAngle(dataPosition, dataPosition + axis); - clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); - - axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; - clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; - - flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), - vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; - - beta += applyAlignOption(clipAngle, flip * PI); - } - - //Compute plane offset - vec2 planeCoord = position.xy * pixelScale; - - mat2 planeXform = scale * mat2( - cos(beta), sin(beta), - -sin(beta), cos(beta) - ); - - vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; - - //Compute clip position - vec3 clipPosition = project(dataPosition); - - //Apply text offset in clip coordinates - clipPosition += vec3(viewOffset, 0.0); - - //Done - gl_Position = vec4(clipPosition, 1.0); -} -`]),l=n([`precision highp float; -#define GLSLIFY 1 - -uniform vec4 color; -void main() { - gl_FragColor = color; -}`]);t.Q=function(e){return i(e,s,l,null,[{name:"position",type:"vec3"}])};var c=n([`precision highp float; -#define GLSLIFY 1 - -attribute vec3 position; -attribute vec3 normal; - -uniform mat4 model, view, projection; -uniform vec3 enable; -uniform vec3 bounds[2]; - -varying vec3 colorChannel; - -void main() { - - vec3 signAxis = sign(bounds[1] - bounds[0]); - - vec3 realNormal = signAxis * normal; - - if(dot(realNormal, enable) > 0.0) { - vec3 minRange = min(bounds[0], bounds[1]); - vec3 maxRange = max(bounds[0], bounds[1]); - vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); - gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); - } else { - gl_Position = vec4(0,0,0,0); - } - - colorChannel = abs(realNormal); -} -`]),u=n([`precision highp float; -#define GLSLIFY 1 - -uniform vec4 colors[3]; - -varying vec3 colorChannel; - -void main() { - gl_FragColor = colorChannel.x * colors[0] + - colorChannel.y * colors[1] + - colorChannel.z * colors[2]; -}`]);t.bg=function(e){return i(e,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(e,t,r){e.exports=function(e,t,r,a,s,l){var u=n(e),h=i(e,[{buffer:u,size:3}]),f=o(e);f.attributes.position.location=0;var d=new c(e,f,u,h);return d.update(t,r,a,s,l),d};var n=r(2762),i=r(8116),a=r(4359),o=r(1879).Q,s=window||S.global||{},l=s.__TEXT_CACHE||{};function c(e,t,r,n){this.gl=e,this.shader=t,this.buffer=r,this.vao=n,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}s.__TEXT_CACHE={};var u=c.prototype,h=[0,0];u.bind=function(e,t,r,n){this.vao.bind(),this.shader.bind();var i=this.shader.uniforms;i.model=e,i.view=t,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(e,t,r,n,i){var o=[];function s(e,t,r,n,i,s){var c=[r.style,r.weight,r.variant,r.family].join("_"),u=l[c];u||(u=l[c]={});var h=u[t];h||(h=u[t]=function(e,t){try{return a(e,t)}catch(t){return console.warn('error vectorizing text:"'+e+'" error:',t),{cells:[],positions:[]}}}(t,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:i,styletags:s}));for(var f=(n||12)/12,d=h.positions,p=h.cells,m=0,g=p.length;m=0;--v){var x=d[y[v]];o.push(f*x[0],-f*x[1],e)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],f=[0,0,0],d={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){h[p]=o.length/3|0,s(.5*(e[0][p]+e[1][p]),t[p],r[p],12,1.25,d),f[p]=(o.length/3|0)-h[p],c[p]=o.length/3|0;for(var m=0;m=0&&(i=r.length-n-1);var a=Math.pow(10,i),o=Math.round(e*t*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)return u;for(var h=""+c;h.length=e[0][i];--o)a.push({x:o*t[i],text:r(t[i],o)});n.push(a)}return n},t.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var n=0;nr)throw Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,a,i),r}function u(e,t){for(var r=n.malloc(e.length,t),i=e.length,a=0;atypeof e.shape){var r,s=e.dtype;if(0>o.indexOf(s)&&(s="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(s=gl.getExtension("OES_element_index_uint")&&"uint16"!==s?"uint32":"uint16"),s===e.dtype&&function(e,t){for(var r=1,n=t.length-1;n>=0;--n){if(t[n]!==r)return!1;r*=e[n]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var l=n.malloc(e.size,s),h=a(l,e.shape);i.assign(h,e),t<0?this.length=c(this.gl,this.type,this.length,this.usage,l,t):this.length=c(this.gl,this.type,this.length,this.usage,l.subarray(0,e.size),t),n.free(l)}}else if(Array.isArray(e))r=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),t<0?this.length=c(this.gl,this.type,this.length,this.usage,r,t):this.length=c(this.gl,this.type,this.length,this.usage,r.subarray(0,e.length),t),n.free(r);else if("object"==typeof e&&"number"==typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else if("number"==typeof e||void 0===e){if(t>=0)throw Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}else throw Error("gl-buffer: Invalid data type")},e.exports=function(e,t,r,n){if(r=r||e.ARRAY_BUFFER,n=n||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.ELEMENT_ARRAY_BUFFER)throw Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(n!==e.DYNAMIC_DRAW&&n!==e.STATIC_DRAW&&n!==e.STREAM_DRAW)throw Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var i=e.createBuffer(),a=new s(e,r,i,0,n);return a.update(t),a}},6405:function(e,t,r){var n=r(2931);e.exports=function(e,t){var r=e.positions,i=e.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,c=1/0,u=-1/0,h=1/0,f=-1/0,d=null,p=null,m=[],g=1/0,y=!1,v="raw"===e.coneSizemode,x=0;xo&&(o=n.length(_)),x&&!v){var w=2*n.distance(d,b)/(n.length(p)+n.length(_));w?(g=Math.min(g,w),y=!1):y=!0}y||(d=b,p=_),m.push(_)}var k=[s,c,h],T=[l,u,f];t&&(t[0]=k,t[1]=T),0===o&&(o=1);var A=1/o;isFinite(g)||(g=1),a.vectorScale=g;var M=e.coneSize||(v?1:.5);e.absoluteConeSize&&(M=e.absoluteConeSize*A),a.coneScale=M;for(var x=0,S=0;x=1},d.isTransparent=function(){return this.opacity<1},d.pickSlots=1,d.setPickBase=function(e){this.pickId=e},d.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),n=0;n<256;++n){for(var i=t[n],a=0;a<3;++a)r[4*n+a]=i[a];r[4*n+3]=255*i[3]}return c(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,n=e.positions,i=e.vectors;if(!(!n||!r||!i)){var a=[],o=[],s=[],l=[],h=[];this.cells=r,this.positions=n,this.vectors=i;var f=e.meshColor||[1,1,1,1],d=e.vertexIntensity,p=1/0,m=-1/0;if(d)if(e.vertexIntensityBounds)p=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},d.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||h,n=e.view||h,i=e.projection||h,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=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,tubeScale:this.tubeScale,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(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},d.pick=function(e){if(!e||e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions[r[1]].slice(0,3),i={position:n,dataCoordinate:n,index:Math.floor(r[1]/48)};return"cone"===this.traceType?i.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(i.intensity=this.intensity[r[1]],i.velocity=this.vectors[r[1]].slice(0,3),i.divergence=this.vectors[r[1]][3],i.index=t),i},d.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.triangleIds.dispose()},e.exports=function(e,t,r){var s,l,u=r.shaders;1==arguments.length&&(e=(t=e).gl);var h=((s=n(e,u.meshShader.vertex,u.meshShader.fragment,null,u.meshShader.attributes)).attributes.position.location=0,s.attributes.color.location=2,s.attributes.uv.location=3,s.attributes.vector.location=4,s),d=((l=n(e,u.pickShader.vertex,u.pickShader.fragment,null,u.pickShader.attributes)).attributes.position.location=0,l.attributes.id.location=1,l.attributes.vector.location=4,l),p=o(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));p.generateMipmap(),p.minFilter=e.LINEAR_MIPMAP_LINEAR,p.magFilter=e.LINEAR;var m=i(e),g=i(e),y=i(e),v=i(e),x=i(e),b=a(e,[{buffer:m,type:e.FLOAT,size:4},{buffer:x,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:y,type:e.FLOAT,size:4},{buffer:v,type:e.FLOAT,size:2},{buffer:g,type:e.FLOAT,size:4}]),_=new f(e,p,h,d,m,g,x,y,v,b,r.traceType||"cone");return _.update(t),_}},614:function(e,t,r){var n=r(3236),i=n([`precision highp float; - -precision highp float; -#define GLSLIFY 1 - -vec3 getOrthogonalVector(vec3 v) { - // Return up-vector for only-z vector. - // 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). - // From the above if-statement we have ||a|| > 0 U ||b|| > 0. - // Assign z = 0, x = -b, y = a: - // a*-b + b*a + c*0 = -ba + ba + 0 = 0 - if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { - return normalize(vec3(-v.y, v.x, 0.0)); - } else { - return normalize(vec3(0.0, v.z, -v.y)); - } -} - -// Calculate the cone vertex and normal at the given index. -// -// The returned vertex is for a cone with its top at origin and height of 1.0, -// pointing in the direction of the vector attribute. -// -// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. -// These vertices are used to make up the triangles of the cone by the following: -// segment + 0 top vertex -// segment + 1 perimeter vertex a+1 -// segment + 2 perimeter vertex a -// segment + 3 center base vertex -// segment + 4 perimeter vertex a -// segment + 5 perimeter vertex a+1 -// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. -// To go from index to segment, floor(index / 6) -// To go from segment to angle, 2*pi * (segment/segmentCount) -// To go from index to segment index, index - (segment*6) -// -vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { - - const float segmentCount = 8.0; - - float index = rawIndex - floor(rawIndex / - (segmentCount * 6.0)) * - (segmentCount * 6.0); - - float segment = floor(0.001 + index/6.0); - float segmentIndex = index - (segment*6.0); - - normal = -normalize(d); - - if (segmentIndex > 2.99 && segmentIndex < 3.01) { - return mix(vec3(0.0), -d, coneOffset); - } - - float nextAngle = ( - (segmentIndex > 0.99 && segmentIndex < 1.01) || - (segmentIndex > 4.99 && segmentIndex < 5.01) - ) ? 1.0 : 0.0; - float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); - - vec3 v1 = mix(d, vec3(0.0), coneOffset); - vec3 v2 = v1 - d; - - vec3 u = getOrthogonalVector(d); - vec3 v = normalize(cross(u, d)); - - vec3 x = u * cos(angle) * length(d)*0.25; - vec3 y = v * sin(angle) * length(d)*0.25; - vec3 v3 = v2 + x + y; - if (segmentIndex < 3.0) { - vec3 tx = u * sin(angle); - vec3 ty = v * -cos(angle); - vec3 tangent = tx + ty; - normal = normalize(cross(v3 - v1, tangent)); - } - - if (segmentIndex == 0.0) { - return mix(d, vec3(0.0), coneOffset); - } - return v3; -} - -attribute vec3 vector; -attribute vec4 color, position; -attribute vec2 uv; - -uniform float vectorScale, coneScale, coneOffset; -uniform mat4 model, view, projection, inverseModel; -uniform vec3 eyePosition, lightPosition; - -varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; -varying vec4 f_color; -varying vec2 f_uv; - -void main() { - // Scale the vector magnitude to stay constant with - // model & view changes. - vec3 normal; - vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); - vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); - - //Lighting geometry parameters - vec4 cameraCoordinate = view * conePosition; - cameraCoordinate.xyz /= cameraCoordinate.w; - f_lightDirection = lightPosition - cameraCoordinate.xyz; - f_eyeDirection = eyePosition - cameraCoordinate.xyz; - f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); - - // vec4 m_position = model * vec4(conePosition, 1.0); - vec4 t_position = view * conePosition; - gl_Position = projection * t_position; - - f_color = color; - f_data = conePosition.xyz; - f_position = position.xyz; - f_uv = uv; -} -`]),a=n([`#extension GL_OES_standard_derivatives : enable - -precision highp float; -#define GLSLIFY 1 - -float beckmannDistribution(float x, float roughness) { - float NdotH = max(x, 0.0001); - float cos2Alpha = NdotH * NdotH; - float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; - float roughness2 = roughness * roughness; - float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; - return exp(tan2Alpha / roughness2) / denom; -} - -float cookTorranceSpecular( - vec3 lightDirection, - vec3 viewDirection, - vec3 surfaceNormal, - float roughness, - float fresnel) { - - float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); - float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); - - //Half angle vector - vec3 H = normalize(lightDirection + viewDirection); - - //Geometric term - float NdotH = max(dot(surfaceNormal, H), 0.0); - float VdotH = max(dot(viewDirection, H), 0.000001); - float LdotH = max(dot(lightDirection, H), 0.000001); - float G1 = (2.0 * NdotH * VdotN) / VdotH; - float G2 = (2.0 * NdotH * LdotN) / LdotH; - float G = min(1.0, min(G1, G2)); - - //Distribution term - float D = beckmannDistribution(NdotH, roughness); - - //Fresnel term - float F = pow(1.0 - VdotN, fresnel); - - //Multiply terms and done - return G * F * D / max(3.14159265 * VdotN, 0.000001); -} - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 clipBounds[2]; -uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; -uniform sampler2D texture; - -varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; -varying vec4 f_color; -varying vec2 f_uv; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; - vec3 N = normalize(f_normal); - vec3 L = normalize(f_lightDirection); - vec3 V = normalize(f_eyeDirection); - - if(gl_FrontFacing) { - N = -N; - } - - float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); - float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); - - vec4 surfaceColor = f_color * texture2D(texture, f_uv); - vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); - - gl_FragColor = litColor * opacity; -} -`]),o=n([`precision highp float; - -precision highp float; -#define GLSLIFY 1 - -vec3 getOrthogonalVector(vec3 v) { - // Return up-vector for only-z vector. - // 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). - // From the above if-statement we have ||a|| > 0 U ||b|| > 0. - // Assign z = 0, x = -b, y = a: - // a*-b + b*a + c*0 = -ba + ba + 0 = 0 - if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { - return normalize(vec3(-v.y, v.x, 0.0)); - } else { - return normalize(vec3(0.0, v.z, -v.y)); - } -} - -// Calculate the cone vertex and normal at the given index. -// -// The returned vertex is for a cone with its top at origin and height of 1.0, -// pointing in the direction of the vector attribute. -// -// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. -// These vertices are used to make up the triangles of the cone by the following: -// segment + 0 top vertex -// segment + 1 perimeter vertex a+1 -// segment + 2 perimeter vertex a -// segment + 3 center base vertex -// segment + 4 perimeter vertex a -// segment + 5 perimeter vertex a+1 -// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. -// To go from index to segment, floor(index / 6) -// To go from segment to angle, 2*pi * (segment/segmentCount) -// To go from index to segment index, index - (segment*6) -// -vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { - - const float segmentCount = 8.0; - - float index = rawIndex - floor(rawIndex / - (segmentCount * 6.0)) * - (segmentCount * 6.0); - - float segment = floor(0.001 + index/6.0); - float segmentIndex = index - (segment*6.0); - - normal = -normalize(d); - - if (segmentIndex > 2.99 && segmentIndex < 3.01) { - return mix(vec3(0.0), -d, coneOffset); - } - - float nextAngle = ( - (segmentIndex > 0.99 && segmentIndex < 1.01) || - (segmentIndex > 4.99 && segmentIndex < 5.01) - ) ? 1.0 : 0.0; - float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); - - vec3 v1 = mix(d, vec3(0.0), coneOffset); - vec3 v2 = v1 - d; - - vec3 u = getOrthogonalVector(d); - vec3 v = normalize(cross(u, d)); - - vec3 x = u * cos(angle) * length(d)*0.25; - vec3 y = v * sin(angle) * length(d)*0.25; - vec3 v3 = v2 + x + y; - if (segmentIndex < 3.0) { - vec3 tx = u * sin(angle); - vec3 ty = v * -cos(angle); - vec3 tangent = tx + ty; - normal = normalize(cross(v3 - v1, tangent)); - } - - if (segmentIndex == 0.0) { - return mix(d, vec3(0.0), coneOffset); - } - return v3; -} - -attribute vec4 vector; -attribute vec4 position; -attribute vec4 id; - -uniform mat4 model, view, projection; -uniform float vectorScale, coneScale, coneOffset; - -varying vec3 f_position; -varying vec4 f_id; - -void main() { - vec3 normal; - vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); - vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); - gl_Position = projection * (view * conePosition); - f_id = id; - f_position = position.xyz; -} -`]),s=n([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 clipBounds[2]; -uniform float pickId; - -varying vec3 f_position; -varying vec4 f_id; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; - - gl_FragColor = vec4(pickId, f_id.xyz); -}`]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(e){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",34e3:"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"}},5171:function(e,t,r){var n=r(737);e.exports=function(e){return n[e]}},9165:function(e,t,r){e.exports=function(e){var t=e.gl,r=n(t),o=i(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=a(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,r,o,l);return c.update(e),c};var n=r(2762),i=r(8116),a=r(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,n){this.gl=e,this.shader=n,this.buffer=t,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(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var n=r.view=e.view||o,i=r.projection=e.projection||o;r.model=e.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=n[12],s=n[13],l=n[14],c=n[15],u=(e._ortho?2:1)*this.pixelRatio*(i[3]*a+i[7]*s+i[11]*l+i[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)t.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&t.drawArrays(t.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var e=[,,,],t=0;t<3;++t){for(var r=[],n=1;n<=2;++n)for(var i=-1;i<=1;i+=2){var a=[0,0,0];a[(n+t)%3]=i,r.push(a)}e[t]=r}return e}();function h(e,t,r,n){for(var i=u[n],a=0;a0){var m=u.slice();m[s]+=d[1][s],i.push(u[0],u[1],u[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),c(this.bounds,m),o+=2+h(i,m,p,s)}}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(i)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(e,t,r){var n=r(3236),i=r(9405),a=n([`precision highp float; -#define GLSLIFY 1 - -attribute vec3 position, offset; -attribute vec4 color; -uniform mat4 model, view, projection; -uniform float capSize; -varying vec4 fragColor; -varying vec3 fragPosition; - -void main() { - vec4 worldPosition = model * vec4(position, 1.0); - worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); - gl_Position = projection * (view * worldPosition); - fragColor = color; - fragPosition = position; -}`]),o=n([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 clipBounds[2]; -uniform float opacity; -varying vec3 fragPosition; -varying vec4 fragColor; - -void main() { - if ( - outOfRange(clipBounds[0], clipBounds[1], fragPosition) || - fragColor.a * opacity == 0. - ) discard; - - gl_FragColor = opacity * fragColor; -}`]);e.exports=function(e){return i(e,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(e,t,r){var n=r(7766);e.exports=function(e,t,r,n){i||(i=e.FRAMEBUFFER_UNSUPPORTED,a=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=e.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(e,t){var r=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=Array(r+1);for(var n=0;n<=r;++n){for(var i=Array(r),a=0;au||r<0||r>u)throw 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 Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1)if(c){if(h>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw Error("gl-fbo: Context does not support "+h+" draw buffers")}else throw Error("gl-fbo: Multiple draw buffer extension not supported")}var f=e.UNSIGNED_BYTE,d=e.getExtension("OES_texture_float");if(n.float&&h>0){if(!d)throw Error("gl-fbo: Context does not support floating point textures");f=e.FLOAT}else n.preferFloat&&h>0&&d&&(f=e.FLOAT);var m=!0;"depth"in n&&(m=!!n.depth);var g=!1;return"stencil"in n&&(g=!!n.stencil),new p(e,t,r,f,h,m,g,c)};var i,a,o,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function h(e){switch(e){case i:throw Error("gl-fbo: Framebuffer unsupported");case a:throw Error("gl-fbo: Framebuffer incomplete attachment");case o:throw Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw Error("gl-fbo: Framebuffer failed for unspecified reason")}}function f(e,t,r,i,a,o){if(!i)return null;var s=n(e,t,r,a,i);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,o,e.TEXTURE_2D,s.handle,0),s}function d(e,t,r,n,i){var a=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,a),e.renderbufferStorage(e.RENDERBUFFER,n,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,i,e.RENDERBUFFER,a),a}function p(e,t,r,n,i,a,o,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=Array(i);for(var p=0;p1&&s.drawBuffersWEBGL(l[o]);var v=r.getExtension("WEBGL_depth_texture");v?p?e.depth=f(r,i,a,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=f(r,i,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&p?e._depth_rb=d(r,i,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=d(r,i,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(e._depth_rb=d(r,i,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null);for(var y=0;yi||r<0||r>i)throw Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var a=c(n),o=0;o max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 clipBounds[2]; -uniform sampler2D dashTexture; -uniform float dashScale; -uniform float opacity; - -varying vec3 worldPosition; -varying float pixelArcLength; -varying vec4 fragColor; - -void main() { - if ( - outOfRange(clipBounds[0], clipBounds[1], worldPosition) || - fragColor.a * opacity == 0. - ) discard; - - float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; - if(dashWeight < 0.5) { - discard; - } - gl_FragColor = fragColor * opacity; -} -`]),s=n([`precision highp float; -#define GLSLIFY 1 - -#define FLOAT_MAX 1.70141184e38 -#define FLOAT_MIN 1.17549435e-38 - -// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl -vec4 packFloat(float v) { - float av = abs(v); - - //Handle special cases - if(av < FLOAT_MIN) { - return vec4(0.0, 0.0, 0.0, 0.0); - } else if(v > FLOAT_MAX) { - return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; - } else if(v < -FLOAT_MAX) { - return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; - } - - vec4 c = vec4(0,0,0,0); - - //Compute exponent and mantissa - float e = floor(log2(av)); - float m = av * pow(2.0, -e) - 1.0; - - //Unpack mantissa - c[1] = floor(128.0 * m); - m -= c[1] / 128.0; - c[2] = floor(32768.0 * m); - m -= c[2] / 32768.0; - c[3] = floor(8388608.0 * m); - - //Unpack exponent - float ebias = e + 127.0; - c[0] = floor(ebias / 2.0); - ebias -= c[0] * 2.0; - c[1] += floor(ebias) * 128.0; - - //Unpack sign bit - c[0] += 128.0 * step(0.0, -v); - - //Scale back to range - return c / 255.0; -} - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform float pickId; -uniform vec3 clipBounds[2]; - -varying vec3 worldPosition; -varying float pixelArcLength; -varying vec4 fragColor; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; - - gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); -}`]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];t.createShader=function(e){return i(e,a,o,null,l)},t.createPickShader=function(e){return i(e,a,s,null,l)}},5714:function(e,t,r){e.exports=function(e){var t=e.gl||e.scene&&e.scene.gl,r=h(t);r.attributes.position.location=0,r.attributes.nextPosition.location=1,r.attributes.arcLength.location=2,r.attributes.lineWidth.location=3,r.attributes.color.location=4;var o=f(t);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(t),l=i(t,[{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}]),u=c(Array(1024),[256,1,4]),d=0;d<1024;++d)u.data[d]=255;var p=a(t,u);p.wrap=t.REPEAT;var m=new g(t,r,o,s,l,p);return m.update(e),m};var n=r(2762),i=r(8116),a=r(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer),l=r(2478),c=r(9618),u=r(7319),h=u.createShader,f=u.createPickShader,d=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(e){for(var t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)t[0][r]=Math.max(e[0][r],t[0][r]),t[1][r]=Math.min(e[1][r],t[1][r]);return t}function m(e,t,r,n){this.arcLength=e,this.position=t,this.index=r,this.dataCoordinate=n}function g(e,t,r,n,i,a){this.gl=e,this.shader=t,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 y=g.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(e){this.pickId=e},y.drawTransparent=y.draw=function(e){if(this.vertexCount){var t=this.gl,r=this.shader,n=this.vao;r.bind(),r.uniforms={model:e.model||d,view:e.view||d,projection:e.projection||d,clipBounds:p(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.drawPick=function(e){if(this.vertexCount){var t=this.gl,r=this.pickShader,n=this.vao;r.bind(),r.uniforms={model:e.model||d,view:e.view||d,projection:e.projection||d,pickId:this.pickId,clipBounds:p(this.clipBounds),screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},n.bind(),n.draw(t.TRIANGLE_STRIP,this.vertexCount),n.unbind()}},y.update=function(e){this.dirty=!0;var t=!!e.connectGaps;"dashScale"in e&&(this.dashScale=e.dashScale),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var r=[],n=[],i=[],a=0,o=0,s=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],u=e.position||e.positions;if(u){var h=e.color||e.colors||[0,0,0,1],f=e.lineWidth||1,d=!1;e:for(p=1;p0){for(var _=0;_<24;++_)r.push(r[r.length-12]);o+=2,d=!0}continue e}s[0][m]=Math.min(s[0][m],x[m],b[m]),s[1][m]=Math.max(s[1][m],x[m],b[m])}Array.isArray(h[0])?(g=h.length>p-1?h[p-1]:h.length>0?h[h.length-1]:[0,0,0,1],y=h.length>p?h[p]:h.length>0?h[h.length-1]:[0,0,0,1]):g=y=h,3===g.length&&(g=[g[0],g[1],g[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&g[3]<1&&(this.hasAlpha=!0),v=Array.isArray(f)?f.length>p-1?f[p-1]:f.length>0?f[f.length-1]:[0,0,0,1]:f;var w=a;if(a+=function(e,t){for(var r=0,n=0;n<3;++n){var i=e[n]-t[n];r+=i*i}return Math.sqrt(r)}(x,b),d){for(m=0;m<2;++m)r.push(x[0],x[1],x[2],b[0],b[1],b[2],w,v,g[0],g[1],g[2],g[3]);o+=2,d=!1}r.push(x[0],x[1],x[2],b[0],b[1],b[2],w,v,g[0],g[1],g[2],g[3],x[0],x[1],x[2],b[0],b[1],b[2],w,-v,g[0],g[1],g[2],g[3],b[0],b[1],b[2],x[0],x[1],x[2],a,-v,y[0],y[1],y[2],y[3],b[0],b[1],b[2],x[0],x[1],x[2],a,v,y[0],y[1],y[2],y[3]),o+=4}}if(this.buffer.update(r),n.push(a),i.push(u[u.length-1].slice()),this.bounds=s,this.vertexCount=o,this.points=i,this.arcLength=n,"dashes"in e){var k=e.dashes.slice();for(k.unshift(0),p=1;pMath.abs(m-_)&&1e-6>Math.abs(g-w)&&1e-6>Math.abs(y-k)?n(e):(p=1/Math.sqrt((h=m-_)*h+(f=g-w)*f+(d=y-k)*d),h*=p,f*=p,d*=p,(p=Math.sqrt((a=x*d-b*f)*a+(o=b*h-v*d)*o+(s=v*f-x*h)*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),(p=Math.sqrt((l=f*s-d*o)*l+(c=d*a-h*s)*c+(u=h*o-f*a)*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),e[0]=a,e[1]=l,e[2]=h,e[3]=0,e[4]=o,e[5]=c,e[6]=f,e[7]=0,e[8]=s,e[9]=u,e[10]=d,e[11]=0,e[12]=-(a*m+o*g+s*y),e[13]=-(l*m+c*g+u*y),e[14]=-(h*m+f*g+d*y),e[15]=1,e)}},6760:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],d=t[10],p=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*s+_*h+w*m,e[1]=x*i+b*l+_*f+w*g,e[2]=x*a+b*c+_*d+w*y,e[3]=x*o+b*u+_*p+w*v,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*n+b*s+_*h+w*m,e[5]=x*i+b*l+_*f+w*g,e[6]=x*a+b*c+_*d+w*y,e[7]=x*o+b*u+_*p+w*v,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*n+b*s+_*h+w*m,e[9]=x*i+b*l+_*f+w*g,e[10]=x*a+b*c+_*d+w*y,e[11]=x*o+b*u+_*p+w*v,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*n+b*s+_*h+w*m,e[13]=x*i+b*l+_*f+w*g,e[14]=x*a+b*c+_*d+w*y,e[15]=x*o+b*u+_*p+w*v,e}},4040:function(e){e.exports=function(e,t,r,n,i,a,o){var s=1/(t-r),l=1/(n-i),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(i+n)*l,e[14]=(o+a)*c,e[15]=1,e}},4772:function(e){e.exports=function(e,t,r,n,i){var a=1/Math.tan(t/2),o=1/(n-i);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*n*o,e[15]=0,e}},6079:function(e){e.exports=function(e,t,r,n){var i,a,o,s,l,c,u,h,f,d,p,m,g,y,v,x,b,_,w,k,T,A,M,S,E=n[0],C=n[1],L=n[2],I=Math.sqrt(E*E+C*C+L*L);return 1e-6>Math.abs(I)?null:(E*=I=1/I,C*=I,L*=I,i=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],l=t[1],c=t[2],u=t[3],h=t[4],f=t[5],d=t[6],p=t[7],m=t[8],g=t[9],y=t[10],v=t[11],x=E*E*o+a,b=C*E*o+L*i,_=L*E*o-C*i,w=E*C*o-L*i,k=C*C*o+a,T=L*C*o+E*i,A=E*L*o+C*i,M=C*L*o-E*i,S=L*L*o+a,e[0]=s*x+h*b+m*_,e[1]=l*x+f*b+g*_,e[2]=c*x+d*b+y*_,e[3]=u*x+p*b+v*_,e[4]=s*w+h*k+m*T,e[5]=l*w+f*k+g*T,e[6]=c*w+d*k+y*T,e[7]=u*w+p*k+v*T,e[8]=s*A+h*M+m*S,e[9]=l*A+f*M+g*S,e[10]=c*A+d*M+y*S,e[11]=u*A+p*M+v*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},5567:function(e){e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+c*n,e[5]=o*i+u*n,e[6]=s*i+h*n,e[7]=l*i+f*n,e[8]=c*i-a*n,e[9]=u*i-o*n,e[10]=h*i-s*n,e[11]=f*i-l*n,e}},2408:function(e){e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],f=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*i-c*n,e[1]=o*i-u*n,e[2]=s*i-h*n,e[3]=l*i-f*n,e[8]=a*n+c*i,e[9]=o*n+u*i,e[10]=s*n+h*i,e[11]=l*n+f*i,e}},7089:function(e){e.exports=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],f=t[7];return t!==e&&(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[0]=a*i+c*n,e[1]=o*i+u*n,e[2]=s*i+h*n,e[3]=l*i+f*n,e[4]=c*i-a*n,e[5]=u*i-o*n,e[6]=h*i-s*n,e[7]=f*i-l*n,e}},2504:function(e){e.exports=function(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},7656:function(e){e.exports=function(e,t,r){var n,i,a,o,s,l,c,u,h,f,d,p,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],d=t[10],p=t[11],e[0]=n,e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=f,e[10]=d,e[11]=p,e[12]=n*m+s*g+h*y+t[12],e[13]=i*m+l*g+f*y+t[13],e[14]=a*m+c*g+d*y+t[14],e[15]=o*m+u*g+p*y+t[15]),e}},5665:function(e){e.exports=function(e,t){if(e===t){var r=t[1],n=t[2],i=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=a,e[11]=t[14],e[12]=i,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},7626:function(e,t,r){var n=r(2642),i=r(9346);function a(e,t){for(var r=[0,0,0,0],n=0;n<4;++n)for(var i=0;i<4;++i)r[i]+=e[4*n+i]*t[n];return r}e.exports=function(e,t,r,o,s,l){if(1===e.length)return[0,e[0].slice()];for(var c=Array(e.length),u=0;u1.0001)return null;g+=m[u]}return Math.abs(g-1)>.001?null:[h,function(e,t){for(var r=[0,0,0],n=0;n max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 clipBounds[2]; -uniform float roughness - , fresnel - , kambient - , kdiffuse - , kspecular; -uniform sampler2D texture; - -varying vec3 f_normal - , f_lightDirection - , f_eyeDirection - , f_data; -varying vec4 f_color; -varying vec2 f_uv; - -void main() { - if (f_color.a == 0.0 || - outOfRange(clipBounds[0], clipBounds[1], f_data) - ) discard; - - vec3 N = normalize(f_normal); - vec3 L = normalize(f_lightDirection); - vec3 V = normalize(f_eyeDirection); - - if(gl_FrontFacing) { - N = -N; - } - - float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); - //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d - - float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); - - vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); - vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); - - gl_FragColor = litColor * f_color.a; -} -`]),o=n([`precision highp float; -#define GLSLIFY 1 - -attribute vec3 position; -attribute vec4 color; -attribute vec2 uv; - -uniform mat4 model, view, projection; - -varying vec4 f_color; -varying vec3 f_data; -varying vec2 f_uv; - -void main() { - gl_Position = projection * (view * (model * vec4(position, 1.0))); - f_color = color; - f_data = position; - f_uv = uv; -}`]),s=n([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 clipBounds[2]; -uniform sampler2D texture; -uniform float opacity; - -varying vec4 f_color; -varying vec3 f_data; -varying vec2 f_uv; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; - - gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),l=n([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -attribute vec3 position; -attribute vec4 color; -attribute vec2 uv; -attribute float pointSize; - -uniform mat4 model, view, projection; -uniform vec3 clipBounds[2]; - -varying vec4 f_color; -varying vec2 f_uv; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], position)) { - - gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); - } else { - gl_Position = projection * (view * (model * vec4(position, 1.0))); - } - gl_PointSize = pointSize; - f_color = color; - f_uv = uv; -}`]),c=n([`precision highp float; -#define GLSLIFY 1 - -uniform sampler2D texture; -uniform float opacity; - -varying vec4 f_color; -varying vec2 f_uv; - -void main() { - vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); - if(dot(pointR, pointR) > 0.25) { - discard; - } - gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),u=n([`precision highp float; -#define GLSLIFY 1 - -attribute vec3 position; -attribute vec4 id; - -uniform mat4 model, view, projection; - -varying vec3 f_position; -varying vec4 f_id; - -void main() { - gl_Position = projection * (view * (model * vec4(position, 1.0))); - f_id = id; - f_position = position; -}`]),h=n([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 clipBounds[2]; -uniform float pickId; - -varying vec3 f_position; -varying vec4 f_id; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; - - gl_FragColor = vec4(pickId, f_id.xyz); -}`]),f=n([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -attribute vec3 position; -attribute float pointSize; -attribute vec4 id; - -uniform mat4 model, view, projection; -uniform vec3 clipBounds[2]; - -varying vec3 f_position; -varying vec4 f_id; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], position)) { - - gl_Position = vec4(0.0, 0.0, 0.0, 0.0); - } else { - gl_Position = projection * (view * (model * vec4(position, 1.0))); - gl_PointSize = pointSize; - } - f_id = id; - f_position = position; -}`]),d=n([`precision highp float; -#define GLSLIFY 1 - -attribute vec3 position; - -uniform mat4 model, view, projection; - -void main() { - gl_Position = projection * (view * (model * vec4(position, 1.0))); -}`]),p=n([`precision highp float; -#define GLSLIFY 1 - -uniform vec3 contourColor; - -void main() { - gl_FragColor = vec4(contourColor, 1.0); -} -`]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:f,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:d,fragment:p,attributes:[{name:"position",type:"vec3"}]}},7201:function(e,t,r){var n=r(9405),i=r(2762),a=r(8116),o=r(7766),s=r(8406),l=r(6760),c=r(7608),u=r(9618),h=r(6729),f=r(7765),d=r(1888),p=r(840),m=r(7626),g=p.meshShader,y=p.wireShader,v=p.pointShader,x=p.pickShader,b=p.pointPickShader,_=p.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(e,t,r,n,i,a,o,s,l,c,u,h,f,d,p,m,g,y,v,x,b,_,k,T,A,M,S){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,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=d,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=y,this.edgeIds=m,this.edgeVAO=v,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.pickVertex=!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(e,t){if(!t||!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}T.isOpaque=function(){return!this.hasAlpha},T.isTransparent=function(){return this.hasAlpha},T.pickSlots=1,T.setPickBase=function(e){this.pickId=e},T.highlight=function(e){if(!e||!this.contourEnable){this.contourCount=0;return}for(var t=f(this.cells,this.intensity,e.intensity),r=t.cells,n=t.vertexIds,i=t.vertexWeights,a=r.length,o=d.mallocFloat32(6*a),s=0,l=0;l0){var p=this.triShader;p.bind(),p.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var p=this.lineShader;p.bind(),p.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var p=this.pointShader;p.bind(),p.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var p=this.contourShader;p.bind(),p.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind()}},T.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||w,n=e.view||w,i=e.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=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:n,projection:i,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()}},T.pick=function(e){if(!e||e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],n=this.positions,i=Array(r.length),a=0;aMath.abs(t))c.rotate(a,0,0,-e*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var o=-p.zoomSpeed*i*t/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,h*(Math.exp(o)-1))}}},!0)},p.enableMouseListeners(),p};var n=r(3025),i=r(6296),a=r(351),o=r(8512),s=r(24),l=r(7520)},799:function(e,t,r){var n=r(3236),i=r(9405),a=n([`precision mediump float; -#define GLSLIFY 1 -attribute vec2 position; -varying vec2 uv; -void main() { - uv = position; - gl_Position = vec4(position, 0, 1); -}`]),o=n([`precision mediump float; -#define GLSLIFY 1 - -uniform sampler2D accumBuffer; -varying vec2 uv; - -void main() { - vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); - gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);e.exports=function(e){return i(e,a,o,null,[{name:"position",type:"vec2"}])}},4100:function(e,t,r){var n=r(4437),i=r(3837),a=r(5445),o=r(4449),s=r(3589),l=r(2260),c=r(7169),u=r(351),h=r(4772),f=r(4040),d=r(799),p=r(9216)({tablet:!0,featureDetect:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(e){return"boolean"!=typeof e||e}e.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||((t=document.createElement("canvas"),e.container)?e.container.appendChild(t):document.body.appendChild(t));var r=e.gl;if(r||(e.glOptions&&(p=!!e.glOptions.preserveDrawingBuffer),r=function(e,t){var r=null;try{(r=e.getContext("webgl",t))||(r=e.getContext("experimental-webgl",t))}catch{return null}return r}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!r)throw Error("webgl not supported");var y=e.bounds||[[-10,-10,-10],[10,10,10]],v=new m,x=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!p}),b=d(r),_=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,w={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:_},k=e.axes||{},T=i(r,k);T.enable=!k.disable;var A=e.spikes||{},M=o(r,A),S=[],E=[],C=[],L=[],I=!0,P=!0,z={view:null,projection:Array(16),model:Array(16),_ortho:!1},P=!0,O=[r.drawingBufferWidth,r.drawingBufferHeight],D=e.cameraObject||n(t,w),R={gl:r,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:v,camera:D,axes:T,axesPixels:null,spikes:M,bounds:y,objects:S,shape:O,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:g(e.autoResize),autoBounds:g(e.autoBounds),autoScale:!!e.autoScale,autoCenter:g(e.autoCenter),clipToBounds:g(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.onclick||null,cameraParams:z,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z,P=!0},setBounds:function(e,t){this.bounds[0][e]=t.min,this.bounds[1][e]=t.max},setClearColor:function(e){this.clearColor=e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},j=[r.drawingBufferWidth/R.pixelRatio|0,r.drawingBufferHeight/R.pixelRatio|0];function F(){if(!R._stopped&&R.autoResize){var e=t.parentNode,r=1,n=1;e&&e!==document.body?(r=e.clientWidth,n=e.clientHeight):(r=window.innerWidth,n=window.innerHeight);var i=0|Math.ceil(r*R.pixelRatio),a=0|Math.ceil(n*R.pixelRatio);if(i!==t.width||a!==t.height){t.width=i,t.height=a;var o=t.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=n+"px",I=!0}}}function B(){for(var e=S.length,t=L.length,n=0;n0&&0===C[t-1];)C.pop(),L.pop().dispose()}function N(){if(R.contextLost)return!0;r.isContextLost()&&(R.contextLost=!0,R.mouseListener.enabled=!1,R.selection.object=null,R.oncontextloss&&R.oncontextloss())}R.autoResize&&F(),window.addEventListener("resize",F),R.update=function(e){R._stopped||(e=e||{},I=!0,P=!0)},R.add=function(e){R._stopped||(e.axes=T,S.push(e),E.push(-1),I=!0,P=!0,B())},R.remove=function(e){if(!R._stopped){var t=S.indexOf(e);t<0||(S.splice(t,1),E.pop(),I=!0,P=!0,B())}},R.dispose=function(){if(!R._stopped&&(R._stopped=!0,window.removeEventListener("resize",F),t.removeEventListener("webglcontextlost",N),R.mouseListener.enabled=!1,!R.contextLost)){T.dispose(),M.dispose();for(var e=0;ev.distance)continue;for(var c=0;c0){var r=Math.round(Math.pow(10,t));return Math.ceil(e/r)*r}return Math.ceil(e)}((m[1][o]-m[0][o])/10);T.autoTicks?T.update({bounds:m,tickSpacing:w}):T.update({bounds:m})}var k=r.drawingBufferWidth,A=r.drawingBufferHeight;O[0]=k,O[1]=A,j[0]=0|Math.max(k/R.pixelRatio,1),j[1]=0|Math.max(A/R.pixelRatio,1),function(e,t){var r=e.bounds,n=e.cameraParams,i=n.projection,a=n.model,o=e.gl.drawingBufferWidth,s=e.gl.drawingBufferHeight,l=e.zNear,c=e.zFar,u=e.fovy,d=o/s;t?(f(i,-d,d,-1,1,l,c),n._ortho=!0):(h(i,u,d,l,c),n._ortho=!1);for(var p=0;p<16;++p)a[p]=0;a[15]=1;for(var m=0,p=0;p<3;++p)m=Math.max(m,r[1][p]-r[0][p]);for(var p=0;p<3;++p)e.autoScale?a[5*p]=e.aspect[p]/(r[1][p]-r[0][p]):a[5*p]=1/m,e.autoCenter&&(a[12+p]=-(.5*a[5*p])*(r[0][p]+r[1][p]))}(R,_);for(var o=0;o1e-6?(o=Math.sin(i=Math.acos(a)),s=Math.sin((1-n)*i)/o,l=Math.sin(n*i)/o):(s=1-n,l=n),e[0]=s*c+l*d,e[1]=s*u+l*p,e[2]=s*h+l*m,e[3]=s*f+l*g,e}},5964:function(e){e.exports=function(e){return e||0===e?e.toString():""}},9366:function(e,t,r){var n=r(4359);e.exports=function(e,t,r){var a=[t.style,t.weight,t.variant,t.family].join("_"),o=i[a];if(o||(o=i[a]={}),e in o)return o[e];var s={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t.family,fontStyle:t.style,fontWeight:t.weight,fontVariant:t.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};s.triangles=!0;var l=n(e,s);s.triangles=!1;var c,u,h=n(e,s);if(r&&1!==r){for(c=0;c max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -attribute vec3 position; -attribute vec4 color; -attribute vec2 glyph; -attribute vec4 id; - -uniform vec4 highlightId; -uniform float highlightScale; -uniform mat4 model, view, projection; -uniform vec3 clipBounds[2]; - -varying vec4 interpColor; -varying vec4 pickId; -varying vec3 dataCoordinate; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], position)) { - - gl_Position = vec4(0,0,0,0); - } else { - float scale = 1.0; - if(distance(highlightId, id) < 0.0001) { - scale = highlightScale; - } - - vec4 worldPosition = model * vec4(position, 1); - vec4 viewPosition = view * worldPosition; - viewPosition = viewPosition / viewPosition.w; - vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); - - gl_Position = clipPosition; - interpColor = color; - pickId = id; - dataCoordinate = position; - } -}`]),o=i([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -attribute vec3 position; -attribute vec4 color; -attribute vec2 glyph; -attribute vec4 id; - -uniform mat4 model, view, projection; -uniform vec2 screenSize; -uniform vec3 clipBounds[2]; -uniform float highlightScale, pixelRatio; -uniform vec4 highlightId; - -varying vec4 interpColor; -varying vec4 pickId; -varying vec3 dataCoordinate; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], position)) { - - gl_Position = vec4(0,0,0,0); - } else { - float scale = pixelRatio; - if(distance(highlightId.bgr, id.bgr) < 0.001) { - scale *= highlightScale; - } - - vec4 worldPosition = model * vec4(position, 1.0); - vec4 viewPosition = view * worldPosition; - vec4 clipPosition = projection * viewPosition; - clipPosition /= clipPosition.w; - - gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); - interpColor = color; - pickId = id; - dataCoordinate = position; - } -}`]),s=i([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -attribute vec3 position; -attribute vec4 color; -attribute vec2 glyph; -attribute vec4 id; - -uniform float highlightScale; -uniform vec4 highlightId; -uniform vec3 axes[2]; -uniform mat4 model, view, projection; -uniform vec2 screenSize; -uniform vec3 clipBounds[2]; -uniform float scale, pixelRatio; - -varying vec4 interpColor; -varying vec4 pickId; -varying vec3 dataCoordinate; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], position)) { - - gl_Position = vec4(0,0,0,0); - } else { - float lscale = pixelRatio * scale; - if(distance(highlightId, id) < 0.0001) { - lscale *= highlightScale; - } - - vec4 clipCenter = projection * (view * (model * vec4(position, 1))); - vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; - vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1))); - - gl_Position = clipPosition; - interpColor = color; - pickId = id; - dataCoordinate = dataPosition; - } -} -`]),l=i([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 fragClipBounds[2]; -uniform float opacity; - -varying vec4 interpColor; -varying vec3 dataCoordinate; - -void main() { - if ( - outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || - interpColor.a * opacity == 0. - ) discard; - gl_FragColor = interpColor * opacity; -} -`]),c=i([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 fragClipBounds[2]; -uniform float pickGroup; - -varying vec4 pickId; -varying vec3 dataCoordinate; - -void main() { - if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; - - gl_FragColor = vec4(pickGroup, pickId.bgr); -}`]),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},d={vertex:s,fragment:l,attributes:u},p={vertex:a,fragment:c,attributes:u},m={vertex:o,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function y(e,t){var r=n(e,t),i=r.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,r}t.createPerspective=function(e){return y(e,h)},t.createOrtho=function(e){return y(e,f)},t.createProject=function(e){return y(e,d)},t.createPickPerspective=function(e){return y(e,p)},t.createPickOrtho=function(e){return y(e,m)},t.createPickProject=function(e){return y(e,g)}},8418:function(e,t,r){var n=r(5219),i=r(2762),a=r(8116),o=r(1888),s=r(6760),l=r(1283),c=r(9366),u=r(5964),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],f=ArrayBuffer,d=DataView;function p(e){return Array.isArray(e)||f.isView(e)&&!(e instanceof d)}function m(e,t){var r=e[0],n=e[1],i=e[2],a=e[3];return e[0]=t[0]*r+t[4]*n+t[8]*i+t[12]*a,e[1]=t[1]*r+t[5]*n+t[9]*i+t[13]*a,e[2]=t[2]*r+t[6]*n+t[10]*i+t[14]*a,e[3]=t[3]*r+t[7]*n+t[11]*i+t[15]*a,e}function g(e,t,r,n){return m(n,n),m(n,n),m(n,n)}function y(e,t){this.index=e,this.dataCoordinate=this.position=t}function v(e){return!0===e||e>1?1:e}function x(e,t,r,n,i,a,o,s,l,c,u,h){this.gl=e,this.pixelRatio=1,this.shader=t,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=[.6666666666666666,.6666666666666666,.6666666666666666],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 y(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(e){var t=e.gl,r=l.createPerspective(t),n=l.createOrtho(t),o=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),h=i(t),f=i(t),d=i(t),p=i(t),m=a(t,[{buffer:h,size:3,type:t.FLOAT},{buffer:f,size:4,type:t.FLOAT},{buffer:d,size:2,type:t.FLOAT},{buffer:p,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),g=new x(t,r,n,o,h,f,d,p,m,s,c,u);return g.update(e),g};var b=x.prototype;b.pickSlots=1,b.setPickBase=function(e){this.pickId=e},b.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},b.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var _=[0,0],w=[0,0,0],k=[0,0,0],T=[0,0,0,1],A=[0,0,0,1],M=h.slice(),S=[0,0,0],E=[[0,0,0],[0,0,0]];function C(e){return e[0]=e[1]=e[2]=0,e}function L(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function I(e,t,r,n){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=n,e}var P=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function z(e,t,r,n,i,a,o){var l=r.gl;if((a===r.projectHasAlpha||o)&&function(e,t,r,n){var i,a=t.axesProject,o=t.gl,l=e.uniforms,c=r.model||h,u=r.view||h,f=r.projection||h,d=t.axesBounds,p=function(e){for(var t=0;t<2;++t)for(var r=0;r<3;++r)E[t][r]=Math.max(Math.min(e[t][r],1e8),-1e8);return E}(t.clipBounds);i=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],_[0]=2/o.drawingBufferWidth,_[1]=2/o.drawingBufferHeight,e.bind(),l.view=u,l.projection=f,l.screenSize=_,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=p,l.pickGroup=t.pickId/255,l.pixelRatio=n;for(var m=0;m<3;++m)if(a[m]){l.scale=t.projectScale[m],l.opacity=t.projectOpacity[m];for(var y=0;y<16;++y)M[y]=0;for(var y=0;y<4;++y)M[5*y]=1;M[5*m]=0,i[m]<0?M[12+m]=d[0][m]:M[12+m]=d[1][m],s(M,c,M),l.model=M;var v=(m+1)%3,x=(m+2)%3,b=C(w),P=C(k);b[v]=1,P[x]=1;var z=g(f,u,c,L(T,b)),O=g(f,u,c,L(A,P));if(Math.abs(z[1])>Math.abs(O[1])){var D=z;z=O,O=D,D=b,b=P,P=D;var R=v;v=x,x=R}z[0]<0&&(b[v]=-1),O[1]>0&&(P[x]=-1);for(var j=0,F=0,y=0;y<4;++y)j+=Math.pow(c[4*v+y],2),F+=Math.pow(c[4*x+y],2);b[v]/=Math.sqrt(j),P[x]/=Math.sqrt(F),l.axes[0]=b,l.axes[1]=P,l.fragClipBounds[0]=I(S,p[0],m,-1e8),l.fragClipBounds[1]=I(S,p[1],m,1e8),t.vao.bind(),t.vao.draw(o.TRIANGLES,t.vertexCount),t.lineWidth>0&&(o.lineWidth(t.lineWidth*n),t.vao.draw(o.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}(t,r,n,i),a===r.hasAlpha||o){e.bind();var c=e.uniforms;c.model=n.model||h,c.view=n.view||h,c.projection=n.projection||h,_[0]=2/l.drawingBufferWidth,_[1]=2/l.drawingBufferHeight,c.screenSize=_,c.highlightId=r.highlightId,c.highlightScale=r.highlightScale,c.fragClipBounds=P,c.clipBounds=r.axes.bounds,c.opacity=r.opacity,c.pickGroup=r.pickId/255,c.pixelRatio=i,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*i),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function O(e,t,r,i){var a=u(a=p(e)?t=this.pointCount||t<0)return null;var r=this.points[t],n=this._selectResult;n.index=t;for(var i=0;i<3;++i)n.position[i]=n.dataCoordinate[i]=r[i];return n},b.highlight=function(e){if(e){var t=e.index;this.highlightId=[(255&t)/255,(t>>8&255)/255,(t>>16&255)/255,0]}else this.highlightId=[1,1,1,1]},b.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(p(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(p(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){if(p(e.projectOpacity))this.projectOpacity=e.projectOpacity.slice();else{var r=+e.projectOpacity;this.projectOpacity=[r,r,r]}for(var n=0;n<3;++n)this.projectOpacity[n]=v(this.projectOpacity[n]),this.projectOpacity[n]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=v(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var i,a,s=e.position,l={family:e.font||"normal",style:e.fontStyle||"normal",weight:e.fontWeight||"normal",variant:e.fontVariant||"normal"},c=e.alignment||[0,0];if(2===c.length)i=c[0],a=c[1];else{i=[],a=[];for(var n=0;n0){var D=0,R=b,j=[0,0,0,1],F=[0,0,0,1],B=p(d)&&p(d[0]),N=p(y)&&p(y[0]);e:for(var n=0;n0?1-E[0][0]:X<0?1+E[1][0]:1,Y*=Y>0?1-E[0][1]:Y<0?1+E[1][1]:1;for(var Z=[X,Y],$=M.cells||[],K=M.positions||[],T=0;T<$.length;++T)for(var J=$[T],Q=0;Q<3;++Q){for(var ee=0;ee<3;++ee)L[3*D+ee]=k[ee];for(var ee=0;ee<4;++ee)I[4*D+ee]=j[ee];z[D]=x;var et=K[J[Q]];P[2*D]=q*(G*et[0]-W*et[1]+Z[0]),P[2*D+1]=q*(W*et[0]+G*et[1]+Z[1]),D+=1}for(var $=S.edges,K=S.positions,T=0;T<$.length;++T)for(var J=$[T],Q=0;Q<2;++Q){for(var ee=0;ee<3;++ee)L[3*R+ee]=k[ee];for(var ee=0;ee<4;++ee)I[4*R+ee]=F[ee];z[R]=x;var et=K[J[Q]];P[2*R]=q*(G*et[0]-W*et[1]+Z[0]),P[2*R+1]=q*(W*et[0]+G*et[1]+Z[1]),R+=1}}}this.bounds=[u,h],this.points=s,this.pointCount=s.length,this.vertexCount=b,this.lineVertexCount=_,this.pointBuffer.update(L),this.colorBuffer.update(I),this.glyphBuffer.update(P),this.idBuffer.update(z),o.free(L),o.free(I),o.free(P),o.free(z)},b.dispose=function(){this.shader.dispose(),this.orthoShader.dispose(),this.pickPerspectiveShader.dispose(),this.pickOrthoShader.dispose(),this.vao.dispose(),this.pointBuffer.dispose(),this.colorBuffer.dispose(),this.glyphBuffer.dispose(),this.idBuffer.dispose()}},3589:function(e,t,r){e.exports=function(e,t){var r=t[0],a=t[1],o=n(e,r,a,{});return new c(e,o,i.mallocUint8(r*a*4))};var n=r(2260),i=r(1888),a=r(9618),o=r(8828).nextPow2,s=function(e,t,r){for(var n=1e8,i=-1,a=-1,o=e.shape[0],s=e.shape[1],l=0;lthis.buffer.length){i.free(this.buffer);for(var n=this.buffer=i.mallocUint8(o(r*t*4)),a=0;ar)for(e=r;et)for(e=t;e=0){for(var k=0|w.type.charAt(w.type.length-1),T=Array(k),A=0;A=0;)M+=1;_[v]=M}var S=Array(r.length);function E(){f.program=o.program(d,f._vref,f._fref,b,_);for(var e=0;e=0){var d=h.charCodeAt(h.length-1)-48;if(d<2||d>4)throw new n("","Invalid data type for attribute "+u+": "+h);s(e,t,f[0],i,d,a,u)}else if(h.indexOf("mat")>=0){var d=h.charCodeAt(h.length-1)-48;if(d<2||d>4)throw new n("","Invalid data type for attribute "+u+": "+h);!function(e,t,r,n,i,a,o){for(var l=Array(i),c=Array(i),u=0;u4)throw new i("","Invalid data type");switch(y.charAt(0)){case"b":case"i":e["uniform"+g+"iv"](s[u],h);break;case"v":e["uniform"+g+"fv"](s[u],h);break;default:throw new i("","Unrecognized data type for vector "+name+": "+y)}}else if(0===y.indexOf("mat")&&4===y.length){if((g=y.charCodeAt(y.length-1)-48)<2||g>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+y);e["uniformMatrix"+g+"fv"](s[u],!1,h);break}else throw new i("","Unknown uniform data type for "+name+": "+y)}}}}}function c(e,t,n){if("object"==typeof n)Object.defineProperty(e,t,{get:a(u(n)),set:l(n),enumerable:!0,configurable:!1});else s[n]?Object.defineProperty(e,t,{get:function(e,t,r){return e.getUniform(t.program,r[n])},set:l(n),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){var r=e.charCodeAt(e.length-1)-48;if(r<2||r>4)throw new i("","Invalid data type");return"b"===e.charAt(0)?o(r,!1):o(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r=e.charCodeAt(e.length-1)-48;if(r<2||r>4)throw new i("","Invalid uniform dimension type for matrix "+name+": "+e);return o(r*r,0)}throw new i("","Unknown uniform data type for "+name+": "+e)}}(r[n].type)}function u(e){var t;if(Array.isArray(e)){t=Array(e.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"u"?r(606):WeakMap),o=0;function s(e,t,r,n,i,a,o){this.id=e,this.src=t,this.type=r,this.shader=n,this.count=a,this.programs=[],this.cache=o}function l(e){this.gl=e,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var e=this.cache,t=e.gl,r=this.programs,n=0,i=r.length;n 0 U ||b|| > 0. - // Assign z = 0, x = -b, y = a: - // a*-b + b*a + c*0 = -ba + ba + 0 = 0 - if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { - return normalize(vec3(-v.y, v.x, 0.0)); - } else { - return normalize(vec3(0.0, v.z, -v.y)); - } -} - -// Calculate the tube vertex and normal at the given index. -// -// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. -// -// Each tube segment is made up of a ring of vertices. -// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. -// The indexes of tube segments run from 0 to 8. -// -vec3 getTubePosition(vec3 d, float index, out vec3 normal) { - float segmentCount = 8.0; - - float angle = 2.0 * 3.14159 * (index / segmentCount); - - vec3 u = getOrthogonalVector(d); - vec3 v = normalize(cross(u, d)); - - vec3 x = u * cos(angle) * length(d); - vec3 y = v * sin(angle) * length(d); - vec3 v3 = x + y; - - normal = normalize(v3); - - return v3; -} - -attribute vec4 vector; -attribute vec4 color, position; -attribute vec2 uv; - -uniform float vectorScale, tubeScale; -uniform mat4 model, view, projection, inverseModel; -uniform vec3 eyePosition, lightPosition; - -varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; -varying vec4 f_color; -varying vec2 f_uv; - -void main() { - // Scale the vector magnitude to stay constant with - // model & view changes. - vec3 normal; - vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); - vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); - - //Lighting geometry parameters - vec4 cameraCoordinate = view * tubePosition; - cameraCoordinate.xyz /= cameraCoordinate.w; - f_lightDirection = lightPosition - cameraCoordinate.xyz; - f_eyeDirection = eyePosition - cameraCoordinate.xyz; - f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); - - // vec4 m_position = model * vec4(tubePosition, 1.0); - vec4 t_position = view * tubePosition; - gl_Position = projection * t_position; - - f_color = color; - f_data = tubePosition.xyz; - f_position = position.xyz; - f_uv = uv; -} -`]),a=n([`#extension GL_OES_standard_derivatives : enable - -precision highp float; -#define GLSLIFY 1 - -float beckmannDistribution(float x, float roughness) { - float NdotH = max(x, 0.0001); - float cos2Alpha = NdotH * NdotH; - float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; - float roughness2 = roughness * roughness; - float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; - return exp(tan2Alpha / roughness2) / denom; -} - -float cookTorranceSpecular( - vec3 lightDirection, - vec3 viewDirection, - vec3 surfaceNormal, - float roughness, - float fresnel) { - - float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); - float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); - - //Half angle vector - vec3 H = normalize(lightDirection + viewDirection); - - //Geometric term - float NdotH = max(dot(surfaceNormal, H), 0.0); - float VdotH = max(dot(viewDirection, H), 0.000001); - float LdotH = max(dot(lightDirection, H), 0.000001); - float G1 = (2.0 * NdotH * VdotN) / VdotH; - float G2 = (2.0 * NdotH * LdotN) / LdotH; - float G = min(1.0, min(G1, G2)); - - //Distribution term - float D = beckmannDistribution(NdotH, roughness); - - //Fresnel term - float F = pow(1.0 - VdotN, fresnel); - - //Multiply terms and done - return G * F * D / max(3.14159265 * VdotN, 0.000001); -} - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 clipBounds[2]; -uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; -uniform sampler2D texture; - -varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; -varying vec4 f_color; -varying vec2 f_uv; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; - vec3 N = normalize(f_normal); - vec3 L = normalize(f_lightDirection); - vec3 V = normalize(f_eyeDirection); - - if(gl_FrontFacing) { - N = -N; - } - - float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); - float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); - - vec4 surfaceColor = f_color * texture2D(texture, f_uv); - vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); - - gl_FragColor = litColor * opacity; -} -`]),o=n([`precision highp float; - -precision highp float; -#define GLSLIFY 1 - -vec3 getOrthogonalVector(vec3 v) { - // Return up-vector for only-z vector. - // 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). - // From the above if-statement we have ||a|| > 0 U ||b|| > 0. - // Assign z = 0, x = -b, y = a: - // a*-b + b*a + c*0 = -ba + ba + 0 = 0 - if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { - return normalize(vec3(-v.y, v.x, 0.0)); - } else { - return normalize(vec3(0.0, v.z, -v.y)); - } -} - -// Calculate the tube vertex and normal at the given index. -// -// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. -// -// Each tube segment is made up of a ring of vertices. -// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. -// The indexes of tube segments run from 0 to 8. -// -vec3 getTubePosition(vec3 d, float index, out vec3 normal) { - float segmentCount = 8.0; - - float angle = 2.0 * 3.14159 * (index / segmentCount); - - vec3 u = getOrthogonalVector(d); - vec3 v = normalize(cross(u, d)); - - vec3 x = u * cos(angle) * length(d); - vec3 y = v * sin(angle) * length(d); - vec3 v3 = x + y; - - normal = normalize(v3); - - return v3; -} - -attribute vec4 vector; -attribute vec4 position; -attribute vec4 id; - -uniform mat4 model, view, projection; -uniform float tubeScale; - -varying vec3 f_position; -varying vec4 f_id; - -void main() { - vec3 normal; - vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); - vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); - - gl_Position = projection * (view * tubePosition); - f_id = id; - f_position = position.xyz; -} -`]),s=n([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 clipBounds[2]; -uniform float pickId; - -varying vec3 f_position; -varying vec4 f_id; - -void main() { - if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; - - gl_FragColor = vec4(pickId, f_id.xyz); -}`]);t.meshShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(e,t,r){var n=r(2931),i=r(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(e,t,r,a){for(var o=e.points,s=e.velocities,l=e.divergences,c=[],u=[],h=[],f=[],d=[],p=[],m=0,g=0,y=i.create(),v=i.create(),x=0;x0)for(var k=0;k<8;k++){var T=(k+1)%8;c.push(f[k],d[k],d[T],d[T],f[T],f[k]),h.push(v,y,y,y,v,v),p.push(m,g,g,g,m,m);var A=c.length;u.push([A-6,A-5,A-4],[A-3,A-2,A-1])}var M=f;f=d,d=M;var S=v;v=y,y=S;var E=m;m=g,g=E}return{positions:c,cells:u,vectors:h,vertexIntensity:p}},s=function(e,t,r,i){for(var a=0,s=0;st)return r-1}return r},c=function(e,t,r){return er?r:e},u=function(e,t,r){var i,a,o,s,u,h,f=t.vectors,d=t.meshgrid,p=e[0],m=e[1],g=e[2],y=d[0].length,v=d[1].length,x=d[2].length,b=l(d[0],p),_=l(d[1],m),w=l(d[2],g),k=b+1,T=_+1,A=w+1;if(b=c(b,0,y-1),k=c(k,0,y-1),_=c(_,0,v-1),T=c(T,0,v-1),w=c(w,0,x-1),A=c(A,0,x-1),b<0||_<0||w<0||k>y-1||T>v-1||A>x-1)return n.create();var M=d[0][b],S=d[0][k],E=d[1][_],C=d[1][T],L=d[2][w],I=d[2][A],P=(p-M)/(S-M),z=(m-E)/(C-E),O=(g-L)/(I-L);switch(isFinite(P)||(P=.5),isFinite(z)||(z=.5),isFinite(O)||(O=.5),r.reversedX&&(b=y-1-b,k=y-1-k),r.reversedY&&(_=v-1-_,T=v-1-T),r.reversedZ&&(w=x-1-w,A=x-1-A),r.filled){case 5:u=w,h=A,o=_*x,s=T*x,i=b*x*v,a=k*x*v;break;case 4:u=w,h=A,i=b*x,a=k*x,o=_*x*y,s=T*x*y;break;case 3:o=_,s=T,u=w*v,h=A*v,i=b*v*x,a=k*v*x;break;case 2:o=_,s=T,i=b*v,a=k*v,u=w*v*y,h=A*v*y;break;case 1:i=b,a=k,u=w*y,h=A*y,o=_*y*x,s=T*y*x;break;default:i=b,a=k,o=_*y,s=T*y,u=w*y*v,h=A*y*v}var D=f[i+o+u],R=f[i+o+h],j=f[i+s+u],F=f[i+s+h],B=f[a+o+u],N=f[a+o+h],U=f[a+s+u],V=f[a+s+h],q=n.create(),H=n.create(),G=n.create(),W=n.create();n.lerp(q,D,B,P),n.lerp(H,R,N,P),n.lerp(G,j,U,P),n.lerp(W,F,V,P);var Y=n.create(),X=n.create();n.lerp(Y,q,G,z),n.lerp(X,H,W,z);var Z=n.create();return n.lerp(Z,Y,X,O),Z},h=function(e){var t=1/0;e.sort(function(e,t){return e-t});for(var r=e.length,n=1;n1&&(T=f(r));for(var S=0;SA&&(A=D),z.push(D),m.push({points:C,velocities:L,divergences:z});for(var R=0;R<100*i&&C.lengthx||rb||n_)}(E);){R++;var j=n.clone(I),F=n.squaredLength(j);if(0===F)break;if(F>k&&n.scale(j,j,w/Math.sqrt(F)),n.add(j,j,E),I=d(j),n.squaredDistance(P,j)-k>-1e-4*k){C.push(j),P=j,L.push(I);var O=p(j,I),D=n.length(O);isFinite(D)&&D>A&&(A=D),z.push(D)}E=j}}var B=s(m,e.colormap,A,T);return l?B.tubeScale=l:(0===A&&(A=1),B.tubeScale=.5*o*T/A),B};var d=r(6740),p=r(6405).createMesh;e.exports.createTubeMesh=function(e,t){return p(e,t,{shaders:d,traceType:"streamtube"})}},990:function(e,t,r){var n=r(9405),i=r(3236),a=i([`precision highp float; -#define GLSLIFY 1 - -attribute vec4 uv; -attribute vec3 f; -attribute vec3 normal; - -uniform vec3 objectOffset; -uniform mat4 model, view, projection, inverseModel; -uniform vec3 lightPosition, eyePosition; -uniform sampler2D colormap; - -varying float value, kill; -varying vec3 worldCoordinate; -varying vec2 planeCoordinate; -varying vec3 lightDirection, eyeDirection, surfaceNormal; -varying vec4 vColor; - -void main() { - vec3 localCoordinate = vec3(uv.zw, f.x); - worldCoordinate = objectOffset + localCoordinate; - mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); - vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0); - vec4 clipPosition = projection * (view * worldPosition); - gl_Position = clipPosition; - kill = f.y; - value = f.z; - planeCoordinate = uv.xy; - - vColor = texture2D(colormap, vec2(value, value)); - - //Lighting geometry parameters - vec4 cameraCoordinate = view * worldPosition; - cameraCoordinate.xyz /= cameraCoordinate.w; - lightDirection = lightPosition - cameraCoordinate.xyz; - eyeDirection = eyePosition - cameraCoordinate.xyz; - surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); -} -`]),o=i([`precision highp float; -#define GLSLIFY 1 - -float beckmannDistribution(float x, float roughness) { - float NdotH = max(x, 0.0001); - float cos2Alpha = NdotH * NdotH; - float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; - float roughness2 = roughness * roughness; - float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; - return exp(tan2Alpha / roughness2) / denom; -} - -float beckmannSpecular( - vec3 lightDirection, - vec3 viewDirection, - vec3 surfaceNormal, - float roughness) { - return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); -} - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec3 lowerBound, upperBound; -uniform float contourTint; -uniform vec4 contourColor; -uniform sampler2D colormap; -uniform vec3 clipBounds[2]; -uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; -uniform float vertexColor; - -varying float value, kill; -varying vec3 worldCoordinate; -varying vec3 lightDirection, eyeDirection, surfaceNormal; -varying vec4 vColor; - -void main() { - if ( - kill > 0.0 || - vColor.a == 0.0 || - outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) - ) discard; - - vec3 N = normalize(surfaceNormal); - vec3 V = normalize(eyeDirection); - vec3 L = normalize(lightDirection); - - if(gl_FrontFacing) { - N = -N; - } - - float specular = max(beckmannSpecular(L, V, N, roughness), 0.); - float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); - - //decide how to interpolate color \u2014 in vertex or in fragment - vec4 surfaceColor = - step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + - step(.5, vertexColor) * vColor; - - vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); - - gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; -} -`]),s=i([`precision highp float; -#define GLSLIFY 1 - -attribute vec4 uv; -attribute float f; - -uniform vec3 objectOffset; -uniform mat3 permutation; -uniform mat4 model, view, projection; -uniform float height, zOffset; -uniform sampler2D colormap; - -varying float value, kill; -varying vec3 worldCoordinate; -varying vec2 planeCoordinate; -varying vec3 lightDirection, eyeDirection, surfaceNormal; -varying vec4 vColor; - -void main() { - vec3 dataCoordinate = permutation * vec3(uv.xy, height); - worldCoordinate = objectOffset + dataCoordinate; - mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); - vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); - - vec4 clipPosition = projection * (view * worldPosition); - clipPosition.z += zOffset; - - gl_Position = clipPosition; - value = f + objectOffset.z; - kill = -1.0; - planeCoordinate = uv.zw; - - vColor = texture2D(colormap, vec2(value, value)); - - //Don't do lighting for contours - surfaceNormal = vec3(1,0,0); - eyeDirection = vec3(0,1,0); - lightDirection = vec3(0,0,1); -} -`]),l=i([`precision highp float; -#define GLSLIFY 1 - -bool outOfRange(float a, float b, float p) { - return ((p > max(a, b)) || - (p < min(a, b))); -} - -bool outOfRange(vec2 a, vec2 b, vec2 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y)); -} - -bool outOfRange(vec3 a, vec3 b, vec3 p) { - return (outOfRange(a.x, b.x, p.x) || - outOfRange(a.y, b.y, p.y) || - outOfRange(a.z, b.z, p.z)); -} - -bool outOfRange(vec4 a, vec4 b, vec4 p) { - return outOfRange(a.xyz, b.xyz, p.xyz); -} - -uniform vec2 shape; -uniform vec3 clipBounds[2]; -uniform float pickId; - -varying float value, kill; -varying vec3 worldCoordinate; -varying vec2 planeCoordinate; -varying vec3 surfaceNormal; - -vec2 splitFloat(float v) { - float vh = 255.0 * v; - float upper = floor(vh); - float lower = fract(vh); - return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); -} - -void main() { - if ((kill > 0.0) || - (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; - - vec2 ux = splitFloat(planeCoordinate.x / shape.x); - vec2 uy = splitFloat(planeCoordinate.y / shape.y); - gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); -} -`]);t.createShader=function(e){var t=n(e,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createPickShader=function(e){var t=n(e,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createContourShader=function(e){var t=n(e,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},t.createPickContourShader=function(e){var t=n(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},9499:function(e,t,r){e.exports=function(e){var t=e.gl,r=v(t),n=b(t),s=x(t),l=_(t),c=i(t),u=a(t,[{buffer:c,size:4,stride:40,offset:0},{buffer:c,size:3,stride:40,offset:16},{buffer:c,size:3,stride:40,offset:28}]),h=i(t),f=a(t,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),d=i(t),p=a(t,[{buffer:d,size:2,type:t.FLOAT}]),m=o(t,1,256,t.RGBA,t.UNSIGNED_BYTE);m.minFilter=t.LINEAR,m.magFilter=t.LINEAR;var g=new L(t,[0,0],[[0,0,0],[0,0,0]],r,n,c,u,m,s,l,h,f,d,p,[0,0,0]),y={levels:[[],[],[]]};for(var w in e)y[w]=e[w];return y.colormap=y.colormap||"jet",g.update(y),g};for(var n=r(8828),i=r(2762),a=r(8116),o=r(7766),s=r(1888),l=r(6729),c=r(5298),u=r(9994),h=r(9618),f=r(3711),d=r(6760),p=r(7608),m=r(2478),g=r(6199),y=r(990),v=y.createShader,x=y.createContourShader,b=y.createPickShader,_=y.createPickContourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],k=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],T=[[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]],A=0;A<3;++A){var M=T[A],S=(A+1)%3,E=(A+2)%3;M[S+0]=1,M[E+3]=1,M[A+6]=1}function C(e,t,r,n,i){this.position=e,this.index=t,this.uv=r,this.level=n,this.dataCoordinate=i}function L(e,t,r,n,i,a,o,l,c,u,f,d,p,m,g){this.gl=e,this.shape=t,this.bounds=r,this.objectOffset=g,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=d,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new C([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=p,this._dynamicVAO=m,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 I=L.prototype;I.genColormap=function(e,t){var r=!1,n=u([l({colormap:e,nshades:256,format:"rgba"}).map(function(e,n){var i=t?function(e,t){if(!t||!t.length)return 1;for(var r=0;re&&r>0){var n=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-n)+n*t[r-1][1]}}return 1}(n/255,t):e[3];return i<1&&(r=!0),[e[0],e[1],e[2],255*i]})]);return c.divseq(n,255),this.hasAlphaScale=r,n},I.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},I.isOpaque=function(){return!this.isTransparent()},I.pickSlots=1,I.setPickBase=function(e){this.pickId=e};var P=[0,0,0],z={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function O(e,t){var r,n,i,a=t.axes&&t.axes.lastCubeProps.axis||P,o=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(o=o||t.surfaceProject[r],n=0;n<3;++n)s=s||t.contourProject[r][n];for(r=0;r<3;++r){var l=z.projections[r];for(n=0;n<16;++n)l[n]=0;for(n=0;n<4;++n)l[5*n]=1;l[5*r]=0,l[12+r]=t.axesBounds[+(a[r]>0)][r],d(l,e.model,l);var c=z.clipBounds[r];for(i=0;i<2;++i)for(n=0;n<3;++n)c[i][n]=e.clipBounds[i][n];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=o,z.showContour=s,z}var D={model:w,view:w,projection:w,inverseModel:w.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},R=w.slice(),j=[1,0,0,0,1,0,0,0,1];function F(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0),D.model=e.model||w,D.view=e.view||w,D.projection=e.projection||w,D.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],D.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],D.objectOffset=this.objectOffset,D.contourColor=this.contourColor[0],D.inverseModel=p(D.inverseModel,D.model);for(var n=0;n<2;++n)for(var i=D.clipBounds[n],a=0;a<3;++a)i[a]=Math.min(Math.max(this.clipBounds[n][a],-1e8),1e8);for(D.kambient=this.ambientLight,D.kdiffuse=this.diffuseLight,D.kspecular=this.specularLight,D.roughness=this.roughness,D.fresnel=this.fresnel,D.opacity=this.opacity,D.height=0,D.permutation=j,D.vertexColor=this.vertexColor,d(R,D.view,D.model),d(R,D.projection,R),p(R,R),n=0;n<3;++n)D.eyePosition[n]=R[12+n]/R[15];var o=R[15];for(n=0;n<3;++n)o+=this.lightPosition[n]*R[4*n+3];for(n=0;n<3;++n){var s=R[12+n];for(a=0;a<3;++a)s+=R[4*a+n]*this.lightPosition[a];D.lightPosition[n]=s/o}var l=O(D,this);if(l.showSurface){for(this._shader.bind(),this._shader.uniforms=D,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(r.TRIANGLES,this._vertexCount),n=0;n<3;++n)this.surfaceProject[n]&&this.vertexCount&&(this._shader.uniforms.model=l.projections[n],this._shader.uniforms.clipBounds=l.clipBounds[n],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(l.showContour){var c=this._contourShader;D.kambient=1,D.kdiffuse=0,D.kspecular=0,D.opacity=1,c.bind(),c.uniforms=D;var u=this._contourVAO;for(u.bind(),n=0;n<3;++n)for(c.uniforms.permutation=T[n],r.lineWidth(this.contourWidth[n]*this.pixelRatio),a=0;a>4)/16)/255,i=Math.floor(n),a=n-i,o=t[1]*(e.value[1]+(15&e.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 d=f?l:1-l,p=i+u,g=s+f,y=h*d,v=0;v<3;++v)c[v]+=this._field[v].get(p,g)*y;for(var x=this._pickResult.level,b=0;b<3;++b)if(x[b]=m.le(this.contourLevels[b],c[b]),x[b]<0)this.contourLevels[b].length>0&&(x[b]=0);else if(x[b]Math.abs(w-c[b])&&(x[b]+=1)}for(r.index[0]=a<.5?i:i+1,r.index[1]=l<.5?s:s+1,r.uv[0]=n/t[0],r.uv[1]=o/t[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},I.padField=function(e,t){var r=t.shape.slice(),n=e.shape.slice();c.assign(e.lo(1,1).hi(r[0],r[1]),t),c.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),c.assign(e.lo(1,n[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),c.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),c.assign(e.lo(n[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,n[1]-1,t.get(0,r[1]-1)),e.set(n[0]-1,0,t.get(r[0]-1,0)),e.set(n[0]-1,n[1]-1,t.get(r[0]-1,r[1]-1))},I.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=N(e.contourWidth,Number)),"showContour"in e&&(this.showContour=N(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=N(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=V(e.contourColor)),"contourProject"in e&&(this.contourProject=N(e.contourProject,function(e){return N(e,Boolean)})),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=V(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=N(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=N(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=+!!e.vertexColor),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=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 e||"coords"in e){var i=(t.shape[0]+2)*(t.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,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.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(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=l[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],c)}}else if(e.ticks){var u=e.ticks;if(!Array.isArray(u)||2!==u.length)throw Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var d=u[o];if((Array.isArray(d)||d.length)&&(d=h(d)),d.shape[0]!==a[o])throw Error("gl-surface: invalid tick length");var p=h(d.data,a);p.stride[o]=d.stride[0],p.stride[1^o]=0,this.padField(this._field[o],p)}}else{for(o=0;o<2;++o){var m=[0,0];m[o]=1,this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2],m,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var ex=0;ex<5;++ex)J.pop();B-=1}continue e}J.push(en[0],en[1],eo[0],eo[1],en[2]),B+=1}}er.push(B)}this._contourOffsets[Q]=et,this._contourCounts[Q]=er}var eb=s.mallocFloat(J.length);for(o=0;os||o[1]<0||o[1]>s)throw Error("gl-texture2d: Invalid texture size");var l=p(o,t.stride.slice()),c=0;"float32"===r?c=e.FLOAT:"float64"===r?(c=e.FLOAT,l=!1,r="float32"):"uint8"===r?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,r="uint8");var h=0;if(2===o.length)h=e.LUMINANCE,o=[o[0],o[1],1],t=n(t.data,o,[t.stride[0],t.stride[1],1],t.offset);else if(3===o.length)if(1===o[2])h=e.ALPHA;else if(2===o[2])h=e.LUMINANCE_ALPHA;else if(3===o[2])h=e.RGB;else if(4===o[2])h=e.RGBA;else throw Error("gl-texture2d: Invalid shape for pixel coords");else throw Error("gl-texture2d: Invalid shape for texture");c!==e.FLOAT||e.getExtension("OES_texture_float")||(c=e.UNSIGNED_BYTE,l=!1);var d,g,y=t.size;if(l)d=0===t.offset&&t.data.length===y?t.data:t.data.subarray(t.offset,t.offset+y);else{var v=[o[2],o[2]*o[0],1],x=n(g=a.malloc(y,r),o,v,0);("float32"===r||"float64"===r)&&c===e.UNSIGNED_BYTE?u(x,t):i.assign(x,t),d=g.subarray(0,y)}var b=m(e);return e.texImage2D(e.TEXTURE_2D,0,h,o[0],o[1],0,h,c,d),l||a.free(g),new f(e,b,o[0],o[1],h,c)}(e,v)}throw Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(e){return"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"u">typeof ImageData&&e instanceof ImageData}var u=function(e,t){i.muls(e,t,255)};function h(e,t,r){var n=e.gl,i=n.getParameter(n.MAX_TEXTURE_SIZE);if(t<0||t>i||r<0||r>i)throw Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),n.texImage2D(n.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function f(e,t,r,n,i,a){this.gl=e,this.handle=t,this.format=i,this.type=a,this._shape=[r,n],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(e){return o.wrapS=e}},{get:function(){return o._wrapT},set:function(e){return o.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(e){return o.width=e}},{get:function(){return o._shape[1]},set:function(e){return o.height=e}}]),this._shapeVector=l}var d=f.prototype;function p(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,r,n,i){var a=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>a||r<0||r>a)throw Error("gl-texture2d: Invalid texture shape");if(i===e.FLOAT&&!e.getExtension("OES_texture_float"))throw Error("gl-texture2d: Floating point textures not supported on this platform");var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,n,t,r,0,n,i,null),new f(e,o,t,r,n,i)}Object.defineProperties(d,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),0>s.indexOf(e))throw Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),0>s.indexOf(e))throw Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==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(e){if(this.bind(),0>l.indexOf(e))throw Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),0>l.indexOf(e))throw Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(0>l.indexOf(e[t]))throw Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[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),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return h(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return h(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,h(this,this._shape[0],e),e}}}),d.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},d.dispose=function(){this.gl.deleteTexture(this.handle)},d.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)0>this._mipLevels.indexOf(t)&&this._mipLevels.push(t)},d.setPixels=function(e,t,r,o){var s=this.gl;this.bind(),Array.isArray(t)?(o=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),o=o||0;var l=c(e)?e:e.raw;if(l)0>this._mipLevels.indexOf(o)?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,t,r,this.format,this.type,l);else if(e.shape&&e.stride&&e.data){if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>o||r+e.shape[0]>this._shape[0]>>>o||t<0||r<0)throw Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,o,s,l,c,h){var f=h.dtype,d=h.shape.slice();if(d.length<2||d.length>3)throw Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,y=p(d,h.stride.slice());"float32"===f?m=e.FLOAT:"float64"===f?(m=e.FLOAT,y=!1,f="float32"):"uint8"===f?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,y=!1,f="uint8");if(2===d.length)g=e.LUMINANCE,d=[d[0],d[1],1],h=n(h.data,d,[h.stride[0],h.stride[1],1],h.offset);else if(3===d.length){if(1===d[2])g=e.ALPHA;else if(2===d[2])g=e.LUMINANCE_ALPHA;else if(3===d[2])g=e.RGB;else if(4===d[2])g=e.RGBA;else throw Error("gl-texture2d: Invalid shape for pixel coords");d[2]}else throw Error("gl-texture2d: Invalid shape for texture");if((g===e.LUMINANCE||g===e.ALPHA)&&(s===e.LUMINANCE||s===e.ALPHA)&&(g=s),g!==s)throw Error("gl-texture2d: Incompatible texture format for setPixels");var v=h.size,x=0>c.indexOf(o);if(x&&c.push(o),m===l&&y)0===h.offset&&h.data.length===v?x?e.texImage2D(e.TEXTURE_2D,o,s,d[0],d[1],0,s,l,h.data):e.texSubImage2D(e.TEXTURE_2D,o,t,r,d[0],d[1],s,l,h.data):x?e.texImage2D(e.TEXTURE_2D,o,s,d[0],d[1],0,s,l,h.data.subarray(h.offset,h.offset+v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,d[0],d[1],s,l,h.data.subarray(h.offset,h.offset+v));else{var b=l===e.FLOAT?a.mallocFloat32(v):a.mallocUint8(v),_=n(b,d,[d[2],d[2]*d[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?u(_,h):i.assign(_,h),x?e.texImage2D(e.TEXTURE_2D,o,s,d[0],d[1],0,s,l,b.subarray(0,v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,d[0],d[1],s,l,b.subarray(0,v)),l===e.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,t,r,o,this.format,this.type,this._mipLevels,e)}else throw Error("gl-texture2d: Unsupported data type")}},1433:function(e){e.exports=function(e,t,r){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var n=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(r){if(r.length>n)throw Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(s)};var n=r(2825),i=r(3536),a=r(244)},9226:function(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},3126:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},3990:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},1091:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},5911:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=i*l-a*s,e[1]=a*o-n*l,e[2]=n*s-i*o,e}},5455:function(e,t,r){e.exports=r(7056)},7056:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(e,t,r){e.exports=r(6690)},6690:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}},244:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},2613:function(e){e.exports=1e-6},9922:function(e,t,r){e.exports=function(e,t){var r=e[0],i=e[1],a=e[2],o=t[0],s=t[1],l=t[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=r(2613)},9265:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},2681:function(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},5137:function(e,t,r){e.exports=function(e,t,r,i,a,o){var s,l;for(t||(t=3),r||(r=0),l=i?Math.min(i*t+r,e.length):e.length,s=r;s0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}},7636:function(e){e.exports=function(e,t){var r=2*Math.random()*Math.PI,n=2*Math.random()-1,i=Math.sqrt(1-n*n)*(t=t||1);return e[0]=Math.cos(r)*i,e[1]=Math.sin(r)*i,e[2]=n*t,e}},6894:function(e){e.exports=function(e,t,r,n){var i=r[1],a=r[2],o=t[1]-i,s=t[2]-a,l=Math.sin(n),c=Math.cos(n);return e[0]=t[0],e[1]=i+o*c-s*l,e[2]=a+o*l+s*c,e}},109:function(e){e.exports=function(e,t,r,n){var i=r[0],a=r[2],o=t[0]-i,s=t[2]-a,l=Math.sin(n),c=Math.cos(n);return e[0]=i+s*l+o*c,e[1]=t[1],e[2]=a+s*c-o*l,e}},8692:function(e){e.exports=function(e,t,r,n){var i=r[0],a=r[1],o=t[0]-i,s=t[1]-a,l=Math.sin(n),c=Math.cos(n);return e[0]=i+o*c-s*l,e[1]=a+o*l+s*c,e[2]=t[2],e}},2447:function(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},6621:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}},8489:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e}},1463:function(e){e.exports=function(e,t,r,n){return e[0]=t,e[1]=r,e[2]=n,e}},6141:function(e,t,r){e.exports=r(2953)},5486:function(e,t,r){e.exports=r(3066)},2953:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2];return r*r+n*n+i*i}},3066:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2];return t*t+r*r+n*n}},2229:function(e,t,r){e.exports=r(6843)},6843:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}},492:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2];return e[0]=n*r[0]+i*r[3]+a*r[6],e[1]=n*r[1]+i*r[4]+a*r[7],e[2]=n*r[2]+i*r[5]+a*r[8],e}},5673:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=r[3]*n+r[7]*i+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*n+r[4]*i+r[8]*a+r[12])/o,e[1]=(r[1]*n+r[5]*i+r[9]*a+r[13])/o,e[2]=(r[2]*n+r[6]*i+r[10]*a+r[14])/o,e}},264:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[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,d=-o*n-s*i-l*a;return e[0]=u*c+-(d*o)+-(h*l)- -(f*s),e[1]=h*c+-(d*s)+-(f*o)- -(u*l),e[2]=f*c+-(d*l)+-(u*s)- -(h*o),e}},4361:function(e){e.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}},2335:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},2933:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},7536:function(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},4691:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+n*n+i*i+a*a)}},1373:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}},3750:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},3390:function(e){e.exports=function(e,t,r,n){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=r,i[3]=n,i}},9970:function(e,t,r){e.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},6808:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return Math.sqrt(t*t+r*r+n*n+i*i)}},2573:function(e){e.exports=function(e,t,r,n){var i=t[0],a=t[1],o=t[2],s=t[3];return e[0]=i+n*(r[0]-i),e[1]=a+n*(r[1]-a),e[2]=o+n*(r[2]-o),e[3]=s+n*(r[3]-s),e}},160:function(e){e.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},2334:function(e){e.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},3576:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}},1498:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},5177:function(e){e.exports=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=r*r+n*n+i*i+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=n*o,e[2]=i*o,e[3]=a*o),e}},9131:function(e,t,r){var n=r(5177),i=r(9288);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),n(e,e),i(e,e,t),e}},9288:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},4844:function(e){e.exports=function(e,t,r,n){return e[0]=t[0]+r[0]*n,e[1]=t[1]+r[1]*n,e[2]=t[2]+r[2]*n,e[3]=t[3]+r[3]*n,e}},4578:function(e){e.exports=function(e,t,r,n,i){return e[0]=t,e[1]=r,e[2]=n,e[3]=i,e}},7960:function(e){e.exports=function(e,t){var r=t[0]-e[0],n=t[1]-e[1],i=t[2]-e[2],a=t[3]-e[3];return r*r+n*n+i*i+a*a}},483:function(e){e.exports=function(e){var t=e[0],r=e[1],n=e[2],i=e[3];return t*t+r*r+n*n+i*i}},6860:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},5352:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}},4041:function(e){e.exports=function(e,t,r){var n=t[0],i=t[1],a=t[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,d=-o*n-s*i-l*a;return e[0]=u*c+-(d*o)+-(h*l)- -(f*s),e[1]=h*c+-(d*s)+-(f*o)- -(u*l),e[2]=f*c+-(d*l)+-(u*s)- -(h*o),e[3]=t[3],e}},1848:function(e,t,r){var n=r(4905),i=r(6468);e.exports=function(e){for(var t=Array.isArray(e)?e:n(e),r=0;r0)continue;r=e.slice(0,1).join("")}return A(r),y+=r.length,(d=d.slice(r.length)).length}}};var n=r(620),i=r(7827),a=r(6852),o=r(7932),s=r(3508),l=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(e,t,r){var n=r(6852);e.exports=(n=n.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)})).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"])},6852:function(e){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"]},7932:function(e,t,r){e.exports=r(620).slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","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"])},620:function(e){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","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"]},7827:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(e,t,r){var n=r(5874);e.exports=function(e,t){var r=n(t),i=[];return(i=i.concat(r(e))).concat(r(null))}},3236:function(e){e.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n>1,u=-7,h=r?i-1:0,f=r?-1:1,d=e[t+h];for(h+=f,a=d&(1<<-u)-1,d>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=c}return(d?-1:1)*o*Math.pow(2,a-n)},t.write=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=5960464477539062e-23*(23===i),d=n?0:a-1,p=n?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=f/l:t+=f*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=p,o/=256,c-=8);e[r+d-p]|=128*m}},8954:function(e,t,r){e.exports=function(e,t){var r=e.length;if(0===r)throw Error("Must have at least d+1 points");var i=e[0].length;if(r<=i)throw Error("Must input at least d+1 points");var o=e.slice(0,i+1),s=n.apply(void 0,o);if(0===s)throw Error("Input not in general position");for(var l=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,Array(i+1),!1),f=h.adjacent,d=Array(i+2),u=0;u<=i;++u){for(var p=l.slice(),m=0;m<=i;++m)m===u&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var y=new a(p,Array(i+1),!0);f[u]=y,d[u]=y}d[i+1]=h;for(var u=0;u<=i;++u)for(var p=f[u].vertices,v=f[u].adjacent,m=0;m<=i;++m){var x=p[m];if(x<0){v[m]=h;continue}for(var b=0;b<=i;++b)0>f[b].vertices.indexOf(x)&&(v[m]=f[b])}for(var _=new c(i,o,d),w=!!t,u=i+1;u0;){e=o.pop();for(var s=e.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];f<0?i[h]=t:i[h]=a[f]}var d=this.orient();if(d>0)return c;c.lastVisited=-n,0===d&&o.push(c)}}}return null},u.walk=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,a=this.tuple,o=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];e: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(var u=0;u<=n;++u){var h=c[u];if(!(h.lastVisited>=r)){var f=a[u];a[u]=e;var d=this.orient();if(a[u]=f,d<0){s=h;continue e}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(e,t){var r=this.vertices.length-1,n=this.dimension,i=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,c.push(t);for(var f=[];h.length>0;){var t=h.pop(),d=t.vertices,p=t.adjacent,m=d.indexOf(r);if(!(m<0)){for(var g=0;g<=n;++g)if(g!==m){var y=p[g];if(!(!y.boundary||y.lastVisited>=r)){var v=y.vertices;if(y.lastVisited!==-r){for(var x=0,b=0;b<=n;++b)v[b]<0?(x=b,l[b]=e):l[b]=i[v[b]];if(this.orient()>0){v[x]=r,y.boundary=!1,c.push(y),h.push(y),y.lastVisited=r;continue}y.lastVisited=-r}var _=y.adjacent,w=d.slice(),k=p.slice(),T=new a(w,k,!0);u.push(T);var A=_.indexOf(t);if(!(A<0)){_[A]=T,k[m]=y,w[g]=-1,k[g]=t,p[g]=T,T.flip();for(var b=0;b<=n;++b){var M=w[b];if(!(M<0||M===r)){for(var S=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(var g=0;g+1=0?o[l++]=s[u]:c=1&u;if(c===(1&e)){var h=o[0];o[0]=o[1],o[1]=h}t.push(o)}}return t}},3352:function(e,t,r){var n=r(2478);function i(e,t,r,n,i){this.mid=e,this.left=t,this.right=r,this.leftPoints=n,this.rightPoints=i,this.count=(t?t.count:0)+(r?r.count:0)+n.length}e.exports=function(e){return new y(e&&0!==e.length?g(e):null)};var a=i.prototype;function o(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var r=g(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function l(e,t){var r=e.intervals([]);r.push(t),s(e,r)}function c(e,t){var r=e.intervals([]),n=r.indexOf(t);return n<0?0:(r.splice(n,1),s(e,r),1)}function u(e,t,r){for(var n=0;n=0&&e[n][1]>=t;--n){var i=r(e[n]);if(i)return i}}function f(e,t){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(t+1)?l(this,e):this.left.insert(e):this.left=g([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=g([e]);else{var r=n.ge(this.leftPoints,e,p),i=n.ge(this.rightPoints,e,m);this.leftPoints.splice(r,0,e),this.rightPoints.splice(i,0,e)}},a.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1))return c(this,e);var r=this.left.remove(e);return 2===r?(this.left=null,this.count-=1,1):(1===r&&(this.count-=1),r)}if(e[0]>this.mid){if(!this.right)return 0;if(4*(this.left?this.left.count:0)>3*(t-1))return c(this,e);var r=this.right.remove(e);return 2===r?(this.right=null,this.count-=1,1):(1===r&&(this.count-=1),r)}if(1===this.count)return 2*(this.leftPoints[0]===e);if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var i=this,a=this.left;a.right;)i=a,a=a.right;if(i===this)a.right=this.right;else{var s=this.left,r=this.right;i.count-=a.count,i.right=a.left,a.left=s,a.right=r}o(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(var s=n.ge(this.leftPoints,e,p);sthis.mid))return f(this.leftPoints,t);if(this.right){var r=this.right.queryPoint(e,t);if(r)return r}return h(this.rightPoints,e,t)},a.queryInterval=function(e,t,r){if(ethis.mid&&this.right){var n=this.right.queryInterval(e,t,r);if(n)return n}return tthis.mid?h(this.rightPoints,e,r):f(this.leftPoints,r)};var v=y.prototype;v.insert=function(e){this.root?this.root.insert(e):this.root=new i(e[0],null,null,[e],[e])},v.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},v.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},v.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,r)},Object.defineProperty(v,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(v,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9507:function(e){e.exports=!0},7163:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){var r;return null!=e&&(t(e)||"function"==typeof(r=e).readFloatLE&&"function"==typeof r.slice&&t(r.slice(0,0))||!!e._isBuffer)}},5219:function(e){e.exports=function(e){for(var t,r=e.length,n=0;n13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},395:function(e){e.exports=function(e,t,r){return e*(1-r)+t*r}},2652:function(e,t,r){var n=r(4335),i=r(6864),a=r(1903),o=r(9921),s=r(7608),l=r(5665),c={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},u=i(),h=i(),f=[0,0,0,0],d=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function m(e,t,r,n,i){e[0]=t[0]*n+r[0]*i,e[1]=t[1]*n+r[1]*i,e[2]=t[2]*n+r[2]*i}e.exports=function(e,t,r,i,g,y){if(t||(t=[0,0,0]),r||(r=[0,0,0]),i||(i=[0,0,0]),g||(g=[0,0,0,1]),y||(y=[0,0,0,1]),!n(u,e)||(a(h,u),h[3]=0,h[7]=0,h[11]=0,h[15]=1,Math.abs(1e-8>o(h))))return!1;var v,x,b,_,w,k,T,A,M,S=u[3],E=u[7],C=u[11],L=u[12],I=u[13],P=u[14],z=u[15];if(0!==S||0!==E||0!==C){if(f[0]=S,f[1]=E,f[2]=C,f[3]=z,!s(h,h))return!1;l(h,h),v=g,x=f,b=h,_=x[0],w=x[1],k=x[2],T=x[3],v[0]=b[0]*_+b[4]*w+b[8]*k+b[12]*T,v[1]=b[1]*_+b[5]*w+b[9]*k+b[13]*T,v[2]=b[2]*_+b[6]*w+b[10]*k+b[14]*T,v[3]=b[3]*_+b[7]*w+b[11]*k+b[15]*T}else g[0]=g[1]=g[2]=0,g[3]=1;if(t[0]=L,t[1]=I,t[2]=P,A=d,M=u,A[0][0]=M[0],A[0][1]=M[1],A[0][2]=M[2],A[1][0]=M[4],A[1][1]=M[5],A[1][2]=M[6],A[2][0]=M[8],A[2][1]=M[9],A[2][2]=M[10],r[0]=c.length(d[0]),c.normalize(d[0],d[0]),i[0]=c.dot(d[0],d[1]),m(d[1],d[1],d[0],1,-i[0]),r[1]=c.length(d[1]),c.normalize(d[1],d[1]),i[0]/=r[1],i[1]=c.dot(d[0],d[2]),m(d[2],d[2],d[0],1,-i[1]),i[2]=c.dot(d[1],d[2]),m(d[2],d[2],d[1],1,-i[2]),r[2]=c.length(d[2]),c.normalize(d[2],d[2]),i[1]/=r[2],i[2]/=r[2],c.cross(p,d[1],d[2]),0>c.dot(d[0],p))for(var O=0;O<3;O++)r[O]*=-1,d[O][0]*=-1,d[O][1]*=-1,d[O][2]*=-1;return y[0]=.5*Math.sqrt(Math.max(1+d[0][0]-d[1][1]-d[2][2],0)),y[1]=.5*Math.sqrt(Math.max(1-d[0][0]+d[1][1]-d[2][2],0)),y[2]=.5*Math.sqrt(Math.max(1-d[0][0]-d[1][1]+d[2][2],0)),y[3]=.5*Math.sqrt(Math.max(1+d[0][0]+d[1][1]+d[2][2],0)),d[2][1]>d[1][2]&&(y[0]=-y[0]),d[0][2]>d[2][0]&&(y[1]=-y[1]),d[1][0]>d[0][1]&&(y[2]=-y[2]),!0}},4335:function(e){e.exports=function(e,t){var r=t[15];if(0===r)return!1;for(var n=1/r,i=0;i<16;i++)e[i]=t[i]*n;return!0}},7442:function(e,t,r){var n=r(6658),i=r(7182),a=r(2652),o=r(9921),s=r(8648),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(e){return[e||0,e||0,e||0]}e.exports=function(e,t,r,h){if(0===o(t)||0===o(r))return!1;var f=a(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),d=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!!f&&!!d&&(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(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),!0)}},7182:function(e,t,r){var n={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},i=(n.create(),n.create());e.exports=function(e,t,r,a,o,s){return n.identity(e),n.fromRotationTranslation(e,s,t),e[3]=o[0],e[7]=o[1],e[11]=o[2],e[15]=o[3],n.identity(i),0!==a[2]&&(i[9]=a[2],n.multiply(e,e,i)),0!==a[1]&&(i[9]=0,i[8]=a[1],n.multiply(e,e,i)),0!==a[0]&&(i[8]=0,i[4]=a[0],n.multiply(e,e,i)),n.scale(e,e,r),e}},1811:function(e,t,r){var n=r(2478),i=r(7442),a=r(7608),o=r(5567),s=r(2408),l=r(7089),c=r(6582),u=r(7656),h=(r(2504),r(3536)),f=[0,0,0];function d(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.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(e){return new d((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=d.prototype;p.recalcMatrix=function(e){var t=this._time,r=n.le(t,e),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===t.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{for(var u=t[r+1]-t[r],l=16*r,f=this.prevMatrix,d=!0,c=0;c<16;++c)f[c]=s[l++];for(var p=this.nextMatrix,c=0;c<16;++c)p[c]=s[l++],d=d&&f[c]===p[c];if(u<1e-6||d)for(var c=0;c<16;++c)o[c]=f[c];else i(o,f,p,(e-t[r])/u)}var m=this.computedUp;m[0]=o[1],m[1]=o[5],m[2]=o[9],h(m,m);var g=this.computedInverse;a(g,o);var y=this.computedEye,v=g[15];y[0]=g[12]/v,y[1]=g[13]/v,y[2]=g[14]/v;for(var x=this.computedCenter,b=Math.exp(this.computedRadius[0]),c=0;c<3;++c)x[c]=y[c]-o[2+4*c]*b}},p.idle=function(e){if(!(e1&&0>=n(e[o[u-2]],e[o[u-1]],c);)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&n(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}for(var r=Array(s.length+o.length-2),h=0,i=0,f=o.length;i0;--d)r[h++]=s[d];return r};var n=r(3250)[3]},351:function(e,t,r){e.exports=function(e,t){t||(t=e,e=window);var r=0,i=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function c(e,s){var c=n.x(s),u=n.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==i||u!==a||l(s))&&(r=0|e,i=c||0,a=u||0,t&&t(r,i,a,o))}function u(e){c(0,e)}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,t&&t(0,0,0,o))}function f(e){l(e)&&t&&t(r,i,a,o)}function d(e){0===n.buttons(e)?c(0,e):c(r,e)}function p(e){c(r|n.buttons(e),e)}function m(e){c(r&~n.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",d),e.addEventListener("mousedown",p),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",h),e.addEventListener("keyup",f),e.addEventListener("keydown",f),e.addEventListener("keypress",f),e!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",f),window.addEventListener("keydown",f),window.addEventListener("keypress",f)))}g();var y={element:e};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(t){t?g():s&&(s=!1,e.removeEventListener("mousemove",d),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",h),e.removeEventListener("keyup",f),e.removeEventListener("keydown",f),e.removeEventListener("keypress",f),e!==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}}),y};var n=r(4687)},24:function(e){var t={left:0,top:0};e.exports=function(e,r,n){r=r||e.currentTarget||e.srcElement,Array.isArray(n)||(n=[0,0]);var i,a=e.clientX||0,o=e.clientY||0,s=(i=r)===window||i===document||i===document.body?t:i.getBoundingClientRect();return n[0]=a-s.left,n[1]=o-s.top,n}},4687:function(e,t){function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"==typeof e){if("buttons"in e)return e.buttons;if("which"in e){var t=e.which;if(2===t)return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1<(e.scalarArguments||0)&&t("Scalar arg count must be > 0"),"function"!=typeof e.vertex&&t("Must specify vertex creation function"),"function"!=typeof e.cell&&t("Must specify cell creation function"),"function"!=typeof e.phase&&t("Must specify phase function");for(var c=e.getters||[],u=Array(l),h=0;h=0?u[h]=!0:u[h]=!1;return r=e.vertex,a=e.cell,o=e.phase,(0,i[[u,s].join(",")])(r,a,o,n.mallocUint32,n.freeUint32)};var i={"false,0,1":function(e,t,r,n,i){return function(a,o,s,l){var c,u=0|a.shape[0],h=0|a.shape[1],f=a.data,d=0|a.offset,p=0|a.stride[0],m=0|a.stride[1],g=d,y=0|-p,v=0,x=0|-m,b=0,_=-p-m|0,w=0,k=0|p,T=m-p*u|0,A=0,M=0,S=0,E=2*u|0,C=n(E),L=n(E),I=0,P=0,z=-1,O=-1,D=0,R=0|-u,j=0|u,F=0,B=-u-1|0,N=u-1|0,U=0,V=0,q=0;for(A=0;A0){if(M=1,C[I++]=r(f[g],o,s,l),g+=k,u>0)for(A=1,c=f[g],P=C[I]=r(c,o,s,l),D=C[I+z],F=C[I+R],U=C[I+B],(P!==D||P!==F||P!==U)&&(v=f[g+y],e(A,M,c,v,b=f[g+x],w=f[g+_],P,D,F,U,o,s,l),V=L[I]=S++),I+=1,g+=k,A=2;A0)for(A=1,c=f[g],P=C[I]=r(c,o,s,l),D=C[I+z],F=C[I+R],U=C[I+B],(P!==D||P!==F||P!==U)&&(v=f[g+y],e(A,M,c,v,b=f[g+x],w=f[g+_],P,D,F,U,o,s,l),V=L[I]=S++,U!==F&&t(L[I+R],V,b,w,F,U,o,s,l)),I+=1,g+=k,A=2;A0){if(A=1,C[I++]=r(f[g],o,s,l),g+=k,h>0)for(M=1,c=f[g],P=C[I]=r(c,o,s,l),F=C[I+R],D=C[I+z],U=C[I+B],(P!==F||P!==D||P!==U)&&(v=f[g+y],e(A,M,c,v,b=f[g+x],w=f[g+_],P,F,D,U,o,s,l),V=L[I]=S++),I+=1,g+=k,M=2;M0)for(M=1,c=f[g],P=C[I]=r(c,o,s,l),F=C[I+R],D=C[I+z],U=C[I+B],(P!==F||P!==D||P!==U)&&(v=f[g+y],e(A,M,c,v,b=f[g+x],w=f[g+_],P,F,D,U,o,s,l),V=L[I]=S++,U!==F&&t(L[I+R],V,w,v,U,F,o,s,l)),I+=1,g+=k,M=2;M2&&a[1]>2&&n(i.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(i.pick(0,-1).lo(1).hi(a[1]-2),e.pick(0,-1,1).lo(1).hi(a[1]-2)),t(e.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(i.pick(a[0]-1,-1).lo(1).hi(a[1]-2),e.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),t(e.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(i.pick(-1,0).lo(1).hi(a[0]-2),e.pick(-1,0,0).lo(1).hi(a[0]-2)),t(e.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(i.pick(-1,a[1]-1).lo(1).hi(a[0]-2),e.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),t(e.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(a[0]-1,0,0,0),e.set(a[0]-1,0,1,0),e.set(0,a[1]-1,0,0),e.set(0,a[1]-1,1,0),e.set(a[0]-1,a[1]-1,0,0),e.set(a[0]-1,a[1]-1,1,0),e}}e.exports=function(e,t,r){return(Array.isArray(r)||(r="string"==typeof r?n(t.dimension,r):n(t.dimension,"clamp")),0===t.size)?e:0===t.dimension?(e.set(0),e):(function(e){var t,r=e.join(),n=c[r];if(n)return n;for(var i=e.length,a=[u,h],o=1;o<=i;++o)a.push((t=o)in l?l[t]:l[t]=s({funcName:"fdTemplate"+t}));var n=f.apply(void 0,a);return c[r]=n,n})(r)(e,t)}},4317:function(e){function t(e,t){var r=Math.floor(t),n=t-r,i=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|e[1];b>0;){b<64?(c=b,b=0):(c=64,b-=64),n=y+x*h+b*f,o=v+x*p+b*m;var _=0,w=0,k=0,T=h-u*d,A=f-l*h,M=p-u*g,S=m-l*p;for(k=0;k0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|e[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),n=d+m*u+g*c,o=p+m*f+g*h;var y=0,v=0,x=c-l*u,b=h-l*f;for(v=0;v0;){v<64?(c=v,v=0):(c=64,v-=64);for(var x=0|e[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|e[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),n=g+v*f+x*u+b*h,o=y+v*m+x*d+b*p;var _=0,w=0,k=0,T=u-c*f,A=h-s*u,M=d-c*m,S=p-s*d;for(k=0;kr;){for(y=0,v=m-o,g=0;gb)break;v+=h,y+=f}for(y=m,v=m-o,g=0;g>1,H=q-N,G=q+N,W=U,Y=H,X=q,Z=G,$=V,K=i+1,J=a-1,Q=!0,ee=0,et=0,er=0,en=t(h),ei=t(h);for(A=l*W,M=l*Y,B=s,T=0;T0){g=W,W=Y,Y=g;break}if(er<0)break;B+=d}for(A=l*Z,M=l*$,B=s,T=0;T0){g=Z,Z=$,$=g;break}if(er<0)break;B+=d}for(A=l*W,M=l*X,B=s,T=0;T0){g=W,W=X,X=g;break}if(er<0)break;B+=d}for(A=l*Y,M=l*X,B=s,T=0;T0){g=Y,Y=X,X=g;break}if(er<0)break;B+=d}for(A=l*W,M=l*Z,B=s,T=0;T0){g=W,W=Z,Z=g;break}if(er<0)break;B+=d}for(A=l*X,M=l*Z,B=s,T=0;T0){g=X,X=Z,Z=g;break}if(er<0)break;B+=d}for(A=l*Y,M=l*$,B=s,T=0;T0){g=Y,Y=$,$=g;break}if(er<0)break;B+=d}for(A=l*Y,M=l*X,B=s,T=0;T0){g=Y,Y=X,X=g;break}if(er<0)break;B+=d}for(A=l*Z,M=l*$,B=s,T=0;T0){g=Z,Z=$,$=g;break}if(er<0)break;B+=d}for(A=l*W,M=l*Y,S=l*X,E=l*Z,C=l*$,L=l*U,I=l*q,P=l*V,F=0,B=s,T=0;T0)J--;else if(er<0){for(A=l*b,M=l*K,S=l*J,B=s,T=0;T0)for(;;){for(_=s+J*l,F=0,T=0;T0){if(--JV){e:for(;;){for(_=s+K*l,F=0,B=s,T=0;T1&&l?c(h,l[0],l[1]):c(h));return u(h,f)}},446:function(e,t,r){var n=r(7640),i={};e.exports=function(e){var t=e.order,r=e.dtype,a=[t,r].join(":"),o=i[a];return o||(i[a]=o=n(t,r)),o(e),e}},9618:function(e,t,r){var n=r(7163),i="u">typeof Float64Array;function a(e,t){return e[0]-t[0]}function o(){var e,t=this.stride,r=Array(t.length);for(e=0;e=0&&(t+=a*(r=0|e),i-=r),new n(this.data,i,a,t)},i.step=function(e){var t=this.shape[0],r=this.stride[0],i=this.offset,a=0,o=Math.ceil;return"number"==typeof e&&((a=0|e)<0?(i+=r*(t-1),t=o(-t/a)):t=o(t/a),r*=a),new n(this.data,t,r,i)},i.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,r=this.stride;return new n(this.data,t[e],r[e],this.offset)},i.pick=function(e){var r=[],n=[],i=this.offset;return"number"==typeof e&&e>=0?i=i+this.stride[0]*e|0:(r.push(this.shape[0]),n.push(this.stride[0])),(0,t[r.length+1])(this.data,r,n,i)},function(e,t,r,i){return new n(e,t[0],r[0],i)}},2:function(e,t,r){function n(e,t,r,n,i,a){this.data=e,this.shape=[t,r],this.stride=[n,i],this.offset=0|a}var i=n.prototype;return i.dtype=e,i.dimension=2,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(i,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),i.set=function(t,r,n){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r,n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]=n},i.get=function(t,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]},i.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},i.hi=function(e,t){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},i.lo=function(e,t){var r=this.offset,i=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof e&&e>=0&&(r+=s*(i=0|e),a-=i),"number"==typeof t&&t>=0&&(r+=l*(i=0|t),o-=i),new n(this.data,a,o,s,l,r)},i.step=function(e,t){var r=this.shape[0],i=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof e&&((l=0|e)<0?(s+=a*(r-1),r=c(-r/l)):r=c(r/l),a*=l),"number"==typeof t&&((l=0|t)<0?(s+=o*(i-1),i=c(-i/l)):i=c(i/l),o*=l),new n(this.data,r,i,a,o,s)},i.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var r=this.shape,i=this.stride;return new n(this.data,r[e],r[t],i[e],i[t],this.offset)},i.pick=function(e,r){var n=[],i=[],a=this.offset;return"number"==typeof e&&e>=0?a=a+this.stride[0]*e|0:(n.push(this.shape[0]),i.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(n.push(this.shape[1]),i.push(this.stride[1])),(0,t[n.length+1])(this.data,n,i,a)},function(e,t,r,i){return new n(e,t[0],t[1],r[0],r[1],i)}},3:function(e,t,r){function n(e,t,r,n,i,a,o,s){this.data=e,this.shape=[t,r,n],this.stride=[i,a,o],this.offset=0|s}var i=n.prototype;return i.dtype=e,i.dimension=3,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(i,"order",{get:function(){var e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return e>t?t>r?[2,1,0]:e>r?[1,2,0]:[1,0,2]:e>r?[2,0,1]:r>t?[0,1,2]:[0,2,1]}}),i.set=function(t,r,n,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]=i},i.get=function(t,r,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n]},i.index=function(e,t,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r},i.hi=function(e,t,r){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},i.lo=function(e,t,r){var i=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],h=this.stride[2];return"number"==typeof e&&e>=0&&(i+=c*(a=0|e),o-=a),"number"==typeof t&&t>=0&&(i+=u*(a=0|t),s-=a),"number"==typeof r&&r>=0&&(i+=h*(a=0|r),l-=a),new n(this.data,o,s,l,c,u,h,i)},i.step=function(e,t,r){var i=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,h=0,f=Math.ceil;return"number"==typeof e&&((h=0|e)<0?(u+=s*(i-1),i=f(-i/h)):i=f(i/h),s*=h),"number"==typeof t&&((h=0|t)<0?(u+=l*(a-1),a=f(-a/h)):a=f(a/h),l*=h),"number"==typeof r&&((h=0|r)<0?(u+=c*(o-1),o=f(-o/h)):o=f(o/h),c*=h),new n(this.data,i,a,o,s,l,c,u)},i.transpose=function(e,t,r){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r;var i=this.shape,a=this.stride;return new n(this.data,i[e],i[t],i[r],a[e],a[t],a[r],this.offset)},i.pick=function(e,r,n){var i=[],a=[],o=this.offset;return"number"==typeof e&&e>=0?o=o+this.stride[0]*e|0:(i.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(i.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof n&&n>=0?o=o+this.stride[2]*n|0:(i.push(this.shape[2]),a.push(this.stride[2])),(0,t[i.length+1])(this.data,i,a,o)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],r[0],r[1],r[2],i)}},4:function(e,t,r){function n(e,t,r,n,i,a,o,s,l,c){this.data=e,this.shape=[t,r,n,i],this.stride=[a,o,s,l],this.offset=0|c}var i=n.prototype;return i.dtype=e,i.dimension=4,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(t,r,n,i,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]=a},i.get=function(t,r,n,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i]},i.index=function(e,t,r,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n},i.hi=function(e,t,r,i){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},i.lo=function(e,t,r,i){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],h=this.stride[0],f=this.stride[1],d=this.stride[2],p=this.stride[3];return"number"==typeof e&&e>=0&&(a+=h*(o=0|e),s-=o),"number"==typeof t&&t>=0&&(a+=f*(o=0|t),l-=o),"number"==typeof r&&r>=0&&(a+=d*(o=0|r),c-=o),"number"==typeof i&&i>=0&&(a+=p*(o=0|i),u-=o),new n(this.data,s,l,c,u,h,f,d,p,a)},i.step=function(e,t,r,i){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],h=this.stride[2],f=this.stride[3],d=this.offset,p=0,m=Math.ceil;return"number"==typeof e&&((p=0|e)<0?(d+=c*(a-1),a=m(-a/p)):a=m(a/p),c*=p),"number"==typeof t&&((p=0|t)<0?(d+=u*(o-1),o=m(-o/p)):o=m(o/p),u*=p),"number"==typeof r&&((p=0|r)<0?(d+=h*(s-1),s=m(-s/p)):s=m(s/p),h*=p),"number"==typeof i&&((p=0|i)<0?(d+=f*(l-1),l=m(-l/p)):l=m(l/p),f*=p),new n(this.data,a,o,s,l,c,u,h,f,d)},i.transpose=function(e,t,r,i){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i;var a=this.shape,o=this.stride;return new n(this.data,a[e],a[t],a[r],a[i],o[e],o[t],o[r],o[i],this.offset)},i.pick=function(e,r,n,i){var a=[],o=[],s=this.offset;return"number"==typeof e&&e>=0?s=s+this.stride[0]*e|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof n&&n>=0?s=s+this.stride[2]*n|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"==typeof i&&i>=0?s=s+this.stride[3]*i|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,t[a.length+1])(this.data,a,o,s)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],r[0],r[1],r[2],r[3],i)}},5:function(e,t,r){function n(e,t,r,n,i,a,o,s,l,c,u,h){this.data=e,this.shape=[t,r,n,i,a],this.stride=[o,s,l,c,u],this.offset=0|h}var i=n.prototype;return i.dtype=e,i.dimension=5,Object.defineProperty(i,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(i,"order",{get:r}),i.set=function(t,r,n,i,a,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]=o},i.get=function(t,r,n,i,a){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*n+this.stride[3]*i+this.stride[4]*a]},i.index=function(e,t,r,n,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*n+this.stride[4]*i},i.hi=function(e,t,r,i,a){return new n(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof i||i<0?this.shape[3]:0|i,"number"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},i.lo=function(e,t,r,i,a){var o=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],h=this.shape[3],f=this.shape[4],d=this.stride[0],p=this.stride[1],m=this.stride[2],g=this.stride[3],y=this.stride[4];return"number"==typeof e&&e>=0&&(o+=d*(s=0|e),l-=s),"number"==typeof t&&t>=0&&(o+=p*(s=0|t),c-=s),"number"==typeof r&&r>=0&&(o+=m*(s=0|r),u-=s),"number"==typeof i&&i>=0&&(o+=g*(s=0|i),h-=s),"number"==typeof a&&a>=0&&(o+=y*(s=0|a),f-=s),new n(this.data,l,c,u,h,f,d,p,m,g,y,o)},i.step=function(e,t,r,i,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],h=this.stride[0],f=this.stride[1],d=this.stride[2],p=this.stride[3],m=this.stride[4],g=this.offset,y=0,v=Math.ceil;return"number"==typeof e&&((y=0|e)<0?(g+=h*(o-1),o=v(-o/y)):o=v(o/y),h*=y),"number"==typeof t&&((y=0|t)<0?(g+=f*(s-1),s=v(-s/y)):s=v(s/y),f*=y),"number"==typeof r&&((y=0|r)<0?(g+=d*(l-1),l=v(-l/y)):l=v(l/y),d*=y),"number"==typeof i&&((y=0|i)<0?(g+=p*(c-1),c=v(-c/y)):c=v(c/y),p*=y),"number"==typeof a&&((y=0|a)<0?(g+=m*(u-1),u=v(-u/y)):u=v(u/y),m*=y),new n(this.data,o,s,l,c,u,h,f,d,p,m,g)},i.transpose=function(e,t,r,i,a){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,i=void 0===i?3:0|i,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new n(this.data,o[e],o[t],o[r],o[i],o[a],s[e],s[t],s[r],s[i],s[a],this.offset)},i.pick=function(e,r,n,i,a){var o=[],s=[],l=this.offset;return"number"==typeof e&&e>=0?l=l+this.stride[0]*e|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof n&&n>=0?l=l+this.stride[2]*n|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof i&&i>=0?l=l+this.stride[3]*i|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,t[o.length+1])(this.data,o,s,l)},function(e,t,r,i){return new n(e,t[0],t[1],t[2],t[3],t[4],r[0],r[1],r[2],r[3],r[4],i)}}},l={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(e,t,r,a){if(void 0===e){var c=l.array[0];return c([])}"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var u=t.length;if(void 0===r){r=Array(u);for(var h=u-1,f=1;h>=0;--h)r[h]=f,f*=t[h]}if(void 0===a){a=0;for(var h=0;he==e>0?0xffffffff===i?(r+=1,i=0):i+=1:0===i?(i=0xffffffff,r-=1):i-=1,n.pack(i,r)}},8406:function(e,t){t.vertexNormals=function(e,t,r){for(var n=t.length,i=Array(n),a=void 0===r?1e-6:r,o=0;oa)for(var b=i[c],_=1/Math.sqrt(g*v),x=0;x<3;++x){var w=(x+1)%3,k=(x+2)%3;b[x]+=_*(y[w]*m[k]-y[k]*m[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(T),x=0;x<3;++x)b[x]*=_;else for(var x=0;x<3;++x)b[x]=0}return i},t.faceNormals=function(e,t,r){for(var n=e.length,i=Array(n),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(d):0;for(var c=0;c<3;++c)f[c]*=d;i[o]=f}return i}},4081:function(e){e.exports=function(e,t,r,n,i,a,o,s,l,c){var u=t+a+c;if(h>0){var h=Math.sqrt(u+1);e[0]=.5*(o-l)/h,e[1]=.5*(s-n)/h,e[2]=.5*(r-a)/h,e[3]=.5*h}else{var f=Math.max(t,a,c),h=Math.sqrt(2*f-u+1);t>=f?(e[0]=.5*h,e[1]=.5*(i+r)/h,e[2]=.5*(s+n)/h,e[3]=.5*(o-l)/h):a>=f?(e[0]=.5*(r+i)/h,e[1]=.5*h,e[2]=.5*(l+o)/h,e[3]=.5*(s-n)/h):(e[0]=.5*(n+s)/h,e[1]=.5*(o+l)/h,e[2]=.5*h,e[3]=.5*(r-i)/h)}return e}},9977:function(e,t,r){e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.rotation||[0,0,0,1],n=e.radius||1;t=[].slice.call(t,0,3),u(r=[].slice.call(r,0,4),r);var i=new h(r,t,Math.log(n));return i.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&i.lookAt(0,e.eye,e.center,e.up),i};var n=r(9215),i=r(6582),a=r(7399),o=r(7608),s=r(4081);function l(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function c(e,t,r,n){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2)+Math.pow(n,2))}function u(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=c(r,n,i,a);o>1e-6?(e[0]=r/o,e[1]=n/o,e[2]=i/o,e[3]=a/o):(e[0]=e[1]=e[2]=0,e[3]=1)}function h(e,t,r){this.radius=n([r]),this.center=n(t),this.rotation=n(e),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(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var r=this.computedMatrix;a(r,t);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(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r},f.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},f.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},f.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);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],d=u*a+h*o+f*s;u-=a*d;var p=l(u,h-=o*d,f-=s*d);u/=p,h/=p,f/=p;var m=i[2],g=i[6],y=i[10],v=m*a+g*o+y*s,x=m*u+g*h+y*f;m-=v*a+x*u;var b=l(m,g-=v*o+x*h,y-=v*s+x*f);m/=b,g/=b,y/=b;var _=u*t+a*r,w=h*t+o*r,k=f*t+s*r;this.center.move(e,_,w,k);var T=Math.exp(this.computedRadius[0]);T=Math.max(1e-4,T+n),this.radius.set(e,Math.log(T))},f.rotate=function(e,t,r,n){this.recalcMatrix(e),t=t||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],d=i[2],p=i[6],m=i[10],g=t*a+r*u,y=t*o+r*h,v=t*s+r*f,x=-(p*v-m*y),b=-(m*g-d*v),_=-(d*y-p*g),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*_,I=S*w+E*_+A*b-M*x,P=E*w-A*x-M*b-S*_;if(n){x=d;var z=Math.sin(n)/l(x,b=p,_=m);x*=z,b*=z,_*=z,C=C*(w=Math.cos(t))+P*x+L*_-I*b,L=L*w+P*b+I*x-C*_,I=I*w+P*_+C*b-L*x,P=P*w-C*x-L*b-I*_}var O=c(C,L,I,P);O>1e-6?(C/=O,L/=O,I/=O,P/=O):(C=L=I=0,P=1),this.rotation.set(e,C,L,I,P)},f.lookAt=function(e,t,r,n){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,n=n||this.computedUp;var a=this.computedMatrix;i(a,t,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(e,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},f.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},f.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var n=this.computedMatrix;o(n,t);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(e);var h=Math.exp(this.computedRadius[0]);this.center.set(e,a-n[2]*h,l-n[6]*h,c-n[10]*h),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},f.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},f.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=Math.max(t=t>0?Math.log(t):1/0,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},f.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[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(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var n=e.rotation;n&&this.rotation.set(t,n[0],n[1],n[2],n[3]);var i=e.distance;i&&i>0&&this.radius.set(t,Math.log(i)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},1371:function(e,t,r){var n=r(3233);e.exports=function(e,t,r){return n(r="u">typeof r?r+"":" ",t)+e}},3202:function(e){e.exports=function(e,t){t||(t=[0,""]);var r=parseFloat(e=String(e),10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},3088:function(e,t,r){e.exports=function(e,t){for(var r=0|t.length,i=e.length,a=[Array(r),Array(r)],o=0;o0){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],d=0;d0&&(o=p,s=m,l=h)}return i||o&&c(o,l),s}for(var o=0;o0;){a[0][o].length;var d=function(e,r){var i=a[r][e][0],o=[e];c(i,r);for(var s=i[1^r];;){for(;s!==e;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][e].length+a[1][e].length===0)break;var l=o[o.length-1],h=o[1],f=u(l,e,!0);if(0>n(t[l],t[e],t[h],t[f]))break;o.push(e),s=u(l,e)}return o}(o,h);d[1]===d[d.length-1]?f.push.apply(f,d):(f.length>0&&l.push(f),f=d)}f.length>0&&l.push(f)}return l};var n=r(3140)},5609:function(e,t,r){e.exports=function(e,t){for(var r=n(e,t.length),i=Array(t.length),a=Array(t.length),o=[],s=0;s0;){var c=o.pop();i[c]=!1;for(var u=r[c],s=0;s0});for(var m=p.length,g=Array(m),y=Array(m),d=0;d0;){var F=R.pop(),B=E[F];l(B,function(e,t){return e-t});var N,U=B.length,V=j[F];if(0===V){var w=p[F];N=[w]}for(var d=0;d=0)&&(j[q]=1^V,R.push(q),0===V)){var w=p[q];D(w)||(w.reverse(),N.push(w))}}0===V&&r.push(N)}return r};var n=r(3134),i=r(3088),a=r(5085),o=r(5250),s=r(8210),l=r(1682),c=r(5609);function u(e,t){for(var r=Array(e),n=0;n0)||a[t]!==e[0])return 1;else i=r[t-1];for(var s=1;i;){var l=i.key,c=n(e,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});return 0===f.length?_:(s=l(f),function(e){return s(e[0],e[1])?0:_(e)})};var n=r(3250)[3],i=r(4209),a=r(3352),o=r(2478);function s(){return!0}function l(e){for(var t={},r=0;r=d?(T=1,w=d+2*g+v):(T=-g/d,w=g*T+v)):(T=0,y>=0?(A=0,w=v):-y>=m?(A=1,w=m+2*y+v):(A=-y/m,w=y*A+v));else if(A<0)A=0,g>=0?(T=0,w=v):-g>=d?(T=1,w=d+2*g+v):(T=-g/d,w=g*T+v);else{var M=1/k;T*=M,A*=M,w=T*(d*T+p*A+2*g)+A*(p*T+m*A+2*y)+v}else T<0?(l=p+g,(c=m+y)>l?(u=c-l)>=(h=d-2*p+m)?(T=1,A=0,w=d+2*g+v):(A=1-(T=u/h),w=T*(d*T+p*A+2*g)+A*(p*T+m*A+2*y)+v):(T=0,c<=0?(A=1,w=m+2*y+v):y>=0?(A=0,w=v):(A=-y/m,w=y*A+v))):A<0?(l=p+y,(c=d+g)>l?(u=c-l)>=(h=d-2*p+m)?(A=1,T=0,w=m+2*y+v):w=(T=1-(A=u/h))*(d*T+p*A+2*g)+A*(p*T+m*A+2*y)+v:(A=0,c<=0?(T=1,w=d+2*g+v):g>=0?(T=0,w=v):(T=-g/d,w=g*T+v))):(u=m+y-p-g)<=0?(T=0,A=1,w=m+2*y+v):u>=(h=d-2*p+m)?(T=1,A=0,w=d+2*g+v):(A=1-(T=u/h),w=T*(d*T+p*A+2*g)+A*(p*T+m*A+2*y)+v);for(var S=1-T-A,f=0;f0){var c=e[r-1];if(0===n(s,c)&&a(c)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},3233:function(e){var t,r="";e.exports=function(e,n){if("string"!=typeof e)throw TypeError("expected a string");if(1===n)return e;if(2===n)return e+e;var i=e.length*n;if(t!==e||typeof t>"u")t=e,r="";else if(r.length>=i)return r.substr(0,i);for(;i>r.length&&n>1;)1&n&&(r+=e),n>>=1,e+=e;return r+=e,r=r.substr(0,i)}},3025:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(e){e.exports=function(e){for(var t=e.length,r=e[e.length-1],n=t,i=t-2;i>=0;--i){var a=r,o=e[i],s=(r=a+o)-a,l=o-s;l&&(e[--n]=r,r=l)}for(var c=0,i=n;i0){if(a<=0)return o;n=i+a}else{if(!(i<0)||a>=0)return o;n=-(i+a)}var l=s*n;return o>=l||o<=-l?o:u(e,t,r)},function(e,t,r,n){var i=e[0]-n[0],a=t[0]-n[0],o=r[0]-n[0],s=e[1]-n[1],c=t[1]-n[1],u=r[1]-n[1],f=e[2]-n[2],d=t[2]-n[2],p=r[2]-n[2],m=a*u,g=o*c,y=o*s,v=i*u,x=i*c,b=a*s,_=f*(m-g)+d*(y-v)+p*(x-b),w=l*((Math.abs(m)+Math.abs(g))*Math.abs(f)+(Math.abs(y)+Math.abs(v))*Math.abs(d)+(Math.abs(x)+Math.abs(b))*Math.abs(p));return _>w||-_>w?_:h(e,t,r,n)}];f.length<=5;)f.push(c(f.length));e.exports=(function(e,t,r,n,i,a,o){return function(t,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return n(t,r);case 3:return i(t,r,s);case 4:return a(t,r,s,l);case 5:return o(t,r,s,l,c)}for(var u=Array(arguments.length),h=0;h0&&o>0||a<0&&o<0)return!1;var s=n(r,e,t),l=n(i,e,t);return(!(s>0)||!(l>0))&&(!(s<0)||!(l<0))&&(0!==a||0!==o||0!==s||0!==l||function(e,t,r,n){for(var i=0;i<2;++i){var a=e[i],o=t[i],s=Math.min(a,o),l=Math.max(a,o),c=r[i],u=n[i],h=Math.min(c,u);if(Math.max(c,u)=n?(c=g,(d+=1)=n?(c=g,(d+=1)"u"&&(s=function(e){for(var t=e.length,r=0,n=0;n>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},t.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var n=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|n[e>>>16&255]<<8|n[e>>>24&255]},t.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},t.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},t.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},t.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},2014:function(e,t,r){var n=r(3105),i=r(4623);function a(e,t){var r=e.length,n=e.length-t.length,i=Math.min;if(n)return n;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:var a=e[0]+e[1]-t[0]-t[1];return a||i(e[0],e[1])-i(t[0],t[1]);case 3:var o=e[0]+e[1],s=t[0]+t[1];if(a=o+e[2]-(s+t[2]))return a;var l=i(e[0],e[1]),c=i(t[0],t[1]),a=i(l,e[2])-i(c,t[2]);return a||i(l+e[2],o)-i(c+t[2],s);default:var u=e.slice(0);u.sort();var h=t.slice(0);h.sort();for(var f=0;f>1,s=a(e[o],t);s<=0?(0===s&&(i=o),r=o+1):s>0&&(n=o-1)}return i}function u(e,t){for(var r=Array(e.length),i=0,o=r.length;i=e.length||0!==a(e[g],s)););}return r}function h(e,t){if(t<0)return[];for(var r=[],i=(1<>>u&1&&c.push(i[u]);t.push(c)}return s(t)},t.skeleton=h,t.boundary=function(e){for(var t=[],r=0,n=e.length;r0;){var r,n=1&(r=e)?r-1>>1:(r>>1)-1;if(n>=0&&t0){var e=w[0];return g(0,T-1),T-=1,v(0),e}return -1}function _(e,t){var r=w[e];return c[r]===t?e:(c[r]=-1/0,x(e),b(),c[r]=t,x((T+=1)-1))}for(var w=[],k=Array(a),h=0;h>1;h>=0;--h)v(h);for(;;){var A=b();if(A<0||c[A]>r)break;!function(e){if(!u[e]){u[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),k[t]>=0&&_(k[t],m(t)),k[r]>=0&&_(k[r],m(r))}}(A)}for(var M=[],h=0;h=0&&r>=0&&t!==r){var n=k[t],i=k[r];n!==i&&E.push([n,i])}}),i.unique(i.normalize(E)),{positions:M,edges:E}};var n=r(3250),i=r(2014)},1303:function(e,t,r){e.exports=function(e,t){if(t[0][0]t[1][0]))return i(t,e);r=t[1],a=t[0]}if(e[0][0]e[1][0]))return-i(e,t);o=e[1],s=e[0]}var r,a,o,s,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=r(3250);function i(e,t){if(t[0][0]t[1][0])r=t[1],i=t[0];else{var r,i,a,o,s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return lu?s-u:l-u}e[0][1]0)if(t[0]!==o[1][0])r=e,e=e.right;else{var l=c(e.right,t);if(l)return l;e=e.left}else{if(t[0]!==o[1][0])return e;var l=c(e.right,t);if(l)return l;e=e.left}}return r}function u(e,t,r,n){this.y=e,this.index=t,this.start=r,this.closed=n}function h(e,t,r,n){this.x=e,this.segment=t,this.create=r,this.index=n}s.prototype.castUp=function(e){var t=n.le(this.coordinates,e[0]);if(t<0)return -1;this.slabs[t];var r=c(this.slabs[t],e),i=-1;if(r&&(i=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?o(u.key,s)>0&&(s=u.key,i=u.value):(i=u.value,s=u.key))}var h=this.horizontal[t];if(h.length>0){var f=n.ge(h,e[1],l);if(f=h.length)return i;d=h[f]}}if(d.start)if(s){var p=a(s[0],s[1],[e[0],d.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(i=d.index)}else i=d.index;else d.y!==e[1]&&(i=d.index)}}}return i}},5202:function(e,t,r){var n=r(1944),i=r(8210);function a(e,t){var r=i(n(e,t),[t[t.length-1]]);return r[r.length-1]}function o(e,t,r,n){var i=-t/(n-t);i<0?i=0:i>1&&(i=1);for(var a=1-i,o=e.length,s=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(e,t){for(var r=[],n=a(e[e.length-1],t),i=e[e.length-1],s=e[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(e,t){for(var r=[],n=a(e[e.length-1],t),i=e[e.length-1],s=e[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}},3387:function(e,t,r){var n;!function(){var i=/[^T]/,a=/[^v]/,o=/[diefg]/,s=/[bcdiefguxX]/,l=/[j]/,c=/^[^\x25]+/,u=/^\x25{2}/,h=/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,f=/^([a-z_][a-z_\d]*)/i,d=/^\.([a-z_][a-z_\d]*)/i,p=/^\[(\d+)\]/,m=/^[+-]/;function g(e){return function(e,t){var r,n,c,u,h,f,d,p,y,v=1,x=e.length,b="";for(n=0;n=0),u.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,u.width?parseInt(u.width):0);break;case"e":r=u.precision?parseFloat(r).toExponential(u.precision):parseFloat(r).toExponential();break;case"f":r=u.precision?parseFloat(r).toFixed(u.precision):parseFloat(r);break;case"g":r=u.precision?String(Number(r.toPrecision(u.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=u.precision?r.substring(0,u.precision):r;break;case"t":r=String(!!r),r=u.precision?r.substring(0,u.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=u.precision?r.substring(0,u.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=u.precision?r.substring(0,u.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}l.test(u.type)?b+=r:(o.test(u.type)&&(!p||u.sign)?(y=p?"+":"-",r=r.toString().replace(m,"")):y="",f=u.pad_char?"0"===u.pad_char?"0":u.pad_char.charAt(1):" ",d=u.width-(y+r).length,h=u.width&&d>0?f.repeat(d):"",b+=u.align?y+r+h:"0"===f?y+h+r:h+y+r)}return b}(function(e){if(v[e])return v[e];for(var t,r=e,n=[],i=0;r;){if(null!==(t=c.exec(r)))n.push(t[0]);else if(null!==(t=u.exec(r)))n.push("%");else if(null!==(t=h.exec(r))){if(t[2]){i|=1;var a=[],o=t[2],s=[];if(null!==(s=f.exec(o)))for(a.push(s[1]);""!==(o=o.substring(s[0].length));)if(null!==(s=d.exec(o)))a.push(s[1]);else if(null!==(s=p.exec(o)))a.push(s[1]);else throw SyntaxError("[sprintf] failed to parse named argument key");else throw SyntaxError("[sprintf] failed to parse named argument key");t[2]=a}else i|=2;if(3===i)throw Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}else throw SyntaxError("[sprintf] unexpected placeholder");r=r.substring(t[0].length)}return v[e]=n}(e),arguments)}function y(e,t){return g.apply(null,[e].concat(t||[]))}var v=Object.create(null);t.sprintf=g,t.vsprintf=y,"u">typeof window&&(window.sprintf=g,window.vsprintf=y,void 0!==(n=(function(){return{sprintf:g,vsprintf:y}}).call(t,r,t,e))&&(e.exports=n))}()},3711:function(e,t,r){e.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var r=i(e,t),n=r.length,a=Array(n),o=Array(n),s=0;sn|0},vertex:function(e,t,r,n,i,a,o,s,l,c,u,h,f){var d=(0|o)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==d&&15!==d)switch(d){case 0:case 15:u.push([e-.5,t-.5]);break;case 1:u.push([e-.25-.25*(n+r-2*f)/(r-n),t-.25-.25*(i+r-2*f)/(r-i)]);break;case 2:u.push([e-.75-.25*(-n-r+2*f)/(n-r),t-.25-.25*(a+n-2*f)/(n-a)]);break;case 3:u.push([e-.5,t-.5-.5*(i+r+a+n-4*f)/(r-i+n-a)]);break;case 4:u.push([e-.25-.25*(a+i-2*f)/(i-a),t-.75-.25*(-i-r+2*f)/(i-r)]);break;case 5:u.push([e-.5-.5*(n+r+a+i-4*f)/(r-n+i-a),t-.5]);break;case 6:u.push([e-.5-.25*(-n-r+a+i)/(n-r+i-a),t-.5-.25*(-i-r+a+n)/(i-r+n-a)]);break;case 7:u.push([e-.75-.25*(a+i-2*f)/(i-a),t-.75-.25*(a+n-2*f)/(n-a)]);break;case 8:u.push([e-.75-.25*(-a-i+2*f)/(a-i),t-.75-.25*(-a-n+2*f)/(a-n)]);break;case 9:u.push([e-.5-.25*(n+r+-a-i)/(r-n+a-i),t-.5-.25*(i+r+-a-n)/(r-i+a-n)]);break;case 10:u.push([e-.5-.5*(-n-r+-a-i+4*f)/(n-r+a-i),t-.5]);break;case 11:u.push([e-.25-.25*(-a-i+2*f)/(a-i),t-.75-.25*(i+r-2*f)/(r-i)]);break;case 12:u.push([e-.5,t-.5-.5*(-i-r+-a-n+4*f)/(i-r+a-n)]);break;case 13:u.push([e-.75-.25*(n+r-2*f)/(r-n),t-.25-.25*(-a-n+2*f)/(a-n)]);break;case 14:u.push([e-.25-.25*(-n-r+2*f)/(n-r),t-.25-.25*(-i-r+2*f)/(i-r)])}},cell:function(e,t,r,n,i,a,o,s,l){i?s.push([e,t]):s.push([t,e])}});return function(e,t){var r=[],i=[];return n(e,r,i,t),{positions:r,cells:i}}}},o={}},665:function(e,t,r){var n=r(3202);function i(e,t){var r=n(getComputedStyle(e).getPropertyValue(t));return r[0]*a(r[1],e)}function a(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":var r,n,a,o;return r=e,n=t,(a=document.createElement("div")).style["font-size"]="128"+r,n.appendChild(a),o=i(a,"font-size")/128,n.removeChild(a),o;case"em":return i(t,"font-size");case"rem":return i(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}e.exports=a},7261:function(e,t,r){e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.up||[0,1,0],n=e.right||h(r),i=e.radius||1,a=e.theta||0,u=e.phi||0;if(t=[].slice.call(t,0,3),s(r=[].slice.call(r,0,3),r),s(n=[].slice.call(n,0,3),n),"eye"in e){var d=e.eye,p=[d[0]-t[0],d[1]-t[1],d[2]-t[2]];o(n,p,r),1e-6>c(n[0],n[1],n[2])?n=h(r):s(n,n),i=c(p[0],p[1],p[2]);var m=l(r,p)/i,g=l(n,p)/i;u=Math.acos(m),a=Math.acos(g)}return i=Math.log(i),new f(e.zoomMin,e.zoomMax,t,r,n,i,a,u)};var n=r(9215),i=r(7608),a=r(6079),o=r(5911),s=r(3536),l=r(244);function c(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function u(e){return Math.min(1,Math.max(-1,e))}function h(e){var t=Math.abs(e[0]),r=Math.abs(e[1]),n=Math.abs(e[2]),i=[0,0,0];t>Math.max(r,n)?i[2]=1:r>Math.max(t,n)?i[0]=1:i[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=e[l]*e[l],o+=i[l]*e[l];for(var l=0;l<3;++l)i[l]-=o/a*e[l];return s(i,i),i}function f(e,t,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(e,t),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=Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var d=f.prototype;d.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=Math.max(t=t>0?Math.log(t):1/0,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},d.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},d.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,n=0,i=0,a=0;a<3;++a)i+=t[a]*r[a],n+=t[a]*t[a];for(var l=Math.sqrt(n),u=0,a=0;a<3;++a)r[a]-=t[a]*i/n,u+=r[a]*r[a],t[a]/=l;for(var h=Math.sqrt(u),a=0;a<3;++a)r[a]/=h;var f=this.computedToward;o(f,t,r),s(f,f);for(var d=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),y=Math.sin(p),v=Math.cos(m),x=Math.sin(m),b=this.computedCenter,_=g*v,w=y*v,k=-g*x,T=-y*x,A=this.computedEye,M=this.computedMatrix,a=0;a<3;++a){var S=_*r[a]+w*f[a]+x*t[a];M[4*a+1]=k*r[a]+T*f[a]+v*t[a],M[4*a+2]=S,M[4*a+3]=0}var E=M[1],C=M[5],L=M[9],I=M[2],P=M[6],z=M[10],O=C*z-L*P,D=L*I-E*z,R=E*P-C*I,j=c(O,D,R);O/=j,D/=j,R/=j,M[0]=O,M[4]=D,M[8]=R;for(var a=0;a<3;++a)A[a]=b[a]+M[2+4*a]*d;for(var a=0;a<3;++a){for(var u=0,F=0;F<3;++F)u+=M[a+4*F]*A[F];M[12+a]=-u}M[15]=1},d.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var n=0;n<16;++n)t[n]=r[n];return t}return r};var p=[0,0,0];d.rotate=function(e,t,r,n){if(this.angle.move(e,t,r),n){this.recalcMatrix(e);var i=this.computedMatrix;p[0]=i[2],p[1]=i[6],p[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,p);for(var c=0;c<3;++c)o[c]=i[4*c],s[c]=i[4*c+1];this.up.set(e,o[0],o[1],o[2]),this.right.set(e,s[0],s[1],s[2])}},d.pan=function(e,t,r,n){t=t||0,r=r||0,n=n||0,this.recalcMatrix(e);var i=this.computedMatrix,a=(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],d=u*a+h*o+f*s;u-=a*d;var p=c(u,h-=o*d,f-=s*d);u/=p,h/=p,f/=p;var m=u*t+a*r,g=h*t+o*r,y=f*t+s*r;this.center.move(e,m,g,y);var v=Math.exp(this.computedRadius[0]);v=Math.max(1e-4,v+n),this.radius.set(e,Math.log(v))},d.translate=function(e,t,r,n){this.center.move(e,t||0,r||0,n||0)},d.setMatrix=function(e,t,r,n){var a,o,s=1;"number"==typeof r&&(s=0|r),(s<0||s>3)&&(s=1);var l=(s+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var h=t[s],f=t[s+4],d=t[s+8];if(n){var p=Math.abs(h),m=Math.abs(d),g=Math.max(p,Math.abs(f),m);p===g?(h=h<0?-1:1,f=d=0):m===g?(d=d<0?-1:1,h=f=0):(f=f<0?-1:1,h=d=0)}else{var y=c(h,f,d);h/=y,f/=y,d/=y}var v=t[l],x=t[l+4],b=t[l+8],_=v*h+x*f+b*d;v-=h*_;var w=c(v,x-=f*_,b-=d*_);v/=w,x/=w;var k=f*(b/=w)-d*x,T=d*v-h*b,A=h*x-f*v,M=c(k,T,A);if(k/=M,T/=M,A/=M,this.center.jump(e,q,H,G),this.radius.idle(e),this.up.jump(e,h,f,d),this.right.jump(e,v,x,b),2===s){var S=t[1],E=t[5],C=t[9],L=S*v+E*x+C*b,I=S*k+E*T+C*A;a=D<0?-Math.PI/2:Math.PI/2,o=Math.atan2(I,L)}else{var P=t[2],z=t[6],O=t[10],D=P*h+z*f+O*d,R=P*v+z*x+O*b,j=P*k+z*T+O*A;a=Math.asin(u(D)),o=Math.atan2(j,R)}this.angle.jump(e,o,a),this.recalcMatrix(e);var F=t[2],B=t[6],N=t[10],U=this.computedMatrix;i(U,t);var V=U[15],q=U[12]/V,H=U[13]/V,G=U[14]/V,W=Math.exp(this.computedRadius[0]);this.center.jump(e,q-F*W,H-B*W,G-N*W)},d.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},d.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},d.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},d.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},d.lookAt=function(e,t,r,n){this.recalcMatrix(e),t=t||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=t[0]-r[0],h=t[1]-r[1],f=t[2]-r[2],d=c(l,h,f);if(!(d<1e-6)){l/=d,h/=d,f/=d;var p=this.computedRight,m=p[0],g=p[1],y=p[2],v=i*m+a*g+o*y;m-=v*i;var x=c(m,g-=v*a,y-=v*o);if(!(x<.01&&(x=c(m=a*f-o*h,g=o*l-i*f,y=i*h-a*l))<1e-6)){m/=x,g/=x,y/=x,this.up.set(e,i,a,o),this.right.set(e,m,g,y),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(d));var b=a*y-o*g,_=o*m-i*y,w=i*g-a*m,k=c(b,_,w);b/=k;var T=i*l+a*h+o*f,A=m*l+g*h+y*f,M=b*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],I=C[C.length-2],P=Math.abs((L%=2*Math.PI)+2*Math.PI-E),z=Math.abs(L-E),O=Math.abs(L-2*Math.PI-E);Ptypeof Uint8ClampedArray,s="u">typeof BigUint64Array,l="u">typeof BigInt64Array,c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=i([32,0])),c.BIGUINT64||(c.BIGUINT64=i([32,0])),c.BIGINT64||(c.BIGINT64=i([32,0])),c.BUFFER||(c.BUFFER=i([32,0]));var u=c.DATA,h=c.BUFFER;function f(e){if(e){var t=e.length||e.byteLength;u[n.log2(t)].push(e)}}function d(e){var e=n.nextPow2(e),t=u[n.log2(e)];return t.length>0?t.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(d(e),0,e)}function m(e){return new Uint16Array(d(2*e),0,e)}function g(e){return new Uint32Array(d(4*e),0,e)}function y(e){return new Int8Array(d(e),0,e)}function v(e){return new Int16Array(d(2*e),0,e)}function x(e){return new Int32Array(d(4*e),0,e)}function b(e){return new Float32Array(d(4*e),0,e)}function _(e){return new Float64Array(d(8*e),0,e)}function w(e){return o?new Uint8ClampedArray(d(e),0,e):p(e)}function k(e){return s?new BigUint64Array(d(8*e),0,e):null}function T(e){return l?new BigInt64Array(d(8*e),0,e):null}function A(e){return new DataView(d(e),0,e)}function M(e){e=n.nextPow2(e);var t=h[n.log2(e)];return t.length>0?t.pop():new a(e)}t.free=function(e){if(a.isBuffer(e))h[n.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength;u[0|n.log2(t)].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){f(e.buffer)},t.freeArrayBuffer=f,t.freeBuffer=function(e){h[n.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return d(e);switch(t){case"uint8":return p(e);case"uint16":return m(e);case"uint32":return g(e);case"int8":return y(e);case"int16":return v(e);case"int32":return x(e);case"float":case"float32":return b(e);case"double":case"float64":return _(e);case"uint8_clamped":return w(e);case"bigint64":return T(e);case"biguint64":return k(e);case"buffer":return M(e);case"data":case"dataview":return A(e);default:return null}},t.mallocArrayBuffer=d,t.mallocUint8=p,t.mallocUint16=m,t.mallocUint32=g,t.mallocInt8=y,t.mallocInt16=v,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=b,t.mallocFloat64=t.mallocDouble=_,t.mallocUint8Clamped=w,t.mallocBigUint64=k,t.mallocBigInt64=T,t.mallocDataView=A,t.mallocBuffer=M,t.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,h[e].length=0}},1755:function(e){function t(e){this.roots=Array(e),this.ranks=Array(e);for(var t=0;ttypeof document&&((i=document.createElement("canvas")).width=8192,i.height=1024,a=i.getContext("2d"))},7718:function(e,t,r){e.exports=function(e,t,r,n){var a=64,o=1.25,s={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return n&&(n.size&&n.size>0&&(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)),r.font=[n.fontStyle,n.fontVariant,n.fontWeight,a+"px",n.font].filter(function(e){return e}).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",h(function(e,t,r,n,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,` -`):r.replace(/\/g," ");var s="",l=[];for(x=0;x-1?parseInt(e[1+i]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(n=n.replace(M(),"?px "),w*=Math.pow(.75,l-s),n=n.replace("?px ",M())),_+=.25*p*(l-s)}if(!0===o.superscripts){var c=e.indexOf("+"),u=r.indexOf("+"),h=c>-1?parseInt(e[1+c]):0,f=u>-1?parseInt(r[1+u]):0;h!==f&&(n=n.replace(M(),"?px "),w*=Math.pow(.75,f-h),n=n.replace("?px ",M())),_-=.25*p*(f-h)}if(!0===o.bolds){var d=e.indexOf("b|")>-1,m=r.indexOf("b|")>-1;!d&&m&&(n=g?n.replace("italic ","italic bold "):"bold "+n),d&&!m&&(n=n.replace("bold ",""))}if(!0===o.italics){var g=e.indexOf("i|")>-1,y=r.indexOf("i|")>-1;!g&&y&&(n="italic "+n),g&&!y&&(n=n.replace("italic ",""))}t.font=n}(s,E),s=E))}A(),k+=S.length;var C=0|Math.round(b+2*n);g",a="",o=i.length,s=a.length,l="+"===t[0]||"-"===t[0],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(t[0]);-1===f?n[h]+=t:l&&(n[h]=n[h].substr(0,f+1)+(1+parseInt(n[h][f+1]))+n[h].substr(f+2))}var d=c+o,p=r.substr(d,u-d).indexOf(i);c=-1!==p?p:u+s}return n}function u(e,t,r,i){var c,u=(c=n(e,128),i?a(c.cells,c.positions,.25):{edges:c.cells,positions:c.positions}),h=function(e,t,r){for(var n=t.textAlign||"start",i=t.textBaseline||"alphabetic",a=[0x40000000,0x40000000],o=[0,0],s=e.length,l=0;ltypeof ses)||!ses.ok||ses.ok()){"u">typeof ses&&(ses.weakMapPermitHostObjects=v);var t,r,n,i=!1;if("function"==typeof WeakMap){var a=WeakMap;if(!("u">typeof navigator&&/Firefox/.test(navigator.userAgent))){var o=new a,s=Object.freeze({});if(o.set(s,1),1!==o.get(s))i=!0;else{e.exports=WeakMap;return}}}Object.prototype.hasOwnProperty;var l=Object.getOwnPropertyNames,c=Object.defineProperty,u=Object.isExtensible,h="weakmap:",f=h+"ident:"+Math.random()+"___";if("u">typeof crypto&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var d=new Uint8Array(new ArrayBuffer(25));crypto.getRandomValues(d),f=h+"rand:"+Array.prototype.map.call(d,function(e){return(e%36).toString(36)}).join("")+"___"}if(c(Object,"getOwnPropertyNames",{value:function(e){return l(e).filter(x)}}),"getPropertyNames"in Object){var p=Object.getPropertyNames;c(Object,"getPropertyNames",{value:function(e){return p(e).filter(x)}})}t=Object.freeze,c(Object,"freeze",{value:function(e){return b(e),t(e)}}),r=Object.seal,c(Object,"seal",{value:function(e){return b(e),r(e)}}),n=Object.preventExtensions,c(Object,"preventExtensions",{value:function(e){return b(e),n(e)}});var m=!1,g=0,y=function(){this instanceof y||w();var e=[],t=[],r=g++;return Object.create(y.prototype,{get___:{value:_(function(n,i){var a,o=b(n);return o?r in o?o[r]:i:(a=e.indexOf(n))>=0?t[a]:i})},has___:{value:_(function(t){var n=b(t);return n?r in n:e.indexOf(t)>=0})},set___:{value:_(function(n,i){var a,o=b(n);return o?o[r]=i:(a=e.indexOf(n))>=0?t[a]=i:(t[a=e.length]=i,e[a]=n),this})},delete___:{value:_(function(n){var i,a,o=b(n);return o?r in o&&delete o[r]:!((i=e.indexOf(n))<0)&&(a=e.length-1,e[i]=void 0,t[i]=t[a],e[i]=e[a],e.length=a,t.length=a,!0)})}})};y.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof a?function(){function t(){this instanceof y||w();var e,t=new a,r=void 0,n=!1;return e=i?function(e,n){return t.set(e,n),t.has(e)||(r||(r=new y),r.set(e,n)),this}:function(e,i){if(n)try{t.set(e,i)}catch{r||(r=new y),r.set___(e,i)}else t.set(e,i);return this},Object.create(y.prototype,{get___:{value:_(function(e,n){return r?t.has(e)?t.get(e):r.get___(e,n):t.get(e,n)})},has___:{value:_(function(e){return t.has(e)||!!r&&r.has___(e)})},set___:{value:_(e)},delete___:{value:_(function(e){var n=!!t.delete(e);return r&&r.delete___(e)||n})},permitHostObjects___:{value:_(function(e){if(e===v)n=!0;else throw Error("bogus call to permitHostObjects___")})}})}i&&"u">typeof Proxy&&(Proxy=void 0),t.prototype=y.prototype,e.exports=t,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("u">typeof Proxy&&(Proxy=void 0),e.exports=y)}function v(e){e.permitHostObjects___&&e.permitHostObjects___(v)}function x(e){return e.substr(0,h.length)!=h||"___"!==e.substr(e.length-3)}function b(e){if(e!==Object(e))throw TypeError("Not an object: "+e);var t=e[f];if(t&&t.key===e)return t;if(u(e)){t={key:e};try{return c(e,f,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch{return}}}function _(e){return e.prototype=null,Object.freeze(e)}function w(){!m&&"u">typeof console&&(m=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(e,t,r){var n=r(8284);e.exports=function(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:n(t,e)}}},8284:function(e){e.exports=function(e,t){var r={identity:t},n=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?n.apply(this,arguments):r},writable:!0}),r}},606:function(e,t,r){var n=r(236);e.exports=function(){var e=n();return{get:function(t,r){var n=e(t);return n.hasOwnProperty("value")?n.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},3349:function(e){var t,r;t=(function(){return function(e,t,r,n,i,a){var o=e[0],s=r[0],l=[0];n|=0;var c=0;for(c=0;c=0!=h>=0&&i.push(l[0]+.5+.5*(u+h)/(u-h)),n+=s,++l[0]}}}).bind(void 0,{funcName:"zeroCrossings"}),r={},e.exports=function(e,n,i){var a=e.dtype,o=e.order,s=[a,o.join()].join(),l=r[s];return l||(r[s]=l=t([a,o])),l(e.shape.slice(0),e.data,e.stride,0|e.offset,n,i)}},781:function(e,t,r){e.exports=function(e,t){var r=[];return t=+t||0,n(e.hi(e.shape[0]-1),r,t),r};var n=r(3349)},7790:function(){}},n={};function i(e){var t=n[e];if(void 0!==t)return t.exports;var a=n[e]={id:e,loaded:!1,exports:{}};return r[e].call(a.exports,a,a.exports,i),a.loaded=!0,a.exports}i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch{if("object"==typeof window)return window}}(),i.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},t.exports=i(1964)}}),dz=d({"node_modules/color-name/index.js"(e,t){t.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]}}}),dO=d({"node_modules/color-normalize/node_modules/color-parse/index.js"(e,t){var r=dz();t.exports=function(e){var t,i,a=[],o=1;if("string"==typeof e)if(r[e=e.toLowerCase()])a=r[e].slice(),i="rgb";else if("transparent"===e)o=0,i="rgb",a=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var s=e.slice(1),l=s.length;o=1,l<=4?(a=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===l&&(o=parseInt(s[3]+s[3],16)/255)):(a=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===l&&(o=parseInt(s[6]+s[7],16)/255)),a[0]||(a[0]=0),a[1]||(a[1]=0),a[2]||(a[2]=0),i="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var c=t[1],u="rgb"===c,s=c.replace(/a$/,"");i=s;var l="cmyk"===s?4:"gray"===s?1:3;a=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(e,t){if(/%$/.test(e))return t===l?parseFloat(e)/100:"rgb"===s?255*parseFloat(e)/100:parseFloat(e);if("h"===s[t]){if(/deg$/.test(e))return parseFloat(e);if(void 0!==n[e])return n[e]}return parseFloat(e)}),c===s&&a.push(1),o=u||void 0===a[l]?1:a[l],a=a.slice(0,l)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(a=e.match(/([0-9]+)/g).map(function(e){return parseFloat(e)}),i=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(a=[e[0],e[1],e[2]],i="rgb",o=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(i="rgb",a=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(i="hsl",a=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),o=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(o/=100)):(i="rgb",a=[e>>>16,(65280&e)>>>8,255&e]);return{space:i,values:a,alpha:o}};var n={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),dD=d({"node_modules/color-normalize/node_modules/color-rgba/index.js"(e,t){var r=dO();t.exports=function(e){Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var t,n=r(e);if(!n.space)return[];var i="h"===n.space[0]?[360,100,100]:[255,255,255];return(t=[,,,])[0]=Math.min(Math.max(n.values[0],0),i[0]),t[1]=Math.min(Math.max(n.values[1],0),i[1]),t[2]=Math.min(Math.max(n.values[2],0),i[2]),"h"===n.space[0]&&(t=function(e){var t,r,n,i,a,o=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return[a=255*l,a,a];for(r=l<.5?l*(1+s):l+s-l*s,t=2*l-r,i=[0,0,0];c<3;)(n=o+-(1/3*(c-1)))<0?n++:n>1&&n--,a=6*n<1?t+(r-t)*6*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c++]=255*a;return i}(t)),t.push(Math.min(Math.max(n.alpha,0),1)),t}}}),dR=d({"node_modules/clamp/index.js"(e,t){t.exports=function(e,t,r){return tr?r:e:et?t:e}}}),dj=d({"node_modules/dtype/index.js"(e,t){t.exports=function(e){switch(e){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}}}}),dF=d({"node_modules/color-normalize/index.js"(e,t){var r=dD(),n=dR(),i=dj();t.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var a,o=new(i(t))(4),s="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!=typeof e||(e=r(e),e[0]/=255,e[1]/=255,e[2]/=255),(a=e)instanceof Uint8Array||a instanceof Uint8ClampedArray||Array.isArray(a)&&(a[0]>1||0===a[0])&&(a[1]>1||0===a[1])&&(a[2]>1||0===a[2])&&(!a[3]||a[3]>1)?(o[0]=e[0],o[1]=e[1],o[2]=e[2],o[3]=null!=e[3]?e[3]:255,s&&(o[0]/=255,o[1]/=255,o[2]/=255,o[3]/=255)):s?(o[0]=e[0],o[1]=e[1],o[2]=e[2],o[3]=null!=e[3]?e[3]:1):(o[0]=n(Math.floor(255*e[0]),0,255),o[1]=n(Math.floor(255*e[1]),0,255),o[2]=n(Math.floor(255*e[2]),0,255),o[3]=null==e[3]?255:n(Math.floor(255*e[3]),0,255)),o}}}),dB=d({"src/lib/str2rgbarray.js"(e,t){var r=dF();t.exports=function(e){return e?r(e):[0,0,0,1]}}}),dN=d({"src/lib/gl_format_color.js"(e,t){var r=A(),n=dF(),i=rw(),a=eC(),o=eE().defaultLine,s=L().isArrayOrTypedArray,l=n(o);function c(e){if(r(e))return l;var t=n(e);return t.length?t:l}function u(e){return r(e)?e:1}t.exports={formatColor:function(e,t,r){var a,o=e.color;o&&o._inputArray&&(o=o._inputArray);var h,f,d,p,m,g=s(o),y=s(t),v=i.extractOpts(e),x=[];if(h=void 0!==v.colorscale?i.makeColorScaleFuncFromTrace(e):c,f=g?function(e,t){return void 0===e[t]?l:n(h(e[t]))}:c,d=y?function(e,t){return void 0===e[t]?1:u(e[t])}:u,g||y)for(var b=0;b0){var f=i.c2l(u);i._lowerLogErrorBound||(i._lowerLogErrorBound=f),i._lowerErrorBound=Math.min(i._lowerLogErrorBound,f)}}else o[s]=[-l[0]*n,l[1]*n]}return o}t.exports=function(e,t,r){var i=[n(e.x,e.error_x,t[0],r.xaxis),n(e.y,e.error_y,t[1],r.yaxis),n(e.z,e.error_z,t[2],r.zaxis)],a=function(e){for(var t=0;t-1?-1:+(e.indexOf("right")>-1)}function x(e){return null==e?0:e.indexOf("top")>-1?-1:+(e.indexOf("bottom")>-1)}function b(e,t){return t(4*e)}function _(e){return f[e]}function w(e,t,r,n,i){var a=null;if(s.isArrayOrTypedArray(e)){a=[];for(var o=0;o=0){var E=function(e,t,r){var n,i=(r+1)%3,a=(r+2)%3,s=[],l=[];for(n=0;n=0&&h("surfacecolor",b||_);for(var w=["x","y","z"],k=0;k<3;++k){var T="projection."+w[k];h(T+".show")&&(h(T+".opacity"),h(T+".scale"))}var A=r.getComponentMethod("errorbars","supplyDefaults");A(e,t,b||_||c,{axis:"z"}),A(e,t,b||_||c,{axis:"y",inherit:"z"}),A(e,t,b||_||c,{axis:"x",inherit:"z"})}}}),dY=d({"src/traces/scatter3d/calc.js"(e,t){var r=iv(),n=iy();t.exports=function(e,t){var i=[{x:!1,y:!1,trace:t,t:{}}];return r(i,t),n(e,t),i}}}),dX=d({"node_modules/get-canvas-context/index.js"(e,t){t.exports=function(e,t){if("string"!=typeof e)throw TypeError("must specify type string");if(t=t||{},typeof document>"u"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");"number"==typeof t.width&&(r.width=t.width),"number"==typeof t.height&&(r.height=t.height);var n,i=t;try{var a=[e];0===e.indexOf("webgl")&&a.push("experimental-"+e);for(var o=0;o/g," "));l[c]=d,u.tickmode=h}}t.ticks=l;for(var c=0;c<3;++c){a[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]);for(var p=0;p<2;++p)t.bounds[p][c]=e.glplot.bounds[p][c]}e.contourLevels=function(e){for(var t=[,,,],r=0;r<3;++r){for(var n=e[r],i=Array(n.length),a=0;ar.deltaY?1.1:.9090909090909091,a=e.glplot.getAspectratio();e.glplot.setAspectratio({x:n*a.x,y:n*a.y,z:n*a.z})}i(e)}},!!l&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=n();e.graphDiv.emit("plotly_relayouting",t)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(r){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:r,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},k.render=function(){var e,t=this,r=t.graphDiv,n=t.svgContainer,i=t.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=i.width*a,l=i.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),x(t),t.glplot.axes.update(t.axesOptions);for(var c=Object.keys(t.traces),h=null,p=t.glplot.selection,m=0;m")):"isosurface"===e.type||"volume"===e.type?(k.valueLabel=f.hoverLabelText(t._mockAxis,t._mockAxis.d2l(p.traceCoordinate[3]),e.valuehoverformat),E.push("value: "+k.valueLabel),p.textLabel&&E.push(p.textLabel),S=E.join("
")):S=p.textLabel;var C={x:p.traceCoordinate[0],y:p.traceCoordinate[1],z:p.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:w};d.appendArrayPointValue(C,b,w),e._module.eventData&&(C=b._module.eventData(C,p,b,{},w));var L={points:[C]};if(t.fullSceneLayout.hovermode){var I=[];d.loneHover({trace:b,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:k.xLabel,yLabel:k.yLabel,zLabel:k.zLabel,text:S,name:h.name,color:d.castHoverOption(b,w,"bgcolor")||h.color,borderColor:d.castHoverOption(b,w,"bordercolor"),fontFamily:d.castHoverOption(b,w,"font.family"),fontSize:d.castHoverOption(b,w,"font.size"),fontColor:d.castHoverOption(b,w,"font.color"),nameLength:d.castHoverOption(b,w,"namelength"),textAlign:d.castHoverOption(b,w,"align"),hovertemplate:u.castOption(b,w,"hovertemplate"),hovertemplateLabels:u.extendFlat({},C,k),eventData:[C]},{container:n,gd:r,inOut_bbox:I}),C.bbox=I[0]}p.distance<5&&(p.buttons||_)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else d.loneUnhover(n),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},k.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var A=["xaxis","yaxis","zaxis"];k.plot=function(e,t,r){if(this.plotArgs=[e,t,r],!this.glplot.contextLost){var n,i,a,o,s,l,c=t[this.id],h=r[this.id];this.fullLayout=t,this.fullSceneLayout=c,this.axesOptions.merge(t,c),this.spikeOptions.merge(c),this.setViewport(c),this.updateFx(c.dragmode,c.hovermode),this.camera.enableWheel=this.graphDiv._context._scrollZoom.gl3d,this.glplot.setClearColor(p(c.bgcolor)),this.setConvert(s),e?Array.isArray(e)||(e=[e]):e=[];var f=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(a=0;ag[1][a])g[0][a]=-1,g[1][a]=1;else{var L=g[1][a]-g[0][a];g[0][a]-=L/32,g[1][a]+=L/32}if(x=b(x=[g[0][a],g[1][a]],s),g[0][a]=x[0],g[1][a]=x[1],s.isReversed()){var I=g[0][a];g[0][a]=g[1][a],g[1][a]=I}}else x=s.range,g[0][a]=s.r2l(x[0]),g[1][a]=s.r2l(x[1]);g[0][a]===g[1][a]&&(g[0][a]-=1,g[1][a]+=1),y[a]=g[1][a]-g[0][a],s.range=[g[0][a],g[1][a]],s.limitRange(),this.glplot.setBounds(a,{min:s.range[0]*d[a],max:s.range[1]*d[a]})}var P,z=c.aspectmode;if("cube"===z)P=[1,1,1];else if("manual"===z){var O=c.aspectratio;P=[O.x,O.y,O.z]}else if("auto"===z||"data"===z){var D=[1,1,1];for(a=0;a<3;++a){var R=v[l=(s=c[A[a]]).type];D[a]=Math.pow(R.acc,1/R.count)/d[a]}P="data"===z||Math.max.apply(null,D)/Math.min.apply(null,D)<=4?D:[1,1,1]}else throw Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=h.aspectratio.x=P[0],c.aspectratio.y=h.aspectratio.y=P[1],c.aspectratio.z=h.aspectratio.z=P[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var j=c.domain||null,F=t._size||null;if(j&&F){var B=this.container.style;B.position="absolute",B.left=F.l+j.x[0]*F.w+"px",B.top=F.t+(1-j.y[1])*F.h+"px",B.width=F.w*(j.x[1]-j.x[0])+"px",B.height=F.h*(j.y[1]-j.y[0])+"px"}this.glplot.redraw()}},k.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},k.getCamera=function(){var e;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(e=this.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}},k.setViewport=function(e){var t=e.camera;this.camera.lookAt.apply(this,[[t.eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),this.glplot.setAspectratio(e.aspectratio),"orthographic"===t.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},k.isCameraChanged=function(e){var t=this.getCamera(),r=u.nestedProperty(e,this.id+".camera").get(),n=!1;if(void 0===r)n=!0;else{for(var i=0;i<3;i++)for(var a=0;a<3;a++)if(!function(e,t,r,n){var i=["up","center","eye"],a=["x","y","z"];return t[i[r]]&&e[i[r]][a[n]]===t[i[r]][a[n]]}(t,r,i,a)){n=!0;break}(!r.projection||t.projection&&t.projection.type!==r.projection.type)&&(n=!0)}return n},k.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=u.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},k.saveLayout=function(e){var t,r,n,i,a,o,s=this.fullLayout,l=this.isCameraChanged(e),h=this.isAspectChanged(e),f=l||h;if(f){var d={};l&&(t=this.getCamera(),n=(r=u.nestedProperty(e,this.id+".camera")).get(),d[this.id+".camera"]=n),h&&(i=this.glplot.getAspectratio(),o=(a=u.nestedProperty(e,this.id+".aspectratio")).get(),d[this.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",e,s._preGUI,d),l&&(r.set(t),u.nestedProperty(s,this.id+".camera").set(t)),h&&(a.set(i),u.nestedProperty(s,this.id+".aspectratio").set(i),this.glplot.redraw())}return f},k.updateFx=function(e,t){var r=this.camera;if(r)if("orbit"===e)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===e){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},d={};d[h]=f;var p=n.layout;c.call("_storeDirectGUIEdit",p,i._preGUI,d),a.up=f,u.nestedProperty(p,h).set(f)}}else r.keyBindingMode=e;this.fullSceneLayout.hovermode=t},k.toImage=function(e){e||(e="png"),this.staticMode&&this.container.appendChild(r),this.glplot.redraw();var t,n=this.glplot.gl,i=n.drawingBufferWidth,a=n.drawingBufferHeight;n.bindFramebuffer(n.FRAMEBUFFER,null);var o=new Uint8Array(i*a*4);n.readPixels(0,0,i,a,n.RGBA,n.UNSIGNED_BYTE,o),function(e,t,r){for(var n=0,i=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}(o,i,a);var s=document.createElement("canvas");s.width=i,s.height=a;var l=s.getContext("2d",{willReadFrequently:!0}),c=l.createImageData(i,a);switch(c.data.set(o),l.putImageData(c,0,0),e){case"jpeg":t=s.toDataURL("image/jpeg");break;case"webp":t=s.toDataURL("image/webp");break;default:t=s.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(r),t},k.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[A[e]];f.setConvert(t,this.fullLayout),t.setScale=u.noop}},k.make4thDimension=function(){var e=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},f.setConvert(this._mockAxis,e)},t.exports=w}}),d1=d({"src/plots/gl3d/layout/attributes.js"(e,t){t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),d2=d({"src/plots/gl3d/layout/axis_attributes.js"(e,t){var r=eC(),n=ra(),i=U().extendFlat;t.exports=(0,tl().overrideAll)({visible:n.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:r.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:n.color,categoryorder:n.categoryorder,categoryarray:n.categoryarray,title:{text:n.title.text,font:n.title.font},type:i({},n.type,{values:["-","linear","log","date","category"]}),autotypenumbers:n.autotypenumbers,autorange:n.autorange,autorangeoptions:{minallowed:n.autorangeoptions.minallowed,maxallowed:n.autorangeoptions.maxallowed,clipmin:n.autorangeoptions.clipmin,clipmax:n.autorangeoptions.clipmax,include:n.autorangeoptions.include,editType:"plot"},rangemode:n.rangemode,minallowed:n.minallowed,maxallowed:n.maxallowed,range:i({},n.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:n.minor.tickmode,nticks:n.nticks,tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:n.ticks,mirror:n.mirror,ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,showticklabels:n.showticklabels,labelalias:n.labelalias,tickfont:n.tickfont,tickangle:n.tickangle,tickprefix:n.tickprefix,showtickprefix:n.showtickprefix,ticksuffix:n.ticksuffix,showticksuffix:n.showticksuffix,showexponent:n.showexponent,exponentformat:n.exponentformat,minexponent:n.minexponent,separatethousands:n.separatethousands,tickformat:n.tickformat,tickformatstops:n.tickformatstops,hoverformat:n.hoverformat,showline:n.showline,linecolor:n.linecolor,linewidth:n.linewidth,showgrid:n.showgrid,gridcolor:i({},n.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:n.gridwidth,zeroline:n.zeroline,zerolinecolor:n.zerolinecolor,zerolinewidth:n.zerolinewidth},"plot","from-root")}}),d3=d({"src/plots/gl3d/layout/layout_attributes.js"(e,t){var r=d2(),n=aC().attributes,i=U().extendFlat;function a(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[(0,tY().counterRegex)("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:i(a(0,0,1),{}),center:i(a(0,0,0),{}),eye:i(a(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:n({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:r,yaxis:r,zaxis:r,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"}}}),d5=d({"src/plots/gl3d/layout/axis_defaults.js"(e,t){var r=eC(),n=tY(),i=t2(),a=d2(),o=iD(),s=iF(),l=["xaxis","yaxis","zaxis"],c=13600/187;t.exports=function(e,t,u){var h,f;function d(e,t){return n.coerce(h,f,a,e,t)}for(var p=0;p.999)&&(g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",a.getDfltFromLayout("hovermode"))}t.exports=function(e,t,n){var i=t._basePlotModules.length>1;a(e,t,n,{type:c,attributes:s,handleDefaults:u,fullLayout:t,font:t.font,fullData:n,getDfltFromLayout:function(t){if(!i&&r.validate(e[t],s[t]))return e[t]},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}}}),d6=d({"src/plots/gl3d/index.js"(e){var t=tl().overrideAll,r=H(),n=d0(),i=t8().getSubplotData,a=tY(),o=re(),s="gl3d",l="scene";e.name=s,e.attr=l,e.idRoot=l,e.idRegex=e.attrRegex=a.counterRegex("scene"),e.attributes=d1(),e.layoutAttributes=d3(),e.baseLayoutAttrOverrides=t({hoverlabel:r.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=d4(),e.plot=function(e){for(var t=e._fullLayout,r=e._fullData,a=t._subplots[s],o=0;o720;)n--,n/=function(e){for(var t=p(e),r=e,n=0;n0){r=d[n];break}return r}(n),++n<120&&(n=720);var i=Math.round(n/e);return i>1?i:1},f.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,a=e[0].shape[0],o=e[0].shape[1],s=0|Math.floor(e[0].shape[0]*t+1),l=0|Math.floor(e[0].shape[1]*r+1),c=1+a+1,u=1+o+1,h=n(new Float32Array(c*u),[c,u]),f=[1/t,0,0,0,1/r,0,0,0,1],d=0;d0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(i[e]=!0,t=this.contourStart[e];tb&&(this.minValues[y]=b),this.maxValues[y]l&&(t.isomin=null,t.isomax=null);var c=o("x"),u=o("y"),h=o("z"),f=o("value");if(!c||!c.length||!u||!u.length||!h||!h.length||!f||!f.length){t.visible=!1;return}n.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],i),o("valuehoverformat"),["x","y","z"].forEach(function(e){o(e+"hoverformat");var t="caps."+e;o(t+".show")&&o(t+".fill");var r="slices."+e;o(r+".show")&&(o(r+".fill"),o(r+".locations"))}),o("spaceframe.show")&&o("spaceframe.fill"),o("surface.show")&&(o("surface.count"),o("surface.fill"),o("surface.pattern")),o("contour.show")&&(o("contour.color"),o("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(e){o(e)}),a(e,t,i,o,{prefix:"",cLetter:"c"}),t._length=null}t.exports={supplyDefaults:function(e,t,n,a){o(e,t,n,a,function(n,a){return r.coerce(e,t,i,n,a)})},supplyIsoDefaults:o}}}),pl=d({"src/traces/streamtube/calc.js"(e,t){var r=tY(),n=r_();function i(e){var t,n,i,o,s,l,c,u,h,f,d,p,m=e._x,g=e._y,y=e._z,v=e._len,x=-1/0,b=1/0,_=-1/0,w=1/0,k=-1/0,T=1/0,A="";for(v&&(c=m[0],h=g[0],d=y[0]),v>1&&(u=m[v-1],f=g[v-1],p=y[v-1]),t=0;tu?"-":"+")+"x")).replace("y",(h>f?"-":"+")+"y")).replace("z",(d>p?"-":"+")+"z");var C=function(){v=0,M=[],S=[],E=[]};(!v||v0;r--){var n=Math.min(t[r],t[r-1]),i=Math.max(t[r],t[r-1]);if(i>n&&n-1}function z(l,c,u){n=r;var h=[c],f=[u];if(t>=1)h=[c],f=[u];else if(t>0){var d,p,m,y,v,x,b,_,w,k,T,A,M,S=(d=c,p=u,m=d[0],_=I(x=function(e,t,r){for(var n=[],i=0;i-1?u[D]:function(e,t,r){for(var l=s.length,c=n;c-1?O[D]=N:O[D]=L(R,j,F,null===l?B:l)}C=O[0],P=O[1],z=O[2],e._meshI.push(C),e._meshJ.push(P),e._meshK.push(z),++g}}function O(e,t,r,n){var i=e[3];in&&(i=n);for(var a=(e[3]-i)/(e[3]-t[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*e[s]+a*t[s];return o}function D(e){var t=.001*(E-S);return e>=S-t&&e<=E+t}function R(t){for(var r=[],n=0;n<4;n++){var i=t[n];r.push([e._x[i],e._y[i],e._z[i],e._value[i]])}return r}function j(e,t,r,n,i,a){a||(a=1),r=[-1,-1,-1];var o,s,l,c=!1,u=[(o=t[0][3],o>=n&&o<=i),(s=t[1][3],s>=n&&s<=i),(l=t[2][3],l>=n&&l<=i)];if(!u[0]&&!u[1]&&!u[2])return!1;var h=function(e,t,r){return D(t[0][3])&&D(t[1][3])&&D(t[2][3])?(z(e,t,r),!0):a<3&&j(e,t,r,S,E,++a)};if(u[0]&&u[1]&&u[2])return h(e,t,r)||c;var f=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(a){if(u[a[0]]&&u[a[1]]&&!u[a[2]]){var o=t[a[0]],s=t[a[1]],l=t[a[2]],d=O(l,o,n,i),p=O(l,s,n,i);c=h(e,[p,d,o],[-1,-1,r[a[0]]])||c,c=h(e,[o,s,p],[r[a[0]],r[a[1]],-1])||c,f=!0}}),f||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(a){if(u[a[0]]&&!u[a[1]]&&!u[a[2]]){var o=t[a[0]],s=t[a[1]],l=t[a[2]],d=O(s,o,n,i);c=h(e,[O(l,o,n,i),d,o],[-1,-1,r[a[0]]])||c,f=!0}}),c}function F(e,t,r,n){var i,a,o,s,l,c=!1,u=R(t),h=[(i=u[0][3],i>=r&&i<=n),(a=u[1][3],a>=r&&a<=n),(o=u[2][3],o>=r&&o<=n),(s=u[3][3],s>=r&&s<=n)];if(!h[0]&&!h[1]&&!h[2]&&!h[3])return c;if(h[0]&&h[1]&&h[2]&&h[3])return m&&((l=function(r,n,i){z(e,[u[r],u[n],u[i]],[t[r],t[n],t[i]])})(0,1,2),l(3,0,1),l(2,3,0),l(1,2,3)),c;var f=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(i){if(h[i[0]]&&h[i[1]]&&h[i[2]]&&!h[i[3]]){var a=u[i[0]],o=u[i[1]],s=u[i[2]],l=u[i[3]];c=m?z(e,[a,o,s],[t[i[0]],t[i[1]],t[i[2]]])||c:z(null,[O(l,a,r,n),O(l,o,r,n),O(l,s,r,n)],[-1,-1,-1])||c,f=!0}}),f||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(i){if(h[i[0]]&&h[i[1]]&&!h[i[2]]&&!h[i[3]]){var a,o,s,l=u[i[0]],d=u[i[1]],p=u[i[2]],g=u[i[3]],y=O(p,l,r,n),v=O(p,d,r,n),x=O(g,d,r,n),b=O(g,l,r,n);m?(c=z(e,[l,b,y],[t[i[0]],-1,-1])||c,c=z(e,[d,v,x],[t[i[1]],-1,-1])||c):(a=[y,v,x,b],o=[-1,-1,-1,-1],(s=function(e,t,r){z(null,[a[e],a[t],a[r]],[o[e],o[t],o[r]])})(0,1,2),s(2,3,0)),f=!0}}),f)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(i){if(h[i[0]]&&!h[i[1]]&&!h[i[2]]&&!h[i[3]]){var a=u[i[0]],o=u[i[1]],s=u[i[2]],l=u[i[3]],d=O(o,a,r,n),p=O(s,a,r,n),g=O(l,a,r,n);m?(c=z(e,[a,d,p],[t[i[0]],-1,-1])||c,c=z(e,[a,p,g],[t[i[0]],-1,-1])||c,c=z(e,[a,g,d],[t[i[0]],-1,-1])||c):c=z(null,[d,p,g],[-1,-1,-1])||c,f=!0}}),c}function B(e,t,r,n,i,a,o,s,l,c,u){var h=!1;return p&&(P(e,"A")&&(h=F(null,[t,r,n,a],c,u)||h),P(e,"B")&&(h=F(null,[r,n,i,l],c,u)||h),P(e,"C")&&(h=F(null,[r,a,o,l],c,u)||h),P(e,"D")&&(h=F(null,[n,a,s,l],c,u)||h),P(e,"E")&&(h=F(null,[r,n,a,l],c,u)||h)),m&&(h=F(e,[r,n,a,l],c,u)||h),h}function N(e,t,r,n,i,a,o,s){return[!0===s[0]||j(e,R([t,r,n]),[t,r,n],a,o),!0===s[1]||j(e,R([n,i,t]),[n,i,t],a,o)]}function U(e,t,r,n,i,a,o,s,l){return s?N(e,t,r,i,n,a,o,l):N(e,r,i,n,t,a,o,l)}function V(e,t,r,n,i,a,o){var s,l,c,u,h=!1,f=function(){h=j(e,[s,l,c],[-1,-1,-1],i,a)||h,h=j(e,[c,u,s],[-1,-1,-1],i,a)||h},d=o[0],p=o[1],m=o[2];return d&&(s=I(R([T(t,r-0,n-0)])[0],R([T(t-1,r-0,n-0)])[0],d),l=I(R([T(t,r-0,n-1)])[0],R([T(t-1,r-0,n-1)])[0],d),c=I(R([T(t,r-1,n-1)])[0],R([T(t-1,r-1,n-1)])[0],d),u=I(R([T(t,r-1,n-0)])[0],R([T(t-1,r-1,n-0)])[0],d),f()),p&&(s=I(R([T(t-0,r,n-0)])[0],R([T(t-0,r-1,n-0)])[0],p),l=I(R([T(t-0,r,n-1)])[0],R([T(t-0,r-1,n-1)])[0],p),c=I(R([T(t-1,r,n-1)])[0],R([T(t-1,r-1,n-1)])[0],p),u=I(R([T(t-1,r,n-0)])[0],R([T(t-1,r-1,n-0)])[0],p),f()),m&&(s=I(R([T(t-0,r-0,n)])[0],R([T(t-0,r-0,n-1)])[0],m),l=I(R([T(t-0,r-1,n)])[0],R([T(t-0,r-1,n-1)])[0],m),c=I(R([T(t-1,r-1,n)])[0],R([T(t-1,r-1,n-1)])[0],m),u=I(R([T(t-1,r-0,n)])[0],R([T(t-1,r-0,n-1)])[0],m),f()),h}function q(e,t,r,n,i){for(var a=[],o=0,s=0;sMath.abs(z-M)?[A,z]:[z,M];k=O[0],I=O[1],p=!0,W(r,k,I),p=!1}}var D=[[Math.min(S,M),Math.max(S,M)],[Math.min(A,E),Math.max(A,E)]];["x","y","z"].forEach(function(r){for(var n=[],i=0;i0&&(h.push(p.id),"x"===r?f.push([p.distRatio,0,0]):"y"===r?f.push([0,p.distRatio,0]):f.push([0,0,p.distRatio]))}else u="x"===r?Y(1,b-1):"y"===r?Y(1,_-1):Y(1,w-1);h.length>0&&("x"===r?n[a]=function(e,t,r,n,i){for(var a=[],o=0,s=0;s0&&("x"===r?n[a]=q(null,u,o,s,n[a]):"y"===r?n[a]=H(null,u,o,s,n[a]):n[a]=G(null,u,o,s,n[a]),a++)}var m=e.caps[r];m.show&&m.fill&&(t=m.fill,"x"===r?n[a]=q(null,[0,b-1],o,s,n[a]):"y"===r?n[a]=H(null,[0,_-1],o,s,n[a]):n[a]=G(null,[0,w-1],o,s,n[a]),a++)}}),0===g&&C(),e._meshX=i,e._meshY=a,e._meshZ=o,e._meshIntensity=s,e._Xs=y,e._Ys=v,e._Zs=x}(),e}t.exports={findNearestOnAxis:l,generateIsoMeshes:f,createIsosurfaceTrace:function(e,t){var n=r({gl:e.glplot.gl}),i=new c(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}}}}),pf=d({"src/traces/isosurface/index.js"(e,t){t.exports={attributes:po(),supplyDefaults:ps().supplyDefaults,calc:pc(),colorbar:{min:"cmin",max:"cmax"},plot:ph().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:d6(),categories:["gl3d","showLegend"],meta:{}}}}),pd=d({"lib/isosurface.js"(e,t){t.exports=pf()}}),pp=d({"src/traces/volume/attributes.js"(e,t){var r=rs(),n=po(),i=d7(),a=W(),o=U().extendFlat,s=t.exports=(0,tl().overrideAll)(o({x:n.x,y:n.y,z:n.z,value:n.value,isomin:n.isomin,isomax:n.isomax,surface:n.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:n.slices,caps:n.caps,text:n.text,hovertext:n.hovertext,xhoverformat:n.xhoverformat,yhoverformat:n.yhoverformat,zhoverformat:n.zhoverformat,valuehoverformat:n.valuehoverformat,hovertemplate:n.hovertemplate,hovertemplatefallback:n.hovertemplatefallback},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:n.colorbar,opacity:n.opacity,opacityscale:i.opacityscale,lightposition:n.lightposition,lighting:n.lighting,flatshading:n.flatshading,contour:n.contour,hoverinfo:o({},a.hoverinfo),showlegend:o({},a.showlegend,{dflt:!1})}),"calc","nested");s.x.editType=s.y.editType=s.z.editType=s.value.editType="calc+clearAxisTypes"}}),pm=d({"src/traces/volume/defaults.js"(e,t){var r=tY(),n=pp(),i=ps().supplyIsoDefaults,a=pe().opacityscaleDefaults;t.exports=function(e,t,o,s){function l(i,a){return r.coerce(e,t,n,i,a)}i(e,t,o,s,l),a(e,t,s,l)}}}),pg=d({"src/traces/volume/convert.js"(e,t){var r=dP().gl_mesh3d,n=dN().parseColorScale,i=tY().isArrayOrTypedArray,a=dB(),o=rw().extractOpts,s=pu(),l=ph().findNearestOnAxis,c=ph().generateIsoMeshes;function u(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var h=u.prototype;h.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],a=this.data._meshZ[t],o=this.data._Ys.length,s=this.data._Zs.length,c=l(r,this.data._Xs).id,u=l(n,this.data._Ys).id,h=e.index=l(a,this.data._Zs).id+s*u+s*o*c;e.traceCoordinate=[this.data._meshX[h],this.data._meshY[h],this.data._meshZ[h],this.data._value[h]];var f=this.data.hovertext||this.data.text;return i(f)&&void 0!==f[h]?e.textLabel=f[h]:f&&(e.textLabel=f),!0}},h.update=function(e){var t=this.scene,r=t.fullSceneLayout;function i(e,t,r,n){return t.map(function(t){return e.d2l(t,0,n)*r})}this.data=c(e);var l={positions:s(i(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),i(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),i(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),cells:s(e._meshI,e._meshJ,e._meshK),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:a(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=o(e);l.vertexIntensity=e._meshIntensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=n(e),this.mesh.update(l)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var n=r({gl:e.glplot.gl}),i=new u(e,n,t.uid);return n._trace=i,i.update(t),e.glplot.add(n),i}}}),py=d({"src/traces/volume/index.js"(e,t){t.exports={attributes:pp(),supplyDefaults:pm(),calc:pc(),colorbar:{min:"cmin",max:"cmax"},plot:pg(),moduleType:"trace",name:"volume",basePlotModule:d6(),categories:["gl3d","showLegend"],meta:{}}}}),pv=d({"lib/volume.js"(e,t){t.exports=py()}}),px=d({"src/traces/mesh3d/defaults.js"(e,t){var r=tv(),n=tY(),i=rv(),a=pa();t.exports=function(e,t,o,s){function l(r,i){return n.coerce(e,t,a,r,i)}function c(e){var t=e.map(function(e){var t=l(e);return t&&n.isArrayOrTypedArray(t)?t:null});return t.every(function(e){return e&&e.length===t[0].length})&&t}if(!c(["x","y","z"])||(c(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j))){t.visible=!1;return}r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],s),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(e){l(e)}),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in e?(l("intensity"),l("intensitymode"),i(e,t,s,l,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?l("facecolor"):"vertexcolor"in e?l("vertexcolor"):l("color",o)),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),t._length=null}}}),pb=d({"src/traces/mesh3d/calc.js"(e,t){var r=r_();t.exports=function(e,t){t.intensity&&r(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}}}),p_=d({"src/traces/mesh3d/convert.js"(e,t){var r=dP().gl_mesh3d,n=dP().delaunay_triangulate,i=dP().alpha_shape,a=dP().convex_hull,o=dN().parseColorScale,s=tY().isArrayOrTypedArray,l=dB(),c=rw().extractOpts,u=pu();function h(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var f=h.prototype;function d(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}f.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return s(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},f.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var s,h=e.x.length,f=u(p(r.xaxis,e.x,t.dataScale[0],e.xcalendar),p(r.yaxis,e.y,t.dataScale[1],e.ycalendar),p(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,h)||!g(e.j,h)||!g(e.k,h))return;s=u(m(e.i),m(e.j),m(e.k))}else s=0===e.alphahull?a(f):e.alphahull>0?i(e.alphahull,f):function(e,t){for(var r=["x","y","z"].indexOf(e),i=[],a=t.length,o=0;o2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function f(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function d(e,t){var n=e.fullSceneLayout,c=e.dataScale,u=t._len,d={};function p(e,t){var r=n[t],a=c[l[t]];return i.simpleMap(e,function(e){return r.d2l(e)*a})}if(d.vectors=s(p(t._u,"xaxis"),p(t._v,"yaxis"),p(t._w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=p(t._Xs,"xaxis"),g=p(t._Ys,"yaxis"),y=p(t._Zs,"zaxis");if(d.meshgrid=[m,g,y],d.gridFill=t._gridFill,t._slen)d.startingPositions=s(p(t._startsX,"xaxis"),p(t._startsY,"yaxis"),p(t._startsZ,"zaxis"));else{for(var v=g[0],x=h(m),b=h(y),_=Array(x.length*b.length),w=0,k=0;ko&&(o=e[0]),e[1]s&&(s=e[1])}for(t in e.arcs.forEach(function(e){for(var t,r=-1,l=e.length;++ro&&(o=t[0]),t[1]s&&(s=t[1])}),e.objects)!function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Point":l(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(l)}}(e.objects[t]);return[i,a,o,s]}function i(e,t){var r=t.id,n=t.bbox,i=null==t.properties?{}:t.properties,o=a(e,t);return null==r&&null==n?{type:"Feature",properties:i,geometry:o}:null==n?{type:"Feature",id:r,properties:i,geometry:o}:{type:"Feature",id:r,bbox:n,properties:i,geometry:o}}function a(e,t){var n=r(e.transform),i=e.arcs;function a(e){return n(e)}function o(e){for(var t=[],r=0,a=e.length;r1)n=function(e,t){var r,n=[],i=[];function a(e){var t=e<0?~e:e;(i[t]||(i[t]=[])).push({i:e,g:r})}function o(e){e.forEach(a)}function s(e){e.forEach(o)}return function e(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":o(t.arcs);break;case"MultiLineString":case"Polygon":s(t.arcs);break;case"MultiPolygon":t.arcs.forEach(s)}}(e),i.forEach(null==t?function(e){n.push(e[0].i)}:function(e){t(e[0].g,e[e.length-1].g)&&n.push(e[0].i)}),n}(t,r);else for(i=0,n=Array(a=e.arcs.length);i1)for(var a,s,c=1,u=l(i[0]);cu&&(s=i[0],i[0]=i[c],i[c]=s,u=a);return i}).filter(function(e){return e.length>0})}}function c(e,t){for(var r=0,n=e.length;r>>1;e[i]=2))throw Error("n must be ≥2");var r,i=(l=e.bbox||n(e))[0],a=l[1],o=l[2],s=l[3];t={scale:[o-i?(o-i)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[i,a]}}var l,c,h=u(t),f=e.objects,d={};function p(e){return h(e)}for(c in f)d[c]=function e(t){var r;switch(t.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:t.geometries.map(e)};break;case"Point":r={type:"Point",coordinates:p(t.coordinates)};break;case"MultiPoint":r={type:"MultiPoint",coordinates:t.coordinates.map(p)};break;default:return t}return null!=t.id&&(r.id=t.id),null!=t.bbox&&(r.bbox=t.bbox),null!=t.properties&&(r.properties=t.properties),r}(f[c]);return{type:"Topology",bbox:l,transform:t,objects:d,arcs:e.arcs.map(function(e){var t,r=0,n=1,i=e.length,a=Array(i);for(a[0]=h(e[0],0);++rtypeof t?e:(r=r||self).topojson=r.topojson||{})}}),pU=d({"src/lib/topojson_utils.js"(e,t){var r=t.exports={},n=pB().locationmodeToLayer,i=pN().feature;r.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},r.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`},r.getTopojsonFeatures=function(e,t){var r=n[e.locationmode],a=t.objects[r];return i(t,a).features}}}),pV=d({"src/lib/geojson_utils.js"(e){var t=M().BADNUM;e.calcTraceToLineCoords=function(e){for(var r=e[0].trace,n=r.connectgaps,i=[],a=[],o=0;o0&&(i.push(a),a=[])}return a.length>0&&i.push(a),i},e.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},e.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=Array(e.length),r=0;r{for(var n in t)r(e,n,{get:t[n],enumerable:!0})})(o,{COUNTRIES:()=>s,byAlpha2:()=>p,byAlpha3:()=>d,byM49:()=>m,createLookup:()=>c,lookup:()=>h,lookupAlpha3:()=>f,sanitize:()=>l}),t.exports=((e,t,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of i(t))a.call(e,s)||void 0===s||r(e,s,{get:()=>t[s],enumerable:!(o=n(t,s))||o.enumerable});return e})(r({},"__esModule",{value:!0}),o);var s=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\uD83C\uDDE6\uD83C\uDDFC","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\uD83C\uDDE6\uD83C\uDDEB","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","афғонистон","أفغانستان","افغانستان","د افغانستان اسلامی جمهوریت"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\uD83C\uDDE6\uD83C\uDDF4","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\uD83C\uDDE6\uD83C\uDDEE","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xc5land Islands",aliases:["\uD83C\uDDE6\uD83C\uDDFD","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\uD83C\uDDE6\uD83C\uDDF1","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\uD83C\uDDE6\uD83C\uDDE9","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\uD83C\uDDE6\uD83C\uDDEA","emirates","uae","الإمارات","الإمارات العربية المتحدة","الامارات","الامارات العربية المتحدة","دولة الإمارات العربية المتحدة"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\uD83C\uDDE6\uD83C\uDDF7","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\uD83C\uDDE6\uD83C\uDDF2","hayastan","hayastani hanrapetutyun","republic of armenia","հայաստան","հայաստանի հանրապետություն","հայք","հհ"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\uD83C\uDDE6\uD83C\uDDF8","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\uD83C\uDDE6\uD83C\uDDF6","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\uD83C\uDDF9\uD83C\uDDEB","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\uD83C\uDDE6\uD83C\uDDEC","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\uD83C\uDDE6\uD83C\uDDFA","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\uD83C\uDDE6\uD83C\uDDF9","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\uD83C\uDDE6\uD83C\uDDFF","azərbaycan","azərbaycan respublikası","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\uD83C\uDDE7\uD83C\uDDEE","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\uD83C\uDDE7\uD83C\uDDEA","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\uD83C\uDDE7\uD83C\uDDEF","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\uD83C\uDDE7\uD83C\uDDF6","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\uD83C\uDDE7\uD83C\uDDEB","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\uD83C\uDDE7\uD83C\uDDE9","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","গণপ্রজাতন্ত্রী বাংলাদেশ","বাংলা দেশ","বাংলাদেশ","বিডি"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\uD83C\uDDE7\uD83C\uDDEC","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","бг","българия","република българия"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\uD83C\uDDE7\uD83C\uDDED","bahrein islands","kingdom of bahrain","البحرين","دولة البحرين","مملكة البحرين"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\uD83C\uDDE7\uD83C\uDDF8","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\uD83C\uDDE7\uD83C\uDDE6","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","бих","босна","босна и херцеговина","бх"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xe9lemy",aliases:["\uD83C\uDDE7\uD83C\uDDF1","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\uD83C\uDDE7\uD83C\uDDFE","republic of belarus","respublika belarus","respublika byelarus","беларуская рэспубліка","беларусь","белая русь","белоруссия","рб","республика беларусь","рэспубліка беларусь"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\uD83C\uDDE7\uD83C\uDDFF"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\uD83C\uDDE7\uD83C\uDDF2","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\uD83C\uDDE7\uD83C\uDDF4","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\uD83C\uDDE7\uD83C\uDDF7","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\uD83C\uDDE7\uD83C\uDDE7","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\uD83C\uDDE7\uD83C\uDDF3","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\uD83C\uDDE7\uD83C\uDDF9","kingdom of bhutan","འབྲུག","འབྲུག་ཡུལ་","འབྲུགཡུལ་་"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\uD83C\uDDE7\uD83C\uDDFB"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\uD83C\uDDE7\uD83C\uDDFC","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\uD83C\uDDE8\uD83C\uDDEB","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\uD83C\uDDE8\uD83C\uDDE6","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\uD83C\uDDE8\uD83C\uDDE8","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\uD83C\uDDE8\uD83C\uDDED","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","confœderatio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\uD83C\uDDE8\uD83C\uDDF1","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\uD83C\uDDE8\uD83C\uDDF3","china pr","peoples republic of china","pr china","prc","中华人民共和国","中国"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xf4te d'Ivoire",aliases:["\uD83C\uDDE8\uD83C\uDDEE","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\uD83C\uDDE8\uD83C\uDDF2","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\uD83C\uDDE8\uD83C\uDDE9","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\uD83C\uDDE8\uD83C\uDDEC","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\uD83C\uDDE8\uD83C\uDDF0","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\uD83C\uDDE8\uD83C\uDDF4","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\uD83C\uDDF0\uD83C\uDDF2","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","إتحاد القمر","اتحاد جزر القمر","الاتحاد القمري","القمر","جزر القمر","جمهورية القمر المتحدة","جمهورية جزر القمر الاتحادية الإسلامية","جمهورية جزرالقمر المتحدة"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\uD83C\uDDE8\uD83C\uDDFB","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\uD83C\uDDE8\uD83C\uDDF7","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\uD83C\uDDE8\uD83C\uDDFA","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xe7ao",aliases:["\uD83C\uDDE8\uD83C\uDDFC","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","curaςao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\uD83C\uDDE8\uD83C\uDDFD","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\uD83C\uDDF0\uD83C\uDDFE","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\uD83C\uDDE8\uD83C\uDDFE","greek administration of southern cyprus","greek cypriot state","guney kıbrıs","guney kıbrıs rum cumhuriyeti","guney kıbrıs rum kesimi","guney kıbrıs rum yonetimi","kipriaki dhimokratia","kıbrıs","kıbrıs cumhuriyeti","kıbrıs rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","κυπριακη δημοκρατια","κυπρος"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\uD83C\uDDE8\uD83C\uDDFF","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\uD83C\uDDE9\uD83C\uDDEA","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\uD83C\uDDE9\uD83C\uDDEF","la republique de djibouti","republic of djibouti","republique de djibouti","جمهورية جيبوتي","جيبوتي"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\uD83C\uDDE9\uD83C\uDDF2","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\uD83C\uDDE9\uD83C\uDDF0","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\uD83C\uDDE9\uD83C\uDDF4","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\uD83C\uDDE9\uD83C\uDDFF","peoples democratic republic of algeria","الجزائر","الجزاير","الجمهورية الجزائرية الديمقراطية الشعبية","الدزاير","دزاير"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\uD83C\uDDEA\uD83C\uDDE8","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\uD83C\uDDEA\uD83C\uDDEC","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","جمهورية مصر العربية","مصر"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\uD83C\uDDEA\uD83C\uDDF7","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","إرتريا","إريتريا","ارتريا","ارتيريا","اريتريا","دولة إرتريا","دولة إريتريا","ሃገረ ኤርትራ","ኤርትራ"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\uD83C\uDDEA\uD83C\uDDED","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\uD83C\uDDEA\uD83C\uDDF8","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\uD83C\uDDEA\uD83C\uDDEA","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\uD83C\uDDEA\uD83C\uDDF9","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","ኢትዮጵያ","የኢትዮጵያ ፌዴራላዊ ዴሞክራሲያዊ ሪፐብሊክ"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\uD83C\uDDEB\uD83C\uDDEE","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\uD83C\uDDEB\uD83C\uDDEF","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\uD83C\uDDEB\uD83C\uDDF0","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\uD83C\uDDEB\uD83C\uDDF7","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\uD83C\uDDEB\uD83C\uDDF4","faer oer","f\xe6r\xf8","faeroe is","faeroe islands","faeroe isles","f\xe6r\xf8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xf8roya","f\xf8royar","f\xf8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\uD83C\uDDEB\uD83C\uDDF2","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\uD83C\uDDEC\uD83C\uDDE6","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\uD83C\uDDEC\uD83C\uDDE7","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\uD83C\uDDEC\uD83C\uDDEA","georgia country","republic of georgia","sakartvelo","қырҭтәыла","საქართველო","საქართველოს რესპუბლიკა"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\uD83C\uDDEC\uD83C\uDDEC","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\uD83C\uDDEC\uD83C\uDDED","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\uD83C\uDDEC\uD83C\uDDEE","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\uD83C\uDDEC\uD83C\uDDF3","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\uD83C\uDDEC\uD83C\uDDF5"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\uD83C\uDDEC\uD83C\uDDF2","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\uD83C\uDDEC\uD83C\uDDFC","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\uD83C\uDDEC\uD83C\uDDF6","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\uD83C\uDDEC\uD83C\uDDF7","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","δημοκρατια της ελλαδας","δημοκρατια της ελλαδος","ελλαδα","ελλας","ελλας ελλαδα","ελληνικη δημοκρατια"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\uD83C\uDDEC\uD83C\uDDE9"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\uD83C\uDDEC\uD83C\uDDF1","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\uD83C\uDDEC\uD83C\uDDF9","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\uD83C\uDDEC\uD83C\uDDEB","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\uD83C\uDDEC\uD83C\uDDFA","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\uD83C\uDDEC\uD83C\uDDFE","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\uD83C\uDDED\uD83C\uDDF0","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\uD83C\uDDED\uD83C\uDDF2","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\uD83C\uDDED\uD83C\uDDF3","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\uD83C\uDDED\uD83C\uDDF7","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\uD83C\uDDED\uD83C\uDDF9","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\uD83C\uDDED\uD83C\uDDFA","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\uD83C\uDDEE\uD83C\uDDE9","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\uD83C\uDDEE\uD83C\uDDF2","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\uD83C\uDDEE\uD83C\uDDF3","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","आर्यवर्त","इंडिया","इण्डिया","भारत","भारत गणराज्य","भारतवर्ष","हिंदुस्तान","हिन्दुस्तान","हिन्दोस्तान"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\uD83C\uDDEE\uD83C\uDDF4","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\uD83C\uDDEE\uD83C\uDDEA","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\uD83C\uDDEE\uD83C\uDDF7","iran","islamic rep iran","islamic republic of iran","persia","ایران","ایرانزمین","پارس","جمهوری اسلامی ايران","جمهوری اسلامی ایران","كشور شاهنشاهی ايران"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\uD83C\uDDEE\uD83C\uDDF6","eraq","iraqe","komar i eraq","republic of iraq","الجمهورية العراقية","العراق","جمهورية العراق","عراق","عێراق"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\uD83C\uDDEE\uD83C\uDDF8","icelandic republic","island","ly\xf0veldi\xf0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\uD83C\uDDEE\uD83C\uDDF1","erez yisrael","medinat yisrael","state of israel","yisrael","ישראל","מדינת ישראל"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\uD83C\uDDEE\uD83C\uDDF9","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\uD83C\uDDEF\uD83C\uDDF2","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\uD83C\uDDEF\uD83C\uDDEA","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\uD83C\uDDEF\uD83C\uDDF4","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","الأردن","الاردن","المملكة الأردنية الهاشمية","المملكة الاردنية الهاشمية"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\uD83C\uDDEF\uD83C\uDDF5","state of japan","あきつしま","おおやしま","しきしま","ジャパン","しんしゅう","にっぽん","にっぽんこく","にほん","にほんこく","ひいずるくに","ふそう","大八州","扶木之地","扶桑","扶桑国","敷島","日出る国","日本","榑木之地","瑞穂国","神州","秋津島","葦原中国"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\uD83C\uDDF0\uD83C\uDDFF","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","казахстан","қазақстан","қазақстан республикасы","республика казахстан","рк"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\uD83C\uDDF0\uD83C\uDDEA","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\uD83C\uDDF0\uD83C\uDDEC","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","кр","кыргыз республикасы","кыргызстан"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\uD83C\uDDF0\uD83C\uDDED","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","កម្ពុជា","ព្រះរាជាណាចក្រកម្ពុជា"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\uD83C\uDDF0\uD83C\uDDEE","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\uD83C\uDDF0\uD83C\uDDF3","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\uD83C\uDDF0\uD83C\uDDF7","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","남조선","남한","대한","대한민국","코리아","한국"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\uD83C\uDDF0\uD83C\uDDFC","state of kuwait","الكويت","دولة الكويت"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\uD83C\uDDF1\uD83C\uDDE6","laos","sathalanalat paxathipatai paxaxon lao","ສາທາລະນະລັດ ປະຊາທິປະໄຕ ປະຊາຊົນລາວ","ປະເທດລາວ","ລາວ"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\uD83C\uDDF1\uD83C\uDDE7","lebanese republic","republic of lebanon","state of lebanon","الجمهورية اللبنانية","لبنان"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\uD83C\uDDF1\uD83C\uDDF7","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\uD83C\uDDF1\uD83C\uDDFE","state of libya","الجماهيرية العربية الليبية الشعبية الإشتراكية","الجمهورية الليبية","الليبي","الليبية","الليبين","دولة ليبيا","ليببيا","ليبي","ليبيا","ليبية"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\uD83C\uDDF1\uD83C\uDDE8","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\uD83C\uDDF1\uD83C\uDDEE","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\uD83C\uDDF1\uD83C\uDDF0","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","இலங்கை","இலங்கை சனநாயக சோசலிசக் குடியரசு","இலங்கை சனநாயக சோஷலிசக் குடியரசு","ஈழம்","சிலோன்","ලංකාව","ශ්රී ලංකා ප්රජාතන්ත්රවාදී සමාජවාදී ජනරජය","ශ්රී ලංකාව","ශ්‍රී ලංකාව"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\uD83C\uDDF1\uD83C\uDDF8","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\uD83C\uDDF1\uD83C\uDDF9","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\uD83C\uDDF1\uD83C\uDDFA","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xdfherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\uD83C\uDDF1\uD83C\uDDFB","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letmо","letmо vabamо","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\uD83C\uDDF2\uD83C\uDDF4","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","中國澳門特別行政區","澳門"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\uD83C\uDDF2\uD83C\uDDEB","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\uD83C\uDDF2\uD83C\uDDE6","kingdom of morocco","المغرب","المملكة المغربية","ⴰⵎⵓⵔ ⵏ ⵡⴰⴽⵓⵛ","ⴰⵎⵕⵕⵓⴽ","ⵍⵎⵕⵕⵓⴽ","ⵍⵎⵖⵔⵉⴱ","ⵜⴰⴳⵍⴷⵉⵜ ⵏ ⵍⵎⵖⵔⵉⴱ"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\uD83C\uDDF2\uD83C\uDDE8","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\uD83C\uDDF2\uD83C\uDDE9","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","молдова"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\uD83C\uDDF2\uD83C\uDDEC","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\uD83C\uDDF2\uD83C\uDDFB","dhivehi raajjeyge jumhooriyyaa","republic of maldives","ދިވެހި ރާއްޖެ","ދިވެހިރާއްޖެ","ދިވެހިރާއްޖޭގެ ޖުމުހޫރިއްޔާ","ދިވެހިރާއްޖޭގެ ޖުމްހޫރިއްޔާ"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\uD83C\uDDF2\uD83C\uDDFD","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\uD83C\uDDF2\uD83C\uDDED","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\uD83C\uDDF2\uD83C\uDDF0","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","македонија","република македонија","република северна македонија","рм","рсм","северна македонија"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\uD83C\uDDF2\uD83C\uDDF1","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\uD83C\uDDF2\uD83C\uDDF9","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\uD83C\uDDF2\uD83C\uDDF2","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","ပြည်ထောင်စု မြန်မာနိုင်ငံ","ပြည်ထောင်စု မြန်မာနိုင်ငံတော်","ပြည်ထောင်စု သမ္မတ မြန်မာနိုင်ငံ","ပြည်ထောင်စု သမ္မတ မြန်မာနိုင်ငံတော်","ပြည်ထောင်စုမြန်မာနိုင်ငံတော်","ပြည်ထောင်စုသမ္မတမြန်မာနိုင်ငံ","ပြ‌ည်ထောင်စုသမ္မတမြန်မာနိုင်ငံ","ပြည်ထောင်စုသမ္မတမြန်မာနိုင်ငံတော်","ဗမာပြည်","မြန်မာ","မြန်မာနိုင်ငံ","မြန်မာနိုင်ငံတော်","မြန်မာပြည်"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\uD83C\uDDF2\uD83C\uDDEA","crna cora","црна гора"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\uD83C\uDDF2\uD83C\uDDF3","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","монгол","монгол улс","ᠮᠤᠩᠭᠤᠯ ᠤᠯᠤᠰ"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\uD83C\uDDF2\uD83C\uDDF5","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\uD83C\uDDF2\uD83C\uDDFF","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\uD83C\uDDF2\uD83C\uDDF7","islamic republic of mauritania","الجمهورية الإسلامية الموريتانية","موريتانيا"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\uD83C\uDDF2\uD83C\uDDF8","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\uD83C\uDDF2\uD83C\uDDF6","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\uD83C\uDDF2\uD83C\uDDFA","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\uD83C\uDDF2\uD83C\uDDFC","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\uD83C\uDDF2\uD83C\uDDFE","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\uD83C\uDDFE\uD83C\uDDF9","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\uD83C\uDDF3\uD83C\uDDE6","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\uD83C\uDDF3\uD83C\uDDE8","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\uD83C\uDDF3\uD83C\uDDEA","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\uD83C\uDDF3\uD83C\uDDEB","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\uD83C\uDDF3\uD83C\uDDEC","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\uD83C\uDDF3\uD83C\uDDEE","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\uD83C\uDDF3\uD83C\uDDFA"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\uD83C\uDDF3\uD83C\uDDF1","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\uD83C\uDDF3\uD83C\uDDF4","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\uD83C\uDDF3\uD83C\uDDF5","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","नेपाल","संघिय लोकतान्त्रिक गणतन्त्र नेपाल","संघिय लोकतान्त्रिक गणतन्त्रात्मक नेपाल","संघीय लोकतान्त्रिक गणतन्त्र नेपाल"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\uD83C\uDDF3\uD83C\uDDF7","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\uD83C\uDDF3\uD83C\uDDFF","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\uD83C\uDDF4\uD83C\uDDF2","sultanate of oman","uman","سلطنة عمان","عمان"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\uD83C\uDDF5\uD83C\uDDF0","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","اسلامی جمہوریہ پاکستان","باکستان","پاکستان"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\uD83C\uDDF5\uD83C\uDDE6","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\uD83C\uDDF5\uD83C\uDDF3","occas island","pisskern aliеn","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\uD83C\uDDF5\uD83C\uDDEA","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\uD83C\uDDF5\uD83C\uDDED","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\uD83C\uDDF5\uD83C\uDDFC","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","パラオ","パラオ共和国"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\uD83C\uDDF5\uD83C\uDDEC","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\uD83C\uDDF5\uD83C\uDDF1","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\uD83C\uDDF5\uD83C\uDDF7","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\uD83C\uDDF0\uD83C\uDDF5","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","공화국","북조선","북한","조선","조선민주주의인민공화국"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\uD83C\uDDF5\uD83C\uDDF9","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\uD83C\uDDF5\uD83C\uDDFE","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\uD83C\uDDF5\uD83C\uDDF8","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","أراضي فلسطينية","الأراضي الفلسطينية","الدولة الفلسطينية","السلطة الفلسطينية","السلطة الوطنية الفلسطينية","الضفة الغربية وقطاع غزة","دولة فلسطين","فلسطين"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\uD83C\uDDF5\uD83C\uDDEB","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\uD83C\uDDF6\uD83C\uDDE6","state of qatar","إمارة قطر","دولة قطر","قطر"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xe9union",aliases:["\uD83C\uDDF7\uD83C\uDDEA","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\uD83C\uDDF7\uD83C\uDDF4"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\uD83C\uDDF7\uD83C\uDDFA","federation of russia","russia","россииская федерация","россия","рф"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\uD83C\uDDF7\uD83C\uDDFC","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\uD83C\uDDF8\uD83C\uDDE6","kingdom of saudi arabia","الدولة السعودية","الدوله السعوديه","السعودية","السعوديه","العربية السعودية","المملكة","المملكة السعودية","المملكة العربية","المملكة العربية السعودية","المملكه","المملكه العربيه السعوديه","بلاد الحرمين الشريفين","دولة آل سعود","سعودية","سعوديه","منبع الرسالة","مهبط الوحي"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\uD83C\uDDF8\uD83C\uDDE9","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","السودان","جمهورية السودان"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\uD83C\uDDF8\uD83C\uDDF3","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\uD83C\uDDF8\uD83C\uDDEC","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","சிங்கப்பூர்","சிங்கப்பூர் குடியரசு","சிங்கை","ஸிங்கபூர்"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\uD83C\uDDEC\uD83C\uDDF8","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\uD83C\uDDF8\uD83C\uDDED","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\uD83C\uDDF8\uD83C\uDDEF","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\uD83C\uDDF8\uD83C\uDDE7"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\uD83C\uDDF8\uD83C\uDDF1","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\uD83C\uDDF8\uD83C\uDDFB","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\uD83C\uDDF8\uD83C\uDDF2","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\uD83C\uDDF8\uD83C\uDDF4","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","الصومال","جمهورية الصومال","جمهورية الصومال الديموقراطية","جمهورية الصومال الفيدرالية","صومال"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\uD83C\uDDF5\uD83C\uDDF2","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\uD83C\uDDF7\uD83C\uDDF8","republic of serbia","republika srbija","република србија","србија"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\uD83C\uDDF8\uD83C\uDDF8","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\uD83C\uDDF8\uD83C\uDDF9","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\uD83C\uDDF8\uD83C\uDDF7","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\uD83C\uDDF8\uD83C\uDDF0","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\uD83C\uDDF8\uD83C\uDDEE","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\uD83C\uDDF8\uD83C\uDDEA","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\uD83C\uDDF8\uD83C\uDDFF","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\uD83C\uDDF8\uD83C\uDDFD","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\uD83C\uDDF8\uD83C\uDDE8","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\uD83C\uDDF8\uD83C\uDDFE","surya","syria","الجمهورية العربية السورية","الشام","سوريا","سورية"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\uD83C\uDDF9\uD83C\uDDE8","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\uD83C\uDDF9\uD83C\uDDE9","la republique du tchad","republic of chad","republique du tchad","tchad","تشاد","جمهورية تشاد"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\uD83C\uDDF9\uD83C\uDDEC","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\uD83C\uDDF9\uD83C\uDDED","kingdom of siam","kingdom of thailand","siam","thai","ไทย","ประเทศไทย","ประเทศสยาม","เมืองไทย","ราชอาณาจักรไทย","ราชอาณาจักรสยาม","สยาม"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\uD83C\uDDF9\uD83C\uDDEF","jumhurii tojikiston","republic of tajikistan","тоҷикистон","тҷ","тҷк","ҷт","ҷумҳурии тоҷикистон"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\uD83C\uDDF9\uD83C\uDDF0","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\uD83C\uDDF9\uD83C\uDDF2"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\uD83C\uDDF9\uD83C\uDDF1","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\uD83C\uDDF9\uD83C\uDDF4","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\uD83C\uDDF9\uD83C\uDDF9","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\uD83C\uDDF9\uD83C\uDDF3","republic of tunisia","tunisian republic","الجمهورية التونسية","تونس","تونس الخضراء"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xfcrkiye",aliases:["\uD83C\uDDF9\uD83C\uDDF7","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\uD83C\uDDF9\uD83C\uDDFB","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\uD83C\uDDF9\uD83C\uDDFC","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","中華民國","中華民國(臺灣)","中華臺北","台灣","臺澎金馬","臺灣"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\uD83C\uDDF9\uD83C\uDDFF","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\uD83C\uDDFA\uD83C\uDDEC","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\uD83C\uDDFA\uD83C\uDDE6","ukr","ukraina","ukrainia","ukrayina","вкраіна","украіна"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\uD83C\uDDFA\uD83C\uDDF2","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\uD83C\uDDFA\uD83C\uDDFE","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\uD83C\uDDFA\uD83C\uDDF8","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\uD83C\uDDFA\uD83C\uDDFF","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\uD83C\uDDFB\uD83C\uDDE6","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xe6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\uD83C\uDDFB\uD83C\uDDE8","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\uD83C\uDDFB\uD83C\uDDEA","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\uD83C\uDDFB\uD83C\uDDEC","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\uD83C\uDDFB\uD83C\uDDEE","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\uD83C\uDDFB\uD83C\uDDF3","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\uD83C\uDDFB\uD83C\uDDFA","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\uD83C\uDDFC\uD83C\uDDEB","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\uD83C\uDDFC\uD83C\uDDF8","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\uD83C\uDDFE\uD83C\uDDEA","rep yemen","republic of yemen","الجمهورية اليمنية","اليمن","دولة اليمن"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\uD83C\uDDFF\uD83C\uDDE6","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\uD83C\uDDFF\uD83C\uDDF2","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\uD83C\uDDFF\uD83C\uDDFC","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function l(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function c(e){let t=new Map,r=new Map,n=new Map;for(let i of e)t.set(i.iso3,i),i.iso2&&r.set(i.iso2,i),i.m49&&n.set(i.m49,i);let i=new Map;for(let t of e)for(let e of[t.name,...t.aliases]){let r=l(e),n=i.get(r);if(void 0!==n&&n!==t.iso3)throw Error(`Duplicate name/alias "${r}": ${n} vs ${t.iso3}`);i.set(r,t.iso3)}function a(e){if(null==e)return;let a=String(e).trim();if(!a)return;if(/^\d+$/.test(a)){let e=n.get(String(parseInt(a,10)).padStart(3,"0"));if(e)return e}if(/^[A-Za-z]{2}$/.test(a)){let e=r.get(a.toUpperCase());if(e)return e}if(/^[A-Za-z]{3}$/.test(a)){let e=t.get(a.toUpperCase());if(e)return e}let o=i.get(l(a));return void 0===o?void 0:t.get(o)}return{lookup:a,lookupAlpha3:function(e){var t;return null==(t=a(e))?void 0:t.iso3},byAlpha3:t,byAlpha2:r,byM49:n}}var u=c(s),h=u.lookup,f=u.lookupAlpha3,d=u.byAlpha3,p=u.byAlpha2,m=u.byM49}}),pH=d({"node_modules/@turf/helpers/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t={centimeters:0x25f96350,centimetres:0x25f96350,degrees:360/(2*Math.PI),feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:6371008.8,metres:6371008.8,miles:3958.761333810546,millimeters:0x17bbde120,millimetres:0x17bbde120,nauticalmiles:6371008.8/1852,radians:1,yards:6967335.223679999},r={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function n(e,t,r={}){let i={type:"Feature"};return(0===r.id||r.id)&&(i.id=r.id),r.bbox&&(i.bbox=r.bbox),i.properties=t||{},i.geometry=e,i}function i(e,t,r={}){if(!e)throw Error("coordinates is required");if(!Array.isArray(e))throw Error("coordinates must be an Array");if(e.length<2)throw Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw Error("coordinates must contain numbers");return n({type:"Point",coordinates:e},t,r)}function a(e,t,r={}){for(let t of e){if(t.length<4)throw Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(t[t.length-1].length!==t[0].length)throw Error("First and last Position are not equivalent.");for(let e=0;e180?e-360:e<-180?e+360:e},e.bearingToAzimuth=function(e){let t=e%360;return t<0&&(t+=360),t},e.convertArea=function(e,t="meters",n="kilometers"){if(!(e>=0))throw Error("area must be a positive number");let i=r[t];if(!i)throw Error("invalid original units");let a=r[n];if(!a)throw Error("invalid final units");return e/i*a},e.convertLength=function(e,t="kilometers",r="kilometers"){if(!(e>=0))throw Error("length must be a positive number");return h(f(e,t),r)},e.degreesToRadians=function(e){return e%360*Math.PI/180},e.earthRadius=6371008.8,e.factors=t,e.feature=n,e.featureCollection=s,e.geometry=function(e,t,r={}){switch(e){case"Point":return i(t).geometry;case"LineString":return o(t).geometry;case"Polygon":return a(t).geometry;case"MultiPoint":return c(t).geometry;case"MultiLineString":return l(t).geometry;case"MultiPolygon":return u(t).geometry;default:throw Error(e+" is invalid")}},e.geometryCollection=function(e,t,r={}){return n({type:"GeometryCollection",geometries:e},t,r)},e.isNumber=p,e.isObject=function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)},e.lengthToDegrees=function(e,t){return d(f(e,t))},e.lengthToRadians=f,e.lineString=o,e.lineStrings=function(e,t,r={}){return s(e.map(e=>o(e,t)),r)},e.multiLineString=l,e.multiPoint=c,e.multiPolygon=u,e.point=i,e.points=function(e,t,r={}){return s(e.map(e=>i(e,t)),r)},e.polygon=a,e.polygons=function(e,t,r={}){return s(e.map(e=>a(e,t)),r)},e.radiansToDegrees=d,e.radiansToLength=h,e.round=function(e,t=0){if(t&&!(t>=0))throw Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r},e.validateBBox=function(e){if(!e)throw Error("bbox is required");if(!Array.isArray(e))throw Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw Error("bbox must be an Array of 4 or 6 numbers");e.forEach(e=>{if(!p(e))throw Error("bbox must only contain numbers")})},e.validateId=function(e){if(!e)throw Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw Error("id must be a number or a string")}}}),pG=d({"node_modules/@turf/meta/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=pH();function r(e,t,n){if(null!==e)for(var i,a,o,s,l,c,u,h,f=0,d=0,p=e.type,m="FeatureCollection"===p,g="Feature"===p,y=m?e.features.length:1,v=0;vc||d>u||p>h){l=r,c=i,u=d,h=p,o=0;return}if(!1===n(t.lineString.call(void 0,[l,r],e.properties),i,a,p,o))return!1;o++,l=r}))return!1}}})}function l(e,r){if(!e)throw Error("geojson is required");o(e,function(e,n,i){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===r(e,n,i,0,0))return!1;break;case"Polygon":for(var s=0;se+function(e){let t=0,r;switch(e.type){case"Polygon":return i(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(s(e[0]));for(let r=1;r=t?(n+2)%t:n+2],l=i[0]*o,c=a[1]*o;r+=(s[0]*o-l)*Math.sin(c),n++}return r*a}e.area=n,e.default=n}}),pY=d({"node_modules/@turf/centroid/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=pH(),r=pG();function n(e,i={}){let a=0,o=0,s=0;return r.coordEach.call(void 0,e,function(e){a+=e[0],o+=e[1],s++},!0),t.point.call(void 0,[a/s,o/s],i.properties)}e.centroid=n,e.default=n}}),pX=d({"node_modules/d3-array/dist/d3-array.js"(e,t){(function(e){function t(e,t){return et?1:e>=t?0:NaN}function r(e){var r;return 1===e.length&&(r=e,e=function(e,n){return t(r(e),n)}),{left:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;0>e(t[a],r)?n=a+1:i=a}return n},right:function(t,r,n,i){for(null==n&&(n=0),null==i&&(i=t.length);n>>1;e(t[a],r)>0?i=a:n=a+1}return n}}}var n=r(t),i=n.right,a=n.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,n,i=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,n,i,a=e.length,o=-1;if(null==t){for(;++o=r)for(n=i=r;++or&&(n=r),i=r)for(n=i=r;++or&&(n=r),i=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=y?10:a>=v?5:a>=x?2:1)}function _(e,t,r){var n=Math.abs(t-e)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=y?i*=10:a>=v?i*=5:a>=x&&(i*=2),t=1)return+r(e[n-1],n-1,e);var n,i=(n-1)*t,a=Math.floor(i),o=+r(e[a],a,e);return o+(r(e[a+1],a+1,e)-o)*(i-a)}}function T(e,t){var r,n,i=e.length,a=-1;if(null==t){for(;++a=r)for(n=r;++ar&&(n=r)}else for(;++a=r)for(n=r;++ar&&(n=r);return n}function A(e){if(!(i=e.length))return[];for(var t=-1,r=T(e,M),n=Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function n(n){var a,o,s=n.length,l=Array(s);for(a=0;ah;)f.pop(),--d;var p,m=Array(d+1);for(a=0;a<=d;++a)(p=m[a]=[]).x0=a>0?f[a-1]:u,p.x1=a=r)for(n=r;++an&&(n=r)}else for(;++a=r)for(n=r;++an&&(n=r);return n},e.mean=function(e,t){var r,n=e.length,i=n,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(n=e[i]).length;--t>=0;)r[--o]=n[t];return r},e.min=T,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,n=e.length-1,i=e[0],a=Array(n<0?0:n);rr(i=e[a],s)||0!==r(s,s))&&(s=i,o=a);if(0===r(s,s))return o}},e.shuffle=function(e,t,r){for(var n,i,a=(r??e.length)-(t=null==t?0:+t);a;)i=Math.random()*a--|0,n=e[a+t],e[a+t]=e[i+t],e[i+t]=n;return e},e.sum=function(e,t){var r,n=e.length,i=-1,a=0;if(null==t)for(;++i0)return[e];if((n=t0)for(e=Math.ceil(e/o),a=Array(i=Math.ceil((t=Math.floor(t/o))-e+1));++stypeof t?e:e.d3=e.d3||{})}}),pZ=d({"node_modules/d3-geo/dist/d3-geo.js"(e,t){var r,n;r=e,n=function(e,t){function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(e){a(i,e,this.t),a(this,i.s,this.s),this.s?this.t+=i.t:this.s=i.t},valueOf:function(){return this.s}};var i=new n;function a(e,t,r){var n=e.s=t+r,i=n-t;e.t=t-(n-i)+(r-i)}var o=Math.PI,s=o/2,l=o/4,c=2*o,u=180/o,h=o/180,f=Math.abs,d=Math.atan,p=Math.atan2,m=Math.cos,g=Math.ceil,y=Math.exp,v=Math.log,x=Math.pow,b=Math.sin,_=Math.sign||function(e){return e>0?1:e<0?-1:0},w=Math.sqrt,k=Math.tan;function T(e){return e>1?0:e<-1?o:Math.acos(e)}function A(e){return e>1?s:e<-1?-s:Math.asin(e)}function M(){}function S(e,t){e&&C.hasOwnProperty(e.type)&&C[e.type](e,t)}var E={Feature:function(e,t){S(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n=0?1:-1,i=n*r,a=m(t),o=b(t),s=j*o,c=R*a+s*m(i),u=s*n*b(i);F.add(p(u,c)),D=e,R=a,j=o}function G(e){return[p(e[1],e[0]),A(e[2])]}function W(e){var t=e[0],r=e[1],n=m(r);return[n*m(t),n*b(t),b(r)]}function Y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function X(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function Z(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function $(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function K(e){var t=w(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var J,Q,ee,et,er,en,ei,ea,eo,es,el=r(),ec={point:eu,lineStart:ef,lineEnd:ed,polygonStart:function(){ec.point=ep,ec.lineStart=em,ec.lineEnd=eg,el.reset(),N.polygonStart()},polygonEnd:function(){N.polygonEnd(),ec.point=eu,ec.lineStart=ef,ec.lineEnd=ed,F<0?(J=-(ee=180),Q=-(et=90)):el>1e-6?et=90:el<-1e-6&&(Q=-90),es[0]=J,es[1]=ee},sphere:function(){J=-(ee=180),Q=-(et=90)}};function eu(e,t){eo.push(es=[J=e,ee=e]),tet&&(et=t)}function eh(e,t){var r=W([e*h,t*h]);if(ea){var n=X(ea,r),i=X([n[1],-n[0],0],n);K(i),i=G(i);var a,o=e-er,s=o>0?1:-1,l=i[0]*u*s,c=f(o)>180;c^(s*eret&&(et=a):c^(s*er<(l=(l+360)%360-180)&&let&&(et=t)),c?eey(J,ee)&&(ee=e):ey(e,ee)>ey(J,ee)&&(J=e):ee>=J?(eee&&(ee=e)):e>er?ey(J,e)>ey(J,ee)&&(ee=e):ey(e,ee)>ey(J,ee)&&(J=e)}else eo.push(es=[J=e,ee=e]);tet&&(et=t),ea=r,er=e}function ef(){ec.point=eh}function ed(){es[0]=J,es[1]=ee,ec.point=eu,ea=null}function ep(e,t){if(ea){var r=e-er;el.add(f(r)>180?r+(r>0?360:-360):r)}else en=e,ei=t;N.point(e,t),eh(e,t)}function em(){N.lineStart()}function eg(){ep(en,ei),N.lineEnd(),f(el)>1e-6&&(J=-(ee=180)),es[0]=J,es[1]=ee,ea=null}function ey(e,t){return(t-=e)<0?t+360:t}function ev(e,t){return e[0]-t[0]}function ex(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:to?e+Math.round(-e/c)*c:e,t]}function e$(e,t,r){return(e%=c)?t||r?eX(eJ(e),eQ(t,r)):eJ(e):t||r?eQ(t,r):eZ}function eK(e){return function(t,r){return[(t+=e)>o?t-c:t<-o?t+c:t,r]}}function eJ(e){var t=eK(e);return t.invert=eK(-e),t}function eQ(e,t){var r=m(e),n=b(e),i=m(t),a=b(t);function o(e,t){var o=m(t),s=m(e)*o,l=b(e)*o,c=b(t),u=c*r+s*n;return[p(l*i-u*a,s*r-c*n),A(u*i+l*a)]}return o.invert=function(e,t){var o=m(t),s=m(e)*o,l=b(e)*o,c=b(t),u=c*i-l*a;return[p(l*i+c*a,s*r+u*n),A(u*r-s*n)]},o}function e0(e){function t(t){return t=e(t[0]*h,t[1]*h),t[0]*=u,t[1]*=u,t}return e=e$(e[0]*h,e[1]*h,e.length>2?e[2]*h:0),t.invert=function(t){return t=e.invert(t[0]*h,t[1]*h),t[0]*=u,t[1]*=u,t},t}function e1(e,t,r,n,i,a){if(r){var o=m(t),s=b(t),l=n*r;null==i?(i=t+n*c,a=t-l/2):(i=e2(o,i),a=e2(o,a),(n>0?ia)&&(i+=n*c));for(var u,h=i;n>0?h>a:h-t[2]?-r:r)+c-1e-6)%c}function e3(){var e,t=[];return{point:function(t,r,n){e.push([t,r,n])},lineStart:function(){t.push(e=[])},lineEnd:M,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function e5(e,t){return 1e-6>f(e[0]-t[0])&&1e-6>f(e[1]-t[1])}function e4(e,t,r,n){this.x=e,this.z=t,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function e6(e,t,r,n,i){var a,o,s=[],l=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,r,n=e[0],o=e[t];if(e5(n,o)){if(!n[2]&&!o[2]){for(i.lineStart(),a=0;a=0;--a)i.point((u=c[a])[0],u[1]);else n(f.x,f.p.x,-1,i);f=f.p}c=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}}function e8(e){if(t=e.length){for(var t,r,n=0,i=e[0];++n=0?1:-1,z=P*I,O=z>o,D=w*C;if(e9.add(p(D*P*b(z),k*L+D*m(z))),u+=O?I+P*c:I,O^x>=r^S>=r){var R=X(W(v),W(M));K(R);var j=X(a,R);K(j);var F=(O^I>=0?-1:1)*A(j[2]);(n>F||n===F&&(R[0]||R[1]))&&(h+=O^I>=0?1:-1)}}return(u<-1e-6||u<1e-6&&e9<-1e-6)^1&h}function tt(e,r,n,i){return function(a){var o,s,l,c=r(a),u=e3(),h=r(u),f=!1,d={point:p,lineStart:g,lineEnd:y,polygonStart:function(){d.point=v,d.lineStart=x,d.lineEnd=b,s=[],o=[]},polygonEnd:function(){d.point=p,d.lineStart=g,d.lineEnd=y,s=t.merge(s);var e=te(o,i);s.length?(f||(a.polygonStart(),f=!0),e6(s,tn,e,n,a)):e&&(f||(a.polygonStart(),f=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),f&&(a.polygonEnd(),f=!1),s=o=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function p(t,r){e(t,r)&&a.point(t,r)}function m(e,t){c.point(e,t)}function g(){d.point=m,c.lineStart()}function y(){d.point=p,c.lineEnd()}function v(e,t){l.push([e,t]),h.point(e,t)}function x(){h.lineStart(),l=[]}function b(){v(l[0][0],l[0][1]),h.lineEnd();var e,t,r,n,i=h.clean(),c=u.result(),d=c.length;if(l.pop(),o.push(l),l=null,d){if(1&i){if((t=(r=c[0]).length-1)>0){for(f||(a.polygonStart(),f=!0),a.lineStart(),e=0;e1&&2&i&&c.push(c.pop().concat(c.shift())),s.push(c.filter(tr))}}return d}}function tr(e){return e.length>1}function tn(e,t){return((e=e.x)[0]<0?e[1]-s-1e-6:s-e[1])-((t=t.x)[0]<0?t[1]-s-1e-6:s-t[1])}var ti=tt(function(){return!0},function(e){var t,r=NaN,n=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,l){var c,u,h,p,g,y,v,x=a>0?o:-o,_=f(a-r);1e-6>f(_-o)?(e.point(r,n=(n+l)/2>0?s:-s),e.point(i,n),e.lineEnd(),e.lineStart(),e.point(x,n),e.point(a,n),t=0):i!==x&&_>=o&&(1e-6>f(r-i)&&(r-=1e-6*i),1e-6>f(a-x)&&(a-=1e-6*x),c=r,u=n,h=a,p=l,n=f(v=b(c-h))>1e-6?d((b(u)*(y=m(p))*b(h)-b(p)*(g=m(u))*b(c))/(g*y*v)):(u+p)/2,e.point(i,n),e.lineEnd(),e.lineStart(),e.point(x,n),t=0),e.point(r=a,n=l),i=x},lineEnd:function(){e.lineEnd(),r=n=NaN},clean:function(){return 2-t}}},function(e,t,r,n){var i;if(null==e)i=r*s,n.point(-o,i),n.point(0,i),n.point(o,i),n.point(o,0),n.point(o,-i),n.point(0,-i),n.point(-o,-i),n.point(-o,0),n.point(-o,i);else if(f(e[0]-t[0])>1e-6){var a=e[0]0,i=f(t)>1e-6;function a(e,r){return m(e)*m(r)>t}function s(e,r,n){var i=W(e),a=W(r),s=[1,0,0],l=X(i,a),c=Y(l,l),u=l[0],h=c-u*u;if(!h)return!n&&e;var d=X(s,l),p=$(s,t*c/h);Z(p,$(l,-t*u/h));var m=Y(p,d),g=Y(d,d),y=m*m-g*(Y(p,p)-1);if(!(y<0)){var v=w(y),x=$(d,(-m-v)/g);if(Z(x,p),x=G(x),!n)return x;var b,_=e[0],k=r[0],T=e[1],A=r[1];k<_&&(b=_,_=k,k=b);var M=k-_,S=1e-6>f(M-o);if(!S&&A0^x[1]<(1e-6>f(x[0]-_)?T:A):T<=x[1]&&x[1]<=A:M>o^(_<=x[0]&&x[0]<=k)){var E=$(d,(-m+v)/g);return Z(E,p),[x,G(E)]}}}function l(t,r){var i=n?e:o-e,a=0;return t<-i?a|=1:t>i&&(a|=2),r<-i?a|=4:r>i&&(a|=8),a}return tt(a,function(e){var t,r,c,u,h;return{lineStart:function(){u=c=!1,h=1},point:function(f,d){var p,m,g=[f,d],y=a(f,d),v=n?y?0:l(f,d):y?l(f+(f<0?o:-o),d):0;(!t&&(u=c=y)&&e.lineStart(),y!==c&&(!(m=s(t,g))||e5(t,m)||e5(g,m))&&(g[2]=1),y!==c)?(h=0,y?(e.lineStart(),m=s(g,t),e.point(m[0],m[1])):(m=s(t,g),e.point(m[0],m[1],2),e.lineEnd()),t=m):i&&t&&n^y&&!(v&r)&&(p=s(g,t,!0))&&(h=0,n?(e.lineStart(),e.point(p[0][0],p[0][1]),e.point(p[1][0],p[1][1]),e.lineEnd()):(e.point(p[1][0],p[1][1]),e.lineEnd(),e.lineStart(),e.point(p[0][0],p[0][1],3))),!y||t&&e5(t,g)||e.point(g[0],g[1]),t=g,c=y,r=v},lineEnd:function(){c&&e.lineEnd(),t=null},clean:function(){return h|(u&&c)<<1}}},function(t,n,i,a){e1(a,e,r,i,t,n)},n?[0,-e]:[-o,e-o])}function to(e,r,n,i){function a(t,a){return e<=t&&t<=n&&r<=a&&a<=i}function o(t,a,o,l){var u=0,h=0;if(null==t||(u=s(t,o))!==(h=s(a,o))||0>c(t,a)^o>0)do l.point(0===u||3===u?e:n,u>1?i:r);while((u=(u+o+4)%4)!==h);else l.point(a[0],a[1])}function s(t,i){return 1e-6>f(t[0]-e)?i>0?0:3:1e-6>f(t[0]-n)?i>0?2:1:1e-6>f(t[1]-r)?+(i>0):i>0?3:2}function l(e,t){return c(e.x,t.x)}function c(e,t){var r=s(e,1),n=s(t,1);return r!==n?r-n:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}return function(s){var c,u,h,f,d,p,m,g,y,v,x,b=s,_=e3(),w={point:k,lineStart:function(){w.point=T,u&&u.push(h=[]),v=!0,y=!1,m=g=NaN},lineEnd:function(){c&&(T(f,d),p&&y&&_.rejoin(),c.push(_.result())),w.point=k,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var t=0,r=0,n=u.length;ri&&(f-a)*(i-o)>(d-o)*(e-a)&&++t:d<=i&&(f-a)*(i-o)<(d-o)*(e-a)&&--t;return t}(),n=x&&r,a=(c=t.merge(c)).length;(n||a)&&(s.polygonStart(),n&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),a&&e6(c,l,r,o,s),s.polygonEnd()),b=s,c=u=h=null}};function k(e,t){a(e,t)&&b.point(e,t)}function T(t,o){var s=a(t,o);if(u&&h.push([t,o]),v)f=t,d=o,p=s,v=!1,s&&(b.lineStart(),b.point(t,o));else if(s&&y)b.point(t,o);else{var l=[m=Math.max(-1e9,Math.min(1e9,m)),g=Math.max(-1e9,Math.min(1e9,g))],c=[t=Math.max(-1e9,Math.min(1e9,t)),o=Math.max(-1e9,Math.min(1e9,o))];!function(e,t,r,n,i,a){var o,s=e[0],l=e[1],c=t[0],u=t[1],h=0,f=1,d=c-s,p=u-l;if(o=r-s,!(!d&&o>0)){if(o/=d,d<0){if(o0){if(o>f)return;o>h&&(h=o)}if(o=i-s,!(!d&&o<0)){if(o/=d,d<0){if(o>f)return;o>h&&(h=o)}else if(d>0){if(o0)){if(o/=p,p<0){if(o0){if(o>f)return;o>h&&(h=o)}if(o=a-l,!(!p&&o<0)){if(o/=p,p<0){if(o>f)return;o>h&&(h=o)}else if(p>0){if(o0&&(e[0]=s+h*d,e[1]=l+h*p),f<1&&(t[0]=s+f*d,t[1]=l+f*p),!0}}}}}(l,c,e,r,n,i)?s&&(b.lineStart(),b.point(t,o),x=!1):(y||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}m=t,g=o,y=s}return w}}var ts,tl,tc,tu=r(),th={sphere:M,point:M,lineStart:function(){th.point=td,th.lineEnd=tf},lineEnd:M,polygonStart:M,polygonEnd:M};function tf(){th.point=th.lineEnd=M}function td(e,t){e*=h,t*=h,ts=e,tl=b(t),tc=m(t),th.point=tp}function tp(e,t){e*=h;var r=b(t*=h),n=m(t),i=f(e-ts),a=m(i),o=n*b(i),s=tc*r-tl*n*a,l=tl*r+tc*n*a;tu.add(p(w(o*o+s*s),l)),ts=e,tl=r,tc=n}function tm(e){return tu.reset(),P(e,th),+tu}var tg=[null,null],ty={type:"LineString",coordinates:tg};function tv(e,t){return tg[0]=e,tg[1]=t,tm(ty)}var tx={Feature:function(e,t){return t_(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,n=-1,i=r.length;++n0&&(i=tv(e[a],e[a-1]))>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<1e-12*i)return!0;r=n}return!1}function tk(e,t){return!!te(e.map(tT),tA(t))}function tT(e){return(e=e.map(tA)).pop(),e}function tA(e){return[e[0]*h,e[1]*h]}function tM(e,r,n){var i=t.range(e,r-1e-6,n).concat(r);return function(e){return i.map(function(t){return[e,t]})}}function tS(e,r,n){var i=t.range(e,r-1e-6,n).concat(r);return function(e){return i.map(function(t){return[t,e]})}}function tE(){var e,r,n,i,a,o,s,l,c,u,h,d,p=10,m=10,y=90,v=360,x=2.5;function b(){return{type:"MultiLineString",coordinates:_()}}function _(){return t.range(g(i/y)*y,n,y).map(h).concat(t.range(g(l/v)*v,s,v).map(d)).concat(t.range(g(r/p)*p,e,p).filter(function(e){return f(e%y)>1e-6}).map(c)).concat(t.range(g(o/m)*m,a,m).filter(function(e){return f(e%v)>1e-6}).map(u))}return b.lines=function(){return _().map(function(e){return{type:"LineString",coordinates:e}})},b.outline=function(){return{type:"Polygon",coordinates:[h(i).concat(d(s).slice(1),h(n).reverse().slice(1),d(l).reverse().slice(1))]}},b.extent=function(e){return arguments.length?b.extentMajor(e).extentMinor(e):b.extentMinor()},b.extentMajor=function(e){return arguments.length?(i=+e[0][0],n=+e[1][0],l=+e[0][1],s=+e[1][1],i>n&&(e=i,i=n,n=e),l>s&&(e=l,l=s,s=e),b.precision(x)):[[i,l],[n,s]]},b.extentMinor=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),b.precision(x)):[[r,o],[e,a]]},b.step=function(e){return arguments.length?b.stepMajor(e).stepMinor(e):b.stepMinor()},b.stepMajor=function(e){return arguments.length?(y=+e[0],v=+e[1],b):[y,v]},b.stepMinor=function(e){return arguments.length?(p=+e[0],m=+e[1],b):[p,m]},b.precision=function(t){return arguments.length?(x=+t,c=tM(o,a,90),u=tS(r,e,x),h=tM(l,s,90),d=tS(i,n,x),b):x},b.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function tC(e){return e}var tL,tI,tP,tz,tO=r(),tD=r(),tR={point:M,lineStart:M,lineEnd:M,polygonStart:function(){tR.lineStart=tj,tR.lineEnd=tN},polygonEnd:function(){tR.lineStart=tR.lineEnd=tR.point=M,tO.add(f(tD)),tD.reset()},result:function(){var e=tO/2;return tO.reset(),e}};function tj(){tR.point=tF}function tF(e,t){tR.point=tB,tL=tP=e,tI=tz=t}function tB(e,t){tD.add(tz*e-tP*t),tP=e,tz=t}function tN(){tB(tL,tI)}var tU,tV,tq,tH,tG=1/0,tW=1/0,tY=-1/0,tX=tY,tZ={point:function(e,t){etY&&(tY=e),ttX&&(tX=t)},lineStart:M,lineEnd:M,polygonStart:M,polygonEnd:M,result:function(){var e=[[tG,tW],[tY,tX]];return tY=tX=-(tW=tG=1/0),e}},t$=0,tK=0,tJ=0,tQ=0,t0=0,t1=0,t2=0,t3=0,t5=0,t4={point:t6,lineStart:t8,lineEnd:re,polygonStart:function(){t4.lineStart=rt,t4.lineEnd=rr},polygonEnd:function(){t4.point=t6,t4.lineStart=t8,t4.lineEnd=re},result:function(){var e=t5?[t2/t5,t3/t5]:t1?[tQ/t1,t0/t1]:tJ?[t$/tJ,tK/tJ]:[NaN,NaN];return t$=tK=tJ=tQ=t0=t1=t2=t3=t5=0,e}};function t6(e,t){t$+=e,tK+=t,++tJ}function t8(){t4.point=t9}function t9(e,t){t4.point=t7,t6(tq=e,tH=t)}function t7(e,t){var r=e-tq,n=t-tH,i=w(r*r+n*n);tQ+=i*(tq+e)/2,t0+=i*(tH+t)/2,t1+=i,t6(tq=e,tH=t)}function re(){t4.point=t6}function rt(){t4.point=rn}function rr(){ri(tU,tV)}function rn(e,t){t4.point=ri,t6(tU=tq=e,tV=tH=t)}function ri(e,t){var r=e-tq,n=t-tH,i=w(r*r+n*n);tQ+=i*(tq+e)/2,t0+=i*(tH+t)/2,t1+=i,t2+=(i=tH*e-tq*t)*(tq+e),t3+=i*(tH+t),t5+=3*i,t6(tq=e,tH=t)}function ra(e){this._context=e}ra.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,c)}},result:M};var ro,rs,rl,rc,ru,rh=r(),rf={point:M,lineStart:function(){rf.point=rd},lineEnd:function(){ro&&rp(rs,rl),rf.point=M},polygonStart:function(){ro=!0},polygonEnd:function(){ro=null},result:function(){var e=+rh;return rh.reset(),e}};function rd(e,t){rf.point=rp,rs=rc=e,rl=ru=t}function rp(e,t){rc-=e,ru-=t,rh.add(w(rc*rc+ru*ru)),rc=e,ru=t}function rm(){this._string=[]}function rg(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function ry(e){return function(t){var r=new rv;for(var n in e)r[n]=e[n];return r.stream=t,r}}function rv(){}function rx(e,t,r){var n=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=n&&e.clipExtent(null),P(r,e.stream(tZ)),t(tZ.result()),null!=n&&e.clipExtent(n),e}function rb(e,t,r){return rx(e,function(r){var n=t[1][0]-t[0][0],i=t[1][1]-t[0][1],a=Math.min(n/(r[1][0]-r[0][0]),i/(r[1][1]-r[0][1])),o=+t[0][0]+(n-a*(r[1][0]+r[0][0]))/2,s=+t[0][1]+(i-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,s])},r)}function r_(e,t,r){return rb(e,[[0,0],t],r)}function rw(e,t,r){return rx(e,function(r){var n=+t,i=n/(r[1][0]-r[0][0]),a=(n-i*(r[1][0]+r[0][0]))/2,o=-i*r[0][1];e.scale(150*i).translate([a,o])},r)}function rk(e,t,r){return rx(e,function(r){var n=+t,i=n/(r[1][1]-r[0][1]),a=-i*r[0][0],o=(n-i*(r[1][1]+r[0][1]))/2;e.scale(150*i).translate([a,o])},r)}rm.prototype={_radius:4.5,_circle:rg(4.5),pointRadius:function(e){return(e*=1)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=rg(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(!this._string.length)return null;var e=this._string.join("");return this._string=[],e}},rv.prototype={constructor:rv,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var rT=m(30*h);function rA(e,t){var r;return+t?function(e,t){function r(n,i,a,o,s,l,c,u,h,d,m,g,y,v){var x=c-n,b=u-i,_=x*x+b*b;if(_>4*t&&y--){var k=o+d,T=s+m,M=l+g,S=w(k*k+T*T+M*M),E=A(M/=S),C=1e-6>f(f(M)-1)||1e-6>f(a-h)?(a+h)/2:p(T,k),L=e(C,E),I=L[0],P=L[1],z=I-n,O=P-i,D=b*z-x*O;(D*D/_>t||f((x*z+b*O)/_-.5)>.3||o*d+s*m+l*g2?e[2]%360*h:0,P()):[v*u,x*u,b*u]},L.angle=function(e){return arguments.length?(_=e%360*h,P()):_*u},L.reflectX=function(e){return arguments.length?(k=e?-1:1,P()):k<0},L.reflectY=function(e){return arguments.length?(T=e?-1:1,P()):T<0},L.precision=function(e){return arguments.length?(o=rA(s,C=e*e),z()):w(C)},L.fitExtent=function(e,t){return rb(L,e,t)},L.fitSize=function(e,t){return r_(L,e,t)},L.fitWidth=function(e,t){return rw(L,e,t)},L.fitHeight=function(e,t){return rk(L,e,t)},function(){return t=e.apply(this,arguments),L.invert=t.invert&&I,P()}}function rL(e){var t=0,r=o/3,n=rC(e),i=n(t,r);return i.parallels=function(e){return arguments.length?n(t=e[0]*h,r=e[1]*h):[t*u,r*u]},i}function rI(e,t){var r=b(e),n=(r+b(t))/2;if(1e-6>f(n)){var i=m(e);function a(e,t){return[e*i,b(t)/i]}return a.invert=function(e,t){return[e/i,A(t*i)]},a}var s=1+r*(2*n-r),l=w(s)/n;function c(e,t){var r=w(s-2*n*b(t))/n;return[r*b(e*=n),l-r*m(e)]}return c.invert=function(e,t){var r=l-t,i=p(e,f(r))*_(r);return r*n<0&&(i-=o*_(e)*_(r)),[i/n,A((s-(e*e+r*r)*n*n)/(2*n))]},c}function rP(){return rL(rI).scale(155.424).center([0,33.6442])}function rz(){return rP().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function rO(e){return function(t,r){var n=m(t),i=m(r),a=e(n*i);return[a*i*b(t),a*b(r)]}}function rD(e){return function(t,r){var n=w(t*t+r*r),i=e(n),a=b(i);return[p(t*a,n*m(i)),A(n&&r*a/n)]}}var rR=rO(function(e){return w(2/(1+e))});rR.invert=rD(function(e){return 2*A(e/2)});var rj=rO(function(e){return(e=T(e))&&e/b(e)});function rF(e,t){return[e,v(k((s+t)/2))]}function rB(e){var t,r,n,i=rE(e),a=i.center,s=i.scale,l=i.translate,c=i.clipExtent,u=null;function h(){var a=o*s(),l=i(e0(i.rotate()).invert([0,0]));return c(null==u?[[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]]:e===rF?[[Math.max(l[0]-a,u),t],[Math.min(l[0]+a,r),n]]:[[u,Math.max(l[1]-a,t)],[r,Math.min(l[1]+a,n)]])}return i.scale=function(e){return arguments.length?(s(e),h()):s()},i.translate=function(e){return arguments.length?(l(e),h()):l()},i.center=function(e){return arguments.length?(a(e),h()):a()},i.clipExtent=function(e){return arguments.length?(null==e?u=t=r=n=null:(u=+e[0][0],t=+e[0][1],r=+e[1][0],n=+e[1][1]),h()):null==u?null:[[u,t],[r,n]]},h()}function rN(e){return k((s+e)/2)}function rU(e,t){var r=m(e),n=e===t?b(e):v(r/m(t))/v(rN(t)/rN(e)),i=r*x(rN(e),n)/n;if(!n)return rF;function a(e,t){i>0?t<-s+1e-6&&(t=-s+1e-6):t>s-1e-6&&(t=s-1e-6);var r=i/x(rN(t),n);return[r*b(n*e),i-r*m(n*e)]}return a.invert=function(e,t){var r=i-t,a=_(n)*w(e*e+r*r),l=p(e,f(r))*_(r);return r*n<0&&(l-=o*_(e)*_(r)),[l/n,2*d(x(i/a,1/n))-s]},a}function rV(e,t){return[e,t]}function rq(e,t){var r=m(e),n=e===t?b(e):(r-m(t))/(t-e),i=r/n+e;if(1e-6>f(n))return rV;function a(e,t){var r=i-t,a=n*e;return[r*b(a),i-r*m(a)]}return a.invert=function(e,t){var r=i-t,a=p(e,f(r))*_(r);return r*n<0&&(a-=o*_(e)*_(r)),[a/n,i-_(n)*w(e*e+r*r)]},a}rj.invert=rD(function(e){return e}),rF.invert=function(e,t){return[e,2*d(y(t))-s]},rV.invert=rV;var rH=w(3)/2;function rG(e,t){var r=A(rH*b(t)),n=r*r,i=n*n*n;return[e*m(r)/(rH*(1.340264+-.24331799999999998*n+i*(.0062510000000000005+.034164*n))),r*(1.340264+-.081106*n+i*(893e-6+.003796*n))]}function rW(e,t){var r=m(t),n=m(e)*r;return[r*b(e)/n,b(t)/n]}function rY(e,t){var r=t*t,n=r*r;return[e*(.8707-.131979*r+n*(-.013791+n*(.003971*r-.001529*n))),t*(1.007226+r*(.015085+n*(-.044475+.028874*r-.005916*n)))]}function rX(e,t){return[m(t)*b(e),b(t)]}function rZ(e,t){var r=m(t),n=1+m(e)*r;return[r*b(e)/n,b(t)/n]}function r$(e,t){return[v(k((s+t)/2)),-e]}rG.invert=function(e,t){for(var r,n,i=t,a=i*i,o=a*a*a,s=0;s<12&&(n=i*(1.340264+-.081106*a+o*(893e-6+.003796*a))-t,i-=r=n/(1.340264+-.24331799999999998*a+o*(.0062510000000000005+.034164*a)),o=(a=i*i)*a*a,!(1e-12>f(r)));++s);return[rH*e*(1.340264+-.24331799999999998*a+o*(.0062510000000000005+.034164*a))/m(i),A(b(i)/rH)]},rW.invert=rD(d),rY.invert=function(e,t){var r,n=t,i=25;do{var a=n*n,o=a*a;n-=r=(n*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-t)/(1.007226+a*(.045255+o*(-.311325+.259866*a-.005916*11*o)))}while(f(r)>1e-6&&--i>0);return[e/(.8707+(a=n*n)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),n]},rX.invert=rD(A),rZ.invert=rD(function(e){return 2*d(e)}),r$.invert=function(e,t){return[-t,2*d(y(e))-s]},e.geoAlbers=rz,e.geoAlbersUsa=function(){var e,t,r,n,i,a,o=rz(),s=rP().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=rP().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(e,t){a=[e,t]}};function u(e){var t=e[0],o=e[1];return a=null,r.point(t,o),a||(n.point(t,o),a)||(i.point(t,o),a)}function h(){return e=t=null,u}return u.invert=function(e){var t=o.scale(),r=o.translate(),n=(e[0]-r[0])/t,i=(e[1]-r[1])/t;return(i>=.12&&i<.234&&n>=-.425&&n<-.214?s:i>=.166&&i<.234&&n>=-.214&&n<-.115?l:o).invert(e)},u.stream=function(r){var n,i;return e&&t===r?e:(i=(n=[o.stream(t=r),s.stream(r),l.stream(r)]).length,e={point:function(e,t){for(var r=-1;++rey(n[0],n[1])&&(n[1]=i[1]),ey(i[0],n[1])>ey(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(o=-1/0,r=a.length-1,t=0,n=a[r];t<=r;n=i,++t)i=a[t],(s=ey(n[1],i[0]))>o&&(o=s,J=i[0],ee=n[1])}return eo=es=null,J===1/0||Q===1/0?[[NaN,NaN],[NaN,NaN]]:[[J,Q],[ee,et]]},e.geoCentroid=function(e){eb=e_=ew=ek=eT=eA=eM=eS=eE=eC=eL=0,P(e,eR);var t=eE,r=eC,n=eL,i=t*t+r*r+n*n;return i<1e-12&&(t=eA,r=eM,n=eS,e_<1e-6&&(t=ew,r=ek,n=eT),(i=t*t+r*r+n*n)<1e-12)?[NaN,NaN]:[p(r,t)*u,A(n/w(i))*u]},e.geoCircle=function(){var e,t,r=eY([0,0]),n=eY(90),i=eY(6),a={point:function(r,n){e.push(r=t(r,n)),r[0]*=u,r[1]*=u}};function o(){var o=r.apply(this,arguments),s=n.apply(this,arguments)*h,l=i.apply(this,arguments)*h;return e=[],t=e$(-o[0]*h,-o[1]*h,0).invert,e1(a,s,l,1),o={type:"Polygon",coordinates:[e]},e=t=null,o}return o.center=function(e){return arguments.length?(r="function"==typeof e?e:eY([+e[0],+e[1]]),o):r},o.radius=function(e){return arguments.length?(n="function"==typeof e?e:eY(+e),o):n},o.precision=function(e){return arguments.length?(i="function"==typeof e?e:eY(+e),o):i},o},e.geoClipAntimeridian=ti,e.geoClipCircle=ta,e.geoClipExtent=function(){var e,t,r,n=0,i=0,a=960,o=500;return r={stream:function(r){return e&&t===r?e:e=to(n,i,a,o)(t=r)},extent:function(s){return arguments.length?(n=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],e=t=null,r):[[n,i],[a,o]]}}},e.geoClipRectangle=to,e.geoConicConformal=function(){return rL(rU).scale(109.5).parallels([30,30])},e.geoConicConformalRaw=rU,e.geoConicEqualArea=rP,e.geoConicEqualAreaRaw=rI,e.geoConicEquidistant=function(){return rL(rq).scale(131.154).center([0,13.9389])},e.geoConicEquidistantRaw=rq,e.geoContains=function(e,t){return(e&&tx.hasOwnProperty(e.type)?tx[e.type]:t_)(e,t)},e.geoDistance=tv,e.geoEqualEarth=function(){return rE(rG).scale(177.158)},e.geoEqualEarthRaw=rG,e.geoEquirectangular=function(){return rE(rV).scale(152.63)},e.geoEquirectangularRaw=rV,e.geoGnomonic=function(){return rE(rW).scale(144.049).clipAngle(60)},e.geoGnomonicRaw=rW,e.geoGraticule=tE,e.geoGraticule10=function(){return tE()()},e.geoIdentity=function(){var e,t,r,n,i,a,o,s=1,l=0,c=0,f=1,d=1,p=0,g=null,y=1,v=1,x=ry({point:function(e,t){var r=k([e,t]);this.stream.point(r[0],r[1])}}),_=tC;function w(){return y=s*f,v=s*d,a=o=null,k}function k(r){var n=r[0]*y,i=r[1]*v;if(p){var a=i*e-n*t;n=n*e+i*t,i=a}return[n+l,i+c]}return k.invert=function(r){var n=r[0]-l,i=r[1]-c;if(p){var a=i*e+n*t;n=n*e-i*t,i=a}return[n/y,i/v]},k.stream=function(e){return a&&o===e?a:a=x(_(o=e))},k.postclip=function(e){return arguments.length?(_=e,g=r=n=i=null,w()):_},k.clipExtent=function(e){return arguments.length?(_=null==e?(g=r=n=i=null,tC):to(g=+e[0][0],r=+e[0][1],n=+e[1][0],i=+e[1][1]),w()):null==g?null:[[g,r],[n,i]]},k.scale=function(e){return arguments.length?(s=+e,w()):s},k.translate=function(e){return arguments.length?(l=+e[0],c=+e[1],w()):[l,c]},k.angle=function(r){return arguments.length?(t=b(p=r%360*h),e=m(p),w()):p*u},k.reflectX=function(e){return arguments.length?(f=e?-1:1,w()):f<0},k.reflectY=function(e){return arguments.length?(d=e?-1:1,w()):d<0},k.fitExtent=function(e,t){return rb(k,e,t)},k.fitSize=function(e,t){return r_(k,e,t)},k.fitWidth=function(e,t){return rw(k,e,t)},k.fitHeight=function(e,t){return rk(k,e,t)},k},e.geoInterpolate=function(e,t){var r,n,i=e[0]*h,a=e[1]*h,o=t[0]*h,s=t[1]*h,l=m(a),c=b(a),f=m(s),d=b(s),g=l*m(i),y=l*b(i),v=f*m(o),x=f*b(o),_=2*A(w((r=b((r=s-a)/2))*r+l*f*((n=b((n=o-i)/2))*n))),k=b(_),T=_?function(e){var t=b(e*=_)/k,r=b(_-e)/k,n=r*g+t*v,i=r*y+t*x;return[p(i,n)*u,p(r*c+t*d,w(n*n+i*i))*u]}:function(){return[i*u,a*u]};return T.distance=_,T},e.geoLength=tm,e.geoMercator=function(){return rB(rF).scale(961/c)},e.geoMercatorRaw=rF,e.geoNaturalEarth1=function(){return rE(rY).scale(175.295)},e.geoNaturalEarth1Raw=rY,e.geoOrthographic=function(){return rE(rX).scale(249.5).clipAngle(90.000001)},e.geoOrthographicRaw=rX,e.geoPath=function(e,t){var r,n,i=4.5;function a(e){return e&&("function"==typeof i&&n.pointRadius(+i.apply(this,arguments)),P(e,r(n))),n.result()}return a.area=function(e){return P(e,r(tR)),tR.result()},a.measure=function(e){return P(e,r(rf)),rf.result()},a.bounds=function(e){return P(e,r(tZ)),tZ.result()},a.centroid=function(e){return P(e,r(t4)),t4.result()},a.projection=function(t){return arguments.length?(r=null==t?(e=null,tC):(e=t).stream,a):e},a.context=function(e){return arguments.length?(n=null==e?(t=null,new rm):new ra(t=e),"function"!=typeof i&&n.pointRadius(i),a):t},a.pointRadius=function(e){return arguments.length?(i="function"==typeof e?e:(n.pointRadius(+e),+e),a):i},a.projection(e).context(t)},e.geoProjection=rE,e.geoProjectionMutator=rC,e.geoRotation=e0,e.geoStereographic=function(){return rE(rZ).scale(250).clipAngle(142)},e.geoStereographicRaw=rZ,e.geoStream=P,e.geoTransform=function(e){return{stream:ry(e)}},e.geoTransverseMercator=function(){var e=rB(r$),t=e.center,r=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?r([e[0],e[1],e.length>2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90]).scale(159.155)},e.geoTransverseMercatorRaw=r$,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?n(e,pX()):n((r=r||self).d3=r.d3||{},r.d3)}}),p$=d({"src/lib/usa_location_names.js"(e,t){var r={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"};t.exports={usaLocationAbbreviations:new Set(Object.values(r)),usaLocationList:r}}}),pK={};p(pK,{COUNTRIES_X:()=>pJ});var pJ,pQ=f({"src/lib/custom_country_codes.ts"(){pJ=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),p0=d({"src/lib/geo_location_utils.js"(e,t){var r=b(),{COUNTRIES:n,createLookup:i}=pq(),{area:a}=pW(),{centroid:o}=pY(),{coordAll:s}=pG(),{geoBounds:l}=pZ(),c=tb(),u=eS(),h=C(),f=I(),d=nj(),{usaLocationAbbreviations:p,usaLocationList:m}=p$(),{COUNTRIES_X:g}=(pQ(),y(pK)),{lookupAlpha3:v}=i([...n,...g]),x={"ISO-3":c,"USA-states":function(e){return e=e.trim(),(p.has(e.toUpperCase())?e.toUpperCase():m[e.toLowerCase()])||(u.log("Unrecognized US location: "+e+"."),!1)},"country names":function(e){return v(e)||(u.log("Unrecognized country name: "+e+"."),!1)}};function _(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function w(e){var t=e.geojson,r=window.PlotlyGeoAssets||{},n="string"==typeof t?r[t]:t;return h(n)?n:(u.error("Oops ... something went wrong when fetching "+t),!1)}function k([e,t]){return[e,e>t?t+360:t]}t.exports={locationToFeature:function(e,t,r){var n;if(!t||"string"!=typeof t)return!1;let i=x[e](t);if(i){let t;if("USA-states"===e)for(let e of(t=[],r))(null==(n=e?.properties)?void 0:n.gu)==="USA"&&t.push(e);else t=r;for(let e of t)if(e.id===i)return e;u.log(`Location with id ${i} does not have a matching topojson feature at this resolution.`)}return!1},feature2polygons:function(e){var t,r,n,i,a=e.geometry,o=a.coordinates,s=e.id,l=[];switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===_(e))t=e;else for(t=Array(e.length),i=0;it?r[n++]=[e[i][0]+360,e[i][1]]:i===t?(r[n++]=e[i],r[n++]=[e[i][0],-90]):r[n++]=e[i];var a=d.tester(r);a.pts.pop(),l.push(a)}:function(e){l.push(d.tester(e))},a.type){case"MultiPolygon":for(r=0;r0?c.properties.ct=function(e){var t,r=e.geometry;if("MultiPolygon"===r.type)for(var n=r.coordinates,i=0,s=0;si&&(i=c,t=l)}else t=r;return o(t).geometry.coordinates}(c):c.properties.ct=[NaN,NaN],n.fIn=e,n.fOut=c,s.push(c)}else u.log(["Location",n.loc,"does not have a valid GeoJSON geometry. Traces with locationmode *geojson-id* only support *Polygon* and *MultiPolygon* geometries."].join(" "))}delete i[r]}switch(r.type){case"FeatureCollection":var h=r.features;for(n=0;n100?(clearInterval(a),n("Unexpected error while fetching from "+e)):void i++},50)})}(a)):(t[a]="pending",n.push(function(e){return new Promise(function(n,i){r.json(e,function(r,a){return r?(delete t[e],i(Error(404===r.status?'GeoJSON at URL "'+e+'" does not exist.':"Unexpected error while fetching from "+e))):(t[e]=a,n(a))})})}(a))))}return n},computeBbox:function(e){let t;try{t=s(e)}catch{return null}if(0===t.length)return null;if(1===t.length){let[e,r]=t[0];return[e,r,e,r]}let[[r,n],[i,a]]=l({type:"MultiPoint",coordinates:t});return[r,n,k([r,i])[1],a]},doesCrossAntiMeridian:_,getFitboundsLonRange:function(e){let t=e.filter(isFinite).sort((e,t)=>e-t);if(t.length<2)return null;let r=t.length,n=t[r-1]-t[0];if(n>=360)return null;let i=-1/0,a=-1;for(let e=0;ei&&(i=r,a=e)}return i<=360-n?null:[t[a+1],t[a]+360]},unwrapLonRange:k,ANTIMERIDIAN_LON_SHIFT:360}}}),p1=d({"src/traces/scattergeo/style.js"(e,t){var r=b(),n=rE(),i=eC(),a=iL(),o=a.stylePoints,s=a.styleText;t.exports=function(e,t){var a,l,c,u;t&&(a=e,c=(l=t)[0].trace,(u=l[0].node3).style("opacity",l[0].trace.opacity),o(u,c,a),s(u,c,a),u.selectAll("path.js-line").style("fill","none").each(function(e){var t=r.select(this),a=e.trace,o=a.line||{};t.call(i.stroke,o.color).call(n.dashLine,o.dash||"",o.width||0),"none"!==a.fill&&t.call(i.fill,a.fillcolor)}))}}}),p2=d({"src/traces/scattergeo/plot.js"(e,t){var r=b(),n=tY(),i=pU().getTopojsonFeatures,a=pV(),o=p0(),s=rP().findExtremes,l=M().BADNUM,c=ib().calcMarkerSize,u=rk(),h=p1();t.exports={calcGeoJSON:function(e,t){var r,a,u=e[0].trace,h=t[u.geo],f=h._subplot,d=u._length;if(n.isArrayOrTypedArray(u.locations)){var p=u.locationmode,m="geojson-id"===p?o.extractTraceFeature(e):i(u,f.topojson);for(r=0;r")}}(c,m,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}}}),p5=d({"src/traces/scattergeo/event_data.js"(e,t){t.exports=function(e,t,r,n,i){e.lon=t.lon,e.lat=t.lat,e.location=t.loc?t.loc:null;var a=n[i];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e}}}),p4=d({"src/traces/scattergeo/select.js"(e,t){var r=rk(),n=M().BADNUM;t.exports=function(e,t){var i,a,o,s,l,c=e.cd,u=e.xaxis,h=e.yaxis,f=[],d=c[0].trace;if(!r.hasMarkers(d)&&!r.hasText(d))return[];if(!1===t)for(l=0;l0?1:e<0?-1:0},m=Math.sin,g=Math.tan,y=Math.PI,v=y/2,x=y/4,b=Math.SQRT1_2,_=E(2),w=E(y),k=2*y,T=180/y,A=y/180;function M(e){return e>1?v:e<-1?-v:Math.asin(e)}function S(e){return e>1?0:e<-1?y:Math.acos(e)}function E(e){return e>0?Math.sqrt(e):0}function C(e){return(s(e)-s(-e))/2}function L(e){return(s(e)+s(-e))/2}function I(e){var t=g(e/2),r=2*c(o(e/2))/(t*t);function i(e,t){var n=o(e),i=o(t),a=m(t),s=i*n,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*i*m(e),l*a]}return i.invert=function(t,i){var s,l=E(t*t+i*i),u=-e/2,h=50;if(!l)return[0,0];do{var f=u/2,d=o(f),p=m(f),g=p/d,y=-c(n(d));u-=s=(2/g*y-r*g-l)/(-y/(p*p)+1-r/(2*d*d))*(d<0?.7:1)}while(n(s)>1e-6&&--h>0);var v=m(u);return[a(t*v,l*o(u)),M(i*v/l)]},i}function P(e,t){var r,n=o(t),i=(r=S(n*o(e/=2)))?r/Math.sin(r):1;return[2*n*m(e)*i,m(t)*i]}function z(e){var t=m(e),r=o(e),i=e>=0?1:-1,s=g(i*e),l=(1+t-r)/2;function c(e,n){var c=o(n),u=o(e/=2);return[(1+c)*m(e),(i*n>-a(u,s)-.001?0:-(10*i))+l+m(n)*r-(1+c)*t*u]}return c.invert=function(e,c){var u=0,h=0,f=50;do{var d=o(u),p=m(u),g=o(h),y=m(h),v=1+g,x=v*p-e,b=l+y*r-v*t*d-c,_=v*d/2,w=-p*y,k=t*v*p/2,T=r*g+t*d*y,A=w*k-T*_,M=(b*w-x*T)/A/2,S=(x*k-b*_)/A;n(S)>2&&(S/=2),u-=M,h-=S}while((n(M)>1e-6||n(S)>1e-6)&&--f>0);return i*h>-a(o(u),s)-.001?[2*u,h]:null},c}function O(e,t){var r=g(t/2),n=E(1-r*r),i=1+n*o(e/=2),a=m(e)*n/i,s=r/i,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}P.invert=function(e,t){if(!(e*e+4*t*t>y*y+1e-6)){var r=e,i=t,a=25;do{var s,l=m(r),c=m(r/2),u=o(r/2),h=m(i),f=o(i),d=m(2*i),p=h*h,g=f*f,v=c*c,x=1-g*u*u,b=x?S(f*u)*E(s=1/x):s=0,_=2*b*f*c-e,w=b*h-t,k=s*(g*v+b*f*u*p),T=s*(.5*l*d-2*b*h*c),A=.25*s*(d*c-b*h*g*l),M=s*(p*u+b*v*f),C=T*A-M*k;if(!C)break;var L=(w*T-_*M)/C,I=(_*A-w*k)/C;r-=L,i-=I}while((n(L)>1e-6||n(I)>1e-6)&&--a>0);return[r,i]}},O.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&n(t)>1)return null;var r,i,s=1+e*e+t*t,l=E((s-E(s*s-4*t*t))/2),u=M(l)/3,h=l?c((r=n(t/l))+E(r*r-1))/3:c((i=n(e))+E(i*i+1))/3,f=o(u),d=L(h),g=d*d-f*f;return[2*p(e)*a(C(h)*f,.25-g),2*p(t)*a(d*m(u),.25+g)]};var D=E(8),R=c(1+_);function j(e,t){var r=n(t);return rv){var l=a(s[1],s[0]),c=E(s[0]*s[0]+s[1]*s[1]),u=r*d((l-v)/r)+v,h=a(m(l-=u),2-o(l));l=u+M(y/c*m(h))-h,s[0]=c*o(l),s[1]=c*m(l)}return s}return s.invert=function(e,n){var s=E(e*e+n*n);if(s>v){var l=a(n,e),c=r*d((l-v)/r)+v,u=l>c?-1:1,h=s*o(c-l),f=1/g(u*S((h-y)/E(y*(y-2*h)+s*s)));e=s*o(l=c+2*i((f+u*E(f*f-3))/3)),n=s*m(l)}return t.geoAzimuthalEquidistantRaw.invert(e,n)},s}function B(e,r){if(arguments.length<2&&(r=e),1===r)return t.geoAzimuthalEqualAreaRaw;if(r===1/0)return N;function n(n,i){var a=t.geoAzimuthalEqualAreaRaw(n/r,i);return a[0]*=e,a}return n.invert=function(n,i){var a=t.geoAzimuthalEqualAreaRaw.invert(n/e,i);return a[0]*=r,a},n}function N(e,t){return[e*o(t)/o(t/=2),2*m(t)]}function U(e,t,r){var i,a,o,s=100;r=void 0===r?0:+r,t*=1;do(a=e(r))===(o=e(r+1e-6))&&(o=a+1e-6),r-=i=-1e-6*(a-t)/(a-o);while(s-- >0&&n(i)>1e-6);return s<0?NaN:r}function V(e,t,r){return void 0===t&&(t=40),void 0===r&&(r=1e-12),function(i,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var h=0;hl){o-=c/=2,s-=u/=2;continue}l=m;var g=(o>0?-1:1)*r,y=(s>0?-1:1)*r,v=e(o+g,s),x=e(o,s+y),b=(v[0]-f[0])/g,_=(v[1]-f[1])/g,w=(x[0]-f[0])/y,k=(x[1]-f[1])/y,T=k*b-_*w,A=(.5>n(T)?.5:1)/T;if(c=(p*w-d*k)*A,u=(d*_-p*b)*A,o+=c,s+=u,n(c)0&&(i[1]*=1+a/1.5*i[0]*i[0]),i}return t.invert=V(t),t}function H(e,t){var r,i=e*m(t),a=30;do t-=r=(t+m(t)-i)/(1+o(t));while(n(r)>1e-6&&--a>0);return t/2}function G(e,t,r){function n(n,i){return[e*n*o(i=H(r,i)),t*m(i)]}return n.invert=function(n,i){return[n/(e*o(i=M(i/t))),M((2*i+m(2*i))/r)]},n}j.invert=function(e,t){if((a=n(t))1e-12&&--u>0);return[e/(o(l)*(D-1/m(l))),p(t)*l]},N.invert=function(e,t){var r=2*M(t/2);return[e*o(r/2)/o(r),r]};var W=G(_/v,_,y);function Y(e,t){var r=H(y,t);return[2.00276*e/(1/o(t)+1.11072/o(r)),(t+_*m(r))/2.00276]}function X(e){var r=0,n=t.geoProjectionMutator(e),i=n(r);return i.parallel=function(e){return arguments.length?n(r=e*A):r*T},i}function Z(e,t){return[e*o(t),t]}function $(e){if(!e)return Z;var t=1/g(e);function r(r,n){var i=t+e-n,a=i&&r*o(n)/i;return[i*m(a),t-i*o(a)]}return r.invert=function(r,n){var i=E(r*r+(n=t-n)*n),s=t+e-i;return[i/o(s)*a(r,n),s]},r}function K(e){function t(t,r){var n=v-r,i=n&&t*e*m(n)/n;return[n*m(i)/e,v-n*o(i)]}return t.invert=function(t,r){var n=t*e,i=v-r,o=E(n*n+i*i),s=a(n,i);return[(o?o/m(o):1)*s/e,v-o]},t}Y.invert=function(e,t){var r,i,a=2.00276*t,s=t<0?-x:x,l=25;do i=a-_*m(s),s-=r=(m(2*s)+2*s-y*m(i))/(2*o(2*s)+2+y*o(i)*_*o(s));while(n(r)>1e-6&&--l>0);return[e*(1/o(i=a-_*m(s))+1.11072/o(s))/2.00276,i]},Z.invert=function(e,t){return[e/o(t),t]};var J=G(1,4/y,y);function Q(e,t,r,i,s,l){var c,u=o(l);if(n(e)>1||n(l)>1)c=S(r*s+t*i*u);else{var h=m(e/2),f=m(l/2);c=2*M(E(h*h+t*i*f*f))}return n(c)>1e-6?[c,a(i*m(l),t*s-r*i*u)]:[0,0]}function ee(e,t,r){return S((e*e+t*t-r*r)/(2*e*t))}function et(e,t,r){for(var n,i=[[e[0],e[1],m(e[1]),o(e[1])],[t[0],t[1],m(t[1]),o(t[1])],[r[0],r[1],m(r[1]),o(r[1])]],a=i[2],s=0;s<3;++s,a=n)n=i[s],a.v=Q(n[1]-a[1],a[3],a[2],n[3],n[2],n[0]-a[0]),a.point=[0,0];var c=ee(i[0].v[0],i[2].v[0],i[1].v[0]),u=ee(i[0].v[0],i[1].v[0],i[2].v[0]),h=y-c;i[2].point[1]=0,i[0].point[0]=-(i[1].point[0]=i[0].v[0]/2);var f=[i[2].point[0]=i[0].point[0]+i[2].v[0]*o(c),2*(i[0].point[1]=i[1].point[1]=i[2].v[0]*m(c))];return function(e,t){var r,n=m(t),a=o(t),s=[,,,];for(r=0;r<3;++r){var c,d=i[r];if(s[r]=Q(t-d[1],d[3],d[2],a,n,e-d[0]),!s[r][0])return d.point;s[r][1]=(c=s[r][1]-d.v[1])-2*y*l((c+y)/(2*y))}var p=f.slice();for(r=0;r<3;++r){var g=2==r?0:r+1,v=ee(i[r].v[0],s[r][0],s[g][0]);s[r][1]<0&&(v=-v),r?1==r?(v=u-v,p[0]-=s[r][0]*o(v),p[1]-=s[r][0]*m(v)):(v=h-v,p[0]+=s[r][0]*o(v),p[1]+=s[r][0]*m(v)):(p[0]+=s[r][0]*o(v),p[1]-=s[r][0]*m(v))}return p[0]/=3,p[1]/=3,p}}function er(e){return e[0]*=A,e[1]*=A,e}function en(e,r,n){var i=t.geoCentroid({type:"MultiPoint",coordinates:[e,r,n]}),a=[-i[0],-i[1]],o=t.geoRotation(a),s=et(er(o(e)),er(o(r)),er(o(n)));s.invert=V(s);var l=t.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(e){return arguments.length?c(o(e)):o.invert(c())},l.clipAngle(90)}function ei(e,t){var r=E(1-m(t));return[2/w*e*r,w*(1-r)]}function ea(e){var t=g(e);function r(e,r){return[e,(e?e/m(e):1)*(m(r)*o(e)-t*o(r))]}return r.invert=t?function(e,r){e&&(r*=m(e)/e);var n=o(e);return[e,2*a(E(n*n+t*t-r*r)-n,t-r)]}:function(e,t){return[e,M(e?t*g(e)/e:t)]},r}ei.invert=function(e,t){var r=(r=t/w-1)*r;return[r>0?e*E(y/r)/2:0,M(1-r)]};var eo=E(3);function es(e,t){return[eo*e*(2*o(2*t/3)-1)/w,eo*w*m(t/3)]}function el(e){var t=o(e);function r(e,r){return[e*t,m(r)/t]}return r.invert=function(e,r){return[e/t,M(r*t)]},r}function ec(e){var t=o(e);function r(e,r){return[e*t,(1+t)*g(r/2)]}return r.invert=function(e,r){return[e/t,2*i(r/(1+t))]},r}function eu(e,t){var r=E(8/(3*y));return[r*e*(1-n(t)/y),r*t]}function eh(e,t){var r=E(4-3*m(n(t)));return[2/E(6*y)*e*r,p(t)*E(2*y/3)*(2-r)]}function ef(e,t){var r=E(y*(4+y));return[2/r*e*(1+E(1-4*t*t/(y*y))),4/r*t]}function ed(e,t){var r=(2+v)*m(t);t/=2;for(var i=0,a=1/0;i<10&&n(a)>1e-6;i++){var s=o(t);t-=a=(t+m(t)*(s+2)-r)/(2*s*(1+s))}return[2/E(y*(4+y))*e*(1+o(t)),2*E(y/(4+y))*m(t)]}function ep(e,t){return[e*(1+o(t))/E(2+y),2*t/E(2+y)]}function em(e,t){for(var r=(1+v)*m(t),i=0,a=1/0;i<10&&n(a)>1e-6;i++)t-=a=(t+m(t)-r)/(1+o(t));return r=E(2+y),[e*(1+o(t))/r,2*t/r]}es.invert=function(e,t){var r=3*M(t/(eo*w));return[w*e/(eo*(2*o(2*r/3)-1)),r]},eu.invert=function(e,t){var r=E(8/(3*y)),i=t/r;return[e/(r*(1-n(i)/y)),i]},eh.invert=function(e,t){var r=2-n(t)/E(2*y/3);return[e*E(6*y)/(2*r),p(t)*M((4-r*r)/3)]},ef.invert=function(e,t){var r=E(y*(4+y))/2;return[e*r/(1+E(1-t*t*(4+y)/(4*y))),t*r/2]},ed.invert=function(e,t){var r=t*E((4+y)/y)/2,n=M(r),i=o(n);return[e/(2/E(y*(4+y))*(1+i)),M((n+r*(i+2))/(2+v))]},ep.invert=function(e,t){var r=E(2+y),n=t*r/2;return[r*e/(1+o(n)),n]},em.invert=function(e,t){var r=1+v,n=E(r/2);return[2*e*n/(1+o(t*=n)),M((t+m(t))/r)]};var eg=3+2*_;function ey(e,t){var r=m(e/=2),n=o(e),a=E(o(t)),s=o(t/=2),l=m(t)/(s+_*n*a),u=E(2/(1+l*l)),h=E((_*s+(n+r)*a)/(_*s+(n-r)*a));return[eg*(u*(h-1/h)-2*c(h)),eg*(u*l*(h+1/h)-2*i(l))]}ey.invert=function(e,t){if(!(r=O.invert(e/1.2,1.065*t)))return null;var r,a=r[0],s=r[1],l=20;e/=eg,t/=eg;do{var f=a/2,d=s/2,p=m(f),g=o(f),y=m(d),x=o(d),w=o(s),k=E(w),T=y/(x+_*g*k),A=T*T,M=E(2/(1+A)),S=(_*x+(g+p)*k)/(_*x+(g-p)*k),C=E(S),L=C-1/C,I=C+1/C,P=M*L-2*c(C)-e,z=M*T*I-2*i(T)-t,D=y&&b*k*p*A/y,R=(_*g*x+k)/(2*(x+_*g*k)*(x+_*g*k)*k),j=-.5*T*M*M*M,F=j*D,B=j*R,N=(N=2*x+_*k*(g-p))*N*C,U=(_*g*x*k+w)/N,V=-(_*p*y)/(k*N),q=L*F-2*U/C+M*(U+U/S),H=L*B-2*V/C+M*(V+V/S),G=T*I*F-2*D/(1+A)+M*I*D+M*T*(U-U/S),W=T*I*B-2*R/(1+A)+M*I*R+M*T*(V-V/S),Y=H*G-W*q;if(!Y)break;var X=(z*H-P*W)/Y,Z=(P*G-z*q)/Y;a-=X,s=u(-v,h(v,s-Z))}while((n(X)>1e-6||n(Z)>1e-6)&&--l>0);return 1e-6>n(n(s)-v)?[0,s]:l&&[a,s]};var ev=o(35*A);function ex(e,t){var r=g(t/2);return[e*ev*E(1-r*r),(1+ev)*r]}function eb(e,t){var r=t/2,n=o(r);return[2*e/w*o(t)*n*n,w*g(r)]}function e_(e){var t=1-e,r=i(y,0)[0]-i(-y,0)[0],n=E(2*(i(0,v)[1]-i(0,-v)[1])/r);function i(r,n){var i=o(n),a=m(n);return[i/(t+e*i)*r,t*n+e*a]}function a(e,t){var r=i(e,t);return[r[0]*n,r[1]/n]}function s(e){return a(0,e)[1]}return a.invert=function(r,i){var a=U(s,i);return[r/n*(e+t/o(a)),a]},a}function ew(e){return[e[0]/2,M(g(e[1]/2*A))*T]}function ek(e){return[2*e[0],2*i(m(e[1]*A))*T]}function eT(e,r){var i=2*y/r,s=e*e;function l(r,l){var c=t.geoAzimuthalEquidistantRaw(r,l),u=c[0],h=c[1],f=u*u+h*h;if(f>s){var p=E(f),g=a(h,u),x=i*d(g/i),b=g-x,_=e*o(b),w=(e*m(b)-b*m(_))/(v-_),k=eA(b,w),T=(y-e)/eM(k,_,y);u=p;var A,M=50;do u-=A=(e+eM(k,_,u)*T-p)/(k(u)*T);while(n(A)>1e-6&&--M>0);h=b*m(u),us){var u=E(c),h=a(l,r),f=i*d(h/i),p=h-f;r=u*o(p),l=u*m(p);for(var g=r-v,x=m(r),b=l/x,_=rn(_)||!--w)break;b-=_=(b*x-S*g-l)/(x-2*g*(M*(T+b*k*o(T)-A)-k*(k-b*A))/(M*M))}r=(u=e+eM(C,T,r)*(y-e)/eM(C,T,y))*o(h=f+b),l=u*m(h)}return t.geoAzimuthalEquidistantRaw.invert(r,l)},l}function eA(e,t){return function(r){var n=e*o(r);return r1e-6||n(d)>1e-6)&&--v>0);return[p,g]},u}ex.invert=function(e,t){var r=t/(1+ev);return[e&&e/(ev*E(1-r*r)),2*i(r)]},eb.invert=function(e,t){var r=i(t/w),n=o(r),a=2*r;return[e*w/2/(o(a)*n*n),a]};var eE=eS(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),eC=eS(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),eL=eS(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function eI(e,t){var r=e*e,n=t*t;return[e*(1-.162388*n)*(.87-952426e-9*r*r),t*(1+n/12)]}eI.invert=function(e,t){var r,i=e,a=t,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-t)/(1+s/4)}while(n(r)>1e-6&&--o>0);o=50,e/=1-.162388*s;do{var l=(l=i*i)*l;i-=r=(i*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(n(r)>1e-6&&--o>0);return[i,a]};var eP=eS(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function ez(e){var t=e(v,0)[0]-e(-v,0)[0];function r(r,n){var i=r>0?-.5:.5,a=e(r+i*y,n);return a[0]-=i*t,a}return e.invert&&(r.invert=function(r,n){var i=r>0?-.5:.5,a=e.invert(r+i*t,n),o=a[0]-i*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function eO(e,t){var r=p(e),i=p(t),s=o(t),l=o(e)*s,c=m(e)*s,u=m(i*t);e=n(a(c,u)),t=M(l),n(e-v)>1e-6&&(e%=v);var h=function(e,t){if(t===v)return[0,0];var r,i,a=m(t),s=a*a,l=s*s,c=1+l,u=1+3*l,h=1-l,f=M(1/E(c)),d=h+s*c*f,p=(1-a)/d,g=E(p),x=p*c,b=E(x),_=g*h;if(0===e)return[0,-(_+s*b)];var w,k=o(t),T=1/k,A=2*a*k,S=(-d*k-(-3*s+f*u)*A*(1-a))/(d*d),C=s*c*S+p*u*A,L=-T*A,I=-T*C,P=-2*T*(.5*S/g*h-2*s*g*A),z=4*e/y;if(e>.222*y||t.175*y){if(r=(_+s*E(x*(1+l)-_*_))/(1+l),e>y/4)return[r,r];var O=r,D=.5*r;r=.5*(D+O),i=50;do{var R=E(x-r*r),j=r*(P+L*R)+I*M(r/b)-z;if(!j)break;j<0?D=r:O=r,r=.5*(D+O)}while(n(O-D)>1e-6&&--i>0)}else{r=1e-6,i=25;do{var F=r*r,B=E(x-F),N=P+L*B,U=r*N+I*M(r/b)-z,V=N+(I-L*F)/B;r-=w=B?U/V:0}while(n(w)>1e-6&&--i>0)}return[r,-_-s*E(x-r*r)]}(e>y/4?v-e:e,t);return e>y/4&&(u=h[0],h[0]=-h[1],h[1]=-u),h[0]*=r,h[1]*=-i,h}function eD(e,t){if(t<1e-6)return u=m(e),l=o(e),a=t*(e-u*l)/4,[u-a*l,l+a*u,1-t*u*u/2,e-a];if(t>=.999999){var r;return a=(1-t)/4,l=L(e),u=((r=s(2*(r=e)))-1)/(r+1),c=1/l,[u+a*((h=l*C(e))-e)/(l*l),c-a*u*c*(h-e),c+a*u*c*(h+e),2*i(s(e))-v+a*(h-e)/l]}var a,l,c,u,h,f=[1,0,0,0,0,0,0,0,0],d=[E(t),0,0,0,0,0,0,0,0],p=0;for(l=E(1-t),h=1;n(d[p]/f[p])>1e-6&&p<8;)a=f[p++],d[p]=(a-l)/2,f[p]=(a+l)/2,l=E(a*l),h*=2;c=h*f[p]*e;do c=(M(u=d[p]*m(l=c)/f[p])+c)/2;while(--p);return[m(c),u=o(c),u/o(c-l),c]}function eR(e,t){if(!t)return e;if(1===t)return c(g(e/2+x));for(var r=1,a=E(1-t),o=E(t),s=0;n(o)>1e-6;s++){if(e%y){var l=i(a*g(e)/r);l<0&&(l+=y),e+=l+~~(e/y)*y}else e+=e;o=(r+a)/2,a=E(r*a),o=((r=o)-a)/2}return e/(f(2,s)*r)}function ej(e,t){var r,l,u,h,f,d=(_-1)/(_+1),x=E(1-d*d),b=eR(v,x*x),w=s(-1*c(g(y/4+n(t)/2)))/E(d),k=(r=w*o(-1*e),l=w*m(-1*e),u=r*r,h=l+1,[.5*((r>=0?v:-v)-a(f=1-u-l*l,2*r)),-.25*c(f*f+4*u)+.5*c(h*h+u)]),T=function(e,t,r){var a=n(e),o=C(n(t));if(a){var s=1/m(a),l=1/(g(a)*g(a)),c=-(l+o*o*s*s*r-1+r),u=(-c+E(c*c-(r-1)*l*4))/2;return[eR(i(1/E(u)),r)*p(e),eR(i(E((u/l-1)/r)),1-r)*p(t)]}return[0,eR(i(o),1-r)*p(t)]}(k[0],k[1],x*x);return[-T[1],(t>=0?1:-1)*(.5*b-T[0])]}function eF(e){var t=m(e),r=o(e),i=eB(e);function s(e,a){var s=i(e,a);e=s[0];var l=m(a=s[1]),c=o(a),u=o(e),h=S(t*l+r*c*u),f=m(h),d=n(f)>1e-6?h/f:1;return[d*r*m(e),(n(e)>v?d:-d)*(t*c-r*l*u)]}return i.invert=eB(-e),s.invert=function(e,r){var n=E(e*e+r*r),s=-m(n),l=o(n),c=n*l,u=-r*s,h=n*t,f=E(c*c+u*u-h*h),d=a(c*h+u*f,u*h-c*f),p=(n>v?-1:1)*a(e*s,n*o(d)*l+r*m(d)*s);return i.invert(p,d)},s}function eB(e){var t=m(e),r=o(e);return function(e,n){var i=o(n),s=o(e)*i,l=m(e)*i,c=m(n);return[a(l,s*r-c*t),M(c*r+s*t)]}}eO.invert=function(e,t){n(e)>1&&(e=2*p(e)-e),n(t)>1&&(t=2*p(t)-t);var r=p(e),i=p(t),s=-r*e,l=-i*t,c=l/s<1,u=function(e,t){for(var r=0,i=1,a=.5,s=50;;){var l=a*a,c=E(a),u=M(1/E(1+l)),h=1-l+a*(1+l)*u,f=(1-c)/h,d=E(f),p=f*(1+l),m=d*(1-l),g=E(p-e*e),v=t+m+a*g;if(1e-12>n(i-r)||0==--s||0===v)break;v>0?r=a:i=a,a=.5*(r+i)}if(!s)return null;var x=M(c),b=o(x),_=1/b,w=2*c*b,k=(-h*b-(-3*a+u*(1+3*l))*w*(1-c))/(h*h),T=.5*k/d*(1-l)-2*a*d*w,A=-_*(a*(1+l)*k+f*(1+3*l)*w);return[y/4*(e*(-2*_*T+-_*w*g)+A*M(e/E(p))),x]}(c?l:s,c?s:l),h=u[0],f=u[1],d=o(f);return c&&(h=-v-h),[r*(a(m(h)*d,-m(f))+y),i*M(o(h)*d)]},ej.invert=function(e,t){var r,n,o,l,u,h,f,d,p,m=(_-1)/(_+1),g=E(1-m*m),y=(r=.5*eR(v,g*g)-t,n=-e,o=g*g,r?(l=eD(r,o),n?(h=(u=eD(n,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/h,l[1]*l[2]*u[0]*u[1]/h],[l[1]*u[1]/h,-l[0]*l[2]*u[0]*u[2]/h],[l[2]*u[1]*u[2]/h,-o*l[0]*l[1]*u[0]/h]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=eD(n,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),x=(f=y[0],p=(d=y[1])[0]*d[0]+d[1]*d[1],[(f[0]*d[0]+f[1]*d[1])/p,(f[1]*d[0]-f[0]*d[1])/p]);return[-(a(x[1],x[0])/1),2*i(s(-.5*c(m*x[0]*x[0]+m*x[1]*x[1])))-v]};var eN=M(1-.3333333333333333)*T,eU=el(0);function eV(e){var t=eN*A,r=ei(y,t)[0]-ei(-y,t)[0],i=eU(0,t)[1],a=ei(0,t)[1],o=w-a,s=k/e,c=4/k,f=i+o*o*4/k;function d(d,p){var m,g=n(p);if(g>t){var v=h(e-1,u(0,l((d+y)/s)));d+=y*(e-1)/e-v*s,(m=ei(d,g))[0]=m[0]*k/r-k*(e-1)/(2*e)+v*k/e,m[1]=i+(m[1]-a)*4*o/k,p<0&&(m[1]=-m[1])}else m=eU(d,p);return m[0]*=c,m[1]/=f,m}return d.invert=function(t,d){t/=c;var p=n(d*=f);if(p>i){var m=h(e-1,u(0,l((t+y)/s)));t=(t+y*(e-1)/e-m*s)*r/k;var g=ei.invert(t,.25*(p-i)*k/o+a);return g[0]-=y*(e-1)/e-m*s,d<0&&(g[1]=-g[1]),g}return eU.invert(t,d)},d}function eq(e,t){return[e,1&t?89.999999:eN]}function eH(e,t){return[e,1&t?-89.999999:-eN]}function eG(e){return[.999999*e[0],e[1]]}function eW(e){var t,r=1+e,i=M(m(1/r)),s=2*E(y/(t=y+4*i*r)),l=.5*s*(r+E(e*(2+e))),c=e*e,u=r*r;function h(h,f){var d,p,g=1-m(f);if(g&&g<2){var x,b=v-f,_=25;do{var w=m(b),k=o(b),T=i+a(w,r-k),A=1+u-2*r*k;b-=x=(b-c*i-r*w+A*T-.5*g*t)/(2*r*w*T)}while(n(x)>1e-12&&--_>0);d=s*E(A),p=h*T/y}else d=s*(e+g),p=h*i/y;return[d*m(p),l-d*o(p)]}return h.invert=function(e,n){var o=e*e+(n-=l)*n,h=(1+u-o/(s*s))/(2*r),f=S(h),d=m(f),p=i+a(d,r-h);return[M(e/E(o))*y/p,M(1-2*(f-c*i-r*d+(1+u-2*r*h)*p)/t)]},h}function eY(e,t){return t>-.7109889596207567?(e=W(e,t),e[1]+=.0528035274542,e):Z(e,t)}function eX(e,t){return n(t)>.7109889596207567?(e=W(e,t),e[1]-=t>0?.0528035274542:-.0528035274542,e):Z(e,t)}function eZ(e,t,r,n){var i=E(4*y/(2*r+(1+e-t/2)*m(2*r)+(e+t)/2*m(4*r)+t/2*m(6*r))),a=E(n*m(r)*E((1+e*o(2*r)+t*o(4*r))/(1+e+t))),s=r*c(1);function l(r){return E(1+e*o(2*r)+t*o(4*r))}function c(n){var i=n*r;return(2*i+(1+e-t/2)*m(2*i)+(e+t)/2*m(4*i)+t/2*m(6*i))/r}function u(e){return l(e)*m(e)}var h=function(e,t){var n=r*U(c,s*m(t)/r,t/y);isNaN(n)&&(n=r*p(t));var u=i*l(n);return[u*a*e/y*o(n),u/a*m(n)]};return h.invert=function(e,t){var n=U(u,t*a/i);return[e*y/(o(n)*i*a*l(n)),M(r*c(n/r)/s)]},0===r&&(i=E(n/y),(h=function(e,t){return[e*i,m(t)/i]}).invert=function(e,t){return[e/i,M(t*i)]}),h}function e$(e,t,r){function i(r){return e+(1-e)*f(1-f(r,t),1/t)}function a(e){var t,r,n,a,o;return void 0===t&&(t=20),r=i(0),o=(r+4*(n=i(.5*(0+e)))+(a=i(e)))*(e-0)/6,function e(t,r,n,i,a,o,s,l,c,u,h){var f,d,p,m,g,y,v,x,b,_;if(h.nanEncountered)return NaN;if(f=n-r,d=t(r+.25*f),p=t(n-.25*f),isNaN(d)||isNaN(p)){h.nanEncountered=!0;return}return _=((y=(m=f*(i+4*d+a)/12)+(g=f*(a+4*p+o)/12))-s)/15,u>c?(h.maxDepthCount++,y+_):Math.abs(_)e?r=n:t=n,n=t+r>>1;while(n>t);var i=l[n+1]-l[n];return i&&(i=(e-l[n+1])/i),(n+1+i)/1e3}var h=2*u(1)/y*o/r,d=function(e,t){var r=u(n(m(t))),a=i(r)*e;return r/=h,[a,t>=0?r:-r]};return d.invert=function(e,t){var r;return 1>n(t*=h)&&(r=p(t)*M(a(n(t))*o)),[e/i(n(t)),r]},d}function eK(e,t){for(var r,n,i,a=-1,o=e.length,s=e[0],l=[];++aa[o][2][0];++o);var l=e(t-a[o][1][0],r);return l[0]+=e(a[o][1][0],n*r>n*a[o][0][1]?a[o][0][1]:r)[0],l}a?o.invert=a(o):e.invert&&(o.invert=function(t,r){for(var a=l[+(r<0)],s=i[+(r<0)],c=0,u=a.length;cn(f[0]-d[0])&&1e-6>n(f[1]-d[1]))?p:null}}});var s,l,c=t.geoProjection(o),u=c.stream;return c.stream=function(e){var r=c.rotate(),n=u(e),i=(c.rotate([0,0]),u(e));return c.rotate(r),n.sphere=function(){t.geoStream(s,i)},n},c.lobes=function(t){return arguments.length?(s=function(e){var t,n,i,a,o,s,l,c=[],u=e[0].length;for(l=0;l=0;--l)n=(t=e[1][l])[0][0],i=t[0][1],a=t[1][1],o=t[2][0],s=t[2][1],c.push(eK([[o-1e-6,s-1e-6],[o-1e-6,a+1e-6],[n+1e-6,a+1e-6],[n+1e-6,i-1e-6]],30));return{type:"Polygon",coordinates:[r.merge(c)]}}(t),l=(i=t.map(function(e){return e.map(function(e){return[[e[0][0]*A,e[0][1]*A],[e[1][0]*A,e[1][1]*A],[e[2][0]*A,e[2][1]*A]]})})).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]]})}),c):i.map(function(e){return e.map(function(e){return[[e[0][0]*T,e[0][1]*T],[e[1][0]*T,e[1][1]*T],[e[2][0]*T,e[2][1]*T]]})})},null!=i&&c.lobes(i),c}eY.invert=function(e,t){return t>-.7109889596207567?W.invert(e,t-.0528035274542):Z.invert(e,t)},eX.invert=function(e,t){return n(t)>.7109889596207567?W.invert(e,t+(t>0?.0528035274542:-.0528035274542)):Z.invert(e,t)};var eQ=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],e0=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],e1=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],e2=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],e3=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]],e5=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function e4(e,t){return[3/k*e*E(y*y/3-t*t),t]}function e6(e){function t(t,r){if(1e-6>n(n(r)-v))return[0,r<0?-2:2];var i=m(r),a=f((1+i)/(1-i),e/2),s=.5*(a+1/a)+o(t*=e);return[2*m(t)/s,(a-1/a)/s]}return t.invert=function(t,r){var i=n(r);if(1e-6>n(i-2))return t?null:[0,p(r)*v];if(i>2)return null;t/=2,r/=2;var o=t*t,s=r*r,l=2*r/(1+o+s);return l=f((1+l)/(1-l),1/e),[a(2*t,1-o-s)/e,M((l-1)/(l+1))]},t}e4.invert=function(e,t){return[k/3*e/E(y*y/3-t*t),t]};var e8=y/_;function e9(e,t){return[e*(1+E(o(t)))/2,t/(o(t/2)*o(e/6))]}function e7(e,t){var r=e*e,n=t*t;return[e*(.975534+n*(-.119161+-.0143059*r+-.0547009*n)),t*(1.00384+r*(.0802894+-.02855*n+199025e-9*r)+n*(.0998909+-.0491032*n))]}function te(e,t){return[m(e)/o(t),g(t)*o(e)]}function tt(e){var t=o(e),r=g(x+e/2);function i(i,a){var o=a-e,s=1e-6>n(o)?i*t:1e-6>n(s=x+a/2)||1e-6>n(n(s)-v)?0:i*o/c(g(s)/r);return[s,o]}return i.invert=function(i,a){var o,s=a+e;return[1e-6>n(a)?i/t:1e-6>n(o=x+s/2)||1e-6>n(n(o)-v)?0:i*c(g(o)/r)/a,s]},i}function tr(e,t){return[e,1.25*c(g(x+.4*t))]}function tn(e){var t=e.length-1;function r(r,n){for(var i,a=o(n),s=2/(1+a*o(r)),l=s*a*m(r),c=s*m(n),u=t,h=e[u],f=h[0],d=h[1];--u>=0;)f=(h=e[u])[0]+l*(i=f)-c*d,d=h[1]+l*d+c*i;return[f=l*(i=f)-c*d,d=l*d+c*i]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var h,f=t,d=e[f],p=d[0],g=d[1],y=0,v=0;--f>=0;)d=e[f],y=p+c*(h=y)-u*v,v=g+c*v+u*h,p=d[0]+c*(h=p)-u*g,g=d[1]+c*g+u*h;y=p+c*(h=y)-u*v,v=g+c*v+u*h,p=c*(h=p)-u*g-r,g=c*g+u*h-s;var x,b,_=y*y+v*v;c-=x=(p*y+g*v)/_,u-=b=(g*y-p*v)/_}while(n(x)+n(b)>1e-6*1e-6&&--l>0);if(l){var w=E(c*c+u*u),k=2*i(.5*w),T=m(k);return[a(c*T,w*o(k)),w?M(u*T/w):0]}},r}e9.invert=function(e,t){var r=n(e),i=n(t),a=1e-6,s=v;in(T)&&1e-6>n(A))break}return[e<0?-a:a,t<0?-s:s]},e7.invert=function(e,t){var r=p(e)*y,i=t/2,a=50;do{var o=r*r,s=i*i,l=r*i,c=r*(.975534+s*(-.119161+-.0143059*o+-.0547009*s))-e,u=i*(1.00384+o*(.0802894+-.02855*s+199025e-9*o)+s*(.0998909+-.0491032*s))-t,h=.975534-s*(.119161+3*o*.0143059+.0547009*s),f=-l*(.238322+.2188036*s+.0286118*o),d=l*(.1605788+7961e-7*o+-.0571*s),m=1.00384+o*(.0802894+199025e-9*o)+s*(3*(.0998909-.02855*o)-.245516*s),g=f*d-m*h,v=(u*f-c*m)/g,x=(c*d-u*h)/g;r-=v,i-=x}while((n(v)>1e-6||n(x)>1e-6)&&--a>0);return a&&[r,i]},te.invert=function(e,t){var r=e*e,n=t*t+1,i=r+n,a=e?b*E((i-E(i*i-4*r))/r):1/E(n);return[M(e*a),p(t)*S(a)]},tr.invert=function(e,t){return[e,2.5*i(s(.8*t))-.625*y]};var ti=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],ta=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],to=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ts=[[.9245,0],[0,0],[.01943,0]],tl=[[.721316,0],[0,0],[-.00881625,-.00617325]];function tc(e,r){var n=t.geoProjection(tn(e)).rotate(r).clipAngle(90),i=t.geoRotation(r),a=n.center;return delete n.rotate,n.center=function(e){return arguments.length?a(i(e)):i.invert(a())},n}var tu=E(6),th=E(7);function tf(e,t){var r=M(7*m(t)/(3*tu));return[tu*e*(2*o(2*r/3)-1)/th,9*m(r/3)/th]}function td(e,t){for(var r,i=(1+b)*m(t),a=t,s=0;s<25&&(a-=r=(m(a/2)+m(a)-i)/(.5*o(a/2)+o(a)),!(1e-6>n(r)));s++);return[e*(1+2*o(a)/o(a/2))/(3*_),2*E(3)*m(a/2)/E(2+_)]}function tp(e,t){for(var r,i=E(6/(4+y)),a=(1+y/4)*m(t),s=t/2,l=0;l<25&&(s-=r=(s/2+m(s)-a)/(.5+o(s)),!(1e-6>n(r)));l++);return[i*(.5+o(s))*e/1.5,i*s]}function tm(e,t){var r=t*t,n=r*r,i=r*n;return[e*(.84719-.13063*r+i*i*(-.04515+.05494*r-.02326*n+.00331*i)),t*(1.01183+n*n*(-.02625+.01926*r-.00396*n))]}function tg(e,t){return[e*(1+o(t))/2,2*(t-g(t/2))]}tf.invert=function(e,t){var r=3*M(t*th/9);return[e*th/(tu*(2*o(2*r/3)-1)),M(3*m(r)*tu/7)]},td.invert=function(e,t){var r=t*E(2+_)/(2*E(3)),n=2*M(r);return[3*_*e/(1+2*o(n)/o(n/2)),M((r+m(n))/(1+b))]},tp.invert=function(e,t){var r=E(6/(4+y)),i=t/r;return 1e-6>n(n(i)-v)&&(i=i<0?-v:v),[1.5*e/(r*(.5+o(i))),M((i/2+m(i))/(1+y/4))]},tm.invert=function(e,t){var r,i,a,o,s=t,l=25;do a=(i=s*s)*i,s-=r=(s*(1.01183+a*a*(-.02625+.01926*i-.00396*a))-t)/(1.01183+a*a*(-.23625+.21186*i+-.05148*a));while(n(r)>1e-12&&--l>0);return a=(i=s*s)*i,o=i*a,[e/(.84719-.13063*i+o*o*(-.04515+.05494*i-.02326*a+.00331*o)),s]},tg.invert=function(e,t){for(var r=t/2,i=0,a=1/0;i<10&&n(a)>1e-6;++i){var s=o(t/2);t-=a=(t-g(t/2)-r)/(1-.5/(s*s))}return[2*e/(1+o(t)),t]};var ty=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function tv(e,t){var r=m(t),i=o(t),a=p(e);if(0===e||n(t)===v)return[0,t];if(0===t)return[e,0];if(n(e)===v)return[e*i,v*r];var s=y/(2*e)-2*e/y,l=2*t/y,c=(1-l*l)/(r-l),u=s*s,h=c*c,f=1+u/h,d=1+h/u,g=(s*r/c-s/2)/f,x=(h*r/u+c/2)/d,b=x*x-(h*r*r/u+c*r-1)/d;return[v*(g+E(g*g+i*i/f)*a),v*(x+E(b<0?0:b)*p(-t*s)*a)]}tv.invert=function(e,t){e/=v,t/=v;var r=e*e,n=r+t*t,i=y*y;return[e?(n-1+E((1-n)*(1-n)+4*r))/(2*e)*v:0,U(function(e){return n*(y*m(e)-2*e)*y+4*e*e*(t-m(e))+2*y*e-i*t},0)]};function tx(e,t){var r=t*t;return[e,t*(1.0148+r*r*(.23185+r*(-.14499+.02406*r)))]}function tb(e,t){if(1e-6>n(t))return[e,0];var r=g(t),i=e*m(t);return[m(i)/r,t+(1-o(i))/r]}function t_(e,t){return[e[0]*t[0]+e[1]*t[3],e[0]*t[1]+e[1]*t[4],e[0]*t[2]+e[1]*t[5]+e[2],e[3]*t[0]+e[4]*t[3],e[3]*t[1]+e[4]*t[4],e[3]*t[2]+e[4]*t[5]+e[5]]}function tw(e,t){return[e[0]-t[0],e[1]-t[1]]}function tk(e){return E(e[0]*e[0]+e[1]*e[1])}function tT(e,r,i){function s(e,t){var n,i=r(e,t),a=i.project([e*T,t*T]);return(n=i.transform)?[n[0]*a[0]+n[1]*a[1]+n[2],-(n[3]*a[0]+n[4]*a[1]+n[5])]:(a[1]=-a[1],a)}!function e(t,r){if(t.edges=function(e){for(var t=e.length,r=[],n=e[t-1],i=0;i=0;)if(n=t[s],r[0]===n[0]&&r[1]===n[1]){if(a)return[a,r];a=r}}}(t.face,r.face),p=(s=d.map(r.project),l=d.map(t.project),n=c=tw(s[1],s[0]),i=u=tw(l[1],l[0]),h=a(n[0]*i[1]-n[1]*i[0],n[0]*i[0]+n[1]*i[1]),f=tk(c)/tk(u),t_([1,0,s[0][0],0,1,s[0][1]],t_([f,0,0,0,f,0],t_([o(h),m(h),0,-m(h),o(h),0],[1,0,-l[0][0],0,1,-l[0][1]]))));t.transform=r.transform?t_(r.transform,p):p;for(var g=r.edges,y=0,v=g.length;y1.790857183?t=1.790857183:t<-1.790857183&&(t=-1.790857183);var r,i=t;do{var a=i*i;i-=r=(i*(1.0148+a*a*(.23185+a*(-.14499+.02406*a)))-t)/(1.0148+a*a*(1.1592500000000001+a*(-1.01493+.21654*a)))}while(n(r)>1e-6);return[e,i]},tb.invert=function(e,t){if(1e-6>n(t))return[e,0];var r,i=e*e+t*t,a=.5*t,s=10;do{var l=g(a),c=1/o(a),u=i-2*t*a+a*a;a-=r=(l*u+2*(a-t))/(2+u*c*c+2*(a-t)*l)}while(n(r)>1e-6&&--s>0);return l=g(a),[(n(t)n^d>n&&r<(f-c)*(n-u)/(d-u)+c&&(i=!i)}return i}(e[0],r))return e.push(t),!0})||e.push([t])}),tF=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function tV(e){var r=e(v,0)[0]-e(-v,0)[0];function i(t,i){var a=n(t)0?t-y:t+y,i),s=(o[0]-o[1])*b,l=(o[0]+o[1])*b;if(a)return[s,l];var c=r*b,u=s>0^l>0?-1:1;return[u*s-p(l)*c,u*l-p(s)*c]}return e.invert&&(i.invert=function(t,i){var a=(t+i)*b,o=(i-t)*b,s=n(a)<.5*r&&n(o)<.5*r;if(!s){var l=r*b,c=a>0^o>0?-1:1,u=-c*t+(o>0?1:-1)*l,h=-c*i+(a>0?1:-1)*l;a=(-u-h)*b,o=(u-h)*b}var f=e.invert(a,o);return s||(f[0]+=a>0?y:-y),f}),t.geoProjection(i).rotate([-90,-90,45]).clipAngle(179.999)}function tq(){return tV(ej).scale(111.48)}function tH(e){var t=m(e);function r(r,n){var a=t?g(r*t/2)/t:r/2;if(!n)return[2*a,-e];var s=2*i(a*m(n)),l=1/g(n);return[m(s)*l,n+(1-o(s))*l-e]}return r.invert=function(r,a){if(1e-6>n(a+=e))return[t?2*i(t*r/2)/t:r,0];var s,l=r*r+a*a,c=0,u=10;do{var h=g(c),f=1/o(c),d=l-2*a*c+c*c;c-=s=(h*d+2*(c-a))/(2+d*f*f+2*(c-a)*h)}while(n(s)>1e-6&&--u>0);var p=r*(h=g(c)),v=g(n(a)0?v:-v)*(f+o*(p-c)/2+o*o*(p-2*f+c)/2)]}function tY(e,t){var r=function(e){function t(t,r){var n=o(r),i=(e-1)/(e-n*o(t));return[i*n*m(t),i*m(r)]}return t.invert=function(t,r){var n=t*t+r*r,i=E(n),o=(e-E(1-n*(e+1)/(e-1)))/((e-1)/i+i/(e-1));return[a(t*o,i*E(1-o*o)),i?M(r*o/i):0]},t}(e);if(!t)return r;var n=o(t),i=m(t);function s(t,a){var o=r(t,a),s=o[1],l=s*i/(e-1)+n;return[o[0]*n/l,s/l]}return s.invert=function(t,a){var o=(e-1)/(e-1-a*i);return r.invert(o*t,o*a*n)},s}tG.forEach(function(e){e[1]*=1.0144}),tW.invert=function(e,t){var r=t/v,i=90*r,a=h(18,n(i/5)),o=u(0,l(a));do{var s=tG[o][1],c=tG[o+1][1],f=tG[h(19,o+2)][1],d=f-s,p=f-2*c+s,m=2*(n(r)-c)/d,g=p/d,y=m*(1-g*m*(1-2*g*m));if(y>=0||1===o){i=(t>=0?5:-5)*(y+a);var x,b=50;do o=l(a=h(18,n(i)/5)),y=a-o,s=tG[o][1],i-=(x=(t>=0?v:-v)*((c=tG[o+1][1])+y*((f=tG[h(19,o+2)][1])-s)/2+y*y*(f-2*c+s)/2)-t)*T;while(n(x)>1e-12&&--b>0);break}}while(--o>=0);var _=tG[o][0],w=tG[o+1][0],k=tG[h(19,o+2)][0];return[e/(w+y*(k-_)/2+y*y*(k-2*w+_)/2),i*A]};function tX(e){return e.length>0}function tZ(e){return -90===e||90===e?[0,e]:[-180,Math.floor(1e4*e)/1e4]}function t$(e){var t=e[0],r=e[1],n=!1;return t<=-179.9999?(t=-180,n=!0):t>=179.9999&&(t=180,n=!0),r<=-89.9999?(r=-90,n=!0):r>=89.9999&&(r=90,n=!0),n?[t,r]:e}function tK(e){return e.map(t$)}function tJ(e,t,r){for(var n=0,i=e.length;n=179.9999||u<=-89.9999||u>=89.9999){a[o]=t$(l);for(var h=o+1;h-179.9999&&d<179.9999&&p>-89.9999&&p<89.9999)break}if(h===o+1)continue;if(o){var m={index:-1,polygon:t,ring:a.slice(0,o+1)};m.ring[m.ring.length-1]=tZ(u),r[r.length-1]=m}else r.pop();if(h>=s)break;r.push({index:-1,polygon:t,ring:a=a.slice(h-1)}),a[0]=tZ(a[0][1]),o=-1,s=a.length}}}}function tQ(e){var t,r,n,i,a,o,s=e.length,l={},c={};for(t=0;t0?y-l:l)*T],u=t.geoProjection(e(s)).rotate(c),h=t.geoRotation(c),f=u.center;return delete u.rotate,u.center=function(e){return arguments.length?f(h(e)):h.invert(f())},u.clipAngle(90)}function t5(e){var r=o(e);function n(e,n){var i=t.geoGnomonicRaw(e,n);return i[0]*=r,i}return n.invert=function(e,n){return t.geoGnomonicRaw.invert(e/r,n)},n}function t4(e,t){return t3(t5,e,t)}function t6(e){if(!(e*=2))return t.geoAzimuthalEquidistantRaw;var r=-e/2,n=-r,i=e*e,s=g(n),l=.5/m(n);function c(t,a){var s=S(o(a)*o(t-r)),l=S(o(a)*o(t-n)),c=a<0?-1:1;return s*=s,l*=l,[(s-l)/(2*e),c*E(4*i*l-(i-s+l)*(i-s+l))/(2*e)]}return c.invert=function(e,t){var i,c,u=t*t,h=o(E(u+(i=e+r)*i)),f=o(E(u+(i=e+n)*i));return[a(c=h-f,i=(h+f)*s),(t<0?-1:1)*S(E(i*i+c*c)*l)]},c}function t8(e,t){return t3(t6,e,t)}function t9(e,t){if(1e-6>n(t))return[e,0];var r=n(t/v),i=M(r);if(1e-6>n(e)||1e-6>n(n(t)-v))return[0,p(t)*y*g(i/2)];var a=o(i),s=n(y/e-e/y)/2,l=s*s,c=a/(r+a-1),u=c*(2/r-1),h=u*u,f=h+l,d=c-h,m=l+c;return[p(e)*y*(s*d+E(l*d*d-f*(c*c-h)))/f,p(t)*y*(u*m-s*E((l+1)*f-m*m))/f]}function t7(e,t){if(1e-6>n(t))return[e,0];var r=n(t/v),i=M(r);if(1e-6>n(e)||1e-6>n(n(t)-v))return[0,p(t)*y*g(i/2)];var a=o(i),s=n(y/e-e/y)/2,l=s*s,c=a*(E(1+l)-s*a)/(1+l*r*r);return[p(e)*y*c,p(t)*y*E(1-c*(2*s+c))]}function re(e,t){if(1e-6>n(t))return[e,0];var r=t/v,i=M(r);if(1e-6>n(e)||1e-6>n(n(t)-v))return[0,y*g(i/2)];var a=(y/e-e/y)/2,s=r/(1+o(i));return[y*(p(e)*E(a*a+1-s*s)-a),y*s]}function rt(e,t){if(!t)return[e,0];var r=n(t);if(!e||r===v)return[0,t];var i=r/v,a=i*i,o=(8*i-a*(a+2)-5)/(2*a*(i-1)),s=o*o,l=i*o,c=a+s+2*l,u=i+3*o,h=e/v,f=h+1/h,d=p(n(e)-v)*E(f*f-4),m=d*d,g=c*(a+s*m-1)+(1-a)*(a*(u*u+4*s)+12*l*s+4*s*s),y=(d*(c+s-1)+2*E(g))/(4*c+m);return[p(e)*v*y,p(t)*v*E(1+d*n(y)-y*y)]}function rr(e,t,r,n){var i=y/3;e=u(e,1e-6),t=u(t,1e-6),e=h(e,v),t=h(t,y-1e-6),r=h(r=u(r,0),99.999999);var s=(n=u(n,1e-6))/100,l=S((r/100+1)*o(i))/i,c=m(e)/m(l*v),f=t/y,d=E(s*m(e/2)/m(t/2)),p=d/E(f*c*l),x=1/(d*E(f*c*l));function b(e,t){var r=c*m(l*t),n=E(1-r*r),i=E(2/(1+n*o(e*=f)));return[p*n*i*m(e),x*r*i]}return b.invert=function(e,t){var r=e/p,n=t/x,i=E(r*r+n*n),o=2*M(i/2);return[a(e*g(o),p*i)/f,i&&M(t*m(o)/(x*c*i))/l]},b}function rn(){var e=65*A,r=60*A,n=20,i=200,a=t.geoProjectionMutator(rr),o=a(e,r,n,i);return o.poleline=function(t){return arguments.length?a(e=t*A,r,n,i):e*T},o.parallels=function(t){return arguments.length?a(e,r=t*A,n,i):r*T},o.inflation=function(t){return arguments.length?a(e,r,n=+t,i):n},o.ratio=function(t){return arguments.length?a(e,r,n,i=+t):i},o.scale(163.775)}t2.invert=function(e,t){var r=t/1.70711,n=m(x*r);return[e/(.74482-.34588*n*n),2*i(r)]},t9.invert=function(e,t){if(1e-6>n(t))return[e,0];if(1e-6>n(e))return[0,v*m(2*i(t/y))];var r=(e/=y)*e,a=(t/=y)*t,s=r+a,l=s*s,c=-n(t)*(1+s),u=c-2*a+r,h=-2*c+1+2*a+l,f=a/h+(2*u*u*u/(h*h*h)-9*c*u/(h*h))/27,d=(c-u*u/(3*h))/h,g=2*E(-d/3),x=S(3*f/(d*g))/3;return[y*(s-1+E(1+2*(r-a)+l))/(2*e),p(t)*y*(-g*o(x+y/3)-u/(3*h))]},t7.invert=function(e,t){if(!e)return[0,v*m(2*i(t/y))];var r=n(e/y),o=(1-r*r-(t/=y)*t)/(2*r),s=E(o*o+1);return[p(e)*y*(s-o),p(t)*v*m(2*a(E((1-2*o*r)*(o+s)-r),E(s+o+r)))]},re.invert=function(e,t){if(!t)return[e,0];var r=t/y,n=(y*y*(1-r*r)-e*e)/(2*y*e);return[e?y*(p(e)*E(n*n+1)-n):0,v*m(2*i(r))]},rt.invert=function(e,t){if(!e||!t)return[e,t];t/=y;var r,i=p(e)*e/v,a=(i*i-1+4*t*t)/n(i),o=a*a,s=2*t,l=50;do{var c=s*s,u=(8*s-c*(c+2)-5)/(2*c*(s-1)),h=(3*s-c*s-10)/(2*c*s),f=u*u,d=s*u,m=s+u,g=m*m,x=s+3*u,b=g*(c+f*o-1)+(1-c)*(c*(x*x+4*f)+f*(12*d+4*f)),_=-2*m*(4*d*f+(1-4*c+3*c*c)*(1+h)+f*(-6+14*c-o+(-8+8*c-2*o)*h)+d*(-8+12*c+(-10+10*c-o)*h)),w=E(b);s-=r=(a*(g+f-1)+2*w-i*(4*g+o))/(a*(2*u*h+2*m*(1+h))+_/w-8*m*(a*(-1+f+g)+2*w)*(1+h)/(o+4*g))}while(r>1e-6&&--l>0);return[p(e)*(E(a*a+4)+a)*y/4,v*s]};var ri=4*y+3*E(3),ra=2*E(2*y*E(3)/ri),ro=G(ra*E(3)/y,ra,ri/6);function rs(e,t){return[e*E(1-3*t*t/(y*y)),t]}function rl(e,t){var r=o(t),n=o(e)*r,i=1-n,s=o(e=a(m(e)*r,-m(t))),l=m(e);return[l*(r=E(1-n*n))-s*i,-s*r-l*i]}function rc(e,t){var r=P(e,t);return[(r[0]+e/v)/2,(r[1]+t)/2]}rs.invert=function(e,t){return[e/E(1-3*t*t/(y*y)),t]},rl.invert=function(e,t){var r=-((e*e+t*t)/2),n=E(-r*(2+r)),i=t*r+e*n,o=e*r-t*n,s=E(o*o+i*i);return[a(n*i,s*(1+r)),s?-M(n*o/s):0]},rc.invert=function(e,t){var r=e,i=t,a=25;do{var s,l=o(i),c=m(i),u=m(2*i),h=c*c,f=l*l,d=m(r),p=o(r/2),g=m(r/2),y=g*g,x=1-f*p*p,b=x?S(l*p)*E(s=1/x):s=0,_=.5*(2*b*l*g+r/v)-e,w=.5*(b*c+i)-t,k=.5*s*(f*y+b*l*p*h)+.5/v,T=s*(d*u/4-b*c*g),A=.125*s*(u*g-b*c*f*d),M=.5*s*(h*p+b*y*l)+.5,C=T*A-M*k,L=(w*T-_*M)/C,I=(_*A-w*k)/C;r-=L,i-=I}while((n(L)>1e-6||n(I)>1e-6)&&--a>0);return[r,i]},e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=function(){var e=v,r=t.geoProjectionMutator(I),n=r(e);return n.radius=function(t){return arguments.length?r(e=t*A):e*T},n.scale(179.976).clipAngle(147)},e.geoAiryRaw=I,e.geoAitoff=function(){return t.geoProjection(P).scale(152.63)},e.geoAitoffRaw=P,e.geoArmadillo=function(){var e=20*A,r=e>=0?1:-1,n=g(r*e),i=t.geoProjectionMutator(z),s=i(e),l=s.stream;return s.parallel=function(t){return arguments.length?(n=g((r=(e=t*A)>=0?1:-1)*e),i(e)):e*T},s.stream=function(t){var i=s.rotate(),c=l(t),u=(s.rotate([0,0]),l(t)),h=s.precision();return s.rotate(i),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=-180*r;r*t<180;t+=90*r)u.point(t,90*r);if(e)for(;r*(t-=3*r*h)>=-180;)u.point(t,-(r*a(o(t*A/2),n))*T);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},e.geoArmadilloRaw=z,e.geoAugust=function(){return t.geoProjection(O).scale(66.1603)},e.geoAugustRaw=O,e.geoBaker=function(){return t.geoProjection(j).scale(112.314)},e.geoBakerRaw=j,e.geoBerghaus=function(){var e=5,r=t.geoProjectionMutator(F),n=r(e),i=n.stream,s=-o(.01*A),l=m(.01*A);return n.lobes=function(t){return arguments.length?r(e=+t):e},n.stream=function(t){var r=n.rotate(),c=i(t),u=(n.rotate([0,0]),i(t));return n.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=0,r=360/e,n=2*y/e,i=90-180/e,c=v;t=0;)e.point((t=r[i])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},n.scale(79.4187).parallel(45).clipAngle(179.999)},e.geoHammerRetroazimuthalRaw=eF,e.geoHealpix=function(){var e=4,n=t.geoProjectionMutator(eV),i=n(e),a=i.stream;return i.lobes=function(t){return arguments.length?n(e=+t):e},i.stream=function(n){var o=i.rotate(),s=a(n),l=(i.rotate([0,0]),a(n));return i.rotate(o),s.sphere=function(){var n,i;t.geoStream((n=180/e,i=[].concat(r.range(-180,180+n/2,n).map(eq),r.range(180,-180-n/2,-n).map(eH)),{type:"Polygon",coordinates:[180===n?i.map(eG):i]}),l)},s},i.scale(239.75)},e.geoHealpixRaw=eV,e.geoHill=function(){var e=1,r=t.geoProjectionMutator(eW),n=r(e);return n.ratio=function(t){return arguments.length?r(e=+t):e},n.scale(167.774).center([0,18.67])},e.geoHillRaw=eW,e.geoHomolosine=function(){return t.geoProjection(eX).scale(152.63)},e.geoHomolosineRaw=eX,e.geoHufnagel=function(){var e=1,r=0,n=45*A,i=2,a=t.geoProjectionMutator(eZ),o=a(e,r,n,i);return o.a=function(t){return arguments.length?a(e=+t,r,n,i):e},o.b=function(t){return arguments.length?a(e,r=+t,n,i):r},o.psiMax=function(t){return arguments.length?a(e,r,n=t*A,i):n*T},o.ratio=function(t){return arguments.length?a(e,r,n,i=+t):i},o.scale(180.739)},e.geoHufnagelRaw=eZ,e.geoHyperelliptical=function(){var e=0,r=2.5,n=1.183136,i=t.geoProjectionMutator(e$),a=i(e,r,n);return a.alpha=function(t){return arguments.length?i(e=+t,r,n):e},a.k=function(t){return arguments.length?i(e,r=+t,n):r},a.gamma=function(t){return arguments.length?i(e,r,n=+t):n},a.scale(152.63)},e.geoHyperellipticalRaw=e$,e.geoInterrupt=eJ,e.geoInterruptedBoggs=function(){return eJ(Y,eQ).scale(160.857)},e.geoInterruptedHomolosine=function(){return eJ(eX,e0).scale(152.63)},e.geoInterruptedMollweide=function(){return eJ(W,e1).scale(169.529)},e.geoInterruptedMollweideHemispheres=function(){return eJ(W,e2).scale(169.529).rotate([20,0])},e.geoInterruptedSinuMollweide=function(){return eJ(eY,e3,V).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoInterruptedSinusoidal=function(){return eJ(Z,e5).scale(152.63).rotate([-20,0])},e.geoKavrayskiy7=function(){return t.geoProjection(e4).scale(158.837)},e.geoKavrayskiy7Raw=e4,e.geoLagrange=function(){var e=.5,r=t.geoProjectionMutator(e6),n=r(e);return n.spacing=function(t){return arguments.length?r(e=+t):e},n.scale(124.75)},e.geoLagrangeRaw=e6,e.geoLarrivee=function(){return t.geoProjection(e9).scale(97.2672)},e.geoLarriveeRaw=e9,e.geoLaskowski=function(){return t.geoProjection(e7).scale(139.98)},e.geoLaskowskiRaw=e7,e.geoLittrow=function(){return t.geoProjection(te).scale(144.049).clipAngle(89.999)},e.geoLittrowRaw=te,e.geoLoximuthal=function(){return X(tt).parallel(40).scale(158.837)},e.geoLoximuthalRaw=tt,e.geoMiller=function(){return t.geoProjection(tr).scale(108.318)},e.geoMillerRaw=tr,e.geoModifiedStereographic=tc,e.geoModifiedStereographicRaw=tn,e.geoModifiedStereographicAlaska=function(){return tc(ti,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},e.geoModifiedStereographicGs48=function(){return tc(ta,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},e.geoModifiedStereographicGs50=function(){return tc(to,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},e.geoModifiedStereographicMiller=function(){return tc(ts,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},e.geoModifiedStereographicLee=function(){return tc(tl,[165,10]).scale(250).clipAngle(130).center([-165,-10])},e.geoMollweide=function(){return t.geoProjection(W).scale(169.529)},e.geoMollweideRaw=W,e.geoMtFlatPolarParabolic=function(){return t.geoProjection(tf).scale(164.859)},e.geoMtFlatPolarParabolicRaw=tf,e.geoMtFlatPolarQuartic=function(){return t.geoProjection(td).scale(188.209)},e.geoMtFlatPolarQuarticRaw=td,e.geoMtFlatPolarSinusoidal=function(){return t.geoProjection(tp).scale(166.518)},e.geoMtFlatPolarSinusoidalRaw=tp,e.geoNaturalEarth2=function(){return t.geoProjection(tm).scale(175.295)},e.geoNaturalEarth2Raw=tm,e.geoNellHammer=function(){return t.geoProjection(tg).scale(152.63)},e.geoNellHammerRaw=tg,e.geoInterruptedQuarticAuthalic=function(){return eJ(B(1/0),ty).rotate([20,0]).scale(152.63)},e.geoNicolosi=function(){return t.geoProjection(tv).scale(127.267)},e.geoNicolosiRaw=tv,e.geoPatterson=function(){return t.geoProjection(tx).scale(139.319)},e.geoPattersonRaw=tx,e.geoPolyconic=function(){return t.geoProjection(tb).scale(103.74)},e.geoPolyconicRaw=tb,e.geoPolyhedral=tT,e.geoPolyhedralButterfly=function(e){e=e||function(e){var r=t.geoCentroid({type:"MultiPoint",coordinates:e});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=tS.map(function(t){return{face:t,project:e(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(e,t){var n=r[e];n&&(n.children||(n.children=[])).push(r[t])}),tT(r[0],function(e,t){return r[e<-y/2?t<0?6:4:e<0?2*(t<0):e0?[-r[0],0]:[180-r[0],180])};var r=tS.map(function(t){return{face:t,project:e(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(e,t){var n=r[e];n&&(n.children||(n.children=[])).push(r[t])}),tT(r[0],function(e,t){return r[e<-y/2?t<0?6:4:e<0?2*(t<0):etL(l[0],i)?8+3*s:0>tL(l[1],i)?8+3*s+1:0>tL(l[2],i)?8+3*s+2:s]}).angle(-30).scale(110.625).center([0,45])},e.geoProject=function(e,t){var r,n=t.stream;if(!n)throw Error("invalid projection");switch(e&&e.type){case"Feature":r=tD;break;case"FeatureCollection":r=tO;break;default:r=tR}return r(e,n)},e.geoGringortenQuincuncial=function(){return tV(eO).scale(176.423)},e.geoPeirceQuincuncial=tq,e.geoPierceQuincuncial=tq,e.geoQuantize=function(e,t){if(!(0<=(t*=1)&&t<=20))throw Error("invalid digits");function r(e){var r=e.length,n=2,i=Array(r);for(i[0]=+e[0].toFixed(t),i[1]=+e[1].toFixed(t);n2||a[0]!=t[0]||a[1]!=t[1])&&(n.push(a),t=a)}return 1===n.length&&e.length>1&&n.push(r(e[e.length-1])),n}function i(e){return e.map(n)}function a(e){var t;if(null==e)return e;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(a)};break;case"Point":t={type:"Point",coordinates:r(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:e.coordinates.map(r)};break;case"LineString":t={type:e.type,coordinates:n(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(i)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function o(e){var t={type:"Feature",properties:e.properties,geometry:a(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return o(e);case"FeatureCollection":var s={type:"FeatureCollection",features:e.features.map(o)};return null!=e.bbox&&(s.bbox=e.bbox),s;default:return a(e)}return e},e.geoQuincuncial=tV,e.geoRectangularPolyconic=function(){return X(tH).scale(131.215)},e.geoRectangularPolyconicRaw=tH,e.geoRobinson=function(){return t.geoProjection(tW).scale(152.63)},e.geoRobinsonRaw=tW,e.geoSatellite=function(){var e=2,r=0,n=t.geoProjectionMutator(tY),i=n(e,r);return i.distance=function(t){return arguments.length?n(e=+t,r):e},i.tilt=function(t){return arguments.length?n(e,r=t*A):r*T},i.scale(432.147).clipAngle(S(1/e)*T-1e-6)},e.geoSatelliteRaw=tY,e.geoSinuMollweide=function(){return t.geoProjection(eY).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoSinuMollweideRaw=eY,e.geoSinusoidal=function(){return t.geoProjection(Z).scale(152.63)},e.geoSinusoidalRaw=Z,e.geoStitch=function(e){if(null==e)return e;switch(e.type){case"Feature":return t0(e);case"FeatureCollection":var t={type:"FeatureCollection",features:e.features.map(t0)};return null!=e.bbox&&(t.bbox=e.bbox),t;default:return t1(e)}},e.geoTimes=function(){return t.geoProjection(t2).scale(146.153)},e.geoTimesRaw=t2,e.geoTwoPointAzimuthal=t4,e.geoTwoPointAzimuthalRaw=t5,e.geoTwoPointAzimuthalUsa=function(){return t4([-158,21.5],[-77,39]).clipAngle(60).scale(400)},e.geoTwoPointEquidistant=t8,e.geoTwoPointEquidistantRaw=t6,e.geoTwoPointEquidistantUsa=function(){return t8([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},e.geoVanDerGrinten=function(){return t.geoProjection(t9).scale(79.4183)},e.geoVanDerGrintenRaw=t9,e.geoVanDerGrinten2=function(){return t.geoProjection(t7).scale(79.4183)},e.geoVanDerGrinten2Raw=t7,e.geoVanDerGrinten3=function(){return t.geoProjection(re).scale(79.4183)},e.geoVanDerGrinten3Raw=re,e.geoVanDerGrinten4=function(){return t.geoProjection(rt).scale(127.16)},e.geoVanDerGrinten4Raw=rt,e.geoWagner=rn,e.geoWagner7=function(){return rn().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},e.geoWagnerRaw=rr,e.geoWagner4=function(){return t.geoProjection(ro).scale(176.84)},e.geoWagner4Raw=ro,e.geoWagner6=function(){return t.geoProjection(rs).scale(152.63)},e.geoWagner6Raw=rs,e.geoWiechel=function(){return t.geoProjection(rl).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},e.geoWiechelRaw=rl,e.geoWinkel3=function(){return t.geoProjection(rc).scale(158.837)},e.geoWinkel3Raw=rc,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?r(e,pZ(),pX()):r(e.d3=e.d3||{},e.d3,e.d3)}}),p8=d({"src/plots/geo/zoom.js"(e,t){var r=b(),n=tY(),i=tv(),a=Math.PI/180,o=180/Math.PI,s={cursor:"pointer"},l={cursor:"auto"};function c(e,t){return r.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function u(e,t,r){var a=e.id,o=e.graphDiv,s=o.layout,l=s[a],c=o._fullLayout,u=c[a],h={},f={};function d(e,t){h[a+"."+e]=n.nestedProperty(l,e).get(),i.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=n.nestedProperty(u,e);r.get()!==t&&(r.set(t),n.nestedProperty(l,e).set(t),f[a+"."+e]=t)}r(d),d("projection.scale",t.scale()/e.fitScale),d("fitbounds",!1),o.emit("plotly_relayout",f)}function h(e,t){var n=c(e,t);function i(r){var n=t.invert(e.midPt);r("center.lon",n[0]),r("center.lat",n[1])}return n.on("zoomstart",function(){r.select(this).style(s)}).on("zoom",function(){t.scale(r.event.scale).translate(r.event.translate),e.render(!0);var n=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":n[0],"geo.center.lat":n[1]})}).on("zoomend",function(){r.select(this).style(l),u(e,t,i)}),n}function f(e,t){var n,i,a,o,h,f,d,p,m,g=c(e,t);function y(e){return t.invert(e)}function v(r){var n=t.rotate(),i=t.invert(e.midPt);r("projection.rotation.lon",-n[0]),r("center.lon",i[0]),r("center.lat",i[1])}return g.on("zoomstart",function(){r.select(this).style(s);let{x:e,y:l,width:c,height:u}=this.getBBox();n=r.event.sourceEvent?r.mouse(this):[e+c/2,l+u/2],i=t.rotate(),a=t.translate(),o=i,h=y(n)}).on("zoom",function(){let{x:s,y:l,width:c,height:u}=this.getBBox();if(f=r.event.sourceEvent?r.mouse(this):[s+c/2,l+u/2],function(e){var r=y(e);if(!r)return!0;var n=t(r);return Math.abs(n[0]-e[0])>2||Math.abs(n[1]-e[1])>2}(n)){g.scale(t.scale()),g.translate(t.translate());return}t.scale(r.event.scale),t.translate([a[0],r.event.translate[1]]),h?y(f)&&(p=y(f),d=[o[0]+(p[0]-h[0]),i[1],i[2]],t.rotate(d),o=d):h=y(n=f),m=!0,e.render(!0);var v=t.rotate(),x=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":x[0],"geo.center.lat":x[1],"geo.projection.rotation.lon":-v[0]})}).on("zoomend",function(){r.select(this).style(l),m&&u(e,t,v)}),g}function d(e,t){var n,i={r:t.rotate(),k:t.scale()},h=c(e,t),f=function(e){for(var t=0,n=arguments.length,i=[];++t(G=Math.sqrt(F*F+B*B))?(j=(V>0?90:-90)-H,R=0):(j=Math.asin(V/G)*o-H,R=Math.sqrt(G*G-V*V)),W=180-j-2*H,Y=(Math.atan2(q,U)-Math.atan2(N,R))*o,X=(Math.atan2(q,U)-Math.atan2(N,-R))*o,i.r=m(C[0],C[1],j,Y)<=m(C[0],C[1],W,X)?[j,Y,C[2]]:[W,X,C[2]]);isFinite($[0])&&isFinite($[1])&&isFinite($[2])||($=P),t.rotate($),P=$}}else n=p(t,L=c);u=f.of(this,arguments),u({type:"zoom"})}),A=f.of(this,arguments),d++||A({type:"zoomstart"})}).on("zoomend",function(){var n;r.select(this).style(l),g.call(h,"zoom",null),n=f.of(this,arguments),--d||n({type:"zoomend"}),u(e,t,x)}).on("zoom.redraw",function(){e.render(!0);var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})}),r.rebind(h,f,"on")}function p(e,t){var r,n,i,o,s=e.invert(t);return s&&isFinite(s[0])&&isFinite(s[1])&&(n=(r=s)[0]*a,[(o=Math.cos(i=r[1]*a))*Math.cos(n),o*Math.sin(n),Math.sin(i)])}function m(e,t,r,n){var i=g(r-e),a=g(n-t);return Math.sqrt(i*i+a*a)}function g(e){return(e%360+540)%360-180}function y(e,t,r){var n=r*a,i=e.slice(),o=+(0===t),s=2===t?1:2,l=Math.cos(n),c=Math.sin(n);return i[o]=e[o]*l-e[s]*c,i[s]=e[s]*l+e[o]*c,i}function v(e,t){for(var r=0,n=0,i=e.length;n0&&o._module.calcGeoJSON(a,t)}if(!r){if(this.updateProjection(e,t))return;this.viewInitial&&this.scope===n.scope||this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),d.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},C.updateProjection=function(e,t){var r,s=this.graphDiv,c=t[this.id],u=t._size,h=c.domain,f=c.projection,d=c.lonaxis,p=c.lataxis,g=d._ax,y=p._ax,v=this.projection=function(e){var t=e.projection,r=t.type,s=w.projNames[r];s="geo"+l.titleCase(s);for(var c=n[s]||o[s],u=c(),h=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?w.lonaxisSpan[r]/2:null,f=["center","rotate","parallels","clipExtent"],d=function(e){return e?u:[]},p=0;ph*Math.PI/180},u.getPath=function(){return i().projection(u)},u.getBounds=function(e){return u.getPath().bounds(e)},u.precision(w.precision),e._isSatellite&&u.tilt(t.tilt).distance(t.distance),h&&u.clipAngle(h-w.clipPad),u}(c),x=[[u.l+u.w*h.x[0],u.t+u.h*(1-h.y[1])],[u.l+u.w*h.x[1],u.t+u.h*(1-h.y[0])]],b=c.center||{},_=f.rotation||{},k=d.range||[],A=p.range||[];if(c.fitbounds){if(g._length=x[1][0]-x[0][0],y._length=x[1][1]-x[0][1],g.range=m(s,g),y.range=m(s,y),!this.hasChoropleth&&"locations"===c.fitbounds){for(var M=[],S=!1,E=0;E0?(g.range[1]-g.range[0]-D)/2*(O[1]-O[0])/D:0;g.range=[O[0]-R,O[1]+R]}}}var j=(g.range[0]+g.range[1])/2,F=(y.range[0]+y.range[1])/2;if(c._isScoped)b={lon:j,lat:F};else if(c._isClipped){b={lon:j,lat:F},_={lon:j,lat:F,roll:_.roll};var B=f.type,N=w.lonaxisSpan[B]/2||180,U=w.lataxisSpan[B]/2||90;k=[j-N,j+N],A=[F-U,F+U]}else b={lon:j,lat:F},_={lon:j,lat:_.lat,roll:_.roll}}v.center([b.lon-_.lon,b.lat-_.lat]).rotate([-_.lon,-_.lat,_.roll]).parallels(f.parallels);var V=L(k,A);v.fitExtent(x,V);var q=this.bounds=v.getBounds(V),H=this.fitScale=v.scale(),G=v.translate();if(v.scaleExtent=()=>{var e;let{minscale:t}=f,r=null!=(e=f.maxscale)?e:1/0;return[H*Math.min(t,r),H*Math.max(t,r)]},c.fitbounds){var W=v.getBounds(L(g.range,y.range)),Y=Math.min((q[1][0]-q[0][0])/(W[1][0]-W[0][0]),(q[1][1]-q[0][1])/(W[1][1]-W[0][1]));isFinite(Y)?v.scale(Y*H):l.warn("Something went wrong during"+this.id+"fitbounds computations.")}else v.scale(f.scale*H);var X=this.midPt=[(q[0][0]+q[1][0])/2,(q[0][1]+q[1][1])/2];if(v.translate([G[0]+(X[0]-G[0]),G[1]+(X[1]-G[1])]).clipExtent(q),c._isAlbersUsa){var Z=v([b.lon,b.lat]);if(Z){var $=v.translate();v.translate([$[0]-(Z[0]-$[0]),$[1]-(Z[1]-$[1])])}}},C.updateBaseLayers=function(e,t){var n=this,i=n.topojson,a=n.layers,o=n.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return!!w.lineLayers[e]}function c(e){return!!w.fillLayers[e]}var f=(this.hasChoropleth?w.layersForChoropleth:w.layers).filter(function(e){return l(e)||c(e)?t["show"+e]:!s(e)||t[e].showgrid}),d=n.framework.selectAll(".layer").data(f,String);d.exit().each(function(e){delete a[e],delete o[e],r.select(this).remove()}),d.enter().append("g").attr("class",function(e){return"layer "+e}).each(function(e){var t=a[e]=r.select(this);"bg"===e?n.bgRect=t.append("rect").style("pointer-events","all"):s(e)?o[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?o[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):c(e)&&(o[e]=t.append("path").style("stroke","none"))}),d.order(),d.each(function(r){var n=o[r],a=w.layerNameToAdjective[r];"frame"===r?n.datum(w.sphereSVG):l(r)||c(r)?n.datum(S(i,i.objects[r])):s(r)&&n.datum(function(e,t,r){var n,i,a,o=t[e],s=w.scopeDefaults[t.scope];"lonaxis"===e?(n=s.lonaxisRange,i=s.lataxisRange,a=function(e,t){return[e,t]}):"lataxis"===e&&(n=s.lataxisRange,i=s.lonaxisRange,a=function(e,t){return[t,e]});var l={type:"linear",range:[n[0],n[1]-1e-6],tick0:o.tick0,dtick:o.dtick};p.setConvert(l,r);var c=p.calcTicks(l);t.isScoped||"lonaxis"!==e||c.pop();for(var u=c.length,h=Array(u),f=0;fi)&&e.event(a)}a.on("dblclick.zoom",function(){var e=n.viewInitial,t={};for(var r in e)t[n.id+"."+r]=e[r];s.call("_guiRelayout",i,t),i.emit("plotly_doubleclick",null)}),i._context._scrollZoom.geo||a.on("wheel.zoom",null)}else("select"===o||"lasso"===o)&&(a.on(".zoom",null),u.prepFn=function(e,t,r){y(e,t,r,u,o)},g.init(u));a.on("mousemove",function(){var e=n.projection.invert(l.getPositionFromD3Event());if(!e)return g.unhover(i,r.event);n.xaxis.p2c=function(){return e[0]},n.yaxis.p2c=function(){return e[1]},f.hover(i,r.event,n.id)}),a.on("mouseout",function(){i._dragging||g.unhover(i,r.event)}),a.on("click",function(){"select"!==o&&"lasso"!==o&&(c.indexOf("select")>-1&&x(r.event,i,[n.xaxis],[n.yaxis],n.id,u),c.indexOf("event")>-1&&f.click(i,r.event))})}function h(e){return n.projection.invert([e[0]+n.xaxis._offset,e[1]+n.yaxis._offset])}},C.makeFramework=function(){var e=this,t=e.graphDiv,n=t._fullLayout,i="clip"+n._uid+e.id;e.clipDef=n._clips.append("clipPath").attr("id",i),e.clipRect=e.clipDef.append("rect"),e.framework=r.select(e.container).append("g").attr("class","geo "+e.id).call(h.setClipUrl,i,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(e.mockAxis,n)},C.saveViewInitial=function(e){var t,r=e.center||{},n=e.projection,i=n.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":n.scale},t=e._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?{"projection.rotation.lon":i.lon,"projection.rotation.lat":i.lat,"center.lon":r.lon,"center.lat":r.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":i.lon},l.extendFlat(this.viewInitial,t)},C.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},C._render=function(){var e,t=this.projection,r=t.getPath();function n(e){var r=t(e.lonlat);return r?c(r[0],r[1]):null}function i(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",function(e){return r(e.geojson)});for(e in this.dataPoints)this.dataPoints[e].attr("display",i).attr("transform",n)}}}),p7=d({"src/plots/geo/layout_attributes.js"(e,t){var r=eE(),n=aC().attributes,i=tc().dash,a=pB(),o=tl().overrideAll,s=(tA(),y(tw)).default,l={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:r.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:i};(t.exports=o({domain:n({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:s(a.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:s(a.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:r.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:a.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:a.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:a.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:a.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:r.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:r.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:r.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:r.background},lonaxis:l,lataxis:l},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),me=d({"src/plots/geo/layout_defaults.js"(e,t){var r=tY(),n=sS(),i=t8().getSubplotData,{unwrapLonRange:a}=p0(),o=pB(),s=p7(),l=o.axesNames;function c(e,t,n,s){var c,u,h=i(s.fullData,"geo",s.id).map(function(e){return e.index}),f=n("resolution"),d=n("scope"),p=o.scopeDefaults[d],m=n("projection.type",p.projType),g=t._isAlbersUsa="albers usa"===m;g&&(d=t.scope="usa");var y=t._isScoped="world"!==d,v=t._isSatellite="satellite"===m,x=t._isConic=-1!==m.indexOf("conic")||"albers"===m,b=t._isClipped=!!o.lonaxisSpan[m];if(!1===e.visible){var _=r.extendDeep({},t._template);_.showcoastlines=!1,_.showcountries=!1,_.showframe=!1,_.showlakes=!1,_.showland=!1,_.showocean=!1,_.showrivers=!1,_.showsubunits=!1,_.lonaxis&&(_.lonaxis.showgrid=!1),_.lataxis&&(_.lataxis.showgrid=!1),t._template=_}for(var w,k=n("visible"),T=0;Tnull!=e[t])||o.fitboundsIncompatible.has(m)?t.fitbounds=!1:l.forEach(({dst:e,key:t})=>e&&(e[t]=null))}}t.exports=function(e,t,r){n(e,t,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}}}),mt=d({"src/plots/geo/index.js"(e,t){var r=t8().getSubplotCalcData,n=tY().counterRegex,i=p9(),a=n("geo"),o={};o.geo={valType:"subplotid",dflt:"geo",editType:"calc"},t.exports={attr:"geo",name:"geo",idRoot:"geo",idRegex:a,attrRegex:a,attributes:o,layoutAttributes:p7(),supplyLayoutDefaults:me(),plot:function(e){for(var t=e._fullLayout,n=e.calcdata,a=t._subplots.geo,o=0;o")}}(e,f,s),[e]}}}),mu=d({"src/traces/choropleth/event_data.js"(e,t){t.exports=function(e,t,r,n,i){e.location=t.location,e.z=t.z;var a=n[i];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e.ct=a.ct,e}}}),mh=d({"src/traces/choropleth/select.js"(e,t){t.exports=function(e,t){var r,n,i,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[];if(!1===t)for(r=0;r=Math.min(P,z)&&d<=Math.max(P,z)?0:1/0}if(A=Math.min(O,D)&&p<=Math.max(O,D)?0:1/0}E=Math.sqrt(A*A+M*M),_=i[T]}}}else for(T=i.length-1;T>-1;T--)w=h[b=i[T]],k=f[b],(S=Math.sqrt((A=c.c2p(w)-d)*A+(M=u.c2p(k)-p)*M))100},e.isDotSymbol=function(e){return"string"==typeof e?t.DOT_RE.test(e):e>200}}}),mv=d({"src/traces/scattergl/defaults.js"(e,t){var r=tY(),n=tv(),i=my(),a=mg(),o=nq(),s=rk(),l=ir(),c=ii(),u=io(),h=is(),f=iu(),d=ic();t.exports=function(e,t,p,m){function g(n,i){return r.coerce(e,t,a,n,i)}var y=!!e.marker&&i.isOpenSymbol(e.marker.symbol),v=s.isBubble(e),x=l(e,t,m,g);if(!x){t.visible=!1;return}c(e,t,m,g),g("xhoverformat"),g("yhoverformat");var b=x>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,i=o-1):n=o+1}return a}function n(e,t,r,n,i){for(var a=i+1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,i=o-1):n=o+1}return a}function i(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,n=o+1):i=o-1}return a}function a(e,t,r,n,i){for(var a=n-1;n<=i;){var o=n+i>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,n=o+1):i=o-1}return a}function o(e,t,r,n,i){for(;n<=i;){var a=n+i>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?n=a+1:i=a-1}return -1}function s(e,t,r,n,i,a){return"function"==typeof r?a(e,t,r,void 0===n?0:0|n,void 0===i?e.length-1:0|i):a(e,t,void 0,void 0===r?0:0|r,void 0===n?e.length-1:0|n)}t.exports={ge:function(e,t,n,i,a){return s(e,t,n,i,a,r)},gt:function(e,t,r,i,a){return s(e,t,r,i,a,n)},lt:function(e,t,r,n,a){return s(e,t,r,n,a,i)},le:function(e,t,r,n,i){return s(e,t,r,n,i,a)},eq:function(e,t,r,n,i){return s(e,t,r,n,i,o)}}}}),m_=d({"node_modules/pick-by-alias/index.js"(e,t){t.exports=function(e,t,r){var i,a,o={};if("string"==typeof t&&(t=n(t)),Array.isArray(t)){var s={};for(a=0;a1&&(e=arguments),"string"==typeof e?e=e.split(/\s/).map(parseFloat):"number"==typeof e&&(e=[e]),e.length&&"number"==typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=r(e,{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"})).left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}}}),mk=d({"node_modules/array-bounds/index.js"(e,t){t.exports=function(e,t){if(!e||null==e.length)throw Error("Argument should be an array");t=null==t?1:Math.floor(t);for(var r=Array(2*t),n=0;ni&&(i=e[o]),e[o]>>1,g;t.dtype||(t.dtype="array"),"string"==typeof t.dtype?g=new(u(t.dtype))(m):t.dtype&&Array.isArray(g=t.dtype)&&(g.length=m);for(let e=0;en||s>0x40000000){for(let e=0;ec||_>h||k=A||o===s)return;let f=y[a];void 0===s&&(s=f.length);for(let t=o;t=l&&n<=p&&i>=u&&i<=m&&M.push(r)}let d=v[a],x=d[4*o+0],b=d[4*o+1],w=d[4*o+2],S=d[4*o+3],E=function(e,t){let r=null,n=0;for(;null===r;)if(r=e[4*t+n],++n>e.length)return null;return r}(d,o+1),C=.5*i,L=a+1;t(r,n,C,L,x,b||w||S||E),t(r,n+C,C,L,b,w||S||E),t(r+C,n,C,L,w,S||E),t(r+C,n+C,C,L,S,E)}(0,0,1,0,0,1),M},g;function w(e,t,r){let n=1,i=.5,a=.5,o=.5;for(let s=0;s1&&(i=1),i<-1&&(i=-1),(e*n-t*r<0?-1:1)*Math.acos(i)},s=function(e,t,r,i,a,s,l,c,u,h,f,d){var p=Math.pow(a,2),m=Math.pow(s,2),g=Math.pow(f,2),y=Math.pow(d,2),v=p*m-p*y-m*g;v<0&&(v=0),v/=p*y+m*g;var x=(v=Math.sqrt(v)*(l===c?-1:1))*a/s*d,b=-(v*s)/a*f,_=(f-x)/a,w=(d-b)/s,k=o(1,0,_,w),T=o(_,w,(-f-x)/a,(-d-b)/s);return 0===c&&T>0&&(T-=n),1===c&&T<0&&(T+=n),[h*x-u*b+(e+r)/2,u*x+h*b+(t+i)/2,k,T]};e.default=function(e){var t=e.px,o=e.py,l=e.cx,c=e.cy,u=e.rx,h=e.ry,f=e.xAxisRotation,d=void 0===f?0:f,p=e.largeArcFlag,m=e.sweepFlag,g=[];if(0===u||0===h)return[];var y=Math.sin(d*n/360),v=Math.cos(d*n/360),x=v*(t-l)/2+y*(o-c)/2,b=-y*(t-l)/2+v*(o-c)/2;if(0===x&&0===b)return[];var _=Math.pow(x,2)/Math.pow(u=Math.abs(u),2)+Math.pow(b,2)/Math.pow(h=Math.abs(h),2);_>1&&(u*=Math.sqrt(_),h*=Math.sqrt(_));var w=r(s(t,o,l,c,u,h,void 0===p?0:p,void 0===m?0:m,y,v,x,b),4),k=w[0],T=w[1],A=w[2],M=w[3],S=Math.abs(M)/(n/4);1e-7>Math.abs(1-S)&&(S=1);var E=Math.max(Math.ceil(S),1);M/=E;for(var C=0;C4?(o=g[g.length-4],s=g[g.length-3]):(o=f,s=d),a.push(g)}return a};var r=mI();function n(e,t,r,n){return["C",e,t,r,n,r,n]}function i(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}}}),mz=d({"node_modules/is-svg-path/index.js"(e,t){t.exports=function(e){return"string"==typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}}}),mO=d({"node_modules/svg-path-bounds/index.js"(e,t){var r=rM(),n=mL(),i=mP(),a=mz(),o=cY();t.exports=function(e){if(Array.isArray(e)&&1===e.length&&"string"==typeof e[0]&&(e=e[0]),"string"==typeof e&&(o(a(e),"String is not an SVG path."),e=r(e)),o(Array.isArray(e),"Argument should be a string or an array of path segments."),!(e=i(e=n(e))).length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],s=0,l=e.length;st[2]&&(t[2]=c[u+0]),c[u+1]>t[3]&&(t[3]=c[u+1]);return t}}}),mD=d({"node_modules/normalize-svg-path/index.js"(e,t){var r=Math.PI,n=r/180*120;function i(e,t,r,n){return["C",e,t,r,n,r,n]}function a(e,t,r,n,i,a){return["C",e/3+2/3*r,t/3+2/3*n,i/3+2/3*r,a/3+2/3*n,i,a]}function o(e,t,r){return{x:e*Math.cos(r)-t*Math.sin(r),y:e*Math.sin(r)+t*Math.cos(r)}}t.exports=function(e){for(var t,s=[],l=0,c=0,u=0,h=0,f=null,d=null,p=0,m=0,g=0,y=e.length;g1&&(a*=y=Math.sqrt(y),s*=y);var v=a*a,x=s*s,b=(c==u?-1:1)*Math.sqrt(Math.abs((v*x-v*g*g-x*m*m)/(v*g*g+x*m*m)));b==1/0&&(b=1);var _=b*a*g/s+(t+h)/2,w=-(b*s)*m/a+(i+f)/2,k=Math.asin(((i-w)/s).toFixed(9)),T=Math.asin(((f-w)/s).toFixed(9));k=t<_?r-k:k,T=h<_?r-T:T,k<0&&(k=2*r+k),T<0&&(T=2*r+T),u&&k>T&&(k-=2*r),!u&&T>k&&(T-=2*r)}if(Math.abs(T-k)>n)var A=T,M=h,S=f,E=e(h=_+a*Math.cos(T=k+n*(u&&T>k?1:-1)),f=w+s*Math.sin(T),a,s,l,0,u,M,S,[T,A,_,w]);var C=Math.tan((T-k)/4),L=4/3*a*C,I=4/3*s*C,P=[2*t-(t+L*Math.sin(k)),2*i-(i-I*Math.cos(k)),h+L*Math.sin(T),f-I*Math.cos(T),h,f];if(d)return P;E&&(P=P.concat(E));for(var z=0;z7&&(s.push(v.splice(0,7)),v.unshift("C"));break;case"S":var b=p,_=m;("C"==t||"S"==t)&&(b+=b-l,_+=_-c),v=["C",b,_,v[1],v[2],v[3],v[4]];break;case"T":"Q"==t||"T"==t?(f=2*p-f,d=2*m-d):(f=p,d=m),v=a(p,m,f,d,v[1],v[2]);break;case"Q":f=v[1],d=v[2],v=a(p,m,v[1],v[2],v[3],v[4]);break;case"L":v=i(p,m,v[1],v[2]);break;case"H":v=i(p,m,v[1],m);break;case"V":v=i(p,m,p,v[1]);break;case"Z":v=i(p,m,u,h)}t=x,p=v[v.length-2],m=v[v.length-1],v.length>4?(l=v[v.length-4],c=v[v.length-3]):(l=p,c=m),s.push(v)}return s}}}),mR=d({"node_modules/draw-svg-path/index.js"(e,t){var r=mL(),n=mD(),i={M:"moveTo",C:"bezierCurveTo"};t.exports=function(e,t){e.beginPath(),n(r(t)).forEach(function(t){var r=t[0],n=t.slice(1);e[i[r]].apply(e,n)}),e.closePath()}}}),mj=d({"node_modules/bitmap-sdf/index.js"(e,t){var r=dR();function n(e,t,r,n,a,o,s){for(var l=0;l0?c.strokeStyle="white":c.strokeStyle="black",c.lineWidth=Math.abs(d)),c.translate(.5*u,.5*h),c.scale(g,g),function(){if(null!=r)return r;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return r=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var n=e.getImageData(0,0,1,1);return r=n&&n.data&&255===n.data[3]}()){var y=new Path2D(e);c.fill(y),d&&c.stroke(y)}else a(c,i(e)),c.fill(),d&&c.stroke();return c.setTransform(1,0,0,1,0,0),s(c,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*f})}}}),mB=d({"src/traces/scattergl/convert.js"(e,t){var r=A(),n=mF(),i=dF(),a=tv(),o=tY(),s=o.isArrayOrTypedArray,l=rE(),c=t5(),u=dN().formatColor,h=rk(),f=rT(),d=my(),p=mm(),m=eI().DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},y=rA().appendArrayPointValue;function v(e,t){var n,i=e._fullLayout,a=t._length,l=t.textfont,c=t.textposition,u=s(c)?c:[c],h=l.color,f=l.size,d=l.family,p=l.weight,m=l.style,g=l.variant,v={},b=e._context.plotGlPixelRatio,_=t.texttemplate;if(_){v.text=[];var w=i._d3locale,k=Array.isArray(_),T=k?Math.min(_.length,a):a,A=k?function(e){return _[e]}:function(){return _};for(n=0;n500?"bold":"normal":e}function b(e,t){var r,n,a=t._length,o=t.marker,l={},c=s(o.symbol),h=s(o.angle),p=s(o.color),m=s(o.line.color),g=s(o.opacity),y=s(o.size),v=s(o.line.width);if(c||(n=d.isOpenSymbol(o.symbol)),c||p||m||g||h){l.symbols=Array(a),l.angles=Array(a),l.colors=Array(a),l.borderColors=Array(a);var x=o.symbol,b=o.angle,_=u(o,o.opacity,a),w=u(o.line,o.opacity,a);if(!s(w[0])){var k=w;for(w=Array(a),r=0;rp.TOO_MANY_POINTS||h.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var f=n[0],d=n[1];for(i=0;i1?c[i]:c[0]:c,m=s(u)?u.length>1?u[i]:u[0]:u,y=g[p],v=g[m],x=f?f/.8+1:0,b=-v*x-.5*v;o.offset[i]=[y*x/d,b/d]}}return o}}}}),mN=d({"src/traces/scattergl/scene_update.js"(e,t){var r=tY();t.exports=function(e,t){var n=t._scene,i={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||((n=t._scene={}).init=function(){r.extendFlat(n,a,i)},n.init(),n.update=function(e){var t=r.repeat(e,n.count);if(n.fill2d&&n.fill2d.update(t),n.scatter2d&&n.scatter2d.update(t),n.line2d&&n.line2d.update(t),n.error2d&&n.error2d.update(t.concat(t)),n.select2d&&n.select2d.update(t),n.glText)for(var i=0;i=m,k=2*_,T={},A=v.makeCalcdata(t,"x"),M=x.makeCalcdata(t,"y"),S=o(t,v,"x",A),E=o(t,x,"y",M),C=S.vals,L=E.vals;t._x=C,t._y=L,t.xperiodalignment&&(t._origX=A,t._xStarts=S.starts,t._xEnds=S.ends),t.yperiodalignment&&(t._origY=M,t._yStarts=E.starts,t._yEnds=E.ends);var I=Array(k),P=Array(_);for(s=0;s<_;s++)I[2*s]=C[s]===p?NaN:C[s],I[2*s+1]=L[s]===p?NaN:L[s],P[s]=s;if("log"===v.type)for(s=0;s1&&n.extendFlat(o.line,f.linePositions(e,t,r)),o.errorX||o.errorY){var s=f.errorBarPositions(e,t,r,i,a);o.errorX&&n.extendFlat(o.errorX,s.x),o.errorY&&n.extendFlat(o.errorY,s.y)}return o.text&&(n.extendFlat(o.text,{positions:r},f.textPosition(e,t,o.text,o.marker)),n.extendFlat(o.textSel,{positions:r},f.textPosition(e,t,o.text,o.markerSel)),n.extendFlat(o.textUnsel,{positions:r},f.textPosition(e,t,o.text,o.markerUnsel))),o}(e,t,I,C,L),O=d(e,b);return u(y,t),w?z.marker&&(a=z.marker.sizeAvg||Math.max(z.marker.size,3)):a=l(t,_),c(e,t,v,x,C,L,a),z.errorX&&g(t,v,z.errorX),z.errorY&&g(t,x,z.errorY),z.fill&&!O.fill2d&&(O.fill2d=!0),z.marker&&!O.scatter2d&&(O.scatter2d=!0),z.line&&!O.line2d&&(O.line2d=!0),(z.errorX||z.errorY)&&!O.error2d&&(O.error2d=!0),z.text&&!O.glText&&(O.glText=!0),z.marker&&(z.marker.snap=_),O.lineOptions.push(z.line),O.errorXOptions.push(z.errorX),O.errorYOptions.push(z.errorY),O.fillOptions.push(z.fill),O.markerOptions.push(z.marker),O.markerSelectedOptions.push(z.markerSel),O.markerUnselectedOptions.push(z.markerUnsel),O.textOptions.push(z.text),O.textSelectedOptions.push(z.textSel),O.textUnselectedOptions.push(z.textUnsel),O.selectBatch.push([]),O.unselectBatch.push([]),T._scene=O,T.index=O.count,T.x=C,T.y=L,T.positions=I,O.count++,[{x:!1,y:!1,t:T,trace:t}]}}}),mV=d({"src/traces/scattergl/edit_style.js"(e,t){var r=tY(),n=eC(),i=eI().DESELECTDIM;t.exports={styleTextSelection:function(e){var t,a,o=e[0],s=o.trace,l=o.t,c=l._scene,u=l.index,h=c.selectBatch[u],f=c.unselectBatch[u],d=c.textOptions[u],p=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=r.extendFlat({},d);if(h.length||f.length){var y=p.color,v=m.color,x=d.color,b=r.isArrayOrTypedArray(x);for(g.color=Array(s._length),t=0;t>>24,n=(0xff0000&e)>>>16,i=(65280&e)>>>8,a=255&e;return!1===t?[r,n,i,a]:[r/255,n/255,i/255,a/255]}}}),mW=d({"node_modules/object-assign/index.js"(e,t){var r=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;t.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==n.join(""))return!1;var i={};return"abcdefghijklmnopqrst".split("").forEach(function(e){i[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},i)).join("")}catch{return!1}}()?function(e,t){for(var a,o,s=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;ltypeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))}}),m$=d({"node_modules/to-float32/index.js"(e,t){t.exports=n,t.exports.float32=t.exports.float=n,t.exports.fract32=t.exports.fract=function(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=n(e));for(var r=0,i=t.length;re.length)&&(t=e.length);for(var r=0,n=Array(t);r 1.0 + delta) { - discard; - } - - alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); - - float borderRadius = fragBorderRadius; - float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); - vec4 color = mix(fragColor, fragBorderColor, ratio); - color.a *= alpha * opacity; - gl_FragColor = color; -} -`]),u.vert=c([`precision highp float; -#define GLSLIFY 1 - -attribute float x, y, xFract, yFract; -attribute float size, borderSize; -attribute vec4 colorId, borderColorId; -attribute float isActive; - -// \`invariant\` effectively turns off optimizations for the position. -// We need this because -fast-math on M1 Macs is re-ordering -// floating point operations in a way that causes floating point -// precision limits to put points in the wrong locations. -invariant gl_Position; - -uniform bool constPointSize; -uniform float pixelRatio; -uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; -uniform sampler2D paletteTexture; - -const float maxSize = 100.; - -varying vec4 fragColor, fragBorderColor; -varying float fragBorderRadius, fragWidth; - -float pointSizeScale = (constPointSize) ? 2. : pixelRatio; - -bool isDirect = (paletteSize.x < 1.); - -vec4 getColor(vec4 id) { - return isDirect ? id / 255. : texture2D(paletteTexture, - vec2( - (id.x + .5) / paletteSize.x, - (id.y + .5) / paletteSize.y - ) - ); -} - -void main() { - // ignore inactive points - if (isActive == 0.) return; - - vec2 position = vec2(x, y); - vec2 positionFract = vec2(xFract, yFract); - - vec4 color = getColor(colorId); - vec4 borderColor = getColor(borderColorId); - - float size = size * maxSize / 255.; - float borderSize = borderSize * maxSize / 255.; - - gl_PointSize = (size + borderSize) * pointSizeScale; - - vec2 pos = (position + translate) * scale - + (positionFract + translateFract) * scale - + (position + translate) * scaleFract - + (positionFract + translateFract) * scaleFract; - - gl_Position = vec4(pos * 2. - 1., 0., 1.); - - fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); - fragColor = color; - fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; - fragWidth = 1. / gl_PointSize; -} -`]),d&&(u.frag=u.frag.replace("smoothstep","smoothStep"),s.frag=s.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(u)}g.defaults={color:"black",borderColor:"transparent",borderSize:0,size:12,opacity:1,marker:void 0,viewport:null,range:null,pixelSize:null,count:0,offset:0,bounds:null,positions:[],snap:1e4},g.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},g.prototype.draw=function(){for(var e=this,t=arguments.length,r=Array(t),n=0;ntypeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(o)||r(o)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}());s.length&&this.drawMarker(s)}},g.prototype.getMarkerDrawOptions=function(e,t,n){var i=t.range,a=t.tree,o=t.viewport,s=t.activation,c=t.selectionBuffer,u=t.count;if(this.regl,!a)return n?[l({},t,{markerTexture:this.markerTextures[e],activation:s[e],count:n.length,elements:n,offset:0})]:[l({},t,{markerTexture:this.markerTextures[e],activation:s[e],offset:0})];var h=[],f=a.range(i,{lod:!0,px:[(i[2]-i[0])/o.width,(i[3]-i[1])/o.height]});if(n){for(var d=s[e],p=d.data,m=new Uint8Array(u),g=0;gtypeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,n,i,a,o=[],s=!0,l=!1;try{i=(t=t.call(e)).next,!1;for(;!(s=(r=i.call(t)).done)&&(o.push(r.value),2!==o.length);s=!0);}catch(e){l=!0,n=e}finally{try{if(!s&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(l)throw n}}return o}}(x)||r(x,2)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}(),_=b[0],w=b[1];h.push(l({},t,{markerTexture:this.markerTextures[e],activation:n?c:s[e],offset:_,count:w-_}))}return h},g.prototype.update=function(){for(var e=this,t=arguments.length,r=Array(t),n=0;nn)?t.tree=s(e,{bounds:h}):n&&n.length&&(t.tree=n),t.tree){var d={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(d):t.elements=c.elements(d)}var m=p.float32(e);return i({data:m,usage:"dynamic"}),o({data:p.fract32(e,m),usage:"dynamic"}),l({data:new Uint8Array(u),type:"uint8",usage:"stream"}),e}},{marker:function(t,r,n){var i=r.activation;if(i.forEach(function(e){return e&&e.destroy&&e.destroy()}),i.length=0,t&&"number"!=typeof t[0]){for(var a=[],o=0,s=Math.min(t.length,r.count);o=0)return a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(var o=0,s=e.length;o4*n&&(this.tooManyColors=!0),this.updatePalette(r),1===a.length?a[0]:a},g.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(.25*e.length/t);if(n>1){e=e.slice();for(var i=.25*e.length%t;i=a.next.y&&a.next.y!==a.y){var h=a.x+(c-a.y)*(a.next.x-a.x)/(a.next.y-a.y);if(h<=o&&h>u&&(u=h,i=a.x=a.x&&a.x>=m&&o!==a.x&&s(ci.x||a.x===i.x&&(r=i,n=a,0>l(r.prev,r,n.prev)&&0>l(n.next,r,r.next))))&&(i=a,y=f)),a=a.next}while(a!==p);return i}(e,t);if(!r)return t;var n=p(r,e);return i(n,n.next),i(r,r.next)}(g[c],r);return r}(e,t,k,r)),e.length>80*r){h=m=e[0],f=y=e[1];for(var A=r;Am&&(m=v),x>y&&(y=x);b=0!==(b=Math.max(m-h,y-f))?32767/b:0}return function e(t,r,n,a,h,f,m){if(t){!m&&f&&function(e,t,r,n){var i=e;do 0===i.z&&(i.z=o(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,r,n,i,a,o,s,l,c=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||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:e=i,i.prevZ=a,a=i;r=n}a.nextZ=null,c*=2}while(o>1)}(i)}(t,a,h,f);for(var y,v,x=t;t.prev!==t.next;){if(y=t.prev,v=t.next,f?function(e,t,r,n){var i=e.prev,a=e.next;if(l(i,e,a)>=0)return!1;for(var c=i.x,u=e.x,h=a.x,f=i.y,d=e.y,p=a.y,m=cu?c>h?c:h:u>h?u:h,v=f>d?f>p?f:p:d>p?d:p,x=o(m,g,t,r,n),b=o(y,v,t,r,n),_=e.prevZ,w=e.nextZ;_&&_.z>=x&&w&&w.z<=b;){if(_.x>=m&&_.x<=y&&_.y>=g&&_.y<=v&&_!==i&&_!==a&&s(c,f,u,d,h,p,_.x,_.y)&&l(_.prev,_,_.next)>=0||(_=_.prevZ,w.x>=m&&w.x<=y&&w.y>=g&&w.y<=v&&w!==i&&w!==a&&s(c,f,u,d,h,p,w.x,w.y)&&l(w.prev,w,w.next)>=0))return!1;w=w.nextZ}for(;_&&_.z>=x;){if(_.x>=m&&_.x<=y&&_.y>=g&&_.y<=v&&_!==i&&_!==a&&s(c,f,u,d,h,p,_.x,_.y)&&l(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;w&&w.z<=b;){if(w.x>=m&&w.x<=y&&w.y>=g&&w.y<=v&&w!==i&&w!==a&&s(c,f,u,d,h,p,w.x,w.y)&&l(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}(t,a,h,f):function(e){var t=e.prev,r=e.next;if(l(t,e,r)>=0)return!1;for(var n=t.x,i=e.x,a=r.x,o=t.y,c=e.y,u=r.y,h=ni?n>a?n:a:i>a?i:a,p=o>c?o>u?o:u:c>u?c:u,m=r.next;m!==t;){if(m.x>=h&&m.x<=d&&m.y>=f&&m.y<=p&&s(n,o,i,c,a,u,m.x,m.y)&&l(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}(t)){r.push(y.i/n|0),r.push(t.i/n|0),r.push(v.i/n|0),g(t),t=v.next,x=v.next;continue}if((t=v)===x){m?1===m?e(t=function(e,t,r){var n=e;do{var a=n.prev,o=n.next.next;!c(a,o)&&u(a,n,n.next,o)&&d(a,o)&&d(o,a)&&(t.push(a.i/r|0),t.push(n.i/r|0),t.push(o.i/r|0),g(n),g(n.next),n=e=o),n=n.next}while(n!==e);return i(n)}(i(t),r,n),r,n,a,h,f,2):2===m&&function(t,r,n,a,o,s){var h=t;do{for(var f,m,g=h.next.next;g!==h.prev;){if(h.i!==g.i&&(f=h,m=g,f.next.i!==m.i&&f.prev.i!==m.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&u(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(f,m)&&(d(f,m)&&d(m,f)&&function(e,t){var r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.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!==e);return n}(f,m)&&(l(f.prev,f,m.prev)||l(f,m.prev,m))||c(f,m)&&l(f.prev,f,f.next)>0&&l(m.prev,m,m.next)>0))){var y=p(h,g);h=i(h,h.next),y=i(y,y.next),e(h,r,n,a,o,s,0),e(y,r,n,a,o,s,0);return}g=g.next}h=h.next}while(h!==t)}(t,r,n,a,h,f):e(i(t),r,n,a,h,f,1);break}}}}(k,T,r,h,f,b,0),T}function n(e,t,r,n,i){var a,o;if(i===v(e,t,r,n)>0)for(a=t;a=t;a-=n)o=m(a,e[a],e[a+1],o);return o&&c(o,o.next)&&(g(o),o=o.next),o}function i(e,t){if(!e)return e;t||(t=e);var r,n=e;do if(r=!1,!n.steiner&&(c(n,n.next)||0===l(n.prev,n,n.next))){if(g(n),(n=t=n.prev)===n.next)break;r=!0}else n=n.next;while(r||n!==t);return t}function a(e,t){return e.x-t.x}function o(e,t,r,n,i){return(e=((e=((e=((e=((e=(e-r)*i|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=((t=(t-n)*i|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1}function s(e,t,r,n,i,a,o,s){return(i-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function l(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function c(e,t){return e.x===t.x&&e.y===t.y}function u(e,t,r,n){var i=f(l(e,t,r)),a=f(l(e,t,n)),o=f(l(r,n,e)),s=f(l(r,n,t));return!!(i!==a&&o!==s||0===i&&h(e,r,t)||0===a&&h(e,n,t)||0===o&&h(r,e,n)||0===s&&h(r,t,n))}function h(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function f(e){return e>0?1:e<0?-1:0}function d(e,t){return 0>l(e.prev,e,e.next)?l(e,t,e.next)>=0&&l(e,e.prev,t)>=0:0>l(e,t,e.prev)||0>l(e,e.next,t)}function p(e,t){var r=new y(e.i,e.x,e.y),n=new y(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function m(e,t,r,n){var i=new y(e,t,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 g(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function y(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function v(e,t,r,n){for(var i=0,a=t,o=r-n;a0&&(n+=e[i-1].length,r.holes.push(n))}return r}}}),mQ=d({"node_modules/array-normalize/index.js"(e,t){var r=mk();t.exports=function(e,t,n){if(!e||null==e.length)throw Error("Argument should be an array");null==t&&(t=1),null==n&&(n=r(e,t));for(var i=0;i-1}}}),gg=d({"node_modules/es5-ext/string/#/contains/index.js"(e,t){t.exports=gp()()?String.prototype.contains:gm()}}),gy=d({"node_modules/d/index.js"(e,t){var r=gt(),n=ga(),i=gf(),a=gd(),o=gg();(t.exports=function(e,t){var n,s,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],r(e)?(n=o.call(e,"c"),s=o.call(e,"e"),l=o.call(e,"w")):(n=l=!0,s=!1),u={value:t,configurable:n,enumerable:s,writable:l},c?i(a(c),u):u}).gs=function(e,t,s){var l,c,u,h;return"string"!=typeof e?(u=s,s=t,t=e,e=null):u=arguments[3],r(t)?n(t)?r(s)?n(s)||(u=s,s=void 0):s=void 0:(u=t,t=s=void 0):t=void 0,r(e)?(l=o.call(e,"c"),c=o.call(e,"e")):(l=!0,c=!1),h={get:t,set:s,configurable:l,enumerable:c},u?i(a(u),h):h}}}),gv=d({"node_modules/es5-ext/function/is-arguments.js"(e,t){var r=Object.prototype.toString,n=r.call(function(){return arguments}());t.exports=function(e){return r.call(e)===n}}}),gx=d({"node_modules/es5-ext/string/is-string.js"(e,t){var r=Object.prototype.toString,n=r.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||r.call(e)===n)||!1}}}),gb=d({"node_modules/ext/global-this/is-implemented.js"(e,t){t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}}}),g_=d({"node_modules/ext/global-this/implementation.js"(e,t){var r=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()}}),gw=d({"node_modules/ext/global-this/index.js"(e,t){t.exports=gb()()?globalThis:g_()}}),gk=d({"node_modules/es6-symbol/is-implemented.js"(e,t){var r=gw(),n={object:!0,symbol:!0};t.exports=function(){var e,t=r.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch{return!1}return!(!n[typeof t.iterator]||!n[typeof t.toPrimitive]||!n[typeof t.toStringTag])}}}),gT=d({"node_modules/es6-symbol/is-symbol.js"(e,t){t.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}}}),gA=d({"node_modules/es6-symbol/validate-symbol.js"(e,t){var r=gT();t.exports=function(e){if(!r(e))throw TypeError(e+" is not a symbol");return e}}}),gM=d({"node_modules/es6-symbol/lib/private/generate-name.js"(e,t){var r=gy(),n=Object.defineProperty,i=Object.prototype,a=(0,Object.create)(null);t.exports=function(e){for(var t,o,s=0;a[e+(s||"")];)++s;return a[e+=s||""]=!0,n(i,t="@@"+e,r.gs(null,function(e){o||(o=!0,n(this,t,r(e)),o=!1)})),t}}}),gS=d({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(e,t){var r=gy(),n=gw().Symbol;t.exports=function(e){return Object.defineProperties(e,{hasInstance:r("",n&&n.hasInstance||e("hasInstance")),isConcatSpreadable:r("",n&&n.isConcatSpreadable||e("isConcatSpreadable")),iterator:r("",n&&n.iterator||e("iterator")),match:r("",n&&n.match||e("match")),replace:r("",n&&n.replace||e("replace")),search:r("",n&&n.search||e("search")),species:r("",n&&n.species||e("species")),split:r("",n&&n.split||e("split")),toPrimitive:r("",n&&n.toPrimitive||e("toPrimitive")),toStringTag:r("",n&&n.toStringTag||e("toStringTag")),unscopables:r("",n&&n.unscopables||e("unscopables"))})}}}),gE=d({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(e,t){var r=gy(),n=gA(),i=Object.create(null);t.exports=function(e){return Object.defineProperties(e,{for:r(function(t){return i[t]?i[t]:i[t]=e(String(t))}),keyFor:r(function(e){var t;for(t in n(e),i)if(i[t]===e)return t})})}}}),gC=d({"node_modules/es6-symbol/polyfill.js"(e,t){var r,n,i,a=gy(),o=gA(),s=gw().Symbol,l=gM(),c=gS(),u=gE(),h=Object.create,f=Object.defineProperties,d=Object.defineProperty;if("function"==typeof s)try{String(s()),i=!0}catch{}else s=null;n=function(e){if(this instanceof n)throw TypeError("Symbol is not a constructor");return r(e)},t.exports=r=function e(t){if(this instanceof e)throw TypeError("Symbol is not a constructor");return i?s(t):f(h(n.prototype),{__description__:a("",t=void 0===t?"":String(t)),__name__:a("",l(t))})},c(r),u(r),f(n.prototype,{constructor:a(r),toString:a("",function(){return this.__name__})}),f(r.prototype,{toString:a(function(){return"Symbol ("+o(this).__description__+")"}),valueOf:a(function(){return o(this)})}),d(r.prototype,r.toPrimitive,a("",function(){var e=o(this);return"symbol"==typeof e?e:e.toString()})),d(r.prototype,r.toStringTag,a("c","Symbol")),d(n.prototype,r.toStringTag,a("c",r.prototype[r.toStringTag])),d(n.prototype,r.toPrimitive,a("c",r.prototype[r.toPrimitive]))}}),gL=d({"node_modules/es6-symbol/index.js"(e,t){t.exports=gk()()?gw().Symbol:gC()}}),gI=d({"node_modules/es5-ext/array/#/clear.js"(e,t){var r=m4();t.exports=function(){return r(this).length=0,this}}}),gP=d({"node_modules/es5-ext/object/valid-callable.js"(e,t){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return e}}}),gz=d({"node_modules/type/string/coerce.js"(e,t){var r=gt(),n=gr(),i=Object.prototype.toString;t.exports=function(e){if(!r(e))return null;if(n(e)){var t=e.toString;if("function"!=typeof t||t===i)return null}try{return""+e}catch{return null}}}}),gO=d({"node_modules/type/lib/safe-to-string.js"(e,t){t.exports=function(e){try{return e.toString()}catch{try{return String(e)}catch{return null}}}}}),gD=d({"node_modules/type/lib/to-short-string.js"(e,t){var r=gO(),n=/[\n\r\u2028\u2029]/g;t.exports=function(e){var t=r(e);return null===t?"":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(n,function(e){switch(e){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("Unexpected character")}}))}}}),gR=d({"node_modules/type/lib/resolve-exception.js"(e,t){var r=gt(),n=gr(),i=gz(),a=gD(),o=function(e,t){return e.replace("%v",a(t))};t.exports=function(e,t,a){if(!n(a))throw TypeError(o(t,e));if(!r(e)){if("default"in a)return a.default;if(a.isOptional)return null}var s=i(a.errorMessage);throw r(s)||(s=t),TypeError(o(s,e))}}}),gj=d({"node_modules/type/value/ensure.js"(e,t){var r=gR(),n=gt();t.exports=function(e){return n(e)?e:r(e,"Cannot use %v",arguments[1])}}}),gF=d({"node_modules/type/plain-function/ensure.js"(e,t){var r=gR(),n=ga();t.exports=function(e){return n(e)?e:r(e,"%v is not a plain function",arguments[1])}}}),gB=d({"node_modules/es5-ext/array/from/is-implemented.js"(e,t){t.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&!!((t=r(e=["raz","dwa"]))&&t!==e&&"dwa"===t[1])}}}),gN=d({"node_modules/es5-ext/function/is-function.js"(e,t){var r=Object.prototype.toString,n=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(e){return"function"==typeof e&&n(r.call(e))}}}),gU=d({"node_modules/es5-ext/math/sign/is-implemented.js"(e,t){t.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}}}),gV=d({"node_modules/es5-ext/math/sign/shim.js"(e,t){t.exports=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1}}}),gq=d({"node_modules/es5-ext/math/sign/index.js"(e,t){t.exports=gU()()?Math.sign:gV()}}),gH=d({"node_modules/es5-ext/number/to-integer.js"(e,t){var r=gq(),n=Math.abs,i=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?r(e)*i(n(e)):e}}}),gG=d({"node_modules/es5-ext/number/to-pos-integer.js"(e,t){var r=gH(),n=Math.max;t.exports=function(e){return n(0,r(e))}}}),gW=d({"node_modules/es5-ext/array/from/shim.js"(e,t){var r=gL().iterator,n=gv(),i=gN(),a=gG(),o=gP(),s=m4(),l=m2(),c=gx(),u=Array.isArray,h=Function.prototype.call,f={configurable:!0,enumerable:!0,writable:!0,value:null},d=Object.defineProperty;t.exports=function(e){var t,p,m,g,y,v,x,b,_,w,k=arguments[1],T=arguments[2];if(e=Object(s(e)),l(k)&&o(k),this&&this!==Array&&i(this))t=this;else{if(!k){if(n(e))return 1!==(y=e.length)?Array.apply(null,e):((g=[,])[0]=e[0],g);if(u(e)){for(g=Array(y=e.length),p=0;p=55296&&v<=56319&&(w+=e[++p]),w=k?h.call(k,T,w,m):w,t?(f.value=w,d(g,m,f)):g[m]=w,++m;y=m}}if(void 0===y)for(y=a(e.length),t&&(g=new t(y)),p=0;p=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void u(this,"__redo__",s("c",[e]));this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:s(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,r){t>e&&(this.__redo__[r]=--t)},this)))}),_onClear:s(function(){this.__redo__&&n.call(this.__redo__),this.__nextIndex__=0})}))),u(r.prototype,c.iterator,s(function(){return this}))}}),g0=d({"node_modules/es6-iterator/array.js"(e,t){var r,n=m9(),i=gg(),a=gy(),o=gL(),s=gQ(),l=Object.defineProperty;r=t.exports=function(e,t){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");s.call(this,e),l(this,"__kind__",a("",t=t?i.call(t,"key+value")?"key+value":i.call(t,"key")?"key":"value":"value"))},n&&n(r,s),delete r.prototype.constructor,r.prototype=Object.create(s.prototype,{_resolve:a(function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e})}),l(r.prototype,o.toStringTag,a("c","Array Iterator"))}}),g1=d({"node_modules/es6-iterator/string.js"(e,t){var r,n=m9(),i=gy(),a=gL(),o=gQ(),s=Object.defineProperty;r=t.exports=function(e){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");e=String(e),o.call(this,e),s(this,"__length__",i("",e.length))},n&&n(r,o),delete r.prototype.constructor,r.prototype=Object.create(o.prototype,{_next:i(function(){if(this.__list__){if(this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r})}),s(r.prototype,a.toStringTag,i("c","String Iterator"))}}),g2=d({"node_modules/es6-iterator/is-iterable.js"(e,t){var r=gv(),n=m2(),i=gx(),a=gL().iterator,o=Array.isArray;t.exports=function(e){return!!n(e)&&(!!(o(e)||i(e)||r(e))||"function"==typeof e[a])}}}),g3=d({"node_modules/es6-iterator/valid-iterable.js"(e,t){var r=g2();t.exports=function(e){if(!r(e))throw TypeError(e+" is not iterable");return e}}}),g5=d({"node_modules/es6-iterator/get.js"(e,t){var r=gv(),n=gx(),i=g0(),a=g1(),o=g3(),s=gL().iterator;t.exports=function(e){return"function"==typeof o(e)[s]?e[s]():r(e)?new i(e):n(e)?new a(e):new i(e)}}}),g4=d({"node_modules/es6-iterator/for-of.js"(e,t){var r=gv(),n=gP(),i=gx(),a=g5(),o=Array.isArray,s=Function.prototype.call,l=Array.prototype.some;t.exports=function(e,t){var c,u,h,f,d,p,m,g,y=arguments[2];if(o(e)||r(e)?c="array":i(e)?c="string":e=a(e),n(t),h=function(){f=!0},"array"===c)return void l.call(e,function(e){return s.call(t,y,e,h),f});if("string"===c){for(p=e.length,d=0;d=55296&&g<=56319&&(m+=e[++d]),s.call(t,y,m,h),!f);++d);return}for(u=e.next();!u.done;){if(s.call(t,y,u.value,h),f)return;u=e.next()}}}}),g6=d({"node_modules/es6-weak-map/is-native-implemented.js"(e,t){t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)}}),g8=d({"node_modules/es6-weak-map/polyfill.js"(e,t){var r,n=m2(),i=m9(),a=m7(),o=m4(),s=ge(),l=gy(),c=g5(),u=g4(),h=gL().toStringTag,f=g6(),d=Array.isArray,p=Object.defineProperty,m=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf;t.exports=r=function(){var e,t=arguments[0];if(!(this instanceof r))throw TypeError("Constructor requires 'new'");return e=f&&i&&WeakMap!==r?i(new WeakMap,g(this)):this,n(t)&&(d(t)||(t=c(t))),p(e,"__weakMapData__",l("c","$weakMap$"+s())),t&&u(t,function(t){o(t),e.set(t[0],t[1])}),e},f&&(i&&i(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:l(r)})),Object.defineProperties(r.prototype,{delete:l(function(e){return!!m.call(a(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)}),get:l(function(e){if(m.call(a(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:l(function(e){return m.call(a(e),this.__weakMapData__)}),set:l(function(e,t){return p(a(e),this.__weakMapData__,l("c",t)),this}),toString:l(function(){return"[object WeakMap]"})}),p(r.prototype,h,l("c","WeakMap"))}}),g9=d({"node_modules/es6-weak-map/index.js"(e,t){t.exports=m0()()?WeakMap:g8()}}),g7=d({"node_modules/array-find-index/index.js"(e,t){t.exports=function(e,t,r){if("function"==typeof Array.prototype.findIndex)return e.findIndex(t,r);if("function"!=typeof t)throw TypeError("predicate must be a function");var n=Object(e),i=n.length;if(0===i)return -1;for(var a=0;a 0. && baClipping < length(normalWidth * endBotJoin)) { - //handle miter clipping - bTopCoord -= normalWidth * endTopJoin; - bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; - } - - if (nextReverse) { - //make join rectangular - vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; - float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); - bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; - bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; - } - else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { - //handle miter clipping - aBotCoord -= normalWidth * startBotJoin; - aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; - } - - vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; - vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; - - vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; - vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; - - //position is normalized 0..1 coord on the screen - vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; - - startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; - endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; - - gl_Position = vec4(position * 2.0 - 1.0, depth, 1); - - enableStartMiter = step(dot(currTangent, prevTangent), .5); - enableEndMiter = step(dot(currTangent, nextTangent), .5); - - //bevel miter cutoffs - if (miterMode == 1.) { - if (enableStartMiter == 1.) { - vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; - startCutoff = vec4(aCoord, aCoord); - startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; - startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; - startCutoff += viewport.xyxy; - startCutoff += startMiterWidth.xyxy; - } - - if (enableEndMiter == 1.) { - vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; - endCutoff = vec4(bCoord, bCoord); - endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; - endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; - endCutoff += viewport.xyxy; - endCutoff += endMiterWidth.xyxy; - } - } - - //round miter cutoffs - else if (miterMode == 2.) { - if (enableStartMiter == 1.) { - vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; - startCutoff = vec4(aCoord, aCoord); - startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; - startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; - startCutoff += viewport.xyxy; - startCutoff += startMiterWidth.xyxy; - } - - if (enableEndMiter == 1.) { - vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; - endCutoff = vec4(bCoord, bCoord); - endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; - endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; - endCutoff += viewport.xyxy; - endCutoff += endMiterWidth.xyxy; - } - } -} -`,x=` -precision highp float; - -uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; -uniform sampler2D dashTexture; - -varying vec4 fragColor; -varying vec2 tangent; -varying vec4 startCutoff, endCutoff; -varying vec2 startCoord, endCoord; -varying float enableStartMiter, enableEndMiter; - -float distToLine(vec2 p, vec2 a, vec2 b) { - vec2 diff = b - a; - vec2 perp = normalize(vec2(-diff.y, diff.x)); - return dot(p - a, perp); -} - -void main() { - float alpha = 1., distToStart, distToEnd; - float cutoff = thickness * .5; - - //bevel miter - if (miterMode == 1.) { - if (enableStartMiter == 1.) { - distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); - if (distToStart < -1.) { - discard; - return; - } - alpha *= min(max(distToStart + 1., 0.), 1.); - } - - if (enableEndMiter == 1.) { - distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); - if (distToEnd < -1.) { - discard; - return; - } - alpha *= min(max(distToEnd + 1., 0.), 1.); - } - } - - // round miter - else if (miterMode == 2.) { - if (enableStartMiter == 1.) { - distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); - if (distToStart < 0.) { - float radius = length(gl_FragCoord.xy - startCoord); - - if(radius > cutoff + .5) { - discard; - return; - } - - alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); - } - } - - if (enableEndMiter == 1.) { - distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); - if (distToEnd < 0.) { - float radius = length(gl_FragCoord.xy - endCoord); - - if(radius > cutoff + .5) { - discard; - return; - } - - alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); - } - } - } - - float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; - float dash = texture2D(dashTexture, vec2(t, .5)).r; - - gl_FragColor = fragColor; - gl_FragColor.a *= alpha * opacity * dash; -} -`;function b(e,t){if(!(this instanceof b))return new b(e,t);if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=b.shaders.has(e)?b.shaders.get(e):b.shaders.set(e,b.createShaders(e)).get(e),this.update(t)}t.exports=b,b.dashMult=2,b.maxPatternLength=256,b.precisionThreshold=3e6,b.maxPoints=1e4,b.maxLines=2048,b.shaders=new h,b.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(e,t)=>"round"===t.join?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(e,t)=>!t.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e(i({vert:p,frag:m,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),a;try{a=e(i({cull:{enable:!0,face:"back"},vert:v,frag:x,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch{a=n}return{fill:e({primitive:"triangle",elements:(e,t)=>t.triangles,offset:0,vert:g,frag:y,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:a}},b.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},b.prototype.render=function(...e){e.length&&this.update(...e),this.draw()},b.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((e,t)=>{if(e&&Array.isArray(e))return this.draw(...e);"number"==typeof e&&(e=this.passes[e]),e&&e.count>1&&e.opacity&&(this.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&this.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>b.precisionThreshold||e.scale[1]*e.viewport.height>b.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=b.maxPoints)?this.shaders.rect(e):this.shaders.miter(e)))}),this},b.prototype.update=function(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:h}=this;if(e.forEach((e,p)=>{let m=this.passes[p];if(void 0!==e){if(null===e){this.passes[p]=null;return}if("number"==typeof e[0]&&(e={positions:e}),e=a(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),m||(this.passes[p]=m={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=i({},b.defaults,e)),null!=e.thickness&&(m.thickness=parseFloat(e.thickness)),null!=e.opacity&&(m.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(m.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(m.overlay=!!e.overlay,pe-t),t=[],i=0,a=null!=m.hole?m.hole[0]:null;if(null!=a){let t=d(e,e=>e>=a);(e=e.slice(0,t)).push(a)}for(let n=0;nt-a+(e[n]-i)));o=o.map(t=>t+i+(t+i{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}}}),yt=d({"node_modules/regl-error2d/index.js"(e,t){var r=mk(),n=dF(),i=mX(),a=m_(),o=mW(),s=mA(),{float32:l,fract32:c}=m$();t.exports=function(e,t){if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let h=e._gl,f,d,p,m,g,y,v={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return m=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),d=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),y=e.buffer({usage:"static",type:"float",data:u}),k(t),f=e({vert:` - precision highp float; - - attribute vec2 position, positionFract; - attribute vec4 error; - attribute vec4 color; - - attribute vec2 direction, lineOffset, capOffset; - - uniform vec4 viewport; - uniform float lineWidth, capSize; - uniform vec2 scale, scaleFract, translate, translateFract; - - varying vec4 fragColor; - - void main() { - fragColor = color / 255.; - - vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; - - vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; - - vec2 position = position + dxy; - - vec2 pos = (position + translate) * scale - + (positionFract + translateFract) * scale - + (position + translate) * scaleFract - + (positionFract + translateFract) * scaleFract; - - pos += pixelOffset / viewport.zw; - - gl_Position = vec4(pos * 2. - 1., 0, 1); - } - `,frag:` - precision highp float; - - varying vec4 fragColor; - - uniform float opacity; - - void main() { - gl_FragColor = fragColor; - gl_FragColor.a *= opacity; - } - `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{color:{buffer:m,offset:(e,t)=>4*t.offset,divisor:1},position:{buffer:d,offset:(e,t)=>8*t.offset,divisor:1},positionFract:{buffer:p,offset:(e,t)=>8*t.offset,divisor:1},error:{buffer:g,offset:(e,t)=>16*t.offset,divisor:1},direction:{buffer:y,stride:24,offset:0},lineOffset:{buffer:y,stride:24,offset:8},capOffset:{buffer:y,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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:u.length}),o(b,{update:k,draw:_,destroy:T,regl:e,gl:h,canvas:h.canvas,groups:x}),b;function b(e){e?k(e):null===e&&T(),_()}function _(t){if("number"==typeof t)return w(t);t&&!Array.isArray(t)&&(t=[t]),e._refresh(),x.forEach((e,r)=>{if(e){if(t&&(t[r]?e.draw=!0:e.draw=!1),!e.draw){e.draw=!0;return}w(r)}})}function w(e){"number"==typeof e&&(e=x[e]),null!=e&&e&&e.count&&e.color&&e.opacity&&e.positions&&e.positions.length>1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],f(e),e.after&&e.after(e))}function k(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let t=0,u=0;if(b.groups=x=e.map((e,l)=>{let f=x[l];return e&&("function"==typeof e?e={after:e}:"number"==typeof e[0]&&(e={positions:e}),e=a(e,{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"}),f||(x[l]=f={id:l,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=o({},v,e)),i(f,e,[{lineWidth:e=>.5*e,capSize:e=>.5*e,opacity:parseFloat,errors:e=>(e=s(e),u+=e.length,e),positions:(e,n)=>(n.count=Math.floor((e=s(e,"float64")).length/2),n.bounds=r(e,2),n.offset=t,t+=n.count,e)},{color:(e,t)=>{let r=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"==typeof e[0]){let t=e;e=Array(r);for(let n=0;n{let n=t.bounds;return e||(e=n),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=c(t.scale),t.translateFract=c(t.translate),e},viewport:e=>{let t;return Array.isArray(e)?t={x:e[0],y:e[1],width:e[2]-e[0],height:e[3]-e[1]}:e?(t={x:e.x||e.left||0,y:e.y||e.top||0},e.right?t.width=e.right-t.x:t.width=e.w||e.width||0,e.bottom?t.height=e.bottom-t.y:t.height=e.h||e.height||0):t={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},t}}])),f}),t||u){let e=x.reduce((e,t,r)=>e+(t?t.count:0),0),t=new Float64Array(2*e),r=new Uint8Array(4*e),n=new Float32Array(4*e);x.forEach((e,i)=>{if(!e)return;let{positions:a,count:o,offset:s,color:l,errors:c}=e;o&&(r.set(l,4*s),n.set(c,4*s),t.set(a,2*s))});var f=l(t);d(f),p(c(t,f)),m(r),g(n)}}function T(){d.destroy(),p.destroy(),m.destroy(),g.destroy(),y.destroy()}};var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]}}),yr=d({"node_modules/unquote/index.js"(e,t){var r=/[\'\"]/;t.exports=function(e){return e?(r.test(e.charAt(0))&&(e=e.substr(1)),r.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}}}),yn=d({"node_modules/css-global-keywords/index.json"(e,t){t.exports=["inherit","initial","unset"]}}),yi=d({"node_modules/css-system-font-keywords/index.json"(e,t){t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),ya=d({"node_modules/css-font-weight-keywords/index.json"(e,t){t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),yo=d({"node_modules/css-font-style-keywords/index.json"(e,t){t.exports=["normal","italic","oblique"]}}),ys=d({"node_modules/css-font-stretch-keywords/index.json"(e,t){t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),yl=d({"node_modules/parenthesis/index.js"(e,t){function r(e,t){if("string"!=typeof e)return[e];var r=[e];"string"==typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],i=t.escape||"___",a=!!t.flat;n.forEach(function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),n=[];function a(t,a,o){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return n.push(s),i+s+i}r.forEach(function(e,n){for(var i,o=0;e!=i;)if(i=e,e=e.replace(t,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[n]=e}),n=n.reverse(),r=r.map(function(t){return n.forEach(function(r){t=t.replace(RegExp("(\\"+i+r+"\\"+i+")","g"),e[0]+"$1"+e[1])}),t})});var o=RegExp("\\"+i+"([0-9]+)\\"+i);return a?r:function e(t,r,n){for(var i,a=[],s=0;i=o.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(t.slice(0,i.index)),a.push(e(r[i[1]],r)),t=t.slice(i.index+i[0].length)}return a.push(t),a}(r[0],r)}function n(e,t){if(t&&t.flat){var r,n=t&&t.escape||"___",i=e[0];if(!i)return"";for(var a=RegExp("\\"+n+"([0-9]+)\\"+n),o=0;i!=r;){if(o++>1e4)throw Error("Circular references in "+e);r=i,i=i.replace(a,s)}return i}return e.reduce(function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r},"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function i(e,t){return Array.isArray(e)?n(e,t):r(e,t)}i.parse=r,i.stringify=n,t.exports=i}}),yc=d({"node_modules/string-split-by/index.js"(e,t){var r=yl();t.exports=function(e,t,n){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");n?("string"==typeof n||Array.isArray(n))&&(n={ignore:n}):n={},null==n.escape&&(n.escape=!0),null==n.ignore?n.ignore=["[]","()","{}","<>",'""',"''","``","“”","\xab\xbb"]:("string"==typeof n.ignore&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(e){return 1===e.length&&(e+=e),e}));var i=r.parse(e,{flat:!0,brackets:n.ignore}),a=i[0].split(t);if(n.escape){for(var o=[],s=0;s1&&r===i&&('"'===r||"'"===r))return['"'+n(t.substr(1,t.length-2))+'"'];var a=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(a)return e(t.substr(0,a.index)).concat(e(a[1])).concat(e(t.substr(a.index+a[0].length)));var o=t.split(".");if(1===o.length)return['"'+n(t)+'"'];for(var s=[],l=0;ltypeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date};function c(e){return"string"==typeof e?e.split():e}function u(e){return"string"==typeof e?document.querySelector(e):e}function h(e,t){for(var r=Array(e),n=0;n65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1}function d(){var e=h(8,function(){return[]});function t(t){var r=function(e){for(var t=16;t<=0x10000000;t*=16)if(e<=t)return t;return 0}(t),n=e[f(r)>>2];return n.length>0?n.pop():new ArrayBuffer(r)}function r(t){e[f(t.byteLength)>>2].push(t)}return{alloc:t,free:r,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(e){r(e.buffer)}}}var p=d();p.zero=d();var m=function(e,t){var r=1;t.ext_texture_filter_anisotropic&&(r=e.getParameter(34047));var n=1,i=1;t.webgl_draw_buffers&&(n=e.getParameter(34852),i=e.getParameter(36063));var a=!!t.oes_texture_float;if(a){var o=e.createTexture();e.bindTexture(3553,o),e.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var s=e.createFramebuffer();if(e.bindFramebuffer(36160,s),e.framebufferTexture2D(36160,36064,3553,o,0),e.bindTexture(3553,null),36053!==e.checkFramebufferStatus(36160))a=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(16384);var l=p.allocType(5126,4);e.readPixels(0,0,1,1,6408,5126,l),e.getError()?a=!1:(e.deleteFramebuffer(s),e.deleteTexture(o),a=1===l[0]),p.freeType(l)}}var c="u">typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),u=!0;if(!c){var h=e.createTexture(),f=p.allocType(5121,36);e.activeTexture(33984),e.bindTexture(34067,h),e.texImage2D(34069,0,6408,3,3,0,6408,5121,f),p.freeType(f),e.bindTexture(34067,null),e.deleteTexture(h),u=!e.getError()}return{colorBits:[e.getParameter(3410),e.getParameter(3411),e.getParameter(3412),e.getParameter(3413)],depthBits:e.getParameter(3414),stencilBits:e.getParameter(3415),subpixelBits:e.getParameter(3408),extensions:Object.keys(t).filter(function(e){return!!t[e]}),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:e.getParameter(33901),lineWidthDims:e.getParameter(33902),maxViewportDims:e.getParameter(3386),maxCombinedTextureUnits:e.getParameter(35661),maxCubeMapSize:e.getParameter(34076),maxRenderbufferSize:e.getParameter(34024),maxTextureUnits:e.getParameter(34930),maxTextureSize:e.getParameter(3379),maxAttributes:e.getParameter(34921),maxVertexUniforms:e.getParameter(36347),maxVertexTextureUnits:e.getParameter(35660),maxVaryingVectors:e.getParameter(36348),maxFragmentUniforms:e.getParameter(36349),glsl:e.getParameter(35724),renderer:e.getParameter(7937),vendor:e.getParameter(7936),version:e.getParameter(7938),readFloat:a,npotTextureCube:u}},g=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray};function y(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||g(e.data))}var v=function(e){return Object.keys(e).map(function(t){return e[t]})},x=function(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t},b=function(e,t,r,n){var i=1;if(t.length)for(var a=0;a>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)t[r]=i;else if(a<-14){var s=-14-a;t[r]=i+(o+1024>>s)}else a>15?t[r]=i+31744:t[r]=i+(a+15<<10)+o}return t}function z(e){return Array.isArray(e)||g(e)}var O=[9984,9986,9985,9987],D=[0,6409,6410,6407,6408],R={};function j(e){return"[object "+e+"]"}R[6409]=R[6406]=R[6402]=1,R[34041]=R[6410]=2,R[6407]=R[35904]=3,R[6408]=R[35906]=4;var F=j("HTMLCanvasElement"),B=j("OffscreenCanvas"),N=j("CanvasRenderingContext2D"),U=j("ImageBitmap"),V=j("HTMLImageElement"),q=j("HTMLVideoElement"),H=Object.keys(w).concat([F,B,N,U,V,q]),G=[];G[5121]=1,G[5126]=4,G[36193]=2,G[5123]=2,G[5125]=4;var W=[];function Y(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function X(e){return!!Array.isArray(e)&&!(0===e.length||!z(e[0]))}function Z(e){return Object.prototype.toString.call(e)}function $(e){if(!e)return!1;var t=Z(e);return H.indexOf(t)>=0||Y(e)||X(e)||y(e)}function K(e){return 0|w[Object.prototype.toString.call(e)]}function J(e,t){return p.allocType(36193===e.type?5126:e.type,t)}function Q(e,t){36193===e.type?(e.data=P(t),p.freeType(t)):e.data=t}function ee(e,t,r,n,i,a){var o;if(o="u">typeof W[e]?W[e]:R[e]*G[t],a&&(o*=6),!i)return o*r*n;for(var s=0,l=r;l>=1;)s+=o*l*l,l/=2;return s}W[32854]=2,W[32855]=2,W[36194]=2,W[34041]=4,W[33776]=.5,W[33777]=.5,W[33778]=1,W[33779]=1,W[35986]=.5,W[35987]=1,W[34798]=1,W[35840]=.5,W[35841]=.25,W[35842]=.5,W[35843]=.25,W[36196]=.5;var et=[];et[32854]=2,et[32855]=2,et[36194]=2,et[33189]=2,et[36168]=1,et[34041]=4,et[35907]=4,et[34836]=16,et[34842]=8,et[34843]=6;var er=function(e,t,r,n,i){var a={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};t.ext_srgb&&(a.srgba=35907),t.ext_color_buffer_half_float&&(a.rgba16f=34842,a.rgb16f=34843),t.webgl_color_buffer_float&&(a.rgba32f=34836);var o=[];Object.keys(a).forEach(function(e){o[a[e]]=e});var s=0,l={};function c(e){this.id=s++,this.refCount=1,this.renderbuffer=e,this.format=32854,this.width=0,this.height=0,i.profile&&(this.stats={size:0})}function u(t){var r=t.renderbuffer;e.bindRenderbuffer(36161,null),e.deleteRenderbuffer(r),t.renderbuffer=null,t.refCount=0,delete l[t.id],n.renderbufferCount--}return c.prototype.decRef=function(){--this.refCount<=0&&u(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var e=0;return Object.keys(l).forEach(function(t){e+=l[t].stats.size}),e}),{create:function(t,r){var s=new c(e.createRenderbuffer());function u(t,r){var n,l,c,h=0,f=0,d=32854;if("object"==typeof t&&t){if("shape"in t){var p=t.shape;h=0|p[0],f=0|p[1]}else"radius"in t&&(h=f=0|t.radius),"width"in t&&(h=0|t.width),"height"in t&&(f=0|t.height);"format"in t&&(d=a[t.format])}else"number"==typeof t?(h=0|t,f="number"==typeof r?0|r:h):t||(h=f=1);if(h!==s.width||f!==s.height||d!==s.format)return u.width=s.width=h,u.height=s.height=f,s.format=d,e.bindRenderbuffer(36161,s.renderbuffer),e.renderbufferStorage(36161,d,h,f),i.profile&&(s.stats.size=(n=s.format,l=s.width,c=s.height,et[n]*l*c)),u.format=o[s.format],u}return l[s.id]=s,n.renderbufferCount++,u(t,r),u.resize=function(t,r){var n,a,o,l=0|t,c=0|r||l;return l===s.width&&c===s.height||(u.width=s.width=l,u.height=s.height=c,e.bindRenderbuffer(36161,s.renderbuffer),e.renderbufferStorage(36161,s.format,l,c),i.profile&&(s.stats.size=(n=s.format,a=s.width,o=s.height,et[n]*a*o))),u},u._reglType="renderbuffer",u._renderbuffer=s,i.profile&&(u.stats=s.stats),u.destroy=function(){s.decRef()},u},clear:function(){v(l).forEach(u)},restore:function(){v(l).forEach(function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)}),e.bindRenderbuffer(36161,null)}}},en=[];en[6408]=4,en[6407]=3;var ei=[];function ea(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.offset=0,this.stride=0,this.divisor=0}function eo(e,t){return e>>>t|e<<32-t}ei[5121]=1,ei[5126]=4,ei[36193]=2;var es=[0x428a2f98,0x71374491,-0x4a3f0431,-0x164a245b,0x3956c25b,0x59f111f1,-0x6dc07d5c,-0x54e3a12b,-0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,-0x7f214e02,-0x6423f959,-0x3e640e8c,-0x1b64963f,-0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,-0x67c1aeae,-0x57ce3993,-0x4ffcd838,-0x40a68039,-0x391ff40d,-0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,-0x7e3d36d2,-0x6d8dd37b,-0x5d40175f,-0x57e599b5,-0x3db47490,-0x3893ae5d,-0x2e6d17e7,-0x2966f9dc,-0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,-0x7b3787ec,-0x7338fdf8,-0x6f410006,-0x5baf9315,-0x41065c09,-0x398e870e];function el(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ec(e){return Array.prototype.slice.call(e)}function eu(e){return ec(e).join("")}var eh="xyzw".split(""),ef="dither",ed="blend.enable",ep="blend.color",em="blend.equation",eg="blend.func",ey="depth.enable",ev="depth.func",ex="depth.range",eb="depth.mask",e_="colorMask",ew="cull.enable",ek="cull.face",eT="frontFace",eA="lineWidth",eM="polygonOffset.enable",eS="polygonOffset.offset",eE="sample.alpha",eC="sample.enable",eL="sample.coverage",eI="stencil.enable",eP="stencil.mask",ez="stencil.func",eO="stencil.opFront",eD="stencil.opBack",eR="scissor.enable",ej="scissor.box",eF="viewport",eB="profile",eN="framebuffer",eU="vert",eV="frag",eq="elements",eH="primitive",eG="count",eW="offset",eY="instances",eX="Width",eZ="Height",e$=eN+eX,eK=eN+eZ,eJ=eF+eX,eQ=eF+eZ,e0="drawingBuffer",e1=e0+eX,e2=e0+eZ,e3=[eg,em,ez,eO,eD,eL,eF,ej,eS],e5={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},e4={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},e6={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},e8={cw:2304,ccw:2305};function e9(e){return Array.isArray(e)||g(e)||y(e)}function e7(e){return e.sort(function(e,t){return e===eF?-1:t===eF?1:e=1,n>=2,t)}if(4===r){var i=e.data;return new te(i.thisDep,i.contextDep,i.propDep,t)}if(5===r)return new te(!1,!1,!1,t);if(6!==r)return new te(3===r,2===r,1===r,t);for(var a=!1,o=!1,s=!1,l=0;l=1&&(o=!0),u>=2&&(s=!0)}else 4===c.type&&(a=a||c.data.thisDep,o=o||c.data.contextDep,s=s||c.data.propDep)}return new te(a,o,s,t)}var ti=new te(!1,!1,!1,function(){}),ta=function(e,t){if(!t.ext_disjoint_timer_query)return null;var r=[],n=[];function i(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var a=[],o=[];function s(e,t,r){var n=a.pop()||new i;n.startQueryIndex=e,n.endQueryIndex=t,n.sum=0,n.stats=r,o.push(n)}var l=[],c=[];return{beginQuery:function(e){var i=r.pop()||t.ext_disjoint_timer_query.createQueryEXT();t.ext_disjoint_timer_query.beginQueryEXT(35007,i),n.push(i),s(n.length-1,n.length,e)},endQuery:function(){t.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:s,update:function(){var e,i,s=n.length;if(0!==s){c.length=Math.max(c.length,s+1),l.length=Math.max(l.length,s+1),l[0]=0,c[0]=0;var u=0;for(e=0,i=0;i"u"?1:window.devicePixelRatio,d=!1,p={},m=function(e){},g=function(){};if("string"==typeof o?r=document.querySelector(o):"object"==typeof o&&("string"==typeof o.nodeName&&"function"==typeof o.appendChild&&"function"==typeof o.getBoundingClientRect?r=o:"function"==typeof o.drawArrays||"function"==typeof o.drawElements?i=(a=o).canvas:("gl"in o?a=o.gl:"canvas"in o?i=u(o.canvas):"container"in o&&(n=u(o.container)),"attributes"in o&&(s=o.attributes),"extensions"in o&&(l=c(o.extensions)),"optionalExtensions"in o&&(h=c(o.optionalExtensions)),"onDone"in o&&(m=o.onDone),"profile"in o&&(d=!!o.profile),"pixelRatio"in o&&(f=+o.pixelRatio),"cachedCode"in o&&(p=o.cachedCode))),r&&("canvas"===r.nodeName.toLowerCase()?i=r:n=r),!a){if(!i){var y=function(t,r){var n,i=document.createElement("canvas");function a(){var e=window.innerWidth,n=window.innerHeight;if(t!==document.body){var a=i.getBoundingClientRect();e=a.right-a.left,n=a.bottom-a.top}i.width=r*e,i.height=r*n}return e(i.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(i),t===document.body&&(i.style.position="absolute",e(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(n=new ResizeObserver(function(){setTimeout(a)})).observe(t):window.addEventListener("resize",a,!1),a(),{canvas:i,onDestroy:function(){n?n.disconnect():window.removeEventListener("resize",a),t.removeChild(i)}}}(n||document.body,f);if(!y)return null;i=y.canvas,g=y.onDestroy}void 0===s.premultipliedAlpha&&(s.premultipliedAlpha=!0),a=function(e,t){function r(r){try{return e.getContext(r,t)}catch{return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(i,s)}return a?{gl:a,canvas:i,container:n,extensions:l,optionalExtensions:h,pixelRatio:f,profile:d,cachedCode:p,onDone:m,onDestroy:g}:(g(),m("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(t);if(!d)return null;var _=d.gl,w=_.getContextAttributes(),L=(_.isContextLost(),function(e,t){var r={};function n(t){var n,i=t.toLowerCase();try{n=r[i]=e.getExtension(i)}catch{}return!!n}for(var i=0;i0)if(Array.isArray(t[0])){o=x(t);for(var o,s,c=1,u=1;u0){if("number"==typeof e[0]){var i=p.allocType(h.dtype,e.length);S(i,e),d(i,n),p.freeType(i)}else if(Array.isArray(e[0])||g(e[0])){r=x(e);var a=b(e,r,h.dtype);d(a,n),p.freeType(a)}}}else if(y(e)){r=e.shape;var o=e.stride,s=0,l=0,c=0,u=0;1===r.length?(s=r[0],l=1,c=o[0],u=0):2===r.length&&(s=r[0],l=r[1],c=o[0],u=o[1]);var m=Array.isArray(e.data)?h.dtype:M(e.data),v=p.allocType(m,s*l);E(v,e.data,s,l,c,u,e.offset),d(v,n),p.freeType(v)}return f},r.profile&&(f.stats=h.stats),f.destroy=function(){u(h)},f},createStream:function(e,t){var r=s.pop();return r||(r=new o(e)),r.bind(),c(r,t,35040,0,1,!1),r},destroyStream:function(e){s.push(e)},clear:function(){v(a).forEach(u),s.forEach(u)},getBuffer:function(e){return e&&e._buffer instanceof o?e._buffer:null},restore:function(){v(a).forEach(function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)})},_initBuffer:c}}(_,j,d,function(e){return td.destroyBuffer(e)}),tf=function(e,t,r,n){var i={},a=0,o={uint8:5121,uint16:5123};function s(e){this.id=a++,i[this.id]=this,this.buffer=e,this.primType=4,this.vertCount=0,this.type=0}t.oes_element_index_uint&&(o.uint32=5125),s.prototype.bind=function(){this.buffer.bind()};var l=[];function c(n,i,a,o,s,l,c){if(n.buffer.bind(),i){var u,h=c;!c&&(!g(i)||y(i)&&!g(i.data))&&(h=t.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,i,a,h,3)}else e.bufferData(34963,l,a),n.buffer.dtype=u||5121,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;if(u=c,!c){switch(n.buffer.dtype){case 5121:case 5120:u=5121;break;case 5123:case 5122:u=5123;break;case 5125:case 5124:u=5125}n.buffer.dtype=u}n.type=u;var f=s;f<0&&(f=n.buffer.byteLength,5123===u?f>>=1:5125===u&&(f>>=2)),n.vertCount=f;var d=o;if(o<0){d=4;var p=n.buffer.dimension;1===p&&(d=0),2===p&&(d=1),3===p&&(d=4)}n.primType=d}function u(e){n.elementsCount--,delete i[e.id],e.buffer.destroy(),e.buffer=null}return{create:function(e,t){var i=r.create(null,34963,!0),a=new s(i._buffer);function l(e){if(e)if("number"==typeof e)i(e),a.primType=4,a.vertCount=0|e,a.type=5121;else{var t=null,r=35044,n=-1,s=-1,u=0,h=0;Array.isArray(e)||g(e)||y(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=T[e.usage]),"primitive"in e&&(n=C[e.primitive]),"count"in e&&(s=0|e.count),"type"in e&&(h=o[e.type]),"length"in e?u=0|e.length:(u=s,5123===h||5122===h?u*=2:(5125===h||5124===h)&&(u*=4))),c(a,t,r,n,s,u,h)}else i(),a.primType=4,a.vertCount=0,a.type=5121;return l}return n.elementsCount++,l(e),l._reglType="elements",l._elements=a,l.subdata=function(e,t){return i.subdata(e,t),l},l.destroy=function(){u(a)},l},createStream:function(e){var t=l.pop();return t||(t=new s(r.create(null,34963,!0,!1)._buffer)),c(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){l.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof s?e._elements:null},clear:function(){v(i).forEach(u)}}}(_,G,th,j),td=function(e,t,r,n,i,a,o){for(var s=r.maxAttributes,l=Array(s),c=0;c=d.byteLength?u.subdata(d):(u.destroy(),t.buffers[l]=null)),t.buffers[l]||(u=t.buffers[l]=i.create(h,34962,!1,!0)),f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,o[l]=1):i.getBuffer(h)?(f.buffer=i.getBuffer(h),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(h.buffer)?(f.buffer=i.getBuffer(h.buffer),f.size=0|(+h.size||f.buffer.dimension),f.normalized=!!h.normalized,"type"in h?f.type=k[h.type]:f.type=f.buffer.dtype,f.offset=0|(h.offset||0),f.stride=0|(h.stride||0),f.divisor=0|(h.divisor||0),f.state=1):"x"in h&&(f.x=+h.x||0,f.y=+h.y||0,f.z=+h.z||0,f.w=+h.w||0,f.state=2)}for(var p=0;p1)for(var y=0;ye&&(e=t.stats.uniformsCount)}),e},n.getMaxAttributesCount=function(){var e=0;return h.forEach(function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)}),e}),{clear:function(){var e=t.deleteShader.bind(t);v(a).forEach(e),a={},v(o).forEach(e),o={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,u={},n.shaderCount=0},program:function(r,i,s,l){var c=u[i];c||(c=u[i]={});var f=c[r];if(f&&(f.refCount++,!l))return f;var m=new d(i,r);return n.shaderCount++,p(m,s,l),f||(c[r]=m),h.push(m),e(m,{destroy:function(){if(m.refCount--,m.refCount<=0){t.deleteProgram(m.program);var e=h.indexOf(m);h.splice(e,1),n.shaderCount--}c[m.vertId].refCount<=0&&(t.deleteShader(o[m.vertId]),delete o[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(t.deleteShader(a[m.fragId]),delete a[m.fragId],delete u[m.fragId])}})},restore:function(){a={},o={};for(var e=0;e=0&&(m[e]=t)});var k=Object.keys(m);n.textureFormats=k;var T=[];Object.keys(m).forEach(function(e){T[m[e]]=e});var A=[];Object.keys(d).forEach(function(e){A[d[e]]=e});var M=[];Object.keys(u).forEach(function(e){M[u[e]]=e});var S=[];Object.keys(h).forEach(function(e){S[h[e]]=e});var E=[];Object.keys(c).forEach(function(e){E[c[e]]=e});var C=k.reduce(function(e,t){var n=m[t];return 6409===n||6406===n||6409===n||6410===n||6402===n||34041===n||r.ext_srgb&&(35904===n||35906===n)?e[n]=n:32855===n||t.indexOf("rgba")>=0?e[n]=6408:e[n]=6407,e},{});function L(){this.internalformat=6408,this.format=6408,this.type=5121,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=37444,this.width=0,this.height=0,this.channels=0}function I(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function j(e,t){if(!("object"!=typeof t||!t)){"premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=f[t.colorSpace]),"type"in t&&(e.type=d[t.type]);var r=e.width,n=e.height,i=e.channels,a=!1;"shape"in t?(r=t.shape[0],n=t.shape[1],3===t.shape.length&&(i=t.shape[2],a=!0)):("radius"in t&&(r=n=t.radius),"width"in t&&(r=t.width),"height"in t&&(n=t.height),"channels"in t&&(i=t.channels,a=!0)),e.width=0|r,e.height=0|n,e.channels=0|i;var o=!1;if("format"in t){var s=t.format,l=e.internalformat=m[s];e.format=C[l],s in d&&("type"in t||(e.type=d[s])),s in _&&(e.compressed=!0),o=!0}!a&&o?e.channels=R[e.format]:a&&!o&&e.channels!==D[e.format]&&(e.format=e.internalformat=D[e.channels])}}function H(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function G(){L.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function W(e,t){var r=null;if($(t)?r=t:t&&(j(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),$(t.data)&&(r=t.data)),t.copy){var n=a.viewportWidth,i=a.viewportHeight;e.width=e.width||n-e.xOffset,e.height=e.height||i-e.yOffset,e.needsCopy=!0}else if(r){if(g(r))e.channels=e.channels||4,e.data=r,"type"in t||5121!==e.type||(e.type=K(r));else if(Y(r))e.channels=e.channels||4,function(e,t){var r=t.length;switch(e.type){case 5121:case 5123:case 5125:case 5126:var n=p.allocType(e.type,r);n.set(t),e.data=n;break;case 36193:e.data=P(t)}}(e,r),e.alignment=1,e.needsFree=!0;else if(y(r)){var o=r.data;Array.isArray(o)||5121!==e.type||(e.type=K(o));var s,l,c,u,h,f,d=r.shape,m=r.stride;3===d.length?(c=d[2],f=m[2]):(c=1,f=1),s=d[0],l=d[1],u=m[0],h=m[1],e.alignment=1,e.width=s,e.height=l,e.channels=c,e.format=e.internalformat=D[c],e.needsFree=!0,function(e,t,r,n,i,a){for(var o=e.width,s=e.height,l=e.channels,c=J(e,o*s*l),u=0,h=0;h>=i,r.height>>=i,W(r,n[i]),e.mipmask|=1<=0)||"faces"in t||(e.genMipmaps=!0)),"mag"in t&&(e.magFilter=u[t.mag]);var r=e.wrapS,n=e.wrapT;if("wrap"in t){var i=t.wrap;"string"==typeof i?r=n=c[i]:Array.isArray(i)&&(r=c[i[0]],n=c[i[1]])}else"wrapS"in t&&(r=c[t.wrapS]),"wrapT"in t&&(n=c[t.wrapT]);if(e.wrapS=r,e.wrapT=n,"anisotropic"in t&&(t.anisotropic,e.anisotropic=t.anisotropic),"mipmap"in t){var a=!1;switch(typeof t.mipmap){case"string":e.mipmapHint=l[t.mipmap],e.genMipmaps=!0,a=!0;break;case"boolean":a=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,a=!0}!a||"min"in t||(e.minFilter=9984)}}function ep(e,n){t.texParameteri(n,10241,e.minFilter),t.texParameteri(n,10240,e.magFilter),t.texParameteri(n,10242,e.wrapS),t.texParameteri(n,10243,e.wrapT),r.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,e.anisotropic),e.genMipmaps&&(t.hint(33170,e.mipmapHint),t.generateMipmap(n))}var em=0,eg={},ey=n.maxTextureUnits,ev=Array(ey).map(function(){return null});function ex(e){L.call(this),this.mipmask=0,this.internalformat=6408,this.id=em++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new ef,s.profile&&(this.stats={size:0})}function eb(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function e_(){var e=ev[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function ew(e){var r=e.texture,n=e.unit,i=e.target;n>=0&&(t.activeTexture(33984+n),t.bindTexture(i,null),ev[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete eg[e.id],o.textureCount--}return e(ex.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(e<0){for(var r=0;r0)continue;n.unit=-1}ev[r]=this,e=r;break}s.profile&&o.maxTextureUnits>l)-o,c.height=c.height||(n.height>>l)-s,eb(n),et(c,3553,o,s,l),e_(),ei(c),i},i.resize=function(e,r){var a=0|e,o=0|r||a;if(a===n.width&&o===n.height)return i;i.width=n.width=a,i.height=n.height=o,eb(n);for(var l=0;n.mipmask>>l;++l){var c=a>>l,u=o>>l;if(!c||!u)break;t.texImage2D(3553,l,n.format,c,u,0,n.format,n.type,null)}return e_(),s.profile&&(n.stats.size=ee(n.internalformat,n.type,a,o,!1,!1)),i},i._reglType="texture2d",i._texture=n,s.profile&&(i.stats=n.stats),i.destroy=function(){n.decRef()},i},createCube:function(e,r,n,i,a,l){var c=new ex(34067);eg[c.id]=c,o.cubeCount++;var u=Array(6);function h(e,t,r,n,i,a){var o,l=c.texInfo;for(ef.call(l),o=0;o<6;++o)u[o]=eu();if("number"!=typeof e&&e){if("object"==typeof e)if(t)es(u[0],e),es(u[1],t),es(u[2],r),es(u[3],n),es(u[4],i),es(u[5],a);else if(ed(l,e),j(c,e),"faces"in e){var f=e.faces;for(o=0;o<6;++o)I(u[o],c),es(u[o],f[o])}else for(o=0;o<6;++o)es(u[o],e)}else{var d=0|e||1;for(o=0;o<6;++o)eo(u[o],d,d)}for(I(c,u[0]),l.genMipmaps?c.mipmask=(u[0].width<<1)-1:c.mipmask=u[0].mipmask,c.internalformat=u[0].internalformat,h.width=u[0].width,h.height=u[0].height,eb(c),o=0;o<6;++o)el(u[o],34069+o);for(ep(l,34067),e_(),s.profile&&(c.stats.size=ee(c.internalformat,c.type,h.width,h.height,l.genMipmaps,!0)),h.format=T[c.internalformat],h.type=A[c.type],h.mag=M[l.magFilter],h.min=S[l.minFilter],h.wrapS=E[l.wrapS],h.wrapT=E[l.wrapT],o=0;o<6;++o)eh(u[o]);return h}return h(e,r,n,i,a,l),h.subimage=function(e,t,r,n,i){var a=0|r,o=0|n,s=0|i,l=en();return I(l,c),l.width=0,l.height=0,W(l,t),l.width=l.width||(c.width>>s)-a,l.height=l.height||(c.height>>s)-o,eb(c),et(l,34069+e,a,o,s),e_(),ei(l),h},h.resize=function(e){var r=0|e;if(r!==c.width){h.width=c.width=r,h.height=c.height=r,eb(c);for(var n=0;n<6;++n)for(var i=0;c.mipmask>>i;++i)t.texImage2D(34069+n,i,c.format,r>>i,r>>i,0,c.format,c.type,null);return e_(),s.profile&&(c.stats.size=ee(c.internalformat,c.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=c,s.profile&&(h.stats=c.stats),h.destroy=function(){c.decRef()},h},clear:function(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);ep(e.texInfo,e.target)})},refresh:function(){for(var e=0;e=0?f=!0:c.indexOf(p)>=0&&(f=!1))),("depthTexture"in e||"depthStencilTexture"in e)&&(T=!!(e.depthTexture||e.depthStencilTexture)),"depth"in e&&("boolean"==typeof e.depth?s=e.depth:(b=e.depth,u=!1)),"stencil"in e&&("boolean"==typeof e.stencil?u=e.stencil:(_=e.stencil,s=!1)),"depthStencil"in e&&("boolean"==typeof e.depthStencil?s=u=e.depthStencil:(w=e.depthStencil,s=!1,u=!1))}else a=o=1;var S=null,E=null,C=null,L=null;if(Array.isArray(h))S=h.map(m);else if(h)S=[m(h)];else for(S=Array(x),r=0;r0&&(s.depth=r[0].depth,s.stencil=r[0].stencil,s.depthStencil=r[0].depthStencil),r[o]?r[o](s):r[o]=M(s)}return e(n,{width:l,height:l,color:a})}return n(t),e(n,{faces:r,resize:function(e){var t,i=0|e;if(i===n.width)return n;var a=n.color;for(t=0;t0&&(t.push(e,"="),t.push.apply(t,ec(arguments)),t.push(";")),e},toString:function(){return eu([r.length>0?"var "+r.join(",")+";":"",eu(t)])}})}function l(){var t=s(),r=s(),n=t.toString,i=r.toString;function a(e,n){r(e,n,"=",t.def(e,n),";")}return e(function(){t.apply(t,ec(arguments))},{def:t.def,entry:t,exit:r,save:a,set:function(e,r,n){a(e,r),t(e,r,"=",n,";")},toString:function(){return n()+i()}})}var c=s(),u={};return{global:c,link:function(e,t){var r=t&&t.stable;if(!r){for(var s=0;s>>4&15)+r.charAt(15&t);return n}(function(e){for(var t=function(e,t){var r,n,i,a,o,s,l,c,u,h,f,d,p,m,g,y,v,x,b,_,w=[0x6a09e667,-0x4498517b,0x3c6ef372,-0x5ab00ac6,0x510e527f,-0x64fa9774,0x1f83d9ab,0x5be0cd19],k=Array(64);for(e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t,v=0;v>>10,k[x-7]),eo(n=k[x-15],7)^eo(n,18)^n>>>3),k[x-16]),b=el(el(el(el(y,eo(i=p,6)^eo(i,11)^eo(i,25)),(a=p)&m^~a&g),es[x]),k[x]),_=el(eo(o=u,2)^eo(o,13)^eo(o,22),(s=u)&(l=h)^s&(c=f)^l&c),y=g,g=m,m=p,p=el(d,b),d=f,f=h,h=u,u=el(b,_)}w[0]=el(u,w[0]),w[1]=el(h,w[1]),w[2]=el(f,w[2]),w[3]=el(d,w[3]),w[4]=el(p,w[4]),w[5]=el(m,w[5]),w[6]=el(g,w[6]),w[7]=el(y,w[7])}return w}(function(e){for(var t=Array(e.length>>2),r=0;r>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}(e),8*e.length),r="",n=0;n<32*t.length;n+=8)r+=String.fromCharCode(t[n>>5]>>>24-n%32&255);return r}(function(e){for(var t,r,n="",i=-1;++i>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n}(n)))])return r[t].apply(null,a);var o=Function.apply(null,i.concat(n));return r&&(r[t]=o),o.apply(null,a)}}}({cache:v}),r=t.link,i=t.global;t.id=J++,t.batchId="0";var a=r($),o=t.shared={props:"a0"};Object.keys($).forEach(function(e){o[e]=i.def(a,".",e)});var s=t.next={},l=t.current={};Object.keys(G).forEach(function(e){Array.isArray(U[e])&&(s[e]=i.def(o.next,".",e),l[e]=i.def(o.current,".",e))});var c=t.constants={};Object.keys(K).forEach(function(e){c[e]=i.def(JSON.stringify(K[e]))}),t.invoke=function(e,n){switch(n.type){case 0:var i=["this",o.context,o.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case 1:return e.def(o.props,n.data);case 2:return e.def(o.context,n.data);case 3:return e.def("this",n.data);case 4:return n.data.append(t,e),n.data.ref;case 5:return n.data.toString();case 6:return n.data.map(function(r){return t.invoke(e,r)})}},t.attribCache={};var u={};return t.scopeAttrib=function(e){var t=n.id(e);if(t in u)return u[t];var i=d.scope[t];return i||(i=d.scope[t]=new R),u[t]=r(i)},t}function ee(e,t,r){var n=e.shared.context,i=e.scope();Object.keys(r).forEach(function(a){t.save(n,"."+a);var o=r[a].append(e,t);Array.isArray(o)?i(n,".",a,"=[",o.join(),"];"):i(n,".",a,"=",o,";")}),t(i)}function et(e,t,r,n){var i,a=e.shared,o=a.gl,s=a.framebuffer;B&&(i=t.def(a.extensions,".webgl_draw_buffers"));var l,c=e.constants,u=c.drawBuffer,h=c.backBuffer;l=r?r.append(e,t):t.def(s,".next"),n||t("if(",l,"!==",s,".cur){"),t("if(",l,"){",o,".bindFramebuffer(",36160,",",l,".framebuffer);"),B&&t(i,".drawBuffersWEBGL(",u,"[",l,".colorAttachments.length]);"),t("}else{",o,".bindFramebuffer(",36160,",null);"),B&&t(i,".drawBuffersWEBGL(",h,");"),t("}",s,".cur=",l,";"),n||t("}")}function er(e,t,r){var n=e.shared,i=n.gl,a=e.current,o=e.next,s=n.current,l=n.next,c=e.cond(s,".dirty");q.forEach(function(t){var n,u,f=W(t);if(!(f in r.state))if(f in o){n=o[f],u=a[f];var d=h(U[f].length,function(e){return c.def(n,"[",e,"]")});c(e.cond(d.map(function(e,t){return e+"!=="+u+"["+t+"]"}).join("||")).then(i,".",G[f],"(",d,");",d.map(function(e,t){return u+"["+t+"]="+e}).join(";"),";"))}else{n=c.def(l,".",f);var p=e.cond(n,"!==",s,".",f);c(p),f in H?p(e.cond(n).then(i,".enable(",H[f],");").else(i,".disable(",H[f],");"),s,".",f,"=",n,";"):p(i,".",G[f],"(",n,");",s,".",f,"=",n,";")}}),0===Object.keys(r.state).length&&c(s,".dirty=false;"),t(c)}function en(e,t,r,n){var i,a=e.shared,o=e.current,s=a.current,l=a.gl;e7(Object.keys(r)).forEach(function(a){var c=r[a];if(!(n&&!n(c))){var u=c.append(e,t);if(H[a]){var h=H[a];tt(c)?(i=e.link(u,{stable:!0}),t(e.cond(i).then(l,".enable(",h,");").else(l,".disable(",h,");")),t(s,".",a,"=",i,";")):(t(e.cond(u).then(l,".enable(",h,");").else(l,".disable(",h,");")),t(s,".",a,"=",u,";"))}else if(z(u)){var f=o[a];t(l,".",G[a],"(",u,");",u.map(function(e,t){return f+"["+t+"]="+e}).join(";"),";")}else tt(c)?(i=e.link(u,{stable:!0}),t(l,".",G[a],"(",i,");",s,".",a,"=",i,";")):t(l,".",G[a],"(",u,");",s,".",a,"=",u,";")}})}function ei(e,t){F&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function ea(e,t,r,n,i){var a,o,s,l=e.shared,c=e.stats,u=l.current,h=l.timer,f=r.profile;function d(){return typeof performance>"u"?"Date.now()":"performance.now()"}function p(e){e(a=t.def(),"=",d(),";"),"string"==typeof i?e(c,".count+=",i,";"):e(c,".count++;"),y&&(n?e(o=t.def(),"=",h,".getNumPendingQueries();"):e(h,".beginQuery(",c,");"))}function m(e){e(c,".cpuTime+=",d(),"-",a,";"),y&&(n?e(h,".pushScopeStats(",o,",",h,".getNumPendingQueries(),",c,");"):e(h,".endQuery();"))}function g(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(f){if(tt(f))return void(f.enable?(p(t),m(t.exit),g("true")):g("false"));g(s=f.append(e,t))}else s=t.def(u,".profile");var v=e.block();p(v),t("if(",s,"){",v,"}");var x=e.block();m(x),t.exit("if(",s,"){",x,"}")}function eX(e,t,r,n,i){var a=e.shared;n.forEach(function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(e,t)}else{if(!i(ti))return;var c=e.scopeAttrib(s);o={},Object.keys(new R).forEach(function(e){o[e]=t.def(c,".",e)})}!function(r,n,i){var o=a.gl,s=t.def(r,".location"),l=t.def(a.attributes,"[",s,"]"),c=i.state,u=i.buffer,h=[i.x,i.y,i.z,i.w],f=["buffer","normalized","offset","stride"];function d(){t("if(!",l,".buffer){",o,".enableVertexAttribArray(",s,");}");var r,a=i.type;if(r=i.size?t.def(i.size,"||",n):n,t("if(",l,".type!==",a,"||",l,".size!==",r,"||",f.map(function(e){return l+"."+e+"!=="+i[e]}).join("||"),"){",o,".bindBuffer(",34962,",",u,".buffer);",o,".vertexAttribPointer(",[s,r,a,i.normalized,i.stride,i.offset],");",l,".type=",a,";",l,".size=",r,";",f.map(function(e){return l+"."+e+"="+i[e]+";"}).join(""),"}"),F){var c=i.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function p(){t("if(",l,".buffer){",o,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",eh.map(function(e,t){return l+"."+e+"!=="+h[t]}).join("||"),"){",o,".vertexAttrib4f(",s,",",h,");",eh.map(function(e,t){return l+"."+e+"="+h[t]+";"}).join(""),"}")}1===c?d():2===c?p():(t("if(",c,"===",1,"){"),d(),t("}else{"),p(),t("}"))}(e.link(n),function(e){switch(e){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)})}function eZ(e,t,r,i,a,o){for(var s,l=e.shared,c=l.gl,u=0;u1){for(var M=[],S=[],E=0;E>1)",u],");")}function t(){r(h,".drawArraysInstancedANGLE(",[v,x,b,u],");")}g&&"null"!==g?w?e():(r("if(",g,"){"),e(),r("}else{"),t(),r("}")):t()}function T(){function e(){r(d+".drawElements("+[v,b,_,x+"<<(("+_+"-5121)>>1)"]+");")}function t(){r(d+".drawArrays("+[v,x,b]+");")}g&&"null"!==g?w?e():(r("if(",g,"){"),e(),r("}else{"),t(),r("}")):t()}F&&("number"!=typeof u||u>=0)?"string"==typeof u?(r("if(",u,">0){"),k(),r("}else if(",u,"<0){"),T(),r("}")):k():T()}function ta(e,t,r,n,i){var a=Q(),o=a.proc("body",i);return F&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),e(a,o,r,n),a.compile().body}function to(e,t,r,n){ei(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),eX(e,t,r,n.attributes,function(){return!0})),eZ(e,t,r,n.uniforms,function(){return!0},!1),e0(e,t,t,r)}function ts(e,t,r,n){function i(){return!0}e.batchId="a1",ei(e,t),eX(e,t,r,n.attributes,i),eZ(e,t,r,n.uniforms,i,!1),e0(e,t,t,r)}function tl(e,t,r,n){ei(e,t);var i=r.contextDep,a=t.def(),o=t.def();e.shared.props=o,e.batchId=a;var s=e.scope(),l=e.scope();function c(e){return e.contextDep&&i||e.propDep}function u(e){return!c(e)}if(t(s.entry,"for(",a,"=0;",a,"<","a1",";++",a,"){",o,"=","a0","[",a,"];",l,"}",s.exit),r.needsContext&&ee(e,l,r.context),r.needsFramebuffer&&et(e,l,r.framebuffer),en(e,l,r.state,c),r.profile&&c(r.profile)&&ea(e,l,r,!1,!0),n)r.useVAO?r.drawVAO?c(r.drawVAO)?l(e.shared.vao,".setVAO(",r.drawVAO.append(e,l),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),eX(e,s,r,n.attributes,u),eX(e,l,r,n.attributes,c)),eZ(e,s,r,n.uniforms,u,!1),eZ(e,l,r,n.uniforms,c,!0),e0(e,s,l,r);else{var h=e.global.def("{}"),f=r.shader.progVar.append(e,l),d=l.def(f,".id"),p=l.def(h,"[",d,"]");l(e.shared.gl,".useProgram(",f,".program);","if(!",p,"){",p,"=",h,"[",d,"]=",e.link(function(t){return ta(ts,e,r,t,2)}),"(",f,");}",p,".call(this,a0[",a,"],",a,");")}}function tc(e,t,n){var i=t.static[n];if(i&&function(e){if(!("object"!=typeof e||z(e))){for(var t=Object.keys(e),r=0;r0)return null;var n=t.static,i=Object.keys(n);if(i.length>0&&"number"==typeof n[i[0]]){for(var a=[],o=0;o0,D={framebuffer:M,draw:E,shader:I,state:L,dirty:O,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(D.profile=function(e){var t,r=e.static,n=e.dynamic;if(eB in r){var i=!!r[eB];(t=tr(function(e,t){return i})).enable=i}else if(eB in n){var a=n[eB];t=tn(a,function(e,t){return e.invoke(t,a)})}return t}(e),m=r.static,g=r.dynamic,y={},Object.keys(m).forEach(function(e){var t,r=m[e];if("number"==typeof r||"boolean"==typeof r)t=tr(function(){return r});else if("function"==typeof r){var n=r._reglType;"texture2d"===n||"textureCube"===n?t=tr(function(e){return e.link(r)}):("framebuffer"===n||"framebufferCube"===n)&&(t=tr(function(e){return e.link(r.color[0])}))}else z(r)&&(t=tr(function(e){return e.global.def("[",h(r.length,function(e){return r[e]}),"]")}));t.value=r,y[e]=t}),Object.keys(g).forEach(function(e){var t=g[e];y[e]=tn(t,function(e,r){return e.invoke(r,t)})}),D.uniforms=y,D.drawVAO=D.scopeVAO=E.vao,!D.drawVAO&&I.program&&!A&&i.angle_instanced_arrays&&E.static.elements){var F=!0,B=I.program.attributes.map(function(e){var r=t.static[e];return F=F&&!!r,r});if(F&&B.length>0){var N=d.getVAO(d.createVAO({attributes:B,elements:E.static.elements}));D.drawVAO=new te(null,null,null,function(e,t){return e.link(N)}),D.useVAO=!0}}return A?D.useVAO=!0:(v=t.static,x=t.dynamic,b={},Object.keys(v).forEach(function(e){var t=v[e],r=n.id(e),i=new R;if(e9(t))i.state=1,i.buffer=l.getBuffer(l.create(t,34962,!1,!0)),i.type=0;else{var a=l.getBuffer(t);if(a)i.state=1,i.buffer=a,i.type=0;else if("constant"in t){var o=t.constant;i.buffer="null",i.state=2,"number"==typeof o?i.x=o:eh.forEach(function(e,t){t"+t+"?"+n+".constant["+t+"]:0;"}).join(""),"}}else{","if(",o,"(",n,".buffer)){",u,"=",s,".createStream(",34962,",",n,".buffer);","}else{",u,"=",s,".getBuffer(",n,".buffer);","}",h,'="type" in ',n,"?",a.glTypes,"[",n,".type]:",u,".dtype;",l.normalized,"=!!",n,".normalized;"),f("size"),f("offset"),f("stride"),f("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l})}),D.attributes=b),_=a.static,w=a.dynamic,T={},Object.keys(_).forEach(function(e){var t=_[e];T[e]=tr(function(e,r){return"number"==typeof t||"boolean"==typeof t?""+t:e.link(t)})}),Object.keys(w).forEach(function(e){var t=w[e];T[e]=tn(t,function(e,r){return e.invoke(r,t)})}),D.context=T,D}(t,r,a,o);return m.shader.program&&(m.shader.program.attributes.sort(function(e,t){return e.name0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(f,m),function(e,t){var r=e.proc("scope",3);e.batchId="a2";var i=e.shared,a=i.current;if(ee(e,r,t.context),t.framebuffer&&t.framebuffer.append(e,r),e7(Object.keys(t.state)).forEach(function(n){var a=t.state[n],o=a.append(e,r);z(o)?o.forEach(function(t,i){Z(t)?r.set(e.next[n],"["+i+"]",t):r.set(e.next[n],"["+i+"]",e.link(t,{stable:!0}))}):tt(a)?r.set(i.next,"."+n,e.link(o,{stable:!0})):r.set(i.next,"."+n,o)}),ea(e,r,t,!0,!0),[eq,eW,eG,eY,eH].forEach(function(n){var a=t.draw[n];if(a){var o=a.append(e,r);Z(o)?r.set(i.draw,"."+n,o):r.set(i.draw,"."+n,e.link(o),{stable:!0})}}),Object.keys(t.uniforms).forEach(function(a){var o=t.uniforms[a].append(e,r);Array.isArray(o)&&(o="["+o.map(function(t){return Z(t)?t:e.link(t,{stable:!0})})+"]"),r.set(i.uniforms,"["+e.link(n.id(a),{stable:!0})+"]",o)}),Object.keys(t.attributes).forEach(function(n){var i=t.attributes[n].append(e,r),a=e.scopeAttrib(n);Object.keys(new R).forEach(function(e){r.set(a,"."+e,i[e])})}),t.scopeVAO){var o=t.scopeVAO.append(e,r);Z(o)?r.set(i.vao,".targetVAO",o):r.set(i.vao,".targetVAO",e.link(o,{stable:!0}))}function s(n){var a=t.shader[n];if(a){var o=a.append(e,r);Z(o)?r.set(i.shader,"."+n,o):r.set(i.shader,"."+n,e.link(o,{stable:!0}))}}s(eU),s(eV),Object.keys(t.state).length>0&&(r(a,".dirty=true;"),r.exit(a,".dirty=true;")),r("a1(",e.shared.context,",a0,",e.batchId,");")}(f,m),function(e,t){var r=e.proc("batch",2);e.batchId="0",ei(e,r);var n=!1,i=!0;Object.keys(t.context).forEach(function(e){n=n||t.context[e].propDep}),n||(ee(e,r,t.context),i=!1);var a=t.framebuffer,o=!1;function s(e){return e.contextDep&&n||e.propDep}a?(a.propDep?n=o=!0:a.contextDep&&n&&(o=!0),o||et(e,r,a)):et(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(n=!0),er(e,r,t),en(e,r,t.state,function(e){return!s(e)}),t.profile&&s(t.profile)||ea(e,r,t,!1,"a1"),t.contextDep=n,t.needsContext=i,t.needsFramebuffer=o;var l=t.shader.progVar;if(l.contextDep&&n||l.propDep)tl(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)tl(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),h=r.def(c,".id"),f=r.def(u,"[",h,"]");r(e.cond(f).then(f,".call(this,a0,a1);").else(f,"=",u,"[",h,"]=",e.link(function(r){return ta(tl,e,t,r,2)}),"(",c,");",f,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(f,m),e(f.compile(),{destroy:function(){m.shader.program.destroy()}})}}}(_,I,G,tu,th,tf,ty,{},td,tp,tc,e0,W,H,d),tx=function(e,t,r,n){function i(i){var a=null===t.next?5121:t.next.colorAttachments[0].texture._texture.type,o=0,s=0,l=n.framebufferWidth,c=n.framebufferHeight,u=null;g(i)?u=i:i&&(o=0|i.x,s=0|i.y,l=0|(i.width||n.framebufferWidth-o),c=0|(i.height||n.framebufferHeight-s),u=i.data||null),r();var h=l*c*4;return u||(5121===a?u=new Uint8Array(h):5126===a&&(u=u||new Float32Array(h))),e.pixelStorei(3333,4),e.readPixels(o,s,l,c,6408,a,u),u}return function(e){var r;return e&&"framebuffer"in e?(t.setFBO({framebuffer:e.framebuffer},function(){r=i(e)}),r):i(e)}}(_,ty,tv.procs.poll,e0),tb=tv.next,t_=_.canvas,tw=[],tk=[],tT=[],tA=[d.onDestroy],tM=null;function tS(){if(0===tw.length){W&&W.update(),tM=null;return}tM=s.next(tS),tj();for(var e=tw.length-1;e>=0;--e){var t=tw[e];t&&t(e0,null,0)}_.flush(),W&&W.update()}function tE(){!tM&&tw.length>0&&(tM=s.next(tS))}function tC(){tM&&(s.cancel(tS),tM=null)}function tL(e){e.preventDefault(),tC(),tk.forEach(function(e){e()})}function tI(e){_.getError(),L.restore(),tp.restore(),th.restore(),tm.restore(),tg.restore(),ty.restore(),td.restore(),W&&W.restore(),tv.procs.refresh(),tE(),tT.forEach(function(e){e()})}function tP(t){function r(e,t){var r={},n={};return Object.keys(e).forEach(function(i){var s=e[i];if(a(s)){n[i]=o(s,i);return}if(t&&Array.isArray(s)){for(var l=0;l0)return f.call(this,function(e){for(;p.length=0},read:tx,destroy:function(){tw.length=0,tC(),t_&&(t_.removeEventListener(to,tL),t_.removeEventListener(ts,tI)),tp.clear(),ty.clear(),tg.clear(),td.clear(),tm.clear(),tf.clear(),th.clear(),W&&W.clear(),tA.forEach(function(e){e()})},_gl:_,_refresh:tF,poll:function(){tj(),W&&W.update()},now:tB,stats:j,getCachedCode:function(){return H},preloadCachedCode:function(e){Object.entries(e).forEach(function(e){H[e[0]]=e[1]})}});return d.onDone(null,tN),tN}},"object"==typeof e&&"u">typeof t?t.exports=r():e.createREGL=r()}}),yg=d({"node_modules/gl-util/context.js"(e,t){var r=m_();function n(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function i(e){return"function"==typeof e.getContext&&"width"in e&&"height"in e}function a(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}t.exports=function(e){if(e?"string"==typeof e&&(e={container:e}):e={},(e=i(e)||"string"==typeof(t=e).nodeName&&"function"==typeof t.appendChild&&"function"==typeof t.getBoundingClientRect?{container:e}:"function"==typeof(o=e).drawArrays||"function"==typeof o.drawElements?{gl:e}:r(e,{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)).pixelRatio||(e.pixelRatio=window.pixelRatio||1),e.gl)return e.gl;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"==typeof e.container){var t,o,s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}i(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=a(),e.container.appendChild(e.canvas),n(e))}else if(!e.canvas)if("u">typeof document)e.container=document.body||document.documentElement,e.canvas=a(),e.container.appendChild(e.canvas),n(e);else throw Error("Not DOM environment. Use headless-gl.");return e.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(t){try{e.gl=e.canvas.getContext(t,e.attrs)}catch{}return e.gl}),e.gl}}}),yy=d({"node_modules/font-atlas/index.js"(e,t){var r=yd(),n=[32,126];t.exports=function(e){var t=(e=e||{}).shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],i=e.canvas||document.createElement("canvas"),a=e.font,o="number"==typeof e.step?[e.step,e.step]:e.step||[32,32],s=e.chars||n;if(a&&"string"!=typeof a&&(a=r(a)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");i.width=(t=t.slice())[0],i.height=t[1];var h=i.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,i.width,i.height),h.font=a,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";for(var f=o[0]/2,d=o[1]/2,c=0;ct[0]-o[0]/2&&(f=o[0]/2,d+=o[1]);return i}}}),yv=d({"node_modules/bit-twiddle/twiddle.js"(e){function t(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),0xff00ff&e&&(t-=8),0xf0f0f0f&e&&(t-=4),0x33333333&e&&(t-=2),0x55555555&e&&(t-=1),t}e.INT_BITS=32,e.INT_MAX=0x7fffffff,e.INT_MIN=-0x80000000,e.sign=function(e){return(e>0)-(e<0)},e.abs=function(e){var t=e>>31;return(e^t)-t},e.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},e.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},e.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},e.countTrailingZeros=t,e.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},e.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},e.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var r=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,i=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=1&r,--i;e[t]=n<>>8&255]<<16|r[e>>>16&255]<<8|r[e>>>24&255]},e.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},e.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},e.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},e.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},e.nextCombination=function(e){var r=e|e-1;return r+1|(~r&-~r)-1>>>t(e)+1}}}),yx=d({"node_modules/dup/dup.js"(e,t){t.exports=function(e,t){switch(typeof t>"u"&&(t=0),typeof e){case"number":if(e>0){var r,n,i=0|e,a=t;for(r=Array(i),n=0;ntypeof Uint8ClampedArray,a="u">typeof BigUint64Array,o="u">typeof BigInt64Array,s=window.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=r([32,0])),s.BIGUINT64||(s.BIGUINT64=r([32,0])),s.BIGINT64||(s.BIGINT64=r([32,0])),s.BUFFER||(s.BUFFER=r([32,0]));var l=s.DATA,c=s.BUFFER;function u(e){if(e){var r=e.length||e.byteLength;l[t.log2(r)].push(e)}}function h(e){var e=t.nextPow2(e),r=l[t.log2(e)];return r.length>0?r.pop():new ArrayBuffer(e)}function f(e){return new Uint8Array(h(e),0,e)}function d(e){return new Uint16Array(h(2*e),0,e)}function p(e){return new Uint32Array(h(4*e),0,e)}function m(e){return new Int8Array(h(e),0,e)}function g(e){return new Int16Array(h(2*e),0,e)}function y(e){return new Int32Array(h(4*e),0,e)}function v(e){return new Float32Array(h(4*e),0,e)}function x(e){return new Float64Array(h(8*e),0,e)}function b(e){return i?new Uint8ClampedArray(h(e),0,e):f(e)}function _(e){return a?new BigUint64Array(h(8*e),0,e):null}function w(e){return o?new BigInt64Array(h(8*e),0,e):null}function k(e){return new DataView(h(e),0,e)}function T(e){e=t.nextPow2(e);var r=c[t.log2(e)];return r.length>0?r.pop():new n(e)}e.free=function(e){if(n.isBuffer(e))c[t.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var r=e.length||e.byteLength;l[0|t.log2(r)].push(e)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(e){u(e.buffer)},e.freeArrayBuffer=u,e.freeBuffer=function(e){c[t.log2(e.length)].push(e)},e.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return h(e);switch(t){case"uint8":return f(e);case"uint16":return d(e);case"uint32":return p(e);case"int8":return m(e);case"int16":return g(e);case"int32":return y(e);case"float":case"float32":return v(e);case"double":case"float64":return x(e);case"uint8_clamped":return b(e);case"bigint64":return w(e);case"biguint64":return _(e);case"buffer":return T(e);case"data":case"dataview":return k(e);default:return null}},e.mallocArrayBuffer=h,e.mallocUint8=f,e.mallocUint16=d,e.mallocUint32=p,e.mallocInt8=m,e.mallocInt16=g,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=v,e.mallocFloat64=e.mallocDouble=x,e.mallocUint8Clamped=b,e.mallocBigUint64=_,e.mallocBigInt64=w,e.mallocDataView=k,e.mallocBuffer=T,e.clearCache=function(){for(var e=0;e<32;++e)s.UINT8[e].length=0,s.UINT16[e].length=0,s.UINT32[e].length=0,s.INT8[e].length=0,s.INT16[e].length=0,s.INT32[e].length=0,s.FLOAT[e].length=0,s.DOUBLE[e].length=0,s.BIGUINT64[e].length=0,s.BIGINT64[e].length=0,s.UINT8C[e].length=0,l[e].length=0,c[e].length=0}}}),y_=d({"node_modules/is-plain-obj/index.js"(e,t){var r=Object.prototype.toString;t.exports=function(e){var t;return"[object Object]"===r.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}}}),yw=d({"node_modules/parse-unit/index.js"(e,t){t.exports=function(e,t){t||(t=[0,""]);var r=parseFloat(e=String(e),10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}}}),yk=d({"node_modules/to-px/topx.js"(e,t){var r=yw();function n(e,t){var n=r(getComputedStyle(e).getPropertyValue(t));return n[0]*i(n[1],e)}function i(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":var r,i,a,o;return r=e,i=t,(a=document.createElement("div")).style["font-size"]="128"+r,i.appendChild(a),o=n(a,"font-size")/128,i.removeChild(a),o;case"em":return n(t,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}t.exports=i}}),yT=d({"node_modules/detect-kerning/index.js"(e,t){t.exports=i;var r=(i.canvas=document.createElement("canvas")).getContext("2d"),n=a([32,126]);function i(e,t){Array.isArray(e)&&(e=e.join(", "));var i,o={},s=16,l=.05;t&&(2===t.length&&"number"==typeof t[0]?i=a(t):Array.isArray(t)?i=t:(t.o?i=a(t.o):t.pairs&&(i=t.pairs),t.fontSize&&(s=t.fontSize),null!=t.threshold&&(l=t.threshold))),i||(i=n),r.font=s+"px "+e;for(var c=0;cs*l){var d=(f-h)/s;o[u]=1e3*d}}return o}function a(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),i=e[0];i0;n-=4)if(0!==r[n])return Math.floor((n-3)*.25/t)}t.exports=r,r.canvas=document.createElement("canvas"),r.cache={}}}),yM=d({"node_modules/gl-text/dist.js"(e,t){var r=yp(),n=m_(),i=ym(),a=yg(),o=g9(),s=dF(),l=yy(),c=yb(),u=mw(),h=y_(),f=yw(),d=yk(),p=yT(),m=mW(),g=yA(),y=mA(),v=yv().nextPow2,x=new o,b=!1;document.body&&((_=document.body.appendChild(document.createElement("div"))).style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(_).fontStretch&&(b=!0),document.body.removeChild(_));var _,w=function(e){var t;"function"==typeof(t=e)&&t._gl&&t.prop&&t.texture&&t.buffer?(e={regl:e},this.gl=e.regl._gl):this.gl=a(e),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||i({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(e)?e:{})};w.prototype.createShader=function(){var e=this.regl,t=e({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.this("viewport"),vert:` - precision highp float; - attribute float width, charOffset, char; - attribute vec2 position; - uniform float fontSize, charStep, em, align, baseline; - uniform vec4 viewport; - uniform vec4 color; - uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; - varying vec2 charCoord, charId; - varying float charWidth; - varying vec4 fontColor; - void main () { - vec2 offset = floor(em * (vec2(align + charOffset, baseline) - + vec2(positionOffset.x, -positionOffset.y))) - / (viewport.zw * scale.xy); - - vec2 position = (position + translate) * scale; - position += offset * scale; - - charCoord = position * viewport.zw + viewport.xy; - - gl_Position = vec4(position * 2. - 1., 0, 1); - - gl_PointSize = charStep; - - charId.x = mod(char, atlasDim.x); - charId.y = floor(char / atlasDim.x); - - charWidth = width * em; - - fontColor = color / 255.; - }`,frag:` - precision highp float; - uniform float fontSize, charStep, opacity; - uniform vec2 atlasSize; - uniform vec4 viewport; - uniform sampler2D atlas; - varying vec4 fontColor; - varying vec2 charCoord, charId; - varying float charWidth; - - float lightness(vec4 color) { - return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; - } - - void main () { - vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; - float halfCharStep = floor(charStep * .5 + .5); - - // invert y and shift by 1px (FF expecially needs that) - uv.y = charStep - uv.y; - - // ignore points outside of character bounding box - float halfCharWidth = ceil(charWidth * .5); - if (floor(uv.x) > halfCharStep + halfCharWidth || - floor(uv.x) < halfCharStep - halfCharWidth) return; - - uv += charId * charStep; - uv = uv / atlasSize; - - vec4 color = fontColor; - vec4 mask = texture2D(atlas, uv); - - float maskY = lightness(mask); - // float colorY = lightness(color); - color.a *= maskY; - color.a *= opacity; - - // color.a += .1; - - // antialiasing, see yiq color space y-channel formula - // color.rgb += (1. - color.rgb) * (1. - mask.rgb); - - gl_FragColor = color; - }`});return{regl:e,draw:t,atlas:{}}},w.prototype.update=function(e){var t,i,a=this;if("string"==typeof e)e={text:e};else if(!e)return;null!=(e=n(e,{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(e.opacity)?this.opacity=e.opacity.map(function(e){return parseFloat(e)}):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=u(e.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"==typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=w.baseFontSize+"px sans-serif");var o=!1,h=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach(function(e,t){if("string"==typeof e)try{e=r.parse(e)}catch{e=r.parse(w.baseFontSize+"px "+e)}else{var n=e.style,i=e.weight,s=e.stretch,l=e.variant;e=r.parse(r.stringify(e)),n&&(e.style=n),i&&(e.weight=i),s&&(e.stretch=s),l&&(e.variant=l)}var c=r.stringify({size:w.baseFontSize,family:e.family,stretch:b?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),u=f(e.size),p=Math.round(u[0]*d(u[1]));if(p!==a.fontSize[t]&&(h=!0,a.fontSize[t]=p),(!a.font[t]||c!=a.font[t].baseString)&&(o=!0,a.font[t]=w.fonts[c],!a.font[t])){var m=e.family.join(", "),y=[e.style];e.style!=e.variant&&y.push(e.variant),e.variant!=e.weight&&y.push(e.weight),b&&e.weight!=e.stretch&&y.push(e.stretch),a.font[t]={baseString:c,family:m,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:g(m,{origin:"top",fontSize:w.baseFontSize,fontStyle:y.join(" ")})},w.fonts[c]=a.font[t]}}),(o||h)&&this.font.forEach(function(t,n){var i=r.stringify({size:a.fontSize[n],family:t.family,stretch:b?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style});if(a.fontAtlas[n]=a.shader.atlas[i],!a.fontAtlas[n]){var o=t.metrics;a.shader.atlas[i]=a.fontAtlas[n]={fontString:i,step:2*Math.ceil(a.fontSize[n]*o.bottom*.5),em:a.fontSize[n],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:a.regl.texture()}}null==e.text&&(e.text=a.text)}),"string"==typeof e.text&&e.position&&e.position.length>2){for(var x=Array(.5*e.position.length),_=0;_2){for(var T=!e.position[0].length,A=c.mallocFloat(2*this.count),M=0,S=0;M1?a.align[t]:a.align[0]:a.align;if("number"==typeof r)return r;switch(r){case"right":case"end":return-e;case"center":case"centre":case"middle":return-(.5*e)}return 0})),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(e,t){var r,n=(a.font[t]||a.font[0]).metrics;return r=0+.5*n.bottom,"number"==typeof e?r+=e-n.baseline:r+=-n[e],r*=-1})),null!=e.color)if(e.color||(e.color="transparent"),"string"!=typeof e.color&&isNaN(e.color)){if("number"==typeof e.color[0]&&e.color.length>this.counts.length){var G=e.color.length;i=c.mallocUint8(G);for(var W=(e.color.subarray||e.color.slice).bind(e.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var $=Math.max(.5*this.position.length||0,.25*this.color.length||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,.5*this.positionOffset.length||0);this.batch=Array($);for(var 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=[]},w.prototype.destroy=function(){},w.prototype.kerning=!0,w.prototype.position={constant:new Float32Array(2)},w.prototype.translate=null,w.prototype.scale=null,w.prototype.font=null,w.prototype.text="",w.prototype.positionOffset=[0,0],w.prototype.opacity=1,w.prototype.color=new Uint8Array([0,0,0,255]),w.prototype.alignOffset=[0,0],w.maxAtlasSize=1024,w.atlasCanvas=document.createElement("canvas"),w.atlasContext=w.atlasCanvas.getContext("2d",{alpha:!1}),w.baseFontSize=64,w.fonts={},t.exports=w}}),yS=d({"node_modules/@plotly/regl/dist/regl.unchecked.js"(e,t){var r;r=function(){var e=function(e,t){for(var r=Object.keys(t),n=0;n1&&r===i&&('"'===r||"'"===r))return['"'+n(t.substr(1,t.length-2))+'"'];var a=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(a)return e(t.substr(0,a.index)).concat(e(a[1])).concat(e(t.substr(a.index+a[0].length)));var o=t.split(".");if(1===o.length)return['"'+n(t)+'"'];for(var s=[],l=0;ltypeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date};function c(e){return"string"==typeof e?e.split():e}function u(e){return"string"==typeof e?document.querySelector(e):e}function h(e,t){for(var r=Array(e),n=0;n65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1}function d(){var e=h(8,function(){return[]});function t(t){var r=function(e){for(var t=16;t<=0x10000000;t*=16)if(e<=t)return t;return 0}(t),n=e[f(r)>>2];return n.length>0?n.pop():new ArrayBuffer(r)}function r(t){e[f(t.byteLength)>>2].push(t)}return{alloc:t,free:r,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(e){r(e.buffer)}}}var p=d();p.zero=d();var m=function(e,t){var r=1;t.ext_texture_filter_anisotropic&&(r=e.getParameter(34047));var n=1,i=1;t.webgl_draw_buffers&&(n=e.getParameter(34852),i=e.getParameter(36063));var a=!!t.oes_texture_float;if(a){var o=e.createTexture();e.bindTexture(3553,o),e.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var s=e.createFramebuffer();if(e.bindFramebuffer(36160,s),e.framebufferTexture2D(36160,36064,3553,o,0),e.bindTexture(3553,null),36053!==e.checkFramebufferStatus(36160))a=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(16384);var l=p.allocType(5126,4);e.readPixels(0,0,1,1,6408,5126,l),e.getError()?a=!1:(e.deleteFramebuffer(s),e.deleteTexture(o),a=1===l[0]),p.freeType(l)}}var c="u">typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),u=!0;if(!c){var h=e.createTexture(),f=p.allocType(5121,36);e.activeTexture(33984),e.bindTexture(34067,h),e.texImage2D(34069,0,6408,3,3,0,6408,5121,f),p.freeType(f),e.bindTexture(34067,null),e.deleteTexture(h),u=!e.getError()}return{colorBits:[e.getParameter(3410),e.getParameter(3411),e.getParameter(3412),e.getParameter(3413)],depthBits:e.getParameter(3414),stencilBits:e.getParameter(3415),subpixelBits:e.getParameter(3408),extensions:Object.keys(t).filter(function(e){return!!t[e]}),maxAnisotropic:r,maxDrawbuffers:n,maxColorAttachments:i,pointSizeDims:e.getParameter(33901),lineWidthDims:e.getParameter(33902),maxViewportDims:e.getParameter(3386),maxCombinedTextureUnits:e.getParameter(35661),maxCubeMapSize:e.getParameter(34076),maxRenderbufferSize:e.getParameter(34024),maxTextureUnits:e.getParameter(34930),maxTextureSize:e.getParameter(3379),maxAttributes:e.getParameter(34921),maxVertexUniforms:e.getParameter(36347),maxVertexTextureUnits:e.getParameter(35660),maxVaryingVectors:e.getParameter(36348),maxFragmentUniforms:e.getParameter(36349),glsl:e.getParameter(35724),renderer:e.getParameter(7937),vendor:e.getParameter(7936),version:e.getParameter(7938),readFloat:a,npotTextureCube:u}},g=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray};function y(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||g(e.data))}var v=function(e){return Object.keys(e).map(function(t){return e[t]})},x=function(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t},b=function(e,t,r,n){var i=1;if(t.length)for(var a=0;a>>31<<15,a=(n<<1>>>24)-127,o=n>>13&1023;if(a<-24)t[r]=i;else if(a<-14){var s=-14-a;t[r]=i+(o+1024>>s)}else a>15?t[r]=i+31744:t[r]=i+(a+15<<10)+o}return t}function z(e){return Array.isArray(e)||g(e)}var O=[9984,9986,9985,9987],D=[0,6409,6410,6407,6408],R={};function j(e){return"[object "+e+"]"}R[6409]=R[6406]=R[6402]=1,R[34041]=R[6410]=2,R[6407]=R[35904]=3,R[6408]=R[35906]=4;var F=j("HTMLCanvasElement"),B=j("OffscreenCanvas"),N=j("CanvasRenderingContext2D"),U=j("ImageBitmap"),V=j("HTMLImageElement"),q=j("HTMLVideoElement"),H=Object.keys(w).concat([F,B,N,U,V,q]),G=[];G[5121]=1,G[5126]=4,G[36193]=2,G[5123]=2,G[5125]=4;var W=[];function Y(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function X(e){return!!Array.isArray(e)&&!(0===e.length||!z(e[0]))}function Z(e){return Object.prototype.toString.call(e)}function $(e){if(!e)return!1;var t=Z(e);return H.indexOf(t)>=0||Y(e)||X(e)||y(e)}function K(e){return 0|w[Object.prototype.toString.call(e)]}function J(e,t){return p.allocType(36193===e.type?5126:e.type,t)}function Q(e,t){36193===e.type?(e.data=P(t),p.freeType(t)):e.data=t}function ee(e,t,r,n,i,a){var o;if(o="u">typeof W[e]?W[e]:R[e]*G[t],a&&(o*=6),!i)return o*r*n;for(var s=0,l=r;l>=1;)s+=o*l*l,l/=2;return s}W[32854]=2,W[32855]=2,W[36194]=2,W[34041]=4,W[33776]=.5,W[33777]=.5,W[33778]=1,W[33779]=1,W[35986]=.5,W[35987]=1,W[34798]=1,W[35840]=.5,W[35841]=.25,W[35842]=.5,W[35843]=.25,W[36196]=.5;var et=[];et[32854]=2,et[32855]=2,et[36194]=2,et[33189]=2,et[36168]=1,et[34041]=4,et[35907]=4,et[34836]=16,et[34842]=8,et[34843]=6;var er=function(e,t,r,n,i){var a={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};t.ext_srgb&&(a.srgba=35907),t.ext_color_buffer_half_float&&(a.rgba16f=34842,a.rgb16f=34843),t.webgl_color_buffer_float&&(a.rgba32f=34836);var o=[];Object.keys(a).forEach(function(e){o[a[e]]=e});var s=0,l={};function c(e){this.id=s++,this.refCount=1,this.renderbuffer=e,this.format=32854,this.width=0,this.height=0,i.profile&&(this.stats={size:0})}function u(t){var r=t.renderbuffer;e.bindRenderbuffer(36161,null),e.deleteRenderbuffer(r),t.renderbuffer=null,t.refCount=0,delete l[t.id],n.renderbufferCount--}return c.prototype.decRef=function(){--this.refCount<=0&&u(this)},i.profile&&(n.getTotalRenderbufferSize=function(){var e=0;return Object.keys(l).forEach(function(t){e+=l[t].stats.size}),e}),{create:function(t,r){var s=new c(e.createRenderbuffer());function u(t,r){var n,l,c,h=0,f=0,d=32854;if("object"==typeof t&&t){if("shape"in t){var p=t.shape;h=0|p[0],f=0|p[1]}else"radius"in t&&(h=f=0|t.radius),"width"in t&&(h=0|t.width),"height"in t&&(f=0|t.height);"format"in t&&(d=a[t.format])}else"number"==typeof t?(h=0|t,f="number"==typeof r?0|r:h):t||(h=f=1);if(h!==s.width||f!==s.height||d!==s.format)return u.width=s.width=h,u.height=s.height=f,s.format=d,e.bindRenderbuffer(36161,s.renderbuffer),e.renderbufferStorage(36161,d,h,f),i.profile&&(s.stats.size=(n=s.format,l=s.width,c=s.height,et[n]*l*c)),u.format=o[s.format],u}return l[s.id]=s,n.renderbufferCount++,u(t,r),u.resize=function(t,r){var n,a,o,l=0|t,c=0|r||l;return l===s.width&&c===s.height||(u.width=s.width=l,u.height=s.height=c,e.bindRenderbuffer(36161,s.renderbuffer),e.renderbufferStorage(36161,s.format,l,c),i.profile&&(s.stats.size=(n=s.format,a=s.width,o=s.height,et[n]*a*o))),u},u._reglType="renderbuffer",u._renderbuffer=s,i.profile&&(u.stats=s.stats),u.destroy=function(){s.decRef()},u},clear:function(){v(l).forEach(u)},restore:function(){v(l).forEach(function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)}),e.bindRenderbuffer(36161,null)}}},en=[];en[6408]=4,en[6407]=3;var ei=[];function ea(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.offset=0,this.stride=0,this.divisor=0}function eo(e,t){return e>>>t|e<<32-t}ei[5121]=1,ei[5126]=4,ei[36193]=2;var es=[0x428a2f98,0x71374491,-0x4a3f0431,-0x164a245b,0x3956c25b,0x59f111f1,-0x6dc07d5c,-0x54e3a12b,-0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,-0x7f214e02,-0x6423f959,-0x3e640e8c,-0x1b64963f,-0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,-0x67c1aeae,-0x57ce3993,-0x4ffcd838,-0x40a68039,-0x391ff40d,-0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,-0x7e3d36d2,-0x6d8dd37b,-0x5d40175f,-0x57e599b5,-0x3db47490,-0x3893ae5d,-0x2e6d17e7,-0x2966f9dc,-0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,-0x7b3787ec,-0x7338fdf8,-0x6f410006,-0x5baf9315,-0x41065c09,-0x398e870e];function el(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ec(e){return Array.prototype.slice.call(e)}function eu(e){return ec(e).join("")}var eh="xyzw".split(""),ef="dither",ed="blend.enable",ep="blend.color",em="blend.equation",eg="blend.func",ey="depth.enable",ev="depth.func",ex="depth.range",eb="depth.mask",e_="colorMask",ew="cull.enable",ek="cull.face",eT="frontFace",eA="lineWidth",eM="polygonOffset.enable",eS="polygonOffset.offset",eE="sample.alpha",eC="sample.enable",eL="sample.coverage",eI="stencil.enable",eP="stencil.mask",ez="stencil.func",eO="stencil.opFront",eD="stencil.opBack",eR="scissor.enable",ej="scissor.box",eF="viewport",eB="profile",eN="framebuffer",eU="vert",eV="frag",eq="elements",eH="primitive",eG="count",eW="offset",eY="instances",eX="Width",eZ="Height",e$=eN+eX,eK=eN+eZ,eJ=eF+eX,eQ=eF+eZ,e0="drawingBuffer",e1=e0+eX,e2=e0+eZ,e3=[eg,em,ez,eO,eD,eL,eF,ej,eS],e5={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},e4={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},e6={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},e8={cw:2304,ccw:2305};function e9(e){return Array.isArray(e)||g(e)||y(e)}function e7(e){return e.sort(function(e,t){return e===eF?-1:t===eF?1:e=1,n>=2,t)}if(4===r){var i=e.data;return new te(i.thisDep,i.contextDep,i.propDep,t)}if(5===r)return new te(!1,!1,!1,t);if(6!==r)return new te(3===r,2===r,1===r,t);for(var a=!1,o=!1,s=!1,l=0;l=1&&(o=!0),u>=2&&(s=!0)}else 4===c.type&&(a=a||c.data.thisDep,o=o||c.data.contextDep,s=s||c.data.propDep)}return new te(a,o,s,t)}var ti=new te(!1,!1,!1,function(){}),ta=function(e,t){if(!t.ext_disjoint_timer_query)return null;var r=[],n=[];function i(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var a=[],o=[];function s(e,t,r){var n=a.pop()||new i;n.startQueryIndex=e,n.endQueryIndex=t,n.sum=0,n.stats=r,o.push(n)}var l=[],c=[];return{beginQuery:function(e){var i=r.pop()||t.ext_disjoint_timer_query.createQueryEXT();t.ext_disjoint_timer_query.beginQueryEXT(35007,i),n.push(i),s(n.length-1,n.length,e)},endQuery:function(){t.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:s,update:function(){var e,i,s=n.length;if(0!==s){c.length=Math.max(c.length,s+1),l.length=Math.max(l.length,s+1),l[0]=0,c[0]=0;var u=0;for(e=0,i=0;i"u"?1:window.devicePixelRatio,d=!1,p={},m=function(e){},g=function(){};if("string"==typeof o?r=document.querySelector(o):"object"==typeof o&&("string"==typeof o.nodeName&&"function"==typeof o.appendChild&&"function"==typeof o.getBoundingClientRect?r=o:"function"==typeof o.drawArrays||"function"==typeof o.drawElements?i=(a=o).canvas:("gl"in o?a=o.gl:"canvas"in o?i=u(o.canvas):"container"in o&&(n=u(o.container)),"attributes"in o&&(s=o.attributes),"extensions"in o&&(l=c(o.extensions)),"optionalExtensions"in o&&(h=c(o.optionalExtensions)),"onDone"in o&&(m=o.onDone),"profile"in o&&(d=!!o.profile),"pixelRatio"in o&&(f=+o.pixelRatio),"cachedCode"in o&&(p=o.cachedCode))),r&&("canvas"===r.nodeName.toLowerCase()?i=r:n=r),!a){if(!i){var y=function(t,r){var n,i=document.createElement("canvas");function a(){var e=window.innerWidth,n=window.innerHeight;if(t!==document.body){var a=i.getBoundingClientRect();e=a.right-a.left,n=a.bottom-a.top}i.width=r*e,i.height=r*n}return e(i.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(i),t===document.body&&(i.style.position="absolute",e(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(n=new ResizeObserver(function(){setTimeout(a)})).observe(t):window.addEventListener("resize",a,!1),a(),{canvas:i,onDestroy:function(){n?n.disconnect():window.removeEventListener("resize",a),t.removeChild(i)}}}(n||document.body,f);if(!y)return null;i=y.canvas,g=y.onDestroy}void 0===s.premultipliedAlpha&&(s.premultipliedAlpha=!0),a=function(e,t){function r(r){try{return e.getContext(r,t)}catch{return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(i,s)}return a?{gl:a,canvas:i,container:n,extensions:l,optionalExtensions:h,pixelRatio:f,profile:d,cachedCode:p,onDone:m,onDestroy:g}:(g(),m("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(t);if(!d)return null;var _=d.gl,w=_.getContextAttributes(),L=(_.isContextLost(),function(e,t){var r={};function n(t){var n,i=t.toLowerCase();try{n=r[i]=e.getExtension(i)}catch{}return!!n}for(var i=0;i0)if(Array.isArray(t[0])){o=x(t);for(var o,s,c=1,u=1;u0){if("number"==typeof e[0]){var i=p.allocType(h.dtype,e.length);S(i,e),d(i,n),p.freeType(i)}else if(Array.isArray(e[0])||g(e[0])){r=x(e);var a=b(e,r,h.dtype);d(a,n),p.freeType(a)}}}else if(y(e)){r=e.shape;var o=e.stride,s=0,l=0,c=0,u=0;1===r.length?(s=r[0],l=1,c=o[0],u=0):2===r.length&&(s=r[0],l=r[1],c=o[0],u=o[1]);var m=Array.isArray(e.data)?h.dtype:M(e.data),v=p.allocType(m,s*l);E(v,e.data,s,l,c,u,e.offset),d(v,n),p.freeType(v)}return f},r.profile&&(f.stats=h.stats),f.destroy=function(){u(h)},f},createStream:function(e,t){var r=s.pop();return r||(r=new o(e)),r.bind(),c(r,t,35040,0,1,!1),r},destroyStream:function(e){s.push(e)},clear:function(){v(a).forEach(u),s.forEach(u)},getBuffer:function(e){return e&&e._buffer instanceof o?e._buffer:null},restore:function(){v(a).forEach(function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)})},_initBuffer:c}}(_,j,d,function(e){return td.destroyBuffer(e)}),tf=function(e,t,r,n){var i={},a=0,o={uint8:5121,uint16:5123};function s(e){this.id=a++,i[this.id]=this,this.buffer=e,this.primType=4,this.vertCount=0,this.type=0}t.oes_element_index_uint&&(o.uint32=5125),s.prototype.bind=function(){this.buffer.bind()};var l=[];function c(n,i,a,o,s,l,c){if(n.buffer.bind(),i){var u,h=c;!c&&(!g(i)||y(i)&&!g(i.data))&&(h=t.oes_element_index_uint?5125:5123),r._initBuffer(n.buffer,i,a,h,3)}else e.bufferData(34963,l,a),n.buffer.dtype=u||5121,n.buffer.usage=a,n.buffer.dimension=3,n.buffer.byteLength=l;if(u=c,!c){switch(n.buffer.dtype){case 5121:case 5120:u=5121;break;case 5123:case 5122:u=5123;break;case 5125:case 5124:u=5125}n.buffer.dtype=u}n.type=u;var f=s;f<0&&(f=n.buffer.byteLength,5123===u?f>>=1:5125===u&&(f>>=2)),n.vertCount=f;var d=o;if(o<0){d=4;var p=n.buffer.dimension;1===p&&(d=0),2===p&&(d=1),3===p&&(d=4)}n.primType=d}function u(e){n.elementsCount--,delete i[e.id],e.buffer.destroy(),e.buffer=null}return{create:function(e,t){var i=r.create(null,34963,!0),a=new s(i._buffer);function l(e){if(e)if("number"==typeof e)i(e),a.primType=4,a.vertCount=0|e,a.type=5121;else{var t=null,r=35044,n=-1,s=-1,u=0,h=0;Array.isArray(e)||g(e)||y(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=T[e.usage]),"primitive"in e&&(n=C[e.primitive]),"count"in e&&(s=0|e.count),"type"in e&&(h=o[e.type]),"length"in e?u=0|e.length:(u=s,5123===h||5122===h?u*=2:(5125===h||5124===h)&&(u*=4))),c(a,t,r,n,s,u,h)}else i(),a.primType=4,a.vertCount=0,a.type=5121;return l}return n.elementsCount++,l(e),l._reglType="elements",l._elements=a,l.subdata=function(e,t){return i.subdata(e,t),l},l.destroy=function(){u(a)},l},createStream:function(e){var t=l.pop();return t||(t=new s(r.create(null,34963,!0,!1)._buffer)),c(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){l.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof s?e._elements:null},clear:function(){v(i).forEach(u)}}}(_,G,th,j),td=function(e,t,r,n,i,a,o){for(var s=r.maxAttributes,l=Array(s),c=0;c=d.byteLength?u.subdata(d):(u.destroy(),t.buffers[l]=null)),t.buffers[l]||(u=t.buffers[l]=i.create(h,34962,!1,!0)),f.buffer=i.getBuffer(u),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1,o[l]=1):i.getBuffer(h)?(f.buffer=i.getBuffer(h),f.size=0|f.buffer.dimension,f.normalized=!1,f.type=f.buffer.dtype,f.offset=0,f.stride=0,f.divisor=0,f.state=1):i.getBuffer(h.buffer)?(f.buffer=i.getBuffer(h.buffer),f.size=0|(+h.size||f.buffer.dimension),f.normalized=!!h.normalized,"type"in h?f.type=k[h.type]:f.type=f.buffer.dtype,f.offset=0|(h.offset||0),f.stride=0|(h.stride||0),f.divisor=0|(h.divisor||0),f.state=1):"x"in h&&(f.x=+h.x||0,f.y=+h.y||0,f.z=+h.z||0,f.w=+h.w||0,f.state=2)}for(var p=0;p1)for(var y=0;ye&&(e=t.stats.uniformsCount)}),e},n.getMaxAttributesCount=function(){var e=0;return h.forEach(function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)}),e}),{clear:function(){var e=t.deleteShader.bind(t);v(a).forEach(e),a={},v(o).forEach(e),o={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,u={},n.shaderCount=0},program:function(r,i,s,l){var c=u[i];c||(c=u[i]={});var f=c[r];if(f&&(f.refCount++,!l))return f;var m=new d(i,r);return n.shaderCount++,p(m,s,l),f||(c[r]=m),h.push(m),e(m,{destroy:function(){if(m.refCount--,m.refCount<=0){t.deleteProgram(m.program);var e=h.indexOf(m);h.splice(e,1),n.shaderCount--}c[m.vertId].refCount<=0&&(t.deleteShader(o[m.vertId]),delete o[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(t.deleteShader(a[m.fragId]),delete a[m.fragId],delete u[m.fragId])}})},restore:function(){a={},o={};for(var e=0;e=0&&(m[e]=t)});var k=Object.keys(m);n.textureFormats=k;var T=[];Object.keys(m).forEach(function(e){T[m[e]]=e});var A=[];Object.keys(d).forEach(function(e){A[d[e]]=e});var M=[];Object.keys(u).forEach(function(e){M[u[e]]=e});var S=[];Object.keys(h).forEach(function(e){S[h[e]]=e});var E=[];Object.keys(c).forEach(function(e){E[c[e]]=e});var C=k.reduce(function(e,t){var n=m[t];return 6409===n||6406===n||6409===n||6410===n||6402===n||34041===n||r.ext_srgb&&(35904===n||35906===n)?e[n]=n:32855===n||t.indexOf("rgba")>=0?e[n]=6408:e[n]=6407,e},{});function L(){this.internalformat=6408,this.format=6408,this.type=5121,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=37444,this.width=0,this.height=0,this.channels=0}function I(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function j(e,t){if(!("object"!=typeof t||!t)){"premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=f[t.colorSpace]),"type"in t&&(e.type=d[t.type]);var r=e.width,n=e.height,i=e.channels,a=!1;"shape"in t?(r=t.shape[0],n=t.shape[1],3===t.shape.length&&(i=t.shape[2],a=!0)):("radius"in t&&(r=n=t.radius),"width"in t&&(r=t.width),"height"in t&&(n=t.height),"channels"in t&&(i=t.channels,a=!0)),e.width=0|r,e.height=0|n,e.channels=0|i;var o=!1;if("format"in t){var s=t.format,l=e.internalformat=m[s];e.format=C[l],s in d&&("type"in t||(e.type=d[s])),s in _&&(e.compressed=!0),o=!0}!a&&o?e.channels=R[e.format]:a&&!o&&e.channels!==D[e.format]&&(e.format=e.internalformat=D[e.channels])}}function H(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function G(){L.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function W(e,t){var r=null;if($(t)?r=t:t&&(j(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),$(t.data)&&(r=t.data)),t.copy){var n=a.viewportWidth,i=a.viewportHeight;e.width=e.width||n-e.xOffset,e.height=e.height||i-e.yOffset,e.needsCopy=!0}else if(r){if(g(r))e.channels=e.channels||4,e.data=r,"type"in t||5121!==e.type||(e.type=K(r));else if(Y(r))e.channels=e.channels||4,function(e,t){var r=t.length;switch(e.type){case 5121:case 5123:case 5125:case 5126:var n=p.allocType(e.type,r);n.set(t),e.data=n;break;case 36193:e.data=P(t)}}(e,r),e.alignment=1,e.needsFree=!0;else if(y(r)){var o=r.data;Array.isArray(o)||5121!==e.type||(e.type=K(o));var s,l,c,u,h,f,d=r.shape,m=r.stride;3===d.length?(c=d[2],f=m[2]):(c=1,f=1),s=d[0],l=d[1],u=m[0],h=m[1],e.alignment=1,e.width=s,e.height=l,e.channels=c,e.format=e.internalformat=D[c],e.needsFree=!0,function(e,t,r,n,i,a){for(var o=e.width,s=e.height,l=e.channels,c=J(e,o*s*l),u=0,h=0;h>=i,r.height>>=i,W(r,n[i]),e.mipmask|=1<=0)||"faces"in t||(e.genMipmaps=!0)),"mag"in t&&(e.magFilter=u[t.mag]);var r=e.wrapS,n=e.wrapT;if("wrap"in t){var i=t.wrap;"string"==typeof i?r=n=c[i]:Array.isArray(i)&&(r=c[i[0]],n=c[i[1]])}else"wrapS"in t&&(r=c[t.wrapS]),"wrapT"in t&&(n=c[t.wrapT]);if(e.wrapS=r,e.wrapT=n,"anisotropic"in t&&(t.anisotropic,e.anisotropic=t.anisotropic),"mipmap"in t){var a=!1;switch(typeof t.mipmap){case"string":e.mipmapHint=l[t.mipmap],e.genMipmaps=!0,a=!0;break;case"boolean":a=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,a=!0}!a||"min"in t||(e.minFilter=9984)}}function ep(e,n){t.texParameteri(n,10241,e.minFilter),t.texParameteri(n,10240,e.magFilter),t.texParameteri(n,10242,e.wrapS),t.texParameteri(n,10243,e.wrapT),r.ext_texture_filter_anisotropic&&t.texParameteri(n,34046,e.anisotropic),e.genMipmaps&&(t.hint(33170,e.mipmapHint),t.generateMipmap(n))}var em=0,eg={},ey=n.maxTextureUnits,ev=Array(ey).map(function(){return null});function ex(e){L.call(this),this.mipmask=0,this.internalformat=6408,this.id=em++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new ef,s.profile&&(this.stats={size:0})}function eb(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function e_(){var e=ev[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function ew(e){var r=e.texture,n=e.unit,i=e.target;n>=0&&(t.activeTexture(33984+n),t.bindTexture(i,null),ev[n]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete eg[e.id],o.textureCount--}return e(ex.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(e<0){for(var r=0;r0)continue;n.unit=-1}ev[r]=this,e=r;break}s.profile&&o.maxTextureUnits>l)-o,c.height=c.height||(n.height>>l)-s,eb(n),et(c,3553,o,s,l),e_(),ei(c),i},i.resize=function(e,r){var a=0|e,o=0|r||a;if(a===n.width&&o===n.height)return i;i.width=n.width=a,i.height=n.height=o,eb(n);for(var l=0;n.mipmask>>l;++l){var c=a>>l,u=o>>l;if(!c||!u)break;t.texImage2D(3553,l,n.format,c,u,0,n.format,n.type,null)}return e_(),s.profile&&(n.stats.size=ee(n.internalformat,n.type,a,o,!1,!1)),i},i._reglType="texture2d",i._texture=n,s.profile&&(i.stats=n.stats),i.destroy=function(){n.decRef()},i},createCube:function(e,r,n,i,a,l){var c=new ex(34067);eg[c.id]=c,o.cubeCount++;var u=Array(6);function h(e,t,r,n,i,a){var o,l=c.texInfo;for(ef.call(l),o=0;o<6;++o)u[o]=eu();if("number"!=typeof e&&e){if("object"==typeof e)if(t)es(u[0],e),es(u[1],t),es(u[2],r),es(u[3],n),es(u[4],i),es(u[5],a);else if(ed(l,e),j(c,e),"faces"in e){var f=e.faces;for(o=0;o<6;++o)I(u[o],c),es(u[o],f[o])}else for(o=0;o<6;++o)es(u[o],e)}else{var d=0|e||1;for(o=0;o<6;++o)eo(u[o],d,d)}for(I(c,u[0]),l.genMipmaps?c.mipmask=(u[0].width<<1)-1:c.mipmask=u[0].mipmask,c.internalformat=u[0].internalformat,h.width=u[0].width,h.height=u[0].height,eb(c),o=0;o<6;++o)el(u[o],34069+o);for(ep(l,34067),e_(),s.profile&&(c.stats.size=ee(c.internalformat,c.type,h.width,h.height,l.genMipmaps,!0)),h.format=T[c.internalformat],h.type=A[c.type],h.mag=M[l.magFilter],h.min=S[l.minFilter],h.wrapS=E[l.wrapS],h.wrapT=E[l.wrapT],o=0;o<6;++o)eh(u[o]);return h}return h(e,r,n,i,a,l),h.subimage=function(e,t,r,n,i){var a=0|r,o=0|n,s=0|i,l=en();return I(l,c),l.width=0,l.height=0,W(l,t),l.width=l.width||(c.width>>s)-a,l.height=l.height||(c.height>>s)-o,eb(c),et(l,34069+e,a,o,s),e_(),ei(l),h},h.resize=function(e){var r=0|e;if(r!==c.width){h.width=c.width=r,h.height=c.height=r,eb(c);for(var n=0;n<6;++n)for(var i=0;c.mipmask>>i;++i)t.texImage2D(34069+n,i,c.format,r>>i,r>>i,0,c.format,c.type,null);return e_(),s.profile&&(c.stats.size=ee(c.internalformat,c.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=c,s.profile&&(h.stats=c.stats),h.destroy=function(){c.decRef()},h},clear:function(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var n=0;n<6;++n)t.texImage2D(34069+n,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);ep(e.texInfo,e.target)})},refresh:function(){for(var e=0;e=0?f=!0:c.indexOf(p)>=0&&(f=!1))),("depthTexture"in e||"depthStencilTexture"in e)&&(T=!!(e.depthTexture||e.depthStencilTexture)),"depth"in e&&("boolean"==typeof e.depth?s=e.depth:(b=e.depth,u=!1)),"stencil"in e&&("boolean"==typeof e.stencil?u=e.stencil:(_=e.stencil,s=!1)),"depthStencil"in e&&("boolean"==typeof e.depthStencil?s=u=e.depthStencil:(w=e.depthStencil,s=!1,u=!1))}else a=o=1;var S=null,E=null,C=null,L=null;if(Array.isArray(h))S=h.map(m);else if(h)S=[m(h)];else for(S=Array(x),r=0;r0&&(s.depth=r[0].depth,s.stencil=r[0].stencil,s.depthStencil=r[0].depthStencil),r[o]?r[o](s):r[o]=M(s)}return e(n,{width:l,height:l,color:a})}return n(t),e(n,{faces:r,resize:function(e){var t,i=0|e;if(i===n.width)return n;var a=n.color;for(t=0;t0&&(t.push(e,"="),t.push.apply(t,ec(arguments)),t.push(";")),e},toString:function(){return eu([r.length>0?"var "+r.join(",")+";":"",eu(t)])}})}function l(){var t=s(),r=s(),n=t.toString,i=r.toString;function a(e,n){r(e,n,"=",t.def(e,n),";")}return e(function(){t.apply(t,ec(arguments))},{def:t.def,entry:t,exit:r,save:a,set:function(e,r,n){a(e,r),t(e,r,"=",n,";")},toString:function(){return n()+i()}})}var c=s(),u={};return{global:c,link:function(e,t){var r=t&&t.stable;if(!r){for(var s=0;s>>4&15)+r.charAt(15&t);return n}(function(e){for(var t=function(e,t){var r,n,i,a,o,s,l,c,u,h,f,d,p,m,g,y,v,x,b,_,w=[0x6a09e667,-0x4498517b,0x3c6ef372,-0x5ab00ac6,0x510e527f,-0x64fa9774,0x1f83d9ab,0x5be0cd19],k=Array(64);for(e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t,v=0;v>>10,k[x-7]),eo(n=k[x-15],7)^eo(n,18)^n>>>3),k[x-16]),b=el(el(el(el(y,eo(i=p,6)^eo(i,11)^eo(i,25)),(a=p)&m^~a&g),es[x]),k[x]),_=el(eo(o=u,2)^eo(o,13)^eo(o,22),(s=u)&(l=h)^s&(c=f)^l&c),y=g,g=m,m=p,p=el(d,b),d=f,f=h,h=u,u=el(b,_)}w[0]=el(u,w[0]),w[1]=el(h,w[1]),w[2]=el(f,w[2]),w[3]=el(d,w[3]),w[4]=el(p,w[4]),w[5]=el(m,w[5]),w[6]=el(g,w[6]),w[7]=el(y,w[7])}return w}(function(e){for(var t=Array(e.length>>2),r=0;r>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}(e),8*e.length),r="",n=0;n<32*t.length;n+=8)r+=String.fromCharCode(t[n>>5]>>>24-n%32&255);return r}(function(e){for(var t,r,n="",i=-1;++i>>6&31,128|63&t):t<=65535?n+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(n+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return n}(n)))])return r[t].apply(null,a);var o=Function.apply(null,i.concat(n));return r&&(r[t]=o),o.apply(null,a)}}}({cache:v}),r=t.link,i=t.global;t.id=J++,t.batchId="0";var a=r($),o=t.shared={props:"a0"};Object.keys($).forEach(function(e){o[e]=i.def(a,".",e)});var s=t.next={},l=t.current={};Object.keys(G).forEach(function(e){Array.isArray(U[e])&&(s[e]=i.def(o.next,".",e),l[e]=i.def(o.current,".",e))});var c=t.constants={};Object.keys(K).forEach(function(e){c[e]=i.def(JSON.stringify(K[e]))}),t.invoke=function(e,n){switch(n.type){case 0:var i=["this",o.context,o.props,t.batchId];return e.def(r(n.data),".call(",i.slice(0,Math.max(n.data.length+1,4)),")");case 1:return e.def(o.props,n.data);case 2:return e.def(o.context,n.data);case 3:return e.def("this",n.data);case 4:return n.data.append(t,e),n.data.ref;case 5:return n.data.toString();case 6:return n.data.map(function(r){return t.invoke(e,r)})}},t.attribCache={};var u={};return t.scopeAttrib=function(e){var t=n.id(e);if(t in u)return u[t];var i=d.scope[t];return i||(i=d.scope[t]=new R),u[t]=r(i)},t}function ee(e,t,r){var n=e.shared.context,i=e.scope();Object.keys(r).forEach(function(a){t.save(n,"."+a);var o=r[a].append(e,t);Array.isArray(o)?i(n,".",a,"=[",o.join(),"];"):i(n,".",a,"=",o,";")}),t(i)}function et(e,t,r,n){var i,a=e.shared,o=a.gl,s=a.framebuffer;B&&(i=t.def(a.extensions,".webgl_draw_buffers"));var l,c=e.constants,u=c.drawBuffer,h=c.backBuffer;l=r?r.append(e,t):t.def(s,".next"),n||t("if(",l,"!==",s,".cur){"),t("if(",l,"){",o,".bindFramebuffer(",36160,",",l,".framebuffer);"),B&&t(i,".drawBuffersWEBGL(",u,"[",l,".colorAttachments.length]);"),t("}else{",o,".bindFramebuffer(",36160,",null);"),B&&t(i,".drawBuffersWEBGL(",h,");"),t("}",s,".cur=",l,";"),n||t("}")}function er(e,t,r){var n=e.shared,i=n.gl,a=e.current,o=e.next,s=n.current,l=n.next,c=e.cond(s,".dirty");q.forEach(function(t){var n,u,f=W(t);if(!(f in r.state))if(f in o){n=o[f],u=a[f];var d=h(U[f].length,function(e){return c.def(n,"[",e,"]")});c(e.cond(d.map(function(e,t){return e+"!=="+u+"["+t+"]"}).join("||")).then(i,".",G[f],"(",d,");",d.map(function(e,t){return u+"["+t+"]="+e}).join(";"),";"))}else{n=c.def(l,".",f);var p=e.cond(n,"!==",s,".",f);c(p),f in H?p(e.cond(n).then(i,".enable(",H[f],");").else(i,".disable(",H[f],");"),s,".",f,"=",n,";"):p(i,".",G[f],"(",n,");",s,".",f,"=",n,";")}}),0===Object.keys(r.state).length&&c(s,".dirty=false;"),t(c)}function en(e,t,r,n){var i,a=e.shared,o=e.current,s=a.current,l=a.gl;e7(Object.keys(r)).forEach(function(a){var c=r[a];if(!(n&&!n(c))){var u=c.append(e,t);if(H[a]){var h=H[a];tt(c)?(i=e.link(u,{stable:!0}),t(e.cond(i).then(l,".enable(",h,");").else(l,".disable(",h,");")),t(s,".",a,"=",i,";")):(t(e.cond(u).then(l,".enable(",h,");").else(l,".disable(",h,");")),t(s,".",a,"=",u,";"))}else if(z(u)){var f=o[a];t(l,".",G[a],"(",u,");",u.map(function(e,t){return f+"["+t+"]="+e}).join(";"),";")}else tt(c)?(i=e.link(u,{stable:!0}),t(l,".",G[a],"(",i,");",s,".",a,"=",i,";")):t(l,".",G[a],"(",u,");",s,".",a,"=",u,";")}})}function ei(e,t){F&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function ea(e,t,r,n,i){var a,o,s,l=e.shared,c=e.stats,u=l.current,h=l.timer,f=r.profile;function d(){return typeof performance>"u"?"Date.now()":"performance.now()"}function p(e){e(a=t.def(),"=",d(),";"),"string"==typeof i?e(c,".count+=",i,";"):e(c,".count++;"),y&&(n?e(o=t.def(),"=",h,".getNumPendingQueries();"):e(h,".beginQuery(",c,");"))}function m(e){e(c,".cpuTime+=",d(),"-",a,";"),y&&(n?e(h,".pushScopeStats(",o,",",h,".getNumPendingQueries(),",c,");"):e(h,".endQuery();"))}function g(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(f){if(tt(f))return void(f.enable?(p(t),m(t.exit),g("true")):g("false"));g(s=f.append(e,t))}else s=t.def(u,".profile");var v=e.block();p(v),t("if(",s,"){",v,"}");var x=e.block();m(x),t.exit("if(",s,"){",x,"}")}function eX(e,t,r,n,i){var a=e.shared;n.forEach(function(n){var o,s=n.name,l=r.attributes[s];if(l){if(!i(l))return;o=l.append(e,t)}else{if(!i(ti))return;var c=e.scopeAttrib(s);o={},Object.keys(new R).forEach(function(e){o[e]=t.def(c,".",e)})}!function(r,n,i){var o=a.gl,s=t.def(r,".location"),l=t.def(a.attributes,"[",s,"]"),c=i.state,u=i.buffer,h=[i.x,i.y,i.z,i.w],f=["buffer","normalized","offset","stride"];function d(){t("if(!",l,".buffer){",o,".enableVertexAttribArray(",s,");}");var r,a=i.type;if(r=i.size?t.def(i.size,"||",n):n,t("if(",l,".type!==",a,"||",l,".size!==",r,"||",f.map(function(e){return l+"."+e+"!=="+i[e]}).join("||"),"){",o,".bindBuffer(",34962,",",u,".buffer);",o,".vertexAttribPointer(",[s,r,a,i.normalized,i.stride,i.offset],");",l,".type=",a,";",l,".size=",r,";",f.map(function(e){return l+"."+e+"="+i[e]+";"}).join(""),"}"),F){var c=i.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function p(){t("if(",l,".buffer){",o,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",eh.map(function(e,t){return l+"."+e+"!=="+h[t]}).join("||"),"){",o,".vertexAttrib4f(",s,",",h,");",eh.map(function(e,t){return l+"."+e+"="+h[t]+";"}).join(""),"}")}1===c?d():2===c?p():(t("if(",c,"===",1,"){"),d(),t("}else{"),p(),t("}"))}(e.link(n),function(e){switch(e){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(n.info.type),o)})}function eZ(e,t,r,i,a,o){for(var s,l=e.shared,c=l.gl,u=0;u1){for(var M=[],S=[],E=0;E>1)",u],");")}function t(){r(h,".drawArraysInstancedANGLE(",[v,x,b,u],");")}g&&"null"!==g?w?e():(r("if(",g,"){"),e(),r("}else{"),t(),r("}")):t()}function T(){function e(){r(d+".drawElements("+[v,b,_,x+"<<(("+_+"-5121)>>1)"]+");")}function t(){r(d+".drawArrays("+[v,x,b]+");")}g&&"null"!==g?w?e():(r("if(",g,"){"),e(),r("}else{"),t(),r("}")):t()}F&&("number"!=typeof u||u>=0)?"string"==typeof u?(r("if(",u,">0){"),k(),r("}else if(",u,"<0){"),T(),r("}")):k():T()}function ta(e,t,r,n,i){var a=Q(),o=a.proc("body",i);return F&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),e(a,o,r,n),a.compile().body}function to(e,t,r,n){ei(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),eX(e,t,r,n.attributes,function(){return!0})),eZ(e,t,r,n.uniforms,function(){return!0},!1),e0(e,t,t,r)}function ts(e,t,r,n){function i(){return!0}e.batchId="a1",ei(e,t),eX(e,t,r,n.attributes,i),eZ(e,t,r,n.uniforms,i,!1),e0(e,t,t,r)}function tl(e,t,r,n){ei(e,t);var i=r.contextDep,a=t.def(),o=t.def();e.shared.props=o,e.batchId=a;var s=e.scope(),l=e.scope();function c(e){return e.contextDep&&i||e.propDep}function u(e){return!c(e)}if(t(s.entry,"for(",a,"=0;",a,"<","a1",";++",a,"){",o,"=","a0","[",a,"];",l,"}",s.exit),r.needsContext&&ee(e,l,r.context),r.needsFramebuffer&&et(e,l,r.framebuffer),en(e,l,r.state,c),r.profile&&c(r.profile)&&ea(e,l,r,!1,!0),n)r.useVAO?r.drawVAO?c(r.drawVAO)?l(e.shared.vao,".setVAO(",r.drawVAO.append(e,l),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),eX(e,s,r,n.attributes,u),eX(e,l,r,n.attributes,c)),eZ(e,s,r,n.uniforms,u,!1),eZ(e,l,r,n.uniforms,c,!0),e0(e,s,l,r);else{var h=e.global.def("{}"),f=r.shader.progVar.append(e,l),d=l.def(f,".id"),p=l.def(h,"[",d,"]");l(e.shared.gl,".useProgram(",f,".program);","if(!",p,"){",p,"=",h,"[",d,"]=",e.link(function(t){return ta(ts,e,r,t,2)}),"(",f,");}",p,".call(this,a0[",a,"],",a,");")}}function tc(e,t,n){var i=t.static[n];if(i&&function(e){if(!("object"!=typeof e||z(e))){for(var t=Object.keys(e),r=0;r0)return null;var n=t.static,i=Object.keys(n);if(i.length>0&&"number"==typeof n[i[0]]){for(var a=[],o=0;o0,D={framebuffer:M,draw:E,shader:I,state:L,dirty:O,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(D.profile=function(e){var t,r=e.static,n=e.dynamic;if(eB in r){var i=!!r[eB];(t=tr(function(e,t){return i})).enable=i}else if(eB in n){var a=n[eB];t=tn(a,function(e,t){return e.invoke(t,a)})}return t}(e),m=r.static,g=r.dynamic,y={},Object.keys(m).forEach(function(e){var t,r=m[e];if("number"==typeof r||"boolean"==typeof r)t=tr(function(){return r});else if("function"==typeof r){var n=r._reglType;"texture2d"===n||"textureCube"===n?t=tr(function(e){return e.link(r)}):("framebuffer"===n||"framebufferCube"===n)&&(t=tr(function(e){return e.link(r.color[0])}))}else z(r)&&(t=tr(function(e){return e.global.def("[",h(r.length,function(e){return r[e]}),"]")}));t.value=r,y[e]=t}),Object.keys(g).forEach(function(e){var t=g[e];y[e]=tn(t,function(e,r){return e.invoke(r,t)})}),D.uniforms=y,D.drawVAO=D.scopeVAO=E.vao,!D.drawVAO&&I.program&&!A&&i.angle_instanced_arrays&&E.static.elements){var F=!0,B=I.program.attributes.map(function(e){var r=t.static[e];return F=F&&!!r,r});if(F&&B.length>0){var N=d.getVAO(d.createVAO({attributes:B,elements:E.static.elements}));D.drawVAO=new te(null,null,null,function(e,t){return e.link(N)}),D.useVAO=!0}}return A?D.useVAO=!0:(v=t.static,x=t.dynamic,b={},Object.keys(v).forEach(function(e){var t=v[e],r=n.id(e),i=new R;if(e9(t))i.state=1,i.buffer=l.getBuffer(l.create(t,34962,!1,!0)),i.type=0;else{var a=l.getBuffer(t);if(a)i.state=1,i.buffer=a,i.type=0;else if("constant"in t){var o=t.constant;i.buffer="null",i.state=2,"number"==typeof o?i.x=o:eh.forEach(function(e,t){t"+t+"?"+n+".constant["+t+"]:0;"}).join(""),"}}else{","if(",o,"(",n,".buffer)){",u,"=",s,".createStream(",34962,",",n,".buffer);","}else{",u,"=",s,".getBuffer(",n,".buffer);","}",h,'="type" in ',n,"?",a.glTypes,"[",n,".type]:",u,".dtype;",l.normalized,"=!!",n,".normalized;"),f("size"),f("offset"),f("stride"),f("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l})}),D.attributes=b),_=a.static,w=a.dynamic,T={},Object.keys(_).forEach(function(e){var t=_[e];T[e]=tr(function(e,r){return"number"==typeof t||"boolean"==typeof t?""+t:e.link(t)})}),Object.keys(w).forEach(function(e){var t=w[e];T[e]=tn(t,function(e,r){return e.invoke(r,t)})}),D.context=T,D}(t,r,a,o);return m.shader.program&&(m.shader.program.attributes.sort(function(e,t){return e.name0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(f,m),function(e,t){var r=e.proc("scope",3);e.batchId="a2";var i=e.shared,a=i.current;if(ee(e,r,t.context),t.framebuffer&&t.framebuffer.append(e,r),e7(Object.keys(t.state)).forEach(function(n){var a=t.state[n],o=a.append(e,r);z(o)?o.forEach(function(t,i){Z(t)?r.set(e.next[n],"["+i+"]",t):r.set(e.next[n],"["+i+"]",e.link(t,{stable:!0}))}):tt(a)?r.set(i.next,"."+n,e.link(o,{stable:!0})):r.set(i.next,"."+n,o)}),ea(e,r,t,!0,!0),[eq,eW,eG,eY,eH].forEach(function(n){var a=t.draw[n];if(a){var o=a.append(e,r);Z(o)?r.set(i.draw,"."+n,o):r.set(i.draw,"."+n,e.link(o),{stable:!0})}}),Object.keys(t.uniforms).forEach(function(a){var o=t.uniforms[a].append(e,r);Array.isArray(o)&&(o="["+o.map(function(t){return Z(t)?t:e.link(t,{stable:!0})})+"]"),r.set(i.uniforms,"["+e.link(n.id(a),{stable:!0})+"]",o)}),Object.keys(t.attributes).forEach(function(n){var i=t.attributes[n].append(e,r),a=e.scopeAttrib(n);Object.keys(new R).forEach(function(e){r.set(a,"."+e,i[e])})}),t.scopeVAO){var o=t.scopeVAO.append(e,r);Z(o)?r.set(i.vao,".targetVAO",o):r.set(i.vao,".targetVAO",e.link(o,{stable:!0}))}function s(n){var a=t.shader[n];if(a){var o=a.append(e,r);Z(o)?r.set(i.shader,"."+n,o):r.set(i.shader,"."+n,e.link(o,{stable:!0}))}}s(eU),s(eV),Object.keys(t.state).length>0&&(r(a,".dirty=true;"),r.exit(a,".dirty=true;")),r("a1(",e.shared.context,",a0,",e.batchId,");")}(f,m),function(e,t){var r=e.proc("batch",2);e.batchId="0",ei(e,r);var n=!1,i=!0;Object.keys(t.context).forEach(function(e){n=n||t.context[e].propDep}),n||(ee(e,r,t.context),i=!1);var a=t.framebuffer,o=!1;function s(e){return e.contextDep&&n||e.propDep}a?(a.propDep?n=o=!0:a.contextDep&&n&&(o=!0),o||et(e,r,a)):et(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(n=!0),er(e,r,t),en(e,r,t.state,function(e){return!s(e)}),t.profile&&s(t.profile)||ea(e,r,t,!1,"a1"),t.contextDep=n,t.needsContext=i,t.needsFramebuffer=o;var l=t.shader.progVar;if(l.contextDep&&n||l.propDep)tl(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)tl(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),h=r.def(c,".id"),f=r.def(u,"[",h,"]");r(e.cond(f).then(f,".call(this,a0,a1);").else(f,"=",u,"[",h,"]=",e.link(function(r){return ta(tl,e,t,r,2)}),"(",c,");",f,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(f,m),e(f.compile(),{destroy:function(){m.shader.program.destroy()}})}}}(_,I,G,tu,th,tf,ty,{},td,tp,tc,e0,W,H,d),tx=function(e,t,r,n){function i(i){var a=null===t.next?5121:t.next.colorAttachments[0].texture._texture.type,o=0,s=0,l=n.framebufferWidth,c=n.framebufferHeight,u=null;g(i)?u=i:i&&(o=0|i.x,s=0|i.y,l=0|(i.width||n.framebufferWidth-o),c=0|(i.height||n.framebufferHeight-s),u=i.data||null),r();var h=l*c*4;return u||(5121===a?u=new Uint8Array(h):5126===a&&(u=u||new Float32Array(h))),e.pixelStorei(3333,4),e.readPixels(o,s,l,c,6408,a,u),u}return function(e){var r;return e&&"framebuffer"in e?(t.setFBO({framebuffer:e.framebuffer},function(){r=i(e)}),r):i(e)}}(_,ty,tv.procs.poll,e0),tb=tv.next,t_=_.canvas,tw=[],tk=[],tT=[],tA=[d.onDestroy],tM=null;function tS(){if(0===tw.length){W&&W.update(),tM=null;return}tM=s.next(tS),tj();for(var e=tw.length-1;e>=0;--e){var t=tw[e];t&&t(e0,null,0)}_.flush(),W&&W.update()}function tE(){!tM&&tw.length>0&&(tM=s.next(tS))}function tC(){tM&&(s.cancel(tS),tM=null)}function tL(e){e.preventDefault(),tC(),tk.forEach(function(e){e()})}function tI(e){_.getError(),L.restore(),tp.restore(),th.restore(),tm.restore(),tg.restore(),ty.restore(),td.restore(),W&&W.restore(),tv.procs.refresh(),tE(),tT.forEach(function(e){e()})}function tP(t){function r(e,t){var r={},n={};return Object.keys(e).forEach(function(i){var s=e[i];if(a(s)){n[i]=o(s,i);return}if(t&&Array.isArray(s)){for(var l=0;l0)return f.call(this,function(e){for(;p.length=0},read:tx,destroy:function(){tw.length=0,tC(),t_&&(t_.removeEventListener(to,tL),t_.removeEventListener(ts,tI)),tp.clear(),ty.clear(),tg.clear(),td.clear(),tm.clear(),tf.clear(),th.clear(),W&&W.clear(),tA.forEach(function(e){e()})},_gl:_,_refresh:tF,poll:function(){tj(),W&&W.update()},now:tB,stats:j,getCachedCode:function(){return H},preloadCachedCode:function(e){Object.entries(e).forEach(function(e){H[e[0]]=e[1]})}});return d.onDone(null,tN),tN}},"object"==typeof e&&"u">typeof t?t.exports=r():e.createREGL=r()}}),yE=d({"src/lib/prepare_regl.js"(e,t){var r=d$(),n=yS();t.exports=function(e,t,i){var a=e._fullLayout,o=!0;return a._glcanvas.each(function(r){if(r.regl)return void r.regl.preloadCachedCode(i);if(!(r.pick&&!a._has("parcoords"))){try{r.regl=n({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||window.devicePixelRatio,extensions:t||[],cachedCode:i||{}})}catch{o=!1}r.regl||(o=!1),o&&this.addEventListener("webglcontextlost",function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:r.key})},!1)}}),o||r({container:a._glcontainer.node()}),o}}}),yC=d({"src/traces/scattergl/plot.js"(e,t){var r=mK(),n=ye(),i=yt(),a=yM(),o=tY(),s=ne().selectMode,l=yE(),c=rk(),u=iM(),h=mV().styleTextSelection,f={},e=t.exports=function(e,t,d){if(d.length){var p,m,g=e._fullLayout,y=t._scene,v=t.xaxis,x=t.yaxis;if(y){if(!l(e,["ANGLE_instanced_arrays","OES_element_index_uint"],f))return void y.init();var b,_,w,k,T,A,M,S,E,C,L=y.count,I=g._glcanvas.data()[0].regl;if(u(e,t,d),y.dirty){if((y.line2d||y.error2d)&&!(y.scatter2d||y.fill2d||y.glText)&&I.clear({color:!0,depth:!0}),!0===y.error2d&&(y.error2d=i(I)),!0===y.line2d&&(y.line2d=n(I)),!0===y.scatter2d&&(y.scatter2d=r(I)),!0===y.fill2d&&(y.fill2d=n(I)),!0===y.glText)for(y.glText=Array(L),p=0;py.glText.length){var P=L-y.glText.length;for(p=0;pr&&(isNaN(t[n])||isNaN(t[n+1]));)n-=2;e.positions=t.slice(r,n+2)}return e}),y.line2d.update(y.lineOptions)),y.error2d){var O=(y.errorXOptions||[]).concat(y.errorYOptions||[]).map(function(e){return e||{positions:[],errors:[]}});y.error2d.update(O)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=o.repeat(null,L),y.fill2d&&(y.fillOptions=y.fillOptions.map(function(e,t){var r=d[t];if(!(!e||!r||!r[0]||!r[0].trace)){var n,i,a=r[0],o=a.trace,s=a.t,l=y.lineOptions[t],c=[];o._ownfill&&c.push(t),o._nexttrace&&c.push(t+1),c.length&&(y.fillOrder[t]=c);var u,h,f=[],p=l&&l.positions||s.positions;if("tozeroy"===o.fill){for(u=0;uu&&isNaN(p[h+1]);)h-=2;0!==p[u+1]&&(f=[p[u],0]),f=f.concat(p.slice(u,h+2)),0!==p[h+1]&&(f=f.concat([p[h],0]))}else if("tozerox"===o.fill){for(u=0;uu&&isNaN(p[h]);)h-=2;0!==p[u]&&(f=[0,p[u+1]]),f=f.concat(p.slice(u,h+2)),0!==p[h]&&(f=f.concat([0,p[h+1]]))}else if("toself"===o.fill||"tonext"===o.fill){for(f=[],n=0,e.splitNull=!0,i=0;i-1;for(let[e]of d)if(e){var j=e.trace,F=e.t,B=F.index,N=j._length,U=F.x,V=F.y;if(j.selectedpoints||D||R){if(D||(D=!0),j.selectedpoints){var q=y.selectBatch[B]=j.selectedpoints,H={};for(m=0;mi&&s||nh?b.sizeAvg||Math.max(b.size,3):i(t,x),p=0;ptypeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"u">typeof S&&null!==S&&S.hrtime?(t.exports=function(){return(e()-i)/1e6},r=S.hrtime,i=(e=function(){var e;return 1e9*(e=r())[0]+e[1]})()-1e9*S.uptime()):Date.now?(t.exports=function(){return Date.now()-n},n=Date.now()):(t.exports=function(){return new Date().getTime()-n},n=new Date().getTime())}).call(e)}}),yF=d({"node_modules/raf/index.js"(e,t){var r,n,i,a,o,s=yj(),l=window,c=["moz","webkit"],u="AnimationFrame",h=l["request"+u],f=l["cancel"+u]||l["cancelRequest"+u];for(r=0;!h&&r2?(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 h(e){if("number"==typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];{let t=s(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}t.exports=c,c.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=a(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,a(()=>{this.dirty=!1})),this)},c.prototype.update=function(...e){if(!e.length)return;for(let t=0;tt||!c.lower&&e{t[a+r]=n})}this.scatter.draw(...t)}else this.scatter.draw();return this},c.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this}}}),yU=d({"src/traces/splom/plot.js"(e,t){var r=yN(),n=tY(),i=t5(),a=ne().selectMode;t.exports=function(e,t,o){if(o.length)for(var s=0;s-1,C=a(x)||!!d.selectedpoints||E,L=!0;if(C){var I=d._length;if(d.selectedpoints){m.selectBatch=d.selectedpoints;var P=d.selectedpoints,z={};for(l=0;l=t[r][0]&&e<=t[r][1])return!0;return!1}(r,n))return r;var i=e?-1:1,a=0,o=t.length-1;if(i<0){var s=a;a=o,o=s}for(var u=t[a],h=u,f=a;i*ft){d=n;break}}if(isNaN(o=h)&&(o=isNaN(f)||isNaN(d)?isNaN(f)?d:f:t-u[f][1]e[1]+n||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(g,t);y&&(s.interval=c[o],s.intervalPix=g,s.region=y)}}if(e.ordinal&&!s.region){var v=e.unitTickvals,x=e.unitToPaddedPx.invert(t);for(n=0;n=b[0]&&x<=b[1]){s.clickableOrdinalRange=b;break}}}return s}function x(e,t){n.event.sourceEvent.stopPropagation();var i=t.height-n.mouse(e)[1]-2*r.verticalPadding,a=t.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[i-a.grabPoint,i+a.barLength-a.grabPoint].map(t.unitToPaddedPx.invert):a.newExtent=[a.startExtent,t.unitToPaddedPx.invert(i)].sort(o),t.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(t),y(e.parentNode)}function _(e,t){var i=t.height-n.mouse(e)[1]-2*r.verticalPadding,a=v(t,i),o="crosshair";a.clickableOrdinalRange?o="pointer":a.region&&(o=a.region+"-resize"),n.select(document.body).style("cursor",o)}function w(e){e.on("mousemove",function(e){n.event.preventDefault(),e.parent.inBrushDrag||_(this,e)}).on("mouseleave",function(e){e.parent.inBrushDrag||m()}).call(n.behavior.drag().on("dragstart",function(e){!function(e,t){n.event.sourceEvent.stopPropagation();var i=t.height-n.mouse(e)[1]-2*r.verticalPadding,a=t.unitToPaddedPx.invert(i),o=t.brush,s=v(t,i),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=i-u[0]-r.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter(function(e){return e[0]!==l[0]&&e[1]!==l[1]})),c.startExtent=s.region?l[+("s"===s.region)]:a,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)}).on("drag",function(e){x(this,e)}).on("dragend",function(e){!function(e,t){var r=t.brush,i=r.filter,a=r.svgBrush;a._dragging||(_(e,t),x(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1,n.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,m(),!a.wasDragged){a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&T(r)):T(r),a.brushCallback(t),y(e.parentNode),a.brushEndCallback(r.filterSpecified?i.getConsolidated():[]);return}var s=function(){i.set(i.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||T(r),a.brushCallback(t),c?y(e.parentNode,s):(s(),y(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?i.getConsolidated():[])}(this,e)}))}function k(e,t){return e[0]-t[0]}function T(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function A(e){for(var t,r=e.slice(),n=[],i=r.shift();i;){for(t=i.slice();(i=r.shift())&&i[0]<=t[1];)t[1]=Math.max(t[1],i[1]);n.push(t)}return 1===n.length&&n[0][0]>n[0][1]&&(n=[]),n}t.exports={makeBrush:function(e,t,r,n,i,a){var s,l,c,u=(c=[],{set:function(e){1===(c=e.map(function(e){return e.slice().sort(o)}).sort(k)).length&&c[0][0]===-1/0&&c[0][1]===1/0&&(c=[[0,-1]]),s=A(c),l=c.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0])},get:function(){return c.slice()},getConsolidated:function(){return s},getBounds:function(){return l}});return u.set(r),{filter:u,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:function(e){var t=e.brush,r=t.svgBrush.extent.map(function(e){return e.slice()}).slice();t.filter.set(r),i()},brushEndCallback:a}}},ensureAxisBrush:function(e,t,n){var o,l,c,u,d=e.selectAll("."+r.cn.axisBrush).data(a,i);d.enter().append("g").classed(r.cn.axisBrush,!0),o=n._context.staticPlot,(l=d.selectAll(".background").data(a)).enter().append("rect").classed("background",!0).call(h).call(f).style("pointer-events",o?"none":"auto").attr("transform",s(0,r.verticalPadding)),l.call(w).attr("height",function(e){return e.height-r.verticalPadding}),(c=d.selectAll(".highlight-shadow").data(a)).enter().append("line").classed("highlight-shadow",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width+r.bar.strokeWidth).attr("stroke",t).attr("opacity",r.bar.strokeOpacity).attr("stroke-linecap","butt"),c.attr("y1",function(e){return e.height}).call(g),(u=d.selectAll(".highlight").data(a)).enter().append("line").classed("highlight",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width-r.bar.strokeWidth).attr("stroke",r.bar.fillColor).attr("opacity",r.bar.fillOpacity).attr("stroke-linecap","butt"),u.attr("y1",function(e){return e.height}).call(g)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map(function(e){return e.sort(o)}),e=t.multiselect?A(e.sort(k)):[e[0]]):e=[e.sort(o)],t.tickvals){var r=t.tickvals.slice().sort(o);if(!(e=e.map(function(e){var t=[u(0,r,e[0],[]),u(1,r,e[1],[])];if(t[1]>t[0])return t}).filter(function(e){return e})).length)return}return e.length>1?e:e[0]}}}}),y0=d({"src/traces/parcoords/defaults.js"(e,t){var r=tY(),n=rn().hasColorscale,i=rv(),a=aC().defaults,o=rp(),s=rz(),l=y$(),c=yQ(),u=yK().maxDimensionCount,h=yz();function f(e,t,n,i){function a(n,i){return r.coerce(e,t,l.dimensions,n,i)}var o=a("values"),u=a("visible");if(o&&o.length||(u=t.visible=!1),u){a("label"),a("tickvals"),a("ticktext"),a("tickformat"),t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:a("range")},s.setConvert(t._ax,i.layout),a("multiselect");var h=a("constraintrange");h&&(t.constraintrange=c.cleanRanges(h,t))}}t.exports=function(e,t,s,c){function d(n,i){return r.coerce(e,t,l,n,i)}var p=e.dimensions;Array.isArray(p)&&p.length>u&&(r.log("parcoords traces support up to "+u+" dimensions at the moment"),p.splice(u));var m=o(e,t,{name:"dimensions",layout:c,handleItemDefaults:f}),g=function(e,t,a,o,s){var l=s("line.color",a);if(n(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,s,c,d);a(t,c,d),Array.isArray(m)&&m.length||(t.visible=!1),h(t,m,"values",g);var y=r.extendFlat({},c.font,{size:Math.round(c.font.size/1.2)});r.coerceFont(d,"labelfont",y),r.coerceFont(d,"tickfont",y,{autoShadowDflt:!0}),r.coerceFont(d,"rangefont",y),d("labelangle"),d("labelside"),d("unselected.line.color"),d("unselected.line.opacity")}}}),y1=d({"src/traces/parcoords/calc.js"(e,t){var r=tY().isArrayOrTypedArray,n=rw(),i=yJ().wrap;t.exports=function(e,t){var a,o;return n.hasColorscale(t,"line")&&r(t.line.color)?(a=t.line.color,o=n.extractOpts(t.line).colorscale,n.calc(e,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=function(e){for(var t=Array(e),r=0;r>>16,(65280&e)>>>8,255&e],alpha:1};if(e=String(e).toLowerCase(),y3.default[e])a=y3.default[e].slice(),i="rgb";else if("transparent"===e)o=0,i="rgb",a=[0,0,0];else if("#"===e[0]){var s=e.slice(1),l=s.length;o=1,l<=4?(a=[parseInt(s[0]+s[0],16),parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16)],4===l&&(o=parseInt(s[3]+s[3],16)/255)):(a=[parseInt(s[0]+s[1],16),parseInt(s[2]+s[3],16),parseInt(s[4]+s[5],16)],8===l&&(o=parseInt(s[6]+s[7],16)/255)),a[0]||(a[0]=0),a[1]||(a[1]=0),a[2]||(a[2]=0),i="rgb"}else if(n=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var c="cmyk"===(i=n[1].replace(/a$/,""))?4:"gray"===i?1:3;a=n[2].trim().split(/\s*[,\/]\s*|\s+/),"color"===i&&(i=a.shift()),o=(a=a.map(function(e,t){if("%"===e[e.length-1])return e=parseFloat(e)/100,3===t?e:"rgb"===i?255*e:"h"!==i[0]&&("l"!==i[0]||t)?"lab"===i?125*e:"lch"===i?t<2?150*e:360*e:"o"!==i[0]||t?"oklab"===i?.4*e:"oklch"===i?t<2?.4*e:360*e:e:e:100*e;if("h"===i[t]||2===t&&"h"===i[i.length-1]){if(void 0!==y4[e])return y4[e];if(e.endsWith("deg"))return parseFloat(e);if(e.endsWith("turn"))return 360*parseFloat(e);if(e.endsWith("grad"))return 360*parseFloat(e)/400;if(e.endsWith("rad"))return 180*parseFloat(e)/Math.PI}return"none"===e?0:parseFloat(e)})).length>c?a.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(a=e.match(/([0-9]+)/g).map(function(e){return parseFloat(e)}),i=(null==(r=null==(t=e.match(/([a-z])/ig))?void 0:t.join(""))?void 0:r.toLowerCase())||"rgb");return{space:i,values:a,alpha:o}}var y3,y5,y4,y6,y8,y9=f({"node_modules/color-parse/index.js"(){y3=g(dz(),1),y5=y2,y4={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),y7=f({"node_modules/color-space/rgb.js"(){y6={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),ve=f({"node_modules/color-space/hsl.js"(){y7(),y8={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t,r,n,i,a,o=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return[a=255*l,a,a];for(r=l<.5?l*(1+s):l+s-l*s,t=2*l-r,i=[0,0,0];c<3;)(n=o+-(1/3*(c-1)))<0?n++:n>1&&n--,a=6*n<1?t+(r-t)*6*n:2*n<1?r:3*n<2?t+(r-t)*(2/3-n)*6:t,i[c++]=255*a;return i}},y6.hsl=function(e){var t,r,n=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(n,i,a),s=Math.max(n,i,a),l=s-o;return s===o?t=0:n===s?t=(i-a)/l:i===s?t=2+(a-n)/l:a===s&&(t=4+(n-i)/l),(t=Math.min(60*t,360))<0&&(t+=360),r=(o+s)/2,[t,100*(s===o?0:r<=.5?l/(s+o):l/(2-s-o)),100*r]}}}),vt={};function vr(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e*=1);var t,r=y5(e);if(!r.space)return[];let n="h"===r.space[0]?y8.min:y6.min,i="h"===r.space[0]?y8.max:y6.max;return(t=[,,,])[0]=Math.min(Math.max(r.values[0],n[0]),i[0]),t[1]=Math.min(Math.max(r.values[1],n[1]),i[1]),t[2]=Math.min(Math.max(r.values[2],n[2]),i[2]),"h"===r.space[0]&&(t=y8.rgb(t)),t.push(Math.min(Math.max(r.alpha,0),1)),t}p(vt,{default:()=>vr});var vn=f({"node_modules/color-rgba/index.js"(){y9(),y7(),ve()}}),vi=d({"src/traces/parcoords/helpers.js"(e){var t=tY().isTypedArray;e.convertTypedArray=function(e){return t(e)?Array.prototype.slice.call(e):e},e.isOrdinal=function(e){return!!e.tickvals},e.isVisible=function(e){return e.visible||!("visible"in e)}}}),va=d({"src/traces/parcoords/lines.js"(e,t){var r=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` -`),n=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),i=yK().maxDimensionCount,a=tY(),o=new Uint8Array(4),s=new Uint8Array(4),l={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function c(e,t,r,n,i){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,n,i),e.clear({color:[0,0,0,0],depth:1})}function u(e,t){return(e>>>8*t)%256/255}function h(e){return("0"+e).slice(-2)}function f(e){return ef&&(f=e[n].dim1.canvasX,s=n);0===l&&c(x,0,0,h.canvasWidth,h.canvasHeight);var b=function(e){var t,r,n,i=[[],[]];for(n=0;n<64;n++){var a=!e&&ns._length&&(P=P.slice(0,s._length));var z,O=s.tickvals;function D(e,t){return{val:e,text:z[t]}}function R(e,t){return e.val-t.val}if(i(O)&&O.length){n.isTypedArray(O)&&(O=Array.from(O)),i(z=s.ticktext)&&z.length?z.length>O.length?z=z.slice(0,O.length):O.length>z.length&&(O=O.slice(0,z.length)):z=O.map(a(s.tickformat));for(var j=1;j=n)&&!(l>=i)){var c=e.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:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:h};h!==B&&(u?a.hover(f):a.unhover&&a.unhover(f),B=h)}}}),F.style("opacity",function(e){return+!e.pick}),b.style("background","rgba(255, 255, 255, 0)");var N=b.selectAll("."+x.cn.parcoords).data(j,p);N.exit().remove(),N.enter().append("g").classed(x.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),N.attr("transform",function(e){return c(e.model.translateX,e.model.translateY)});var U=N.selectAll("."+x.cn.parcoordsControlView).data(m,p);U.enter().append("g").classed(x.cn.parcoordsControlView,!0),U.attr("transform",function(e){return c(e.model.pad.l,e.model.pad.t)});var V=U.selectAll("."+x.cn.yAxis).data(function(e){return e.dimensions},p);V.enter().append("g").classed(x.cn.yAxis,!0),U.each(function(e){P(V,e,A)}),F.each(function(e){if(e.viewModel){!e.lineLayer||a?e.lineLayer=w(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||a;e.lineLayer.render(e.viewModel.panels,t)}}),V.attr("transform",function(e){return c(e.xScale(e.xIndex),0)}),V.call(r.behavior.drag().origin(function(e){return e}).on("drag",function(e){var t=e.parent;R.linePickActive(!1),e.x=Math.max(-x.overdrag,Math.min(e.model.width+x.overdrag,r.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,V.sort(function(e,t){return e.x-t.x}).each(function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio}),P(V,t,A),V.filter(function(t){return 0!==Math.abs(e.xIndex-t.xIndex)}).attr("transform",function(e){return c(e.xScale(e.xIndex),0)}),r.select(this).attr("transform",c(e.x,0)),V.each(function(r,n,i){i===e.parent.key&&(t.dimensions[n]=r)}),t.contextLayer&&t.contextLayer.render(t.panels,!1,!S(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)}).on("dragend",function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,P(V,t,A),r.select(this).attr("transform",function(e){return c(e.x,0)}),t.contextLayer&&t.contextLayer.render(t.panels,!1,!S(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),R.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(t.key,t.dimensions.map(function(e){return e.crossfilterDimensionIndex}))})),V.exit().remove();var q=V.selectAll("."+x.cn.axisOverlays).data(m,p);q.enter().append("g").classed(x.cn.axisOverlays,!0),q.selectAll("."+x.cn.axis).remove();var H=q.selectAll("."+x.cn.axis).data(m,p);H.enter().append("g").classed(x.cn.axis,!0),H.each(function(e){var t=e.model.height/e.model.tickDistance,n=e.domainScale,i=n.domain();r.select(this).call(r.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?i:null).tickFormat(function(t){return v.isOrdinal(e)?t:z(e.model.dimensions[e.visibleIndex],t)}).scale(n)),h.font(H.selectAll("text"),e.model.tickFont)}),H.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),H.selectAll("text").style("cursor","default");var G=q.selectAll("."+x.cn.axisHeading).data(m,p);G.enter().append("g").classed(x.cn.axisHeading,!0);var W=G.selectAll("."+x.cn.axisTitle).data(m,p);W.enter().append("text").classed(x.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",d?"none":"auto"),W.text(function(e){return e.label}).each(function(t){var n=r.select(this);h.font(n,t.model.labelFont),u.convertToTspans(n,e)}).attr("transform",function(e){var t=I(e.model.labelAngle,e.model.labelSide),r=x.axisTitleOffset;return(t.dir>0?"":c(0,2*r+e.model.height))+l(t.degrees)+c(-r*t.dx,-r*t.dy)}).attr("text-anchor",function(e){var t=I(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"});var Y=q.selectAll("."+x.cn.axisExtent).data(m,p);Y.enter().append("g").classed(x.cn.axisExtent,!0);var X=Y.selectAll("."+x.cn.axisExtentTop).data(m,p);X.enter().append("g").classed(x.cn.axisExtentTop,!0),X.attr("transform",c(0,-x.axisExtentOffset));var Z=X.selectAll("."+x.cn.axisExtentTopText).data(m,p);Z.enter().append("text").classed(x.cn.axisExtentTopText,!0).call(L),Z.text(function(e){return O(e,!0)}).each(function(e){h.font(r.select(this),e.model.rangeFont)});var $=Y.selectAll("."+x.cn.axisExtentBottom).data(m,p);$.enter().append("g").classed(x.cn.axisExtentBottom,!0),$.attr("transform",function(e){return c(0,e.model.height+x.axisExtentOffset)});var K=$.selectAll("."+x.cn.axisExtentBottomText).data(m,p);K.enter().append("text").classed(x.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(L),K.text(function(e){return O(e,!1)}).each(function(e){h.font(r.select(this),e.model.rangeFont)}),_.ensureAxisBrush(q,D,e)}}}),vs=d({"src/traces/parcoords/plot.js"(e,t){var r=vo(),n=yE(),i=vi().isVisible,a={};function o(e,t,r){var n=t.indexOf(r),i=e.indexOf(n);return -1===i&&(i+=t.length),i}var e=t.exports=function(e,t){var s=e._fullLayout;if(n(e,[],a)){var l={},c={},u={},h=s._size;t.forEach(function(t,r){var n=t[0].trace,i=u[r]=n.index;l[r]=e.data[i].dimensions,c[r]=e.data[i].dimensions.slice()}),r(e,t,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(t,r,n){var i=c[t][r],a=n.map(function(e){return e.slice()}),o="dimensions["+r+"].constraintrange",l=s._tracePreGUI[e._fullData[u[t]].uid];if(void 0===l[o]){var h=i.constraintrange;l[o]=h||null}var f=e._fullData[u[t]].dimensions[r];a.length?(1===a.length&&(a=a[0]),i.constraintrange=a,f.constraintrange=a.slice(),a=[a]):(delete i.constraintrange,delete f.constraintrange,a=null);var d={};d[o]=a,e.emit("plotly_restyle",[d,[u[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var n,a=(n=c[t].filter(i),function(e,t){return o(r,n,e)-o(r,n,t)});l[t].sort(a),c[t].filter(function(e){return!i(e)}).sort(function(e){return c[t].indexOf(e)}).forEach(function(e){l[t].splice(l[t].indexOf(e),1),l[t].splice(c[t].indexOf(e),0,e)}),e.emit("plotly_restyle",[{dimensions:[l[t]]},[u[t]]])}})}};e.reglPrecompiled=a}}),vl=d({"src/traces/parcoords/base_plot.js"(e){var t=b(),r=t8().getModuleCalcData,n=vs(),i=re();e.name="parcoords",e.plot=function(e){var t=r(e.calcdata,"parcoords")[0];t.length&&n(e,t)},e.clean=function(e,t,r,n){var i=n._has&&n._has("parcoords"),a=t._has&&t._has("parcoords");i&&!a&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())},e.toSVG=function(e){var r=e._fullLayout._glimages,n=t.select(e).selectAll(".svg-container");n.filter(function(e,t){return t===n.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var e=this.toDataURL("image/png");r.append("svg:image").attr({xmlns:i.svg,"xlink:href":e,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})}),window.setTimeout(function(){t.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),vc=d({"src/traces/parcoords/base_index.js"(e,t){t.exports={attributes:y$(),supplyDefaults:y0(),calc:y1(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:vl(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),vu=d({"src/traces/parcoords/index.js"(e,t){var r=vc();r.plot=vs(),t.exports=r}}),vh=d({"lib/parcoords.js"(e,t){t.exports=vu()}}),vf=d({"src/traces/parcats/attributes.js"(e,t){var r=U().extendFlat,n=W(),i=V(),a=rs(),{hovertemplateAttrs:o,templatefallbackAttrs:s}=th(),l=aC().attributes,c=r({editType:"calc"},a("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:s({editType:"plot"})});t.exports={domain:l({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:r({},n.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:s({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:i({editType:"calc"}),tickfont:i({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:c,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),vd=d({"src/traces/parcats/defaults.js"(e,t){var r=tY(),n=rn().hasColorscale,i=rv(),a=aC().defaults,o=rp(),s=vf(),l=yz(),c=L().isTypedArraySpec;function u(e,t){function n(n,i){return r.coerce(e,t,s.dimensions,n,i)}var i=n("values"),a=n("visible");if(i&&i.length||(a=t.visible=!1),a){n("label"),n("displayindex",t._index);var o,l=e.categoryarray,u=r.isArrayOrTypedArray(l)&&l.length>0||c(l);u&&(o="array");var h=n("categoryorder",o);"array"===h?(n("categoryarray"),n("ticktext")):(delete e.categoryarray,delete e.ticktext),u||"array"!==h||(t.categoryorder="trace")}}t.exports=function(e,t,c,h){function f(n,i){return r.coerce(e,t,s,n,i)}var d=o(e,t,{name:"dimensions",handleItemDefaults:u}),p=function(e,t,a,o,s){s("line.shape"),s("line.hovertemplate"),s("line.hovertemplatefallback");var l=s("line.color",o.colorway[0]);if(n(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),i(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,c,h,f);a(t,h,f),Array.isArray(d)&&d.length||(t.visible=!1),l(t,d,"values",p),f("hoveron"),f("hovertemplate"),f("hovertemplatefallback"),f("arrangement"),f("bundlecolors"),f("sortpaths"),f("counts");var m=h.font;r.coerceFont(f,"labelfont",m,{overrideDflt:{size:Math.round(m.size)}}),r.coerceFont(f,"tickfont",m,{autoShadowDflt:!0,overrideDflt:{size:Math.round(m.size/1.2)}})}}}),vp=d({"src/traces/parcats/calc.js"(e,t){var r=yJ().wrap,n=rn().hasColorscale,i=r_(),a=tR(),o=rE(),s=tY(),l=A();t.exports=function(e,t){var c,u,h,f,d,p,m=s.filterVisible(t.dimensions);if(0===m.length)return[];var g,y,v,x=m.map(function(e){var t;if("trace"===e.categoryorder)t=null;else if("array"===e.categoryorder)t=e.categoryarray;else{t=a(e.values);for(var r=!0,n=0;n=e.length||void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(e.map(function(e){return e.displayindex})))for(t=0;tt.model.rawColor?1:e.model.rawColor"),C=r.mouse(h)[0];o.loneHover({trace:f,x:b-p.left+m.left,y:_-p.top+m.top,text:E,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:k,idealAlign:Ca.mostReadable(e.model.color)).attr("stroke-width",.3)}function k(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function T(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function A(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,n=e.categoryViewModel.model.categoryInd;return t.filter(function(t){return t.model.categoryInds[r]===n&&t.model.color===e.color})}function M(e,t,n){var i=r.select(e).datum(),a=i.categoryViewModel.model,o=i.parcatsViewModel.graphDiv,s=r.select(e.parentNode).selectAll("rect.bandrect"),l=[];s.each(function(e){A(e).each(function(e){Array.prototype.push.apply(l,g(e))})});var c={};c[a.dimensionInd]=a.categoryValue,o.emit(t,{points:l,event:n,constraints:c})}function S(e,t,n){var i=r.select(e).datum(),a=i.categoryViewModel.model,o=i.parcatsViewModel.graphDiv,s=A(i),l=[];s.each(function(e){Array.prototype.push.apply(l,g(e))});var c={};c[a.dimensionInd]=a.categoryValue,void 0!==i.rawColor&&(c.color=i.rawColor),o.emit(t,{points:l,event:n,constraints:c})}function E(e,t,n){e._fullLayout._calcInverseTransform(e);var i,a,o=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=r.select(n.parentNode).select("rect.catrect"),c=l.node().getBoundingClientRect(),u=l.datum(),h=u.parcatsViewModel,f=h.model.dimensions[u.model.dimensionInd],d=h.trace,p=c.top+c.height/2;h.dimensions.length>1&&f.displayInd===h.dimensions.length-1?(i=c.left,a="left"):(i=c.left+c.width,a="right");var m=u.model.count,g=u.model.categoryLabel,y=m/u.parcatsViewModel.model.count,v={countLabel:m,categoryLabel:g,probabilityLabel:y.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",v.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+v.categoryLabel+"):",v.probabilityLabel].join(" "));var b=x.join("
");return{trace:d,x:o*(i-t.left),y:s*(p-t.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:d.hovertemplate,hovertemplateLabels:v,eventData:[{data:d._input,fullData:d,count:m,category:g,probability:y}]}}function C(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){var t;if(!(r.mouse(this)[1]<-1)){var n,i,l,c,u,h,f,d,p,m,g,y,v,x,b,_,k,T,C,L,I,P,z,O,D,R,j,F=e.parcatsViewModel.graphDiv,B=F._fullLayout,N=B._paperdiv.node().getBoundingClientRect(),U=e.parcatsViewModel.hoveron;("color"===U?(w(l=A(i=r.select(this).datum())),l.each(function(){s.raiseToTop(this)}),r.select(this.parentNode).selectAll("rect.bandrect").filter(function(e){return e.color===i.color}).each(function(){s.raiseToTop(this),r.select(this).attr("stroke","black").attr("stroke-width",1.5)}),S(this,"plotly_hover",r.event)):(n=this,r.select(n.parentNode).selectAll("rect.bandrect").each(function(e){var t=A(e);w(t),t.each(function(){s.raiseToTop(this)})}),r.select(n.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5),M(this,"plotly_hover",r.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none"))&&("category"===U?t=E(F,N,this):"color"===U?(F._fullLayout._calcInverseTransform(F),h=F._fullLayout._invScaleX,f=F._fullLayout._invScaleY,d=this.getBoundingClientRect(),y=(g=(m=(p=r.select(this).datum()).categoryViewModel).parcatsViewModel).model.dimensions[m.model.dimensionInd],v=g.trace,x=d.y+d.height/2,g.dimensions.length>1&&y.displayInd===g.dimensions.length-1?(c=d.left,u="left"):(c=d.left+d.width,u="right"),b=m.model.categoryLabel,_=p.parcatsViewModel.model.count,k=0,p.categoryViewModel.bands.forEach(function(e){e.color===p.color&&(k+=e.count)}),T=m.model.count,C=0,g.pathSelection.each(function(e){e.model.color===p.color&&(C+=e.model.count)}),L=k/_,I=k/C,P=k/T,z={countLabel:k,categoryLabel:b,probabilityLabel:L.toFixed(3)},O=[],-1!==m.parcatsViewModel.hoverinfoItems.indexOf("count")&&O.push(["Count:",z.countLabel].join(" ")),-1!==m.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(O.push("P(color ∩ "+b+"): "+z.probabilityLabel),O.push("P("+b+" | color): "+I.toFixed(3)),O.push("P(color | "+b+"): "+P.toFixed(3))),D=O.join("
"),R=a.mostReadable(p.color),t={trace:v,x:h*(c-N.left),y:f*(x-N.top),text:D,color:p.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:R,fontSize:10,idealAlign:u,hovertemplate:v.hovertemplate,hovertemplateLabels:z,eventData:[{data:v._input,fullData:v,category:b,count:_,probability:L,categorycount:T,colorcount:C,bandcolorcount:k}]}):"dimension"===U&&(j=[],r.select(this.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){j.push(E(F,N,this))}),t=j),t&&o.loneHover(t,{container:B._hoverlayer.node(),outerContainer:B._paper.node(),gd:F}))}}}function L(e){var t=e.parcatsViewModel;t.dragDimension||(_(t.pathSelection),k(t.dimensionSelection.selectAll("g.category")),T(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(d),-1!==t.hoverinfoItems.indexOf("skip"))||("color"===e.parcatsViewModel.hoveron?S(this,"plotly_unhover",r.event):M(this,"plotly_unhover",r.event))}function I(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(e){return e.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,r.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var n=r.mouse(this)[0],i=r.mouse(this)[1];-2<=n&&n<=t.width+2&&-2<=i&&i<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(e){return e.displayInd}),t.model.dragY=t.y,s.raiseToTop(this.parentNode),r.select(this.parentNode).selectAll("rect.bandrect").each(function(t){t.yc.y+c.height/2&&(i.model.displayInd=c.model.displayInd,c.model.displayInd=o),e.dragCategoryDisplayInd=i.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){n.model.dragX=r.event.x;var u=e.parcatsViewModel.dimensions[t-1],h=e.parcatsViewModel.dimensions[t+1];void 0!==u&&n.model.dragXh.x&&(n.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=n.model.displayInd}N(e.parcatsViewModel),B(e.parcatsViewModel),R(e.parcatsViewModel),D(e.parcatsViewModel)}}function z(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){r.select(this).selectAll("text").attr("font-weight","normal");var t={},n=O(e.parcatsViewModel),a=e.parcatsViewModel.model.dimensions.map(function(e){return e.displayInd}),o=e.initialDragDimensionDisplayInds.some(function(e,t){return e!==a[t]});o&&a.forEach(function(r,n){t["dimensions["+e.parcatsViewModel.model.dimensions[n].containerInd+"].displayindex"]=r});var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map(function(e){return e.displayInd});if(s=e.initialDragCategoryDisplayInds.some(function(e,t){return e!==l[t]})){var c=e.model.categories.slice().sort(function(e,t){return e.displayInd-t.displayInd}),u=c.map(function(e){return e.categoryValue}),h=c.map(function(e){return e.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[h],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?S(e.potentialClickBand,"plotly_click",r.event.sourceEvent):M(e.potentialClickBand,"plotly_click",r.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd&&(e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null),e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,N(e.parcatsViewModel),B(e.parcatsViewModel),r.transition().duration(300).ease("cubic-in-out").each(function(){R(e.parcatsViewModel,!0),D(e.parcatsViewModel,!0)}).each("end",function(){(o||s)&&i.restyle(e.parcatsViewModel.graphDiv,t,[n])})}}function O(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;s--)u+="C"+c[s]+","+(t[s+1]+i)+" "+l[s]+","+(t[s]+i)+" "+(e[s]+r[s])+","+(t[s]+i)+("l-"+r[s])+",0 ";return u+"Z"}function B(e){var t=e.dimensions,r=e.model,n=t.map(function(e){return e.categories.map(function(e){return e.y})}),i=e.model.dimensions.map(function(e){return e.categories.map(function(e){return e.displayInd})}),a=e.model.dimensions.map(function(e){return e.displayInd}),o=e.dimensions.map(function(e){return e.model.dimensionInd}),s=t.map(function(e){return e.x}),l=t.map(function(e){return e.width}),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function h(e){var t=e.categoryInds.map(function(e,t){return i[t][e]});return o.map(function(e){return t[e]})}c.sort(function(t,r){var n=h(t),i=h(r);return"backward"===e.sortpaths&&(n.reverse(),i.reverse()),n.push(t.valueInds[0]),i.push(r.valueInds[0]),e.bundlecolors&&(n.unshift(t.rawColor),i.unshift(r.rawColor)),ni)});for(var f=Array(c.length),d=t[0].model.count,p=t[0].categories.map(function(e){return e.height}).reduce(function(e,t){return e+t}),m=0;m0?p*(v.count/d):0;for(var x=Array(n.length),b=0;b1?(e.width-80-16)/(n-1):0)*i;var a,o,s,l,c,u=[],h=e.model.maxCats,f=t.categories.length,d=t.count,p=e.height-8*(h-1),m=(h-f)*8/2,g=t.categories.map(function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}});for(g.sort(function(e,t){return e.displayInd-t.displayInd}),c=0;c0?o.count/d*p:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:m,bands:[],parcatsViewModel:e},m=m+a+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}(e,a))}e.dimensions=r}t.exports=function(e,t,n,i){var a,o,g,y,v,b,w,A,M,S,E,O;a=e._context.staticPlot,o=n.map(j.bind(0,e,i)),(g=t.selectAll("g.parcatslayer").data([null])).enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all"),v=(y=g.selectAll("g.trace.parcats").data(o,h)).enter().append("g").attr("class","trace parcats"),y.attr("transform",function(e){return l(e.x,e.y)}),v.append("g").attr("class","paths"),(b=y.select("g.paths").selectAll("path.path").data(function(e){return e.paths},h)).attr("fill",function(e){return e.model.color}),_(w=b.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(e){return e.model.color}).attr("fill-opacity",0)),b.attr("d",function(e){return e.svgD}),w.empty()||b.sort(d),b.exit().remove(),b.on("mouseover",p).on("mouseout",m).on("click",x),v.append("g").attr("class","dimensions"),(A=y.select("g.dimensions").selectAll("g.dimension").data(function(e){return e.dimensions},h)).enter().append("g").attr("class","dimension"),A.attr("transform",function(e){return l(e.x,0)}),A.exit().remove(),S=(M=A.selectAll("g.category").data(function(e){return e.categories},h)).enter().append("g").attr("class","category"),M.attr("transform",function(e){return l(0,e.y)}),S.append("rect").attr("class","catrect").attr("pointer-events","none"),M.select("rect.catrect").attr("fill","none").attr("width",function(e){return e.width}).attr("height",function(e){return e.height}),k(S),(E=M.selectAll("rect.bandrect").data(function(e){return e.bands},h)).each(function(){s.raiseToTop(this)}),E.attr("fill",function(e){return e.color}),O=E.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(e){return e.color}).attr("fill-opacity",0),E.attr("fill",function(e){return e.color}).attr("width",function(e){return e.width}).attr("height",function(e){return e.height}).attr("y",function(e){return e.y}).attr("cursor",function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"}),T(O),E.exit().remove(),S.append("text").attr("class","catlabel").attr("pointer-events","none"),M.select("text.catlabel").attr("text-anchor",function(e){return f(e)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(e){return f(e)?e.width+5:-5}).attr("y",function(e){return e.height/2}).text(function(e){return e.model.categoryLabel}).each(function(t){c.font(r.select(this),t.parcatsViewModel.categorylabelfont),u.convertToTspans(r.select(this),e)}),S.append("text").attr("class","dimlabel"),M.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"}).attr("x",function(e){return e.width/2}).attr("y",-5).text(function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null}).each(function(e){c.font(r.select(this),e.parcatsViewModel.labelfont)}),M.selectAll("rect.bandrect").on("mouseover",C).on("mouseout",L),M.exit().remove(),A.call(r.behavior.drag().origin(function(e){return{x:e.x,y:0}}).on("dragstart",I).on("drag",P).on("dragend",z)),y.each(function(e){e.traceSelection=r.select(this),e.pathSelection=r.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=r.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),y.exit().remove()}}}),vg=d({"src/traces/parcats/plot.js"(e,t){var r=vm();t.exports=function(e,t,n,i){var a=e._fullLayout,o=a._paper,s=a._size;r(e,o,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,i)}}}),vy=d({"src/traces/parcats/base_plot.js"(e){var t=t8().getModuleCalcData,r=vg(),n="parcats";e.name=n,e.plot=function(e,i,a,o){var s=t(e.calcdata,n);s.length&&r(e,s[0],a,o)},e.clean=function(e,t,r,n){var i=n._has&&n._has("parcats"),a=t._has&&t._has("parcats");i&&!a&&n._paperdiv.selectAll(".parcats").remove()}}}),vv=d({"src/traces/parcats/index.js"(e,t){t.exports={attributes:vf(),supplyDefaults:vd(),calc:vp(),plot:vg(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:vy(),categories:["noOpacity"],meta:{}}}}),vx=d({"lib/parcats.js"(e,t){t.exports=vv()}}),vb=d({"src/plots/map/styles/arcgis-sat-hybrid.js"(e,t){t.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI ©
ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} -{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} -{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} -{name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} -{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin} -{name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),v_=d({"src/plots/map/styles/arcgis-sat.js"(e,t){t.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),vw=d({"src/plots/map/constants.js"(e,t){var r=(tA(),y(tw)).default,n=vb(),i=v_(),a="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",s="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",l={basic:s,streets:s,outdoors:s,light:a,dark:o,satellite:i,"satellite-streets":n,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:'\xa9 OpenStreetMap contributors',tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":a,"carto-darkmatter":o,"carto-voyager":s,"carto-positron-nolabels":"https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json","carto-darkmatter-nolabels":"https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json","carto-voyager-nolabels":"https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json"},c=r(l);t.exports={styleValueDflt:"basic",stylesMap:l,styleValuesMap:c,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",c.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),vk=d({"src/plots/map/layout_attributes.js"(e,t){var r=tY(),n=eC().defaultLine,i=aC().attributes,a=V(),o=nG().textposition,s=tl().overrideAll,l=t2().templatedArray,c=vw(),u=a({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});u.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=s({_arrayAttrRegexps:[r.counterRegex("map",".layers",!0)],domain:i({name:"map"}),style:{valType:"any",values:c.styleValuesMap,dflt:c.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:l("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:n},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:n}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:u,textposition:r.extendFlat({},o,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),vT=d({"src/traces/scattermap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:n,templatefallbackAttrs:i}=th(),a=nH(),o=pD(),s=nG(),l=vk(),c=W(),u=rs(),h=U().extendFlat,f=tl().overrideAll,d=vk(),p=o.line,m=o.marker;t.exports=f({lon:o.lon,lat:o.lat,cluster:{enabled:{valType:"boolean"},maxzoom:h({},d.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:h({},m.opacity,{dflt:1})},mode:h({},s.mode,{dflt:"markers"}),text:h({},s.text,{}),texttemplate:n({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:i({editType:"plot"}),hovertext:h({},s.hovertext,{}),line:{color:p.color,width:p.width},connectgaps:s.connectgaps,marker:h({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},u("marker")),fill:o.fill,fillcolor:a(),textfont:l.layers.symbol.textfont,textposition:l.layers.symbol.textposition,below:{valType:"string"},selected:{marker:s.selected.marker},unselected:{marker:s.unselected.marker},hoverinfo:h({},c.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:r(),hovertemplatefallback:i()},"calc","nested")}}),vA=d({"src/traces/scattermap/constants.js"(e,t){var r=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];t.exports={isSupportedFont:function(e){return -1!==r.indexOf(e)}}}}),vM=d({"src/traces/scattermap/defaults.js"(e,t){var r=tY(),n=rk(),i=io(),a=is(),o=ic(),s=iu(),l=vT(),c=vA().isSupportedFont;t.exports=function(e,t,u,h){function f(n,i){return r.coerce(e,t,l,n,i)}function d(n,i){return r.coerce2(e,t,l,n,i)}if(p=t,g=(m=f)("lon")||[],y=m("lat")||[],p._length=v=Math.min(g.length,y.length),!v){t.visible=!1;return}if(f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),f("below"),n.hasMarkers(t)){i(e,t,u,h,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var p,m,g,y,v,x=t.marker;"circle"!==x.symbol&&(r.isArrayOrTypedArray(x.size)&&(x.size=x.size[0]),r.isArrayOrTypedArray(x.color)&&(x.color=x.color[0]))}n.hasLines(t)&&(a(e,t,u,h,f,{noDash:!0}),f("connectgaps"));var b=d("cluster.maxzoom"),_=d("cluster.step"),w=d("cluster.color",t.marker&&t.marker.color||u),k=d("cluster.size"),T=d("cluster.opacity");if(f("cluster.enabled",!1!==b||!1!==_||!1!==w||!1!==k||!1!==T)||n.hasText(t)){var A=h.font.family;o(e,t,h,f,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:c(A)?A:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}f("fill"),"none"!==t.fill&&s(e,t,u,f),r.coerceSelectionMarkerOpacity(t,f)}}}),vS=d({"src/traces/scattermap/format_labels.js"(e,t){var r=rz();t.exports=function(e,t,n){var i={},a=n[t.subplot]._subplot.mockAxis,o=e.lonlat;return i.lonLabel=r.tickText(a,a.c2l(o[0]),!0).text,i.latLabel=r.tickText(a,a.c2l(o[1]),!0).text,i}}}),vE=d({"src/plots/map/convert_text_opts.js"(e,t){var r=tY();t.exports=function(e,t){var n=e.split(" "),i=n[0],a=n[1],o=r.isArrayOrTypedArray(t)?r.mean(t):t,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}}}}),vC=d({"src/traces/scattermap/convert.js"(e,t){var r=A(),n=tY(),i=M().BADNUM,a=pV(),o=rw(),s=rE(),l=rT(),c=rk(),u=vA().isSupportedFont,h=vE(),f=rA().appendArrayPointValue,d=rr().NEWLINES,p=rr().BR_TAG_ALL;function m(e){return{type:e,geojson:a.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(e,t){return n.isArrayOrTypedArray(e)?t?function(t){return r(e[t])?+e[t]:0}:function(t){return e[t]}:e?function(){return e}:y}function y(){return""}function v(e,t){var r;if(n.isArrayOrTypedArray(e)&&n.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var i=1;i850?s+=" Black":i>750?s+=" Extra Bold":i>650?s+=" Bold":i>550?s+=" Semi Bold":i>450?s+=" Medium":i>350?s+=" Regular":i>250?s+=" Light":i>150?s+=" Extra Light":s+=" Thin"):"Open Sans"===a.slice(0,2).join(" ")?(s="Open Sans",i>750?s+=" Extrabold":i>650?s+=" Bold":i>550?s+=" Semibold":i>350?s+=" Regular":s+=" Light"):"Klokantech Noto Sans"===a.slice(0,3).join(" ")&&(s="Klokantech Noto Sans","CJK"===a[3]&&(s+=" CJK"),s+=i>500?" Bold":" Regular")),o&&(s+=" Italic"),"Open Sans Regular Italic"===s?s="Open Sans Italic":"Open Sans Regular Bold"===s?s="Open Sans Bold":"Open Sans Regular Bold Italic"===s?s="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===s&&(s="Klokantech Noto Sans Italic"),u(s)||(s=r),s.split(", ")}t.exports=function(e,t){var u,b=t[0].trace,_=!0===b.visible&&0!==b._length,w="none"!==b.fill,k=c.hasLines(b),T=c.hasMarkers(b),A=c.hasText(b),M=T&&"circle"===b.marker.symbol,S=T&&"circle"!==b.marker.symbol,E=b.cluster&&b.cluster.enabled,C=m("fill"),L=m("line"),I=m("circle"),P=m("symbol"),z={fill:C,line:L,circle:I,symbol:P};if(!_)return z;if((w||k)&&(u=a.calcTraceToLineCoords(t)),w&&(C.geojson=a.makePolygon(u),C.layout.visibility="visible",n.extendFlat(C.paint,{"fill-color":b.fillcolor})),k&&(L.geojson=a.makeLine(u),L.layout.visibility="visible",n.extendFlat(L.paint,{"line-width":b.line.width,"line-color":b.line.color,"line-opacity":b.opacity})),M){var O=function(e){var t,a,c,u,h,f=e[0].trace,d=f.marker,p=f.selectedpoints,m=n.isArrayOrTypedArray(d.color),g=n.isArrayOrTypedArray(d.size),y=n.isArrayOrTypedArray(d.opacity);function v(e){return f.opacity*e}m&&(t=o.hasColorscale(f,"marker")?o.makeColorScaleFuncFromTrace(d):n.identity),g&&(a=l(f)),y&&(c=function(e){return v(r(e)?+n.constrain(e,0,1):0)});var x=[];for(h=0;h=0;t--){var r=a[t];i.removeLayer(h.layerIds[r])}e||i.removeSource(h.sourceIds.circle)}(e):function(e){for(var t=o.length-1;t>=0;t--){var r=o[t];i.removeLayer(h.layerIds[r]),e||i.removeSource(h.sourceIds[r])}}(e)}function d(e){c?function(e){e||h.addSource("circle",s.circle,t.cluster);for(var r=0;r=0;r--){var n=t[r];e.removeLayer(this.layerIds[n]),e.removeSource(this.sourceIds[n])}},t.exports=function(e,t){var r,i,l,c=t[0].trace,u=c.cluster&&c.cluster.enabled,h=!0!==c.visible,f=new s(e,c.uid,u,h),d=n(e.gd,t),p=f.below=e.belowLookup["trace-"+c.uid];if(u)for(f.addSource("circle",d.circle,c.cluster),r=0;r")}}t.exports={hoverPoints:function(e,t,a){var c=e.cd,u=c[0].trace,h=e.xa,f=e.ya,d=e.subplot,p=[],m=s+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;g&&(p=d.map.queryRenderedFeatures(null,{layers:[m]}).map(function(e){return e.id}));var y=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),v=t-y;if(r.getClosest(c,function(e){var t=e.lonlat;if(t[0]===o||g&&-1===p.indexOf(e.i+1))return 1/0;var r=n.modHalf(t[0],360),i=t[1],s=d.project([r,i]),l=s.x-h.c2p([v,i]),c=s.y-f.c2p([r,a]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)},e),!1!==e.index){var x=c[e.index],b=x.lonlat,_=[n.modHalf(b[0],360)+y,b[1]],w=h.c2p(_),k=f.c2p(_),T=x.mrc||1;e.x0=w-T,e.x1=w+T,e.y0=k-T,e.y1=k+T;var A={};A[u.subplot]={_subplot:d};var M=u._module.formatLabels(x,u,A);return e.lonLabel=M.lonLabel,e.latLabel=M.latLabel,e.color=i(u,x),e.extraText=l(u,x,c[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:l}}}),vP=d({"src/traces/scattermap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}}}),vz=d({"src/traces/scattermap/select.js"(e,t){var r=tY(),n=rk(),i=M().BADNUM;t.exports=function(e,t){var a,o=e.cd,s=e.xaxis,l=e.yaxis,c=[],u=o[0].trace;if(!n.hasMarkers(u))return[];if(!1===t)for(a=0;atypeof window&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))),e}}return n("shared",["exports"],function(e){let t,n,a,o,s,l,c,u,f,d,p,m,g,y,v,x;function b(e,t,r,n){return new(r||(r=Promise))(function(i,a){function o(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,s)}l((n=n.apply(e,t||[])).next())})}function _(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function w(e,t){this.x=e,this.y=t}"function"==typeof SuppressedError&&SuppressedError,w.prototype={clone:function(){return new w(this.x,this.y)},add:function(e){return this.clone()._add(e)},sub:function(e){return this.clone()._sub(e)},multByPoint:function(e){return this.clone()._multByPoint(e)},divByPoint:function(e){return this.clone()._divByPoint(e)},mult:function(e){return this.clone()._mult(e)},div:function(e){return this.clone()._div(e)},rotate:function(e){return this.clone()._rotate(e)},rotateAround:function(e,t){return this.clone()._rotateAround(e,t)},matMult:function(e){return this.clone()._matMult(e)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(e){return this.x===e.x&&this.y===e.y},dist:function(e){return Math.sqrt(this.distSqr(e))},distSqr:function(e){var t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith:function(e){return this.angleWithSep(e.x,e.y)},angleWithSep:function(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult:function(e){var t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add:function(e){return this.x+=e.x,this.y+=e.y,this},_sub:function(e){return this.x-=e.x,this.y-=e.y,this},_mult:function(e){return this.x*=e,this.y*=e,this},_div:function(e){return this.x/=e,this.y/=e,this},_multByPoint:function(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint:function(e){return this.x/=e.x,this.y/=e.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var e=this.y;return this.y=this.x,this.x=-e,this},_rotate:function(e){var t=Math.cos(e),r=Math.sin(e),n=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=n,this},_rotateAround:function(e,t){var r=Math.cos(e),n=Math.sin(e),i=t.y+n*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-n*(this.y-t.y),this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},w.convert=function(e){return e instanceof w?e:Array.isArray(e)?new w(e[0],e[1]):e};var k,T,A,M,S=_(w);function E(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=n}E.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,n=0;n<8;n++){var i=this.sampleCurveX(r)-e;if(Math.abs(i)Math.abs(a))break;r-=i/a}var o=0,s=1;for(r=e,n=0;n<20&&!(Math.abs((i=this.sampleCurveX(r))-e)i?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}};var C=_(E);function L(){return null==t&&(t="u">typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),t}function I(){if(null==n&&(n=!1,L())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let r=4*t;e.fillStyle=`rgb(${r},${r+1},${r+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){n=!0;break}}}return n||!1}function P(e,t,r,n){let i=new C(e,t,r,n);return e=>i.solve(e)}let z=P(.25,.1,.25,1);function O(e,t,r){return Math.min(r,Math.max(t,e))}function D(e,t,r){let n=r-t,i=((e-t)%n+n)%n+t;return i===t?r:i}function R(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}let j=1;function F(e,t,r){let n={};for(let r in e)n[r]=t.call(this,e[r],r,e);return n}function B(e,t,r){let n={};for(let r in e)t.call(this,e[r],r,e)&&(n[r]=e[r]);return n}function N(e){return Array.isArray(e)?e.map(N):"object"==typeof e&&e?F(e,N):e}let U={};function V(e){U[e]||("u">typeof console&&console.warn(e),U[e]=!0)}function q(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function H(e){return"u">typeof WorkerGlobalScope&&void 0!==e&&e instanceof WorkerGlobalScope}let G=null;function W(e){return"u">typeof ImageBitmap&&e instanceof ImageBitmap}let Y="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function X(e,t,r,n,i){return b(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(e,{timestamp:0});try{let o,s,l,c,u=a?.format;if(!u||!u.startsWith("BGR")&&!u.startsWith("RGB"))throw Error(`Unrecognized format ${u}`);let h=u.startsWith("BGR"),f=new Uint8ClampedArray(n*i*4);if(yield a.copyTo(f,(o=4*Math.max(-t,0),s=(Math.max(0,r)-r)*n*4+o,l=Math.max(0,t),c=Math.max(0,r),{rect:{x:l,y:c,width:Math.min(e.width,t+n)-l,height:Math.min(e.height,r+i)-c},layout:[{offset:s,stride:4*n}]})),h)for(let e=0;eH(self)?self.worker&&self.worker.referrer:("blob:"===window.location.protocol?window.parent:window).location.href,ei=function(e,t){var r;if(/:\/\//.test(e.url)&&!/^https?:|^file:/.test(e.url)){let r=ee(e.url);if(r)return r(e,t);if(H(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:et},t)}if(!(/^file:/.test(r=e.url)||/^file:/.test(en())&&!/^\w+:/.test(r))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(e,t){return b(this,void 0,void 0,function*(){let r,n=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:en(),signal:t.signal});"json"!==e.type||n.headers.has("Accept")||n.headers.set("Accept","application/json");let i=yield fetch(n);if(!i.ok){let t=yield i.blob();throw new er(i.status,i.statusText,e.url,t)}r="arrayBuffer"===e.type||"image"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text();let a=yield r;if(t.signal.aborted)throw J();return{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires")}})}(e,t);if(H(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:et},t)}return new Promise((r,n)=>{var i;let a=new XMLHttpRequest;for(let t in a.open(e.method||"GET",e.url,!0),"arrayBuffer"!==e.type&&"image"!==e.type||(a.responseType="arraybuffer"),e.headers)a.setRequestHeader(t,e.headers[t]);"json"===e.type&&(a.responseType="text",null!=(i=e.headers)&&i.Accept||a.setRequestHeader("Accept","application/json")),a.withCredentials="include"===e.credentials,a.onerror=()=>{n(Error(a.statusText))},a.onload=()=>{if(!t.signal.aborted)if((a.status>=200&&a.status<300||0===a.status)&&null!==a.response){let t=a.response;if("json"===e.type)try{t=JSON.parse(a.response)}catch(e){return void n(e)}r({data:t,cacheControl:a.getResponseHeader("Cache-Control"),expires:a.getResponseHeader("Expires")})}else{let t=new Blob([a.response],{type:a.getResponseHeader("Content-Type")});n(new er(a.status,a.statusText,e.url,t))}},t.signal.addEventListener("abort",()=>{a.abort(),n(J())}),a.send(e.body)})};function ea(e){if(!e||0>=e.indexOf("://")||0===e.indexOf("data:image/")||0===e.indexOf("blob:"))return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function eo(e,t,r){r[e]&&-1!==r[e].indexOf(t)||(r[e]=r[e]||[],r[e].push(t))}function es(e,t,r){if(r&&r[e]){let n=r[e].indexOf(t);-1!==n&&r[e].splice(n,1)}}class el{constructor(e,t={}){R(this,t),this.type=e}}class ec extends el{constructor(e,t={}){super("error",R({error:e},t))}}class eu{on(e,t){return this._listeners=this._listeners||{},eo(e,t,this._listeners),this}off(e,t){return es(e,t,this._listeners),es(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners=this._oneTimeListeners||{},eo(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){"string"==typeof e&&(e=new el(e,t||{}));let r=e.type;if(this.listens(r)){for(let t of(e.target=this,this._listeners&&this._listeners[r]?this._listeners[r].slice():[]))t.call(this,e);for(let t of this._oneTimeListeners&&this._oneTimeListeners[r]?this._oneTimeListeners[r].slice():[])es(r,t,this._oneTimeListeners),t.call(this,e);let t=this._eventedParent;t&&(R(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),t.fire(e))}else e instanceof ec&&console.error(e.error);return this}listens(e){return this._listeners&&this._listeners[e]&&this._listeners[e].length>0||this._oneTimeListeners&&this._oneTimeListeners[e]&&this._oneTimeListeners[e].length>0||this._eventedParent&&this._eventedParent.listens(e)}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var eh={$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"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let ef=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function ed(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}let eF=[eT,eA,eM,eS,eE,eP,eC,eR(eL),ez,eO,eD];function eB(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!eB(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind){for(let e of eF)if(!eB(e,t))return null}}return`Expected ${ej(e)} but found ${ej(t)} instead.`}function eN(e,t){return t.some(t=>t.kind===e.kind)}function eU(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function eV(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}let eq=4/29,eH=6/29,eG=6/29*3*(6/29),eW=6/29*(6/29)*(6/29),eY=Math.PI/180,eX=180/Math.PI;function eZ(e){return(e%=360)<0&&(e+=360),e}function e$([e,t,r,n]){let i,a,o=eJ((.2225045*(e=eK(e))+.7168786*(t=eK(t))+.0606169*(r=eK(r)))/1);e===t&&t===r?i=a=o:(i=eJ((.4360747*e+.3850649*t+.1430804*r)/.96422),a=eJ((.0139322*e+.0971045*t+.7141733*r)/.82521));let s=116*o-16;return[s<0?0:s,500*(i-o),200*(o-a),n]}function eK(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function eJ(e){return e>eW?Math.pow(e,1/3):e/eG+eq}function eQ([e,t,r,n]){let i=(e+16)/116,a=isNaN(t)?i:i+t/500,o=isNaN(r)?i:i-r/200;return i=+e1(i),[e0(3.1338561*(a=.96422*e1(a))-1.6168667*i-.4906146*(o=.82521*e1(o))),e0(-.9787684*a+1.9161415*i+.033454*o),e0(.0719453*a-.2289914*i+1.4052427*o),n]}function e0(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function e1(e){return e>eH?e*e*e:eG*(e-eq)}function e2(e){return parseInt(e.padEnd(2,e),16)/255}function e3(e,t){return e5(t?e/100:e,0,1)}function e5(e,t,r){return Math.min(Math.max(t,e),r)}function e4(e){return!e.some(Number.isNaN)}let e6={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]};class e8{constructor(e,t,r,n=1,i=!0){this.r=e,this.g=t,this.b=r,this.a=n,i||(this.r*=n,this.g*=n,this.b*=n,n||this.overwriteGetter("rgb",[e,t,r,n]))}static parse(e){if(e instanceof e8)return e;if("string"!=typeof e)return;let t=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=e6[e];if(t){let[e,r,n]=t;return[e/255,r/255,n/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,r=1;return[e2(e.slice(r,r+=t)),e2(e.slice(r,r+=t)),e2(e.slice(r,r+=t)),e2(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,r,n,i,a,o,s,l,c,u,h,f]=t,d=[i||" ",s||" ",u].join("");if(" "===d||" /"===d||",,"===d||",,,"===d){let e=[n,o,c].join(""),t="%%%"===e?100:255*(""===e);if(t){let e=[e5(r/t,0,1),e5(a/t,0,1),e5(l/t,0,1),h?e3(+h,f):1];if(e4(e))return e}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[e,t,n,i,a,o,s,l,c]=r,u=[n||" ",a||" ",s].join("");if(" "===u||" /"===u||",,"===u||",,,"===u){let e=[+t,e5(+i,0,100),e5(+o,0,100),l?e3(+l,c):1];if(e4(e))return function([e,t,r,n]){function i(n){let i=(n+e/30)%12,a=t*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(i-3,9-i,1))}return e=eZ(e),t/=100,r/=100,[i(0),i(8),i(4),n]}(e)}}}(e);return t?new e8(...t,!1):void 0}get rgb(){let{r:e,g:t,b:r,a:n}=this,i=n||1/0;return this.overwriteGetter("rgb",[e/i,t/i,r/i,n])}get hcl(){return this.overwriteGetter("hcl",function(e){let[t,r,n,i]=e$(e),a=Math.sqrt(r*r+n*n);return[Math.round(1e4*a)?eZ(Math.atan2(n,r)*eX):NaN,a,t,i]}(this.rgb))}get lab(){return this.overwriteGetter("lab",e$(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,r,n]=this.rgb;return`rgba(${[e,t,r].map(e=>Math.round(255*e)).join(",")},${n})`}}e8.black=new e8(0,0,0,1),e8.white=new e8(1,1,1,1),e8.transparent=new e8(0,0,0,0),e8.red=new e8(1,0,0,1);class e9{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class e7{constructor(e,t,r,n,i){this.text=e,this.image=t,this.scale=r,this.fontStack=n,this.textColor=i}}class te{constructor(e){this.sections=e}static fromString(e){return new te([new e7(e,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof te?e:te.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}}class tt{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tt)return e;if("number"==typeof e)return new tt([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let t of e)if("number"!=typeof t)return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new tt(e)}}toString(){return JSON.stringify(this.values)}}let tr=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class tn{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tn)return e;if(Array.isArray(e)&&!(e.length<1)&&e.length%2==0){for(let t=0;t=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===n||"number"==typeof n&&n>=0&&n<=1?null:`Invalid rgba value [${[e,t,r,n].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof n?[e,t,r,n]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function to(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof e8||e instanceof e9||e instanceof te||e instanceof tt||e instanceof tn||e instanceof ti)return!0;if(Array.isArray(e)){for(let t of e)if(!to(t))return!1;return!0}if("object"==typeof e){for(let t in e)if(!to(e[t]))return!1;return!0}return!1}function ts(e){if(null===e)return eT;if("string"==typeof e)return eM;if("boolean"==typeof e)return eS;if("number"==typeof e)return eA;if(e instanceof e8)return eE;if(e instanceof e9)return eI;if(e instanceof te)return eP;if(e instanceof tt)return ez;if(e instanceof tn)return eD;if(e instanceof ti)return eO;if(Array.isArray(e)){let t=e.length,r;for(let t of e){let e=ts(t);if(r){if(r===e)continue;r=eL;break}r=e}return eR(r||eL,t)}return eC}function tl(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof e8||e instanceof te||e instanceof tt||e instanceof tn||e instanceof ti?e.toString():JSON.stringify(e)}class tc{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!to(e[1]))return t.error("invalid value");let r=e[1],n=ts(r),i=t.expectedType;return"array"===n.kind&&0===n.N&&i&&"array"===i.kind&&("number"!=typeof i.N||0===i.N)&&(n=i),new tc(n,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class tu{constructor(e){this.name="ExpressionEvaluationError",this.message=e}toJSON(){return this.message}}let th={string:eM,number:eA,boolean:eS,object:eC};class tf{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,n=1,i=e[0];if("array"===i){let i,a;if(e.length>2){let r=e[1];if("string"!=typeof r||!(r in th)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);i=th[r],n++}else i=eL;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],n++}r=eR(i,a)}else{if(!th[i])throw Error(`Types doesn't contain name = ${i}`);r=th[i]}let a=[];for(;ne.outputDefined())}}let td={"to-boolean":eS,"to-color":eE,"to-number":eA,"to-string":eM};class tp{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[0];if(!td[r])throw Error(`Can't parse ${r} as it is not part of the known types`);if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");let n=td[r],i=[];for(let r=1;r4?`Invalid rbga value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:ta(t[0],t[1],t[2],t[3])))return new e8(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new tu(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(let r of this.args){t=r.evaluate(e);let n=tt.parse(t);if(n)return n}throw new tu(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(let r of this.args){t=r.evaluate(e);let n=tn.parse(t);if(n)return n}throw new tu(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(let r of this.args){if(null===(t=r.evaluate(e)))return 0;let n=Number(t);if(!isNaN(n))return n}throw new tu(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return te.fromString(tl(this.args[0].evaluate(e)));case"resolvedImage":return ti.fromString(tl(this.args[0].evaluate(e)));default:return tl(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let tm=["Unknown","Point","LineString","Polygon"];class tg{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?tm[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache[e];return t||(t=this._parseColorCache[e]=e8.parse(e)),t}}class ty{constructor(e,t,r=[],n,i=new ek,a=[]){this.registry=e,this.path=r,this.key=r.map(e=>`[${e}]`).join(""),this.scope=i,this.errors=a,this.expectedType=n,this._isConstant=t}parse(e,t,r,n,i={}){return t?this.concat(t,r,n)._parse(e,i):this._parse(e,i)}_parse(e,t){function r(e,t,r){return"assert"===r?new tf(t,[e]):"coerce"===r?new tp(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let n=e[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;let i=this.registry[n];if(i){let n=i.parse(e,this);if(!n)return null;if(this.expectedType){let e=this.expectedType,i=n.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==i.kind)if("color"!==e.kind&&"formatted"!==e.kind&&"resolvedImage"!==e.kind||"value"!==i.kind&&"string"!==i.kind)if("padding"!==e.kind||"value"!==i.kind&&"number"!==i.kind&&"array"!==i.kind)if("variableAnchorOffsetCollection"!==e.kind||"value"!==i.kind&&"array"!==i.kind){if(this.checkSubtype(e,i))return null}else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"coerce");else n=r(n,e,t.typeAnnotation||"assert")}if(!(n instanceof tc)&&"resolvedImage"!==n.type.kind&&this._isConstant(n)){let e=new tg;try{n=new tc(n.type,n.evaluate(e))}catch(e){return this.error(e.message),null}}return n}return this.error(`Unknown expression "${n}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){let n="number"==typeof e?this.path.concat(e):this.path,i=r?this.scope.concat(r):this.scope;return new ty(this.registry,this._isConstant,n,t||null,i,this.errors)}error(e,...t){let r=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new ew(r,e))}checkSubtype(e,t){let r=eB(e,t);return r&&this.error(r),r}}class tv{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let r=[];for(let n=1;nt))throw new tu("Input is not a number.");o=s-1}return 0}class t_{constructor(e,t,r){for(let[n,i]of(this.type=e,this.input=t,this.labels=[],this.outputs=[],r))this.labels.push(n),this.outputs.push(i)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");let r=t.parse(e[1],1,eA);if(!r)return null;let n=[],i=null;t.expectedType&&"value"!==t.expectedType.kind&&(i=t.expectedType);for(let r=1;r=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);let c=t.parse(o,l,i);if(!c)return null;i=i||c.type,n.push([a,c])}return new t_(i,r,n)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);let i=t.length;return n>=t[i-1]?r[i-1].evaluate(e):r[tb(t,n)].evaluate(e)}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function tw(e,t,r,n){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(n-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=n}tw.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,n=0;n<8;n++){var i=this.sampleCurveX(r)-e;if(Math.abs(i)Math.abs(a))break;r-=i/a}var o=0,s=1;for(r=e,n=0;n<20&&!(Math.abs((i=this.sampleCurveX(r))-e)i?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}};var tk=tw&&tw.__esModule&&Object.prototype.hasOwnProperty.call(tw,"default")?tw.default:tw;function tT(e,t,r){return e.map((e,n)=>e+r*(t[n]-e))}let tA={number:function(e,t,r){return e+r*(t-e)},color:function(e,t,r,n="rgb"){switch(n){case"rgb":{let[n,i,a,o]=tT(e.rgb,t.rgb,r);return new e8(n,i,a,o,!1)}case"hcl":{let[n,i,a,o]=e.hcl,[s,l,c,u]=t.hcl,h,f;if(isNaN(n)||isNaN(s))isNaN(n)?isNaN(s)?h=NaN:(h=s,1!==a&&0!==a||(f=l)):(h=n,1!==c&&0!==c||(f=i));else{let e=s-n;s>n&&e>180?e-=360:s180&&(e+=360),h=n+r*e}let[d,p,m,g]=function([e,t,r,n]){return eQ([r,Math.cos(e=isNaN(e)?0:e*eY)*t,Math.sin(e)*t,n])}([h,f??i+r*(l-i),a+r*(c-a),o+r*(u-o)]);return new e8(d,p,m,g,!1)}case"lab":{let[n,i,a,o]=eQ(tT(e.lab,t.lab,r));return new e8(n,i,a,o,!1)}}},array:tT,padding:function(e,t,r){return new tt(tT(e.values,t.values,r))},variableAnchorOffsetCollection:function(e,t,r){let n=e.values,i=t.values;if(n.length!==i.length)throw new tu(`Cannot interpolate values of different length. from: ${e.toString()}, to: ${t.toString()}`);let a=[];for(let e=0;e"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);n={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(i=t.parse(i,2,eA)))return null;let o=[],s=null;"interpolate-hcl"===r||"interpolate-lab"===r?s=eE:t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType);for(let e=0;e=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',i);let c=t.parse(n,l,s);if(!c)return null;s=s||c.type,o.push([r,c])}return eV(s,eA)||eV(s,eE)||eV(s,ez)||eV(s,eD)||eV(s,eR(eA))?new tM(s,r,n,i,o):t.error(`Type ${ej(s)} is not interpolatable.`)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let n=this.input.evaluate(e);if(n<=t[0])return r[0].evaluate(e);let i=t.length;if(n>=t[i-1])return r[i-1].evaluate(e);let a=tb(t,n),o=tM.interpolationFactor(this.interpolation,n,t[a],t[a+1]),s=r[a].evaluate(e),l=r[a+1].evaluate(e);switch(this.operator){case"interpolate":return tA[this.type.kind](s,l,o);case"interpolate-hcl":return tA.color(s,l,o,"hcl");case"interpolate-lab":return tA.color(s,l,o,"lab")}}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function tS(e,t,r,n){let i=n-r,a=e-r;return 0===i?0:1===t?a/i:(Math.pow(t,a)-1)/(Math.pow(t,i)-1)}class tE{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expectected at least one argument.");let r=null,n=t.expectedType;n&&"value"!==n.kind&&(r=n);let i=[];for(let n of e.slice(1)){let e=t.parse(n,1+i.length,r,void 0,{typeAnnotation:"omit"});if(!e)return null;r=r||e.type,i.push(e)}if(!r)throw Error("No output type");return new tE(n&&i.some(e=>eB(n,e.type))?eL:r,i)}evaluate(e){let t,r=null,n=0;for(let i of this.args)if(n++,(r=i.evaluate(e))&&r instanceof ti&&!r.available&&(t||(t=r.name),r=null,n===this.args.length&&(r=t)),null!==r)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}function tC(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function tL(e,t,r,n){return 0===n.compare(t,r)}function tI(e,t,r){let n="=="!==e&&"!="!==e;return class i{constructor(e,t,r){this.type=eS,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let r=e[0],a=t.parse(e[1],1,eL);if(!a)return null;if(!tC(r,a.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${ej(a.type)}'.`);let o=t.parse(e[2],2,eL);if(!o)return null;if(!tC(r,o.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${ej(o.type)}'.`);if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error(`Cannot compare types '${ej(a.type)}' and '${ej(o.type)}'.`);n&&("value"===a.type.kind&&"value"!==o.type.kind?a=new tf(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new tf(a.type,[o])));let s=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,eI)))return null}return new i(a,o,s)}evaluate(i){let a=this.lhs.evaluate(i),o=this.rhs.evaluate(i);if(n&&this.hasUntypedArgument){let t=ts(a),r=ts(o);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new tu(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!n&&this.hasUntypedArgument){let e=ts(a),r=ts(o);if("string"!==e.kind||"string"!==r.kind)return t(i,a,o)}return this.collator?r(i,a,o,this.collator.evaluate(i)):t(i,a,o)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}let tP=tI("==",function(e,t,r){return t===r},tL),tz=tI("!=",function(e,t,r){return t!==r},function(e,t,r,n){return!tL(0,t,r,n)}),tO=tI("<",function(e,t,r){return tn.compare(t,r)}),tD=tI(">",function(e,t,r){return t>r},function(e,t,r,n){return n.compare(t,r)>0}),tR=tI("<=",function(e,t,r){return t<=r},function(e,t,r,n){return 0>=n.compare(t,r)}),tj=tI(">=",function(e,t,r){return t>=r},function(e,t,r,n){return n.compare(t,r)>=0});class tF{constructor(e,t,r){this.type=eI,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");let r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");let n=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,eS);if(!n)return null;let i=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,eS);if(!i)return null;let a=null;return!r.locale||(a=t.parse(r.locale,1,eM))?new tF(n,i,a):null}evaluate(e){return new e9(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}class tB{constructor(e){this.type=eP,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");let n=[],i=!1;for(let r=1;r<=e.length-1;++r){let a=e[r];if(i&&"object"==typeof a&&!Array.isArray(a)){i=!1;let e=null;if(a["font-scale"]&&!(e=t.parse(a["font-scale"],1,eA)))return null;let r=null;if(a["text-font"]&&!(r=t.parse(a["text-font"],1,eR(eM))))return null;let o=null;if(a["text-color"]&&!(o=t.parse(a["text-color"],1,eE)))return null;let s=n[n.length-1];s.scale=e,s.font=r,s.textColor=o}else{let a=t.parse(e[r],1,eL);if(!a)return null;let o=a.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");i=!0,n.push({content:a,scale:null,font:null,textColor:null})}}return new tB(n)}evaluate(e){return new te(this.sections.map(t=>{let r=t.content.evaluate(e);return ts(r)===eO?new e7("",r,null,null,null):new e7(tl(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null)}))}eachChild(e){for(let t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor)}outputDefined(){return!1}}function tN(e,t){let r=Math.pow(2,t.z);return[360*((e[0]/8192+t.x)/r)-180,360/Math.PI*Math.atan(Math.exp((180-360*((e[1]/8192+t.y)/r))*Math.PI/180))-90]}function tU(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function tV(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function tq(e,t,r,n){var i,a;return(a=[n[0]-r[0],n[1]-r[1]])[0]*(i=[t[0]-e[0],t[1]-e[1]])[1]-a[1]*i[0]!=0&&!(!tW(e,t,r,n)||!tW(r,n,e,t))}function tH(e,t,r=!1){var n,i;let a=!1;for(let o of t)for(let t=0;te[1]!=(i=o[t+1])[1]>e[1]&&e[0]<(i[0]-n[0])*(e[1]-n[1])/(i[1]-n[1])+n[0]&&(a=!a)}return a}function tG(e,t){for(let r of e)if(!tH(r,t))return!1;for(let r=0;r0&&s<0||o<0&&s>0}function tY(e,t,r){let n=[];for(let i=0;ir[2]){let t=.5*n,i=e[0]-r[0]>t?-n:r[0]-e[0]>t?n:0;0===i&&(i=e[0]-r[2]>t?-n:r[2]-e[0]>t?n:0),e[0]+=i}tU(t,e)}function t$(e,t,r,n){let i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[];for(let n of e)for(let e of n){let n=[e.x+a[0],e.y+a[1]];tZ(n,t,r,i),o.push(n)}return o}function tK(e,t,r,n){let i=8192*Math.pow(2,n.z),a=[8192*n.x,8192*n.y],o=[];for(let r of e){let e=[];for(let n of r){let r=[n.x+a[0],n.y+a[1]];tU(t,r),e.push(r)}o.push(e)}if(t[2]-t[0]<=i/2)for(let e of(t[0]=t[1]=1/0,t[2]=t[3]=-1/0,o))for(let n of e)tZ(n,t,r,i);return o}class tJ{constructor(e,t){this.type=eS,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(to(e[1])){let t=e[1];if("FeatureCollection"===t.type){let e=[];for(let r of t.features){let{type:t,coordinates:n}=r.geometry;"Polygon"===t&&e.push(n),"MultiPolygon"===t&&e.push(...n)}if(e.length)return new tJ(t,{type:"MultiPolygon",coordinates:e})}else if("Feature"===t.type){let e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new tJ(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new tJ(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){let a=tY(t.coordinates,n,i),o=t$(e.geometry(),r,n,i);if(!tV(r,n))return!1;for(let e of o)if(!tH(e,a))return!1}if("MultiPolygon"===t.type){let a=tX(t.coordinates,n,i),o=t$(e.geometry(),r,n,i);if(!tV(r,n))return!1;for(let e of o)if(!function(e,t){for(let r of t)if(tH(e,r))return!0;return!1}(e,a))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],n=[1/0,1/0,-1/0,-1/0],i=e.canonicalID();if("Polygon"===t.type){let a=tY(t.coordinates,n,i),o=tK(e.geometry(),r,n,i);if(!tV(r,n))return!1;for(let e of o)if(!tG(e,a))return!1}if("MultiPolygon"===t.type){let a=tX(t.coordinates,n,i),o=tK(e.geometry(),r,n,i);if(!tV(r,n))return!1;for(let e of o)if(!function(e,t){for(let r of t)if(tG(e,r))return!0;return!1}(e,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let tQ=class{constructor(e=[],t=(e,t)=>et)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;er(t[a],t[n])&&(n=a),r(t[n],i)>=0)break;t[e]=t[n],e=n}t[e]=i}};function t0(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function t1(e,t){return et)}function t2(e,t){if(e.length<=1)return[e];let r=[],n,i;for(let t of e){let e=function(e){let t=0;for(let r,n,i=0,a=e.length,o=a-1;i1)for(let e=0;en;){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);e(t,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=t[r],f=n,d=i;for(t0(t,n,r),a(t[i],h)>0&&t0(t,n,i);fa(t[f],h);)f++;for(;a(t[d],h)>0;)d--}0===a(t[n],h)?t0(t,n,d):t0(t,++d,i),d<=r&&(n=d+1),r<=d&&(i=d-1)}}(a,t,1,o||a.length-1,t3||t1),r[e]=r[e].slice(0,t))}return r}function t3(e,t){return t.area-e.area}let t5=1/298.257223563*(2-1/298.257223563),t4=Math.PI/180;class t6{constructor(e){let t=6378.137*t4*1e3,r=Math.cos(e*t4),n=1/(1-t5*(1-r*r)),i=Math.sqrt(n);this.kx=t*i*r,this.ky=t*i*n*(1-t5)}distance(e,t){let r=this.wrap(e[0]-t[0])*this.kx,n=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+n*n)}pointOnLine(e,t){let r,n,i,a,o=1/0;for(let s=0;s1?(l=e[s+1][0],c=e[s+1][1]):f>0&&(l+=u/this.kx*f,c+=h/this.ky*f));let d=(u=this.wrap(t[0]-l)*this.kx)*u+(h=(t[1]-c)*this.ky)*h;d180;)e-=360;return e}}function t8(e,t){return t[0]-e[0]}function t9(e){return e[1]-e[0]+1}function t7(e,t){return e[1]>=e[0]&&e[1]e[1])return[null,null];let r=t9(e);if(t){if(2===r)return[e,null];let t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];let n=Math.floor(r/2)-1;return[[e[0],e[0]+n],[e[0]+n+1,e[1]]]}function rt(e,t){if(!t7(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let n=t[0];n<=t[1];++n)tU(r,e[n]);return r}function rr(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let e of r)tU(t,e);return t}function rn(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function ri(e,t,r){if(!rn(e)||!rn(t))return NaN;let n=0,i=0;return e[2]t[2]&&(n=e[0]-t[2]),e[1]>t[3]&&(i=e[1]-t[3]),e[3]0;){let i=o.pop();if(i[0]>=a)continue;let l=i[1],c=t?50:100;if(t9(l)<=c){if(!t7(l,e.length))return NaN;if(t){let t=function(e,t,r,n){if(!t7(t,e.length))return NaN;for(let n=t[0];n<=t[1];++n)if(tH(e[n],r,!0))return 0;let i=1/0;for(let a=t[0];a0;){let a=s.pop();if(a[0]>=o)continue;let l=a[1],c=a[2],u=t?50:100,h=n?50:100;if(t9(l)<=u&&t9(c)<=h){if(!t7(l,e.length)&&t7(c,r.length))return NaN;if(t&&n)o=Math.min(o,function(e,t,r,n,i){if(!t7(t,e.length)||!t7(n,r.length))return 1/0;let a=1/0;for(let o=t[0];o({type:"Polygon",coordinates:e})):"MultiLineString"===e.type?e.coordinates.map(e=>({type:"LineString",coordinates:e})):"MultiPoint"===e.type?e.coordinates.map(e=>({type:"Point",coordinates:e})):[e]}class rd{constructor(e,t){this.type=eA,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(to(e[1])){let t=e[1];if("FeatureCollection"===t.type)return new rd(t,t.features.map(e=>rf(e.geometry)).flat());if("Feature"===t.type)return new rd(t,rf(t.geometry));if("type"in t&&"coordinates"in t)return new rd(t,rf(t))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=e.geometry(),n=r.flat().map(t=>tN([t.x,t.y],e.canonical));if(0===r.length)return NaN;let i=new t6(n[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,rh(n,!1,[e.coordinates],!1,i,a));break;case"LineString":a=Math.min(a,rh(n,!1,e.coordinates,!0,i,a));break;case"Polygon":a=Math.min(a,ru(n,!1,e.coordinates,i,a))}if(0===a)break}return a}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=e.geometry(),n=r.flat().map(t=>tN([t.x,t.y],e.canonical));if(0===r.length)return NaN;let i=new t6(n[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,rh(n,!0,[e.coordinates],!1,i,a));break;case"LineString":a=Math.min(a,rh(n,!0,e.coordinates,!0,i,a));break;case"Polygon":a=Math.min(a,ru(n,!0,e.coordinates,i,a))}if(0===a)break}return a}(e,this.geometries);if("Polygon"===e.geometryType())return function(e,t){let r=e.geometry();if(0===r.length||0===r[0].length)return NaN;let n=t2(r,0).map(t=>t.map(t=>t.map(t=>tN([t.x,t.y],e.canonical)))),i=new t6(n[0][0][0][1]),a=1/0;for(let e of t)for(let t of n){switch(e.type){case"Point":a=Math.min(a,ru([e.coordinates],!1,t,i,a));break;case"LineString":a=Math.min(a,ru(e.coordinates,!0,t,i,a));break;case"Polygon":a=Math.min(a,function(e,t,r,n=1/0){let i=rr(e),a=rr(t);if(n!==1/0&&ri(i,a,r)>=n)return n;if(tV(i,a)){if(rs(e,t))return 0}else if(rs(t,e))return 0;let o=1/0;for(let n of e)for(let e=0,i=n.length,a=i-1;e":tD,"<":tO,">=":tj,"<=":tR,array:tf,at:class e{constructor(e,t,r){this.type=e,this.index=t,this.input=r}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,eA),i=r.parse(t[2],2,eR(r.expectedType||eL));return n&&i?new e(i.type.itemType,n,i):null}evaluate(e){let t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new tu(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new tu(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new tu(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},boolean:tf,case:class e{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(t,r){let n;if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(n=r.expectedType);let i=[];for(let e=1;et.outputDefined())&&this.otherwise.outputDefined()}},coalesce:tE,collator:tF,format:tB,image:class e{constructor(e){this.type=eO,this.input=e}static parse(t,r){if(2!==t.length)return r.error("Expected two arguments.");let n=r.parse(t[1],1,eM);return n?new e(n):r.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),r=ti.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}},in:class e{constructor(e,t){this.type=eS,this.needle=e,this.haystack=t}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,eL),i=r.parse(t[2],2,eL);return n&&i?eN(n.type,[eS,eM,eA,eT,eL])?new e(n,i):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${ej(n.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!eU(t,["boolean","string","number","null"]))throw new tu(`Expected first argument to be of type boolean, string, number or null, but found ${ej(ts(t))} instead.`);if(!eU(r,["string","array"]))throw new tu(`Expected second argument to be of type array or string, but found ${ej(ts(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},"index-of":class e{constructor(e,t,r){this.type=eA,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,eL),i=r.parse(t[2],2,eL);if(!n||!i)return null;if(!eN(n.type,[eS,eM,eA,eT,eL]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${ej(n.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,eA);return a?new e(n,i,a):null}return new e(n,i)}evaluate(e){let t,r=this.needle.evaluate(e),n=this.haystack.evaluate(e);if(!eU(r,["boolean","string","number","null"]))throw new tu(`Expected first argument to be of type boolean, string, number or null, but found ${ej(ts(r))} instead.`);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),eU(n,["string"])){let e=n.indexOf(r,t);return -1===e?-1:[...n.slice(0,e)].length}if(eU(n,["array"]))return n.indexOf(r,t);throw new tu(`Expected second argument to be of type array or string, but found ${ej(ts(n))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},interpolate:tM,"interpolate-hcl":tM,"interpolate-lab":tM,length:class e{constructor(e){this.type=eA,this.input=e}static parse(t,r){if(2!==t.length)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let n=r.parse(t[1],1);return n?"array"!==n.type.kind&&"string"!==n.type.kind&&"value"!==n.type.kind?r.error(`Expected argument of type string or array, but found ${ej(n.type)} instead.`):new e(n):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new tu(`Expected value to be of type string or array, but found ${ej(ts(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}},let:tv,literal:tc,match:class e{constructor(e,t,r,n,i,a){this.inputType=e,this.type=t,this.input=r,this.cases=n,this.outputs=i,this.otherwise=a}static parse(t,r){let n,i;if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(i=r.expectedType);let a={},o=[];for(let e=2;eNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(n){if(c.checkSubtype(n,ts(e)))return null}else n=ts(e);if(void 0!==a[String(e)])return c.error("Branch labels must be unique.");a[String(e)]=o.length}let u=r.parse(l,e,i);if(!u)return null;i=i||u.type,o.push(u)}let s=r.parse(t[1],1,eL);if(!s)return null;let l=r.parse(t[t.length-1],t.length-1,i);return l?"value"!==s.type.kind&&r.concat(1).checkSubtype(n,s.type)?null:new e(n,i,s,a,o,l):null}evaluate(e){let t=this.input.evaluate(e);return(ts(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},number:tf,"number-format":class e{constructor(e,t,r,n,i){this.type=eM,this.number=e,this.locale=t,this.currency=r,this.minFractionDigits=n,this.maxFractionDigits=i}static parse(t,r){if(3!==t.length)return r.error("Expected two arguments.");let n=r.parse(t[1],1,eA);if(!n)return null;let i=t[2];if("object"!=typeof i||Array.isArray(i))return r.error("NumberFormat options argument must be an object.");let a=null;if(i.locale&&!(a=r.parse(i.locale,1,eM)))return null;let o=null;if(i.currency&&!(o=r.parse(i.currency,1,eM)))return null;let s=null;if(i["min-fraction-digits"]&&!(s=r.parse(i["min-fraction-digits"],1,eA)))return null;let l=null;return!i["max-fraction-digits"]||(l=r.parse(i["max-fraction-digits"],1,eA))?new e(n,a,o,s,l):null}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},object:tf,slice:class e{constructor(e,t,r,n){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=n}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 3 or 4 arguments, but found ${t.length-1} instead.`);let n=r.parse(t[1],1,eL),i=r.parse(t[2],2,eA);if(!n||!i)return null;if(!eN(n.type,[eR(eL),eM,eL]))return r.error(`Expected first argument to be of type array or string, but found ${ej(n.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,eA);return a?new e(n.type,n,i,a):null}return new e(n.type,n,i)}evaluate(e){let t=this.input.evaluate(e),r=this.beginIndex.evaluate(e),n;if(this.endIndex&&(n=this.endIndex.evaluate(e)),eU(t,["string"]))return[...t].slice(r,n).join("");if(eU(t,["array"]))return t.slice(r,n);throw new tu(`Expected first argument to be of type array or string, but found ${ej(ts(t))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},step:t_,string:tf,"to-boolean":tp,"to-color":tp,"to-number":tp,"to-string":tp,var:tx,within:tJ,distance:rd};class rm{constructor(e,t,r,n){this.name=e,this.type=t,this._evaluate=r,this.args=n}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){let r=e[0],n=rm.definitions[r];if(!n)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);let i=Array.isArray(n)?n[0]:n.type,a=Array.isArray(n)?[[n[1],n[2]]]:n.overloads,o=a.filter(([t])=>!Array.isArray(t)||t.length===e.length-1),s=null;for(let[n,a]of o){s=new ty(t.registry,rx,t.path,null,t.scope);let o=[],l=!1;for(let t=1;tArray.isArray(e)?`(${e.map(ej).join(", ")})`:`(${ej(e.type)}...)`).join(" | "),n=[];for(let r=1;r{r=t?r&&rx(e):r&&e instanceof tc}),!!r&&rb(e)&&rw(e,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function rb(e){if(e instanceof rm&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof tJ||e instanceof rd)return!1;let t=!0;return e.eachChild(e=>{t&&!rb(e)&&(t=!1)}),t}function r_(e){if(e instanceof rm&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!r_(e)&&(t=!1)}),t}function rw(e,t){if(e instanceof rm&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(e=>{r&&!rw(e,t)&&(r=!1)}),r}function rk(e){return{result:"success",value:e}}function rT(e){return{result:"error",value:e}}function rA(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function rM(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function rS(e){return!!e.expression&&e.expression.interpolated}function rE(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function rC(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}function rL(e){return e}function rI(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function rP(e,t,r,n,i){return rI(typeof r===i?n[r]:void 0,e.default,t.default)}function rz(e,t,r){if("number"!==rE(r))return rI(e.default,t.default);let n=e.stops.length;if(1===n||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[n-1][0])return e.stops[n-1][1];let i=tb(e.stops.map(e=>e[0]),r);return e.stops[i][1]}function rO(e,t,r){var n;let i,a,o=void 0!==e.base?e.base:1;if("number"!==rE(r))return rI(e.default,t.default);let s=e.stops.length;if(1===s||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[s-1][0])return e.stops[s-1][1];let l=tb(e.stops.map(e=>e[0]),r),c=(n=e.stops[l][0],i=e.stops[l+1][0]-n,a=r-n,0===i?0:1===o?a/i:(Math.pow(o,a)-1)/(Math.pow(o,i)-1)),u=e.stops[l][1],h=e.stops[l+1][1],f=tA[t.type]||rL;return"function"==typeof u.evaluate?{evaluate(...t){let r=u.evaluate.apply(void 0,t),n=h.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==n)return f(r,n,c,e.colorSpace)}}:f(u,h,c,e.colorSpace)}function rD(e,t,r){switch(t.type){case"color":r=e8.parse(r);break;case"formatted":r=te.fromString(r.toString());break;case"resolvedImage":r=ti.fromString(r.toString());break;case"padding":r=tt.parse(r);break;default:rE(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0)}return rI(r,e.default,t.default)}rm.register(rp,{error:[{kind:"error"},[eM],(e,[t])=>{throw new tu(t.evaluate(e))}],typeof:[eM,[eL],(e,[t])=>ej(ts(t.evaluate(e)))],"to-rgba":[eR(eA,4),[eE],(e,[t])=>{let[r,n,i,a]=t.evaluate(e).rgb;return[255*r,255*n,255*i,a]}],rgb:[eE,[eA,eA,eA],rg],rgba:[eE,[eA,eA,eA,eA],rg],has:{type:eS,overloads:[[[eM],(e,[t])=>t.evaluate(e)in e.properties()],[[eM,eC],(e,[t,r])=>t.evaluate(e)in r.evaluate(e)]]},get:{type:eL,overloads:[[[eM],(e,[t])=>ry(t.evaluate(e),e.properties())],[[eM,eC],(e,[t,r])=>ry(t.evaluate(e),r.evaluate(e))]]},"feature-state":[eL,[eM],(e,[t])=>ry(t.evaluate(e),e.featureState||{})],properties:[eC,[],e=>e.properties()],"geometry-type":[eM,[],e=>e.geometryType()],id:[eL,[],e=>e.id()],zoom:[eA,[],e=>e.globals.zoom],"heatmap-density":[eA,[],e=>e.globals.heatmapDensity||0],"line-progress":[eA,[],e=>e.globals.lineProgress||0],accumulated:[eL,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[eA,rv(eA),(e,t)=>{let r=0;for(let n of t)r+=n.evaluate(e);return r}],"*":[eA,rv(eA),(e,t)=>{let r=1;for(let n of t)r*=n.evaluate(e);return r}],"-":{type:eA,overloads:[[[eA,eA],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[eA],(e,[t])=>-t.evaluate(e)]]},"/":[eA,[eA,eA],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[eA,[eA,eA],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[eA,[],()=>Math.LN2],pi:[eA,[],()=>Math.PI],e:[eA,[],()=>Math.E],"^":[eA,[eA,eA],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[eA,[eA],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[eA,[eA],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[eA,[eA],(e,[t])=>Math.log(t.evaluate(e))],log2:[eA,[eA],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[eA,[eA],(e,[t])=>Math.sin(t.evaluate(e))],cos:[eA,[eA],(e,[t])=>Math.cos(t.evaluate(e))],tan:[eA,[eA],(e,[t])=>Math.tan(t.evaluate(e))],asin:[eA,[eA],(e,[t])=>Math.asin(t.evaluate(e))],acos:[eA,[eA],(e,[t])=>Math.acos(t.evaluate(e))],atan:[eA,[eA],(e,[t])=>Math.atan(t.evaluate(e))],min:[eA,rv(eA),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[eA,rv(eA),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[eA,[eA],(e,[t])=>Math.abs(t.evaluate(e))],round:[eA,[eA],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[eA,[eA],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[eA,[eA],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[eS,[eM,eL],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[eS,[eL],(e,[t])=>e.id()===t.value],"filter-type-==":[eS,[eM],(e,[t])=>e.geometryType()===t.value],"filter-<":[eS,[eM,eL],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n{let r=e.id(),n=t.value;return typeof r==typeof n&&r":[eS,[eM,eL],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n>i}],"filter-id->":[eS,[eL],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r>n}],"filter-<=":[eS,[eM,eL],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n<=i}],"filter-id-<=":[eS,[eL],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r<=n}],"filter->=":[eS,[eM,eL],(e,[t,r])=>{let n=e.properties()[t.value],i=r.value;return typeof n==typeof i&&n>=i}],"filter-id->=":[eS,[eL],(e,[t])=>{let r=e.id(),n=t.value;return typeof r==typeof n&&r>=n}],"filter-has":[eS,[eL],(e,[t])=>t.value in e.properties()],"filter-has-id":[eS,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[eS,[eR(eM)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[eS,[eR(eL)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[eS,[eM,eR(eL)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[eS,[eM,eR(eL)],(e,[t,r])=>(function(e,t,r,n){for(;r<=n;){let i=r+n>>1;if(t[i]===e)return!0;t[i]>e?n=i-1:r=i+1}return!1})(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:eS,overloads:[[[eS,eS],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[rv(eS),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:eS,overloads:[[[eS,eS],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[rv(eS),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[eS,[eS],(e,[t])=>!t.evaluate(e)],"is-supported-script":[eS,[eM],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[eM,[eM],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[eM,[eM],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[eM,rv(eL),(e,t)=>t.map(t=>tl(t.evaluate(e))).join("")],"resolved-locale":[eM,[eI],(e,[t])=>t.evaluate(e).resolvedLocale()]});class rR{constructor(e,t){this.expression=e,this._warningHistory={},this._evaluator=new tg,this._defaultValue=t?"color"===t.type&&rC(t.default)?new e8(0,0,0,0):"color"===t.type?e8.parse(t.default)||null:"padding"===t.type?tt.parse(t.default)||null:"variableAnchorOffsetCollection"===t.type?tn.parse(t.default)||null:void 0===t.default?null:t.default:null,this._enumValues=t&&"enum"===t.type?t.values:null}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,n,i,a){this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=n,this._evaluator.availableImages=i||null,this._evaluator.formattedSection=a||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new tu(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"u">typeof console&&console.warn(e.message)),this._defaultValue}}}function rj(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in rp}function rF(e,t){let r,n=new ty(rp,rx,[],t?(r={color:eE,string:eM,number:eA,enum:eM,boolean:eS,formatted:eP,padding:ez,resolvedImage:eO,variableAnchorOffsetCollection:eD},"array"===t.type?eR(r[t.value]||eL,t.length):r[t.type]):void 0),i=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return i?rk(new rR(i,t)):rT(n.errors)}class rB{constructor(e,t){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!r_(t.expression)}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)}evaluate(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)}}class rN{constructor(e,t,r,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!r_(t.expression),this.interpolationType=n}evaluateWithoutErrorHandling(e,t,r,n,i,a){return this._styleExpression.evaluateWithoutErrorHandling(e,t,r,n,i,a)}evaluate(e,t,r,n,i,a){return this._styleExpression.evaluate(e,t,r,n,i,a)}interpolationFactor(e,t,r){return this.interpolationType?tM.interpolationFactor(this.interpolationType,e,t,r):0}}function rU(e,t){let r=rF(e,t);if("error"===r.result)return r;let n=r.value.expression,i=rb(n);if(!i&&!rA(t))return rT([new ew("","data expressions not supported")]);let a=rw(n,["zoom"]);if(!a&&!rM(t))return rT([new ew("","zoom expressions not supported")]);let o=function e(t){let r=null;if(t instanceof tv)r=e(t.result);else if(t instanceof tE){for(let n of t.args)if(r=e(n))break}else(t instanceof t_||t instanceof tM)&&t.input instanceof rm&&"zoom"===t.input.name&&(r=t);return r instanceof ew||t.eachChild(t=>{let n=e(t);n instanceof ew?r=n:!r&&n?r=new ew("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&n&&r!==n&&(r=new ew("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}(n);return o||a?o instanceof ew?rT([o]):o instanceof tM&&!rS(t)?rT([new ew("",'"interpolate" expressions cannot be used with this property')]):rk(o?new rN(i?"camera":"composite",r.value,o.labels,o instanceof tM?o.interpolation:void 0):new rB(i?"constant":"source",r.value)):rT([new ew("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class rV{constructor(e,t){this._parameters=e,this._specification=t,e_(this,function e(t,r){var n;let i,a,o,s="color"===r.type,l=t.stops&&"object"==typeof t.stops[0][0],c=l||!(l||void 0!==t.property),u=t.type||(rS(r)?"exponential":"interval");if(s||"padding"===r.type){let e=s?e8.parse:tt.parse;(t=e_({},t)).stops&&(t.stops=t.stops.map(t=>[t[0],e(t[1])])),t.default=e(t.default?t.default:r.default)}if(t.colorSpace&&"rgb"!==(n=t.colorSpace)&&"hcl"!==n&&"lab"!==n)throw Error(`Unknown color space: "${t.colorSpace}"`);if("exponential"===u)i=rO;else if("interval"===u)i=rz;else if("categorical"===u){for(let e of(i=rP,a=Object.create(null),t.stops))a[e[0]]=e[1];o=typeof t.stops[0][0]}else{if("identity"!==u)throw Error(`Unknown function type "${u}"`);i=rD}if(l){let n={},i=[];for(let e=0;ee[0]),evaluate:({zoom:e},n)=>rO({stops:a,base:t.base},r,e).evaluate(e,n)}}if(c){let e="exponential"===u?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:e,interpolationFactor:tM.interpolationFactor.bind(void 0,e),zoomStops:t.stops.map(e=>e[0]),evaluate:({zoom:e})=>i(t,r,e,a,o)}}return{kind:"source",evaluate(e,n){let s=n&&n.properties?n.properties[t.property]:void 0;return void 0===s?rI(t.default,r.default):i(t,r,s,a,o)}}}(this._parameters,this._specification))}static deserialize(e){return new rV(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function rq(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(let t of e.slice(1))if(!rq(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}let rH={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function rG(e){if(null==e)return{filter:()=>!0,needGeometry:!1};rq(e)||(e=function e(t){if(!t)return!0;let r=t[0];return t.length<=1?"any"!==r:"=="===r?rY(t[1],t[2],"=="):"!="===r?r$(rY(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?rY(t[1],t[2],r):"any"===r?["any"].concat(t.slice(1).map(e)):"all"===r?["all"].concat(t.slice(1).map(e)):"none"===r?["all"].concat(t.slice(1).map(e).map(r$)):"in"===r?rX(t[1],t.slice(2)):"!in"===r?r$(rX(t[1],t.slice(2))):"has"===r?rZ(t[1]):"!has"!==r||r$(rZ(t[1]))}(e));let t=rF(e,rH);if("error"===t.result)throw Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,r,n)=>t.value.evaluate(e,r,{},n),needGeometry:function e(t){if(!Array.isArray(t))return!1;if("within"===t[0]||"distance"===t[0])return!0;for(let r=1;rt)}function rY(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function rX(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(rW)]]:["filter-in-small",e,["literal",t]]}}function rZ(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function r$(e){return["!",e]}function rK(e){let t=e.value;return t?[new eb(e.key,t,"constants have been deprecated as of v8")]:[]}function rJ(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function rQ(e){if(Array.isArray(e))return e.map(rQ);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=rQ(e[r]);return t}return rJ(e)}function r0(e){let t=e.key,r=e.value,n=e.valueSpec||{},i=e.objectElementValidators||{},a=e.style,o=e.styleSpec,s=e.validateSpec,l=[],c=rE(r);if("object"!==c)return[new eb(t,r,`object expected, ${c} found`)];for(let e in r){let c=e.split(".")[0],u=n[c]||n["*"],h;if(i[c])h=i[c];else if(n[c])h=s;else if(i["*"])h=i["*"];else{if(!n["*"]){l.push(new eb(t,r[e],`unknown property "${e}"`));continue}h=s}l=l.concat(h({key:(t&&`${t}.`)+e,value:r[e],valueSpec:u,style:a,styleSpec:o,object:r,objectKey:e,validateSpec:s},r))}for(let e in n)i[e]||n[e].required&&void 0===n[e].default&&void 0===r[e]&&l.push(new eb(t,r,`missing required property "${e}"`));return l}function r1(e){let t=e.value,r=e.valueSpec,n=e.style,i=e.styleSpec,a=e.key,o=e.arrayElementValidator||e.validateSpec;if("array"!==rE(t))return[new eb(a,t,`array expected, ${rE(t)} found`)];if(r.length&&t.length!==r.length)return[new eb(a,t,`array length ${r.length} expected, length ${t.length} found`)];if(r["min-length"]&&t.lengthn.maximum?[new eb(t,r,`${r} is greater than the maximum value ${n.maximum}`)]:[]}function r3(e){let t=e.valueSpec,r=rJ(e.value.type),n,i,a,o={},s="categorical"!==r&&void 0===e.value.property,l="array"===rE(e.value.stops)&&"array"===rE(e.value.stops[0])&&"object"===rE(e.value.stops[0][0]),c=r0({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new eb(e.key,e.value,'identity function may not have a "stops" property')];let t=[],n=e.value;return t=t.concat(r1({key:e.key,value:n,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:u})),"array"===rE(n)&&0===n.length&&t.push(new eb(e.key,n,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&s&&c.push(new eb(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||c.push(new eb(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!rS(e.valueSpec)&&c.push(new eb(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(s||rA(e.valueSpec)?s&&!rM(e.valueSpec)&&c.push(new eb(e.key,e.value,"zoom functions not supported")):c.push(new eb(e.key,e.value,"property functions not supported"))),("categorical"===r||l)&&void 0===e.value.property&&c.push(new eb(e.key,e.value,'"property" property is required')),c;function u(e){let r=[],n=e.value,s=e.key;if("array"!==rE(n))return[new eb(s,n,`array expected, ${rE(n)} found`)];if(2!==n.length)return[new eb(s,n,`array length 2 expected, length ${n.length} found`)];if(l){if("object"!==rE(n[0]))return[new eb(s,n,`object expected, ${rE(n[0])} found`)];if(void 0===n[0].zoom)return[new eb(s,n,"object stop key must have zoom")];if(void 0===n[0].value)return[new eb(s,n,"object stop key must have value")];if(a&&a>rJ(n[0].zoom))return[new eb(s,n[0].zoom,"stop zoom values must appear in ascending order")];rJ(n[0].zoom)!==a&&(a=rJ(n[0].zoom),i=void 0,o={}),r=r.concat(r0({key:`${s}[0]`,value:n[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:r2,value:h}}))}else r=r.concat(h({key:`${s}[0]`,value:n[0],valueSpec:{},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},n));return rj(rQ(n[1]))?r.concat([new eb(`${s}[1]`,n[1],"expressions are not allowed in function stops.")]):r.concat(e.validateSpec({key:`${s}[1]`,value:n[1],valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function h(e,a){let s=rE(e.value),l=rJ(e.value),c=null!==e.value?e.value:a;if(n){if(s!==n)return[new eb(e.key,c,`${s} stop domain type must match previous stop domain type ${n}`)]}else n=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new eb(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==r){let n=`number expected, ${s} found`;return rA(t)&&void 0===r&&(n+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new eb(e.key,c,n)]}return"categorical"!==r||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===s&&void 0!==i&&lnew eb(`${e.key}${t.key}`,e.value,t.message));let r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new eb(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!r_(r))return[new eb(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!r_(r))return[new eb(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!rw(r,["zoom","feature-state"]))return[new eb(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!rb(r))return[new eb(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function r4(e){let t=e.key,r=e.value,n=e.valueSpec,i=[];return Array.isArray(n.values)?-1===n.values.indexOf(rJ(r))&&i.push(new eb(t,r,`expected one of [${n.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(n.values).indexOf(rJ(r))&&i.push(new eb(t,r,`expected one of [${Object.keys(n.values).join(", ")}], ${JSON.stringify(r)} found`)),i}function r6(e){return rq(rQ(e.value))?r5(e_({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){let r=t.value,n=t.key;if("array"!==rE(r))return[new eb(n,r,`array expected, ${rE(r)} found`)];let i=t.styleSpec,a,o=[];if(r.length<1)return[new eb(n,r,"filter array must have at least 1 element")];switch(o=o.concat(r4({key:`${n}[0]`,value:r[0],valueSpec:i.filter_operator,style:t.style,styleSpec:t.styleSpec})),rJ(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===rJ(r[1])&&o.push(new eb(n,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":3!==r.length&&o.push(new eb(n,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&"string"!==(a=rE(r[1]))&&o.push(new eb(`${n}[1]`,r[1],`string expected, ${a} found`));for(let e=2;e{e in r&&t.push(new eb(n,r[e],`"${e}" is prohibited for ref layers`))}),i.layers.forEach(t=>{rJ(t.id)===s&&(e=t)}),e?e.ref?t.push(new eb(n,r.ref,"ref cannot reference another ref layer")):o=rJ(e.type):t.push(new eb(n,r.ref,`ref layer "${s}" not found`))}else if("background"!==o)if(r.source){let e=i.sources&&i.sources[r.source],a=e&&rJ(e.type);e?"vector"===a&&"raster"===o?t.push(new eb(n,r.source,`layer "${r.id}" requires a raster source`)):"raster-dem"!==a&&"hillshade"===o?t.push(new eb(n,r.source,`layer "${r.id}" requires a raster-dem source`)):"raster"===a&&"raster"!==o?t.push(new eb(n,r.source,`layer "${r.id}" requires a vector source`)):"vector"!==a||r["source-layer"]?"raster-dem"===a&&"hillshade"!==o?t.push(new eb(n,r.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"===o&&r.paint&&r.paint["line-gradient"]&&("geojson"!==a||!e.lineMetrics)&&t.push(new eb(n,r,`layer "${r.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):t.push(new eb(n,r,`layer "${r.id}" must specify a "source-layer"`)):t.push(new eb(n,r.source,`source "${r.source}" not found`))}else t.push(new eb(n,r,'missing required property "source"'));return t=t.concat(r0({key:n,value:r,valueSpec:a.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${n}.type`,value:r.type,valueSpec:a.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:r,objectKey:"type"}),filter:r6,layout:e=>r0({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>r7(e_({layerType:o},e))}}),paint:e=>r0({layer:r,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>r9(e_({layerType:o},e))}})}}))}function nt(e){let t=e.value,r=e.key,n=rE(t);return"string"!==n?[new eb(r,t,`string expected, ${n} found`)]:[]}let nr={promoteId:function({key:e,value:t}){if("string"===rE(t))return nt({key:e,value:t});{let r=[];for(let n in t)r.push(...nt({key:`${e}.${n}`,value:t[n]}));return r}}};function nn(e){let t=e.value,r=e.key,n=e.styleSpec,i=e.style,a=e.validateSpec;if(!t.type)return[new eb(r,t,'"type" is required')];let o=rJ(t.type),s;switch(o){case"vector":case"raster":return r0({key:r,value:t,valueSpec:n[`source_${o.replace("-","_")}`],style:e.style,styleSpec:n,objectElementValidators:nr,validateSpec:a});case"raster-dem":return function(e){var t;let r=null!=(t=e.sourceName)?t:"",n=e.value,i=e.styleSpec,a=i.source_raster_dem,o=e.style,s=[],l=rE(n);if(void 0===n)return s;if("object"!==l)return s.push(new eb("source_raster_dem",n,`object expected, ${l} found`)),s;let c="custom"===rJ(n.encoding),u=["redFactor","greenFactor","blueFactor","baseShift"],h=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let t in n)!c&&u.includes(t)?s.push(new eb(t,n[t],`In "${r}": "${t}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):a[t]?s=s.concat(e.validateSpec({key:t,value:n[t],valueSpec:a[t],validateSpec:e.validateSpec,style:o,styleSpec:i})):s.push(new eb(t,n[t],`unknown property "${t}"`));return s}({sourceName:r,value:t,style:e.style,styleSpec:n,validateSpec:a});case"geojson":if(s=r0({key:r,value:t,valueSpec:n.source_geojson,style:i,styleSpec:n,validateSpec:a,objectElementValidators:nr}),t.cluster)for(let e in t.clusterProperties){let[n,i]=t.clusterProperties[e],o="string"==typeof n?[n,["accumulated"],["get",e]]:n;s.push(...r5({key:`${r}.${e}.map`,value:i,validateSpec:a,expressionContext:"cluster-map"})),s.push(...r5({key:`${r}.${e}.reduce`,value:o,validateSpec:a,expressionContext:"cluster-reduce"}))}return s;case"video":return r0({key:r,value:t,valueSpec:n.source_video,style:i,validateSpec:a,styleSpec:n});case"image":return r0({key:r,value:t,valueSpec:n.source_image,style:i,validateSpec:a,styleSpec:n});case"canvas":return[new eb(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return r4({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:i,validateSpec:a,styleSpec:n})}}function ni(e){let t=e.value,r=e.styleSpec,n=r.light,i=e.style,a=[],o=rE(t);if(void 0===t)return a;if("object"!==o)return a.concat([new eb("light",t,`object expected, ${o} found`)]);for(let o in t){let s=o.match(/^(.*)-transition$/);a=a.concat(s&&n[s[1]]&&n[s[1]].transition?e.validateSpec({key:o,value:t[o],valueSpec:r.transition,validateSpec:e.validateSpec,style:i,styleSpec:r}):n[o]?e.validateSpec({key:o,value:t[o],valueSpec:n[o],validateSpec:e.validateSpec,style:i,styleSpec:r}):[new eb(o,t[o],`unknown property "${o}"`)])}return a}function na(e){let t=e.value,r=e.styleSpec,n=r.sky,i=e.style,a=rE(t);if(void 0===t)return[];if("object"!==a)return[new eb("sky",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(n[a]?e.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:r}):[new eb(a,t[a],`unknown property "${a}"`)]);return o}function no(e){let t=e.value,r=e.styleSpec,n=r.terrain,i=e.style,a=[],o=rE(t);if(void 0===t)return a;if("object"!==o)return a.concat([new eb("terrain",t,`object expected, ${o} found`)]);for(let o in t)a=a.concat(n[o]?e.validateSpec({key:o,value:t[o],valueSpec:n[o],validateSpec:e.validateSpec,style:i,styleSpec:r}):[new eb(o,t[o],`unknown property "${o}"`)]);return a}function ns(e){let t=[],r=e.value,n=e.key;if(Array.isArray(r)){let i=[],a=[];for(let o in r)r[o].id&&i.includes(r[o].id)&&t.push(new eb(n,r,`all the sprites' ids must be unique, but ${r[o].id} is duplicated`)),i.push(r[o].id),r[o].url&&a.includes(r[o].url)&&t.push(new eb(n,r,`all the sprites' URLs must be unique, but ${r[o].url} is duplicated`)),a.push(r[o].url),t=t.concat(r0({key:`${n}[${o}]`,value:r[o],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return nt({key:n,value:r})}let nl={"*":()=>[],array:r1,boolean:function(e){let t=e.value,r=e.key,n=rE(t);return"boolean"!==n?[new eb(r,t,`boolean expected, ${n} found`)]:[]},number:r2,color:function(e){let t=e.key,r=e.value,n=rE(r);return"string"!==n?[new eb(t,r,`color expected, ${n} found`)]:e8.parse(String(r))?[]:[new eb(t,r,`color expected, "${r}" found`)]},constants:rK,enum:r4,filter:r6,function:r3,layer:ne,object:r0,source:nn,light:ni,sky:na,terrain:no,projection:function(e){let t=e.value,r=e.styleSpec,n=r.projection,i=e.style,a=rE(t);if(void 0===t)return[];if("object"!==a)return[new eb("projection",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(n[a]?e.validateSpec({key:a,value:t[a],valueSpec:n[a],style:i,styleSpec:r}):[new eb(a,t[a],`unknown property "${a}"`)]);return o},string:nt,formatted:function(e){return 0===nt(e).length?[]:r5(e)},resolvedImage:function(e){return 0===nt(e).length?[]:r5(e)},padding:function(e){let t=e.key,r=e.value;if("array"===rE(r)){if(r.length<1||r.length>4)return[new eb(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let n={type:"number"},i=[];for(let a=0;a[]}})),e.constants&&(r=r.concat(rK({key:"constants",value:e.constants,style:e,styleSpec:t,validateSpec:nc}))),nd(r)}function nf(e){return function(t){return e(r(h({},t),i({validateSpec:nc})))}}function nd(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function np(e){return function(...t){return nd(e.apply(this,t))}}nh.source=np(nf(nn)),nh.sprite=np(nf(ns)),nh.glyphs=np(nf(nu)),nh.light=np(nf(ni)),nh.sky=np(nf(na)),nh.terrain=np(nf(no)),nh.layer=np(nf(ne)),nh.filter=np(nf(r6)),nh.paintProperty=np(nf(r9)),nh.layoutProperty=np(nf(r7));let nm=nh.light,ng=nh.sky,ny=nh.paintProperty,nv=nh.layoutProperty;function nx(e,t){let r=!1;if(t&&t.length)for(let n of t)e.fire(new ec(Error(n.message))),r=!0;return r}class nb{constructor(e,t,r){let n=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let i=new Int32Array(this.arrayBuffer);e=i[0],this.d=(t=i[1])+2*(r=i[2]);for(let e=0;e=c[l+0]&&n>=c[l+1])?(o[h]=!0,a.push(i[h])):o[h]=!1}}}}_forEachCell(e,t,r,n,i,a,o,s){let l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),h=this._convertToCellCoord(n);for(let f=l;f<=u;f++)for(let l=c;l<=h;l++){let c=this.d*l+f;if((!s||s(this._convertFromCellCoord(f),this._convertFromCellCoord(l),this._convertFromCellCoord(f+1),this._convertFromCellCoord(l+1)))&&i.call(this,e,t,r,n,c,a,o,s))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,t=3+this.cells.length+1+1,r=0;for(let e=0;etypeof ArrayBuffer&&(e instanceof ArrayBuffer||e.constructor&&"ArrayBuffer"===e.constructor.name)}function nT(e){return e.$name||e.constructor._classRegistryKey}function nA(e){return!function(e){if(null===e||"object"!=typeof e)return!1;let t=nT(e);return!(!t||"Object"===t)}(e)&&(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||nk(e)||W(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function nM(e,t){if(nA(e))return(nk(e)||W(e))&&t&&t.push(e),ArrayBuffer.isView(e)&&t&&t.push(e.buffer),e instanceof ImageData&&t&&t.push(e.data.buffer),e;if(Array.isArray(e)){let r=[];for(let n of e)r.push(nM(n,t));return r}if("object"!=typeof e)throw Error("can't serialize object of type "+typeof e);let r=nT(e);if(!r)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!n_[r])throw Error(`${r} is not registered.`);let{klass:n}=n_[r],i=n.serialize?n.serialize(e,t):{};if(n.serialize){if(t&&i===t[t.length-1])throw Error("statically serialized object won't survive transfer of $name property")}else{for(let n in e){if(!e.hasOwnProperty(n)||n_[r].omit.indexOf(n)>=0)continue;let a=e[n];i[n]=n_[r].shallow.indexOf(n)>=0?a:nM(a,t)}e instanceof Error&&(i.message=e.message)}if(i.$name)throw Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(i.$name=r),i}function nS(e){if(nA(e))return e;if(Array.isArray(e))return e.map(nS);if("object"!=typeof e)throw Error("can't deserialize object of type "+typeof e);let t=nT(e)||"Object";if(!n_[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:r}=n_[t];if(!r)throw Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let n=Object.create(r.prototype);for(let r of Object.keys(e)){if("$name"===r)continue;let i=e[r];n[r]=n_[t].shallow.indexOf(r)>=0?i:nS(i)}return n}class nE{constructor(){this.first=!0}update(e,t){let r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoome>=6016&&e<=6143,nL=e=>e>=12272&&e<=12287,nI=e=>e>=12288&&e<=12351,nP=e=>e>=12448&&e<=12543,nz=e=>e>=12736&&e<=12783,nO=e=>e>=12800&&e<=13055,nD=e=>e>=13056&&e<=13311,nR=e=>e>=65040&&e<=65055,nj=e=>e>=65072&&e<=65103,nF=e=>e>=65104&&e<=65135,nB=e=>e>=65280&&e<=65519;function nN(e){for(let t of e)if(nH(t.charCodeAt(0)))return!0;return!1}function nU(e){return RegExp(e.map(e=>{try{return RegExp(`\\p{sc=${e}}`,"u").source}catch{return null}}).filter(e=>e).join("|"),"u")}let nV=nU(["Arab","Dupl","Mong","Ougr","Syrc"]),nq=nU(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function nH(e){let t,r;return!(746!==e&&747!==e&&(e<4352||!(nj(e)&&!(e>=65097&&e<=65103)||nD(e)||nz(e)||!(!nI(e)||e>=12296&&e<=12305||e>=12308&&e<=12319||12336===e)||nO(e)||nL(e)||(t=e)>=12688&&t<=12703||nP(e)&&12540!==e||!(!nB(e)||65288===e||65289===e||65293===e||e>=65306&&e<=65310||65339===e||65341===e||65343===e||e>=65371&&e<=65503||65507===e||e>=65512&&e<=65519)||!(!nF(e)||e>=65112&&e<=65118||e>=65123&&e<=65126)||nR(e)||(r=e)>=19904&&r<=19967||RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(e))||RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(e))||nq.test(String.fromCodePoint(e)))))}function nG(e){let t,r,n,i,a,o,s,l,c,u,h,f;return!(nH(e)||(t=e)>=128&&t<=255&&(167===e||169===e||174===e||177===e||188===e||189===e||190===e||215===e||247===e)||(r=e)>=8192&&r<=8303&&(8214===e||8224===e||8225===e||8240===e||8241===e||8251===e||8252===e||8258===e||8263===e||8264===e||8265===e||8273===e)||(n=e)>=8448&&n<=8527||(i=e)>=8528&&i<=8591||(a=e)>=8960&&a<=9215&&(e>=8960&&e<=8967||e>=8972&&e<=8991||e>=8996&&e<=9e3||9003===e||e>=9085&&e<=9114||e>=9150&&e<=9165||9167===e||e>=9169&&e<=9179||e>=9186&&e<=9215)||(o=e)>=9216&&o<=9279&&9251!==e||(s=e)>=9280&&s<=9311||(l=e)>=9312&&l<=9471||(c=e)>=9632&&c<=9727||(u=e)>=9728&&u<=9983&&!(e>=9754&&e<=9759)||(h=e)>=11008&&h<=11263&&(e>=11026&&e<=11055||e>=11088&&e<=11097||e>=11192&&e<=11243)||nI(e)||nP(e)||(f=e)>=57344&&f<=63743||nj(e)||nF(e)||nB(e)||8734===e||8756===e||8757===e||e>=9984&&e<=10087||e>=10102&&e<=10131||65532===e||65533===e)}let nW=nU(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function nY(e){return nW.test(String.fromCodePoint(e))}let nX=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class nZ{constructor(e,t){this.zoom=e,t?(this.now=t.now,this.fadeDuration=t.fadeDuration,this.zoomHistory=t.zoomHistory,this.transition=t.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new nE,this.transition={})}isSupportedScript(e){var t,r="loaded"===nX.getRTLTextPluginStatus();for(let n of e)if(t=n.charCodeAt(0),!r&&nY(t)||t>=2304&&t<=3583||t>=3840&&t<=4255||nC(t))return!1;return!0}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}}class n${constructor(e,t){this.property=e,this.value=t,this.expression=function(e,t){if(rC(e))return new rV(e,t);if(rj(e)){let r=rU(e,t);if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return r.value}{let r=e;return"color"===t.type&&"string"==typeof e?r=e8.parse(e):"padding"===t.type&&("number"==typeof e||Array.isArray(e))?r=tt.parse(e):"variableAnchorOffsetCollection"===t.type&&Array.isArray(e)&&(r=tn.parse(e)),{kind:"constant",evaluate:()=>r}}}(void 0===t?e.specification.default:t,e.specification)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}}class nK{constructor(e){this.property=e,this.value=new n$(e,void 0)}transitioned(e,t){return new nQ(this.property,this.value,t,R({},e.transition,this.transition),e.now)}untransitioned(){return new nQ(this.property,this.value,null,{},0)}}class nJ{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues)}getValue(e){return N(this._values[e].value.value)}setValue(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new nK(this._values[e].property)),this._values[e].value=new n$(this._values[e].property,null===t?void 0:N(t))}getTransition(e){return N(this._values[e].transition)}setTransition(e,t){Object.prototype.hasOwnProperty.call(this._values,e)||(this._values[e]=new nK(this._values[e].property)),this._values[e].transition=N(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r);let n=this.getTransition(t);void 0!==n&&(e[`${t}-transition`]=n)}return e}transitioned(e,t){let r=new n0(this._properties);for(let n of Object.keys(this._values))r._values[n]=this._values[n].transitioned(e,t._values[n]);return r}untransitioned(){let e=new n0(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class nQ{constructor(e,t,r,n,i){this.property=e,this.value=t,this.begin=i+n.delay||0,this.end=this.begin+n.duration||0,e.specification.transition&&(n.delay||n.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let n=e.now||0,i=this.value.possiblyEvaluate(e,t,r),a=this.prior;if(a){if(n>this.end||this.value.isDataDriven())return this.prior=null,i;if(n=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}(o))}}return i}}class n0{constructor(e){this._properties=e,this._values=Object.create(e.defaultTransitioningPropertyValues)}possiblyEvaluate(e,t,r){let n=new n3(this._properties);for(let i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(e,t,r);return n}hasTransition(){for(let e of Object.keys(this._values))if(this._values[e].prior)return!0;return!1}}class n1{constructor(e){this._properties=e,this._values=Object.create(e.defaultPropertyValues)}hasValue(e){return void 0!==this._values[e].value}getValue(e){return N(this._values[e].value)}setValue(e,t){this._values[e]=new n$(this._values[e].property,null===t?void 0:N(t))}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r)}return e}possiblyEvaluate(e,t,r){let n=new n3(this._properties);for(let i of Object.keys(this._values))n._values[i]=this._values[i].possiblyEvaluate(e,t,r);return n}}class n2{constructor(e,t,r){this.property=e,this.value=t,this.parameters=r}isConstant(){return"constant"===this.value.kind}constantOr(e){return"constant"===this.value.kind?this.value.value:e}evaluate(e,t,r,n){return this.property.evaluate(this.value,this.parameters,e,t,r,n)}}class n3{constructor(e){this._properties=e,this._values=Object.create(e.defaultPossiblyEvaluatedValues)}get(e){return this._values[e]}}class n5{constructor(e){this.specification=e}possiblyEvaluate(e,t){if(e.isDataDriven())throw Error("Value should not be data driven");return e.expression.evaluate(t)}interpolate(e,t,r){let n=tA[this.specification.type];return n?n(e,t,r):e}}class n4{constructor(e,t){this.specification=e,this.overrides=t}possiblyEvaluate(e,t,r,n){return new n2(this,"constant"===e.expression.kind||"camera"===e.expression.kind?{kind:"constant",value:e.expression.evaluate(t,null,{},r,n)}:e.expression,t)}interpolate(e,t,r){if("constant"!==e.value.kind||"constant"!==t.value.kind)return e;if(void 0===e.value.value||void 0===t.value.value)return new n2(this,{kind:"constant",value:void 0},e.parameters);let n=tA[this.specification.type];return n?new n2(this,{kind:"constant",value:n(e.value.value,t.value.value,r)},e.parameters):e}evaluate(e,t,r,n,i,a){return"constant"===e.kind?e.value:e.evaluate(t,r,n,i,a)}}class n6 extends n4{possiblyEvaluate(e,t,r,n){if(void 0===e.value)return new n2(this,{kind:"constant",value:void 0},t);if("constant"===e.expression.kind){let i=e.expression.evaluate(t,null,{},r,n),a="resolvedImage"===e.property.specification.type&&"string"!=typeof i?i.name:i;return new n2(this,{kind:"constant",value:this._calculate(a,a,a,t)},t)}return"camera"===e.expression.kind?new n2(this,{kind:"constant",value:this._calculate(e.expression.evaluate({zoom:t.zoom-1}),e.expression.evaluate({zoom:t.zoom}),e.expression.evaluate({zoom:t.zoom+1}),t)},t):new n2(this,e.expression,t)}evaluate(e,t,r,n,i,a){if("source"===e.kind){let o=e.evaluate(t,r,n,i,a);return this._calculate(o,o,o,t)}return"composite"===e.kind?this._calculate(e.evaluate({zoom:Math.floor(t.zoom)-1},r,n),e.evaluate({zoom:Math.floor(t.zoom)},r,n),e.evaluate({zoom:Math.floor(t.zoom)+1},r,n),t):e.value}_calculate(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class n8{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,n){if(void 0!==e.value){if("constant"===e.expression.kind){let i=e.expression.evaluate(t,null,{},r,n);return this._calculate(i,i,i,t)}return this._calculate(e.expression.evaluate(new nZ(Math.floor(t.zoom-1),t)),e.expression.evaluate(new nZ(Math.floor(t.zoom),t)),e.expression.evaluate(new nZ(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,n){return n.zoom>n.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class n9{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,n){return!!e.expression.evaluate(t,null,{},r,n)}interpolate(){return!1}}class n7{constructor(e){for(let t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let n=this.defaultPropertyValues[t]=new n$(r,void 0),i=this.defaultTransitionablePropertyValues[t]=new nK(r);this.defaultTransitioningPropertyValues[t]=i.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=n.possiblyEvaluate({})}}}nw("DataDrivenProperty",n4),nw("DataConstantProperty",n5),nw("CrossFadedDataDrivenProperty",n6),nw("CrossFadedProperty",n8),nw("ColorRampProperty",n9);let ie="-transition";class it extends eu{constructor(e,t){if(super(),this.id=e.id,this.type=e.type,this._featureFilter={filter:()=>!0,needGeometry:!1},"custom"!==e.type&&(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),t.layout&&(this._unevaluatedLayout=new n1(t.layout)),t.paint)){for(let r in this._transitionablePaint=new nJ(t.paint),e.paint)this.setPaintProperty(r,e.paint[r],{validate:!1});for(let t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new n3(t.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){return"visibility"===e?this.visibility:this._unevaluatedLayout.getValue(e)}setLayoutProperty(e,t,r={}){null!=t&&this._validate(nv,`layers.${this.id}.layout.${e}`,e,t,r)||("visibility"!==e?this._unevaluatedLayout.setValue(e,t):this.visibility=t)}getPaintProperty(e){return e.endsWith(ie)?this._transitionablePaint.getTransition(e.slice(0,-11)):this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){if(null!=t&&this._validate(ny,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith(ie))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let r=this._transitionablePaint._values[e],n="cross-faded-data-driven"===r.property.specification["property-type"],i=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let o=this._transitionablePaint._values[e].value;return o.isDataDriven()||i||n||this._handleOverridablePaintPropertyUpdate(e,a,o)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e){return!!(this.minzoom&&e=this.maxzoom)||"none"===this.visibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){let e={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&&(e.layout=e.layout||{},e.layout.visibility=this.visibility),B(e,(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}_validate(e,t,r,n,i={}){return(!i||!1!==i.validate)&&nx(this,e.call(nh,{key:t,layerType:this.type,objectKey:r,value:n,styleSpec:eh,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof n2&&rA(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}let ir={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class ii{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ia{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function io(e,t=1){let r=0,n=0;return{members:e.map(e=>{let i=ir[e.type].BYTES_PER_ELEMENT,a=r=is(r,Math.max(t,i)),o=e.components||1;return n=Math.max(n,i),r+=i*o,{name:e.name,type:e.type,components:o,offset:a}}),size:is(r,Math.max(n,t)),alignment:t}}function is(e,t){return Math.ceil(e/t)*t}class il extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.int16[n+0]=t,this.int16[n+1]=r,e}}il.prototype.bytesPerElement=4,nw("StructArrayLayout2i4",il);class ic extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.int16[i+0]=t,this.int16[i+1]=r,this.int16[i+2]=n,e}}ic.prototype.bytesPerElement=6,nw("StructArrayLayout3i6",ic);class iu extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)}emplace(e,t,r,n,i){let a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=n,this.int16[a+3]=i,e}}iu.prototype.bytesPerElement=8,nw("StructArrayLayout4i8",iu);class ih extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=6*e;return this.int16[s+0]=t,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,e}}ih.prototype.bytesPerElement=12,nw("StructArrayLayout2i4i12",ih);class id extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=4*e,l=8*e;return this.int16[s+0]=t,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,e}}id.prototype.bytesPerElement=8,nw("StructArrayLayout2i4ub8",id);class ip extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.float32[n+0]=t,this.float32[n+1]=r,e}}ip.prototype.bytesPerElement=8,nw("StructArrayLayout2f8",ip);class im extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,c){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,n,i,a,o,s,l,c)}emplace(e,t,r,n,i,a,o,s,l,c,u){let h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=r,this.uint16[h+2]=n,this.uint16[h+3]=i,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,e}}im.prototype.bytesPerElement=20,nw("StructArrayLayout10ui20",im);class ig extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l,c,u,h){let f=this.length;return this.resize(f+1),this.emplace(f,e,t,r,n,i,a,o,s,l,c,u,h)}emplace(e,t,r,n,i,a,o,s,l,c,u,h,f){let d=12*e;return this.int16[d+0]=t,this.int16[d+1]=r,this.int16[d+2]=n,this.int16[d+3]=i,this.uint16[d+4]=a,this.uint16[d+5]=o,this.uint16[d+6]=s,this.uint16[d+7]=l,this.int16[d+8]=c,this.int16[d+9]=u,this.int16[d+10]=h,this.int16[d+11]=f,e}}ig.prototype.bytesPerElement=24,nw("StructArrayLayout4i4ui4i24",ig);class iy extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.float32[i+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e}}iy.prototype.bytesPerElement=12,nw("StructArrayLayout3f12",iy);class iv extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[+e+0]=t,e}}iv.prototype.bytesPerElement=4,nw("StructArrayLayout1ul4",iv);class ix extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a,o,s,l){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,n,i,a,o,s,l)}emplace(e,t,r,n,i,a,o,s,l,c){let u=10*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=n,this.int16[u+3]=i,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[5*e+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e}}ix.prototype.bytesPerElement=20,nw("StructArrayLayout6i1ul2ui20",ix);class ib extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=6*e;return this.int16[s+0]=t,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,e}}ib.prototype.bytesPerElement=12,nw("StructArrayLayout2i2i2i12",ib);class i_ extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,n,i)}emplace(e,t,r,n,i,a){let o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=n,this.int16[s+6]=i,this.int16[s+7]=a,e}}i_.prototype.bytesPerElement=16,nw("StructArrayLayout2f1f2i16",i_);class iw extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,n,i,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,n,i,a)}emplace(e,t,r,n,i,a,o){let s=16*e,l=4*e,c=8*e;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=n,this.float32[l+2]=i,this.int16[c+6]=a,this.int16[c+7]=o,e}}iw.prototype.bytesPerElement=16,nw("StructArrayLayout2ub2f2i16",iw);class ik extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,this.uint16[i+2]=n,e}}ik.prototype.bytesPerElement=6,nw("StructArrayLayout3ui6",ik);class iT extends ia{_refreshViews(){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)}emplaceBack(e,t,r,n,i,a,o,s,l,c,u,h,f,d,p,m,g){let y=this.length;return this.resize(y+1),this.emplace(y,e,t,r,n,i,a,o,s,l,c,u,h,f,d,p,m,g)}emplace(e,t,r,n,i,a,o,s,l,c,u,h,f,d,p,m,g,y){let v=24*e,x=12*e,b=48*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=n,this.uint16[v+3]=i,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[x+7]=h,this.float32[x+8]=f,this.uint8[b+36]=d,this.uint8[b+37]=p,this.uint8[b+38]=m,this.uint32[x+10]=g,this.int16[v+22]=y,e}}iT.prototype.bytesPerElement=48,nw("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",iT);class iA extends ia{_refreshViews(){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)}emplaceBack(e,t,r,n,i,a,o,s,l,c,u,h,f,d,p,m,g,y,v,x,b,_,w,k,T,A,M,S){let E=this.length;return this.resize(E+1),this.emplace(E,e,t,r,n,i,a,o,s,l,c,u,h,f,d,p,m,g,y,v,x,b,_,w,k,T,A,M,S)}emplace(e,t,r,n,i,a,o,s,l,c,u,h,f,d,p,m,g,y,v,x,b,_,w,k,T,A,M,S,E){let C=32*e,L=16*e;return this.int16[C+0]=t,this.int16[C+1]=r,this.int16[C+2]=n,this.int16[C+3]=i,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=c,this.uint16[C+9]=u,this.uint16[C+10]=h,this.uint16[C+11]=f,this.uint16[C+12]=d,this.uint16[C+13]=p,this.uint16[C+14]=m,this.uint16[C+15]=g,this.uint16[C+16]=y,this.uint16[C+17]=v,this.uint16[C+18]=x,this.uint16[C+19]=b,this.uint16[C+20]=_,this.uint16[C+21]=w,this.uint16[C+22]=k,this.uint32[L+12]=T,this.float32[L+13]=A,this.float32[L+14]=M,this.uint16[C+30]=S,this.uint16[C+31]=E,e}}iA.prototype.bytesPerElement=64,nw("StructArrayLayout8i15ui1ul2f2ui64",iA);class iM extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[+e+0]=t,e}}iM.prototype.bytesPerElement=4,nw("StructArrayLayout1f4",iM);class iS extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=3*e;return this.uint16[6*e+0]=t,this.float32[i+1]=r,this.float32[i+2]=n,e}}iS.prototype.bytesPerElement=12,nw("StructArrayLayout1ui2f12",iS);class iE extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r)}emplace(e,t,r,n){let i=4*e;return this.uint32[2*e+0]=t,this.uint16[i+2]=r,this.uint16[i+3]=n,e}}iE.prototype.bytesPerElement=8,nw("StructArrayLayout1ul2ui8",iE);class iC extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let n=2*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,e}}iC.prototype.bytesPerElement=4,nw("StructArrayLayout2ui4",iC);class iL extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[+e+0]=t,e}}iL.prototype.bytesPerElement=2,nw("StructArrayLayout1ui2",iL);class iI extends ia{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,n){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r,n)}emplace(e,t,r,n,i){let a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=n,this.float32[a+3]=i,e}}iI.prototype.bytesPerElement=16,nw("StructArrayLayout4f16",iI);class iP extends ii{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new S(this.anchorPointX,this.anchorPointY)}}iP.prototype.size=20;class iz extends ix{get(e){return new iP(this,e)}}nw("CollisionBoxArray",iz);class iO extends ii{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}iO.prototype.size=48;class iD extends iT{get(e){return new iO(this,e)}}nw("PlacedSymbolArray",iD);class iR extends ii{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}iR.prototype.size=64;class ij extends iA{get(e){return new iR(this,e)}}nw("SymbolInstanceArray",ij);class iF extends iM{getoffsetX(e){return this.float32[+e+0]}}nw("GlyphOffsetArray",iF);class iB extends ic{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}nw("SymbolLineVertexArray",iB);class iN extends ii{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}iN.prototype.size=12;class iU extends iS{get(e){return new iN(this,e)}}nw("TextAnchorOffsetArray",iU);class iV extends ii{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}iV.prototype.size=8;class iq extends iE{get(e){return new iV(this,e)}}nw("FeatureIndexArray",iq);class iH extends il{}class iG extends il{}class iW extends il{}class iY extends ih{}class iX extends id{}class iZ extends ip{}class i$ extends im{}class iK extends ig{}class iJ extends iy{}class iQ extends iv{}class i0 extends ib{}class i1 extends iw{}class i2 extends ik{}class i3 extends iC{}let{members:i5}=io([{name:"a_pos",components:2,type:"Int16"}],4);class i4{constructor(e=[]){this.segments=e}prepareSegment(e,t,r,n){let i=this.segments[this.segments.length-1];return e>i4.MAX_VERTEX_ARRAY_LENGTH&&V(`Max vertices per segment is ${i4.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}`),(!i||i.vertexLength+e>i4.MAX_VERTEX_ARRAY_LENGTH||i.sortKey!==n)&&(i={vertexOffset:t.length,primitiveOffset:r.length,vertexLength:0,primitiveLength:0},void 0!==n&&(i.sortKey=n),this.segments.push(i)),i}get(){return this.segments}destroy(){for(let e of this.segments)for(let t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,r,n){return new i4([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:n,vaos:{},sortKey:0}])}}function i6(e,t){return 256*(e=O(Math.floor(e),0,255))+O(Math.floor(t),0,255)}i4.MAX_VERTEX_ARRAY_LENGTH=65535,nw("SegmentVector",i4);let i8=io([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var i9={exports:{}},i7={exports:{}};i7.exports=function(e,t){var r,n,i,a,o,s;for(n=e.length-(r=3&e.length),i=t,s=0;s>>16)*0xcc9e2d51&65535)<<16)|0)<<15|o>>>17))*0x1b873593+(((o>>>16)*0x1b873593&65535)<<16)|0)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)|0))+((58964+(a>>>16)&65535)<<16);switch(o=0,r){case 3:o^=(255&e.charCodeAt(s+2))<<16;case 2:o^=(255&e.charCodeAt(s+1))<<8;case 1:i^=o=(65535&(o=(o=(65535&(o^=255&e.charCodeAt(s)))*0xcc9e2d51+(((o>>>16)*0xcc9e2d51&65535)<<16)|0)<<15|o>>>17))*0x1b873593+(((o>>>16)*0x1b873593&65535)<<16)|0}return i^=e.length,i=0x85ebca6b*(65535&(i^=i>>>16))+((0x85ebca6b*(i>>>16)&65535)<<16)|0,i=0xc2b2ae35*(65535&(i^=i>>>13))+((0xc2b2ae35*(i>>>16)&65535)<<16)|0,(i^=i>>>16)>>>0};var ae=i7.exports,at={exports:{}};at.exports=function(e,t){for(var r,n=e.length,i=t^n,a=0;n>=4;)r=0x5bd1e995*(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((0x5bd1e995*(r>>>16)&65535)<<16),i=0x5bd1e995*(65535&i)+((0x5bd1e995*(i>>>16)&65535)<<16)^(r=0x5bd1e995*(65535&(r^=r>>>24))+((0x5bd1e995*(r>>>16)&65535)<<16)),n-=4,++a;switch(n){case 3:i^=(255&e.charCodeAt(a+2))<<16;case 2:i^=(255&e.charCodeAt(a+1))<<8;case 1:i=0x5bd1e995*(65535&(i^=255&e.charCodeAt(a)))+((0x5bd1e995*(i>>>16)&65535)<<16)}return i=0x5bd1e995*(65535&(i^=i>>>13))+((0x5bd1e995*(i>>>16)&65535)<<16),(i^=i>>>15)>>>0};var ar=at.exports;i9.exports=ae,i9.exports.murmur3=ae,i9.exports.murmur2=ar;var an=_(i9.exports);class ai{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,n){this.ids.push(aa(e)),this.positions.push(t,r,n)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let t=aa(e),r=0,n=this.ids.length-1;for(;r>1;this.ids[e]>=t?n=e:r=e+1}let i=[];for(;this.ids[r]===t;)i.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return i}static serialize(e,t){let r=new Float64Array(e.ids),n=new Uint32Array(e.positions);return function e(t,r,n,i){for(;n>1],o=n-1,s=i+1;for(;;){do o++;while(t[o]a);if(o>=s)break;ao(t,o,s),ao(r,3*o,3*s),ao(r,3*o+1,3*s+1),ao(r,3*o+2,3*s+2)}s-n`u_${e}`),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return"color"===this.type?new au(e,t):new al(e,t)}}class ap{constructor(e,t){this.uniformNames=t.map(e=>`u_${e}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setUniform(e,t,r,n){let i="u_pattern_to"===n?this.patternTo:"u_pattern_from"===n?this.patternFrom:"u_pixel_ratio_to"===n?this.pixelRatioTo:"u_pixel_ratio_from"===n?this.pixelRatioFrom:null;i&&e.set(i)}getBinding(e,t,r){return"u_pattern"===r.substr(0,9)?new ac(e,t):new al(e,t)}}class am{constructor(e,t,r,n){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0})),this.paintVertexArray=new n}populatePaintArray(e,t,r,n,i){let a=this.paintVertexArray.length,o=this.expression.evaluate(new nZ(0),t,{},n,[],i);this.paintVertexArray.resize(e),this._setPaintValue(a,e,o)}updatePaintArray(e,t,r,n){let i=this.expression.evaluate({zoom:0},r,n);this._setPaintValue(e,t,i)}_setPaintValue(e,t,r){if("color"===this.type){let n=af(r);for(let r=e;r`u_${e}_t`),this.type=r,this.useIntegerZoom=n,this.zoom=i,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,t,r,n,i){let a=this.expression.evaluate(new nZ(this.zoom),t,{},n,[],i),o=this.expression.evaluate(new nZ(this.zoom+1),t,{},n,[],i),s=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(s,e,a,o)}updatePaintArray(e,t,r,n){let i=this.expression.evaluate({zoom:this.zoom},r,n),a=this.expression.evaluate({zoom:this.zoom+1},r,n);this._setPaintValue(e,t,i,a)}_setPaintValue(e,t,r,n){if("color"===this.type){let i=af(r),a=af(n);for(let r=e;r`#define HAS_UNIFORM_${e}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof am||r instanceof ag)for(let t=0;t!0){for(let n of(this.programConfigurations={},e))this.programConfigurations[n.id]=new av(n,t,r);this.needsUpload=!1,this._featureMap=new ai,this._bufferOffset=0}populatePaintArrays(e,t,r,n,i,a){for(let r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,n,i,a);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,n){for(let i of r)this.needsUpload=this.programConfigurations[i.id].updatePaintArrays(e,this._featureMap,t,i,n)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}}function ab(e,t,r){let n={"line-pattern":{source:i$,composite:i$},"fill-pattern":{source:i$,composite:i$},"fill-extrusion-pattern":{source:i$,composite:i$}}[e];return n&&n[r]||({color:{source:ip,composite:iI},number:{source:iM,composite:ip}})[t][r]}nw("ConstantBinder",ad),nw("CrossFadedConstantBinder",ap),nw("SourceExpressionBinder",am),nw("CrossFadedCompositeBinder",ay),nw("CompositeExpressionBinder",ag),nw("ProgramConfiguration",av,{omit:["_buffers"]}),nw("ProgramConfigurationSet",ax);let a_=-16383-1;function aw(e){let t=8192/e.extent,r=e.loadGeometry();for(let e=0;er.x+1||ar.y+1)&&V("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return r}function ak(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?aw(e):[]}}function aT(e,t,r,n,i){e.emplaceBack(2*t+(n+1)/2,2*r+(i+1)/2)}class aA{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new iG,this.indexArray=new i2,this.segments=new i4,this.programConfigurations=new ax(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){let n=this.layers[0],i=[],a=null,o=!1;for(let{feature:t,id:s,index:l,sourceLayerIndex:c}of("circle"===n.type&&(o=!(a=n.layout.get("circle-sort-key")).isConstant()),e)){let e=this.layers[0]._featureFilter.needGeometry,n=ak(t,e);if(!this.layers[0]._featureFilter.filter(new nZ(this.zoom),n,r))continue;let u=o?a.evaluate(n,{},r):void 0,h={id:s,properties:t.properties,type:t.type,sourceLayerIndex:c,index:l,geometry:e?n.geometry:aw(t),patterns:{},sortKey:u};i.push(h)}for(let n of(o&&i.sort((e,t)=>e.sortKey-t.sortKey),i)){let{geometry:i,index:a,sourceLayerIndex:o}=n,s=e[a].feature;this.addFeature(n,i,a,r),t.featureIndex.insert(s,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,i5),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,r,n){for(let r of t)for(let t of r){let r=t.x,n=t.y;if(r<0||r>=8192||n<0||n>=8192)continue;let i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,e.sortKey),a=i.vertexLength;aT(this.layoutVertexArray,r,n,-1,-1),aT(this.layoutVertexArray,r,n,1,-1),aT(this.layoutVertexArray,r,n,1,1),aT(this.layoutVertexArray,r,n,-1,1),this.indexArray.emplaceBack(a,a+1,a+2),this.indexArray.emplaceBack(a,a+3,a+2),i.vertexLength+=4,i.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{},n)}}function aM(e,t){for(let r=0;r1?r:r.sub(t)._mult(i)._add(t))}function aI(e,t){let r,n,i,a=!1;for(let o=0;ot.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(a=!a)}return a}function aP(e,t){let r=!1;for(let n=0,i=e.length-1;nt.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function az(e,t,r){let n=t.paint.get(e).value;return"constant"===n.kind?n.value:r.programConfigurations.get(t.id).getMaxValue(e)}function aO(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function aD(e,t,r,n,i){if(!t[0]&&!t[1])return e;let a=S.convert(t)._mult(i);"viewport"===r&&a._rotate(-n);let o=[];for(let t=0;ttypeof Float32Array?Float32Array:Array;function aF(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function aB(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],d=t[10],p=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*n+b*s+_*h+w*m,e[1]=x*i+b*l+_*f+w*g,e[2]=x*a+b*c+_*d+w*y,e[3]=x*o+b*u+_*p+w*v,e[4]=(x=r[4])*n+(b=r[5])*s+(_=r[6])*h+(w=r[7])*m,e[5]=x*i+b*l+_*f+w*g,e[6]=x*a+b*c+_*d+w*y,e[7]=x*o+b*u+_*p+w*v,e[8]=(x=r[8])*n+(b=r[9])*s+(_=r[10])*h+(w=r[11])*m,e[9]=x*i+b*l+_*f+w*g,e[10]=x*a+b*c+_*d+w*y,e[11]=x*o+b*u+_*p+w*v,e[12]=(x=r[12])*n+(b=r[13])*s+(_=r[14])*h+(w=r[15])*m,e[13]=x*i+b*l+_*f+w*g,e[14]=x*a+b*c+_*d+w*y,e[15]=x*o+b*u+_*p+w*v,e}function aN(e,t,r){var n=t[0],i=t[1],a=t[2],o=t[3];return e[0]=r[0]*n+r[4]*i+r[8]*a+r[12]*o,e[1]=r[1]*n+r[5]*i+r[9]*a+r[13]*o,e[2]=r[2]*n+r[6]*i+r[10]*a+r[14]*o,e[3]=r[3]*n+r[7]*i+r[11]*a+r[15]*o,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),M=new aj(4),aj!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0,M[3]=0);class aU extends it{constructor(e){super(e,aR)}createBucket(e){return new aA(e)}queryRadius(e){return az("circle-radius",this,e)+az("circle-stroke-width",this,e)+aO(this.paint.get("circle-translate"))}queryIntersectsFeature(e,t,r,n,i,a,o,s){var l;let c=aD(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),a.angle,o),u=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),h="map"===this.paint.get("circle-pitch-alignment"),f=h?c:c.map(e=>aV(e,s)),d=h?u*o:u;for(let e of n)for(let t of e){let e=h?t:aV(t,s),r=d,n=aN([],[t.x,t.y,0,1],s);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?r*=n[3]/a.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(r*=a.cameraToCenterDistance/n[3]),l=r,aP(f,e)||aC(e,f,l))return!0}return!1}}function aV(e,t){let r=aN([],[e.x,e.y,0,1],t);return new S(r[0]/r[3],r[1]/r[3])}class aq extends aA{}nw("HeatmapBucket",aq,{omit:["layers"]});var aH={get paint(){return s=s||new n7({"heatmap-radius":new n4(eh.paint_heatmap["heatmap-radius"]),"heatmap-weight":new n4(eh.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new n5(eh.paint_heatmap["heatmap-intensity"]),"heatmap-color":new n9(eh.paint_heatmap["heatmap-color"]),"heatmap-opacity":new n5(eh.paint_heatmap["heatmap-opacity"])})}};function aG(e,{width:t,height:r},n,i){if(i){if(i instanceof Uint8ClampedArray)i=new Uint8Array(i.buffer);else if(i.length!==t*r*n)throw RangeError(`mismatched image size. expected: ${i.length} but got: ${t*r*n}`)}else i=new Uint8Array(t*r*n);return e.width=t,e.height=r,e.data=i,e}function aW(e,{width:t,height:r},n){if(t===e.width&&r===e.height)return;let i=aG({},{width:t,height:r},n);aY(e,i,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},n),e.width=t,e.height=r,e.data=i.data}function aY(e,t,r,n,i,a){if(0===i.width||0===i.height)return t;if(i.width>e.width||i.height>e.height||r.x>e.width-i.width||r.y>e.height-i.height)throw RangeError("out of range source coordinates for image copy");if(i.width>t.width||i.height>t.height||n.x>t.width-i.width||n.y>t.height-i.height)throw RangeError("out of range destination coordinates for image copy");let o=e.data,s=t.data;if(o===s)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l{t[e.evaluationKey]=a;let o=e.expression.evaluate(t);i.data[r+n+0]=Math.floor(255*o.r/o.a),i.data[r+n+1]=Math.floor(255*o.g/o.a),i.data[r+n+2]=Math.floor(255*o.b/o.a),i.data[r+n+3]=Math.floor(255*o.a)};if(e.clips)for(let t=0,i=0;t=r.next.y&&r.next.y!==r.y){let e=r.x+(i-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=n&&e>o&&(o=e,a=r.x=r.x&&r.x>=l&&n!==r.x&&a8(ia.x||r.x===a.x&&(h=a,f=r,0>a9(h.prev,h,f.prev)&&0>a9(f.next,h,h.next))))&&(a=r,u=t)}r=r.next}while(r!==s);return a}(e,t);if(!r)return t;let n=oi(r,e);return a5(n,n.next),a5(r,r.next)}(i[e],r);return r}(e,t,l,r)),e.length>80*r){n=1/0,i=1/0;let t=-1/0,o=-1/0;for(let a=r;at&&(t=r),s>o&&(o=s)}a=0!==(a=Math.max(t-n,o-i))?32767/a:0}return function e(t,r,n,i,a,o,s){if(!t)return;!s&&o&&function(e,t,r,n){let i=e;do 0===i.z&&(i.z=a6(i.x,i.y,t,r,n)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next;while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,r=1;do{let n,i=e;e=null;let a=null;for(t=0;i;){t++;let o=i,s=0;for(let e=0;e0||l>0&&o;)0!==s&&(0===l||!o||i.z<=o.z)?(n=i,i=i.nextZ,s--):(n=o,o=o.nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;i=o}a.nextZ=null,r*=2}while(t>1)}(i)}(t,i,a,o);let l=t;for(;t.prev!==t.next;){let c=t.prev,u=t.next;if(o?function(e,t,r,n){let i=e.prev,a=e.next;if(a9(i,e,a)>=0)return!1;let o=i.x,s=e.x,l=a.x,c=i.y,u=e.y,h=a.y,f=os?o>l?o:l:s>l?s:l,m=c>u?c>h?c:h:u>h?u:h,g=a6(f,d,t,r,n),y=a6(p,m,t,r,n),v=e.prevZ,x=e.nextZ;for(;v&&v.z>=g&&x&&x.z<=y;){if(v.x>=f&&v.x<=p&&v.y>=d&&v.y<=m&&v!==i&&v!==a&&a8(o,c,s,u,l,h,v.x,v.y)&&a9(v.prev,v,v.next)>=0||(v=v.prevZ,x.x>=f&&x.x<=p&&x.y>=d&&x.y<=m&&x!==i&&x!==a&&a8(o,c,s,u,l,h,x.x,x.y)&&a9(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;v&&v.z>=g;){if(v.x>=f&&v.x<=p&&v.y>=d&&v.y<=m&&v!==i&&v!==a&&a8(o,c,s,u,l,h,v.x,v.y)&&a9(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;x&&x.z<=y;){if(x.x>=f&&x.x<=p&&x.y>=d&&x.y<=m&&x!==i&&x!==a&&a8(o,c,s,u,l,h,x.x,x.y)&&a9(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}(t,i,a,o):function(e){let t=e.prev,r=e.next;if(a9(t,e,r)>=0)return!1;let n=t.x,i=e.x,a=r.x,o=t.y,s=e.y,l=r.y,c=ni?n>a?n:a:i>a?i:a,f=o>s?o>l?o:l:s>l?s:l,d=r.next;for(;d!==t;){if(d.x>=c&&d.x<=h&&d.y>=u&&d.y<=f&&a8(n,o,i,s,a,l,d.x,d.y)&&a9(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}(t))r.push(c.i,t.i,u.i),oo(t),t=u.next,l=u.next;else if((t=u)===l){s?1===s?e(t=function(e,t){let r=e;do{let n=r.prev,i=r.next.next;!a7(n,i)&&oe(n,r,r.next,i)&&on(n,i)&&on(i,n)&&(t.push(n.i,r.i,i.i),oo(r),oo(r.next),r=e=i),r=r.next}while(r!==e);return a5(r)}(a5(t),r),r,n,i,a,o,2):2===s&&function(t,r,n,i,a,o){let s=t;do{let t=s.next.next;for(;t!==s.prev;){var l,c;if(s.i!==t.i&&(l=s,c=t,l.next.i!==c.i&&l.prev.i!==c.i&&!function(e,t){let r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&oe(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(l,c)&&(on(l,c)&&on(c,l)&&function(e,t){let r=e,n=!1,i=(e.x+t.x)/2,a=(e.y+t.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!==e);return n}(l,c)&&(a9(l.prev,l,c.prev)||a9(l,c.prev,c))||a7(l,c)&&a9(l.prev,l,l.next)>0&&a9(c.prev,c,c.next)>0))){let l=oi(s,t);return s=a5(s,s.next),l=a5(l,l.next),e(s,r,n,i,a,o,0),void e(l,r,n,i,a,o,0)}t=t.next}s=s.next}while(s!==t)}(t,r,n,i,a,o):e(a5(t),r,n,i,a,o,1);break}}}(l,c,r,n,i,a,0),c}function a3(e,t,r,n,i){let a;if(i===function(e,t,r,n){let i=0;for(let a=t,o=r-n;a0)for(let i=t;i=t;i-=n)a=oa(i/n|0,e[i],e[i+1],a);return a&&a7(a,a.next)&&(oo(a),a=a.next),a}function a5(e,t){if(!e)return e;t||(t=e);let r,n=e;do if(r=!1,n.steiner||!a7(n,n.next)&&0!==a9(n.prev,n,n.next))n=n.next;else{if(oo(n),(n=t=n.prev)===n.next)break;r=!0}while(r||n!==t);return t}function a4(e,t){return e.x-t.x}function a6(e,t,r,n,i){return(e=0x55555555&((e=0x33333333&((e=0xf0f0f0f&((e=0xff00ff&((e=(e-r)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=0x55555555&((t=0x33333333&((t=0xf0f0f0f&((t=0xff00ff&((t=(t-n)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function a8(e,t,r,n,i,a,o,s){return(i-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(i-o)*(n-s)}function a9(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function a7(e,t){return e.x===t.x&&e.y===t.y}function oe(e,t,r,n){let i=or(a9(e,t,r)),a=or(a9(e,t,n)),o=or(a9(r,n,e)),s=or(a9(r,n,t));return i!==a&&o!==s||!(0!==i||!ot(e,r,t))||!(0!==a||!ot(e,n,t))||!(0!==o||!ot(r,e,n))||!(0!==s||!ot(r,t,n))}function ot(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function or(e){return e>0?1:e<0?-1:0}function on(e,t){return 0>a9(e.prev,e,e.next)?a9(e,t,e.next)>=0&&a9(e,e.prev,t)>=0:0>a9(e,t,e.prev)||0>a9(e,e.next,t)}function oi(e,t){let r=os(e.i,e.x,e.y),n=os(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=i,i.prev=r,n.next=r,r.prev=n,a.next=n,n.prev=a,n}function oa(e,t,r,n){let i=os(e,t,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 oo(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function os(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function ol(e,t,r){let n=r.patternDependencies,i=!1;for(let r of t){let t=r.paint.get(`${e}-pattern`);t.isConstant()||(i=!0);let a=t.constantOr(null);a&&(i=!0,n[a.to]=!0,n[a.from]=!0)}return i}function oc(e,t,r,n,i){let a=i.patternDependencies;for(let o of t){let t=o.paint.get(`${e}-pattern`).value;if("constant"!==t.kind){let e=t.evaluate({zoom:n-1},r,{},i.availableImages),s=t.evaluate({zoom:n},r,{},i.availableImages),l=t.evaluate({zoom:n+1},r,{},i.availableImages);e=e&&e.name?e.name:e,s=s&&s.name?s.name:s,l=l&&l.name?l.name:l,a[e]=!0,a[s]=!0,a[l]=!0,r.patterns[o.id]={min:e,mid:s,max:l}}}return r}class ou{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new iW,this.indexArray=new i2,this.indexArray2=new i3,this.programConfigurations=new ax(e.layers,e.zoom),this.segments=new i4,this.segments2=new i4,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasPattern=ol("fill",this.layers,t);let n=this.layers[0].layout.get("fill-sort-key"),i=!n.isConstant(),a=[];for(let{feature:o,id:s,index:l,sourceLayerIndex:c}of e){let e=this.layers[0]._featureFilter.needGeometry,u=ak(o,e);if(!this.layers[0]._featureFilter.filter(new nZ(this.zoom),u,r))continue;let h=i?n.evaluate(u,{},r,t.availableImages):void 0,f={id:s,properties:o.properties,type:o.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:aw(o),patterns:{},sortKey:h};a.push(f)}for(let n of(i&&a.sort((e,t)=>e.sortKey-t.sortKey),a)){let{geometry:i,index:a,sourceLayerIndex:o}=n;if(this.hasPattern){let e=oc("fill",this.layers,n,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(n,i,a,r,{});t.featureIndex.insert(e[a].feature,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}addFeatures(e,t,r){for(let e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,a1),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,t,r,n,i){for(let e of t2(t,500)){let t=0;for(let r of e)t+=r.length;let r=this.segments.prepareSegment(t,this.layoutVertexArray,this.indexArray),n=r.vertexLength,i=[],a=[];for(let t of e){if(0===t.length)continue;t!==e[0]&&a.push(i.length/2);let r=this.segments2.prepareSegment(t.length,this.layoutVertexArray,this.indexArray2),n=r.vertexLength;this.layoutVertexArray.emplaceBack(t[0].x,t[0].y),this.indexArray2.emplaceBack(n+t.length-1,n),i.push(t[0].x),i.push(t[0].y);for(let e=1;e>3;t=1===n?e.readString():2===n?e.readFloat():3===n?e.readDouble():4===n?e.readVarint64():5===n?e.readVarint():6===n?e.readSVarint():7===n?e.readBoolean():null}return t}(r))}function o_(e,t,r){if(3===e){var n=new ox(r,r.readVarint()+r.pos);n.length&&(t[n.name]=n)}}oy.types=["Unknown","Point","LineString","Polygon"],oy.prototype.loadGeometry=function(){var e=this._pbf;e.pos=this._geometry;for(var t,r=e.readVarint()+e.pos,n=1,i=0,a=0,o=0,s=[];e.pos>3}if(i--,1===n||2===n)a+=e.readSVarint(),o+=e.readSVarint(),1===n&&(t&&s.push(t),t=[]),t.push(new w(a,o));else{if(7!==n)throw Error("unknown command "+n);t&&t.push(t[0].clone())}}return t&&s.push(t),s},oy.prototype.bbox=function(){var e=this._pbf;e.pos=this._geometry;for(var t=e.readVarint()+e.pos,r=1,n=0,i=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;e.pos>3}if(n--,1===r||2===r)(i+=e.readSVarint())s&&(s=i),(a+=e.readSVarint())c&&(c=a);else if(7!==r)throw Error("unknown command "+r)}return[o,l,s,c]},oy.prototype.toGeoJSON=function(e,t,r){var n,i,a=this.extent*Math.pow(2,r),o=this.extent*e,s=this.extent*t,l=this.loadGeometry(),c=oy.types[this.type];function u(e){for(var t=0;t=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];var t=this._pbf.readVarint()+this._pbf.pos;return new oy(this._pbf,t,this.extent,this._keys,this._values)},og.VectorTile=function(e,t){this.layers=e.readFields(o_,{},t)},og.VectorTileFeature=oy,og.VectorTileLayer=ox;let ow=og.VectorTileFeature.types;function ok(e,t,r,n,i,a,o,s){e.emplaceBack(t,r,2*Math.floor(8192*n)+o,8192*i*2,8192*a*2,Math.round(s))}class oT{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasPattern=!1,this.layoutVertexArray=new iY,this.centroidVertexArray=new iH,this.indexArray=new i2,this.programConfigurations=new ax(e.layers,e.zoom),this.segments=new i4,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){for(let{feature:n,id:i,index:a,sourceLayerIndex:o}of(this.features=[],this.hasPattern=ol("fill-extrusion",this.layers,t),e)){let e=this.layers[0]._featureFilter.needGeometry,s=ak(n,e);if(!this.layers[0]._featureFilter.filter(new nZ(this.zoom),s,r))continue;let l={id:i,sourceLayerIndex:o,index:a,geometry:e?s.geometry:aw(n),properties:n.properties,type:n.type,patterns:{}};this.hasPattern?this.features.push(oc("fill-extrusion",this.layers,l,this.zoom,t)):this.addFeature(l,l.geometry,a,r,{}),t.featureIndex.insert(n,l.geometry,a,o,this.index,!0)}}addFeatures(e,t,r){for(let e of this.features){let{geometry:n}=e;this.addFeature(e,n,e.index,t,r)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,om),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,op.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,r,n,i){for(let r of t2(t,500)){let t={x:0,y:0,vertexCount:0},n=0;for(let e of r)n+=e.length;let i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let e of r){var a,o,s;if(0===e.length||(a=e).every(e=>e.x<0)||a.every(e=>e.x>8192)||a.every(e=>e.y<0)||a.every(e=>e.y>8192))continue;let r=0;for(let n=0;n=1){let l=e[n-1];if(o=a,s=l,(o.x!==s.x||!(o.x<0)&&!(o.x>8192))&&(o.y!==s.y||!(o.y<0)&&!(o.y>8192))){i.vertexLength+4>i4.MAX_VERTEX_ARRAY_LENGTH&&(i=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let e=a.sub(l)._perp()._unit(),n=l.dist(a);r+n>32768&&(r=0),ok(this.layoutVertexArray,a.x,a.y,e.x,e.y,0,0,r),ok(this.layoutVertexArray,a.x,a.y,e.x,e.y,0,1,r),t.x+=2*a.x,t.y+=2*a.y,t.vertexCount+=2,r+=n,ok(this.layoutVertexArray,l.x,l.y,e.x,e.y,0,0,r),ok(this.layoutVertexArray,l.x,l.y,e.x,e.y,0,1,r),t.x+=2*l.x,t.y+=2*l.y,t.vertexCount+=2;let o=i.vertexLength;this.indexArray.emplaceBack(o,o+2,o+1),this.indexArray.emplaceBack(o+1,o+2,o+3),i.vertexLength+=4,i.primitiveLength+=2}}}}if(i.vertexLength+n>i4.MAX_VERTEX_ARRAY_LENGTH&&(i=this.segments.prepareSegment(n,this.layoutVertexArray,this.indexArray)),"Polygon"!==ow[e.type])continue;let l=[],c=[],u=i.vertexLength;for(let e of r)if(0!==e.length){e!==r[0]&&c.push(l.length/2);for(let r=0;re.id),this.index=e.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(e=>{this.gradients[e.id]={}}),this.layoutVertexArray=new iX,this.layoutVertexArray2=new iZ,this.indexArray=new i2,this.programConfigurations=new ax(e.layers,e.zoom),this.segments=new i4,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasPattern=ol("line",this.layers,t);let n=this.layers[0].layout.get("line-sort-key"),i=!n.isConstant(),a=[];for(let{feature:t,id:o,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=ak(t,e);if(!this.layers[0]._featureFilter.filter(new nZ(this.zoom),c,r))continue;let u=i?n.evaluate(c,{},r):void 0,h={id:o,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:aw(t),patterns:{},sortKey:u};a.push(h)}for(let n of(i&&a.sort((e,t)=>e.sortKey-t.sortKey),a)){let{geometry:i,index:a,sourceLayerIndex:o}=n;if(this.hasPattern){let e=oc("line",this.layers,n,this.zoom,t);this.patternFeatures.push(e)}else this.addFeature(n,i,a,r,{});t.featureIndex.insert(e[a].feature,i,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,r)}addFeatures(e,t,r){for(let e of this.patternFeatures)this.addFeature(e,e.geometry,e.index,t,r)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,oL)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,oC),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(e.properties,"mapbox_clip_end"))return{start:+e.properties.mapbox_clip_start,end:+e.properties.mapbox_clip_end}}addFeature(e,t,r,n,i){let a=this.layers[0].layout,o=a.get("line-join").evaluate(e,{}),s=a.get("line-cap"),l=a.get("line-miter-limit"),c=a.get("line-round-limit");for(let r of(this.lineClips=this.lineFeatureClips(e),t))this.addLine(r,e,o,s,l,c);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,i,n)}addLine(e,t,r,n,i,a){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t=2&&e[s-1].equals(e[s-2]);)s--;let l=0;for(;l0;if(_&&t>l){let e=h.dist(f);if(e>2*c){let t=h.sub(h.sub(f)._mult(c/e)._round());this.updateDistance(f,t),this.addCurrentVertex(t,p,0,0,u),f=t}}let k=f&&d,T=k?r:o?"butt":n;if(k&&"round"===T&&(xi&&(T="bevel"),"bevel"===T&&(x>2&&(T="flipbevel"),x100)g=m.mult(-1);else{let e=x*p.add(m).mag()/p.sub(m).mag();g._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(h,g,0,0,u),this.addCurrentVertex(h,g.mult(-1),0,0,u)}else if("bevel"===T||"fakeround"===T){let e=-Math.sqrt(x*x-1),t=w?e:0,r=w?0:e;if(f&&this.addCurrentVertex(h,p,t,r,u),"fakeround"===T){let e=Math.round(180*b/Math.PI/20);for(let t=1;t2*c){let t=h.add(d.sub(h)._mult(c/e)._round());this.updateDistance(h,t),this.addCurrentVertex(t,m,0,0,u),h=t}}}}addCurrentVertex(e,t,r,n,i,a=!1){let o=t.y*n-t.x,s=-t.y-t.x*n;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,a,!1,r,i),this.addHalfVertex(e,o,s,a,!0,-n,i),this.distance>16384&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,n,i,a))}addHalfVertex({x:e,y:t},r,n,i,a,o,s){let l=.5*(this.lineClips?32767*this.scaledDistance:this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+ +!!i,(t<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*n)+128,1+(0===o?0:o<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let c=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,c),s.primitiveLength++),a?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}}nw("LineBucket",oz,{omit:["layers","patternFeatures"]});var oO={get paint(){return p=p||new n7({"line-opacity":new n4(eh.paint_line["line-opacity"]),"line-color":new n4(eh.paint_line["line-color"]),"line-translate":new n5(eh.paint_line["line-translate"]),"line-translate-anchor":new n5(eh.paint_line["line-translate-anchor"]),"line-width":new n4(eh.paint_line["line-width"]),"line-gap-width":new n4(eh.paint_line["line-gap-width"]),"line-offset":new n4(eh.paint_line["line-offset"]),"line-blur":new n4(eh.paint_line["line-blur"]),"line-dasharray":new n8(eh.paint_line["line-dasharray"]),"line-pattern":new n6(eh.paint_line["line-pattern"]),"line-gradient":new n9(eh.paint_line["line-gradient"])})},get layout(){return d=d||new n7({"line-cap":new n5(eh.layout_line["line-cap"]),"line-join":new n4(eh.layout_line["line-join"]),"line-miter-limit":new n5(eh.layout_line["line-miter-limit"]),"line-round-limit":new n5(eh.layout_line["line-round-limit"]),"line-sort-key":new n4(eh.layout_line["line-sort-key"])})}};class oD extends n4{possiblyEvaluate(e,t){return t=new nZ(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,n){return t=R({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,n)}}class oR extends it{constructor(e){super(e,oO),this.gradientVersion=0,m||((m=new oD(oO.paint.properties["line-width"].specification)).useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){let e=this.gradientExpression();this.stepInterpolant=void 0!==e._styleExpression&&e._styleExpression.expression instanceof t_,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=m.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new oz(e)}queryRadius(e){var t,r;return t=az("line-width",this,e),((r=az("line-gap-width",this,e))>0?r+2*t:t)/2+Math.abs(az("line-offset",this,e))+aO(this.paint.get("line-translate"))}queryIntersectsFeature(e,t,r,n,i,a,o){var s,l;let c=aD(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),a.angle,o),u=o/2*(s=this.paint.get("line-width").evaluate(t,r),(l=this.paint.get("line-gap-width").evaluate(t,r))>0?l+2*s:s),h=this.paint.get("line-offset").evaluate(t,r);return h&&(n=function(e,t){let r=[];for(let n=0;n=3){for(let t=0;t1){if(aE(e,t))return!0;for(let n=0;n":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","\xa2":"¢","\xa3":"£","\xa5":"¥","\xa6":"¦","\xac":"¬","\xaf":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};var oq=function(e,t,r,n,i){var a,o,s=8*i-n-1,l=(1<>1,u=-7,h=r?i-1:0,f=r?-1:1,d=e[t+h];for(h+=f,a=d&(1<<-u)-1,d>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=f,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=n;u>0;o=256*o+e[t+h],h+=f,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,n),a-=c}return(d?-1:1)*o*Math.pow(2,a-n)},oH=function(e,t,r,n,i,a){var o,s,l,c=8*a-i-1,u=(1<>1,f=5960464477539062e-23*(23===i),d=n?0:a-1,p=n?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),(t+=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=(t*l-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(o=o<0;e[r+d]=255&o,d+=p,o/=256,c-=8);e[r+d-p]|=128*m};function oG(e){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(e)?e:new Uint8Array(e||0),this.pos=0,this.type=0,this.length=this.buf.length}oG.Varint=0,oG.Fixed64=1,oG.Bytes=2,oG.Fixed32=5;var oW=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function oY(e){return e.type===oG.Bytes?e.readVarint()+e.pos:e.pos+1}function oX(e,t,r){var n=t<=16383?1:t<=2097151?2:t<=0xfffffff?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(n);for(var i=r.pos-1;i>=e;i--)r.buf[i+n]=r.buf[i]}function oZ(e,t){for(var r=0;r>>8,e[r+2]=t>>>16,e[r+3]=t>>>24}function o6(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+(e[t+3]<<24)}oG.prototype={destroy:function(){this.buf=null},readFields:function(e,t,r){for(r=r||this.length;this.pos>3,a=this.pos;this.type=7&n,e(i,t,this),this.pos===a&&this.skip(n)}return t},readMessage:function(e,t){return this.readFields(e,t,this.readVarint()+this.pos)},readFixed32:function(){var e=o5(this.buf,this.pos);return this.pos+=4,e},readSFixed32:function(){var e=o6(this.buf,this.pos);return this.pos+=4,e},readFixed64:function(){var e=o5(this.buf,this.pos)+0x100000000*o5(this.buf,this.pos+4);return this.pos+=8,e},readSFixed64:function(){var e=o5(this.buf,this.pos)+0x100000000*o6(this.buf,this.pos+4);return this.pos+=8,e},readFloat:function(){var e=oq(this.buf,this.pos,!0,23,4);return this.pos+=4,e},readDouble:function(){var e=oq(this.buf,this.pos,!0,52,8);return this.pos+=8,e},readVarint:function(e){var t,r,n=this.buf;return t=127&(r=n[this.pos++]),r<128?t:(t|=(127&(r=n[this.pos++]))<<7,r<128?t:(t|=(127&(r=n[this.pos++]))<<14,r<128?t:(t|=(127&(r=n[this.pos++]))<<21,r<128?t:function(e,t,r){var n,i,a,o=r.buf;if(i=(112&(a=o[r.pos++]))>>4,a<128||(i|=(127&(a=o[r.pos++]))<<3,a<128)||(i|=(127&(a=o[r.pos++]))<<10,a<128)||(i|=(127&(a=o[r.pos++]))<<17,a<128)||(i|=(127&(a=o[r.pos++]))<<24,a<128)||(i|=(1&(a=o[r.pos++]))<<31,a<128))return n=i,t?0x100000000*n+(e>>>0):0x100000000*(n>>>0)+(e>>>0);throw Error("Expected varint not more than 10 bytes")}(t|=(15&(r=n[this.pos]))<<28,e,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var e=this.readVarint();return e%2==1?-((e+1)/2):e/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var e,t=this.readVarint()+this.pos,r=this.pos;return this.pos=t,t-r>=12&&oW?(e=this.buf,oW.decode(e.subarray(r,t))):function(e,t,r){for(var n="",i=t;i239?4:l>223?3:l>191?2:1;if(i+u>r)break;1===u?l<128&&(c=l):2===u?(192&(a=e[i+1]))==128&&(c=(31&l)<<6|63&a)<=127&&(c=null):3===u?(o=e[i+2],(192&(a=e[i+1]))==128&&(192&o)==128&&((c=(15&l)<<12|(63&a)<<6|63&o)<=2047||c>=55296&&c<=57343)&&(c=null)):4===u&&(o=e[i+2],s=e[i+3],(192&(a=e[i+1]))==128&&(192&o)==128&&(192&s)==128&&((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,r,t)},readBytes:function(){var e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t},readPackedVarint:function(e,t){if(this.type!==oG.Bytes)return e.push(this.readVarint(t));var r=oY(this);for(e=e||[];this.pos127;);else if(t===oG.Bytes)this.pos=this.readVarint()+this.pos;else if(t===oG.Fixed32)this.pos+=4;else{if(t!==oG.Fixed64)throw Error("Unimplemented type: "+t);this.pos+=8}},writeTag:function(e,t){this.writeVarint(e<<3|t)},realloc:function(e){for(var t=this.length||16;t0xfffffff||e<0?function(e,t){var r,n,i,a,o;if(e>=0?(r=e%0x100000000|0,n=e/0x100000000|0):(n=~(-e/0x100000000),0xffffffff^(r=~(-e%0x100000000))?r=r+1|0:(r=0,n=n+1|0)),e>=0xffffffffffffffff||e<-0xffffffffffffffff)throw Error("Given varint doesn't fit into 10 bytes");t.realloc(10),i=r,t.buf[t.pos++]=127&i|128,i>>>=7,t.buf[t.pos++]=127&i|128,i>>>=7,t.buf[t.pos++]=127&i|128,i>>>=7,t.buf[t.pos++]=127&i|128,t.buf[t.pos]=127&(i>>>=7),o=(7&(a=n))<<4,t.buf[t.pos++]|=o|128*!!(a>>>=3),a&&(t.buf[t.pos++]=127&a|128*!!(a>>>=7),a&&(t.buf[t.pos++]=127&a|128*!!(a>>>=7),a&&(t.buf[t.pos++]=127&a|128*!!(a>>>=7),a&&(t.buf[t.pos++]=127&a|128*!!(a>>>=7),a&&(t.buf[t.pos++]=127&a)))))}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=e>>>7&127))))},writeSVarint:function(e){this.writeVarint(e<0?-(2*e)-1:2*e)},writeBoolean:function(e){this.writeVarint(!!e)},writeString:function(e){e=String(e),this.realloc(4*e.length),this.pos++;var t=this.pos;this.pos=function(e,t,r){for(var n,i,a=0;a55295&&n<57344){if(!i){n>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):i=n;continue}if(n<56320){e[r++]=239,e[r++]=191,e[r++]=189,i=n;continue}n=i-55296<<10|n-56320|65536,i=null}else i&&(e[r++]=239,e[r++]=191,e[r++]=189,i=null);n<128?e[r++]=n:(n<2048?e[r++]=n>>6|192:(n<65536?e[r++]=n>>12|224:(e[r++]=n>>18|240,e[r++]=n>>12&63|128),e[r++]=n>>6&63|128),e[r++]=63&n|128)}return r}(this.buf,e,this.pos);var r=this.pos-t;r>=128&&oX(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r},writeFloat:function(e){this.realloc(4),oH(this.buf,e,this.pos,!0,23,4),this.pos+=4},writeDouble:function(e){this.realloc(8),oH(this.buf,e,this.pos,!0,52,8),this.pos+=8},writeBytes:function(e){var t=e.length;this.writeVarint(t),this.realloc(t);for(var r=0;r=128&&oX(r,n,this),this.pos=r-1,this.writeVarint(n),this.pos+=n},writeMessage:function(e,t,r){this.writeTag(e,oG.Bytes),this.writeRawMessage(t,r)},writePackedVarint:function(e,t){t.length&&this.writeMessage(e,oZ,t)},writePackedSVarint:function(e,t){t.length&&this.writeMessage(e,o$,t)},writePackedBoolean:function(e,t){t.length&&this.writeMessage(e,oQ,t)},writePackedFloat:function(e,t){t.length&&this.writeMessage(e,oK,t)},writePackedDouble:function(e,t){t.length&&this.writeMessage(e,oJ,t)},writePackedFixed32:function(e,t){t.length&&this.writeMessage(e,o0,t)},writePackedSFixed32:function(e,t){t.length&&this.writeMessage(e,o1,t)},writePackedFixed64:function(e,t){t.length&&this.writeMessage(e,o2,t)},writePackedSFixed64:function(e,t){t.length&&this.writeMessage(e,o3,t)},writeBytesField:function(e,t){this.writeTag(e,oG.Bytes),this.writeBytes(t)},writeFixed32Field:function(e,t){this.writeTag(e,oG.Fixed32),this.writeFixed32(t)},writeSFixed32Field:function(e,t){this.writeTag(e,oG.Fixed32),this.writeSFixed32(t)},writeFixed64Field:function(e,t){this.writeTag(e,oG.Fixed64),this.writeFixed64(t)},writeSFixed64Field:function(e,t){this.writeTag(e,oG.Fixed64),this.writeSFixed64(t)},writeVarintField:function(e,t){this.writeTag(e,oG.Varint),this.writeVarint(t)},writeSVarintField:function(e,t){this.writeTag(e,oG.Varint),this.writeSVarint(t)},writeStringField:function(e,t){this.writeTag(e,oG.Bytes),this.writeString(t)},writeFloatField:function(e,t){this.writeTag(e,oG.Fixed32),this.writeFloat(t)},writeDoubleField:function(e,t){this.writeTag(e,oG.Fixed64),this.writeDouble(t)},writeBooleanField:function(e,t){this.writeVarintField(e,!!t)}};var o8=_(oG);function o9(e,t,r){1===e&&r.readMessage(o7,t)}function o7(e,t,r){if(3===e){let{id:e,bitmap:n,width:i,height:a,left:o,top:s,advance:l}=r.readMessage(se,{});t.push({id:e,bitmap:new aX({width:i+6,height:a+6},n),metrics:{width:i,height:a,left:o,top:s,advance:l}})}}function se(e,t,r){1===e?t.id=r.readVarint():2===e?t.bitmap=r.readBytes():3===e?t.width=r.readVarint():4===e?t.height=r.readVarint():5===e?t.left=r.readSVarint():6===e?t.top=r.readSVarint():7===e&&(t.advance=r.readVarint())}function st(e){let t=0,r=0;for(let n of e)t+=n.w*n.h,r=Math.max(r,n.w);e.sort((e,t)=>t.h-e.h);let n=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],i=0,a=0;for(let t of e)for(let e=n.length-1;e>=0;e--){let r=n[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,a=Math.max(a,t.y+t.h),i=Math.max(i,t.x+t.w),t.w===r.w&&t.h===r.h){let t=n.pop();e=0&&r>=e&&ss[this.text.charCodeAt(r)];r--)t--;this.text=this.text.substring(e,t),this.sectionIndex=this.sectionIndex.slice(e,t)}substring(e,t){let r=new sa;return r.text=this.text.substring(e,t),r.sectionIndex=this.sectionIndex.slice(e,t),r.sections=this.sections,r}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((e,t)=>Math.max(e,this.sections[t].scale),0)}addTextSection(e,t){this.text+=e.text,this.sections.push(si.forText(e.scale,e.fontStack||t));let r=this.sections.length-1;for(let t=0;t=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function so(t,r,n,i,a,o,s,l,c,u,h,f,d,p,m){let g=sa.fromFeature(t,a),y;f===e.ah.vertical&&g.verticalizePunctuation();let{processBidirectionalText:v,processStyledBidirectionalText:x}=nX;if(v&&1===g.sections.length)for(let e of(y=[],v(g.toString(),sd(g,u,o,r,i,p)))){let t=new sa;t.text=e,t.sections=g.sections;for(let r=0;r0&&n>_&&(_=n)}else{let e=n[m.fontStack],t=e&&e[y];if(t&&t.rect)w=t.rect,x=t.metrics;else{let e=r[m.fontStack],t=e&&e[y];if(!t)continue;x=t.metrics}v=(a-m.scale)*24}A?(t.verticalizable=!0,b.push({glyph:y,imageName:k,x:d,y:p+v,vertical:A,scale:m.scale,fontStack:m.fontStack,sectionIndex:g,metrics:x,rect:w}),d+=T*m.scale+u):(b.push({glyph:y,imageName:k,x:d,y:p+v,vertical:A,scale:m.scale,fontStack:m.fontStack,sectionIndex:g,metrics:x,rect:w}),d+=x.advance*m.scale+u)}0!==b.length&&(m=Math.max(d-u,m),function(e,t,r,n){if(!r&&!n)return;let i=e[t],a=(e[t].x+i.metrics.advance*i.scale)*r;for(let r=0;r<=t;r++)e[r].x-=a,e[r].y+=n}(b,b.length-1,y,_)),d=0;let w=o*a+_;x.lineOffset=Math.max(_,l),p+=w,g=Math.max(w,g),++v}let x=p- -17,{horizontalAlign:b,verticalAlign:_}=sp(s);(function(e,t,r,n,i,a,o,s,l){let c=(t-r)*i,u=0;for(let t of(u=a!==o?-s*n- -17:(-n*l+.5)*o,e))for(let e of t.positionedGlyphs)e.x+=c,e.y+=u})(t.positionedLines,y,b,_,m,g,o,x,a.length),t.top+=-_*x,t.bottom=t.top+x,t.left+=-b*m,t.right=t.left+m}(_,r,n,i,y,s,l,c,f,u,d,m),!function(e){for(let t of e)if(0!==t.positionedGlyphs.length)return!1;return!0}(b)&&_}let ss={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},sl={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},sc={40:!0};function su(e,t,r,n,i,a){if(t.imageName){let e=n[t.imageName];return e?e.displaySize[0]*t.scale*24/a+i:0}{let n=r[t.fontStack],a=n&&n[e];return a?a.metrics.advance*t.scale+i:0}}function sh(e,t,r,n){let i=Math.pow(e-t,2);return n?e=0,c=0;for(let r=0;rc){let e=Math.ceil(a/c);i*=e/o,o=e}return{x1:n,y1:i,x2:n+a,y2:i+o}}function sg(e,t,r,n,i,a){let o=e.image,s;if(o.content){let e=o.content,t=o.pixelRatio||1;s=[e[0]/t,e[1]/t,o.displaySize[0]-e[2]/t,o.displaySize[1]-e[3]/t]}let l=t.left*a,c=t.right*a,u,h,f,d;"width"===r||"both"===r?(d=i[0]+l-n[3],h=i[0]+c+n[1]):h=(d=i[0]+(l+c-o.displaySize[0])/2)+o.displaySize[0];let p=t.top*a,m=t.bottom*a;return"height"===r||"both"===r?(u=i[1]+p-n[0],f=i[1]+m+n[2]):f=(u=i[1]+(p+m-o.displaySize[1])/2)+o.displaySize[1],{image:o,top:u,right:h,bottom:f,left:d,collisionPadding:s}}function sy(e,t){let{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new nZ(e+1))};if("source"===r.kind)return{kind:"source"};{let{zoomStops:t,interpolationType:n}=r,i=0;for(;ie.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=aF([]),this.placementViewportMatrix=aF([]);let r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=sy(this.zoom,r["text-size"]),this.iconSizeData=sy(this.zoom,r["icon-size"]);let n=this.layers[0].layout,i=n.get("symbol-sort-key"),a=n.get("symbol-z-order");this.canOverlap="never"!==sv(n,"text-overlap","text-allow-overlap")||"never"!==sv(n,"icon-overlap","icon-allow-overlap")||n.get("text-ignore-placement")||n.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==a&&!i.isConstant(),this.sortFeaturesByY=("viewport-y"===a||"auto"===a&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===n.get("symbol-placement")&&(this.writingModes=n.get("text-writing-mode").map(t=>e.ah[t])),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=t.sourceID}createArrays(){this.text=new sk(new ax(this.layers,this.zoom,e=>/^text/.test(e))),this.icon=new sk(new ax(this.layers,this.zoom,e=>/^icon/.test(e))),this.glyphOffsetArray=new iF,this.lineVertexArray=new iB,this.symbolInstances=new ij,this.textAnchorOffsets=new iU}calculateGlyphDependencies(e,t,r,n,i){for(let a=0;a0)&&("constant"!==o.value.kind||o.value.value.length>0),u="constant"!==l.value.kind||!!l.value.value||Object.keys(l.parameters).length>0,h=a.get("symbol-sort-key");if(this.features=[],!c&&!u)return;let f=r.iconDependencies,d=r.glyphDependencies,p=r.availableImages,m=new nZ(this.zoom);for(let{feature:r,id:s,index:l,sourceLayerIndex:g}of t){let t,y,v=i._featureFilter.needGeometry,x=ak(r,v);if(!i._featureFilter.filter(m,x,n))continue;if(v||(x.geometry=aw(r)),c){let e=i.getValueAndResolveTokens("text-field",x,n,p),r=te.factory(e),a=this.hasRTLText=this.hasRTLText||function(e){for(let t of e.sections)if(function(e){for(let t of e)if(nY(t.charCodeAt(0)))return!0;return!1}(t.text))return!0;return!1}(r);(!a||"unavailable"===nX.getRTLTextPluginStatus()||a&&nX.isParsed())&&(t=function(e,t,r){return e.sections.forEach(e=>{var n;let i;n=e.text,"uppercase"===(i=t.layout.get("text-transform").evaluate(r,{}))?n=n.toLocaleUpperCase():"lowercase"===i&&(n=n.toLocaleLowerCase()),nX.applyArabicShaping&&(n=nX.applyArabicShaping(n)),e.text=n}),e}(r,i,x))}if(u){let e=i.getValueAndResolveTokens("icon-image",x,n,p);y=e instanceof ti?e:ti.fromString(e)}if(!t&&!y)continue;let b=this.sortFeaturesByKey?h.evaluate(x,{},n):void 0;if(this.features.push({id:s,text:t,icon:y,index:l,sourceLayerIndex:g,geometry:x.geometry,properties:r.properties,type:sx[r.type],sortKey:b}),y&&(f[y.name]=!0),t){let r=o.evaluate(x,{},n).join(","),i="viewport"!==a.get("text-rotation-alignment")&&"point"!==a.get("symbol-placement");for(let n of(this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(e.ah.vertical)>=0,t.sections))if(n.image)f[n.image.name]=!0;else{let e=nN(t.toString()),a=n.fontStack||r,o=d[a]=d[a]||{};this.calculateGlyphDependencies(n.text,o,i,this.allowVerticalPlacement,e)}}}"line"===a.get("symbol-placement")&&(this.features=function(e){let t={},r={},n=[],i=0;function a(t){n.push(e[t]),i++}function o(e,t,i){let a=r[e];return delete r[e],r[t]=a,n[a].geometry[0].pop(),n[a].geometry[0]=n[a].geometry[0].concat(i[0]),a}function s(e,r,i){let a=t[r];return delete t[r],t[e]=a,n[a].geometry[0].shift(),n[a].geometry[0]=i[0].concat(n[a].geometry[0]),a}function l(e,t,r){let n=r?t[0][t[0].length-1]:t[0][0];return`${e}:${n.x}:${n.y}`}for(let c=0;ce.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>e.sortKey-t.sortKey)}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,r),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,r))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){let r=this.lineVertexArray.length;if(void 0!==e.segment){let r=e.dist(t[e.segment+1]),n=e.dist(t[e.segment]),i={};for(let n=e.segment+1;n=0;r--)i[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:n},r>0&&(n+=t[r-1].dist(t[r]));for(let e=0;e0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,t){let r=e.placedSymbolArray.get(t),n=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;tn[e]-n[t]||i[t]-i[e]),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];r&&r.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){for(let t of(this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[],this.symbolInstanceIndexes)){let e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex),[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex].forEach((e,t,r)=>{e>=0&&r.indexOf(e)===t&&this.addIndicesForPlacedSymbol(this.text,e)}),e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}nw("SymbolBucket",sA,{omit:["layers","collisionBoxArray","features","compareText"]}),sA.MAX_GLYPHS=65535,sA.addDynamicAttributes=sw;var sM={get paint(){return y=y||new n7({"icon-opacity":new n4(eh.paint_symbol["icon-opacity"]),"icon-color":new n4(eh.paint_symbol["icon-color"]),"icon-halo-color":new n4(eh.paint_symbol["icon-halo-color"]),"icon-halo-width":new n4(eh.paint_symbol["icon-halo-width"]),"icon-halo-blur":new n4(eh.paint_symbol["icon-halo-blur"]),"icon-translate":new n5(eh.paint_symbol["icon-translate"]),"icon-translate-anchor":new n5(eh.paint_symbol["icon-translate-anchor"]),"text-opacity":new n4(eh.paint_symbol["text-opacity"]),"text-color":new n4(eh.paint_symbol["text-color"],{runtimeType:eE,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new n4(eh.paint_symbol["text-halo-color"]),"text-halo-width":new n4(eh.paint_symbol["text-halo-width"]),"text-halo-blur":new n4(eh.paint_symbol["text-halo-blur"]),"text-translate":new n5(eh.paint_symbol["text-translate"]),"text-translate-anchor":new n5(eh.paint_symbol["text-translate-anchor"])})},get layout(){return g=g||new n7({"symbol-placement":new n5(eh.layout_symbol["symbol-placement"]),"symbol-spacing":new n5(eh.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new n5(eh.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new n4(eh.layout_symbol["symbol-sort-key"]),"symbol-z-order":new n5(eh.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new n5(eh.layout_symbol["icon-allow-overlap"]),"icon-overlap":new n5(eh.layout_symbol["icon-overlap"]),"icon-ignore-placement":new n5(eh.layout_symbol["icon-ignore-placement"]),"icon-optional":new n5(eh.layout_symbol["icon-optional"]),"icon-rotation-alignment":new n5(eh.layout_symbol["icon-rotation-alignment"]),"icon-size":new n4(eh.layout_symbol["icon-size"]),"icon-text-fit":new n5(eh.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new n5(eh.layout_symbol["icon-text-fit-padding"]),"icon-image":new n4(eh.layout_symbol["icon-image"]),"icon-rotate":new n4(eh.layout_symbol["icon-rotate"]),"icon-padding":new n4(eh.layout_symbol["icon-padding"]),"icon-keep-upright":new n5(eh.layout_symbol["icon-keep-upright"]),"icon-offset":new n4(eh.layout_symbol["icon-offset"]),"icon-anchor":new n4(eh.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new n5(eh.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new n5(eh.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new n5(eh.layout_symbol["text-rotation-alignment"]),"text-field":new n4(eh.layout_symbol["text-field"]),"text-font":new n4(eh.layout_symbol["text-font"]),"text-size":new n4(eh.layout_symbol["text-size"]),"text-max-width":new n4(eh.layout_symbol["text-max-width"]),"text-line-height":new n5(eh.layout_symbol["text-line-height"]),"text-letter-spacing":new n4(eh.layout_symbol["text-letter-spacing"]),"text-justify":new n4(eh.layout_symbol["text-justify"]),"text-radial-offset":new n4(eh.layout_symbol["text-radial-offset"]),"text-variable-anchor":new n5(eh.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new n4(eh.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new n4(eh.layout_symbol["text-anchor"]),"text-max-angle":new n5(eh.layout_symbol["text-max-angle"]),"text-writing-mode":new n5(eh.layout_symbol["text-writing-mode"]),"text-rotate":new n4(eh.layout_symbol["text-rotate"]),"text-padding":new n5(eh.layout_symbol["text-padding"]),"text-keep-upright":new n5(eh.layout_symbol["text-keep-upright"]),"text-transform":new n4(eh.layout_symbol["text-transform"]),"text-offset":new n4(eh.layout_symbol["text-offset"]),"text-allow-overlap":new n5(eh.layout_symbol["text-allow-overlap"]),"text-overlap":new n5(eh.layout_symbol["text-overlap"]),"text-ignore-placement":new n5(eh.layout_symbol["text-ignore-placement"]),"text-optional":new n5(eh.layout_symbol["text-optional"])})}};class sS{constructor(e){if(void 0===e.property.overrides)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:eT,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t&&t.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}nw("FormatSectionOverride",sS,{omit:["defaultValue"]});class sE extends it{constructor(e){super(e,sM)}recalculate(e,t){if(super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"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")){let e=this.layout.get("text-writing-mode");if(e){let t=[];for(let r of e)0>t.indexOf(r)&&t.push(r);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,n){var i;let a=this.layout.get(e).evaluate(t,{},r,n),o=this._unevaluatedLayout._values[e];return o.isDataDriven()||rj(o.value)||!a?a:(i=t.properties,a.replace(/{([^{}]+)}/g,(e,t)=>i&&t in i?String(i[t]):""))}createBucket(e){return new sA(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of sM.paint.overridableProperties){if(!sE.hasPaintOverride(this.layout,e))continue;let t=this.paint.get(e),r=new rR(new sS(t),t.property.specification),n=null;n="constant"===t.value.kind||"source"===t.value.kind?new rB("source",r):new rN("composite",r,t.value.zoomStops),this.paint._values[e]=new n2(t.property,n,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,r){return!(!this.layout||t.isDataDriven()||r.isDataDriven())&&sE.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){let r=e.get("text-field"),n=sM.paint.properties[t],i=!1,a=e=>{for(let t of e)if(n.overrides&&n.overrides.hasOverride(t))return void(i=!0)};if("constant"===r.value.kind&&r.value.value instanceof te)a(r.value.value.sections);else if("source"===r.value.kind){let e=t=>{i||(t instanceof tc&&ts(t.value)===eP?a(t.value.sections):t instanceof tB?a(t.sections):t.eachChild(e))},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return i}}var sC={get paint(){return v=v||new n7({"background-color":new n5(eh.paint_background["background-color"]),"background-pattern":new n8(eh.paint_background["background-pattern"]),"background-opacity":new n5(eh.paint_background["background-opacity"])})}};class sL extends it{constructor(e){super(e,sC)}}var sI={get paint(){return x=x||new n7({"raster-opacity":new n5(eh.paint_raster["raster-opacity"]),"raster-hue-rotate":new n5(eh.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new n5(eh.paint_raster["raster-brightness-min"]),"raster-brightness-max":new n5(eh.paint_raster["raster-brightness-max"]),"raster-saturation":new n5(eh.paint_raster["raster-saturation"]),"raster-contrast":new n5(eh.paint_raster["raster-contrast"]),"raster-resampling":new n5(eh.paint_raster["raster-resampling"]),"raster-fade-duration":new n5(eh.paint_raster["raster-fade-duration"])})}};class sP extends it{constructor(e){super(e,sI)}}class sz extends it{constructor(e){super(e,{}),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}}class sO{constructor(e){this._methodToThrottle=e,this._triggered=!1,"u">typeof MessageChannel&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}class sD{constructor(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new sD(D(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let t=Math.PI/180,r=this.lat*t,n=e.lat*t;return 6371008.8*Math.acos(Math.min(Math.sin(r)*Math.sin(n)+Math.cos(r)*Math.cos(n)*Math.cos((e.lng-this.lng)*t),1))}static convert(e){if(e instanceof sD)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new sD(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new sD(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let sR=2*Math.PI*6371008.8;function sj(e){return sR*Math.cos(e*Math.PI/180)}function sF(e){return(180+e)/360}function sB(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function sN(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}class sU{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(e,t=0){let r=sD.convert(e);return new sU(sF(r.lng),sB(r.lat),t/sj(r.lat))}toLngLat(){return new sD(360*this.x-180,sN(this.y))}toAltitude(){return this.z*sj(sN(this.y))}meterInMercatorCoordinateUnits(){return 1/sR*(1/Math.cos(sN(this.y)*Math.PI/180))}}function sV(e,t,r){var n=2*Math.PI*6378137/256/Math.pow(2,r);return[e*n-2*Math.PI*6378137/2,t*n-2*Math.PI*6378137/2]}class sq{constructor(e,t,r){if(!function(e,t,r){return!(e<0||e>25||r<0||r>=Math.pow(2,e)||t<0||t>=Math.pow(2,e))}(e,t,r))throw Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=t,this.y=r,this.key=sW(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){var n,i,a,o,s;let l=(i=this.y,a=this.z,o=sV(256*(n=this.x),256*(i=Math.pow(2,a)-i-1),a),s=sV(256*(n+1),256*(i+1),a),o[0]+","+o[1]+","+s[0]+","+s[1]),c=function(e,t,r){let n,i="";for(let a=e;a>0;a--)i+=(t&(n=1<1?"@2x":"").replace(/{quadkey}/g,c).replace(/{bbox-epsg-3857}/g,l)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=Math.pow(2,this.z);return new S((e.x*t-this.x)*8192,(e.y*t-this.y)*8192)}toString(){return`${this.z}/${this.x}/${this.y}`}}class sH{constructor(e,t){this.wrap=e,this.canonical=t,this.key=sW(e,t.z,t.z,t.x,t.y)}}class sG{constructor(e,t,r,n,i){if(e= z; overscaledZ = ${e}; z = ${r}`);this.overscaledZ=e,this.wrap=t,this.canonical=new sq(r,+n,+i),this.key=sW(t,e,r,n,i)}clone(){return new sG(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let t=this.canonical.z-e;return e>this.canonical.z?new sG(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new sG(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}calculateScaledKey(e,t){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?sW(this.wrap*t,e,this.canonical.z,this.canonical.x,this.canonical.y):sW(this.wrap*t,e,e,this.canonical.x>>r,this.canonical.y>>r)}isChildOf(e){if(e.wrap!==this.wrap)return!1;let t=this.canonical.z-e.canonical.z;return 0===e.overscaledZ||e.overscaledZ>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new sG(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let t=this.canonical.z+1,r=2*this.canonical.x,n=2*this.canonical.y;return[new sG(t,this.wrap,t,r,n),new sG(t,this.wrap,t,r+1,n),new sG(t,this.wrap,t,r,n+1),new sG(t,this.wrap,t,r+1,n+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.ythis.max&&(this.max=r),r=this.dim+1||t<-1||t>=this.dim+1)throw RangeError("out of range source coordinates for DEM data");return(t+1)*this.stride+(e+1)}unpack(e,t,r){return e*this.redFactor+t*this.greenFactor+r*this.blueFactor-this.baseShift}getPixels(){return new aZ({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,r){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let n=t*this.dim,i=t*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(t){case -1:n=i-1;break;case 1:i=n+1}switch(r){case -1:a=o-1;break;case 1:o=a+1}let s=-t*this.dim,l=-r*this.dim;for(let t=a;t=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class sZ{constructor(e,t,r,n,i){this.type="Feature",this._vectorTileFeature=e,e._z=t,e._x=r,e._y=n,this.properties=e.properties,this.id=i}get geometry(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&(e[t]=this[t]);return e}}class s${constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new nb(8192,16,0),this.grid3D=new nb(8192,16,0),this.featureIndexArray=new iq,this.promoteId=t}insert(e,t,r,n,i,a){let o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,n,i);let s=a?this.grid3D:this.grid;for(let e=0;e=0&&n[3]>=0&&s.insert(o,n[0],n[1],n[2],n[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new og.VectorTile(new o8(this.rawTileData)).layers,this.sourceLayerCoder=new sX(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(e,t,r,n){this.loadVTLayers();let i=e.params||{},a=8192/e.tileSize/e.scale,o=rG(i.filter),s=e.queryGeometry,l=e.queryPadding*a,c=sJ(s),u=this.grid.query(c.minX-l,c.minY-l,c.maxX+l,c.maxY+l),h=sJ(e.cameraQueryGeometry);for(let t of this.grid3D.query(h.minX-l,h.minY-l,h.maxX+l,h.maxY+l,(t,r,n,i)=>(function(e,t,r,n,i){for(let a of e)if(t<=a.x&&r<=a.y&&n>=a.x&&i>=a.y)return!0;let a=[new S(t,r),new S(t,i),new S(n,i),new S(n,r)];if(e.length>2){for(let t of a)if(aP(e,t))return!0}for(let t=0;ti.x&&t.x>i.x||e.yi.y&&t.y>i.y)return!1;let a=q(e,t,r[0]);return a!==q(e,t,r[1])||a!==q(e,t,r[2])||a!==q(e,t,r[3])}(e[t],e[t+1],a))return!0;return!1})(e.cameraQueryGeometry,t-l,r-l,n+l,i+l)))u.push(t);u.sort(sQ);let f={},d;for(let l=0;l(p||(p=aw(t)),r.queryIntersectsFeature(s,t,n,p,this.z,e.transform,a,e.pixelPosMatrix)))}return f}loadMatchingFeature(e,t,r,n,i,a,o,s,l,c,u){let h=this.bucketLayerIDs[t];if(a&&!function(e,t){for(let r=0;r=0)return!0;return!1}(a,h))return;let f=this.sourceLayerCoder.decode(r),d=this.vtLayers[f].feature(n);if(i.needGeometry){let e=ak(d,!0);if(!i.filter(new nZ(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!i.filter(new nZ(this.tileID.overscaledZ),d))return;let p=this.getId(d,f);for(let t=0;ta.indexOf(r))continue;let i=s[r];if(!i)continue;let f={};p&&c&&(f=c.getState(i.sourceLayer||"_geojsonTileLayer",p));let m=R({},l[r]);m.paint=sK(m.paint,i.paint,d,f,o),m.layout=sK(m.layout,i.layout,d,f,o);let g=!u||u(d,i,f);if(!g)continue;let y=new sZ(d,this.z,this.x,this.y,p);y.layer=m;let v=e[r];void 0===v&&(v=e[r]=[]),v.push({featureIndex:n,feature:y,intersectionZ:g})}}lookupSymbolFeatures(e,t,r,n,i,a,o,s){let l={};this.loadVTLayers();let c=rG(i);for(let i of e)this.loadMatchingFeature(l,r,n,i,c,a,o,s,t);return l}hasLayer(e){for(let t of this.bucketLayerIDs)for(let r of t)if(e===r)return!0;return!1}getId(e,t){let r=e.id;return this.promoteId&&"boolean"==typeof(r=e.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[t]])&&(r=Number(r)),r}}function sK(e,t,r,n,i){return F(e,(e,a)=>{let o=t instanceof n3?t.get(a):null;return o&&o.evaluate?o.evaluate(r,n,i):o})}function sJ(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return{minX:t,minY:r,maxX:n,maxY:i}}function sQ(e,t){return t-e}function s0(e,t,r,n,i){let a=[];for(let o=0;o=n&&c.x>=n||(o.x>=n?o=new S(n,o.y+(n-o.x)/(c.x-o.x)*(c.y-o.y))._round():c.x>=n&&(c=new S(n,o.y+(n-o.x)/(c.x-o.x)*(c.y-o.y))._round()),o.y>=i&&c.y>=i||(o.y>=i?o=new S(o.x+(i-o.y)/(c.y-o.y)*(c.x-o.x),i)._round():c.y>=i&&(c=new S(o.x+(i-o.y)/(c.y-o.y)*(c.x-o.x),i)._round()),l&&o.equals(l[l.length-1])||(l=[o],a.push(l)),l.push(c)))))}}return a}nw("FeatureIndex",s$,{omit:["rawTileData","sourceLayerCoder"]});class s1 extends S{constructor(e,t,r,n){super(e,t),this.angle=r,void 0!==n&&(this.segment=n)}clone(){return new s1(this.x,this.y,this.angle,this.segment)}}function s2(e,t,r,n,i){if(void 0===t.segment||0===r)return!0;let a=t,o=t.segment+1,s=0;for(;s>-r/2;){if(--o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;let l=[],c=0;for(;sn;)c-=l.shift().angleDelta;if(c>i)return!1;o++,s+=t.dist(r)}return!0}function s3(e){let t=0;for(let r=0;re+t[1]-t[0],d=u.reduce(f,0),p=h.reduce(f,0),m=s-d,g=l-p,y=0,v=d,x=0,b=p,_=0,w=m,k=0,T=g;if(a.content&&n){let t=a.content,r=t[2]-t[0],n=t[3]-t[1];(a.textFitWidth||a.textFitHeight)&&(c=sm(e)),y=s6(u,0,t[0]),x=s6(h,0,t[1]),v=s6(u,t[0],t[2]),b=s6(h,t[1],t[3]),_=t[0]-y,k=t[1]-x,w=r-v,T=n-b}let A=c.x1,M=c.y1,E=c.x2-A,C=c.y2-M,L=(e,n,i,s)=>{var l,c,u,h,f,m,g,L,I,P,z,O,D,R,j,F;let B=(l=e.stretch-y,l/v*E+A),N=(c=e.fixed-_,u=w,h=e.stretch,c-u*h/d),U=(f=n.stretch-x,f/b*C+M),V=(m=n.fixed-k,g=T,L=n.stretch,m-g*L/p),q=(I=i.stretch-y,I/v*E+A),H=(P=i.fixed-_,z=w,O=i.stretch,P-z*O/d),G=(D=s.stretch-x,D/b*C+M),W=(R=s.fixed-k,j=T,F=s.stretch,R-j*F/p),Y=new S(B,U),X=new S(q,U),Z=new S(q,G),$=new S(B,G),K=new S(N/o,V/o),J=new S(H/o,W/o),Q=t*Math.PI/180;if(Q){let e=Math.sin(Q),t=Math.cos(Q),r=[t,-e,e,t];Y._matMult(r),X._matMult(r),$._matMult(r),Z._matMult(r)}let ee=e.stretch+e.fixed,et=n.stretch+n.fixed;return{tl:Y,tr:X,bl:$,br:Z,tex:{x:a.paddedRect.x+1+ee,y:a.paddedRect.y+1+et,w:i.stretch+i.fixed-ee,h:s.stretch+s.fixed-et},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:K,pixelOffsetBR:J,minFontScaleX:w/o/E,minFontScaleY:T/o/C,isSDF:r}};if(n&&(a.stretchX||a.stretchY)){let e=s8(u,m,d),t=s8(h,g,p);for(let r=0;r0&&(n=Math.max(10,n),this.circleDiameter=n)}else{let l=null!=(u=a.image)&&u.content&&(a.image.textFitWidth||a.image.textFitHeight)?sm(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};l.y1=l.y1*o-s[0],l.y2=l.y2*o+s[2],l.x1=l.x1*o-s[3],l.x2=l.x2*o+s[1];let h=a.collisionPadding;if(h&&(l.x1-=h[0]*o,l.y1-=h[1]*o,l.x2+=h[2]*o,l.y2+=h[3]*o),c){let e=new S(l.x1,l.y1),t=new S(l.x2,l.y1),r=new S(l.x1,l.y2),n=new S(l.x2,l.y2),i=c*Math.PI/180;e._rotate(i),t._rotate(i),r._rotate(i),n._rotate(i),l.x1=Math.min(e.x,t.x,r.x,n.x),l.x2=Math.max(e.x,t.x,r.x,n.x),l.y1=Math.min(e.y,t.y,r.y,n.y),l.y2=Math.max(e.y,t.y,r.y,n.y)}e.emplaceBack(t.x,t.y,l.x1,l.y1,l.x2,l.y2,r,n,i)}this.boxEndIndex=e.length}}class s7{constructor(e=[],t=(e,t)=>et)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,n=t[e];for(;e>0;){let i=e-1>>1,a=t[i];if(r(n,a)>=0)break;t[e]=a,e=i}t[e]=n}_down(e){let{data:t,compare:r}=this,n=this.length>>1,i=t[e];for(;er(t[a],t[n])&&(n=a),r(t[n],i)>=0)break;t[e]=t[n],e=n}t[e]=i}}function le(e,t){return t.max-e.max}function lt(e,t,r,n){this.p=new S(e,t),this.h=r,this.d=function(e,t){let r=!1,n=1/0;for(let i=0;ie.y!=s.y>e.y&&e.x<(s.x-i.x)*(e.y-i.y)/(s.y-i.y)+i.x&&(r=!r),n=Math.min(n,aL(e,i,s))}}return(r?1:-1)*Math.sqrt(n)}(this.p,n),this.max=this.d+this.h*Math.SQRT2}e.aq=void 0,(T=e.aq||(e.aq={}))[T.center=1]="center",T[T.left=2]="left",T[T.right=3]="right",T[T.top=4]="top",T[T.bottom=5]="bottom",T[T["top-left"]=6]="top-left",T[T["top-right"]=7]="top-right",T[T["bottom-left"]=8]="bottom-left",T[T["bottom-right"]=9]="bottom-right";let lr=1/0;function ln(e,t){return t[1]!==lr?function(e,t,r){let n=0,i=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":i=r-7;break;case"bottom-right":case"bottom-left":case"bottom":i=-r+7}switch(e){case"top-right":case"bottom-right":case"right":n=-t;break;case"top-left":case"bottom-left":case"left":n=t}return[n,i]}(e,t[0],t[1]):function(e,t){let r=0,n=0;t<0&&(t=0);let i=t/Math.SQRT2;switch(e){case"top-right":case"top-left":n=i-7;break;case"bottom-right":case"bottom-left":n=-i+7;break;case"bottom":n=-t+7;break;case"top":n=t-7}switch(e){case"top-right":case"bottom-right":r=-i;break;case"top-left":case"bottom-left":r=i;break;case"left":r=t;break;case"right":r=-t}return[r,n]}(e,t[0])}function li(e,t,r){var n;let i=e.layout,a=null==(n=i.get("text-variable-anchor-offset"))?void 0:n.evaluate(t,{},r);if(a){let e=a.values,t=[];for(let r=0;r24*e);n.startsWith("top")?i[1]-=7:n.startsWith("bottom")&&(i[1]+=7),t[r+1]=i}return new tn(t)}let o=i.get("text-variable-anchor");if(o){let n;n=void 0!==e._unevaluatedLayout.getValue("text-radial-offset")?[24*i.get("text-radial-offset").evaluate(t,{},r),lr]:i.get("text-offset").evaluate(t,{},r).map(e=>24*e);let a=[];for(let e of o)a.push(e,ln(e,n));return new tn(a)}return null}function la(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function lo(e,t,r,n,i,a,o,s,l,c,u,h,f,d,p){let m=function(e,t,r,n,i,a,o){let s=r.layout.get("text-rotate").evaluate(i,{})*Math.PI/180,l=[];for(let r of e.positionedLines)for(let i of r.positionedGlyphs){if(!i.rect)continue;let c=i.rect||{},u=4,h=!0,f=1,d=0,p=(n||o)&&i.vertical,m=i.metrics.advance*i.scale/2;if(o&&e.verticalizable&&(d=r.lineOffset/2-(i.imageName?-(24-i.metrics.width*i.scale)/2:(i.scale-1)*24)),i.imageName){let e=a[i.imageName];h=e.sdf,u=1/(f=e.pixelRatio)}let g=n?[i.x+m,i.y]:[0,0],y=n?[0,0]:[i.x+m+t[0],i.y+t[1]-d],v=[0,0];p&&(v=y,y=[0,0]);let x=i.metrics.isDoubleResolution?2:1,b=(i.metrics.left-u)*i.scale-m+y[0],_=(-i.metrics.top-u)*i.scale+y[1],w=b+c.w/x*i.scale/f,k=_+c.h/x*i.scale/f,T=new S(b,_),A=new S(w,_),M=new S(b,k),E=new S(w,k);if(p){let e=new S(-m,m- -17),t=-Math.PI/2,r=12-m,n=new S(22-r,-(i.imageName?r:0)),a=new S(...v);T._rotateAround(t,e)._add(n)._add(a),A._rotateAround(t,e)._add(n)._add(a),M._rotateAround(t,e)._add(n)._add(a),E._rotateAround(t,e)._add(n)._add(a)}if(s){let e=Math.sin(s),t=Math.cos(s),r=[t,-e,e,t];T._matMult(r),A._matMult(r),M._matMult(r),E._matMult(r)}let C=new S(0,0),L=new S(0,0);l.push({tl:T,tr:A,bl:M,br:E,tex:c,writingMode:e.writingMode,glyphOffset:g,sectionIndex:i.sectionIndex,isSDF:h,pixelOffsetTL:C,pixelOffsetBR:L,minFontScaleX:0,minFontScaleY:0})}return l}(r,s,i,a,o,n,e.allowVerticalPlacement),g=e.textSizeData,y=null;for(let r of("source"===g.kind?(y=[128*i.layout.get("text-size").evaluate(o,{})])[0]>32640&&V(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`):"composite"===g.kind&&((y=[128*d.compositeTextSizes[0].evaluate(o,{},p),128*d.compositeTextSizes[1].evaluate(o,{},p)])[0]>32640||y[1]>32640)&&V(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`),e.addSymbols(e.text,m,y,s,a,o,c,t,l.lineStartIndex,l.lineLength,f,p),u))h[r]=e.text.placedSymbolArray.length-1;return 4*m.length}function ls(e){for(let t in e)return e[t];return null}let ll=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];function lc(e,t,r,n){lu(e,r,n),lu(t,2*r,2*n),lu(t,2*r+1,2*n+1)}function lu(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function lh(e,t,r,n){let i=e-r,a=t-n;return i*i+a*a}e.bg=void 0,(A=e.bg||(e.bg={})).create="create",A.load="load",A.fullLoad="fullLoad";let lf=null,ld=[],lp=1e3/60,lm="loadTime",lg="fullLoadTime";e.$=class extends iu{},e.A=aj,e.B=ng,e.C=function(e){if(null==G){let t=e.navigator?e.navigator.userAgent:null;G=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return G},e.D=n5,e.E=eu,e.F=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new sO(()=>this.process()),this.subscription=function(e,t,r){return e.addEventListener(t,r,!1),{unsubscribe:()=>{e.removeEventListener(t,r,!1)}}}(this.target,"message",e=>this.receive(e)),this.globalScope=H(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}sendAsync(e,t){return new Promise((r,n)=>{let i=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[i]={resolve:r,reject:n},t&&t.signal.addEventListener("abort",()=>{delete this.resolveRejects[i];let t={id:i,type:"",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(t)},{once:!0});let a=[],o=Object.assign(Object.assign({},e),{id:i,sourceMapId:this.mapId,origin:location.origin,data:nM(e.data,a)});this.target.postMessage(o,{transfer:a})})}receive(e){let t=e.data,r=t.id;if(!("file://"!==t.origin&&"file://"!==location.origin&&"resource://android"!==t.origin&&"resource://android"!==location.origin&&t.origin!==location.origin||t.targetMapId&&this.mapId!==t.targetMapId)){if(""===t.type){delete this.tasks[r];let e=this.abortControllers[r];return delete this.abortControllers[r],void(e&&e.abort())}if(H(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(0===this.taskQueue.length)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,t){return b(this,void 0,void 0,function*(){if(""===t.type){let r=this.resolveRejects[e];return delete this.resolveRejects[e],r?void(t.error?r.reject(nS(t.error)):r.resolve(nS(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(e,Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let r=nS(t.data),n=new AbortController;this.abortControllers[e]=n;try{let i=yield this.messageHandlers[t.type](t.sourceMapId,r,n);this.completeTask(e,null,i)}catch(t){this.completeTask(e,t)}})}completeTask(e,t,r){let n=[];delete this.abortControllers[e];let i={id:e,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?nM(t):null,data:nM(r,n)};this.target.postMessage(i,{transfer:n})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.G=et,e.H=function(){var e=new aj(16);return aj!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.I=sr,e.J=function(e,t,r){var n,i,a,o,s,l,c,u,h,f,d,p,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(i=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],f=t[9],d=t[10],p=t[11],e[0]=n=t[0],e[1]=i,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=f,e[10]=d,e[11]=p,e[12]=n*m+s*g+h*y+t[12],e[13]=i*m+l*g+f*y+t[13],e[14]=a*m+c*g+d*y+t[14],e[15]=o*m+u*g+p*y+t[15]),e},e.K=function(e,t,r){var n=r[0],i=r[1],a=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.L=aB,e.M=function(e,t){let r={};for(let n=0;n{let t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{for(let n of(t.onloadstart=()=>{r(t)},e)){let e=window.document.createElement("source");ea(n)||(t.crossOrigin="Anonymous"),e.src=n,t.appendChild(e)}})},e.a4=function(){return j++},e.a5=iz,e.a6=sA,e.a7=rG,e.a8=ak,e.a9=sZ,e.aA=function(e){if("custom"===e.type)return new sz(e);switch(e.type){case"background":return new sL(e);case"circle":return new aU(e);case"fill":return new of(e);case"fill-extrusion":return new oM(e);case"heatmap":return new aJ(e);case"hillshade":return new a0(e);case"line":return new oR(e);case"raster":return new sP(e);case"symbol":return new sE(e)}},e.aB=N,e.aC=function(e,t){if(!e)return[{command:"setStyle",args:[t]}];let r=[];try{if(!ed(e.version,t.version))return[{command:"setStyle",args:[t]}];ed(e.center,t.center)||r.push({command:"setCenter",args:[t.center]}),ed(e.zoom,t.zoom)||r.push({command:"setZoom",args:[t.zoom]}),ed(e.bearing,t.bearing)||r.push({command:"setBearing",args:[t.bearing]}),ed(e.pitch,t.pitch)||r.push({command:"setPitch",args:[t.pitch]}),ed(e.sprite,t.sprite)||r.push({command:"setSprite",args:[t.sprite]}),ed(e.glyphs,t.glyphs)||r.push({command:"setGlyphs",args:[t.glyphs]}),ed(e.transition,t.transition)||r.push({command:"setTransition",args:[t.transition]}),ed(e.light,t.light)||r.push({command:"setLight",args:[t.light]}),ed(e.terrain,t.terrain)||r.push({command:"setTerrain",args:[t.terrain]}),ed(e.sky,t.sky)||r.push({command:"setSky",args:[t.sky]}),ed(e.projection,t.projection)||r.push({command:"setProjection",args:[t.projection]});let n={},i=[];!function(e,t,r,n){let i;for(i in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,i)&&(Object.prototype.hasOwnProperty.call(t,i)||eg(i,r,n));for(i in t){var a;Object.prototype.hasOwnProperty.call(t,i)&&(Object.prototype.hasOwnProperty.call(e,i)?ed(e[i],t[i])||("geojson"===e[i].type&&"geojson"===t[i].type&&function(e,t,r){let n;for(n in e[r])if(Object.prototype.hasOwnProperty.call(e[r],n)&&"data"!==n&&!ed(e[r][n],t[r][n]))return!1;for(n in t[r])if(Object.prototype.hasOwnProperty.call(t[r],n)&&"data"!==n&&!ed(e[r][n],t[r][n]))return!1;return!0}(e,t,i)?ep(r,{command:"setGeoJSONSourceData",args:[i,t[i].data]}):(a=t,eg(i,r,n),em(i,a,r))):em(i,t,r))}}(e.sources,t.sources,i,n);let a=[];e.layers&&e.layers.forEach(e=>{"source"in e&&n[e.source]?r.push({command:"removeLayer",args:[e.id]}):a.push(e)}),r=r.concat(i),function(e,t,r){t=t||[];let n=(e=e||[]).map(ev),i=t.map(ev),a=e.reduce(ex,{}),o=t.reduce(ex,{}),s=n.slice(),l=Object.create(null),c,u,h,f,d;for(let e=0,t=0;e@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,r,n,i)=>{let a=n||i;return t[r]=!a||a.toLowerCase(),""}),t["max-age"]){let e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t},e.ab=function(e,t){let r=[];for(let n in e)n in t||r.push(n);return r},e.ac=O,e.ad=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],f=t[7];return t!==e&&(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[0]=a*i+c*n,e[1]=o*i+u*n,e[2]=s*i+h*n,e[3]=l*i+f*n,e[4]=c*i-a*n,e[5]=u*i-o*n,e[6]=h*i-s*n,e[7]=f*i-l*n,e},e.ae=function(e){var t=new aj(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.af=aN,e.ag=function(e,t){let r=0,n=0;if("constant"===e.kind)n=e.layoutSize;else if("source"!==e.kind){let{interpolationType:i,minZoom:a,maxZoom:o}=e,s=i?O(tM.interpolationFactor(i,t,a,o),0,1):0;"camera"===e.kind?n=tA.number(e.minSize,e.maxSize,s):r=s}return{uSizeT:r,uSize:n}},e.ai=function(e,{uSize:t,uSizeT:r},{lowerSize:n,upperSize:i}){return"source"===e.kind?n/128:"composite"===e.kind?tA.number(n/128,i/128,r):t},e.aj=sw,e.ak=function(e,t,r,n){let i=t.y-e.y,a=t.x-e.x,o=n.y-r.y,s=n.x-r.x,l=o*a-s*i;if(0===l)return null;let c=(s*(e.y-r.y)-o*(e.x-r.x))/l;return new S(e.x+c*a,e.y+c*i)},e.al=s0,e.am=aM,e.an=aF,e.ao=function(e){let t=1/0,r=1/0,n=-1/0,i=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),n=Math.max(n,a.x),i=Math.max(i,a.y);return[t,r,n,i]},e.ap=24,e.ar=sv,e.as=function(e,t){var r=t[0],n=t[1],i=t[2],a=t[3],o=t[4],s=t[5],l=t[6],c=t[7],u=t[8],h=t[9],f=t[10],d=t[11],p=t[12],m=t[13],g=t[14],y=t[15],v=r*s-n*o,x=r*l-i*o,b=r*c-a*o,_=n*l-i*s,w=n*c-a*s,k=i*c-a*l,T=u*m-h*p,A=u*g-f*p,M=u*y-d*p,S=h*g-f*m,E=h*y-d*m,C=f*y-d*g,L=v*C-x*E+b*S+_*M-w*A+k*T;return L?(e[0]=(s*C-l*E+c*S)*(L=1/L),e[1]=(i*E-n*C-a*S)*L,e[2]=(m*k-g*w+y*_)*L,e[3]=(f*w-h*k-d*_)*L,e[4]=(l*M-o*C-c*A)*L,e[5]=(r*C-i*M+a*A)*L,e[6]=(g*b-p*k-y*x)*L,e[7]=(u*k-f*b+d*x)*L,e[8]=(o*E-s*M+c*T)*L,e[9]=(n*M-r*E-a*T)*L,e[10]=(p*w-m*b+y*v)*L,e[11]=(h*b-u*w-d*v)*L,e[12]=(s*A-o*S-l*T)*L,e[13]=(r*S-n*A+i*T)*L,e[14]=(m*x-p*_-g*v)*L,e[15]=(u*_-h*x+f*v)*L,e):null},e.at=la,e.au=sp,e.av=class e{static from(t){if(!(t instanceof ArrayBuffer))throw Error("Data must be an instance of ArrayBuffer.");let[r,n]=new Uint8Array(t,0,2);if(219!==r)throw Error("Data does not appear to be in a KDBush format.");let i=n>>4;if(1!==i)throw Error(`Got v${i} data when expected v1.`);let a=ll[15&n];if(!a)throw Error("Unrecognized array type.");let[o]=new Uint16Array(t,2,1),[s]=new Uint32Array(t,4,1);return new e(s,o,a,t)}constructor(e,t=64,r=Float64Array,n){if(isNaN(e)||e<0)throw Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let i=ll.indexOf(this.ArrayType),a=2*e*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-o%8)%8;if(i<0)throw Error(`Unexpected typed array class: ${r}.`);n&&n instanceof ArrayBuffer?(this.data=n,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+a+o+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+i]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return function e(t,r,n,i,a,o){if(a-i<=n)return;let s=i+a>>1;(function e(t,r,n,i,a,o){for(;a>i;){if(a-i>600){let 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);e(t,r,n,Math.max(i,Math.floor(n-l*u/s+h)),Math.min(a,Math.floor(n+(s-l)*u/s+h)),o)}let s=r[2*n+o],l=i,c=a;for(lc(t,r,i,n),r[2*a+o]>s&&lc(t,r,i,a);ls;)c--}r[2*i+o]===s?lc(t,r,i,c):lc(t,r,++c,a),c<=n&&(i=c+1),n<=c&&(a=c-1)}})(t,r,s,i,a,o),e(t,r,n,i,s-1,1-o),e(t,r,n,s+1,a,1-o)}(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,n){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:i,coords:a,nodeSize:o}=this,s=[0,i.length-1,0],l=[];for(;s.length;){let c=s.pop()||0,u=s.pop()||0,h=s.pop()||0;if(u-h<=o){for(let o=h;o<=u;o++){let s=a[2*o],c=a[2*o+1];s>=e&&s<=r&&c>=t&&c<=n&&l.push(i[o])}continue}let f=h+u>>1,d=a[2*f],p=a[2*f+1];d>=e&&d<=r&&p>=t&&p<=n&&l.push(i[f]),(0===c?e<=d:t<=p)&&(s.push(h),s.push(f-1),s.push(1-c)),(0===c?r>=d:n>=p)&&(s.push(f+1),s.push(u),s.push(1-c))}return l}within(e,t,r){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:n,coords:i,nodeSize:a}=this,o=[0,n.length-1,0],s=[],l=r*r;for(;o.length;){let c=o.pop()||0,u=o.pop()||0,h=o.pop()||0;if(u-h<=a){for(let r=h;r<=u;r++)lh(i[2*r],i[2*r+1],e,t)<=l&&s.push(n[r]);continue}let f=h+u>>1,d=i[2*f],p=i[2*f+1];lh(d,p,e,t)<=l&&s.push(n[f]),(0===c?e-r<=d:t-r<=p)&&(o.push(h),o.push(f-1),o.push(1-c)),(0===c?e+r>=d:t+r>=p)&&(o.push(f+1),o.push(u),o.push(1-c))}return s}},e.aw=function(){let e={},t=eh.$version;for(let r in eh.$root){let n=eh.$root[r];if(n.required){let i=null;null!=(i="version"===r?t:"array"===n.type?[]:{})&&(e[r]=i)}}return e},e.ax=nE,e.ay=en,e.az=function(e){e=e.slice();let t=Object.create(null);for(let r=0;r{e in t&&(r[e]=t[e])}),r}(e[r],t[e[r].ref]));return e},e.b=W,e.b0=function(e,t){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},e.b1=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e},e.b2=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]},e.b3=D,e.b4=sH,e.b5=function(e,t){return e/sj(t)},e.b6=function(e,t,r,n,i){var a,o=1/Math.tan(t/2);return e[0]=o/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=-1,e[12]=0,e[13]=0,e[15]=0,null!=i&&i!==1/0?(e[10]=(i+n)*(a=1/(n-i)),e[14]=2*i*n*a):(e[10]=-1,e[14]=-2*n),e},e.b7=function(e,t,r){var n=Math.sin(r),i=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],f=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*i+c*n,e[5]=o*i+u*n,e[6]=s*i+h*n,e[7]=l*i+f*n,e[8]=c*i-a*n,e[9]=u*i-o*n,e[10]=h*i-s*n,e[11]=f*i-l*n,e},e.b8=P,e.b9=z,e.bA=oG,e.bB=function(e){return e.message===K},e.bC=rF,e.bD=nX,e.ba=function(e){return e*Math.PI/180},e.bb=function(e,t){let{x:r,y:n}=sU.fromLngLat(t);return!(e<0||e>25||n<0||n>=1||r<0||r>=1)},e.bc=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.bd=class extends ic{},e.be=6371008.8,e.bf={mark(e){performance.mark(e)},frame(e){null!=lf&&ld.push(e-lf),lf=e},clearMetrics(){for(let t in lf=null,ld=[],performance.clearMeasures(lm),performance.clearMeasures(lg),e.bg)performance.clearMarks(e.bg[t])},getPerformanceMetrics(){performance.measure(lm,e.bg.create,e.bg.load),performance.measure(lg,e.bg.create,e.bg.fullLoad);let t=performance.getEntriesByName(lm)[0].duration,r=performance.getEntriesByName(lg)[0].duration,n=ld.length,i=1/(ld.reduce((e,t)=>e+t,0)/n/1e3),a=ld.filter(e=>e>lp).reduce((e,t)=>e+(t-lp)/lp,0);return{loadTime:t,fullLoadTime:r,fps:i,percentDroppedFrames:a/(n+a)*100,totalFrames:n}}},e.bh=er,e.bi=function(e,t){Q.REGISTERED_PROTOCOLS[e]=t},e.bj=function(e){delete Q.REGISTERED_PROTOCOLS[e]},e.bk=function(e,t){let r={};for(let n=0;n24*e)}let x=s?"center":n.get("text-justify").evaluate(i,{},t.canonical),b="point"===n.get("symbol-placement")?24*n.get("text-max-width").evaluate(i,{},t.canonical):1/0,_=()=>{t.bucket.allowVerticalPlacement&&nN(a)&&(p.vertical=so(m,t.glyphMap,t.glyphPositions,t.imagePositions,u,b,o,g,"left",d,y,e.ah.vertical,!0,f,h))};if(!s&&v){let r=new Set;if("auto"===x)for(let e=0;e{f.x<0||f.x>=8192||f.y<0||f.y>=8192||function(t,r,n,i,a,o,s,l,c,u,h,f,d,p,m,g,y,v,x,b,_,w,k,T,A){let M=t.addToLineVertexArray(r,n),S,E,C,L,I=0,P=0,z=0,O=0,D=-1,R=-1,j={},F=an("");if(t.allowVerticalPlacement&&i.vertical){let e=l.layout.get("text-rotate").evaluate(_,{},T)+90;C=new s9(c,r,u,h,f,i.vertical,d,p,m,e),s&&(L=new s9(c,r,u,h,f,s,y,v,m,e))}if(a){let n=l.layout.get("icon-rotate").evaluate(_,{}),i="none"!==l.layout.get("icon-text-fit"),o=s4(a,n,k,i),d=s?s4(s,n,k,i):void 0;E=new s9(c,r,u,h,f,a,y,v,!1,n),I=4*o.length;let p=t.iconSizeData,m=null;"source"===p.kind?(m=[128*l.layout.get("icon-size").evaluate(_,{})])[0]>32640&&V(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`):"composite"===p.kind&&((m=[128*w.compositeIconSizes[0].evaluate(_,{},T),128*w.compositeIconSizes[1].evaluate(_,{},T)])[0]>32640||m[1]>32640)&&V(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`),t.addSymbols(t.icon,o,m,b,x,_,e.ah.none,r,M.lineStartIndex,M.lineLength,-1,T),D=t.icon.placedSymbolArray.length-1,d&&(P=4*d.length,t.addSymbols(t.icon,d,m,b,x,_,e.ah.vertical,r,M.lineStartIndex,M.lineLength,-1,T),R=t.icon.placedSymbolArray.length-1)}let B=Object.keys(i.horizontal);for(let n of B){let a=i.horizontal[n];S||(F=an(a.text),S=new s9(c,r,u,h,f,a,d,p,m,l.layout.get("text-rotate").evaluate(_,{},T)));let s=1===a.positionedLines.length;if(z+=lo(t,r,a,o,l,m,_,g,M,i.vertical?e.ah.horizontal:e.ah.horizontalOnly,s?B:[n],j,D,w,T),s)break}i.vertical&&(O+=lo(t,r,i.vertical,o,l,m,_,g,M,e.ah.vertical,["vertical"],j,R,w,T));let N=S?S.boxStartIndex:t.collisionBoxArray.length,U=S?S.boxEndIndex:t.collisionBoxArray.length,q=C?C.boxStartIndex:t.collisionBoxArray.length,H=C?C.boxEndIndex:t.collisionBoxArray.length,G=E?E.boxStartIndex:t.collisionBoxArray.length,W=E?E.boxEndIndex:t.collisionBoxArray.length,Y=L?L.boxStartIndex:t.collisionBoxArray.length,X=L?L.boxEndIndex:t.collisionBoxArray.length,Z=-1,$=(e,t)=>e&&e.circleDiameter?Math.max(e.circleDiameter,t):t;Z=$(S,-1),Z=$(C,Z),Z=$(E,Z);let K=+((Z=$(L,Z))>-1);K&&(Z*=A/24),t.glyphOffsetArray.length>=sA.MAX_GLYPHS&&V("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,_.sortKey);let J=li(l,_,T),[Q,ee]=function(t,r){let n=t.length,i=r?.values;if(i?.length>0)for(let r=0;r=0?j.right:-1,j.center>=0?j.center:-1,j.left>=0?j.left:-1,j.vertical||-1,D,R,F,N,U,q,H,G,W,Y,X,u,z,O,I,P,K,0,d,Z,Q,ee)}(t,f,l,n,i,a,L,t.layers[0],t.collisionBoxArray,r.index,r.sourceLayerIndex,t.index,y,[_,_,_,_],T,c,x,w,A,p,r,o,u,h,s)};if("line"===M)for(let e of s0(r.geometry,0,0,8192,8192))for(let r of function(e,t,r,n,i,a,o){let s=n?.6*24*a:0,l=s5(n,i),c=l*a,u=0===e[0].x||8192===e[0].x||0===e[0].y||8192===e[0].y;return t-c=0&&y=0&&v=0&&d+u<=h){let r=new s1(y,v,m,e);r._round(),i&&!s2(t,r,o,i,a)||p.push(r)}}f+=l}return l||p.length||s||(p=e(t,f/2,n,i,a,o,s,!0,c)),p}(e,u?t/2*o%t:(l/2+48)*a*o%t,t,s,r,c,u,!1,8192)}(e,b,k,n.vertical||m,i,v,t.overscaling))m&&function(e,t,r,n){let i=e.compareText;if(t in i){let e=i[t];for(let t=e.length-1;t>=0;t--)if(n.dist(e[t])1){let t=function(e,t,r,n,i){let a=r?.6*24*i:0,o=s5(r,n)*i,s=0,l=s3(e)/2;for(let r=0;rl){let u=(l-s)/c,h=new s1(tA.number(n.x,i.x,u),tA.number(n.y,i.y,u),i.angleTo(n),r);return h._round(),!a||s2(e,h,o,a,t)?h:void 0}s+=c}}(e,k,n.vertical||m,i,v);t&&I(e,t)}}else if("Polygon"===r.type)for(let e of t2(r.geometry,0)){let t=function(e,t=1,r=!1){let n=1/0,i=1/0,a=-1/0,o=-1/0,s=e[0];for(let e=0;ea)&&(a=t.x),(!e||t.y>o)&&(o=t.y)}let l=Math.min(a-n,o-i),c=l/2,u=new s7([],le);if(0===l)return new S(n,i);for(let t=n;th.d||!h.d)&&(h=n,r&&console.log("found best %d after %d probes",Math.round(1e4*n.d)/1e4,f)),n.max-h.d<=t||(c=n.h/2,u.push(new lt(n.p.x-c,n.p.y-c,c,e)),u.push(new lt(n.p.x+c,n.p.y-c,c,e)),u.push(new lt(n.p.x-c,n.p.y+c,c,e)),u.push(new lt(n.p.x+c,n.p.y+c,c,e)),f+=4)}return r&&(console.log(`num probes: ${f}`),console.log(`best distance: ${h.d}`)),h.p}(e,16);I(e[0],new s1(t.x,t.y,0))}else if("LineString"===r.type)for(let e of r.geometry)I(e,new s1(e[0].x,e[0].y,0));else if("Point"===r.type)for(let e of r.geometry)for(let t of e)I([t],new s1(t.x,t.y,0))}(t.bucket,i,p,g,t.imageMap,a,f,d,y,v,t.canonical)}t.showCollisionBoxes&&t.bucket.generateCollisionDebugBuffers()},e.bq=oz,e.br=ou,e.bs=oT,e.bt=og,e.bu=o8,e.bv=class{constructor(e){this._marks={start:[e.url,"start"].join("#"),end:[e.url,"end"].join("#"),measure:e.url.toString()},performance.mark(this._marks.start)}finish(){performance.mark(this._marks.end);let e=performance.getEntriesByName(this._marks.measure);return 0===e.length&&(performance.measure(this._marks.measure,this._marks.start,this._marks.end),e=performance.getEntriesByName(this._marks.measure),performance.clearMarks(this._marks.start),performance.clearMarks(this._marks.end),performance.clearMeasures(this._marks.measure)),e}},e.bw=function(e,t,r,n,i){return b(this,void 0,void 0,function*(){let a,o,s;if(I())try{return yield X(e,t,r,n,i)}catch{}return a=e.width,o=e.height,Z&&$||($=(Z=new OffscreenCanvas(a,o)).getContext("2d",{willReadFrequently:!0})),Z.width=a,Z.height=o,$.drawImage(e,0,0,a,o),s=$.getImageData(t,r,n,i),$.clearRect(0,0,a,o),s.data})},e.bx=sY,e.by=_,e.bz=w,e.c=J,e.d=e=>b(void 0,void 0,void 0,function*(){if(0===e.byteLength)return createImageBitmap(new ImageData(1,1));let t=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(t)}catch(e){throw Error(`Could not load image because of ${e.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),e.e=R,e.f=e=>new Promise((t,r)=>{let n=new Image;n.onload=()=>{t(n),URL.revokeObjectURL(n.src),n.onload=null,window.requestAnimationFrame(()=>{n.src=Y})},n.onerror=()=>r(Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let i=new Blob([new Uint8Array(e)],{type:"image/png"});n.src=e.byteLength?URL.createObjectURL(i):Y}),e.g=ee,e.h=(e,t)=>ei(R(e,{type:"json"}),t),e.i=H,e.j=ec,e.k=el,e.l=(e,t)=>ei(R(e,{type:"arrayBuffer"}),t),e.m=ei,e.n=function(e){return new o8(e).readFields(o9,[])},e.o=aX,e.p=st,e.q=n7,e.r=nm,e.s=ea,e.t=nx,e.u=nh,e.v=eh,e.w=V,e.x=function([e,t,r]){return t+=90,{x:e*Math.cos(t*=Math.PI/180)*Math.sin(r*=Math.PI/180),y:e*Math.sin(t)*Math.sin(r),z:e*Math.cos(r)}},e.y=tA,e.z=nZ}),n("worker",["./shared"],function(e){class t{constructor(e){this.keyCache={},e&&this.replace(e)}replace(e){this._layerConfigs={},this._layers={},this.update(e,[])}update(t,r){for(let r of t){this._layerConfigs[r.id]=r;let t=this._layers[r.id]=e.aA(r);t._featureFilter=e.a7(t.filter),this.keyCache[r.id]&&delete this.keyCache[r.id]}for(let e of r)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];for(let t of(this.familiesBySource={},e.bk(Object.values(this._layerConfigs),this.keyCache))){let e=t.map(e=>this._layers[e.id]),r=e[0];if("none"===r.visibility)continue;let n=r.source||"",i=this.familiesBySource[n];i||(i=this.familiesBySource[n]={});let a=r.sourceLayer||"_geojsonTileLayer",o=i[a];o||(o=i[a]=[]),o.push(e)}}}class r{constructor(t){let r={},n=[];for(let e in t){let i=t[e],a=r[e]={};for(let e in i){let t=i[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;let r={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};n.push(r),a[e]={rect:r,metrics:t.metrics}}}let{w:i,h:a}=e.p(n),o=new e.o({width:i||1,height:a||1});for(let n in t){let i=t[n];for(let t in i){let a=i[+t];if(!a||0===a.bitmap.width||0===a.bitmap.height)continue;let s=r[n][t].rect;e.o.copy(a.bitmap,o,{x:0,y:0},{x:s.x+1,y:s.y+1},a.bitmap)}}this.image=o,this.positions=r}}e.bl("GlyphAtlas",r);class n{constructor(t){this.tileID=new e.S(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,n,a,o){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=t,this.collisionBoxArray=new e.a5;let s=new e.bm(Object.keys(t.layers).sort()),l=new e.bn(this.tileID,this.promoteId);l.bucketLayerIDs=[];let c={},u={featureIndex:l,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:a},h=n.familiesBySource[this.source];for(let r in h){let n=t.layers[r];if(!n)continue;1===n.version&&e.w(`Vector tile source "${this.source}" layer "${r}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let o=s.encode(r),f=[];for(let e=0;e=r.maxzoom||"none"!==r.visibility&&(i(t,this.zoom,a),(c[r.id]=r.createBucket({index:l.bucketLayerIDs.length,layers:t,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:o,sourceID:this.source})).populate(f,u,this.tileID.canonical),l.bucketLayerIDs.push(t.map(e=>e.id)))}}let f=e.aF(u.glyphDependencies,e=>Object.keys(e).map(Number));this.inFlightDependencies.forEach(e=>e?.abort()),this.inFlightDependencies=[];let d=Promise.resolve({});if(Object.keys(f).length){let e=new AbortController;this.inFlightDependencies.push(e),d=o.sendAsync({type:"GG",data:{stacks:f,source:this.source,tileID:this.tileID,type:"glyphs"}},e)}let p=Object.keys(u.iconDependencies),m=Promise.resolve({});if(p.length){let e=new AbortController;this.inFlightDependencies.push(e),m=o.sendAsync({type:"GI",data:{icons:p,source:this.source,tileID:this.tileID,type:"icons"}},e)}let g=Object.keys(u.patternDependencies),y=Promise.resolve({});if(g.length){let e=new AbortController;this.inFlightDependencies.push(e),y=o.sendAsync({type:"GI",data:{icons:g,source:this.source,tileID:this.tileID,type:"patterns"}},e)}let[v,x,b]=yield Promise.all([d,m,y]),_=new r(v),w=new e.bo(x,b);for(let t in c){let r=c[t];r instanceof e.a6?(i(r.layers,this.zoom,a),e.bp({bucket:r,glyphMap:v,glyphPositions:_.positions,imageMap:x,imagePositions:w.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):r.hasPattern&&(r instanceof e.bq||r instanceof e.br||r instanceof e.bs)&&(i(r.layers,this.zoom,a),r.addFeatures(u,this.tileID.canonical,w.patternPositions))}return this.status="done",{buckets:Object.values(c).filter(e=>!e.isEmpty()),featureIndex:l,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:_.image,imageAtlas:w,glyphMap:this.returnDependencies?v:null,iconMap:this.returnDependencies?x:null,glyphPositions:this.returnDependencies?_.positions:null}})}}function i(t,r,n){let i=new e.z(r);for(let e of t)e.recalculate(i,n)}class a{constructor(e,t,r){this.actor=e,this.layerIndex=t,this.availableImages=r,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(t,r){return e._(this,void 0,void 0,function*(){let n=yield e.l(t.request,r);try{return{vectorTile:new e.bt.VectorTile(new e.bu(n.data)),rawData:n.data,cacheControl:n.cacheControl,expires:n.expires}}catch(i){let e=new Uint8Array(n.data),r=`Unable to parse the tile at ${t.request.url}, `;throw Error(r+=31===e[0]&&139===e[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${i.message}`)}})}loadTile(t){return e._(this,void 0,void 0,function*(){let r=t.uid,i=!!(t&&t.request&&t.request.collectResourceTiming)&&new e.bv(t.request),a=new n(t);this.loading[r]=a;let o=new AbortController;a.abort=o;try{let n=yield this.loadVectorTile(t,o);if(delete this.loading[r],!n)return null;let s=n.rawData,l={};n.expires&&(l.expires=n.expires),n.cacheControl&&(l.cacheControl=n.cacheControl);let c={};if(i){let e=i.finish();e&&(c.resourceTiming=JSON.parse(JSON.stringify(e)))}a.vectorTile=n.vectorTile;let u=a.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[r]=a,this.fetching[r]={rawTileData:s,cacheControl:l,resourceTiming:c};try{let t=yield u;return e.e({rawTileData:s.slice(0)},t,l,c)}finally{delete this.fetching[r]}}catch(e){throw delete this.loading[r],a.status="done",this.loaded[r]=a,e}})}reloadTile(t){return e._(this,void 0,void 0,function*(){let r=t.uid;if(!this.loaded||!this.loaded[r])throw Error("Should not be trying to reload a tile that was never loaded or has been removed");let n=this.loaded[r];if(n.showCollisionBoxes=t.showCollisionBoxes,"parsing"===n.status){let t=yield n.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor),i;if(this.fetching[r]){let{rawTileData:n,cacheControl:a,resourceTiming:o}=this.fetching[r];delete this.fetching[r],i=e.e({rawTileData:n.slice(0)},t,a,o)}else i=t;return i}if("done"===n.status&&n.vectorTile)return n.parse(n.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(t){return e._(this,void 0,void 0,function*(){let e=this.loading,r=t.uid;e&&e[r]&&e[r].abort&&(e[r].abort.abort(),delete e[r])})}removeTile(t){return e._(this,void 0,void 0,function*(){this.loaded&&this.loaded[t.uid]&&delete this.loaded[t.uid]})}}class o{constructor(){this.loaded={}}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:r,encoding:n,rawImageData:i,redFactor:a,greenFactor:o,blueFactor:s,baseShift:l}=t,c=i.width+2,u=i.height+2,h=e.b(i)?new e.R({width:c,height:u},(yield e.bw(i,-1,-1,c,u))):i,f=new e.bx(r,h,n,a,o,s,l);return this.loaded=this.loaded||{},this.loaded[r]=f,f})}removeTile(e){let t=this.loaded,r=e.uid;t&&t[r]&&delete t[r]}}function s(e,t){if(0!==e.length){l(e[0],t);for(var r=1;r=Math.abs(s)?r-l+s:s-l+r,r=l}r+n>=0!=!!t&&e.reverse()}var c,u=e.by(function e(t,r){var n,i=t&&t.type;if("FeatureCollection"===i)for(n=0;n>31),t.writeVarint(d<<1^d>>31),i+=f,a+=d}3===n&&t.writeVarint(15)}}function k(e,t){var r=typeof e;"string"===r?t.writeStringField(1,e):"boolean"===r?t.writeBooleanField(7,e):"number"===r&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e))}f.exports=v,f.exports.fromVectorTileJs=v,f.exports.fromGeojsonVt=function(e,t){t=t||{};var r={};for(var n in e)r[n]=new m(e[n].features,t),r[n].name=n,r[n].version=t.version,r[n].extent=t.extent;return v({layers:r})},f.exports.GeoJSONWrapper=m;var T=e.by(f.exports);let A={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},M=Math.fround||(c=new Float32Array(1),e=>(c[0]=+e,c[0]));class S{constructor(e){this.options=Object.assign(Object.create(A),e),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){let{log:t,minZoom:r,maxZoom:n}=this.options;t&&console.time("total time");let i=`prepare ${e.length} points`;t&&console.time(i),this.points=e;let a=[];for(let t=0;t=r;e--){let r=+Date.now();o=this.trees[e]=this._createTree(this._cluster(o,e)),t&&console.log("z%d: %d clusters in %dms",e,o.numItems,Date.now()-r)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[1])),i=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,i=180;else if(r>i){let e=this.getClusters([r,n,180,a],t),o=this.getClusters([-180,n,i,a],t);return e.concat(o)}let o=this.trees[this._limitZoom(t)],s=o.range(L(r),I(a),L(i),I(n)),l=o.data,c=[];for(let e of s){let t=this.stride*e;c.push(l[t+5]>1?E(l,t,this.clusterProps):this.points[l[t+3]])}return c}getChildren(e){let t=this._getOriginId(e),r=this._getOriginZoom(e),n="No cluster with the specified id.",i=this.trees[r];if(!i)throw Error(n);let a=i.data;if(t*this.stride>=a.length)throw Error(n);let o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=i.within(a[t*this.stride],a[t*this.stride+1],o),l=[];for(let t of s){let r=t*this.stride;a[r+4]===e&&l.push(a[r+5]>1?E(a,r,this.clusterProps):this.points[a[r+3]])}if(0===l.length)throw Error(n);return l}getLeaves(e,t,r){let n=[];return this._appendLeaves(n,e,t=t||10,r=r||0,0),n}getTile(e,t,r){let n=this.trees[this._limitZoom(e)],i=Math.pow(2,e),{extent:a,radius:o}=this.options,s=o/a,l=(r-s)/i,c=(r+1+s)/i,u={features:[]};return this._addTileFeatures(n.range((t-s)/i,l,(t+1+s)/i,c),n.data,t,r,i,u),0===t&&this._addTileFeatures(n.range(1-s/i,l,1,c),n.data,i,r,i,u),t===i-1&&this._addTileFeatures(n.range(0,l,s/i,c),n.data,-1,r,i,u),u.features.length?u:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){let r=this.getChildren(e);if(t++,1!==r.length)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,n,i){for(let a of this.getChildren(t)){let t=a.properties;if(t&&t.cluster?i+t.point_count<=n?i+=t.point_count:i=this._appendLeaves(e,t.cluster_id,r,n,i):i1,l,c,u;if(s)l=C(t,e,this.clusterProps),c=t[e],u=t[e+1];else{let r=this.points[t[e+3]];l=r.properties;let[n,i]=r.geometry.coordinates;c=L(n),u=I(i)}let h={type:1,geometry:[[Math.round(this.options.extent*(c*i-r)),Math.round(this.options.extent*(u*i-n))]],tags:l},f;void 0!==(f=s||this.options.generateId?t[e+3]:this.points[t[e+3]].id)&&(h.id=f),a.features.push(h)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){let{radius:r,extent:n,reduce:i,minPoints:a}=this.options,o=r/(n*Math.pow(2,t)),s=e.data,l=[],c=this.stride;for(let r=0;rt&&(d+=s[r+5])}if(d>f&&d>=a){let e,a=n*f,o=u*f,p=-1,m=(r/c<<5)+(t+1)+this.points.length;for(let n of h){let l=n*c;if(s[l+2]<=t)continue;s[l+2]=t;let u=s[l+5];a+=s[l]*u,o+=s[l+1]*u,s[l+4]=m,i&&(e||(e=this._map(s,r,!0),p=this.clusterProps.length,this.clusterProps.push(e)),i(e,this._map(s,l)))}s[r+4]=m,l.push(a/d,o/d,1/0,m,-1,d),i&&l.push(p)}else{for(let e=0;e1)for(let e of h){let r=e*c;if(!(s[r+2]<=t)){s[r+2]=t;for(let e=0;e>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+5]>1){let n=this.clusterProps[e[t+6]];return r?Object.assign({},n):n}let n=this.points[e[t+3]].properties,i=this.options.map(n);return r&&i===n?Object.assign({},i):i}}function E(e,t,r){return{type:"Feature",id:e[t+3],properties:C(e,t,r),geometry:{type:"Point",coordinates:[360*(e[t]-.5),360*Math.atan(Math.exp((180-360*e[t+1])*Math.PI/180))/Math.PI-90]}}}function C(e,t,r){let n=e[t+5],i=n>=1e4?`${Math.round(n/1e3)}k`:n>=1e3?Math.round(n/100)/10+"k":n,a=e[t+6];return Object.assign(-1===a?{}:Object.assign({},r[a]),{cluster:!0,cluster_id:e[t+3],point_count:n,point_count_abbreviated:i})}function L(e){return e/360+.5}function I(e){let t=Math.sin(e*Math.PI/180),r=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return r<0?0:r>1?1:r}function P(e,t,r,n){let i={id:e??null,type:t,geometry:r,tags:n,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if("Point"===t||"MultiPoint"===t||"LineString"===t)z(i,r);else if("Polygon"===t)z(i,r[0]);else if("MultiLineString"===t)for(let e of r)z(i,e);else if("MultiPolygon"===t)for(let e of r)z(i,e[0]);return i}function z(e,t){for(let r=0;r0&&(o+=n?(i*l-s*a)/2:Math.sqrt(Math.pow(s-i,2)+Math.pow(l-a,2))),i=s,a=l}let s=t.length-3;t[2]=1,function e(t,r,n,i){let a=i,o=r+(n-r>>1),s,l=n-r,c=t[r],u=t[r+1],h=t[n],f=t[n+1];for(let e=r+3;e1?(r=i,n=a):l>0&&(r+=o*l,n+=s*l)}return(o=e-r)*o+(s=t-n)*s}(t[e],t[e+1],c,u,h,f);if(r>a)s=e,a=r;else if(r===a){let t=Math.abs(e-o);ti&&(s-r>3&&e(t,r,s,i),t[s+2]=a,n-s>3&&e(t,s,n,i))}(t,0,s,r),t[s+2]=1,t.size=Math.abs(o),t.start=0,t.end=t.size}function j(e,t,r,n){for(let i=0;i1?1:r}function B(e,t,r,n,i,a,o,s){if(n/=t,a>=(r/=t)&&o=n)return null;let l=[];for(let t of e){let e=t.geometry,a=t.type,o=0===i?t.minX:t.minY,p=0===i?t.maxX:t.maxY;if(o>=r&&p=n)continue;let m=[];if("Point"===a||"MultiPoint"===a){var c=e,u=m,h=r,f=n,d=i;for(let e=0;e=h&&t<=f&&q(u,c[e],c[e+1],c[e+2])}}else if("LineString"===a)N(e,m,r,n,i,!1,s.lineMetrics);else if("MultiLineString"===a)V(e,m,r,n,i,!1);else if("Polygon"===a)V(e,m,r,n,i,!0);else if("MultiPolygon"===a)for(let t of e){let e=[];V(t,e,r,n,i,!0),e.length&&m.push(e)}if(m.length){if(s.lineMetrics&&"LineString"===a){for(let e of m)l.push(P(t.id,a,e,t.tags));continue}"LineString"!==a&&"MultiLineString"!==a||(1===m.length?(a="LineString",m=m[0]):a="MultiLineString"),"Point"!==a&&"MultiPoint"!==a||(a=3===m.length?"Point":"MultiPoint"),l.push(P(t.id,a,m,t.tags))}}return l.length?l:null}function N(e,t,r,n,i,a,o){let s=U(e),l=0===i?H:G,c,u,h=e.start;for(let f=0;fr&&(u=l(s,d,p,g,y,r),o&&(s.start=h+c*u)):v>n?x=r&&(u=l(s,d,p,g,y,r),b=!0),x>n&&v<=n&&(u=l(s,d,p,g,y,n),b=!0),!a&&b&&(o&&(s.end=h+c*u),t.push(s),s=U(e)),o&&(h+=c)}let f=e.length-3,d=e[f],p=e[f+1],m=0===i?d:p;m>=r&&m<=n&&q(s,d,p,e[f+2]),f=s.length-3,a&&f>=3&&(s[f]!==s[0]||s[f+1]!==s[1])&&q(s,s[0],s[1],s[2]),s.length&&t.push(s)}function U(e){let t=[];return t.size=e.size,t.start=e.start,t.end=e.end,t}function V(e,t,r,n,i,a){for(let o of e)N(o,t,r,n,i,a,!1)}function q(e,t,r,n){e.push(t,r,n)}function H(e,t,r,n,i,a){let o=(a-t)/(n-t);return q(e,a,r+(i-r)*o,1),o}function G(e,t,r,n,i,a){let o=(a-r)/(i-r);return q(e,t+(n-t)*o,a,1),o}function W(e,t){let r=[];for(let n=0;n0&&t.size<(i?o:n))return void(r.numPoints+=t.length/3);let s=[];for(let e=0;eo)&&(r.numSimplified++,s.push(t[e],t[e+1])),r.numPoints++;i&&function(e,t){let r=0;for(let t=0,n=e.length,i=n-2;t0===t)for(let t=0,r=e.length;t24)throw Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw Error("promoteId and generateId cannot be used together.");let n=function(e,t){let r=[];if("FeatureCollection"===e.type)for(let n=0;n1&&console.time("creation"),f=this.tiles[h]=function(e,t,r,n,i){let a=t===i.maxZoom?0:i.tolerance/((1<1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,n,f.numFeatures,f.numPoints,f.numSimplified),console.timeEnd("creation"));let e=`z${t}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}if(f.source=e,null==i){if(t===l.indexMaxZoom||f.numPoints<=l.indexMaxPoints)continue}else{if(t===l.maxZoom||t===i)continue;if(null!=i){let e=i-t;if(r!==a>>e||n!==o>>e)continue}}if(f.source=null,0===e.length)continue;c>1&&console.time("clipping");let d=.5*l.buffer/l.extent,p=.5-d,m=.5+d,g=1+d,y=null,v=null,x=null,b=null,_=B(e,u,r-d,r+m,0,f.minX,f.maxX,l),w=B(e,u,r+p,r+g,0,f.minX,f.maxX,l);e=null,_&&(y=B(_,u,n-d,n+m,1,f.minY,f.maxY,l),v=B(_,u,n+p,n+g,1,f.minY,f.maxY,l),_=null),w&&(x=B(w,u,n-d,n+m,1,f.minY,f.maxY,l),b=B(w,u,n+p,n+g,1,f.minY,f.maxY,l),w=null),c>1&&console.timeEnd("clipping"),s.push(y||[],t+1,2*r,2*n),s.push(v||[],t+1,2*r,2*n+1),s.push(x||[],t+1,2*r+1,2*n),s.push(b||[],t+1,2*r+1,2*n+1)}}getTile(e,t,r){e*=1,t*=1,r*=1;let{extent:n,debug:i}=this.options;if(e<0||e>24)return null;let a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);let s,l=e,c=t,u=r;for(;!s&&l>0;)l--,c>>=1,u>>=1,s=this.tiles[Q(l,c,u)];return s&&s.source?(i>1&&(console.log("found parent tile z%d-%d-%d",l,c,u),console.time("drilling down")),this.splitTile(s.source,l,c,u,e,t,r),i>1&&console.timeEnd("drilling down"),this.tiles[o]?X(this.tiles[o],n):null):null}}function Q(e,t,r){return 32*((1<{o.properties=e;let t={};for(let e of s)t[e]=n[e].evaluate(a,o);return t},t.reduce=(e,t)=>{for(let r of(o.properties=t,s))a.accumulated=e[r],e[r]=i[r].evaluate(a,o)},t}(t)).load((yield this._pendingData).features):(r=yield this._pendingData,new J(r,t.geojsonVtOptions)),this.loaded={};let n={};if(i){let e=i.finish();e&&(n.resourceTiming={},n.resourceTiming[t.source]=JSON.parse(JSON.stringify(e)))}return n}catch(t){if(delete this._pendingRequest,e.bB(t))return{abandoned:!0};throw t}})}getData(){return e._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(e){let t=this.loaded;return t&&t[e.uid]?super.reloadTile(e):this.loadTile(e)}loadAndProcessGeoJSON(t,r){return e._(this,void 0,void 0,function*(){let n=yield this.loadGeoJSON(t,r);if(delete this._pendingRequest,"object"!=typeof n)throw Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`);if(u(n,!0),t.filter){let r=e.bC(t.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));n={type:"FeatureCollection",features:n.features.filter(e=>r.value.evaluate({zoom:0},e))}}return n})}loadGeoJSON(t,r){return e._(this,void 0,void 0,function*(){let{promoteId:n}=t;if(t.request){let i=yield e.h(t.request,r);return this._dataUpdateable=et(i.data,n)?er(i.data,n):void 0,i.data}if("string"==typeof t.data)try{let e=JSON.parse(t.data);return this._dataUpdateable=et(e,n)?er(e,n):void 0,e}catch{throw Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`)}if(!t.dataDiff)throw Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw Error(`Cannot update existing geojson data in ${t.source}`);return function(e,t,r){var n,i,a,o;if(t.removeAll&&e.clear(),t.remove)for(let r of t.remove)e.delete(r);if(t.add)for(let n of t.add){let t=ee(n,r);null!=t&&e.set(t,n)}if(t.update)for(let r of t.update){let t=e.get(r.id);if(null==t)continue;let s=!r.removeAllProperties&&((null==(n=r.removeProperties)?void 0:n.length)>0||(null==(i=r.addOrUpdateProperties)?void 0:i.length)>0);if((r.newGeometry||r.removeAllProperties||s)&&(t=Object.assign({},t),e.set(r.id,t),s&&(t.properties=Object.assign({},t.properties))),r.newGeometry&&(t.geometry=r.newGeometry),r.removeAllProperties)t.properties={};else if((null==(a=r.removeProperties)?void 0:a.length)>0)for(let e of r.removeProperties)Object.prototype.hasOwnProperty.call(t.properties,e)&&delete t.properties[e];if((null==(o=r.addOrUpdateProperties)?void 0:o.length)>0)for(let{key:e,value:n}of r.addOrUpdateProperties)t.properties[e]=n}}(this._dataUpdateable,t.dataDiff,n),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(t){return e._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(e){return this._geoJSONIndex.getClusterExpansionZoom(e.clusterId)}getClusterChildren(e){return this._geoJSONIndex.getChildren(e.clusterId)}getClusterLeaves(e){return this._geoJSONIndex.getLeaves(e.clusterId,e.limit,e.offset)}}class ei{constructor(t){this.self=t,this.actor=new e.F(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=e.bi,this.self.removeProtocol=e.bj,this.self.registerRTLTextPlugin=t=>{if(e.bD.isParsed())throw Error("RTL text plugin already registered.");e.bD.setMethods(t)},this.actor.registerMessageHandler("LDT",(e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t)),this.actor.registerMessageHandler("RDT",(t,r)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(t,r.source).removeTile(r)})),this.actor.registerMessageHandler("GCEZ",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterExpansionZoom(r)})),this.actor.registerMessageHandler("GCC",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterChildren(r)})),this.actor.registerMessageHandler("GCL",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterLeaves(r)})),this.actor.registerMessageHandler("LD",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t)),this.actor.registerMessageHandler("GD",(e,t)=>this._getWorkerSource(e,t.type,t.source).getData()),this.actor.registerMessageHandler("LT",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t)),this.actor.registerMessageHandler("RT",(e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t)),this.actor.registerMessageHandler("AT",(e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t)),this.actor.registerMessageHandler("RMT",(e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t)),this.actor.registerMessageHandler("RS",(t,r)=>e._(this,void 0,void 0,function*(){if(!this.workerSources[t]||!this.workerSources[t][r.type]||!this.workerSources[t][r.type][r.source])return;let e=this.workerSources[t][r.type][r.source];delete this.workerSources[t][r.type][r.source],void 0!==e.removeSource&&e.removeSource(r)})),this.actor.registerMessageHandler("RM",t=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t]})),this.actor.registerMessageHandler("SR",(t,r)=>e._(this,void 0,void 0,function*(){this.referrer=r})),this.actor.registerMessageHandler("SRPS",(e,t)=>this._syncRTLPluginState(e,t)),this.actor.registerMessageHandler("IS",(t,r)=>e._(this,void 0,void 0,function*(){this.self.importScripts(r)})),this.actor.registerMessageHandler("SI",(e,t)=>this._setImages(e,t)),this.actor.registerMessageHandler("UL",(t,r)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).update(r.layers,r.removedIds)})),this.actor.registerMessageHandler("SL",(t,r)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).replace(r)}))}_setImages(t,r){return e._(this,void 0,void 0,function*(){for(let e in this.availableImages[t]=r,this.workerSources[t]){let n=this.workerSources[t][e];for(let e in n)n[e].availableImages=r}})}_syncRTLPluginState(t,r){return e._(this,void 0,void 0,function*(){if(e.bD.isParsed())return e.bD.getState();if("loading"!==r.pluginStatus)return e.bD.setState(r),r;let t=r.pluginURL;if(this.self.importScripts(t),e.bD.isParsed()){let r={pluginStatus:"loaded",pluginURL:t};return e.bD.setState(r),r}throw e.bD.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${t}`)})}_getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}_getLayerIndex(e){let r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new t),r}_getWorkerSource(e,t,r){if(this.workerSources[e]||(this.workerSources[e]={}),this.workerSources[e][t]||(this.workerSources[e][t]={}),!this.workerSources[e][t][r]){let n={sendAsync:(t,r)=>(t.targetMapId=e,this.actor.sendAsync(t,r))};switch(t){case"vector":this.workerSources[e][t][r]=new a(n,this._getLayerIndex(e),this._getAvailableImages(e));break;case"geojson":this.workerSources[e][t][r]=new en(n,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][r]=new this.externalWorkerSourceTypes[t](n,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][r]}_getDEMWorkerSource(e,t){return this.demWorkerSources[e]||(this.demWorkerSources[e]={}),this.demWorkerSources[e][t]||(this.demWorkerSources[e][t]=new o),this.demWorkerSources[e][t]}}return e.i(self)&&(self.worker=new ei(self)),ei}),n("index",["exports","./shared"],function(e,t){let r,n,i;var a,o="4.7.1";let s,l,c={now:"u">typeof performance&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:e=>new Promise((r,n)=>{let i=requestAnimationFrame(r);e.signal.addEventListener("abort",()=>{cancelAnimationFrame(i),n(t.c())})}),getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t=window.document.createElement("canvas"),r=t.getContext("2d",{willReadFrequently:!0});if(!r)throw Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height),r},resolveURL:e=>(s||(s=document.createElement("a")),s.href=e,s.href),hardwareConcurrency:"u">typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(null==l&&(l=matchMedia("(prefers-reduced-motion: reduce)")),l.matches)}};class u{static testProp(e){if(!u.docStyle)return e[0];for(let t=0;t{window.removeEventListener("click",u.suppressClickInternal,!0)},0)}static getScale(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}static getPoint(e,r,n){let i=r.boundingClientRect;return new t.P((n.clientX-i.left)/r.x-e.clientLeft,(n.clientY-i.top)/r.y-e.clientTop)}static mousePos(e,t){let r=u.getScale(e);return u.getPoint(e,r,t)}static touchPos(e,t){let r=[],n=u.getScale(e);for(let i=0;itypeof window&&window.document&&window.document.documentElement.style,u.selectProp=u.testProp(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]),u.transformProp=u.testProp(["transform","WebkitTransform"]);let h={supported:!1,testSupport:function(e){!p&&d&&(m?g(e):f=e)}},f,d,p=!1,m=!1;function g(e){let t=e.createTexture();e.bindTexture(e.TEXTURE_2D,t);try{if(e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,d),e.isContextLost())return;h.supported=!0}catch{}e.deleteTexture(t),p=!0}"u">typeof document&&((d=document.createElement("img")).onload=()=>{f&&g(f),f=null,m=!0},d.onerror=()=>{p=!0,f=null},d.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(e){let r,n,i,a;e.resetRequestQueue=()=>{r=[],n=0,i=0,a={}},e.addThrottleControl=e=>{let t=i++;return a[t]=e,t},e.removeThrottleControl=e=>{delete a[e],s()},e.getImage=(e,n,i=!0)=>new Promise((a,o)=>{h.supported&&(e.headers||(e.headers={}),e.headers.accept="image/webp,*/*"),t.e(e,{type:"image"}),r.push({abortController:n,requestParameters:e,supportImageRefresh:i,state:"queued",onError:e=>{o(e)},onSuccess:e=>{a(e)}}),s()});let o=e=>t._(this,void 0,void 0,function*(){var r;e.state="running";let{requestParameters:i,supportImageRefresh:a,onError:o,onSuccess:c,abortController:u}=e,h=!1===a&&!t.i(self)&&!t.g(i.url)&&(!i.headers||Object.keys(i.headers).reduce((e,t)=>e&&"accept"===t,!0));n++;let f=h?l(i,u):t.m(i,u);try{let n=yield f;delete e.abortController,e.state="completed",n.data instanceof HTMLImageElement||t.b(n.data)?c(n):n.data&&c({data:yield(r=n.data,"function"==typeof createImageBitmap?t.d(r):t.f(r)),cacheControl:n.cacheControl,expires:n.expires})}catch(t){delete e.abortController,o(t)}finally{n--,s()}}),s=()=>{let e=(()=>{for(let e of Object.keys(a))if(a[e]())return!0;return!1})()?t.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let t=n;t0;t++){let e=r.shift();e.abortController.signal.aborted?t--:o(e)}},l=(e,r)=>new Promise((n,i)=>{let a=new Image,o=e.url,s=e.credentials;s&&"include"===s?a.crossOrigin="use-credentials":(s&&"same-origin"===s||!t.s(o))&&(a.crossOrigin="anonymous"),r.signal.addEventListener("abort",()=>{a.src="",i(t.c())}),a.fetchPriority="high",a.onload=()=>{a.onerror=a.onload=null,n({data:a})},a.onerror=()=>{a.onerror=a.onload=null,r.signal.aborted||i(Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},a.src=o})}(x||(x={})),x.resetRequestQueue();class y{constructor(e){this._transformRequestFn=e}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function v(e){var r=new t.A(3);return r[0]=e[0],r[1]=e[1],r[2]=e[2],r}var x,b,_=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e};b=new t.A(3),t.A!=Float32Array&&(b[0]=0,b[1]=0,b[2]=0);var w=function(e){var t=e[0],r=e[1];return t*t+r*r};function k(e){let t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){let r=[];for(let{id:n,url:i}of e){let e=`${n}${i}`;-1===r.indexOf(e)&&(r.push(e),t.push({id:n,url:i}))}}return t}function T(e,t,r){let n=e.split("?");return n[0]+=`${t}${r}`,n.join("?")}a=new t.A(2),t.A!=Float32Array&&(a[0]=0,a[1]=0);class A{constructor(e,t,r,n){this.context=e,this.format=r,this.texture=e.gl.createTexture(),this.update(t,n)}update(e,r,n){let{width:i,height:a}=e,o=!(this.size&&this.size[0]===i&&this.size[1]===a||n),{context:s}=this,{gl:l}=s;if(this.useMipmap=!!(r&&r.useMipmap),l.bindTexture(l.TEXTURE_2D,this.texture),s.pixelStoreUnpackFlipY.set(!1),s.pixelStoreUnpack.set(1),s.pixelStoreUnpackPremultiplyAlpha.set(this.format===l.RGBA&&(!r||!1!==r.premultiply)),o)this.size=[i,a],e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||t.b(e)?l.texImage2D(l.TEXTURE_2D,0,this.format,this.format,l.UNSIGNED_BYTE,e):l.texImage2D(l.TEXTURE_2D,0,this.format,i,a,0,this.format,l.UNSIGNED_BYTE,e.data);else{let{x:r,y:o}=n||{x:0,y:0};e instanceof HTMLImageElement||e instanceof HTMLCanvasElement||e instanceof HTMLVideoElement||e instanceof ImageData||t.b(e)?l.texSubImage2D(l.TEXTURE_2D,0,r,o,l.RGBA,l.UNSIGNED_BYTE,e):l.texSubImage2D(l.TEXTURE_2D,0,r,o,i,a,l.RGBA,l.UNSIGNED_BYTE,e.data)}this.useMipmap&&this.isSizePowerOfTwo()&&l.generateMipmap(l.TEXTURE_2D)}bind(e,t,r){let{context:n}=this,{gl:i}=n;i.bindTexture(i.TEXTURE_2D,this.texture),r!==i.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(r=i.LINEAR),e!==this.filter&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,e),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,r||e),this.filter=e),t!==this.wrap&&(i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,t),this.wrap=t)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:e}=this.context;e.deleteTexture(this.texture),this.texture=null}}class M extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:e,promiseResolve:t}of this.requestors)t(this._getImagesForIds(e));this.requestors=[]}}getImage(e){let r=this.images[e];if(r&&!r.data&&r.spriteData){let e=r.spriteData;r.data=new t.R({width:e.width,height:e.height},e.context.getImageData(e.x,e.y,e.width,e.height).data),r.spriteData=null}return r}addImage(e,t){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t)}_validate(e,r){let n=!0,i=r.data||r.spriteData;return this._validateStretch(r.stretchX,i&&i.width)||(this.fire(new t.j(Error(`Image "${e}" has invalid "stretchX" value`))),n=!1),this._validateStretch(r.stretchY,i&&i.height)||(this.fire(new t.j(Error(`Image "${e}" has invalid "stretchY" value`))),n=!1),this._validateContent(r.content,r)||(this.fire(new t.j(Error(`Image "${e}" has invalid "content" value`))),n=!1),n}_validateStretch(e,t){if(!e)return!0;let r=0;for(let n of e){if(n[0]{let n=!0;if(!this.isLoaded())for(let t of e)this.images[t]||(n=!1);this.isLoaded()||n?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})})}_getImagesForIds(e){let r={};for(let n of e){let e=this.getImage(n);e||(this.fire(new t.k("styleimagemissing",{id:n})),e=this.getImage(n)),e?r[n]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,textFitWidth:e.textFitWidth,textFitHeight:e.textFitHeight,hasRenderCallback:!!(e.userImage&&e.userImage.render)}:t.w(`Image "${n}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return r}getPixelSize(){let{width:e,height:t}=this.atlasImage;return{width:e,height:t}}getPattern(e){let r=this.patterns[e],n=this.getImage(e);if(!n)return null;if(r&&r.position.version===n.version)return r.position;if(r)r.position.version=n.version;else{let r={w:n.data.width+2,h:n.data.height+2,x:0,y:0},i=new t.I(r,n);this.patterns[e]={bin:r,position:i}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){let t=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new A(e,this.atlasImage,t.RGBA),this.atlasTexture.bind(t.LINEAR,t.CLAMP_TO_EDGE)}_updatePatternAtlas(){let e=[];for(let t in this.patterns)e.push(this.patterns[t].bin);let{w:r,h:n}=t.p(e),i=this.atlasImage;for(let e in i.resize({width:r||1,height:n||1}),this.patterns){let{bin:r}=this.patterns[e],n=r.x+1,a=r.y+1,o=this.getImage(e).data,s=o.width,l=o.height;t.R.copy(o,i,{x:0,y:0},{x:n,y:a},{width:s,height:l}),t.R.copy(o,i,{x:0,y:l-1},{x:n,y:a-1},{width:s,height:1}),t.R.copy(o,i,{x:0,y:0},{x:n,y:a+l},{width:s,height:1}),t.R.copy(o,i,{x:s-1,y:0},{x:n-1,y:a},{width:1,height:l}),t.R.copy(o,i,{x:0,y:0},{x:n+s,y:a},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let r of e){if(this.callbackDispatchedThisFrame[r])continue;this.callbackDispatchedThisFrame[r]=!0;let e=this.getImage(r);e||t.w(`Image with ID: "${r}" was not found`),function(e){let{userImage:t}=e;return!!(t&&t.render&&t.render())&&(e.data.replace(new Uint8Array(t.data.buffer)),!0)}(e)&&this.updateImage(r,e)}}}function S(e,t,r,n,i,a,o,s,l){for(let c=t;c-1);a[++l]=s,o[l]=c,o[l+1]=1e20}for(let s=0,l=0;s65535)throw Error("glyphs > 65535 not supported");if(t.ranges[i])return{stack:e,id:r,glyph:n};if(!this.url)throw Error("glyphsUrl is not set");if(!t.requests[i]){let r=C.loadGlyphRange(e,i,this.url,this.requestManager);t.requests[i]=r}let a=yield t.requests[i];for(let e in a)this._doesCharSupportLocalGlyph(+e)||(t.glyphs[+e]=a[+e]);return t.ranges[i]=!0,{stack:e,id:r,glyph:a[r]||null}})}_doesCharSupportLocalGlyph(e){return!!this.localIdeographFontFamily&&RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(e))}_tinySDF(e,r,n){let i=this.localIdeographFontFamily;if(!i||!this._doesCharSupportLocalGlyph(n))return;let a=e.tinySDF;if(!a){let t="400";/bold/i.test(r)?t="900":/medium/i.test(r)?t="500":/light/i.test(r)&&(t="200"),a=e.tinySDF=new C.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:i,fontWeight:t})}let o=a.draw(String.fromCharCode(n));return{id:n,bitmap:new t.o({width:o.width||60,height:o.height||60},o.data),metrics:{width:o.glyphWidth/2||24,height:o.glyphHeight/2||24,left:o.glyphLeft/2+.5||0,top:o.glyphTop/2-27.5||-8,advance:o.glyphAdvance/2||24,isDoubleResolution:!0}}}}C.loadGlyphRange=function(e,r,n,i){return t._(this,void 0,void 0,function*(){let a=256*r,o=a+255,s=i.transformRequest(n.replace("{fontstack}",e).replace("{range}",`${a}-${o}`),"Glyphs"),l=yield t.l(s,new AbortController);if(!l||!l.data)throw Error(`Could not load glyph range. range: ${r}, ${a}-${o}`);let c={};for(let e of t.n(l.data))c[e.id]=e;return c})},C.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:n=.25,fontFamily:i="sans-serif",fontWeight:a="normal",fontStyle:o="normal"}={}){this.buffer=t,this.cutoff=n,this.radius=r;let s=this.size=e+4*t,l=this._createCanvas(s),c=this.ctx=l.getContext("2d",{willReadFrequently:!0});c.font=`${o} ${a} ${e}px ${i}`,c.textBaseline="alphabetic",c.textAlign="left",c.fillStyle="black",this.gridOuter=new Float64Array(s*s),this.gridInner=new Float64Array(s*s),this.f=new Float64Array(s),this.z=new Float64Array(s+1),this.v=new Uint16Array(s)}_createCanvas(e){let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:n,actualBoundingBoxLeft:i,actualBoundingBoxRight:a}=this.ctx.measureText(e),o=Math.ceil(r),s=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(a-i))),l=Math.min(this.size-this.buffer,o+Math.ceil(n)),c=s+2*this.buffer,u=l+2*this.buffer,h=Math.max(c*u,0),f=new Uint8ClampedArray(h),d={data:f,width:c,height:u,glyphWidth:s,glyphHeight:l,glyphTop:o,glyphLeft:0,glyphAdvance:t};if(0===s||0===l)return d;let{ctx:p,buffer:m,gridInner:g,gridOuter:y}=this;p.clearRect(m,m,s,l),p.fillText(e,m,m+o);let v=p.getImageData(m,m,s,l);y.fill(1e20,0,h),g.fill(0,0,h);for(let e=0;e0?e*e:0,g[n]=e<0?e*e:0}}S(y,0,0,c,u,c,this.f,this.v,this.z),S(g,m,m,s,l,c,this.f,this.v,this.z);for(let e=0;e1&&(o=e[++a]);let l=Math.min(Math.abs(s-o.left),Math.abs(s-o.right)),c,u=t/r*(n+1);if(o.isDash){let e=n-Math.abs(u);c=Math.sqrt(l*l+e*e)}else c=n-Math.sqrt(l*l+u*u);this.data[i+s]=Math.max(0,Math.min(255,c+128))}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){let r=e[t],n=e[t+1];r.zeroLength?e.splice(t,1):n&&n.isDash===r.isDash&&(n.left=r.left,e.splice(t,1))}let t=e[0],r=e[e.length-1];t.isDash===r.isDash&&(t.left=r.left-this.width,r.right=t.right+this.width);let n=this.width*this.nextRow,i=0,a=e[0];for(let t=0;t1&&(a=e[++i]);let r=Math.min(Math.abs(t-a.left),Math.abs(t-a.right));this.data[n+t]=Math.max(0,Math.min(255,(a.isDash?r:-r)+128))}}addDash(e,r){let n=7*!!r,i=2*n+1;if(this.nextRow+i>this.height)return t.w("LineAtlas out of space"),null;let a=0;for(let t=0;t{e.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[D]}numActive(){return Object.keys(this.active).length}}let j=Math.floor(c.hardwareConcurrency/2),F,B;function N(){return F||(F=new R),F}R.workerCount=t.C(globalThis)?Math.max(Math.min(j,3),1):1;class U{constructor(e,r){this.workerPool=e,this.actors=[],this.currentActor=0,this.id=r;let n=this.workerPool.acquire(r);for(let e=0;e{e.remove()}),this.actors=[],e&&this.workerPool.release(this.id)}registerMessageHandler(e,t){for(let r of this.actors)r.registerMessageHandler(e,t)}}function V(){return B||(B=new U(N(),t.G)).registerMessageHandler("GR",(e,r,n)=>t.m(r,n)),B}function q(e,t){let r=e.tileID,n=t.tileID;return r.overscaledZ-n.overscaledZ||r.canonical.y-n.canonical.y||r.wrap-n.wrap||r.canonical.x-n.canonical.x}function H(e,r,n){return t._(this,void 0,void 0,function*(){let i=e;if(e.url?i=(yield t.h(r.transformRequest(e.url,"Source"),n)).data:yield c.frameAsync(n),!i)return null;let a=t.M(t.e(i,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in i&&i.vector_layers&&(a.vectorLayerIds=i.vector_layers.map(e=>e.id)),a})}class G{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof t.N?new t.N(e.lng,e.lat):t.N.convert(e),this}setSouthWest(e){return this._sw=e instanceof t.N?new t.N(e.lng,e.lat):t.N.convert(e),this}extend(e){let r=this._sw,n=this._ne,i,a;if(e instanceof t.N)i=e,a=e;else{if(!(e instanceof G))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(G.convert(e)):this.extend(t.N.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(t.N.convert(e)):this;if(i=e._sw,a=e._ne,!i||!a)return this}return r||n?(r.lng=Math.min(i.lng,r.lng),r.lat=Math.min(i.lat,r.lat),n.lng=Math.max(a.lng,n.lng),n.lat=Math.max(a.lat,n.lat)):(this._sw=new t.N(i.lng,i.lat),this._ne=new t.N(a.lng,a.lat)),this}getCenter(){return new t.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new t.N(this.getWest(),this.getNorth())}getSouthEast(){return new t.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){let{lng:r,lat:n}=t.N.convert(e),i=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(i=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=n&&n<=this._ne.lat&&i}static convert(e){return e instanceof G?e:e&&new G(e)}static fromLngLat(e,r=0){let n=360*r/0x2637f09,i=n/Math.cos(Math.PI/180*e.lat);return new G(new t.N(e.lng-i,e.lat-n),new t.N(e.lng+i,e.lat+n))}adjustAntiMeridian(){let e=new t.N(this._sw.lng,this._sw.lat),r=new t.N(this._ne.lng,this._ne.lat);return new G(e,e.lng>r.lng?new t.N(r.lng+360,r.lat):r)}}class W{constructor(e,t,r){this.bounds=G.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=r||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let r=Math.pow(2,e.z),n=Math.floor(t.O(this.bounds.getWest())*r),i=Math.floor(t.Q(this.bounds.getNorth())*r),a=Math.ceil(t.O(this.bounds.getEast())*r),o=Math.ceil(t.Q(this.bounds.getSouth())*r);return e.x>=n&&e.x=i&&e.y{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r={request:this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};r.request.collectResourceTiming=this._collectResourceTiming;let n="RT";if(e.actor&&"expired"!==e.state){if("loading"===e.state)return new Promise((t,r)=>{e.reloadPromise={resolve:t,reject:r}})}else e.actor=this.dispatcher.getActor(),n="LT";e.abortController=new AbortController;try{let t=yield e.actor.sendAsync({type:n,data:r},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,t)}catch(t){if(delete e.abortController,e.aborted)return;if(t&&404!==t.status)throw t;this._afterTileLoadWorkerResponse(e,null)}})}_afterTileLoadWorkerResponse(e,t){if(t&&t.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.loadVectorData(t,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class X extends t.E{constructor(e,r,n,i){super(),this.id=e,this.dispatcher=n,this.setEventedParent(i),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},r),t.e(this,t.M(r,["url","scheme","tileSize"]))}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let e=yield H(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,e&&(t.e(this,e),e.bounds&&(this.tileBounds=new W(e.bounds,this.minzoom,this.maxzoom)),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})))}catch(e){this._tileJSONRequest=null,this.fire(new t.j(e))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load()}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return t.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{let r=yield x.getImage(this.map._requestManager.transformRequest(t,"Tile"),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(r&&r.data){this.map._refreshExpiredTiles&&r.cacheControl&&r.expires&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let t=this.map.painter.context,n=t.gl,i=r.data;e.texture=this.map.painter.getTileTexture(i.width),e.texture?e.texture.update(i,{useMipmap:!0}):(e.texture=new A(t,i,n.RGBA,{useMipmap:!0}),e.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE,n.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class Z extends X{constructor(e,r,n,i){super(e,r,n,i),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return t._(this,void 0,void 0,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),n=this.map._requestManager.transformRequest(r,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let r=yield x.getImage(n,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(r&&r.data){let n=r.data;this.map._refreshExpiredTiles&&r.cacheControl&&r.expires&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let i=t.b(n)&&t.U()?n:yield this.readImageNow(n),a={type:this.type,uid:e.uid,source:this.id,rawImageData:i,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!e.actor||"expired"===e.state){e.actor=this.dispatcher.getActor();let t=yield e.actor.sendAsync({type:"LDT",data:a});e.dem=t,e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}readImageNow(e){return t._(this,void 0,void 0,function*(){if("u">typeof VideoFrame&&t.V()){let r=e.width+2,n=e.height+2;try{return new t.R({width:r,height:n},(yield t.W(e,-1,-1,r,n)))}catch{}}return c.getImageData(e,1)})}_getNeighboringTiles(e){let r=e.canonical,n=Math.pow(2,r.z),i=(r.x-1+n)%n,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+n)%n,s=r.x+1===n?e.wrap+1:e.wrap,l={};return l[new t.S(e.overscaledZ,a,r.z,i,r.y).key]={backfilled:!1},l[new t.S(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new t.S(e.overscaledZ,a,r.z,i,r.y-1).key]={backfilled:!1},l[new t.S(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.S(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+10&&t.e(i,{resourceTiming:n}),this.fire(new t.k("data",Object.assign(Object.assign({},i),{sourceDataType:"metadata"}))),this.fire(new t.k("data",Object.assign(Object.assign({},i),{sourceDataType:"content"})))}catch(e){if(this._pendingLoads--,this._removed)return void this.fire(new t.k("dataabort",{dataType:"source"}));this.fire(new t.j(e))}})}loaded(){return 0===this._pendingLoads}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.actor?"RT":"LT";e.actor=this.actor;let r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};e.abortController=new AbortController;let n=yield this.actor.sendAsync({type:t,data:r},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(n,this.map.painter,"RT"===t)})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return t.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var K=t.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class J extends t.E{constructor(e,t,r,n){super(),this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(n),this.options=t}load(e){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let t=yield x.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,t&&t.data&&(this.image=t.data,e&&(this.coordinates=e),this._finishLoading())}catch(e){this._request=null,this._loaded=!0,this.fire(new t.j(e))}})}loaded(){return this._loaded}updateImage(e){return e.url&&(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>{this.texture=null})),this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){this.coordinates=e;let r=e.map(t.Z.fromLngLat);this.tileID=function(e){let r=1/0,n=1/0,i=-1/0,a=-1/0;for(let t of e)r=Math.min(r,t.x),n=Math.min(n,t.y),i=Math.max(i,t.x),a=Math.max(a,t.y);let o=Math.max(0,Math.floor(-Math.log(Math.max(i-r,a-n))/Math.LN2)),s=Math.pow(2,o);return new t.a1(o,Math.floor((r+i)/2*s),Math.floor((n+a)/2*s))}(r),this.minzoom=this.maxzoom=this.tileID.z;let n=r.map(e=>this.tileID.getTilePoint(e)._round());return this._boundsArray=new t.$,this._boundsArray.emplaceBack(n[0].x,n[0].y,0,0),this._boundsArray.emplaceBack(n[1].x,n[1].y,t.X,0),this._boundsArray.emplaceBack(n[3].x,n[3].y,0,t.X),this._boundsArray.emplaceBack(n[2].x,n[2].y,t.X,t.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new t.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;let e=this.map.painter.context,r=e.gl;this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,K.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new A(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let n=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,n=!0)}n&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return t._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Q extends J{constructor(e,t,r,n){super(e,t,r,n),this.roundZoom=!0,this.type="video",this.options=t}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let e=this.options;for(let t of(this.urls=[],e.urls))this.urls.push(this.map._requestManager.transformRequest(t,"Source").url);try{let e=yield t.a3(this.urls);if(this._loaded=!0,!e)return;this.video=e,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(e){this.fire(new t.j(e))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let r=this.video.seekable;er.end(0)?this.fire(new t.j(new t.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;let e=this.map.painter.context,r=e.gl;this.boundsBuffer||(this.boundsBuffer=e.createVertexBuffer(this._boundsArray,K.members)),this.boundsSegments||(this.boundsSegments=t.a0.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 A(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let n=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,n=!0)}n&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ee extends J{constructor(e,r,n,i){super(e,r,n,i),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some(e=>!Array.isArray(e)||2!==e.length||e.some(e=>"number"!=typeof e))||this.fire(new t.j(new t.a2(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.j(new t.a2(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new t.j(new t.a2(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof HTMLCanvasElement||this.fire(new t.j(new t.a2(`sources.${e}`,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.j(new t.a2(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}load(){return t._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.j(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())})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let 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)return;let r=this.map.painter.context,n=r.gl;this.boundsBuffer||(this.boundsBuffer=r.createVertexBuffer(this._boundsArray,K.members)),this.boundsSegments||(this.boundsSegments=t.a0.simpleSegment(0,0,4,2)),this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new A(r,this.canvas,n.RGBA,{premultiply:!0});let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}let et={},er=e=>{switch(e){case"geojson":return $;case"image":return J;case"raster":return X;case"raster-dem":return Z;case"vector":return Y;case"video":return Q;case"canvas":return ee}return et[e]},en="RTLPluginLoaded";class ei extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=V()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(e=>{throw this.status="error",e})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return t._(this,arguments,void 0,function*(e,t=!1){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=c.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if("unavailable"===this.status){if(!t)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()})}_requestImport(){return t._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.k(en))})}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let ea=null;function eo(){return ea||(ea=new ei),ea}class es{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.tileID=e,this.uid=t.a4(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(e){let t=e+this.timeAdded;tt.getLayer(e)).filter(Boolean);if(0!==e.length)for(let t of(n.layers=e,n.stateDependentLayerIds&&(n.stateDependentLayers=n.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0])),e))r[t.id]=n}return r}(e.buckets,r.style),this.hasSymbolBuckets=!1,this.buckets){let e=this.buckets[i];if(e instanceof t.a6){if(this.hasSymbolBuckets=!0,!n)break;e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let e in this.buckets){let r=this.buckets[e];if(r instanceof t.a6&&r.hasRTLText){this.hasRTLText=!0,eo().lazyLoad();break}}for(let e in this.queryPadding=0,this.buckets){let t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(e).queryRadius(t))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage)}else this.collisionBoxArray=new t.a5}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let r=this.buckets[t];r.uploadPending()&&r.upload(e)}let t=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new A(e,this.imageAtlas.image,t.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new A(e,this.glyphAtlasImage,t.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,n,i,a,o,s,l,c){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:n,cameraQueryGeometry:i,scale:a,tileSize:this.tileSize,pixelPosMatrix:c,transform:s,params:o,queryPadding:this.queryPadding*l},e,t,r):{}}querySourceFeatures(e,r){let n=this.latestFeatureIndex;if(!n||!n.rawTileData)return;let i=n.loadVTLayers(),a=r&&r.sourceLayer?r.sourceLayer:"",o=i._geojsonTileLayer||i[a];if(!o)return;let s=t.a7(r&&r.filter),{z:l,x:c,y:u}=this.tileID.canonical,h={z:l,x:c,y:u};for(let r=0;re)t=!1;else if(r)if(this.expirationTime{this.remove(e,i)},r)),this.data[n].push(i),this.order.push(n),this.order.length>this.max){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,n=void 0===t?0:this.data[r].indexOf(t),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}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){let t=[];for(let r in this.data)for(let n of this.data[r])e(n.value)||t.push(n);for(let e of t)this.remove(e.value.tileID,e)}}class ec{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(e,r,n){let i=String(r);if(this.stateChanges[e]=this.stateChanges[e]||{},this.stateChanges[e][i]=this.stateChanges[e][i]||{},t.e(this.stateChanges[e][i],n),null===this.deletedStates[e])for(let t in this.deletedStates[e]={},this.state[e])t!==i&&(this.deletedStates[e][t]=null);else if(this.deletedStates[e]&&null===this.deletedStates[e][i])for(let t in this.deletedStates[e][i]={},this.state[e][i])n[t]||(this.deletedStates[e][i][t]=null);else for(let t in n)this.deletedStates[e]&&this.deletedStates[e][i]&&null===this.deletedStates[e][i][t]&&delete this.deletedStates[e][i][t]}removeFeatureState(e,t,r){if(null===this.deletedStates[e])return;let n=String(t);if(this.deletedStates[e]=this.deletedStates[e]||{},r&&void 0!==t)null!==this.deletedStates[e][n]&&(this.deletedStates[e][n]=this.deletedStates[e][n]||{},this.deletedStates[e][n][r]=null);else if(void 0!==t)if(this.stateChanges[e]&&this.stateChanges[e][n])for(r in this.deletedStates[e][n]={},this.stateChanges[e][n])this.deletedStates[e][n][r]=null;else this.deletedStates[e][n]=null;else this.deletedStates[e]=null}getState(e,r){let n=String(r),i=t.e({},(this.state[e]||{})[n],(this.stateChanges[e]||{})[n]);if(null===this.deletedStates[e])return{};if(this.deletedStates[e]){let t=this.deletedStates[e][r];if(null===t)return{};for(let e in t)delete i[e]}return i}initializeTileState(e,t){e.setFeatureState(this.state,t)}coalesceChanges(e,r){let n={};for(let e in this.stateChanges){this.state[e]=this.state[e]||{};let r={};for(let n in this.stateChanges[e])this.state[e][n]||(this.state[e][n]={}),t.e(this.state[e][n],this.stateChanges[e][n]),r[n]=this.state[e][n];n[e]=r}for(let e in this.deletedStates){this.state[e]=this.state[e]||{};let r={};if(null===this.deletedStates[e])for(let t in this.state[e])r[t]={},this.state[e][t]={};else for(let t in this.deletedStates[e]){if(null===this.deletedStates[e][t])this.state[e][t]={};else for(let r of Object.keys(this.deletedStates[e][t]))delete this.state[e][t][r];r[t]=this.state[e][t]}n[e]=n[e]||{},t.e(n[e],r)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(n).length)for(let t in e)e[t].setFeatureState(n,r)}}class eu extends t.E{constructor(e,t,r){super(),this.id=e,this.dispatcher=r,this.on("data",e=>this._dataHandler(e)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((e,t,r,n)=>{let i=new(er(t.type))(e,t,r,n);if(i.id!==e)throw Error(`Expected Source id to be ${e} instead of ${i.id}`);return i})(e,t,r,this),this._tiles={},this._cache=new el(0,e=>this._unloadTile(e)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ec,this._didEmitContent=!1,this._updated=!1}onAdd(e){this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(e)}onRemove(e){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(e)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e in this._tiles){let t=this._tiles[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,n){return t._(this,void 0,void 0,function*(){try{yield this._source.loadTile(e),this._tileLoaded(e,r,n)}catch(r){e.state="errored",404!==r.status?this._source.fire(new t.j(r,{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new t.k("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){for(let t in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){let r=this._tiles[t];r.upload(e),r.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(e=>e.tileID).sort(eh).map(e=>e.key)}getRenderableIds(e){let r=[];for(let t in this._tiles)this._isIdRenderable(t,e)&&r.push(this._tiles[t]);return e?r.sort((e,r)=>{let n=e.tileID,i=r.tileID,a=new t.P(n.canonical.x,n.canonical.y)._rotate(this.transform.angle),o=new t.P(i.canonical.x,i.canonical.y)._rotate(this.transform.angle);return n.overscaledZ-i.overscaledZ||o.y-a.y||o.x-a.x}).map(e=>e.tileID.key):r.map(e=>e.tileID).sort(eh).map(e=>e.key)}hasRenderableParent(e){let t=this.findLoadedParent(e,0);return!!t&&this._isIdRenderable(t.tileID.key)}_isIdRenderable(e,t){return this._tiles[e]&&this._tiles[e].hasData()&&!this._coveredTiles[e]&&(t||!this._tiles[e].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else for(let e in this._cache.reset(),this._tiles)"errored"!==this._tiles[e].state&&this._reloadTile(e,"reloading")}_reloadTile(e,r){return t._(this,void 0,void 0,function*(){let t=this._tiles[e];t&&("loading"!==t.state&&(t.state=r),yield this._loadTile(t,e,r))})}_tileLoaded(e,r,n){e.timeAdded=c.now(),"expired"===n&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),"raster-dem"===this.getSource().type&&e.dem&&this._backfillDEM(e),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new t.k("data",{dataType:"source",tile:e,coord:e.tileID}))}_backfillDEM(e){let t=this.getRenderableIds();for(let n=0;n1||(Math.abs(r)>1&&(1===Math.abs(r+i)?r+=i:1===Math.abs(r-i)&&(r-=i)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,r,n),e.neighboringTiles&&e.neighboringTiles[a]&&(e.neighboringTiles[a].backfilled=!0)))}}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._tiles[e]}_retainLoadedChildren(e,t,r,n){for(let i in this._tiles){let a=this._tiles[i];if(n[i]||!a.hasData()||a.tileID.overscaledZ<=t||a.tileID.overscaledZ>r)continue;let o=a.tileID;for(;a&&a.tileID.overscaledZ>t+1;){let e=a.tileID.scaledTo(a.tileID.overscaledZ-1);(a=this._tiles[e.key])&&a.hasData()&&(o=e)}let s=o;for(;s.overscaledZ>t;)if(e[(s=s.scaledTo(s.overscaledZ-1)).key]){n[o.key]=o;break}}}findLoadedParent(e,t){if(e.key in this._loadedParentTiles){let r=this._loadedParentTiles[e.key];return r&&r.tileID.overscaledZ>=t?r:null}for(let r=e.overscaledZ-1;r>=t;r--){let t=e.scaledTo(r),n=this._getLoadedTile(t);if(n)return n}}findLoadedSibling(e){return this._getLoadedTile(e)}_getLoadedTile(e){let t=this._tiles[e.key];return t&&t.hasData()?t:this._cache.getByKey(e.wrapped().key)}updateCacheSize(e){let r=Math.floor((Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1)*(null===this._maxTileCacheZoomLevels?t.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),n="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._cache.setMaxSize(n)}handleWrapJump(e){let t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);if(this._prevLng=e,t){let e={};for(let r in this._tiles){let n=this._tiles[r];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+t),e[n.tileID.key]=n}for(let t in this._tiles=e,this._timers)clearTimeout(this._timers[t]),delete this._timers[t];for(let e in this._tiles)this._setTileReloadTimer(e,this._tiles[e])}}_updateCoveredAndRetainedTiles(e,t,r,n,i,a){let o={},s={},l=Object.keys(e),u=c.now();for(let r of l){let n=e[r],i=this._tiles[r];if(!i||0!==i.fadeEndTime&&i.fadeEndTime<=u)continue;let a=this.findLoadedParent(n,t),l=this.findLoadedSibling(n),c=a||l||null;c&&(this._addTile(c.tileID),o[c.tileID.key]=c.tileID),s[r]=n}for(let t in this._retainLoadedChildren(s,n,r,e),o)e[t]||(this._coveredTiles[t]=!0,e[t]=o[t]);if(a){let t={},r={};for(let e of i)this._tiles[e.key].hasData()?t[e.key]=e:r[e.key]=e;for(let n in r){let i=r[n].children(this._source.maxzoom);this._tiles[i[0].key]&&this._tiles[i[1].key]&&this._tiles[i[2].key]&&this._tiles[i[3].key]&&(t[i[0].key]=e[i[0].key]=i[0],t[i[1].key]=e[i[1].key]=i[1],t[i[2].key]=e[i[2].key]=i[2],t[i[3].key]=e[i[3].key]=i[3],delete r[n])}for(let n in r){let i=r[n],a=this.findLoadedParent(i,this._source.minzoom),o=this.findLoadedSibling(i),s=a||o||null;if(s)for(let r in t[s.tileID.key]=e[s.tileID.key]=s.tileID,t)t[r].isChildOf(s.tileID)&&delete t[r]}for(let e in this._tiles)t[e]||(this._coveredTiles[e]=!0)}}update(e,r){let n;if(!this._sourceLoaded||this._paused)return;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?n=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(e=>new t.S(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)):(n=e.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r}),this._source.hasTile&&(n=n.filter(e=>this._source.hasTile(e)))):n=[];let i=e.coveringZoomLevel(this._source),a=Math.max(i-eu.maxOverzooming,this._source.minzoom),o=Math.max(i+eu.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let e={};for(let t of n)if(t.canonical.z>this._source.minzoom){let r=t.scaledTo(t.canonical.z-1);e[r.key]=r;let n=t.scaledTo(Math.max(this._source.minzoom,Math.min(t.canonical.z,5)));e[n.key]=n}n=n.concat(Object.values(e))}let s=0===n.length&&!this._updated&&this._didEmitContent;this._updated=!0,s&&this.fire(new t.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let l=this._updateRetainedTiles(n,i);for(let e in ef(this._source.type)&&this._updateCoveredAndRetainedTiles(l,a,o,i,n,r),l)this._tiles[e].clearFadeHold();for(let e of t.ab(this._tiles,l)){let t=this._tiles[e];t.hasSymbolBuckets&&!t.holdingForFade()?t.setHoldDuration(this.map._fadeDuration):t.hasSymbolBuckets&&!t.symbolFadeFinished()||this._removeTile(e)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let e in this._tiles)this._tiles[e].holdingForFade()&&this._removeTile(e)}_updateRetainedTiles(e,t){var r;let n={},i={},a=Math.max(t-eu.maxOverzooming,this._source.minzoom),o=Math.max(t+eu.maxUnderzooming,this._source.minzoom),s={};for(let r of e){let e=this._addTile(r);n[r.key]=r,e.hasData()||tthis._source.maxzoom){let e=l.children(this._source.maxzoom)[0],t=this.getTile(e);if(t&&t.hasData()){n[e.key]=e;continue}}else{let e=l.children(this._source.maxzoom);if(n[e[0].key]&&n[e[1].key]&&n[e[2].key]&&n[e[3].key])continue}let o=e.wasRequested();for(let t=l.overscaledZ-1;t>=a;--t){let a=l.scaledTo(t);if(i[a.key])break;if(i[a.key]=!0,(e=this.getTile(a))||!o||(e=this._addTile(a)),e){let t=e.hasData();if((t||!(null!=(r=this.map)&&r.cancelPendingTileRequestsWhileZooming)||o)&&(n[a.key]=a),o=e.wasRequested(),t)break}}}return n}_updateLoadedParentTileCache(){for(let e in this._loadedParentTiles={},this._tiles){let t=[],r,n=this._tiles[e].tileID;for(;n.overscaledZ>0;){if(n.key in this._loadedParentTiles){r=this._loadedParentTiles[n.key];break}t.push(n.key);let e=n.scaledTo(n.overscaledZ-1);if(r=this._getLoadedTile(e))break;n=e}for(let e of t)this._loadedParentTiles[e]=r}}_updateLoadedSiblingTileCache(){for(let e in this._loadedSiblingTiles={},this._tiles){let t=this._tiles[e].tileID,r=this._getLoadedTile(t);this._loadedSiblingTiles[t.key]=r}}_addTile(e){let 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)));let n=r;return r||(r=new es(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state)),r.uses++,this._tiles[e.key]=r,n||this._source.fire(new t.k("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r}_setTileReloadTimer(e,t){e in this._timers&&(clearTimeout(this._timers[e]),delete this._timers[e]);let r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},r))}_removeTile(e){let t=this._tiles[e];t&&(t.uses--,delete this._tiles[e],this._timers[e]&&(clearTimeout(this._timers[e]),delete this._timers[e]),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._cache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}_dataHandler(e){let t=e.sourceDataType;"source"===e.dataType&&"metadata"===t&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&"source"===e.dataType&&"content"===t&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){for(let e in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(e);this._cache.reset()}tilesIn(e,r,n){let i=[],a=this.transform;if(!a)return i;let o=n?a.getCameraQueryGeometry(e):e,s=e.map(e=>a.pointCoordinate(e,this.terrain)),l=o.map(e=>a.pointCoordinate(e,this.terrain)),c=this.getIds(),u=1/0,h=1/0,f=-1/0,d=-1/0;for(let e of l)u=Math.min(u,e.x),h=Math.min(h,e.y),f=Math.max(f,e.x),d=Math.max(d,e.y);for(let e=0;e=0&&g[1].y+m>=0){let e=s.map(e=>o.getTilePoint(e)),t=l.map(e=>o.getTilePoint(e));i.push({tile:n,tileID:o,queryGeometry:e,cameraQueryGeometry:t,scale:p})}}return i}getVisibleCoordinates(e){let t=this.getRenderableIds(e).map(e=>this._tiles[e].tileID);for(let e of t)e.posMatrix=this.transform.calculatePosMatrix(e.toUnwrapped());return t}hasTransition(){if(this._source.hasTransition())return!0;if(ef(this._source.type)){let e=c.now();for(let t in this._tiles)if(this._tiles[t].fadeEndTime>=e)return!0}return!1}setFeatureState(e,t,r){this._state.updateState(e=e||"_geojsonTileLayer",t,r)}removeFeatureState(e,t,r){this._state.removeFeatureState(e=e||"_geojsonTileLayer",t,r)}getFeatureState(e,t){return this._state.getState(e=e||"_geojsonTileLayer",t)}setDependencies(e,t,r){let n=this._tiles[e];n&&n.setDependencies(t,r)}reloadTilesForDependencies(e,t){for(let r in this._tiles)this._tiles[r].hasDependency(e,t)&&this._reloadTile(r,"reloading");this._cache.filter(r=>!r.hasDependency(e,t))}}function eh(e,t){let r=Math.abs(2*e.wrap)-(e.wrap<0),n=Math.abs(2*t.wrap)-(t.wrap<0);return e.overscaledZ-t.overscaledZ||n-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x}function ef(e){return"raster"===e||"image"===e||"video"===e}eu.maxOverzooming=10,eu.maxUnderzooming=3;class ed{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e0?(i-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))}}function ep(e,t){let r=!0;return"always"===e||"never"!==e&&"never"!==t||(r=!1),r}class em{constructor(e,t,r){let n=this.boxCells=[],i=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let e=0;ethis.width||n<0||t>this.height)return[];let s=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=n){if(i)return[{key:null,x1:e,y1:t,x2:r,y2:n}];for(let e=0;e0}hitTestCircle(e,t,r,n,i){let a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!1;let c=[];return this._forEachCell(a,s,o,l,this._queryCellCircle,c,{hitTest:!0,overlapMode:n,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}},i),c.length>0}_queryCell(e,t,r,n,i,a,o,s){let{seenUids:l,hitTest:c,overlapMode:u}=o,h=this.boxCells[i];if(null!==h){let i=this.bboxes;for(let o of h)if(!l.box[o]){l.box[o]=!0;let h=4*o,f=this.boxKeys[o];if(e<=i[h+2]&&t<=i[h+3]&&r>=i[h+0]&&n>=i[h+1]&&(!s||s(f))&&(!c||!ep(u,f.overlapMode))&&(a.push({key:f,x1:i[h],y1:i[h+1],x2:i[h+2],y2:i[h+3]}),c))return!0}}let f=this.circleCells[i];if(null!==f){let i=this.circles;for(let o of f)if(!l.circle[o]){l.circle[o]=!0;let h=3*o,f=this.circleKeys[o];if(this._circleAndRectCollide(i[h],i[h+1],i[h+2],e,t,r,n)&&(!s||s(f))&&(!c||!ep(u,f.overlapMode))){let e=i[h],t=i[h+1],r=i[h+2];if(a.push({key:f,x1:e-r,y1:t-r,x2:e+r,y2:t+r}),c)return!0}}}return!1}_queryCellCircle(e,t,r,n,i,a,o,s){let{circle:l,seenUids:c,overlapMode:u}=o,h=this.boxCells[i];if(null!==h){let e=this.bboxes;for(let t of h)if(!c.box[t]){c.box[t]=!0;let r=4*t,n=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[r+0],e[r+1],e[r+2],e[r+3])&&(!s||s(n))&&!ep(u,n.overlapMode))return a.push(!0),!0}}let f=this.circleCells[i];if(null!==f){let e=this.circles;for(let t of f)if(!c.circle[t]){c.circle[t]=!0;let r=3*t,n=this.circleKeys[t];if(this._circlesCollide(e[r],e[r+1],e[r+2],l.x,l.y,l.radius)&&(!s||s(n))&&!ep(u,n.overlapMode))return a.push(!0),!0}}}_forEachCell(e,t,r,n,i,a,o,s){let l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(r),h=this._convertToYCellCoord(n);for(let f=l;f<=u;f++)for(let l=c;l<=h;l++)if(i.call(this,e,t,r,n,this.xCellCount*l+f,a,o,s))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,r,n,i,a){let o=n-e,s=i-t,l=r+a;return l*l>o*o+s*s}_circleAndRectCollide(e,t,r,n,i,a,o){let s=(a-n)/2,l=Math.abs(e-(n+s));if(l>s+r)return!1;let c=(o-i)/2,u=Math.abs(t-(i+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;let h=l-s,f=u-c;return h*h+f*f<=r*r}}function eg(e,r,n,i,a){let o=t.H();return r?(t.K(o,o,[1/a,1/a,1]),n||t.ad(o,o,i.angle)):t.L(o,i.labelPlaneMatrix,e),o}function ey(e,r,n,i,a){if(r){let r=t.ae(e);return t.K(r,r,[a,a,1]),n||t.ad(r,r,-i.angle),r}return i.glCoordMatrix}function ev(e,r,n,i){let a;i?(a=[e,r,i(e,r),1],t.af(a,a,n)):eC(a=[e,r,0,1],a,n);let o=a[3];return{point:new t.P(a[0]/o,a[1]/o),signedDistanceFromCamera:o,isOccluded:!1}}function ex(e,t,r,n,i,a,o,s){let l=a.glyphStartIndex+a.numGlyphs,c=a.lineStartIndex,u=a.lineStartIndex+a.lineLength,h=t.getoffsetX(a.glyphStartIndex),f=t.getoffsetX(l-1),d=eM(e*h,r,n,i,a.segment,c,u,s,o);if(!d)return null;let p=eM(e*f,r,n,i,a.segment,c,u,s,o);return p?s.projectionCache.anyProjectionOccluded?null:{first:d,last:p}:null}function eb(e,r,n,i){return e===t.ah.horizontal&&Math.abs(n.y-r.y)>Math.abs(n.x-r.x)*i?{useVertical:!0}:(e===t.ah.vertical?r.yn.x)?{needsFlipping:!0}:null}function e_(e,r,n,i,a,o,s,l,c,u,h){let f=n/24,d=r.lineOffsetX*f,p=r.lineOffsetY*f,m;if(r.numGlyphs>1){let t=r.glyphStartIndex+r.numGlyphs,n=r.lineStartIndex,o=r.lineStartIndex+r.lineLength,c=ex(f,l,d,p,i,r,h,e);if(!c)return{notEnoughRoom:!0};let g=ev(c.first.point.x,c.first.point.y,s,e.getElevation).point,y=ev(c.last.point.x,c.last.point.y,s,e.getElevation).point;if(a&&!i){let e=eb(r.writingMode,g,y,u);if(e)return e}m=[c.first];for(let a=r.glyphStartIndex+1;a0?s.point:ew(e.tileAnchorPoint,a,n,1,o,e),c=eb(r.writingMode,n,l,u);if(c)return c}let n=eM(f*l.getoffsetX(r.glyphStartIndex),d,p,i,r.segment,r.lineStartIndex,r.lineStartIndex+r.lineLength,e,h);if(!n||e.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};m=[n]}for(let e of m)t.aj(c,e.point,e.angle);return{}}function ew(e,t,r,n,i,a){let o=e.add(e.sub(t)._unit()),s=void 0!==i?ev(o.x,o.y,i,a.getElevation).point:eT(o.x,o.y,a).point,l=r.sub(s);return r.add(l._mult(n/l.mag()))}function ek(e,r,n){var i,a;let o=r.projectionCache;if(o.projections[e])return o.projections[e];let s=new t.P(r.lineVertexArray.getx(e),r.lineVertexArray.gety(e)),l=eT(s.x,s.y,r);if(l.signedDistanceFromCamera>0)return o.projections[e]=l.point,o.anyProjectionOccluded=o.anyProjectionOccluded||l.isOccluded,l.point;let c=e-n.direction;return i=0===n.distanceFromAnchor?r.tileAnchorPoint:new t.P(r.lineVertexArray.getx(c),r.lineVertexArray.gety(c)),a=n.previousVertex,ew(i,s,a,n.absOffsetX-n.distanceFromAnchor+1,void 0,r)}function eT(e,t,r){let n=e+r.translation[0],i=t+r.translation[1],a;return!r.pitchWithMap&&r.projection.useSpecialProjectionForSymbols?((a=r.projection.projectTileCoordinates(n,i,r.unwrappedTileID,r.getElevation)).point.x=(.5*a.point.x+.5)*r.width,a.point.y=(-(.5*a.point.y)+.5)*r.height):(a=ev(n,i,r.labelPlaneMatrix,r.getElevation)).isOccluded=!1,a}function eA(e,t,r){return e._unit()._perp()._mult(t*r)}function eM(e,r,n,i,a,o,s,l,c){let u=i?e-r:e+r,h=u>0?1:-1,f=0;i&&(h*=-1,f=Math.PI),h<0&&(f+=Math.PI);let d,p=h>0?o+a:o+a+1;l.projectionCache.cachedAnchorPoint?d=l.projectionCache.cachedAnchorPoint:(d=eT(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l).point,l.projectionCache.cachedAnchorPoint=d);let m,g,y=d,v=d,x=0,b=0,_=Math.abs(u),w=[],k;for(;x+b<=_;){if((p+=h)=s)return null;x+=b,v=y,g=m;let e={absOffsetX:_,direction:h,distanceFromAnchor:x,previousVertex:v};if(y=ek(p,l,e),0===n)w.push(v),k=y.sub(v);else{let r,i=y.sub(v);r=0===i.mag()?eA(ek(p+h,l,e).sub(y),n,h):eA(i,n,h),g||(g=v.add(r)),m=function(e,r,n,i,a,o,s,l,c){if(l.projectionCache.offsets[e])return l.projectionCache.offsets[e];let u=n.add(r);if(e+c.direction=a)return l.projectionCache.offsets[e]=u,u;let h=ek(e+c.direction,l,c),f=eA(h.sub(n),s,c.direction),d=n.add(f),p=h.add(f);return l.projectionCache.offsets[e]=t.ak(o,u,d,p)||u,l.projectionCache.offsets[e]}(p,r,y,o,s,g,n,l,e),w.push(g),k=m.sub(g)}b=k.mag()}let T=k._mult((_-x)/b)._add(g||v),A=f+Math.atan2(y.y-v.y,y.x-v.x);return w.push(T),{point:T,angle:c?A:0,path:w}}let eS=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function eE(e,t){for(let r=0;r=1;e--)l.push(o.path[e]);for(let e=1;ee.signedDistanceFromCamera<=0)?[]:e.map(e=>e.point)}let m=[];if(l.length>0){let e=l[0].clone(),r=l[0].clone();for(let t=1;t=n.x&&r.x<=i.x&&e.y>=n.y&&r.y<=i.y?[l]:r.xi.x||r.yi.y?[]:t.al([l],n.x,n.y,i.x,i.y)}for(let t of m){a.reset(t,.25*r);let n=0;n=a.length<=.5*r?1:Math.ceil(a.paddedLength/h)+1;for(let t=0;tev(e.x,e.y,r,t.getElevation))}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};let r=[],n=1/0,i=1/0,a=-1/0,o=-1/0;for(let s of e){let e=new t.P(s.x+100,s.y+100);n=Math.min(n,e.x),i=Math.min(i,e.y),a=Math.max(a,e.x),o=Math.max(o,e.y),r.push(e)}let s=this.grid.query(n,i,a,o).concat(this.ignoredGrid.query(n,i,a,o)),l={},c={};for(let e of s){let n=e.key;if(void 0===l[n.bucketInstanceId]&&(l[n.bucketInstanceId]={}),l[n.bucketInstanceId][n.featureIndex])continue;let i=[new t.P(e.x1,e.y1),new t.P(e.x2,e.y1),new t.P(e.x2,e.y2),new t.P(e.x1,e.y2)];t.am(r,i)&&(l[n.bucketInstanceId][n.featureIndex]=!0,void 0===c[n.bucketInstanceId]&&(c[n.bucketInstanceId]=[]),c[n.bucketInstanceId].push(n.featureIndex))}return c}insertCollisionBox(e,t,r,n,i,a){(r?this.ignoredGrid:this.grid).insert({bucketInstanceId:n,featureIndex:i,collisionGroupID:a,overlapMode:t},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,r,n,i,a){let o=r?this.ignoredGrid:this.grid,s={bucketInstanceId:n,featureIndex:i,collisionGroupID:a,overlapMode:t};for(let t=0;t=this.screenRightBoundary||n<100||t>this.screenBottomBoundary}isInsideGrid(e,t,r,n){return r>=0&&e=0&&tthis.projectAndGetPerspectiveRatio(n,e.x,e.y,i,c));k=e.some(e=>!e.isOccluded),w=e.map(e=>e.point)}else k=!0;return{box:t.ao(w),allPointsOccluded:!k}}}function eI(e,r,n){return r*(t.X/(e.tileSize*Math.pow(2,n-e.tileID.overscaledZ)))}class eP{constructor(e,t,r,n){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):n&&r?1:0,this.placed=r}isHidden(){return 0===this.opacity&&!this.placed}}class ez{constructor(e,t,r,n,i){this.text=new eP(e?e.text:null,t,r,i),this.icon=new eP(e?e.icon:null,t,n,i)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class eO{constructor(e,t,r){this.text=e,this.icon=t,this.skipFade=r}}class eD{constructor(){this.invProjMatrix=t.H(),this.viewportMatrix=t.H(),this.circles=[]}}class eR{constructor(e,t,r,n,i){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=n,this.tileID=i}}class ej{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}}function eF(e,r,n,i,a){let{horizontalAlign:o,verticalAlign:s}=t.au(e);return new t.P(-(o-.5)*r+i[0]*a,-(s-.5)*n+i[1]*a)}class eB{constructor(e,t,r,n,i,a){this.transform=e.clone(),this.terrain=r,this.collisionIndex=new eL(this.transform,t),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=n,this.retainedQueryData={},this.collisionGroups=new ej(i),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=a,a&&(a.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;return t?(r,n)=>t.getElevation(e,r,n):null}getBucketParts(e,r,n,i){let a=n.getBucket(r),o=n.latestFeatureIndex;if(!a||!o||r.id!==a.layerIds[0])return;let s=n.collisionBoxArray,l=a.layers[0].layout,c=a.layers[0].paint,u=Math.pow(2,this.transform.zoom-n.tileID.overscaledZ),h=n.tileSize/t.X,f=n.tileID.toUnwrapped(),d=this.transform.calculatePosMatrix(f),p="map"===l.get("text-pitch-alignment"),m="map"===l.get("text-rotation-alignment"),g=eI(n,1,this.transform.zoom),y=this.collisionIndex.mapProjection.translatePosition(this.transform,n,c.get("text-translate"),c.get("text-translate-anchor")),v=this.collisionIndex.mapProjection.translatePosition(this.transform,n,c.get("icon-translate"),c.get("icon-translate-anchor")),x=eg(d,p,m,this.transform,g),b=null;if(p){let e=ey(d,p,m,this.transform,g);b=t.L([],this.transform.labelPlaneMatrix,e)}this.retainedQueryData[a.bucketInstanceId]=new eR(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,n.tileID);let _={bucket:a,layout:l,translationText:y,translationIcon:v,posMatrix:d,unwrappedTileID:f,textLabelPlaneMatrix:x,labelToScreenMatrix:b,scale:u,textPixelRatio:h,holdingForFade:n.holdingForFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.ag(a.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(a.sourceID)};if(i)for(let t of a.sortKeyRanges){let{sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:i}=t;e.push({sortKey:r,symbolInstanceStart:n,symbolInstanceEnd:i,parameters:_})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:a.symbolInstances.length,parameters:_})}attemptAnchorPlacement(e,r,n,i,a,o,s,l,c,u,h,f,d,p,m,g,y,v,x){let b=t.aq[e.textAnchor],_=[e.textOffset0,e.textOffset1],w=eF(b,n,i,_,a),k=this.collisionIndex.placeCollisionBox(r,f,l,c,u,s,o,g,h.predicate,x,w);if((!v||this.collisionIndex.placeCollisionBox(v,f,l,c,u,s,o,y,h.predicate,x,w).placeable)&&k.placeable){let e;if(this.prevPlacement&&this.prevPlacement.variableOffsets[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID]&&this.prevPlacement.placements[d.crossTileID].text&&(e=this.prevPlacement.variableOffsets[d.crossTileID].anchor),0===d.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[d.crossTileID]={textOffset:_,width:n,height:i,anchor:b,textBoxScale:a,prevAnchor:e},this.markUsedJustification(p,b,d,m),p.allowVerticalPlacement&&(this.markUsedOrientation(p,m,d),this.placedOrientations[d.crossTileID]=m),{shift:w,placedGlyphBoxes:k}}}placeLayerBucketPart(e,r,n){let{bucket:i,layout:a,translationText:o,translationIcon:s,posMatrix:l,unwrappedTileID:c,textLabelPlaneMatrix:u,labelToScreenMatrix:h,textPixelRatio:f,holdingForFade:d,collisionBoxArray:p,partiallyEvaluatedTextSize:m,collisionGroup:g}=e.parameters,y=a.get("text-optional"),v=a.get("icon-optional"),x=t.ar(a,"text-overlap","text-allow-overlap"),b="always"===x,_=t.ar(a,"icon-overlap","icon-allow-overlap"),w="always"===_,k="map"===a.get("text-rotation-alignment"),T="map"===a.get("text-pitch-alignment"),A="none"!==a.get("icon-text-fit"),M="viewport-y"===a.get("symbol-z-order"),S=b&&(w||!i.hasIconData()||v),E=w&&(b||!i.hasTextData()||y);!i.collisionArrays&&p&&i.deserializeCollisionBoxes(p);let C=this._getTerrainElevationFunc(this.retainedQueryData[i.bucketInstanceId].tileID),L=(e,p,w)=>{var M,L;if(r[e.crossTileID])return;if(d)return void(this.placements[e.crossTileID]=new eO(!1,!1,!1));let I=!1,P=!1,z=!0,O=null,D={box:null,placeable:!1,offscreen:null},R={box:null,placeable:!1,offscreen:null},j=null,F=null,B=null,N=0,U=0,V=0;p.textFeatureIndex?N=p.textFeatureIndex:e.useRuntimeCollisionCircles&&(N=e.featureIndex),p.verticalTextFeatureIndex&&(U=p.verticalTextFeatureIndex);let q=p.textBox;if(q){let r=r=>{let n=t.ah.horizontal;if(i.allowVerticalPlacement&&!r&&this.prevPlacement){let t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,n=t,this.markUsedOrientation(i,n,e))}return n},a=(r,n)=>{if(i.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&p.verticalTextBox){for(let e of i.writingModes)if(e===t.ah.vertical?R=D=n():D=r(),D&&D.placeable)break}else D=r()},u=e.textAnchorOffsetStartIndex,h=e.textAnchorOffsetEndIndex;if(h===u){let n=(t,r)=>{let n=this.collisionIndex.placeCollisionBox(t,x,f,l,c,T,k,o,g.predicate,C);return n&&n.placeable&&(this.markUsedOrientation(i,r,e),this.placedOrientations[e.crossTileID]=r),n};a(()=>n(q,t.ah.horizontal),()=>{let r=p.verticalTextBox;return i.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?n(r,t.ah.vertical):{box:null,offscreen:null}}),r(D&&D.placeable)}else{let d=t.aq[null==(L=null==(M=this.prevPlacement)?void 0:M.variableOffsets[e.crossTileID])?void 0:L.anchor],m=(r,a,p)=>{let m=r.x2-r.x1,y=r.y2-r.y1,v=e.textBoxScale,b=A&&"never"===_?a:null,w=null,M="never"===x?1:2,S="never";d&&M++;for(let t=0;tm(q,p.iconBox,t.ah.horizontal),()=>{let r=p.verticalTextBox;return i.allowVerticalPlacement&&(!D||!D.placeable)&&e.numVerticalGlyphVertices>0&&r?m(r,p.verticalIconBox,t.ah.vertical):{box:null,occluded:!0,offscreen:null}}),D&&(I=D.placeable,z=D.offscreen);let y=r(D&&D.placeable);if(!I&&this.prevPlacement){let t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(i,t.anchor,e,y))}}}if(I=(j=D)&&j.placeable,z=j&&j.offscreen,e.useRuntimeCollisionCircles){let r=i.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),s=t.ai(i.textSizeData,m,r),f=a.get("text-padding");(F=this.collisionIndex.placeCollisionCircles(x,r,i.lineVertexArray,i.glyphOffsetArray,s,l,c,u,h,n,T,g.predicate,e.collisionCircleDiameter,f,o,C)).circles.length&&F.collisionDetected&&!n&&t.w("Collisions detected, but collision boxes are not shown"),I=b||F.circles.length>0&&!F.collisionDetected,z=z&&F.offscreen}if(p.iconFeatureIndex&&(V=p.iconFeatureIndex),p.iconBox){let e=e=>this.collisionIndex.placeCollisionBox(e,_,f,l,c,T,k,s,g.predicate,C,A&&O?O:void 0);P=R&&R.placeable&&p.verticalIconBox?(B=e(p.verticalIconBox)).placeable:(B=e(p.iconBox)).placeable,z=z&&B.offscreen}let H=y||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,G=v||0===e.numIconVertices;H||G?G?H||(P=P&&I):I=P&&I:P=I=P&&I;let W=P&&B.placeable;if(I&&j.placeable&&this.collisionIndex.insertCollisionBox(j.box,x,a.get("text-ignore-placement"),i.bucketInstanceId,R&&R.placeable&&U?U:N,g.ID),W&&this.collisionIndex.insertCollisionBox(B.box,_,a.get("icon-ignore-placement"),i.bucketInstanceId,V,g.ID),F&&I&&this.collisionIndex.insertCollisionCircles(F.circles,x,a.get("text-ignore-placement"),i.bucketInstanceId,N,g.ID),n&&this.storeCollisionData(i.bucketInstanceId,w,p,j,B,F),0===e.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");if(0===i.bucketInstanceId)throw Error("bucket.bucketInstanceId can't be 0");this.placements[e.crossTileID]=new eO(I||S,P||E,z||i.justReloaded),r[e.crossTileID]=!0};if(M){if(0!==e.symbolInstanceStart)throw Error("bucket.bucketInstanceId should be 0");let t=i.getSortedSymbolIndexes(this.transform.angle);for(let e=t.length-1;e>=0;--e){let r=t[e];L(i.symbolInstances.get(r),i.collisionArrays[r],r)}}else for(let t=e.symbolInstanceStart;t=0&&(e.text.placedSymbolArray.get(o).crossTileID=a>=0&&o!==a?0:n.crossTileID)}markUsedOrientation(e,r,n){let i=r===t.ah.horizontal||r===t.ah.horizontalOnly?r:0,a=r===t.ah.vertical?r:0;for(let t of[n.leftJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.rightJustifiedTextSymbolIndex])e.text.placedSymbolArray.get(t).placedOrientation=i;n.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).placedOrientation=a)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let n=t?t.symbolFadeChange(e):1,i=t?t.opacities:{},a=t?t.variableOffsets:{},o=t?t.placedOrientations:{};for(let e in this.placements){let t=this.placements[e],a=i[e];a?(this.opacities[e]=new ez(a,n,t.text,t.icon),r=r||t.text!==a.text.placed||t.icon!==a.icon.placed):(this.opacities[e]=new ez(null,n,t.text,t.icon,t.skipFade),r=r||t.text||t.icon)}for(let e in i){let t=i[e];if(!this.opacities[e]){let i=new ez(t,n,!1,!1);i.isHidden()||(this.opacities[e]=i,r=r||t.text.placed||t.icon.placed)}}for(let e in a)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=a[e]);for(let e in o)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=o[e]);if(t&&void 0===t.lastPlacementChangeTime)throw Error("Last placement time for previous placement is not defined");r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let r={};for(let n of t){let t=n.getBucket(e);t&&n.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,n.tileID,r,n.collisionBoxArray)}}updateBucketOpacities(e,r,n,i){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let a=e.layers[0],o=a.layout,s=new ez(null,0,!1,!1,!0),l=o.get("text-allow-overlap"),c=o.get("icon-allow-overlap"),u=a._unevaluatedLayout.hasValue("text-variable-anchor")||a._unevaluatedLayout.hasValue("text-variable-anchor-offset"),h="map"===o.get("text-rotation-alignment"),f="map"===o.get("text-pitch-alignment"),d="none"!==o.get("icon-text-fit"),p=new ez(null,0,l&&(c||!e.hasIconData()||o.get("icon-optional")),c&&(l||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&i&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(i);let m=(e,t,r)=>{for(let n=0;n0,v=this.placedOrientations[i.crossTileID],x=v===t.ah.vertical,b=v===t.ah.horizontal||v===t.ah.horizontalOnly;if(a>0||o>0){let t=eU(c.text);m(e.text,a,x?eV:t),m(e.text,o,b?eV:t);let r=c.text.isHidden();[i.rightJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.leftJustifiedTextSymbolIndex].forEach(t=>{t>=0&&(e.text.placedSymbolArray.get(t).hidden=r||x?1:0)}),i.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).hidden=r||b?1:0);let n=this.variableOffsets[i.crossTileID];n&&this.markUsedJustification(e,n.anchor,i,v);let s=this.placedOrientations[i.crossTileID];s&&(this.markUsedJustification(e,"left",i,s),this.markUsedOrientation(e,s,i))}if(y){let t=eU(c.icon),r=!(d&&i.verticalPlacedIconSymbolIndex&&x);i.placedIconSymbolIndex>=0&&(m(e.icon,i.numIconVertices,r?t:eV),e.icon.placedSymbolArray.get(i.placedIconSymbolIndex).hidden=c.icon.isHidden()),i.verticalPlacedIconSymbolIndex>=0&&(m(e.icon,i.numVerticalIconVertices,r?eV:t),e.icon.placedSymbolArray.get(i.verticalPlacedIconSymbolIndex).hidden=c.icon.isHidden())}let _=g&&g.has(r)?g.get(r):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let n=e.collisionArrays[r];if(n){let r=new t.P(0,0);if(n.textBox||n.verticalTextBox){let t=!0;if(u){let e=this.variableOffsets[l];e?(r=eF(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),h&&r._rotate(f?this.transform.angle:-this.transform.angle)):t=!1}if(n.textBox||n.verticalTextBox){let i;n.textBox&&(i=x),n.verticalTextBox&&(i=b),eN(e.textCollisionBox.collisionVertexArray,c.text.placed,!t||i,_.text,r.x,r.y)}}if(n.iconBox||n.verticalIconBox){let t=!!(!b&&n.verticalIconBox),i;n.iconBox&&(i=t),n.verticalIconBox&&(i=!t),eN(e.iconCollisionBox.collisionVertexArray,c.icon.placed,i,_.icon,d?r.x:0,d?r.y:0)}}}}if(e.sortFeatures(this.transform.angle),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);if(e.bucketInstanceId in this.collisionCircleArrays){let t=this.collisionCircleArrays[e.bucketInstanceId];e.placementInvProjMatrix=t.invProjMatrix,e.placementViewportMatrix=t.viewportMatrix,e.collisionCircleArray=t.circles,delete this.collisionCircleArrays[e.bucketInstanceId]}}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function eN(e,t,r,n,i,a){n&&0!==n.length||(n=[0,0,0,0]);let o=n[0]-100,s=n[1]-100,l=n[2]-100,c=n[3]-100;e.emplaceBack(+!!t,+!!r,i||0,a||0,o,s),e.emplaceBack(+!!t,+!!r,i||0,a||0,l,s),e.emplaceBack(+!!t,+!!r,i||0,a||0,l,c),e.emplaceBack(+!!t,+!!r,i||0,a||0,o,c)}function eU(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 0xffffffff;let t=+!!e.placed,r=Math.floor(127*e.opacity);return 0x2000000*r+0x1000000*t+131072*r+65536*t+512*r+256*t+2*r+t}let eV=0;function eq(){return{isOccluded:(e,t,r)=>!1,getPitchedTextCorrection:(e,t,r)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(e,t,r,n){throw Error("Not implemented.")},translatePosition:(e,t,r,n)=>(function(e,t,r,n,i=!1){if(!r[0]&&!r[1])return[0,0];let a=i?"map"===n?e.angle:0:"viewport"===n?-e.angle:0;if(a){let e=Math.sin(a),t=Math.cos(a);r=[r[0]*t-r[1]*e,r[0]*e+r[1]*t]}return[i?r[0]:eI(t,r[0],e.zoom),i?r[1]:eI(t,r[1],e.zoom)]})(e,t,r,n),getCircleRadiusCorrection:e=>1}}class eH{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,r,n,i){let a=this._bucketParts;for(;this._currentTileIndexe.sortKey-t.sortKey));this._currentPartIndex!this._forceFullPlacement&&c.now()-n>2;for(;this._currentPlacementIndex>=0;){let n=t[e[this._currentPlacementIndex]],a=this.placement.collisionIndex.transform.zoom;if("symbol"===n.type&&(!n.minzoom||n.minzoom<=a)&&(!n.maxzoom||n.maxzoom>a)){if(this._inProgressLayer||(this._inProgressLayer=new eH(n)),this._inProgressLayer.continuePlacement(r[n.source],this.placement,this._showCollisionBoxes,n,i))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}let eW=512/t.X/2;class eY{constructor(e,r,n){this.tileID=e,this.bucketInstanceId=n,this._symbolsByKey={};let i=new Map;for(let e=0;e({x:Math.floor(e.anchorX*eW),y:Math.floor(e.anchorY*eW)})),crossTileIDs:r.map(e=>e.crossTileID)};if(n.positions.length>128){let e=new t.av(n.positions.length,16,Uint16Array);for(let{x:t,y:r}of n.positions)e.add(t,r);e.finish(),delete n.positions,n.index=e}this._symbolsByKey[e]=n}}getScaledCoordinates(e,r){let{x:n,y:i,z:a}=this.tileID.canonical,{x:o,y:s,z:l}=r.canonical,c=eW/Math.pow(2,l-a),u=(s*t.X+e.anchorY)*c,h=i*t.X*eW;return{x:Math.floor((o*t.X+e.anchorX)*c-n*t.X*eW),y:Math.floor(u-h)}}findMatches(e,t,r){let n=this.tileID.canonical.ze)}}class eX{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class eZ{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(0!==t)for(let e in this.indexes){let r=this.indexes[e],n={};for(let e in r){let i=r[e];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+t),n[i.tileID.key]=i}this.indexes[e]=n}this.lng=e}addBucket(e,t,r){if(this.indexes[e.overscaledZ]&&this.indexes[e.overscaledZ][e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;ee.overscaledZ)for(let r in i){let a=i[r];a.tileID.isChildOf(e)&&a.findMatches(t.symbolInstances,e,n)}else{let a=i[e.scaledTo(Number(r)).key];a&&a.findMatches(t.symbolInstances,e,n)}}for(let e=0;e{t[e]=!0}),this.layerIndexes)t[r]||delete this.layerIndexes[r]}}let eK=(e,r)=>t.t(e,r&&r.filter(e=>"source.canvas"!==e.identifier)),eJ=t.aw();class eQ extends t.E{constructor(e,r={}){super(),this._rtlPluginLoaded=()=>{for(let e in this.sourceCaches){let t=this.sourceCaches[e].getSource().type;"vector"!==t&&"geojson"!==t||this.sourceCaches[e].reload()}},this.map=e,this.dispatcher=new U(N(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(e,t)=>this.getGlyphs(e,t)),this.dispatcher.registerMessageHandler("GI",(e,t)=>this.getImages(e,t)),this.imageManager=new M,this.imageManager.setEventedParent(this),this.glyphManager=new C(e._requestManager,r.localIdeographFontFamily),this.lineAtlas=new O(256,512),this.crossTileSymbolIndex=new e$,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new t.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",t.ay()),eo().on(en,this._rtlPluginLoaded),this.on("data",e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;let t=this.sourceCaches[e.sourceId];if(!t)return;let r=t.getSource();if(r&&r.vectorLayerIds)for(let e in this._layers){let t=this._layers[e];t.source===r.id&&this._validateLayer(t)}})}loadURL(e,r={},n){this.fire(new t.k("dataloading",{dataType:"style"})),r.validate="boolean"!=typeof r.validate||r.validate;let i=this.map._requestManager.transformRequest(e,"Style");this._loadStyleRequest=new AbortController;let a=this._loadStyleRequest;t.h(i,this._loadStyleRequest).then(e=>{this._loadStyleRequest=null,this._load(e.data,r,n)}).catch(e=>{this._loadStyleRequest=null,e&&!a.signal.aborted&&this.fire(new t.j(e))})}loadJSON(e,r={},n){this.fire(new t.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,c.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,r.validate=!1!==r.validate,this._load(e,r,n)}).catch(()=>{})}loadEmpty(){this.fire(new t.k("dataloading",{dataType:"style"})),this._load(eJ,{validate:!1})}_load(e,r,n){var i;let a=r.transformStyle?r.transformStyle(n,e):e;if(!r.validate||!eK(this,t.u(a))){for(let e in this._loaded=!0,this.stylesheet=a,a.sources)this.addSource(e,a.sources[e],{validate:!1});a.sprite?this._loadSprite(a.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(a.glyphs),this._createLayers(),this.light=new I(this.stylesheet.light),this.sky=new z(this.stylesheet.sky),this.map.setTerrain(null!=(i=this.stylesheet.terrain)?i:null),this.fire(new t.k("data",{dataType:"style"})),this.fire(new t.k("style.load"))}}_createLayers(){let e=t.az(this.stylesheet.layers);for(let r of(this.dispatcher.broadcast("SL",e),this._order=e.map(e=>e.id),this._layers={},this._serializedLayers=null,e)){let e=t.aA(r);e.setEventedParent(this,{layer:{id:r.id}}),this._layers[r.id]=e}}_loadSprite(e,r=!1,n){let i;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function(e,r,n,i){return t._(this,void 0,void 0,function*(){let a=k(e),o=n>1?"@2x":"",s={},l={};for(let{id:e,url:n}of a){let a=r.transformRequest(T(n,o,".json"),"SpriteJSON");s[e]=t.h(a,i);let c=r.transformRequest(T(n,o,".png"),"SpriteImage");l[e]=x.getImage(c,i)}return yield Promise.all([...Object.values(s),...Object.values(l)]),function(e,r){return t._(this,void 0,void 0,function*(){let t={};for(let n in e){t[n]={};let i=c.getImageCanvasContext((yield r[n]).data),a=(yield e[n]).data;for(let e in a){let{width:r,height:o,x:s,y:l,sdf:c,pixelRatio:u,stretchX:h,stretchY:f,content:d,textFitWidth:p,textFitHeight:m}=a[e];t[n][e]={data:null,pixelRatio:u,sdf:c,stretchX:h,stretchY:f,content:d,textFitWidth:p,textFitHeight:m,spriteData:{width:r,height:o,x:s,y:l,context:i}}}}return t})}(s,l)})})(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(e=>{if(this._spriteRequest=null,e)for(let t in e){for(let r of(this._spritesImagesIds[t]=[],this._spritesImagesIds[t]?this._spritesImagesIds[t].filter(t=>!(t in e)):[]))this.imageManager.removeImage(r),this._changedImages[r]=!0;for(let n in e[t]){let i="default"===t?n:`${t}:${n}`;this._spritesImagesIds[t].push(i),i in this.imageManager.images?this.imageManager.updateImage(i,e[t][n],!1):this.imageManager.addImage(i,e[t][n]),r&&(this._changedImages[i]=!0)}}}).catch(e=>{this._spriteRequest=null,i=e,this.fire(new t.j(i))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"})),n&&n(i)})}_unloadSprite(){for(let e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}_validateLayer(e){let r=this.sourceCaches[e.source];if(!r)return;let n=e.sourceLayer;if(!n)return;let i=r.getSource();("geojson"===i.type||i.vectorLayerIds&&-1===i.vectorLayerIds.indexOf(n))&&this.fire(new t.j(Error(`Source layer "${n}" does not exist on source "${i.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.sourceCaches)if(!this.sourceCaches[e].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(e,r=!1){let n=this._serializedAllLayers();if(!e||0===e.length)return Object.values(r?t.aB(n):n);let i=[];for(let a of e)if(n[a]){let e=r?t.aB(n[a]):n[a];i.push(e)}return i}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;for(let t of(e=this._serializedLayers={},Object.keys(this._layers))){let r=this._layers[t];"custom"!==r.type&&(e[t]=r.serialize())}return e}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let e in this.sourceCaches)if(this.sourceCaches[e].hasTransition())return!0;for(let e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw Error("Style is not done loading.")}update(e){if(!this._loaded)return;let r=this._changed;if(r){let t=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);for(let e in(t.length||r.length)&&this._updateWorkerLayers(t,r),this._updatedSources){let t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw Error(`Invalid action ${t}`);this._clearSource(e)}}for(let t in this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs(),this._updatedPaintProps)this._layers[t].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let n={};for(let e in this.sourceCaches){let t=this.sourceCaches[e];n[e]=t.used,t.used=!1}for(let t of this._order){let r=this._layers[t];r.recalculate(e,this._availableImages),!r.isHidden(e.zoom)&&r.source&&(this.sourceCaches[r.source].used=!0)}for(let e in n){let r=this.sourceCaches[e];!!n[e]!=!!r.used&&r.fire(new t.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:e}))}this.light.recalculate(e),this.sky.recalculate(e),this.z=e.zoom,r&&this.fire(new t.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.sourceCaches)this.sourceCaches[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.sourceCaches)this.sourceCaches[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var n;this._checkLoaded();let i=this.serialize();if(e=r.transformStyle?r.transformStyle(i,e):e,(null==(n=r.validate)||n)&&eK(this,t.u(e)))return!1;(e=t.aB(e)).layers=t.az(e.layers);let a=t.aC(i,e),o=this._getOperationsToPerform(a);if(o.unimplemented.length>0)throw Error(`Unimplemented: ${o.unimplemented.join(", ")}.`);if(0===o.operations.length)return!1;for(let e of o.operations)e();return this.stylesheet=e,this._serializedLayers=null,!0}_getOperationsToPerform(e){let t=[],r=[];for(let n of e)switch(n.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":t.push(()=>this.addLayer.apply(this,n.args));break;case"removeLayer":t.push(()=>this.removeLayer.apply(this,n.args));break;case"setPaintProperty":t.push(()=>this.setPaintProperty.apply(this,n.args));break;case"setLayoutProperty":t.push(()=>this.setLayoutProperty.apply(this,n.args));break;case"setFilter":t.push(()=>this.setFilter.apply(this,n.args));break;case"addSource":t.push(()=>this.addSource.apply(this,n.args));break;case"removeSource":t.push(()=>this.removeSource.apply(this,n.args));break;case"setLayerZoomRange":t.push(()=>this.setLayerZoomRange.apply(this,n.args));break;case"setLight":t.push(()=>this.setLight.apply(this,n.args));break;case"setGeoJSONSourceData":t.push(()=>this.setGeoJSONSourceData.apply(this,n.args));break;case"setGlyphs":t.push(()=>this.setGlyphs.apply(this,n.args));break;case"setSprite":t.push(()=>this.setSprite.apply(this,n.args));break;case"setSky":t.push(()=>this.setSky.apply(this,n.args));break;case"setTerrain":t.push(()=>this.map.setTerrain.apply(this,n.args));break;case"setTransition":t.push(()=>{});break;default:r.push(n.command)}return{operations:t,unimplemented:r}}addImage(e,r){if(this.getImage(e))return this.fire(new t.j(Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new t.j(Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,n={}){if(this._checkLoaded(),void 0!==this.sourceCaches[e])throw Error(`Source "${e}" already exists.`);if(!r.type)throw Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(r.type)>=0&&this._validate(t.u.source,`sources.${e}`,r,null,n))return;this.map&&this.map._collectResourceTiming&&(r.collectResourceTiming=!0);let i=this.sourceCaches[e]=new eu(e,r,this.dispatcher);i.style=this,i.setEventedParent(this,()=>({isSourceLoaded:i.loaded(),source:i.serialize(),sourceId:e})),i.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw Error("There is no source with this ID");for(let r in this._layers)if(this._layers[r].source===e)return this.fire(new t.j(Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));let r=this.sourceCaches[e];delete this.sourceCaches[e],delete this._updatedSources[e],r.fire(new t.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.sourceCaches[e])throw Error(`There is no source with this ID=${e}`);let r=this.sourceCaches[e].getSource();if("geojson"!==r.type)throw Error(`geojsonSource.type is ${r.type}, which is !== 'geojson`);r.setData(t),this._changed=!0}getSource(e){return this.sourceCaches[e]&&this.sourceCaches[e].getSource()}addLayer(e,r,n={}){let i;this._checkLoaded();let a=e.id;if(this.getLayer(a))return void this.fire(new t.j(Error(`Layer "${a}" already exists on this map.`)));if("custom"===e.type){if(eK(this,t.aD(e)))return;i=t.aA(e)}else{if("source"in e&&"object"==typeof e.source&&(this.addSource(a,e.source),e=t.aB(e),e=t.e(e,{source:a})),this._validate(t.u.layer,`layers.${a}`,e,{arrayIndex:-1},n))return;i=t.aA(e),this._validateLayer(i),i.setEventedParent(this,{layer:{id:a}})}let o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.j(Error(`Cannot add layer "${a}" before non-existing layer "${r}".`)));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=i,this._removedLayers[a]&&i.source&&"custom"!==i.type){let e=this._removedLayers[a];delete this._removedLayers[a],e.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)}}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.j(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===r)return;let n=this._order.indexOf(e);this._order.splice(n,1);let i=r?this._order.indexOf(r):this._order.length;r&&-1===i?this.fire(new t.j(Error(`Cannot move layer "${e}" before non-existing layer "${r}".`))):(this._order.splice(i,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();let r=this._layers[e];if(!r)return void this.fire(new t.j(Error(`Cannot remove non-existing layer "${e}".`)));r.setEventedParent(null);let n=this._order.indexOf(e);this._order.splice(n,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,n){this._checkLoaded();let 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.j(Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,r,n={}){this._checkLoaded();let i=this.getLayer(e);if(i){if(!t.aE(i.filter,r))return null==r?(i.filter=void 0,void this._updateLayer(i)):void(this._validate(t.u.filter,`layers.${i.id}.filter`,r,null,n)||(i.filter=t.aB(r),this._updateLayer(i)))}else this.fire(new t.j(Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return t.aB(this.getLayer(e).filter)}setLayoutProperty(e,r,n,i={}){this._checkLoaded();let a=this.getLayer(e);a?t.aE(a.getLayoutProperty(r),n)||(a.setLayoutProperty(r,n,i),this._updateLayer(a)):this.fire(new t.j(Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,r){let n=this.getLayer(e);if(n)return n.getLayoutProperty(r);this.fire(new t.j(Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,r,n,i={}){this._checkLoaded();let a=this.getLayer(e);a?t.aE(a.getPaintProperty(r),n)||(a.setPaintProperty(r,n,i)&&this._updateLayer(a),this._changed=!0,this._updatedPaintProps[e]=!0,this._serializedLayers=null):this.fire(new t.j(Error(`Cannot style non-existing layer "${e}".`)))}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,r){this._checkLoaded();let n=e.source,i=e.sourceLayer,a=this.sourceCaches[n];if(void 0===a)return void this.fire(new t.j(Error(`The source '${n}' does not exist in the map's style.`)));let o=a.getSource().type;"geojson"===o&&i?this.fire(new t.j(Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||i?(void 0===e.id&&this.fire(new t.j(Error("The feature id parameter must be provided."))),a.setFeatureState(i,e.id,r)):this.fire(new t.j(Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,r){this._checkLoaded();let n=e.source,i=this.sourceCaches[n];if(void 0===i)return void this.fire(new t.j(Error(`The source '${n}' does not exist in the map's style.`)));let a=i.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.j(Error("A feature id is required to remove its specific state property."))):i.removeFeatureState(o,e.id,r):this.fire(new t.j(Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let r=e.source,n=e.sourceLayer,i=this.sourceCaches[r];if(void 0!==i)return"vector"!==i.getSource().type||n?(void 0===e.id&&this.fire(new t.j(Error("The feature id parameter must be provided."))),i.getFeatureState(n,e.id)):void this.fire(new t.j(Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.j(Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){return t.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let e=t.aF(this.sourceCaches,e=>e.serialize()),r=this._serializeByIds(this._order,!0),n=this.map.getTerrain()||void 0,i=this.stylesheet;return t.aG({version:i.version,name:i.name,metadata:i.metadata,light:i.light,sky:i.sky,center:i.center,zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,sprite:i.sprite,glyphs:i.glyphs,transition:i.transition,sources:e,layers:r,terrain:n},e=>void 0!==e)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.sourceCaches[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.sourceCaches[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=e=>"fill-extrusion"===this._layers[e].type,r={},n=[];for(let i=this._order.length-1;i>=0;i--){let a=this._order[i];if(t(a))for(let t of(r[a]=i,e)){let e=t[a];if(e)for(let t of e)n.push(t)}}n.sort((e,t)=>t.intersectionZ-e.intersectionZ);let i=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o))for(let e=n.length-1;e>=0;e--){let t=n[e].feature;if(r[t.layer.id]{let r=t.feature,n=e.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=n});return h}(this.sourceCaches[s],this._layers,o,e,r,n));return this.placement&&a.push(function(e,t,r,n,i,a,o){let s={},l=a.queryRenderedSymbols(n),c=[];for(let e of Object.keys(l).map(Number))c.push(o[e]);for(let r of(c.sort(q),c)){let n=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],t,r.bucketIndex,r.sourceLayerIndex,i.filter,i.layers,i.availableImages,e);for(let e in n){let t=s[e]=s[e]||[],i=n[e];for(let e of(i.sort((e,t)=>{let n=r.featureSortOrder;if(n){let r=n.indexOf(e.featureIndex);return n.indexOf(t.featureIndex)-r}return t.featureIndex-e.featureIndex}),i))t.push(e)}}for(let t in s)s[t].forEach(n=>{let i=n.feature,a=r[e[t].source].getFeatureState(i.layer["source-layer"],i.id);i.source=i.layer.source,i.layer["source-layer"]&&(i.sourceLayer=i.layer["source-layer"]),i.state=a});return s}(this._layers,o,this.sourceCaches,e,r,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(a)}querySourceFeatures(e,r){r&&r.filter&&this._validate(t.u.filter,"querySourceFeatures.filter",r.filter,null,r);let n=this.sourceCaches[e];return n?function(e,t){let r=e.getRenderableIds().map(t=>e.getTileByID(t)),n=[],i={};for(let e=0;ee.getTileByID(t)).sort((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1))}let n=this.crossTileSymbolIndex.addLayer(r,s[r.source],e.center.lng);a=a||n}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((i=i||this._layerOrderChanged||0===r)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(c.now(),e.zoom))&&(this.pauseablePlacement=new eG(e,this.map.terrain,this._order,i,t,r,n,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(c.now()),o=!0),a&&this.pauseablePlacement.placement.setStale()),o||a)for(let e of this._order){let t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,s[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(c.now())}_releaseSymbolFadeTiles(){for(let e in this.sourceCaches)this.sourceCaches[e].releaseSymbolFadeTiles()}getImages(e,r){return t._(this,void 0,void 0,function*(){let e=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();let t=this.sourceCaches[r.source];return t&&t.setDependencies(r.tileID.key,r.type,r.icons),e})}getGlyphs(e,r){return t._(this,void 0,void 0,function*(){let e=yield this.glyphManager.getGlyphs(r.stacks),t=this.sourceCaches[r.source];return t&&t.setDependencies(r.tileID.key,r.type,[""]),e})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),e&&this._validate(t.u.glyphs,"glyphs",e,null,r)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}addSprite(e,r,n={},i){this._checkLoaded();let a=[{id:e,url:r}],o=[...k(this.stylesheet.sprite),...a];this._validate(t.u.sprite,"sprite",o,null,n)||(this.stylesheet.sprite=o,this._loadSprite(a,!0,i))}removeSprite(e){this._checkLoaded();let r=k(this.stylesheet.sprite);if(r.find(t=>t.id===e)){if(this._spritesImagesIds[e])for(let t of this._spritesImagesIds[e])this.imageManager.removeImage(t),this._changedImages[t]=!0;r.splice(r.findIndex(t=>t.id===e),1),this.stylesheet.sprite=r.length>0?r:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.k("data",{dataType:"style"}))}else this.fire(new t.j(Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return k(this.stylesheet.sprite)}setSprite(e,r={},n){this._checkLoaded(),e&&this._validate(t.u.sprite,"sprite",e,null,r)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,n):(this._unloadSprite(),n&&n(null)))}}var e0=t.Y([{name:"a_pos",type:"Int16",components:2}]);let e1={prelude:e2(`#ifdef GL_ES -precision mediump float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -`,`#ifdef GL_ES -precision highp float; -#else -#if !defined(lowp) -#define lowp -#endif -#if !defined(mediump) -#define mediump -#endif -#if !defined(highp) -#define highp -#endif -#endif -vec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0 -);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;} -#ifdef TERRAIN3D -uniform sampler2D u_terrain;uniform float u_terrain_dim;uniform mat4 u_terrain_matrix;uniform vec4 u_terrain_unpack;uniform float u_terrain_exaggeration;uniform highp sampler2D u_depth; -#endif -const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitShifts=vec4(1.)/bitSh;highp float unpack(highp vec4 color) {return dot(color,bitShifts);}highp float depthOpacity(vec3 frag) { -#ifdef TERRAIN3D -highp float d=unpack(texture2D(u_depth,frag.xy*0.5+0.5))+0.0001-frag.z;return 1.0-max(0.0,min(1.0,-d*500.0)); -#else -return 1.0; -#endif -}float calculate_visibility(vec4 pos) { -#ifdef TERRAIN3D -vec3 frag=pos.xyz/pos.w;highp float d=depthOpacity(frag);if (d > 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; -#else -return 1.0; -#endif -}float ele(vec2 pos) { -#ifdef TERRAIN3D -vec4 rgb=(texture2D(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; -#else -return 0.0; -#endif -}float get_elevation(vec2 pos) { -#ifdef TERRAIN3D -vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; -#else -return 0.0; -#endif -}`),background:e2(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:e2(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:e2(`varying vec3 v_data;varying float v_visibility; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define mediump float radius -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define highp vec4 stroke_color -#pragma mapbox: define mediump float stroke_width -#pragma mapbox: define lowp float stroke_opacity -void main(void) { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize mediump float radius -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize highp vec4 stroke_color -#pragma mapbox: initialize mediump float stroke_width -#pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:e2("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:e2(`uniform highp float u_intensity;varying vec2 v_extrude; -#pragma mapbox: define highp float weight -#define GAUSS_COEF 0.3989422804014327 -void main() { -#pragma mapbox: initialize highp float weight -float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; -#pragma mapbox: define highp float weight -#pragma mapbox: define mediump float radius -const highp float ZERO=1.0/255.0/16.0; -#define GAUSS_COEF 0.3989422804014327 -void main(void) { -#pragma mapbox: initialize highp float weight -#pragma mapbox: initialize mediump float radius -vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:e2(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(0.0); -#endif -}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:e2("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 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_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:e2("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:e2("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:e2(`#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_FragColor=color*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:e2(`varying vec2 v_pos; -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; -#pragma mapbox: define highp vec4 outline_color -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 outline_color -#pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:e2(`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; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:e2(`#ifdef GL_ES -precision highp float; -#endif -uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:e2(`varying vec4 v_color;void main() {gl_FragColor=v_color; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`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; -#ifdef TERRAIN3D -attribute vec2 a_centroid; -#endif -varying vec4 v_color; -#pragma mapbox: define highp float base -#pragma mapbox: define highp float height -#pragma mapbox: define highp vec4 color -void main() { -#pragma mapbox: initialize highp float base -#pragma mapbox: initialize highp float height -#pragma mapbox: initialize highp vec4 color -vec3 normal=a_normal_ed.xyz; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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;}`),fillExtrusionPattern:e2(`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; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; -#ifdef TERRAIN3D -attribute vec2 a_centroid; -#endif -varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; -#pragma mapbox: define lowp float base -#pragma mapbox: define lowp float height -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float base -#pragma mapbox: initialize lowp float height -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; -#ifdef TERRAIN3D -float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); -#else -float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; -#endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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 -? a_pos -: 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;}`),hillshadePrepare:e2(`#ifdef GL_ES -precision highp float; -#endif -uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,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); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"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;}"),hillshade:e2(`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; -#define PI 3.141592653589793 -void 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; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"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;}"),line:e2(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -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);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -attribute 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; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float 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; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -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; -#endif -v_width2=vec2(outset,inset);}`),lineGradient:e2(`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 vec2 v_uv; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -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);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -float 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -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; -#endif -v_width2=vec2(outset,inset);}`),linePattern:e2(`#ifdef GL_ES -precision highp float; -#endif -uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -#pragma mapbox: define lowp vec4 pattern_from -#pragma mapbox: define lowp vec4 pattern_to -#pragma mapbox: define lowp float pixel_ratio_from -#pragma mapbox: define lowp float pixel_ratio_to -void main() { -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -#pragma mapbox: initialize mediump vec4 pattern_from -#pragma mapbox: initialize mediump vec4 pattern_to -#pragma mapbox: initialize lowp float pixel_ratio_from -#pragma mapbox: initialize lowp float pixel_ratio_to -float 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; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -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; -#endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:e2(`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; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -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 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); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,` -#define scale 0.015873016 -#define LINE_DISTANCE_SCALE 2.0 -attribute 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; -#pragma mapbox: define highp vec4 color -#pragma mapbox: define lowp float blur -#pragma mapbox: define lowp float opacity -#pragma mapbox: define mediump float gapwidth -#pragma mapbox: define lowp float offset -#pragma mapbox: define mediump float width -#pragma mapbox: define lowp float floorwidth -void main() { -#pragma mapbox: initialize highp vec4 color -#pragma mapbox: initialize lowp float blur -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize mediump float gapwidth -#pragma mapbox: initialize lowp float offset -#pragma mapbox: initialize mediump float width -#pragma mapbox: initialize lowp float floorwidth -float 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; -#ifdef TERRAIN3D -v_gamma_scale=1.0; -#else -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; -#endif -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);}`),raster:e2(`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); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,"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;}"),symbolIcon:e2(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} -#pragma mapbox: define lowp float opacity -void main() { -#pragma mapbox: initialize lowp float opacity -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;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;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:e2(`#define SDF_PX 8.0 -uniform 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; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float 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 inner_edge=(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);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:e2(`#define SDF_PX 8.0 -#define SDF 1.0 -#define ICON 0.0 -uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); -#ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); -#endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} -#pragma mapbox: define highp vec4 fill_color -#pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity -#pragma mapbox: define lowp float halo_width -#pragma mapbox: define lowp float halo_blur -void main() { -#pragma mapbox: initialize highp vec4 fill_color -#pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity -#pragma mapbox: initialize lowp float halo_width -#pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? -camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:e2("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:e2("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:e2("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:e2("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function e2(e,t){let r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,n=t.match(/attribute ([\w]+) ([\w]+)/g),i=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(i):i,s={};return{fragmentSource:e=e.replace(r,(e,t,r,n,i)=>(s[i]=!0,"define"===t?` -#ifndef HAS_UNIFORM_u_${i} -varying ${r} ${n} ${i}; -#else -uniform ${r} ${n} u_${i}; -#endif -`:` -#ifdef HAS_UNIFORM_u_${i} - ${r} ${n} ${i} = u_${i}; -#endif -`)),vertexSource:t=t.replace(r,(e,t,r,n,i)=>{let a="float"===n?"vec2":"vec4",o=i.match(/color/)?"color":a;return s[i]?"define"===t?` -#ifndef HAS_UNIFORM_u_${i} -uniform lowp float u_${i}_t; -attribute ${r} ${a} a_${i}; -varying ${r} ${n} ${i}; -#else -uniform ${r} ${n} u_${i}; -#endif -`:"vec4"===o?` -#ifndef HAS_UNIFORM_u_${i} - ${i} = a_${i}; -#else - ${r} ${n} ${i} = u_${i}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${i} - ${i} = unpack_mix_${o}(a_${i}, u_${i}_t); -#else - ${r} ${n} ${i} = u_${i}; -#endif -`:"define"===t?` -#ifndef HAS_UNIFORM_u_${i} -uniform lowp float u_${i}_t; -attribute ${r} ${a} a_${i}; -#else -uniform ${r} ${n} u_${i}; -#endif -`:"vec4"===o?` -#ifndef HAS_UNIFORM_u_${i} - ${r} ${n} ${i} = a_${i}; -#else - ${r} ${n} ${i} = u_${i}; -#endif -`:` -#ifndef HAS_UNIFORM_u_${i} - ${r} ${n} ${i} = unpack_mix_${o}(a_${i}, u_${i}_t); -#else - ${r} ${n} ${i} = u_${i}; -#endif -`}),staticAttributes:n,staticUniforms:o}}class e3{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,r,n,i,a,o,s,l){this.context=e;let c=this.boundPaintVertexBuffers.length!==n.length;for(let e=0;!c&&e({u_matrix:e,u_texture:0,u_ele_delta:r,u_fog_matrix:n,u_fog_color:i?i.properties.get("fog-color"):t.aM.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:i?i.calculateFogBlendOpacity(a):0,u_horizon_color:i?i.properties.get("horizon-color"):t.aM.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1});function e4(e){let t=[];for(let r=0;rm.indexOf(e)&&m.push(e);let g=n?n.defines():[];a&&g.push("#define OVERDRAW_INSPECTOR;"),o&&g.push("#define TERRAIN3D;");let y=g.concat(e1.prelude.fragmentSource,r.fragmentSource).join(` -`),v=g.concat(e1.prelude.vertexSource,r.vertexSource).join(` -`),x=s.createShader(s.FRAGMENT_SHADER);if(s.isContextLost())return void(this.failedToCreate=!0);if(s.shaderSource(x,y),s.compileShader(x),!s.getShaderParameter(x,s.COMPILE_STATUS))throw Error(`Could not compile fragment shader: ${s.getShaderInfoLog(x)}`);s.attachShader(this.program,x);let b=s.createShader(s.VERTEX_SHADER);if(s.isContextLost())return void(this.failedToCreate=!0);if(s.shaderSource(b,v),s.compileShader(b),!s.getShaderParameter(b,s.COMPILE_STATUS))throw Error(`Could not compile vertex shader: ${s.getShaderInfoLog(b)}`);s.attachShader(this.program,b),this.attributes={};let _={};this.numAttributes=u.length;for(let e=0;e({u_depth:new t.aH(e,r.u_depth),u_terrain:new t.aH(e,r.u_terrain),u_terrain_dim:new t.aI(e,r.u_terrain_dim),u_terrain_matrix:new t.aJ(e,r.u_terrain_matrix),u_terrain_unpack:new t.aK(e,r.u_terrain_unpack),u_terrain_exaggeration:new t.aI(e,r.u_terrain_exaggeration)}))(e,_),this.binderUniforms=n?n.getUniforms(e,_):[]}draw(e,t,r,n,i,a,o,s,l,c,u,h,f,d,p,m,g,y){let v=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(n),e.setColorMode(i),e.setCullFace(a),s)for(let t in e.activeTexture.set(v.TEXTURE2),v.bindTexture(v.TEXTURE_2D,s.depthTexture),e.activeTexture.set(v.TEXTURE3),v.bindTexture(v.TEXTURE_2D,s.texture),this.terrainUniforms)this.terrainUniforms[t].set(s[t]);for(let e in this.fixedUniforms)this.fixedUniforms[e].set(o[e]);p&&p.setUniforms(e,this.binderUniforms,f,{zoom:d});let x=0;switch(t){case v.LINES:x=2;break;case v.TRIANGLES:x=3;break;case v.LINE_STRIP:x=1}for(let r of h.get()){let n=r.vaos||(r.vaos={});(n[l]||(n[l]=new e3)).bind(e,this,c,p?p.getPaintVertexBuffers():[],u,r.vertexOffset,m,g,y),v.drawElements(t,r.primitiveLength*x,v.UNSIGNED_SHORT,r.primitiveOffset*x*2)}}}function e8(e,t,r){let n=1/eI(r,1,t.transform.tileZoom),i=Math.pow(2,r.tileID.overscaledZ),a=r.tileSize*Math.pow(2,t.transform.tileZoom)/i,o=a*(r.tileID.canonical.x+r.tileID.wrap*i),s=a*r.tileID.canonical.y;return{u_image:0,u_texsize:r.imageAtlasTexture.size,u_scale:[n,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[o>>16,s>>16],u_pixel_coord_lower:[65535&o,65535&s]}}let e9=(e,r,n,i)=>{var a,o,s,l,c,u,h;let f=r.style.light,d=f.properties.get("position"),p=[d.x,d.y,d.z],m=(a=new t.A(9),t.A!=Float32Array&&(a[1]=0,a[2]=0,a[3]=0,a[5]=0,a[6]=0,a[7]=0),a[0]=1,a[4]=1,a[8]=1,a);"viewport"===f.properties.get("anchor")&&(s=Math.sin(o=-r.transform.angle),l=Math.cos(o),m[0]=l,m[1]=s,m[2]=0,m[3]=-s,m[4]=l,m[5]=0,m[6]=0,m[7]=0,m[8]=1),c=p[0],u=p[1],h=p[2],p[0]=c*m[0]+u*m[3]+h*m[6],p[1]=c*m[1]+u*m[4]+h*m[7],p[2]=c*m[2]+u*m[5]+h*m[8];let g=f.properties.get("color");return{u_matrix:e,u_lightpos:p,u_lightintensity:f.properties.get("intensity"),u_lightcolor:[g.r,g.g,g.b],u_vertical_gradient:+n,u_opacity:i}},e7=(e,r,n,i,a,o,s)=>t.e(e9(e,r,n,i),e8(o,r,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8}),te=e=>({u_matrix:e}),tt=(e,r,n,i)=>t.e(te(e),e8(n,r,i)),tr=(e,t)=>({u_matrix:e,u_world:t}),tn=(e,r,n,i,a)=>t.e(tt(e,r,n,i),{u_world:a}),ti=(e,t,r,n)=>{let i=e.transform,a,o;if("map"===n.paint.get("circle-pitch-alignment")){let e=eI(r,1,i.zoom);a=!0,o=[e,e]}else a=!1,o=i.pixelsToGLUnits;return{u_camera_to_center_distance:i.cameraToCenterDistance,u_scale_with_map:+("map"===n.paint.get("circle-pitch-scale")),u_matrix:e.translatePosMatrix(t.posMatrix,r,n.paint.get("circle-translate"),n.paint.get("circle-translate-anchor")),u_pitch_with_map:+a,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:o}},ta=(e,t,r)=>({u_matrix:e,u_inv_matrix:t,u_camera_to_center_distance:r.cameraToCenterDistance,u_viewport_size:[r.width,r.height]}),to=(e,t,r=1)=>({u_matrix:e,u_color:t,u_overlay:0,u_overlay_scale:r}),ts=e=>({u_matrix:e}),tl=(e,t,r,n)=>({u_matrix:e,u_extrude_scale:eI(t,1,r),u_intensity:n}),tc=(e,r,n,i)=>{let a=t.H();t.aP(a,0,e.width,e.height,0,0,1);let o=e.context.gl;return{u_matrix:a,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:n,u_color_ramp:i,u_opacity:r.paint.get("heatmap-opacity")}},tu=(e,t,r,n)=>{let i=e.transform;return{u_matrix:tm(e,t,r,n),u_ratio:1/eI(t,1,i.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/i.pixelsToGLUnits[0],1/i.pixelsToGLUnits[1]]}},th=(e,r,n,i,a)=>t.e(tu(e,r,n,a),{u_image:0,u_image_height:i}),tf=(e,t,r,n,i)=>{let a=e.transform,o=tp(t,a);return{u_matrix:tm(e,t,r,i),u_texsize:t.imageAtlasTexture.size,u_ratio:1/eI(t,1,a.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[o,n.fromScale,n.toScale],u_fade:n.t,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},td=(e,r,n,i,a,o)=>{let s=e.lineAtlas,l=tp(r,e.transform),c="round"===n.layout.get("line-cap"),u=s.getDash(i.from,c),h=s.getDash(i.to,c),f=u.width*a.fromScale,d=h.width*a.toScale;return t.e(tu(e,r,n,o),{u_patternscale_a:[l/f,-u.height/2],u_patternscale_b:[l/d,-h.height/2],u_sdfgamma:s.width/(256*Math.min(f,d)*e.pixelRatio)/2,u_image:0,u_tex_y_a:u.y,u_tex_y_b:h.y,u_mix:a.t})};function tp(e,t){return 1/eI(e,1,t.tileZoom)}function tm(e,t,r,n){return e.translatePosMatrix(n?n.posMatrix:t.tileID.posMatrix,t,r.paint.get("line-translate"),r.paint.get("line-translate-anchor"))}let tg=(e,t,r,n,i)=>{var a,o,s;let l,c;return{u_matrix:e,u_tl_parent:t,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"))>0?1-1/(1.001-o):-o,u_contrast_factor:(a=i.paint.get("raster-contrast"))>0?1/(1-a):1+a,u_spin_weights:(l=Math.sin(s=i.paint.get("raster-hue-rotate")*(Math.PI/180)),[(2*(c=Math.cos(s))+1)/3,(-Math.sqrt(3)*l-c+1)/3,(Math.sqrt(3)*l-c+1)/3])}},ty=(e,t,r,n,i,a,o,s,l,c,u,h,f,d)=>{let p=o.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:p.cameraToCenterDistance,u_pitch:p.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:p.width/p.height,u_fade_change:o.options.fadeDuration?o.symbolFadeChange:1,u_matrix:s,u_label_plane_matrix:l,u_coord_matrix:c,u_is_text:+h,u_pitch_with_map:+n,u_is_along_line:i,u_is_variable_anchor:a,u_texsize:f,u_texture:0,u_translation:u,u_pitched_scale:d}},tv=(e,r,n,i,a,o,s,l,c,u,h,f,d,p,m)=>{let g=s.transform;return t.e(ty(e,r,n,i,a,o,s,l,c,u,h,f,d,m),{u_gamma_scale:i?Math.cos(g._pitch)*g.cameraToCenterDistance:1,u_device_pixel_ratio:s.pixelRatio,u_is_halo:+p})},tx=(e,r,n,i,a,o,s,l,c,u,h,f,d,p)=>t.e(tv(e,r,n,i,a,o,s,l,c,u,h,!0,f,!0,p),{u_texsize_icon:d,u_texture_icon:1}),tb=(e,t,r)=>({u_matrix:e,u_opacity:t,u_color:r}),t_=(e,r,n,i,a,o)=>t.e(function(e,t,r,n){let i=r.imageManager.getPattern(e.from.toString()),a=r.imageManager.getPattern(e.to.toString()),{width:o,height:s}=r.imageManager.getPixelSize(),l=Math.pow(2,n.tileID.overscaledZ),c=n.tileSize*Math.pow(2,r.transform.tileZoom)/l,u=c*(n.tileID.canonical.x+n.tileID.wrap*l),h=c*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:[o,s],u_mix:t.t,u_pattern_size_a:i.displaySize,u_pattern_size_b:a.displaySize,u_scale_a:t.fromScale,u_scale_b:t.toScale,u_tile_units_to_pixels:1/eI(n,1,r.transform.tileZoom),u_pixel_coord_upper:[u>>16,h>>16],u_pixel_coord_lower:[65535&u,65535&h]}}(i,o,n,a),{u_matrix:e,u_opacity:r}),tw={fillExtrusion:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_lightpos:new t.aN(e,r.u_lightpos),u_lightintensity:new t.aI(e,r.u_lightintensity),u_lightcolor:new t.aN(e,r.u_lightcolor),u_vertical_gradient:new t.aI(e,r.u_vertical_gradient),u_opacity:new t.aI(e,r.u_opacity)}),fillExtrusionPattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_lightpos:new t.aN(e,r.u_lightpos),u_lightintensity:new t.aI(e,r.u_lightintensity),u_lightcolor:new t.aN(e,r.u_lightcolor),u_vertical_gradient:new t.aI(e,r.u_vertical_gradient),u_height_factor:new t.aI(e,r.u_height_factor),u_image:new t.aH(e,r.u_image),u_texsize:new t.aO(e,r.u_texsize),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade),u_opacity:new t.aI(e,r.u_opacity)}),fill:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix)}),fillPattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_image:new t.aH(e,r.u_image),u_texsize:new t.aO(e,r.u_texsize),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade)}),fillOutline:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_world:new t.aO(e,r.u_world)}),fillOutlinePattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_world:new t.aO(e,r.u_world),u_image:new t.aH(e,r.u_image),u_texsize:new t.aO(e,r.u_texsize),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade)}),circle:(e,r)=>({u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_scale_with_map:new t.aH(e,r.u_scale_with_map),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_extrude_scale:new t.aO(e,r.u_extrude_scale),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_matrix:new t.aJ(e,r.u_matrix)}),collisionBox:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_pixel_extrude_scale:new t.aO(e,r.u_pixel_extrude_scale)}),collisionCircle:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_inv_matrix:new t.aJ(e,r.u_inv_matrix),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_viewport_size:new t.aO(e,r.u_viewport_size)}),debug:(e,r)=>({u_color:new t.aL(e,r.u_color),u_matrix:new t.aJ(e,r.u_matrix),u_overlay:new t.aH(e,r.u_overlay),u_overlay_scale:new t.aI(e,r.u_overlay_scale)}),clippingMask:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix)}),heatmap:(e,r)=>({u_extrude_scale:new t.aI(e,r.u_extrude_scale),u_intensity:new t.aI(e,r.u_intensity),u_matrix:new t.aJ(e,r.u_matrix)}),heatmapTexture:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_world:new t.aO(e,r.u_world),u_image:new t.aH(e,r.u_image),u_color_ramp:new t.aH(e,r.u_color_ramp),u_opacity:new t.aI(e,r.u_opacity)}),hillshade:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_image:new t.aH(e,r.u_image),u_latrange:new t.aO(e,r.u_latrange),u_light:new t.aO(e,r.u_light),u_shadow:new t.aL(e,r.u_shadow),u_highlight:new t.aL(e,r.u_highlight),u_accent:new t.aL(e,r.u_accent)}),hillshadePrepare:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_image:new t.aH(e,r.u_image),u_dimension:new t.aO(e,r.u_dimension),u_zoom:new t.aI(e,r.u_zoom),u_unpack:new t.aK(e,r.u_unpack)}),line:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels)}),lineGradient:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels),u_image:new t.aH(e,r.u_image),u_image_height:new t.aI(e,r.u_image_height)}),linePattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_texsize:new t.aO(e,r.u_texsize),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_image:new t.aH(e,r.u_image),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels),u_scale:new t.aN(e,r.u_scale),u_fade:new t.aI(e,r.u_fade)}),lineSDF:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ratio:new t.aI(e,r.u_ratio),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.aO(e,r.u_units_to_pixels),u_patternscale_a:new t.aO(e,r.u_patternscale_a),u_patternscale_b:new t.aO(e,r.u_patternscale_b),u_sdfgamma:new t.aI(e,r.u_sdfgamma),u_image:new t.aH(e,r.u_image),u_tex_y_a:new t.aI(e,r.u_tex_y_a),u_tex_y_b:new t.aI(e,r.u_tex_y_b),u_mix:new t.aI(e,r.u_mix)}),raster:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_tl_parent:new t.aO(e,r.u_tl_parent),u_scale_parent:new t.aI(e,r.u_scale_parent),u_buffer_scale:new t.aI(e,r.u_buffer_scale),u_fade_t:new t.aI(e,r.u_fade_t),u_opacity:new t.aI(e,r.u_opacity),u_image0:new t.aH(e,r.u_image0),u_image1:new t.aH(e,r.u_image1),u_brightness_low:new t.aI(e,r.u_brightness_low),u_brightness_high:new t.aI(e,r.u_brightness_high),u_saturation_factor:new t.aI(e,r.u_saturation_factor),u_contrast_factor:new t.aI(e,r.u_contrast_factor),u_spin_weights:new t.aN(e,r.u_spin_weights)}),symbolIcon:(e,r)=>({u_is_size_zoom_constant:new t.aH(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(e,r.u_is_size_feature_constant),u_size_t:new t.aI(e,r.u_size_t),u_size:new t.aI(e,r.u_size),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_pitch:new t.aI(e,r.u_pitch),u_rotate_symbol:new t.aH(e,r.u_rotate_symbol),u_aspect_ratio:new t.aI(e,r.u_aspect_ratio),u_fade_change:new t.aI(e,r.u_fade_change),u_matrix:new t.aJ(e,r.u_matrix),u_label_plane_matrix:new t.aJ(e,r.u_label_plane_matrix),u_coord_matrix:new t.aJ(e,r.u_coord_matrix),u_is_text:new t.aH(e,r.u_is_text),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_is_along_line:new t.aH(e,r.u_is_along_line),u_is_variable_anchor:new t.aH(e,r.u_is_variable_anchor),u_texsize:new t.aO(e,r.u_texsize),u_texture:new t.aH(e,r.u_texture),u_translation:new t.aO(e,r.u_translation),u_pitched_scale:new t.aI(e,r.u_pitched_scale)}),symbolSDF:(e,r)=>({u_is_size_zoom_constant:new t.aH(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(e,r.u_is_size_feature_constant),u_size_t:new t.aI(e,r.u_size_t),u_size:new t.aI(e,r.u_size),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_pitch:new t.aI(e,r.u_pitch),u_rotate_symbol:new t.aH(e,r.u_rotate_symbol),u_aspect_ratio:new t.aI(e,r.u_aspect_ratio),u_fade_change:new t.aI(e,r.u_fade_change),u_matrix:new t.aJ(e,r.u_matrix),u_label_plane_matrix:new t.aJ(e,r.u_label_plane_matrix),u_coord_matrix:new t.aJ(e,r.u_coord_matrix),u_is_text:new t.aH(e,r.u_is_text),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_is_along_line:new t.aH(e,r.u_is_along_line),u_is_variable_anchor:new t.aH(e,r.u_is_variable_anchor),u_texsize:new t.aO(e,r.u_texsize),u_texture:new t.aH(e,r.u_texture),u_gamma_scale:new t.aI(e,r.u_gamma_scale),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_is_halo:new t.aH(e,r.u_is_halo),u_translation:new t.aO(e,r.u_translation),u_pitched_scale:new t.aI(e,r.u_pitched_scale)}),symbolTextAndIcon:(e,r)=>({u_is_size_zoom_constant:new t.aH(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.aH(e,r.u_is_size_feature_constant),u_size_t:new t.aI(e,r.u_size_t),u_size:new t.aI(e,r.u_size),u_camera_to_center_distance:new t.aI(e,r.u_camera_to_center_distance),u_pitch:new t.aI(e,r.u_pitch),u_rotate_symbol:new t.aH(e,r.u_rotate_symbol),u_aspect_ratio:new t.aI(e,r.u_aspect_ratio),u_fade_change:new t.aI(e,r.u_fade_change),u_matrix:new t.aJ(e,r.u_matrix),u_label_plane_matrix:new t.aJ(e,r.u_label_plane_matrix),u_coord_matrix:new t.aJ(e,r.u_coord_matrix),u_is_text:new t.aH(e,r.u_is_text),u_pitch_with_map:new t.aH(e,r.u_pitch_with_map),u_is_along_line:new t.aH(e,r.u_is_along_line),u_is_variable_anchor:new t.aH(e,r.u_is_variable_anchor),u_texsize:new t.aO(e,r.u_texsize),u_texsize_icon:new t.aO(e,r.u_texsize_icon),u_texture:new t.aH(e,r.u_texture),u_texture_icon:new t.aH(e,r.u_texture_icon),u_gamma_scale:new t.aI(e,r.u_gamma_scale),u_device_pixel_ratio:new t.aI(e,r.u_device_pixel_ratio),u_is_halo:new t.aH(e,r.u_is_halo),u_translation:new t.aO(e,r.u_translation),u_pitched_scale:new t.aI(e,r.u_pitched_scale)}),background:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_opacity:new t.aI(e,r.u_opacity),u_color:new t.aL(e,r.u_color)}),backgroundPattern:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_opacity:new t.aI(e,r.u_opacity),u_image:new t.aH(e,r.u_image),u_pattern_tl_a:new t.aO(e,r.u_pattern_tl_a),u_pattern_br_a:new t.aO(e,r.u_pattern_br_a),u_pattern_tl_b:new t.aO(e,r.u_pattern_tl_b),u_pattern_br_b:new t.aO(e,r.u_pattern_br_b),u_texsize:new t.aO(e,r.u_texsize),u_mix:new t.aI(e,r.u_mix),u_pattern_size_a:new t.aO(e,r.u_pattern_size_a),u_pattern_size_b:new t.aO(e,r.u_pattern_size_b),u_scale_a:new t.aI(e,r.u_scale_a),u_scale_b:new t.aI(e,r.u_scale_b),u_pixel_coord_upper:new t.aO(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.aO(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.aI(e,r.u_tile_units_to_pixels)}),terrain:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_texture:new t.aH(e,r.u_texture),u_ele_delta:new t.aI(e,r.u_ele_delta),u_fog_matrix:new t.aJ(e,r.u_fog_matrix),u_fog_color:new t.aL(e,r.u_fog_color),u_fog_ground_blend:new t.aI(e,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.aI(e,r.u_fog_ground_blend_opacity),u_horizon_color:new t.aL(e,r.u_horizon_color),u_horizon_fog_blend:new t.aI(e,r.u_horizon_fog_blend)}),terrainDepth:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_ele_delta:new t.aI(e,r.u_ele_delta)}),terrainCoords:(e,r)=>({u_matrix:new t.aJ(e,r.u_matrix),u_texture:new t.aH(e,r.u_texture),u_terrain_coords_id:new t.aI(e,r.u_terrain_coords_id),u_ele_delta:new t.aI(e,r.u_ele_delta)}),sky:(e,r)=>({u_sky_color:new t.aL(e,r.u_sky_color),u_horizon_color:new t.aL(e,r.u_horizon_color),u_horizon:new t.aI(e,r.u_horizon),u_sky_horizon_blend:new t.aI(e,r.u_sky_horizon_blend)})};class tk{constructor(e,t,r){this.context=e;let n=e.gl;this.buffer=n.createBuffer(),this.dynamicDraw=!!r,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),n.bufferData(n.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let tT={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class tA{constructor(e,t,r,n){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=n,this.context=e;let i=e.gl;this.buffer=i.createBuffer(),e.bindVertexBuffer.set(this.buffer),i.bufferData(i.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||delete t.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let r=0;r0){let r=t.H();t.aQ(r,m.placementInvProjMatrix,e.transform.glCoordMatrix),t.aQ(r,r,m.placementViewportMatrix),h.push({circleArray:y,circleOffset:d,transform:p.posMatrix,invTransform:r,coord:p}),f+=y.length/4,d=f}g&&u.draw(l,c.LINES,rn.disabled,ri.disabled,e.colorModeForRenderPass(),ra.disabled,{u_matrix:p.posMatrix,u_pixel_extrude_scale:[1/(s=e.transform).width,1/s.height]},e.style.map.terrain&&e.style.map.terrain.getTerrainData(p),i.id,g.layoutVertexBuffer,g.indexBuffer,g.segments,null,e.transform.zoom,null,null,g.collisionVertexBuffer)}if(!o||!h.length)return;let p=e.useProgram("collisionCircle"),m=new t.aR;m.resize(4*f),m._trim();let g=0;for(let e of h)for(let t=0;te.style.map.terrain.getElevation(l,t,r):null,i="map"===n.layout.get("text-rotation-alignment");!function(e,r,n,i,a,o,s,l,c,u,h,f,d,p,m){let g=i?e.textSizeData:e.iconSizeData,y=t.ag(g,n.transform.zoom),v=[256/n.width*2+1,256/n.height*2+1],x=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;x.clear();let b=e.lineVertexArray,_=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,w=n.transform.width/n.transform.height,k=!1;for(let i=0;i<_.length;i++){var T;let A=_.get(i);if(A.hidden||A.writingMode===t.ah.vertical&&!k){eE(A.numGlyphs,x);continue}k=!1;let M=ev(A.anchorX,A.anchorY,r,m);if(T=M.point,!(T.x>=-v[0]&&T.x<=v[0]&&T.y>=-v[1])||!(T.y<=v[1])){eE(A.numGlyphs,x);continue}let S=.5+n.transform.cameraToCenterDistance/M.signedDistanceFromCamera*.5,E=t.ai(g,y,A),C=s?E/S:E*S,L={getElevation:m,labelPlaneMatrix:a,lineVertexArray:b,pitchWithMap:s,projectionCache:{projections:{},offsets:{},cachedAnchorPoint:void 0,anyProjectionOccluded:!1},projection:u,tileAnchorPoint:new t.P(A.anchorX,A.anchorY),unwrappedTileID:h,width:f,height:d,translation:p},I=e_(L,A,C,!1,l,r,o,e.glyphOffsetArray,x,w,c);k=I.useVertical,(I.notEnoughRoom||k||I.needsFlipping&&e_(L,A,C,!0,l,r,o,e.glyphOffsetArray,x,w,c).notEnoughRoom)&&eE(A.numGlyphs,x)}i?e.text.dynamicLayoutVertexBuffer.updateData(x):e.icon.dynamicLayoutVertexBuffer.updateData(x)}(c,l.posMatrix,e,a,N,V,v,u,i,g,l.toUnwrapped(),m.width,m.height,q,r)}let W=l.posMatrix,Y=a&&A||G,X=x||Y?rs:N,Z=d&&0!==n.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1),$={program:C,buffers:h,uniformValues:d?c.iconsInText?tx(T.kind,L,b,v,x,Y,e,W,X,U,q,P,R,S):tv(T.kind,L,b,v,x,Y,e,W,X,U,q,a,P,!0,S):ty(T.kind,L,b,v,x,Y,e,W,X,U,q,a,P,S),atlasTexture:z,atlasTextureIcon:j,atlasInterpolation:O,atlasInterpolationIcon:D,isSDF:d,hasHalo:Z};if(w&&c.canOverlap)for(let e of(k=!0,h.segments.get()))M.push({segments:new t.a0([e]),sortKey:e.sortKey,state:$,terrainData:I});else M.push({segments:h.segments,sortKey:0,state:$,terrainData:I})}for(let t of(k&&M.sort((e,t)=>e.sortKey-t.sortKey),M)){let r=t.state;if(d.activeTexture.set(p.TEXTURE0),r.atlasTexture.bind(r.atlasInterpolation,p.CLAMP_TO_EDGE),r.atlasTextureIcon&&(d.activeTexture.set(p.TEXTURE1),r.atlasTextureIcon&&r.atlasTextureIcon.bind(r.atlasInterpolationIcon,p.CLAMP_TO_EDGE)),r.isSDF){let i=r.uniformValues;r.hasHalo&&(i.u_is_halo=1,rc(r.buffers,t.segments,n,e,r.program,T,h,f,i,t.terrainData)),i.u_is_halo=0}rc(r.buffers,t.segments,n,e,r.program,T,h,f,r.uniformValues,t.terrainData)}}function rc(e,t,r,n,i,a,o,s,l,c){let u=n.context;i.draw(u,u.gl.TRIANGLES,a,o,s,ra.disabled,l,c,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,n.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function ru(e,t,r){var n,i;let a=e.gl,o=a.createTexture();a.bindTexture(a.TEXTURE_2D,o),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);let s=null!=(n=e.HALF_FLOAT)?n:a.UNSIGNED_BYTE,l=null!=(i=e.RGBA16F)?i:a.RGBA;a.texImage2D(a.TEXTURE_2D,0,l,t,r,0,a.RGBA,s,null);let c=e.createFramebuffer(t,r,!1,!1);return c.colorAttachment.set(o),c}function rh(e,t){return t.colorRampTexture||(t.colorRampTexture=new A(e,t.colorRamp,e.gl.RGBA)),t.colorRampTexture}function rf(e,t,r,n,i){if(!r||!n||!n.imageAtlas)return;let a=n.imageAtlas.patternPositions,o=a[r.to.toString()],s=a[r.from.toString()];if(!o&&s&&(o=s),!s&&o&&(s=o),!o||!s){let e=i.getPaintProperty(t);o=a[e],s=a[e]}o&&s&&e.setConstantPatternPositions(o,s)}function rd(e,t,r,n,i,a,o){let s=e.context.gl,l="fill-pattern",c=r.paint.get(l),u=c&&c.constantOr(1),h=r.getCrossfadeParameters(),f,d,p,m,g;o?(d=u&&!r.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",f=s.LINES):(d=u?"fillPattern":"fill",f=s.TRIANGLES);let y=c.constantOr(null);for(let c of n){let n=t.getTile(c);if(u&&!n.patternsLoaded())continue;let v=n.getBucket(r);if(!v)continue;let x=v.programConfigurations.get(r.id),b=e.useProgram(d,x),_=e.style.map.terrain&&e.style.map.terrain.getTerrainData(c);u&&(e.context.activeTexture.set(s.TEXTURE0),n.imageAtlasTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE),x.updatePaintBuffers(h)),rf(x,l,y,n,r);let w=_?c:null,k=e.translatePosMatrix(w?w.posMatrix:c.posMatrix,n,r.paint.get("fill-translate"),r.paint.get("fill-translate-anchor"));if(o){m=v.indexBuffer2,g=v.segments2;let t=[s.drawingBufferWidth,s.drawingBufferHeight];p="fillOutlinePattern"===d&&u?tn(k,e,h,n,t):tr(k,t)}else m=v.indexBuffer,g=v.segments,p=u?tt(k,e,h,n):te(k);b.draw(e.context,f,i,e.stencilModeForClipping(c),a,ra.disabled,p,_,r.id,v.layoutVertexBuffer,m,g,r.paint,e.transform.zoom,x)}}function rp(e,t,r,n,i,a,o){let s=e.context,l=s.gl,c="fill-extrusion-pattern",u=r.paint.get(c),h=u.constantOr(1),f=r.getCrossfadeParameters(),d=r.paint.get("fill-extrusion-opacity"),p=u.constantOr(null);for(let u of n){let n=t.getTile(u),m=n.getBucket(r);if(!m)continue;let g=e.style.map.terrain&&e.style.map.terrain.getTerrainData(u),y=m.programConfigurations.get(r.id),v=e.useProgram(h?"fillExtrusionPattern":"fillExtrusion",y);h&&(e.context.activeTexture.set(l.TEXTURE0),n.imageAtlasTexture.bind(l.LINEAR,l.CLAMP_TO_EDGE),y.updatePaintBuffers(f)),rf(y,c,p,n,r);let x=e.translatePosMatrix(u.posMatrix,n,r.paint.get("fill-extrusion-translate"),r.paint.get("fill-extrusion-translate-anchor")),b=r.paint.get("fill-extrusion-vertical-gradient"),_=h?e7(x,e,b,d,u,f,n):e9(x,e,b,d);v.draw(s,s.gl.TRIANGLES,i,a,o,ra.backCCW,_,g,r.id,m.layoutVertexBuffer,m.indexBuffer,m.segments,r.paint,e.transform.zoom,y,e.style.map.terrain&&m.centroidVertexBuffer)}}let rm=new t.aM(1,0,0,1),rg=new t.aM(0,1,0,1),ry=new t.aM(0,0,1,1),rv=new t.aM(1,0,1,1),rx=new t.aM(0,1,1,1);function rb(e,t,r,n){rw(e,0,t+r/2,e.transform.width,r,n)}function r_(e,t,r,n){rw(e,t-r/2,0,r,e.transform.height,n)}function rw(e,t,r,n,i,a){let o=e.context,s=o.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,r*e.pixelRatio,n*e.pixelRatio,i*e.pixelRatio),o.clear({color:a}),s.disable(s.SCISSOR_TEST)}function rk(e,t,r){let n=e.context,i=n.gl,a=e.colorModeForRenderPass(),o=new rn(i.LEQUAL,rn.ReadWrite,e.depthRangeFor3D),s=e.useProgram("terrain"),l=t.getTerrainMesh();for(let c of(n.bindFramebuffer.set(null),n.viewport.set([0,0,e.width,e.height]),r)){let r=e.renderToTexture.getTexture(c),u=t.getTerrainData(c.tileID);n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,r.texture);let h=e5(e.transform.calculatePosMatrix(c.tileID.toUnwrapped()),t.getMeshFrameDelta(e.transform.zoom),e.transform.calculateFogMatrix(c.tileID.toUnwrapped()),e.style.sky,e.transform.pitch);s.draw(n,i.TRIANGLES,o,ri.disabled,a,ra.backCCW,h,u,"terrain",l.vertexBuffer,l.indexBuffer,l.segments)}}class rT{constructor(e,t,r){this.vertexBuffer=e,this.indexBuffer=t,this.segments=r}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class rA{constructor(e,r){this.context=new rr(e),this.transform=r,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:t.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=eu.maxUnderzooming+eu.maxOverzooming+1,this.depthEpsilon=1/65536,this.crossTileSymbolIndex=new e$}resize(e,t,r){if(this.width=Math.floor(e*r),this.height=Math.floor(t*r),this.pixelRatio=r,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let e of this.style._order)this.style._layers[e].resize()}setup(){let e=this.context,r=new t.aX;r.emplaceBack(0,0),r.emplaceBack(t.X,0),r.emplaceBack(0,t.X),r.emplaceBack(t.X,t.X),this.tileExtentBuffer=e.createVertexBuffer(r,e0.members),this.tileExtentSegments=t.a0.simpleSegment(0,0,4,2);let n=new t.aX;n.emplaceBack(0,0),n.emplaceBack(t.X,0),n.emplaceBack(0,t.X),n.emplaceBack(t.X,t.X),this.debugBuffer=e.createVertexBuffer(n,e0.members),this.debugSegments=t.a0.simpleSegment(0,0,4,5);let i=new t.$;i.emplaceBack(0,0,0,0),i.emplaceBack(t.X,0,t.X,0),i.emplaceBack(0,t.X,0,t.X),i.emplaceBack(t.X,t.X,t.X,t.X),this.rasterBoundsBuffer=e.createVertexBuffer(i,K.members),this.rasterBoundsSegments=t.a0.simpleSegment(0,0,4,2);let a=new t.aX;a.emplaceBack(0,0),a.emplaceBack(1,0),a.emplaceBack(0,1),a.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(a,e0.members),this.viewportSegments=t.a0.simpleSegment(0,0,4,2);let o=new t.aZ;o.emplaceBack(0),o.emplaceBack(1),o.emplaceBack(3),o.emplaceBack(2),o.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(o);let s=new t.aY;s.emplaceBack(0,1,2),s.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(s);let l=this.context.gl;this.stencilClearMode=new ri({func:l.ALWAYS,mask:0},0,255,l.ZERO,l.ZERO,l.ZERO)}clearStencil(){let e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let n=t.H();t.aP(n,0,this.width,this.height,0,0,1),t.K(n,n,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(e,r.TRIANGLES,rn.disabled,this.stencilClearMode,rt.disabled,ra.disabled,ts(n),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,t){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t||!t.length)return;this.currentStencilSource=e.source;let r=this.context,n=r.gl;this.nextStencilID+t.length>256&&this.clearStencil(),r.setColorMode(rt.disabled),r.setDepthMode(rn.disabled);let i=this.useProgram("clippingMask");for(let e of(this._tileClippingMaskIDs={},t)){let t=this._tileClippingMaskIDs[e.key]=this.nextStencilID++,a=this.style.map.terrain&&this.style.map.terrain.getTerrainData(e);i.draw(r,n.TRIANGLES,rn.disabled,new ri({func:n.ALWAYS,mask:0},t,255,n.KEEP,n.KEEP,n.REPLACE),rt.disabled,ra.disabled,ts(e.posMatrix),a,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,t=this.context.gl;return new ri({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){let t=this.context.gl;return new ri({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}stencilConfigForOverlap(e){let t=this.context.gl,r=e.sort((e,t)=>t.overscaledZ-e.overscaledZ),n=r[r.length-1].overscaledZ,i=r[0].overscaledZ-n+1;if(i>1){this.currentStencilSource=void 0,this.nextStencilID+i>256&&this.clearStencil();let e={};for(let r=0;r=0;this.currentLayer--){let e=this.style._layers[u[this.currentLayer]],t=h[e.source],r=f[e.source];this._renderTileClippingMasks(e,r),this.renderLayer(this,t,e,r)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayere.source&&!e.isHidden(i)?[n.sourceCaches[e.source]]:[])).filter(e=>"vector"===e.getSource().type),o=r.filter(e=>"vector"!==e.getSource().type),s=t=>{(!e||e.getSource().maxzooms(e)),e||o.forEach(e=>s(e)),e);l&&function(e,r,n){for(let i=0;i ${n.overscaledZ}`),i=`${b} ${v}kB`,e.initDebugOverlayCanvas(),a=e.debugOverlayCanvas,o=e.context.gl,(s=e.debugOverlayCanvas.getContext("2d")).clearRect(0,0,a.width,a.height),s.shadowColor="white",s.shadowBlur=2,s.lineWidth=1.5,s.strokeStyle="white",s.textBaseline="top",s.font="bold 36px Open Sans, sans-serif",s.fillText(i,5,5),s.strokeText(i,5,5),e.debugOverlayTexture.update(a),e.debugOverlayTexture.bind(o.LINEAR,o.CLAMP_TO_EDGE),h.draw(l,c.TRIANGLES,f,d,rt.alphaBlended,ra.disabled,to(u,t.aM.transparent,x),null,m,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),h.draw(l,c.LINE_STRIP,f,d,p,ra.disabled,to(u,t.aM.red),g,m,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}(e,r,n[i])}(this,l,l.getVisibleCoordinates())}this.options.showPadding&&(s=this.transform.padding,rb(this,this.transform.height-(s.top||0),3,rm),rb(this,s.bottom||0,3,rg),r_(this,s.left||0,3,ry),r_(this,this.transform.width-(s.right||0),3,rv),l=this.transform.centerPoint,a=l.x,rw(this,a-1,(o=this.transform.height-l.y)-10,2,20,rx),rw(this,a-10,o-1,20,2,rx)),this.context.setDefault()}maybeDrawDepthAndCoords(e){if(!this.style||!this.style.map||!this.style.map.terrain)return;let r=this.terrainFacilitator.matrix,n=this.transform.modelViewProjectionMatrix,i=this.terrainFacilitator.dirty;i||(i=e?!t.a_(r,n):!t.a$(r,n)),i||(i=this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length>0),i&&(t.b0(r,n),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(e,r){let n=e.context,i=n.gl,a=rt.unblended,o=new rn(i.LEQUAL,rn.ReadWrite,[0,1]),s=r.getTerrainMesh(),l=r.sourceCache.getRenderableTiles(),c=e.useProgram("terrainDepth");for(let u of(n.bindFramebuffer.set(r.getFramebuffer("depth").framebuffer),n.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),n.clear({color:t.aM.transparent,depth:1}),l)){let t=r.getTerrainData(u.tileID),l={u_matrix:e.transform.calculatePosMatrix(u.tileID.toUnwrapped()),u_ele_delta:r.getMeshFrameDelta(e.transform.zoom)};c.draw(n,i.TRIANGLES,o,ri.disabled,a,ra.backCCW,l,t,"terrain",s.vertexBuffer,s.indexBuffer,s.segments)}n.bindFramebuffer.set(null),n.viewport.set([0,0,e.width,e.height])}(this,this.style.map.terrain),function(e,r){let n=e.context,i=n.gl,a=rt.unblended,o=new rn(i.LEQUAL,rn.ReadWrite,[0,1]),s=r.getTerrainMesh(),l=r.getCoordsTexture(),c=r.sourceCache.getRenderableTiles(),u=e.useProgram("terrainCoords");for(let h of(n.bindFramebuffer.set(r.getFramebuffer("coords").framebuffer),n.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),n.clear({color:t.aM.transparent,depth:1}),r.coordsIndex=[],c)){let t=r.getTerrainData(h.tileID);n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,l.texture);let c={u_matrix:e.transform.calculatePosMatrix(h.tileID.toUnwrapped()),u_terrain_coords_id:(255-r.coordsIndex.length)/255,u_texture:0,u_ele_delta:r.getMeshFrameDelta(e.transform.zoom)};u.draw(n,i.TRIANGLES,o,ri.disabled,a,ra.backCCW,c,t,"terrain",s.vertexBuffer,s.indexBuffer,s.segments),r.coordsIndex.push(h.tileID.key)}n.bindFramebuffer.set(null),n.viewport.set([0,0,e.width,e.height])}(this,this.style.map.terrain))}renderLayer(e,r,n,i){if(!n.isHidden(this.transform.zoom)&&("background"===n.type||"custom"===n.type||(i||[]).length))switch(this.id=n.id,n.type){case"symbol":!function(e,r,n,i,a){if("translucent"!==e.renderPass)return;let o=ri.disabled,s=e.colorModeForRenderPass();(n._unevaluatedLayout.hasValue("text-variable-anchor")||n._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(e,r,n,i,a,o,s,l,c){let u=r.transform,h=eq(),f="map"===a,d="map"===o;for(let a of e){let e=i.getTile(a),o=e.getBucket(n);if(!o||!o.text||!o.text.segments.get().length)continue;let p=t.ag(o.textSizeData,u.zoom),m=eI(e,1,r.transform.zoom),g=eg(a.posMatrix,d,f,r.transform,m),y="none"!==n.layout.get("icon-text-fit")&&o.hasIconData();if(p){let n=Math.pow(2,u.zoom-e.tileID.overscaledZ),i=r.style.map.terrain?(e,t)=>r.style.map.terrain.getElevation(a,e,t):null,m=h.translatePosition(u,e,s,l);!function(e,r,n,i,a,o,s,l,c,u,h,f,d,p){let m=e.text.placedSymbolArray,g=e.text.dynamicLayoutVertexArray,y=e.icon.dynamicLayoutVertexArray,v={};g.clear();for(let y=0;y=0&&(v[x.associatedIconIndex]={shiftedAnchor:L,angle:I})}else eE(x.numGlyphs,g)}if(u){y.clear();let r=e.icon.placedSymbolArray;for(let e=0;ee.sortKey-t.sortKey),p)){let{programConfiguration:r,program:i,layoutVertexBuffer:a,indexBuffer:o,uniformValues:s,terrainData:l}=t.state;i.draw(c,u.TRIANGLES,h,f,d,ra.disabled,s,l,n.id,a,o,t.segments,n.paint,e.transform.zoom,r)}}(e,r,n,i);break;case"heatmap":!function(e,r,n,i){if(0===n.paint.get("heatmap-opacity"))return;let a=e.context;if(e.style.map.terrain){for(let a of i){let i=r.getTile(a);r.hasRenderableParent(a)||("offscreen"===e.renderPass?function(e,r,n,i){let a=e.context,o=a.gl,s=ri.disabled,l=new rt([o.ONE,o.ONE],t.aM.transparent,[!0,!0,!0,!0]),c=r.getBucket(n);if(!c)return;let u=i.key,h=n.heatmapFbos.get(u);h||(h=ru(a,r.tileSize,r.tileSize),n.heatmapFbos.set(u,h)),a.bindFramebuffer.set(h.framebuffer),a.viewport.set([0,0,r.tileSize,r.tileSize]),a.clear({color:t.aM.transparent});let f=c.programConfigurations.get(n.id),d=e.useProgram("heatmap",f),p=e.style.map.terrain.getTerrainData(i);d.draw(a,o.TRIANGLES,rn.disabled,s,l,ra.disabled,tl(i.posMatrix,r,e.transform.zoom,n.paint.get("heatmap-intensity")),p,n.id,c.layoutVertexBuffer,c.indexBuffer,c.segments,n.paint,e.transform.zoom,f)}(e,i,n,a):"translucent"===e.renderPass&&function(e,t,r){let n=e.context,i=n.gl;n.setColorMode(e.colorModeForRenderPass());let a=rh(n,t),o=r.key,s=t.heatmapFbos.get(o);s&&(n.activeTexture.set(i.TEXTURE0),i.bindTexture(i.TEXTURE_2D,s.colorAttachment.get()),n.activeTexture.set(i.TEXTURE1),a.bind(i.LINEAR,i.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(n,i.TRIANGLES,rn.disabled,ri.disabled,e.colorModeForRenderPass(),ra.disabled,tc(e,t,0,1),null,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,e.transform.zoom),s.destroy(),t.heatmapFbos.delete(o))}(e,n,a))}a.viewport.set([0,0,e.width,e.height])}else{let a,o,s;"offscreen"===e.renderPass?function(e,r,n,i){let a,o,s=e.context,l=s.gl,c=ri.disabled,u=new rt([l.ONE,l.ONE],t.aM.transparent,[!0,!0,!0,!0]);a=s.gl,s.activeTexture.set(a.TEXTURE1),s.viewport.set([0,0,e.width/4,e.height/4]),(o=n.heatmapFbos.get(t.aU))?(a.bindTexture(a.TEXTURE_2D,o.colorAttachment.get()),s.bindFramebuffer.set(o.framebuffer)):(o=ru(s,e.width/4,e.height/4),n.heatmapFbos.set(t.aU,o)),s.clear({color:t.aM.transparent});for(let t=0;t0){let i=c.now(),o=(i-e.timeAdded)/s,l=r?(i-r.timeAdded)/s:-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),d=f&&e.refreshedUponExpiration?1:t.ac(f?o:1-l,0,1);return e.refreshedUponExpiration&&o>=1&&(e.refreshedUponExpiration=!1),r?{opacity:1,mix:1-d}:{opacity:d,mix:0}}return{opacity:1,mix:0}}(m,g||y||null,r,n,e.transform,e.style.map.terrain),x,b,_="nearest"===n.paint.get("raster-resampling")?o.NEAREST:o.LINEAR;a.activeTexture.set(o.TEXTURE0),m.texture.bind(_,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),a.activeTexture.set(o.TEXTURE1),g?(g.texture.bind(_,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),x=Math.pow(2,g.tileID.overscaledZ-m.tileID.overscaledZ),b=[m.tileID.canonical.x*x%1,m.tileID.canonical.y*x%1]):m.texture.bind(_,o.CLAMP_TO_EDGE,o.LINEAR_MIPMAP_NEAREST),m.texture.useMipmap&&a.extTextureFilterAnisotropic&&e.transform.pitch>20&&o.texParameterf(o.TEXTURE_2D,a.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,a.extTextureFilterAnisotropicMax);let w=e.style.map.terrain&&e.style.map.terrain.getTerrainData(i),k=w?i:null,T=tg(k?k.posMatrix:e.transform.calculatePosMatrix(i.toUnwrapped(),p),b||[0,0],x||1,v,n);s instanceof J?l.draw(a,o.TRIANGLES,f,ri.disabled,u,ra.disabled,T,w,n.id,s.boundsBuffer,e.quadTriangleIndexBuffer,s.boundsSegments):l.draw(a,o.TRIANGLES,f,h[i.overscaledZ],u,ra.disabled,T,w,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments)}}(e,r,n,i);break;case"background":!function(e,t,r){let n=t.paint.get("background-color"),i=t.paint.get("background-opacity");if(0===i)return;let a=e.context,o=a.gl,s=e.transform,l=s.tileSize,c=t.paint.get("background-pattern");if(e.isPatternMissing(c))return;let u=!c&&1===n.a&&1===i&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass!==u)return;let h=ri.disabled,f=e.depthModeForSublayer(0,"opaque"===u?rn.ReadWrite:rn.ReadOnly),d=e.colorModeForRenderPass(),p=e.useProgram(c?"backgroundPattern":"background"),m=r||s.coveringTiles({tileSize:l,terrain:e.style.map.terrain});c&&(a.activeTexture.set(o.TEXTURE0),e.imageManager.bind(e.context));let g=t.getCrossfadeParameters();for(let s of m){let u=r?s.posMatrix:e.transform.calculatePosMatrix(s.toUnwrapped()),m=c?t_(u,i,e,c,{tileID:s,tileSize:l},g):tb(u,i,n),y=e.style.map.terrain&&e.style.map.terrain.getTerrainData(s);p.draw(a,o.TRIANGLES,f,h,d,ra.disabled,m,y,t.id,e.tileExtentBuffer,e.quadTriangleIndexBuffer,e.tileExtentSegments)}}(e,n,i);break;case"custom":let o=e.context,s=n.implementation;if("offscreen"===e.renderPass){let t=s.prerender;t&&(e.setCustomLayerDefaults(),o.setColorMode(e.colorModeForRenderPass()),t.call(s,o.gl,e.transform.customLayerMatrix()),o.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),o.setColorMode(e.colorModeForRenderPass()),o.setStencilMode(ri.disabled);let t="3d"===s.renderingMode?new rn(e.context.gl.LEQUAL,rn.ReadWrite,e.depthRangeFor3D):e.depthModeForSublayer(0,rn.ReadOnly);o.setDepthMode(t),s.render(o.gl,e.transform.customLayerMatrix(),{farZ:e.transform.farZ,nearZ:e.transform.nearZ,fov:e.transform._fov,modelViewProjectionMatrix:e.transform.modelViewProjectionMatrix,projectionMatrix:e.transform.projectionMatrix}),o.setDirty(),e.setBaseState(),o.bindFramebuffer.set(null)}}}translatePosMatrix(e,r,n,i,a){if(!n[0]&&!n[1])return e;let o=a?"map"===i?this.transform.angle:0:"viewport"===i?-this.transform.angle:0;if(o){let e=Math.sin(o),t=Math.cos(o);n=[n[0]*t-n[1]*e,n[0]*e+n[1]*t]}let s=[a?n[0]:eI(r,n[0],this.transform.zoom),a?n[1]:eI(r,n[1],this.transform.zoom),0],l=new Float32Array(16);return t.J(l,e,s),l}saveTileTexture(e){let t=this._tileTextures[e.size[0]];t?t.push(e):this._tileTextures[e.size[0]]=[e]}getTileTexture(e){let t=this._tileTextures[e];return t&&t.length>0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r}useProgram(e,t){this.cache=this.cache||{};let r=e+(t?t.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[r]||(this.cache[r]=new e6(this.context,e1[e],t,tw[e],this._showOverdrawInspector,this.style.map.terrain)),this.cache[r]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new A(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}class rM{constructor(e,t){this.points=e,this.planes=t}static fromInvProjectionMatrix(e,r,n){let i=Math.pow(2,n),a=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(n=>{let a=1/(n=t.af([],n,e))[3]/r*i;return t.b1(n,n,[a,a,1/n[3],a])}),o=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(e=>{var t,r,n,i,o,s,l,c,u,h,f,d,p,m,g,y;let v=(f=[],p=(r=[],n=_([],a[e[0]],a[e[1]]),i=_([],a[e[2]],a[e[1]]),o=n[0],s=n[1],l=n[2],c=i[0],u=i[1],h=i[2],r[0]=s*h-l*u,r[1]=l*c-o*h,r[2]=o*u-s*c,d=r)[0],(y=p*p+(m=d[1])*m+(g=d[2])*g)>0&&(y=1/Math.sqrt(y)),f[0]=d[0]*y,f[1]=d[1]*y,f[2]=d[2]*y,f),x=-(v[0]*(t=a[e[1]])[0]+v[1]*t[1]+v[2]*t[2]);return v.concat(x)});return new rM(a,o)}}class rS{constructor(e,t){this.min=e,this.max=t,this.center=function(e,t){return e[0]=.5*t[0],e[1]=.5*t[1],e[2]=.5*t[2],e}([],function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}([],this.min,this.max))}quadrant(e){let t=[e%2==0,e<2],r=v(this.min),n=v(this.max);for(let e=0;e=0&&o++;if(0===o)return 0;o!==r.length&&(n=!1)}if(n)return 2;for(let t=0;t<3;t++){let r=Number.MAX_VALUE,n=-Number.MAX_VALUE;for(let i=0;ithis.max[t]-this.min[t])return 0}return 1}}class rE{constructor(e=0,t=0,r=0,n=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(n)||n<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=n}interpolate(e,r,n){return null!=r.top&&null!=e.top&&(this.top=t.y.number(e.top,r.top,n)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.y.number(e.bottom,r.bottom,n)),null!=r.left&&null!=e.left&&(this.left=t.y.number(e.left,r.left,n)),null!=r.right&&null!=e.right&&(this.right=t.y.number(e.right,r.right,n)),this}getCenter(e,r){let n=t.ac((this.left+e-this.right)/2,0,e),i=t.ac((this.top+r-this.bottom)/2,0,r);return new t.P(n,i)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new rE(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}class rC{constructor(e,r,n,i,a){this.tileSize=512,this._renderWorldCopies=void 0===a||!!a,this._minZoom=e||0,this._maxZoom=r||22,this._minPitch=n??0,this._maxPitch=i??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new t.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new rE,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let e=new rC(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return e.apply(this),e}apply(e){this.tileSize=e.tileSize,this.latRange=e.latRange,this.lngRange=e.lngRange,this.width=e.width,this.height=e.height,this._center=e._center,this._elevation=e._elevation,this.minElevationForCurrentTile=e.minElevationForCurrentTile,this.zoom=e.zoom,this.angle=e.angle,this._fov=e._fov,this._pitch=e._pitch,this._unmodified=e._unmodified,this._edgeInsets=e._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(e){this._minZoom!==e&&(this._minZoom=e,this.zoom=Math.max(this.zoom,e))}get maxZoom(){return this._maxZoom}set maxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.zoom=Math.min(this.zoom,e))}get minPitch(){return this._minPitch}set minPitch(e){this._minPitch!==e&&(this._minPitch=e,this.pitch=Math.max(this.pitch,e))}get maxPitch(){return this._maxPitch}set maxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.pitch=Math.min(this.pitch,e))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(e){var r,n,i,a,o,s,l,c,u,h;let f=-t.b3(e,-180,180)*Math.PI/180;this.angle!==f&&(this._unmodified=!1,this.angle=f,this._calcMatrices(),this.rotationMatrix=(r=new t.A(4),t.A!=Float32Array&&(r[1]=0,r[2]=0),r[0]=1,r[3]=1,r),n=this.rotationMatrix,i=this.rotationMatrix,a=this.angle,o=i[0],s=i[1],l=i[2],c=i[3],u=Math.sin(a),h=Math.cos(a),n[0]=o*h+l*u,n[1]=s*h+c*u,n[2]=-(o*u)+l*h,n[3]=-(s*u)+c*h)}get pitch(){return this._pitch/Math.PI*180}set pitch(e){let r=t.ac(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==r&&(this._unmodified=!1,this._pitch=r,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(e){e=Math.max(.01,Math.min(60,e)),this._fov!==e&&(this._unmodified=!1,this._fov=e/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(e){let t=Math.min(Math.max(e,this.minZoom),this.maxZoom);this._zoom!==t&&(this._unmodified=!1,this._zoom=t,this.tileZoom=Math.max(0,Math.floor(t)),this.scale=this.zoomScale(t),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(e){e!==this._elevation&&(this._elevation=e,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this._constrain(),this._calcMatrices()}coveringZoomLevel(e){return Math.max(0,(e.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/e.tileSize)))}getVisibleUnwrappedCoordinates(e){let r=[new t.b4(0,e)];if(this._renderWorldCopies){let n=this.pointCoordinate(new t.P(0,0)),i=this.pointCoordinate(new t.P(this.width,0)),a=this.pointCoordinate(new t.P(this.width,this.height)),o=this.pointCoordinate(new t.P(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));for(let n=s-1;n<=l+1;n++)0!==n&&r.push(new t.b4(n,e))}return r}coveringTiles(e){var r,n;let i=this.coveringZoomLevel(e),a=i;if(void 0!==e.minzoom&&ie.maxzoom&&(i=e.maxzoom);let o=this.pointCoordinate(this.getCameraPoint()),s=t.Z.fromLngLat(this.center),l=Math.pow(2,i),c=[l*o.x,l*o.y,0],u=[l*s.x,l*s.y,0],h=rM.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,i),f=e.minzoom||0;!e.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(f=i);let d=e.terrain?2/Math.min(this.tileSize,e.tileSize)*this.tileSize:3,p=e=>({aabb:new rS([e*l,0,0],[(e+1)*l,l,0]),zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),m=[],g=[],y=i,v=e.reparseOverscaled?a:i;if(this._renderWorldCopies)for(let e=1;e<=3;e++)m.push(p(-e)),m.push(p(e));for(m.push(p(0));m.length>0;){let i=m.pop(),a=i.x,o=i.y,s=i.fullyVisible;if(!s){let e=i.aabb.intersects(h);if(0===e)continue;s=2===e}let l=e.terrain?c:u,p=Math.max(Math.abs(i.aabb.distanceX(l)),Math.abs(i.aabb.distanceY(l)));if(i.zoom===y||p>d+(1<=f){let e=y-i.zoom,r=c[0]-.5-(a<>1),h=i.zoom+1,f=i.aabb.quadrant(l);if(e.terrain){let a=new t.S(h,i.wrap,h,c,u),o=e.terrain.getMinMaxElevation(a),s=null!=(r=o.minElevation)?r:this.elevation,l=null!=(n=o.maxElevation)?n:this.elevation;f=new rS([f.min[0],f.min[1],s],[f.max[0],f.max[1],l])}m.push({aabb:f,zoom:h,x:c,y:u,wrap:i.wrap,fullyVisible:s})}}return g.sort((e,t)=>e.distanceSq-t.distanceSq).map(e=>e.tileID)}resize(e,t){this.width=e,this.height=t,this.pixelsToGLUnits=[2/e,-2/t],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(e){return Math.pow(2,e)}scaleZoom(e){return Math.log(e)/Math.LN2}project(e){let r=t.ac(e.lat,-85.051129,85.051129);return new t.P(t.O(e.lng)*this.worldSize,t.Q(r)*this.worldSize)}unproject(e){return new t.Z(e.x/this.worldSize,e.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(e){let r=this.elevation,n=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,i=this.pointLocation(this.centerPoint,e),a=e.getElevationForLngLatZoom(i,this.tileZoom);if(!(this.elevation-a))return;let o=Math.cos(this._pitch)*this.cameraToCenterDistance/(n+r-a)/t.b5(1,i.lat),s=this.scaleZoom(o/this.tileSize);this._elevation=a,this._center=i,this.zoom=s}setLocationAtPoint(e,r){let n=this.pointCoordinate(r),i=this.pointCoordinate(this.centerPoint),a=this.locationCoordinate(e),o=new t.Z(a.x-(n.x-i.x),a.y-(n.y-i.y));this.center=this.coordinateLocation(o),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(e,t){return t?this.coordinatePoint(this.locationCoordinate(e),t.getElevationForLngLatZoom(e,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(e))}pointLocation(e,t){return this.coordinateLocation(this.pointCoordinate(e,t))}locationCoordinate(e){return t.Z.fromLngLat(e)}coordinateLocation(e){return e&&e.toLngLat()}pointCoordinate(e,r){if(r){let t=r.pointCoordinate(e);if(null!=t)return t}let n=[e.x,e.y,0,1],i=[e.x,e.y,1,1];t.af(n,n,this.pixelMatrixInverse),t.af(i,i,this.pixelMatrixInverse);let a=n[3],o=i[3],s=n[1]/a,l=i[1]/o,c=n[2]/a,u=i[2]/o,h=c===u?0:(0-c)/(u-c);return new t.Z(t.y.number(n[0]/a,i[0]/o,h)/this.worldSize,t.y.number(s,l,h)/this.worldSize)}coordinatePoint(e,r=0,n=this.pixelMatrix){let i=[e.x*this.worldSize,e.y*this.worldSize,r,1];return t.af(i,i,n),new t.P(i[0]/i[3],i[1]/i[3])}getBounds(){let e=Math.max(0,this.height/2-this.getHorizon());return new G().extend(this.pointLocation(new t.P(0,e))).extend(this.pointLocation(new t.P(this.width,e))).extend(this.pointLocation(new t.P(this.width,this.height))).extend(this.pointLocation(new t.P(0,this.height)))}getMaxBounds(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new G([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(e){e?(this.lngRange=[e.getWest(),e.getEast()],this.latRange=[e.getSouth(),e.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,85.051129])}calculateTileMatrix(e){let r=e.canonical,n=this.worldSize/this.zoomScale(r.z),i=r.x+Math.pow(2,r.z)*e.wrap,a=t.an(new Float64Array(16));return t.J(a,a,[i*n,r.y*n,0]),t.K(a,a,[n/t.X,n/t.X,1]),a}calculatePosMatrix(e,r=!1){let n=e.key,i=r?this._alignedPosMatrixCache:this._posMatrixCache;if(i[n])return i[n];let a=this.calculateTileMatrix(e);return t.L(a,r?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,a),i[n]=new Float32Array(a),i[n]}calculateFogMatrix(e){let r=e.key,n=this._fogMatrixCache;if(n[r])return n[r];let i=this.calculateTileMatrix(e);return t.L(i,this.fogMatrix,i),n[r]=new Float32Array(i),n[r]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(e,r){r=t.ac(+r,this.minZoom,this.maxZoom);let n={center:new t.N(e.lng,e.lat),zoom:r},i=this.lngRange;this._renderWorldCopies||null!==i||(i=[-179.9999999999,179.9999999999]);let a=this.tileSize*this.zoomScale(n.zoom),o=0,s=a,l=0,c=a,u=0,h=0,{x:f,y:d}=this.size;if(this.latRange){let e=this.latRange;o=t.Q(e[1])*a,(s=t.Q(e[0])*a)-os&&(y=s-e)}if(i){let e=(l+c)/2,r=p;this._renderWorldCopies&&(r=t.b3(p,e-a/2,e+a/2));let n=f/2;r-nc&&(g=c-n)}if(void 0!==g||void 0!==y){let e=new t.P(g??p,y??m);n.center=this.unproject.call({worldSize:a},e).wrap()}return n}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:r}=this.getConstrained(this.center,this.zoom);this.center=t,this.zoom=r,this._unmodified=e,this._constraining=!1}_calcMatrices(){if(!this.height)return;let e=this.centerOffset,r=this.point.x,n=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=t.b5(1,this.center.lat)*this.worldSize;let i=t.an(new Float64Array(16));t.K(i,i,[this.width/2,-this.height/2,1]),t.J(i,i,[1,-1,0]),this.labelPlaneMatrix=i,i=t.an(new Float64Array(16)),t.K(i,i,[1,-1,1]),t.J(i,i,[-1,-1,0]),t.K(i,i,[2/this.width,2/this.height,1]),this.glCoordMatrix=i;let a=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),o=Math.min(this.elevation,this.minElevationForCurrentTile),s=a-o*this._pixelPerMeter/Math.cos(this._pitch),l=o<0?s:a,c=Math.PI/2+this._pitch,u=this._fov*(.5+e.y/this.height),h=Math.sin(u)*l/Math.sin(t.ac(Math.PI-c-u,.01,Math.PI-.01)),f=this.getHorizon(),d=2*Math.atan(f/this.cameraToCenterDistance)*(.5+e.y/(2*f)),p=Math.min(h,Math.sin(d)*l/Math.sin(t.ac(Math.PI-c-d,.01,Math.PI-.01)));this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*p+l),this.nearZ=this.height/50,i=new Float64Array(16),t.b6(i,this._fov,this.width/this.height,this.nearZ,this.farZ),i[8]=-(2*e.x)/this.width,i[9]=2*e.y/this.height,this.projectionMatrix=t.ae(i),t.K(i,i,[1,-1,1]),t.J(i,i,[0,0,-this.cameraToCenterDistance]),t.b7(i,i,this._pitch),t.ad(i,i,this.angle),t.J(i,i,[-r,-n,0]),this.mercatorMatrix=t.K([],i,[this.worldSize,this.worldSize,this.worldSize]),t.K(i,i,[1,1,this._pixelPerMeter]),this.pixelMatrix=t.L(new Float64Array(16),this.labelPlaneMatrix,i),t.J(i,i,[0,0,-this.elevation]),this.modelViewProjectionMatrix=i,this.invModelViewProjectionMatrix=t.as([],i),this.fogMatrix=new Float64Array(16),t.b6(this.fogMatrix,this._fov,this.width/this.height,a,this.farZ),this.fogMatrix[8]=-(2*e.x)/this.width,this.fogMatrix[9]=2*e.y/this.height,t.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),t.b7(this.fogMatrix,this.fogMatrix,this._pitch),t.ad(this.fogMatrix,this.fogMatrix,this.angle),t.J(this.fogMatrix,this.fogMatrix,[-r,-n,0]),t.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),t.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=t.L(new Float64Array(16),this.labelPlaneMatrix,i);let m=this.width%2/2,g=this.height%2/2,y=Math.cos(this.angle),v=Math.sin(this.angle),x=r-Math.round(r)+y*m+v*g,b=n-Math.round(n)+y*g+v*m,_=new Float64Array(i);if(t.J(_,_,[x>.5?x-1:x,b>.5?b-1:b,0]),this.alignedModelViewProjectionMatrix=_,!(i=t.as(new Float64Array(16),this.pixelMatrix)))throw Error("failed to invert matrix");this.pixelMatrixInverse=i,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let e=this.pointCoordinate(new t.P(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.af(r,r,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let e=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(0,e))}getCameraQueryGeometry(e){let r=this.getCameraPoint();if(1===e.length)return[e[0],r];{let n=r.x,i=r.y,a=r.x,o=r.y;for(let t of e)n=Math.min(n,t.x),i=Math.min(i,t.y),a=Math.max(a,t.x),o=Math.max(o,t.y);return[new t.P(n,i),new t.P(a,i),new t.P(a,o),new t.P(n,o),new t.P(n,i)]}}lngLatToCameraDepth(e,r){let n=this.locationCoordinate(e),i=[n.x*this.worldSize,n.y*this.worldSize,r,1];return t.af(i,i,this.modelViewProjectionMatrix),i[2]/i[3]}}function rL(e,t){let r,n=!1,i=null,a=null,o=()=>{i=null,n&&(e.apply(a,r),i=setTimeout(o,t),n=!1)};return(...e)=>(n=!0,a=this,r=e,i||o(),i)}class rI{constructor(e){this._getCurrentHash=()=>{let e=window.location.hash.replace("#","");if(this._hashName){let t;return e.split("&").map(e=>e.split("=")).forEach(e=>{e[0]===this._hashName&&(t=e)}),(t&&t[1]||"").split("/")}return e.split("/")},this._onHashChange=()=>{let e=this._getCurrentHash();if(e.length>=3&&!e.some(e=>isNaN(e))){let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let e=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,e)},this._removeHash=()=>{let e=this._getCurrentHash();if(0===e.length)return;let t=e.join("/"),r=t;r.split("&").length>0&&(r=r.split("&")[0]),this._hashName&&(r=`${this._hashName}=${t}`);let n=window.location.hash.replace(r,"");n.startsWith("#&")?n=n.slice(0,1)+n.slice(2):"#"===n&&(n="");let i=window.location.href.replace(/(#.+)?$/,n);i=i.replace("&&","&"),window.history.replaceState(window.history.state,null,i)},this._updateHash=rL(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){let t=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,n=Math.pow(10,Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10)),i=Math.round(t.lng*n)/n,a=Math.round(t.lat*n)/n,o=this._map.getBearing(),s=this._map.getPitch(),l="";if(l+=e?`/${i}/${a}/${r}`:`${r}/${a}/${i}`,(o||s)&&(l+="/"+Math.round(10*o)/10),s&&(l+=`/${Math.round(s)}`),this._hashName){let e=this._hashName,t=!1,r=window.location.hash.slice(1).split("&").map(r=>{let n=r.split("=")[0];return n===e?(t=!0,`${n}=${l}`):r}).filter(e=>e);return t||r.push(`${e}=${l}`),`#${r.join("&")}`}return`#${l}`}}let rP={linearity:.3,easing:t.b8(0,0,.3,1)},rz=t.e({deceleration:2500,maxSpeed:1400},rP),rO=t.e({deceleration:20,maxSpeed:1400},rP),rD=t.e({deceleration:1e3,maxSpeed:360},rP),rR=t.e({deceleration:1e3,maxSpeed:90},rP);class rj{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:c.now(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=c.now();for(;e.length>0&&t-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let r={zoom:0,bearing:0,pitch:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:e}of this._inertiaBuffer)r.zoom+=e.zoomDelta||0,r.bearing+=e.bearingDelta||0,r.pitch+=e.pitchDelta||0,e.panDelta&&r.pan._add(e.panDelta),e.around&&(r.around=e.around),e.pinchAround&&(r.pinchAround=e.pinchAround);let n=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,i={};if(r.pan.mag()){let a=rB(r.pan.mag(),n,t.e({},rz,e||{}));i.offset=r.pan.mult(a.amount/r.pan.mag()),i.center=this._map.transform.center,rF(i,a)}if(r.zoom){let e=rB(r.zoom,n,rO);i.zoom=this._map.transform.zoom+e.amount,rF(i,e)}if(r.bearing){let e=rB(r.bearing,n,rD);i.bearing=this._map.transform.bearing+t.ac(e.amount,-179,179),rF(i,e)}if(r.pitch){let e=rB(r.pitch,n,rR);i.pitch=this._map.transform.pitch+e.amount,rF(i,e)}if(i.zoom||i.bearing){let e=void 0===r.pinchAround?r.around:r.pinchAround;i.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),t.e(i,{noMoveStart:!0})}}function rF(e,t){(!e.duration||e.durationr.unproject(e)),s=a.reduce((e,t,r,n)=>e.add(t.div(n.length)),new t.P(0,0));super(e,{points:a,point:s,lngLats:o,lngLat:r.unproject(s),originalEvent:n}),this._defaultPrevented=!1}}class rV extends t.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){super(e,{originalEvent:r}),this._defaultPrevented=!1}}class rq{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new rV(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new rN(e.type,this._map,e))}mouseup(e){this._map.fire(new rN(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new rN(e.type,this._map,e))}dblclick(e){return this._firePreventable(new rN(e.type,this._map,e))}mouseover(e){this._map.fire(new rN(e.type,this._map,e))}mouseout(e){this._map.fire(new rN(e.type,this._map,e))}touchstart(e){return this._firePreventable(new rU(e.type,this._map,e))}touchmove(e){this._map.fire(new rU(e.type,this._map,e))}touchend(e){this._map.fire(new rU(e.type,this._map,e))}touchcancel(e){this._map.fire(new rU(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class rH{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new rN(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new rN("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new rN(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class rG{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.pointLocation(t.P.convert(e),this._map.terrain)}}class rW{constructor(e,t){this._map=e,this._tr=new rG(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(u.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active||this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)e.fitScreenCoordinates(n,r,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(u.remove(this._box),this._box=null),u.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new t.k(e,{originalEvent:r}))}}function rY(e,t){if(e.length!==t.length)throw Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);let r={};for(let n=0;nthis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),n.length===this.numTouches&&(this.centroid=function(e){let r=new t.P(0,0);for(let t of e)r._add(t);return r.div(e.length)}(r),this.touches=rY(n,r)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;let n=rY(r,t);for(let e in this.touches){let t=n[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){let e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class rZ{constructor(e){this.singleTap=new rX(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){let n=this.singleTap.touchend(e,t,r);if(n){let t=e.timeStamp-this.lastTime<500,r=!this.lastTap||30>this.lastTap.dist(n);if(t&&r||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=n,this.count===this.numTaps)return this.reset(),n}}}class r${constructor(e){this._tr=new rG(e),this._zoomIn=new rZ({numTouches:1,numTaps:2}),this._zoomOut=new rZ({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,t,r){let n=this._zoomIn.touchend(e,t,r),i=this._zoomOut.touchend(e,t,r),a=this._tr;return n?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:a.zoom+1,around:a.unproject(n)},{originalEvent:e})}):i?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:t=>t.easeTo({duration:300,zoom:a.zoom-1,around:a.unproject(i)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class rK{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=t.length?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let r=this._lastPoint;if(!r)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let n=t.length?t[0]:t;return!this._moved&&n.dist(r){e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=e=>{e.preventDefault()}},r2=({enable:e,clickTolerance:t,bearingDegreesPerPixelMoved:r=.8})=>new rK({clickTolerance:t,move:(e,t)=>({bearingDelta:(t.x-e.x)*r}),moveStateManager:new rQ({checkCorrectEvent:e=>0===u.mouseButton(e)&&e.ctrlKey||2===u.mouseButton(e)}),enable:e,assignEvents:r1}),r3=({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:r=-.5})=>new rK({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:new rQ({checkCorrectEvent:e=>0===u.mouseButton(e)&&e.ctrlKey||2===u.mouseButton(e)}),enable:e,assignEvents:r1});class r5{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,r){return this._calculateTransform(e,t,r)}touchmove(e,t,r){if(this._active){if(!this._shouldBePrevented(r.length))return e.preventDefault(),this._calculateTransform(e,t,r);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,t,r){this._calculateTransform(e,t,r),this._active&&this._shouldBePrevented(r.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,n){n.length>0&&(this._active=!0);let i=rY(n,r),a=new t.P(0,0),o=new t.P(0,0),s=0;for(let e in i){let t=i[e],r=this._touches[e];r&&(a._add(t),o._add(t.sub(r)),s++,i[e]=t)}if(this._touches=i,this._shouldBePrevented(s)||!o.mag())return;let l=o.div(s);return this._sum._add(l),this._sum.mag()Math.abs(r8(this._distance,this._startDistance))))return this._active=!0,{zoomDelta:r8(this._distance,r),pinchAround:t}}}function r7(e,t){return 180*e.angleWith(t)/Math.PI}class ne extends r4{reset(){super.reset(),delete this._minDiameter,delete this._startVector,delete this._vector}_start(e){this._startVector=this._vector=e[0].sub(e[1]),this._minDiameter=e[0].dist(e[1])}_move(e,t,r){let n=this._vector;if(this._vector=e[0].sub(e[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:r7(this._vector,n),pinchAround:t}}_isBelowThreshold(e){this._minDiameter=Math.min(this._minDiameter,e.mag());let t=25/(Math.PI*this._minDiameter)*360;return Math.abs(r7(e,this._startVector))Math.abs(e.x)}class nr extends r4{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,r){super.touchstart(e,t,r),this._currentTouchCount=r.length}_start(e){this._lastPoints=e,nt(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,r){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let n=e[0].sub(this._lastPoints[0]),i=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(n,i,r.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:-((n.y+i.y)/2*.5)}):void 0}gestureBeginsVertically(e,t,r){if(void 0!==this._valid)return this._valid;let n=e.mag()>=2,i=t.mag()>=2;if(!n&&!i)return;if(!n||!i)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;let a=e.y>0==t.y>0;return nt(e)&&nt(t)&&a}}let nn=100,ni=15,na=10;class no{constructor(e){this._tr=new rG(e),this._panStep=nn,this._bearingStep=ni,this._pitchStep=na,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let t=0,r=0,n=0,i=0,a=0;switch(e.keyCode){case 61:case 107:case 171:case 187:t=1;break;case 189:case 109:case 173:t=-1;break;case 37:e.shiftKey?r=-1:(e.preventDefault(),i=-1);break;case 39:e.shiftKey?r=1:(e.preventDefault(),i=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),a=-1);break;case 40:e.shiftKey?n=-1:(e.preventDefault(),a=1);break;default:return}return this._rotationDisabled&&(r=0,n=0),{cameraAnimation:o=>{let s=this._tr;o.easeTo({duration:300,easeId:"keyboardHandler",easing:ns,zoom:t?Math.round(s.zoom)+t*(e.shiftKey?2:1):s.zoom,bearing:s.bearing+r*this._bearingStep,pitch:s.pitch+n*this._pitchStep,offset:[-i*this._panStep,-a*this._panStep],center:s.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function ns(e){return e*(2-e)}class nl{constructor(e,t){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},this._map=e,this._tr=new rG(e),this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=c.now(),n=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==t&&t%4.000244140625==0?this._type="wheel":0!==t&&4>Math.abs(t)?this._type="trackpad":n>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=200>Math.abs(n*t)?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let r=u.mousePos(this._map.getCanvas(),e),n=this._tr;this._around=r.y>n.transform.height/2-n.transform.getHorizon()?t.N.convert(this._aroundCenter?n.center:n.unproject(r)):t.N.convert(n.center),this._aroundPoint=n.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let e=this._tr.transform;if(0!==this._delta){let t="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,r=2/(1+Math.exp(-Math.abs(this._delta*t)));this._delta<0&&0!==r&&(r=1/r);let n="number"==typeof this._targetZoom?e.zoomScale(this._targetZoom):e.scale;this._targetZoom=Math.min(e.maxZoom,Math.max(e.minZoom,e.scaleZoom(n*r))),"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let r="number"==typeof this._targetZoom?this._targetZoom:e.zoom,n=this._startZoom,i=this._easing,a,o=!1,s=c.now()-this._lastWheelEventTime;if("wheel"===this._type&&n&&i&&s){let e=Math.min(s/200,1),l=i(e);a=t.y.number(n,r,l),e<1?this._frameId||(this._frameId=!0):o=!0}else a=r,o=!0;return this._active=!0,o&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!o,zoomDelta:a-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=t.b9;if(this._prevEase){let e=this._prevEase,n=(c.now()-e.start)/e.duration,i=e.easing(n+.01)-e.easing(n),a=.27/Math.sqrt(i*i+1e-4)*.01,o=Math.sqrt(.0729-a*a);r=t.b8(a,o,.25,1)}return this._prevEase={start:c.now(),duration:e,easing:r},r}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class nc{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class nu{constructor(e){this._tr=new rG(e),this.reset()}reset(){this._active=!1}dblclick(e,t){return e.preventDefault(),{cameraAnimation:r=>{r.easeTo({duration:300,zoom:this._tr.zoom+(e.shiftKey?-1:1),around:this._tr.unproject(t)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nh{constructor(){this._tap=new rZ({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,t,r){if(!this._swipePoint)if(this._tapTime){let n=t[0],i=e.timeStamp-this._tapTime<500,a=30>this._tapPoint.dist(n);i&&a?r.length>0&&(this._swipePoint=n,this._swipeTouch=r[0].identifier):this.reset()}else this._tap.touchstart(e,t,r)}touchmove(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;let n=t[0],i=n.y-this._swipePoint.y;return this._swipePoint=n,e.preventDefault(),this._active=!0,{zoomDelta:i/128}}}else this._tap.touchmove(e,t,r)}touchend(e,t,r){if(this._tapTime)this._swipePoint&&0===r.length&&this.reset();else{let n=this._tap.touchend(e,t,r);n&&(this._tapTime=e.timeStamp,this._tapPoint=n)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nf{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class nd{constructor(e,t,r){this._pitchWithRotate=e.pitchWithRotate,this._mouseRotate=t,this._mousePitch=r}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class np{constructor(e,t,r,n){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=n,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class nm{constructor(e,t){this._bypassKey=-1!==navigator.userAgent.indexOf("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=u.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let r=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),n=document.createElement("div");n.className="maplibregl-desktop-message",n.textContent=t,this._container.appendChild(n);let i=document.createElement("div");i.className="maplibregl-mobile-message",i.textContent=r,this._container.appendChild(i),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(u.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,r){this._enabled&&(this._map.fire(new t.k("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let ng=e=>e.zoom||e.drag||e.pitch||e.rotate;class ny extends t.k{}function nv(e){return e.panDelta&&e.panDelta.mag()||e.zoomDelta||e.bearingDelta||e.pitchDelta}class nx{constructor(e,t){this.handleWindowEvent=e=>{this.handleEvent(e,`${e.type}Window`)},this.handleEvent=(e,t)=>{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;let r="renderFrame"===e.type?void 0:e,n={needsRenderFrame:!1},i={},a={},o=e.touches,s=o?this._getMapTouches(o):void 0,l=s?u.touchPos(this._map.getCanvas(),s):u.mousePos(this._map.getCanvas(),e);for(let{handlerName:o,handler:c,allowed:u}of this._handlers){let h;c.isEnabled()&&(this._blockedByActive(a,u,o)?c.reset():c[t||e.type]&&(h=c[t||e.type](e,l,s),this.mergeHandlerResult(n,i,h,o,r),h&&h.needsRenderFrame&&this._triggerRenderFrame()),(h||c.isActive())&&(a[o]=c))}let c={};for(let e in this._previousActiveHandlers)a[e]||(c[e]=r);this._previousActiveHandlers=a,(Object.keys(c).length||nv(n))&&(this._changes.push([n,i,c]),this._triggerRenderFrame()),(Object.keys(a).length||nv(n))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:h}=n;h&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],h(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new rj(e),this._bearingSnap=t.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(t);let r=this._el;for(let[e,t,n]of(this._listeners=[[r,"touchstart",{passive:!0}],[r,"touchmove",{passive:!1}],[r,"touchend",void 0],[r,"touchcancel",void 0],[r,"mousedown",void 0],[r,"mousemove",void 0],[r,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[r,"mouseover",void 0],[r,"mouseout",void 0],[r,"dblclick",void 0],[r,"click",void 0],[r,"keydown",{capture:!1}],[r,"keyup",void 0],[r,"wheel",{passive:!1}],[r,"contextmenu",void 0],[window,"blur",void 0]],this._listeners))u.addEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,n)}destroy(){for(let[e,t,r]of this._listeners)u.removeEventListener(e,t,e===document?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){let t=this._map,r=t.getCanvasContainer();this._add("mapEvent",new rq(t,e));let n=t.boxZoom=new rW(t,e);this._add("boxZoom",n),e.interactive&&e.boxZoom&&n.enable();let i=t.cooperativeGestures=new nm(t,e.cooperativeGestures);this._add("cooperativeGestures",i),e.cooperativeGestures&&i.enable();let a=new r$(t),o=new nu(t);t.doubleClickZoom=new nc(o,a),this._add("tapZoom",a),this._add("clickZoom",o),e.interactive&&e.doubleClickZoom&&t.doubleClickZoom.enable();let s=new nh;this._add("tapDragZoom",s);let l=t.touchPitch=new nr(t);this._add("touchPitch",l),e.interactive&&e.touchPitch&&t.touchPitch.enable(e.touchPitch);let c=r2(e),h=r3(e);t.dragRotate=new nd(e,c,h),this._add("mouseRotate",c,["mousePitch"]),this._add("mousePitch",h,["mouseRotate"]),e.interactive&&e.dragRotate&&t.dragRotate.enable();let f=(({enable:e,clickTolerance:t})=>new rK({clickTolerance:t,move:(e,t)=>({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:new rQ({checkCorrectEvent:e=>0===u.mouseButton(e)&&!e.ctrlKey}),enable:e,assignEvents:r1}))(e),d=new r5(e,t);t.dragPan=new nf(r,f,d),this._add("mousePan",f),this._add("touchPan",d,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&t.dragPan.enable(e.dragPan);let p=new ne,m=new r9;t.touchZoomRotate=new np(r,m,p,s),this._add("touchRotate",p,["touchPan","touchZoom"]),this._add("touchZoom",m,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&t.touchZoomRotate.enable(e.touchZoomRotate);let g=t.scrollZoom=new nl(t,()=>this._triggerRenderFrame());this._add("scrollZoom",g,["mousePan"]),e.interactive&&e.scrollZoom&&t.scrollZoom.enable(e.scrollZoom);let y=t.keyboard=new no(t);this._add("keyboard",y),e.interactive&&e.keyboard&&t.keyboard.enable(),this._add("blockableMapEvent",new rH(t))}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!ng(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,r){for(let n in e)if(n!==r&&(!t||0>t.indexOf(n)))return!0;return!1}_getMapTouches(e){let t=[];for(let r of e)this._el.contains(r.target)&&t.push(r);return t}mergeHandlerResult(e,r,n,i,a){if(!n)return;t.e(e,n);let o={handlerName:i,originalEvent:n.originalEvent||a};void 0!==n.zoomDelta&&(r.zoom=o),void 0!==n.panDelta&&(r.drag=o),void 0!==n.pitchDelta&&(r.pitch=o),void 0!==n.bearingDelta&&(r.rotate=o)}_applyChanges(){let e={},r={},n={};for(let[i,a,o]of this._changes)i.panDelta&&(e.panDelta=(e.panDelta||new t.P(0,0))._add(i.panDelta)),i.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+i.zoomDelta),i.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+i.bearingDelta),i.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+i.pitchDelta),void 0!==i.around&&(e.around=i.around),void 0!==i.pinchAround&&(e.pinchAround=i.pinchAround),i.noInertia&&(e.noInertia=i.noInertia),t.e(r,a),t.e(n,o);this._updateMapTransform(e,r,n),this._changes=[]}_updateMapTransform(e,t,r){let n=this._map,i=n._getTransformForUpdate(),a=n.terrain;if(!(nv(e)||a&&this._terrainMovement))return this._fireEvents(t,r,!0);let{panDelta:o,zoomDelta:s,bearingDelta:l,pitchDelta:c,around:u,pinchAround:h}=e;void 0!==h&&(u=h),n._stop(!0),u=u||n.transform.centerPoint;let f=i.pointLocation(o?u.sub(o):u);l&&(i.bearing+=l),c&&(i.pitch+=c),s&&(i.zoom+=s),a?!this._terrainMovement&&(t.drag||t.zoom)?(this._terrainMovement=!0,this._map._elevationFreeze=!0,i.setLocationAtPoint(f,u)):t.drag&&this._terrainMovement?i.center=i.pointLocation(i.centerPoint.sub(o)):i.setLocationAtPoint(f,u):i.setLocationAtPoint(f,u),n._applyUpdatedTransform(i),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,r,!0)}_fireEvents(e,r,n){let i=ng(this._eventsInProgress),a=ng(e),o={};for(let t in e){let{originalEvent:r}=e[t];this._eventsInProgress[t]||(o[`${t}start`]=r),this._eventsInProgress[t]=e[t]}for(let e in!i&&a&&this._fireEvent("movestart",a.originalEvent),o)this._fireEvent(e,o[e]);for(let t in a&&this._fireEvent("move",a.originalEvent),e){let{originalEvent:r}=e[t];this._fireEvent(t,r)}let s={},l;for(let e in this._eventsInProgress){let{handlerName:t,originalEvent:n}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=r[t]||n,s[`${e}end`]=l)}for(let e in s)this._fireEvent(e,s[e]);let u=ng(this._eventsInProgress),h=(i||a)&&!u;if(h&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let e=this._map._getTransformForUpdate();e.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(e)}if(n&&h){this._updatingCamera=!0;let e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),r=e=>0!==e&&-this._bearingSnap{delete this._frameId,this.handleEvent(new ny("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class nb extends t.E{constructor(e,t){super(),this._renderFrameCallback=()=>{let e=Math.min((c.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=t.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new t.N(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}panBy(e,r,n){return e=t.P.convert(e).mult(-1),this.panTo(this.transform.center,t.e({offset:e},r),n)}panTo(e,r,n){return this.easeTo(t.e({center:e},r),n)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,r,n){return this.easeTo(t.e({zoom:e},r),n)}zoomIn(e,t){return this.zoomTo(this.getZoom()+1,e,t),this}zoomOut(e,t){return this.zoomTo(this.getZoom()-1,e,t),this}getBearing(){return this.transform.bearing}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,r,n){return this.easeTo(t.e({bearing:e},r),n)}resetNorth(e,r){return this.rotateTo(0,t.e({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(t.e({bearing:0,pitch:0,duration:1e3},e),r),this}snapToNorth(e,t){return Math.abs(this.getBearing()){if(this._zooming&&(i.zoom=t.y.number(a,y,n)),this._rotating&&(i.bearing=t.y.number(o,u,n)),this._pitching&&(i.pitch=t.y.number(s,h,n)),this._padding&&(i.interpolatePadding(l,f,n),p=i.centerPoint.add(d)),this.terrain&&!e.freezeElevation&&this._updateElevation(n),_)i.setLocationAtPoint(_,w);else{let e=i.zoomScale(i.zoom-a),t=Math.pow(y>a?Math.min(2,b):Math.max(.5,b),1-n),r=i.unproject(v.add(x.mult(n*t)).mult(e));i.setLocationAtPoint(i.renderWorldCopies?r.wrap():r,p)}this._applyUpdatedTransform(i),this._fireMoveEvents(r)},t=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,t)},e),this}_prepareEase(e,r,n={}){this._moving=!0,r||n.moving||this.fire(new t.k("movestart",e)),this._zooming&&!n.zooming&&this.fire(new t.k("zoomstart",e)),this._rotating&&!n.rotating&&this.fire(new t.k("rotatestart",e)),this._pitching&&!n.pitching&&this.fire(new t.k("pitchstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let r=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&r!==this._elevationTarget){let t=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(t-(r-(t*e+this._elevationStart))/(1-e)),this._elevationTarget=r}this.transform.elevation=t.y.number(this._elevationStart,this._elevationTarget,e)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){let t=e.getCameraPosition(),r=this.terrain.getElevationForLngLatZoom(t.lngLat,e.zoom);if(t.altitudethis._elevateCameraIfInsideTerrain(e)),this.transformCameraUpdate&&t.push(e=>this.transformCameraUpdate(e)),!t.length)return;let r=e.clone();for(let e of t){let t=r.clone(),{center:n,zoom:i,pitch:a,bearing:o,elevation:s}=e(t);n&&(t.center=n),void 0!==i&&(t.zoom=i),void 0!==a&&(t.pitch=a),void 0!==o&&(t.bearing=o),void 0!==s&&(t.elevation=s),r.apply(t)}this.transform.apply(r)}_fireMoveEvents(e){this.fire(new t.k("move",e)),this._zooming&&this.fire(new t.k("zoom",e)),this._rotating&&this.fire(new t.k("rotate",e)),this._pitching&&this.fire(new t.k("pitch",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;let n=this._zooming,i=this._rotating,a=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,n&&this.fire(new t.k("zoomend",e)),i&&this.fire(new t.k("rotateend",e)),a&&this.fire(new t.k("pitchend",e)),this.fire(new t.k("moveend",e))}flyTo(e,r){var n;if(!e.essential&&c.prefersReducedMotion){let n=t.M(e,["center","zoom","bearing","pitch","around"]);return this.jumpTo(n,r)}this.stop(),e=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.b9},e);let i=this._getTransformForUpdate(),a=i.zoom,o=i.bearing,s=i.pitch,l=i.padding,u="bearing"in e?this._normalizeBearing(e.bearing,o):o,h="pitch"in e?+e.pitch:s,f="padding"in e?e.padding:i.padding,d=t.P.convert(e.offset),p=i.centerPoint.add(d),m=i.pointLocation(p),{center:g,zoom:y}=i.getConstrained(t.N.convert(e.center||m),null!=(n=e.zoom)?n:a);this._normalizeCenter(g,i);let v=i.zoomScale(y-a),x=i.project(m),b=i.project(g).sub(x),_=e.curve,w=Math.max(i.width,i.height),k=w/v,T=b.mag();if("minZoom"in e){let r=t.ac(Math.min(e.minZoom,a,y),i.minZoom,i.maxZoom);_=Math.sqrt(w/i.zoomScale(r-a)/T*2)}let A=_*_;function M(e){let t=(k*k-w*w+(e?-1:1)*A*A*T*T)/(2*(e?k:w)*A*T);return Math.log(Math.sqrt(t*t+1)-t)}function S(e){return(Math.exp(e)-Math.exp(-e))/2}function E(e){return(Math.exp(e)+Math.exp(-e))/2}let C=M(!1),L=function(e){return E(C)/E(C+_*e)},I=function(e){var t;return w*((E(C)*(S(t=C+_*e)/E(t))-S(C))/A)/T},P=(M(!0)-C)/_;if(1e-6>Math.abs(T)||!isFinite(P)){if(1e-6>Math.abs(w-k))return this.easeTo(e,r);let t=k0,L=e=>Math.exp(t*_*e)}return e.duration="duration"in e?+e.duration:1e3*P/("screenSpeed"in e?e.screenSpeed/_:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=o!==u,this._pitching=h!==s,this._padding=!i.isPaddingEqual(f),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(g),this._ease(n=>{let c=n*P,m=1/L(c);i.zoom=1===n?y:a+i.scaleZoom(m),this._rotating&&(i.bearing=t.y.number(o,u,n)),this._pitching&&(i.pitch=t.y.number(s,h,n)),this._padding&&(i.interpolatePadding(l,f,n),p=i.centerPoint.add(d)),this.terrain&&!e.freezeElevation&&this._updateElevation(n);let v=1===n?g:i.unproject(x.add(b.mult(I(c))).mult(m));i.setLocationAtPoint(i.renderWorldCopies?v.wrap():v,p),this._applyUpdatedTransform(i),this._fireMoveEvents(r)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){var r;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}return e||null==(r=this.handlers)||r.stop(!1),this}_ease(e,t,r){!1===r.animate||0===r.duration?(e(1),t()):(this._easeStart=c.now(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){let n=Math.abs((e=t.b3(e,-180,180))-r);return Math.abs(e-360-r)180?-360:360*(r<-180)}queryTerrainElevation(e){return this.terrain?this.terrain.getElevationForLngLatZoom(t.N.convert(e),this.transform.tileZoom)-this.transform.elevation:null}}let n_={compact:!0,customAttribution:'MapLibre'};class nw{constructor(e=n_){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=e=>{e&&("metadata"===e.sourceDataType||"visibility"===e.sourceDataType||"style"===e.dataType||"terrain"===e.type)&&this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=u.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=u.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=u.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){u.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,t){let r=this._map._getUIString(`AttributionControl.${t}`);e.title=r,e.setAttribute("aria-label",r)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(e=>"string"!=typeof e?"":e)):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}let t=this._map.style.sourceCaches;for(let r in t){let n=t[r];if(n.used||n.usedForTerrain){let t=n.getSource();t.attribution&&0>e.indexOf(t.attribution)&&e.push(t.attribution)}}(e=e.filter(e=>String(e).trim())).sort((e,t)=>e.length-t.length);let r=(e=e.filter((t,r)=>{for(let n=r+1;n=0)return!1;return!0})).join(" | ");r!==this._attribHTML&&(this._attribHTML=r,e.length?(this._innerContainer.innerHTML=r,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class nk{constructor(e={}){this._updateCompact=()=>{let e=this._container.children;if(e.length){let t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){this._map=e,this._compact=this.options&&this.options.compact,this._container=u.create("div","maplibregl-ctrl");let t=u.create("a","maplibregl-ctrl-logo");return t.target="_blank",t.rel="noopener nofollow",t.href="https://maplibre.org/",t.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),t.setAttribute("rel","noopener nofollow"),this._container.appendChild(t),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){u.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class nT{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning;for(let r of t?this._queue.concat(t):this._queue)if(r.id===e)return void(r.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;for(let r of(this._queue=[],t))if(!r.cancelled&&(r.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var nA=t.Y([{name:"a_pos3d",type:"Int16",components:3}]);class nM extends t.E{constructor(e){super(),this.sourceCache=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,e.usedForTerrain=!0,e.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(e,r){this.sourceCache.update(e,r),this._renderableTilesKeys=[];let n={};for(let i of e.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r}))n[i.key]=!0,this._renderableTilesKeys.push(i.key),this._tiles[i.key]||(i.posMatrix=new Float64Array(16),t.aP(i.posMatrix,0,t.X,0,t.X,0,1),this._tiles[i.key]=new es(i,this.tileSize));for(let e in this._tiles)n[e]||delete this._tiles[e]}freeRtt(e){for(let t in this._tiles){let r=this._tiles[t];(!e||r.tileID.equals(e)||r.tileID.isChildOf(e)||e.isChildOf(r.tileID))&&(r.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e){let r={};for(let n of this._renderableTilesKeys){let i=this._tiles[n].tileID;if(i.canonical.equals(e.canonical)){let i=e.clone();i.posMatrix=new Float64Array(16),t.aP(i.posMatrix,0,t.X,0,t.X,0,1),r[n]=i}else if(i.canonical.isChildOf(e.canonical)){let a=e.clone();a.posMatrix=new Float64Array(16);let o=i.canonical.z-e.canonical.z,s=i.canonical.x-(i.canonical.x>>o<>o<>o;t.aP(a.posMatrix,0,c,0,c,0,1),t.J(a.posMatrix,a.posMatrix,[-s*c,-l*c,0]),r[n]=a}else if(e.canonical.isChildOf(i.canonical)){let a=e.clone();a.posMatrix=new Float64Array(16);let o=e.canonical.z-i.canonical.z,s=e.canonical.x-(e.canonical.x>>o<>o<>o;t.aP(a.posMatrix,0,t.X,0,t.X,0,1),t.J(a.posMatrix,a.posMatrix,[s*c,l*c,0]),t.K(a.posMatrix,a.posMatrix,[1/2**o,1/2**o,0]),r[n]=a}}return r}getSourceTile(e,t){let r=this.sourceCache._source,n=e.overscaledZ-this.deltaZoom;if(n>r.maxzoom&&(n=r.maxzoom),n=r.minzoom&&(!i||!i.dem);)i=this.sourceCache.getTileByID(e.scaledTo(n--).key);return i}tilesAfterTime(e=Date.now()){return Object.values(this._tiles).filter(t=>t.timeAdded>=e)}}class nS{constructor(e,t,r){this.painter=e,this.sourceCache=new nM(t),this.options=r,this.exaggeration="number"==typeof r.exaggeration?r.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(e,r,n,i=t.X){var a,o,s,l,c,u;if(!(r>=0&&r=0&&ne.canonical.z&&(e.canonical.z>=n?i=e.canonical.z-n:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let a=e.canonical.x-(e.canonical.x>>i<>i<>8<<4|e>>8,r[t+3]=0;let n=new A(e,new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(r.buffer)),e.gl.RGBA,{premultiply:!1});return n.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=n,n}pointCoordinate(e){this.painter.maybeDrawDepthAndCoords(!0);let r=new Uint8Array(4),n=this.painter.context,i=n.gl,a=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),o=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),s=Math.round(this.painter.height/devicePixelRatio);n.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),i.readPixels(a,s-o-1,1,1,i.RGBA,i.UNSIGNED_BYTE,r),n.bindFramebuffer.set(null);let l=r[0]+(r[2]>>4<<8),c=r[1]+((15&r[2])<<8),u=this.coordsIndex[255-r[3]],h=u&&this.sourceCache.getTileByID(u);if(!h)return null;let f=this._coordsTextureSize,d=(1<e.id!==t),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(let e of this._recentlyUsed)if(!this._objects[e].inUse)return this._objects[e];if(this._objects.length>=this._size)throw Error("No free RenderPool available, call freeAllObjects() required!");let e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(let e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length!e.inUse)}}let nC={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class nL{constructor(e,t){this.painter=e,this.terrain=t,this.pool=new nE(e.context,30,t.sourceCache.tileSize*t.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,t){for(let r in this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=e._order.filter(r=>!e._layers[r].isHidden(t)),this._coordsDescendingInv={},e.sourceCaches)for(let t of(this._coordsDescendingInv[r]={},e.sourceCaches[r].getVisibleCoordinates())){let e=this.terrain.sourceCache.getTerrainCoords(t);for(let t in e)this._coordsDescendingInv[r][t]||(this._coordsDescendingInv[r][t]=[]),this._coordsDescendingInv[r][t].push(e[t])}for(let t of(this._coordsDescendingInvStr={},e._order)){let r=e._layers[t],n=r.source;if(nC[r.type]&&!this._coordsDescendingInvStr[n])for(let e in this._coordsDescendingInvStr[n]={},this._coordsDescendingInv[n])this._coordsDescendingInvStr[n][e]=this._coordsDescendingInv[n][e].map(e=>e.key).sort().join()}for(let e of this._renderableTiles)for(let t in this._coordsDescendingInvStr){let r=this._coordsDescendingInvStr[t][e.tileID.key];r&&r!==e.rttCoords[t]&&(e.rtt=[])}}renderLayer(e){if(e.isHidden(this.painter.transform.zoom))return!1;let r=e.type,n=this.painter,i=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(nC[r]&&(this._prevType&&nC[this._prevType]||this._stacks.push([]),this._prevType=r,this._stacks[this._stacks.length-1].push(e.id),!i))return!0;if(nC[this._prevType]||nC[r]&&i){this._prevType=r;let e=this._stacks.length-1,i=this._stacks[e]||[];for(let r of this._renderableTiles){if(this.pool.isFull()&&(rk(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(r),r.rtt[e]){let t=this.pool.getObjectForId(r.rtt[e].id);if(t.stamp===r.rtt[e].stamp){this.pool.useObject(t);continue}}let a=this.pool.getOrCreateFreeObject();this.pool.useObject(a),this.pool.stampObject(a),r.rtt[e]={id:a.id,stamp:a.stamp},n.context.bindFramebuffer.set(a.fbo.framebuffer),n.context.clear({color:t.aM.transparent,stencil:0}),n.currentStencilSource=void 0;for(let e=0;e{e.touchstart=e.dragStart,e.touchmoveWindow=e.dragMove,e.touchend=e.dragEnd},nO={showCompass:!0,showZoom:!0,visualizePitch:!1};class nD{constructor(e,r,n=!1){this.mousedown=e=>{this.startMouse(t.e({},e,{ctrlKey:!0,preventDefault:()=>e.preventDefault()}),u.mousePos(this.element,e)),u.addEventListener(window,"mousemove",this.mousemove),u.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=e=>{this.moveMouse(e,u.mousePos(this.element,e))},this.mouseup=e=>{this.mouseRotate.dragEnd(e),this.mousePitch&&this.mousePitch.dragEnd(e),this.offTemp()},this.touchstart=e=>{1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=u.touchPos(this.element,e.targetTouches)[0],this.startTouch(e,this._startPos),u.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),u.addEventListener(window,"touchend",this.touchend))},this.touchmove=e=>{1!==e.targetTouches.length?this.reset():(this._lastPos=u.touchPos(this.element,e.targetTouches)[0],this.moveTouch(e,this._lastPos))},this.touchend=e=>{0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let i=e.dragRotate._mouseRotate.getClickTolerance(),a=e.dragRotate._mousePitch.getClickTolerance();this.element=r,this.mouseRotate=r2({clickTolerance:i,enable:!0}),this.touchRotate=(({enable:e,clickTolerance:t,bearingDegreesPerPixelMoved:r=.8})=>new rK({clickTolerance:t,move:(e,t)=>({bearingDelta:(t.x-e.x)*r}),moveStateManager:new r0,enable:e,assignEvents:nz}))({clickTolerance:i,enable:!0}),this.map=e,n&&(this.mousePitch=r3({clickTolerance:a,enable:!0}),this.touchPitch=(({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:r=-.5})=>new rK({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:new r0,enable:e,assignEvents:nz}))({clickTolerance:a,enable:!0})),u.addEventListener(r,"mousedown",this.mousedown),u.addEventListener(r,"touchstart",this.touchstart,{passive:!1}),u.addEventListener(r,"touchcancel",this.reset)}startMouse(e,t){this.mouseRotate.dragStart(e,t),this.mousePitch&&this.mousePitch.dragStart(e,t),u.disableDrag()}startTouch(e,t){this.touchRotate.dragStart(e,t),this.touchPitch&&this.touchPitch.dragStart(e,t),u.disableDrag()}moveMouse(e,t){let r=this.map,{bearingDelta:n}=this.mouseRotate.dragMove(e,t)||{};if(n&&r.setBearing(r.getBearing()+n),this.mousePitch){let{pitchDelta:n}=this.mousePitch.dragMove(e,t)||{};n&&r.setPitch(r.getPitch()+n)}}moveTouch(e,t){let r=this.map,{bearingDelta:n}=this.touchRotate.dragMove(e,t)||{};if(n&&r.setBearing(r.getBearing()+n),this.touchPitch){let{pitchDelta:n}=this.touchPitch.dragMove(e,t)||{};n&&r.setPitch(r.getPitch()+n)}}off(){let e=this.element;u.removeEventListener(e,"mousedown",this.mousedown),u.removeEventListener(e,"touchstart",this.touchstart,{passive:!1}),u.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),u.removeEventListener(window,"touchend",this.touchend),u.removeEventListener(e,"touchcancel",this.reset),this.offTemp()}offTemp(){u.enableDrag(),u.removeEventListener(window,"mousemove",this.mousemove),u.removeEventListener(window,"mouseup",this.mouseup),u.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),u.removeEventListener(window,"touchend",this.touchend)}}function nR(e,r,n){let i=new t.N(e.lng,e.lat);if(e=new t.N(e.lng,e.lat),r){let i=new t.N(e.lng-360,e.lat),a=new t.N(e.lng+360,e.lat),o=n.locationPoint(e).distSqr(r);n.locationPoint(i).distSqr(r)180;){let t=n.locationPoint(e);if(t.x>=0&&t.y>=0&&t.x<=n.width&&t.y<=n.height)break;e.lng>n.center.lng?e.lng-=360:e.lng+=360}return e.lng!==i.lng&&n.locationPoint(e).y>n.height/2-n.getHorizon()?e:i}let nj={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 nF(e,t,r){let n=e.classList;for(let e in nj)n.remove(`maplibregl-${r}-anchor-${e}`);n.add(`maplibregl-${r}-anchor-${t}`)}class nB extends t.E{constructor(e){if(super(),this._onKeyPress=e=>{let t=e.code,r=e.charCode||e.keyCode;"Space"!==t&&"Enter"!==t&&32!==r&&13!==r||this.togglePopup()},this._onMapClick=e=>{let t=e.originalEvent.target,r=this._element;this._popup&&(t===r||r.contains(t))&&this.togglePopup()},this._update=e=>{var t;if(!this._map)return;let r=this._map.loaded()&&!this._map.isMoving();e?.type!=="terrain"&&(e?.type!=="render"||r)||this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?nR(this._lngLat,this._flatPos,this._map.transform):null==(t=this._lngLat)?void 0:t.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let n="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?n=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(n=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||e&&"moveend"!==e.type||(this._pos=this._pos.round()),u.setTransform(this._element,`${nj[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${n}`),c.frameAsync(new AbortController).then(()=>{this._updateOpacity(e&&"moveend"===e.type)}).catch(()=>{})},this._onMove=e=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.k("dragstart"))),this.fire(new t.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.k("dragend")),this._state="inactive"},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=e&&e.anchor||"center",this._color=e&&e.color||"#3FB1CE",this._scale=e&&e.scale||1,this._draggable=e&&e.draggable||!1,this._clickTolerance=e&&e.clickTolerance||0,this._subpixelPositioning=e&&e.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e&&e.rotation||0,this._rotationAlignment=e&&e.rotationAlignment||"auto",this._pitchAlignment=e&&e.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(e?.opacity,e?.opacityWhenCovered),e&&e.element)this._element=e.element,this._offset=t.P.convert(e&&e.offset||[0,0]);else{this._defaultMarker=!0,this._element=u.create("div");let r=u.createNS("http://www.w3.org/2000/svg","svg");r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height","41px"),r.setAttributeNS(null,"width","27px"),r.setAttributeNS(null,"viewBox","0 0 27 41");let n=u.createNS("http://www.w3.org/2000/svg","g");n.setAttributeNS(null,"stroke","none"),n.setAttributeNS(null,"stroke-width","1"),n.setAttributeNS(null,"fill","none"),n.setAttributeNS(null,"fill-rule","evenodd");let i=u.createNS("http://www.w3.org/2000/svg","g");i.setAttributeNS(null,"fill-rule","nonzero");let a=u.createNS("http://www.w3.org/2000/svg","g");for(let e of(a.setAttributeNS(null,"transform","translate(3.0, 29.0)"),a.setAttributeNS(null,"fill","#000000"),[{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"}])){let t=u.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),a.appendChild(t)}let o=u.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"fill",this._color);let s=u.createNS("http://www.w3.org/2000/svg","path");s.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),o.appendChild(s);let l=u.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"opacity","0.25"),l.setAttributeNS(null,"fill","#000000");let c=u.createNS("http://www.w3.org/2000/svg","path");c.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),l.appendChild(c);let h=u.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"transform","translate(6.0, 7.0)"),h.setAttributeNS(null,"fill","#FFFFFF");let f=u.createNS("http://www.w3.org/2000/svg","g");f.setAttributeNS(null,"transform","translate(8.0, 8.0)");let d=u.createNS("http://www.w3.org/2000/svg","circle");d.setAttributeNS(null,"fill","#000000"),d.setAttributeNS(null,"opacity","0.25"),d.setAttributeNS(null,"cx","5.5"),d.setAttributeNS(null,"cy","5.5"),d.setAttributeNS(null,"r","5.4999962");let p=u.createNS("http://www.w3.org/2000/svg","circle");p.setAttributeNS(null,"fill","#FFFFFF"),p.setAttributeNS(null,"cx","5.5"),p.setAttributeNS(null,"cy","5.5"),p.setAttributeNS(null,"r","5.4999962"),f.appendChild(d),f.appendChild(p),i.appendChild(a),i.appendChild(o),i.appendChild(l),i.appendChild(h),i.appendChild(f),r.appendChild(i),r.setAttributeNS(null,"height",41*this._scale+"px"),r.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(r),this._offset=t.P.convert(e&&e.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",e=>{e.preventDefault()}),this._element.addEventListener("mousedown",e=>{e.preventDefault()}),nF(this._element,this._anchor,"marker"),e&&e.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),u.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.N.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){let t=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[t,-1*(24.6+t)],"bottom-right":[-t,-1*(24.6+t)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered||e&&(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map))),this}_updateOpacity(e=!1){var r,n;if(!(null!=(r=this._map)&&r.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let i=this._map,a=i.terrain.depthAtPoint(this._pos),o=i.terrain.getElevationForLngLatZoom(this._lngLat,i.transform.tileZoom);if(i.transform.lngLatToCameraDepth(this._lngLat,o)-a<.006)return void(this._element.style.opacity=this._opacity);let s=-this._offset.y/i.transform._pixelPerMeter,l=Math.sin(i.getPitch()*Math.PI/180)*s,c=i.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),u=i.transform.lngLatToCameraDepth(this._lngLat,o+l)-c>.006;null!=(n=this._popup)&&n.isOpen()&&u&&this._popup.remove(),this._element.style.opacity=u?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(e){return this._offset=t.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return void 0===e&&void 0===t&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==e&&(this._opacity=e),void 0!==t&&(this._opacityWhenCovered=t),this._map&&this._updateOpacity(!0),this}}let nN={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},nU=0,nV=!1,nq={maxWidth:100,unit:"metric"};function nH(e,t,r){let n=r&&r.maxWidth||100,i=e._container.clientHeight/2,a=e.unproject([0,i]),o=e.unproject([n,i]),s=a.distanceTo(o);if(r&&"imperial"===r.unit){let r=3.2808*s;r>5280?nG(t,n,r/5280,e._getUIString("ScaleControl.Miles")):nG(t,n,r,e._getUIString("ScaleControl.Feet"))}else r&&"nautical"===r.unit?nG(t,n,s/1852,e._getUIString("ScaleControl.NauticalMiles")):s>=1e3?nG(t,n,s/1e3,e._getUIString("ScaleControl.Kilometers")):nG(t,n,s,e._getUIString("ScaleControl.Meters"))}function nG(e,t,r,n){var i;let a,o,s,l=(a=Math.pow(10,`${Math.floor(r)}`.length-1),o=r/a,a*(o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:(s=Math.pow(10,Math.ceil(-Math.log(i=o)/Math.LN10)),Math.round(i*s)/s)));e.style.width=l/r*t+"px",e.innerHTML=`${l} ${n}`}let nW={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1};e.AJAXError=t.bh,e.Evented=t.E,e.LngLat=t.N,e.MercatorCoordinate=t.Z,e.Point=t.P,e.addProtocol=t.bi,e.config=t.a,e.removeProtocol=t.bj,e.AttributionControl=nw,e.BoxZoomHandler=rW,e.CanvasSource=ee,e.CooperativeGesturesHandler=nm,e.DoubleClickZoomHandler=nc,e.DragPanHandler=nf,e.DragRotateHandler=nd,e.EdgeInsets=rE,e.FullscreenControl=class extends t.E{constructor(e={}){super(),this._onFullscreenChange=()=>{var e;let t=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;null!=(e=t?.shadowRoot)&&e.fullscreenElement;)t=t.shadowRoot.fullscreenElement;t===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,e&&e.container&&(e.container instanceof HTMLElement?this._container=e.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=u.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){u.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let e=this._fullscreenButton=u.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);u.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=$,e.GeolocateControl=class extends t.E{constructor(e){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.k("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.k("geolocate",e)),this._finish()}},this._updateCamera=e=>{let r=new t.N(e.coords.longitude,e.coords.latitude),n=e.coords.accuracy,i=this._map.getBearing(),a=t.e({bearing:i},this.options.fitBoundsOptions),o=G.fromLngLat(r,n);this._map.fitBounds(o,a,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let r=new t.N(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=e=>{if(this._map){if(this.options.trackUserLocation)if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&nV)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.k("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>e.preventDefault()),this._geolocateButton=u.create("button","maplibregl-ctrl-geolocate",this._container),u.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(!1===e){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{let e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=u.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new nB({element:this._dotElement}),this._circleElement=u.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new nB({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",e=>{e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||e.originalEvent&&"resize"===e.originalEvent.type||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.k("trackuserlocationend")),this.fire(new t.k("userlocationlostfocus")))})}},this.options=t.e({},nN,e)}onAdd(e){return this._map=e,this._container=u.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return t._(this,arguments,void 0,function*(e=!1){if(void 0!==i&&!e)return i;if(void 0===window.navigator.permissions)return i=!!window.navigator.geolocation;try{i="denied"!==(yield window.navigator.permissions.query({name:"geolocation"})).state}catch{i=!!window.navigator.geolocation}return i})})().then(e=>this._finishSetupUI(e)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),u.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,nU=0,nV=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitudet.getEast()||r.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let e=this._map.getBounds(),t=e.getSouthEast(),r=e.getNorthEast(),n=t.distanceTo(r),i=Math.ceil(this._accuracy/(n/this._map._container.clientHeight)*2);this._circleElement.style.width=`${i}px`,this._circleElement.style.height=`${i}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":nU--,nV=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.k("trackuserlocationstart")),this.fire(new t.k("userlocationfocus"));break;default:throw Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++nU>1?(e={maximumAge:6e5,timeout:0},nV=!0):(e=this.options.positionOptions,nV=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},e.Hash=rI,e.ImageSource=J,e.KeyboardHandler=no,e.LngLatBounds=G,e.LogoControl=nk,e.Map=class extends nb{constructor(e){t.bf.mark(t.bg.create);let r=Object.assign(Object.assign({},nP),e);if(null!=r.minZoom&&null!=r.maxZoom&&r.minZoom>r.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(null!=r.minPitch&&null!=r.maxPitch&&r.minPitch>r.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(null!=r.minPitch&&r.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(null!=r.maxPitch&&r.maxPitch>85)throw Error("maxPitch must be less than or equal to 85");if(super(new rC(r.minZoom,r.maxZoom,r.minPitch,r.maxPitch,r.renderWorldCopies),{bearingSnap:r.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new nT,this._controls=[],this._mapId=t.a4(),this._contextLost=e=>{e.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new t.k("webglcontextlost",{originalEvent:e}))},this._contextRestored=e=>{this._setupPainter(),this.resize(),this._update(),this.fire(new t.k("webglcontextrestored",{originalEvent:e}))},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=r.interactive,this._maxTileCacheSize=r.maxTileCacheSize,this._maxTileCacheZoomLevels=r.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=!0===r.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=!0===r.preserveDrawingBuffer,this._antialias=!0===r.antialias,this._trackResize=!0===r.trackResize,this._bearingSnap=r.bearingSnap,this._refreshExpiredTiles=!0===r.refreshExpiredTiles,this._fadeDuration=r.fadeDuration,this._crossSourceCollisions=!0===r.crossSourceCollisions,this._collectResourceTiming=!0===r.collectResourceTiming,this._locale=Object.assign(Object.assign({},nI),r.locale),this._clickTolerance=r.clickTolerance,this._overridePixelRatio=r.pixelRatio,this._maxCanvasSize=r.maxCanvasSize,this.transformCameraUpdate=r.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=!0===r.cancelPendingTileRequestsWhileZooming,this._imageQueueHandle=x.addThrottleControl(()=>this.isMoving()),this._requestManager=new y(r.transformRequest),"string"==typeof r.container){if(this._container=document.getElementById(r.container),!this._container)throw Error(`Container '${r.container}' not found.`)}else{if(!(r.container instanceof HTMLElement))throw Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=r.container}if(r.maxBounds&&this.setMaxBounds(r.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),"u">typeof window){addEventListener("online",this._onWindowOnline,!1);let e=!1,t=rL(e=>{this._trackResize&&!this._removed&&(this.resize(e),this.redraw())},50);this._resizeObserver=new ResizeObserver(r=>{e?t(r):e=!0}),this._resizeObserver.observe(this._container)}this.handlers=new nx(this,r),this._hash=r.hash&&new rI("string"==typeof r.hash&&r.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:r.center,zoom:r.zoom,bearing:r.bearing,pitch:r.pitch}),r.bounds&&(this.resize(),this.fitBounds(r.bounds,t.e({},r.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=r.localIdeographFontFamily,this._validateStyle=r.validateStyle,r.style&&this.setStyle(r.style,{localIdeographFontFamily:r.localIdeographFontFamily}),r.attributionControl&&this.addControl(new nw("boolean"==typeof r.attributionControl?void 0:r.attributionControl)),r.maplibreLogo&&this.addControl(new nk,r.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",e=>{this._update("style"===e.dataType),this.fire(new t.k(`${e.dataType}data`,e))}),this.on("dataloading",e=>{this.fire(new t.k(`${e.dataType}dataloading`,e))}),this.on("dataabort",e=>{this.fire(new t.k("sourcedataabort",e))})}_getMapId(){return this._mapId}addControl(e,r){if(void 0===r&&(r=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e||!e.onAdd)return this.fire(new t.j(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let n=e.onAdd(this);this._controls.push(e);let i=this._controlPositions[r];return -1!==r.indexOf("bottom")?i.insertBefore(n,i.firstChild):i.appendChild(n),this}removeControl(e){if(!e||!e.onRemove)return this.fire(new t.j(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this}hasControl(e){return this._controls.indexOf(e)>-1}calculateCameraOptionsFromTo(e,t,r,n){return null==n&&this.terrain&&(n=this.terrain.getElevationForLngLatZoom(r,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(e,t,r,n)}resize(e){var r;let n=this._containerDimensions(),i=n[0],a=n[1],o=this._getClampedPixelRatio(i,a);if(this._resizeCanvas(i,a,o),this.painter.resize(i,a,o),this.painter.overLimit()){let e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];let t=this._getClampedPixelRatio(i,a);this._resizeCanvas(i,a,t),this.painter.resize(i,a,t)}this.transform.resize(i,a),null==(r=this._requestedCameraState)||r.resize(i,a);let s=!this._moving;return s&&(this.stop(),this.fire(new t.k("movestart",e)).fire(new t.k("move",e))),this.fire(new t.k("resize",e)),s&&this.fire(new t.k("moveend",e)),this}_getClampedPixelRatio(e,t){let{0:r,1:n}=this._maxCanvasSize,i=this.getPixelRatio(),a=e*i,o=t*i;return Math.min(a>r?r/a:1,o>n?n/o:1)*i}getPixelRatio(){var e;return null!=(e=this._overridePixelRatio)?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds(G.convert(e)),this._update()}setMinZoom(e){if((e=e??-2)>=-2&&e<=this.transform.maxZoom)return this.transform.minZoom=e,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=e,this._update(),this.getZoom()>e&&this.setZoom(e),this;throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=e??0)<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch)return this.transform.minPitch=e,this._update(),this.getPitch()85)throw Error("maxPitch must be less than or equal to 85");if(e>=this.transform.minPitch)return this.transform.maxPitch=e,this._update(),this.getPitch()>e&&this.setPitch(e),this;throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.renderWorldCopies=e,this._update()}project(e){return this.transform.locationPoint(t.N.convert(e),this.style&&this.terrain)}unproject(e){return this.transform.pointLocation(t.P.convert(e),this.terrain)}isMoving(){var e;return this._moving||(null==(e=this.handlers)?void 0:e.isMoving())}isZooming(){var e;return this._zooming||(null==(e=this.handlers)?void 0:e.isZooming())}isRotating(){var e;return this._rotating||(null==(e=this.handlers)?void 0:e.isRotating())}_createDelegatedListener(e,t,r){if("mouseenter"===e||"mouseover"===e){let n=!1;return{layers:t,listener:r,delegates:{mousemove:i=>{let a=t.filter(e=>this.getLayer(e)),o=0!==a.length?this.queryRenderedFeatures(i.point,{layers:a}):[];o.length?n||(n=!0,r.call(this,new rN(e,this,i.originalEvent,{features:o}))):n=!1},mouseout:()=>{n=!1}}}}if("mouseleave"===e||"mouseout"===e){let n=!1;return{layers:t,listener:r,delegates:{mousemove:i=>{let a=t.filter(e=>this.getLayer(e));(0!==a.length?this.queryRenderedFeatures(i.point,{layers:a}):[]).length?n=!0:n&&(n=!1,r.call(this,new rN(e,this,i.originalEvent)))},mouseout:t=>{n&&(n=!1,r.call(this,new rN(e,this,t.originalEvent)))}}}}{let n=e=>{let n=t.filter(e=>this.getLayer(e)),i=0!==n.length?this.queryRenderedFeatures(e.point,{layers:n}):[];i.length&&(e.features=i,r.call(this,e),delete e.features)};return{layers:t,listener:r,delegates:{[e]:n}}}}_saveDelegatedListener(e,t){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[e]=this._delegatedListeners[e]||[],this._delegatedListeners[e].push(t)}_removeDelegatedListener(e,t,r){if(!this._delegatedListeners||!this._delegatedListeners[e])return;let n=this._delegatedListeners[e];for(let e=0;et.includes(e))){for(let e in i.delegates)this.off(e,i.delegates[e]);return void n.splice(e,1)}}}on(e,t,r){if(void 0===r)return super.on(e,t);let n=this._createDelegatedListener(e,"string"==typeof t?[t]:t,r);for(let t in this._saveDelegatedListener(e,n),n.delegates)this.on(t,n.delegates[t]);return this}once(e,t,r){if(void 0===r)return super.once(e,t);let n="string"==typeof t?[t]:t,i=this._createDelegatedListener(e,n,r);for(let t in i.delegates){let a=i.delegates[t];i.delegates[t]=(...t)=>{this._removeDelegatedListener(e,n,r),a(...t)}}for(let t in this._saveDelegatedListener(e,i),i.delegates)this.once(t,i.delegates[t]);return this}off(e,t,r){return void 0===r?super.off(e,t):(this._removeDelegatedListener(e,"string"==typeof t?[t]:t,r),this)}queryRenderedFeatures(e,r){if(!this.style)return[];let n,i=e instanceof t.P||Array.isArray(e),a=i?e:[[0,0],[this.transform.width,this.transform.height]];if(r=r||(i?{}:e)||{},a instanceof t.P||"number"==typeof a[0])n=[t.P.convert(a)];else{let e=t.P.convert(a[0]),r=t.P.convert(a[1]);n=[e,new t.P(r.x,e.y),r,new t.P(e.x,r.y),e]}return this.style.queryRenderedFeatures(n,r,this.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,r){return!1!==(r=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let t=this._locale[e];if(null==t)throw Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){if(t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(e,t));let r=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new eQ(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,r):this.style.loadJSON(e,t,r)):delete this.style,this}_lazyInitEmptyStyle(){this.style||(this.style=new eQ(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,r){if("string"==typeof e){let n=this._requestManager.transformRequest(e,"Style");t.h(n,new AbortController).then(e=>{this._updateDiff(e.data,r)}).catch(e=>{e&&this.fire(new t.j(e))})}else"object"==typeof e&&this._updateDiff(e,r)}_updateDiff(e,r){try{this.style.setState(e,r)&&this._update(!0)}catch(n){t.w(`Unable to perform style diff: ${n.message||n.error||n}. Rebuilding the style from scratch.`),this._updateStyle(e,r)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():t.w("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){let r=this.style&&this.style.sourceCaches[e];if(void 0!==r)return r.loaded();this.fire(new t.j(Error(`There is no source with ID '${e}'`)))}setTerrain(e){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),e){let r=this.style.sourceCaches[e.source];if(!r)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);for(let n in null===this.terrain&&r.reload(),this.style._layers){let r=this.style._layers[n];"hillshade"===r.type&&r.source===e.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new nS(this.painter,r,e),this.painter.renderToTexture=new nL(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=t=>{"style"===t.dataType?this.terrain.sourceCache.freeRtt():"source"===t.dataType&&t.tile&&(t.sourceId!==e.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(t.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new t.k("terrain",{terrain:e})),this}getTerrain(){var e,t;return null!=(t=null==(e=this.terrain)?void 0:e.options)?t:null}areTilesLoaded(){let e=this.style&&this.style.sourceCaches;for(let t in e){let r=e[t]._tiles;for(let e in r){let t=r[e];if("loaded"!==t.state&&"errored"!==t.state)return!1}}return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}addImage(e,r,n={}){let{pixelRatio:i=1,sdf:a=!1,stretchX:o,stretchY:s,content:l,textFitWidth:u,textFitHeight:h}=n;if(this._lazyInitEmptyStyle(),!(r instanceof HTMLImageElement||t.b(r))){if(void 0===r.width||void 0===r.height)return this.fire(new t.j(Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:n,height:c,data:f}=r;return this.style.addImage(e,{data:new t.R({width:n,height:c},new Uint8Array(f)),pixelRatio:i,stretchX:o,stretchY:s,content:l,textFitWidth:u,textFitHeight:h,sdf:a,version:0,userImage:r}),r.onAdd&&r.onAdd(this,e),this}}{let{width:n,height:f,data:d}=c.getImageData(r);this.style.addImage(e,{data:new t.R({width:n,height:f},d),pixelRatio:i,stretchX:o,stretchY:s,content:l,textFitWidth:u,textFitHeight:h,sdf:a,version:0})}}updateImage(e,r){let n=this.style.getImage(e);if(!n)return this.fire(new t.j(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:i,height:a,data:o}=r instanceof HTMLImageElement||t.b(r)?c.getImageData(r):r;if(void 0===i||void 0===a)return this.fire(new t.j(Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(i!==n.data.width||a!==n.data.height)return this.fire(new t.j(Error("The width and height of the updated image must be that same as the previous version of the image")));let s=!(r instanceof HTMLImageElement||t.b(r));return n.data.replace(o,s),this.style.updateImage(e,n),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.j(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return x.getImage(this._requestManager.transformRequest(e,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){return this.style.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,n={}){return this.style.setPaintProperty(e,t,r,n),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,n={}){return this.style.setLayoutProperty(e,t,r,n),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(e,t,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,r,e=>{e||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,e=>{e||this._update(!0)}),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e){return this._lazyInitEmptyStyle(),this.style.setSky(e),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=u.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=u.create("canvas","maplibregl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let r=this._containerDimensions(),n=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],n);let i=this._controlContainer=u.create("div","maplibregl-control-container",e),a=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(e=>{a[e]=u.create("div",`maplibregl-ctrl-${e} `,i)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(e,t,r){this._canvas.width=Math.floor(r*e),this._canvas.height=Math.floor(r*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let e={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},t=null;this._canvas.addEventListener("webglcontextcreationerror",r=>{t={requestedAttributes:e},r&&(t.statusMessage=r.statusMessage,t.type=r.type)},{once:!0});let r=this._canvas.getContext("webgl2",e)||this._canvas.getContext("webgl",e);if(!r){let e="Failed to initialize WebGL";throw t?(t.message=e,Error(JSON.stringify(t))):Error(e)}this.painter=new rA(r,this.transform),h.testSupport(r)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){return this.style&&this.style._loaded&&(this._styleDirty=this._styleDirty||e,this._sourcesDirty=!0,this.triggerRepaint()),this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){let r=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let n=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let e=this.transform.zoom,i=c.now();this.style.zoomHistory.update(e,i);let a=new t.z(e,{now:i,fadeDuration:r,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),o=a.crossFadingFactor();1===o&&o===this._crossFadingFactor||(n=!0,this._crossFadingFactor=o),this.style.update(a)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,r,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:r,showPadding:this.showPadding}),this.fire(new t.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,t.bf.mark(t.bg.load),this.fire(new t.k("load"))),this.style&&(this.style.hasTransitions()||n)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let i=this._sourcesDirty||this._styleDirty||this._placementDirty;return i||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.k("idle")),!this._loaded||this._fullyLoaded||i||(this._fullyLoaded=!0,t.bf.mark(t.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var e;for(let e of(this._hash&&this._hash.remove(),this._controls))e.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"u">typeof window&&removeEventListener("online",this._onWindowOnline,!1),x.removeThrottleControl(this._imageQueueHandle),null==(e=this._resizeObserver)||e.disconnect();let r=this.painter.context.gl.getExtension("WEBGL_lose_context");r?.loseContext&&r.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),u.remove(this._canvasContainer),u.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),t.bf.clearMetrics(),this._removed=!0,this.fire(new t.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,c.frameAsync(this._frameRequest).then(e=>{t.bf.frame(e),this._frameRequest=null,this._render(e)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return o}getCameraTargetElevation(){return this.transform.elevation}},e.MapMouseEvent=rN,e.MapTouchEvent=rU,e.MapWheelEvent=rV,e.Marker=nB,e.NavigationControl=class{constructor(e){this._updateZoomButtons=()=>{let e=this._map.getZoom(),t=e===this._map.getMaxZoom(),r=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=r,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",r.toString())},this._rotateCompassArrow=()=>{let e=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._compassIcon.style.transform=e},this._setButtonTitle=(e,t)=>{let r=this._map._getUIString(`NavigationControl.${t}`);e.title=r,e.setAttribute("aria-label",r)},this.options=t.e({},nO,e),this._container=u.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),u.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),u.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=u.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new nD(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){u.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),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){let r=u.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}},e.Popup=class extends t.E{constructor(e){super(),this.remove=()=>(this._content&&u.remove(this._content),this._container&&(u.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.k("close"))),this),this._onMouseUp=e=>{this._update(e.point)},this._onMouseMove=e=>{this._update(e.point)},this._onDrag=e=>{this._update(e.point)},this._update=e=>{var r;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=u.create("div","maplibregl-popup",this._map.getContainer()),this._tip=u.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let e of this.options.className.split(" "))this._container.classList.add(e);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?nR(this._lngLat,this._flatPos,this._map.transform):null==(r=this._lngLat)?void 0:r.wrap(),this._trackPointer&&!e)return;let n=this._flatPos=this._pos=this._trackPointer&&e?e:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&e?e:this._map.transform.locationPoint(this._lngLat));let i=this.options.anchor,a=function e(r){if(r){if("number"==typeof r){let e=Math.round(Math.abs(r)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,r),"top-left":new t.P(e,e),"top-right":new t.P(-e,e),bottom:new t.P(0,-r),"bottom-left":new t.P(e,-e),"bottom-right":new t.P(-e,-e),left:new t.P(r,0),right:new t.P(-r,0)}}if(r instanceof t.P||Array.isArray(r)){let e=t.P.convert(r);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:t.P.convert(r.center||[0,0]),top:t.P.convert(r.top||[0,0]),"top-left":t.P.convert(r["top-left"]||[0,0]),"top-right":t.P.convert(r["top-right"]||[0,0]),bottom:t.P.convert(r.bottom||[0,0]),"bottom-left":t.P.convert(r["bottom-left"]||[0,0]),"bottom-right":t.P.convert(r["bottom-right"]||[0,0]),left:t.P.convert(r.left||[0,0]),right:t.P.convert(r.right||[0,0])}}return e(new t.P(0,0))}(this.options.offset);if(!i){let e=this._container.offsetWidth,t=this._container.offsetHeight,r;r=n.y+a.bottom.ythis._map.transform.height-t?["bottom"]:[],n.xthis._map.transform.width-e/2&&r.push("right"),i=0===r.length?"bottom":r.join("-")}let o=n.add(a[i]);this.options.subpixelPositioning||(o=o.round()),u.setTransform(this._container,`${nj[i]} translate(${o.x}px,${o.y}px)`),nF(this._container,i,"popup")},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(nW),e)}addTo(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.N.convert(e),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let t=document.createDocumentFragment(),r=document.createElement("body"),n;for(r.innerHTML=e;n=r.firstChild;)t.appendChild(n);return this.setDOMContent(t)}getMaxWidth(){var e;return null==(e=this._container)?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=u.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}_createCloseButton(){this.options.closeButton&&(this._closeButton=u.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let e=this._container.querySelector("a[href], [tabindex]:not([tabindex='-1']), [contenteditable]:not([contenteditable='false']), button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])");e&&e.focus()}},e.RasterDEMTileSource=Z,e.RasterTileSource=X,e.ScaleControl=class{constructor(e){this._onMove=()=>{nH(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,nH(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},nq),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=u.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){u.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=nl,e.Style=eQ,e.TerrainControl=class{constructor(e){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=e}onAdd(e){return this._map=e,this._container=u.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=u.create("button","maplibregl-ctrl-terrain",this._container),u.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){u.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=nr,e.TwoFingersTouchRotateHandler=ne,e.TwoFingersTouchZoomHandler=r9,e.TwoFingersTouchZoomRotateHandler=np,e.VectorTileSource=Y,e.VideoSource=Q,e.addSourceType=(e,r)=>t._(void 0,void 0,void 0,function*(){if(er(e))throw Error(`A source type called "${e}" already exists.`);et[e]=r}),e.clearPrewarmedResources=function(){let e=F;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(D),F=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},e.getMaxParallelImageRequests=function(){return t.a.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return eo().getRTLTextPluginStatus()},e.getVersion=function(){return o},e.getWorkerCount=function(){return R.workerCount},e.getWorkerUrl=function(){return t.a.WORKER_URL},e.importScriptInWorkers=function(e){return V().broadcast("IS",e)},e.prewarm=function(){N().acquire(D)},e.setMaxParallelImageRequests=function(e){t.a.MAX_PARALLEL_IMAGE_REQUESTS=e},e.setRTLTextPlugin=function(e,t){return eo().setRTLTextPlugin(e,t)},e.setWorkerCount=function(e){R.workerCount=e},e.setWorkerUrl=function(e){t.a.WORKER_URL=e}}),e},"object"==typeof e&&"u">typeof t?t.exports=a():(n="u">typeof globalThis?globalThis:n||self).maplibregl=a()}}),vD=d({"src/plots/map/layers.js"(e,t){var r=tY(),n=rr().sanitizeHTML,i=vE(),a=vw();function o(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var s=o.prototype;function l(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var n=0;n0}function c(e){var t={},n={};switch(e.type){case"circle":r.extendFlat(n,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":r.extendFlat(n,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":r.extendFlat(n,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var a=e.symbol,o=i(a.textposition,a.iconsize);r.extendFlat(t,{"icon-image":a.icon,"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}),r.extendFlat(n,{"icon-color":e.color,"text-color":a.textfont.color,"text-opacity":e.opacity});break;case"raster":r.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:n}}s.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=l(e)},s.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},s.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},s.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},s.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,l(e)){var r,i,a,o,s,c=(a=(r=e).sourcetype,o=r.source,s={type:a},"geojson"===a?i="data":"vector"===a?i="string"==typeof o?"url":"tiles":"raster"===a?(i="tiles",s.tileSize=256):"image"===a&&(i="url",s.coordinates=r.coordinates),s[i]=o,r.sourceattribution&&(s.attribution=n(r.sourceattribution)),s);t.addSource(this.idSource,c)}},s.findFollowingMapLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r1)for(r=0;r-1&&g(t.originalEvent,n,[r.xaxis],[r.yaxis],r.id,e),i.indexOf("event")>-1&&l.click(n,t.originalEvent)}}},b.updateFx=function(e){var t=this,r=t.map,i=t.gd;if(!t.isStatic){var a=e.dragmode,o=t.dragOptions;t.dragOptions=n.extendDeep(o||{},{dragmode:e.dragmode,element:t.div,gd:i,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:function(e,r){r.isRect?(e.range={})[t.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(l)}},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),f(a)||u(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,n){d(e,r,n,t.dragOptions,a)},s.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function l(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},b.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},b.updateLayers=function(e){var t,r=e[this.id].layers,n=this.layerList;if(r.length!==n.length){for(t=0;tvF});var vB,vN=f({"src/plots/map/get_map_fit_bounds.ts"(){vB=g(p0())}}),vU=d({"src/plots/map/layout_defaults.js"(e,t){var r=tY(),n=sS(),i=rp(),a=vk(),{getMapFitBounds:o}=(vN(),y(vj));function s(e,t,r,n){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let a=r("fitbounds");var s=r("bounds.west"),c=r("bounds.east"),u=r("bounds.south"),h=r("bounds.north");(void 0===s||void 0===c||void 0===u||void 0===h)&&delete t.bounds,i(e,t,{name:"layers",handleItemDefaults:l}),t._fitBounds=null;let{_fitView:{center:f,zoom:d}={},center:p,zoom:m}=e,g=p?.lon===f?.lon&&p?.lat===f?.lat&&m===d;if(a&&g){let e=o(n.fullData,n.id);e&&(t._fitBounds=e)}t._input=e}function l(e,t){function n(n,i){return r.coerce(e,t,a.layers,n,i)}if(n("visible")){var i,o=n("sourcetype"),s="raster"===o||"image"===o;n("source"),n("sourceattribution"),"vector"===o&&n("sourcelayer"),"image"===o&&n("coordinates"),s&&(i="raster");var l=n("type",i);s&&"raster"!==l&&(l=t.type="raster",r.log("Source types *raster* and *image* must drawn *raster* layer type.")),n("below"),n("color"),n("opacity"),n("minzoom"),n("maxzoom"),"circle"===l&&n("circle.radius"),"line"===l&&(n("line.width"),n("line.dash")),"fill"===l&&n("fill.outlinecolor"),"symbol"===l&&(n("symbol.icon"),n("symbol.iconsize"),n("symbol.text"),r.coerceFont(n,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),n("symbol.textposition"),n("symbol.placement"))}}t.exports=function(e,t,r){n(e,t,r,{type:"map",attributes:a,handleDefaults:s,partition:"y",fullData:r})}}}),vV=d({"src/plots/map/index.js"(e){var t=tY(),r=t.strTranslate,n=t.strScale,i=t8().getSubplotCalcData,a=re(),o=b(),s=rE(),l=rr(),c=vR();e.name="map",e.attr="subplot",e.idRoot="map",e.idRegex=e.attrRegex=t.counterRegex("map"),e.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},e.layoutAttributes=vk(),e.supplyLayoutDefaults=vU(),e.plot=function(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots.map,a=0;av/2){var x=p.split("|").join("
");g.text(x).attr("data-unformatted",x).call(l.convertToTspans,e),y=s.bBox(g.node())}g.attr("transform",r(-3,-y.height+8)),m.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 b=1;y.width+6>v&&(b=v/(y.width+6));var _=[c.l+c.w*f.x[1],c.t+c.h*(1-f.y[0])];m.attr("transform",r(_[0],_[1])+n(b))}},e.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots.map,n=0;n=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,i=new a(e,n.uid),o=i.sourceId,s=r(t),l=i.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),i._addLayers(s,l),t[0].trace._glTrace=i,i}}}),vZ=d({"src/traces/choroplethmap/index.js"(e,t){t.exports={attributes:vG(),supplyDefaults:vW(),colorbar:oO(),calc:mo(),plot:vX(),hoverPoints:mc(),eventData:mu(),selectPoints:mh(),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var i=r[n].id;if("string"==typeof i&&0===i.indexOf("water")){for(var a=n+1;a0?+d[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:v})}}var b=a.extractOpts(t),_=b.reversescale?a.flipScale(b.colorscale):b.colorscale,w=_[0][1],k=["interpolate",["linear"],["heatmap-density"],0,1>i.opacity(w)?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 n.extendFlat(c.heatmap.paint,{"heatmap-weight":p?T:1/(b.max-b.min),"heatmap-color":k,"heatmap-radius":m?{type:"identity",property:"r"}:t.radius,"heatmap-opacity":t.opacity}),c.geojson={type:"FeatureCollection",features:h},c.heatmap.layout.visibility="visible",c}}}),v1=d({"src/traces/densitymap/plot.js"(e,t){var r=v0(),n=vw().traceLayerPrefix;function i(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",n+t+"-heatmap"]],this.below=null}var a=i.prototype;a.update=function(e){var t=this.subplot,n=this.layerList,i=r(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(i.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(i,a),this.below=a);for(var o=0;o=0;r--)e.removeLayer(t[r][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var n=t[0].trace,a=new i(e,n.uid),o=a.sourceId,s=r(t),l=a.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}}}),v2=d({"src/traces/densitymap/hover.js"(e,t){var r=rz(),n=vI().hoverPoints,i=vI().getExtraText;t.exports=function(e,t,a){var o=n(e,t,a);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=r.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=i(c,u,l[0].t.labels),[s]}}}}),v3=d({"src/traces/densitymap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}}}),v5=d({"src/traces/densitymap/index.js"(e,t){t.exports={attributes:vK(),supplyDefaults:vJ(),colorbar:oO(),formatLabels:vS(),calc:vQ(),plot:v1(),hoverPoints:v2(),eventData:v3(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;ni.addOpacity(y[t%y.length],.8))),g("customdata");var v=e.link||{},x=s.newContainer(t,"link");function b(e,t){return r.coerce(v,x,n.link,e,t)}b("label"),b("arrowlen"),b("source"),b("target"),b("value"),b("line.color"),b("line.width"),b("hoverinfo",e.hoverinfo),o(v,x,b,d),b("hovertemplate"),b("sort");var _=.333>i.color(h.paper_bgcolor).luminosity(),w=b("color",_?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)");function k(e){if(!i.isValid(e))return e;let t=i.color(e),r=t.alpha();return r<=.8?t.alpha(r+.2).rgb().string():_?i.brighten(t,10):i.adjustLightness(t,-10).rgb().string()}b("hovercolor",Array.isArray(w)?w.map(k):k(w)),b("customdata"),l(v,x,{name:"colorscales",handleItemDefaults:c}),a(t,h,f),f("orientation"),f("valueformat"),f("valuesuffix"),f("arrangement",m.x.length&&m.y.length?"freeform":void 0),r.coerceFont(f,"textfont",h.font,{autoShadowDflt:!0}),t._length=null}}}),v9=d({"node_modules/strongly-connected-components/scc.js"(e,t){t.exports=function(e){for(var t=e.length,r=Array(t),n=Array(t),i=Array(t),a=Array(t),o=Array(t),s=Array(t),l=0;l0;){var d=e[t=f[f.length-1]];if(a[t]=0&&s[t].push(o[m])}a[t]=p}else{if(n[t]===r[t]){for(var g=[],y=[],v=0,p=l.length-1;p>=0;--p){var x=l[p];if(i[x]=!1,g.push(x),y.push(s[x]),v+=s[x].length,o[x]=u.length,x===t){l.length=p;break}}u.push(g);for(var b=Array(v),p=0;px&&(x=l.source[t]),l.target[t]>x&&(x=l.target[t]);var b=x+1;e.node._count=b;var _,w=e.node.groups,k={};for(t=0;t0&&o(L,b)&&o(I,b)&&!(k.hasOwnProperty(L)&&k.hasOwnProperty(I)&&k[L]===k[I])){k.hasOwnProperty(I)&&(I=k[I]),k.hasOwnProperty(L)&&(L=k[L]),I*=1,d[L*=1]=d[I]=!0;var P="";l.label&&l.label[t]&&(P=l.label[t]);var z=null;P&&p.hasOwnProperty(P)&&(z=p[P]),c.push({pointNumber:t,label:P,color:u?l.color[t]:l.color,hovercolor:h?l.hovercolor[t]:l.hovercolor,customdata:f?l.customdata[t]:l.customdata,concentrationscale:z,source:L,target:I,value:+C}),S.push(L),E.push(I)}}var O=b+w.length,D=a(i.color),R=a(i.customdata),j=[];for(t=0;tb-1,childrenNodes:[],pointNumber:t,label:F,color:D?i.color[t]:i.color,customdata:R?i.customdata[t]:i.customdata})}var B=!1;return function(e,t,i){for(var a=n.init2dArray(e,0),o=0;o1})}(O,S,E)&&(B=!0),{circular:B,links:c,nodes:j,groups:w,groupLookup:k}}(t);return i({circular:l.circular,_nodes:l.nodes,_links:l.links,_groups:l.groups,_groupLookup:l.groupLookup})}}}),xe=d({"node_modules/d3-quadtree/dist/d3-quadtree.js"(e,t){var r;r=e,function(e){function t(e,t,r,n){if(isNaN(t)||isNaN(r))return e;var i,a,o,s,l,c,u,h,f,d=e._root,p={data:n},m=e._x0,g=e._y0,y=e._x1,v=e._y1;if(!d)return e._root=p,e;for(;d.length;)if((c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o,i=d,!(d=d[h=u<<1|c]))return i[h]=p,e;if(s=+e._x.call(null,d.data),l=+e._y.call(null,d.data),t===s&&r===l)return p.next=d,i?i[h]=p:e._root=p,e;do i=i?i[h]=[,,,,]:e._root=[,,,,],(c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o;while((h=u<<1|c)==(f=(l>=o)<<1|s>=a));return i[f]=d,i[h]=p,e}function r(e,t,r,n,i){this.node=e,this.x0=t,this.y0=r,this.x1=n,this.y1=i}function n(e){return e[0]}function i(e){return e[1]}function a(e,t,r){var a=new o(t??n,r??i,NaN,NaN,NaN,NaN);return null==e?a:a.addAll(e)}function o(e,t,r,n,i,a){this._x=e,this._y=t,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function s(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var l=a.prototype=o.prototype;l.copy=function(){var e,t,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(e=[{source:n,target:r._root=[,,,,]}];n=e.pop();)for(var i=0;i<4;++i)(t=n.source[i])&&(t.length?e.push({source:t,target:n.target[i]=[,,,,]}):n.target[i]=s(t));return r},l.add=function(e){var r=+this._x.call(null,e),n=+this._y.call(null,e);return t(this.cover(r,n),r,n,e)},l.addAll=function(e){var r,n,i,a,o=e.length,s=Array(o),l=Array(o),c=1/0,u=1/0,h=-1/0,f=-1/0;for(n=0;nh&&(h=i),af&&(f=a));if(c>h||u>f)return this;for(this.cover(c,u).cover(h,f),n=0;ne||e>=i||n>t||t>=a;)switch((o=[,,,,])[s=(td||(o=c.y0)>p||(s=c.x1)=v)<<1|e>=y)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=e-this._x.call(null,g.data),b=t-this._y.call(null,g.data),_=x*x+b*b;if(_=(s=(p+g)/2))?p=s:g=s,(u=o>=(l=(m+y)/2))?m=l:y=l,t=d,!(d=d[h=u<<1|c]))return this;if(!d.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(r=t,f=h)}for(;d.data!==e;)if(n=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,n?i?n.next=i:delete n.next:t?(i?t[h]=i:delete t[h],(d=t[0]||t[1]||t[2]||t[3])&&d===(t[3]||t[2]||t[1]||t[0])&&!d.length&&(r?r[f]=d:this._root=d)):this._root=i,this},l.removeAll=function(e){for(var t=0,r=e.length;ttypeof t?e:(r=r||self).d3=r.d3||{})}}),xt=d({"node_modules/d3-collection/dist/d3-collection.js"(e,t){(function(e){function t(){}function r(e,r){var n=new t;if(e instanceof t)e.each(function(e,t){n.set(t,e)});else if(Array.isArray(e)){var i,a=-1,o=e.length;if(null==r)for(;++a=l.length)return null!=e&&n.sort(e),null!=t?t(n):n;for(var s,c,h,f=-1,d=n.length,p=l[i++],m=r(),g=a();++fl.length)return r;var i,a=c[n-1];return null!=t&&n>=l.length?i=r.entries():(i=[],r.each(function(t,r){i.push({key:r,values:e(t,n)})})),null!=a?i.sort(function(e,t){return a(e.key,t.key)}):i}(u(e,0,a,o),0)},key:function(e){return l.push(e),s},sortKeys:function(e){return c[l.length-1]=e,s},sortValues:function(t){return e=t,s},rollup:function(e){return t=e,s}}},e.set=c,e.map=r,e.keys=function(e){var t=[];for(var r in e)t.push(r);return t},e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},Object.defineProperty(e,"__esModule",{value:!0})})("object"==typeof e&&"u">typeof t?e:e.d3=e.d3||{})}}),xr=d({"node_modules/d3-dispatch/dist/d3-dispatch.js"(e,t){var r;r=e,function(e){var t={value:function(){}};function r(){for(var e,t=0,r=arguments.length,i={};t=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!n.hasOwnProperty(e))throw Error("unknown type: "+e);return{type:e,name:t}}),o=-1,s=a.length;if(arguments.length<2){for(;++o0)for(var r,n,i=Array(r),a=0;atypeof t?e:(r=r||self).d3=r.d3||{})}}),xn=d({"node_modules/d3-timer/dist/d3-timer.js"(e,t){var r;r=e,function(e){var t,r,n=0,i=0,a=0,o=0,s=0,l=0,c="object"==typeof performance&&performance.now?performance:Date,u="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function h(){return s||(u(f),s=c.now()+l)}function f(){s=0}function d(){this._call=this._time=this._next=null}function p(e,t,r){var n=new d;return n.restart(e,t,r),n}function m(){h(),++n;for(var e,r=t;r;)(e=s-r._time)>=0&&r._call.call(null,e),r=r._next;--n}function g(){s=(o=c.now())+l,n=i=0;try{m()}finally{n=0,function(){for(var e,n,i=t,a=1/0;i;)i._call?(a>i._time&&(a=i._time),e=i,i=i._next):(n=i._next,i._next=null,i=e?e._next=n:t=n);r=e,v(a)}(),s=0}}function y(){var e=c.now(),t=e-o;t>1e3&&(l-=t,o=e)}function v(e){!n&&(i&&(i=clearTimeout(i)),e-s>24?(e<1/0&&(i=setTimeout(g,e-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(y,1e3)),n=1,u(g)))}d.prototype=p.prototype={constructor:d,restart:function(e,n,i){if("function"!=typeof e)throw TypeError("callback is not a function");i=(null==i?h():+i)+(null==n?0:+n),this._next||r===this||(r?r._next=this:t=this,r=this),this._call=e,this._time=i,v()},stop:function(){this._call&&(this._call=null,this._time=1/0,v())}},e.interval=function(e,t,r){var n=new d,i=t;return null==t?n.restart(e,t,r):(t*=1,r=null==r?h():+r,n.restart(function a(o){o+=i,n.restart(a,i+=t,r),e(o)},t,r)),n},e.now=h,e.timeout=function(e,t,r){var n=new d;return t=null==t?0:+t,n.restart(function(r){n.stop(),e(r+t)},t,r),n},e.timer=p,e.timerFlush=m,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),xi=d({"node_modules/d3-force/dist/d3-force.js"(e,t){var r;r=function(e,t,r,n,i){function a(e){return function(){return e}}function o(){return(Math.random()-.5)*1e-6}function s(e){return e.x+e.vx}function l(e){return e.y+e.vy}function c(e){return e.index}function u(e,t){var r=e.get(t);if(!r)throw Error("missing: "+t);return r}function h(e){return e.x}function f(e){return e.y}var d=Math.PI*(3-Math.sqrt(5));e.forceCenter=function(e,t){var r;function n(){var n,i,a=r.length,o=0,s=0;for(n=0;nu.index){var h=f-s.x-s.vx,g=d-s.y-s.vy,y=h*h+g*g;yf+c||nd+c||ae.r&&(e.r=e[t].r)}function f(){if(r){var t,i,a=r.length;for(n=Array(a),t=0;t=c)){(e.data!==r||e.next)&&(0===h&&(p+=(h=o())*h),0===f&&(p+=(f=o())*f),p1?(null==r?u.remove(e):u.set(e,y(r)),t):u.get(e)},find:function(t,r,n){var i,a,o,s,l,c=0,u=e.length;for(null==n?n=1/0:n*=n,c=0;c1?(f.on(e,r),t):f.on(e)}}},e.forceX=function(e){var t,r,n,i=a(.1);function o(e){for(var i,a=0,o=t.length;atypeof t?r(e,xe(),xt(),xr(),xn()):r(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)}}),xa=d({"node_modules/d3-path/dist/d3-path.js"(e,t){var r;r=e,function(e){var t=Math.PI,r=2*t,n=r-1e-6;function i(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function a(){return new i}i.prototype=a.prototype={constructor:i,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(e,t,r,n,i,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(e,r,n,i,a){e*=1,r*=1,n*=1,i*=1,a*=1;var o=this._x1,s=this._y1,l=n-e,c=i-r,u=o-e,h=s-r,f=u*u+h*h;if(a<0)throw Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=r);else if(f>1e-6)if(Math.abs(h*l-c*u)>1e-6&&a){var d=n-o,p=i-s,m=l*l+c*c,g=Math.sqrt(m),y=Math.sqrt(f),v=a*Math.tan((t-Math.acos((m+f-(d*d+p*p))/(2*g*y)))/2),x=v/y,b=v/g;Math.abs(x-1)>1e-6&&(this._+="L"+(e+x*u)+","+(r+x*h)),this._+="A"+a+","+a+",0,0,"+ +(h*d>u*p)+","+(this._x1=e+b*l)+","+(this._y1=r+b*c)}else this._+="L"+(this._x1=e)+","+(this._y1=r)},arc:function(e,i,a,o,s,l){e*=1,i*=1,a*=1,l=!!l;var c=a*Math.cos(o),u=a*Math.sin(o),h=e+c,f=i+u,d=1^l,p=l?o-s:s-o;if(a<0)throw 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&&(p<0&&(p=p%r+r),p>n?this._+="A"+a+","+a+",0,1,"+d+","+(e-c)+","+(i-u)+"A"+a+","+a+",0,1,"+d+","+(this._x1=h)+","+(this._y1=f):p>1e-6&&(this._+="A"+a+","+a+",0,"+ +(p>=t)+","+d+","+(this._x1=e+a*Math.cos(s))+","+(this._y1=i+a*Math.sin(s))))},rect:function(e,t,r,n){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}},e.path=a,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),xo=d({"node_modules/d3-shape/dist/d3-shape.js"(e,t){var r,n;r=e,n=function(e,t){function r(e){return function(){return e}}var n=Math.abs,i=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,c=Math.sqrt,u=Math.PI,h=u/2,f=2*u;function d(e){return e>=1?h:e<=-1?-h:Math.asin(e)}function p(e){return e.innerRadius}function m(e){return e.outerRadius}function g(e){return e.startAngle}function y(e){return e.endAngle}function v(e){return e&&e.padAngle}function x(e,t,r,n,i,a,s){var l=e-r,u=t-n,h=(s?a:-a)/c(l*l+u*u),f=h*u,d=-h*l,p=e+f,m=t+d,g=r+f,y=n+d,v=(p+g)/2,x=(m+y)/2,b=g-p,_=y-m,w=b*b+_*_,k=i-a,T=p*y-g*m,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-v,I=S-x,P=E-v,z=C-x;return L*L+I*I>P*P+z*z&&(M=E,S=C),{cx:M,cy:S,x01:-f,y01:-d,x11:M*(i/k-1),y11:S*(i/k-1)}}function b(e){this._context=e}function _(e){return new b(e)}function w(e){return e[0]}function k(e){return e[1]}function T(){var e=w,n=k,i=r(!0),a=null,o=_,s=null;function l(r){var l,c,u,h=r.length,f=!1;for(null==a&&(s=o(u=t.path())),l=0;l<=h;++l)!(l=h;--f)c.point(y[f],v[f]);c.lineEnd(),c.areaEnd()}g&&(y[u]=+e(d,u,r),v[u]=+i(d,u,r),c.point(n?+n(d,u,r):y[u],a?+a(d,u,r):v[u]))}if(p)return c=null,p+""||null}function h(){return T().defined(o).curve(l).context(s)}return u.x=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),n=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),u):e},u.x1=function(e){return arguments.length?(n=null==e?null:"function"==typeof e?e:r(+e),u):n},u.y=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),a=null,u):i},u.y0=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),u):i},u.y1=function(e){return arguments.length?(a=null==e?null:"function"==typeof e?e:r(+e),u):a},u.lineX0=u.lineY0=function(){return h().x(e).y(i)},u.lineY1=function(){return h().x(e).y(a)},u.lineX1=function(){return h().x(n).y(i)},u.defined=function(e){return arguments.length?(o="function"==typeof e?e:r(!!e),u):o},u.curve=function(e){return arguments.length?(l=e,null!=s&&(c=l(s)),u):l},u.context=function(e){return arguments.length?(null==e?s=c=null:c=l(s=e),u):s},u}function M(e,t){return te?1:t>=e?0:NaN}function S(e){return e}b.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(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var E=L(_);function C(e){this._curve=e}function L(e){function t(t){return new C(e(t))}return t._curve=e,t}function I(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function P(){return I(T().curve(E))}function z(){var e=A().curve(E),t=e.curve,r=e.lineX0,n=e.lineX1,i=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return I(r())},delete e.lineX0,e.lineEndAngle=function(){return I(n())},delete e.lineX1,e.lineInnerRadius=function(){return I(i())},delete e.lineY0,e.lineOuterRadius=function(){return I(a())},delete e.lineY1,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function O(e,t){return[(t*=1)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}C.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),-(t*Math.cos(e)))}};var D=Array.prototype.slice;function R(e){return e.source}function j(e){return e.target}function F(e){var n=R,i=j,a=w,o=k,s=null;function l(){var r,l=D.call(arguments),c=n.apply(this,l),u=i.apply(this,l);if(s||(s=r=t.path()),e(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(e){return arguments.length?(n=e,l):n},l.target=function(e){return arguments.length?(i=e,l):i},l.x=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),l):a},l.y=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}function B(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function N(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+i)/2,n,r,n,i)}function U(e,t,r,n,i){var a=O(t,r),o=O(t,r=(r+i)/2),s=O(n,r),l=O(n,i);e.moveTo(a[0],a[1]),e.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var V={draw:function(e,t){var r=Math.sqrt(t/u);e.moveTo(r,0),e.arc(0,0,r,0,f)}},q={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},H=Math.sqrt(1/3),G=2*H,W={draw:function(e,t){var r=Math.sqrt(t/G),n=r*H;e.moveTo(0,-r),e.lineTo(n,0),e.lineTo(0,r),e.lineTo(-n,0),e.closePath()}},Y=Math.sin(u/10)/Math.sin(7*u/10),X=Math.sin(f/10)*Y,Z=-Math.cos(f/10)*Y,$={draw:function(e,t){var r=Math.sqrt(.8908130915292852*t),n=X*r,i=Z*r;e.moveTo(0,-r),e.lineTo(n,i);for(var a=1;a<5;++a){var o=f*a/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*r,-s*r),e.lineTo(s*n-l*i,l*n+s*i)}e.closePath()}},K={draw:function(e,t){var r=Math.sqrt(t),n=-r/2;e.rect(n,n,r,r)}},J=Math.sqrt(3),Q={draw:function(e,t){var r=-Math.sqrt(t/(3*J));e.moveTo(0,2*r),e.lineTo(-J*r,-r),e.lineTo(J*r,-r),e.closePath()}},ee=Math.sqrt(3)/2,et=1/Math.sqrt(12),er=(et/2+1)*3,en={draw:function(e,t){var r=Math.sqrt(t/er),n=r/2,i=r*et,a=r*et+r,o=-n;e.moveTo(n,i),e.lineTo(n,a),e.lineTo(o,a),e.lineTo(-.5*n-ee*i,ee*n+-.5*i),e.lineTo(-.5*n-ee*a,ee*n+-.5*a),e.lineTo(-.5*o-ee*a,ee*o+-.5*a),e.lineTo(-.5*n+ee*i,-.5*i-ee*n),e.lineTo(-.5*n+ee*a,-.5*a-ee*n),e.lineTo(-.5*o+ee*a,-.5*a-ee*o),e.closePath()}},ei=[V,q,W,K,$,Q,en];function ea(){}function eo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function es(e){this._context=e}function el(e){this._context=e}function ec(e){this._context=e}function eu(e,t){this._basis=new es(e),this._beta=t}es.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:eo(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(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},el.prototype={areaStart:ea,areaEnd:ea,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(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ec.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(e,t){switch(e*=1,t*=1,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+e)/6,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},eu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var n,i=e[0],a=t[0],o=e[r]-i,s=t[r]-a,l=-1;++l<=r;)n=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(i+n*o),this._beta*t[l]+(1-this._beta)*(a+n*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var eh=function e(t){function r(e){return 1===t?new es(e):new eu(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function ef(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function ed(e,t){this._context=e,this._k=(1-t)/6}ed.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:ef(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ef(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ep=function e(t){function r(e){return new ed(e,t)}return r.tension=function(t){return e(+t)},r}(0);function em(e,t){this._context=e,this._k=(1-t)/6}em.prototype={areaStart:ea,areaEnd:ea,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(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ef(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var eg=function e(t){function r(e){return new em(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ey(e,t){this._context=e,this._k=(1-t)/6}ey.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(e,t){switch(e*=1,t*=1,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:ef(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ev=function e(t){function r(e){return new ey(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ex(e,t,r){var n=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);n=(n*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>1e-12){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(n,i,a,o,e._x2,e._y2)}function eb(e,t){this._context=e,this._alpha=t}eb.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(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,n=this._y2-t;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(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var e_=function e(t){function r(e){return t?new eb(e,t):new ed(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function ew(e,t){this._context=e,this._alpha=t}ew.prototype={areaStart:ea,areaEnd:ea,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(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,n=this._y2-t;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=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ek=function e(t){function r(e){return t?new ew(e,t):new em(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function eT(e,t){this._context=e,this._alpha=t}eT.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(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,n=this._y2-t;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:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var eA=function e(t){function r(e){return t?new eT(e,t):new ey(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function eM(e){this._context=e}eM.prototype={areaStart:ea,areaEnd:ea,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e*=1,t*=1,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function eS(e,t,r){var n=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(n||i<0&&-0),o=(r-e._y1)/(i||n<0&&-0);return((a<0?-1:1)+(o<0?-1:1))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*i+o*n)/(n+i)))||0}function eE(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function eC(e,t,r){var n=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-n)/3;e._context.bezierCurveTo(n+s,i+s*t,a-s,o-s*r,a,o)}function eL(e){this._context=e}function eI(e){this._context=new eP(e)}function eP(e){this._context=e}function ez(e){this._context=e}function eO(e){var t,r,n=e.length-1,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t1)for(var r,n,i,a=1,o=e[t[0]],s=o.length;a=0;)r[t]=t;return r}function eF(e,t){return e[t]}function eB(e){var t=e.map(eN);return ej(e).sort(function(e,r){return t[e]-t[r]})}function eN(e){for(var t,r=-1,n=0,i=e.length,a=-1/0;++ra&&(a=t,n=r);return n}function eU(e){var t=e.map(eV);return ej(e).sort(function(e,r){return t[e]-t[r]})}function eV(e){for(var t,r=0,n=-1,i=e.length;++n=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}},e.arc=function(){var e=p,o=m,b=r(0),_=null,w=g,k=y,T=v,A=null;function M(){var r,p,m=+e.apply(this,arguments),g=+o.apply(this,arguments),y=w.apply(this,arguments)-h,v=k.apply(this,arguments)-h,M=n(v-y),S=v>y;if(A||(A=r=t.path()),g1e-12)if(M>f-1e-12)A.moveTo(g*a(y),g*l(y)),A.arc(0,0,g,y,v,!S),m>1e-12&&(A.moveTo(m*a(v),m*l(v)),A.arc(0,0,m,v,y,S));else{var E,C,L=y,I=v,P=y,z=v,O=M,D=M,R=T.apply(this,arguments)/2,j=R>1e-12&&(_?+_.apply(this,arguments):c(m*m+g*g)),F=s(n(g-m)/2,+b.apply(this,arguments)),B=F,N=F;if(j>1e-12){var U=d(j/m*l(R)),V=d(j/g*l(R));(O-=2*U)>1e-12?(U*=S?1:-1,P+=U,z-=U):(O=0,P=z=(y+v)/2),(D-=2*V)>1e-12?(V*=S?1:-1,L+=V,I-=V):(D=0,L=I=(y+v)/2)}var q=g*a(L),H=g*l(L),G=m*a(z),W=m*l(z);if(F>1e-12){var Y,X=g*a(I),Z=g*l(I),$=m*a(P),K=m*l(P);if(M1?0:J<-1?u:Math.acos(J))/2),ei=c(Y[0]*Y[0]+Y[1]*Y[1]);B=s(F,(m-ei)/(en-1)),N=s(F,(g-ei)/(en+1))}}D>1e-12?N>1e-12?(E=x($,K,q,H,g,N,S),C=x(X,Z,G,W,g,N,S),A.moveTo(E.cx+E.x01,E.cy+E.y01),N1e-12&&O>1e-12?B>1e-12?(E=x(G,W,X,Z,m,-B,S),C=x(q,H,$,K,m,-B,S),A.lineTo(E.cx+E.x01,E.cy+E.y01),B0&&(p+=h);for(null!=t?m.sort(function(e,r){return t(g[e],g[r])}):null!=n&&m.sort(function(e,t){return n(r[e],r[t])}),s=0,c=p?(v-d*b)/p:0;s0?h*c:0)+b,g[l]={data:r[l],index:s,value:h,startAngle:y,endAngle:u,padAngle:x};return g}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,n=null,s):t},s.sort=function(e){return arguments.length?(n=e,t=null,s):n},s.startAngle=function(e){return arguments.length?(i="function"==typeof e?e:r(+e),s):i},s.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),s):a},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),s):o},s},e.pointRadial=O,e.radialArea=z,e.radialLine=P,e.stack=function(){var e=r([]),t=ej,n=eR,i=eF;function a(r){var a,o,s=e.apply(this,arguments),l=r.length,c=s.length,u=Array(c);for(a=0;a0)for(var r,n,i,a,o,s,l=0,c=e[t[0]].length;l0?(n[0]=a,n[1]=a+=i):i<0?(n[1]=o,n[0]=o+=i):(n[0]=0,n[1]=i)},e.stackOffsetExpand=function(e,t){if((n=e.length)>0){for(var r,n,i,a=0,o=e[0].length;a0){for(var r,n=0,i=e[t[0]],a=i.length;n0&&(n=(r=e[t[0]]).length)>0){for(var r,n,i,a=0,o=1;otypeof t?n(e,xa()):n((r=r||self).d3=r.d3||{},r.d3)}}),xs=d({"node_modules/@plotly/d3-sankey/dist/@plotly/d3-sankey.js"(e,t){var r,n;r=e,n=function(e,t,r){function n(e){return e.target.depth}function i(e,t){return e.sourceLinks.length?e.depth:t-1}function a(e){return function(){return e}}function o(e,t){return l(e.source,t.source)||e.index-t.index}function s(e,t){return l(e.target,t.target)||e.index-t.index}function l(e,t){return e.y0-t.y0}function c(e){return e.value}function u(e){return e.index}function h(e){return e.nodes}function f(e){return e.links}function d(e,t){let r=e.get(t);if(!r)throw Error("missing: "+t);return r}function p({nodes:e}){for(let t of e){let e=t.y0,r=e;for(let r of t.sourceLinks)r.y0=e+r.width/2,e+=r.width;for(let e of t.targetLinks)e.y1=r+e.width/2,r+=e.width}}function m(e){return[e.source.x1,e.y0]}function g(e){return[e.target.x0,e.y1]}e.sankey=function(){let e=0,r=0,n=1,m=1,g=24,y=8,v,x=u,b=i,_,w,k=h,T=f,A=6,M=2/3;function S(){let i={nodes:k.apply(null,arguments),links:T.apply(null,arguments)};return function({nodes:e,links:t}){for(let[t,r]of e.entries())r.index=t,r.sourceLinks=[],r.targetLinks=[];let r=new Map(e.map((t,r)=>[x(t,r,e),t]));for(let[e,n]of t.entries()){n.index=e;let{source:t,target:i}=n;"object"!=typeof t&&(t=n.source=d(r,t)),"object"!=typeof i&&(i=n.target=d(r,i)),t.sourceLinks.push(n),i.targetLinks.push(n)}if(null!=w)for(let{sourceLinks:t,targetLinks:r}of e)t.sort(w),r.sort(w)}(i),function({nodes:e}){for(let r of e)r.value=void 0===r.fixedValue?Math.max(t.sum(r.sourceLinks,c),t.sum(r.targetLinks,c)):r.fixedValue}(i),function({nodes:e}){let t=e.length,r=new Set(e),n=new Set,i=0;for(;r.size;){for(let e of r)for(let{target:t}of(e.depth=i,e.sourceLinks))n.add(t);if(++i>t)throw Error("circular link");r=n,n=new Set}}(i),function({nodes:e}){let t=e.length,r=new Set(e),n=new Set,i=0;for(;r.size;){for(let e of r)for(let{source:t}of(e.height=i,e.targetLinks))n.add(t);if(++i>t)throw Error("circular link");r=n,n=new Set}}(i),function(i){let a=function({nodes:r}){let i=t.max(r,e=>e.depth)+1,a=(n-e-g)/(i-1),o=Array(i);for(let t of r){let r=Math.max(0,Math.min(i-1,Math.floor(b.call(null,t,i))));t.layer=r,t.x0=e+r*a,t.x1=t.x0+g,o[r]?o[r].push(t):o[r]=[t]}if(_)for(let e of o)e.sort(_);return o}(i);v=Math.min(y,M*(m-r)/(t.max(a,e=>e.length)-1)),function(e){let n=t.min(e,e=>(m-r-(e.length-1)*v)/t.sum(e,c));for(let t of e){let e=r;for(let r of t)for(let t of(r.y0=e,r.y1=e+r.value*n,e=r.y1+v,r.sourceLinks))t.width=t.value*n;e=(m-e+v)/(t.length+1);for(let r=0;r=0;--i){let n=e[i];for(let e of n){let r=0,n=0;for(let{target:t,value:i}of e.sourceLinks){let a=i*(t.layer-e.layer);r+=function(e,t){let r=t.y0-(t.targetLinks.length-1)*v/2;for(let{source:n,width:i}of t.targetLinks){if(n===e)break;r+=i+v}for(let{target:n,width:i}of e.sourceLinks){if(n===t)break;r-=i}return r}(e,t)*a,n+=a}if(!(n>0))continue;let i=(r/n-e.y0)*t;e.y0+=i,e.y1+=i,I(e)}void 0===_&&n.sort(l),E(n,r)}})(a,t,r),function(e,t,r){for(let n=1,i=e.length;n0))continue;let i=(r/n-e.y0)*t;e.y0+=i,e.y1+=i,I(e)}void 0===_&&i.sort(l),E(i,r)}}(a,t,r)}}(i),p(i),i}function E(e,t){let n=e.length>>1,i=e[n];L(e,i.y0-v,n-1,t),C(e,i.y1+v,n+1,t),L(e,m,e.length-1,t),C(e,r,0,t)}function C(e,t,r,n){for(;r1e-6&&(i.y0+=a,i.y1+=a),t=i.y1+v}}function L(e,t,r,n){for(;r>=0;--r){let i=e[r],a=(i.y1-t)*n;a>1e-6&&(i.y0-=a,i.y1-=a),t=i.y0-v}}function I({sourceLinks:e,targetLinks:t}){if(void 0===w){for(let{source:{sourceLinks:e}}of t)e.sort(s);for(let{target:{targetLinks:t}}of e)t.sort(o)}}return S.update=function(e){return p(e),e},S.nodeId=function(e){return arguments.length?(x="function"==typeof e?e:a(e),S):x},S.nodeAlign=function(e){return arguments.length?(b="function"==typeof e?e:a(e),S):b},S.nodeSort=function(e){return arguments.length?(_=e,S):_},S.nodeWidth=function(e){return arguments.length?(g=+e,S):g},S.nodePadding=function(e){return arguments.length?(y=v=+e,S):y},S.nodes=function(e){return arguments.length?(k="function"==typeof e?e:a(e),S):k},S.links=function(e){return arguments.length?(T="function"==typeof e?e:a(e),S):T},S.linkSort=function(e){return arguments.length?(w=e,S):w},S.size=function(t){return arguments.length?(e=r=0,n=+t[0],m=+t[1],S):[n-e,m-r]},S.extent=function(t){return arguments.length?(e=+t[0][0],n=+t[1][0],r=+t[0][1],m=+t[1][1],S):[[e,r],[n,m]]},S.iterations=function(e){return arguments.length?(A=+e,S):A},S},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,n)-1:0},e.sankeyJustify=i,e.sankeyLeft=function(e){return e.depth},e.sankeyLinkHorizontal=function(){return r.linkHorizontal().source(m).target(g)},e.sankeyRight=function(e,t){return t-1-e.height},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?n(e,pX(),xo()):n((r=r||self).d3=r.d3||{},r.d3,r.d3)}}),xl=d({"node_modules/elementary-circuits-directed-graph/johnson.js"(e,t){var r=v9();t.exports=function(e,t){var n,i=[],a=[],o=[],s={},l=[];n=0;for(var c=e.length;n=t});for(var i,a=r(e),o=a.components.filter(function(e){return e.length>1}),s=1/0,l=0;l1||i>1)}function T(e,t,r){return e.sort(M),e.forEach(function(n,i){var a=0;if(B(n,r)&&k(n))n.circularPathData.verticalBuffer=a+n.width/2;else{for(var o,s,l=0;ls.source.column)){var c=e[l].circularPathData.verticalBuffer+e[l].width/2+t;a=c>a?c:a}n.circularPathData.verticalBuffer=a+n.width/2}}),e}function A(e,r,i,a){var o=t.min(e.links,function(e){return e.source.y0});e.links.forEach(function(e){e.circular&&(e.circularPathData={})}),T(e.links.filter(function(e){return"top"==e.circularLinkType}),r,a),T(e.links.filter(function(e){return"bottom"==e.circularLinkType}),r,a),e.links.forEach(function(t){if(t.circular){if(t.circularPathData.arcRadius=t.width+10,t.circularPathData.leftNodeBuffer=5,t.circularPathData.rightNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,B(t,a)&&k(t))t.circularPathData.leftSmallArcRadius=10+t.width/2,t.circularPathData.leftLargeArcRadius=10+t.width/2,t.circularPathData.rightSmallArcRadius=10+t.width/2,t.circularPathData.rightLargeArcRadius=10+t.width/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+25+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-25-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius);else{var s,l=t.source.column,c=t.circularLinkType,u=e.links.filter(function(e){return e.source.column==l&&e.circularLinkType==c});"bottom"==t.circularLinkType?u.sort(E):u.sort(S);var h=0;u.forEach(function(e,n){e.circularLinkID==t.circularLinkID&&(t.circularPathData.leftSmallArcRadius=10+t.width/2+h,t.circularPathData.leftLargeArcRadius=10+t.width/2+n*r+h),h+=e.width}),l=t.target.column,u=e.links.filter(function(e){return e.target.column==l&&e.circularLinkType==c}),"bottom"==t.circularLinkType?u.sort(L):u.sort(C),h=0,u.forEach(function(e,n){e.circularLinkID==t.circularLinkID&&(t.circularPathData.rightSmallArcRadius=10+t.width/2+h,t.circularPathData.rightLargeArcRadius=10+t.width/2+n*r+h),h+=e.width}),"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(i,t.source.y1,t.target.y1)+25+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=o-25-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius)}t.circularPathData.leftInnerExtent=t.circularPathData.sourceX+t.circularPathData.leftNodeBuffer,t.circularPathData.rightInnerExtent=t.circularPathData.targetX-t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.sourceX+t.circularPathData.leftLargeArcRadius+t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.targetX-t.circularPathData.rightLargeArcRadius-t.circularPathData.rightNodeBuffer}t.circular?t.path="top"==(s=t).circularLinkType?"M"+s.circularPathData.sourceX+" "+s.circularPathData.sourceY+" L"+s.circularPathData.leftInnerExtent+" "+s.circularPathData.sourceY+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftSmallArcRadius+" 0 0 0 "+s.circularPathData.leftFullExtent+" "+(s.circularPathData.sourceY-s.circularPathData.leftSmallArcRadius)+" L"+s.circularPathData.leftFullExtent+" "+s.circularPathData.verticalLeftInnerExtent+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftLargeArcRadius+" 0 0 0 "+s.circularPathData.leftInnerExtent+" "+s.circularPathData.verticalFullExtent+" L"+s.circularPathData.rightInnerExtent+" "+s.circularPathData.verticalFullExtent+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightLargeArcRadius+" 0 0 0 "+s.circularPathData.rightFullExtent+" "+s.circularPathData.verticalRightInnerExtent+" L"+s.circularPathData.rightFullExtent+" "+(s.circularPathData.targetY-s.circularPathData.rightSmallArcRadius)+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightSmallArcRadius+" 0 0 0 "+s.circularPathData.rightInnerExtent+" "+s.circularPathData.targetY+" L"+s.circularPathData.targetX+" "+s.circularPathData.targetY:"M"+s.circularPathData.sourceX+" "+s.circularPathData.sourceY+" L"+s.circularPathData.leftInnerExtent+" "+s.circularPathData.sourceY+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftSmallArcRadius+" 0 0 1 "+s.circularPathData.leftFullExtent+" "+(s.circularPathData.sourceY+s.circularPathData.leftSmallArcRadius)+" L"+s.circularPathData.leftFullExtent+" "+s.circularPathData.verticalLeftInnerExtent+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftLargeArcRadius+" 0 0 1 "+s.circularPathData.leftInnerExtent+" "+s.circularPathData.verticalFullExtent+" L"+s.circularPathData.rightInnerExtent+" "+s.circularPathData.verticalFullExtent+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightLargeArcRadius+" 0 0 1 "+s.circularPathData.rightFullExtent+" "+s.circularPathData.verticalRightInnerExtent+" L"+s.circularPathData.rightFullExtent+" "+(s.circularPathData.targetY+s.circularPathData.rightSmallArcRadius)+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightSmallArcRadius+" 0 0 1 "+s.circularPathData.rightInnerExtent+" "+s.circularPathData.targetY+" L"+s.circularPathData.targetX+" "+s.circularPathData.targetY:t.path=n.linkHorizontal().source(function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]}).target(function(e){return[e.target.x0,e.y1]})(t)})}function M(e,t){return I(e)==I(t)?"bottom"==e.circularLinkType?E(e,t):S(e,t):I(t)-I(e)}function S(e,t){return e.y0-t.y0}function E(e,t){return t.y0-e.y0}function C(e,t){return e.y1-t.y1}function L(e,t){return t.y1-e.y1}function I(e){return e.target.column-e.source.column}function P(e){return e.target.x0-e.source.x1}function z(e,t){var r=_(e),n=P(t)/Math.tan(r);return"up"==F(e)?e.y1+n:e.y1-n}function O(e,t){var r=_(e),n=P(t)/Math.tan(r);return"up"==F(e)?e.y1-n:e.y1+n}function D(e,t,r,n){return e.y0+t>=r&&e.y1+t<=n&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach(function(e){e.y1=e.y1+t}),e.sourceLinks.forEach(function(e){e.y0=e.y0+t})),e}function R(e,t,r,n){e.nodes.forEach(function(i){n&&i.y+(i.y1-i.y0)>t&&(i.y=i.y-(i.y+(i.y1-i.y0)-t));var a=e.links.filter(function(e){return r(e.source)==r(i)}),o=a.length;o>1&&a.sort(function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(r=e,n=t,F(r)!=F(n))return e.y1-t.y1;if(e.target.column>t.target.column){var r,n,i=O(t,e);return e.y1-i}if(t.target.column>e.target.column)return O(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0});var s=i.y0;a.forEach(function(e){e.y0=s+e.width/2,s+=e.width}),a.forEach(function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,n=0;r1&&n.sort(function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(r=e,n=t,F(r)!=F(n))return e.y0-t.y0;if(t.source.column0?"up":"down"}function B(e,t){return t(e.source)==t(e.target)}e.sankeyCircular=function(){var e,n,a=0,_=0,k=1,T=1,M=24,S=g,E=o,C=y,L=v,I=32,P=2,z=null;function O(){var o,s,c={nodes:C.apply(null,arguments),links:L.apply(null,arguments)};(o=c).nodes.forEach(function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}),s=r.map(o.nodes,S),o.links.forEach(function(e,t){e.index=t;var r=e.source,n=e.target;(typeof r>"u"?"undefined":l(r))!=="object"&&(r=e.source=x(s,r)),(typeof n>"u"?"undefined":l(n))!=="object"&&(n=e.target=x(s,n)),r.sourceLinks.push(e),n.targetLinks.push(e)}),function(e,t){var r=0;if(null===t){for(var n=[],a=0;ar.indexOf(e.target)&&!e.circular&&r.push(e.target)})});for(t=e.nodes,r=[],n=0;t.length;++n,t=r,r=[])t.forEach(function(e){e.height=n,e.targetLinks.forEach(function(e){0>r.indexOf(e.source)&&!e.circular&&r.push(e.source)})});e.nodes.forEach(function(e){e.column=Math.floor(E.call(null,e,n))})}(c),b(c,S),function(i,o,s){var l=r.nest().key(function(e){return e.column}).sortKeys(t.ascending).entries(i.nodes).map(function(e){return e.values});(function(r){if(n){var o,s,c,u,h,d,p,m,g,y,v,x,b=1/0;l.forEach(function(e){var t=T*n/(e.length+1);b=t0?o+25+10:o,bottom:s=s>0?s+25+10:s,left:u=u>0?u+25+10:u,right:c=c>0?c+25+10:c}),E=(d=t.max(i.nodes,function(e){return e.column}),p=k-a,m=T-_,g=p+S.right+S.left,y=m+S.top+S.bottom,v=p/g,x=m/y,a=a*v+S.left,k=0==S.right?k:k*v,_=_*x+S.top,T*=x,i.nodes.forEach(function(e){e.x0=a+e.column*((k-a-M)/d),e.x1=e.x0+M}),x);A*=E,i.links.forEach(function(e){e.width=e.value*A}),l.forEach(function(e){var t=e.length;e.forEach(function(e,n){e.depth==l.length-1&&1==t||0==e.depth&&1==t?e.y0=T/2-e.value*A:e.partOfCycle?0==w(e,r)?e.y0=T/2+n:"top"==e.circularLinkType?e.y0=_+n:e.y0=T-e.value*A-n:0==S.top||0==S.bottom?e.y0=(T-_)/t*n:e.y0=(T-_)/2-t/2+n,e.y1=e.y0+e.value*A})})})(s),g();for(var c=1,u=o;u>0;--u)(function(e,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)&&!(i.partOfCycle&&w(i,r)>0))if(0==o&&1==a)s=i.y1-i.y0,i.y0=T/2-s/2,i.y1=T/2+s/2;else if(o==n-1&&1==a)s=i.y1-i.y0,i.y0=T/2-s/2,i.y1=T/2+s/2;else{var l=t.mean(i.sourceLinks,m),c=t.mean(i.targetLinks,p),u=((l&&c?(l+c)/2:l||c)-d(i))*e;i.y0+=u,i.y1+=u}})})})(c*=.99,s),g();function g(){l.forEach(function(t){var r,n,i,a=_,o=t.length;for(t.sort(h),i=0;i0&&(r.y0+=n,r.y1+=n),a=r.y1+e;if((n=a-e-T)>0)for(a=r.y0-=n,r.y1-=n,i=o-2;i>=0;--i)(n=(r=t[i]).y1+e-a)>0&&(r.y0-=n,r.y1-=n),a=r.y0})}}(c,I,S),F(c);for(var u=0;u<4;u++)R(c,T,S),j(c,T,S),function(e,t,r,n){e.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++)e.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),d=3*Math.pow(u,2)*(1-u),p=Math.pow(u,3),m=h*i.y0+f*i.y0+d*i.y1+p*i.y1,g=m-i.width/2,y=m+i.width/2;g>o.y0&&ga.y0&&i.y0a.y0&&i.y1a.y1)&&D(e,c,t,r))})):y>o.y0&&yo.y1&&D(e,c,t,r)})):go.y1&&(c=y-o.y0+10,o=D(o,c,t,r),e.nodes.forEach(function(e){n(e)==n(o)||e.column!=o.column||e.y0o.y1&&D(e,c,t,r)}))}})}})}(c,_,T,S),R(c,T,S),j(c,T,S);return function(e,r,n){var i=e.nodes,a=e.links,o=!1,s=!1;if(a.forEach(function(e){"top"==e.circularLinkType?o=!0:"bottom"==e.circularLinkType&&(s=!0)}),!1==o||!1==s){var l=t.min(i,function(e){return e.y0}),c=(n-r)/(t.max(i,function(e){return e.y1})-l);i.forEach(function(e){var t=(e.y1-e.y0)*c;e.y0=(e.y0-l)*c,e.y1=e.y0+t}),a.forEach(function(e){e.y0=(e.y0-l)*c,e.y1=(e.y1-l)*c,e.width=e.width*c})}}(c,_,T),A(c,P,T,S),c}function F(e){e.nodes.forEach(function(e){e.sourceLinks.sort(u),e.targetLinks.sort(c)}),e.nodes.forEach(function(e){var t=e.y0,r=t,n=e.y1,i=n;e.sourceLinks.forEach(function(e){e.circular?(e.y0=n-e.width/2,n-=e.width):(e.y0=t+e.width/2,t+=e.width)}),e.targetLinks.forEach(function(e){e.circular?(e.y1=i-e.width/2,i-=e.width):(e.y1=r+e.width/2,r+=e.width)})})}return O.nodeId=function(e){return arguments.length?(S="function"==typeof e?e:s(e),O):S},O.nodeAlign=function(e){return arguments.length?(E="function"==typeof e?e:s(e),O):E},O.nodeWidth=function(e){return arguments.length?(M=+e,O):M},O.nodePadding=function(t){return arguments.length?(e=+t,O):e},O.nodes=function(e){return arguments.length?(C="function"==typeof e?e:s(e),O):C},O.links=function(e){return arguments.length?(L="function"==typeof e?e:s(e),O):L},O.size=function(e){return arguments.length?(a=_=0,k=+e[0],T=+e[1],O):[k-a,T-_]},O.extent=function(e){return arguments.length?(a=+e[0][0],k=+e[1][0],_=+e[0][1],T=+e[1][1],O):[[a,_],[k,T]]},O.iterations=function(e){return arguments.length?(I=+e,O):I},O.circularLinkGap=function(e){return arguments.length?(P=+e,O):P},O.nodePaddingRatio=function(e){return arguments.length?(n=+e,O):n},O.sortNodes=function(e){return arguments.length?(z=e,O):z},O.update=function(e){return b(e,S),F(e),e.links.forEach(function(e){e.circular&&(e.circularLinkType=e.y0+e.y1typeof t?r(e,pX(),xt(),xo(),xl()):r(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)}}),xu=d({"src/traces/sankey/constants.js"(e,t){t.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),xh=d({"src/traces/sankey/render.js"(e,t){var r=xi(),n=(fX(),y(fY)).interpolateNumber,i=b(),a=xs(),o=xc(),s=xu(),l=eC(),c=rE(),u=tY(),h=u.strTranslate,f=u.strRotate,d=yJ(),p=d.keyFun,m=d.repeat,g=d.unwrap,v=rr(),x=tv(),_=rt(),w=_.CAP_SHIFT,k=_.LINE_SPACING;function T(e,t,r){var n,i=g(t),l=i.trace,c=l.domain,h="h"===l.orientation,f=l.node.pad,d=l.node.thickness,p={justify:a.sankeyJustify,left:a.sankeyLeft,right:a.sankeyRight,center:a.sankeyCenter}[l.node.align],m=e.width*(c.x[1]-c.x[0]),y=e.height*(c.y[1]-c.y[0]),v=i._nodes,x=i._links,b=i.circular;function _(e){"input"===l[e].sort&&(b?u.warn(`Circular Sankey diagrams do not support the "input" ${e}.sort mode; falling back to the default sort.`):n[`${e}Sort`](null))}(n=b?o.sankeyCircular().circularLinkGap(0):a.sankey()).iterations(s.sankeyIterations).size(h?[m,y]:[y,m]).nodeWidth(d).nodePadding(f).nodeId(function(e){return e.pointNumber}).nodeAlign(p).nodes(v).links(x),_("link"),_("node");var w=n();for(var k in n.nodePadding()o+d&&(a+=1,t=s.x0),o=s.x0,i[a]||(i[a]=[]),i[a].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return i})(v=w.nodes).forEach(function(e){var t,r,n,i=0,a=e.length;for(e.sort(function(e,t){return e.y0-t.y0}),n=0;n=i||(r=i-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),i=t.y1+f}),n.update(w)}return{circular:b,key:r,trace:l,guid:u.randstr(),horizontal:h,width:m,height:y,nodePad:l.node.pad,nodeLineColor:l.node.line.color,nodeLineWidth:l.node.line.width,linkLineColor:l.link.line.color,linkLineWidth:l.link.line.width,linkArrowLength:l.link.arrowlen,valueFormat:l.valueformat,valueSuffix:l.valuesuffix,textFont:l.textfont,translateX:c.x[0]*e.width+e.margin.l,translateY:e.height-c.y[1]*e.height+e.margin.t,dragParallel:h?y:m,dragPerpendicular:h?m:y,arrangement:l.arrangement,sankey:n,graph:w,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function A(e,t,r){var n=t.source.label+"|"+t.target.label;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:n+"__"+r,traceId:e.key,pointNumber:t.pointNumber,link:t,rgb:l.rgb(t.color),alpha:l.color(t.color).alpha(),hoverRgb:l.rgb(t.hovercolor),hoverAlpha:l.color(t.hovercolor).alpha(),linkPath:M,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function M(){return function(e){var t,r,i,a,o,s,l,c=e.linkArrowLength;if(e.link.circular)return t=e.link,r=c,i="",a=t.width/2,s=(o=t.circularPathData).sourceX+o.verticalBuffer0?" L "+o.targetX+" "+o.targetY:"")+"Z"):(i="M "+(o.targetX-r)+" "+(o.targetY-a)+" L "+(o.rightInnerExtent-r)+" "+(o.targetY-a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightSmallArcRadius+a)+" 0 0 0 "+(o.rightFullExtent-a-r)+" "+(o.targetY+o.rightSmallArcRadius)+" L "+(o.rightFullExtent-a-r)+" "+o.verticalRightInnerExtent,s&&l?i+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightInnerExtent-a-r)+" "+(o.verticalFullExtent+a)+" L "+(o.rightFullExtent+a-r-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent+a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent:s?i+=" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightFullExtent-r-a-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" L "+(o.leftFullExtent+a+(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent:i+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightInnerExtent-r)+" "+(o.verticalFullExtent+a)+" L "+o.leftInnerExtent+" "+(o.verticalFullExtent+a)+" A "+(o.leftLargeArcRadius+a)+" "+(o.leftLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent,i+=" L "+(o.leftFullExtent+a)+" "+(o.sourceY+o.leftSmallArcRadius)+" A "+(o.leftLargeArcRadius+a)+" "+(o.leftSmallArcRadius+a)+" 0 0 0 "+o.leftInnerExtent+" "+(o.sourceY-a)+" L "+o.sourceX+" "+(o.sourceY-a)+" L "+o.sourceX+" "+(o.sourceY+a)+" L "+o.leftInnerExtent+" "+(o.sourceY+a)+" A "+(o.leftLargeArcRadius-a)+" "+(o.leftSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent-a)+" "+(o.sourceY+o.leftSmallArcRadius)+" L "+(o.leftFullExtent-a)+" "+o.verticalLeftInnerExtent,s&&l?i+=" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent-a-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" L "+(o.rightFullExtent+a-r+(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent:s?i+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+(o.verticalFullExtent+a)+" L "+(o.rightFullExtent-r-a)+" "+(o.verticalFullExtent+a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent:i+=" A "+(o.leftLargeArcRadius-a)+" "+(o.leftLargeArcRadius-a)+" 0 0 1 "+o.leftInnerExtent+" "+(o.verticalFullExtent-a)+" L "+(o.rightInnerExtent-r)+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightLargeArcRadius-a)+" 0 0 1 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent,i+=" L "+(o.rightFullExtent+a-r)+" "+(o.targetY+o.rightSmallArcRadius)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightInnerExtent-r)+" "+(o.targetY+a)+" L "+(o.targetX-r)+" "+(o.targetY+a)+(r>0?" L "+o.targetX+" "+o.targetY:"")+"Z"),i;var u=Math.abs((e.link.target.x0-e.link.source.x1)/2);c>u&&(c=u);var h=e.link.source.x1,f=e.link.target.x0-c,d=n(h,f),p=d(.5),m=d(.5),g=e.link.y0-e.link.width/2,y=e.link.y0+e.link.width/2,v=e.link.y1-e.link.width/2,x=e.link.y1+e.link.width/2,b="M"+h+","+g,_="C"+p+","+g+" "+m+","+v+" "+f+","+v,w="C"+m+","+x+" "+p+","+y+" "+h+","+y,k=c>0?"L"+(f+c)+","+(v+e.link.width/2):"";return b+_+(k+="L"+f+","+x)+w+"Z"}}function S(e,t){var r=s.nodePadAcross,n=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var i=t.dx,a=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=u.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(i),visibleHeight:a,zoneX:-r,zoneY:-n,zoneWidth:i+2*r,zoneHeight:a+2*n,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:l.color(t.color).isDark(),rgb:l.rgb(t.color),alpha:l.color(t.color).alpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function E(e){e.attr("transform",function(e){return h(e.node.x0.toFixed(3),e.node.y0.toFixed(3))})}function C(e){e.call(E)}function L(e,t){e.call(C),t.attr("d",M())}function I(e){e.attr("width",function(e){return e.node.x1-e.node.x0}).attr("height",function(e){return e.visibleHeight})}function P(e){return e.link.width>1||e.linkLineWidth>0}function z(e){return h(e.translateX,e.translateY)+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function O(e,t,r){e.on(".basic",null).on("mouseover.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.hover(this,e,t),e.interactionState.hovered=[this,e])}).on("mousemove.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.follow(this,e),e.interactionState.hovered=[this,e])}).on("mouseout.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.unhover(this,e,t),e.interactionState.hovered=!1)}).on("click.basic",function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||r.select(this,e,t)})}function D(e,t,n,a){var o=i.behavior.drag().origin(function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}}).on("dragstart",function(i){if("fixed"!==i.arrangement&&(u.ensureSingle(a._fullLayout._infolayer,"g","dragcover",function(e){a._fullLayout._dragCover=e}),u.raiseToTop(this),i.interactionState.dragInProgress=i.node,j(i.node),i.interactionState.hovered&&(n.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),"snap"===i.arrangement)){var o,l,c,h,f,d=i.traceId+"|"+i.key;i.forceLayouts[d]?i.forceLayouts[d].alpha(1):function(e,t,n){for(var i,a,o,l=n.graph.nodes,c=0;c0&&o.forceLayouts[i].alpha(0)})).stop()}(e,d,i),o=e,l=t,c=i,h=d,f=a,window.requestAnimationFrame(function e(){for(t=0;t0)window.requestAnimationFrame(e);else{var t,r=c.node.originalX;c.node.x0=r-c.visibleWidth/2,c.node.x1=r+c.visibleWidth/2,R(c,f)}})}}).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):("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,j(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),L(e.filter(F(r)),t))}}).on("dragend",function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;tP(e)?l.rgb(e.linkLineColor):e.rgb).style("stroke-opacity",e=>P(e)?l.opacity(e.linkLineColor):e.alpha).style("fill",e=>e.rgb).style("fill-opacity",e=>e.alpha).style("stroke-width",e=>P(e)?e.linkLineWidth:1).attr("d",M()),C.style("opacity",function(){return e._context.staticPlot||d||y?1:0}).transition().ease(s.ease).duration(s.duration).style("opacity",1),C.exit().transition().ease(s.ease).duration(s.duration).style("opacity",0).remove();var L=b.selectAll("."+s.cn.sankeyNodeSet).data(m,p);L.enter().append("g").classed(s.cn.sankeyNodeSet,!0),L.style("cursor",function(e){switch(e.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var R=L.selectAll("."+s.cn.sankeyNode).data(function(e){var t=e.graph.nodes;return function(e){var t,r=[];for(t=0;te.rgb).style("fill-opacity",e=>e.alpha),j.transition().ease(s.ease).duration(s.duration).call(I);var F=R.selectAll("."+s.cn.nodeLabel).data(m);F.enter().append("text").classed(s.cn.nodeLabel,!0).style("cursor","default"),F.attr("data-notex",1).text(function(e){return e.node.label}).each(function(t){var r=i.select(this);c.font(r,t.textFont),v.convertToTspans(r,e)}).attr("text-anchor",function(e){return e.horizontal&&e.left?"end":"start"}).attr("transform",function(e){var t=i.select(this),r=v.lineCount(t),n=e.textFont.size*((r-1)*k-w),a=e.nodeLineWidth/2+3,o=((e.horizontal?e.visibleHeight:e.visibleWidth)-n)/2;e.horizontal&&(e.left?a=-a:a+=e.visibleWidth);var s=e.horizontal?"":"scale(-1,1)"+f(90);return h(e.horizontal?a:o,e.horizontal?o:a)+s}),F.transition().ease(s.ease).duration(s.duration)}}}),xf=d({"src/traces/sankey/plot.js"(e,t){var r=b(),n=tY(),i=n.numberFormat,a=xh(),o=r7(),s=eC(),l=xu().cn,c=n._;function u(e){return""!==e}function h(e,t){return e.filter(function(e){return e.key===t.traceId})}function f(e,t){r.select(e).select("path").style("fill-opacity",t),r.select(e).select("rect").style("fill-opacity",t)}function d(e){r.select(e).select("text.name").style("fill","black")}function p(e){return function(t){return -1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(e){return function(t){return -1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(e,t,r){t&&r&&h(r,t).selectAll("."+l.sankeyLink).filter(p(t)).call(v.bind(0,t,r,!1))}function y(e,t,r){t&&r&&h(r,t).selectAll("."+l.sankeyLink).filter(p(t)).call(x.bind(0,t,r,!1))}function v(e,t,r,n){n.style("fill",function(e){if(!e.link.concentrationscale)return e.hoverRgb}).style("fill-opacity",function(e){if(!e.link.concentrationscale)return e.hoverAlpha}),n.each(function(r){var n=r.link.label;""!==n&&h(t,e).selectAll("."+l.sankeyLink).filter(function(e){return e.link.label===n}).style("fill",function(e){if(!e.link.concentrationscale)return e.hoverRgb}).style("fill-opacity",function(e){if(!e.link.concentrationscale)return e.hoverAlpha})}),r&&h(t,e).selectAll("."+l.sankeyNode).filter(m(e)).call(g)}function x(e,t,r,n){n.style("fill",function(e){return e.rgb}).style("fill-opacity",function(e){return e.alpha}),n.each(function(r){var n=r.link.label;""!==n&&h(t,e).selectAll("."+l.sankeyLink).filter(function(e){return e.link.label===n}).style("fill",e=>e.rgb).style("fill-opacity",e=>e.alpha)}),r&&h(t,e).selectAll(l.sankeyNode).filter(m(e)).call(y)}function _(e,t){var r=e.hoverlabel||{},i=n.nestedProperty(r,t).get();return!Array.isArray(i)&&i}t.exports=function(e,t){for(var n=e._fullLayout,h=n._paper,p=n._size,m=0;m"),color:_(l,"bgcolor")||s.addOpacity(m.color,1),borderColor:_(l,"bordercolor"),fontFamily:_(l,"font.family"),fontSize:_(l,"font.size"),fontColor:_(l,"font.color"),fontWeight:_(l,"font.weight"),fontStyle:_(l,"font.style"),fontVariant:_(l,"font.variant"),fontTextcase:_(l,"font.textcase"),fontLineposition:_(l,"font.lineposition"),fontShadow:_(l,"font.shadow"),nameLength:_(l,"namelength"),textAlign:_(l,"align"),idealAlign:r.event.x"),color:_(s,"bgcolor")||a.rgb,borderColor:_(s,"bordercolor"),fontFamily:_(s,"font.family"),fontSize:_(s,"font.size"),fontColor:_(s,"font.color"),fontWeight:_(s,"font.weight"),fontStyle:_(s,"font.style"),fontVariant:_(s,"font.variant"),fontTextcase:_(s,"font.textcase"),fontLineposition:_(s,"font.lineposition"),fontShadow:_(s,"font.shadow"),nameLength:_(s,"namelength"),textAlign:_(s,"align"),idealAlign:"left",hovertemplate:s.hovertemplate,hovertemplateLabels:v,eventData:[a.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:e});f(w,.85),d(w)}}},unhover:function(t,i,a){!1!==e._fullLayout.hovermode&&(r.select(t).call(y,i,a),"skip"!==i.node.trace.node.hoverinfo&&(i.node.fullData=i.node.trace,e.emit("plotly_unhover",{event:r.event,points:[i.node]})),o.loneUnhover(n._hoverlayer.node()))},select:function(t,n,i){var a=n.node;a.originalEvent=r.event,e._hoverdata=[a],r.select(t).call(y,n,i),o.click(e,{target:!0})}}})}}}),xd=d({"src/traces/sankey/base_plot.js"(e){var t=tl().overrideAll,r=t8().getModuleCalcData,n=xf(),i=H(),a=rV(),o=rU(),s=n$().prepSelect,l=tY(),c=tv(),u="sankey";e.name=u,e.baseLayoutAttrOverrides=t({hoverlabel:i.hoverlabel},"plot","nested"),e.plot=function(t){var i=r(t.calcdata,u)[0];n(t,i),e.updateFx(t)},e.clean=function(e,t,r,n){var i=n._has&&n._has(u),a=t._has&&t._has(u);i&&!a&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())},e.updateFx=function(e){for(var t=0;t0}function T(e){e.each(function(e){v.stroke(r.select(this),e.line.color)}).each(function(e){v.fill(r.select(this),e.color)}).style("stroke-width",function(e){return e.line.width})}function A(e,t,r){var n=e._fullLayout,i=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(i,o,g,e,t)}return p(i,o,l,s,n),m(i,o,l,s),o}function M(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function S(e,t,n,i){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=r.select(a);return o.text(e).attr("x",0).attr("y",0).attr("text-anchor",n).attr("data-unformatted",e).call(f.convertToTspans,i).call(u.font,t),u.bBox(o.node())}function E(e,t,r,n,i,o){var s="_cache"+t;e[s]&&e[s].key===i||(e[s]={key:i,value:r});var l=a.aggNums(o,null,[e[s].value,n],2);return e[s].value=l,l}t.exports=function(e,t,p,m){var g,y=e._fullLayout;k(p)&&m&&(g=m()),a.makeTraceGroups(y._indicatorlayer,t,"trace").each(function(t){var m,b,C,L,I,P=t[0].trace,z=r.select(this),O=P._hasGauge,D=P._isAngular,R=P._isBullet,j=P.domain,F={w:y._size.w*(j.x[1]-j.x[0]),h:y._size.h*(j.y[1]-j.y[0]),l:y._size.l+y._size.w*j.x[0],r:y._size.r+y._size.w*(1-j.x[1]),t:y._size.t+y._size.h*(1-j.y[1]),b:y._size.b+y._size.h*j.y[0]},B=F.l+F.w/2,N=F.t+F.h/2,U=Math.min(F.w/2,F.h),V=h.innerRadius*U,q=P.align||"center";if(L=N,O){if(D&&(C=B,L=N+U/2,I=function(e){var t,r;return t=e,[(r=.9*V)/Math.sqrt(t.width/2*(t.width/2)+t.height*t.height),t,r]}),R){var H=h.bulletPadding,G=1-h.bulletNumberDomainSize+H;C=F.l+(G+(1-G)*_[q])*F.w,I=function(e){return M(e,(h.bulletNumberDomainSize-H)*F.w,F.h)}}}else C=F.l+_[q]*F.w,I=function(e){return M(e,F.w,F.h)};(function(e,t,n,l){var c,h,p,m=n[0].trace,g=l.numbersX,y=l.numbersY,b=m.align||"center",T=x[b],M=l.transitionOpts,C=l.onComplete,L=a.ensureSingle(t,"g","numbers"),I=[];m._hasNumber&&I.push("number"),m._hasDelta&&(I.push("delta"),"left"===m.delta.position&&I.reverse());var P=L.selectAll("text").data(I);function z(t,r,n,i){if(!t.match("s")||n>=0==i>=0||r(n).slice(-1).match(w)||r(i).slice(-1).match(w))return r;var a=A(e,{tickformat:t.slice().replace("s","f").replace(/\d+/,function(e){return parseInt(e)-1})});return function(e){return 1>Math.abs(e)?d.tickText(a,e).text:r(e)}}P.enter().append("text"),P.attr("text-anchor",function(){return T}).attr("class",function(e){return e}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),P.exit().remove();var O,D=m.mode+m.align;if(m._hasDelta&&(O=function(){var t=A(e,{tickformat:m.delta.valueformat},m._range);t.setScale(),d.prepTicks(t);var a=function(e){return d.tickText(t,e).text},o=m.delta.suffix,s=m.delta.prefix,l=function(e){return m.delta.relative?e.relativeDelta:e.delta},c=function(e,t){return 0===e||"number"!=typeof e||isNaN(e)?"-":(e>0?m.delta.increasing.symbol:m.delta.decreasing.symbol)+s+t(e)+o},p=function(e){return e.delta>=0?m.delta.increasing.color:m.delta.decreasing.color};void 0===m._deltaLastValue&&(m._deltaLastValue=l(n[0]));var g=L.select("text.delta");function y(){g.text(c(l(n[0]),a)).call(v.fill,p(n[0])).call(f.convertToTspans,e)}return g.call(u.font,m.delta.font).call(v.fill,p({delta:m._deltaLastValue})),k(M)?g.transition().duration(M.duration).ease(M.easing).tween("text",function(){var e=r.select(this),t=l(n[0]),o=m._deltaLastValue,s=z(m.delta.valueformat,a,o,t),u=i(o,t);return m._deltaLastValue=t,function(t){e.text(c(u(t),s)),e.call(v.fill,p({delta:u(t)}))}}).each("end",function(){y(),C&&C()}).each("interrupt",function(){y(),C&&C()}):y(),h=S(c(l(n[0]),a),m.delta.font,T,e),g}(),D+=m.delta.position+m.delta.font.size+m.delta.font.family+m.delta.valueformat,D+=m.delta.increasing.symbol+m.delta.decreasing.symbol,p=h),m._hasNumber&&(function(){var t=A(e,{tickformat:m.number.valueformat},m._range);t.setScale(),d.prepTicks(t);var a=function(e){return d.tickText(t,e).text},o=m.number.suffix,s=m.number.prefix,l=L.select("text.number");function h(){var t="number"==typeof n[0].y?s+a(n[0].y)+o:"-";l.text(t).call(u.font,m.number.font).call(f.convertToTspans,e)}k(M)?l.transition().duration(M.duration).ease(M.easing).each("end",function(){h(),C&&C()}).each("interrupt",function(){h(),C&&C()}).attrTween("text",function(){var e=r.select(this),t=i(n[0].lastY,n[0].y);m._lastValue=n[0].y;var l=z(m.number.valueformat,a,n[0].lastY,n[0].y);return function(r){e.text(s+l(t(r))+o)}}):h(),c=S(s+a(n[0].y)+o,m.number.font,T,e)}(),D+=m.number.font.size+m.number.font.family+m.number.valueformat+m.number.suffix+m.number.prefix,p=c),m._hasDelta&&m._hasNumber){var R,j,F=[(c.left+c.right)/2,(c.top+c.bottom)/2],B=[(h.left+h.right)/2,(h.top+h.bottom)/2],N=.75*m.delta.font.size;"left"===m.delta.position&&(R=E(m,"deltaPos",0,-1*(c.width*_[m.align]+h.width*(1-_[m.align])+N),D,Math.min),j=F[1]-B[1],p={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:h.left+R,right:c.right,top:Math.min(c.top,h.top+j),bottom:Math.max(c.bottom,h.bottom+j)}),"right"===m.delta.position&&(R=E(m,"deltaPos",0,c.width*(1-_[m.align])+h.width*_[m.align]+N,D,Math.max),j=F[1]-B[1],p={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:c.left,right:h.right+R,top:Math.min(c.top,h.top+j),bottom:Math.max(c.bottom,h.bottom+j)}),"bottom"===m.delta.position&&(R=null,j=h.height,p={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height,bottom:c.bottom+h.height}),"top"===m.delta.position&&(R=null,j=c.top,p={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height-h.height,bottom:c.bottom}),O.attr({dx:R,dy:j})}(m._hasNumber||m._hasDelta)&&L.attr("transform",function(){var e=l.numbersScaler(p);D+=e[2];var t,r=E(m,"numbersScale",1,e[0],D,Math.min);m._scaleNumbers||(r=1),t=m._isAngular?y-r*p.bottom:y-r*(p.top+p.bottom)/2,m._numbersTop=r*p.top+t;var n=p[b];"center"===b&&(n=(p.left+p.right)/2);var i=g-r*n;return s(i=E(m,"numbersTranslate",0,i,D,Math.max),t)+o(r)})})(e,z,t,{numbersX:C,numbersY:L,numbersScaler:I,transitionOpts:p,onComplete:g}),O&&(m={range:P.gauge.axis.range,color:P.gauge.bgcolor,line:{color:P.gauge.bordercolor,width:0},thickness:1},b={range:P.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:P.gauge.bordercolor,width:P.gauge.borderwidth},thickness:1});var W=z.selectAll("g.angular").data(D?t:[]);W.exit().remove();var Y=z.selectAll("g.angularaxis").data(D?t:[]);Y.exit().remove(),D&&function(e,t,i){var a,o,u,h,f,p,m=t[0].trace,g=i.size,y=i.radius,v=i.innerRadius,x=i.gaugeBg,b=i.gaugeOutline,_=[g.l+g.w/2,g.t+g.h/2+y/2],w=i.gauge,M=i.layer,S=i.transitionOpts,E=i.onComplete,C=Math.PI/2;function L(e){var t=m.gauge.axis.range[0],r=(e-t)/(m.gauge.axis.range[1]-t)*Math.PI-C;return r<-C?-C:r>C?C:r}function I(e){return r.svg.arc().innerRadius((v+y)/2-e/2*(y-v)).outerRadius((v+y)/2+e/2*(y-v)).startAngle(-C)}function P(e){e.attr("d",function(e){return I(e.thickness).startAngle(L(e.range[0])).endAngle(L(e.range[1]))()})}w.enter().append("g").classed("angular",!0),w.attr("transform",s(_[0],_[1])),M.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),M.selectAll("g.xangularaxistick,path,text").remove(),(h=A(e,m.gauge.axis)).type="linear",h.range=m.gauge.axis.range,h._id="xangularaxis",h.ticklabeloverflow="allow",h.setScale();var z=function(e){return(h.range[0]-e.x)/(h.range[1]-h.range[0])*Math.PI+Math.PI},O={},D=d.makeLabelFns(h,0).labelStandoff;O.xFn=function(e){return Math.cos(z(e))*D},O.yFn=function(e){var t=z(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(D+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*c)},O.anchorFn=function(e){var t=Math.cos(z(e));return .1>Math.abs(t)?"middle":t>0?"start":"end"},O.heightFn=function(e,t,r){return -.5*(1+Math.sin(z(e)))*r};var R=function(e){return s(_[0]+y*Math.cos(e),_[1]-y*Math.sin(e))};if(f=d.calcTicks(h),p=d.getTickSigns(h)[2],h.visible){p="inside"===h.ticks?-1:1;var j=(h.linewidth||1)/2;d.drawTicks(e,h,{vals:f,layer:M,path:"M"+p*j+",0h"+p*h.ticklen,transFn:function(e){var t=z(e);return R(t)+"rotate("+-l(t)+")"}}),d.drawLabels(e,h,{vals:f,layer:M,transFn:function(e){return R(z(e))},labelFns:O})}var F=[x].concat(m.gauge.steps),B=w.selectAll("g.bg-arc").data(F);B.enter().append("g").classed("bg-arc",!0).append("path"),B.select("path").call(P).call(T),B.exit().remove();var N=I(m.gauge.bar.thickness),U=w.selectAll("g.value-arc").data([m.gauge.bar]);U.enter().append("g").classed("value-arc",!0).append("path");var V=U.select("path");k(S)?(V.transition().duration(S.duration).ease(S.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()}).attrTween("d",(a=N,o=L(t[0].lastY),u=L(t[0].y),function(){var e=n(o,u);return function(t){return a.endAngle(e(t))()}})),m._lastValue=t[0].y):V.attr("d","number"==typeof t[0].y?N.endAngle(L(t[0].y)):"M0,0Z"),V.call(T),U.exit().remove(),F=[];var q=m.gauge.threshold.value;(q||0===q)&&F.push({range:[q,q],color:m.gauge.threshold.color,line:{color:m.gauge.threshold.line.color,width:m.gauge.threshold.line.width},thickness:m.gauge.threshold.thickness});var H=w.selectAll("g.threshold-arc").data(F);H.enter().append("g").classed("threshold-arc",!0).append("path"),H.select("path").call(P).call(T),H.exit().remove();var G=w.selectAll("g.gauge-outline").data([b]);G.enter().append("g").classed("gauge-outline",!0).append("path"),G.select("path").call(P).call(T),G.exit().remove()}(e,t,{radius:U,innerRadius:V,gauge:W,layer:Y,size:F,gaugeBg:m,gaugeOutline:b,transitionOpts:p,onComplete:g});var X=z.selectAll("g.bullet").data(R?t:[]);X.exit().remove();var Z=z.selectAll("g.bulletaxis").data(R?t:[]);Z.exit().remove(),R&&function(e,t,r){var n,i,a,o,l,c=t[0].trace,u=r.gauge,f=r.layer,p=r.gaugeBg,m=r.gaugeOutline,g=r.size,y=c.domain,x=r.transitionOpts,b=r.onComplete;u.enter().append("g").classed("bullet",!0),u.attr("transform",s(g.l,g.t)),f.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),f.selectAll("g.xbulletaxistick,path,text").remove();var _=g.h,w=c.gauge.bar.thickness*_,M=y.x[0],S=y.x[0]+(y.x[1]-y.x[0])*(c._hasNumber||c._hasDelta?1-h.bulletNumberDomainSize:1);function E(e){e.attr("width",function(e){return Math.max(0,n.c2p(e.range[1])-n.c2p(e.range[0]))}).attr("x",function(e){return n.c2p(e.range[0])}).attr("y",function(e){return .5*(1-e.thickness)*_}).attr("height",function(e){return e.thickness*_})}(n=A(e,c.gauge.axis))._id="xbulletaxis",n.domain=[M,S],n.setScale(),i=d.calcTicks(n),a=d.makeTransTickFn(n),o=d.getTickSigns(n)[2],l=g.t+g.h,n.visible&&(d.drawTicks(e,n,{vals:"inside"===n.ticks?d.clipEnds(n,i):i,layer:f,path:d.makeTickPath(n,l,o),transFn:a}),d.drawLabels(e,n,{vals:i,layer:f,transFn:a,labelFns:d.makeLabelFns(n,l)}));var C=[p].concat(c.gauge.steps),L=u.selectAll("g.bg-bullet").data(C);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(E).call(T),L.exit().remove();var I=u.selectAll("g.value-bullet").data([c.gauge.bar]);I.enter().append("g").classed("value-bullet",!0).append("rect"),I.select("rect").attr("height",w).attr("y",(_-w)/2).call(T),k(x)?I.select("rect").transition().duration(x.duration).ease(x.easing).each("end",function(){b&&b()}).each("interrupt",function(){b&&b()}).attr("width",Math.max(0,n.c2p(Math.min(c.gauge.axis.range[1],t[0].y)))):I.select("rect").attr("width","number"==typeof t[0].y?Math.max(0,n.c2p(Math.min(c.gauge.axis.range[1],t[0].y))):0),I.exit().remove();var P=t.filter(function(){return c.gauge.threshold.value||0===c.gauge.threshold.value}),z=u.selectAll("g.threshold-bullet").data(P);z.enter().append("g").classed("threshold-bullet",!0).append("line"),z.select("line").attr("x1",n.c2p(c.gauge.threshold.value)).attr("x2",n.c2p(c.gauge.threshold.value)).attr("y1",(1-c.gauge.threshold.thickness)/2*_).attr("y2",(1-(1-c.gauge.threshold.thickness)/2)*_).call(v.stroke,c.gauge.threshold.line.color).style("stroke-width",c.gauge.threshold.line.width),z.exit().remove();var O=u.selectAll("g.gauge-outline").data([m]);O.enter().append("g").classed("gauge-outline",!0).append("rect"),O.select("rect").call(E).call(T),O.exit().remove()}(e,t,{gauge:X,layer:Z,size:F,gaugeBg:m,gaugeOutline:b,transitionOpts:p,onComplete:g});var $=z.selectAll("text.title").data(t);$.exit().remove(),$.enter().append("text").classed("title",!0),$.attr("text-anchor",function(){return R?x.right:x[P.title.align]}).text(P.title.text).call(u.font,P.title.font).call(f.convertToTspans,e),$.attr("transform",function(){var e,t=F.l+F.w*_[P.title.align],r=h.titlePadding,n=u.bBox($.node());return O?(D&&(e=P.gauge.axis.visible?u.bBox(Y.node()).top-r-n.bottom:F.t+F.h/2-U/2-n.bottom-r),R&&(e=L-(n.top+n.bottom)/2,t=F.l-h.bulletPadding*F.w)):e=P._numbersTop-r-n.bottom,s(t,e)})})}}}),xk=d({"src/traces/indicator/index.js"(e,t){t.exports={moduleType:"trace",name:"indicator",basePlotModule:xy(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:xv(),supplyDefaults:xb().supplyDefaults,calc:x_().calc,plot:xw(),meta:{}}}}),xT=d({"lib/indicator.js"(e,t){t.exports=xk()}}),xA=d({"src/traces/table/attributes.js"(e,t){var r=nV(),n=U().extendFlat,i=tl().overrideAll,a=V(),o=aC().attributes,s=ri().descriptionOnlyNumbers;t.exports=i({domain:o({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:n({},r.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:n({},a({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:n({},r.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:n({},a({arrayOk:!0}))}},"calc","from-root")}}),xM=d({"src/traces/table/defaults.js"(e,t){var r=tY(),n=xA(),i=aC().defaults;t.exports=function(e,t,a,o){function s(i,a){return r.coerce(e,t,n,i,a)}i(t,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"),r.coerceFont(s,"header.font",o.font),function(e,t){for(var r=e.columnorder||[],n=e.header.values.length,i=r.slice(0,n),a=i.slice().sort(function(e,t){return e-t}),o=i.map(function(e){return a.indexOf(e)}),s=o.length;s",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"}}}}),xC=d({"src/traces/table/data_preparation_helper.js"(e,t){var r=xE(),n=U().extendFlat,i=A(),a=L().isTypedArray,o=L().isArrayOrTypedArray;function s(e){if(o(e)){for(var t=0,r=0;r=t||c===e.length-1)&&(n[i]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o=p(),i+=a,s=c+1,a=0);return n}function p(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}t.exports=function(e,t){var a=c(t.cells.values),p=function(e){return e.slice(t.header.values.length,e.length)},m=c(t.header.values);m.length&&!m[0].length&&(m[0]=[""],m=c(m));var g=m.concat(p(a).map(function(){return u((m[0]||[""]).length)})),y=t.domain,v=Math.floor(e._fullLayout._size.w*(y.x[1]-y.x[0])),x=Math.floor(e._fullLayout._size.h*(y.y[1]-y.y[0])),b=t.header.values.length?g[0].map(function(){return t.header.height}):[r.emptyHeaderHeight],_=a.length?a[0].map(function(){return t.cells.height}):[],w=b.reduce(l,0),k=d(_,x-w+r.uplift),T=f(d(b,w),[]),A=f(k,T),M={},S=t.columnorder;o(S)&&(S=Array.from(S)),S=S.concat(p(a.map(function(e,t){return t})));var E=g.map(function(e,r){var n=o(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return i(n)?Number(n):1}),C=E.reduce(l,0);E=E.map(function(e){return e/C*v});var L=Math.max(s(t.header.line.width),s(t.cells.line.width)),I={key:t.uid+e._context.staticPlot,translateX:y.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-y.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:L,height:x,columnOrder:S,groupHeight:x,rowBlocks:A,headerRowBlocks:T,scrollY:0,cells:n({},t.cells,{values:a}),headerCells:n({},t.header,{values:g}),gdColumns:g.map(function(e){return e[0]}),gdColumnsOriginalOrder:g.map(function(e){return e[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function(e,t){var r=M[e];return M[e]=(r||0)+1,{key:e+"__"+M[e],label:e,specIndex:t,xIndex:S[t],xScale:h,x:void 0,calcdata:void 0,columnWidth:E[t]}})};return I.columns.forEach(function(e){e.calcdata=I,e.x=h(e)}),I}}}),xL=d({"src/traces/table/data_split_helpers.js"(e){var t=U().extendFlat;e.splitToPanels=function(e){var r=[0,0],n=t({},e,{key:"header",type:"header",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:t({},e.calcdata,{cells:e.calcdata.headerCells})});return[t({},e,{key:"cells1",type:"cells",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),t({},e,{key:"cells2",type:"cells",page:1,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),n]},e.splitToCells=function(e){var t,r,n,i,a=(n=(r=(t=e).rowBlocks[t.page])?r.rows[0].rowIndex:0,i=r?n+r.rows.length:0,[n,i]);return(e.values||[]).slice(a[0],a[1]).map(function(t,r){return{keyWithinBlock:r+("string"==typeof t&&t.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:a[0]+r,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:t}})}}}),xI=d({"src/traces/table/plot.js"(e,t){var r=xE(),n=b(),i=tY(),a=i.numberFormat,o=yJ(),s=rE(),l=rr(),c=tY().raiseToTop,u=tY().strTranslate,h=tY().cancelTransition,f=xC(),d=xL(),p=eC();function m(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function g(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function y(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function v(e){return[].concat.apply([],e.map(function(e){return e})).map(function(e){return e.__data__})}function x(e,t,i){var a=e.selectAll("."+r.cn.scrollbarKit).data(o.repeat,o.keyFun);a.enter().append("g").classed(r.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each(function(e){var t,n=e.scrollbarState;n.totalHeight=R(t=e.rowBlocks,t.length-1)+(t.length?j(t[t.length-1],1/0):1),n.scrollableAreaHeight=e.groupHeight-E(e),n.currentlyVisibleHeight=Math.min(n.totalHeight,n.scrollableAreaHeight),n.ratio=n.currentlyVisibleHeight/n.totalHeight,n.barLength=Math.max(n.ratio*n.currentlyVisibleHeight,r.goldenRatio*r.scrollbarWidth),n.barWiggleRoom=n.currentlyVisibleHeight-n.barLength,n.wiggleRoom=Math.max(0,n.totalHeight-n.scrollableAreaHeight),n.topY=0===n.barWiggleRoom?0:e.scrollY/n.wiggleRoom*n.barWiggleRoom,n.bottomY=n.topY+n.barLength,n.dragMultiplier=n.wiggleRoom/n.barWiggleRoom}).attr("transform",function(e){return u(e.width+r.scrollbarWidth/2+r.scrollbarOffset,E(e))});var s=a.selectAll("."+r.cn.scrollbar).data(o.repeat,o.keyFun);s.enter().append("g").classed(r.cn.scrollbar,!0);var l=s.selectAll("."+r.cn.scrollbarSlider).data(o.repeat,o.keyFun);l.enter().append("g").classed(r.cn.scrollbarSlider,!0),l.attr("transform",function(e){return u(0,e.scrollbarState.topY||0)});var c=l.selectAll("."+r.cn.scrollbarGlyph).data(o.repeat,o.keyFun);c.enter().append("line").classed(r.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",r.scrollbarWidth).attr("stroke-linecap","round").attr("y1",r.scrollbarWidth/2),c.attr("y2",function(e){return e.scrollbarState.barLength-r.scrollbarWidth/2}).attr("stroke-opacity",function(e){return e.columnDragInProgress||!e.scrollbarState.barWiggleRoom||i?0:.4}),c.transition().delay(0).duration(0),c.transition().delay(r.scrollbarHideDelay).duration(r.scrollbarHideDuration).attr("stroke-opacity",0);var h=s.selectAll("."+r.cn.scrollbarCaptureZone).data(o.repeat,o.keyFun);h.enter().append("line").classed(r.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",r.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(r){var i=n.event.y,a=this.getBoundingClientRect(),o=r.scrollbarState,s=i-a.top,l=n.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY<=s&&s<=o.bottomY||L(t,e,null,l(s-o.barLength/2))(r)}).call(n.behavior.drag().origin(function(e){return n.event.stopPropagation(),e.scrollbarState.scrollbarScrollInProgress=!0,e}).on("drag",L(t,e)).on("dragend",function(){})),h.attr("y2",function(e){return e.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(c.remove(),h.remove())}function _(e,t,i,a){var l,c,u,h,f,m=((c=((l=i.selectAll("."+r.cn.columnCells).data(o.repeat,o.keyFun)).enter().append("g").classed(r.cn.columnCells,!0),l.exit().remove(),l).selectAll("."+r.cn.columnCell).data(d.splitToCells,function(e){return e.keyWithinBlock})).enter().append("g").classed(r.cn.columnCell,!0),c.exit().remove(),c);m.each(function(e,t){var r=e.calcdata.cells.font,n=e.column.specIndex,i={size:T(r.size,n,t),color:T(r.color,n,t),family:T(r.family,n,t),weight:T(r.weight,n,t),style:T(r.style,n,t),variant:T(r.variant,n,t),textcase:T(r.textcase,n,t),lineposition:T(r.lineposition,n,t),shadow:T(r.shadow,n,t)};e.rowNumber=e.key,e.align=T(e.calcdata.cells.align,n,t),e.cellBorderWidth=T(e.calcdata.cells.line.width,n,t),e.font=i}),((u=m.selectAll("."+r.cn.cellRect).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("rect").classed(r.cn.cellRect,!0),u).attr("width",function(e){return e.column.columnWidth}).attr("stroke-width",function(e){return e.cellBorderWidth}).each(function(e){var t=n.select(this);p.stroke(t,T(e.calcdata.cells.line.color,e.column.specIndex,e.rowNumber)),p.fill(t,T(e.calcdata.cells.fill.color,e.column.specIndex,e.rowNumber))});var g=((f=((h=m.selectAll("."+r.cn.cellTextHolder).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("g").classed(r.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),h).selectAll("."+r.cn.cellText).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("text").classed(r.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){n.event.stopPropagation()}),f);g.each(function(e){s.font(n.select(this),e.font)}),w(g,t,a,e),D(m)}function w(e,t,i,o){e.text(function(e){var t,n=e.column.specIndex,i=e.rowNumber,o=e.value,s="string"==typeof o,l=s&&o.match(/
/i),c=!s||l;e.mayHaveMarkup=s&&o.match(/[<&>]/);var u="string"==typeof(h=o)&&h.match(r.latexCheck);e.latex=u;var h,f,d=u?"":T(e.calcdata.cells.prefix,n,i)||"",p=u?"":T(e.calcdata.cells.suffix,n,i)||"",m=u?null:T(e.calcdata.cells.format,n,i)||null,g=d+(m?a(m)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!c&&!u&&(f=k(g)),e.cellHeightMayIncrease=l||u||e.mayHaveMarkup||(void 0===f?k(g):f),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var y=(" "===r.wrapSplitCharacter?g.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(),t.each(function(e,t){e.page=c[t],e.scrollY=l}),t.attr("transform",function(e){return u(0,R(e.rowBlocks,e.page)-e.scrollY)}),e&&(I(e,r,t,c,n.prevPages,n,0),I(e,r,t,c,n.prevPages,n,1),x(r,e))}}function L(e,t,i,a){return function(o){var s=o.calcdata?o.calcdata:o,l=t.filter(function(e){return s.key===e.key}),c=i||s.scrollbarState.dragMultiplier,u=s.scrollY;return s.scrollY=void 0===a?s.scrollY+c*n.event.dy:a,C(e,l.selectAll("."+r.cn.yColumn).selectAll("."+r.cn.columnBlock).filter(M),l),s.scrollY===u}}function I(e,t,r,n,i,a,o){n[o]!==i[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){_(e,t,r.filter(function(e,t){return t===o&&n[t]!==i[t]}),r),i[o]=n[o]}))}function P(e,t,i,a){return function(){var o=n.select(t.parentNode);o.each(function(e){var t=e.fragments;o.selectAll("tspan.line").each(function(e,r){t[r].width=this.getComputedTextLength()});var n,i,a=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*r.cellPad;for(e.value="";s.length;)c+(i=(n=s.shift()).width+a)>u&&(e.value+=l.join(r.wrapSpacer)+r.lineBreaker,l=[],c=0),l.push(n.text),c+=i;c&&(e.value+=l.join(r.wrapSpacer)),e.wrapped=!0}),o.selectAll("tspan.line").remove(),w(o.select("."+r.cn.cellText),i,e,a),n.select(t.parentNode.parentNode).call(D)}}function z(e,t,i,a,o){return function(){if(!o.settledY){var s=n.select(t.parentNode),l=F(o),c=o.key-l.firstRowIndex,h=l.rows[c].rowHeight,f=Math.max(o.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*r.cellPad:h,h);f-l.rows[c].rowHeight&&(l.rows[c].rowHeight=f,e.selectAll("."+r.cn.columnCell).call(D),C(null,e.filter(M),0),x(i,a,!0)),s.attr("transform",function(){var e=this.parentNode.getBoundingClientRect(),t=n.select(this.parentNode).select("."+r.cn.cellRect).node().getBoundingClientRect(),i=this.transform.baseVal.consolidate(),a=t.top-e.top+(i?i.matrix.f:r.cellPad);return u(O(o,n.select(this.parentNode).select("."+r.cn.cellTextHolder).node().getBoundingClientRect().width),a)}),o.settledY=!0}}}function O(e,t){switch(e.align){case"left":default:return r.cellPad;case"right":return e.column.columnWidth-(t||0)-r.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function D(e){e.attr("transform",function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce(function(e,t){return e+j(t,1/0)},0);return u(0,j(F(e),e.key)+t)}).selectAll("."+r.cn.cellRect).attr("height",function(e){var t,r;return(t=F(e),r=e.key,t.rows[r-t.firstRowIndex]).rowHeight})}function R(e,t){for(var r=0,n=t-1;n>=0;n--)r+=function(e){var t=e.allRowsHeight;if(void 0!==t)return t;for(var r=0,n=0;nt.length&&(e=e.slice(0,t.length)):e=[],i=0;i90&&(f-=180,l=-l),{angle:f,flip:l,p:e.c2p(n,t,r),offsetMultplier:c}}}}),xH=d({"src/traces/carpet/plot.js"(e,t){var r=b(),n=rE(),i=xU(),a=xV(),o=xq(),s=rr(),l=tY(),c=l.strRotate,u=l.strTranslate,h=rt();function f(e,t,o,s,l,c,u){var h="const-"+l+"-lines",f=o.selectAll("."+h).data(c);f.enter().append("path").classed(h,!0).style("vector-effect",u?"none":"non-scaling-stroke"),f.each(function(o){var s=o.x,l=o.y,c="M"+a(i([],s,e.c2p),i([],l,t.c2p),o.smoothing);r.select(this).attr("d",c).style("stroke-width",o.width).style("stroke",o.color).style("stroke-dasharray",n.dashStyle(o.dash,o.width)).style("fill","none")}),f.exit().remove()}function d(e,t,i,a,l,h,f,d){var p=h.selectAll("text."+d).data(f);p.enter().append("text").classed(d,!0);var m=0,g={};return p.each(function(l,h){if("auto"===l.axis.tickangle)f=o(a,t,i,l.xy,l.dxy);else{var f,d=(l.axis.tickangle+180)*Math.PI/180;f=o(a,t,i,l.xy,[Math.cos(d),Math.sin(d)])}h||(g={angle:f.angle,flip:f.flip});var p=(l.endAnchor?-1:1)*f.flip,y=r.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(n.font,l.font).text(l.text).call(s.convertToTspans,e),v=n.bBox(this);y.attr("transform",u(f.p[0],f.p[1])+c(f.angle)+u(l.axis.labelpadding*p,.3*v.height)),m=Math.max(m,v.width+l.axis.labelpadding)}),p.exit().remove(),g.maxExtent=m,g}t.exports=function(e,t,n,s){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis,p=e._fullLayout._clips;l.makeTraceGroups(s,n,"trace").each(function(t){var n,s,m,y,v,x,b,_,w,k,T,A,M,S,E,C,L=r.select(this),I=t[0],P=I.trace,z=P.aaxis,O=P.baxis,D=l.ensureSingle(L,"g","minorlayer"),R=l.ensureSingle(L,"g","majorlayer"),j=l.ensureSingle(L,"g","boundarylayer"),F=l.ensureSingle(L,"g","labellayer");L.style("opacity",P.opacity),f(u,h,R,z,"a",z._gridlines,!0),f(u,h,R,O,"b",O._gridlines,!0),f(u,h,D,z,"a",z._minorgridlines,!0),f(u,h,D,O,"b",O._minorgridlines,!0),f(u,h,j,z,"a-boundary",z._boundarylines,c),f(u,h,j,O,"b-boundary",O._boundarylines,c);var B=d(e,u,h,P,I,F,z._labels,"a-label"),N=d(e,u,h,P,I,F,O._labels,"b-label");n=e,s=F,m=P,y=I,v=u,x=h,b=B,_=N,M=l.aggNums(Math.min,null,m.a),S=l.aggNums(Math.max,null,m.a),E=l.aggNums(Math.min,null,m.b),C=l.aggNums(Math.max,null,m.b),w=.5*(M+S),k=E,T=m.ab2xy(w,k,!0),A=m.dxyda_rough(w,k),void 0===b.angle&&l.extendFlat(b,o(m,v,x,T,m.dxydb_rough(w,k))),g(n,s,m,y,T,A,m.aaxis,v,x,b,"a-title"),w=M,k=.5*(E+C),T=m.ab2xy(w,k,!0),A=m.dxydb_rough(w,k),void 0===_.angle&&l.extendFlat(_,o(m,v,x,T,m.dxyda_rough(w,k))),g(n,s,m,y,T,A,m.baxis,v,x,_,"b-title"),function(e,t,r,n,o){var s,c,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var h=l.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,d=[];for(c=0;c90&&v<270&&(_=(-s.lineCount(x)+m)*p*a-_),x.attr("transform",u(t.p[0],t.p[1])+c(t.angle)+u(0,_)).attr("text-anchor","middle").call(n.font,f.title.font)}),b.exit().remove()}}}),xG=d({"src/traces/carpet/cheater_basis.js"(e,t){var r=tY().isArrayOrTypedArray;t.exports=function(e,t,n){var i,a,o,s,l,c=[],u=r(e)?e.length:e,h=r(t)?t.length:t,f=r(e)?e:null,d=r(t)?t:null;f&&(o=(f.length-1)/(f[f.length-1]-f[0])/(u-1)),d&&(s=(d.length-1)/(d[d.length-1]-d[0])/(h-1));var p,m=1/0,g=-1/0;for(a=0;a=10)return null;for(var i=1/0,a=-1/0,o=t.length,s=0;s0&&(d=e.dxydi([],n-1,o,0,s),y.push(l[0]+d[0]/3),v.push(l[1]+d[1]/3),p=e.dxydi([],n-1,o,1,s),y.push(h[0]-p[0]/3),v.push(h[1]-p[1]/3)),y.push(h[0]),v.push(h[1]),l=h;else for(c=Math.floor(Math.max(0,Math.min(L-2,n=e.a2i(r)))),u=n-c,x.length=L,x.crossLength=I,x.xy=function(t){return e.evalxy([],n,t)},x.dxy=function(t,r){return e.dxydj([],c,t,u,r)},a=0;a0&&(m=e.dxydj([],c,a-1,u,0),y.push(l[0]+m[0]/3),v.push(l[1]+m[1]/3),g=e.dxydj([],c,a-1,u,1),y.push(h[0]-g[0]/3),v.push(h[1]-g[1]/3)),y.push(h[0]),v.push(h[1]),l=h;return x.axisLetter=t,x.axis=b,x.crossAxis=A,x.value=r,x.constvar=i,x.index=f,x.x=y,x.y=v,x.smoothing=A.smoothing,x}function O(r){var n,a,o,s,l,c=[],u=[],h={};if(h.length=x.length,h.crossLength=T.length,"b"===t)for(o=Math.max(0,Math.min(I-2,r)),l=Math.min(1,Math.max(0,r-o)),h.xy=function(t){return e.evalxy([],t,r)},h.dxy=function(t,r){return e.dxydi([],t,o,r,l)},n=0;nx.length-1||_.push(n(O(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(f=u;fx.length-1)&&!(m<0||m>x.length-1))for(g=x[s],y=x[m],a=0;ax[x.length-1]||w.push(n(z(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash})));b.startline&&k.push(n(O(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(n(O(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(e,t){return e-t}))[0],h=c[1],f=u;f<=h;f++)d=b.tick0+b.dtick*f,_.push(n(z(d),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(f=u-1;fx[x.length-1]||w.push(n(z(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&k.push(n(z(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&k.push(n(z(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}}}),xX=d({"src/traces/carpet/calc_labels.js"(e,t){var r=rz(),n=U().extendFlat;t.exports=function(e,t){var i,a,o,s,l,c=t._labels=[],u=t._gridlines;for(i=0;i=0;i--)a[u-i]=e[h][i],o[u-i]=t[h][i];for(s.push({x:a,y:o,bicubic:l}),i=h,a=[],o=[];i>=0;i--)a[h-i]=e[i][0],o[h-i]=t[i][0];return s.push({x:a,y:o,bicubic:c}),s}}}),x$=d({"src/traces/carpet/smooth_fill_2d_array.js"(e,t){var r=tY();t.exports=function(e,t,n){var i,a,o,s=[],l=[],c=e[0].length,u=e.length,h=0;for(i=0;i0&&void 0!==(n=e[r][t-1])&&(a++,i+=n),t0&&void 0!==(n=e[r-1][t])&&(a++,i+=n),r0&&a0&&i1e-5);return r.log("Smoother converged to",k,"after",T,"iterations"),e}}}),xK=d({"src/traces/carpet/constants.js"(e,t){t.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),xJ=d({"src/traces/carpet/catmull_rom.js"(e,t){t.exports=function(e,t,r,n){var i=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(i*i+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*i-l*l*o)*n,h=(c*c*a-l*l*s)*n,f=c*(l+c)*3,d=l*(l+c)*3;return[[t[0]+(f&&u/f),t[1]+(f&&h/f)],[t[0]-(d&&u/d),t[1]-(d&&h/d)]]}}}),xQ=d({"src/traces/carpet/compute_control_points.js"(e,t){var r=xJ(),n=tY().ensureArray;function i(e,t,r){var n=-.5*r[0]+1.5*t[0],i=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*i+e[1])/3]}t.exports=function(e,t,a,o,s,l){var c,u,h,f,d,p,m,g,y,v,x=a[0].length,b=a.length,_=s?3*x-2:x,w=l?3*b-2:b;for(e=n(e,w),t=n(t,w),h=0;hd&&em&&tp||tg},e.setScale=function(){var t=e._x,r=e._y,n=i(e._xctrl,e._yctrl,t,r,h.smoothing,f.smoothing);e._xctrl=n[0],e._yctrl=n[1],e.evalxy=a([e._xctrl,e._yctrl],c,u,h.smoothing,f.smoothing),e.dxydi=o([e._xctrl,e._yctrl],h.smoothing,f.smoothing),e.dxydj=s([e._xctrl,e._yctrl],h.smoothing,f.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),c-2),n=e[0]-r;return(1-n)*t[r]+n*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),r=e[1]-t;return(1-r)*l[t]+r*l[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(n(e,t),c-2)),i=t[r],a=t[r+1];return Math.max(0,Math.min(c-1,r+(e-i)/(a-i)))},e.b2j=function(e){var t=Math.max(0,Math.min(n(e,l),u-2)),r=l[t],i=l[t+1];return Math.max(0,Math.min(u-1,t+(e-r)/(i-r)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(r,n,i){if(!i&&(rt[c-1]|nl[u-1]))return[!1,!1];var a=e.a2i(r),o=e.b2j(n),s=e.evalxy([],a,o);if(i){var h,f,d,p,m=0,g=0,y=[];rt[c-1]?(h=c-2,f=1,m=(r-t[c-1])/(t[c-1]-t[c-2])):(h=Math.max(0,Math.min(c-2,Math.floor(a))),f=a-h),nl[u-1]?(d=u-2,p=1,g=(n-l[u-1])/(l[u-1]-l[u-2])):(d=Math.max(0,Math.min(u-2,Math.floor(o))),p=o-d),m&&(e.dxydi(y,h,d,f,p),s[0]+=y[0]*m,s[1]+=y[1]*m),g&&(e.dxydj(y,h,d,f,p),s[0]+=y[0]*g,s[1]+=y[1]*g)}return s},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(l.length-2,e));return l[t+1]-l[t]},e.dxyda=function(t,r,n,i){var a=e.dxydi(null,t,r,n,i),o=e.dadi(t,n);return[a[0]/o,a[1]/o]},e.dxydb=function(t,r,n,i){var a=e.dxydj(null,t,r,n,i),o=e.dbdj(r,i);return[a[0]/o,a[1]/o]},e.dxyda_rough=function(t,r,n){var i=y*(n||.1),a=e.ab2xy(t+i,r,!0),o=e.ab2xy(t-i,r,!0);return[(a[0]-o[0])*.5/i,(a[1]-o[1])*.5/i]},e.dxydb_rough=function(t,r,n){var i=v*(n||.1),a=e.ab2xy(t,r+i,!0),o=e.ab2xy(t,r-i,!0);return[(a[0]-o[0])*.5/i,(a[1]-o[1])*.5/i]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}}}),x5=d({"src/traces/carpet/calc.js"(e,t){var r=rz(),n=tY().isArray1D,i=xG(),a=xW(),o=xY(),s=xX(),l=xZ(),c=oM(),u=x$(),h=oA(),f=x3();t.exports=function(e,t){var d=r.getFromId(e,t.xaxis),p=r.getFromId(e,t.yaxis),m=t.aaxis,g=t.baxis,y=t.x,v=t.y,x=[];y&&n(y)&&x.push("x"),v&&n(v)&&x.push("y"),x.length&&h(t,m,g,"a","b",x);var b=t._a=t._a||t.a,_=t._b=t._b||t.b;y=t._x||t.x,v=t._y||t.y;var w={};t._cheater&&(y=i("index"===m.cheatertype?b.length:b,"index"===g.cheatertype?_.length:_,t.cheaterslope)),t._x=y=c(y),t._y=v=c(v),u(y,b,_),u(v,b,_),f(t),t.setScale();var k=a(y),T=a(v),A=.5*(k[1]-k[0]),M=.5*(k[1]+k[0]),S=.5*(T[1]-T[0]),E=.5*(T[1]+T[0]);return k=[M-1.3*A,M+1.3*A],T=[E-1.3*S,E+1.3*S],t._extremes[d._id]=r.findExtremes(d,k,{padded:!0}),t._extremes[p._id]=r.findExtremes(p,T,{padded:!0}),o(t,"a","b"),o(t,"b","a"),s(t,m),s(t,g),w.clipsegments=l(t._xctrl,t._yctrl,m,g),w.x=y,w.y=v,w.a=b,w.b=_,[w]}}}),x4=d({"src/traces/carpet/index.js"(e,t){t.exports={attributes:xR(),supplyDefaults:xN(),plot:xH(),calc:x5(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:iV(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),x6=d({"lib/carpet.js"(e,t){t.exports=x4()}}),x8=d({"src/traces/scattercarpet/attributes.js"(e,t){var r=nH(),n=nG(),i=W(),{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=th(),l=rs(),c=U().extendFlat,u=n.marker,h=n.line,f=u.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:c({},n.mode,{dflt:"markers"}),text:c({},n.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:s({editType:"plot"}),hovertext:c({},n.hovertext,{}),line:{color:h.color,width:h.width,dash:h.dash,backoff:h.backoff,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:n.connectgaps,fill:c({},n.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:r(),marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,angle:u.angle,angleref:u.angleref,standoff:u.standoff,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:f.width,dash:f.dash,editType:"calc"},l("marker.line")),gradient:u.gradient,editType:"calc"},l("marker")),textfont:n.textfont,textposition:n.textposition,selected:n.selected,unselected:n.unselected,hoverinfo:c({},i.hoverinfo,{flags:["a","b","text","name"]}),hoveron:n.hoveron,hovertemplate:a(),hovertemplatefallback:s(),zorder:n.zorder}}}),x9=d({"src/traces/scattercarpet/defaults.js"(e,t){var r=tY(),n=nq(),i=rk(),a=io(),o=is(),s=il(),l=ic(),c=iu(),u=x8();t.exports=function(e,t,h,f){function d(n,i){return r.coerce(e,t,u,n,i)}d("carpet"),t.xaxis="x",t.yaxis="y";var p=d("a"),m=d("b"),g=Math.min(p.length,m.length);if(!g){t.visible=!1;return}t._length=g,d("text"),d("texttemplate"),d("texttemplatefallback"),d("hovertext"),d("mode",g")}return o}function y(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,m.push(r+": "+t.toFixed(3)+e.labelsuffix)}}}}),bi=d({"src/traces/scattercarpet/event_data.js"(e,t){t.exports=function(e,t,r,n,i){var a=n[i];return e.a=a.a,e.b=a.b,e.y=a.y,e}}}),ba=d({"src/traces/scattercarpet/index.js"(e,t){t.exports={attributes:x8(),supplyDefaults:x9(),colorbar:iE(),formatLabels:x7(),calc:bt(),plot:br(),style:iL().style,styleOnSelect:iL().styleOnSelect,hoverPoints:bn(),selectPoints:iz(),eventData:bi(),moduleType:"trace",name:"scattercarpet",basePlotModule:iV(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),bo=d({"lib/scattercarpet.js"(e,t){t.exports=ba()}}),bs=d({"src/traces/contourcarpet/attributes.js"(e,t){var r=op(),n=o1(),i=rs(),a=U().extendFlat,o=n.contours;t.exports=a({carpet:{valType:"string",editType:"calc"},z:r.z,a:r.x,a0:r.x0,da:r.dx,b:r.y,b0:r.y0,db:r.dy,text:r.text,hovertext:r.hovertext,transpose:r.transpose,atype:r.xtype,btype:r.ytype,fillcolor:n.fillcolor,autocontour:n.autocontour,ncontours:n.ncontours,contours:{type:o.type,start:o.start,end:o.end,size:o.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:o.showlines,showlabels:o.showlabels,labelfont:o.labelfont,labelformat:o.labelformat,operation:o.operation,value:o.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:n.line.color,width:n.line.width,dash:n.line.dash,smoothing:n.line.smoothing,editType:"plot"},zorder:n.zorder},i("",{cLetter:"z",autoColorDflt:!1}))}}),bl=d({"src/traces/contourcarpet/defaults.js"(e,t){var r=tY(),n=om(),i=bs(),a=sp(),o=o3(),s=o4();t.exports=function(e,t,l,c){function u(n,a){return r.coerce(e,t,i,n,a)}if(u("carpet"),e.a&&e.b){if(!n(e,t,u,c,"a","b")){t.visible=!1;return}u("text"),"constraint"===u("contours.type")?a(e,t,u,c,l,{hasHover:!1}):(o(e,t,u,function(n){return r.coerce2(e,t,i,n)}),s(e,t,u,c,{hasHover:!1}))}else t._defaultColor=l,t._length=null;u("zorder")}}}),bc=d({"src/traces/contourcarpet/calc.js"(e,t){var r=r_(),n=tY(),i=oA(),a=oM(),o=oS(),s=oE(),l=oC(),c=bl(),u=be(),h=o8();t.exports=function(e,t){var f=t._carpetTrace=u(e,t);if(!(!f||!f.visible||"legendonly"===f.visible)){if(!t.a||!t.b){var d,p,m,g,y,v,x,b,_,w,k,T,A,M,S,E,C,L=e.data[f.index],I=e.data[t.index];I.a||(I.a=L.a),I.b||(I.b=L.b),c(I,t,t._defaultColor,e._fullLayout)}var P=(d=e,k=(w=(p=t)._carpetTrace).aaxis,T=w.baxis,k._minDtick=0,T._minDtick=0,n.isArray1D(p.z)&&i(p,k,T,"a","b",["z"]),m=p._a=p._a||p.a,v=p._b=p._b||p.b,m=m?k.makeCalcdata(p,"_a"):[],v=v?T.makeCalcdata(p,"_b"):[],g=p.a0||0,y=p.da||1,x=p.b0||0,b=p.db||1,_=p._z=a(p._z||p.z,p.transpose),p._emptypoints=s(_),o(_,p._emptypoints),A=n.maxRowLength(_),M="scaled"===p.xtype?"":m,S=l(p,M,g,y,A,k),E="scaled"===p.ytype?"":v,C=l(p,E,x,b,_.length,T),"levels"===p.contours.type&&"none"!==p.contours.coloring&&r(d,p,{vals:_,containerStr:"",cLetter:"z"}),[{a:S,b:C,z:_}]);return h(t,t._z),P}}}}),bu=d({"src/traces/carpet/axis_aligned_line.js"(e,t){var r=tY().isArrayOrTypedArray;t.exports=function(e,t,n,i){var a,o,s,l,c,u,h,f,d,p,m,g,y,v=r(n)?"a":"b",x=("a"===v?e.aaxis:e.baxis).smoothing,b="a"===v?e.a2i:e.b2j,_="a"===v?n:i,w="a"===v?i:n,k="a"===v?t.a.length:t.b.length,T="a"===v?t.b.length:t.a.length,A=Math.floor("a"===v?e.b2j(w):e.a2i(w)),M="a"===v?function(t){return e.evalxy([],t,A)}:function(t){return e.evalxy([],A,t)};x&&(s=Math.max(0,Math.min(T-2,A)),l=A-s,o="a"===v?function(t,r){return e.dxydi([],t,s,r,l)}:function(t,r){return e.dxydj([],s,t,l,r)});var S=b(_[0]),E=b(_[1]),C=S0?Math.floor:Math.ceil,P=C>0?Math.ceil:Math.floor,z=C>0?Math.min:Math.max,O=C>0?Math.max:Math.min,D=I(S+L),R=P(E-L),j=[[h=M(S)]];for(a=D;a*C=0;J--)$=n([],(Z=M.clipsegments[J]).x,_.c2p),K=n([],Z.y,w.c2p),$.reverse(),K.reverse(),Q.push(i($,K,Z.bicubic));var ee="M"+Q.join("L")+"Z";(function(e,t,r,a,s,l){var c,u,h=o.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||s?[]:[0]);h.enter().append("path"),h.exit().remove();var f=[];for(u=0;u=0&&(h=E,d=p):Math.abs(u[1]-h[1])<_?Math.abs(u[1]-E[1])<_&&(E[0]-u[0])*(h[0]-E[0])>=0&&(h=E,d=p):o.log("endpt to newendpt is not vert. or horz.",u,h,E)}if(d>=0)break;y+=M(u,h),u=h}if(d===e.edgepaths.length){o.log("unclosed perimeter path");break}c=d,(x=-1===v.indexOf(c))&&(c=v[0],y+=M(u,h)+"Z",u=null)}for(c=0;cm&&(n.max=m),n.len=n.max-n.min}function x(e,t){var r=0;return(.1>Math.abs(e[0]-l)||.1>Math.abs(e[0]-c))&&(r=Math.max(r,a*v(t,y(i.dxydb_rough(e[0],e[1],.1)))/2)),(.1>Math.abs(e[1]-u)||.1>Math.abs(e[1]-h))&&(r=Math.max(r,a*v(t,y(i.dxyda_rough(e[0],e[1],.1)))/2)),r}}(this,r,e,n,h,t.height),!(n.len<(t.width+t.height)*u.LABELMIN)))for(var i=Math.min(Math.ceil(n.len/z),u.LABELMAX),a=0;ay):g=A>w,y=A;var M=c(w,k,T,A);M.pos=_,M.yc=(w+A)/2,M.i=b,M.dir=g?"increasing":"decreasing",M.x=M.pos,M.y=[T,k],v&&(M.orig_p=a[b]),p&&(M.tx=t.text[b]),m&&(M.htx=t.hovertext[b]),x.push(M)}else x.push({pos:_,empty:!0})}return t._extremes[l._id]=i.findExtremes(l,r.concat(f,h),{padded:!0}),x.length&&(x[0].t={labels:{open:n(e,"open:")+" ",high:n(e,"high:")+" ",low:n(e,"low:")+" ",close:n(e,"close:")+" "}}),x}t.exports={calc:function(e,t){var n=i.getFromId(e,t.xaxis),o=i.getFromId(e,t.yaxis),c=function(e,t,n){var i=n._minDiff;if(!i){var o,s=e._fullData,l=[];for(o=0,i=1/0;o"+u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat)):((y=n.extendFlat({},f)).y0=y.y1=b,y.yLabelVal=x,y.yLabel=u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat),y.name="",h.push(y),m[x]=y)}return h}function h(e,t,n,i){var a=e.cd,s=e.ya,u=a[0].trace,h=a[0].t,f=c(e,t,n,i);if(!f)return[];var d=a[f.index],p=f.index=d.i,m=d.dir;function g(e){return h.labels[e]+r.hoverLabelText(s,u[e][p],u.yhoverformat)}var y=d.hi||u.hoverinfo||"",v=y.split("+"),x="all"===y,b=x||-1!==v.indexOf("y"),_=x||-1!==v.indexOf("text"),w=b?[g("open"),g("high"),g("low"),g("close")+" "+l[m]]:[];return _&&o(d,u,w),f.extraText=w.join("
"),f.y0=f.y1=s.c2p(d.yc,!0),[f]}t.exports={hoverPoints:function(e,t,r,n){return e.cd[0].trace.hoverlabel.split?u(e,t,r,n):h(e,t,r,n)},hoverSplit:u,hoverOnPoints:h}}}),b_=d({"src/traces/ohlc/select.js"(e,t){t.exports=function(e,t){var r,n=e.cd,i=e.xaxis,a=e.yaxis,o=[],s=n[0].t.bPos||0;if(!1===t)for(r=0;rt?function(e){return e<=0}:function(e){return e>=0};s.c2g=function(t){var r=s.c2l(t)-e;return(a(r)?r:0)+i},s.g2c=function(t){return s.l2c(t+e-i)},s.g2p=function(e){return e*n},s.c2p=function(e){return s.g2p(s.c2g(e))}};break;case"angularaxis":var c=e,u=t,h=c.type;if("linear"===h){var f=c.d2c,d=c.c2d;c.d2c=function(e,t){var r;return r=f(e),"degrees"===t?i(r):r},c.c2d=function(e,t){return d("degrees"===t?a(e):e)}}c.makeCalcdata=function(e,t){var r,n,i=e[t],a=e._length,o=function(t){return c.d2c(t,e.thetaunit)};if(i)for(r=Array(a),n=0;n1e-10?e:0}function h(e,t,r){t=t||0,r=r||0;for(var n=e.length,i=Array(n),a=0;a0?r:1/0}),a=r.mod(n+1,t.length);return[t[n],t[a]]},findIntersectionXY:l,findXYatLength:function(e,t,r,n){var i=-t*r,a=t*t+1,o=2*(t*i-r),s=Math.sqrt(o*o-4*a*(i*i+r*r-e*e)),l=(-o+s)/(2*a),c=(-o-s)/(2*a);return[[l,t*l+i+n],[c,t*c+i+n]]},clampTiny:u,pathPolygon:function(e,t,r,n,i,a){return"M"+h(c(e,t,r,n),i,a).join("L")},pathPolygonAnnulus:function(e,t,r,n,i,a,o){e0))!=(a<0?-1:+(a>0))){var d=n(e,r([t,0]));return["M"+l+","+c,"A"+o+","+o+" 0 0,"+(0=90||v>90&&x>=450?1:_<=0&&k<=0?0:Math.max(_,k),[v<=180&&x>=180||v>180&&x>=540?-1:b>=0&&w>=0?0:Math.min(b,w),v<=270&&x>=270||v>270&&x>=630?-1:_>=0&&k>=0?0:Math.min(_,k),x>=360?1:b<=0&&w<=0?0:Math.max(b,w),m]),L=C[2]-C[0],I=Math.abs((C[3]-C[1])/L);f/h>I?(T=h,E=(f-(A=h*I))/n.h/2,M=[c[0],c[1]],S=[u[0]+E,u[1]-E]):(T=f/I,A=f,E=(h-T)/n.w/2,M=[c[0]+E,c[1]-E],S=[u[0],u[1]]),this.xLength2=T,this.yLength2=A,this.xDomain2=M,this.yDomain2=S;var P,z=this.xOffset2=n.l+n.w*M[0],R=this.yOffset2=n.t+n.h*(1-S[1]),j=this.radius=T/L,F=this.innerRadius=this.getHole(t)*j,B=this.cx=z-j*C[0],N=this.cy=R+j*C[3],U=this.cxx=B-z,V=this.cyy=N-R,q=i.side;"counterclockwise"===q?(P=q,q="top"):"clockwise"===q&&(P=q,q="bottom"),this.radialAxis=this.mockAxis(e,t,i,{_id:"x",side:q,_trueSide:P,domain:[F/n.w,j/n.w]}),this.angularAxis=this.mockAxis(e,t,a,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(e,t),this.updateAngularAxis(e,t),this.updateRadialAxis(e,t),this.updateRadialAxisTitle(e,t),this.xaxis=this.mockCartesianAxis(e,t,{_id:"x",domain:M}),this.yaxis=this.mockCartesianAxis(e,t,{_id:"y",domain:S});var H=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",H).attr("transform",o(U,V)),r.frontplot.attr("transform",o(z,R)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",H).attr("transform",o(B,N)).call(s.fill,t.bgcolor)},F.mockAxis=function(e,t,r,n){var a=i.extendFlat({},r,n);return f(a,t,e),a},F.mockCartesianAxis=function(e,t,r){var n=this,a=n.isSmith,o=r._id,s=i.extendFlat({type:"linear"},r);h(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=n.sectorBBox,r=l[o],i=n.radialAxis._rl,a=(i[1]-i[0])/(1-n.getHole(t));s.range=[e[r[0]]*a,e[r[1]]*a]},s.isPtWithinRange="x"!==o||a?function(){return!0}:function(e){return n.isPtInside(e)},s.setRange(),s.setScale(),s},F.doAutoRange=function(e,t){var r=this.gd,n=this.radialAxis,i=this.getRadial(t);d(r,n);var a=n.range;if(i.range=a.slice(),i._input.range=a.slice(),n._rl=[n.r2l(a[0],null,"gregorian"),n.r2l(a[1],null,"gregorian")],void 0!==n.minallowed){var o=n.r2l(n.minallowed);n._rl[0]>n._rl[1]?n._rl[1]=Math.max(n._rl[1],o):n._rl[0]=Math.max(n._rl[0],o)}if(void 0!==n.maxallowed){var s=n.r2l(n.maxallowed);n._rl[0]90&&m<=270&&(g.tickangle=180);var x=v?function(e){var t=P(r,C([e.x,0]));return o(t[0]-f,t[1]-d)}:function(e){return o(g.l2p(e.x)+h,0)},b=v?function(e){return I(r,e.x,-1/0,1/0)}:function(e){return r.pathArc(g.r2p(e.x)+h)},_=B(p);if(r.radialTickLayout!==_&&(l["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),y){g.setScale();var w=0,k=v?(g.tickvals||[]).filter(function(e){return e>=0}).map(function(e){return u.tickText(g,e,!0,!1)}):u.calcTicks(g),T=v?k:u.clipEnds(g,k),A=u.getTickSigns(g)[2];v&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(A=-A),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),u.drawTicks(n,g,{vals:k,layer:l["radial-axis"],path:u.makeTickPath(g,0,A),transFn:x,crisp:!1}),u.drawGrid(n,g,{vals:T,layer:l["radial-grid"],path:b,transFn:i.noop,crisp:!1}),u.drawLabels(n,g,{vals:k,layer:l["radial-axis"],transFn:x,labelFns:u.makeLabelFns(g,w)})}var M=r.radialAxisAngle=r.vangles?R(N(D(p.angle),r.vangles)):p.angle,S=o(f,d),E=S+a(-M);U(l["radial-axis"],y&&(p.showticklabels||p.ticks),{transform:E}),U(l["radial-grid"],y&&p.showgrid,{transform:v?"":S}),U(l["radial-line"].select("line"),y&&p.showline,{x1:v?-c:h,y1:0,x2:c,y2:0,transform:E}).attr("stroke-width",p.linewidth).call(s.stroke,p.linecolor)},F.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this.gd,i=this.radius,a=this.cx,o=this.cy,s=this.getRadial(t),c=this.id+"title",u=0;if(s.title){var h=l.bBox(this.layers["radial-axis"].node()).height,f=s.title.font.size,d=s.side;u="top"===d?f:"counterclockwise"===d?-(h+.4*f):h+.8*f}var p=void 0!==r?r:this.radialAxisAngle,m=D(p),g=Math.cos(m),v=Math.sin(m),x=a+i/2*g+u*v,b=o-i/2*v+u*g;this.layers["radial-axis-title"]=y.draw(n,c,{propContainer:s,propName:this.id+".radialaxis.title.text",placeholder:z(n,"Click to enter radial axis title"),attributes:{x:x,y:b,"text-anchor":"middle"},transform:{rotate:-p}})}},F.updateAngularAxis=function(e,t){var r,n=this,l=n.gd,c=n.layers,h=n.radius,f=n.innerRadius,d=n.cx,p=n.cy,m=n.getAngular(t),g=n.angularAxis,y=n.isSmith;y||(n.fillViewInitialKey("angularaxis.rotation",m.rotation),g.setGeometry(),g.setScale());var v=y?function(e){var t=P(n,C([0,e.x]));return Math.atan2(t[0]-d,t[1]-p)-Math.PI/2}:function(e){return g.t2g(e.x)};"linear"===g.type&&"radians"===g.thetaunit&&(g.tick0=R(g.tick0),g.dtick=R(g.dtick));var x=function(e){return o(d+h*Math.cos(e),p-h*Math.sin(e))},b=y?function(e){var t=P(n,C([0,e.x]));return o(t[0],t[1])}:function(e){return x(v(e))},_=y?function(e){var t=P(n,C([0,e.x])),r=Math.atan2(t[0]-d,t[1]-p)-Math.PI/2;return o(t[0],t[1])+a(-R(r))}:function(e){var t=v(e);return x(t)+a(-R(t))},w=y?function(e){return L(n,e.x,0,1/0)}:function(e){var t=v(e),r=Math.cos(t),n=Math.sin(t);return"M"+[d+f*r,p-f*n]+"L"+[d+h*r,p-h*n]},k=u.makeLabelFns(g,0).labelStandoff,T={};T.xFn=function(e){return Math.cos(v(e))*k},T.yFn=function(e){var t=v(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(k+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*A)},T.anchorFn=function(e){var t=Math.cos(v(e));return .1>Math.abs(t)?"middle":t>0?"start":"end"},T.heightFn=function(e,t,r){return -.5*(1+Math.sin(v(e)))*r};var M=B(m);n.angularTickLayout!==M&&(c["angular-axis"].selectAll("."+g._id+"tick").remove(),n.angularTickLayout=M);var S=y?[1/0].concat(g.tickvals||[]).map(function(e){return u.tickText(g,e,!0,!1)}):u.calcTicks(g);if(y&&(S[0].text="∞",S[0].fontSize*=1.75),"linear"===t.gridshape?(r=S.map(v),0>i.angleDelta(r[0],r[1])&&(r=r.slice().reverse())):r=null,n.vangles=r,"category"===g.type&&(S=S.filter(function(e){return i.isAngleInsideSector(v(e),n.sectorInRad)})),g.visible){var E="inside"===g.ticks?-1:1,I=(g.linewidth||1)/2;u.drawTicks(l,g,{vals:S,layer:c["angular-axis"],path:"M"+E*I+",0h"+E*g.ticklen,transFn:_,crisp:!1}),u.drawGrid(l,g,{vals:S,layer:c["angular-grid"],path:w,transFn:i.noop,crisp:!1}),u.drawLabels(l,g,{vals:S,layer:c["angular-axis"],repositionOnUpdate:!0,transFn:b,labelFns:T})}U(c["angular-line"].select("path"),m.showline,{d:n.pathSubplot(),transform:o(d,p)}).attr("stroke-width",m.linewidth).call(s.stroke,m.linecolor)},F.updateFx=function(e,t){this.gd._context.staticPlot||(this.isSmith||(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},F.updateHoverAndMainDrag=function(e){var t,a,l=this,c=l.isSmith,u=l.gd,h=l.layers,f=e._zoomlayer,d=M.MINZOOM,y=M.OFFEDGE,b=l.radius,w=l.innerRadius,k=l.cx,T=l.cy,A=l.cxx,E=l.cyy,C=l.sectorInRad,L=l.vangles,I=l.radialAxis,P=S.clampTiny,z=S.findXYatLength,O=S.findEnclosingVertexAngles,D=M.cornerHalfWidth,R=M.cornerLen/2,j=p.makeDragger(h,"path","maindrag",!1===e.dragmode?"none":"crosshair");r.select(j).attr("d",l.pathSubplot()).attr("transform",o(k,T)),j.onmousemove=function(e){g.hover(u,e,l.id),u._fullLayout._lasthover=j,u._fullLayout._hoversubplot=l.id},j.onmouseout=function(e){u._dragging||m.unhover(u,e)};var F,B,N,U,V,q,H,G,W,Y={element:j,gd:u,subplot:l.id,plotinfo:{id:l.id,xaxis:l.xaxis,yaxis:l.yaxis},xaxes:[l.xaxis],yaxes:[l.yaxis]};function X(e,t){return Math.sqrt(e*e+t*t)}function Z(e,t){return Math.atan2(E-t,e-A)}function $(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function K(e,t){if(0===e)return l.pathSector(2*D);var r=R/e,n=t-r,i=t+r,a=Math.max(0,Math.min(e,b)),o=a-D,s=a+D;return"M"+$(o,n)+"A"+[o,o]+" 0,0,0 "+$(o,i)+"L"+$(s,i)+"A"+[s,s]+" 0,0,1 "+$(s,n)+"Z"}function J(e,t,r){if(0===e)return l.pathSector(2*D);var n,i,a,o,s=$(e,t),c=$(e,r),u=P((s[0]+c[0])/2),h=P((s[1]+c[1])/2);if(u&&h){var f=h/u,d=-1/f,p=z(D,f,u,h);a=z(R,d,p[0][0],p[0][1]),o=z(R,d,p[1][0],p[1][1])}else h?(n=R,i=D):(n=D,i=R),a=[[u-n,h-i],[u+n,h-i]],o=[[u-n,h+i],[u+n,h+i]];return"M"+a.join("L")+"L"+o.reverse().join("L")+"Z"}function Q(e,t){return t=Math.max(Math.min(t,b),w),ed?(e-1&&1===e&&x(t,u,[l.xaxis],[l.yaxis],l.id,Y),r.indexOf("event")>-1&&g.click(u,t,l.id)}Y.prepFn=function(e,r,n){var o,h=u._fullLayout.dragmode,d=j.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var m=u._fullLayout._invTransform;t=u._fullLayout._invScaleX,a=u._fullLayout._invScaleY;var g=i.apply3DTransform(m)(r-d.left,n-d.top);if(F=g[0],B=g[1],L){var y=S.findPolygonOffset(b,C[0],C[1],L);F+=A+y[0],B+=E+y[1]}switch(h){case"zoom":Y.clickFn=eo,c||(L?Y.moveFn=en:Y.moveFn=et,Y.doneFn=ei,N=null,U=null,V=l.pathSubplot(),q=!1,o=u._fullLayout[l.id],H=s.color(o.bgcolor).luminosity(),(G=p.makeZoombox(f,H,k,T,V)).attr("fill-rule","evenodd"),W=p.makeCorners(f,k,T),_(u));break;case"select":case"lasso":v(e,r,n,Y,h)}},m.init(Y)},F.updateRadialDrag=function(e,t,s){var l,c,u,h=this,f=h.gd,d=h.layers,g=h.radius,y=h.innerRadius,v=h.cx,x=h.cy,b=h.radialAxis,w=M.radialDragBoxSize,A=w/2;if(b.visible){var S,E,C,L=D(h.radialAxisAngle),I=b._rl,P=I[0],z=I[1],O=I[s],j=.75*(I[1]-I[0])/(1-h.getHole(t))/g;s?(S=v+(g+A)*Math.cos(L),E=x-(g+A)*Math.sin(L),C="radialdrag"):(S=v+(y-A)*Math.cos(L),E=x-(y-A)*Math.sin(L),C="radialdrag-inner");var F=p.makeRectDragger(d,C,"crosshair",-A,-A,w,w),B={element:F,gd:f};!1===e.dragmode&&(B.dragmode=!1),U(r.select(F),b.visible&&y0!=(s?u>P:u")}}t.exports={hoverPoints:function(e,t,i,a){var o=r(e,t,i,a);if(!(!o||!1===o[0].index)){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,n(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:n}}}),bq=d({"src/traces/scatterpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:bR(),categories:["polar","symbols","showLegend","scatter-like"],attributes:bj(),supplyDefaults:bF().supplyDefaults,colorbar:iE(),formatLabels:bB(),calc:bN(),plot:bU(),style:iL().style,styleOnSelect:iL().styleOnSelect,hoverPoints:bV().hoverPoints,selectPoints:iz(),meta:{}}}}),bH=d({"lib/scatterpolar.js"(e,t){t.exports=bq()}}),bG=d({"src/traces/scatterpolargl/attributes.js"(e,t){var n=bj(),{cliponaxis:a,hoveron:s}=n,u=((e,t)=>{var r={};for(var n in e)l.call(e,n)&&0>t.indexOf(n)&&(r[n]=e[n]);if(null!=e&&o)for(var n of o(e))0>t.indexOf(n)&&c.call(e,n)&&(r[n]=e[n]);return r})(n,["cliponaxis","hoveron"]),{connectgaps:f,line:{color:d,dash:p,width:m},fill:g,fillcolor:y,marker:v,textfont:x,textposition:b}=mg();t.exports=r(h({},u),i({connectgaps:f,fill:g,fillcolor:y,line:{color:d,dash:p,editType:"calc",width:m},marker:v,textfont:x,textposition:b}))}}),bW=d({"src/traces/scatterpolargl/defaults.js"(e,t){var r=tY(),n=rk(),i=bF().handleRThetaDefaults,a=io(),o=is(),s=ic(),l=iu(),c=nq().PTS_LINESONLY,u=bG();t.exports=function(e,t,h,f){function d(n,i){return r.coerce(e,t,u,n,i)}var p=i(e,t,f,d);if(!p){t.visible=!1;return}d("thetaunit"),d("mode",p=l&&(v.marker.cluster=p.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=_),v.line&&_.length>1&&s.extendFlat(v.line,o.linePositions(e,d,_)),v.text&&(s.extendFlat(v.text,{positions:_},o.textPosition(e,d,v.text,v.marker)),s.extendFlat(v.textSel,{positions:_},o.textPosition(e,d,v.text,v.markerSel)),s.extendFlat(v.textUnsel,{positions:_},o.textPosition(e,d,v.text,v.markerUnsel))),v.fill&&!f.fill2d&&(f.fill2d=!0),v.marker&&!f.scatter2d&&(f.scatter2d=!0),v.line&&!f.line2d&&(f.line2d=!0),v.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(v.line),f.fillOptions.push(v.fill),f.markerOptions.push(v.marker),f.markerSelectedOptions.push(v.markerSel),f.markerUnselectedOptions.push(v.markerUnsel),f.textOptions.push(v.text),f.textSelectedOptions.push(v.textSel),f.textUnselectedOptions.push(v.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),p.x=w,p.y=k,p.rawx=w,p.rawy=k,p.r=g,p.theta=y,p.positions=_,p._scene=f,p.index=f.count,f.count++}}),i(e,t,c)}},t.exports.reglPrecompiled={}}}),bJ=d({"src/traces/scatterpolargl/index.js"(e,t){var r=b$();r.plot=bK(),t.exports=r}}),bQ=d({"lib/scatterpolargl.js"(e,t){t.exports=bJ()}}),b0=d({"src/traces/barpolar/attributes.js"(e,t){var r,{hovertemplateAttrs:n,templatefallbackAttrs:i}=th(),a=U().extendFlat,o=bj(),s=aZ();t.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:a({},s.base,{}),offset:a({},s.offset,{}),width:a({},s.width,{}),text:a({},s.text,{}),hovertext:a({},s.hovertext,{}),marker:(r=a({},s.marker),delete r.cornerradius,r),hoverinfo:o.hoverinfo,hovertemplate:n(),hovertemplatefallback:i(),selected:s.selected,unselected:s.unselected}}}),b1=d({"src/traces/barpolar/layout_attributes.js"(e,t){t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),b2=d({"src/traces/barpolar/defaults.js"(e,t){var r=tY(),n=bF().handleRThetaDefaults,i=aK(),a=b0();t.exports=function(e,t,o,s){function l(n,i){return r.coerce(e,t,a,n,i)}if(!n(e,t,s,l)){t.visible=!1;return}l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),i(e,t,l,o,s),r.coerceSelectionMarkerOpacity(t,l)}}}),b3=d({"src/traces/barpolar/layout_defaults.js"(e,t){var r=tY(),n=b1();t.exports=function(e,t,i){var a,o={};function s(i,o){return r.coerce(e[a]||{},t[a],n,i,o)}for(var l=0;l0?(a=r,s=n):(a=n,s=r);var a,s,h=o.findEnclosingVertexAngles(a,l.vangles)[0],f=o.findEnclosingVertexAngles(s,l.vangles)[1],d=[h,(a+s)/2,f];return o.pathPolygonAnnulus(e,t,a,s,d,c,u)}:function(e,t,r,n){return i.pathAnnulus(e,t,r,n,c,u)}),y=t.layers.frontplot.select("g.barlayer");i.makeTraceGroups(y,s,"trace bars").each(function(){var o=r.select(this),s=i.ensureSingle(o,"g","points").selectAll("g.point").data(i.identity);s.enter().append("g").style("vector-effect",h?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each(function(e){var t,a=r.select(this),o=e.rp0=p.c2p(e.s0),s=e.rp1=p.c2p(e.s1),l=e.thetag0=m.c2g(e.p0),c=e.thetag1=m.c2g(e.p1);if(n(o)&&n(s)&&n(l)&&n(c)&&o!==s&&l!==c){var u=p.c2g(e.s1),h=(l+c)/2;e.ct=[f.c2p(u*Math.cos(h)),d.c2p(u*Math.sin(h))],t=g(o,s,l,c)}else t="M0,0Z";i.ensureSingle(a,"path").attr("d",t)}),a.setClipUrl(o,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)})}}}),b6=d({"src/traces/barpolar/hover.js"(e,t){var r=r7(),n=tY(),i=a6().getTraceColor,a=n.fillText,o=bV().makeHoverPointText,s=bI().isPtInsidePolygon;t.exports=function(e,t,l){var c=e.cd,u=c[0].trace,h=e.subplot,f=h.radialAxis,d=h.angularAxis,p=h.vangles,m=p?s:n.isPtInsideSector,g=e.maxHoverDistance,y=d._period||2*Math.PI,v=Math.abs(f.g2p(Math.sqrt(t*t+l*l))),x=Math.atan2(l,t);if(f.range[0]>f.range[1]&&(x+=Math.PI),r.getClosest(c,function(e){return m(v,x,[e.rp0,e.rp1],[e.thetag0,e.thetag1],p)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/y)-1+(e.rp1-v)/(e.rp1-e.rp0)-1:1/0},e),!1!==e.index){var b=c[e.index];e.x0=e.x1=b.ct[0],e.y0=e.y1=b.ct[1];var _=n.extendFlat({},b,{r:b.s,theta:b.p});return a(b,u,e),o(_,u,h,e),e.hovertemplate=u.hovertemplate,e.color=i(u,b),e.xLabelVal=e.yLabelVal=void 0,b.s<0&&(e.idealAlign="left"),[e]}}}}),b8=d({"src/traces/barpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"barpolar",basePlotModule:bR(),categories:["polar","bar","showLegend"],attributes:b0(),layoutAttributes:b1(),supplyDefaults:b2(),supplyLayoutDefaults:b3(),calc:b5().calc,crossTraceCalc:b5().crossTraceCalc,plot:b4(),colorbar:iE(),formatLabels:bB(),style:a5().style,styleOnSelect:a5().styleOnSelect,hoverPoints:b6(),selectPoints:a9(),meta:{}}}}),b9=d({"lib/barpolar.js"(e,t){t.exports=b8()}}),b7=d({"src/plots/smith/constants.js"(e,t){t.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),_e=d({"src/plots/smith/layout_attributes.js"(e,t){var r=eE(),n=ra(),i=aC().attributes,a=tY().extendFlat,o=tl().overrideAll,s=o({color:n.color,showline:a({},n.showline,{dflt:!0}),linecolor:n.linecolor,linewidth:n.linewidth,showgrid:a({},n.showgrid,{dflt:!0}),gridcolor:n.gridcolor,gridwidth:n.gridwidth,griddash:n.griddash},"plot","from-root"),l=o({ticklen:n.ticklen,tickwidth:a({},n.tickwidth,{dflt:2}),tickcolor:n.tickcolor,showticklabels:n.showticklabels,labelalias:n.labelalias,showtickprefix:n.showtickprefix,tickprefix:n.tickprefix,showticksuffix:n.showticksuffix,ticksuffix:n.ticksuffix,tickfont:n.tickfont,tickformat:n.tickformat,hoverformat:n.hoverformat,layer:n.layer},"plot","from-root"),c=a({visible:a({},n.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:a({},n.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},s,l),u=a({visible:a({},n.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:n.ticks,editType:"calc"},s,l);t.exports={domain:i({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:r.background},realaxis:c,imaginaryaxis:u,editType:"calc"}}}),_t=d({"src/plots/smith/layout_defaults.js"(e,t){var r,n,i,a=tY(),o=eC(),s=t2(),l=sS(),c=t8().getSubplotData,u=rg(),h=rm(),f=ij(),d=rL(),p=_e(),m=b7(),g=m.axisNames,y=(r=function(e){return a.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(e){return-e}).concat([0]).concat(e)},n=String,i={},function(e){var t=n?n(e):e;if(t in i)return i[t];var a=r(e);return i[t]=a,a});function v(e,t,r,n){var i=r("bgcolor");n.bgColor=o.combine(i,n.paper_bgcolor);var l,v=c(n.fullData,m.name,n.id),x=n.layoutOut;function b(e,t){return r(l+"."+e,t)}for(var _=0;_")}}t.exports={hoverPoints:function(e,t,i,a){var o=r(e,t,i,a);if(!(!o||!1===o[0].index)){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,n(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:n}}}),_c=d({"src/traces/scattersmith/index.js"(e,t){t.exports={moduleType:"trace",name:"scattersmith",basePlotModule:_r(),categories:["smith","symbols","showLegend","scatter-like"],attributes:_n(),supplyDefaults:_i(),colorbar:iE(),formatLabels:_a(),calc:_o(),plot:_s(),style:iL().style,styleOnSelect:iL().styleOnSelect,hoverPoints:_l().hoverPoints,selectPoints:iz(),meta:{}}}}),_u=d({"lib/scattersmith.js"(e,t){t.exports=_c()}}),_h=d({"src/traces/quiver/attributes.js"(e,t){var r=W(),n=th().hovertemplateAttrs,i=ri().axisHoverFormat,a=U().extendFlat,o=rs(),s=tc().dash,l=nV(),c=nG();t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:c.x0,dx:c.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:c.y0,dy:c.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},anglemode:{valType:"enumerated",values:["paper","data"],dflt:"axis",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:i("x"),yhoverformat:i("y"),uhoverformat:i("u","noDate"),vhoverformat:i("v","noDate"),hoverinfo:a({},r.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:n({},{keys:["x","y","u","v","text","name"]}),text:c.text,textposition:c.textposition,textfont:c.textfont,marker:a({arrowsize:a({},l.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:s,editType:"style"},editType:"calc"},o("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}}}}),_f=d({"src/traces/quiver/defaults.js"(e,t){var r=tY(),n=_h(),i=ir(),a=rn().hasColorscale,o=rv();t.exports=function(e,t,s,l){function c(i,a){return r.coerce(e,t,n,i,a)}var u=i(e,t,l,c);if(!u){t.visible=!1;return}var h=c("u"),f=c("v");if(!r.isArrayOrTypedArray(h)||0===h.length){t.u=Array(u);for(var d=0;dE&&(E=u[D]),h[D]L&&(L=h[D]),RP&&(P=R),jO&&(O=j);var U=Math.sqrt(R*R+j*j);if(U>m&&(m=U),Uy&&(y=V))}}else F.x=a,F.y=a}if(t._maxNorm=m,"scaled"===k||"paper"===w){let e=(E-S)*(L-C)/f;0===e?t._scaleFactor=1/t._maxNorm:t._scaleFactor=Math.sqrt(e)/t._maxNorm}else t._scaleFactor=1;t._scaleFactor*=t.sizeref;let q=Array(f),H=Array(f),G=Array(f),W=Array(f);for(var Y,X,D=0;De.i&&isFinite(o[e.i]))a=o[e.i];else{var s=t.u&&t.u[e.i]||0,l=t.v&&t.v[e.i]||0;a=Math.sqrt(s*s+l*l)}return i(a)})}function l(e,t,a){var l=t[0].trace,c=l.marker||{},u=c.line||{},h=n.isArrayOrTypedArray(c.color)?void 0:c.color,f=l._hasColorscale;if(a)if(l.selectedpoints){var d=(l.selected||{}).marker||{},p=(l.unselected||{}).marker||{},m=d.line||{},g=p.line||{};a.selectAll("path.js-line").each(function(e){var t=r.select(this),n=!e.selected,a=n?p.color:d.color,c=n?void 0!==g.width?g.width:u.width:void 0!==m.width?m.width:u.width;a?(i.lineGroupStyle(t,c,a,u.dash),t.style("stroke-opacity",1)):(i.lineGroupStyle(t,c,h,u.dash),f&&s(t,l),t.style("stroke-opacity",n?o:1))}),i.selectedTextStyle(a.selectAll("text"),l)}else{var y=a.selectAll("path.js-line");y.call(i.lineGroupStyle,u.width,h,u.dash),f&&s(y,l),y.style("stroke-opacity",1),i.textPointStyle(a.selectAll("text"),l,e)}}t.exports={style:function(e){r.select(e).selectAll("g.trace.quiver").each(function(t){l(e,t,r.select(this))})},styleOnSelect:function(e,t,r){l(e,t,r)},colorscaleStroke:s}}}),_g=d({"src/traces/quiver/plot.js"(e,t){var r=b(),n=tY(),i=rE(),a=_m().colorscaleStroke,o=Math.PI/12;function s(e,t,s,l,c,u,h){var f=l[0].trace,d=s.xaxis,p=s.yaxis;l[0][s.isRangePlot?"nodeRangePlot3":"node3"]=r.select(u);var m=r.select(u).selectAll("g.lines").data([l]);m.enter().append("g").classed("lines",!0),i.setClipUrl(m,s.layerClipId,e);var g=m.selectAll("path.js-line").data(l);g.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),g.exit().remove(),f._maxNorm;let y=f.anglemode,v=(f.sizemode,f.sizeref,f.anchor),x="paper"===y?f._scaleFactor*Math.sqrt(Math.abs(d._m*p._m)):f._scaleFactor,b=f.marker.arrowsize;g.each(function(e){let t=r.select(this);if(void 0===e.x||void 0===e.y)return void t.attr("d",null);let n=("paper"===y?e._u*Math.sign(d._m):r.round(d._m*e._u))*x,i=("paper"===y?e._v*Math.sign(p._m):r.round(p._m*e._v))*x,a=void 0!==(f._input.marker||{}).arrowsize;"tip"===v?(s=d.c2p(e.x)-n,c=p.c2p(e.y)-i,l=d.c2p(e.x),u=p.c2p(e.y)):"center"===v?(s=d.c2p(e.x)-n/2,c=p.c2p(e.y)-i/2,l=d.c2p(e.x)+n/2,u=p.c2p(e.y)+i/2):(s=d.c2p(e.x),c=p.c2p(e.y),l=d.c2p(e.x)+n,u=p.c2p(e.y)+i),e._px0=s,e._py0=c,e._px1=l,e._py1=u;var s,l,c,u,h=f.marker.line.width;a||(h=Math.max(h,1.5));let m=Math.min(5.8*b*h,.7*Math.sqrt((l-s)*(l-s)+(u-c)*(u-c))),g=Math.atan2(u-c,l-s),_=l-m*Math.cos(g-o),w=u-m*Math.sin(g-o),k=l-m*Math.cos(g+o),T=u-m*Math.sin(g+o),A="M"+s+","+c+"L"+l+","+u+"L"+_+","+w+"L"+l+","+u+"L"+k+","+T;t.attr("d",A)});var _=f.marker||{},w=_.line||{},k=n.isArrayOrTypedArray(_.color)?void 0:_.color;i.lineGroupStyle(g,w.width,k,w.dash),f._hasColorscale&&a(g,f);var T=r.select(u).selectAll("g.text").data([l]);T.enter().append("g").classed("text",!0),i.setClipUrl(T,s.layerClipId,e);var A=T.selectAll("g.textpoint").data(l);if(A.enter().append("g").classed("textpoint",!0).append("text"),A.exit().remove(),A.each(function(e){var t=r.select(this);i.translatePoint(e,t.select("text"),d,p)||t.remove()}),A.selectAll("text").call(i.textPointStyle,f,e).each(function(e){var t=d.c2p(e.x),n=p.c2p(e.y);r.select(this).selectAll("tspan.line").each(function(){r.select(this).attr({x:t,y:n})})}),h&&h.duration>0){var M=r.transition().duration(h.duration).ease(h.easing);g.transition(M).style("opacity",1)}}t.exports=function(e,t,n,i,a,o){var l,c,u=!a,h=!!a&&a.duration>0;((l=i.selectAll("g.trace").data(n,function(e){return e[0].trace.uid})).enter().append("g").attr("class",function(e){return"trace quiver trace"+e[0].trace.uid}).style("stroke-miterlimit",2),l.order(),h)?(o&&(c=o()),r.transition().duration(a.duration).ease(a.easing).each("end",function(){c&&c()}).each("interrupt",function(){c&&c()}).each(function(){i.selectAll("g.trace").each(function(r,i){s(e,i,t,r,n,this,a)})})):l.each(function(r,i){s(e,i,t,r,n,this,a)}),u&&l.exit().remove()}}}),_y=d({"src/traces/quiver/hover.js"(e,t){var r=tY(),n=r7(),i=iI();t.exports=function(e,t,a,o){var s=e.cd,l=s[0].trace,c=e.xa,u=e.ya,h=c.c2p(t),f=u.c2p(a);if(n.getClosest(s,function(e){return void 0===e._px0?1/0:function(e,t,r,n,i,a){let o=i-r,s=a-n,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-n)*(t-n));var c=((e-r)*o+(t-n)*s)/l;let u=r+(c=Math.max(0,Math.min(1,c)))*o,h=n+c*s;return Math.sqrt((e-u)*(e-u)+(t-h)*(t-h))}(h,f,e._px0,e._py0,e._px1,e._py1)},e),!1!==e.index){var d=s[e.index],p=c.c2p(d.x,!0),m=u.c2p(d.y,!0),g=Math.sqrt((h-p)*(h-p)+(f-m)*(f-m));e.index=d.i;var y=l.u?l.u[d.i]:0,v=l.v?l.v[d.i]:0;return r.extendFlat(e,{color:i(l,d),x0:p-3,x1:p+3,xLabelVal:d.x,y0:m-3,y1:m+3,yLabelVal:d.y,uLabelVal:y,vLabelVal:v,extraText:"u: "+y+", v: "+v,spikeDistance:g,hovertemplate:l.hovertemplate}),r.fillText(d,l,e),[e]}}}}),_v=d({"src/traces/quiver/format_labels.js"(e,t){var r=rz(),n=tY();t.exports=function(e,t,i){var a={},o={_fullLayout:i},s=r.getFromTrace(o,t,"x"),l=r.getFromTrace(o,t,"y"),c=e.x,u=e.y;a.xLabel=r.tickText(s,s.c2l(c),!0).text,a.yLabel=r.tickText(l,l.c2l(u),!0).text;var h=t.u?t.u[e.i]:0,f=t.v?t.v[e.i]:0,d=t.uhoverformat,p=t.vhoverformat;return a.uLabel=d?n.numberFormat(d)(h):String(h),a.vLabel=p?n.numberFormat(p)(f):String(f),a}}}),_x=d({"src/traces/quiver/event_data.js"(e,t){t.exports=function(e,t,r,n,i){return e.x=t.x,e.y=t.y,e.u=r.u?r.u[i]:void 0,e.v=r.v?r.v[i]:void 0,e}}}),_b=d({"src/traces/quiver/index.js"(e,t){t.exports={moduleType:"trace",name:"quiver",basePlotModule:iV(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:_h(),supplyDefaults:_f(),calc:_d(),crossTraceCalc:_p(),plot:_g(),style:_m().style,styleOnSelect:_m().styleOnSelect,hoverPoints:_y(),formatLabels:_v(),eventData:_x(),selectPoints:iz(),colorbar:iE(),animatable:!0,meta:{}}}}),__=d({"lib/quiver.js"(e,t){t.exports=_b()}}),_w=d({"node_modules/world-calendars/dist/main.js"(e,t){var r=mW();function n(){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(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}function o(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}r(n.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,i){return(n=(null!=e&&e.year?e.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":e[a]+t[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(e[1]+t[1])&&(n=n.substr(1)),n||e[0]}}}),r(i.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e??this,t,r)},year:function(e){return 0==arguments.length?this._year:this.set(e,"y")},month:function(e){return 0==arguments.length?this._month:this.set(e,"m")},day:function(e){return 0==arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,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(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(0>this.year()?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),r(o.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new i(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return 0>this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(0>t.year()?"-":"")+a(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,l.local.invalidDate||l.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(e,t,r){var n=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var n=e.toJD()+t*("w"===r?this.daysInWeek():1),i=e.calendar().fromJD(n);return this._validateLevel--,[i.year(),i.month(),i.day()]}try{var a=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0),i=e.day();"y"===r?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.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(e){for(;ot-1+e.minMonth;)a++,o-=t,t=e.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(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&("y"===n||"m"===n)&&(0===t[0]||e.year()>0!=t[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];t=this._add(e,r*i[0]+(r<0?-1:1)*i[1],i[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var n="y"===r?t:e.year(),i="m"===r?t:e.month(),a="d"===r?t:e.day();return("y"===r||"m"===r)&&(a=Math.min(a,this.daysInMonth(n,i))),e.date(n,i,a)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||0!==e;if(n){var i=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDayt.year());return e%4==0&&(e%100!=0||e%400==0)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(e,t,r){var n=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<3&&(t+=12,e--);var i=Math.floor(e/100);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+(2-i+Math.floor(i/4))-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-1867216.25)/36524.25),n=(r=t+1+r-Math.floor(r/4))+1524,i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),o=Math.floor((n-a)/30.6001),s=n-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),c=i-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,l.local.invalidDate||l.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(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var l=t.exports=new n;l.cdate=i,l.baseCalendar=o,l.calendars.gregorian=s}}),_k=d({"node_modules/world-calendars/dist/plus.js"(){var e=mW(),t=_w();e(t.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"}),t.local=t.regionalOptions[""],e(t.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),e(t.baseCalendar.prototype,{UNIX_EPOCH:t.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:t.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(e,r,n){if("string"!=typeof e&&(n=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw t.local.invalidFormat||t.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,n=n||{};for(var i,a,o,s=n.dayNamesShort||this.local.dayNamesShort,l=n.dayNames||this.local.dayNames,c=n.monthNumbers||this.local.monthNumbers,u=n.monthNamesShort||this.local.monthNamesShort,h=n.monthNames||this.local.monthNames,f=(n.calculateWeek||this.local.calculateWeek,function(t,r){for(var n=1;v+n1}),d=function(e,t,r,n){var i=""+t;if(f(e,n))for(;i.length1},x=function(e,n){var i=v(e,n),a=RegExp("^-?\\d{1,"+[2,3,i?4:2,i?4:2,10,11,20]["oyYJ@!".indexOf(e)+1]+"}"),o=r.substring(k).match(a);if(!o)throw(t.local.missingNumberAt||t.regionalOptions[""].missingNumberAt).replace(/\{0\}/,k);return k+=o[0].length,parseInt(o[0],10)},b=this,_=function(e,n,i,a){for(var o=v(e,a)?i:n,s=0;s-1){d=1,p=m;for(var M=this.daysInMonth(f,d);p>M;M=this.daysInMonth(f,d))d++,p-=M}return h>-1?this.fromJD(h):this.newDate(f,d,p)},determineDate:function(e,t,r,n,i){r&&"object"!=typeof r&&(i=n,n=r,r=null),"string"!=typeof n&&(i=n,n="");var a=this;return t=t?t.newDate():null,e=null==e?t:"string"==typeof e?function(e){try{return a.parseDate(n,e,i)}catch{}e=e.toLowerCase();for(var t=(e.match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e)}})}}),_T=d({"node_modules/world-calendars/dist/calendars/chinese.js"(){var e=_w(),t=mW(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(a);return r?r[0]:""}var n=this._validateYear(e),i=e.month(),o=""+this.toChineseMonth(n,i);return t&&o.length<2&&(o="0"+o),this.isIntercalaryMonth(n,i)&&(o+="i"),o},monthNames:function(e){if("string"==typeof e){var t=e.match(o);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="闰"+i),i},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(s);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),i=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,n)-1];return this.isIntercalaryMonth(r,n)&&(i="闰"+i),i},parseMonth:function(e,t){e=this._validateYear(e);var r,n=parseInt(t);if(isNaN(n))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),n=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var i=t[t.length-1];r="i"===i||"I"===i}return this.toMonthIndex(e,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(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(t,r,n){var i=this.intercalaryMonth(t);if(n&&r!==i||r<1||r>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?!n&&r<=i?r-1:r:r-1},toChineseMonth:function(t,r){t.year&&(r=(t=t.year()).month());var n=this.intercalaryMonth(t);if(r<0||r>(n?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?r>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(t,n,i){var a,o=c[this._validateYear(t,e.local.invalidyear)-c[0]];return(a=r.newDate(o>>9&4095,o>>5&15,31&o)).add(4-(a.dayOfWeek()||7),"d"),1+Math.floor((this.toJD(t,n,i)-a.toJD())/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(t,r){t.year&&(r=t.month(),t=t.year());var n=l[(t=this._validateYear(t))-l[0]];if(r>(n>>13?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n&1<<12-r?30:29},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,n,i){var a=this._validate(t,s,i,e.local.invalidDate);t=this._validateYear(a.year()),n=a.month(),i=a.day();var o=this.isIntercalaryMonth(t,n),s=this.toChineseMonth(t,n),u=function(e,t,r,n){if("object"==typeof e)a=e,i=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw Error("Lunar day outside range 1 - 30");"object"==typeof n?(o=!1,i=n):(o=!!n,i={}),a={year:e,month:t,day:r,isIntercalary:o}}var i,a,o,s,u=a.day-1,h=l[a.year-l[0]],f=h>>13;s=f&&(a.month>f||a.isIntercalary)?a.month:a.month-1;for(var d=0;d>9&4095,(p>>5&15)-1,(31&p)+u);return i.year=m.getFullYear(),i.month=1+m.getMonth(),i.day=m.getDate(),i}(t,s,i,o);return r.toJD(u.year,u.month,u.day)},fromJD:function(e){var t=r.fromJD(e),n=function(e,t,r){if("object"==typeof e)a=e,o=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},o={}}var n=c[a.year-c[0]],i=a.year<<9|a.month<<5|a.day;o.year=i>=n?a.year:a.year-1;var a,o,s,u=new Date((n=c[o.year-c[0]])>>9&4095,(n>>5&15)-1,31&n);s=Math.round((new Date(a.year,a.month-1,a.day)-u)/864e5);var h,f=l[o.year-l[0]];for(h=0;h<13;h++){var d=f&1<<12-h?30:29;if(s>13;return!p||hr.year());return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return(t=i.year())<0&&t++,i.day()+(i.month()-1)*30+(t-1)*365+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--;var n=Math.floor((t=Math.floor(e)+.5-this.newDate(r,1,1).toJD())/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}}),e.calendars.coptic=r}}),_M=d({"node_modules/world-calendars/dist/calendars/discworld.js"(){var e=_w(),t=mW();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,r,n){return(this._validate(t,r,n,e.local.invalidDate).day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(t,r,i){return{century:n[Math.floor((this._validate(t,r,i,e.local.invalidDate).year()-1)/100)+1]||""}},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return t=i.year()+ +(0>i.year()),r=i.month(),(n=i.day())+16*(r>1)+(r>2?(r-2)*32:0)+(t-1)*400+this.jdEpoch-1},fromJD:function(e){var t=Math.floor((e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1)/400)+1;e-=(t-1)*400;var r=Math.floor((e+=16*(e>15))/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var n={20:"Fruitbat",21:"Anchovy"};e.calendars.discworld=r}}),_S=d({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var e=_w(),t=mW();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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 r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=r.year()+ +(0>r.year());return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(13===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return(t=i.year())<0&&t++,i.day()+(i.month()-1)*30+(t-1)*365+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--;var n=Math.floor((t=Math.floor(e)+.5-this.newDate(r,1,1).toJD())/30)+1,i=t-(n-1)*30+1;return this.newDate(r,n,i)}}),e.calendars.ethiopian=r}}),_E=d({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var e=_w(),t=mW();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.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 r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return 7>n(7*(e=e<0?e+1:e)+1,19)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,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,e.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),12===r&&this.leapYear(t)||8===r&&5===n(this.daysInYear(t),10)?30:9===r&&3===n(this.daysInYear(t),10)?29:this.daysPerMonth[r-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return{yearType:(this.leapYear(i)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(i)%10-3]}},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);t=i.year(),r=i.month(),n=i.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+n+1;if(r<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;sn(3*(r+1),7)&&r++,r},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e);return this._delay1(e+1)-r==356?2:+(r-t==382)},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor((e-this.jdEpoch)*98496/0x224f0b7)-1;e>=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),e.calendars.hebrew=r}}),_C=d({"node_modules/world-calendars/dist/calendars/islamic.js"(){var e=_w(),t=mW();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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īs","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,e.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return t=i.year(),r=i.month(),(n=i.day())+Math.ceil(29.5*(r-1))+((t=t<=0?t+1:t)-1)*354+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor((30*((e=Math.floor(e)+.5)-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}}),e.calendars.islamic=r}}),_L=d({"node_modules/world-calendars/dist/calendars/julian.js"(){var e=_w(),t=mW();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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 r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=0>r.year()?r.year()+1:r.year();return t%4==0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return t=i.year(),r=i.month(),n=i.day(),t<0&&t++,r<=2&&(t--,r+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(r+1))+n-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),n=Math.floor(365.25*r),i=Math.floor((t-n)/30.6001),a=i-Math.floor(i<14?1:13),o=r-Math.floor(a>2?4716:4715),s=t-n-Math.floor(30.6001*i);return o<=0&&o--,this.newDate(o,a,s)}}),e.calendars.julian=r}}),_I=d({"node_modules/world-calendars/dist/calendars/mayan.js"(){var e=_w(),t=mW();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.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,e.local.invalidYear),!1},formatYear:function(t){var r=Math.floor((t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())/400);return t%=400,r+"."+Math.floor((t+=400*(t<0))/20)+"."+t%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=20*t+n}return t},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(t,r){return this._validate(t,r,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate).day()},weekDay:function(t,r,n){return this._validate(t,r,n,e.local.invalidDate),!0},extraInfo:function(t,r,n){var i=this._validate(t,r,n,e.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(e){var t=n((e-=this.jdEpoch)+8+340,365);return[Math.floor(t/20)+1,n(t,20)]},_toTzolkin:function(e){return[n((e-=this.jdEpoch)+20-1,20)+1,n(e+4-1,13)+1]},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);return i.day()+20*i.month()+360*i.year()+this.jdEpoch},fromJD:function(e){var t=Math.floor((e=Math.floor(e)+.5-this.jdEpoch)/360);e%=360;var r=Math.floor((e+=360*(e<0))/20),n=e%20;return this.newDate(t,r,n)}}),e.calendars.mayan=r}}),_P=d({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var e=_w(),t=mW();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar;var n=e.instance("gregorian");t(r.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 r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear);return n.leapYear(r.year()+ +(1>r.year())+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidMonth),t=a.year();t<0&&t++;for(var o=a.day(),s=1;s=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}}),e.calendars.nanakshahi=r}}),_z=d({"node_modules/world-calendars/dist/calendars/nepali.js"(){var e=_w(),t=mW();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,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,e.local.invalidYear).year(),typeof this.NEPALI_CALENDAR_DATA[t]>"u")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[t][n];return r},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[t]>"u"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[t][r]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var i=this._validate(t,r,n,e.local.invalidDate);t=i.year(),r=i.month(),n=i.day();var a=e.instance(),o=0,s=r,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&n>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==r&&(o=n,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===r?(o+=n-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 r=e.instance().fromJD(t),n=r.year(),i=r.dayOfYear(),a=n+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(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r"u"&&(this.NEPALI_CALENDAR_DATA[r]=t)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),e.calendars.nepali=r}}),_O=d({"node_modules/world-calendars/dist/calendars/persian.js"(){var e=_w(),t=mW();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function n(e){var t=e-475;e<0&&t++;var r=.242197*t,n=.242197*(t+1);return r-Math.floor(r)>n-Math.floor(n)}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return n(this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(12===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidDate);t=a.year(),r=a.month(),i=a.day();var o=0;if(t>0)for(var s=1;s0?t-1:t)*365+o+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(475+((e=Math.floor(e)+.5)-this.toJD(475,1,1))/365.242197);t<=0&&t--,e>this.toJD(t,12,n(t)?30:29)&&0==++t&&t++;var r=e-this.toJD(t,1,1)+1,i=r<=186?Math.ceil(r/31):Math.ceil((r-6)/30),a=e-this.toJD(t,i,1)+1;return this.newDate(t,i,a)}}),e.calendars.persian=r,e.calendars.jalali=r}}),_D=d({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var e=_w(),t=mW(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.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 n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(n.year());return r.leapYear(t)},weekOfYear:function(t,n,i){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(a.year());return r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,n,i){var a=this._validate(t,n,i,e.local.invalidDate),t=this._t2gYear(a.year());return r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+ +(e>=-this.yearsOffset&&e<=-1)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset)}}),e.calendars.taiwan=n}}),_R=d({"node_modules/world-calendars/dist/calendars/thai.js"(){var e=_w(),t=mW(),r=e.instance();function n(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}n.prototype=new e.baseCalendar,t(n.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 n=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(n.year());return r.leapYear(t)},weekOfYear:function(t,n,i){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(a.year());return r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var n=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[n.month()-1]+(2===n.month()&&this.leapYear(n.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,n,i){var a=this._validate(t,n,i,e.local.invalidDate),t=this._t2gYear(a.year());return r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),n=this._g2tYear(t.year());return this.newDate(n,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset)},_g2tYear:function(e){return e+this.yearsOffset+ +(e>=-this.yearsOffset&&e<=-1)}}),e.calendars.thai=n}}),_j=d({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var e=_w(),t=mW();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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āthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","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 r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return 355===this.daysInYear(r.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(t,r){for(var i=this._validate(t,r,this.minDay,e.local.invalidMonth),a=i.toJD()-24e5+.5,o=0,s=0;sa)return n[o]-n[o-1];o++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var a=this._validate(t,r,i,e.local.invalidDate),o=12*(a.year()-1)+a.month()-15292;return a.day()+n[o-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,i=0;it);i++)r++;var a=r+15292,o=Math.floor((a-1)/12),s=t-n[r-1]+1;return this.newDate(o+1,a-12*o,s)},isValid:function(t,r,n){var i=e.baseCalendar.prototype.isValid.apply(this,arguments);return i&&(i=(t=null!=t.year?t.year:t)>=1276&&t<=1500),i},_validate:function(t,r,n,i){var a=e.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw i.replace(/\{0\}/,this.local.name);return a}}),e.calendars.ummalqura=r;var n=[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]}}),_F=d({"src/components/calendars/calendars.js"(e,t){t.exports=_w(),_k(),_T(),_A(),_M(),_S(),_E(),_C(),_L(),_I(),_P(),_z(),_O(),_D(),_R(),_j()}}),_B=d({"src/components/calendars/index.js"(e,t){var r=_F(),n=tY(),i=M(),a=i.EPOCHJD,o=i.ONEDAY,s={valType:"enumerated",values:n.sortObjectKeys(r.calendars),editType:"calc",dflt:"gregorian"},l=function(e,t,r,i){var a={};return a[r]=s,n.coerce(e,t,a,r,i)},c={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:"##",w:"##",c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},u={};function h(e){var t=u[e];return t||(t=u[e]=r.instance(e))}function f(e){return n.extendFlat({},s,{description:e})}function d(e){return"Sets the calendar system to use with `"+e+"` date data."}var p={xcalendar:f(d("x"))},m=n.extendFlat({},p,{ycalendar:f(d("y"))}),g=n.extendFlat({},m,{zcalendar:f(d("z"))}),y=f("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`");t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:m,bar:m,box:m,heatmap:m,contour:m,histogram:m,histogram2d:m,histogram2dcontour:m,scatter3d:g,surface:g,mesh3d:g,scattergl:m,ohlc:p,candlestick:p},layout:{calendar:f("Sets the default calendar system to use for interpreting and displaying dates throughout the plot.")},subplots:{xaxis:{calendar:y},yaxis:{calendar:y},scene:{xaxis:{calendar:y},yaxis:{calendar:y},zaxis:{calendar:y}},polar:{radialaxis:{calendar:y}}}},layoutAttributes:s,handleDefaults:l,handleTraceDefaults:function(e,t,r,n){for(var i=0;i{n.preventDefault(),n.stopPropagation(),n.clipboardData.setData("text",e),t.removeEventListener("copy",r,!0)};t.addEventListener("copy",r,!0),document.execCommand("copy")},(q=Z||(Z={})).boxSizing=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.borderTopWidth)||0,n=parseFloat(t.borderLeftWidth)||0,i=parseFloat(t.borderRightWidth)||0,a=parseFloat(t.borderBottomWidth)||0,o=parseFloat(t.paddingTop)||0,s=parseFloat(t.paddingLeft)||0,l=parseFloat(t.paddingRight)||0,c=parseFloat(t.paddingBottom)||0;return{borderTop:r,borderLeft:n,borderRight:i,borderBottom:a,paddingTop:o,paddingLeft:s,paddingRight:l,paddingBottom:c,horizontalSum:n+s+l+i,verticalSum:r+o+c+a}},q.sizeLimits=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.minWidth)||0,n=parseFloat(t.minHeight)||0,i=parseFloat(t.maxWidth)||1/0,a=parseFloat(t.maxHeight)||1/0;return i=Math.max(r,i),a=Math.max(n,a),{minWidth:r,minHeight:n,maxWidth:i,maxHeight:a}},q.hitTest=function(e,t,r){let n=e.getBoundingClientRect();return t>=n.left&&t=n.top&&r=r.bottom)){if(n.topr.bottom&&n.height>=r.height){e.scrollTop-=r.top-n.top;return}if(n.topr.height||n.bottom>r.bottom&&n.height0;){if(f(i)){t++;continue}if(f(a)||f(o)){r++;continue}if(f(l)){n++;continue}if(f(c)){r++;continue}if(f(s)){n++;continue}if(!f(u))return 0}return(t=Math.min(t,255))<<16|(r=Math.min(r,255))<<8|(n=Math.min(n,255))},i=/^#[^\s\+>~#\.\[:]+/,a=/^\.[^\s\+>~#\.\[:]+/,o=/^\[[^\]]+\]/,s=/^[^\s\+>~#\.\[:]+/,l=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,c=/^:[^\s\+>~#\.\[:]+/,u=/^[\s\+>~\*]+/,h=/:not\(([^\)]+)\)/g;var U=D(R()),V=class{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return 0===this._size}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let e=this._first;for(;e;)yield e.value,e=e.next}*retro(){let e=this._last;for(;e;)yield e.value,e=e.prev}*nodes(){let e=this._first;for(;e;)yield e,e=e.next}*retroNodes(){let e=this._last;for(;e;)yield e,e=e.prev}assign(e){for(let t of(this.clear(),e))this.addLast(t)}push(e){this.addLast(e)}pop(){return this.removeLast()}shift(e){this.addFirst(e)}unshift(){return this.removeFirst()}addFirst(e){let t=new Q.LinkedListNode(this,e);return this._first?(t.next=this._first,this._first.prev=t,this._first=t):(this._first=t,this._last=t),this._size++,t}addLast(e){let t=new Q.LinkedListNode(this,e);return this._last?(t.prev=this._last,this._last.next=t):this._first=t,this._last=t,this._size++,t}insertBefore(e,t){if(!t||t===this._first)return this.addFirst(e);if(!(t instanceof Q.LinkedListNode)||t.list!==this)throw Error("Reference node is not owned by the list.");let r=new Q.LinkedListNode(this,e),n=t.prev;return r.next=t,r.prev=n,t.prev=r,n.next=r,this._size++,r}insertAfter(e,t){if(!t||t===this._last)return this.addLast(e);if(!(t instanceof Q.LinkedListNode)||t.list!==this)throw Error("Reference node is not owned by the list.");let r=new Q.LinkedListNode(this,e),n=t.next;return r.next=n,r.prev=t,t.next=r,n.prev=r,this._size++,r}removeFirst(){let e=this._first;if(e)return e===this._last?(this._first=null,this._last=null):(this._first=e.next,this._first.prev=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeLast(){let e=this._last;if(e)return e===this._first?(this._first=null,this._last=null):(this._last=e.prev,this._last.next=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeNode(e){if(!(e instanceof Q.LinkedListNode)||e.list!==this)throw Error("Node is not owned by the list.");e===this._first&&e===this._last?(this._first=null,this._last=null):e===this._first?(this._first=e.next,this._first.prev=null):e===this._last?(this._last=e.prev,this._last.next=null):(e.next.prev=e.prev,e.prev.next=e.next),e.list=null,e.next=null,e.prev=null,this._size--}clear(){let e=this._first;for(;e;){let t=e.next;e.list=null,e.prev=null,e.next=null,e=t}this._first=null,this._last=null,this._size=0}};(Y=V||(V={})).from=function(e){let t=new Y;return t.assign(e),t},(Q||(Q={})).LinkedListNode=class{constructor(e,t){this.list=null,this.next=null,this.prev=null,this.list=e,this.value=t}};var q,H,G,W,Y,X,Z,$,K,J,Q,ee,et=class{constructor(e){this.type=e}get isConflatable(){return!1}conflate(e){return!1}},er=class extends et{get isConflatable(){return!0}conflate(e){return!0}};!function(e){let t,r=null,n=(t=Promise.resolve(),e=>{let r=!1;return t.then(()=>!r&&e()),()=>{r=!0}});function i(e,t){let r=o.get(e);r&&0!==r.length?(0,U.every)((0,U.retro)(r),r=>!r||function(e,t,r){let n=!0;try{n="function"==typeof e?e(t,r):e.messageHook(t,r)}catch(e){l(e)}return n}(r,e,t))&&u(e,t):u(e,t)}e.sendMessage=i,e.postMessage=function(e,t){t.isConflatable&&(0,U.some)(a,r=>r.handler===e&&!!r.msg&&r.msg.type===t.type&&!!r.msg.isConflatable&&r.msg.conflate(t))||h(e,t)},e.installMessageHook=function(e,t){let r=o.get(e);r&&-1!==r.indexOf(t)||(r?r.push(t):o.set(e,[t]))},e.removeMessageHook=function(e,t){let r=o.get(e);if(!r)return;let n=r.indexOf(t);-1!==n&&(r[n]=null,d(r))},e.clearData=function(e){let t=o.get(e);for(let r of(t&&t.length>0&&(U.ArrayExt.fill(t,null),d(t)),a))r.handler===e&&(r.handler=null,r.msg=null)},e.flush=function(){c||null===r||(r(),r=null,c=!0,f(),c=!1)},e.getExceptionHandler=function(){return l},e.setExceptionHandler=function(e){let t=l;return l=e,t};let a=new V,o=new WeakMap,s=new Set,l=e=>{console.error(e)},c=!1;function u(e,t){try{e.processMessage(t)}catch(e){l(e)}}function h(e,t){a.addLast({handler:e,msg:t}),null===r&&(r=n(f))}function f(){if(r=null,a.isEmpty)return;let e={handler:null,msg:null};for(a.addLast(e);;){let t=a.removeFirst();if(t===e)return;t.handler&&t.msg&&i(t.handler,t.msg)}}function d(e){0===s.size&&n(p),s.add(e)}function p(){s.forEach(m),s.clear()}function m(e){U.ArrayExt.removeAllWhere(e,g)}function g(e){return null===e}}(ee||(ee={}));var en=class{constructor(e){this._pid=e_.nextPID(),this.name=e.name,this._create=e.create,this._coerce=e.coerce||null,this._compare=e.compare||null,this._changed=e.changed||null}get(e){let t=e_.ensureMap(e);return this._pid in t?t[this._pid]:t[this._pid]=this._createValue(e)}set(e,t){let r,n=e_.ensureMap(e);r=this._pid in n?n[this._pid]:n[this._pid]=this._createValue(e);let i=this._coerceValue(e,t);this._maybeNotify(e,r,n[this._pid]=i)}coerce(e){let t,r=e_.ensureMap(e);t=this._pid in r?r[this._pid]:r[this._pid]=this._createValue(e);let n=this._coerceValue(e,t);this._maybeNotify(e,t,r[this._pid]=n)}_createValue(e){return(0,this._create)(e)}_coerceValue(e,t){let r=this._coerce;return r?r(e,t):t}_compareValue(e,t){let r=this._compare;return r?r(e,t):e===t}_maybeNotify(e,t,r){let n=this._changed;n&&!this._compareValue(t,r)&&n(e,t,r)}};(en||(en={})).clearData=function(e){e_.ownerData.delete(e)},(eg=e_||(e_={})).ownerData=new WeakMap,f=0,eg.nextPID=()=>`pid-${`${Math.random()}`.slice(2)}-${f++}`,eg.ensureMap=function(e){let t=eg.ownerData.get(e);return t||(t=Object.create(null),eg.ownerData.set(e,t),t)};var ei=D(R()),ea=(D(j()),class{constructor(e){this.sender=e}connect(e,t){return ew.connect(this,e,t)}disconnect(e,t){return ew.disconnect(this,e,t)}emit(e){ew.emit(this,e)}});(ey=ea||(ea={})).disconnectBetween=function(e,t){ew.disconnectBetween(e,t)},ey.disconnectSender=function(e){ew.disconnectSender(e)},ey.disconnectReceiver=function(e){ew.disconnectReceiver(e)},ey.disconnectAll=function(e){ew.disconnectAll(e)},ey.clearData=function(e){ew.disconnectAll(e)},ey.getExceptionHandler=function(){return ew.exceptionHandler},ey.setExceptionHandler=function(e){let t=ew.exceptionHandler;return ew.exceptionHandler=e,t},function(e){function t(e){let t=n.get(e);if(!(!t||0===t.length)){for(let e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,l(i.get(t))}l(t)}}function r(e){let t=i.get(e);if(!(!t||0===t.length)){for(let e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,l(n.get(t))}l(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,r){r=r||void 0;let a=n.get(e.sender);if(a||(a=[],n.set(e.sender,a)),s(a,e,t,r))return!1;let o=r||t,l=i.get(o);l||(l=[],i.set(o,l));let c={signal:e,slot:t,thisArg:r};return a.push(c),l.push(c),!0},e.disconnect=function(e,t,r){r=r||void 0;let a=n.get(e.sender);if(!a||0===a.length)return!1;let o=s(a,e,t,r);if(!o)return!1;let c=r||t,u=i.get(c);return o.signal=null,l(a),l(u),!0},e.disconnectBetween=function(e,t){let r=n.get(e);if(!r||0===r.length)return;let a=i.get(t);if(!(!a||0===a.length)){for(let t of a)t.signal&&t.signal.sender===e&&(t.signal=null);l(r),l(a)}},e.disconnectSender=t,e.disconnectReceiver=r,e.disconnectAll=function(e){t(e),r(e)},e.emit=function(t,r){let i=n.get(t.sender);if(!(!i||0===i.length))for(let n=0,a=i.length;ne.signal===t&&e.slot===r&&e.thisArg===n)}function l(e){0===a.size&&o(c),a.add(e)}function c(){a.forEach(u),a.clear()}function u(e){ei.ArrayExt.removeAllWhere(e,h)}function h(e){return null===e.signal}}(ew||(ew={}));var eo=class{constructor(e){this._fn=e}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let e=this._fn;this._fn=null,e()}},es=class{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(e=>{e.dispose()}),this._items.clear())}contains(e){return this._items.has(e)}add(e){this._items.add(e)}remove(e){this._items.delete(e)}clear(){this._items.clear()}};(ev=es||(es={})).from=function(e){let t=new ev;for(let r of e)t.add(r);return t};var el=class extends es{constructor(){super(...arguments),this._disposed=new ea(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),ea.clearData(this))}};(ex=el||(el={})).from=function(e){let t=new ex;for(let r of e)t.add(r);return t};var ec=class e{constructor(e){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:e,edge:t,distance:r}=this._scrollTarget,n=Math.max(1,Math.round(Math.pow((ek.SCROLL_EDGE_SIZE-r)/ek.SCROLL_EDGE_SIZE,2)*ek.SCROLL_EDGE_SIZE));switch(t){case"top":e.scrollTop-=n;break;case"left":e.scrollLeft-=n;break;case"right":e.scrollLeft+=n;break;case"bottom":e.scrollTop+=n}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=e.document||document,this.mimeData=e.mimeData,this.dragImage=e.dragImage||null,this.proposedAction=e.proposedAction||"copy",this.supportedActions=e.supportedActions||"all",this.source=e.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let e=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});ek.dispatchDragLeave(this,this._currentTarget,null,e)}this._finalize("none")}}get isDisposed(){return this._disposed}start(e,t){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(e,t),this._promise=new Promise(e=>{this._resolve=e});let r=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:e,clientY:t});return document.dispatchEvent(r),this._promise}handleEvent(e){switch(e.type){case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;default:e.preventDefault(),e.stopPropagation()}}moveDragImage(e,t){this.dragImage&&(this.dragImage.style.transform=`translate(${e}px, ${t}px)`)}_evtPointerMove(e){e.preventDefault(),e.stopPropagation(),this._updateCurrentTarget(e),this._updateDragScroll(e),this.moveDragImage(e.clientX,e.clientY)}_evtPointerUp(e){if(e.preventDefault(),e.stopPropagation(),0!==e.button)return;if(this._updateCurrentTarget(e),!this._currentTarget)return void this._finalize("none");if("none"===this._dropAction){ek.dispatchDragLeave(this,this._currentTarget,null,e),this._finalize("none");return}let t=ek.dispatchDrop(this,this._currentTarget,e);this._finalize(t)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(e){let t=ek.findScrollTarget(e);(this._scrollTarget||t)&&(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=t)}_updateCurrentTarget(e){let t=this._currentTarget,r=this._currentTarget,n=this._currentElement,i=ek.findElementBehindBackdrop(e,this.document);this._currentElement=i,i!==n&&i!==r&&ek.dispatchDragExit(this,r,i,e),i!==n&&i!==r&&(r=ek.dispatchDragEnter(this,i,r,e)),r!==t&&(this._currentTarget=r,ek.dispatchDragLeave(this,t,r,e));let a=ek.dispatchDragOver(this,r,e);this._setDropAction(a)}_attachDragImage(e,t){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let r=this.dragImage.style;r.pointerEvents="none",r.position="fixed",r.transform=`translate(${e}px, ${t}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let e=this.dragImage.parentNode;e&&e.removeChild(this.dragImage)}_setDropAction(t){if(t=ek.validateAction(t,this.supportedActions),!(this._override&&this._dropAction===t))switch(t){case"none":this._dropAction=t,this._override=e.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=t,this._override=e.overrideCursor("copy",this.document);break;case"link":this._dropAction=t,this._override=e.overrideCursor("alias",this.document);break;case"move":this._dropAction=t,this._override=e.overrideCursor("move",this.document)}}_finalize(e){let t=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,t&&t(e)}},eu=ec||(ec={});class eh extends DragEvent{constructor(e,t){super(t.type,{bubbles:!0,cancelable:!0,altKey:e.altKey,button:e.button,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,detail:0,metaKey:e.metaKey,relatedTarget:t.related,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,view:window});let{drag:r}=t;this.dropAction="none",this.mimeData=r.mimeData,this.proposedAction=r.proposedAction,this.supportedActions=r.supportedActions,this.source=r.source}}eu.Event=eh,eu.overrideCursor=function(e,t=document){return ek.overrideCursor(e,t)},function(e){let t;function r(t,a=document){if(t){if(n&&t==n.event)return n.element;e.cursorBackdrop.style.zIndex="-1000";let r=a.elementFromPoint(t.clientX,t.clientY);return e.cursorBackdrop.style.zIndex="",n={event:t,element:r},r}{let t=e.cursorBackdrop.style.transform;if(i&&t===i.transform)return i.element;let r=e.cursorBackdrop.getBoundingClientRect();e.cursorBackdrop.style.zIndex="-1000";let n=a.elementFromPoint(r.left+r.width/2,r.top+r.height/2);return e.cursorBackdrop.style.zIndex="",i={transform:t,element:n},n}}e.SCROLL_EDGE_SIZE=20,e.validateAction=function(e,t){return a[e]&o[t]?e:"none"},e.findElementBehindBackdrop=r;let n=null,i=null;e.findScrollTarget=function(t){let n=t.clientX,i=t.clientY,a=r(t);for(;a;a=a.parentElement){let t;if(!a.hasAttribute("data-lm-dragscroll"))continue;let r=0,o=0;a===document.body&&(r=window.pageXOffset,o=window.pageYOffset);let s=a.getBoundingClientRect(),l=s.top+o,c=s.left+r,u=c+s.width,h=l+s.height;if(n=u||i=h)continue;let f=n-c+1,d=i-l+1,p=u-n,m=h-i,g=Math.min(f,d,p,m);if(g>e.SCROLL_EDGE_SIZE)continue;switch(g){case m:t="bottom";break;case d:t="top";break;case p:t="right";break;case f:t="left";break;default:throw"unreachable"}let y=a.scrollWidth-a.clientWidth,v=a.scrollHeight-a.clientHeight,x;switch(t){case"top":x=v>0&&a.scrollTop>0;break;case"left":x=y>0&&a.scrollLeft>0;break;case"right":x=y>0&&a.scrollLeft0&&a.scrollTop{n===h&&e.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",s,!0),e.cursorBackdrop.removeEventListener("scroll",l,!0),i.removeChild(e.cursorBackdrop))})};let u=500,h=0;(t=document.createElement("div")).classList.add("lm-cursor-backdrop"),e.cursorBackdrop=t}(ek||(ek={}));var ef=D(R()),ed=D(j());function ep(){return eT.keyboardLayout}var em=class e{constructor(t,r,n=[]){this.name=t,this._codes=r,this._keys=e.extractKeys(r),this._modifierKeys=e.convertToKeySet(n)}keys(){return Object.keys(this._keys)}isValidKey(e){return e in this._keys}isModifierKey(e){return e in this._modifierKeys}keyForKeydownEvent(e){return this._codes[e.keyCode]||""}};(eb=em||(em={})).extractKeys=function(e){let t=Object.create(null);for(let r in e)t[e[r]]=!0;return t},eb.convertToKeySet=function(e){let t=Object(null);for(let r=0,n=e.length;r{this._commands.delete(e),this._commandChanged.emit({id:e,type:"removed"})})}notifyCommandChanged(e){if(void 0!==e&&!this._commands.has(e))throw Error(`Command '${e}' is not registered.`);this._commandChanged.emit({id:e,type:e?"changed":"many-changed"})}describedBy(e,t=ed.JSONExt.emptyObject){var r;let n=this._commands.get(e);return Promise.resolve(null!=(r=n?.describedBy.call(void 0,t))?r:{args:null})}label(e,t=ed.JSONExt.emptyObject){var r;let n=this._commands.get(e);return null!=(r=n?.label.call(void 0,t))?r:""}mnemonic(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.mnemonic.call(void 0,t):-1}icon(e,t=ed.JSONExt.emptyObject){var r;return null==(r=this._commands.get(e))?void 0:r.icon.call(void 0,t)}iconClass(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconClass.call(void 0,t):""}iconLabel(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconLabel.call(void 0,t):""}caption(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.caption.call(void 0,t):""}usage(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.usage.call(void 0,t):""}className(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.className.call(void 0,t):""}dataset(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.dataset.call(void 0,t):{}}isEnabled(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isEnabled.call(void 0,t)}isToggled(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggled.call(void 0,t)}isToggleable(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggleable}isVisible(e,t=ed.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isVisible.call(void 0,t)}execute(e,t=ed.JSONExt.emptyObject){let r,n=this._commands.get(e);if(!n)return Promise.reject(Error(`Command '${e}' not registered.`));try{r=n.execute.call(void 0,t)}catch(e){r=Promise.reject(e)}let i=Promise.resolve(r);return this._commandExecuted.emit({id:e,args:t,result:i}),i}addKeyBinding(e){let t=eB.createKeyBinding(e);return this._keyBindings.push(t),this._keyBindingChanged.emit({binding:t,type:"added"}),new eo(()=>{ef.ArrayExt.removeFirstOf(this._keyBindings,t),this._keyBindingChanged.emit({binding:t,type:"removed"})})}processKeydownEvent(t){if(t.defaultPrevented||this._replaying)return;let r=e.keystrokeForKeydownEvent(t);if(!r){this._replayKeydownEvents(),this._clearPendingState();return}if(e.isModifierKeyPressed(t)){let{exact:e}=eB.matchKeyBinding(this._keyBindings,[r],t);e?(t.preventDefault(),t.stopPropagation(),this._startModifierTimer(e)):this._clearModifierTimer();return}this._keystrokes.push(r);let{exact:n,partial:i}=eB.matchKeyBinding(this._keyBindings,this._keystrokes,t),a=0!==i.length;if(!n&&!a){this._replayKeydownEvents(),this._clearPendingState();return}if((n?.preventDefault||i.some(e=>e.preventDefault))&&(t.preventDefault(),t.stopPropagation()),this._keydownEvents.push(t),n&&!a){this._executeKeyBinding(n),this._clearPendingState();return}n&&(this._exactKeyMatch=n),this._startTimer()}holdKeyBindingExecution(e,t){this._holdKeyBindingPromises.set(e,t)}processKeyupEvent(e){this._clearModifierTimer()}_startModifierTimer(e){this._clearModifierTimer(),this._timerModifierID=window.setTimeout(()=>{this._executeKeyBinding(e)},eB.modifierkeyTimeOut)}_clearModifierTimer(){0!==this._timerModifierID&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout(()=>{this._onPendingTimeout()},eB.CHORD_TIMEOUT)}_clearTimer(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(eB.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(e){if(0!==this._holdKeyBindingPromises.size){let e=[...this._keydownEvents],t=(await Promise.race([Promise.all(e.map(async e=>{var t;return null!=(t=this._holdKeyBindingPromises.get(e))?t:Promise.resolve(!0)})),new Promise(e=>{setTimeout(()=>e([!1]),eB.KEYBINDING_HOLD_TIMEOUT)})])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!t)return}let{command:t,args:r}=e,n={_luminoEvent:{type:"keybinding",keys:e.keys},...r};if(!this.hasCommand(t)||!this.isEnabled(t,n)){let r=this.hasCommand(t)?"enabled":"registered",n=`Cannot execute key binding '${e.keys.join(", ")}':`,i=`command '${t}' is not ${r}.`;console.warn(`${n} ${i}`);return}await this.execute(t,n)}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}},eS=eM||(eM={});function eE(e){let t="",r=!1,n=!1,i=!1,a=!1;for(let o of e.split(/\s+/))"Accel"===o?$.IS_MAC?n=!0:i=!0:"Alt"===o?r=!0:"Cmd"===o?n=!0:"Ctrl"===o?i=!0:"Shift"===o?a=!0:o.length>0&&(t=o);return{cmd:n,ctrl:i,alt:r,shift:a,key:t}}function eC(e){let t="",r=eE(e);return r.ctrl&&(t+="Ctrl "),r.alt&&(t+="Alt "),r.shift&&(t+="Shift "),r.cmd&&$.IS_MAC&&(t+="Cmd "),r.key?t+r.key:t.trim()}eS.parseKeystroke=eE,eS.normalizeKeystroke=eC,eS.normalizeKeys=function(e){return($.IS_WIN?e.winKeys||e.keys:$.IS_MAC?e.macKeys||e.keys:e.linuxKeys||e.keys).map(eC)},eS.formatKeystroke=function(e){return"string"==typeof e?t(e):e.map(t).join(", ");function t(e){let t=[],r=$.IS_MAC?" ":"+",n=eE(e);return n.ctrl&&t.push("Ctrl"),n.alt&&t.push("Alt"),n.shift&&t.push("Shift"),$.IS_MAC&&n.cmd&&t.push("Cmd"),t.push(n.key),t.map(eB.formatKey).join(r)}},eS.isModifierKeyPressed=function(e){let t=ep(),r=t.keyForKeydownEvent(e);return t.isModifierKey(r)},eS.keystrokeForKeydownEvent=function(e){let t=ep(),r=t.keyForKeydownEvent(e),n=[];return e.ctrlKey&&n.push("Ctrl"),e.altKey&&n.push("Alt"),e.shiftKey&&n.push("Shift"),e.metaKey&&$.IS_MAC&&n.push("Cmd"),t.isModifierKey(r)||n.push(r),n.join(" ")},function(e){e.CHORD_TIMEOUT=1e3,e.KEYBINDING_HOLD_TIMEOUT=1e3,e.modifierkeyTimeOut=500,e.createCommand=function(e){return{execute:e.execute,describedBy:c("function"==typeof e.describedBy?e.describedBy:{args:null,...e.describedBy},()=>({args:null})),label:c(e.label,n),mnemonic:c(e.mnemonic,i),icon:c(e.icon,l),iconClass:c(e.iconClass,n),iconLabel:c(e.iconLabel,n),caption:c(e.caption,n),usage:c(e.usage,n),className:c(e.className,n),dataset:c(e.dataset,s),isEnabled:e.isEnabled||a,isToggled:e.isToggled||o,isToggleable:e.isToggleable||!!e.isToggled,isVisible:e.isVisible||a}},e.createKeyBinding=function(e){var t;return{keys:eM.normalizeKeys(e),selector:function(e){if(-1!==e.selector.indexOf(","))throw Error(`Selector cannot contain commas: ${e.selector}`);if(!K.isValid(e.selector))throw Error(`Invalid selector: ${e.selector}`);return e.selector}(e),command:e.command,args:e.args||ed.JSONExt.emptyObject,preventDefault:null==(t=e.preventDefault)||t}},e.matchKeyBinding=function(e,t,r){let n=null,i=[],a=1/0,o=0;for(let s=0,l=e.length;st.length?2:1}(l.keys,t);if(0===c)continue;if(2===c){-1!==u(l.selector,r)&&i.push(l);continue}let h=u(l.selector,r);if(-1===h||h>a)continue;let f=K.calculateSpecificity(l.selector);(!n||h=o)&&(n=l,a=h,o=f)}return{exact:n,partial:i}},e.replayKeyEvent=function(e){var t;let r,n,i;e.target.dispatchEvent((t=e,r=document.createEvent("Event"),n=t.bubbles||!0,i=t.cancelable||!0,r.initEvent(t.type||"keydown",n,i),r.key=t.key||"",r.keyCode=t.keyCode||0,r.which=t.keyCode||0,r.ctrlKey=t.ctrlKey||!1,r.altKey=t.altKey||!1,r.shiftKey=t.shiftKey||!1,r.metaKey=t.metaKey||!1,r.view=t.view||window,r))},e.formatKey=function(e){return $.IS_MAC?t.hasOwnProperty(e)?t[e]:e:r.hasOwnProperty(e)?r[e]:e};let t={Backspace:"⌫",Tab:"⇥",Enter:"⏎",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},r={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},n=()=>"",i=()=>-1,a=()=>!0,o=()=>!1,s=()=>({}),l=()=>{};function c(e,t){return void 0===e?t:"function"==typeof e?e:()=>e}function u(e,t){let r=t.target,n=t.currentTarget;for(let t=0;null!==r&&!r.hasAttribute("data-lm-suppress-shortcuts");r=r.parentElement,++t){if(K.matches(r,e))return t;if(r===n)break}return -1}}(eB||(eB={}));var eL=D(R()),eI=class{constructor(e){this.type="text",this.content=e}},eP=class{constructor(e,t,r,n){this.type="element",this.tag=e,this.attrs=t,this.children=r,this.renderer=n}};function ez(e){let t={},r,n=[];for(let e=1,i=arguments.length;e=a.length){eD(n[r],t);continue}let s=a[r],l=n[r];if(s===l){o=o.nextSibling;continue}if("text"===s.type&&"text"===l.type){o.textContent!==l.content&&(o.textContent=l.content),o=o.nextSibling;continue}if("text"===s.type||"text"===l.type||!s.renderer!=!l.renderer){eL.ArrayExt.insert(a,r,l),eD(l,t,o);continue}let c=l.attrs.key;if(c&&c in i){let e=i[c];e.vNode!==s&&(eL.ArrayExt.move(a,a.indexOf(e.vNode,r+1),r),t.insertBefore(e.element,o),s=e.vNode,o=e.element)}if(s===l){o=o.nextSibling;continue}let u=s.attrs.key;if(u&&u!==c||s.tag!==l.tag){eL.ArrayExt.insert(a,r,l),eD(l,t,o);continue}(function(e,t,r){let n;if(t!==r){for(n in t)n in eR||n in r||("on"===n.substr(0,2)?e[n]=null:e.removeAttribute(n));for(n in r)n in eR||t[n]===r[n]||("on"===n.substr(0,2)?e[n]=r[n]:e.setAttribute(n,r[n]));t.className!==r.className&&(void 0!==r.className?e.setAttribute("class",r.className):e.removeAttribute("class")),t.htmlFor!==r.htmlFor&&(void 0!==r.htmlFor?e.setAttribute("for",r.htmlFor):e.removeAttribute("for")),t.dataset!==r.dataset&&function(e,t,r){for(let n in t)n in r||e.removeAttribute(`data-${n}`);for(let n in r)t[n]!==r[n]&&e.setAttribute(`data-${n}`,r[n])}(e,t.dataset||{},r.dataset||{}),t.style!==r.style&&function(e,t,r){let n=e.style,i;for(i in t)i in r||(n[i]="");for(i in r)t[i]!==r[i]&&(n[i]=r[i])}(e,t.style||{},r.style||{})}})(o,s.attrs,l.attrs),l.renderer?l.renderer.render(o,{attrs:l.attrs,children:l.children}):e(o,s.children,l.children),o=o.nextSibling}!function e(t,r,n,i){for(let a=r.length-1;a>=n;--a){let n=r[a],o=i?t.lastChild:t.childNodes[a];"text"===n.type||(n.renderer&&n.renderer.unrender?n.renderer.unrender(o,{attrs:n.attrs,children:n.children}):e(o,n.children,0,!1)),i&&t.removeChild(o)}}(t,a,s,!0)};let eR={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};var ej,eF,eB,eN,eU,eV,eq=class{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}};(eY=eV||(eV={})).calc=function(e,t){let r=e.length;if(0===r)return t;let n=0,i=0,a=0,o=0,s=0;for(let t=0;t0&&(o+=r.stretch,s++)}if(t===a)return 0;if(t<=n){for(let t=0;t=i){for(let t=0;t0&&n>.01;){let t=n,i=o;for(let a=0;a0&&n>.01;){let t=n/l;for(let i=0;i0&&n>.01;){let t=n,i=o;for(let a=0;a=r.maxSize?(n-=r.maxSize-r.size,o-=r.stretch,r.size=r.maxSize,r.done=!0,l--,s--):(n-=c,r.size+=c)}}for(;l>0&&n>.01;){let t=n/l;for(let i=0;i=r.maxSize?(n-=r.maxSize-r.size,r.size=r.maxSize,r.done=!0,l--):(n-=t,r.size+=t))}}}return 0},eY.adjust=function(e,t,r){0===e.length||0===r||(r>0?function(e,t,r){let n=0;for(let r=0;r<=t;++r){let t=e[r];n+=t.maxSize-t.size}let i=0;for(let r=t+1,n=e.length;r=0&&a>0;--r){let t=e[r],n=t.maxSize-t.size;n>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+n,a-=n)}let o=r;for(let r=t+1,n=e.length;r0;++r){let t=e[r],n=t.size-t.minSize;n>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-n,o-=n)}}(e,t,r):function(e,t,r){let n=0;for(let r=t+1,i=e.length;r0;++r){let t=e[r],n=t.maxSize-t.size;n>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+n,a-=n)}let o=r;for(let r=t;r>=0&&o>0;--r){let t=e[r],n=t.size-t.minSize;n>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-n,o-=n)}}(e,t,-r))};var eH=class{constructor(e){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new ea(this),this._isDisposed=!1,this.owner=e.owner,void 0!==e.label&&(this._label=e.label),void 0!==e.mnemonic&&(this._mnemonic=e.mnemonic),void 0!==e.icon&&(this._icon=e.icon),void 0!==e.iconClass&&(this._iconClass=e.iconClass),void 0!==e.iconLabel&&(this._iconLabel=e.iconLabel),void 0!==e.caption&&(this._caption=e.caption),void 0!==e.className&&(this._className=e.className),void 0!==e.closable&&(this._closable=e.closable),this._dataset=e.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(e){this._mnemonic!==e&&(this._mnemonic=e,this._changed.emit(void 0))}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass!==e&&(this._iconClass=e,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(e){this._iconLabel!==e&&(this._iconLabel=e,this._changed.emit(void 0))}get caption(){return this._caption}set caption(e){this._caption!==e&&(this._caption=e,this._changed.emit(void 0))}get className(){return this._className}set className(e){this._className!==e&&(this._className=e,this._changed.emit(void 0))}get closable(){return this._closable}set closable(e){this._closable!==e&&(this._closable=e,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(e){this._dataset!==e&&(this._dataset=e,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,ea.clearData(this))}},eG=class e{constructor(t={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new ea(this),this._hiddenMode=e.HiddenMode.Display,this.node=e$.createNode(t),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(e.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&e.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),ea.clearData(this),ee.clearData(this),en.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(e.Flag.IsDisposed)}get isAttached(){return this.testFlag(e.Flag.IsAttached)}get isHidden(){return this.testFlag(e.Flag.IsHidden)}get isVisible(){return this.testFlag(e.Flag.IsVisible)}get title(){return e$.titleProperty.get(this)}get id(){return this.node.id}set id(e){this.node.id=e}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(t){this._hiddenMode!==t&&(this.isHidden&&this._toggleHidden(!1),t==e.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=t,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(t){if(this._parent!==t){if(t&&this.contains(t))throw Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-removed",this);ee.sendMessage(this._parent,t)}if(this._parent=t,this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-added",this);ee.sendMessage(this._parent,t)}this.isDisposed||ee.sendMessage(this,e.Msg.ParentChanged)}}get layout(){return this._layout}set layout(t){if(this._layout!==t){if(this.testFlag(e.Flag.DisallowLayout))throw Error("Cannot set widget layout.");if(this._layout)throw Error("Cannot change widget layout.");if(t.parent)throw Error("Cannot change layout parent.");this._layout=t,t.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(e){for(let t=e;t;t=t._parent)if(t===this)return!0;return!1}hasClass(e){return this.node.classList.contains(e)}addClass(e){this.node.classList.add(e)}removeClass(e){this.node.classList.remove(e)}toggleClass(e,t){return!0===t?(this.node.classList.add(e),!0):!1===t?(this.node.classList.remove(e),!1):this.node.classList.toggle(e)}update(){ee.postMessage(this,e.Msg.UpdateRequest)}fit(){ee.postMessage(this,e.Msg.FitRequest)}activate(){ee.postMessage(this,e.Msg.ActivateRequest)}close(){ee.sendMessage(this,e.Msg.CloseRequest)}show(){if(this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.BeforeShow),this.clearFlag(e.Flag.IsHidden),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.AfterShow),this.parent)){let t=new e.ChildMessage("child-shown",this);ee.sendMessage(this.parent,t)}}hide(){if(!this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.BeforeHide),this.setFlag(e.Flag.IsHidden),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.AfterHide),this.parent)){let t=new e.ChildMessage("child-hidden",this);ee.sendMessage(this.parent,t)}}setHidden(e){e?this.hide():this.show()}testFlag(e){return(this._flags&e)!=0}setFlag(e){this._flags|=e}clearFlag(e){this._flags&=~e}processMessage(t){switch(t.type){case"resize":this.notifyLayout(t),this.onResize(t);break;case"update-request":this.notifyLayout(t),this.onUpdateRequest(t);break;case"fit-request":this.notifyLayout(t),this.onFitRequest(t);break;case"before-show":this.notifyLayout(t),this.onBeforeShow(t);break;case"after-show":this.setFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterShow(t);break;case"before-hide":this.notifyLayout(t),this.onBeforeHide(t);break;case"after-hide":this.clearFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterHide(t);break;case"before-attach":this.notifyLayout(t),this.onBeforeAttach(t);break;case"after-attach":this.isHidden||this.parent&&!this.parent.isVisible||this.setFlag(e.Flag.IsVisible),this.setFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterAttach(t);break;case"before-detach":this.notifyLayout(t),this.onBeforeDetach(t);break;case"after-detach":this.clearFlag(e.Flag.IsVisible),this.clearFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterDetach(t);break;case"activate-request":this.notifyLayout(t),this.onActivateRequest(t);break;case"close-request":this.notifyLayout(t),this.onCloseRequest(t);break;case"child-added":this.notifyLayout(t),this.onChildAdded(t);break;case"child-removed":this.notifyLayout(t),this.onChildRemoved(t);break;default:this.notifyLayout(t)}}notifyLayout(e){this._layout&&this._layout.processParentMessage(e)}onCloseRequest(t){this.parent?this.parent=null:this.isAttached&&e.detach(this)}onResize(e){}onUpdateRequest(e){}onFitRequest(e){}onActivateRequest(e){}onBeforeShow(e){}onAfterShow(e){}onBeforeHide(e){}onAfterHide(e){}onBeforeAttach(e){}onAfterAttach(e){}onBeforeDetach(e){}onAfterDetach(e){}onChildAdded(e){}onChildRemoved(e){}_toggleHidden(t){if(t)switch(this._hiddenMode){case e.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case e.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}}};!function(e){var t,r,n,i;(t=e.HiddenMode||(e.HiddenMode={}))[t.Display=0]="Display",t[t.Scale=1]="Scale",t[t.ContentVisibility=2]="ContentVisibility",(r=e.Flag||(e.Flag={}))[r.IsDisposed=1]="IsDisposed",r[r.IsAttached=2]="IsAttached",r[r.IsHidden=4]="IsHidden",r[r.IsVisible=8]="IsVisible",r[r.DisallowLayout=16]="DisallowLayout",(n=e.Msg||(e.Msg={})).BeforeShow=new et("before-show"),n.AfterShow=new et("after-show"),n.BeforeHide=new et("before-hide"),n.AfterHide=new et("after-hide"),n.BeforeAttach=new et("before-attach"),n.AfterAttach=new et("after-attach"),n.BeforeDetach=new et("before-detach"),n.AfterDetach=new et("after-detach"),n.ParentChanged=new et("parent-changed"),n.UpdateRequest=new er("update-request"),n.FitRequest=new er("fit-request"),n.ActivateRequest=new er("activate-request"),n.CloseRequest=new er("close-request"),e.ChildMessage=class extends et{constructor(e,t){super(e),this.child=t}};class a extends et{constructor(e,t){super("resize"),this.width=e,this.height=t}}e.ResizeMessage=a,(i=a=e.ResizeMessage||(e.ResizeMessage={})).UnknownSize=new i(-1,-1),e.attach=function(t,r,n=null){if(t.parent)throw Error("Cannot attach a child widget.");if(t.isAttached||t.node.isConnected)throw Error("Widget is already attached.");if(!r.isConnected)throw Error("Host is not attached.");ee.sendMessage(t,e.Msg.BeforeAttach),r.insertBefore(t.node,n),ee.sendMessage(t,e.Msg.AfterAttach)},e.detach=function(t){if(t.parent)throw Error("Cannot detach a child widget.");if(!t.isAttached||!t.node.isConnected)throw Error("Widget is not attached.");ee.sendMessage(t,e.Msg.BeforeDetach),t.node.parentNode.removeChild(t.node),ee.sendMessage(t,e.Msg.AfterDetach)}}(eG||(eG={})),(eX=e$||(e$={})).titleProperty=new en({name:"title",create:e=>new eH({owner:e})}),eX.createNode=function(e){return e.node||document.createElement(e.tag||"div")};var eW=class{constructor(e={}){this._disposed=!1,this._parent=null,this._fitPolicy=e.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,ea.clearData(this),en.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(this._parent)throw Error("Cannot change parent widget.");if(e.layout!==this)throw Error("Invalid parent widget.");this._parent=e,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(e){if(this._fitPolicy!==e&&(this._fitPolicy=e,this._parent)){let e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}}processParentMessage(e){switch(e.type){case"resize":this.onResize(e);break;case"update-request":this.onUpdateRequest(e);break;case"fit-request":this.onFitRequest(e);break;case"before-show":this.onBeforeShow(e);break;case"after-show":this.onAfterShow(e);break;case"before-hide":this.onBeforeHide(e);break;case"after-hide":this.onAfterHide(e);break;case"before-attach":this.onBeforeAttach(e);break;case"after-attach":this.onAfterAttach(e);break;case"before-detach":this.onBeforeDetach(e);break;case"after-detach":this.onAfterDetach(e);break;case"child-removed":this.onChildRemoved(e);break;case"child-shown":this.onChildShown(e);break;case"child-hidden":this.onChildHidden(e)}}init(){for(let e of this)e.parent=this.parent}onResize(e){for(let e of this)ee.sendMessage(e,eG.ResizeMessage.UnknownSize)}onUpdateRequest(e){for(let e of this)ee.sendMessage(e,eG.ResizeMessage.UnknownSize)}onBeforeAttach(e){for(let t of this)ee.sendMessage(t,e)}onAfterAttach(e){for(let t of this)ee.sendMessage(t,e)}onBeforeDetach(e){for(let t of this)ee.sendMessage(t,e)}onAfterDetach(e){for(let t of this)ee.sendMessage(t,e)}onBeforeShow(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onAfterShow(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onBeforeHide(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onAfterHide(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onChildRemoved(e){this.removeWidget(e.child)}onFitRequest(e){}onChildShown(e){}onChildHidden(e){}};(eZ=eW||(eW={})).getHorizontalAlignment=function(e){return eK.horizontalAlignmentProperty.get(e)},eZ.setHorizontalAlignment=function(e,t){eK.horizontalAlignmentProperty.set(e,t)},eZ.getVerticalAlignment=function(e){return eK.verticalAlignmentProperty.get(e)},eZ.setVerticalAlignment=function(e,t){eK.verticalAlignmentProperty.set(e,t)};var eY,eX,eZ,e$,eK,eJ=class{constructor(e){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=e,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let e=this.widget.node.style;e.position="",e.top="",e.left="",e.width="",e.height="",e.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let e=Z.sizeLimits(this.widget.node);this._minWidth=e.minWidth,this._minHeight=e.minHeight,this._maxWidth=e.maxWidth,this._maxHeight=e.maxHeight}update(e,t,r,n){let i=Math.max(this._minWidth,Math.min(r,this._maxWidth)),a=Math.max(this._minHeight,Math.min(n,this._maxHeight));if(i"center",changed:e0}),eQ.verticalAlignmentProperty=new en({name:"verticalAlignment",create:()=>"top",changed:e0});var e1,e2=class extends eW{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(e){this.insertWidget(this._widgets.length,e)}insertWidget(e,t){t.parent=this.parent;let r=this._widgets.indexOf(t),n=Math.max(0,Math.min(e,this._widgets.length));if(-1===r){B.ArrayExt.insert(this._widgets,n,t),this.parent&&this.attachWidget(n,t);return}n===this._widgets.length&&n--,r!==n&&(B.ArrayExt.move(this._widgets,r,n),this.parent&&this.moveWidget(r,n,t))}removeWidget(e){this.removeWidgetAt(this._widgets.indexOf(e))}removeWidgetAt(e){let t=B.ArrayExt.removeAt(this._widgets,e);t&&this.parent&&this.detachWidget(e,t)}init(){super.init();let e=0;for(let t of this)this.attachWidget(e++,t)}attachWidget(e,t){let r=this.parent.node.children[e];this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.insertBefore(t.node,r),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach)}moveWidget(e,t,r){this.parent.isAttached&&ee.sendMessage(r,eG.Msg.BeforeDetach),this.parent.node.removeChild(r.node),this.parent.isAttached&&ee.sendMessage(r,eG.Msg.AfterDetach);let n=this.parent.node.children[t];this.parent.isAttached&&ee.sendMessage(r,eG.Msg.BeforeAttach),this.parent.node.insertBefore(r.node,n),this.parent.isAttached&&ee.sendMessage(r,eG.Msg.AfterAttach)}detachWidget(e,t){this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach)}};(e1||(e1={})).clampDimension=function(e){return Math.max(0,Math.floor(e))};var e3=e1,e5=class e extends e2{constructor(e){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=e.renderer,void 0!==e.orientation&&(this._orientation=e.orientation),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=e1.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=e1.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map(e=>e.size)}relativeSizes(){return e8.normalize(this._sizers.map(e=>e.size))}setRelativeSizes(e,t=!0){let r=this._sizers.length,n=e.slice(0,r);for(;n.length0&&(e.sizeHint=e.size);eV.adjust(this._sizers,e,r),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){let r=new eJ(t),n=e8.createHandle(this.renderer),i=e8.averageSize(this._sizers),a=e8.createSizer(i);B.ArrayExt.insert(this._items,e,r),B.ArrayExt.insert(this._sizers,e,a),B.ArrayExt.insert(this._handles,e,n),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.node.appendChild(n),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),B.ArrayExt.move(this._sizers,e,t),B.ArrayExt.move(this._handles,e,t),this.parent.fit()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e),n=B.ArrayExt.removeAt(this._handles,e);B.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.node.removeChild(n),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}updateItemPosition(e,t,r,n,i,a,o){let s=this._items[e];if(s.isHidden)return;let l=this._handles[e].style;t?(r+=this.widgetOffset,s.update(r,n,o,i),r+=o,l.top=`${n}px`,l.left=`${r}px`,l.width=`${this._spacing}px`,l.height=`${i}px`):(n+=this.widgetOffset,s.update(r,n,a,o),n+=o,l.top=`${n}px`,l.left=`${r}px`,l.width=`${a}px`,l.height=`${this._spacing}px`)}_fit(){let t=0,r=-1;for(let e=0,n=this._items.length;e0&&(o.sizeHint=o.size),r.isHidden){o.minSize=0,o.maxSize=0;continue}r.fit(),o.stretch=e.getStretch(r.widget),n?(o.minSize=r.minWidth,o.maxSize=r.maxWidth,i+=r.minWidth,a=Math.max(a,r.minHeight)):(o.minSize=r.minHeight,o.maxSize=r.maxHeight,a+=r.minHeight,i=Math.max(i,r.minWidth))}let o=this._box=Z.boxSizing(this.parent.node);i+=o.horizontalSum,a+=o.verticalSum;let s=this.parent.node.style;s.minWidth=`${i}px`,s.minHeight=`${a}px`,this._dirty=!0,this.parent.parent&&ee.sendMessage(this.parent.parent,eG.Msg.FitRequest),this._dirty&&ee.sendMessage(this.parent,eG.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let r=0;for(let e=0,t=this._items.length;e0){let e;if(e=c?Math.max(0,a-this._fixed):Math.max(0,o-this._fixed),this._hasNormedSizes){for(let t of this._sizers)t.sizeHint*=e;this._hasNormedSizes=!1}let t=eV.calc(this._sizers,e);if(t>0)switch(this._alignment){case"start":break;case"center":s=0,l=t/2;break;case"end":s=0,l=t;break;case"justify":s=t/r,l=0;break;default:throw"unreachable"}}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:function(e){e.parent&&e.parent.layout instanceof e5&&e.parent.fit()}}),e6.createSizer=function(e){let t=new eq;return t.sizeHint=Math.floor(e),t},e6.createHandle=function(e){let t=e.createHandle();return t.style.position="absolute",t.style.contain="style",t},e6.averageSize=function(e){return e.reduce((e,t)=>e+t.size,0)/e.length||0},e6.normalize=function(e){let t=e.length;if(0===t)return[];let r=e.reduce((e,t)=>e+Math.abs(t),0);return 0===r?e.map(e=>1/t):e.map(e=>e/r)};var e4,e6,e8,e9,e7=class extends e5{constructor(e){super({...e,orientation:e.orientation||"vertical"}),this._titles=[],this.titleSpace=e.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(e){e=e3.clampDimension(e),this.widgetOffset!==e&&(this.widgetOffset=e,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(e,t){let r=this._titles[e],n=r.classList.contains("lm-mod-expanded"),i=e9.createTitle(this.renderer,t.title,n);this._titles[e]=i,this.parent.node.replaceChild(i,r)}insertWidget(e,t){t.id||(t.id=`id-${N.UUID.uuid4()}`),super.insertWidget(e,t)}attachWidget(e,t){let r=e9.createTitle(this.renderer,t.title);B.ArrayExt.insert(this._titles,e,r),this.parent.node.appendChild(r),t.node.setAttribute("role","region"),t.node.setAttribute("aria-labelledby",r.id),super.attachWidget(e,t)}moveWidget(e,t,r){B.ArrayExt.move(this._titles,e,t),super.moveWidget(e,t,r)}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._titles,e);this.parent.node.removeChild(r),super.detachWidget(e,t)}updateItemPosition(e,t,r,n,i,a,o){let s=this._titles[e].style;s.top=`${n}px`,s.left=`${r}px`,s.height=`${this.widgetOffset}px`,t?s.width=`${i}px`:s.width=`${a}px`,super.updateItemPosition(e,t,r,n,i,a,o)}};(e9||(e9={})).createTitle=function(e,t,r=!0){let n=e.createSectionTitle(t);return n.style.position="absolute",n.style.contain="strict",n.setAttribute("aria-label",`${t.label} Section`),n.setAttribute("aria-expanded",r?"true":"false"),n.setAttribute("aria-controls",t.owner.id),r&&n.classList.add("lm-mod-expanded"),n};var te,tt=class extends eG{constructor(e={}){super(),this.addClass("lm-Panel"),this.layout=te.createLayout(e)}get widgets(){return this.layout.widgets}addWidget(e){this.layout.addWidget(e)}insertWidget(e,t){this.layout.insertWidget(e,t)}};(te||(te={})).createLayout=function(e){return e.layout||new e2};var tr=class extends tt{constructor(e={}){super({layout:tI.createLayout(e)}),this._handleMoved=new ea(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(e){this.layout.orientation=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(e,t=!0){this.layout.setRelativeSizes(e,t)}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){e.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(e){e.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(e){this._pressData&&(e.preventDefault(),e.stopPropagation()),27===e.keyCode&&this._releaseMouse()}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=B.ArrayExt.findFirstIndex(t.handles,t=>t.contains(e.target));if(-1===r)return;e.preventDefault(),e.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let n,i=t.handles[r],a=i.getBoundingClientRect();n="horizontal"===t.orientation?e.clientX-a.left:e.clientY-a.top;let o=window.getComputedStyle(i),s=ec.overrideCursor(o.cursor);this._pressData={index:r,delta:n,override:s}}_evtPointerMove(e){e.preventDefault(),e.stopPropagation();let t,r=this.layout,n=this.node.getBoundingClientRect();t="horizontal"===r.orientation?e.clientX-n.left-this._pressData.delta:e.clientY-n.top-this._pressData.delta,r.moveHandle(this._pressData.index,t)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}},tn=tr||(tr={});class ti{createHandle(){let e=document.createElement("div");return e.className="lm-SplitPanel-handle",e}}tn.Renderer=ti,tn.defaultRenderer=new ti,tn.getStretch=function(e){return e5.getStretch(e)},tn.setStretch=function(e,t){e5.setStretch(e,t)},(tI||(tI={})).createLayout=function(e){return e.layout||new e5({renderer:e.renderer||tr.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})};var ta=class extends tr{constructor(e={}){super({...e,layout:tP.createLayout(e)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new ea(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(e){this.layout.titleSpace=e}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(e){super.addWidget(e),e.title.changed.connect(this._onTitleChanged,this)}collapse(e){let t=this.layout.widgets[e];t&&!t.isHidden&&this._toggleExpansion(e)}expand(e){let t=this.layout.widgets[e];t&&t.isHidden&&this._toggleExpansion(e)}insertWidget(e,t){super.insertWidget(e,t),t.title.changed.connect(this._onTitleChanged,this)}handleEvent(e){switch(super.handleEvent(e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(e)}onAfterDetach(e){super.onAfterDetach(e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(e){let t=B.ArrayExt.findFirstIndex(this.widgets,t=>t.contains(e.owner));t>=0&&(this.layout.updateTitle(t,e.owner),this.update())}_computeWidgetSize(e){let t=this.layout,r=t.widgets[e];if(!r)return;let n=r.isHidden,i=t.absoluteSizes(),a=(n?-1:1)*this.spacing,o=i.reduce((e,t)=>e+t),s=[...i];if(n){let t=this._widgetSizesCache.get(r);if(!t)return;s[e]+=t;let n=s.map(e=>e-t>0).lastIndexOf(!0);-1===n?s.forEach((r,n)=>{n!==e&&(s[n]-=i[n]/o*(t-a))}):s[n]-=t-a}else{let t=i[e];this._widgetSizesCache.set(r,t),s[e]=0;let n=s.map(e=>e>0).lastIndexOf(!0);if(-1===n)return;s[n]=i[n]+t+a}return s.map(e=>e/(o+a))}_evtClick(e){let t=e.target;if(t){let r=B.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));r>=0&&(e.preventDefault(),e.stopPropagation(),this._toggleExpansion(r))}}_eventKeyDown(e){if(e.defaultPrevented)return;let t=e.target,r=!1;if(t){let n=B.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));if(n>=0){let i=e.keyCode.toString();if(e.key.match(/Space|Enter/)||i.match(/13|32/))t.click(),r=!0;else if("horizontal"===this.orientation?e.key.match(/ArrowLeft|ArrowRight/)||i.match(/37|39/):e.key.match(/ArrowUp|ArrowDown/)||i.match(/38|40/)){let t=e.key.match(/ArrowLeft|ArrowUp/)||i.match(/37|38/)?-1:1,a=this.titles.length;this.titles[(n+a+t)%a].focus(),r=!0}else"End"===e.key||"35"===i?(this.titles[this.titles.length-1].focus(),r=!0):("Home"===e.key||"36"===i)&&(this.titles[0].focus(),r=!0)}r&&e.preventDefault()}}_toggleExpansion(e){let t=this.titles[e],r=this.layout.widgets[e],n=this._computeWidgetSize(e);n&&this.setRelativeSizes(n,!1),r.isHidden?(t.classList.add("lm-mod-expanded"),t.setAttribute("aria-expanded","true"),r.show()):(t.classList.remove("lm-mod-expanded"),t.setAttribute("aria-expanded","false"),r.hide()),this._expansionToggled.emit(e)}},to=ta||(ta={});class ts extends tr.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++ts._nInstance}createCollapseIcon(e){return document.createElement("span")}createSectionTitle(e){let t=document.createElement("h3");for(let r in t.setAttribute("tabindex","0"),t.id=this.createTitleKey(e),t.className=this.titleClassName,e.dataset)t.dataset[r]=e.dataset[r];t.appendChild(this.createCollapseIcon(e)).className="lm-AccordionPanel-titleCollapser";let r=t.appendChild(document.createElement("span"));return r.className="lm-AccordionPanel-titleLabel",r.textContent=e.label,r.title=e.caption||e.label,t}createTitleKey(e){let t=this._titleKeys.get(e);return void 0===t&&(t=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(e,t)),t}}ts._nInstance=0,to.Renderer=ts,to.defaultRenderer=new ts,(tP||(tP={})).createLayout=function(e){return e.layout||new e7({renderer:e.renderer||ta.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing,titleSpace:e.titleSpace})};var tl=class e extends e2{constructor(e={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",void 0!==e.direction&&(this._direction=e.direction),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=e3.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=e3.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){B.ArrayExt.insert(this._items,e,new eJ(t)),B.ArrayExt.insert(this._sizers,e,new eq),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),B.ArrayExt.move(this._sizers,e,t),this.parent.update()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e);B.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let t=0;for(let e=0,r=this._items.length;e0)switch(this._alignment){case"start":break;case"center":l=0,c=s/2;break;case"end":l=0,c=s;break;case"justify":l=s/r,c=0;break;default:throw"unreachable"}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:tu}),tc.sizeBasisProperty=new en({name:"sizeBasis",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:tu}),tc.isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},tc.clampSpacing=function(e){return Math.max(0,Math.floor(e))};var th=class extends tt{constructor(e={}){super({layout:tO.createLayout(e)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(e){this.layout.direction=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}onChildAdded(e){e.child.addClass("lm-BoxPanel-child")}onChildRemoved(e){e.child.removeClass("lm-BoxPanel-child")}};(tC=th||(th={})).getStretch=function(e){return tl.getStretch(e)},tC.setStretch=function(e,t){tl.setStretch(e,t)},tC.getSizeBasis=function(e){return tl.getSizeBasis(e)},tC.setSizeBasis=function(e,t){tl.setSizeBasis(e,t)},(tO||(tO={})).createLayout=function(e){return e.layout||new tl(e)};var tf=class e extends eG{constructor(t){super({node:tD.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(eG.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(e){let t=tD.createItem(this.commands,e);return this._items.push(t),this.refresh(),t}addItems(e){let t=e.map(e=>tD.createItem(this.commands,e));return t.forEach(e=>this._items.push(e)),this.refresh(),t}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){B.ArrayExt.removeAt(this._items,e)&&this.refresh()}clearItems(){0!==this._items.length&&(this._items.length=0,this.refresh())}refresh(){(this._results=null,""!==this.inputNode.value)?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none",this.update()}handleEvent(e){switch(e.type){case"click":this._evtClick(e);break;case"keydown":this._evtKeyDown(e);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused()}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(e){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(e){this.update(),super.onAfterShow(e)}onActivateRequest(e){if(this.isAttached){let e=this.inputNode;e.focus(),e.select()}}onUpdateRequest(e){if(this.isHidden)return;let t=this.inputNode.value,r=this.contentNode,n=this._results;if(n||(n=this._results=tD.search(this._items,t),this._activeIndex=t?B.ArrayExt.findFirstIndex(n,tD.canActivate):-1),!t&&0===n.length)return void eN.render(null,r);if(t&&0===n.length){let e=this.renderer.renderEmptyMessage({query:t});eN.render(e,r);return}let i=this.renderer,a=this._activeIndex,o=Array(n.length);for(let e=0,t=n.length;e=n.length)r.scrollTop=0;else{let e=r.children[a];Z.scrollIntoViewIfNeeded(r,e)}}_evtClick(e){if(0!==e.button)return;if(e.target.classList.contains("lm-close-icon")){this.inputNode.value="",this.refresh();return}let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>t.contains(e.target));-1!==t&&(e.preventDefault(),e.stopPropagation(),this._execute(t))}_evtKeyDown(e){if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.keyCode){case 13:e.preventDefault(),e.stopPropagation(),this._execute(this._activeIndex);break;case 38:e.preventDefault(),e.stopPropagation(),this._activatePreviousItem();break;case 40:e.preventDefault(),e.stopPropagation(),this._activateNextItem()}}_activateNextItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,r=ee-t),u=o.slice(0,c),h=o.slice(c);for(let e=0,t=h.length;er.command===e&&N.JSONExt.deepEqual(r.args,t))||null}}var tv=class e extends eG{constructor(t){super({node:tR.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new ea(this),this._menuRequested=new ea(this),this.addClass("lm-Menu"),this.setFlag(eG.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let e=this;for(;e._parentMenu;)e=e._parentMenu;return e}get leafMenu(){let e=this;for(;e._childMenu;)e=e._childMenu;return e}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(e){this.activeIndex=e?this._items.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._items.length)&&(e=-1),-1===e||tR.canActivate(this._items[e])||(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let e=this._items.length,t=this._activeIndex,r=t{this.activeIndex=e}})}eN.render(a,this.contentNode)}onCloseRequest(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let t=this._childMenu;t&&(this._childIndex=-1,this._childMenu=null,t._parentMenu=null,t.close());let r=this._parentMenu;r&&(this._parentMenu=null,r._childIndex=-1,r._childMenu=null,r.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(e)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation();let t=e.keyCode;if(13===t)return void this.triggerActiveItem();if(27===t)return void this.close();if(37===t)return void(this._parentMenu?this.close():this._menuRequested.emit("previous"));if(38===t)return void this.activatePreviousItem();if(39===t){let e=this.activeItem;e&&"submenu"===e.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next");return}if(40===t)return void this.activateNextItem();let r=ep().keyForKeydownEvent(e);if(!r)return;let n=this._activeIndex+1,i=tR.findMnemonic(this._items,r,n);-1===i.index||i.multiple?-1!==i.index?this.activeIndex=i.index:-1!==i.auto&&(this.activeIndex=i.auto):(this.activeIndex=i.index,this.triggerActiveItem())}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(e){let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>Z.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex)return;if(this.activeIndex=t,(t=this.activeIndex)===this._childIndex){this._cancelOpenTimer(),this._cancelCloseTimer();return}-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();let r=this.activeItem;r&&"submenu"===r.type&&r.submenu&&this._startOpenTimer()}_evtMouseEnter(e){for(let e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex}_evtMouseLeave(e){if(this._cancelOpenTimer(),!this._childMenu){this.activeIndex=-1;return}let{clientX:t,clientY:r}=e;Z.hitTest(this._childMenu.node,t,r)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}_evtMouseDown(e){this._parentMenu||(tR.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())}_openChildMenu(t=!1){let r=this.activeItem;if(!r||"submenu"!==r.type||!r.submenu)return void this._closeChildMenu();let n=r.submenu;if(n===this._childMenu)return;e.saveWindowData(),this._closeChildMenu(),this._childMenu=n,this._childIndex=this._activeIndex,n._parentMenu=this,ee.sendMessage(this,eG.Msg.UpdateRequest);let i=this.contentNode.children[this._activeIndex];tR.openSubmenu(n,i),t&&(n.activeIndex=-1,n.activateNextItem()),n.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){0===this._openTimerID&&(this._openTimerID=window.setTimeout(()=>{this._openTimerID=0,this._openChildMenu()},tR.TIMER_DELAY))}_startCloseTimer(){0===this._closeTimerID&&(this._closeTimerID=window.setTimeout(()=>{this._closeTimerID=0,this._closeChildMenu()},tR.TIMER_DELAY))}_cancelOpenTimer(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){tR.saveWindowData()}},tx=tv||(tv={});class tb{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),n=this.createItemARIA(e);return ez.li({className:t,dataset:r,tabindex:"0",onfocus:e.onfocus,...n},this.renderIcon(e),this.renderLabel(e),this.renderShortcut(e),this.renderSubmenu(e))}renderIcon(e){let t=this.createIconClass(e);return ez.div({className:t},e.item.icon,e.item.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return ez.div({className:"lm-Menu-itemLabel"},t)}renderShortcut(e){let t=this.formatShortcut(e);return ez.div({className:"lm-Menu-itemShortcut"},t)}renderSubmenu(e){return ez.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(e){let t="lm-Menu-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.item.isVisible||(t+=" lm-mod-hidden"),e.active&&(t+=" lm-mod-active"),e.collapsed&&(t+=" lm-mod-collapsed");let r=e.item.className;return r&&(t+=` ${r}`),t}createItemDataset(e){let{type:t,command:r,dataset:n}=e.item;return"command"===t?{...n,type:t,command:r}:{...n,type:t}}createIconClass(e){let t="lm-Menu-itemIcon",r=e.item.iconClass;return r?`${t} ${r}`:t}createItemARIA(e){let t={};switch(e.item.type){case"separator":t.role="presentation";break;case"submenu":t["aria-haspopup"]="true",e.item.isEnabled||(t["aria-disabled"]="true");break;default:e.item.isEnabled||(t["aria-disabled"]="true"),t.role="menuitem"}return t}formatLabel(e){let{label:t,mnemonic:r}=e.item;if(r<0||r>=t.length)return t;let n=t.slice(0,r),i=t.slice(r+1),a=t[r];return[n,ez.span({className:"lm-Menu-itemMnemonic"},a),i]}formatShortcut(e){let t=e.item.keyBinding;return t?eM.formatKeystroke(t.keys):null}}tx.Renderer=tb,tx.defaultRenderer=new tb,function(e){e.TIMER_DELAY=300,e.SUBMENU_OVERLAP=3;let t=null,r=0;function n(){return r>0?(r--,t):a()}function i(e){return"separator"!==e.type&&e.isEnabled&&e.isVisible}function a(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}e.saveWindowData=function(){t=a(),r++},e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-Menu-content",e.appendChild(t),t.setAttribute("role","menu"),e.tabIndex=0,e},e.canActivate=i,e.createItem=function(e,t){return new o(e.commands,t)},e.hitTestMenus=function(e,t,r){for(let n=e;n;n=n.childMenu)if(Z.hitTest(n.node,t,r))return!0;return!1},e.computeCollapsed=function(e){let t=Array(e.length);B.ArrayExt.fill(t,!1);let r=0,n=e.length;for(;r=0;--i){let r=e[i];if(r.isVisible){if("separator"!==r.type)break;t[i]=!0}}let a=!1;for(;++rc+h&&(t=c+h-g),!a&&r+y>u+f&&(r>u+f?r=u+f-y:r-=y),m.transform=`translate(${Math.max(0,t)}px, ${Math.max(0,r)}px`,m.opacity="1"},e.openSubmenu=function(t,r){let i=n(),a=i.pageXOffset,o=i.pageYOffset,s=i.clientWidth,l=i.clientHeight;ee.sendMessage(t,eG.Msg.UpdateRequest);let c=t.node,u=c.style;u.opacity="0",u.maxHeight=`${l}px`,eG.attach(t,document.body);let{width:h,height:f}=c.getBoundingClientRect(),d=Z.boxSizing(t.node),p=r.getBoundingClientRect(),m=p.right-e.SUBMENU_OVERLAP;m+h>a+s&&(m=p.left+e.SUBMENU_OVERLAP-h);let g=p.top-d.borderTop-d.paddingTop;g+f>o+l&&(g=p.bottom+d.borderBottom+d.paddingBottom-f),u.transform=`translate(${Math.max(0,m)}px, ${Math.max(0,g)}px`,u.opacity="1"},e.findMnemonic=function(e,t,r){let n=-1,a=-1,o=!1,s=t.toUpperCase();for(let t=0,l=e.length;t=0&&fr.command===e&&N.JSONExt.deepEqual(r.args,t))||null}return null}}}(tR||(tR={}));var t_=tj||(tj={});function tw(e,t){let r=e.rank,n=t.rank;return r!==n?r=this._titles.length)&&(e=-1),this._currentIndex===e)return;let t=this._currentIndex,r=this._titles[t]||null,n=e,i=this._titles[n]||null;this._currentIndex=n,this._previousTitle=r,this.update(),this._currentChanged.emit({previousIndex:t,previousTitle:r,currentIndex:n,currentTitle:i})}get name(){return this._name}set name(e){this._name=e,e?this.contentNode.setAttribute("aria-label",e):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.contentNode.setAttribute("aria-orientation",e))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled!==e&&(this._addButtonEnabled=e,e?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(e){return this.insertTab(this._titles.length,e)}insertTab(e,t){this._releaseMouse();let r=tF.asTitle(t),n=this._titles.indexOf(r),i=Math.max(0,Math.min(e,this._titles.length));return -1===n?(B.ArrayExt.insert(this._titles,i,r),r.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(i,r)):(i===this._titles.length&&i--,n===i||(B.ArrayExt.move(this._titles,n,i),this.update(),this._adjustCurrentForMove(n,i))),r}removeTab(e){this.removeTabAt(this._titles.indexOf(e))}removeTabAt(e){this._releaseMouse();let t=B.ArrayExt.removeAt(this._titles,e);t&&(t.changed.disconnect(this._onTitleChanged,this),t===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,t))}clearTabs(){if(0===this._titles.length)return;for(let e of(this._releaseMouse(),this._titles))e.changed.disconnect(this._onTitleChanged,this);let e=this.currentIndex,t=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==e&&this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"dblclick":this._evtDblClick(e);break;case"keydown":e.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(e):this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(e){var t;let r=this._titles,n=this.renderer,i=this.currentTitle,a=Array(r.length),o=null!=(t=this._getCurrentTabindex())?t:this._currentIndex>-1?this._currentIndex:0;for(let e=0,t=r.length;eZ.hitTest(t,e.clientX,e.clientY));if(-1===r)return;let n=this.titles[r],i=t[r].querySelector(".lm-TabBar-tabLabel");if(i&&i.contains(e.target)){let e=n.label||"",t=i.innerHTML;i.innerHTML="";let r=document.createElement("input");r.classList.add("lm-TabBar-tabInput"),r.value=e,i.appendChild(r);let a=()=>{r.removeEventListener("blur",a),i.innerHTML=t,this.node.addEventListener("keydown",this)};r.addEventListener("dblclick",e=>e.stopPropagation()),r.addEventListener("blur",a),r.addEventListener("keydown",e=>{"Enter"===e.key?(""!==r.value&&(n.label=n.caption=r.value),a()):"Escape"===e.key&&a()}),this.node.removeEventListener("keydown",this),r.select(),r.focus(),i.children.length>0&&i.children[0].focus()}}_evtKeyDownCapturing(e){e.eventPhase===Event.CAPTURING_PHASE&&(e.preventDefault(),e.stopPropagation(),"Escape"===e.key&&this._releaseMouse())}_evtKeyDown(e){var t,r,n;if("Tab"!==e.key&&e.eventPhase!==Event.CAPTURING_PHASE){if("Enter"===e.key||"Spacebar"===e.key||" "===e.key){let t=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(t))e.preventDefault(),e.stopPropagation(),this._addRequested.emit();else{let r=B.ArrayExt.findFirstIndex(this.contentNode.children,e=>e.contains(t));r>=0&&(e.preventDefault(),e.stopPropagation(),this.currentIndex=r)}}else if(tT.includes(e.key)){let i,a=[...this.contentNode.children];if(this.addButtonEnabled&&a.push(this.addButtonNode),a.length<=1)return;e.preventDefault(),e.stopPropagation();let o=a.indexOf(document.activeElement);-1===o&&(o=this._currentIndex),"ArrowRight"===e.key&&"horizontal"===this._orientation||"ArrowDown"===e.key&&"vertical"===this._orientation?i=null!=(t=a[o+1])?t:a[0]:"ArrowLeft"===e.key&&"horizontal"===this._orientation||"ArrowUp"===e.key&&"vertical"===this._orientation?i=null!=(r=a[o-1])?r:a[a.length-1]:"Home"===e.key?i=a[0]:"End"===e.key&&(i=a[a.length-1]),i&&(null==(n=a[o])||n.setAttribute("tabindex","-1"),i?.setAttribute("tabindex","0"),i.focus())}}}_evtPointerDown(e){if(0!==e.button&&1!==e.button||this._dragData||e.target.classList.contains("lm-TabBar-tabInput"))return;let t=this.addButtonEnabled&&this.addButtonNode.contains(e.target),r=this.contentNode.children,n=B.ArrayExt.findFirstIndex(r,t=>Z.hitTest(t,e.clientX,e.clientY));if(-1===n&&!t||(e.preventDefault(),e.stopPropagation(),this._dragData={tab:r[n],index:n,pressX:e.clientX,pressY:e.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),1===e.button||t))return;let i=r[n].querySelector(this.renderer.closeIconSelector);i&&i.contains(e.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===n?this.currentIndex=-1:this.currentIndex=n,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(e){let t=this._dragData;if(!t)return;e.preventDefault(),e.stopPropagation();let r=this.contentNode.children;if(!(!t.dragActive&&!tF.dragExceeded(t,e))){if(!t.dragActive){let e=t.tab.getBoundingClientRect();"horizontal"===this._orientation?(t.tabPos=t.tab.offsetLeft,t.tabSize=e.width,t.tabPressPos=t.pressX-e.left):(t.tabPos=t.tab.offsetTop,t.tabSize=e.height,t.tabPressPos=t.pressY-e.top),t.tabPressOffset={x:t.pressX-e.left,y:t.pressY-e.top},t.tabLayout=tF.snapTabLayout(r,this._orientation),t.contentRect=this.contentNode.getBoundingClientRect(),t.override=ec.overrideCursor("default"),t.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),t.dragActive=!0}if(!t.detachRequested&&tF.detachExceeded(t,e)){t.detachRequested=!0;let n=t.index,i=e.clientX,a=e.clientY,o=r[n],s=this._titles[n];if(this._tabDetachRequested.emit({index:n,title:s,tab:o,clientX:i,clientY:a,offset:t.tabPressOffset}),t.dragAborted)return}tF.layoutTabs(r,t,e,this._orientation)}}_evtPointerUp(e){if(0!==e.button&&1!==e.button)return;let t=this._dragData;if(t){if(e.preventDefault(),e.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!t.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(e.target))return void this._addRequested.emit(void 0);let r=this.contentNode.children,n=B.ArrayExt.findFirstIndex(r,t=>Z.hitTest(t,e.clientX,e.clientY));if(n!==t.index)return;let i=this._titles[n];if(!i.closable)return;if(1===e.button)return void this._tabCloseRequested.emit({index:n,title:i});let a=r[n].querySelector(this.renderer.closeIconSelector);return a&&a.contains(e.target)?void this._tabCloseRequested.emit({index:n,title:i}):void 0}0!==e.button||(tF.finalizeTabPosition(t,this._orientation),t.tab.classList.remove("lm-mod-dragging"),setTimeout(()=>{if(t.dragAborted)return;this._dragData=null,tF.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),this.removeClass("lm-mod-dragging");let e=t.index,r=t.targetIndex;-1===r||e===r||(B.ArrayExt.move(this._titles,e,r),this._adjustCurrentForMove(e,r),this._tabMoved.emit({fromIndex:e,toIndex:r,title:this._titles[r]}),ee.sendMessage(this,eG.Msg.UpdateRequest))},tF.parseTransitionDuration(t.tab)))}}_releaseMouse(){let e=this._dragData;e&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),e.dragAborted=!0,e.dragActive&&(tF.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(e,t){let r=this.currentTitle,n=this._currentIndex,i=this.insertBehavior;if("select-tab"===i||"select-tab-if-needed"===i&&-1===n){this._currentIndex=e,this._previousTitle=r,this._currentChanged.emit({previousIndex:n,previousTitle:r,currentIndex:e,currentTitle:t});return}n>=e&&this._currentIndex++}_adjustCurrentForMove(e,t){this._currentIndex===e?this._currentIndex=t:this._currentIndex=t?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=t&&this._currentIndex--}_adjustCurrentForRemove(e,t){let r=this._currentIndex,n=this.removeBehavior;if(r!==e){r>e&&this._currentIndex--;return}if(0===this._titles.length){this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null});return}if("select-tab-after"===n){this._currentIndex=Math.min(e,this._titles.length-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if("select-tab-before"===n){this._currentIndex=Math.max(0,e-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if("select-previous-tab"===n){this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}_onTitleChanged(e){this.update()}},tM=tA||(tA={});class tS{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++tS._nInstance}renderTab(e){let t=e.title.caption,r=this.createTabKey(e),n=this.createTabStyle(e),i=this.createTabClass(e),a=this.createTabDataset(e),o=this.createTabARIA(e);return e.title.closable?ez.li({id:r,key:r,className:i,title:t,style:n,dataset:a,...o},this.renderIcon(e),this.renderLabel(e),this.renderCloseIcon(e)):ez.li({id:r,key:r,className:i,title:t,style:n,dataset:a,...o},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let{title:t}=e,r=this.createIconClass(e);return ez.div({className:r},t.icon,t.iconLabel)}renderLabel(e){return ez.div({className:"lm-TabBar-tabLabel"},e.title.label)}renderCloseIcon(e){return ez.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(e){let t=this._tabKeys.get(e.title);return void 0===t&&(t=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(e.title,t)),t}createTabStyle(e){return{zIndex:`${e.zIndex}`}}createTabClass(e){let t="lm-TabBar-tab";return e.title.className&&(t+=` ${e.title.className}`),e.title.closable&&(t+=" lm-mod-closable"),e.current&&(t+=" lm-mod-current"),t}createTabDataset(e){return e.title.dataset}createTabARIA(e){var t;return{role:"tab","aria-selected":e.current.toString(),tabindex:`${null!=(t=e.tabIndex)?t:"-1"}`}}createIconClass(e){let t="lm-TabBar-tabIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}}tS._nInstance=0,tM.Renderer=tS,tM.defaultRenderer=new tS,tM.addButtonSelector=".lm-TabBar-addButton",(tL=tF||(tF={})).DRAG_THRESHOLD=5,tL.DETACH_THRESHOLD=20,tL.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");t.setAttribute("role","tablist"),t.className="lm-TabBar-content",e.appendChild(t);let r=document.createElement("div");return r.className="lm-TabBar-addButton lm-mod-hidden",r.setAttribute("tabindex","-1"),r.setAttribute("role","button"),e.appendChild(r),e},tL.asTitle=function(e){return e instanceof eH?e:new eH(e)},tL.parseTransitionDuration=function(e){return 1e3*(parseFloat(window.getComputedStyle(e).transitionDuration)||0)},tL.snapTabLayout=function(e,t){let r=Array(e.length);for(let n=0,i=e.length;n=tL.DRAG_THRESHOLD||n>=tL.DRAG_THRESHOLD},tL.detachExceeded=function(e,t){let r=e.contentRect;return t.clientX=r.right+tL.DETACH_THRESHOLD||t.clientY=r.bottom+tL.DETACH_THRESHOLD},tL.layoutTabs=function(e,t,r,n){let i,a,o,s;"horizontal"===n?(i=t.pressX,a=r.clientX-t.contentRect.left,o=r.clientX,s=t.contentRect.width):(i=t.pressY,a=r.clientY-t.contentRect.top,o=r.clientY,s=t.contentRect.height);let l=t.index,c=a-t.tabPressPos,u=c+t.tabSize;for(let r=0,a=e.length;r>1);if(rt.index&&u>f)a=`${-t.tabSize-h.margin}px`,l=Math.max(l,r);else if(r===t.index){let e=o-i,r=s-(t.tabPos+t.tabSize);a=`${Math.max(-t.tabPos,Math.min(e,r))}px`}else a="";"horizontal"===n?e[r].style.left=a:e[r].style.top=a}t.targetIndex=l},tL.finalizeTabPosition=function(e,t){let r,n;if(r="horizontal"===t?e.contentRect.width:e.contentRect.height,e.targetIndex===e.index)n=0;else if(e.targetIndex>e.index){let t=e.tabLayout[e.targetIndex];n=t.pos+t.size-e.tabSize-e.tabPos}else n=e.tabLayout[e.targetIndex].pos-e.tabPos;let i=r-(e.tabPos+e.tabSize),a=Math.max(-e.tabPos,Math.min(n,i));"horizontal"===t?e.tab.style.left=`${a}px`:e.tab.style.top=`${a}px`},tL.resetTabPositions=function(e,t){for(let r of e)"horizontal"===t?r.style.left="":r.style.top=""};var tE,tC,tL,tI,tP,tz,tO,tD,tR,tj,tF,tB,tN=class extends eW{constructor(e){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=e.renderer,void 0!==e.spacing&&(this._spacing=e3.clampDimension(e.spacing)),this._document=e.document||document,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:eG.HiddenMode.Display}dispose(){let e=this[Symbol.iterator]();for(let t of(this._items.forEach(e=>{e.dispose()}),this._box=null,this._root=null,this._items.clear(),e))t.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){if(this._hiddenMode!==e){for(let t of(this._hiddenMode=e,this.tabBars()))if(t.titles.length>1)for(let e of t.titles)e.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(e){e=e3.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get isEmpty(){return null===this._root}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,B.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,B.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,B.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,B.empty)()}handles(){return this._root?this._root.iterHandles():(0,B.empty)()}moveHandle(e,t,r){let n,i=e.classList.contains("lm-mod-hidden");if(!this._root||i)return;let a=this._root.findSplitNode(e);a&&0!=(n="horizontal"===a.node.orientation?t-e.offsetLeft:r-e.offsetTop)&&(a.node.holdSizes(),eV.adjust(a.node.sizers,a.index,n),this.parent&&this.parent.update())}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(e){let t=new Set,r;r=e.main?tB.normalizeAreaConfig(e.main,t):null;let n=this.widgets(),i=this.tabBars(),a=this.handles();for(let e of(this._root=null,n))t.has(e)||(e.parent=null);for(let e of i)e.dispose();for(let e of a)e.parentNode&&e.parentNode.removeChild(e);for(let e of t)e.parent=this.parent;r?this._root=tB.realizeAreaConfig(r,{createTabBar:e=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):this._root=null,this.parent&&(t.forEach(e=>{this.attachWidget(e)}),this.parent.fit())}addWidget(e,t={}){let r=t.ref||null,n=t.mode||"tab-after",i=null;if(this._root&&r&&(i=this._root.findTabNode(r)),r&&!i)throw Error("Reference widget is not in the layout.");switch(e.parent=this.parent,n){case"tab-after":this._insertTab(e,r,i,!0);break;case"tab-before":this._insertTab(e,r,i,!1);break;case"split-top":this._insertSplit(e,r,i,"vertical",!1);break;case"split-left":this._insertSplit(e,r,i,"horizontal",!1);break;case"split-right":this._insertSplit(e,r,i,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,r,i,"vertical",!0);break;case"merge-top":this._insertSplit(e,r,i,"vertical",!1,!0);break;case"merge-left":this._insertSplit(e,r,i,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(e,r,i,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(e,r,i,"vertical",!0,!0)}this.parent&&(this.attachWidget(e),this.parent.fit())}removeWidget(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())}hitTestTabAreas(e,t){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=Z.boxSizing(this.parent.node));let r=this.parent.node.getBoundingClientRect(),n=e-r.left-this._box.borderLeft,i=t-r.top-this._box.borderTop,a=this._root.hitTestTabNodes(n,i);if(!a)return null;let{tabBar:o,top:s,left:l,width:c,height:u}=a,h=this._box.borderLeft+this._box.borderRight,f=this._box.borderTop+this._box.borderBottom,d=r.width-h-(l+c),p=r.height-f-(s+u);return{tabBar:o,x:n,y:i,top:s,left:l,right:d,bottom:p,width:c,height:u}}init(){for(let e of(super.init(),this))this.attachWidget(e);for(let e of this.handles())this.parent.node.appendChild(e);this.parent.fit()}attachWidget(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new eJ(e)),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterAttach))}detachWidget(e){if(this.parent.node!==e.node.parentNode)return;this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterDetach);let t=this._items.get(e);t&&(this._items.delete(e),t.dispose())}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_removeWidget(e){if(!this._root)return;let t=this._root.findTabNode(e);if(!t)return;if(tB.removeAria(e),t.tabBar.titles.length>1){t.tabBar.removeTab(e.title),this._hiddenMode===eG.HiddenMode.Scale&&1==t.tabBar.titles.length&&(t.tabBar.titles[0].owner.hiddenMode=eG.HiddenMode.Display);return}if(t.tabBar.dispose(),this._root===t){this._root=null;return}this._root.holdAllSizes();let r=t.parent;t.parent=null;let n=B.ArrayExt.removeFirstOf(r.children,t),i=B.ArrayExt.removeAt(r.handles,n);if(B.ArrayExt.removeAt(r.sizers,n),i.parentNode&&i.parentNode.removeChild(i),r.children.length>1)return void r.syncHandles();let a=r.parent;r.parent=null;let o=r.children[0],s=r.handles[0];if(r.children.length=0,r.handles.length=0,r.sizers.length=0,s.parentNode&&s.parentNode.removeChild(s),this._root===r){o.parent=null,this._root=o;return}let l=a.children.indexOf(r);if(o instanceof tB.TabLayoutNode){o.parent=a,a.children[l]=o;return}let c=B.ArrayExt.removeAt(a.handles,l);B.ArrayExt.removeAt(a.children,l),B.ArrayExt.removeAt(a.sizers,l),c.parentNode&&c.parentNode.removeChild(c);for(let e=0,t=o.children.length;e=r.length)&&(n=0),{type:"tab-area",widgets:r,currentIndex:n}}(t,r):function(t,r){let n=t.orientation,i=[],a=[];for(let o=0,s=t.children.length;o{let n=i(e,c,u),a=t(l.sizes[r]),o=c.createHandle();h.children.push(n),h.handles.push(o),h.sizers.push(a),n.parent=h}),h.syncHandles(),h.normalizeSizes(),h)};class r{constructor(e){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;let t=new eq,r=new eq;t.stretch=0,r.stretch=1,this.tabBar=e,this.sizers=[t,r]}get top(){return this._top}get left(){return this._left}get width(){return this._width}get height(){return this._height}*iterAllWidgets(){yield this.tabBar,yield*this.iterUserWidgets()}*iterUserWidgets(){for(let e of this.tabBar.titles)yield e.owner}*iterSelectedWidgets(){let e=this.tabBar.currentTitle;e&&(yield e.owner)}*iterTabBars(){yield this.tabBar}*iterHandles(){}findTabNode(e){return -1!==this.tabBar.titles.indexOf(e.title)?this:null}findSplitNode(e){return null}findFirstTabNode(){return this}hitTestTabNodes(e,t){return e=this._left+this._width||t=this._top+this._height?null:this}createConfig(){return{type:"tab-area",widgets:this.tabBar.titles.map(e=>e.owner),currentIndex:this.tabBar.currentIndex}}holdAllSizes(){}fit(e,t){let r=0,n=0,i=t.get(this.tabBar),a=this.tabBar.currentTitle,o=a?t.get(a.owner):void 0,[s,l]=this.sizers;return i&&i.fit(),o&&o.fit(),i&&!i.isHidden?(r=Math.max(r,i.minWidth),n+=i.minHeight,s.minSize=i.minHeight,s.maxSize=i.maxHeight):(s.minSize=0,s.maxSize=0),o&&!o.isHidden?(r=Math.max(r,o.minWidth),n+=o.minHeight,l.minSize=o.minHeight):l.minSize=0,l.maxSize=1/0,{minWidth:r,minHeight:n,maxWidth:1/0,maxHeight:1/0}}update(e,t,r,n,i,a){this._top=t,this._left=e,this._width=r,this._height=n;let o=a.get(this.tabBar),s=this.tabBar.currentTitle,l=s?a.get(s.owner):void 0;if(eV.calc(this.sizers,n),o&&!o.isHidden){let n=this.sizers[0].size;o.update(e,t,r,n),t+=n}if(l&&!l.isHidden){let n=this.sizers[1].size;l.update(e,t,r,n)}}}e.TabLayoutNode=r;class n{constructor(e){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=e}*iterAllWidgets(){for(let e of this.children)yield*e.iterAllWidgets()}*iterUserWidgets(){for(let e of this.children)yield*e.iterUserWidgets()}*iterSelectedWidgets(){for(let e of this.children)yield*e.iterSelectedWidgets()}*iterTabBars(){for(let e of this.children)yield*e.iterTabBars()}*iterHandles(){for(let e of(yield*this.handles,this.children))yield*e.iterHandles()}findTabNode(e){for(let t=0,r=this.children.length;te.createConfig()),sizes:t}}syncHandles(){this.handles.forEach((e,t)=>{e.setAttribute("data-orientation",this.orientation),t===this.handles.length-1?e.classList.add("lm-mod-hidden"):e.classList.remove("lm-mod-hidden")})}holdSizes(){for(let e of this.sizers)e.sizeHint=e.size}holdAllSizes(){for(let e of this.children)e.holdAllSizes();this.holdSizes()}normalizeSizes(){let e=this.sizers.length;if(0===e)return;this.holdSizes();let t=this.sizers.reduce((e,t)=>e+t.sizeHint,0);if(0===t)for(let t of this.sizers)t.size=t.sizeHint=1/e;else for(let e of this.sizers)e.size=e.sizeHint/=t;this.normalized=!0}createNormalizedSizes(){let e=this.sizers.length;if(0===e)return[];let t=this.sizers.map(e=>e.size),r=t.reduce((e,t)=>e+t,0);if(0===r)for(let r=t.length-1;r>-1;r--)t[r]=1/e;else for(let e=t.length-1;e>-1;e--)t[e]/=r;return t}fit(e,t){let r="horizontal"===this.orientation,n=Math.max(0,this.children.length-1)*e,i=r?n:0,a=r?0:n;for(let n=0,o=this.children.length;nthis._createTabBar(),createHandle:()=>this._createHandle()},spacing:t.spacing,hiddenMode:t.hiddenMode}),this.overlay=t.overlay||new e.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get mode(){return this._mode}set mode(e){if(this._mode===e)return;this._mode=e,this.dataset.mode=e;let t=this.layout;switch(e){case"multiple-document":for(let e of t.tabBars())e.show();break;case"single-document":t.restoreLayout(_.createSingleDocumentConfig(this));break;default:throw"unreachable"}ee.postMessage(this,_.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(e){for(let t of(this._tabsMovable=e,this.tabBars()))t.tabsMovable=e}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(e){this._tabsConstrained=e}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){for(let t of(this._addButtonEnabled=e,this.tabBars()))t.addButtonEnabled=e}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(e){let t=(0,B.find)(this.tabBars(),t=>-1!==t.titles.indexOf(e.title));if(!t)throw Error("Widget is not contained in the dock panel.");t.currentTitle=e.title}activateWidget(e){this.selectWidget(e),e.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(e){this._mode="multiple-document",this.layout.restoreLayout(e),($.IS_EDGE||$.IS_IE)&&ee.flush(),ee.postMessage(this,_.LayoutModified)}addWidget(e,t={}){"single-document"===this._mode?this.layout.addWidget(e):this.layout.addWidget(e,t),ee.postMessage(this,_.LayoutModified)}processMessage(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):super.processMessage(e)}handleEvent(e){switch(e.type){case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){_.isGeneratedTabBarProperty.get(e.child)||e.child.addClass("lm-DockPanel-widget")}onChildRemoved(e){_.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("lm-DockPanel-widget"),ee.postMessage(this,_.LayoutModified))}_evtDragEnter(e){e.mimeData.hasData("application/vnd.lumino.widget-factory")&&(e.preventDefault(),e.stopPropagation())}_evtDragLeave(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||(e.stopPropagation(),this.overlay.hide(1))}_evtDragOver(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||"invalid"===this._showOverlay(e.clientX,e.clientY)?e.dropAction="none":(e.stopPropagation(),e.dropAction=e.proposedAction)}_evtDrop(e){if(e.preventDefault(),this.overlay.hide(0),"none"===e.proposedAction){e.dropAction="none";return}let{clientX:t,clientY:r}=e,{zone:n,target:i}=_.findDropTarget(this,t,r,this._edges);if(this._tabsConstrained&&e.source!==this||"invalid"===n){e.dropAction="none";return}let a=e.mimeData.getData("application/vnd.lumino.widget-factory");if("function"!=typeof a){e.dropAction="none";return}let o=a();if(!(o instanceof eG)||o.contains(this)){e.dropAction="none";return}let s=i?_.getDropRef(i.tabBar):null;switch(n){case"root-all":this.addWidget(o);break;case"root-top":this.addWidget(o,{mode:"split-top"});break;case"root-left":this.addWidget(o,{mode:"split-left"});break;case"root-right":this.addWidget(o,{mode:"split-right"});break;case"root-bottom":this.addWidget(o,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(o,{mode:"tab-after",ref:s});break;case"widget-top":this.addWidget(o,{mode:"split-top",ref:s});break;case"widget-left":this.addWidget(o,{mode:"split-left",ref:s});break;case"widget-right":this.addWidget(o,{mode:"split-right",ref:s});break;case"widget-bottom":this.addWidget(o,{mode:"split-bottom",ref:s});break;default:throw"unreachable"}e.dropAction=e.proposedAction,e.stopPropagation(),this.activateWidget(o)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&(this._releaseMouse(),ee.postMessage(this,_.LayoutModified))}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=e.target,n=(0,B.find)(t.handles(),e=>e.contains(r));if(!n)return;e.preventDefault(),e.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let i=n.getBoundingClientRect(),a=e.clientX-i.left,o=e.clientY-i.top,s=window.getComputedStyle(n),l=ec.overrideCursor(s.cursor,this._document);this._pressData={handle:n,deltaX:a,deltaY:o,override:l}}_evtPointerMove(e){if(!this._pressData)return;e.preventDefault(),e.stopPropagation();let t=this.node.getBoundingClientRect(),r=e.clientX-t.left-this._pressData.deltaX,n=e.clientY-t.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,r,n)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),ee.postMessage(this,_.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(e,t){let{zone:r,target:n}=_.findDropTarget(this,e,t,this._edges);if("invalid"===r)return this.overlay.hide(100),r;let i,a,o,s,l=Z.boxSizing(this.node),c=this.node.getBoundingClientRect();switch(r){case"root-all":i=l.paddingTop,a=l.paddingLeft,o=l.paddingRight,s=l.paddingBottom;break;case"root-top":i=l.paddingTop,a=l.paddingLeft,o=l.paddingRight,s=c.height*_.GOLDEN_RATIO;break;case"root-left":i=l.paddingTop,a=l.paddingLeft,o=c.width*_.GOLDEN_RATIO,s=l.paddingBottom;break;case"root-right":i=l.paddingTop,a=c.width*_.GOLDEN_RATIO,o=l.paddingRight,s=l.paddingBottom;break;case"root-bottom":i=c.height*_.GOLDEN_RATIO,a=l.paddingLeft,o=l.paddingRight,s=l.paddingBottom;break;case"widget-all":i=n.top,a=n.left,o=n.right,s=n.bottom;break;case"widget-top":i=n.top,a=n.left,o=n.right,s=n.bottom+n.height/2;break;case"widget-left":i=n.top,a=n.left,o=n.right+n.width/2,s=n.bottom;break;case"widget-right":i=n.top,a=n.left+n.width/2,o=n.right,s=n.bottom;break;case"widget-bottom":i=n.top+n.height/2,a=n.left,o=n.right,s=n.bottom;break;case"widget-tab":{let e=n.tabBar.node.getBoundingClientRect().height;i=n.top,a=n.left,o=n.right,s=n.bottom+n.height-e;break}default:throw"unreachable"}return this.overlay.show({top:i,left:a,right:o,bottom:s}),r}_createTabBar(){let e=this._renderer.createTabBar(this._document);return _.isGeneratedTabBarProperty.set(e,!0),"single-document"===this._mode&&e.hide(),e.tabsMovable=this._tabsMovable,e.allowDeselect=!1,e.addButtonEnabled=this._addButtonEnabled,e.removeBehavior="select-previous-tab",e.insertBehavior="select-tab-if-needed",e.tabMoved.connect(this._onTabMoved,this),e.currentChanged.connect(this._onCurrentChanged,this),e.tabCloseRequested.connect(this._onTabCloseRequested,this),e.tabDetachRequested.connect(this._onTabDetachRequested,this),e.tabActivateRequested.connect(this._onTabActivateRequested,this),e.addRequested.connect(this._onTabAddRequested,this),e}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){ee.postMessage(this,_.LayoutModified)}_onCurrentChanged(e,t){let{previousTitle:r,currentTitle:n}=t;r&&r.owner.hide(),n&&n.owner.show(),($.IS_EDGE||$.IS_IE)&&ee.flush(),ee.postMessage(this,_.LayoutModified)}_onTabAddRequested(e){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabDetachRequested(e,t){if(this._drag)return;e.releaseMouse();let{title:r,tab:n,clientX:i,clientY:a,offset:o}=t,s=new N.MimeData;s.setData("application/vnd.lumino.widget-factory",()=>r.owner);let l=n.cloneNode(!0);o&&(l.style.top=`-${o.y}px`,l.style.left=`-${o.x}px`),this._drag=new ec({document:this._document,mimeData:s,dragImage:l,proposedAction:"move",supportedActions:"move",source:this}),n.classList.add("lm-mod-hidden");let c=()=>{this._drag=null,n.classList.remove("lm-mod-hidden")};this._drag.start(i,a).then(c)}},tV=tU||(tU={});tV.Overlay=class{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(e){let t=this.node.style;t.top=`${e.top}px`,t.left=`${e.left}px`,t.right=`${e.right}px`,t.bottom=`${e.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(e){if(!this._hidden){if(e<=0){clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden");return}-1===this._timer&&(this._timer=window.setTimeout(()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")},e))}}};class tq{createTabBar(e){let t=new tA({document:e});return t.addClass("lm-DockPanel-tabBar"),t}createHandle(){let e=document.createElement("div");return e.className="lm-DockPanel-handle",e}}tV.Renderer=tq,tV.defaultRenderer=new tq,(m=_||(_={})).GOLDEN_RATIO=.618,m.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},m.LayoutModified=new er("layout-modified"),m.isGeneratedTabBarProperty=new en({name:"isGeneratedTabBar",create:()=>!1}),m.createSingleDocumentConfig=function(e){if(e.isEmpty)return{main:null};let t=Array.from(e.widgets()),r=e.selectedWidgets().next().value,n=r?t.indexOf(r):-1;return{main:{type:"tab-area",widgets:t,currentIndex:n}}},m.findDropTarget=function(e,t,r,n){let i;if(!Z.hitTest(e.node,t,r))return{zone:"invalid",target:null};let a=e.layout;if(a.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===e.mode){let i=e.node.getBoundingClientRect(),a=t-i.left+1,o=r-i.top+1,s=i.right-t,l=i.bottom-r;switch(Math.min(o,s,l,a)){case o:if(oh&&c>h&&l>f&&u>f)return{zone:"widget-all",target:o};switch(s/=h,l/=f,Math.min(s,l,c/=h,u/=f)){case s:i="widget-left";break;case l:i="widget-top";break;case c:i="widget-right";break;case u:i="widget-bottom";break;default:throw"unreachable"}return{zone:i,target:o}},m.getDropRef=function(e){return 0===e.titles.length?null:e.currentTitle?e.currentTitle.owner:e.titles[e.titles.length-1].owner};var tH=class e extends eW{constructor(e={}){super(e),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new eq],this._columnSizers=[new eq],this._box=null,void 0!==e.rowCount&&w.reallocSizers(this._rowSizers,e.rowCount),void 0!==e.columnCount&&w.reallocSizers(this._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(this._rowSpacing=w.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(this._columnSpacing=w.clampValue(e.columnSpacing))}dispose(){for(let e of this._items){let t=e.widget;e.dispose(),t.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(e){e!==this.rowCount&&(w.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(e){e!==this.columnCount&&(w.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){e=w.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){e=w.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())}rowStretch(e){let t=this._rowSizers[e];return t?t.stretch:-1}setRowStretch(e,t){let r=this._rowSizers[e];r&&(t=w.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}columnStretch(e){let t=this._columnSizers[e];return t?t.stretch:-1}setColumnStretch(e,t){let r=this._columnSizers[e];r&&(t=w.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(let e of this._items)yield e.widget}addWidget(e){-1===B.ArrayExt.findFirstIndex(this._items,t=>t.widget===e)&&(this._items.push(new eJ(e)),this.parent&&this.attachWidget(e))}removeWidget(e){let t=B.ArrayExt.findFirstIndex(this._items,t=>t.widget===e);if(-1===t)return;let r=B.ArrayExt.removeAt(this._items,t);this.parent&&this.detachWidget(e),r.dispose()}init(){for(let e of(super.init(),this))this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterAttach),this.parent.fit()}detachWidget(e){this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterDetach),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){for(let e=0,t=this.rowCount;e!e.isHidden);for(let e=0,r=t.length;e({row:0,column:0,rowSpan:1,columnSpan:1}),changed:function(e){e.parent&&e.parent.layout instanceof tH&&e.parent.fit()}}),y.normalizeConfig=function(e){return{row:Math.max(0,Math.floor(e.row||0)),column:Math.max(0,Math.floor(e.column||0)),rowSpan:Math.max(1,Math.floor(e.rowSpan||0)),columnSpan:Math.max(1,Math.floor(e.columnSpan||0))}},y.clampValue=function(e){return Math.max(0,Math.floor(e))},y.rowSpanCmp=function(e,t){let r=y.cellConfigProperty.get(e.widget),n=y.cellConfigProperty.get(t.widget);return r.rowSpan-n.rowSpan},y.columnSpanCmp=function(e,t){let r=y.cellConfigProperty.get(e.widget),n=y.cellConfigProperty.get(t.widget);return r.columnSpan-n.columnSpan},y.reallocSizers=function(e,t){for(t=Math.max(1,Math.floor(t));e.lengtht&&(e.length=t)},y.distributeMin=function(e,t,r,n){if(r=n)return;let a=(n-i)/(r-t+1);for(let n=t;n<=r;++n)e[n].minSize+=a};var tG=class e extends eG{constructor(t={}){super({node:k.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(eG.Flag.DisallowLayout),this.renderer=t.renderer||e.defaultRenderer,this._forceItemsPosition=t.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=t.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(e){this.activeIndex=e?this._menus.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._menus.length)&&(e=-1),e>-1&&0===this._menus[e].items.length&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this.update())}get menus(){return this._menus}openActiveMenu(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(e,t=!0){this.insertMenu(this._menus.length,e,t)}insertMenu(e,t,r=!0){this._closeChildMenu();let n=this._menus.indexOf(t),i=Math.max(0,Math.min(e,this._menus.length));if(-1===n){B.ArrayExt.insert(this._menus,i,t),t.addClass("lm-MenuBar-menu"),t.aboutToClose.connect(this._onMenuAboutToClose,this),t.menuRequested.connect(this._onMenuMenuRequested,this),t.title.changed.connect(this._onTitleChanged,this),r&&this.update();return}i===this._menus.length&&i--,n!==i&&(B.ArrayExt.move(this._menus,n,i),r&&this.update())}removeMenu(e,t=!0){this.removeMenuAt(this._menus.indexOf(e),t)}removeMenuAt(e,t=!0){this._closeChildMenu();let r=B.ArrayExt.removeAt(this._menus,e);r&&(r.aboutToClose.disconnect(this._onMenuAboutToClose,this),r.menuRequested.disconnect(this._onMenuMenuRequested,this),r.title.changed.disconnect(this._onTitleChanged,this),r.removeClass("lm-MenuBar-menu"),t&&this.update())}clearMenus(){if(0!==this._menus.length){for(let e of(this._closeChildMenu(),this._menus))e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"focusout":this._evtFocusOut(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(e){this.isAttached&&this._focusItemAt(0)}onResize(e){this.update(),super.onResize(e)}onUpdateRequest(e){var t;let r=this._menus,n=this.renderer,i=this._activeIndex,a=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:r.length,s=0,l=!1,c=Array(o=null!==this._overflowMenu?o-1:o);for(let e=0;e{this._tabFocusIndex=e,this.activeIndex=e}}),s+=this._menuItemSizes[e],r[e].title.label===this._overflowMenuOptions.title&&(l=!0,o--);if(this._overflowMenuOptions.isVisible){if(this._overflowIndex>-1&&!l){if(null===this._overflowMenu){let e=null!=(t=this._overflowMenuOptions.title)?t:"...";this._overflowMenu=new tv({commands:new eM}),this._overflowMenu.title.label=e,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let e=r.length-2;e>=o;e--){let t=this.menus[e];t.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:t}),this.removeMenu(t,!1)}c[o]=n.renderItem({title:this._overflowMenu.title,active:o===i&&0!==r[o].items.length,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}else if(null!==this._overflowMenu){let e=this._overflowMenu.items,t=this.node.offsetWidth,i=this._overflowMenu.items.length;for(let l=0;lthis._menuItemSizes[i]){let t=e[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(o,t,!1),c[o]=n.renderItem({title:t.title,active:!1,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}}0===this._overflowMenu.items.length&&(this.removeMenu(this._overflowMenu,!1),c.pop(),this._overflowMenu=null,this._overflowIndex=-1)}}eN.render(c,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;let e=this.contentNode.childNodes,t=this.node.offsetWidth,r=0,n=-1,i=e.length;if(0==this._menuItemSizes.length)for(let a=0;at&&-1===n&&(n=a)}else for(let e=0;et){n=e;break}this._overflowIndex=n}_evtKeyDown(e){let t=e.keyCode;if(9===t){this.activeIndex=-1;return}if(e.preventDefault(),e.stopPropagation(),13===t||32===t||38===t||40===t){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;this.openActiveMenu();return}if(27===t){this._closeChildMenu(),this._focusItemAt(this.activeIndex);return}if(37===t||39===t){let e=37===t?-1:1,r=this._tabFocusIndex+e,n=this._menus.length;for(let t=0;tZ.hitTest(t,e.clientX,e.clientY));if(-1===t)return void this._closeChildMenu();if(0===e.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=t;else{e.preventDefault();let r=this._positionForMenu(t);tv.saveWindowData(),this.activeIndex=t,this._openChildMenu(r)}}_evtMouseMove(e){let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>Z.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex||-1===t&&this._childMenu)return;let r=t>=0&&this._childMenu?this._positionForMenu(t):null;tv.saveWindowData(),this.activeIndex=t,r&&this._openChildMenu(r)}_positionForMenu(e){let{left:t,bottom:r}=this.contentNode.children[e].getBoundingClientRect();return{top:r,left:t}}_evtFocusOut(e){this._childMenu||this.node.contains(e.relatedTarget)||(this.activeIndex=-1)}_focusItemAt(e){let t=this.contentNode.childNodes[e];t&&t.focus()}_openChildMenu(e={}){let t=this.activeMenu;if(!t)return void this._closeChildMenu();let r=this._childMenu;if(r===t)return;this._childMenu=t,r?r.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,ee.sendMessage(this,eG.Msg.UpdateRequest);let{left:n,top:i}=e;(typeof n>"u"||typeof i>"u")&&({left:n,top:i}=this._positionForMenu(this._activeIndex)),r||this.addClass("lm-mod-active"),t.items.length>0&&t.open(n,i,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}_onMenuAboutToClose(e){e===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(e,t){if(e!==this._childMenu)return;let r=this._activeIndex,n=this._menus.length;switch(t){case"next":this.activeIndex=r===n-1?0:r+1;break;case"previous":this.activeIndex=0===r?n-1:r-1}this.openActiveMenu()}_onTitleChanged(){this.update()}},tW=tG||(tG={});class tY{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),n=this.createItemARIA(e);return ez.li({className:t,dataset:r,...e.disabled?{}:{tabindex:e.tabbable?"0":"-1"},onfocus:e.onfocus,...n},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let t=this.createIconClass(e);return ez.div({className:t},e.title.icon,e.title.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return ez.div({className:"lm-MenuBar-itemLabel"},t)}createItemClass(e){let t="lm-MenuBar-item";return e.title.className&&(t+=` ${e.title.className}`),e.active&&!e.disabled&&(t+=" lm-mod-active"),t}createItemDataset(e){return e.title.dataset}createItemARIA(e){return{role:"menuitem","aria-haspopup":"true","aria-disabled":e.disabled?"true":"false"}}createIconClass(e){let t="lm-MenuBar-itemIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}formatLabel(e){let{label:t,mnemonic:r}=e.title;if(r<0||r>=t.length)return t;let n=t.slice(0,r),i=t.slice(r+1),a=t[r];return[n,ez.span({className:"lm-MenuBar-itemMnemonic"},a),i]}}tW.Renderer=tY,tW.defaultRenderer=new tY,(v=k||(k={})).createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-MenuBar-content",e.appendChild(t),t.setAttribute("role","menubar"),e},v.findMnemonic=function(e,t,r){let n=-1,i=-1,a=!1,o=t.toUpperCase();for(let t=0,s=e.length;t=0&&u1&&this.widgets.forEach(e=>{e.hiddenMode=this._hiddenMode}))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(e,t){this._hiddenMode===eG.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=eG.HiddenMode.Scale),t.hiddenMode=eG.HiddenMode.Scale):t.hiddenMode=eG.HiddenMode.Display,B.ArrayExt.insert(this._items,e,new eJ(t)),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),this.parent.update()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e);this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.widget.node.style.zIndex="",this._hiddenMode===eG.HiddenMode.Scale&&(t.hiddenMode=eG.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=eG.HiddenMode.Display)),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0,t=0;for(let r=0,n=this._items.length;r{this.createGraph(this._model)})}renderModel(e){if(this.hasGraphElement())return Promise.resolve();this._model=e;let t=e.data["image/png"];return null!=t?(this.updateImage(t),Promise.resolve()):this.createGraph(e)}hasGraphElement(){return null!==this.node.querySelector(".plot-container")}updateImage(e){this.hideGraph(),this._img_el.src="data:image/png;base64,"+e,this.showImage()}hideGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="none")}showGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="block")}hideImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="none")}showImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="block")}createGraph(t){let{data:r,layout:n,frames:i,config:a}=t.data[this._mimeType];return n.height||(n.height=360),(async()=>(null===e.Plotly&&(e.Plotly=await Promise.resolve().then(()=>D(F())),e._resolveLoadingPlotly()),e.loadingPlotly))().then(()=>e.Plotly.react(this.node,r,n,a)).then(r=>{this.showGraph(),this.hideImage(),this.update(),i&&e.Plotly.addFrames(this.node,i),this.node.offsetWidth>0&&this.node.offsetHeight>0&&e.Plotly.toImage(r,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then(e=>{let r=e.split(",")[1];t.data["image/png"]!==r&&t.setData({data:{...t.data,"image/png":r}})}),this.node.on("plotly_webglcontextlost",()=>{let e=t.data["image/png"];if(null!=e)return this.updateImage(e),Promise.resolve()})})}onAfterShow(e){this.update()}onResize(e){this.update()}onUpdateRequest(t){e.Plotly&&this.isVisible&&this.hasGraphElement()&&e.Plotly.redraw(this.node).then(()=>{e.Plotly.Plots.resize(this.node)})}static{this.Plotly=null}static{this.loadingPlotly=new Promise(t=>{e._resolveLoadingPlotly=t})}},tK={safe:!0,mimeTypes:[tZ],createRenderer:e=>new t$(e)},tJ=[{id:"@jupyterlab/plotly-extension:factory",rendererFactory:tK,rank:2,dataType:"json",fileTypes:[{name:"plotly",mimeTypes:[tZ],extensions:[".plotly",".plotly.json"],iconClass:"jp-MaterialIcon jp-PlotlyIcon"}],documentWidgetFactoryOptions:{name:"Plotly",primaryFileType:"plotly",fileTypes:["plotly","json"],defaultFor:["plotly"]}}];r.d(t,{MIME_TYPE:()=>tZ,RenderedPlotly:()=>t$,default:()=>tJ,rendererFactory:()=>tK})},3(e){var t,r,n,i=e.exports={};function a(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var l=[],c=!1,u=-1;function h(){c&&n&&(c=!1,n.length?l=n.concat(l):u=-1,l.length&&f())}function f(){if(!c){var e=s(h);c=!0;for(var t=l.length;t;){for(n=l,l=[];++u1)for(var r=1;r()=>(t||e((t={exports:{}}).exports,t),t.exports),O=(e,t,r)=>(r=null!=e?E(I(e)):{},((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of P(t))z.call(e,i)||void 0===i||C(e,i,{get:()=>t[i],enumerable:!(r=L(t,i))||r.enumerable});return e})(!t&&e&&e.__esModule?r:C(r,"default",{value:e,enumerable:!0}),e)),R=D((e,t)=>{var r,i;r=e,i=function(e){var t;function r(e,t){let r=0;for(let i of e)if(!1===t(i,r++))return!1;return!0}e.ArrayExt=void 0,function(e){function t(e,r,i=0,n=-1){let a,o=e.length;if(0===o)return -1;i=i<0?Math.max(0,i+o):Math.min(i,o-1),a=(n=n<0?Math.max(0,n+o):Math.min(n,o-1))=r)return;let i=e[t];for(let i=t+1;i0;){let i=s>>1,n=o+i;0>r(e[n],t)?(o=n+1,s-=i+1):s=i}return o},e.upperBound=function(e,t,r,i=0,n=-1){let a=e.length;if(0===a)return 0;i=i<0?Math.max(0,i+a):Math.min(i,a-1),n=n<0?Math.max(0,n+a):Math.min(n,a-1);let o=i,s=n-i+1;for(;s>0;){let i=s>>1,n=o+i;r(e[n],t)>0?s=i:(o=n+1,s-=i+1)}return o},e.shallowEqual=function(e,t,r){if(e===t)return!0;if(e.length!==t.length)return!1;for(let i=0,n=e.length;i=o&&(i=a<0?o-1:o),void 0===n?n=a<0?-1:o:n<0?n=Math.max(n+o,a<0?-1:0):n>=o&&(n=a<0?o-1:o),r=a<0&&n>=i||a>0&&i>=n?0:a<0?Math.floor((n-i+1)/a+1):Math.floor((n-i-1)/a+1);let s=[];for(let t=0;t=(i=i<0?Math.max(0,i+n):Math.min(i,n-1)))return;let o=i-r+1;if(t>0?t%=o:t<0&&(t=(t%o+o)%o),0===t)return;let s=r+t;a(e,r,s-1),a(e,s,i),a(e,r,i)},e.fill=function(e,t,r=0,i=-1){let n,a=e.length;if(0!==a){r=r<0?Math.max(0,r+a):Math.min(r,a-1),n=(i=i<0?Math.max(0,i+a):Math.min(i,a-1))t;--r)e[r]=e[r-1];e[t]=r},e.removeAt=o,e.removeFirstOf=function(e,r,i=0,n=-1){let a=t(e,r,i,n);return -1!==a&&o(e,a),a},e.removeLastOf=function(e,t,i=-1,n=0){let a=r(e,t,i,n);return -1!==a&&o(e,a),a},e.removeAllOf=function(e,t,r=0,i=-1){let n=e.length;if(0===n)return 0;r=r<0?Math.max(0,r+n):Math.min(r,n-1),i=i<0?Math.max(0,i+n):Math.min(i,n-1);let a=0;for(let o=0;o=r&&o<=i&&e[o]===t||i=r)&&e[o]===t?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=n-a),a},e.removeFirstWhere=function(e,t,r=0,n=-1){let a,s=i(e,t,r,n);return -1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeLastWhere=function(e,t,r=-1,i=0){let a,s=n(e,t,r,i);return -1!==s&&(a=o(e,s)),{index:s,value:a}},e.removeAllWhere=function(e,t,r=0,i=-1){let n=e.length;if(0===n)return 0;r=r<0?Math.max(0,r+n):Math.min(r,n-1),i=i<0?Math.max(0,i+n):Math.min(i,n-1);let a=0;for(let o=0;o=r&&o<=i&&t(e[o],o)||i=r)&&t(e[o],o)?a++:a>0&&(e[o-a]=e[o]);return a>0&&(e.length=n-a),a}}(e.ArrayExt||(e.ArrayExt={})),(t||(t={})).rangeLength=function(e,t,r){return 0===r?1/0:e>t&&r>0||et)}}(e.StringExt||(e.StringExt={})),e.chain=function*(...e){for(let t of e)yield*t},e.each=function(e,t){let r=0;for(let i of e)if(!1===t(i,r++))return},e.empty=function*(){},e.enumerate=function*(e,t=0){for(let r of e)yield[t++,r]},e.every=r,e.filter=function*(e,t){let r=0;for(let i of e)t(i,r++)&&(yield i)},e.find=function(e,t){let r=0;for(let i of e)if(t(i,r++))return i},e.findIndex=function(e,t){let r=0;for(let i of e)if(t(i,r++))return r-1;return -1},e.map=function*(e,t){let r=0;for(let i of e)yield t(i,r++)},e.max=function(e,t){let r;for(let i of e){if(void 0===r){r=i;continue}t(i,r)>0&&(r=i)}return r},e.min=function(e,t){let r;for(let i of e){if(void 0===r){r=i;continue}0>t(i,r)&&(r=i)}return r},e.minmax=function(e,t){let r=!0,i,n;for(let a of e)r?(i=a,n=a,r=!1):0>t(a,i)?i=a:t(a,n)>0&&(n=a);return r?void 0:[i,n]},e.once=function*(e){yield e},e.range=function*(e,r,i){void 0===r?(r=e,e=0,i=1):void 0===i&&(i=1);let n=t.rangeLength(e,r,i);for(let t=0;t-1;t--)yield e[t]},e.some=function(e,t){let r=0;for(let i of e)if(t(i,r++))return!0;return!1},e.stride=function*(e,t){let r=0;for(let i of e)r++%t==0&&(yield i)},e.take=function*(e,t){if(t<1)return;let r=e[Symbol.iterator](),i;for(;0e[Symbol.iterator]()),i=t.map(e=>e.next());for(;r(i,e=>!e.done);i=t.map(e=>e.next()))yield i.map(e=>e.value)}},"object"==typeof e&&"u">typeof t?i(e):"function"==typeof define&&define.amd?define(["exports"],i):i((r="u">typeof globalThis?globalThis:r||self).lumino_algorithm={})}),F=D((e,t)=>{var r,i;r=e,i=function(e,t){let r;e.JSONExt=void 0,function(e){function t(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e}function r(e){return Array.isArray(e)}e.emptyObject=Object.freeze({}),e.emptyArray=Object.freeze([]),e.isPrimitive=t,e.isArray=r;e.isObject=function(e){return!t(e)&&!r(e)},e.deepEqual=function e(i,n){if(i===n)return!0;if(t(i)||t(n))return!1;let a=r(i),o=r(n);return a===o&&(a&&o?function(t,r){if(t===r)return!0;if(t.length!==r.length)return!1;for(let i=0,n=t.length;i{if(i===e.provides)return!0;let o=r.get(i);if(!o)return!1;let s=t.get(o),l=[...s.requires,...s.optional];return 0!==l.length&&(a.push(o),!!l.some(n)||(a.pop(),!1))};if(!e.provides||0===i.length)return;let a=[e.id];if(i.some(n))throw ReferenceError(`Cycle detected: ${a.join(" -> ")}.`)},n.findDependents=function(e,r,i){let n=[],a=e=>{let t=r.get(e),a=[...t.requires,...t.optional];n.push(...a.reduce((t,r)=>{let n=i.get(r);return n&&t.push([e,n]),t},[]))};for(let e of r.keys())a(e);let o=n.filter(t=>t[1]===e),s=0;for(;o.length>s;){let e=o.length;for(let e of new Set(o.map(e=>e[0])))n.filter(t=>t[1]===e).forEach(e=>{o.includes(e)||o.push(e)});s=e}let l=t.topologicSort(o),c=l.findIndex(t=>t===e);return -1===c?[e]:l.slice(0,c+1)},n.collectStartupPlugins=function(e,t){let r=new Set;for(let t of e.keys())!0===e.get(t).autoStart&&r.add(t);if(t.startPlugins)for(let e of t.startPlugins)r.add(e);if(t.ignorePlugins)for(let e of t.ignorePlugins)r.delete(e);return Array.from(r)};e.Random=void 0,(e.Random||(e.Random={})).getRandomValues=(r="u">typeof window&&(window.crypto||window.msCrypto)||null)&&"function"==typeof r.getRandomValues?function(e){return r.getRandomValues(e)}:function(e){let t=0;for(let r=0,i=e.length;r>>0),e[r]=255&t,t>>>=8},e.UUID=void 0,(e.UUID||(e.UUID={})).uuid4=function(e){let t=new Uint8Array(16),r=Array(256);for(let e=0;e<16;++e)r[e]="0"+e.toString(16);for(let e=16;e<256;++e)r[e]=e.toString(16);return function(){return e(t),t[6]=64|15&t[6],t[8]=128|63&t[8],r[t[0]]+r[t[1]]+r[t[2]]+r[t[3]]+"-"+r[t[4]]+r[t[5]]+"-"+r[t[6]]+r[t[7]]+"-"+r[t[8]]+r[t[9]]+"-"+r[t[10]]+r[t[11]]+r[t[12]]+r[t[13]]+r[t[14]]+r[t[15]]}}(e.Random.getRandomValues),e.MimeData=class{constructor(){this._types=[],this._values=[]}types(){return this._types.slice()}hasData(e){return -1!==this._types.indexOf(e)}getData(e){let t=this._types.indexOf(e);return -1!==t?this._values[t]:void 0}setData(e,t){this.clearData(e),this._types.push(e),this._values.push(t)}clearData(e){let t=this._types.indexOf(e);-1!==t&&(this._types.splice(t,1),this._values.splice(t,1))}clear(){this._types.length=0,this._values.length=0}},e.PluginRegistry=class{constructor(e={}){this._application=null,this._validatePlugin=()=>!0,this._plugins=new Map,this._services=new Map,e.validatePlugin&&(console.info("Plugins may be rejected by the custom validation plugin method."),this._validatePlugin=e.validatePlugin)}get application(){return this._application}set application(e){if(null!==this._application)throw Error("PluginRegistry.application is already set. It cannot be overridden.");this._application=e}get deferredPlugins(){return Array.from(this._plugins).filter(([e,t])=>"defer"===t.autoStart).map(([e,t])=>e)}getPluginDescription(e){var t,r;return null!=(r=null==(t=this._plugins.get(e))?void 0:t.description)?r:""}hasPlugin(e){return this._plugins.has(e)}isPluginActivated(e){var t,r;return null!=(r=null==(t=this._plugins.get(e))?void 0:t.activated)&&r}listPlugins(){return Array.from(this._plugins.keys())}registerPlugin(e){if(this._plugins.has(e.id))throw TypeError(`Plugin '${e.id}' is already registered.`);if(!this._validatePlugin(e))throw Error(`Plugin '${e.id}' is not valid.`);let t=i.createPluginData(e);i.ensureNoCycle(t,this._plugins,this._services),t.provides&&this._services.set(t.provides,t.id),this._plugins.set(t.id,t)}registerPlugins(e){for(let t of e)this.registerPlugin(t)}deregisterPlugin(e,t){let r=this._plugins.get(e);if(r){if(r.activated&&!t)throw Error(`Plugin '${e}' is still active.`);this._plugins.delete(e)}}async activatePlugin(e){let t=this._plugins.get(e);if(!t)throw ReferenceError(`Plugin '${e}' is not registered.`);if(t.activated)return;if(t.promise)return t.promise;let r=t.requires.map(e=>this.resolveRequiredService(e)),i=t.optional.map(e=>this.resolveOptionalService(e));return t.promise=Promise.all([...r,...i]).then(e=>t.activate.apply(void 0,[this.application,...e])).then(e=>{t.service=e,t.activated=!0,t.promise=null}).catch(e=>{throw t.promise=null,e}),t.promise}async activatePlugins(e,t={}){switch(e){case"defer":{let e=this.deferredPlugins.filter(e=>this._plugins.get(e).autoStart).map(e=>this.activatePlugin(e));await Promise.all(e);break}case"startUp":{let e=i.collectStartupPlugins(this._plugins,t).map(async e=>{try{return await this.activatePlugin(e)}catch(t){console.error(`Plugin '${e}' failed to activate.`,t)}});await Promise.all(e)}}}async deactivatePlugin(e){let t=this._plugins.get(e);if(!t)throw ReferenceError(`Plugin '${e}' is not registered.`);if(!t.activated)return[];if(!t.deactivate)throw TypeError(`Plugin '${e}'#deactivate() method missing`);let r=i.findDependents(e,this._plugins,this._services),n=r.map(e=>this._plugins.get(e));for(let t of n)if(!t.deactivate)throw TypeError(`Plugin ${t.id}#deactivate() method missing (depends on ${e})`);for(let e of n){let t=[...e.requires,...e.optional].map(e=>{let t=this._services.get(e);return t?this._plugins.get(t).service:null});await e.deactivate(this.application,...t),e.service=null,e.activated=!1}return r.pop(),r}async resolveRequiredService(e){let t=this._services.get(e);if(!t)throw TypeError(`No provider for: ${e.name}.`);let r=this._plugins.get(t);return r.activated||await this.activatePlugin(t),r.service}async resolveOptionalService(e){let t=this._services.get(e);if(!t)return null;let r=this._plugins.get(t);if(!r.activated)try{await this.activatePlugin(t)}catch(e){return console.error(e),null}return r.service}},e.PromiseDelegate=class{constructor(){this.promise=new Promise((e,t)=>{this._resolve=e,this._reject=t})}resolve(e){(0,this._resolve)(e)}reject(e){(0,this._reject)(e)}},e.Token=class{constructor(e,t){this.name=e,this.description=t??"",this._tokenStructuralPropertyT=null}}},"object"==typeof e&&"u">typeof t?i(e,R()):"function"==typeof define&&define.amd?define(["exports","@lumino/algorithm"],i):i((r="u">typeof globalThis?globalThis:r||self).lumino_coreutils={},r.lumino_algorithm)}),j=D((e,t)=>{var r,i;r="u">typeof self?self:e,i=()=>{var e=(()=>{var e=Object.create,t=Object.defineProperty,r=Object.defineProperties,i=Object.getOwnPropertyDescriptor,n=Object.getOwnPropertyDescriptors,a=Object.getOwnPropertyNames,o=Object.getOwnPropertySymbols,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),h=(e,r,i)=>r in e?t(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,d=(e,t)=>{for(var r in t||(t={}))l.call(t,r)&&h(e,r,t[r]);if(o)for(var r of o(t))c.call(t,r)&&h(e,r,t[r]);return e},f=(e,t,r)=>function(){if(r)throw r[0];try{return e&&(t=(0,e[a(e)[0]])(e=0)),t}catch(e){throw r=[e],e}},p=(e,t)=>function(){try{return t||(0,e[a(e)[0]])((t={exports:{}}).exports,t),t.exports}catch(e){throw t=0,e}},m=(e,r)=>{for(var i in r)t(e,i,{get:r[i],enumerable:!0})},g=(e,r,n,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of a(r))l.call(e,s)||s===n||t(e,s,{get:()=>r[s],enumerable:!(o=i(r,s))||o.enumerable});return e},y=(r,i,n)=>(n=null!=r?e(s(r)):{},g(!i&&r&&r.__esModule?n:t(n,"default",{value:r,enumerable:!0}),r)),v=e=>g(t({},"__esModule",{value:!0}),e),x=function(e,t){this[0]=e,this[1]=t},b=e=>{var t,r=e[u("asyncIterator")],i=!1,n={};return null==r?(r=e[u("iterator")](),t=e=>n[e]=t=>r[e](t)):(r=r.call(e),t=e=>n[e]=t=>{if(i){if(i=!1,"throw"===e)throw t;return t}return i=!0,{done:!1,value:new x(new Promise(i=>{var n=r[e](t);n instanceof Object||(e=>{throw TypeError(e)})("Object expected"),i(n)}),1)}}),n[u("iterator")]=()=>n,t("next"),"throw"in r?t("throw"):n.throw=e=>{throw e},"return"in r&&t("return"),n},_=p({"src/version.js"(e){e.version="4.0.0"}}),w=p({"node_modules/native-promise-only/lib/npo.src.js"(e,t){var r,i;r="Promise",i="u">typeof window?window:e,i[r]=i[r]||function(){var e,t,r,i=Object.prototype.toString,n="u">typeof setImmediate?function(e){return setImmediate(e)}:setTimeout;try{Object.defineProperty({},"x",{}),e=function(e,t,r,i){return Object.defineProperty(e,t,{value:r,writable:!0,configurable:!1!==i})}}catch{e=function(e,t,r){return e[t]=r,e}}function a(e,i){r.add(e,i),t||(t=n(r.drain))}function o(e){var t,r=typeof e;return null!=e&&("object"==r||"function"==r)&&(t=e.then),"function"==typeof t&&t}function s(){for(var e=0;e0&&a(s,r))}catch(e){c.call(new h(r),e)}}}function c(e){var t=this;t.triggered||(t.triggered=!0,t.def&&(t=t.def),t.msg=e,t.state=2,t.chain.length>0&&a(s,t))}function u(e,t,r,i){for(var n=0;ntypeof t&&t.exports&&(t.exports=i[r])}}),T=p({"node_modules/@plotly/d3/d3.js"(e,t){(function(){var e={version:"3.8.2"},r=[].slice,i=function(e){return r.call(e)},n=self.document;function a(e){return e&&(e.ownerDocument||e.document||e).documentElement}function o(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(n)try{i(n.documentElement.childNodes)[0].nodeType}catch{i=function(e){for(var t=e.length,r=Array(t);t--;)r[t]=e[t];return r}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch{var s=this.Element.prototype,l=s.setAttribute,c=s.setAttributeNS,u=this.CSSStyleDeclaration.prototype,h=u.setProperty;s.setAttribute=function(e,t){l.call(this,e,t+"")},s.setAttributeNS=function(e,t,r){c.call(this,e,t,r+"")},u.setProperty=function(e,t,r){h.call(this,e,t+"",r)}}function d(e,t){return et?1:e>=t?0:NaN}function f(e){return null===e?NaN:+e}function p(e){return!isNaN(e)}function m(e){return{left:function(t,r,i,n){for(arguments.length<3&&(i=0),arguments.length<4&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(arguments.length<3&&(i=0),arguments.length<4&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}e.ascending=d,e.descending=function(e,t){return te?1:t>=e?0:NaN},e.min=function(e,t){var r,i,n=-1,a=e.length;if(1==arguments.length){for(;++n=i){r=i;break}for(;++ni&&(r=i)}else{for(;++n=i){r=i;break}for(;++ni&&(r=i)}return r},e.max=function(e,t){var r,i,n=-1,a=e.length;if(1==arguments.length){for(;++n=i){r=i;break}for(;++nr&&(r=i)}else{for(;++n=i){r=i;break}for(;++nr&&(r=i)}return r},e.extent=function(e,t){var r,i,n,a=-1,o=e.length;if(1==arguments.length){for(;++a=i){r=n=i;break}for(;++ai&&(r=i),n=i){r=n=i;break}for(;++ai&&(r=i),n1)return o/(l-1)},e.deviation=function(){var t=e.variance.apply(this,arguments);return t&&Math.sqrt(t)};var g=m(d);function y(e){return e.length}e.bisectLeft=g.left,e.bisect=e.bisectRight=g.right,e.bisector=function(e){return m(1===e.length?function(t,r){return d(e(t),r)}:e)},e.shuffle=function(e,t,r){(a=arguments.length)<3&&(r=e.length,a<2&&(t=0));for(var i,n,a=r-t;a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.permute=function(e,t){for(var r=t.length,i=Array(r);r--;)i[r]=e[t[r]];return i},e.pairs=function(e){for(var t=0,r=e.length-1,i=e[0],n=Array(r<0?0:r);t=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r};var v=Math.abs;function x(e,t){for(var r in t)Object.defineProperty(e.prototype,r,{value:t[r],enumerable:!1})}function b(){this._=Object.create(null)}function _(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function w(e){return"\0"===(e+="")[0]?e.slice(1):e}function T(e){return _(e)in this._}function M(e){return(e=_(e))in this._&&delete this._[e]}function k(){var e=[];for(var t in this._)e.push(w(t));return e}function A(){var e=0;for(var t in this._)++e;return e}function S(){for(var e in this._)return!1;return!0}function E(){this._=Object.create(null)}function C(e){return e}function L(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var r=0,i=P.length;rt;)n.push(i/a);else for(;(i=e+r*++o)=n.length)return r?r.call(i,a):t?a.sort(t):a;for(var l,c,u,h,d=-1,f=a.length,p=n[s++],m=new b;++d=n.length)return t;var i=[],o=a[r++];return t.forEach(function(t,n){i.push({key:t,values:e(n,r)})}),o?i.sort(function(e,t){return o(e.key,t.key)}):i}(o(e.map,t,0),0)},i.key=function(e){return n.push(e),i},i.sortKeys=function(e){return a[n.length-1]=e,i},i.sortValues=function(e){return t=e,i},i.rollup=function(e){return r=e,i},i},e.set=function(e){var t=new E;if(e)for(var r=0,i=e.length;r=0&&(i=e.slice(r+1),e=e.slice(0,r)),e)return arguments.length<2?this[e].on(i):this[e].on(i,t);if(2==arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(i,null);return this}},e.event=null,e.requote=function(e){return e.replace(j,"\\$&")};var j=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,B={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var r in t)e[r]=t[r]};function N(e){return B(e,H),e}var U=function(e,t){return t.querySelector(e)},V=function(e,t){return t.querySelectorAll(e)},q=function(e,t){var r=e.matches||e[L(e,"matchesSelector")];return(q=function(e,t){return r.call(e,t)})(e,t)};"function"==typeof Sizzle&&(U=function(e,t){return Sizzle(e,t)[0]||null},V=Sizzle,q=Sizzle.matchesSelector),e.selection=function(){return e.select(n.documentElement)};var H=e.selection.prototype=[];function G(e){return"function"==typeof e?e:function(){return U(e,this)}}function W(e){return"function"==typeof e?e:function(){return V(e,this)}}H.select=function(e){var t,r,i,n,a=[];e=G(e);for(var o=-1,s=this.length;++o=0&&"xmlns"!==(r=e.slice(0,t))&&(e=e.slice(t+1)),Z.hasOwnProperty(r)?{space:Z[r],local:e}:e}},H.attr=function(t,r){if(arguments.length<2){if("string"==typeof t){var i=this.node();return(t=e.ns.qualify(t)).local?i.getAttributeNS(t.space,t.local):i.getAttribute(t)}for(r in t)this.each($(r,t[r]));return this}return this.each($(t,r))},H.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var r=this.node(),i=(e=J(e)).length,n=-1;if(t=r.classList){for(;++n=0;)(r=i[n])&&(a&&a!==r.nextSibling&&a.parentNode.insertBefore(r,a),a=r);return this},H.sort=function(e){e=es.apply(this,arguments);for(var t=-1,r=this.length;++t0&&(t=t.slice(0,o));var l=ed.get(t);function c(){var e=this[a];e&&(this.removeEventListener(t,e,e.$),delete this[a])}return l&&(t=l,s=ep),o?r?function(){var e=s(r,i(arguments));c.call(this),this.addEventListener(t,this[a]=e,e.$=n),e._=r}:c:r?I:function(){var r,i=RegExp("^__on([^.]+)"+e.requote(t)+"$");for(var n in this)if(r=n.match(i)){var a=this[n];this.removeEventListener(r[1],a,a.$),delete this[n]}}}e.selection.enter=ec,e.selection.enter.prototype=eu,eu.append=H.append,eu.empty=H.empty,eu.node=H.node,eu.call=H.call,eu.size=H.size,eu.select=function(e){for(var t,r,i,n,a,o=[],s=-1,l=this.length;++s=i&&(i=t+1);!(o=s[i])&&++i1?ek:e<-1?-ek:Math.asin(e)}function eC(e){return((e=Math.exp(e))+1/e)/2}var eL=Math.SQRT2;e.interpolateZoom=function(e,t){var r,i,n=e[0],a=e[1],o=e[2],s=t[0],l=t[1],c=t[2],u=s-n,h=l-a,d=u*u+h*h;if(d0&&(t=t.transition().duration(m)),t.call(w.event)}function S(){c&&c.domain(l.range().map(function(e){return(e-d.x)/d.k}).map(l.invert)),h&&h.domain(u.range().map(function(e){return(e-d.y)/d.k}).map(u.invert))}function E(e){g++||e({type:"zoomstart"})}function C(e){S(),e({type:"zoom",scale:d.k,translate:[d.x,d.y]})}function L(e){--g||(e({type:"zoomend"}),r=null)}function P(){var t=this,r=_.of(t,arguments),i=0,n=e.select(o(t)).on(v,function(){i=1,k(e.mouse(t),a),C(r)}).on(x,function(){n.on(v,null).on(x,null),s(i),L(r)}),a=T(e.mouse(t)),s=ey(t);iW.call(t),E(r)}function I(){var t,r=this,i=_.of(r,arguments),n={},a=0,o=".zoom-"+e.event.changedTouches[0].identifier,l="touchmove"+o,c="touchend"+o,u=[],h=e.select(r),f=ey(r);function p(){var i=e.touches(r);return t=d.k,i.forEach(function(e){e.identifier in n&&(n[e.identifier]=T(e))}),i}function m(){var t=e.event.target;e.select(t).on(l,g).on(c,v),u.push(t);for(var i=e.event.changedTouches,o=0,h=i.length;o1){var y=f[0],x=f[1],b=y[0]-x[0],_=y[1]-x[1];a=b*b+_*_}}function g(){var o,l,c,u,h=e.touches(r);iW.call(r);for(var d=0,f=h.length;d360?t-=360:t<0&&(t+=360),t<60?i+(n-i)*t/60:t<180?n:t<240?i+(n-i)*(240-t)/60:i))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,n=(r=r<0?0:r>1?1:r)<=.5?r*(1+t):r+t-r*t,i=2*r-n,new e$(a(e+120),a(e),a(e-120))}function ej(t,r,i){return this instanceof ej?(this.h=+t,this.c=+r,void(this.l=+i)):arguments.length<2?t instanceof ej?new ej(t.h,t.c,t.l):t instanceof eU?eG(t.l,t.a,t.b):eG((t=e2((t=e.rgb(t)).r,t.g,t.b)).l,t.a,t.b):new ej(t,r,i)}eR.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new eO(this.h,this.s,this.l/e)},eR.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new eO(this.h,this.s,e*this.l)},eR.rgb=function(){return eF(this.h,this.s,this.l)},e.hcl=ej;var eB=ej.prototype=new eD;function eN(e,t,r){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new eU(r,Math.cos(e*=eA)*t,Math.sin(e)*t)}function eU(e,t,r){return this instanceof eU?(this.l=+e,this.a=+t,void(this.b=+r)):arguments.length<2?e instanceof eU?new eU(e.l,e.a,e.b):e instanceof ej?eN(e.h,e.c,e.l):e2((e=e$(e)).r,e.g,e.b):new eU(e,t,r)}eB.brighter=function(e){return new ej(this.h,this.c,Math.min(100,this.l+eV*(arguments.length?e:1)))},eB.darker=function(e){return new ej(this.h,this.c,Math.max(0,this.l-eV*(arguments.length?e:1)))},eB.rgb=function(){return eN(this.h,this.c,this.l).rgb()},e.lab=eU;var eV=18,eq=eU.prototype=new eD;function eH(e,t,r){var i=(e+16)/116,n=i+t/500,a=i-r/200;return n=.95047*eW(n),new e$(eZ(3.2404542*n-1.5371385*(i=+eW(i))-.4985314*(a=1.08883*eW(a))),eZ(-.969266*n+1.8760108*i+.041556*a),eZ(.0556434*n-.2040259*i+1.0572252*a))}function eG(e,t,r){return e>0?new ej(Math.atan2(r,t)*eS,Math.sqrt(t*t+r*r),e):new ej(NaN,NaN,e)}function eW(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function eY(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function eZ(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function e$(e,t,r){return this instanceof e$?(this.r=~~e,this.g=~~t,void(this.b=~~r)):arguments.length<2?e instanceof e$?new e$(e.r,e.g,e.b):e0(""+e,e$,eF):new e$(e,t,r)}function eX(e){return new e$(e>>16,e>>8&255,255&e)}function eK(e){return eX(e)+""}eq.brighter=function(e){return new eU(Math.min(100,this.l+eV*(arguments.length?e:1)),this.a,this.b)},eq.darker=function(e){return new eU(Math.max(0,this.l-eV*(arguments.length?e:1)),this.a,this.b)},eq.rgb=function(){return eH(this.l,this.a,this.b)},e.rgb=e$;var eJ=e$.prototype=new eD;function eQ(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function e0(e,t,r){var i,n,a,o=0,s=0,l=0;if(i=/([a-z]+)\((.*)\)/.exec(e=e.toLowerCase()))switch(n=i[2].split(","),i[1]){case"hsl":return r(parseFloat(n[0]),parseFloat(n[1])/100,parseFloat(n[2])/100);case"rgb":return t(e5(n[0]),e5(n[1]),e5(n[2]))}return(a=e4.get(e))?t(a.r,a.g,a.b):(null==e||"#"!==e.charAt(0)||isNaN(a=parseInt(e.slice(1),16))||(4===e.length?(o=(o=(3840&a)>>4)>>4|o,s=(s=240&a)>>4|s,l=(l=15&a)<<4|l):7===e.length&&(o=(0xff0000&a)>>16,s=(65280&a)>>8,l=255&a)),t(o,s,l))}function e1(e,t,r){var i,n,a=Math.min(e/=255,t/=255,r/=255),o=Math.max(e,t,r),s=o-a,l=(o+a)/2;return s?(n=l<.5?s/(o+a):s/(2-o-a),i=(e==o?(t-r)/s+6*(t0&&l<1?0:i),new eO(i,n,l)}function e2(e,t,r){e=e3(e);var i=eY((.4124564*e+.3575761*(t=e3(t))+.1804375*(r=e3(r)))/.95047),n=eY((.2126729*e+.7151522*t+.072175*r)/1);return eU(116*n-16,500*(i-n),200*(n-eY((.0193339*e+.119192*t+.9503041*r)/1.08883)))}function e3(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function e5(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}eJ.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,r=this.g,i=this.b;return t||r||i?(t&&t<30&&(t=30),r&&r<30&&(r=30),i&&i<30&&(i=30),new e$(Math.min(255,t/e),Math.min(255,r/e),Math.min(255,i/e))):new e$(30,30,30)},eJ.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new e$(e*this.r,e*this.g,e*this.b)},eJ.hsl=function(){return e1(this.r,this.g,this.b)},eJ.toString=function(){return"#"+eQ(this.r)+eQ(this.g)+eQ(this.b)};var e4=e.map({aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32});function e6(e){return"function"==typeof e?e:function(){return e}}function e8(e){return function(t,r,i){return 2==arguments.length&&"function"==typeof r&&(i=r,r=null),e7(t,r,e,i)}}function e7(t,r,n,a){var o,s={},l=e.dispatch("beforesend","progress","load","error"),c={},u=new XMLHttpRequest,h=null;function d(){var e,t,r,i=u.status;if(!i&&((t=(e=u).responseType)&&"text"!==t?e.response:e.responseText)||i>=200&&i<300||304===i){try{r=n.call(s,u)}catch(e){l.error.call(s,e);return}l.load.call(s,r)}else l.error.call(s,u)}return self.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(t)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=d:u.onreadystatechange=function(){u.readyState>3&&d()},u.onprogress=function(t){var r=e.event;e.event=t;try{l.progress.call(s,u)}finally{e.event=r}},s.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?c[e]:(null==t?delete c[e]:c[e]=t+"",s)},s.mimeType=function(e){return arguments.length?(r=null==e?null:e+"",s):r},s.responseType=function(e){return arguments.length?(h=e,s):h},s.response=function(e){return n=e,s},["get","post"].forEach(function(e){s[e]=function(){return s.send.apply(s,[e].concat(i(arguments)))}}),s.send=function(e,i,n){if(2==arguments.length&&"function"==typeof i&&(n=i,i=null),u.open(e,t,!0),null==r||"accept"in c||(c.accept=r+",*/*"),u.setRequestHeader)for(var a in c)u.setRequestHeader(a,c[a]);return null!=r&&u.overrideMimeType&&u.overrideMimeType(r),null!=h&&(u.responseType=h),null!=n&&s.on("error",n).on("load",function(e){n(null,e)}),l.beforesend.call(s,u),u.send(i??null),s},s.abort=function(){return u.abort(),s},e.rebind(s,l,"on"),null==a?s:s.get(1===(o=a).length?function(e,t){o(null==e?t:null)}:o)}e4.forEach(function(e,t){e4.set(e,eX(t))}),e.functor=e6,e.xhr=e8(C),e.dsv=function(e,t){var r=RegExp('["'+e+` +]`),i=e.charCodeAt(0);function n(e,r,i){arguments.length<3&&(i=r,r=null);var n=e7(e,t,null==r?a:o(r),i);return n.row=function(e){return arguments.length?n.response(null==(r=e)?a:o(e)):r},n}function a(e){return n.parse(e.responseText)}function o(e){return function(t){return n.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return r.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return n.parse=function(e,t){var r;return n.parseRows(e,function(e,i){if(r)return r(e,i-1);var n=function(t){for(var r={},i=e.length,n=0;n=l)return o;if(n)return n=!1,a;var t=c;if(34===e.charCodeAt(t)){for(var r=t;r++24?(isFinite(t)&&(clearTimeout(tr),tr=setTimeout(ta,t)),tt=0):(tt=1,ti(ta))}function to(){for(var e=Date.now(),t=e9;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function ts(){for(var e,t=e9,r=1/0;t;)t.c?(t.t1&&0>=(t=e[a[o-2]],r=e[a[o-1]],i=e[s],(r[0]-t[0])*(i[1]-t[1])-(r[1]-t[1])*(i[0]-t[0]));)--o;a[o++]=s}return a.slice(0,o)}function th(e,t){return e[0]-t[0]||e[1]-t[1]}e.timer=function(){tn.apply(this,arguments)},e.timer.flush=function(){to(),ts()},e.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},e.geom={},e.geom.hull=function(e){var t=tl,r=tc;if(arguments.length)return i(e);function i(e){if(e.length<3)return[];var i,n=e6(t),a=e6(r),o=e.length,s=[],l=[];for(i=0;i=0;--i)f.push(e[s[c[i]][2]]);for(i=+h;i=-e_)){var f=l*l+c*c,p=u*u+h*h,m=(h*f-c*p)/d,g=(l*p-u*f)/d,h=g+s,y=tw.pop()||new tC;y.arc=e,y.site=n,y.x=m+o,y.y=h+Math.sqrt(m*m+g*g),y.cy=h,e.circle=y;for(var v=null,x=tb._;x;)if(y.y1e-6)s=s.L;else if((n=a-function(e,t){var r=e.N;if(r)return tA(r,t);var i=e.site;return i.y===t?i.x:1/0}(s,o))>1e-6){if(!s.R){t=s;break}s=s.R}else{i>-1e-6?(t=s.P,r=s):n>-1e-6?(t=s,r=s.N):t=r=s;break}var l=tM(e);if(tv.insert(t,l),!(!t&&!r)){if(t===r){tP(t),r=tM(t.site),tv.insert(l,r),l.edge=r.edge=tz(t.site,l.site),tL(t),tL(r);return}if(!r){l.edge=tz(t.site,l.site);return}tP(t),tP(r);var c=t.site,u=c.x,h=c.y,d=e.x-u,f=e.y-h,p=r.site,m=p.x-u,g=p.y-h,y=2*(d*g-f*m),v=d*d+f*f,x=m*m+g*g,b={x:(g*v-f*x)/y+u,y:(d*x-m*v)/y+h};tD(r.edge,c,p,b),l.edge=tz(c,e,null,b),r.edge=tz(e,p,null,b),tL(t),tL(r)}}(a),r=a.x,i=a.y),a=e.pop();else if(n)!function(e){var t=e.circle,r=t.x,i=t.cy,n={x:r,y:i},a=e.P,o=e.N,s=[e];tk(e);for(var l=a;l.circle&&1e-6>v(r-l.circle.x)&&1e-6>v(i-l.circle.cy);)a=l.P,s.unshift(l),tk(l),l=a;s.unshift(l),tP(l);for(var c=o;c.circle&&1e-6>v(r-c.circle.x)&&1e-6>v(i-c.circle.cy);)o=c.N,s.push(c),tk(c),c=o;s.push(c),tP(c);var u,h=s.length;for(u=1;u0)){if(a/=p,p<0){if(a0){if(a>f)return;a>d&&(d=a)}if(a=i-l,!(!p&&a<0)){if(a/=p,p<0){if(a>f)return;a>d&&(d=a)}else if(p>0){if(a0)){if(a/=m,m<0){if(a0){if(a>f)return;a>d&&(d=a)}if(a=n-c,!(!m&&a<0)){if(a/=m,m<0){if(a>f)return;a>d&&(d=a)}else if(m>0){if(a0&&(e.a={x:l+d*p,y:c+d*m}),f<1&&(e.b={x:l+f*p,y:c+f*m}),e}}}}}),l=o.length;l--;)(!function(e,t){var r=e.b;if(r)return!0;var i,n,a=e.a,o=t[0][0],s=t[1][0],l=t[0][1],c=t[1][1],u=e.l,h=e.r,d=u.x,f=u.y,p=h.x,m=h.y,g=(d+p)/2;if(m===f){if(g=s)return;if(d>p){if(a){if(a.y>=c)return}else a={x:g,y:l};r={x:g,y:c}}else{if(a){if(a.y1)if(d>p){if(a){if(a.y>=c)return}else a={x:(l-n)/i,y:l};r={x:(c-n)/i,y:c}}else{if(a){if(a.y=s)return}else a={x:o,y:i*o+n};r={x:s,y:i*s+n}}else{if(a){if(a.xv(a.a.x-a.b.x)&&1e-6>v(a.a.y-a.b.y))&&(a.a=a.b=null,o.splice(l,1))}(t),function(e){for(var t,r,i,n,a,o,s,l,c,u,h=e[0][0],d=e[1][0],f=e[0][1],p=e[1][1],m=ty,g=m.length;g--;)if(!(!(a=m[g])||!a.prepare()))for(l=(s=a.edges).length,o=0;o1e-6||v(n-r)>1e-6)&&(s.splice(o,0,new tO(function(e,t,r){var i=new tI(e,null);return i.a=t,i.b=r,tg.push(i),i}(a.site,u,1e-6>v(i-h)&&p-n>1e-6?{x:h,y:1e-6>v(t-h)?r:p}:1e-6>v(n-p)&&d-i>1e-6?{x:1e-6>v(r-p)?t:d,y:p}:1e-6>v(i-d)&&n-f>1e-6?{x:d,y:1e-6>v(t-d)?r:f}:1e-6>v(n-f)&&i-h>1e-6?{x:1e-6>v(r-f)?t:h,y:f}:null),a.site,null)),++l)}(t));var o={cells:ty,edges:tg};return tv=tb=tg=ty=null,o}function tV(e,t){return t.y-e.y||t.x-e.x}tS.prototype.prepare=function(){for(var e,t=this.edges,r=t.length;r--;)(e=t[r].edge).b&&e.a||t.splice(r,1);return t.sort(tE),t.length},tO.prototype={start:function(){return this.edge.l===this.site?this.edge.a:this.edge.b},end:function(){return this.edge.l===this.site?this.edge.b:this.edge.a}},tR.prototype={insert:function(e,t){var r,i,n;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;r=e}else this._?(e=tN(this._),t.P=null,t.N=e,e.P=e.L=t,r=e):(t.P=t.N=null,this._=t,r=null);for(t.L=t.R=null,t.U=r,t.C=!0,e=t;r&&r.C;)i=r.U,r===i.L?(n=i.R)&&n.C?(r.C=n.C=!1,i.C=!0,e=i):(e===r.R&&(tj(this,r),r=(e=r).U),r.C=!1,i.C=!0,tB(this,i)):(n=i.L)&&n.C?(r.C=n.C=!1,i.C=!0,e=i):(e===r.L&&(tB(this,r),r=(e=r).U),r.C=!1,i.C=!0,tj(this,i)),r=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,r,i,n=e.U,a=e.L,o=e.R;if(r=a?o?tN(o):a:o,n?n.L===e?n.L=r:n.R=r:this._=r,a&&o?(i=r.C,r.C=e.C,r.L=a,a.U=r,r!==o?(n=r.U,r.U=e.U,e=r.R,n.L=e,r.R=o,o.U=r):(r.U=n,n=r,e=r.R)):(i=e.C,e=r),e&&(e.U=n),!i){if(e&&e.C){e.C=!1;return}do{if(e===this._)break;if(e===n.L){if((t=n.R).C&&(t.C=!1,n.C=!0,tj(this,n),t=n.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,tB(this,t),t=n.R),t.C=n.C,n.C=t.R.C=!1,tj(this,n),e=this._;break}}else if((t=n.L).C&&(t.C=!1,n.C=!0,tB(this,n),t=n.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,tj(this,t),t=n.L),t.C=n.C,n.C=t.L.C=!1,tB(this,n),e=this._;break}t.C=!0,e=n,n=n.U}while(!e.C);e&&(e.C=!1)}}},e.geom.voronoi=function(e){var t=tl,r=tc,i=t,n=r,a=tq;if(e)return o(e);function o(e){var t=Array(e.length),r=a[0][0],i=a[0][1],n=a[1][0],o=a[1][1];return tU(s(e),a).cells.forEach(function(a,s){var l=a.edges,c=a.site;(t[s]=l.length?l.map(function(e){var t=e.start();return[t.x,t.y]}):c.x>=r&&c.x<=n&&c.y>=i&&c.y<=o?[[r,o],[n,o],[n,i],[r,i]]:[]).point=e[s]}),t}function s(e){return e.map(function(e,t){return{x:1e-6*Math.round(i(e,t)/1e-6),y:1e-6*Math.round(n(e,t)/1e-6),i:t}})}return o.links=function(e){return tU(s(e)).edges.filter(function(e){return e.l&&e.r}).map(function(t){return{source:e[t.l.i],target:e[t.r.i]}})},o.triangles=function(e){var t=[];return tU(s(e)).cells.forEach(function(r,i){for(var n,a,o,s,l=r.site,c=r.edges.sort(tE),u=-1,h=c.length,d=c[h-1].edge,f=d.l===l?d.r:d.l;++u(n=l,a=s,o=f,(n.x-o.x)*(a.y-n.y)-(n.x-a.x)*(o.y-n.y))&&t.push([e[i],e[s.i],e[f.i]])}}),t},o.x=function(e){return arguments.length?(i=e6(t=e),o):t},o.y=function(e){return arguments.length?(n=e6(r=e),o):r},o.clipExtent=function(e){return arguments.length?(a=e??tq,o):a===tq?null:a},o.size=function(e){return arguments.length?o.clipExtent(e&&[[0,0],e]):a===tq?null:a&&a[1]},o};var tq=[[-1e6,-1e6],[1e6,1e6]];function tH(e){return e.x}function tG(e){return e.y}function tW(){return{leaf:!0,nodes:[],point:null,x:null,y:null}}function tY(t,r){t=e.rgb(t),r=e.rgb(r);var i=t.r,n=t.g,a=t.b,o=r.r-i,s=r.g-n,l=r.b-a;return function(e){return"#"+eQ(Math.round(i+o*e))+eQ(Math.round(n+s*e))+eQ(Math.round(a+l*e))}}function tZ(e,t){var r,i={},n={};for(r in e)r in t?i[r]=tQ(e[r],t[r]):n[r]=e[r];for(r in t)r in e||(n[r]=t[r]);return function(e){for(r in i)n[r]=i[r](e);return n}}function t$(e,t){return e*=1,t*=1,function(r){return e*(1-r)+t*r}}function tX(e,t){var r,i,n,a=tK.lastIndex=tJ.lastIndex=0,o=-1,s=[],l=[];for(e+="",t+="";(r=tK.exec(e))&&(i=tJ.exec(t));)(n=i.index)>a&&(n=t.slice(a,n),s[o]?s[o]+=n:s[++o]=n),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,l.push({i:o,x:t$(r,i)})),a=tJ.lastIndex;return am&&(m=l.x),l.y>g&&(g=l.y),c.push(l.x),u.push(l.y);else for(h=0;hm&&(m=b),_>g&&(g=_),c.push(b),u.push(_)}var w=m-f,T=g-p;function M(e,t,r,i,n,a,o,s){if(!(isNaN(r)||isNaN(i)))if(e.leaf){var l=e.x,c=e.y;if(null!=l)if(v(l-r)+v(c-i)<.01)k(e,t,r,i,n,a,o,s);else{var u=e.point;e.x=e.y=e.point=null,k(e,u,l,c,n,a,o,s),k(e,t,r,i,n,a,o,s)}else e.x=r,e.y=i,e.point=t}else k(e,t,r,i,n,a,o,s)}function k(e,t,r,i,n,a,o,s){var l=(n+o)*.5,c=(a+s)*.5,u=r>=l,h=i>=c,d=h<<1|u;e.leaf=!1,e=e.nodes[d]||(e.nodes[d]=tW()),u?n=l:o=l,h?a=c:s=c,M(e,t,r,i,n,a,o,s)}w>T?g=p+w:m=f+T;var A=tW();if(A.add=function(e){M(A,e,+y(e,++h),+x(e,h),f,p,m,g)},A.visit=function(e){!function e(t,r,i,n,a,o){if(!t(r,i,n,a,o)){var s=(i+a)*.5,l=(n+o)*.5,c=r.nodes;c[0]&&e(t,c[0],i,n,s,l),c[1]&&e(t,c[1],s,n,a,l),c[2]&&e(t,c[2],i,l,s,o),c[3]&&e(t,c[3],s,l,a,o)}}(e,A,f,p,m,g)},A.find=function(e){var t,r,i,n,a,o,s,l,c;return t=A,r=e[0],i=e[1],c=1/0,function e(t,u,h,d,f){if(!(u>o||h>s||d=b,T=i>=_,M=T<<1|w,k=M+4;M=0&&!(i=e.interpolators[n](t,r)););return i}function t0(e,t){var r,i=[],n=[],a=e.length,o=t.length,s=Math.min(e.length,t.length);for(r=0;r=1)return 1;var t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function t9(e){return 1-Math.cos(e*ek)}function re(e){return Math.pow(2,10*(e-1))}function rt(e){return 1-Math.sqrt(1-e*e)}function rr(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function ri(e,t){return t-=e,function(r){return Math.round(e+t*r)}}function rn(e){var t,r,i,n=[e.a,e.b],a=[e.c,e.d],o=ro(n),s=ra(n,a),l=ro((t=a,r=n,i=-s,t[0]+=i*r[0],t[1]+=i*r[1],t))||0;n[0]*a[1]=0?e.slice(0,i):e,a=i>=0?e.slice(i+1):"in";return n=t2.get(n)||t1,t=(a=t3.get(a)||C)(n.apply(null,r.call(arguments,1))),function(e){return e<=0?0:e>=1?1:t(e)}},e.interpolateHcl=function(t,r){t=e.hcl(t),r=e.hcl(r);var i=t.h,n=t.c,a=t.l,o=r.h-i,s=r.c-n,l=r.l-a;return isNaN(s)&&(s=0,n=isNaN(n)?r.c:n),isNaN(o)?(o=0,i=isNaN(i)?r.h:i):o>180?o-=360:o<-180&&(o+=360),function(e){return eN(i+o*e,n+s*e,a+l*e)+""}},e.interpolateHsl=function(t,r){t=e.hsl(t),r=e.hsl(r);var i=t.h,n=t.s,a=t.l,o=r.h-i,s=r.s-n,l=r.l-a;return isNaN(s)&&(s=0,n=isNaN(n)?r.s:n),isNaN(o)?(o=0,i=isNaN(i)?r.h:i):o>180?o-=360:o<-180&&(o+=360),function(e){return eF(i+o*e,n+s*e,a+l*e)+""}},e.interpolateLab=function(t,r){t=e.lab(t),r=e.lab(r);var i=t.l,n=t.a,a=t.b,o=r.l-i,s=r.a-n,l=r.b-a;return function(e){return eH(i+o*e,n+s*e,a+l*e)+""}},e.interpolateRound=ri,e.transform=function(t){var r=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(e){if(null!=e){r.setAttribute("transform",e);var t=r.transform.baseVal.consolidate()}return new rn(t?t.matrix:rs)})(t)},rn.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var rs={a:1,b:0,c:0,d:1,e:0,f:0};function rl(e){return e.length?e.pop()+",":""}function rc(t,r){var i,n,a,o,s=[],l=[];return t=e.transform(t),r=e.transform(r),function(e,t,r,i){if(e[0]!==t[0]||e[1]!==t[1]){var n=r.push("translate(",null,",",null,")");i.push({i:n-4,x:t$(e[0],t[0])},{i:n-2,x:t$(e[1],t[1])})}else(t[0]||t[1])&&r.push("translate("+t+")")}(t.translate,r.translate,s,l),i=t.rotate,n=r.rotate,i!==n?(i-n>180?n+=360:n-i>180&&(i+=360),l.push({i:s.push(rl(s)+"rotate(",null,")")-2,x:t$(i,n)})):n&&s.push(rl(s)+"rotate("+n+")"),a=t.skew,o=r.skew,a!==o?l.push({i:s.push(rl(s)+"skewX(",null,")")-2,x:t$(a,o)}):o&&s.push(rl(s)+"skewX("+o+")"),function(e,t,r,i){if(e[0]!==t[0]||e[1]!==t[1]){var n=r.push(rl(r)+"scale(",null,",",null,")");i.push({i:n-4,x:t$(e[0],t[0])},{i:n-2,x:t$(e[1],t[1])})}else(1!==t[0]||1!==t[1])&&r.push(rl(r)+"scale("+t+")")}(t.scale,r.scale,s,l),t=r=null,function(e){for(var t,r=-1,i=l.length;++r0?i=e:(t.c=null,t.t=NaN,t=null,l.end({type:"end",alpha:i=0})):e>0&&(l.start({type:"start",alpha:i=e}),t=tn(s.tick)),s):i},s.start=function(){var e,t,r,i=y.length,l=v.length,u=c[0],p=c[1];for(e=0;e=0;)n.push(i[r])}function rw(e,t){for(var r=[e],i=[];null!=(e=r.pop());)if(i.push(e),(a=e.children)&&(n=a.length))for(var n,a,o=-1;++o=0;)c.push(s=o[a]),s.parent=l,s.depth=l.depth+1;r&&(l.value=0),l.children=o}else r&&(l.value=+r.call(i,l,l.depth)||0),delete l.children;return rw(n,function(t){var i,n;e&&(i=t.children)&&i.sort(e),r&&(n=t.parent)&&(n.value+=t.value)}),u}return i.sort=function(t){return arguments.length?(e=t,i):e},i.children=function(e){return arguments.length?(t=e,i):t},i.value=function(e){return arguments.length?(r=e,i):r},i.revalue=function(e){return r&&(r_(e,function(e){e.children&&(e.value=0)}),rw(e,function(e){var t;e.children||(e.value=+r.call(i,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)})),e},i},e.layout.partition=function(){var t=e.layout.hierarchy(),r=[1,1];function i(e,i){var n=t.call(this,e,i);return function e(t,r,i,n){var a=t.children;if(t.x=r,t.y=t.depth*n,t.dx=i,t.dy=n,a&&(o=a.length)){var o,s,l,c=-1;for(i=t.value?i/t.value:0;++cs&&(s=i),o.push(i)}for(r=0;rn&&(i=r,n=t);return i}function rR(e){return e.reduce(rF,0)}function rF(e,t){return e+t[1]}function rj(e,t){return rB(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function rB(e,t){for(var r=-1,i=+e[0],n=(e[1]-i)/t,a=[];++r<=t;)a[r]=n*r+i;return a}function rN(t){return[e.min(t),e.max(t)]}function rU(e,t){return e.value-t.value}function rV(e,t){var r=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=r,r._pack_prev=t}function rq(e,t){e._pack_next=t,t._pack_prev=e}function rH(e,t){var r=t.x-e.x,i=t.y-e.y,n=e.r+t.r;return .999*n*n>r*r+i*i}function rG(e){if((t=e.children)&&(l=t.length)){var t,r,i,n,a,o,s,l,c=1/0,u=-1/0,h=1/0,d=-1/0;if(t.forEach(rW),(r=t[0]).x=-r.r,r.y=0,x(r),l>1&&((i=t[1]).x=i.r,i.y=0,x(i),l>2))for(rZ(r,i,n=t[2]),x(n),rV(r,n),r._pack_prev=n,rV(n,i),i=r._pack_next,a=3;a0)for(o=-1;++o=h[0]&&l<=h[1]&&(s=c[e.bisect(d,l,1,p)-1],s.y+=m,s.push(a[o]));return c}return a.value=function(e){return arguments.length?(r=e,a):r},a.range=function(e){return arguments.length?(i=e6(e),a):i},a.bins=function(e){return arguments.length?(n="number"==typeof e?function(t){return rB(t,e)}:e6(e),a):n},a.frequency=function(e){return arguments.length?(t=!!e,a):t},a},e.layout.pack=function(){var t,r=e.layout.hierarchy().sort(rU),i=0,n=[1,1];function a(e,a){var o=r.call(this,e,a),s=o[0],l=n[0],c=n[1],u=null==t?Math.sqrt:"function"==typeof t?t:function(){return t};if(s.x=s.y=0,rw(s,function(e){e.r=+u(e.value)}),rw(s,rG),i){var h=i*(t?1:Math.max(2*s.r/l,2*s.r/c))/2;rw(s,function(e){e.r+=h}),rw(s,rG),rw(s,function(e){e.r-=h})}return function e(t,r,i,n){var a=t.children;if(t.x=r+=n*t.x,t.y=i+=n*t.y,t.r*=n,a)for(var o=-1,s=a.length;++of.x&&(f=e),e.depth>p.depth&&(p=e)});var m=r(d,f)/2-d.x,g=i[0]/(f.x+r(f,d)/2+m),y=i[1]/(p.depth||1);r_(u,function(e){e.x=(e.x+m)*g,e.y=e.depth*y})}return c}function o(e){var t=e.children,i=e.parent.children,n=e.i?i[e.i-1]:null;if(t.length){!function(e){for(var t,r=0,i=0,n=e.children,a=n.length;--a>=0;)t=n[a],t.z+=r,t.m+=r,r+=t.s+(i+=t.c)}(e);var a=(t[0].z+t[t.length-1].z)/2;n?(e.z=n.z+r(e._,n._),e.m=e.z-a):e.z=a}else n&&(e.z=n.z+r(e._,n._));e.parent.A=function(e,t,i){if(t){for(var n,a,o,s,l=e,c=e,u=t,h=l.parent.children[0],d=l.m,f=c.m,p=u.m,m=h.m;u=rK(u),l=rX(l),u&&l;){h=rX(h),(c=rK(c)).a=e,(s=u.z+p-l.z-d+r(u._,l._))>0&&(function(e,t,r){var i=r/(t.i-e.i);t.c-=i,t.s+=r,e.c+=i,t.z+=r,t.m+=r}((n=u,a=e,o=i,n.a.parent===a.parent?n.a:o),e,s),d+=s,f+=s),p+=u.m,d+=l.m,m+=h.m,f+=c.m}u&&!rK(c)&&(c.t=u,c.m+=p-f),l&&!rX(h)&&(h.t=l,h.m+=d-m,i=e)}return i}(e,n,e.parent.A||i[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=i[0],e.y=e.depth*i[1]}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(n=null==(i=e)?l:null,a):n?null:i},a.nodeSize=function(e){return arguments.length?(n=null==(i=e)?null:l,a):n?i:null},rb(a,t)},e.layout.cluster=function(){var t=e.layout.hierarchy().sort(null).value(null),r=r$,i=[1,1],n=!1;function a(a,o){var s,l=t.call(this,a,o),c=l[0],u=0;rw(c,function(t){var i,n,a=t.children;a&&a.length?(t.x=(i=a).reduce(function(e,t){return e+t.x},0)/i.length,n=a,t.y=1+e.max(n,function(e){return e.y})):(t.x=s?u+=r(t,s):0,t.y=0,s=t)});var h=function e(t){var r=t.children;return r&&r.length?e(r[0]):t}(c),d=function e(t){var r,i=t.children;return i&&(r=i.length)?e(i[r-1]):t}(c),f=h.x-r(h,d)/2,p=d.x+r(d,h)/2;return rw(c,n?function(e){e.x=(e.x-c.x)*i[0],e.y=(c.y-e.y)*i[1]}:function(e){e.x=(e.x-f)/(p-f)*i[0],e.y=(1-(c.y?e.y/c.y:1))*i[1]}),l}return a.separation=function(e){return arguments.length?(r=e,a):r},a.size=function(e){return arguments.length?(n=null==(i=e),a):n?null:i},a.nodeSize=function(e){return arguments.length?(n=null!=(i=e),a):n?i:null},rb(a,t)},e.layout.treemap=function(){var t,r=e.layout.hierarchy(),i=Math.round,n=[1,1],a=null,o=rJ,s=!1,l="squarify",c=.5*(1+Math.sqrt(5));function u(e,t){for(var r,i,n=-1,a=e.length;++nr.dy)&&(u=r.dy);++or.dx)&&(u=r.dx);++o0;)d.push(i=f[a-1]),d.area+=i.area,"squarify"!==l||(n=function(e,t){for(var r,i=e.area,n=0,a=1/0,o=-1,s=e.length;++on&&(n=r));return i*=i,t*=t,i?Math.max(t*n*c/i,i/(t*a*c)):1/0}(d,m))<=p?(f.pop(),p=n):(d.area-=d.pop().area,h(d,m,s,!1),m=Math.min(s.dx,s.dy),d.length=d.area=0,p=1/0);d.length&&(h(d,m,s,!0),d.length=d.area=0),r.forEach(e)}})(a),s&&(t=i),i}return d.size=function(e){return arguments.length?(n=e,d):n},d.padding=function(e){var t;return arguments.length?(o=null==(a=e)?rJ:"function"==(t=typeof e)?function(t){var r=e.call(d,t,t.depth);return null==r?rJ(t):rQ(t,"number"==typeof r?[r,r,r,r]:r)}:("number"===t&&(e=[e,e,e,e]),function(t){return rQ(t,e)}),d):a},d.round=function(e){return arguments.length?(i=e?Math.round:Number,d):i!=Number},d.sticky=function(e){return arguments.length?(s=e,t=null,d):s},d.ratio=function(e){return arguments.length?(c=e,d):c},d.mode=function(e){return arguments.length?(l=e+"",d):l},rb(d,r)},e.random={normal:function(e,t){var r=arguments.length;return r<2&&(t=1),r<1&&(e=0),function(){var r,i,n;do n=(r=2*Math.random()-1)*r+(i=2*Math.random()-1)*i;while(!n||n>1);return e+t*r*Math.sqrt(-2*Math.log(n)/n)}},logNormal:function(){var t=e.random.normal.apply(e,arguments);return function(){return Math.exp(t())}},bates:function(t){var r=e.random.irwinHall(t);return function(){return r()/t}},irwinHall:function(e){return function(){for(var t=0,r=0;r2?r6:r2,s=n?rh:ru;return a=e(t,r,s,i),o=e(r,t,s,tQ),l}function l(e){return a(e)}return l.invert=function(e){return o(e)},l.domain=function(e){return arguments.length?(t=e.map(Number),s()):t},l.range=function(e){return arguments.length?(r=e,s()):r},l.rangeRound=function(e){return l.range(e).interpolate(ri)},l.clamp=function(e){return arguments.length?(n=e,s()):n},l.interpolate=function(e){return arguments.length?(i=e,s()):i},l.ticks=function(e){return ie(t,e)},l.tickFormat=function(e,r){return d3_scale_linearTickFormat(t,e,r)},l.nice=function(e){return r7(t,e),s()},l.copy=function(){return e(t,r,i,n)},s()}([0,1],[0,1],tQ,!1)},e.scale.log=function(){return function e(t,r,i,n){function a(e){return(i?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(r)}function o(e){return i?Math.pow(r,e):-Math.pow(r,-e)}function s(e){return t(a(e))}return s.invert=function(e){return o(t.invert(e))},s.domain=function(e){return arguments.length?(i=e[0]>=0,t.domain((n=e.map(Number)).map(a)),s):n},s.base=function(e){return arguments.length?(r=+e,t.domain(n.map(a)),s):r},s.nice=function(){var e=r3(n.map(a),i?Math:it);return t.domain(e),n=e.map(o),s},s.ticks=function(){var e=r0(n),t=[],s=e[0],l=e[1],c=Math.floor(a(s)),u=Math.ceil(a(l)),h=r%1?2:r;if(isFinite(u-c)){if(i){for(;c0;d--)t.push(o(c)*d);for(c=0;t[c]l;u--);t=t.slice(c,u)}return t},s.copy=function(){return e(t.copy(),r,i,n)},r8(s,t)}(e.scale.linear().domain([0,1]),10,!0,[1,10])};var it={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function ir(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}e.scale.pow=function(){return function e(t,r,i){var n=ir(r),a=ir(1/r);function o(e){return t(n(e))}return o.invert=function(e){return a(t.invert(e))},o.domain=function(e){return arguments.length?(t.domain((i=e.map(Number)).map(n)),o):i},o.ticks=function(e){return ie(i,e)},o.tickFormat=function(e,t){return d3_scale_linearTickFormat(i,e,t)},o.nice=function(e){return o.domain(r7(i,e))},o.exponent=function(e){return arguments.length?(n=ir(r=e),a=ir(1/r),t.domain(i.map(n)),o):r},o.copy=function(){return e(t.copy(),r,i)},r8(o,t)}(e.scale.linear(),1,[0,1])},e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return function t(r,i){var n,a,o;function s(e){return a[((n.get(e)||("range"===i.t?n.set(e,r.push(e)):NaN))-1)%a.length]}function l(t,i){return e.range(r.length).map(function(e){return t+i*e})}return s.domain=function(e){if(!arguments.length)return r;r=[],n=new b;for(var t,a=-1,o=e.length;++a0?n[e-1]:r[0],eh?0:1;if(c=eM)return l(c,f)+(s?l(s,1-f):"")+"Z";var p,m,g,y,v,x,b,_,w,T,M,k,A=0,S=0,E=[];if((y=(+o.apply(this,arguments)||0)/2)&&(g=i===ic?Math.sqrt(s*s+c*c):+i.apply(this,arguments),f||(S*=-1),c&&(S=eE(g/c*Math.sin(y))),s&&(A=eE(g/s*Math.sin(y)))),c){v=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)<=ew?0:1;if(S&&ig(v,x,b,_)===f^C){var L=(u+h)/2;v=c*Math.cos(L),x=c*Math.sin(L),b=_=null}}else v=x=0;if(s){w=s*Math.cos(h-A),T=s*Math.sin(h-A),M=s*Math.cos(u+A),k=s*Math.sin(u+A);var P=Math.abs(u-h+2*A)<=ew?0:1;if(A&&ig(w,T,M,k)===1-f^P){var I=(u+h)/2;w=s*Math.cos(I),T=s*Math.sin(I),M=k=null}}else w=T=0;if(d>1e-6&&(p=Math.min(Math.abs(c-s)/2,+r.apply(this,arguments)))>.001){m=s0?0:1}function iy(e,t,r,i,n){var a=e[0]-t[0],o=e[1]-t[1],s=(n?i:-i)/Math.sqrt(a*a+o*o),l=s*o,c=-s*a,u=e[0]+l,h=e[1]+c,d=t[0]+l,f=t[1]+c,p=(u+d)/2,m=(h+f)/2,g=d-u,y=f-h,v=g*g+y*y,x=r-i,b=u*f-d*h,_=(y<0?-1:1)*Math.sqrt(Math.max(0,x*x*v-b*b)),w=(b*y-g*_)/v,T=(-b*g-y*_)/v,M=(b*y+g*_)/v,k=(-b*g+y*_)/v,A=w-p,S=T-m,E=M-p,C=k-m;return A*A+S*S>E*E+C*C&&(w=M,T=k),[[w-l,T-c],[w*r/x,T*r/x]]}function iv(){return!0}function ix(e){var t=tl,r=tc,i=iv,n=i_,a=n.key,o=.7;function s(a){var s,l=[],c=[],u=-1,h=a.length,d=e6(t),f=e6(r);function p(){l.push("M",n(e(c),o))}for(;++u1&&n.push("H",i[0]),n.join("")},"step-before":iT,"step-after":iM,basis:iS,"basis-open":function(e){if(e.length<4)return i_(e);for(var t,r=[],i=-1,n=e.length,a=[0],o=[0];++i<3;)t=e[i],a.push(t[0]),o.push(t[1]);for(r.push(iE(iP,a)+","+iE(iP,o)),--i;++iv(t=iz(e[s],e[s+1]))?o[s]=o[s+1]=0:(n=(r=o[s]/t)*r+(i=o[s+1]/t)*i)>9&&(n=3*t/Math.sqrt(n),o[s]=n*r,o[s+1]=n*i);for(s=-1;++s<=l;)a.push([(n=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+o[s]*o[s])))||0,o[s]*n||0]);return a}(e))}});function i_(e){return e.length>1?e.join("L"):e+"Z"}function iw(e){return e.join("L")+"Z"}function iT(e){for(var t=0,r=e.length,i=e[0],n=[i[0],",",i[1]];++t1){s=t[1],a=e[l],l++,i+="C"+(n[0]+o[0])+","+(n[1]+o[1])+","+(a[0]-s[0])+","+(a[1]-s[1])+","+a[0]+","+a[1];for(var c=2;cew)+",1 "+t}return a.radius=function(e){return arguments.length?(r=e6(e),a):r},a.source=function(t){return arguments.length?(e=e6(t),a):e},a.target=function(e){return arguments.length?(t=e6(e),a):t},a.startAngle=function(e){return arguments.length?(i=e6(e),a):i},a.endAngle=function(e){return arguments.length?(n=e6(e),a):n},a},e.svg.diagonal=function(){var e=iR,t=iF,r=iB;function i(i,n){var a=e.call(this,i,n),o=t.call(this,i,n),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 i.source=function(t){return arguments.length?(e=e6(t),i):e},i.target=function(e){return arguments.length?(t=e6(e),i):t},i.projection=function(e){return arguments.length?(r=e,i):r},i},e.svg.diagonal.radial=function(){var t=e.svg.diagonal(),r=iB,i=t.projection;return t.projection=function(e){var t;return arguments.length?i((t=r=e,function(){var e=t.apply(this,arguments),r=e[0],i=e[1]-ek;return[r*Math.cos(i),r*Math.sin(i)]})):r},t},e.svg.symbol=function(){var e=iU,t=iN;function r(r,i){return(iq.get(e.call(this,r,i))||iV)(t.call(this,r,i))}return r.type=function(t){return arguments.length?(e=e6(t),r):e},r.size=function(e){return arguments.length?(t=e6(e),r):t},r};var iq=e.map({circle:iV,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*iG)),r=t*iG;return"M0,"+-t+"L"+r+",0 0,"+t+" "+-r+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/iH),r=t*iH/2;return"M0,"+r+"L"+t+","+-r+" "+-t+","+-r+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/iH),r=t*iH/2;return"M0,"+-r+"L"+t+","+r+" "+-t+","+r+"Z"}});e.svg.symbolTypes=iq.keys();var iH=Math.sqrt(3),iG=Math.tan(30*eA);H.transition=function(e){for(var t,r,i=i$||++iJ,n=i1(e),a=[],o=iX||{time:Date.now(),ease:t7,delay:0,duration:250},s=-1,l=this.length;++s0;)c[--d].call(e,o);if(a>=1)return h.event&&h.event.end.call(e,e.__data__,t),--u.count?delete u[i]:delete e[r],1}h||(o=tn(function(e){var t=h.delay;if(o.t=t+a,t<=e)return d(e-t);o.c=d},0,a=n.time),h=u[i]={tween:new b,time:a,timer:o,delay:n.delay,duration:n.duration,ease:n.ease,index:t},n=null,++u.count)}iK.call=H.call,iK.empty=H.empty,iK.node=H.node,iK.size=H.size,e.transition=function(t,r){return t&&t.transition?i$?t.transition(r):t:e.selection().transition(t)},e.transition.prototype=iK,iK.select=function(e){var t,r,i,n=this.id,a=this.namespace,o=[];e=G(e);for(var s=-1,l=this.length;++srect,.s>rect").attr("width",s[1]-s[0])}function m(e){e.select(".extent").attr("y",l[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",l[1]-l[0])}function g(){var h,g,y=this,v=e.select(e.event.target),x=i.of(y,arguments),b=e.select(y),_=v.datum(),w=!/^(n|s)$/.test(_)&&n,T=!/^(e|w)$/.test(_)&&a,M=v.classed("extent"),k=ey(y),A=e.mouse(y),S=e.select(o(y)).on("keydown.brush",function(){32==e.event.keyCode&&(M||(h=null,A[0]-=s[1],A[1]-=l[1],M=2),O())}).on("keyup.brush",function(){32==e.event.keyCode&&2==M&&(A[0]+=s[1],A[1]+=l[1],M=0,O())});if(e.event.changedTouches?S.on("touchmove.brush",L).on("touchend.brush",I):S.on("mousemove.brush",L).on("mouseup.brush",I),b.interrupt().selectAll("*").interrupt(),M)A[0]=s[0]-A[0],A[1]=l[0]-A[1];else if(_){var E=+/w$/.test(_),C=+/^n/.test(_);g=[s[1-E]-A[0],l[1-C]-A[1]],A[0]=s[E],A[1]=l[C]}else e.event.altKey&&(h=A.slice());function L(){var t=e.mouse(y),r=!1;g&&(t[0]+=g[0],t[1]+=g[1]),M||(e.event.altKey?(h||(h=[(s[0]+s[1])/2,(l[0]+l[1])/2]),A[0]=s[+(t[0]0))return o;do o.push(a=new Date(+t)),n(t,i),e(t);while(a=r)for(;e(r),!t(r);)r.setTime(r-1)},function(e,r){if(e>=e)if(r<0)for(;++r<=0;)for(;n(e,-1),!t(e););else for(;--r>=0;)for(;n(e,1),!t(e););})},a&&(s.count=function(i,n){return t.setTime(+i),r.setTime(+n),e(t),e(r),Math.floor(a(t,r))},s.every=function(e){return isFinite(e=Math.floor(e))&&e>0?e>1?s.filter(o?function(t){return o(t)%e==0}:function(t){return s.count(0,t)%e==0}):s:null}),s}var n=i(function(){},function(e,t){e.setTime(+e+t)},function(e,t){return t-e});n.every=function(e){return isFinite(e=Math.floor(e))&&e>0?e>1?i(function(t){t.setTime(Math.floor(t/e)*e)},function(t,r){t.setTime(+t+r*e)},function(t,r){return(r-t)/e}):n:null};var a=n.range,o=i(function(e){e.setTime(e-e.getMilliseconds())},function(e,t){e.setTime(+e+1e3*t)},function(e,t){return(t-e)/1e3},function(e){return e.getUTCSeconds()}),s=o.range,l=i(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds())},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getMinutes()}),c=l.range,u=i(function(e){e.setTime(e-e.getMilliseconds()-1e3*e.getSeconds()-6e4*e.getMinutes())},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getHours()}),h=u.range,d=i(function(e){e.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5},function(e){return e.getDate()-1}),f=d.range;function p(e){return i(function(t){t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},function(e,t){e.setDate(e.getDate()+7*t)},function(e,t){return(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/6048e5})}var m=p(0),g=p(1),y=p(2),v=p(3),x=p(4),b=p(5),_=p(6),w=m.range,T=g.range,M=y.range,k=v.range,A=x.range,S=b.range,E=_.range,C=i(function(e){e.setDate(1),e.setHours(0,0,0,0)},function(e,t){e.setMonth(e.getMonth()+t)},function(e,t){return t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12},function(e){return e.getMonth()}),L=C.range,P=i(function(e){e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,t){e.setFullYear(e.getFullYear()+t)},function(e,t){return t.getFullYear()-e.getFullYear()},function(e){return e.getFullYear()});P.every=function(e){return isFinite(e=Math.floor(e))&&e>0?i(function(t){t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,r){t.setFullYear(t.getFullYear()+r*e)}):null};var I=P.range,z=i(function(e){e.setUTCSeconds(0,0)},function(e,t){e.setTime(+e+6e4*t)},function(e,t){return(t-e)/6e4},function(e){return e.getUTCMinutes()}),D=z.range,O=i(function(e){e.setUTCMinutes(0,0,0)},function(e,t){e.setTime(+e+36e5*t)},function(e,t){return(t-e)/36e5},function(e){return e.getUTCHours()}),R=O.range,F=i(function(e){e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+t)},function(e,t){return(t-e)/864e5},function(e){return e.getUTCDate()-1}),j=F.range;function B(e){return i(function(t){t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},function(e,t){e.setUTCDate(e.getUTCDate()+7*t)},function(e,t){return(t-e)/6048e5})}var N=B(0),U=B(1),V=B(2),q=B(3),H=B(4),G=B(5),W=B(6),Y=N.range,Z=U.range,$=V.range,X=q.range,K=H.range,J=G.range,Q=W.range,ee=i(function(e){e.setUTCDate(1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCMonth(e.getUTCMonth()+t)},function(e,t){return t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12},function(e){return e.getUTCMonth()}),et=ee.range,er=i(function(e){e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,t){e.setUTCFullYear(e.getUTCFullYear()+t)},function(e,t){return t.getUTCFullYear()-e.getUTCFullYear()},function(e){return e.getUTCFullYear()});er.every=function(e){return isFinite(e=Math.floor(e))&&e>0?i(function(t){t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,r){t.setUTCFullYear(t.getUTCFullYear()+r*e)}):null};var ei=er.range;e.timeDay=d,e.timeDays=f,e.timeFriday=b,e.timeFridays=S,e.timeHour=u,e.timeHours=h,e.timeInterval=i,e.timeMillisecond=n,e.timeMilliseconds=a,e.timeMinute=l,e.timeMinutes=c,e.timeMonday=g,e.timeMondays=T,e.timeMonth=C,e.timeMonths=L,e.timeSaturday=_,e.timeSaturdays=E,e.timeSecond=o,e.timeSeconds=s,e.timeSunday=m,e.timeSundays=w,e.timeThursday=x,e.timeThursdays=A,e.timeTuesday=y,e.timeTuesdays=M,e.timeWednesday=v,e.timeWednesdays=k,e.timeWeek=m,e.timeWeeks=w,e.timeYear=P,e.timeYears=I,e.utcDay=F,e.utcDays=j,e.utcFriday=G,e.utcFridays=J,e.utcHour=O,e.utcHours=R,e.utcMillisecond=n,e.utcMilliseconds=a,e.utcMinute=z,e.utcMinutes=D,e.utcMonday=U,e.utcMondays=Z,e.utcMonth=ee,e.utcMonths=et,e.utcSaturday=W,e.utcSaturdays=Q,e.utcSecond=o,e.utcSeconds=s,e.utcSunday=N,e.utcSundays=Y,e.utcThursday=H,e.utcThursdays=K,e.utcTuesday=V,e.utcTuesdays=$,e.utcWednesday=q,e.utcWednesdays=X,e.utcWeek=N,e.utcWeeks=Y,e.utcYear=er,e.utcYears=ei,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),k=p({"node_modules/d3-time-format/dist/d3-time-format.js"(e,t){var r,i;r=e,i=function(e,t){function r(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function i(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function n(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function a(e){var a=e.dateTime,o=e.date,l=e.time,c=e.periods,u=e.days,h=e.shortDays,d=e.months,W=e.shortMonths,ed=f(c),eM=p(c),ek=f(u),eA=p(u),eS=f(h),eE=p(h),eC=f(d),eL=p(d),eP=f(W),eI=p(W),ez={a:function(e){return h[e.getDay()]},A:function(e){return u[e.getDay()]},b:function(e){return W[e.getMonth()]},B:function(e){return d[e.getMonth()]},c:null,d:O,e:O,f:N,g:K,G:Q,H:R,I:F,j:j,L:B,m:U,M:V,p:function(e){return c[+(e.getHours()>=12)]},q:function(e){return 1+~~(e.getMonth()/3)},Q:ew,s:eT,S:q,u:H,U:G,V:Y,w:Z,W:$,x:null,X:null,y:X,Y:J,Z:ee,"%":e_},eD={a:function(e){return h[e.getUTCDay()]},A:function(e){return u[e.getUTCDay()]},b:function(e){return W[e.getUTCMonth()]},B:function(e){return d[e.getUTCMonth()]},c:null,d:et,e:et,f:eo,g:ey,G:ex,H:er,I:ei,j:en,L:ea,m:es,M:el,p:function(e){return c[+(e.getUTCHours()>=12)]},q:function(e){return 1+~~(e.getUTCMonth()/3)},Q:ew,s:eT,S:ec,u:eu,U:eh,V:ef,w:ep,W:em,x:null,X:null,y:eg,Y:ev,Z:eb,"%":e_},eO={a:function(e,t,r){var i=eS.exec(t.slice(r));return i?(e.w=eE[i[0].toLowerCase()],r+i[0].length):-1},A:function(e,t,r){var i=ek.exec(t.slice(r));return i?(e.w=eA[i[0].toLowerCase()],r+i[0].length):-1},b:function(e,t,r){var i=eP.exec(t.slice(r));return i?(e.m=eI[i[0].toLowerCase()],r+i[0].length):-1},B:function(e,t,r){var i=eC.exec(t.slice(r));return i?(e.m=eL[i[0].toLowerCase()],r+i[0].length):-1},c:function(e,t,r){return ej(e,a,t,r)},d:k,e:k,f:P,g:_,G:b,H:S,I:S,j:A,L:L,m:M,M:E,p:function(e,t,r){var i=ed.exec(t.slice(r));return i?(e.p=eM[i[0].toLowerCase()],r+i[0].length):-1},q:T,Q:z,s:D,S:C,u:g,U:y,V:v,w:m,W:x,x:function(e,t,r){return ej(e,o,t,r)},X:function(e,t,r){return ej(e,l,t,r)},y:_,Y:b,Z:w,"%":I};function eR(e,t){return function(r){var i,n,a,o=[],l=-1,c=0,u=e.length;for(r instanceof Date||(r=new Date(+r));++l53)return null;"w"in c||(c.w=1),"Z"in c?(s=(l=(s=i(n(c.y,0,1))).getUTCDay())>4||0===l?t.utcMonday.ceil(s):t.utcMonday(s),s=t.utcDay.offset(s,(c.V-1)*7),c.y=s.getUTCFullYear(),c.m=s.getUTCMonth(),c.d=s.getUTCDate()+(c.w+6)%7):(s=(l=(s=r(n(c.y,0,1))).getDay())>4||0===l?t.timeMonday.ceil(s):t.timeMonday(s),s=t.timeDay.offset(s,(c.V-1)*7),c.y=s.getFullYear(),c.m=s.getMonth(),c.d=s.getDate()+(c.w+6)%7)}else("W"in c||"U"in c)&&("w"in c||(c.w="u"in c?c.u%7:+("W"in c)),l="Z"in c?i(n(c.y,0,1)).getUTCDay():r(n(c.y,0,1)).getDay(),c.m=0,c.d="W"in c?(c.w+6)%7+7*c.W-(l+5)%7:c.w+7*c.U-(l+6)%7);return"Z"in c?(c.H+=c.Z/100|0,c.M+=c.Z%100,i(c)):r(c)}}function ej(e,t,r,i){for(var n,a,o=0,l=t.length,c=r.length;o=c)return -1;if(37===(n=t.charCodeAt(o++))){if(!(a=eO[(n=t.charAt(o++))in s?t.charAt(o++):n])||(i=a(e,r,i))<0)return -1}else if(n!=r.charCodeAt(i++))return -1}return i}return ez.x=eR(o,ez),ez.X=eR(l,ez),ez.c=eR(a,ez),eD.x=eR(o,eD),eD.X=eR(l,eD),eD.c=eR(a,eD),{format:function(e){var t=eR(e+="",ez);return t.toString=function(){return e},t},parse:function(e){var t=eF(e+="",!1);return t.toString=function(){return e},t},utcFormat:function(e){var t=eR(e+="",eD);return t.toString=function(){return e},t},utcParse:function(e){var t=eF(e+="",!0);return t.toString=function(){return e},t}}}var o,s={"-":"",_:" ",0:"0"},l=/^\s*\d+/,c=/^%/,u=/[\\^$*+?|[\]().{}]/g;function h(e,t,r){var i=e<0?"-":"",n=(i?-e:e)+"",a=n.length;return i+(a68?1900:2e3),r+i[0].length):-1}function w(e,t,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return i?(e.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function T(e,t,r){var i=l.exec(t.slice(r,r+1));return i?(e.q=3*i[0]-3,r+i[0].length):-1}function M(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.m=i[0]-1,r+i[0].length):-1}function k(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.d=+i[0],r+i[0].length):-1}function A(e,t,r){var i=l.exec(t.slice(r,r+3));return i?(e.m=0,e.d=+i[0],r+i[0].length):-1}function S(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.H=+i[0],r+i[0].length):-1}function E(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.M=+i[0],r+i[0].length):-1}function C(e,t,r){var i=l.exec(t.slice(r,r+2));return i?(e.S=+i[0],r+i[0].length):-1}function L(e,t,r){var i=l.exec(t.slice(r,r+3));return i?(e.L=+i[0],r+i[0].length):-1}function P(e,t,r){var i=l.exec(t.slice(r,r+6));return i?(e.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function I(e,t,r){var i=c.exec(t.slice(r,r+1));return i?r+i[0].length:-1}function z(e,t,r){var i=l.exec(t.slice(r));return i?(e.Q=+i[0],r+i[0].length):-1}function D(e,t,r){var i=l.exec(t.slice(r));return i?(e.s=+i[0],r+i[0].length):-1}function O(e,t){return h(e.getDate(),t,2)}function R(e,t){return h(e.getHours(),t,2)}function F(e,t){return h(e.getHours()%12||12,t,2)}function j(e,r){return h(1+t.timeDay.count(t.timeYear(e),e),r,3)}function B(e,t){return h(e.getMilliseconds(),t,3)}function N(e,t){return B(e,t)+"000"}function U(e,t){return h(e.getMonth()+1,t,2)}function V(e,t){return h(e.getMinutes(),t,2)}function q(e,t){return h(e.getSeconds(),t,2)}function H(e){var t=e.getDay();return 0===t?7:t}function G(e,r){return h(t.timeSunday.count(t.timeYear(e)-1,e),r,2)}function W(e){var r=e.getDay();return r>=4||0===r?t.timeThursday(e):t.timeThursday.ceil(e)}function Y(e,r){return e=W(e),h(t.timeThursday.count(t.timeYear(e),e)+(4===t.timeYear(e).getDay()),r,2)}function Z(e){return e.getDay()}function $(e,r){return h(t.timeMonday.count(t.timeYear(e)-1,e),r,2)}function X(e,t){return h(e.getFullYear()%100,t,2)}function K(e,t){return h((e=W(e)).getFullYear()%100,t,2)}function J(e,t){return h(e.getFullYear()%1e4,t,4)}function Q(e,r){var i=e.getDay();return h((e=i>=4||0===i?t.timeThursday(e):t.timeThursday.ceil(e)).getFullYear()%1e4,r,4)}function ee(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+h(t/60|0,"0",2)+h(t%60,"0",2)}function et(e,t){return h(e.getUTCDate(),t,2)}function er(e,t){return h(e.getUTCHours(),t,2)}function ei(e,t){return h(e.getUTCHours()%12||12,t,2)}function en(e,r){return h(1+t.utcDay.count(t.utcYear(e),e),r,3)}function ea(e,t){return h(e.getUTCMilliseconds(),t,3)}function eo(e,t){return ea(e,t)+"000"}function es(e,t){return h(e.getUTCMonth()+1,t,2)}function el(e,t){return h(e.getUTCMinutes(),t,2)}function ec(e,t){return h(e.getUTCSeconds(),t,2)}function eu(e){var t=e.getUTCDay();return 0===t?7:t}function eh(e,r){return h(t.utcSunday.count(t.utcYear(e)-1,e),r,2)}function ed(e){var r=e.getUTCDay();return r>=4||0===r?t.utcThursday(e):t.utcThursday.ceil(e)}function ef(e,r){return e=ed(e),h(t.utcThursday.count(t.utcYear(e),e)+(4===t.utcYear(e).getUTCDay()),r,2)}function ep(e){return e.getUTCDay()}function em(e,r){return h(t.utcMonday.count(t.utcYear(e)-1,e),r,2)}function eg(e,t){return h(e.getUTCFullYear()%100,t,2)}function ey(e,t){return h((e=ed(e)).getUTCFullYear()%100,t,2)}function ev(e,t){return h(e.getUTCFullYear()%1e4,t,4)}function ex(e,r){var i=e.getUTCDay();return h((e=i>=4||0===i?t.utcThursday(e):t.utcThursday.ceil(e)).getUTCFullYear()%1e4,r,4)}function eb(){return"+0000"}function e_(){return"%"}function ew(e){return+e}function eT(e){return Math.floor(e/1e3)}function eM(t){return e.timeFormat=(o=a(t)).format,e.timeParse=o.parse,e.utcFormat=o.utcFormat,e.utcParse=o.utcParse,o}eM({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});var ek="%Y-%m-%dT%H:%M:%S.%LZ",eA=Date.prototype.toISOString?function(e){return e.toISOString()}:e.utcFormat(ek),eS=+new Date("2000-01-01T00:00:00.000Z")?function(e){var t=new Date(e);return isNaN(t)?null:t}:e.utcParse(ek);e.isoFormat=eA,e.isoParse=eS,e.timeFormatDefaultLocale=eM,e.timeFormatLocale=a,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?i(e,M()):i((r=r||self).d3=r.d3||{},r.d3)}}),A=p({"node_modules/d3-format/dist/d3-format.js"(e,t){var r;r=e,function(e){function t(e,t){if((r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"))<0)return null;var r,i=e.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+e.slice(r+1)]}function r(e){return(e=t(Math.abs(e)))?e[1]:NaN}var i,n,a=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function o(e){var t;if(!(t=a.exec(e)))throw Error("invalid format: "+e);return new s({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}function s(e){this.fill=void 0===e.fill?" ":e.fill+"",this.align=void 0===e.align?">":e.align+"",this.sign=void 0===e.sign?"-":e.sign+"",this.symbol=void 0===e.symbol?"":e.symbol+"",this.zero=!!e.zero,this.width=void 0===e.width?void 0:+e.width,this.comma=!!e.comma,this.precision=void 0===e.precision?void 0:+e.precision,this.trim=!!e.trim,this.type=void 0===e.type?"":e.type+""}function l(e,r){var i=t(e,r);if(!i)return e+"";var n=i[0],a=i[1];return a<0?"0."+Array(-a).join("0")+n:n.length>a+1?n.slice(0,a+1)+"."+n.slice(a+1):n+Array(a-n.length+2).join("0")}o.prototype=s.prototype,s.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};var c={"%":function(e,t){return(100*e).toFixed(t)},b:function(e){return Math.round(e).toString(2)},c:function(e){return e+""},d:function(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},g:function(e,t){return e.toPrecision(t)},o:function(e){return Math.round(e).toString(8)},p:function(e,t){return l(100*e,t)},r:l,s:function(e,r){var n=t(e,r);if(!n)return e+"";var a=n[0],o=n[1],s=o-(i=3*Math.max(-8,Math.min(8,Math.floor(o/3))))+1,l=a.length;return s===l?a:s>l?a+Array(s-l+1).join("0"):s>0?a.slice(0,s)+"."+a.slice(s):"0."+Array(1-s).join("0")+t(e,Math.max(0,r+s-1))[0]},X:function(e){return Math.round(e).toString(16).toUpperCase()},x:function(e){return Math.round(e).toString(16)}};function u(e){return e}var h=Array.prototype.map,d=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function f(e){var t,n,a,s=void 0===e.grouping||void 0===e.thousands?u:(t=h.call(e.grouping,Number),n=e.thousands+"",function(e,r){for(var i=e.length,a=[],o=0,s=t[0],l=0;i>0&&s>0&&(l+s+1>r&&(s=Math.max(1,r-l)),a.push(e.substring(i-=s,i+s)),!((l+=s+1)>r));)s=t[o=(o+1)%t.length];return a.reverse().join(n)}),l=void 0===e.currency?"":e.currency[0]+"",f=void 0===e.currency?"":e.currency[1]+"",p=void 0===e.decimal?".":e.decimal+"",m=void 0===e.numerals?u:(a=h.call(e.numerals,String),function(e){return e.replace(/[0-9]/g,function(e){return a[+e]})}),g=void 0===e.percent?"%":e.percent+"",y=void 0===e.minus?"-":e.minus+"",v=void 0===e.nan?"NaN":e.nan+"";function x(e){var t=(e=o(e)).fill,r=e.align,n=e.sign,a=e.symbol,u=e.zero,h=e.width,x=e.comma,b=e.precision,_=e.trim,w=e.type;"n"===w?(x=!0,w="g"):c[w]||(void 0===b&&(b=12),_=!0,w="g"),(u||"0"===t&&"="===r)&&(u=!0,t="0",r="=");var T="$"===a?l:"#"===a&&/[boxX]/.test(w)?"0"+w.toLowerCase():"",M="$"===a?f:/[%p]/.test(w)?g:"",k=c[w],A=/[defgprs%]/.test(w);function S(e){var a,o,l,c=T,f=M;if("c"===w)f=k(e)+f,e="";else{var g=(e*=1)<0||1/e<0;if(e=isNaN(e)?v:k(Math.abs(e),b),_&&(e=function(e){e:for(var t,r=e.length,i=1,n=-1;i0&&(n=0)}return n>0?e.slice(0,n)+e.slice(t+1):e}(e)),g&&0==+e&&"+"!==n&&(g=!1),c=(g?"("===n?n:y:"-"===n||"("===n?"":n)+c,f=("s"===w?d[8+i/3]:"")+f+(g&&"("===n?")":""),A){for(a=-1,o=e.length;++a(l=e.charCodeAt(a))||l>57){f=(46===l?p+e.slice(a+1):e.slice(a))+f,e=e.slice(0,a);break}}}x&&!u&&(e=s(e,1/0));var S=c.length+e.length+f.length,E=S>1)+c+e+f+E.slice(S);break;default:e=E+c+e+f}return m(e)}return b=void 0===b?6:/[gprs]/.test(w)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b)),S.toString=function(){return e+""},S}return{format:x,formatPrefix:function(e,t){var i=x(((e=o(e)).type="f",e)),n=3*Math.max(-8,Math.min(8,Math.floor(r(t)/3))),a=Math.pow(10,-n),s=d[8+n/3];return function(e){return i(a*e)+s}}}}function p(t){return e.format=(n=f(t)).format,e.formatPrefix=n.formatPrefix,n}p({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),e.FormatSpecifier=s,e.formatDefaultLocale=p,e.formatLocale=f,e.formatSpecifier=o,e.precisionFixed=function(e){return Math.max(0,-r(Math.abs(e)))},e.precisionPrefix=function(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(r(t)/3)))-r(Math.abs(e)))},e.precisionRound=function(e,t){return Math.max(0,r(t=Math.abs(t)-(e=Math.abs(e)))-r(e))+1},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r="u">typeof globalThis?globalThis:r||self).d3=r.d3||{})}}),E=p({"node_modules/is-string-blank/index.js"(e,t){t.exports=function(e){for(var t,r=e.length,i=0;i13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}}}),C=p({"node_modules/fast-isnumeric/index.js"(e,t){var r=E();t.exports=function(e){var t=typeof e;if("string"===t){var i=e;if(0==(e*=1)&&r(i))return!1}else if("number"!==t)return!1;return e-e<1}}}),L=p({"src/constants/numerical.js"(e,t){t.exports={BADNUM:void 0,FP_SAFE:1e-4*Number.MAX_VALUE,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:2440587.5,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"−"}}}),P=p({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(e,t){var r;r=e,function(e){for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array>"u"?[]:new Uint8Array(256),i=0;i>4,h[c++]=(15&n)<<4|a>>2,h[c++]=(3&a)<<6|63&o;return u},e.encode=function(e){var r,i=new Uint8Array(e),n=i.length,a="";for(r=0;r>2],a+=t[(3&i[r])<<4|i[r+1]>>4],a+=t[(15&i[r+1])<<2|i[r+2]>>6],a+=t[63&i[r+2]];return n%3==2?a=a.substring(0,a.length-1)+"=":n%3==1&&(a=a.substring(0,a.length-2)+"=="),a},Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r="u">typeof globalThis?globalThis:r||self)["base64-arraybuffer"]={})}}),I=p({"src/lib/is_plain_object.js"(e,t){t.exports=function(e){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(e):"[object Object]"===Object.prototype.toString.call(e)&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}}}),z=p({"src/lib/array.js"(e){var t=P().decode,r=I(),i=Array.isArray,n=ArrayBuffer,a=DataView;function o(e){return n.isView(e)&&!(e instanceof a)}function s(e){return i(e)||o(e)}e.isTypedArray=o,e.isArrayOrTypedArray=s,e.isArray1D=function(e){return!s(e[0])},e.ensureArray=function(e,t){return i(e)||(e=[]),e.length=t,e};var l={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};function c(e){return e.constructor===ArrayBuffer}function u(e,t,r){if(s(e))if(!s(e[0]))return e.length;else{for(var i=r,n=0;n2)return c[t]=2|c[t],d.set(e,null);if(h){for(o=t;o0)return Math.log(e)/Math.LN10;var i=Math.log(Math.min(t[0],t[1]))/Math.LN10;return r(i)||(i=Math.log(Math.max(t[0],t[1]))/Math.LN10-6),i}}}),j=p({"src/lib/relink_private.js"(e,t){var r=z().isArrayOrTypedArray,i=I();t.exports=function e(t,n){for(var a in n){var o=n[a],s=t[a];if(s!==o)if("_"===a.charAt(0)||"function"==typeof o){if(a in t)continue;t[a]=o}else if(r(o)&&r(s)&&i(o[0])){if("customdata"===a||"ids"===a)continue;for(var l=Math.min(o.length,s.length),c=0;ct/2?e-Math.round(e/t)*t:e}m(B,{mod:()=>N,modHalf:()=>U});var V=f({"src/lib/mod.ts"(){}}),q=p({"src/lib/extend.js"(e){var t=I(),r=Array.isArray;function i(e,n,a,o){var s,l,c,u,h,d,f=e[0],p=e.length;if(2===p&&r(f)&&r(e[1])&&0===f.length){if(function(e,t){var r,i;for(r=0;rtypeof u||a)&&(f[l]=u);return f}e.extendFlat=function(...e){return i(e,!1,!1,!1)},e.extendDeep=function(...e){return i(e,!0,!1,!1)},e.extendDeepAll=function(...e){return i(e,!0,!0,!1)},e.extendDeepNoArrays=function(...e){return i(e,!0,!1,!0)}}}),H=p({"src/plots/font_attributes.js"(e,t){t.exports=function(e){var t=e.variantValues,r=e.editType,i=e.colorEditType;void 0===i&&(i=r);var n={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(n.valType="enumerated",n.values=n.extras,n.extras=void 0,n.min=void 0,n.max=void 0);var a={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:i},weight:n,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(a.size.dflt="auto"),e.autoColor&&(a.color.dflt="auto"),e.arrayOk&&(a.family.arrayOk=!0,a.weight.arrayOk=!0,a.style.arrayOk=!0,e.noFontVariant||(a.variant.arrayOk=!0),e.noFontTextcase||(a.textcase.arrayOk=!0),e.noFontLineposition||(a.lineposition.arrayOk=!0),e.noFontShadow||(a.shadow.arrayOk=!0),a.size.arrayOk=!0,a.color.arrayOk=!0),a}}}),G=p({"src/components/fx/constants.js"(e,t){t.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}}}),W=p({"src/components/fx/layout_attributes.js"(e,t){var r=G(),i=H(),n=i({editType:"none"});n.family.dflt=r.HOVERFONT,n.size.dflt=r.HOVERFONTSIZE,t.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:n,grouptitlefont:i({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}}}),Y=p({"src/components/fx/attributes.js"(e,t){var r=H(),i=W().hoverlabel,n=q().extendFlat;t.exports={hoverlabel:{bgcolor:n({},i.bgcolor,{arrayOk:!0}),bordercolor:n({},i.bordercolor,{arrayOk:!0}),font:r({arrayOk:!0,editType:"none"}),align:n({},i.align,{arrayOk:!0}),namelength:n({},i.namelength,{arrayOk:!0}),showarrow:n({},i.showarrow),editType:"none"}}}}),Z=p({"src/plots/attributes.js"(e,t){var r=H(),i=Y();t.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:r({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:i.hoverlabel,uirevision:{valType:"any",editType:"none"}}}}),$=p({"node_modules/culori/bundled/culori.cjs"(e,t){let i,a,o;var s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,c=Object.getOwnPropertyNames,u=Object.prototype.hasOwnProperty,h={};((e,t)=>{for(var r in t)s(e,r,{get:t[r],enumerable:!0})})(h,{a98:()=>i7,average:()=>eW,averageAngle:()=>eH,averageNumber:()=>eG,blend:()=>r7,blerp:()=>ea,clampChroma:()=>iR,clampGamut:()=>iO,clampRgb:()=>iD,colorsNamed:()=>p,convertA98ToXyz65:()=>ed,convertCubehelixToRgb:()=>eI,convertDlchToLab65:()=>e7,convertHsiToRgb:()=>tn,convertHslToRgb:()=>ts,convertHsvToRgb:()=>tf,convertHwbToRgb:()=>tg,convertItpToXyz65:()=>tT,convertJabToJch:()=>tO,convertJabToRgb:()=>tz,convertJabToXyz65:()=>tP,convertJchToJab:()=>tR,convertLab65ToDlch:()=>e9,convertLab65ToRgb:()=>e0,convertLab65ToXyz65:()=>eQ,convertLabToLch:()=>eZ,convertLabToRgb:()=>tU,convertLabToXyz50:()=>tB,convertLchToLab:()=>e$,convertLchuvToLuv:()=>tQ,convertLrgbToOklab:()=>rt,convertLrgbToRgb:()=>ex,convertLuvToLchuv:()=>tJ,convertLuvToXyz50:()=>t8,convertOkhslToOklab:()=>rh,convertOkhsvToOklab:()=>rp,convertOklabToLrgb:()=>ri,convertOklabToOkhsl:()=>ru,convertOklabToOkhsv:()=>rf,convertOklabToRgb:()=>rn,convertP3ToXyz65:()=>rb,convertProphotoToXyz50:()=>rA,convertRec2020ToXyz65:()=>rP,convertRgbToCubehelix:()=>eP,convertRgbToHsi:()=>ta,convertRgbToHsl:()=>tl,convertRgbToHsv:()=>tp,convertRgbToHwb:()=>ty,convertRgbToJab:()=>tI,convertRgbToLab:()=>tG,convertRgbToLab65:()=>e3,convertRgbToLrgb:()=>eg,convertRgbToOklab:()=>rr,convertRgbToXyb:()=>rO,convertRgbToXyz50:()=>tV,convertRgbToXyz65:()=>ey,convertRgbToYiq:()=>rq,convertXybToRgb:()=>rF,convertXyz50ToLab:()=>tH,convertXyz50ToLuv:()=>t5,convertXyz50ToProphoto:()=>rM,convertXyz50ToRgb:()=>tN,convertXyz50ToXyz65:()=>rU,convertXyz65ToA98:()=>ep,convertXyz65ToItp:()=>tk,convertXyz65ToJab:()=>tC,convertXyz65ToLab65:()=>e2,convertXyz65ToP3:()=>r_,convertXyz65ToRec2020:()=>rC,convertXyz65ToRgb:()=>eb,convertXyz65ToXyz50:()=>rN,convertYiqToRgb:()=>rH,converter:()=>E,cubehelix:()=>i9,differenceCie76:()=>eF,differenceCie94:()=>ej,differenceCiede2000:()=>eB,differenceCmc:()=>eN,differenceEuclidean:()=>eR,differenceHueChroma:()=>eO,differenceHueNaive:()=>eD,differenceHueSaturation:()=>ez,differenceHyab:()=>eU,differenceItp:()=>eq,differenceKotsarenkoRamos:()=>eV,displayable:()=>iI,dlab:()=>ne,dlch:()=>nt,easingGamma:()=>iA,easingInOutSine:()=>i4,easingMidpoint:()=>io,easingSmootherstep:()=>i5,easingSmoothstep:()=>i2,easingSmoothstepInverse:()=>i3,filterBrightness:()=>iU,filterContrast:()=>iV,filterDeficiencyDeuter:()=>i0,filterDeficiencyProt:()=>iQ,filterDeficiencyTrit:()=>i1,filterGrayscale:()=>iG,filterHueRotate:()=>iY,filterInvert:()=>iW,filterSaturate:()=>iH,filterSepia:()=>iq,fixupAlpha:()=>ec,fixupHueDecreasing:()=>eS,fixupHueIncreasing:()=>eA,fixupHueLonger:()=>ek,fixupHueShorter:()=>eM,formatCss:()=>r2,formatHex:()=>r3,formatHex8:()=>r5,formatHsl:()=>r6,formatRgb:()=>r4,getMode:()=>O,hsi:()=>nr,hsl:()=>ni,hsv:()=>nn,hwb:()=>na,inGamut:()=>iz,interpolate:()=>il,interpolateWith:()=>ic,interpolateWithPremultipliedAlpha:()=>iu,interpolatorLinear:()=>el,interpolatorPiecewise:()=>es,interpolatorSplineBasis:()=>id,interpolatorSplineBasisClosed:()=>ip,interpolatorSplineMonotone:()=>iT,interpolatorSplineMonotone2:()=>iM,interpolatorSplineMonotoneClosed:()=>ik,interpolatorSplineNatural:()=>ig,interpolatorSplineNaturalClosed:()=>iy,itp:()=>no,jab:()=>ns,jch:()=>nl,lab:()=>nc,lab65:()=>nu,lch:()=>nh,lch65:()=>nd,lchuv:()=>nf,lerp:()=>ei,lrgb:()=>np,luv:()=>nm,mapAlphaDivide:()=>ir,mapAlphaMultiply:()=>it,mapTransferGamma:()=>ia,mapTransferLinear:()=>ii,mapper:()=>ie,modeA98:()=>e_,modeCubehelix:()=>eY,modeDlab:()=>tr,modeDlch:()=>ti,modeHsi:()=>to,modeHsl:()=>td,modeHsv:()=>tm,modeHwb:()=>tx,modeItp:()=>tA,modeJab:()=>tD,modeJch:()=>tF,modeLab:()=>tY,modeLab65:()=>tZ,modeLch:()=>tX,modeLch65:()=>tK,modeLchuv:()=>t7,modeLrgb:()=>t9,modeLuv:()=>re,modeOkhsl:()=>rd,modeOkhsv:()=>rm,modeOklab:()=>ry,modeOklch:()=>rx,modeP3:()=>rw,modeProphoto:()=>rS,modeRec2020:()=>rI,modeRgb:()=>eu,modeXyb:()=>rj,modeXyz50:()=>rB,modeXyz65:()=>rV,modeYiq:()=>rG,nearest:()=>ij,okhsl:()=>ng,okhsv:()=>ny,oklab:()=>nv,oklch:()=>nx,p3:()=>nb,parse:()=>ee,parseHex:()=>y,parseHsl:()=>th,parseHslLegacy:()=>tu,parseHwb:()=>tv,parseLab:()=>tW,parseLch:()=>t$,parseNamed:()=>m,parseOklab:()=>rg,parseOklch:()=>rv,parseRgb:()=>et,parseRgbLegacy:()=>A,parseTransparent:()=>er,prophoto:()=>n_,random:()=>r9,rec2020:()=>nw,removeParser:()=>F,rgb:()=>nT,round:()=>rW,samples:()=>iS,serializeHex:()=>rJ,serializeHex8:()=>rQ,serializeHsl:()=>r1,serializeRgb:()=>r0,toGamut:()=>iF,trilerp:()=>eo,unlerp:()=>en,useMode:()=>D,useParser:()=>R,wcagContrast:()=>i8,wcagLuminance:()=>i6,xyb:()=>nM,xyz50:()=>nk,xyz65:()=>nA,yiq:()=>nS}),t.exports=((e,t,r)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let i of c(t))u.call(e,i)||void 0===i||s(e,i,{get:()=>t[i],enumerable:!(r=l(t,i))||r.enumerable});return e})(s({},"__esModule",{value:!0}),h);var f=(e,t)=>{if("number"==typeof e){if(3===t)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|240&e)/255,b:(15&e|e<<4&240)/255};if(4===t)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|240&e)/255,alpha:(15&e|e<<4&240)/255};if(6===t)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(255&e)/255};if(8===t)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(255&e)/255}}},p={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},m=e=>f(p[e.toLowerCase()],6),g=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,y=e=>{let t;return(t=e.match(g))?f(parseInt(t[1],16),t[1].length):void 0},v="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",x=`${v}%`,b=`(?:${v}%|${v})`,_=`(?:${v}%|${v}|none)`,w=`(?:${v}(deg|grad|rad|turn)|${v})`,T="\\s*,\\s*",M=(RegExp("^"+_+"$"),RegExp(`^rgba?\\(\\s*${v}${T}${v}${T}${v}\\s*(?:,\\s*${b}\\s*)?\\)$`)),k=RegExp(`^rgba?\\(\\s*${x}${T}${x}${T}${x}\\s*(?:,\\s*${b}\\s*)?\\)$`),A=e=>{let t={mode:"rgb"},r;if(r=e.match(M))void 0!==r[1]&&(t.r=r[1]/255),void 0!==r[2]&&(t.g=r[2]/255),void 0!==r[3]&&(t.b=r[3]/255);else{if(!(r=e.match(k)))return;void 0!==r[1]&&(t.r=r[1]/100),void 0!==r[2]&&(t.g=r[2]/100),void 0!==r[3]&&(t.b=r[3]/100)}return void 0!==r[4]?t.alpha=Math.max(0,Math.min(1,r[4]/100)):void 0!==r[5]&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},S=(e,t)=>void 0===e?void 0:"object"!=typeof e?ee(e):void 0!==e.mode?e:t?r(d({},e),n({mode:t})):void 0,E=(e="rgb")=>t=>void 0!==(t=S(t,e))?t.mode===e?t:C[t.mode][e]?C[t.mode][e](t):"rgb"===e?C[t.mode].rgb(t):C.rgb[e](C[t.mode].rgb(t)):void 0,C={},L={},P=[],I={},z=e=>e,D=e=>(C[e.mode]=d(d({},C[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{C[t]||(C[t]={}),C[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(void 0===e.ranges[t]&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw Error(`Missing interpolator for: ${t}`);"function"==typeof e.interpolate[t]&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=z)}),L[e.mode]=e,(e.parse||[]).forEach(t=>{R(t,e.mode)}),E(e.mode)),O=e=>L[e],R=(e,t)=>{if("string"==typeof e){if(!t)throw Error("'mode' required when 'parser' is a string");I[e]=t}else"function"==typeof e&&0>P.indexOf(e)&&P.push(e)},F=e=>{if("string"==typeof e)delete I[e];else if("function"==typeof e){let t=P.indexOf(e);t>0&&P.splice(t,1)}},j=/[^\x00-\x7F]|[a-zA-Z_]/,B=/[^\x00-\x7F]|[-\w]/,N="function",U="ident",V="number",q="percentage",H="none",G="alpha",W=0;function Y(e){let t=e[W],r=e[W+1];return"-"===t||"+"===t?/\d/.test(r)||"."===r&&/\d/.test(e[W+2]):"."===t?/\d/.test(r):/\d/.test(t)}function Z(e){if(W>=e.length)return!1;let t=e[W];if(j.test(t))return!0;if("-"===t){if(e.length-W<2)return!1;let t=e[W+1];return!!("-"===t||j.test(t))}return!1}var $={deg:1,rad:180/Math.PI,grad:.9,turn:360};function X(e){let t="";if(("-"===e[W]||"+"===e[W])&&(t+=e[W++]),t+=K(e),"."===e[W]&&/\d/.test(e[W+1])&&(t+=e[W++]+K(e)),("e"===e[W]||"E"===e[W])&&(("-"===e[W+1]||"+"===e[W+1])&&/\d/.test(e[W+2])?t+=e[W++]+e[W++]+K(e):/\d/.test(e[W+1])&&(t+=e[W++]+K(e))),Z(e)){let r=J(e);return"deg"===r||"rad"===r||"turn"===r||"grad"===r?{type:"hue",value:t*$[r]}:void 0}return"%"===e[W]?(W++,{type:q,value:+t}):{type:V,value:+t}}function K(e){let t="";for(;/\d/.test(e[W]);)t+=e[W++];return t}function J(e){let t="";for(;W4)){if(4===r.length){if(r[3].type!==G)return;r[3]=r[3].value}return 3===r.length&&r.push({type:H,value:void 0}),r.every(e=>e.type!==G)?r:void 0}}var ee=e=>{if("string"!=typeof e)return;let t=function(e=""){let t=e.trim(),r=[],i;for(W=0;W"transparent"===e?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,ei=(e,t,r)=>e+r*(t-e),en=(e,t,r)=>(r-e)/(t-e),ea=(e,t,r,i,n,a)=>ei(ei(e,t,n),ei(r,i,n),a),eo=(e,t,r,i,n,a,o,s,l,c,u)=>ei(ea(e,t,r,i,l,c),ea(n,a,o,s,l,c),u),es=e=>t=>{let r=(e=>{let t=[];for(let r=0;r{let i=t*r.length,n=t>=1?r.length-1:Math.max(Math.floor(i),0),a=r[n];return void 0===a?void 0:e(a[0],a[1],i-n)}},el=es(ei),ec=e=>{let t=!1,r=e.map(e=>void 0!==e?(t=!0,e):1);return t?r:e},eu={mode:"rgb",channels:["r","g","b","alpha"],parse:[et,y,A,m,er,"srgb"],serialize:"srgb",interpolate:{r:el,g:el,b:el,alpha:{use:el,fixup:ec}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},eh=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),ed=e=>{let t=eh(e.r),r=eh(e.g),i=eh(e.b),n={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*i,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*i,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*i};return void 0!==e.alpha&&(n.alpha=e.alpha),n},ef=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),ep=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"a98",r:ef(2.0415879038107465*e-.5650069742788597*t-.3447313507783297*r),g:ef(-.9692436362808798*e+1.8759675015077206*t+.0415550574071756*r),b:ef(.0134442806320312*e-.1183623922310184*t+1.0151749943912058*r)};return void 0!==i&&(n.alpha=i),n},em=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},eg=({r:e,g:t,b:r,alpha:i})=>{let n={mode:"lrgb",r:em(e),g:em(t),b:em(r)};return void 0!==i&&(n.alpha=i),n},ey=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*i,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*i,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*i};return void 0!==n&&(a.alpha=n),a},ev=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):12.92*e},ex=({r:e,g:t,b:r,alpha:i},n="rgb")=>{let a={mode:n,r:ev(e),g:ev(t),b:ev(r)};return void 0!==i&&(a.alpha=i),a},eb=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=ex({r:3.2409699419045226*e-1.537383177570094*t-.4986107602930034*r,g:-.9692436362808796*e+1.8759675015077204*t+.0415550574071756*r,b:.0556300796969936*e-.2039769588889765*t+1.0569715142428784*r});return void 0!==i&&(n.alpha=i),n},e_=r(d({},eu),n({mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>ep(ey(e)),xyz65:ep},toMode:{rgb:e=>eb(ed(e)),xyz65:ed}})),ew=e=>(e%=360)<0?e+360:e,eT=(e,t)=>e.map((r,i,n)=>{if(void 0===r)return r;let a=ew(r);return 0===i||void 0===e[i-1]?a:t(a-ew(n[i-1]))}).reduce((e,t)=>(e.length&&void 0!==t&&void 0!==e[e.length-1]?e.push(t+e[e.length-1]):e.push(t),e),[]),eM=e=>eT(e,e=>180>=Math.abs(e)?e:e-360*Math.sign(e)),ek=e=>eT(e,e=>Math.abs(e)>=180||0===e?e:e-360*Math.sign(e)),eA=e=>eT(e,e=>e>=0?e:e+360),eS=e=>eT(e,e=>e<=0?e:e-360),eE=Math.PI/180,eC=180/Math.PI,eL=-1.78277*.29227-.1347134789,eP=({r:e,g:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(eL*r+-1.7884503806*e-3.5172982438*t)/(eL+-1.7884503806-3.5172982438),a=r-n,o=-((1.97294*(t-n)- -.29227*a)/.90649),s={mode:"cubehelix",l:n,s:0===n||1===n?void 0:Math.sqrt(a*a+o*o)/(1.97294*n*(1-n))};return s.s&&(s.h=Math.atan2(o,a)*eC-120),void 0!==i&&(s.alpha=i),s},eI=({h:e,s:t,l:r,alpha:i})=>{let n={mode:"rgb"};e=(void 0===e?0:e+120)*eE,void 0===r&&(r=0);let a=void 0===t?0:t*r*(1-r),o=Math.cos(e),s=Math.sin(e);return n.r=r+a*(-.14861*o+1.78277*s),n.g=r+a*(-.29227*o+-.90649*s),n.b=r+a*(1.97294*o+0*s),void 0!==i&&(n.alpha=i),n},ez=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.s||!t.s)return 0;let r=ew(e.h),i=Math.sin((ew(t.h)-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*i},eD=(e,t)=>{if(void 0===e.h||void 0===t.h)return 0;let r=ew(e.h),i=ew(t.h);return Math.abs(i-r)>180?r-(i-360*Math.sign(i-r)):i-r},eO=(e,t)=>{if(void 0===e.h||void 0===t.h||!e.c||!t.c)return 0;let r=ew(e.h),i=Math.sin((ew(t.h)-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*i},eR=(e="rgb",t=[1,1,1,0])=>{let r=O(e),i=r.channels,n=r.difference,a=E(e);return(e,r)=>{let o=a(e),s=a(r);return Math.sqrt(i.reduce((e,r,i)=>{let a=n[r]?n[r](o,s):o[r]-s[r];return e+(t[i]||0)*Math.pow(isNaN(a)?0:a,2)},0))}},eF=()=>eR("lab65"),ej=(e=1,t=.045,r=.015)=>{let i=E("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,c=o.a,u=o.b,h=Math.sqrt(c*c+u*u),d=s.l,f=s.a,p=s.b,m=Math.pow(h-Math.sqrt(f*f+p*p),2),g=Math.pow(c-f,2)+Math.pow(u-p,2)-m;return Math.sqrt(Math.pow(l-d,2)/Math.pow(e,2)+m/Math.pow(1+t*h,2)+g/Math.pow(1+r*h,2))}},eB=(e=1,t=1,r=1)=>{let i=E("lab65");return(n,a)=>{let o=i(n),s=i(a),l=o.l,c=o.a,u=o.b,h=Math.sqrt(c*c+u*u),d=s.l,f=s.a,p=s.b,m=(h+Math.sqrt(f*f+p*p))/2,g=.5*(1-Math.sqrt(Math.pow(m,7)/(Math.pow(m,7)+0x16bcc41e9))),y=c*(1+g),v=f*(1+g),x=Math.sqrt(y*y+u*u),b=Math.sqrt(v*v+p*p),_=Math.abs(y)+Math.abs(u)===0?0:Math.atan2(u,y);_+=(_<0)*2*Math.PI;let w=Math.abs(v)+Math.abs(p)===0?0:Math.atan2(p,v);w+=(w<0)*2*Math.PI;let T=b-x,M=x*b==0?0:w-_;M-=(M>Math.PI)*2*Math.PI,M+=(M<-Math.PI)*2*Math.PI;let k=2*Math.sqrt(x*b)*Math.sin(M/2),A=(x+b)/2,S;x*b==0?S=_+w:(S=(_+w)/2-(Math.abs(_-w)>Math.PI)*Math.PI,S+=(S<0)*2*Math.PI);let E=Math.pow((l+d)/2-50,2),C=1-.17*Math.cos(S-Math.PI/6)+.24*Math.cos(2*S)+.32*Math.cos(3*S+Math.PI/30)-.2*Math.cos(4*S-63*Math.PI/180),L=1+.015*E/Math.sqrt(20+E),P=1+.045*A,I=1+.015*A*C,z=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*S-275)/25,2)),D=2*Math.sqrt(Math.pow(A,7)/(Math.pow(A,7)+0x16bcc41e9)),O=-1*Math.sin(2*z)*D;return Math.sqrt(Math.pow((d-l)/(e*L),2)+Math.pow(T/(t*P),2)+Math.pow(k/(r*I),2)+O*T/(t*P)*k/(r*I))}},eN=(e=1,t=1)=>{let r=E("lab65");return(i,n)=>{let a=r(i),o=a.l,s=a.a,l=a.b,c=Math.sqrt(s*s+l*l),u=Math.atan2(l,s);u+=2*Math.PI*(u<0);let h=r(n),d=h.l,f=h.a,p=h.b,m=Math.sqrt(f*f+p*p),g=Math.pow(o-d,2),y=Math.pow(c-m,2),v=Math.pow(s-f,2)+Math.pow(l-p,2)-y,x=Math.sqrt(Math.pow(c,4)/(Math.pow(c,4)+1900)),b=u>=164/180*Math.PI&&u<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(u+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(u+35/180*Math.PI)),_=.0638*c/(1+.0131*c)+.638;return Math.sqrt(g/Math.pow(e*(o<16?.511:.040975*o/(1+.01765*o)),2)+y/Math.pow(t*_,2)+v/Math.pow(_*(x*b+1-x),2))}},eU=()=>{let e=E("lab65");return(t,r)=>{let i=e(t),n=e(r),a=i.l-n.l,o=i.a-n.a,s=i.b-n.b;return Math.abs(a)+Math.sqrt(o*o+s*s)}},eV=()=>eR("yiq",[.5053,.299,.1957]),eq=()=>eR("itp",[518400,129600,518400]),eH=e=>{let t=e.reduce((e,t)=>{if(void 0!==t){let r=t*Math.PI/180;e.sin+=Math.sin(r),e.cos+=Math.cos(r)}return e},{sin:0,cos:0}),r=180*Math.atan2(t.sin,t.cos)/Math.PI;return r<0?360+r:r},eG=e=>{let t=e.filter(e=>void 0!==e);return t.length?t.reduce((e,t)=>e+t,0)/t.length:void 0};function eW(e,t="rgb",r){let i=O(t),n=e.map(E(t));return i.channels.reduce((e,t)=>{let a=n.map(e=>e[t]).filter(e=>void 0!==e);if(a.length){let n;n="function"==typeof r?r:r&&"function"==typeof r[t]?r[t]:i.average&&"function"==typeof i.average[t]?i.average[t]:eG,e[t]=n(a,t)}return e},{mode:t})}var eY={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:eP},toMode:{rgb:eI},interpolate:{h:{use:el,fixup:eM},s:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:ez},average:{h:eH}},eZ=({l:e,a:t,b:r,alpha:i},n="lch")=>{void 0===t&&(t=0),void 0===r&&(r=0);let a=Math.sqrt(t*t+r*r),o={mode:n,l:e,c:a};return a&&(o.h=ew(180*Math.atan2(r,t)/Math.PI)),void 0!==i&&(o.alpha=i),o},e$=({l:e,c:t,h:r,alpha:i},n="lab")=>{void 0===r&&(r=0);let a={mode:n,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return void 0!==i&&(a.alpha=i),a},eX={X:.3457/.3585,Y:1,Z:.8251046025104602},eK={X:.3127/.329,Y:1,Z:.3583/.329},eJ=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,eQ=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz65",x:eJ(a)*eK.X,y:eJ(n)*eK.Y,z:eJ(o)*eK.Z};return void 0!==i&&(s.alpha=i),s},e0=e=>eb(eQ(e)),e1=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,e2=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=e1(e/eK.X),a=e1(t/eK.Y),o={mode:"lab65",l:116*a-16,a:500*(n-a),b:200*(a-e1(r/eK.Z))};return void 0!==i&&(o.alpha=i),o},e3=e=>{let t=e2(ey(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},e5=26/180*Math.PI,e4=Math.cos(e5),e6=Math.sin(e5),e8=100/Math.log(1.39),e7=({l:e,c:t,h:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"lab65",l:(Math.exp(e/e8)-1)/.0039},a=(Math.exp(.0435*t*1)-1)/.075,o=a*Math.cos(r/180*Math.PI-e5),s=a*Math.sin(r/180*Math.PI-e5);return n.a=o*e4-s/.83*e6,n.b=o*e6+s/.83*e4,void 0!==i&&(n.alpha=i),n},e9=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=t*e4+r*e6,a=.83*(r*e4-t*e6),o={mode:"dlch",l:e8/1*Math.log(1+.0039*e),c:Math.log(1+.075*Math.sqrt(n*n+a*a))/.0435};return o.c&&(o.h=ew((Math.atan2(a,n)+e5)/Math.PI*180)),void 0!==i&&(o.alpha=i),o},te=e=>e7(eZ(e,"dlch")),tt=e=>e$(e9(e),"dlab"),tr={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:te,rgb:e=>e0(te(e))},fromMode:{lab65:tt,rgb:e=>tt(e3(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:el,a:el,b:el,alpha:{use:el,fixup:ec}}},ti={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:e7,dlab:e=>e$(e,"dlab"),rgb:e=>e0(e7(e))},fromMode:{lab65:e9,dlab:e=>eZ(e,"dlch"),rgb:e=>e9(e3(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:el,c:el,h:{use:el,fixup:eM},alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}};function tn({h:e,s:t,i:r,alpha:i}){e=ew(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1-t)};break;case 1:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1+t*(3/(2-n)-1)),b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r*(1+t*(3/(2-n)-1)),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;case 3:a={r:r*(1-t),g:r*(1+t*(3*(1-n)/(2-n)-1)),b:r*(1+t*(3/(2-n)-1))};break;case 4:a={r:r*(1+t*(3*(1-n)/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3/(2-n)-1))};break;case 5:a={r:r*(1+t*(3/(2-n)-1)),g:r*(1-t),b:r*(1+t*(3*(1-n)/(2-n)-1))};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",void 0!==i&&(a.alpha=i),a}function ta({r:e,g:t,b:r,alpha:i}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsi",s:e+t+r===0?0:1-3*a/(e+t+r),i:(e+t+r)/3};return n-a!=0&&(o.h=(n===e?(t-r)/(n-a)+(t{let t=e.match(tc);if(!t)return;let r={mode:"hsl"};return void 0!==t[3]?r.h=+t[3]:void 0!==t[1]&&void 0!==t[2]&&(r.h=((e,t)=>{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return 360*e}})(t[1],t[2])),void 0!==t[4]&&(r.s=Math.min(Math.max(0,t[4]/100),1)),void 0!==t[5]&&(r.l=Math.min(Math.max(0,t[5]/100),1)),void 0!==t[6]?r.alpha=Math.max(0,Math.min(1,t[6]/100)):void 0!==t[7]&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},th=function(e,t){if(!t||"hsl"!==t[0]&&"hsla"!==t[0])return;let r={mode:"hsl"},[,i,n,a,o]=t;if(i.type!==H){if(i.type===q)return;r.h=i.value}if(n.type!==H){if("hue"===n.type)return;r.s=n.value/100}if(a.type!==H){if("hue"===a.type)return;r.l=a.value/100}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},td={mode:"hsl",toMode:{rgb:ts},fromMode:{rgb:tl},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[th,tu],serialize:e=>`hsl(${void 0!==e.h?e.h:"none"} ${void 0!==e.s?100*e.s+"%":"none"} ${void 0!==e.l?100*e.l+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:el,fixup:eM},s:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:ez},average:{h:eH}};function tf({h:e,s:t,v:r,alpha:i}){e=ew(void 0!==e?e:0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.abs(e/60%2-1),a;switch(Math.floor(e/60)){case 0:a={r:r,g:r*(1-t*n),b:r*(1-t)};break;case 1:a={r:r*(1-t*n),g:r,b:r*(1-t)};break;case 2:a={r:r*(1-t),g:r,b:r*(1-t*n)};break;case 3:a={r:r*(1-t),g:r*(1-t*n),b:r};break;case 4:a={r:r*(1-t*n),g:r*(1-t),b:r};break;case 5:a={r:r,g:r*(1-t),b:r*(1-t*n)};break;default:a={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return a.mode="rgb",void 0!==i&&(a.alpha=i),a}function tp({r:e,g:t,b:r,alpha:i}){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.max(e,t,r),a=Math.min(e,t,r),o={mode:"hsv",s:0===n?0:1-a/n,v:n};return n-a!=0&&(o.h=(n===e?(t-r)/(n-a)+(t1){let e=t+r;t/=e,r/=e}return tf({h:e,s:1===r?1:1-t/(1-r),v:1-r,alpha:i})}function ty(e){let t=tp(e);if(void 0===t)return;let r=void 0!==t.s?t.s:0,i=void 0!==t.v?t.v:0,n={mode:"hwb",w:(1-r)*i,b:1-i};return void 0!==t.h&&(n.h=t.h),void 0!==t.alpha&&(n.alpha=t.alpha),n}var tv=function(e,t){if(!t||"hwb"!==t[0])return;let r={mode:"hwb"},[,i,n,a,o]=t;if(i.type!==H){if(i.type===q)return;r.h=i.value}if(n.type!==H){if("hue"===n.type)return;r.w=n.value/100}if(a.type!==H){if("hue"===a.type)return;r.b=a.value/100}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},tx={mode:"hwb",toMode:{rgb:tg},fromMode:{rgb:ty},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[tv],serialize:e=>`hwb(${void 0!==e.h?e.h:"none"} ${void 0!==e.w?100*e.w+"%":"none"} ${void 0!==e.b?100*e.b+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:el,fixup:eM},w:el,b:el,alpha:{use:el,fixup:ec}},difference:{h:eD},average:{h:eH}};function tb(e){if(e<0)return 0;let t=Math.pow(e,.012683313515655966);return 1e4*Math.pow(Math.max(0,t-.8359375)/(18.8515625-18.6875*t),6.277394636015326)}function t_(e){if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),78.84375)}var tw=e=>Math.max(e/203,0),tT=({i:e,t:t,p:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=tb(e+.008609037037932761*t+.11102962500302593*r),a=tb(e-.00860903703793275*t-.11102962500302599*r),o=tb(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:tw(2.070152218389422*n-1.3263473389671556*a+.2066510476294051*o),y:tw(.3647385209748074*n+.680566024947227*a-.0453045459220346*o),z:tw(-.049747207535812*n-.0492609666966138*a+1.1880659249923042*o)};return void 0!==i&&(s.alpha=i),s},tM=(e=0)=>Math.max(203*e,0),tk=({x:e,y:t,z:r,alpha:i})=>{let n=tM(e),a=tM(t),o=tM(r),s=t_(.3592832590121217*n+.6976051147779502*a-.0358915932320289*o),l=t_(-.1920808463704995*n+1.1004767970374323*a+.0753748658519118*o),c=t_(.0070797844607477*n+.0748396662186366*a+.8433265453898765*o),u={mode:"itp",i:.5*s+.5*l,t:1.61376953125*s-3.323486328125*l+1.709716796875*c,p:4.378173828125*s-4.24560546875*l-.132568359375*c};return void 0!==i&&(u.alpha=i),u},tA={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:tT,rgb:e=>eb(tT(e))},fromMode:{xyz65:tk,rgb:e=>tk(ey(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:el,t:el,p:el,alpha:{use:el,fixup:ec}}},tS=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,.1593017578125);return Math.pow((.8359375+18.8515625*t)/(1+18.6875*t),134.03437499999998)},tE=(e=0)=>Math.max(203*e,0),tC=({x:e,y:t,z:r,alpha:i})=>{e=tE(e),t=tE(t);let n=1.15*e-.15*(r=tE(r)),a=.66*t+.34*e,o=tS(.41478972*n+.579999*a+.014648*r),s=tS(-.20151*n+1.120649*a+.0531008*r),l=tS(-.0166008*n+.2648*a+.6684799*r),c=(o+s)/2,u={mode:"jab",j:.44*c/(1-.56*c)-16295499532821565e-27,a:3.524*o-4.066708*s+.542708*l,b:.199076*o+1.096799*s-1.295875*l};return void 0!==i&&(u.alpha=i),u},tL=e=>{if(e<0)return 0;let t=Math.pow(e,.007460772656268216);return 1e4*Math.pow((.8359375-t)/(18.6875*t-18.8515625),6.277394636015326)},tP=({j:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(e+16295499532821565e-27)/(.44+.56*(e+16295499532821565e-27)),a=tL(n+.13860504*t+.058047316*r),o=tL(n-.13860504*t-.058047316*r),s=tL(n-.096019242*t-.8118919*r),l={mode:"xyz65",x:(1.661373024652174*a-.914523081304348*o+.23136208173913045*s)/203,y:(-.3250758611844533*a+1.571847026732543*o-.21825383453227928*s)/203,z:(-.090982811*a-.31272829*o+1.5227666*s)/203};return void 0!==i&&(l.alpha=i),l},tI=e=>{let t=tC(ey(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},tz=e=>eb(tP(e)),tD={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:tI,xyz65:tC},toMode:{rgb:tz,xyz65:tP},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:el,a:el,b:el,alpha:{use:el,fixup:ec}}},tO=({j:e,a:t,b:r,alpha:i})=>{void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"jch",j:e,c:n};return n&&(a.h=ew(180*Math.atan2(r,t)/Math.PI)),void 0!==i&&(a.alpha=i),a},tR=({j:e,c:t,h:r,alpha:i})=>{void 0===r&&(r=0);let n={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n},tF={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:tR,rgb:e=>tz(tR(e))},fromMode:{rgb:e=>tO(tI(e)),jab:tO},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:el,fixup:eM},c:el,j:el,alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}},tj=e=>Math.pow(e,3)>.008856451679035631?Math.pow(e,3):(116*e-16)/903.2962962962963,tB=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=(e+16)/116,a=t/500+n,o=n-r/200,s={mode:"xyz50",x:tj(a)*eX.X,y:tj(n)*eX.Y,z:tj(o)*eX.Z};return void 0!==i&&(s.alpha=i),s},tN=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=ex({r:3.1341359569958707*e-1.6173863321612538*t-.4906619460083532*r,g:-.978795502912089*e+1.916254567259524*t+.03344273116131949*r,b:.07195537988411677*e-.2289768264158322*t+1.405386058324125*r});return void 0!==i&&(n.alpha=i),n},tU=e=>tN(tB(e)),tV=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*i,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*i,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*i};return void 0!==n&&(a.alpha=n),a},tq=e=>e>.008856451679035631?Math.cbrt(e):(903.2962962962963*e+16)/116,tH=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=tq(e/eX.X),a=tq(t/eX.Y),o={mode:"lab",l:116*a-16,a:500*(n-a),b:200*(a-tq(r/eX.Z))};return void 0!==i&&(o.alpha=i),o},tG=e=>{let t=tH(tV(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},tW=function(e,t){if(!t||"lab"!==t[0])return;let r={mode:"lab"},[,i,n,a,o]=t;if("hue"!==i.type&&"hue"!==n.type&&"hue"!==a.type)return i.type!==H&&(r.l=Math.min(Math.max(0,i.value),100)),n.type!==H&&(r.a=n.type===V?n.value:125*n.value/100),a.type!==H&&(r.b=a.type===V?a.value:125*a.value/100),o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},tY={mode:"lab",toMode:{xyz50:tB,rgb:tU},fromMode:{xyz50:tH,rgb:tG},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[tW],serialize:e=>`lab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:el,a:el,b:el,alpha:{use:el,fixup:ec}}},tZ=r(d({},tY),n({mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:eQ,rgb:e0},fromMode:{xyz65:e2,rgb:e3},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}})),t$=function(e,t){if(!t||"lch"!==t[0])return;let r={mode:"lch"},[,i,n,a,o]=t;if(i.type!==H){if("hue"===i.type)return;r.l=Math.min(Math.max(0,i.value),100)}if(n.type!==H&&(r.c=Math.max(0,n.type===V?n.value:150*n.value/100)),a.type!==H){if(a.type===q)return;r.h=a.value}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},tX={mode:"lch",toMode:{lab:e$,rgb:e=>tU(e$(e))},fromMode:{rgb:e=>eZ(tG(e)),lab:eZ},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[t$],serialize:e=>`lch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:el,fixup:eM},c:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}},tK=r(d({},tX),n({mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>e$(e,"lab65"),rgb:e=>e0(e$(e,"lab65"))},fromMode:{rgb:e=>eZ(e3(e),"lch65"),lab65:e=>eZ(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}})),tJ=({l:e,u:t,v:r,alpha:i})=>{void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.sqrt(t*t+r*r),a={mode:"lchuv",l:e,c:n};return n&&(a.h=ew(180*Math.atan2(r,t)/Math.PI)),void 0!==i&&(a.alpha=i),a},tQ=({l:e,c:t,h:r,alpha:i})=>{void 0===r&&(r=0);let n={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return void 0!==i&&(n.alpha=i),n},t0=(e,t,r)=>4*e/(e+15*t+3*r),t1=(e,t,r)=>9*t/(e+15*t+3*r),t2=t0(eX.X,eX.Y,eX.Z),t3=t1(eX.X,eX.Y,eX.Z),t5=({x:e,y:t,z:r,alpha:i})=>{let n;void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let a=(n=t/eX.Y)<=.008856451679035631?903.2962962962963*n:116*Math.cbrt(n)-16,o=t0(e,t,r),s=t1(e,t,r);isFinite(o)&&isFinite(s)?(o=13*a*(o-t2),s=13*a*(s-t3)):a=o=s=0;let l={mode:"luv",l:a,u:o,v:s};return void 0!==i&&(l.alpha=i),l},t4=(i=eX.X,4*i/(i+15*eX.Y+3*eX.Z)),t6=(a=eX.X,9*(o=eX.Y)/(a+15*o+3*eX.Z)),t8=({l:e,u:t,v:r,alpha:i})=>{if(void 0===e&&(e=0),0===e)return{mode:"xyz50",x:0,y:0,z:0};void 0===t&&(t=0),void 0===r&&(r=0);let n=t/(13*e)+t4,a=r/(13*e)+t6,o=eX.Y*(e<=8?e/903.2962962962963:Math.pow((e+16)/116,3)),s={mode:"xyz50",x:9*n*o/(4*a),y:o,z:o*(12-3*n-20*a)/(4*a)};return void 0!==i&&(s.alpha=i),s},t7={mode:"lchuv",toMode:{luv:tQ,rgb:e=>tN(t8(tQ(e)))},fromMode:{rgb:e=>tJ(t5(tV(e))),luv:tJ},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:el,fixup:eM},c:el,l:el,alpha:{use:el,fixup:ec}},difference:{h:eO},average:{h:eH}},t9=r(d({},eu),n({mode:"lrgb",toMode:{rgb:ex},fromMode:{rgb:eg},parse:["srgb-linear"],serialize:"srgb-linear"})),re={mode:"luv",toMode:{xyz50:t8,rgb:e=>tN(t8(e))},fromMode:{xyz50:t5,rgb:e=>t5(tV(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:el,u:el,v:el,alpha:{use:el,fixup:ec}}},rt=({r:e,g:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),a=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*n+.7936177747023054*a-.0040720430116193*o,a:1.9779985324311684*n-2.42859224204858*a+.450593709617411*o,b:.0259040424655478*n+.7827717124575296*a-.8086757549230774*o};return void 0!==i&&(s.alpha=i),s},rr=e=>{let t=rt(eg(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},ri=({l:e,a:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),a=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*n-3.3077115392580616*a+.2309699031821044*o,g:-1.2684379732850317*n+2.6097573492876887*a-.3413193760026573*o,b:-.0041960761386756*n-.7034186179359362*a+1.7076146940746117*o};return void 0!==i&&(s.alpha=i),s},rn=e=>ex(ri(e));function ra(e){return .5*(1.170873786407767*e-.206+Math.sqrt((1.170873786407767*e-.206)*(1.170873786407767*e-.206)+.14050485436893204*e))}function ro(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function rs(e,t){let r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x=(-1.88170328*e-.80936493*t>1?(r=1.19086277,i=1.76576728,n=.59662641,a=.75515197,o=.56771245,s=4.0767416621,l=-3.3077115913,c=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,i=-.45954404,n=.08285427,a=.1254107,o=.14503204,s=-1.2684380046,l=2.6097574011,c=-.3413193965):(r=1.35733652,i=-.00915799,n=-1.1513021,a=-.50559606,o=.00692167,s=-.0041960863,l=-.7034186147,c=1.707614701),u=r+i*e+n*t+a*e*e+o*e*t,h=.3963377774*e+.2158037573*t,d=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,y=s*((p=1+u*h)*p*p)+l*((m=1+u*d)*m*m)+c*((g=1+u*f)*g*g),u-=y*(v=3*h*p*p*s+3*d*m*m*l+3*f*g*g*c)/(v*v-.5*y*(6*h*h*p*s+6*d*d*m*l+6*f*f*g*c))),b=ri({l:1,a:x*e,b:x*t}),_=Math.cbrt(1/Math.max(b.r,b.g,b.b));return[_,_*x]}function rl(e,t,r=null){r||(r=rs(e,t));let i=r[0],n=r[1];return[n/i,n/(1-i)]}function rc(e,t,r){let i=rs(t,r),n=function(e,t,r,i,n=null){let a;if(n||(n=rs(e,t)),(r-i)*n[1]-(n[0]-i)*1<=0)a=n[1]*i/(+n[0]+n[1]*(i-r));else{a=n[1]*(i-1)/(+(n[0]-1)+n[1]*(i-r));{let n=r-i,o=.3963377774*e+.2158037573*t,s=-.1055613458*e-.0638541728*t,l=-.0894841775*e-1.291485548*t,c=n+ +o,u=n+ +s,h=n+ +l;{let e=i*(1-a)+a*r,t=+a,n=e+t*o,d=e+t*s,f=e+t*l,p=n*n*n,m=d*d*d,g=f*f*f,y=3*c*n*n,v=3*u*d*d,x=3*h*f*f,b=6*c*c*n,_=6*u*u*d,w=6*h*h*f,T=4.0767416621*p-3.3077115913*m+.2309699292*g-1,M=4.0767416621*y-3.3077115913*v+.2309699292*x,k=M/(M*M-.5*T*(4.0767416621*b-3.3077115913*_+.2309699292*w)),A=-T*k,S=-1.2684380046*p+2.6097574011*m-.3413193965*g-1,E=-1.2684380046*y+2.6097574011*v-.3413193965*x,C=E/(E*E-.5*S*(-1.2684380046*b+2.6097574011*_-.3413193965*w)),L=-S*C,P=-.0041960863*p-.7034186147*m+1.707614701*g-1,I=-.0041960863*y-.7034186147*v+1.707614701*x,z=I/(I*I-.5*P*(-.0041960863*b-.7034186147*_+1.707614701*w)),D=-P*z;a+=Math.min(A=k>=0?A:1e6,Math.min(L=C>=0?L:1e6,D=z>=0?D:1e6))}}}return a}(t,r,e,e,i),a=rl(t,r,i),o=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=n/Math.min(e*a[0],(1-e)*a[1]),c=e*o,u=(1-e)*s,h=.9*l*Math.sqrt(Math.sqrt(1/(1/(c*c*c*c)+1/(u*u*u*u))));return[Math.sqrt(1/(1/((c=.4*e)*c)+1/((u=(1-e)*.8)*u))),h,n]}function ru(e){let t=void 0!==e.l?e.l:0,r=void 0!==e.a?e.a:0,i=void 0!==e.b?e.b:0,n={mode:"okhsl",l:ra(t)};void 0!==e.alpha&&(n.alpha=e.alpha);let a=Math.sqrt(r*r+i*i);if(!a)return n.s=0,n;let[o,s,l]=rc(t,r/a,i/a),c;if(aru(rr(e))},toMode:{oklab:rh,rgb:e=>rn(rh(e))}}));function rf(e){let t=void 0!==e.l?e.l:0,r=void 0!==e.a?e.a:0,i=void 0!==e.b?e.b:0,n=Math.sqrt(r*r+i*i),a=n?r/n:1,o=n?i/n:1,[s,l]=rl(a,o),c=l/(n+t*l),u=c*t,h=c*n,d=ro(u),f=h*d/u,p=ri({l:d,a:a*f,b:o*f}),m=Math.cbrt(1/Math.max(p.r,p.g,p.b,0));t/=m;let g={mode:"okhsv",s:(n=n/m*ra(t)/t)?(.5+l)*h/(.5*l+l*(1-.5/s)*h):0,v:(t=ra(t))?t/u:0};return g.s&&(g.h=ew(180*Math.atan2(i,r)/Math.PI)),void 0!==e.alpha&&(g.alpha=e.alpha),g}function rp(e){let t={mode:"oklab"};void 0!==e.alpha&&(t.alpha=e.alpha);let r=void 0!==e.h?e.h:0,i=void 0!==e.s?e.s:0,n=void 0!==e.v?e.v:0,a=Math.cos(r/180*Math.PI),o=Math.sin(r/180*Math.PI),[s,l]=rl(a,o),c=1-.5/s,u=1-.5*i/(.5+l-l*c*i),h=i*l*.5/(.5+l-l*c*i),d=ro(u),f=h*d/u,p=ri({l:d,a:a*f,b:o*f}),m=Math.cbrt(1/Math.max(p.r,p.g,p.b,0)),g=ro(n*u),y=h*g/u;return t.l=g*m,t.a=y*a*m,t.b=y*o*m,t}var rm=r(d({},tm),n({mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:rf,rgb:e=>rf(rr(e))},toMode:{oklab:rp,rgb:e=>rn(rp(e))}})),rg=function(e,t){if(!t||"oklab"!==t[0])return;let r={mode:"oklab"},[,i,n,a,o]=t;if("hue"!==i.type&&"hue"!==n.type&&"hue"!==a.type)return i.type!==H&&(r.l=Math.min(Math.max(0,i.type===V?i.value:i.value/100),1)),n.type!==H&&(r.a=n.type===V?n.value:.4*n.value/100),a.type!==H&&(r.b=a.type===V?a.value:.4*a.value/100),o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},ry=r(d({},tY),n({mode:"oklab",toMode:{lrgb:ri,rgb:rn},fromMode:{lrgb:rt,rgb:rr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[rg],serialize:e=>`oklab(${void 0!==e.l?e.l:"none"} ${void 0!==e.a?e.a:"none"} ${void 0!==e.b?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`})),rv=function(e,t){if(!t||"oklch"!==t[0])return;let r={mode:"oklch"},[,i,n,a,o]=t;if(i.type!==H){if("hue"===i.type)return;r.l=Math.min(Math.max(0,i.type===V?i.value:i.value/100),1)}if(n.type!==H&&(r.c=Math.max(0,n.type===V?n.value:.4*n.value/100)),a.type!==H){if(a.type===q)return;r.h=a.value}return o.type!==H&&(r.alpha=Math.min(1,Math.max(0,o.type===V?o.value:o.value/100))),r},rx=r(d({},tX),n({mode:"oklch",toMode:{oklab:e=>e$(e,"oklab"),rgb:e=>rn(e$(e,"oklab"))},fromMode:{rgb:e=>eZ(rr(e),"oklch"),oklab:e=>eZ(e,"oklch")},parse:[rv],serialize:e=>`oklch(${void 0!==e.l?e.l:"none"} ${void 0!==e.c?e.c:"none"} ${void 0!==e.h?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}})),rb=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*i,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*i,z:0*t+.0451133818589026*r+1.043944368900976*i};return void 0!==n&&(a.alpha=n),a},r_=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=ex({r:2.4934969119414263*e-.9313836179191242*t-.402710784450717*r,g:-.8294889695615749*e+1.7626640603183465*t+.0236246858419436*r,b:.0358458302437845*e-.0761723892680418*t+.9568845240076871*r},"p3");return void 0!==i&&(n.alpha=i),n},rw=r(d({},eu),n({mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>r_(ey(e)),xyz65:r_},toMode:{rgb:e=>eb(rb(e)),xyz65:rb}})),rT=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},rM=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"prophoto",r:rT(1.3457868816471585*e-.2555720873797946*t-.0511018649755453*r),g:rT(-.5446307051249019*e+1.5082477428451466*t+.0205274474364214*r),b:rT(0*e+0*t+1.2119675456389452*r)};return void 0!==i&&(n.alpha=i),n},rk=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},rA=e=>{let t=rk(e.r),r=rk(e.g),i=rk(e.b),n={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*i,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*i,z:0*t+0*r+.8251046025104602*i};return void 0!==e.alpha&&(n.alpha=e.alpha),n},rS=r(d({},eu),n({mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:rM,rgb:e=>rM(tV(e))},toMode:{xyz50:rA,rgb:e=>tN(rA(e))}})),rE=e=>{let t=Math.abs(e);return t>.018053968510807?(Math.sign(e)||1)*(1.09929682680944*Math.pow(t,.45)-(1.09929682680944-1)):4.5*e},rC=({x:e,y:t,z:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"rec2020",r:rE(1.7166511879712683*e-.3556707837763925*t-.2533662813736599*r),g:rE(-.6666843518324893*e+1.6164812366349395*t+.0157685458139111*r),b:rE(.0176398574453108*e-.0427706132578085*t+.9421031212354739*r)};return void 0!==i&&(n.alpha=i),n},rL=(e=0)=>{let t=Math.abs(e);return t<.08124285829863151?e/4.5:(Math.sign(e)||1)*Math.pow((t+1.09929682680944-1)/1.09929682680944,1/.45)},rP=e=>{let t=rL(e.r),r=rL(e.g),i=rL(e.b),n={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*i,y:.262700212011267*t+.6779980715188708*r+.059301716469862*i,z:0*t+.0280726930490874*r+1.0609850577107909*i};return void 0!==e.alpha&&(n.alpha=e.alpha),n},rI=r(d({},eu),n({mode:"rec2020",fromMode:{xyz65:rC,rgb:e=>rC(ey(e))},toMode:{xyz65:rP,rgb:e=>eb(rP(e))},parse:["rec2020"],serialize:"rec2020"})),rz=Math.cbrt(.0037930732552754493),rD=e=>Math.cbrt(e)-rz,rO=e=>{let{r:t,g:r,b:i,alpha:n}=eg(e),a=rD(.3*t+.622*r+.078*i+.0037930732552754493),o=rD(.23*t+.692*r+.078*i+.0037930732552754493),s={mode:"xyb",x:(a-o)/2,y:(a+o)/2,b:rD(.2434226892454782*t+.2047674442449682*r+.5518098665095535*i+.0037930732552754493)-(a+o)/2};return void 0!==n&&(s.alpha=n),s},rR=e=>Math.pow(e+rz,3),rF=({x:e,y:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n=rR(e+t)-.0037930732552754493,a=rR(t-e)-.0037930732552754493,o=rR(r+t)-.0037930732552754493,s=ex({r:11.031566904639861*n-9.866943908131562*a-.16462299650829934*o,g:-3.2541473810744237*n+4.418770377582723*a-.16462299650829934*o,b:-3.6588512867136815*n+2.7129230459360922*a+1.9459282407775895*o});return void 0!==i&&(s.alpha=i),s},rj={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:rF},fromMode:{rgb:rO},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:el,y:el,b:el,alpha:{use:el,fixup:ec}}},rB={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:tN,lab:tH},fromMode:{rgb:tV,lab:tB},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:el,y:el,z:el,alpha:{use:el,fixup:ec}}},rN=e=>{let{x:t,y:r,z:i,alpha:n}=e;void 0===t&&(t=0),void 0===r&&(r=0),void 0===i&&(i=0);let a={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*i,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*i,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*i};return void 0!==n&&(a.alpha=n),a},rU=e=>{let{x:t,y:r,z:i,alpha:n}=e;void 0===t&&(t=0),void 0===r&&(r=0),void 0===i&&(i=0);let a={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*i,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*i,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*i};return void 0!==n&&(a.alpha=n),a},rV={mode:"xyz65",toMode:{rgb:eb,xyz50:rN},fromMode:{rgb:ey,xyz50:rU},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:el,y:el,z:el,alpha:{use:el,fixup:ec}}},rq=({r:e,g:t,b:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return void 0!==i&&(n.alpha=i),n},rH=({y:e,i:t,q:r,alpha:i})=>{void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0);let n={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return void 0!==i&&(n.alpha=i),n},rG={mode:"yiq",toMode:{rgb:rH},fromMode:{rgb:rq},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:el,i:el,q:el,alpha:{use:el,fixup:ec}}},rW=(e=4)=>t=>{let r;return"number"==typeof t?Math.round(t*(r=Math.pow(10,r=e)))/r:t},rY=rW(2),rZ=e=>Math.max(0,Math.min(1,e||0)),r$=e=>Math.round(255*rZ(e)),rX=E("rgb"),rK=E("hsl"),rJ=e=>{if(void 0!==e)return"#"+(0x1000000|r$(e.r)<<16|r$(e.g)<<8|r$(e.b)).toString(16).slice(1)},rQ=e=>{if(void 0===e)return;let t=r$(void 0!==e.alpha?e.alpha:1);return rJ(e)+(256|t).toString(16).slice(1)},r0=e=>{if(void 0===e)return;let t=r$(e.r),r=r$(e.g),i=r$(e.b);return void 0===e.alpha||1===e.alpha?`rgb(${t}, ${r}, ${i})`:`rgba(${t}, ${r}, ${i}, ${rY(rZ(e.alpha))})`},r1=e=>{if(void 0===e)return;let t=rY(e.h||0),r=rY(100*rZ(e.s))+"%",i=rY(100*rZ(e.l))+"%";return void 0===e.alpha||1===e.alpha?`hsl(${t}, ${r}, ${i})`:`hsla(${t}, ${r}, ${i}, ${rY(rZ(e.alpha))})`},r2=e=>{let t=S(e);if(!t)return;let r=O(t.mode);if(!r.serialize||"string"==typeof r.serialize){let e=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((r,i)=>{"alpha"!==r&&(e+=(i?" ":"")+(void 0!==t[r]?t[r]:"none"))}),void 0!==t.alpha&&t.alpha<1&&(e+=` / ${t.alpha}`),e+")"}if("function"==typeof r.serialize)return r.serialize(t)},r3=e=>rJ(rX(e)),r5=e=>rQ(rX(e)),r4=e=>r0(rX(e)),r6=e=>r1(rK(e)),r8={normal:(e,t)=>t,multiply:(e,t)=>e*t,screen:(e,t)=>e+t-e*t,"hard-light":(e,t)=>t<.5?2*e*t:2*t*(1-e)-1,overlay:(e,t)=>e<.5?2*t*e:2*e*(1-t)-1,darken:(e,t)=>Math.min(e,t),lighten:(e,t)=>Math.max(e,t),"color-dodge":(e,t)=>0===e?0:1===t?1:Math.min(1,e/(1-t)),"color-burn":(e,t)=>1===e?1:0===t?0:1-Math.min(1,(1-e)/t),"soft-light":(e,t)=>t<.5?e-(1-2*t)*e*(1-e):e+(2*t-1)*((e<.25?((16*e-12)*e+4)*e:Math.sqrt(e))-e),difference:(e,t)=>Math.abs(e-t),exclusion:(e,t)=>e+t-2*e*t},r7=(e,t="normal",r="rgb")=>{let i="function"==typeof t?t:r8[t],n=E(r),a=O(r).channels;return e.map(e=>{let t=n(e);return void 0===t.alpha&&(t.alpha=1),t}).reduce((e,t)=>{if(void 0===e)return t;let n=t.alpha+e.alpha*(1-t.alpha);return a.reduce((r,a)=>("alpha"!==a&&(0===n?r[a]=0:(r[a]=t.alpha*(1-e.alpha)*t[a]+t.alpha*e.alpha*i(e[a],t[a])+(1-t.alpha)*e.alpha*e[a],r[a]=Math.max(0,Math.min(1,r[a]/n)))),r),{mode:r,alpha:n})})},r9=(e="rgb",t={})=>{let r=O(e),i=Object.keys(t).reduce((e,r)=>{let i=t[r];return e[r]=Array.isArray(i)?i:[i,i],e},{});return r.channels.reduce((e,t)=>((i.alpha||"alpha"!==t)&&(e[t]=(([e,t])=>e+Math.random()*(t-e))(i[t]||r.ranges[t])),e),{mode:e})},ie=(e,t="rgb",r=!1)=>{let i=t?O(t).channels:null,n=t?E(t):S;return a=>{let o=n(a);if(!o)return;let s=(i||O(o.mode).channels).reduce((r,i)=>{let n=e(o[i],i,o,t);return void 0===n||isNaN(n)||(r[i]=n),r},{mode:o.mode});if(!r)return s;let l=S(a);return l&&l.mode!==s.mode?E(l.mode)(s):s}},it=(e,t,r)=>"alpha"!==t?(e||0)*(void 0!==r.alpha?r.alpha:1):e,ir=(e,t,r)=>"alpha"!==t&&0!==r.alpha?(e||0)/(void 0!==r.alpha?r.alpha:1):e,ii=(e=1,t=0)=>(r,i)=>"alpha"!==i?r*e+t:r,ia=(e=1,t=1,r=0)=>(i,n)=>"alpha"!==n?e*Math.pow(i,t)+r:i,io=(e=.5)=>t=>e<=0?1:e>=1?0:Math.pow(t,Math.log(.5)/Math.log(e)),is=(e,t="rgb",r,i)=>{let n=O(t),a=E(t),o=[],s=[],l={};e.forEach(e=>{Array.isArray(e)?(o.push(a(e[0])),s.push(e[1])):"number"==typeof e||"function"==typeof e?l[s.length]=e:(o.push(a(e)),s.push(void 0))}),(e=>{void 0===e[0]&&(e[0]=0),void 0===e[e.length-1]&&(e[e.length-1]=1);let t=1,r,i,n,a;for(;t{let i,a,s;return i=r&&"object"==typeof r&&(a=r[t])&&"object"==typeof a&&r[t].fixup?r[t].fixup:(s=n.interpolate[t])&&"object"==typeof s&&n.interpolate[t].fixup?n.interpolate[t].fixup:e=>e,e[t]=i(o.map(e=>e[t])),e},{});if(i){let e=o.map((e,r)=>n.channels.reduce((e,t)=>(e[t]=c[t][r],e),{mode:t}));c=n.channels.reduce((r,n)=>(r[n]=e.map(e=>{let r=i(e[n],n,e,t);return isNaN(r)?void 0:r}),r),{})}let u=n.channels.reduce((e,t)=>{let i,a,o;return"function"==typeof r?i=r:r&&"object"==typeof r&&"function"==typeof r[t]?i=r[t]:r&&"object"==typeof r&&(a=r[t])&&"object"==typeof a&&r[t].use?i=r[t].use:"function"==typeof n.interpolate[t]?i=n.interpolate[t]:(o=n.interpolate[t])&&"object"==typeof o&&(i=n.interpolate[t].use),e[t]=i(c[t]),e},{}),h=o.length-1;return e=>{if((e=Math.min(Math.max(0,e),1))<=s[0])return o[0];if(e>s[h])return o[h];let r=0;for(;s[r]{let r=u[t](f);return void 0!==r&&(e[t]=r),e},{mode:t})}},il=(e,t="rgb",r)=>is(e,t,r),ic=(e,t)=>(r,i="rgb",n)=>{let a=t?ie(t,i):void 0,o=is(r,i,n,e);return a?e=>a(o(e)):o},iu=ic(it,ir),ih=(e,t,r,i,n)=>{let a=n*n,o=a*n;return((1-3*n+3*a-o)*e+(4-6*a+3*o)*t+(1+3*n+3*a-3*o)*r+o*i)/6},id=e=>t=>{let r=e.length-1,i=t>=1?r-1:Math.max(0,Math.floor(t*r));return ih(i>0?e[i-1]:2*e[i]-e[i+1],e[i],e[i+1],it=>{let r,i,n,a,o=e.length-1,s=Math.floor(t*o);return ih(e[(s-1+(r=e.length))%r],e[(s+(i=e.length))%i],e[(s+1+(n=e.length))%n],e[(s+2+(a=e.length))%a],(t-s/o)*o)},im=e=>{let t,r=e.length-1,i=Array(r),n=Array(r),a=Array(r);for(i[1]=1/4,n[1]=(6*e[1]-e[0])/4,t=2;t0&&(a[r-1]=n[r-1]),t=r-2;t>0;--t)a[t]=n[t]-i[t]*a[t+1];return a},ig=e=>id(im(e)),iy=e=>ip(im(e)),iv=Math.sign,ix=Math.min,ib=Math.abs,i_=e=>{let t=e.length-1,r=[],i=[],n=[];for(let a=0;a0?.5*(e[a+1]-e[a-1])*t:void 0),n.push(a>0?(iv(r[a-1])+iv(r[a]))*ix(ib(r[a-1]),ib(r[a]),.5*ib(i[a])):void 0);return[r,i,n]},iw=(e,t,r)=>{let i=e.length-1,n=i*i;return a=>{let o;o=a>=1?i-1:Math.max(0,Math.floor(a*i));let s=a-o/i,l=s*s;return(t[o]+t[o+1]-2*r[o])*n*(l*s)+(3*r[o]-2*t[o]-t[o+1])*i*l+t[o]*s+e[o]}},iT=e=>{if(e.length<3)return el(e);let t=e.length-1,[r,,i]=i_(e);return i[0]=r[0],i[t]=r[t-1],iw(e,i,r)},iM=e=>{if(e.length<3)return el(e);let t=e.length-1,[r,i,n]=i_(e);return i[0]=(2*e[1]-1.5*e[0]-.5*e[2])*t,i[t]=(1.5*e[t]-2*e[t-1]+.5*e[t-2])*t,n[0]=i[0]*r[0]<=0?0:ib(i[0])>2*ib(r[0])?2*r[0]:i[0],n[t]=i[t]*r[t-1]<=0?0:ib(i[t])>2*ib(r[t-1])?2*r[t-1]:i[t],iw(e,n,r)},ik=e=>{let t=e.length-1,[r,i,n]=i_(e);i[0]=.5*(e[1]-e[t])*t,i[t]=.5*(e[0]-e[t-1])*t;let a=(e[0]-e[t])*t;return n[0]=(iv(a)+iv(r[0]))*ix(ib(a),ib(r[0]),.5*ib(i[0])),n[t]=(iv(r[t-1])+iv(a))*ix(ib(r[t-1]),ib(a),.5*ib(i[t])),iw(e,n,r)},iA=(e=1)=>1===e?e=>e:t=>Math.pow(t,e),iS=(e=2,t=1)=>{let r=iA(t);if(e<2)return e<1?[]:[r(.5)];let i=[];for(let t=0;t{let t={mode:e.mode,r:Math.max(0,Math.min(void 0!==e.r?e.r:0,1)),g:Math.max(0,Math.min(void 0!==e.g?e.g:0,1)),b:Math.max(0,Math.min(void 0!==e.b?e.b:0,1))};return void 0!==e.alpha&&(t.alpha=e.alpha),t},iL=e=>iC(iE(e)),iP=e=>void 0!==e&&(void 0===e.r||e.r>=0&&e.r<=1)&&(void 0===e.g||e.g>=0&&e.g<=1)&&(void 0===e.b||e.b>=0&&e.b<=1);function iI(e){return iP(iE(e))}function iz(e="rgb"){let{gamut:t}=O(e);if(!t)return e=>!0;let r=E("string"==typeof t?t:e);return e=>iP(r(e))}function iD(e){return void 0===(e=S(e))||iI(e)?e:E(e.mode)(iL(e))}function iO(e="rgb"){let{gamut:t}=O(e);if(!t)return e=>S(e);let r="string"==typeof t?t:e,i=E(r),n=iz(r);return e=>{let t=S(e);if(!t)return;let r=i(t);if(n(r))return t;let a=iC(r);return t.mode===a.mode?a:E(t.mode)(a)}}function iR(e,t="lch",i="rgb"){e=S(e);let a="rgb"===i?iI:iz(i),o="rgb"===i?iL:iO(i);if(void 0===e||a(e))return e;let s=E(e.mode),l=r(d({},e=E(t)(e)),n({c:0}));if(!a(l))return s(o(l));let c=0,u=void 0!==e.c?e.c:0,h=O(t).ranges.c,f=(h[1]-h[0])/8192,p=l.c;for(;u-c>f;)l.c=c+(u-c)*.5,a(l)?(p=l.c,c=l.c):u=l.c;return s(a(l)?l:r(d({},l),n({c:p})))}function iF(e="rgb",t="oklch",i=eR("oklch"),a=.02){let o=E(e),s=O(e);if(!s.gamut)return e=>o(e);let l=iz(e),c=iO(e),u=E(t),{ranges:h}=O(t);if(!h.l||!h.c)throw Error("LCH-like space expected");return t=>{if(void 0===(t=S(t)))return;let f=d({},u(t));if(void 0===f.l&&(f.l=0),void 0===f.c&&(f.c=0),f.l>=h.l[1]){let i=r(d({},s.white),n({mode:e}));return void 0!==t.alpha&&(i.alpha=t.alpha),i}if(f.l<=h.l[0]){let i=r(d({},s.black),n({mode:e}));return void 0!==t.alpha&&(i.alpha=t.alpha),i}if(l(f))return o(f);let p=0,m=f.c,g=(h.c[1]-h.c[0])/4e3,y=c(f);for(;m-p>g;)f.c=(p+m)*.5,y=c(f),l(f)||i&&a>0&&i(f,y)<=a?p=f.c:m=f.c;return o(l(f)?f:y)}}var ij=(e,t=eR(),r=e=>e)=>{let i=e.map((e,t)=>({color:r(e),i:t}));return(r,n=1,a=1/0)=>(isFinite(n)&&(n=Math.max(1,Math.min(n,i.length-1))),i.forEach(e=>{e.d=t(r,e.color)}),i.sort((e,t)=>e.d-t.d).slice(0,n).filter(e=>e.de[t.i]))},iB=e=>Math.max(Math.min(e,1),0),iN=(e,t,r=!1)=>{let i=E(t),n=O(t).channels;return a=>{let o=i(a);if(!o)return;let s={mode:t},l,c=n.length;for(let t=0;tie(ii(Math.max(e,0)),t,!0),iV=(e=1,t="rgb")=>{let r=Math.max(e,0);return ie(ii(r,(1-r)/2),t,!0)},iq=(e=1,t="rgb")=>{let r;return iN([.393+.607*(r=1-iB(e)),.769-.769*r,.189-.189*r,0,.349-.349*r,.686+.314*r,.168-.168*r,0,.272-.272*r,.534-.534*r,.131+.869*r,0,0,0,0,1],t,!0)},iH=(e=1,t="rgb")=>{let r;return iN([.213+.787*(r=Math.max(e,0)),.715-.715*r,.072-.072*r,0,.213-.213*r,.715+.285*r,.072-.072*r,0,.213-.213*r,.715-.715*r,.072+.928*r,0,0,0,0,1],t,!0)},iG=(e=1,t="rgb")=>{let r;return iN([.2126+.7874*(r=1-iB(e)),.7152-.7152*r,.0722-.0722*r,0,.2126-.2126*r,.7152+.2848*r,.0722-.0722*r,0,.2126-.2126*r,.7152-.7152*r,.0722+.9278*r,0,0,0,0,1],t,!0)},iW=(e=1,t="rgb")=>{let r=iB(e);return ie((e,t)=>{let i;return"alpha"===t?e:(i=1-r,void 0===r||void 0===i?void 0:r+e*(i-r))},t,!0)},iY=(e=0,t="rgb")=>{let r,i,n;return iN([.213+.787*(i=Math.cos(r=Math.PI*e/180))-.213*(n=Math.sin(r)),.715-.715*i-.715*n,.072-.072*i+.928*n,0,.213-.213*i+.143*n,.715+.285*i+.14*n,.072-.072*i-.283*n,0,.213-.213*i-.787*n,.715-.715*i+.715*n,.072+.928*i+.072*n,0,0,0,0,1],t,!0)},iZ=E("rgb"),i$=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],iX=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],iK=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],iJ=(e,t)=>{let r=Math.max(0,Math.min(1,t)),i=Math.round(r/.1),n=Math.round(r%.1),a=e[i];if(n>0&&iei(a[r],t[r],n))}return e=>{let t=S(e);if(void 0===t)return;let{r:r,g:i,b:n}=iZ(t),o={mode:"rgb",r:a[0]*r+a[1]*i+a[2]*n,g:a[3]*r+a[4]*i+a[5]*n,b:a[6]*r+a[7]*i+a[8]*n};return void 0!==t.alpha&&(o.alpha=t.alpha),E(t.mode)(o)}},iQ=(e=1)=>iJ(i$,e),i0=(e=1)=>iJ(iX,e),i1=(e=1)=>iJ(iK,e),i2=e=>e*e*(3-2*e),i3=e=>.5-Math.sin(Math.asin(1-2*e)/3),i5=e=>e*e*e*(e*(6*e-15)+10),i4=e=>(1-Math.cos(e*Math.PI))/2;function i6(e){let t=E("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function i8(e,t){let r=i6(e),i=i6(t);return(Math.max(r,i)+.05)/(Math.min(r,i)+.05)}var i7=D(e_),i9=D(eY),ne=D(tr),nt=D(ti),nr=D(to),ni=D(td),nn=D(tm),na=D(tx),no=D(tA),ns=D(tD),nl=D(tF),nc=D(tY),nu=D(tZ),nh=D(tX),nd=D(tK),nf=D(t7),np=D(t9),nm=D(re),ng=D(rd),ny=D(rm),nv=D(ry),nx=D(rx),nb=D(rw),n_=D(rS),nw=D(rI),nT=D(eu),nM=D(rj),nk=D(rB),nA=D(rV),nS=D(rG)}}),X=p({"src/plot_api/plot_config.js"(e,t){var r={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},i={};(function e(t,r){for(var i in t){var n=t[i];n.valType?r[i]=n.dflt:(r[i]||(r[i]={}),e(n,r[i]))}})(r,i),t.exports={configAttributes:r,dfltConfig:i}}}),K=p({"src/lib/notifier.js"(e,t){var r=T(),i=C(),n=[];t.exports=function(e,t,a){if((null==(o=a?._context)?void 0:o.displayNotifier)!==!1&&-1===n.indexOf(e)){n.push(e);var o,s=1e3;i(t)?s=t:"long"===t&&(s=3e3);var l=r.select("body").selectAll(".plotly-notifier").data([0]);l.enter().append("div").classed("plotly-notifier",!0),l.selectAll(".notifier-note").data(n).enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(e){var i=r.select(this);i.append("button").classed("notifier-close",!0).html("×").on("click",function(){i.transition().call(c)});for(var n=i.append("p"),a=e.split(//g),o=0;o1){var t=["LOG:"];for(e=0;e1){var n=[];for(e=0;e"),"long")}},n.warn=function(){var e;if(r.logging>0){var t=["WARN:"];for(e=0;e0){var n=[];for(e=0;e"),"stick")}},n.error=function(){var e;if(r.logging>0){var t=["ERROR:"];for(e=0;e0){var n=[];for(e=0;e"),"stick")}}}}),Q=p({"src/components/color/attributes.js"(e){e.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],e.defaultLine="#444",e.lightLine="#eee",e.background="#fff",e.borderLine="#BEC8D9",e.lightFraction=1e3/11}}),ee=p({"src/components/color/index.js"(e,t){var{converter:i,formatHex:a,formatRgb:o,wcagContrast:s,wcagLuminance:l}=$(),{isArrayOrTypedArray:c}=z(),{warn:u}=J(),{background:h,defaultLine:f,defaults:p,lightLine:m}=Q(),g=i("rgb"),y=i("hsl"),v=e=>{if("string"!=typeof e)return;let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t))try{return g(t)}catch{return}},x=e=>e>0?e>1?1:e:0,b={mode:"rgb",r:0,g:0,b:0,alpha:1},_=e=>Math.round(255e6*e)/255e6,w=e=>r(d({},e),n({r:_(e.r),g:_(e.g),b:_(e.b)})),T=e=>o(w(e)),M=(e,t)=>{let r=v(e);return r?(null!=r.alpha||(r.alpha=1),r):(t||null==e||u(`Invalid color specifier: "${e}". Defaulting to "#000"`),b)},k=e=>T(r(d({},M(e)),n({alpha:1}))),A=e=>c(e)&&e.length>2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2]),S=(e,t)=>{let r=M(e),i=r.alpha;if(1===i)return T(r);let n=M(t||h),a=n.alpha,o=(e,t)=>(1===a?t:1-a+t*a)*(1-i)+e*i;return T({mode:"rgb",r:o(r.r,n.r),g:o(r.g,n.g),b:o(r.b,n.b)})},E=(e,t)=>{let i=M(e),a=y(i)||{mode:"hsl",h:0,s:0,l:0};return T(g(r(d({},a),n({l:x((100*a.l+t)/100),alpha:i.alpha}))))},C=(e,t)=>s(M(e),M(t)),L=e=>C(e,h)>C(e,f),P=T(M(h)),I=T(M(f));t.exports={addOpacity:(e,t)=>T(r(d({},M(e)),n({alpha:x(t)}))),adjustLightness:E,background:h,brighten:(e,t)=>{t=0===t?0:t||10;let i=M(e),a=t/100;return T(r(d({},i),n({r:x(i.r+a),g:x(i.g+a),b:x(i.b+a)})))},combine:S,contrast:(e,t,r)=>(1!==M(e).alpha&&(e=S(e,h)),L(e)?t?E(e,t):P:r?E(e,-r):I),defaultLine:f,defaults:p,equals:(e,t)=>!!(e&&t&&k(e)===k(t)),fill:(e,t)=>{e.style({fill:k(t),"fill-opacity":M(t).alpha})},hexString:e=>a(w(M(e))).toUpperCase(),interpolate:(e,t,r)=>{let i=M(e),n=M(t),a=(e,t)=>r*e+(1-r)*t;return T({mode:"rgb",r:a(i.r,n.r),g:a(i.g,n.g),b:a(i.b,n.b)})},isChannelArray:A,isDark:L,isValid:e=>void 0!==v(e),lightLine:m,luminosity:e=>{let t=M(e);return l({mode:"rgb",r:x(t.r),g:x(t.g),b:x(t.b)})},mix:(e,t,r)=>{let i=M(e),n=M(t),a=r/100,o=n.alpha-i.alpha,s=2*a-1,l=((s*o==-1?s:(s+o)/(1+s*o))+1)/2,c=1-l,u=(e,t)=>c*e+l*t;return T({mode:"rgb",r:u(i.r,n.r),g:u(i.g,n.g),b:u(i.b,n.b),alpha:i.alpha*(1-a)+n.alpha*a})},mostReadable:(e,t=["#000","#fff"])=>{let r,i=-1/0;for(let n of t){let t=C(e,n);t>i&&(i=t,r=T(M(n)))}return r},normalize:(e,t)=>{let r=A(e)?(e=>{let[t,r,i,n]=e,a=Math.max(t,r,i)>1?1/255:1,o=n??1;return{mode:"rgb",r:t*a,g:r*a,b:i*a,alpha:o>1?o/255:o}})(e):M(e,!0),i=[x(r.r),x(r.g),x(r.b),x(r.alpha)];return"uint8"===t||"uint8_clamped"===t?Uint8Array.from(i,e=>Math.round(255*e)):"float32"===t?Float32Array.from(i):"float64"===t?Float64Array.from(i):i},opacity:e=>e?M(e).alpha:0,parse:M,rgb:k,rgbaArray:e=>{let t=M(e);return[255*x(t.r),255*x(t.g),255*x(t.b),x(t.alpha)]},rgbaArrayToString:([e,t,r,i])=>T({mode:"rgb",r:e/255,g:t/255,b:r/255,alpha:i}),rgbaString:e=>T(M(e)),stroke:(e,t)=>{e.style({stroke:k(t),"stroke-opacity":M(t).alpha})},wcagContrast:C}}}),et=p({"src/components/colorscale/scales.js"(e,t){var r=ee(),i={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},n=i.RdBu;function a(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||0!=+e[0][0]||1!=+e[e.length-1][0])return!1;for(var i=0;ien});var ea,eo=f({"src/lib/regex.ts"(){ea="([2-9]|[1-9][0-9]+)?"}}),es=p({"src/lib/coerce.js"(e){var t=C(),r=q().extendFlat,i=Z(),n=et(),a=ee(),o=er().DESELECTDIM,s=D(),l=(eo(),v(ei)).counter,c=(V(),v(B)).modHalf,u=z().isArrayOrTypedArray,h=z().isTypedArraySpec,d=z().decodeTypedArraySpec;function f(t,r){var i=e.valObjectMeta[r.valType];if(r.arrayOk&&u(t))return!0;if(i.validateFunction)return i.validateFunction(t,r);var n={},a=n;return i.coerceFunction(t,{set:function(e){a=e}},n,r),a!==n}e.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(u(e)?e:h(e)?d(e):r)}},enumerated:{coerceFunction:function(e,t,r,i){i.coerceNumber&&(e*=1),-1===i.values.indexOf(e)?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e*=1);for(var r=t.values,i=0;i!0===e||!1===e;n(e)||i.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(n)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,r,i,n){h(e)&&(e=d(e)),!t(e)||void 0!==n.min&&en.max?r.set(i):r.set(+e)}},integer:{coerceFunction:function(e,r,i,n){-1!==(n.extras||[]).indexOf(e)?r.set(e):(h(e)&&(e=d(e)),e%1||!t(e)||void 0!==n.min&&en.max?r.set(i):r.set(+e))}},string:{coerceFunction:function(e,t,r,i){if("string"!=typeof e){var n="number"==typeof e;!0!==i.strict&&n?t.set(String(e)):t.set(r)}else i.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){h(e)&&(e=d(e)),a.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){Array.isArray(e)&&e.length&&e.every(e=>a.isValid(e))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(n.get(e,r))}},angle:{coerceFunction:function(e,r,i){h(e)&&(e=d(e)),"auto"===e?r.set("auto"):t(e)?r.set(c(+e,360)):r.set(i)}},subplotid:{coerceFunction:function(e,t,r,i){var n=i.regex||l(r);let a=e=>"string"==typeof e&&n.test(e);a(e)||i.arrayOk&&u(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r||"string"==typeof e&&!!l(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,i){if(-1!==(i.extras||[]).indexOf(e))return void t.set(e);if("string"!=typeof e)return void t.set(r);for(var n=e.split("+"),a=0;aMath.abs(P)?null:(E*=P=1/P,C*=P,L*=P,n=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],l=t[1],c=t[2],u=t[3],h=t[4],d=t[5],f=t[6],p=t[7],m=t[8],g=t[9],y=t[10],v=t[11],x=E*E*o+a,b=C*E*o+L*n,_=L*E*o-C*n,w=E*C*o-L*n,T=C*C*o+a,M=L*C*o+E*n,k=E*L*o+C*n,A=C*L*o-E*n,S=L*L*o+a,e[0]=s*x+h*b+m*_,e[1]=l*x+d*b+g*_,e[2]=c*x+f*b+y*_,e[3]=u*x+p*b+v*_,e[4]=s*w+h*T+m*M,e[5]=l*w+d*T+g*M,e[6]=c*w+f*T+y*M,e[7]=u*w+p*T+v*M,e[8]=s*k+h*A+m*S,e[9]=l*k+d*A+g*S,e[10]=c*k+f*A+y*S,e[11]=u*k+p*A+v*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}}}),ew=p({"node_modules/gl-mat4/rotateX.js"(e,t){t.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+c*i,e[5]=o*n+u*i,e[6]=s*n+h*i,e[7]=l*n+d*i,e[8]=c*n-a*i,e[9]=u*n-o*i,e[10]=h*n-s*i,e[11]=d*n-l*i,e}}}),eT=p({"node_modules/gl-mat4/rotateY.js"(e,t){t.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-c*i,e[1]=o*n-u*i,e[2]=s*n-h*i,e[3]=l*n-d*i,e[8]=a*i+c*n,e[9]=o*i+u*n,e[10]=s*i+h*n,e[11]=l*i+d*n,e}}}),eM=p({"node_modules/gl-mat4/rotateZ.js"(e,t){t.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(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[0]=a*n+c*i,e[1]=o*n+u*i,e[2]=s*n+h*i,e[3]=l*n+d*i,e[4]=c*n-a*i,e[5]=u*n-o*i,e[6]=h*n-s*i,e[7]=d*n-l*i,e}}}),ek=p({"node_modules/gl-mat4/fromRotation.js"(e,t){t.exports=function(e,t,r){var i,n,a,o=r[0],s=r[1],l=r[2],c=Math.sqrt(o*o+s*s+l*l);return 1e-6>Math.abs(c)?null:(o*=c=1/c,s*=c,l*=c,i=Math.sin(t),a=1-(n=Math.cos(t)),e[0]=o*o*a+n,e[1]=s*o*a+l*i,e[2]=l*o*a-s*i,e[3]=0,e[4]=o*s*a-l*i,e[5]=s*s*a+n,e[6]=l*s*a+o*i,e[7]=0,e[8]=o*l*a+s*i,e[9]=s*l*a-o*i,e[10]=l*l*a+n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}}}),eA=p({"node_modules/gl-mat4/fromRotationTranslation.js"(e,t){t.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=i+i,l=n+n,c=a+a,u=i*s,h=i*l,d=i*c,f=n*l,p=n*c,m=a*c,g=o*s,y=o*l,v=o*c;return e[0]=1-(f+m),e[1]=h+v,e[2]=d-y,e[3]=0,e[4]=h-v,e[5]=1-(u+m),e[6]=p+g,e[7]=0,e[8]=d+y,e[9]=p-g,e[10]=1-(u+f),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}}}),eS=p({"node_modules/gl-mat4/fromScaling.js"(e,t){t.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),eE=p({"node_modules/gl-mat4/fromTranslation.js"(e,t){t.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}}}),eC=p({"node_modules/gl-mat4/fromXRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),eL=p({"node_modules/gl-mat4/fromYRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),eP=p({"node_modules/gl-mat4/fromZRotation.js"(e,t){t.exports=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),eI=p({"node_modules/gl-mat4/fromQuat.js"(e,t){t.exports=function(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r+r,s=i+i,l=n+n,c=r*o,u=i*o,h=i*s,d=n*o,f=n*s,p=n*l,m=a*o,g=a*s,y=a*l;return e[0]=1-h-p,e[1]=u+y,e[2]=d-g,e[3]=0,e[4]=u-y,e[5]=1-c-p,e[6]=f+m,e[7]=0,e[8]=d+g,e[9]=f-m,e[10]=1-c-h,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}}}),ez=p({"node_modules/gl-mat4/frustum.js"(e,t){t.exports=function(e,t,r,i,n,a,o){var s=1/(r-t),l=1/(n-i),c=1/(a-o);return e[0]=2*a*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*a*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(n+i)*l,e[10]=(o+a)*c,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*a*2*c,e[15]=0,e}}}),eD=p({"node_modules/gl-mat4/perspective.js"(e,t){t.exports=function(e,t,r,i,n){var a=1/Math.tan(t/2),o=1/(i-n);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+i)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*i*o,e[15]=0,e}}}),eO=p({"node_modules/gl-mat4/perspectiveFromFieldOfView.js"(e,t){t.exports=function(e,t,r,i){var n=Math.tan(t.upDegrees*Math.PI/180),a=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),c=2/(n+a);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=c,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(n-a)*c*.5,e[10]=i/(r-i),e[11]=-1,e[12]=0,e[13]=0,e[14]=i*r/(r-i),e[15]=0,e}}}),eR=p({"node_modules/gl-mat4/ortho.js"(e,t){t.exports=function(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*c,e[15]=1,e}}}),eF=p({"node_modules/gl-mat4/lookAt.js"(e,t){var r=ef();t.exports=function(e,t,i,n){var a,o,s,l,c,u,h,d,f,p,m=t[0],g=t[1],y=t[2],v=n[0],x=n[1],b=n[2],_=i[0],w=i[1],T=i[2];return 1e-6>Math.abs(m-_)&&1e-6>Math.abs(g-w)&&1e-6>Math.abs(y-T)?r(e):(p=1/Math.sqrt((h=m-_)*h+(d=g-w)*d+(f=y-T)*f),h*=p,d*=p,f*=p,(p=Math.sqrt((a=x*f-b*d)*a+(o=b*h-v*f)*o+(s=v*d-x*h)*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),(p=Math.sqrt((l=d*s-f*o)*l+(c=f*a-h*s)*c+(u=h*o-d*a)*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),e[0]=a,e[1]=l,e[2]=h,e[3]=0,e[4]=o,e[5]=c,e[6]=d,e[7]=0,e[8]=s,e[9]=u,e[10]=f,e[11]=0,e[12]=-(a*m+o*g+s*y),e[13]=-(l*m+c*g+u*y),e[14]=-(h*m+d*g+f*y),e[15]=1,e)}}}),ej=p({"node_modules/gl-mat4/str.js"(e,t){t.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}}}),eB=p({"node_modules/gl-mat4/index.js"(e,t){t.exports={create:eu(),clone:eh(),copy:ed(),identity:ef(),transpose:ep(),invert:em(),adjoint:eg(),determinant:ey(),multiply:ev(),translate:ex(),scale:eb(),rotate:e_(),rotateX:ew(),rotateY:eT(),rotateZ:eM(),fromRotation:ek(),fromRotationTranslation:eA(),fromScaling:eS(),fromTranslation:eE(),fromXRotation:eC(),fromYRotation:eL(),fromZRotation:eP(),fromQuat:eI(),frustum:ez(),perspective:eD(),perspectiveFromFieldOfView:eO(),ortho:eR(),lookAt:eF(),str:ej()}}}),eN=p({"src/lib/matrix.js"(e){var t=eB();e.init2dArray=function(e,t){for(var r=Array(e),i=0;id({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>d({valType:"string",dflt:"",editType:e},!1!==t?{arrayOk:!0}:{}),e.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e}),e.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})}}),eY=p({"src/components/shapes/label_texttemplate.js"(e,t){function r(e,t){return t?t.d2l(e):e}function i(e){return e.x0shift||0}function n(e){return e.x1shift||0}function a(e){return e.y0shift||0}function o(e){return e.y1shift||0}function s(e,t){return r(e.x1,t)+n(e)-r(e.x0,t)-i(e)}function l(e,t,i){return r(e.y1,i)+o(e)-r(e.y0,i)-a(e)}t.exports={x0:function(e){return e.x0},x1:function(e){return e.x1},y0:function(e){return e.y0},y1:function(e){return e.y1},slope:function(e,t,r){return"line"!==e.type?void 0:l(e,t,r)/s(e,t)},dx:s,dy:l,width:function(e,t){return Math.abs(s(e,t))},height:function(e,t,r){return Math.abs(l(e,t,r))},length:function(e,t,r){return"line"!==e.type?void 0:Math.sqrt(Math.pow(s(e,t),2)+Math.pow(l(e,t,r),2))},xcenter:function(e,t){var a;return a=(r(e.x1,t)+n(e)+r(e.x0,t)+i(e))/2,t?t.l2d(a):a},ycenter:function(e,t,i){var n;return n=(r(e.y1,i)+o(e)+r(e.y0,i)+a(e))/2,i?i.l2d(n):n},simpleXVariables:["x0","x1","y0","y1","dy","height","ycenter"],simpleYVariables:["x0","x1","y0","y1","dx","width","xcenter"]}}}),eZ=p({"src/components/shapes/draw_newshape/attributes.js"(e,t){var r=eq().overrideAll,i=Z(),n=H(),a=eH().dash,o=q().extendFlat,{shapeTexttemplateAttrs:s,templatefallbackAttrs:l}=eW(),c=eY();t.exports=r({newshape:{visible:o({},i.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:o({},i.legend,{}),legendgroup:o({},i.legendgroup,{}),legendgrouptitle:{text:o({},i.legendgrouptitle.text,{}),font:n({})},legendrank:o({},i.legendrank,{}),legendwidth:o({},i.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:o({},a,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:o({},i.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:s({newshape:!0},{keys:Object.keys(c)}),texttemplatefallback:l({editType:"arraydraw"}),font:n({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),e$=p({"src/components/selections/draw_newselection/attributes.js"(e,t){var r=eH().dash;t.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:(0,q().extendFlat)({},r,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),eX=p({"src/plots/pad_attributes.js"(e,t){t.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}}}),eK=p({"src/plots/layout_attributes.js"(e,t){var r=H(),i=eV(),n=Q(),a=eZ(),o=e$(),s=eX(),l=q().extendFlat,c=r({editType:"calc"});c.family.dflt='"Open Sans", verdana, arial, sans-serif',c.size.dflt=12,c.color.dflt=n.defaultLine,t.exports={font:c,title:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:r({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:l(s({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:n.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:n.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:n.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:a.newshape,activeshape:a.activeshape,newselection:o.newselection,activeselection:o.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:l({},i.transition,{editType:"none"})}}}),eJ=p({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var e=document.createElement("style");e.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",e.textContent=".maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E\")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E\")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E\")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E\")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url(\"data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E\")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:\"\";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:\"\";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}",document.head.appendChild(e)}}}),eQ=p({"src/registry.js"(e){var t=J(),r=el(),i=ec(),n=(eU().addStyleRule,q()),a=Z(),o=eK(),s=n.extendFlat,l=n.extendDeepAll;function c(t){if(t.layoutAttributes){var r=t.layoutAttributes._arrayAttrRegexps;if(r)for(var n=0;n=t&&i<=r?i:l}if("string"!=typeof i&&"number"!=typeof i)return l;i=String(i);var v=b(n),_=i.charAt(0);v&&("G"===_||"g"===_)&&(i=i.slice(1),n="");var w=v&&"chinese"===n.slice(0,7),T=i.match(w?y:g);if(!T)return l;var M=T[1],k=T[3]||"1",A=Number(T[5]||1),S=Number(T[7]||0),E=Number(T[9]||0),C=Number(T[11]||0);if(v){if(2===M.length)return l;M=Number(M);try{var L,P=p.getComponentMethod("calendars","getCal")(n);if(w){var I="i"===k.charAt(k.length-1);k=parseInt(k,10),L=P.newDate(M,P.toMonthIndex(M,k,I),A)}else L=P.newDate(M,Number(k),A)}catch{return l}return L?(L.toJD()-f)*c+S*u+E*h+C*d:l}M=2===M.length?(Number(M)+2e3-x)%100+x:Number(M);var z=new Date(Date.UTC(2e3,k-=1,A,S,E));return z.setUTCFullYear(M),z.getUTCMonth()!==k||z.getUTCDate()!==A?l:z.getTime()+C*d},t=e.MIN_MS=e.dateTime2ms("-9999"),r=e.MAX_MS=e.dateTime2ms("9999-12-31 23:59:59.9999"),e.isDateTime=function(t,r){return e.dateTime2ms(t,r)!==l};var w=90*c,T=3*u,M=5*h;function A(e,t,r,i,n){if((t||r||i||n)&&(e+=" "+_(t,2)+":"+_(r,2),(i||n)&&(e+=":"+_(i,2),n))){for(var a=4;n%10==0;)a-=1,n/=10;e+="."+_(n,a)}return e}e.ms2DateTime=function(e,i,n){if("number"!=typeof e||!(e>=t&&e<=r))return l;i||(i=0);var a,s,g,y,v,x,_=Math.floor(10*o(e+.05,1)),k=Math.round(e-_/10);if(b(n)){var S=Math.floor(k/c)+f,E=Math.floor(o(e,c));try{a=p.getComponentMethod("calendars","getCal")(n).fromJD(S).formatDate("yyyy-mm-dd")}catch{a=m("G%Y-%m-%d")(new Date(k))}if("-"===a.charAt(0))for(;a.length<11;)a="-0"+a.slice(1);else for(;a.length<10;)a="0"+a;s=i=t+c&&e<=r-c))return l;var n=Math.floor(10*o(e+.05,1)),a=new Date(Math.round(e-n/10));return A(i("%Y-%m-%d")(a),a.getHours(),a.getMinutes(),a.getSeconds(),10*a.getUTCMilliseconds()+n)},e.cleanDate=function(t,r,i){if(t===l)return r;if(e.isJSDate(t)||"number"==typeof t&&isFinite(t)){if(b(i))return a.error("JS Dates and milliseconds are incompatible with world calendars",t),r;if(!(t=e.ms2DateTimeLocal(+t))&&void 0!==r)return r}else if(!e.isDateTime(t,i))return a.error("unrecognized date",t),r;return t};var S=/%\d?f/g,E=/%h/g,P={1:"1",2:"1",3:"2",4:"2"};function I(e,t,r,i){e=e.replace(S,function(e){var r=Math.min(+e.charAt(1)||6,6);return(t/1e3%1+2).toFixed(r).slice(2).replace(/0+$/,"")||"0"});var n=new Date(Math.floor(t+.05));if(e=e.replace(E,function(){return P[r("%q")(n)]}),b(i))try{e=p.getComponentMethod("calendars","worldCalFmt")(e,t,i)}catch{return"Invalid"}return r(e)(n)}var z=[59,59.9,59.99,59.999,59.9999];e.formatDate=function(e,t,r,i,a,s){if(a=b(a)&&a,!t)if("y"===r)t=s.year;else if("m"===r)t=s.month;else{if("d"!==r)return function(e,t){var r=o(e+.05,c),i=_(Math.floor(r/u),2)+":"+_(o(Math.floor(r/h),60),2);if("M"!==t){n(t)||(t=0);var a=(100+Math.min(o(e/d,60),z[t])).toFixed(t).slice(1);t>0&&(a=a.replace(/0+$/,"").replace(/[\.]$/,"")),i+=":"+a}return i}(e,r)+` +`+I(s.dayMonthYear,e,i,a);t=s.dayMonth+` +`+s.year}return I(t,e,i,a)};var D=3*c;e.incrementMonth=function(e,t,r){r=b(r)&&r;var i=o(e,c);if(e=Math.round(e-i),r)try{var n=Math.round(e/c)+f,s=p.getComponentMethod("calendars","getCal")(r),l=s.fromJD(n);return t%12?s.add(l,t,"m"):s.add(l,t/12,"y"),(l.toJD()-f)*c+i}catch{a.error("invalid ms "+e+" in calendar "+r)}var u=new Date(e+D);return u.setUTCMonth(u.getUTCMonth()+t)+i-D},e.findExactDates=function(e,t){for(var r,i,a=0,o=0,s=0,l=0,u=b(t)&&p.getComponentMethod("calendars","getCal")(t),h=0;ht}function l(e,t){return e>=t}e.findBin=function(e,i,n){if(t(i.start))return n?Math.ceil((e-i.start)/i.size-1e-9)-1:Math.floor((e-i.start)/i.size+1e-9);var c,u,h=0,d=i.length,f=0,p=d>1?(i[d-1]-i[0])/(d-1):1;for(u=p>=0?n?a:o:n?l:s,e+=1e-9*p*(n?-1:1)*(p>=0?1:-1);h90&&r.log("Long binary search..."),h-1},e.sorterAsc=function(e,t){return e-t},e.sorterDes=function(e,t){return t-e},e.distinctVals=function(t){var r=t.slice();for(r.sort(e.sorterAsc),i=r.length-1;i>-1&&r[i]===n;i--);for(var i,a,o=r[i]-r[0]||1,s=o/(i||1)/1e4,l=[],c=0;c<=i;c++){var u=r[c],h=u-a;void 0===a?(l.push(u),a=u):h>s&&(o=Math.min(o,h),l.push(u),a=u)}return{vals:l,minDiff:o}},e.roundUp=function(e,t,r){for(var i,n=0,a=t.length-1,o=0,s=+!r,l=+!!r,c=r?Math.ceil:Math.floor;n0&&(i=1),r&&i)return e.sort(t)}return i?e:e.reverse()},e.findIndexOfMin=function(e,t){t=t||i;for(var r,n=1/0,a=0;ae4});var e4,e6=f({"src/lib/sort_object_keys.ts"(){e4=e5}}),e8=p({"src/lib/stats.js"(e){var t=C(),r=z().isArrayOrTypedArray;e.aggNums=function(i,n,a,o){var s,l;if((!o||o>a.length)&&(o=a.length),t(n)||(n=!1),r(a[0])){for(l=Array(o),s=0;se.length-1)return e[e.length-1];var i=r%1;return i*e[Math.ceil(r)]+(1-i)*e[Math.floor(r)]}}}),e7=p({"src/lib/angles.js"(e,t){var r=(V(),v(B)),i=r.mod,n=r.modHalf,a=Math.PI,o=2*a;function s(e){return Math.abs(e[1]-e[0])>o-1e-14}function l(e,t){return n(t-e,o)}function c(e,t){if(s(t))return!0;t[0](n=i(n,o))&&(n+=o);var r,n,a=i(e,o),l=a+o;return a>=r&&a<=n||l>=r&&l<=n}function u(e,t,r,i,n,l,c){n=n||0,l=l||0;var u,h,d,f,p,m,g=s([r,i]);function y(e,t){return[e*Math.cos(t)+n,l-e*Math.sin(t)]}g?(h=0,d=a,f=o):r=n&&e<=a)},pathArc:function(e,t,r,i,n){return u(null,e,t,r,i,n,0)},pathSector:function(e,t,r,i,n){return u(null,e,t,r,i,n,1)},pathAnnulus:function(e,t,r,i,n,a){return u(e,t,r,i,n,a,1)}}}}),e9=p({"src/lib/anchor_utils.js"(e){e.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=1/3},e.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>1/3&&e.x<2/3},e.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=2/3},e.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=2/3},e.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>1/3&&e.y<2/3},e.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=1/3}}}),te=p({"src/lib/geometry2d.js"(e){var t,r,i,n=(V(),v(B)).mod;function a(e,t,r,i,n,a,o,s){var l=r-e,c=n-e,u=o-n,h=i-t,d=a-t,f=s-a,p=l*f-u*h;if(0===p)return null;var m=(c*f-u*d)/p,g=(c*h-l*d)/p;return g<0||g>1||m<0||m>1?null:{x:e+l*m,y:t+h*m}}function o(e,t,r,i,n){var a=i*e+n*t;if(a<0)return i*i+n*n;if(a>r){var o=i-e,s=n-t;return o*o+s*s}var l=i*t-n*e;return l*l/r}e.segmentsIntersect=a,e.segmentDistance=function(e,t,r,i,n,s,l,c){if(a(e,t,r,i,n,s,l,c))return 0;var u=r-e,h=i-t,d=l-n,f=c-s,p=u*u+h*h,m=d*d+f*f;return Math.sqrt(Math.min(o(u,h,p,n-e,s-t),o(u,h,p,l-e,c-t),o(d,f,m,e-n,t-s),o(d,f,m,r-n,i-s)))},e.getTextLocation=function(e,a,o,s){if((e!==r||s!==i)&&(t={},r=e,i=s),t[o])return t[o];var l=e.getPointAtLength(n(o-s/2,a)),c=e.getPointAtLength(n(o+s/2,a)),u=Math.atan((c.y-l.y)/(c.x-l.x)),h=e.getPointAtLength(n(o,a)),d={x:(4*h.x+l.x+c.x)/6,y:(4*h.y+l.y+c.y)/6,theta:u};return t[o]=d,d},e.clearLocationCache=function(){r=null},e.getVisibleSegment=function(e,t,r){var i,n,a=t.left,o=t.right,s=t.top,l=t.bottom,c=0,u=e.getTotalLength(),h=u;function d(t){var r=e.getPointAtLength(t);0===t?i=r:t===u&&(n=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 f=d(c);f;){if((c+=f+r)>h)return;f=d(c)}for(f=d(h);f;){if(c>(h-=f+r))return;f=d(h)}return{min:c,max:h,len:h-c,total:u,isClosed:0===c&&h===u&&.1>Math.abs(i.x-n.x)&&.1>Math.abs(i.y-n.y)}},e.findPointOnPath=function(e,t,r,i){i=i||{};for(var n,a,o,s=i.pathLength||e.getTotalLength(),l=i.tolerance||.001,c=i.iterationLimit||30,u=e.getPointAtLength(0)[r]>e.getPointAtLength(s)[r]?-1:1,h=0,d=0,f=s;h0?f=n:d=n,h++;return a}}}),tt=p({"src/lib/throttle.js"(e){var t={};function r(e){e&&null!==e.timer&&(clearTimeout(e.timer),e.timer=null)}e.throttle=function(e,i,n){var a=t[e],o=Date.now();if(!a){for(var s in t)t[s].tsa.ts+i)?l():a.timer=setTimeout(function(){l(),a.timer=null},i)},e.done=function(e){var r=t[e];return r&&r.timer?new Promise(function(e){var t=r.onDone;r.onDone=function(){t&&t(),e(),r.onDone=null}}):Promise.resolve()},e.clear=function(i){if(i)r(t[i]),delete t[i];else for(var n in t)e.clear(n)}}}),tr=p({"src/lib/clear_responsive.js"(e,t){t.exports=function(e){e._responsiveChartHandler&&(window.removeEventListener("resize",e._responsiveChartHandler),delete e._responsiveChartHandler)}}}),ti=p({"node_modules/is-mobile/index.js"(e,t){t.exports=a,t.exports.isMobile=a,t.exports.default=a;var r=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,i=/CrOS/,n=/android|ipad|playbook|silk/i;function a(e){e||(e={});let t=e.ua;if(!t&&"u">typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),"string"!=typeof t)return!1;let a=r.test(t)&&!i.test(t)||!!e.tablet&&n.test(t);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==t.indexOf("Macintosh")&&-1!==t.indexOf("Safari")&&(a=!0),a}}}),tn=p({"src/lib/preserve_drawing_buffer.js"(e,t){var r=C(),i=ti();t.exports=function(e){if("string"!=typeof(n=e&&e.hasOwnProperty("userAgent")?e.userAgent:("u">typeof navigator&&(t=navigator.userAgent),t&&t.headers&&"string"==typeof t.headers["user-agent"]&&(t=t.headers["user-agent"]),t)))return!0;var t,n,a=i({ua:{headers:{"user-agent":n}},tablet:!0,featureDetect:!1});if(!a){for(var o=n.split(" "),s=1;s-1;l--){var c=o[l];if("Version/"===c.slice(0,8)){var u=c.slice(8).split(".")[0];if(r(u)&&(u*=1),u>=13)return!0}}}return a}}}),ta=p({"src/lib/make_trace_groups.js"(e,t){var r=T();t.exports=function(e,t,i){var n=e.selectAll("g."+i.replace(/\s/g,".")).data(t,function(e){return e[0].trace.uid});n.exit().remove(),n.enter().append("g").attr("class",i),n.order();var a=e.classed("rangeplot")?"nodeRangePlot3":"node3";return n.each(function(e){e[0][a]=r.select(this)}),n}}}),to=p({"src/lib/localize.js"(e,t){var r=eQ();t.exports=function(e,t){for(var i=e._context.locale,n=0;n<2;n++){for(var a=e._context.locales,o=0;o<2;o++){var s=(a[i]||{}).dictionary;if(s){var l=s[t];if(l)return l}a=r.localeRegistry}var c=i.split("-")[0];if(c===i)break;i=c}return t}}}),ts=p({"src/lib/filter_unique.js"(e,t){t.exports=function(e){for(var t={},r=[],i=0,n=0;n1?(r*e+r*t)/r:e+t,n=String(i).length;if(n>16){var a=String(t).length;if(n>=String(e).length+a){var o=parseFloat(i).toPrecision(12);-1===o.indexOf("e+")&&(i=+o)}}return i}}}),tu={};function th(e){return"string"==typeof e&&(e=e.replace(tp,"")),(0,td.default)(e)?Number(e):tf.BADNUM}m(tu,{default:()=>tm});var td,tf,tp,tm,tg=f({"src/lib/clean_number.ts"(){td=y(C()),tf=y(L()),tp=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,tm=th}}),ty=p({"src/lib/slugify.js"(e,t){var r=/<[^>]*>/g,i=/[\p{S}\p{P}]/gu,n=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,a=/�/g,o=/\s+/g,s="-".replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),l=RegExp(s+"{3,}","g"),c=RegExp(s+"$","g");t.exports=function(e,t=60){var s,u=("function"==typeof(s=e??"").toWellFormed?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))).replace(a,"").replace(r," ").replace(i,e=>"-"===e?e:"").toLowerCase().trim().replace(o,"-").replace(n,"").replace(l,"-");return u.length<=t?u:Array.from(u).slice(0,t).join("").replace(c,"")}}}),tv=p({"src/lib/index.js"(e,t){var i=T(),a=k().utcFormat,o=A().format,s=C(),l=L(),c=l.FP_SAFE,u=-c,h=l.BADNUM,f=t.exports={};f.adjustFormat=function(e){if(!e||/^\d[.]\df/.test(e)||/[.]\d%/.test(e))return e;if("0.f"===e)return"~f";if(/^\d%/.test(e))return"~%";if(/^\ds/.test(e))return"~s";var t=(e.match(/^[+\-( ]?/)||[""])[0],r=e.slice(t.length);return!/^[~,.0$#]/.test(r)&&/[&fps]/.test(r)?t+"~"+r:e};var p={};f.warnBadFormat=function(e){var t=String(e);p[t]||(p[t]=1,f.warn('encountered bad format: "'+t+'"'))},f.noFormat=function(e){return String(e)},f.numberFormat=function(e){var t;try{t=o(f.adjustFormat(e))}catch{return f.warnBadFormat(e),f.noFormat}return t},f.nestedProperty=D(),f.keyedContainer=O(),f.relativeAttr=R(),f.isPlainObject=I(),f.toLogRange=F(),f.relinkPrivateKeys=j();var m=z();f.isArrayBuffer=m.isArrayBuffer,f.isTypedArray=m.isTypedArray,f.isArrayOrTypedArray=m.isArrayOrTypedArray,f.isArray1D=m.isArray1D,f.ensureArray=m.ensureArray,f.concat=m.concat,f.maxRowLength=m.maxRowLength,f.minRowLength=m.minRowLength;var g=(V(),v(B));f.mod=g.mod,f.modHalf=g.modHalf;var y=es();f.valObjectMeta=y.valObjectMeta,f.coerce=y.coerce,f.coerce2=y.coerce2,f.coerceFont=y.coerceFont,f.coercePattern=y.coercePattern,f.coerceHoverinfo=y.coerceHoverinfo,f.coerceSelectionMarkerOpacity=y.coerceSelectionMarkerOpacity,f.validate=y.validate;var x=e0();f.dateTime2ms=x.dateTime2ms,f.isDateTime=x.isDateTime,f.ms2DateTime=x.ms2DateTime,f.ms2DateTimeLocal=x.ms2DateTimeLocal,f.cleanDate=x.cleanDate,f.isJSDate=x.isJSDate,f.formatDate=x.formatDate,f.incrementMonth=x.incrementMonth,f.dateTick0=x.dateTick0,f.dfltRange=x.dfltRange,f.findExactDates=x.findExactDates,f.MIN_MS=x.MIN_MS,f.MAX_MS=x.MAX_MS;var b=e2();f.findBin=b.findBin,f.sorterAsc=b.sorterAsc,f.sorterDes=b.sorterDes,f.distinctVals=b.distinctVals,f.roundUp=b.roundUp,f.sort=b.sort,f.findIndexOfMin=b.findIndexOfMin,f.sortObjectKeys=(e6(),v(e3)).default;var _=e8();f.aggNums=_.aggNums,f.len=_.len,f.mean=_.mean,f.geometricMean=_.geometricMean,f.median=_.median,f.midRange=_.midRange,f.variance=_.variance,f.stdev=_.stdev,f.interp=_.interp;var w=eN();f.init2dArray=w.init2dArray,f.transposeRagged=w.transposeRagged,f.dot=w.dot,f.translationMatrix=w.translationMatrix,f.rotationMatrix=w.rotationMatrix,f.rotationXYMatrix=w.rotationXYMatrix,f.apply3DTransform=w.apply3DTransform,f.apply2DTransform=w.apply2DTransform,f.apply2DTransform2=w.apply2DTransform2,f.convertCssMatrix=w.convertCssMatrix,f.inverseTransformMatrix=w.inverseTransformMatrix;var M=e7();f.deg2rad=M.deg2rad,f.rad2deg=M.rad2deg,f.angleDelta=M.angleDelta,f.angleDist=M.angleDist,f.isFullCircle=M.isFullCircle,f.isAngleInsideSector=M.isAngleInsideSector,f.isPtInsideSector=M.isPtInsideSector,f.pathArc=M.pathArc,f.pathSector=M.pathSector,f.pathAnnulus=M.pathAnnulus;var S=e9();f.isLeftAnchor=S.isLeftAnchor,f.isCenterAnchor=S.isCenterAnchor,f.isRightAnchor=S.isRightAnchor,f.isTopAnchor=S.isTopAnchor,f.isMiddleAnchor=S.isMiddleAnchor,f.isBottomAnchor=S.isBottomAnchor;var E=te();f.segmentsIntersect=E.segmentsIntersect,f.segmentDistance=E.segmentDistance,f.getTextLocation=E.getTextLocation,f.clearLocationCache=E.clearLocationCache,f.getVisibleSegment=E.getVisibleSegment,f.findPointOnPath=E.findPointOnPath;var P=q();f.extendFlat=P.extendFlat,f.extendDeep=P.extendDeep,f.extendDeepAll=P.extendDeepAll,f.extendDeepNoArrays=P.extendDeepNoArrays;var N=J();f.log=N.log,f.warn=N.warn,f.error=N.error,f.counterRegex=(eo(),v(ei)).counter;var U=tt();f.throttle=U.throttle,f.throttleDone=U.done,f.clearThrottle=U.clear;var H=eU();f.getGraphDiv=H.getGraphDiv,f.isPlotDiv=H.isPlotDiv,f.removeElement=H.removeElement,f.addStyleRule=H.addStyleRule,f.addRelatedStyleRule=H.addRelatedStyleRule,f.deleteRelatedStyleRule=H.deleteRelatedStyleRule,f.setStyleOnHover=H.setStyleOnHover,f.getFullTransformMatrix=H.getFullTransformMatrix,f.getElementTransformMatrix=H.getElementTransformMatrix,f.getElementAndAncestors=H.getElementAndAncestors,f.equalDomRects=H.equalDomRects,f.clearResponsive=tr(),f.preserveDrawingBuffer=tn(),f.makeTraceGroups=ta(),f._=to(),f.notifier=K(),f.filterUnique=ts(),f.filterVisible=tl(),f.pushUnique=ec(),f.increment=tc(),f.cleanNumber=(tg(),v(tu)).default,f.slugify=ty(),f.ensureNumber=function(e){return s(e)?(e=Number(e))>c||e=t))&&s(e)&&e>=0&&e%1==0},f.noop=el(),f.identity=e1(),f.repeat=function(e,t){for(var r=Array(t),i=0;ir?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))},f.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r},f.simpleMap=function(e,t,r,i,n){for(var a=e.length,o=Array(a),s=0;s=Math.pow(2,r)?n>10?(f.warn("randstr failed uniqueness"),s):e(t,r,i,(n||0)+1):s},f.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(i){i[t]=e,r[i.name]=i,r.optionList.push(i)},r["_"+t]=e,r},f.smooth=function(e,t){if((t=Math.round(t)||0)<2)return e;var r,i,n,a,o=e.length,s=2*o,l=2*t-1,c=Array(l),u=Array(o);for(r=0;r=s&&(n-=s*Math.floor(n/s)),n<0?n=-1-n:n>=o&&(n=s-1-n),a+=e[n]*c[i];u[r]=a}return u},f.syncOrAsync=function(e,t,r){var i;function n(){return f.syncOrAsync(e,t,r)}for(;e.length;)if((i=(0,e.splice(0,1)[0])(t))&&i.then)return i.then(n);return r&&r(t)},f.stripTrailingSlash=function(e){return"/"===e.slice(-1)?e.slice(0,-1):e},f.noneOrAll=function(e,t,r){if(e){var i,n=!1,a=!0;for(i=0;i0?t:0})},f.fillArray=function(e,t,r,i){if(i=i||f.identity,f.isArrayOrTypedArray(e))for(var n=0;nY.test(window.navigator.userAgent);var Z=/Firefox\/(\d+)\.\d+/;f.getFirefoxVersion=function(){var e=Z.exec(window.navigator.userAgent);if(e&&2===e.length){var t=parseInt(e[1]);if(!isNaN(t))return t}return null},f.isD3Selection=function(e){return e instanceof i.selection},f.ensureSingle=function(e,t,r,i){var n=e.select(t+(r?"."+r:""));if(n.size())return n;var a=e.append(t);return r&&a.classed(r,!0),i&&a.call(i),a},f.ensureSingleById=function(e,t,r,i){var n=e.select(t+"#"+r);if(n.size())return n;var a=e.append(t).attr("id",r);return i&&a.call(i),a},f.objectFromPath=function(e,t){for(var r,i=e.split("."),n=r={},a=0;a1?n+o[1]:"";if(a&&(o.length>1||s.length>4||r))for(;i.test(s);)s=s.replace(i,"$1"+a+"$2");return s+l},f.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var ee=/^\w*$/;f.templateString=function(e,t){var r={};return e.replace(f.TEMPLATE_STRING_REGEX,function(e,i){var n;return ee.test(i)?n=t[i]:(r[i]=r[i]||f.nestedProperty(t,i).get,n=r[i](!0)),void 0!==n?n:""})};var et={max:10,count:0,name:"hovertemplate"};f.hovertemplateString=e=>eh(r(d({},e),n({opts:et})));var er={max:10,count:0,name:"texttemplate"};f.texttemplateString=e=>eh(r(d({},e),n({opts:er})));var en=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/,ea={max:10,count:0,name:"texttemplate",parseMultDiv:!0};f.texttemplateStringForShapes=e=>eh(r(d({},e),n({opts:ea})));var eu=/^[:|\|]/;function eh({data:e=[],locale:t,fallback:r,labels:i={},opts:n,template:o}){return o.replace(f.TEMPLATE_STRING_REGEX,(o,s,l)=>{let c,u=["xother","yother"].includes(s),h=["_xother","_yother"].includes(s),d=["_xother_","_yother_"].includes(s),p=["xother_","yother_"].includes(s),m=u||h||p||d;(h||d)&&(s=s.substring(1)),(p||d)&&(s=s.substring(0,s.length-1));let g=null,y=null;if(n.parseMultDiv){var v,x,b,_=(x=(v=s).match(en))?{key:x[1],op:x[2],number:Number(x[3])}:{key:v,op:null,number:null};s=_.key,g=_.op,y=_.number}if(m){if(void 0===i[s])return"";c=i[s]}else for(let t of e)if(t){if(t.hasOwnProperty(s)){c=t[s];break}if(ee.test(s)||(c=f.nestedProperty(t,s).get(!0)),void 0!==c)break}if(void 0===c){let{count:e,max:t,name:i}=n,a=!1===r?o:r;return e=48&&o<=57,c=s>=48&&s<=57;if(l&&(i=10*i+o-48),c&&(n=10*n+s-48),!l||!c){if(i!==n)return i-n;if(o!==s)return o-s}}return n-i};var ed=2e9;f.seedPseudoRandom=function(){ed=2e9},f.pseudoRandom=function(){var e=ed;return 0x19999999>Math.abs((ed=(69069*ed+1)%0x100000000)-e)?f.pseudoRandom():ed/0x100000000},f.fillText=function(e,t,r){var i=Array.isArray(r)?function(e){r.push(e)}:function(e){r.text=e},n=f.extractOption(e,t,"htx","hovertext");if(f.isValidTextValue(n))return i(n);var a=f.extractOption(e,t,"tx","text");if(f.isValidTextValue(a))return i(a)},f.isValidTextValue=function(e){return e||0===e},f.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",i=0;i1&&(c=1):c=0,f.strTranslate(n-c*(r+o),a-c*(i+s))+f.strScale(c)+(l?"rotate("+l+(t?"":" "+r+" "+i)+")":"")},f.setTransormAndDisplay=function(e,t){e.attr("transform",f.getTextTransform(t)),e.style("display",t.scale?null:"none")},f.ensureUniformFontSize=function(e,t){var r=f.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r},f.join2=function(e,t,r){var i=e.length;return i>1?e.slice(0,-1).join(t)+r+e[i-1]:e.join(t)},f.bigFont=function(e){return Math.round(1.2*e)};var ef=f.getFirefoxVersion(),ep=null!==ef&&ef<86;f.getPositionFromD3Event=function(){return ep?[i.event.layerX,i.event.layerY]:[i.event.offsetX,i.event.offsetY]}}}),tx=p({"build/plotcss.js"(){var e,t,r=tv(),i={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.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(t in i)e=t.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),r.addStyleRule(e,i[t])}}),tb=p({"node_modules/is-browser/client.js"(e,t){t.exports=!0}}),t_=p({"node_modules/has-hover/index.js"(e,t){var r=tb();t.exports="function"==typeof window.matchMedia?!window.matchMedia("(hover: none)").matches:r}}),tw=p({"node_modules/events/events.js"(e,t){var r,i="object"==typeof Reflect?Reflect:null,n=i&&"function"==typeof i.apply?i.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};r=i&&"function"==typeof i.ownKeys?i.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var a=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}t.exports=o,t.exports.once=function(e,t){return new Promise(function(r,i){var n,a,o;function s(r){e.removeListener(t,l),i(r)}function l(){"function"==typeof e.removeListener&&e.removeListener("error",s),r([].slice.call(arguments))}g(e,t,l,{once:!0}),"error"!==t&&(n=e,a=s,o={once:!0},"function"==typeof n.on&&g(n,"error",a,o))})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function l(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function c(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function u(e,t,r,i){var n,a,o;if(l(r),void 0===(a=e._events)?(a=e._events=Object.create(null),e._eventsCount=0):(void 0!==a.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),a=e._events),o=a[t]),void 0===o)o=a[t]=r,++e._eventsCount;else if("function"==typeof o?o=a[t]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),(n=c(e))>0&&o.length>n&&!o.warned){o.warned=!0;var s=Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,console&&console.warn&&console.warn(s)}return e}function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=h.bind(i);return n.listener=r,i.wrapFn=n,n}function f(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=Array(e.length),r=0;r0&&(o=t[0]),o instanceof Error)throw o;var o,s=Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=a[e];if(void 0===l)return!1;if("function"==typeof l)n(l,this,t);else for(var c=l.length,u=m(l,c),r=0;r=0;a--)if(r[a]===t||r[a].listener===t){o=r[a].listener,n=a;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1=0;i--)this.removeListener(e,t[i]);return this},o.prototype.listeners=function(e){return f(this,e,!0)},o.prototype.rawListeners=function(e){return f(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},o.prototype.listenerCount=p,o.prototype.eventNames=function(){return this._eventsCount>0?r(this._events):[]}}}),tT=p({"src/lib/events.js"(e,t){var r=tw().EventEmitter;t.exports={init:function(e){if(e._ev instanceof r)return e;var t=new r,i=new r;return e._ev=t,e._internalEv=i,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=i.on.bind(i),e._internalOnce=i.once.bind(i),e._removeInternalListener=i.removeListener.bind(i),e._removeAllInternalListeners=i.removeAllListeners.bind(i),e.emit=function(e,r){t.emit(e,r),i.emit(e,r)},"function"==typeof e.addEventListener&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var i,n=e._ev;if(n){var a=n._events[t];if(a){for(a=Array.isArray(a)?a:[a],i=0;ii.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)},n.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0},n.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1},n.undo=function(e){var t,r;if(!(void 0===e.undoQueue||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,r=0;r=a.length)return!1;if(2===e.dimensions){if(r++,t.length===r)return e;var o=t[r];if(!x(o))return!1;e=a[n][o]}else e=a[n]}else e=a}}return e}function x(e){return e===Math.round(e)&&e>=0}function b(t){var r,i;return r=t,e.crawl(r,function(t,r,i){!e.isValObject(t)&&u(t)&&(t.role="object")}),i=t,e.crawl(i,function(e,t,r){if(e){var i=e[m];i&&(delete e[m],r[t]={items:{}},r[t].items[i]=e,r[t].role="object")}}),!function e(t){for(var r in t)if(u(t[r]))e(t[r]);else if(Array.isArray(t[r]))for(var i=0;i=a&&(n._input||{})._templateitemname;s&&(o=a);var l,c=r+"["+o+"]";function u(){l={},s&&(l[c]={},l[c][i]=s)}function h(e,r){s?t.nestedProperty(l[c],e).set(r):l[c+"."+e]=r}function d(){var e=l;return u(),e}return u(),{modifyBase:function(e,t){l[e]=t},modifyItem:h,getUpdateObj:d,applyUpdate:function(r,i){r&&h(r,i);var n=d();for(var a in n)t.nestedProperty(e,a).set(n[a])}}}}}),tE=p({"src/plots/cartesian/constants.js"(e,t){var r=(eo(),v(ei)).counter;t.exports={idRegex:{x:r("x","( domain)?"),y:r("y","( domain)?")},attrRegex:r("[xy]axis"),xAxisMatch:r("xaxis"),yAxisMatch:r("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),tC=p({"src/plots/cartesian/axis_ids.js"(e){var t=eQ(),r=tE();function i(e,t){if(t&&t.length){for(var r=0;ri?1:-1:(e.slice(1)||1)-(t.slice(1)||1)},e.ref2id=function(e){return!!/^[xyz]/.test(e)&&e.split(" ")[0]},e.isLinked=function(e,t){return i(t,e._axisMatchGroups)||i(t,e._axisConstraintGroups)}}}),tL=p({"src/components/shapes/handle_outline.js"(e,t){t.exports={clearOutlineControllers:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()},clearOutline:function(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}}}}),tP=p({"src/traces/scatter/layout_attributes.js"(e,t){t.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}}}),tI=p({"src/plots/get_data.js"(e){var t=eQ();tE().SUBPLOT_PATTERN,e.getSubplotCalcData=function(e,r,i){var n=t.subplotsRegistry[r];if(!n)return[];for(var a=n.attr,o=[],s=0;s0?".":"")+a;r.isPlainObject(s)?o(s,t,l,n+1):t(l,a,s)}})}e.manageCommandObserver=function(t,n,a,o){var s={},l=!0;n&&n._commandObserver&&(s=n._commandObserver),s.cache||(s.cache={}),s.lookupTable={};var c=e.hasSimpleAPICommandBindings(t,a,s.lookupTable);if(n&&n._commandObserver){if(c)return s;if(n._commandObserver.remove)return n._commandObserver.remove(),n._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;h1&&z.length>1){for(s.getComponentMethod("grid","sizeDefaults")(c,l),o=0;o15&&z.length>15&&0===l.shapes.length&&0===l.images.length,w.linkSubplots(d,l,h,a),w.cleanPlot(d,l,h,a);var B=!!(a._has&&a._has("cartesian")),N=!!(l._has&&l._has("cartesian"));B&&!N?a._bgLayer.remove():N&&!B&&(l._shouldCreateBgLayer=!0),a._zoomlayer&&!e._dragging&&p({_fullLayout:a}),function(e,t){var r,i=[];t.meta&&(r=t._meta={meta:t.meta,layout:{meta:t.meta}});for(var n=0;n0){var h=1-2*s;i=Math.round(h*i),a=Math.round(h*a)}}var d=w.layoutAttributes.width.min,f=w.layoutAttributes.height.min;i1,m=!t.height&&Math.abs(r.height-a)>1;(m||p)&&(p&&(r.width=i),m&&(r.height=a)),e._initialAutoSize||(e._initialAutoSize={width:i,height:a}),w.sanitizeMargins(r)},w.supplyLayoutModuleDefaults=function(e,t,r,i){var n,a,o,l=s.componentsRegistry,c=t._basePlotModules,h=s.subplotsRegistry.cartesian;for(n in l)(o=l[n]).includeBasePlot&&o.includeBasePlot(e,t);for(var d in c.length||c.push(h),t._has("cartesian")&&(s.getComponentMethod("grid","contentDefaults")(e,t),h.finalizeSubplots(e,t)),t._subplots)t._subplots[d].sort(u.subplotSort);for(a=0;a1&&(r.l/=y,r.r/=y)}if(f){var v=(r.t+r.b)/f;v>1&&(r.t/=v,r.b/=v)}var x=void 0!==r.xl?r.xl:r.x,b=void 0!==r.xr?r.xr:r.x,_=void 0!==r.yt?r.yt:r.y,T=void 0!==r.yb?r.yb:r.y;p[t]={l:{val:x,size:r.l+g},r:{val:b,size:r.r+g},b:{val:T,size:r.b+g},t:{val:_,size:r.t+g}},m[t]=1}else delete p[t],delete m[t];if(!i._replotting)return w.doAutoMargin(e)}},w.doAutoMargin=function(e){var t,r,i=e._fullLayout,a=i.width,o=i.height;i._size||(i._size={}),D(i);var l=i._size,c=i.margin,h={t:0,b:0,l:0,r:0},d=u.extendFlat({},l),p=c.l,m=c.r,g=c.t,y=c.b,v=i._pushmargin,x=i._pushmarginIds,b=i.minreducedwidth,_=i.minreducedheight;if(!1!==c.autoexpand){for(var T in v)x[T]||delete v[T];var M=e._fullLayout._reservedMargin;for(var k in M)for(var A in M[k]){var S=M[k][A];h[A]=Math.max(h[A],S)}for(var E in v.base={l:{val:0,size:p},r:{val:1,size:m},t:{val:1,size:g},b:{val:0,size:y}},h){var C=0;for(var L in v)"base"!==L&&n(v[L][E].size)&&(C=v[L][E].size>C?v[L][E].size:C);var P=Math.max(0,c[E]-C);h[E]=Math.max(0,h[E]-P)}for(var I in v){var z=v[I].l||{},O=v[I].b||{},R=z.val,F=z.size,j=O.val,B=O.size,N=a-h.r-h.l,U=o-h.t-h.b;for(var V in v){if(n(F)&&v[V].r){var q=v[V].r.val,H=v[V].r.size;if(q>R){var G=(F*q+(H-N)*R)/(q-R),W=(H*(1-R)+(F-N)*(1-q))/(q-R);G+W>p+m&&(p=G,m=W)}}if(n(B)&&v[V].t){var Y=v[V].t.val,Z=v[V].t.size;if(Y>j){var $=(B*Y+(Z-U)*j)/(Y-j),X=(Z*(1-j)+(B-U)*(1-Y))/(Y-j);$+X>y+g&&(y=$,g=X)}}}}}var K=u.constrain(a-c.l-c.r,2,b),J=u.constrain(o-c.t-c.b,2,_),Q=Math.max(0,a-K),ee=Math.max(0,o-J);if(Q){var et=(p+m)/Q;et>1&&(p/=et,m/=et)}if(ee){var er=(y+g)/ee;er>1&&(y/=er,g/=er)}if(l.l=Math.round(p)+h.l,l.r=Math.round(m)+h.r,l.t=Math.round(g)+h.t,l.b=Math.round(y)+h.b,l.p=Math.round(c.pad),l.w=Math.round(a)-l.l-l.r,l.h=Math.round(o)-l.t-l.b,!i._replotting&&(w.didMarginChange(d,l)||function(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=f.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}(e))){"_redrawFromAutoMarginCount"in i?i._redrawFromAutoMarginCount++:i._redrawFromAutoMarginCount=1;var ei=3*(1+Object.keys(x).length);if(i._redrawFromAutoMarginCount0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){i=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return s.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var a=0,o=0;function l(){return a++,function(){var t;o++,i||o!==a||(t=n,e._transitionData&&(function(e){if(e)for(;e.length;)e.shift()}(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return s.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(t)))}}r.runFn(l),setTimeout(l())})}],a=u.syncOrAsync(n,e);return a&&a.then||(a=Promise.resolve()),a.then(function(){return e})}w.didMarginChange=function(e,t){for(var r=0;r1)return!0}return!1},w.graphJson=function(e,t=!1,r="json",i=!1,n=!1){(i&&t&&!e._fullData||i&&!t&&!e._fullLayout)&&w.supplyDefaults(e);var o=i?e._fullData:e.data,s=i?e._fullLayout:e.layout,l=(e._transitionData||{})._frames;function c(e,t){if("function"==typeof e)return t?"_function_":null;if(u.isPlainObject(e)){var r={};return Object.keys(e).sort().forEach(function(i){if(-1===["_","["].indexOf(i.charAt(0))){if("function"==typeof e[i]){t&&(r[i]="_function");return}r[i]=c(e[i],t)}}),r}var i=Array.isArray(e),n=u.isTypedArray(e);if((i||n)&&e.dtype&&e.shape){var o=e.bdata;return c({dtype:e.dtype,shape:e.shape,bdata:u.isArrayBuffer(o)?a.encode(o):o},t)}return i?e.map(function(e){return c(e,t)}):n?u.simpleMap(e,u.identity):u.isJSDate(e)?u.ms2DateTimeLocal(+e):e}var h={data:(o||[]).map(function(e){var r=c(e);return t&&delete r.fit,r})};if(!t&&(h.layout=c(s),i)){var d=s._size;h.layout.computed={margin:{b:d.b,l:d.l,r:d.r,t:d.t}}}return l&&(h.frames=c(l)),n&&(h.config=c(e._context,!0)),"object"===r?h:JSON.stringify(h)},w.modifyFrames=function(e,t){var r,i,n,a=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;re?e.match(o):null;e.matchTex=s,e.convertToTspans=function(o,y,T){let C;var L=o.text(),z=!o.attr("data-notex")&&y&&y._context.typesetMath&&s(L);z&&!(3===(C=h())||4===C||(null===C?d||(d=!0,r.warn("MathJax is not loaded. Math equations will not be rendered.")):f||(f=!0,r.warn("Unsupported MathJax version:",MathJax.version)),0))&&(z=null);var D=t.select(o.node().parentNode);if(!D.empty()){var O=o.attr("class")?o.attr("class").split(" ")[0]:"text";return O+="-math",D.selectAll("svg."+O).remove(),D.selectAll("g."+O+"-group").remove(),o.style("display",null).attr({"data-unformatted":L,"data-math":"N"}),z?(y&&y._promises||[]).push(new Promise(function(e){let n;o.style("display","none");var a,s,d,f,p=parseInt(o.node().style.fontSize,10),m={fontSize:p},g=o.attr("text-anchor");a=z[2],s=m,d=function(t,r,n){D.selectAll("svg."+O).remove(),D.selectAll("g."+O+"-group").remove();var a=t&&t.select("svg");if(!a||!a.node()){R(),e();return}o.style("display","none");var s=D.append("g").classed(O+"-group",!0).attr({"pointer-events":"none","data-unformatted":L,"data-math":"Y"});s.node().appendChild(a.node()),r&&r.node()&&a.node().insertBefore(r.node().cloneNode(!0),a.node().firstChild);var l=n.width,c=n.height;a.attr({class:O,height:c,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":m.fontSize+"px"});var u=o.node().style.fill||"black",h=a.select("g");h.attr({fill:u,stroke:u});var d=h.node().getBoundingClientRect(),f=d.width,y=d.height;(f>l||y>c)&&(a.style("overflow","hidden"),f=(d=a.node().getBoundingClientRect()).width,y=d.height);var v=+o.attr("x"),x=+o.attr("y"),b=-(p||o.node().getBoundingClientRect().height)/4;"y"===O[0]?s.attr({transform:"rotate("+[-90,v,x]+")"+i(-f/2,b-y/2)}):"l"===O[0]?x=b-y/2:"a"===O[0]&&0!==O.indexOf("atitle")?(v=0,x=b):(v-=f*("middle"===g?.5:+("end"===g)),x=x+b-y/2),a.attr({x:v,y:x}),T&&T.call(o,s),e(s)},n=h(),Promise.resolve().then(function(){if(!u){let e=MathJax._.output.svg_ts.SVG,t=r.extendFlat({},MathJax.config.svg,{fontCache:"local"});4===n&&(t.linebreaks=r.extendFlat({},t.linebreaks,{inline:!1})),u=MathJax._.mathjax.mathjax.document(document,r.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new e(t)}))}let e="math-output-"+r.randstr({},64);f=t.select("body").append("div").attr({id:e}).style({visibility:"hidden",position:"absolute","font-size":s.fontSize+"px"});let i=a.replace(l,"\\lt ").replace(c,"\\gt ").replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return u.convert(i,{display:!1})}).then(function(e){f.node().appendChild(e)})}).then(function(){let e=f.select(".MathJax"),t=!e.empty()&&f.select("svg").node();if(t){let r=t.getBoundingClientRect(),i=e.select("defs");d(e,i,r)}else r.log("There was an error in the tex syntax.",a),d();f.remove()}).catch(e=>{r.log("MathJax typesetting failed.",a,e),f&&f.remove(),d()})})):R(),o}function R(){D.empty()||(O=o.attr("class")+"-math",D.select("svg."+O).remove()),o.text("").style("white-space","pre"),function(e,i){i=i.replace(v," ");var o,s=!1,l=[],c=-1;function u(){c++;var r=document.createElementNS(n.svg,"tspan");t.select(r).attr({class:"line",dy:c*a+"em"}),e.appendChild(r),o=r;var i=l;if(l=[{node:r}],i.length>1)for(var s=1;s.",i);var t=l.pop();e!==t.type&&r.log("Start tag <"+t.type+"> doesnt match end tag <"+e+">. Pretending it did match.",i),o=l[l.length-1].node}(L);else{var D=C[4],O={type:L},R=S(D,w);if(R?(R=R.replace(E,"$1 fill:"),z&&(R+=";"+z)):z&&(R=z),R&&(O.style=R),"a"===L){s=!0;var F=S(D,M);if(F){var j=I(F);j&&(O.href=j,O.target=S(D,k)||"_blank",O.popup=S(D,A))}}h(O)}}return s}(o.node(),L)&&o.style("pointer-events","all"),e.positionText(o),T&&T.call(o)}};var l=/(<|<|<)/g,c=/(>|>|>)/g,u=null,h=()=>"u">typeof MathJax&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,d=!1,f=!1,p={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},m={sub:"0.3em",sup:"-0.6em"},g={sub:"-0.21em",sup:"0.42em"},y=["http:","https:","mailto:","",void 0,":"],v=e.NEWLINES=/(\r\n?|\n)/g,x=/(<[^<>]*>)/,b=/<(\/?)([^ >]*)(\s+(.*))?>/i,_=//i;e.BR_TAG_ALL=//gi;var w=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,M=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,k=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(e,t){if(!e)return null;var r=e.match(t),i=r&&(r[3]||r[4]);return i&&P(i)}var E=/(^|;)\s*color:/;e.plainText=function(e,t){t=t||{};for(var r=void 0!==t.len&&-1!==t.len?t.len:1/0,i=void 0!==t.allowedTags?t.allowedTags:["br"],n=e.split(x),a=[],o="",s=0,l=0;l3?a.push(c.slice(0,Math.max(0,f-3))+"..."):a.push(c.slice(0,f));break}o=""}}return a.join("")};var C={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},L=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function P(e){return e.replace(L,function(e,t){return("#"===t.charAt(0)?function(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}("x"===t.charAt(1)?parseInt(t.slice(2),16):parseInt(t.slice(1),10)):C[t])||e})}function I(e){var t=encodeURI(decodeURI(e)),r=document.createElement("a"),i=document.createElement("a");r.href=e,i.href=t;var n=r.protocol,a=i.protocol;return -1!==y.indexOf(n)&&-1!==y.indexOf(a)?t:""}function z(e,t,i){var n,a,o,s=i.horizontalAlign,l=i.verticalAlign||"top",c=e.node().getBoundingClientRect(),u=t.node().getBoundingClientRect();return a="bottom"===l?function(){return c.bottom-n.height}:"middle"===l?function(){return c.top+(c.height-n.height)/2}:function(){return c.top},o="right"===s?function(){return c.right-n.width}:"center"===s?function(){return c.left+(c.width-n.width)/2}:function(){return c.left},function(){n=this.node().getBoundingClientRect();var e=o()-u.left,t=a()-u.top,s=i.gd||{};if(i.gd){s._fullLayout._calcInverseTransform(s);var l=r.apply3DTransform(s._fullLayout._invTransform)(e,t);e=l[0],t=l[1]}return this.style({top:t+"px",left:e+"px","z-index":1e3}),this}}e.convertEntities=P,e.sanitizeHTML=function(e){e=e.replace(v," ");for(var r=document.createElement("p"),i=r,n=[],a=e.split(x),o=0;o=0;i--,n++){var a=e[i];r[n]=[1-a[0],a[1]]}return r}function d(e,t){t=t||{};for(var n=e.domain,o=e.range,s=o.length,l=Array(s),c=0;cm-f?f=m-(p-m):p-m=0?s.colorscale.sequential:s.colorscale.sequentialminus,h._sync("colorscale",o))}}}),t3=p({"src/components/colorscale/index.js"(e,t){var r=et(),i=tj();t.exports={moduleType:"component",name:"colorscale",attributes:tV(),layoutAttributes:tq(),supplyLayoutDefaults:t0(),handleDefaults:tQ(),crossTraceDefaults:t1(),calc:t2(),scales:r.scales,defaultScale:r.defaultScale,getScale:r.get,isValidScale:r.isValid,hasColorscale:i.hasColorscale,extractOpts:i.extractOpts,extractScale:i.extractScale,flipScale:i.flipScale,makeColorScaleFunc:i.makeColorScaleFunc,makeColorScaleFuncFromTrace:i.makeColorScaleFuncFromTrace}}}),t5=p({"src/traces/scatter/subtypes.js"(e,t){var r=tv(),i=z().isTypedArraySpec;t.exports={hasLines:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("lines")},hasMarkers:function(e){return e.visible&&(e.mode&&-1!==e.mode.indexOf("markers")||"splom"===e.type)},hasText:function(e){return e.visible&&e.mode&&-1!==e.mode.indexOf("text")},isBubble:function(e){var t=e.marker;return r.isPlainObject(t)&&(r.isArrayOrTypedArray(t.size)||i(t.size))}}}}),t4=p({"src/traces/scatter/make_bubble_size_func.js"(e,t){var r=C();t.exports=function(e,t){t||(t=2);var i=e.marker,n=i.sizeref||1,a=i.sizemin||0,o="area"===i.sizemode?function(e){return Math.sqrt(e/n)}:function(e){return e/n};return function(e){var i=o(e/t);return r(i)&&i>0?Math.max(i,a):0}}}}),t6=p({"src/components/fx/helpers.js"(e){var t=tv();e.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},e.isTraceInSubplots=function(t,r){if("splom"===t.type){for(var i=t.xaxes||[],n=t.yaxes||[],a=0;a=0&&r.index{let o,s=i.toLowerCase(),l=i,c=(o=a.match(n))?o.map(Number):[];for("m"===s&&c.length>2&&(t.push([l,...c.splice(0,2)]),s="l",l="m"===l?"l":"L");;){if(c.length===r[s])return t.push([l,...c]),"";if(c.length=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}A.symbolNumber=function(e){if(f(e))e*=1;else if("string"==typeof e){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),(e=A.symbolNames.indexOf(e))>=0&&(e+=t)}return e%100>=I||e>=400?0:Math.floor(Math.max(e,0))};var D=d("~f"),O={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};function R(e,t,r,i,n,a,o,s,l,c){var d,f=n.length;"linear"===i?d={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:c}:"radial"===i&&(d={node:"radialGradient",reversed:c});for(var p=Array(f),g=0;g=0&&void 0===e.i&&(e.i=a.i),t.style("opacity",i.selectedOpacityFn?i.selectedOpacityFn(e):void 0===e.mo?o.opacity:e.mo),i.ms2mrc){l="various"===e.ms||"various"===o.size?3:i.ms2mrc(e.ms),e.mrc=l,i.selectedSizeFn&&(l=e.mrc=i.selectedSizeFn(e));var l,c=A.symbolNumber(e.mx||o.symbol)||0;e.om=c%200>=100;var u=ea(e,r),d=J(e,r);t.attr("d",z(c,l,u,d))}var f,p,g,y=!1;if(e.so)g=s.outlierwidth,p=s.outliercolor,f=o.outliercolor;else{var v=(s||{}).width;g=(e.mlw+1||v+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,p="mlc"in e?e.mlcc=i.lineScale(e.mlc):h.isArrayOrTypedArray(s.color)?m.defaultLine:s.color,h.isArrayOrTypedArray(o.color)&&(f=m.defaultLine,y=!0),f="mc"in e?e.mcc=i.markerScale(e.mc):o.color||o.colors||"rgba(0,0,0,0)",i.selectedColorFn&&(f=i.selectedColorFn(e))}let x=e.mld||(s||{}).dash;if(x&&A.dashLine(t,x,g),e.om)t.call(m.stroke,f).style({"stroke-width":(g||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:g)+"px");var b=o.gradient,_=e.mgt;_?y=!0:_=b&&b.type,h.isArrayOrTypedArray(_)&&(O[_=_[0]]||(_=0));var w=o.pattern,T=A.getPatternAttr,M=w&&(T(w.shape,e.i,"")||T(w.path,e.i,""));if(_&&"none"!==_){var k=e.mgc;k?y=!0:k=b.color;var S=r.uid;y&&(S+="-"+e.i),A.gradient(t,n,S,_,[[0,k],[1,f]],"fill")}else if(M){var E=!1,C=w.fgcolor;!C&&a&&a.color&&(C=a.color,E=!0);var L=T(C,e.i,a&&a.color||null),P=T(w.bgcolor,e.i,null),I=w.fgopacity,D=T(w.size,e.i,8),R=T(w.solidity,e.i,.3);E=E||e.mcc||h.isArrayOrTypedArray(w.shape)||h.isArrayOrTypedArray(w.path)||h.isArrayOrTypedArray(w.bgcolor)||h.isArrayOrTypedArray(w.fgcolor)||h.isArrayOrTypedArray(w.size)||h.isArrayOrTypedArray(w.solidity);var F=r.uid;E&&(F+="-"+e.i),A.pattern(t,"point",n,F,M,D,R,e.mcc,w.fillmode,P,L,I)}else h.isArrayOrTypedArray(f)?m.fill(t,f[e.i]):m.fill(t,f);g&&m.stroke(t,p)}},A.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=A.tryColorscale(r,""),t.lineScale=A.tryColorscale(r,"line"),p.traceIs(e,"symbols")&&(t.ms2mrc=w.isBubble(e)?M(e):function(){return(r.size||6)/2}),e.selectedpoints&&h.extendFlat(t,A.makeSelectedPointStyleFns(e)),t},A.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},n=e.marker||{},a=r.marker||{},o=i.marker||{},s=n.opacity,l=a.opacity,c=o.opacity,u=void 0!==l,d=void 0!==c;(h.isArrayOrTypedArray(s)||u||d)&&(t.selectedOpacityFn=function(e){var t=void 0===e.mo?n.opacity:e.mo;return e.selected?u?l:t:d?c:_*t});var f=n.color,m=a.color,g=o.color;(m||g)&&(t.selectedColorFn=function(e){var t=e.mcc||f;return e.selected?m||t:g||t});var y=n.size,v=a.size,x=o.size,b=void 0!==v,w=void 0!==x;return p.traceIs(e,"symbols")&&(b||w)&&(t.selectedSizeFn=function(e){var t=e.mrc||y/2;return e.selected?b?v/2:t:w?x/2:t}),t},A.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},i=e.unselected||{},n=e.textfont||{},a=r.textfont||{},o=i.textfont||{},s=n.color,l=a.color,c=o.color;return t.selectedTextColorFn=function(e){var t=e.tc||s;return e.selected?l||t:c||(l?t:m.addOpacity(t,_))},t},A.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=A.makeSelectedPointStyleFns(t),i=t.marker||{},n=[];r.selectedOpacityFn&&n.push(function(e,t){e.style("opacity",r.selectedOpacityFn(t))}),r.selectedColorFn&&n.push(function(e,t){m.fill(e,r.selectedColorFn(t))}),r.selectedSizeFn&&n.push(function(e,n){var a=n.mx||i.symbol||0,o=r.selectedSizeFn(n);e.attr("d",z(A.symbolNumber(a),o,ea(n,t),J(n,t))),n.mrc2=o}),n.length&&e.each(function(e){for(var t=u.select(this),r=0;r0?r:0}function N(e,t,r){return r&&(e=W(e)),t?V(e[1]):U(e[0])}function U(e){var t=u.round(e,2);return r=t,t}function V(e){var t=u.round(e,2);return i=t,t}function q(e,t,r,i){var n=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(n*n+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*n-l*l*o)*i,h=(c*c*a-l*l*s)*i,d=3*c*(l+c),f=3*l*(l+c);return[[U(t[0]+(d&&u/d)),V(t[1]+(d&&h/d))],[U(t[0]-(f&&u/f)),V(t[1]-(f&&h/f))]]}A.textPointStyle=function(e,t,r){if(e.size()){if(t.selectedpoints){var i;i=A.makeSelectedTextStyleFns(t).selectedTextColorFn}var n=t.texttemplate,a=r._fullLayout;e.each(function(e){var o=u.select(this),s=n?h.extractOption(e,t,"txt","texttemplate"):h.extractOption(e,t,"tx","text");if(!s&&0!==s)return void o.remove();if(n){var l=t._module.formatLabels,c=l?l(e,t,a):{},d={};k(d,t,e.i),s=h.texttemplateString({data:[d,e,t._meta],fallback:t.texttemplatefallback,labels:c,locale:a._d3locale,template:s})}var f=e.tp||t.textposition,p=B(e,t),m=i?i(e):e.tc||t.textfont.color;o.call(A.font,{family:e.tf||t.textfont.family,weight:e.tw||t.textfont.weight,style:e.ty||t.textfont.style,variant:e.tv||t.textfont.variant,textcase:e.tC||t.textfont.textcase,lineposition:e.tE||t.textfont.lineposition,shadow:e.tS||t.textfont.shadow,size:p,color:m}).text(s).call(v.convertToTspans,r).call(j,f,p,e.mrc)})}},A.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=A.makeSelectedTextStyleFns(t);e.each(function(e){var i=u.select(this),n=r.selectedTextColorFn(e),a=e.tp||t.textposition,o=B(e,t);m.fill(i,n);var s=p.traceIs(t,"bar-like");j(i,a,o,e.mrc2||e.mrc,s)})}},A.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r,i="M"+e[0],n=[];for(r=1;r=u||_>=f&&_<=u)&&(w<=p&&w>=d||w>=p&&w<=d)&&(e=[_,w])}return e}A.steps=function(e){var t=H[e]||G;return function(e){for(var r="M"+U(e[0][0])+","+V(e[0][1]),i=e.length,n=1;n=1e4&&(A.savedBBoxes={},Y=0),r&&(A.savedBBoxes[r]=m),Y++,h.extendFlat({},m)},A.setClipUrl=function(e,t,r){e.attr("clip-path",$(t,r))},A.getTranslate=function(e){var t=e.attr?"attr":"getAttribute",r=(e[t]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(e,t,r){return[t,r].join(" ")}).split(" ");return{x:+r[0]||0,y:+r[1]||0}},A.setTranslate=function(e,t,r){var i=e.attr?"attr":"getAttribute",n=e.attr?"attr":"setAttribute",a=e[i]("transform")||"";return t=t||0,r=r||0,a=(a=a.replace(/(\btranslate\(.*?\);?)/,"").trim()+y(t,r)).trim(),e[n]("transform",a),a},A.getScale=function(e){var t=e.attr?"attr":"getAttribute",r=(e[t]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(e,t,r){return[t,r].join(" ")}).split(" ");return{x:+r[0]||1,y:+r[1]||1}},A.setScale=function(e,t,r){var i=e.attr?"attr":"getAttribute",n=e.attr?"attr":"setAttribute",a=e[i]("transform")||"";return t=t||1,r=r||1,a=(a=a.replace(/(\bscale\(.*?\);?)/,"").trim()+("scale("+t+","+r)+")").trim(),e[n]("transform",a),a};var X=/\s*sc.*/;A.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,e){var i=1===t&&1===r?"":"scale("+t+","+r+")";e.each(function(){var e=(this.getAttribute("transform")||"").replace(X,"");e+=i,e=e.trim(),this.setAttribute("transform",e)})}};var K=/translate\([^)]*\)\s*$/;function J(e,t){var r;return e&&(r=e.mf),void 0===r&&(r=t.marker&&t.marker.standoff||0),t._geo||t._xA?r:-r}A.setTextPointsScale=function(e,t,r){e&&e.each(function(){var e,i=u.select(this),n=i.select("text");if(n.node()){var a=parseFloat(n.attr("x")||0),o=parseFloat(n.attr("y")||0),s=(i.attr("transform")||"").match(K);e=1===t&&1===r?[]:[y(a,o),"scale("+t+","+r+")",y(-a,-o)],s&&e.push(s),i.attr("transform",e.join(""))}})},A.getMarkerStandoff=J;var Q=Math.atan2,et=Math.cos,ei=Math.sin;function en(e,t){var r=t[0],i=t[1];return[r*et(e)-i*ei(e),r*ei(e)+i*et(e)]}function ea(e,t){var r=e.ma;void 0===r&&(!f(r=t.marker.angle)||h.isArrayOrTypedArray(r))&&(r=0);var i,u,d=t.marker.angleref;if("previous"===d||"north"===d){if(t._geo){var p=t._geo.project(e.lonlat);i=p[0],u=p[1]}else{var m=t._xA,g=t._yA;if(!m||!g)return 90;i=m.c2p(e.x),u=g.c2p(e.y)}if(t._geo){var y,v=e.lonlat[0],x=e.lonlat[1],b=t._geo.project([v,x+1e-5]),_=t._geo.project([v+1e-5,x]),w=Q(_[1]-u,_[0]-i),T=Q(b[1]-u,b[0]-i);if("north"===d)y=r/180*Math.PI;else if("previous"===d){var M=x/180*Math.PI,k=a/180*Math.PI,A=n/180*Math.PI-v/180*Math.PI;y=-Q(et(k)*ei(A),ei(k)*et(M)-et(k)*ei(M)*et(A))-Math.PI,n=v,a=x}var S=en(w,[et(y),0]),E=en(T,[ei(y),0]);r=Q(S[1]+E[1],S[0]+E[0])/Math.PI*180,"previous"===d&&(c!==t.uid||e.i!==l+1)&&(r=null)}if("previous"===d&&!t._geo)if(c===t.uid&&e.i===l+1&&f(i)&&f(u)){var C=i-o,L=u-s,P=t.line&&t.line.shape||"",I=P.slice(P.length-1);"h"===I&&(L=0),"v"===I&&(C=0),r+=Q(L,C)/Math.PI*180+90}else r=null}return o=i,s=u,l=e.i,c=t.uid,r}A.getMarkerAngle=ea}}),re=p({"src/components/titles/index.js"(e,t){var r=T(),i=C(),n=tD(),a=eQ(),o=tv(),s=o.strTranslate,l=t9(),c=ee(),u=tF(),h=er(),d=tR().OPPOSITE_SIDE,f=/ [XY][0-9]* /;t.exports={draw:function(e,t,p){var m,g=e._fullLayout,y=p.propContainer,v=p.propName,x=p.placeholder,b=p.traceIndex,_=p.avoid||{},w=p.attributes,T=p.transform,M=p.containerGroup,k=1,A=y.title,S=(A&&A.text?A.text:"").trim(),E=!1,C=A&&A.font?A.font:{},L=C.family,P=C.size,I=C.color,z=C.weight,D=C.style,O=C.variant,R=C.textcase,F=C.lineposition,j=C.shadow,B=!!p.subtitlePropName,N=p.subtitlePlaceholder,U=(y.title||{}).subtitle||{text:"",font:{}},V=(U.text||"").trim(),q=!1,H=1,G=U.font,W=G.family,Y=G.size,Z=G.color,$=G.weight,X=G.style,K=G.variant,J=G.textcase,Q=G.lineposition,ee=G.shadow;"title.text"===v?m="titleText":-1!==v.indexOf("axis")?m="axisTitleText":-1!==v.indexOf("colorbar")&&(m="colorbarTitleText");var et=e._context.edits[m];function er(e,t){return void 0!==e&&void 0!==t&&e.replace(f," % ")===t.replace(f," % ")}""===S?k=0:er(S,x)&&(et||(S=""),k=.2,E=!0),B&&(""===V?H=0:er(V,N)&&(et||(V=""),H=.2,q=!0)),p._meta?S=o.templateString(S,p._meta):g._meta&&(S=o.templateString(S,g._meta));var ei,en=S||V||et;M||(M=o.ensureSingle(g._infolayer,"g","g-"+t),ei=g._hColorbarMoveTitle);var ea=M.selectAll("text."+t).data(en?[0]:[]);ea.enter().append("text"),ea.text(S).attr("class",t),ea.exit().remove();var eo=null,es=t+"-subtitle",el=V||et;if(B&&((eo=M.selectAll("text."+es).data(el?[0]:[])).enter().append("text"),eo.text(V).attr("class",es),eo.exit().remove()),!en)return M;function ec(e,t){o.syncOrAsync([eu,eh],{title:e,subtitle:t})}function eu(i){var a,h=i.title,d=i.subtitle;if(!T&&ei&&(T={}),T?(a="",T.rotate&&(a+="rotate("+[T.rotate,w.x,w.y]+")"),(T.offset||ei)&&(a+=s(0,(T.offset||0)-(ei||0)))):a=null,h.attr("transform",a),h.style("opacity",k*c.opacity(I)).call(l.font,{color:c.rgb(I),size:r.round(P,2),family:L,weight:z,style:D,variant:O,textcase:R,shadow:j,lineposition:F}).attr(w).call(u.convertToTspans,e,function(e){if(e){var t=r.select(e.node().parentNode).select("."+es);if(!t.empty()){var i=e.node().getBBox();if(i.height){var n=i.y+i.height+1.6*Y;t.attr("y",n)}}}}),d&&!d.empty()){var f=M.select("."+t+"-math-group"),p=h.node().getBBox(),m=f.node()?f.node().getBBox():void 0,g=m?m.y+m.height+1.6*Y:p.y+p.height+1.6*Y,y=o.extendFlat({},w,{y:g});d.attr("transform",a),d.style("opacity",H*c.opacity(Z)).call(l.font,{color:c.rgb(Z),size:r.round(Y,2),family:W,weight:$,style:X,variant:K,textcase:J,shadow:ee,lineposition:Q}).attr(y).call(u.convertToTspans,e)}return n.previousPromises(e)}function eh(t){var n=t.title,a=r.select(n.node().parentNode);if(_&&_.selection&&_.side&&S){a.attr("transform",null);var c=d[_.side],u="left"===_.side||"top"===_.side?-1:1,h=i(_.pad)?_.pad:2,f=l.bBox(a.node()),p={t:0,b:0,l:0,r:0},m=e._fullLayout._reservedMargin;for(var v in m)for(var x in m[v]){var b=m[v][x];p[x]=Math.max(p[x],b)}var w={left:p.l,top:p.t,right:g.width-p.r,bottom:g.height-p.b},T=_.maxShift||u*(w[_.side]-f[_.side]),M=0;if(T<0)M=T;else{var k=_.offsetLeft||0,A=_.offsetTop||0;f.left-=k,f.right-=k,f.top-=A,f.bottom-=A,_.selection.each(function(){var e=l.bBox(this);o.bBoxIntersect(f,e,h)&&(M=Math.max(M,u*(e[_.side]-f[c])+h))}),y._titleScoot=Math.abs(M=Math.min(T,M))}if(M>0||T<0){var E={left:[-M,0],right:[M,0],top:[0,-M],bottom:[0,M]}[_.side];a.attr("transform",s(E[0],E[1]))}}}function ed(e,t){e.text(t).on("mouseover.opacity",function(){r.select(this).transition().duration(h.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){r.select(this).transition().duration(h.HIDE_PLACEHOLDER).style("opacity",0)})}if(ea.call(ec,eo),et&&(S?ea.on(".opacity",null):(ed(ea,x),E=!0),ea.call(u.makeEditable,{gd:e}).on("edit",function(t){void 0!==b?a.call("_guiRestyle",e,v,t,b):a.call("_guiRelayout",e,v,t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ec)}).on("input",function(e){this.text(e||" ").call(u.positionText,w.x,w.y)}),B)){if(B&&!S){var ef=ea.node().getBBox(),ep=ef.y+ef.height+1.6*Y;eo.attr("y",ep)}V?eo.on(".opacity",null):(ed(eo,N),q=!0),eo.call(u.makeEditable,{gd:e}).on("edit",function(t){a.call("_guiRelayout",e,"title.subtitle.text",t)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(ec)}).on("input",function(e){this.text(e||" ").call(u.positionText,eo.attr("x"),eo.attr("y"))})}return ea.classed("js-placeholder",E),eo&&!eo.empty()&&eo.classed("js-placeholder",q),M},SUBTITLE_PADDING_EM:1.6,SUBTITLE_PADDING_MATHJAX_EM:1.6}}}),rt=p({"src/plots/cartesian/set_convert.js"(e,t){var r=T(),i=k().utcFormat,n=tv(),a=n.numberFormat,o=C(),s=n.cleanNumber,l=n.ms2DateTime,c=n.dateTime2ms,u=n.ensureNumber,h=n.isArrayOrTypedArray,d=L(),f=d.FP_SAFE,p=d.BADNUM,m=d.LOG_CLIP,g=d.ONEWEEK,y=d.ONEDAY,v=d.ONEHOUR,x=d.ONEMIN,b=d.ONESEC,_=tC(),w=tE(),M=w.HOUR_PATTERN,A=w.WEEKDAY_PATTERN;function S(e){return Math.pow(10,e)}t.exports=function(e,t){t=t||{};var d=e._id||"x",T=d.charAt(0);function k(t,r){if(t>0)return Math.log(t)/Math.LN10;if(!(t<=0)||!r||!e.range||2!==e.range.length)return p;var i=e.range[0],n=e.range[1];return .5*(i+n-2*m*Math.abs(i-n))}function E(t,r,i,a){if((a||{}).msUTC&&o(t))return+t;var s=c(t,i||e.calendar);if(s===p)if(!o(t))return p;else{t*=1;var l=Math.floor(10*n.mod(t+.05,1));s=c(new Date(Math.round(t-l/10)))+l/10}return s}function C(t,r,i){return l(t,r,i||e.calendar)}function L(t){return e._categories[Math.round(t)]}function P(t){if(null!=t){if(void 0===e._categoriesMap&&(e._categoriesMap={}),void 0!==e._categoriesMap[t])return e._categoriesMap[t];e._categories.push("number"==typeof t?String(t):t);var r=e._categories.length-1;return e._categoriesMap[t]=r,r}return p}function I(t){if(e._categoriesMap)return e._categoriesMap[t]}function z(e){var t=I(e);return void 0!==t?t:o(e)?+e:void 0}function D(e){return o(e)?+e:I(e)}function O(e,t,i){return r.round(i+t*e,2)}var R=function(t){return o(t)?O(t,e._m,e._b):p},F=function(t){var r;return r=e._m,(t-e._b)/r};if(e.rangebreaks){var j="y"===T;R=function(t){if(!o(t))return p;var r=e._rangebreaks.length;if(!r)return O(t,e._m,e._b);var i=j;e.range[0]>e.range[1]&&(i=!i);for(var n=i?-1:1,a=n*t,s=0,l=0;lu)s=l+1;else{s=a<(c+u)/2?l:l+1;break}}var h=e._B[s]||0;return isFinite(h)?O(t,e._m2,h):0},F=function(t){var r,i,n=e._rangebreaks.length;if(!n)return r=e._m,(t-e._b)/r;for(var a=0,o=0;oe._rangebreaks[o].pmax&&(a=o+1);return i=e._m2,(t-e._B[a])/i}}e.c2l="log"===e.type?k:u,e.l2c="log"===e.type?S:u,e.l2p=R,e.p2l=F,e.c2p="log"===e.type?function(e,t){return R(k(e,t))}:R,e.p2c="log"===e.type?function(e){return S(F(e))}:F,-1!==["linear","-"].indexOf(e.type)?(e.d2r=e.r2d=e.d2c=e.r2c=e.d2l=e.r2l=s,e.c2d=e.c2r=e.l2d=e.l2r=u,e.d2p=e.r2p=function(t){return e.l2p(s(t))},e.p2d=e.p2r=F,e.cleanPos=u):"log"===e.type?(e.d2r=e.d2l=function(e,t){return k(s(e),t)},e.r2d=e.r2c=function(e){return S(s(e))},e.d2c=e.r2l=s,e.c2d=e.l2r=u,e.c2r=k,e.l2d=S,e.d2p=function(t,r){return e.l2p(e.d2r(t,r))},e.p2d=function(e){return S(F(e))},e.r2p=function(t){return e.l2p(s(t))},e.p2r=F,e.cleanPos=u):"date"===e.type?(e.d2r=e.r2d=n.identity,e.d2c=e.r2c=e.d2l=e.r2l=E,e.c2d=e.c2r=e.l2d=e.l2r=C,e.d2p=e.r2p=function(t,r,i){return e.l2p(E(t,0,i))},e.p2d=e.p2r=function(e,t,r){return C(F(e),t,r)},e.cleanPos=function(t){return n.cleanDate(t,p,e.calendar)}):"category"===e.type?(e.d2c=e.d2l=P,e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=z,e.r2c=function(t){var r=D(t);return void 0!==r?r:e.fraction2r(.5)},e.l2r=e.c2r=u,e.r2l=D,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return"string"==typeof e&&""!==e?e:u(e)}):"multicategory"===e.type&&(e.r2d=e.c2d=e.l2d=L,e.d2r=e.d2l_noadd=z,e.r2c=function(t){var r=z(t);return void 0!==r?r:e.fraction2r(.5)},e.r2c_just_indices=I,e.l2r=e.c2r=u,e.r2l=z,e.d2p=function(t){return e.l2p(e.r2c(t))},e.p2d=function(e){return L(F(e))},e.r2p=e.d2p,e.p2r=F,e.cleanPos=function(e){return Array.isArray(e)||"string"==typeof e&&""!==e?e:u(e)},e.setupMultiCategory=function(r){var i,a,o=e._traceIndices,s=e._matchGroup;if(s&&0===e._categories.length){for(var l in s)if(l!==d){var c=t[_.id2name(l)];o=o.concat(c._traceIndices)}}var u=[[0,{}],[0,{}]],f=[];for(i=0;il[1]&&(a[+!s]=i,o[1]=l[1]),o[0]>=o[1])if(void 0!==r){var c=l[0]+1;void 0!==i&&(c=Math.min(c,l[1])),a[+!s]=e.l2r(c)}else void 0!==i&&(a[+!!s]=e.l2r(l[1]-1))}},e.cleanRange=function(t,r){e._cleanRange(t,r),e.limitRange(t)},e._cleanRange=function(t,r){r||(r={}),t||(t="range");var i,a,s=n.nestedProperty(e,t).get();if(a=(a="date"===e.type?n.dfltRange(e.calendar):"y"===T?w.DFLTRANGEY:"realaxis"===e._name?[0,1]:r.dfltRange||w.DFLTRANGEX).slice(),("tozero"===e.rangemode||"nonnegative"===e.rangemode)&&(a[0]=0),!s||2!==s.length)return void n.nestedProperty(e,t).set(a);var l=null===s[0],c=null===s[1];for("date"!==e.type||e.autorange||(s[0]=n.cleanDate(s[0],p,e.calendar),s[1]=n.cleanDate(s[1],p,e.calendar)),i=0;i<2;i++)if("date"===e.type){if(!n.isDateTime(s[i],e.calendar)){e[t]=a;break}if(e.r2l(s[0])===e.r2l(s[1])){var u=n.constrain(e.r2l(s[0]),n.MIN_MS+1e3,n.MAX_MS-1e3);s[0]=e.l2r(u-1e3),s[1]=e.l2r(u+1e3);break}}else{if(!o(s[i]))if(!(l||c)&&o(s[1-i]))s[i]=s[1-i]*(i?10:.1);else{e[t]=a;break}if(s[i]<-f?s[i]=-f:s[i]>f&&(s[i]=f),s[0]===s[1]){var h=Math.max(1,Math.abs(1e-6*s[0]));s[0]-=h,s[1]+=h}}},e.setScale=function(r){var i,n,a=t._size;if(e.overlaying){var o=_.getFromId({_fullLayout:t},e.overlaying);e.domain=o.domain}var s=r&&e._r?"_r":"range",l=e.calendar;e.cleanRange(s);var c=e.r2l(e[s][0],l),u=e.r2l(e[s][1],l),h="y"===T;if(h?(e._offset=a.t+(1-e.domain[1])*a.h,e._length=a.h*(e.domain[1]-e.domain[0]),e._m=e._length/(c-u),e._b=-e._m*u):(e._offset=a.l+e.domain[0]*a.w,e._length=a.w*(e.domain[1]-e.domain[0]),e._m=e._length/(u-c),e._b=-e._m*c),e._rangebreaks=[],e._lBreaks=0,e._m2=0,e._B=[],e.rangebreaks&&(e._rangebreaks=e.locateBreaks(Math.min(c,u),Math.max(c,u)),e._rangebreaks.length)){for(i=0;iu&&(d=!d),d&&e._rangebreaks.reverse();var f=d?-1:1;for(e._m2=f*e._length/(Math.abs(u-c)-e._lBreaks),e._B.push(-e._m2*(h?u:c)),i=0;ia&&(a+=7,oa&&(a+=24,o=i&&o=i&&t=s.min&&(es.max&&(s.max=i),a=!1)}a&&c.push({min:e,max:i})}};for(i=0;i2*s}(h,t))return"date";var g="strict"!==i.autotypenumbers;return!function(e,t){for(var r=e.length,i=c(r),a=0,o=0,u={},h=0;h2*a}(h,g)?!function(e,t){for(var i,n=e.length,a=0;a0&&((k=L-s(_)-l(w))>P?A/k>I&&(T=_,M=w,I=A/k):A/L>I&&(T={val:_.val,nopad:1},M={val:w.val,nopad:1},I=A/L));if(m===g){var z=m-1,D=m+1;if(E)if(0===m)a=[0,1];else{var O=(m>0?h:u).reduce(function(e,t){return Math.max(e,l(t))},0),R=m/(1-Math.min(.5,O/L));a=m>0?[0,R]:[R,0]}else a=C?[Math.max(0,z),Math.max(1,D)]:[z,D]}else E?(T.val>=0&&(T={val:0,nopad:1}),M.val<=0&&(M={val:0,nopad:1})):C&&(T.val-I*s(T)<0&&(T={val:0,nopad:1}),M.val<=0&&(M={val:1,nopad:1})),I=(M.val-T.val-d(t,_.val,w.val))/(L-s(T)-l(M)),a=[T.val-I*s(T),M.val+I*l(M)];return a=b(a,t),t.limitRange&&t.limitRange(),v&&a.reverse(),n.simpleMap(a,t.l2r||Number)}function d(e,t,r){var i=0;if(e.rangebreaks)for(var n=e.locateBreaks(t,r),a=0;a0?r.ppadplus:r.ppadminus)||r.ppad||0),E=A((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),C=A(r.vpadplus||r.vpad),L=A(r.vpadminus||r.vpad);if(!M){if(d=1/0,f=-1/0,T)for(n=0;n0&&(d=o),o>f&&o-a&&(d=o),o>f&&o=z;n--)I(n);return{min:p,max:x,opts:r}},concatExtremes:p};function m(e,t,r,i,n){for(var a=i.tozero,o=i.extrapad,s=!0,l=0;l=r&&(c.extrapad||!o)){s=!1;break}n(t,c.val)&&c.pad<=r&&(o||!c.extrapad)&&(e.splice(l,1),l--)}if(s){var u=a&&0===t;e.push({val:t,pad:u?0:r,extrapad:!u&&o})}}function g(e){return i(e)&&Math.abs(e)=t}function x(e,t,r){return void 0===t||void 0===r||(t=e.d2l(t))<(r=e.d2l(r))}function b(e,t){if(!t||!t.autorangeoptions)return e;var r,i,a,o,s=e[0],l=e[1],c=t.autorangeoptions.include;if(void 0!==c){var u=t.d2l(s),h=t.d2l(l);n.isArrayOrTypedArray(c)||(c=[c]);for(var d=0;d=f&&(u=f,s=f),h<=f&&(h=f,l=f)}}return r=s,s=(i=t.autorangeoptions)&&void 0!==i.minallowed&&x(t,i.minallowed,i.maxallowed)?i.minallowed:i&&void 0!==i.clipmin&&x(t,i.clipmin,i.clipmax)?Math.max(r,t.d2l(i.clipmin)):r,a=l,[s,l=(o=t.autorangeoptions)&&void 0!==o.maxallowed&&x(t,o.minallowed,o.maxallowed)?o.maxallowed:o&&void 0!==o.clipmax&&x(t,o.clipmin,o.clipmax)?Math.min(a,t.d2l(o.clipmax)):a]}}}),rn=p({"src/plots/cartesian/axes.js"(e,t){var r=T(),i=C(),n=tD(),a=eQ(),o=tv(),s=o.strTranslate,l=tF(),c=re(),u=ee(),h=t9(),d=tN(),f=tG(),p=(tE(),L()),m=p.ONEMAXYEAR,g=p.ONEAVGYEAR,y=p.ONEMINYEAR,v=p.ONEMAXQUARTER,x=p.ONEAVGQUARTER,b=p.ONEMINQUARTER,_=p.ONEMAXMONTH,w=p.ONEAVGMONTH,M=p.ONEMINMONTH,k=p.ONEWEEK,A=p.ONEDAY,S=A/2,E=p.ONEHOUR,P=p.ONEMIN,I=p.ONESEC,z=p.ONEMILLI,D=p.ONEMICROSEC,O=p.MINUS_SIGN,R=p.BADNUM,F={K:"zeroline"},j={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},N={K:"tick",L:"path"},U={K:"tick",L:"text"},V={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},q=tR(),H=q.MID_SHIFT,G=q.CAP_SHIFT,W=q.LINE_SPACING,Y=q.OPPOSITE_SIDE,Z=t.exports={};Z.setConvert=rt();var $=rr(),X=tC(),K=X.idSort,J=X.isLinked;Z.id2name=X.id2name,Z.name2id=X.name2id,Z.cleanId=X.cleanId,Z.list=X.list,Z.listIds=X.listIds,Z.getFromId=X.getFromId,Z.getFromTrace=X.getFromTrace;var Q=ri();function et(e){var t=(e[1]-e[0])*1e-4;return[e[0]-t,e[1]+t]}Z.getAutoRange=Q.getAutoRange,Z.findExtremes=Q.findExtremes,Z.coerceRef=function(e,t,r,i,n,a){var s=i.charAt(i.length-1),l=r._fullLayout._subplots[s+"axis"],c=i+"ref",u={};return n||(n=l[0]||("string"==typeof a?a:a[0])),a||(a=n),l=l.concat(l.map(function(e){return e+" domain"})),u[c]={valType:"enumerated",values:l.concat(a?"string"==typeof a?[a]:a:[]),dflt:n},o.coerce(e,t,u,c)},Z.coerceRefArray=function(e,t,r,i,n,a,s){let l=i.charAt(i.length-1);var c=r._fullLayout._subplots[l+"axis"];let u=i+"ref";var h=e[u];n||(n=c[0]||("string"==typeof a?a:a[0])),c=(c=c.concat(c.map(e=>e+" domain"))).concat(a||[]),h.length>s?(o.warn("Array attribute "+u+" has more entries than expected, truncating to "+s),h=h.slice(0,s)):h.lengthMath.abs((e/t+.5)%1-.5)}function eo(e,t){return .001>Math.abs(e/t-1)}function es(e){return+e.substring(1)}function el(e,t){return e.rangebreaks&&(t=t.filter(function(t){return e.maskBreaks(t.x)!==R})),t}function ec(e,t){var r=et(o.simpleMap(e.range,e.r2l)),i=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]),a="category"===e.type?e.d2l_noadd:e.d2l;"log"===e.type&&"L"!==String(e.dtick).charAt(0)&&(e.dtick="L"+Math.pow(10,Math.floor(Math.min(e.range[0],e.range[1]))-1));for(var s=[],l=0;l<=1;l++)if(!(void 0!==t&&(t&&l||!1===t&&!l))&&!(l&&!e.minor)){var c=l?e.minor.tickvals:e.tickvals,u=l?[]:e.ticktext;if(c){o.isArrayOrTypedArray(u)||(u=[]);var h=-1,d=-1;if(!l)for(var f=0;fi&&pi&&g2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0)):e._minDtick=0},Z.saveRangeInitial=function(e,t){for(var r=Z.list(e,"",!0),i=!1,n=0;n.3*d||u(n)||u(a))){var f=r.dtick/2;e+=e+f.8){var s=Number(r.slice(1));a.exactYears>.8&&s%12==0?e=Z.tickIncrement(e,"M6","reverse")+1.5*A:a.exactMonths>.8?e=Z.tickIncrement(e,"M1","reverse")+15.5*A:e-=S;var l=Z.tickIncrement(e,r);if(l<=i)return l}return e}(v,e,y,l,a)),m=v,g=0;m<=c;)m=Z.tickIncrement(m,y,!1,a),g++;return{start:t.c2r(v,0,a),end:t.c2r(m,0,a),size:y,_dataSpan:c-l}},Z.prepMinorTicks=function(e,t,r){var n,a;if(!(null!=(n=t.minor)&&n.dtick)){delete e.dtick;var s,l=t.dtick&&i(t._tmin);if(l){var c=Z.tickIncrement(t._tmin,t.dtick,!0);s=[t._tmin,.99*c+.01*t._tmin]}else{var u=o.simpleMap(t.range,t.r2l);s=[u[0],.8*u[0]+.2*u[1]]}if(e.range=o.simpleMap(s,t.l2r),e._isMinor=!0,Z.prepTicks(e,r),l){var h=i(t.dtick),d=i(e.dtick),f=h?t.dtick:+t.dtick.substring(1),p=d?e.dtick:+e.dtick.substring(1);h&&d?ea(f,p)?f===2*k&&p===2*A&&(e.dtick=k):f===2*k&&p===3*A?e.dtick=k:f!==k||(t._input.minor||{}).nticks?eo(f/p,2.5)?e.dtick=f/2:e.dtick=f:e.dtick=A:"M"===String(t.dtick).charAt(0)?d?e.dtick="M1":ea(f,p)?f>=12&&2===p&&(e.dtick="M3"):e.dtick=t.dtick:"L"===String(e.dtick).charAt(0)?"L"===String(t.dtick).charAt(0)?ea(f,p)||(e.dtick=eo(f/p,2.5)?t.dtick/2:t.dtick):e.dtick="D1":"D2"===e.dtick&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}(null==(a=t.minor)?void 0:a._tick0Init)===void 0&&(e.tick0=t.tick0)},Z.prepTicks=function(e,t){var r=o.simpleMap(e.range,e.r2l,void 0,void 0,t);if("auto"===e.tickmode||!e.dtick){var n,a=e.nticks;a||("category"===e.type||"multicategory"===e.type?(n=e.tickfont?o.bigFont(e.tickfont.size||12):15,a=e._length/n):(n="y"===e._id.charAt(0)?40:80,a=o.constrain(e._length/n,4,9)+1),"radialaxis"===e._name&&(a*=2)),e.minor&&"array"!==e.minor.tickmode||"array"===e.tickmode&&(a*=100),e._roughDTick=Math.abs(r[1]-r[0])/a,Z.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick<2*e._minDtick&&(e.dtick=e._minDtick,e.tick0=e.l2r(e._forceTick0))}"period"===e.ticklabelmode&&function(e){function t(){return!(i(e.dtick)||"M"!==e.dtick.charAt(0))}var r,n=t(),a=Z.getTickFormat(e);if(a){var o=e._dtickInit!==e.dtick;/%[fLQsSMX]/.test(a)||(/%[HI]/.test(a)?(r=E,o&&!n&&e.dtickes(e.dtick):e.dtickes(e.dtick):e.dtickes(e.dtick):e.dticke.range[1],u=!e.ticklabelindex||o.isArrayOrTypedArray(e.ticklabelindex)?e.ticklabelindex:[e.ticklabelindex],h=o.simpleMap(e.range,e.r2l,void 0,void 0,t),d=h[1]=+!N;U--){var V,q=!U;U?(e._dtickInit=e.dtick,e._tick0Init=e.tick0):N&&(e.minor._dtickInit=e.minor.dtick,e.minor._tick0Init=e.minor.tick0);var H=U?e:o.extendFlat({},e,N?e.minor:{minor:{}});if(q?Z.prepMinorTicks(H,e,t):Z.prepTicks(H,t),"array"===H.tickmode){U?(O=[],C=ec(e,!q)):(F=[],L=ec(e,!q));continue}if("sync"===H.tickmode){O=[],C=function(e){var t=e._mainAxis,r=[];if(t._vals){for(var i=-1,n=-1,a=0;a=Y:ee<=Y;ee=Z.tickIncrement(ee,er,d,a)){if(U&&J++,H.rangebreaks&&!d){if(ee=p)break}if(O.length>T||ee===Q)break;Q=ee;var en={value:function(e,t,r){if(![r,e,t].every(i)||0===r)return e;let n=Math.round((e-t)/r),a=t+n*r;return e!==a&&Math.abs(e-a)<1e-6*Math.abs(r)?a:e}(ee,ei,er)};U?(ee===K&&(en.first=!0),X&&ee!==(0|ee)&&(en.simpleLabel=!0),s>1&&J%s&&(en.skipLabel=!0),O.push(en)):(en.minor=!0,F.push(en))}}if(!F||F.length<3?u=!1:(ex=(F[2].value-F[1].value)*(c?-1:1),eb=e.tickformat,(/%f/.test(eb)?ex>=D:/%L/.test(eb)?ex>=z:/%[SX]/.test(eb)?ex>=I:/%M/.test(eb)?ex>=P:/%[HI]/.test(eb)?ex>=E:/%p/.test(eb)?ex>=S:/%[Aadejuwx]/.test(eb)?ex>=A:/%[UVW]/.test(eb)?ex>=k:/%[Bbm]/.test(eb)?ex>=M:/%[q]/.test(eb)?ex>=b:!/%[Yy]/.test(eb)||ex>=y)||(u=!1,F=F.slice(1))),u){var ea=O.concat(F);l&&O.length&&(ea=ea.slice(1)),(ea=ea.sort(function(e,t){return e.value-t.value}).filter(function(e,t,r){return 0===t||e.value!==r[t-1].value})).map(function(e,t){return void 0!==e.minor||e.skipLabel?null:t}).filter(function(e){return null!==e}).forEach(function(e){u.map(function(t){var r=e+t;r>=0&&r0?i-1:i,s=i);var l=e[o].value,c=Math.abs(e[s].value-l),u=r||c,h=0;u>=y?h=c>=y&&c<=m?c:g:r===x&&u>=b?h=c>=b&&c<=v?c:x:u>=M?h=c>=M&&c<=_?c:w:r===k&&u>=k?h=k:u>=A?h=A:r===S&&u>=S?h=S:r===E&&u>=E&&(h=E),h>=c&&(h=c,n=!0);var d=a+h;if(t.rangebreaks&&h>0){for(var f=0,p=0;p<84;p++){var T=(p+.5)/84;t.maskBreaks(a*(1-T)+T*d)!==R&&f++}(h*=f/84)||(e[i].drop=!0),n&&c>k&&(h=c)}(h>0||0===i)&&(e[i].periodX=a+h/2)}}(j,e,e._definedDelta),e.rangebreaks){var em="y"===e._id.charAt(0),eg=1;"auto"===e.tickmode&&(eg=e.tickfont?e.tickfont.size:12);var ey=NaN;for(e_=O.length-1;e_>-1;e_--){if(O[e_].drop){O.splice(e_,1);continue}O[e_].value=eF(O[e_].value,e);var ev=e.c2p(O[e_].value);(em?ey>ev-eg:eyp||ip&&(r.periodX=p),i10||"01-01"!==n.slice(5)?e._tickround="d":e._tickround=t.slice(1)%12==0?"y":"m";else if(t>=A&&a<=10||t>=15*A)e._tickround="d";else if(t>=P&&a<=16||t>=E)e._tickround="M";else if(t>=I&&a<=19||t>=P)e._tickround="S";else{var o=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,o)-20,e._tickround<0&&(e._tickround=4)}}else if(i(t)||"L"===t.charAt(0)){var s=e.range.map(e.r2d||Number);i(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var l=Math.floor(Math.log(Math.max(Math.abs(s[0]),Math.abs(s[1])))/Math.LN10+.01);Math.abs(l)>(void 0===e.minexponent?3:e.minexponent)&&(ew(e.exponentformat)&&"SI extended"!==e.exponentformat&&!eT(l)||ew(e.exponentformat)&&"SI extended"===e.exponentformat&&!eM(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}function ex(e,t,r){var i=e.tickfont||{};return{x:t,dx:0,dy:0,text:r||"",fontSize:i.size,font:i.family,fontWeight:i.weight,fontStyle:i.style,fontVariant:i.variant,fontTextcase:i.textcase,fontLineposition:i.lineposition,fontShadow:i.shadow,fontColor:i.color}}Z.autoTicks=function(e,t,r){var n;function a(e){return Math.pow(e,Math.floor(Math.log(t)/Math.LN10))}if("date"===e.type){e.tick0=o.dateTick0(e.calendar,0);var s=2*t;if(s>g)t/=g,n=a(10),e.dtick="M"+12*ey(t,n,eu);else if(s>w)e.dtick="M"+ey(t/=w,1,eh);else if(s>A){if(e.dtick=ey(t,A,e._hasDayOfWeekBreaks?[1,2,7,14]:ef),!r){var l=Z.getTickFormat(e),c="period"===e.ticklabelmode;c&&(e._rawTick0=e.tick0),/%[uVW]/.test(l)?e.tick0=o.dateTick0(e.calendar,2):e.tick0=o.dateTick0(e.calendar,1),c&&(e._dowTick0=e.tick0)}}else s>E?e.dtick=ey(t,E,eh):s>P?e.dtick=ey(t,P,ed):s>I?e.dtick=ey(t,I,ed):(n=a(10),e.dtick=ey(t,n,eu))}else if("log"===e.type){e.tick0=0;var u=o.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(1>Math.abs(u[1]-u[0])){var h=1.5*Math.abs((u[1]-u[0])/t);t=Math.abs(Math.pow(10,u[1])-Math.pow(10,u[0]))/h,n=a(10),e.dtick="L"+ey(t,n,eu)}else e.dtick=t>.3?"D2":"D1"}else"category"===e.type||"multicategory"===e.type?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):eR(e)?(e.tick0=0,e.dtick=ey(t,n=1,eg)):(e.tick0=0,n=a(10),e.dtick=ey(t,n,eu));if(0===e.dtick&&(e.dtick=1),!i(e.dtick)&&"string"!=typeof e.dtick){var d=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(d)}},Z.tickIncrement=function(e,t,n,a){var s=n?-1:1;if(i(t))return o.increment(e,s*t);var l=t.charAt(0),c=s*Number(t.slice(1));if("M"===l)return o.incrementMonth(e,c,a);if("L"===l)return Math.log(Math.pow(10,e)+c)/Math.LN10;if("D"===l){var u="D2"===t?em:ep,h=e+.01*s,d=o.roundUp(o.mod(h,1),u,n);return Math.floor(h)+Math.log(r.round(Math.pow(10,d),1))/Math.LN10}throw"unrecognized dtick "+String(t)},Z.tickFirst=function(e,t){var n=e.r2l||Number,a=o.simpleMap(e.range,n,void 0,void 0,t),s=a[1]=0&&r<=e._length?t:null};if(k&&o.isArrayOrTypedArray(e.ticktext)){var L=o.simpleMap(e.range,e.r2l),P=(Math.abs(L[1]-L[0])-(e._lBreaks||0))/1e4;for(_=0;_ ")}else e._prevDateHead=l,c+="
"+l;t.text=c}(e,M,r,A):"log"===S?function(e,t,r,n){var a=e.dtick,s=t.x,l=e.tickformat,c="string"==typeof a&&a.charAt(0);if("never"===n&&(n=""),r&&"L"!==c&&(a="L3",c="L"),l||"L"===c)t.text=ek(Math.pow(10,s),e,n,r);else if(i(a)||"D"===c&&("complete"===e.minorloglabels||.1>o.mod(s+.01,1))){"complete"!==e.minorloglabels||.1>o.mod(s+.01,1)||(t.fontSize*=.75);var u=Math.pow(10,s).toExponential(0).split("e"),h=+u[1],d=Math.abs(h),f=e.exponentformat;"power"===f||ew(f)&&"SI extended"!==f&&eT(h)||ew(f)&&"SI extended"===f&&eM(h)?(t.text=u[0],d>0&&(t.text+="x10"),"1x10"===t.text&&(t.text="10"),0!==h&&1!==h&&(t.text+=""+(h>0?"":O)+d+""),t.fontSize*=1.25):("e"===f||"E"===f)&&d>2?t.text=u[0]+f+(h>0?"+":O)+d:(t.text=ek(Math.pow(10,s),e,"","fakehover"),"D1"===a&&"y"===e._id.charAt(0)&&(t.dy-=t.fontSize/6))}else if("D"===c)t.text="none"===e.minorloglabels?"":String(Math.round(Math.pow(10,o.mod(s,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(a);if("D1"===e.dtick){var p=String(t.text).charAt(0);("0"===p||"1"===p)&&("y"===e._id.charAt(0)?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(s<0?.5:.25)))}}(e,M,A,z):"category"===S?(s=e,l=M,void 0===(c=s._categories[Math.round(l.x)])&&(c=""),l.text=String(c)):"multicategory"===S?(u=e,h=M,d=r,f=Math.round(h.x),m=void 0===(p=u._categories[f]||[])[1]?"":String(p[1]),g=void 0===p[0]?"":String(p[0]),d?h.text=g+" - "+m:(h.text=m,h.text2=g)):eR(e)?function(e,t,r,i,n){if("radians"!==e.thetaunit||r)t.text=ek(t.x,e,n,i);else{var a=t.x/180;if(0===a)t.text="0";else{var s=function(e){function t(e,t){return 1e-6>=Math.abs(e-t)}var r=function(e){for(var r=1;!t(Math.round(e*r)/r,e);)r*=10;return r}(e),i=e*r,n=Math.abs(function e(r,i){return t(i,0)?r:e(i,r%i)}(i,r));return[Math.round(i/n),Math.round(r/n)]}(a);if(s[1]>=100)t.text=ek(o.deg2rad(t.x),e,n,i);else{var l=t.x<0;1===s[1]?1===s[0]?t.text="π":t.text=s[0]+"π":t.text=["",s[0],"","⁄","",s[1],"","π"].join(""),l&&(t.text=O+t.text)}}}}(e,M,r,A,z):(y=e,v=M,x=A,"never"===(b=z)?b="":"all"===y.showexponent&&1e-6>Math.abs(v.x/y.dtick)&&(b="hide"),v.text=ek(v.x,y,b,x)),n||(e.tickprefix&&!I(e.showtickprefix)&&(M.text=e.tickprefix+M.text),e.ticksuffix&&!I(e.showticksuffix)&&(M.text+=e.ticksuffix)),e.labelalias&&e.labelalias.hasOwnProperty(M.text)){var D=e.labelalias[M.text];"string"==typeof D&&(M.text=D)}return("boundaries"===e.tickson||e.showdividers)&&(M.xbnd=[C(M.x-.5),C(M.x+e.dtick-.5)]),M},Z.hoverLabelText=function(e,t,r){r&&(e=o.extendFlat({},e,{hoverformat:r}));var i=o.isArrayOrTypedArray(t)?t[0]:t,n=o.isArrayOrTypedArray(t)?t[1]:void 0;if(void 0!==n&&n!==i)return Z.hoverLabelText(e,i,r)+" - "+Z.hoverLabelText(e,n,r);var a="log"===e.type&&i<=0,s=Z.tickText(e,e.c2l(a?-i:i),"hover").text;return a?0===i?"0":O+s:s};var eb=["f","p","n","μ","m","","k","M","G","T"],e_=["q","r","y","z","a",...eb,"P","E","Z","Y","R","Q"],ew=e=>["SI","SI extended","B"].includes(e);function eT(e){return e>14||e<-15}function eM(e){return e>32||e<-30}function ek(e,t,r,n){var a,s,l,c=e<0,u=t._tickround,h=r||t.exponentformat||"B",d=t._tickexponent,f=Z.getTickFormat(t),p=t.separatethousands;if(n){var m={exponentformat:h,minexponent:t.minexponent,dtick:"none"===t.showexponent?t.dtick:i(e)&&Math.abs(e)||1,range:"none"===t.showexponent?t.range.map(t.r2d):[0,e||1]};ev(m),u=(Number(m._tickround)||0)+4,d=m._tickexponent,t.hoverformat&&(f=t.hoverformat)}if(f)return t._numFormat(f)(e).replace(/-/g,O);"none"===h&&(d=0);let g=Math.pow(10,-u)/2;if((e=Math.abs(e))"+l+"":"B"===h&&9===d?e+="B":ew(h)&&(e+="SI extended"===h?e_[d/3+10]:eb[d/3+5])),c?O+e:e}function eA(e,t){if(e){var r=Object.keys(V).reduce(function(e,r){return -1!==t.indexOf(r)&&V[r].forEach(function(t){e[t]=1}),e},{});Object.keys(e).forEach(function(t){r[t]||(1===t.length?e[t]=0:delete e[t])})}}function eS(e){return void 0!==e.periodX?e.periodX:e.x}function eE(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}function eC(e){var t=e.title.font.size,r=(e.title.text.match(l.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(G+r*W):r?t*(r+1)*W:t}function eL(e,t){var r=e.l2p(t);return r>1&&r=n.min&&e0)switch(e.type){case"date":case"linear":for(t=0;t=i(e))}(e.dtick,i.dtickrange,n)){r=i;break}break;case"log":for(t=0;t=0,o=0>=a(e,t[1]);return(r||n)&&(i||o)}(e.dtick,i.dtickrange)){r=i;break}}return r?r.value:e.tickformat},Z.getSubplots=function(e,t){var r=e._fullLayout._subplots,i=r.cartesian.concat(r.gl2d||[]),n=t?Z.findSubplotsWithAxis(i,t):i;return n.sort(function(e,t){var r=e.slice(1).split("y"),i=t.slice(1).split("y");return r[0]===i[0]?r[1]-i[1]:r[0]-i[0]}),n},Z.findSubplotsWithAxis=function(e,t){for(var r=new RegExp("x"===t._id.charAt(0)?"^"+t._id+"y":t._id+"$"),i=[],n=0;n=0&&n.unshift(n.splice(i,1).shift())}});var s={false:{left:0,right:0}};return o.syncOrAsync(n.map(function(t){return function(){if(t){var i=Z.getFromId(e,t);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=a;var n=Z.drawOne(e,i,r);return i._shiftPusher&&eN(i,i._fullDepth||0,s,!0),i._r=i.range.slice(),i._rl=o.simpleMap(i._r,i.r2l),n}}}))},Z.drawOne=function(e,t,r){var i,s,d,f=(r=r||{}).axShifts||{},p=r.overlayingShiftedAx||[];t.setScale();var m=e._fullLayout,g=t._id,y=g.charAt(0),v=Z.counterLetter(g),x=m._plots[t._mainSubplot],b="above traces"===t.zerolinelayer;if(x){if(t._shiftPusher=t.autoshift||-1!==p.indexOf(t._id)||-1!==p.indexOf(t.overlaying),t._shiftPusher&"free"===t.anchor){var _=t.linewidth/2||0;"inside"===t.ticks&&(_+=t.ticklen),eN(t,_,f,!0),eN(t,t.shift||0,f,!1)}(!0!==r.skipTitle||void 0===t._shift)&&(C=t,L=f,t._shift=C.autoshift?L[C.overlaying][C.side]:C.shift||0);var w=x[y+"axislayer"],T=t._mainLinePosition,M=T+=t._shift,k=t._mainMirrorPosition,A=t._vals=Z.calcTicks(t),S=[t.mirror,M,k].join("_");for(i=0;i0?r.bottom-u:0,h))));var d=0,f=0;if(t._shiftPusher&&(d=Math.max(h,r.height>0?"l"===l?u-r.left:r.right-u:0),t.title.text!==m._dfltTitle[y]&&(f=(t._titleStandoff||0)+(t._titleScoot||0),"l"===l&&(f+=eC(t))),t._fullDepth=Math.max(d,f)),t.automargin){i={x:0,y:0,r:0,l:0,t:0,b:0};var p=[0,1],g="number"==typeof t._shift?t._shift:0;if("x"===y){if("b"===l?i[l]=t._depth:(i[l]=t._depth=Math.max(r.width>0?u-r.top:0,h),p.reverse()),r.width>0){var x=r.right-(t._offset+t._length);x>0&&(i.xr=1,i.r=x);var b=t._offset-r.left;b>0&&(i.xl=0,i.l=b)}}else if("l"===l?(t._depth=Math.max(r.height>0?u-r.left:0,h),i[l]=t._depth-g):(t._depth=Math.max(r.height>0?r.right-u:0,h),i[l]=t._depth+g,p.reverse()),r.height>0){var _=r.bottom-(t._offset+t._length);_>0&&(i.yb=0,i.b=_);var w=t._offset-r.top;w>0&&(i.yt=1,i.t=w)}i[v]="free"===t.anchor?t.position:t._anchorAxis.domain[p[0]],t.title.text!==m._dfltTitle[y]&&(i[l]+=eC(t)+(t.title.standoff||0)),t.mirror&&"free"!==t.anchor&&((o={x:0,y:0,r:0,l:0,t:0,b:0})[c]=t.linewidth,t.mirror&&!0!==t.mirror&&(o[c]+=h),!0===t.mirror||"ticks"===t.mirror?o[v]=t._anchorAxis.domain[p[1]]:("all"===t.mirror||"allticks"===t.mirror)&&(o[v]=[t._counterDomainMin,t._counterDomainMax][p[1]]))}ep&&(s=a.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),"string"==typeof t.automargin&&(eA(i,t.automargin),eA(o,t.automargin)),n.autoMargin(e,eI(t),i),n.autoMargin(e,ez(t),o),n.autoMargin(e,eD(t),s)}),o.syncOrAsync(ed)}}function em(e){var r=g+(e||"tick");return E[r]||(E[r]=function(e,t,r){var i,n,a,o;if(e._selections[t].size())i=1/0,n=-1/0,a=1/0,o=-1/0,e._selections[t].each(function(){var e=eP(this);if("none"!==e.node().style.display){var t=h.bBox(e.node().parentNode);i=Math.min(i,t.top),n=Math.max(n,t.bottom),a=Math.min(a,t.left),o=Math.max(o,t.right)}});else{var s=Z.makeLabelFns(e,r);i=n=s.yFn({dx:0,dy:0,fontSize:0}),a=o=s.xFn({dx:0,dy:0,fontSize:0})}return{top:i,bottom:n,left:a,right:o,height:n-i,width:o-a}}(t,r,M)),E[r]}},Z.getTickSigns=function(e,t){var r=e._id.charAt(0),i=e.side===({x:"top",y:"right"})[r]?1:-1,n=[-1,1,i,-i];return"inside"!==(t?(e.minor||{}).ticks:e.ticks)==("x"===r)&&(n=n.map(function(e){return-e})),e.side&&n.push({l:-1,t:-1,r:1,b:1}[e.side.charAt(0)]),n},Z.makeTransTickFn=function(e){return"x"===e._id.charAt(0)?function(t){return s(e._offset+e.l2p(t.x),0)}:function(t){return s(0,e._offset+e.l2p(t.x))}},Z.makeTransTickLabelFn=function(e){var t=function(e){var t=e.ticklabelposition||"",r=e.tickson||"",i=function(e){return -1!==t.indexOf(e)},n=i("top"),a=i("left"),o=i("right"),s=i("bottom"),l=i("inside"),c="boundaries"!==r&&(s||a||n||o);if(!c&&!l)return[0,0];var u=e.side,h=c?(e.tickwidth||0)/2:0,d=3,f=e.tickfont?e.tickfont.size:12;return(s||n)&&(h+=f*G,d+=(e.linewidth||0)/2),(a||o)&&(h+=(e.linewidth||0)/2,d+=3),l&&"top"===u&&(d-=f*(1-G)),(a||n)&&(h=-h),("bottom"===u||"right"===u)&&(d=-d),[c?h:0,l?d:0]}(e),r=e.ticklabelshift||0,i=e.ticklabelstandoff||0,n=t[0],a=t[1],o=e.range[0]>e.range[1],l=e.ticklabelposition&&-1!==e.ticklabelposition.indexOf("inside");if(r&&(r*=o?-1:1),i){var c=e.side;i*=l&&("top"===c||"left"===c)||!l&&("bottom"===c||"right"===c)?1:-1}return"x"===e._id.charAt(0)?function(t){return s(n+e._offset+e.l2p(eS(t))+r,a+i)}:function(t){return s(a+i,n+e._offset+e.l2p(eS(t))+r)}},Z.makeTickPath=function(e,t,r,i){i||(i={});var n=i.minor;if(n&&!e.minor)return"";var a=void 0!==i.len?i.len:n?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return"x"===o?"M0,"+(t+s*r)+"v"+a*r:"M"+(t+s*r)+",0h"+a*r},Z.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=e.tickson||"",s=function(e){return -1!==n.indexOf(e)},l=s("top"),c=s("left"),u=s("right"),h=s("bottom"),d="boundaries"!==a&&(h||c||l||u),f=s("inside"),p="inside"===n&&"inside"===e.ticks||!f&&"outside"===e.ticks&&"boundaries"!==a,m=0,g=0,y=p?e.ticklen:0;if(f?y*=-1:d&&(y=0),p&&(m+=y,r)){var v=o.deg2rad(r);m=y*Math.cos(v)+1,g=y*Math.sin(v)}e.showticklabels&&(p||e.showline)&&(m+=.2*e.tickfont.size);var x,b,_,w,T,M={labelStandoff:m+=(e.linewidth||1)/2*(f?-1:1),labelShift:g},k=0,A=e.side,S=e._id.charAt(0),E=e.tickangle;if("x"===S)w=(T=!f&&"bottom"===A||f&&"top"===A)?1:-1,f&&(w*=-1),x=g*w,b=t+m*w,_=T?1:-.2,90===Math.abs(E)&&(f?_+=H:_=-90===E&&"bottom"===A?G:90===E&&"top"===A?H:.5,k=H/2*(E/90)),M.xFn=function(e){return e.dx+x+k*e.fontSize},M.yFn=function(e){return e.dy+b+e.fontSize*_},M.anchorFn=function(e,t){if(d){if(c)return"end";if(u)return"start"}return i(t)&&0!==t&&180!==t?t*w<0!==f?"end":"start":"middle"},M.heightFn=function(t,r,i){return r<-60||r>60?-.5*i:"top"===e.side!==f?-i:0};else if("y"===S){if(w=(T=!f&&"left"===A||f&&"right"===A)?1:-1,f&&(w*=-1),x=m,b=g*w,_=0,f||90!==Math.abs(E)||(_=-90===E&&"left"===A||90===E&&"right"===A?G:.5),f){var C=i(E)?+E:0;0!==C&&(k=Math.abs(Math.sin(o.deg2rad(C)))*G*w,_=0)}M.xFn=function(e){return e.dx+t-(x+e.fontSize*_)*w+k*e.fontSize},M.yFn=function(e){return e.dy+b+e.fontSize*H},M.anchorFn=function(e,t){return i(t)&&90===Math.abs(t)?"middle":T?"end":"start"},M.heightFn=function(t,r,i){return"right"===e.side&&(r*=-1),r<-30?-i:r<30?-.5*i:0}}return M},Z.drawTicks=function(e,t,i){i=i||{};var n=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?i.vals.filter(function(e){return e.minor&&!e.noTick}):[]).concat(t.ticks?i.vals.filter(function(e){return!e.minor&&!e.noTick}):[]),o=i.layer.selectAll("path."+n).data(a,eE);o.exit().remove(),o.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",!1!==i.crisp).each(function(e){return u.stroke(r.select(this),e.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(r){return h.crispRound(e,r.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",i.path).style("display",null),eB(t,[N]),o.attr("transform",i.transFn)},Z.drawGrid=function(e,t,i){if(i=i||{},"sync"!==t.tickmode){var n=t._id+"grid",a=t.minor&&t.minor.showgrid,o=a?i.vals.filter(function(e){return e.minor}):[],s=t.showgrid?i.vals.filter(function(e){return!e.minor}):[],l=i.counterAxis;if(l&&Z.shouldShowZeroLine(e,t,l))for(var c="array"===t.tickmode,d=0;d=0;y--){var v=y?m:g;if(v){var x=v.selectAll("path."+n).data(y?s:o,eE);x.exit().remove(),x.enter().append("path").classed(n,1).classed("crisp",!1!==i.crisp),x.attr("transform",i.transFn).attr("d",i.path).each(function(e){return u.stroke(r.select(this),e.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(e){return h.dashStyle(e.minor?t.minor.griddash:t.griddash,e.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(e){return(e.minor?p:t._gw)+"px"}).style("display",null),"function"==typeof i.path&&x.attr("d",i.path)}}eB(t,[j,B])}},Z.drawZeroLine=function(e,t,r){r=r||r;var i=t._id+"zl",n=Z.shouldShowZeroLine(e,t,r.counterAxis),a=r.layer.selectAll("path."+i).data(n?[{x:0,id:t._id}]:[]);a.exit().remove(),a.enter().append("path").classed(i,1).classed("zl",1).classed("crisp",!1!==r.crisp).each(function(){r.layer.selectAll("path").sort(function(e,t){return K(e.id,t.id)})}),a.attr("transform",r.transFn).attr("d",r.path).call(u.stroke,t.zerolinecolor||u.defaultLine).style("stroke-width",h.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),eB(t,[F])},Z.drawLabels=function(e,t,n){n=n||{};var a=e._fullLayout,c=t._id,u="above traces"===t.zerolinelayer,d=n.cls||c+"tick",f=n.vals.filter(function(e){return e.text}),p=n.labelFns,m=n.secondary?0:t.tickangle,g=(t._prevTickAngles||{})[d],y=n.layer.selectAll("g."+d).data(t.showticklabels?f:[],eE),v=[];function x(e,a){e.each(function(e){var o=r.select(this),c=o.select(".text-math-group"),u=p.anchorFn(e,a),d=n.transFn.call(o.node(),e)+(i(a)&&0!=+a?" rotate("+a+","+p.xFn(e)+","+(p.yFn(e)-e.fontSize/2)+")":""),f=l.lineCount(o),m=W*e.fontSize,g=p.heightFn(e,i(a)?+a:0,(f-1)*m);if(g&&(d+=s(0,g)),c.empty()){var y=o.select("text");y.attr({transform:d,"text-anchor":u}),y.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var v=h.bBox(c.node()).width;c.attr("transform",d+s(v*({end:-.5,start:.5})[u],0))}})}y.enter().append("g").classed(d,1).append("text").attr("text-anchor","middle").each(function(t){var i=r.select(this),n=e._promises.length;i.call(l.positionText,p.xFn(t),p.yFn(t)).call(h.font,{family:t.font,size:t.fontSize,color:t.fontColor,weight:t.fontWeight,style:t.fontStyle,variant:t.fontVariant,textcase:t.fontTextcase,lineposition:t.fontLineposition,shadow:t.fontShadow}).text(t.text).call(l.convertToTspans,e),e._promises[n]?v.push(e._promises.pop().then(function(){x(i,m)})):x(i,m)}),eB(t,[U]),y.exit().remove(),n.repositionOnUpdate&&y.each(function(e){r.select(this).select("text").call(l.positionText,p.xFn(e),p.yFn(e))}),t._adjustTickLabelsOverflow=function(){var i=t.ticklabeloverflow;if(!(!i||"allow"===i)){var n=-1!==i.indexOf("hide"),s="x"===t._id.charAt(0),l=0,c=s?e._fullLayout.width:e._fullLayout.height;if(-1!==i.indexOf("domain")){var u=o.simpleMap(t.range,t.r2l);l=t.l2p(u[0])+t._offset,c=t.l2p(u[1])+t._offset}var d=Math.min(l,c),f=Math.max(l,c),p=t.side,m=1/0,g=-1/0;for(var v in y.each(function(e){var i=r.select(this);if(i.select(".text-math-group").empty()){var a=h.bBox(i.node()),o=0;s?(a.right>f||a.leftf||a.top+(t.tickangle?0:e.fontSize/4)t["_visibleLabelMin_"+i._id]?l.style("display","none"):"tick"!==e.K||n||"none"===l.node().style.display||l.style("display",null)})})})})},x(y,g+1?g:m);var b=null;t._selections&&(t._selections[d]=y);var _=[function(){return v.length&&Promise.all(v)}];t.automargin&&a._redrawFromAutoMarginCount&&90===g?(b=g,_.push(function(){x(y,g)})):_.push(function(){if(x(y,m),f.length&&t.autotickangles&&("log"!==t.type||"D"!==String(t.dtick).charAt(0))){b=t.autotickangles[0];var e,r=0,i=[],a=1;y.each(function(e){r=Math.max(r,e.fontSize);var n=t.l2p(e.x),o=eP(this),s=h.bBox(o.node());a=Math.max(a,l.lineCount(o)),i.push({top:0,bottom:10,height:10,left:n-s.width/2,right:n+s.width/2+2,width:s.width+2})});var s=("boundaries"===t.tickson||t.showdividers)&&!n.secondary,c=f.length,u=Math.abs((f[c-1].x-f[0].x)*t._m)/(c-1),d=s?u/2:u,p=Math.sqrt(Math.pow(d,2)+Math.pow(s?t.ticklen:1.25*r*a,2)),g=d/p,v=t.autotickangles.map(function(e){return e*Math.PI/180}),_=v.find(function(e){return Math.abs(Math.cos(e))<=g});void 0===_&&(_=v.reduce(function(e,t){return Math.abs(Math.cos(e))R*O&&(I=O,C[E]=L[E]=z[E])}var V=Math.abs(I-P);V-k>0?(V-=k,k*=1+k/V):k=0,"y"!==t._id.charAt(0)&&(k=-k),C[S]=T.p2r(T.r2p(L[S])+A*k),"min"===T.autorange||"max reversed"===T.autorange?(C[0]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0):("max"===T.autorange||"min reversed"===T.autorange)&&(C[1]=null,T._rangeInitial0=void 0,T._rangeInitial1=void 0),a._insideTickLabelsUpdaterange[T._name+".range"]=C}var q=o.syncOrAsync(_);return q&&q.then&&e._promises.push(q),q},Z.getPxPosition=function(e,t){var r,i=e._fullLayout._size,n=t._id.charAt(0),a=t.side;return("free"!==t.anchor?r=t._anchorAxis:"x"===n?r={_offset:i.t+(1-(t.position||0))*i.h,_length:0}:"y"===n&&(r={_offset:i.l+(t.position||0)*i.w+t._shift,_length:0}),"top"===a||"left"===a)?r._offset:"bottom"===a||"right"===a?r._offset+r._length:void 0},Z.shouldShowZeroLine=function(e,t,r){var i=o.simpleMap(t.range,t.r2l);return i[0]*i[1]<=0&&t.zeroline&&("linear"===t.type||"-"===t.type)&&!(t.rangebreaks&&t.maskBreaks(0)===R)&&(eL(t,0)||!function(e,t,r,i){var n=r._mainAxis;if(n){var a=e._fullLayout,o=t._id.charAt(0),s=Z.counterLetter(t._id),l=t._offset+(Math.abs(i[0])1)for(i=1;i4/3-s?o:s}}}),ru=p({"src/components/dragelement/cursor.js"(e,t){var r=tv(),i=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];t.exports=function(e,t,n,a){return e="left"===n?0:"center"===n?1:"right"===n?2:r.constrain(Math.floor(3*e),0,2),i[t="bottom"===a?0:"middle"===a?1:"top"===a?2:r.constrain(Math.floor(3*t),0,2)][e]}}}),rh=p({"src/components/dragelement/unhover.js"(e,t){var r=tT(),i=tt(),n=eU().getGraphDiv,a=G(),o=t.exports={};o.wrapped=function(e,t,r){var s;(e=n(e))._fullLayout&&i.clear(e._fullLayout._uid+a.HOVERID);let l=e._hoverdata;o.raw(e,t,r)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,null!=(s=e._fullLayout)&&s.hoveranywhere&&t?.target&&!l&&e.emit("plotly_unhover",{event:t,points:[]}))},o.raw=function(e,t){var i=e._fullLayout,n=e._hoverdata;return t||(t={}),(!t.target||!!e._dragged||!1!==r.triggerHandler(e,"plotly_beforehover",t))&&(i._hoverlayer.selectAll("g").remove(),i._hoverlayer.selectAll("line").remove(),i._hoverlayer.selectAll("circle").remove(),e._hoverdata=void 0,t.target&&n&&e.emit("plotly_unhover",{event:t,points:n}),!0)}}}),rd=p({"src/components/dragelement/index.js"(e,t){var r=rs(),i=t_(),n=rl(),a=tv().removeElement,o=tE(),s=t.exports={};s.align=rc(),s.getCursor=ru();var l=rh();function c(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=0x3b9ac9ff,t.background="none",document.body.appendChild(e),e}function u(e){return r(e.changedTouches?e.changedTouches[0]:e,document.body)}s.unhover=l.wrapped,s.unhoverRaw=l.raw,s.init=function(e){var t,r,l,h,d,f,p,m,g=e.gd,y=1,v=g._context.doubleClickDelay,x=e.element;g._mouseDownTime||(g._mouseDownTime=0),x.style.pointerEvents="all",x.onmousedown=_,n?(x._ontouchstart&&x.removeEventListener("touchstart",x._ontouchstart),x._ontouchstart=_,x.addEventListener("touchstart",_,{passive:!1})):x.ontouchstart=_;var b=e.clampFn||function(e,t,r){return Math.abs(e)"u"&&typeof n.clientY>"u"&&(n.clientX=t,n.clientY=r),(l=new Date().getTime())-g._mouseDownTimev&&(y=Math.max(y-1,1)),g._dragged)e.doneFn&&e.doneFn();else{var r;f.target===p?r=f:(r={target:p,srcElement:p,toElement:p},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(e=>{var t=f[e];r[e]||"function"==typeof t||(r[e]=t)})),e.clickFn&&e.clickFn(y,r),m||p.dispatchEvent(new MouseEvent("click",t))}g._dragging=!1,g._dragged=!1}},s.coverSlip=c}}),rf=p({"src/lib/setcursor.js"(e,t){t.exports=function(e,t){(e.attr("class")||"").split(" ").forEach(function(t){0===t.indexOf("cursor-")&&e.classed(t,!1)}),t&&e.classed("cursor-"+t,!0)}}}),rp=p({"src/lib/override_cursor.js"(e,t){var r=rf(),i="data-savedcursor";t.exports=function(e,t){var n=e.attr(i);if(t){if(!n){for(var a=(e.attr("class")||"").split(" "),o=0;ot.legend.length)for(var i=t.legend.length;i+("legend"===e));if(!1===S&&(c[e]=void 0),!(!1===S&&!d.uirevision)&&(p("uirevision",c.uirevision),!1!==S)){p("borderwidth");var E,C,L,P=p("orientation"),I=p("yref"),z=p("xref"),D="h"===P,O="paper"===I,R="paper"===z,F="left";if(D?(E=0,r.getComponentMethod("rangeslider","isVisible")(t.xaxis)?O?(C=1.1,L="bottom"):(C=1,L="top"):O?(C=-.1,L="top"):(C=0,L="bottom")):(C=1,L="auto",R?E=1.02:(E=1,F="right")),i.coerce(d,f,{x:{valType:"number",editType:"legend",min:R?-2:0,max:R?3:1,dflt:E}},"x"),i.coerce(d,f,{y:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:C}},"y"),p("traceorder",w),l.isGrouped(c[e])&&p("tracegroupgap"),p("entrywidth"),p("entrywidthmode"),p("indentation"),p("itemsizing"),p("itemwidth"),p("itemclick"),p("itemdoubleclick"),p("groupclick"),p("xanchor",F),p("yanchor",L),p("maxheight"),p("valign"),i.noneOrAll(d,f,["x","y"]),p("title.text")){p("title.side",D?"left":"top");var j=i.extendFlat({},m,{size:i.bigFont(m.size)});i.coerceFont(p,"title.font",j);let e=h>1;p("titleclick",!!e&&"toggle"),p("titledoubleclick",!!e&&"toggleothers")}}}function B(e){return r.traceIs(e,"pie-like")&&null!=e._length&&(Array.isArray(e.legend)||Array.isArray(e.showlegend))}})(g,e,t,h,m.length),t[g]&&(t[g]._id=g),t._legends.push(g)}}}}),rv=p({"src/components/legend/handle_click.js"(e){var t=eQ(),r=tv(),i=r.pushUnique,n=rg(),a=!0;e.handleItemClick=function(e,n,o,s){var l=n._fullLayout;if(n._dragged||n._editing)return;var c=e.data()[0][0];if(c.groupTitle&&c.noClick)return;var u=o.groupclick;"toggle"===s&&"toggleothers"===o.itemdoubleclick&&a&&n.data&&n._context.showTips&&(r.notifier(r._(n,"Double-click on legend to isolate one trace"),"long",n),a=!1);var h="togglegroup"===u,d=l.hiddenlabels?l.hiddenlabels.slice():[],f=n._fullData;let p=(l.shapes||[]).filter(e=>e.showlegend||e.legendgroup);var m=f.concat(p),g=c.trace;g._isShape&&(g=l.shapes[g.index]);var y,v,x,b,_,w=g.legendgroup,T={},M=[],k=[],A=[],S=(l.shapes||[]).map(function(e){return e._input}),E=!1;function C(e,t){if(!(c.groupTitle&&!h)){var r,i,n,a=e._isShape,o=e.index;void 0===o&&(o=e._index);var s=!1!==e.visible&&t;a?(S[o].visible=s,E=!0):(r=o,i=M.indexOf(r),(n=T.visible)||(n=T.visible=[]),-1===M.indexOf(r)&&(M.push(r),i=M.length-1),n[i]=s)}}var L=g.legend;if(!g._isShape&&t.traceIs(g,"pie-like")){var P=c.label,I=d.indexOf(P);if("toggle"===s)-1===I?d.push(P):d.splice(I,1);else if("toggleothers"===s){var z=-1!==I,D=[];for(y=0;ye.showlegend||e.legendgroup),c=o.concat(l);function u(e){return(e.legend||"legend")===s}"toggle"===i?(p=!c.some(function(e){return u(e)&&!0===e.visible}),m=!1):(p=!0,m=!c.some(function(e){return!u(e)&&!0===e.visible&&!1!==e.showlegend}));let h={visible:[]},d=[],f=(a.shapes||[]).map(function(e){return e._input});for(var p,m,g=!1,y=0;yP&&(C=P)}S[o][0]._groupMinRank=C,S[o][0]._preGroupSort=o}var I=function(e,t){return(r(e.trace.legendrank)?e.trace.legendrank[e.i]:e.trace.legendrank)-(r(t.trace.legendrank)?t.trace.legendrank[t.i]:t.trace.legendrank)||e._preSort-t._preSort};for(S.forEach(function(e,t){e[0]._preGroupSort=t}),S.sort(function(e,t){return e[0]._groupMinRank-t[0]._groupMinRank||e[0]._preGroupSort-t[0]._preGroupSort}),o=0;or?r:e}t.exports=function(e,t,g){var y=t._fullLayout;g||(g=y.legend);var v="constant"===g.itemsizing,x=g.itemwidth,b=a((x+2*d.itemGap)/2,0),_=function(e,t,r,i){var n;if(e+1)n=e;else{if(!t||!(t.width>0))return 0;n=t.width}return v?i:Math.min(n,r)};function w(e,n,a){var c=e[0].trace,u=c.marker||{},h=u.line||{},d=u.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",f=a?c.visible&&c.type===a:i.traceIs(c,"bar"),p=r.select(n).select("g.legendpoints").selectAll("path.legend"+a).data(f?[e]:[]);p.enter().append("path").classed("legend"+a,!0).attr("d",d).attr("transform",b),p.exit().remove(),p.each(function(e){var i=r.select(this),n=e[0],a=_(n.mlw,u.line,5,2);i.style("stroke-width",a+"px");var d=n.mcc;if(!g._inHover&&"mc"in n){var f=l(u),p=f.mid;void 0===p&&(p=(f.max+f.min)/2),d=o.tryColorscale(u,"")(p)}var y=d||n.mc||u.color,v=u.pattern,x=o.getPatternAttr,b=v&&(x(v.shape,0,"")||x(v.path,0,""));if(b){var w=x(v.bgcolor,0,null),T=x(v.fgcolor,0,null),M=v.fgopacity,k=m(v.size,8,10),A=m(v.solidity,.5,1),S="legend-"+c.uid;i.call(o.pattern,"legend",t,S,b,k,A,d,v.fillmode,w,T,M)}else i.call(s.fill,y);a&&s.stroke(i,n.mlc||h.color)})}function T(e,a,o){var s=e[0],l=s.trace,c=o?l.visible&&l.type===o:i.traceIs(l,o),d=r.select(a).select("g.legendpoints").selectAll("path.legend"+o).data(c?[e]:[]);if(d.enter().append("path").classed("legend"+o,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),d.exit().remove(),d.size()){var f=l.marker||{},p=_(h(f.line.width,s.pts),f.line,5,2),m="pieLike",g=n.minExtend(l,{marker:{line:{width:p}}},m);u(d,n.minExtend(s,{trace:g},m),g,t)}}e.each(function(e){var t=r.select(this),i=n.ensureSingle(t,"g","layers");i.style("opacity",e[0].trace.opacity);var o=g.indentation,s=g.valign,l=e[0].lineHeight,c=e[0].height;if(("middle"!==s||0!==o)&&l&&c){var u=g.indentation;i.attr("transform",a(u,.5*(l-c+3)*({top:1,bottom:-1})[s]||0))}else i.attr("transform",null);i.selectAll("g.legendfill").data([e]).enter().append("g").classed("legendfill",!0),i.selectAll("g.legendlines").data([e]).enter().append("g").classed("legendlines",!0);var h=i.selectAll("g.legendsymbols").data([e]);h.enter().append("g").classed("legendsymbols",!0),h.selectAll("g.legendpoints").data([e]).enter().append("g").classed("legendpoints",!0)}).each(function(e){var i,a=e[0].trace,c=[];if(a.visible)switch(a.type){case"histogram2d":case"heatmap":c=[["M-15,-2V4H15V-2Z"]],i=!0;break;case"choropleth":case"choroplethmap":c=[["M-6,-6V6H6V-6Z"]],i=!0;break;case"densitymap":c=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],i="radial";break;case"cone":c=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],i=!1;break;case"streamtube":c=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],i=!1;break;case"surface":c=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],i=!0;break;case"mesh3d":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],i=!1;break;case"volume":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],i=!0;break;case"isosurface":c=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],i=!1}var u=r.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(c);u.enter().append("path").classed("legend3dandfriends",!0).attr("transform",b).style("stroke-miterlimit",1),u.exit().remove(),u.each(function(e,c){var u,h=r.select(this),d=l(a),p=d.colorscale,m=d.reversescale;if(p){if(!i){var g=p.length;u=0===c?p[m?g-1:0][1]:1===c?p[m?0:g-1][1]:p[Math.floor((g-1)/2)][1]}}else{var y=a.vertexcolor||a.facecolor||a.color;u=n.isArrayOrTypedArray(y)?y[c]||y[0]:y}h.attr("d",e[0]),u?h.call(s.fill,u):h.call(function(e){if(e.size()){var r="legendfill-"+a.uid;o.gradient(e,t,r,f(m,"radial"===i),p,"fill")}})})}).each(function(e){var t=e[0].trace,i="waterfall"===t.type;if(e[0]._distinct&&i){var n=e[0].trace[e[0].dir].marker;return e[0].mc=n.color,e[0].mlw=n.line.width,e[0].mlc=n.line.color,w(e,this,"waterfall")}var a=[];t.visible&&i&&(a=e[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var o=r.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(a);o.enter().append("path").classed("legendwaterfall",!0).attr("transform",b).style("stroke-miterlimit",1),o.exit().remove(),o.each(function(e){var i=r.select(this),n=t[e[0]].marker,a=_(void 0,n.line,5,2);i.attr("d",e[1]).style("stroke-width",a+"px").call(s.fill,n.color),a&&i.call(s.stroke,n.line.color)})}).each(function(e){w(e,this,"funnel")}).each(function(e){w(e,this)}).each(function(e){var a=e[0].trace,l=r.select(this).select("g.legendpoints").selectAll("path.legendbox").data(a.visible&&i.traceIs(a,"box-violin")?[e]:[]);l.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",b),l.exit().remove(),l.each(function(){var e=r.select(this);if(("all"===a.boxpoints||"all"===a.points)&&0===s.opacity(a.fillcolor)&&0===s.opacity((a.line||{}).color)){var i=n.minExtend(a,{marker:{size:v?12:n.constrain(a.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});l.call(o.pointStyle,i,t)}else{var c=_(void 0,a.line,5,2);e.style("stroke-width",c+"px").call(s.fill,a.fillcolor),c&&s.stroke(e,a.line.color)}})}).each(function(e){T(e,this,"funnelarea")}).each(function(e){T(e,this,"pie")}).each(function(e){var i,a,s=p(e),u=s.showFill,h=s.showLine,d=s.showGradientLine,m=s.showGradientFill,g=s.anyFill,y=s.anyLine,v=e[0],b=v.trace,w=l(b),T=w.colorscale,M=w.reversescale,k=c.hasMarkers(b)||!g?"M5,0":y?"M5,-2":"M5,-3",A=r.select(this),S=A.select(".legendfill").selectAll("path").data(u||m?[e]:[]);if(S.enter().append("path").classed("js-fill",!0),S.exit().remove(),S.attr("d",k+"h"+x+"v6h-"+x+"z").call(function(e){if(e.size())if(u)o.fillGroupStyle(e,t,!0);else{var r="legendfill-"+b.uid;o.gradient(e,t,r,f(M),T,"fill")}}),h||d){var E=_(void 0,b.line,10,5);a=n.minExtend(b,{line:{width:E}}),i=[n.minExtend(v,{trace:a})]}var C=A.select(".legendlines").selectAll("path").data(h||d?[i]:[]);C.enter().append("path").classed("js-line",!0),C.exit().remove(),C.attr("d",k+(d?"l"+x+",0.0001":"h"+x)).call(h?o.lineGroupStyle:function(e){if(e.size()){var r="legendline-"+b.uid;o.lineGroupStyle(e),o.gradient(e,t,r,f(M),T,"stroke")}})}).each(function(e){var i,a,s=p(e),l=s.anyFill,u=s.anyLine,h=s.showLine,d=s.showMarker,f=e[0],m=f.trace,g=!d&&!u&&!l&&c.hasText(m);function y(e,t,r,i){var a=n.nestedProperty(m,e).get(),o=n.isArrayOrTypedArray(a)&&t?t(a):a;if(v&&o&&void 0!==i&&(o=i),r){if(or[1])return r[1]}return o}function x(e){return f._distinct&&f.index&&e[f.index]?e[f.index]:e[0]}if(d||g||h){var _={},w={};if(d){_.mc=y("marker.color",x),_.mx="scattermap"===m.type?"circle":y("marker.symbol",x),_.mo=y("marker.opacity",n.mean,[.2,1]),_.mlc=y("marker.line.color",x),_.mlw=y("marker.line.width",n.mean,[0,5],2),_.mld=y("marker.line.dash",x),w.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var T=y("marker.size",n.mean,[2,16],12);_.ms=T,w.marker.size=T}h&&(w.line={width:y("line.width",x,[0,10],5)}),g&&(_.tx="Aa",_.tp=y("textposition",x),_.ts=10,_.tc=y("textfont.color",x),_.tf=y("textfont.family",x),_.tw=y("textfont.weight",x),_.ty=y("textfont.style",x),_.tv=y("textfont.variant",x),_.tC=y("textfont.textcase",x),_.tE=y("textfont.lineposition",x),_.tS=y("textfont.shadow",x)),i=[n.minExtend(f,_)],(a=n.minExtend(m,w)).selectedpoints=null,a.texttemplate=null}var M=r.select(this).select("g.legendpoints"),k=M.selectAll("path.scatterpts").data(d?i:[]);k.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",b),k.exit().remove(),k.call(o.pointStyle,a,t),d&&(i[0].mrc=3);var A=M.selectAll("g.pointtext").data(g?i:[]);A.enter().append("g").classed("pointtext",!0).append("text").attr("transform",b),A.exit().remove(),A.selectAll("text").call(o.textPointStyle,a,t)}).each(function(e){var t=e[0].trace,i=r.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(t.visible&&"candlestick"===t.type?[e,e]:[]);i.enter().append("path").classed("legendcandle",!0).attr("d",function(e,t){return t?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",b).style("stroke-miterlimit",1),i.exit().remove(),i.each(function(e,i){var n=r.select(this),a=t[i?"increasing":"decreasing"],o=_(void 0,a.line,5,2);n.style("stroke-width",o+"px").call(s.fill,a.fillcolor),o&&s.stroke(n,a.line.color)})}).each(function(e){var t=e[0].trace,i=r.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(t.visible&&"ohlc"===t.type?[e,e]:[]);i.enter().append("path").classed("legendohlc",!0).attr("d",function(e,t){return t?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",b).style("stroke-miterlimit",1),i.exit().remove(),i.each(function(e,i){var n=r.select(this),a=t[i?"increasing":"decreasing"],l=_(void 0,a.line,5,2);n.style("fill","none").call(o.dashLine,a.line.dash,l),l&&s.stroke(n,a.line.color)})})}}}),rk=p({"src/components/legend/draw.js"(e,t){var r=T(),i=tv(),n=tD(),a=eQ(),o=tT(),s=rd(),l=t9(),c=ee(),u=tF(),h=rv().handleItemClick,d=rv().handleTitleClick,f=rx(),p=tR(),m=p.LINE_SPACING,g=p.FROM_TL,y=p.FROM_BR,v=rb(),x=rM(),b=rg(),_=/^legend[0-9]*$/;function w(e,t){var h,p,_=t||{},w=e._fullLayout,T=b.getId(_),S=_._inHover;if(S?(p=_.layer,h="hover"):(p=w._infolayer,h=T),p){if(h+=w._uid,e._legendMouseDownTime||(e._legendMouseDownTime=0),S){if(!_.entries)return;I=v(_.entries,_)}else{for(var I,z,D=(e.calcdata||[]).slice(),O=w.shapes,R=0;R1)}var B=w.hiddenlabels||[];if(!S&&(!w.showlegend||!I.length))return p.selectAll("."+T).remove(),w._topdefs.select("#"+h).remove(),n.autoMargin(e,T);var N=i.ensureSingle(p,"g",T,function(e){S||e.attr("pointer-events","all")}),U=i.ensureSingleById(w._topdefs,"clipPath",h,function(e){e.append("rect")}),V=i.ensureSingle(N,"rect","bg",function(e){e.attr("shape-rendering","crispEdges")});V.call(c.stroke,_.bordercolor).call(c.fill,_.bgcolor).style("stroke-width",_.borderwidth+"px");var q=i.ensureSingle(N,"g","scrollbox"),H=_.title;_._titleWidth=0,_._titleHeight=0,H.text?((z=i.ensureSingle(q,"text",T+"titletext")).attr("text-anchor","start").call(l.font,H.font).text(H.text),C(z,q,e,_,1),!S&&(_.titleclick||_.titledoubleclick)&&function(e,t,n,s){if(t._fullData.some(function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(s):t===s)&&a.traceIs(e,"pie-like")}))return;let l=t._context.doubleClickDelay;var u,h=1;let f=i.ensureSingle(e,"rect",s+"titletoggle",function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(f.on("mousedown",function(){(u=new Date().getTime())-t._legendMouseDownTimel&&(h=Math.max(h-1,1));let e={event:r.event,legendId:s,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(1===h&&n.titleclick){if(!1===o.triggerHandler(t,"plotly_legendtitleclick",e))return;n._titleClickTimeout=setTimeout(function(){t._fullLayout&&d(t,n,n.titleclick)},l)}else 2===h&&(n._titleClickTimeout&&clearTimeout(n._titleClickTimeout),t._legendMouseDownTime=0,!1!==o.triggerHandler(t,"plotly_legendtitledoubleclick",e)&&n.titledoubleclick&&d(t,n,n.titledoubleclick))}))}(q,e,_,T)):(q.selectAll("."+T+"titletext").remove(),q.selectAll("."+T+"titletoggle").remove());var G=i.ensureSingle(N,"rect","scrollbar",function(e){e.attr(f.scrollBarEnterAttrs).call(c.fill,f.scrollBarColor)}),W=q.selectAll("g.groups").data(I);W.enter().append("g").attr("class","groups"),W.exit().remove();var Y=W.selectAll("g.traces").data(i.identity);Y.enter().append("g").attr("class","traces"),Y.exit().remove(),Y.style("opacity",function(t){let r=t[0],i=r.trace;if(r.groupTitle){let t=i.legendgroup,r=(w.shapes||[]).filter(function(e){return e.showlegend});return e._fullData.concat(r).some(function(e){return e.legendgroup===t&&(e.legend||"legend")===T&&!0===e.visible})?1:.5}return a.traceIs(i,"pie-like")?-1!==B.indexOf(t[0].label)?.5:1:"legendonly"===i.visible?.5:1}).each(function(){r.select(this).call(A,e,_)}).call(x,e,_).each(function(t){S||t[0].groupTitle&&"toggleitem"===_.groupclick||r.select(this).call(E,e,T)}),i.syncOrAsync([n.previousPromises,function(){return function(e,t,i,n,a){var o,s,c,h,d=e._fullLayout,p=b.getId(n);n||(n=d[p]);var g=d._size,y=b.isVertical(n),v=b.isGrouped(n),x="fraction"===n.entrywidthmode,_=n.borderwidth,w=2*_,T=f.itemGap,k=n.indentation+n.itemwidth+2*T,A=2*(_+T),S=P(n),E=n.y<0||0===n.y&&"top"===S,C=n.y>1||1===n.y&&"bottom"===S,I=n.tracegroupgap,z={};let{orientation:D,yref:O}=n,{maxheight:R}=n,F=E||C||"v"!==D||"paper"!==O;R||(R=F?.5:1);let j=F?d.height:g.h;n._maxHeight=Math.max(R>1?R:R*j,30);var B=0;n._width=0,n._height=0;var N=(s=0,c=0,(h=(o=n).title.side)&&(-1!==h.indexOf("left")&&(s=o._titleWidth),-1!==h.indexOf("top")&&(c=o._titleHeight)),[s,c]);if(y)i.each(function(e){var t=e[0].height;l.setTranslate(this,_+N[0],_+N[1]+n._height+t/2+T),n._height+=t,n._width=Math.max(n._width,e[0].width)}),B=k+n._width,n._width+=T+k+w,n._height+=A,v&&(t.each(function(e,t){l.setTranslate(this,0,t*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var U=L(n),V=n.x<0||0===n.x&&"right"===U,q=n.x>1||1===n.x&&"left"===U,H=C||E,G=d.width/2;n._maxWidth=Math.max(V?H&&"left"===U?g.l+g.w:G:q?H&&"right"===U?g.r+g.w:G:g.w,2*k);var W=0,Y=0;i.each(function(e){var t=M(e,n,k);W=Math.max(W,t),Y+=t}),B=null;var Z=0;if(v){var $=0,X=0,K=0;t.each(function(){var e=0,t=0;r.select(this).selectAll("g.traces").each(function(r){var i=M(r,n,k),a=r[0].height;l.setTranslate(this,N[0],N[1]+_+T+a/2+t),t+=a,e=Math.max(e,i),z[r[0].trace.legendgroup]=e});var i=e+T;X>0&&i+_+X>n._maxWidth?(Z=Math.max(Z,X),X=0,K+=$+I,$=t):$=Math.max($,t),l.setTranslate(this,X,K),X+=i}),n._width=Math.max(Z,X)+_,n._height=K+$+A}else{var J=i.size(),Q=Y+w+(J-1)*T=n._maxWidth&&(Z=Math.max(Z,ei),et=0,er+=ee,n._height+=ee,ee=0),l.setTranslate(this,N[0]+_+et,N[1]+_+er+t/2+T),ei=et+r+T,et+=i,ee=Math.max(ee,t)}),Q?(n._width=et+w,n._height=ee+A):(n._width=Math.max(Z,ei)+w,n._height+=ee+A)}}n._width=Math.ceil(Math.max(n._width+N[0],n._titleWidth+2*(_+f.titlePad))),n._height=Math.ceil(Math.max(n._height+N[1],n._titleHeight+2*(_+f.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var en=e._context.edits,ea=en.legendText||en.legendPosition;i.each(function(e){var t=r.select(this).select("."+p+"toggle"),i=e[0].height,a=e[0].trace.legendgroup,o=M(e,n,k);v&&""!==a&&(o=z[a]);var s=ea?k:B||o;y||x||(s+=T/2),l.setRect(t,0,-i/2,s,i)});var eo=a.select("."+p+"titletext");eo.node()&&function(e,t,r){if("top center"===t.title.side||"top right"===t.title.side){var i=t.title.font.size*m,n=0,a=e.node(),o=l.bBox(a).width;"top center"===t.title.side?n=.5*(t._width-2*r-2*f.titlePad-o):"top right"===t.title.side&&(n=t._width-2*r-2*f.titlePad-o),u.positionText(e,r+f.titlePad+n,r+i)}}(eo,n,_);var es=a.select("."+p+"titletoggle");if(es.size()&&eo.node()){var el=eo.attr("x")||0,ec=f.titlePad;l.setRect(es,el-ec,_,n._titleWidth+2*ec,n._titleHeight+2*ec)}}(e,W,Y,_,q)},function(){var t,o,c,u,d=w._size,m=_.borderwidth,v="paper"===_.xref,x="paper"===_.yref;if(H.text){let t=(w.shapes||[]).filter(function(e){return e.showlegend}),r=e._fullData.concat(t).some(function(e){let t=e.legend||"legend";return(Array.isArray(t)?t.includes(T):t===T)&&!0===e.visible});z.style("opacity",r?1:.5)}if(!S){if(function(e,t,r,i){var a=e._fullLayout,o=a[t],s=L(o),l=P(o),c="paper"===o.xref,u="paper"===o.yref;e._fullLayout._reservedMargin[t]={};var h=o.y<.5?"b":"t",d=o.x<.5?"l":"r",f={r:a.width-r,l:r+o._width,b:a.height-i,t:i+o._effHeight};if(c&&u)return n.autoMargin(e,t,{x:o.x,y:o.y,l:o._width*g[s],r:o._width*y[s],b:o._effHeight*y[l],t:o._effHeight*g[l]});c?e._fullLayout._reservedMargin[t][h]=f[h]:u||"v"===o.orientation?e._fullLayout._reservedMargin[t][d]=f[d]:e._fullLayout._reservedMargin[t][h]=f[h]}(e,T,R=v?d.l+d.w*_.x-g[L(_)]*_._width:w.width*_.x-g[L(_)]*_._width,F=x?d.t+d.h*(1-_.y)-g[P(_)]*_._effHeight:w.height*(1-_.y)-g[P(_)]*_._effHeight))return;if(w.margin.autoexpand){var b=R,M=F;R=v?i.constrain(R,0,w.width-_._width):b,F=x?i.constrain(F,0,w.height-_._effHeight):M,R!==b&&i.log("Constrain "+T+".x to make legend fit inside graph"),F!==M&&i.log("Constrain "+T+".y to make legend fit inside graph")}l.setTranslate(N,R,F)}if(G.on(".drag",null),N.on("wheel",null),S||_._height<=_._maxHeight||e._context.staticPlot){var A=_._effHeight;S&&(A=_._height),V.attr({width:_._width-m,height:A-m,x:m/2,y:m/2}),l.setTranslate(q,0,0),U.select("rect").attr({width:_._width-2*m,height:A-2*m,x:m,y:m}),l.setClipUrl(q,h,e),l.setRect(G,0,0,0,0),delete _._scrollY}else{var E=Math.max(f.scrollBarMinHeight,_._effHeight*_._effHeight/_._height),C=_._effHeight-E-2*f.scrollBarMargin,I=_._height-_._effHeight,D=C/I,O=Math.min(_._scrollY||0,I);V.attr({width:_._width-2*m+f.scrollBarWidth+f.scrollBarMargin,height:_._effHeight-m,x:m/2,y:m/2}),U.select("rect").attr({width:_._width-2*m+f.scrollBarWidth+f.scrollBarMargin,height:_._effHeight-2*m,x:m,y:m+O}),l.setClipUrl(q,h,e),K(O,E,D),N.on("wheel",function(){K(O=i.constrain(_._scrollY+r.event.deltaY/I*C,0,I),E,D),0!==O&&O!==I&&r.event.preventDefault()});var R,F,j,B,W,Y=function(e,t,r){var n=(r-t)/D+e;return i.constrain(n,0,I)},Z=function(e,t,r){var n=(t-r)/D+e;return i.constrain(n,0,I)},$=r.behavior.drag().on("dragstart",function(){var e=r.event.sourceEvent;j="touchstart"===e.type?e.changedTouches[0].clientY:e.clientY,W=O}).on("drag",function(){var e=r.event.sourceEvent;2===e.buttons||e.ctrlKey||(B="touchmove"===e.type?e.changedTouches[0].clientY:e.clientY,K(O=Y(W,j,B),E,D))});G.call($);var X=r.behavior.drag().on("dragstart",function(){var e=r.event.sourceEvent;"touchstart"===e.type&&(j=e.changedTouches[0].clientY,W=O)}).on("drag",function(){var e=r.event.sourceEvent;"touchmove"===e.type&&(B=e.changedTouches[0].clientY,K(O=Z(W,j,B),E,D))});q.call(X)}function K(t,r,i){_._scrollY=e._fullLayout[T]._scrollY=t,l.setTranslate(q,0,-t),l.setRect(G,_._width,f.scrollBarMargin+t*i,f.scrollBarWidth,r),U.select("rect").attr("y",m+t)}e._context.edits.legendPosition&&(N.classed("cursor-move",!0),s.init({element:N.node(),gd:e,prepFn:function(e){if(e.target!==G.node()){var t=l.getTranslate(N);c=t.x,u=t.y}},moveFn:function(e,r){if(void 0!==c&&void 0!==u){var i=c+e,n=u+r;l.setTranslate(N,i,n),t=s.align(i,_._width,d.l,d.l+d.w,_.xanchor),o=s.align(n+_._height,-_._height,d.t+d.h,d.t,_.yanchor)}},doneFn:function(){if(void 0!==t&&void 0!==o){var r={};r[T+".x"]=t,r[T+".y"]=o,a.call("_guiRelayout",e,r)}},clickFn:function(t,r){var i=p.selectAll("g.traces").filter(function(){var e=this.getBoundingClientRect();return r.clientX>=e.left&&r.clientX<=e.right&&r.clientY>=e.top&&r.clientY<=e.bottom});i.size()>0&&k(e,_,i,t,r)}}))}],e)}}function M(e,t,r){var i=e[0],n=i.width,a=t.entrywidthmode,o=i.trace.legendwidth||t.entrywidth;return"fraction"===a?t._maxWidth*o:r+(o||n)}function k(e,t,r,i,n){var s=e._fullLayout,l=r.data()[0][0].trace,c=t.itemclick,u=t.itemdoubleclick,d={event:n,node:r.node(),curveNumber:l.index,expandedIndex:l.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:s};l._group&&(d.group=l._group),a.traceIs(l,"pie-like")&&(d.label=r.datum()[0].label);var f=o.triggerHandler(e,"plotly_legendclick",d);if(1===i){if(!1===f)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&c&&h(r,e,t,c)},e._context.doubleClickDelay)}else 2===i&&(t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0,!1!==o.triggerHandler(e,"plotly_legenddoubleclick",d)&&!1!==f&&u&&h(r,e,t,u))}function A(e,t,r){var n,o,s=b.getId(r),c=e.data()[0][0],h=c.trace,d=a.traceIs(h,"pie-like"),p=!r._inHover&&t._context.edits.legendText&&!d,m=r._maxNameLength;c.groupTitle?(n=c.groupTitle.text,o=c.groupTitle.font):(o=r.font,r.entries?n=c.text:(n=d?c.label:h.name,h._meta&&(n=i.templateString(n,h._meta))));var g=i.ensureSingle(e,"text",s+"text");g.attr("text-anchor","start").call(l.font,o).text(p?S(n,m):n);var y=r.indentation+r.itemwidth+2*f.itemGap;u.positionText(g,y,0),p?g.call(u.makeEditable,{gd:t,text:n}).call(C,e,t,r).on("edit",function(i){this.text(S(i,m)).call(C,e,t,r);var n={};return n.name=i,c.trace._isShape?a.call("_guiRelayout",t,"shapes["+h.index+"].name",n.name):a.call("_guiRestyle",t,n,h.index)}):C(g,e,t,r)}function S(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var i=r-e.length;i>0;i--)e+=" ";return e}function E(e,t,n){var a,o=t._context.doubleClickDelay,s=1,l=i.ensureSingle(e,"rect",n+"toggle",function(e){t._context.staticPlot||e.style("cursor","pointer").attr("pointer-events","all"),e.call(c.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){(a=new Date().getTime())-t._legendMouseDownTimeo&&(s=Math.max(s-1,1)),k(t,i,e,s,r.event)}}))}function C(e,t,r,i,n){i._inHover&&e.attr("data-notex",!0),u.convertToTspans(e,r,function(){!function(e,t,r,i){var n=e.data()[0][0],a=n&&n.trace.showlegend;if(Array.isArray(a)&&(a=!1!==a[n.i]),!r._inHover&&n&&!a)return e.remove();var o=e.select("g[class*=math-group]"),s=o.node(),c=b.getId(r);r||(r=t._fullLayout[c]);var h,d,p=r.borderwidth,g=(1===i?r.title.font:n.groupTitle?n.groupTitle.font:r.font).size*m;if(s){var y=l.bBox(s);h=y.height,d=y.width,1===i?l.setTranslate(o,p,p+.75*h):l.setTranslate(o,0,.25*h)}else{var v=e.select("."+c+(1===i?"title":"")+"text"),x=u.lineCount(v),_=v.node();if(h=g*x,d=_?l.bBox(_).width:0,1===i)"left"===r.title.side&&(d+=2*f.itemGap),u.positionText(v,p+f.titlePad,p+g);else{var w=2*f.itemGap+r.indentation+r.itemwidth;n.groupTitle&&(w=f.itemGap,d-=r.indentation+r.itemwidth),u.positionText(v,w,-g*((x-1)/2-.3))}}1===i?(r._titleWidth=d,r._titleHeight=h):(n.lineHeight=g,n.height=Math.max(h,16)+3,n.width=d)}(t,r,i,n)})}function L(e){return i.isRightAnchor(e)?"right":i.isCenterAnchor(e)?"center":"left"}function P(e){return i.isBottomAnchor(e)?"bottom":i.isMiddleAnchor(e)?"middle":"top"}t.exports=function(e,t){if(t)w(e,t);else{var i=e._fullLayout,n=i._legends;i._infolayer.selectAll('[class^="legend"]').each(function(){var e=r.select(this),t=e.attr("class").split(" ")[0];t.match(_)&&-1===n.indexOf(t)&&e.remove()});for(var a=0;a$[0]._length||eb<0||eb>X[0]._length)return d.unhoverRaw(e,a)}else ex="xpx"in a?a.xpx:$[0]._length/2,eb="ypx"in a?a.ypx:X[0]._length/2;if(a.pointerX=ex+$[0]._offset,a.pointerY=eb+X[0]._offset,er="xval"in a?g.flat(b,a.xval):g.p2c($,ex),ei="yval"in a?g.flat(b,a.yval):g.p2c(X,eb),e._hoverPointerX=a.pointerX,e._hoverPointerY=a.pointerY,!r(er[0])||!r(ei[0]))return i.warn("Fx.hover failed",a,e),d.unhoverRaw(e,a)}_.clickanywhere&&(e._hoverXVals=er,e._hoverYVals=ei,e._hoverXAxes=$,e._hoverYAxes=X);var eM=1/0;function ek(t,n){for(ea=0;eaep&&(em.splice(0,ep),eM=em[0].distance),S&&0!==et&&0===em.length){ef.distance=et,ef.index=!1;var u=es._module.hoverPoints(ef,eh,ed,"closest",{hoverLayer:_._hoverlayer});if(u&&(u=u.filter(function(e){return e.spikeDistance<=et})),u&&u.length){var d,p=u.filter(function(e){return e.xa.showspikes&&"hovered data"!==e.xa.spikesnap});if(p.length){var m=p[0];r(m.x0)&&r(m.y0)&&(d=eS(m),(!ey.vLinePoint||ey.vLinePoint.spikeDistance>d.spikeDistance)&&(ey.vLinePoint=d))}var y=u.filter(function(e){return e.ya.showspikes&&"hovered data"!==e.ya.spikesnap});if(y.length){var v=y[0];r(v.x0)&&r(v.y0)&&(d=eS(v),(!ey.hLinePoint||ey.hLinePoint.spikeDistance>d.spikeDistance)&&(ey.hLinePoint=d))}}}}}function eA(e,t,r){for(var i,n=null,a=1/0,o=0;oe.trace.index===eD.trace.index):[eD]).length;ek(U("x",eD,_),U("y",eD,_));var eR,eF=[],ej={},eB=0,eN=function(e){var t=E[e.trace.type]?I(e):e.trace.index;if(ej[t]){var r=ej[t]-1,i=eF[r];r>0&&Math.abs(e.distance)eO-1;eR--)eN(em[eR]);em=eF,eL()}var eU=e._hoverdata,eV=[],eq=V(e),eH=q(e);for(let e of em){var eG=g.makeEventData(e,e.trace,e.cd);if(!1!==e.hovertemplate){var eW=!1;e.cd[e.index]&&e.cd[e.index].ht&&(eW=e.cd[e.index].ht),e.hovertemplate=eW||e.trace.hovertemplate||!1}if(e.xa&&e.ya){var eY=e.x0+e.xa._offset,eZ=e.x1+e.xa._offset,e$=e.y0+e.ya._offset,eX=e.y1+e.ya._offset;eG.bbox={x0:Math.min(eY,eZ)+eH,x1:Math.max(eY,eZ)+eH,y0:Math.min(e$,eX)+eq,y1:Math.max(e$,eX)+eq},eG.xPixel=(eY+eZ)/2,eG.yPixel=(e$+eX)/2}e.eventData=[eG],eV.push(eG)}e._hoverdata=eV;var eK="y"===C&&(eg.length>1||em.length>1)||"closest"===C&&ev&&em.length>1,eJ=h.combine(_.plot_bgcolor||h.background,_.paper_bgcolor),eQ=D(em,{gd:e,hovermode:C,rotateLabels:eK,bgColor:eJ,container:_._hoverlayer,outerContainer:_._paper.node(),commonLabelOpts:_.hoverlabel,hoverdistance:_.hoverdistance}),e0=eQ.hoverLabels;if(g.isUnifiedHover(C)||(function(e,t,r,i){var n,a,o,s,l,c,u,h=t?"xa":"ya",d=t?"ya":"xa",f=0,p=1,m=e.size(),g=Array(m),y=0,v=i.minX,x=i.maxX,b=i.minY,_=i.maxY,T=function(e){return e*r._invScaleX},M=function(e){return e*r._invScaleY};function k(e){var t=e[0],r=e[e.length-1];if(a=t.pmin-t.pos-t.dp+t.size,o=r.pos+r.dp+r.size-t.pmax,a>.01){for(l=e.length-1;l>=0;l--)e[l].dp+=a;n=!1}if(!(o<.01)){if(a<-.01){for(l=e.length-1;l>=0;l--)e[l].dp-=o;n=!1}if(n){var i=0;for(s=0;st.pmax&&i++;for(s=e.length-1;s>=0&&!(i<=0);s--)(c=e[s]).pos>t.pmax-1&&(c.del=!0,i--);for(s=0;s=0;l--)e[l].dp-=o;for(s=e.length-1;s>=0&&!(i<=0);s--)(c=e[s]).pos+c.dp+c.size>t.pmax&&(c.del=!0,i--)}}}for(e.each(function(e){var i=e[h],n=e[d],a="x"===i._id.charAt(0),o=i.range;0===y&&o&&o[0]>o[1]!==a&&(p=-1);var s=0,l=a?r.width:r.height;if("x"===r.hovermode||"y"===r.hovermode){var c,u,f=R(e,t),m=e.anchor,k="end"===m?-1:1;if("middle"===m)u=(c=e.crossPos+(a?M(f.y-e.by/2):T(e.bx/2+e.tx2width/2)))+(a?M(e.by):T(e.bx));else if(a)u=(c=e.crossPos+M(A+f.y)-M(e.by/2-A))+M(e.by);else{var S=T(k*A+f.x),E=S+T(k*e.bx);c=e.crossPos+Math.min(S,E),u=e.crossPos+Math.max(S,E)}a?void 0!==b&&void 0!==_&&Math.min(u,_)-Math.max(c,b)>1&&("left"===n.side?(s=n._mainLinePosition,l=r.width):l=n._mainLinePosition):void 0!==v&&void 0!==x&&Math.min(u,x)-Math.max(c,v)>1&&("top"===n.side?(s=n._mainLinePosition,l=r.height):l=n._mainLinePosition)}g[y++]=[{datum:e,traceIndex:e.trace.index,dp:0,pos:e.pos,posref:e.posref,size:e.by*(a?w:1)/2,pmin:s,pmax:l}]}),g.sort(function(e,t){return e[0].posref-t[0].posref||p*(t[0].traceIndex-e[0].traceIndex)});!n&&f<=m;){for(f++,n=!0,s=0;s.01){for(l=E.length-1;l>=0;l--)E[l].dp+=a;for(S.push.apply(S,E),g.splice(s+1,1),u=0,l=S.length-1;l>=0;l--)u+=S[l].dp;for(o=u/S.length,l=S.length-1;l>=0;l--)S[l].dp-=o;n=!1}else s++}g.forEach(k)}for(s=g.length-1;s>=0;s--){var P=g[s];for(l=P.length-1;l>=0;l--){var I=P[l],z=I.datum;z.offset=I.dp,z.del=I.del}}}(e0,eK,_,eQ.commonLabelBoundingBox),F(e0,eK,_._invScaleX,_._invScaleY)),u&&u.tagName){var e1=m.getComponentMethod("annotations","hasClickToShow")(e,eV);c(t.select(u),e1?"pointer":"")}var e2=function(e,t){if(!t||t.length!==e._hoverdata.length)return!0;for(var r=t.length-1;r>=0;r--){var i=t[r],n=e._hoverdata[r];if(i.curveNumber!==n.curveNumber||String(i.pointNumber)!==String(n.pointNumber)||String(i.pointNumbers)!==String(n.pointNumbers)||i.binNumber!==n.binNumber)return!0}return!1}(e,eU);function e3(t){e.emit("plotly_hover",{event:a,points:t,xaxes:$,yaxes:X,xvals:g.c2dApply($,er),yvals:g.c2dApply(X,ei),xPixel:a.pointerX,yPixel:a.pointerY})}u&&!l&&(e2||_.hoveranywhere)&&(eU&&e2&&e.emit("plotly_unhover",{event:a,points:eU}),e3(e._hoverdata))}(e,a,o,l,u)})},e.loneHover=function(e,r){var i=!0;Array.isArray(e)||(i=!1,e=[e]);var n=r.gd,a=V(n),o=q(n),s=D(e.map(function(e){var t=e._x0||e.x0||e.x||0,i=e._x1||e.x1||e.x||0,s=e._y0||e.y0||e.y||0,l=e._y1||e.y1||e.y||0,c=e.eventData;if(c){var u=Math.min(t,i),d=Math.max(t,i),f=Math.min(s,l),p=Math.max(s,l),g=e.trace;if(m.traceIs(g,"gl3d")){var y=n._fullLayout[g.scene]._scene.container,v=y.offsetLeft,x=y.offsetTop;u+=v,d+=v,f+=x,p+=x}c.bbox={x0:u+o,x1:d+o,y0:f+a,y1:p+a},c.xPixel=(t+i)/2,c.yPixel=(s+l)/2,r.inOut_bbox&&r.inOut_bbox.push(c.bbox)}else c=!1;return{color:e.color||h.defaultLine,x0:e.x0||e.x||0,x1:e.x1||e.x||0,y0:e.y0||e.y||0,y1:e.y1||e.y||0,xLabel:e.xLabel,yLabel:e.yLabel,zLabel:e.zLabel,text:e.text,name:e.name,idealAlign:e.idealAlign,borderColor:e.borderColor,fontFamily:e.fontFamily,fontSize:e.fontSize,fontColor:e.fontColor,fontWeight:e.fontWeight,fontStyle:e.fontStyle,fontVariant:e.fontVariant,nameLength:e.nameLength,textAlign:e.textAlign,trace:e.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:e.hovertemplate||!1,hovertemplateLabels:e.hovertemplateLabels||!1,eventData:c}}),{gd:n,hovermode:"closest",rotateLabels:!1,bgColor:r.bgColor||h.background,container:t.select(r.container),outerContainer:r.outerContainer||r.container}).hoverLabels,l=0,c=0;return s.sort(function(e,t){return e.y0-t.y0}).each(function(e,t){var i=e.y0-e.by/2;i-5([\s\S]*)<\/extra>/;function D(e,r){var n=r.gd,s=n._fullLayout,c=r.hovermode,d=r.rotateLabels,f=r.bgColor,p=r.container,_=r.outerContainer,w=r.commonLabelOpts||{};if(0===e.length)return[[]];var T=r.fontFamily||y.HOVERFONT,M=r.fontSize||y.HOVERFONTSIZE,k=r.fontWeight||s.font.weight,E=r.fontStyle||s.font.style,C=r.fontVariant||s.font.variant,L=r.fontTextcase||s.font.textcase,P=r.fontLineposition||s.font.lineposition,z=r.fontShadow||s.font.shadow,D=e[0],R=D.xa,F=D.ya,j=c.charAt(0),B=j+"Label",N=D[B];if(void 0===N&&"multicategory"===R.type)for(var U=0;Us.width-_&&(I=s.width-_),r.attr("d","M"+(y-I)+",0L"+(y-I+A)+","+b+A+"H"+_+"v"+b+(2*S+x.height)+"H"+-_+"V"+b+A+"H"+(y-I-A)+"Z"),Q.minX=(y=I)-_,Q.maxX=y+_,"top"===R.side?(Q.minY=v-(2*S+x.height),Q.maxY=v-S):(Q.minY=v+S,Q.maxY=v+(2*S+x.height))}else{"right"===F.side?(O="start",j=1,B="",y=R._offset+R._length):(O="end",j=-1,B="-",y=R._offset),v=F._offset+(D.y0+D.y1)/2,o.attr("text-anchor",O),r.attr("d","M0,0L"+B+A+","+A+"V"+(S+x.height/2)+"h"+B+(2*S+x.width)+"V-"+(S+x.height/2)+"H"+B+A+"V-"+A+"Z"),Q.minY=v-(S+x.height/2),Q.maxY=v+(S+x.height/2),"right"===F.side?(Q.minX=y+A,Q.maxX=y+A+(2*S+x.width)):(Q.minX=y-A-(2*S+x.width),Q.maxX=y-A);var O,j,B,U,V=x.height/2,G=q-x.top-V,W="clip"+s._uid+"commonlabel"+F._id;if(y"none"!==e.hoverinfo);if(0===t.length)return[];var ee,et,er,ei,en=s.hoverlabel,ea=en.font,eo=t[0],es=(("x unified"===c?eo.xa:eo.ya).unifiedhovertitle||{}).text,el={showlegend:!0,legend:{title:{text:es?i.hovertemplateString({data:"x unified"===c?[{xa:eo.xa,x:eo.xVal}]:[{ya:eo.ya,y:eo.yVal}],fallback:eo.trace.hovertemplatefallback,locale:s._d3locale,template:es}):N,font:ea},font:ea,bgcolor:en.bgcolor,bordercolor:en.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:s.legend?s.legend.traceorder:void 0,orientation:"v"}},ec={font:ea};v(el,ec,n._fullData);var eu=ec.legend;eu.entries=[];for(var eh=0;eh=0?ee:et+e_=0?et:eS+e_=0?ey:ev+ew=0?ev:eE+ew=0,("top"===e.idealAlign||!K)&&J?(B-=V/2,e.anchor="end"):K?(B+=V/2,e.anchor="start"):e.anchor="middle",e.crossPos=B;else{if(e.pos=B,K=j+U/2+Q<=G,J=j-U/2-Q>=0,("left"===e.idealAlign||!K)&&J)j-=U/2,e.anchor="end";else if(K)j+=U/2,e.anchor="start";else{e.anchor="middle";var ee=Q/2,et=j+ee-G,er=j-ee;et>0&&(j-=et),er<0&&(j+=-er)}e.crossPos=j}w.attr("text-anchor",e.anchor),D&&I.attr("text-anchor",e.anchor),r.attr("transform",a(j,B)+(d?o(b):""))}),{hoverLabels:eC,commonLabelBoundingBox:Q}}function O(e,t,r,n,a,o){var s,l,c="",u="";void 0!==e.nameOverride&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=i.templateString(e.name,e.trace._meta)),c=N(e.name,e.nameLength));var h=r.charAt(0);void 0!==e.zLabel?(void 0!==e.xLabel&&(u+="x: "+e.xLabel+"
"),void 0!==e.yLabel&&(u+="y: "+e.yLabel+"
"),"choropleth"!==e.trace.type&&"choroplethmap"!==e.trace.type&&(u+=(u?"z: ":"")+e.zLabel)):t&&e[h+"Label"]===a?u=e[("x"===h?"y":"x")+"Label"]||"":void 0===e.xLabel?void 0!==e.yLabel&&"scattercarpet"!==e.trace.type&&(u=e.yLabel):u=void 0===e.yLabel?e.xLabel:"("+e.xLabel+", "+e.yLabel+")",(e.text||0===e.text)&&!Array.isArray(e.text)&&(u+=(u?"
":"")+e.text),void 0!==e.extraText&&(u+=(u?"
":"")+e.extraText),o&&""===u&&!e.hovertemplate&&(""===c&&o.remove(),u=c),null!=(l=null==(s=e.trace)?void 0:s.hoverlabel)&&l.split&&(e.hovertemplate="");let{hovertemplate:d=!1}=e;if(d){let t=e.hovertemplateLabels||e;e[h+"Label"]!==a&&(t[h+"other"]=t[h+"Val"],t[h+"otherLabel"]=t[h+"Label"]),u=(u=i.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:t,locale:n._d3locale,template:d})).replace(z,(t,r)=>(c=N(r,e.nameLength),""))}return[u,c]}function R(e,t){var r=0,i=e.offset;return t&&(i*=-k,r=e.offset*M),{x:r,y:i}}function F(e,r,i,n){var a=function(e){return e*i},o=function(e){return e*n};e.each(function(e){var i=t.select(this);if(e.del)return i.remove();var n,s,c,h,d=i.select("text.nums"),f=e.anchor,p="end"===f?-1:1,m=(c=(s=(n=({start:1,end:-1,middle:0})[e.anchor])*(A+S))+n*(e.txwidth+S),"middle"===e.anchor&&(s-=e.tx2width/2,c+=e.txwidth/2+S),{alignShift:n,textShiftX:s,text2ShiftX:c}),g=R(e,r),y=g.x,v=g.y,x="middle"===f,b=!("hoverlabel"in e.trace)||e.trace.hoverlabel.showarrow;h=x?"M-"+a(e.bx/2+e.tx2width/2)+","+o(v-e.by/2)+"h"+a(e.bx)+"v"+o(e.by)+"h-"+a(e.bx)+"Z":b?"M0,0L"+a(p*A+y)+","+o(A+v)+"v"+o(e.by/2-A)+"h"+a(p*e.bx)+"v-"+o(e.by)+"H"+a(p*A+y)+"V"+o(v-A)+"Z":"M"+a(p*A+y)+","+o(v-e.by/2)+"h"+a(p*e.bx)+"v"+o(e.by)+"h"+a(-p*e.bx)+"Z",i.select("path").attr("d",h);var _=y+m.textShiftX,w=v+e.ty0-e.by/2+S,T=e.textAlign||"auto";"auto"!==T&&("left"===T&&"start"!==f?(d.attr("text-anchor","start"),_=x?-e.bx/2-e.tx2width/2+S:-e.bx-S):"right"===T&&"end"!==f&&(d.attr("text-anchor","end"),_=x?e.bx/2-e.tx2width/2-S:e.bx+S)),d.call(l.positionText,a(_),o(w)),e.tx2width&&(i.select("text.name").call(l.positionText,a(m.text2ShiftX+m.alignShift*S+y),o(v+e.ty0-e.by/2+S)),i.select("rect").call(u.setRect,a(m.text2ShiftX+(m.alignShift-1)*e.tx2width/2+y),o(v-e.by/2-1),a(e.tx2width),o(e.by+2)))})}function j(e,t,r){var i,n,a=r.container,o=r.fullLayout,s=o._size,l=r.event,c=!!t.hLinePoint,d=!!t.vLinePoint;if(a.selectAll(".spikeline").remove(),d||c){var p=h.combine(o.plot_bgcolor,o.paper_bgcolor);if(c){var m,g,y=t.hLinePoint;i=y&&y.xa,"cursor"===(n=y&&y.ya).spikesnap?(m=l.pointerX,g=l.pointerY):(m=i._offset+y.x,g=n._offset+y.y);var v,x,b=1.5>h.wcagContrast(y.color,p)?h.contrast(p):y.color,_=n.spikemode,w=n.spikethickness,T=n.spikecolor||b,M=f.getPxPosition(e,n);if(-1!==_.indexOf("toaxis")||-1!==_.indexOf("across")){if(-1!==_.indexOf("toaxis")&&(v=M,x=m),-1!==_.indexOf("across")){var k=n._counterDomainMin,A=n._counterDomainMax;"free"===n.anchor&&(k=Math.min(k,n.position),A=Math.max(A,n.position)),v=s.l+k*s.w,x=s.l+A*s.w}a.insert("line",":first-child").attr({x1:v,x2:x,y1:g,y2:g,"stroke-width":w,stroke:T,"stroke-dasharray":u.dashStyle(n.spikedash,w)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:v,x2:x,y1:g,y2:g,"stroke-width":w+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==_.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:M+("right"!==n.side?w:-w),cy:g,r:w,fill:T}).classed("spikeline",!0)}if(d){var S,E,C=t.vLinePoint;i=C&&C.xa,n=C&&C.ya,"cursor"===i.spikesnap?(S=l.pointerX,E=l.pointerY):(S=i._offset+C.x,E=n._offset+C.y);var L,P,I=1.5>h.wcagContrast(C.color,p)?h.contrast(p):C.color,z=i.spikemode,D=i.spikethickness,O=i.spikecolor||I,R=f.getPxPosition(e,i);if(-1!==z.indexOf("toaxis")||-1!==z.indexOf("across")){if(-1!==z.indexOf("toaxis")&&(L=R,P=E),-1!==z.indexOf("across")){var F=i._counterDomainMin,j=i._counterDomainMax;"free"===i.anchor&&(F=Math.min(F,i.position),j=Math.max(j,i.position)),L=s.t+(1-j)*s.h,P=s.t+(1-F)*s.h}a.insert("line",":first-child").attr({x1:S,x2:S,y1:L,y2:P,"stroke-width":D,stroke:O,"stroke-dasharray":u.dashStyle(i.spikedash,D)}).classed("spikeline",!0).classed("crisp",!0),a.insert("line",":first-child").attr({x1:S,x2:S,y1:L,y2:P,"stroke-width":D+2,stroke:p}).classed("spikeline",!0).classed("crisp",!0)}-1!==z.indexOf("marker")&&a.insert("circle",":first-child").attr({cx:S,cy:R-("top"!==i.side?D:-D),r:D,fill:O}).classed("spikeline",!0)}}}function B(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function N(e,t){return l.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function U(e,t,r){var i=t[e+"a"],n=t[e+"Val"],a=t.cd[0];if("category"===i.type||"multicategory"===i.type)n=i._categoriesMap[n];else if("date"===i.type){var o=t.trace[e+"periodalignment"];if(o){var s=t.cd[t.index],l=s[e+"Start"];void 0===l&&(l=s[e]);var c=s[e+"End"];void 0===c&&(c=s[e]);var u=c-l;"end"===o?n+=u:"middle"===o&&(n+=u/2)}n=i.d2c(n)}return a&&a.t&&a.t.posLetter===i._id&&("group"===r.boxmode||"group"===r.violinmode)&&(n+=a.t.dPos),n}var V=e=>e.offsetTop+e.clientTop,q=e=>e.offsetLeft+e.clientLeft;function H(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,o=n.top,s=a+n.width,l=o+n.height,c=i.apply3DTransform(r._invTransform)(a,o),u=i.apply3DTransform(r._invTransform)(s,l),h=c[0],d=c[1],f=u[0],p=u[1];return{x:h,y:d,width:f-h,height:p-d,top:Math.min(d,p),left:Math.min(h,f),right:Math.max(h,f),bottom:Math.max(d,p)}}}}),rS=p({"src/components/fx/hoverlabel_defaults.js"(e,t){var r=tv(),i=ee(),n=t6().isUnifiedHover;t.exports=function(e,t,a,o){o=o||{};var s=t.legend;function l(e){o.font[e]||(o.font[e]=s?t.legend.font[e]:t.font[e])}t&&n(t.hovermode)&&(o.font||(o.font={}),l("size"),l("family"),l("color"),l("weight"),l("style"),l("variant"),s?(o.bgcolor||(o.bgcolor=i.combine(t.legend.bgcolor,t.paper_bgcolor)),o.bordercolor||(o.bordercolor=t.legend.bordercolor)):o.bgcolor||(o.bgcolor=t.paper_bgcolor)),a("hoverlabel.bgcolor",o.bgcolor),a("hoverlabel.bordercolor",o.bordercolor),a("hoverlabel.namelength",o.namelength),a("hoverlabel.showarrow",o.showarrow),r.coerceFont(a,"hoverlabel.font",o.font),a("hoverlabel.align",o.align)}}}),rE=p({"src/components/fx/layout_global_defaults.js"(e,t){var r=tv(),i=rS(),n=W();t.exports=function(e,t){i(e,t,function(i,a){return r.coerce(e,t,n,i,a)})}}}),rC=p({"src/components/fx/defaults.js"(e,t){var r=tv(),i=Y(),n=rS();t.exports=function(e,t,a,o){var s=r.extendFlat({},o.hoverlabel);t.hovertemplate&&(s.namelength=-1),n(e,t,function(n,a){return r.coerce(e,t,i,n,a)},s)}}}),rL=p({"src/components/fx/hovermode_defaults.js"(e,t){var r=tv(),i=W();t.exports=function(e,t){function n(n,a){return void 0!==t[n]?t[n]:r.coerce(e,t,i,n,a)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}}}),rP=p({"src/components/fx/layout_defaults.js"(e,t){var r=tv(),i=W(),n=rL(),a=rS();t.exports=function(e,t){function o(n,a){return r.coerce(e,t,i,n,a)}var s=n(e,t);s&&(o("hoverdistance"),o("spikedistance"),-1!==s.indexOf("unified")&&o("hoversort")),"select"===o("dragmode")&&o("selectdirection");var l=t._has("map"),c=t._has("geo"),u=t._basePlotModules.length;"zoom"===t.dragmode&&((l||c)&&1===u||l&&c&&2===u)&&(t.dragmode="pan"),a(e,t,o),r.coerceFont(o,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),rI=p({"src/components/fx/calc.js"(e,t){var r=tv(),i=eQ();function n(e,t,i,n){n=n||r.identity,Array.isArray(e)&&(t[0][i]=n(e))}t.exports=function(e){for(var t=e.calcdata,a=e._fullLayout,o=0;o plotly-logomark "}}}}),rj=p({"src/components/shapes/draw_newshape/constants.js"(e,t){t.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),rB=p({"src/components/selections/helpers.js"(e,t){var r=tv().strTranslate;function i(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}t.exports={p2r:i,r2p:function(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}},axValue:function(e){var t=+("y"===e._id.charAt(0));return function(r){return i(e,r[t])}},getTransform:function(e){return r(e.xaxis._offset,e.yaxis._offset)}}}}),rN=p({"src/components/shapes/draw_newshape/helpers.js"(e){var t=t8(),r=rj(),i=r.CIRCLE_SIDES,n=r.SQRT2,a=rB(),o=a.p2r,s=a.r2p,l=[0,3,4,5,6,1,2],c=[0,3,4,1,2];function u(e,t){return 1e-6>=Math.abs(e-t)}function h(e,t){var r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(r*r+i*i)}e.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",i=0;i0&&ue+ +(void 0!==a[t.charAt(0)].drawn),0)},e.getDataToPixel=function(t,r,i,a,o){var s,l=t._fullLayout._size;if(r)if("domain"===o)s=function(e){return r._length*(a?1-e:e)+r._offset};else{var c=e.shapePositionToRange(r);s=function(e){var t=n(r,i);return r._offset+r.r2p(c(e,!0))+t},"date"===r.type&&(s=e.decodeDate(s))}else s=a?function(e){return l.t+l.h*(1-e)}:function(e){return l.l+l.w*e};return s},e.getPixelToData=function(t,r,i,n){var a,o=t._fullLayout._size;if(r)if("domain"===n)a=function(e){var t=(e-r._offset)/r._length;return i?1-t:t};else{var s=e.rangeToShapePosition(r);a=function(e){return s(r.p2r(e-r._offset))}}else a=i?function(e){return 1-(e-o.t)/o.h}:function(e){return(e-o.l)/o.w};return a},e.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(e);return 1===Math.round(t%2)?r+.5:r},e.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},i=e._fullLayout._plots[r.xref+r.yref];return i?i._hadPlotinfo=!0:(i={},r.xref&&"paper"!==r.xref&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&"paper"!==r.yref&&(i.yaxis=e._fullLayout[r.yref+"axis"])),i.xsizemode=r.xsizemode,i.ysizemode=r.ysizemode,i.xanchor=r.xanchor,i.yanchor=r.yanchor,{options:r,plotinfo:i}},e.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},i=e._fullLayout._plots[r.xref+r.yref];return i?i._hadPlotinfo=!0:(i={},r.xref&&(i.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(i.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:i}},e.getPathString=function(a,o){let s=o.type,l=i.getRefType(o.xref),c=i.getRefType(o.yref),u=a._fullLayout._size;function h(t,r,i,n){var a;if(t)if("domain"===r)a=n?function(e){return t._offset+t._length*(1-e)}:function(e){return t._offset+t._length*e};else{let r=e.shapePositionToRange(t);a=function(e){return t._offset+t.r2p(r(e,!0))},"path"===i&&"date"===t.type&&(a=e.decodeDate(a))}else a=n?function(e){return u.t+u.h*(1-e)}:function(e){return u.l+u.w*e};return a}if("array"===l?(T=[],y=o.xref.map(function(e){return i.getFromId(a,e)}),T=o.xref.map(function(e,t){return h(y[t],i.getRefType(e),s,!1)})):T=h(y=i.getFromId(a,o.xref),l,s,!1),"array"===c?(M=[],v=o.yref.map(function(e){return i.getFromId(a,e)}),M=o.yref.map(function(e,t){return h(v[t],i.getRefType(e),s,!0)})):M=h(v=i.getFromId(a,o.yref),c,s,!0),"path"===s){var d,f,p,m,g;let e,i,n,a,s,l,c;return d=o,f=T,p=M,e=d.path,i=d.xsizemode,n=d.ysizemode,a=d.xanchor,s=d.yanchor,l=Array.isArray(d.xref),c=Array.isArray(d.yref),m=0,g=0,e.replace(t.segmentRE,function(e){var o=0,u=e.charAt(0),h=t.paramIsX[u],d=t.paramIsY[u],y=t.numParams[u];let v=void 0!==h.drawn,x=void 0!==d.drawn,b=l?f[m]:f,_=c?p[g]:p;var w=e.slice(1).replace(t.paramRE,function(e){return h[o]?e="pixel"===i?b(a)+Number(e):b(e):d[o]&&(e="pixel"===n?_(s)-Number(e):_(e)),++o>y&&(e="X"),e});return o>y&&(w=w.replace(/[\s,]*X.*/,""),r.log("Ignoring extra params in segment "+e)),v&&m++,x&&g++,u+w})}if("array"===l)x=n(y[0],o.x0shift),b=n(y[1],o.x1shift),k=T[0](o.x0)+x,A=T[1](o.x1)+b;else if(x=n(y,o.x0shift),b=n(y,o.x1shift),"pixel"===o.xsizemode){let e=T(o.xanchor);k=e+o.x0+x,A=e+o.x1+b}else k=T(o.x0)+x,A=T(o.x1)+b;if("array"===c)_=n(v[0],o.y0shift),w=n(v[1],o.y1shift),S=M[0](o.y0)+_,E=M[1](o.y1)+w;else if(_=n(v,o.y0shift),w=n(v,o.y1shift),"pixel"===o.ysizemode){let e=M(o.yanchor);S=e-o.y0+_,E=e-o.y1+w}else S=M(o.y0)+_,E=M(o.y1)+w;if("line"===s)return"M"+k+","+S+"L"+A+","+E;if("rect"===s)return"M"+k+","+S+"H"+A+"V"+E+"H"+k+"Z";var y,v,x,b,_,w,T,M,k,A,S,E,C=(k+A)/2,L=(S+E)/2,P=Math.abs(C-k),I=Math.abs(L-S),z="A"+P+","+I,D=C+P+","+L;return"M"+D+z+" 0 1,1 "+C+","+(L-I)+z+" 0 0,1 "+D+"Z"},e.getPixelShift=n}}),rG=p({"src/components/shapes/display_labels.js"(e,t){var r=tv(),i=rn(),n=tF(),a=t9(),o=rN().readPaths,s=rH(),l=s.getPathString,c=eY(),u=tR().FROM_TL;t.exports=function(e,t,h,d){if(d.selectAll(".shape-label").remove(),h.label.text||h.label.texttemplate){if(h.label.texttemplate){var f={};if("path"!==h.type){var p=i.getFromId(e,h.xref),m=i.getFromId(e,h.yref);let t=Array.isArray(h.xref),r=Array.isArray(h.yref);for(var g in c){var y="function"==typeof c[g],v=!t||c.simpleXVariables.includes(g),x=!r||c.simpleYVariables.includes(g);if(y&&v&&x){var b=c[g](h,p,m);void 0!==b&&(f[g]=b)}}}_=r.texttemplateStringForShapes({data:[f],fallback:h.label.texttemplatefallback,locale:e._fullLayout._d3locale,template:h.label.texttemplate})}else _=h.label.text;var _,w,T,M,k,A=h.label.font,S=d.append("g").attr({"data-index":t}).classed("shape-label",!0).append("text").attr({"data-notex":1}).classed("shape-label-text",!0).text(_);if(h.path){var E=o(l(e,h),e);w=1/0,M=1/0,T=-1/0,k=-1/0;for(var C=0;Cs.getDataToPixel(e,i,r,!1,n)(t),m=(t,r,i,n)=>s.getDataToPixel(e,i,r,!0,n)(t);if("pixel"===h.xsizemode){let e=p(h.xanchor,void 0,n,c),t=s.getPixelShift(n,h.x0shift),r=s.getPixelShift(n,h.x1shift);w=e+h.x0+t,T=e+h.x1+r}else w=p(h.x0,h.x0shift,n,c),T=p(h.x1,h.x1shift,a,u);if("pixel"===h.ysizemode){let e=m(h.yanchor,void 0,o,d),t=s.getPixelShift(o,h.y0shift),r=s.getPixelShift(o,h.y1shift);M=e-h.y0+t,k=e-h.y1+r}else M=m(h.y0,h.y0shift,o,d),k=m(h.y1,h.y1shift,l,f)}var O=h.label.textangle;"auto"===O&&(O="line"===h.type?function(e,t,r,i){var n;return n=Math.abs(r-e),-180/Math.PI*Math.atan2(r>=e?t-i:i-t,n)}(w,M,T,k):0),S.call(function(t){return t.call(a.font,A).attr({}),n.convertToTspans(t,e),t});var R=function(e,t,r,i,n,a,o){var s,l,c,h,d=n.label.textposition,f=n.label.textangle,p=n.label.padding,m=n.type,g=Math.PI/180*a,y=Math.sin(g),v=Math.cos(g),x=n.label.xanchor,b=n.label.yanchor;if("line"===m){"start"===d?(s=e,l=t):"end"===d?(s=r,l=i):(s=(e+r)/2,l=(t+i)/2),"auto"===x&&(x="start"===d?"auto"===f?r>e?"left":re?"right":re?"right":re?"left":r1&&(2!==e.length||"Z"!==e[1][0])&&(0===S&&(e[0][0]="M"),t[A]=e,L(),P())}}()}}function U(e,r){(function(e,r){if(t.length)for(var i=0;iS?(L=T,D="y0",P=S,O="y1"):(L=S,D="y1",P=T,O="y0"),eo(r),ec(c,o),i=t,n=o,s=e,l=n.xref,u=n.yref,d=a.getFromId(s,l),f=a.getFromId(s,u),p="","paper"===l||d.autorange||(p+=l),"paper"===u||f.autorange||(p+=u),h.setClipUrl(i,p?"clip"+s._fullLayout._uid+p:null,s),ea.moveFn="move"===B?es:el,ea.altKey=r.altKey)},doneFn:function(){b(e)||(m(t),eu(c),M(t,e,o),i.call("_guiRelayout",e,u.getUpdateObj()))},clickFn:function(){b(e)||eu(c)}};function eo(r){if(b(e)){B=null;return}if(V)B="path"===r.target.tagName?"move":"start-point"===r.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var i=ea.element.getBoundingClientRect(),n=i.right-i.left,a=i.bottom-i.top,o=r.clientX-i.left,s=r.clientY-i.top,l=!q&&n>10&&a>10&&!r.shiftKey?f.getCursor(o/n,1-s/a):"move";m(t,l),B=l.split("-")[0]}}function es(r,i){if("path"===o.type){var n=function(e){return e},a=n,u=n;N?H("xanchor",o.xanchor=er(E+r)):(a=function(e){return er(ee(e)+r)},W&&"date"===W.type&&(a=y.encodeDate(a))),U?H("yanchor",o.yanchor=ei(C+i)):(u=function(e){return ei(et(e)+i)},Z&&"date"===Z.type&&(u=y.encodeDate(u))),H("path",o.path=k(j,a,u))}else N?H("xanchor",o.xanchor=er(E+r)):(H("x0",o.x0=er(w+r)),H("x1",o.x1=er(A+r))),U?H("yanchor",o.yanchor=ei(C+i)):(H("y0",o.y0=ei(T+i)),H("y1",o.y1=ei(S+i)));t.attr("d",v(e,o)),ec(c,o),l(e,s,o,G)}function el(r,i){if(q){var n=function(e){return e},a=n,u=n;N?H("xanchor",o.xanchor=er(E+r)):(a=function(e){return er(ee(e)+r)},W&&"date"===W.type&&(a=y.encodeDate(a))),U?H("yanchor",o.yanchor=ei(C+i)):(u=function(e){return ei(et(e)+i)},Z&&"date"===Z.type&&(u=y.encodeDate(u))),H("path",o.path=k(j,a,u))}else if(V){if("resize-over-start-point"===B){var h=w+r,d=U?T-i:T+i;H("x0",o.x0=N?h:er(h)),H("y0",o.y0=U?d:ei(d))}else if("resize-over-end-point"===B){var f=A+r,p=U?S-i:S+i;H("x1",o.x1=N?f:er(f)),H("y1",o.y1=U?p:ei(p))}}else{var m=function(e){return -1!==B.indexOf(e)},g=m("n"),x=m("s"),b=m("w"),_=m("e"),M=g?L+i:L,Y=x?P+i:P,$=b?I+r:I,X=_?z+r:z;U&&(g&&(M=L-i),x&&(Y=P-i)),(!U&&Y-M>10||U&&M-Y>10)&&(H(D,o[D]=U?M:ei(M)),H(O,o[O]=U?Y:ei(Y))),X-$>10&&(H(R,o[R]=N?$:er($)),H(F,o[F]=N?X:er(X)))}t.attr("d",v(e,o)),ec(c,o),l(e,s,o,G)}function ec(e,t){(N||U)&&function(){var r="path"!==t.type,i=e.selectAll(".visual-cue").data([0]);i.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var a=ee(N?t.xanchor:n.midRange(r?[t.x0,t.x1]:y.extractPathCoords(t.path,g.paramIsX))),o=et(U?t.yanchor:n.midRange(r?[t.y0,t.y1]:y.extractPathCoords(t.path,g.paramIsY)));if(a=y.roundPositionForSharpStrokeRendering(a,1),o=y.roundPositionForSharpStrokeRendering(o,1),N&&U){var s="M"+(a-1-1)+","+(o-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";i.attr("d",s)}else if(N){var l="M"+(a-1-1)+","+(o-9-1)+"v18 h2 v-18 Z";i.attr("d",l)}else{var c="M"+(a-9-1)+","+(o-1-1)+"h18 v2 h-18 Z";i.attr("d",c)}}()}function eu(e){e.selectAll(".visual-cue").remove()}f.init(ea),en.node().onmousemove=eo}(e,j,w,t,c,S):!0===w.editable&&j.style("pointer-events",O||u.opacity(P)*L<=.5?"stroke":"all");j.node().addEventListener("click",function(){var t=e,r=j;if(_(t)){var i=+r.node().getAttribute("data-index");if(i>=0){if(i===t._fullLayout._activeShapeIndex)return void A(t);t._fullLayout._activeShapeIndex=i,t._fullLayout._deactivateShape=A,x(t)}}}),function(e,t,r){if(!r?.id)return;let i=t.node();function n(e){var t;let i=r.mainplotinfo||r,n=null==(t=i?.draglayer)?void 0:t.select(".nsewdrag").node();return n?{clientX:e.clientX,clientY:e.clientY,target:n}:null}i.addEventListener("mousemove",t=>{if(!e._dragging&&e._fullLayout.hoveranywhere){let i=n(t);i&&p.hover(e,i,r.id)}}),i.addEventListener("click",t=>{if(!e._dragged&&e._fullLayout.clickanywhere){let i=n(t);i&&p.click(e,i,r.id)}})}(e,j,T)}("above"===w.layer?e._fullLayout._shapeUpperLayer:w.xref.includes("paper")||w.yref.includes("paper")?e._fullLayout._shapeLowerLayer:"between"!==w.layer||S?T._hadPlotinfo?(T.mainplotinfo||T).shapelayer:e._fullLayout._shapeLowerLayer:T.shapelayerBetween)}function M(e,t,r){let i=r.xref,o=r.yref;if(Array.isArray(i)||Array.isArray(o)){let s="clip"+t._fullLayout._uid+"shape"+r._index,l=function(e,t,r){let i=e._fullLayout._size;function n(t,r){let n=(Array.isArray(t)?t:[t]).map(t=>a.getFromId(e,t)).filter(Boolean);return n.length?[Math.min(...n.map(function(e){return e._offset})),Math.max(...n.map(function(e){return e._offset+e._length}))]:r?[i.t,i.t+i.h]:[i.l,i.l+i.w]}let o=n(t,!1),s=n(r,!0);return{x:o[0],y:s[0],width:o[1]-o[0],height:s[1]-s[0]}}(t,i,o);n.ensureSingleById(t._fullLayout._clips,"clipPath",s,function(e){e.append("rect")}).select("rect").attr(l),h.setClipUrl(e,s,t)}else{let r=(i+o).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");h.setClipUrl(e,r?"clip"+t._fullLayout._uid+r:null,t)}}function k(e,t,r){return e.replace(g.segmentRE,function(e){var i=0,n=e.charAt(0),a=g.paramIsX[n],o=g.paramIsY[n],s=g.numParams[n];return n+e.slice(1).replace(g.paramRE,function(e){return i>=s||(a[i]?e=t(e):o[i]&&(e=r(e)),i++),e})})}function A(e){_(e)&&e._fullLayout._activeShapeIndex>=0&&(c(e),delete e._fullLayout._activeShapeIndex,x(e))}t.exports={draw:x,drawOne:w,eraseActiveShape:function(e){if(_(e)){c(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{let o=r.select(e._fullLayout._paperdiv.node());o.selectAll(".plotly-cloud-dialog").remove();let s=o.append("div").classed("plotly-cloud-dialog",!0),l=()=>{s.remove(),document.removeEventListener("keydown",c)},c=e=>{("Escape"===e.key||27===e.keyCode)&&l()};document.addEventListener("keydown",c),s.on("click",()=>{r.event.target===s.node()&&l()}),((e,t,r,a,o)=>{let s=n(e),l=t.append("div").classed("plotly-cloud-dialog-box",!0);if(l.append("div").classed("plotly-cloud-dialog-title",!0).text(s.DIALOG_TITLE),r===i.plotlyServerURL){let e=l.append("div").classed("plotly-cloud-dialog-message",!0),t=new URL(r).origin,i=s.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),n=i[0],a=i[2],o=i[4];e.append("span").text(n),e.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",t).attr("target","_blank").text(a),e.append("span").text(o),e.append("div").classed("plotly-cloud-dialog-message--account",!0).text(s.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let e=new URL(r),t=e.hostname,i=e.origin,n=s.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),a=n[0],o=n[4],c=l.append("div").classed("plotly-cloud-dialog-message",!0);c.append("span").text(a),c.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",i).attr("target","_blank").text(t),c.append("span").text(o)}let c=l.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(s.DIALOG_CANCEL).on("click",o),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(s.DIALOG_CONFIRM).on("click",a)})(e,s,t,()=>{l(),a()},l)}}}),rX=p({"src/components/modebar/buttons.js"(e,t){var r=eQ(),i=tD(),n=tC(),a=rF(),o=rY().eraseActiveShape,s=r$(),l=tv(),c=l._,u=t.exports={};function h(e,t){var i,a,o=t.currentTarget,s=o.getAttribute("data-attr"),l=o.getAttribute("data-val")||!0,c=e._fullLayout,u={},h=n.list(e,null,!0),d=c._cartesianSpikesEnabled;if("zoom"===s){var f,p="in"===l?.5:2,m=(1+p)/2,g=(1-p)/2;for(a=0;a-e),[h,d]=a.invert(l.midPt),{minscale:f}=n.projection,p=null!=(i=n.projection.maxscale)?i:1/0,m=Math.min(f,p),g=Math.max(f,p),y="in"===o?2*s:.5*s;y>g?y=g:yr0});var rQ,r0,r1=f({"src/components/modebar/attributes.ts"(){rQ=y(rK()),r0={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:"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`."},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:`Determines which predefined modebar buttons to add. Please note that these buttons will only be shown if they are compatible with all trace types used in a graph. Similar to \`config.modeBarButtonsToAdd\` option. This may include *${rQ.default.backButtons.join("*, *")}*.`},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:`Determines which predefined modebar buttons to remove. Similar to \`config.modeBarButtonsToRemove\` option. This may include *${rQ.default.foreButtons.join("*, *")}*.`}}}}),r2=p({"src/components/modebar/defaults.js"(e,t){var r=tv(),i=ee(),n=tS(),a=(r1(),v(rJ)).default;t.exports=function(e,t){var o=e.modebar||{},s=n.newContainer(t,"modebar");function l(e,t){return r.coerce(o,s,a,e,t)}l("orientation"),l("bgcolor",i.addOpacity(t.paper_bgcolor,.5));var c=i.contrast(i.rgb(t.modebar.bgcolor));l("color",i.addOpacity(c,.3)),l("activecolor",i.addOpacity(c,.7)),l("uirevision",t.uirevision),l("add"),l("remove")}}}),r3=p({"src/components/modebar/modebar.js"(e,t){var r=T(),i=C(),n=tv(),a=rF(),o=_().version,s=new DOMParser;function l(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var c=l.prototype;c.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,i=this.graphInfo._fullLayout,a="modebar-"+i._uid;this.element.setAttribute("id",a),this.element.setAttribute("role","toolbar"),this._uid=a,this.element.className="modebar modebar--custom","hover"===r.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===i.modebar.orientation&&(this.element.className+=" vertical",t=t.reverse());var o=i.modebar;document.querySelectorAll("#"+a+" .modebar-group").forEach(function(e){e.style.backgroundColor=o.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,c=this.locale!==r.locale;if(this.locale=r.locale,(s||l||c)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var u=this.getLogo();r.watermark&&(u.className=u.className+" watermark"),"v"===i.modebar.orientation?this.element.insertBefore(u,this.element.childNodes[0]):this.element.appendChild(u),this.hasLogo=!0}this.updateActiveButton(),n.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+o.activecolor,"fill: "+o.color,this.element)},c.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(e){var r=t.createGroup();e.forEach(function(e){var i=e.name;if(!i)throw Error("must provide button 'name' in button config");if(-1!==t.buttonsNames.indexOf(i))throw Error("button name '"+i+"' is taken");t.buttonsNames.push(i);var n=t.createButton(e);t.buttonElements.push(n),r.appendChild(n)}),t.element.appendChild(r)})},c.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e},c.createButton=function(e){var t=this,i=document.createElement("button");i.setAttribute("type","button"),i.setAttribute("rel","tooltip"),i.className="modebar-btn";var n=e.title;void 0===n?n=e.name:"function"==typeof n&&(n=n(this.graphInfo)),(n||0===n)&&(i.setAttribute("data-title",n),i.setAttribute("aria-label",n)),void 0!==e.attr&&i.setAttribute("data-attr",e.attr);var o=e.val;if(void 0!==o&&("function"==typeof o&&(o=o(this.graphInfo)),i.setAttribute("data-val",o)),"function"!=typeof e.click)throw Error("must provide button 'click' function in button config");i.addEventListener("click",function(r){e.click(t.graphInfo,r),t.updateActiveButton(r.currentTarget)}),i.setAttribute("data-toggle",e.toggle||!1),e.toggle&&r.select(i).classed("active",!0);var s=e.icon;return"function"==typeof s?i.appendChild(s()):i.appendChild(this.createIcon(s||a.question)),i.setAttribute("data-gravity",e.gravity||"n"),i},c.createIcon=function(e){var t,r=i(e.height)?Number(e.height):e.ascent-e.descent,n="http://www.w3.org/2000/svg";if(e.path){(t=document.createElementNS(n,"svg")).setAttribute("viewBox",["0 0",e.width,r].join(" ")),t.setAttribute("class","icon");var a=document.createElementNS(n,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):void 0!==e.ascent&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),t.appendChild(a)}return e.svg&&(t=s.parseFromString(e.svg,"application/xml").childNodes[0]),t.setAttribute("height","1em"),t.setAttribute("width","1em"),t},c.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,i=void 0!==e?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(e){var a=e.getAttribute("data-val")||!0,o=e.getAttribute("data-attr"),s="true"===e.getAttribute("data-toggle"),l=r.select(e),c=function(e,r){var i=t.modebar,n=e.querySelector(".icon path");n&&(r||e.matches(":hover")?n.style.fill=i.activecolor:n.style.fill=i.color)};if(s){if(o===i){var u=!l.classed("active");l.classed("active",u),c(e,u)}}else{var h=null===o?o:n.nestedProperty(t,o).get();l.classed("active",h===a),c(e,h===a)}})},c.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r1?(P=["toggleHover"],I=["resetViews"]):y?(L=["zoomInGeo","zoomOutGeo"],P=["hoverClosestGeo"],I=["resetGeo"]):g?(P=["hoverClosest3d"],I=["resetCameraDefault3d","resetCameraLastSave3d"]):_?(L=["zoomInMap","zoomOutMap"],P=["toggleHover"],I=["resetViewMap"]):v?P=["hoverClosestPie"]:M?(P=["hoverClosestCartesian","hoverCompareCartesian"],I=["resetViewSankey"]):P=["toggleHover"],m&&P.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(function(e){for(var t=0;ti?n.slice(i):a.slice(r))+o:n+a+e*t:o}function f(e,t){var r=e._inputDomain,i=l[e.constraintoward],n=r[0]+(r[1]-r[0])*i;e.domain=e._input.domain=[n+(r[0]-n)/t,n+(r[1]-n)/t],e.setScale()}e.handleDefaults=function(e,r,a){var s,l,d,f,p,m,g,y,v=a.axIds,x=a.axHasImage,b=r._axisConstraintGroups=[],_=r._axisMatchGroups=[];for(s=0;ss*v&&!w)){for(n=0;nI&&RL&&(L=R);d/=(L-C)/(2*P),C=c.l2r(C),L=c.l2r(L),c.range=c._input.range=A=e[1]||n[1]<=e[0])&&a[0]t[0])return!0}return!1}(V,q,N)&&-1===S.indexOf(v)){var G=H.node(),W=E.bg=n.ensureSingle(H,"rect","bg");G.insertBefore(W.node(),G.childNodes[0]),B.push(S)}else H.select("rect.bg").remove(),N.push([V,q]),U||(j.push(S),B.push(S))}var Y=I._bgLayer.selectAll(".bg").data(j);for(Y.enter().append("rect").classed("bg",!0),Y.exit().remove(),Y.each(function(e){I._plots[e].bg=t.select(this)}),A=0;A.5?"t":"b",l=e._fullLayout.margin[s],c=0;return"paper"===t.yref?c=r+t.pad.t+t.pad.b:"container"===t.yref&&(i=e._fullLayout.height,n=0,"middle"===o&&(n+=r/2),"t"===s?("top"===o&&(n+=r),n+=i-a*i):("bottom"===o&&(n+=r),n+=a*i),c=n+t.pad.t+t.pad.b),c>l?c:0}(e,T,P);if(I>0){(function(e,t,r,a){var o,s,l="title.automargin",c=e._fullLayout.title,u=c.y>.5?"t":"b",h={x:c.x,y:c.y,t:0,b:0},d={};"paper"===c.yref&&(o="paper"===c.yref?e._fullLayout._size.h:e._fullLayout.height,s=n.isTopAnchor(c)?t:t-a,!(n.isTopAnchor(c)&&"t"===u||n.isBottomAnchor(c)&&"b"===u)&&("b"===u?o-s:s)=0;T--){var M=n.append("path").attr(m).style("opacity",T?.1:g).call(a.stroke,v).call(a.fill,y).call(o.dashLine,T?"solid":b,T?4+x:x);if(function(e,t,r){var i=r.xref+r.yref;o.setClipUrl(e,"clip"+t._fullLayout._uid+i,t)}(M,e,d),_){var k=s(e.layout,"selections",d);M.style({cursor:"move"});var A={element:M.node(),plotinfo:p,gd:e,editHelpers:k,isActiveSelection:!0};i(r(l,e),M,A)}else M.style("pointer-events",T?"all":"none");w[T]=M}var S=w[0];w[1].node().addEventListener("click",function(){var t=e,r=S;if(h(t)){var i=+r.node().getAttribute("data-index");if(i>=0){if(i===t._fullLayout._activeSelectionIndex)return void f(t);t._fullLayout._activeSelectionIndex=i,t._fullLayout._deactivateSelection=f,u(t)}}})}(e._fullLayout._selectionLayer)}function f(e){h(e)&&e._fullLayout._activeSelectionIndex>=0&&(n(e),delete e._fullLayout._activeSelectionIndex,u(e))}t.exports={draw:u,drawOne:d,activateLastSelection:function(e){if(h(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=f,u(e)}}}}}),ie=p({"node_modules/polybooljs/lib/build-log.js"(e,t){t.exports=function(){var e,t=0,r=!1;function i(t,r){return e.list.push({type:t,data:r?JSON.parse(JSON.stringify(r)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(e,t){return i("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return i("div_seg",{seg:e,pt:t}),i("chop",{seg:e,pt:t})},statusRemove:function(e){return i("pop_seg",{seg:e})},segmentUpdate:function(e){return i("seg_update",{seg:e})},segmentNew:function(e,t){return i("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return i("rem_seg",{seg:e})},tempStatus:function(e,t,r){return i("temp_status",{seg:e,above:t,below:r})},rewind:function(e){return i("rewind",{seg:e})},status:function(e,t,r){return i("status",{seg:e,above:t,below:r})},vert:function(t){return t===r?e:(r=t,i("vert",{x:t}))},log:function(e){return"string"!=typeof e&&(e=JSON.stringify(e,!1," ")),i("log",{txt:e})},reset:function(){return i("reset")},selected:function(e){return i("selected",{segs:e})},chainStart:function(e){return i("chain_start",{seg:e})},chainRemoveHead:function(e,t){return i("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return i("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return i("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return i("chain_match",{index:e})},chainClose:function(e){return i("chain_close",{index:e})},chainAddHead:function(e,t){return i("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return i("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return i("chain_con",{index1:e,index2:t})},chainReverse:function(e){return i("chain_rev",{index:e})},chainJoin:function(e,t){return i("chain_join",{index1:e,index2:t})},done:function(){return i("done")}}}}}),it=p({"node_modules/polybooljs/lib/epsilon.js"(e,t){t.exports=function(e){"number"!=typeof e&&(e=1e-10);var t={epsilon:function(t){return"number"==typeof t&&(e=t),e},pointAboveOrOnLine:function(t,r,i){var n=r[0],a=r[1],o=i[0],s=i[1],l=t[0];return(o-n)*(t[1]-a)-(s-a)*(l-n)>=-e},pointBetween:function(t,r,i){var n=t[1]-r[1],a=i[0]-r[0],o=t[0]-r[0],s=i[1]-r[1],l=o*a+n*s;return!(l-e)},pointsSameX:function(t,r){return Math.abs(t[0]-r[0])e!=o-n>e&&(a-c)*(n-u)/(o-u)+c-i>e&&(s=!s),a=c,o=u}return s}};return t}}}),ir=p({"node_modules/polybooljs/lib/linked-list.js"(e,t){t.exports={create:function(){var e={root:{root:!0,next:null},exists:function(t){return null!==t&&t!==e.root},isEmpty:function(){return null===e.root.next},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var i=e.root,n=e.root.next;null!==n;){if(r(n)){t.prev=n.prev,t.next=n,n.prev.next=t,n.prev=t;return}i=n,n=n.next}i.next=t,t.prev=i,t.next=null},findTransition:function(t){for(var r=e.root,i=e.root.next;null!==i&&!t(i);)r=i,i=i.next;return{before:r===e.root?null:r,after:i,insert:function(e){return e.prev=r,e.next=i,r.next=e,null!==i&&(i.prev=e),e}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}}}}),ii=p({"node_modules/polybooljs/lib/intersecter.js"(e,t){var r=ir();t.exports=function(e,t,i){function n(e,t,r){return{id:i?i.segmentId():-1,start:e,end:t,myFill:{above:r.myFill.above,below:r.myFill.below},otherFill:null}}var a=r.create();function o(e,r){a.insertBefore(e,function(i){var n,a,o,s,l,c;return n=e.isStart,a=e.pt,o=i.isStart,s=i.pt,l=i.other.pt,(0!==(c=t.pointsCompare(a,s))?c:t.pointsSame(r,l)?0:n!==o?n?1:-1:t.pointAboveOrOnLine(r,o?s:l,o?l:s)?1:-1)<0})}function s(e,t){var i,n,a=(o(i=r.node({isStart:!0,pt:e.start,seg:e,primary:t,other:null,status:null}),e.end),i);return n=r.node({isStart:!1,pt:e.end,seg:e,primary:t,other:a,status:null}),a.other=n,o(n,a.pt),a}function l(e,t){var r=n(t,e.seg.end,e.seg);return i&&i.segmentChop(e.seg,t),e.other.remove(),e.seg.end=t,e.other.pt=t,o(e.other,e.pt),s(r,e.primary)}function c(n,o){var s=r.create();function c(e,r){var n=e.seg,a=r.seg,o=n.start,s=n.end,c=a.start,u=a.end;i&&i.checkIntersection(n,a);var h=t.linesIntersect(o,s,c,u);if(!1===h){if(!t.pointsCollinear(o,s,c)||t.pointsSame(o,u)||t.pointsSame(s,c))return!1;var d=t.pointsSame(o,c),f=t.pointsSame(s,u);if(d&&f)return r;var p=!d&&t.pointBetween(o,c,u),m=!f&&t.pointBetween(s,c,u);if(d)return m?l(r,s):l(e,u),r;p&&(f||(m?l(r,s):l(e,u)),l(r,o))}else 0===h.alongA&&(-1===h.alongB?l(e,c):0===h.alongB?l(e,h.pt):1===h.alongB&&l(e,u)),0===h.alongB&&(-1===h.alongA?l(r,o):0===h.alongA?l(r,h.pt):1===h.alongA&&l(r,s));return!1}for(var u=[];!a.isEmpty();){var h=a.getHead();if(i&&i.vert(h.pt[0]),h.isStart){i&&i.segmentNew(h.seg,h.primary);var d,f,p=function(e){return s.findTransition(function(r){var i,n,a,o,s;return i=r.ev,n=e.seg.start,a=e.seg.end,o=i.seg.start,s=i.seg.end,(t.pointsCollinear(n,o,s)?t.pointsCollinear(a,o,s)||t.pointAboveOrOnLine(a,o,s)?1:-1:t.pointAboveOrOnLine(n,o,s)?1:-1)>0})}(h),m=p.before?p.before.ev:null,g=p.after?p.after.ev:null;i&&i.tempStatus(h.seg,!!m&&m.seg,!!g&&g.seg);var y=function(){if(m){var e=c(h,m);if(e)return e}return!!g&&c(h,g)}();if(y&&(e?(d=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below)&&(y.seg.myFill.above=!y.seg.myFill.above):y.seg.otherFill=h.seg.myFill,i&&i.segmentUpdate(y.seg),h.other.remove(),h.remove()),a.getHead()!==h){i&&i.rewind(h.seg);continue}e?(d=null===h.seg.myFill.below||h.seg.myFill.above!==h.seg.myFill.below,g?h.seg.myFill.below=g.seg.myFill.above:h.seg.myFill.below=n,d?h.seg.myFill.above=!h.seg.myFill.below:h.seg.myFill.above=h.seg.myFill.below):null===h.seg.otherFill&&(f=g?h.primary===g.primary?g.seg.otherFill.above:g.seg.myFill.above:h.primary?o:n,h.seg.otherFill={above:f,below:f}),i&&i.status(h.seg,!!m&&m.seg,!!g&&g.seg),h.other.status=p.insert(r.node({ev:h}))}else{var v=h.status;if(null===v)throw Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(s.exists(v.prev)&&s.exists(v.next)&&c(v.prev.ev,v.next.ev),i&&i.statusRemove(v.ev.seg),v.remove(),!h.primary){var x=h.seg.myFill;h.seg.myFill=h.seg.otherFill,h.seg.otherFill=x}u.push(h.seg)}a.getHead().remove()}return i&&i.done(),u}return e?{addRegion:function(e){for(var r,n=e[e.length-1],a=0;aa!=f>a&&n<(d-u)*(a-h)/(f-h)+u&&(o=!o)}return o}}}),iu=p({"src/lib/polygon.js"(e,t){var r=eN().dot,i=L().BADNUM,n=t.exports={};n.tester=function(e){var t,r=e.slice(),n=r[0][0],a=n,o=r[0][1],s=o;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),t=1;ta||c===i||cs||t&&l(e))}:function(e,t){var l=e[0],c=e[1];if(l===i||la||c===i||cs)return!1;var u,h,d,f,p,m=r.length,g=r[0][0],y=r[0][1],v=0;for(u=1;uMath.max(h,g)||c>Math.max(d,y)))if(cu||Math.abs(r(o,d))>n)return!0;return!1},n.filter=function(e,t){var r=[e[0]],i=0,a=0;function o(o){e.push(o);var s=r.length,l=i;r.splice(a+1);for(var c=l+1;c1&&o(e.pop()),{addPt:o,raw:e,filtered:r}}}}),ih=p({"src/components/selections/constants.js"(e,t){t.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),id=p({"src/components/selections/select.js"(e,t){var r=il(),i=ic(),n=eQ(),a=t9().dashStyle,o=ee(),s=rD(),l=t6().makeEventData,c=rO(),u=c.freeMode,h=c.rectMode,d=c.drawMode,f=c.openMode,p=c.selectMode,m=rH(),g=rq(),y=rW(),v=tL().clearOutline,x=rN(),b=x.handleEllipse,_=x.readPaths,w=rU().newShapes,T=rV(),M=r9().activateLastSelection,k=tv(),A=k.sorterAsc,S=iu(),E=tt(),C=tC().getFromId,L=rR(),P=r7().redrawReglTraces,I=ih(),z=I.MINSELECT,D=S.filter,O=S.tester,R=rB(),F=R.p2r,j=R.axValue,B=R.getTransform;function N(e){return void 0!==e.subplot}function U(e,t,r,i,n,a,o){var s,l,c,u,h,d,p,m,g,v=t._hoverdata,x=t._fullLayout.clickmode.indexOf("event")>-1,b=[];if((_=v)&&Array.isArray(_)&&!0!==_[0].hoverOnBox){H(e,t,a);var _,w,T=function(e,t){var r,i,n=e[0],a=-1,o=[];for(i=0;i0?function(e,t){var r,i,n,a=[];for(n=0;n0&&a.push(r);if(1===a.length&&a[0]===t.searchInfo&&(i=t.searchInfo.cd[0].trace).selectedpoints.length===t.pointNumbers.length){for(n=0;ni.selectedpoints.indexOf(t.pointNumbers[n]))return!1;return!0}return!1}(s,T):function(e){var t,r,i=0;for(r=0;r1||(i+=t.selectedpoints.length)>1))return!1;return 1===i}(s)&&(d=$(T))){for(o&&o.remove(),g=0;g=0&&a._fullLayout._deactivateShape(a),a._fullLayout._activeSelectionIndex>=0&&a._fullLayout._deactivateSelection(a);var o=a._fullLayout._zoomlayer,s=d(r),l=p(r);if(s||l){var c,u,h=o.selectAll(".select-outline-"+i.id);h&&a._fullLayout._outlining&&(s&&(c=w(h,e)),c&&n.call("_guiRelayout",a,{shapes:c}),l&&!N(e)&&(u=T(h,e)),u&&(a._fullLayout._noEmitSelectedAtStart=!0,n.call("_guiRelayout",a,{selections:u}).then(function(){t&&M(a)})),a._fullLayout._outlining=!1)}i.selection={},i.selection.selectionDefs=e.selectionDefs=[],i.selection.mergedPolygons=e.mergedPolygons=[]}function W(e){return e._id}function Y(e,t,r,i){if(!e.calcdata)return[];var n,a,o,s=[],l=t.map(W),c=r.map(W);for(o=0;o0?i[0]:r;return!!t.selectedpoints&&t.selectedpoints.indexOf(n)>-1}function X(e,t,r){var i,a;for(i=0;i-1&&t;if(!a&&t){var ep=en(e,!0);if(ep.length){var em=ep[0].xref,eg=ep[0].yref;if(em&&eg){var ey=es(ep);el([C(e,em,"x"),C(e,eg,"y")])(ed,ey)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:ef&&ec(e,ed),f._reselect=!1}if(!a&&f._deselect){var ev=f._deselect;(function(e,t,r){for(var i=0;i=0)return void S._fullLayout._deactivateShape(S);if(!_){var r=C.clickmode;E.done(eE).then(function(){if(E.clear(eE),2===e){for(ew.remove(),ea=0;ea-1&&U(t,S,i.xaxes,i.yaxes,i.subplot,i,ew),"event"===r&&ec(S,void 0);s.click(S,t,F.id)}).catch(k.error)}},i.doneFn=function(){eA.remove(),E.done(eE).then(function(){E.clear(eE),!L&&en&&i.selectionDefs&&(en.subtract=e_,i.selectionDefs.push(en),i.mergedPolygons.length=0,[].push.apply(i.mergedPolygons,ee)),(L||_)&&G(i,L),i.doneFnCompleted&&i.doneFnCompleted(eC),w&&ec(S,eh)}).catch(k.error)}},clearOutline:v,clearSelectionsCache:G,selectOnClick:U}}}),ip=p({"src/components/annotations/arrow_paths.js"(e,t){t.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}]}}),im=p({"src/constants/axis_placeable_objects.js"(e,t){t.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by *domain* (separated by a space), the position behaves like for *paper*, but refers to the distance in fractions of the domain length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e,"axis and a",e,"position of 0.5 refers to the point between the",t,"and the",r,"of the domain of the second",e,"axis."].join(" ")}}}}),ig=p({"src/components/annotations/attributes.js"(e,t){var r=ip(),i=H(),n=tE(),a=tS().templatedArray;im(),t.exports=a("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:r.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:r.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",n.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",n.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",n.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",n.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"})}}),iy=p({"src/traces/scatter/constants.js"(e,t){t.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}}}),iv=p({"src/traces/scatter/fillcolor_attribute.js"(e,t){t.exports=function(e){return{valType:"color",editType:"style",anim:!0}}}}),ix=p({"src/traces/scatter/attributes.js"(e,t){var r=tB().axisHoverFormat,{hovertemplateAttrs:i,texttemplateAttrs:n,templatefallbackAttrs:a}=eW(),o=tV(),s=H(),l=eH().dash,c=eH().pattern,u=t9(),h=iy(),d=q().extendFlat,f=iv();function p(e){return{valType:"any",dflt:0,editType:"calc"}}function m(e){return{valType:"any",editType:"calc"}}function g(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:p("x"),yperiod:p("y"),xperiod0:m("x0"),yperiod0:m("y0"),xperiodalignment:g("x"),yperiodalignment:g("y"),xhoverformat:r("x"),yhoverformat:r("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:n(),texttemplatefallback:a({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:i({},{keys:h.eventDataKeys}),hovertemplatefallback:a(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:d({},l,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:f(!0),fillgradient:d({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:c,marker:d({symbol:{valType:"enumerated",values:u.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:d({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:d({},l,{arrayOk:!0}),editType:"calc"},o("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},o("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:s({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}}}),ib=p({"src/components/selections/attributes.js"(e,t){var r=ig(),i=ix().line,n=eH().dash,a=q().extendFlat,o=eq().overrideAll,s=tS().templatedArray;im(),t.exports=o(s("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:a({},r.xref,{}),yref:a({},r.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:i.color,width:a({},i.width,{min:1,dflt:1}),dash:a({},n,{dflt:"dot"})}}),"arraydraw","from-root")}}),i_=p({"src/components/selections/defaults.js"(e,t){var r=tv(),i=rn(),n=t$(),a=ib(),o=rH();function s(e,t,n){function s(i,n){return r.coerce(e,t,a,i,n)}var l=s("path"),c="path"!==s("type",l?"path":"rect");c&&delete t.path,s("opacity"),s("line.color"),s("line.width"),s("line.dash");for(var u=["x","y"],h=0;h<2;h++){var d,f,p,m=u[h],g={_fullLayout:n},y=i.coerceRef(e,t,g,m);if((d=i.getFromId(g,y))._selectionIndices.push(t._index),p=o.rangeToShapePosition(d),f=o.shapePositionToRange(d),c){var v=m+"0",x=m+"1",b=e[v],_=e[x];e[v]=f(e[v],!0),e[x]=f(e[x],!0),i.coercePosition(t,g,s,y,v),i.coercePosition(t,g,s,y,x);var w=t[v],T=t[x];void 0!==w&&void 0!==T&&(t[v]=p(w),t[x]=p(T),e[v]=b,e[x]=_)}}c&&r.noneOrAll(e,t,["x0","x1","y0","y1"])}t.exports=function(e,t){n(e,t,{name:"selections",handleItemDefaults:s});for(var r=t.selections,i=0;i.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",s(r,i)).attr("d",n+"Z")}function j(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:c.background,stroke:c.defaultLine,"stroke-width":1,opacity:0}).attr("transform",s(t,r)).attr("d","M0,0Z")}function B(e,t,r,i,n,a){e.attr("d",i+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),N(e,t,n,a)}function N(e,t,r,i){r||(e.transition().style("fill",i>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function U(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function V(e){P&&e.data&&e._context.showTips&&(i.notifier(i._(e,"Double-click to zoom back out"),"long",e),P=!1)}function q(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,L)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function H(e,t,r,n,a){for(var o,s,l,c,u=!1,h={},d={},f=(a||{}).xaHash,p=(a||{}).yaHash,m=0;m=0)return void s._fullLayout._deactivateShape(s);var c=s._fullLayout.clickmode;if(U(s),2!==i||eC||function(){if(!e._transitioningWithDuration){var t=e._context.doubleClick,r=[];eg&&(r=r.concat(el)),ey&&(r=r.concat(ec)),em.xaxes&&(r=r.concat(em.xaxes)),em.yaxes&&(r=r.concat(em.yaxes));var i,n,a={};if("reset+autosize"===t)for(t="autosize",n=0;n-1&&A(a,s,el,ec,t.id,eI),c.indexOf("event")>-1&&h.click(s,a,t.id);else if(1===i&&eC){var u,d,f,p,m=T?ea:en,g=+("s"!==T&&"w"!==P),y=m._name+".range["+g+"]",v=(u=m,d=g,p=Math.abs((f=u.range[d])-u.range[1-d]),"date"===u.type?f:"log"===u.type?n("."+(Math.ceil(Math.max(0,-Math.log(p)/Math.LN10))+3)+"g")(Math.pow(10,f)):n("."+String(Math.floor(Math.log(Math.abs(f))/Math.LN10)-Math.floor(Math.log(p)/Math.LN10)+4)+"g")(f)),x="left",b="middle";if(m.fixedrange)return;T?(b="n"===T?"top":"bottom","right"===m.side&&(x="right")):"e"===P&&(x="right"),s._context.showAxisRangeEntryBoxes&&r.select(eP).call(l.makeEditable,{gd:s,immediate:!0,background:s._fullLayout.paper_bgcolor,text:String(v),fill:m.tickfont?m.tickfont.color:"#444",horizontalAlign:x,verticalAlign:b}).on("edit",function(e){var t=m.d2r(e);void 0!==t&&o.call("_guiRelayout",s,y,t)})}}function eO(t,r){if(e._transitioningWithDuration)return!1;var i,n,a,o,s=Math.max(0,Math.min(ed,ek*t+Z)),l=Math.max(0,Math.min(ef,eA*r+$)),c=Math.abs(s-Z),u=Math.abs(l-$);function h(){ee="",X.r=X.l,X.t=X.b,er.attr("d","M0,0Z")}if(X.l=Math.min(Z,s),X.r=Math.max(Z,s),X.t=Math.min($,l),X.b=Math.max($,l),ep.isSubplotConstrained)c>L||u>L?(ee="xy",c/ed>u/ef?(u=c*ef/ed,$>l?X.t=$-u:X.b=$+u):(c=u*ed/ef,Z>s?X.l=Z-c:X.r=Z+c),er.attr("d",q(X))):h();else if(em.isSubplotConstrained)if(c>L||u>L){ee="xy";var d=Math.min(X.l/ed,(ef-X.b)/ef),f=Math.max(X.r/ed,(ef-X.t)/ef);X.l=d*ed,X.r=f*ed,X.b=(1-d)*ef,X.t=(1-f)*ef,er.attr("d",q(X))}else h();else{!ey||u0){if(em.isSubplotConstrained||!eg&&1===ey.length){for(a=0;a=0?Math.min(l,.9):1/(1/Math.max(l,-.3)+3.222)));var l,c=s.l2r(n);!1!==c&&void 0!==c&&(s.range[t]=c)}}return i._length*(i._rl[t]-n)/(i._rl[t]-i._rl[a])}}function eq(e,t){for(var r=em.isSubplotConstrained?({x:ec,y:el})[e]:em[e+"axes"],i=em.isSubplotConstrained?({x:el,y:ec})[e]:[],n=0;n1&&(void 0!==a.maxallowed&&ex===(a.range[0]1&&(void 0!==s.maxallowed&&eb===(s.range[0]1&&i.warn("Full array edits are incompatible with other edits",d);var x=l[""][""];if(s(x))t.set(null);else{if(!Array.isArray(x))return i.warn("Unrecognized full array edit value",d,x),!0;t.set(x)}return!g&&(f(y,v),p(e),!0)}var b,_,w,T,M,k,A,S,E=Object.keys(l).map(Number).sort(n),C=t.get(),L=C||[],P=u(v,d).get(),I=[],z=-1,D=L.length;for(b=0;bL.length-!A){i.warn("index out of range",d,w);continue}if(void 0!==k)M.length>1&&i.warn("Insertion & removal are incompatible with edits to the same index.",d,w),s(k)?I.push(w):A?("add"===k&&(k={}),L.splice(w,0,k),P&&P.splice(w,0,{})):i.warn("Unrecognized full object edit value",d,w,k),-1===z&&(z=w);else for(_=0;_=0;b--)L.splice(I[b],1),P&&P.splice(I[b],1);if(L.length?C||t.set(L):t.set(null),g)return!1;if(f(y,v),m!==r){if(-1===z)h=E;else{for(D=Math.max(L.length,D),h=[],b=0;b=z);b++)h.push(w);for(b=z;b0&&i.log("Clearing previous rejected promises from queue."),e._promises=[]},e.cleanLayout=function(t){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 r,a=(n.subplotsRegistry.cartesian||{}).attrRegex,s=((n.subplotsRegistry.polar||{}).attrRegex,(n.subplotsRegistry.ternary||{}).attrRegex,(n.subplotsRegistry.gl3d||{}).attrRegex,Object.keys(t));for(r=0;r3?(v.x=1.02,v.xanchor="left"):v.x<-2&&(v.x=-.02,v.xanchor="right"),v.y>3?(v.y=1.02,v.yanchor="bottom"):v.y<-2&&(v.y=-.02,v.yanchor="top")),"rotate"===t.dragmode&&(t.dragmode="orbit"),t.template&&t.template.layout&&e.cleanLayout(t.template.layout),t},e.cleanData=function(t){for(var a=0;a0)return e.slice(0,t)}e.hasParent=function(e,t){for(var r=m(t);r;){if(r in e)return!0;r=m(r)}return!1},e.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...e)=>e.every(e=>i.isPlainObject(e))||e.every(e=>Array.isArray(e));if([e,t].every(e=>Array.isArray(e))){if(e.length!==t.length)return!1;for(let i=0;ii.isPlainObject(e))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let i in e){if(i.startsWith("_"))continue;let n=e[i],a=t[i];if(n!==a&&!(r(n,a)&&g(n,a)))return!1}return!0}return!1};e.collectionsAreEqual=g}}),iL=p({"src/plot_api/plot_api.js"(e){var t=T(),r=C(),i=t_(),n=tv(),a=n.nestedProperty,o=tT(),s=tM(),l=eQ(),c=tA(),u=tD(),h=rn(),d=ro(),f=tN(),p=t9(),m=ee(),g=iA().initInteractions,y=tO(),v=iM().clearOutline,x=X().dfltConfig,b=iE(),_=iC(),w=r7(),M=eq(),k=tE().AX_NAME_PATTERN,A=0;function S(e){var t=e._fullLayout;t._redrawFromAutoMarginCount?t._redrawFromAutoMarginCount--:e.emit("plotly_afterplot")}function E(e,t){try{e._fullLayout._paper.style("background",t)}catch(e){n.error(e)}}function L(e,t){E(e,m.combine(t,"white"))}function P(e,r){if(!e._context){e._context=n.extendDeep({},x);var a=t.select("base");e._context._baseUrl=a.size()&&a.attr("href")?window.location.href.split("#")[0]:""}var o,s,l,c=e._context;if(r){for(s=Object.keys(r),o=0;o=e.data.length||n<-e.data.length)throw Error(r+" must be valid indices for gd.data.");if(t.indexOf(n,i+1)>-1||n>=0&&t.indexOf(-e.data.length+n)>-1||n<0&&t.indexOf(e.data.length+n)>-1)throw Error("each index in "+r+" must be unique.")}}function D(e,t,r){if(!Array.isArray(e.data))throw Error("gd.data must be an array.");if(typeof t>"u")throw Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),z(e,t,"currentIndices"),"u">typeof r&&!Array.isArray(r)&&(r=[r]),"u">typeof r&&z(e,r,"newIndices"),"u">typeof r&&t.length!==r.length)throw Error("current and new indices must be of equal length.")}function O(e,t,i,o,s){var l=n.isPlainObject(o);if(!Array.isArray(e.data))throw Error("gd.data must be an array");if(!n.isPlainObject(t))throw Error("update must be a key:value object");if(typeof i>"u")throw Error("indices must be an integer or array of integers");for(var c in z(e,i,"indices"),t){if(!Array.isArray(t[c])||t[c].length!==i.length)throw Error("attribute "+c+" must be an array of length equal to indices array length");if(l&&(!(c in o)||!Array.isArray(o[c])||o[c].length!==t[c].length))throw Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}for(var u=function(e,t,i,o){var s,l,c,u,h=n.isPlainObject(o),d=[];for(var f in Array.isArray(i)||(i=[i]),i=I(i,e.data.length-1),t)for(var p=0;p0&&"string"!=typeof z.parts[R];)R--;var F=z.parts[R],N=z.parts[R-1]+"."+F,U=z.parts.slice(0,R).join("."),V=a(e.layout,U).get(),q=a(u,U).get(),H=z.get();if(void 0!==D){A[I]=D,S[I]="reverse"===F?D:j(H);var Z=c.getLayoutValObject(u,z.parts);if(Z&&Z.impliedEdits&&null!==D)for(var X in Z.impliedEdits)E(n.relativeAttr(I,X),Z.impliedEdits[X]);if(-1!==["width","height"].indexOf(I))if(D){E("autosize",null);var K="height"===I?"width":"height";E(K,u[K])}else u[I]=e._initialAutoSize[I];else if("autosize"===I)E("width",D?null:u.width),E("height",D?null:u.height);else if(N.match(G))P(N),a(u,U+"._inputRange").set(null);else if(N.match(W)){P(N),a(u,U+"._inputRange").set(null);var J=a(u,U).get();J._inputDomain&&(J._input.domain=J._inputDomain.slice())}else N.match(Y)&&a(u,U+"._inputDomain").set(null);if("type"===F){C=V;var Q="linear"===q.type&&"log"===D,ee="log"===q.type&&"linear"===D;if(Q||ee){if(C&&C.range)if(q.autorange)Q&&(C.range=C.range[1]>C.range[0]?[1,2]:[2,1]);else{var et=C.range[0],er=C.range[1];Q?(et<=0&&er<=0&&E(U+".autorange",!0),et<=0?et=er/1e6:er<=0&&(er=et/1e6),E(U+".range[0]",Math.log(et)/Math.LN10),E(U+".range[1]",Math.log(er)/Math.LN10)):(E(U+".range[0]",Math.pow(10,et)),E(U+".range[1]",Math.pow(10,er)))}else E(U+".autorange",!0);Array.isArray(u._subplots.polar)&&u._subplots.polar.length&&u[z.parts[0]]&&"radialaxis"===z.parts[1]&&delete u[z.parts[0]]._subplot.viewInitial["radialaxis.range"],l.getComponentMethod("annotations","convertCoords")(e,q,D,E),l.getComponentMethod("images","convertCoords")(e,q,D,E)}else E(U+".autorange",!0),E(U+".range",null);a(u,U+"._inputRange").set(null)}else if(F.match(k)){var ei=a(u,I).get(),en=(D||{}).type;en&&"-"!==en||(en="linear"),l.getComponentMethod("annotations","convertCoords")(e,ei,en,E),l.getComponentMethod("images","convertCoords")(e,ei,en,E)}var ea=b.containerArrayMatch(I);if(ea){r=ea.array,i=ea.index;var eo=ea.property,es=Z||{editType:"calc"};""!==i&&""===eo&&(b.isAddVal(D)?S[I]=null:b.isRemoveVal(D)?S[I]=(a(s,r).get()||[])[i]:n.warn("unrecognized full object value",t)),M.update(T,es),y[r]||(y[r]={});var el=y[r][i];el||(el=y[r][i]={}),el[eo]=D,delete t[I]}else"reverse"===F?(V.range?V.range.reverse():(E(U+".autorange",!0),V.range=[1,0]),q.autorange?T.calc=!0:T.plot=!0):("dragmode"===I&&(!1===D&&!1!==H||!1!==D&&!1===H)||u._has("scatter-like")&&u._has("regl")&&"dragmode"===I&&("lasso"===D||"select"===D)&&"lasso"!==H&&"select"!==H?T.plot=!0:Z?M.update(T,Z):T.calc=!0,z.set(D))}}for(r in y)b.applyContainerArrayChanges(e,f(s,r),y[r],T,f)||(T.plot=!0);for(var ec in L){var eu=(C=h.getFromId(e,ec))&&C._constraintGroup;if(eu)for(var eh in T.calc=!0,eu)L[eh]||(h.getFromId(e,eh)._constraintShrinkable=!0)}($(e)||t.height||t.width)&&(T.plot=!0);var ed=u.shapes;for(i=0;i1;)if(i.pop(),void 0!==(r=a(t,i.join(".")+".uirevision").get()))return r;return t.uirevision}function en(e,t){var r=n.isPlainObject(e),i=Array.isArray(e);return r||i?(r&&n.isPlainObject(t)||i&&Array.isArray(t))&&JSON.stringify(e)===JSON.stringify(t):e===t}function ea(e,t,r,i){var a,o,s,l=i.getValObject,c=i.flags,u=i.immutable,h=i.inArray,d=i.arrayIndex;function f(){var e=a.editType;h&&-1!==e.indexOf("arraydraw")?n.pushUnique(c.arrays[h],d):(M.update(c,a),"none"!==e&&c.nChanges++,i.transition&&a.anim&&c.nChangesAnim++,(G.test(s)||W.test(s))&&(c.rangesAltered[r[0]]=1),"datarevision"===o&&(c.newDataRevision=1))}function p(e){return"data_array"===e.valType||e.arrayOk}for(o in e){if(c.calc&&!i.transition)return;var m=e[o],g=t[o],y=r.concat(o);if(s=y.join("."),"_"!==o.charAt(0)&&"function"!=typeof m&&m!==g){if(("tick0"===o||"dtick"===o)&&"geo"!==r[0]){var v=t.tickmode;if("auto"===v||"array"===v||!v)continue}if(!("range"===o&&t.autorange)&&("zmin"!==o&&"zmax"!==o||"contourcarpet"!==t.type)&&(a=l(y))&&!(a._compareAsJSON&&JSON.stringify(m)===JSON.stringify(g))){var x,b=a.valType,_=p(a),w=Array.isArray(m),T=Array.isArray(g);if(w&&T){var k="_input_"+o,A=e[k],S=t[k];if(Array.isArray(A)&&A===S)continue}if(void 0===g)_&&w?c.calc=!0:f();else if(a._isLinkedToArray){var E=[],C=!1;h||(c.arrays[o]=E);var L=Math.min(m.length,g.length),P=Math.max(m.length,g.length);if(L!==P)if("arraydraw"===a.editType)C=!0;else{f();continue}for(x=0;x=a.length?e.transitionOpts=a[c]:e.transitionOpts=a[0]:e.transitionOpts=a,c++,e}var d,f,p=[],m=null==t,g=Array.isArray(t);if(!m&&!g&&n.isPlainObject(t))p.push({type:"object",data:h(n.extendFlat({},t))});else if(m||-1!==["string","number"].indexOf(typeof t))for(d=0;d0&&xx)&&b.push(f);p=b}}p.length>0?function(t){if(0!==t.length){for(var n,c=0;c=o.length?o[0]:o[h]:o),m=(d=c,Array.isArray(a)?d>=a.length?a[0]:a[d]:a);m.duration=Math.min(m.duration,p.duration);var g={frame:f,name:t[c].name,frameOpts:p,transitionOpts:m};c===t.length-1&&(g.onComplete=function(e){var t=0;return function(){if(e&&2==++t)return e()}}(s),g.onInterrupt=l),i._frameQueue.push(g)}"immediate"===r.mode&&(i._lastFrameAt=-1/0),i._animationRaf||(e.emit("plotly_animating"),i._lastFrameAt=-1/0,i._timeToNext=0,i._runningTransitions=0,i._currentFrame=null,(n=function(){i._animationRaf=window.requestAnimationFrame(n),Date.now()-i._lastFrameAt>i._timeToNext&&function(){i._currentFrame&&i._currentFrame.onComplete&&i._currentFrame.onComplete();var t=i._currentFrame=i._frameQueue.shift();if(t){var r=t.name?t.name.toString():null;e._fullLayout._currentFrame=r,i._lastFrameAt=Date.now(),i._timeToNext=t.frameOpts.duration,u.transition(e,t.frame.data,t.frame.layout,_.coerceTraceIndices(e,t.frame.traces),t.frameOpts,t.transitionOpts).then(function(){t.onComplete&&t.onComplete()}),e.emit("plotly_animatingframe",{name:r,frame:t.frame,animation:{frame:t.frameOpts,transition:t.transitionOpts}})}else e.emit("plotly_animated"),window.cancelAnimationFrame(i._animationRaf),i._animationRaf=null}()})())}}(p):(e.emit("plotly_animated"),s())})},e.addFrames=function(e,t,r){if(e=n.getGraphDiv(e),null==t)return Promise.resolve();if(!n.isPlotDiv(e))throw Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var i,a,o,l,c=e._transitionData._frames,h=e._transitionData._frameHash;if(!Array.isArray(t))throw Error("addFrames failure: frameList must be an Array of frame definitions"+t);var d=c.length+2*t.length,f=[],p={};for(i=t.length-1;i>=0;i--)if(n.isPlainObject(t[i])){var m=t[i].name,g=(h[m]||p[m]||{}).name,y=t[i].name,v=h[g]||p[g];g&&y&&"number"==typeof y&&v&&A<5&&(A++,n.warn('addFrames: overwriting frame "'+(h[g]||p[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===A&&n.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),p[m]={name:m},f.push({frame:u.supplyFrameDefaults(t[i]),index:r&&void 0!==r[i]&&null!==r[i]?r[i]:d+i})}f.sort(function(e,t){return e.index>t.index?-1:+(e.index=0;i--){if("number"==typeof(a=f[i].frame).name&&n.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;h[a.name="frame "+e._transitionData._counter++];);if(h[a.name]){for(o=0;o=0;r--)i=t[r],o.push({type:"delete",index:i}),l.unshift({type:"insert",index:i,value:a[i]});var c=u.modifyFrames,h=u.modifyFrames,d=[e,l],f=[e,o];return s&&s.add(e,c,d,h,f),u.modifyFrames(e,o)},e.addTraces=function t(r,i,a){r=n.getGraphDiv(r);var o,l,c=[],u=e.deleteTraces,h=[r,c],d=[r,i];for(function(e,t,r){var i,n;if(!Array.isArray(e.data))throw Error("gd.data must be an array.");if(typeof t>"u")throw Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),i=0;itypeof r&&!Array.isArray(r)&&(r=[r]),"u">typeof r&&r.length!==t.length)throw Error("if indices is specified, traces.length must equal indices.length")}(r,i,a),Array.isArray(i)||(i=[i]),i=i.map(function(e){return n.extendFlat({},e)}),_.cleanData(i),o=0;o"u")return l=e.redraw(r),s.add(r,u,h,t,d),l;Array.isArray(a)||(a=[a]);try{D(r,c,a)}catch(e){throw r.data.splice(r.data.length-i.length,i.length),e}return s.startSequence(r),s.add(r,u,h,t,d),l=e.moveTraces(r,c,a),s.stopSequence(r),l},e.deleteTraces=function t(r,i){r=n.getGraphDiv(r);var a,o,l=[],c=e.addTraces,u=[r,l,i],h=[r,i];if(typeof i>"u")throw Error("indices must be an integer or array of integers.");for(Array.isArray(i)||(i=[i]),z(r,i,"indices"),(i=I(i,r.data.length-1)).sort(n.sorterDes),a=0;a=0&&r"u")for(a=[],o=0;o=0&&r[e,t._ev.listeners(e)]);h=e.newPlot(t,r,i,o).then(()=>{for(let[e,r]of n)r.forEach(r=>t.on(e,r));return e.react(t,r,i,o)})}else{t.data=r||[],_.cleanData(t.data),t.layout=i||{},_.cleanLayout(t.layout),function(e,t,r,i){var o,s,l,c,u,h,d,f,p,m,g=i._preGUI,y=[],v={},x={};for(o in g){if(u=er(o,Q)){if(p=u.head,m=u.tail,(c=(l=a(i,s=u.attr||p+".uirevision").get())&&ei(s,t))&&c===l){if(null===(h=g[o])&&(h=void 0),en(f=(d=a(t,o)).get(),h)){void 0===f&&"autorange"===m&&y.push(p),d.set(j(a(i,o).get()));continue}else if("autorange"===m||"range["===m.slice(0,6)){var b=g[p+".range[0]"],_=g[p+".range[1]"],w=g[p+".autorange"];if(w||null===w&&null===b&&null===_){if(!(p in v)){var T=a(t,p).get();v[p]=T&&(T.autorange||!1!==T.autorange&&(!T.range||2!==T.range.length))}if(v[p]){d.set(j(a(i,o).get()));continue}}}}}else n.warn("unrecognized GUI edit: "+o);delete g[o],u&&"range["===u.tail.slice(0,6)&&(x[u.head]=1)}for(var M=0;M(m||t.emit("plotly_react",{config:o,data:r,layout:i}),t))},e.redraw=function(t){if(t=n.getGraphDiv(t),!n.isPlotDiv(t))throw Error("This element is not a Plotly plot: "+t);return _.cleanData(t.data),_.cleanLayout(t.layout),t.calcdata=void 0,e._doPlot(t).then(function(){return t.emit("plotly_redraw"),t})},e.relayout=V,e.restyle=F,e.setPlotConfig=function(e){return n.extendFlat(x,e)},e.update=K,e._guiRelayout=J(V),e._guiRestyle=J(F),e._guiUpdate=J(K),e._storeDirectGUIEdit=function(e,t,r){for(var i in r){var n=a(e,i);N(i,n.get(),r[i],t)}}}}),iP=p({"src/snapshot/helpers.js"(e){var t=eQ();e.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0},e.getRedrawFunc=function(e){return function(){t.getComponentMethod("colorbar","draw")(e)}},e.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)},e.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var r=window.URL||window.webkitURL;e.createObjectURL=function(e){return r.createObjectURL(e)},e.revokeObjectURL=function(e){return r.revokeObjectURL(e)},e.createBlob=function(e,t){if("svg"===t)return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if("full-json"===t)return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=function(e){for(var t=e.length,r=new ArrayBuffer(t),i=new Uint8Array(r),n=0;n{let t=e.toLowerCase();return l.includes(t)?e:c.includes(t)?"<":u.includes(t)?">":e.includes("<")||e.includes(">")?"":d.html(e).text()}),d.remove(),A=(A=(A=f).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")).replace(s,"'")}}}),iz=p({"src/snapshot/svgtoimg.js"(e,t){var r=tv(),i=tw().EventEmitter,n=iP();t.exports=function(e){var t=e.emitter||new i,a=new Promise(function(i,a){var o,s,l=window.Image,c=e.svg,u=e.format||"png",h=e.canvas,d=e.scale||1,f=e.width||300,p=e.height||150,m=d*f,g=d*p,y=h.getContext("2d",{willReadFrequently:!0}),v=new l;"svg"===u||r.isSafari()?s=n.encodeSVG(c):(o=n.createBlob(c,"svg"),s=n.createObjectURL(o)),h.width=m,h.height=g,v.onload=function(){var r;switch(o=null,n.revokeObjectURL(s),"svg"!==u&&y.drawImage(v,0,0,m,g),u){case"jpeg":r=h.toDataURL("image/jpeg");break;case"png":r=h.toDataURL("image/png");break;case"webp":r=h.toDataURL("image/webp");break;case"svg":r=s;break;default:var l="Image format is not jpeg, png, svg or webp.";if(a(Error(l)),!e.promise)return t.emit("error",l)}i(r),e.promise||t.emit("success",r)},v.onerror=function(r){if(o=null,n.revokeObjectURL(s),a(r),!e.promise)return t.emit("error",r)},v.src=s});return e.promise?a:t}}}),iD=p({"src/plot_api/to_image.js"(e,t){var r=C(),i=iL(),n=tD(),a=tv(),o=iP(),s=iI(),l=iz(),c=_().version,u={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};t.exports=function(e,t){function h(e){return!(e in t)||a.validate(t[e],u[e])}if(t=t||{},a.isPlainObject(e)?(d=e.data||[],f=e.layout||{},p=e.config||{},m={}):(e=a.getGraphDiv(e),d=a.extendDeep([],e.data),f=a.extendDeep({},e.layout),p=e._context,m=e._fullLayout||{}),!h("width")&&null!==t.width||!h("height")&&null!==t.height)throw Error("Height and width should be pixel values.");if(!h("format"))throw Error("Export format is not "+a.join2(u.format.values,", "," or ")+".");var d,f,p,m,g={};function y(e,r){return a.coerce(t,g,u,e,r)}var v=y("format"),x=y("width"),b=y("height"),_=y("scale"),w=y("setBackground"),T=y("imageDataOnly"),M=document.createElement("div");M.style.position="absolute",M.style.left="-5000px",document.body.appendChild(M);var k=a.extendFlat({},f);x?k.width=x:null===t.width&&r(m.width)&&(k.width=m.width),b?k.height=b:null===t.height&&r(m.height)&&(k.height=m.height);var A=a.extendFlat({},p,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),S=o.getRedrawFunc(M);function E(){return new Promise(function(e){setTimeout(e,o.getDelay(M._fullLayout))})}function C(){return new Promise(function(e,t){var r=s(M,v,_),u=M._fullLayout.width,h=M._fullLayout.height;function d(){i.purge(M),document.body.removeChild(M)}if("full-json"===v){var f=n.graphJson(M,!1,"object",!0,!0);return f.version=c,f=JSON.stringify(f),d(),e(T?f:o.encodeJSON(f))}if(d(),"svg"===v)return e(T?r:o.encodeSVG(r));var p=document.createElement("canvas");p.id=a.randstr(),l({format:v,width:u,height:h,scale:_,canvas:p,svg:r,promise:!0}).then(e).catch(t)})}return new Promise(function(e,t){i.newPlot(M,d,k,A).then(S).then(E).then(C).then(function(t){e(T?t.replace(o.IMAGE_URL_PREFIX,""):t)}).catch(function(e){t(e)})})}}}),iO=p({"src/plot_api/validate.js"(e,t){var r=tv(),i=tD(),n=tA(),a=X().dfltConfig,o=r.isPlainObject,s=Array.isArray,l=r.isArrayOrTypedArray;function c(e,t,i,n,a,u){u=u||[];for(var h=Object.keys(e),f=0;fv.length&&n.push(d("unused",a,g.concat(v.length)));var M,k,A,S,E,C,L,P=v.length,I=Array.isArray(T);if(I&&(P=Math.min(P,T.length)),2===x.dimensions)for(S=0;Sv[S].length&&n.push(d("unused",a,g.concat(S,v[S].length)));var z=v[S].length;for(A=0;A<(I?Math.min(z,T[S].length):z);A++)E=I?T[S][A]:T,C=y[S][A],L=v[S][A],r.validate(C,E)?L!==C&&L!==+C&&n.push(d("dynamic",a,g.concat(S,A),C,L)):n.push(d("value",a,g.concat(S,A),C))}else n.push(d("array",a,g.concat(S),y[S]));else for(S=0;S1&&f.push(d("object","layout"))),i.supplyDefaults(p);for(var m=p._fullData,g=l.length,y=0;yw?h.push({code:"unused",traceType:y,templateCount:_,dataCount:w}):w>_&&h.push({code:"reused",traceType:y,templateCount:_,dataCount:w})}}else h.push({code:"data"});if(function e(t,i){for(var n in t)if("_"!==n.charAt(0)){var a=t[n],o=f(t,n,i);r(a)?(Array.isArray(t)&&!1===a._template&&a.templateitemname&&h.push({code:"missing",path:o,templateitemname:a.templateitemname}),e(a,o)):Array.isArray(a)&&function(e){for(var t=0;t=0;h--){var d=e[h];if("scatter"===d.type&&d.xaxis===c.xaxis&&d.yaxis===c.yaxis){d.opacity=void 0;break}}}}}}}),iK=p({"src/traces/scatter/layout_defaults.js"(e,t){var r=tv(),i=tP();t.exports=function(e,t){var n,a="group"===t.barmode;"group"===t.scattermode&&(n=a?t.bargap:.2,r.coerce(e,t,i,"scattergap",n))}}}),iJ=p({"src/plots/cartesian/align_period.js"(e,t){var r=C(),i=tv(),n=i.dateTime2ms,a=i.incrementMonth,o=L().ONEAVGMONTH;t.exports=function(e,t,i,s){if("date"!==t.type)return{vals:s};var l=e[i+"periodalignment"];if(!l)return{vals:s};var c,u=e[i+"period"];if(r(u)){if((u*=1)<=0)return{vals:s}}else if("string"==typeof u&&"M"===u.charAt(0)){var h=+u.substring(1);if(!(h>0)||Math.round(h)!==h)return{vals:s};c=h}for(var d=t.calendar,f="start"===l,p="end"===l,m=e[i+"period0"],g=n(m,d)||0,y=[],v=[],x=[],b=s.length,_=0;_k;)M=a(M,-c,d);for(;M<=k;)M=a(M,c,d);T=a(M,-c,d)}else{for(w=Math.round((k-g)/u),M=g+w*u;M>k;)M-=u;for(;M<=k;)M+=u;T=M-u}y[_]=f?T:p?M:(T+M)/2,v[_]=T,x[_]=M}return{vals:y,starts:v,ends:x}}}}),iQ=p({"src/traces/scatter/colorscale_calc.js"(e,t){var r=tj().hasColorscale,i=t2(),n=t5();t.exports=function(e,t){n.hasLines(t)&&r(t,"line")&&i(e,t,{vals:t.line.color,containerStr:"line",cLetter:"c"}),n.hasMarkers(t)&&(r(t,"marker")&&i(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),r(t,"marker.line")&&i(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),i0=p({"src/traces/scatter/arrays_to_calcdata.js"(e,t){var r=tv();t.exports=function(e,t){for(var i=0;ip&&L[y].gap;)y--;for(x=L[y].s,g=L.length-1;g>y;g--)L[g].s=x;for(;ph+c||!r(u))}for(var f=0;fn(e))):n(e.text);let a=e.outsidetextfont.size*u*r+c;return{ppadplus:t.some(e=>e.s<0)?a:0,ppadminus:t.some(e=>e.s>=0)?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function b(e){return e._id.charAt(0)}t.exports={crossTraceCalc:function(e,t){for(var r=t.xaxis,i=t.yaxis,n=e._fullLayout,o=e._fullData,s=e.calcdata,l=[],c=[],u=0;uS[h]&&h0?o:s)/(C._m*I*(C._m>0?o:s)))),a*=1e3}if(l===n){if(P&&(l=C.c2p(i.y,!0)),l===n)return!1;l*=1e3}return[a,l]}function Y(e,t,r,i){var n=r-e,a=i-t,o=.5-e,s=.5-t,l=n*n+a*a,c=n*o+a*s;if(c>0&&ceo||e[1]el)return[u(e[0],ea,eo),u(e[1],es,el)]}function eh(e,t){if(e[0]===t[0]&&(e[0]===ea||e[0]===eo)||e[1]===t[1]&&(e[1]===es||e[1]===el))return!0}function ed(e,t,r){return function(i,n){var a,o=eu(i),s=eu(n),c=[];if(o&&s&&eh(o,s))return c;o&&c.push(o),s&&c.push(s);var u=2*l.constrain((i[e]+n[e])/2,t,r)-((o||i)[e]+(s||n)[e]);return u&&(a=o&&s?u>0==o[e]>s[e]?o:s:o||s,a[e]+=u),c}}function ef(e){var t=e[0],r=e[1],i=t===H[G-1][0],n=r===H[G-1][1];if(!(i&&n))if(G>1){var a=t===H[G-2][0],o=r===H[G-2][1];i&&(t===ea||t===eo)&&a?o?G--:H[G-1]=e:n&&(r===es||r===el)&&o?a?G--:H[G-1]=e:H[G++]=e}else H[G++]=e}function ep(e){H[G-1][0]!==e[0]&&H[G-1][1]!==e[1]&&ef([ee,et]),ef(e),er=null,ee=et=0}"linear"===j||"spline"===j?i=function(e,t){for(var r=[],i=0,n=0;n<4;n++){var a=ec[n],o=c(e[0],e[1],t[0],t[1],a[0],a[1],a[2],a[3]);o&&(!i||Math.abs(o.x-r[0][0])>1||Math.abs(o.y-r[0][1])>1)&&(o=[o.x,o.y],i&&$(o,e)<$(r[0],e)?r.unshift(o):r.push(o),i++)}return r}:"hv"===j||"vh"===j?i=function(e,t){var r=[],i=eu(e),n=eu(t);return i&&n&&eh(i,n)||(i&&r.push(i),n&&r.push(n)),r}:"hvh"===j?i=ed(0,ea,eo):"vhv"===j&&(i=ed(1,es,el));var em=l.isArrayOrTypedArray(O);function eg(t){if(t&&D&&(t.i=a,t.d=e,t.trace=S,t.marker=em?O[t.i]:O,t.backoff=D),X=t[0]/I,K=t[1]/z,J=t[0]eo?eo:0,Q=t[1]el?el:0,J||Q){if(G)if(er){var r,n,o,s=i(er,t);s.length>1&&(ep(s[0]),H[G++]=s[1])}else ei=i(H[G-1],t)[0],H[G++]=ei;else H[G++]=[J||t[0],Q||t[1]];var l=H[G-1];J&&Q&&(l[0]!==J||l[1]!==Q)?(er&&(ee!==J&&et!==Q?ef(ee&&et?(r=er,n=t[0]-r[0],o=(t[1]-r[1])/n,(r[1]*t[0]-t[1]*r[0])/n>0?[o>0?ea:eo,el]:[o>0?eo:ea,es]):[ee||J,et||Q]):ee&&et&&ef([ee,et])),ef([J,Q])):ee-J&&et-Q&&ef([J||ee,Q||et]),er=t,ee=J,et=Q}else er&&ep(i(er,t)[0]),H[G++]=t}for(a=0;aZ(g,ey))break;f=g,(T=x[0]*v[0]+x[1]*v[1])>_?(_=T,p=g,y=!1):T=e.length||!g)break;eg(g),d=g}}er&&ef([ee||er[0],et||er[1]]),U.push(H.slice(0,G))}var ev=j.slice(j.length-1);if(D&&"h"!==ev&&"v"!==ev){for(var ex=!1,eb=-1,e_=[],ew=0;ew=0?l=f:(l=f=d,d++),l=c[0]&&e.x<=c[1]&&e.y>=u[0]&&e.y<=u[1]}),p=Math.ceil(f.length/d),m=0;a.forEach(function(t,r){var i=t[0].trace;l.hasMarkers(i)&&i.marker.maxdisplayed>0&&r0;function x(e){return v?e.transition():e}var b=u.xaxis,_=u.yaxis,w=d[0].trace,T=w.line,M=r.select(p),k=a(M,"g","errorbars"),A=a(M,"g","lines"),S=a(M,"g","points"),E=a(M,"g","text");if(i.getComponentMethod("errorbars","plot")(e,k,u,m),!0===w.visible){x(M).style("opacity",w.opacity);var C,L,P=w.fill.charAt(w.fill.length-1);"x"!==P&&"y"!==P&&(P=""),"y"===P?(F=1,j=_.c2p(0,!0)):"x"===P&&(F=0,j=b.c2p(0,!0)),d[0][u.isRangePlot?"nodeRangePlot3":"node3"]=M;var I="",z=[],D=w._prevtrace,O=null,R=null;D&&(I=D._prevRevpath||"",L=D._nextFill,z=D._ownPolygons,O=D._fillsegments,R=D._fillElement);var F,j,B,N,U,V,q,H,G,W="",Y="",Z=[];w._polygons=[];var $=[],X=[],K=n.noop;if(C=w._ownFill,l.hasLines(w)||"none"!==w.fill){L&&L.datum(d),-1!==["hv","vh","hvh","vhv"].indexOf(T.shape)?(U=s.steps(T.shape),V=s.steps(T.shape.split("").reverse().join(""))):U=V="spline"===T.shape?function(e){var t=e[e.length-1];return e.length>1&&e[0][0]===t[0]&&e[0][1]===t[1]?s.smoothclosed(e.slice(1),T.smoothing):s.smoothopen(e,T.smoothing)}:function(e){return"M"+e.join("L")},$=Array((X=c(d,{xaxis:b,yaxis:_,trace:w,connectGaps:w.connectgaps,baseTolerance:Math.max(T.width||1,3)/4,shape:T.shape,backoff:T.backoff,simplify:T.simplify,fill:w.fill})).length);var J=0;for(g=0;g0,x=u(e,t,i);((m=n.selectAll("g.trace").data(x,function(e){return e[0].trace.uid})).enter().append("g").attr("class",function(e){return"trace scatter trace"+e[0].trace.uid}).style("stroke-miterlimit",2),m.order(),h=e,f=m,p=t,f.each(function(e){var t=a(r.select(this),"g","fills");s.setClipUrl(t,p.layerClipId,h);var i=e[0].trace;i._ownFill=null,i._nextFill=null;var n=[];i._ownfill&&n.push("_ownFill"),i._nexttrace&&n.push("_nextFill");var l=t.selectAll("g").data(n,o);l.enter().append("g"),l.exit().remove(),l.order().each(function(e){i[e]=a(r.select(this),"path","js-fill")})}),v)?(c&&(g=c()),r.transition().duration(l.duration).ease(l.easing).each("end",function(){g&&g()}).each("interrupt",function(){g&&g()}).each(function(){n.selectAll("g.trace").each(function(r,i){d(e,i,t,r,x,this,l)})})):m.each(function(r,i){d(e,i,t,r,x,this,l)}),y&&m.exit().remove(),n.selectAll("path:not([d])").remove()}}}),ne=p({"src/traces/scatter/marker_colorbar.js"(e,t){t.exports={container:"marker",min:"cmin",max:"cmax"}}}),nt=p({"src/traces/scatter/format_labels.js"(e,t){var r=rn();t.exports=function(e,t,i){var n={},a={_fullLayout:i},o=r.getFromTrace(a,t,"x"),s=r.getFromTrace(a,t,"y"),l=e.orig_x;void 0===l&&(l=e.x);var c=e.orig_y;return void 0===c&&(c=e.y),n.xLabel=r.tickText(o,o.c2l(l),!0).text,n.yLabel=r.tickText(s,s.c2l(c),!0).text,n}}}),nr=p({"src/traces/scatter/style.js"(e,t){var r=T(),i=t9(),n=eQ();function a(e,t,r){i.pointStyle(e.selectAll("path.point"),t,r)}function o(e,t,r){i.textPointStyle(e.selectAll("text"),t,r)}t.exports={style:function(e){var t=r.select(e).selectAll("g.trace.scatter");t.style("opacity",function(e){return e[0].trace.opacity}),t.selectAll("g.points").each(function(t){a(r.select(this),t.trace||t[0].trace,e)}),t.selectAll("g.text").each(function(t){o(r.select(this),t.trace||t[0].trace,e)}),t.selectAll("g.trace path.js-line").call(i.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(i.fillGroupStyle,e,!1),n.getComponentMethod("errorbars","style")(t)},stylePoints:a,styleText:o,styleOnSelect:function(e,t,r){var n=t[0].trace;n.selectedpoints?(i.selectedPointStyle(r.selectAll("path.point"),n),i.selectedTextStyle(r.selectAll("text"),n)):(a(r,n,e),o(r,n,e))}}}}),ni=p({"src/traces/scatter/get_trace_color.js"(e,t){var r=ee(),i=t5();t.exports=function(e,t){if("lines"===e.mode)return(n=e.line.color)&&r.opacity(n)?n:e.fillcolor;if("none"===e.mode)return e.fill?e.fillcolor:"";var n,a,o=t.mcc||(e.marker||{}).color,s=t.mlcc||((e.marker||{}).line||{}).color;return(a=o&&r.opacity(o)?o:s&&r.opacity(s)&&(t.mlw||((e.marker||{}).line||{}).width)?s:"")?.3>r.opacity(a)?r.addOpacity(a,.3):a:(n=(e.line||{}).color)&&r.opacity(n)&&i.hasLines(e)&&e.line.width?n:e.fillcolor}}}),nn=p({"src/traces/scatter/hover.js"(e,t){var r=tv(),i=rD(),n=eQ(),a=ni(),o=ee(),s=r.fillText;t.exports=function(e,t,l,c){var u=e.cd,h=u[0].trace,d=e.xa,f=e.ya,p=d.c2p(t),m=f.c2p(l),g=[p,m],y=h.hoveron||"",v=-1!==h.mode.indexOf("markers")?3:.5,x=!!h.xperiodalignment,b=!!h.yperiodalignment;if(-1!==y.indexOf("points")){var _=function(e){var t=Math.max(v,e.mrc||0),r=d.c2p(e.x)-p,i=f.c2p(e.y)-m;return Math.max(Math.sqrt(r*r+i*i)-t,1-v/t)},w=i.getDistanceFunction(c,function(e){if(x){var t=d.c2p(e.xStart),r=d.c2p(e.xEnd);return p>=Math.min(t,r)&&p<=Math.max(t,r)?0:1/0}var i=Math.max(3,e.mrc||0),n=1-1/i,a=Math.abs(d.c2p(e.x)-p);return a=Math.min(t,r)&&m<=Math.max(t,r)?0:1/0}var i=Math.max(3,e.mrc||0),n=1-1/i,a=Math.abs(f.c2p(e.y)-m);return ac!=(s=r[t][1])>=c&&(n=r[t-1][0],a=r[t][0],s-o&&(h=Math.min(h,i=n+(a-n)*(c-o)/(s-o)),p=Math.max(p,i)));return{x0:h=Math.max(h,0),x1:p=Math.min(p,d._length),y0:c,y1:c}}(h._polygons);null===I&&(I={x0:g[0],x1:g[0],y0:g[1],y1:g[1]});var z=o.defaultLine;return o.opacity(h.fillcolor)?z=h.fillcolor:o.opacity((h.line||{}).color)&&(z=h.line.color),r.extendFlat(e,{distance:e.maxHoverDistance,x0:I.x0,x1:I.x1,y0:I.y0,y1:I.y1,color:z,hovertemplate:!1}),delete e.index,h.text&&!r.isArrayOrTypedArray(h.text)?e.text=String(h.text):e.text=h.name,[e]}}}}),na=p({"src/traces/scatter/select.js"(e,t){var r=t5();t.exports=function(e,t){var i,n,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[],h=s[0].trace;if(h.mode&&!r.hasMarkers(h)&&!r.hasText(h))return[];if(!1===t)for(i=0;i0&&(n["_"+r+"axes"]||{})[t]||(n[r+"axis"]||r)===t&&(a(n,r)||(n[r]||[]).length||n[r+"0"]))return n}}(t,s,l);if(c){if("histogram"===c.type&&l===({v:"y",h:"x"})[c.orientation||"v"]){e.type="linear";return}var u=l+"calendar",h=c[u],d={noMultiCategory:!r(c,"cartesian")||r(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&l===({h:"x",v:"y"})[c.orientation||"v"]&&(d.noMultiCategory=!0),d.autotypenumbers=e.autotypenumbers,a(c,l)){var f=n(c),p=[];for(o=0;o0||r(o);s&&(a="array");var l,c=i("categoryorder",a);"array"===c&&(l=i("categoryarray")),s||"array"!==c||(c=t.categoryorder="trace"),"trace"===c?t._initialCategories=[]:"array"===c?t._initialCategories=l.slice():(l=(function(e,t){var r,i,n,a=t.dataAttr||e._id.charAt(0),o={};if(t.axData)r=t.axData;else for(r=[],i=0;i=2){var l,c,u="";if(2===o.length){for(l=0;l<2;l++)if(c=b(o[l])){u=g;break}}var h=a("pattern",u);if(h===g)for(l=0;l<2;l++)(c=b(o[l]))&&(t.bounds[l]=o[l]=c-1);if(h)for(l=0;l<2;l++)switch(c=o[l],h){case g:if(!r(c)||(c*=1)!==Math.floor(c)||c<0||c>=7){t.enabled=!1;return}t.bounds[l]=o[l]=c;break;case y:if(!r(c)||(c*=1)<0||c>24){t.enabled=!1;return}t.bounds[l]=o[l]=c}if(!1===i.autorange){var d=i.range;if(d[0]d[1]){t.enabled=!1;return}}else if(o[0]>d[0]&&o[1]b[1]-1/4096&&(t.domain=s),i.noneOrAll(e.domain,t.domain,s),"sync"===t.tickmode&&(t.tickmode="auto")}return n("layer"),t}}}),nd=p({"src/plots/cartesian/layout_defaults.js"(e,t){var r=tv(),i=ee(),n=t6().isUnifiedHover,a=rL(),o=tS(),s=eK(),l=tN(),c=ns(),u=nu(),h=r8(),d=nh(),f=tC(),p=f.id2name,m=f.name2id,g=tE().AX_ID_PATTERN,y=eQ(),v=y.traceIs,x=y.getComponentMethod;function b(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}t.exports=function(e,t,y){var _,w,T=t.autotypenumbers,M={},k={},A={},S={},E={},C={},L={},P={},I={},z={};for(_=0;_ rect").call(a.setTranslate,0,0).call(a.setScale,1,1),e.plot.call(a.setTranslate,t._offset,r._offset).call(a.setScale,1,1);var i=e.plot.selectAll(".scatterlayer .trace");i.selectAll(".point").call(a.setPointGroupScale,1,1),i.selectAll(".textpoint").call(a.setTextPointsScale,1,1),i.call(a.hideOutsideRangePoints,e)}l&&(h=l());var h,d,f,p,m=r.ease(s.easing);return e._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(p),p=null,function(){for(var r={},n=0;ns.duration?(function(){for(var r={},n=0;n1,m=t.mainplotinfo;if(!t.mainplot||p)if(f)t.xlines=u(i,"path","xlines-above"),t.ylines=u(i,"path","ylines-above"),t.xaxislayer=u(i,"g","xaxislayer-above"),t.yaxislayer=u(i,"g","yaxislayer-above");else{if(!a){var g=u(i,"g","layer-subplot");t.shapelayer=u(g,"g","shapelayer"),t.imagelayer=u(g,"g","imagelayer"),m&&p?(t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer):(t.minorGridlayer=u(i,"g","minor-gridlayer"),t.gridlayer=u(i,"g","gridlayer"),t.zerolinelayer=u(i,"g","zerolinelayer"));var y=u(i,"g","layer-between");t.shapelayerBetween=u(y,"g","shapelayer"),t.imagelayerBetween=u(y,"g","imagelayer"),u(i,"path","xlines-below"),u(i,"path","ylines-below"),t.overlinesBelow=u(i,"g","overlines-below"),u(i,"g","xaxislayer-below"),u(i,"g","yaxislayer-below"),t.overaxesBelow=u(i,"g","overaxes-below")}t.overplot=u(i,"g","overplot"),t.plot=u(t.overplot,"g",n),m&&p?t.zerolinelayerAbove=m.zerolinelayerAbove:t.zerolinelayerAbove=u(i,"g","zerolinelayer-above"),a||(t.xlines=u(i,"path","xlines-above"),t.ylines=u(i,"path","ylines-above"),t.overlinesAbove=u(i,"g","overlines-above"),u(i,"g","xaxislayer-above"),u(i,"g","yaxislayer-above"),t.overaxesAbove=u(i,"g","overaxes-above"),t.xlines=i.select(".xlines-"+o),t.ylines=i.select(".ylines-"+c),t.xaxislayer=i.select(".xaxislayer-"+o),t.yaxislayer=i.select(".yaxislayer-"+c))}else{var v=m.plotgroup,x=n+"-x",b=n+"-y";t.minorGridlayer=m.minorGridlayer,t.gridlayer=m.gridlayer,t.zerolinelayer=m.zerolinelayer,t.zerolinelayerAbove=m.zerolinelayerAbove,u(m.overlinesBelow,"path",x),u(m.overlinesBelow,"path",b),u(m.overaxesBelow,"g",x),u(m.overaxesBelow,"g",b),t.plot=u(m.overplot,"g",n),u(m.overlinesAbove,"path",x),u(m.overlinesAbove,"path",b),u(m.overaxesAbove,"g",x),u(m.overaxesAbove,"g",b),t.xlines=v.select(".overlines-"+o).select("."+x),t.ylines=v.select(".overlines-"+c).select("."+b),t.xaxislayer=v.select(".overaxes-"+o).select("."+x),t.yaxislayer=v.select(".overaxes-"+c).select("."+b)}a||(f||(h(t.minorGridlayer,"g",t.xaxis._id),h(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(e){return e[0]}).sort(s.idSort),h(t.gridlayer,"g",t.xaxis._id),h(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(e){return e[0]}).sort(s.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function m(e,r){if(e){var i={};for(var n in e.each(function(e){var n=e[0];t.select(this).remove(),g(n,r),i[n]=!0}),r._plots)for(var a=r._plots[n],o=a.overlays||[],s=0;s0){var g=m.id;if(-1!==g.indexOf(d))continue;g+=d+(u+1),m=i.extendFlat({},m,{id:g,plot:o._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var y,v=[],x=0;x1&&(w+=d+_),b.push(i+w),r=0;r=0,x=t.indexOf("end")>=0,b=p.backoff*g+a.standoff,_=m.backoff*y+a.startstandoff;if("line"===f.nodeName){c={x:+e.attr("x1"),y:+e.attr("y1")},u={x:+e.attr("x2"),y:+e.attr("y2")};var w=c.x-u.x,T=c.y-u.y;if(d=(h=Math.atan2(T,w))+Math.PI,b&&_&&b+_>Math.sqrt(w*w+T*T))return void O();if(b){if(b*b>w*w+T*T)return void O();var M=b*Math.cos(h),k=b*Math.sin(h);u.x+=M,u.y+=k,e.attr({x2:u.x,y2:u.y})}if(_){if(_*_>w*w+T*T)return void O();var A=_*Math.cos(h),S=_*Math.sin(h);c.x-=A,c.y-=S,e.attr({x1:c.x,y1:c.y})}}else if("path"===f.nodeName){var E=f.getTotalLength(),C="";if(E2/3?"right":"center"),({center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5})[t]}for(var Z=!1,$=["x","y"],X=0;X<$.length;X++){var K,J,Q,ee,et,er=$[X],ei=t[er+"ref"]||er,en=t["a"+er+"ref"],ea={x:v,y:x}[er],eo=(P+("x"===er?0:-90))*Math.PI/180,es=H*Math.cos(eo),el=W*Math.sin(eo),ec=Math.abs(es)+Math.abs(el),eu=t[er+"anchor"],eh=t[er+"shift"]*("x"===er?1:-1),ed=L[er],ef=s.getRefType(ei);if(ea&&"domain"!==ef){var ep=ea.r2fraction(t[er]);(ep<0||ep>1)&&(en===ei?((ep=ea.r2fraction(t["a"+er]))<0||ep>1)&&(Z=!0):Z=!0),K=ea._offset+ea.r2p(t[er]),ee=.5}else{var em="domain"===ef;"x"===er?(Q=t[er],K=em?ea._offset+ea._length*Q:K=T.l+T.w*Q):(Q=1-t[er],K=em?ea._offset+ea._length*Q:K=T.t+T.h*Q),ee=t.showarrow?.5:Q}if(t.showarrow){ed.head=K;var eg=t["a"+er];if(et=es*Y(.5,t.xanchor)-el*Y(.5,t.yanchor),en===ei){var ey=s.getRefType(en);"domain"===ey?("y"===er&&(eg=1-eg),ed.tail=ea._offset+ea._length*eg):"paper"===ey?"y"===er?(eg=1-eg,ed.tail=T.t+T.h*eg):ed.tail=T.l+T.w*eg:ed.tail=ea._offset+ea.r2p(eg),J=et}else ed.tail=K+eg,J=et+eg;ed.text=ed.tail+et;var ev=w["x"===er?"width":"height"];if("paper"===ei&&(ed.head=a.constrain(ed.head,1,ev-1)),"pixel"===en){var ex=-Math.max(ed.tail-3,ed.text),eb=Math.min(ed.tail+3,ed.text)-ev;ex>0?(ed.tail+=ex,ed.text+=ex):eb>0&&(ed.tail-=eb,ed.text-=eb)}ed.tail+=eh,ed.head+=eh}else J=et=ec*Y(ee,eu),ed.text=K+et;ed.text+=eh,et+=eh,J+=eh,t["_"+er+"padplus"]=ec/2+J,t["_"+er+"padminus"]=ec/2-J,t["_"+er+"size"]=ec,t["_"+er+"shift"]=et}if(Z)return void F.remove();var e_=0,ew=0;if("left"!==t.align&&(e_=(O-_)*("center"===t.align?.5:1)),"top"!==t.valign&&(ew=(q-k)*("middle"===t.valign?.5:1)),p)u.select("svg").attr({x:B+e_-1,y:B+ew}).call(c.setClipUrl,U?C:null,e);else{var eT=B+ew-b.top,eM=B+e_-b.left;G.call(h.positionText,eM,eT).call(c.setClipUrl,U?C:null,e)}V.select("rect").call(c.setRect,B,B,O,q),N.call(c.setRect,j/2,j/2,H-j,W-j),F.call(c.setTranslate,Math.round(L.x.text-H/2),Math.round(L.y.text-W/2)),z.attr({transform:"rotate("+P+","+L.x.text+","+L.y.text+")"});var ek=function(r,n){I.selectAll(".annotation-arrow-g").remove();var s=L.x.head,u=L.y.head,h=L.x.tail+r,d=L.y.tail+n,p=L.x.text+r,b=L.y.text+n,_=a.rotationXYMatrix(P,p,b),w=a.apply2DTransform(_),k=a.apply2DTransform2(_),C=+N.attr("width"),D=+N.attr("height"),O=p-.5*C,R=O+C,j=b-.5*D,B=j+D,U=[[O,j,O,B],[O,B,R,B],[R,B,R,j],[R,j,O,j]].map(k);if(!U.reduce(function(e,t){return!!a.segmentsIntersect(s,u,s+1e6,u+1e6,t[0],t[1],t[2],t[3])^e},!1)){U.forEach(function(e){var t=a.segmentsIntersect(h,d,s,u,e[0],e[1],e[2],e[3]);t&&(h=t.x,d=t.y)});var V=t.arrowwidth,q=t.arrowcolor,H=t.arrowside,G=I.append("g").style({opacity:l.opacity(q)}).classed("annotation-arrow-g",!0),W=G.append("path").attr("d","M"+h+","+d+"L"+s+","+u).style("stroke-width",V+"px").call(l.stroke,l.rgb(q));if(m(W,H,t),M.annotationPosition&&W.node().parentNode&&!g){var Y=s,Z=u;if(t.standoff){var $=Math.sqrt(Math.pow(s-h,2)+Math.pow(u-d,2));Y+=t.standoff*(h-s)/$,Z+=t.standoff*(d-u)/$}var X,K,J=G.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(h-Y)+","+(d-Z),transform:o(Y,Z)}).style("stroke-width",V+6+"px").call(l.stroke,"rgba(0,0,0,0)").call(l.fill,"rgba(0,0,0,0)");f.init({element:J.node(),gd:e,prepFn:function(){var e=c.getTranslate(F);X=e.x,K=e.y,v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0)},moveFn:function(e,r){var i=w(X,K),n=i[0]+e,a=i[1]+r;F.call(c.setTranslate,n,a),S("x",y(v,e,"x",T,t)),S("y",y(x,r,"y",T,t)),t.axref===t.xref&&S("ax",y(v,e,"ax",T,t)),t.ayref===t.yref&&S("ay",y(x,r,"ay",T,t)),G.attr("transform",o(e,r)),z.attr({transform:"rotate("+P+","+n+","+a+")"})},doneFn:function(){i.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}}};t.showarrow&&ek(0,0),D&&f.init({element:F.node(),gd:e,prepFn:function(){r=z.attr("transform")},moveFn:function(e,i){var n="pointer";if(t.showarrow)t.axref===t.xref?S("ax",y(v,e,"ax",T,t)):S("ax",t.ax+e),t.ayref===t.yref?S("ay",y(x,i,"ay",T.w,t)):S("ay",t.ay+i),ek(e,i);else{if(g)return;if(v)a=y(v,e,"x",T,t);else{var a,s,l=t._xsize/T.w,c=t.x+(t._xshift-t.xshift)/T.w-l/2;a=f.align(c+e/T.w,l,0,1,t.xanchor)}if(x)s=y(x,i,"y",T,t);else{var u=t._ysize/T.h,h=t.y-(t._yshift+t.yshift)/T.h-u/2;s=f.align(h-i/T.h,u,0,1,t.yanchor)}S("x",a),S("y",s),v&&x||(n=f.getCursor(v?.5:a,x?.5:s,t.xanchor,t.yanchor))}z.attr({transform:o(e,i)+r}),d(F,n)},clickFn:function(r,i){t.captureevents&&e.emit("plotly_clickannotation",R(i))},doneFn:function(){d(F),i.call("_guiRelayout",e,E());var t=document.querySelector(".js-notes-box-panel");t&&t.redraw(t.selectedObj)}})}M.annotationText?G.call(h.makeEditable,{delegate:F,gd:e}).call(W).on("edit",function(r){t.text=r,this.call(W),S("text",r),v&&v.autorange&&A(v._name+".autorange",!0),x&&x.autorange&&A(x._name+".autorange",!0),i.call("_guiRelayout",e,E())}):G.call(W)}t.exports={draw:function(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r0||r.explicitOff.length>0},onClick:function(e,t){var o,s,l=a(e,t),c=l.on,u=l.off.concat(l.explicitOff),h={},d=e._fullLayout.annotations;if(c.length||u.length){for(o=0;o1){c=!0;break}}c?e.fullLayout._infolayer.select(".annotation-"+e.id+'[data-index="'+s+'"]').remove():(l._pdata=i(e.glplot.cameraParams,[t.xaxis.r2l(l.x)*a[0],t.yaxis.r2l(l.y)*a[1],t.zaxis.r2l(l.z)*a[2]]),r(e.graphDiv,l,s,e.id,l._xa,l._ya))}}}}),nC=p({"src/components/annotations3d/index.js"(e,t){var r=eQ(),i=tv();t.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:nM()}}},layoutAttributes:nM(),handleDefaults:nk(),includeBasePlot:function(e,t){var n=r.subplotsRegistry.gl3d;if(n)for(var a=n.attrRegex,o=Object.keys(e),s=0;s{var l,g,y,v,x=a+"anchor",b="x"===a?d:f,_={_fullLayout:n};let w=e[a+"ref"];if(Array.isArray(w)&&w.length>0){let r=o.countDefiningCoords(u,c,a);v=i.coerceRefArray(e,t,_,a,void 0,"paper",r),t["_"+a+"refArray"]=!0}else v=i.coerceRef(e,t,_,a,void 0,"paper");if(Array.isArray(v))v.forEach(function(e){"range"===i.getRefType(e)&&(l=i.getFromId(_,e))&&-1===l._shapeIndices.indexOf(t._index)&&l._shapeIndices.push(t._index)}),h&&[0,1].forEach(function(n){let c=v[n];"range"===i.getRefType(c)?(l=i.getFromId(_,c),g=o.shapePositionToRange(l),y=o.rangeToShapePosition(l),("category"===l.type||"multicategory"===l.type)&&s(a+n+"shift")):g=y=r.identity;let u=a+n,h=e[u];if(e[u]=g(e[u],!0),"pixel"===b?s(u,m[n]):i.coercePosition(t,_,s,c,u,p[n]),t[u]=y(t[u]),e[u]=h,0===n&&"pixel"===b){let r=e[x];e[x]=g(e[x],!0),i.coercePosition(t,_,s,c,x,.25),t[x]=y(t[x]),e[x]=r}});else{if("range"===i.getRefType(v)?((l=i.getFromId(_,v))._shapeIndices.push(t._index),y=o.rangeToShapePosition(l),g=o.shapePositionToRange(l),h&&("category"===l.type||"multicategory"===l.type)&&(s(a+"0shift"),s(a+"1shift"))):g=y=r.identity,h){let r=a+"0",n=a+"1",o=e[r],l=e[n];e[r]=g(e[r],!0),e[n]=g(e[n],!0),"pixel"===b?(s(r,m[0]),s(n,m[1])):(i.coercePosition(t,_,s,v,r,p[0]),i.coercePosition(t,_,s,v,n,p[1])),t[r]=y(t[r]),t[n]=y(t[n]),e[r]=o,e[n]=l}if("pixel"===b){let r=e[x];e[x]=g(e[x],!0),i.coercePosition(t,_,s,v,x,.25),t[x]=y(t[x]),e[x]=r}}}),h&&r.noneOrAll(e,t,["x0","x1","y0","y1"]);var g,y,v="line"===u;if(h&&(g=s("label.texttemplate"),s("label.texttemplatefallback")),g||(y=s("label.text")),y||g){s("label.textangle");var x=s("label.textposition",v?"middle":"middle center");s("label.xanchor"),s("label.yanchor",v?"bottom":-1!==x.indexOf("top")?"top":-1!==x.indexOf("bottom")?"bottom":"middle"),s("label.padding"),r.coerceFont(s,"label.font",n.font)}}t.exports=function(e,t){n(e,t,{name:"shapes",handleItemDefaults:s})}}}),nI=p({"src/components/shapes/draw_newshape/defaults.js"(e,t){var r=ee(),i=tv();t.exports=function(e,t,n){if(n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),i.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity"),n("newshape.line.width")){var a=(e||{}).plot_bgcolor||"#FFF";n("newshape.line.color",r.contrast(a)),n("newshape.line.dash")}var o="drawline"===e.dragmode,s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var c=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",o?"bottom":-1!==c.indexOf("top")?"top":-1!==c.indexOf("bottom")?"bottom":"middle"),n("newshape.label.padding"),i.coerceFont(n,"newshape.label.font",t.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}}}),nz=p({"src/components/shapes/calc_autorange.js"(e,t){var r=tv(),i=rn(),n=rq(),a=rH();function o(e,t,r){let o=t[r+"ref"],s="x"===r?n.paramIsX:n.paramIsY;function l(e,t){"paper"===e||"domain"===i.getRefType(e)||(c[e]||(c[e]=[]),c[e].push(t))}let c={};if("path"===t.type&&t.path){let e=t.path.match(n.segmentRE)||[];for(var u=0,h=0;hr&&(l(o[u],i[r]),u++)}}else l(o[0],t[r+"0"]),l(o[1],t[r+"1"]);let d={};for(let t in c){let r=i.getFromId(e,t);if(r){var f="category"===r.type||"multicategory"===r.type?r.r2c:r.d2c;"date"===r.type&&(f=a.decodeDate(f)),d[r._id]=c[t].map(f)}}return d}function s(e){return c(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function l(e){return c(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function c(e,t,i,o,s,l){var c=e/2;if("pixel"!==t)return{ppad:c};var u=s?a.extractPathCoords(s,l?n.paramIsY:n.paramIsX):[i,o],h=r.aggNums(Math.max,null,u),d=r.aggNums(Math.min,null,u),f=d<0?Math.abs(d)+c:c,p=h>0?h+c:c;return{ppad:c,ppadplus:l?f:p,ppadminus:l?p:f}}function u(e,t,r){var i,o,s="x"===e._id.charAt(0)?"x":"y",l="category"===e.type||"multicategory"===e.type,c=0,u=0,h=l?e.r2c:e.d2c;if("scaled"===t[s+"sizemode"]?(i=t[s+"0"],o=t[s+"1"],l&&(c=t[s+"0shift"],u=t[s+"1shift"])):(i=t[s+"anchor"],o=t[s+"anchor"]),void 0!==i)return[h(i)+c,h(o)+u];if(t.path){var d,f,p,m,g=1/0,y=-1/0,v=t.path.match(n.segmentRE);for("date"===e.type&&(h=a.decodeDate(h)),d=0;dy&&(y=m));if(y>=g)return[g,y]}}t.exports=function(e){var t=e._fullLayout,a=r.filterVisible(t.shapes);if(!(!a.length||!e._fullData.length))for(var c=0;c{d=i.getFromId(e,t),h._extremes[d._id]=i.findExtremes(d,r,s(h))}):"paper"!==h.xref&&"domain"!==p&&(f=u(d=i.getFromId(e,h.xref),h,n.paramIsX))&&(h._extremes[d._id]=i.findExtremes(d,f,s(h))),"array"===m?Object.entries(o(e,h,"y")).forEach(([t,r])=>{d=i.getFromId(e,t),h._extremes[d._id]=i.findExtremes(d,r,l(h))}):"paper"!==h.yref&&"domain"!==m&&(f=u(d=i.getFromId(e,h.yref),h,n.paramIsY))&&(h._extremes[d._id]=i.findExtremes(d,f,l(h)))}}}}),nD=p({"src/components/shapes/index.js"(e,t){var r=rY();t.exports={moduleType:"component",name:"shapes",layoutAttributes:nL(),supplyLayoutDefaults:nP(),supplyDrawNewShapeDefaults:nI(),includeBasePlot:iT()("shapes"),calcAutorange:nz(),draw:r.draw,drawOne:r.drawOne}}}),nO=p({"src/components/images/attributes.js"(e,t){var r=tE(),i=tS().templatedArray;im(),t.exports=i("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",r.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",r.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),nR=p({"src/components/images/defaults.js"(e,t){var r=tv(),i=rn(),n=t$(),a=nO();function o(e,t,n){function o(i,n){return r.coerce(e,t,a,i,n)}var s=o("source");if(!o("visible",!!s))return t;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var l={_fullLayout:n},c=["x","y"],u=0;u<2;u++){var h=c[u],d=i.coerceRef(e,t,l,h,"paper",void 0);"paper"!==d&&i.getFromId(l,d)._imgIndices.push(t._index),i.coercePosition(t,l,o,d,h,0)}return t}t.exports=function(e,t){n(e,t,{name:"images",handleItemDefaults:o})}}}),nF=p({"src/components/images/draw.js"(e,t){var r=T(),i=t9(),n=rn(),a=tC(),o=tO();t.exports=function(e){var t,s,l=e._fullLayout,c=[],u={},h=[];for(s=0;s0)&&(o("active"),o("direction"),o("type"),o("showactive"),o("x"),o("y"),r.noneOrAll(e,t,["x","y"]),o("xanchor"),o("yanchor"),o("pad.t"),o("pad.r"),o("pad.b"),o("pad.l"),r.coerceFont(o,"font",a.font),o("bgcolor",a.paper_bgcolor),o("bordercolor"),o("borderwidth"))}function l(e,t){function i(i,n){return r.coerce(e,t,o,i,n)}i("visible","skip"===e.method||Array.isArray(e.args))&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}t.exports=function(e,t){i(e,t,{name:a,handleItemDefaults:s})}}}),nq=p({"src/components/updatemenus/scrollbox.js"(e,t){t.exports=o;var r=T(),i=ee(),n=t9(),a=tv();function o(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}o.barWidth=2,o.barLength=20,o.barRadius=2,o.barPad=1,o.barColor="#808BA4",o.prototype.enable=function(e,t,a){var s=this.gd._fullLayout,l=s.width,c=s.height;this.position=e;var u,h,d,f,p=this.position.l,m=this.position.w,g=this.position.t,y=this.position.h,v=this.position.direction,x="down"===v,b="left"===v,_="up"===v,w=m,T=y;x||b||"right"===v||_||(this.position.direction="down",x=!0),x||_?(h=(u=p)+w,x?T=(f=Math.min((d=g)+T,c))-d:(d=Math.max((f=g+T)-T,0),T=f-d)):(f=(d=g)+T,b?(u=Math.max((h=p+w)-w,0),w=h-u):w=(h=Math.min((u=p)+w,l))-u),this._box={l:u,t:d,w:w,h:T};var M=m>w,k=o.barLength+2*o.barPad,A=o.barWidth+2*o.barPad,S=g+y;S+A>c&&(S=c-A);var E=this.container.selectAll("rect.scrollbar-horizontal").data(M?[0]:[]);E.exit().on(".drag",null).remove(),E.enter().append("rect").classed("scrollbar-horizontal",!0).call(i.fill,o.barColor),M?(this.hbar=E.attr({rx:o.barRadius,ry:o.barRadius,x:p,y:S,width:k,height:A}),this._hbarXMin=p+k/2,this._hbarTranslateMax=w-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var C=y>T,L=o.barWidth+2*o.barPad,P=o.barLength+2*o.barPad,I=p+m;I+L>l&&(I=l-L);var z=this.container.selectAll("rect.scrollbar-vertical").data(C?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-vertical",!0).call(i.fill,o.barColor),C?(this.vbar=z.attr({rx:o.barRadius,ry:o.barRadius,x:I,y:g,width:L,height:P}),this._vbarYMin=g+P/2,this._vbarTranslateMax=T-P):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var D=this.id,O=u-.5,R=C?h+L+.5:h+.5,F=d-.5,j=M?f+A+.5:f+.5,B=s._topdefs.selectAll("#"+D).data(M||C?[0]:[]);if(B.exit().remove(),B.enter().append("clipPath").attr("id",D).append("rect"),M||C?(this._clipRect=B.select("rect").attr({x:Math.floor(O),y:Math.floor(F),width:Math.ceil(R)-Math.floor(O),height:Math.ceil(j)-Math.floor(F)}),this.container.call(n.setClipUrl,D,this.gd),this.bg.attr({x:p,y:g,width:m,height:y})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(n.setClipUrl,null),delete this._clipRect),M||C){var N=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(N);var U=r.behavior.drag().on("dragstart",function(){r.event.sourceEvent.preventDefault(),r.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));M&&this.hbar.on(".drag",null).call(U),C&&this.vbar.on(".drag",null).call(U)}this.setTranslate(t,a)},o.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(n.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)},o.prototype._onBoxDrag=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e-=r.event.dx),this.vbar&&(t-=r.event.dy),this.setTranslate(e,t)},o.prototype._onBoxWheel=function(){var e=this.translateX,t=this.translateY;this.hbar&&(e+=r.event.deltaY),this.vbar&&(t+=r.event.deltaY),this.setTranslate(e,t)},o.prototype._onBarDrag=function(){var e=this.translateX,t=this.translateY;if(this.hbar){var i=e+this._hbarXMin,n=i+this._hbarTranslateMax;e=(a.constrain(r.event.x,i,n)-i)/(n-i)*(this.position.w-this._box.w)}if(this.vbar){var o=t+this._vbarYMin,s=o+this._vbarTranslateMax;t=(a.constrain(r.event.y,o,s)-o)/(s-o)*(this.position.h-this._box.h)}this.setTranslate(e,t)},o.prototype.setTranslate=function(e,t){var r=this.position.w-this._box.w,i=this.position.h-this._box.h;if(e=a.constrain(e||0,0,r),t=a.constrain(t||0,0,i),this.translateX=e,this.translateY=t,this.container.call(n.setTranslate,this._box.l-this.position.l-e,this._box.t-this.position.t-t),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+e-.5),y:Math.floor(this.position.t+t-.5)}),this.hbar){var o=e/r;this.hbar.call(n.setTranslate,e+o*this._hbarTranslateMax,t)}if(this.vbar){var s=t/i;this.vbar.call(n.setTranslate,e,t+s*this._vbarTranslateMax)}}}}),nH=p({"src/components/updatemenus/draw.js"(e,t){var r=T(),i=tD(),n=ee(),a=t9(),o=tv(),s=tF(),l=tS().arrayEditor,c=tR().LINE_SPACING,u=nN(),h=nq();function d(e){return e._index}function f(e,t){return+e.attr(u.menuIndexAttrName)===t._index}function p(e,t,r,i,n,a,o,s){t.active=o,l(e.layout,u.name,t).applyUpdate("active",o),"buttons"===t.type?g(e,i,null,null,t):"dropdown"===t.type&&(n.attr(u.menuIndexAttrName,"-1"),m(e,i,n,a,t),s||g(e,i,n,a,t))}function m(e,t,r,i,n){var s=o.ensureSingle(t,"g",u.headerClassName,function(e){e.style("pointer-events","all")}),l=n._dims,c=n.active,h=n.buttons[c]||u.blankHeaderOpts,d={y:n.pad.t,yPad:0,x:n.pad.l,xPad:0,index:0},p={width:l.headerWidth,height:l.headerHeight};s.call(y,n,h,e).call(k,n,d,p),o.ensureSingle(t,"text",u.headerArrowClassName,function(e){e.attr("text-anchor","end").call(a.font,n.font).text(u.arrowSymbol[n.direction])}).attr({x:l.headerWidth-u.arrowOffsetX+n.pad.l,y:l.headerHeight/2+u.textOffsetY+n.pad.t}),s.on("click",function(){r.call(A,String(f(r,n)?-1:n._index)),g(e,t,r,i,n)}),s.on("mouseover",function(){s.call(_)}),s.on("mouseout",function(){s.call(w,n)}),a.setTranslate(t,l.lx,l.ly)}function g(e,t,n,a,s){n||(n=t).attr("pointer-events","all");var l,c,h,d=-1==+n.attr(u.menuIndexAttrName)&&"buttons"!==s.type?[]:s.buttons,f="dropdown"===s.type?u.dropdownButtonClassName:u.buttonClassName,m=n.selectAll("g."+f).data(o.filterVisible(d)),g=m.enter().append("g").classed(f,!0),v=m.exit();"dropdown"===s.type?(g.attr("opacity","0").transition().attr("opacity","1"),v.transition().attr("opacity","0").remove()):v.remove();var x=0,T=0,M=s._dims,A=-1!==["up","down"].indexOf(s.direction);"dropdown"===s.type&&(A?T=M.headerHeight+u.gapButtonHeader:x=M.headerWidth+u.gapButtonHeader),"dropdown"===s.type&&"up"===s.direction&&(T=-u.gapButtonHeader+u.gapButton-M.openHeight),"dropdown"===s.type&&"left"===s.direction&&(x=-u.gapButtonHeader+u.gapButton-M.openWidth);var S={x:M.lx+x+s.pad.l,y:M.ly+T+s.pad.t,yPad:u.gapButton,xPad:u.gapButton,index:0},E={l:S.x+s.borderwidth,t:S.y+s.borderwidth};m.each(function(o,l){var c=r.select(this);c.call(y,s,o,e).call(k,s,S),c.on("click",function(){r.event.defaultPrevented||(o.execute&&(o.args2&&s.active===l?(p(e,s,o,t,n,a,-1),i.executeAPICommand(e,o.method,o.args2)):(p(e,s,o,t,n,a,l),i.executeAPICommand(e,o.method,o.args))),e.emit("plotly_buttonclicked",{menu:s,button:o,active:s.active}))}),c.on("mouseover",function(){c.call(_)}),c.on("mouseout",function(){c.call(w,s),m.call(b,s)})}),m.call(b,s),A?(E.w=Math.max(M.openWidth,M.headerWidth),E.h=S.y-E.t):(E.w=S.x-E.l,E.h=Math.max(M.openHeight,M.headerHeight)),E.direction=s.direction,a&&(m.size()?function(e,t,r){var i,n,a,o=t.direction,s=t._dims,l=t.active;if("up"===o||"down"===o)for(n=0,a=0;a0?[0]:[]);if(v.enter().append("g").classed(u.containerClassName,!0).style("cursor","pointer"),v.exit().each(function(){r.select(this).selectAll("g."+u.headerGroupClassName).each(l)}).remove(),0!==n.length){var x=v.selectAll("g."+u.headerGroupClassName).data(n,d);x.enter().append("g").classed(u.headerGroupClassName,!0);for(var b=o.ensureSingle(v,"g",u.dropdownButtonGroupClassName,function(e){e.style("pointer-events","all")}),_=0;_0&&(l=l.transition().duration(t.transition.duration).ease(t.transition.easing)),l.attr("transform",s(o-.5*u.gripWidth,t._dims.currentValueTotalHeight))}}function S(e,t){var r=e._dims;return r.inputAreaStart+u.stepInset+(r.inputAreaLength-2*u.stepInset)*Math.min(1,Math.max(0,t))}function E(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-u.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*u.stepInset-2*r.inputAreaStart)))}function C(e,t,r){var i=r._dims,s=o.ensureSingle(e,"rect",u.railTouchRectClass,function(i){i.call(M,t,e,r).style("pointer-events","all")});s.attr({width:i.inputAreaLength,height:Math.max(i.inputAreaWidth,u.tickOffset+r.ticklen+i.labelHeight)}).call(n.fill,r.bgcolor).attr("opacity",0),a.setTranslate(s,0,i.currentValueTotalHeight)}function L(e,t){var r=t._dims,i=r.inputAreaLength-2*u.railInset,s=o.ensureSingle(e,"rect",u.railRectClass);s.attr({width:i,height:u.railWidth,rx:u.railRadius,ry:u.railRadius,"shape-rendering":"crispEdges"}).call(n.stroke,t.bordercolor).call(n.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),a.setTranslate(s,u.railInset,(r.inputAreaWidth-u.railWidth)*.5+r.currentValueTotalHeight)}t.exports=function(e){var t=e._context.staticPlot,n=e._fullLayout,s=function(e,t){for(var r=e[u.name],i=[],n=0;n0?[0]:[]);function h(t){t._commandObserver&&(t._commandObserver.remove(),delete t._commandObserver),i.autoMargin(e,m(t))}if(c.enter().append("g").classed(u.containerClassName,!0).style("cursor",t?null:"ew-resize"),c.exit().each(function(){r.select(this).selectAll("g."+u.groupClassName).each(h)}).remove(),0!==s.length){var d=c.selectAll("g."+u.groupClassName).data(s,g);d.enter().append("g").classed(u.groupClassName,!0),d.exit().each(h).remove();for(var _=0;_0?e.touches[0].clientX:0}function g(e,t,r,i){var n=a.ensureSingle(e,"rect",p.bgClassName,function(e){e.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),c=i.borderwidth%2==0?i.borderwidth:i.borderwidth-1,u=-i._offsetShift,h=s.crispRound(t,i.borderwidth);n.attr({width:i._width+c,height:i._height+c,transform:o(u,u),"stroke-width":h}).call(l.stroke,i.bordercolor).call(l.fill,i.bgcolor)}function y(e,t,r,i){var n=t._fullLayout;a.ensureSingleById(n._topdefs,"clipPath",i._clipId,function(e){e.append("rect").attr({x:0,y:0})}).select("rect").attr({width:i._width,height:i._height})}function v(e,t,i,o){var l,c=t.calcdata,d=e.selectAll("g."+p.rangePlotClassName).data(i._subplotsWith,a.identity);d.enter().append("g").attr("class",function(e){return p.rangePlotClassName+" "+e}).call(s.setClipUrl,o._clipId,t),d.order(),d.exit().remove(),d.each(function(e,a){var s=r.select(this),d=h.getFromId(t,e,"y"),f=d._name,p=o[f],m={data:[],layout:{xaxis:{type:i.type,domain:[0,1],range:o.range.slice(),calendar:i.calendar},width:o._width,height:o._height,margin:{t:0,b:0,l:0,r:0}},_context:t._context};i.rangebreaks&&(m.layout.xaxis.rangebreaks=i.rangebreaks),m.layout[f]={type:d.type,domain:[0,1],range:"match"!==p.rangemode?p.range.slice():d.range.slice(),calendar:d.calendar},d.rangebreaks&&(m.layout[f].rangebreaks=d.rangebreaks),n.supplyDefaults(m);var g=m._fullLayout.xaxis,y=m._fullLayout[f];g.clearCalc(),g.setScale(),y.clearCalc(),y.setScale();var v={id:e,plotgroup:s,xaxis:g,yaxis:y,isRangePlot:!0};0===a?l=v:(v.mainplot="xy",v.mainplotinfo=l),u.rangePlot(t,v,function(e,t){for(var r=[],i=0;i=i.max)t=j[r+1];else if(e=i.pmax)t=j[r+1];else if(en._length||v+_<0)return;u=y+_,d=v+_;break;case l:if(b="col-resize",y+_>n._length)return;u=y+_,d=v;break;case c:if(b="col-resize",v+_<0)return;u=y,d=v+_;break;default:b="ew-resize",u=g,d=g+_}if(d0)){var m=function(e,t,r){for(var i=r.filter(function(r){return t[r].anchor===e._id}),n=0,a=0;a1))return void delete t.grid;d||f||p||"independent"===M("pattern")&&(d=!0),g._hasSubplotGrid=d;var x,b,_=M("roworder"),w=d?.2:.1,T=d?.3:.1;m&&t._splomGridDflt&&(x=t._splomGridDflt.xside,b=t._splomGridDflt.yside),g._domains={x:c("x",M,w,x,v),y:c("y",M,T,b,y,"top to bottom"===_)}}function M(e,t){return r.coerce(i,g,s,e,t)}},contentDefaults:function(e,t){var r=t.grid;if(!(!r||!r._domains)){var i,n,a,o,s,c,h,d=e.grid||{},f=t._subplots,p=r._hasSubplotGrid,m=r.rows,g=r.columns,y="independent"===r.pattern,v=r._axisMap={};if(p){var x=d.subplots||[];c=r.subplots=Array(m);var b=1;for(i=0;i0,h=e._context.staticPlot;t.each(function(t){var d,f=t[0].trace,p=f.error_x||{},m=f.error_y||{};f.ids&&(d=function(e){return e.id});var g=a.hasMarkers(f)&&f.marker.maxdisplayed>0;m.visible||p.visible||(t=[]);var y=r.select(this).selectAll("g.errorbar").data(t,d);if(y.exit().remove(),t.length){p.visible||y.selectAll("path.xerror").remove(),m.visible||y.selectAll("path.yerror").remove(),y.style("opacity",1);var v=y.enter().append("g").classed("errorbar",!0);u&&v.style("opacity",0).transition().duration(s.duration).style("opacity",1),n.setClipUrl(y,o.layerClipId,e),y.each(function(e){var t=r.select(this),n=(a=e,o=l,d=c,f={x:o.c2p(a.x),y:d.c2p(a.y)},void 0!==a.yh&&(f.yh=d.c2p(a.yh),f.ys=d.c2p(a.ys),i(f.ys)||(f.noYS=!0,f.ys=d.c2p(a.ys,!0))),void 0!==a.xh&&(f.xh=o.c2p(a.xh),f.xs=o.c2p(a.xs),i(f.xs)||(f.noXS=!0,f.xs=o.c2p(a.xs,!0))),f);if(!(g&&!e.vis)){var a,o,d,f,y,v=t.select("path.yerror");if(m.visible&&i(n.x)&&i(n.yh)&&i(n.ys)){var x=m.width;y="M"+(n.x-x)+","+n.yh+"h"+2*x+"m-"+x+",0V"+n.ys,n.noYS||(y+="m-"+x+",0h"+2*x),v.size()?u&&(v=v.transition().duration(s.duration).ease(s.easing)):v=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0),v.attr("d",y)}else v.remove();var b=t.select("path.xerror");if(p.visible&&i(n.y)&&i(n.xh)&&i(n.xs)){var _=(p.copy_ystyle?m:p).width;y="M"+n.xh+","+(n.y-_)+"v"+2*_+"m0,-"+_+"H"+n.xs,n.noXS||(y+="m0,-"+_+"v"+2*_),b.size()?u&&(b=b.transition().duration(s.duration).ease(s.easing)):b=t.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0),b.attr("d",y)}else b.remove()}})}})}}}),al=p({"src/components/errorbars/style.js"(e,t){var r=T(),i=ee();t.exports=function(e){e.each(function(e){var t=e[0].trace,n=t.error_y||{},a=t.error_x||{},o=r.select(this);o.selectAll("path.yerror").style("stroke-width",n.thickness+"px").call(i.stroke,n.color),a.copy_ystyle&&(a=n),o.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(i.stroke,a.color)})}}}),ac=p({"src/components/errorbars/index.js"(e,t){var r=tv(),i=eq().overrideAll,n=ai(),a={error_x:r.extendFlat({},n),error_y:r.extendFlat({},n)};delete a.error_x.copy_zstyle,delete a.error_y.copy_zstyle,delete a.error_y.copy_ystyle;var o={error_x:r.extendFlat({},n),error_y:r.extendFlat({},n),error_z:r.extendFlat({},n)};delete o.error_x.copy_ystyle,delete o.error_y.copy_ystyle,delete o.error_z.copy_ystyle,delete o.error_z.copy_zstyle,t.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:a,bar:a,histogram:a,scatter3d:i(o,"calc","nested"),scattergl:i(a,"calc","nested")}},supplyDefaults:an(),calc:ao(),makeComputeError:aa(),plot:as(),style:al(),hoverInfo:function(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}}}}),au=p({"src/components/colorbar/constants.js"(e,t){t.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),ah=p({"src/components/colorbar/draw.js"(e,t){var r=T(),i=tD(),n=eQ(),a=rn(),o=rd(),s=tv(),l=s.strTranslate,c=q().extendFlat,u=rf(),h=t9(),d=ee(),f=re(),p=tF(),m=tj().flipScale,g=nu(),y=nh(),v=tN(),x=tR(),b=x.LINE_SPACING,_=x.FROM_TL,w=x.FROM_BR,M=au().cn,k=(e,t)=>[Math.min(e[0]+t,e[1]),e[1]],A=(e,t)=>[e[0],Math.max(e[1]-t,e[0])];t.exports={draw:function(e){var t=e._fullLayout._infolayer.selectAll("g."+M.colorbar).data(function(e){var t,r,i,n,a=e._fullLayout,o=e.calcdata,s=[];function l(e){return c(e,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){"function"==typeof n.calc?n.calc(e,i,t):(t._fillgradient=r.reversescale?m(r.colorscale):r.colorscale,t._zrange=[r[n.min],r[n.max]])}for(var h=0;h0?r>=s:r<=s));i++)r>c&&r0?r>=s:r<=s));i++)r>t[0]&&r1){var ep=Math.pow(10,Math.floor(Math.log(ef)/Math.LN10));eh*=ep*s.roundUp(ef/ep,[2,5,10]),(Math.abs(Y.start)/Y.size+1e-6)%1<2e-6&&(ec.tick0=0)}ec.dtick=eh}var em=o?z/B.h:I/B.w;ec.domain=A(k([es,es+ee],em),em),ec.setScale(),e.attr("transform",l(Math.round(B.l),Math.round(B.t)));var eg,ey=e.select("."+M.cbtitleunshift).attr("transform",l(-Math.round(B.l),-Math.round(B.t))),ev=ec.ticklabelposition,ex=ec.title.font.size,eb=e.select("."+M.cbaxis),e_=0,ew=0;function eT(r,i){var a={propContainer:ec,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:j._dfltTitle.colorbar,containerGroup:e.select("."+M.cbtitle)},o="h"===r.charAt(0)?r.slice(1):"h"+r;e.selectAll("."+o+",."+o+"-math-group").remove(),f.draw(n,r,c(a,i||{}))}return s.syncOrAsync([i.previousPromises,function(){if(o&&eu||!o&&!eu){var e,t;"top"===q&&(e=I+B.l+et*D,t=z+B.t+er*(1-es-ee)+3+.75*ex),"bottom"===q&&(e=I+B.l+et*D,t=z+B.t+er*(1-es)-3-.25*ex),"right"===q&&(t=z+B.t+er*O+3+.75*ex,e=I+B.l+et*es),eT(ec._id+"title",{attributes:{x:e,y:t,"text-anchor":o?"start":"middle"}})}},function(){if(!o&&!eu||o&&eu){var i,c=e.select("."+M.cbtitle),u=c.select("text"),f=[-S/2,S/2],m=c.select(".h"+ec._id+"title-math-group").node(),g=15.6;if(u.node()&&(g=parseInt(u.node().style.fontSize,10)*b),m?(ew=(i=h.bBox(m)).width,(e_=i.height)>g&&(f[1]-=(e_-g)/2)):u.node()&&!u.classed(M.jsPlaceholder)&&(ew=(i=h.bBox(u.node())).width,e_=i.height),o){if(e_){if(e_+=5,"top"===q)ec.domain=A(ec.domain,e_/B.h),f[1]*=-1;else{ec.domain=k(ec.domain,e_/B.h);var y=p.lineCount(u);f[1]+=(1-y)*g}c.attr("transform",l(f[0],f[1])),ec.setScale()}}else ew&&("right"===q&&(ec.domain=k(ec.domain,(ew+ex/2)/B.w)),c.attr("transform",l(f[0],f[1])),ec.setScale())}e.selectAll("."+M.cbfills+",."+M.cblines).attr("transform",o?l(0,Math.round(B.h*(1-ec.domain[1]))):l(Math.round(B.w*ec.domain[0]),0)),eb.attr("transform",o?l(0,Math.round(-B.t)):l(Math.round(-B.l),0));var v=e.select("."+M.cbfills).selectAll("rect."+M.cbfill).attr("style","").data($);v.enter().append("rect").classed(M.cbfill,!0).attr("style",""),v.exit().remove();var x=H.map(ec.c2p).map(Math.round).sort(function(e,t){return e-t});v.each(function(e,i){var a=[0===i?H[0]:($[i]+$[i-1])/2,i===$.length-1?H[1]:($[i]+$[i+1])/2].map(ec.c2p).map(Math.round);o&&(a[1]=s.constrain(a[1]+(a[1]>a[0])?1:-1,x[0],x[1]));var l=r.select(this).attr(o?"x":"y",ei).attr(o?"y":"x",r.min(a)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max(r.max(a)-r.min(a),2));if(t._fillgradient)h.gradient(l,n,t._id,o?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var c=W(e).replace("e-","");l.attr("fill",d.hexString(c))}});var _=e.select("."+M.cblines).selectAll("path."+M.cbline).data(U.color&&U.width?X:[]);_.enter().append("path").classed(M.cbline,!0),_.exit().remove(),_.each(function(e){var t=Math.round(ec.c2p(e))+U.width/2%1;r.select(this).attr("d","M"+(o?ei+","+t:t+","+ei)+(o?"h":"v")+K).call(h.lineGroupStyle,U.width,G(e),U.dash)}),eb.selectAll("g."+ec._id+"tick,path").remove();var w=ei+K+(S||0)/2-("outside"===t.ticks),T=a.calcTicks(ec),E=a.getTickSigns(ec)[2];return a.drawTicks(n,ec,{vals:"inside"===ec.ticks?a.clipEnds(ec,T):T,layer:eb,path:a.makeTickPath(ec,w,E),transFn:a.makeTransTickFn(ec)}),a.drawLabels(n,ec,{vals:T,layer:eb,transFn:a.makeTransTickLabelFn(ec),labelFns:a.makeLabelFns(ec,w)})},function(){if(o&&!eu||!o&&eu){var e,i,a=ec.position||0,s=ec._offset+ec._length/2;if("right"===q)i=s,e=B.l+et*a+10+ex*(ec.showticklabels?1:.5);else if(e=s,"bottom"===q&&(i=B.t+er*a+10+(-1===ev.indexOf("inside")?ec.tickfont.size:0)+("inside"!==ec.ticks&&t.ticklen||0)),"top"===q){var l=V.text.split("
").length;i=B.t+er*a+10-K-b*ex*l}eT((o?"h":"v")+ec._id+"title",{avoid:{selection:r.select(n).selectAll("g."+ec._id+"tick"),side:q,offsetTop:o?0:B.t,offsetLeft:o?B.l:0,maxShift:o?j.width:j.height},attributes:{x:e,y:i,"text-anchor":"middle"},transform:{rotate:o?-90:0,offset:0}})}},i.previousPromises,function(){var r,a=K+S/2;-1===ev.indexOf("inside")&&(r=h.bBox(eb.node()),a+=o?r.width:r.height),eg=ey.select("text");var s=0,c=o&&"top"===q,f=!o&&"right"===q,p=0;if(eg.node()&&!eg.classed(M.jsPlaceholder)){var g,y=ey.select(".h"+ec._id+"title-math-group").node();y&&(o&&eu||!o&&!eu)?(s=(r=h.bBox(y)).width,g=r.height):(s=(r=h.bBox(ey.node())).right-B.l-(o?ei:el),g=r.bottom-B.t-(o?el:ei),o||"top"!==q||(a+=r.height,p=r.height)),f&&(eg.attr("transform",l(s/2+ex/2,0)),s*=2),a=Math.max(a,o?s:g)}var v=(o?I:z)*2+a+E+S/2,b=0;!o&&V.text&&"bottom"===P&&O<=0&&(b=v/2,v+=b,p+=b),j._hColorbarMoveTitle=b,j._hColorbarMoveCBTitle=p;var k=E+S,A=(o?ei:el)-k/2-(o?I:0),N=(o?el:ei)-(o?Q:z+p-b);e.select("."+M.cbbg).attr("x",A).attr("y",N).attr(o?"width":"height",Math.max(v-b,2)).attr(o?"height":"width",Math.max(Q+k,2)).call(d.fill,C).call(d.stroke,t.bordercolor).style("stroke-width",E);var U=f?Math.max(s-10,0):0;e.selectAll("."+M.cboutline).attr("x",(o?ei:el+I)+U).attr("y",(o?el+z-Q:ei)+(c?e_:0)).attr(o?"width":"height",Math.max(K,2)).attr(o?"height":"width",Math.max(Q-(o?2*z+e_:2*I+U),2)).call(d.stroke,t.outlinecolor).style({fill:"none","stroke-width":S});var H=o?en*v:0,G=o?0:(1-ea)*v-p;if(H=F?B.l-H:-H,G=R?B.t-G:-G,e.attr("transform",l(H,G)),!o&&(E||d.opacity(C)&&!d.equals(j.paper_bgcolor,C))){var W=eb.selectAll("text"),Y=W[0].length,Z=e.select("."+M.cbbg).node(),$=h.bBox(Z),X=h.getTranslate(e);W.each(function(e,t){var r=Y-1;if(0===t||t===r){var i,n=h.bBox(this),a=h.getTranslate(this);if(t===r){var o=n.right+a.x;(i=$.right+X.x+el-E-2+D-o)>0&&(i=0)}else if(0===t){var s=n.left+a.x;(i=$.left+X.x+el+E+2-s)<0&&(i=0)}i&&(Y<3?this.setAttribute("transform","translate("+i+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var J={},ee=_[L],et=w[L],er=_[P],eo=w[P],es=v-K;o?("pixels"===m?(J.y=O,J.t=Q*er,J.b=Q*eo):(J.t=J.b=0,J.yt=O+u*er,J.yb=O-u*eo),"pixels"===T?(J.x=D,J.l=v*ee,J.r=v*et):(J.l=es*ee,J.r=es*et,J.xl=D-x*ee,J.xr=D+x*et)):("pixels"===m?(J.x=D,J.l=Q*ee,J.r=Q*et):(J.l=J.r=0,J.xl=D+u*ee,J.xr=D-u*et),"pixels"===T?(J.y=1-O,J.t=v*er,J.b=v*eo):(J.t=es*er,J.b=es*eo,J.yt=O-x*er,J.yb=O+x*eo));var eh=t.y<.5?"b":"t",ed=t.x<.5?"l":"r";n._fullLayout._reservedMargin[t._id]={};var ef={r:j.width-A-H,l:A+J.r,b:j.height-N-G,t:N+J.b};F&&R?i.autoMargin(n,t._id,J):F?n._fullLayout._reservedMargin[t._id][eh]=ef[eh]:R||o?n._fullLayout._reservedMargin[t._id][ed]=ef[ed]:n._fullLayout._reservedMargin[t._id][eh]=ef[eh]}],n)}(I,t,e);z&&z.then&&(e._promises||[]).push(z),e._context.edits.colorbarPosition&&(m=I,x=t,T=e,L="v"===x.orientation,P=T._fullLayout._size,o.init({element:m.node(),gd:T,prepFn:function(){S=m.attr("transform"),u(m)},moveFn:function(e,t){m.attr("transform",S+l(e,t)),E=o.align((L?x._uFrac:x._vFrac)+e/P.w,L?x._thickFrac:x._lenFrac,0,1,x.xanchor),C=o.align((L?x._vFrac:1-x._uFrac)-t/P.h,L?x._lenFrac:x._thickFrac,0,1,x.yanchor),u(m,o.getCursor(E,C,x.xanchor,x.yanchor))},doneFn:function(){if(u(m),void 0!==E&&void 0!==C){var e={};e[x._propPrefix+"x"]=E,e[x._propPrefix+"y"]=C,void 0!==x._traceIndex?n.call("_guiRestyle",T,e,x._traceIndex):n.call("_guiRelayout",T,e)}}}))}),t.exit().each(function(t){i.autoMargin(e,t._id)}).remove(),t.order()}}}}),ad=p({"src/components/colorbar/index.js"(e,t){t.exports={moduleType:"component",name:"colorbar",attributes:tU(),supplyDefaults:tJ(),draw:ah().draw,hasColorbar:tH()}}}),af=p({"src/components/legend/index.js"(e,t){t.exports={moduleType:"component",name:"legend",layoutAttributes:rm(),supplyLayoutDefaults:ry(),draw:rk(),style:rM()}}}),ap=p({"src/locale-en.js"(e,t){t.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"}}}}),am=p({"src/locale-en-us.js"(e,t){t.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}}}),ag=p({"src/snapshot/cloneplot.js"(e,t){var r=eQ(),i=tv(),n=i.extendFlat,a=i.extendDeep;function o(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}t.exports=function(e,t){var i,s=e.data,l=e.layout,c=a([],s),u=a({},l,o(t.tileClass));if(e._context,t.width&&(u.width=t.width),t.height&&(u.height=t.height),"thumbnail"===t.tileClass||"themes__thumb"===t.tileClass){u.annotations=[];var h=Object.keys(u);for(i=0;i-1&&(u[h[i]].title={text:""});for(i=0;i=0)return e}else if("string"==typeof e&&"%"===(e=e.trim()).slice(-1)&&r(e.slice(0,-1))&&(e=+e.slice(0,-1))>=0)return e+"%"}function f(e,t,r,n,a,o){var s=!1!==(o=o||{}).moduleHasSelected,l=!1!==o.moduleHasUnselected,c=!1!==o.moduleHasConstrain,u=!1!==o.moduleHasCliponaxis,d=!1!==o.moduleHasTextangle,f=!1!==o.moduleHasInsideanchor,p=!!o.hasPathbar,m=Array.isArray(a)||"auto"===a,g=m||"inside"===a,y=m||"outside"===a;if(g||y){var v=h(n,"textfont",r.font),x=i.extendFlat({},v),b=!(e.textfont&&e.textfont.color);if(b&&delete x.color,h(n,"insidetextfont",x),p){var _=i.extendFlat({},v);b&&delete _.color,h(n,"pathbar.textfont",_)}y&&h(n,"outsidetextfont",v),s&&n("selected.textfont.color"),l&&n("unselected.textfont.color"),c&&n("constraintext"),u&&n("cliponaxis"),d&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}g&&f&&n("insidetextanchor")}t.exports={supplyDefaults:function(e,t,r,c){function h(r,n){return i.coerce(e,t,u,r,n)}if(!o(e,t,c,h)){t.visible=!1;return}s(e,t,c,h),h("xhoverformat"),h("yhoverformat"),h("zorder"),h("orientation",t.x&&!t.y?"h":"v"),h("base"),h("offset"),h("width"),h("text"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback");var d=h("textposition");f(e,t,c,h,d,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),l(e,t,h,r,c);var p=(t.marker.line||{}).color,m=a.getComponentMethod("errorbars","supplyDefaults");m(e,t,p||n.defaultLine,{axis:"y"}),m(e,t,p||n.defaultLine,{axis:"x",inherit:"y"}),i.coerceSelectionMarkerOpacity(t,h)},crossTraceDefaults:function(e,t){var r,n;function a(e,t){return i.coerce(n._input,n,u,e,t)}for(var o=0;o0&&!d[y]&&(h=!0)),d[y]=!0,g.visible&&"histogram"===g.type&&"category"!==i.getFromId({_fullLayout:t},g["v"===g.orientation?"xaxis":"yaxis"]).type&&(u=!0)}}c?("overlay"!==f&&l("barnorm"),l("bargap",u&&!h?0:.2),l("bargroupgap"),t.barcornerradius=o(l("barcornerradius"))):delete t.barmode}}}),aA=p({"src/traces/bar/arrays_to_calcdata.js"(e,t){var r=tv();t.exports=function(e,t){for(var i=0;ia))return t}return void 0!==i?i:e.dflt},e.coerceColor=function(e,r,i){return t.isValid(r)?r:void 0!==i?i:e.dflt},e.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t*=1),-1!==e.values.indexOf(t)?t:void 0!==r?r:e.dflt},e.getValue=function(e,t){var r;return i(e)?t1||0===n.bargap&&0===n.bargroupgap&&!e[0].trace.marker.line.width)&&r.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(t){f(r.select(this),t[0].trace,e)}),o.getComponentMethod("errorbars","style")(t)},styleTextPoints:p,styleOnSelect:function(e,t,i){var s,l,c,u,h,d,p=t[0].trace;p.selectedpoints?(s=i,l=p,c=e,n.selectedPointStyle(s.selectAll("path"),l),u=s.selectAll("text"),h=l,d=c,u.each(function(e){var t,i=r.select(this);if(e.selected){t=a.ensureUniformFontSize(d,m(i,e,h,d));var o=h.selected.textfont&&h.selected.textfont.color;o&&(t.color=o),n.font(i,t)}else n.selectedTextStyle(i,h)})):(f(i,p,e),o.getComponentMethod("errorbars","style")(i))},getInsideTextFont:y,getOutsideTextFont:v,getBarColor:b,resizeText:s}}}),aP=p({"src/traces/bar/plot.js"(e,t){var r=T(),i=C(),n=tv(),a=tF(),o=ee(),s=t9(),l=eQ(),c=rn().tickText,u=aE(),h=u.recordMinTextSize,d=u.clearMinTextSize,f=aL(),p=aC(),m=i5(),g=a_(),y=g.text,v=g.textposition,x=t6().appendArrayPointValue,b=m.TEXTPAD;function _(e){return e.id}function w(e,t,r,i){var n;return!t.uniformtext.mode&&M(r)?(i&&(n=i()),e.transition().duration(r.duration).ease(r.easing).each("end",function(){n&&n()}).each("interrupt",function(){n&&n()})):e}function M(e){return e&&e.duration>0}function k(e,t,r,i,n){return!(e<0)&&!(t<0)&&(r<=e&&i<=t||r<=t&&i<=e||(n?e>=t/i*r:t>=e/r*i))}function A(e){return"auto"===e?0:e}function S(e,t){var r=Math.PI/180*t,i=Math.abs(Math.sin(r)),n=Math.abs(Math.cos(r));return{x:e.width*n+e.height*i,y:e.width*i+e.height*n}}function E(e,t,r,i,n,a){var o=!!a.isHorizontal,s=!!a.constrained,l=a.angle||0,c=a.anchor,u="end"===c,h="start"===c,d=((a.leftToRight||0)+1)/2,f=1-d,p=a.hasB,m=a.r,g=a.overhead,y=n.width,v=n.height,x=Math.abs(t-e),_=Math.abs(i-r),w=x>2*b&&_>2*b?b:0;x-=2*w,_-=2*w;var T=A(l);"auto"===l&&!(y<=x&&v<=_)&&(y>x||v>_)&&(!(y>_||v>x)||yb){var C,L,P,I,z,D,O,R,F,j,B,N,U,V,q,H,G,W=(C=e,L=t,P=r,I=i,z=E,D=m,O=g,R=o,F=p,V=Math.max(0,Math.abs(L-C)-2*b),q=Math.max(0,Math.abs(I-P)-2*b),H=D-b,G=O?H-Math.sqrt(H*H-(H-O)*(H-O)):H,z.y/z.x>=q/(V-(F?2*H:R?H-O:2*G))?N=q/z.y:z.y/z.x<=(q-(F?2*H:R?2*G:H-O))/V?N=V/z.x:!F&&R?(j=z.x*z.x+z.y*z.y/4,N=(-(B=-2*z.x*(V-H)-z.y*(q/2-H))+Math.sqrt(B*B-4*j*((V-H)*(V-H)+(q/2-H)*(q/2-H)-H*H)))/(2*j)):F?(j=(z.x*z.x+z.y*z.y)/4,N=(-(B=-z.x*(V/2-H)-z.y*(q/2-H))+Math.sqrt(B*B-4*j*((V/2-H)*(V/2-H)+(q/2-H)*(q/2-H)-H*H)))/(2*j)):(j=z.x*z.x/4+z.y*z.y,N=(-(B=-z.x*(V/2-H)-2*z.y*(q-H))+Math.sqrt(B*B-4*j*((V/2-H)*(V/2-H)+(q-H)*(q-H)-H*H)))/(2*j)),N=Math.min(1,N),U=R?Math.max(0,H-Math.sqrt(Math.max(0,H*H-(H-(q-z.y*N)/2)*(H-(q-z.y*N)/2)))-O):Math.max(0,H-Math.sqrt(Math.max(0,H*H-(H-(V-z.x*N)/2)*(H-(V-z.x*N)/2)))-O),{scale:N,pad:U});M=W.scale,k=W.pad}else M=1,s&&(M=Math.min(1,x/E.x,_/E.y)),k=0;var Y=n.left*f+n.right*d,Z=(n.top+n.bottom)/2,$=(e+b)*f+(t-b)*d,X=(r+i)/2,K=0,J=0;if(h||u){var Q=(o?E.x:E.y)/2;m&&(u||p)&&(w+=k);var ee=o?eo.opacity(Q)||J>.01?W:function(e,t,r){return r&&e===t?e:Math.abs(e-t)>=2?W(e):e>t?Math.ceil(e):Math.floor(e)};e._context.staticPlot||(D=Y(D,U,B),U=Y(U,D,B),V=Y(V,q,!B),q=Y(q,V,!B));var Z,$,X,K,J,Q,ee,et=B?C.c2p:L.c2p;ee=u.s0>0?u._sMax:u.s0<0?u._sMin:u.s1>0?u._sMax:u._sMin;var er,ei,en=R||O?function(e,t){if(!e)return 0;var r=Math.abs(B?q-V:U-D),i=Math.abs(B?U-D:q-V),n=Y(Math.abs(et(ee,!0)-et(0,!0))),a=u.hasB?Math.min(r/2,i/2):Math.min(r/2,n);return Y(Math.max(Math.min("%"===t?Math.min(50,e)/100*r:e,a),0))}(m.cornerradiusvalue,m.cornerradiusform):0,ea="M"+D+","+V+"V"+q+"H"+U+"V"+V+"Z",eo=0;if(en&&u.s){var es,el,ec,eu=0==((es=u.s0)>0)-(es<0)||((el=u.s)>0)-(el<0)==((ec=u.s0)>0)-(ec<0)?u.s1:u.s0;if((eo=Y(u.hasB?0:Math.abs(et(ee,!0)-et(eu,!0))))0?Math.sqrt(eo*(2*en-eo)):0,eg=eh>0?Math.max:Math.min;er="M"+D+","+V+"V"+(q-ep*ed)+"H"+eg(U-(en-eo)*eh,D)+"A "+en+","+en+" 0 0 "+ef+" "+U+","+(q-en*ed-em)+"V"+(V+en*ed+em)+"A "+en+","+en+" 0 0 "+ef+" "+eg(U-(en-eo)*eh,D)+","+(V+ep*ed)+"Z"}else if(u.hasB)er="M"+(D+en*eh)+","+V+"A "+en+","+en+" 0 0 "+ef+" "+D+","+(V+en*ed)+"V"+(q-en*ed)+"A "+en+","+en+" 0 0 "+ef+" "+(D+en*eh)+","+q+"H"+(U-en*eh)+"A "+en+","+en+" 0 0 "+ef+" "+U+","+(q-en*ed)+"V"+(V+en*ed)+"A "+en+","+en+" 0 0 "+ef+" "+(U-en*eh)+","+V+"Z";else{var ey=(ei=Math.abs(q-V)+eo)0?Math.sqrt(eo*(2*en-eo)):0,ex=ed>0?Math.max:Math.min;er="M"+(D+ey*eh)+","+V+"V"+ex(q-(en-eo)*ed,V)+"A "+en+","+en+" 0 0 "+ef+" "+(D+en*eh-ev)+","+q+"H"+(U-en*eh+ev)+"A "+en+","+en+" 0 0 "+ef+" "+(U-ey*eh)+","+ex(q-(en-eo)*ed,V)+"V"+V+"Z"}}else er=ea}else er=ea;var eb=w(n.ensureSingle(M,"path"),P,g,T);if(eb.style("vector-effect",I?"none":"non-scaling-stroke").attr("d",isNaN((U-D)*(q-V))||H&&e._context.staticPlot?"M0,0Z":er).call(s.setClipUrl,t.layerClipId,e),!P.uniformtext.mode&&N){var e_=s.makePointStyleFns(d);s.singlePointStyle(u,eb,d,e_,e)}(function(e,t,r,i,o,l,u,d,m,g,_,T,M){var C,L,P,I,z,D,O,R,F,j,B,N,U,V,q,H,G,W,Y,Z,$,X,K,J,Q,ee,et=t.xaxis,er=t.yaxis,ei=e._fullLayout;function en(t,r,i){return n.ensureSingle(t,"text").text(r).attr({class:"bartext bartext-"+ee,"text-anchor":"middle","data-notex":1}).call(s.font,i).call(a.convertToTspans,e)}var ea=i[0].trace,eo="h"===ea.orientation,es=function(e,t,r,i){for(var n=!1,a=!1,o=0;o0?n=!0:s<0&&(a=!0),n&&a)return 0}var l=t?r:i,c=-(l.range[0]1;g("percent initial")&&(h=n.formatPercent(f.begR),b&&(h+=" of initial"),m.push(h)),g("percent previous")&&(h=n.formatPercent(f.difR),b&&(h+=" of previous"),m.push(h)),g("percent total")&&(h=n.formatPercent(f.sumR),b&&(h+=" of total"),m.push(h))}return m.join("
")}(e_,ew,eT,eM):p.getValue(eA.text,ew),p.coerceString(y,ek));eS=ea,eE=o,eC=p.getValue(eS.textposition,eE),ee=p.coerceEnumerated(v,eC);var ec="stack"===T.mode||"relative"===T.mode,eu=i[o],eh=!ec||eu._outmost,ed=eu.hasB,ef=g&&g-_>b;if(!el||"none"===ee||(eu.isBlank||l===u||d===m)&&("auto"===ee||"inside"===ee))return r.select("text").remove();var ep=ei.font,em=f.getBarColor(i[o],ea),eg=f.getInsideTextFont(ea,o,ep,em),ey=f.getOutsideTextFont(ea,o,ep),ev=ea.insidetextanchor||"end",ex=r.datum();eo?"log"===et.type&&ex.s0<=0&&(l=et.range[0]0&&ez>0;eF=ef?ed?k(eO-2*g,eR,eI,ez,eo)||k(eO,eR-2*g,eI,ez,eo):eo?k(eO-(g-_),eR,eI,ez,eo)||k(eO,eR-2*(g-_),eI,ez,eo):k(eO,eR-(g-_),eI,ez,eo)||k(eO-2*(g-_),eR,eI,ez,eo):k(eO,eR,eI,ez,eo),ej&&eF?ee="inside":(ee="outside",eL.remove(),eL=null)}else ee="inside";if(!eL){var eB=(eL=en(r,el,eD=n.ensureUniformFontSize(e,"outside"===ee?ey:eg))).attr("transform");if(eL.attr("transform",""),eI=(eP=s.bBox(eL.node())).width,ez=eP.height,eL.attr("transform",eB),eI<=0||ez<=0)return eL.remove()}var eN,eU=ea.textangle;(eN="outside"===ee?(C=l,L=u,P=d,I=m,z=eP,R=!!(D={isHorizontal:eo,constrained:"both"===ea.constraintext||"outside"===ea.constraintext,angle:eU,zeroBarDir:es}).isHorizontal,F=!!D.constrained,j=D.angle||0,B=z.width,N=z.height,U=Math.abs(L-C),V=Math.abs(I-P),O=R?V>2*b?b:0:U>2*b?b:0,q=1,F&&(q=R?Math.min(1,V/N):Math.min(1,U/B)),W=S(z,G=A(j)),Y=(R?W.x:W.y)/2,Z=(z.left+z.right)/2,$=(z.top+z.bottom)/2,X=(C+L)/2,K=(P+I)/2,J=0,Q=0,H=(R?C===L:P===I)&&D.zeroBarDir?D.zeroBarDir:R?L0?t+=r:u<0&&(t-=r)}return t}function z(e){var t=u,i=e.b,n=I(e);return r.inbox(i-t,n-t,_+(n-t)/(n-i)-1)}var D=e[h+"a"],O=e[d+"a"];m=Math.abs(D.r2c(D.range[1])-D.r2c(D.range[0]));var R=r.getDistanceFunction(n,f,p,function(e){return(f(e)+p(e))/2});if(r.getClosest(g,R,e),!1!==e.index&&g[e.index].p!==l){x||T||(E=function(e){return Math.min(M(e),e.p-v.bargroupwidth/2)},C=function(e){return Math.max(k(e),e.p+v.bargroupwidth/2)});var F,j,B,N=g[e.index],U=y.base?N.b+N.s:N.s;e[d+"0"]=e[d+"1"]=O.c2p(N[d],!0),e[d+"LabelVal"]=U;var V=v.extents[v.extents.round(N.p)];e[h+"0"]=D.c2p(x?E(N):V[0],!0),e[h+"1"]=D.c2p(x?C(N):V[1],!0);var q=void 0!==N.orig_p;return e[h+"LabelVal"]=q?N.orig_p:N.p,e.labelLabel=s(D,e[h+"LabelVal"],y[h+"hoverformat"]),e.valueLabel=s(O,e[d+"LabelVal"],y[d+"hoverformat"]),e.baseLabel=s(O,N.b,y[d+"hoverformat"]),F=u,j=N.b,B=I(N),e.spikeDistance=(r.inbox(j-F,B-F,w+(B-F)/(B-j)-1)+L(M(N),k(N),w))/2,e[h+"Spike"]=D.c2p(N.p,!0),a(N,y,e),e.hovertemplate=y.hovertemplate,e}}function u(e,t){var r=t.mcc||e.marker.color,i=t.mlcc||e.marker.line.color,a=o(e,t);return n.opacity(r)?r:n.opacity(i)&&a?i:void 0}t.exports={hoverPoints:function(e,t,r,n,a){var o=c(e,t,r,n,a);if(o){var s=o.cd,l=s[0].trace,h=s[o.index];return o.color=u(l,h),i.getComponentMethod("errorbars","hoverInfo")(h,l,o),[o]}},hoverOnBars:c,getTraceColor:u}}}),az=p({"src/traces/bar/event_data.js"(e,t){t.exports=function(e,t,r){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),"h"===r.orientation?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}}}),aD=p({"src/traces/bar/select.js"(e,t){t.exports=function(e,t){var r,i=e.cd,n=e.xaxis,a=e.yaxis,o=i[0].trace,s="funnel"===o.type,l="h"===o.orientation,c=[];if(!1===t)for(r=0;r0?(g="v",y=x>0?Math.min(_,b):Math.min(b)):x>0?(g="h",y=Math.min(_)):y=0;if(!y){t.visible=!1;return}t._length=y;var S=n("orientation",g);t._hasPreCompStats?"v"===S&&0===x?(n("x0",0),n("dx",1)):"h"===S&&0===v&&(n("y0",0),n("dy",1)):"v"===S&&0===x?n("x0"):"h"===S&&0===v&&n("y0"),i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y"],a)}function u(e,t,i,n){var a=n.prefix,o=r.coerce2(e,t,l,"marker.outliercolor"),s=i("marker.line.outliercolor"),c="outliers";t._hasPreCompStats?c="all":(o||s)&&(c="suspectedoutliers");var u=i(a+"points",c);u?(i("jitter",.3*("all"===u)),i("pointpos","all"===u?-1.5:0),i("marker.symbol"),i("marker.opacity"),i("marker.size"),i("marker.angle"),i("marker.color",t.line.color),i("marker.line.color"),i("marker.line.width"),"suspectedoutliers"===u&&(i("marker.line.outliercolor",t.marker.color),i("marker.line.outlierwidth")),i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size"),i("text"),i("hovertext")):delete t.marker;var h=i("hoveron");("all"===h||-1!==h.indexOf("points"))&&(i("hovertemplate"),i("hovertemplatefallback")),r.coerceSelectionMarkerOpacity(t,i)}t.exports={supplyDefaults:function(e,t,i,o){function s(i,n){return r.coerce(e,t,l,i,n)}if(c(e,t,s,o),!1!==t.visible){a(e,t,o,s),s("xhoverformat"),s("yhoverformat");var h=t._hasPreCompStats;h&&(s("lowerfence"),s("upperfence")),s("line.color",(e.marker||{}).color||i),s("line.width"),s("fillcolor",n.addOpacity(t.line.color,.5));var d=!1;if(h){var f=s("mean"),p=s("sd");f&&f.length&&(d=!0,p&&p.length&&(d="sd"))}s("whiskerwidth");var m,g=s("sizemode");"quartiles"===g&&(m=s("boxmean",d)),s("showwhiskers","quartiles"===g),("sd"===g||"sd"===m)&&s("sdmultiple"),s("width"),s("quartilemethod");var y=!1;if(h){var v=s("notchspan");v&&v.length&&(y=!0)}else r.validate(e.notchwidth,l.notchwidth)&&(y=!0);s("notched",y)&&s("notchwidth"),u(e,t,s,{prefix:"box"}),s("zorder")}},crossTraceDefaults:function(e,t){var i,n;function a(e){return r.coerce(n._input,n,l,e)}for(var s=0;sE.uf};if(t._hasPreCompStats){var U=t[x],V=function(e){return v.d2c((t[e]||[])[l])},q=1/0,H=-1/0;for(l=0;l=E.q1&&E.q3>=E.med){var W,Y=V("lowerfence");E.lf=Y!==o&&Y<=E.q1?Y:d(E,L,P);var Z=V("upperfence");E.uf=Z!==o&&Z>=E.q3?Z:f(E,L,P);var $=V("mean");E.mean=$!==o?$:P?a.mean(L,P):(E.q1+E.q3)/2;var X=V("sd");E.sd=$!==o&&X>=0?X:P?a.stdev(L,P,E.mean):E.q3-E.q1,E.lo=p(E),E.uo=m(E);var K=V("notchspan");K=K!==o&&K>0?K:g(E,P),E.ln=E.med-K,E.un=E.med+K;var J=E.lf,Q=E.uf;t.boxpoints&&L.length&&(J=Math.min(J,L[0]),Q=Math.max(Q,L[P-1])),t.notched&&(J=Math.min(J,E.ln),Q=Math.max(Q,E.un)),E.min=J,E.max=Q}else a.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+E.q1,"median = "+E.med,"q3 = "+E.q3].join(` +`)),W=E.med!==o?E.med:E.q1!==o?E.q3!==o?(E.q1+E.q3)/2:E.q1:E.q3!==o?E.q3:0,E.med=W,E.q1=E.q3=W,E.lf=E.uf=W,E.mean=E.sd=W,E.ln=E.un=W,E.min=E.max=W;q=Math.min(q,E.min),H=Math.max(H,E.max),E.pts2=C.filter(N),A.push(E)}}t._extremes[v._id]=i.findExtremes(v,[q,H],{padded:!0})}else{var ee,et,er=v.makeCalcdata(t,x),ei=function(e,t){for(var r=e.length,i=Array(r+1),n=0;n=0&&eo0){((E={}).pos=E[_]=j[l],C=E.pts=ea[l].sort(u),P=(L=E[x]=C.map(h)).length,E.min=L[0],E.max=L[P-1],E.mean=a.mean(L,P),E.sd=a.stdev(L,P,E.mean)*t.sdmultiple,E.med=a.interp(L,.5),P%2&&(eu||eh))?(eu?(ee=L.slice(0,P/2),et=L.slice(P/2+1)):eh&&(ee=L.slice(0,P/2+1),et=L.slice(P/2)),E.q1=a.interp(ee,.5),E.q3=a.interp(et,.5)):(E.q1=a.interp(L,.25),E.q3=a.interp(L,.75)),E.lf=d(E,L,P),E.uf=f(E,L,P),E.lo=p(E),E.uo=m(E);var ed=g(E,P);E.ln=E.med-ed,E.un=E.med+ed,es=Math.min(es,E.ln),el=Math.max(el,E.un),E.pts2=C.filter(N),A.push(E)}t.notched&&a.isTypedArray(er)&&(er=Array.from(er)),t._extremes[v._id]=i.findExtremes(v,t.notched?er.concat([es,el]):er,{padded:!0})}return function(e,t){if(a.isArrayOrTypedArray(t.selectedpoints))for(var r=0;r0?(A[0].t={num:T[S],dPos:B,posLetter:_,valLetter:x,labels:{med:s(e,"median:"),min:s(e,"min:"),q1:s(e,"q1:"),q3:s(e,"q3:"),max:s(e,"max:"),mean:"sd"===t.boxmean||"sd"===t.sizemode?s(e,"mean \xb1 σ:").replace("σ",1===t.sdmultiple?"σ":t.sdmultiple+"σ"):s(e,"mean:"),lf:s(e,"lower fence:"),uf:s(e,"upper fence:")}},T[S]++,A):[{t:{empty:!0}}]};var l={text:"tx",hovertext:"htx"};function c(e,t,r){for(var i in l)a.isArrayOrTypedArray(t[i])&&(Array.isArray(r)?a.isArrayOrTypedArray(t[i][r[0]])&&(e[l[i]]=t[i][r[0]][r[1]]):e[l[i]]=t[i][r])}function u(e,t){return e.v-t.v}function h(e){return e.v}function d(e,t,r){return 0===r?e.q1:Math.min(e.q1,t[Math.min(a.findBin(2.5*e.q1-1.5*e.q3,t,!0)+1,r-1)])}function f(e,t,r){return 0===r?e.q3:Math.max(e.q3,t[Math.max(a.findBin(2.5*e.q3-1.5*e.q1,t),0)])}function p(e){return 4*e.q1-3*e.q3}function m(e){return 4*e.q3-3*e.q1}function g(e,t){return 0===t?0:1.57*(e.q3-e.q1)/Math.sqrt(t)}}}),aV=p({"src/traces/box/cross_trace_calc.js"(e,t){var r=rn(),i=tv(),n=r8().getAxisGroup,a=["v","h"];function o(e,t,a,o){var s,l,c,u=t.calcdata,h=t._fullLayout,d=o._id,f=d.charAt(0),p=[],m=0;for(s=0;s1,b=1-h[e+"gap"],_=1-h[e+"groupgap"];for(s=0;s0;if("positive"===C?(D=w*(E?1:.5),R=V,O=R=M):"negative"===C?(D=R=M,O=w*(E?1:.5),F=V):(D=O=w,R=F=V),H){var G=A.pointpos,W=A.jitter,Y=A.marker.size/2,Z=0;G+W>=0&&((Z=V*(G+W))>D?(q=!0,N=Y,j=Z):Z>R&&(N=Y,j=D)),Z<=D&&(j=D);var $=0;G-W<=0&&(($=-V*(G-W))>O?(q=!0,U=Y,B=$):$>F&&(U=Y,B=O)),$<=O&&(B=O)}else j=D,B=O;var X=Array(c.length);for(l=0;le.lo&&(x.so=!0)}return a});d.enter().append("path").classed("point",!0),d.exit().remove(),d.call(n.translatePoints,o,s)}function s(e,t,n,a){var o,s,l=t.val,c=t.pos,u=!!c.rangebreaks,h=a.bPos,d=a.bPosPxOffset||0,f=n.boxmean||(n.meanline||{}).visible;Array.isArray(a.bdPos)?(o=a.bdPos[0],s=a.bdPos[1]):(o=a.bdPos,s=a.bdPos);var p=e.selectAll("path.mean").data("box"===n.type&&n.boxmean||"violin"===n.type&&n.box.visible&&n.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(e){var t=c.c2l(e.pos+h,!0),i=c.l2p(t-o)+d,a=c.l2p(t+s)+d,p=u?(i+a)/2:c.l2p(t)+d,m=l.c2p(e.mean,!0),g=l.c2p(e.mean-e.sd,!0),y=l.c2p(e.mean+e.sd,!0);"h"===n.orientation?r.select(this).attr("d","M"+m+","+i+"V"+a+("sd"===f?"m0,0L"+g+","+p+"L"+m+","+i+"L"+y+","+p+"Z":"")):r.select(this).attr("d","M"+i+","+m+"H"+a+("sd"===f?"m0,0L"+p+","+g+"L"+i+","+m+"L"+p+","+y+"Z":""))})}t.exports={plot:function(e,t,n,l){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis;i.makeTraceGroups(l,n,"trace boxes").each(function(e){var t,i,n=r.select(this),l=e[0],d=l.t,f=l.trace;(d.wdPos=d.bdPos*f.whiskerwidth,!0!==f.visible||d.empty)?n.remove():("h"===f.orientation?(t=h,i=u):(t=u,i=h),a(n,{pos:t,val:i},f,d,c),o(n,{x:u,y:h},f,d),s(n,{pos:t,val:i},f,d))})},plotBoxAndWhiskers:a,plotPoints:o,plotBoxMean:s}}}),aH=p({"src/traces/box/style.js"(e,t){var r=T(),i=ee(),n=t9();t.exports={style:function(e,t,a){var o=a||r.select(e).selectAll("g.trace.boxes");o.style("opacity",function(e){return e[0].trace.opacity}),o.each(function(t){var a=r.select(this),o=t[0].trace,s=o.line.width;function l(e,t,r,n){e.style("stroke-width",t+"px").call(i.stroke,r).call(i.fill,n)}var c=a.selectAll("path.box");if("candlestick"===o.type)c.each(function(e){if(!e.empty){var t=r.select(this),i=o[e.dir];l(t,i.line.width,i.line.color,i.fillcolor),t.style("opacity",o.selectedpoints&&!e.selected?.3:1)}});else{l(c,s,o.line.color,o.fillcolor),a.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(i.stroke,o.line.color);var u=a.selectAll("path.point");n.pointStyle(u,o,e)}})},styleOnSelect:function(e,t,r){var i=t[0].trace,a=r.selectAll("path.point");i.selectedpoints?n.selectedPointStyle(a,i):n.pointStyle(a,i,e)}}}}),aG=p({"src/traces/box/hover.js"(e,t){var r=rn(),i=tv(),n=rD(),a=ee(),o=i.fillText;function s(e,t,o,s){var l,c,u,h,d,f,p,m,g,y,v,x,b,_,w=e.cd,T=e.xa,M=e.ya,k=w[0].trace,A=w[0].t,S="violin"===k.type,E=A.bdPos,C=A.wHover,L=function(e){return h.c2l(e.pos)+A.bPos-h.c2l(p)};S&&"both"!==k.side?("positive"===k.side&&(y=function(e){var t=L(e);return n.inbox(t,t+C,v)},b=E,_=0),"negative"===k.side&&(y=function(e){var t=L(e);return n.inbox(t-C,t,v)},b=0,_=E)):(y=function(e){var t=L(e);return n.inbox(t-C,t+C,v)},b=_=E),l=S?function(e){return n.inbox(e.span[0]-f,e.span[1]-f,v)}:function(e){return n.inbox(e.min-f,e.max-f,v)},"h"===k.orientation?(f=t,p=o,m=l,g=y,c="y",h=M,u="x",d=T):(f=o,p=t,m=y,g=l,c="x",h=T,u="y",d=M);var P=Math.min(1,E/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));function I(e){return(m(e)+g(e))/2}v=e.maxHoverDistance-P,x=e.maxSpikeDistance-P;var z=n.getDistanceFunction(s,m,g,I);if(n.getClosest(w,z,e),!1===e.index)return[];var D=w[e.index],O=k.line.color,R=(k.marker||{}).color;a.opacity(O)&&k.line.width?e.color=O:a.opacity(R)&&k.boxpoints?e.color=R:e.color=k.fillcolor,e[c+"0"]=h.c2p(D.pos+A.bPos-_,!0),e[c+"1"]=h.c2p(D.pos+A.bPos+b,!0),e[c+"LabelVal"]=void 0!==D.orig_p?D.orig_p:D.pos;var F=c+"Spike";e.spikeDistance=I(D)*x/v,e[F]=h.c2p(D.pos,!0);var j=k.boxmean||"sd"===k.sizemode||(k.meanline||{}).visible,B=k.boxpoints||k.points,N=B&&j?["max","uf","q3","med","mean","q1","lf","min"]:B&&!j?["max","uf","q3","med","q1","lf","min"]:!B&&j?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],U=d.range[1]0&&(a=!0);for(var l=0;la){var o=a-i[e];return i[e]=a,o}}return 0},max:function(e,t,i,n){var a=n[t];if(r(a)){if(a=Number(a),!r(i[e]))return i[e]=a,a;else if(i[e]a){var l=d(t,o,s),c=d(r,o,s),u=+(e!==i);return l[u]!==c[u]}return Math.floor(r/e)-Math.floor(t/e)>.1}(u,e,t,s,r,n))l=u;else break}return l}function h(e,t){return t&&e>l?e>a?e>1.1*i?i:e>1.1*n?n:a:e>o?o:e>s?s:l:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function d(e,t,r){var n=t.c2d(e,i,r).split("-");return""===n[0]&&(n.unshift(),n[0]="-"+n[0]),n}t.exports=function(e,t,r,n,o){var s,l,h=-1.1*t,d=-.1*t,f=e-d,p=r[0],m=r[1],g=Math.min(u(p+d,p+f,n,o),u(m+d,m+f,n,o)),y=Math.min(u(p+h,p+d,n,o),u(m+h,m+d,n,o));if(g>y&&ya){var v=s===i?1:6,x=s===i?"M12":"M1";return function(t,r){var a=n.c2d(t,i,o),s=a.indexOf("-",v);s>0&&(a=a.slice(0,s));var u=n.d2c(a,0,o);if(uo.r2l(j)&&(N=a.tickIncrement(N,_.size,!0,p)),D.start=o.l2r(N),F||i.nestedProperty(t,v+".start").set(D.start)}var U=_.end,V=o.r2l(z.end),q=void 0!==V;if((_.endFound||q)&&V!==o.r2l(U)){var H=q?V:i.aggNums(Math.max,null,m);D.end=o.l2r(H),q||i.nestedProperty(t,v+".start").set(D.end)}var G="autobin"+s;return!1===t._input[G]&&(t._input[v]=i.extendFlat({},t[v]||{}),delete t._input[G],delete t[G]),[D,m]}t.exports={calc:function(e,t){var n,p,m,g,y,v=[],x=[],b="h"===t.orientation,_=a.getFromId(e,b?t.yaxis:t.xaxis),w=b?"y":"x",T={x:"y",y:"x"}[w],M=t[w+"calendar"],k=t.cumulative,A=f(e,t,_,w),S=A[0],E=A[1],C="string"==typeof S.size,L=[],P=C?L:S,I=[],z=[],D=[],O=0,R=t.histnorm,F=t.histfunc,j=-1!==R.indexOf("density");k.enabled&&j&&(R=R.replace(/ ?density$/,""),j=!1);var B,N="max"===F||"min"===F?null:0,U=c.count,V=u[R],q=!1,H=function(e){return _.r2c(e,0,M)};for(i.isArrayOrTypedArray(t[T])&&"count"!==F&&(B=t[T],q="avg"===F,U=c[F]),p=H(S.start),g=H(S.end)+(p-a.tickIncrement(p,S.size,!1,M))/1e6;p=0&&y=0;i--)s(i);else if("increasing"===t){for(i=1;i=0;i--)e[i]+=e[i+1];"exclude"===r&&(e.push(0),e.shift())}}(x,k.direction,k.currentbin);var Q=Math.min(v.length,x.length),ee=[],et=0,er=Q-1;for(p=0;p=et;p--)if(x[p]){er=p;break}for(p=et;p<=er;p++)if(r(v[p])&&r(x[p])){var ei={p:v[p],s:x[p],b:0};k.enabled||(ei.pts=D[p],Z?ei.ph0=ei.ph1=D[p].length?E[D[p][0]]:v[p]:(t._computePh=!0,ei.ph0=n(L[p]),ei.ph1=n(L[p+1],!0))),ee.push(ei)}return 1===ee.length&&(ee[0].width1=a.tickIncrement(ee[0].p,S.size,!1,M)-ee[0].p),o(t,"marker")&&s(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),o(t,"marker.line")&&s(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),l(ee,t),i.isArrayOrTypedArray(t.selectedpoints)&&i.tagSelected(ee,t,K),ee},calcAllAutoBins:f}}}),a6=p({"src/traces/histogram2d/calc.js"(e,t){var r=tv(),i=rn(),n=a1(),a=a2(),o=a3(),s=a5(),l=a4().calcAllAutoBins;function c(e,t,r,i){var n,a=Array(e);if(i)for(n=0;nC&&k.splice(C,k.length-C),E.length>C&&E.splice(C,E.length-C);var L=[],P=[],I=[],z="string"==typeof M.size,D="string"==typeof S.size,O=[],R=[],F=z?O:M,j=D?R:S,B=0,N=[],U=[],V=t.histnorm,q=t.histfunc,H=-1!==V.indexOf("density"),G="max"===q||"min"===q?null:0,W=n.count,Y=a[V],Z=!1,$=[],X=[],K="z"in t?t.z:"marker"in t&&Array.isArray(t.marker.color)?t.marker.color:"";K&&"count"!==q&&(Z="avg"===q,W=n[q]);var J=M.size,Q=_(M.start),ee=_(M.end)+(Q-i.tickIncrement(Q,J,!1,x))/1e6;for(f=Q;f=0&&m=0&&gm&&(y=Math.max(y,Math.abs(e[a][o]-p)/(g-m))))}return y}t.exports=function(e,t){var i,a=1;for(n(e,t),i=0;i.01;i++)a=n(e,t,.5-.25*Math.min(1,.5*a));return a>.01&&r.log("interp2d didn't converge quickly",a),e}}}),oe=p({"src/traces/heatmap/find_empties.js"(e,t){var r=tv().maxRowLength;t.exports=function(e){var t,i,n,a,o,s,l,c,u=[],h={},d=[],f=e[0],p=[],m=[0,0,0],g=r(e);for(i=0;i=0;o--)(s=((h[[(i=(a=d[o])[0])-1,n=a[1]]]||m)[2]+(h[[i+1,n]]||m)[2]+(h[[i,n-1]]||m)[2]+(h[[i,n+1]]||m)[2])/20)&&(l[a]=[i,n,s],d.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(e,t){return t[2]-e[2]})}}}),ot=p({"src/traces/heatmap/make_bound_array.js"(e,t){var r=eQ(),i=tv().isArrayOrTypedArray;t.exports=function(e,t,n,a,o,s){var l,c,u,h=[],d=r.traceIs(e,"contour"),f=r.traceIs(e,"histogram");if(i(t)&&t.length>1&&!f&&"category"!==s.type){var p=t.length;if(!(p<=o))return d?t.slice(0,o):t.slice(0,o+1);if(d)h=Array.from(t).slice(0,o);else if(1===o)h="log"===s.type?[.5*t[0],2*t[0]]:[t[0]-.5,t[0]+.5];else if("log"===s.type){for(h=[Math.pow(t[0],1.5)/Math.pow(t[1],.5)],u=1;u1){var t=(e[e.length-1]-e[0])/(e.length-1),r=Math.abs(t/100);for(M=0;Mr)return!1}return!0}(A.rangebreaks||S.rangebreaks)&&(T=function(e,t,r){for(var i=[],n=-1,a=0;a0;)T=M.c2p(j[C]),C--;for(T0;)E=k.c2p(B[C]),C--;E=M._length||T<=0||S>=k._length||E<=0){I.selectAll("image").data([]).exit().remove(),v(I);return}"fast"===Z?(Q=G,ee=H):(Q=X,ee=K);var J=document.createElement("canvas");J.width=Q,J.height=ee;var Q,ee,et,er,ei=J.getContext("2d",{willReadFrequently:!0}),en=h(D,{noNumericCheck:!0,returnArray:!0});"fast"===Z?(et=W?function(e){return G-1-e}:o.identity,er=Y?function(e){return H-1-e}:o.identity):(et=function(e){return o.constrain(Math.round(M.c2p(j[e])-w),0,X)},er=function(e){return o.constrain(Math.round(k.c2p(B[e])-S),0,K)});var ea,eo,es,el,ec=er(0),eu=[ec,ec],eh=+!W,ed=+!Y,ef=0,ep=0,em=0,eg=0;function ey(e,t=0){if(void 0===e)return[0,0,0,0];var r=en(e);return r[0]=Math.round(r[0]),r[1]=Math.round(r[1]),r[2]=Math.round(r[2]),ef+=t,ep+=r[0]*t,em+=r[1]*t,eg+=r[2]*t,r}if("default"!==Z){var ev,ex=0;try{ev=new Uint8Array(Q*ee*4)}catch{ev=Array(Q*ee*4)}if("smooth"===Z){var eb,e_,ew,eT=N||j,eM=U||B,ek=Array(eT.length),eA=Array(eM.length),eS=Array(X),eE=N?b:x,eC=U?b:x;for(C=0;CeW||eW>k._length))for(L=eq;Le$||e$>M._length)){var eX=l({x:eZ,y:eY},D,e._fullLayout);eX.x=eZ,eX.y=eY;var eK=z.z[C][L];void 0===eK?(eX.z="",eX.zLabel=""):(eX.z=eK,eX.zLabel=a.tickText(ej,eK,"hover").text);var eJ=z.text&&z.text[C]&&z.text[C][L];(void 0===eJ||!1===eJ)&&(eJ=""),eX.text=eJ;var eQ=o.texttemplateString({data:[eX,D._meta],fallback:D.texttemplatefallback,labels:eX,locale:e._fullLayout._d3locale,template:eR});if(eQ){var e0=eQ.split("
"),e1=e0.length,e2=0;for(P=0;P=_[0].length||f<0||f>_.length)return}else{if(r.inbox(t-x[0],t-x[x.length-1],0)>0||r.inbox(s-b[0],s-b[b.length-1],0)>0)return;if(p){for(A=[2*x[0]-x[1]],E=1;E=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),oS=p({"src/traces/contour/attributes.js"(e,t){var r=aX(),i=ix(),n=tB(),a=n.axisHoverFormat,o=n.descriptionOnlyNumbers,s=tV(),l=eH().dash,c=H(),u=q().extendFlat,h=oA(),d=h.COMPARISON_OPS2,f=h.INTERVAL_OPS,p=i.line;t.exports=u({z:r.z,x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:i.xperiod0,yperiod0:i.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,text:r.text,hovertext:r.hovertext,transpose:r.transpose,xtype:r.xtype,ytype:r.ytype,xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:u({},r.texttemplate,{}),texttemplatefallback:r.texttemplatefallback,textfont:u({},r.textfont,{}),hoverongaps:r.hoverongaps,connectgaps:u({},r.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:c({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:o("contour label")},operation:{valType:"enumerated",values:[].concat(d).concat(f),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:u({},p.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:l,smoothing:u({},p.smoothing,{}),editType:"plot"},zorder:i.zorder},s("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),oE=p({"src/traces/histogram2dcontour/attributes.js"(e,t){var r=ob(),i=oS(),n=tV(),a=tB().axisHoverFormat,o=q().extendFlat;t.exports=o({x:r.x,y:r.y,z:r.z,marker:r.marker,histnorm:r.histnorm,histfunc:r.histfunc,nbinsx:r.nbinsx,xbins:r.xbins,nbinsy:r.nbinsy,ybins:r.ybins,autobinx:r.autobinx,autobiny:r.autobiny,bingroup:r.bingroup,xbingroup:r.xbingroup,ybingroup:r.ybingroup,autocontour:i.autocontour,ncontours:i.ncontours,contours:i.contours,line:{color:i.line.color,width:o({},i.line.width,{dflt:.5}),dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},xhoverformat:a("x"),yhoverformat:a("y"),zhoverformat:a("z",1),hovertemplate:r.hovertemplate,hovertemplatefallback:r.hovertemplatefallback,texttemplate:i.texttemplate,texttemplatefallback:i.texttemplatefallback,textfont:i.textfont},n("",{cLetter:"z",editTypeOverride:"calc"}))}}),oC=p({"src/traces/contour/contours_defaults.js"(e,t){t.exports=function(e,t,r,i){var n=i("contours.start"),a=i("contours.end"),o=r("contours.size");((!1===n||!1===a?t.autocontour=!0:r("autocontour",!1))||!o)&&r("ncontours")}}}),oL=p({"src/traces/contour/label_defaults.js"(e,t){var r=tv();t.exports=function(e,t,i,n){if(n||(n={}),e("contours.showlabels")){var a=t.font;r.coerceFont(e,"contours.labelfont",a,{overrideDflt:{color:i}}),e("contours.labelformat")}!1!==n.hasHover&&e("zhoverformat")}}}),oP=p({"src/traces/contour/style_defaults.js"(e,t){var r=tQ(),i=oL();t.exports=function(e,t,n,a,o){var s,l=n("contours.coloring"),c="";"fill"===l&&(s=n("contours.showlines")),!1!==s&&("lines"!==l&&(c=n("line.color","#000")),n("line.width",.5),n("line.dash")),"none"!==l&&(!0!==e.showlegend&&(t.showlegend=!1),t._dfltShowLegend=!1,r(e,t,a,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),i(n,a,c,o)}}}),oI=p({"src/traces/histogram2dcontour/defaults.js"(e,t){var r=tv(),i=o_(),n=oC(),a=oP(),o=aJ(),s=oE();t.exports=function(e,t,l,c){function u(i,n){return r.coerce(e,t,s,i,n)}i(e,t,u,c),!1!==t.visible&&(n(e,t,u,function(i){return r.coerce2(e,t,s,i)}),a(e,t,u,c),u("xhoverformat"),u("yhoverformat"),u("hovertemplate"),u("hovertemplatefallback"),t.contours&&"heatmap"===t.contours.coloring&&o(u,c))}}}),oz=p({"src/traces/contour/set_contours.js"(e,t){var r=rn(),i=tv();function n(e,t,i){var n={type:"linear",range:[e,t]};return r.autoTicks(n,(t-e)/(i||15)),n}t.exports=function(e,t){var a=e.contours;if(e.autocontour){var o=e.zmin,s=e.zmax;(e.zauto||void 0===o)&&(o=i.aggNums(Math.min,null,t)),(e.zauto||void 0===s)&&(s=i.aggNums(Math.max,null,t));var l=n(o,s,e.ncontours);a.size=l.dtick,a.start=r.tickFirst(l),l.range.reverse(),a.end=r.tickFirst(l),a.start===o&&(a.start+=a.size),a.end===s&&(a.end-=a.size),a.start>a.end&&(a.start=a.end=(a.start+a.end)/2),e._input.contours||(e._input.contours={}),i.extendFlat(e._input.contours,{start:a.start,end:a.end,size:a.size}),e._input.autocontour=!0}else if("constraint"!==a.type){var c=a.start,u=a.end,h=e._input.contours;c>u&&(a.start=h.start=u,u=a.end=h.end=c,c=a.start),a.size>0||(h.size=a.size=c===u?1:n(c,u,e.ncontours).dtick)}}}}),oD=p({"src/traces/contour/end_plus.js"(e,t){t.exports=function(e){return e.end+e.size/1e6}}}),oO=p({"src/traces/contour/calc.js"(e,t){var r=t3(),i=or(),n=oz(),a=oD();t.exports=function(e,t){var o=i(e,t),s=o[0].z;n(t,s);var l,c=t.contours,u=r.extractOpts(t);if("heatmap"===c.coloring&&u.auto&&!1===t.autocontour){var h=c.start,d=a(c),f=c.size||1,p=Math.floor((d-h)/f)+1;isFinite(f)||(f=1,p=1);var m=h-f/2,g=m+p*f;l=[m,g]}else l=s;return r.calc(e,t,{vals:l,cLetter:"z"}),o}}}),oR=p({"src/traces/contour/constants.js"(e,t){t.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}}}}),oF=p({"src/traces/contour/make_crossings.js"(e,t){var r=oR();t.exports=function(e){var t,i,n,a,o,s,l,c,u,h=e[0].z,d=h.length,f=h[0].length,p=2===d||2===f;for(i=0;ie?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);return 5===r||10===r?e>(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4?5===r?713:1114:5===r?104:208:15===r?0:r}((c=e[u]).level,s))&&(c.crossings[o]=l,-1!==n.indexOf(l)&&(c.starts.push([t,i]),p&&-1!==n.indexOf(l,n.indexOf(l)+1)&&c.starts.push([t,i])))}}}),oj=p({"src/traces/contour/find_all_paths.js"(e,t){var r=tv(),i=oR();function n(e,t,r,i){return Math.abs(e[0]-t[0])20&&u?208===c||1114===c?d=0===h[0]?1:-1:f=0===h[1]?1:-1:-1!==i.BOTTOMSTART.indexOf(c)?f=1:-1!==i.LEFTSTART.indexOf(c)?d=1:-1!==i.TOPSTART.indexOf(c)?f=-1:d=-1,[d,f]),v=[o(e,t,[-y[0],-y[1]])],x=e.z.length,b=e.z[0].length,_=t.slice(),w=y.slice();for(p=0;p<1e4;p++){if(g>20?(g=i.CHOOSESADDLE[g][0>(y[0]||y[1])?0:1],e.crossings[m]=i.SADDLEREMAINDER[g]):delete e.crossings[m],!(y=i.NEWDELTA[g])){r.log("Found bad marching index:",g,t,e.level);break}v.push(o(e,t,y)),t[0]+=y[0],t[1]+=y[1],m=t.join(","),n(v[v.length-1],v[v.length-2],s,l)&&v.pop();var T=y[0]&&(t[0]<0||t[0]>b-2)||y[1]&&(t[1]<0||t[1]>x-2);if(t[0]===_[0]&&t[1]===_[1]&&y[0]===w[0]&&y[1]===w[1]||a&&T)break;g=e.crossings[m]}1e4===p&&r.log("Infinite loop in contour?");var M,k,A,S,E,C,L,P,I,z,D,O=n(v[0],v[v.length-1],s,l),R=0,F=.2*e.smoothing,j=[],B=0;for(p=1;p=B;p--)if((M=j[p])=B&&M+j[k]P&&I--,e.edgepaths[I]=D.concat(v,z));break}q||(e.edgepaths[P]=v.concat(z))}for(P=0;P":o(">"),"<":o("<"),"=":o("=")}}}),oN=p({"src/traces/contour/empty_pathinfo.js"(e,t){var r=tv(),i=oB(),n=oD();t.exports=function(e,t,a){for(var o="constraint"===e.type?i[e._operation](e.value):e,s=o.size,l=[],c=n(o),u=a.trace._carpetTrace,h=u?{xaxis:u.aaxis,yaxis:u.baxis,x:a.a,y:a.b}:{xaxis:t.xaxis,yaxis:t.yaxis,x:a.x,y:a.y},d=o.start;d1e3){r.warn("Too many contours, clipping at 1000",e);break}return l}}}),oU=p({"src/traces/contour/convert_to_constraints.js"(e,t){var r=tv();function i(e){return r.extendFlat({},e,{edgepaths:r.extendDeep([],e.edgepaths),paths:r.extendDeep([],e.paths),starts:r.extendDeep([],e.starts)})}t.exports=function(e,t){var n,a,o,s=function(e){return e.reverse()},l=function(e){return e};switch(t){case"=":case"<":return e;case">":for(1!==e.length&&r.warn("Contour data invalid for the specified inequality operation."),a=e[0],n=0;no.level||o.starts.length&&a===o.level)}break;case"constraint":if(i.prefixBoundary=!1,i.edgepaths.length)return;var s=i.x.length,l=i.y.length,c=-1/0,u=1/0;for(r=0;r":f>c&&(i.prefixBoundary=!0);break;case"<":(fc||i.starts.length&&d===u)&&(i.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),d=Math.max(f[0],f[1]),hc&&(i.prefixBoundary=!0)}}}}}),oq=p({"src/traces/contour/plot.js"(e){var t=T(),r=tv(),i=t9(),n=t3(),a=tF(),o=rn(),s=rt(),l=oa(),c=oF(),u=oj(),h=oN(),d=oU(),f=oV(),p=oR(),m=p.LABELOPTIMIZER;function g(e,t){var n,a,o,s,l,c,u="",h=0,d=e.edgepaths.map(function(e,t){return t}),f=!0;function p(e){return .01>Math.abs(e[0]-t[2][0])}for(;d.length;){for(c=i.smoothopen(e.edgepaths[h],e.smoothing),u+=f?c:c.replace(/^M/,"L"),d.splice(d.indexOf(h),1),n=e.edgepaths[h][e.edgepaths[h].length-1],s=-1,o=0;o<4;o++){if(!n){r.log("Missing end?",h,e);break}for(.01>Math.abs(n[1]-t[0][1])&&!p(n)?a=t[1]:.01>Math.abs(n[0]-t[0][0])?a=t[0]:.01>Math.abs(n[1]-t[2][1])?a=t[3]:p(n)&&(a=t[2]),l=0;lMath.abs(n[0]-a[0])?.01>Math.abs(n[0]-m[0])&&(m[1]-n[1])*(a[1]-m[1])>=0&&(a=m,s=l):.01>Math.abs(n[1]-a[1])?.01>Math.abs(n[1]-m[1])&&(m[0]-n[0])*(a[0]-m[0])>=0&&(a=m,s=l):r.log("endpt to newendpt is not vert. or horz.",n,a,m)}if(n=a,s>=0)break;u+="L"+a}if(s===e.edgepaths.length){r.log("unclosed perimeter path");break}h=s,(f=-1===d.indexOf(h))&&(h=d[0],u+="Z")}for(h=0;hn.center?n.right-s:s-n.left)/(u+Math.abs(Math.sin(c)*o)),f=(l>n.middle?n.bottom-l:l-n.top)/(Math.abs(h)+Math.cos(c)*o);if(d<1||f<1)return 1/0;var p=m.EDGECOST*(1/(d-1)+1/(f-1));p+=m.ANGLECOST*c*c;for(var g=s-u,y=l-h,v=s+u,x=l+h,b=0;b2*m.MAXCOST)break;f&&(s/=2),l=(o=c-s/2)+1.5*s}if(d<=m.MAXCOST)return u},e.addLabelData=function(e,t,r,i){var n=t.fontSize,a=t.width+n/3,o=Math.max(0,t.height-n/3),s=e.x,l=e.y,c=e.theta,u=Math.sin(c),h=Math.cos(c),d=function(e,t){return[s+e*h-t*u,l+e*u+t*h]},f=[d(-a/2,-o/2),d(-a/2,o/2),d(a/2,o/2),d(a/2,-o/2)];r.push({text:t.text,x:s,y:l,dy:t.dy,theta:c,level:t.level,width:a,height:o}),i.push(f)},e.drawLabels=function(e,i,n,o,s){var l=e.selectAll("text").data(i,function(e){return e.text+","+e.x+","+e.y+","+e.theta});if(l.exit().remove(),l.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(e){var r=e.x+Math.sin(e.theta)*e.dy,i=e.y-Math.cos(e.theta)*e.dy;t.select(this).text(e.text).attr({x:r,y:i,transform:"rotate("+180*e.theta/Math.PI+" "+r+" "+i+")"}).call(a.convertToTspans,n)}),s){for(var c="",u=0;u=v)&&(a<=y&&(a=y),o>=v&&(o=v),l=Math.floor((o-a)/s)+1,c=0),d=0;dy&&(m.unshift(y),g.unshift(g[0])),m[m.length-1]2?p.value=p.value.slice(2):0===p.length?p.value=[0,1]:p.length<2?(m=parseFloat(p.value[0]),p.value=[m,m+1]):p.value=[parseFloat(p.value[0]),parseFloat(p.value[1])]:r(p.value)&&(m=parseFloat(p.value),p.value=[m,m+1])):(f("contours.value",0),r(p.value)||(l(p.value)?p.value=parseFloat(p.value[0]):p.value=0)),"="===b?g=x.showlines=!0:(g=n("contours.showlines"),v=n("fillcolor",a((e.line||{}).color||h,.5))),g&&(y=n("line.color",v&&o(v)?a(t.fillcolor,1):h),n("line.width",2),n("line.dash")),n("line.smoothing"),i(n,s,y,d)}}}),oK=p({"src/traces/contour/defaults.js"(e,t){var r=tv(),i=aK(),n=iU(),a=oX(),o=oC(),s=oP(),l=aJ(),c=oS();t.exports=function(e,t,u,h){function d(i,n){return r.coerce(e,t,c,i,n)}if(!i(e,t,d,h)){t.visible=!1;return}n(e,t,h,d),d("xhoverformat"),d("yhoverformat"),d("text"),d("hovertext"),d("hoverongaps"),d("hovertemplate"),d("hovertemplatefallback");var f="constraint"===d("contours.type");d("connectgaps",r.isArray1D(t.z)),f?a(e,t,d,h,u):(o(e,t,d,function(i){return r.coerce2(e,t,c,i)}),s(e,t,d,h)),t.contours&&"heatmap"===t.contours.coloring&&l(d,h),d("zorder")}}}),oJ=p({"src/traces/contour/index.js"(e,t){t.exports={attributes:oS(),supplyDefaults:oK(),calc:oO(),plot:oq().plot,style:oG(),colorbar:oW(),hoverPoints:oY(),moduleType:"trace",name:"contour",basePlotModule:np(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),oQ=p({"lib/contour.js"(e,t){t.exports=oJ()}}),o0=p({"src/traces/scatterternary/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=iv(),o=ix(),s=Z(),l=tV(),c=eH().dash,u=q().extendFlat,h=o.marker,d=o.line,f=h.line;t.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:u({},o.mode,{dflt:"markers"}),text:u({},o.text,{}),texttemplate:i({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:n({editType:"plot"}),hovertext:u({},o.hovertext,{}),line:{color:d.color,width:d.width,dash:c,backoff:d.backoff,shape:u({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:o.connectgaps,cliponaxis:o.cliponaxis,fill:u({},o.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:a(),marker:u({symbol:h.symbol,opacity:h.opacity,angle:h.angle,angleref:h.angleref,standoff:h.standoff,maxdisplayed:h.maxdisplayed,size:h.size,sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,line:u({width:f.width,dash:f.dash,editType:"calc"},l("marker.line")),gradient:h.gradient,editType:"calc"},l("marker")),textfont:o.textfont,textposition:o.textposition,selected:o.selected,unselected:o.unselected,hoverinfo:u({},s.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:o.hoveron,hovertemplate:r(),hovertemplatefallback:n()}}}),o1=p({"src/traces/scatterternary/defaults.js"(e,t){var r=tv(),i=iy(),n=t5(),a=iq(),o=iH(),s=iG(),l=iW(),c=iY(),u=o0();t.exports=function(e,t,h,d){function f(i,n){return r.coerce(e,t,u,i,n)}var p,m=f("a"),g=f("b"),y=f("c");if(m?(p=m.length,g?(p=Math.min(p,g.length),y&&(p=Math.min(p,y.length))):p=y?Math.min(p,y.length):0):g&&y&&(p=Math.min(g.length,y.length)),!p){t.visible=!1;return}t._length=p,f("sum"),f("text"),f("hovertext"),"fills"!==t.hoveron&&(f("hovertemplate"),f("hovertemplatefallback")),f("mode",p"),o.hovertemplate=d.hovertemplate,a}function x(e,t){y.push(e._hovertitle+": "+t)}}}}),o6=p({"src/traces/scatterternary/event_data.js"(e,t){t.exports=function(e,t,r,i,n){if(t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),i[n]){var a=i[n];e.a=a.a,e.b=a.b,e.c=a.c}else e.a=t.a,e.b=t.b,e.c=t.c;return e}}}),o8=p({"src/plots/ternary/ternary.js"(e,t){var r=T(),i=eQ(),n=tv(),a=n.strTranslate,o=n._,s=ee(),l=t9(),c=rt(),u=q().extendFlat,h=tD(),d=rn(),f=rd(),p=rD(),m=rO(),g=m.freeMode,y=m.rectMode,v=re(),x=iM().prepSelect,b=iM().selectOnClick,_=iM().clearOutline,w=iM().clearSelectionsCache,M=tE();function k(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}t.exports=k;var A=k.prototype;A.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}},A.plot=function(e,t){var r=t[this.id],i=t._size;this._hasClipOnAxisFalse=!1;for(var n=0;nS*b?n=(o=b)*S:o=(n=x)/S,h=y*n/x,d=v*o/b,r=t.l+t.w*m-n/2,i=t.t+t.h*(1-g)-o/2,f.x0=r,f.y0=i,f.w=n,f.h=o,f.sum=_,f.xaxis={type:"linear",range:[w+2*M-_,_-w-2*T],domain:[m-h/2,m+h/2],_id:"x"},c(f.xaxis,f.graphDiv._fullLayout),f.xaxis.setScale(),f.xaxis.isPtWithinRange=function(e){return e.a>=f.aaxis.range[0]&&e.a<=f.aaxis.range[1]&&e.b>=f.baxis.range[1]&&e.b<=f.baxis.range[0]&&e.c>=f.caxis.range[1]&&e.c<=f.caxis.range[0]},f.yaxis={type:"linear",range:[w,_-T-M],domain:[g-d/2,g+d/2],_id:"y"},c(f.yaxis,f.graphDiv._fullLayout),f.yaxis.setScale(),f.yaxis.isPtWithinRange=function(){return!0};var k=f.yaxis.domain[0],A=f.aaxis=u({},e.aaxis,{range:[w,_-T-M],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[k,k+d*S],anchor:"free",position:0,_id:"y",_length:n});c(A,f.graphDiv._fullLayout),A.setScale();var E=f.baxis=u({},e.baxis,{range:[_-w-M,T],side:"bottom",domain:f.xaxis.domain,anchor:"free",position:0,_id:"x",_length:n});c(E,f.graphDiv._fullLayout),E.setScale();var C=f.caxis=u({},e.caxis,{range:[_-w-T,M],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[k,k+d*S],anchor:"free",position:0,_id:"y",_length:n});c(C,f.graphDiv._fullLayout),C.setScale();var L="M"+r+","+(i+o)+"h"+n+"l-"+n/2+",-"+o+"Z";f.clipDef.select("path").attr("d",L),f.layers.plotbg.select("path").attr("d",L);var P="M0,"+o+"h"+n+"l-"+n/2+",-"+o+"Z";f.clipDefRelative.select("path").attr("d",P);var I=a(r,i);f.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",I),f.clipDefRelative.select("path").attr("transform",null);var z=a(r-E._offset,i+o);f.layers.baxis.attr("transform",z),f.layers.bgrid.attr("transform",z);var D=a(r+n/2,i)+"rotate(30)"+a(0,-A._offset);f.layers.aaxis.attr("transform",D),f.layers.agrid.attr("transform",D);var O=a(r+n/2,i)+"rotate(-30)"+a(0,-C._offset);f.layers.caxis.attr("transform",O),f.layers.cgrid.attr("transform",O),f.drawAxes(!0),f.layers.aline.select("path").attr("d",A.showline?"M"+r+","+(i+o)+"l"+n/2+",-"+o:"M0,0").call(s.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),f.layers.bline.select("path").attr("d",E.showline?"M"+r+","+(i+o)+"h"+n:"M0,0").call(s.stroke,E.linecolor||"#000").style("stroke-width",(E.linewidth||0)+"px"),f.layers.cline.select("path").attr("d",C.showline?"M"+(r+n/2)+","+i+"l"+n/2+","+o:"M0,0").call(s.stroke,C.linecolor||"#000").style("stroke-width",(C.linewidth||0)+"px"),f.graphDiv._context.staticPlot||f.initInteractions(),l.setClipUrl(f.layers.frontplot,f._hasClipOnAxisFalse?null:f.clipId,f.graphDiv)},A.drawAxes=function(e){var t=this.graphDiv,r=this.id.slice(7)+"title",i=this.layers,n=this.aaxis,a=this.baxis,s=this.caxis;if(this.drawAx(n),this.drawAx(a),this.drawAx(s),e){var l=Math.max(n.showticklabels?n.tickfont.size/2:0,(s.showticklabels?.75*s.tickfont.size:0)+("outside"===s.ticks?.87*s.ticklen:0)),c=(a.showticklabels?a.tickfont.size:0)+("outside"===a.ticks?a.ticklen:0)+3;i["a-title"]=v.draw(t,"a"+r,{propContainer:n,propName:this.id+".aaxis.title.text",placeholder:o(t,"Click to enter Component A title"),attributes:{x:this.x0+this.w/2,y:this.y0-n.title.font.size/3-l,"text-anchor":"middle"}}),i["b-title"]=v.draw(t,"b"+r,{propContainer:a,propName:this.id+".baxis.title.text",placeholder:o(t,"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"}}),i["c-title"]=v.draw(t,"c"+r,{propContainer:s,propName:this.id+".caxis.title.text",placeholder:o(t,"Click to enter Component C title"),attributes:{x:this.x0+this.w+c,y:this.y0+this.h+.83*s.title.font.size+c,"text-anchor":"middle"}})}},A.drawAx=function(e){var t,r=this.graphDiv,i=e._name,a=i.charAt(0),o=e._id,s=this.layers[i],l=a+"tickLayout",c=(t=e).ticks+String(t.ticklen)+String(t.showticklabels);this[l]!==c&&(s.selectAll("."+o+"tick").remove(),this[l]=c),e.setScale();var u=d.calcTicks(e),h=d.clipEnds(e,u),f=d.makeTransTickFn(e),p=d.getTickSigns(e)[2],m=n.deg2rad(30),g=p*(e.linewidth||1)/2,y=p*e.ticklen,v=this.w,x=this.h,b="b"===a?"M0,"+g+"l"+Math.sin(m)*y+","+Math.cos(m)*y:"M"+g+",0l"+Math.cos(m)*y+","+-Math.sin(m)*y,_={a:"M0,0l"+x+",-"+v/2,b:"M0,0l-"+v/2+",-"+x,c:"M0,0l-"+x+","+v/2}[a];d.drawTicks(r,e,{vals:"inside"===e.ticks?h:u,layer:s,path:b,transFn:f,crisp:!1}),d.drawGrid(r,e,{vals:h,layer:this.layers[a+"grid"],path:_,transFn:f,crisp:!1}),d.drawLabels(r,e,{vals:u,layer:s,transFn:f,labelFns:d.makeLabelFns(e,0,30)})};var E=M.MINZOOM/2+.87,C="m-0.87,.5h"+E+"v3h-"+(E+5.2)+"l"+(E/2+2.6)+",-"+(.87*E+4.5)+"l2.6,1.5l-"+E/2+","+.87*E+"Z",L="m0.87,.5h-"+E+"v3h"+(E+5.2)+"l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-2.6,1.5l"+E/2+","+.87*E+"Z",P="m0,1l"+E/2+","+.87*E+"l2.6,-1.5l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-"+(E/2+2.6)+","+(.87*E+4.5)+"l2.6,1.5l"+E/2+",-"+.87*E+"Z",I=!0;function z(e){r.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}A.clearOutline=function(){w(this.dragOptions),_(this.dragOptions.gd)},A.initInteractions=function(){var e,t,r,c,u,h,d,m,v,_,w,T,k=this,A=k.layers.plotbg.select("path").node(),E=k.graphDiv,D=E._fullLayout._zoomlayer;function O(e){var t={};return t[k.id+".aaxis.min"]=e.a,t[k.id+".baxis.min"]=e.b,t[k.id+".caxis.min"]=e.c,t}function R(e,t){var r=E._fullLayout.clickmode;z(E),2===e&&(E.emit("plotly_doubleclick",null),i.call("_guiRelayout",E,O({a:0,b:0,c:0}))),r.indexOf("select")>-1&&1===e&&b(t,E,[k.xaxis],[k.yaxis],k.id,k.dragOptions),r.indexOf("event")>-1&&p.click(E,t,k.id)}this.dragOptions={element:A,gd:E,plotinfo:{id:k.id,domain:E._fullLayout[k.id].domain,xaxis:k.xaxis,yaxis:k.yaxis},subplot:k.id,prepFn:function(i,o,l){k.dragOptions.xaxes=[k.xaxis],k.dragOptions.yaxes=[k.yaxis],w=E._fullLayout._invScaleX,T=E._fullLayout._invScaleY;var f,p,b,M,S,C=k.dragOptions.dragmode=E._fullLayout.dragmode;g(C)?k.dragOptions.minDrag=1:k.dragOptions.minDrag=void 0,"zoom"===C?(k.dragOptions.moveFn=B,k.dragOptions.clickFn=R,k.dragOptions.doneFn=N,f=o,p=l,e=f-(b=A.getBoundingClientRect()).left,t=p-b.top,E._fullLayout._calcInverseTransform(E),M=E._fullLayout._invTransform,e=(S=n.apply3DTransform(M)(e,t))[0],t=S[1],u=r={a:k.aaxis.range[0],b:k.baxis.range[1],c:k.caxis.range[1]},c=k.aaxis.range[1]-r.a,h=s.luminosity(k.graphDiv._fullLayout[k.id].bgcolor),d="M0,"+k.h+"L"+k.w/2+", 0L"+k.w+","+k.h+"Z",m=!1,v=D.append("path").attr("class","zoombox").attr("transform",a(k.x0,k.y0)).style({fill:h>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",d),_=D.append("path").attr("class","zoombox-corners").attr("transform",a(k.x0,k.y0)).style({fill:s.background,stroke:s.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),k.clearOutline(E)):"pan"===C?(k.dragOptions.moveFn=U,k.dragOptions.clickFn=R,k.dragOptions.doneFn=V,u=r={a:k.aaxis.range[0],b:k.baxis.range[1],c:k.caxis.range[1]},k.clearOutline(E)):(y(C)||g(C))&&x(i,o,l,k.dragOptions,C)}};function F(e,t){return 1-(e+(k.h-t)/Math.sqrt(3))/k.w}function j(e,t){return(e-(k.h-t)/Math.sqrt(3))/k.w}function B(i,n){var a=e+i*w,o=t+n*T,s=Math.max(0,Math.min(1,1-t/k.h,1-o/k.h)),l=Math.max(0,Math.min(1,F(e,t),F(a,o))),f=Math.max(0,Math.min(1,j(e,t),j(a,o))),p=(s/2+f)*k.w,g=(1-s/2-l)*k.w,y=(p+g)/2,x=g-p,b=(1-s)*k.h,A=b-x/S;x.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),_.transition().style("opacity",1).duration(200),m=!0),E.emit("plotly_relayouting",O(u))}function N(){z(E),u!==r&&(i.call("_guiRelayout",E,O(u)),I&&E.data&&E._context.showTips&&(n.notifier(o(E,"Double-click to zoom back out"),"long",E),I=!1))}function U(e,t){var i=e/k.xaxis._m,o=t/k.yaxis._m,s=[(u={a:r.a-o,b:r.b+(i+o)/2,c:r.c-(i-o)/2}).a,u.b,u.c].sort(n.sorterAsc),c={a:s.indexOf(u.a),b:s.indexOf(u.b),c:s.indexOf(u.c)};s[0]<0&&(s[1]+s[0]/2<0?(s[2]+=s[0]+s[1],s[0]=s[1]=0):(s[2]+=s[0]/2,s[1]+=s[0]/2,s[0]=0),u={a:s[c.a],b:s[c.b],c:s[c.c]},t=(r.a-u.a)*k.yaxis._m,e=(r.c-u.c-r.b+u.b)*k.xaxis._m);var h=a(k.x0+e,k.y0+t);k.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",h);var d=a(-e,-t);k.clipDefRelative.select("path").attr("transform",d),k.aaxis.range=[u.a,k.sum-u.b-u.c],k.baxis.range=[k.sum-u.a-u.c,u.b],k.caxis.range=[k.sum-u.a-u.b,u.c],k.drawAxes(!1),k._hasClipOnAxisFalse&&k.plotContainer.select(".scatterlayer").selectAll(".trace").call(l.hideOutsideRangePoints,k),E.emit("plotly_relayouting",O(u))}function V(){i.call("_guiRelayout",E,O(u))}A.onmousemove=function(e){p.hover(E,e,k.id),E._fullLayout._lasthover=A,E._fullLayout._hoversubplot=k.id},A.onmouseout=function(e){E._dragging||f.unhover(E,e)},f.init(this.dragOptions)}}}),o7=p({"src/plots/ternary/layout_attributes.js"(e,t){var r=Q(),i=at().attributes,n=tN(),a=eq().overrideAll,o=q().extendFlat,s={title:{text:n.title.text,font:n.title.font},color:n.color,tickmode:n.minor.tickmode,nticks:o({},n.nticks,{dflt:6,min:1}),tick0:n.tick0,dtick:n.dtick,tickvals:n.tickvals,ticktext:n.ticktext,ticks:n.ticks,ticklen:n.ticklen,tickwidth:n.tickwidth,tickcolor:n.tickcolor,ticklabelstep:n.ticklabelstep,showticklabels:n.showticklabels,labelalias:n.labelalias,showtickprefix:n.showtickprefix,tickprefix:n.tickprefix,showticksuffix:n.showticksuffix,ticksuffix:n.ticksuffix,showexponent:n.showexponent,exponentformat:n.exponentformat,minexponent:n.minexponent,separatethousands:n.separatethousands,tickfont:n.tickfont,tickangle:n.tickangle,tickformat:n.tickformat,tickformatstops:n.tickformatstops,hoverformat:n.hoverformat,showline:o({},n.showline,{dflt:!0}),linecolor:n.linecolor,linewidth:n.linewidth,showgrid:o({},n.showgrid,{dflt:!0}),gridcolor:n.gridcolor,gridwidth:n.gridwidth,griddash:n.griddash,layer:n.layer,min:{valType:"number",dflt:0,min:0}},l=t.exports=a({domain:i({name:"ternary"}),bgcolor:{valType:"color",dflt:r.background},sum:{valType:"number",dflt:1,min:0},aaxis:s,baxis:s,caxis:s},"plot","from-root");l.uirevision={valType:"any",editType:"none"},l.aaxis.uirevision=l.baxis.uirevision=l.caxis.uirevision={valType:"any",editType:"none"}}}),o9=p({"src/plots/subplot_defaults.js"(e,t){var r=tv(),i=tS(),n=at().defaults;t.exports=function(e,t,a,o){var s,l,c=o.type,u=o.attributes,h=o.handleDefaults,d=o.partition||"x",f=t._subplots[c],p=f.length,m=p&&f[0].replace(/\d+$/,"");function g(e,t){return r.coerce(s,l,u,e,t)}for(var y=0;y=m&&(b.min=0,_.min=0,w.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}t.exports=function(e,t,r){a(e,t,r,{type:"ternary",attributes:h,handleDefaults:f,font:t.font,paper_bgcolor:t.paper_bgcolor})}}}),st=p({"src/plots/ternary/index.js"(e){var t=o8(),r=tI().getSubplotCalcData,i=tv().counterRegex,n="ternary";e.name=n;var a=e.attr="subplot";e.idRoot=n,e.idRegex=e.attrRegex=i(n),(e.attributes={})[a]={valType:"subplotid",dflt:"ternary",editType:"calc"},e.layoutAttributes=o7(),e.supplyLayoutDefaults=se(),e.plot=function(e){for(var i=e._fullLayout,a=e.calcdata,o=i._subplots[n],s=0;s0){var b,_,w,T,M,k=e.xa,A=e.ya;"h"===p.orientation?(M=t,b="y",w=A,_="x",T=k):(M=s,b="x",w=k,_="y",T=A);var S=f[e.index];if(M>=S.span[0]&&M<=S.span[1]){var E=i.extendFlat({},e),C=T.c2p(M,!0),L=o.getKdeValue(S,p,M),P=o.getPositionOnKdePath(S,p,C),I=w._offset,z=w._length;E[b+"0"]=P[0],E[b+"1"]=P[1],E[_+"0"]=E[_+"1"]=C,E[_+"Label"]=_+": "+n.hoverLabelText(T,M,p[_+"hoverformat"])+", "+f[0].t.labels.kde+" "+L.toFixed(3);for(var D=0,O=0;O path").each(function(e){if(!e.isBlank){var t=s.marker;r.select(this).call(n.fill,e.mc||t.color).call(n.stroke,e.mlc||t.line.color).call(i.dashLine,t.line.dash,e.mlw||t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}}),l(o,s,e),o.selectAll(".regions").each(function(){r.select(this).selectAll("path").style("stroke-width",0).call(n.fill,s.connector.fillcolor)}),o.selectAll(".lines").each(function(){var e=s.connector.line;i.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)})})}}}}),sA=p({"src/traces/funnel/hover.js"(e,t){var r=ee().opacity,i=aI().hoverOnBars,n=tv().formatPercent;t.exports=function(e,t,a,o,s){var l=i(e,t,a,o,s);if(l){var c,u,h,d,f,p,m=l.cd,g=m[0].trace,y="h"===g.orientation,v=m[l.index];l[(y?"x":"y")+"LabelVal"]=v.s,l.percentInitial=v.begR,l.percentInitialLabel=n(v.begR,1),l.percentPrevious=v.difR,l.percentPreviousLabel=n(v.difR,1),l.percentTotal=v.sumR,l.percentTotalLabel=n(v.sumR,1);var x=v.hi||g.hoverinfo,b=[];if(x&&"none"!==x&&"skip"!==x){var _="all"===x,w=x.split("+"),T=function(e){return _||-1!==w.indexOf(e)};T("percent initial")&&b.push(l.percentInitialLabel+" of initial"),T("percent previous")&&b.push(l.percentPreviousLabel+" of previous"),T("percent total")&&b.push(l.percentTotalLabel+" of total")}return l.extraText=b.join("
"),c=g,u=v,h=c.marker,d=u.mc||h.color,f=u.mlc||h.line.color,p=u.mlw||h.line.width,l.color=r(d)?d:r(f)&&p?f:void 0,[l]}}}}),sS=p({"src/traces/funnel/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"percentInitial"in t&&(e.percentInitial=t.percentInitial),"percentPrevious"in t&&(e.percentPrevious=t.percentPrevious),"percentTotal"in t&&(e.percentTotal=t.percentTotal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),sE=p({"src/traces/funnel/index.js"(e,t){t.exports={attributes:sy(),layoutAttributes:sv(),supplyDefaults:sx().supplyDefaults,crossTraceDefaults:sx().crossTraceDefaults,supplyLayoutDefaults:sb(),calc:sw(),crossTraceCalc:sT(),plot:sM(),style:sk().style,hoverPoints:sA(),eventData:sS(),selectPoints:aD(),moduleType:"trace",name:"funnel",basePlotModule:np(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),sC=p({"lib/funnel.js"(e,t){t.exports=sE()}}),sL=p({"src/traces/waterfall/constants.js"(e,t){t.exports={eventDataKeys:["initial","delta","final"]}}}),sP=p({"src/traces/waterfall/attributes.js"(e,t){var r=a_(),i=ix().line,n=Z(),a=tB().axisHoverFormat,{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=eW(),c=sL(),u=q().extendFlat,h=ee();function d(e){return{marker:{color:u({},r.marker.color,{arrayOk:!1,editType:"style"}),line:{color:u({},r.marker.line.color,{arrayOk:!1,editType:"style"}),width:u({},r.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}t.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:r.x,x0:r.x0,dx:r.dx,y:r.y,y0:r.y0,dy:r.dy,xperiod:r.xperiod,yperiod:r.yperiod,xperiod0:r.xperiod0,yperiod0:r.yperiod0,xperiodalignment:r.xperiodalignment,yperiodalignment:r.yperiodalignment,xhoverformat:a("x"),yhoverformat:a("y"),hovertext:r.hovertext,hovertemplate:o({},{keys:c.eventDataKeys}),hovertemplatefallback:l(),hoverinfo:u({},n.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:s({editType:"plot"},{keys:c.eventDataKeys.concat(["label"])}),texttemplatefallback:l({editType:"plot"}),text:r.text,textposition:r.textposition,insidetextanchor:r.insidetextanchor,textangle:r.textangle,textfont:r.textfont,insidetextfont:r.insidetextfont,outsidetextfont:r.outsidetextfont,constraintext:r.constraintext,cliponaxis:r.cliponaxis,orientation:r.orientation,offset:r.offset,width:r.width,increasing:d("increasing"),decreasing:d("decreasing"),totals:d("intermediate sums and total"),connector:{line:{color:u({},i.color,{dflt:h.defaultLine}),width:u({},i.width,{editType:"plot"}),dash:i.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:r.offsetgroup,alignmentgroup:r.alignmentgroup,zorder:r.zorder}}}),sI=p({"src/traces/waterfall/layout_attributes.js"(e,t){t.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"}}}}),sz=p({"src/constants/delta.js"(e,t){t.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}}}),sD=p({"src/traces/waterfall/defaults.js"(e,t){var r=tv(),i=i$(),n=aM().handleText,a=iN(),o=iU(),s=sP(),l=ee(),c=sz(),u=c.INCREASING.COLOR,h=c.DECREASING.COLOR;function d(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",l.defaultLine),e(t+".marker.line.width")}t.exports={supplyDefaults:function(e,t,i,l){function c(i,n){return r.coerce(e,t,s,i,n)}if(!a(e,t,l,c)){t.visible=!1;return}o(e,t,l,c),c("xhoverformat"),c("yhoverformat"),c("measure"),c("orientation",t.x&&!t.y?"h":"v"),c("base"),c("offset"),c("width"),c("text"),c("hovertext"),c("hovertemplate"),c("hovertemplatefallback");var f=c("textposition");n(e,t,l,c,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==t.textposition&&(c("texttemplate"),c("texttemplatefallback"),t.texttemplate||c("textinfo")),d(c,"increasing",u),d(c,"decreasing",h),d(c,"totals","#4499FF"),c("connector.visible")&&(c("connector.mode"),c("connector.line.width")&&(c("connector.line.color"),c("connector.line.dash"))),c("zorder")},crossTraceDefaults:function(e,t){var n;function a(e){return r.coerce(n._input,n,s,e)}if("group"===t.waterfallmode)for(var o=0;o0&&(l?M+="M"+w[0]+","+T[1]+"V"+T[0]:M+="M"+w[1]+","+T[0]+"H"+w[0]),"between"!==c&&(e.isSum||t path").each(function(e){if(!e.isBlank){var t=s[e.dir].marker;r.select(this).call(n.fill,t.color).call(n.stroke,t.line.color).call(i.dashLine,t.line.dash,t.line.width).style("opacity",s.selectedpoints&&!e.selected?a:1)}}),l(o,s,e),o.selectAll(".lines").each(function(){var e=s.connector.line;i.lineGroupStyle(r.select(this).selectAll("path"),e.width,e.color,e.dash)})})}}}}),sN=p({"src/traces/waterfall/hover.js"(e,t){var r=rn().hoverLabelText,i=ee().opacity,n=aI().hoverOnBars,a=sz(),o={increasing:a.INCREASING.SYMBOL,decreasing:a.DECREASING.SYMBOL};t.exports=function(e,t,a,s,l){var c=n(e,t,a,s,l);if(c){var u,h,d,f,p=c.cd,m=p[0].trace,g="h"===m.orientation,y=g?"x":"y",v=g?e.xa:e.ya,x=p[c.index],b=x.isSum?x.b+x.s:x.rawS;c.initial=x.b+x.s-b,c.delta=b,c.final=c.initial+c.delta;var _=S(Math.abs(c.delta));c.deltaLabel=b<0?"("+_+")":_,c.finalLabel=S(c.final),c.initialLabel=S(c.initial);var w=x.hi||m.hoverinfo,T=[];if(w&&"none"!==w&&"skip"!==w){var M="all"===w,k=w.split("+"),A=function(e){return M||-1!==k.indexOf(e)};x.isSum||(!A("final")||A(g?"x":"y")||T.push(c.finalLabel),A("delta")&&(b<0?T.push(c.deltaLabel+" "+o.decreasing):T.push(c.deltaLabel+" "+o.increasing)),A("initial")&&T.push("Initial: "+c.initialLabel))}return T.length&&(c.extraText=T.join("
")),h=(u=m[x.dir].marker).color,d=u.line.color,f=u.line.width,c.color=i(h)?h:i(d)&&f?d:void 0,[c]}function S(e){return r(v,e,m[y+"hoverformat"])}}}}),sU=p({"src/traces/waterfall/event_data.js"(e,t){t.exports=function(e,t){return e.x="xVal"in t?t.xVal:t.x,e.y="yVal"in t?t.yVal:t.y,"initial"in t&&(e.initial=t.initial),"delta"in t&&(e.delta=t.delta),"final"in t&&(e.final=t.final),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e}}}),sV=p({"src/traces/waterfall/index.js"(e,t){t.exports={attributes:sP(),layoutAttributes:sI(),supplyDefaults:sD().supplyDefaults,crossTraceDefaults:sD().crossTraceDefaults,supplyLayoutDefaults:sO(),calc:sR(),crossTraceCalc:sF(),plot:sj(),style:sB().style,hoverPoints:sN(),eventData:sU(),selectPoints:aD(),moduleType:"trace",name:"waterfall",basePlotModule:np(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),sq=p({"lib/waterfall.js"(e,t){t.exports=sV()}}),sH=p({"src/traces/image/constants.js"(e,t){t.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xb0","%","%",""]}}}}}),sG={};m(sG,{default:()=>s0});var sW,sY,sZ,s$,sX,sK,sJ,sQ,s0,s1=f({"src/traces/image/attributes.ts"(){for(let e of(sW=y(q()),sY=y(Z()),sZ=y(eW()),s$=y(ix()),sX=y(sH()),sJ=[],sQ=[],sK=["rgb","rgba","rgba256","hsl","hsla"])){let t=sX.colormodel[e];sJ.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),sQ.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}s0={source:{valType:"string",editType:"calc",description:'Specifies the data URI of the image to be visualized. The URI consists of "data:image/[][;base64\\\\],"'},z:{valType:"data_array",editType:"calc",description:"A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."},colormodel:{valType:"enumerated",values:sK,editType:"calc",description:"Color model used to map the numerical color components described in `z` into colors. If `source` is specified, this attribute will be set to `rgba256` otherwise it defaults to `rgb`."},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:"Picks a smoothing algorithm used to smooth `z` data. This only applies for image traces that use the `source` attribute."},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component. Note that the default value will depend on the colormodel.",sJ.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component. Note that the default value will depend on the colormodel.",sQ.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:"Set the image's x position. The left edge of the image (or the right edge if the x axis is reversed or dx is negative) will be found at xmin=x0-dx/2"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:"Set the image's y position. The top edge of the image (or the bottom edge if the y axis is NOT reversed or if dy is negative) will be found at ymin=y0-dy/2. By default when an image trace is included, the y axis will be reversed so that the image is right-side-up, but you can disable this by setting yaxis.autorange=true or by providing an explicit y axis range."},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,sW.extendFlat)({},sY.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,sZ.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,sZ.templatefallbackAttrs)(),zorder:s$.zorder}}}),s2=p({"src/traces/image/defaults.js"(e,t){var r=tv(),i=(s1(),v(sG)).default,n=sH(),a=iP().IMAGE_URL_PREFIX;t.exports=function(e,t){function o(n,a){return r.coerce(e,t,i,n,a)}o("source"),t.source&&!t.source.match(a)&&delete t.source,t._hasSource=!!t.source;var s,l=o("z");if(t._hasZ=!(void 0===l||!l.length||!l[0]||!l[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}o("x0"),o("y0"),o("dx"),o("dy"),t._hasZ?(o("colormodel","rgb"),o("zmin",(s=n.colormodel[t.colormodel]).zminDflt||s.min),o("zmax",s.zmaxDflt||s.max)):t._hasSource&&(t.colormodel="rgba256",s=n.colormodel[t.colormodel],t.zmin=s.zminDflt,t.zmax=s.zmaxDflt),o("zsmooth"),o("text"),o("hovertext"),o("hovertemplate"),o("hovertemplatefallback"),t._length=null,o("zorder")}}}),s3=p({"node_modules/inherits/inherits_browser.js"(e,t){"function"==typeof Object.create?t.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}}}),s5=p({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(e,t){t.exports=tw().EventEmitter}}),s4=p({"node_modules/base64-js/index.js"(e){e.byteLength=function(e){var t=s(e),r=t[0],i=t[1];return(r+i)*3/4-i},e.toByteArray=function(e){var t,r,i=s(e),o=i[0],l=i[1],c=new a((o+l)*3/4-l),u=0,h=l>0?o-4:o;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===l&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===l&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},e.fromByteArray=function(e){for(var t,r=e.length,n=r%3,a=[],o=0,s=r-n;o>18&63]+i[n>>12&63]+i[n>>6&63]+i[63&n]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===n?a.push(i[(t=e[r-1])>>2]+i[t<<4&63]+"=="):2===n&&a.push(i[(t=(e[r-2]<<8)+e[r-1])>>10]+i[t>>4&63]+i[t<<2&63]+"="),a.join("")};var t,r,i=[],n=[],a="u">typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(t=0,r=o.length;t0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var i=r===t?0:4-r%4;return[r,i]}n[45]=62,n[95]=63}}),s6=p({"node_modules/ieee754/index.js"(e){e.read=function(e,t,r,i,n){var a,o,s=8*n-i-1,l=(1<>1,u=-7,h=r?n-1:0,d=r?-1:1,f=e[t+h];for(h+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),a-=c}return(f?-1:1)*o*Math.pow(2,a-i)},e.write=function(e,t,r,i,n,a){var o,s,l,c=8*a-n-1,u=(1<>1,d=5960464477539062e-23*(23===n),f=i?0:a-1,p=i?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,n),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+f]=255&s,f+=p,s/=256,n-=8);for(o=o<0;e[r+f]=255&o,f+=p,o/=256,c-=8);e[r+f-p]|=128*m}}}),s8=p({"node_modules/buffer/index.js"(e){var t=s4(),r=s6(),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function n(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return l(e)}return o(e,t,r)}function o(e,t,r){if("string"==typeof e){var i=e,o=t;if(("string"!=typeof o||""===o)&&(o="utf8"),!a.isEncoding(o))throw TypeError("Unknown encoding: "+o);let r=0|d(i,o),s=n(r),l=s.write(i,o);return l!==r&&(s=s.slice(0,l)),s}if(ArrayBuffer.isView(e)){var s=e;if(O(s,Uint8Array)){let e=new Uint8Array(s);return u(e.buffer,e.byteOffset,e.byteLength)}return c(s)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(O(e,SharedArrayBuffer)||e&&O(e.buffer,SharedArrayBuffer)))return u(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let l=e.valueOf&&e.valueOf();if(null!=l&&l!==e)return a.from(l,t,r);let f=function(e){if(a.isBuffer(e)){let t=0|h(e.length),r=n(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?n(0):c(e):"Buffer"===e.type&&Array.isArray(e.data)?c(e.data):void 0}(e);if(f)return f;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function s(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return s(e),n(e<0?0:0|h(e))}function c(e){let t=e.length<0?0:0|h(e.length),r=n(t);for(let i=0;i=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;let n=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return I(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return z(e).length;default:if(n)return i?-1:I(e).length;t=(""+t).toLowerCase(),n=!0}}function f(e,r,i){let n=!1;if((void 0===r||r<0)&&(r=0),r>this.length||((void 0===i||i>this.length)&&(i=this.length),i<=0)||(i>>>=0)<=(r>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);let n="";for(let i=t;i0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(o=r*=1)!=o&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1}else if(r<0)if(!n)return -1;else r=0;if("string"==typeof t&&(t=a.from(t,i)),a.isBuffer(t))return 0===t.length?-1:g(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):g(e,[t],r,i,n);throw TypeError("val must be string, number or Buffer")}function g(e,t,r,i,n){let a,o=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){let i=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){let r=!0;for(let i=0;i239?4:t>223?3:t>191?2:1;if(n+o<=r){let r,i,s,l;switch(o){case 1:t<128&&(a=t);break;case 2:(192&(r=e[n+1]))==128&&(l=(31&t)<<6|63&r)>127&&(a=l);break;case 3:r=e[n+1],i=e[n+2],(192&r)==128&&(192&i)==128&&(l=(15&t)<<12|(63&r)<<6|63&i)>2047&&(l<55296||l>57343)&&(a=l);break;case 4:r=e[n+1],i=e[n+2],s=e[n+3],(192&r)==128&&(192&i)==128&&(192&s)==128&&(l=(15&t)<<18|(63&r)<<12|(63&i)<<6|63&s)>65535&&l<1114112&&(a=l)}}null===a?(a=65533,o=1):a>65535&&(a-=65536,i.push(a>>>10&1023|55296),a=56320|1023&a),i.push(a),n+=o}var a=i;let o=a.length;if(o<=4096)return String.fromCharCode.apply(String,a);let s="",l=0;for(;lr)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,i,n,o){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw RangeError("Index out of range")}function b(e,t,r,i,n){E(t,i,n,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,r}function _(e,t,r,i,n){E(t,i,n,e,r,7);let a=Number(t&BigInt(0xffffffff));e[r+7]=a,a>>=8,e[r+6]=a,a>>=8,e[r+5]=a,a>>=8,e[r+4]=a;let o=Number(t>>BigInt(32)&BigInt(0xffffffff));return e[r+3]=o,o>>=8,e[r+2]=o,o>>=8,e[r+1]=o,o>>=8,e[r]=o,r+8}function w(e,t,r,i,n,a){if(r+i>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,i,n,a){return t*=1,i>>>=0,a||w(e,t,i,4,34028234663852886e22,-34028234663852886e22),r.write(e,t,i,n,23,4),i+4}function M(e,t,i,n,a){return t*=1,i>>>=0,a||w(e,t,i,8,17976931348623157e292,-17976931348623157e292),r.write(e,t,i,n,52,8),i+8}e.Buffer=a,e.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},e.INSPECT_MAX_BYTES=50,e.kMaxLength=0x7fffffff,a.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch{return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return o(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return s(e),e<=0?n(e):void 0!==t?"string"==typeof r?n(e).fill(t,r):n(e).fill(t):n(e)},a.allocUnsafe=function(e){return l(e)},a.allocUnsafeSlow=function(e){return l(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),O(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,i=t.length;for(let n=0,a=Math.min(r,i);ni.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(i,n)):Uint8Array.prototype.set.call(i,t,n);else if(a.isBuffer(t))t.copy(i,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=t.length}return i},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;tr&&(t+=" ... "),""},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,r,i,n){if(O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;let o=n-i,s=r-t,l=Math.min(o,s),c=this.slice(i,n),u=e.slice(t,r);for(let e=0;e>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");let f=!1;for(;;)switch(i){case"hex":return function(e,t,r,i){let n;r=Number(r)||0;let a=e.length-r;i?(i=Number(i))>a&&(i=a):i=a;let o=t.length;for(i>o/2&&(i=o/2),n=0;n>8,n.push(r%256),n.push(i);return n}(e,this.length-u),this,u,h);default:if(f)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||v(e,t,this.length);let i=this[e],n=1,a=0;for(;++a>>=0,t>>>=0,r||v(e,t,this.length);let i=this[e+--t],n=1;for(;t>0&&(n*=256);)i+=this[e+--t]*n;return i},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=F(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&L(e,this.length-8);let i=t+256*this[++e]+65536*this[++e]+0x1000000*this[++e],n=this[++e]+256*this[++e]+65536*this[++e]+0x1000000*r;return BigInt(i)+(BigInt(n)<>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&L(e,this.length-8);let i=0x1000000*t+65536*this[++e]+256*this[++e]+this[++e],n=0x1000000*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(i)<>>=0,t>>>=0,r||v(e,t,this.length);let i=this[e],n=1,a=0;for(;++a=(n*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||v(e,t,this.length);let i=t,n=1,a=this[e+--i];for(;i>0&&(n*=256);)a+=this[e+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},a.prototype.readInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),128&this[e]?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=F(function(e){C(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&L(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&L(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<>>=0,t||v(e,4,this.length),r.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),r.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),r.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),r.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,i){if(e*=1,t>>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}let n=1,a=0;for(this[t]=255&e;++a>>=0,r>>>=0,!i){let i=Math.pow(2,8*r)-1;x(this,e,t,r,i,0)}let n=r-1,a=1;for(this[t+n]=255&e;--n>=0&&(a*=256);)this[t+n]=e/a&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=F(function(e,t=0){return b(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=F(function(e,t=0){return _(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,r,i){if(e*=1,t>>>=0,!i){let i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}let n=0,a=1,o=0;for(this[t]=255&e;++n>>=0,!i){let i=Math.pow(2,8*r-1);x(this,e,t,r,i-1,-i)}let n=r-1,a=1,o=0;for(this[t+n]=255&e;--n>=0&&(a*=256);)e<0&&0===o&&0!==this[t+n+1]&&(o=1),this[t+n]=(e/a|0)-o&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||x(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=F(function(e,t=0){return b(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=F(function(e,t=0){return _(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,i){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n=i+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function E(e,t,r,i,n,a){if(e>r||e3?0===t||t===BigInt(0)?`>= 0${i} and < 2${i} ** ${(a+1)*8}${i}`:`>= -(2${i} ** ${(a+1)*8-1}${i}) and < 2 ** ${(a+1)*8-1}${i}`:`>= ${t}${i} and <= ${r}${i}`,new k.ERR_OUT_OF_RANGE("value",n,e)}C(n,"offset"),(void 0===i[n]||void 0===i[n+a])&&L(n,i.length-(a+1))}function C(e,t){if("number"!=typeof e)throw new k.ERR_INVALID_ARG_TYPE(t,"number",e)}function L(e,t,r){throw Math.floor(e)!==e?(C(e,r),new k.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new k.ERR_BUFFER_OUT_OF_BOUNDS:new k.ERR_OUT_OF_RANGE(r||"offset",`>= ${+!!r} and <= ${t}`,e)}A("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),A("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),A("ERR_OUT_OF_RANGE",function(e,t,r){let i=`The value of "${e}" is out of range.`,n=r;return Number.isInteger(r)&&Math.abs(r)>0x100000000?n=S(String(r)):"bigint"==typeof r&&(n=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(n=S(n)),n+="n"),i+=` It must be ${t}. Received ${n}`},RangeError);var P=/[^+/0-9A-Za-z-_]/g;function I(e,t){t=t||1/0;let r,i=e.length,n=null,a=[];for(let o=0;o55295&&r<57344){if(!n){if(r>56319||o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function z(e){return t.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(P,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function D(e,t,r,i){let n;for(n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function O(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var R=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let i=16*r;for(let n=0;n<16;++n)t[i+n]=e[r]+e[n]}return t}();function F(e){return typeof BigInt>"u"?j:e}function j(){throw Error("BigInt not supported")}}}),s7=p({"node_modules/has-symbols/shams.js"(e,t){t.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t||"[object Symbol]"!==Object.prototype.toString.call(t)||"[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(var i in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var a=Object.getOwnPropertyDescriptor(e,t);if(42!==a.value||!0!==a.enumerable)return!1}return!0}}}),s9=p({"node_modules/has-tostringtag/shams.js"(e,t){var r=s7();t.exports=function(){return r()&&!!Symbol.toStringTag}}}),le=p({"node_modules/es-object-atoms/index.js"(e,t){t.exports=Object}}),lt=p({"node_modules/es-errors/index.js"(e,t){t.exports=Error}}),lr=p({"node_modules/es-errors/eval.js"(e,t){t.exports=EvalError}}),li=p({"node_modules/es-errors/range.js"(e,t){t.exports=RangeError}}),ln=p({"node_modules/es-errors/ref.js"(e,t){t.exports=ReferenceError}}),la=p({"node_modules/es-errors/syntax.js"(e,t){t.exports=SyntaxError}}),lo=p({"node_modules/es-errors/type.js"(e,t){t.exports=TypeError}}),ls=p({"node_modules/es-errors/uri.js"(e,t){t.exports=URIError}}),ll=p({"node_modules/math-intrinsics/abs.js"(e,t){t.exports=Math.abs}}),lc=p({"node_modules/math-intrinsics/floor.js"(e,t){t.exports=Math.floor}}),lu=p({"node_modules/math-intrinsics/max.js"(e,t){t.exports=Math.max}}),lh=p({"node_modules/math-intrinsics/min.js"(e,t){t.exports=Math.min}}),ld=p({"node_modules/math-intrinsics/pow.js"(e,t){t.exports=Math.pow}}),lf=p({"node_modules/math-intrinsics/round.js"(e,t){t.exports=Math.round}}),lp=p({"node_modules/math-intrinsics/isNaN.js"(e,t){t.exports=Number.isNaN||function(e){return e!=e}}}),lm=p({"node_modules/math-intrinsics/sign.js"(e,t){var r=lp();t.exports=function(e){return r(e)||0===e?e:e<0?-1:1}}}),lg=p({"node_modules/gopd/gOPD.js"(e,t){t.exports=Object.getOwnPropertyDescriptor}}),ly=p({"node_modules/gopd/index.js"(e,t){var r=lg();if(r)try{r([],"length")}catch{r=null}t.exports=r}}),lv=p({"node_modules/es-define-property/index.js"(e,t){var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}t.exports=r}}),lx=p({"node_modules/has-symbols/index.js"(e,t){var r="u">typeof Symbol&&Symbol,i=s7();t.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&i()}}}),lb=p({"node_modules/get-proto/Reflect.getPrototypeOf.js"(e,t){t.exports="u">typeof Reflect&&Reflect.getPrototypeOf||null}}),l_=p({"node_modules/get-proto/Object.getPrototypeOf.js"(e,t){t.exports=le().getPrototypeOf||null}}),lw=p({"node_modules/function-bind/implementation.js"(e,t){var r=Object.prototype.toString,i=Math.max,n=function(e,t){for(var r=[],i=0;itypeof Reflect&&Reflect&&Reflect.apply}}),lS=p({"node_modules/call-bind-apply-helpers/actualApply.js"(e,t){var r=lT(),i=lk(),n=lM();t.exports=lA()||r.call(n,i)}}),lE=p({"node_modules/call-bind-apply-helpers/index.js"(e,t){var r=lT(),i=lo(),n=lM(),a=lS();t.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new i("a function is required");return a(r,n,e)}}}),lC=p({"node_modules/dunder-proto/get.js"(e,t){var r,i=lE(),n=ly();try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var a=!!r&&n&&n(Object.prototype,"__proto__"),o=Object,s=o.getPrototypeOf;t.exports=a&&"function"==typeof a.get?i([a.get]):"function"==typeof s&&function(e){return s(null==e?e:o(e))}}}),lL=p({"node_modules/get-proto/index.js"(e,t){var r=lb(),i=l_(),n=lC();t.exports=r?function(e){return r(e)}:i?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw TypeError("getProto: not an object");return i(e)}:n?function(e){return n(e)}:null}}),lP=p({"node_modules/hasown/index.js"(e,t){var r=Function.prototype.call,i=Object.prototype.hasOwnProperty;t.exports=lT().call(r,i)}}),lI=p({"node_modules/get-intrinsic/index.js"(e,t){var r,i=le(),n=lt(),a=lr(),o=li(),s=ln(),l=la(),c=lo(),u=ls(),h=ll(),d=lc(),f=lu(),p=lh(),m=ld(),g=lf(),y=lm(),v=Function,x=function(e){try{return v('"use strict"; return ('+e+").constructor;")()}catch{}},b=ly(),_=lv(),w=function(){throw new c},T=b?function(){try{return arguments.callee,w}catch{try{return b(arguments,"callee").get}catch{return w}}}():w,M=lx()(),k=lL(),A=l_(),S=lb(),E=lk(),C=lM(),L={},P=typeof Uint8Array>"u"||!k?r:k(Uint8Array),I={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":M&&k?k([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":n,"%eval%":eval,"%EvalError%":a,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":v,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":M&&k?k(k([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":!(typeof Map>"u")&&M&&k?k(new Map()[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":o,"%ReferenceError%":s,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":!(typeof Set>"u")&&M&&k?k(new Set()[Symbol.iterator]()):r,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":M&&k?k(""[Symbol.iterator]()):r,"%Symbol%":M?Symbol:r,"%SyntaxError%":l,"%ThrowTypeError%":T,"%TypedArray%":P,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":C,"%Function.prototype.apply%":E,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":A,"%Math.abs%":h,"%Math.floor%":d,"%Math.max%":f,"%Math.min%":p,"%Math.pow%":m,"%Math.round%":g,"%Math.sign%":y,"%Reflect.getPrototypeOf%":S};if(k)try{null.error}catch(e){z=k(k(e)),I["%Error.prototype%"]=z}var z,D=function e(t){var r;if("%AsyncFunction%"===t)r=x("async function () {}");else if("%GeneratorFunction%"===t)r=x("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=x("async function* () {}");else if("%AsyncGenerator%"===t){var i=e("%AsyncGeneratorFunction%");i&&(r=i.prototype)}else if("%AsyncIteratorPrototype%"===t){var n=e("%AsyncGenerator%");n&&k&&(r=k(n.prototype))}return I[t]=r,r},O={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},R=lT(),F=lP(),j=R.call(C,Array.prototype.concat),B=R.call(E,Array.prototype.splice),N=R.call(C,String.prototype.replace),U=R.call(C,String.prototype.slice),V=R.call(C,RegExp.prototype.exec),q=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,G=function(e){var t=U(e,0,1),r=U(e,-1);if("%"===t&&"%"!==r)throw new l("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new l("invalid intrinsic syntax, expected opening `%`");var i=[];return N(e,q,function(e,t,r,n){i[i.length]=r?N(n,H,"$1"):t||e}),i},W=function(e,t){var r,i=e;if(F(O,i)&&(i="%"+(r=O[i])[0]+"%"),F(I,i)){var n=I[i];if(n===L&&(n=D(i)),typeof n>"u"&&!t)throw new c("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:i,value:n}}throw new l("intrinsic "+e+" does not exist!")};t.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new c('"allowMissing" argument must be a boolean');if(null===V(/^%?[^%]*%?$/,e))throw new l("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=G(e),i=r.length>0?r[0]:"",n=W("%"+i+"%",t),a=n.name,o=n.value,s=!1,u=n.alias;u&&(i=u[0],B(r,j([0,1],u)));for(var h=1,d=!0;h=r.length){var g=b(o,f);o=(d=!!g)&&"get"in g&&!("originalValue"in g.get)?g.get:o[f]}else d=F(o,f),o=o[f];d&&!s&&(I[a]=o)}}return o}}}),lz=p({"node_modules/call-bound/index.js"(e,t){var r=lI(),i=lE(),n=i([r("%String.prototype.indexOf%")]);t.exports=function(e,t){var a=r(e,!!t);return"function"==typeof a&&n(e,".prototype.")>-1?i([a]):a}}}),lD=p({"node_modules/is-arguments/index.js"(e,t){var r=s9()(),i=lz()("Object.prototype.toString"),n=function(e){return(!r||!e||"object"!=typeof e||!(Symbol.toStringTag in e))&&"[object Arguments]"===i(e)},a=function(e){return!!n(e)||null!==e&&"object"==typeof e&&"length"in e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==i(e)&&"callee"in e&&"[object Function]"===i(e.callee)},o=function(){return n(arguments)}();n.isLegacyArguments=a,t.exports=o?n:a}}),lO=p({"node_modules/is-regex/index.js"(e,t){var r,i,n,a,o,s,l=lz(),c=s9()(),u=lP(),h=ly();c?(r=l("RegExp.prototype.exec"),i={},a={toString:n=function(){throw i},valueOf:n},"symbol"==typeof Symbol.toPrimitive&&(a[Symbol.toPrimitive]=n),s=function(e){if(!e||"object"!=typeof e)return!1;var t=h(e,"lastIndex");if(!(t&&u(t,"value")))return!1;try{r(e,a)}catch(e){return e===i}}):(o=l("Object.prototype.toString"),s=function(e){return!!e&&("object"==typeof e||"function"==typeof e)&&"[object RegExp]"===o(e)}),t.exports=s}}),lR=p({"node_modules/safe-regex-test/index.js"(e,t){var r=lz(),i=lO(),n=r("RegExp.prototype.exec"),a=lo();t.exports=function(e){if(!i(e))throw new a("`regex` must be a RegExp");return function(t){return null!==n(e,t)}}}}),lF=p({"node_modules/generator-function/index.js"(e,t){var r=(function*(){}).constructor;t.exports=()=>r}}),lj=p({"node_modules/is-generator-function/index.js"(e,t){var r=lz(),i=lR()(/^\s*(?:function)?\*/),n=s9()(),a=lL(),o=r("Object.prototype.toString"),s=r("Function.prototype.toString"),l=lF();t.exports=function(e){if("function"!=typeof e)return!1;if(i(s(e)))return!0;if(!n)return"[object GeneratorFunction]"===o(e);if(!a)return!1;var t=l();return t&&a(e)===t.prototype}}}),lB=p({"node_modules/is-callable/index.js"(e,t){var r,i,n,a=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{i=Object.defineProperty({},"length",{get:function(){throw n}}),n={},o(function(){throw 42},null,i)}catch(e){e!==n&&(o=null)}else o=null;var s=/^\s*class\b/,l=function(e){try{var t=a.call(e);return s.test(t)}catch{return!1}},c=function(e){try{return!l(e)&&(a.call(e),!0)}catch{return!1}},u=Object.prototype.toString,h="function"==typeof Symbol&&!!Symbol.toStringTag,d=!(0 in[,]),f=function(){return!1};"object"==typeof document&&(r=document.all,u.call(r)===u.call(document.all)&&(f=function(e){if((d||!e)&&(typeof e>"u"||"object"==typeof e))try{var t=u.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch{}return!1})),t.exports=o?function(e){if(f(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,i)}catch(e){if(e!==n)return!1}return!l(e)&&c(e)}:function(e){if(f(e))return!0;if(!e||"function"!=typeof e&&"object"!=typeof e)return!1;if(h)return c(e);if(l(e))return!1;var t=u.call(e);return("[object Function]"===t||"[object GeneratorFunction]"===t||!!/^\[object HTML/.test(t))&&c(e)}}}),lN=p({"node_modules/for-each/index.js"(e,t){var r=lB(),i=Object.prototype.toString,n=Object.prototype.hasOwnProperty,a=function(e,t,r){for(var i=0,a=e.length;i=3&&(l=n),"[object Array]"===i.call(e)?a(e,t,l):"string"==typeof e?o(e,t,l):s(e,t,l)}}}),lU=p({"node_modules/possible-typed-array-names/index.js"(e,t){t.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),lV=p({"node_modules/available-typed-arrays/index.js"(e,t){var r=lU(),i=typeof globalThis>"u"?window:globalThis;t.exports=function(){for(var e=[],t=0;t3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new n("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new n("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new n("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new n("`loose`, if provided, must be a boolean");var s=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,u=arguments.length>6&&arguments[6],h=!!a&&a(e,t);if(r)r(e,t,{configurable:null===c&&h?h.configurable:!c,enumerable:null===s&&h?h.enumerable:!s,value:o,writable:null===l&&h?h.writable:!l});else if(!u&&(s||l||c))throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");else e[t]=o}}}),lH=p({"node_modules/has-property-descriptors/index.js"(e,t){var r=lv(),i=function(){return!!r};i.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch{return!0}},t.exports=i}}),lG=p({"node_modules/set-function-length/index.js"(e,t){var r=lI(),i=lq(),n=lH()(),a=ly(),o=lo(),s=r("%Math.floor%");t.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>0xffffffff||s(t)!==t)throw new o("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],l=!0,c=!0;if("length"in e&&a){var u=a(e,"length");u&&!u.configurable&&(l=!1),u&&!u.writable&&(c=!1)}return(l||c||!r)&&(n?i(e,"length",t,!0,!0):i(e,"length",t)),e}}}),lW=p({"node_modules/call-bind-apply-helpers/applyBind.js"(e,t){var r=lT(),i=lk(),n=lS();t.exports=function(){return n(r,i,arguments)}}}),lY=p({"node_modules/call-bind/index.js"(e,t){var r=lG(),i=lv(),n=lE(),a=lW();t.exports=function(e){var t=n(arguments),i=1+e.length-(arguments.length-1);return r(t,i>0?i:0,!0)},i?i(t.exports,"apply",{value:a}):t.exports.apply=a}}),lZ=p({"node_modules/which-typed-array/index.js"(e,t){var r=lN(),i=lV(),n=lY(),a=lz(),o=ly(),s=lL(),l=a("Object.prototype.toString"),c=s9()(),u=typeof globalThis>"u"?window:globalThis,h=i(),d=a("String.prototype.slice"),f=a("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r-1?n:"Object"===n&&(i=!1,r(p,function(t,r){if(!i)try{t(e),i=d(r,1)}catch{}}),i)}return o?(t=!1,r(p,function(r,i){if(!t)try{"$"+r(e)===i&&(t=d(i,1))}catch{}}),t):null}}}),l$=p({"node_modules/is-typed-array/index.js"(e,t){var r=lZ();t.exports=function(e){return!!r(e)}}}),lX=p({"node_modules/util/support/types.js"(e){var t,r,i=lD(),n=lj(),a=lZ(),o=l$();function s(e){return e.call.bind(e)}var l="u">typeof BigInt,c="u">typeof Symbol,u=s(Object.prototype.toString),h=s(Number.prototype.valueOf),d=s(String.prototype.valueOf),f=s(Boolean.prototype.valueOf);function p(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch{return!1}}function m(e){return"[object Map]"===u(e)}function g(e){return"[object Set]"===u(e)}function y(e){return"[object WeakMap]"===u(e)}function v(e){return"[object WeakSet]"===u(e)}function x(e){return"[object ArrayBuffer]"===u(e)}function b(e){return!(typeof ArrayBuffer>"u")&&(x.working?x(e):e instanceof ArrayBuffer)}function _(e){return"[object DataView]"===u(e)}function w(e){return!(typeof DataView>"u")&&(_.working?_(e):e instanceof DataView)}l&&(t=s(BigInt.prototype.valueOf)),c&&(r=s(Symbol.prototype.valueOf)),e.isArgumentsObject=i,e.isGeneratorFunction=n,e.isTypedArray=o,e.isPromise=function(e){return"u">typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},e.isArrayBufferView=function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):o(e)||w(e)},e.isUint8Array=function(e){return"Uint8Array"===a(e)},e.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===a(e)},e.isUint16Array=function(e){return"Uint16Array"===a(e)},e.isUint32Array=function(e){return"Uint32Array"===a(e)},e.isInt8Array=function(e){return"Int8Array"===a(e)},e.isInt16Array=function(e){return"Int16Array"===a(e)},e.isInt32Array=function(e){return"Int32Array"===a(e)},e.isFloat32Array=function(e){return"Float32Array"===a(e)},e.isFloat64Array=function(e){return"Float64Array"===a(e)},e.isBigInt64Array=function(e){return"BigInt64Array"===a(e)},e.isBigUint64Array=function(e){return"BigUint64Array"===a(e)},m.working="u">typeof Map&&m(new Map),e.isMap=function(e){return!(typeof Map>"u")&&(m.working?m(e):e instanceof Map)},g.working="u">typeof Set&&g(new Set),e.isSet=function(e){return!(typeof Set>"u")&&(g.working?g(e):e instanceof Set)},y.working="u">typeof WeakMap&&y(new WeakMap),e.isWeakMap=function(e){return!(typeof WeakMap>"u")&&(y.working?y(e):e instanceof WeakMap)},v.working="u">typeof WeakSet&&v(new WeakSet),e.isWeakSet=function(e){return v(e)},x.working="u">typeof ArrayBuffer&&x(new ArrayBuffer),e.isArrayBuffer=b,_.working="u">typeof ArrayBuffer&&"u">typeof DataView&&_(new DataView(new ArrayBuffer(1),0,1)),e.isDataView=w;var T="u">typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function M(e){return"[object SharedArrayBuffer]"===u(e)}function k(e){return!(typeof T>"u")&&(typeof M.working>"u"&&(M.working=M(new T)),M.working?M(e):e instanceof T)}function A(e){return p(e,h)}function S(e){return p(e,d)}function E(e){return p(e,f)}function C(e){return l&&p(e,t)}function L(e){return c&&p(e,r)}e.isSharedArrayBuffer=k,e.isAsyncFunction=function(e){return"[object AsyncFunction]"===u(e)},e.isMapIterator=function(e){return"[object Map Iterator]"===u(e)},e.isSetIterator=function(e){return"[object Set Iterator]"===u(e)},e.isGeneratorObject=function(e){return"[object Generator]"===u(e)},e.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===u(e)},e.isNumberObject=A,e.isStringObject=S,e.isBooleanObject=E,e.isBigIntObject=C,e.isSymbolObject=L,e.isBoxedPrimitive=function(e){return A(e)||S(e)||E(e)||C(e)||L(e)},e.isAnyArrayBuffer=function(e){return"u">typeof Uint8Array&&(b(e)||k(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(t){Object.defineProperty(e,t,{enumerable:!1,value:function(){throw Error(t+" is not supported in userland")}})})}}),lK=p({"node_modules/util/support/isBufferBrowser.js"(e,t){t.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}}}),lJ=p({"(disabled):node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}default:return e}}),l=n[i];itypeof S&&!0===S.noDeprecation)return t;if(typeof S>"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(S.throwDeprecation)throw Error(r);S.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var i={},n=/^$/;function a(t,r){var i={seen:[],stylize:s};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),d(r)?i.showHidden=r:r&&e._extend(i,r),g(i.showHidden)&&(i.showHidden=!1),g(i.depth)&&(i.depth=2),g(i.colors)&&(i.colors=!1),g(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=o),l(i,t,i.depth)}function o(e,t){var r=a.styles[t];return r?"\x1b["+a.colors[r][0]+"m"+e+"\x1b["+a.colors[r][1]+"m":e}function s(e,t){return e}function l(t,r,i){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&!(r.constructor&&r.constructor.prototype===r)){var n,a,o,s,v,w,T=r.inspect(i,t);return m(T)||(T=l(t,T,i)),T}var M=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return p(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):f(t)?e.stylize("null","null"):void 0}(t,r);if(M)return M;var A=Object.keys(r),S=(v={},A.forEach(function(e,t){v[e]=!0}),v);if(t.showHidden&&(A=Object.getOwnPropertyNames(r)),b(r)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return c(r);if(0===A.length){if(_(r)){var E=r.name?": "+r.name:"";return t.stylize("[Function"+E+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(b(r))return c(r)}var C="",L=!1,P=["{","}"];return(h(r)&&(L=!0,P=["[","]"]),_(r)&&(C=" [Function"+(r.name?": "+r.name:"")+"]"),y(r)&&(C=" "+RegExp.prototype.toString.call(r)),x(r)&&(C=" "+Date.prototype.toUTCString.call(r)),b(r)&&(C=" "+c(r)),0!==A.length||L&&0!=r.length)?i<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),w=L?function(e,t,r,i,n){for(var a=[],o=0,s=t.length;o=0&&s++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?o[0]+(""===a?"":a+` + `)+" "+n.join(`, + `)+" "+o[1]:o[0]+a+" "+n.join(", ")+" "+o[1]):P[0]+C+P[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,r,i,n,a){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(i,n)||(o="["+n+"]"),s||(0>e.seen.indexOf(c.value)?(s=f(r)?l(e,c.value,null):l(e,c.value,r-1)).indexOf(` +`)>-1&&(s=a?s.split(` +`).map(function(e){return" "+e}).join(` +`).slice(2):` +`+s.split(` +`).map(function(e){return" "+e}).join(` +`)):s=e.stylize("[Circular]","special")),g(o)){if(a&&n.match(/^\d+$/))return s;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function f(e){return null===e}function p(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function y(e){return v(e)&&"[object RegExp]"===w(e)}function v(e){return"object"==typeof e&&null!==e}function x(e){return v(e)&&"[object Date]"===w(e)}function b(e){return v(e)&&("[object Error]"===w(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}n=RegExp("^"+"false".replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()+"$","i"),e.debuglog=function(t){if(!i[t=t.toUpperCase()])if(n.test(t)){var r=S.pid;i[t]=function(){var i=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,i)}}else i[t]=function(){};return i[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=lX(),e.isArray=h,e.isBoolean=d,e.isNull=f,e.isNullOrUndefined=function(e){return null==e},e.isNumber=p,e.isString=m,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=g,e.isRegExp=y,e.types.isRegExp=y,e.isObject=v,e.isDate=x,e.types.isDate=x,e.isError=b,e.types.isNativeError=b,e.isFunction=_,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||typeof e>"u"},e.isBuffer=lK();var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[T((t=new Date).getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=s3(),e._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};var A="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function E(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(A&&e[A]){var r=e[A];if("function"!=typeof r)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,A,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,i=new Promise(function(e,i){t=e,r=i}),n=[],a=0;a0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return a.alloc(0);for(var t,r,i=a.allocUnsafe(e>>>0),n=this.head,o=0;n;)t=n.data,r=o,a.prototype.copy.call(t,i,r),o+=n.data.length,n=n.next;return i}},{key:"consume",value:function(e,t){var r;return en.length?n.length:e;if(a===n.length?i+=n:i+=n.slice(0,e),0==(e-=a)){a===n.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=n.slice(a));break}++r}return this.length-=r,i}},{key:"_getBuffer",value:function(e){var t=a.allocUnsafe(e),r=this.head,i=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var n=r.data,o=e>n.length?n.length:e;if(n.copy(t,t.length-e,0,o),0==(e-=o)){o===n.length?(++i,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=n.slice(o));break}++i}return this.length-=i,t}},{key:s,value:function(e,t){return o(this,i(i({},t),{},{depth:0,customInspect:!1}))}}],function(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}i("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),i("ERR_INVALID_ARG_TYPE",function(e,t,r){if("string"==typeof t&&(i="not ",t.substr(0,i.length)===i)?(l="must not be",t=t.replace(/^not /,"")):l="must be",a=" argument",(void 0===o||o>e.length)&&(o=e.length),e.substring(o-a.length,o)===a)c="The ".concat(e," ").concat(l," ").concat(n(t,"type"));else{var i,a,o,s,l,c,u=("number"!=typeof s&&(s=0),s+1>e.length||-1===e.indexOf(".",s))?"argument":"property";c='The "'.concat(e,'" ').concat(u," ").concat(l," ").concat(n(t,"type"))}return c+". Received type ".concat(typeof r)},TypeError),i("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),i("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),i("ERR_STREAM_PREMATURE_CLOSE","Premature close"),i("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),i("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),i("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),i("ERR_STREAM_WRITE_AFTER_END","write after end"),i("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),i("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),i("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),t.exports.codes=r}}),l2=p({"node_modules/readable-stream/lib/internal/streams/state.js"(e,t){var r=l1().codes.ERR_INVALID_OPT_VALUE;t.exports={getHighWaterMark:function(e,t,i,n){var a=null!=t.highWaterMark?t.highWaterMark:n?t[i]:null;if(null!=a){if(!(isFinite(a)&&Math.floor(a)===a)||a<0)throw new r(n?i:"highWaterMark",a);return Math.floor(a)}return e.objectMode?16:16384}}}}),l3=p({"node_modules/util-deprecate/browser.js"(e,t){t.exports=function(e,t){if(r("noDeprecation"))return e;var i=!1;return function(){if(!i){if(r("throwDeprecation"))throw Error(t);r("traceDeprecation")?console.trace(t):console.warn(t),i=!0}return e.apply(this,arguments)}};function r(e){try{if(!window.localStorage)return!1}catch{return!1}var t=window.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}}}),l5=p({"node_modules/readable-stream/lib/_stream_writable.js"(e,t){function r(e){var t=this;this.next=null,this.entry=null,this.finish=function(){var r=t,i=e,n=r.entry;for(r.entry=null;n;){var a=n.callback;i.pendingcb--,a(void 0),n=n.next}i.corkedRequestsFree.next=r}}t.exports=T,T.WritableState=w;var i,n,a={deprecate:l3()},o=s5(),s=s8().Buffer,l=("u">typeof window||"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},c=l0(),u=l2().getHighWaterMark,h=l1().codes,d=h.ERR_INVALID_ARG_TYPE,f=h.ERR_METHOD_NOT_IMPLEMENTED,p=h.ERR_MULTIPLE_CALLBACK,m=h.ERR_STREAM_CANNOT_PIPE,g=h.ERR_STREAM_DESTROYED,y=h.ERR_STREAM_NULL_VALUES,v=h.ERR_STREAM_WRITE_AFTER_END,x=h.ERR_UNKNOWN_ENCODING,b=c.errorOrDestroy;function _(){}function w(e,t,n){i=i||l4(),e=e||{},"boolean"!=typeof n&&(n=t instanceof i),this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=u(this,e,"writableHighWaterMark",n),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,i=r.sync,n=r.writecb;if("function"!=typeof n)throw new p;if(r.writing=!1,r.writecb=null,r.length-=r.writelen,r.writelen=0,t)--r.pendingcb,i?(S.nextTick(n,t),S.nextTick(L,e,r),e._writableState.errorEmitted=!0,b(e,t)):(n(t),e._writableState.errorEmitted=!0,b(e,t),L(e,r));else{var a=E(r)||e.destroyed;a||r.corked||r.bufferProcessing||!r.bufferedRequest||A(e,r),i?S.nextTick(k,e,r,a,n):k(e,r,a,n)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new r(this)}function T(e){var t=this instanceof(i=i||l4());if(!t&&!n.call(T,this))return new T(e);this._writableState=new w(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),o.call(this)}function M(e,t,r,i,n,a,o){t.writelen=i,t.writecb=o,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new g("write")):r?e._writev(n,t.onwrite):e._write(n,a,t.onwrite),t.sync=!1}function k(e,t,r,i){var n,a;r||(n=e,0===(a=t).length&&a.needDrain&&(a.needDrain=!1,n.emit("drain"))),t.pendingcb--,i(),L(e,t)}function A(e,t){t.bufferProcessing=!0;var i=t.bufferedRequest;if(e._writev&&i&&i.next){var n=Array(t.bufferedRequestCount),a=t.corkedRequestsFree;a.entry=i;for(var o=0,s=!0;i;)n[o]=i,i.isBuf||(s=!1),i=i.next,o+=1;n.allBuffers=s,M(e,t,!0,t.length,n,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new r(t),t.bufferedRequestCount=0}else{for(;i;){var l=i.chunk,c=i.encoding,u=i.callback,h=t.objectMode?1:l.length;if(M(e,t,!1,h,l,c,u),i=i.next,t.bufferedRequestCount--,t.writing)break}null===i&&(t.lastBufferedRequest=null)}t.bufferedRequest=i,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(r){t.pendingcb--,r&&b(e,r),t.prefinished=!0,e.emit("prefinish"),L(e,t)})}function L(e,t){var r=E(t);if(r&&(t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,S.nextTick(C,e,t))),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var i=e._readableState;(!i||i.autoDestroy&&i.endEmitted)&&e.destroy()}return r}s3()(T,o),w.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(w.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(n=Function.prototype[Symbol.hasInstance],Object.defineProperty(T,Symbol.hasInstance,{value:function(e){return!!n.call(this,e)||this===T&&e&&e._writableState instanceof w}})):n=function(e){return e instanceof this},T.prototype.pipe=function(){b(this,new m)},T.prototype.write=function(e,t,r){var i,n,a,o,c,u,h,f=this._writableState,p=!1,m=!f.objectMode&&(i=e,s.isBuffer(i)||i instanceof l);return m&&!s.isBuffer(e)&&(n=e,e=s.from(n)),"function"==typeof t&&(r=t,t=null),m?t="buffer":t||(t=f.defaultEncoding),"function"!=typeof r&&(r=_),f.ending?(a=r,b(this,o=new v),S.nextTick(a,o)):(m||(c=e,u=r,null===c?h=new y:"string"==typeof c||f.objectMode||(h=new d("chunk",["string","Buffer"],c)),!h||(b(this,h),S.nextTick(u,h),0)))&&(f.pendingcb++,p=function(e,t,r,i,n,a){if(!r){var o,l,c=(o=i,l=n,t.objectMode||!1===t.decodeStrings||"string"!=typeof o||(o=s.from(o,l)),o);i!==c&&(r=!0,n="buffer",i=c)}var u=t.objectMode?1:i.length;t.length+=u;var h=t.length-1))throw new x(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(T.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(T.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),T.prototype._write=function(e,t,r){r(new f("_write()"))},T.prototype._writev=null,T.prototype.end=function(e,t,r){var i,n,a,o=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),o.corked&&(o.corked=1,this.uncork()),o.ending||(i=this,n=o,a=r,n.ending=!0,L(i,n),a&&(n.finished?S.nextTick(a):i.once("finish",a)),n.ended=!0,i.writable=!1),this},Object.defineProperty(T.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(T.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),T.prototype.destroy=c.destroy,T.prototype._undestroy=c.undestroy,T.prototype._destroy=function(e,t){t(e)}}}),l4=p({"node_modules/readable-stream/lib/_stream_duplex.js"(e,t){var r,i,n,a=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};t.exports=l;var o=ct(),s=l5();for(s3()(l,o),r=a(s.prototype),n=0;n>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if((192&t[0])!=128)return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if((192&t[1])!=128)return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&(192&t[2])!=128)return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):void(e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length)}function o(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function s(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function u(e){return e.toString(this.encoding)}function h(e){return e&&e.length?this.write(e):""}e.StringDecoder=i,i.prototype.write=function(e){var t,r;if(0===e.length)return"";if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r=0?(a>0&&(e.lastNeed=a-1),a):--i=0?(a>0&&(e.lastNeed=a-2),a):--i=0?(a>0&&(2===a?a=0:e.lastNeed=a-3),a):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var i=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,i),e.toString("utf8",t,i)},i.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}}}),l7=p({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(e,t){var r=l1().codes.ERR_STREAM_PREMATURE_CLOSE;function i(){}t.exports=function e(t,n,a){if("function"==typeof n)return e(t,null,n);n||(n={}),o=a||i,s=!1,a=function(){if(!s){s=!0;for(var e=arguments.length,t=Array(e),r=0;rtypeof window||"u">typeof window?window:"u">typeof self?self:{}).Uint8Array||function(){},l=lJ();i=l&&l.debuglog?l.debuglog("stream"):function(){};var c,u,h,d=lQ(),f=l0(),p=l2().getHighWaterMark,m=l1().codes,g=m.ERR_INVALID_ARG_TYPE,y=m.ERR_STREAM_PUSH_AFTER_EOF,v=m.ERR_METHOD_NOT_IMPLEMENTED,x=m.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;s3()(T,a);var b=f.errorOrDestroy,_=["error","close","destroy","pause","resume"];function w(e,t,i){r=r||l4(),e=e||{},"boolean"!=typeof i&&(i=t instanceof r),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=p(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(c||(c=l8().StringDecoder),this.decoder=new c(e.encoding),this.encoding=e.encoding)}function T(e){if(r=r||l4(),!(this instanceof T))return new T(e);var t=this instanceof r;this._readableState=new w(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function M(e,t,r,n,a){i("readableAddChunk",t);var l,c,u=e._readableState;if(null===t)u.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?E(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,C(e)))}}(e,u);else if(a||(c=function(e,t){var r;return o.isBuffer(t)||t instanceof s||"string"==typeof t||void 0===t||e.objectMode||(r=new g("chunk",["string","Buffer","Uint8Array"],t)),r}(u,t)),c)b(e,c);else if(u.objectMode||t&&t.length>0)if("string"==typeof t||u.objectMode||Object.getPrototypeOf(t)===o.prototype||(l=t,t=o.from(l)),n)u.endEmitted?b(e,new x):k(e,u,t,!0);else if(u.ended)b(e,new y);else{if(u.destroyed)return!1;u.reading=!1,u.decoder&&!r?(t=u.decoder.write(t),u.objectMode||0!==t.length?k(e,u,t,!1):L(e,u)):k(e,u,t,!1)}else n||(u.reading=!1,L(e,u));return!u.ended&&(u.lengtht.highWaterMark&&((r=e)>=0x40000000?r=0x40000000:(r--,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r++),t.highWaterMark=r),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function E(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,S.nextTick(C,e))}function C(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,O(e)}function L(e,t){t.readingMore||(t.readingMore=!0,S.nextTick(P,e,t))}function P(e,t){for(;!t.reading&&!t.ended&&(t.length0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function z(e){i("readable nexttick read 0"),e.read(0)}function D(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),O(e),t.flowing&&!t.reading&&e.read(0)}function O(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function R(e,t){var r;return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r)}function F(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,S.nextTick(j,t,e))}function j(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function B(e,t){for(var r=0,i=e.length;r=r.highWaterMark:r.length>0)||r.ended))return i("read: emitReadable",r.length,r.ended),0===r.length&&r.ended?F(this):E(this),null;if(0===(e=A(e,r))&&r.ended)return 0===r.length&&F(this),null;var a=r.needReadable;return i("need readable",a),(0===r.length||r.length-e0?R(e,r):null)?(r.needReadable=r.length<=r.highWaterMark,e=0):(r.length-=e,r.awaitDrain=0),0===r.length&&(r.ended||(r.needReadable=!0),n!==e&&r.ended&&F(this)),null!==t&&this.emit("data",t),t},T.prototype._read=function(e){b(this,new v("_read()"))},T.prototype.pipe=function(e,t){var r,a=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,i("pipe count=%d opts=%j",o.pipesCount,t);var s=t&&!1===t.end||e===S.stdout||e===S.stderr?m:l;function l(){i("onend"),e.end()}o.endEmitted?S.nextTick(s):a.once("end",s),e.on("unpipe",function t(r,n){i("onunpipe"),r===a&&n&&!1===n.hasUnpiped&&(n.hasUnpiped=!0,i("cleanup"),e.removeListener("close",f),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",d),e.removeListener("unpipe",t),a.removeListener("end",l),a.removeListener("end",m),a.removeListener("data",h),u=!0,o.awaitDrain&&(!e._writableState||e._writableState.needDrain)&&c())});var c=(r=a,function(){var e=r._readableState;i("pipeOnDrain",e.awaitDrain),e.awaitDrain&&e.awaitDrain--,0===e.awaitDrain&&n(r,"data")&&(e.flowing=!0,O(r))});e.on("drain",c);var u=!1;function h(t){i("ondata");var r=e.write(t);i("dest.write",r),!1===r&&((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==B(o.pipes,e))&&!u&&(i("false write response, pause",o.awaitDrain),o.awaitDrain++),a.pause())}function d(t){i("onerror",t),m(),e.removeListener("error",d),0===n(e,"error")&&b(e,t)}function f(){e.removeListener("finish",p),m()}function p(){i("onfinish"),e.removeListener("close",f),m()}function m(){i("unpipe"),a.unpipe(e)}return a.on("data",h),!function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",d),e.once("close",f),e.once("finish",p),e.emit("pipe",a),o.flowing||(i("pipe resume"),a.resume()),e},T.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var i=t.pipes,n=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var a=0;a0,!1!==n.flowing&&this.resume()):"readable"!==e||n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?E(this):n.reading||S.nextTick(z,this)),r},T.prototype.addListener=T.prototype.on,T.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&S.nextTick(I,this),r},T.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return("readable"===e||void 0===e)&&S.nextTick(I,this),t},T.prototype.resume=function(){var e,t,r=this._readableState;return r.flowing||(i("resume"),r.flowing=!r.readableListening,e=this,(t=r).resumeScheduled||(t.resumeScheduled=!0,S.nextTick(D,e,t))),r.paused=!1,this},T.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},T.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var a in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(a){i("wrapped data"),r.decoder&&(a=r.decoder.write(a)),r.objectMode&&null==a||!r.objectMode&&(!a||!a.length)||t.push(a)||(n=!0,e.pause())}),e)void 0===this[a]&&"function"==typeof e[a]&&(this[a]=function(t){return function(){return e[t].apply(e,arguments)}}(a));for(var o=0;o<_.length;o++)e.on(_[o],this.emit.bind(this,_[o]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(T.prototype[Symbol.asyncIterator]=function(){return void 0===u&&(u=l9()),u(this)}),Object.defineProperty(T.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(T.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(T.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),T._fromList=R,Object.defineProperty(T.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(T.from=function(e,t){return void 0===h&&(h=ce()),h(T,e,t)})}}),cr=p({"node_modules/readable-stream/lib/_stream_transform.js"(e,t){t.exports=c;var r=l1().codes,i=r.ERR_METHOD_NOT_IMPLEMENTED,n=r.ERR_MULTIPLE_CALLBACK,a=r.ERR_TRANSFORM_ALREADY_TRANSFORMING,o=r.ERR_TRANSFORM_WITH_LENGTH_0,s=l4();function l(e,t){var r=this._transformState;r.transforming=!1;var i=r.writecb;if(null===i)return this.emit("error",new n);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),i(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length0,l=o=function(e){h||(h=e),e&&d.forEach(s),m||(d.forEach(s),c(h))},u=!1,o=function(){u||(u=!0,l.apply(void 0,arguments))},f=!1,e.on("close",function(){f=!0}),void 0===r&&(r=l7()),r(e,{readable:m,writable:n},function(e){if(e)return o(e);f=!0,o()}),p=!1,function(t){if(!f&&!p){if(p=!0,e.setHeader&&"function"==typeof e.abort)return e.abort();if("function"==typeof e.destroy)return e.destroy();o(t||new a("pipe"))}}});return t.reduce(l)}}}),ca=p({"node_modules/stream-browserify/index.js"(e,t){t.exports=i;var r=tw().EventEmitter;function i(){r.call(this)}s3()(i,r),i.Readable=ct(),i.Writable=l5(),i.Duplex=l4(),i.Transform=cr(),i.PassThrough=ci(),i.finished=l7(),i.pipeline=cn(),i.Stream=i,i.prototype.pipe=function(e,t){var i=this;function n(t){e.writable&&!1===e.write(t)&&i.pause&&i.pause()}function a(){i.readable&&i.resume&&i.resume()}i.on("data",n),e.on("drain",a),e._isStdio||t&&!1===t.end||(i.on("end",s),i.on("close",l));var o=!1;function s(){o||(o=!0,e.end())}function l(){o||(o=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(u(),0===r.listenerCount(this,"error"))throw e}function u(){i.removeListener("data",n),e.removeListener("drain",a),i.removeListener("end",s),i.removeListener("close",l),i.removeListener("error",c),e.removeListener("error",c),i.removeListener("end",u),i.removeListener("close",u),e.removeListener("close",u)}return i.on("error",c),e.on("error",c),i.on("end",u),i.on("close",u),e.on("close",u),e.emit("pipe",i),e}}}),co=p({"node_modules/util/util.js"(e){var t=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},i=0;i=o)return e;switch(e){case"%s":return String(n[i++]);case"%d":return Number(n[i++]);case"%j":try{return JSON.stringify(n[i++])}catch{return"[Circular]"}default:return e}}),l=n[i];itypeof S&&!0===S.noDeprecation)return t;if(typeof S>"u")return function(){return e.deprecate(t,r).apply(this,arguments)};var i=!1;return function(){if(!i){if(S.throwDeprecation)throw Error(r);S.traceDeprecation?console.trace(r):console.error(r),i=!0}return t.apply(this,arguments)}};var i={},n=/^$/;function a(t,r){var i={seen:[],stylize:s};return arguments.length>=3&&(i.depth=arguments[2]),arguments.length>=4&&(i.colors=arguments[3]),d(r)?i.showHidden=r:r&&e._extend(i,r),g(i.showHidden)&&(i.showHidden=!1),g(i.depth)&&(i.depth=2),g(i.colors)&&(i.colors=!1),g(i.customInspect)&&(i.customInspect=!0),i.colors&&(i.stylize=o),l(i,t,i.depth)}function o(e,t){var r=a.styles[t];return r?"\x1b["+a.colors[r][0]+"m"+e+"\x1b["+a.colors[r][1]+"m":e}function s(e,t){return e}function l(t,r,i){if(t.customInspect&&r&&_(r.inspect)&&r.inspect!==e.inspect&&!(r.constructor&&r.constructor.prototype===r)){var n,a,o,s,v,w,T=r.inspect(i,t);return m(T)||(T=l(t,T,i)),T}var M=function(e,t){if(g(t))return e.stylize("undefined","undefined");if(m(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}return p(t)?e.stylize(""+t,"number"):d(t)?e.stylize(""+t,"boolean"):f(t)?e.stylize("null","null"):void 0}(t,r);if(M)return M;var A=Object.keys(r),S=(v={},A.forEach(function(e,t){v[e]=!0}),v);if(t.showHidden&&(A=Object.getOwnPropertyNames(r)),b(r)&&(A.indexOf("message")>=0||A.indexOf("description")>=0))return c(r);if(0===A.length){if(_(r)){var E=r.name?": "+r.name:"";return t.stylize("[Function"+E+"]","special")}if(y(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(x(r))return t.stylize(Date.prototype.toString.call(r),"date");if(b(r))return c(r)}var C="",L=!1,P=["{","}"];return(h(r)&&(L=!0,P=["[","]"]),_(r)&&(C=" [Function"+(r.name?": "+r.name:"")+"]"),y(r)&&(C=" "+RegExp.prototype.toString.call(r)),x(r)&&(C=" "+Date.prototype.toUTCString.call(r)),b(r)&&(C=" "+c(r)),0!==A.length||L&&0!=r.length)?i<0?y(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),w=L?function(e,t,r,i,n){for(var a=[],o=0,s=t.length;o=0&&s++,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?o[0]+(""===a?"":a+` + `)+" "+n.join(`, + `)+" "+o[1]:o[0]+a+" "+n.join(", ")+" "+o[1]):P[0]+C+P[1]}function c(e){return"["+Error.prototype.toString.call(e)+"]"}function u(e,t,r,i,n,a){var o,s,c;if((c=Object.getOwnPropertyDescriptor(t,n)||{value:t[n]}).get?s=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(s=e.stylize("[Setter]","special")),k(i,n)||(o="["+n+"]"),s||(0>e.seen.indexOf(c.value)?(s=f(r)?l(e,c.value,null):l(e,c.value,r-1)).indexOf(` +`)>-1&&(s=a?s.split(` +`).map(function(e){return" "+e}).join(` +`).slice(2):` +`+s.split(` +`).map(function(e){return" "+e}).join(` +`)):s=e.stylize("[Circular]","special")),g(o)){if(a&&n.match(/^\d+$/))return s;(o=JSON.stringify(""+n)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function h(e){return Array.isArray(e)}function d(e){return"boolean"==typeof e}function f(e){return null===e}function p(e){return"number"==typeof e}function m(e){return"string"==typeof e}function g(e){return void 0===e}function y(e){return v(e)&&"[object RegExp]"===w(e)}function v(e){return"object"==typeof e&&null!==e}function x(e){return v(e)&&"[object Date]"===w(e)}function b(e){return v(e)&&("[object Error]"===w(e)||e instanceof Error)}function _(e){return"function"==typeof e}function w(e){return Object.prototype.toString.call(e)}function T(e){return e<10?"0"+e.toString(10):e.toString(10)}n=RegExp("^"+"false".replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase()+"$","i"),e.debuglog=function(t){if(!i[t=t.toUpperCase()])if(n.test(t)){var r=S.pid;i[t]=function(){var i=e.format.apply(e,arguments);console.error("%s %d: %s",t,r,i)}}else i[t]=function(){};return i[t]},e.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.types=lX(),e.isArray=h,e.isBoolean=d,e.isNull=f,e.isNullOrUndefined=function(e){return null==e},e.isNumber=p,e.isString=m,e.isSymbol=function(e){return"symbol"==typeof e},e.isUndefined=g,e.isRegExp=y,e.types.isRegExp=y,e.isObject=v,e.isDate=x,e.types.isDate=x,e.isError=b,e.types.isNativeError=b,e.isFunction=_,e.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||typeof e>"u"},e.isBuffer=lK();var M=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.log=function(){var t,r;console.log("%s - %s",(r=[T((t=new Date).getHours()),T(t.getMinutes()),T(t.getSeconds())].join(":"),[t.getDate(),M[t.getMonth()],r].join(" ")),e.format.apply(e,arguments))},e.inherits=s3(),e._extend=function(e,t){if(!t||!v(t))return e;for(var r=Object.keys(t),i=r.length;i--;)e[r[i]]=t[r[i]];return e};var A="u">typeof Symbol?Symbol("util.promisify.custom"):void 0;function E(e,t){if(!e){var r=Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}e.promisify=function(e){if("function"!=typeof e)throw TypeError('The "original" argument must be of type Function');if(A&&e[A]){var r=e[A];if("function"!=typeof r)throw TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,A,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var t,r,i=new Promise(function(e,i){t=e,r=i}),n=[],a=0;a"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var e,t=n(l);return e=o?Reflect.construct(t,arguments,n(this).constructor):t.apply(this,arguments),function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw TypeError("Derived constructors may only return object or undefined");var i=e;if(void 0===i)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i}(this,e)});function l(r,i,n){var a;return function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,l),(a=s.call(this,"string"==typeof t?t:t(r,i,n))).code=e,a}return Object.defineProperty(l,"prototype",{writable:!1}),l}(a);s[e]=o}function c(e,t){if(!Array.isArray(e))return"of ".concat(t," ").concat(String(e));var r=e.length;return e=e.map(function(e){return String(e)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",function(e,t,i){if(void 0===a&&(a=ck()),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(n="not ",t.substr(0,n.length)===n)?(u="must not be",t=t.replace(/^not /,"")):u="must be",o=" argument",(void 0===s||s>e.length)&&(s=e.length),e.substring(s-o.length,s)===o)h="The ".concat(e," ").concat(u," ").concat(c(t,"type"));else{var n,o,s,l,u,h,d=("number"!=typeof l&&(l=0),l+1>e.length||-1===e.indexOf(".",l))?"argument":"property";h='The "'.concat(e,'" ').concat(d," ").concat(u," ").concat(c(t,"type"))}return h+". Received type ".concat(r(i))},TypeError),l("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===o&&(o=co());var i=o.inspect(t);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(i)},TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",function(e,t,i){var n;return n=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(r(i)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError),l("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=Array(e),r=0;r0,"At least one arg needs to be specified");var i="The ",n=t.length;switch(t=t.map(function(e){return'"'.concat(e,'"')}),n){case 1:i+="".concat(t[0]," argument");break;case 2:i+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:i+=t.slice(0,n-1).join(", "),i+=", and ".concat(t[n-1]," arguments")}return"".concat(i," must be specified")},TypeError),t.exports.codes=s}}),cl=p({"node_modules/assert/build/internal/assert/assertion_error.js"(e,t){function r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,i)}return r}function i(e){for(var t=1;ttypeof t){if(t.has(e))return t.get(e);t.set(e,i)}function i(){return l(e,arguments,h(this).constructor)}return i.prototype=Object.create(e.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),u(i,e)})(e)}function l(e,t,r){return(l=c()?Reflect.construct.bind():function(e,t,r){var i=[null];i.push.apply(i,t);var n=new(Function.bind.apply(e,i));return r&&u(n,r.prototype),n}).apply(null,arguments)}function c(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function u(e,t){return(u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function h(e){return(h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function d(e){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var f=co().inspect,p=cs().codes.ERR_INVALID_ARG_TYPE;function m(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var g="",y="",v="",x="",b={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function _(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(t){r[t]=e[t]}),Object.defineProperty(r,"message",{value:e.message}),r}function w(e){return f(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}t.exports=function(e,t){if("function"!=typeof e&&null!==e)throw TypeError("Super expression must either be null or a function");T.prototype=Object.create(e&&e.prototype,{constructor:{value:T,writable:!0,configurable:!0}}),Object.defineProperty(T,"prototype",{writable:!1}),e&&u(T,e);var r,s,l=(r=c(),function(){var e,t=h(T);return e=r?Reflect.construct(t,arguments,h(this).constructor):t.apply(this,arguments),a(this,e)});function T(e){if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,T),"object"!==d(e)||null===e)throw new p("options","Object",e);var t,r=e.message,i=e.operator,n=e.stackStartFn,s=e.actual,c=e.expected,u=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=r)t=l.call(this,String(r));else if(S.stderr&&S.stderr.isTTY&&(S.stderr&&S.stderr.getColorDepth&&1!==S.stderr.getColorDepth()?(g="\x1b[34m",y="\x1b[32m",x="\x1b[39m",v="\x1b[31m"):(g="",y="",x="",v="")),"object"===d(s)&&null!==s&&"object"===d(c)&&null!==c&&"stack"in s&&s instanceof Error&&"stack"in c&&c instanceof Error&&(s=_(s),c=_(c)),"deepStrictEqual"===i||"strictEqual"===i)t=l.call(this,function(e,t,r){var i="",n="",a=0,o="",s=!1,l=w(e),c=l.split(` +`),u=w(t).split(` +`),h=0,f="";if("strictEqual"===r&&"object"===d(e)&&"object"===d(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===c.length&&1===u.length&&c[0]!==u[0]){var p=c[0].length+u[0].length;if(p<=10){if(("object"!==d(e)||null===e)&&("object"!==d(t)||null===t)&&(0!==e||0!==t))return"".concat(b[r],` + +`)+"".concat(c[0]," !== ").concat(u[0],` +`)}else if("strictEqualObject"!==r&&p<(S.stderr&&S.stderr.isTTY?S.stderr.columns:80)){for(;c[0][h]===u[0][h];)h++;h>2&&(f=` + `.concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",h),"^"),h=0)}}for(var _=c[c.length-1],T=u[u.length-1];_===T&&(h++<2?o=` + `.concat(_).concat(o):i=_,c.pop(),u.pop(),0!==c.length&&0!==u.length);)_=c[c.length-1],T=u[u.length-1];var M=Math.max(c.length,u.length);if(0===M){var k=l.split(` +`);if(k.length>30)for(k[26]="".concat(g,"...").concat(x);k.length>27;)k.pop();return"".concat(b.notIdentical,` + +`).concat(k.join(` +`),` +`)}h>3&&(o=` +`.concat(g,"...").concat(x).concat(o),s=!0),""!==i&&(o=` + `.concat(i).concat(o),i="");var A=0,E=b[r]+` +`.concat(y,"+ actual").concat(x," ").concat(v,"- expected").concat(x),C=" ".concat(g,"...").concat(x," Lines skipped");for(h=0;h1&&h>2&&(L>4?(n+=` +`.concat(g,"...").concat(x),s=!0):L>3&&(n+=` + `.concat(u[h-2]),A++),n+=` + `.concat(u[h-1]),A++),a=h,i+=` +`.concat(v,"-").concat(x," ").concat(u[h]),A++;else if(u.length1&&h>2&&(L>4?(n+=` +`.concat(g,"...").concat(x),s=!0):L>3&&(n+=` + `.concat(c[h-2]),A++),n+=` + `.concat(c[h-1]),A++),a=h,n+=` +`.concat(y,"+").concat(x," ").concat(c[h]),A++;else{var P=u[h],I=c[h],z=I!==P&&(!m(I,",")||I.slice(0,-1)!==P);z&&m(P,",")&&P.slice(0,-1)===I&&(z=!1,I+=","),z?(L>1&&h>2&&(L>4?(n+=` +`.concat(g,"...").concat(x),s=!0):L>3&&(n+=` + `.concat(c[h-2]),A++),n+=` + `.concat(c[h-1]),A++),a=h,n+=` +`.concat(y,"+").concat(x," ").concat(I),i+=` +`.concat(v,"-").concat(x," ").concat(P),A+=2):(n+=i,i="",(1===L||0===h)&&(n+=` + `.concat(I),A++))}if(A>20&&h30)for(f[26]="".concat(g,"...").concat(x);f.length>27;)f.pop();t=1===f.length?l.call(this,"".concat(h," ").concat(f[0])):l.call(this,"".concat(h,` + +`).concat(f.join(` +`),` +`))}else{var M=w(s),k="",A=b[i];"notDeepEqual"===i||"notEqual"===i?(M="".concat(b[i],` + +`).concat(M)).length>1024&&(M="".concat(M.slice(0,1021),"...")):(k="".concat(w(c)),M.length>512&&(M="".concat(M.slice(0,509),"...")),k.length>512&&(k="".concat(k.slice(0,509),"...")),"deepEqual"===i||"equal"===i?M="".concat(A,` + +`).concat(M,` + +should equal + +`):k=" ".concat(i," ").concat(k)),t=l.call(this,"".concat(M).concat(k))}return Error.stackTraceLimit=u,t.generatedMessage=!r,Object.defineProperty(o(t),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),t.code="ERR_ASSERTION",t.actual=s,t.expected=c,t.operator=i,Error.captureStackTrace&&Error.captureStackTrace(o(t),n),t.stack,t.name="AssertionError",a(t)}return s=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(e,t){return f(this,i(i({},t),{},{customInspect:!1,depth:0}))}}],function(e,t){for(var r=0;r=0&&"[object Function]"===r.call(e.callee)),i}}}),cu=p({"node_modules/object-keys/implementation.js"(e,t){var r,i,n,a,o,s,l,c,u,h,d,f;Object.keys||(i=Object.prototype.hasOwnProperty,n=Object.prototype.toString,a=cc(),s=!(o=Object.prototype.propertyIsEnumerable).call({toString:null},"toString"),l=o.call(function(){},"prototype"),c=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=function(e){var t=e.constructor;return t&&t.prototype===e},h={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if(typeof window>"u")return!1;for(var e in window)try{if(!h["$"+e]&&i.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{u(window[e])}catch{return!0}}catch{return!0}return!1}(),f=function(e){if(typeof window>"u"||!d)return u(e);try{return u(e)}catch{return!1}},r=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===n.call(e),o=a(e),u=t&&"[object String]"===n.call(e),h=[];if(!t&&!r&&!o)throw TypeError("Object.keys called on a non-object");var d=l&&r;if(u&&e.length>0&&!i.call(e,0))for(var p=0;p0)for(var m=0;m-1?i(a):a}}}),cy=p({"node_modules/define-properties/index.js"(e,t){var r=ch(),i="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),n=Object.prototype.toString,a=Array.prototype.concat,o=lq(),s=lH()(),l=function(e,t,r,i){if(t in e){if(!0===i){if(e[t]===r)return}else if("function"!=typeof i||"[object Function]"!==n.call(i)||!i())return}s?o(e,t,r,!0):o(e,t,r)},c=function(e,t){var n=arguments.length>2?arguments[2]:{},o=r(t);i&&(o=a.call(o,Object.getOwnPropertySymbols(t)));for(var s=0;stypeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var i,n,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=a.call(r)).done)&&(s.push(i.value),s.length!==t);l=!0);}catch(e){c=!0,n=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw n}}return s}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(e,t)}}(e,t)||function(){throw TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r10)return!0;for(var t=0;t57)return!0}return 10===e.length&&e>=0x100000000}function I(e){return Object.keys(e).filter(P).concat(c(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function z(e,t){if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);n1?r-1:0),n=1;n1?r-1:0),n=1;n1?r-1:0),n=1;n1?r-1:0),n=1;n0){var o=e;if(!((o=String(o)).length>100)){var s=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(o);if(s){var l=parseFloat(s[1]);switch((s[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*l;case"days":case"day":case"d":return 864e5*l;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*l;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*l;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*l;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return l;default:break}}}return}if("number"===a&&!1===isNaN(e)){return t.long?r(i=e,864e5,"day")||r(i,36e5,"hour")||r(i,6e4,"minute")||r(i,1e3,"second")||i+" ms":(n=e)>=864e5?Math.round(n/864e5)+"d":n>=36e5?Math.round(n/36e5)+"h":n>=6e4?Math.round(n/6e4)+"m":n>=1e3?Math.round(n/1e3)+"s":n+"ms"}throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}}}),cS=p({"node_modules/debug/src/debug.js"(e,t){var r;function i(t){function i(){if(i.enabled){var t=+new Date;i.diff=t-(r||t),i.prev=r,i.curr=t,r=t;for(var n=Array(arguments.length),a=0;atypeof S&&"env"in S&&(t=S.env.DEBUG),t}(e=t.exports=cS()).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},e.formatArgs=function(t){var r=this.useColors;if(t[0]=(r?"%c":"")+this.namespace+(r?" %c":" ")+t[0]+(r?"%c ":" ")+"+"+e.humanize(this.diff),r){var i="color: "+this.color;t.splice(1,0,i,"color: inherit");var n=0,a=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(n++,"%c"===e&&(a=n))}),t.splice(a,0,i)}},e.save=function(t){try{null==t?e.storage.removeItem("debug"):e.storage.debug=t}catch{}},e.load=r,e.useColors=function(){return"u">typeof window&&!!window.process&&"renderer"===window.process.type||"u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},e.storage="u">typeof chrome&&"u">typeof chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),e.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],e.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},e.enable(r())}}),cC=p({"node_modules/stream-parser/index.js"(e,t){var r=ck(),i=cE()("stream-parser");function n(e){i("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=-1,e._parserCallback=null,"function"==typeof e.push&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function a(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||n(this),i("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=0}function o(e,t){r(!this._parserCallback,'there is already a "callback" set!'),r(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||n(this),i("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=1}function s(e,t){r(!this._parserCallback,'There is already a "callback" set!'),r(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||n(this),i("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=2}function l(e,t,r){this._parserInit||n(this),i("write(%o bytes)",e.length),"function"==typeof t&&(r=t),h(this,e,null,r)}function c(e,t,r){this._parserInit||n(this),i("transform(%o bytes)",e.length),"function"!=typeof t&&(t=this._parserOutput),h(this,e,t,r)}function u(e,t,r,n){if(e._parserBytesLeft-=t.length,i("%o bytes left for stream piece",e._parserBytesLeft),0===e._parserState?(e._parserBuffers.push(t),e._parserBuffered+=t.length):2===e._parserState&&r(t),0!==e._parserBytesLeft)return n;var a=e._parserCallback;if(a&&0===e._parserState&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),0!==e._parserState&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=-1,e._parserBuffers.splice(0),a){var o=[];t&&o.push(t),r&&o.push(r);var s=a.length>o.length;s&&o.push(d(n));var l=a.apply(e,o);if(!s||n===l)return n}}t.exports=function(e){var t=e&&"function"==typeof e._transform,r=e&&"function"==typeof e._write;if(!t&&!r)throw Error("must pass a Writable or Transform stream in");i("extending Parser into stream"),e._bytes=a,e._skipBytes=o,t&&(e._passthrough=s),t?e._transform=c:e._write=l};var h=d(function e(t,r,i,n){return t._parserBytesLeft<=0?n(Error("got data but not currently parsing anything")):r.length<=t._parserBytesLeft?function(){return u(t,r,i,n)}:function(){var a=r.slice(0,t._parserBytesLeft);return u(t,a,i,function(o){return o?n(o):r.length>a.length?function(){return e(t,r.slice(a.length),i,n)}:void 0})}});function d(e){return function(){for(var t=e.apply(this,arguments);"function"==typeof t;)t=t();return t}}}}),cL=p({"node_modules/probe-image-size/lib/common.js"(e){var t=ca().Transform,r=cC();function i(){t.call(this,{readableObjectMode:!0})}function n(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}i.prototype=Object.create(t.prototype),i.prototype.constructor=i,r(i.prototype),e.ParserStream=i,e.sliceEq=function(e,t,r){for(var i=t,n=0;n>16},e.readInt16BE=function(t,r){return e.readUInt16BE(t,r)<<16>>16},e.readUInt32LE=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+0x1000000*e[t+3]},e.readUInt32BE=function(e,t){return 0x1000000*e[t]+(e[t+1]<<16|e[t+2]<<8|e[t+3])},e.readInt32LE=function(t,r){return 0|e.readUInt32LE(t,r)},e.readInt32BE=function(t,r){return 0|e.readUInt32BE(t,r)},n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,e.ProbeError=n}}),cP=p({"node_modules/probe-image-size/lib/miaf_utils.js"(e,t){var r=cL().readUInt16BE,i=cL().readUInt32BE;function n(e,t){if(e.length<4+t)return null;var r=i(e,t);return e.length>4&15,n=15&e[4],o=e[5]>>4&15,s=r(e,6),l=8,c=0;ct.width||e.width===t.width&&e.height>t.height?e:t}),l=o.reduce(function(e,t){return e.height>t.height||e.height===t.height&&e.width>t.width?e:t}),s.width>l.height||s.width===l.height&&s.height>l.width?s:l),u=1;t.transforms.forEach(function(e){var t={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},r={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===e.type&&(0===e.value?u=r[u]:(u=t[u=r[u]],u=t[u])),"irot"===e.type)for(var i=0;i0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}},i.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?256*t[e]+t[e+1]:t[e]+256*t[e+1]},i.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw r("unexpected EOF","EBADDATA");return this.big_endian?0x1000000*t[e]+65536*t[e+1]+256*t[e+2]+t[e+3]:t[e]+256*t[e+1]+65536*t[e+2]+0x1000000*t[e+3]},i.prototype.is_subifd_link=function(e,t){return 0===e&&34665===t||0===e&&34853===t||34665===e&&40965===t},i.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},i.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return this.input[t];case 6:return(r=this.input[t])|(128&r)*0x1fffffe;case 3:return this.read_uint16(t);case 8:return(r=this.read_uint16(t))|(32768&r)*131070;case 4:return this.read_uint32(t);case 9:return 0|(r=this.read_uint32(t));default:return null}},i.prototype.scan_ifd=function(e,t,i){var n=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw r("unexpected EOF","EBADDATA");for(var f=[],p=h,m=0;m0&&(this.ifds_to_read.push({id:o,offset:f[0]}),d=!0),!1===i({is_big_endian:this.big_endian,ifd:e,tag:o,format:s,count:l,entry_offset:t+this.start,data_length:u,data_offset:h+this.start,value:f,is_subifd_link:d})){this.aborted=!0;return}t+=12}0===e&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})},t.exports.ExifParser=i,t.exports.get_orientation=function(e){var t=0;try{return new i(e,0,e.length).each(function(e){if(0===e.ifd&&274===e.tag&&Array.isArray(e.value))return t=e.value[0],!1}),t}catch{return -1}}}}),cz=p({"node_modules/probe-image-size/lib/parse_sync/avif.js"(e,t){var r=cL().str2arr,i=cL().sliceEq,n=cL().readUInt32BE,a=cP(),o=cI(),s=r("ftyp");t.exports=function(e){if(i(e,4,s)){var t=a.unbox(e,0);if(t){var r=a.getMimeType(t.data);if(r){for(var l,c=t.end;;){var u=a.unbox(e,c);if(!u)break;if(c=u.end,"mdat"===u.boxtype)return;if("meta"===u.boxtype){l=u.data;break}}if(l){var h=a.readSizeFromMeta(l);if(h){var d={width:h.width,height:h.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(h.variants.length>1&&(d.variants=h.variants),h.orientation&&(d.orientation=h.orientation),h.exif_location&&h.exif_location.offset+h.exif_location.length<=e.length){var f=n(e,h.exif_location.offset),p=e.slice(h.exif_location.offset+f+4,h.exif_location.offset+h.exif_location.length),m=o.get_orientation(p);m>0&&(d.orientation=m)}return d}}}}}}}}),cD=p({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(e,t){var r=cL().str2arr,i=cL().sliceEq,n=cL().readInt16LE,a=cL().readInt32LE,o=cL().readUInt32LE,s=r("BM");t.exports=function(e){if(!(e.length<26)&&i(e,0,s)){var t,r,l=o(e,14);if(12===l)r=n(e,18),t=n(e,20);else{if(!(l>12))return;r=a(e,18),t=a(e,22)}return{width:r,height:Math.abs(t),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),cO=p({"node_modules/probe-image-size/lib/parse_sync/gif.js"(e,t){var r=cL().str2arr,i=cL().sliceEq,n=cL().readUInt16LE,a=r("GIF87a"),o=r("GIF89a");t.exports=function(e){if(!(e.length<10)&&!(!i(e,0,a)&&!i(e,0,o)))return{width:n(e,6),height:n(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),cR=p({"node_modules/probe-image-size/lib/parse_sync/ico.js"(e,t){var r=cL().readUInt16LE;t.exports=function(e){var t=r(e,0),i=r(e,2),n=r(e,4);if(!(0!==t||1!==i||!n)&&!(e.length<6+16*n)){for(var a=[],o={width:0,height:0},s=0;so.width||c>o.height)&&(o=u)}return{width:o.width,height:o.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),cF=p({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(e,t){var r=cL().readUInt16BE,i=cL().str2arr,n=cL().sliceEq,a=cI(),o=i("Exif\0\0");t.exports=function(e){if(!(e.length<2)&&255===e[0]&&216===e[1]&&255===e[2])for(var t=2;;){for(;;){if(e.length-t<2)return;if(255===e[t++])break}for(var i,s,l=e[t++];255===l;)l=e[t++];if(l>=208&&l<=217||1===l)s=0;else{if(!(l>=192)||!(l<=254)||e.length-t<2)return;s=r(e,t)-2,t+=2}if(217===l||218===l)return;if(225===l&&s>=10&&n(e,t,o)&&(i=a.get_orientation(e.slice(t+6,t+s))),s>=5&&l>=192&&l<=207&&196!==l&&200!==l&&204!==l){if(e.length-t0&&(c.orientation=i),c}t+=s}}}}),cj=p({"node_modules/probe-image-size/lib/parse_sync/png.js"(e,t){var r=cL().str2arr,i=cL().sliceEq,n=cL().readUInt32BE,a=r(`\x89PNG\r + +`),o=r("IHDR");t.exports=function(e){if(!(e.length<24)&&i(e,0,a)&&i(e,12,o))return{width:n(e,16),height:n(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),cB=p({"node_modules/probe-image-size/lib/parse_sync/psd.js"(e,t){var r=cL().str2arr,i=cL().sliceEq,n=cL().readUInt32BE,a=r("8BPS\0\x01");t.exports=function(e){if(!(e.length<22)&&i(e,0,a))return{width:n(e,18),height:n(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),cN=p({"node_modules/probe-image-size/lib/parse_sync/svg.js"(e,t){function r(e){return"number"==typeof e&&isFinite(e)&&e>0}var i=/<[-_.:a-zA-Z0-9][^>]*>/,n=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,a=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,o=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,s=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,l=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function c(e){return l.test(e)?e.match(l)[0]:"px"}t.exports=function(e){if(function(e){var t,r=0,i=e.length;for(239===e[0]&&187===e[1]&&191===e[2]&&(r=3);re.length)){for(;t+8=10?r=r||function(e,t){if(157===e[t+3]&&1===e[t+4]&&42===e[t+5])return{width:16383&n(e,t+6),height:16383&n(e,t+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}(e,t+8):"VP8L"===d&&f>=5?r=r||function(e,t){if(47===e[t]){var r=a(e,t+1);return{width:(16383&r)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}(e,t+8):"VP8X"===d&&f>=10?r=r||{width:(e[(h=t+8)+6]<<16|e[h+5]<<8|e[h+4])+1,height:(e[h+9]<<16|e[h+8]<<8|e[h+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}:"EXIF"===d&&(c=o.get_orientation(e.slice(t+8,t+8+f)),t=1/0),t+=8+f}if(r)return c>0&&(r.orientation=c),r}}}}}),cq=p({"node_modules/probe-image-size/lib/parsers_sync.js"(e,t){t.exports={avif:cz(),bmp:cD(),gif:cO(),ico:cR(),jpeg:cF(),png:cj(),psd:cB(),svg:cN(),tiff:cU(),webp:cV()}}}),cH=p({"node_modules/probe-image-size/sync.js"(e,t){var r=cq();t.exports=function(e){for(var t=Object.keys(r),i=0;i0&&n.height>0?n:null}return null},t.exports.parsers=r}}),cG=p({"src/traces/image/helpers.js"(e){var t=cH(),r=iP().IMAGE_URL_PREFIX,i=s8().Buffer;e.getImageSize=function(e){return t(new i(e.replace(r,""),"base64"))}}}),cW=p({"src/traces/image/calc.js"(e,t){var r=tv(),i=sH(),n=C(),a=rn(),o=tv().maxRowLength,s=cG().getImageSize;t.exports=function(e,t){if(t._hasZ)c=t.z.length,u=o(t.z);else if(t._hasSource){var l=s(t.source);c=l.height,u=l.width}var c,u,h,d=a.getFromId(e,t.xaxis||"x"),f=a.getFromId(e,t.yaxis||"y"),p=d.d2c(t.x0)-t.dx/2,m=f.d2c(t.y0)-t.dy/2,g=[p,p+u*t.dx],y=[m,m+c*t.dy];if(d&&"log"===d.type)for(h=0;h0;)g=h.c2p(w+b*A),b--;for(b=0;void 0===v&&b0;)x=d.c2p(T+b*S),b--;gD[0];if(O||R){var F=m+E/2,j=v+C/2;I+="transform:"+n(F+"px",j+"px")+"scale("+(O?-1:1)+","+(R?-1:1)+")"+n(-F+"px",-j+"px")+";"}}P.attr("style",I);var B=new Promise(function(e){if(u._hasZ)e();else if(u._hasSource)if(u._canvas&&u._canvas.el.width===M&&u._canvas.el.height===k&&u._canvas.source===u.source)e();else{var t=document.createElement("canvas");t.width=M,t.height=k;var r=t.getContext("2d",{willReadFrequently:!0});u._image=u._image||new Image;var i=u._image;i.onload=function(){r.drawImage(i,0,0),u._canvas={el:t,source:u.source},e()},i.setAttribute("src",u.source)}}).then(function(){var e;if(u._hasZ)e=L(function(e,t){var r=_[t][e];return i.isTypedArray(r)&&(r=Array.from(r)),r}).toDataURL("image/png");else if(u._hasSource)if(p)e=u.source;else{var t=u._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,M,k).data;e=L(function(e,r){var i=4*(r*M+e);return[t[i],t[i+1],t[i+2],t[i+3]]}).toDataURL("image/png")}P.attr({"xlink:href":e,height:C,width:E,x:m,y:v})});e._promises.push(B)})}}}),cZ=p({"src/traces/image/style.js"(e,t){var r=T();t.exports=function(e){r.select(e).selectAll(".im image").style("opacity",function(e){return e[0].trace.opacity})}}}),c$=p({"src/traces/image/hover.js"(e,t){var r=rD(),i=tv(),n=i.isArrayOrTypedArray,a=sH();t.exports=function(e,t,o){var s=e.cd[0],l=s.trace,c=e.xa,u=e.ya;if(!(r.inbox(t-s.x0,t-(s.x0+s.w*l.dx),0)>0||r.inbox(o-s.y0,o-(s.y0+s.h*l.dy),0)>0)){var h,d=Math.floor((t-s.x0)/l.dx),f=Math.floor(Math.abs(o-s.y0)/l.dy);if(l._hasZ?h=s.z[f][d]:l._hasSource&&(h=l._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(d,f,1,1).data),h){var p,m,g=s.hi||l.hoverinfo;if(g){var y=g.split("+");-1!==y.indexOf("all")&&(y=["color"]),-1!==y.indexOf("color")&&(m=!0)}var v=a.colormodel[l.colormodel],x=v.colormodel||l.colormodel,b=x.length,_=l._scaler(h),w=v.suffix,T=[];(l.hovertemplate||m)&&(T.push("["+[_[0]+w[0],_[1]+w[1],_[2]+w[2]].join(", ")),4===b&&T.push(", "+_[3]+w[3]),T.push("]"),T=T.join(""),e.extraText=x.toUpperCase()+": "+T),n(l.hovertext)&&n(l.hovertext[f])?p=l.hovertext[f][d]:n(l.text)&&n(l.text[f])&&(p=l.text[f][d]);var M=u.c2p(s.y0+(f+.5)*l.dy),k=s.x0+(d+.5)*l.dx,A=s.y0+(f+.5)*l.dy,S="["+h.slice(0,l.colormodel.length).join(", ")+"]";return[i.extendFlat(e,{index:[f,d],x0:c.c2p(s.x0+d*l.dx),x1:c.c2p(s.x0+(d+1)*l.dx),y0:M,y1:M,color:_,xVal:k,xLabelVal:k,yVal:A,yLabelVal:A,zLabelVal:S,text:p,hovertemplateLabels:{zLabel:S,colorLabel:T,"color[0]Label":_[0]+w[0],"color[1]Label":_[1]+w[1],"color[2]Label":_[2]+w[2],"color[3]Label":_[3]+w[3]}})]}}}}}),cX=p({"src/traces/image/event_data.js"(e,t){t.exports=function(e,t){return"xVal"in t&&(e.x=t.xVal),"yVal"in t&&(e.y=t.yVal),t.xa&&(e.xaxis=t.xa),t.ya&&(e.yaxis=t.ya),e.color=t.color,e.colormodel=t.trace.colormodel,e.z||(e.z=t.color),e}}}),cK=p({"src/traces/image/index.js"(e,t){t.exports={attributes:(s1(),v(sG)).default,supplyDefaults:s2(),calc:cW(),plot:cY(),style:cZ(),hoverPoints:c$(),eventData:cX(),moduleType:"trace",name:"image",basePlotModule:np(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),cJ=p({"lib/image.js"(e,t){t.exports=cK()}}),cQ=p({"src/traces/pie/attributes.js"(e,t){var r=Z(),i=at().attributes,n=H(),a=Q(),{hovertemplateAttrs:o,texttemplateAttrs:s,templatefallbackAttrs:l}=eW(),c=q().extendFlat,u=eH().pattern,h=n({editType:"plot",arrayOk:!0,colorEditType:"plot"});t.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:a.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:u,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({},r.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:o({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:l(),texttemplate:s({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:l({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:c({},h,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:c({},h,{}),outsidetextfont:c({},h,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:c({},r.showlegend,{arrayOk:!0}),legend:c({},r.legend,{arrayOk:!0}),legendrank:c({},r.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:c({},h,{}),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:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),c0=p({"src/traces/pie/defaults.js"(e,t){var r=C(),i=tv(),n=cQ(),a=at().defaults,o=aM().handleText,s=tv().coercePattern;function l(e,t){var n=i.isArrayOrTypedArray(e),a=i.isArrayOrTypedArray(t),o=Math.min(n?e.length:1/0,a?t.length:1/0);if(isFinite(o)||(o=0),o&&a){for(var s,l=0;l0){s=!0;break}}s||(o=0)}return{hasLabels:n,hasValues:a,len:o}}function c(e,t,r,i,n){i("marker.line.width")&&i("marker.line.color",n?void 0:r.paper_bgcolor);var a=i("marker.colors");s(i,"marker.pattern",a),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}t.exports={handleLabelsAndValues:l,handleMarkerDefaults:c,supplyDefaults:function(e,t,r,s){function u(r,a){return i.coerce(e,t,n,r,a)}var h,d=l(u("labels"),u("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),!f){t.visible=!1;return}t._length=f,c(e,t,s,u,!0),u("scalegroup");var p=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(h=u("textinfo",i.isArrayOrTypedArray(p)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||h&&"none"!==h){var g=u("textposition");o(e,t,s,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(g)||"auto"===g||"outside"===g)&&u("automargin"),("inside"===g||"auto"===g||Array.isArray(g))&&u("insidetextorientation")}else"none"===h&&u("textposition","none");a(t,s,u);var y=u("hole");if(u("title.text")){var v=u("title.position",y?"middle center":"top center");y||"middle center"!==v||(t.title.position="top center"),i.coerceFont(u,"title.font",s.font)}u("sort"),u("direction"),u("rotation"),u("pull")}}}}),c1=p({"src/traces/pie/layout_attributes.js"(e,t){t.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),c2=p({"src/traces/pie/layout_defaults.js"(e,t){var r=tv(),i=c1();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("hiddenlabels"),n("piecolorway",t.colorway),n("extendpiecolors")}}}),c3=p({"src/traces/pie/calc.js"(e,t){var r=C(),i=ee(),n={};function a(e){return function(t,r){if(!t||!i.isValid(t))return!1;let n=i.rgbaString(t);return e[r]||(e[r]=n),n}}function o(e,t){var r,n=JSON.stringify(e),a=t[n];if(!a){for(a=e.slice(),r=0;r=0}),("funnelarea"===t.type?y:t.sort)&&o.sort(function(e,t){return t.v-e.v}),o[0]&&(o[0].vTotal=g),o},crossTraceCalc:function(e,t){var r=(t||{}).type;r||(r="pie");var i=e._fullLayout,a=e.calcdata,s=i[r+"colorway"],l=i["_"+r+"colormap"];i["extend"+r+"colors"]&&(s=o(s,n));for(var c=0,u=0;u"),name:h.hovertemplate||-1!==d.indexOf("name")?h.name:void 0,idealAlign:e.pxmid[0]<0?"left":"right",color:m.castOption(_.bgcolor,e.pts)||e.color,borderColor:m.castOption(_.bordercolor,e.pts),fontFamily:m.castOption(w.family,e.pts),fontSize:m.castOption(w.size,e.pts),fontColor:m.castOption(w.color,e.pts),nameLength:m.castOption(_.namelength,e.pts),textAlign:m.castOption(_.align,e.pts),hovertemplate:m.castOption(h.hovertemplate,e.pts),hovertemplateLabels:e,eventData:[g(e,h)]},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:t,inOut_bbox:T}),e.bbox=T[0],c._hasHoverLabel=!0}c._hasHoverEvent=!0,t.emit("plotly_hover",{points:[g(e,h)],event:r.event})}}),e.on("mouseout",function(e){var i=t._fullLayout,a=t._fullData[c.index],o=r.select(this).datum();c._hasHoverEvent&&(e.originalEvent=r.event,t.emit("plotly_unhover",{points:[g(o,a)],event:r.event}),c._hasHoverEvent=!1),c._hasHoverLabel&&(n.loneUnhover(i._hoverlayer.node()),c._hasHoverLabel=!1)}),e.on("click",function(e){var i=t._fullLayout,a=t._fullData[c.index];t._dragging||!1===i.hovermode||(t._hoverdata=[g(e,a)],n.click(t,r.event))})}function x(e,t,r){var i=m.castOption(e.insidetextfont.color,t.pts);!i&&e._input.textfont&&(i=m.castOption(e._input.textfont.color,t.pts));var n=m.castOption(e.insidetextfont.family,t.pts)||m.castOption(e.textfont.family,t.pts)||r.family,o=m.castOption(e.insidetextfont.size,t.pts)||m.castOption(e.textfont.size,t.pts)||r.size,s=m.castOption(e.insidetextfont.weight,t.pts)||m.castOption(e.textfont.weight,t.pts)||r.weight,l=m.castOption(e.insidetextfont.style,t.pts)||m.castOption(e.textfont.style,t.pts)||r.style,c=m.castOption(e.insidetextfont.variant,t.pts)||m.castOption(e.textfont.variant,t.pts)||r.variant,u=m.castOption(e.insidetextfont.textcase,t.pts)||m.castOption(e.textfont.textcase,t.pts)||r.textcase,h=m.castOption(e.insidetextfont.lineposition,t.pts)||m.castOption(e.textfont.lineposition,t.pts)||r.lineposition,d=m.castOption(e.insidetextfont.shadow,t.pts)||m.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:i||a.contrast(t.color),family:n,size:o,weight:s,style:l,variant:c,textcase:u,lineposition:h,shadow:d}}function b(e,t){for(var r,i,n=0;nl&&l>u||c=-4;g-=2)y(Math.PI*g,"tan");for(g=4;g>=-4;g-=2)y(Math.PI*(g+1),"tan")}if(h||f){for(g=4;g>=-4;g-=2)y(Math.PI*(g+1.5),"rad");for(g=4;g>=-4;g-=2)y(Math.PI*(g+.5),"rad")}}if(s||p||h){if((a={scale:n*i*2/Math.sqrt(e.width*e.width+e.height*e.height),rCenter:1-n,rotate:0}).textPosAngle=(t.startangle+t.stopangle)/2,a.scale>=1)return a;m.push(a)}(p||f)&&((a=w(e,i,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a)),(p||d)&&((a=M(e,i,o,l,c)).textPosAngle=(t.startangle+t.stopangle)/2,m.push(a));for(var v=0,x=0,b=0;b=1)break}return m[v]}function w(e,t,r,i,n){t=Math.max(0,t-2*p);var a=e.width/e.height,o=S(a,i,t,r);return{scale:2*o/e.height,rCenter:k(a,o/t),rotate:A(n)}}function M(e,t,r,i,n){t=Math.max(0,t-2*p);var a=e.height/e.width,o=S(a,i,t,r);return{scale:2*o/e.width,rCenter:k(a,o/t),rotate:A(n+Math.PI/2)}}function k(e,t){return Math.cos(t)-e*t}function A(e){return(180/Math.PI*e+720)%180-90}function S(e,t,r,i){var n=e+1/(2*Math.tan(t));return r*Math.min(1/(Math.sqrt(n*n+.5)+n),i/(Math.sqrt(e*e+i/2)+e))}function E(e,t){var r=t.pxmid[0],i=t.pxmid[1],n=e.width/2,a=e.height/2;return r<0&&(n*=-1),i<0&&(a*=-1),{scale:1,rCenter:1,rotate:0,x:n+Math.abs(a)*(n>0?1:-1)/2,y:a/(1+r*r/(i*i)),outside:!0}}function C(e,t){var r,i,n,a=1,o=1,s=e.trace,l={x:e.cx,y:e.cy},c={tx:0,ty:0};c.ty+=s.title.font.size,n=P(s),-1!==s.title.position.indexOf("top")?(l.y-=(1+n)*e.r,c.ty-=e.titleBox.height):-1!==s.title.position.indexOf("bottom")&&(l.y+=(1+n)*e.r);var u=(r=e.r,r/(void 0===(i=e.trace.aspectratio)?1:i)),h=t.w*(s.domain.x[1]-s.domain.x[0])/2;return -1!==s.title.position.indexOf("left")?(h+=u,l.x-=(1+n)*u,c.tx+=e.titleBox.width/2):-1!==s.title.position.indexOf("center")?h*=2:-1!==s.title.position.indexOf("right")&&(h+=u,l.x+=(1+n)*u,c.tx-=e.titleBox.width/2),a=h/e.titleBox.width,o=L(e,t)/e.titleBox.height,{x:l.x,y:l.y,scale:Math.min(a,o),tx:c.tx,ty:c.ty}}function L(e,t){var r=e.trace,i=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,i/2)}function P(e){var t,r=e.pull;if(!r)return 0;if(s.isArrayOrTypedArray(r))for(r=0,t=0;tr&&(r=e.pull[t]);return r}function I(e,t){for(var r=[],i=0;i1?l=(s=r.r)/n.aspectratio:s=(l=r.r)*n.aspectratio,s*=(1+n.baseratio)/2,o=s*l),c=Math.min(c,o/r.vTotal));for(i=0;i")}if(a){var x=s.castOption(n,t.i,"texttemplate");if(x){var b={label:t.label,value:t.v,valueLabel:m.formatPieValue(t.v,i.separators),percent:t.v/r.vTotal,percentLabel:m.formatPiePercent(t.v/r.vTotal,i.separators),color:t.color,text:t.text,customdata:s.castOption(n,t.i,"customdata")},_=m.getFirstFilled(n.text,t.pts);(y(_)||""===_)&&(b.text=_),t.text=s.texttemplateString({data:[b,n._meta],fallback:n.texttemplatefallback,labels:b,locale:e._fullLayout._d3locale,template:x})}else t.text=""}}function O(e,t){var r=e.rotate*Math.PI/180,i=Math.cos(r),n=Math.sin(r),a=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=a*i-o*n,e.textY=a*n+o*i,e.noCenter=!0}t.exports={plot:function(e,t){var n=e._context.staticPlot,h=e._fullLayout,p=h._size;f("pie",h),b(t,e),I(t,p);var g=s.makeTraceGroups(h._pielayer,t,"trace").each(function(t){var f=r.select(this),g=t[0],y=g.trace;(function(e){var t,r,i,n=e[0],a=n.r,o=n.trace,s=m.getRotationAngle(o.rotation),l=2*Math.PI/n.vTotal,c="px0",u="px1";if("counterclockwise"===o.direction){for(t=0;tn.vTotal/2),r.halfangle=Math.PI*Math.min(r.v/n.vTotal,.5),r.ring=1-o.hole,r.rInscribed=r.v!==n.vTotal||n.trace.hole?Math.min(1/(1+1/Math.sin(r.halfangle)),r.ring/2):1)})(t),f.attr("stroke-linejoin","round"),f.each(function(){var b,w,T=r.select(this).selectAll("g.slice").data(t);T.enter().append("g").classed("slice",!0),T.exit().remove();var M=[[[],[]],[[],[]]],k=!1;T.each(function(i,a){if(i.hidden)return void r.select(this).selectAll("path,g").remove();i.pointNumber=i.i,i.curveNumber=y.index,M[i.pxmid[1]<0?0:1][i.pxmid[0]<0?0:1].push(i);var l=g.cx,c=g.cy,f=r.select(this),p=f.selectAll("path.surface").data([i]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),f.call(v,e,t),y.pull){var b=+m.castOption(y.pull,i.pts)||0;b>0&&(l+=b*i.pxmid[0],c+=b*i.pxmid[1])}function w(e,t,r,n){var a=n*(t[0]-e[0]),o=n*(t[1]-e[1]);return"a"+n*g.r+","+n*g.r+" 0 "+i.largeArc+(r?" 1 ":" 0 ")+a+","+o}i.cxFinal=l,i.cyFinal=c;var T=y.hole;if(i.v===g.vTotal){var A="M"+(l+i.px0[0])+","+(c+i.px0[1])+w(i.px0,i.pxmid,!0,1)+w(i.pxmid,i.px0,!0,1)+"Z";T?p.attr("d","M"+(l+T*i.px0[0])+","+(c+T*i.px0[1])+w(i.px0,i.pxmid,!1,T)+w(i.pxmid,i.px0,!1,T)+"Z"+A):p.attr("d",A)}else{var S=w(i.px0,i.px1,!0,1);if(T){var C=1-T;p.attr("d","M"+(l+T*i.px1[0])+","+(c+T*i.px1[1])+w(i.px1,i.px0,!1,T)+"l"+C*i.px0[0]+","+C*i.px0[1]+S+"Z")}else p.attr("d","M"+l+","+c+"l"+i.px0[0]+","+i.px0[1]+S+"Z")}D(e,i,g);var L=m.castOption(y.textposition,i.pts),P=f.selectAll("g.slicetext").data(i.text&&"none"!==L?[0]:[]);P.enter().append("g").classed("slicetext",!0),P.exit().remove(),P.each(function(){var n=s.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),f=s.ensureUniformFontSize(e,"outside"===L?(p=y,v=i,b=h.font,{color:m.castOption(p.outsidetextfont.color,v.pts)||m.castOption(p.textfont.color,v.pts)||b.color,family:m.castOption(p.outsidetextfont.family,v.pts)||m.castOption(p.textfont.family,v.pts)||b.family,size:m.castOption(p.outsidetextfont.size,v.pts)||m.castOption(p.textfont.size,v.pts)||b.size,weight:m.castOption(p.outsidetextfont.weight,v.pts)||m.castOption(p.textfont.weight,v.pts)||b.weight,style:m.castOption(p.outsidetextfont.style,v.pts)||m.castOption(p.textfont.style,v.pts)||b.style,variant:m.castOption(p.outsidetextfont.variant,v.pts)||m.castOption(p.textfont.variant,v.pts)||b.variant,textcase:m.castOption(p.outsidetextfont.textcase,v.pts)||m.castOption(p.textfont.textcase,v.pts)||b.textcase,lineposition:m.castOption(p.outsidetextfont.lineposition,v.pts)||m.castOption(p.textfont.lineposition,v.pts)||b.lineposition,shadow:m.castOption(p.outsidetextfont.shadow,v.pts)||m.castOption(p.textfont.shadow,v.pts)||b.shadow}):x(y,i,h.font));n.text(i.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(o.font,f).call(u.convertToTspans,e);var p,v,b,w,T=o.bBox(n.node());if("outside"===L)w=E(T,i);else if(w=_(T,i,g),"auto"===L&&w.scale<1){var M=s.ensureUniformFontSize(e,y.outsidetextfont);n.call(o.font,M),w=E(T=o.bBox(n.node()),i)}var A=w.textPosAngle,S=void 0===A?i.pxmid:z(g.r,A);if(w.targetX=l+S[0]*w.rCenter+(w.x||0),w.targetY=c+S[1]*w.rCenter+(w.y||0),O(w,T),w.outside){var C=w.targetY;i.yLabelMin=C-T.height/2,i.yLabelMid=C,i.yLabelMax=C+T.height/2,i.labelExtraX=0,i.labelExtraY=0,k=!0}w.fontSize=f.size,d(y.type,w,h),t[a].transform=w,s.setTransormAndDisplay(n,w)})});var A=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);if(A.enter().append("g").classed("titletext",!0),A.exit().remove(),A.each(function(){var t,i,n,a=s.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),h=y.title.text;y._meta&&(h=s.templateString(h,y._meta)),a.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(o.font,y.title.font).call(u.convertToTspans,e),n="middle center"===y.title.position?(i=Math.sqrt((t=g).titleBox.width*t.titleBox.width+t.titleBox.height*t.titleBox.height),{x:t.cx,y:t.cy,scale:t.trace.hole*t.r*2/i,tx:0,ty:-t.titleBox.height/2+t.trace.title.font.size}):C(g,p),a.attr("transform",c(n.x,n.y)+l(Math.min(1,n.scale))+c(n.tx,n.ty))}),k&&function(e,t){var r,i,n,a,o,l,c,u,h,d,f,p,g;function y(e,t){return e.pxmid[1]-t.pxmid[1]}function v(e,t){return t.pxmid[1]-e.pxmid[1]}for(i=0;i<2;i++)for(n=i?y:v,o=i?Math.max:Math.min,c=i?1:-1,r=0;r<2;r++){for(a=r?Math.max:Math.min,l=r?1:-1,(u=e[i][r]).sort(n),d=(h=e[1-i][r]).concat(u),p=[],f=0;f0&&(e.labelExtraY=x),s.isArrayOrTypedArray(t.pull))for(u=0;u=(m.castOption(t.pull,h.pts)||0))&&((e.pxmid[1]-h.pxmid[1])*c>0?(x=h.cyFinal+o(h.px0[1],h.px1[1])-g-e.labelExtraY)*c>0&&(e.labelExtraY+=x):(y+e.labelExtraY-v)*c>0&&(n=3*l*Math.abs(u-d.indexOf(e)),(f=h.cxFinal+a(h.px0[0],h.px1[0])+n-(e.cxFinal+e.pxmid[0])-e.labelExtraX)*l>0&&(e.labelExtraX+=f)))}(p[f],x)}}}(M,y),b=T,w=y,b.each(function(e){var t=r.select(this);if(!e.labelExtraX&&!e.labelExtraY)return void t.select("path.textline").remove();var i=t.select("g.slicetext text");e.transform.targetX+=e.labelExtraX,e.transform.targetY+=e.labelExtraY,s.setTransormAndDisplay(i,e.transform);var n=e.cxFinal+e.pxmid[0],o="M"+n+","+(e.cyFinal+e.pxmid[1]),l=(e.yLabelMax-e.yLabelMin)*(e.pxmid[0]<0?-1:1)/4;if(e.labelExtraX){var c=e.labelExtraX*e.pxmid[1]/e.pxmid[0],u=e.yLabelMid+e.labelExtraY-(e.cyFinal+e.pxmid[1]);Math.abs(c)>Math.abs(u)?o+="l"+u*e.pxmid[0]/e.pxmid[1]+","+u+"H"+(n+e.labelExtraX+l):o+="l"+e.labelExtraX+","+c+"v"+(u-c)+"h"+l}else o+="V"+(e.yLabelMid+e.labelExtraY)+"h"+l;s.ensureSingle(t,"path","textline").call(a.stroke,w.outsidetextfont.color).attr({"stroke-width":Math.min(2,w.outsidetextfont.size/8),d:o,fill:"none"})}),k&&y.automargin){var S=o.bBox(f.node()),L=y.domain,P=p.w*(L.x[1]-L.x[0]),I=p.h*(L.y[1]-L.y[0]),R=(.5*P-g.r)/p.w,F=(.5*I-g.r)/p.h;i.autoMargin(e,"pie."+y.uid+".automargin",{xl:L.x[0]-R,xr:L.x[1]+R,yb:L.y[0]-F,yt:L.y[1]+F,l:Math.max(g.cx-g.r-S.left,0),r:Math.max(S.right-(g.cx+g.r),0),b:Math.max(S.bottom-(g.cy+g.r),0),t:Math.max(g.cy-g.r-S.top,0),pad:5})}})});setTimeout(function(){g.selectAll("tspan").each(function(){var e=r.select(this);e.attr("dy")&&e.attr("dy",e.attr("dy"))})},0)},formatSliceLabel:D,transformInsideText:_,determineInsideTextFont:x,positionTitleOutside:C,prerenderTitles:b,layoutAreas:I,attachFxHandlers:v,computeTransform:O}}}),c6=p({"src/traces/pie/style.js"(e,t){var r=T(),i=rT(),n=aE().resizeText;t.exports=function(e){var t=e._fullLayout._pielayer.selectAll(".trace");n(e,t,"pie"),t.each(function(t){var n=t[0].trace,a=r.select(this);a.style({opacity:n.opacity}),a.selectAll("path.surface").each(function(t){r.select(this).call(i,t,n,e)})})}}}),c8=p({"src/traces/pie/base_plot.js"(e){var t=tD();e.name="pie",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),c7=p({"src/traces/pie/index.js"(e,t){t.exports={attributes:cQ(),supplyDefaults:c0().supplyDefaults,supplyLayoutDefaults:c2(),layoutAttributes:c1(),calc:c3().calc,crossTraceCalc:c3().crossTraceCalc,plot:c4().plot,style:c6(),styleOne:rT(),moduleType:"trace",name:"pie",basePlotModule:c8(),categories:["pie-like","pie","showLegend"],meta:{}}}}),c9=p({"lib/pie.js"(e,t){t.exports=c7()}}),ue=p({"src/traces/sunburst/base_plot.js"(e){var t=tD();e.name="sunburst",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),ut=p({"src/traces/sunburst/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),ur=p({"src/traces/sunburst/attributes.js"(e,t){var r=Z(),{hovertemplateAttrs:i,texttemplateAttrs:n,templatefallbackAttrs:a}=eW(),o=tV(),s=at().attributes,l=cQ(),c=ut(),u=q().extendFlat,h=eH().pattern;t.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:u({colors:{valType:"data_array",editType:"calc"},line:{color:u({},l.marker.line.color,{dflt:null}),width:u({},l.marker.line.width,{dflt:1}),editType:"calc"},pattern:h,editType:"calc"},o("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:l.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:n({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:a({editType:"plot"}),hovertext:l.hovertext,hoverinfo:u({},r.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:i({},{keys:c.eventDataKeys}),hovertemplatefallback:a(),textfont:l.textfont,insidetextorientation:l.insidetextorientation,insidetextfont:l.insidetextfont,outsidetextfont:u({},l.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:l.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:s({name:"sunburst",trace:!0,editType:"calc"})}}}),ui=p({"src/traces/sunburst/layout_attributes.js"(e,t){t.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),un=p({"src/traces/sunburst/defaults.js"(e,t){var r=tv(),i=ur(),n=at().defaults,a=aM().handleText,o=c0().handleMarkerDefaults,s=t3(),l=s.hasColorscale,c=s.handleDefaults;t.exports=function(e,t,s,u){function h(n,a){return r.coerce(e,t,i,n,a)}var d=h("labels"),f=h("parents");if(!d||!d.length||!f||!f.length){t.visible=!1;return}var p=h("values");h(p&&p.length?"branchvalues":"count"),h("level"),h("maxdepth"),o(e,t,u,h);var m=t._hasColorscale=l(e,"marker","colors")||(e.marker||{}).coloraxis;m&&c(e,t,u,h,{prefix:"marker.",cLetter:"c"}),h("leaf.opacity",m?1:.7);var g=h("text");h("texttemplate"),h("texttemplatefallback"),t.texttemplate||h("textinfo",r.isArrayOrTypedArray(g)?"text+label":"label"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),a(e,t,u,h,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("insidetextorientation"),h("sort"),h("rotation"),h("root.color"),n(t,u,h),t._length=null}}}),ua=p({"src/traces/sunburst/layout_defaults.js"(e,t){var r=tv(),i=ui();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("sunburstcolorway",t.colorway),n("extendsunburstcolors")}}}),uo=p({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(e,t){var r;r=e,function(e){function t(e,t){return e.parent===t.parent?1:2}function r(e,t){return e+t.x}function i(e,t){return Math.max(e,t.y)}function n(e){var t=0,r=e.children,i=r&&r.length;if(i)for(;--i>=0;)t+=r[i].value;else t=1;e.value=t}function a(e,t){var r,i,n,a,s,u=new c(e),h=+e.value&&(u.value=e.value),d=[u];for(null==t&&(t=o);r=d.pop();)if(h&&(r.value=+r.data.value),(n=t(r.data))&&(s=n.length))for(r.children=Array(s),a=s-1;a>=0;--a)d.push(i=r.children[a]=new c(n[a])),i.parent=r,i.depth=r.depth+1;return u.eachBefore(l)}function o(e){return e.children}function s(e){e.data=e.data.data}function l(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function c(e){this.data=e,this.depth=this.height=0,this.parent=null}c.prototype=a.prototype={constructor:c,count:function(){return this.eachAfter(n)},each:function(e){var t,r,i,n,a=this,o=[a];do for(t=o.reverse(),o=[];a=t.pop();)if(e(a),r=a.children)for(i=0,n=r.length;i=0;--r)n.push(t[r]);return this},sum:function(e){return this.eachAfter(function(t){for(var r=+e(t.data)||0,i=t.children,n=i&&i.length;--n>=0;)r+=i[n].value;t.value=r})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,r=function(e,t){if(e===t)return e;var r=e.ancestors(),i=t.ancestors(),n=null;for(e=r.pop(),t=i.pop();e===t;)n=e,e=r.pop(),t=i.pop();return n}(t,e),i=[t];t!==r;)i.push(t=t.parent);for(var n=i.length;e!==r;)i.splice(n,0,e),e=e.parent;return i},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){var e=[];return this.each(function(t){e.push(t)}),e},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(r){r!==e&&t.push({source:r.parent,target:r})}),t},copy:function(){return a(this).eachBefore(s)}};var u=Array.prototype.slice;function h(e){for(var t,r,i=0,n=(e=function(e){for(var t,r,i=e.length;i;)r=Math.random()*i--|0,t=e[i],e[i]=e[r],e[r]=t;return e}(u.call(e))).length,a=[];i0&&r*r>i*i+n*n}function p(e,t){for(var r=0;r(o*=o)?(i=(c+o-n)/(2*c),a=Math.sqrt(Math.max(0,o/c-i*i)),r.x=e.x-i*s-a*l,r.y=e.y-i*l+a*s):(i=(c+n-o)/(2*c),a=Math.sqrt(Math.max(0,n/c-i*i)),r.x=t.x+i*s-a*l,r.y=t.y+i*l+a*s)):(r.x=t.x+r.r,r.y=t.y)}function v(e,t){var r=e.r+t.r-1e-6,i=t.x-e.x,n=t.y-e.y;return r>0&&r*r>i*i+n*n}function x(e){var t=e._,r=e.next._,i=t.r+r.r,n=(t.x*r.r+r.x*t.r)/i,a=(t.y*r.r+r.y*t.r)/i;return n*n+a*a}function b(e){this._=e,this.next=null,this.previous=null}function _(e){var t,r,i,n,a,o,s,l,c,u,d;if(!(n=e.length))return 0;if((t=e[0]).x=0,t.y=0,!(n>1))return t.r;if(r=e[1],t.x=-r.r,r.x=t.r,r.y=0,!(n>2))return t.r+r.r;y(r,t,i=e[2]),t=new b(t),r=new b(r),i=new b(i),t.next=i.previous=r,r.next=t.previous=i,i.next=r.previous=t;e:for(s=3;sd&&(d=s),(f=Math.max(d/(g=u*u*m),g/h))>p){u-=s;break}p=f}y.push(o={value:u,dice:l1?t:1)},r}(N),q=function e(t){function r(e,r,i,n,a){if((o=e._squarify)&&o.ratio===t)for(var o,s,l,c,u,h=-1,d=o.length,f=e.value;++h1?t:1)},r}(N);e.cluster=function(){var e=t,n=1,a=1,o=!1;function s(t){var s,l=0;t.eachAfter(function(t){var n=t.children;n?(t.x=n.reduce(r,0)/n.length,t.y=1+n.reduce(i,0)):(t.x=s?l+=e(t,s):0,t.y=0,s=t)});var c=function(e){for(var t;t=e.children;)e=t[0];return e}(t),u=function(e){for(var t;t=e.children;)e=t[t.length-1];return e}(t),h=c.x-e(c,u)/2,d=u.x+e(u,c)/2;return t.eachAfter(o?function(e){e.x=(e.x-t.x)*n,e.y=(t.y-e.y)*a}:function(e){e.x=(e.x-h)/(d-h)*n,e.y=(1-(t.y?e.y/t.y:1))*a})}return s.separation=function(t){return arguments.length?(e=t,s):e},s.size=function(e){return arguments.length?(o=!1,n=+e[0],a=+e[1],s):o?null:[n,a]},s.nodeSize=function(e){return arguments.length?(o=!0,n=+e[0],a=+e[1],s):o?[n,a]:null},s},e.hierarchy=a,e.pack=function(){var e=null,t=1,r=1,i=T;function n(n){return n.x=t/2,n.y=r/2,e?n.eachBefore(A(e)).eachAfter(S(i,.5)).eachBefore(E(1)):n.eachBefore(A(k)).eachAfter(S(T,1)).eachAfter(S(i,n.r/Math.min(t,r))).eachBefore(E(Math.min(t,r)/(2*n.r))),n}return n.radius=function(t){return arguments.length?(e=null==t?null:w(t),n):e},n.size=function(e){return arguments.length?(t=+e[0],r=+e[1],n):[t,r]},n.padding=function(e){return arguments.length?(i="function"==typeof e?e:M(+e),n):i},n},e.packEnclose=h,e.packSiblings=function(e){return _(e),e},e.partition=function(){var e=1,t=1,r=0,i=!1;function n(n){var a,o,s=n.height+1;return n.x0=n.y0=r,n.x1=e,n.y1=t/s,n.eachBefore((a=t,o=s,function(e){e.children&&L(e,e.x0,a*(e.depth+1)/o,e.x1,a*(e.depth+2)/o);var t=e.x0,i=e.y0,n=e.x1-r,s=e.y1-r;n0)throw Error("cycle");return a}return r.id=function(t){return arguments.length?(e=w(t),r):e},r.parentId=function(e){return arguments.length?(t=w(e),r):t},r},e.tree=function(){var e=O,t=1,r=1,i=null;function n(n){var l=function(e){for(var t,r,i,n,a,o=new j(e,0),s=[o];t=s.pop();)if(i=t._.children)for(t.children=Array(a=i.length),n=a-1;n>=0;--n)s.push(r=t.children[n]=new j(i[n],n)),r.parent=t;return(o.parent=new j(null,0)).children=[o],o}(n);if(l.eachAfter(a),l.parent.m=-l.z,l.eachBefore(o),i)n.eachBefore(s);else{var c=n,u=n,h=n;n.eachBefore(function(e){e.xu.x&&(u=e),e.depth>h.depth&&(h=e)});var d=c===u?1:e(c,u)/2,f=d-c.x,p=t/(u.x+d+f),m=r/(h.depth||1);n.eachBefore(function(e){e.x=(e.x+f)*p,e.y=e.depth*m})}return n}function a(t){var r=t.children,i=t.parent.children,n=t.i?i[t.i-1]:null;if(r){!function(e){for(var t,r=0,i=0,n=e.children,a=n.length;--a>=0;)t=n[a],t.z+=r,t.m+=r,r+=t.s+(i+=t.c)}(t);var a=(r[0].z+r[r.length-1].z)/2;n?(t.z=n.z+e(t._,n._),t.m=t.z-a):t.z=a}else n&&(t.z=n.z+e(t._,n._));t.parent.A=function(t,r,i){if(r){for(var n,a,o,s=t,l=t,c=r,u=s.parent.children[0],h=s.m,d=l.m,f=c.m,p=u.m;c=F(c),s=R(s),c&&s;)u=R(u),(l=F(l)).a=t,(o=c.z+f-s.z-h+e(c._,s._))>0&&(function(e,t,r){var i=r/(t.i-e.i);t.c-=i,t.s+=r,e.c+=i,t.z+=r,t.m+=r}((n=c,a=i,n.a.parent===t.parent?n.a:a),t,o),h+=o,d+=o),f+=c.m,h+=s.m,p+=u.m,d+=l.m;c&&!F(l)&&(l.t=c,l.m+=f-d),s&&!R(u)&&(u.t=s,u.m+=h-p,i=t)}return i}(t,n,t.parent.A||i[0])}function o(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function s(e){e.x*=t,e.y=e.depth*r}return n.separation=function(t){return arguments.length?(e=t,n):e},n.size=function(e){return arguments.length?(i=!1,t=+e[0],r=+e[1],n):i?null:[t,r]},n.nodeSize=function(e){return arguments.length?(i=!0,t=+e[0],r=+e[1],n):i?[t,r]:null},n},e.treemap=function(){var e=V,t=!1,r=1,i=1,n=[0],a=T,o=T,s=T,l=T,c=T;function u(e){return e.x0=e.y0=0,e.x1=r,e.y1=i,e.eachBefore(h),n=[0],t&&e.eachBefore(C),e}function h(t){var r=n[t.depth],i=t.x0+r,u=t.y0+r,h=t.x1-r,d=t.y1-r;h=r-1){var u=s[t];u.x0=n,u.y0=a,u.x1=o,u.y1=l;return}for(var h=c[t],d=i/2+h,f=t+1,p=r-1;f>>1;c[m]l-a){var v=(n*y+o*g)/i;e(t,f,g,n,a,v,l),e(f,r,y,v,a,o,l)}else{var x=(a*y+l*g)/i;e(t,f,g,n,a,o,x),e(f,r,y,n,x,o,l)}}(0,l,e.value,t,r,i,n)},e.treemapDice=L,e.treemapResquarify=q,e.treemapSlice=B,e.treemapSliceDice=function(e,t,r,i,n){(1&e.depth?B:L)(e,t,r,i,n)},e.treemapSquarify=V,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),us=p({"src/traces/sunburst/calc.js"(e){var t=uo(),r=C(),i=tv(),n=t3().makeColorScaleFuncFromTrace,a=c3().makePullColorFn,o=c3().generateExtendedColors,s=t3().calc,l=L().ALMOST_EQUAL,c={},u={},h={};e.calc=function(e,o){var c,u,h,d=e._fullLayout,f=o.ids,p=i.isArrayOrTypedArray(f),m=o.labels,g=o.parents,y=o.values,v=i.isArrayOrTypedArray(y),x=[],b={},_={},w=function(e){return e||"number"==typeof e},T=function(e){return!v||r(y[e])&&y[e]>=0};p?(c=Math.min(f.length,g.length),u=function(e){return w(f[e])&&T(e)},h=function(e){return String(f[e])}):(c=Math.min(m.length,g.length),u=function(e){return w(m[e])&&T(e)},h=function(e){return String(m[e])}),v&&(c=Math.min(c,y.length));for(var M=0;M1){for(var E=i.randstr(),C=0;C>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?uv(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?uv(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|240&t,((15&t)<<4|15&t)/255):null):(t=uU.exec(e))?new u_(t[1],t[2],t[3],1):(t=uV.exec(e))?new u_(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=uq.exec(e))?uv(t[1],t[2],t[3],t[4]):(t=uH.exec(e))?uv(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=uG.exec(e))?uE(t[1],t[2]/100,t[3]/100,1):(t=uW.exec(e))?uE(t[1],t[2]/100,t[3]/100,t[4]):uY.hasOwnProperty(e)?uy(uY[e]):"transparent"===e?new u_(NaN,NaN,NaN,0):null}function uy(e){return new u_(e>>16&255,e>>8&255,255&e,1)}function uv(e,t,r,i){return i<=0&&(e=t=r=NaN),new u_(e,t,r,i)}function ux(e){return e instanceof uh||(e=ug(e)),e?new u_((e=e.rgb()).r,e.g,e.b,e.opacity):new u_}function ub(e,t,r,i){return 1==arguments.length?ux(e):new u_(e,t,r,i??1)}function u_(e,t,r,i){this.r=+e,this.g=+t,this.b=+r,this.opacity=+i}function uw(){return`#${uS(this.r)}${uS(this.g)}${uS(this.b)}`}function uT(){return`#${uS(this.r)}${uS(this.g)}${uS(this.b)}${uS((isNaN(this.opacity)?1:this.opacity)*255)}`}function uM(){let e=uk(this.opacity);return`${1===e?"rgb(":"rgba("}${uA(this.r)}, ${uA(this.g)}, ${uA(this.b)}${1===e?")":`, ${e})`}`}function uk(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function uA(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function uS(e){return((e=uA(e))<16?"0":"")+e.toString(16)}function uE(e,t,r,i){return i<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new uP(e,t,r,i)}function uC(e){if(e instanceof uP)return new uP(e.h,e.s,e.l,e.opacity);if(e instanceof uh||(e=ug(e)),!e)return new uP;if(e instanceof uP)return e;var t=(e=e.rgb()).r/255,r=e.g/255,i=e.b/255,n=Math.min(t,r,i),a=Math.max(t,r,i),o=NaN,s=a-n,l=(a+n)/2;return s?(o=t===a?(r-i)/s+(r0&&l<1?0:o,new uP(o,s,l,e.opacity)}function uL(e,t,r,i){return 1==arguments.length?uC(e):new uP(e,t,r,i??1)}function uP(e,t,r,i){this.h=+e,this.s=+t,this.l=+r,this.opacity=+i}function uI(e){return(e=(e||0)%360)<0?e+360:e}function uz(e){return Math.max(0,Math.min(1,e||0))}function uD(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var uO,uR,uF,uj,uB,uN,uU,uV,uq,uH,uG,uW,uY,uZ,u$,uX=f({"node_modules/d3-color/src/color.js"(){uu(),uR=1/(uO=.7),uF="\\s*([+-]?\\d+)\\s*",uj="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",uB="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",uN=/^#([0-9a-f]{3,8})$/,uU=RegExp(`^rgb\\(${uF},${uF},${uF}\\)$`),uV=RegExp(`^rgb\\(${uB},${uB},${uB}\\)$`),uq=RegExp(`^rgba\\(${uF},${uF},${uF},${uj}\\)$`),uH=RegExp(`^rgba\\(${uB},${uB},${uB},${uj}\\)$`),uG=RegExp(`^hsl\\(${uj},${uB},${uB}\\)$`),uW=RegExp(`^hsla\\(${uj},${uB},${uB},${uj}\\)$`),uY={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32},ul(uh,ug,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ud,formatHex:ud,formatHex8:uf,formatHsl:up,formatRgb:um,toString:um}),ul(u_,ub,uc(uh,{brighter(e){return e=null==e?uR:Math.pow(uR,e),new u_(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?uO:Math.pow(uO,e),new u_(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new u_(uA(this.r),uA(this.g),uA(this.b),uk(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:uw,formatHex:uw,formatHex8:uT,formatRgb:uM,toString:uM})),ul(uP,uL,uc(uh,{brighter(e){return e=null==e?uR:Math.pow(uR,e),new uP(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?uO:Math.pow(uO,e),new uP(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*t,n=2*r-i;return new u_(uD(e>=240?e-240:e+120,n,i),uD(e,n,i),uD(e<120?e+240:e-120,n,i),this.opacity)},clamp(){return new uP(uI(this.h),uz(this.s),uz(this.l),uk(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=uk(this.opacity);return`${1===e?"hsl(":"hsla("}${uI(this.h)}, ${100*uz(this.s)}%, ${100*uz(this.l)}%${1===e?")":`, ${e})`}`}}))}}),uK=f({"node_modules/d3-color/src/math.js"(){uZ=Math.PI/180,u$=180/Math.PI}});function uJ(e){if(e instanceof u0)return new u0(e.l,e.a,e.b,e.opacity);if(e instanceof u6)return u8(e);e instanceof u_||(e=ux(e));var t,r,i=u5(e.r),n=u5(e.g),a=u5(e.b),o=u1((.2225045*i+.7168786*n+.0606169*a)/u9);return i===n&&n===a?t=r=o:(t=u1((.4360747*i+.3850649*n+.1430804*a)/u7),r=u1((.0139322*i+.0971045*n+.7141733*a)/he)),new u0(116*o-16,500*(t-o),200*(o-r),e.opacity)}function uQ(e,t,r,i){return 1==arguments.length?uJ(e):new u0(e,t,r,i??1)}function u0(e,t,r,i){this.l=+e,this.a=+t,this.b=+r,this.opacity=+i}function u1(e){return e>hn?Math.pow(e,.3333333333333333):e/hi+ht}function u2(e){return e>hr?e*e*e:hi*(e-ht)}function u3(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,.4166666666666667)-.055)}function u5(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function u4(e,t,r,i){return 1==arguments.length?function(e){if(e instanceof u6)return new u6(e.h,e.c,e.l,e.opacity);if(e instanceof u0||(e=uJ(e)),0===e.a&&0===e.b)return new u6(NaN,0=1?(r=1,t-1):Math.floor(r*t),n=e[i],a=e[i+1],o=i>0?e[i-1]:2*n-a,s=i()=>e}});function hT(e,t){return function(r){return e+r*t}}function hM(e,t){var r=t-e;return r?hT(e,r>180||r<-180?r-360*Math.round(r/360):r):hb(isNaN(e)?t:e)}function hk(e,t){var r=t-e;return r?hT(e,r):hb(isNaN(e)?t:e)}var hA=f({"node_modules/d3-interpolate/src/color.js"(){hw()}});function hS(e){return function(t){var r,i,n=t.length,a=Array(n),o=Array(n),s=Array(n);for(r=0;rs&&(o=t.slice(s,o),c[l]?c[l]+=o:c[++l]=o),(n=n[0])===(a=a[0])?c[l]?c[l]+=a:c[++l]=a:(c[++l]=null,u.push({i:l,x:hN(n,a)})),s=hW.lastIndex;return s180?l+=360:l-s>180&&(s+=360),d.push({i:h.push(n(h)+"rotate(",null,i)-2,x:hN(s,l)})):l&&h.push(n(h)+"rotate("+l+i),c=a.skewX,u=o.skewX,c!==u?d.push({i:h.push(n(h)+"skewX(",null,i)-2,x:hN(c,u)}):u&&h.push(n(h)+"skewX("+u+i),function(e,t,r,i,a,o){if(e!==r||t!==i){var s=a.push(n(a)+"scale(",null,",",null,")");o.push({i:s-4,x:hN(e,r)},{i:s-2,x:hN(t,i)})}else(1!==r||1!==i)&&a.push(n(a)+"scale("+r+","+i+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,h,d),a=o=null,function(e){for(var t,r=-1,i=d.length;++rhZ,interpolateArray:()=>hO,interpolateBasis:()=>hy,interpolateBasisClosed:()=>hx,interpolateCubehelix:()=>db,interpolateCubehelixLong:()=>d_,interpolateDate:()=>hj,interpolateDiscrete:()=>hX,interpolateHcl:()=>dg,interpolateHclLong:()=>dy,interpolateHsl:()=>du,interpolateHslLong:()=>dh,interpolateHue:()=>hJ,interpolateLab:()=>df,interpolateNumber:()=>hN,interpolateNumberArray:()=>hI,interpolateObject:()=>hV,interpolateRgb:()=>hE,interpolateRgbBasis:()=>hC,interpolateRgbBasisClosed:()=>hL,interpolateRound:()=>h0,interpolateString:()=>hH,interpolateTransformCss:()=>dr,interpolateTransformSvg:()=>di,interpolateZoom:()=>ds,piecewise:()=>dT,quantize:()=>dk});var dE=f({"node_modules/d3-interpolate/src/index.js"(){h$(),hF(),hv(),h_(),hB(),hK(),hQ(),hU(),hD(),hq(),h1(),hY(),dn(),dl(),hP(),dd(),dp(),dv(),dw(),dM(),dA()}}),dC=p({"src/traces/sunburst/fill_one.js"(e,t){var r=t9(),i=ee();t.exports=function(e,t,n,a,o){var s=t.data.data,l=s.i,c=o||s.color;if(l>=0){t.i=s.i;var u=n.marker;u.pattern&&u.colors&&u.pattern.shape||(u.color=c,t.color=c),r.pointStyle(e,n,a,t)}else i.fill(e,c)}}}),dL=p({"src/traces/sunburst/style.js"(e,t){var r=T(),i=ee(),n=tv(),a=aE().resizeText,o=dC();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=n.castOption(r,c,"marker.line.color")||i.defaultLine,h=n.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(i.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");a(e,t,"sunburst"),t.each(function(t){var i=r.select(this),n=t[0].trace;i.style("opacity",n.opacity),i.selectAll("path.surface").each(function(t){r.select(this).call(s,t,n,e)})})},styleOne:s}}}),dP=p({"src/traces/sunburst/helpers.js"(e){var t=tv(),r=ee(),i=rf(),n=r_();function a(e){return e.data.data.pid}e.findEntryWithLevel=function(t,r){var i;return r&&t.eachAfter(function(t){if(e.getPtId(t)===r)return i=t.copy()}),i||t},e.findEntryWithChild=function(t,r){var i;return t.eachAfter(function(t){for(var n=t.children||[],a=0;a0)},e.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0},e.isHeader=function(t,r){return!(e.isLeaf(t)||t.depth===r._maxDepth-1)},e.getParent=function(t,r){return e.findEntryWithLevel(t,a(r))},e.listPath=function(t,r){var i=t.parent;if(!i)return[];var n=r?[i.data[r]]:[i];return e.listPath(i,r).concat(n)},e.getPath=function(t){return e.listPath(t,"label").join("/")+"/"},e.formatValue=n.formatPieValue,e.formatPercent=function(e,r){var i=t.formatPercent(e,0);return"0%"===i&&(i=n.formatPiePercent(e,r)),i}}}),dI=p({"src/traces/sunburst/fx.js"(e,t){var r=T(),i=eQ(),n=t6().appendArrayPointValue,a=rD(),o=tv(),s=tT(),l=dP(),c=r_().formatPieValue;function u(e,t,r){for(var i=e.data.data,a={curveNumber:t.index,pointNumber:i.i,data:t._input,fullData:t},o=0;o"),name:k||P("name")?v.name:void 0,color:M("hoverlabel.bgcolor")||x.color,borderColor:M("hoverlabel.bordercolor"),fontFamily:M("hoverlabel.font.family"),fontSize:M("hoverlabel.font.size"),fontColor:M("hoverlabel.font.color"),fontWeight:M("hoverlabel.font.weight"),fontStyle:M("hoverlabel.font.style"),fontVariant:M("hoverlabel.font.variant"),nameLength:M("hoverlabel.namelength"),textAlign:M("hoverlabel.align"),hovertemplate:k,hovertemplateLabels:E,eventData:h};g&&(F.x0=I-i.rInscribed*i.rpx1,F.x1=I+i.rInscribed*i.rpx1,F.idealAlign=i.pxmid[0]<0?"left":"right"),y&&(F.x=I,F.idealAlign=I<0?"left":"right");var j=[];a.loneHover(F,{container:s._hoverlayer.node(),outerContainer:s._paper.node(),gd:n,inOut_bbox:j}),h[0].bbox=j[0],p._hasHoverLabel=!0}if(y){var B=e.select("path.surface");d.styleOne(B,i,v,n,{hovered:!0})}p._hasHoverEvent=!0,n.emit("plotly_hover",{points:h||[u(i,v,d.eventDataKeys)],event:r.event})}}),e.on("mouseout",function(t){var i=n._fullLayout,o=n._fullData[p.index],s=r.select(this).datum();if(p._hasHoverEvent&&(t.originalEvent=r.event,n.emit("plotly_unhover",{points:[u(s,o,d.eventDataKeys)],event:r.event}),p._hasHoverEvent=!1),p._hasHoverLabel&&(a.loneUnhover(i._hoverlayer.node()),p._hasHoverLabel=!1),y){var l=e.select("path.surface");d.styleOne(l,s,o,n,{hovered:!1})}}),e.on("click",function(e){var t=n._fullLayout,o=n._fullData[p.index],c=g&&(l.isHierarchyRoot(e)||l.isLeaf(e)),h=l.getPtId(e),f=l.isEntry(e)?l.findEntryWithChild(m,h):l.findEntryWithLevel(m,h),y=l.getPtId(f),v={points:[u(e,o,d.eventDataKeys)],event:r.event};c||(v.nextLevel=y);var x=s.triggerHandler(n,"plotly_"+p.type+"click",v);if(!1!==x&&t.hovermode&&(n._hoverdata=[u(e,o,d.eventDataKeys)],a.click(n,r.event)),!c&&!1!==x&&!n._dragging&&!n._transitioning){i.call("_storeDirectGUIEdit",o,t._tracePreGUI[o.uid],{level:o.level});var b={data:[{level:y}],traces:[p.index]},_={frame:{redraw:!1,duration:d.transitionTime},transition:{duration:d.transitionTime,easing:d.transitionEasing},mode:"immediate",fromcurrent:!0};a.loneUnhover(t._hoverlayer.node()),i.call("animate",n,b,_)}})}}}),dz=p({"src/traces/sunburst/plot.js"(e){var t=T(),r=uo(),i=(dE(),v(dS)).interpolate,n=t9(),a=tv(),o=tF(),s=aE(),l=s.recordMinTextSize,c=s.clearMinTextSize,u=c4(),h=r_().getRotationAngle,d=u.computeTransform,f=u.transformInsideText,p=dL().styleOne,m=aL().resizeText,g=dI(),y=ut(),x=dP();function b(s,c,u,m){var v,b=s._context.staticPlot,w=s._fullLayout,T=!w.uniformtext.mode&&x.hasTransition(m),M=t.select(u).selectAll("g.slice"),k=c[0],A=k.trace,S=k.hierarchy,E=x.findEntryWithLevel(S,A.level),C=x.getMaxDepth(A),L=w._size,P=A.domain,I=L.w*(P.x[1]-P.x[0]),z=L.h*(P.y[1]-P.y[0]),D=.5*Math.min(I,z),O=k.cx=L.l+L.w*(P.x[1]+P.x[0])/2,R=k.cy=L.t+L.h*(1-P.y[0])-z/2;if(!E)return M.remove();var F=null,j={};T&&M.each(function(e){j[x.getPtId(e)]={rpx0:e.rpx0,rpx1:e.rpx1,x0:e.x0,x1:e.x1,transform:e.transform},!F&&x.isEntry(e)&&(F=e)});var B=(v=E,r.partition().size([2*Math.PI,v.height+1])(v)).descendants(),N=E.height+1,U=0,V=C;k.hasMultipleRoots&&x.isHierarchyRoot(E)&&(B=B.slice(1),N-=1,U=1,V+=1),B=B.filter(function(e){return e.y1<=V});var q=h(A.rotation);q&&B.forEach(function(e){e.x0+=q,e.x1+=q});var H=Math.min(N,C),G=function(e){return(e-U)/H*D},W=function(e,t){return[e*Math.cos(t),-e*Math.sin(t)]},Y=function(e){return a.pathAnnulus(e.rpx0,e.rpx1,e.x0,e.x1,O,R)},Z=function(e){return O+_(e)[0]*(e.transform.rCenter||0)+(e.transform.x||0)},$=function(e){return R+_(e)[1]*(e.transform.rCenter||0)+(e.transform.y||0)};(M=M.data(B,x.getPtId)).enter().append("g").classed("slice",!0),T?M.exit().transition().each(function(){var e=t.select(this);e.select("path.surface").transition().attrTween("d",function(e){var t=function(e){var t,r=x.getPtId(e),n=j[r],a=j[x.getPtId(E)];if(a){var o=(e.x1>a.x1?2*Math.PI:0)+q;t=e.rpx1X?2*Math.PI:0)+q;t={x0:o,x1:o}}else t={rpx0:D,rpx1:D},a.extendFlat(t,Q(e));else t={rpx0:0,rpx1:0};else t={x0:q,x1:q};return i(t,n)}(e);return function(e){return Y(t(e))}}):m.attr("d",Y),h.call(g,E,s,c,{eventDataKeys:y.eventDataKeys,transitionTime:y.CLICK_TRANSITION_TIME,transitionEasing:y.CLICK_TRANSITION_EASING}).call(x.setSliceCursor,s,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:s._transitioning}),m.call(p,r,A,s);var v=a.ensureSingle(h,"g","slicetext"),_=a.ensureSingle(v,"text","",function(e){e.attr("data-notex",1)}),M=a.ensureUniformFontSize(s,x.determineTextFont(A,r,w.font));_.text(e.formatSliceLabel(r,E,A,c,w)).classed("slicetext",!0).attr("text-anchor","middle").call(n.font,M).call(o.convertToTspans,s);var S=n.bBox(_.node());r.transform=f(S,r,k),r.transform.targetX=Z(r),r.transform.targetY=$(r);var C=function(e,t){var r=e.transform;return d(r,t),r.fontSize=M.size,l(A.type,r,w),a.getTextTransform(r)};T?_.transition().attrTween("transform",function(e){var t=function(e){var t,r=j[x.getPtId(e)],n=e.transform;if(r)t=r;else if(t={rpx1:e.rpx1,transform:{textPosAngle:n.textPosAngle,scale:0,rotate:n.rotate,rCenter:n.rCenter,x:n.x,y:n.y}},F)if(e.parent)if(X){var o=e.x1>X?2*Math.PI:0;t.x0=t.x1=o}else a.extendFlat(t,Q(e));else t.x0=t.x1=q;else t.x0=t.x1=q;var s=i(t.transform.textPosAngle,e.transform.textPosAngle),c=i(t.rpx1,e.rpx1),u=i(t.x0,e.x0),h=i(t.x1,e.x1),d=i(t.transform.scale,n.scale),f=i(t.transform.rotate,n.rotate),p=0===n.rCenter?3:0===t.transform.rCenter?1/3:1,m=i(t.transform.rCenter,n.rCenter);return function(e){var t=c(e),r=u(e),i=h(e),a=m(Math.pow(e,p)),o={pxmid:W(t,(r+i)/2),rpx1:t,transform:{textPosAngle:s(e),rCenter:a,x:n.x,y:n.y}};return l(A.type,n,w),{transform:{targetX:Z(o),targetY:$(o),scale:d(e),rotate:f(e),rCenter:a}}}}(e);return function(e){return C(t(e),S)}}):_.attr("transform",C(r,S))})}function _(e){var t,r;return t=e.rpx1,[t*Math.sin(r=e.transform.textPosAngle),-t*Math.cos(r)]}e.plot=function(e,r,i,n){var a,o,s=e._fullLayout,l=s._sunburstlayer,u=!i,h=!s.uniformtext.mode&&x.hasTransition(i);(c("sunburst",s),(a=l.selectAll("g.trace.sunburst").data(r,function(e){return e[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),a.order(),h)?(n&&(o=n()),t.transition().duration(i.duration).ease(i.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()}).each(function(){l.selectAll("g.trace").each(function(t){b(e,t,this,i)})})):(a.each(function(t){b(e,t,this,i)}),s.uniformtext.mode&&m(e,s._sunburstlayer.selectAll(".trace"),"sunburst")),u&&a.exit().remove()},e.formatSliceLabel=function(e,t,r,i,n){var o=r.texttemplate,s=r.textinfo;if(!o&&(!s||"none"===s))return"";var l=n.separators,c=i[0],u=e.data.data,h=c.hierarchy,d=x.isHierarchyRoot(e),f=x.getParent(h,e),p=x.getValue(e);if(!o){var m,g=s.split("+"),y=function(e){return -1!==g.indexOf(e)},v=[];if(y("label")&&u.label&&v.push(u.label),u.hasOwnProperty("v")&&y("value")&&v.push(x.formatValue(u.v,l)),!d){y("current path")&&v.push(x.getPath(e.data));var b=0;y("percent parent")&&b++,y("percent entry")&&b++,y("percent root")&&b++;var _=b>1;if(b){var w,T=function(e){m=x.formatPercent(w,l),_&&(m+=" of "+e),v.push(m)};y("percent parent")&&!d&&(w=p/x.getValue(f),T("parent")),y("percent entry")&&(w=p/x.getValue(t),T("entry")),y("percent root")&&(w=p/x.getValue(h),T("root"))}}return y("text")&&(m=a.castOption(r,u.i,"text"),a.isValidTextValue(m)&&v.push(m)),v.join("
")}var M=a.castOption(r,u.i,"texttemplate");if(!M)return"";var k={};u.label&&(k.label=u.label),u.hasOwnProperty("v")&&(k.value=u.v,k.valueLabel=x.formatValue(u.v,l)),k.currentPath=x.getPath(e.data),d||(k.percentParent=p/x.getValue(f),k.percentParentLabel=x.formatPercent(k.percentParent,l),k.parent=x.getPtLabel(f)),k.percentEntry=p/x.getValue(t),k.percentEntryLabel=x.formatPercent(k.percentEntry,l),k.entry=x.getPtLabel(t),k.percentRoot=p/x.getValue(h),k.percentRootLabel=x.formatPercent(k.percentRoot,l),k.root=x.getPtLabel(h),u.hasOwnProperty("color")&&(k.color=u.color);var A=a.castOption(r,u.i,"text");return(a.isValidTextValue(A)||""===A)&&(k.text=A),k.customdata=a.castOption(r,u.i,"customdata"),a.texttemplateString({data:[k,r._meta],fallback:r.texttemplatefallback,labels:k,locale:n._d3locale,template:M})}}}),dD=p({"src/traces/sunburst/index.js"(e,t){t.exports={moduleType:"trace",name:"sunburst",basePlotModule:ue(),categories:[],animatable:!0,attributes:ur(),layoutAttributes:ui(),supplyDefaults:un(),supplyLayoutDefaults:ua(),calc:us().calc,crossTraceCalc:us().crossTraceCalc,plot:dz().plot,style:dL().style,colorbar:ne(),meta:{}}}}),dO=p({"lib/sunburst.js"(e,t){t.exports=dD()}}),dR=p({"src/traces/treemap/base_plot.js"(e){var t=tD();e.name="treemap",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),dF=p({"src/traces/treemap/constants.js"(e,t){t.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),dj=p({"src/traces/treemap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=tV(),o=at().attributes,s=cQ(),l=ur(),c=dF(),u=q().extendFlat,h=eH().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:u({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:l.marker.colors,pattern:h,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:l.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:u({},s.textfont,{}),editType:"calc"},text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:c.eventDataKeys.concat(["label","value"])}),texttemplatefallback:n({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:c.eventDataKeys}),hovertemplatefallback:n(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:u({},s.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:s.sort,root:l.root,domain:o({name:"treemap",trace:!0,editType:"calc"})}}}),dB=p({"src/traces/treemap/layout_attributes.js"(e,t){t.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),dN=p({"src/traces/treemap/defaults.js"(e,t){var r=tv(),i=dj(),n=ee(),a=at().defaults,o=aM().handleText,s=i5().TEXTPAD,l=c0().handleMarkerDefaults,c=t3(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,d){function f(n,a){return r.coerce(e,t,i,n,a)}var p=f("labels"),m=f("parents");if(!p||!p.length||!m||!m.length){t.visible=!1;return}var g=f("values");f(g&&g.length?"branchvalues":"count"),f("level"),f("maxdepth"),"squarify"===f("tiling.packing")&&f("tiling.squarifyratio"),f("tiling.flip"),f("tiling.pad");var y=f("text");f("texttemplate"),f("texttemplatefallback"),t.texttemplate||f("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var v=f("pathbar.visible");o(e,t,d,f,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition");var x=-1!==t.textposition.indexOf("bottom");l(e,t,d,f),(t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis)?h(e,t,d,f,{prefix:"marker.",cLetter:"c"}):f("marker.depthfade",!(t.marker.colors||[]).length);var b=2*t.textfont.size;f("marker.pad.t",x?b/4:b),f("marker.pad.l",b/4),f("marker.pad.r",b/4),f("marker.pad.b",x?b:b/4),f("marker.cornerradius"),t._hovered={marker:{line:{width:2,color:n.contrast(d.paper_bgcolor)}}},v&&(f("pathbar.thickness",t.pathbar.textfont.size+2*s),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),a(t,d,f),t._length=null}}}),dU=p({"src/traces/treemap/layout_defaults.js"(e,t){var r=tv(),i=dB();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("treemapcolorway",t.colorway),n("extendtreemapcolors")}}}),dV=p({"src/traces/treemap/calc.js"(e){var t=us();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("treemap",e)}}}),dq=p({"src/traces/treemap/flip_tree.js"(e,t){t.exports=function e(t,r,i){i.swapXY&&(n=t.x0,t.x0=t.y0,t.y0=n,n=t.x1,t.x1=t.y1,t.y1=n),i.flipX&&(n=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-n),i.flipY&&(n=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-n);var n,a=t.children;if(a)for(var o=0;o0)for(var b=0;b").join(" ")||"";var p=i.ensureSingle(d,"g","slicetext"),T=i.ensureSingle(p,"text","",function(e){e.attr("data-notex",1)}),C=i.ensureUniformFontSize(e,c.determineTextFont(L,o,E.font,{onPathbar:!0}));T.text(o._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(n.font,C).call(a.convertToTspans,e),o.textBB=n.bBox(T.node()),o.transform=b(o,{fontSize:C.size,onPathbar:!0}),o.transform.fontSize=C.size,w?T.transition().attrTween("transform",function(e){var t=k(e,!0,A,[m,g]);return function(e){return _(t(e))}}):T.attr("transform",_(o))})}}}),dY=p({"src/traces/treemap/plot_one.js"(e,t){var r=T(),i=(dE(),v(dS)).interpolate,n=dP(),a=tv(),o=i5().TEXTPAD,s=aP().toMoveInsideBar,l=aE().recordMinTextSize,c=dF(),u=dW();function h(e){return n.isHierarchyRoot(e)?"":n.getPtId(e)}t.exports=function(e,t,d,f,p){var m=e._fullLayout,g=t[0],y=g.trace,v="icicle"===y.type,x=g.hierarchy,b=n.findEntryWithLevel(x,y.level),_=r.select(d),w=_.selectAll("g.pathbar"),T=_.selectAll("g.slice");if(!b){w.remove(),T.remove();return}var M=n.isHierarchyRoot(b),k=!m.uniformtext.mode&&n.hasTransition(f),A=n.getMaxDepth(y),S=m._size,E=y.domain,C=S.w*(E.x[1]-E.x[0]),L=S.h*(E.y[1]-E.y[0]),P=y.pathbar.thickness,I=y.marker.line.width+c.gapWithPathbar,z=y.pathbar.visible?y.pathbar.side.indexOf("bottom")>-1?L+I:-(P+I):0,D={x0:C,x1:C,y0:z,y1:z+P},O=function(e,t,r){var i=y.tiling.pad,n=function(e){return e-i<=t.x0},a=function(e){return e+i>=t.x1},o=function(e){return e-i<=t.y0},s=function(e){return e+i>=t.y1};return e.x0===t.x0&&e.x1===t.x1&&e.y0===t.y0&&e.y1===t.y1?{x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1}:{x0:n(e.x0-i)?0:a(e.x0-i)?r[0]:e.x0,x1:n(e.x1+i)?0:a(e.x1+i)?r[0]:e.x1,y0:o(e.y0-i)?0:s(e.y0-i)?r[1]:e.y0,y1:o(e.y1+i)?0:s(e.y1+i)?r[1]:e.y1}},R=null,F={},j={},B=null,N=function(e,t){return t?F[h(e)]:j[h(e)]},U=function(e,t,r,i){if(t)return F[h(x)]||D;var n=j[y.level]||r;return e.data.depth-b.data.depth=(i-=(v?Q:Q.r)-o)){var f,p=(r+i)/2;r=p,i=p}en?n<(f=a-(v?Q:Q.b))&&f"===J?(l.x-=a,c.x-=a,u.x-=a,h.x-=a):"/"===J?(u.x-=a,h.x-=a,o.x-=a/2,s.x-=a/2):"\\"===J?(l.x-=a,c.x-=a,o.x-=a/2,s.x-=a/2):"<"===J&&(o.x-=a,s.x-=a),K(l),K(h),K(o),K(c),K(u),K(s),"M"+(l.x+",")+l.y+"L"+(c.x+",")+c.y+"L"+(s.x+",")+s.y+"L"+(u.x+",")+u.y+"L"+(h.x+",")+h.y+"L"+(o.x+",")+o.y+"Z"},toMoveInsideSlice:ea,makeUpdateSliceInterpolator:el,makeUpdateTextInterpolator:ec,handleSlicesExit:eu,hasTransition:k,strTransform:eh}):w.remove()}}}),dZ=p({"src/traces/treemap/draw.js"(e,t){var r=T(),i=dP(),n=aE().clearMinTextSize,a=aL().resizeText,o=dY();t.exports=function(e,t,s,l,c){var u,h,d=c.type,f=c.drawDescendants,p=e._fullLayout,m=p["_"+d+"layer"],g=!s;(n(d,p),(u=m.selectAll("g.trace."+d).data(t,function(e){return e[0].trace.uid})).enter().append("g").classed("trace",!0).classed(d,!0),u.order(),!p.uniformtext.mode&&i.hasTransition(s))?(l&&(h=l()),r.transition().duration(s.duration).ease(s.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).each(function(){m.selectAll("g.trace").each(function(t){o(e,t,this,s,f)})})):(u.each(function(t){o(e,t,this,s,f)}),p.uniformtext.mode&&a(e,m.selectAll(".trace"),d)),g&&u.exit().remove()}}}),d$=p({"src/traces/treemap/draw_descendants.js"(e,t){var r=T(),i=tv(),n=t9(),a=tF(),o=dH(),s=dG().styleOne,l=dF(),c=dP(),u=dI(),h=dz().formatSliceLabel;t.exports=function(e,t,d,f,p){var m=p.width,g=p.height,y=p.viewX,v=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,M=p.makeUpdateSliceInterpolator,k=p.makeUpdateTextInterpolator,A=p.prevEntry,S=e._context.staticPlot,E=e._fullLayout,C=t[0].trace,L=-1!==C.textposition.indexOf("left"),P=-1!==C.textposition.indexOf("right"),I=-1!==C.textposition.indexOf("bottom"),z=!I&&!C.marker.pad.t||I&&!C.marker.pad.b,D=o(d,[m,g],{packing:C.tiling.packing,squarifyratio:C.tiling.squarifyratio,flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1,pad:{inner:C.tiling.pad,top:C.marker.pad.t,left:C.marker.pad.l,right:C.marker.pad.r,bottom:C.marker.pad.b}}).descendants(),O=1/0,R=-1/0;D.forEach(function(e){var t=e.depth;t>=C._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(O=Math.min(O,t),R=Math.max(R,t))}),f=f.data(D,c.getPtId),C._maxVisibleLayers=isFinite(R)?R-O+1:0,f.enter().append("g").classed("slice",!0),T(f,!1,{},[m,g],x),f.order();var F=null;if(w&&A){var j=c.getPtId(A);f.each(function(e){null===F&&c.getPtId(e)===j&&(F={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})})}var B=function(){return F||{x0:0,x1:m,y0:0,y1:g}},N=f;return w&&(N=N.transition().each("end",function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),N.each(function(o){var f=c.isHeader(o,C);o._x0=y(o.x0),o._x1=y(o.x1),o._y0=v(o.y0),o._y1=v(o.y1),o._hoverX=y(o.x1-C.marker.pad.r),o._hoverY=v(I?o.y1-C.marker.pad.b/2:o.y0+C.marker.pad.t/2);var p=r.select(this),T=i.ensureSingle(p,"path","surface",function(e){e.style("pointer-events",S?"none":"all")});w?T.transition().attrTween("d",function(e){var t=M(e,!1,B(),[m,g]);return function(e){return x(t(e))}}):T.attr("d",x),p.call(u,d,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),T.call(s,o,C,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":f?o._text=z?"":c.getPtLabel(o)||"":o._text=h(o,d,C,t,E)||"";var A=i.ensureSingle(p,"g","slicetext"),D=i.ensureSingle(A,"text","",function(e){e.attr("data-notex",1)}),O=i.ensureUniformFontSize(e,c.determineTextFont(C,o,E.font)),R=o._text||" ",F=f&&-1===R.indexOf("
");D.text(R).classed("slicetext",!0).attr("text-anchor",P?"end":L||F?"start":"middle").call(n.font,O).call(a.convertToTspans,e),o.textBB=n.bBox(D.node()),o.transform=b(o,{fontSize:O.size,isHeader:f}),o.transform.fontSize=O.size,w?D.transition().attrTween("transform",function(e){var t=k(e,!1,B(),[m,g]);return function(e){return _(t(e))}}):D.attr("transform",_(o))}),F}}}),dX=p({"src/traces/treemap/plot.js"(e,t){var r=dZ(),i=d$();t.exports=function(e,t,n,a){return r(e,t,n,a,{type:"treemap",drawDescendants:i})}}}),dK=p({"src/traces/treemap/index.js"(e,t){t.exports={moduleType:"trace",name:"treemap",basePlotModule:dR(),categories:[],animatable:!0,attributes:dj(),layoutAttributes:dB(),supplyDefaults:dN(),supplyLayoutDefaults:dU(),calc:dV().calc,crossTraceCalc:dV().crossTraceCalc,plot:dX(),style:dG().style,colorbar:ne(),meta:{}}}}),dJ=p({"lib/treemap.js"(e,t){t.exports=dK()}}),dQ=p({"src/traces/icicle/base_plot.js"(e){var t=tD();e.name="icicle",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),d0=p({"src/traces/icicle/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=tV(),o=at().attributes,s=cQ(),l=ur(),c=dj(),u=dF(),h=q().extendFlat,d=eH().pattern;t.exports={labels:l.labels,parents:l.parents,values:l.values,branchvalues:l.branchvalues,count:l.count,level:l.level,maxdepth:l.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:c.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:h({colors:l.marker.colors,line:l.marker.line,pattern:d,editType:"calc"},a("marker",{colorAttr:"colors",anim:!1})),leaf:l.leaf,pathbar:c.pathbar,text:s.text,textinfo:l.textinfo,texttemplate:i({editType:"plot"},{keys:u.eventDataKeys.concat(["label","value"])}),texttemplatefallback:n({editType:"plot"}),hovertext:s.hovertext,hoverinfo:l.hoverinfo,hovertemplate:r({},{keys:u.eventDataKeys}),hovertemplatefallback:n(),textfont:s.textfont,insidetextfont:s.insidetextfont,outsidetextfont:c.outsidetextfont,textposition:c.textposition,sort:s.sort,root:l.root,domain:o({name:"icicle",trace:!0,editType:"calc"})}}}),d1=p({"src/traces/icicle/layout_attributes.js"(e,t){t.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),d2=p({"src/traces/icicle/defaults.js"(e,t){var r=tv(),i=d0(),n=ee(),a=at().defaults,o=aM().handleText,s=i5().TEXTPAD,l=c0().handleMarkerDefaults,c=t3(),u=c.hasColorscale,h=c.handleDefaults;t.exports=function(e,t,c,d){function f(n,a){return r.coerce(e,t,i,n,a)}var p=f("labels"),m=f("parents");if(!p||!p.length||!m||!m.length){t.visible=!1;return}var g=f("values");f(g&&g.length?"branchvalues":"count"),f("level"),f("maxdepth"),f("tiling.orientation"),f("tiling.flip"),f("tiling.pad");var y=f("text");f("texttemplate"),f("texttemplatefallback"),t.texttemplate||f("textinfo",r.isArrayOrTypedArray(y)?"text+label":"label"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback");var v=f("pathbar.visible");o(e,t,d,f,"auto",{hasPathbar:v,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),f("textposition"),l(e,t,d,f);var x=t._hasColorscale=u(e,"marker","colors")||(e.marker||{}).coloraxis;x&&h(e,t,d,f,{prefix:"marker.",cLetter:"c"}),f("leaf.opacity",x?1:.7),t._hovered={marker:{line:{width:2,color:n.contrast(d.paper_bgcolor)}}},v&&(f("pathbar.thickness",t.pathbar.textfont.size+2*s),f("pathbar.side"),f("pathbar.edgeshape")),f("sort"),f("root.color"),a(t,d,f),t._length=null}}}),d3=p({"src/traces/icicle/layout_defaults.js"(e,t){var r=tv(),i=d1();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("iciclecolorway",t.colorway),n("extendiciclecolors")}}}),d5=p({"src/traces/icicle/calc.js"(e){var t=us();e.calc=function(e,r){return t.calc(e,r)},e.crossTraceCalc=function(e){return t._runCrossTraceCalc("icicle",e)}}}),d4=p({"src/traces/icicle/partition.js"(e,t){var r=uo(),i=dq();t.exports=function(e,t,n){var a=n.flipX,o=n.flipY,s="h"===n.orientation,l=n.maxDepth,c=t[0],u=t[1];l&&(c=(e.height+1)*t[0]/Math.min(e.height+1,l),u=(e.height+1)*t[1]/Math.min(e.height+1,l));var h=r.partition().padding(n.pad.inner).size(s?[t[1],c]:[t[0],u])(e);return(s||a||o)&&i(h,t,{swapXY:s,flipX:a,flipY:o}),h}}}),d6=p({"src/traces/icicle/style.js"(e,t){var r=T(),i=ee(),n=tv(),a=aE().resizeText,o=dC();function s(e,t,r,a){var s=t.data.data,l=!t.children,c=s.i,u=n.castOption(r,c,"marker.line.color")||i.defaultLine,h=n.castOption(r,c,"marker.line.width")||0;e.call(o,t,r,a).style("stroke-width",h).call(i.stroke,u).style("opacity",l?r.leaf.opacity:null)}t.exports={style:function(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");a(e,t,"icicle"),t.each(function(t){var i=r.select(this),n=t[0].trace;i.style("opacity",n.opacity),i.selectAll("path.surface").each(function(t){r.select(this).call(s,t,n,e)})})},styleOne:s}}}),d8=p({"src/traces/icicle/draw_descendants.js"(e,t){var r=T(),i=tv(),n=t9(),a=tF(),o=d4(),s=d6().styleOne,l=dF(),c=dP(),u=dI(),h=dz().formatSliceLabel;t.exports=function(e,t,d,f,p){var m=p.width,g=p.height,y=p.viewX,v=p.viewY,x=p.pathSlice,b=p.toMoveInsideSlice,_=p.strTransform,w=p.hasTransition,T=p.handleSlicesExit,M=p.makeUpdateSliceInterpolator,k=p.makeUpdateTextInterpolator,A=p.prevEntry,S=e._context.staticPlot,E=e._fullLayout,C=t[0].trace,L=-1!==C.textposition.indexOf("left"),P=-1!==C.textposition.indexOf("right"),I=-1!==C.textposition.indexOf("bottom"),z=o(d,[m,g],{flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1,orientation:C.tiling.orientation,pad:{inner:C.tiling.pad},maxDepth:C._maxDepth}).descendants(),D=1/0,O=-1/0;z.forEach(function(e){var t=e.depth;t>=C._maxDepth?(e.x0=e.x1=(e.x0+e.x1)/2,e.y0=e.y1=(e.y0+e.y1)/2):(D=Math.min(D,t),O=Math.max(O,t))}),f=f.data(z,c.getPtId),C._maxVisibleLayers=isFinite(O)?O-D+1:0,f.enter().append("g").classed("slice",!0),T(f,!1,{},[m,g],x),f.order();var R=null;if(w&&A){var F=c.getPtId(A);f.each(function(e){null===R&&c.getPtId(e)===F&&(R={x0:e.x0,x1:e.x1,y0:e.y0,y1:e.y1})})}var j=function(){return R||{x0:0,x1:m,y0:0,y1:g}},B=f;return w&&(B=B.transition().each("end",function(){var t=r.select(this);c.setSliceCursor(t,e,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),B.each(function(o){o._x0=y(o.x0),o._x1=y(o.x1),o._y0=v(o.y0),o._y1=v(o.y1),o._hoverX=y(o.x1-C.tiling.pad),o._hoverY=v(I?o.y1-C.tiling.pad/2:o.y0+C.tiling.pad/2);var f=r.select(this),p=i.ensureSingle(f,"path","surface",function(e){e.style("pointer-events",S?"none":"all")});w?p.transition().attrTween("d",function(e){var t=M(e,!1,j(),[m,g],{orientation:C.tiling.orientation,flipX:C.tiling.flip.indexOf("x")>-1,flipY:C.tiling.flip.indexOf("y")>-1});return function(e){return x(t(e))}}):p.attr("d",x),f.call(u,d,e,t,{styleOne:s,eventDataKeys:l.eventDataKeys,transitionTime:l.CLICK_TRANSITION_TIME,transitionEasing:l.CLICK_TRANSITION_EASING}).call(c.setSliceCursor,e,{isTransitioning:e._transitioning}),p.call(s,o,C,e,{hovered:!1}),o.x0===o.x1||o.y0===o.y1?o._text="":o._text=h(o,d,C,t,E)||"";var T=i.ensureSingle(f,"g","slicetext"),A=i.ensureSingle(T,"text","",function(e){e.attr("data-notex",1)}),z=i.ensureUniformFontSize(e,c.determineTextFont(C,o,E.font));A.text(o._text||" ").classed("slicetext",!0).attr("text-anchor",P?"end":L?"start":"middle").call(n.font,z).call(a.convertToTspans,e),o.textBB=n.bBox(A.node()),o.transform=b(o,{fontSize:z.size}),o.transform.fontSize=z.size,w?A.transition().attrTween("transform",function(e){var t=k(e,!1,j(),[m,g]);return function(e){return _(t(e))}}):A.attr("transform",_(o))}),R}}}),d7=p({"src/traces/icicle/plot.js"(e,t){var r=dZ(),i=d8();t.exports=function(e,t,n,a){return r(e,t,n,a,{type:"icicle",drawDescendants:i})}}}),d9=p({"src/traces/icicle/index.js"(e,t){t.exports={moduleType:"trace",name:"icicle",basePlotModule:dQ(),categories:[],animatable:!0,attributes:d0(),layoutAttributes:d1(),supplyDefaults:d2(),supplyLayoutDefaults:d3(),calc:d5().calc,crossTraceCalc:d5().crossTraceCalc,plot:d7(),style:d6().style,colorbar:ne(),meta:{}}}}),fe=p({"lib/icicle.js"(e,t){t.exports=d9()}}),ft=p({"src/traces/funnelarea/base_plot.js"(e){var t=tD();e.name="funnelarea",e.plot=function(r,i,n,a){t.plotBasePlot(e.name,r,i,n,a)},e.clean=function(r,i,n,a){t.cleanBasePlot(e.name,r,i,n,a)}}}),fr=p({"src/traces/funnelarea/attributes.js"(e,t){var r=cQ(),i=Z(),n=at().attributes,{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=eW(),l=q().extendFlat;t.exports={labels:r.labels,label0:r.label0,dlabel:r.dlabel,values:r.values,marker:{colors:r.marker.colors,line:{color:l({},r.marker.line.color,{dflt:null}),width:l({},r.marker.line.width,{dflt:1}),editType:"calc"},pattern:r.marker.pattern,editType:"calc"},text:r.text,hovertext:r.hovertext,scalegroup:l({},r.scalegroup,{}),textinfo:l({},r.textinfo,{flags:["label","text","value","percent"]}),texttemplate:o({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:s({editType:"plot"}),hoverinfo:l({},i.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:a({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:s(),textposition:l({},r.textposition,{values:["inside","none"],dflt:"inside"}),textfont:r.textfont,insidetextfont:r.insidetextfont,title:{text:r.title.text,font:r.title.font,position:l({},r.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:n({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"}}}}),fi=p({"src/traces/funnelarea/layout_attributes.js"(e,t){t.exports={hiddenlabels:c1().hiddenlabels,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),fn=p({"src/traces/funnelarea/defaults.js"(e,t){var r=tv(),i=fr(),n=at().defaults,a=aM().handleText,o=c0().handleLabelsAndValues,s=c0().handleMarkerDefaults;t.exports=function(e,t,l,c){function u(n,a){return r.coerce(e,t,i,n,a)}var h,d=o(u("labels"),u("values")),f=d.len;if(t._hasLabels=d.hasLabels,t._hasValues=d.hasValues,!t._hasLabels&&t._hasValues&&(u("label0"),u("dlabel")),!f){t.visible=!1;return}t._length=f,s(e,t,c,u),u("scalegroup");var p=u("text"),m=u("texttemplate");if(u("texttemplatefallback"),m||(h=u("textinfo",Array.isArray(p)?"text+percent":"percent")),u("hovertext"),u("hovertemplate"),u("hovertemplatefallback"),m||h&&"none"!==h){var g=u("textposition");a(e,t,c,u,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else"none"===h&&u("textposition","none");n(t,c,u),u("title.text")&&(u("title.position"),r.coerceFont(u,"title.font",c.font)),u("aspectratio"),u("baseratio")}}}),fa=p({"src/traces/funnelarea/layout_defaults.js"(e,t){var r=tv(),i=fi();t.exports=function(e,t){function n(n,a){return r.coerce(e,t,i,n,a)}n("hiddenlabels"),n("funnelareacolorway",t.colorway),n("extendfunnelareacolors")}}}),fo=p({"src/traces/funnelarea/calc.js"(e,t){var r=c3();t.exports={calc:function(e,t){return r.calc(e,t)},crossTraceCalc:function(e){r.crossTraceCalc(e,{type:"funnelarea"})}}}}),fs=p({"src/traces/funnelarea/plot.js"(e,t){var r=T(),i=t9(),n=tv(),a=n.strScale,o=n.strTranslate,s=tF(),l=aP().toMoveInsideBar,c=aE(),u=c.recordMinTextSize,h=c.clearMinTextSize,d=r_(),f=c4(),p=f.attachFxHandlers,m=f.determineInsideTextFont,g=f.layoutAreas,y=f.prerenderTitles,v=f.positionTitleOutside,x=f.formatSliceLabel;function b(e,t){return"l"+(t[0]-e[0])+","+(t[1]-e[1])}t.exports=function(e,t){var c=e._context.staticPlot,f=e._fullLayout;h("funnelarea",f),y(t,e),g(t,f._size),n.makeTraceGroups(f._funnelarealayer,t,"trace").each(function(t){var h=r.select(this),g=t[0],y=g.trace;(function(e){if(e.length){var t,r,i=e[0],n=i.trace,a=n.aspectratio,o=n.baseratio;o>.999&&(o=.999);var s,l=Math.pow(o,2),c=i.vTotal,u=c*l/(1-l)/c,h=[];for(h.push(S()),t=e.length-1;t>-1;t--)if(!(r=e[t]).hidden){var d=r.v/c;u+=d,h.push(S())}var f=1/0,p=-1/0;for(t=0;t-1;t--)if(!(r=e[t]).hidden){var T,M,k=h[w+=1][0],A=h[w][1];r.TL=[-k,A],r.TR=[k,A],r.BL=b,r.BR=_,r.pxmid=(T=r.TR,M=r.BR,[.5*(T[0]+M[0]),.5*(T[1]+M[1])]),b=r.TL,_=r.TR}}function S(){var e,t={x:e=Math.sqrt(u),y:-e};return[t.x,t.y]}})(t),h.each(function(){var h=r.select(this).selectAll("g.slice").data(t);h.enter().append("g").classed("slice",!0),h.exit().remove(),h.each(function(a,o){if(a.hidden)return void r.select(this).selectAll("path,g").remove();a.pointNumber=a.i,a.curveNumber=y.index;var h=g.cx,v=g.cy,_=r.select(this),w=_.selectAll("path.surface").data([a]);w.enter().append("path").classed("surface",!0).style({"pointer-events":c?"none":"all"}),_.call(p,e,t);var T="M"+(h+a.TR[0])+","+(v+a.TR[1])+b(a.TR,a.BR)+b(a.BR,a.BL)+b(a.BL,a.TL)+"Z";w.attr("d",T),x(e,a,g);var M=d.castOption(y.textposition,a.pts),k=_.selectAll("g.slicetext").data(a.text&&"none"!==M?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each(function(){var c=n.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),d=n.ensureUniformFontSize(e,m(y,a,f.font));c.text(a.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(i.font,d).call(s.convertToTspans,e);var p,g=i.bBox(c.node()),x=Math.min(a.BL[1],a.BR[1])+v,b=Math.max(a.TL[1],a.TR[1])+v;(p=l(Math.max(a.TL[0],a.BL[0])+h,Math.min(a.TR[0],a.BR[0])+h,x,b,g,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=d.size,u(y.type,p,f),t[o].transform=p,n.setTransormAndDisplay(c,p)})});var _=r.select(this).selectAll("g.titletext").data(y.title.text?[0]:[]);_.enter().append("g").classed("titletext",!0),_.exit().remove(),_.each(function(){var t=n.ensureSingle(r.select(this),"text","",function(e){e.attr("data-notex",1)}),l=y.title.text;y._meta&&(l=n.templateString(l,y._meta)),t.text(l).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(i.font,y.title.font).call(s.convertToTspans,e);var c=v(g,f._size);t.attr("transform",o(c.x,c.y)+a(Math.min(1,c.scale))+o(c.tx,c.ty))})})})}}}),fl=p({"src/traces/funnelarea/style.js"(e,t){var r=T(),i=rT(),n=aE().resizeText;t.exports=function(e){var t=e._fullLayout._funnelarealayer.selectAll(".trace");n(e,t,"funnelarea"),t.each(function(t){var n=t[0].trace,a=r.select(this);a.style({opacity:n.opacity}),a.selectAll("path.surface").each(function(t){r.select(this).call(i,t,n,e)})})}}}),fc=p({"src/traces/funnelarea/index.js"(e,t){t.exports={moduleType:"trace",name:"funnelarea",basePlotModule:ft(),categories:["pie-like","funnelarea","showLegend"],attributes:fr(),layoutAttributes:fi(),supplyDefaults:fn(),supplyLayoutDefaults:fa(),calc:fo().calc,crossTraceCalc:fo().crossTraceCalc,plot:fs(),style:fl(),styleOne:rT(),meta:{}}}}),fu=p({"lib/funnelarea.js"(e,t){t.exports=fc()}}),fh=p({"stackgl_modules/index.js"(e,t){var r={1964:function(e,t,r){e.exports={alpha_shape:r(3502),convex_hull:r(7352),delaunay_triangulate:r(7642),gl_cone3d:r(6405),gl_error3d:r(9165),gl_line3d:r(5714),gl_mesh3d:r(7201),gl_plot3d:r(4100),gl_scatter3d:r(8418),gl_streamtube3d:r(7815),gl_surface3d:r(9499),ndarray:r(9618),ndarray_linear_interpolate:r(4317)}},4793:function(e,t,r){var i=r(7507),n=r(3778),a="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,s.prototype),t}function s(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e){var i=e,n=t;if(("string"!=typeof n||""===n)&&(n="utf8"),!s.isEncoding(n))throw TypeError("Unknown encoding: "+n);var a=0|p(i,n),l=o(a),c=l.write(i,n);return c!==a&&(l=l.slice(0,c)),l}if(ArrayBuffer.isView(e)){var u=e;if(C(u,Uint8Array)){var m=new Uint8Array(u);return d(m.buffer,m.byteOffset,m.byteLength)}return h(u)}if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(C(e,ArrayBuffer)||e&&C(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(C(e,SharedArrayBuffer)||e&&C(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var g=e.valueOf&&e.valueOf();if(null!=g&&g!==e)return s.from(g,t,r);var y=function(e){if(s.isBuffer(e)){var t=0|f(e.length),r=o(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(y)return y;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return s.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),o(e<0?0:0|f(e))}function h(e){for(var t=e.length<0?0:0|f(e.length),r=o(t),i=0;i=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(s.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||C(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var r=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return A(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return S(e).length;default:if(n)return i?-1:A(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n,a,o,s=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0)||(r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>i)&&(r=i);for(var n="",a=t;a0x7fffffff?r=0x7fffffff:r<-0x80000000&&(r=-0x80000000),(a=r*=1)!=a&&(r=n?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(n)return -1;r=e.length-1}else if(r<0)if(!n)return -1;else r=0;if("string"==typeof t&&(t=s.from(t,i)),s.isBuffer(t))return 0===t.length?-1:v(e,t,r,i,n);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?n?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,i,n);throw TypeError("val must be string, number or Buffer")}function v(e,t,r,i,n){var a,o=1,s=e.length,l=t.length;if(void 0!==i&&("ucs2"===(i=String(i).toLowerCase())||"ucs-2"===i||"utf16le"===i||"utf-16le"===i)){if(e.length<2||t.length<2)return -1;o=2,s/=2,l/=2,r/=2}function c(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var u=-1;for(a=r;as&&(r=s-l),a=r;a>=0;a--){for(var h=!0,d=0;d239?4:c>223?3:c>191?2:1;if(n+h<=r)switch(h){case 1:c<128&&(u=c);break;case 2:(192&(a=e[n+1]))==128&&(l=(31&c)<<6|63&a)>127&&(u=l);break;case 3:a=e[n+1],o=e[n+2],(192&a)==128&&(192&o)==128&&(l=(15&c)<<12|(63&a)<<6|63&o)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:a=e[n+1],o=e[n+2],s=e[n+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&(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,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u),n+=h}var d=i,f=d.length;if(f<=4096)return String.fromCharCode.apply(String,d);for(var p="",m=0;mr)throw RangeError("Trying to access beyond buffer length")}function _(e,t,r,i,n,a){if(!s.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||te.length)throw RangeError("Index out of range")}function w(e,t,r,i,n,a){if(r+i>e.length||r<0)throw RangeError("Index out of range")}function T(e,t,r,i,a){return t*=1,r>>>=0,a||w(e,t,r,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,r,i,23,4),r+4}function M(e,t,r,i,a){return t*=1,r>>>=0,a||w(e,t,r,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,r,i,52,8),r+8}t.hp=s,t.IS=50,s.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch{return!1}}(),!s.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(s.prototype,"parent",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.buffer}}),Object.defineProperty(s.prototype,"offset",{enumerable:!0,get:function(){if(s.isBuffer(this))return this.byteOffset}}),s.poolSize=8192,s.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(s.prototype,Uint8Array.prototype),Object.setPrototypeOf(s,Uint8Array),s.alloc=function(e,t,r){return c(e),e<=0?o(e):void 0!==t?"string"==typeof r?o(e).fill(t,r):o(e).fill(t):o(e)},s.allocUnsafe=function(e){return u(e)},s.allocUnsafeSlow=function(e){return u(e)},s.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==s.prototype},s.compare=function(e,t){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),C(t,Uint8Array)&&(t=s.from(t,t.offset,t.byteLength)),!s.isBuffer(e)||!s.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var r=e.length,i=t.length,n=0,a=Math.min(r,i);ni.length?s.from(a).copy(i,n):Uint8Array.prototype.set.call(i,a,n);else if(s.isBuffer(a))a.copy(i,n);else throw TypeError('"list" argument must be an Array of Buffers');n+=a.length}return i},s.byteLength=p,s.prototype._isBuffer=!0,s.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;tr&&(e+=" ... "),""},a&&(s.prototype[a]=s.prototype.inspect),s.prototype.compare=function(e,t,r,i,n){if(C(e,Uint8Array)&&(e=s.from(e,e.offset,e.byteLength)),!s.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===i&&(i=0),void 0===n&&(n=this.length),t<0||r>e.length||i<0||n>this.length)throw RangeError("out of range index");if(i>=n&&t>=r)return 0;if(i>=n)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,i>>>=0,n>>>=0,this===e)return 0;for(var a=n-i,o=r-t,l=Math.min(a,o),c=this.slice(i,n),u=e.slice(t,r),h=0;h>>=0,isFinite(r)?(r>>>=0,void 0===i&&(i="utf8")):(i=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n,a,o,s,l,c,u,h,d=this.length-t;if((void 0===r||r>d)&&(r=d),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");i||(i="utf8");for(var f=!1;;)switch(i){case"hex":return function(e,t,r,i){r=Number(r)||0;var n=e.length-r;i?(i=Number(i))>n&&(i=n):i=n;var a=t.length;i>a/2&&(i=a/2);for(var o=0;o>8,n.push(r%256),n.push(i);return n}(e,this.length-u),this,u,h);default:if(f)throw TypeError("Unknown encoding: "+i);i=(""+i).toLowerCase(),f=!0}},s.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},s.prototype.slice=function(e,t){var r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e],n=1,a=0;++a>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e+--t],n=1;t>0&&(n*=256);)i+=this[e+--t]*n;return i},s.prototype.readUint8=s.prototype.readUInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),this[e]},s.prototype.readUint16LE=s.prototype.readUInt16LE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]|this[e+1]<<8},s.prototype.readUint16BE=s.prototype.readUInt16BE=function(e,t){return e>>>=0,t||b(e,2,this.length),this[e]<<8|this[e+1]},s.prototype.readUint32LE=s.prototype.readUInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},s.prototype.readUint32BE=s.prototype.readUInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},s.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var i=this[e],n=1,a=0;++a=(n*=128)&&(i-=Math.pow(2,8*t)),i},s.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||b(e,t,this.length);for(var i=t,n=1,a=this[e+--i];i>0&&(n*=256);)a+=this[e+--i]*n;return a>=(n*=128)&&(a-=Math.pow(2,8*t)),a},s.prototype.readInt8=function(e,t){return e>>>=0,t||b(e,1,this.length),128&this[e]?-((255-this[e]+1)*1):this[e]},s.prototype.readInt16LE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt16BE=function(e,t){e>>>=0,t||b(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?0xffff0000|r:r},s.prototype.readInt32LE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},s.prototype.readInt32BE=function(e,t){return e>>>=0,t||b(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},s.prototype.readFloatLE=function(e,t){return e>>>=0,t||b(e,4,this.length),n.read(this,e,!0,23,4)},s.prototype.readFloatBE=function(e,t){return e>>>=0,t||b(e,4,this.length),n.read(this,e,!1,23,4)},s.prototype.readDoubleLE=function(e,t){return e>>>=0,t||b(e,8,this.length),n.read(this,e,!0,52,8)},s.prototype.readDoubleBE=function(e,t){return e>>>=0,t||b(e,8,this.length),n.read(this,e,!1,52,8)},s.prototype.writeUintLE=s.prototype.writeUIntLE=function(e,t,r,i){if(e*=1,t>>>=0,r>>>=0,!i){var n=Math.pow(2,8*r)-1;_(this,e,t,r,n,0)}var a=1,o=0;for(this[t]=255&e;++o>>=0,r>>>=0,!i){var n=Math.pow(2,8*r)-1;_(this,e,t,r,n,0)}var a=r-1,o=1;for(this[t+a]=255&e;--a>=0&&(o*=256);)this[t+a]=e/o&255;return t+r},s.prototype.writeUint8=s.prototype.writeUInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,255,0),this[t]=255&e,t+1},s.prototype.writeUint16LE=s.prototype.writeUInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeUint16BE=s.prototype.writeUInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeUint32LE=s.prototype.writeUInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},s.prototype.writeUint32BE=s.prototype.writeUInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeIntLE=function(e,t,r,i){if(e*=1,t>>>=0,!i){var n=Math.pow(2,8*r-1);_(this,e,t,r,n-1,-n)}var a=0,o=1,s=0;for(this[t]=255&e;++a>>=0,!i){var n=Math.pow(2,8*r-1);_(this,e,t,r,n-1,-n)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o|0)-s&255;return t+r},s.prototype.writeInt8=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},s.prototype.writeInt16LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},s.prototype.writeInt16BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},s.prototype.writeInt32LE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},s.prototype.writeInt32BE=function(e,t,r){return e*=1,t>>>=0,r||_(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},s.prototype.writeFloatLE=function(e,t,r){return T(this,e,t,!0,r)},s.prototype.writeFloatBE=function(e,t,r){return T(this,e,t,!1,r)},s.prototype.writeDoubleLE=function(e,t,r){return M(this,e,t,!0,r)},s.prototype.writeDoubleBE=function(e,t,r){return M(this,e,t,!1,r)},s.prototype.copy=function(e,t,r,i){if(!s.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),i||0===i||(i=this.length),t>=e.length&&(t=e.length),t||(t=0),i>0&&i=this.length)throw RangeError("Index out of range");if(i<0)throw RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-t>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(n=t;n55295&&r<57344){if(!n){if(r>56319||o+1===i){(t-=3)>-1&&a.push(239,191,189);continue}n=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),n=r;continue}r=(n-55296<<10|r-56320)+65536}else n&&(t-=3)>-1&&a.push(239,191,189);if(n=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return a}function S(e){return i.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(k,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function E(e,t,r,i){for(var n=0;n=t.length||n>=e.length);++n)t[n+r]=e[n];return n}function C(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var L=function(){for(var e="0123456789abcdef",t=Array(256),r=0;r<16;++r)for(var i=16*r,n=0;n<16;++n)t[i+n]=e[r]+e[n];return t}()},9216:function(e){e.exports=n,e.exports.isMobile=n,e.exports.default=n;let t=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,i=/android|ipad|playbook|silk/i;function n(e){e||(e={});let n=e.ua;if(!n&&"u">typeof navigator&&(n=navigator.userAgent),n&&n.headers&&"string"==typeof n.headers["user-agent"]&&(n=n.headers["user-agent"]),"string"!=typeof n)return!1;let a=t.test(n)&&!r.test(n)||!!e.tablet&&i.test(n);return!a&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==n.indexOf("Macintosh")&&-1!==n.indexOf("Safari")&&(a=!0),a}},6296:function(e,t,r){e.exports=function(e){var t=(e=e||{}).eye||[0,0,1],r=e.center||[0,0,0],s=e.up||[0,1,0],l=e.distanceLimits||[0,1/0],c=e.mode||"turntable",u=i(),h=n(),d=a();return u.setDistanceLimits(l[0],l[1]),u.lookAt(0,t,r,s),h.setDistanceLimits(l[0],l[1]),h.lookAt(0,t,r,s),d.setDistanceLimits(l[0],l[1]),d.lookAt(0,t,r,s),new o({turntable:u,orbit:h,matrix:d},c)};var i=r(7261),n=r(9977),a=r(1811);function o(e,t){this._controllerNames=Object.keys(e),this._controllerList=this._controllerNames.map(function(t){return e[t]}),this._mode=t,this._active=e[t],this._active||(this._mode="turntable",this._active=e.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;s.flush=function(e){for(var t=this._controllerList,r=0;r"u"?r(1538):WeakMap,n=r(2762),a=r(8116),o=new i;e.exports=function(e){var t=o.get(e),r=t&&(t._triangleBuffer.handle||t._triangleBuffer.buffer);if(!r||!e.isBuffer(r)){var i=n(e,new Float32Array([-1,-1,-1,4,4,-1]));(t=a(e,[{buffer:i,type:e.FLOAT,size:2}]))._triangleBuffer=i,o.set(e,t)}t.bind(),e.drawArrays(e.TRIANGLES,0,3),t.unbind()}},1085:function(e,t,r){var i=r(1371);e.exports=function(e,t,r){t="number"==typeof t?t:1,r=r||": ";var n=e.split(/\r?\n/),a=String(n.length+t-1).length;return n.map(function(e,n){var o=n+t,s=String(o).length;return i(o,a-s)+r+e}).join(` +`)}},3952:function(e,t,r){e.exports=function(e){var t=e.length;if(0===t)return[];if(1===t)return[0];for(var r=e[0].length,n=[e[0]],a=[0],o=1;o0?o-4:o;for(r=0;r>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===s&&(t=i[e.charCodeAt(r)]<<2|i[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===s&&(t=i[e.charCodeAt(r)]<<10|i[e.charCodeAt(r+1)]<<4|i[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,i=e.length,n=i%3,a=[],o=0,s=i-n;o>18&63]+r[n>>12&63]+r[n>>6&63]+r[63&n]);return a.join("")}(e,o,o+16383>s?s:o+16383));return 1===n?a.push(r[(t=e[i-1])>>2]+r[t<<4&63]+"=="):2===n&&a.push(r[(t=(e[i-2]<<8)+e[i-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),a.join("")};for(var r=[],i=[],n="u">typeof Uint8Array?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,s=a.length;o0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var i=r===t?0:4-r%4;return[r,i]}i[45]=62,i[95]=63},3865:function(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[1]).add(t[0].mul(e[1])),e[1].mul(t[1]))}},1318:function(e){e.exports=function(e,t){return e[0].mul(t[1]).cmp(t[0].mul(e[1]))}},8697:function(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[1]),e[1].mul(t[0]))}},7842:function(e,t,r){var i=r(6330),n=r(1533),a=r(2651),o=r(6768),s=r(869),l=r(8697);e.exports=function e(t,r){if(i(t))return r?l(t,e(r)):[t[0].clone(),t[1].clone()];var c,u,h=0;if(n(t))c=t.clone();else if("string"==typeof t)c=o(t);else{if(0===t)return[a(0),a(1)];if(t===Math.floor(t))c=a(t);else{for(;t!==Math.floor(t);)t*=1157920892373162e62,h-=256;c=a(t)}}if(i(r))c.mul(r[1]),u=r[0].clone();else if(n(r))u=r.clone();else if("string"==typeof r)u=o(r);else if(r)if(r===Math.floor(r))u=a(r);else{for(;r!==Math.floor(r);)r*=1157920892373162e62,h+=256;u=a(r)}else u=a(1);return h>0?c=c.ushln(h):h<0&&(u=u.ushln(-h)),s(c,u)}},6330:function(e,t,r){var i=r(1533);e.exports=function(e){return Array.isArray(e)&&2===e.length&&i(e[0])&&i(e[1])}},5716:function(e,t,r){var i=r(6859);e.exports=function(e){return e.cmp(new i(0))}},1369:function(e,t,r){var i=r(5716);e.exports=function(e){var t=e.length,r=e.words,n=0;if(1===t)n=r[0];else if(2===t)n=r[0]+0x4000000*r[1];else for(var a=0;a20?52:r+32}},1533:function(e,t,r){r(6859),e.exports=function(e){return e&&"object"==typeof e&&!!e.words}},2651:function(e,t,r){var i=r(6859),n=r(2361);e.exports=function(e){var t=n.exponent(e);return t<52?new i(e):new i(e*Math.pow(2,52-t)).ushln(t-52)}},869:function(e,t,r){var i=r(2651),n=r(5716);e.exports=function(e,t){var r=n(e),a=n(t);if(0===r)return[i(0),i(1)];if(0===a)return[i(0),i(0)];a<0&&(e=e.neg(),t=t.neg());var o=e.gcd(t);return o.cmpn(1)?[e.div(o),t.div(o)]:[e,t]}},6768:function(e,t,r){var i=r(6859);e.exports=function(e){return new i(e)}},6504:function(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[0]),e[1].mul(t[1]))}},7721:function(e,t,r){var i=r(5716);e.exports=function(e){return i(e[0])*i(e[1])}},5572:function(e,t,r){var i=r(869);e.exports=function(e,t){return i(e[0].mul(t[1]).sub(e[1].mul(t[0])),e[1].mul(t[1]))}},946:function(e,t,r){var i=r(1369),n=r(4025);e.exports=function(e){var t=e[0],r=e[1];if(0===t.cmpn(0))return 0;var a=t.abs().divmod(r.abs()),o=i(a.div),s=a.mod,l=t.negative!==r.negative?-1:1;if(0===s.cmpn(0))return l*o;if(o){var c=n(o)+4,u=i(s.ushln(c).divRound(r));return l*(o+u*Math.pow(2,-c))}var h=r.bitLength()-s.bitLength()+53,u=i(s.ushln(h).divRound(r));return h<1023?l*u*Math.pow(2,-h):l*(u*=11125369292536007e-324)*Math.pow(2,1023-h)}},2478:function(e){function t(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,n=o-1):i=o+1}return a}function r(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,n=o-1):i=o+1}return a}function i(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,i=o+1):n=o-1}return a}function n(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,i=o+1):n=o-1}return a}function a(e,t,r,i,n){for(;i<=n;){var a=i+n>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?i=a+1:n=a-1}return -1}function o(e,t,r,i,n,a){return"function"==typeof r?a(e,t,r,void 0===i?0:0|i,void 0===n?e.length-1:0|n):a(e,t,void 0,void 0===r?0:0|r,void 0===i?e.length-1:0|i)}e.exports={ge:function(e,r,i,n,a){return o(e,r,i,n,a,t)},gt:function(e,t,i,n,a){return o(e,t,i,n,a,r)},lt:function(e,t,r,n,a){return o(e,t,r,n,a,i)},le:function(e,t,r,i,a){return o(e,t,r,i,a,n)},eq:function(e,t,r,i,n){return o(e,t,r,i,n,a)}}},8828:function(e,t){function r(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),0xff00ff&e&&(t-=8),0xf0f0f0f&e&&(t-=4),0x33333333&e&&(t-=2),0x55555555&e&&(t-=1),t}t.INT_BITS=32,t.INT_MAX=0x7fffffff,t.INT_MIN=-0x80000000,t.sign=function(e){return(e>0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},t.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var i=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;e[t]=i<>>8&255]<<16|i[e>>>16&255]<<8|i[e>>>24&255]},t.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},t.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},t.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},t.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},6859:function(e,t,r){!function(e,t){function i(e,t){if(!e)throw Error(t||"Assertion failed")}function n(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function a(e,t,r){if(a.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&(("le"===t||"be"===t)&&(r=t,t=10),this._init(e||0,t||10,r||"be"))}"object"==typeof e?e.exports=a:t.BN=a,a.BN=a,a.wordSize=26;try{c="u">typeof window&&"u">typeof window.Buffer?window.Buffer:r(7790).Buffer}catch{}function o(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function s(e,t,r){var i=o(e,r);return r-1>=t&&(i|=o(e,r-1)<<4),i}function l(e,t,r,i){for(var n=0,a=Math.min(e.length,r),o=t;o=49?n+=s-49+10:s>=17?n+=s-17+10:n+=s}return n}a.isBN=function(e){return e instanceof a||null!==e&&"object"==typeof e&&e.constructor.wordSize===a.wordSize&&Array.isArray(e.words)},a.max=function(e,t){return e.cmp(t)>0?e:t},a.min=function(e,t){return 0>e.cmp(t)?e:t},a.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),i(t===(0|t)&&t>=2&&t<=36);var n=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(n++,this.negative=1),n=0;n-=3)o=e[n]|e[n-1]<<8|e[n-2]<<16,this.words[a]|=o<>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,a++);else if("le"===r)for(n=0,a=0;n>>26-s&0x3ffffff,(s+=24)>=26&&(s-=26,a++);return this.strip()},a.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=Array(this.length);for(var i=0;i=t;i-=2)n=s(e,t,i)<=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;else for(i=(e.length-t)%2==0?t+1:t;i=18?(a-=18,o+=1,this.words[o]|=n>>>26):a+=8;this.strip()},a.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var i=0,n=1;n<=0x3ffffff;n*=t)i++;i--,n=n/t|0;for(var a=e.length-r,o=a%i,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,u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],h=[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],d=[0,0,0x2000000,0x290d741,0x1000000,0x2e90edd,0x39aa400,0x267bf47,0x1000000,0x290d741,1e7,0x12959c3,0x222c000,0x3bd7765,7529536,0xadcea1,0x1000000,0x1704f61,0x206fc40,0x2cddcf9,64e6,4084101,5153632,6436343,7962624,9765625,0xb54ba0,0xdaf26b,0x1069c00,0x138f9ad,243e5,0x1b4d89f,0x2000000,0x25528a1,0x2b54a20,0x3216b93,0x39aa400];function f(e,t,r){r.negative=t.negative^e.negative;var i=e.length+t.length|0;r.length=i,i=i-1|0;var n=0|e.words[0],a=0|t.words[0],o=n*a,s=0x3ffffff&o,l=o/0x4000000|0;r.words[0]=s;for(var c=1;c>>26,h=0x3ffffff&l,d=Math.min(c,t.length-1),f=Math.max(0,c-e.length+1);f<=d;f++){var p=c-f|0;u+=(o=(n=0|e.words[p])*(a=0|t.words[f])+h)/0x4000000|0,h=0x3ffffff&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(e,t){if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var r,n=0,a=0,o=0;o>>24-n&0xffffff,(n+=2)>=26&&(n-=26,o--),r=0!==a||o!==this.length-1?u[6-l.length]+l+r:l+r}for(0!==a&&(r=a.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=h[e],f=d[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var m=p.modn(f).toString(e);r=(p=p.idivn(f)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}i(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=0x4000000*this.words[1]:3===this.length&&1===this.words[2]?e+=0x10000000000000+0x4000000*this.words[1]:this.length>2&&i(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(e,t){return i("u">typeof c),this.toArrayLike(c,e,t)},a.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},a.prototype.toArrayLike=function(e,t,r){var n=this.byteLength(),a=r||Math.max(1,n);i(n<=a,"byte array longer than desired length"),i(a>0,"Requested array length <= 0"),this.strip();var o,s,l=new e(a),c=this.clone();if("le"===t){for(s=0;!c.isZero();s++)o=c.andln(255),c.iushrn(8),l[s]=o;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},a.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},a.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return(this.length-1)*26+t},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},a.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},a.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},a.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},a.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var i=0;ie.length?this.clone().ixor(e):e.clone().ixor(this)},a.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},a.prototype.inotn=function(e){i("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var n=0;n0&&(this.words[n]=~this.words[n]&0x3ffffff>>26-r),this.strip()},a.prototype.notn=function(e){return this.clone().inotn(e)},a.prototype.setn=function(e,t){i("number"==typeof e&&e>=0);var r=e/26|0,n=e%26;return this._expand(r+1),t?this.words[r]=this.words[r]|1<e.length?(r=this,i=e):(r=e,i=this);for(var t,r,i,n=0,a=0;a>>26;for(;0!==n&&a>>26;if(this.length=r.length,0!==n)this.words[this.length]=n,this.length++;else if(r!==this)for(;ae.length?this.clone().iadd(e):e.clone().iadd(this)},a.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t,r,i=this.iadd(e);return e.negative=1,i._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var n=this.cmp(e);if(0===n)return this.negative=0,this.length=1,this.words[0]=0,this;n>0?(t=this,r=e):(t=e,r=this);for(var a=0,o=0;o>26,this.words[o]=0x3ffffff&i;for(;0!==a&&o>26,this.words[o]=0x3ffffff&i;if(0===a&&o>>13,f=0|o[1],p=8191&f,m=f>>>13,g=0|o[2],y=8191&g,v=g>>>13,x=0|o[3],b=8191&x,_=x>>>13,w=0|o[4],T=8191&w,M=w>>>13,k=0|o[5],A=8191&k,S=k>>>13,E=0|o[6],C=8191&E,L=E>>>13,P=0|o[7],I=8191&P,z=P>>>13,D=0|o[8],O=8191&D,R=D>>>13,F=0|o[9],j=8191&F,B=F>>>13,N=0|s[0],U=8191&N,V=N>>>13,q=0|s[1],H=8191&q,G=q>>>13,W=0|s[2],Y=8191&W,Z=W>>>13,$=0|s[3],X=8191&$,K=$>>>13,J=0|s[4],Q=8191&J,ee=J>>>13,et=0|s[5],er=8191&et,ei=et>>>13,en=0|s[6],ea=8191&en,eo=en>>>13,es=0|s[7],el=8191&es,ec=es>>>13,eu=0|s[8],eh=8191&eu,ed=eu>>>13,ef=0|s[9],ep=8191&ef,em=ef>>>13;r.negative=e.negative^t.negative,r.length=19,i=Math.imul(h,U),n=(n=Math.imul(h,V))+Math.imul(d,U)|0,a=Math.imul(d,V);var eg=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eg>>>26)|0,eg&=0x3ffffff,i=Math.imul(p,U),n=(n=Math.imul(p,V))+Math.imul(m,U)|0,a=Math.imul(m,V),i=i+Math.imul(h,H)|0,n=(n=n+Math.imul(h,G)|0)+Math.imul(d,H)|0,a=a+Math.imul(d,G)|0;var ey=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ey>>>26)|0,ey&=0x3ffffff,i=Math.imul(y,U),n=(n=Math.imul(y,V))+Math.imul(v,U)|0,a=Math.imul(v,V),i=i+Math.imul(p,H)|0,n=(n=n+Math.imul(p,G)|0)+Math.imul(m,H)|0,a=a+Math.imul(m,G)|0,i=i+Math.imul(h,Y)|0,n=(n=n+Math.imul(h,Z)|0)+Math.imul(d,Y)|0,a=a+Math.imul(d,Z)|0;var ev=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ev>>>26)|0,ev&=0x3ffffff,i=Math.imul(b,U),n=(n=Math.imul(b,V))+Math.imul(_,U)|0,a=Math.imul(_,V),i=i+Math.imul(y,H)|0,n=(n=n+Math.imul(y,G)|0)+Math.imul(v,H)|0,a=a+Math.imul(v,G)|0,i=i+Math.imul(p,Y)|0,n=(n=n+Math.imul(p,Z)|0)+Math.imul(m,Y)|0,a=a+Math.imul(m,Z)|0,i=i+Math.imul(h,X)|0,n=(n=n+Math.imul(h,K)|0)+Math.imul(d,X)|0,a=a+Math.imul(d,K)|0;var ex=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ex>>>26)|0,ex&=0x3ffffff,i=Math.imul(T,U),n=(n=Math.imul(T,V))+Math.imul(M,U)|0,a=Math.imul(M,V),i=i+Math.imul(b,H)|0,n=(n=n+Math.imul(b,G)|0)+Math.imul(_,H)|0,a=a+Math.imul(_,G)|0,i=i+Math.imul(y,Y)|0,n=(n=n+Math.imul(y,Z)|0)+Math.imul(v,Y)|0,a=a+Math.imul(v,Z)|0,i=i+Math.imul(p,X)|0,n=(n=n+Math.imul(p,K)|0)+Math.imul(m,X)|0,a=a+Math.imul(m,K)|0,i=i+Math.imul(h,Q)|0,n=(n=n+Math.imul(h,ee)|0)+Math.imul(d,Q)|0,a=a+Math.imul(d,ee)|0;var eb=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eb>>>26)|0,eb&=0x3ffffff,i=Math.imul(A,U),n=(n=Math.imul(A,V))+Math.imul(S,U)|0,a=Math.imul(S,V),i=i+Math.imul(T,H)|0,n=(n=n+Math.imul(T,G)|0)+Math.imul(M,H)|0,a=a+Math.imul(M,G)|0,i=i+Math.imul(b,Y)|0,n=(n=n+Math.imul(b,Z)|0)+Math.imul(_,Y)|0,a=a+Math.imul(_,Z)|0,i=i+Math.imul(y,X)|0,n=(n=n+Math.imul(y,K)|0)+Math.imul(v,X)|0,a=a+Math.imul(v,K)|0,i=i+Math.imul(p,Q)|0,n=(n=n+Math.imul(p,ee)|0)+Math.imul(m,Q)|0,a=a+Math.imul(m,ee)|0,i=i+Math.imul(h,er)|0,n=(n=n+Math.imul(h,ei)|0)+Math.imul(d,er)|0,a=a+Math.imul(d,ei)|0;var e_=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(e_>>>26)|0,e_&=0x3ffffff,i=Math.imul(C,U),n=(n=Math.imul(C,V))+Math.imul(L,U)|0,a=Math.imul(L,V),i=i+Math.imul(A,H)|0,n=(n=n+Math.imul(A,G)|0)+Math.imul(S,H)|0,a=a+Math.imul(S,G)|0,i=i+Math.imul(T,Y)|0,n=(n=n+Math.imul(T,Z)|0)+Math.imul(M,Y)|0,a=a+Math.imul(M,Z)|0,i=i+Math.imul(b,X)|0,n=(n=n+Math.imul(b,K)|0)+Math.imul(_,X)|0,a=a+Math.imul(_,K)|0,i=i+Math.imul(y,Q)|0,n=(n=n+Math.imul(y,ee)|0)+Math.imul(v,Q)|0,a=a+Math.imul(v,ee)|0,i=i+Math.imul(p,er)|0,n=(n=n+Math.imul(p,ei)|0)+Math.imul(m,er)|0,a=a+Math.imul(m,ei)|0,i=i+Math.imul(h,ea)|0,n=(n=n+Math.imul(h,eo)|0)+Math.imul(d,ea)|0,a=a+Math.imul(d,eo)|0;var ew=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ew>>>26)|0,ew&=0x3ffffff,i=Math.imul(I,U),n=(n=Math.imul(I,V))+Math.imul(z,U)|0,a=Math.imul(z,V),i=i+Math.imul(C,H)|0,n=(n=n+Math.imul(C,G)|0)+Math.imul(L,H)|0,a=a+Math.imul(L,G)|0,i=i+Math.imul(A,Y)|0,n=(n=n+Math.imul(A,Z)|0)+Math.imul(S,Y)|0,a=a+Math.imul(S,Z)|0,i=i+Math.imul(T,X)|0,n=(n=n+Math.imul(T,K)|0)+Math.imul(M,X)|0,a=a+Math.imul(M,K)|0,i=i+Math.imul(b,Q)|0,n=(n=n+Math.imul(b,ee)|0)+Math.imul(_,Q)|0,a=a+Math.imul(_,ee)|0,i=i+Math.imul(y,er)|0,n=(n=n+Math.imul(y,ei)|0)+Math.imul(v,er)|0,a=a+Math.imul(v,ei)|0,i=i+Math.imul(p,ea)|0,n=(n=n+Math.imul(p,eo)|0)+Math.imul(m,ea)|0,a=a+Math.imul(m,eo)|0,i=i+Math.imul(h,el)|0,n=(n=n+Math.imul(h,ec)|0)+Math.imul(d,el)|0,a=a+Math.imul(d,ec)|0;var eT=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eT>>>26)|0,eT&=0x3ffffff,i=Math.imul(O,U),n=(n=Math.imul(O,V))+Math.imul(R,U)|0,a=Math.imul(R,V),i=i+Math.imul(I,H)|0,n=(n=n+Math.imul(I,G)|0)+Math.imul(z,H)|0,a=a+Math.imul(z,G)|0,i=i+Math.imul(C,Y)|0,n=(n=n+Math.imul(C,Z)|0)+Math.imul(L,Y)|0,a=a+Math.imul(L,Z)|0,i=i+Math.imul(A,X)|0,n=(n=n+Math.imul(A,K)|0)+Math.imul(S,X)|0,a=a+Math.imul(S,K)|0,i=i+Math.imul(T,Q)|0,n=(n=n+Math.imul(T,ee)|0)+Math.imul(M,Q)|0,a=a+Math.imul(M,ee)|0,i=i+Math.imul(b,er)|0,n=(n=n+Math.imul(b,ei)|0)+Math.imul(_,er)|0,a=a+Math.imul(_,ei)|0,i=i+Math.imul(y,ea)|0,n=(n=n+Math.imul(y,eo)|0)+Math.imul(v,ea)|0,a=a+Math.imul(v,eo)|0,i=i+Math.imul(p,el)|0,n=(n=n+Math.imul(p,ec)|0)+Math.imul(m,el)|0,a=a+Math.imul(m,ec)|0,i=i+Math.imul(h,eh)|0,n=(n=n+Math.imul(h,ed)|0)+Math.imul(d,eh)|0,a=a+Math.imul(d,ed)|0;var eM=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eM>>>26)|0,eM&=0x3ffffff,i=Math.imul(j,U),n=(n=Math.imul(j,V))+Math.imul(B,U)|0,a=Math.imul(B,V),i=i+Math.imul(O,H)|0,n=(n=n+Math.imul(O,G)|0)+Math.imul(R,H)|0,a=a+Math.imul(R,G)|0,i=i+Math.imul(I,Y)|0,n=(n=n+Math.imul(I,Z)|0)+Math.imul(z,Y)|0,a=a+Math.imul(z,Z)|0,i=i+Math.imul(C,X)|0,n=(n=n+Math.imul(C,K)|0)+Math.imul(L,X)|0,a=a+Math.imul(L,K)|0,i=i+Math.imul(A,Q)|0,n=(n=n+Math.imul(A,ee)|0)+Math.imul(S,Q)|0,a=a+Math.imul(S,ee)|0,i=i+Math.imul(T,er)|0,n=(n=n+Math.imul(T,ei)|0)+Math.imul(M,er)|0,a=a+Math.imul(M,ei)|0,i=i+Math.imul(b,ea)|0,n=(n=n+Math.imul(b,eo)|0)+Math.imul(_,ea)|0,a=a+Math.imul(_,eo)|0,i=i+Math.imul(y,el)|0,n=(n=n+Math.imul(y,ec)|0)+Math.imul(v,el)|0,a=a+Math.imul(v,ec)|0,i=i+Math.imul(p,eh)|0,n=(n=n+Math.imul(p,ed)|0)+Math.imul(m,eh)|0,a=a+Math.imul(m,ed)|0,i=i+Math.imul(h,ep)|0,n=(n=n+Math.imul(h,em)|0)+Math.imul(d,ep)|0,a=a+Math.imul(d,em)|0;var ek=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ek>>>26)|0,ek&=0x3ffffff,i=Math.imul(j,H),n=(n=Math.imul(j,G))+Math.imul(B,H)|0,a=Math.imul(B,G),i=i+Math.imul(O,Y)|0,n=(n=n+Math.imul(O,Z)|0)+Math.imul(R,Y)|0,a=a+Math.imul(R,Z)|0,i=i+Math.imul(I,X)|0,n=(n=n+Math.imul(I,K)|0)+Math.imul(z,X)|0,a=a+Math.imul(z,K)|0,i=i+Math.imul(C,Q)|0,n=(n=n+Math.imul(C,ee)|0)+Math.imul(L,Q)|0,a=a+Math.imul(L,ee)|0,i=i+Math.imul(A,er)|0,n=(n=n+Math.imul(A,ei)|0)+Math.imul(S,er)|0,a=a+Math.imul(S,ei)|0,i=i+Math.imul(T,ea)|0,n=(n=n+Math.imul(T,eo)|0)+Math.imul(M,ea)|0,a=a+Math.imul(M,eo)|0,i=i+Math.imul(b,el)|0,n=(n=n+Math.imul(b,ec)|0)+Math.imul(_,el)|0,a=a+Math.imul(_,ec)|0,i=i+Math.imul(y,eh)|0,n=(n=n+Math.imul(y,ed)|0)+Math.imul(v,eh)|0,a=a+Math.imul(v,ed)|0,i=i+Math.imul(p,ep)|0,n=(n=n+Math.imul(p,em)|0)+Math.imul(m,ep)|0,a=a+Math.imul(m,em)|0;var eA=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eA>>>26)|0,eA&=0x3ffffff,i=Math.imul(j,Y),n=(n=Math.imul(j,Z))+Math.imul(B,Y)|0,a=Math.imul(B,Z),i=i+Math.imul(O,X)|0,n=(n=n+Math.imul(O,K)|0)+Math.imul(R,X)|0,a=a+Math.imul(R,K)|0,i=i+Math.imul(I,Q)|0,n=(n=n+Math.imul(I,ee)|0)+Math.imul(z,Q)|0,a=a+Math.imul(z,ee)|0,i=i+Math.imul(C,er)|0,n=(n=n+Math.imul(C,ei)|0)+Math.imul(L,er)|0,a=a+Math.imul(L,ei)|0,i=i+Math.imul(A,ea)|0,n=(n=n+Math.imul(A,eo)|0)+Math.imul(S,ea)|0,a=a+Math.imul(S,eo)|0,i=i+Math.imul(T,el)|0,n=(n=n+Math.imul(T,ec)|0)+Math.imul(M,el)|0,a=a+Math.imul(M,ec)|0,i=i+Math.imul(b,eh)|0,n=(n=n+Math.imul(b,ed)|0)+Math.imul(_,eh)|0,a=a+Math.imul(_,ed)|0,i=i+Math.imul(y,ep)|0,n=(n=n+Math.imul(y,em)|0)+Math.imul(v,ep)|0,a=a+Math.imul(v,em)|0;var eS=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eS>>>26)|0,eS&=0x3ffffff,i=Math.imul(j,X),n=(n=Math.imul(j,K))+Math.imul(B,X)|0,a=Math.imul(B,K),i=i+Math.imul(O,Q)|0,n=(n=n+Math.imul(O,ee)|0)+Math.imul(R,Q)|0,a=a+Math.imul(R,ee)|0,i=i+Math.imul(I,er)|0,n=(n=n+Math.imul(I,ei)|0)+Math.imul(z,er)|0,a=a+Math.imul(z,ei)|0,i=i+Math.imul(C,ea)|0,n=(n=n+Math.imul(C,eo)|0)+Math.imul(L,ea)|0,a=a+Math.imul(L,eo)|0,i=i+Math.imul(A,el)|0,n=(n=n+Math.imul(A,ec)|0)+Math.imul(S,el)|0,a=a+Math.imul(S,ec)|0,i=i+Math.imul(T,eh)|0,n=(n=n+Math.imul(T,ed)|0)+Math.imul(M,eh)|0,a=a+Math.imul(M,ed)|0,i=i+Math.imul(b,ep)|0,n=(n=n+Math.imul(b,em)|0)+Math.imul(_,ep)|0,a=a+Math.imul(_,em)|0;var eE=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eE>>>26)|0,eE&=0x3ffffff,i=Math.imul(j,Q),n=(n=Math.imul(j,ee))+Math.imul(B,Q)|0,a=Math.imul(B,ee),i=i+Math.imul(O,er)|0,n=(n=n+Math.imul(O,ei)|0)+Math.imul(R,er)|0,a=a+Math.imul(R,ei)|0,i=i+Math.imul(I,ea)|0,n=(n=n+Math.imul(I,eo)|0)+Math.imul(z,ea)|0,a=a+Math.imul(z,eo)|0,i=i+Math.imul(C,el)|0,n=(n=n+Math.imul(C,ec)|0)+Math.imul(L,el)|0,a=a+Math.imul(L,ec)|0,i=i+Math.imul(A,eh)|0,n=(n=n+Math.imul(A,ed)|0)+Math.imul(S,eh)|0,a=a+Math.imul(S,ed)|0,i=i+Math.imul(T,ep)|0,n=(n=n+Math.imul(T,em)|0)+Math.imul(M,ep)|0,a=a+Math.imul(M,em)|0;var eC=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eC>>>26)|0,eC&=0x3ffffff,i=Math.imul(j,er),n=(n=Math.imul(j,ei))+Math.imul(B,er)|0,a=Math.imul(B,ei),i=i+Math.imul(O,ea)|0,n=(n=n+Math.imul(O,eo)|0)+Math.imul(R,ea)|0,a=a+Math.imul(R,eo)|0,i=i+Math.imul(I,el)|0,n=(n=n+Math.imul(I,ec)|0)+Math.imul(z,el)|0,a=a+Math.imul(z,ec)|0,i=i+Math.imul(C,eh)|0,n=(n=n+Math.imul(C,ed)|0)+Math.imul(L,eh)|0,a=a+Math.imul(L,ed)|0,i=i+Math.imul(A,ep)|0,n=(n=n+Math.imul(A,em)|0)+Math.imul(S,ep)|0,a=a+Math.imul(S,em)|0;var eL=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eL>>>26)|0,eL&=0x3ffffff,i=Math.imul(j,ea),n=(n=Math.imul(j,eo))+Math.imul(B,ea)|0,a=Math.imul(B,eo),i=i+Math.imul(O,el)|0,n=(n=n+Math.imul(O,ec)|0)+Math.imul(R,el)|0,a=a+Math.imul(R,ec)|0,i=i+Math.imul(I,eh)|0,n=(n=n+Math.imul(I,ed)|0)+Math.imul(z,eh)|0,a=a+Math.imul(z,ed)|0,i=i+Math.imul(C,ep)|0,n=(n=n+Math.imul(C,em)|0)+Math.imul(L,ep)|0,a=a+Math.imul(L,em)|0;var eP=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eP>>>26)|0,eP&=0x3ffffff,i=Math.imul(j,el),n=(n=Math.imul(j,ec))+Math.imul(B,el)|0,a=Math.imul(B,ec),i=i+Math.imul(O,eh)|0,n=(n=n+Math.imul(O,ed)|0)+Math.imul(R,eh)|0,a=a+Math.imul(R,ed)|0,i=i+Math.imul(I,ep)|0,n=(n=n+Math.imul(I,em)|0)+Math.imul(z,ep)|0,a=a+Math.imul(z,em)|0;var eI=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(eI>>>26)|0,eI&=0x3ffffff,i=Math.imul(j,eh),n=(n=Math.imul(j,ed))+Math.imul(B,eh)|0,a=Math.imul(B,ed),i=i+Math.imul(O,ep)|0,n=(n=n+Math.imul(O,em)|0)+Math.imul(R,ep)|0,a=a+Math.imul(R,em)|0;var ez=(c+i|0)+((8191&n)<<13)|0;c=(a+(n>>>13)|0)+(ez>>>26)|0,ez&=0x3ffffff,i=Math.imul(j,ep),n=(n=Math.imul(j,em))+Math.imul(B,ep)|0,a=Math.imul(B,em);var eD=(c+i|0)+((8191&n)<<13)|0;return c=(a+(n>>>13)|0)+(eD>>>26)|0,eD&=0x3ffffff,l[0]=eg,l[1]=ey,l[2]=ev,l[3]=ex,l[4]=eb,l[5]=e_,l[6]=ew,l[7]=eT,l[8]=eM,l[9]=ek,l[10]=eA,l[11]=eS,l[12]=eE,l[13]=eC,l[14]=eL,l[15]=eP,l[16]=eI,l[17]=ez,l[18]=eD,0!==c&&(l[19]=c,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(p=f),a.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?p(this,e,t):r<63?f(this,e,t):r<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var i=0,n=0,a=0;a>>26)|0)>>>26,o&=0x3ffffff}r.words[a]=s,i=o,o=n}return 0!==i?r.words[a]=i:r.length--,r.strip()}(this,e,t):m(this,e,t)},g.prototype.makeRBT=function(e){for(var t=Array(e),r=a.prototype._countBits(e)-1,i=0;i>=1;return i},g.prototype.permute=function(e,t,r,i,n,a){for(var o=0;o>>=1)n++;return 1<>>=13,r[2*o+1]=8191&a,a>>>=13;for(o=2*t;o>=26,t+=(n/0x4000000|0)+(a>>>26),this.words[r]=0x3ffffff&a}return 0!==t&&(this.words[r]=t,this.length++),this.length=0===e?1:this.length,this},a.prototype.muln=function(e){return this.clone().imuln(e)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(e){var t=function(e){for(var t=Array(e.bitLength()),r=0;r>>n}return t}(e);if(0===t.length)return new a(1);for(var r=this,i=0;i=0);var t,r=e%26,n=(e-r)/26,a=0x3ffffff>>>26-r<<26-r;if(0!==r){var o=0;for(t=0;t>>26-r}o&&(this.words[t]=o,this.length++)}if(0!==n){for(t=this.length-1;t>=0;t--)this.words[t+n]=this.words[t];for(t=0;t=0);var n=t?(t-t%26)/26:0,a=e%26,o=Math.min((e-a)/26,this.length),s=0x3ffffff^0x3ffffff>>>a<o)for(this.length-=o,l=0;l=0&&(0!==c||l>=n);l--){var u=0|this.words[l];this.words[l]=c<<26-a|u>>>a,c=u&s}return r&&0!==c&&(r.words[r.length++]=c),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(e,t,r){return i(0===this.negative),this.iushrn(e,t,r)},a.prototype.shln=function(e){return this.clone().ishln(e)},a.prototype.ushln=function(e){return this.clone().iushln(e)},a.prototype.shrn=function(e){return this.clone().ishrn(e)},a.prototype.ushrn=function(e){return this.clone().iushrn(e)},a.prototype.testn=function(e){i("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;return!(this.length<=r)&&!!(this.words[r]&1<=0);var t=e%26,r=(e-t)/26;return(i(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)?this:(0!==t&&r++,this.length=Math.min(r,this.length),0!==t&&(this.words[this.length-1]&=0x3ffffff^0x3ffffff>>>t<=0x4000000;t++)this.words[t]-=0x4000000,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},a.prototype.isubn=function(e){if(i("number"==typeof e),i(e<0x4000000),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/0x4000000|0),this.words[n+r]=0x3ffffff&o}for(;n>26,this.words[n+r]=0x3ffffff&o;if(0===s)return this.strip();for(i(-1===s),s=0,n=0;n>26,this.words[n]=0x3ffffff&o;return this.negative=1,this.strip()},a.prototype._wordDiv=function(e,t){var r=this.length-e.length,i=this.clone(),n=e,o=0|n.words[n.length-1];0!=(r=26-this._countBits(o))&&(n=n.ushln(r),i.iushln(r),o=0|n.words[n.length-1]);var s,l=i.length-n.length;if("mod"!==t){(s=new a(null)).length=l+1,s.words=Array(s.length);for(var c=0;c=0;h--){var d=(0|i.words[n.length+h])*0x4000000+(0|i.words[n.length+h-1]);for(d=Math.min(d/o|0,0x3ffffff),i._ishlnsubmul(n,d,h);0!==i.negative;)d--,i.negative=0,i._ishlnsubmul(n,1,h),i.isZero()||(i.negative^=1);s&&(s.words[h]=d)}return s&&s.strip(),i.strip(),"div"!==t&&0!==r&&i.iushrn(r),{div:s||null,mod:i}},a.prototype.divmod=function(e,t,r){var n,o,s;return(i(!e.isZero()),this.isZero())?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(n=s.div.neg()),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.iadd(e)),{div:n,mod:o}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(n=s.div.neg()),{div:n,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(o=s.mod.neg(),r&&0!==o.negative&&o.isub(e)),{div:s.div,mod:o}):e.length>this.length||0>this.cmp(e)?{div:new a(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new a(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new a(this.modn(e.words[0]))}:this._wordDiv(e,t)},a.prototype.div=function(e){return this.divmod(e,"div",!1).div},a.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},a.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},a.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,i=e.ushrn(1),n=e.andln(1),a=r.cmp(i);return a<0||1===n&&0===a?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},a.prototype.modn=function(e){i(e<=0x3ffffff);for(var t=0x4000000%e,r=0,n=this.length-1;n>=0;n--)r=(t*r+(0|this.words[n]))%e;return r},a.prototype.idivn=function(e){i(e<=0x3ffffff);for(var t=0,r=this.length-1;r>=0;r--){var n=(0|this.words[r])+0x4000000*t;this.words[r]=n/e|0,t=n%e}return this.strip()},a.prototype.divn=function(e){return this.clone().idivn(e)},a.prototype.egcd=function(e){i(0===e.negative),i(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var n=new a(1),o=new a(0),s=new a(0),l=new a(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),h=t.clone();!t.isZero();){for(var d=0,f=1;!(t.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(t.iushrn(d);d-- >0;)(n.isOdd()||o.isOdd())&&(n.iadd(u),o.isub(h)),n.iushrn(1),o.iushrn(1);for(var p=0,m=1;!(r.words[0]&m)&&p<26;++p,m<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(h)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),n.isub(s),o.isub(l)):(r.isub(t),s.isub(n),l.isub(o))}return{a:s,b:l,gcd:r.iushln(c)}},a.prototype._invmp=function(e){i(0===e.negative),i(!e.isZero());var t,r=this,n=e.clone();r=0!==r.negative?r.umod(e):r.clone();for(var o=new a(1),s=new a(0),l=n.clone();r.cmpn(1)>0&&n.cmpn(1)>0;){for(var c=0,u=1;!(r.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(r.iushrn(c);c-- >0;)o.isOdd()&&o.iadd(l),o.iushrn(1);for(var h=0,d=1;!(n.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(n.iushrn(h);h-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);r.cmp(n)>=0?(r.isub(n),o.isub(s)):(n.isub(r),s.isub(o))}return 0>(t=0===r.cmpn(1)?o:s).cmpn(0)&&t.iadd(e),t},a.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var i=0;t.isEven()&&r.isEven();i++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var n=t.cmp(r);if(n<0){var a=t;t=r,r=a}else if(0===n||0===r.cmpn(1))break;t.isub(r)}return r.iushln(i)},a.prototype.invm=function(e){return this.egcd(e).a.umod(e)},a.prototype.isEven=function(){return(1&this.words[0])==0},a.prototype.isOdd=function(){return(1&this.words[0])==1},a.prototype.andln=function(e){return this.words[0]&e},a.prototype.bincn=function(e){i("number"==typeof e);var t=e%26,r=(e-t)/26,n=1<>>26,s&=0x3ffffff,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(e){var t,r=e<0;if(0!==this.negative&&!r)return -1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),i(e<=0x3ffffff,"Number is too big");var n=0|this.words[0];t=n===e?0:ne.length)return 1;if(this.length=0;r--){var i=0|this.words[r],n=0|e.words[r];if(i!==n){in&&(t=1);break}}return t},a.prototype.gtn=function(e){return 1===this.cmpn(e)},a.prototype.gt=function(e){return 1===this.cmp(e)},a.prototype.gten=function(e){return this.cmpn(e)>=0},a.prototype.gte=function(e){return this.cmp(e)>=0},a.prototype.ltn=function(e){return -1===this.cmpn(e)},a.prototype.lt=function(e){return -1===this.cmp(e)},a.prototype.lten=function(e){return 0>=this.cmpn(e)},a.prototype.lte=function(e){return 0>=this.cmp(e)},a.prototype.eqn=function(e){return 0===this.cmpn(e)},a.prototype.eq=function(e){return 0===this.cmp(e)},a.red=function(e){return new T(e)},a.prototype.toRed=function(e){return i(!this.red,"Already a number in reduction context"),i(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},a.prototype.fromRed=function(){return i(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(e){return this.red=e,this},a.prototype.forceRed=function(e){return i(!this.red,"Already a number in reduction context"),this._forceRed(e)},a.prototype.redAdd=function(e){return i(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},a.prototype.redIAdd=function(e){return i(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},a.prototype.redSub=function(e){return i(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},a.prototype.redISub=function(e){return i(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},a.prototype.redShl=function(e){return i(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},a.prototype.redMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},a.prototype.redIMul=function(e){return i(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},a.prototype.redSqr=function(){return i(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},a.prototype.redISqr=function(){return i(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},a.prototype.redSqrt=function(){return i(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},a.prototype.redInvm=function(){return i(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},a.prototype.redNeg=function(){return i(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},a.prototype.redPow=function(e){return i(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new a(t,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function x(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function b(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function _(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function w(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function T(e){if("string"==typeof e){var t=a._prime(e);this.m=t.p,this.prime=t}else i(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function M(e){T.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new a(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new a(null);return e.words=Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength();while(t>this.n);var i=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},n(x,v),x.prototype.split=function(e,t){for(var r=Math.min(e.length,9),i=0;i>>22,n=a}n>>>=22,e.words[i-10]=n,0===n&&e.length>10?e.length-=10:e.length-=9},x.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=n,t=i}return 0!==t&&(e.words[e.length++]=t),e},a._prime=function(e){var t;if(y[e])return y[e];if("k256"===e)t=new x;else if("p224"===e)t=new b;else if("p192"===e)t=new _;else if("p25519"===e)t=new w;else throw Error("Unknown prime "+e);return y[e]=t,t},T.prototype._verify1=function(e){i(0===e.negative,"red works only with positives"),i(e.red,"red works only with red numbers")},T.prototype._verify2=function(e,t){i((e.negative|t.negative)==0,"red works only with positives"),i(e.red&&e.red===t.red,"red works only with red numbers")},T.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},T.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},T.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},T.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},T.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r._forceRed(this)},T.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return 0>r.cmpn(0)&&r.iadd(this.m),r},T.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},T.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},T.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},T.prototype.isqr=function(e){return this.imul(e,e.clone())},T.prototype.sqr=function(e){return this.mul(e,e)},T.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(i(t%2==1),3===t){var r=this.m.add(new a(1)).iushrn(2);return this.pow(e,r)}for(var n=this.m.subn(1),o=0;!n.isZero()&&0===n.andln(1);)o++,n.iushrn(1);i(!n.isZero());var s=new a(1).toRed(this),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,n),d=this.pow(e,n.addn(1).iushrn(1)),f=this.pow(e,n),p=o;0!==f.cmp(s);){for(var m=f,g=0;0!==m.cmp(s);g++)m=m.redSqr();i(g=0;i--){for(var c=t.words[i],u=l-1;u>=0;u--){var h=c>>u&1;if(n!==r[0]&&(n=this.sqr(n)),0===h&&0===o){s=0;continue}o<<=1,o|=h,(4==++s||0===i&&0===u)&&(n=this.mul(n,r[o]),s=0,o=0)}l=26}return n},T.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},T.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},a.mont=function(e){return new M(e)},n(M,T),M.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},M.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},M.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),a=n;return n.cmp(this.m)>=0?a=n.isub(this.m):0>n.cmpn(0)&&(a=n.iadd(this.m)),a._forceRed(this)},M.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new a(0)._forceRed(this);var r=e.mul(t),i=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),n=r.isub(i).iushrn(this.shift),o=n;return n.cmp(this.m)>=0?o=n.isub(this.m):0>n.cmpn(0)&&(o=n.iadd(this.m)),o._forceRed(this)},M.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},6204:function(e){e.exports=function(e){var t,r,i,n=e.length,a=0;for(t=0;t>>1;if(!(u<=0)){var h,d=n.mallocDouble(2*u*l),f=n.mallocInt32(l);if((l=s(e,u,d,f))>0){if(1===u&&i)a.init(l),h=a.sweepComplete(u,r,0,l,d,f,0,l,d,f);else{var p=n.mallocDouble(2*u*c),m=n.mallocInt32(c);(c=s(t,u,p,m))>0&&(a.init(l+c),h=1===u?a.sweepBipartite(u,r,0,l,d,f,0,c,p,m):o(u,r,i,l,d,f,c,p,m),n.free(p),n.free(m))}n.free(d),n.free(f)}return h}}}function c(e,t){i.push([e,t])}},2455:function(e,t){function r(e){return e?function(e,t,r,i,n,a,o,s,l,c,u){return n-i>l-s?function(e,t,r,i,n,a,o,s,l,c,u){for(var h=2*e,d=i,f=h*i;dc-l?i?function(e,t,r,i,n,a,o,s,l,c,u){for(var h=2*e,d=i,f=h*i;d0;){var P=6*(C-=1),I=y[P],z=y[P+1],D=y[P+2],O=y[P+3],R=y[P+4],F=y[P+5],j=2*C,B=v[j],N=v[j+1],U=1&F,V=!!(16&F),q=u,H=b,G=w,W=T;if(U&&(q=w,H=T,G=u,W=b),!(2&F&&(D=f(e,I,z,D,q,H,N),z>=D))&&!(4&F&&(z=p(e,I,z,D,q,H,B))>=D)){var Y=D-z,Z=R-O;if(V){if(e*Y*(Y+Z)<4194304){if(void 0!==(E=l.scanComplete(e,I,t,z,D,q,H,O,R,G,W)))return E;continue}}else if(e*Math.min(Y,Z)<128){if(void 0!==(E=o(e,I,t,U,z,D,q,H,O,R,G,W)))return E;continue}else if(e*Y*Z<4194304){if(void 0!==(E=l.scanBipartite(e,I,t,U,z,D,q,H,O,R,G,W)))return E;continue}var $=h(e,I,z,D,q,H,B,N);if(z<$)if(e*($-z)<128){if(void 0!==(E=s(e,I+1,t,z,$,q,H,O,R,G,W)))return E}else if(I===e-2){if(void 0!==(E=U?l.sweepBipartite(e,t,O,R,G,W,z,$,q,H):l.sweepBipartite(e,t,z,$,q,H,O,R,G,W)))return E}else x(C++,I+1,z,$,O,R,U,-1/0,1/0),x(C++,I+1,O,R,z,$,1^U,-1/0,1/0);if($=p0)&&!(p1>=hi)"),d=u("lo===p0"),f=u("lo>>1,u=2*e,h=c,d=a[u*c+t];sr&&n[h+t]>c;--u,h-=o){for(var d=h,f=h+o,p=0;p=y?(h=g,d=y):m>=x?(h=p,d=m):(h=v,d=x):y>=x?(h=g,d=y):x>=m?(h=p,d=m):(h=v,d=x);for(var b=u*(l-1),_=u*h,w=0;wh;++h,l+=s)if(n[l+t]===o)if(u===h)u+=1,c+=s;else{for(var d=0;s>d;++d){var f=n[l+d];n[l+d]=n[c],n[c++]=f}var p=a[h];a[h]=a[u],a[u++]=p}return u},"loh;++h,l+=s)if(n[l+t]d;++d){var f=n[l+d];n[l+d]=n[c],n[c++]=f}var p=a[h];a[h]=a[u],a[u++]=p}return u},"lo<=p0":function(e,t,r,i,n,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,d=r;i>d;++d,l+=s)if(n[l+h]<=o)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=n[l+f];n[l+f]=n[c],n[c++]=p}var m=a[d];a[d]=a[u],a[u++]=m}return u},"hi<=p0":function(e,t,r,i,n,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,d=r;i>d;++d,l+=s)if(n[l+h]<=o)if(u===d)u+=1,c+=s;else{for(var f=0;s>f;++f){var p=n[l+f];n[l+f]=n[c],n[c++]=p}var m=a[d];a[d]=a[u],a[u++]=m}return u},"lod;++d,l+=s){var f=n[l+t],p=n[l+h];if(fm;++m){var g=n[l+m];n[l+m]=n[c],n[c++]=g}var y=a[d];a[d]=a[u],a[u++]=y}}return u},"lo<=p0&&p0<=hi":function(e,t,r,i,n,a,o){for(var s=2*e,l=s*r,c=l,u=r,h=e+t,d=r;i>d;++d,l+=s){var f=n[l+t],p=n[l+h];if(f<=o&&o<=p)if(u===d)u+=1,c+=s;else{for(var m=0;s>m;++m){var g=n[l+m];n[l+m]=n[c],n[c++]=g}var y=a[d];a[d]=a[u],a[u++]=y}}return u},"!(lo>=p0)&&!(p1>=hi)":function(e,t,r,i,n,a,o,s){for(var l=2*e,c=l*r,u=c,h=r,d=e+t,f=r;i>f;++f,c+=l){var p=n[c+t],m=n[c+d];if(!(p>=o)&&!(s>=m))if(h===f)h+=1,u+=l;else{for(var g=0;l>g;++g){var y=n[c+g];n[c+g]=n[u],n[u++]=y}var v=a[f];a[f]=a[h],a[h++]=v}}return h}}},4192:function(e){function t(e,t,r){for(var i=2*(e+1),n=e+1;n<=t;++n){for(var a=r[i++],o=r[i++],s=n,l=i-2;s-- >e;){var c=r[l-2],u=r[l-1];if(cr[t+1])}function o(e,t,r,i){var n=i[e*=2];return n>1,p=f-u,m=f+u,g=h,y=p,v=f,x=m,b=d,_=s+1,w=l-1,T=0;a(g,y,c)&&(T=g,g=y,y=T),a(x,b,c)&&(T=x,x=b,b=T),a(g,v,c)&&(T=g,g=v,v=T),a(y,v,c)&&(T=y,y=v,v=T),a(g,x,c)&&(T=g,g=x,x=T),a(v,x,c)&&(T=v,v=x,x=T),a(y,b,c)&&(T=y,y=b,b=T),a(y,v,c)&&(T=y,y=v,v=T),a(x,b,c)&&(T=x,x=b,b=T);for(var M=c[2*y],k=c[2*y+1],A=c[2*x],S=c[2*x+1],E=2*g,C=2*v,L=2*b,P=2*h,I=2*f,z=2*d,D=0;D<2;++D){var O=c[E+D],R=c[C+D],F=c[L+D];c[P+D]=O,c[I+D]=R,c[z+D]=F}i(p,s,c),i(m,l,c);for(var j=_;j<=w;++j)if(o(j,M,k,c))j!==_&&r(j,_,c),++_;else if(!o(j,A,S,c))for(;;)if(o(w,A,S,c)){o(w,M,k,c)?(function(e,t,r,i){e*=2,t*=2,r*=2;var n=i[e],a=i[e+1];i[e]=i[t],i[e+1]=i[t+1],i[t]=i[r],i[t+1]=i[r+1],i[r]=n,i[r+1]=a}(j,_,w,c),++_):r(j,w,c),--w;break}else{if(--w>>1;a(d,A);for(var S=0,E=0,w=0;w=0x10000000)C=C-0x10000000|0,f(l,c,E--,C);else if(C>=0)f(o,s,S--,C);else if(C<=-0x10000000){C=-C-0x10000000|0;for(var L=0;L>>1;a(d,E);for(var C=0,L=0,P=0,M=0;M>1==d[2*M+3]>>1&&(z=2,M+=1),I<0){for(var D=-(I>>1)-1,O=0;O>1)-1;0===z?f(o,s,C--,D):1===z?f(l,c,L--,D):2===z&&f(u,h,P--,D)}}},scanBipartite:function(e,t,r,i,n,l,c,u,h,m,g,y){var v=0,x=2*e,b=t+e,_=1,w=1;i?w=0x10000000:_=0x10000000;for(var T=n;T>>1;a(d,S);for(var E=0,T=0;T=0x10000000?(L=!i,M-=0x10000000):(L=!!i,M-=1),L)p(o,s,E++,M);else{var P=y[M],I=x*M,z=g[I+t+1],D=g[I+t+1+e];e:for(var O=0;O>>1;a(d,_);for(var w=0,y=0;y<_;++y){var T=0|d[2*y+1];if(T<0){var v=-T;if(v>=0x10000000)o[w++]=v-0x10000000;else{var M=f[v-=1],k=m*v,A=h[k+t+1],S=h[k+t+1+e];e:for(var E=0;E=0;--E)if(o[E]===v){for(var I=E+1;Ii(e[n],e[a],e[o],e[s])&&r.push(n,a)}}r(2478),e.exports=function(e,t){for(var r=[],a=e.length,o=t.stars,s=0;si(e[s],e[u],e[h],e[d])&&r.push(s,u)}}for(;r.length>0;){for(var u=r.pop(),s=r.pop(),h=-1,d=-1,l=o[s],p=1;p=0||(t.flip(s,u),n(e,t,r,h,s,d),n(e,t,r,s,d,h),n(e,t,r,d,u,h),n(e,t,r,u,h,d))}}},5023:function(e,t,r){var i,n=r(2478);function a(e,t,r,i,n,a,o){this.cells=e,this.neighbor=t,this.flags=i,this.constraint=r,this.active=n,this.next=a,this.boundary=o}function o(e,t){return e[0]-t[0]||e[1]-t[1]||e[2]-t[2]}e.exports=function(e,t,r){var i=function(e,t){for(var r=e.cells(),i=r.length,n=0;n0||l.length>0;){for(;s.length>0;){var f=s.pop();if(c[f]!==-n){c[f]=n,u[f];for(var p=0;p<3;++p){var m=d[3*f+p];m>=0&&0===c[m]&&(h[3*f+p]?l.push(m):(s.push(m),c[m]=n))}}}var g=l;l=s,s=g,l.length=0,n=-n}var y=function(e,t,r){for(var i=0,n=0;nm[0]&&h.push(new o(m,p,2,d),new o(p,m,1,d))}h.sort(s);for(var g=h[0].a[0]-(1+Math.abs(h[0].a[0]))*2220446049250313e-31,y=[new a([g,1],[g,0],-1,[],[],[],[])],v=[],d=0,x=h.length;d1&&n(r[d[f-2]],r[d[f-1]],a)>0;)e.push([d[f-1],d[f-2],o]),f-=1;d.length=f,d.push(o);for(var p=h.upperIds,f=p.length;f>1&&0>n(r[p[f-2]],r[p[f-1]],a);)e.push([p[f-2],p[f-1],o]),f-=1;p.length=f,p.push(o)}}(v,y,e,b.a,b.idx):2===_?function(e,t){var r=i.le(e,t,c),n=e[r],o=n.upperIds,s=o[o.length-1];n.upperIds=[s],e.splice(r+1,0,new a(t.a,t.b,t.idx,[s],o))}(y,b):function(e,t){var r=t.a;t.a=t.b,t.b=r;var n=i.eq(e,t,c),a=e[n];e[n-1].upperIds=a.upperIds,e.splice(n,1)}(y,b)}return v}},5542:function(e,t,r){var i=r(2478);function n(e,t){this.stars=e,this.edges=t}e.exports=function(e,t){for(var r=Array(e),i=0;i=0}}(),a.removeTriangle=function(e,t,r){var i=this.stars;o(i[e],t,r),o(i[t],r,e),o(i[r],e,t)},a.addTriangle=function(e,t,r){var i=this.stars;i[e].push(t,r),i[t].push(r,e),i[r].push(e,t)},a.opposite=function(e,t){for(var r=this.stars[t],i=1,n=r.length;i=0;--a){var x=i[a],b=t[u=x[0]],_=b[0],w=b[1],T=e[_],M=e[w];if(0>(T[0]-M[0]||T[1]-M[1])){var k=_;_=w,w=k}b[0]=_;var A,S=b[1]=x[1];for(n&&(A=b[2]);a>0&&i[a-1][0]===u;){var x=i[--a],E=x[1];n?t.push([S,E,A]):t.push([S,E]),S=E}n?t.push([S,w,A]):t.push([S,w])}return d}(e,v,T,k=_,x),y(v,S=p(e,A,M),x),S||T.length>0||k.length>0;)P=!0;if(r&&P){i.length=0,r.length=0;for(var C=0;Ct[2]))}function y(e,t,r){if(0!==e.length){if(t)for(var i=0;if+1)throw Error(h+" map requires nshades to be at least size "+u.length);m=Array.isArray(e.alpha)?2!==e.alpha.length?[1,1]:e.alpha.slice():"number"==typeof e.alpha?[e.alpha,e.alpha]:[1,1],t=u.map(function(e){return Math.round(e.index*f)}),m[0]=Math.min(Math.max(m[0],0),1),m[1]=Math.min(Math.max(m[1],0),1);var t,r,l,c,u,h,d,f,p,m,g,y=u.map(function(e,t){var r=u[t].index,i=u[t].rgb.slice();return 4===i.length&&i[3]>=0&&i[3]<=1||(i[3]=m[0]+(m[1]-m[0])*r),i}),p=[];for(g=0;g0||l(e,t,a)?-1:1:0===s?c>0||l(e,t,r)?1:-1:n(c-s)}var h=i(e,t,r);return h>0?o>0&&i(e,t,a)>0?1:-1:h<0?o>0||i(e,t,a)>0?1:-1:i(e,t,a)>0||l(e,t,r)?1:-1};var i=r(3250),n=r(8572),a=r(9362),o=r(5382),s=r(8210);function l(e,t,r){var i=a(e[0],-t[0]),n=a(e[1],-t[1]),l=a(r[0],-t[0]),c=a(r[1],-t[1]),u=s(o(i,l),o(n,c));return u[u.length-1]>=0}},8572:function(e){e.exports=function(e){return e<0?-1:+(e>0)}},8507:function(e){e.exports=function(e,i){var n=e.length,a=e.length-i.length;if(a)return a;switch(n){case 0:return 0;case 1:return e[0]-i[0];case 2:return e[0]+e[1]-i[0]-i[1]||t(e[0],e[1])-t(i[0],i[1]);case 3:var o=e[0]+e[1],s=i[0]+i[1];if(a=o+e[2]-(s+i[2]))return a;var l=t(e[0],e[1]),c=t(i[0],i[1]);return t(l,e[2])-t(c,i[2])||t(l+e[2],o)-t(c+i[2],s);case 4:var u=e[0],h=e[1],d=e[2],f=e[3],p=i[0],m=i[1],g=i[2],y=i[3];return u+h+d+f-(p+m+g+y)||t(u,h,d,f)-t(p,m,g,y,p)||t(u+h,u+d,u+f,h+d,h+f,d+f)-t(p+m,p+g,p+y,m+g,m+y,g+y)||t(u+h+d,u+h+f,u+d+f,h+d+f)-t(p+m+g,p+m+y,p+g+y,m+g+y);default:for(var v=e.slice().sort(r),x=i.slice().sort(r),b=0;be[r][0]&&(r=i);return tr?[[r],[t]]:[[t]]}},4750:function(e,t,r){e.exports=function(e){var t=i(e),r=t.length;if(r<=2)return[];for(var n=Array(r),a=t[r-1],o=0;o=t[l]&&(s+=1);a[o]=s}}return e}(i(function(e,t){for(var r=e.length,i=Array(r),n=0;nt.indexOf(n)&&(i[a++]=e[n]);return i}(e,r),!0),r)}};var i=r(8954),n=r(3952)},4769:function(e){e.exports=function(e,t,r,i,n,a){var o=n-1,s=n*n,l=o*o,c=(1+2*n)*l,u=n*l,h=s*(3-2*n),d=s*o;if(e.length){a||(a=Array(e.length));for(var f=e.length-1;f>=0;--f)a[f]=c*e[f]+u*t[f]+h*r[f]+d*i[f];return a}return c*e+u*t+h*r+d*i},e.exports.derivative=function(e,t,r,i,n,a){var o=6*n*n-6*n,s=3*n*n-4*n+1,l=-6*n*n+6*n,c=3*n*n-2*n;if(e.length){a||(a=Array(e.length));for(var u=e.length-1;u>=0;--u)a[u]=o*e[u]+s*t[u]+l*r[u]+c*i[u];return a}return o*e+s*t+l*r[u]+c*i}},7642:function(e,t,r){var i=r(8954),n=r(1682);function a(e,t){this.point=e,this.index=t}function o(e,t){for(var r=e.point,i=t.point,n=r.length,a=0;a=2)return!1;e[r]=i}return!0}):_.filter(function(e){for(var t=0;t<=s;++t){var r=y[e[t]];if(r<0)return!1;e[t]=r}return!0}),1&s)for(var u=0;u<_.length;++u){var b=_[u],d=b[0];b[0]=b[1],b[1]=d}return _}},2361:function(e){var t=!1;if("u">typeof Float64Array){var r=new Float64Array(1),i=new Uint32Array(r.buffer);(r[0]=1,t=!0,0x3ff00000===i[1])?(e.exports=function(e){return r[0]=e,[i[0],i[1]]},e.exports.pack=function(e,t){return i[0]=e,i[1]=t,r[0]},e.exports.lo=function(e){return r[0]=e,i[0]},e.exports.hi=function(e){return r[0]=e,i[1]}):0x3ff00000===i[0]?(e.exports=function(e){return r[0]=e,[i[1],i[0]]},e.exports.pack=function(e,t){return i[1]=e,i[0]=t,r[0]},e.exports.lo=function(e){return r[0]=e,i[1]},e.exports.hi=function(e){return r[0]=e,i[0]}):t=!1}if(!t){var n=new Buffer(8);e.exports=function(e){return n.writeDoubleLE(e,0,!0),[n.readUInt32LE(0,!0),n.readUInt32LE(4,!0)]},e.exports.pack=function(e,t){return n.writeUInt32LE(e,0,!0),n.writeUInt32LE(t,4,!0),n.readDoubleLE(0,!0)},e.exports.lo=function(e){return n.writeDoubleLE(e,0,!0),n.readUInt32LE(0,!0)},e.exports.hi=function(e){return n.writeDoubleLE(e,0,!0),n.readUInt32LE(4,!0)}}e.exports.sign=function(t){return e.exports.hi(t)>>>31},e.exports.exponent=function(t){return(e.exports.hi(t)<<1>>>21)-1023},e.exports.fraction=function(t){var r=e.exports.lo(t),i=e.exports.hi(t),n=1048575&i;return 0x7ff00000&i&&(n+=1048576),[r,n]},e.exports.denormalized=function(t){return!(0x7ff00000&e.exports.hi(t))}},1338:function(e){e.exports=function(e,t){switch(typeof t>"u"&&(t=0),typeof e){case"number":if(e>0){var r,i,n=0|e,a=t;for(r=Array(n),i=0;i=r-1)for(var d=l.length-1,p=e-t[r-1],f=0;f=r-1)for(var u=s.length-1,h=(t[r-1],0);h=0;--r)if(e[--t])return!1;return!0},s.jump=function(e){var t=this.lastT(),r=this.dimension;if(!(e0;--h)i.push(a(l[h-1],c[h-1],arguments[h])),n.push(0)}},s.push=function(e){var t=this.lastT(),r=this.dimension;if(!(e1e-6?1/s:0;this._time.push(e);for(var d=r;d>0;--d){var f=a(c[d-1],u[d-1],arguments[d]);i.push(f),n.push((f-i[o++])*h)}}},s.set=function(e){var t=this.dimension;if(!(e0;--l)r.push(a(o[l-1],s[l-1],arguments[l])),i.push(0)}},s.move=function(e){var t=this.lastT(),r=this.dimension;if(!(e<=t||arguments.length!==r+1)){var i=this._state,n=this._velocity,o=i.length-this.dimension,s=this.bounds,l=s[0],c=s[1],u=e-t,h=u>1e-6?1/u:0;this._time.push(e);for(var d=r;d>0;--d){var f=arguments[d];i.push(a(l[d-1],c[d-1],i[o++]+f)),n.push(f*h)}}},s.idle=function(e){var t=this.lastT();if(!(e=0;--h)i.push(a(l[h],c[h],i[o]+u*n[o])),n.push(0),o+=1}}},3840:function(e){function t(e,t,r,i,n,a){this._color=e,this.key=t,this.value=r,this.left=i,this.right=n,this._count=a}function r(e){return new t(e._color,e.key,e.value,e.left,e.right,e._count)}function i(e,r){return new t(e,r.key,r.value,r.left,r.right,r._count)}function n(e){e._count=1+(e.left?e.left._count:0)+(e.right?e.right._count:0)}function a(e,t){this._compare=e,this.root=t}e.exports=function(e){return new a(e||u,null)};var o=a.prototype;function s(e,t){this.tree=e,this._stack=t}Object.defineProperty(o,"keys",{get:function(){var e=[];return this.forEach(function(t,r){e.push(t)}),e}}),Object.defineProperty(o,"values",{get:function(){var e=[];return this.forEach(function(t,r){e.push(r)}),e}}),Object.defineProperty(o,"length",{get:function(){return this.root?this.root._count:0}}),o.insert=function(e,r){for(var o=this._compare,s=this.root,l=[],c=[];s;){var u=o(e,s.key);l.push(s),c.push(u),s=u<=0?s.left:s.right}l.push(new t(0,e,r,null,null,1));for(var h=l.length-2;h>=0;--h){var s=l[h];c[h]<=0?l[h]=new t(s._color,s.key,s.value,l[h+1],s.right,s._count+1):l[h]=new t(s._color,s.key,s.value,s.left,l[h+1],s._count+1)}for(var h=l.length-1;h>1;--h){var d=l[h-1],s=l[h];if(1===d._color||1===s._color)break;var f=l[h-2];if(f.left===d)if(d.left===s){var p=f.right;if(p&&0===p._color)d._color=1,f.right=i(1,p),f._color=0,h-=1;else{if(f._color=0,f.left=d.right,d._color=1,d.right=f,l[h-2]=d,l[h-1]=s,n(f),n(d),h>=3){var m=l[h-3];m.left===f?m.left=d:m.right=d}break}}else{var p=f.right;if(p&&0===p._color)d._color=1,f.right=i(1,p),f._color=0,h-=1;else{if(d.right=s.left,f._color=0,f.left=s.right,s._color=1,s.left=d,s.right=f,l[h-2]=s,l[h-1]=d,n(f),n(d),n(s),h>=3){var m=l[h-3];m.left===f?m.left=s:m.right=s}break}}else if(d.right===s){var p=f.left;if(p&&0===p._color)d._color=1,f.left=i(1,p),f._color=0,h-=1;else{if(f._color=0,f.right=d.left,d._color=1,d.left=f,l[h-2]=d,l[h-1]=s,n(f),n(d),h>=3){var m=l[h-3];m.right===f?m.right=d:m.left=d}break}}else{var p=f.left;if(p&&0===p._color)d._color=1,f.left=i(1,p),f._color=0,h-=1;else{if(d.left=s.right,f._color=0,f.right=s.left,s._color=1,s.right=d,s.left=f,l[h-2]=s,l[h-1]=d,n(f),n(d),n(s),h>=3){var m=l[h-3];m.right===f?m.right=s:m.left=s}break}}}return l[0]._color=1,new a(o,l[0])},o.forEach=function(e,t,r){if(this.root)switch(arguments.length){case 1:return function e(t,r){if(r.left){var i=e(t,r.left);if(i)return i}var i=t(r.key,r.value);return i||(r.right?e(t,r.right):void 0)}(e,this.root);case 2:return function e(t,r,i,n){if(0>=r(t,n.key)){if(n.left){var a=e(t,r,i,n.left);if(a)return a}var a=i(n.key,n.value);if(a)return a}if(n.right)return e(t,r,i,n.right)}(t,this._compare,e,this.root);case 3:return this._compare(t,r)>=0?void 0:function e(t,r,i,n,a){var o,s=i(t,a.key),l=i(r,a.key);return s<=0&&(a.left&&(o=e(t,r,i,n,a.left))||l>0&&(o=n(a.key,a.value)))?o:l>0&&a.right?e(t,r,i,n,a.right):void 0}(t,r,this._compare,e,this.root)}},Object.defineProperty(o,"begin",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.left;return new s(this,e)}}),Object.defineProperty(o,"end",{get:function(){for(var e=[],t=this.root;t;)e.push(t),t=t.right;return new s(this,e)}}),o.at=function(e){if(e<0)return new s(this,[]);for(var t=this.root,r=[];;){if(r.push(t),t.left){if(e=t.right._count)break;t=t.right}else break}return new s(this,[])},o.ge=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a<=0&&(n=i.length),r=a<=0?r.left:r.right}return i.length=n,new s(this,i)},o.gt=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a<0&&(n=i.length),r=a<0?r.left:r.right}return i.length=n,new s(this,i)},o.lt=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a>0&&(n=i.length),r=a<=0?r.left:r.right}return i.length=n,new s(this,i)},o.le=function(e){for(var t=this._compare,r=this.root,i=[],n=0;r;){var a=t(e,r.key);i.push(r),a>=0&&(n=i.length),r=a<0?r.left:r.right}return i.length=n,new s(this,i)},o.find=function(e){for(var t=this._compare,r=this.root,i=[];r;){var n=t(e,r.key);if(i.push(r),0===n)return new s(this,i);r=n<=0?r.left:r.right}return new s(this,[])},o.remove=function(e){var t=this.find(e);return t?t.remove():this},o.get=function(e){for(var t=this._compare,r=this.root;r;){var i=t(e,r.key);if(0===i)return r.value;r=i<=0?r.left:r.right}};var l=s.prototype;function c(e,t){e.key=t.key,e.value=t.value,e.left=t.left,e.right=t.right,e._color=t._color,e._count=t._count}function u(e,t){return et)}Object.defineProperty(l,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(l,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),l.clone=function(){return new s(this.tree,this._stack.slice())},l.remove=function(){var e=this._stack;if(0===e.length)return this.tree;var o=Array(e.length),s=e[e.length-1];o[o.length-1]=new t(s._color,s.key,s.value,s.left,s.right,s._count);for(var l=e.length-2;l>=0;--l){var s=e[l];s.left===e[l+1]?o[l]=new t(s._color,s.key,s.value,o[l+1],s.right,s._count):o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count)}if((s=o[o.length-1]).left&&s.right){var u=o.length;for(s=s.left;s.right;)o.push(s),s=s.right;var h=o[u-1];o.push(new t(s._color,h.key,h.value,s.left,s.right,s._count)),o[u-1].key=s.key,o[u-1].value=s.value;for(var l=o.length-2;l>=u;--l)s=o[l],o[l]=new t(s._color,s.key,s.value,s.left,o[l+1],s._count);o[u-1].left=o[u]}if(0===(s=o[o.length-1])._color){var d=o[o.length-2];d.left===s?d.left=null:d.right===s&&(d.right=null),o.pop();for(var l=0;l=0;--l){if(t=e[l],0===l){t._color=1;return}if((a=e[l-1]).left===t){if((o=a.right).right&&0===o.right._color){if(s=(o=a.right=r(o)).right=r(o.right),a.right=o.left,o.left=a,o.right=s,o._color=a._color,t._color=1,a._color=1,s._color=1,n(a),n(o),l>1){var c=e[l-2];c.left===a?c.left=o:c.right=o}e[l-1]=o;return}if(o.left&&0===o.left._color){if(s=(o=a.right=r(o)).left=r(o.left),a.right=s.left,o.left=s.right,s.left=a,s.right=o,s._color=a._color,a._color=1,o._color=1,t._color=1,n(a),n(o),n(s),l>1){var c=e[l-2];c.left===a?c.left=s:c.right=s}e[l-1]=s;return}if(1===o._color)if(0===a._color){a._color=1,a.right=i(0,o);return}else{a.right=i(0,o);continue}if(a.right=(o=r(o)).left,o.left=a,o._color=a._color,a._color=0,n(a),n(o),l>1){var c=e[l-2];c.left===a?c.left=o:c.right=o}e[l-1]=o,e[l]=a,l+11){var c=e[l-2];c.right===a?c.right=o:c.left=o}e[l-1]=o;return}if(o.right&&0===o.right._color){if(s=(o=a.left=r(o)).right=r(o.right),a.left=s.right,o.right=s.left,s.right=a,s.left=o,s._color=a._color,a._color=1,o._color=1,t._color=1,n(a),n(o),n(s),l>1){var c=e[l-2];c.right===a?c.right=s:c.left=s}e[l-1]=s;return}if(1===o._color)if(0===a._color){a._color=1,a.left=i(0,o);return}else{a.left=i(0,o);continue}if(a.left=(o=r(o)).right,o.right=a,o._color=a._color,a._color=0,n(a),n(o),l>1){var c=e[l-2];c.right===a?c.right=o:c.left=o}e[l-1]=o,e[l]=a,l+10)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(l,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(l,"index",{get:function(){var e=0,t=this._stack;if(0===t.length){var r=this.tree.root;return r?r._count:0}t[t.length-1].left&&(e=t[t.length-1].left._count);for(var i=t.length-2;i>=0;--i)t[i+1]===t[i].right&&(++e,t[i].left&&(e+=t[i].left._count));return e},enumerable:!0}),l.next=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.right)for(t=t.right;t;)e.push(t),t=t.left;else for(e.pop();e.length>0&&e[e.length-1].right===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(l,"hasNext",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].right)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].left===e[t])return!0;return!1}}),l.update=function(e){var r=this._stack;if(0===r.length)throw Error("Can't update empty node!");var i=Array(r.length),n=r[r.length-1];i[i.length-1]=new t(n._color,n.key,e,n.left,n.right,n._count);for(var o=r.length-2;o>=0;--o)(n=r[o]).left===r[o+1]?i[o]=new t(n._color,n.key,n.value,i[o+1],n.right,n._count):i[o]=new t(n._color,n.key,n.value,n.left,i[o+1],n._count);return new a(this.tree._compare,i[0])},l.prev=function(){var e=this._stack;if(0!==e.length){var t=e[e.length-1];if(t.left)for(t=t.left;t;)e.push(t),t=t.right;else for(e.pop();e.length>0&&e[e.length-1].left===t;)t=e[e.length-1],e.pop()}},Object.defineProperty(l,"hasPrev",{get:function(){var e=this._stack;if(0===e.length)return!1;if(e[e.length-1].left)return!0;for(var t=e.length-1;t>0;--t)if(e[t-1].right===e[t])return!0;return!1}})},3837:function(e,t,r){e.exports=function(e,t){var r=new f(e);return r.update(t),r};var i=r(4935),n=r(501),a=r(5304),o=r(6429),s=r(6444),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),c=ArrayBuffer,u=DataView;function h(e){return Array.isArray(e)||c.isView(e)&&!(e instanceof u)}function d(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function f(e){this.gl=e,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(e)}var p=f.prototype;function m(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}p.update=function(e){function t(t,r,i){if(i in e){var n,a=e[i],o=this[i];(t?h(a)&&h(a[0]):h(a))?this[i]=n=[r(a[0]),r(a[1]),r(a[2])]:this[i]=n=[r(a),r(a),r(a)];for(var s=0;s<3;++s)if(n[s]!==o[s])return!0}return!1}e=e||{};var r,a=t.bind(this,!1,Number),o=t.bind(this,!1,Boolean),l=t.bind(this,!1,String),c=t.bind(this,!0,function(e){if(h(e)){if(3===e.length)return[+e[0],+e[1],+e[2],1];if(4===e.length)return[+e[0],+e[1],+e[2],+e[3]]}return[0,0,0,1]}),u=!1,d=!1;if("bounds"in e)for(var f=e.bounds,p=0;p<2;++p)for(var m=0;m<3;++m)f[p][m]!==this.bounds[p][m]&&(d=!0),this.bounds[p][m]=f[p][m];if("ticks"in e){r=e.ticks,u=!0,this.autoTicks=!1;for(var p=0;p<3;++p)this.tickSpacing[p]=0}else a("tickSpacing")&&(this.autoTicks=!0,d=!0);if(this._firstInit&&("ticks"in e||"tickSpacing"in e||(this.autoTicks=!0),d=!0,u=!0,this._firstInit=!1),d&&this.autoTicks&&(r=s.create(this.bounds,this.tickSpacing),u=!0),u){for(var p=0;p<3;++p)r[p].sort(function(e,t){return e.x-t.x});s.equal(r,this.ticks)?u=!1:this.ticks=r}o("tickEnable"),l("tickFont")&&(u=!0),l("tickFontStyle")&&(u=!0),l("tickFontWeight")&&(u=!0),l("tickFontVariant")&&(u=!0),a("tickSize"),a("tickAngle"),a("tickPad"),c("tickColor");var g=l("labels");l("labelFont")&&(g=!0),l("labelFontStyle")&&(g=!0),l("labelFontWeight")&&(g=!0),l("labelFontVariant")&&(g=!0),o("labelEnable"),a("labelSize"),a("labelPad"),c("labelColor"),o("lineEnable"),o("lineMirror"),a("lineWidth"),c("lineColor"),o("lineTickEnable"),o("lineTickMirror"),a("lineTickLength"),a("lineTickWidth"),c("lineTickColor"),o("gridEnable"),a("gridWidth"),c("gridColor"),o("zeroEnable"),c("zeroLineColor"),a("zeroLineWidth"),o("backgroundEnable"),c("backgroundColor");var y=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],v=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(g||u)&&this._text.update(this.bounds,this.labels,y,this.ticks,v):this._text=i(this.gl,this.bounds,this.labels,y,this.ticks,v),this._lines&&u&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=n(this.gl,this.bounds,this.ticks))};var g=[new m,new m,new m],y=[0,0,0],v={model:l,view:l,projection:l,_ortho:!1};p.isOpaque=function(){return!0},p.isTransparent=function(){return!1},p.drawTransparent=function(e){};var x=[0,0,0],b=[0,0,0],_=[0,0,0];p.draw=function(e){e=e||v;for(var t,r,i,n=this.gl,a=e.model||l,s=e.view||l,c=e.projection||l,u=this.bounds,h=e._ortho||!1,f=o(a,s,c,u,h),p=f.cubeEdges,m=f.axis,w=s[12],T=s[13],M=s[14],k=s[15],A=h?2:1,S=A*this.pixelRatio*(c[3]*w+c[7]*T+c[11]*M+c[15]*k)/n.drawingBufferHeight,E=0;E<3;++E)this.lastCubeProps.cubeEdges[E]=p[E],this.lastCubeProps.axis[E]=m[E];for(var E=0;E<3;++E)!function(e,t,r,i,n){for(var a=e.primalOffset,o=e.primalMinor,s=e.mirrorOffset,l=e.mirrorMinor,c=i[t],u=0;u<3;++u)if(t!==u){var h=a,d=s,f=o,p=l;c&1<0?(f[u]=-1,p[u]=0):(f[u]=0,p[u]=1)}}(g[E],E,this.bounds,p,m);for(var n=this.gl,E=0;E<3;++E)this.backgroundEnable[E]?y[E]=m[E]:y[E]=0;this._background.draw(a,s,c,u,y,this.backgroundColor),this._lines.bind(a,s,c,this);for(var E=0;E<3;++E){var C=[0,0,0];m[E]>0?C[E]=u[1][E]:C[E]=u[0][E];for(var L=0;L<2;++L){var P=(E+1+L)%3,I=(E+1+(1^L))%3;this.gridEnable[P]&&this._lines.drawGrid(P,I,this.bounds,C,this.gridColor[P],this.gridWidth[P]*this.pixelRatio)}for(var L=0;L<2;++L){var P=(E+1+L)%3,I=(E+1+(1^L))%3;this.zeroEnable[I]&&0>=Math.min(u[0][I],u[1][I])&&Math.max(u[0][I],u[1][I])>=0&&this._lines.drawZero(P,I,this.bounds,C,this.zeroLineColor[I],this.zeroLineWidth[I]*this.pixelRatio)}}for(var E=0;E<3;++E){this.lineEnable[E]&&this._lines.drawAxisLine(E,this.bounds,g[E].primalOffset,this.lineColor[E],this.lineWidth[E]*this.pixelRatio),this.lineMirror[E]&&this._lines.drawAxisLine(E,this.bounds,g[E].mirrorOffset,this.lineColor[E],this.lineWidth[E]*this.pixelRatio);for(var z=d(x,g[E].primalMinor),D=d(b,g[E].mirrorMinor),O=this.lineTickLength,L=0;L<3;++L){var R=S/a[5*L];z[L]*=O[L]*R,D[L]*=O[L]*R}this.lineTickEnable[E]&&this._lines.drawAxisTicks(E,g[E].primalOffset,z,this.lineTickColor[E],this.lineTickWidth[E]*this.pixelRatio),this.lineTickMirror[E]&&this._lines.drawAxisTicks(E,g[E].mirrorOffset,D,this.lineTickColor[E],this.lineTickWidth[E]*this.pixelRatio)}function F(e){(i=[0,0,0])[e]=1}this._lines.unbind(),this._text.bind(a,s,c,this.pixelRatio);for(var E=0;E<3;++E){for(var j=g[E].primalMinor,B=g[E].mirrorMinor,N=d(_,g[E].primalOffset),L=0;L<3;++L)this.lineTickEnable[E]&&(N[L]+=S*j[L]*Math.max(this.lineTickLength[L],0)/a[5*L]);var U=[0,0,0];if(U[E]=1,this.tickEnable[E]){-3600===this.tickAngle[E]?(this.tickAngle[E]=0,this.tickAlign[E]="auto"):this.tickAlign[E]=-1,r=1,"auto"===(t=[this.tickAlign[E],.5,r])[0]?t[0]=0:t[0]=parseInt(""+t[0]),i=[0,0,0],function(e,t,r){var i=(e+1)%3,n=(e+2)%3,a=t[i],o=t[n],s=r[i],l=r[n];if(a>0&&l>0||a>0&&l<0)return F(i);a<0&&l>0||a<0&&l<0?F(i):o>0&&s>0||o>0&&s<0||o<0&&s>0?F(n):o<0&&s<0&&F(n)}(E,j,B);for(var L=0;L<3;++L)N[L]+=S*j[L]*this.tickPad[L]/a[5*L];this._text.drawTicks(E,this.tickSize[E],this.tickAngle[E],N,this.tickColor[E],U,i,t)}if(this.labelEnable[E]){r=0,i=[0,0,0],this.labels[E].length>4&&(F(E),r=1),"auto"===(t=[this.labelAlign[E],.5,r])[0]?t[0]=0:t[0]=parseInt(""+t[0]);for(var L=0;L<3;++L)N[L]+=S*j[L]*this.labelPad[L]/a[5*L];N[E]+=.5*(u[0][E]+u[1][E]),this._text.drawLabel(E,this.labelSize[E],this.labelAngle[E],N,this.labelColor[E],[0,0,0],i,t)}}this._text.unbind()},p.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},5304:function(e,t,r){e.exports=function(e){for(var t=[],r=[],s=0,l=0;l<3;++l)for(var c=(l+1)%3,u=(l+2)%3,h=[0,0,0],d=[0,0,0],f=-1;f<=1;f+=2){r.push(s,s+2,s+1,s+1,s+2,s+3),h[l]=f,d[l]=f;for(var p=-1;p<=1;p+=2){h[c]=p;for(var m=-1;m<=1;m+=2)h[u]=m,t.push(h[0],h[1],h[2],d[0],d[1],d[2]),s+=1}var g=c;c=u,u=g}var y=i(e,new Float32Array(t)),v=i(e,new Uint16Array(r),e.ELEMENT_ARRAY_BUFFER),x=n(e,[{buffer:y,type:e.FLOAT,size:3,offset:0,stride:24},{buffer:y,type:e.FLOAT,size:3,offset:12,stride:24}],v),b=a(e);return b.attributes.position.location=0,b.attributes.normal.location=1,new o(e,y,x,b)};var i=r(2762),n=r(8116),a=r(1879).bg;function o(e,t,r,i){this.gl=e,this.buffer=t,this.vao=r,this.shader=i}var s=o.prototype;s.draw=function(e,t,r,i,n,a){for(var o=!1,s=0;s<3;++s)o=o||n[s];if(o){var l=this.gl;l.enable(l.POLYGON_OFFSET_FILL),l.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:e,view:t,projection:r,bounds:i,enable:n,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()}},6429:function(e,t,r){e.exports=function(e,t,r,d,y){n(s,t,e),n(s,r,s);for(var v=0,x=0;x<2;++x){u[2]=d[x][2];for(var b=0;b<2;++b){u[1]=d[b][1];for(var _=0;_<2;++_)u[0]=d[_][0],function(e,t,r){for(var i=0;i<4;++i){e[i]=r[12+i];for(var n=0;n<3;++n)e[i]+=t[n]*r[4*n+i]}}(l[v],u,s),v+=1}}for(var w=-1,x=0;x<8;++x){for(var T=l[x][3],M=0;M<3;++M)c[x][M]=l[x][M]/T;y&&(c[x][2]*=-1),T<0&&(w<0||c[x][2]o(c[P],c[I],c[z],h)||(L?E=1:C=1)}if(E<0||C<0){C>E&&(w|=1<E){w|=1<c[x][1])&&(R=x);for(var F=-1,x=0;x<3;++x){var j=R^1<c[B][0]&&(B=j)}}p[0]=p[1]=p[2]=0,p[i.log2(F^R)]=R&F,p[i.log2(R^B)]=R&B;var N=7^B;N===w||N===O?(N=7^F,p[i.log2(B^N)]=N&B):p[i.log2(F^N)]=N&F;for(var U=w,k=0;k<3;++k)U&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? + b - PI : + b; +} + +float look_horizontal_or_vertical(float a, float ratio) { + // ratio controls the ratio between being horizontal to (vertical + horizontal) + // if ratio is set to 0.5 then it is 50%, 50%. + // when using a higher ratio e.g. 0.75 the result would + // likely be more horizontal than vertical. + + float b = positive_angle(a); + + return + (b < ( ratio) * HALF_PI) ? 0.0 : + (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : + (b < (2.0 + ratio) * HALF_PI) ? 0.0 : + (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : + 0.0; +} + +float roundTo(float a, float b) { + return float(b * floor((a + 0.5 * b) / b)); +} + +float look_round_n_directions(float a, int n) { + float b = positive_angle(a); + float div = TWO_PI / float(n); + float c = roundTo(b, div); + return look_upwards(c); +} + +float applyAlignOption(float rawAngle, float delta) { + return + (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions + (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical + (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis + (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards + (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal + rawAngle; // otherwise return back raw input angle +} + +bool isAxisTitle = (axis.x == 0.0) && + (axis.y == 0.0) && + (axis.z == 0.0); + +void main() { + //Compute world offset + float axisDistance = position.z; + vec3 dataPosition = axisDistance * axis + offset; + + float beta = angle; // i.e. user defined attributes for each tick + + float axisAngle; + float clipAngle; + float flip; + + if (enableAlign) { + axisAngle = (isAxisTitle) ? HALF_PI : + computeViewAngle(dataPosition, dataPosition + axis); + clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); + + axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; + clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; + + flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), + vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; + + beta += applyAlignOption(clipAngle, flip * PI); + } + + //Compute plane offset + vec2 planeCoord = position.xy * pixelScale; + + mat2 planeXform = scale * mat2( + cos(beta), sin(beta), + -sin(beta), cos(beta) + ); + + vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; + + //Compute clip position + vec3 clipPosition = project(dataPosition); + + //Apply text offset in clip coordinates + clipPosition += vec3(viewOffset, 0.0); + + //Done + gl_Position = vec4(clipPosition, 1.0); +} +`]),l=i([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 color; +void main() { + gl_FragColor = color; +}`]);t.Q=function(e){return n(e,s,l,null,[{name:"position",type:"vec3"}])};var c=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec3 normal; + +uniform mat4 model, view, projection; +uniform vec3 enable; +uniform vec3 bounds[2]; + +varying vec3 colorChannel; + +void main() { + + vec3 signAxis = sign(bounds[1] - bounds[0]); + + vec3 realNormal = signAxis * normal; + + if(dot(realNormal, enable) > 0.0) { + vec3 minRange = min(bounds[0], bounds[1]); + vec3 maxRange = max(bounds[0], bounds[1]); + vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); + gl_Position = projection * (view * (model * vec4(nPosition, 1.0))); + } else { + gl_Position = vec4(0,0,0,0); + } + + colorChannel = abs(realNormal); +} +`]),u=i([`precision highp float; +#define GLSLIFY 1 + +uniform vec4 colors[3]; + +varying vec3 colorChannel; + +void main() { + gl_FragColor = colorChannel.x * colors[0] + + colorChannel.y * colors[1] + + colorChannel.z * colors[2]; +}`]);t.bg=function(e){return n(e,c,u,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(e,t,r){e.exports=function(e,t,r,a,s,l){var u=i(e),h=n(e,[{buffer:u,size:3}]),d=o(e);d.attributes.position.location=0;var f=new c(e,d,u,h);return f.update(t,r,a,s,l),f};var i=r(2762),n=r(8116),a=r(4359),o=r(1879).Q,s=window||S.global||{},l=s.__TEXT_CACHE||{};function c(e,t,r,i){this.gl=e,this.shader=t,this.buffer=r,this.vao=i,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}s.__TEXT_CACHE={};var u=c.prototype,h=[0,0];u.bind=function(e,t,r,i){this.vao.bind(),this.shader.bind();var n=this.shader.uniforms;n.model=e,n.view=t,n.projection=r,n.pixelScale=i,h[0]=this.gl.drawingBufferWidth,h[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=h},u.unbind=function(){this.vao.unbind()},u.update=function(e,t,r,i,n){var o=[];function s(e,t,r,i,n,s){var c=[r.style,r.weight,r.variant,r.family].join("_"),u=l[c];u||(u=l[c]={});var h=u[t];h||(h=u[t]=function(e,t){try{return a(e,t)}catch(t){return console.warn('error vectorizing text:"'+e+'" error:',t),{cells:[],positions:[]}}}(t,{triangles:!0,font:r.family,fontStyle:r.style,fontWeight:r.weight,fontVariant:r.variant,textAlign:"center",textBaseline:"middle",lineSpacing:n,styletags:s}));for(var d=(i||12)/12,f=h.positions,p=h.cells,m=0,g=p.length;m=0;--v){var x=f[y[v]];o.push(d*x[0],-d*x[1],e)}}for(var c=[0,0,0],u=[0,0,0],h=[0,0,0],d=[0,0,0],f={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},p=0;p<3;++p){h[p]=o.length/3|0,s(.5*(e[0][p]+e[1][p]),t[p],r[p],12,1.25,f),d[p]=(o.length/3|0)-h[p],c[p]=o.length/3|0;for(var m=0;m=0&&(n=r.length-i-1);var a=Math.pow(10,n),o=Math.round(e*t*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),!n)return u;for(var h=""+c;h.length=e[0][n];--o)a.push({x:o*t[n],text:r(t[n],o)});i.push(a)}return i},t.equal=function(e,t){for(var r=0;r<3;++r){if(e[r].length!==t[r].length)return!1;for(var i=0;ir)throw Error("gl-buffer: If resizing buffer, must not specify offset");return e.bufferSubData(t,a,n),r}function u(e,t){for(var r=i.malloc(e.length,t),n=e.length,a=0;atypeof e.shape){var r,s=e.dtype;if(0>o.indexOf(s)&&(s="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(s=gl.getExtension("OES_element_index_uint")&&"uint16"!==s?"uint32":"uint16"),s===e.dtype&&function(e,t){for(var r=1,i=t.length-1;i>=0;--i){if(t[i]!==r)return!1;r*=e[i]}return!0}(e.shape,e.stride))0===e.offset&&e.data.length===e.shape[0]?this.length=c(this.gl,this.type,this.length,this.usage,e.data,t):this.length=c(this.gl,this.type,this.length,this.usage,e.data.subarray(e.offset,e.shape[0]),t);else{var l=i.malloc(e.size,s),h=a(l,e.shape);n.assign(h,e),t<0?this.length=c(this.gl,this.type,this.length,this.usage,l,t):this.length=c(this.gl,this.type,this.length,this.usage,l.subarray(0,e.size),t),i.free(l)}}else if(Array.isArray(e))r=this.type===this.gl.ELEMENT_ARRAY_BUFFER?u(e,"uint16"):u(e,"float32"),t<0?this.length=c(this.gl,this.type,this.length,this.usage,r,t):this.length=c(this.gl,this.type,this.length,this.usage,r.subarray(0,e.length),t),i.free(r);else if("object"==typeof e&&"number"==typeof e.length)this.length=c(this.gl,this.type,this.length,this.usage,e,t);else if("number"==typeof e||void 0===e){if(t>=0)throw Error("gl-buffer: Cannot specify offset when resizing buffer");(e|=0)<=0&&(e=1),this.gl.bufferData(this.type,0|e,this.usage),this.length=e}else throw Error("gl-buffer: Invalid data type")},e.exports=function(e,t,r,i){if(r=r||e.ARRAY_BUFFER,i=i||e.DYNAMIC_DRAW,r!==e.ARRAY_BUFFER&&r!==e.ELEMENT_ARRAY_BUFFER)throw Error("gl-buffer: Invalid type for webgl buffer, must be either gl.ARRAY_BUFFER or gl.ELEMENT_ARRAY_BUFFER");if(i!==e.DYNAMIC_DRAW&&i!==e.STATIC_DRAW&&i!==e.STREAM_DRAW)throw Error("gl-buffer: Invalid usage for buffer, must be either gl.DYNAMIC_DRAW, gl.STATIC_DRAW or gl.STREAM_DRAW");var n=e.createBuffer(),a=new s(e,r,n,0,i);return a.update(t),a}},6405:function(e,t,r){var i=r(2931);e.exports=function(e,t){var r=e.positions,n=e.vectors,a={positions:[],vertexIntensity:[],vertexIntensityBounds:e.vertexIntensityBounds,vectors:[],cells:[],coneOffset:e.coneOffset,colormap:e.colormap};if(0===e.positions.length)return t&&(t[0]=[0,0,0],t[1]=[0,0,0]),a;for(var o=0,s=1/0,l=-1/0,c=1/0,u=-1/0,h=1/0,d=-1/0,f=null,p=null,m=[],g=1/0,y=!1,v="raw"===e.coneSizemode,x=0;xo&&(o=i.length(_)),x&&!v){var w=2*i.distance(f,b)/(i.length(p)+i.length(_));w?(g=Math.min(g,w),y=!1):y=!0}y||(f=b,p=_),m.push(_)}var T=[s,c,h],M=[l,u,d];t&&(t[0]=T,t[1]=M),0===o&&(o=1);var k=1/o;isFinite(g)||(g=1),a.vectorScale=g;var A=e.coneSize||(v?1:.5);e.absoluteConeSize&&(A=e.absoluteConeSize*k),a.coneScale=A;for(var x=0,S=0;x=1},f.isTransparent=function(){return this.opacity<1},f.pickSlots=1,f.setPickBase=function(e){this.pickId=e},f.update=function(e){e=e||{};var t=this.gl;this.dirty=!0,"lightPosition"in e&&(this.lightPosition=e.lightPosition),"opacity"in e&&(this.opacity=e.opacity),"ambient"in e&&(this.ambientLight=e.ambient),"diffuse"in e&&(this.diffuseLight=e.diffuse),"specular"in e&&(this.specularLight=e.specular),"roughness"in e&&(this.roughness=e.roughness),"fresnel"in e&&(this.fresnel=e.fresnel),void 0!==e.tubeScale&&(this.tubeScale=e.tubeScale),void 0!==e.vectorScale&&(this.vectorScale=e.vectorScale),void 0!==e.coneScale&&(this.coneScale=e.coneScale),void 0!==e.coneOffset&&(this.coneOffset=e.coneOffset),e.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=t.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=t.LINEAR,this.texture.setPixels(function(e){for(var t=u({colormap:e,nshades:256,format:"rgba"}),r=new Uint8Array(1024),i=0;i<256;++i){for(var n=t[i],a=0;a<3;++a)r[4*i+a]=n[a];r[4*i+3]=255*n[3]}return c(r,[256,256,4],[4,0,1])}(e.colormap)),this.texture.generateMipmap());var r=e.cells,i=e.positions,n=e.vectors;if(!(!i||!r||!n)){var a=[],o=[],s=[],l=[],h=[];this.cells=r,this.positions=i,this.vectors=n;var d=e.meshColor||[1,1,1,1],f=e.vertexIntensity,p=1/0,m=-1/0;if(f)if(e.vertexIntensityBounds)p=+e.vertexIntensityBounds[0],m=+e.vertexIntensityBounds[1];else for(var g=0;g0){var m=this.triShader;m.bind(),m.uniforms=c,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},f.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||h,i=e.view||h,n=e.projection||h,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(i),this._projection=[].slice.call(n),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:i,projection:n,clipBounds:a,tubeScale:this.tubeScale,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(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},f.pick=function(e){if(!e||e.id!==this.pickId)return null;var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],i=this.positions[r[1]].slice(0,3),n={position:i,dataCoordinate:i,index:Math.floor(r[1]/48)};return"cone"===this.traceType?n.index=Math.floor(r[1]/48):"streamtube"===this.traceType&&(n.intensity=this.intensity[r[1]],n.velocity=this.vectors[r[1]].slice(0,3),n.divergence=this.vectors[r[1]][3],n.index=t),n},f.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.triangleIds.dispose()},e.exports=function(e,t,r){var s,l,u=r.shaders;1==arguments.length&&(e=(t=e).gl);var h=((s=i(e,u.meshShader.vertex,u.meshShader.fragment,null,u.meshShader.attributes)).attributes.position.location=0,s.attributes.color.location=2,s.attributes.uv.location=3,s.attributes.vector.location=4,s),f=((l=i(e,u.pickShader.vertex,u.pickShader.fragment,null,u.pickShader.attributes)).attributes.position.location=0,l.attributes.id.location=1,l.attributes.vector.location=4,l),p=o(e,c(new Uint8Array([255,255,255,255]),[1,1,4]));p.generateMipmap(),p.minFilter=e.LINEAR_MIPMAP_LINEAR,p.magFilter=e.LINEAR;var m=n(e),g=n(e),y=n(e),v=n(e),x=n(e),b=a(e,[{buffer:m,type:e.FLOAT,size:4},{buffer:x,type:e.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:y,type:e.FLOAT,size:4},{buffer:v,type:e.FLOAT,size:2},{buffer:g,type:e.FLOAT,size:4}]),_=new d(e,p,h,f,m,g,x,y,v,b,r.traceType||"cone");return _.update(t),_}},614:function(e,t,r){var i=r(3236),n=i([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // 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). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec3 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, coneScale, coneOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * conePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(conePosition, 1.0); + vec4 t_position = view * conePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = conePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),a=i([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),o=i([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // 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). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the cone vertex and normal at the given index. +// +// The returned vertex is for a cone with its top at origin and height of 1.0, +// pointing in the direction of the vector attribute. +// +// Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. +// These vertices are used to make up the triangles of the cone by the following: +// segment + 0 top vertex +// segment + 1 perimeter vertex a+1 +// segment + 2 perimeter vertex a +// segment + 3 center base vertex +// segment + 4 perimeter vertex a +// segment + 5 perimeter vertex a+1 +// Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. +// To go from index to segment, floor(index / 6) +// To go from segment to angle, 2*pi * (segment/segmentCount) +// To go from index to segment index, index - (segment*6) +// +vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { + + const float segmentCount = 8.0; + + float index = rawIndex - floor(rawIndex / + (segmentCount * 6.0)) * + (segmentCount * 6.0); + + float segment = floor(0.001 + index/6.0); + float segmentIndex = index - (segment*6.0); + + normal = -normalize(d); + + if (segmentIndex > 2.99 && segmentIndex < 3.01) { + return mix(vec3(0.0), -d, coneOffset); + } + + float nextAngle = ( + (segmentIndex > 0.99 && segmentIndex < 1.01) || + (segmentIndex > 4.99 && segmentIndex < 5.01) + ) ? 1.0 : 0.0; + float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); + + vec3 v1 = mix(d, vec3(0.0), coneOffset); + vec3 v2 = v1 - d; + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d)*0.25; + vec3 y = v * sin(angle) * length(d)*0.25; + vec3 v3 = v2 + x + y; + if (segmentIndex < 3.0) { + vec3 tx = u * sin(angle); + vec3 ty = v * -cos(angle); + vec3 tangent = tx + ty; + normal = normalize(cross(v3 - v1, tangent)); + } + + if (segmentIndex == 0.0) { + return mix(d, vec3(0.0), coneOffset); + } + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float vectorScale, coneScale, coneOffset; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); + vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + gl_Position = projection * (view * conePosition); + f_id = id; + f_position = position.xyz; +} +`]),s=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);t.meshShader={vertex:n,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(e){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",34e3:"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"}},5171:function(e,t,r){var i=r(737);e.exports=function(e){return i[e]}},9165:function(e,t,r){e.exports=function(e){var t=e.gl,r=i(t),o=n(t,[{buffer:r,type:t.FLOAT,size:3,offset:0,stride:40},{buffer:r,type:t.FLOAT,size:4,offset:12,stride:40},{buffer:r,type:t.FLOAT,size:3,offset:28,stride:40}]),l=a(t);l.attributes.position.location=0,l.attributes.color.location=1,l.attributes.offset.location=2;var c=new s(t,r,o,l);return c.update(e),c};var i=r(2762),n=r(8116),a=r(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(e,t,r,i){this.gl=e,this.shader=i,this.buffer=t,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(e,t){for(var r=0;r<3;++r)e[0][r]=Math.min(e[0][r],t[r]),e[1][r]=Math.max(e[1][r],t[r])}l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(e){var t=this.gl,r=this.shader.uniforms;this.shader.bind();var i=r.view=e.view||o,n=r.projection=e.projection||o;r.model=e.model||o,r.clipBounds=this.clipBounds,r.opacity=this.opacity;var a=i[12],s=i[13],l=i[14],c=i[15],u=(e._ortho?2:1)*this.pixelRatio*(n[3]*a+n[7]*s+n[11]*l+n[15]*c)/t.drawingBufferHeight;this.vao.bind();for(var h=0;h<3;++h)t.lineWidth(this.lineWidth[h]*this.pixelRatio),r.capSize=this.capSize[h]*u,this.lineCount[h]&&t.drawArrays(t.LINES,this.lineOffset[h],this.lineCount[h]);this.vao.unbind()};var u=function(){for(var e=[,,,],t=0;t<3;++t){for(var r=[],i=1;i<=2;++i)for(var n=-1;n<=1;n+=2){var a=[0,0,0];a[(i+t)%3]=n,r.push(a)}e[t]=r}return e}();function h(e,t,r,i){for(var n=u[i],a=0;a0){var m=u.slice();m[s]+=f[1][s],n.push(u[0],u[1],u[2],p[0],p[1],p[2],p[3],0,0,0,m[0],m[1],m[2],p[0],p[1],p[2],p[3],0,0,0),c(this.bounds,m),o+=2+h(n,m,p,s)}}}this.lineCount[s]=o-this.lineOffset[s]}this.buffer.update(n)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},3436:function(e,t,r){var i=r(3236),n=r(9405),a=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position, offset; +attribute vec4 color; +uniform mat4 model, view, projection; +uniform float capSize; +varying vec4 fragColor; +varying vec3 fragPosition; + +void main() { + vec4 worldPosition = model * vec4(position, 1.0); + worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); + gl_Position = projection * (view * worldPosition); + fragColor = color; + fragPosition = position; +}`]),o=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float opacity; +varying vec3 fragPosition; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], fragPosition) || + fragColor.a * opacity == 0. + ) discard; + + gl_FragColor = opacity * fragColor; +}`]);e.exports=function(e){return n(e,a,o,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(e,t,r){var i=r(7766);e.exports=function(e,t,r,i){n||(n=e.FRAMEBUFFER_UNSUPPORTED,a=e.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,o=e.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,s=e.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var c=e.getExtension("WEBGL_draw_buffers");if(!l&&c&&function(e,t){var r=e.getParameter(t.MAX_COLOR_ATTACHMENTS_WEBGL);l=Array(r+1);for(var i=0;i<=r;++i){for(var n=Array(r),a=0;au||r<0||r>u)throw Error("gl-fbo: Parameters are too large for FBO");var h=1;if("color"in(i=i||{})){if((h=Math.max(0|i.color,0))<0)throw Error("gl-fbo: Must specify a nonnegative number of colors");if(h>1)if(c){if(h>e.getParameter(c.MAX_COLOR_ATTACHMENTS_WEBGL))throw Error("gl-fbo: Context does not support "+h+" draw buffers")}else throw Error("gl-fbo: Multiple draw buffer extension not supported")}var d=e.UNSIGNED_BYTE,f=e.getExtension("OES_texture_float");if(i.float&&h>0){if(!f)throw Error("gl-fbo: Context does not support floating point textures");d=e.FLOAT}else i.preferFloat&&h>0&&f&&(d=e.FLOAT);var m=!0;"depth"in i&&(m=!!i.depth);var g=!1;return"stencil"in i&&(g=!!i.stencil),new p(e,t,r,d,h,m,g,c)};var n,a,o,s,l=null;function c(e){return[e.getParameter(e.FRAMEBUFFER_BINDING),e.getParameter(e.RENDERBUFFER_BINDING),e.getParameter(e.TEXTURE_BINDING_2D)]}function u(e,t){e.bindFramebuffer(e.FRAMEBUFFER,t[0]),e.bindRenderbuffer(e.RENDERBUFFER,t[1]),e.bindTexture(e.TEXTURE_2D,t[2])}function h(e){switch(e){case n:throw Error("gl-fbo: Framebuffer unsupported");case a:throw Error("gl-fbo: Framebuffer incomplete attachment");case o:throw Error("gl-fbo: Framebuffer incomplete dimensions");case s:throw Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw Error("gl-fbo: Framebuffer failed for unspecified reason")}}function d(e,t,r,n,a,o){if(!n)return null;var s=i(e,t,r,a,n);return s.magFilter=e.NEAREST,s.minFilter=e.NEAREST,s.mipSamples=1,s.bind(),e.framebufferTexture2D(e.FRAMEBUFFER,o,e.TEXTURE_2D,s.handle,0),s}function f(e,t,r,i,n){var a=e.createRenderbuffer();return e.bindRenderbuffer(e.RENDERBUFFER,a),e.renderbufferStorage(e.RENDERBUFFER,i,t,r),e.framebufferRenderbuffer(e.FRAMEBUFFER,n,e.RENDERBUFFER,a),a}function p(e,t,r,i,n,a,o,s){this.gl=e,this._shape=[0|t,0|r],this._destroyed=!1,this._ext=s,this.color=Array(n);for(var p=0;p1&&s.drawBuffersWEBGL(l[o]);var v=r.getExtension("WEBGL_depth_texture");v?p?e.depth=d(r,n,a,v.UNSIGNED_INT_24_8_WEBGL,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m&&(e.depth=d(r,n,a,r.UNSIGNED_SHORT,r.DEPTH_COMPONENT,r.DEPTH_ATTACHMENT)):m&&p?e._depth_rb=f(r,n,a,r.DEPTH_STENCIL,r.DEPTH_STENCIL_ATTACHMENT):m?e._depth_rb=f(r,n,a,r.DEPTH_COMPONENT16,r.DEPTH_ATTACHMENT):p&&(e._depth_rb=f(r,n,a,r.STENCIL_INDEX,r.STENCIL_ATTACHMENT));var x=r.checkFramebufferStatus(r.FRAMEBUFFER);if(x!==r.FRAMEBUFFER_COMPLETE){e._destroyed=!0,r.bindFramebuffer(r.FRAMEBUFFER,null),r.deleteFramebuffer(e.handle),e.handle=null,e.depth&&(e.depth.dispose(),e.depth=null),e._depth_rb&&(r.deleteRenderbuffer(e._depth_rb),e._depth_rb=null);for(var y=0;yn||r<0||r>n)throw Error("gl-fbo: Can't resize FBO, invalid dimensions");e._shape[0]=t,e._shape[1]=r;for(var a=c(i),o=0;o max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D dashTexture; +uniform float dashScale; +uniform float opacity; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if ( + outOfRange(clipBounds[0], clipBounds[1], worldPosition) || + fragColor.a * opacity == 0. + ) discard; + + float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; + if(dashWeight < 0.5) { + discard; + } + gl_FragColor = fragColor * opacity; +} +`]),s=i([`precision highp float; +#define GLSLIFY 1 + +#define FLOAT_MAX 1.70141184e38 +#define FLOAT_MIN 1.17549435e-38 + +// https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl +vec4 packFloat(float v) { + float av = abs(v); + + //Handle special cases + if(av < FLOAT_MIN) { + return vec4(0.0, 0.0, 0.0, 0.0); + } else if(v > FLOAT_MAX) { + return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; + } else if(v < -FLOAT_MAX) { + return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; + } + + vec4 c = vec4(0,0,0,0); + + //Compute exponent and mantissa + float e = floor(log2(av)); + float m = av * pow(2.0, -e) - 1.0; + + //Unpack mantissa + c[1] = floor(128.0 * m); + m -= c[1] / 128.0; + c[2] = floor(32768.0 * m); + m -= c[2] / 32768.0; + c[3] = floor(8388608.0 * m); + + //Unpack exponent + float ebias = e + 127.0; + c[0] = floor(ebias / 2.0); + ebias -= c[0] * 2.0; + c[1] += floor(ebias) * 128.0; + + //Unpack sign bit + c[0] += 128.0 * step(0.0, -v); + + //Scale back to range + return c / 255.0; +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform float pickId; +uniform vec3 clipBounds[2]; + +varying vec3 worldPosition; +varying float pixelArcLength; +varying vec4 fragColor; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; + + gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); +}`]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];t.createShader=function(e){return n(e,a,o,null,l)},t.createPickShader=function(e){return n(e,a,s,null,l)}},5714:function(e,t,r){e.exports=function(e){var t=e.gl||e.scene&&e.scene.gl,r=h(t);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=d(t);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=i(t),l=n(t,[{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}]),u=c(Array(1024),[256,1,4]),f=0;f<1024;++f)u.data[f]=255;var p=a(t,u);p.wrap=t.REPEAT;var m=new g(t,r,o,s,l,p);return m.update(e),m};var i=r(2762),n=r(8116),a=r(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer),l=r(2478),c=r(9618),u=r(7319),h=u.createShader,d=u.createPickShader,f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function p(e){for(var t=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],r=0;r<3;++r)t[0][r]=Math.max(e[0][r],t[0][r]),t[1][r]=Math.min(e[1][r],t[1][r]);return t}function m(e,t,r,i){this.arcLength=e,this.position=t,this.index=r,this.dataCoordinate=i}function g(e,t,r,i,n,a){this.gl=e,this.shader=t,this.pickShader=r,this.buffer=i,this.vao=n,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 y=g.prototype;y.isTransparent=function(){return this.hasAlpha},y.isOpaque=function(){return!this.hasAlpha},y.pickSlots=1,y.setPickBase=function(e){this.pickId=e},y.drawTransparent=y.draw=function(e){if(this.vertexCount){var t=this.gl,r=this.shader,i=this.vao;r.bind(),r.uniforms={model:e.model||f,view:e.view||f,projection:e.projection||f,clipBounds:p(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},i.bind(),i.draw(t.TRIANGLE_STRIP,this.vertexCount),i.unbind()}},y.drawPick=function(e){if(this.vertexCount){var t=this.gl,r=this.pickShader,i=this.vao;r.bind(),r.uniforms={model:e.model||f,view:e.view||f,projection:e.projection||f,pickId:this.pickId,clipBounds:p(this.clipBounds),screenShape:[t.drawingBufferWidth,t.drawingBufferHeight],pixelRatio:this.pixelRatio},i.bind(),i.draw(t.TRIANGLE_STRIP,this.vertexCount),i.unbind()}},y.update=function(e){this.dirty=!0;var t=!!e.connectGaps;"dashScale"in e&&(this.dashScale=e.dashScale),this.hasAlpha=!1,"opacity"in e&&(this.opacity=+e.opacity,this.opacity<1&&(this.hasAlpha=!0));var r=[],i=[],n=[],a=0,o=0,s=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],u=e.position||e.positions;if(u){var h=e.color||e.colors||[0,0,0,1],d=e.lineWidth||1,f=!1;e:for(p=1;p0){for(var _=0;_<24;++_)r.push(r[r.length-12]);o+=2,f=!0}continue e}s[0][m]=Math.min(s[0][m],x[m],b[m]),s[1][m]=Math.max(s[1][m],x[m],b[m])}Array.isArray(h[0])?(g=h.length>p-1?h[p-1]:h.length>0?h[h.length-1]:[0,0,0,1],y=h.length>p?h[p]:h.length>0?h[h.length-1]:[0,0,0,1]):g=y=h,3===g.length&&(g=[g[0],g[1],g[2],1]),3===y.length&&(y=[y[0],y[1],y[2],1]),!this.hasAlpha&&g[3]<1&&(this.hasAlpha=!0),v=Array.isArray(d)?d.length>p-1?d[p-1]:d.length>0?d[d.length-1]:[0,0,0,1]:d;var w=a;if(a+=function(e,t){for(var r=0,i=0;i<3;++i){var n=e[i]-t[i];r+=n*n}return Math.sqrt(r)}(x,b),f){for(m=0;m<2;++m)r.push(x[0],x[1],x[2],b[0],b[1],b[2],w,v,g[0],g[1],g[2],g[3]);o+=2,f=!1}r.push(x[0],x[1],x[2],b[0],b[1],b[2],w,v,g[0],g[1],g[2],g[3],x[0],x[1],x[2],b[0],b[1],b[2],w,-v,g[0],g[1],g[2],g[3],b[0],b[1],b[2],x[0],x[1],x[2],a,-v,y[0],y[1],y[2],y[3],b[0],b[1],b[2],x[0],x[1],x[2],a,v,y[0],y[1],y[2],y[3]),o+=4}}if(this.buffer.update(r),i.push(a),n.push(u[u.length-1].slice()),this.bounds=s,this.vertexCount=o,this.points=n,this.arcLength=i,"dashes"in e){var T=e.dashes.slice();for(T.unshift(0),p=1;pMath.abs(m-_)&&1e-6>Math.abs(g-w)&&1e-6>Math.abs(y-T)?i(e):(p=1/Math.sqrt((h=m-_)*h+(d=g-w)*d+(f=y-T)*f),h*=p,d*=p,f*=p,(p=Math.sqrt((a=x*f-b*d)*a+(o=b*h-v*f)*o+(s=v*d-x*h)*s))?(a*=p=1/p,o*=p,s*=p):(a=0,o=0,s=0),(p=Math.sqrt((l=d*s-f*o)*l+(c=f*a-h*s)*c+(u=h*o-d*a)*u))?(l*=p=1/p,c*=p,u*=p):(l=0,c=0,u=0),e[0]=a,e[1]=l,e[2]=h,e[3]=0,e[4]=o,e[5]=c,e[6]=d,e[7]=0,e[8]=s,e[9]=u,e[10]=f,e[11]=0,e[12]=-(a*m+o*g+s*y),e[13]=-(l*m+c*g+u*y),e[14]=-(h*m+d*g+f*y),e[15]=1,e)}},6760:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*i+b*s+_*h+w*m,e[1]=x*n+b*l+_*d+w*g,e[2]=x*a+b*c+_*f+w*y,e[3]=x*o+b*u+_*p+w*v,x=r[4],b=r[5],_=r[6],w=r[7],e[4]=x*i+b*s+_*h+w*m,e[5]=x*n+b*l+_*d+w*g,e[6]=x*a+b*c+_*f+w*y,e[7]=x*o+b*u+_*p+w*v,x=r[8],b=r[9],_=r[10],w=r[11],e[8]=x*i+b*s+_*h+w*m,e[9]=x*n+b*l+_*d+w*g,e[10]=x*a+b*c+_*f+w*y,e[11]=x*o+b*u+_*p+w*v,x=r[12],b=r[13],_=r[14],w=r[15],e[12]=x*i+b*s+_*h+w*m,e[13]=x*n+b*l+_*d+w*g,e[14]=x*a+b*c+_*f+w*y,e[15]=x*o+b*u+_*p+w*v,e}},4040:function(e){e.exports=function(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*c,e[15]=1,e}},4772:function(e){e.exports=function(e,t,r,i,n){var a=1/Math.tan(t/2),o=1/(i-n);return e[0]=a/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(n+i)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*n*i*o,e[15]=0,e}},6079:function(e){e.exports=function(e,t,r,i){var n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S,E=i[0],C=i[1],L=i[2],P=Math.sqrt(E*E+C*C+L*L);return 1e-6>Math.abs(P)?null:(E*=P=1/P,C*=P,L*=P,n=Math.sin(r),o=1-(a=Math.cos(r)),s=t[0],l=t[1],c=t[2],u=t[3],h=t[4],d=t[5],f=t[6],p=t[7],m=t[8],g=t[9],y=t[10],v=t[11],x=E*E*o+a,b=C*E*o+L*n,_=L*E*o-C*n,w=E*C*o-L*n,T=C*C*o+a,M=L*C*o+E*n,k=E*L*o+C*n,A=C*L*o-E*n,S=L*L*o+a,e[0]=s*x+h*b+m*_,e[1]=l*x+d*b+g*_,e[2]=c*x+f*b+y*_,e[3]=u*x+p*b+v*_,e[4]=s*w+h*T+m*M,e[5]=l*w+d*T+g*M,e[6]=c*w+f*T+y*M,e[7]=u*w+p*T+v*M,e[8]=s*k+h*A+m*S,e[9]=l*k+d*A+g*S,e[10]=c*k+f*A+y*S,e[11]=u*k+p*A+v*S,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}},5567:function(e){e.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[4],o=t[5],s=t[6],l=t[7],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=a*n+c*i,e[5]=o*n+u*i,e[6]=s*n+h*i,e[7]=l*n+d*i,e[8]=c*n-a*i,e[9]=u*n-o*i,e[10]=h*n-s*i,e[11]=d*n-l*i,e}},2408:function(e){e.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-c*i,e[1]=o*n-u*i,e[2]=s*n-h*i,e[3]=l*n-d*i,e[8]=a*i+c*n,e[9]=o*i+u*n,e[10]=s*i+h*n,e[11]=l*i+d*n,e}},7089:function(e){e.exports=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[4],u=t[5],h=t[6],d=t[7];return t!==e&&(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[0]=a*n+c*i,e[1]=o*n+u*i,e[2]=s*n+h*i,e[3]=l*n+d*i,e[4]=c*n-a*i,e[5]=u*n-o*i,e[6]=h*n-s*i,e[7]=d*n-l*i,e}},2504:function(e){e.exports=function(e,t,r){var i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},7656:function(e){e.exports=function(e,t,r){var i,n,a,o,s,l,c,u,h,d,f,p,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=i,e[1]=n,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=i*m+s*g+h*y+t[12],e[13]=n*m+l*g+d*y+t[13],e[14]=a*m+c*g+f*y+t[14],e[15]=o*m+u*g+p*y+t[15]),e}},5665:function(e){e.exports=function(e,t){if(e===t){var r=t[1],i=t[2],n=t[3],a=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=i,e[9]=a,e[11]=t[14],e[12]=n,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},7626:function(e,t,r){var i=r(2642),n=r(9346);function a(e,t){for(var r=[0,0,0,0],i=0;i<4;++i)for(var n=0;n<4;++n)r[n]+=e[4*i+n]*t[i];return r}e.exports=function(e,t,r,o,s,l){if(1===e.length)return[0,e[0].slice()];for(var c=Array(e.length),u=0;u1.0001)return null;g+=m[u]}return Math.abs(g-1)>.001?null:[h,function(e,t){for(var r=[0,0,0],i=0;i max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness + , fresnel + , kambient + , kdiffuse + , kspecular; +uniform sampler2D texture; + +varying vec3 f_normal + , f_lightDirection + , f_eyeDirection + , f_data; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (f_color.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], f_data) + ) discard; + + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d + + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * f_color.a; +} +`]),o=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; + +uniform mat4 model, view, projection; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + f_color = color; + f_data = position; + f_uv = uv; +}`]),s=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec3 f_data; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; + + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),l=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 uv; +attribute float pointSize; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); + } else { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + } + gl_PointSize = pointSize; + f_color = color; + f_uv = uv; +}`]),c=i([`precision highp float; +#define GLSLIFY 1 + +uniform sampler2D texture; +uniform float opacity; + +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); + if(dot(pointR, pointR) > 0.25) { + discard; + } + gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; +}`]),u=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; +attribute vec4 id; + +uniform mat4 model, view, projection; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + f_id = id; + f_position = position; +}`]),h=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]),d=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute float pointSize; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0.0, 0.0, 0.0, 0.0); + } else { + gl_Position = projection * (view * (model * vec4(position, 1.0))); + gl_PointSize = pointSize; + } + f_id = id; + f_position = position; +}`]),f=i([`precision highp float; +#define GLSLIFY 1 + +attribute vec3 position; + +uniform mat4 model, view, projection; + +void main() { + gl_Position = projection * (view * (model * vec4(position, 1.0))); +}`]),p=i([`precision highp float; +#define GLSLIFY 1 + +uniform vec3 contourColor; + +void main() { + gl_FragColor = vec4(contourColor, 1.0); +} +`]);t.meshShader={vertex:n,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},t.pointShader={vertex:l,fragment:c,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},t.pickShader={vertex:u,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},t.pointPickShader={vertex:d,fragment:h,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},t.contourShader={vertex:f,fragment:p,attributes:[{name:"position",type:"vec3"}]}},7201:function(e,t,r){var i=r(9405),n=r(2762),a=r(8116),o=r(7766),s=r(8406),l=r(6760),c=r(7608),u=r(9618),h=r(6729),d=r(7765),f=r(1888),p=r(840),m=r(7626),g=p.meshShader,y=p.wireShader,v=p.pointShader,x=p.pickShader,b=p.pointPickShader,_=p.contourShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function T(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,T,M,k,A,S){this.gl=e,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=t,this.dirty=!0,this.triShader=r,this.lineShader=i,this.pointShader=n,this.pickShader=a,this.pointPickShader=o,this.contourShader=s,this.trianglePositions=l,this.triangleColors=u,this.triangleNormals=d,this.triangleUVs=h,this.triangleIds=c,this.triangleVAO=f,this.triangleCount=0,this.lineWidth=1,this.edgePositions=p,this.edgeColors=g,this.edgeUVs=y,this.edgeIds=m,this.edgeVAO=v,this.edgeCount=0,this.pointPositions=x,this.pointColors=_,this.pointUVs=T,this.pointSizes=M,this.pointIds=b,this.pointVAO=k,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=A,this.contourVAO=S,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!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 M=T.prototype;function k(e,t){if(!t||!t.length)return 1;for(var r=0;re&&r>0){var i=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-i)+i*t[r-1][1]}}return 1}M.isOpaque=function(){return!this.hasAlpha},M.isTransparent=function(){return this.hasAlpha},M.pickSlots=1,M.setPickBase=function(e){this.pickId=e},M.highlight=function(e){if(!e||!this.contourEnable){this.contourCount=0;return}for(var t=d(this.cells,this.intensity,e.intensity),r=t.cells,i=t.vertexIds,n=t.vertexWeights,a=r.length,o=f.mallocFloat32(6*a),s=0,l=0;l0){var p=this.triShader;p.bind(),p.uniforms=s,this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var p=this.lineShader;p.bind(),p.uniforms=s,this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()}if(this.pointCount>0){var p=this.pointShader;p.bind(),p.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var p=this.contourShader;p.bind(),p.uniforms=s,this.contourVAO.bind(),t.drawArrays(t.LINES,0,this.contourCount),this.contourVAO.unbind()}},M.drawPick=function(e){e=e||{};for(var t=this.gl,r=e.model||w,i=e.view||w,n=e.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(i),this._projection=[].slice.call(n),this._resolution=[t.drawingBufferWidth,t.drawingBufferHeight];var s={model:r,view:i,projection:n,clipBounds:a,pickId:this.pickId/255},l=this.pickShader;if(l.bind(),l.uniforms=s,this.triangleCount>0&&(this.triangleVAO.bind(),t.drawArrays(t.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),t.lineWidth(this.lineWidth*this.pixelRatio),t.drawArrays(t.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0){var l=this.pointPickShader;l.bind(),l.uniforms=s,this.pointVAO.bind(),t.drawArrays(t.POINTS,0,this.pointCount),this.pointVAO.unbind()}},M.pick=function(e){if(!e||e.id!==this.pickId)return null;for(var t=e.value[0]+256*e.value[1]+65536*e.value[2],r=this.cells[t],i=this.positions,n=Array(r.length),a=0;aMath.abs(t))c.rotate(a,0,0,-e*r*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var o=-p.zoomSpeed*n*t/window.innerHeight*(a-c.lastT())/20;c.pan(a,0,0,h*(Math.exp(o)-1))}}},!0)},p.enableMouseListeners(),p};var i=r(3025),n=r(6296),a=r(351),o=r(8512),s=r(24),l=r(7520)},799:function(e,t,r){var i=r(3236),n=r(9405),a=i([`precision mediump float; +#define GLSLIFY 1 +attribute vec2 position; +varying vec2 uv; +void main() { + uv = position; + gl_Position = vec4(position, 0, 1); +}`]),o=i([`precision mediump float; +#define GLSLIFY 1 + +uniform sampler2D accumBuffer; +varying vec2 uv; + +void main() { + vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); + gl_FragColor = min(vec4(1,1,1,1), accum); +}`]);e.exports=function(e){return n(e,a,o,null,[{name:"position",type:"vec2"}])}},4100:function(e,t,r){var i=r(4437),n=r(3837),a=r(5445),o=r(4449),s=r(3589),l=r(2260),c=r(7169),u=r(351),h=r(4772),d=r(4040),f=r(799),p=r(9216)({tablet:!0,featureDetect:!0});function m(){this.mouse=[-1,-1],this.screen=null,this.distance=1/0,this.index=null,this.dataCoordinate=null,this.dataPosition=null,this.object=null,this.data=null}function g(e){return"boolean"!=typeof e||e}e.exports={createScene:function(e){(e=e||{}).camera=e.camera||{};var t=e.canvas;t||((t=document.createElement("canvas"),e.container)?e.container.appendChild(t):document.body.appendChild(t));var r=e.gl;if(r||(e.glOptions&&(p=!!e.glOptions.preserveDrawingBuffer),r=function(e,t){var r=null;try{(r=e.getContext("webgl",t))||(r=e.getContext("experimental-webgl",t))}catch{return null}return r}(t,e.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:p})),!r)throw Error("webgl not supported");var y=e.bounds||[[-10,-10,-10],[10,10,10]],v=new m,x=l(r,r.drawingBufferWidth,r.drawingBufferHeight,{preferFloat:!p}),b=f(r),_=e.cameraObject&&!0===e.cameraObject._ortho||e.camera.projection&&"orthographic"===e.camera.projection.type||!1,w={eye:e.camera.eye||[2,0,0],center:e.camera.center||[0,0,0],up:e.camera.up||[0,1,0],zoomMin:e.camera.zoomMax||.1,zoomMax:e.camera.zoomMin||100,mode:e.camera.mode||"turntable",_ortho:_},T=e.axes||{},M=n(r,T);M.enable=!T.disable;var k=e.spikes||{},A=o(r,k),S=[],E=[],C=[],L=[],P=!0,I=!0,z={view:null,projection:Array(16),model:Array(16),_ortho:!1},I=!0,D=[r.drawingBufferWidth,r.drawingBufferHeight],O=e.cameraObject||i(t,w),R={gl:r,contextLost:!1,pixelRatio:e.pixelRatio||1,canvas:t,selection:v,camera:O,axes:M,axesPixels:null,spikes:A,bounds:y,objects:S,shape:D,aspect:e.aspectRatio||[1,1,1],pickRadius:e.pickRadius||10,zNear:e.zNear||.01,zFar:e.zFar||1e3,fovy:e.fovy||Math.PI/4,clearColor:e.clearColor||[0,0,0,0],autoResize:g(e.autoResize),autoBounds:g(e.autoBounds),autoScale:!!e.autoScale,autoCenter:g(e.autoCenter),clipToBounds:g(e.clipToBounds),snapToData:!!e.snapToData,onselect:e.onselect||null,onrender:e.onrender||null,onclick:e.onclick||null,cameraParams:z,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(e){this.aspect[0]=e.x,this.aspect[1]=e.y,this.aspect[2]=e.z,I=!0},setBounds:function(e,t){this.bounds[0][e]=t.min,this.bounds[1][e]=t.max},setClearColor:function(e){this.clearColor=e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},F=[r.drawingBufferWidth/R.pixelRatio|0,r.drawingBufferHeight/R.pixelRatio|0];function j(){if(!R._stopped&&R.autoResize){var e=t.parentNode,r=1,i=1;e&&e!==document.body?(r=e.clientWidth,i=e.clientHeight):(r=window.innerWidth,i=window.innerHeight);var n=0|Math.ceil(r*R.pixelRatio),a=0|Math.ceil(i*R.pixelRatio);if(n!==t.width||a!==t.height){t.width=n,t.height=a;var o=t.style;o.position=o.position||"absolute",o.left="0px",o.top="0px",o.width=r+"px",o.height=i+"px",P=!0}}}function B(){for(var e=S.length,t=L.length,i=0;i0&&0===C[t-1];)C.pop(),L.pop().dispose()}function N(){if(R.contextLost)return!0;r.isContextLost()&&(R.contextLost=!0,R.mouseListener.enabled=!1,R.selection.object=null,R.oncontextloss&&R.oncontextloss())}R.autoResize&&j(),window.addEventListener("resize",j),R.update=function(e){R._stopped||(e=e||{},P=!0,I=!0)},R.add=function(e){R._stopped||(e.axes=M,S.push(e),E.push(-1),P=!0,I=!0,B())},R.remove=function(e){if(!R._stopped){var t=S.indexOf(e);t<0||(S.splice(t,1),E.pop(),P=!0,I=!0,B())}},R.dispose=function(){if(!R._stopped&&(R._stopped=!0,window.removeEventListener("resize",j),t.removeEventListener("webglcontextlost",N),R.mouseListener.enabled=!1,!R.contextLost)){M.dispose(),A.dispose();for(var e=0;ev.distance)continue;for(var c=0;c0){var r=Math.round(Math.pow(10,t));return Math.ceil(e/r)*r}return Math.ceil(e)}((m[1][o]-m[0][o])/10);M.autoTicks?M.update({bounds:m,tickSpacing:w}):M.update({bounds:m})}var T=r.drawingBufferWidth,k=r.drawingBufferHeight;D[0]=T,D[1]=k,F[0]=0|Math.max(T/R.pixelRatio,1),F[1]=0|Math.max(k/R.pixelRatio,1),function(e,t){var r=e.bounds,i=e.cameraParams,n=i.projection,a=i.model,o=e.gl.drawingBufferWidth,s=e.gl.drawingBufferHeight,l=e.zNear,c=e.zFar,u=e.fovy,f=o/s;t?(d(n,-f,f,-1,1,l,c),i._ortho=!0):(h(n,u,f,l,c),i._ortho=!1);for(var p=0;p<16;++p)a[p]=0;a[15]=1;for(var m=0,p=0;p<3;++p)m=Math.max(m,r[1][p]-r[0][p]);for(var p=0;p<3;++p)e.autoScale?a[5*p]=e.aspect[p]/(r[1][p]-r[0][p]):a[5*p]=1/m,e.autoCenter&&(a[12+p]=-(.5*a[5*p])*(r[0][p]+r[1][p]))}(R,_);for(var o=0;o1e-6?(o=Math.sin(n=Math.acos(a)),s=Math.sin((1-i)*n)/o,l=Math.sin(i*n)/o):(s=1-i,l=i),e[0]=s*c+l*f,e[1]=s*u+l*p,e[2]=s*h+l*m,e[3]=s*d+l*g,e}},5964:function(e){e.exports=function(e){return e||0===e?e.toString():""}},9366:function(e,t,r){var i=r(4359);e.exports=function(e,t,r){var a=[t.style,t.weight,t.variant,t.family].join("_"),o=n[a];if(o||(o=n[a]={}),e in o)return o[e];var s={textAlign:"center",textBaseline:"middle",lineHeight:1,font:t.family,fontStyle:t.style,fontWeight:t.weight,fontVariant:t.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};s.triangles=!0;var l=i(e,s);s.triangles=!1;var c,u,h=i(e,s);if(r&&1!==r){for(c=0;c max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform vec4 highlightId; +uniform float highlightScale; +uniform mat4 model, view, projection; +uniform vec3 clipBounds[2]; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = 1.0; + if(distance(highlightId, id) < 0.0001) { + scale = highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1); + vec4 viewPosition = view * worldPosition; + viewPosition = viewPosition / viewPosition.w; + vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),o=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float highlightScale, pixelRatio; +uniform vec4 highlightId; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float scale = pixelRatio; + if(distance(highlightId.bgr, id.bgr) < 0.001) { + scale *= highlightScale; + } + + vec4 worldPosition = model * vec4(position, 1.0); + vec4 viewPosition = view * worldPosition; + vec4 clipPosition = projection * viewPosition; + clipPosition /= clipPosition.w; + + gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); + interpColor = color; + pickId = id; + dataCoordinate = position; + } +}`]),s=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +attribute vec3 position; +attribute vec4 color; +attribute vec2 glyph; +attribute vec4 id; + +uniform float highlightScale; +uniform vec4 highlightId; +uniform vec3 axes[2]; +uniform mat4 model, view, projection; +uniform vec2 screenSize; +uniform vec3 clipBounds[2]; +uniform float scale, pixelRatio; + +varying vec4 interpColor; +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], position)) { + + gl_Position = vec4(0,0,0,0); + } else { + float lscale = pixelRatio * scale; + if(distance(highlightId, id) < 0.0001) { + lscale *= highlightScale; + } + + vec4 clipCenter = projection * (view * (model * vec4(position, 1))); + vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; + vec4 clipPosition = projection * (view * (model * vec4(dataPosition, 1))); + + gl_Position = clipPosition; + interpColor = color; + pickId = id; + dataCoordinate = dataPosition; + } +} +`]),l=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float opacity; + +varying vec4 interpColor; +varying vec3 dataCoordinate; + +void main() { + if ( + outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || + interpColor.a * opacity == 0. + ) discard; + gl_FragColor = interpColor * opacity; +} +`]),c=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 fragClipBounds[2]; +uniform float pickGroup; + +varying vec4 pickId; +varying vec3 dataCoordinate; + +void main() { + if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; + + gl_FragColor = vec4(pickGroup, pickId.bgr); +}`]),u=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],h={vertex:a,fragment:l,attributes:u},d={vertex:o,fragment:l,attributes:u},f={vertex:s,fragment:l,attributes:u},p={vertex:a,fragment:c,attributes:u},m={vertex:o,fragment:c,attributes:u},g={vertex:s,fragment:c,attributes:u};function y(e,t){var r=i(e,t),n=r.attributes;return n.position.location=0,n.color.location=1,n.glyph.location=2,n.id.location=3,r}t.createPerspective=function(e){return y(e,h)},t.createOrtho=function(e){return y(e,d)},t.createProject=function(e){return y(e,f)},t.createPickPerspective=function(e){return y(e,p)},t.createPickOrtho=function(e){return y(e,m)},t.createPickProject=function(e){return y(e,g)}},8418:function(e,t,r){var i=r(5219),n=r(2762),a=r(8116),o=r(1888),s=r(6760),l=r(1283),c=r(9366),u=r(5964),h=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],d=ArrayBuffer,f=DataView;function p(e){return Array.isArray(e)||d.isView(e)&&!(e instanceof f)}function m(e,t){var r=e[0],i=e[1],n=e[2],a=e[3];return e[0]=t[0]*r+t[4]*i+t[8]*n+t[12]*a,e[1]=t[1]*r+t[5]*i+t[9]*n+t[13]*a,e[2]=t[2]*r+t[6]*i+t[10]*n+t[14]*a,e[3]=t[3]*r+t[7]*i+t[11]*n+t[15]*a,e}function g(e,t,r,i){return m(i,i),m(i,i),m(i,i)}function y(e,t){this.index=e,this.dataCoordinate=this.position=t}function v(e){return!0===e||e>1?1:e}function x(e,t,r,i,n,a,o,s,l,c,u,h){this.gl=e,this.pixelRatio=1,this.shader=t,this.orthoShader=r,this.projectShader=i,this.pointBuffer=n,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=[.6666666666666666,.6666666666666666,.6666666666666666],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 y(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(e){var t=e.gl,r=l.createPerspective(t),i=l.createOrtho(t),o=l.createProject(t),s=l.createPickPerspective(t),c=l.createPickOrtho(t),u=l.createPickProject(t),h=n(t),d=n(t),f=n(t),p=n(t),m=a(t,[{buffer:h,size:3,type:t.FLOAT},{buffer:d,size:4,type:t.FLOAT},{buffer:f,size:2,type:t.FLOAT},{buffer:p,size:4,type:t.UNSIGNED_BYTE,normalized:!0}]),g=new x(t,r,i,o,h,d,f,p,m,s,c,u);return g.update(e),g};var b=x.prototype;b.pickSlots=1,b.setPickBase=function(e){this.pickId=e},b.isTransparent=function(){if(this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&this.projectHasAlpha)return!0;return!1},b.isOpaque=function(){if(!this.hasAlpha)return!0;for(var e=0;e<3;++e)if(this.axesProject[e]&&!this.projectHasAlpha)return!0;return!1};var _=[0,0],w=[0,0,0],T=[0,0,0],M=[0,0,0,1],k=[0,0,0,1],A=h.slice(),S=[0,0,0],E=[[0,0,0],[0,0,0]];function C(e){return e[0]=e[1]=e[2]=0,e}function L(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=1,e}function P(e,t,r,i){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[r]=i,e}var I=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function z(e,t,r,i,n,a,o){var l=r.gl;if((a===r.projectHasAlpha||o)&&function(e,t,r,i){var n,a=t.axesProject,o=t.gl,l=e.uniforms,c=r.model||h,u=r.view||h,d=r.projection||h,f=t.axesBounds,p=function(e){for(var t=0;t<2;++t)for(var r=0;r<3;++r)E[t][r]=Math.max(Math.min(e[t][r],1e8),-1e8);return E}(t.clipBounds);n=t.axes&&t.axes.lastCubeProps?t.axes.lastCubeProps.axis:[1,1,1],_[0]=2/o.drawingBufferWidth,_[1]=2/o.drawingBufferHeight,e.bind(),l.view=u,l.projection=d,l.screenSize=_,l.highlightId=t.highlightId,l.highlightScale=t.highlightScale,l.clipBounds=p,l.pickGroup=t.pickId/255,l.pixelRatio=i;for(var m=0;m<3;++m)if(a[m]){l.scale=t.projectScale[m],l.opacity=t.projectOpacity[m];for(var y=0;y<16;++y)A[y]=0;for(var y=0;y<4;++y)A[5*y]=1;A[5*m]=0,n[m]<0?A[12+m]=f[0][m]:A[12+m]=f[1][m],s(A,c,A),l.model=A;var v=(m+1)%3,x=(m+2)%3,b=C(w),I=C(T);b[v]=1,I[x]=1;var z=g(d,u,c,L(M,b)),D=g(d,u,c,L(k,I));if(Math.abs(z[1])>Math.abs(D[1])){var O=z;z=D,D=O,O=b,b=I,I=O;var R=v;v=x,x=R}z[0]<0&&(b[v]=-1),D[1]>0&&(I[x]=-1);for(var F=0,j=0,y=0;y<4;++y)F+=Math.pow(c[4*v+y],2),j+=Math.pow(c[4*x+y],2);b[v]/=Math.sqrt(F),I[x]/=Math.sqrt(j),l.axes[0]=b,l.axes[1]=I,l.fragClipBounds[0]=P(S,p[0],m,-1e8),l.fragClipBounds[1]=P(S,p[1],m,1e8),t.vao.bind(),t.vao.draw(o.TRIANGLES,t.vertexCount),t.lineWidth>0&&(o.lineWidth(t.lineWidth*i),t.vao.draw(o.LINES,t.lineVertexCount,t.vertexCount)),t.vao.unbind()}}(t,r,i,n),a===r.hasAlpha||o){e.bind();var c=e.uniforms;c.model=i.model||h,c.view=i.view||h,c.projection=i.projection||h,_[0]=2/l.drawingBufferWidth,_[1]=2/l.drawingBufferHeight,c.screenSize=_,c.highlightId=r.highlightId,c.highlightScale=r.highlightScale,c.fragClipBounds=I,c.clipBounds=r.axes.bounds,c.opacity=r.opacity,c.pickGroup=r.pickId/255,c.pixelRatio=n,r.vao.bind(),r.vao.draw(l.TRIANGLES,r.vertexCount),r.lineWidth>0&&(l.lineWidth(r.lineWidth*n),r.vao.draw(l.LINES,r.lineVertexCount,r.vertexCount)),r.vao.unbind()}}function D(e,t,r,n){var a=u(a=p(e)?t=this.pointCount||t<0)return null;var r=this.points[t],i=this._selectResult;i.index=t;for(var n=0;n<3;++n)i.position[n]=i.dataCoordinate[n]=r[n];return i},b.highlight=function(e){if(e){var t=e.index;this.highlightId=[(255&t)/255,(t>>8&255)/255,(t>>16&255)/255,0]}else this.highlightId=[1,1,1,1]},b.update=function(e){if("perspective"in(e=e||{})&&(this.useOrtho=!e.perspective),"orthographic"in e&&(this.useOrtho=!!e.orthographic),"lineWidth"in e&&(this.lineWidth=e.lineWidth),"project"in e)if(p(e.project))this.axesProject=e.project;else{var t=!!e.project;this.axesProject=[t,t,t]}if("projectScale"in e)if(p(e.projectScale))this.projectScale=e.projectScale.slice();else{var r=+e.projectScale;this.projectScale=[r,r,r]}if(this.projectHasAlpha=!1,"projectOpacity"in e){if(p(e.projectOpacity))this.projectOpacity=e.projectOpacity.slice();else{var r=+e.projectOpacity;this.projectOpacity=[r,r,r]}for(var i=0;i<3;++i)this.projectOpacity[i]=v(this.projectOpacity[i]),this.projectOpacity[i]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in e&&(this.opacity=v(e.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var n,a,s=e.position,l={family:e.font||"normal",style:e.fontStyle||"normal",weight:e.fontWeight||"normal",variant:e.fontVariant||"normal"},c=e.alignment||[0,0];if(2===c.length)n=c[0],a=c[1];else{n=[],a=[];for(var i=0;i0){var O=0,R=b,F=[0,0,0,1],j=[0,0,0,1],B=p(f)&&p(f[0]),N=p(y)&&p(y[0]);e:for(var i=0;i0?1-E[0][0]:Z<0?1+E[1][0]:1,Y*=Y>0?1-E[0][1]:Y<0?1+E[1][1]:1;for(var $=[Z,Y],X=A.cells||[],K=A.positions||[],M=0;Mthis.buffer.length){n.free(this.buffer);for(var i=this.buffer=n.mallocUint8(o(r*t*4)),a=0;ar)for(e=r;et)for(e=t;e=0){for(var T=0|w.type.charAt(w.type.length-1),M=Array(T),k=0;k=0;)A+=1;_[v]=A}var S=Array(r.length);function E(){d.program=o.program(f,d._vref,d._fref,b,_);for(var e=0;e=0){var f=h.charCodeAt(h.length-1)-48;if(f<2||f>4)throw new i("","Invalid data type for attribute "+u+": "+h);s(e,t,d[0],n,f,a,u)}else if(h.indexOf("mat")>=0){var f=h.charCodeAt(h.length-1)-48;if(f<2||f>4)throw new i("","Invalid data type for attribute "+u+": "+h);!function(e,t,r,i,n,a,o){for(var l=Array(n),c=Array(n),u=0;u4)throw new n("","Invalid data type");switch(y.charAt(0)){case"b":case"i":e["uniform"+g+"iv"](s[u],h);break;case"v":e["uniform"+g+"fv"](s[u],h);break;default:throw new n("","Unrecognized data type for vector "+name+": "+y)}}else if(0===y.indexOf("mat")&&4===y.length){if((g=y.charCodeAt(y.length-1)-48)<2||g>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+y);e["uniformMatrix"+g+"fv"](s[u],!1,h);break}else throw new n("","Unknown uniform data type for "+name+": "+y)}}}}}function c(e,t,i){if("object"==typeof i)Object.defineProperty(e,t,{get:a(u(i)),set:l(i),enumerable:!0,configurable:!1});else s[i]?Object.defineProperty(e,t,{get:function(e,t,r){return e.getUniform(t.program,r[i])},set:l(i),enumerable:!0,configurable:!1}):e[t]=function(e){switch(e){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var t=e.indexOf("vec");if(0<=t&&t<=1&&e.length===4+t){var r=e.charCodeAt(e.length-1)-48;if(r<2||r>4)throw new n("","Invalid data type");return"b"===e.charAt(0)?o(r,!1):o(r,0)}if(0===e.indexOf("mat")&&4===e.length){var r=e.charCodeAt(e.length-1)-48;if(r<2||r>4)throw new n("","Invalid uniform dimension type for matrix "+name+": "+e);return o(r*r,0)}throw new n("","Unknown uniform data type for "+name+": "+e)}}(r[i].type)}function u(e){var t;if(Array.isArray(e)){t=Array(e.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"u"?r(606):WeakMap),o=0;function s(e,t,r,i,n,a,o){this.id=e,this.src=t,this.type=r,this.shader=i,this.count=a,this.programs=[],this.cache=o}function l(e){this.gl=e,this.shaders=[{},{}],this.programs={}}s.prototype.dispose=function(){if(0==--this.count){for(var e=this.cache,t=e.gl,r=this.programs,i=0,n=r.length;i 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 color, position; +attribute vec2 uv; + +uniform float vectorScale, tubeScale; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 eyePosition, lightPosition; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + // Scale the vector magnitude to stay constant with + // model & view changes. + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * tubePosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + f_lightDirection = lightPosition - cameraCoordinate.xyz; + f_eyeDirection = eyePosition - cameraCoordinate.xyz; + f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); + + // vec4 m_position = model * vec4(tubePosition, 1.0); + vec4 t_position = view * tubePosition; + gl_Position = projection * t_position; + + f_color = color; + f_data = tubePosition.xyz; + f_position = position.xyz; + f_uv = uv; +} +`]),a=i([`#extension GL_OES_standard_derivatives : enable + +precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float cookTorranceSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness, + float fresnel) { + + float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); + float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); + + //Half angle vector + vec3 H = normalize(lightDirection + viewDirection); + + //Geometric term + float NdotH = max(dot(surfaceNormal, H), 0.0); + float VdotH = max(dot(viewDirection, H), 0.000001); + float LdotH = max(dot(lightDirection, H), 0.000001); + float G1 = (2.0 * NdotH * VdotN) / VdotH; + float G2 = (2.0 * NdotH * LdotN) / LdotH; + float G = min(1.0, min(G1, G2)); + + //Distribution term + float D = beckmannDistribution(NdotH, roughness); + + //Fresnel term + float F = pow(1.0 - VdotN, fresnel); + + //Multiply terms and done + return G * F * D / max(3.14159265 * VdotN, 0.000001); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform sampler2D texture; + +varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; +varying vec4 f_color; +varying vec2 f_uv; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + vec3 N = normalize(f_normal); + vec3 L = normalize(f_lightDirection); + vec3 V = normalize(f_eyeDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + vec4 surfaceColor = f_color * texture2D(texture, f_uv); + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = litColor * opacity; +} +`]),o=i([`precision highp float; + +precision highp float; +#define GLSLIFY 1 + +vec3 getOrthogonalVector(vec3 v) { + // Return up-vector for only-z vector. + // 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). + // From the above if-statement we have ||a|| > 0 U ||b|| > 0. + // Assign z = 0, x = -b, y = a: + // a*-b + b*a + c*0 = -ba + ba + 0 = 0 + if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { + return normalize(vec3(-v.y, v.x, 0.0)); + } else { + return normalize(vec3(0.0, v.z, -v.y)); + } +} + +// Calculate the tube vertex and normal at the given index. +// +// The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. +// +// Each tube segment is made up of a ring of vertices. +// These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. +// The indexes of tube segments run from 0 to 8. +// +vec3 getTubePosition(vec3 d, float index, out vec3 normal) { + float segmentCount = 8.0; + + float angle = 2.0 * 3.14159 * (index / segmentCount); + + vec3 u = getOrthogonalVector(d); + vec3 v = normalize(cross(u, d)); + + vec3 x = u * cos(angle) * length(d); + vec3 y = v * sin(angle) * length(d); + vec3 v3 = x + y; + + normal = normalize(v3); + + return v3; +} + +attribute vec4 vector; +attribute vec4 position; +attribute vec4 id; + +uniform mat4 model, view, projection; +uniform float tubeScale; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + vec3 normal; + vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); + vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); + + gl_Position = projection * (view * tubePosition); + f_id = id; + f_position = position.xyz; +} +`]),s=i([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying vec3 f_position; +varying vec4 f_id; + +void main() { + if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; + + gl_FragColor = vec4(pickId, f_id.xyz); +}`]);t.meshShader={vertex:n,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},t.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(e,t,r){var i=r(2931),n=r(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(e,t,r,a){for(var o=e.points,s=e.velocities,l=e.divergences,c=[],u=[],h=[],d=[],f=[],p=[],m=0,g=0,y=n.create(),v=n.create(),x=0;x0)for(var T=0;T<8;T++){var M=(T+1)%8;c.push(d[T],f[T],f[M],f[M],d[M],d[T]),h.push(v,y,y,y,v,v),p.push(m,g,g,g,m,m);var k=c.length;u.push([k-6,k-5,k-4],[k-3,k-2,k-1])}var A=d;d=f,f=A;var S=v;v=y,y=S;var E=m;m=g,g=E}return{positions:c,cells:u,vectors:h,vertexIntensity:p}},s=function(e,t,r,n){for(var a=0,s=0;st)return r-1}return r},c=function(e,t,r){return er?r:e},u=function(e,t,r){var n,a,o,s,u,h,d=t.vectors,f=t.meshgrid,p=e[0],m=e[1],g=e[2],y=f[0].length,v=f[1].length,x=f[2].length,b=l(f[0],p),_=l(f[1],m),w=l(f[2],g),T=b+1,M=_+1,k=w+1;if(b=c(b,0,y-1),T=c(T,0,y-1),_=c(_,0,v-1),M=c(M,0,v-1),w=c(w,0,x-1),k=c(k,0,x-1),b<0||_<0||w<0||T>y-1||M>v-1||k>x-1)return i.create();var A=f[0][b],S=f[0][T],E=f[1][_],C=f[1][M],L=f[2][w],P=f[2][k],I=(p-A)/(S-A),z=(m-E)/(C-E),D=(g-L)/(P-L);switch(isFinite(I)||(I=.5),isFinite(z)||(z=.5),isFinite(D)||(D=.5),r.reversedX&&(b=y-1-b,T=y-1-T),r.reversedY&&(_=v-1-_,M=v-1-M),r.reversedZ&&(w=x-1-w,k=x-1-k),r.filled){case 5:u=w,h=k,o=_*x,s=M*x,n=b*x*v,a=T*x*v;break;case 4:u=w,h=k,n=b*x,a=T*x,o=_*x*y,s=M*x*y;break;case 3:o=_,s=M,u=w*v,h=k*v,n=b*v*x,a=T*v*x;break;case 2:o=_,s=M,n=b*v,a=T*v,u=w*v*y,h=k*v*y;break;case 1:n=b,a=T,u=w*y,h=k*y,o=_*y*x,s=M*y*x;break;default:n=b,a=T,o=_*y,s=M*y,u=w*y*v,h=k*y*v}var O=d[n+o+u],R=d[n+o+h],F=d[n+s+u],j=d[n+s+h],B=d[a+o+u],N=d[a+o+h],U=d[a+s+u],V=d[a+s+h],q=i.create(),H=i.create(),G=i.create(),W=i.create();i.lerp(q,O,B,I),i.lerp(H,R,N,I),i.lerp(G,F,U,I),i.lerp(W,j,V,I);var Y=i.create(),Z=i.create();i.lerp(Y,q,G,z),i.lerp(Z,H,W,z);var $=i.create();return i.lerp($,Y,Z,D),$},h=function(e){var t=1/0;e.sort(function(e,t){return e-t});for(var r=e.length,i=1;i1&&(M=d(r));for(var S=0;Sk&&(k=O),z.push(O),m.push({points:C,velocities:L,divergences:z});for(var R=0;R<100*n&&C.lengthx||rb||i_)}(E);){R++;var F=i.clone(P),j=i.squaredLength(F);if(0===j)break;if(j>T&&i.scale(F,F,w/Math.sqrt(j)),i.add(F,F,E),P=f(F),i.squaredDistance(I,F)-T>-1e-4*T){C.push(F),I=F,L.push(P);var D=p(F,P),O=i.length(D);isFinite(O)&&O>k&&(k=O),z.push(O)}E=F}}var B=s(m,e.colormap,k,M);return l?B.tubeScale=l:(0===k&&(k=1),B.tubeScale=.5*o*M/k),B};var f=r(6740),p=r(6405).createMesh;e.exports.createTubeMesh=function(e,t){return p(e,t,{shaders:f,traceType:"streamtube"})}},990:function(e,t,r){var i=r(9405),n=r(3236),a=n([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute vec3 f; +attribute vec3 normal; + +uniform vec3 objectOffset; +uniform mat4 model, view, projection, inverseModel; +uniform vec3 lightPosition, eyePosition; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 localCoordinate = vec3(uv.zw, f.x); + worldCoordinate = objectOffset + localCoordinate; + mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); + vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 1.0); + vec4 clipPosition = projection * (view * worldPosition); + gl_Position = clipPosition; + kill = f.y; + value = f.z; + planeCoordinate = uv.xy; + + vColor = texture2D(colormap, vec2(value, value)); + + //Lighting geometry parameters + vec4 cameraCoordinate = view * worldPosition; + cameraCoordinate.xyz /= cameraCoordinate.w; + lightDirection = lightPosition - cameraCoordinate.xyz; + eyeDirection = eyePosition - cameraCoordinate.xyz; + surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); +} +`]),o=n([`precision highp float; +#define GLSLIFY 1 + +float beckmannDistribution(float x, float roughness) { + float NdotH = max(x, 0.0001); + float cos2Alpha = NdotH * NdotH; + float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; + float roughness2 = roughness * roughness; + float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; + return exp(tan2Alpha / roughness2) / denom; +} + +float beckmannSpecular( + vec3 lightDirection, + vec3 viewDirection, + vec3 surfaceNormal, + float roughness) { + return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); +} + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec3 lowerBound, upperBound; +uniform float contourTint; +uniform vec4 contourColor; +uniform sampler2D colormap; +uniform vec3 clipBounds[2]; +uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; +uniform float vertexColor; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + if ( + kill > 0.0 || + vColor.a == 0.0 || + outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) + ) discard; + + vec3 N = normalize(surfaceNormal); + vec3 V = normalize(eyeDirection); + vec3 L = normalize(lightDirection); + + if(gl_FrontFacing) { + N = -N; + } + + float specular = max(beckmannSpecular(L, V, N, roughness), 0.); + float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); + + //decide how to interpolate color \u2014 in vertex or in fragment + vec4 surfaceColor = + step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + + step(.5, vertexColor) * vColor; + + vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); + + gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; +} +`]),s=n([`precision highp float; +#define GLSLIFY 1 + +attribute vec4 uv; +attribute float f; + +uniform vec3 objectOffset; +uniform mat3 permutation; +uniform mat4 model, view, projection; +uniform float height, zOffset; +uniform sampler2D colormap; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 lightDirection, eyeDirection, surfaceNormal; +varying vec4 vColor; + +void main() { + vec3 dataCoordinate = permutation * vec3(uv.xy, height); + worldCoordinate = objectOffset + dataCoordinate; + mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); + vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 1.0); + + vec4 clipPosition = projection * (view * worldPosition); + clipPosition.z += zOffset; + + gl_Position = clipPosition; + value = f + objectOffset.z; + kill = -1.0; + planeCoordinate = uv.zw; + + vColor = texture2D(colormap, vec2(value, value)); + + //Don't do lighting for contours + surfaceNormal = vec3(1,0,0); + eyeDirection = vec3(0,1,0); + lightDirection = vec3(0,0,1); +} +`]),l=n([`precision highp float; +#define GLSLIFY 1 + +bool outOfRange(float a, float b, float p) { + return ((p > max(a, b)) || + (p < min(a, b))); +} + +bool outOfRange(vec2 a, vec2 b, vec2 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y)); +} + +bool outOfRange(vec3 a, vec3 b, vec3 p) { + return (outOfRange(a.x, b.x, p.x) || + outOfRange(a.y, b.y, p.y) || + outOfRange(a.z, b.z, p.z)); +} + +bool outOfRange(vec4 a, vec4 b, vec4 p) { + return outOfRange(a.xyz, b.xyz, p.xyz); +} + +uniform vec2 shape; +uniform vec3 clipBounds[2]; +uniform float pickId; + +varying float value, kill; +varying vec3 worldCoordinate; +varying vec2 planeCoordinate; +varying vec3 surfaceNormal; + +vec2 splitFloat(float v) { + float vh = 255.0 * v; + float upper = floor(vh); + float lower = fract(vh); + return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); +} + +void main() { + if ((kill > 0.0) || + (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; + + vec2 ux = splitFloat(planeCoordinate.x / shape.x); + vec2 uy = splitFloat(planeCoordinate.y / shape.y); + gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); +} +`]);t.createShader=function(e){var t=i(e,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createPickShader=function(e){var t=i(e,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t.attributes.normal.location=2,t},t.createContourShader=function(e){var t=i(e,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t},t.createPickContourShader=function(e){var t=i(e,s,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return t.attributes.uv.location=0,t.attributes.f.location=1,t}},9499:function(e,t,r){e.exports=function(e){var t=e.gl,r=v(t),i=b(t),s=x(t),l=_(t),c=n(t),u=a(t,[{buffer:c,size:4,stride:40,offset:0},{buffer:c,size:3,stride:40,offset:16},{buffer:c,size:3,stride:40,offset:28}]),h=n(t),d=a(t,[{buffer:h,size:4,stride:20,offset:0},{buffer:h,size:1,stride:20,offset:16}]),f=n(t),p=a(t,[{buffer:f,size:2,type:t.FLOAT}]),m=o(t,1,256,t.RGBA,t.UNSIGNED_BYTE);m.minFilter=t.LINEAR,m.magFilter=t.LINEAR;var g=new L(t,[0,0],[[0,0,0],[0,0,0]],r,i,c,u,m,s,l,h,d,f,p,[0,0,0]),y={levels:[[],[],[]]};for(var w in e)y[w]=e[w];return y.colormap=y.colormap||"jet",g.update(y),g};for(var i=r(8828),n=r(2762),a=r(8116),o=r(7766),s=r(1888),l=r(6729),c=r(5298),u=r(9994),h=r(9618),d=r(3711),f=r(6760),p=r(7608),m=r(2478),g=r(6199),y=r(990),v=y.createShader,x=y.createContourShader,b=y.createPickShader,_=y.createPickContourShader,w=[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]],M=[[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]],k=0;k<3;++k){var A=M[k],S=(k+1)%3,E=(k+2)%3;A[S+0]=1,A[E+3]=1,A[k+6]=1}function C(e,t,r,i,n){this.position=e,this.index=t,this.uv=r,this.level=i,this.dataCoordinate=n}function L(e,t,r,i,n,a,o,l,c,u,d,f,p,m,g){this.gl=e,this.shape=t,this.bounds=r,this.objectOffset=g,this.intensityBounds=[],this._shader=i,this._pickShader=n,this._coordinateBuffer=a,this._vao=o,this._colorMap=l,this._contourShader=c,this._contourPickShader=u,this._contourBuffer=d,this._contourVAO=f,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new C([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=p,this._dynamicVAO=m,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 P=L.prototype;P.genColormap=function(e,t){var r=!1,i=u([l({colormap:e,nshades:256,format:"rgba"}).map(function(e,i){var n=t?function(e,t){if(!t||!t.length)return 1;for(var r=0;re&&r>0){var i=(t[r][0]-e)/(t[r][0]-t[r-1][0]);return t[r][1]*(1-i)+i*t[r-1][1]}}return 1}(i/255,t):e[3];return n<1&&(r=!0),[e[0],e[1],e[2],255*n]})]);return c.divseq(i,255),this.hasAlphaScale=r,i},P.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},P.isOpaque=function(){return!this.isTransparent()},P.pickSlots=1,P.setPickBase=function(e){this.pickId=e};var I=[0,0,0],z={showSurface:!1,showContour:!1,projections:[w.slice(),w.slice(),w.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function D(e,t){var r,i,n,a=t.axes&&t.axes.lastCubeProps.axis||I,o=t.showSurface,s=t.showContour;for(r=0;r<3;++r)for(o=o||t.surfaceProject[r],i=0;i<3;++i)s=s||t.contourProject[r][i];for(r=0;r<3;++r){var l=z.projections[r];for(i=0;i<16;++i)l[i]=0;for(i=0;i<4;++i)l[5*i]=1;l[5*r]=0,l[12+r]=t.axesBounds[+(a[r]>0)][r],f(l,e.model,l);var c=z.clipBounds[r];for(n=0;n<2;++n)for(i=0;i<3;++i)c[n][i]=e.clipBounds[n][i];c[0][r]=-1e8,c[1][r]=1e8}return z.showSurface=o,z.showContour=s,z}var O={model:w,view:w,projection:w,inverseModel:w.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},R=w.slice(),F=[1,0,0,0,1,0,0,0,1];function j(e,t){e=e||{};var r=this.gl;r.disable(r.CULL_FACE),this._colorMap.bind(0),O.model=e.model||w,O.view=e.view||w,O.projection=e.projection||w,O.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],O.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],O.objectOffset=this.objectOffset,O.contourColor=this.contourColor[0],O.inverseModel=p(O.inverseModel,O.model);for(var i=0;i<2;++i)for(var n=O.clipBounds[i],a=0;a<3;++a)n[a]=Math.min(Math.max(this.clipBounds[i][a],-1e8),1e8);for(O.kambient=this.ambientLight,O.kdiffuse=this.diffuseLight,O.kspecular=this.specularLight,O.roughness=this.roughness,O.fresnel=this.fresnel,O.opacity=this.opacity,O.height=0,O.permutation=F,O.vertexColor=this.vertexColor,f(R,O.view,O.model),f(R,O.projection,R),p(R,R),i=0;i<3;++i)O.eyePosition[i]=R[12+i]/R[15];var o=R[15];for(i=0;i<3;++i)o+=this.lightPosition[i]*R[4*i+3];for(i=0;i<3;++i){var s=R[12+i];for(a=0;a<3;++a)s+=R[4*a+i]*this.lightPosition[a];O.lightPosition[i]=s/o}var l=D(O,this);if(l.showSurface){for(this._shader.bind(),this._shader.uniforms=O,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=l.projections[i],this._shader.uniforms.clipBounds=l.clipBounds[i],this._vao.draw(r.TRIANGLES,this._vertexCount));this._vao.unbind()}if(l.showContour){var c=this._contourShader;O.kambient=1,O.kdiffuse=0,O.kspecular=0,O.opacity=1,c.bind(),c.uniforms=O;var u=this._contourVAO;for(u.bind(),i=0;i<3;++i)for(c.uniforms.permutation=M[i],r.lineWidth(this.contourWidth[i]*this.pixelRatio),a=0;a>4)/16)/255,n=Math.floor(i),a=i-n,o=t[1]*(e.value[1]+(15&e.value[2])/16)/255,s=Math.floor(o),l=o-s;n+=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,d=0;d<2;++d)for(var f=d?l:1-l,p=n+u,g=s+d,y=h*f,v=0;v<3;++v)c[v]+=this._field[v].get(p,g)*y;for(var x=this._pickResult.level,b=0;b<3;++b)if(x[b]=m.le(this.contourLevels[b],c[b]),x[b]<0)this.contourLevels[b].length>0&&(x[b]=0);else if(x[b]Math.abs(w-c[b])&&(x[b]+=1)}for(r.index[0]=a<.5?n:n+1,r.index[1]=l<.5?s:s+1,r.uv[0]=i/t[0],r.uv[1]=o/t[1],v=0;v<3;++v)r.dataCoordinate[v]=this._field[v].get(r.index[0],r.index[1]);return r},P.padField=function(e,t){var r=t.shape.slice(),i=e.shape.slice();c.assign(e.lo(1,1).hi(r[0],r[1]),t),c.assign(e.lo(1).hi(r[0],1),t.hi(r[0],1)),c.assign(e.lo(1,i[1]-1).hi(r[0],1),t.lo(0,r[1]-1).hi(r[0],1)),c.assign(e.lo(0,1).hi(1,r[1]),t.hi(1)),c.assign(e.lo(i[0]-1,1).hi(1,r[1]),t.lo(r[0]-1)),e.set(0,0,t.get(0,0)),e.set(0,i[1]-1,t.get(0,r[1]-1)),e.set(i[0]-1,0,t.get(r[0]-1,0)),e.set(i[0]-1,i[1]-1,t.get(r[0]-1,r[1]-1))},P.update=function(e){e=e||{},this.objectOffset=e.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in e&&(this.contourWidth=N(e.contourWidth,Number)),"showContour"in e&&(this.showContour=N(e.showContour,Boolean)),"showSurface"in e&&(this.showSurface=!!e.showSurface),"contourTint"in e&&(this.contourTint=N(e.contourTint,Boolean)),"contourColor"in e&&(this.contourColor=V(e.contourColor)),"contourProject"in e&&(this.contourProject=N(e.contourProject,function(e){return N(e,Boolean)})),"surfaceProject"in e&&(this.surfaceProject=e.surfaceProject),"dynamicColor"in e&&(this.dynamicColor=V(e.dynamicColor)),"dynamicTint"in e&&(this.dynamicTint=N(e.dynamicTint,Number)),"dynamicWidth"in e&&(this.dynamicWidth=N(e.dynamicWidth,Number)),"opacity"in e&&(this.opacity=e.opacity),"opacityscale"in e&&(this.opacityscale=e.opacityscale),"colorBounds"in e&&(this.colorBounds=e.colorBounds),"vertexColor"in e&&(this.vertexColor=+!!e.vertexColor),"colormap"in e&&this._colorMap.setPixels(this.genColormap(e.colormap,this.opacityscale));var t=e.field||e.coords&&e.coords[2]||null,r=!1;if(t||(t=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 e||"coords"in e){var n=(t.shape[0]+2)*(t.shape[1]+2);n>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(i.nextPow2(n))),this._field[2]=h(this._field[2].data,[t.shape[0]+2,t.shape[1]+2]),this.padField(this._field[2],t),this.shape=t.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(e.coords){var l=e.coords;if(!Array.isArray(l)||3!==l.length)throw Error("gl-surface: invalid coordinates for x/y");for(o=0;o<2;++o){var c=l[o];for(y=0;y<2;++y)if(c.shape[y]!==a[y])throw Error("gl-surface: coords have incorrect shape");this.padField(this._field[o],c)}}else if(e.ticks){var u=e.ticks;if(!Array.isArray(u)||2!==u.length)throw Error("gl-surface: invalid ticks");for(o=0;o<2;++o){var f=u[o];if((Array.isArray(f)||f.length)&&(f=h(f)),f.shape[0]!==a[o])throw Error("gl-surface: invalid tick length");var p=h(f.data,a);p.stride[o]=f.stride[0],p.stride[1^o]=0,this.padField(this._field[o],p)}}else{for(o=0;o<2;++o){var m=[0,0];m[o]=1,this._field[o]=h(this._field[o].data,[a[0]+2,a[1]+2],m,0)}this._field[0].set(0,0,0);for(var y=0;y0){for(var ex=0;ex<5;++ex)J.pop();B-=1}continue e}J.push(ei[0],ei[1],eo[0],eo[1],ei[2]),B+=1}}er.push(B)}this._contourOffsets[Q]=et,this._contourCounts[Q]=er}var eb=s.mallocFloat(J.length);for(o=0;os||o[1]<0||o[1]>s)throw Error("gl-texture2d: Invalid texture size");var l=p(o,t.stride.slice()),c=0;"float32"===r?c=e.FLOAT:"float64"===r?(c=e.FLOAT,l=!1,r="float32"):"uint8"===r?c=e.UNSIGNED_BYTE:(c=e.UNSIGNED_BYTE,l=!1,r="uint8");var h=0;if(2===o.length)h=e.LUMINANCE,o=[o[0],o[1],1],t=i(t.data,o,[t.stride[0],t.stride[1],1],t.offset);else if(3===o.length)if(1===o[2])h=e.ALPHA;else if(2===o[2])h=e.LUMINANCE_ALPHA;else if(3===o[2])h=e.RGB;else if(4===o[2])h=e.RGBA;else throw Error("gl-texture2d: Invalid shape for pixel coords");else throw Error("gl-texture2d: Invalid shape for texture");c!==e.FLOAT||e.getExtension("OES_texture_float")||(c=e.UNSIGNED_BYTE,l=!1);var f,g,y=t.size;if(l)f=0===t.offset&&t.data.length===y?t.data:t.data.subarray(t.offset,t.offset+y);else{var v=[o[2],o[2]*o[0],1],x=i(g=a.malloc(y,r),o,v,0);("float32"===r||"float64"===r)&&c===e.UNSIGNED_BYTE?u(x,t):n.assign(x,t),f=g.subarray(0,y)}var b=m(e);return e.texImage2D(e.TEXTURE_2D,0,h,o[0],o[1],0,h,c,f),l||a.free(g),new d(e,b,o[0],o[1],h,c)}(e,v)}throw Error("gl-texture2d: Invalid arguments for texture2d constructor")};var o=null,s=null,l=null;function c(e){return"u">typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"u">typeof HTMLImageElement&&e instanceof HTMLImageElement||"u">typeof HTMLVideoElement&&e instanceof HTMLVideoElement||"u">typeof ImageData&&e instanceof ImageData}var u=function(e,t){n.muls(e,t,255)};function h(e,t,r){var i=e.gl,n=i.getParameter(i.MAX_TEXTURE_SIZE);if(t<0||t>n||r<0||r>n)throw Error("gl-texture2d: Invalid texture size");return e._shape=[t,r],e.bind(),i.texImage2D(i.TEXTURE_2D,0,e.format,t,r,0,e.format,e.type,null),e._mipLevels=[0],e}function d(e,t,r,i,n,a){this.gl=e,this.handle=t,this.format=n,this.type=a,this._shape=[r,i],this._mipLevels=[0],this._magFilter=e.NEAREST,this._minFilter=e.NEAREST,this._wrapS=e.CLAMP_TO_EDGE,this._wrapT=e.CLAMP_TO_EDGE,this._anisoSamples=1;var o=this,s=[this._wrapS,this._wrapT];Object.defineProperties(s,[{get:function(){return o._wrapS},set:function(e){return o.wrapS=e}},{get:function(){return o._wrapT},set:function(e){return o.wrapT=e}}]),this._wrapVector=s;var l=[this._shape[0],this._shape[1]];Object.defineProperties(l,[{get:function(){return o._shape[0]},set:function(e){return o.width=e}},{get:function(){return o._shape[1]},set:function(e){return o.height=e}}]),this._shapeVector=l}var f=d.prototype;function p(e,t){return 3===e.length?1===t[2]&&t[1]===e[0]*e[2]&&t[0]===e[2]:1===t[0]&&t[1]===e[0]}function m(e){var t=e.createTexture();return e.bindTexture(e.TEXTURE_2D,t),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.NEAREST),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t}function g(e,t,r,i,n){var a=e.getParameter(e.MAX_TEXTURE_SIZE);if(t<0||t>a||r<0||r>a)throw Error("gl-texture2d: Invalid texture shape");if(n===e.FLOAT&&!e.getExtension("OES_texture_float"))throw Error("gl-texture2d: Floating point textures not supported on this platform");var o=m(e);return e.texImage2D(e.TEXTURE_2D,0,i,t,r,0,i,n,null),new d(e,o,t,r,i,n)}Object.defineProperties(f,{minFilter:{get:function(){return this._minFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),0>s.indexOf(e))throw Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,e),this._minFilter=e}},magFilter:{get:function(){return this._magFilter},set:function(e){this.bind();var t=this.gl;if(this.type===t.FLOAT&&o.indexOf(e)>=0&&(t.getExtension("OES_texture_float_linear")||(e=t.NEAREST)),0>s.indexOf(e))throw Error("gl-texture2d: Unknown filter mode "+e);return t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,e),this._magFilter=e}},mipSamples:{get:function(){return this._anisoSamples},set:function(e){var t=this._anisoSamples;if(this._anisoSamples=0|Math.max(e,1),t!==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(e){if(this.bind(),0>l.indexOf(e))throw Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,e),this._wrapS=e}},wrapT:{get:function(){return this._wrapT},set:function(e){if(this.bind(),0>l.indexOf(e))throw Error("gl-texture2d: Unknown wrap mode "+e);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,e),this._wrapT=e}},wrap:{get:function(){return this._wrapVector},set:function(e){if(Array.isArray(e)||(e=[e,e]),2!==e.length)throw Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var t=0;t<2;++t)if(0>l.indexOf(e[t]))throw Error("gl-texture2d: Unknown wrap mode "+e);this._wrapS=e[0],this._wrapT=e[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),e}},shape:{get:function(){return this._shapeVector},set:function(e){if(Array.isArray(e)){if(2!==e.length)throw Error("gl-texture2d: Invalid texture shape")}else e=[0|e,0|e];return h(this,0|e[0],0|e[1]),[0|e[0],0|e[1]]}},width:{get:function(){return this._shape[0]},set:function(e){return h(this,e|=0,this._shape[1]),e}},height:{get:function(){return this._shape[1]},set:function(e){return e|=0,h(this,this._shape[0],e),e}}}),f.bind=function(e){var t=this.gl;return void 0!==e&&t.activeTexture(t.TEXTURE0+(0|e)),t.bindTexture(t.TEXTURE_2D,this.handle),void 0!==e?0|e:t.getParameter(t.ACTIVE_TEXTURE)-t.TEXTURE0},f.dispose=function(){this.gl.deleteTexture(this.handle)},f.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var e=Math.min(this._shape[0],this._shape[1]),t=0;e>0;++t,e>>>=1)0>this._mipLevels.indexOf(t)&&this._mipLevels.push(t)},f.setPixels=function(e,t,r,o){var s=this.gl;this.bind(),Array.isArray(t)?(o=r,r=0|t[1],t=0|t[0]):(t=t||0,r=r||0),o=o||0;var l=c(e)?e:e.raw;if(l)0>this._mipLevels.indexOf(o)?(s.texImage2D(s.TEXTURE_2D,0,this.format,this.format,this.type,l),this._mipLevels.push(o)):s.texSubImage2D(s.TEXTURE_2D,o,t,r,this.format,this.type,l);else if(e.shape&&e.stride&&e.data){if(e.shape.length<2||t+e.shape[1]>this._shape[1]>>>o||r+e.shape[0]>this._shape[0]>>>o||t<0||r<0)throw Error("gl-texture2d: Texture dimensions are out of bounds");!function(e,t,r,o,s,l,c,h){var d=h.dtype,f=h.shape.slice();if(f.length<2||f.length>3)throw Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var m=0,g=0,y=p(f,h.stride.slice());"float32"===d?m=e.FLOAT:"float64"===d?(m=e.FLOAT,y=!1,d="float32"):"uint8"===d?m=e.UNSIGNED_BYTE:(m=e.UNSIGNED_BYTE,y=!1,d="uint8");if(2===f.length)g=e.LUMINANCE,f=[f[0],f[1],1],h=i(h.data,f,[h.stride[0],h.stride[1],1],h.offset);else if(3===f.length){if(1===f[2])g=e.ALPHA;else if(2===f[2])g=e.LUMINANCE_ALPHA;else if(3===f[2])g=e.RGB;else if(4===f[2])g=e.RGBA;else throw Error("gl-texture2d: Invalid shape for pixel coords");f[2]}else throw Error("gl-texture2d: Invalid shape for texture");if((g===e.LUMINANCE||g===e.ALPHA)&&(s===e.LUMINANCE||s===e.ALPHA)&&(g=s),g!==s)throw Error("gl-texture2d: Incompatible texture format for setPixels");var v=h.size,x=0>c.indexOf(o);if(x&&c.push(o),m===l&&y)0===h.offset&&h.data.length===v?x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,h.data):e.texSubImage2D(e.TEXTURE_2D,o,t,r,f[0],f[1],s,l,h.data):x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,h.data.subarray(h.offset,h.offset+v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,f[0],f[1],s,l,h.data.subarray(h.offset,h.offset+v));else{var b=l===e.FLOAT?a.mallocFloat32(v):a.mallocUint8(v),_=i(b,f,[f[2],f[2]*f[0],1]);m===e.FLOAT&&l===e.UNSIGNED_BYTE?u(_,h):n.assign(_,h),x?e.texImage2D(e.TEXTURE_2D,o,s,f[0],f[1],0,s,l,b.subarray(0,v)):e.texSubImage2D(e.TEXTURE_2D,o,t,r,f[0],f[1],s,l,b.subarray(0,v)),l===e.FLOAT?a.freeFloat32(b):a.freeUint8(b)}}(s,t,r,o,this.format,this.type,this._mipLevels,e)}else throw Error("gl-texture2d: Unsupported data type")}},1433:function(e){e.exports=function(e,t,r){t?t.bind():e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null);var i=0|e.getParameter(e.MAX_VERTEX_ATTRIBS);if(r){if(r.length>i)throw Error("gl-vao: Too many vertex attributes");for(var n=0;n1?0:Math.acos(s)};var i=r(2825),n=r(3536),a=r(244)},9226:function(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},3126:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},3990:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},1091:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},5911:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=n*l-a*s,e[1]=a*o-i*l,e[2]=i*s-n*o,e}},5455:function(e,t,r){e.exports=r(7056)},7056:function(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return Math.sqrt(r*r+i*i+n*n)}},4008:function(e,t,r){e.exports=r(6690)},6690:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e}},244:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},2613:function(e){e.exports=1e-6},9922:function(e,t,r){e.exports=function(e,t){var r=e[0],n=e[1],a=e[2],o=t[0],s=t[1],l=t[2];return Math.abs(r-o)<=i*Math.max(1,Math.abs(r),Math.abs(o))&&Math.abs(n-s)<=i*Math.max(1,Math.abs(n),Math.abs(s))&&Math.abs(a-l)<=i*Math.max(1,Math.abs(a),Math.abs(l))};var i=r(2613)},9265:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},2681:function(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},5137:function(e,t,r){e.exports=function(e,t,r,n,a,o){var s,l;for(t||(t=3),r||(r=0),l=n?Math.min(n*t+r,e.length):e.length,s=r;s0&&(a=1/Math.sqrt(a),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a),e}},7636:function(e){e.exports=function(e,t){var r=2*Math.random()*Math.PI,i=2*Math.random()-1,n=Math.sqrt(1-i*i)*(t=t||1);return e[0]=Math.cos(r)*n,e[1]=Math.sin(r)*n,e[2]=i*t,e}},6894:function(e){e.exports=function(e,t,r,i){var n=r[1],a=r[2],o=t[1]-n,s=t[2]-a,l=Math.sin(i),c=Math.cos(i);return e[0]=t[0],e[1]=n+o*c-s*l,e[2]=a+o*l+s*c,e}},109:function(e){e.exports=function(e,t,r,i){var n=r[0],a=r[2],o=t[0]-n,s=t[2]-a,l=Math.sin(i),c=Math.cos(i);return e[0]=n+s*l+o*c,e[1]=t[1],e[2]=a+s*c-o*l,e}},8692:function(e){e.exports=function(e,t,r,i){var n=r[0],a=r[1],o=t[0]-n,s=t[1]-a,l=Math.sin(i),c=Math.cos(i);return e[0]=n+o*c-s*l,e[1]=a+o*l+s*c,e[2]=t[2],e}},2447:function(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},6621:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}},8489:function(e){e.exports=function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e}},1463:function(e){e.exports=function(e,t,r,i){return e[0]=t,e[1]=r,e[2]=i,e}},6141:function(e,t,r){e.exports=r(2953)},5486:function(e,t,r){e.exports=r(3066)},2953:function(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2];return r*r+i*i+n*n}},3066:function(e){e.exports=function(e){var t=e[0],r=e[1],i=e[2];return t*t+r*r+i*i}},2229:function(e,t,r){e.exports=r(6843)},6843:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e}},492:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2];return e[0]=i*r[0]+n*r[3]+a*r[6],e[1]=i*r[1]+n*r[4]+a*r[7],e[2]=i*r[2]+n*r[5]+a*r[8],e}},5673:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[3]*i+r[7]*n+r[11]*a+r[15];return o=o||1,e[0]=(r[0]*i+r[4]*n+r[8]*a+r[12])/o,e[1]=(r[1]*i+r[5]*n+r[9]*a+r[13])/o,e[2]=(r[2]*i+r[6]*n+r[10]*a+r[14])/o,e}},264:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*i+s*a-l*n,h=c*n+l*i-o*a,d=c*a+o*n-s*i,f=-o*i-s*n-l*a;return e[0]=u*c+-(f*o)+-(h*l)- -(d*s),e[1]=h*c+-(f*s)+-(d*o)- -(u*l),e[2]=d*c+-(f*l)+-(u*s)- -(h*o),e}},4361:function(e){e.exports=function(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e[3]=t[3]+r[3],e}},2335:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},2933:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},7536:function(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},4691:function(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return Math.sqrt(r*r+i*i+n*n+a*a)}},1373:function(e){e.exports=function(e,t,r){return e[0]=t[0]/r[0],e[1]=t[1]/r[1],e[2]=t[2]/r[2],e[3]=t[3]/r[3],e}},3750:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},3390:function(e){e.exports=function(e,t,r,i){var n=new Float32Array(4);return n[0]=e,n[1]=t,n[2]=r,n[3]=i,n}},9970:function(e,t,r){e.exports={create:r(7536),clone:r(2335),fromValues:r(3390),copy:r(2933),set:r(4578),add:r(4361),subtract:r(6860),multiply:r(3576),divide:r(1373),min:r(2334),max:r(160),scale:r(9288),scaleAndAdd:r(4844),distance:r(4691),squaredDistance:r(7960),length:r(6808),squaredLength:r(483),negate:r(1498),inverse:r(4494),normalize:r(5177),dot:r(3750),lerp:r(2573),random:r(9131),transformMat4:r(5352),transformQuat:r(4041)}},4494:function(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},6808:function(e){e.exports=function(e){var t=e[0],r=e[1],i=e[2],n=e[3];return Math.sqrt(t*t+r*r+i*i+n*n)}},2573:function(e){e.exports=function(e,t,r,i){var n=t[0],a=t[1],o=t[2],s=t[3];return e[0]=n+i*(r[0]-n),e[1]=a+i*(r[1]-a),e[2]=o+i*(r[2]-o),e[3]=s+i*(r[3]-s),e}},160:function(e){e.exports=function(e,t,r){return e[0]=Math.max(t[0],r[0]),e[1]=Math.max(t[1],r[1]),e[2]=Math.max(t[2],r[2]),e[3]=Math.max(t[3],r[3]),e}},2334:function(e){e.exports=function(e,t,r){return e[0]=Math.min(t[0],r[0]),e[1]=Math.min(t[1],r[1]),e[2]=Math.min(t[2],r[2]),e[3]=Math.min(t[3],r[3]),e}},3576:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e}},1498:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},5177:function(e){e.exports=function(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=r*r+i*i+n*n+a*a;return o>0&&(o=1/Math.sqrt(o),e[0]=r*o,e[1]=i*o,e[2]=n*o,e[3]=a*o),e}},9131:function(e,t,r){var i=r(5177),n=r(9288);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),i(e,e),n(e,e,t),e}},9288:function(e){e.exports=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e}},4844:function(e){e.exports=function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e[3]=t[3]+r[3]*i,e}},4578:function(e){e.exports=function(e,t,r,i,n){return e[0]=t,e[1]=r,e[2]=i,e[3]=n,e}},7960:function(e){e.exports=function(e,t){var r=t[0]-e[0],i=t[1]-e[1],n=t[2]-e[2],a=t[3]-e[3];return r*r+i*i+n*n+a*a}},483:function(e){e.exports=function(e){var t=e[0],r=e[1],i=e[2],n=e[3];return t*t+r*r+i*i+n*n}},6860:function(e){e.exports=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e[3]=t[3]-r[3],e}},5352:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*o,e[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*o,e[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*o,e[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*o,e}},4041:function(e){e.exports=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2],c=r[3],u=c*i+s*a-l*n,h=c*n+l*i-o*a,d=c*a+o*n-s*i,f=-o*i-s*n-l*a;return e[0]=u*c+-(f*o)+-(h*l)- -(d*s),e[1]=h*c+-(f*s)+-(d*o)- -(u*l),e[2]=d*c+-(f*l)+-(u*s)- -(h*o),e[3]=t[3],e}},1848:function(e,t,r){var i=r(4905),n=r(6468);e.exports=function(e){for(var t=Array.isArray(e)?e:i(e),r=0;r0)continue;r=e.slice(0,1).join("")}return k(r),y+=r.length,(f=f.slice(r.length)).length}}};var i=r(620),n=r(7827),a=r(6852),o=r(7932),s=r(3508),l=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3508:function(e,t,r){var i=r(6852);e.exports=(i=i.slice().filter(function(e){return!/^(gl\_|texture)/.test(e)})).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"])},6852:function(e){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"]},7932:function(e,t,r){e.exports=r(620).slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","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"])},620:function(e){e.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","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"]},7827:function(e){e.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(e,t,r){var i=r(5874);e.exports=function(e,t){var r=i(t),n=[];return(n=n.concat(r(e))).concat(r(null))}},3236:function(e){e.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],i=0;i>1,u=-7,h=r?n-1:0,d=r?-1:1,f=e[t+h];for(h+=d,a=f&(1<<-u)-1,f>>=-u,u+=s;u>0;a=256*a+e[t+h],h+=d,u-=8);for(o=a&(1<<-u)-1,a>>=-u,u+=i;u>0;o=256*o+e[t+h],h+=d,u-=8);if(0===a)a=1-c;else{if(a===l)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,i),a-=c}return(f?-1:1)*o*Math.pow(2,a-i)},t.write=function(e,t,r,i,n,a){var o,s,l,c=8*a-n-1,u=(1<>1,d=5960464477539062e-23*(23===n),f=i?0:a-1,p=i?1:-1,m=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(s=+!!isNaN(t),o=u):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+h>=1?t+=d/l:t+=d*Math.pow(2,1-h),t*l>=2&&(o++,l/=2),o+h>=u?(s=0,o=u):o+h>=1?(s=(t*l-1)*Math.pow(2,n),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,n),o=0));n>=8;e[r+f]=255&s,f+=p,s/=256,n-=8);for(o=o<0;e[r+f]=255&o,f+=p,o/=256,c-=8);e[r+f-p]|=128*m}},8954:function(e,t,r){e.exports=function(e,t){var r=e.length;if(0===r)throw Error("Must have at least d+1 points");var n=e[0].length;if(r<=n)throw Error("Must input at least d+1 points");var o=e.slice(0,n+1),s=i.apply(void 0,o);if(0===s)throw Error("Input not in general position");for(var l=Array(n+1),u=0;u<=n;++u)l[u]=u;s<0&&(l[0]=1,l[1]=0);for(var h=new a(l,Array(n+1),!1),d=h.adjacent,f=Array(n+2),u=0;u<=n;++u){for(var p=l.slice(),m=0;m<=n;++m)m===u&&(p[m]=-1);var g=p[0];p[0]=p[1],p[1]=g;var y=new a(p,Array(n+1),!0);d[u]=y,f[u]=y}f[n+1]=h;for(var u=0;u<=n;++u)for(var p=d[u].vertices,v=d[u].adjacent,m=0;m<=n;++m){var x=p[m];if(x<0){v[m]=h;continue}for(var b=0;b<=n;++b)0>d[b].vertices.indexOf(x)&&(v[m]=d[b])}for(var _=new c(n,o,f),w=!!t,u=n+1;u0;){e=o.pop();for(var s=e.adjacent,l=0;l<=r;++l){var c=s[l];if(!(!c.boundary||c.lastVisited<=-i)){for(var u=c.vertices,h=0;h<=r;++h){var d=u[h];d<0?n[h]=t:n[h]=a[d]}var f=this.orient();if(f>0)return c;c.lastVisited=-i,0===f&&o.push(c)}}}return null},u.walk=function(e,t){var r=this.vertices.length-1,i=this.dimension,n=this.vertices,a=this.tuple,o=t?this.interior.length*Math.random()|0:this.interior.length-1,s=this.interior[o];e:for(;!s.boundary;){for(var l=s.vertices,c=s.adjacent,u=0;u<=i;++u)a[u]=n[l[u]];s.lastVisited=r;for(var u=0;u<=i;++u){var h=c[u];if(!(h.lastVisited>=r)){var d=a[u];a[u]=e;var f=this.orient();if(a[u]=d,f<0){s=h;continue e}h.boundary?h.lastVisited=-r:h.lastVisited=r}}return}return s},u.addPeaks=function(e,t){var r=this.vertices.length-1,i=this.dimension,n=this.vertices,l=this.tuple,c=this.interior,u=this.simplices,h=[t];t.lastVisited=r,t.vertices[t.vertices.indexOf(-1)]=r,t.boundary=!1,c.push(t);for(var d=[];h.length>0;){var t=h.pop(),f=t.vertices,p=t.adjacent,m=f.indexOf(r);if(!(m<0)){for(var g=0;g<=i;++g)if(g!==m){var y=p[g];if(!(!y.boundary||y.lastVisited>=r)){var v=y.vertices;if(y.lastVisited!==-r){for(var x=0,b=0;b<=i;++b)v[b]<0?(x=b,l[b]=e):l[b]=n[v[b]];if(this.orient()>0){v[x]=r,y.boundary=!1,c.push(y),h.push(y),y.lastVisited=r;continue}y.lastVisited=-r}var _=y.adjacent,w=f.slice(),T=p.slice(),M=new a(w,T,!0);u.push(M);var k=_.indexOf(t);if(!(k<0)){_[k]=M,T[m]=y,w[g]=-1,T[g]=t,p[g]=M,M.flip();for(var b=0;b<=i;++b){var A=w[b];if(!(A<0||A===r)){for(var S=Array(i-1),E=0,C=0;C<=i;++C){var L=w[C];L<0||C===b||(S[E++]=L)}d.push(new o(S,M,b))}}}}}}}d.sort(s);for(var g=0;g+1=0?o[l++]=s[u]:c=1&u;if(c===(1&e)){var h=o[0];o[0]=o[1],o[1]=h}t.push(o)}}return t}},3352:function(e,t,r){var i=r(2478);function n(e,t,r,i,n){this.mid=e,this.left=t,this.right=r,this.leftPoints=i,this.rightPoints=n,this.count=(t?t.count:0)+(r?r.count:0)+i.length}e.exports=function(e){return new y(e&&0!==e.length?g(e):null)};var a=n.prototype;function o(e,t){e.mid=t.mid,e.left=t.left,e.right=t.right,e.leftPoints=t.leftPoints,e.rightPoints=t.rightPoints,e.count=t.count}function s(e,t){var r=g(t);e.mid=r.mid,e.left=r.left,e.right=r.right,e.leftPoints=r.leftPoints,e.rightPoints=r.rightPoints,e.count=r.count}function l(e,t){var r=e.intervals([]);r.push(t),s(e,r)}function c(e,t){var r=e.intervals([]),i=r.indexOf(t);return i<0?0:(r.splice(i,1),s(e,r),1)}function u(e,t,r){for(var i=0;i=0&&e[i][1]>=t;--i){var n=r(e[i]);if(n)return n}}function d(e,t){for(var r=0;r>1],a=[],o=[],s=[],r=0;r3*(t+1)?l(this,e):this.left.insert(e):this.left=g([e]);else if(e[0]>this.mid)this.right?4*(this.right.count+1)>3*(t+1)?l(this,e):this.right.insert(e):this.right=g([e]);else{var r=i.ge(this.leftPoints,e,p),n=i.ge(this.rightPoints,e,m);this.leftPoints.splice(r,0,e),this.rightPoints.splice(n,0,e)}},a.remove=function(e){var t=this.count-this.leftPoints;if(e[1]3*(t-1))return c(this,e);var r=this.left.remove(e);return 2===r?(this.left=null,this.count-=1,1):(1===r&&(this.count-=1),r)}if(e[0]>this.mid){if(!this.right)return 0;if(4*(this.left?this.left.count:0)>3*(t-1))return c(this,e);var r=this.right.remove(e);return 2===r?(this.right=null,this.count-=1,1):(1===r&&(this.count-=1),r)}if(1===this.count)return 2*(this.leftPoints[0]===e);if(1===this.leftPoints.length&&this.leftPoints[0]===e){if(this.left&&this.right){for(var n=this,a=this.left;a.right;)n=a,a=a.right;if(n===this)a.right=this.right;else{var s=this.left,r=this.right;n.count-=a.count,n.right=a.left,a.left=s,a.right=r}o(this,a),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?o(this,this.left):o(this,this.right);return 1}for(var s=i.ge(this.leftPoints,e,p);sthis.mid))return d(this.leftPoints,t);if(this.right){var r=this.right.queryPoint(e,t);if(r)return r}return h(this.rightPoints,e,t)},a.queryInterval=function(e,t,r){if(ethis.mid&&this.right){var i=this.right.queryInterval(e,t,r);if(i)return i}return tthis.mid?h(this.rightPoints,e,r):d(this.leftPoints,r)};var v=y.prototype;v.insert=function(e){this.root?this.root.insert(e):this.root=new n(e[0],null,null,[e],[e])},v.remove=function(e){if(this.root){var t=this.root.remove(e);return 2===t&&(this.root=null),0!==t}return!1},v.queryPoint=function(e,t){if(this.root)return this.root.queryPoint(e,t)},v.queryInterval=function(e,t,r){if(e<=t&&this.root)return this.root.queryInterval(e,t,r)},Object.defineProperty(v,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(v,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9507:function(e){e.exports=!0},7163:function(e){function t(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}e.exports=function(e){var r;return null!=e&&(t(e)||"function"==typeof(r=e).readFloatLE&&"function"==typeof r.slice&&t(r.slice(0,0))||!!e._isBuffer)}},5219:function(e){e.exports=function(e){for(var t,r=e.length,i=0;i13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},395:function(e){e.exports=function(e,t,r){return e*(1-r)+t*r}},2652:function(e,t,r){var i=r(4335),n=r(6864),a=r(1903),o=r(9921),s=r(7608),l=r(5665),c={length:r(1387),normalize:r(3536),dot:r(244),cross:r(5911)},u=n(),h=n(),d=[0,0,0,0],f=[[0,0,0],[0,0,0],[0,0,0]],p=[0,0,0];function m(e,t,r,i,n){e[0]=t[0]*i+r[0]*n,e[1]=t[1]*i+r[1]*n,e[2]=t[2]*i+r[2]*n}e.exports=function(e,t,r,n,g,y){if(t||(t=[0,0,0]),r||(r=[0,0,0]),n||(n=[0,0,0]),g||(g=[0,0,0,1]),y||(y=[0,0,0,1]),!i(u,e)||(a(h,u),h[3]=0,h[7]=0,h[11]=0,h[15]=1,Math.abs(1e-8>o(h))))return!1;var v,x,b,_,w,T,M,k,A,S=u[3],E=u[7],C=u[11],L=u[12],P=u[13],I=u[14],z=u[15];if(0!==S||0!==E||0!==C){if(d[0]=S,d[1]=E,d[2]=C,d[3]=z,!s(h,h))return!1;l(h,h),v=g,x=d,b=h,_=x[0],w=x[1],T=x[2],M=x[3],v[0]=b[0]*_+b[4]*w+b[8]*T+b[12]*M,v[1]=b[1]*_+b[5]*w+b[9]*T+b[13]*M,v[2]=b[2]*_+b[6]*w+b[10]*T+b[14]*M,v[3]=b[3]*_+b[7]*w+b[11]*T+b[15]*M}else g[0]=g[1]=g[2]=0,g[3]=1;if(t[0]=L,t[1]=P,t[2]=I,k=f,A=u,k[0][0]=A[0],k[0][1]=A[1],k[0][2]=A[2],k[1][0]=A[4],k[1][1]=A[5],k[1][2]=A[6],k[2][0]=A[8],k[2][1]=A[9],k[2][2]=A[10],r[0]=c.length(f[0]),c.normalize(f[0],f[0]),n[0]=c.dot(f[0],f[1]),m(f[1],f[1],f[0],1,-n[0]),r[1]=c.length(f[1]),c.normalize(f[1],f[1]),n[0]/=r[1],n[1]=c.dot(f[0],f[2]),m(f[2],f[2],f[0],1,-n[1]),n[2]=c.dot(f[1],f[2]),m(f[2],f[2],f[1],1,-n[2]),r[2]=c.length(f[2]),c.normalize(f[2],f[2]),n[1]/=r[2],n[2]/=r[2],c.cross(p,f[1],f[2]),0>c.dot(f[0],p))for(var D=0;D<3;D++)r[D]*=-1,f[D][0]*=-1,f[D][1]*=-1,f[D][2]*=-1;return y[0]=.5*Math.sqrt(Math.max(1+f[0][0]-f[1][1]-f[2][2],0)),y[1]=.5*Math.sqrt(Math.max(1-f[0][0]+f[1][1]-f[2][2],0)),y[2]=.5*Math.sqrt(Math.max(1-f[0][0]-f[1][1]+f[2][2],0)),y[3]=.5*Math.sqrt(Math.max(1+f[0][0]+f[1][1]+f[2][2],0)),f[2][1]>f[1][2]&&(y[0]=-y[0]),f[0][2]>f[2][0]&&(y[1]=-y[1]),f[1][0]>f[0][1]&&(y[2]=-y[2]),!0}},4335:function(e){e.exports=function(e,t){var r=t[15];if(0===r)return!1;for(var i=1/r,n=0;n<16;n++)e[n]=t[n]*i;return!0}},7442:function(e,t,r){var i=r(6658),n=r(7182),a=r(2652),o=r(9921),s=r(8648),l=h(),c=h(),u=h();function h(){return{translate:d(),scale:d(1),skew:d(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function d(e){return[e||0,e||0,e||0]}e.exports=function(e,t,r,h){if(0===o(t)||0===o(r))return!1;var d=a(t,l.translate,l.scale,l.skew,l.perspective,l.quaternion),f=a(r,c.translate,c.scale,c.skew,c.perspective,c.quaternion);return!!d&&!!f&&(i(u.translate,l.translate,c.translate,h),i(u.skew,l.skew,c.skew,h),i(u.scale,l.scale,c.scale,h),i(u.perspective,l.perspective,c.perspective,h),s(u.quaternion,l.quaternion,c.quaternion,h),n(e,u.translate,u.scale,u.skew,u.perspective,u.quaternion),!0)}},7182:function(e,t,r){var i={identity:r(7894),translate:r(7656),multiply:r(6760),create:r(6864),scale:r(2504),fromRotationTranslation:r(6743)},n=(i.create(),i.create());e.exports=function(e,t,r,a,o,s){return i.identity(e),i.fromRotationTranslation(e,s,t),e[3]=o[0],e[7]=o[1],e[11]=o[2],e[15]=o[3],i.identity(n),0!==a[2]&&(n[9]=a[2],i.multiply(e,e,n)),0!==a[1]&&(n[9]=0,n[8]=a[1],i.multiply(e,e,n)),0!==a[0]&&(n[8]=0,n[4]=a[0],i.multiply(e,e,n)),i.scale(e,e,r),e}},1811:function(e,t,r){var i=r(2478),n=r(7442),a=r(7608),o=r(5567),s=r(2408),l=r(7089),c=r(6582),u=r(7656),h=(r(2504),r(3536)),d=[0,0,0];function f(e){this._components=e.slice(),this._time=[0],this.prevMatrix=e.slice(),this.nextMatrix=e.slice(),this.computedMatrix=e.slice(),this.computedInverse=e.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(e){return new f((e=e||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var p=f.prototype;p.recalcMatrix=function(e){var t=this._time,r=i.le(t,e),o=this.computedMatrix;if(!(r<0)){var s=this._components;if(r===t.length-1)for(var l=16*r,c=0;c<16;++c)o[c]=s[l++];else{for(var u=t[r+1]-t[r],l=16*r,d=this.prevMatrix,f=!0,c=0;c<16;++c)d[c]=s[l++];for(var p=this.nextMatrix,c=0;c<16;++c)p[c]=s[l++],f=f&&d[c]===p[c];if(u<1e-6||f)for(var c=0;c<16;++c)o[c]=d[c];else n(o,d,p,(e-t[r])/u)}var m=this.computedUp;m[0]=o[1],m[1]=o[5],m[2]=o[9],h(m,m);var g=this.computedInverse;a(g,o);var y=this.computedEye,v=g[15];y[0]=g[12]/v,y[1]=g[13]/v,y[2]=g[14]/v;for(var x=this.computedCenter,b=Math.exp(this.computedRadius[0]),c=0;c<3;++c)x[c]=y[c]-o[2+4*c]*b}},p.idle=function(e){if(!(e1&&0>=i(e[o[u-2]],e[o[u-1]],c);)u-=1,o.pop();for(o.push(l),u=s.length;u>1&&i(e[s[u-2]],e[s[u-1]],c)>=0;)u-=1,s.pop();s.push(l)}for(var r=Array(s.length+o.length-2),h=0,n=0,d=o.length;n0;--f)r[h++]=s[f];return r};var i=r(3250)[3]},351:function(e,t,r){e.exports=function(e,t){t||(t=e,e=window);var r=0,n=0,a=0,o={shift:!1,alt:!1,control:!1,meta:!1},s=!1;function l(e){var t=!1;return"altKey"in e&&(t=t||e.altKey!==o.alt,o.alt=!!e.altKey),"shiftKey"in e&&(t=t||e.shiftKey!==o.shift,o.shift=!!e.shiftKey),"ctrlKey"in e&&(t=t||e.ctrlKey!==o.control,o.control=!!e.ctrlKey),"metaKey"in e&&(t=t||e.metaKey!==o.meta,o.meta=!!e.metaKey),t}function c(e,s){var c=i.x(s),u=i.y(s);"buttons"in s&&(e=0|s.buttons),(e!==r||c!==n||u!==a||l(s))&&(r=0|e,n=c||0,a=u||0,t&&t(r,n,a,o))}function u(e){c(0,e)}function h(){(r||n||a||o.shift||o.alt||o.meta||o.control)&&(n=a=0,r=0,o.shift=o.alt=o.control=o.meta=!1,t&&t(0,0,0,o))}function d(e){l(e)&&t&&t(r,n,a,o)}function f(e){0===i.buttons(e)?c(0,e):c(r,e)}function p(e){c(r|i.buttons(e),e)}function m(e){c(r&~i.buttons(e),e)}function g(){s||(s=!0,e.addEventListener("mousemove",f),e.addEventListener("mousedown",p),e.addEventListener("mouseup",m),e.addEventListener("mouseleave",u),e.addEventListener("mouseenter",u),e.addEventListener("mouseout",u),e.addEventListener("mouseover",u),e.addEventListener("blur",h),e.addEventListener("keyup",d),e.addEventListener("keydown",d),e.addEventListener("keypress",d),e!==window&&(window.addEventListener("blur",h),window.addEventListener("keyup",d),window.addEventListener("keydown",d),window.addEventListener("keypress",d)))}g();var y={element:e};return Object.defineProperties(y,{enabled:{get:function(){return s},set:function(t){t?g():s&&(s=!1,e.removeEventListener("mousemove",f),e.removeEventListener("mousedown",p),e.removeEventListener("mouseup",m),e.removeEventListener("mouseleave",u),e.removeEventListener("mouseenter",u),e.removeEventListener("mouseout",u),e.removeEventListener("mouseover",u),e.removeEventListener("blur",h),e.removeEventListener("keyup",d),e.removeEventListener("keydown",d),e.removeEventListener("keypress",d),e!==window&&(window.removeEventListener("blur",h),window.removeEventListener("keyup",d),window.removeEventListener("keydown",d),window.removeEventListener("keypress",d)))},enumerable:!0},buttons:{get:function(){return r},enumerable:!0},x:{get:function(){return n},enumerable:!0},y:{get:function(){return a},enumerable:!0},mods:{get:function(){return o},enumerable:!0}}),y};var i=r(4687)},24:function(e){var t={left:0,top:0};e.exports=function(e,r,i){r=r||e.currentTarget||e.srcElement,Array.isArray(i)||(i=[0,0]);var n,a=e.clientX||0,o=e.clientY||0,s=(n=r)===window||n===document||n===document.body?t:n.getBoundingClientRect();return i[0]=a-s.left,i[1]=o-s.top,i}},4687:function(e,t){function r(e){return e.target||e.srcElement||window}t.buttons=function(e){if("object"==typeof e){if("buttons"in e)return e.buttons;if("which"in e){var t=e.which;if(2===t)return 4;if(3===t)return 2;if(t>0)return 1<=0)return 1<(e.scalarArguments||0)&&t("Scalar arg count must be > 0"),"function"!=typeof e.vertex&&t("Must specify vertex creation function"),"function"!=typeof e.cell&&t("Must specify cell creation function"),"function"!=typeof e.phase&&t("Must specify phase function");for(var c=e.getters||[],u=Array(l),h=0;h=0?u[h]=!0:u[h]=!1;return r=e.vertex,a=e.cell,o=e.phase,(0,n[[u,s].join(",")])(r,a,o,i.mallocUint32,i.freeUint32)};var n={"false,0,1":function(e,t,r,i,n){return function(a,o,s,l){var c,u=0|a.shape[0],h=0|a.shape[1],d=a.data,f=0|a.offset,p=0|a.stride[0],m=0|a.stride[1],g=f,y=0|-p,v=0,x=0|-m,b=0,_=-p-m|0,w=0,T=0|p,M=m-p*u|0,k=0,A=0,S=0,E=2*u|0,C=i(E),L=i(E),P=0,I=0,z=-1,D=-1,O=0,R=0|-u,F=0|u,j=0,B=-u-1|0,N=u-1|0,U=0,V=0,q=0;for(k=0;k0){if(A=1,C[P++]=r(d[g],o,s,l),g+=T,u>0)for(k=1,c=d[g],I=C[P]=r(c,o,s,l),O=C[P+z],j=C[P+R],U=C[P+B],(I!==O||I!==j||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,O,j,U,o,s,l),V=L[P]=S++),P+=1,g+=T,k=2;k0)for(k=1,c=d[g],I=C[P]=r(c,o,s,l),O=C[P+z],j=C[P+R],U=C[P+B],(I!==O||I!==j||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,O,j,U,o,s,l),V=L[P]=S++,U!==j&&t(L[P+R],V,b,w,j,U,o,s,l)),P+=1,g+=T,k=2;k0){if(k=1,C[P++]=r(d[g],o,s,l),g+=T,h>0)for(A=1,c=d[g],I=C[P]=r(c,o,s,l),j=C[P+R],O=C[P+z],U=C[P+B],(I!==j||I!==O||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,j,O,U,o,s,l),V=L[P]=S++),P+=1,g+=T,A=2;A0)for(A=1,c=d[g],I=C[P]=r(c,o,s,l),j=C[P+R],O=C[P+z],U=C[P+B],(I!==j||I!==O||I!==U)&&(v=d[g+y],e(k,A,c,v,b=d[g+x],w=d[g+_],I,j,O,U,o,s,l),V=L[P]=S++,U!==j&&t(L[P+R],V,w,v,U,j,o,s,l)),P+=1,g+=T,A=2;A2&&a[1]>2&&i(n.pick(-1,-1).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,0).lo(1,1).hi(a[0]-2,a[1]-2),e.pick(-1,-1,1).lo(1,1).hi(a[0]-2,a[1]-2)),a[1]>2&&(r(n.pick(0,-1).lo(1).hi(a[1]-2),e.pick(0,-1,1).lo(1).hi(a[1]-2)),t(e.pick(0,-1,0).lo(1).hi(a[1]-2))),a[1]>2&&(r(n.pick(a[0]-1,-1).lo(1).hi(a[1]-2),e.pick(a[0]-1,-1,1).lo(1).hi(a[1]-2)),t(e.pick(a[0]-1,-1,0).lo(1).hi(a[1]-2))),a[0]>2&&(r(n.pick(-1,0).lo(1).hi(a[0]-2),e.pick(-1,0,0).lo(1).hi(a[0]-2)),t(e.pick(-1,0,1).lo(1).hi(a[0]-2))),a[0]>2&&(r(n.pick(-1,a[1]-1).lo(1).hi(a[0]-2),e.pick(-1,a[1]-1,0).lo(1).hi(a[0]-2)),t(e.pick(-1,a[1]-1,1).lo(1).hi(a[0]-2))),e.set(0,0,0,0),e.set(0,0,1,0),e.set(a[0]-1,0,0,0),e.set(a[0]-1,0,1,0),e.set(0,a[1]-1,0,0),e.set(0,a[1]-1,1,0),e.set(a[0]-1,a[1]-1,0,0),e.set(a[0]-1,a[1]-1,1,0),e}}e.exports=function(e,t,r){return(Array.isArray(r)||(r="string"==typeof r?i(t.dimension,r):i(t.dimension,"clamp")),0===t.size)?e:0===t.dimension?(e.set(0),e):(function(e){var t,r=e.join(),i=c[r];if(i)return i;for(var n=e.length,a=[u,h],o=1;o<=n;++o)a.push((t=o)in l?l[t]:l[t]=s({funcName:"fdTemplate"+t}));var i=d.apply(void 0,a);return c[r]=i,i})(r)(e,t)}},4317:function(e){function t(e,t){var r=Math.floor(t),i=t-r,n=0<=r&&r0;){x<64?(l=x,x=0):(l=64,x-=64);for(var b=0|e[1];b>0;){b<64?(c=b,b=0):(c=64,b-=64),i=y+x*h+b*d,o=v+x*p+b*m;var _=0,w=0,T=0,M=h-u*f,k=d-l*h,A=p-u*g,S=m-l*p;for(T=0;T0;){m<64?(l=m,m=0):(l=64,m-=64);for(var g=0|e[0];g>0;){g<64?(s=g,g=0):(s=64,g-=64),i=f+m*u+g*c,o=p+m*d+g*h;var y=0,v=0,x=c-l*u,b=h-l*d;for(v=0;v0;){v<64?(c=v,v=0):(c=64,v-=64);for(var x=0|e[0];x>0;){x<64?(s=x,x=0):(s=64,x-=64);for(var b=0|e[1];b>0;){b<64?(l=b,b=0):(l=64,b-=64),i=g+v*d+x*u+b*h,o=y+v*m+x*f+b*p;var _=0,w=0,T=0,M=u-c*d,k=h-s*u,A=f-c*m,S=p-s*f;for(T=0;Tr;){for(y=0,v=m-o,g=0;gb)break;v+=h,y+=d}for(y=m,v=m-o,g=0;g>1,H=q-N,G=q+N,W=U,Y=H,Z=q,$=G,X=V,K=n+1,J=a-1,Q=!0,ee=0,et=0,er=0,ei=t(h),en=t(h);for(k=l*W,A=l*Y,B=s,M=0;M0){g=W,W=Y,Y=g;break}if(er<0)break;B+=f}for(k=l*$,A=l*X,B=s,M=0;M0){g=$,$=X,X=g;break}if(er<0)break;B+=f}for(k=l*W,A=l*Z,B=s,M=0;M0){g=W,W=Z,Z=g;break}if(er<0)break;B+=f}for(k=l*Y,A=l*Z,B=s,M=0;M0){g=Y,Y=Z,Z=g;break}if(er<0)break;B+=f}for(k=l*W,A=l*$,B=s,M=0;M0){g=W,W=$,$=g;break}if(er<0)break;B+=f}for(k=l*Z,A=l*$,B=s,M=0;M0){g=Z,Z=$,$=g;break}if(er<0)break;B+=f}for(k=l*Y,A=l*X,B=s,M=0;M0){g=Y,Y=X,X=g;break}if(er<0)break;B+=f}for(k=l*Y,A=l*Z,B=s,M=0;M0){g=Y,Y=Z,Z=g;break}if(er<0)break;B+=f}for(k=l*$,A=l*X,B=s,M=0;M0){g=$,$=X,X=g;break}if(er<0)break;B+=f}for(k=l*W,A=l*Y,S=l*Z,E=l*$,C=l*X,L=l*U,P=l*q,I=l*V,j=0,B=s,M=0;M0)J--;else if(er<0){for(k=l*b,A=l*K,S=l*J,B=s,M=0;M0)for(;;){for(_=s+J*l,j=0,M=0;M0){if(--JV){e:for(;;){for(_=s+K*l,j=0,B=s,M=0;M1&&l?c(h,l[0],l[1]):c(h));return u(h,d)}},446:function(e,t,r){var i=r(7640),n={};e.exports=function(e){var t=e.order,r=e.dtype,a=[t,r].join(":"),o=n[a];return o||(n[a]=o=i(t,r)),o(e),e}},9618:function(e,t,r){var i=r(7163),n="u">typeof Float64Array;function a(e,t){return e[0]-t[0]}function o(){var e,t=this.stride,r=Array(t.length);for(e=0;e=0&&(t+=a*(r=0|e),n-=r),new i(this.data,n,a,t)},n.step=function(e){var t=this.shape[0],r=this.stride[0],n=this.offset,a=0,o=Math.ceil;return"number"==typeof e&&((a=0|e)<0?(n+=r*(t-1),t=o(-t/a)):t=o(t/a),r*=a),new i(this.data,t,r,n)},n.transpose=function(e){e=void 0===e?0:0|e;var t=this.shape,r=this.stride;return new i(this.data,t[e],r[e],this.offset)},n.pick=function(e){var r=[],i=[],n=this.offset;return"number"==typeof e&&e>=0?n=n+this.stride[0]*e|0:(r.push(this.shape[0]),i.push(this.stride[0])),(0,t[r.length+1])(this.data,r,i,n)},function(e,t,r,n){return new i(e,t[0],r[0],n)}},2:function(e,t,r){function i(e,t,r,i,n,a){this.data=e,this.shape=[t,r],this.stride=[i,n],this.offset=0|a}var n=i.prototype;return n.dtype=e,n.dimension=2,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(n,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),n.set=function(t,r,i){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r,i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]=i},n.get=function(t,r){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r):this.data[this.offset+this.stride[0]*t+this.stride[1]*r]},n.index=function(e,t){return this.offset+this.stride[0]*e+this.stride[1]*t},n.hi=function(e,t){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,this.stride[0],this.stride[1],this.offset)},n.lo=function(e,t){var r=this.offset,n=0,a=this.shape[0],o=this.shape[1],s=this.stride[0],l=this.stride[1];return"number"==typeof e&&e>=0&&(r+=s*(n=0|e),a-=n),"number"==typeof t&&t>=0&&(r+=l*(n=0|t),o-=n),new i(this.data,a,o,s,l,r)},n.step=function(e,t){var r=this.shape[0],n=this.shape[1],a=this.stride[0],o=this.stride[1],s=this.offset,l=0,c=Math.ceil;return"number"==typeof e&&((l=0|e)<0?(s+=a*(r-1),r=c(-r/l)):r=c(r/l),a*=l),"number"==typeof t&&((l=0|t)<0?(s+=o*(n-1),n=c(-n/l)):n=c(n/l),o*=l),new i(this.data,r,n,a,o,s)},n.transpose=function(e,t){e=void 0===e?0:0|e,t=void 0===t?1:0|t;var r=this.shape,n=this.stride;return new i(this.data,r[e],r[t],n[e],n[t],this.offset)},n.pick=function(e,r){var i=[],n=[],a=this.offset;return"number"==typeof e&&e>=0?a=a+this.stride[0]*e|0:(i.push(this.shape[0]),n.push(this.stride[0])),"number"==typeof r&&r>=0?a=a+this.stride[1]*r|0:(i.push(this.shape[1]),n.push(this.stride[1])),(0,t[i.length+1])(this.data,i,n,a)},function(e,t,r,n){return new i(e,t[0],t[1],r[0],r[1],n)}},3:function(e,t,r){function i(e,t,r,i,n,a,o,s){this.data=e,this.shape=[t,r,i],this.stride=[n,a,o],this.offset=0|s}var n=i.prototype;return n.dtype=e,n.dimension=3,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(n,"order",{get:function(){var e=Math.abs(this.stride[0]),t=Math.abs(this.stride[1]),r=Math.abs(this.stride[2]);return e>t?t>r?[2,1,0]:e>r?[1,2,0]:[1,0,2]:e>r?[2,0,1]:r>t?[0,1,2]:[0,2,1]}}),n.set=function(t,r,i,n){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i,n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i]=n},n.get=function(t,r,i){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i]},n.index=function(e,t,r){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r},n.hi=function(e,t,r){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,this.stride[0],this.stride[1],this.stride[2],this.offset)},n.lo=function(e,t,r){var n=this.offset,a=0,o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.stride[0],u=this.stride[1],h=this.stride[2];return"number"==typeof e&&e>=0&&(n+=c*(a=0|e),o-=a),"number"==typeof t&&t>=0&&(n+=u*(a=0|t),s-=a),"number"==typeof r&&r>=0&&(n+=h*(a=0|r),l-=a),new i(this.data,o,s,l,c,u,h,n)},n.step=function(e,t,r){var n=this.shape[0],a=this.shape[1],o=this.shape[2],s=this.stride[0],l=this.stride[1],c=this.stride[2],u=this.offset,h=0,d=Math.ceil;return"number"==typeof e&&((h=0|e)<0?(u+=s*(n-1),n=d(-n/h)):n=d(n/h),s*=h),"number"==typeof t&&((h=0|t)<0?(u+=l*(a-1),a=d(-a/h)):a=d(a/h),l*=h),"number"==typeof r&&((h=0|r)<0?(u+=c*(o-1),o=d(-o/h)):o=d(o/h),c*=h),new i(this.data,n,a,o,s,l,c,u)},n.transpose=function(e,t,r){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r;var n=this.shape,a=this.stride;return new i(this.data,n[e],n[t],n[r],a[e],a[t],a[r],this.offset)},n.pick=function(e,r,i){var n=[],a=[],o=this.offset;return"number"==typeof e&&e>=0?o=o+this.stride[0]*e|0:(n.push(this.shape[0]),a.push(this.stride[0])),"number"==typeof r&&r>=0?o=o+this.stride[1]*r|0:(n.push(this.shape[1]),a.push(this.stride[1])),"number"==typeof i&&i>=0?o=o+this.stride[2]*i|0:(n.push(this.shape[2]),a.push(this.stride[2])),(0,t[n.length+1])(this.data,n,a,o)},function(e,t,r,n){return new i(e,t[0],t[1],t[2],r[0],r[1],r[2],n)}},4:function(e,t,r){function i(e,t,r,i,n,a,o,s,l,c){this.data=e,this.shape=[t,r,i,n],this.stride=[a,o,s,l],this.offset=0|c}var n=i.prototype;return n.dtype=e,n.dimension=4,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(n,"order",{get:r}),n.set=function(t,r,i,n,a){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n,a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n]=a},n.get=function(t,r,i,n){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n]},n.index=function(e,t,r,i){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*i},n.hi=function(e,t,r,n){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof n||n<0?this.shape[3]:0|n,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},n.lo=function(e,t,r,n){var a=this.offset,o=0,s=this.shape[0],l=this.shape[1],c=this.shape[2],u=this.shape[3],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3];return"number"==typeof e&&e>=0&&(a+=h*(o=0|e),s-=o),"number"==typeof t&&t>=0&&(a+=d*(o=0|t),l-=o),"number"==typeof r&&r>=0&&(a+=f*(o=0|r),c-=o),"number"==typeof n&&n>=0&&(a+=p*(o=0|n),u-=o),new i(this.data,s,l,c,u,h,d,f,p,a)},n.step=function(e,t,r,n){var a=this.shape[0],o=this.shape[1],s=this.shape[2],l=this.shape[3],c=this.stride[0],u=this.stride[1],h=this.stride[2],d=this.stride[3],f=this.offset,p=0,m=Math.ceil;return"number"==typeof e&&((p=0|e)<0?(f+=c*(a-1),a=m(-a/p)):a=m(a/p),c*=p),"number"==typeof t&&((p=0|t)<0?(f+=u*(o-1),o=m(-o/p)):o=m(o/p),u*=p),"number"==typeof r&&((p=0|r)<0?(f+=h*(s-1),s=m(-s/p)):s=m(s/p),h*=p),"number"==typeof n&&((p=0|n)<0?(f+=d*(l-1),l=m(-l/p)):l=m(l/p),d*=p),new i(this.data,a,o,s,l,c,u,h,d,f)},n.transpose=function(e,t,r,n){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,n=void 0===n?3:0|n;var a=this.shape,o=this.stride;return new i(this.data,a[e],a[t],a[r],a[n],o[e],o[t],o[r],o[n],this.offset)},n.pick=function(e,r,i,n){var a=[],o=[],s=this.offset;return"number"==typeof e&&e>=0?s=s+this.stride[0]*e|0:(a.push(this.shape[0]),o.push(this.stride[0])),"number"==typeof r&&r>=0?s=s+this.stride[1]*r|0:(a.push(this.shape[1]),o.push(this.stride[1])),"number"==typeof i&&i>=0?s=s+this.stride[2]*i|0:(a.push(this.shape[2]),o.push(this.stride[2])),"number"==typeof n&&n>=0?s=s+this.stride[3]*n|0:(a.push(this.shape[3]),o.push(this.stride[3])),(0,t[a.length+1])(this.data,a,o,s)},function(e,t,r,n){return new i(e,t[0],t[1],t[2],t[3],r[0],r[1],r[2],r[3],n)}},5:function(e,t,r){function i(e,t,r,i,n,a,o,s,l,c,u,h){this.data=e,this.shape=[t,r,i,n,a],this.stride=[o,s,l,c,u],this.offset=0|h}var n=i.prototype;return n.dtype=e,n.dimension=5,Object.defineProperty(n,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(n,"order",{get:r}),n.set=function(t,r,i,n,a,o){return"generic"===e?this.data.set(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a,o):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a]=o},n.get=function(t,r,i,n,a){return"generic"===e?this.data.get(this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a):this.data[this.offset+this.stride[0]*t+this.stride[1]*r+this.stride[2]*i+this.stride[3]*n+this.stride[4]*a]},n.index=function(e,t,r,i,n){return this.offset+this.stride[0]*e+this.stride[1]*t+this.stride[2]*r+this.stride[3]*i+this.stride[4]*n},n.hi=function(e,t,r,n,a){return new i(this.data,"number"!=typeof e||e<0?this.shape[0]:0|e,"number"!=typeof t||t<0?this.shape[1]:0|t,"number"!=typeof r||r<0?this.shape[2]:0|r,"number"!=typeof n||n<0?this.shape[3]:0|n,"number"!=typeof a||a<0?this.shape[4]:0|a,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},n.lo=function(e,t,r,n,a){var o=this.offset,s=0,l=this.shape[0],c=this.shape[1],u=this.shape[2],h=this.shape[3],d=this.shape[4],f=this.stride[0],p=this.stride[1],m=this.stride[2],g=this.stride[3],y=this.stride[4];return"number"==typeof e&&e>=0&&(o+=f*(s=0|e),l-=s),"number"==typeof t&&t>=0&&(o+=p*(s=0|t),c-=s),"number"==typeof r&&r>=0&&(o+=m*(s=0|r),u-=s),"number"==typeof n&&n>=0&&(o+=g*(s=0|n),h-=s),"number"==typeof a&&a>=0&&(o+=y*(s=0|a),d-=s),new i(this.data,l,c,u,h,d,f,p,m,g,y,o)},n.step=function(e,t,r,n,a){var o=this.shape[0],s=this.shape[1],l=this.shape[2],c=this.shape[3],u=this.shape[4],h=this.stride[0],d=this.stride[1],f=this.stride[2],p=this.stride[3],m=this.stride[4],g=this.offset,y=0,v=Math.ceil;return"number"==typeof e&&((y=0|e)<0?(g+=h*(o-1),o=v(-o/y)):o=v(o/y),h*=y),"number"==typeof t&&((y=0|t)<0?(g+=d*(s-1),s=v(-s/y)):s=v(s/y),d*=y),"number"==typeof r&&((y=0|r)<0?(g+=f*(l-1),l=v(-l/y)):l=v(l/y),f*=y),"number"==typeof n&&((y=0|n)<0?(g+=p*(c-1),c=v(-c/y)):c=v(c/y),p*=y),"number"==typeof a&&((y=0|a)<0?(g+=m*(u-1),u=v(-u/y)):u=v(u/y),m*=y),new i(this.data,o,s,l,c,u,h,d,f,p,m,g)},n.transpose=function(e,t,r,n,a){e=void 0===e?0:0|e,t=void 0===t?1:0|t,r=void 0===r?2:0|r,n=void 0===n?3:0|n,a=void 0===a?4:0|a;var o=this.shape,s=this.stride;return new i(this.data,o[e],o[t],o[r],o[n],o[a],s[e],s[t],s[r],s[n],s[a],this.offset)},n.pick=function(e,r,i,n,a){var o=[],s=[],l=this.offset;return"number"==typeof e&&e>=0?l=l+this.stride[0]*e|0:(o.push(this.shape[0]),s.push(this.stride[0])),"number"==typeof r&&r>=0?l=l+this.stride[1]*r|0:(o.push(this.shape[1]),s.push(this.stride[1])),"number"==typeof i&&i>=0?l=l+this.stride[2]*i|0:(o.push(this.shape[2]),s.push(this.stride[2])),"number"==typeof n&&n>=0?l=l+this.stride[3]*n|0:(o.push(this.shape[3]),s.push(this.stride[3])),"number"==typeof a&&a>=0?l=l+this.stride[4]*a|0:(o.push(this.shape[4]),s.push(this.stride[4])),(0,t[o.length+1])(this.data,o,s,l)},function(e,t,r,n){return new i(e,t[0],t[1],t[2],t[3],t[4],r[0],r[1],r[2],r[3],r[4],n)}}},l={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};e.exports=function(e,t,r,a){if(void 0===e){var c=l.array[0];return c([])}"number"==typeof e&&(e=[e]),void 0===t&&(t=[e.length]);var u=t.length;if(void 0===r){r=Array(u);for(var h=u-1,d=1;h>=0;--h)r[h]=d,d*=t[h]}if(void 0===a){a=0;for(var h=0;he==e>0?0xffffffff===n?(r+=1,n=0):n+=1:0===n?(n=0xffffffff,r-=1):n-=1,i.pack(n,r)}},8406:function(e,t){t.vertexNormals=function(e,t,r){for(var i=t.length,n=Array(i),a=void 0===r?1e-6:r,o=0;oa)for(var b=n[c],_=1/Math.sqrt(g*v),x=0;x<3;++x){var w=(x+1)%3,T=(x+2)%3;b[x]+=_*(y[w]*m[T]-y[T]*m[w])}}for(var o=0;oa)for(var _=1/Math.sqrt(M),x=0;x<3;++x)b[x]*=_;else for(var x=0;x<3;++x)b[x]=0}return n},t.faceNormals=function(e,t,r){for(var i=e.length,n=Array(i),a=void 0===r?1e-6:r,o=0;oa?1/Math.sqrt(f):0;for(var c=0;c<3;++c)d[c]*=f;n[o]=d}return n}},4081:function(e){e.exports=function(e,t,r,i,n,a,o,s,l,c){var u=t+a+c;if(h>0){var h=Math.sqrt(u+1);e[0]=.5*(o-l)/h,e[1]=.5*(s-i)/h,e[2]=.5*(r-a)/h,e[3]=.5*h}else{var d=Math.max(t,a,c),h=Math.sqrt(2*d-u+1);t>=d?(e[0]=.5*h,e[1]=.5*(n+r)/h,e[2]=.5*(s+i)/h,e[3]=.5*(o-l)/h):a>=d?(e[0]=.5*(r+n)/h,e[1]=.5*h,e[2]=.5*(l+o)/h,e[3]=.5*(s-i)/h):(e[0]=.5*(i+s)/h,e[1]=.5*(o+l)/h,e[2]=.5*h,e[3]=.5*(r-n)/h)}return e}},9977:function(e,t,r){e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.rotation||[0,0,0,1],i=e.radius||1;t=[].slice.call(t,0,3),u(r=[].slice.call(r,0,4),r);var n=new h(r,t,Math.log(i));return n.setDistanceLimits(e.zoomMin,e.zoomMax),("eye"in e||"up"in e)&&n.lookAt(0,e.eye,e.center,e.up),n};var i=r(9215),n=r(6582),a=r(7399),o=r(7608),s=r(4081);function l(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function c(e,t,r,i){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2)+Math.pow(i,2))}function u(e,t){var r=t[0],i=t[1],n=t[2],a=t[3],o=c(r,i,n,a);o>1e-6?(e[0]=r/o,e[1]=i/o,e[2]=n/o,e[3]=a/o):(e[0]=e[1]=e[2]=0,e[3]=1)}function h(e,t,r){this.radius=i([r]),this.center=i(t),this.rotation=i(e),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 d=h.prototype;d.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},d.recalcMatrix=function(e){this.radius.curve(e),this.center.curve(e),this.rotation.curve(e);var t=this.computedRotation;u(t,t);var r=this.computedMatrix;a(r,t);var i=this.computedCenter,n=this.computedEye,o=this.computedUp,s=Math.exp(this.computedRadius[0]);n[0]=i[0]+s*r[2],n[1]=i[1]+s*r[6],n[2]=i[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]*n[h];r[12+l]=-c}},d.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var i=0;i<16;++i)t[i]=r[i];return t}return r},d.idle=function(e){this.center.idle(e),this.radius.idle(e),this.rotation.idle(e)},d.flush=function(e){this.center.flush(e),this.radius.flush(e),this.rotation.flush(e)},d.pan=function(e,t,r,i){t=t||0,r=r||0,i=i||0,this.recalcMatrix(e);var n=this.computedMatrix,a=n[1],o=n[5],s=n[9],c=l(a,o,s);a/=c,o/=c,s/=c;var u=n[0],h=n[4],d=n[8],f=u*a+h*o+d*s;u-=a*f;var p=l(u,h-=o*f,d-=s*f);u/=p,h/=p,d/=p;var m=n[2],g=n[6],y=n[10],v=m*a+g*o+y*s,x=m*u+g*h+y*d;m-=v*a+x*u;var b=l(m,g-=v*o+x*h,y-=v*s+x*d);m/=b,g/=b,y/=b;var _=u*t+a*r,w=h*t+o*r,T=d*t+s*r;this.center.move(e,_,w,T);var M=Math.exp(this.computedRadius[0]);M=Math.max(1e-4,M+i),this.radius.set(e,Math.log(M))},d.rotate=function(e,t,r,i){this.recalcMatrix(e),t=t||0,r=r||0;var n=this.computedMatrix,a=n[0],o=n[4],s=n[8],u=n[1],h=n[5],d=n[9],f=n[2],p=n[6],m=n[10],g=t*a+r*u,y=t*o+r*h,v=t*s+r*d,x=-(p*v-m*y),b=-(m*g-f*v),_=-(f*y-p*g),w=Math.sqrt(Math.max(0,1-Math.pow(x,2)-Math.pow(b,2)-Math.pow(_,2))),T=c(x,b,_,w);T>1e-6?(x/=T,b/=T,_/=T,w/=T):(x=b=_=0,w=1);var M=this.computedRotation,k=M[0],A=M[1],S=M[2],E=M[3],C=k*w+E*x+A*_-S*b,L=A*w+E*b+S*x-k*_,P=S*w+E*_+k*b-A*x,I=E*w-k*x-A*b-S*_;if(i){x=f;var z=Math.sin(i)/l(x,b=p,_=m);x*=z,b*=z,_*=z,C=C*(w=Math.cos(t))+I*x+L*_-P*b,L=L*w+I*b+P*x-C*_,P=P*w+I*_+C*b-L*x,I=I*w-C*x-L*b-P*_}var D=c(C,L,P,I);D>1e-6?(C/=D,L/=D,P/=D,I/=D):(C=L=P=0,I=1),this.rotation.set(e,C,L,P,I)},d.lookAt=function(e,t,r,i){this.recalcMatrix(e),r=r||this.computedCenter,t=t||this.computedEye,i=i||this.computedUp;var a=this.computedMatrix;n(a,t,r,i);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(e,o[0],o[1],o[2],o[3]);for(var l=0,c=0;c<3;++c)l+=Math.pow(r[c]-t[c],2);this.radius.set(e,.5*Math.log(Math.max(l,1e-6))),this.center.set(e,r[0],r[1],r[2])},d.translate=function(e,t,r,i){this.center.move(e,t||0,r||0,i||0)},d.setMatrix=function(e,t){var r=this.computedRotation;s(r,t[0],t[1],t[2],t[4],t[5],t[6],t[8],t[9],t[10]),u(r,r),this.rotation.set(e,r[0],r[1],r[2],r[3]);var i=this.computedMatrix;o(i,t);var n=i[15];if(Math.abs(n)>1e-6){var a=i[12]/n,l=i[13]/n,c=i[14]/n;this.recalcMatrix(e);var h=Math.exp(this.computedRadius[0]);this.center.set(e,a-i[2]*h,l-i[6]*h,c-i[10]*h),this.radius.idle(e)}else this.center.idle(e),this.radius.idle(e)},d.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},d.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=Math.max(t=t>0?Math.log(t):1/0,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},d.getDistanceLimits=function(e){var t=this.radius.bounds;return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},d.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]}},d.fromJSON=function(e){var t=this.lastT(),r=e.center;r&&this.center.set(t,r[0],r[1],r[2]);var i=e.rotation;i&&this.rotation.set(t,i[0],i[1],i[2],i[3]);var n=e.distance;n&&n>0&&this.radius.set(t,Math.log(n)),this.setDistanceLimits(e.zoomMin,e.zoomMax)}},1371:function(e,t,r){var i=r(3233);e.exports=function(e,t,r){return i(r="u">typeof r?r+"":" ",t)+e}},3202:function(e){e.exports=function(e,t){t||(t=[0,""]);var r=parseFloat(e=String(e),10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},3088:function(e,t,r){e.exports=function(e,t){for(var r=0|t.length,n=e.length,a=[Array(r),Array(r)],o=0;o0){o=a[u][r][0],l=u;break}s=o[1^l];for(var h=0;h<2;++h)for(var d=a[h][r],f=0;f0&&(o=p,s=m,l=h)}return n||o&&c(o,l),s}for(var o=0;o0;){a[0][o].length;var f=function(e,r){var n=a[r][e][0],o=[e];c(n,r);for(var s=n[1^r];;){for(;s!==e;)o.push(s),s=u(o[o.length-2],s,!1);if(a[0][e].length+a[1][e].length===0)break;var l=o[o.length-1],h=o[1],d=u(l,e,!0);if(0>i(t[l],t[e],t[h],t[d]))break;o.push(e),s=u(l,e)}return o}(o,h);f[1]===f[f.length-1]?d.push.apply(d,f):(d.length>0&&l.push(d),d=f)}d.length>0&&l.push(d)}return l};var i=r(3140)},5609:function(e,t,r){e.exports=function(e,t){for(var r=i(e,t.length),n=Array(t.length),a=Array(t.length),o=[],s=0;s0;){var c=o.pop();n[c]=!1;for(var u=r[c],s=0;s0});for(var m=p.length,g=Array(m),y=Array(m),f=0;f0;){var j=R.pop(),B=E[j];l(B,function(e,t){return e-t});var N,U=B.length,V=F[j];if(0===V){var w=p[j];N=[w]}for(var f=0;f=0)&&(F[q]=1^V,R.push(q),0===V)){var w=p[q];O(w)||(w.reverse(),N.push(w))}}0===V&&r.push(N)}return r};var i=r(3134),n=r(3088),a=r(5085),o=r(5250),s=r(8210),l=r(1682),c=r(5609);function u(e,t){for(var r=Array(e),i=0;i0)||a[t]!==e[0])return 1;else n=r[t-1];for(var s=1;n;){var l=n.key,c=i(e,l[0],l[1]);if(l[0][0]0))return 0;s=-1,n=n.right}else if(c>0)n=n.left;else{if(!(c<0))return 0;s=1,n=n.right}}return s});return 0===d.length?_:(s=l(d),function(e){return s(e[0],e[1])?0:_(e)})};var i=r(3250)[3],n=r(4209),a=r(3352),o=r(2478);function s(){return!0}function l(e){for(var t={},r=0;r=f?(M=1,w=f+2*g+v):(M=-g/f,w=g*M+v)):(M=0,y>=0?(k=0,w=v):-y>=m?(k=1,w=m+2*y+v):(k=-y/m,w=y*k+v));else if(k<0)k=0,g>=0?(M=0,w=v):-g>=f?(M=1,w=f+2*g+v):(M=-g/f,w=g*M+v);else{var A=1/T;M*=A,k*=A,w=M*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v}else M<0?(l=p+g,(c=m+y)>l?(u=c-l)>=(h=f-2*p+m)?(M=1,k=0,w=f+2*g+v):(k=1-(M=u/h),w=M*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v):(M=0,c<=0?(k=1,w=m+2*y+v):y>=0?(k=0,w=v):(k=-y/m,w=y*k+v))):k<0?(l=p+y,(c=f+g)>l?(u=c-l)>=(h=f-2*p+m)?(k=1,M=0,w=m+2*y+v):w=(M=1-(k=u/h))*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v:(k=0,c<=0?(M=1,w=f+2*g+v):g>=0?(M=0,w=v):(M=-g/f,w=g*M+v))):(u=m+y-p-g)<=0?(M=0,k=1,w=m+2*y+v):u>=(h=f-2*p+m)?(M=1,k=0,w=f+2*g+v):(k=1-(M=u/h),w=M*(f*M+p*k+2*g)+k*(p*M+m*k+2*y)+v);for(var S=1-M-k,d=0;d0){var c=e[r-1];if(0===i(s,c)&&a(c)!==l){r-=1;continue}}e[r++]=s}}return e.length=r,e}},3233:function(e){var t,r="";e.exports=function(e,i){if("string"!=typeof e)throw TypeError("expected a string");if(1===i)return e;if(2===i)return e+e;var n=e.length*i;if(t!==e||typeof t>"u")t=e,r="";else if(r.length>=n)return r.substr(0,n);for(;n>r.length&&i>1;)1&i&&(r+=e),i>>=1,e+=e;return r+=e,r=r.substr(0,n)}},3025:function(e,t,r){e.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(e){e.exports=function(e){for(var t=e.length,r=e[e.length-1],i=t,n=t-2;n>=0;--n){var a=r,o=e[n],s=(r=a+o)-a,l=o-s;l&&(e[--i]=r,r=l)}for(var c=0,n=i;n0){if(a<=0)return o;i=n+a}else{if(!(n<0)||a>=0)return o;i=-(n+a)}var l=s*i;return o>=l||o<=-l?o:u(e,t,r)},function(e,t,r,i){var n=e[0]-i[0],a=t[0]-i[0],o=r[0]-i[0],s=e[1]-i[1],c=t[1]-i[1],u=r[1]-i[1],d=e[2]-i[2],f=t[2]-i[2],p=r[2]-i[2],m=a*u,g=o*c,y=o*s,v=n*u,x=n*c,b=a*s,_=d*(m-g)+f*(y-v)+p*(x-b),w=l*((Math.abs(m)+Math.abs(g))*Math.abs(d)+(Math.abs(y)+Math.abs(v))*Math.abs(f)+(Math.abs(x)+Math.abs(b))*Math.abs(p));return _>w||-_>w?_:h(e,t,r,i)}];d.length<=5;)d.push(c(d.length));e.exports=(function(e,t,r,i,n,a,o){return function(t,r,s,l,c){switch(arguments.length){case 0:case 1:return 0;case 2:return i(t,r);case 3:return n(t,r,s);case 4:return a(t,r,s,l);case 5:return o(t,r,s,l,c)}for(var u=Array(arguments.length),h=0;h0&&o>0||a<0&&o<0)return!1;var s=i(r,e,t),l=i(n,e,t);return(!(s>0)||!(l>0))&&(!(s<0)||!(l<0))&&(0!==a||0!==o||0!==s||0!==l||function(e,t,r,i){for(var n=0;n<2;++n){var a=e[n],o=t[n],s=Math.min(a,o),l=Math.max(a,o),c=r[n],u=i[n],h=Math.min(c,u);if(Math.max(c,u)=i?(c=g,(f+=1)=i?(c=g,(f+=1)"u"&&(s=function(e){for(var t=e.length,r=0,i=0;i>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a>1,c=t[2*l+1];if(c===a)return l;a0)-(e<0)},t.abs=function(e){var t=e>>31;return(e^t)-t},t.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},t.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},t.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},t.countTrailingZeros=r,t.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},t.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},t.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var i=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;e[t]=i<>>8&255]<<16|i[e>>>16&255]<<8|i[e>>>24&255]},t.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},t.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},t.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},t.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},t.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>r(e)+1}},2014:function(e,t,r){var i=r(3105),n=r(4623);function a(e,t){var r=e.length,i=e.length-t.length,n=Math.min;if(i)return i;switch(r){case 0:return 0;case 1:return e[0]-t[0];case 2:var a=e[0]+e[1]-t[0]-t[1];return a||n(e[0],e[1])-n(t[0],t[1]);case 3:var o=e[0]+e[1],s=t[0]+t[1];if(a=o+e[2]-(s+t[2]))return a;var l=n(e[0],e[1]),c=n(t[0],t[1]),a=n(l,e[2])-n(c,t[2]);return a||n(l+e[2],o)-n(c+t[2],s);default:var u=e.slice(0);u.sort();var h=t.slice(0);h.sort();for(var d=0;d>1,s=a(e[o],t);s<=0?(0===s&&(n=o),r=o+1):s>0&&(i=o-1)}return n}function u(e,t){for(var r=Array(e.length),n=0,o=r.length;n=e.length||0!==a(e[g],s)););}return r}function h(e,t){if(t<0)return[];for(var r=[],n=(1<>>u&1&&c.push(n[u]);t.push(c)}return s(t)},t.skeleton=h,t.boundary=function(e){for(var t=[],r=0,i=e.length;r0;){var r,i=1&(r=e)?r-1>>1:(r>>1)-1;if(i>=0&&t0){var e=w[0];return g(0,M-1),M-=1,v(0),e}return -1}function _(e,t){var r=w[e];return c[r]===t?e:(c[r]=-1/0,x(e),b(),c[r]=t,x((M+=1)-1))}for(var w=[],T=Array(a),h=0;h>1;h>=0;--h)v(h);for(;;){var k=b();if(k<0||c[k]>r)break;!function(e){if(!u[e]){u[e]=!0;var t=s[e],r=l[e];s[r]>=0&&(s[r]=t),l[t]>=0&&(l[t]=r),T[t]>=0&&_(T[t],m(t)),T[r]>=0&&_(T[r],m(r))}}(k)}for(var A=[],h=0;h=0&&r>=0&&t!==r){var i=T[t],n=T[r];i!==n&&E.push([i,n])}}),n.unique(n.normalize(E)),{positions:A,edges:E}};var i=r(3250),n=r(2014)},1303:function(e,t,r){e.exports=function(e,t){if(t[0][0]t[1][0]))return n(t,e);r=t[1],a=t[0]}if(e[0][0]e[1][0]))return-n(e,t);o=e[1],s=e[0]}var r,a,o,s,l=i(r,a,s),c=i(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=i(s,o,a),c=i(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 i=r(3250);function n(e,t){if(t[0][0]t[1][0])r=t[1],n=t[0];else{var r,n,a,o,s=Math.min(e[0][1],e[1][1]),l=Math.max(e[0][1],e[1][1]),c=Math.min(t[0][1],t[1][1]),u=Math.max(t[0][1],t[1][1]);return lu?s-u:l-u}e[0][1]0)if(t[0]!==o[1][0])r=e,e=e.right;else{var l=c(e.right,t);if(l)return l;e=e.left}else{if(t[0]!==o[1][0])return e;var l=c(e.right,t);if(l)return l;e=e.left}}return r}function u(e,t,r,i){this.y=e,this.index=t,this.start=r,this.closed=i}function h(e,t,r,i){this.x=e,this.segment=t,this.create=r,this.index=i}s.prototype.castUp=function(e){var t=i.le(this.coordinates,e[0]);if(t<0)return -1;this.slabs[t];var r=c(this.slabs[t],e),n=-1;if(r&&(n=r.value),this.coordinates[t]===e[0]){var s=null;if(r&&(s=r.key),t>0){var u=c(this.slabs[t-1],e);u&&(s?o(u.key,s)>0&&(s=u.key,n=u.value):(n=u.value,s=u.key))}var h=this.horizontal[t];if(h.length>0){var d=i.ge(h,e[1],l);if(d=h.length)return n;f=h[d]}}if(f.start)if(s){var p=a(s[0],s[1],[e[0],f.y]);s[0][0]>s[1][0]&&(p=-p),p>0&&(n=f.index)}else n=f.index;else f.y!==e[1]&&(n=f.index)}}}return n}},5202:function(e,t,r){var i=r(1944),n=r(8210);function a(e,t){var r=n(i(e,t),[t[t.length-1]]);return r[r.length-1]}function o(e,t,r,i){var n=-t/(i-t);n<0?n=0:n>1&&(n=1);for(var a=1-n,o=e.length,s=Array(o),l=0;l0||n>0&&u<0){var h=o(s,u,l,n);r.push(h),i.push(h.slice())}u<0?i.push(l.slice()):u>0?r.push(l.slice()):(r.push(l.slice()),i.push(l.slice())),n=u}return{positive:r,negative:i}},e.exports.positive=function(e,t){for(var r=[],i=a(e[e.length-1],t),n=e[e.length-1],s=e[0],l=0;l0||i>0&&c<0)&&r.push(o(n,c,s,i)),c>=0&&r.push(s.slice()),i=c}return r},e.exports.negative=function(e,t){for(var r=[],i=a(e[e.length-1],t),n=e[e.length-1],s=e[0],l=0;l0||i>0&&c<0)&&r.push(o(n,c,s,i)),c<=0&&r.push(s.slice()),i=c}return r}},3387:function(e,t,r){var i;!function(){var n=/[^T]/,a=/[^v]/,o=/[diefg]/,s=/[bcdiefguxX]/,l=/[j]/,c=/^[^\x25]+/,u=/^\x25{2}/,h=/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,d=/^([a-z_][a-z_\d]*)/i,f=/^\.([a-z_][a-z_\d]*)/i,p=/^\[(\d+)\]/,m=/^[+-]/;function g(e){return function(e,t){var r,i,c,u,h,d,f,p,y,v=1,x=e.length,b="";for(i=0;i=0),u.type){case"b":r=parseInt(r,10).toString(2);break;case"c":r=String.fromCharCode(parseInt(r,10));break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,u.width?parseInt(u.width):0);break;case"e":r=u.precision?parseFloat(r).toExponential(u.precision):parseFloat(r).toExponential();break;case"f":r=u.precision?parseFloat(r).toFixed(u.precision):parseFloat(r);break;case"g":r=u.precision?String(Number(r.toPrecision(u.precision))):parseFloat(r);break;case"o":r=(parseInt(r,10)>>>0).toString(8);break;case"s":r=String(r),r=u.precision?r.substring(0,u.precision):r;break;case"t":r=String(!!r),r=u.precision?r.substring(0,u.precision):r;break;case"T":r=Object.prototype.toString.call(r).slice(8,-1).toLowerCase(),r=u.precision?r.substring(0,u.precision):r;break;case"u":r=parseInt(r,10)>>>0;break;case"v":r=r.valueOf(),r=u.precision?r.substring(0,u.precision):r;break;case"x":r=(parseInt(r,10)>>>0).toString(16);break;case"X":r=(parseInt(r,10)>>>0).toString(16).toUpperCase()}l.test(u.type)?b+=r:(o.test(u.type)&&(!p||u.sign)?(y=p?"+":"-",r=r.toString().replace(m,"")):y="",d=u.pad_char?"0"===u.pad_char?"0":u.pad_char.charAt(1):" ",f=u.width-(y+r).length,h=u.width&&f>0?d.repeat(f):"",b+=u.align?y+r+h:"0"===d?y+h+r:h+y+r)}return b}(function(e){if(v[e])return v[e];for(var t,r=e,i=[],n=0;r;){if(null!==(t=c.exec(r)))i.push(t[0]);else if(null!==(t=u.exec(r)))i.push("%");else if(null!==(t=h.exec(r))){if(t[2]){n|=1;var a=[],o=t[2],s=[];if(null!==(s=d.exec(o)))for(a.push(s[1]);""!==(o=o.substring(s[0].length));)if(null!==(s=f.exec(o)))a.push(s[1]);else if(null!==(s=p.exec(o)))a.push(s[1]);else throw SyntaxError("[sprintf] failed to parse named argument key");else throw SyntaxError("[sprintf] failed to parse named argument key");t[2]=a}else n|=2;if(3===n)throw Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:t[0],param_no:t[1],keys:t[2],sign:t[3],pad_char:t[4],align:t[5],width:t[6],precision:t[7],type:t[8]})}else throw SyntaxError("[sprintf] unexpected placeholder");r=r.substring(t[0].length)}return v[e]=i}(e),arguments)}function y(e,t){return g.apply(null,[e].concat(t||[]))}var v=Object.create(null);t.sprintf=g,t.vsprintf=y,"u">typeof window&&(window.sprintf=g,window.vsprintf=y,void 0!==(i=(function(){return{sprintf:g,vsprintf:y}}).call(t,r,t,e))&&(e.exports=i))}()},3711:function(e,t,r){e.exports=function(e,t){if(e.dimension<=0)return{positions:[],cells:[]};if(1===e.dimension)return function(e,t){for(var r=n(e,t),i=r.length,a=Array(i),o=Array(i),s=0;si|0},vertex:function(e,t,r,i,n,a,o,s,l,c,u,h,d){var f=(0|o)+(s<<1)+(l<<2)+(c<<3)|0;if(0!==f&&15!==f)switch(f){case 0:case 15:u.push([e-.5,t-.5]);break;case 1:u.push([e-.25-.25*(i+r-2*d)/(r-i),t-.25-.25*(n+r-2*d)/(r-n)]);break;case 2:u.push([e-.75-.25*(-i-r+2*d)/(i-r),t-.25-.25*(a+i-2*d)/(i-a)]);break;case 3:u.push([e-.5,t-.5-.5*(n+r+a+i-4*d)/(r-n+i-a)]);break;case 4:u.push([e-.25-.25*(a+n-2*d)/(n-a),t-.75-.25*(-n-r+2*d)/(n-r)]);break;case 5:u.push([e-.5-.5*(i+r+a+n-4*d)/(r-i+n-a),t-.5]);break;case 6:u.push([e-.5-.25*(-i-r+a+n)/(i-r+n-a),t-.5-.25*(-n-r+a+i)/(n-r+i-a)]);break;case 7:u.push([e-.75-.25*(a+n-2*d)/(n-a),t-.75-.25*(a+i-2*d)/(i-a)]);break;case 8:u.push([e-.75-.25*(-a-n+2*d)/(a-n),t-.75-.25*(-a-i+2*d)/(a-i)]);break;case 9:u.push([e-.5-.25*(i+r+-a-n)/(r-i+a-n),t-.5-.25*(n+r+-a-i)/(r-n+a-i)]);break;case 10:u.push([e-.5-.5*(-i-r+-a-n+4*d)/(i-r+a-n),t-.5]);break;case 11:u.push([e-.25-.25*(-a-n+2*d)/(a-n),t-.75-.25*(n+r-2*d)/(r-n)]);break;case 12:u.push([e-.5,t-.5-.5*(-n-r+-a-i+4*d)/(n-r+a-i)]);break;case 13:u.push([e-.75-.25*(i+r-2*d)/(r-i),t-.25-.25*(-a-i+2*d)/(a-i)]);break;case 14:u.push([e-.25-.25*(-i-r+2*d)/(i-r),t-.25-.25*(-n-r+2*d)/(n-r)])}},cell:function(e,t,r,i,n,a,o,s,l){n?s.push([e,t]):s.push([t,e])}});return function(e,t){var r=[],n=[];return i(e,r,n,t),{positions:r,cells:n}}}},o={}},665:function(e,t,r){var i=r(3202);function n(e,t){var r=i(getComputedStyle(e).getPropertyValue(t));return r[0]*a(r[1],e)}function a(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":var r,i,a,o;return r=e,i=t,(a=document.createElement("div")).style["font-size"]="128"+r,i.appendChild(a),o=n(a,"font-size")/128,i.removeChild(a),o;case"em":return n(t,"font-size");case"rem":return n(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}e.exports=a},7261:function(e,t,r){e.exports=function(e){var t=(e=e||{}).center||[0,0,0],r=e.up||[0,1,0],i=e.right||h(r),n=e.radius||1,a=e.theta||0,u=e.phi||0;if(t=[].slice.call(t,0,3),s(r=[].slice.call(r,0,3),r),s(i=[].slice.call(i,0,3),i),"eye"in e){var f=e.eye,p=[f[0]-t[0],f[1]-t[1],f[2]-t[2]];o(i,p,r),1e-6>c(i[0],i[1],i[2])?i=h(r):s(i,i),n=c(p[0],p[1],p[2]);var m=l(r,p)/n,g=l(i,p)/n;u=Math.acos(m),a=Math.acos(g)}return n=Math.log(n),new d(e.zoomMin,e.zoomMax,t,r,i,n,a,u)};var i=r(9215),n=r(7608),a=r(6079),o=r(5911),s=r(3536),l=r(244);function c(e,t,r){return Math.sqrt(Math.pow(e,2)+Math.pow(t,2)+Math.pow(r,2))}function u(e){return Math.min(1,Math.max(-1,e))}function h(e){var t=Math.abs(e[0]),r=Math.abs(e[1]),i=Math.abs(e[2]),n=[0,0,0];t>Math.max(r,i)?n[2]=1:r>Math.max(t,i)?n[0]=1:n[1]=1;for(var a=0,o=0,l=0;l<3;++l)a+=e[l]*e[l],o+=n[l]*e[l];for(var l=0;l<3;++l)n[l]-=o/a*e[l];return s(n,n),n}function d(e,t,r,n,a,o,s,l){this.center=i(r),this.up=i(n),this.right=i(a),this.radius=i([o]),this.angle=i([s,l]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(e,t),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=Array(16);for(var c=0;c<16;++c)this.computedMatrix[c]=.5;this.recalcMatrix(0)}var f=d.prototype;f.setDistanceLimits=function(e,t){e=e>0?Math.log(e):-1/0,t=Math.max(t=t>0?Math.log(t):1/0,e),this.radius.bounds[0][0]=e,this.radius.bounds[1][0]=t},f.getDistanceLimits=function(e){var t=this.radius.bounds[0];return e?(e[0]=Math.exp(t[0][0]),e[1]=Math.exp(t[1][0]),e):[Math.exp(t[0][0]),Math.exp(t[1][0])]},f.recalcMatrix=function(e){this.center.curve(e),this.up.curve(e),this.right.curve(e),this.radius.curve(e),this.angle.curve(e);for(var t=this.computedUp,r=this.computedRight,i=0,n=0,a=0;a<3;++a)n+=t[a]*r[a],i+=t[a]*t[a];for(var l=Math.sqrt(i),u=0,a=0;a<3;++a)r[a]-=t[a]*n/i,u+=r[a]*r[a],t[a]/=l;for(var h=Math.sqrt(u),a=0;a<3;++a)r[a]/=h;var d=this.computedToward;o(d,t,r),s(d,d);for(var f=Math.exp(this.computedRadius[0]),p=this.computedAngle[0],m=this.computedAngle[1],g=Math.cos(p),y=Math.sin(p),v=Math.cos(m),x=Math.sin(m),b=this.computedCenter,_=g*v,w=y*v,T=-g*x,M=-y*x,k=this.computedEye,A=this.computedMatrix,a=0;a<3;++a){var S=_*r[a]+w*d[a]+x*t[a];A[4*a+1]=T*r[a]+M*d[a]+v*t[a],A[4*a+2]=S,A[4*a+3]=0}var E=A[1],C=A[5],L=A[9],P=A[2],I=A[6],z=A[10],D=C*z-L*I,O=L*P-E*z,R=E*I-C*P,F=c(D,O,R);D/=F,O/=F,R/=F,A[0]=D,A[4]=O,A[8]=R;for(var a=0;a<3;++a)k[a]=b[a]+A[2+4*a]*f;for(var a=0;a<3;++a){for(var u=0,j=0;j<3;++j)u+=A[a+4*j]*k[j];A[12+a]=-u}A[15]=1},f.getMatrix=function(e,t){this.recalcMatrix(e);var r=this.computedMatrix;if(t){for(var i=0;i<16;++i)t[i]=r[i];return t}return r};var p=[0,0,0];f.rotate=function(e,t,r,i){if(this.angle.move(e,t,r),i){this.recalcMatrix(e);var n=this.computedMatrix;p[0]=n[2],p[1]=n[6],p[2]=n[10];for(var o=this.computedUp,s=this.computedRight,l=this.computedToward,c=0;c<3;++c)n[4*c]=o[c],n[4*c+1]=s[c],n[4*c+2]=l[c];a(n,n,i,p);for(var c=0;c<3;++c)o[c]=n[4*c],s[c]=n[4*c+1];this.up.set(e,o[0],o[1],o[2]),this.right.set(e,s[0],s[1],s[2])}},f.pan=function(e,t,r,i){t=t||0,r=r||0,i=i||0,this.recalcMatrix(e);var n=this.computedMatrix,a=(this.computedRadius[0],n[1]),o=n[5],s=n[9],l=c(a,o,s);a/=l,o/=l,s/=l;var u=n[0],h=n[4],d=n[8],f=u*a+h*o+d*s;u-=a*f;var p=c(u,h-=o*f,d-=s*f);u/=p,h/=p,d/=p;var m=u*t+a*r,g=h*t+o*r,y=d*t+s*r;this.center.move(e,m,g,y);var v=Math.exp(this.computedRadius[0]);v=Math.max(1e-4,v+i),this.radius.set(e,Math.log(v))},f.translate=function(e,t,r,i){this.center.move(e,t||0,r||0,i||0)},f.setMatrix=function(e,t,r,i){var a,o,s=1;"number"==typeof r&&(s=0|r),(s<0||s>3)&&(s=1);var l=(s+2)%3;t||(this.recalcMatrix(e),t=this.computedMatrix);var h=t[s],d=t[s+4],f=t[s+8];if(i){var p=Math.abs(h),m=Math.abs(f),g=Math.max(p,Math.abs(d),m);p===g?(h=h<0?-1:1,d=f=0):m===g?(f=f<0?-1:1,h=d=0):(d=d<0?-1:1,h=f=0)}else{var y=c(h,d,f);h/=y,d/=y,f/=y}var v=t[l],x=t[l+4],b=t[l+8],_=v*h+x*d+b*f;v-=h*_;var w=c(v,x-=d*_,b-=f*_);v/=w,x/=w;var T=d*(b/=w)-f*x,M=f*v-h*b,k=h*x-d*v,A=c(T,M,k);if(T/=A,M/=A,k/=A,this.center.jump(e,q,H,G),this.radius.idle(e),this.up.jump(e,h,d,f),this.right.jump(e,v,x,b),2===s){var S=t[1],E=t[5],C=t[9],L=S*v+E*x+C*b,P=S*T+E*M+C*k;a=O<0?-Math.PI/2:Math.PI/2,o=Math.atan2(P,L)}else{var I=t[2],z=t[6],D=t[10],O=I*h+z*d+D*f,R=I*v+z*x+D*b,F=I*T+z*M+D*k;a=Math.asin(u(O)),o=Math.atan2(F,R)}this.angle.jump(e,o,a),this.recalcMatrix(e);var j=t[2],B=t[6],N=t[10],U=this.computedMatrix;n(U,t);var V=U[15],q=U[12]/V,H=U[13]/V,G=U[14]/V,W=Math.exp(this.computedRadius[0]);this.center.jump(e,q-j*W,H-B*W,G-N*W)},f.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},f.idle=function(e){this.center.idle(e),this.up.idle(e),this.right.idle(e),this.radius.idle(e),this.angle.idle(e)},f.flush=function(e){this.center.flush(e),this.up.flush(e),this.right.flush(e),this.radius.flush(e),this.angle.flush(e)},f.setDistance=function(e,t){t>0&&this.radius.set(e,Math.log(t))},f.lookAt=function(e,t,r,i){this.recalcMatrix(e),t=t||this.computedEye,r=r||this.computedCenter;var n=(i=i||this.computedUp)[0],a=i[1],o=i[2],s=c(n,a,o);if(!(s<1e-6)){n/=s,a/=s,o/=s;var l=t[0]-r[0],h=t[1]-r[1],d=t[2]-r[2],f=c(l,h,d);if(!(f<1e-6)){l/=f,h/=f,d/=f;var p=this.computedRight,m=p[0],g=p[1],y=p[2],v=n*m+a*g+o*y;m-=v*n;var x=c(m,g-=v*a,y-=v*o);if(!(x<.01&&(x=c(m=a*d-o*h,g=o*l-n*d,y=n*h-a*l))<1e-6)){m/=x,g/=x,y/=x,this.up.set(e,n,a,o),this.right.set(e,m,g,y),this.center.set(e,r[0],r[1],r[2]),this.radius.set(e,Math.log(f));var b=a*y-o*g,_=o*m-n*y,w=n*g-a*m,T=c(b,_,w);b/=T;var M=n*l+a*h+o*d,k=m*l+g*h+y*d,A=b*l+(_/=T)*h+(w/=T)*d,S=Math.asin(u(M)),E=Math.atan2(A,k),C=this.angle._state,L=C[C.length-1],P=C[C.length-2],I=Math.abs((L%=2*Math.PI)+2*Math.PI-E),z=Math.abs(L-E),D=Math.abs(L-2*Math.PI-E);Itypeof Uint8ClampedArray,s="u">typeof BigUint64Array,l="u">typeof BigInt64Array,c=r.g.__TYPEDARRAY_POOL;c.UINT8C||(c.UINT8C=n([32,0])),c.BIGUINT64||(c.BIGUINT64=n([32,0])),c.BIGINT64||(c.BIGINT64=n([32,0])),c.BUFFER||(c.BUFFER=n([32,0]));var u=c.DATA,h=c.BUFFER;function d(e){if(e){var t=e.length||e.byteLength;u[i.log2(t)].push(e)}}function f(e){var e=i.nextPow2(e),t=u[i.log2(e)];return t.length>0?t.pop():new ArrayBuffer(e)}function p(e){return new Uint8Array(f(e),0,e)}function m(e){return new Uint16Array(f(2*e),0,e)}function g(e){return new Uint32Array(f(4*e),0,e)}function y(e){return new Int8Array(f(e),0,e)}function v(e){return new Int16Array(f(2*e),0,e)}function x(e){return new Int32Array(f(4*e),0,e)}function b(e){return new Float32Array(f(4*e),0,e)}function _(e){return new Float64Array(f(8*e),0,e)}function w(e){return o?new Uint8ClampedArray(f(e),0,e):p(e)}function T(e){return s?new BigUint64Array(f(8*e),0,e):null}function M(e){return l?new BigInt64Array(f(8*e),0,e):null}function k(e){return new DataView(f(e),0,e)}function A(e){e=i.nextPow2(e);var t=h[i.log2(e)];return t.length>0?t.pop():new a(e)}t.free=function(e){if(a.isBuffer(e))h[i.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var t=e.length||e.byteLength;u[0|i.log2(t)].push(e)}},t.freeUint8=t.freeUint16=t.freeUint32=t.freeBigUint64=t.freeInt8=t.freeInt16=t.freeInt32=t.freeBigInt64=t.freeFloat32=t.freeFloat=t.freeFloat64=t.freeDouble=t.freeUint8Clamped=t.freeDataView=function(e){d(e.buffer)},t.freeArrayBuffer=d,t.freeBuffer=function(e){h[i.log2(e.length)].push(e)},t.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return f(e);switch(t){case"uint8":return p(e);case"uint16":return m(e);case"uint32":return g(e);case"int8":return y(e);case"int16":return v(e);case"int32":return x(e);case"float":case"float32":return b(e);case"double":case"float64":return _(e);case"uint8_clamped":return w(e);case"bigint64":return M(e);case"biguint64":return T(e);case"buffer":return A(e);case"data":case"dataview":return k(e);default:return null}},t.mallocArrayBuffer=f,t.mallocUint8=p,t.mallocUint16=m,t.mallocUint32=g,t.mallocInt8=y,t.mallocInt16=v,t.mallocInt32=x,t.mallocFloat32=t.mallocFloat=b,t.mallocFloat64=t.mallocDouble=_,t.mallocUint8Clamped=w,t.mallocBigUint64=T,t.mallocBigInt64=M,t.mallocDataView=k,t.mallocBuffer=A,t.clearCache=function(){for(var e=0;e<32;++e)c.UINT8[e].length=0,c.UINT16[e].length=0,c.UINT32[e].length=0,c.INT8[e].length=0,c.INT16[e].length=0,c.INT32[e].length=0,c.FLOAT[e].length=0,c.DOUBLE[e].length=0,c.BIGUINT64[e].length=0,c.BIGINT64[e].length=0,c.UINT8C[e].length=0,u[e].length=0,h[e].length=0}},1755:function(e){function t(e){this.roots=Array(e),this.ranks=Array(e);for(var t=0;ttypeof document&&((n=document.createElement("canvas")).width=8192,n.height=1024,a=n.getContext("2d"))},7718:function(e,t,r){e.exports=function(e,t,r,i){var a=64,o=1.25,s={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return i&&(i.size&&i.size>0&&(a=i.size),i.lineSpacing&&i.lineSpacing>0&&(o=i.lineSpacing),i.styletags&&i.styletags.breaklines&&(s.breaklines=!!i.styletags.breaklines),i.styletags&&i.styletags.bolds&&(s.bolds=!!i.styletags.bolds),i.styletags&&i.styletags.italics&&(s.italics=!!i.styletags.italics),i.styletags&&i.styletags.subscripts&&(s.subscripts=!!i.styletags.subscripts),i.styletags&&i.styletags.superscripts&&(s.superscripts=!!i.styletags.superscripts)),r.font=[i.fontStyle,i.fontVariant,i.fontWeight,a+"px",i.font].filter(function(e){return e}).join(" "),r.textAlign="start",r.textBaseline="alphabetic",r.direction="ltr",h(function(e,t,r,i,a,o){r=r.replace(/\n/g,""),r=!0===o.breaklines?r.replace(/\/g,` +`):r.replace(/\/g," ");var s="",l=[];for(x=0;x-1?parseInt(e[1+n]):0,l=a>-1?parseInt(r[1+a]):0;s!==l&&(i=i.replace(A(),"?px "),w*=Math.pow(.75,l-s),i=i.replace("?px ",A())),_+=.25*p*(l-s)}if(!0===o.superscripts){var c=e.indexOf("+"),u=r.indexOf("+"),h=c>-1?parseInt(e[1+c]):0,d=u>-1?parseInt(r[1+u]):0;h!==d&&(i=i.replace(A(),"?px "),w*=Math.pow(.75,d-h),i=i.replace("?px ",A())),_-=.25*p*(d-h)}if(!0===o.bolds){var f=e.indexOf("b|")>-1,m=r.indexOf("b|")>-1;!f&&m&&(i=g?i.replace("italic ","italic bold "):"bold "+i),f&&!m&&(i=i.replace("bold ",""))}if(!0===o.italics){var g=e.indexOf("i|")>-1,y=r.indexOf("i|")>-1;!g&&y&&(i="italic "+i),g&&!y&&(i=i.replace("italic ",""))}t.font=i}(s,E),s=E))}k(),T+=S.length;var C=0|Math.round(b+2*i);g",a="",o=n.length,s=a.length,l="+"===t[0]||"-"===t[0],c=0,u=-s;c>-1&&!(-1===(c=r.indexOf(n,c))||-1===(u=r.indexOf(a,c+o))||u<=c);){for(var h=c;h=u)i[h]=null,r=r.substr(0,h)+" "+r.substr(h+1);else if(null!==i[h]){var d=i[h].indexOf(t[0]);-1===d?i[h]+=t:l&&(i[h]=i[h].substr(0,d+1)+(1+parseInt(i[h][d+1]))+i[h].substr(d+2))}var f=c+o,p=r.substr(f,u-f).indexOf(n);c=-1!==p?p:u+s}return i}function u(e,t,r,n){var c,u=(c=i(e,128),n?a(c.cells,c.positions,.25):{edges:c.cells,positions:c.positions}),h=function(e,t,r){for(var i=t.textAlign||"start",n=t.textBaseline||"alphabetic",a=[0x40000000,0x40000000],o=[0,0],s=e.length,l=0;ltypeof ses)||!ses.ok||ses.ok()){"u">typeof ses&&(ses.weakMapPermitHostObjects=v);var t,r,i,n=!1;if("function"==typeof WeakMap){var a=WeakMap;if(!("u">typeof navigator&&/Firefox/.test(navigator.userAgent))){var o=new a,s=Object.freeze({});if(o.set(s,1),1!==o.get(s))n=!0;else{e.exports=WeakMap;return}}}Object.prototype.hasOwnProperty;var l=Object.getOwnPropertyNames,c=Object.defineProperty,u=Object.isExtensible,h="weakmap:",d=h+"ident:"+Math.random()+"___";if("u">typeof crypto&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var f=new Uint8Array(new ArrayBuffer(25));crypto.getRandomValues(f),d=h+"rand:"+Array.prototype.map.call(f,function(e){return(e%36).toString(36)}).join("")+"___"}if(c(Object,"getOwnPropertyNames",{value:function(e){return l(e).filter(x)}}),"getPropertyNames"in Object){var p=Object.getPropertyNames;c(Object,"getPropertyNames",{value:function(e){return p(e).filter(x)}})}t=Object.freeze,c(Object,"freeze",{value:function(e){return b(e),t(e)}}),r=Object.seal,c(Object,"seal",{value:function(e){return b(e),r(e)}}),i=Object.preventExtensions,c(Object,"preventExtensions",{value:function(e){return b(e),i(e)}});var m=!1,g=0,y=function(){this instanceof y||w();var e=[],t=[],r=g++;return Object.create(y.prototype,{get___:{value:_(function(i,n){var a,o=b(i);return o?r in o?o[r]:n:(a=e.indexOf(i))>=0?t[a]:n})},has___:{value:_(function(t){var i=b(t);return i?r in i:e.indexOf(t)>=0})},set___:{value:_(function(i,n){var a,o=b(i);return o?o[r]=n:(a=e.indexOf(i))>=0?t[a]=n:(t[a=e.length]=n,e[a]=i),this})},delete___:{value:_(function(i){var n,a,o=b(i);return o?r in o&&delete o[r]:!((n=e.indexOf(i))<0)&&(a=e.length-1,e[n]=void 0,t[n]=t[a],e[n]=e[a],e.length=a,t.length=a,!0)})}})};y.prototype=Object.create(Object.prototype,{get:{value:function(e,t){return this.get___(e,t)},writable:!0,configurable:!0},has:{value:function(e){return this.has___(e)},writable:!0,configurable:!0},set:{value:function(e,t){return this.set___(e,t)},writable:!0,configurable:!0},delete:{value:function(e){return this.delete___(e)},writable:!0,configurable:!0}}),"function"==typeof a?function(){function t(){this instanceof y||w();var e,t=new a,r=void 0,i=!1;return e=n?function(e,i){return t.set(e,i),t.has(e)||(r||(r=new y),r.set(e,i)),this}:function(e,n){if(i)try{t.set(e,n)}catch{r||(r=new y),r.set___(e,n)}else t.set(e,n);return this},Object.create(y.prototype,{get___:{value:_(function(e,i){return r?t.has(e)?t.get(e):r.get___(e,i):t.get(e,i)})},has___:{value:_(function(e){return t.has(e)||!!r&&r.has___(e)})},set___:{value:_(e)},delete___:{value:_(function(e){var i=!!t.delete(e);return r&&r.delete___(e)||i})},permitHostObjects___:{value:_(function(e){if(e===v)i=!0;else throw Error("bogus call to permitHostObjects___")})}})}n&&"u">typeof Proxy&&(Proxy=void 0),t.prototype=y.prototype,e.exports=t,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():("u">typeof Proxy&&(Proxy=void 0),e.exports=y)}function v(e){e.permitHostObjects___&&e.permitHostObjects___(v)}function x(e){return e.substr(0,h.length)!=h||"___"!==e.substr(e.length-3)}function b(e){if(e!==Object(e))throw TypeError("Not an object: "+e);var t=e[d];if(t&&t.key===e)return t;if(u(e)){t={key:e};try{return c(e,d,{value:t,writable:!1,enumerable:!1,configurable:!1}),t}catch{return}}}function _(e){return e.prototype=null,Object.freeze(e)}function w(){!m&&"u">typeof console&&(m=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},236:function(e,t,r){var i=r(8284);e.exports=function(){var e={};return function(t){if(("object"!=typeof t||null===t)&&"function"!=typeof t)throw Error("Weakmap-shim: Key must be object");var r=t.valueOf(e);return r&&r.identity===e?r:i(t,e)}}},8284:function(e){e.exports=function(e,t){var r={identity:t},i=e.valueOf;return Object.defineProperty(e,"valueOf",{value:function(e){return e!==t?i.apply(this,arguments):r},writable:!0}),r}},606:function(e,t,r){var i=r(236);e.exports=function(){var e=i();return{get:function(t,r){var i=e(t);return i.hasOwnProperty("value")?i.value:r},set:function(t,r){return e(t).value=r,this},has:function(t){return"value"in e(t)},delete:function(t){return delete e(t).value}}}},3349:function(e){var t,r;t=(function(){return function(e,t,r,i,n,a){var o=e[0],s=r[0],l=[0];i|=0;var c=0;for(c=0;c=0!=h>=0&&n.push(l[0]+.5+.5*(u+h)/(u-h)),i+=s,++l[0]}}}).bind(void 0,{funcName:"zeroCrossings"}),r={},e.exports=function(e,i,n){var a=e.dtype,o=e.order,s=[a,o.join()].join(),l=r[s];return l||(r[s]=l=t([a,o])),l(e.shape.slice(0),e.data,e.stride,0|e.offset,i,n)}},781:function(e,t,r){e.exports=function(e,t){var r=[];return t=+t||0,i(e.hi(e.shape[0]-1),r,t),r};var i=r(3349)},7790:function(){}},i={};function n(e){var t=i[e];if(void 0!==t)return t.exports;var a=i[e]={id:e,loaded:!1,exports:{}};return r[e].call(a.exports,a,a.exports,n),a.loaded=!0,a.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch{if("object"==typeof window)return window}}(),n.nmd=function(e){return e.paths=[],e.children||(e.children=[]),e},t.exports=n(1964)}}),fd=p({"src/lib/str2rgbarray.js"(e,t){var{normalize:r}=ee();t.exports=function(e){return e?r(e):[0,0,0,1]}}}),ff=p({"src/lib/gl_format_color.js"(e,t){var r=C(),i=t3(),n=ee(),a=Q().defaultLine,o=z().isArrayOrTypedArray,s=n.normalize(a);function l(e,t){return[e[0],e[1],e[2],e[3]*t]}function c(e){return!r(e)&&(n.isChannelArray(e)||n.isValid(e))?n.normalize(e):s}function u(e){return r(e)?e:1}t.exports={formatColor:function(e,t,r){var a=e.color;a&&a._inputArray&&(a=a._inputArray);var h,d,f,p,m,g=o(a),y=o(t),v=i.extractOpts(e),x=[];if(h=void 0!==v.colorscale?i.makeColorScaleFuncFromTrace(e):c,d=g?(e,t)=>void 0===e[t]?s:void 0===v.colorscale?h(e[t]):n.normalize(h(e[t])):c,f=y?function(e,t){return void 0===e[t]?1:u(e[t])}:u,g||y)for(var b=0;b0){var d=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=d),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,d)}}else o[s]=[-l[0]*i,l[1]*i]}return o}t.exports=function(e,t,r){var n=[i(e.x,e.error_x,t[0],r.xaxis),i(e.y,e.error_y,t[1],r.yaxis),i(e.z,e.error_z,t[2],r.zaxis)],a=function(e){for(var t=0;t-1?-1:+(e.indexOf("right")>-1)}function x(e){return null==e?0:e.indexOf("top")>-1?-1:+(e.indexOf("bottom")>-1)}function b(e,t){return t(4*e)}function _(e){return d[e]}function w(e,t,r,i,n){var a=null;if(s.isArrayOrTypedArray(e)){a=[];for(var o=0;o=0){var E=function(e,t,r){var i,n=(r+1)%3,a=(r+2)%3,s=[],l=[];for(i=0;i=0&&h("surfacecolor",b||_);for(var w=["x","y","z"],T=0;T<3;++T){var M="projection."+w[T];h(M+".show")&&(h(M+".opacity"),h(M+".scale"))}var k=r.getComponentMethod("errorbars","supplyDefaults");k(e,t,b||_||c,{axis:"z"}),k(e,t,b||_||c,{axis:"y",inherit:"z"}),k(e,t,b||_||c,{axis:"x",inherit:"z"})}}}),fb=p({"src/traces/scatter3d/calc.js"(e,t){var r=i0(),i=iQ();t.exports=function(e,t){var n=[{x:!1,y:!1,trace:t,t:{}}];return r(n,t),i(e,t),n}}}),f_=p({"node_modules/get-canvas-context/index.js"(e,t){t.exports=function(e,t){if("string"!=typeof e)throw TypeError("must specify type string");if(t=t||{},typeof document>"u"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");"number"==typeof t.width&&(r.width=t.width),"number"==typeof t.height&&(r.height=t.height);var i,n=t;try{var a=[e];0===e.indexOf("webgl")&&a.push("experimental-"+e);for(var o=0;o/g," "));l[c]=f,u.tickmode=h}}t.ticks=l;for(var c=0;c<3;++c){a[c]=.5*(e.glplot.bounds[0][c]+e.glplot.bounds[1][c]);for(var p=0;p<2;++p)t.bounds[p][c]=e.glplot.bounds[p][c]}e.contourLevels=function(e){for(var t=[,,,],r=0;r<3;++r){for(var i=e[r],n=Array(i.length),a=0;ar.deltaY?1.1:.9090909090909091,a=e.glplot.getAspectratio();e.glplot.setAspectratio({x:i*a.x,y:i*a.y,z:i*a.z})}n(e)}},!!l&&{passive:!1}),e.glplot.canvas.addEventListener("mousemove",function(){if(!1!==e.fullSceneLayout.dragmode&&0!==e.camera.mouseListener.buttons){var t=i();e.graphDiv.emit("plotly_relayouting",t)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(r){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:r,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0},T.render=function(){var e,t=this,r=t.graphDiv,i=t.svgContainer,n=t.container.getBoundingClientRect();r._fullLayout._calcInverseTransform(r);var a=r._fullLayout._invScaleX,o=r._fullLayout._invScaleY,s=n.width*a,l=n.height*o;i.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),i.setAttributeNS(null,"width",s),i.setAttributeNS(null,"height",l),x(t),t.glplot.axes.update(t.axesOptions);for(var c=Object.keys(t.traces),h=null,p=t.glplot.selection,m=0;m")):"isosurface"===e.type||"volume"===e.type?(T.valueLabel=d.hoverLabelText(t._mockAxis,t._mockAxis.d2l(p.traceCoordinate[3]),e.valuehoverformat),E.push("value: "+T.valueLabel),p.textLabel&&E.push(p.textLabel),S=E.join("
")):S=p.textLabel;var C={x:p.traceCoordinate[0],y:p.traceCoordinate[1],z:p.traceCoordinate[2],data:b._input,fullData:b,curveNumber:b.index,pointNumber:w};f.appendArrayPointValue(C,b,w),e._module.eventData&&(C=b._module.eventData(C,p,b,{},w));var L={points:[C]};if(t.fullSceneLayout.hovermode){var P=[];f.loneHover({trace:b,x:(.5+.5*v[0]/v[3])*s,y:(.5-.5*v[1]/v[3])*l,xLabel:T.xLabel,yLabel:T.yLabel,zLabel:T.zLabel,text:S,name:h.name,color:f.castHoverOption(b,w,"bgcolor")||h.color,borderColor:f.castHoverOption(b,w,"bordercolor"),fontFamily:f.castHoverOption(b,w,"font.family"),fontSize:f.castHoverOption(b,w,"font.size"),fontColor:f.castHoverOption(b,w,"font.color"),nameLength:f.castHoverOption(b,w,"namelength"),textAlign:f.castHoverOption(b,w,"align"),hovertemplate:u.castOption(b,w,"hovertemplate"),hovertemplateLabels:u.extendFlat({},C,T),eventData:[C]},{container:i,gd:r,inOut_bbox:P}),C.bbox=P[0]}p.distance<5&&(p.buttons||_)?r.emit("plotly_click",L):r.emit("plotly_hover",L),this.oldEventData=L}else f.loneUnhover(i),this.oldEventData&&r.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;t.drawAnnotations(t)},T.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){e.glplot.gl.isContextLost()?requestAnimationFrame(t):e.initializeGLPlot()?e.plot.apply(e,e.plotArgs):u.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(t)};var k=["xaxis","yaxis","zaxis"];T.plot=function(e,t,r){if(this.plotArgs=[e,t,r],!this.glplot.contextLost){var i,n,a,o,s,l,c=t[this.id],h=r[this.id];this.fullLayout=t,this.fullSceneLayout=c,this.axesOptions.merge(t,c),this.spikeOptions.merge(c),this.setViewport(c),this.updateFx(c.dragmode,c.hovermode),this.camera.enableWheel=this.graphDiv._context._scrollZoom.gl3d,this.glplot.setClearColor(p(c.bgcolor)),this.setConvert(s),e?Array.isArray(e)||(e=[e]):e=[];var d=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(a=0;ag[1][a])g[0][a]=-1,g[1][a]=1;else{var L=g[1][a]-g[0][a];g[0][a]-=L/32,g[1][a]+=L/32}if(x=b(x=[g[0][a],g[1][a]],s),g[0][a]=x[0],g[1][a]=x[1],s.isReversed()){var P=g[0][a];g[0][a]=g[1][a],g[1][a]=P}}else x=s.range,g[0][a]=s.r2l(x[0]),g[1][a]=s.r2l(x[1]);g[0][a]===g[1][a]&&(g[0][a]-=1,g[1][a]+=1),y[a]=g[1][a]-g[0][a],s.range=[g[0][a],g[1][a]],s.limitRange(),this.glplot.setBounds(a,{min:s.range[0]*f[a],max:s.range[1]*f[a]})}var I,z=c.aspectmode;if("cube"===z)I=[1,1,1];else if("manual"===z){var D=c.aspectratio;I=[D.x,D.y,D.z]}else if("auto"===z||"data"===z){var O=[1,1,1];for(a=0;a<3;++a){var R=v[l=(s=c[k[a]]).type];O[a]=Math.pow(R.acc,1/R.count)/f[a]}I="data"===z||Math.max.apply(null,O)/Math.min.apply(null,O)<=4?O:[1,1,1]}else throw Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=h.aspectratio.x=I[0],c.aspectratio.y=h.aspectratio.y=I[1],c.aspectratio.z=h.aspectratio.z=I[2],this.glplot.setAspectratio(c.aspectratio),this.viewInitial.aspectratio||(this.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),this.viewInitial.aspectmode||(this.viewInitial.aspectmode=c.aspectmode);var F=c.domain||null,j=t._size||null;if(F&&j){var B=this.container.style;B.position="absolute",B.left=j.l+F.x[0]*j.w+"px",B.top=j.t+(1-F.y[1])*j.h+"px",B.width=j.w*(F.x[1]-F.x[0])+"px",B.height=j.h*(F.y[1]-F.y[0])+"px"}this.glplot.redraw()}},T.destroy=function(){this.glplot&&(this.camera.mouseListener.enabled=!1,this.container.removeEventListener("wheel",this.camera.wheelListener),this.camera=null,this.glplot.dispose(),this.container.parentNode.removeChild(this.container),this.glplot=null)},T.getCamera=function(){var e;return this.camera.view.recalcMatrix(this.camera.view.lastT()),{up:{x:(e=this.camera).up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:!0===e._ortho?"orthographic":"perspective"}}},T.setViewport=function(e){var t=e.camera;this.camera.lookAt.apply(this,[[t.eye.x,t.eye.y,t.eye.z],[t.center.x,t.center.y,t.center.z],[t.up.x,t.up.y,t.up.z]]),this.glplot.setAspectratio(e.aspectratio),"orthographic"===t.projection.type!==this.camera._ortho&&(this.glplot.redraw(),this.glplot.clearRGBA(),this.glplot.dispose(),this.initializeGLPlot())},T.isCameraChanged=function(e){var t=this.getCamera(),r=u.nestedProperty(e,this.id+".camera").get(),i=!1;if(void 0===r)i=!0;else{for(var n=0;n<3;n++)for(var a=0;a<3;a++)if(!function(e,t,r,i){var n=["up","center","eye"],a=["x","y","z"];return t[n[r]]&&e[n[r]][a[i]]===t[n[r]][a[i]]}(t,r,n,a)){i=!0;break}(!r.projection||t.projection&&t.projection.type!==r.projection.type)&&(i=!0)}return i},T.isAspectChanged=function(e){var t=this.glplot.getAspectratio(),r=u.nestedProperty(e,this.id+".aspectratio").get();return void 0===r||r.x!==t.x||r.y!==t.y||r.z!==t.z},T.saveLayout=function(e){var t,r,i,n,a,o,s=this.fullLayout,l=this.isCameraChanged(e),h=this.isAspectChanged(e),d=l||h;if(d){var f={};l&&(t=this.getCamera(),i=(r=u.nestedProperty(e,this.id+".camera")).get(),f[this.id+".camera"]=i),h&&(n=this.glplot.getAspectratio(),o=(a=u.nestedProperty(e,this.id+".aspectratio")).get(),f[this.id+".aspectratio"]=o),c.call("_storeDirectGUIEdit",e,s._preGUI,f),l&&(r.set(t),u.nestedProperty(s,this.id+".camera").set(t)),h&&(a.set(n),u.nestedProperty(s,this.id+".aspectratio").set(n),this.glplot.redraw())}return d},T.updateFx=function(e,t){var r=this.camera;if(r)if("orbit"===e)r.mode="orbit",r.keyBindingMode="rotate";else if("turntable"===e){r.up=[0,0,1],r.mode="turntable",r.keyBindingMode="rotate";var i=this.graphDiv,n=i._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",d={x:0,y:0,z:1},f={};f[h]=d;var p=i.layout;c.call("_storeDirectGUIEdit",p,n._preGUI,f),a.up=d,u.nestedProperty(p,h).set(d)}}else r.keyBindingMode=e;this.fullSceneLayout.hovermode=t},T.toImage=function(e){e||(e="png"),this.staticMode&&this.container.appendChild(r),this.glplot.redraw();var t,i=this.glplot.gl,n=i.drawingBufferWidth,a=i.drawingBufferHeight;i.bindFramebuffer(i.FRAMEBUFFER,null);var o=new Uint8Array(n*a*4);i.readPixels(0,0,n,a,i.RGBA,i.UNSIGNED_BYTE,o),function(e,t,r){for(var i=0,n=r-1;i0)for(var s=255/o,l=0;l<3;++l)e[a+l]=Math.min(s*e[a+l],255)}}(o,n,a);var s=document.createElement("canvas");s.width=n,s.height=a;var l=s.getContext("2d",{willReadFrequently:!0}),c=l.createImageData(n,a);switch(c.data.set(o),l.putImageData(c,0,0),e){case"jpeg":t=s.toDataURL("image/jpeg");break;case"webp":t=s.toDataURL("image/webp");break;default:t=s.toDataURL("image/png")}return this.staticMode&&this.container.removeChild(r),t},T.setConvert=function(){for(var e=0;e<3;e++){var t=this.fullSceneLayout[k[e]];d.setConvert(t,this.fullLayout),t.setScale=u.noop}},T.make4thDimension=function(){var e=this.graphDiv._fullLayout;this._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},d.setConvert(this._mockAxis,e)},t.exports=w}}),fE=p({"src/plots/gl3d/layout/attributes.js"(e,t){t.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),fC=p({"src/plots/gl3d/layout/axis_attributes.js"(e,t){var r=ee(),i=tN(),n=q().extendFlat;t.exports=(0,eq().overrideAll)({visible:i.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:r.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:i.color,categoryorder:i.categoryorder,categoryarray:i.categoryarray,title:{text:i.title.text,font:i.title.font},type:n({},i.type,{values:["-","linear","log","date","category"]}),autotypenumbers:i.autotypenumbers,autorange:i.autorange,autorangeoptions:{minallowed:i.autorangeoptions.minallowed,maxallowed:i.autorangeoptions.maxallowed,clipmin:i.autorangeoptions.clipmin,clipmax:i.autorangeoptions.clipmax,include:i.autorangeoptions.include,editType:"plot"},rangemode:i.rangemode,minallowed:i.minallowed,maxallowed:i.maxallowed,range:n({},i.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:i.minor.tickmode,nticks:i.nticks,tick0:i.tick0,dtick:i.dtick,tickvals:i.tickvals,ticktext:i.ticktext,ticks:i.ticks,mirror:i.mirror,ticklen:i.ticklen,tickwidth:i.tickwidth,tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,tickfont:i.tickfont,tickangle:i.tickangle,tickprefix:i.tickprefix,showtickprefix:i.showtickprefix,ticksuffix:i.ticksuffix,showticksuffix:i.showticksuffix,showexponent:i.showexponent,exponentformat:i.exponentformat,minexponent:i.minexponent,separatethousands:i.separatethousands,tickformat:i.tickformat,tickformatstops:i.tickformatstops,hoverformat:i.hoverformat,showline:i.showline,linecolor:i.linecolor,linewidth:i.linewidth,showgrid:i.showgrid,gridcolor:n({},i.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:i.gridwidth,zeroline:i.zeroline,zerolinecolor:i.zerolinecolor,zerolinewidth:i.zerolinewidth},"plot","from-root")}}),fL=p({"src/plots/gl3d/layout/layout_attributes.js"(e,t){var r=fC(),i=at().attributes,n=q().extendFlat;function a(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}t.exports={_arrayAttrRegexps:[(0,tv().counterRegex)("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:n(a(0,0,1),{}),center:n(a(0,0,0),{}),eye:n(a(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:r,yaxis:r,zaxis:r,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"}}}),fP=p({"src/plots/gl3d/layout/axis_defaults.js"(e,t){var r=ee(),i=tv(),n=tS(),a=fC(),o=ns(),s=nu(),l=["xaxis","yaxis","zaxis"],c=13600/187;t.exports=function(e,t,u){var h,d;function f(e,t){return i.coerce(h,d,a,e,t)}for(var p=0;p.999)&&(g="turntable")}else g="turntable";r("dragmode",g),r("hovermode",a.getDfltFromLayout("hovermode"))}t.exports=function(e,t,i){var n=t._basePlotModules.length>1;a(e,t,i,{type:c,attributes:s,handleDefaults:u,fullLayout:t,font:t.font,fullData:i,getDfltFromLayout:function(t){if(!n&&r.validate(e[t],s[t]))return e[t]},autotypenumbersDflt:t.autotypenumbers,paper_bgcolor:t.paper_bgcolor,calendar:t.calendar})}}}),fz=p({"src/plots/gl3d/index.js"(e){var t=eq().overrideAll,r=W(),i=fS(),n=tI().getSubplotData,a=tv(),o=tO(),s="gl3d",l="scene";e.name=s,e.attr=l,e.idRoot=l,e.idRegex=e.attrRegex=a.counterRegex("scene"),e.attributes=fE(),e.layoutAttributes=fL(),e.baseLayoutAttrOverrides=t({hoverlabel:r.hoverlabel},"plot","nested"),e.supplyLayoutDefaults=fI(),e.plot=function(e){for(var t=e._fullLayout,r=e._fullData,a=t._subplots[s],o=0;o720;)i--,i/=function(e){for(var t=p(e),r=e,i=0;i0){r=f[i];break}return r}(i),++i<120&&(i=720);var n=Math.round(i/e);return n>1?n:1},d.refineCoords=function(e){for(var t=this.dataScaleX,r=this.dataScaleY,a=e[0].shape[0],o=e[0].shape[1],s=0|Math.floor(e[0].shape[0]*t+1),l=0|Math.floor(e[0].shape[1]*r+1),c=1+a+1,u=1+o+1,h=i(new Float32Array(c*u),[c,u]),d=[1/t,0,0,0,1/r,0,0,0,1],f=0;f0&&null!==this.contourStart[e]&&null!==this.contourEnd[e]&&this.contourEnd[e]>this.contourStart[e]))for(n[e]=!0,t=this.contourStart[e];tb&&(this.minValues[y]=b),this.maxValues[y]l&&(t.isomin=null,t.isomax=null);var c=o("x"),u=o("y"),h=o("z"),d=o("value");if(!c||!c.length||!u||!u.length||!h||!h.length||!d||!d.length){t.visible=!1;return}i.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],n),o("valuehoverformat"),["x","y","z"].forEach(function(e){o(e+"hoverformat");var t="caps."+e;o(t+".show")&&o(t+".fill");var r="slices."+e;o(r+".show")&&(o(r+".fill"),o(r+".locations"))}),o("spaceframe.show")&&o("spaceframe.fill"),o("surface.show")&&(o("surface.count"),o("surface.fill"),o("surface.pattern")),o("contour.show")&&(o("contour.color"),o("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(e){o(e)}),a(e,t,n,o,{prefix:"",cLetter:"c"}),t._length=null}t.exports={supplyDefaults:function(e,t,i,a){o(e,t,i,a,function(i,a){return r.coerce(e,t,n,i,a)})},supplyIsoDefaults:o}}}),fG=p({"src/traces/streamtube/calc.js"(e,t){var r=tv(),i=t2();function n(e){var t,i,n,o,s,l,c,u,h,d,f,p,m=e._x,g=e._y,y=e._z,v=e._len,x=-1/0,b=1/0,_=-1/0,w=1/0,T=-1/0,M=1/0,k="";for(v&&(c=m[0],h=g[0],f=y[0]),v>1&&(u=m[v-1],d=g[v-1],p=y[v-1]),t=0;tu?"-":"+")+"x")).replace("y",(h>d?"-":"+")+"y")).replace("z",(f>p?"-":"+")+"z");var C=function(){v=0,A=[],S=[],E=[]};(!v||v0;r--){var i=Math.min(t[r],t[r-1]),n=Math.max(t[r],t[r-1]);if(n>i&&i-1}function z(l,c,u){i=r;var h=[c],d=[u];if(t>=1)h=[c],d=[u];else if(t>0){var f,p,m,y,v,x,b,_,w,T,M,k,A,S=(f=c,p=u,m=f[0],_=P(x=function(e,t,r){for(var i=[],n=0;n-1?u[O]:function(e,t,r){for(var l=s.length,c=i;c-1?D[O]=N:D[O]=L(R,F,j,null===l?B:l)}C=D[0],I=D[1],z=D[2],e._meshI.push(C),e._meshJ.push(I),e._meshK.push(z),++g}}function D(e,t,r,i){var n=e[3];ni&&(n=i);for(var a=(e[3]-n)/(e[3]-t[3]+1e-9),o=[],s=0;s<4;s++)o[s]=(1-a)*e[s]+a*t[s];return o}function O(e){var t=.001*(E-S);return e>=S-t&&e<=E+t}function R(t){for(var r=[],i=0;i<4;i++){var n=t[i];r.push([e._x[n],e._y[n],e._z[n],e._value[n]])}return r}function F(e,t,r,i,n,a){a||(a=1),r=[-1,-1,-1];var o,s,l,c=!1,u=[(o=t[0][3],o>=i&&o<=n),(s=t[1][3],s>=i&&s<=n),(l=t[2][3],l>=i&&l<=n)];if(!u[0]&&!u[1]&&!u[2])return!1;var h=function(e,t,r){return O(t[0][3])&&O(t[1][3])&&O(t[2][3])?(z(e,t,r),!0):a<3&&F(e,t,r,S,E,++a)};if(u[0]&&u[1]&&u[2])return h(e,t,r)||c;var d=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(a){if(u[a[0]]&&u[a[1]]&&!u[a[2]]){var o=t[a[0]],s=t[a[1]],l=t[a[2]],f=D(l,o,i,n),p=D(l,s,i,n);c=h(e,[p,f,o],[-1,-1,r[a[0]]])||c,c=h(e,[o,s,p],[r[a[0]],r[a[1]],-1])||c,d=!0}}),d||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(a){if(u[a[0]]&&!u[a[1]]&&!u[a[2]]){var o=t[a[0]],s=t[a[1]],l=t[a[2]],f=D(s,o,i,n);c=h(e,[D(l,o,i,n),f,o],[-1,-1,r[a[0]]])||c,d=!0}}),c}function j(e,t,r,i){var n,a,o,s,l,c=!1,u=R(t),h=[(n=u[0][3],n>=r&&n<=i),(a=u[1][3],a>=r&&a<=i),(o=u[2][3],o>=r&&o<=i),(s=u[3][3],s>=r&&s<=i)];if(!h[0]&&!h[1]&&!h[2]&&!h[3])return c;if(h[0]&&h[1]&&h[2]&&h[3])return m&&((l=function(r,i,n){z(e,[u[r],u[i],u[n]],[t[r],t[i],t[n]])})(0,1,2),l(3,0,1),l(2,3,0),l(1,2,3)),c;var d=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(n){if(h[n[0]]&&h[n[1]]&&h[n[2]]&&!h[n[3]]){var a=u[n[0]],o=u[n[1]],s=u[n[2]],l=u[n[3]];c=m?z(e,[a,o,s],[t[n[0]],t[n[1]],t[n[2]]])||c:z(null,[D(l,a,r,i),D(l,o,r,i),D(l,s,r,i)],[-1,-1,-1])||c,d=!0}}),d||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(n){if(h[n[0]]&&h[n[1]]&&!h[n[2]]&&!h[n[3]]){var a,o,s,l=u[n[0]],f=u[n[1]],p=u[n[2]],g=u[n[3]],y=D(p,l,r,i),v=D(p,f,r,i),x=D(g,f,r,i),b=D(g,l,r,i);m?(c=z(e,[l,b,y],[t[n[0]],-1,-1])||c,c=z(e,[f,v,x],[t[n[1]],-1,-1])||c):(a=[y,v,x,b],o=[-1,-1,-1,-1],(s=function(e,t,r){z(null,[a[e],a[t],a[r]],[o[e],o[t],o[r]])})(0,1,2),s(2,3,0)),d=!0}}),d)||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(n){if(h[n[0]]&&!h[n[1]]&&!h[n[2]]&&!h[n[3]]){var a=u[n[0]],o=u[n[1]],s=u[n[2]],l=u[n[3]],f=D(o,a,r,i),p=D(s,a,r,i),g=D(l,a,r,i);m?(c=z(e,[a,f,p],[t[n[0]],-1,-1])||c,c=z(e,[a,p,g],[t[n[0]],-1,-1])||c,c=z(e,[a,g,f],[t[n[0]],-1,-1])||c):c=z(null,[f,p,g],[-1,-1,-1])||c,d=!0}}),c}function B(e,t,r,i,n,a,o,s,l,c,u){var h=!1;return p&&(I(e,"A")&&(h=j(null,[t,r,i,a],c,u)||h),I(e,"B")&&(h=j(null,[r,i,n,l],c,u)||h),I(e,"C")&&(h=j(null,[r,a,o,l],c,u)||h),I(e,"D")&&(h=j(null,[i,a,s,l],c,u)||h),I(e,"E")&&(h=j(null,[r,i,a,l],c,u)||h)),m&&(h=j(e,[r,i,a,l],c,u)||h),h}function N(e,t,r,i,n,a,o,s){return[!0===s[0]||F(e,R([t,r,i]),[t,r,i],a,o),!0===s[1]||F(e,R([i,n,t]),[i,n,t],a,o)]}function U(e,t,r,i,n,a,o,s,l){return s?N(e,t,r,n,i,a,o,l):N(e,r,n,i,t,a,o,l)}function V(e,t,r,i,n,a,o){var s,l,c,u,h=!1,d=function(){h=F(e,[s,l,c],[-1,-1,-1],n,a)||h,h=F(e,[c,u,s],[-1,-1,-1],n,a)||h},f=o[0],p=o[1],m=o[2];return f&&(s=P(R([M(t,r-0,i-0)])[0],R([M(t-1,r-0,i-0)])[0],f),l=P(R([M(t,r-0,i-1)])[0],R([M(t-1,r-0,i-1)])[0],f),c=P(R([M(t,r-1,i-1)])[0],R([M(t-1,r-1,i-1)])[0],f),u=P(R([M(t,r-1,i-0)])[0],R([M(t-1,r-1,i-0)])[0],f),d()),p&&(s=P(R([M(t-0,r,i-0)])[0],R([M(t-0,r-1,i-0)])[0],p),l=P(R([M(t-0,r,i-1)])[0],R([M(t-0,r-1,i-1)])[0],p),c=P(R([M(t-1,r,i-1)])[0],R([M(t-1,r-1,i-1)])[0],p),u=P(R([M(t-1,r,i-0)])[0],R([M(t-1,r-1,i-0)])[0],p),d()),m&&(s=P(R([M(t-0,r-0,i)])[0],R([M(t-0,r-0,i-1)])[0],m),l=P(R([M(t-0,r-1,i)])[0],R([M(t-0,r-1,i-1)])[0],m),c=P(R([M(t-1,r-1,i)])[0],R([M(t-1,r-1,i-1)])[0],m),u=P(R([M(t-1,r-0,i)])[0],R([M(t-1,r-0,i-1)])[0],m),d()),h}function q(e,t,r,i,n){for(var a=[],o=0,s=0;sMath.abs(z-A)?[k,z]:[z,A];T=D[0],P=D[1],p=!0,W(r,T,P),p=!1}}var O=[[Math.min(S,A),Math.max(S,A)],[Math.min(k,E),Math.max(k,E)]];["x","y","z"].forEach(function(r){for(var i=[],n=0;n0&&(h.push(p.id),"x"===r?d.push([p.distRatio,0,0]):"y"===r?d.push([0,p.distRatio,0]):d.push([0,0,p.distRatio]))}else u="x"===r?Y(1,b-1):"y"===r?Y(1,_-1):Y(1,w-1);h.length>0&&("x"===r?i[a]=function(e,t,r,i,n){for(var a=[],o=0,s=0;s0&&("x"===r?i[a]=q(null,u,o,s,i[a]):"y"===r?i[a]=H(null,u,o,s,i[a]):i[a]=G(null,u,o,s,i[a]),a++)}var m=e.caps[r];m.show&&m.fill&&(t=m.fill,"x"===r?i[a]=q(null,[0,b-1],o,s,i[a]):"y"===r?i[a]=H(null,[0,_-1],o,s,i[a]):i[a]=G(null,[0,w-1],o,s,i[a]),a++)}}),0===g&&C(),e._meshX=n,e._meshY=a,e._meshZ=o,e._meshIntensity=s,e._Xs=y,e._Ys=v,e._Zs=x}(),e}t.exports={findNearestOnAxis:l,generateIsoMeshes:d,createIsosurfaceTrace:function(e,t){var i=r({gl:e.glplot.gl}),n=new c(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}}}}),f$=p({"src/traces/isosurface/index.js"(e,t){t.exports={attributes:fq(),supplyDefaults:fH().supplyDefaults,calc:fW(),colorbar:{min:"cmin",max:"cmax"},plot:fZ().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:fz(),categories:["gl3d","showLegend"],meta:{}}}}),fX=p({"lib/isosurface.js"(e,t){t.exports=f$()}}),fK=p({"src/traces/volume/attributes.js"(e,t){var r=tV(),i=fq(),n=fR(),a=Z(),o=q().extendFlat,s=t.exports=(0,eq().overrideAll)(o({x:i.x,y:i.y,z:i.z,value:i.value,isomin:i.isomin,isomax:i.isomax,surface:i.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:i.slices,caps:i.caps,text:i.text,hovertext:i.hovertext,xhoverformat:i.xhoverformat,yhoverformat:i.yhoverformat,zhoverformat:i.zhoverformat,valuehoverformat:i.valuehoverformat,hovertemplate:i.hovertemplate,hovertemplatefallback:i.hovertemplatefallback},r("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:i.colorbar,opacity:i.opacity,opacityscale:n.opacityscale,lightposition:i.lightposition,lighting:i.lighting,flatshading:i.flatshading,contour:i.contour,hoverinfo:o({},a.hoverinfo),showlegend:o({},a.showlegend,{dflt:!1})}),"calc","nested");s.x.editType=s.y.editType=s.z.editType=s.value.editType="calc+clearAxisTypes"}}),fJ=p({"src/traces/volume/defaults.js"(e,t){var r=tv(),i=fK(),n=fH().supplyIsoDefaults,a=fF().opacityscaleDefaults;t.exports=function(e,t,o,s){function l(n,a){return r.coerce(e,t,i,n,a)}n(e,t,o,s,l),a(e,t,s,l)}}}),fQ=p({"src/traces/volume/convert.js"(e,t){var r=fh().gl_mesh3d,i=ff().parseColorScale,n=tv().isArrayOrTypedArray,a=fd(),o=t3().extractOpts,s=fY(),l=fZ().findNearestOnAxis,c=fZ().generateIsoMeshes;function u(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var h=u.prototype;h.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],i=this.data._meshY[t],a=this.data._meshZ[t],o=this.data._Ys.length,s=this.data._Zs.length,c=l(r,this.data._Xs).id,u=l(i,this.data._Ys).id,h=e.index=l(a,this.data._Zs).id+s*u+s*o*c;e.traceCoordinate=[this.data._meshX[h],this.data._meshY[h],this.data._meshZ[h],this.data._value[h]];var d=this.data.hovertext||this.data.text;return n(d)&&void 0!==d[h]?e.textLabel=d[h]:d&&(e.textLabel=d),!0}},h.update=function(e){var t=this.scene,r=t.fullSceneLayout;function n(e,t,r,i){return t.map(function(t){return e.d2l(t,0,i)*r})}this.data=c(e);var l={positions:s(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),cells:s(e._meshI,e._meshJ,e._meshK),lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:a(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},u=o(e);l.vertexIntensity=e._meshIntensity,l.vertexIntensityBounds=[u.min,u.max],l.colormap=i(e),this.mesh.update(l)},h.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},t.exports=function(e,t){var i=r({gl:e.glplot.gl}),n=new u(e,i,t.uid);return i._trace=n,n.update(t),e.glplot.add(i),n}}}),f0=p({"src/traces/volume/index.js"(e,t){t.exports={attributes:fK(),supplyDefaults:fJ(),calc:fW(),colorbar:{min:"cmin",max:"cmax"},plot:fQ(),moduleType:"trace",name:"volume",basePlotModule:fz(),categories:["gl3d","showLegend"],meta:{}}}}),f1=p({"lib/volume.js"(e,t){t.exports=f0()}}),f2=p({"src/traces/mesh3d/defaults.js"(e,t){var r=eQ(),i=tv(),n=tQ(),a=fV();t.exports=function(e,t,o,s){function l(r,n){return i.coerce(e,t,a,r,n)}function c(e){var t=e.map(function(e){var t=l(e);return t&&i.isArrayOrTypedArray(t)?t:null});return t.every(function(e){return e&&e.length===t[0].length})&&t}if(!c(["x","y","z"])||(c(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j))){t.visible=!1;return}r.getComponentMethod("calendars","handleTraceDefaults")(e,t,["x","y","z"],s),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(e){l(e)}),l("contour.show")&&(l("contour.color"),l("contour.width")),"intensity"in e?(l("intensity"),l("intensitymode"),n(e,t,s,l,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?l("facecolor"):"vertexcolor"in e?l("vertexcolor"):l("color",o)),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),t._length=null}}}),f3=p({"src/traces/mesh3d/calc.js"(e,t){var r=t2();t.exports=function(e,t){t.intensity&&r(e,t,{vals:t.intensity,containerStr:"",cLetter:"c"})}}}),f5=p({"src/traces/mesh3d/convert.js"(e,t){var r=fh().gl_mesh3d,i=fh().delaunay_triangulate,n=fh().alpha_shape,a=fh().convex_hull,o=ff().parseColorScale,s=tv().isArrayOrTypedArray,l=fd(),c=t3().extractOpts,u=fY();function h(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var d=h.prototype;function f(e){for(var t=[],r=e.length,i=0;i=t-.5)return!1;return!0}d.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return s(r)&&void 0!==r[t]?e.textLabel=r[t]:r&&(e.textLabel=r),!0}},d.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var s,h=e.x.length,d=u(p(r.xaxis,e.x,t.dataScale[0],e.xcalendar),p(r.yaxis,e.y,t.dataScale[1],e.ycalendar),p(r.zaxis,e.z,t.dataScale[2],e.zcalendar));if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!g(e.i,h)||!g(e.j,h)||!g(e.k,h))return;s=u(m(e.i),m(e.j),m(e.k))}else s=0===e.alphahull?a(d):e.alphahull>0?n(e.alphahull,d):function(e,t){for(var r=["x","y","z"].indexOf(e),n=[],a=t.length,o=0;o2?e.slice(1,t-1):2===t?[(e[0]+e[1])/2]:e}function d(e){var t=e.length;return 1===t?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function f(e,t){var i=e.fullSceneLayout,c=e.dataScale,u=t._len,f={};function p(e,t){var r=i[t],a=c[l[t]];return n.simpleMap(e,function(e){return r.d2l(e)*a})}if(f.vectors=s(p(t._u,"xaxis"),p(t._v,"yaxis"),p(t._w,"zaxis"),u),!u)return{positions:[],cells:[]};var m=p(t._Xs,"xaxis"),g=p(t._Ys,"yaxis"),y=p(t._Zs,"zaxis");if(f.meshgrid=[m,g,y],f.gridFill=t._gridFill,t._slen)f.startingPositions=s(p(t._startsX,"xaxis"),p(t._startsY,"yaxis"),p(t._startsZ,"zaxis"));else{for(var v=g[0],x=h(m),b=h(y),_=Array(x.length*b.length),w=0,T=0;To&&(o=e[0]),e[1]s&&(s=e[1])}for(t in e.arcs.forEach(function(e){for(var t,r=-1,l=e.length;++ro&&(o=t[0]),t[1]s&&(s=t[1])}),e.objects)!function e(t){switch(t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"Point":l(t.coordinates);break;case"MultiPoint":t.coordinates.forEach(l)}}(e.objects[t]);return[n,a,o,s]}function n(e,t){var r=t.id,i=t.bbox,n=null==t.properties?{}:t.properties,o=a(e,t);return null==r&&null==i?{type:"Feature",properties:n,geometry:o}:null==i?{type:"Feature",id:r,properties:n,geometry:o}:{type:"Feature",id:r,bbox:i,properties:n,geometry:o}}function a(e,t){var i=r(e.transform),n=e.arcs;function a(e){return i(e)}function o(e){for(var t=[],r=0,a=e.length;r1)i=function(e,t){var r,i=[],n=[];function a(e){var t=e<0?~e:e;(n[t]||(n[t]=[])).push({i:e,g:r})}function o(e){e.forEach(a)}function s(e){e.forEach(o)}return function e(t){switch(r=t,t.type){case"GeometryCollection":t.geometries.forEach(e);break;case"LineString":o(t.arcs);break;case"MultiLineString":case"Polygon":s(t.arcs);break;case"MultiPolygon":t.arcs.forEach(s)}}(e),n.forEach(null==t?function(e){i.push(e[0].i)}:function(e){t(e[0].g,e[e.length-1].g)&&i.push(e[0].i)}),i}(t,r);else for(n=0,i=Array(a=e.arcs.length);n1)for(var a,s,c=1,u=l(n[0]);cu&&(s=n[0],n[0]=n[c],n[c]=s,u=a);return n}).filter(function(e){return e.length>0})}}function c(e,t){for(var r=0,i=e.length;r>>1;e[n]=2))throw Error("n must be ≥2");var r,n=(l=e.bbox||i(e))[0],a=l[1],o=l[2],s=l[3];t={scale:[o-n?(o-n)/(r-1):1,s-a?(s-a)/(r-1):1],translate:[n,a]}}var l,c,h=u(t),d=e.objects,f={};function p(e){return h(e)}for(c in d)f[c]=function e(t){var r;switch(t.type){case"GeometryCollection":r={type:"GeometryCollection",geometries:t.geometries.map(e)};break;case"Point":r={type:"Point",coordinates:p(t.coordinates)};break;case"MultiPoint":r={type:"MultiPoint",coordinates:t.coordinates.map(p)};break;default:return t}return null!=t.id&&(r.id=t.id),null!=t.bbox&&(r.bbox=t.bbox),null!=t.properties&&(r.properties=t.properties),r}(d[c]);return{type:"Topology",bbox:l,transform:t,objects:f,arcs:e.arcs.map(function(e){var t,r=0,i=1,n=e.length,a=Array(n);for(a[0]=h(e[0],0);++rtypeof t?e:(r=r||self).topojson=r.topojson||{})}}),pp=p({"src/lib/topojson_utils.js"(e,t){var r=t.exports={},i=pd().locationmodeToLayer,n=pf().feature;r.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")},r.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`},r.getTopojsonFeatures=function(e,t){var r=i[e.locationmode],a=t.objects[r];return n(t,a).features}}}),pm=p({"src/lib/geojson_utils.js"(e){var t=L().BADNUM;e.calcTraceToLineCoords=function(e){for(var r=e[0].trace,i=r.connectgaps,n=[],a=[],o=0;o0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n},e.makeLine=function(e){return 1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}},e.makePolygon=function(e){if(1===e.length)return{type:"Polygon",coordinates:e};for(var t=Array(e.length),r=0;r{for(var i in t)r(e,i,{get:t[i],enumerable:!0})})(o,{COUNTRIES:()=>s,byAlpha2:()=>p,byAlpha3:()=>f,byM49:()=>m,createLookup:()=>c,lookup:()=>h,lookupAlpha3:()=>d,sanitize:()=>l}),t.exports=((e,t,o)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let s of n(t))a.call(e,s)||void 0===s||r(e,s,{get:()=>t[s],enumerable:!(o=i(t,s))||o.enumerable});return e})(r({},"__esModule",{value:!0}),o);var s=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\uD83C\uDDE6\uD83C\uDDFC","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\uD83C\uDDE6\uD83C\uDDEB","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","афғонистон","أفغانستان","افغانستان","د افغانستان اسلامی جمهوریت"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\uD83C\uDDE6\uD83C\uDDF4","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\uD83C\uDDE6\uD83C\uDDEE","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xc5land Islands",aliases:["\uD83C\uDDE6\uD83C\uDDFD","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\uD83C\uDDE6\uD83C\uDDF1","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\uD83C\uDDE6\uD83C\uDDE9","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\uD83C\uDDE6\uD83C\uDDEA","emirates","uae","الإمارات","الإمارات العربية المتحدة","الامارات","الامارات العربية المتحدة","دولة الإمارات العربية المتحدة"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\uD83C\uDDE6\uD83C\uDDF7","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\uD83C\uDDE6\uD83C\uDDF2","hayastan","hayastani hanrapetutyun","republic of armenia","հայաստան","հայաստանի հանրապետություն","հայք","հհ"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\uD83C\uDDE6\uD83C\uDDF8","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\uD83C\uDDE6\uD83C\uDDF6","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\uD83C\uDDF9\uD83C\uDDEB","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\uD83C\uDDE6\uD83C\uDDEC","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\uD83C\uDDE6\uD83C\uDDFA","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\uD83C\uDDE6\uD83C\uDDF9","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\uD83C\uDDE6\uD83C\uDDFF","azərbaycan","azərbaycan respublikası","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\uD83C\uDDE7\uD83C\uDDEE","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\uD83C\uDDE7\uD83C\uDDEA","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\uD83C\uDDE7\uD83C\uDDEF","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\uD83C\uDDE7\uD83C\uDDF6","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\uD83C\uDDE7\uD83C\uDDEB","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\uD83C\uDDE7\uD83C\uDDE9","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","গণপ্রজাতন্ত্রী বাংলাদেশ","বাংলা দেশ","বাংলাদেশ","বিডি"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\uD83C\uDDE7\uD83C\uDDEC","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","бг","българия","република българия"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\uD83C\uDDE7\uD83C\uDDED","bahrein islands","kingdom of bahrain","البحرين","دولة البحرين","مملكة البحرين"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\uD83C\uDDE7\uD83C\uDDF8","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\uD83C\uDDE7\uD83C\uDDE6","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","бих","босна","босна и херцеговина","бх"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xe9lemy",aliases:["\uD83C\uDDE7\uD83C\uDDF1","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\uD83C\uDDE7\uD83C\uDDFE","republic of belarus","respublika belarus","respublika byelarus","беларуская рэспубліка","беларусь","белая русь","белоруссия","рб","республика беларусь","рэспубліка беларусь"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\uD83C\uDDE7\uD83C\uDDFF"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\uD83C\uDDE7\uD83C\uDDF2","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\uD83C\uDDE7\uD83C\uDDF4","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\uD83C\uDDE7\uD83C\uDDF7","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\uD83C\uDDE7\uD83C\uDDE7","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\uD83C\uDDE7\uD83C\uDDF3","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\uD83C\uDDE7\uD83C\uDDF9","kingdom of bhutan","འབྲུག","འབྲུག་ཡུལ་","འབྲུགཡུལ་་"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\uD83C\uDDE7\uD83C\uDDFB"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\uD83C\uDDE7\uD83C\uDDFC","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\uD83C\uDDE8\uD83C\uDDEB","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\uD83C\uDDE8\uD83C\uDDE6","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\uD83C\uDDE8\uD83C\uDDE8","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\uD83C\uDDE8\uD83C\uDDED","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","confœderatio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\uD83C\uDDE8\uD83C\uDDF1","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\uD83C\uDDE8\uD83C\uDDF3","china pr","peoples republic of china","pr china","prc","中华人民共和国","中国"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xf4te d'Ivoire",aliases:["\uD83C\uDDE8\uD83C\uDDEE","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\uD83C\uDDE8\uD83C\uDDF2","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\uD83C\uDDE8\uD83C\uDDE9","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\uD83C\uDDE8\uD83C\uDDEC","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\uD83C\uDDE8\uD83C\uDDF0","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\uD83C\uDDE8\uD83C\uDDF4","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\uD83C\uDDF0\uD83C\uDDF2","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","إتحاد القمر","اتحاد جزر القمر","الاتحاد القمري","القمر","جزر القمر","جمهورية القمر المتحدة","جمهورية جزر القمر الاتحادية الإسلامية","جمهورية جزرالقمر المتحدة"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\uD83C\uDDE8\uD83C\uDDFB","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\uD83C\uDDE8\uD83C\uDDF7","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\uD83C\uDDE8\uD83C\uDDFA","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xe7ao",aliases:["\uD83C\uDDE8\uD83C\uDDFC","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","curaςao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\uD83C\uDDE8\uD83C\uDDFD","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\uD83C\uDDF0\uD83C\uDDFE","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\uD83C\uDDE8\uD83C\uDDFE","greek administration of southern cyprus","greek cypriot state","guney kıbrıs","guney kıbrıs rum cumhuriyeti","guney kıbrıs rum kesimi","guney kıbrıs rum yonetimi","kipriaki dhimokratia","kıbrıs","kıbrıs cumhuriyeti","kıbrıs rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","κυπριακη δημοκρατια","κυπρος"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\uD83C\uDDE8\uD83C\uDDFF","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\uD83C\uDDE9\uD83C\uDDEA","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\uD83C\uDDE9\uD83C\uDDEF","la republique de djibouti","republic of djibouti","republique de djibouti","جمهورية جيبوتي","جيبوتي"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\uD83C\uDDE9\uD83C\uDDF2","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\uD83C\uDDE9\uD83C\uDDF0","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\uD83C\uDDE9\uD83C\uDDF4","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\uD83C\uDDE9\uD83C\uDDFF","peoples democratic republic of algeria","الجزائر","الجزاير","الجمهورية الجزائرية الديمقراطية الشعبية","الدزاير","دزاير"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\uD83C\uDDEA\uD83C\uDDE8","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\uD83C\uDDEA\uD83C\uDDEC","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","جمهورية مصر العربية","مصر"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\uD83C\uDDEA\uD83C\uDDF7","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","إرتريا","إريتريا","ارتريا","ارتيريا","اريتريا","دولة إرتريا","دولة إريتريا","ሃገረ ኤርትራ","ኤርትራ"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\uD83C\uDDEA\uD83C\uDDED","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\uD83C\uDDEA\uD83C\uDDF8","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\uD83C\uDDEA\uD83C\uDDEA","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\uD83C\uDDEA\uD83C\uDDF9","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","ኢትዮጵያ","የኢትዮጵያ ፌዴራላዊ ዴሞክራሲያዊ ሪፐብሊክ"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\uD83C\uDDEB\uD83C\uDDEE","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\uD83C\uDDEB\uD83C\uDDEF","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\uD83C\uDDEB\uD83C\uDDF0","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\uD83C\uDDEB\uD83C\uDDF7","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\uD83C\uDDEB\uD83C\uDDF4","faer oer","f\xe6r\xf8","faeroe is","faeroe islands","faeroe isles","f\xe6r\xf8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xf8roya","f\xf8royar","f\xf8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\uD83C\uDDEB\uD83C\uDDF2","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\uD83C\uDDEC\uD83C\uDDE6","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\uD83C\uDDEC\uD83C\uDDE7","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\uD83C\uDDEC\uD83C\uDDEA","georgia country","republic of georgia","sakartvelo","қырҭтәыла","საქართველო","საქართველოს რესპუბლიკა"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\uD83C\uDDEC\uD83C\uDDEC","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\uD83C\uDDEC\uD83C\uDDED","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\uD83C\uDDEC\uD83C\uDDEE","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\uD83C\uDDEC\uD83C\uDDF3","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\uD83C\uDDEC\uD83C\uDDF5"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\uD83C\uDDEC\uD83C\uDDF2","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\uD83C\uDDEC\uD83C\uDDFC","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\uD83C\uDDEC\uD83C\uDDF6","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\uD83C\uDDEC\uD83C\uDDF7","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","δημοκρατια της ελλαδας","δημοκρατια της ελλαδος","ελλαδα","ελλας","ελλας ελλαδα","ελληνικη δημοκρατια"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\uD83C\uDDEC\uD83C\uDDE9"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\uD83C\uDDEC\uD83C\uDDF1","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\uD83C\uDDEC\uD83C\uDDF9","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\uD83C\uDDEC\uD83C\uDDEB","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\uD83C\uDDEC\uD83C\uDDFA","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\uD83C\uDDEC\uD83C\uDDFE","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\uD83C\uDDED\uD83C\uDDF0","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\uD83C\uDDED\uD83C\uDDF2","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\uD83C\uDDED\uD83C\uDDF3","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\uD83C\uDDED\uD83C\uDDF7","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\uD83C\uDDED\uD83C\uDDF9","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\uD83C\uDDED\uD83C\uDDFA","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\uD83C\uDDEE\uD83C\uDDE9","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\uD83C\uDDEE\uD83C\uDDF2","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\uD83C\uDDEE\uD83C\uDDF3","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","आर्यवर्त","इंडिया","इण्डिया","भारत","भारत गणराज्य","भारतवर्ष","हिंदुस्तान","हिन्दुस्तान","हिन्दोस्तान"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\uD83C\uDDEE\uD83C\uDDF4","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\uD83C\uDDEE\uD83C\uDDEA","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\uD83C\uDDEE\uD83C\uDDF7","iran","islamic rep iran","islamic republic of iran","persia","ایران","ایرانزمین","پارس","جمهوری اسلامی ايران","جمهوری اسلامی ایران","كشور شاهنشاهی ايران"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\uD83C\uDDEE\uD83C\uDDF6","eraq","iraqe","komar i eraq","republic of iraq","الجمهورية العراقية","العراق","جمهورية العراق","عراق","عێراق"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\uD83C\uDDEE\uD83C\uDDF8","icelandic republic","island","ly\xf0veldi\xf0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\uD83C\uDDEE\uD83C\uDDF1","erez yisrael","medinat yisrael","state of israel","yisrael","ישראל","מדינת ישראל"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\uD83C\uDDEE\uD83C\uDDF9","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\uD83C\uDDEF\uD83C\uDDF2","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\uD83C\uDDEF\uD83C\uDDEA","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\uD83C\uDDEF\uD83C\uDDF4","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","الأردن","الاردن","المملكة الأردنية الهاشمية","المملكة الاردنية الهاشمية"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\uD83C\uDDEF\uD83C\uDDF5","state of japan","あきつしま","おおやしま","しきしま","ジャパン","しんしゅう","にっぽん","にっぽんこく","にほん","にほんこく","ひいずるくに","ふそう","大八州","扶木之地","扶桑","扶桑国","敷島","日出る国","日本","榑木之地","瑞穂国","神州","秋津島","葦原中国"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\uD83C\uDDF0\uD83C\uDDFF","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","казахстан","қазақстан","қазақстан республикасы","республика казахстан","рк"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\uD83C\uDDF0\uD83C\uDDEA","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\uD83C\uDDF0\uD83C\uDDEC","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","кр","кыргыз республикасы","кыргызстан"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\uD83C\uDDF0\uD83C\uDDED","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","កម្ពុជា","ព្រះរាជាណាចក្រកម្ពុជា"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\uD83C\uDDF0\uD83C\uDDEE","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\uD83C\uDDF0\uD83C\uDDF3","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\uD83C\uDDF0\uD83C\uDDF7","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","남조선","남한","대한","대한민국","코리아","한국"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\uD83C\uDDF0\uD83C\uDDFC","state of kuwait","الكويت","دولة الكويت"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\uD83C\uDDF1\uD83C\uDDE6","laos","sathalanalat paxathipatai paxaxon lao","ສາທາລະນະລັດ ປະຊາທິປະໄຕ ປະຊາຊົນລາວ","ປະເທດລາວ","ລາວ"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\uD83C\uDDF1\uD83C\uDDE7","lebanese republic","republic of lebanon","state of lebanon","الجمهورية اللبنانية","لبنان"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\uD83C\uDDF1\uD83C\uDDF7","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\uD83C\uDDF1\uD83C\uDDFE","state of libya","الجماهيرية العربية الليبية الشعبية الإشتراكية","الجمهورية الليبية","الليبي","الليبية","الليبين","دولة ليبيا","ليببيا","ليبي","ليبيا","ليبية"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\uD83C\uDDF1\uD83C\uDDE8","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\uD83C\uDDF1\uD83C\uDDEE","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\uD83C\uDDF1\uD83C\uDDF0","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","இலங்கை","இலங்கை சனநாயக சோசலிசக் குடியரசு","இலங்கை சனநாயக சோஷலிசக் குடியரசு","ஈழம்","சிலோன்","ලංකාව","ශ්රී ලංකා ප්රජාතන්ත්රවාදී සමාජවාදී ජනරජය","ශ්රී ලංකාව","ශ්‍රී ලංකාව"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\uD83C\uDDF1\uD83C\uDDF8","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\uD83C\uDDF1\uD83C\uDDF9","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\uD83C\uDDF1\uD83C\uDDFA","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xdfherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\uD83C\uDDF1\uD83C\uDDFB","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letmо","letmо vabamо","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\uD83C\uDDF2\uD83C\uDDF4","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","中國澳門特別行政區","澳門"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\uD83C\uDDF2\uD83C\uDDEB","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\uD83C\uDDF2\uD83C\uDDE6","kingdom of morocco","المغرب","المملكة المغربية","ⴰⵎⵓⵔ ⵏ ⵡⴰⴽⵓⵛ","ⴰⵎⵕⵕⵓⴽ","ⵍⵎⵕⵕⵓⴽ","ⵍⵎⵖⵔⵉⴱ","ⵜⴰⴳⵍⴷⵉⵜ ⵏ ⵍⵎⵖⵔⵉⴱ"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\uD83C\uDDF2\uD83C\uDDE8","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\uD83C\uDDF2\uD83C\uDDE9","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","молдова"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\uD83C\uDDF2\uD83C\uDDEC","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\uD83C\uDDF2\uD83C\uDDFB","dhivehi raajjeyge jumhooriyyaa","republic of maldives","ދިވެހި ރާއްޖެ","ދިވެހިރާއްޖެ","ދިވެހިރާއްޖޭގެ ޖުމުހޫރިއްޔާ","ދިވެހިރާއްޖޭގެ ޖުމްހޫރިއްޔާ"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\uD83C\uDDF2\uD83C\uDDFD","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\uD83C\uDDF2\uD83C\uDDED","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\uD83C\uDDF2\uD83C\uDDF0","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","македонија","република македонија","република северна македонија","рм","рсм","северна македонија"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\uD83C\uDDF2\uD83C\uDDF1","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\uD83C\uDDF2\uD83C\uDDF9","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\uD83C\uDDF2\uD83C\uDDF2","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","ပြည်ထောင်စု မြန်မာနိုင်ငံ","ပြည်ထောင်စု မြန်မာနိုင်ငံတော်","ပြည်ထောင်စု သမ္မတ မြန်မာနိုင်ငံ","ပြည်ထောင်စု သမ္မတ မြန်မာနိုင်ငံတော်","ပြည်ထောင်စုမြန်မာနိုင်ငံတော်","ပြည်ထောင်စုသမ္မတမြန်မာနိုင်ငံ","ပြ‌ည်ထောင်စုသမ္မတမြန်မာနိုင်ငံ","ပြည်ထောင်စုသမ္မတမြန်မာနိုင်ငံတော်","ဗမာပြည်","မြန်မာ","မြန်မာနိုင်ငံ","မြန်မာနိုင်ငံတော်","မြန်မာပြည်"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\uD83C\uDDF2\uD83C\uDDEA","crna cora","црна гора"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\uD83C\uDDF2\uD83C\uDDF3","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","монгол","монгол улс","ᠮᠤᠩᠭᠤᠯ ᠤᠯᠤᠰ"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\uD83C\uDDF2\uD83C\uDDF5","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\uD83C\uDDF2\uD83C\uDDFF","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\uD83C\uDDF2\uD83C\uDDF7","islamic republic of mauritania","الجمهورية الإسلامية الموريتانية","موريتانيا"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\uD83C\uDDF2\uD83C\uDDF8","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\uD83C\uDDF2\uD83C\uDDF6","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\uD83C\uDDF2\uD83C\uDDFA","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\uD83C\uDDF2\uD83C\uDDFC","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\uD83C\uDDF2\uD83C\uDDFE","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\uD83C\uDDFE\uD83C\uDDF9","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\uD83C\uDDF3\uD83C\uDDE6","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\uD83C\uDDF3\uD83C\uDDE8","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\uD83C\uDDF3\uD83C\uDDEA","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\uD83C\uDDF3\uD83C\uDDEB","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\uD83C\uDDF3\uD83C\uDDEC","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\uD83C\uDDF3\uD83C\uDDEE","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\uD83C\uDDF3\uD83C\uDDFA"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\uD83C\uDDF3\uD83C\uDDF1","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\uD83C\uDDF3\uD83C\uDDF4","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\uD83C\uDDF3\uD83C\uDDF5","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","नेपाल","संघिय लोकतान्त्रिक गणतन्त्र नेपाल","संघिय लोकतान्त्रिक गणतन्त्रात्मक नेपाल","संघीय लोकतान्त्रिक गणतन्त्र नेपाल"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\uD83C\uDDF3\uD83C\uDDF7","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\uD83C\uDDF3\uD83C\uDDFF","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\uD83C\uDDF4\uD83C\uDDF2","sultanate of oman","uman","سلطنة عمان","عمان"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\uD83C\uDDF5\uD83C\uDDF0","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","اسلامی جمہوریہ پاکستان","باکستان","پاکستان"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\uD83C\uDDF5\uD83C\uDDE6","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\uD83C\uDDF5\uD83C\uDDF3","occas island","pisskern aliеn","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\uD83C\uDDF5\uD83C\uDDEA","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\uD83C\uDDF5\uD83C\uDDED","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\uD83C\uDDF5\uD83C\uDDFC","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","パラオ","パラオ共和国"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\uD83C\uDDF5\uD83C\uDDEC","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\uD83C\uDDF5\uD83C\uDDF1","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\uD83C\uDDF5\uD83C\uDDF7","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\uD83C\uDDF0\uD83C\uDDF5","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","공화국","북조선","북한","조선","조선민주주의인민공화국"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\uD83C\uDDF5\uD83C\uDDF9","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\uD83C\uDDF5\uD83C\uDDFE","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\uD83C\uDDF5\uD83C\uDDF8","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","أراضي فلسطينية","الأراضي الفلسطينية","الدولة الفلسطينية","السلطة الفلسطينية","السلطة الوطنية الفلسطينية","الضفة الغربية وقطاع غزة","دولة فلسطين","فلسطين"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\uD83C\uDDF5\uD83C\uDDEB","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\uD83C\uDDF6\uD83C\uDDE6","state of qatar","إمارة قطر","دولة قطر","قطر"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xe9union",aliases:["\uD83C\uDDF7\uD83C\uDDEA","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\uD83C\uDDF7\uD83C\uDDF4"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\uD83C\uDDF7\uD83C\uDDFA","federation of russia","russia","россииская федерация","россия","рф"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\uD83C\uDDF7\uD83C\uDDFC","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\uD83C\uDDF8\uD83C\uDDE6","kingdom of saudi arabia","الدولة السعودية","الدوله السعوديه","السعودية","السعوديه","العربية السعودية","المملكة","المملكة السعودية","المملكة العربية","المملكة العربية السعودية","المملكه","المملكه العربيه السعوديه","بلاد الحرمين الشريفين","دولة آل سعود","سعودية","سعوديه","منبع الرسالة","مهبط الوحي"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\uD83C\uDDF8\uD83C\uDDE9","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","السودان","جمهورية السودان"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\uD83C\uDDF8\uD83C\uDDF3","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\uD83C\uDDF8\uD83C\uDDEC","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","சிங்கப்பூர்","சிங்கப்பூர் குடியரசு","சிங்கை","ஸிங்கபூர்"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\uD83C\uDDEC\uD83C\uDDF8","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\uD83C\uDDF8\uD83C\uDDED","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\uD83C\uDDF8\uD83C\uDDEF","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\uD83C\uDDF8\uD83C\uDDE7"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\uD83C\uDDF8\uD83C\uDDF1","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\uD83C\uDDF8\uD83C\uDDFB","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\uD83C\uDDF8\uD83C\uDDF2","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\uD83C\uDDF8\uD83C\uDDF4","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","الصومال","جمهورية الصومال","جمهورية الصومال الديموقراطية","جمهورية الصومال الفيدرالية","صومال"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\uD83C\uDDF5\uD83C\uDDF2","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\uD83C\uDDF7\uD83C\uDDF8","republic of serbia","republika srbija","република србија","србија"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\uD83C\uDDF8\uD83C\uDDF8","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\uD83C\uDDF8\uD83C\uDDF9","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\uD83C\uDDF8\uD83C\uDDF7","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\uD83C\uDDF8\uD83C\uDDF0","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\uD83C\uDDF8\uD83C\uDDEE","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\uD83C\uDDF8\uD83C\uDDEA","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\uD83C\uDDF8\uD83C\uDDFF","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\uD83C\uDDF8\uD83C\uDDFD","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\uD83C\uDDF8\uD83C\uDDE8","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\uD83C\uDDF8\uD83C\uDDFE","surya","syria","الجمهورية العربية السورية","الشام","سوريا","سورية"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\uD83C\uDDF9\uD83C\uDDE8","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\uD83C\uDDF9\uD83C\uDDE9","la republique du tchad","republic of chad","republique du tchad","tchad","تشاد","جمهورية تشاد"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\uD83C\uDDF9\uD83C\uDDEC","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\uD83C\uDDF9\uD83C\uDDED","kingdom of siam","kingdom of thailand","siam","thai","ไทย","ประเทศไทย","ประเทศสยาม","เมืองไทย","ราชอาณาจักรไทย","ราชอาณาจักรสยาม","สยาม"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\uD83C\uDDF9\uD83C\uDDEF","jumhurii tojikiston","republic of tajikistan","тоҷикистон","тҷ","тҷк","ҷт","ҷумҳурии тоҷикистон"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\uD83C\uDDF9\uD83C\uDDF0","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\uD83C\uDDF9\uD83C\uDDF2"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\uD83C\uDDF9\uD83C\uDDF1","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\uD83C\uDDF9\uD83C\uDDF4","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\uD83C\uDDF9\uD83C\uDDF9","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\uD83C\uDDF9\uD83C\uDDF3","republic of tunisia","tunisian republic","الجمهورية التونسية","تونس","تونس الخضراء"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xfcrkiye",aliases:["\uD83C\uDDF9\uD83C\uDDF7","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\uD83C\uDDF9\uD83C\uDDFB","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\uD83C\uDDF9\uD83C\uDDFC","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","中華民國","中華民國(臺灣)","中華臺北","台灣","臺澎金馬","臺灣"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\uD83C\uDDF9\uD83C\uDDFF","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\uD83C\uDDFA\uD83C\uDDEC","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\uD83C\uDDFA\uD83C\uDDE6","ukr","ukraina","ukrainia","ukrayina","вкраіна","украіна"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\uD83C\uDDFA\uD83C\uDDF2","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\uD83C\uDDFA\uD83C\uDDFE","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\uD83C\uDDFA\uD83C\uDDF8","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\uD83C\uDDFA\uD83C\uDDFF","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\uD83C\uDDFB\uD83C\uDDE6","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xe6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\uD83C\uDDFB\uD83C\uDDE8","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\uD83C\uDDFB\uD83C\uDDEA","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\uD83C\uDDFB\uD83C\uDDEC","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\uD83C\uDDFB\uD83C\uDDEE","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\uD83C\uDDFB\uD83C\uDDF3","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\uD83C\uDDFB\uD83C\uDDFA","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\uD83C\uDDFC\uD83C\uDDEB","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\uD83C\uDDFC\uD83C\uDDF8","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\uD83C\uDDFE\uD83C\uDDEA","rep yemen","republic of yemen","الجمهورية اليمنية","اليمن","دولة اليمن"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\uD83C\uDDFF\uD83C\uDDE6","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\uD83C\uDDFF\uD83C\uDDF2","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\uD83C\uDDFF\uD83C\uDDFC","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function l(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function c(e){let t=new Map,r=new Map,i=new Map;for(let n of e)t.set(n.iso3,n),n.iso2&&r.set(n.iso2,n),n.m49&&i.set(n.m49,n);let n=new Map;for(let t of e)for(let e of[t.name,...t.aliases]){let r=l(e),i=n.get(r);if(void 0!==i&&i!==t.iso3)throw Error(`Duplicate name/alias "${r}": ${i} vs ${t.iso3}`);n.set(r,t.iso3)}function a(e){if(null==e)return;let a=String(e).trim();if(!a)return;if(/^\d+$/.test(a)){let e=i.get(String(parseInt(a,10)).padStart(3,"0"));if(e)return e}if(/^[A-Za-z]{2}$/.test(a)){let e=r.get(a.toUpperCase());if(e)return e}if(/^[A-Za-z]{3}$/.test(a)){let e=t.get(a.toUpperCase());if(e)return e}let o=n.get(l(a));return void 0===o?void 0:t.get(o)}return{lookup:a,lookupAlpha3:function(e){var t;return null==(t=a(e))?void 0:t.iso3},byAlpha3:t,byAlpha2:r,byM49:i}}var u=c(s),h=u.lookup,d=u.lookupAlpha3,f=u.byAlpha3,p=u.byAlpha2,m=u.byM49}}),py=p({"node_modules/@turf/helpers/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t={centimeters:0x25f96350,centimetres:0x25f96350,degrees:360/(2*Math.PI),feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:6371008.8,metres:6371008.8,miles:3958.761333810546,millimeters:0x17bbde120,millimetres:0x17bbde120,nauticalmiles:6371008.8/1852,radians:1,yards:6967335.223679999},r={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function i(e,t,r={}){let n={type:"Feature"};return(0===r.id||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function n(e,t,r={}){if(!e)throw Error("coordinates is required");if(!Array.isArray(e))throw Error("coordinates must be an Array");if(e.length<2)throw Error("coordinates must be at least 2 numbers long");if(!p(e[0])||!p(e[1]))throw Error("coordinates must contain numbers");return i({type:"Point",coordinates:e},t,r)}function a(e,t,r={}){for(let t of e){if(t.length<4)throw Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(t[t.length-1].length!==t[0].length)throw Error("First and last Position are not equivalent.");for(let e=0;e180?e-360:e<-180?e+360:e},e.bearingToAzimuth=function(e){let t=e%360;return t<0&&(t+=360),t},e.convertArea=function(e,t="meters",i="kilometers"){if(!(e>=0))throw Error("area must be a positive number");let n=r[t];if(!n)throw Error("invalid original units");let a=r[i];if(!a)throw Error("invalid final units");return e/n*a},e.convertLength=function(e,t="kilometers",r="kilometers"){if(!(e>=0))throw Error("length must be a positive number");return h(d(e,t),r)},e.degreesToRadians=function(e){return e%360*Math.PI/180},e.earthRadius=6371008.8,e.factors=t,e.feature=i,e.featureCollection=s,e.geometry=function(e,t,r={}){switch(e){case"Point":return n(t).geometry;case"LineString":return o(t).geometry;case"Polygon":return a(t).geometry;case"MultiPoint":return c(t).geometry;case"MultiLineString":return l(t).geometry;case"MultiPolygon":return u(t).geometry;default:throw Error(e+" is invalid")}},e.geometryCollection=function(e,t,r={}){return i({type:"GeometryCollection",geometries:e},t,r)},e.isNumber=p,e.isObject=function(e){return null!==e&&"object"==typeof e&&!Array.isArray(e)},e.lengthToDegrees=function(e,t){return f(d(e,t))},e.lengthToRadians=d,e.lineString=o,e.lineStrings=function(e,t,r={}){return s(e.map(e=>o(e,t)),r)},e.multiLineString=l,e.multiPoint=c,e.multiPolygon=u,e.point=n,e.points=function(e,t,r={}){return s(e.map(e=>n(e,t)),r)},e.polygon=a,e.polygons=function(e,t,r={}){return s(e.map(e=>a(e,t)),r)},e.radiansToDegrees=f,e.radiansToLength=h,e.round=function(e,t=0){if(t&&!(t>=0))throw Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r},e.validateBBox=function(e){if(!e)throw Error("bbox is required");if(!Array.isArray(e))throw Error("bbox must be an Array");if(4!==e.length&&6!==e.length)throw Error("bbox must be an Array of 4 or 6 numbers");e.forEach(e=>{if(!p(e))throw Error("bbox must only contain numbers")})},e.validateId=function(e){if(!e)throw Error("id is required");if(-1===["string","number"].indexOf(typeof e))throw Error("id must be a number or a string")}}}),pv=p({"node_modules/@turf/meta/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=py();function r(e,t,i){if(null!==e)for(var n,a,o,s,l,c,u,h,d=0,f=0,p=e.type,m="FeatureCollection"===p,g="Feature"===p,y=m?e.features.length:1,v=0;vc||f>u||p>h){l=r,c=n,u=f,h=p,o=0;return}if(!1===i(t.lineString.call(void 0,[l,r],e.properties),n,a,p,o))return!1;o++,l=r}))return!1}}})}function l(e,r){if(!e)throw Error("geojson is required");o(e,function(e,i,n){if(null!==e.geometry){var a=e.geometry.type,o=e.geometry.coordinates;switch(a){case"LineString":if(!1===r(e,i,n,0,0))return!1;break;case"Polygon":for(var s=0;se+function(e){let t=0,r;switch(e.type){case"Polygon":return n(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(s(e[0]));for(let r=1;r=t?(i+2)%t:i+2],l=n[0]*o,c=a[1]*o;r+=(s[0]*o-l)*Math.sin(c),i++}return r*a}e.area=i,e.default=i}}),pb=p({"node_modules/@turf/centroid/dist/cjs/index.cjs"(e){Object.defineProperty(e,"__esModule",{value:!0});var t=py(),r=pv();function i(e,n={}){let a=0,o=0,s=0;return r.coordEach.call(void 0,e,function(e){a+=e[0],o+=e[1],s++},!0),t.point.call(void 0,[a/s,o/s],n.properties)}e.centroid=i,e.default=i}}),p_=p({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(e,t){(function(e){function t(e,t){return et?1:e>=t?0:NaN}function r(e){var r;return 1===e.length&&(r=e,e=function(e,i){return t(r(e),i)}),{left:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}var i=r(t),n=i.right,a=i.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,i,n=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,i,n,a=e.length,o=-1;if(null==t){for(;++o=r)for(i=n=r;++or&&(i=r),n=r)for(i=n=r;++or&&(i=r),n=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=y?10:a>=v?5:a>=x?2:1)}function _(e,t,r){var i=Math.abs(t-e)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/n;return a>=y?n*=10:a>=v?n*=5:a>=x&&(n*=2),t=1)return+r(e[i-1],i-1,e);var i,n=(i-1)*t,a=Math.floor(n),o=+r(e[a],a,e);return o+(r(e[a+1],a+1,e)-o)*(n-a)}}function M(e,t){var r,i,n=e.length,a=-1;if(null==t){for(;++a=r)for(i=r;++ar&&(i=r)}else for(;++a=r)for(i=r;++ar&&(i=r);return i}function k(e){if(!(n=e.length))return[];for(var t=-1,r=M(e,A),i=Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function i(i){var a,o,s=i.length,l=Array(s);for(a=0;ah;)d.pop(),--f;var p,m=Array(f+1);for(a=0;a<=f;++a)(p=m[a]=[]).x0=a>0?d[a-1]:u,p.x1=a=r)for(i=r;++ai&&(i=r)}else for(;++a=r)for(i=r;++ai&&(i=r);return i},e.mean=function(e,t){var r,i=e.length,n=i,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,i=e.length-1,n=e[0],a=Array(i<0?0:i);rr(n=e[a],s)||0!==r(s,s))&&(s=n,o=a);if(0===r(s,s))return o}},e.shuffle=function(e,t,r){for(var i,n,a=(r??e.length)-(t=null==t?0:+t);a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.sum=function(e,t){var r,i=e.length,n=-1,a=0;if(null==t)for(;++n0)return[e];if((i=t0)for(e=Math.ceil(e/o),a=Array(n=Math.ceil((t=Math.floor(t/o))-e+1));++stypeof t?e:e.d3=e.d3||{})}}),pw=p({"node_modules/d3-geo/dist/d3-geo.js"(e,t){var r,i;r=e,i=function(e,t){function r(){return new i}function i(){this.reset()}i.prototype={constructor:i,reset:function(){this.s=this.t=0},add:function(e){a(n,e,this.t),a(this,n.s,this.s),this.s?this.t+=n.t:this.s=n.t},valueOf:function(){return this.s}};var n=new i;function a(e,t,r){var i=e.s=t+r,n=i-t;e.t=t-(i-n)+(r-n)}var o=Math.PI,s=o/2,l=o/4,c=2*o,u=180/o,h=o/180,d=Math.abs,f=Math.atan,p=Math.atan2,m=Math.cos,g=Math.ceil,y=Math.exp,v=Math.log,x=Math.pow,b=Math.sin,_=Math.sign||function(e){return e>0?1:e<0?-1:0},w=Math.sqrt,T=Math.tan;function M(e){return e>1?0:e<-1?o:Math.acos(e)}function k(e){return e>1?s:e<-1?-s:Math.asin(e)}function A(){}function S(e,t){e&&C.hasOwnProperty(e.type)&&C[e.type](e,t)}var E={Feature:function(e,t){S(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,n=r.length;++i=0?1:-1,n=i*r,a=m(t),o=b(t),s=F*o,c=R*a+s*m(n),u=s*i*b(n);j.add(p(u,c)),O=e,R=a,F=o}function G(e){return[p(e[1],e[0]),k(e[2])]}function W(e){var t=e[0],r=e[1],i=m(r);return[i*m(t),i*b(t),b(r)]}function Y(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function Z(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function $(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function X(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function K(e){var t=w(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}var J,Q,ee,et,er,ei,en,ea,eo,es,el=r(),ec={point:eu,lineStart:ed,lineEnd:ef,polygonStart:function(){ec.point=ep,ec.lineStart=em,ec.lineEnd=eg,el.reset(),N.polygonStart()},polygonEnd:function(){N.polygonEnd(),ec.point=eu,ec.lineStart=ed,ec.lineEnd=ef,j<0?(J=-(ee=180),Q=-(et=90)):el>1e-6?et=90:el<-1e-6&&(Q=-90),es[0]=J,es[1]=ee},sphere:function(){J=-(ee=180),Q=-(et=90)}};function eu(e,t){eo.push(es=[J=e,ee=e]),tet&&(et=t)}function eh(e,t){var r=W([e*h,t*h]);if(ea){var i=Z(ea,r),n=Z([i[1],-i[0],0],i);K(n),n=G(n);var a,o=e-er,s=o>0?1:-1,l=n[0]*u*s,c=d(o)>180;c^(s*eret&&(et=a):c^(s*er<(l=(l+360)%360-180)&&let&&(et=t)),c?eey(J,ee)&&(ee=e):ey(e,ee)>ey(J,ee)&&(J=e):ee>=J?(eee&&(ee=e)):e>er?ey(J,e)>ey(J,ee)&&(ee=e):ey(e,ee)>ey(J,ee)&&(J=e)}else eo.push(es=[J=e,ee=e]);tet&&(et=t),ea=r,er=e}function ed(){ec.point=eh}function ef(){es[0]=J,es[1]=ee,ec.point=eu,ea=null}function ep(e,t){if(ea){var r=e-er;el.add(d(r)>180?r+(r>0?360:-360):r)}else ei=e,en=t;N.point(e,t),eh(e,t)}function em(){N.lineStart()}function eg(){ep(ei,en),N.lineEnd(),d(el)>1e-6&&(J=-(ee=180)),es[0]=J,es[1]=ee,ea=null}function ey(e,t){return(t-=e)<0?t+360:t}function ev(e,t){return e[0]-t[0]}function ex(e,t){return e[0]<=e[1]?e[0]<=t&&t<=e[1]:to?e+Math.round(-e/c)*c:e,t]}function eX(e,t,r){return(e%=c)?t||r?eZ(eJ(e),eQ(t,r)):eJ(e):t||r?eQ(t,r):e$}function eK(e){return function(t,r){return[(t+=e)>o?t-c:t<-o?t+c:t,r]}}function eJ(e){var t=eK(e);return t.invert=eK(-e),t}function eQ(e,t){var r=m(e),i=b(e),n=m(t),a=b(t);function o(e,t){var o=m(t),s=m(e)*o,l=b(e)*o,c=b(t),u=c*r+s*i;return[p(l*n-u*a,s*r-c*i),k(u*n+l*a)]}return o.invert=function(e,t){var o=m(t),s=m(e)*o,l=b(e)*o,c=b(t),u=c*n-l*a;return[p(l*n+c*a,s*r+u*i),k(u*r-s*i)]},o}function e0(e){function t(t){return t=e(t[0]*h,t[1]*h),t[0]*=u,t[1]*=u,t}return e=eX(e[0]*h,e[1]*h,e.length>2?e[2]*h:0),t.invert=function(t){return t=e.invert(t[0]*h,t[1]*h),t[0]*=u,t[1]*=u,t},t}function e1(e,t,r,i,n,a){if(r){var o=m(t),s=b(t),l=i*r;null==n?(n=t+i*c,a=t-l/2):(n=e2(o,n),a=e2(o,a),(i>0?na)&&(n+=i*c));for(var u,h=n;i>0?h>a:h-t[2]?-r:r)+c-1e-6)%c}function e3(){var e,t=[];return{point:function(t,r,i){e.push([t,r,i])},lineStart:function(){t.push(e=[])},lineEnd:A,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function e5(e,t){return 1e-6>d(e[0]-t[0])&&1e-6>d(e[1]-t[1])}function e4(e,t,r,i){this.x=e,this.z=t,this.o=r,this.e=i,this.v=!1,this.n=this.p=null}function e6(e,t,r,i,n){var a,o,s=[],l=[];if(e.forEach(function(e){if(!((t=e.length-1)<=0)){var t,r,i=e[0],o=e[t];if(e5(i,o)){if(!i[2]&&!o[2]){for(n.lineStart(),a=0;a=0;--a)n.point((u=c[a])[0],u[1]);else i(d.x,d.p.x,-1,n);d=d.p}c=(d=d.o).z,f=!f}while(!d.v);n.lineEnd()}}}function e8(e){if(t=e.length){for(var t,r,i=0,n=e[0];++i=0?1:-1,z=I*P,D=z>o,O=w*C;if(e7.add(p(O*I*b(z),T*L+O*m(z))),u+=D?P+I*c:P,D^x>=r^S>=r){var R=Z(W(v),W(A));K(R);var F=Z(a,R);K(F);var j=(D^P>=0?-1:1)*k(F[2]);(i>j||i===j&&(R[0]||R[1]))&&(h+=D^P>=0?1:-1)}}return(u<-1e-6||u<1e-6&&e7<-1e-6)^1&h}function tt(e,r,i,n){return function(a){var o,s,l,c=r(a),u=e3(),h=r(u),d=!1,f={point:p,lineStart:g,lineEnd:y,polygonStart:function(){f.point=v,f.lineStart=x,f.lineEnd=b,s=[],o=[]},polygonEnd:function(){f.point=p,f.lineStart=g,f.lineEnd=y,s=t.merge(s);var e=te(o,n);s.length?(d||(a.polygonStart(),d=!0),e6(s,ti,e,i,a)):e&&(d||(a.polygonStart(),d=!0),a.lineStart(),i(null,null,1,a),a.lineEnd()),d&&(a.polygonEnd(),d=!1),s=o=null},sphere:function(){a.polygonStart(),a.lineStart(),i(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function p(t,r){e(t,r)&&a.point(t,r)}function m(e,t){c.point(e,t)}function g(){f.point=m,c.lineStart()}function y(){f.point=p,c.lineEnd()}function v(e,t){l.push([e,t]),h.point(e,t)}function x(){h.lineStart(),l=[]}function b(){v(l[0][0],l[0][1]),h.lineEnd();var e,t,r,i,n=h.clean(),c=u.result(),f=c.length;if(l.pop(),o.push(l),l=null,f){if(1&n){if((t=(r=c[0]).length-1)>0){for(d||(a.polygonStart(),d=!0),a.lineStart(),e=0;e1&&2&n&&c.push(c.pop().concat(c.shift())),s.push(c.filter(tr))}}return f}}function tr(e){return e.length>1}function ti(e,t){return((e=e.x)[0]<0?e[1]-s-1e-6:s-e[1])-((t=t.x)[0]<0?t[1]-s-1e-6:s-t[1])}var tn=tt(function(){return!0},function(e){var t,r=NaN,i=NaN,n=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(a,l){var c,u,h,p,g,y,v,x=a>0?o:-o,_=d(a-r);1e-6>d(_-o)?(e.point(r,i=(i+l)/2>0?s:-s),e.point(n,i),e.lineEnd(),e.lineStart(),e.point(x,i),e.point(a,i),t=0):n!==x&&_>=o&&(1e-6>d(r-n)&&(r-=1e-6*n),1e-6>d(a-x)&&(a-=1e-6*x),c=r,u=i,h=a,p=l,i=d(v=b(c-h))>1e-6?f((b(u)*(y=m(p))*b(h)-b(p)*(g=m(u))*b(c))/(g*y*v)):(u+p)/2,e.point(n,i),e.lineEnd(),e.lineStart(),e.point(x,i),t=0),e.point(r=a,i=l),n=x},lineEnd:function(){e.lineEnd(),r=i=NaN},clean:function(){return 2-t}}},function(e,t,r,i){var n;if(null==e)n=r*s,i.point(-o,n),i.point(0,n),i.point(o,n),i.point(o,0),i.point(o,-n),i.point(0,-n),i.point(-o,-n),i.point(-o,0),i.point(-o,n);else if(d(e[0]-t[0])>1e-6){var a=e[0]0,n=d(t)>1e-6;function a(e,r){return m(e)*m(r)>t}function s(e,r,i){var n=W(e),a=W(r),s=[1,0,0],l=Z(n,a),c=Y(l,l),u=l[0],h=c-u*u;if(!h)return!i&&e;var f=Z(s,l),p=X(s,t*c/h);$(p,X(l,-t*u/h));var m=Y(p,f),g=Y(f,f),y=m*m-g*(Y(p,p)-1);if(!(y<0)){var v=w(y),x=X(f,(-m-v)/g);if($(x,p),x=G(x),!i)return x;var b,_=e[0],T=r[0],M=e[1],k=r[1];T<_&&(b=_,_=T,T=b);var A=T-_,S=1e-6>d(A-o);if(!S&&k0^x[1]<(1e-6>d(x[0]-_)?M:k):M<=x[1]&&x[1]<=k:A>o^(_<=x[0]&&x[0]<=T)){var E=X(f,(-m+v)/g);return $(E,p),[x,G(E)]}}}function l(t,r){var n=i?e:o-e,a=0;return t<-n?a|=1:t>n&&(a|=2),r<-n?a|=4:r>n&&(a|=8),a}return tt(a,function(e){var t,r,c,u,h;return{lineStart:function(){u=c=!1,h=1},point:function(d,f){var p,m,g=[d,f],y=a(d,f),v=i?y?0:l(d,f):y?l(d+(d<0?o:-o),f):0;(!t&&(u=c=y)&&e.lineStart(),y!==c&&(!(m=s(t,g))||e5(t,m)||e5(g,m))&&(g[2]=1),y!==c)?(h=0,y?(e.lineStart(),m=s(g,t),e.point(m[0],m[1])):(m=s(t,g),e.point(m[0],m[1],2),e.lineEnd()),t=m):n&&t&&i^y&&!(v&r)&&(p=s(g,t,!0))&&(h=0,i?(e.lineStart(),e.point(p[0][0],p[0][1]),e.point(p[1][0],p[1][1]),e.lineEnd()):(e.point(p[1][0],p[1][1]),e.lineEnd(),e.lineStart(),e.point(p[0][0],p[0][1],3))),!y||t&&e5(t,g)||e.point(g[0],g[1]),t=g,c=y,r=v},lineEnd:function(){c&&e.lineEnd(),t=null},clean:function(){return h|(u&&c)<<1}}},function(t,i,n,a){e1(a,e,r,n,t,i)},i?[0,-e]:[-o,e-o])}function to(e,r,i,n){function a(t,a){return e<=t&&t<=i&&r<=a&&a<=n}function o(t,a,o,l){var u=0,h=0;if(null==t||(u=s(t,o))!==(h=s(a,o))||0>c(t,a)^o>0)do l.point(0===u||3===u?e:i,u>1?n:r);while((u=(u+o+4)%4)!==h);else l.point(a[0],a[1])}function s(t,n){return 1e-6>d(t[0]-e)?n>0?0:3:1e-6>d(t[0]-i)?n>0?2:1:1e-6>d(t[1]-r)?+(n>0):n>0?3:2}function l(e,t){return c(e.x,t.x)}function c(e,t){var r=s(e,1),i=s(t,1);return r!==i?r-i:0===r?t[1]-e[1]:1===r?e[0]-t[0]:2===r?e[1]-t[1]:t[0]-e[0]}return function(s){var c,u,h,d,f,p,m,g,y,v,x,b=s,_=e3(),w={point:T,lineStart:function(){w.point=M,u&&u.push(h=[]),v=!0,y=!1,m=g=NaN},lineEnd:function(){c&&(M(d,f),p&&y&&_.rejoin(),c.push(_.result())),w.point=T,y&&b.lineEnd()},polygonStart:function(){b=_,c=[],u=[],x=!0},polygonEnd:function(){var r=function(){for(var t=0,r=0,i=u.length;rn&&(d-a)*(n-o)>(f-o)*(e-a)&&++t:f<=n&&(d-a)*(n-o)<(f-o)*(e-a)&&--t;return t}(),i=x&&r,a=(c=t.merge(c)).length;(i||a)&&(s.polygonStart(),i&&(s.lineStart(),o(null,null,1,s),s.lineEnd()),a&&e6(c,l,r,o,s),s.polygonEnd()),b=s,c=u=h=null}};function T(e,t){a(e,t)&&b.point(e,t)}function M(t,o){var s=a(t,o);if(u&&h.push([t,o]),v)d=t,f=o,p=s,v=!1,s&&(b.lineStart(),b.point(t,o));else if(s&&y)b.point(t,o);else{var l=[m=Math.max(-1e9,Math.min(1e9,m)),g=Math.max(-1e9,Math.min(1e9,g))],c=[t=Math.max(-1e9,Math.min(1e9,t)),o=Math.max(-1e9,Math.min(1e9,o))];!function(e,t,r,i,n,a){var o,s=e[0],l=e[1],c=t[0],u=t[1],h=0,d=1,f=c-s,p=u-l;if(o=r-s,!(!f&&o>0)){if(o/=f,f<0){if(o0){if(o>d)return;o>h&&(h=o)}if(o=n-s,!(!f&&o<0)){if(o/=f,f<0){if(o>d)return;o>h&&(h=o)}else if(f>0){if(o0)){if(o/=p,p<0){if(o0){if(o>d)return;o>h&&(h=o)}if(o=a-l,!(!p&&o<0)){if(o/=p,p<0){if(o>d)return;o>h&&(h=o)}else if(p>0){if(o0&&(e[0]=s+h*f,e[1]=l+h*p),d<1&&(t[0]=s+d*f,t[1]=l+d*p),!0}}}}}(l,c,e,r,i,n)?s&&(b.lineStart(),b.point(t,o),x=!1):(y||(b.lineStart(),b.point(l[0],l[1])),b.point(c[0],c[1]),s||b.lineEnd(),x=!1)}m=t,g=o,y=s}return w}}var ts,tl,tc,tu=r(),th={sphere:A,point:A,lineStart:function(){th.point=tf,th.lineEnd=td},lineEnd:A,polygonStart:A,polygonEnd:A};function td(){th.point=th.lineEnd=A}function tf(e,t){e*=h,t*=h,ts=e,tl=b(t),tc=m(t),th.point=tp}function tp(e,t){e*=h;var r=b(t*=h),i=m(t),n=d(e-ts),a=m(n),o=i*b(n),s=tc*r-tl*i*a,l=tl*r+tc*i*a;tu.add(p(w(o*o+s*s),l)),ts=e,tl=r,tc=i}function tm(e){return tu.reset(),I(e,th),+tu}var tg=[null,null],ty={type:"LineString",coordinates:tg};function tv(e,t){return tg[0]=e,tg[1]=t,tm(ty)}var tx={Feature:function(e,t){return t_(e.geometry,t)},FeatureCollection:function(e,t){for(var r=e.features,i=-1,n=r.length;++i0&&(n=tv(e[a],e[a-1]))>0&&r<=n&&i<=n&&(r+i-n)*(1-Math.pow((r-i)/n,2))<1e-12*n)return!0;r=i}return!1}function tT(e,t){return!!te(e.map(tM),tk(t))}function tM(e){return(e=e.map(tk)).pop(),e}function tk(e){return[e[0]*h,e[1]*h]}function tA(e,r,i){var n=t.range(e,r-1e-6,i).concat(r);return function(e){return n.map(function(t){return[e,t]})}}function tS(e,r,i){var n=t.range(e,r-1e-6,i).concat(r);return function(e){return n.map(function(t){return[t,e]})}}function tE(){var e,r,i,n,a,o,s,l,c,u,h,f,p=10,m=10,y=90,v=360,x=2.5;function b(){return{type:"MultiLineString",coordinates:_()}}function _(){return t.range(g(n/y)*y,i,y).map(h).concat(t.range(g(l/v)*v,s,v).map(f)).concat(t.range(g(r/p)*p,e,p).filter(function(e){return d(e%y)>1e-6}).map(c)).concat(t.range(g(o/m)*m,a,m).filter(function(e){return d(e%v)>1e-6}).map(u))}return b.lines=function(){return _().map(function(e){return{type:"LineString",coordinates:e}})},b.outline=function(){return{type:"Polygon",coordinates:[h(n).concat(f(s).slice(1),h(i).reverse().slice(1),f(l).reverse().slice(1))]}},b.extent=function(e){return arguments.length?b.extentMajor(e).extentMinor(e):b.extentMinor()},b.extentMajor=function(e){return arguments.length?(n=+e[0][0],i=+e[1][0],l=+e[0][1],s=+e[1][1],n>i&&(e=n,n=i,i=e),l>s&&(e=l,l=s,s=e),b.precision(x)):[[n,l],[i,s]]},b.extentMinor=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),b.precision(x)):[[r,o],[e,a]]},b.step=function(e){return arguments.length?b.stepMajor(e).stepMinor(e):b.stepMinor()},b.stepMajor=function(e){return arguments.length?(y=+e[0],v=+e[1],b):[y,v]},b.stepMinor=function(e){return arguments.length?(p=+e[0],m=+e[1],b):[p,m]},b.precision=function(t){return arguments.length?(x=+t,c=tA(o,a,90),u=tS(r,e,x),h=tA(l,s,90),f=tS(n,i,x),b):x},b.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function tC(e){return e}var tL,tP,tI,tz,tD=r(),tO=r(),tR={point:A,lineStart:A,lineEnd:A,polygonStart:function(){tR.lineStart=tF,tR.lineEnd=tN},polygonEnd:function(){tR.lineStart=tR.lineEnd=tR.point=A,tD.add(d(tO)),tO.reset()},result:function(){var e=tD/2;return tD.reset(),e}};function tF(){tR.point=tj}function tj(e,t){tR.point=tB,tL=tI=e,tP=tz=t}function tB(e,t){tO.add(tz*e-tI*t),tI=e,tz=t}function tN(){tB(tL,tP)}var tU,tV,tq,tH,tG=1/0,tW=1/0,tY=-1/0,tZ=tY,t$={point:function(e,t){etY&&(tY=e),ttZ&&(tZ=t)},lineStart:A,lineEnd:A,polygonStart:A,polygonEnd:A,result:function(){var e=[[tG,tW],[tY,tZ]];return tY=tZ=-(tW=tG=1/0),e}},tX=0,tK=0,tJ=0,tQ=0,t0=0,t1=0,t2=0,t3=0,t5=0,t4={point:t6,lineStart:t8,lineEnd:re,polygonStart:function(){t4.lineStart=rt,t4.lineEnd=rr},polygonEnd:function(){t4.point=t6,t4.lineStart=t8,t4.lineEnd=re},result:function(){var e=t5?[t2/t5,t3/t5]:t1?[tQ/t1,t0/t1]:tJ?[tX/tJ,tK/tJ]:[NaN,NaN];return tX=tK=tJ=tQ=t0=t1=t2=t3=t5=0,e}};function t6(e,t){tX+=e,tK+=t,++tJ}function t8(){t4.point=t7}function t7(e,t){t4.point=t9,t6(tq=e,tH=t)}function t9(e,t){var r=e-tq,i=t-tH,n=w(r*r+i*i);tQ+=n*(tq+e)/2,t0+=n*(tH+t)/2,t1+=n,t6(tq=e,tH=t)}function re(){t4.point=t6}function rt(){t4.point=ri}function rr(){rn(tU,tV)}function ri(e,t){t4.point=rn,t6(tU=tq=e,tV=tH=t)}function rn(e,t){var r=e-tq,i=t-tH,n=w(r*r+i*i);tQ+=n*(tq+e)/2,t0+=n*(tH+t)/2,t1+=n,t2+=(n=tH*e-tq*t)*(tq+e),t3+=n*(tH+t),t5+=3*n,t6(tq=e,tH=t)}function ra(e){this._context=e}ra.prototype={_radius:4.5,pointRadius:function(e){return this._radius=e,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._context.moveTo(e,t),this._point=1;break;case 1:this._context.lineTo(e,t);break;default:this._context.moveTo(e+this._radius,t),this._context.arc(e,t,this._radius,0,c)}},result:A};var ro,rs,rl,rc,ru,rh=r(),rd={point:A,lineStart:function(){rd.point=rf},lineEnd:function(){ro&&rp(rs,rl),rd.point=A},polygonStart:function(){ro=!0},polygonEnd:function(){ro=null},result:function(){var e=+rh;return rh.reset(),e}};function rf(e,t){rd.point=rp,rs=rc=e,rl=ru=t}function rp(e,t){rc-=e,ru-=t,rh.add(w(rc*rc+ru*ru)),rc=e,ru=t}function rm(){this._string=[]}function rg(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}function ry(e){return function(t){var r=new rv;for(var i in e)r[i]=e[i];return r.stream=t,r}}function rv(){}function rx(e,t,r){var i=e.clipExtent&&e.clipExtent();return e.scale(150).translate([0,0]),null!=i&&e.clipExtent(null),I(r,e.stream(t$)),t(t$.result()),null!=i&&e.clipExtent(i),e}function rb(e,t,r){return rx(e,function(r){var i=t[1][0]-t[0][0],n=t[1][1]-t[0][1],a=Math.min(i/(r[1][0]-r[0][0]),n/(r[1][1]-r[0][1])),o=+t[0][0]+(i-a*(r[1][0]+r[0][0]))/2,s=+t[0][1]+(n-a*(r[1][1]+r[0][1]))/2;e.scale(150*a).translate([o,s])},r)}function r_(e,t,r){return rb(e,[[0,0],t],r)}function rw(e,t,r){return rx(e,function(r){var i=+t,n=i/(r[1][0]-r[0][0]),a=(i-n*(r[1][0]+r[0][0]))/2,o=-n*r[0][1];e.scale(150*n).translate([a,o])},r)}function rT(e,t,r){return rx(e,function(r){var i=+t,n=i/(r[1][1]-r[0][1]),a=-n*r[0][0],o=(i-n*(r[1][1]+r[0][1]))/2;e.scale(150*n).translate([a,o])},r)}rm.prototype={_radius:4.5,_circle:rg(4.5),pointRadius:function(e){return(e*=1)!==this._radius&&(this._radius=e,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(e,t){switch(this._point){case 0:this._string.push("M",e,",",t),this._point=1;break;case 1:this._string.push("L",e,",",t);break;default:null==this._circle&&(this._circle=rg(this._radius)),this._string.push("M",e,",",t,this._circle)}},result:function(){if(!this._string.length)return null;var e=this._string.join("");return this._string=[],e}},rv.prototype={constructor:rv,point:function(e,t){this.stream.point(e,t)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var rM=m(30*h);function rk(e,t){var r;return+t?function(e,t){function r(i,n,a,o,s,l,c,u,h,f,m,g,y,v){var x=c-i,b=u-n,_=x*x+b*b;if(_>4*t&&y--){var T=o+f,M=s+m,A=l+g,S=w(T*T+M*M+A*A),E=k(A/=S),C=1e-6>d(d(A)-1)||1e-6>d(a-h)?(a+h)/2:p(M,T),L=e(C,E),P=L[0],I=L[1],z=P-i,D=I-n,O=b*z-x*D;(O*O/_>t||d((x*z+b*D)/_-.5)>.3||o*f+s*m+l*g2?e[2]%360*h:0,I()):[v*u,x*u,b*u]},L.angle=function(e){return arguments.length?(_=e%360*h,I()):_*u},L.reflectX=function(e){return arguments.length?(T=e?-1:1,I()):T<0},L.reflectY=function(e){return arguments.length?(M=e?-1:1,I()):M<0},L.precision=function(e){return arguments.length?(o=rk(s,C=e*e),z()):w(C)},L.fitExtent=function(e,t){return rb(L,e,t)},L.fitSize=function(e,t){return r_(L,e,t)},L.fitWidth=function(e,t){return rw(L,e,t)},L.fitHeight=function(e,t){return rT(L,e,t)},function(){return t=e.apply(this,arguments),L.invert=t.invert&&P,I()}}function rL(e){var t=0,r=o/3,i=rC(e),n=i(t,r);return n.parallels=function(e){return arguments.length?i(t=e[0]*h,r=e[1]*h):[t*u,r*u]},n}function rP(e,t){var r=b(e),i=(r+b(t))/2;if(1e-6>d(i)){var n=m(e);function a(e,t){return[e*n,b(t)/n]}return a.invert=function(e,t){return[e/n,k(t*n)]},a}var s=1+r*(2*i-r),l=w(s)/i;function c(e,t){var r=w(s-2*i*b(t))/i;return[r*b(e*=i),l-r*m(e)]}return c.invert=function(e,t){var r=l-t,n=p(e,d(r))*_(r);return r*i<0&&(n-=o*_(e)*_(r)),[n/i,k((s-(e*e+r*r)*i*i)/(2*i))]},c}function rI(){return rL(rP).scale(155.424).center([0,33.6442])}function rz(){return rI().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function rD(e){return function(t,r){var i=m(t),n=m(r),a=e(i*n);return[a*n*b(t),a*b(r)]}}function rO(e){return function(t,r){var i=w(t*t+r*r),n=e(i),a=b(n);return[p(t*a,i*m(n)),k(i&&r*a/i)]}}var rR=rD(function(e){return w(2/(1+e))});rR.invert=rO(function(e){return 2*k(e/2)});var rF=rD(function(e){return(e=M(e))&&e/b(e)});function rj(e,t){return[e,v(T((s+t)/2))]}function rB(e){var t,r,i,n=rE(e),a=n.center,s=n.scale,l=n.translate,c=n.clipExtent,u=null;function h(){var a=o*s(),l=n(e0(n.rotate()).invert([0,0]));return c(null==u?[[l[0]-a,l[1]-a],[l[0]+a,l[1]+a]]:e===rj?[[Math.max(l[0]-a,u),t],[Math.min(l[0]+a,r),i]]:[[u,Math.max(l[1]-a,t)],[r,Math.min(l[1]+a,i)]])}return n.scale=function(e){return arguments.length?(s(e),h()):s()},n.translate=function(e){return arguments.length?(l(e),h()):l()},n.center=function(e){return arguments.length?(a(e),h()):a()},n.clipExtent=function(e){return arguments.length?(null==e?u=t=r=i=null:(u=+e[0][0],t=+e[0][1],r=+e[1][0],i=+e[1][1]),h()):null==u?null:[[u,t],[r,i]]},h()}function rN(e){return T((s+e)/2)}function rU(e,t){var r=m(e),i=e===t?b(e):v(r/m(t))/v(rN(t)/rN(e)),n=r*x(rN(e),i)/i;if(!i)return rj;function a(e,t){n>0?t<-s+1e-6&&(t=-s+1e-6):t>s-1e-6&&(t=s-1e-6);var r=n/x(rN(t),i);return[r*b(i*e),n-r*m(i*e)]}return a.invert=function(e,t){var r=n-t,a=_(i)*w(e*e+r*r),l=p(e,d(r))*_(r);return r*i<0&&(l-=o*_(e)*_(r)),[l/i,2*f(x(n/a,1/i))-s]},a}function rV(e,t){return[e,t]}function rq(e,t){var r=m(e),i=e===t?b(e):(r-m(t))/(t-e),n=r/i+e;if(1e-6>d(i))return rV;function a(e,t){var r=n-t,a=i*e;return[r*b(a),n-r*m(a)]}return a.invert=function(e,t){var r=n-t,a=p(e,d(r))*_(r);return r*i<0&&(a-=o*_(e)*_(r)),[a/i,n-_(i)*w(e*e+r*r)]},a}rF.invert=rO(function(e){return e}),rj.invert=function(e,t){return[e,2*f(y(t))-s]},rV.invert=rV;var rH=w(3)/2;function rG(e,t){var r=k(rH*b(t)),i=r*r,n=i*i*i;return[e*m(r)/(rH*(1.340264+-.24331799999999998*i+n*(.0062510000000000005+.034164*i))),r*(1.340264+-.081106*i+n*(893e-6+.003796*i))]}function rW(e,t){var r=m(t),i=m(e)*r;return[r*b(e)/i,b(t)/i]}function rY(e,t){var r=t*t,i=r*r;return[e*(.8707-.131979*r+i*(-.013791+i*(.003971*r-.001529*i))),t*(1.007226+r*(.015085+i*(-.044475+.028874*r-.005916*i)))]}function rZ(e,t){return[m(t)*b(e),b(t)]}function r$(e,t){var r=m(t),i=1+m(e)*r;return[r*b(e)/i,b(t)/i]}function rX(e,t){return[v(T((s+t)/2)),-e]}rG.invert=function(e,t){for(var r,i,n=t,a=n*n,o=a*a*a,s=0;s<12&&(i=n*(1.340264+-.081106*a+o*(893e-6+.003796*a))-t,n-=r=i/(1.340264+-.24331799999999998*a+o*(.0062510000000000005+.034164*a)),o=(a=n*n)*a*a,!(1e-12>d(r)));++s);return[rH*e*(1.340264+-.24331799999999998*a+o*(.0062510000000000005+.034164*a))/m(n),k(b(n)/rH)]},rW.invert=rO(f),rY.invert=function(e,t){var r,i=t,n=25;do{var a=i*i,o=a*a;i-=r=(i*(1.007226+a*(.015085+o*(-.044475+.028874*a-.005916*o)))-t)/(1.007226+a*(.045255+o*(-.311325+.259866*a-.005916*11*o)))}while(d(r)>1e-6&&--n>0);return[e/(.8707+(a=i*i)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),i]},rZ.invert=rO(k),r$.invert=rO(function(e){return 2*f(e)}),rX.invert=function(e,t){return[-t,2*f(y(e))-s]},e.geoAlbers=rz,e.geoAlbersUsa=function(){var e,t,r,i,n,a,o=rz(),s=rI().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=rI().rotate([157,0]).center([-3,19.9]).parallels([8,18]),c={point:function(e,t){a=[e,t]}};function u(e){var t=e[0],o=e[1];return a=null,r.point(t,o),a||(i.point(t,o),a)||(n.point(t,o),a)}function h(){return e=t=null,u}return u.invert=function(e){var t=o.scale(),r=o.translate(),i=(e[0]-r[0])/t,n=(e[1]-r[1])/t;return(n>=.12&&n<.234&&i>=-.425&&i<-.214?s:n>=.166&&n<.234&&i>=-.214&&i<-.115?l:o).invert(e)},u.stream=function(r){var i,n;return e&&t===r?e:(n=(i=[o.stream(t=r),s.stream(r),l.stream(r)]).length,e={point:function(e,t){for(var r=-1;++rey(i[0],i[1])&&(i[1]=n[1]),ey(n[0],i[1])>ey(i[0],i[1])&&(i[0]=n[0])):a.push(i=n);for(o=-1/0,r=a.length-1,t=0,i=a[r];t<=r;i=n,++t)n=a[t],(s=ey(i[1],n[0]))>o&&(o=s,J=n[0],ee=i[1])}return eo=es=null,J===1/0||Q===1/0?[[NaN,NaN],[NaN,NaN]]:[[J,Q],[ee,et]]},e.geoCentroid=function(e){eb=e_=ew=eT=eM=ek=eA=eS=eE=eC=eL=0,I(e,eR);var t=eE,r=eC,i=eL,n=t*t+r*r+i*i;return n<1e-12&&(t=ek,r=eA,i=eS,e_<1e-6&&(t=ew,r=eT,i=eM),(n=t*t+r*r+i*i)<1e-12)?[NaN,NaN]:[p(r,t)*u,k(i/w(n))*u]},e.geoCircle=function(){var e,t,r=eY([0,0]),i=eY(90),n=eY(6),a={point:function(r,i){e.push(r=t(r,i)),r[0]*=u,r[1]*=u}};function o(){var o=r.apply(this,arguments),s=i.apply(this,arguments)*h,l=n.apply(this,arguments)*h;return e=[],t=eX(-o[0]*h,-o[1]*h,0).invert,e1(a,s,l,1),o={type:"Polygon",coordinates:[e]},e=t=null,o}return o.center=function(e){return arguments.length?(r="function"==typeof e?e:eY([+e[0],+e[1]]),o):r},o.radius=function(e){return arguments.length?(i="function"==typeof e?e:eY(+e),o):i},o.precision=function(e){return arguments.length?(n="function"==typeof e?e:eY(+e),o):n},o},e.geoClipAntimeridian=tn,e.geoClipCircle=ta,e.geoClipExtent=function(){var e,t,r,i=0,n=0,a=960,o=500;return r={stream:function(r){return e&&t===r?e:e=to(i,n,a,o)(t=r)},extent:function(s){return arguments.length?(i=+s[0][0],n=+s[0][1],a=+s[1][0],o=+s[1][1],e=t=null,r):[[i,n],[a,o]]}}},e.geoClipRectangle=to,e.geoConicConformal=function(){return rL(rU).scale(109.5).parallels([30,30])},e.geoConicConformalRaw=rU,e.geoConicEqualArea=rI,e.geoConicEqualAreaRaw=rP,e.geoConicEquidistant=function(){return rL(rq).scale(131.154).center([0,13.9389])},e.geoConicEquidistantRaw=rq,e.geoContains=function(e,t){return(e&&tx.hasOwnProperty(e.type)?tx[e.type]:t_)(e,t)},e.geoDistance=tv,e.geoEqualEarth=function(){return rE(rG).scale(177.158)},e.geoEqualEarthRaw=rG,e.geoEquirectangular=function(){return rE(rV).scale(152.63)},e.geoEquirectangularRaw=rV,e.geoGnomonic=function(){return rE(rW).scale(144.049).clipAngle(60)},e.geoGnomonicRaw=rW,e.geoGraticule=tE,e.geoGraticule10=function(){return tE()()},e.geoIdentity=function(){var e,t,r,i,n,a,o,s=1,l=0,c=0,d=1,f=1,p=0,g=null,y=1,v=1,x=ry({point:function(e,t){var r=T([e,t]);this.stream.point(r[0],r[1])}}),_=tC;function w(){return y=s*d,v=s*f,a=o=null,T}function T(r){var i=r[0]*y,n=r[1]*v;if(p){var a=n*e-i*t;i=i*e+n*t,n=a}return[i+l,n+c]}return T.invert=function(r){var i=r[0]-l,n=r[1]-c;if(p){var a=n*e+i*t;i=i*e-n*t,n=a}return[i/y,n/v]},T.stream=function(e){return a&&o===e?a:a=x(_(o=e))},T.postclip=function(e){return arguments.length?(_=e,g=r=i=n=null,w()):_},T.clipExtent=function(e){return arguments.length?(_=null==e?(g=r=i=n=null,tC):to(g=+e[0][0],r=+e[0][1],i=+e[1][0],n=+e[1][1]),w()):null==g?null:[[g,r],[i,n]]},T.scale=function(e){return arguments.length?(s=+e,w()):s},T.translate=function(e){return arguments.length?(l=+e[0],c=+e[1],w()):[l,c]},T.angle=function(r){return arguments.length?(t=b(p=r%360*h),e=m(p),w()):p*u},T.reflectX=function(e){return arguments.length?(d=e?-1:1,w()):d<0},T.reflectY=function(e){return arguments.length?(f=e?-1:1,w()):f<0},T.fitExtent=function(e,t){return rb(T,e,t)},T.fitSize=function(e,t){return r_(T,e,t)},T.fitWidth=function(e,t){return rw(T,e,t)},T.fitHeight=function(e,t){return rT(T,e,t)},T},e.geoInterpolate=function(e,t){var r,i,n=e[0]*h,a=e[1]*h,o=t[0]*h,s=t[1]*h,l=m(a),c=b(a),d=m(s),f=b(s),g=l*m(n),y=l*b(n),v=d*m(o),x=d*b(o),_=2*k(w((r=b((r=s-a)/2))*r+l*d*((i=b((i=o-n)/2))*i))),T=b(_),M=_?function(e){var t=b(e*=_)/T,r=b(_-e)/T,i=r*g+t*v,n=r*y+t*x;return[p(n,i)*u,p(r*c+t*f,w(i*i+n*n))*u]}:function(){return[n*u,a*u]};return M.distance=_,M},e.geoLength=tm,e.geoMercator=function(){return rB(rj).scale(961/c)},e.geoMercatorRaw=rj,e.geoNaturalEarth1=function(){return rE(rY).scale(175.295)},e.geoNaturalEarth1Raw=rY,e.geoOrthographic=function(){return rE(rZ).scale(249.5).clipAngle(90.000001)},e.geoOrthographicRaw=rZ,e.geoPath=function(e,t){var r,i,n=4.5;function a(e){return e&&("function"==typeof n&&i.pointRadius(+n.apply(this,arguments)),I(e,r(i))),i.result()}return a.area=function(e){return I(e,r(tR)),tR.result()},a.measure=function(e){return I(e,r(rd)),rd.result()},a.bounds=function(e){return I(e,r(t$)),t$.result()},a.centroid=function(e){return I(e,r(t4)),t4.result()},a.projection=function(t){return arguments.length?(r=null==t?(e=null,tC):(e=t).stream,a):e},a.context=function(e){return arguments.length?(i=null==e?(t=null,new rm):new ra(t=e),"function"!=typeof n&&i.pointRadius(n),a):t},a.pointRadius=function(e){return arguments.length?(n="function"==typeof e?e:(i.pointRadius(+e),+e),a):n},a.projection(e).context(t)},e.geoProjection=rE,e.geoProjectionMutator=rC,e.geoRotation=e0,e.geoStereographic=function(){return rE(r$).scale(250).clipAngle(142)},e.geoStereographicRaw=r$,e.geoStream=I,e.geoTransform=function(e){return{stream:ry(e)}},e.geoTransverseMercator=function(){var e=rB(rX),t=e.center,r=e.rotate;return e.center=function(e){return arguments.length?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return arguments.length?r([e[0],e[1],e.length>2?e[2]+90:90]):[(e=r())[0],e[1],e[2]-90]},r([0,0,90]).scale(159.155)},e.geoTransverseMercatorRaw=rX,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?i(e,p_()):i((r=r||self).d3=r.d3||{},r.d3)}}),pT=p({"src/lib/usa_location_names.js"(e,t){var r={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"};t.exports={usaLocationAbbreviations:new Set(Object.values(r)),usaLocationList:r}}}),pM={};m(pM,{COUNTRIES_X:()=>pk});var pk,pA=f({"src/lib/custom_country_codes.ts"(){pk=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),pS=p({"src/lib/geo_location_utils.js"(e,t){var r=T(),{COUNTRIES:i,createLookup:n}=pg(),{area:a}=px(),{centroid:o}=pb(),{coordAll:s}=pv(),{geoBounds:l}=pw(),c=e1(),u=J(),h=I(),d=D(),f=iu(),{usaLocationAbbreviations:p,usaLocationList:m}=pT(),{COUNTRIES_X:g}=(pA(),v(pM)),{lookupAlpha3:y}=n([...i,...g]),x={"ISO-3":c,"USA-states":function(e){return e=e.trim(),(p.has(e.toUpperCase())?e.toUpperCase():m[e.toLowerCase()])||(u.log("Unrecognized US location: "+e+"."),!1)},"country names":function(e){return y(e)||(u.log("Unrecognized country name: "+e+"."),!1)}};function b(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function _(e){var t=e.geojson,r=window.PlotlyGeoAssets||{},i="string"==typeof t?r[t]:t;return h(i)?i:(u.error("Oops ... something went wrong when fetching "+t),!1)}function w(e){try{return s(e)}catch{return[]}}function M(e){if(0===e.length)return null;if(1===e.length){let[t,r]=e[0];return[t,r,t,r]}let[[t,r],[i,n]]=l({type:"MultiPoint",coordinates:e});return[t,r,A([t,i])[1],n]}var k=(e,t)=>"geojson"===t.fitbounds&&"geojson-id"===e.locationmode?w(_(e)):[];function A([e,t]){return[e,e>t?t+360:t]}t.exports={locationToFeature:function(e,t,r){var i;if(!t||"string"!=typeof t)return!1;let n=x[e](t);if(n){let t;if("USA-states"===e)for(let e of(t=[],r))(null==(i=e?.properties)?void 0:i.gu)==="USA"&&t.push(e);else t=r;for(let e of t)if(e.id===n)return e;u.log(`Location with id ${n} does not have a matching topojson feature at this resolution.`)}return!1},feature2polygons:function(e){var t,r,i,n,a=e.geometry,o=a.coordinates,s=e.id,l=[];switch(t="RUS"===s||"FJI"===s?function(e){var t;if(null===b(e))t=e;else for(t=Array(e.length),n=0;nt?r[i++]=[e[n][0]+360,e[n][1]]:n===t?(r[i++]=e[n],r[i++]=[e[n][0],-90]):r[i++]=e[n];var a=f.tester(r);a.pts.pop(),l.push(a)}:function(e){l.push(f.tester(e))},a.type){case"MultiPolygon":for(r=0;rn&&(n=c,t=l)}else t=r;return t&&t.coordinates.some(e=>e.length>0)?o(t).geometry.coordinates:[NaN,NaN]}(c),isNaN(c.properties.ct[0])&&u.log(["Location",i.loc,"has no polygon with positive area. Its centroid could not be computed, so hover and selection will not work for it."].join(" ")),i.fIn=e,i.fOut=c,s.push(c)}else u.log(["Location",i.loc,"does not have a valid GeoJSON geometry. Traces with locationmode *geojson-id* only support *Polygon* and *MultiPolygon* geometries."].join(" "))}delete n[r]}switch(r.type){case"FeatureCollection":var h=r.features;for(i=0;i100?(clearInterval(a),i("Unexpected error while fetching from "+e)):void n++},50)})}(a)):(t[a]="pending",i.push(function(e){return new Promise(function(i,n){r.json(e,function(r,a){return r?(delete t[e],n(Error(404===r.status?'GeoJSON at URL "'+e+'" does not exist.':"Unexpected error while fetching from "+e))):(t[e]=a,i(a))})})}(a))))}return i},boundsOfCoords:M,computeBbox:e=>M(w(e)),coordsOf:w,doesCrossAntiMeridian:b,fitGeojsonBbox:(e,t)=>M(k(e,t)),fitGeojsonCoords:k,unwrapLonRange:A,ANTIMERIDIAN_LON_SHIFT:360}}}),pE=p({"src/traces/scattergeo/style.js"(e,t){var r=T(),i=t9(),n=ee(),a=nr(),o=a.stylePoints,s=a.styleText;t.exports=function(e,t){var a,l,c,u;t&&(a=e,c=(l=t)[0].trace,(u=l[0].node3).style("opacity",l[0].trace.opacity),o(u,c,a),s(u,c,a),u.selectAll("path.js-line").style("fill","none").each(function(e){var t=r.select(this),a=e.trace,o=a.line||{};t.call(n.stroke,o.color).call(i.dashLine,o.dash||"",o.width||0),"none"!==a.fill&&t.call(n.fill,a.fillcolor)}))}}}),pC=p({"src/traces/scattergeo/plot.js"(e,t){var r=T(),i=tv(),n=pp().getTopojsonFeatures,a=pm(),o=pS(),s=ri().findExtremes,l=L().BADNUM,c=i2().calcMarkerSize,u=t5(),h=pE();t.exports={calcGeoJSON:function(e,t){var r,a,u=e[0].trace,h=t[u.geo],d=h._subplot,f=u._length;if(i.isArrayOrTypedArray(u.locations)){var p=u.locationmode,m="geojson-id"===p?o.extractTraceFeature(e):n(u,d.topojson);for(r=0;r")}}(c,m,e,l[0].t.labels),e.hovertemplate=c.hovertemplate,[e]}}}}),pP=p({"src/traces/scattergeo/event_data.js"(e,t){t.exports=function(e,t,r,i,n){e.lon=t.lon,e.lat=t.lat,e.location=t.loc?t.loc:null;var a=i[n];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e}}}),pI=p({"src/traces/scattergeo/select.js"(e,t){var r=t5(),i=L().BADNUM;t.exports=function(e,t){var n,a,o,s,l,c=e.cd,u=e.xaxis,h=e.yaxis,d=[],f=c[0].trace;if(!r.hasMarkers(f)&&!r.hasText(f))return[];if(!1===t)for(l=0;lt?1:e>=t?0:NaN}function r(e){var r;return 1===e.length&&(r=e,e=function(e,i){return t(r(e),i)}),{left:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}var i=r(t),n=i.right,a=i.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,i,n=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,i,n,a=e.length,o=-1;if(null==t){for(;++o=r)for(i=n=r;++or&&(i=r),n=r)for(i=n=r;++or&&(i=r),n=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=y?10:a>=v?5:a>=x?2:1)}function _(e,t,r){var i=Math.abs(t-e)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/n;return a>=y?n*=10:a>=v?n*=5:a>=x&&(n*=2),t=1)return+r(e[i-1],i-1,e);var i,n=(i-1)*t,a=Math.floor(n),o=+r(e[a],a,e);return o+(r(e[a+1],a+1,e)-o)*(n-a)}}function M(e,t){var r,i,n=e.length,a=-1;if(null==t){for(;++a=r)for(i=r;++ar&&(i=r)}else for(;++a=r)for(i=r;++ar&&(i=r);return i}function k(e){if(!(n=e.length))return[];for(var t=-1,r=M(e,A),i=Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function i(i){var a,o,s=i.length,l=Array(s);for(a=0;ah;)d.pop(),--f;var p,m=Array(f+1);for(a=0;a<=f;++a)(p=m[a]=[]).x0=a>0?d[a-1]:u,p.x1=a=r)for(i=r;++ai&&(i=r)}else for(;++a=r)for(i=r;++ai&&(i=r);return i},e.mean=function(e,t){var r,i=e.length,n=i,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,i=e.length-1,n=e[0],a=Array(i<0?0:i);rr(n=e[a],s)||0!==r(s,s))&&(s=n,o=a);if(0===r(s,s))return o}},e.shuffle=function(e,t,r){for(var i,n,a=(r??e.length)-(t=null==t?0:+t);a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.sum=function(e,t){var r,i=e.length,n=-1,a=0;if(null==t)for(;++n0)return[e];if((i=t0)for(e=Math.ceil(e/o),a=Array(n=Math.ceil((t=Math.floor(t/o))-e+1));++stypeof t?e:e.d3=e.d3||{})}}),pD=p({"node_modules/d3-geo-projection/dist/d3-geo-projection.js"(e,t){var r;r=function(e,t,r){var i=Math.abs,n=Math.atan,a=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,c=Math.log,u=Math.max,h=Math.min,d=Math.pow,f=Math.round,p=Math.sign||function(e){return e>0?1:e<0?-1:0},m=Math.sin,g=Math.tan,y=Math.PI,v=y/2,x=y/4,b=Math.SQRT1_2,_=E(2),w=E(y),T=2*y,M=180/y,k=y/180;function A(e){return e>1?v:e<-1?-v:Math.asin(e)}function S(e){return e>1?0:e<-1?y:Math.acos(e)}function E(e){return e>0?Math.sqrt(e):0}function C(e){return(s(e)-s(-e))/2}function L(e){return(s(e)+s(-e))/2}function P(e){var t=g(e/2),r=2*c(o(e/2))/(t*t);function n(e,t){var i=o(e),n=o(t),a=m(t),s=n*i,l=-((1-s?c((1+s)/2)/(1-s):-.5)+r/(1+s));return[l*n*m(e),l*a]}return n.invert=function(t,n){var s,l=E(t*t+n*n),u=-e/2,h=50;if(!l)return[0,0];do{var d=u/2,f=o(d),p=m(d),g=p/f,y=-c(i(f));u-=s=(2/g*y-r*g-l)/(-y/(p*p)+1-r/(2*f*f))*(f<0?.7:1)}while(i(s)>1e-6&&--h>0);var v=m(u);return[a(t*v,l*o(u)),A(n*v/l)]},n}function I(e,t){var r,i=o(t),n=(r=S(i*o(e/=2)))?r/Math.sin(r):1;return[2*i*m(e)*n,m(t)*n]}function z(e){var t=m(e),r=o(e),n=e>=0?1:-1,s=g(n*e),l=(1+t-r)/2;function c(e,i){var c=o(i),u=o(e/=2);return[(1+c)*m(e),(n*i>-a(u,s)-.001?0:-(10*n))+l+m(i)*r-(1+c)*t*u]}return c.invert=function(e,c){var u=0,h=0,d=50;do{var f=o(u),p=m(u),g=o(h),y=m(h),v=1+g,x=v*p-e,b=l+y*r-v*t*f-c,_=v*f/2,w=-p*y,T=t*v*p/2,M=r*g+t*f*y,k=w*T-M*_,A=(b*w-x*M)/k/2,S=(x*T-b*_)/k;i(S)>2&&(S/=2),u-=A,h-=S}while((i(A)>1e-6||i(S)>1e-6)&&--d>0);return n*h>-a(o(u),s)-.001?[2*u,h]:null},c}function D(e,t){var r=g(t/2),i=E(1-r*r),n=1+i*o(e/=2),a=m(e)*i/n,s=r/n,l=a*a,c=s*s;return[4/3*a*(3+l-3*c),4/3*s*(3+3*l-c)]}I.invert=function(e,t){if(!(e*e+4*t*t>y*y+1e-6)){var r=e,n=t,a=25;do{var s,l=m(r),c=m(r/2),u=o(r/2),h=m(n),d=o(n),f=m(2*n),p=h*h,g=d*d,v=c*c,x=1-g*u*u,b=x?S(d*u)*E(s=1/x):s=0,_=2*b*d*c-e,w=b*h-t,T=s*(g*v+b*d*u*p),M=s*(.5*l*f-2*b*h*c),k=.25*s*(f*c-b*h*g*l),A=s*(p*u+b*v*d),C=M*k-A*T;if(!C)break;var L=(w*M-_*A)/C,P=(_*k-w*T)/C;r-=L,n-=P}while((i(L)>1e-6||i(P)>1e-6)&&--a>0);return[r,n]}},D.invert=function(e,t){if(t*=3/8,!(e*=3/8)&&i(t)>1)return null;var r,n,s=1+e*e+t*t,l=E((s-E(s*s-4*t*t))/2),u=A(l)/3,h=l?c((r=i(t/l))+E(r*r-1))/3:c((n=i(e))+E(n*n+1))/3,d=o(u),f=L(h),g=f*f-d*d;return[2*p(e)*a(C(h)*d,.25-g),2*p(t)*a(f*m(u),.25+g)]};var O=E(8),R=c(1+_);function F(e,t){var r=i(t);return rv){var l=a(s[1],s[0]),c=E(s[0]*s[0]+s[1]*s[1]),u=r*f((l-v)/r)+v,h=a(m(l-=u),2-o(l));l=u+A(y/c*m(h))-h,s[0]=c*o(l),s[1]=c*m(l)}return s}return s.invert=function(e,i){var s=E(e*e+i*i);if(s>v){var l=a(i,e),c=r*f((l-v)/r)+v,u=l>c?-1:1,h=s*o(c-l),d=1/g(u*S((h-y)/E(y*(y-2*h)+s*s)));e=s*o(l=c+2*n((d+u*E(d*d-3))/3)),i=s*m(l)}return t.geoAzimuthalEquidistantRaw.invert(e,i)},s}function B(e,r){if(arguments.length<2&&(r=e),1===r)return t.geoAzimuthalEqualAreaRaw;if(r===1/0)return N;function i(i,n){var a=t.geoAzimuthalEqualAreaRaw(i/r,n);return a[0]*=e,a}return i.invert=function(i,n){var a=t.geoAzimuthalEqualAreaRaw.invert(i/e,n);return a[0]*=r,a},i}function N(e,t){return[e*o(t)/o(t/=2),2*m(t)]}function U(e,t,r){var n,a,o,s=100;r=void 0===r?0:+r,t*=1;do(a=e(r))===(o=e(r+1e-6))&&(o=a+1e-6),r-=n=-1e-6*(a-t)/(a-o);while(s-- >0&&i(n)>1e-6);return s<0?NaN:r}function V(e,t,r){return void 0===t&&(t=40),void 0===r&&(r=1e-12),function(n,a,o,s){var l,c,u;o=void 0===o?0:+o,s=void 0===s?0:+s;for(var h=0;hl){o-=c/=2,s-=u/=2;continue}l=m;var g=(o>0?-1:1)*r,y=(s>0?-1:1)*r,v=e(o+g,s),x=e(o,s+y),b=(v[0]-d[0])/g,_=(v[1]-d[1])/g,w=(x[0]-d[0])/y,T=(x[1]-d[1])/y,M=T*b-_*w,k=(.5>i(M)?.5:1)/M;if(c=(p*w-f*T)*k,u=(f*_-p*b)*k,o+=c,s+=u,i(c)0&&(n[1]*=1+a/1.5*n[0]*n[0]),n}return t.invert=V(t),t}function H(e,t){var r,n=e*m(t),a=30;do t-=r=(t+m(t)-n)/(1+o(t));while(i(r)>1e-6&&--a>0);return t/2}function G(e,t,r){function i(i,n){return[e*i*o(n=H(r,n)),t*m(n)]}return i.invert=function(i,n){return[i/(e*o(n=A(n/t))),A((2*n+m(2*n))/r)]},i}F.invert=function(e,t){if((a=i(t))1e-12&&--u>0);return[e/(o(l)*(O-1/m(l))),p(t)*l]},N.invert=function(e,t){var r=2*A(t/2);return[e*o(r/2)/o(r),r]};var W=G(_/v,_,y);function Y(e,t){var r=H(y,t);return[2.00276*e/(1/o(t)+1.11072/o(r)),(t+_*m(r))/2.00276]}function Z(e){var r=0,i=t.geoProjectionMutator(e),n=i(r);return n.parallel=function(e){return arguments.length?i(r=e*k):r*M},n}function $(e,t){return[e*o(t),t]}function X(e){if(!e)return $;var t=1/g(e);function r(r,i){var n=t+e-i,a=n&&r*o(i)/n;return[n*m(a),t-n*o(a)]}return r.invert=function(r,i){var n=E(r*r+(i=t-i)*i),s=t+e-n;return[n/o(s)*a(r,i),s]},r}function K(e){function t(t,r){var i=v-r,n=i&&t*e*m(i)/i;return[i*m(n)/e,v-i*o(n)]}return t.invert=function(t,r){var i=t*e,n=v-r,o=E(i*i+n*n),s=a(i,n);return[(o?o/m(o):1)*s/e,v-o]},t}Y.invert=function(e,t){var r,n,a=2.00276*t,s=t<0?-x:x,l=25;do n=a-_*m(s),s-=r=(m(2*s)+2*s-y*m(n))/(2*o(2*s)+2+y*o(n)*_*o(s));while(i(r)>1e-6&&--l>0);return[e*(1/o(n=a-_*m(s))+1.11072/o(s))/2.00276,n]},$.invert=function(e,t){return[e/o(t),t]};var J=G(1,4/y,y);function Q(e,t,r,n,s,l){var c,u=o(l);if(i(e)>1||i(l)>1)c=S(r*s+t*n*u);else{var h=m(e/2),d=m(l/2);c=2*A(E(h*h+t*n*d*d))}return i(c)>1e-6?[c,a(n*m(l),t*s-r*n*u)]:[0,0]}function ee(e,t,r){return S((e*e+t*t-r*r)/(2*e*t))}function et(e,t,r){for(var i,n=[[e[0],e[1],m(e[1]),o(e[1])],[t[0],t[1],m(t[1]),o(t[1])],[r[0],r[1],m(r[1]),o(r[1])]],a=n[2],s=0;s<3;++s,a=i)i=n[s],a.v=Q(i[1]-a[1],a[3],a[2],i[3],i[2],i[0]-a[0]),a.point=[0,0];var c=ee(n[0].v[0],n[2].v[0],n[1].v[0]),u=ee(n[0].v[0],n[1].v[0],n[2].v[0]),h=y-c;n[2].point[1]=0,n[0].point[0]=-(n[1].point[0]=n[0].v[0]/2);var d=[n[2].point[0]=n[0].point[0]+n[2].v[0]*o(c),2*(n[0].point[1]=n[1].point[1]=n[2].v[0]*m(c))];return function(e,t){var r,i=m(t),a=o(t),s=[,,,];for(r=0;r<3;++r){var c,f=n[r];if(s[r]=Q(t-f[1],f[3],f[2],a,i,e-f[0]),!s[r][0])return f.point;s[r][1]=(c=s[r][1]-f.v[1])-2*y*l((c+y)/(2*y))}var p=d.slice();for(r=0;r<3;++r){var g=2==r?0:r+1,v=ee(n[r].v[0],s[r][0],s[g][0]);s[r][1]<0&&(v=-v),r?1==r?(v=u-v,p[0]-=s[r][0]*o(v),p[1]-=s[r][0]*m(v)):(v=h-v,p[0]+=s[r][0]*o(v),p[1]+=s[r][0]*m(v)):(p[0]+=s[r][0]*o(v),p[1]-=s[r][0]*m(v))}return p[0]/=3,p[1]/=3,p}}function er(e){return e[0]*=k,e[1]*=k,e}function ei(e,r,i){var n=t.geoCentroid({type:"MultiPoint",coordinates:[e,r,i]}),a=[-n[0],-n[1]],o=t.geoRotation(a),s=et(er(o(e)),er(o(r)),er(o(i)));s.invert=V(s);var l=t.geoProjection(s).rotate(a),c=l.center;return delete l.rotate,l.center=function(e){return arguments.length?c(o(e)):o.invert(c())},l.clipAngle(90)}function en(e,t){var r=E(1-m(t));return[2/w*e*r,w*(1-r)]}function ea(e){var t=g(e);function r(e,r){return[e,(e?e/m(e):1)*(m(r)*o(e)-t*o(r))]}return r.invert=t?function(e,r){e&&(r*=m(e)/e);var i=o(e);return[e,2*a(E(i*i+t*t-r*r)-i,t-r)]}:function(e,t){return[e,A(e?t*g(e)/e:t)]},r}en.invert=function(e,t){var r=(r=t/w-1)*r;return[r>0?e*E(y/r)/2:0,A(1-r)]};var eo=E(3);function es(e,t){return[eo*e*(2*o(2*t/3)-1)/w,eo*w*m(t/3)]}function el(e){var t=o(e);function r(e,r){return[e*t,m(r)/t]}return r.invert=function(e,r){return[e/t,A(r*t)]},r}function ec(e){var t=o(e);function r(e,r){return[e*t,(1+t)*g(r/2)]}return r.invert=function(e,r){return[e/t,2*n(r/(1+t))]},r}function eu(e,t){var r=E(8/(3*y));return[r*e*(1-i(t)/y),r*t]}function eh(e,t){var r=E(4-3*m(i(t)));return[2/E(6*y)*e*r,p(t)*E(2*y/3)*(2-r)]}function ed(e,t){var r=E(y*(4+y));return[2/r*e*(1+E(1-4*t*t/(y*y))),4/r*t]}function ef(e,t){var r=(2+v)*m(t);t/=2;for(var n=0,a=1/0;n<10&&i(a)>1e-6;n++){var s=o(t);t-=a=(t+m(t)*(s+2)-r)/(2*s*(1+s))}return[2/E(y*(4+y))*e*(1+o(t)),2*E(y/(4+y))*m(t)]}function ep(e,t){return[e*(1+o(t))/E(2+y),2*t/E(2+y)]}function em(e,t){for(var r=(1+v)*m(t),n=0,a=1/0;n<10&&i(a)>1e-6;n++)t-=a=(t+m(t)-r)/(1+o(t));return r=E(2+y),[e*(1+o(t))/r,2*t/r]}es.invert=function(e,t){var r=3*A(t/(eo*w));return[w*e/(eo*(2*o(2*r/3)-1)),r]},eu.invert=function(e,t){var r=E(8/(3*y)),n=t/r;return[e/(r*(1-i(n)/y)),n]},eh.invert=function(e,t){var r=2-i(t)/E(2*y/3);return[e*E(6*y)/(2*r),p(t)*A((4-r*r)/3)]},ed.invert=function(e,t){var r=E(y*(4+y))/2;return[e*r/(1+E(1-t*t*(4+y)/(4*y))),t*r/2]},ef.invert=function(e,t){var r=t*E((4+y)/y)/2,i=A(r),n=o(i);return[e/(2/E(y*(4+y))*(1+n)),A((i+r*(n+2))/(2+v))]},ep.invert=function(e,t){var r=E(2+y),i=t*r/2;return[r*e/(1+o(i)),i]},em.invert=function(e,t){var r=1+v,i=E(r/2);return[2*e*i/(1+o(t*=i)),A((t+m(t))/r)]};var eg=3+2*_;function ey(e,t){var r=m(e/=2),i=o(e),a=E(o(t)),s=o(t/=2),l=m(t)/(s+_*i*a),u=E(2/(1+l*l)),h=E((_*s+(i+r)*a)/(_*s+(i-r)*a));return[eg*(u*(h-1/h)-2*c(h)),eg*(u*l*(h+1/h)-2*n(l))]}ey.invert=function(e,t){if(!(r=D.invert(e/1.2,1.065*t)))return null;var r,a=r[0],s=r[1],l=20;e/=eg,t/=eg;do{var d=a/2,f=s/2,p=m(d),g=o(d),y=m(f),x=o(f),w=o(s),T=E(w),M=y/(x+_*g*T),k=M*M,A=E(2/(1+k)),S=(_*x+(g+p)*T)/(_*x+(g-p)*T),C=E(S),L=C-1/C,P=C+1/C,I=A*L-2*c(C)-e,z=A*M*P-2*n(M)-t,O=y&&b*T*p*k/y,R=(_*g*x+T)/(2*(x+_*g*T)*(x+_*g*T)*T),F=-.5*M*A*A*A,j=F*O,B=F*R,N=(N=2*x+_*T*(g-p))*N*C,U=(_*g*x*T+w)/N,V=-(_*p*y)/(T*N),q=L*j-2*U/C+A*(U+U/S),H=L*B-2*V/C+A*(V+V/S),G=M*P*j-2*O/(1+k)+A*P*O+A*M*(U-U/S),W=M*P*B-2*R/(1+k)+A*P*R+A*M*(V-V/S),Y=H*G-W*q;if(!Y)break;var Z=(z*H-I*W)/Y,$=(I*G-z*q)/Y;a-=Z,s=u(-v,h(v,s-$))}while((i(Z)>1e-6||i($)>1e-6)&&--l>0);return 1e-6>i(i(s)-v)?[0,s]:l&&[a,s]};var ev=o(35*k);function ex(e,t){var r=g(t/2);return[e*ev*E(1-r*r),(1+ev)*r]}function eb(e,t){var r=t/2,i=o(r);return[2*e/w*o(t)*i*i,w*g(r)]}function e_(e){var t=1-e,r=n(y,0)[0]-n(-y,0)[0],i=E(2*(n(0,v)[1]-n(0,-v)[1])/r);function n(r,i){var n=o(i),a=m(i);return[n/(t+e*n)*r,t*i+e*a]}function a(e,t){var r=n(e,t);return[r[0]*i,r[1]/i]}function s(e){return a(0,e)[1]}return a.invert=function(r,n){var a=U(s,n);return[r/i*(e+t/o(a)),a]},a}function ew(e){return[e[0]/2,A(g(e[1]/2*k))*M]}function eT(e){return[2*e[0],2*n(m(e[1]*k))*M]}function eM(e,r){var n=2*y/r,s=e*e;function l(r,l){var c=t.geoAzimuthalEquidistantRaw(r,l),u=c[0],h=c[1],d=u*u+h*h;if(d>s){var p=E(d),g=a(h,u),x=n*f(g/n),b=g-x,_=e*o(b),w=(e*m(b)-b*m(_))/(v-_),T=ek(b,w),M=(y-e)/eA(T,_,y);u=p;var k,A=50;do u-=k=(e+eA(T,_,u)*M-p)/(T(u)*M);while(i(k)>1e-6&&--A>0);h=b*m(u),us){var u=E(c),h=a(l,r),d=n*f(h/n),p=h-d;r=u*o(p),l=u*m(p);for(var g=r-v,x=m(r),b=l/x,_=ri(_)||!--w)break;b-=_=(b*x-S*g-l)/(x-2*g*(A*(M+b*T*o(M)-k)-T*(T-b*k))/(A*A))}r=(u=e+eA(C,M,r)*(y-e)/eA(C,M,y))*o(h=d+b),l=u*m(h)}return t.geoAzimuthalEquidistantRaw.invert(r,l)},l}function ek(e,t){return function(r){var i=e*o(r);return r1e-6||i(f)>1e-6)&&--v>0);return[p,g]},u}ex.invert=function(e,t){var r=t/(1+ev);return[e&&e/(ev*E(1-r*r)),2*n(r)]},eb.invert=function(e,t){var r=n(t/w),i=o(r),a=2*r;return[e*w/2/(o(a)*i*i),a]};var eE=eS(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555),eC=eS(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742),eL=eS(5/6*y,-.62636,-.0344,0,1.3493,-.05524,0,.045);function eP(e,t){var r=e*e,i=t*t;return[e*(1-.162388*i)*(.87-952426e-9*r*r),t*(1+i/12)]}eP.invert=function(e,t){var r,n=e,a=t,o=50;do{var s=a*a;a-=r=(a*(1+s/12)-t)/(1+s/4)}while(i(r)>1e-6&&--o>0);o=50,e/=1-.162388*s;do{var l=(l=n*n)*l;n-=r=(n*(.87-952426e-9*l)-e)/(.87-.00476213*l)}while(i(r)>1e-6&&--o>0);return[n,a]};var eI=eS(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function ez(e){var t=e(v,0)[0]-e(-v,0)[0];function r(r,i){var n=r>0?-.5:.5,a=e(r+n*y,i);return a[0]-=n*t,a}return e.invert&&(r.invert=function(r,i){var n=r>0?-.5:.5,a=e.invert(r+n*t,i),o=a[0]-n*y;return o<-y?o+=2*y:o>y&&(o-=2*y),a[0]=o,a}),r}function eD(e,t){var r=p(e),n=p(t),s=o(t),l=o(e)*s,c=m(e)*s,u=m(n*t);e=i(a(c,u)),t=A(l),i(e-v)>1e-6&&(e%=v);var h=function(e,t){if(t===v)return[0,0];var r,n,a=m(t),s=a*a,l=s*s,c=1+l,u=1+3*l,h=1-l,d=A(1/E(c)),f=h+s*c*d,p=(1-a)/f,g=E(p),x=p*c,b=E(x),_=g*h;if(0===e)return[0,-(_+s*b)];var w,T=o(t),M=1/T,k=2*a*T,S=(-f*T-(-3*s+d*u)*k*(1-a))/(f*f),C=s*c*S+p*u*k,L=-M*k,P=-M*C,I=-2*M*(.5*S/g*h-2*s*g*k),z=4*e/y;if(e>.222*y||t.175*y){if(r=(_+s*E(x*(1+l)-_*_))/(1+l),e>y/4)return[r,r];var D=r,O=.5*r;r=.5*(O+D),n=50;do{var R=E(x-r*r),F=r*(I+L*R)+P*A(r/b)-z;if(!F)break;F<0?O=r:D=r,r=.5*(O+D)}while(i(D-O)>1e-6&&--n>0)}else{r=1e-6,n=25;do{var j=r*r,B=E(x-j),N=I+L*B,U=r*N+P*A(r/b)-z,V=N+(P-L*j)/B;r-=w=B?U/V:0}while(i(w)>1e-6&&--n>0)}return[r,-_-s*E(x-r*r)]}(e>y/4?v-e:e,t);return e>y/4&&(u=h[0],h[0]=-h[1],h[1]=-u),h[0]*=r,h[1]*=-n,h}function eO(e,t){if(t<1e-6)return u=m(e),l=o(e),a=t*(e-u*l)/4,[u-a*l,l+a*u,1-t*u*u/2,e-a];if(t>=.999999){var r;return a=(1-t)/4,l=L(e),u=((r=s(2*(r=e)))-1)/(r+1),c=1/l,[u+a*((h=l*C(e))-e)/(l*l),c-a*u*c*(h-e),c+a*u*c*(h+e),2*n(s(e))-v+a*(h-e)/l]}var a,l,c,u,h,d=[1,0,0,0,0,0,0,0,0],f=[E(t),0,0,0,0,0,0,0,0],p=0;for(l=E(1-t),h=1;i(f[p]/d[p])>1e-6&&p<8;)a=d[p++],f[p]=(a-l)/2,d[p]=(a+l)/2,l=E(a*l),h*=2;c=h*d[p]*e;do c=(A(u=f[p]*m(l=c)/d[p])+c)/2;while(--p);return[m(c),u=o(c),u/o(c-l),c]}function eR(e,t){if(!t)return e;if(1===t)return c(g(e/2+x));for(var r=1,a=E(1-t),o=E(t),s=0;i(o)>1e-6;s++){if(e%y){var l=n(a*g(e)/r);l<0&&(l+=y),e+=l+~~(e/y)*y}else e+=e;o=(r+a)/2,a=E(r*a),o=((r=o)-a)/2}return e/(d(2,s)*r)}function eF(e,t){var r,l,u,h,d,f=(_-1)/(_+1),x=E(1-f*f),b=eR(v,x*x),w=s(-1*c(g(y/4+i(t)/2)))/E(f),T=(r=w*o(-1*e),l=w*m(-1*e),u=r*r,h=l+1,[.5*((r>=0?v:-v)-a(d=1-u-l*l,2*r)),-.25*c(d*d+4*u)+.5*c(h*h+u)]),M=function(e,t,r){var a=i(e),o=C(i(t));if(a){var s=1/m(a),l=1/(g(a)*g(a)),c=-(l+o*o*s*s*r-1+r),u=(-c+E(c*c-(r-1)*l*4))/2;return[eR(n(1/E(u)),r)*p(e),eR(n(E((u/l-1)/r)),1-r)*p(t)]}return[0,eR(n(o),1-r)*p(t)]}(T[0],T[1],x*x);return[-M[1],(t>=0?1:-1)*(.5*b-M[0])]}function ej(e){var t=m(e),r=o(e),n=eB(e);function s(e,a){var s=n(e,a);e=s[0];var l=m(a=s[1]),c=o(a),u=o(e),h=S(t*l+r*c*u),d=m(h),f=i(d)>1e-6?h/d:1;return[f*r*m(e),(i(e)>v?f:-f)*(t*c-r*l*u)]}return n.invert=eB(-e),s.invert=function(e,r){var i=E(e*e+r*r),s=-m(i),l=o(i),c=i*l,u=-r*s,h=i*t,d=E(c*c+u*u-h*h),f=a(c*h+u*d,u*h-c*d),p=(i>v?-1:1)*a(e*s,i*o(f)*l+r*m(f)*s);return n.invert(p,f)},s}function eB(e){var t=m(e),r=o(e);return function(e,i){var n=o(i),s=o(e)*n,l=m(e)*n,c=m(i);return[a(l,s*r-c*t),A(c*r+s*t)]}}eD.invert=function(e,t){i(e)>1&&(e=2*p(e)-e),i(t)>1&&(t=2*p(t)-t);var r=p(e),n=p(t),s=-r*e,l=-n*t,c=l/s<1,u=function(e,t){for(var r=0,n=1,a=.5,s=50;;){var l=a*a,c=E(a),u=A(1/E(1+l)),h=1-l+a*(1+l)*u,d=(1-c)/h,f=E(d),p=d*(1+l),m=f*(1-l),g=E(p-e*e),v=t+m+a*g;if(1e-12>i(n-r)||0==--s||0===v)break;v>0?r=a:n=a,a=.5*(r+n)}if(!s)return null;var x=A(c),b=o(x),_=1/b,w=2*c*b,T=(-h*b-(-3*a+u*(1+3*l))*w*(1-c))/(h*h),M=.5*T/f*(1-l)-2*a*f*w,k=-_*(a*(1+l)*T+d*(1+3*l)*w);return[y/4*(e*(-2*_*M+-_*w*g)+k*A(e/E(p))),x]}(c?l:s,c?s:l),h=u[0],d=u[1],f=o(d);return c&&(h=-v-h),[r*(a(m(h)*f,-m(d))+y),n*A(o(h)*f)]},eF.invert=function(e,t){var r,i,o,l,u,h,d,f,p,m=(_-1)/(_+1),g=E(1-m*m),y=(r=.5*eR(v,g*g)-t,i=-e,o=g*g,r?(l=eO(r,o),i?(h=(u=eO(i,1-o))[1]*u[1]+o*l[0]*l[0]*u[0]*u[0],[[l[0]*u[2]/h,l[1]*l[2]*u[0]*u[1]/h],[l[1]*u[1]/h,-l[0]*l[2]*u[0]*u[2]/h],[l[2]*u[1]*u[2]/h,-o*l[0]*l[1]*u[0]/h]]):[[l[0],0],[l[1],0],[l[2],0]]):[[0,(u=eO(i,1-o))[0]/u[1]],[1/u[1],0],[u[2]/u[1],0]]),x=(d=y[0],p=(f=y[1])[0]*f[0]+f[1]*f[1],[(d[0]*f[0]+d[1]*f[1])/p,(d[1]*f[0]-d[0]*f[1])/p]);return[-(a(x[1],x[0])/1),2*n(s(-.5*c(m*x[0]*x[0]+m*x[1]*x[1])))-v]};var eN=A(1-.3333333333333333)*M,eU=el(0);function eV(e){var t=eN*k,r=en(y,t)[0]-en(-y,t)[0],n=eU(0,t)[1],a=en(0,t)[1],o=w-a,s=T/e,c=4/T,d=n+o*o*4/T;function f(f,p){var m,g=i(p);if(g>t){var v=h(e-1,u(0,l((f+y)/s)));f+=y*(e-1)/e-v*s,(m=en(f,g))[0]=m[0]*T/r-T*(e-1)/(2*e)+v*T/e,m[1]=n+(m[1]-a)*4*o/T,p<0&&(m[1]=-m[1])}else m=eU(f,p);return m[0]*=c,m[1]/=d,m}return f.invert=function(t,f){t/=c;var p=i(f*=d);if(p>n){var m=h(e-1,u(0,l((t+y)/s)));t=(t+y*(e-1)/e-m*s)*r/T;var g=en.invert(t,.25*(p-n)*T/o+a);return g[0]-=y*(e-1)/e-m*s,f<0&&(g[1]=-g[1]),g}return eU.invert(t,f)},f}function eq(e,t){return[e,1&t?89.999999:eN]}function eH(e,t){return[e,1&t?-89.999999:-eN]}function eG(e){return[.999999*e[0],e[1]]}function eW(e){var t,r=1+e,n=A(m(1/r)),s=2*E(y/(t=y+4*n*r)),l=.5*s*(r+E(e*(2+e))),c=e*e,u=r*r;function h(h,d){var f,p,g=1-m(d);if(g&&g<2){var x,b=v-d,_=25;do{var w=m(b),T=o(b),M=n+a(w,r-T),k=1+u-2*r*T;b-=x=(b-c*n-r*w+k*M-.5*g*t)/(2*r*w*M)}while(i(x)>1e-12&&--_>0);f=s*E(k),p=h*M/y}else f=s*(e+g),p=h*n/y;return[f*m(p),l-f*o(p)]}return h.invert=function(e,i){var o=e*e+(i-=l)*i,h=(1+u-o/(s*s))/(2*r),d=S(h),f=m(d),p=n+a(f,r-h);return[A(e/E(o))*y/p,A(1-2*(d-c*n-r*f+(1+u-2*r*h)*p)/t)]},h}function eY(e,t){return t>-.7109889596207567?(e=W(e,t),e[1]+=.0528035274542,e):$(e,t)}function eZ(e,t){return i(t)>.7109889596207567?(e=W(e,t),e[1]-=t>0?.0528035274542:-.0528035274542,e):$(e,t)}function e$(e,t,r,i){var n=E(4*y/(2*r+(1+e-t/2)*m(2*r)+(e+t)/2*m(4*r)+t/2*m(6*r))),a=E(i*m(r)*E((1+e*o(2*r)+t*o(4*r))/(1+e+t))),s=r*c(1);function l(r){return E(1+e*o(2*r)+t*o(4*r))}function c(i){var n=i*r;return(2*n+(1+e-t/2)*m(2*n)+(e+t)/2*m(4*n)+t/2*m(6*n))/r}function u(e){return l(e)*m(e)}var h=function(e,t){var i=r*U(c,s*m(t)/r,t/y);isNaN(i)&&(i=r*p(t));var u=n*l(i);return[u*a*e/y*o(i),u/a*m(i)]};return h.invert=function(e,t){var i=U(u,t*a/n);return[e*y/(o(i)*n*a*l(i)),A(r*c(i/r)/s)]},0===r&&(n=E(i/y),(h=function(e,t){return[e*n,m(t)/n]}).invert=function(e,t){return[e/n,A(t*n)]}),h}function eX(e,t,r){function n(r){return e+(1-e)*d(1-d(r,t),1/t)}function a(e){var t,r,i,a,o;return void 0===t&&(t=20),r=n(0),o=(r+4*(i=n(.5*(0+e)))+(a=n(e)))*(e-0)/6,function e(t,r,i,n,a,o,s,l,c,u,h){var d,f,p,m,g,y,v,x,b,_;if(h.nanEncountered)return NaN;if(d=i-r,f=t(r+.25*d),p=t(i-.25*d),isNaN(f)||isNaN(p)){h.nanEncountered=!0;return}return _=((y=(m=d*(n+4*f+a)/12)+(g=d*(a+4*p+o)/12))-s)/15,u>c?(h.maxDepthCount++,y+_):Math.abs(_)e?r=i:t=i,i=t+r>>1;while(i>t);var n=l[i+1]-l[i];return n&&(n=(e-l[i+1])/n),(i+1+n)/1e3}var h=2*u(1)/y*o/r,f=function(e,t){var r=u(i(m(t))),a=n(r)*e;return r/=h,[a,t>=0?r:-r]};return f.invert=function(e,t){var r;return 1>i(t*=h)&&(r=p(t)*A(a(i(t))*o)),[e/n(i(t)),r]},f}function eK(e,t){for(var r,i,n,a=-1,o=e.length,s=e[0],l=[];++aa[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}a?o.invert=a(o):e.invert&&(o.invert=function(t,r){for(var a=l[+(r<0)],s=n[+(r<0)],c=0,u=a.length;ci(d[0]-f[0])&&1e-6>i(d[1]-f[1]))?p:null}}});var s,l,c=t.geoProjection(o),u=c.stream;return c.stream=function(e){var r=c.rotate(),i=u(e),n=(c.rotate([0,0]),u(e));return c.rotate(r),i.sphere=function(){t.geoStream(s,n)},i},c.lobes=function(t){return arguments.length?(s=function(e){var t,i,n,a,o,s,l,c=[],u=e[0].length;for(l=0;l=0;--l)i=(t=e[1][l])[0][0],n=t[0][1],a=t[1][1],o=t[2][0],s=t[2][1],c.push(eK([[o-1e-6,s-1e-6],[o-1e-6,a+1e-6],[i+1e-6,a+1e-6],[i+1e-6,n-1e-6]],30));return{type:"Polygon",coordinates:[r.merge(c)]}}(t),l=(n=t.map(function(e){return e.map(function(e){return[[e[0][0]*k,e[0][1]*k],[e[1][0]*k,e[1][1]*k],[e[2][0]*k,e[2][1]*k]]})})).map(function(t){return t.map(function(t){var r,i=e(t[0][0],t[0][1])[0],n=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),[[i,a],[n,o]]})}),c):n.map(function(e){return e.map(function(e){return[[e[0][0]*M,e[0][1]*M],[e[1][0]*M,e[1][1]*M],[e[2][0]*M,e[2][1]*M]]})})},null!=n&&c.lobes(n),c}eY.invert=function(e,t){return t>-.7109889596207567?W.invert(e,t-.0528035274542):$.invert(e,t)},eZ.invert=function(e,t){return i(t)>.7109889596207567?W.invert(e,t+(t>0?.0528035274542:-.0528035274542)):$.invert(e,t)};var eQ=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],e0=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],e1=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]],e2=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]],e3=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]],e5=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function e4(e,t){return[3/T*e*E(y*y/3-t*t),t]}function e6(e){function t(t,r){if(1e-6>i(i(r)-v))return[0,r<0?-2:2];var n=m(r),a=d((1+n)/(1-n),e/2),s=.5*(a+1/a)+o(t*=e);return[2*m(t)/s,(a-1/a)/s]}return t.invert=function(t,r){var n=i(r);if(1e-6>i(n-2))return t?null:[0,p(r)*v];if(n>2)return null;t/=2,r/=2;var o=t*t,s=r*r,l=2*r/(1+o+s);return l=d((1+l)/(1-l),1/e),[a(2*t,1-o-s)/e,A((l-1)/(l+1))]},t}e4.invert=function(e,t){return[T/3*e/E(y*y/3-t*t),t]};var e8=y/_;function e7(e,t){return[e*(1+E(o(t)))/2,t/(o(t/2)*o(e/6))]}function e9(e,t){var r=e*e,i=t*t;return[e*(.975534+i*(-.119161+-.0143059*r+-.0547009*i)),t*(1.00384+r*(.0802894+-.02855*i+199025e-9*r)+i*(.0998909+-.0491032*i))]}function te(e,t){return[m(e)/o(t),g(t)*o(e)]}function tt(e){var t=o(e),r=g(x+e/2);function n(n,a){var o=a-e,s=1e-6>i(o)?n*t:1e-6>i(s=x+a/2)||1e-6>i(i(s)-v)?0:n*o/c(g(s)/r);return[s,o]}return n.invert=function(n,a){var o,s=a+e;return[1e-6>i(a)?n/t:1e-6>i(o=x+s/2)||1e-6>i(i(o)-v)?0:n*c(g(o)/r)/a,s]},n}function tr(e,t){return[e,1.25*c(g(x+.4*t))]}function ti(e){var t=e.length-1;function r(r,i){for(var n,a=o(i),s=2/(1+a*o(r)),l=s*a*m(r),c=s*m(i),u=t,h=e[u],d=h[0],f=h[1];--u>=0;)d=(h=e[u])[0]+l*(n=d)-c*f,f=h[1]+l*f+c*n;return[d=l*(n=d)-c*f,f=l*f+c*n]}return r.invert=function(r,s){var l=20,c=r,u=s;do{for(var h,d=t,f=e[d],p=f[0],g=f[1],y=0,v=0;--d>=0;)f=e[d],y=p+c*(h=y)-u*v,v=g+c*v+u*h,p=f[0]+c*(h=p)-u*g,g=f[1]+c*g+u*h;y=p+c*(h=y)-u*v,v=g+c*v+u*h,p=c*(h=p)-u*g-r,g=c*g+u*h-s;var x,b,_=y*y+v*v;c-=x=(p*y+g*v)/_,u-=b=(g*y-p*v)/_}while(i(x)+i(b)>1e-6*1e-6&&--l>0);if(l){var w=E(c*c+u*u),T=2*n(.5*w),M=m(T);return[a(c*M,w*o(T)),w?A(u*M/w):0]}},r}e7.invert=function(e,t){var r=i(e),n=i(t),a=1e-6,s=v;ni(M)&&1e-6>i(k))break}return[e<0?-a:a,t<0?-s:s]},e9.invert=function(e,t){var r=p(e)*y,n=t/2,a=50;do{var o=r*r,s=n*n,l=r*n,c=r*(.975534+s*(-.119161+-.0143059*o+-.0547009*s))-e,u=n*(1.00384+o*(.0802894+-.02855*s+199025e-9*o)+s*(.0998909+-.0491032*s))-t,h=.975534-s*(.119161+3*o*.0143059+.0547009*s),d=-l*(.238322+.2188036*s+.0286118*o),f=l*(.1605788+7961e-7*o+-.0571*s),m=1.00384+o*(.0802894+199025e-9*o)+s*(3*(.0998909-.02855*o)-.245516*s),g=d*f-m*h,v=(u*d-c*m)/g,x=(c*f-u*h)/g;r-=v,n-=x}while((i(v)>1e-6||i(x)>1e-6)&&--a>0);return a&&[r,n]},te.invert=function(e,t){var r=e*e,i=t*t+1,n=r+i,a=e?b*E((n-E(n*n-4*r))/r):1/E(i);return[A(e*a),p(t)*S(a)]},tr.invert=function(e,t){return[e,2.5*n(s(.8*t))-.625*y]};var tn=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],ta=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],to=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ts=[[.9245,0],[0,0],[.01943,0]],tl=[[.721316,0],[0,0],[-.00881625,-.00617325]];function tc(e,r){var i=t.geoProjection(ti(e)).rotate(r).clipAngle(90),n=t.geoRotation(r),a=i.center;return delete i.rotate,i.center=function(e){return arguments.length?a(n(e)):n.invert(a())},i}var tu=E(6),th=E(7);function td(e,t){var r=A(7*m(t)/(3*tu));return[tu*e*(2*o(2*r/3)-1)/th,9*m(r/3)/th]}function tf(e,t){for(var r,n=(1+b)*m(t),a=t,s=0;s<25&&(a-=r=(m(a/2)+m(a)-n)/(.5*o(a/2)+o(a)),!(1e-6>i(r)));s++);return[e*(1+2*o(a)/o(a/2))/(3*_),2*E(3)*m(a/2)/E(2+_)]}function tp(e,t){for(var r,n=E(6/(4+y)),a=(1+y/4)*m(t),s=t/2,l=0;l<25&&(s-=r=(s/2+m(s)-a)/(.5+o(s)),!(1e-6>i(r)));l++);return[n*(.5+o(s))*e/1.5,n*s]}function tm(e,t){var r=t*t,i=r*r,n=r*i;return[e*(.84719-.13063*r+n*n*(-.04515+.05494*r-.02326*i+.00331*n)),t*(1.01183+i*i*(-.02625+.01926*r-.00396*i))]}function tg(e,t){return[e*(1+o(t))/2,2*(t-g(t/2))]}td.invert=function(e,t){var r=3*A(t*th/9);return[e*th/(tu*(2*o(2*r/3)-1)),A(3*m(r)*tu/7)]},tf.invert=function(e,t){var r=t*E(2+_)/(2*E(3)),i=2*A(r);return[3*_*e/(1+2*o(i)/o(i/2)),A((r+m(i))/(1+b))]},tp.invert=function(e,t){var r=E(6/(4+y)),n=t/r;return 1e-6>i(i(n)-v)&&(n=n<0?-v:v),[1.5*e/(r*(.5+o(n))),A((n/2+m(n))/(1+y/4))]},tm.invert=function(e,t){var r,n,a,o,s=t,l=25;do a=(n=s*s)*n,s-=r=(s*(1.01183+a*a*(-.02625+.01926*n-.00396*a))-t)/(1.01183+a*a*(-.23625+.21186*n+-.05148*a));while(i(r)>1e-12&&--l>0);return a=(n=s*s)*n,o=n*a,[e/(.84719-.13063*n+o*o*(-.04515+.05494*n-.02326*a+.00331*o)),s]},tg.invert=function(e,t){for(var r=t/2,n=0,a=1/0;n<10&&i(a)>1e-6;++n){var s=o(t/2);t-=a=(t-g(t/2)-r)/(1-.5/(s*s))}return[2*e/(1+o(t)),t]};var ty=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function tv(e,t){var r=m(t),n=o(t),a=p(e);if(0===e||i(t)===v)return[0,t];if(0===t)return[e,0];if(i(e)===v)return[e*n,v*r];var s=y/(2*e)-2*e/y,l=2*t/y,c=(1-l*l)/(r-l),u=s*s,h=c*c,d=1+u/h,f=1+h/u,g=(s*r/c-s/2)/d,x=(h*r/u+c/2)/f,b=x*x-(h*r*r/u+c*r-1)/f;return[v*(g+E(g*g+n*n/d)*a),v*(x+E(b<0?0:b)*p(-t*s)*a)]}tv.invert=function(e,t){e/=v,t/=v;var r=e*e,i=r+t*t,n=y*y;return[e?(i-1+E((1-i)*(1-i)+4*r))/(2*e)*v:0,U(function(e){return i*(y*m(e)-2*e)*y+4*e*e*(t-m(e))+2*y*e-n*t},0)]};function tx(e,t){var r=t*t;return[e,t*(1.0148+r*r*(.23185+r*(-.14499+.02406*r)))]}function tb(e,t){if(1e-6>i(t))return[e,0];var r=g(t),n=e*m(t);return[m(n)/r,t+(1-o(n))/r]}function t_(e,t){return[e[0]*t[0]+e[1]*t[3],e[0]*t[1]+e[1]*t[4],e[0]*t[2]+e[1]*t[5]+e[2],e[3]*t[0]+e[4]*t[3],e[3]*t[1]+e[4]*t[4],e[3]*t[2]+e[4]*t[5]+e[5]]}function tw(e,t){return[e[0]-t[0],e[1]-t[1]]}function tT(e){return E(e[0]*e[0]+e[1]*e[1])}function tM(e,r,n){function s(e,t){var i,n=r(e,t),a=n.project([e*M,t*M]);return(i=n.transform)?[i[0]*a[0]+i[1]*a[1]+i[2],-(i[3]*a[0]+i[4]*a[1]+i[5])]:(a[1]=-a[1],a)}!function e(t,r){if(t.edges=function(e){for(var t=e.length,r=[],i=e[t-1],n=0;n=0;)if(i=t[s],r[0]===i[0]&&r[1]===i[1]){if(a)return[a,r];a=r}}}(t.face,r.face),p=(s=f.map(r.project),l=f.map(t.project),i=c=tw(s[1],s[0]),n=u=tw(l[1],l[0]),h=a(i[0]*n[1]-i[1]*n[0],i[0]*n[0]+i[1]*n[1]),d=tT(c)/tT(u),t_([1,0,s[0][0],0,1,s[0][1]],t_([d,0,0,0,d,0],t_([o(h),m(h),0,-m(h),o(h),0],[1,0,-l[0][0],0,1,-l[0][1]]))));t.transform=r.transform?t_(r.transform,p):p;for(var g=r.edges,y=0,v=g.length;y1.790857183?t=1.790857183:t<-1.790857183&&(t=-1.790857183);var r,n=t;do{var a=n*n;n-=r=(n*(1.0148+a*a*(.23185+a*(-.14499+.02406*a)))-t)/(1.0148+a*a*(1.1592500000000001+a*(-1.01493+.21654*a)))}while(i(r)>1e-6);return[e,n]},tb.invert=function(e,t){if(1e-6>i(t))return[e,0];var r,n=e*e+t*t,a=.5*t,s=10;do{var l=g(a),c=1/o(a),u=n-2*t*a+a*a;a-=r=(l*u+2*(a-t))/(2+u*c*c+2*(a-t)*l)}while(i(r)>1e-6&&--s>0);return l=g(a),[(i(t)i^f>i&&r<(d-c)*(i-u)/(f-u)+c&&(n=!n)}return n}(e[0],r))return e.push(t),!0})||e.push([t])}),tj=[],e.length?e.length>1?{type:"MultiPolygon",coordinates:e}:{type:"Polygon",coordinates:e[0]}:null}};function tV(e){var r=e(v,0)[0]-e(-v,0)[0];function n(t,n){var a=i(t)0?t-y:t+y,n),s=(o[0]-o[1])*b,l=(o[0]+o[1])*b;if(a)return[s,l];var c=r*b,u=s>0^l>0?-1:1;return[u*s-p(l)*c,u*l-p(s)*c]}return e.invert&&(n.invert=function(t,n){var a=(t+n)*b,o=(n-t)*b,s=i(a)<.5*r&&i(o)<.5*r;if(!s){var l=r*b,c=a>0^o>0?-1:1,u=-c*t+(o>0?1:-1)*l,h=-c*n+(a>0?1:-1)*l;a=(-u-h)*b,o=(u-h)*b}var d=e.invert(a,o);return s||(d[0]+=a>0?y:-y),d}),t.geoProjection(n).rotate([-90,-90,45]).clipAngle(179.999)}function tq(){return tV(eF).scale(111.48)}function tH(e){var t=m(e);function r(r,i){var a=t?g(r*t/2)/t:r/2;if(!i)return[2*a,-e];var s=2*n(a*m(i)),l=1/g(i);return[m(s)*l,i+(1-o(s))*l-e]}return r.invert=function(r,a){if(1e-6>i(a+=e))return[t?2*n(t*r/2)/t:r,0];var s,l=r*r+a*a,c=0,u=10;do{var h=g(c),d=1/o(c),f=l-2*a*c+c*c;c-=s=(h*f+2*(c-a))/(2+f*d*d+2*(c-a)*h)}while(i(s)>1e-6&&--u>0);var p=r*(h=g(c)),v=g(i(a)0?v:-v)*(d+o*(p-c)/2+o*o*(p-2*d+c)/2)]}function tY(e,t){var r=function(e){function t(t,r){var i=o(r),n=(e-1)/(e-i*o(t));return[n*i*m(t),n*m(r)]}return t.invert=function(t,r){var i=t*t+r*r,n=E(i),o=(e-E(1-i*(e+1)/(e-1)))/((e-1)/n+n/(e-1));return[a(t*o,n*E(1-o*o)),n?A(r*o/n):0]},t}(e);if(!t)return r;var i=o(t),n=m(t);function s(t,a){var o=r(t,a),s=o[1],l=s*n/(e-1)+i;return[o[0]*i/l,s/l]}return s.invert=function(t,a){var o=(e-1)/(e-1-a*n);return r.invert(o*t,o*a*i)},s}tG.forEach(function(e){e[1]*=1.0144}),tW.invert=function(e,t){var r=t/v,n=90*r,a=h(18,i(n/5)),o=u(0,l(a));do{var s=tG[o][1],c=tG[o+1][1],d=tG[h(19,o+2)][1],f=d-s,p=d-2*c+s,m=2*(i(r)-c)/f,g=p/f,y=m*(1-g*m*(1-2*g*m));if(y>=0||1===o){n=(t>=0?5:-5)*(y+a);var x,b=50;do o=l(a=h(18,i(n)/5)),y=a-o,s=tG[o][1],n-=(x=(t>=0?v:-v)*((c=tG[o+1][1])+y*((d=tG[h(19,o+2)][1])-s)/2+y*y*(d-2*c+s)/2)-t)*M;while(i(x)>1e-12&&--b>0);break}}while(--o>=0);var _=tG[o][0],w=tG[o+1][0],T=tG[h(19,o+2)][0];return[e/(w+y*(T-_)/2+y*y*(T-2*w+_)/2),n*k]};function tZ(e){return e.length>0}function t$(e){return -90===e||90===e?[0,e]:[-180,Math.floor(1e4*e)/1e4]}function tX(e){var t=e[0],r=e[1],i=!1;return t<=-179.9999?(t=-180,i=!0):t>=179.9999&&(t=180,i=!0),r<=-89.9999?(r=-90,i=!0):r>=89.9999&&(r=90,i=!0),i?[t,r]:e}function tK(e){return e.map(tX)}function tJ(e,t,r){for(var i=0,n=e.length;i=179.9999||u<=-89.9999||u>=89.9999){a[o]=tX(l);for(var h=o+1;h-179.9999&&f<179.9999&&p>-89.9999&&p<89.9999)break}if(h===o+1)continue;if(o){var m={index:-1,polygon:t,ring:a.slice(0,o+1)};m.ring[m.ring.length-1]=t$(u),r[r.length-1]=m}else r.pop();if(h>=s)break;r.push({index:-1,polygon:t,ring:a=a.slice(h-1)}),a[0]=t$(a[0][1]),o=-1,s=a.length}}}}function tQ(e){var t,r,i,n,a,o,s=e.length,l={},c={};for(t=0;t0?y-l:l)*M],u=t.geoProjection(e(s)).rotate(c),h=t.geoRotation(c),d=u.center;return delete u.rotate,u.center=function(e){return arguments.length?d(h(e)):h.invert(d())},u.clipAngle(90)}function t5(e){var r=o(e);function i(e,i){var n=t.geoGnomonicRaw(e,i);return n[0]*=r,n}return i.invert=function(e,i){return t.geoGnomonicRaw.invert(e/r,i)},i}function t4(e,t){return t3(t5,e,t)}function t6(e){if(!(e*=2))return t.geoAzimuthalEquidistantRaw;var r=-e/2,i=-r,n=e*e,s=g(i),l=.5/m(i);function c(t,a){var s=S(o(a)*o(t-r)),l=S(o(a)*o(t-i)),c=a<0?-1:1;return s*=s,l*=l,[(s-l)/(2*e),c*E(4*n*l-(n-s+l)*(n-s+l))/(2*e)]}return c.invert=function(e,t){var n,c,u=t*t,h=o(E(u+(n=e+r)*n)),d=o(E(u+(n=e+i)*n));return[a(c=h-d,n=(h+d)*s),(t<0?-1:1)*S(E(n*n+c*c)*l)]},c}function t8(e,t){return t3(t6,e,t)}function t7(e,t){if(1e-6>i(t))return[e,0];var r=i(t/v),n=A(r);if(1e-6>i(e)||1e-6>i(i(t)-v))return[0,p(t)*y*g(n/2)];var a=o(n),s=i(y/e-e/y)/2,l=s*s,c=a/(r+a-1),u=c*(2/r-1),h=u*u,d=h+l,f=c-h,m=l+c;return[p(e)*y*(s*f+E(l*f*f-d*(c*c-h)))/d,p(t)*y*(u*m-s*E((l+1)*d-m*m))/d]}function t9(e,t){if(1e-6>i(t))return[e,0];var r=i(t/v),n=A(r);if(1e-6>i(e)||1e-6>i(i(t)-v))return[0,p(t)*y*g(n/2)];var a=o(n),s=i(y/e-e/y)/2,l=s*s,c=a*(E(1+l)-s*a)/(1+l*r*r);return[p(e)*y*c,p(t)*y*E(1-c*(2*s+c))]}function re(e,t){if(1e-6>i(t))return[e,0];var r=t/v,n=A(r);if(1e-6>i(e)||1e-6>i(i(t)-v))return[0,y*g(n/2)];var a=(y/e-e/y)/2,s=r/(1+o(n));return[y*(p(e)*E(a*a+1-s*s)-a),y*s]}function rt(e,t){if(!t)return[e,0];var r=i(t);if(!e||r===v)return[0,t];var n=r/v,a=n*n,o=(8*n-a*(a+2)-5)/(2*a*(n-1)),s=o*o,l=n*o,c=a+s+2*l,u=n+3*o,h=e/v,d=h+1/h,f=p(i(e)-v)*E(d*d-4),m=f*f,g=c*(a+s*m-1)+(1-a)*(a*(u*u+4*s)+12*l*s+4*s*s),y=(f*(c+s-1)+2*E(g))/(4*c+m);return[p(e)*v*y,p(t)*v*E(1+f*i(y)-y*y)]}function rr(e,t,r,i){var n=y/3;e=u(e,1e-6),t=u(t,1e-6),e=h(e,v),t=h(t,y-1e-6),r=h(r=u(r,0),99.999999);var s=(i=u(i,1e-6))/100,l=S((r/100+1)*o(n))/n,c=m(e)/m(l*v),d=t/y,f=E(s*m(e/2)/m(t/2)),p=f/E(d*c*l),x=1/(f*E(d*c*l));function b(e,t){var r=c*m(l*t),i=E(1-r*r),n=E(2/(1+i*o(e*=d)));return[p*i*n*m(e),x*r*n]}return b.invert=function(e,t){var r=e/p,i=t/x,n=E(r*r+i*i),o=2*A(n/2);return[a(e*g(o),p*n)/d,n&&A(t*m(o)/(x*c*n))/l]},b}function ri(){var e=65*k,r=60*k,i=20,n=200,a=t.geoProjectionMutator(rr),o=a(e,r,i,n);return o.poleline=function(t){return arguments.length?a(e=t*k,r,i,n):e*M},o.parallels=function(t){return arguments.length?a(e,r=t*k,i,n):r*M},o.inflation=function(t){return arguments.length?a(e,r,i=+t,n):i},o.ratio=function(t){return arguments.length?a(e,r,i,n=+t):n},o.scale(163.775)}t2.invert=function(e,t){var r=t/1.70711,i=m(x*r);return[e/(.74482-.34588*i*i),2*n(r)]},t7.invert=function(e,t){if(1e-6>i(t))return[e,0];if(1e-6>i(e))return[0,v*m(2*n(t/y))];var r=(e/=y)*e,a=(t/=y)*t,s=r+a,l=s*s,c=-i(t)*(1+s),u=c-2*a+r,h=-2*c+1+2*a+l,d=a/h+(2*u*u*u/(h*h*h)-9*c*u/(h*h))/27,f=(c-u*u/(3*h))/h,g=2*E(-f/3),x=S(3*d/(f*g))/3;return[y*(s-1+E(1+2*(r-a)+l))/(2*e),p(t)*y*(-g*o(x+y/3)-u/(3*h))]},t9.invert=function(e,t){if(!e)return[0,v*m(2*n(t/y))];var r=i(e/y),o=(1-r*r-(t/=y)*t)/(2*r),s=E(o*o+1);return[p(e)*y*(s-o),p(t)*v*m(2*a(E((1-2*o*r)*(o+s)-r),E(s+o+r)))]},re.invert=function(e,t){if(!t)return[e,0];var r=t/y,i=(y*y*(1-r*r)-e*e)/(2*y*e);return[e?y*(p(e)*E(i*i+1)-i):0,v*m(2*n(r))]},rt.invert=function(e,t){if(!e||!t)return[e,t];t/=y;var r,n=p(e)*e/v,a=(n*n-1+4*t*t)/i(n),o=a*a,s=2*t,l=50;do{var c=s*s,u=(8*s-c*(c+2)-5)/(2*c*(s-1)),h=(3*s-c*s-10)/(2*c*s),d=u*u,f=s*u,m=s+u,g=m*m,x=s+3*u,b=g*(c+d*o-1)+(1-c)*(c*(x*x+4*d)+d*(12*f+4*d)),_=-2*m*(4*f*d+(1-4*c+3*c*c)*(1+h)+d*(-6+14*c-o+(-8+8*c-2*o)*h)+f*(-8+12*c+(-10+10*c-o)*h)),w=E(b);s-=r=(a*(g+d-1)+2*w-n*(4*g+o))/(a*(2*u*h+2*m*(1+h))+_/w-8*m*(a*(-1+d+g)+2*w)*(1+h)/(o+4*g))}while(r>1e-6&&--l>0);return[p(e)*(E(a*a+4)+a)*y/4,v*s]};var rn=4*y+3*E(3),ra=2*E(2*y*E(3)/rn),ro=G(ra*E(3)/y,ra,rn/6);function rs(e,t){return[e*E(1-3*t*t/(y*y)),t]}function rl(e,t){var r=o(t),i=o(e)*r,n=1-i,s=o(e=a(m(e)*r,-m(t))),l=m(e);return[l*(r=E(1-i*i))-s*n,-s*r-l*n]}function rc(e,t){var r=I(e,t);return[(r[0]+e/v)/2,(r[1]+t)/2]}rs.invert=function(e,t){return[e/E(1-3*t*t/(y*y)),t]},rl.invert=function(e,t){var r=-((e*e+t*t)/2),i=E(-r*(2+r)),n=t*r+e*i,o=e*r-t*i,s=E(o*o+n*n);return[a(i*n,s*(1+r)),s?-A(i*o/s):0]},rc.invert=function(e,t){var r=e,n=t,a=25;do{var s,l=o(n),c=m(n),u=m(2*n),h=c*c,d=l*l,f=m(r),p=o(r/2),g=m(r/2),y=g*g,x=1-d*p*p,b=x?S(l*p)*E(s=1/x):s=0,_=.5*(2*b*l*g+r/v)-e,w=.5*(b*c+n)-t,T=.5*s*(d*y+b*l*p*h)+.5/v,M=s*(f*u/4-b*c*g),k=.125*s*(u*g-b*c*d*f),A=.5*s*(h*p+b*y*l)+.5,C=M*k-A*T,L=(w*M-_*A)/C,P=(_*k-w*T)/C;r-=L,n-=P}while((i(L)>1e-6||i(P)>1e-6)&&--a>0);return[r,n]},e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=function(){var e=v,r=t.geoProjectionMutator(P),i=r(e);return i.radius=function(t){return arguments.length?r(e=t*k):e*M},i.scale(179.976).clipAngle(147)},e.geoAiryRaw=P,e.geoAitoff=function(){return t.geoProjection(I).scale(152.63)},e.geoAitoffRaw=I,e.geoArmadillo=function(){var e=20*k,r=e>=0?1:-1,i=g(r*e),n=t.geoProjectionMutator(z),s=n(e),l=s.stream;return s.parallel=function(t){return arguments.length?(i=g((r=(e=t*k)>=0?1:-1)*e),n(e)):e*M},s.stream=function(t){var n=s.rotate(),c=l(t),u=(s.rotate([0,0]),l(t)),h=s.precision();return s.rotate(n),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=-180*r;r*t<180;t+=90*r)u.point(t,90*r);if(e)for(;r*(t-=3*r*h)>=-180;)u.point(t,-(r*a(o(t*k/2),i))*M);u.lineEnd(),u.polygonEnd()},c},s.scale(218.695).center([0,28.0974])},e.geoArmadilloRaw=z,e.geoAugust=function(){return t.geoProjection(D).scale(66.1603)},e.geoAugustRaw=D,e.geoBaker=function(){return t.geoProjection(F).scale(112.314)},e.geoBakerRaw=F,e.geoBerghaus=function(){var e=5,r=t.geoProjectionMutator(j),i=r(e),n=i.stream,s=-o(.01*k),l=m(.01*k);return i.lobes=function(t){return arguments.length?r(e=+t):e},i.stream=function(t){var r=i.rotate(),c=n(t),u=(i.rotate([0,0]),n(t));return i.rotate(r),c.sphere=function(){u.polygonStart(),u.lineStart();for(var t=0,r=360/e,i=2*y/e,n=90-180/e,c=v;t=0;)e.point((t=r[n])[0],t[1]);e.lineEnd(),e.polygonEnd()},e},i.scale(79.4187).parallel(45).clipAngle(179.999)},e.geoHammerRetroazimuthalRaw=ej,e.geoHealpix=function(){var e=4,i=t.geoProjectionMutator(eV),n=i(e),a=n.stream;return n.lobes=function(t){return arguments.length?i(e=+t):e},n.stream=function(i){var o=n.rotate(),s=a(i),l=(n.rotate([0,0]),a(i));return n.rotate(o),s.sphere=function(){var i,n;t.geoStream((i=180/e,n=[].concat(r.range(-180,180+i/2,i).map(eq),r.range(180,-180-i/2,-i).map(eH)),{type:"Polygon",coordinates:[180===i?n.map(eG):n]}),l)},s},n.scale(239.75)},e.geoHealpixRaw=eV,e.geoHill=function(){var e=1,r=t.geoProjectionMutator(eW),i=r(e);return i.ratio=function(t){return arguments.length?r(e=+t):e},i.scale(167.774).center([0,18.67])},e.geoHillRaw=eW,e.geoHomolosine=function(){return t.geoProjection(eZ).scale(152.63)},e.geoHomolosineRaw=eZ,e.geoHufnagel=function(){var e=1,r=0,i=45*k,n=2,a=t.geoProjectionMutator(e$),o=a(e,r,i,n);return o.a=function(t){return arguments.length?a(e=+t,r,i,n):e},o.b=function(t){return arguments.length?a(e,r=+t,i,n):r},o.psiMax=function(t){return arguments.length?a(e,r,i=t*k,n):i*M},o.ratio=function(t){return arguments.length?a(e,r,i,n=+t):n},o.scale(180.739)},e.geoHufnagelRaw=e$,e.geoHyperelliptical=function(){var e=0,r=2.5,i=1.183136,n=t.geoProjectionMutator(eX),a=n(e,r,i);return a.alpha=function(t){return arguments.length?n(e=+t,r,i):e},a.k=function(t){return arguments.length?n(e,r=+t,i):r},a.gamma=function(t){return arguments.length?n(e,r,i=+t):i},a.scale(152.63)},e.geoHyperellipticalRaw=eX,e.geoInterrupt=eJ,e.geoInterruptedBoggs=function(){return eJ(Y,eQ).scale(160.857)},e.geoInterruptedHomolosine=function(){return eJ(eZ,e0).scale(152.63)},e.geoInterruptedMollweide=function(){return eJ(W,e1).scale(169.529)},e.geoInterruptedMollweideHemispheres=function(){return eJ(W,e2).scale(169.529).rotate([20,0])},e.geoInterruptedSinuMollweide=function(){return eJ(eY,e3,V).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoInterruptedSinusoidal=function(){return eJ($,e5).scale(152.63).rotate([-20,0])},e.geoKavrayskiy7=function(){return t.geoProjection(e4).scale(158.837)},e.geoKavrayskiy7Raw=e4,e.geoLagrange=function(){var e=.5,r=t.geoProjectionMutator(e6),i=r(e);return i.spacing=function(t){return arguments.length?r(e=+t):e},i.scale(124.75)},e.geoLagrangeRaw=e6,e.geoLarrivee=function(){return t.geoProjection(e7).scale(97.2672)},e.geoLarriveeRaw=e7,e.geoLaskowski=function(){return t.geoProjection(e9).scale(139.98)},e.geoLaskowskiRaw=e9,e.geoLittrow=function(){return t.geoProjection(te).scale(144.049).clipAngle(89.999)},e.geoLittrowRaw=te,e.geoLoximuthal=function(){return Z(tt).parallel(40).scale(158.837)},e.geoLoximuthalRaw=tt,e.geoMiller=function(){return t.geoProjection(tr).scale(108.318)},e.geoMillerRaw=tr,e.geoModifiedStereographic=tc,e.geoModifiedStereographicRaw=ti,e.geoModifiedStereographicAlaska=function(){return tc(tn,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)},e.geoModifiedStereographicGs48=function(){return tc(ta,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])},e.geoModifiedStereographicGs50=function(){return tc(to,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])},e.geoModifiedStereographicMiller=function(){return tc(ts,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)},e.geoModifiedStereographicLee=function(){return tc(tl,[165,10]).scale(250).clipAngle(130).center([-165,-10])},e.geoMollweide=function(){return t.geoProjection(W).scale(169.529)},e.geoMollweideRaw=W,e.geoMtFlatPolarParabolic=function(){return t.geoProjection(td).scale(164.859)},e.geoMtFlatPolarParabolicRaw=td,e.geoMtFlatPolarQuartic=function(){return t.geoProjection(tf).scale(188.209)},e.geoMtFlatPolarQuarticRaw=tf,e.geoMtFlatPolarSinusoidal=function(){return t.geoProjection(tp).scale(166.518)},e.geoMtFlatPolarSinusoidalRaw=tp,e.geoNaturalEarth2=function(){return t.geoProjection(tm).scale(175.295)},e.geoNaturalEarth2Raw=tm,e.geoNellHammer=function(){return t.geoProjection(tg).scale(152.63)},e.geoNellHammerRaw=tg,e.geoInterruptedQuarticAuthalic=function(){return eJ(B(1/0),ty).rotate([20,0]).scale(152.63)},e.geoNicolosi=function(){return t.geoProjection(tv).scale(127.267)},e.geoNicolosiRaw=tv,e.geoPatterson=function(){return t.geoProjection(tx).scale(139.319)},e.geoPattersonRaw=tx,e.geoPolyconic=function(){return t.geoProjection(tb).scale(103.74)},e.geoPolyconicRaw=tb,e.geoPolyhedral=tM,e.geoPolyhedralButterfly=function(e){e=e||function(e){var r=t.geoCentroid({type:"MultiPoint",coordinates:e});return t.geoGnomonic().scale(1).translate([0,0]).rotate([-r[0],-r[1]])};var r=tS.map(function(t){return{face:t,project:e(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(e,t){var i=r[e];i&&(i.children||(i.children=[])).push(r[t])}),tM(r[0],function(e,t){return r[e<-y/2?t<0?6:4:e<0?2*(t<0):e0?[-r[0],0]:[180-r[0],180])};var r=tS.map(function(t){return{face:t,project:e(t)}});return[-1,0,0,1,0,1,4,5].forEach(function(e,t){var i=r[e];i&&(i.children||(i.children=[])).push(r[t])}),tM(r[0],function(e,t){return r[e<-y/2?t<0?6:4:e<0?2*(t<0):etL(l[0],n)?8+3*s:0>tL(l[1],n)?8+3*s+1:0>tL(l[2],n)?8+3*s+2:s]}).angle(-30).scale(110.625).center([0,45])},e.geoProject=function(e,t){var r,i=t.stream;if(!i)throw Error("invalid projection");switch(e&&e.type){case"Feature":r=tO;break;case"FeatureCollection":r=tD;break;default:r=tR}return r(e,i)},e.geoGringortenQuincuncial=function(){return tV(eD).scale(176.423)},e.geoPeirceQuincuncial=tq,e.geoPierceQuincuncial=tq,e.geoQuantize=function(e,t){if(!(0<=(t*=1)&&t<=20))throw Error("invalid digits");function r(e){var r=e.length,i=2,n=Array(r);for(n[0]=+e[0].toFixed(t),n[1]=+e[1].toFixed(t);i2||a[0]!=t[0]||a[1]!=t[1])&&(i.push(a),t=a)}return 1===i.length&&e.length>1&&i.push(r(e[e.length-1])),i}function n(e){return e.map(i)}function a(e){var t;if(null==e)return e;switch(e.type){case"GeometryCollection":t={type:"GeometryCollection",geometries:e.geometries.map(a)};break;case"Point":t={type:"Point",coordinates:r(e.coordinates)};break;case"MultiPoint":t={type:e.type,coordinates:e.coordinates.map(r)};break;case"LineString":t={type:e.type,coordinates:i(e.coordinates)};break;case"MultiLineString":case"Polygon":t={type:e.type,coordinates:n(e.coordinates)};break;case"MultiPolygon":t={type:"MultiPolygon",coordinates:e.coordinates.map(n)};break;default:return e}return null!=e.bbox&&(t.bbox=e.bbox),t}function o(e){var t={type:"Feature",properties:e.properties,geometry:a(e.geometry)};return null!=e.id&&(t.id=e.id),null!=e.bbox&&(t.bbox=e.bbox),t}if(null!=e)switch(e.type){case"Feature":return o(e);case"FeatureCollection":var s={type:"FeatureCollection",features:e.features.map(o)};return null!=e.bbox&&(s.bbox=e.bbox),s;default:return a(e)}return e},e.geoQuincuncial=tV,e.geoRectangularPolyconic=function(){return Z(tH).scale(131.215)},e.geoRectangularPolyconicRaw=tH,e.geoRobinson=function(){return t.geoProjection(tW).scale(152.63)},e.geoRobinsonRaw=tW,e.geoSatellite=function(){var e=2,r=0,i=t.geoProjectionMutator(tY),n=i(e,r);return n.distance=function(t){return arguments.length?i(e=+t,r):e},n.tilt=function(t){return arguments.length?i(e,r=t*k):r*M},n.scale(432.147).clipAngle(S(1/e)*M-1e-6)},e.geoSatelliteRaw=tY,e.geoSinuMollweide=function(){return t.geoProjection(eY).rotate([-20,-55]).scale(164.263).center([0,-5.4036])},e.geoSinuMollweideRaw=eY,e.geoSinusoidal=function(){return t.geoProjection($).scale(152.63)},e.geoSinusoidalRaw=$,e.geoStitch=function(e){if(null==e)return e;switch(e.type){case"Feature":return t0(e);case"FeatureCollection":var t={type:"FeatureCollection",features:e.features.map(t0)};return null!=e.bbox&&(t.bbox=e.bbox),t;default:return t1(e)}},e.geoTimes=function(){return t.geoProjection(t2).scale(146.153)},e.geoTimesRaw=t2,e.geoTwoPointAzimuthal=t4,e.geoTwoPointAzimuthalRaw=t5,e.geoTwoPointAzimuthalUsa=function(){return t4([-158,21.5],[-77,39]).clipAngle(60).scale(400)},e.geoTwoPointEquidistant=t8,e.geoTwoPointEquidistantRaw=t6,e.geoTwoPointEquidistantUsa=function(){return t8([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)},e.geoVanDerGrinten=function(){return t.geoProjection(t7).scale(79.4183)},e.geoVanDerGrintenRaw=t7,e.geoVanDerGrinten2=function(){return t.geoProjection(t9).scale(79.4183)},e.geoVanDerGrinten2Raw=t9,e.geoVanDerGrinten3=function(){return t.geoProjection(re).scale(79.4183)},e.geoVanDerGrinten3Raw=re,e.geoVanDerGrinten4=function(){return t.geoProjection(rt).scale(127.16)},e.geoVanDerGrinten4Raw=rt,e.geoWagner=ri,e.geoWagner7=function(){return ri().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)},e.geoWagnerRaw=rr,e.geoWagner4=function(){return t.geoProjection(ro).scale(176.84)},e.geoWagner4Raw=ro,e.geoWagner6=function(){return t.geoProjection(rs).scale(152.63)},e.geoWagner6Raw=rs,e.geoWiechel=function(){return t.geoProjection(rl).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)},e.geoWiechelRaw=rl,e.geoWinkel3=function(){return t.geoProjection(rc).scale(158.837)},e.geoWinkel3Raw=rc,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?r(e,pw(),pz()):r(e.d3=e.d3||{},e.d3,e.d3)}}),pO=p({"src/plots/geo/zoom.js"(e,t){var r=T(),i=tv(),n=eQ(),a=Math.PI/180,o=180/Math.PI,s={cursor:"pointer"},l={cursor:"auto"};function c(e,t){return r.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function u(e,t,r){var a=e.id,o=e.graphDiv,s=o.layout,l=s[a],c=o._fullLayout,u=c[a],h={},d={};function f(e,t){h[a+"."+e]=i.nestedProperty(l,e).get(),n.call("_storeDirectGUIEdit",s,c._preGUI,h);var r=i.nestedProperty(u,e);r.get()!==t&&(r.set(t),i.nestedProperty(l,e).set(t),d[a+"."+e]=t)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),o.emit("plotly_relayout",d)}function h(e,t){var i=c(e,t);function n(r){var i=t.invert(e.midPt);r("center.lon",i[0]),r("center.lat",i[1])}return i.on("zoomstart",function(){r.select(this).style(s)}).on("zoom",function(){t.scale(r.event.scale).translate(r.event.translate),e.render(!0);var i=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":i[0],"geo.center.lat":i[1]})}).on("zoomend",function(){r.select(this).style(l),u(e,t,n)}),i}function d(e,t){var i,n,a,o,h,d,f,p,m,g=c(e,t);function y(e){return t.invert(e)}function v(r){var i=t.rotate(),n=t.invert(e.midPt);r("projection.rotation.lon",-i[0]),r("center.lon",n[0]),r("center.lat",n[1])}return g.on("zoomstart",function(){r.select(this).style(s);let{x:e,y:l,width:c,height:u}=this.getBBox();i=r.event.sourceEvent?r.mouse(this):[e+c/2,l+u/2],n=t.rotate(),a=t.translate(),o=n,h=y(i)}).on("zoom",function(){let{x:s,y:l,width:c,height:u}=this.getBBox();if(d=r.event.sourceEvent?r.mouse(this):[s+c/2,l+u/2],function(e){var r=y(e);if(!r)return!0;var i=t(r);return Math.abs(i[0]-e[0])>2||Math.abs(i[1]-e[1])>2}(i)){g.scale(t.scale()),g.translate(t.translate());return}t.scale(r.event.scale),t.translate([a[0],r.event.translate[1]]),h?y(d)&&(p=y(d),f=[o[0]+(p[0]-h[0]),n[1],n[2]],t.rotate(f),o=f):h=y(i=d),m=!0,e.render(!0);var v=t.rotate(),x=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":x[0],"geo.center.lat":x[1],"geo.projection.rotation.lon":-v[0]})}).on("zoomend",function(){r.select(this).style(l),m&&u(e,t,v)}),g}function f(e,t){var i,n={r:t.rotate(),k:t.scale()},h=c(e,t),d=function(e){for(var t=0,i=arguments.length,n=[];++t(G=Math.sqrt(j*j+B*B))?(F=(V>0?90:-90)-H,R=0):(F=Math.asin(V/G)*o-H,R=Math.sqrt(G*G-V*V)),W=180-F-2*H,Y=(Math.atan2(q,U)-Math.atan2(N,R))*o,Z=(Math.atan2(q,U)-Math.atan2(N,-R))*o,n.r=m(C[0],C[1],F,Y)<=m(C[0],C[1],W,Z)?[F,Y,C[2]]:[W,Z,C[2]]);isFinite(X[0])&&isFinite(X[1])&&isFinite(X[2])||(X=I),t.rotate(X),I=X}}else i=p(t,L=c);u=d.of(this,arguments),u({type:"zoom"})}),k=d.of(this,arguments),f++||k({type:"zoomstart"})}).on("zoomend",function(){var i;r.select(this).style(l),g.call(h,"zoom",null),i=d.of(this,arguments),--f||i({type:"zoomend"}),u(e,t,x)}).on("zoom.redraw",function(){e.render(!0);var r=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-r[0],"geo.projection.rotation.lat":-r[1]})}),r.rebind(h,d,"on")}function p(e,t){var r,i,n,o,s=e.invert(t);return s&&isFinite(s[0])&&isFinite(s[1])&&(i=(r=s)[0]*a,[(o=Math.cos(n=r[1]*a))*Math.cos(i),o*Math.sin(i),Math.sin(n)])}function m(e,t,r,i){var n=g(r-e),a=g(i-t);return Math.sqrt(n*n+a*a)}function g(e){return(e%360+540)%360-180}function y(e,t,r){var i=r*a,n=e.slice(),o=+(0===t),s=2===t?1:2,l=Math.cos(i),c=Math.sin(i);return n[o]=e[o]*l-e[s]*c,n[s]=e[s]*l+e[o]*c,n}function v(e,t){for(var r=0,i=0,n=e.length;i0&&o._module.calcGeoJSON(a,t)}if(!r){if(this.updateProjection(e,t))return;this.viewInitial&&this.scope===i.scope||this.saveViewInitial(i)}this.scope=i.scope,this.updateBaseLayers(t,i),this.updateDims(t,i),this.updateFx(t,i),f.generalUpdatePerTraceModule(this.graphDiv,this,e,i);var s=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=s.selectAll(".point"),this.dataPoints.text=s.selectAll("text"),this.dataPaths.line=s.selectAll(".js-line");var l=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=l.selectAll("path"),this._render()},L.updateProjection=function(e,t){var r=this.graphDiv,s=t[this.id],c=t._size,u=s.domain,h=s.projection,d=s.lonaxis,f=s.lataxis,p=d._ax,v=f._ax,x=this.projection=function(e){var t=e.projection,r=t.type,s=M.projNames[r];s="geo"+l.titleCase(s);for(var c=i[s]||o[s],u=c(),h=e._isSatellite?180*Math.acos(1/t.distance)/Math.PI:e._isClipped?M.lonaxisSpan[r]/2:null,d=["center","rotate","parallels","clipExtent"],f=function(e){return e?u:[]},p=0;ph*Math.PI/180},u.getPath=function(){return n().projection(u)},u.getBounds=function(e){return u.getPath().bounds(e)},u.precision(M.precision),e._isSatellite&&u.tilt(t.tilt).distance(t.distance),h&&u.clipAngle(h-M.clipPad),u}(s),b=[[c.l+c.w*u.x[0],c.t+c.h*(1-u.y[1])],[c.l+c.w*u.x[1],c.t+c.h*(1-u.y[0])]],_=s.center||{},w=h.rotation||{},T=d.range||[],A=f.range||[];if(s.fitbounds){p._length=b[1][0]-b[0][0],v._length=b[1][1]-b[0][1],p.range=g(r,p),v.range=g(r,v);let i=[];for(let t of e){let e=t[0].trace;!0===e.visible&&e._module.fitCoords&&i.push(e._module.fitCoords(t,s))}let n=m(r,p),a=n.min.reduce((e,{val:t})=>Math.min(e,t),1/0),o=n.max.reduce((e,{val:t})=>Math.max(e,t),-1/0)-a,l=k.boundsOfCoords(i.flat()),[c,,u]=l||[],d=u-c;if(l&&(o>360||o<360&&dMath.max(t,e(r)),0),a=n.max.reduce((e,t)=>Math.max(e,r(t)),0),o=p._length-i-a,s=o>p._length/10?d*p._length/o:d,l=(c+u)/2;p.range=[l-s/2,l+s/2]}var S=(p.range[0]+p.range[1])/2,E=(v.range[0]+v.range[1])/2;if(s._isScoped)_={lon:S,lat:E};else if(s._isClipped){_={lon:S,lat:E},w={lon:S,lat:E,roll:w.roll};var C=h.type,L=M.lonaxisSpan[C]/2||180,I=M.lataxisSpan[C]/2||90;T=[S-L,S+L],A=[E-I,E+I]}else _={lon:S,lat:E},w={lon:S,lat:w.lat,roll:w.roll}}x.center([_.lon-w.lon,_.lat-w.lat]).rotate([-w.lon,-w.lat,w.roll]).parallels(h.parallels);var z=P(T,A);x.fitExtent(b,z);var D=this.bounds=x.getBounds(z),O=this.fitScale=x.scale(),R=x.translate();if(x.scaleExtent=()=>{var e;let{minscale:t}=h,r=null!=(e=h.maxscale)?e:1/0;return[O*Math.min(t,r),O*Math.max(t,r)]},s.fitbounds){var F=x.getBounds(P(p.range,v.range)),j=Math.min((D[1][0]-D[0][0])/(F[1][0]-F[0][0]),(D[1][1]-D[0][1])/(F[1][1]-F[0][1]));isFinite(j)?x.scale(j*O):l.warn("Something went wrong during"+this.id+"fitbounds computations.")}else x.scale(h.scale*O);var B=this.midPt=[(D[0][0]+D[1][0])/2,(D[0][1]+D[1][1])/2];if(x.translate([R[0]+(B[0]-R[0]),R[1]+(B[1]-R[1])]).clipExtent(D),s._isAlbersUsa){var N=x([_.lon,_.lat]);if(N){var U=x.translate();x.translate([U[0]-(N[0]-U[0]),U[1]-(N[1]-U[1])])}}},L.updateBaseLayers=function(e,t){var i=this,n=i.topojson,a=i.layers,o=i.basePaths;function s(e){return"lonaxis"===e||"lataxis"===e}function l(e){return!!M.lineLayers[e]}function c(e){return!!M.fillLayers[e]}var d=(this.hasChoropleth?M.layersForChoropleth:M.layers).filter(function(e){return l(e)||c(e)?t["show"+e]:!s(e)||t[e].showgrid}),f=i.framework.selectAll(".layer").data(d,String);f.exit().each(function(e){delete a[e],delete o[e],r.select(this).remove()}),f.enter().append("g").attr("class",function(e){return"layer "+e}).each(function(e){var t=a[e]=r.select(this);"bg"===e?i.bgRect=t.append("rect").style("pointer-events","all"):s(e)?o[e]=t.append("path").style("fill","none"):"backplot"===e?t.append("g").classed("choroplethlayer",!0):"frontplot"===e?t.append("g").classed("scatterlayer",!0):l(e)?o[e]=t.append("path").style("fill","none").style("stroke-miterlimit",2):c(e)&&(o[e]=t.append("path").style("stroke","none"))}),f.order(),f.each(function(r){var i=o[r],a=M.layerNameToAdjective[r];"frame"===r?i.datum(M.sphereSVG):l(r)||c(r)?i.datum(E(n,n.objects[r])):s(r)&&i.datum(function(e,t,r){var i,n,a,o=t[e],s=M.scopeDefaults[t.scope];"lonaxis"===e?(i=s.lonaxisRange,n=s.lataxisRange,a=function(e,t){return[e,t]}):"lataxis"===e&&(i=s.lataxisRange,n=s.lonaxisRange,a=function(e,t){return[t,e]});var l={type:"linear",range:[i[0],i[1]-1e-6],tick0:o.tick0,dtick:o.dtick};p.setConvert(l,r);var c=p.calcTicks(l);t.isScoped||"lonaxis"!==e||c.pop();for(var u=c.length,h=Array(u),d=0;dn)&&e.event(a)}a.on("dblclick.zoom",function(){var e=i.viewInitial,t={};for(var r in e)t[i.id+"."+r]=e[r];s.call("_guiRelayout",n,t),n.emit("plotly_doubleclick",null)}),n._context._scrollZoom.geo||a.on("wheel.zoom",null)}else("select"===o||"lasso"===o)&&(a.on(".zoom",null),u.prepFn=function(e,t,r){x(e,t,r,u,o)},v.init(u));a.on("mousemove",function(){var e=i.projection.invert(l.getPositionFromD3Event());if(!e)return v.unhover(n,r.event);i.xaxis.p2c=function(){return e[0]},i.yaxis.p2c=function(){return e[1]},d.hover(n,r.event,i.id)}),a.on("mouseout",function(){n._dragging||v.unhover(n,r.event)}),a.on("click",function(){"select"!==o&&"lasso"!==o&&(c.indexOf("select")>-1&&_(r.event,n,[i.xaxis],[i.yaxis],i.id,u),c.indexOf("event")>-1&&d.click(n,r.event))})}function h(e){return i.projection.invert([e[0]+i.xaxis._offset,e[1]+i.yaxis._offset])}},L.makeFramework=function(){var e=this,t=e.graphDiv,i=t._fullLayout,n="clip"+i._uid+e.id;e.clipDef=i._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=r.select(e.container).append("g").attr("class","geo "+e.id).call(h.setClipUrl,n,t),e.project=function(t){var r=e.projection(t);return r?[r[0]-e.xaxis._offset,r[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(t){return e.project(t)[0]}},e.yaxis={_id:"y",c2p:function(t){return e.project(t)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},p.setConvert(e.mockAxis,i)},L.saveViewInitial=function(e){var t,r=e.center||{},i=e.projection,n=i.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":i.scale},t=e._isScoped?{"center.lon":r.lon,"center.lat":r.lat}:e._isClipped?{"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat,"center.lon":r.lon,"center.lat":r.lat}:{"center.lon":r.lon,"center.lat":r.lat,"projection.rotation.lon":n.lon},l.extendFlat(this.viewInitial,t)},L.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},L._render=function(){var e,t=this.projection,r=t.getPath();function i(e){var r=t(e.lonlat);return r?c(r[0],r[1]):null}function n(e){return t.isLonLatOverEdges(e.lonlat)?"none":null}for(e in this.basePaths)this.basePaths[e].attr("d",r);for(e in this.dataPaths)this.dataPaths[e].attr("d",function(e){return r(e.geojson)});for(e in this.dataPoints)this.dataPoints[e].attr("display",n).attr("transform",i)}}}),pF=p({"src/plots/geo/layout_attributes.js"(e,t){var r=Q(),i=at().attributes,n=eH().dash,a=pd(),o=eq().overrideAll,s=(e6(),v(e3)).default,l={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:r.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:n};(t.exports=o({domain:i({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:s(a.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:s(a.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:r.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:a.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:a.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:a.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:a.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:r.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:r.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:r.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:r.background},lonaxis:l,lataxis:l},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),pj=p({"src/plots/geo/layout_defaults.js"(e,t){var r=tv(),i=o9(),n=tI().getSubplotData,{unwrapLonRange:a}=pS(),o=pd(),s=pF(),l=o.axesNames;function c(e,t,i,s){var c,u,h=n(s.fullData,"geo",s.id).map(function(e){return e.index}),d=i("resolution"),f=i("scope"),p=o.scopeDefaults[f],m=i("projection.type",p.projType),g=t._isAlbersUsa="albers usa"===m;g&&(f=t.scope="usa");var y=t._isScoped="world"!==f,v=t._isSatellite="satellite"===m,x=t._isConic=-1!==m.indexOf("conic")||"albers"===m,b=t._isClipped=!!o.lonaxisSpan[m];if(!1===e.visible){var _=r.extendDeep({},t._template);_.showcoastlines=!1,_.showcountries=!1,_.showframe=!1,_.showlakes=!1,_.showland=!1,_.showocean=!1,_.showrivers=!1,_.showsubunits=!1,_.lonaxis&&(_.lonaxis.showgrid=!1),_.lataxis&&(_.lataxis.showgrid=!1),t._template=_}for(var w,T=i("visible"),M=0;Mnull!=e[t])||o.fitboundsIncompatible.has(m)?t.fitbounds=!1:l.forEach(({dst:e,key:t})=>e&&(e[t]=null))}}t.exports=function(e,t,r){i(e,t,r,{type:"geo",attributes:s,handleDefaults:c,fullData:r,partition:"y"})}}}),pB=p({"src/plots/geo/index.js"(e,t){var r=tI().getSubplotCalcData,i=tv().counterRegex,n=pR(),a=i("geo"),o={};o.geo={valType:"subplotid",dflt:"geo",editType:"calc"},t.exports={attr:"geo",name:"geo",idRoot:"geo",idRegex:a,attrRegex:a,attributes:o,layoutAttributes:pF(),supplyLayoutDefaults:pj(),plot:function(e){for(var t=e._fullLayout,i=e.calcdata,a=t._subplots.geo,o=0;o")}}(e,d,s),[e]}}}),pZ=p({"src/traces/choropleth/event_data.js"(e,t){t.exports=function(e,t,r,i,n){e.location=t.location,e.z=t.z;var a=i[n];return a.fIn&&a.fIn.properties&&(e.properties=a.fIn.properties),e.ct=a.ct,e}}}),p$=p({"src/traces/choropleth/select.js"(e,t){t.exports=function(e,t){var r,i,n,a,o,s=e.cd,l=e.xaxis,c=e.yaxis,u=[];if(!1===t)for(r=0;r=Math.min(I,z)&&f<=Math.max(I,z)?0:1/0}if(k=Math.min(D,O)&&p<=Math.max(D,O)?0:1/0}E=Math.sqrt(k*k+A*A),_=n[M]}}}else for(M=n.length-1;M>-1;M--)w=h[b=n[M]],T=d[b],(S=Math.sqrt((k=c.c2p(w)-f)*k+(A=u.c2p(T)-p)*A))100},e.isDotSymbol=function(e){return"string"==typeof e?t.DOT_RE.test(e):e>200}}}),p2=p({"src/traces/scattergl/defaults.js"(e,t){var r=tv(),i=eQ(),n=p1(),a=p0(),o=iy(),s=t5(),l=iN(),c=iU(),u=iq(),h=iH(),d=iY(),f=iW();t.exports=function(e,t,p,m){function g(i,n){return r.coerce(e,t,a,i,n)}var y=!!e.marker&&n.isOpenSymbol(e.marker.symbol),v=s.isBubble(e),x=l(e,t,m,g);if(!x){t.visible=!1;return}c(e,t,m,g),g("xhoverformat"),g("yhoverformat");var b=x>>1,s=e[o];(void 0!==r?r(s,t):s-t)>=0?(a=o,n=o-1):i=o+1}return a}function i(e,t,r,i,n){for(var a=n+1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)>0?(a=o,n=o-1):i=o+1}return a}function n(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<0?(a=o,i=o+1):n=o-1}return a}function a(e,t,r,i,n){for(var a=i-1;i<=n;){var o=i+n>>>1,s=e[o];(void 0!==r?r(s,t):s-t)<=0?(a=o,i=o+1):n=o-1}return a}function o(e,t,r,i,n){for(;i<=n;){var a=i+n>>>1,o=e[a],s=void 0!==r?r(o,t):o-t;if(0===s)return a;s<=0?i=a+1:n=a-1}return -1}function s(e,t,r,i,n,a){return"function"==typeof r?a(e,t,r,void 0===i?0:0|i,void 0===n?e.length-1:0|n):a(e,t,void 0,void 0===r?0:0|r,void 0===i?e.length-1:0|i)}t.exports={ge:function(e,t,i,n,a){return s(e,t,i,n,a,r)},gt:function(e,t,r,n,a){return s(e,t,r,n,a,i)},lt:function(e,t,r,i,a){return s(e,t,r,i,a,n)},le:function(e,t,r,i,n){return s(e,t,r,i,n,a)},eq:function(e,t,r,i,n){return s(e,t,r,i,n,o)}}}}),p4=p({"node_modules/clamp/index.js"(e,t){t.exports=function(e,t,r){return tr?r:e:et?t:e}}}),p6=p({"node_modules/pick-by-alias/index.js"(e,t){t.exports=function(e,t,r){var n,a,o={};if("string"==typeof t&&(t=i(t)),Array.isArray(t)){var s={};for(a=0;a1&&(e=arguments),"string"==typeof e?e=e.split(/\s/).map(parseFloat):"number"==typeof e&&(e=[e]),e.length&&"number"==typeof e[0]?t=1===e.length?{width:e[0],height:e[0],x:0,y:0}:2===e.length?{width:e[0],height:e[1],x:0,y:0}:{x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(t={x:(e=r(e,{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"})).left||0,y:e.top||0},null==e.width?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,null==e.height?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}}}),p7=p({"node_modules/array-bounds/index.js"(e,t){t.exports=function(e,t){if(!e||null==e.length)throw Error("Argument should be an array");t=null==t?1:Math.floor(t);for(var r=Array(2*t),i=0;in&&(n=e[o]),e[o]typeof arguments[e])return arguments[e]}}}),me=p({"node_modules/dtype/index.js"(e,t){t.exports=function(e){switch(e){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}}}}),mt=p({"node_modules/flatten-vertex-data/index.js"(e,t){var r=me();t.exports=function(e,t,i){if(!e)throw TypeError("must specify data as first parameter");if(i=0|(i||0),Array.isArray(e)&&e[0]&&"number"==typeof e[0][0]){var n,a,o,s,l=e[0].length,c=e.length*l;t&&"string"!=typeof t||(t=new(r(t||"float32"))(c+i));var u=t.length-i;if(c!==u)throw Error("source length "+c+" ("+l+"x"+e.length+") does not match destination length "+u);for(n=0,o=i;n>>1,g;t.dtype||(t.dtype="array"),"string"==typeof t.dtype?g=new(u(t.dtype))(m):t.dtype&&Array.isArray(g=t.dtype)&&(g.length=m);for(let e=0;ei||s>0x40000000){for(let e=0;ec||_>h||T=k||o===s)return;let d=y[a];void 0===s&&(s=d.length);for(let t=o;t=l&&i<=p&&n>=u&&n<=m&&A.push(r)}let f=v[a],x=f[4*o+0],b=f[4*o+1],w=f[4*o+2],S=f[4*o+3],E=function(e,t){let r=null,i=0;for(;null===r;)if(r=e[4*t+i],++i>e.length)return null;return r}(f,o+1),C=.5*n,L=a+1;t(r,i,C,L,x,b||w||S||E),t(r,i+C,C,L,b,w||S||E),t(r+C,i,C,L,w,S||E),t(r+C,i+C,C,L,S,E)}(0,0,1,0,0,1),A},g;function w(e,t,r){let i=1,n=.5,a=.5,o=.5;for(let s=0;s2&&(t.push([i].concat(a.splice(0,2))),s="l",i="m"==i?"l":"L");;){if(a.length==r[s])return a.unshift(i),t.push(a);if(a.length1&&(n=1),n<-1&&(n=-1),(e*i-t*r<0?-1:1)*Math.acos(n)},s=function(e,t,r,n,a,s,l,c,u,h,d,f){var p=Math.pow(a,2),m=Math.pow(s,2),g=Math.pow(d,2),y=Math.pow(f,2),v=p*m-p*y-m*g;v<0&&(v=0),v/=p*y+m*g;var x=(v=Math.sqrt(v)*(l===c?-1:1))*a/s*f,b=-(v*s)/a*d,_=(d-x)/a,w=(f-b)/s,T=o(1,0,_,w),M=o(_,w,(-d-x)/a,(-f-b)/s);return 0===c&&M>0&&(M-=i),1===c&&M<0&&(M+=i),[h*x-u*b+(e+r)/2,u*x+h*b+(t+n)/2,T,M]};e.default=function(e){var t=e.px,o=e.py,l=e.cx,c=e.cy,u=e.rx,h=e.ry,d=e.xAxisRotation,f=void 0===d?0:d,p=e.largeArcFlag,m=e.sweepFlag,g=[];if(0===u||0===h)return[];var y=Math.sin(f*i/360),v=Math.cos(f*i/360),x=v*(t-l)/2+y*(o-c)/2,b=-y*(t-l)/2+v*(o-c)/2;if(0===x&&0===b)return[];var _=Math.pow(x,2)/Math.pow(u=Math.abs(u),2)+Math.pow(b,2)/Math.pow(h=Math.abs(h),2);_>1&&(u*=Math.sqrt(_),h*=Math.sqrt(_));var w=r(s(t,o,l,c,u,h,void 0===p?0:p,void 0===m?0:m,y,v,x,b),4),T=w[0],M=w[1],k=w[2],A=w[3],S=Math.abs(A)/(i/4);1e-7>Math.abs(1-S)&&(S=1);var E=Math.max(Math.ceil(S),1);A/=E;for(var C=0;C4?(o=g[g.length-4],s=g[g.length-3]):(o=d,s=f),a.push(g)}return a};var r=ml();function i(e,t,r,i){return["C",e,t,r,i,r,i]}function n(e,t,r,i,n,a){return["C",e/3+2/3*r,t/3+2/3*i,n/3+2/3*r,a/3+2/3*i,n,a]}}}),mu=p({"node_modules/is-svg-path/index.js"(e,t){t.exports=function(e){return"string"==typeof e&&(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}}}),mh=p({"node_modules/svg-path-bounds/index.js"(e,t){var r=mo(),i=ms(),n=mc(),a=mu();t.exports=function(e){if(Array.isArray(e)&&1===e.length&&"string"==typeof e[0]&&(e=e[0]),"string"==typeof e){if(!a(e))throw Error("String is not an SVG path.");e=r(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(!(e=n(e=i(e))).length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],o=0,s=e.length;ot[2]&&(t[2]=l[c+0]),l[c+1]>t[3]&&(t[3]=l[c+1]);return t}}}),md=p({"node_modules/bitmap-sdf/index.js"(e,t){function r(e,t,r,n,a,o,s){for(var l=0;l0?"white":"black",mx.lineWidth=Math.abs(a)),mx.translate(.5*r,.5*i),mx.scale(l,l);let c=new Path2D(e);return mx.fill(c),a&&mx.stroke(c),mx.setTransform(1,0,0,1,0,0),(0,my.default)(mx,{cutoff:null!=t.cutoff?t.cutoff:.5,radius:null!=t.radius?t.radius:.5*n})}m(mf,{default:()=>mp});var mm,mg,my,mv,mx,mb=f({"node_modules/svg-path-sdf/svg-path-sdf.js"(){mm=y(mh()),mg=y(mu()),my=y(md()),mx=(mv=document.createElement("canvas")).getContext("2d",{willReadFrequently:!0})}}),m_=p({"src/traces/scattergl/convert.js"(e,t){var r=C(),i=(mb(),v(mf)).default,{normalize:n}=ee(),a=eQ(),o=tv(),s=o.isArrayOrTypedArray,l=t9(),c=tC(),u=ff().formatColor,h=t5(),d=t4(),f=p1(),p=pQ(),m=er().DESELECTDIM,g={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},y=t6().appendArrayPointValue;function x(e,t){var i,n=e._fullLayout,a=t._length,l=t.textfont,c=t.textposition,u=s(c)?c:[c],h=l.color,d=l.size,f=l.family,p=l.weight,m=l.style,g=l.variant,v={},x=e._context.plotGlPixelRatio,_=t.texttemplate;if(_){v.text=[];var w=n._d3locale,T=Array.isArray(_),M=T?Math.min(_.length,a):a,k=T?function(e){return _[e]}:function(){return _};for(i=0;i500?"bold":"normal":e}function _(e,t){var r,i,a=t._length,o=t.marker,l={},c=s(o.symbol),h=s(o.angle),p=s(o.color),m=s(o.line.color),g=s(o.opacity),y=s(o.size),v=s(o.line.width);if(c||(i=f.isOpenSymbol(o.symbol)),c||p||m||g||h){l.symbols=Array(a),l.angles=Array(a),l.colors=Array(a),l.borderColors=Array(a);var x=o.symbol,b=o.angle,_=u(o,o.opacity,a),w=u(o.line,o.opacity,a);if(!s(w[0])){var T=w;for(w=Array(a),r=0;rp.TOO_MANY_POINTS||h.hasMarkers(t)?"rect":"round";if(c&&t.connectgaps){var d=i[0],f=i[1];for(n=0;n1?c[n]:c[0]:c,m=s(u)?u.length>1?u[n]:u[0]:u,y=g[p],v=g[m],x=d?d/.8+1:0,b=-v*x-.5*v;o.offset[n]=[y*x/f,b/f]}}return o}}}}),mw=p({"src/traces/scattergl/scene_update.js"(e,t){var r=tv();t.exports=function(e,t){var i=t._scene,n={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},a={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return t._scene||((i=t._scene={}).init=function(){r.extendFlat(i,a,n)},i.init(),i.update=function(e){var t=r.repeat(e,i.count);if(i.fill2d&&i.fill2d.update(t),i.scatter2d&&i.scatter2d.update(t),i.line2d&&i.line2d.update(t),i.error2d&&i.error2d.update(t.concat(t)),i.select2d&&i.select2d.update(t),i.glText)for(var n=0;n=m,T=2*_,M={},k=v.makeCalcdata(t,"x"),A=x.makeCalcdata(t,"y"),S=o(t,v,"x",k),E=o(t,x,"y",A),C=S.vals,L=E.vals;t._x=C,t._y=L,t.xperiodalignment&&(t._origX=k,t._xStarts=S.starts,t._xEnds=S.ends),t.yperiodalignment&&(t._origY=A,t._yStarts=E.starts,t._yEnds=E.ends);var P=Array(T),I=Array(_);for(s=0;s<_;s++)P[2*s]=C[s]===p?NaN:C[s],P[2*s+1]=L[s]===p?NaN:L[s],I[s]=s;if("log"===v.type)for(s=0;s1&&i.extendFlat(o.line,d.linePositions(e,t,r)),o.errorX||o.errorY){var s=d.errorBarPositions(e,t,r,n,a);o.errorX&&i.extendFlat(o.errorX,s.x),o.errorY&&i.extendFlat(o.errorY,s.y)}return o.text&&(i.extendFlat(o.text,{positions:r},d.textPosition(e,t,o.text,o.marker)),i.extendFlat(o.textSel,{positions:r},d.textPosition(e,t,o.text,o.markerSel)),i.extendFlat(o.textUnsel,{positions:r},d.textPosition(e,t,o.text,o.markerUnsel))),o}(e,t,P,C,L),D=f(e,b);return u(y,t),w?z.marker&&(a=z.marker.sizeAvg||Math.max(z.marker.size,3)):a=l(t,_),c(e,t,v,x,C,L,a),z.errorX&&g(t,v,z.errorX),z.errorY&&g(t,x,z.errorY),z.fill&&!D.fill2d&&(D.fill2d=!0),z.marker&&!D.scatter2d&&(D.scatter2d=!0),z.line&&!D.line2d&&(D.line2d=!0),(z.errorX||z.errorY)&&!D.error2d&&(D.error2d=!0),z.text&&!D.glText&&(D.glText=!0),z.marker&&(z.marker.snap=_),D.lineOptions.push(z.line),D.errorXOptions.push(z.errorX),D.errorYOptions.push(z.errorY),D.fillOptions.push(z.fill),D.markerOptions.push(z.marker),D.markerSelectedOptions.push(z.markerSel),D.markerUnselectedOptions.push(z.markerUnsel),D.textOptions.push(z.text),D.textSelectedOptions.push(z.textSel),D.textUnselectedOptions.push(z.textUnsel),D.selectBatch.push([]),D.unselectBatch.push([]),M._scene=D,M.index=D.count,M.x=C,M.y=L,M.positions=P,D.count++,[{x:!1,y:!1,t:M,trace:t}]}}}),mM=p({"src/traces/scattergl/edit_style.js"(e,t){var r=tv(),i=ee(),n=er().DESELECTDIM;t.exports={styleTextSelection:function(e){var t,a,o=e[0],s=o.trace,l=o.t,c=l._scene,u=l.index,h=c.selectBatch[u],d=c.unselectBatch[u],f=c.textOptions[u],p=c.textSelectedOptions[u]||{},m=c.textUnselectedOptions[u]||{},g=r.extendFlat({},f);if(h.length||d.length){var y=p.color,v=m.color,x=f.color,b=r.isArrayOrTypedArray(x);for(g.color=Array(s._length),t=0;t10&&/[0-9](?:\s|\/)/.test(e)&&(a=e.match(/([0-9]+)/g).map(function(e){return parseFloat(e)}),n=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(a=[e[0],e[1],e[2]],n="rgb",o=4===e.length?e[3]:1):e instanceof Object&&(null!=e.r||null!=e.red||null!=e.R?(n="rgb",a=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(n="hsl",a=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),o=e.a||e.alpha||e.opacity||1,null!=e.opacity&&(o/=100)):(n="rgb",a=[e>>>16,(65280&e)>>>8,255&e]);return{space:n,values:a,alpha:o}};var i={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),mC=p({"node_modules/color-rgba/index.js"(e,t){var r=mE();t.exports=function(e){Array.isArray(e)&&e.raw&&(e=String.raw.apply(null,arguments));var t,i=r(e);if(!i.space)return[];var n="h"===i.space[0]?[360,100,100]:[255,255,255];return(t=[,,,])[0]=Math.min(Math.max(i.values[0],0),n[0]),t[1]=Math.min(Math.max(i.values[1],0),n[1]),t[2]=Math.min(Math.max(i.values[2],0),n[2]),"h"===i.space[0]&&(t=function(e){var t,r,i,n,a,o=e[0]/360,s=e[1]/100,l=e[2]/100,c=0;if(0===s)return[a=255*l,a,a];for(r=l<.5?l*(1+s):l+s-l*s,t=2*l-r,n=[0,0,0];c<3;)(i=o+-(1/3*(c-1)))<0?i++:i>1&&i--,a=6*i<1?t+(r-t)*6*i:2*i<1?r:3*i<2?t+(r-t)*(2/3-i)*6:t,n[c++]=255*a;return n}(t)),t.push(Math.min(Math.max(i.alpha,0),1)),t}}}),mL=p({"node_modules/color-normalize/index.js"(e,t){var r=mC(),i=me();t.exports=function(e,t){"float"!==t&&t||(t="array"),"uint"===t&&(t="uint8"),"uint_clamped"===t&&(t="uint8_clamped");var n,a=new(i(t))(4),o="uint8"!==t&&"uint8_clamped"!==t;return e.length&&"string"!=typeof e||(e=r(e),e[0]/=255,e[1]/=255,e[2]/=255),(n=e)instanceof Uint8Array||n instanceof Uint8ClampedArray||Array.isArray(n)&&(n[0]>1||0===n[0])&&(n[1]>1||0===n[1])&&(n[2]>1||0===n[2])&&(!n[3]||n[3]>1)?(a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=null!=e[3]?e[3]:255,o&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255)):o?(a[0]=e[0],a[1]=e[1],a[2]=e[2],a[3]=null!=e[3]?e[3]:1):(a[0]=Math.min(Math.max(Math.floor(255*e[0]),0),255),a[1]=Math.min(Math.max(Math.floor(255*e[1]),0),255),a[2]=Math.min(Math.max(Math.floor(255*e[2]),0),255),a[3]=null==e[3]?255:Math.min(Math.max(Math.floor(255*e[3]),0),255)),a}}}),mP=p({"node_modules/color-id/index.js"(e,t){var r=p4();function i(e,t){null==t&&(t=!0);var i=e[0],n=e[1],a=e[2],o=e[3];return null==o&&(o=t?1:255),t&&(i*=255,n*=255,a*=255,o*=255),i=255&r(i,0,255),n=255&r(n,0,255),0x1000000*i+(n<<16)+((a=255&r(a,0,255))<<8)+(o=255&r(o,0,255))}t.exports=i,t.exports.to=i,t.exports.from=function(e,t){var r=(e*=1)>>>24,i=(0xff0000&e)>>>16,n=(65280&e)>>>8,a=255&e;return!1===t?[r,i,n,a]:[r/255,i/255,n/255,a/255]}}}),mI=p({"node_modules/glslify/browser.js"(e,t){t.exports=function(e){"string"==typeof e&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],i=0;i[255*!this.tooManyColors,i.height],pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:i},attributes:{x:(e,t)=>t.xAttr||{buffer:t.positionBuffer,stride:8,offset:0},y:(e,t)=>t.yAttr||{buffer:t.positionBuffer,stride:8,offset:4},xFract:(e,t)=>t.xAttr?{constant:[0,0]}:{buffer:t.positionFractBuffer,stride:8,offset:0},yFract:(e,t)=>t.yAttr?{constant:[0,0]}:{buffer:t.positionFractBuffer,stride:8,offset:4},size:(e,t)=>t.size.length?{buffer:t.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*t.size/this.maxSize)]},borderSize:(e,t)=>t.borderSize.length?{buffer:t.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*t.borderSize/this.maxSize)]},colorId:(e,t)=>t.color.length?{buffer:t.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?n.slice(4*t.color,4*t.color+4):[t.color]},borderColorId:(e,t)=>t.borderColor.length?{buffer:t.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?n.slice(4*t.borderColor,4*t.borderColor+4):[t.borderColor]},isActive:(e,t)=>!0===t.activation?{constant:[1]}:t.activation?t.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},s=Object.assign({},a);s.frag=o([`precision highp float; +#define GLSLIFY 1 + +uniform float opacity; +uniform sampler2D markerTexture; + +varying vec4 fragColor, fragBorderColor; +varying float fragWidth, fragBorderColorLevel, fragColorLevel; + +float smoothStep(float x, float y) { + return 1.0 / (1.0 + exp(50.0*(x - y))); +} + +void main() { + float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth; + + // max-distance alpha + if (dist < 0.003) discard; + + // null-border case + if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) { + float colorAmt = smoothstep(.5 - delta, .5 + delta, dist); + gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity); + } + else { + float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist); + float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist); + + vec4 color = fragBorderColor; + color.a *= borderColorAmt; + color = mix(color, fragColor, colorAmt); + color.a *= opacity; + + gl_FragColor = color; + } + +} +`]),s.vert=o([`precision highp float; +#define GLSLIFY 1 + +attribute float x, y, xFract, yFract; +attribute float size, borderSize; +attribute vec4 colorId, borderColorId; +attribute float isActive; + +// \`invariant\` effectively turns off optimizations for the position. +// We need this because -fast-math on M1 Macs is re-ordering +// floating point operations in a way that causes floating point +// precision limits to put points in the wrong locations. +invariant gl_Position; + +uniform bool constPointSize; +uniform float pixelRatio; +uniform vec2 scale, scaleFract, translate, translateFract, paletteSize; +uniform sampler2D paletteTexture; + +const float maxSize = 100.; +const float borderLevel = .5; + +varying vec4 fragColor, fragBorderColor; +varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel; + +float pointSizeScale = (constPointSize) ? 2. : pixelRatio; + +bool isDirect = (paletteSize.x < 1.); + +vec4 getColor(vec4 id) { + return isDirect ? id / 255. : texture2D(paletteTexture, + vec2( + (id.x + .5) / paletteSize.x, + (id.y + .5) / paletteSize.y + ) + ); +} + +void main() { + // ignore inactive points + if (isActive == 0.) return; + + vec2 position = vec2(x, y); + vec2 positionFract = vec2(xFract, yFract); + + vec4 color = getColor(colorId); + vec4 borderColor = getColor(borderColorId); + + float size = size * maxSize / 255.; + float borderSize = borderSize * maxSize / 255.; + + gl_PointSize = 2. * size * pointSizeScale; + fragPointSize = size * pixelRatio; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + gl_Position = vec4(pos * 2. - 1., 0., 1.); + + fragColor = color; + fragBorderColor = borderColor; + fragWidth = 1. / gl_PointSize; + + fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); + fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); +} +`]),this.drawMarker=e(s);let l=Object.assign({},a);l.frag=o([`precision highp float; +#define GLSLIFY 1 + +varying vec4 fragColor, fragBorderColor; +varying float fragBorderRadius, fragWidth; + +uniform float opacity; + +float smoothStep(float edge0, float edge1, float x) { + float t; + t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); + return t * t * (3.0 - 2.0 * t); +} + +void main() { + float radius, alpha = 1.0, delta = fragWidth; + + radius = length(2.0 * gl_PointCoord.xy - 1.0); + + if (radius > 1.0 + delta) { + discard; + } + + alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); + + float borderRadius = fragBorderRadius; + float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); + vec4 color = mix(fragColor, fragBorderColor, ratio); + color.a *= alpha * opacity; + gl_FragColor = color; +} +`]),l.vert=o([`precision highp float; +#define GLSLIFY 1 + +attribute float x, y, xFract, yFract; +attribute float size, borderSize; +attribute vec4 colorId, borderColorId; +attribute float isActive; + +// \`invariant\` effectively turns off optimizations for the position. +// We need this because -fast-math on M1 Macs is re-ordering +// floating point operations in a way that causes floating point +// precision limits to put points in the wrong locations. +invariant gl_Position; + +uniform bool constPointSize; +uniform float pixelRatio; +uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; +uniform sampler2D paletteTexture; + +const float maxSize = 100.; + +varying vec4 fragColor, fragBorderColor; +varying float fragBorderRadius, fragWidth; + +float pointSizeScale = (constPointSize) ? 2. : pixelRatio; + +bool isDirect = (paletteSize.x < 1.); + +vec4 getColor(vec4 id) { + return isDirect ? id / 255. : texture2D(paletteTexture, + vec2( + (id.x + .5) / paletteSize.x, + (id.y + .5) / paletteSize.y + ) + ); +} + +void main() { + // ignore inactive points + if (isActive == 0.) return; + + vec2 position = vec2(x, y); + vec2 positionFract = vec2(xFract, yFract); + + vec4 color = getColor(colorId); + vec4 borderColor = getColor(borderColorId); + + float size = size * maxSize / 255.; + float borderSize = borderSize * maxSize / 255.; + + gl_PointSize = (size + borderSize) * pointSizeScale; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + gl_Position = vec4(pos * 2. - 1., 0., 1.); + + fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); + fragColor = color; + fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; + fragWidth = 1. / gl_PointSize; +} +`]),this.drawCircle=e(l)}d.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},d.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this},d.prototype.draw=function(){for(var e=arguments.length,t=Array(e),r=0;r{this.drawItem(t)});return this},d.prototype.drawItem=function(e,t){let{groups:r}=this,i=r[e];if("number"==typeof t&&(e=t,i=r[t],t=null),!(i&&i.count&&i.opacity))return;i.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,i,t));let n=[];for(let e=1;e{let r=n[t];if(void 0===e)return r;null===e?e={positions:null}:"function"==typeof e?e={ondraw:e}:"number"==typeof e[0]&&(e={positions:e}),null===(e=s(e,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"})).positions&&(e.positions=[]),null!=e.tooManyColors&&(this.tooManyColors=e.tooManyColors),r||(n[t]=r={id:t,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:f.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:f.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},e=Object.assign({},d.defaults,e)),!e.positions||"marker"in e||(e.marker=r.marker,delete r.marker),!e.marker||"positions"in e||(e.positions=r.positions,delete r.positions);let y=0,v=0;if(l(r,e,[{snap:!0,size:(e,t)=>(null==e&&(e=d.defaults.size),y+=e&&e.length?1:0,e),borderSize:(e,t)=>(null==e&&(e=d.defaults.borderSize),y+=e&&e.length?1:0,e),opacity:parseFloat,color:(e,t)=>(null==e&&(e=d.defaults.color),e=this.updateColor(e),v++,e),borderColor:(e,t)=>(null==e&&(e=d.defaults.borderColor),e=this.updateColor(e),v++,e),bounds:(e,t,r)=>("range"in r||(r.range=null),e),positions:(e,t,r)=>{let{snap:n}=t,{positionBuffer:o,positionFractBuffer:s,selectionBuffer:l}=t;if(e.x||e.y)return e.x.length?t.xAttr={buffer:f.buffer(e.x),offset:0,stride:4,count:e.x.length}:t.xAttr={buffer:e.x.buffer,offset:4*e.x.offset||0,stride:4*(e.x.stride||1),count:e.x.count},e.y.length?t.yAttr={buffer:f.buffer(e.y),offset:0,stride:4,count:e.y.length}:t.yAttr={buffer:e.y.buffer,offset:4*e.y.offset||0,stride:4*(e.y.stride||1),count:e.y.count},t.count=Math.max(t.xAttr.count,t.yAttr.count),e;let h=t.count=Math.floor((e=c(e,"float64")).length/2),d=t.bounds=h?i(e,2):null;if(r.range||t.range||(delete t.range,r.range=d),r.marker||t.marker||(delete t.marker,r.marker=null),n&&(!0===n||h>n)?t.tree=a(e,{bounds:d}):n&&n.length&&(t.tree=n),t.tree){let e={primitive:"points",usage:"static",data:t.tree,type:"uint32"};t.elements?t.elements(e):t.elements=f.elements(e)}var p=u.float32(e);return o({data:p,usage:"dynamic"}),s({data:u.fract32(e,p),usage:"dynamic"}),l({data:new Uint8Array(h),type:"uint8",usage:"stream"}),e}},{marker:(e,t,r)=>{let{activation:i}=t;if(i.forEach(e=>e&&e.destroy&&e.destroy()),i.length=0,e&&"number"!=typeof e[0]){let r=[];for(let i=0,n=Math.min(e.length,t.count);i{let i=t.bounds;if(i)return e||(e=i),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=u.fract(t.scale),t.translateFract=u.fract(t.translate),e},viewport:e=>h(e||[o.drawingBufferWidth,o.drawingBufferHeight])}]),y){let{count:e,size:t,borderSize:i,sizeBuffer:n}=r,a=new Uint8Array(2*e);if(t.length||i.length)for(let r=0;r=0)return a;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)t=e;else{t=new Uint8Array(e.length);for(let r=0,i=e.length;r4*a&&(this.tooManyColors=!0),this.updatePalette(i),1===o.length?o[0]:o},d.prototype.updatePalette=function(e){if(this.tooManyColors)return;let{maxColors:t,paletteTexture:r}=this,i=Math.ceil(.25*e.length/t);if(i>1){e=e.slice();for(let r=.25*e.length%t;r{e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(e=>e&&e.destroy&&e.destroy()),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(e=>e&&e.destroy&&e.destroy()),this},t.exports=function(e,t){var r=new d(e,t),i=r.render.bind(r);return Object.assign(i,{render:i,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),i}}}),mR=p({"node_modules/object-assign/index.js"(e,t){var r=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,n=Object.prototype.propertyIsEnumerable;t.exports=!function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var i=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==i.join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(e){n[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch{return!1}}()?function(e,t){for(var a,o,s=function(e){if(null==e)throw TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),l=1;l=a.next.y&&a.next.y!==a.y){var h=a.x+(c-a.y)*(a.next.x-a.x)/(a.next.y-a.y);if(h<=o&&h>u&&(u=h,n=a.x=a.x&&a.x>=m&&o!==a.x&&s(cn.x||a.x===n.x&&(r=n,i=a,0>l(r.prev,r,i.prev)&&0>l(i.next,r,r.next))))&&(n=a,y=d)),a=a.next}while(a!==p);return n}(e,t);if(!r)return t;var i=p(r,e);return n(i,i.next),n(r,r.next)}(g[c],r);return r}(e,t,T,r)),e.length>80*r){h=m=e[0],d=y=e[1];for(var k=r;km&&(m=v),x>y&&(y=x);b=0!==(b=Math.max(m-h,y-d))?32767/b:0}return function e(t,r,i,a,h,d,m){if(t){!m&&d&&function(e,t,r,i){var n=e;do 0===n.z&&(n.z=o(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,function(e){var t,r,i,n,a,o,s,l,c=1;do{for(r=e,e=null,a=null,o=0;r;){for(o++,i=r,s=0,t=0;t0||l>0&&i;)0!==s&&(0===l||!i||r.z<=i.z)?(n=r,r=r.nextZ,s--):(n=i,i=i.nextZ,l--),a?a.nextZ=n:e=n,n.prevZ=a,a=n;r=i}a.nextZ=null,c*=2}while(o>1)}(n)}(t,a,h,d);for(var y,v,x=t;t.prev!==t.next;){if(y=t.prev,v=t.next,d?function(e,t,r,i){var n=e.prev,a=e.next;if(l(n,e,a)>=0)return!1;for(var c=n.x,u=e.x,h=a.x,d=n.y,f=e.y,p=a.y,m=cu?c>h?c:h:u>h?u:h,v=d>f?d>p?d:p:f>p?f:p,x=o(m,g,t,r,i),b=o(y,v,t,r,i),_=e.prevZ,w=e.nextZ;_&&_.z>=x&&w&&w.z<=b;){if(_.x>=m&&_.x<=y&&_.y>=g&&_.y<=v&&_!==n&&_!==a&&s(c,d,u,f,h,p,_.x,_.y)&&l(_.prev,_,_.next)>=0||(_=_.prevZ,w.x>=m&&w.x<=y&&w.y>=g&&w.y<=v&&w!==n&&w!==a&&s(c,d,u,f,h,p,w.x,w.y)&&l(w.prev,w,w.next)>=0))return!1;w=w.nextZ}for(;_&&_.z>=x;){if(_.x>=m&&_.x<=y&&_.y>=g&&_.y<=v&&_!==n&&_!==a&&s(c,d,u,f,h,p,_.x,_.y)&&l(_.prev,_,_.next)>=0)return!1;_=_.prevZ}for(;w&&w.z<=b;){if(w.x>=m&&w.x<=y&&w.y>=g&&w.y<=v&&w!==n&&w!==a&&s(c,d,u,f,h,p,w.x,w.y)&&l(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}(t,a,h,d):function(e){var t=e.prev,r=e.next;if(l(t,e,r)>=0)return!1;for(var i=t.x,n=e.x,a=r.x,o=t.y,c=e.y,u=r.y,h=in?i>a?i:a:n>a?n:a,p=o>c?o>u?o:u:c>u?c:u,m=r.next;m!==t;){if(m.x>=h&&m.x<=f&&m.y>=d&&m.y<=p&&s(i,o,n,c,a,u,m.x,m.y)&&l(m.prev,m,m.next)>=0)return!1;m=m.next}return!0}(t)){r.push(y.i/i|0),r.push(t.i/i|0),r.push(v.i/i|0),g(t),t=v.next,x=v.next;continue}if((t=v)===x){m?1===m?e(t=function(e,t,r){var i=e;do{var a=i.prev,o=i.next.next;!c(a,o)&&u(a,i,i.next,o)&&f(a,o)&&f(o,a)&&(t.push(a.i/r|0),t.push(i.i/r|0),t.push(o.i/r|0),g(i),g(i.next),i=e=o),i=i.next}while(i!==e);return n(i)}(n(t),r,i),r,i,a,h,d,2):2===m&&function(t,r,i,a,o,s){var h=t;do{for(var d,m,g=h.next.next;g!==h.prev;){if(h.i!==g.i&&(d=h,m=g,d.next.i!==m.i&&d.prev.i!==m.i&&!function(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&u(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(d,m)&&(f(d,m)&&f(m,d)&&function(e,t){var r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&n<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==e);return i}(d,m)&&(l(d.prev,d,m.prev)||l(d,m.prev,m))||c(d,m)&&l(d.prev,d,d.next)>0&&l(m.prev,m,m.next)>0))){var y=p(h,g);h=n(h,h.next),y=n(y,y.next),e(h,r,i,a,o,s,0),e(y,r,i,a,o,s,0);return}g=g.next}h=h.next}while(h!==t)}(t,r,i,a,h,d):e(n(t),r,i,a,h,d,1);break}}}}(T,M,r,h,d,b,0),M}function i(e,t,r,i,n){var a,o;if(n===v(e,t,r,i)>0)for(a=t;a=t;a-=i)o=m(a,e[a],e[a+1],o);return o&&c(o,o.next)&&(g(o),o=o.next),o}function n(e,t){if(!e)return e;t||(t=e);var r,i=e;do if(r=!1,!i.steiner&&(c(i,i.next)||0===l(i.prev,i,i.next))){if(g(i),(i=t=i.prev)===i.next)break;r=!0}else i=i.next;while(r||i!==t);return t}function a(e,t){return e.x-t.x}function o(e,t,r,i,n){return(e=((e=((e=((e=((e=(e-r)*n|0)|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=((t=(t-i)*n|0)|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1}function s(e,t,r,i,n,a,o,s){return(n-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function l(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function c(e,t){return e.x===t.x&&e.y===t.y}function u(e,t,r,i){var n=d(l(e,t,r)),a=d(l(e,t,i)),o=d(l(r,i,e)),s=d(l(r,i,t));return!!(n!==a&&o!==s||0===n&&h(e,r,t)||0===a&&h(e,i,t)||0===o&&h(r,e,i)||0===s&&h(r,t,i))}function h(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function d(e){return e>0?1:e<0?-1:0}function f(e,t){return 0>l(e.prev,e,e.next)?l(e,t,e.next)>=0&&l(e,e.prev,t)>=0:0>l(e,t,e.prev)||0>l(e,e.next,t)}function p(e,t){var r=new y(e.i,e.x,e.y),i=new y(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function m(e,t,r,i){var n=new y(e,t,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function g(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function y(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function v(e,t,r,i){for(var n=0,a=t,o=r-i;a0&&(i+=e[n-1].length,r.holes.push(i))}return r}}}),mj=p({"node_modules/array-normalize/index.js"(e,t){var r=p7();t.exports=function(e,t,i){if(!e||null==e.length)throw Error("Argument should be an array");null==t&&(t=1),null==i&&(i=r(e,t));for(var n=0;n-1}}}),ge=p({"node_modules/es5-ext/string/#/contains/index.js"(e,t){t.exports=m7()()?String.prototype.contains:m9()}}),gt=p({"node_modules/d/index.js"(e,t){var r=mX(),i=m0(),n=m6(),a=m8(),o=ge();(t.exports=function(e,t){var i,s,l,c,u;return arguments.length<2||"string"!=typeof e?(c=t,t=e,e=null):c=arguments[2],r(e)?(i=o.call(e,"c"),s=o.call(e,"e"),l=o.call(e,"w")):(i=l=!0,s=!1),u={value:t,configurable:i,enumerable:s,writable:l},c?n(a(c),u):u}).gs=function(e,t,s){var l,c,u,h;return"string"!=typeof e?(u=s,s=t,t=e,e=null):u=arguments[3],r(t)?i(t)?r(s)?i(s)||(u=s,s=void 0):s=void 0:(u=t,t=s=void 0):t=void 0,r(e)?(l=o.call(e,"c"),c=o.call(e,"e")):(l=!0,c=!1),h={get:t,set:s,configurable:l,enumerable:c},u?n(a(u),h):h}}}),gr=p({"node_modules/es5-ext/function/is-arguments.js"(e,t){var r=Object.prototype.toString,i=r.call(function(){return arguments}());t.exports=function(e){return r.call(e)===i}}}),gi=p({"node_modules/es5-ext/string/is-string.js"(e,t){var r=Object.prototype.toString,i=r.call("");t.exports=function(e){return"string"==typeof e||e&&"object"==typeof e&&(e instanceof String||r.call(e)===i)||!1}}}),gn=p({"node_modules/ext/global-this/is-implemented.js"(e,t){t.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}}}),ga=p({"node_modules/ext/global-this/implementation.js"(e,t){var r=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw Error("Unable to resolve global `this`")};t.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return r()}try{return __global__||r()}finally{delete Object.prototype.__global__}}()}}),go=p({"node_modules/ext/global-this/index.js"(e,t){t.exports=gn()()?globalThis:ga()}}),gs=p({"node_modules/es6-symbol/is-implemented.js"(e,t){var r=go(),i={object:!0,symbol:!0};t.exports=function(){var e,t=r.Symbol;if("function"!=typeof t)return!1;e=t("test symbol");try{String(e)}catch{return!1}return!(!i[typeof t.iterator]||!i[typeof t.toPrimitive]||!i[typeof t.toStringTag])}}}),gc=p({"node_modules/es6-symbol/is-symbol.js"(e,t){t.exports=function(e){return!!e&&("symbol"==typeof e||!!e.constructor&&"Symbol"===e.constructor.name&&"Symbol"===e[e.constructor.toStringTag])}}}),gu=p({"node_modules/es6-symbol/validate-symbol.js"(e,t){var r=gc();t.exports=function(e){if(!r(e))throw TypeError(e+" is not a symbol");return e}}}),gh=p({"node_modules/es6-symbol/lib/private/generate-name.js"(e,t){var r=gt(),i=Object.defineProperty,n=Object.prototype,a=(0,Object.create)(null);t.exports=function(e){for(var t,o,s=0;a[e+(s||"")];)++s;return a[e+=s||""]=!0,i(n,t="@@"+e,r.gs(null,function(e){o||(o=!0,i(this,t,r(e)),o=!1)})),t}}}),gd=p({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(e,t){var r=gt(),i=go().Symbol;t.exports=function(e){return Object.defineProperties(e,{hasInstance:r("",i&&i.hasInstance||e("hasInstance")),isConcatSpreadable:r("",i&&i.isConcatSpreadable||e("isConcatSpreadable")),iterator:r("",i&&i.iterator||e("iterator")),match:r("",i&&i.match||e("match")),replace:r("",i&&i.replace||e("replace")),search:r("",i&&i.search||e("search")),species:r("",i&&i.species||e("species")),split:r("",i&&i.split||e("split")),toPrimitive:r("",i&&i.toPrimitive||e("toPrimitive")),toStringTag:r("",i&&i.toStringTag||e("toStringTag")),unscopables:r("",i&&i.unscopables||e("unscopables"))})}}}),gf=p({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(e,t){var r=gt(),i=gu(),n=Object.create(null);t.exports=function(e){return Object.defineProperties(e,{for:r(function(t){return n[t]?n[t]:n[t]=e(String(t))}),keyFor:r(function(e){var t;for(t in i(e),n)if(n[t]===e)return t})})}}}),gp=p({"node_modules/es6-symbol/polyfill.js"(e,t){var r,i,n,a=gt(),o=gu(),s=go().Symbol,l=gh(),c=gd(),u=gf(),h=Object.create,d=Object.defineProperties,f=Object.defineProperty;if("function"==typeof s)try{String(s()),n=!0}catch{}else s=null;i=function(e){if(this instanceof i)throw TypeError("Symbol is not a constructor");return r(e)},t.exports=r=function e(t){if(this instanceof e)throw TypeError("Symbol is not a constructor");return n?s(t):d(h(i.prototype),{__description__:a("",t=void 0===t?"":String(t)),__name__:a("",l(t))})},c(r),u(r),d(i.prototype,{constructor:a(r),toString:a("",function(){return this.__name__})}),d(r.prototype,{toString:a(function(){return"Symbol ("+o(this).__description__+")"}),valueOf:a(function(){return o(this)})}),f(r.prototype,r.toPrimitive,a("",function(){var e=o(this);return"symbol"==typeof e?e:e.toString()})),f(r.prototype,r.toStringTag,a("c","Symbol")),f(i.prototype,r.toStringTag,a("c",r.prototype[r.toStringTag])),f(i.prototype,r.toPrimitive,a("c",r.prototype[r.toPrimitive]))}}),gm=p({"node_modules/es6-symbol/index.js"(e,t){t.exports=gs()()?go().Symbol:gp()}}),gg=p({"node_modules/es5-ext/array/#/clear.js"(e,t){var r=mH();t.exports=function(){return r(this).length=0,this}}}),gy=p({"node_modules/es5-ext/object/valid-callable.js"(e,t){t.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function");return e}}}),gv=p({"node_modules/type/string/coerce.js"(e,t){var r=mX(),i=mK(),n=Object.prototype.toString;t.exports=function(e){if(!r(e))return null;if(i(e)){var t=e.toString;if("function"!=typeof t||t===n)return null}try{return""+e}catch{return null}}}}),gx=p({"node_modules/type/lib/safe-to-string.js"(e,t){t.exports=function(e){try{return e.toString()}catch{try{return String(e)}catch{return null}}}}}),gb=p({"node_modules/type/lib/to-short-string.js"(e,t){var r=gx(),i=/[\n\r\u2028\u2029]/g;t.exports=function(e){var t=r(e);return null===t?"":(t.length>100&&(t=t.slice(0,99)+"…"),t=t.replace(i,function(e){switch(e){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw Error("Unexpected character")}}))}}}),g_=p({"node_modules/type/lib/resolve-error-message.js"(e,t){var r=gv(),i=gb();t.exports=function(e,t,n){n&&n.errorMessage&&(e=r(n.errorMessage));var a=e.indexOf("%v"),o=a>-1?i(t):null;if(n&&n.name){var s,l,c,u,h=e.indexOf("%n");if(h>-1)return a>-1?(h>a?(s=o,c=a,l=n.name,u=h):(s=n.name,c=h,l=o,u=a),e.slice(0,c)+s+e.slice(c+2,u)+l+e.slice(u+2)):e.slice(0,h)+n.name+e.slice(h+2)}return a>-1?e.slice(0,a)+o+e.slice(a+2):e}}}),gw=p({"node_modules/type/lib/resolve-exception.js"(e,t){var r=mX(),i=g_();t.exports=function(e,t,n){if(n&&!r(e)){if("default"in n)return n.default;if(n.isOptional)return null}var a=new(n&&n.Error||TypeError)(i(t,e,n));throw n&&n.errorCode&&(a.code=n.errorCode),a}}}),gT=p({"node_modules/type/value/ensure.js"(e,t){var r=gw(),i=mX();t.exports=function(e){if(i(e))return e;var t=arguments[1];return r(e,t&&t.name?"Expected a value for %n, received %v":"Cannot use %v",t)}}}),gM=p({"node_modules/type/plain-function/ensure.js"(e,t){var r=gw(),i=m0();t.exports=function(e){if(i(e))return e;var t=arguments[1];return r(e,t&&t.name?"Expected a plain function for %n, received %v":"%v is not a plain function",t)}}}),gk=p({"node_modules/es5-ext/array/from/is-implemented.js"(e,t){t.exports=function(){var e,t,r=Array.from;return"function"==typeof r&&!!((t=r(e=["raz","dwa"]))&&t!==e&&"dwa"===t[1])}}}),gA=p({"node_modules/es5-ext/function/is-function.js"(e,t){var r=Object.prototype.toString,i=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);t.exports=function(e){return"function"==typeof e&&i(r.call(e))}}}),gS=p({"node_modules/es5-ext/math/sign/is-implemented.js"(e,t){t.exports=function(){var e=Math.sign;return"function"==typeof e&&1===e(10)&&-1===e(-20)}}}),gE=p({"node_modules/es5-ext/math/sign/shim.js"(e,t){t.exports=function(e){return isNaN(e=Number(e))||0===e?e:e>0?1:-1}}}),gC=p({"node_modules/es5-ext/math/sign/index.js"(e,t){t.exports=gS()()?Math.sign:gE()}}),gL=p({"node_modules/es5-ext/number/to-integer.js"(e,t){var r=gC(),i=Math.abs,n=Math.floor;t.exports=function(e){return isNaN(e)?0:0!==(e=Number(e))&&isFinite(e)?r(e)*n(i(e)):e}}}),gP=p({"node_modules/es5-ext/number/to-pos-integer.js"(e,t){var r=gL(),i=Math.max;t.exports=function(e){return i(0,r(e))}}}),gI=p({"node_modules/es5-ext/array/from/shim.js"(e,t){var r=gm().iterator,i=gr(),n=gA(),a=gP(),o=gy(),s=mH(),l=mU(),c=gi(),u=Array.isArray,h=Function.prototype.call,d={configurable:!0,enumerable:!0,writable:!0,value:null},f=Object.defineProperty;t.exports=function(e){var t,p,m,g,y,v,x,b,_,w,T=arguments[1],M=arguments[2];if(e=Object(s(e)),l(T)&&o(T),this&&this!==Array&&n(this))t=this;else{if(!T){if(i(e))return 1!==(y=e.length)?Array.apply(null,e):((g=[,])[0]=e[0],g);if(u(e)){for(g=Array(y=e.length),p=0;p=55296&&v<=56319&&(w+=e[++p]),w=T?h.call(T,M,w,m):w,t?(d.value=w,f(g,m,d)):g[m]=w,++m;y=m}}if(void 0===y)for(y=a(e.length),t&&(g=new t(y)),p=0;p=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__)return void u(this,"__redo__",s("c",[e]));this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:s(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(t=this.__redo__.indexOf(e))&&this.__redo__.splice(t,1),this.__redo__.forEach(function(t,r){t>e&&(this.__redo__[r]=--t)},this)))}),_onClear:s(function(){this.__redo__&&i.call(this.__redo__),this.__nextIndex__=0})}))),u(r.prototype,c.iterator,s(function(){return this}))}}),gN=p({"node_modules/es6-iterator/array.js"(e,t){var r,i=mY(),n=ge(),a=gt(),o=gm(),s=gB(),l=Object.defineProperty;r=t.exports=function(e,t){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");s.call(this,e),l(this,"__kind__",a("",t=t?n.call(t,"key+value")?"key+value":n.call(t,"key")?"key":"value":"value"))},i&&i(r,s),delete r.prototype.constructor,r.prototype=Object.create(s.prototype,{_resolve:a(function(e){return"value"===this.__kind__?this.__list__[e]:"key+value"===this.__kind__?[e,this.__list__[e]]:e})}),l(r.prototype,o.toStringTag,a("c","Array Iterator"))}}),gU=p({"node_modules/es6-iterator/string.js"(e,t){var r,i=mY(),n=gt(),a=gm(),o=gB(),s=Object.defineProperty;r=t.exports=function(e){if(!(this instanceof r))throw TypeError("Constructor requires 'new'");e=String(e),o.call(this,e),s(this,"__length__",n("",e.length))},i&&i(r,o),delete r.prototype.constructor,r.prototype=Object.create(o.prototype,{_next:n(function(){if(this.__list__){if(this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r})}),s(r.prototype,a.toStringTag,n("c","String Iterator"))}}),gV=p({"node_modules/es6-iterator/is-iterable.js"(e,t){var r=gr(),i=mU(),n=gi(),a=gm().iterator,o=Array.isArray;t.exports=function(e){return!!i(e)&&(!!(o(e)||n(e)||r(e))||"function"==typeof e[a])}}}),gq=p({"node_modules/es6-iterator/valid-iterable.js"(e,t){var r=gV();t.exports=function(e){if(!r(e))throw TypeError(e+" is not iterable");return e}}}),gH=p({"node_modules/es6-iterator/get.js"(e,t){var r=gr(),i=gi(),n=gN(),a=gU(),o=gq(),s=gm().iterator;t.exports=function(e){return"function"==typeof o(e)[s]?e[s]():r(e)?new n(e):i(e)?new a(e):new n(e)}}}),gG=p({"node_modules/es6-iterator/for-of.js"(e,t){var r=gr(),i=gy(),n=gi(),a=gH(),o=Array.isArray,s=Function.prototype.call,l=Array.prototype.some;t.exports=function(e,t){var c,u,h,d,f,p,m,g,y=arguments[2];if(o(e)||r(e)?c="array":n(e)?c="string":e=a(e),i(t),h=function(){d=!0},"array"===c)return void l.call(e,function(e){return s.call(t,y,e,h),d});if("string"===c){for(p=e.length,f=0;f=55296&&g<=56319&&(m+=e[++f]),s.call(t,y,m,h),!d);++f);return}for(u=e.next();!u.done;){if(s.call(t,y,u.value,h),d)return;u=e.next()}}}}),gW=p({"node_modules/es6-weak-map/is-native-implemented.js"(e,t){t.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)}}),gY=p({"node_modules/es6-weak-map/polyfill.js"(e,t){var r,i=mU(),n=mY(),a=mZ(),o=mH(),s=m$(),l=gt(),c=gH(),u=gG(),h=gm().toStringTag,d=gW(),f=Array.isArray,p=Object.defineProperty,m=Object.prototype.hasOwnProperty,g=Object.getPrototypeOf;t.exports=r=function(){var e,t=arguments[0];if(!(this instanceof r))throw TypeError("Constructor requires 'new'");return e=d&&n&&WeakMap!==r?n(new WeakMap,g(this)):this,i(t)&&(f(t)||(t=c(t))),p(e,"__weakMapData__",l("c","$weakMap$"+s())),t&&u(t,function(t){o(t),e.set(t[0],t[1])}),e},d&&(n&&n(r,WeakMap),r.prototype=Object.create(WeakMap.prototype,{constructor:l(r)})),Object.defineProperties(r.prototype,{delete:l(function(e){return!!m.call(a(e),this.__weakMapData__)&&(delete e[this.__weakMapData__],!0)}),get:l(function(e){if(m.call(a(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:l(function(e){return m.call(a(e),this.__weakMapData__)}),set:l(function(e,t){return p(a(e),this.__weakMapData__,l("c",t)),this}),toString:l(function(){return"[object WeakMap]"})}),p(r.prototype,h,l("c","WeakMap"))}}),gZ=p({"node_modules/es6-weak-map/index.js"(e,t){t.exports=mB()()?WeakMap:gY()}}),g$=p({"node_modules/array-find-index/index.js"(e,t){t.exports=function(e,t,r){if("function"==typeof Array.prototype.findIndex)return e.findIndex(t,r);if("function"!=typeof t)throw TypeError("predicate must be a function");var i=Object(e),n=i.length;if(0===n)return -1;for(var a=0;a 0. && baClipping < length(normalWidth * endBotJoin)) { + //handle miter clipping + bTopCoord -= normalWidth * endTopJoin; + bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; + } + + if (nextReverse) { + //make join rectangular + vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; + float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); + bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; + bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; + } + else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { + //handle miter clipping + aBotCoord -= normalWidth * startBotJoin; + aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; + } + + vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; + vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; + + vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; + vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; + + //position is normalized 0..1 coord on the screen + vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; + + startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; + endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2.0 - 1.0, depth, 1); + + enableStartMiter = step(dot(currTangent, prevTangent), .5); + enableEndMiter = step(dot(currTangent, nextTangent), .5); + + //bevel miter cutoffs + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } + + //round miter cutoffs + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; + startCutoff = vec4(aCoord, aCoord); + startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; + startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + startCutoff += viewport.xyxy; + startCutoff += startMiterWidth.xyxy; + } + + if (enableEndMiter == 1.) { + vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; + endCutoff = vec4(bCoord, bCoord); + endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; + endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; + endCutoff += viewport.xyxy; + endCutoff += endMiterWidth.xyxy; + } + } +} +`,x=` +precision highp float; + +uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; +uniform sampler2D dashTexture; + +varying vec4 fragColor; +varying vec2 tangent; +varying vec4 startCutoff, endCutoff; +varying vec2 startCoord, endCoord; +varying float enableStartMiter, enableEndMiter; + +float distToLine(vec2 p, vec2 a, vec2 b) { + vec2 diff = b - a; + vec2 perp = normalize(vec2(-diff.y, diff.x)); + return dot(p - a, perp); +} + +void main() { + float alpha = 1., distToStart, distToEnd; + float cutoff = thickness * .5; + + //bevel miter + if (miterMode == 1.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < -1.) { + discard; + return; + } + alpha *= min(max(distToStart + 1., 0.), 1.); + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < -1.) { + discard; + return; + } + alpha *= min(max(distToEnd + 1., 0.), 1.); + } + } + + // round miter + else if (miterMode == 2.) { + if (enableStartMiter == 1.) { + distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); + if (distToStart < 0.) { + float radius = length(gl_FragCoord.xy - startCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + + if (enableEndMiter == 1.) { + distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); + if (distToEnd < 0.) { + float radius = length(gl_FragCoord.xy - endCoord); + + if(radius > cutoff + .5) { + discard; + return; + } + + alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); + } + } + } + + float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; + float dash = texture2D(dashTexture, vec2(t, .5)).r; + + gl_FragColor = fragColor; + gl_FragColor.a *= alpha * opacity * dash; +} +`;function b(e,t){if(!(this instanceof b))return new b(e,t);if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=b.shaders.has(e)?b.shaders.get(e):b.shaders.set(e,b.createShaders(e)).get(e),this.update(t)}t.exports=b,b.dashMult=2,b.maxPatternLength=256,b.precisionThreshold=3e6,b.maxPoints=1e4,b.maxLines=2048,b.shaders=new h,b.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(e,t)=>"round"===t.join?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(e,t)=>!t.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},i=e(n({vert:p,frag:m,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),a;try{a=e(n({cull:{enable:!0,face:"back"},vert:v,frag:x,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch{a=i}return{fill:e({primitive:"triangle",elements:(e,t)=>t.triangles,offset:0,vert:g,frag:y,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:i,miter:a}},b.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},b.prototype.render=function(...e){e.length&&this.update(...e),this.draw()},b.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((e,t)=>{if(e&&Array.isArray(e))return this.draw(...e);"number"==typeof e&&(e=this.passes[e]),e&&e.count>1&&e.opacity&&(this.regl._refresh(),e.fill&&e.triangles&&e.triangles.length>2&&this.shaders.fill(e),e.thickness&&(e.scale[0]*e.viewport.width>b.precisionThreshold||e.scale[1]*e.viewport.height>b.precisionThreshold||"rect"===e.join||!e.join&&(e.thickness<=2||e.count>=b.maxPoints)?this.shaders.rect(e):this.shaders.miter(e)))}),this},b.prototype.update=function(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:h}=this;if(e.forEach((e,p)=>{let m=this.passes[p];if(void 0!==e){if(null===e){this.passes[p]=null;return}if("number"==typeof e[0]&&(e={positions:e}),e=a(e,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),m||(this.passes[p]=m={id:p,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},e=n({},b.defaults,e)),null!=e.thickness&&(m.thickness=parseFloat(e.thickness)),null!=e.opacity&&(m.opacity=parseFloat(e.opacity)),null!=e.miterLimit&&(m.miterLimit=parseFloat(e.miterLimit)),null!=e.overlay&&(m.overlay=!!e.overlay,pe-t),t=[],n=0,a=null!=m.hole?m.hole[0]:null;if(null!=a){let t=f(e,e=>e>=a);(e=e.slice(0,t)).push(a)}for(let i=0;it-a+(e[i]-n)));o=o.map(t=>t+n+(t+n{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}}}),gK=p({"node_modules/regl-error2d/index.js"(e,t){var r=p7(),i=mL(),n=mz(),a=p6(),o=mR(),s=mt(),{float32:l,fract32:c}=mD();t.exports=function(e,t){if("function"==typeof e?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),!(e=t.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let h=e._gl,d,f,p,m,g,y,v={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},x=[];return m=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),g=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),y=e.buffer({usage:"static",type:"float",data:u}),T(t),d=e({vert:` + precision highp float; + + attribute vec2 position, positionFract; + attribute vec4 error; + attribute vec4 color; + + attribute vec2 direction, lineOffset, capOffset; + + uniform vec4 viewport; + uniform float lineWidth, capSize; + uniform vec2 scale, scaleFract, translate, translateFract; + + varying vec4 fragColor; + + void main() { + fragColor = color / 255.; + + vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; + + vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; + + vec2 position = position + dxy; + + vec2 pos = (position + translate) * scale + + (positionFract + translateFract) * scale + + (position + translate) * scaleFract + + (positionFract + translateFract) * scaleFract; + + pos += pixelOffset / viewport.zw; + + gl_Position = vec4(pos * 2. - 1., 0, 1); + } + `,frag:` + precision highp float; + + varying vec4 fragColor; + + uniform float opacity; + + void main() { + gl_FragColor = fragColor; + gl_FragColor.a *= opacity; + } + `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(e,t)=>[t.viewport.x,t.viewport.y,e.viewportWidth,e.viewportHeight]},attributes:{color:{buffer:m,offset:(e,t)=>4*t.offset,divisor:1},position:{buffer:f,offset:(e,t)=>8*t.offset,divisor:1},positionFract:{buffer:p,offset:(e,t)=>8*t.offset,divisor:1},error:{buffer:g,offset:(e,t)=>16*t.offset,divisor:1},direction:{buffer:y,stride:24,offset:0},lineOffset:{buffer:y,stride:24,offset:8},capOffset:{buffer:y,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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:u.length}),o(b,{update:T,draw:_,destroy:M,regl:e,gl:h,canvas:h.canvas,groups:x}),b;function b(e){e?T(e):null===e&&M(),_()}function _(t){if("number"==typeof t)return w(t);t&&!Array.isArray(t)&&(t=[t]),e._refresh(),x.forEach((e,r)=>{if(e){if(t&&(t[r]?e.draw=!0:e.draw=!1),!e.draw){e.draw=!0;return}w(r)}})}function w(e){"number"==typeof e&&(e=x[e]),null!=e&&e&&e.count&&e.color&&e.opacity&&e.positions&&e.positions.length>1&&(e.scaleRatio=[e.scale[0]*e.viewport.width,e.scale[1]*e.viewport.height],d(e),e.after&&e.after(e))}function T(e){if(!e)return;null!=e.length?"number"==typeof e[0]&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let t=0,u=0;if(b.groups=x=e.map((e,l)=>{let d=x[l];return e&&("function"==typeof e?e={after:e}:"number"==typeof e[0]&&(e={positions:e}),e=a(e,{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"}),d||(x[l]=d={id:l,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},e=o({},v,e)),n(d,e,[{lineWidth:e=>.5*e,capSize:e=>.5*e,opacity:parseFloat,errors:e=>(e=s(e),u+=e.length,e),positions:(e,i)=>(i.count=Math.floor((e=s(e,"float64")).length/2),i.bounds=r(e,2),i.offset=t,t+=i.count,e)},{color:(e,t)=>{let r=t.count;if(e||(e="transparent"),!Array.isArray(e)||"number"==typeof e[0]){let t=e;e=Array(r);for(let i=0;i{let i=t.bounds;return e||(e=i),t.scale=[1/(e[2]-e[0]),1/(e[3]-e[1])],t.translate=[-e[0],-e[1]],t.scaleFract=c(t.scale),t.translateFract=c(t.translate),e},viewport:e=>{let t;return Array.isArray(e)?t={x:e[0],y:e[1],width:e[2]-e[0],height:e[3]-e[1]}:e?(t={x:e.x||e.left||0,y:e.y||e.top||0},e.right?t.width=e.right-t.x:t.width=e.w||e.width||0,e.bottom?t.height=e.bottom-t.y:t.height=e.h||e.height||0):t={x:0,y:0,width:h.drawingBufferWidth,height:h.drawingBufferHeight},t}}])),d}),t||u){let e=x.reduce((e,t,r)=>e+(t?t.count:0),0),t=new Float64Array(2*e),r=new Uint8Array(4*e),i=new Float32Array(4*e);x.forEach((e,n)=>{if(!e)return;let{positions:a,count:o,offset:s,color:l,errors:c}=e;o&&(r.set(l,4*s),i.set(c,4*s),t.set(a,2*s))});var d=l(t);f(d),p(c(t,d)),m(r),g(i)}}function M(){f.destroy(),p.destroy(),m.destroy(),g.destroy(),y.destroy()}};var u=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]]}}),gJ=p({"node_modules/unquote/index.js"(e,t){var r=/[\'\"]/;t.exports=function(e){return e?(r.test(e.charAt(0))&&(e=e.substr(1)),r.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}}}),gQ=p({"node_modules/css-global-keywords/index.json"(e,t){t.exports=["inherit","initial","unset"]}}),g0=p({"node_modules/css-system-font-keywords/index.json"(e,t){t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),g1=p({"node_modules/css-font-weight-keywords/index.json"(e,t){t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),g2=p({"node_modules/css-font-style-keywords/index.json"(e,t){t.exports=["normal","italic","oblique"]}}),g3=p({"node_modules/css-font-stretch-keywords/index.json"(e,t){t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),g5=p({"node_modules/parenthesis/index.js"(e,t){function r(e,t){if("string"!=typeof e)return[e];var r=[e];"string"==typeof t||Array.isArray(t)?t={brackets:t}:t||(t={});var i=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],n=t.escape||"___",a=!!t.flat;i.forEach(function(e){var t=new RegExp(["\\",e[0],"[^\\",e[0],"\\",e[1],"]*\\",e[1]].join("")),i=[];function a(t,a,o){var s=r.push(t.slice(e[0].length,-e[1].length))-1;return i.push(s),n+s+n}r.forEach(function(e,i){for(var n,o=0;e!=n;)if(n=e,e=e.replace(t,a),o++>1e4)throw Error("References have circular dependency. Please, check them.");r[i]=e}),i=i.reverse(),r=r.map(function(t){return i.forEach(function(r){t=t.replace(RegExp("(\\"+n+r+"\\"+n+")","g"),e[0]+"$1"+e[1])}),t})});var o=RegExp("\\"+n+"([0-9]+)\\"+n);return a?r:function e(t,r,i){for(var n,a=[],s=0;n=o.exec(t);){if(s++>1e4)throw Error("Circular references in parenthesis");a.push(t.slice(0,n.index)),a.push(e(r[n[1]],r)),t=t.slice(n.index+n[0].length)}return a.push(t),a}(r[0],r)}function i(e,t){if(t&&t.flat){var r,i=t&&t.escape||"___",n=e[0];if(!n)return"";for(var a=RegExp("\\"+i+"([0-9]+)\\"+i),o=0;n!=r;){if(o++>1e4)throw Error("Circular references in "+e);r=n,n=n.replace(a,s)}return n}return e.reduce(function e(t,r){return Array.isArray(r)&&(r=r.reduce(e,"")),t+r},"");function s(t,r){if(null==e[r])throw Error("Reference "+r+"is undefined");return e[r]}}function n(e,t){return Array.isArray(e)?i(e,t):r(e,t)}n.parse=r,n.stringify=i,t.exports=n}}),g4=p({"node_modules/string-split-by/index.js"(e,t){var r=g5();t.exports=function(e,t,i){if(null==e)throw Error("First argument should be a string");if(null==t)throw Error("Separator should be a string or a RegExp");i?("string"==typeof i||Array.isArray(i))&&(i={ignore:i}):i={},null==i.escape&&(i.escape=!0),null==i.ignore?i.ignore=["[]","()","{}","<>",'""',"''","``","“”","\xab\xbb"]:("string"==typeof i.ignore&&(i.ignore=[i.ignore]),i.ignore=i.ignore.map(function(e){return 1===e.length&&(e+=e),e}));var n=r.parse(e,{flat:!0,brackets:i.ignore}),a=n[0].split(t);if(i.escape){for(var o=[],s=0;s1&&r===n&&('"'===r||"'"===r))return['"'+i(t.substr(1,t.length-2))+'"'];var a=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(t);if(a)return e(t.substr(0,a.index)).concat(e(a[1])).concat(e(t.substr(a.index+a[0].length)));var o=t.split(".");if(1===o.length)return['"'+i(t)+'"'];for(var s=[],l=0;ltypeof performance&&performance.now?function(){return performance.now()}:function(){return+new Date};function c(e){return"string"==typeof e?e.split():e}function u(e){return"string"==typeof e?document.querySelector(e):e}function h(e,t){for(var r=Array(e),i=0;i65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1}function f(){var e=h(8,function(){return[]});function t(t){var r=function(e){for(var t=16;t<=0x10000000;t*=16)if(e<=t)return t;return 0}(t),i=e[d(r)>>2];return i.length>0?i.pop():new ArrayBuffer(r)}function r(t){e[d(t.byteLength)>>2].push(t)}return{alloc:t,free:r,allocType:function(e,r){var i=null;switch(e){case 5120:i=new Int8Array(t(r),0,r);break;case 5121:i=new Uint8Array(t(r),0,r);break;case 5122:i=new Int16Array(t(2*r),0,r);break;case 5123:i=new Uint16Array(t(2*r),0,r);break;case 5124:i=new Int32Array(t(4*r),0,r);break;case 5125:i=new Uint32Array(t(4*r),0,r);break;case 5126:i=new Float32Array(t(4*r),0,r);break;default:return null}return i.length!==r?i.subarray(0,r):i},freeType:function(e){r(e.buffer)}}}var p=f();p.zero=f();var m=function(e,t){var r=1;t.ext_texture_filter_anisotropic&&(r=e.getParameter(34047));var i=1,n=1;t.webgl_draw_buffers&&(i=e.getParameter(34852),n=e.getParameter(36063));var a=!!t.oes_texture_float;if(a){var o=e.createTexture();e.bindTexture(3553,o),e.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var s=e.createFramebuffer();if(e.bindFramebuffer(36160,s),e.framebufferTexture2D(36160,36064,3553,o,0),e.bindTexture(3553,null),36053!==e.checkFramebufferStatus(36160))a=!1;else{e.viewport(0,0,1,1),e.clearColor(1,0,0,1),e.clear(16384);var l=p.allocType(5126,4);e.readPixels(0,0,1,1,6408,5126,l),e.getError()?a=!1:(e.deleteFramebuffer(s),e.deleteTexture(o),a=1===l[0]),p.freeType(l)}}var c="u">typeof navigator&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),u=!0;if(!c){var h=e.createTexture(),d=p.allocType(5121,36);e.activeTexture(33984),e.bindTexture(34067,h),e.texImage2D(34069,0,6408,3,3,0,6408,5121,d),p.freeType(d),e.bindTexture(34067,null),e.deleteTexture(h),u=!e.getError()}return{colorBits:[e.getParameter(3410),e.getParameter(3411),e.getParameter(3412),e.getParameter(3413)],depthBits:e.getParameter(3414),stencilBits:e.getParameter(3415),subpixelBits:e.getParameter(3408),extensions:Object.keys(t).filter(function(e){return!!t[e]}),maxAnisotropic:r,maxDrawbuffers:i,maxColorAttachments:n,pointSizeDims:e.getParameter(33901),lineWidthDims:e.getParameter(33902),maxViewportDims:e.getParameter(3386),maxCombinedTextureUnits:e.getParameter(35661),maxCubeMapSize:e.getParameter(34076),maxRenderbufferSize:e.getParameter(34024),maxTextureUnits:e.getParameter(34930),maxTextureSize:e.getParameter(3379),maxAttributes:e.getParameter(34921),maxVertexUniforms:e.getParameter(36347),maxVertexTextureUnits:e.getParameter(35660),maxVaryingVectors:e.getParameter(36348),maxFragmentUniforms:e.getParameter(36349),glsl:e.getParameter(35724),renderer:e.getParameter(7937),vendor:e.getParameter(7936),version:e.getParameter(7938),readFloat:a,npotTextureCube:u}},g=function(e){return e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Uint32Array||e instanceof Int8Array||e instanceof Int16Array||e instanceof Int32Array||e instanceof Float32Array||e instanceof Float64Array||e instanceof Uint8ClampedArray};function y(e){return!!e&&"object"==typeof e&&Array.isArray(e.shape)&&Array.isArray(e.stride)&&"number"==typeof e.offset&&e.shape.length===e.stride.length&&(Array.isArray(e.data)||g(e.data))}var v=function(e){return Object.keys(e).map(function(t){return e[t]})},x=function(e){for(var t=[],r=e;r.length;r=r[0])t.push(r.length);return t},b=function(e,t,r,i){var n=1;if(t.length)for(var a=0;a>>31<<15,a=(i<<1>>>24)-127,o=i>>13&1023;if(a<-24)t[r]=n;else if(a<-14){var s=-14-a;t[r]=n+(o+1024>>s)}else a>15?t[r]=n+31744:t[r]=n+(a+15<<10)+o}return t}function z(e){return Array.isArray(e)||g(e)}var D=[9984,9986,9985,9987],O=[0,6409,6410,6407,6408],R={};function F(e){return"[object "+e+"]"}R[6409]=R[6406]=R[6402]=1,R[34041]=R[6410]=2,R[6407]=R[35904]=3,R[6408]=R[35906]=4;var j=F("HTMLCanvasElement"),B=F("OffscreenCanvas"),N=F("CanvasRenderingContext2D"),U=F("ImageBitmap"),V=F("HTMLImageElement"),q=F("HTMLVideoElement"),H=Object.keys(w).concat([j,B,N,U,V,q]),G=[];G[5121]=1,G[5126]=4,G[36193]=2,G[5123]=2,G[5125]=4;var W=[];function Y(e){return Array.isArray(e)&&(0===e.length||"number"==typeof e[0])}function Z(e){return!!Array.isArray(e)&&!(0===e.length||!z(e[0]))}function $(e){return Object.prototype.toString.call(e)}function X(e){if(!e)return!1;var t=$(e);return H.indexOf(t)>=0||Y(e)||Z(e)||y(e)}function K(e){return 0|w[Object.prototype.toString.call(e)]}function J(e,t){return p.allocType(36193===e.type?5126:e.type,t)}function Q(e,t){36193===e.type?(e.data=I(t),p.freeType(t)):e.data=t}function ee(e,t,r,i,n,a){var o;if(o="u">typeof W[e]?W[e]:R[e]*G[t],a&&(o*=6),!n)return o*r*i;for(var s=0,l=r;l>=1;)s+=o*l*l,l/=2;return s}W[32854]=2,W[32855]=2,W[36194]=2,W[34041]=4,W[33776]=.5,W[33777]=.5,W[33778]=1,W[33779]=1,W[35986]=.5,W[35987]=1,W[34798]=1,W[35840]=.5,W[35841]=.25,W[35842]=.5,W[35843]=.25,W[36196]=.5;var et=[];et[32854]=2,et[32855]=2,et[36194]=2,et[33189]=2,et[36168]=1,et[34041]=4,et[35907]=4,et[34836]=16,et[34842]=8,et[34843]=6;var er=function(e,t,r,i,n){var a={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};t.ext_srgb&&(a.srgba=35907),t.ext_color_buffer_half_float&&(a.rgba16f=34842,a.rgb16f=34843),t.webgl_color_buffer_float&&(a.rgba32f=34836);var o=[];Object.keys(a).forEach(function(e){o[a[e]]=e});var s=0,l={};function c(e){this.id=s++,this.refCount=1,this.renderbuffer=e,this.format=32854,this.width=0,this.height=0,n.profile&&(this.stats={size:0})}function u(t){var r=t.renderbuffer;e.bindRenderbuffer(36161,null),e.deleteRenderbuffer(r),t.renderbuffer=null,t.refCount=0,delete l[t.id],i.renderbufferCount--}return c.prototype.decRef=function(){--this.refCount<=0&&u(this)},n.profile&&(i.getTotalRenderbufferSize=function(){var e=0;return Object.keys(l).forEach(function(t){e+=l[t].stats.size}),e}),{create:function(t,r){var s=new c(e.createRenderbuffer());function u(t,r){var i,l,c,h=0,d=0,f=32854;if("object"==typeof t&&t){if("shape"in t){var p=t.shape;h=0|p[0],d=0|p[1]}else"radius"in t&&(h=d=0|t.radius),"width"in t&&(h=0|t.width),"height"in t&&(d=0|t.height);"format"in t&&(f=a[t.format])}else"number"==typeof t?(h=0|t,d="number"==typeof r?0|r:h):t||(h=d=1);if(h!==s.width||d!==s.height||f!==s.format)return u.width=s.width=h,u.height=s.height=d,s.format=f,e.bindRenderbuffer(36161,s.renderbuffer),e.renderbufferStorage(36161,f,h,d),n.profile&&(s.stats.size=(i=s.format,l=s.width,c=s.height,et[i]*l*c)),u.format=o[s.format],u}return l[s.id]=s,i.renderbufferCount++,u(t,r),u.resize=function(t,r){var i,a,o,l=0|t,c=0|r||l;return l===s.width&&c===s.height||(u.width=s.width=l,u.height=s.height=c,e.bindRenderbuffer(36161,s.renderbuffer),e.renderbufferStorage(36161,s.format,l,c),n.profile&&(s.stats.size=(i=s.format,a=s.width,o=s.height,et[i]*a*o))),u},u._reglType="renderbuffer",u._renderbuffer=s,n.profile&&(u.stats=s.stats),u.destroy=function(){s.decRef()},u},clear:function(){v(l).forEach(u)},restore:function(){v(l).forEach(function(t){t.renderbuffer=e.createRenderbuffer(),e.bindRenderbuffer(36161,t.renderbuffer),e.renderbufferStorage(36161,t.format,t.width,t.height)}),e.bindRenderbuffer(36161,null)}}},ei=[];ei[6408]=4,ei[6407]=3;var en=[];function ea(){this.state=0,this.x=0,this.y=0,this.z=0,this.w=0,this.buffer=null,this.size=0,this.normalized=!1,this.type=5126,this.offset=0,this.stride=0,this.divisor=0}function eo(e,t){return e>>>t|e<<32-t}en[5121]=1,en[5126]=4,en[36193]=2;var es=[0x428a2f98,0x71374491,-0x4a3f0431,-0x164a245b,0x3956c25b,0x59f111f1,-0x6dc07d5c,-0x54e3a12b,-0x27f85568,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,-0x7f214e02,-0x6423f959,-0x3e640e8c,-0x1b64963f,-0x1041b87a,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,-0x67c1aeae,-0x57ce3993,-0x4ffcd838,-0x40a68039,-0x391ff40d,-0x2a586eb9,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,-0x7e3d36d2,-0x6d8dd37b,-0x5d40175f,-0x57e599b5,-0x3db47490,-0x3893ae5d,-0x2e6d17e7,-0x2966f9dc,-0xbf1ca7b,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,-0x7b3787ec,-0x7338fdf8,-0x6f410006,-0x5baf9315,-0x41065c09,-0x398e870e];function el(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function ec(e){return Array.prototype.slice.call(e)}function eu(e){return ec(e).join("")}var eh="xyzw".split(""),ed="dither",ef="blend.enable",ep="blend.color",em="blend.equation",eg="blend.func",ey="depth.enable",ev="depth.func",ex="depth.range",eb="depth.mask",e_="colorMask",ew="cull.enable",eT="cull.face",eM="frontFace",ek="lineWidth",eA="polygonOffset.enable",eS="polygonOffset.offset",eE="sample.alpha",eC="sample.enable",eL="sample.coverage",eP="stencil.enable",eI="stencil.mask",ez="stencil.func",eD="stencil.opFront",eO="stencil.opBack",eR="scissor.enable",eF="scissor.box",ej="viewport",eB="profile",eN="framebuffer",eU="vert",eV="frag",eq="elements",eH="primitive",eG="count",eW="offset",eY="instances",eZ="Width",e$="Height",eX=eN+eZ,eK=eN+e$,eJ=ej+eZ,eQ=ej+e$,e0="drawingBuffer",e1=e0+eZ,e2=e0+e$,e3=[eg,em,ez,eD,eO,eL,ej,eF,eS],e5={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},e4={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},e6={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},e8={cw:2304,ccw:2305};function e7(e){return Array.isArray(e)||g(e)||y(e)}function e9(e){return e.sort(function(e,t){return e===ej?-1:t===ej?1:e=1,i>=2,t)}if(4===r){var n=e.data;return new te(n.thisDep,n.contextDep,n.propDep,t)}if(5===r)return new te(!1,!1,!1,t);if(6!==r)return new te(3===r,2===r,1===r,t);for(var a=!1,o=!1,s=!1,l=0;l=1&&(o=!0),u>=2&&(s=!0)}else 4===c.type&&(a=a||c.data.thisDep,o=o||c.data.contextDep,s=s||c.data.propDep)}return new te(a,o,s,t)}var tn=new te(!1,!1,!1,function(){}),ta=function(e,t){if(!t.ext_disjoint_timer_query)return null;var r=[],i=[];function n(){this.startQueryIndex=-1,this.endQueryIndex=-1,this.sum=0,this.stats=null}var a=[],o=[];function s(e,t,r){var i=a.pop()||new n;i.startQueryIndex=e,i.endQueryIndex=t,i.sum=0,i.stats=r,o.push(i)}var l=[],c=[];return{beginQuery:function(e){var n=r.pop()||t.ext_disjoint_timer_query.createQueryEXT();t.ext_disjoint_timer_query.beginQueryEXT(35007,n),i.push(n),s(i.length-1,i.length,e)},endQuery:function(){t.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:s,update:function(){var e,n,s=i.length;if(0!==s){c.length=Math.max(c.length,s+1),l.length=Math.max(l.length,s+1),l[0]=0,c[0]=0;var u=0;for(e=0,n=0;n"u"?1:window.devicePixelRatio,f=!1,p={},m=function(e){},g=function(){};if("string"==typeof o?r=document.querySelector(o):"object"==typeof o&&("string"==typeof o.nodeName&&"function"==typeof o.appendChild&&"function"==typeof o.getBoundingClientRect?r=o:"function"==typeof o.drawArrays||"function"==typeof o.drawElements?n=(a=o).canvas:("gl"in o?a=o.gl:"canvas"in o?n=u(o.canvas):"container"in o&&(i=u(o.container)),"attributes"in o&&(s=o.attributes),"extensions"in o&&(l=c(o.extensions)),"optionalExtensions"in o&&(h=c(o.optionalExtensions)),"onDone"in o&&(m=o.onDone),"profile"in o&&(f=!!o.profile),"pixelRatio"in o&&(d=+o.pixelRatio),"cachedCode"in o&&(p=o.cachedCode))),r&&("canvas"===r.nodeName.toLowerCase()?n=r:i=r),!a){if(!n){var y=function(t,r){var i,n=document.createElement("canvas");function a(){var e=window.innerWidth,i=window.innerHeight;if(t!==document.body){var a=n.getBoundingClientRect();e=a.right-a.left,i=a.bottom-a.top}n.width=r*e,n.height=r*i}return e(n.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),t.appendChild(n),t===document.body&&(n.style.position="absolute",e(t.style,{margin:0,padding:0})),t!==document.body&&"function"==typeof ResizeObserver?(i=new ResizeObserver(function(){setTimeout(a)})).observe(t):window.addEventListener("resize",a,!1),a(),{canvas:n,onDestroy:function(){i?i.disconnect():window.removeEventListener("resize",a),t.removeChild(n)}}}(i||document.body,d);if(!y)return null;n=y.canvas,g=y.onDestroy}void 0===s.premultipliedAlpha&&(s.premultipliedAlpha=!0),a=function(e,t){function r(r){try{return e.getContext(r,t)}catch{return null}}return r("webgl")||r("experimental-webgl")||r("webgl-experimental")}(n,s)}return a?{gl:a,canvas:n,container:i,extensions:l,optionalExtensions:h,pixelRatio:d,profile:f,cachedCode:p,onDone:m,onDestroy:g}:(g(),m("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(t);if(!f)return null;var _=f.gl,w=_.getContextAttributes(),L=(_.isContextLost(),function(e,t){var r={};function i(t){var i,n=t.toLowerCase();try{i=r[n]=e.getExtension(n)}catch{}return!!i}for(var n=0;n0)if(Array.isArray(t[0])){o=x(t);for(var o,s,c=1,u=1;u0){if("number"==typeof e[0]){var n=p.allocType(h.dtype,e.length);S(n,e),f(n,i),p.freeType(n)}else if(Array.isArray(e[0])||g(e[0])){r=x(e);var a=b(e,r,h.dtype);f(a,i),p.freeType(a)}}}else if(y(e)){r=e.shape;var o=e.stride,s=0,l=0,c=0,u=0;1===r.length?(s=r[0],l=1,c=o[0],u=0):2===r.length&&(s=r[0],l=r[1],c=o[0],u=o[1]);var m=Array.isArray(e.data)?h.dtype:A(e.data),v=p.allocType(m,s*l);E(v,e.data,s,l,c,u,e.offset),f(v,i),p.freeType(v)}return d},r.profile&&(d.stats=h.stats),d.destroy=function(){u(h)},d},createStream:function(e,t){var r=s.pop();return r||(r=new o(e)),r.bind(),c(r,t,35040,0,1,!1),r},destroyStream:function(e){s.push(e)},clear:function(){v(a).forEach(u),s.forEach(u)},getBuffer:function(e){return e&&e._buffer instanceof o?e._buffer:null},restore:function(){v(a).forEach(function(t){t.buffer=e.createBuffer(),e.bindBuffer(t.type,t.buffer),e.bufferData(t.type,t.persistentData||t.byteLength,t.usage)})},_initBuffer:c}}(_,F,f,function(e){return tf.destroyBuffer(e)}),td=function(e,t,r,i){var n={},a=0,o={uint8:5121,uint16:5123};function s(e){this.id=a++,n[this.id]=this,this.buffer=e,this.primType=4,this.vertCount=0,this.type=0}t.oes_element_index_uint&&(o.uint32=5125),s.prototype.bind=function(){this.buffer.bind()};var l=[];function c(i,n,a,o,s,l,c){if(i.buffer.bind(),n){var u,h=c;!c&&(!g(n)||y(n)&&!g(n.data))&&(h=t.oes_element_index_uint?5125:5123),r._initBuffer(i.buffer,n,a,h,3)}else e.bufferData(34963,l,a),i.buffer.dtype=u||5121,i.buffer.usage=a,i.buffer.dimension=3,i.buffer.byteLength=l;if(u=c,!c){switch(i.buffer.dtype){case 5121:case 5120:u=5121;break;case 5123:case 5122:u=5123;break;case 5125:case 5124:u=5125}i.buffer.dtype=u}i.type=u;var d=s;d<0&&(d=i.buffer.byteLength,5123===u?d>>=1:5125===u&&(d>>=2)),i.vertCount=d;var f=o;if(o<0){f=4;var p=i.buffer.dimension;1===p&&(f=0),2===p&&(f=1),3===p&&(f=4)}i.primType=f}function u(e){i.elementsCount--,delete n[e.id],e.buffer.destroy(),e.buffer=null}return{create:function(e,t){var n=r.create(null,34963,!0),a=new s(n._buffer);function l(e){if(e)if("number"==typeof e)n(e),a.primType=4,a.vertCount=0|e,a.type=5121;else{var t=null,r=35044,i=-1,s=-1,u=0,h=0;Array.isArray(e)||g(e)||y(e)?t=e:("data"in e&&(t=e.data),"usage"in e&&(r=M[e.usage]),"primitive"in e&&(i=C[e.primitive]),"count"in e&&(s=0|e.count),"type"in e&&(h=o[e.type]),"length"in e?u=0|e.length:(u=s,5123===h||5122===h?u*=2:(5125===h||5124===h)&&(u*=4))),c(a,t,r,i,s,u,h)}else n(),a.primType=4,a.vertCount=0,a.type=5121;return l}return i.elementsCount++,l(e),l._reglType="elements",l._elements=a,l.subdata=function(e,t){return n.subdata(e,t),l},l.destroy=function(){u(a)},l},createStream:function(e){var t=l.pop();return t||(t=new s(r.create(null,34963,!0,!1)._buffer)),c(t,e,35040,-1,-1,0,0),t},destroyStream:function(e){l.push(e)},getElements:function(e){return"function"==typeof e&&e._elements instanceof s?e._elements:null},clear:function(){v(n).forEach(u)}}}(_,G,th,F),tf=function(e,t,r,i,n,a,o){for(var s=r.maxAttributes,l=Array(s),c=0;c=f.byteLength?u.subdata(f):(u.destroy(),t.buffers[l]=null)),t.buffers[l]||(u=t.buffers[l]=n.create(h,34962,!1,!0)),d.buffer=n.getBuffer(u),d.size=0|d.buffer.dimension,d.normalized=!1,d.type=d.buffer.dtype,d.offset=0,d.stride=0,d.divisor=0,d.state=1,o[l]=1):n.getBuffer(h)?(d.buffer=n.getBuffer(h),d.size=0|d.buffer.dimension,d.normalized=!1,d.type=d.buffer.dtype,d.offset=0,d.stride=0,d.divisor=0,d.state=1):n.getBuffer(h.buffer)?(d.buffer=n.getBuffer(h.buffer),d.size=0|(+h.size||d.buffer.dimension),d.normalized=!!h.normalized,"type"in h?d.type=T[h.type]:d.type=d.buffer.dtype,d.offset=0|(h.offset||0),d.stride=0|(h.stride||0),d.divisor=0|(h.divisor||0),d.state=1):"x"in h&&(d.x=+h.x||0,d.y=+h.y||0,d.z=+h.z||0,d.w=+h.w||0,d.state=2)}for(var p=0;p1)for(var y=0;ye&&(e=t.stats.uniformsCount)}),e},i.getMaxAttributesCount=function(){var e=0;return h.forEach(function(t){t.stats.attributesCount>e&&(e=t.stats.attributesCount)}),e}),{clear:function(){var e=t.deleteShader.bind(t);v(a).forEach(e),a={},v(o).forEach(e),o={},h.forEach(function(e){t.deleteProgram(e.program)}),h.length=0,u={},i.shaderCount=0},program:function(r,n,s,l){var c=u[n];c||(c=u[n]={});var d=c[r];if(d&&(d.refCount++,!l))return d;var m=new f(n,r);return i.shaderCount++,p(m,s,l),d||(c[r]=m),h.push(m),e(m,{destroy:function(){if(m.refCount--,m.refCount<=0){t.deleteProgram(m.program);var e=h.indexOf(m);h.splice(e,1),i.shaderCount--}c[m.vertId].refCount<=0&&(t.deleteShader(o[m.vertId]),delete o[m.vertId],delete u[m.fragId][m.vertId]),Object.keys(u[m.fragId]).length||(t.deleteShader(a[m.fragId]),delete a[m.fragId],delete u[m.fragId])}})},restore:function(){a={},o={};for(var e=0;e=0&&(m[e]=t)});var T=Object.keys(m);i.textureFormats=T;var M=[];Object.keys(m).forEach(function(e){M[m[e]]=e});var k=[];Object.keys(f).forEach(function(e){k[f[e]]=e});var A=[];Object.keys(u).forEach(function(e){A[u[e]]=e});var S=[];Object.keys(h).forEach(function(e){S[h[e]]=e});var E=[];Object.keys(c).forEach(function(e){E[c[e]]=e});var C=T.reduce(function(e,t){var i=m[t];return 6409===i||6406===i||6409===i||6410===i||6402===i||34041===i||r.ext_srgb&&(35904===i||35906===i)?e[i]=i:32855===i||t.indexOf("rgba")>=0?e[i]=6408:e[i]=6407,e},{});function L(){this.internalformat=6408,this.format=6408,this.type=5121,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=37444,this.width=0,this.height=0,this.channels=0}function P(e,t){e.internalformat=t.internalformat,e.format=t.format,e.type=t.type,e.compressed=t.compressed,e.premultiplyAlpha=t.premultiplyAlpha,e.flipY=t.flipY,e.unpackAlignment=t.unpackAlignment,e.colorSpace=t.colorSpace,e.width=t.width,e.height=t.height,e.channels=t.channels}function F(e,t){if(!("object"!=typeof t||!t)){"premultiplyAlpha"in t&&(e.premultiplyAlpha=t.premultiplyAlpha),"flipY"in t&&(e.flipY=t.flipY),"alignment"in t&&(e.unpackAlignment=t.alignment),"colorSpace"in t&&(e.colorSpace=d[t.colorSpace]),"type"in t&&(e.type=f[t.type]);var r=e.width,i=e.height,n=e.channels,a=!1;"shape"in t?(r=t.shape[0],i=t.shape[1],3===t.shape.length&&(n=t.shape[2],a=!0)):("radius"in t&&(r=i=t.radius),"width"in t&&(r=t.width),"height"in t&&(i=t.height),"channels"in t&&(n=t.channels,a=!0)),e.width=0|r,e.height=0|i,e.channels=0|n;var o=!1;if("format"in t){var s=t.format,l=e.internalformat=m[s];e.format=C[l],s in f&&("type"in t||(e.type=f[s])),s in _&&(e.compressed=!0),o=!0}!a&&o?e.channels=R[e.format]:a&&!o&&e.channels!==O[e.format]&&(e.format=e.internalformat=O[e.channels])}}function H(e){t.pixelStorei(37440,e.flipY),t.pixelStorei(37441,e.premultiplyAlpha),t.pixelStorei(37443,e.colorSpace),t.pixelStorei(3317,e.unpackAlignment)}function G(){L.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function W(e,t){var r=null;if(X(t)?r=t:t&&(F(e,t),"x"in t&&(e.xOffset=0|t.x),"y"in t&&(e.yOffset=0|t.y),X(t.data)&&(r=t.data)),t.copy){var i=a.viewportWidth,n=a.viewportHeight;e.width=e.width||i-e.xOffset,e.height=e.height||n-e.yOffset,e.needsCopy=!0}else if(r){if(g(r))e.channels=e.channels||4,e.data=r,"type"in t||5121!==e.type||(e.type=K(r));else if(Y(r))e.channels=e.channels||4,function(e,t){var r=t.length;switch(e.type){case 5121:case 5123:case 5125:case 5126:var i=p.allocType(e.type,r);i.set(t),e.data=i;break;case 36193:e.data=I(t)}}(e,r),e.alignment=1,e.needsFree=!0;else if(y(r)){var o=r.data;Array.isArray(o)||5121!==e.type||(e.type=K(o));var s,l,c,u,h,d,f=r.shape,m=r.stride;3===f.length?(c=f[2],d=m[2]):(c=1,d=1),s=f[0],l=f[1],u=m[0],h=m[1],e.alignment=1,e.width=s,e.height=l,e.channels=c,e.format=e.internalformat=O[c],e.needsFree=!0,function(e,t,r,i,n,a){for(var o=e.width,s=e.height,l=e.channels,c=J(e,o*s*l),u=0,h=0;h>=n,r.height>>=n,W(r,i[n]),e.mipmask|=1<=0)||"faces"in t||(e.genMipmaps=!0)),"mag"in t&&(e.magFilter=u[t.mag]);var r=e.wrapS,i=e.wrapT;if("wrap"in t){var n=t.wrap;"string"==typeof n?r=i=c[n]:Array.isArray(n)&&(r=c[n[0]],i=c[n[1]])}else"wrapS"in t&&(r=c[t.wrapS]),"wrapT"in t&&(i=c[t.wrapT]);if(e.wrapS=r,e.wrapT=i,"anisotropic"in t&&(t.anisotropic,e.anisotropic=t.anisotropic),"mipmap"in t){var a=!1;switch(typeof t.mipmap){case"string":e.mipmapHint=l[t.mipmap],e.genMipmaps=!0,a=!0;break;case"boolean":a=e.genMipmaps=t.mipmap;break;case"object":e.genMipmaps=!1,a=!0}!a||"min"in t||(e.minFilter=9984)}}function ep(e,i){t.texParameteri(i,10241,e.minFilter),t.texParameteri(i,10240,e.magFilter),t.texParameteri(i,10242,e.wrapS),t.texParameteri(i,10243,e.wrapT),r.ext_texture_filter_anisotropic&&t.texParameteri(i,34046,e.anisotropic),e.genMipmaps&&(t.hint(33170,e.mipmapHint),t.generateMipmap(i))}var em=0,eg={},ey=i.maxTextureUnits,ev=Array(ey).map(function(){return null});function ex(e){L.call(this),this.mipmask=0,this.internalformat=6408,this.id=em++,this.refCount=1,this.target=e,this.texture=t.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new ed,s.profile&&(this.stats={size:0})}function eb(e){t.activeTexture(33984),t.bindTexture(e.target,e.texture)}function e_(){var e=ev[0];e?t.bindTexture(e.target,e.texture):t.bindTexture(3553,null)}function ew(e){var r=e.texture,i=e.unit,n=e.target;i>=0&&(t.activeTexture(33984+i),t.bindTexture(n,null),ev[i]=null),t.deleteTexture(r),e.texture=null,e.params=null,e.pixels=null,e.refCount=0,delete eg[e.id],o.textureCount--}return e(ex.prototype,{bind:function(){this.bindCount+=1;var e=this.unit;if(e<0){for(var r=0;r0)continue;i.unit=-1}ev[r]=this,e=r;break}s.profile&&o.maxTextureUnits>l)-o,c.height=c.height||(i.height>>l)-s,eb(i),et(c,3553,o,s,l),e_(),en(c),n},n.resize=function(e,r){var a=0|e,o=0|r||a;if(a===i.width&&o===i.height)return n;n.width=i.width=a,n.height=i.height=o,eb(i);for(var l=0;i.mipmask>>l;++l){var c=a>>l,u=o>>l;if(!c||!u)break;t.texImage2D(3553,l,i.format,c,u,0,i.format,i.type,null)}return e_(),s.profile&&(i.stats.size=ee(i.internalformat,i.type,a,o,!1,!1)),n},n._reglType="texture2d",n._texture=i,s.profile&&(n.stats=i.stats),n.destroy=function(){i.decRef()},n},createCube:function(e,r,i,n,a,l){var c=new ex(34067);eg[c.id]=c,o.cubeCount++;var u=Array(6);function h(e,t,r,i,n,a){var o,l=c.texInfo;for(ed.call(l),o=0;o<6;++o)u[o]=eu();if("number"!=typeof e&&e){if("object"==typeof e)if(t)es(u[0],e),es(u[1],t),es(u[2],r),es(u[3],i),es(u[4],n),es(u[5],a);else if(ef(l,e),F(c,e),"faces"in e){var d=e.faces;for(o=0;o<6;++o)P(u[o],c),es(u[o],d[o])}else for(o=0;o<6;++o)es(u[o],e)}else{var f=0|e||1;for(o=0;o<6;++o)eo(u[o],f,f)}for(P(c,u[0]),l.genMipmaps?c.mipmask=(u[0].width<<1)-1:c.mipmask=u[0].mipmask,c.internalformat=u[0].internalformat,h.width=u[0].width,h.height=u[0].height,eb(c),o=0;o<6;++o)el(u[o],34069+o);for(ep(l,34067),e_(),s.profile&&(c.stats.size=ee(c.internalformat,c.type,h.width,h.height,l.genMipmaps,!0)),h.format=M[c.internalformat],h.type=k[c.type],h.mag=A[l.magFilter],h.min=S[l.minFilter],h.wrapS=E[l.wrapS],h.wrapT=E[l.wrapT],o=0;o<6;++o)eh(u[o]);return h}return h(e,r,i,n,a,l),h.subimage=function(e,t,r,i,n){var a=0|r,o=0|i,s=0|n,l=ei();return P(l,c),l.width=0,l.height=0,W(l,t),l.width=l.width||(c.width>>s)-a,l.height=l.height||(c.height>>s)-o,eb(c),et(l,34069+e,a,o,s),e_(),en(l),h},h.resize=function(e){var r=0|e;if(r!==c.width){h.width=c.width=r,h.height=c.height=r,eb(c);for(var i=0;i<6;++i)for(var n=0;c.mipmask>>n;++n)t.texImage2D(34069+i,n,c.format,r>>n,r>>n,0,c.format,c.type,null);return e_(),s.profile&&(c.stats.size=ee(c.internalformat,c.type,h.width,h.height,!1,!0)),h}},h._reglType="textureCube",h._texture=c,s.profile&&(h.stats=c.stats),h.destroy=function(){c.decRef()},h},clear:function(){for(var e=0;e>r,e.height>>r,0,e.internalformat,e.type,null);else for(var i=0;i<6;++i)t.texImage2D(34069+i,r,e.internalformat,e.width>>r,e.height>>r,0,e.internalformat,e.type,null);ep(e.texInfo,e.target)})},refresh:function(){for(var e=0;e=0?d=!0:c.indexOf(p)>=0&&(d=!1))),("depthTexture"in e||"depthStencilTexture"in e)&&(M=!!(e.depthTexture||e.depthStencilTexture)),"depth"in e&&("boolean"==typeof e.depth?s=e.depth:(b=e.depth,u=!1)),"stencil"in e&&("boolean"==typeof e.stencil?u=e.stencil:(_=e.stencil,s=!1)),"depthStencil"in e&&("boolean"==typeof e.depthStencil?s=u=e.depthStencil:(w=e.depthStencil,s=!1,u=!1))}else a=o=1;var S=null,E=null,C=null,L=null;if(Array.isArray(h))S=h.map(m);else if(h)S=[m(h)];else for(S=Array(x),r=0;r0&&(s.depth=r[0].depth,s.stencil=r[0].stencil,s.depthStencil=r[0].depthStencil),r[o]?r[o](s):r[o]=A(s)}return e(i,{width:l,height:l,color:a})}return i(t),e(i,{faces:r,resize:function(e){var t,n=0|e;if(n===i.width)return i;var a=i.color;for(t=0;t0&&(t.push(e,"="),t.push.apply(t,ec(arguments)),t.push(";")),e},toString:function(){return eu([r.length>0?"var "+r.join(",")+";":"",eu(t)])}})}function l(){var t=s(),r=s(),i=t.toString,n=r.toString;function a(e,i){r(e,i,"=",t.def(e,i),";")}return e(function(){t.apply(t,ec(arguments))},{def:t.def,entry:t,exit:r,save:a,set:function(e,r,i){a(e,r),t(e,r,"=",i,";")},toString:function(){return i()+n()}})}var c=s(),u={};return{global:c,link:function(e,t){var r=t&&t.stable;if(!r){for(var s=0;s>>4&15)+r.charAt(15&t);return i}(function(e){for(var t=function(e,t){var r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w=[0x6a09e667,-0x4498517b,0x3c6ef372,-0x5ab00ac6,0x510e527f,-0x64fa9774,0x1f83d9ab,0x5be0cd19],T=Array(64);for(e[t>>5]|=128<<24-t%32,e[(t+64>>9<<4)+15]=t,v=0;v>>10,T[x-7]),eo(i=T[x-15],7)^eo(i,18)^i>>>3),T[x-16]),b=el(el(el(el(y,eo(n=p,6)^eo(n,11)^eo(n,25)),(a=p)&m^~a&g),es[x]),T[x]),_=el(eo(o=u,2)^eo(o,13)^eo(o,22),(s=u)&(l=h)^s&(c=d)^l&c),y=g,g=m,m=p,p=el(f,b),f=d,d=h,h=u,u=el(b,_)}w[0]=el(u,w[0]),w[1]=el(h,w[1]),w[2]=el(d,w[2]),w[3]=el(f,w[3]),w[4]=el(p,w[4]),w[5]=el(m,w[5]),w[6]=el(g,w[6]),w[7]=el(y,w[7])}return w}(function(e){for(var t=Array(e.length>>2),r=0;r>5]|=(255&e.charCodeAt(r/8))<<24-r%32;return t}(e),8*e.length),r="",i=0;i<32*t.length;i+=8)r+=String.fromCharCode(t[i>>5]>>>24-i%32&255);return r}(function(e){for(var t,r,i="",n=-1;++n>>6&31,128|63&t):t<=65535?i+=String.fromCharCode(224|t>>>12&15,128|t>>>6&63,128|63&t):t<=2097151&&(i+=String.fromCharCode(240|t>>>18&7,128|t>>>12&63,128|t>>>6&63,128|63&t));return i}(i)))])return r[t].apply(null,a);var o=Function.apply(null,n.concat(i));return r&&(r[t]=o),o.apply(null,a)}}}({cache:v}),r=t.link,n=t.global;t.id=J++,t.batchId="0";var a=r(X),o=t.shared={props:"a0"};Object.keys(X).forEach(function(e){o[e]=n.def(a,".",e)});var s=t.next={},l=t.current={};Object.keys(G).forEach(function(e){Array.isArray(U[e])&&(s[e]=n.def(o.next,".",e),l[e]=n.def(o.current,".",e))});var c=t.constants={};Object.keys(K).forEach(function(e){c[e]=n.def(JSON.stringify(K[e]))}),t.invoke=function(e,i){switch(i.type){case 0:var n=["this",o.context,o.props,t.batchId];return e.def(r(i.data),".call(",n.slice(0,Math.max(i.data.length+1,4)),")");case 1:return e.def(o.props,i.data);case 2:return e.def(o.context,i.data);case 3:return e.def("this",i.data);case 4:return i.data.append(t,e),i.data.ref;case 5:return i.data.toString();case 6:return i.data.map(function(r){return t.invoke(e,r)})}},t.attribCache={};var u={};return t.scopeAttrib=function(e){var t=i.id(e);if(t in u)return u[t];var n=f.scope[t];return n||(n=f.scope[t]=new R),u[t]=r(n)},t}function ee(e,t,r){var i=e.shared.context,n=e.scope();Object.keys(r).forEach(function(a){t.save(i,"."+a);var o=r[a].append(e,t);Array.isArray(o)?n(i,".",a,"=[",o.join(),"];"):n(i,".",a,"=",o,";")}),t(n)}function et(e,t,r,i){var n,a=e.shared,o=a.gl,s=a.framebuffer;B&&(n=t.def(a.extensions,".webgl_draw_buffers"));var l,c=e.constants,u=c.drawBuffer,h=c.backBuffer;l=r?r.append(e,t):t.def(s,".next"),i||t("if(",l,"!==",s,".cur){"),t("if(",l,"){",o,".bindFramebuffer(",36160,",",l,".framebuffer);"),B&&t(n,".drawBuffersWEBGL(",u,"[",l,".colorAttachments.length]);"),t("}else{",o,".bindFramebuffer(",36160,",null);"),B&&t(n,".drawBuffersWEBGL(",h,");"),t("}",s,".cur=",l,";"),i||t("}")}function er(e,t,r){var i=e.shared,n=i.gl,a=e.current,o=e.next,s=i.current,l=i.next,c=e.cond(s,".dirty");q.forEach(function(t){var i,u,d=W(t);if(!(d in r.state))if(d in o){i=o[d],u=a[d];var f=h(U[d].length,function(e){return c.def(i,"[",e,"]")});c(e.cond(f.map(function(e,t){return e+"!=="+u+"["+t+"]"}).join("||")).then(n,".",G[d],"(",f,");",f.map(function(e,t){return u+"["+t+"]="+e}).join(";"),";"))}else{i=c.def(l,".",d);var p=e.cond(i,"!==",s,".",d);c(p),d in H?p(e.cond(i).then(n,".enable(",H[d],");").else(n,".disable(",H[d],");"),s,".",d,"=",i,";"):p(n,".",G[d],"(",i,");",s,".",d,"=",i,";")}}),0===Object.keys(r.state).length&&c(s,".dirty=false;"),t(c)}function ei(e,t,r,i){var n,a=e.shared,o=e.current,s=a.current,l=a.gl;e9(Object.keys(r)).forEach(function(a){var c=r[a];if(!(i&&!i(c))){var u=c.append(e,t);if(H[a]){var h=H[a];tt(c)?(n=e.link(u,{stable:!0}),t(e.cond(n).then(l,".enable(",h,");").else(l,".disable(",h,");")),t(s,".",a,"=",n,";")):(t(e.cond(u).then(l,".enable(",h,");").else(l,".disable(",h,");")),t(s,".",a,"=",u,";"))}else if(z(u)){var d=o[a];t(l,".",G[a],"(",u,");",u.map(function(e,t){return d+"["+t+"]="+e}).join(";"),";")}else tt(c)?(n=e.link(u,{stable:!0}),t(l,".",G[a],"(",n,");",s,".",a,"=",n,";")):t(l,".",G[a],"(",u,");",s,".",a,"=",u,";")}})}function en(e,t){j&&(e.instancing=t.def(e.shared.extensions,".angle_instanced_arrays"))}function ea(e,t,r,i,n){var a,o,s,l=e.shared,c=e.stats,u=l.current,h=l.timer,d=r.profile;function f(){return typeof performance>"u"?"Date.now()":"performance.now()"}function p(e){e(a=t.def(),"=",f(),";"),"string"==typeof n?e(c,".count+=",n,";"):e(c,".count++;"),y&&(i?e(o=t.def(),"=",h,".getNumPendingQueries();"):e(h,".beginQuery(",c,");"))}function m(e){e(c,".cpuTime+=",f(),"-",a,";"),y&&(i?e(h,".pushScopeStats(",o,",",h,".getNumPendingQueries(),",c,");"):e(h,".endQuery();"))}function g(e){var r=t.def(u,".profile");t(u,".profile=",e,";"),t.exit(u,".profile=",r,";")}if(d){if(tt(d))return void(d.enable?(p(t),m(t.exit),g("true")):g("false"));g(s=d.append(e,t))}else s=t.def(u,".profile");var v=e.block();p(v),t("if(",s,"){",v,"}");var x=e.block();m(x),t.exit("if(",s,"){",x,"}")}function eZ(e,t,r,i,n){var a=e.shared;i.forEach(function(i){var o,s=i.name,l=r.attributes[s];if(l){if(!n(l))return;o=l.append(e,t)}else{if(!n(tn))return;var c=e.scopeAttrib(s);o={},Object.keys(new R).forEach(function(e){o[e]=t.def(c,".",e)})}!function(r,i,n){var o=a.gl,s=t.def(r,".location"),l=t.def(a.attributes,"[",s,"]"),c=n.state,u=n.buffer,h=[n.x,n.y,n.z,n.w],d=["buffer","normalized","offset","stride"];function f(){t("if(!",l,".buffer){",o,".enableVertexAttribArray(",s,");}");var r,a=n.type;if(r=n.size?t.def(n.size,"||",i):i,t("if(",l,".type!==",a,"||",l,".size!==",r,"||",d.map(function(e){return l+"."+e+"!=="+n[e]}).join("||"),"){",o,".bindBuffer(",34962,",",u,".buffer);",o,".vertexAttribPointer(",[s,r,a,n.normalized,n.stride,n.offset],");",l,".type=",a,";",l,".size=",r,";",d.map(function(e){return l+"."+e+"="+n[e]+";"}).join(""),"}"),j){var c=n.divisor;t("if(",l,".divisor!==",c,"){",e.instancing,".vertexAttribDivisorANGLE(",[s,c],");",l,".divisor=",c,";}")}}function p(){t("if(",l,".buffer){",o,".disableVertexAttribArray(",s,");",l,".buffer=null;","}if(",eh.map(function(e,t){return l+"."+e+"!=="+h[t]}).join("||"),"){",o,".vertexAttrib4f(",s,",",h,");",eh.map(function(e,t){return l+"."+e+"="+h[t]+";"}).join(""),"}")}1===c?f():2===c?p():(t("if(",c,"===",1,"){"),f(),t("}else{"),p(),t("}"))}(e.link(i),function(e){switch(e){case 35664:case 35667:case 35671:return 2;case 35665:case 35668:case 35672:return 3;case 35666:case 35669:case 35673:return 4;default:return 1}}(i.info.type),o)})}function e$(e,t,r,n,a,o){for(var s,l=e.shared,c=l.gl,u=0;u1){for(var A=[],S=[],E=0;E>1)",u],");")}function t(){r(h,".drawArraysInstancedANGLE(",[v,x,b,u],");")}g&&"null"!==g?w?e():(r("if(",g,"){"),e(),r("}else{"),t(),r("}")):t()}function M(){function e(){r(f+".drawElements("+[v,b,_,x+"<<(("+_+"-5121)>>1)"]+");")}function t(){r(f+".drawArrays("+[v,x,b]+");")}g&&"null"!==g?w?e():(r("if(",g,"){"),e(),r("}else{"),t(),r("}")):t()}j&&("number"!=typeof u||u>=0)?"string"==typeof u?(r("if(",u,">0){"),T(),r("}else if(",u,"<0){"),M(),r("}")):T():M()}function ta(e,t,r,i,n){var a=Q(),o=a.proc("body",n);return j&&(a.instancing=o.def(a.shared.extensions,".angle_instanced_arrays")),e(a,o,r,i),a.compile().body}function to(e,t,r,i){en(e,t),r.useVAO?r.drawVAO?t(e.shared.vao,".setVAO(",r.drawVAO.append(e,t),");"):t(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(t(e.shared.vao,".setVAO(null);"),eZ(e,t,r,i.attributes,function(){return!0})),e$(e,t,r,i.uniforms,function(){return!0},!1),e0(e,t,t,r)}function ts(e,t,r,i){function n(){return!0}e.batchId="a1",en(e,t),eZ(e,t,r,i.attributes,n),e$(e,t,r,i.uniforms,n,!1),e0(e,t,t,r)}function tl(e,t,r,i){en(e,t);var n=r.contextDep,a=t.def(),o=t.def();e.shared.props=o,e.batchId=a;var s=e.scope(),l=e.scope();function c(e){return e.contextDep&&n||e.propDep}function u(e){return!c(e)}if(t(s.entry,"for(",a,"=0;",a,"<","a1",";++",a,"){",o,"=","a0","[",a,"];",l,"}",s.exit),r.needsContext&&ee(e,l,r.context),r.needsFramebuffer&&et(e,l,r.framebuffer),ei(e,l,r.state,c),r.profile&&c(r.profile)&&ea(e,l,r,!1,!0),i)r.useVAO?r.drawVAO?c(r.drawVAO)?l(e.shared.vao,".setVAO(",r.drawVAO.append(e,l),");"):s(e.shared.vao,".setVAO(",r.drawVAO.append(e,s),");"):s(e.shared.vao,".setVAO(",e.shared.vao,".targetVAO);"):(s(e.shared.vao,".setVAO(null);"),eZ(e,s,r,i.attributes,u),eZ(e,l,r,i.attributes,c)),e$(e,s,r,i.uniforms,u,!1),e$(e,l,r,i.uniforms,c,!0),e0(e,s,l,r);else{var h=e.global.def("{}"),d=r.shader.progVar.append(e,l),f=l.def(d,".id"),p=l.def(h,"[",f,"]");l(e.shared.gl,".useProgram(",d,".program);","if(!",p,"){",p,"=",h,"[",f,"]=",e.link(function(t){return ta(ts,e,r,t,2)}),"(",d,");}",p,".call(this,a0[",a,"],",a,");")}}function tc(e,t,i){var n=t.static[i];if(n&&function(e){if(!("object"!=typeof e||z(e))){for(var t=Object.keys(e),r=0;r0)return null;var i=t.static,n=Object.keys(i);if(n.length>0&&"number"==typeof i[n[0]]){for(var a=[],o=0;o0,O={framebuffer:A,draw:E,shader:P,state:L,dirty:D,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(O.profile=function(e){var t,r=e.static,i=e.dynamic;if(eB in r){var n=!!r[eB];(t=tr(function(e,t){return n})).enable=n}else if(eB in i){var a=i[eB];t=ti(a,function(e,t){return e.invoke(t,a)})}return t}(e),m=r.static,g=r.dynamic,y={},Object.keys(m).forEach(function(e){var t,r=m[e];if("number"==typeof r||"boolean"==typeof r)t=tr(function(){return r});else if("function"==typeof r){var i=r._reglType;"texture2d"===i||"textureCube"===i?t=tr(function(e){return e.link(r)}):("framebuffer"===i||"framebufferCube"===i)&&(t=tr(function(e){return e.link(r.color[0])}))}else z(r)&&(t=tr(function(e){return e.global.def("[",h(r.length,function(e){return r[e]}),"]")}));t.value=r,y[e]=t}),Object.keys(g).forEach(function(e){var t=g[e];y[e]=ti(t,function(e,r){return e.invoke(r,t)})}),O.uniforms=y,O.drawVAO=O.scopeVAO=E.vao,!O.drawVAO&&P.program&&!k&&n.angle_instanced_arrays&&E.static.elements){var j=!0,B=P.program.attributes.map(function(e){var r=t.static[e];return j=j&&!!r,r});if(j&&B.length>0){var N=f.getVAO(f.createVAO({attributes:B,elements:E.static.elements}));O.drawVAO=new te(null,null,null,function(e,t){return e.link(N)}),O.useVAO=!0}}return k?O.useVAO=!0:(v=t.static,x=t.dynamic,b={},Object.keys(v).forEach(function(e){var t=v[e],r=i.id(e),n=new R;if(e7(t))n.state=1,n.buffer=l.getBuffer(l.create(t,34962,!1,!0)),n.type=0;else{var a=l.getBuffer(t);if(a)n.state=1,n.buffer=a,n.type=0;else if("constant"in t){var o=t.constant;n.buffer="null",n.state=2,"number"==typeof o?n.x=o:eh.forEach(function(e,t){t"+t+"?"+i+".constant["+t+"]: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;"),d("size"),d("offset"),d("stride"),d("divisor"),r("}}"),r.exit("if(",l.isStream,"){",s,".destroyStream(",u,");","}"),l})}),O.attributes=b),_=a.static,w=a.dynamic,M={},Object.keys(_).forEach(function(e){var t=_[e];M[e]=tr(function(e,r){return"number"==typeof t||"boolean"==typeof t?""+t:e.link(t)})}),Object.keys(w).forEach(function(e){var t=w[e];M[e]=ti(t,function(e,r){return e.invoke(r,t)})}),O.context=M,O}(t,r,a,o);return m.shader.program&&(m.shader.program.attributes.sort(function(e,t){return e.name0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),function(e,t){var r=e.proc("scope",3);e.batchId="a2";var n=e.shared,a=n.current;if(ee(e,r,t.context),t.framebuffer&&t.framebuffer.append(e,r),e9(Object.keys(t.state)).forEach(function(i){var a=t.state[i],o=a.append(e,r);z(o)?o.forEach(function(t,n){$(t)?r.set(e.next[i],"["+n+"]",t):r.set(e.next[i],"["+n+"]",e.link(t,{stable:!0}))}):tt(a)?r.set(n.next,"."+i,e.link(o,{stable:!0})):r.set(n.next,"."+i,o)}),ea(e,r,t,!0,!0),[eq,eW,eG,eY,eH].forEach(function(i){var a=t.draw[i];if(a){var o=a.append(e,r);$(o)?r.set(n.draw,"."+i,o):r.set(n.draw,"."+i,e.link(o),{stable:!0})}}),Object.keys(t.uniforms).forEach(function(a){var o=t.uniforms[a].append(e,r);Array.isArray(o)&&(o="["+o.map(function(t){return $(t)?t:e.link(t,{stable:!0})})+"]"),r.set(n.uniforms,"["+e.link(i.id(a),{stable:!0})+"]",o)}),Object.keys(t.attributes).forEach(function(i){var n=t.attributes[i].append(e,r),a=e.scopeAttrib(i);Object.keys(new R).forEach(function(e){r.set(a,"."+e,n[e])})}),t.scopeVAO){var o=t.scopeVAO.append(e,r);$(o)?r.set(n.vao,".targetVAO",o):r.set(n.vao,".targetVAO",e.link(o,{stable:!0}))}function s(i){var a=t.shader[i];if(a){var o=a.append(e,r);$(o)?r.set(n.shader,"."+i,o):r.set(n.shader,"."+i,e.link(o,{stable:!0}))}}s(eU),s(eV),Object.keys(t.state).length>0&&(r(a,".dirty=true;"),r.exit(a,".dirty=true;")),r("a1(",e.shared.context,",a0,",e.batchId,");")}(d,m),function(e,t){var r=e.proc("batch",2);e.batchId="0",en(e,r);var i=!1,n=!0;Object.keys(t.context).forEach(function(e){i=i||t.context[e].propDep}),i||(ee(e,r,t.context),n=!1);var a=t.framebuffer,o=!1;function s(e){return e.contextDep&&i||e.propDep}a?(a.propDep?i=o=!0:a.contextDep&&i&&(o=!0),o||et(e,r,a)):et(e,r,null),t.state.viewport&&t.state.viewport.propDep&&(i=!0),er(e,r,t),ei(e,r,t.state,function(e){return!s(e)}),t.profile&&s(t.profile)||ea(e,r,t,!1,"a1"),t.contextDep=i,t.needsContext=n,t.needsFramebuffer=o;var l=t.shader.progVar;if(l.contextDep&&i||l.propDep)tl(e,r,t,null);else{var c=l.append(e,r);if(r(e.shared.gl,".useProgram(",c,".program);"),t.shader.program)tl(e,r,t,t.shader.program);else{r(e.shared.vao,".setVAO(null);");var u=e.global.def("{}"),h=r.def(c,".id"),d=r.def(u,"[",h,"]");r(e.cond(d).then(d,".call(this,a0,a1);").else(d,"=",u,"[",h,"]=",e.link(function(r){return ta(tl,e,t,r,2)}),"(",c,");",d,".call(this,a0,a1);"))}}Object.keys(t.state).length>0&&r(e.shared.current,".dirty=true;"),e.shared.vao&&r(e.shared.vao,".setVAO(null);")}(d,m),e(d.compile(),{destroy:function(){m.shader.program.destroy()}})}}}(_,P,G,tu,th,td,ty,{},tf,tp,tc,e0,W,H,f),tx=function(e,t,r,i){function n(n){var a=null===t.next?5121:t.next.colorAttachments[0].texture._texture.type,o=0,s=0,l=i.framebufferWidth,c=i.framebufferHeight,u=null;g(n)?u=n:n&&(o=0|n.x,s=0|n.y,l=0|(n.width||i.framebufferWidth-o),c=0|(n.height||i.framebufferHeight-s),u=n.data||null),r();var h=l*c*4;return u||(5121===a?u=new Uint8Array(h):5126===a&&(u=u||new Float32Array(h))),e.pixelStorei(3333,4),e.readPixels(o,s,l,c,6408,a,u),u}return function(e){var r;return e&&"framebuffer"in e?(t.setFBO({framebuffer:e.framebuffer},function(){r=n(e)}),r):n(e)}}(_,ty,tv.procs.poll,e0),tb=tv.next,t_=_.canvas,tw=[],tT=[],tM=[],tk=[f.onDestroy],tA=null;function tS(){if(0===tw.length){W&&W.update(),tA=null;return}tA=s.next(tS),tF();for(var e=tw.length-1;e>=0;--e){var t=tw[e];t&&t(e0,null,0)}_.flush(),W&&W.update()}function tE(){!tA&&tw.length>0&&(tA=s.next(tS))}function tC(){tA&&(s.cancel(tS),tA=null)}function tL(e){e.preventDefault(),tC(),tT.forEach(function(e){e()})}function tP(e){_.getError(),L.restore(),tp.restore(),th.restore(),tm.restore(),tg.restore(),ty.restore(),tf.restore(),W&&W.restore(),tv.procs.refresh(),tE(),tM.forEach(function(e){e()})}function tI(t){function r(e,t){var r={},i={};return Object.keys(e).forEach(function(n){var s=e[n];if(a(s)){i[n]=o(s,n);return}if(t&&Array.isArray(s)){for(var l=0;l0)return d.call(this,function(e){for(;p.length=0},read:tx,destroy:function(){tw.length=0,tC(),t_&&(t_.removeEventListener(to,tL),t_.removeEventListener(ts,tP)),tp.clear(),ty.clear(),tg.clear(),tf.clear(),tm.clear(),td.clear(),th.clear(),W&&W.clear(),tk.forEach(function(e){e()})},_gl:_,_refresh:tj,poll:function(){tF(),W&&W.update()},now:tB,stats:F,getCachedCode:function(){return H},preloadCachedCode:function(e){Object.entries(e).forEach(function(e){H[e[0]]=e[1]})}});return f.onDone(null,tN),tN}},"object"==typeof e&&"u">typeof t?t.exports=r():e.createREGL=r()}}),yr=p({"node_modules/gl-util/context.js"(e,t){var r=p6();function i(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function n(e){return"function"==typeof e.getContext&&"width"in e&&"height"in e}function a(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}t.exports=function(e){if(e?"string"==typeof e&&(e={container:e}):e={},(e=n(e)||"string"==typeof(t=e).nodeName&&"function"==typeof t.appendChild&&"function"==typeof t.getBoundingClientRect?{container:e}:"function"==typeof(o=e).drawArrays||"function"==typeof o.drawElements?{gl:e}:r(e,{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)).pixelRatio||(e.pixelRatio=window.pixelRatio||1),e.gl)return e.gl;if(e.canvas&&(e.container=e.canvas.parentNode),e.container){if("string"==typeof e.container){var t,o,s=document.querySelector(e.container);if(!s)throw Error("Element "+e.container+" is not found");e.container=s}n(e.container)?(e.canvas=e.container,e.container=e.canvas.parentNode):e.canvas||(e.canvas=a(),e.container.appendChild(e.canvas),i(e))}else if(!e.canvas)if("u">typeof document)e.container=document.body||document.documentElement,e.canvas=a(),e.container.appendChild(e.canvas),i(e);else throw Error("Not DOM environment. Use headless-gl.");return e.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(t){try{e.gl=e.canvas.getContext(t,e.attrs)}catch{}return e.gl}),e.gl}}}),yi=p({"node_modules/font-atlas/index.js"(e,t){var r=g9(),i=[32,126];t.exports=function(e){var t=(e=e||{}).shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],n=e.canvas||document.createElement("canvas"),a=e.font,o="number"==typeof e.step?[e.step,e.step]:e.step||[32,32],s=e.chars||i;if(a&&"string"!=typeof a&&(a=r(a)),Array.isArray(s)){if(2===s.length&&"number"==typeof s[0]&&"number"==typeof s[1]){for(var l=[],c=s[0],u=0;c<=s[1];c++)l[u++]=String.fromCharCode(c);s=l}}else s=String(s).split("");n.width=(t=t.slice())[0],n.height=t[1];var h=n.getContext("2d");h.fillStyle="#000",h.fillRect(0,0,n.width,n.height),h.font=a,h.textAlign="center",h.textBaseline="middle",h.fillStyle="#fff";for(var d=o[0]/2,f=o[1]/2,c=0;ct[0]-o[0]/2&&(d=o[0]/2,f+=o[1]);return n}}}),yn=p({"node_modules/bit-twiddle/twiddle.js"(e){function t(e){var t=32;return(e&=-e)&&t--,65535&e&&(t-=16),0xff00ff&e&&(t-=8),0xf0f0f0f&e&&(t-=4),0x33333333&e&&(t-=2),0x55555555&e&&(t-=1),t}e.INT_BITS=32,e.INT_MAX=0x7fffffff,e.INT_MIN=-0x80000000,e.sign=function(e){return(e>0)-(e<0)},e.abs=function(e){var t=e>>31;return(e^t)-t},e.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,(t|=r)|e>>1},e.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:+(e>=10)},e.popCount=function(e){return e-=e>>>1&0x55555555,((e=(0x33333333&e)+(e>>>2&0x33333333))+(e>>>4)&0xf0f0f0f)*0x1010101>>>24},e.countTrailingZeros=t,e.nextPow2=function(e){return e+=0===e,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)+1},e.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,(e|=e>>>16)-(e>>>1)},e.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,27030>>>(e&=15)&1};var r=Array(256);(function(e){for(var t=0;t<256;++t){var r=t,i=t,n=7;for(r>>>=1;r;r>>>=1)i<<=1,i|=1&r,--n;e[t]=i<>>8&255]<<16|r[e>>>16&255]<<8|r[e>>>24&255]},e.interleave2=function(e,t){return e&=65535,t&=65535,(e=((e=((e=((e=(e|e<<8)&0xff00ff)|e<<4)&0xf0f0f0f)|e<<2)&0x33333333)|e<<1)&0x55555555)|(t=((t=((t=((t=(t|t<<8)&0xff00ff)|t<<4)&0xf0f0f0f)|t<<2)&0x33333333)|t<<1)&0x55555555)<<1},e.deinterleave2=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x55555555)|e>>>1)&0x33333333)|e>>>2)&0xf0f0f0f)|e>>>4)&0xff00ff)|e>>>16)&65535)<<16>>16},e.interleave3=function(e,t,r){return e&=1023,t&=1023,r&=1023,r=((r=((r=((r=(r|r<<16)&0xff0000ff)|r<<8)&0xf00f00f)|r<<4)&0xc30c30c3)|r<<2)&0x49249249,(e=((e=((e=((e=(e|e<<16)&0xff0000ff)|e<<8)&0xf00f00f)|e<<4)&0xc30c30c3)|e<<2)&0x49249249|(t=((t=((t=((t=(t|t<<16)&0xff0000ff)|t<<8)&0xf00f00f)|t<<4)&0xc30c30c3)|t<<2)&0x49249249)<<1)|r<<2},e.deinterleave3=function(e,t){return(e=((e=((e=((e=((e=e>>>t&0x49249249)|e>>>2)&0xc30c30c3)|e>>>4)&0xf00f00f)|e>>>8)&0xff0000ff)|e>>>16)&1023)<<22>>22},e.nextCombination=function(e){var r=e|e-1;return r+1|(~r&-~r)-1>>>t(e)+1}}}),ya=p({"node_modules/dup/dup.js"(e,t){t.exports=function(e,t){switch(typeof t>"u"&&(t=0),typeof e){case"number":if(e>0){var r,i,n=0|e,a=t;for(r=Array(n),i=0;itypeof Uint8ClampedArray,a="u">typeof BigUint64Array,o="u">typeof BigInt64Array,s=window.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=r([32,0])),s.BIGUINT64||(s.BIGUINT64=r([32,0])),s.BIGINT64||(s.BIGINT64=r([32,0])),s.BUFFER||(s.BUFFER=r([32,0]));var l=s.DATA,c=s.BUFFER;function u(e){if(e){var r=e.length||e.byteLength;l[t.log2(r)].push(e)}}function h(e){var e=t.nextPow2(e),r=l[t.log2(e)];return r.length>0?r.pop():new ArrayBuffer(e)}function d(e){return new Uint8Array(h(e),0,e)}function f(e){return new Uint16Array(h(2*e),0,e)}function p(e){return new Uint32Array(h(4*e),0,e)}function m(e){return new Int8Array(h(e),0,e)}function g(e){return new Int16Array(h(2*e),0,e)}function y(e){return new Int32Array(h(4*e),0,e)}function v(e){return new Float32Array(h(4*e),0,e)}function x(e){return new Float64Array(h(8*e),0,e)}function b(e){return n?new Uint8ClampedArray(h(e),0,e):d(e)}function _(e){return a?new BigUint64Array(h(8*e),0,e):null}function w(e){return o?new BigInt64Array(h(8*e),0,e):null}function T(e){return new DataView(h(e),0,e)}function M(e){e=t.nextPow2(e);var r=c[t.log2(e)];return r.length>0?r.pop():new i(e)}e.free=function(e){if(i.isBuffer(e))c[t.log2(e.length)].push(e);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(e)&&(e=e.buffer),!e)return;var r=e.length||e.byteLength;l[0|t.log2(r)].push(e)}},e.freeUint8=e.freeUint16=e.freeUint32=e.freeBigUint64=e.freeInt8=e.freeInt16=e.freeInt32=e.freeBigInt64=e.freeFloat32=e.freeFloat=e.freeFloat64=e.freeDouble=e.freeUint8Clamped=e.freeDataView=function(e){u(e.buffer)},e.freeArrayBuffer=u,e.freeBuffer=function(e){c[t.log2(e.length)].push(e)},e.malloc=function(e,t){if(void 0===t||"arraybuffer"===t)return h(e);switch(t){case"uint8":return d(e);case"uint16":return f(e);case"uint32":return p(e);case"int8":return m(e);case"int16":return g(e);case"int32":return y(e);case"float":case"float32":return v(e);case"double":case"float64":return x(e);case"uint8_clamped":return b(e);case"bigint64":return w(e);case"biguint64":return _(e);case"buffer":return M(e);case"data":case"dataview":return T(e);default:return null}},e.mallocArrayBuffer=h,e.mallocUint8=d,e.mallocUint16=f,e.mallocUint32=p,e.mallocInt8=m,e.mallocInt16=g,e.mallocInt32=y,e.mallocFloat32=e.mallocFloat=v,e.mallocFloat64=e.mallocDouble=x,e.mallocUint8Clamped=b,e.mallocBigUint64=_,e.mallocBigInt64=w,e.mallocDataView=T,e.mallocBuffer=M,e.clearCache=function(){for(var e=0;e<32;++e)s.UINT8[e].length=0,s.UINT16[e].length=0,s.UINT32[e].length=0,s.INT8[e].length=0,s.INT16[e].length=0,s.INT32[e].length=0,s.FLOAT[e].length=0,s.DOUBLE[e].length=0,s.BIGUINT64[e].length=0,s.BIGINT64[e].length=0,s.UINT8C[e].length=0,l[e].length=0,c[e].length=0}}}),ys=p({"node_modules/is-plain-obj/index.js"(e,t){var r=Object.prototype.toString;t.exports=function(e){var t;return"[object Object]"===r.call(e)&&(null===(t=Object.getPrototypeOf(e))||t===Object.getPrototypeOf({}))}}}),yl=p({"node_modules/parse-unit/index.js"(e,t){t.exports=function(e,t){t||(t=[0,""]);var r=parseFloat(e=String(e),10);return t[0]=r,t[1]=e.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}}}),yc=p({"node_modules/gl-text/node_modules/to-px/topx.js"(e,t){var r=yl();function i(e,t){var i=r(getComputedStyle(e).getPropertyValue(t));return i[0]*n(i[1],e)}function n(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":var r,n,a,o;return r=e,n=t,(a=document.createElement("div")).style["font-size"]="128"+r,n.appendChild(a),o=i(a,"font-size")/128,n.removeChild(a),o;case"em":return i(t,"font-size");case"rem":return i(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return 96;case"cm":return 96/2.54;case"mm":return 96/25.4;case"pt":return 96/72;case"pc":return 16}return 1}t.exports=n}}),yu=p({"node_modules/detect-kerning/index.js"(e,t){t.exports=n;var r=(n.canvas=document.createElement("canvas")).getContext("2d"),i=a([32,126]);function n(e,t){Array.isArray(e)&&(e=e.join(", "));var n,o={},s=16,l=.05;t&&(2===t.length&&"number"==typeof t[0]?n=a(t):Array.isArray(t)?n=t:(t.o?n=a(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(s=t.fontSize),null!=t.threshold&&(l=t.threshold))),n||(n=i),r.font=s+"px "+e;for(var c=0;cs*l){var f=(d-h)/s;o[u]=1e3*f}}return o}function a(e){for(var t=[],r=e[0];r<=e[1];r++)for(var i=String.fromCharCode(r),n=e[0];n0;i-=4)if(0!==r[i])return Math.floor((i-3)*.25/t)}t.exports=r,r.canvas=document.createElement("canvas"),r.cache={}}}),yd=p({"node_modules/gl-text/dist.js"(e,t){var r=ye(),i=p6(),n=yt(),a=yr(),o=gZ(),s=mL(),l=yi(),c=yo(),u=p8(),h=ys(),d=yl(),f=yc(),p=yu(),m=mR(),g=yh(),y=mt(),v=yn().nextPow2,x=new o,b=!1;document.body&&((_=document.body.appendChild(document.createElement("div"))).style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(_).fontStretch&&(b=!0),document.body.removeChild(_));var _,w=function(e){var t;"function"==typeof(t=e)&&t._gl&&t.prop&&t.texture&&t.buffer?(e={regl:e},this.gl=e.regl._gl):this.gl=a(e),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=e.regl||n({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(h(e)?e:{})};w.prototype.createShader=function(){var e=this.regl,t=e({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:e.prop("count"),offset:e.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:e.this("sizeBuffer")},width:{offset:0,stride:8,buffer:e.this("sizeBuffer")},char:e.this("charBuffer"),position:e.this("position")},uniforms:{atlasSize:function(e,t){return[t.atlas.width,t.atlas.height]},atlasDim:function(e,t){return[t.atlas.cols,t.atlas.rows]},atlas:function(e,t){return t.atlas.texture},charStep:function(e,t){return t.atlas.step},em:function(e,t){return t.atlas.em},color:e.prop("color"),opacity:e.prop("opacity"),viewport:e.this("viewportArray"),scale:e.this("scale"),align:e.prop("align"),baseline:e.prop("baseline"),translate:e.this("translate"),positionOffset:e.prop("positionOffset")},primitive:"points",viewport:e.this("viewport"),vert:` + precision highp float; + attribute float width, charOffset, char; + attribute vec2 position; + uniform float fontSize, charStep, em, align, baseline; + uniform vec4 viewport; + uniform vec4 color; + uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; + varying vec2 charCoord, charId; + varying float charWidth; + varying vec4 fontColor; + void main () { + vec2 offset = floor(em * (vec2(align + charOffset, baseline) + + vec2(positionOffset.x, -positionOffset.y))) + / (viewport.zw * scale.xy); + + vec2 position = (position + translate) * scale; + position += offset * scale; + + charCoord = position * viewport.zw + viewport.xy; + + gl_Position = vec4(position * 2. - 1., 0, 1); + + gl_PointSize = charStep; + + charId.x = mod(char, atlasDim.x); + charId.y = floor(char / atlasDim.x); + + charWidth = width * em; + + fontColor = color / 255.; + }`,frag:` + precision highp float; + uniform float fontSize, charStep, opacity; + uniform vec2 atlasSize; + uniform vec4 viewport; + uniform sampler2D atlas; + varying vec4 fontColor; + varying vec2 charCoord, charId; + varying float charWidth; + + float lightness(vec4 color) { + return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; + } + + void main () { + vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; + float halfCharStep = floor(charStep * .5 + .5); + + // invert y and shift by 1px (FF expecially needs that) + uv.y = charStep - uv.y; + + // ignore points outside of character bounding box + float halfCharWidth = ceil(charWidth * .5); + if (floor(uv.x) > halfCharStep + halfCharWidth || + floor(uv.x) < halfCharStep - halfCharWidth) return; + + uv += charId * charStep; + uv = uv / atlasSize; + + vec4 color = fontColor; + vec4 mask = texture2D(atlas, uv); + + float maskY = lightness(mask); + // float colorY = lightness(color); + color.a *= maskY; + color.a *= opacity; + + // color.a += .1; + + // antialiasing, see yiq color space y-channel formula + // color.rgb += (1. - color.rgb) * (1. - mask.rgb); + + gl_FragColor = color; + }`});return{regl:e,draw:t,atlas:{}}},w.prototype.update=function(e){var t,n,a=this;if("string"==typeof e)e={text:e};else if(!e)return;null!=(e=i(e,{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(e.opacity)?this.opacity=e.opacity.map(function(e){return parseFloat(e)}):this.opacity=parseFloat(e.opacity)),null!=e.viewport&&(this.viewport=u(e.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null==this.viewport&&(this.viewport={x:0,y:0,width:this.gl.drawingBufferWidth,height:this.gl.drawingBufferHeight},this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),null!=e.kerning&&(this.kerning=e.kerning),null!=e.offset&&("number"==typeof e.offset&&(e.offset=[e.offset,0]),this.positionOffset=y(e.offset)),e.direction&&(this.direction=e.direction),e.range&&(this.range=e.range,this.scale=[1/(e.range[2]-e.range[0]),1/(e.range[3]-e.range[1])],this.translate=[-e.range[0],-e.range[1]]),e.scale&&(this.scale=e.scale),e.translate&&(this.translate=e.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||e.font||(e.font=w.baseFontSize+"px sans-serif");var o=!1,h=!1;if(e.font&&(Array.isArray(e.font)?e.font:[e.font]).forEach(function(e,t){if("string"==typeof e)try{e=r.parse(e)}catch{e=r.parse(w.baseFontSize+"px "+e)}else{var i=e.style,n=e.weight,s=e.stretch,l=e.variant;e=r.parse(r.stringify(e)),i&&(e.style=i),n&&(e.weight=n),s&&(e.stretch=s),l&&(e.variant=l)}var c=r.stringify({size:w.baseFontSize,family:e.family,stretch:b?e.stretch:void 0,variant:e.variant,weight:e.weight,style:e.style}),u=d(e.size),p=Math.round(u[0]*f(u[1]));if(p!==a.fontSize[t]&&(h=!0,a.fontSize[t]=p),(!a.font[t]||c!=a.font[t].baseString)&&(o=!0,a.font[t]=w.fonts[c],!a.font[t])){var m=e.family.join(", "),y=[e.style];e.style!=e.variant&&y.push(e.variant),e.variant!=e.weight&&y.push(e.weight),b&&e.weight!=e.stretch&&y.push(e.stretch),a.font[t]={baseString:c,family:m,weight:e.weight,stretch:e.stretch,style:e.style,variant:e.variant,width:{},kerning:{},metrics:g(m,{origin:"top",fontSize:w.baseFontSize,fontStyle:y.join(" ")})},w.fonts[c]=a.font[t]}}),(o||h)&&this.font.forEach(function(t,i){var n=r.stringify({size:a.fontSize[i],family:t.family,stretch:b?t.stretch:void 0,variant:t.variant,weight:t.weight,style:t.style});if(a.fontAtlas[i]=a.shader.atlas[n],!a.fontAtlas[i]){var o=t.metrics;a.shader.atlas[n]=a.fontAtlas[i]={fontString:n,step:2*Math.ceil(a.fontSize[i]*o.bottom*.5),em:a.fontSize[i],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:a.regl.texture()}}null==e.text&&(e.text=a.text)}),"string"==typeof e.text&&e.position&&e.position.length>2){for(var x=Array(.5*e.position.length),_=0;_2){for(var M=!e.position[0].length,k=c.mallocFloat(2*this.count),A=0,S=0;A1?a.align[t]:a.align[0]:a.align;if("number"==typeof r)return r;switch(r){case"right":case"end":return-e;case"center":case"centre":case"middle":return-(.5*e)}return 0})),null==this.baseline&&null==e.baseline&&(e.baseline=0),null!=e.baseline&&(this.baseline=e.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(e,t){var r,i=(a.font[t]||a.font[0]).metrics;return r=0+.5*i.bottom,"number"==typeof e?r+=e-i.baseline:r+=-i[e],r*=-1})),null!=e.color)if(e.color||(e.color="transparent"),"string"!=typeof e.color&&isNaN(e.color)){if("number"==typeof e.color[0]&&e.color.length>this.counts.length){var G=e.color.length;n=c.mallocUint8(G);for(var W=(e.color.subarray||e.color.slice).bind(e.color),Y=0;Y4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2){var X=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(X);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=[]},w.prototype.destroy=function(){},w.prototype.kerning=!0,w.prototype.position={constant:new Float32Array(2)},w.prototype.translate=null,w.prototype.scale=null,w.prototype.font=null,w.prototype.text="",w.prototype.positionOffset=[0,0],w.prototype.opacity=1,w.prototype.color=new Uint8Array([0,0,0,255]),w.prototype.alignOffset=[0,0],w.maxAtlasSize=1024,w.atlasCanvas=document.createElement("canvas"),w.atlasContext=w.atlasCanvas.getContext("2d",{alpha:!1}),w.baseFontSize=64,w.fonts={},t.exports=w}}),yf=p({"src/lib/prepare_regl.js"(e,t){var r=fT(),i=yt();t.exports=function(e,t,n){var a=e._fullLayout,o=!0;return a._glcanvas.each(function(r){if(r.regl)return void r.regl.preloadCachedCode(n);if(!(r.pick&&!a._has("parcoords"))){try{r.regl=i({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:e._context.plotGlPixelRatio||window.devicePixelRatio,extensions:t||[],cachedCode:n||{}})}catch{o=!1}r.regl||(o=!1),o&&this.addEventListener("webglcontextlost",function(t){e&&e.emit&&e.emit("plotly_webglcontextlost",{event:t,layer:r.key})},!1)}}),o||r({container:a._glcontainer.node()}),o}}}),yp=p({"src/traces/scattergl/plot.js"(e,t){var r=mO(),i=gX(),n=gK(),a=yd(),o=tv(),s=rO().selectMode,l=yf(),c=t5(),u=i7(),h=mM().styleTextSelection,d={},e=t.exports=function(e,t,f){if(f.length){var p,m,g=e._fullLayout,y=t._scene,v=t.xaxis,x=t.yaxis;if(y){if(!l(e,["ANGLE_instanced_arrays","OES_element_index_uint"],d))return void y.init();var b,_,w,T,M,k,A,S,E,C,L=y.count,P=g._glcanvas.data()[0].regl;if(u(e,t,f),y.dirty){if((y.line2d||y.error2d)&&!(y.scatter2d||y.fill2d||y.glText)&&P.clear({color:!0,depth:!0}),!0===y.error2d&&(y.error2d=n(P)),!0===y.line2d&&(y.line2d=i(P)),!0===y.scatter2d&&(y.scatter2d=r(P)),!0===y.fill2d&&(y.fill2d=i(P)),!0===y.glText)for(y.glText=Array(L),p=0;py.glText.length){var I=L-y.glText.length;for(p=0;pr&&(isNaN(t[i])||isNaN(t[i+1]));)i-=2;e.positions=t.slice(r,i+2)}return e}),y.line2d.update(y.lineOptions)),y.error2d){var D=(y.errorXOptions||[]).concat(y.errorYOptions||[]).map(function(e){return e||{positions:[],errors:[]}});y.error2d.update(D)}y.scatter2d&&y.scatter2d.update(y.markerOptions),y.fillOrder=o.repeat(null,L),y.fill2d&&(y.fillOptions=y.fillOptions.map(function(e,t){var r=f[t];if(!(!e||!r||!r[0]||!r[0].trace)){var i,n,a=r[0],o=a.trace,s=a.t,l=y.lineOptions[t],c=[];o._ownfill&&c.push(t),o._nexttrace&&c.push(t+1),c.length&&(y.fillOrder[t]=c);var u,h,d=[],p=l&&l.positions||s.positions;if("tozeroy"===o.fill){for(u=0;uu&&isNaN(p[h+1]);)h-=2;0!==p[u+1]&&(d=[p[u],0]),d=d.concat(p.slice(u,h+2)),0!==p[h+1]&&(d=d.concat([p[h],0]))}else if("tozerox"===o.fill){for(u=0;uu&&isNaN(p[h]);)h-=2;0!==p[u]&&(d=[0,p[u+1]]),d=d.concat(p.slice(u,h+2)),0!==p[h]&&(d=d.concat([0,p[h+1]]))}else if("toself"===o.fill||"tonext"===o.fill){for(d=[],i=0,e.splitNull=!0,n=0;n-1;for(let[e]of f)if(e){var F=e.trace,j=e.t,B=j.index,N=F._length,U=j.x,V=j.y;if(F.selectedpoints||O||R){if(O||(O=!0),F.selectedpoints){var q=y.selectBatch[B]=F.selectedpoints,H={};for(m=0;mn&&s||ih?b.sizeAvg||Math.max(b.size,3):n(t,x),p=0;ptypeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"u">typeof S&&null!==S&&S.hrtime?(t.exports=function(){return(e()-n)/1e6},r=S.hrtime,n=(e=function(){var e;return 1e9*(e=r())[0]+e[1]})()-1e9*S.uptime()):Date.now?(t.exports=function(){return Date.now()-i},i=Date.now()):(t.exports=function(){return new Date().getTime()-i},i=new Date().getTime())}).call(e)}}),yT=p({"node_modules/raf/index.js"(e,t){var r,i,n,a,o,s=yw(),l=window,c=["moz","webkit"],u="AnimationFrame",h=l["request"+u],d=l["cancel"+u]||l["cancelRequest"+u];for(r=0;!h&&r2?(s[0],s[2],i=s[1],n=s[3]):s.length?(i=s[0],n=s[1]):(s.x,i=s.y,s.x+s.width,n=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,i,o,n]}function h(e){if("number"==typeof e)return[e,e,e,e];if(2===e.length)return[e[0],e[1],e[0],e[1]];{let t=s(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}t.exports=c,c.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=a(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,a(()=>{this.dirty=!1})),this)},c.prototype.update=function(...e){if(!e.length)return;for(let t=0;tt||!c.lower&&e{t[a+r]=i})}this.scatter.draw(...t)}else this.scatter.draw();return this},c.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this}}}),yA=p({"src/traces/splom/plot.js"(e,t){var r=yk(),i=tv(),n=tC(),a=rO().selectMode;t.exports=function(e,t,o){if(o.length)for(var s=0;s-1,C=a(x)||!!f.selectedpoints||E,L=!0;if(C){var P=f._length;if(f.selectedpoints){m.selectBatch=f.selectedpoints;var I=f.selectedpoints,z={};for(l=0;l=t[r][0]&&e<=t[r][1])return!0;return!1}(r,i))return r;var n=e?-1:1,a=0,o=t.length-1;if(n<0){var s=a;a=o,o=s}for(var u=t[a],h=u,d=a;n*dt){f=i;break}}if(isNaN(o=h)&&(o=isNaN(d)||isNaN(f)?isNaN(d)?f:d:t-u[d][1]e[1]+i||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}(g,t);y&&(s.interval=c[o],s.intervalPix=g,s.region=y)}}if(e.ordinal&&!s.region){var v=e.unitTickvals,x=e.unitToPaddedPx.invert(t);for(i=0;i=b[0]&&x<=b[1]){s.clickableOrdinalRange=b;break}}}return s}function x(e,t){i.event.sourceEvent.stopPropagation();var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=t.brush.svgBrush;a.wasDragged=!0,a._dragging=!0,a.grabbingBar?a.newExtent=[n-a.grabPoint,n+a.barLength-a.grabPoint].map(t.unitToPaddedPx.invert):a.newExtent=[a.startExtent,t.unitToPaddedPx.invert(n)].sort(o),t.brush.filterSpecified=!0,a.extent=a.stayingIntervals.concat([a.newExtent]),a.brushCallback(t),y(e.parentNode)}function b(e,t){var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=v(t,n),o="crosshair";a.clickableOrdinalRange?o="pointer":a.region&&(o=a.region+"-resize"),i.select(document.body).style("cursor",o)}function _(e){e.on("mousemove",function(e){i.event.preventDefault(),e.parent.inBrushDrag||b(this,e)}).on("mouseleave",function(e){e.parent.inBrushDrag||m()}).call(i.behavior.drag().on("dragstart",function(e){!function(e,t){i.event.sourceEvent.stopPropagation();var n=t.height-i.mouse(e)[1]-2*r.verticalPadding,a=t.unitToPaddedPx.invert(n),o=t.brush,s=v(t,n),l=s.interval,c=o.svgBrush;if(c.wasDragged=!1,c.grabbingBar="ns"===s.region,c.grabbingBar){var u=l.map(t.unitToPaddedPx);c.grabPoint=n-u[0]-r.verticalPadding,c.barLength=u[1]-u[0]}c.clickableOrdinalRange=s.clickableOrdinalRange,c.stayingIntervals=t.multiselect&&o.filterSpecified?o.filter.getConsolidated():[],l&&(c.stayingIntervals=c.stayingIntervals.filter(function(e){return e[0]!==l[0]&&e[1]!==l[1]})),c.startExtent=s.region?l[+("s"===s.region)]:a,t.parent.inBrushDrag=!0,c.brushStartCallback()}(this,e)}).on("drag",function(e){x(this,e)}).on("dragend",function(e){!function(e,t){var r=t.brush,n=r.filter,a=r.svgBrush;a._dragging||(b(e,t),x(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1,i.event.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,m(),!a.wasDragged){a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,0===a.extent.length&&M(r)):M(r),a.brushCallback(t),y(e.parentNode),a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(c?[a.newExtent]:[]),a.extent.length||M(r),a.brushCallback(t),c?y(e.parentNode,s):(s(),y(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}(this,e)}))}function w(e,t){return e[0]-t[0]}function M(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function k(e){for(var t,r=e.slice(),i=[],n=r.shift();n;){for(t=n.slice();(n=r.shift())&&n[0]<=t[1];)t[1]=Math.max(t[1],n[1]);i.push(t)}return 1===i.length&&i[0][0]>i[0][1]&&(i=[]),i}t.exports={makeBrush:function(e,t,r,i,n,a){var s,l,c,u=(c=[],{set:function(e){1===(c=e.map(function(e){return e.slice().sort(o)}).sort(w)).length&&c[0][0]===-1/0&&c[0][1]===1/0&&(c=[[0,-1]]),s=k(c),l=c.reduce(function(e,t){return[Math.min(e[0],t[0]),Math.max(e[1],t[1])]},[1/0,-1/0])},get:function(){return c.slice()},getConsolidated:function(){return s},getBounds:function(){return l}});return u.set(r),{filter:u,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:i,brushCallback:function(e){var t=e.brush,r=t.svgBrush.extent.map(function(e){return e.slice()}).slice();t.filter.set(r),n()},brushEndCallback:a}}},ensureAxisBrush:function(e,t,i){var o,l,c,u,f=e.selectAll("."+r.cn.axisBrush).data(a,n);f.enter().append("g").classed(r.cn.axisBrush,!0),o=i._context.staticPlot,(l=f.selectAll(".background").data(a)).enter().append("rect").classed("background",!0).call(h).call(d).style("pointer-events",o?"none":"auto").attr("transform",s(0,r.verticalPadding)),l.call(_).attr("height",function(e){return e.height-r.verticalPadding}),(c=f.selectAll(".highlight-shadow").data(a)).enter().append("line").classed("highlight-shadow",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width+r.bar.strokeWidth).attr("stroke",t).attr("opacity",r.bar.strokeOpacity).attr("stroke-linecap","butt"),c.attr("y1",function(e){return e.height}).call(g),(u=f.selectAll(".highlight").data(a)).enter().append("line").classed("highlight",!0).attr("x",-r.bar.width/2).attr("stroke-width",r.bar.width-r.bar.strokeWidth).attr("stroke",r.bar.fillColor).attr("opacity",r.bar.fillOpacity).attr("stroke-linecap","butt"),u.attr("y1",function(e){return e.height}).call(g)},cleanRanges:function(e,t){if(Array.isArray(e[0])?(e=e.map(function(e){return e.sort(o)}),e=t.multiselect?k(e.sort(w)):[e[0]]):e=[e.sort(o)],t.tickvals){var r=t.tickvals.slice().sort(o);if(!(e=e.map(function(e){var t=[u(0,r,e[0],[]),u(1,r,e[1],[])];if(t[1]>t[0])return t}).filter(function(e){return e})).length)return}return e.length>1?e:e[0]}}}}),yB=p({"src/traces/parcoords/defaults.js"(e,t){var r=tv(),i=tj().hasColorscale,n=tQ(),a=at().defaults,o=t$(),s=rn(),l=yO(),c=yj(),u=yR().maxDimensionCount,h=yv();function d(e,t,i,n){function a(i,n){return r.coerce(e,t,l.dimensions,i,n)}var o=a("values"),u=a("visible");if(o&&o.length||(u=t.visible=!1),u){a("label"),a("tickvals"),a("ticktext"),a("tickformat"),t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:a("range")},s.setConvert(t._ax,n.layout),a("multiselect");var h=a("constraintrange");h&&(t.constraintrange=c.cleanRanges(h,t))}}t.exports=function(e,t,s,c){function f(i,n){return r.coerce(e,t,l,i,n)}var p=e.dimensions;Array.isArray(p)&&p.length>u&&(r.log("parcoords traces support up to "+u+" dimensions at the moment"),p.splice(u));var m=o(e,t,{name:"dimensions",layout:c,handleItemDefaults:d}),g=function(e,t,a,o,s){var l=s("line.color",a);if(i(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),n(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,s,c,f);a(t,c,f),Array.isArray(m)&&m.length||(t.visible=!1),h(t,m,"values",g);var y=r.extendFlat({},c.font,{size:Math.round(c.font.size/1.2)});r.coerceFont(f,"labelfont",y),r.coerceFont(f,"tickfont",y,{autoShadowDflt:!0}),r.coerceFont(f,"rangefont",y),f("labelangle"),f("labelside"),f("unselected.line.color"),f("unselected.line.opacity")}}}),yN=p({"src/traces/parcoords/calc.js"(e,t){var r=tv().isArrayOrTypedArray,i=t3(),n=yF().wrap;t.exports=function(e,t){var a,o;return i.hasColorscale(t,"line")&&r(t.line.color)?(a=t.line.color,o=i.extractOpts(t.line).colorscale,i.calc(e,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=function(e){for(var t=Array(e),r=0;r 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),i=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),n=yR().maxDimensionCount,a=tv(),o=new Uint8Array(4),s=new Uint8Array(4),l={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function c(e,t,r,i,n){var a=e._gl;a.enable(a.SCISSOR_TEST),a.scissor(t,r,i,n),e.clear({color:[0,0,0,0],depth:1})}function u(e,t){return(e>>>8*t)%256/255}function h(e){return("0"+e).slice(-2)}function d(e){return ed&&(d=e[i].dim1.canvasX,s=i);0===l&&c(x,0,0,h.canvasWidth,h.canvasHeight);var b=function(e){var t,r,i,n=[[],[]];for(i=0;i<64;i++){var a=!e&&is._length&&(I=I.slice(0,s._length));var z,D=s.tickvals;function O(e,t){return{val:e,text:z[t]}}function R(e,t){return e.val-t.val}if(n(D)&&D.length){i.isTypedArray(D)&&(D=Array.from(D)),n(z=s.ticktext)&&z.length?z.length>D.length?z=z.slice(0,D.length):D.length>z.length&&(D=D.slice(0,z.length)):z=D.map(a(s.tickformat));for(var F=1;F=i)&&!(l>=n)){var c=e.lineLayer.readPixel(s,n-1-l),u=0!==c[3],h=u?c[2]+256*(c[1]+256*c[0]):null,d={x:s,y:l,clientX:t.clientX,clientY:t.clientY,dataIndex:e.model.key,curveNumber:h};h!==B&&(u?a.hover(d):a.unhover&&a.unhover(d),B=h)}}}),j.style("opacity",function(e){return+!e.pick}),T.style("background","rgba(255, 255, 255, 0)");var N=T.selectAll("."+v.cn.parcoords).data(F,p);N.exit().remove(),N.enter().append("g").classed(v.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),N.attr("transform",function(e){return c(e.model.translateX,e.model.translateY)});var U=N.selectAll("."+v.cn.parcoordsControlView).data(m,p);U.enter().append("g").classed(v.cn.parcoordsControlView,!0),U.attr("transform",function(e){return c(e.model.pad.l,e.model.pad.t)});var V=U.selectAll("."+v.cn.yAxis).data(function(e){return e.dimensions},p);V.enter().append("g").classed(v.cn.yAxis,!0),U.each(function(e){P(V,e,D)}),j.each(function(e){if(e.viewModel){!e.lineLayer||a?e.lineLayer=b(this,e):e.lineLayer.update(e),(e.key||0===e.key)&&(e.viewModel[e.key]=e.lineLayer);var t=!e.context||a;e.lineLayer.render(e.viewModel.panels,t)}}),V.attr("transform",function(e){return c(e.xScale(e.xIndex),0)}),V.call(r.behavior.drag().origin(function(e){return e}).on("drag",function(e){var t=e.parent;R.linePickActive(!1),e.x=Math.max(-v.overdrag,Math.min(e.model.width+v.overdrag,r.event.x)),e.canvasX=e.x*e.model.canvasPixelRatio,V.sort(function(e,t){return e.x-t.x}).each(function(t,r){t.xIndex=r,t.x=e===t?t.x:t.xScale(t.xIndex),t.canvasX=t.x*t.model.canvasPixelRatio}),P(V,t,D),V.filter(function(t){return 0!==Math.abs(e.xIndex-t.xIndex)}).attr("transform",function(e){return c(e.xScale(e.xIndex),0)}),r.select(this).attr("transform",c(e.x,0)),V.each(function(r,i,n){n===e.parent.key&&(t.dimensions[i]=r)}),t.contextLayer&&t.contextLayer.render(t.panels,!1,!A(t)),t.focusLayer.render&&t.focusLayer.render(t.panels)}).on("dragend",function(e){var t=e.parent;e.x=e.xScale(e.xIndex),e.canvasX=e.x*e.model.canvasPixelRatio,P(V,t,D),r.select(this).attr("transform",function(e){return c(e.x,0)}),t.contextLayer&&t.contextLayer.render(t.panels,!1,!A(t)),t.focusLayer&&t.focusLayer.render(t.panels),t.pickLayer&&t.pickLayer.render(t.panels,!0),R.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(t.key,t.dimensions.map(function(e){return e.crossfilterDimensionIndex}))})),V.exit().remove();var q=V.selectAll("."+v.cn.axisOverlays).data(m,p);q.enter().append("g").classed(v.cn.axisOverlays,!0),q.selectAll("."+v.cn.axis).remove();var H=q.selectAll("."+v.cn.axis).data(m,p);H.enter().append("g").classed(v.cn.axis,!0),H.each(function(e){var t=e.model.height/e.model.tickDistance,i=e.domainScale,n=i.domain();r.select(this).call(r.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(t,e.tickFormat).tickValues(e.ordinal?n:null).tickFormat(function(t){return y.isOrdinal(e)?t:I(e.model.dimensions[e.visibleIndex],t)}).scale(i)),h.font(H.selectAll("text"),e.model.tickFont)}),H.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),H.selectAll("text").style("cursor","default");var G=q.selectAll("."+v.cn.axisHeading).data(m,p);G.enter().append("g").classed(v.cn.axisHeading,!0);var W=G.selectAll("."+v.cn.axisTitle).data(m,p);W.enter().append("text").classed(v.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",f?"none":"auto"),W.text(function(e){return e.label}).each(function(t){var i=r.select(this);h.font(i,t.model.labelFont),u.convertToTspans(i,e)}).attr("transform",function(e){var t=L(e.model.labelAngle,e.model.labelSide),r=v.axisTitleOffset;return(t.dir>0?"":c(0,2*r+e.model.height))+l(t.degrees)+c(-r*t.dx,-r*t.dy)}).attr("text-anchor",function(e){var t=L(e.model.labelAngle,e.model.labelSide);return 2*Math.abs(t.dx)>Math.abs(t.dy)?t.dir*t.dx<0?"start":"end":"middle"});var Y=q.selectAll("."+v.cn.axisExtent).data(m,p);Y.enter().append("g").classed(v.cn.axisExtent,!0);var Z=Y.selectAll("."+v.cn.axisExtentTop).data(m,p);Z.enter().append("g").classed(v.cn.axisExtentTop,!0),Z.attr("transform",c(0,-v.axisExtentOffset));var $=Z.selectAll("."+v.cn.axisExtentTopText).data(m,p);$.enter().append("text").classed(v.cn.axisExtentTopText,!0).call(C),$.text(function(e){return z(e,!0)}).each(function(e){h.font(r.select(this),e.model.rangeFont)});var X=Y.selectAll("."+v.cn.axisExtentBottom).data(m,p);X.enter().append("g").classed(v.cn.axisExtentBottom,!0),X.attr("transform",function(e){return c(0,e.model.height+v.axisExtentOffset)});var K=X.selectAll("."+v.cn.axisExtentBottomText).data(m,p);K.enter().append("text").classed(v.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(C),K.text(function(e){return z(e,!1)}).each(function(e){h.font(r.select(this),e.model.rangeFont)}),x.ensureAxisBrush(q,O,e)}}}),yH=p({"src/traces/parcoords/plot.js"(e,t){var r=yq(),i=yf(),n=yU().isVisible,a={};function o(e,t,r){var i=t.indexOf(r),n=e.indexOf(i);return -1===n&&(n+=t.length),n}var e=t.exports=function(e,t){var s=e._fullLayout;if(i(e,[],a)){var l={},c={},u={},h=s._size;t.forEach(function(t,r){var i=t[0].trace,n=u[r]=i.index;l[r]=e.data[n].dimensions,c[r]=e.data[n].dimensions.slice()}),r(e,t,{width:h.w,height:h.h,margin:{t:h.t,r:h.r,b:h.b,l:h.l}},{filterChanged:function(t,r,i){var n=c[t][r],a=i.map(function(e){return e.slice()}),o="dimensions["+r+"].constraintrange",l=s._tracePreGUI[e._fullData[u[t]].uid];if(void 0===l[o]){var h=n.constraintrange;l[o]=h||null}var d=e._fullData[u[t]].dimensions[r];a.length?(1===a.length&&(a=a[0]),n.constraintrange=a,d.constraintrange=a.slice(),a=[a]):(delete n.constraintrange,delete d.constraintrange,a=null);var f={};f[o]=a,e.emit("plotly_restyle",[f,[u[t]]])},hover:function(t){e.emit("plotly_hover",t)},unhover:function(t){e.emit("plotly_unhover",t)},axesMoved:function(t,r){var i,a=(i=c[t].filter(n),function(e,t){return o(r,i,e)-o(r,i,t)});l[t].sort(a),c[t].filter(function(e){return!n(e)}).sort(function(e){return c[t].indexOf(e)}).forEach(function(e){l[t].splice(l[t].indexOf(e),1),l[t].splice(c[t].indexOf(e),0,e)}),e.emit("plotly_restyle",[{dimensions:[l[t]]},[u[t]]])}})}};e.reglPrecompiled=a}}),yG=p({"src/traces/parcoords/base_plot.js"(e){var t=T(),r=tI().getModuleCalcData,i=yH(),n=tO();e.name="parcoords",e.plot=function(e){var t=r(e.calcdata,"parcoords")[0];t.length&&i(e,t)},e.clean=function(e,t,r,i){var n=i._has&&i._has("parcoords"),a=t._has&&t._has("parcoords");n&&!a&&(i._paperdiv.selectAll(".parcoords").remove(),i._glimages.selectAll("*").remove())},e.toSVG=function(e){var r=e._fullLayout._glimages,i=t.select(e).selectAll(".svg-container");i.filter(function(e,t){return t===i.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var e=this.toDataURL("image/png");r.append("svg:image").attr({xmlns:n.svg,"xlink:href":e,preserveAspectRatio:"none",x:0,y:0,width:this.style.width,height:this.style.height})}),window.setTimeout(function(){t.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),yW=p({"src/traces/parcoords/base_index.js"(e,t){t.exports={attributes:yO(),supplyDefaults:yB(),calc:yN(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:yG(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),yY=p({"src/traces/parcoords/index.js"(e,t){var r=yW();r.plot=yH(),t.exports=r}}),yZ=p({"lib/parcoords.js"(e,t){t.exports=yY()}}),y$=p({"src/traces/parcats/attributes.js"(e,t){var r=q().extendFlat,i=Z(),n=H(),a=tV(),{hovertemplateAttrs:o,templatefallbackAttrs:s}=eW(),l=at().attributes,c=r({editType:"calc"},a("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:s({editType:"plot"})});t.exports={domain:l({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:r({},i.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:o({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:s({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:n({editType:"calc"}),tickfont:n({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:c,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),yX=p({"src/traces/parcats/defaults.js"(e,t){var r=tv(),i=tj().hasColorscale,n=tQ(),a=at().defaults,o=t$(),s=y$(),l=yv(),c=z().isTypedArraySpec;function u(e,t){function i(i,n){return r.coerce(e,t,s.dimensions,i,n)}var n=i("values"),a=i("visible");if(n&&n.length||(a=t.visible=!1),a){i("label"),i("displayindex",t._index);var o,l=e.categoryarray,u=r.isArrayOrTypedArray(l)&&l.length>0||c(l);u&&(o="array");var h=i("categoryorder",o);"array"===h?(i("categoryarray"),i("ticktext")):(delete e.categoryarray,delete e.ticktext),u||"array"!==h||(t.categoryorder="trace")}}t.exports=function(e,t,c,h){function d(i,n){return r.coerce(e,t,s,i,n)}var f=o(e,t,{name:"dimensions",handleItemDefaults:u}),p=function(e,t,a,o,s){s("line.shape"),s("line.hovertemplate"),s("line.hovertemplatefallback");var l=s("line.color",o.colorway[0]);if(i(e,"line")&&r.isArrayOrTypedArray(l)){if(l.length)return s("line.colorscale"),n(e,t,o,s,{prefix:"line.",cLetter:"c"}),l.length;t.line.color=a}return 1/0}(e,t,c,h,d);a(t,h,d),Array.isArray(f)&&f.length||(t.visible=!1),l(t,f,"values",p),d("hoveron"),d("hovertemplate"),d("hovertemplatefallback"),d("arrangement"),d("bundlecolors"),d("sortpaths"),d("counts");var m=h.font;r.coerceFont(d,"labelfont",m,{overrideDflt:{size:Math.round(m.size)}}),r.coerceFont(d,"tickfont",m,{autoShadowDflt:!0,overrideDflt:{size:Math.round(m.size/1.2)}})}}}),yK=p({"src/traces/parcats/calc.js"(e,t){var r=yF().wrap,i=tj().hasColorscale,n=t2(),a=ts(),o=t9(),s=tv(),l=C();t.exports=function(e,t){var c,u,h,d,f,p,m=s.filterVisible(t.dimensions);if(0===m.length)return[];var g,y,v,x=m.map(function(e){var t;if("trace"===e.categoryorder)t=null;else if("array"===e.categoryorder)t=e.categoryarray;else{t=a(e.values);for(var r=!0,i=0;i=e.length||void 0!==t[e[r]])return!1;t[e[r]]=!0}return!0}(e.map(function(e){return e.displayindex})))for(t=0;tt.model.rawColor?1:e.model.rawColor"),C=r.mouse(h)[0];o.loneHover({trace:d,x:b-p.left+m.left,y:w-p.top+m.top,text:E,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:T,idealAlign:Ca.mostReadable(e.model.color)).attr("stroke-width",.3)}function w(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function M(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function k(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,i=e.categoryViewModel.model.categoryInd;return t.filter(function(t){return t.model.categoryInds[r]===i&&t.model.color===e.color})}function A(e,t,i){var n=r.select(e).datum(),a=n.categoryViewModel.model,o=n.parcatsViewModel.graphDiv,s=r.select(e.parentNode).selectAll("rect.bandrect"),l=[];s.each(function(e){k(e).each(function(e){Array.prototype.push.apply(l,g(e))})});var c={};c[a.dimensionInd]=a.categoryValue,o.emit(t,{points:l,event:i,constraints:c})}function S(e,t,i){var n=r.select(e).datum(),a=n.categoryViewModel.model,o=n.parcatsViewModel.graphDiv,s=k(n),l=[];s.each(function(e){Array.prototype.push.apply(l,g(e))});var c={};c[a.dimensionInd]=a.categoryValue,void 0!==n.rawColor&&(c.color=n.rawColor),o.emit(t,{points:l,event:i,constraints:c})}function E(e,t,i){e._fullLayout._calcInverseTransform(e);var n,a,o=e._fullLayout._invScaleX,s=e._fullLayout._invScaleY,l=r.select(i.parentNode).select("rect.catrect"),c=l.node().getBoundingClientRect(),u=l.datum(),h=u.parcatsViewModel,d=h.model.dimensions[u.model.dimensionInd],f=h.trace,p=c.top+c.height/2;h.dimensions.length>1&&d.displayInd===h.dimensions.length-1?(n=c.left,a="left"):(n=c.left+c.width,a="right");var m=u.model.count,g=u.model.categoryLabel,y=m/u.parcatsViewModel.model.count,v={countLabel:m,categoryLabel:g,probabilityLabel:y.toFixed(3)},x=[];-1!==u.parcatsViewModel.hoverinfoItems.indexOf("count")&&x.push(["Count:",v.countLabel].join(" ")),-1!==u.parcatsViewModel.hoverinfoItems.indexOf("probability")&&x.push(["P("+v.categoryLabel+"):",v.probabilityLabel].join(" "));var b=x.join("
");return{trace:f,x:o*(n-t.left),y:s*(p-t.top),text:b,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:a,hovertemplate:f.hovertemplate,hovertemplateLabels:v,eventData:[{data:f._input,fullData:f,count:m,category:g,probability:y}]}}function C(e){if(!e.parcatsViewModel.dragDimension&&-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")){var t;if(!(r.mouse(this)[1]<-1)){var i,n,l,c,u,h,d,f,p,m,g,y,v,x,b,w,T,M,C,L,P,I,z,D,O,R,F,j=e.parcatsViewModel.graphDiv,B=j._fullLayout,N=B._paperdiv.node().getBoundingClientRect(),U=e.parcatsViewModel.hoveron;("color"===U?(_(l=k(n=r.select(this).datum())),l.each(function(){s.raiseToTop(this)}),r.select(this.parentNode).selectAll("rect.bandrect").filter(function(e){return e.color===n.color}).each(function(){s.raiseToTop(this),r.select(this).attr("stroke","black").attr("stroke-width",1.5)}),S(this,"plotly_hover",r.event)):(i=this,r.select(i.parentNode).selectAll("rect.bandrect").each(function(e){var t=k(e);_(t),t.each(function(){s.raiseToTop(this)})}),r.select(i.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5),A(this,"plotly_hover",r.event)),-1===e.parcatsViewModel.hoverinfoItems.indexOf("none"))&&("category"===U?t=E(j,N,this):"color"===U?(j._fullLayout._calcInverseTransform(j),h=j._fullLayout._invScaleX,d=j._fullLayout._invScaleY,f=this.getBoundingClientRect(),y=(g=(m=(p=r.select(this).datum()).categoryViewModel).parcatsViewModel).model.dimensions[m.model.dimensionInd],v=g.trace,x=f.y+f.height/2,g.dimensions.length>1&&y.displayInd===g.dimensions.length-1?(c=f.left,u="left"):(c=f.left+f.width,u="right"),b=m.model.categoryLabel,w=p.parcatsViewModel.model.count,T=0,p.categoryViewModel.bands.forEach(function(e){e.color===p.color&&(T+=e.count)}),M=m.model.count,C=0,g.pathSelection.each(function(e){e.model.color===p.color&&(C+=e.model.count)}),L=T/w,P=T/C,I=T/M,z={countLabel:T,categoryLabel:b,probabilityLabel:L.toFixed(3)},D=[],-1!==m.parcatsViewModel.hoverinfoItems.indexOf("count")&&D.push(["Count:",z.countLabel].join(" ")),-1!==m.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(D.push("P(color ∩ "+b+"): "+z.probabilityLabel),D.push("P("+b+" | color): "+P.toFixed(3)),D.push("P(color | "+b+"): "+I.toFixed(3))),O=D.join("
"),R=a.mostReadable(p.color),t={trace:v,x:h*(c-N.left),y:d*(x-N.top),text:O,color:p.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:R,fontSize:10,idealAlign:u,hovertemplate:v.hovertemplate,hovertemplateLabels:z,eventData:[{data:v._input,fullData:v,category:b,count:w,probability:L,categorycount:M,colorcount:C,bandcolorcount:T}]}):"dimension"===U&&(F=[],r.select(this.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){F.push(E(j,N,this))}),t=F),t&&o.loneHover(t,{container:B._hoverlayer.node(),outerContainer:B._paper.node(),gd:j}))}}}function L(e){var t=e.parcatsViewModel;t.dragDimension||(b(t.pathSelection),w(t.dimensionSelection.selectAll("g.category")),M(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),o.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(f),-1!==t.hoverinfoItems.indexOf("skip"))||("color"===e.parcatsViewModel.hoveron?S(this,"plotly_unhover",r.event):A(this,"plotly_unhover",r.event))}function P(e){"fixed"!==e.parcatsViewModel.arrangement&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(e){return e.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,r.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var i=r.mouse(this)[0],n=r.mouse(this)[1];-2<=i&&i<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(e){return e.displayInd}),t.model.dragY=t.y,s.raiseToTop(this.parentNode),r.select(this.parentNode).selectAll("rect.bandrect").each(function(t){t.yc.y+c.height/2&&(n.model.displayInd=c.model.displayInd,c.model.displayInd=o),e.dragCategoryDisplayInd=n.model.displayInd}if(null===e.dragCategoryDisplayInd||"freeform"===e.parcatsViewModel.arrangement){i.model.dragX=r.event.x;var u=e.parcatsViewModel.dimensions[t-1],h=e.parcatsViewModel.dimensions[t+1];void 0!==u&&i.model.dragXh.x&&(i.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=i.model.displayInd}N(e.parcatsViewModel),B(e.parcatsViewModel),R(e.parcatsViewModel),O(e.parcatsViewModel)}}function z(e){if("fixed"!==e.parcatsViewModel.arrangement&&null!==e.dragDimensionDisplayInd){r.select(this).selectAll("text").attr("font-weight","normal");var t={},i=D(e.parcatsViewModel),a=e.parcatsViewModel.model.dimensions.map(function(e){return e.displayInd}),o=e.initialDragDimensionDisplayInds.some(function(e,t){return e!==a[t]});o&&a.forEach(function(r,i){t["dimensions["+e.parcatsViewModel.model.dimensions[i].containerInd+"].displayindex"]=r});var s=!1;if(null!==e.dragCategoryDisplayInd){var l=e.model.categories.map(function(e){return e.displayInd});if(s=e.initialDragCategoryDisplayInds.some(function(e,t){return e!==l[t]})){var c=e.model.categories.slice().sort(function(e,t){return e.displayInd-t.displayInd}),u=c.map(function(e){return e.categoryValue}),h=c.map(function(e){return e.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[u],t["dimensions["+e.model.containerInd+"].ticktext"]=[h],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}-1===e.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!e.dragHasMoved&&e.potentialClickBand&&("color"===e.parcatsViewModel.hoveron?S(e.potentialClickBand,"plotly_click",r.event.sourceEvent):A(e.potentialClickBand,"plotly_click",r.event.sourceEvent)),e.model.dragX=null,null!==e.dragCategoryDisplayInd&&(e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd].model.dragY=null,e.dragCategoryDisplayInd=null),e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,N(e.parcatsViewModel),B(e.parcatsViewModel),r.transition().duration(300).ease("cubic-in-out").each(function(){R(e.parcatsViewModel,!0),O(e.parcatsViewModel,!0)}).each("end",function(){(o||s)&&n.restyle(e.parcatsViewModel.graphDiv,t,[i])})}}function D(e){for(var t,r=e.graphDiv._fullData,i=0;i=0;s--)u+="C"+c[s]+","+(t[s+1]+n)+" "+l[s]+","+(t[s]+n)+" "+(e[s]+r[s])+","+(t[s]+n)+("l-"+r[s])+",0 ";return u+"Z"}function B(e){var t=e.dimensions,r=e.model,i=t.map(function(e){return e.categories.map(function(e){return e.y})}),n=e.model.dimensions.map(function(e){return e.categories.map(function(e){return e.displayInd})}),a=e.model.dimensions.map(function(e){return e.displayInd}),o=e.dimensions.map(function(e){return e.model.dimensionInd}),s=t.map(function(e){return e.x}),l=t.map(function(e){return e.width}),c=[];for(var u in r.paths)r.paths.hasOwnProperty(u)&&c.push(r.paths[u]);function h(e){var t=e.categoryInds.map(function(e,t){return n[t][e]});return o.map(function(e){return t[e]})}c.sort(function(t,r){var i=h(t),n=h(r);return"backward"===e.sortpaths&&(i.reverse(),n.reverse()),i.push(t.valueInds[0]),n.push(r.valueInds[0]),e.bundlecolors&&(i.unshift(t.rawColor),n.unshift(r.rawColor)),function(e,t){for(var r=0;rn)return 1;if(i!==n){var a=isNaN(i);if(a!==isNaN(n))return a?1:-1}}return e.length-t.length}(i,n)});for(var d=Array(c.length),f=t[0].model.count,p=t[0].categories.map(function(e){return e.height}).reduce(function(e,t){return e+t}),m=0;m0?p*(v.count/f):0;for(var x=Array(i.length),b=0;b1?(e.width-80-16)/(i-1):0)*n;var a,o,s,l,c,u=[],h=e.model.maxCats,d=t.categories.length,f=t.count,p=e.height-8*(h-1),m=(h-d)*8/2,g=t.categories.map(function(e){return{displayInd:e.displayInd,categoryInd:e.categoryInd}});for(g.sort(function(e,t){return e.displayInd-t.displayInd}),c=0;c0?o.count/f*p:0,s={key:o.valueInds[0],model:o,width:16,height:a,y:null!==o.dragY?o.dragY:m,bands:[],parcatsViewModel:e},m=m+a+8,u.push(s);return{key:t.dimensionInd,x:null!==t.dragX?t.dragX:r,y:0,width:16,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}(e,a))}e.dimensions=r}t.exports=function(e,t,i,n){var a,o,g,y,v,_,T,k,A,S,E,D;a=e._context.staticPlot,o=i.map(F.bind(0,e,n)),(g=t.selectAll("g.parcatslayer").data([null])).enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all"),v=(y=g.selectAll("g.trace.parcats").data(o,h)).enter().append("g").attr("class","trace parcats"),y.attr("transform",function(e){return l(e.x,e.y)}),v.append("g").attr("class","paths"),(_=y.select("g.paths").selectAll("path.path").data(function(e){return e.paths},h)).attr("fill",function(e){return e.model.color}),b(T=_.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(e){return e.model.color}).attr("fill-opacity",0)),_.attr("d",function(e){return e.svgD}),T.empty()||_.sort(f),_.exit().remove(),_.on("mouseover",p).on("mouseout",m).on("click",x),v.append("g").attr("class","dimensions"),(k=y.select("g.dimensions").selectAll("g.dimension").data(function(e){return e.dimensions},h)).enter().append("g").attr("class","dimension"),k.attr("transform",function(e){return l(e.x,0)}),k.exit().remove(),S=(A=k.selectAll("g.category").data(function(e){return e.categories},h)).enter().append("g").attr("class","category"),A.attr("transform",function(e){return l(0,e.y)}),S.append("rect").attr("class","catrect").attr("pointer-events","none"),A.select("rect.catrect").attr("fill","none").attr("width",function(e){return e.width}).attr("height",function(e){return e.height}),w(S),(E=A.selectAll("rect.bandrect").data(function(e){return e.bands},h)).each(function(){s.raiseToTop(this)}),E.attr("fill",function(e){return e.color}),D=E.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(e){return e.color}).attr("fill-opacity",0),E.attr("fill",function(e){return e.color}).attr("width",function(e){return e.width}).attr("height",function(e){return e.height}).attr("y",function(e){return e.y}).attr("cursor",function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"perpendicular"===e.parcatsViewModel.arrangement?"ns-resize":"move"}),M(D),E.exit().remove(),S.append("text").attr("class","catlabel").attr("pointer-events","none"),A.select("text.catlabel").attr("text-anchor",function(e){return d(e)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(e){return d(e)?e.width+5:-5}).attr("y",function(e){return e.height/2}).text(function(e){return e.model.categoryLabel}).each(function(t){c.font(r.select(this),t.parcatsViewModel.categorylabelfont),u.convertToTspans(r.select(this),e)}),S.append("text").attr("class","dimlabel"),A.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(e){return"fixed"===e.parcatsViewModel.arrangement?"default":"ew-resize"}).attr("x",function(e){return e.width/2}).attr("y",-5).text(function(e,t){return 0===t?e.parcatsViewModel.model.dimensions[e.model.dimensionInd].dimensionLabel:null}).each(function(e){c.font(r.select(this),e.parcatsViewModel.labelfont)}),A.selectAll("rect.bandrect").on("mouseover",C).on("mouseout",L),A.exit().remove(),k.call(r.behavior.drag().origin(function(e){return{x:e.x,y:0}}).on("dragstart",P).on("drag",I).on("dragend",z)),y.each(function(e){e.traceSelection=r.select(this),e.pathSelection=r.select(this).selectAll("g.paths").selectAll("path.path"),e.dimensionSelection=r.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),y.exit().remove()}}}),yQ=p({"src/traces/parcats/plot.js"(e,t){var r=yJ();t.exports=function(e,t,i,n){var a=e._fullLayout,o=a._paper,s=a._size;r(e,o,t,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},i,n)}}}),y0=p({"src/traces/parcats/base_plot.js"(e){var t=tI().getModuleCalcData,r=yQ(),i="parcats";e.name=i,e.plot=function(e,n,a,o){var s=t(e.calcdata,i);s.length&&r(e,s[0],a,o)},e.clean=function(e,t,r,i){var n=i._has&&i._has("parcats"),a=t._has&&t._has("parcats");n&&!a&&i._paperdiv.selectAll(".parcats").remove()}}}),y1=p({"src/traces/parcats/index.js"(e,t){t.exports={attributes:y$(),supplyDefaults:yX(),calc:yK(),plot:yQ(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:y0(),categories:["noOpacity"],meta:{}}}}),y2=p({"lib/parcats.js"(e,t){t.exports=y1()}}),y3=p({"src/plots/map/styles/arcgis-sat-hybrid.js"(e,t){t.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI ©
ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} +{name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin} +{name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} +{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),y5=p({"src/plots/map/styles/arcgis-sat.js"(e,t){t.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),y4=p({"src/plots/map/constants.js"(e,t){var r=(e6(),v(e3)).default,i=y3(),n=y5(),a="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",o="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",s="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",l={basic:s,streets:s,outdoors:s,light:a,dark:o,satellite:n,"satellite-streets":i,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:'\xa9 OpenStreetMap contributors',tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":a,"carto-darkmatter":o,"carto-voyager":s,"carto-positron-nolabels":"https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json","carto-darkmatter-nolabels":"https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json","carto-voyager-nolabels":"https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json"},c=r(l);t.exports={styleValueDflt:"basic",stylesMap:l,styleValuesMap:c,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",c.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),y6=p({"src/plots/map/layout_attributes.js"(e,t){var r=tv(),i=ee().defaultLine,n=at().attributes,a=H(),o=ix().textposition,s=eq().overrideAll,l=tS().templatedArray,c=y4(),u=a({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});u.family.dflt="Open Sans Regular, Arial Unicode MS Regular",(t.exports=s({_arrayAttrRegexps:[r.counterRegex("map",".layers",!0)],domain:n({name:"map"}),style:{valType:"any",values:c.styleValuesMap,dflt:c.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:l("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:i},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:i}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:u,textposition:r.extendFlat({},o,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}}}),y8=p({"src/traces/scattermap/attributes.js"(e,t){var{hovertemplateAttrs:r,texttemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=iv(),o=pl(),s=ix(),l=y6(),c=Z(),u=tV(),h=q().extendFlat,d=eq().overrideAll,f=y6(),p=o.line,m=o.marker;t.exports=d({lon:o.lon,lat:o.lat,cluster:{enabled:{valType:"boolean"},maxzoom:h({},f.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:h({},m.opacity,{dflt:1})},mode:h({},s.mode,{dflt:"markers"}),text:h({},s.text,{}),texttemplate:i({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:n({editType:"plot"}),hovertext:h({},s.hovertext,{}),line:{color:p.color,width:p.width},connectgaps:s.connectgaps,marker:h({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},u("marker")),fill:o.fill,fillcolor:a(),textfont:l.layers.symbol.textfont,textposition:l.layers.symbol.textposition,below:{valType:"string"},selected:{marker:s.selected.marker},unselected:{marker:s.unselected.marker},hoverinfo:h({},c.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:r(),hovertemplatefallback:n()},"calc","nested")}}),y7=p({"src/traces/scattermap/constants.js"(e,t){var r=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];t.exports={isSupportedFont:function(e){return -1!==r.indexOf(e)}}}}),y9=p({"src/traces/scattermap/defaults.js"(e,t){var r=tv(),i=t5(),n=iq(),a=iH(),o=iW(),s=iY(),l=y8(),c=y7().isSupportedFont;t.exports=function(e,t,u,h){function d(i,n){return r.coerce(e,t,l,i,n)}function f(i,n){return r.coerce2(e,t,l,i,n)}if(p=t,g=(m=d)("lon")||[],y=m("lat")||[],p._length=v=Math.min(g.length,y.length),!v){t.visible=!1;return}if(d("text"),d("texttemplate"),d("texttemplatefallback"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback"),d("mode"),d("below"),i.hasMarkers(t)){n(e,t,u,h,d,{noLine:!0,noAngle:!0}),d("marker.allowoverlap"),d("marker.angle");var p,m,g,y,v,x=t.marker;"circle"!==x.symbol&&(r.isArrayOrTypedArray(x.size)&&(x.size=x.size[0]),r.isArrayOrTypedArray(x.color)&&(x.color=x.color[0]))}i.hasLines(t)&&(a(e,t,u,h,d,{noDash:!0}),d("connectgaps"));var b=f("cluster.maxzoom"),_=f("cluster.step"),w=f("cluster.color",t.marker&&t.marker.color||u),T=f("cluster.size"),M=f("cluster.opacity");if(d("cluster.enabled",!1!==b||!1!==_||!1!==w||!1!==T||!1!==M)||i.hasText(t)){var k=h.font.family;o(e,t,h,d,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:c(k)?k:"Open Sans Regular",weight:h.font.weight,style:h.font.style,size:h.font.size,color:h.font.color}})}d("fill"),"none"!==t.fill&&s(e,t,u,d),r.coerceSelectionMarkerOpacity(t,d)}}}),ve=p({"src/traces/scattermap/format_labels.js"(e,t){var r=rn();t.exports=function(e,t,i){var n={},a=i[t.subplot]._subplot.mockAxis,o=e.lonlat;return n.lonLabel=r.tickText(a,a.c2l(o[0]),!0).text,n.latLabel=r.tickText(a,a.c2l(o[1]),!0).text,n}}}),vt=p({"src/plots/map/convert_text_opts.js"(e,t){var r=tv();t.exports=function(e,t){var i=e.split(" "),n=i[0],a=i[1],o=r.isArrayOrTypedArray(t)?r.mean(t):t,s=.5+o/100,l=1.5+o/100,c=["",""],u=[0,0];switch(n){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}}}}),vr=p({"src/traces/scattermap/convert.js"(e,t){var r=C(),i=tv(),n=L().BADNUM,a=pm(),o=t3(),s=t9(),l=t4(),c=t5(),u=y7().isSupportedFont,h=vt(),d=t6().appendArrayPointValue,f=tF().NEWLINES,p=tF().BR_TAG_ALL;function m(e){return{type:e,geojson:a.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function g(e,t){return i.isArrayOrTypedArray(e)?t?function(t){return r(e[t])?+e[t]:0}:function(t){return e[t]}:e?function(){return e}:y}function y(){return""}function v(e,t){var r;if(i.isArrayOrTypedArray(e)&&i.isArrayOrTypedArray(t)){r=["step",["get","point_count"],e[0]];for(var n=1;n850?s+=" Black":n>750?s+=" Extra Bold":n>650?s+=" Bold":n>550?s+=" Semi Bold":n>450?s+=" Medium":n>350?s+=" Regular":n>250?s+=" Light":n>150?s+=" Extra Light":s+=" Thin"):"Open Sans"===a.slice(0,2).join(" ")?(s="Open Sans",n>750?s+=" Extrabold":n>650?s+=" Bold":n>550?s+=" Semibold":n>350?s+=" Regular":s+=" Light"):"Klokantech Noto Sans"===a.slice(0,3).join(" ")&&(s="Klokantech Noto Sans","CJK"===a[3]&&(s+=" CJK"),s+=n>500?" Bold":" Regular")),o&&(s+=" Italic"),"Open Sans Regular Italic"===s?s="Open Sans Italic":"Open Sans Regular Bold"===s?s="Open Sans Bold":"Open Sans Regular Bold Italic"===s?s="Open Sans Bold Italic":"Klokantech Noto Sans Regular Italic"===s&&(s="Klokantech Noto Sans Italic"),u(s)||(s=r),s.split(", ")}t.exports=function(e,t){var u,b=t[0].trace,_=!0===b.visible&&0!==b._length,w="none"!==b.fill,T=c.hasLines(b),M=c.hasMarkers(b),k=c.hasText(b),A=M&&"circle"===b.marker.symbol,S=M&&"circle"!==b.marker.symbol,E=b.cluster&&b.cluster.enabled,C=m("fill"),L=m("line"),P=m("circle"),I=m("symbol"),z={fill:C,line:L,circle:P,symbol:I};if(!_)return z;if((w||T)&&(u=a.calcTraceToLineCoords(t)),w&&(C.geojson=a.makePolygon(u),C.layout.visibility="visible",i.extendFlat(C.paint,{"fill-color":b.fillcolor})),T&&(L.geojson=a.makeLine(u),L.layout.visibility="visible",i.extendFlat(L.paint,{"line-width":b.line.width,"line-color":b.line.color,"line-opacity":b.opacity})),A){var D=function(e){var t,a,c,u,h,d=e[0].trace,f=d.marker,p=d.selectedpoints,m=i.isArrayOrTypedArray(f.color),g=i.isArrayOrTypedArray(f.size),y=i.isArrayOrTypedArray(f.opacity);function v(e){return d.opacity*e}m&&(t=o.hasColorscale(d,"marker")?o.makeColorScaleFuncFromTrace(f):i.identity),g&&(a=l(d)),y&&(c=function(e){return v(r(e)?+i.constrain(e,0,1):0)});var x=[];for(h=0;h=0;t--){var r=a[t];n.removeLayer(h.layerIds[r])}e||n.removeSource(h.sourceIds.circle)}(e):function(e){for(var t=o.length-1;t>=0;t--){var r=o[t];n.removeLayer(h.layerIds[r]),e||n.removeSource(h.sourceIds[r])}}(e)}function f(e){c?function(e){e||h.addSource("circle",s.circle,t.cluster);for(var r=0;r=0;r--){var i=t[r];e.removeLayer(this.layerIds[i]),e.removeSource(this.sourceIds[i])}},t.exports=function(e,t){var r,n,l,c=t[0].trace,u=c.cluster&&c.cluster.enabled,h=!0!==c.visible,d=new s(e,c.uid,u,h),f=i(e.gd,t),p=d.below=e.belowLookup["trace-"+c.uid];if(u)for(d.addSource("circle",f.circle,c.cluster),r=0;r")}}t.exports={hoverPoints:function(e,t,a){var c=e.cd,u=c[0].trace,h=e.xa,d=e.ya,f=e.subplot,p=[],m=s+u.uid+"-circle",g=u.cluster&&u.cluster.enabled;g&&(p=f.map.queryRenderedFeatures(null,{layers:[m]}).map(function(e){return e.id}));var y=360*(t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360)),v=t-y;if(r.getClosest(c,function(e){var t=e.lonlat;if(t[0]===o||g&&-1===p.indexOf(e.i+1))return 1/0;var r=i.modHalf(t[0],360),n=t[1],s=f.project([r,n]),l=s.x-h.c2p([v,n]),c=s.y-d.c2p([r,a]),u=Math.max(3,e.mrc||0);return Math.max(Math.sqrt(l*l+c*c)-u,1-3/u)},e),!1!==e.index){var x=c[e.index],b=x.lonlat,_=[i.modHalf(b[0],360)+y,b[1]],w=h.c2p(_),T=d.c2p(_),M=x.mrc||1;e.x0=w-M,e.x1=w+M,e.y0=T-M,e.y1=T+M;var k={};k[u.subplot]={_subplot:f};var A=u._module.formatLabels(x,u,k);return e.lonLabel=A.lonLabel,e.latLabel=A.latLabel,e.color=n(u,x),e.extraText=l(u,x,c[0].t.labels),e.hovertemplate=u.hovertemplate,[e]}},getExtraText:l}}}),va=p({"src/traces/scattermap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e}}}),vo=p({"src/traces/scattermap/select.js"(e,t){var r=tv(),i=t5(),{BADNUM:n}=L();t.exports=function(e,t){var a;let{cd:o,xaxis:s,yaxis:l}=e,{trace:c}=o[0];if(!i.hasMarkers(c))return[];if(!1===t){for(let e of o)e.selected=0;return[]}let u=null==(a=s._subplot)?void 0:a.map,h=u?.getRenderWorldCopies()&&t.xmax>t.xmin?u.transform.worldSize:0,d=[];for(let i=0;itypeof window&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([a],{type:"text/javascript"}))),e}}return r("shared",["exports"],function(e){let t,r,i,n,a,o,s,l,c,u,h,f,p,m,g,y,v,x,b;function _(e,t,r,i){return new(r||(r=Promise))(function(n,a){function o(e){try{l(i.next(e))}catch(e){a(e)}}function s(e){try{l(i.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,s)}l((i=i.apply(e,t||[])).next())})}function w(e,t){this.x=e,this.y=t}function T(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}"function"==typeof SuppressedError&&SuppressedError,w.prototype={clone(){return new w(this.x,this.y)},add(e){return this.clone()._add(e)},sub(e){return this.clone()._sub(e)},multByPoint(e){return this.clone()._multByPoint(e)},divByPoint(e){return this.clone()._divByPoint(e)},mult(e){return this.clone()._mult(e)},div(e){return this.clone()._div(e)},rotate(e){return this.clone()._rotate(e)},rotateAround(e,t){return this.clone()._rotateAround(e,t)},matMult(e){return this.clone()._matMult(e)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(e){return this.x===e.x&&this.y===e.y},dist(e){return Math.sqrt(this.distSqr(e))},distSqr(e){let t=e.x-this.x,r=e.y-this.y;return t*t+r*r},angle(){return Math.atan2(this.y,this.x)},angleTo(e){return Math.atan2(this.y-e.y,this.x-e.x)},angleWith(e){return this.angleWithSep(e.x,e.y)},angleWithSep(e,t){return Math.atan2(this.x*t-this.y*e,this.x*e+this.y*t)},_matMult(e){let t=e[2]*this.x+e[3]*this.y;return this.x=e[0]*this.x+e[1]*this.y,this.y=t,this},_add(e){return this.x+=e.x,this.y+=e.y,this},_sub(e){return this.x-=e.x,this.y-=e.y,this},_mult(e){return this.x*=e,this.y*=e,this},_div(e){return this.x/=e,this.y/=e,this},_multByPoint(e){return this.x*=e.x,this.y*=e.y,this},_divByPoint(e){return this.x/=e.x,this.y/=e.y,this},_unit(){return this._div(this.mag()),this},_perp(){let e=this.y;return this.y=this.x,this.x=-e,this},_rotate(e){let t=Math.cos(e),r=Math.sin(e),i=r*this.x+t*this.y;return this.x=t*this.x-r*this.y,this.y=i,this},_rotateAround(e,t){let r=Math.cos(e),i=Math.sin(e),n=t.y+i*(this.x-t.x)+r*(this.y-t.y);return this.x=t.x+r*(this.x-t.x)-i*(this.y-t.y),this.y=n,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:w},w.convert=function(e){if(e instanceof w)return e;if(Array.isArray(e))return new w(+e[0],+e[1]);if(void 0!==e.x&&void 0!==e.y)return new w(+e.x,+e.y);throw Error("Expected [x, y] or {x, y} point format")};var M,k,A,S,E,C,L,P,I,z,D,O,R,F,j,B,N,U,V,q,H,G,W,Y,Z=T(function(){if(rd)return rh;function e(e,t,r,i){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=i}return rd=1,rh=e,e.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,i=0;i<8;i++){var n=this.sampleCurveX(r)-e;if(Math.abs(n)Math.abs(a))break;r-=n/a}var o=0,s=1;for(r=e,i=0;i<20&&!(Math.abs((n=this.sampleCurveX(r))-e)n?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},rh}());function $(){return null!=t||(t="u">typeof OffscreenCanvas&&new OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof createImageBitmap),t}function X(){if(null==r&&(r=!1,$())){let e=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(e){for(let t=0;t<25;t++){let r=4*t;e.fillStyle=`rgb(${r},${r+1},${r+2})`,e.fillRect(t%5,Math.floor(t/5),1,1)}let t=e.getImageData(0,0,5,5).data;for(let e=0;e<100;e++)if(e%4!=3&&t[e]!==e){r=!0;break}}}return r||!1}var K="u">typeof Float32Array?Float32Array:Array;function J(){var e=new K(9);return K!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[5]=0,e[6]=0,e[7]=0),e[0]=1,e[4]=1,e[8]=1,e}function Q(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function ee(){var e=new K(3);return K!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function et(e){var t=e[0],r=e[1],i=e[2];return Math.sqrt(t*t+r*r+i*i)}function er(e,t,r){var i=new K(3);return i[0]=e,i[1]=t,i[2]=r,i}function ei(e,t,r){return e[0]=t[0]+r[0],e[1]=t[1]+r[1],e[2]=t[2]+r[2],e}function en(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e}function ea(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[0],s=r[1],l=r[2];return e[0]=n*l-a*s,e[1]=a*o-i*l,e[2]=i*s-n*o,e}function eo(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3];return e[0]=r[0]*i+r[4]*n+r[8]*a+r[12]*o,e[1]=r[1]*i+r[5]*n+r[9]*a+r[13]*o,e[2]=r[2]*i+r[6]*n+r[10]*a+r[14]*o,e[3]=r[3]*i+r[7]*n+r[11]*a+r[15]*o,e}function es(){var e=new K(4);return K!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e[3]=1,e}function el(e,t,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"zyx",a=Math.PI/360;t*=a,i*=a,r*=a;var o=Math.sin(t),s=Math.cos(t),l=Math.sin(r),c=Math.cos(r),u=Math.sin(i),h=Math.cos(i);switch(n){case"xyz":e[0]=o*c*h+s*l*u,e[1]=s*l*h-o*c*u,e[2]=s*c*u+o*l*h,e[3]=s*c*h-o*l*u;break;case"xzy":e[0]=o*c*h-s*l*u,e[1]=s*l*h-o*c*u,e[2]=s*c*u+o*l*h,e[3]=s*c*h+o*l*u;break;case"yxz":e[0]=o*c*h+s*l*u,e[1]=s*l*h-o*c*u,e[2]=s*c*u-o*l*h,e[3]=s*c*h+o*l*u;break;case"yzx":e[0]=o*c*h+s*l*u,e[1]=s*l*h+o*c*u,e[2]=s*c*u-o*l*h,e[3]=s*c*h-o*l*u;break;case"zxy":e[0]=o*c*h-s*l*u,e[1]=s*l*h+o*c*u,e[2]=s*c*u+o*l*h,e[3]=s*c*h-o*l*u;break;case"zyx":e[0]=o*c*h-s*l*u,e[1]=s*l*h+o*c*u,e[2]=s*c*u-o*l*h,e[3]=s*c*h+o*l*u;break;default:throw Error("Unknown angle order "+n)}return e}function ec(){var e=new K(2);return K!=Float32Array&&(e[0]=0,e[1]=0),e}function eu(e,t){var r=new K(2);return r[0]=e,r[1]=t,r}function eh(e,t,r){return t*(8192/(e.tileSize*Math.pow(2,r-e.tileID.overscaledZ)))}function ed(e){return e instanceof Error?e:Error("string"==typeof e?e:String(e))}function ef(e,t){return(e%t+t)%t}function ep(e,t,r){return e*(1-r)+t*r}function em(e){if(e<=0)return 0;if(e>=1)return 1;let t=e*e,r=t*e;return 4*(e<.5?r:3*(e-t)+r-.75)}function eg(e,t,r,i){let n=new Z(e,t,r,i);return e=>n.solve(e)}ee(),rf=new K(4),K!=Float32Array&&(rf[0]=0,rf[1]=0,rf[2]=0,rf[3]=0),ee(),er(1,0,0),er(0,1,0),es(),es(),J(),ec();let ey=eg(.25,.1,.25,1);function ev(e,t,r){return Math.min(r,Math.max(t,e))}function ex(e,t,r){let i=r-t,n=((e-t)%i+i)%i+t;return n===t?r:n}function eb(e,...t){for(let r of t)for(let t in r)e[t]=r[t];return e}let e_=1;function ew(e,t,r){let i={};for(let r in e)i[r]=t.call(this,e[r],r,e);return i}function eT(e,t,r){let i={};for(let r in e)t.call(this,e[r],r,e)&&(i[r]=e[r]);return i}function eM(e){return Array.isArray(e)?e.map(eM):"object"==typeof e&&e?ew(e,eM):e}let ek={};function eA(e){ek[e]||("u">typeof console&&console.warn(e),ek[e]=!0)}function eS(e,t,r){return(r.y-e.y)*(t.x-e.x)>(t.y-e.y)*(r.x-e.x)}function eE(e){return"u">typeof WorkerGlobalScope&&void 0!==e&&e instanceof WorkerGlobalScope}let eC=null;function eL(e){return"u">typeof ImageBitmap&&e instanceof ImageBitmap}let eP="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function eI(e,t,r,i,n){return _(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw Error("VideoFrame not supported");let a=new VideoFrame(e,{timestamp:0});try{let o,s,l,c,u=a?.format;if(!u||!u.startsWith("BGR")&&!u.startsWith("RGB"))throw Error(`Unrecognized format ${u}`);let h=u.startsWith("BGR"),d=new Uint8ClampedArray(i*n*4);if(yield a.copyTo(d,(o=4*Math.max(-t,0),s=(Math.max(0,r)-r)*i*4+o,l=Math.max(0,t),c=Math.max(0,r),{rect:{x:l,y:c,width:Math.min(e.width,t+i)-l,height:Math.min(e.height,r+n)-c},layout:[{offset:s,stride:4*i}]})),h)for(let e=0;e{e.removeEventListener(t,r,i)}}}function eD(e){return e*Math.PI/180}function eO(e){return e/Math.PI*180}let eR={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},eF={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},ej="AbortError";class eB extends Error{constructor(e=ej){super(e instanceof Error?e.message:e),this.name=ej,e instanceof Error&&e.stack&&(this.stack=e.stack)}}function eN(e){return e instanceof Error&&e.name===ej}function eU(e){if(e.aborted)throw new eB(e.reason)}let eV={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function eq(e){return eV.REGISTERED_PROTOCOLS[e.substring(0,e.indexOf("://"))]}let eH="global-dispatcher";class eG extends Error{constructor(e,t,r,i){super(`AJAXError: ${t} (${e}): ${r}`),this.status=e,this.statusText=t,this.url=r,this.body=i}}let eW=()=>{var e;return eE(self)?null==(e=self.worker)?void 0:e.referrer:("blob:"===window.location.protocol?window.parent:window).location.href},eY=function(e,t){return _(this,void 0,void 0,function*(){var r,i,n,a;if(e.url.includes("://")&&!/^https?:|^file:/.test(e.url)){let i=eq(e.url);if(i){let r=yield i(e,t);return r.data||"arrayBuffer"!==e.type?r:eb(r,{data:new ArrayBuffer(0)})}if(eE(self)&&null!=(r=self.worker)&&r.actor)return self.worker.actor.sendAsync({type:"GR",data:e,targetMapId:eH},t)}if(!((n=e.url).startsWith("file:")||(null==(a=eW())?void 0:a.startsWith("file:"))&&!/^\w+:/.test(n))){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(e,t){return _(this,void 0,void 0,function*(){let r=new Request(e.url,{method:e.method||"GET",body:e.body,credentials:e.credentials,headers:e.headers,cache:e.cache,referrer:eW(),referrerPolicy:e.referrerPolicy,signal:t.signal}),i,n;"json"!==e.type||r.headers.has("Accept")||r.headers.set("Accept","application/json");try{i=yield fetch(r)}catch(t){throw eN(t)?t:new eG(0,ed(t).message,e.url,new Blob)}if(!i.ok){let t=yield i.blob();throw new eG(i.status,i.statusText,e.url,t)}n="arrayBuffer"===e.type||"image"===e.type?i.arrayBuffer():"json"===e.type?i.json():i.text();let a=yield n;return eU(t.signal),{data:a,cacheControl:i.headers.get("Cache-Control"),expires:i.headers.get("Expires"),etag:i.headers.get("ETag")}})}(e,t);if(eE(self)&&null!=(i=self.worker)&&i.actor)return self.worker.actor.sendAsync({type:"GR",data:e,mustQueue:!0,targetMapId:eH},t)}return new Promise((r,i)=>{var n;let a=new XMLHttpRequest;for(let t in a.open(e.method||"GET",e.url,!0),"arrayBuffer"!==e.type&&"image"!==e.type||(a.responseType="arraybuffer"),e.headers)a.setRequestHeader(t,e.headers[t]);"json"===e.type&&(a.responseType="text",null!=(n=e.headers)&&n.Accept||a.setRequestHeader("Accept","application/json")),a.withCredentials="include"===e.credentials,a.onerror=()=>{i(Error(a.statusText))},a.onload=()=>{if(!t.signal.aborted)if((a.status>=200&&a.status<300||0===a.status)&&null!==a.response){let t=a.response;if("json"===e.type)try{t=JSON.parse(a.response)}catch(e){return void i(e)}r({data:t,cacheControl:a.getResponseHeader("Cache-Control"),expires:a.getResponseHeader("Expires"),etag:a.getResponseHeader("ETag")})}else{let t=new Blob([a.response],{type:a.getResponseHeader("Content-Type")});i(new eG(a.status,a.statusText,e.url,t))}},t.signal.addEventListener("abort",()=>{a.abort(),i(new eB(t.signal.reason))}),a.send(e.body)})})};function eZ(e){if(!e||0>=e.indexOf("://")||e.startsWith("data:image/")||e.startsWith("blob:"))return!0;let t=new URL(e),r=window.location;return t.protocol===r.protocol&&t.host===r.host}function e$(e,t,r){var i;null!=(i=r[e])&&i.includes(t)||(r[e]||(r[e]=[]),r[e].push(t))}function eX(e,t,r){if(r?.[e]){let i=r[e].indexOf(t);-1!==i&&r[e].splice(i,1)}}class eK{constructor(e,t={}){eb(this,t),this.type=e}}class eJ extends eK{constructor(e,t={}){super("error",eb({error:e},t))}}class eQ{on(e,t){return this._listeners||(this._listeners={}),e$(e,t,this._listeners),{unsubscribe:()=>{this.off(e,t)}}}off(e,t){return eX(e,t,this._listeners),eX(e,t,this._oneTimeListeners),this}once(e,t){return t?(this._oneTimeListeners||(this._oneTimeListeners={}),e$(e,t,this._oneTimeListeners),this):new Promise(t=>this.once(e,t))}fire(e,t){var r,i;"string"==typeof e&&(e=new eK(e,t||{}));let n=e.type;if(this.listens(n)){for(let t of(e.target=this,null!=(r=this._listeners)&&r[n]?this._listeners[n].slice():[]))t.call(this,e);for(let t of null!=(i=this._oneTimeListeners)&&i[n]?this._oneTimeListeners[n].slice():[])eX(n,t,this._oneTimeListeners),t.call(this,e);let t=this._eventedParent;t&&(eb(e,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),t.fire(e))}else e instanceof eJ&&console.error(e.error);return this}listens(e){var t,r,i,n,a;return(null==(r=null==(t=this._listeners)?void 0:t[e])?void 0:r.length)>0||(null==(n=null==(i=this._oneTimeListeners)?void 0:i[e])?void 0:n.length)>0||(null==(a=this._eventedParent)?void 0:a.listens(e))}setEventedParent(e,t){return this._eventedParent=e,this._eventedParentData=t,this}}var e0={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,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:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,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:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",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"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let e1=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function e2(e,t){if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let r=0;r`:"value"===e.itemType.kind?"array":`array<${t}>`}return e.kind}let tb=[ti,tn,ta,to,ts,tl,td,tc,tv(tu),tf,tm,tp,tg,ty];function t_(e,t){if("error"===t.kind)return null;if("array"===e.kind){if("array"===t.kind&&(0===t.N&&"value"===t.itemType.kind||!t_(e.itemType,t.itemType))&&("number"!=typeof e.N||e.N===t.N))return null}else{if(e.kind===t.kind)return null;if("value"===e.kind){for(let e of tb)if(!t_(e,t))return null}}return`Expected ${tx(e)} but found ${tx(t)} instead.`}function tw(e,t){return t.some(t=>t.kind===e.kind)}function tT(e,t){return t.some(t=>"null"===t?null===e:"array"===t?Array.isArray(e):"object"===t?e&&!Array.isArray(e)&&"object"==typeof e:t===typeof e)}function tM(e,t){return"array"===e.kind&&"array"===t.kind?e.itemType.kind===t.itemType.kind&&"number"==typeof e.N:e.kind===t.kind}let tk=4/29,tA=6/29,tS=6/29*3*(6/29),tE=6/29*(6/29)*(6/29),tC=Math.PI/180,tL=180/Math.PI;function tP(e){return(e%=360)<0&&(e+=360),e}function tI([e,t,r,i]){let n,a,o=tD((.2225045*(e=tz(e))+.7168786*(t=tz(t))+.0606169*(r=tz(r)))/1);e===t&&t===r?n=a=o:(n=tD((.4360747*e+.3850649*t+.1430804*r)/.96422),a=tD((.0139322*e+.0971045*t+.7141733*r)/.82521));let s=116*o-16;return[s<0?0:s,500*(n-o),200*(o-a),i]}function tz(e){return e<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function tD(e){return e>tE?Math.pow(e,1/3):e/tS+tk}function tO([e,t,r,i]){let n=(e+16)/116,a=isNaN(t)?n:n+t/500,o=isNaN(r)?n:n-r/200;return n=+tF(n),[tR(3.1338561*(a=.96422*tF(a))-1.6168667*n-.4906146*(o=.82521*tF(o))),tR(-.9787684*a+1.9161415*n+.033454*o),tR(.0719453*a-.2289914*n+1.4052427*o),i]}function tR(e){return(e=e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055)<0?0:e>1?1:e}function tF(e){return e>tA?e*e*e:tS*(e-tk)}let tj=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};function tB(e,t){return tj(e,t)?e[t]:void 0}function tN(e){return parseInt(e.padEnd(2,e),16)/255}function tU(e,t){return tV(t?e/100:e,0,1)}function tV(e,t,r){return Math.min(Math.max(t,e),r)}function tq(e){return!e.some(Number.isNaN)}let tH={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]};function tG(e,t,r){return e.map((e,i)=>e+r*(t[i]-e))}class tW{constructor(e,t,r,i=1,n=!0){this.r=e,this.g=t,this.b=r,this.a=i,n||(this.r*=i,this.g*=i,this.b*=i,i||this.overwriteGetter("rgb",[e,t,r,i]))}static parse(e){if(e instanceof tW)return e;if("string"!=typeof e)return;let t=function(e){if("transparent"===(e=e.toLowerCase().trim()))return[0,0,0,0];let t=tB(tH,e);if(t){let[e,r,i]=t;return[e/255,r/255,i/255,1]}if(e.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(e)){let t=e.length<6?1:2,r=1;return[tN(e.slice(r,r+=t)),tN(e.slice(r,r+=t)),tN(e.slice(r,r+=t)),tN(e.slice(r,r+t)||"ff")]}if(e.startsWith("rgb")){let t=e.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(t){let[e,r,i,n,a,o,s,l,c,u,h,d]=t,f=[n||" ",s||" ",u].join("");if(" "===f||" /"===f||",,"===f||",,,"===f){let e=[i,o,c].join(""),t="%%%"===e?100:255*(""===e);if(t){let e=[tV(r/t,0,1),tV(a/t,0,1),tV(l/t,0,1),h?tU(+h,d):1];if(tq(e))return e}}return}}let r=e.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(r){let[e,t,i,n,a,o,s,l,c]=r,u=[i||" ",a||" ",s].join("");if(" "===u||" /"===u||",,"===u||",,,"===u){let e=[+t,tV(+n,0,100),tV(+o,0,100),l?tU(+l,c):1];if(tq(e))return function([e,t,r,i]){function n(i){let n=(i+e/30)%12,a=t*Math.min(r,1-r);return r-a*Math.max(-1,Math.min(n-3,9-n,1))}return e=tP(e),t/=100,r/=100,[n(0),n(8),n(4),i]}(e)}}}(e);return t?new tW(...t,!1):void 0}get rgb(){let{r:e,g:t,b:r,a:i}=this,n=i||1/0;return this.overwriteGetter("rgb",[e/n,t/n,r/n,i])}get hcl(){return this.overwriteGetter("hcl",function(e){let[t,r,i,n]=tI(e),a=Math.sqrt(r*r+i*i);return[Math.round(1e4*a)?tP(Math.atan2(i,r)*tL):NaN,a,t,n]}(this.rgb))}get lab(){return this.overwriteGetter("lab",tI(this.rgb))}overwriteGetter(e,t){return Object.defineProperty(this,e,{value:t}),t}toString(){let[e,t,r,i]=this.rgb;return`rgba(${[e,t,r].map(e=>Math.round(255*e)).join(",")},${i})`}static interpolate(e,t,r,i="rgb"){switch(i){case"rgb":{let[i,n,a,o]=tG(e.rgb,t.rgb,r);return new tW(i,n,a,o,!1)}case"hcl":{let[i,n,a,o]=e.hcl,[s,l,c,u]=t.hcl,h,d;if(isNaN(i)||isNaN(s))isNaN(i)?isNaN(s)?h=NaN:(h=s,1!==a&&0!==a||(d=l)):(h=i,1!==c&&0!==c||(d=n));else{let e=s-i;s>i&&e>180?e-=360:s180&&(e+=360),h=i+r*e}let[f,p,m,g]=function([e,t,r,i]){return tO([r,Math.cos(e=isNaN(e)?0:e*tC)*t,Math.sin(e)*t,i])}([h,d??n+r*(l-n),a+r*(c-a),o+r*(u-o)]);return new tW(f,p,m,g,!1)}case"lab":{let[i,n,a,o]=tO(tG(e.lab,t.lab,r));return new tW(i,n,a,o,!1)}}}}tW.black=new tW(0,0,0,1),tW.white=new tW(1,1,1,1),tW.transparent=new tW(0,0,0,0),tW.red=new tW(1,0,0,1);class tY{constructor(e,t,r){this.sensitivity=e?t?"variant":"case":t?"accent":"base",this.locale=r,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(e,t){return this.collator.compare(e,t)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let tZ=["bottom","center","top"];class t${constructor(e,t,r,i,n,a){this.text=e,this.image=t,this.scale=r,this.fontStack=i,this.textColor=n,this.verticalAlign=a}}class tX{constructor(e){this.sections=e}static fromString(e){return new tX([new t$(e,null,null,null,null,null)])}isEmpty(){return 0===this.sections.length||!this.sections.some(e=>0!==e.text.length||e.image&&0!==e.image.name.length)}static factory(e){return e instanceof tX?e:tX.fromString(e)}toString(){return 0===this.sections.length?"":this.sections.map(e=>e.text).join("")}}class tK{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tK)return e;if("number"==typeof e)return new tK([e,e,e,e]);if(Array.isArray(e)&&!(e.length<1||e.length>4)){for(let t of e)if("number"!=typeof t)return;switch(e.length){case 1:e=[e[0],e[0],e[0],e[0]];break;case 2:e=[e[0],e[1],e[0],e[1]];break;case 3:e=[e[0],e[1],e[2],e[1]]}return new tK(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new tK(tG(e.values,t.values,r))}}class tJ{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tJ)return e;if("number"==typeof e)return new tJ([e]);if(Array.isArray(e)){for(let t of e)if("number"!=typeof t)return;return new tJ(e)}}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r){return new tJ(tG(e.values,t.values,r))}}class tQ{constructor(e){this.values=e.slice()}static parse(e){if(e instanceof tQ)return e;if("string"==typeof e){let t=tW.parse(e);return t?new tQ([t]):void 0}if(!Array.isArray(e))return;let t=[];for(let r of e){if("string"!=typeof r)return;let e=tW.parse(r);if(!e)return;t.push(e)}return new tQ(t)}toString(){return JSON.stringify(this.values)}static interpolate(e,t,r,i="rgb"){let n=[];if(e.values.length!=t.values.length)throw Error(`colorArray: Arrays have mismatched length (${e.values.length} vs. ${t.values.length}), cannot interpolate.`);for(let a=0;a=0&&e<=255&&"number"==typeof t&&t>=0&&t<=255&&"number"==typeof r&&r>=0&&r<=255?void 0===i||"number"==typeof i&&i>=0&&i<=1?null:`Invalid rgba value [${[e,t,r,i].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${("number"==typeof i?[e,t,r,i]:[e,t,r]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function t6(e){if(null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e||e instanceof t5||e instanceof tW||e instanceof tY||e instanceof tX||e instanceof tK||e instanceof tJ||e instanceof tQ||e instanceof t2||e instanceof t3)return!0;if(Array.isArray(e)){for(let t of e)if(!t6(t))return!1;return!0}if("object"==typeof e){for(let t in e)if(!t6(e[t]))return!1;return!0}return!1}function t8(e){if(null===e)return ti;if("string"==typeof e)return ta;if("boolean"==typeof e)return to;if("number"==typeof e)return tn;if(e instanceof tW)return ts;if(e instanceof t5)return tl;if(e instanceof tY)return th;if(e instanceof tX)return td;if(e instanceof tK)return tf;if(e instanceof tJ)return tm;if(e instanceof tQ)return tp;if(e instanceof t2)return ty;if(e instanceof t3)return tg;if(Array.isArray(e)){let t=e.length,r;for(let t of e){let e=t8(t);if(r){if(r===e)continue;r=tu;break}r=e}return tv(r||tu,t)}return tc}function t7(e){let t=typeof e;return null===e?"":"string"===t||"number"===t||"boolean"===t?String(e):e instanceof tW||e instanceof t5||e instanceof tX||e instanceof tK||e instanceof tJ||e instanceof tQ||e instanceof t2||e instanceof t3?e.toString():JSON.stringify(e)}class t9{constructor(e,t){this.type=e,this.value=t}static parse(e,t){if(2!==e.length)return t.error(`'literal' expression requires exactly one argument, but found ${e.length-1} instead.`);if(!t6(e[1]))return t.error("invalid value");let r=e[1],i=t8(r),n=t.expectedType;return"array"===i.kind&&0===i.N&&n&&"array"===n.kind&&("number"!=typeof n.N||0===n.N)&&(i=n),new t9(i,r)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let re={string:ta,number:tn,boolean:to,object:tc};class rt{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r,i=1,n=e[0];if("array"===n){let n,a;if(e.length>2){let r=e[1];if("string"!=typeof r||!(r in re)||"object"===r)return t.error('The item type argument of "array" must be one of string, number, boolean',1);n=re[r],i++}else n=tu;if(e.length>3){if(null!==e[2]&&("number"!=typeof e[2]||e[2]<0||e[2]!==Math.floor(e[2])))return t.error('The length argument to "array" must be a positive integer literal',2);a=e[2],i++}r=tv(n,a)}else{if(!re[n])throw Error(`Types doesn't contain name = ${n}`);r=re[n]}let a=[];for(;ie.outputDefined())}}let rr={"to-boolean":to,"to-color":ts,"to-number":tn,"to-string":ta};class ri{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[0];if(!rr[r])throw Error(`Can't parse ${r} as it is not part of the known types`);if(("to-boolean"===r||"to-string"===r)&&2!==e.length)return t.error("Expected one argument.");let i=rr[r],n=[];for(let r=1;r4?`Invalid rgba value ${JSON.stringify(t)}: expected an array containing either three or four numeric values.`:t4(t[0],t[1],t[2],t[3])))return new tW(t[0]/255,t[1]/255,t[2]/255,t[3])}throw new t0(r||`Could not parse color from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"padding":{let t;for(let r of this.args){t=r.evaluate(e);let i=tK.parse(t);if(i)return i}throw new t0(`Could not parse padding from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"numberArray":{let t;for(let r of this.args){t=r.evaluate(e);let i=tJ.parse(t);if(i)return i}throw new t0(`Could not parse numberArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"colorArray":{let t;for(let r of this.args){t=r.evaluate(e);let i=tQ.parse(t);if(i)return i}throw new t0(`Could not parse colorArray from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"variableAnchorOffsetCollection":{let t;for(let r of this.args){t=r.evaluate(e);let i=t2.parse(t);if(i)return i}throw new t0(`Could not parse variableAnchorOffsetCollection from value '${"string"==typeof t?t:JSON.stringify(t)}'`)}case"number":{let t=null;for(let r of this.args){if(null===(t=r.evaluate(e)))return 0;let i=Number(t);if(!isNaN(i))return i}throw new t0(`Could not convert ${JSON.stringify(t)} to number.`)}case"formatted":return tX.fromString(t7(this.args[0].evaluate(e)));case"resolvedImage":return t3.fromString(t7(this.args[0].evaluate(e)));case"projectionDefinition":return this.args[0].evaluate(e);default:return t7(this.args[0].evaluate(e))}}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}let rn=["Unknown","Point","LineString","Polygon"];class ra{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?"number"==typeof this.feature.type?rn[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(e){let t=this._parseColorCache.get(e);return t||(t=tW.parse(e),this._parseColorCache.set(e,t)),t}}class ro{constructor(e,t,r=[],i,n=new tr,a=[]){this.registry=e,this.path=r,this.key=r.map(e=>`[${e}]`).join(""),this.scope=n,this.errors=a,this.expectedType=i,this._isConstant=t}parse(e,t,r,i,n={}){return t?this.concat(t,r,i)._parse(e,n):this._parse(e,n)}_parse(e,t){function r(e,t,r){return"assert"===r?new rt(t,[e]):"coerce"===r?new ri(t,[e]):e}if(null!==e&&"string"!=typeof e&&"boolean"!=typeof e&&"number"!=typeof e||(e=["literal",e]),Array.isArray(e)){if(0===e.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let i=e[0];if("string"!=typeof i)return this.error(`Expression name must be a string, but found ${typeof i} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let n=this.registry[i];if(n){let i=n.parse(e,this);if(!i)return null;if(this.expectedType){let e=this.expectedType,n=i.type;if("string"!==e.kind&&"number"!==e.kind&&"boolean"!==e.kind&&"object"!==e.kind&&"array"!==e.kind||"value"!==n.kind){if("projectionDefinition"===e.kind&&["string","array"].includes(n.kind)||["color","formatted","resolvedImage"].includes(e.kind)&&["value","string"].includes(n.kind)||["padding","numberArray"].includes(e.kind)&&["value","number","array"].includes(n.kind)||"colorArray"===e.kind&&["value","string","array"].includes(n.kind)||"variableAnchorOffsetCollection"===e.kind&&["value","array"].includes(n.kind))i=r(i,e,t.typeAnnotation||"coerce");else if(this.checkSubtype(e,n))return null}else i=r(i,e,t.typeAnnotation||"assert")}if(!(i instanceof t9)&&"resolvedImage"!==i.type.kind&&this._isConstant(i)){let e=new ra;try{i=new t9(i.type,i.evaluate(e))}catch(e){return this.error(e.message),null}}return i}return this.error(`Unknown expression "${i}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(void 0===e?"'undefined' value invalid. Use null instead.":"object"==typeof e?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof e} instead.`)}concat(e,t,r){let i="number"==typeof e?this.path.concat(e):this.path,n=r?this.scope.concat(r):this.scope;return new ro(this.registry,this._isConstant,i,t||null,n,this.errors)}error(e,...t){let r=`${this.key}${t.map(e=>`[${e}]`).join("")}`;this.errors.push(new tt(r,e))}checkSubtype(e,t){let r=t_(e,t);return r&&this.error(r),r}}class rs{constructor(e,t){this.type=t.type,this.bindings=[].concat(e),this.result=t}evaluate(e){return this.result.evaluate(e)}eachChild(e){for(let t of this.bindings)e(t[1]);e(this.result)}static parse(e,t){if(e.length<4)return t.error(`Expected at least 3 arguments, but found ${e.length-1} instead.`);let r=[];for(let i=1;it))throw new t0("Input is not a number.");o=s-1}return 0}class ru{constructor(e,t,r){for(let[i,n]of(this.type=e,this.input=t,this.labels=[],this.outputs=[],r))this.labels.push(i),this.outputs.push(n)}static parse(e,t){if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");let r=t.parse(e[1],1,tn);if(!r)return null;let i=[],n=null;t.expectedType&&"value"!==t.expectedType.kind&&(n=t.expectedType);for(let r=1;r=a)return t.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',s);let c=t.parse(o,l,n);if(!c)return null;n=n||c.type,i.push([a,c])}return new ru(n,r,i)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);let n=t.length;return i>=t[n-1]?r[n-1].evaluate(e):r[rc(t,i)].evaluate(e)}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}var rh,rd,rf,rp,rm,rg,ry=(rp=function(){if(rg)return rm;function e(e,t,r,i){this.cx=3*e,this.bx=3*(r-e)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*t,this.by=3*(i-t)-this.cy,this.ay=1-this.cy-this.by,this.p1x=e,this.p1y=t,this.p2x=r,this.p2y=i}return rg=1,rm=e,e.prototype={sampleCurveX:function(e){return((this.ax*e+this.bx)*e+this.cx)*e},sampleCurveY:function(e){return((this.ay*e+this.by)*e+this.cy)*e},sampleCurveDerivativeX:function(e){return(3*this.ax*e+2*this.bx)*e+this.cx},solveCurveX:function(e,t){if(void 0===t&&(t=1e-6),e<0)return 0;if(e>1)return 1;for(var r=e,i=0;i<8;i++){var n=this.sampleCurveX(r)-e;if(Math.abs(n)Math.abs(a))break;r-=n/a}var o=0,s=1;for(r=e,i=0;i<20&&!(Math.abs((n=this.sampleCurveX(r))-e)n?o=r:s=r,r=.5*(s-o)+o;return r},solve:function(e,t){return this.sampleCurveY(this.solveCurveX(e,t))}},rm}())&&rp.__esModule&&Object.prototype.hasOwnProperty.call(rp,"default")?rp.default:rp;class rv{constructor(e,t,r,i,n){for(let[a,o]of(this.type=e,this.operator=t,this.interpolation=r,this.input=i,this.labels=[],this.outputs=[],n))this.labels.push(a),this.outputs.push(o)}static interpolationFactor(e,t,r,i){let n=0;if("exponential"===e.name)n=rx(t,e.base,r,i);else if("linear"===e.name)n=rx(t,1,r,i);else if("cubic-bezier"===e.name){let a=e.controlPoints;n=new ry(a[0],a[1],a[2],a[3]).solve(rx(t,1,r,i))}return n}static parse(e,t){let[r,i,n,...a]=e;if(!Array.isArray(i)||0===i.length)return t.error("Expected an interpolation type expression.",1);if("linear"===i[0])i={name:"linear"};else if("exponential"===i[0]){let e=i[1];if("number"!=typeof e)return t.error("Exponential interpolation requires a numeric base.",1,1);i={name:"exponential",base:e}}else{if("cubic-bezier"!==i[0])return t.error(`Unknown interpolation type ${String(i[0])}`,1,0);{let e=i.slice(1);if(4!==e.length||e.some(e=>"number"!=typeof e||e<0||e>1))return t.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);i={name:"cubic-bezier",controlPoints:e}}}if(e.length-1<4)return t.error(`Expected at least 4 arguments, but found only ${e.length-1}.`);if((e.length-1)%2!=0)return t.error("Expected an even number of arguments.");if(!(n=t.parse(n,2,tn)))return null;let o=[],s=null;"interpolate-hcl"!==r&&"interpolate-lab"!==r||t.expectedType==tp?t.expectedType&&"value"!==t.expectedType.kind&&(s=t.expectedType):s=ts;for(let e=0;e=r)return t.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',n);let c=t.parse(i,l,s);if(!c)return null;s=s||c.type,o.push([r,c])}return tM(s,tn)||tM(s,tl)||tM(s,ts)||tM(s,tf)||tM(s,tm)||tM(s,tp)||tM(s,ty)||tM(s,tv(tn))?new rv(s,r,i,n,o):t.error(`Type ${tx(s)} is not interpolatable.`)}evaluate(e){let t=this.labels,r=this.outputs;if(1===t.length)return r[0].evaluate(e);let i=this.input.evaluate(e);if(i<=t[0])return r[0].evaluate(e);let n=t.length;if(i>=t[n-1])return r[n-1].evaluate(e);let a=rc(t,i),o=rv.interpolationFactor(this.interpolation,i,t[a],t[a+1]),s=r[a].evaluate(e),l=r[a+1].evaluate(e);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return s+o*(l-s);case"color":return tW.interpolate(s,l,o);case"padding":return tK.interpolate(s,l,o);case"colorArray":return tQ.interpolate(s,l,o);case"numberArray":return tJ.interpolate(s,l,o);case"variableAnchorOffsetCollection":return t2.interpolate(s,l,o);case"array":return tG(s,l,o);case"projectionDefinition":return t5.interpolate(s,l,o)}case"interpolate-hcl":switch(this.type.kind){case"color":return tW.interpolate(s,l,o,"hcl");case"colorArray":return tQ.interpolate(s,l,o,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return tW.interpolate(s,l,o,"lab");case"colorArray":return tQ.interpolate(s,l,o,"lab")}}}eachChild(e){for(let t of(e(this.input),this.outputs))e(t)}outputDefined(){return this.outputs.every(e=>e.outputDefined())}}function rx(e,t,r,i){let n=i-r,a=e-r;return 0===n?0:1===t?a/n:(Math.pow(t,a)-1)/(Math.pow(t,n)-1)}let rb={color:tW.interpolate,number:function(e,t,r){return e+r*(t-e)},padding:tK.interpolate,numberArray:tJ.interpolate,colorArray:tQ.interpolate,variableAnchorOffsetCollection:t2.interpolate,array:tG};class r_{constructor(e,t){this.type=e,this.args=t}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=null,i=t.expectedType;i&&"value"!==i.kind&&(r=i);let n=[];for(let i of e.slice(1)){let e=t.parse(i,1+n.length,r,void 0,{typeAnnotation:"omit"});if(!e)return null;r=r||e.type,n.push(e)}if(!r)throw Error("No output type");return new r_(i&&n.some(e=>t_(i,e.type))?tu:r,n)}evaluate(e){let t,r=null,i=0;for(let n of this.args)if(i++,(r=n.evaluate(e))&&r instanceof t3&&!r.available&&(t||(t=r.name),r=null,i===this.args.length&&(r=t)),null!==r)break;return r}eachChild(e){this.args.forEach(e)}outputDefined(){return this.args.every(e=>e.outputDefined())}}function rw(e,t){return"=="===e||"!="===e?"boolean"===t.kind||"string"===t.kind||"number"===t.kind||"null"===t.kind||"value"===t.kind:"string"===t.kind||"number"===t.kind||"value"===t.kind}function rT(e,t,r,i){return 0===i.compare(t,r)}function rM(e,t,r){let i="=="!==e&&"!="!==e;return class n{constructor(e,t,r){this.type=to,this.lhs=e,this.rhs=t,this.collator=r,this.hasUntypedArgument="value"===e.type.kind||"value"===t.type.kind}static parse(e,t){if(3!==e.length&&4!==e.length)return t.error("Expected two or three arguments.");let r=e[0],a=t.parse(e[1],1,tu);if(!a)return null;if(!rw(r,a.type))return t.concat(1).error(`"${r}" comparisons are not supported for type '${tx(a.type)}'.`);let o=t.parse(e[2],2,tu);if(!o)return null;if(!rw(r,o.type))return t.concat(2).error(`"${r}" comparisons are not supported for type '${tx(o.type)}'.`);if(a.type.kind!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error(`Cannot compare types '${tx(a.type)}' and '${tx(o.type)}'.`);i&&("value"===a.type.kind&&"value"!==o.type.kind?a=new rt(o.type,[a]):"value"!==a.type.kind&&"value"===o.type.kind&&(o=new rt(a.type,[o])));let s=null;if(4===e.length){if("string"!==a.type.kind&&"string"!==o.type.kind&&"value"!==a.type.kind&&"value"!==o.type.kind)return t.error("Cannot use collator to compare non-string types.");if(!(s=t.parse(e[3],3,th)))return null}return new n(a,o,s)}evaluate(n){let a=this.lhs.evaluate(n),o=this.rhs.evaluate(n);if(i&&this.hasUntypedArgument){let t=t8(a),r=t8(o);if(t.kind!==r.kind||"string"!==t.kind&&"number"!==t.kind)throw new t0(`Expected arguments for "${e}" to be (string, string) or (number, number), but found (${t.kind}, ${r.kind}) instead.`)}if(this.collator&&!i&&this.hasUntypedArgument){let e=t8(a),r=t8(o);if("string"!==e.kind||"string"!==r.kind)return t(n,a,o)}return this.collator?r(n,a,o,this.collator.evaluate(n)):t(n,a,o)}eachChild(e){e(this.lhs),e(this.rhs),this.collator&&e(this.collator)}outputDefined(){return!0}}}let rk=rM("==",function(e,t,r){return t===r},rT),rA=rM("!=",function(e,t,r){return t!==r},function(e,t,r,i){return!rT(0,t,r,i)}),rS=rM("<",function(e,t,r){return ti.compare(t,r)}),rE=rM(">",function(e,t,r){return t>r},function(e,t,r,i){return i.compare(t,r)>0}),rC=rM("<=",function(e,t,r){return t<=r},function(e,t,r,i){return 0>=i.compare(t,r)}),rL=rM(">=",function(e,t,r){return t>=r},function(e,t,r,i){return i.compare(t,r)>=0});class rP{constructor(e,t,r){this.type=th,this.locale=r,this.caseSensitive=e,this.diacriticSensitive=t}static parse(e,t){if(2!==e.length)return t.error("Expected one argument.");let r=e[1];if("object"!=typeof r||Array.isArray(r))return t.error("Collator options argument must be an object.");let i=t.parse(void 0!==r["case-sensitive"]&&r["case-sensitive"],1,to);if(!i)return null;let n=t.parse(void 0!==r["diacritic-sensitive"]&&r["diacritic-sensitive"],1,to);if(!n)return null;let a=null;return!r.locale||(a=t.parse(r.locale,1,ta))?new rP(i,n,a):null}evaluate(e){return new tY(this.caseSensitive.evaluate(e),this.diacriticSensitive.evaluate(e),this.locale?this.locale.evaluate(e):null)}eachChild(e){e(this.caseSensitive),e(this.diacriticSensitive),this.locale&&e(this.locale)}outputDefined(){return!1}}class rI{constructor(e){this.type=td,this.sections=e}static parse(e,t){if(e.length<2)return t.error("Expected at least one argument.");let r=e[1];if(!Array.isArray(r)&&"object"==typeof r)return t.error("First argument must be an image or text section.");let i=[],n=!1;for(let r=1;r<=e.length-1;++r){let a=e[r];if(n&&"object"==typeof a&&!Array.isArray(a)){n=!1;let e=null;if(a["font-scale"]&&!(e=t.parse(a["font-scale"],1,tn)))return null;let r=null;if(a["text-font"]&&!(r=t.parse(a["text-font"],1,tv(ta))))return null;let o=null;if(a["text-color"]&&!(o=t.parse(a["text-color"],1,ts)))return null;let s=null;if(a["vertical-align"]){if("string"==typeof a["vertical-align"]&&!tZ.includes(a["vertical-align"]))return t.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${a["vertical-align"]}' instead.`);if(!(s=t.parse(a["vertical-align"],1,ta)))return null}let l=i[i.length-1];l.scale=e,l.font=r,l.textColor=o,l.verticalAlign=s}else{let a=t.parse(e[r],1,tu);if(!a)return null;let o=a.type.kind;if("string"!==o&&"value"!==o&&"null"!==o&&"resolvedImage"!==o)return t.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");n=!0,i.push({content:a,scale:null,font:null,textColor:null,verticalAlign:null})}}return new rI(i)}evaluate(e){return new tX(this.sections.map(t=>{let r=t.content.evaluate(e);return t8(r)===tg?new t$("",r,null,null,null,t.verticalAlign?t.verticalAlign.evaluate(e):null):new t$(t7(r),null,t.scale?t.scale.evaluate(e):null,t.font?t.font.evaluate(e).join(","):null,t.textColor?t.textColor.evaluate(e):null,t.verticalAlign?t.verticalAlign.evaluate(e):null)}))}eachChild(e){for(let t of this.sections)e(t.content),t.scale&&e(t.scale),t.font&&e(t.font),t.textColor&&e(t.textColor),t.verticalAlign&&e(t.verticalAlign)}outputDefined(){return!1}}function rz(e,t){let r=Math.pow(2,t.z);return[360*((e[0]/8192+t.x)/r)-180,360/Math.PI*Math.atan(Math.exp((180-360*((e[1]/8192+t.y)/r))*Math.PI/180))-90]}function rD(e,t){e[0]=Math.min(e[0],t[0]),e[1]=Math.min(e[1],t[1]),e[2]=Math.max(e[2],t[0]),e[3]=Math.max(e[3],t[1])}function rO(e,t){return!(e[0]<=t[0]||e[2]>=t[2]||e[1]<=t[1]||e[3]>=t[3])}function rR(e,t,r,i){var n,a;return(a=[i[0]-r[0],i[1]-r[1]])[0]*(n=[t[0]-e[0],t[1]-e[1]])[1]-a[1]*n[0]!=0&&!(!rB(e,t,r,i)||!rB(r,i,e,t))}function rF(e,t,r=!1){var i,n;let a=!1;for(let o of t)for(let t=0;te[1]!=(n=o[t+1])[1]>e[1]&&e[0]<(n[0]-i[0])*(e[1]-i[1])/(n[1]-i[1])+i[0]&&(a=!a)}return a}function rj(e,t){for(let r of e)if(!rF(r,t))return!1;for(let r=0;r0&&s<0||o<0&&s>0}function rN(e,t,r){let i=[];for(let n=0;nr[2]){let t=.5*i,n=e[0]-r[0]>t?-i:r[0]-e[0]>t?i:0;0===n&&(n=e[0]-r[2]>t?-i:r[2]-e[0]>t?i:0),e[0]+=n}rD(t,e)}function rq(e,t,r,i){let n=8192*Math.pow(2,i.z),a=[8192*i.x,8192*i.y],o=[];for(let i of e)for(let e of i){let i=[e.x+a[0],e.y+a[1]];rV(i,t,r,n),o.push(i)}return o}function rH(e,t,r,i){let n=8192*Math.pow(2,i.z),a=[8192*i.x,8192*i.y],o=[];for(let r of e){let e=[];for(let i of r){let r=[i.x+a[0],i.y+a[1]];rD(t,r),e.push(r)}o.push(e)}if(t[2]-t[0]<=n/2)for(let e of(t[0]=t[1]=1/0,t[2]=t[3]=-1/0,o))for(let i of e)rV(i,t,r,n);return o}class rG{constructor(e,t){this.type=to,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'within' expression requires exactly one argument, but found ${e.length-1} instead.`);if(t6(e[1])){let t=e[1];if("FeatureCollection"===t.type){let e=[];for(let r of t.features){let{type:t,coordinates:i}=r.geometry;"Polygon"===t&&e.push(i),"MultiPolygon"===t&&e.push(...i)}if(e.length)return new rG(t,{type:"MultiPolygon",coordinates:e})}else if("Feature"===t.type){let e=t.geometry.type;if("Polygon"===e||"MultiPolygon"===e)return new rG(t,t.geometry)}else if("Polygon"===t.type||"MultiPolygon"===t.type)return new rG(t,t)}return t.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){let a=rN(t.coordinates,i,n),o=rq(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!rF(e,a))return!1}if("MultiPolygon"===t.type){let a=rU(t.coordinates,i,n),o=rq(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!function(e,t){for(let r of t)if(rF(e,r))return!0;return!1}(e,a))return!1}return!0}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=[1/0,1/0,-1/0,-1/0],i=[1/0,1/0,-1/0,-1/0],n=e.canonicalID();if("Polygon"===t.type){let a=rN(t.coordinates,i,n),o=rH(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!rj(e,a))return!1}if("MultiPolygon"===t.type){let a=rU(t.coordinates,i,n),o=rH(e.geometry(),r,i,n);if(!rO(r,i))return!1;for(let e of o)if(!function(e,t){for(let r of t)if(rj(e,r))return!0;return!1}(e,a))return!1}return!0}(e,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let rW=class{constructor(e=[],t=(e,t)=>et)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,a=t[n];if(r(i,a)>=0)break;t[e]=a,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;er(t[a],t[i])&&(i=a),r(t[i],n)>=0)break;t[e]=t[i],e=i}t[e]=n}};function rY(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function rZ(e,t){if(e.length<=1)return[e];let r=[],i,n;for(let t of e){let e=function(e){let t=0;for(let r,i,n=0,a=e.length,o=a-1;n1)for(let e=0;et)}){for(;n>i;){if(n-i>600){let o=n-i+1,s=r-i+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);e(t,r,Math.max(i,Math.floor(r-s*c/o+u)),Math.min(n,Math.floor(r+(o-s)*c/o+u)),a)}let o=t[r],s=i,l=n;for(rY(t,i,r),a(t[n],o)>0&&rY(t,i,n);sa(t[s],o);)s++;for(;a(t[l],o)>0;)l--}0===a(t[i],o)?rY(t,i,l):rY(t,++l,n),l<=r&&(i=l+1),r<=l&&(n=l-1)}}(r[e],t,1,r[e].length-1,r$),r[e]=r[e].slice(0,t));return r}function r$(e,t){return t.area-e.area}let rX=1/298.257223563*(2-1/298.257223563),rK=Math.PI/180;class rJ{constructor(e){let t=6378.137*rK*1e3,r=Math.cos(e*rK),i=1/(1-rX*(1-r*r)),n=Math.sqrt(i);this.kx=t*n*r,this.ky=t*n*i*(1-rX)}distance(e,t){let r=this.wrap(e[0]-t[0])*this.kx,i=(e[1]-t[1])*this.ky;return Math.sqrt(r*r+i*i)}pointOnLine(e,t){let r,i,n,a,o=1/0;for(let s=0;s1?(l=e[s+1][0],c=e[s+1][1]):d>0&&(l+=u/this.kx*d,c+=h/this.ky*d));let f=(u=this.wrap(t[0]-l)*this.kx)*u+(h=(t[1]-c)*this.ky)*h;f180;)e-=360;return e}}function rQ(e,t){return t[0]-e[0]}function r0(e){return e[1]-e[0]+1}function r1(e,t){return e[1]>=e[0]&&e[1]e[1])return[null,null];let r=r0(e);if(t){if(2===r)return[e,null];let t=Math.floor(r/2);return[[e[0],e[0]+t],[e[0]+t,e[1]]]}if(1===r)return[e,null];let i=Math.floor(r/2)-1;return[[e[0],e[0]+i],[e[0]+i+1,e[1]]]}function r3(e,t){if(!r1(t,e.length))return[1/0,1/0,-1/0,-1/0];let r=[1/0,1/0,-1/0,-1/0];for(let i=t[0];i<=t[1];++i)rD(r,e[i]);return r}function r5(e){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)for(let e of r)rD(t,e);return t}function r4(e){return e[0]!==-1/0&&e[1]!==-1/0&&e[2]!==1/0&&e[3]!==1/0}function r6(e,t,r){if(!r4(e)||!r4(t))return NaN;let i=0,n=0;return e[2]t[2]&&(i=e[0]-t[2]),e[1]>t[3]&&(n=e[1]-t[3]),e[3]0;){let n=o.pop();if(n[0]>=a)continue;let l=n[1],c=t?50:100;if(r0(l)<=c){if(!r1(l,e.length))return NaN;if(t){let t=function(e,t,r,i){if(!r1(t,e.length))return NaN;for(let i=t[0];i<=t[1];++i)if(rF(e[i],r,!0))return 0;let n=1/0;for(let a=t[0];a0;){let a=s.pop();if(a[0]>=o)continue;let l=a[1],c=a[2],u=t?50:100,h=i?50:100;if(r0(l)<=u&&r0(c)<=h){if(!r1(l,e.length)&&r1(c,r.length))return NaN;if(t&&i)o=Math.min(o,function(e,t,r,i,n){if(!r1(t,e.length)||!r1(i,r.length))return 1/0;let a=1/0;for(let o=t[0];o({type:"Polygon",coordinates:e})):"MultiLineString"===e.type?e.coordinates.map(e=>({type:"LineString",coordinates:e})):"MultiPoint"===e.type?e.coordinates.map(e=>({type:"Point",coordinates:e})):[e]}class io{constructor(e,t){this.type=tn,this.geojson=e,this.geometries=t}static parse(e,t){if(2!==e.length)return t.error(`'distance' expression requires exactly one argument, but found ${e.length-1} instead.`);if(t6(e[1])){let t=e[1];if("FeatureCollection"===t.type)return new io(t,t.features.map(e=>ia(e.geometry)).flat());if("Feature"===t.type)return new io(t,ia(t.geometry));if("type"in t&&"coordinates"in t)return new io(t,ia(t))}return t.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(e){if(null!=e.geometry()&&null!=e.canonicalID()){if("Point"===e.geometryType())return function(e,t){let r=e.geometry(),i=r.flat().map(t=>rz([t.x,t.y],e.canonical));if(0===r.length)return NaN;let n=new rJ(i[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,ii(i,!1,[e.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,ii(i,!1,e.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,ir(i,!1,e.coordinates,n,a))}if(0===a)break}return a}(e,this.geometries);if("LineString"===e.geometryType())return function(e,t){let r=e.geometry(),i=r.flat().map(t=>rz([t.x,t.y],e.canonical));if(0===r.length)return NaN;let n=new rJ(i[0][1]),a=1/0;for(let e of t){switch(e.type){case"Point":a=Math.min(a,ii(i,!0,[e.coordinates],!1,n,a));break;case"LineString":a=Math.min(a,ii(i,!0,e.coordinates,!0,n,a));break;case"Polygon":a=Math.min(a,ir(i,!0,e.coordinates,n,a))}if(0===a)break}return a}(e,this.geometries);if("Polygon"===e.geometryType())return function(e,t){let r=e.geometry();if(0===r.length||0===r[0].length)return NaN;let i=rZ(r,0).map(t=>t.map(t=>t.map(t=>rz([t.x,t.y],e.canonical)))),n=new rJ(i[0][0][0][1]),a=1/0;for(let e of t)for(let t of i){switch(e.type){case"Point":a=Math.min(a,ir([e.coordinates],!1,t,n,a));break;case"LineString":a=Math.min(a,ir(e.coordinates,!0,t,n,a));break;case"Polygon":a=Math.min(a,function(e,t,r,i=1/0){let n=r5(e),a=r5(t);if(i!==1/0&&r6(n,a,r)>=i)return i;if(rO(n,a)){if(r9(e,t))return 0}else if(r9(t,e))return 0;let o=1/0;for(let i of e)for(let e=0,n=i.length,a=n-1;e":rE,"<":rS,">=":rL,"<=":rC,array:rt,at:class e{constructor(e,t,r){this.type=e,this.index=t,this.input=r}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tn),n=r.parse(t[2],2,tv(r.expectedType||tu));return i&&n?new e(n.type.itemType,i,n):null}evaluate(e){let t=this.index.evaluate(e),r=this.input.evaluate(e);if(t<0)throw new t0(`Array index out of bounds: ${t} < 0.`);if(t>=r.length)throw new t0(`Array index out of bounds: ${t} > ${r.length-1}.`);if(t!==Math.floor(t))throw new t0(`Array index must be an integer, but found ${t} instead.`);return r[t]}eachChild(e){e(this.index),e(this.input)}outputDefined(){return!1}},boolean:rt,case:class e{constructor(e,t,r){this.type=e,this.branches=t,this.otherwise=r}static parse(t,r){let i;if(t.length<4)return r.error(`Expected at least 3 arguments, but found only ${t.length-1}.`);if(t.length%2!=0)return r.error("Expected an odd number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(i=r.expectedType);let n=[];for(let e=1;et.outputDefined())&&this.otherwise.outputDefined()}},coalesce:r_,collator:rP,format:rI,image:class e{constructor(e){this.type=tg,this.input=e}static parse(t,r){if(2!==t.length)return r.error("Expected two arguments.");let i=r.parse(t[1],1,ta);return i?new e(i):r.error("No image name provided.")}evaluate(e){let t=this.input.evaluate(e),r=t3.fromString(t);return r&&e.availableImages&&(r.available=e.availableImages.indexOf(t)>-1),r}eachChild(e){e(this.input)}outputDefined(){return!1}},in:class e{constructor(e,t){this.type=to,this.needle=e,this.haystack=t}static parse(t,r){if(3!==t.length)return r.error(`Expected 2 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tu);return i&&n?tw(i.type,[to,ta,tn,ti,tu])?new e(i,n):r.error(`Expected first argument to be of type boolean, string, number or null, but found ${tx(i.type)} instead`):null}evaluate(e){let t=this.needle.evaluate(e),r=this.haystack.evaluate(e);if(!r)return!1;if(!tT(t,["boolean","string","number","null"]))throw new t0(`Expected first argument to be of type boolean, string, number or null, but found ${tx(t8(t))} instead.`);if(!tT(r,["string","array"]))throw new t0(`Expected second argument to be of type array or string, but found ${tx(t8(r))} instead.`);return r.indexOf(t)>=0}eachChild(e){e(this.needle),e(this.haystack)}outputDefined(){return!0}},"index-of":class e{constructor(e,t,r){this.type=tn,this.needle=e,this.haystack=t,this.fromIndex=r}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tu);if(!i||!n)return null;if(!tw(i.type,[to,ta,tn,ti,tu]))return r.error(`Expected first argument to be of type boolean, string, number or null, but found ${tx(i.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,tn);return a?new e(i,n,a):null}return new e(i,n)}evaluate(e){let t,r=this.needle.evaluate(e),i=this.haystack.evaluate(e);if(!tT(r,["boolean","string","number","null"]))throw new t0(`Expected first argument to be of type boolean, string, number or null, but found ${tx(t8(r))} instead.`);if(this.fromIndex&&(t=this.fromIndex.evaluate(e)),tT(i,["string"])){let e=i.indexOf(r,t);return -1===e?-1:[...i.slice(0,e)].length}if(tT(i,["array"]))return i.indexOf(r,t);throw new t0(`Expected second argument to be of type array or string, but found ${tx(t8(i))} instead.`)}eachChild(e){e(this.needle),e(this.haystack),this.fromIndex&&e(this.fromIndex)}outputDefined(){return!1}},interpolate:rv,"interpolate-hcl":rv,"interpolate-lab":rv,length:class e{constructor(e){this.type=tn,this.input=e}static parse(t,r){if(2!==t.length)return r.error(`Expected 1 argument, but found ${t.length-1} instead.`);let i=r.parse(t[1],1);return i?"array"!==i.type.kind&&"string"!==i.type.kind&&"value"!==i.type.kind?r.error(`Expected argument of type string or array, but found ${tx(i.type)} instead.`):new e(i):null}evaluate(e){let t=this.input.evaluate(e);if("string"==typeof t)return[...t].length;if(Array.isArray(t))return t.length;throw new t0(`Expected value to be of type string or array, but found ${tx(t8(t))} instead.`)}eachChild(e){e(this.input)}outputDefined(){return!1}},let:rs,literal:t9,match:class e{constructor(e,t,r,i,n,a){this.inputType=e,this.type=t,this.input=r,this.cases=i,this.outputs=n,this.otherwise=a}static parse(t,r){let i,n;if(t.length<5)return r.error(`Expected at least 4 arguments, but found only ${t.length-1}.`);if(t.length%2!=1)return r.error("Expected an even number of arguments.");r.expectedType&&"value"!==r.expectedType.kind&&(n=r.expectedType);let a={},o=[];for(let e=2;eNumber.MAX_SAFE_INTEGER)return c.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if("number"==typeof e&&Math.floor(e)!==e)return c.error("Numeric branch labels must be integer values.");if(i){if(c.checkSubtype(i,t8(e)))return null}else i=t8(e);if(void 0!==a[String(e)])return c.error("Branch labels must be unique.");a[String(e)]=o.length}let u=r.parse(l,e,n);if(!u)return null;n=n||u.type,o.push(u)}let s=r.parse(t[1],1,tu);if(!s)return null;let l=r.parse(t[t.length-1],t.length-1,n);return l?"value"!==s.type.kind&&r.concat(1).checkSubtype(i,s.type)?null:new e(i,n,s,a,o,l):null}evaluate(e){let t=this.input.evaluate(e);return(t8(t)===this.inputType&&this.outputs[this.cases[t]]||this.otherwise).evaluate(e)}eachChild(e){e(this.input),this.outputs.forEach(e),e(this.otherwise)}outputDefined(){return this.outputs.every(e=>e.outputDefined())&&this.otherwise.outputDefined()}},number:rt,"number-format":class e{constructor(e,t,r,i,n,a){this.type=ta,this.number=e,this.locale=t,this.currency=r,this.unit=i,this.minFractionDigits=n,this.maxFractionDigits=a}static parse(t,r){if(3!==t.length)return r.error("Expected two arguments.");let i=r.parse(t[1],1,tn);if(!i)return null;let n=t[2];if("object"!=typeof n||Array.isArray(n))return r.error("NumberFormat options argument must be an object.");let a=null;if(n.locale&&!(a=r.parse(n.locale,1,ta)))return null;let o=null;if(n.currency&&!(o=r.parse(n.currency,1,ta)))return null;let s=null;if(n.unit&&!(s=r.parse(n.unit,1,ta)))return null;if(o&&s)return r.error("NumberFormat options `currency` and `unit` are mutually exclusive");let l=null;if(n["min-fraction-digits"]&&!(l=r.parse(n["min-fraction-digits"],1,tn)))return null;let c=null;return!n["max-fraction-digits"]||(c=r.parse(n["max-fraction-digits"],1,tn))?new e(i,a,o,s,l,c):null}evaluate(e){return new Intl.NumberFormat(this.locale?this.locale.evaluate(e):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(e):void 0,unit:this.unit?this.unit.evaluate(e):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(e):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(e):void 0}).format(this.number.evaluate(e))}eachChild(e){e(this.number),this.locale&&e(this.locale),this.currency&&e(this.currency),this.unit&&e(this.unit),this.minFractionDigits&&e(this.minFractionDigits),this.maxFractionDigits&&e(this.maxFractionDigits)}outputDefined(){return!1}},object:rt,slice:class e{constructor(e,t,r,i){this.type=e,this.input=t,this.beginIndex=r,this.endIndex=i}static parse(t,r){if(t.length<=2||t.length>=5)return r.error(`Expected 2 or 3 arguments, but found ${t.length-1} instead.`);let i=r.parse(t[1],1,tu),n=r.parse(t[2],2,tn);if(!i||!n)return null;if(!tw(i.type,[tv(tu),ta,tu]))return r.error(`Expected first argument to be of type array or string, but found ${tx(i.type)} instead`);if(4===t.length){let a=r.parse(t[3],3,tn);return a?new e(i.type,i,n,a):null}return new e(i.type,i,n)}evaluate(e){let t=this.input.evaluate(e),r=this.beginIndex.evaluate(e),i;if(this.endIndex&&(i=this.endIndex.evaluate(e)),tT(t,["string"]))return[...t].slice(r,i).join("");if(tT(t,["array"]))return t.slice(r,i);throw new t0(`Expected first argument to be of type array or string, but found ${tx(t8(t))} instead.`)}eachChild(e){e(this.input),e(this.beginIndex),this.endIndex&&e(this.endIndex)}outputDefined(){return!1}},step:ru,string:rt,"to-boolean":ri,"to-color":ri,"to-number":ri,"to-string":ri,var:rl,within:rG,distance:io,"global-state":is};class ic{constructor(e,t,r,i){this.name=e,this.type=t,this._evaluate=r,this.args=i}evaluate(e){return this._evaluate(e,this.args)}eachChild(e){this.args.forEach(e)}outputDefined(){return!1}static parse(e,t){let r=e[0],i=ic.definitions[r];if(!i)return t.error(`Unknown expression "${r}". If you wanted a literal array, use ["literal", [...]].`,0);let n=Array.isArray(i)?i[0]:i.type,a=Array.isArray(i)?[[i[1],i[2]]]:i.overloads,o=a.filter(([t])=>!Array.isArray(t)||t.length===e.length-1),s=null;for(let[i,a]of o){s=new ro(t.registry,ip,t.path,null,t.scope);let o=[],l=!1;for(let t=1;tArray.isArray(e)?`(${e.map(tx).join(", ")})`:`(${tx(e.type)}...)`).join(" | "),i=[];for(let r=1;r{r=t?r&&ip(e):r&&e instanceof t9}),!!r&&im(e)&&iy(e,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function im(e){if(e instanceof ic&&("get"===e.name&&1===e.args.length||"feature-state"===e.name||"has"===e.name&&1===e.args.length||"properties"===e.name||"geometry-type"===e.name||"id"===e.name||/^filter-/.test(e.name))||e instanceof rG||e instanceof io)return!1;let t=!0;return e.eachChild(e=>{t&&!im(e)&&(t=!1)}),t}function ig(e){if(e instanceof ic&&"feature-state"===e.name)return!1;let t=!0;return e.eachChild(e=>{t&&!ig(e)&&(t=!1)}),t}function iy(e,t){if(e instanceof ic&&t.indexOf(e.name)>=0)return!1;let r=!0;return e.eachChild(e=>{r&&!iy(e,t)&&(r=!1)}),r}function iv(e){return{result:"success",value:e}}function ix(e){return{result:"error",value:e}}function ib(e){return"data-driven"===e["property-type"]||"cross-faded-data-driven"===e["property-type"]}function i_(e){return!!e.expression&&e.expression.parameters.indexOf("zoom")>-1}function iw(e){return!!e.expression&&e.expression.interpolated}function iT(e){return e instanceof Number?"number":e instanceof String?"string":e instanceof Boolean?"boolean":Array.isArray(e)?"array":null===e?"null":typeof e}function iM(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&t8(e)===tc}function ik(e){return e}function iA(e,t,r){return void 0!==e?e:void 0!==t?t:void 0!==r?r:void 0}function iS(e,t,r,i,n){return iA(typeof r===n?i[r]:void 0,e.default,t.default)}function iE(e,t,r){if("number"!==iT(r))return iA(e.default,t.default);let i=e.stops.length;if(1===i||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[i-1][0])return e.stops[i-1][1];let n=rc(e.stops.map(e=>e[0]),r);return e.stops[n][1]}function iC(e,t,r){var i;let n,a,o=void 0!==e.base?e.base:1;if("number"!==iT(r))return iA(e.default,t.default);let s=e.stops.length;if(1===s||r<=e.stops[0][0])return e.stops[0][1];if(r>=e.stops[s-1][0])return e.stops[s-1][1];let l=rc(e.stops.map(e=>e[0]),r),c=(i=e.stops[l][0],n=e.stops[l+1][0]-i,a=r-i,0===n?0:1===o?a/n:(Math.pow(o,a)-1)/(Math.pow(o,n)-1)),u=e.stops[l][1],h=e.stops[l+1][1],d=rb[t.type]||ik;return"function"==typeof u.evaluate?{evaluate(...t){let r=u.evaluate.apply(void 0,t),i=h.evaluate.apply(void 0,t);if(void 0!==r&&void 0!==i)return d(r,i,c,e.colorSpace)}}:d(u,h,c,e.colorSpace)}function iL(e,t,r){switch(t.type){case"color":r=tW.parse(r);break;case"formatted":r=tX.fromString(r.toString());break;case"resolvedImage":r=t3.fromString(r.toString());break;case"padding":r=tK.parse(r);break;case"colorArray":r=tQ.parse(r);break;case"numberArray":r=tJ.parse(r);break;default:iT(r)===t.type||"enum"===t.type&&t.values[r]||(r=void 0)}return iA(r,e.default,t.default)}ic.register(il,{error:[{kind:"error"},[ta],(e,[t])=>{throw new t0(t.evaluate(e))}],typeof:[ta,[tu],(e,[t])=>tx(t8(t.evaluate(e)))],"to-rgba":[tv(tn,4),[ts],(e,[t])=>{let[r,i,n,a]=t.evaluate(e).rgb;return[255*r,255*i,255*n,a]}],rgb:[ts,[tn,tn,tn],iu],rgba:[ts,[tn,tn,tn,tn],iu],has:{type:to,overloads:[[[ta],(e,[t])=>t.evaluate(e)in e.properties()],[[ta,tc],(e,[t,r])=>t.evaluate(e)in r.evaluate(e)]]},get:{type:tu,overloads:[[[ta],(e,[t])=>ih(t.evaluate(e),e.properties())],[[ta,tc],(e,[t,r])=>ih(t.evaluate(e),r.evaluate(e))]]},"feature-state":[tu,[ta],(e,[t])=>ih(t.evaluate(e),e.featureState||{})],properties:[tc,[],e=>e.properties()],"geometry-type":[ta,[],e=>e.geometryType()],id:[tu,[],e=>e.id()],zoom:[tn,[],e=>e.globals.zoom],"heatmap-density":[tn,[],e=>e.globals.heatmapDensity||0],elevation:[tn,[],e=>e.globals.elevation||0],"line-progress":[tn,[],e=>e.globals.lineProgress||0],accumulated:[tu,[],e=>void 0===e.globals.accumulated?null:e.globals.accumulated],"+":[tn,id(tn),(e,t)=>{let r=0;for(let i of t)r+=i.evaluate(e);return r}],"*":[tn,id(tn),(e,t)=>{let r=1;for(let i of t)r*=i.evaluate(e);return r}],"-":{type:tn,overloads:[[[tn,tn],(e,[t,r])=>t.evaluate(e)-r.evaluate(e)],[[tn],(e,[t])=>-t.evaluate(e)]]},"/":[tn,[tn,tn],(e,[t,r])=>t.evaluate(e)/r.evaluate(e)],"%":[tn,[tn,tn],(e,[t,r])=>t.evaluate(e)%r.evaluate(e)],ln2:[tn,[],()=>Math.LN2],pi:[tn,[],()=>Math.PI],e:[tn,[],()=>Math.E],"^":[tn,[tn,tn],(e,[t,r])=>Math.pow(t.evaluate(e),r.evaluate(e))],sqrt:[tn,[tn],(e,[t])=>Math.sqrt(t.evaluate(e))],log10:[tn,[tn],(e,[t])=>Math.log(t.evaluate(e))/Math.LN10],ln:[tn,[tn],(e,[t])=>Math.log(t.evaluate(e))],log2:[tn,[tn],(e,[t])=>Math.log(t.evaluate(e))/Math.LN2],sin:[tn,[tn],(e,[t])=>Math.sin(t.evaluate(e))],cos:[tn,[tn],(e,[t])=>Math.cos(t.evaluate(e))],tan:[tn,[tn],(e,[t])=>Math.tan(t.evaluate(e))],asin:[tn,[tn],(e,[t])=>Math.asin(t.evaluate(e))],acos:[tn,[tn],(e,[t])=>Math.acos(t.evaluate(e))],atan:[tn,[tn],(e,[t])=>Math.atan(t.evaluate(e))],min:[tn,id(tn),(e,t)=>Math.min(...t.map(t=>t.evaluate(e)))],max:[tn,id(tn),(e,t)=>Math.max(...t.map(t=>t.evaluate(e)))],abs:[tn,[tn],(e,[t])=>Math.abs(t.evaluate(e))],round:[tn,[tn],(e,[t])=>{let r=t.evaluate(e);return r<0?-Math.round(-r):Math.round(r)}],floor:[tn,[tn],(e,[t])=>Math.floor(t.evaluate(e))],ceil:[tn,[tn],(e,[t])=>Math.ceil(t.evaluate(e))],"filter-==":[to,[ta,tu],(e,[t,r])=>e.properties()[t.value]===r.value],"filter-id-==":[to,[tu],(e,[t])=>e.id()===t.value],"filter-type-==":[to,[ta],(e,[t])=>e.geometryType()===t.value],"filter-<":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i{let r=e.id(),i=t.value;return typeof r==typeof i&&r":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>n}],"filter-id->":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>i}],"filter-<=":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i<=n}],"filter-id-<=":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r<=i}],"filter->=":[to,[ta,tu],(e,[t,r])=>{let i=e.properties()[t.value],n=r.value;return typeof i==typeof n&&i>=n}],"filter-id->=":[to,[tu],(e,[t])=>{let r=e.id(),i=t.value;return typeof r==typeof i&&r>=i}],"filter-has":[to,[tu],(e,[t])=>t.value in e.properties()],"filter-has-id":[to,[],e=>null!==e.id()&&void 0!==e.id()],"filter-type-in":[to,[tv(ta)],(e,[t])=>t.value.indexOf(e.geometryType())>=0],"filter-id-in":[to,[tv(tu)],(e,[t])=>t.value.indexOf(e.id())>=0],"filter-in-small":[to,[ta,tv(tu)],(e,[t,r])=>r.value.indexOf(e.properties()[t.value])>=0],"filter-in-large":[to,[ta,tv(tu)],(e,[t,r])=>(function(e,t,r,i){for(;r<=i;){let n=r+i>>1;if(t[n]===e)return!0;t[n]>e?i=n-1:r=n+1}return!1})(e.properties()[t.value],r.value,0,r.value.length-1)],all:{type:to,overloads:[[[to,to],(e,[t,r])=>t.evaluate(e)&&r.evaluate(e)],[id(to),(e,t)=>{for(let r of t)if(!r.evaluate(e))return!1;return!0}]]},any:{type:to,overloads:[[[to,to],(e,[t,r])=>t.evaluate(e)||r.evaluate(e)],[id(to),(e,t)=>{for(let r of t)if(r.evaluate(e))return!0;return!1}]]},"!":[to,[to],(e,[t])=>!t.evaluate(e)],"is-supported-script":[to,[ta],(e,[t])=>{let r=e.globals&&e.globals.isSupportedScript;return!r||r(t.evaluate(e))}],upcase:[ta,[ta],(e,[t])=>t.evaluate(e).toUpperCase()],downcase:[ta,[ta],(e,[t])=>t.evaluate(e).toLowerCase()],concat:[ta,id(tu),(e,t)=>t.map(t=>t7(t.evaluate(e))).join("")],split:[tv(ta),[ta,ta],(e,[t,r])=>t.evaluate(e).split(r.evaluate(e))],join:[ta,[tv(ta),ta],(e,[t,r])=>t.evaluate(e).join(r.evaluate(e))],"resolved-locale":[ta,[th],(e,[t])=>t.evaluate(e).resolvedLocale()]});class iP{constructor(e,t,r){this.expression=e,this._warningHistory={},this._evaluator=new ra,this._defaultValue=t?function(e){if("color"===e.type&&iM(e.default))return new tW(0,0,0,0);switch(e.type){case"color":return tW.parse(e.default)||null;case"padding":return tK.parse(e.default)||null;case"numberArray":return tJ.parse(e.default)||null;case"colorArray":return tQ.parse(e.default)||null;case"variableAnchorOffsetCollection":return t2.parse(e.default)||null;case"projectionDefinition":return t5.parse(e.default)||null;default:return void 0===e.default?null:e.default}}(t):null,this._enumValues=t&&"enum"===t.type?t.values:null,this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t,this._evaluator.featureState=r,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a,this.expression.evaluate(this._evaluator)}evaluate(e,t,r,i,n,a){this._globalState&&(e=iB(e,this._globalState)),this._evaluator.globals=e,this._evaluator.feature=t||null,this._evaluator.featureState=r||null,this._evaluator.canonical=i,this._evaluator.availableImages=n||null,this._evaluator.formattedSection=a||null;try{let e=this.expression.evaluate(this._evaluator);if(null==e||"number"==typeof e&&e!=e)return this._defaultValue;if(this._enumValues&&!(e in this._enumValues))throw new t0(`Expected value to be one of ${Object.keys(this._enumValues).map(e=>JSON.stringify(e)).join(", ")}, but found ${JSON.stringify(e)} instead.`);return e}catch(e){return this._warningHistory[e.message]||(this._warningHistory[e.message]=!0,"u">typeof console&&console.warn(e.message)),this._defaultValue}}}function iI(e){return Array.isArray(e)&&e.length>0&&"string"==typeof e[0]&&e[0]in il}function iz(e,t,r){let i,n=new ro(il,ip,[],t?(i={color:ts,string:ta,number:tn,enum:ta,boolean:to,formatted:td,padding:tf,numberArray:tm,colorArray:tp,projectionDefinition:tl,resolvedImage:tg,variableAnchorOffsetCollection:ty},"array"===t.type?tv(i[t.value]||tu,t.length):i[t.type]):void 0),a=n.parse(e,void 0,void 0,void 0,t&&"string"===t.type?{typeAnnotation:"coerce"}:void 0);return a?iv(new iP(a,t,r)):ix(n.errors)}class iD{constructor(e,t,r){this.kind=e,this._styleExpression=t,this.isStateDependent="constant"!==e&&!ig(t.expression),this.globalStateRefs=ij(t.expression),this._globalState=r}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}}class iO{constructor(e,t,r,i,n){this.kind=e,this.zoomStops=r,this._styleExpression=t,this.isStateDependent="camera"!==e&&!ig(t.expression),this.globalStateRefs=ij(t.expression),this.interpolationType=i,this._globalState=n}evaluateWithoutErrorHandling(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(e,t,r,i,n,a)}evaluate(e,t,r,i,n,a){return this._globalState&&(e=iB(e,this._globalState)),this._styleExpression.evaluate(e,t,r,i,n,a)}interpolationFactor(e,t,r){return this.interpolationType?rv.interpolationFactor(this.interpolationType,e,t,r):0}}function iR(e,t,r){let i=iz(e,t,r);if("error"===i.result)return i;let n=i.value.expression,a=im(n);if(!a&&!ib(t))return ix([new tt("","data expressions not supported")]);let o=iy(n,["zoom"]);if(!o&&!i_(t))return ix([new tt("","zoom expressions not supported")]);let s=function e(t){let r=null;if(t instanceof rs)r=e(t.result);else if(t instanceof r_){for(let i of t.args)if(r=e(i))break}else(t instanceof ru||t instanceof rv)&&t.input instanceof ic&&"zoom"===t.input.name&&(r=t);return r instanceof tt||t.eachChild(t=>{let i=e(t);i instanceof tt?r=i:!r&&i?r=new tt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):r&&i&&r!==i&&(r=new tt("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),r}(n);return s||o?s instanceof tt?ix([s]):s instanceof rv&&!iw(t)?ix([new tt("",'"interpolate" expressions cannot be used with this property')]):iv(s?new iO(a?"camera":"composite",i.value,s.labels,s instanceof rv?s.interpolation:void 0,r):new iD(a?"constant":"source",i.value,r)):ix([new tt("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class iF{constructor(e,t){this._parameters=e,this._specification=t,te(this,function e(t,r){var i;let n=t.stops&&"object"==typeof t.stops[0][0],a=n||!(n||void 0!==t.property),o=t.type||(iw(r)?"exponential":"interval"),s=function(e){switch(e.type){case"color":return tW.parse;case"padding":return tK.parse;case"numberArray":return tJ.parse;case"colorArray":return tQ.parse;default:return null}}(r);if(s&&((t=te({},t)).stops&&(t.stops=t.stops.map(e=>[e[0],s(e[1])])),t.default=s(t.default?t.default:r.default)),t.colorSpace&&"rgb"!==(i=t.colorSpace)&&"hcl"!==i&&"lab"!==i)throw Error(`Unknown color space: "${t.colorSpace}"`);let l=function(e){switch(e){case"exponential":return iC;case"interval":return iE;case"categorical":return iS;case"identity":return iL;default:throw Error(`Unknown function type "${e}"`)}}(o),c,u;if("categorical"===o){for(let e of(c=Object.create(null),t.stops))c[e[0]]=e[1];u=typeof t.stops[0][0]}if(n){let i={},n=[];for(let e=0;ee[0]),evaluate:({zoom:e},i)=>iC({stops:a,base:t.base},r,e).evaluate(e,i)}}if(a){let e="exponential"===o?{name:"exponential",base:void 0!==t.base?t.base:1}:null;return{kind:"camera",interpolationType:e,interpolationFactor:rv.interpolationFactor.bind(void 0,e),zoomStops:t.stops.map(e=>e[0]),evaluate:({zoom:e})=>l(t,r,e,c,u)}}return{kind:"source",evaluate(e,i){let n=i&&i.properties?i.properties[t.property]:void 0;return void 0===n?iA(t.default,r.default):l(t,r,n,c,u)}}}(this._parameters,this._specification))}static deserialize(e){return new iF(e._parameters,e._specification)}static serialize(e){return{_parameters:e._parameters,_specification:e._specification}}}function ij(e,t=new Set){return e instanceof is&&t.add(e.key),e.eachChild(e=>{ij(e,t)}),t}function iB(e,t){let{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s}=e??{};return{zoom:r,heatmapDensity:i,elevation:n,lineProgress:a,isSupportedScript:o,accumulated:s,globalState:t}}function iN(e){if(!0===e||!1===e)return!0;if(!Array.isArray(e)||0===e.length)return!1;switch(e[0]){case"has":return e.length>=2&&"$id"!==e[1]&&"$type"!==e[1];case"in":return e.length>=3&&("string"!=typeof e[1]||Array.isArray(e[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==e.length||Array.isArray(e[1])||Array.isArray(e[2]);case"any":case"all":for(let t of e.slice(1))if(!iN(t)&&"boolean"!=typeof t)return!1;return!0;default:return!0}}let iU={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function iV(e,t){if(null==e)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};iN(e)||(e=function e(t){if(!t)return!0;let r=t[0];return t.length<=1?"any"!==r:"=="===r?iH(t[1],t[2],"=="):"!="===r?iY(iH(t[1],t[2],"==")):"<"===r||">"===r||"<="===r||">="===r?iH(t[1],t[2],r):"any"===r?["any"].concat(t.slice(1).map(e)):"all"===r?["all"].concat(t.slice(1).map(e)):"none"===r?["all"].concat(t.slice(1).map(e).map(iY)):"in"===r?iG(t[1],t.slice(2)):"!in"===r?iY(iG(t[1],t.slice(2))):"has"===r?iW(t[1]):"!has"!==r||iY(iW(t[1]))}(e));let r=iz(e,iU,t);if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return{filter:(e,t,i)=>r.value.evaluate(e,t,{},i),needGeometry:function e(t){if(!Array.isArray(t))return!1;if("within"===t[0]||"distance"===t[0])return!0;for(let r=1;rij(r.value.expression)}}function iq(e,t){return et)}function iH(e,t,r){switch(e){case"$type":return[`filter-type-${r}`,t];case"$id":return[`filter-id-${r}`,t];default:return[`filter-${r}`,e,t]}}function iG(e,t){if(0===t.length)return!1;switch(e){case"$type":return["filter-type-in",["literal",t]];case"$id":return["filter-id-in",["literal",t]];default:return t.length>200&&!t.some(e=>typeof e!=typeof t[0])?["filter-in-large",e,["literal",t.sort(iq)]]:["filter-in-small",e,["literal",t]]}}function iW(e){switch(e){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",e]}}function iY(e){return["!",e]}function iZ(e){let t=e.value;return t?[new e9(e.key,t,"constants have been deprecated as of v8")]:[]}function i$(e){return e instanceof Number||e instanceof String||e instanceof Boolean?e.valueOf():e}function iX(e){if(Array.isArray(e))return e.map(iX);if(e instanceof Object&&!(e instanceof Number||e instanceof String||e instanceof Boolean)){let t={};for(let r in e)t[r]=iX(e[r]);return t}return i$(e)}function iK(e){let t=e.key,r=e.value,i=e.valueSpec||{},n=e.objectElementValidators||{},a=e.style,o=e.styleSpec,s=e.validateSpec,l=[],c=iT(r);if("object"!==c)return[new e9(t,r,`object expected, ${c} found`)];for(let e in r){let c=e.split(".")[0],u=tB(i,c)||i["*"],h;if(tB(n,c))h=n[c];else if(tB(i,c)){if(void 0===r[e])continue;h=s}else if(n["*"])h=n["*"];else{if(!i["*"]){l.push(new e9(t,r[e],`unknown property "${e}"`));continue}h=s}l=l.concat(h({key:(t&&`${t}.`)+e,value:r[e],valueSpec:u,style:a,styleSpec:o,object:r,objectKey:e,validateSpec:s},r))}for(let e in i)n[e]||i[e].required&&void 0===i[e].default&&void 0===r[e]&&l.push(new e9(t,r,`missing required property "${e}"`));return l}function iJ(e){let t=e.value,r=e.valueSpec,i=e.style,n=e.styleSpec,a=e.key,o=e.arrayElementValidator||e.validateSpec;if("array"!==iT(t))return[new e9(a,t,`array expected, ${iT(t)} found`)];if(r.length&&t.length!==r.length)return[new e9(a,t,`array length ${r.length} expected, length ${t.length} found`)];let s={type:r.value,values:r.values};n.$version<7&&(s.function=r.function),"object"===iT(r.value)&&(s=r.value);let l=[];for(let r=0;ri.maximum?[new e9(t,r,`${r} is greater than the maximum value ${i.maximum}`)]:[]}function i0(e){let t=e.valueSpec,r=i$(e.value.type),i,n,a,o={},s="categorical"!==r&&void 0===e.value.property,l="array"===iT(e.value.stops)&&"array"===iT(e.value.stops[0])&&"object"===iT(e.value.stops[0][0]),c=iK({key:e.key,value:e.value,valueSpec:e.styleSpec.function,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{stops:function(e){if("identity"===r)return[new e9(e.key,e.value,'identity function may not have a "stops" property')];let t=[],i=e.value;return t=t.concat(iJ({key:e.key,value:i,valueSpec:e.valueSpec,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,arrayElementValidator:u})),"array"===iT(i)&&0===i.length&&t.push(new e9(e.key,i,"array must have at least one stop")),t},default:function(e){return e.validateSpec({key:e.key,value:e.value,valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec})}}});return"identity"===r&&s&&c.push(new e9(e.key,e.value,'missing required property "property"')),"identity"===r||e.value.stops||c.push(new e9(e.key,e.value,'missing required property "stops"')),"exponential"===r&&e.valueSpec.expression&&!iw(e.valueSpec)&&c.push(new e9(e.key,e.value,"exponential functions not supported")),e.styleSpec.$version>=8&&(s||ib(e.valueSpec)?s&&!i_(e.valueSpec)&&c.push(new e9(e.key,e.value,"zoom functions not supported")):c.push(new e9(e.key,e.value,"property functions not supported"))),("categorical"===r||l)&&void 0===e.value.property&&c.push(new e9(e.key,e.value,'"property" property is required')),c;function u(e){let r=[],i=e.value,s=e.key;if("array"!==iT(i))return[new e9(s,i,`array expected, ${iT(i)} found`)];if(2!==i.length)return[new e9(s,i,`array length 2 expected, length ${i.length} found`)];if(l){if("object"!==iT(i[0]))return[new e9(s,i,`object expected, ${iT(i[0])} found`)];if(void 0===i[0].zoom)return[new e9(s,i,"object stop key must have zoom")];if(void 0===i[0].value)return[new e9(s,i,"object stop key must have value")];if(a&&a>i$(i[0].zoom))return[new e9(s,i[0].zoom,"stop zoom values must appear in ascending order")];i$(i[0].zoom)!==a&&(a=i$(i[0].zoom),n=void 0,o={}),r=r.concat(iK({key:`${s}[0]`,value:i[0],valueSpec:{zoom:{}},validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec,objectElementValidators:{zoom:iQ,value:h}}))}else r=r.concat(h({key:`${s}[0]`,value:i[0],validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec},i));return iI(iX(i[1]))?r.concat([new e9(`${s}[1]`,i[1],"expressions are not allowed in function stops.")]):r.concat(e.validateSpec({key:`${s}[1]`,value:i[1],valueSpec:t,validateSpec:e.validateSpec,style:e.style,styleSpec:e.styleSpec}))}function h(e,a){let s=iT(e.value),l=i$(e.value),c=null!==e.value?e.value:a;if(i){if(s!==i)return[new e9(e.key,c,`${s} stop domain type must match previous stop domain type ${i}`)]}else i=s;if("number"!==s&&"string"!==s&&"boolean"!==s)return[new e9(e.key,c,"stop domain value must be a number, string, or boolean")];if("number"!==s&&"categorical"!==r){let i=`number expected, ${s} found`;return ib(t)&&void 0===r&&(i+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new e9(e.key,c,i)]}return"categorical"!==r||"number"!==s||isFinite(l)&&Math.floor(l)===l?"categorical"!==r&&"number"===s&&void 0!==n&&lnew e9(`${e.key}${t.key}`,e.value,t.message));let r=t.value.expression||t.value._styleExpression.expression;if("property"===e.expressionContext&&"text-font"===e.propertyKey&&!r.outputDefined())return[new e9(e.key,e.value,`Invalid data expression for "${e.propertyKey}". Output values must be contained as literals within the expression.`)];if("property"===e.expressionContext&&"layout"===e.propertyType&&!ig(r))return[new e9(e.key,e.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===e.expressionContext&&!ig(r))return[new e9(e.key,e.value,'"feature-state" data expressions are not supported with filters.')];if(e.expressionContext&&0===e.expressionContext.indexOf("cluster")){if(!iy(r,["zoom","feature-state"]))return[new e9(e.key,e.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===e.expressionContext&&!im(r))return[new e9(e.key,e.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function i2(e){let t=e.key,r=e.value,i=iT(r);return"string"!==i?[new e9(t,r,`color expected, ${i} found`)]:tW.parse(String(r))?[]:[new e9(t,r,`color expected, "${r}" found`)]}function i3(e){let t=e.key,r=e.value,i=e.valueSpec,n=[];return Array.isArray(i.values)?-1===i.values.indexOf(i$(r))&&n.push(new e9(t,r,`expected one of [${i.values.join(", ")}], ${JSON.stringify(r)} found`)):-1===Object.keys(i.values).indexOf(i$(r))&&n.push(new e9(t,r,`expected one of [${Object.keys(i.values).join(", ")}], ${JSON.stringify(r)} found`)),n}function i5(e){return iN(iX(e.value))?i1(te({},e,{expressionContext:"filter",valueSpec:{value:"boolean"}})):function e(t){let r=t.value,i=t.key;if("array"!==iT(r))return[new e9(i,r,`array expected, ${iT(r)} found`)];let n=t.styleSpec,a,o=[];if(r.length<1)return[new e9(i,r,"filter array must have at least 1 element")];switch(o=o.concat(i3({key:`${i}[0]`,value:r[0],valueSpec:n.filter_operator,style:t.style,styleSpec:t.styleSpec})),i$(r[0])){case"<":case"<=":case">":case">=":r.length>=2&&"$type"===i$(r[1])&&o.push(new e9(i,r,`"$type" cannot be use with operator "${r[0]}"`));case"==":case"!=":3!==r.length&&o.push(new e9(i,r,`filter array for operator "${r[0]}" must have 3 elements`));case"in":case"!in":r.length>=2&&"string"!==(a=iT(r[1]))&&o.push(new e9(`${i}[1]`,r[1],`string expected, ${a} found`));for(let e=2;e{e in n&&i.push(new e9(a,n[e],`"${e}" is prohibited for ref layers`))}),o.layers.forEach(t=>{i$(t.id)===c&&(e=t)}),e?e.ref?i.push(new e9(a,n.ref,"ref cannot reference another ref layer")):l=i$(e.type):i.push(new e9(a,n.ref,`ref layer "${c}" not found`))}else if("background"!==l)if(n.source){let e=o.sources&&o.sources[n.source],t=e&&i$(e.type);e?"vector"===t&&"raster"===l?i.push(new e9(a,n.source,`layer "${n.id}" requires a raster source`)):"raster-dem"!==t&&"hillshade"===l||"raster-dem"!==t&&"color-relief"===l?i.push(new e9(a,n.source,`layer "${n.id}" requires a raster-dem source`)):"raster"===t&&"raster"!==l?i.push(new e9(a,n.source,`layer "${n.id}" requires a vector source`)):"vector"!==t||n["source-layer"]?"raster-dem"===t&&"hillshade"!==l&&"color-relief"!==l?i.push(new e9(a,n.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):"line"===l&&n.paint&&n.paint["line-gradient"]&&("geojson"!==t||!e.lineMetrics)&&i.push(new e9(a,n,`layer "${n.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):i.push(new e9(a,n,`layer "${n.id}" must specify a "source-layer"`)):i.push(new e9(a,n.source,`source "${n.source}" not found`))}else i.push(new e9(a,n,'missing required property "source"'));return"raster"===l&&null!=(t=n.paint)&&t.resampling&&null!=(r=n.paint)&&r["raster-resampling"]&&i.push(new e9(a,n.paint,`layer "${n.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),i=i.concat(iK({key:a,value:n,valueSpec:s.layer,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":()=>[],type:()=>e.validateSpec({key:`${a}.type`,value:n.type,valueSpec:s.layer.type,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,object:n,objectKey:"type"}),filter:i5,layout:e=>iK({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>i8(te({layerType:l},e))}}),paint:e=>iK({layer:n,key:e.key,value:e.value,style:e.style,styleSpec:e.styleSpec,validateSpec:e.validateSpec,objectElementValidators:{"*":e=>i6(te({layerType:l},e))}})}}))}function i9(e){let t=e.value,r=e.key,i=iT(t);return"string"!==i?[new e9(r,t,`string expected, ${i} found`)]:[]}let ne={promoteId:function({key:e,value:t}){if("string"===iT(t))return i9({key:e,value:t});{let r=[];for(let i in t)r.push(...i9({key:`${e}.${i}`,value:t[i]}));return r}}};function nt(e){let t=e.value,r=e.key,i=e.styleSpec,n=e.style,a=e.validateSpec;if(!t.type)return[new e9(r,t,'"type" is required')];let o=i$(t.type),s;switch(o){case"vector":case"raster":return iK({key:r,value:t,valueSpec:i[`source_${o.replace("-","_")}`],style:e.style,styleSpec:i,objectElementValidators:ne,validateSpec:a});case"raster-dem":return function(e){var t;let r=null!=(t=e.sourceName)?t:"",i=e.value,n=e.styleSpec,a=n.source_raster_dem,o=e.style,s=[],l=iT(i);if(void 0===i)return s;if("object"!==l)return s.push(new e9("source_raster_dem",i,`object expected, ${l} found`)),s;let c="custom"===i$(i.encoding),u=["redFactor","greenFactor","blueFactor","baseShift"],h=e.value.encoding?`"${e.value.encoding}"`:"Default";for(let t in i)!c&&u.includes(t)?s.push(new e9(t,i[t],`In "${r}": "${t}" is only valid when "encoding" is set to "custom". ${h} encoding found`)):a[t]?s=s.concat(e.validateSpec({key:t,value:i[t],valueSpec:a[t],validateSpec:e.validateSpec,style:o,styleSpec:n})):s.push(new e9(t,i[t],`unknown property "${t}"`));return s}({sourceName:r,value:t,style:e.style,styleSpec:i,validateSpec:a});case"geojson":if(s=iK({key:r,value:t,valueSpec:i.source_geojson,style:n,styleSpec:i,validateSpec:a,objectElementValidators:ne}),t.cluster)for(let e in t.clusterProperties){let[i,n]=t.clusterProperties[e],a="string"==typeof i?[i,["accumulated"],["get",e]]:i;s.push(...i1({key:`${r}.${e}.map`,value:n,expressionContext:"cluster-map"})),s.push(...i1({key:`${r}.${e}.reduce`,value:a,expressionContext:"cluster-reduce"}))}return s;case"video":return iK({key:r,value:t,valueSpec:i.source_video,style:n,validateSpec:a,styleSpec:i});case"image":return iK({key:r,value:t,valueSpec:i.source_image,style:n,validateSpec:a,styleSpec:i});case"canvas":return[new e9(r,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return i3({key:`${r}.type`,value:t.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function nr(e){let t=e.value,r=e.styleSpec,i=r.light,n=e.style,a=[],o=iT(t);if(void 0===t)return a;if("object"!==o)return a.concat([new e9("light",t,`object expected, ${o} found`)]);for(let o in t){let s=o.match(/^(.*)-transition$/);a=a.concat(s&&i[s[1]]&&i[s[1]].transition?e.validateSpec({key:o,value:t[o],valueSpec:r.transition,validateSpec:e.validateSpec,style:n,styleSpec:r}):i[o]?e.validateSpec({key:o,value:t[o],valueSpec:i[o],validateSpec:e.validateSpec,style:n,styleSpec:r}):[new e9(o,t[o],`unknown property "${o}"`)])}return a}function ni(e){let t=e.value,r=e.styleSpec,i=r.sky,n=e.style,a=iT(t);if(void 0===t)return[];if("object"!==a)return[new e9("sky",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(i[a]?e.validateSpec({key:a,value:t[a],valueSpec:i[a],style:n,styleSpec:r}):[new e9(a,t[a],`unknown property "${a}"`)]);return o}function nn(e){let t=e.value,r=e.styleSpec,i=r.terrain,n=e.style,a=[],o=iT(t);if(void 0===t)return a;if("object"!==o)return a.concat([new e9("terrain",t,`object expected, ${o} found`)]);for(let o in t)a=a.concat(i[o]?e.validateSpec({key:o,value:t[o],valueSpec:i[o],validateSpec:e.validateSpec,style:n,styleSpec:r}):[new e9(o,t[o],`unknown property "${o}"`)]);return a}function na(e){let t=[],r=e.value,i=e.key;if(Array.isArray(r)){let n=[],a=[];for(let o in r)r[o].id&&n.includes(r[o].id)&&t.push(new e9(i,r,`all the sprites' ids must be unique, but ${r[o].id} is duplicated`)),n.push(r[o].id),r[o].url&&a.includes(r[o].url)&&t.push(new e9(i,r,`all the sprites' URLs must be unique, but ${r[o].url} is duplicated`)),a.push(r[o].url),t=t.concat(iK({key:`${i}[${o}]`,value:r[o],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:e.validateSpec}));return t}return i9({key:i,value:r})}function no(e){return!!e&&e.constructor===Object}function ns(e){return no(e.value)?[]:[new e9(e.key,e.value,`object expected, ${iT(e.value)} found`)]}let nl={"*":()=>[],array:iJ,boolean:function(e){let t=e.value,r=e.key,i=iT(t);return"boolean"!==i?[new e9(r,t,`boolean expected, ${i} found`)]:[]},number:iQ,color:i2,constants:iZ,enum:i3,filter:i5,function:i0,layer:i7,object:iK,source:nt,light:nr,sky:ni,terrain:nn,projection:function(e){let t=e.value,r=e.styleSpec,i=r.projection,n=e.style,a=iT(t);if(void 0===t)return[];if("object"!==a)return[new e9("projection",t,`object expected, ${a} found`)];let o=[];for(let a in t)o=o.concat(i[a]?e.validateSpec({key:a,value:t[a],valueSpec:i[a],style:n,styleSpec:r}):[new e9(a,t[a],`unknown property "${a}"`)]);return o},projectionDefinition:function(e){var t;let r=e.key,i=e.value,n=iT(i=i instanceof String?i.valueOf():i);return"array"!==n||Array.isArray(t=i)&&3===t.length&&"string"==typeof t[0]&&"string"==typeof t[1]&&"number"==typeof t[2]||["interpolate","step","literal"].includes(i[0])?["array","string"].includes(n)?[]:[new e9(r,i,`projection expected, invalid type "${n}" found`)]:[new e9(r,i,`projection expected, invalid array ${JSON.stringify(i)} found`)]},string:i9,formatted:function(e){return 0===i9(e).length?[]:i1(e)},resolvedImage:function(e){return 0===i9(e).length?[]:i1(e)},padding:function(e){let t=e.key,r=e.value;if("array"===iT(r)){if(r.length<1||r.length>4)return[new e9(t,r,`padding requires 1 to 4 values; ${r.length} values found`)];let i={type:"number"},n=[];for(let a=0;a[]}})),e.constants&&(r=r.concat(iZ({key:"constants",value:e.constants}))),nf(r)}function nd(e){return function(t){return e(Object.assign({},t,{validateSpec:nc}))}}function nf(e){return[].concat(e).sort((e,t)=>e.line-t.line)}function np(e){return function(...t){return nf(e.apply(this,t))}}nh.source=np(nd(nt)),nh.sprite=np(nd(na)),nh.glyphs=np(nd(nu)),nh.light=np(nd(nr)),nh.sky=np(nd(ni)),nh.terrain=np(nd(nn)),nh.state=np(nd(ns)),nh.layer=np(nd(i7)),nh.filter=np(nd(i5)),nh.paintProperty=np(nd(i6)),nh.layoutProperty=np(nd(i8));let nm={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class ng{constructor(e,t){this._globalState=t,this.setValue(e)}evaluate(){var e;return null!=(e=this._literalValue)?e:this._compiledValue.evaluate({})}setValue(e){if(null==e||"visible"===e||"none"===e)return this._literalValue="none"===e?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let t=iz(e,nm,this._globalState);if("error"===t.result)throw this._literalValue="visible",this._compiledValue=void 0,Error(t.value.map(e=>`${e.key}: ${e.message}`).join(", "));this._literalValue=void 0,this._compiledValue=t.value,this._globalStateRefs=ij(t.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let ny=nh.light,nv=nh.sky,nx=nh.paintProperty,nb=nh.layoutProperty;function n_(e,t){let r=!1;if(t?.length)for(let i of t)e.fire(new eJ(Error(i.message))),r=!0;return r}class nw{constructor(e,t,r){let i=this.cells=[];if(e instanceof ArrayBuffer){this.arrayBuffer=e;let n=new Int32Array(this.arrayBuffer);e=n[0],this.d=(t=n[1])+2*(r=n[2]);for(let e=0;e=c[l+0]&&i>=c[l+1])?(o[u]=!0,a.push(n[u])):o[u]=!1}}}_forEachCell(e,t,r,i,n,a,o,s){let l=this._convertToCellCoord(e),c=this._convertToCellCoord(t),u=this._convertToCellCoord(r),h=this._convertToCellCoord(i);for(let d=l;d<=u;d++)for(let l=c;l<=h;l++){let c=this.d*l+d;if((!s||s(this._convertFromCellCoord(d),this._convertFromCellCoord(l),this._convertFromCellCoord(d+1),this._convertFromCellCoord(l+1)))&&n.call(this,e,t,r,i,c,a,o,s))return}}_convertFromCellCoord(e){return(e-this.padding)/this.scale}_convertToCellCoord(e){return Math.max(0,Math.min(this.d-1,Math.floor(e*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let e=this.cells,t=3+this.cells.length+1+1,r=0;for(let e of this.cells)r+=e.length;let i=new Int32Array(t+r+this.keys.length+this.bboxes.length);i[0]=this.extent,i[1]=this.n,i[2]=this.padding;let n=t;for(let t=0;ttypeof ArrayBuffer&&(e instanceof ArrayBuffer||(null==(t=e.constructor)?void 0:t.name)==="ArrayBuffer")}function nA(e){return e.$name||e.constructor._classRegistryKey}function nS(e){return!function(e){if(null===e||"object"!=typeof e)return!1;let t=nA(e);return t&&"Object"!==t}(e)&&(null==e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||e instanceof Boolean||e instanceof Number||e instanceof String||e instanceof Date||e instanceof RegExp||e instanceof Blob||e instanceof Error||nk(e)||eL(e)||ArrayBuffer.isView(e)||e instanceof ImageData)}function nE(e,t){if(nS(e))return(nk(e)||eL(e))&&t&&t.push(e),ArrayBuffer.isView(e)&&t&&t.push(e.buffer),e instanceof ImageData&&t&&t.push(e.data.buffer),e;if(Array.isArray(e)){let r=[];for(let i of e)r.push(nE(i,t));return r}if("object"!=typeof e)throw Error("can't serialize object of type "+typeof e);let r=nA(e);if(!r)throw Error(`can't serialize object of unregistered class ${e.constructor.name}`);if(!nT[r])throw Error(`${r} is not registered.`);let{klass:i}=nT[r],n=i.serialize?i.serialize(e,t):{};if(i.serialize){if(n===t?.[t.length-1])throw Error("statically serialized object won't survive transfer of $name property")}else{for(let i in e){if(!e.hasOwnProperty(i)||nT[r].omit.includes(i))continue;let a=e[i];n[i]=nT[r].shallow.includes(i)?a:nE(a,t)}e instanceof Error&&(n.message=e.message)}if(n.$name)throw Error("$name property is reserved for worker serialization logic.");return"Object"!==r&&(n.$name=r),n}function nC(e){if(nS(e))return e;if(Array.isArray(e))return e.map(nC);if("object"!=typeof e)throw Error("can't deserialize object of type "+typeof e);let t=nA(e)||"Object";if(!nT[t])throw Error(`can't deserialize unregistered class ${t}`);let{klass:r}=nT[t];if(!r)throw Error(`can't deserialize unregistered class ${t}`);if(r.deserialize)return r.deserialize(e);let i=Object.create(r.prototype);for(let r of Object.keys(e)){if("$name"===r)continue;let n=e[r];i[r]=nT[t].shallow.includes(r)?n:nC(n)}return i}class nL{constructor(){this.first=!0}update(e,t){let r=Math.floor(e);return this.first?(this.first=!1,this.lastIntegerZoom=r,this.lastIntegerZoomTime=0,this.lastZoom=e,this.lastFloorZoom=r,!0):(this.lastFloorZoom>r?(this.lastIntegerZoom=r+1,this.lastIntegerZoomTime=t):this.lastFloorZoom{try{return RegExp(`\\p{sc=${e}}`,"u").source}catch{return null}}).filter(e=>e).join("|"),"u")}let nO=nD(["Arab","Dupl","Mong","Ougr","Syrc"]);function nR(e){return!(nP(e)||/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(e)))}let nF=nD(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function nj(e){return nF.test(String.fromCodePoint(e))}let nB=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(e){this.pluginStatus=e.pluginStatus,this.pluginURL=e.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(e){if(nB.isParsed())throw Error("RTL text plugin already registered.");this.applyArabicShaping=e.applyArabicShaping,this.processBidirectionalText=e.processBidirectionalText,this.processStyledBidirectionalText=e.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return null!=this.applyArabicShaping&&null!=this.processBidirectionalText&&null!=this.processStyledBidirectionalText}getRTLTextPluginStatus(){return this.pluginStatus}syncState(e,t){return _(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if("loading"!==e.pluginStatus)return this.setState(e),e;let r=e.pluginURL,i=new Promise(e=>{this.loadScriptResolve=e});t(r);let n=new Promise(e=>setTimeout(()=>e(),this.TIMEOUT));if(yield Promise.race([i,n]),this.isParsed()){let e={pluginStatus:"loaded",pluginURL:r};return this.setState(e),e}throw this.setState({pluginStatus:"error",pluginURL:""}),Error(`RTL Text Plugin failed to import scripts from ${r}`)})}};class nN{constructor(e,t){this.isSupportedScript=nU,this.zoom=e,t?(this.now=t.now||0,this.fadeDuration=t.fadeDuration||0,this.zoomHistory=t.zoomHistory||new nL,this.transition=t.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new nL,this.transition={})}crossFadingFactor(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let e=this.zoom,t=e-Math.floor(e),r=this.crossFadingFactor();return e>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:t+(1-t)*r}:{fromScale:.5,toScale:1,t:1-(1-r)*t}}}function nU(e){var t,r="loaded"===nB.getRTLTextPluginStatus();for(let i of e)if(t=i.codePointAt(0),!r&&nj(t)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(t)))return!1;return!0}let nV="-transition";class nq{constructor(e,t,r){this.property=e,this.value=t,this.expression=function(e,t,r){if(iM(e))return new iF(e,t);if(iI(e)){let i=iR(e,t,r);if("error"===i.result)throw Error(i.value.map(e=>`${e.key}: ${e.message}`).join(", "));return i.value}{let r=e;return"color"===t.type&&"string"==typeof e?r=tW.parse(e):"padding"===t.type&&("number"==typeof e||Array.isArray(e))?r=tK.parse(e):"numberArray"===t.type&&("number"==typeof e||Array.isArray(e))?r=tJ.parse(e):"colorArray"===t.type&&("string"==typeof e||Array.isArray(e))?r=tQ.parse(e):"variableAnchorOffsetCollection"===t.type&&Array.isArray(e)?r=t2.parse(e):"projectionDefinition"===t.type&&"string"==typeof e&&(r=t5.parse(e)),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>r}}}(void 0===t?e.specification.default:t,e.specification,r)}isDataDriven(){return"source"===this.expression.kind||"composite"===this.expression.kind}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(e,t,r){return this.property.possiblyEvaluate(this,e,t,r)}}class nH{constructor(e,t){this.property=e,this.value=new nq(e,void 0,t)}transitioned(e,t){return new nW(this.property,this.value,t,eb({},e.transition,this.transition),e.now)}untransitioned(){return new nW(this.property,this.value,null,{},0)}}class nG{constructor(e,t){this._properties=e,this._values=Object.create(e.defaultTransitionablePropertyValues),this._globalState=t}hasProperty(e){return e in this._properties.defaultTransitionablePropertyValues}getValue(e){return eM(this._values[e].value.value)}setValue(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new nH(this._values[e].property,this._globalState)),this._values[e].value=new nq(this._values[e].property,null===t?void 0:eM(t),this._globalState)}getTransition(e){return eM(this._values[e].transition)}setTransition(e,t){Object.hasOwn(this._values,e)||(this._values[e]=new nH(this._values[e].property,this._globalState)),this._values[e].transition=eM(t)||void 0}serialize(){let e={};for(let t of Object.keys(this._values)){let r=this.getValue(t);void 0!==r&&(e[t]=r);let i=this.getTransition(t);void 0!==i&&(e[`${t}${nV}`]=i)}return e}transitioned(e,t){let r=new nY(this._properties);for(let i of Object.keys(this._values))r._values[i]=this._values[i].transitioned(e,t._values[i]);return r}untransitioned(){let e=new nY(this._properties);for(let t of Object.keys(this._values))e._values[t]=this._values[t].untransitioned();return e}}class nW{constructor(e,t,r,i,n){this.property=e,this.value=t,this.begin=n+i.delay||0,this.end=this.begin+i.duration||0,e.specification.transition&&(i.delay||i.duration)&&(this.prior=r)}possiblyEvaluate(e,t,r){let i=e.now||0,n=this.value.possiblyEvaluate(e,t,r),a=this.prior;if(a){if(i>this.end||this.value.isDataDriven())return this.prior=null,n;if(ii.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class n0{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,i){if(void 0!==e.value){if("constant"===e.expression.kind){let n=e.expression.evaluate(t,null,{},r,i);return this._calculate(n,n,n,t)}return this._calculate(e.expression.evaluate(new nN(Math.floor(t.zoom-1),t)),e.expression.evaluate(new nN(Math.floor(t.zoom),t)),e.expression.evaluate(new nN(Math.floor(t.zoom+1),t)),t)}}_calculate(e,t,r,i){return i.zoom>i.zoomHistory.lastIntegerZoom?{from:e,to:t}:{from:r,to:t}}interpolate(e){return e}}class n1{constructor(e){this.specification=e}possiblyEvaluate(e,t,r,i){return!!e.expression.evaluate(t,null,{},r,i)}interpolate(){return!1}}class n2{constructor(e){for(let t in this.properties=e,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],e){let r=e[t];r.specification.overridable&&this.overridableProperties.push(t);let i=this.defaultPropertyValues[t]=new nq(r,void 0,void 0),n=this.defaultTransitionablePropertyValues[t]=new nH(r,void 0);this.defaultTransitioningPropertyValues[t]=n.untransitioned(),this.defaultPossiblyEvaluatedValues[t]=i.possiblyEvaluate({})}}}nM("DataDrivenProperty",nJ),nM("DataConstantProperty",nK),nM("CrossFadedDataDrivenProperty",nQ),nM("CrossFadedProperty",n0),nM("ColorRampProperty",n1);let n3=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",n5=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class n4 extends eQ{constructor(e,t,r){if(super(),this.id=e.id,this.type=e.type,this._globalState=r,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(e,t){return new ng(e,t)}(this.visibility,r),"custom"!==e.type&&(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,this._featureFilter=iV(e.filter,r)),t.layout&&(this._unevaluatedLayout=new nZ(t.layout,r)),t.paint)){for(let i in this._transitionablePaint=new nG(t.paint,r),e.paint)this.setPaintProperty(i,e.paint[i],{validate:!1});for(let t in e.layout)this.setLayoutProperty(t,e.layout[t],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new nX(t.paint)}}setFilter(e){this.filter=e,this._featureFilter=iV(e,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(e){var t;if("visibility"===e)return this.visibility;if(null!=(t=this._transitionablePaint)&&t.hasProperty(e))throw Error(e+n3);if(!this._unevaluatedLayout)throw Error(`Cannot get layout property "${e}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(e)}getLayoutAffectingGlobalStateRefs(){let e=new Set;for(let t of this._visibilityExpression.getGlobalStateRefs())e.add(t);if(this._unevaluatedLayout)for(let t in this._unevaluatedLayout._values)for(let r of this._unevaluatedLayout._values[t].getGlobalStateRefs())e.add(r);for(let t of this._featureFilter.getGlobalStateRefs())e.add(t);return e}getPaintAffectingGlobalStateRefs(){var e;let t=new globalThis.Map;if(this._transitionablePaint)for(let r in this._transitionablePaint._values){let i=this._transitionablePaint._values[r].value;for(let n of i.getGlobalStateRefs()){let a=null!=(e=t.get(n))?e:[];a.push({name:r,value:i.value}),t.set(n,a)}}return t}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(e,t,r={}){var i;"visibility"===e?(this.visibility=t,this._visibilityExpression.setValue(t),this.recalculateVisibility()):null!=(i=this._transitionablePaint)&&i.hasProperty(e)?this.fire(new eJ(Error(e+n3))):null!=t&&this._validate(nb,`layers.${this.id}.layout.${e}`,e,t,r)||this._unevaluatedLayout.setValue(e,t)}getPaintProperty(e){var t,r;if(e.endsWith(nV)){let r=e.slice(0,-11);if("visibility"===r||null!=(t=this._unevaluatedLayout)&&t.hasProperty(r))throw Error(e+n5);return this._transitionablePaint.getTransition(r)}if("visibility"===e||null!=(r=this._unevaluatedLayout)&&r.hasProperty(e))throw Error(e+n5);return this._transitionablePaint.getValue(e)}setPaintProperty(e,t,r={}){var i;if("visibility"===e||null!=(i=this._unevaluatedLayout)&&i.hasProperty(e))return this.fire(new eJ(Error(e+n5))),!1;if(null!=t&&this._validate(nx,`layers.${this.id}.paint.${e}`,e,t,r))return!1;if(e.endsWith(nV))return this._transitionablePaint.setTransition(e.slice(0,-11),t||void 0),!1;{let r=this._transitionablePaint._values[e],i="cross-faded-data-driven"===r.property.specification["property-type"],n=r.value.isDataDriven(),a=r.value;this._transitionablePaint.setValue(e,t),this._handleSpecialPaintPropertyUpdate(e);let o=this._transitionablePaint._values[e].value;return o.isDataDriven()||n||i||this._handleOverridablePaintPropertyUpdate(e,a,o)}}_handleSpecialPaintPropertyUpdate(e){}_handleOverridablePaintPropertyUpdate(e,t,r){return!1}isHidden(e=this.minzoom,t=!1){return!!(this.minzoom&&e<(t?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&e>=this.maxzoom)||"none"===this._evaluatedVisibility}updateTransitions(e){this._transitioningPaint=this._transitionablePaint.transitioned(e,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(e,t){e.getCrossfadeParameters&&(this._crossfadeParameters=e.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(e,void 0,t)),this.paint=this._transitioningPaint.possiblyEvaluate(e,void 0,t)}serialize(){var e,t;let r={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:null==(e=this._unevaluatedLayout)?void 0:e.serialize(),paint:null==(t=this._transitionablePaint)?void 0:t.serialize()};return this.visibility&&(r.layout||(r.layout={}),r.layout.visibility=this.visibility),eT(r,(e,t)=>!(void 0===e||"layout"===t&&!Object.keys(e).length||"paint"===t&&!Object.keys(e).length))}_validate(e,t,r,i,n={}){return n?.validate!==!1&&n_(this,e.call(nh,{key:t,layerType:this.type,objectKey:r,value:i,styleSpec:e0,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let e in this.paint._values){let t=this.paint.get(e);if(t instanceof n$&&ib(t.property.specification)&&("source"===t.value.kind||"composite"===t.value.kind)&&t.value.isStateDependent)return!0}return!1}}var n6={get paint(){return a=a||new n2({"raster-opacity":new nK(e0.paint_raster["raster-opacity"]),"raster-hue-rotate":new nK(e0.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new nK(e0.paint_raster["raster-brightness-min"]),"raster-brightness-max":new nK(e0.paint_raster["raster-brightness-max"]),"raster-saturation":new nK(e0.paint_raster["raster-saturation"]),"raster-contrast":new nK(e0.paint_raster["raster-contrast"]),resampling:new nK(e0.paint_raster.resampling),"raster-resampling":new nK(e0.paint_raster["raster-resampling"]),"raster-fade-duration":new nK(e0.paint_raster["raster-fade-duration"])})}};class n8 extends n4{constructor(e,t){super(e,n6,t)}}let n7={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class n9{constructor(e,t){this._structArray=e,this._pos1=t*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ae{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(e,t){return e._trim(),t&&(e.isTransferred=!0,t.push(e.arrayBuffer)),{length:e.length,arrayBuffer:e.arrayBuffer}}static deserialize(e){let t=Object.create(this.prototype);return t.arrayBuffer=e.arrayBuffer,t.length=e.length,t.capacity=e.arrayBuffer.byteLength/t.bytesPerElement,t._refreshViews(),t}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(e){this.reserve(e),this.length=e}reserve(e){if(e>this.capacity){this.capacity=Math.max(e,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let t=this.uint8;this._refreshViews(),t&&this.uint8.set(t)}}_refreshViews(){throw Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function at(e,t=1){let r=0,i=0;return{members:e.map(e=>{let n=n7[e.type].BYTES_PER_ELEMENT,a=r=ar(r,Math.max(t,n)),o=e.components||1;return i=Math.max(i,n),r+=n*o,{name:e.name,type:e.type,components:o,offset:a}}),size:ar(r,Math.max(i,t)),alignment:t}}function ar(e,t){return Math.ceil(e/t)*t}class ai extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.int16[i+0]=t,this.int16[i+1]=r,e}}ai.prototype.bytesPerElement=4,nM("StructArrayLayout2i4",ai);class an extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.int16[n+0]=t,this.int16[n+1]=r,this.int16[n+2]=i,e}}an.prototype.bytesPerElement=6,nM("StructArrayLayout3i6",an);class aa extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let a=4*e;return this.int16[a+0]=t,this.int16[a+1]=r,this.int16[a+2]=i,this.int16[a+3]=n,e}}aa.prototype.bytesPerElement=8,nM("StructArrayLayout4i8",aa);class ao extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=a,this.int16[s+5]=o,e}}ao.prototype.bytesPerElement=12,nM("StructArrayLayout2i4i12",ao);class as extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=4*e,l=8*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.uint8[l+4]=i,this.uint8[l+5]=n,this.uint8[l+6]=a,this.uint8[l+7]=o,e}}as.prototype.bytesPerElement=8,nM("StructArrayLayout2i4ub8",as);class al extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.float32[i+0]=t,this.float32[i+1]=r,e}}al.prototype.bytesPerElement=8,nM("StructArrayLayout2f8",al);class ac extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,c){let u=this.length;return this.resize(u+1),this.emplace(u,e,t,r,i,n,a,o,s,l,c)}emplace(e,t,r,i,n,a,o,s,l,c,u){let h=10*e;return this.uint16[h+0]=t,this.uint16[h+1]=r,this.uint16[h+2]=i,this.uint16[h+3]=n,this.uint16[h+4]=a,this.uint16[h+5]=o,this.uint16[h+6]=s,this.uint16[h+7]=l,this.uint16[h+8]=c,this.uint16[h+9]=u,e}}ac.prototype.bytesPerElement=20,nM("StructArrayLayout10ui20",ac);class au extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s){let l=this.length;return this.resize(l+1),this.emplace(l,e,t,r,i,n,a,o,s)}emplace(e,t,r,i,n,a,o,s,l){let c=8*e;return this.uint16[c+0]=t,this.uint16[c+1]=r,this.uint16[c+2]=i,this.uint16[c+3]=n,this.uint16[c+4]=a,this.uint16[c+5]=o,this.uint16[c+6]=s,this.uint16[c+7]=l,e}}au.prototype.bytesPerElement=16,nM("StructArrayLayout8ui16",au);class ah extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l,c,u,h){let d=this.length;return this.resize(d+1),this.emplace(d,e,t,r,i,n,a,o,s,l,c,u,h)}emplace(e,t,r,i,n,a,o,s,l,c,u,h,d){let f=12*e;return this.int16[f+0]=t,this.int16[f+1]=r,this.int16[f+2]=i,this.int16[f+3]=n,this.uint16[f+4]=a,this.uint16[f+5]=o,this.uint16[f+6]=s,this.uint16[f+7]=l,this.int16[f+8]=c,this.int16[f+9]=u,this.int16[f+10]=h,this.int16[f+11]=d,e}}ah.prototype.bytesPerElement=24,nM("StructArrayLayout4i4ui4i24",ah);class ad extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.float32[n+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}}ad.prototype.bytesPerElement=12,nM("StructArrayLayout3f12",ad);class af extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint32[+e+0]=t,e}}af.prototype.bytesPerElement=4,nM("StructArrayLayout1ul4",af);class ap extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a,o,s,l){let c=this.length;return this.resize(c+1),this.emplace(c,e,t,r,i,n,a,o,s,l)}emplace(e,t,r,i,n,a,o,s,l,c){let u=10*e;return this.int16[u+0]=t,this.int16[u+1]=r,this.int16[u+2]=i,this.int16[u+3]=n,this.int16[u+4]=a,this.int16[u+5]=o,this.uint32[5*e+3]=s,this.uint16[u+8]=l,this.uint16[u+9]=c,e}}ap.prototype.bytesPerElement=20,nM("StructArrayLayout6i1ul2ui20",ap);class am extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=6*e;return this.int16[s+0]=t,this.int16[s+1]=r,this.int16[s+2]=i,this.int16[s+3]=n,this.int16[s+4]=a,this.int16[s+5]=o,e}}am.prototype.bytesPerElement=12,nM("StructArrayLayout2i2i2i12",am);class ag extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n){let a=this.length;return this.resize(a+1),this.emplace(a,e,t,r,i,n)}emplace(e,t,r,i,n,a){let o=4*e,s=8*e;return this.float32[o+0]=t,this.float32[o+1]=r,this.float32[o+2]=i,this.int16[s+6]=n,this.int16[s+7]=a,e}}ag.prototype.bytesPerElement=16,nM("StructArrayLayout2f1f2i16",ag);class ay extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(e,t,r,i,n,a){let o=this.length;return this.resize(o+1),this.emplace(o,e,t,r,i,n,a)}emplace(e,t,r,i,n,a,o){let s=16*e,l=4*e,c=8*e;return this.uint8[s+0]=t,this.uint8[s+1]=r,this.float32[l+1]=i,this.float32[l+2]=n,this.int16[c+6]=a,this.int16[c+7]=o,e}}ay.prototype.bytesPerElement=16,nM("StructArrayLayout2ub2f2i16",ay);class av extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.uint16[n+0]=t,this.uint16[n+1]=r,this.uint16[n+2]=i,e}}av.prototype.bytesPerElement=6,nM("StructArrayLayout3ui6",av);class ax extends ae{_refreshViews(){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)}emplaceBack(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g){let y=this.length;return this.resize(y+1),this.emplace(y,e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g)}emplace(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y){let v=24*e,x=12*e,b=48*e;return this.int16[v+0]=t,this.int16[v+1]=r,this.uint16[v+2]=i,this.uint16[v+3]=n,this.uint32[x+2]=a,this.uint32[x+3]=o,this.uint32[x+4]=s,this.uint16[v+10]=l,this.uint16[v+11]=c,this.uint16[v+12]=u,this.float32[x+7]=h,this.float32[x+8]=d,this.uint8[b+36]=f,this.uint8[b+37]=p,this.uint8[b+38]=m,this.uint32[x+10]=g,this.int16[v+22]=y,e}}ax.prototype.bytesPerElement=48,nM("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",ax);class ab extends ae{_refreshViews(){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)}emplaceBack(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S){let E=this.length;return this.resize(E+1),this.emplace(E,e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S)}emplace(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k,A,S,E){let C=32*e,L=16*e;return this.int16[C+0]=t,this.int16[C+1]=r,this.int16[C+2]=i,this.int16[C+3]=n,this.int16[C+4]=a,this.int16[C+5]=o,this.int16[C+6]=s,this.int16[C+7]=l,this.uint16[C+8]=c,this.uint16[C+9]=u,this.uint16[C+10]=h,this.uint16[C+11]=d,this.uint16[C+12]=f,this.uint16[C+13]=p,this.uint16[C+14]=m,this.uint16[C+15]=g,this.uint16[C+16]=y,this.uint16[C+17]=v,this.uint16[C+18]=x,this.uint16[C+19]=b,this.uint16[C+20]=_,this.uint16[C+21]=w,this.uint16[C+22]=T,this.uint32[L+12]=M,this.float32[L+13]=k,this.float32[L+14]=A,this.uint16[C+30]=S,this.uint16[C+31]=E,e}}ab.prototype.bytesPerElement=64,nM("StructArrayLayout8i15ui1ul2f2ui64",ab);class a_ extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.float32[+e+0]=t,e}}a_.prototype.bytesPerElement=4,nM("StructArrayLayout1f4",a_);class aw extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=3*e;return this.uint16[6*e+0]=t,this.float32[n+1]=r,this.float32[n+2]=i,e}}aw.prototype.bytesPerElement=12,nM("StructArrayLayout1ui2f12",aw);class aT extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t,r){let i=this.length;return this.resize(i+1),this.emplace(i,e,t,r)}emplace(e,t,r,i){let n=4*e;return this.uint32[2*e+0]=t,this.uint16[n+2]=r,this.uint16[n+3]=i,e}}aT.prototype.bytesPerElement=8,nM("StructArrayLayout1ul2ui8",aT);class aM extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e,t){let r=this.length;return this.resize(r+1),this.emplace(r,e,t)}emplace(e,t,r){let i=2*e;return this.uint16[i+0]=t,this.uint16[i+1]=r,e}}aM.prototype.bytesPerElement=4,nM("StructArrayLayout2ui4",aM);class ak extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(e){let t=this.length;return this.resize(t+1),this.emplace(t,e)}emplace(e,t){return this.uint16[+e+0]=t,e}}ak.prototype.bytesPerElement=2,nM("StructArrayLayout1ui2",ak);class aA extends ae{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(e,t,r,i){let n=this.length;return this.resize(n+1),this.emplace(n,e,t,r,i)}emplace(e,t,r,i,n){let a=4*e;return this.float32[a+0]=t,this.float32[a+1]=r,this.float32[a+2]=i,this.float32[a+3]=n,e}}aA.prototype.bytesPerElement=16,nM("StructArrayLayout4f16",aA);class aS extends n9{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new w(this.anchorPointX,this.anchorPointY)}}aS.prototype.size=20;class aE extends ap{get(e){return new aS(this,e)}}nM("CollisionBoxArray",aE);class aC extends n9{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(e){this._structArray.uint8[this._pos1+37]=e}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(e){this._structArray.uint8[this._pos1+38]=e}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(e){this._structArray.uint32[this._pos4+10]=e}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}aC.prototype.size=48;class aL extends ax{get(e){return new aC(this,e)}}nM("PlacedSymbolArray",aL);class aP extends n9{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(e){this._structArray.uint32[this._pos4+12]=e}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}aP.prototype.size=64;class aI extends ab{get(e){return new aP(this,e)}}nM("SymbolInstanceArray",aI);class az extends a_{getoffsetX(e){return this.float32[+e+0]}}nM("GlyphOffsetArray",az);class aD extends an{getx(e){return this.int16[3*e+0]}gety(e){return this.int16[3*e+1]}gettileUnitDistanceFromAnchor(e){return this.int16[3*e+2]}}nM("SymbolLineVertexArray",aD);class aO extends n9{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}aO.prototype.size=12;class aR extends aw{get(e){return new aO(this,e)}}nM("TextAnchorOffsetArray",aR);class aF extends n9{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}aF.prototype.size=8;class aj extends aT{get(e){return new aF(this,e)}}nM("FeatureIndexArray",aj);class aB extends ai{}class aN extends ai{}class aU extends ai{}class aV extends ao{}class aq extends as{}class aH extends al{}class aG extends ac{}class aW extends au{}class aY extends ah{}class aZ extends ad{}class a$ extends af{}class aX extends am{}class aK extends ay{}class aJ extends av{}class aQ extends aM{}let{members:a0}=at([{name:"a_pos",components:2,type:"Int16"}],4);class a1{constructor(e=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=e}prepareSegment(e,t,r,i){let n=this.segments[this.segments.length-1];return e>a1.MAX_VERTEX_ARRAY_LENGTH&&eA(`Max vertices per segment is ${a1.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${e}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${a1.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!n||n.vertexLength+e>a1.MAX_VERTEX_ARRAY_LENGTH||n.sortKey!==i?this.createNewSegment(t,r,i):n}createNewSegment(e,t,r){let i={vertexOffset:e.length,primitiveOffset:t.length,vertexLength:0,primitiveLength:0,vaos:{}};return void 0!==r&&(i.sortKey=r),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(i),i}getOrCreateLatestSegment(e,t,r){return this.prepareSegment(0,e,t,r)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let e of this.segments)for(let t in e.vaos)e.vaos[t].destroy()}static simpleSegment(e,t,r,i){return new a1([{vertexOffset:e,primitiveOffset:t,vertexLength:r,primitiveLength:i,vaos:{},sortKey:0}])}}function a2(e,t){return 256*(e=ev(Math.floor(e),0,255))+ev(Math.floor(t),0,255)}a1.MAX_VERTEX_ARRAY_LENGTH=65535,nM("SegmentVector",a1);let a3=at([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),a5=at([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var a4,a6,a8,a7={exports:{}},a9={exports:{}},oe={exports:{}},ot=T(function(){if(a8)return a7.exports;a8=1;var e=(a4||(a4=1,a9.exports=function(e,t){var r,i,n,a,o,s;for(i=e.length-(r=3&e.length),n=t,s=0;s>>16)*0xcc9e2d51&65535)<<16)|0)<<15|o>>>17))*0x1b873593+(((o>>>16)*0x1b873593&65535)<<16)|0)<<13|n>>>19))+((5*(n>>>16)&65535)<<16)|0))+((58964+(a>>>16)&65535)<<16);switch(o=0,r){case 3:o^=(255&e.charCodeAt(s+2))<<16;case 2:o^=(255&e.charCodeAt(s+1))<<8;case 1:n^=o=(65535&(o=(o=(65535&(o^=255&e.charCodeAt(s)))*0xcc9e2d51+(((o>>>16)*0xcc9e2d51&65535)<<16)|0)<<15|o>>>17))*0x1b873593+(((o>>>16)*0x1b873593&65535)<<16)|0}return n^=e.length,n=0x85ebca6b*(65535&(n^=n>>>16))+((0x85ebca6b*(n>>>16)&65535)<<16)|0,n=0xc2b2ae35*(65535&(n^=n>>>13))+((0xc2b2ae35*(n>>>16)&65535)<<16)|0,(n^=n>>>16)>>>0}),a9.exports),t=(a6||(a6=1,oe.exports=function(e,t){for(var r,i=e.length,n=t^i,a=0;i>=4;)r=0x5bd1e995*(65535&(r=255&e.charCodeAt(a)|(255&e.charCodeAt(++a))<<8|(255&e.charCodeAt(++a))<<16|(255&e.charCodeAt(++a))<<24))+((0x5bd1e995*(r>>>16)&65535)<<16),n=0x5bd1e995*(65535&n)+((0x5bd1e995*(n>>>16)&65535)<<16)^(r=0x5bd1e995*(65535&(r^=r>>>24))+((0x5bd1e995*(r>>>16)&65535)<<16)),i-=4,++a;switch(i){case 3:n^=(255&e.charCodeAt(a+2))<<16;case 2:n^=(255&e.charCodeAt(a+1))<<8;case 1:n=0x5bd1e995*(65535&(n^=255&e.charCodeAt(a)))+((0x5bd1e995*(n>>>16)&65535)<<16)}return n=0x5bd1e995*(65535&(n^=n>>>13))+((0x5bd1e995*(n>>>16)&65535)<<16),(n^=n>>>15)>>>0}),oe.exports);return a7.exports=e,a7.exports.murmur3=e,a7.exports.murmur2=t,a7.exports}());class or{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(e,t,r,i){this.ids.push(oi(e)),this.positions.push(t,r,i)}getPositions(e){if(!this.indexed)throw Error("Trying to get index, but feature positions are not indexed");let t=oi(e),r=0,i=this.ids.length-1;for(;r>1;this.ids[e]>=t?i=e:r=e+1}let n=[];for(;this.ids[r]===t;)n.push({index:this.positions[3*r],start:this.positions[3*r+1],end:this.positions[3*r+2]}),r++;return n}static serialize(e,t){let r=new Float64Array(e.ids),i=new Uint32Array(e.positions);return function e(t,r,i,n){for(;i>1],o=i-1,s=n+1;for(;;){do o++;while(t[o]a);if(o>=s)break;on(t,o,s),on(r,3*o,3*s),on(r,3*o+1,3*s+1),on(r,3*o+2,3*s+2)}s-i`u_${e}`),this.type=r}setUniform(e,t,r){e.set(r.constantOr(this.value))}getBinding(e,t,r){return"color"===this.type?new ol(e,t):new oo(e,t)}}class od{constructor(e,t){this.uniformNames=t.map(e=>`u_${e}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(e,t){this.pixelRatioFrom=t.pixelRatio,this.pixelRatioTo=e.pixelRatio,this.patternFrom=t.tlbr,this.patternTo=e.tlbr}setConstantDashPositions(e,t){this.dashTo=[0,e.y,e.height,e.width],this.dashFrom=[0,t.y,t.height,t.width]}setUniform(e,t,r,i){let n=null;"u_pattern_to"===i?n=this.patternTo:"u_pattern_from"===i?n=this.patternFrom:"u_dasharray_to"===i?n=this.dashTo:"u_dasharray_from"===i?n=this.dashFrom:"u_pixel_ratio_to"===i?n=this.pixelRatioTo:"u_pixel_ratio_from"===i&&(n=this.pixelRatioFrom),null!==n&&e.set(n)}getBinding(e,t,r){return r.startsWith("u_pattern")||r.startsWith("u_dasharray_")?new os(e,t):new oo(e,t)}}class of{constructor(e,t,r,i){this.expression=e,this.type=r,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?2:1,offset:0})),this.paintVertexArray=new i}populatePaintArray(e,t,r){let i=this.paintVertexArray.length,n=this.expression.evaluate(new nN(0,r),t,{},r.canonical,[],r.formattedSection);this.paintVertexArray.resize(e),this._setPaintValue(i,e,n)}updatePaintArray(e,t,r,i,n){let a=this.expression.evaluate(new nN(0,n),r,i);this._setPaintValue(e,t,a)}_setPaintValue(e,t,r){if("color"===this.type){let i=ou(r);for(let r=e;r`u_${e}_t`),this.type=r,this.useIntegerZoom=i,this.zoom=n,this.maxValue=0,this.paintVertexAttributes=t.map(e=>({name:`a_${e}`,type:"Float32",components:"color"===r?4:2,offset:0})),this.paintVertexArray=new a}populatePaintArray(e,t,r){let i=this.expression.evaluate(new nN(this.zoom,r),t,{},r.canonical,[],r.formattedSection),n=this.expression.evaluate(new nN(this.zoom+1,r),t,{},r.canonical,[],r.formattedSection),a=this.paintVertexArray.length;this.paintVertexArray.resize(e),this._setPaintValue(a,e,i,n)}updatePaintArray(e,t,r,i,n){let a=this.expression.evaluate(new nN(this.zoom,n),r,i),o=this.expression.evaluate(new nN(this.zoom+1,n),r,i);this._setPaintValue(e,t,a,o)}_setPaintValue(e,t,r,i){if("color"===this.type){let n=ou(r),a=ou(i);for(let r=e;r`#define HAS_UNIFORM_${e}`))}return e}getBinderAttributes(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof of||r instanceof op)for(let t of r.paintVertexAttributes)e.push(t.name);else if(r instanceof om)for(let t of r.getVertexAttributes())e.push(t.name)}return e}getBinderUniforms(){let e=[];for(let t in this.binders){let r=this.binders[t];if(r instanceof oh||r instanceof od||r instanceof op)for(let t of r.uniformNames)e.push(t)}return e}getPaintVertexBuffers(){return this._buffers}getUniforms(e,t){let r=[];for(let i in this.binders){let n=this.binders[i];if(n instanceof oh||n instanceof od||n instanceof op){for(let a of n.uniformNames)if(t[a]){let o=n.getBinding(e,t[a],a);r.push({name:a,property:i,binding:o})}}}return r}setUniforms(e,t,r,i){for(let{name:e,property:n,binding:a}of t)this.binders[n].setUniform(a,i,r.get(n),e)}updatePaintBuffers(e){for(let t in this._buffers=[],this.binders){let r=this.binders[t];if(e&&r instanceof om){let t=2===e.fromScale?r.zoomInPaintVertexBuffer:r.zoomOutPaintVertexBuffer;t&&this._buffers.push(t)}else(r instanceof of||r instanceof op)&&r.paintVertexBuffer&&this._buffers.push(r.paintVertexBuffer)}}upload(e){for(let t in this.binders){let r=this.binders[t];(r instanceof of||r instanceof op||r instanceof om)&&r.upload(e)}this.updatePaintBuffers()}destroy(){for(let e in this.binders){let t=this.binders[e];(t instanceof of||t instanceof op||t instanceof om)&&t.destroy()}}}class ox{constructor(e,t,r=()=>!0){for(let i of(this.programConfigurations={},e))this.programConfigurations[i.id]=new ov(i,t,r);this.needsUpload=!1,this._featureMap=new or,this._bufferOffset=0}populatePaintArrays(e,t,r,i){for(let r in this.programConfigurations)this.programConfigurations[r].populatePaintArrays(e,t,i);void 0!==t.id&&this._featureMap.add(t.id,r,this._bufferOffset,e),this._bufferOffset=e,this.needsUpload=!0}updatePaintArrays(e,t,r,i){for(let n of r)this.needsUpload=this.programConfigurations[n.id].updatePaintArrays(e,this._featureMap,t,n,i)||this.needsUpload}get(e){return this.programConfigurations[e]}upload(e){if(this.needsUpload){for(let t in this.programConfigurations)this.programConfigurations[t].upload(e);this.needsUpload=!1}}destroy(){for(let e in this.programConfigurations)this.programConfigurations[e].destroy()}}function ob(e,t,r){let i={"line-pattern":{source:aG,composite:aG},"fill-pattern":{source:aG,composite:aG},"fill-extrusion-pattern":{source:aG,composite:aG},"line-dasharray":{source:aW,composite:aW}}[e];return i?.[r]||({color:{source:al,composite:aA},number:{source:a_,composite:al}})[t][r]}nM("ConstantBinder",oh),nM("CrossFadedConstantBinder",od),nM("SourceExpressionBinder",of),nM("CrossFadedPatternBinder",og),nM("CrossFadedDasharrayBinder",oy),nM("CompositeExpressionBinder",op),nM("ProgramConfiguration",ov,{omit:["_buffers"]}),nM("ProgramConfigurationSet",ox);let o_=-16383-1;function ow(e){let t=8192/e.extent,r=e.loadGeometry();for(let e of r)for(let r of e){let e=Math.round(r.x*t),i=Math.round(r.y*t);r.x=ev(e,o_,16383),r.y=ev(i,o_,16383),(er.x+1||ir.y+1)&&eA("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return r}function oT(e,t){return{type:e.type,id:e.id,properties:e.properties,geometry:t?ow(e):[]}}class oM{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new aN,this.indexArray=new aJ,this.segments=new a1,this.programConfigurations=new ox(e.layers,e.zoom),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){let i=this.layers[0],n=[],a=null,o=!1,s="heatmap"===i.type;"circle"===i.type&&(o=!(a=i.layout.get("circle-sort-key")).isConstant(),s||(s="map"===i.paint.get("circle-pitch-alignment")));let l=s?t.subdivisionGranularity.circle:1;for(let{feature:t,id:i,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=oT(t,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),c,r))continue;let u=o?a.evaluate(c,{},r):void 0,h={id:i,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:ow(t),patterns:{},sortKey:u};n.push(h)}for(let i of(o&&n.sort((e,t)=>e.sortKey-t.sortKey),n)){let{geometry:n,index:a,sourceLayerIndex:o}=i,s=e[a].feature;this.addFeature(i,n,a,r,l),t.featureIndex.insert(s,n,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,a0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(e,t,r,i,n=1){let a;switch(n){case 1:a=[0,7];break;case 3:a=[0,2,5,7];break;case 5:a=[0,1,3,4,6,7];break;case 7:a=[0,1,2,3,4,5,6,7];break;default:throw Error(`Invalid circle bucket granularity: ${n}; valid values are 1, 3, 5, 7.`)}let o=a.length;for(let r of t)for(let t of r){let r=t.x,i=t.y;if(r<0||r>=8192||i<0||i>=8192)continue;let n=this.segments.prepareSegment(o*o,this.layoutVertexArray,this.indexArray,e.sortKey),u=n.vertexLength;for(let e=0;e1?r:r.sub(t)._mult(n)._add(t))}function oP(e,t){let r,i,n=!1;for(let a of e)for(let e=0,o=a.length-1;et.y!=i.y>t.y&&t.x<(i.x-r.x)*(t.y-r.y)/(i.y-r.y)+r.x&&(n=!n);return n}function oI(e,t){let r=!1;for(let i=0,n=e.length-1;it.y!=o.y>t.y&&t.x<(o.x-a.x)*(t.y-a.y)/(o.y-a.y)+a.x&&(r=!r)}return r}function oz(e,t,r){let i=t.paint.get(e).value;return"constant"===i.kind?i.value:r.programConfigurations.get(t.id).getMaxValue(e)}function oD(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1])}function oO(e,t,r,i,n){if(!t[0]&&!t[1])return e;let a=w.convert(t)._mult(n);"viewport"===r&&a._rotate(-i);let o=[];for(let t of e)o.push(t.sub(a));return o}function oR({queryGeometry:e,size:t},r){return oA(e,r,t)}function oF({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){return oA(e,a,t*(r.projectTileCoordinates(a.x,a.y,i,n).signedDistanceFromCamera/r.cameraToCenterDistance))}function oj({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){let o=r.projectTileCoordinates(a.x,a.y,i,n).signedDistanceFromCamera,s=t*(r.cameraToCenterDistance/o);return oA(e,oU(a,r,i,n),s)}function oB({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n},a){return oA(e,oU(a,r,i,n),t)}function oN({queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n,pitchAlignment:a="map",pitchScale:o="map"},s){let l="map"===a?"map"===o?oR:oF:"map"===o?oj:oB,c={queryGeometry:e,size:t,transform:r,unwrappedTileID:i,getElevation:n};for(let e of s)for(let t of e)if(l(c,t))return!0;return!1}function oU(e,t,r,i){let n=t.projectTileCoordinates(e.x,e.y,r,i).point;return new w((.5*n.x+.5)*t.width,(-(.5*n.y)+.5)*t.height)}nM("CircleBucket",oM,{omit:["layers"]});var oV={get paint(){return s=s||new n2({"circle-radius":new nJ(e0.paint_circle["circle-radius"]),"circle-color":new nJ(e0.paint_circle["circle-color"]),"circle-blur":new nJ(e0.paint_circle["circle-blur"]),"circle-opacity":new nJ(e0.paint_circle["circle-opacity"]),"circle-translate":new nK(e0.paint_circle["circle-translate"]),"circle-translate-anchor":new nK(e0.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new nK(e0.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new nK(e0.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new nJ(e0.paint_circle["circle-stroke-width"]),"circle-stroke-color":new nJ(e0.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new nJ(e0.paint_circle["circle-stroke-opacity"])})},get layout(){return o=o||new n2({"circle-sort-key":new nJ(e0.layout_circle["circle-sort-key"])})}};class oq extends n4{constructor(e,t){super(e,oV,t)}createBucket(e){return new oM(e)}queryRadius(e){return oz("circle-radius",this,e)+oz("circle-stroke-width",this,e)+oD(this.paint.get("circle-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,unwrappedTileID:o,getElevation:s}){let l=oO(e,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),-n.bearingInRadians,a),c=this.paint.get("circle-radius").evaluate(t,r)+this.paint.get("circle-stroke-width").evaluate(t,r),u=this.paint.get("circle-pitch-scale"),h=this.paint.get("circle-pitch-alignment"),d,f;return"map"===h?(d=l,f=c*a):(d=l.map(e=>oU(e,n,o,s)),f=c),oN({queryGeometry:d,size:f,transform:n,unwrappedTileID:o,getElevation:s,pitchAlignment:h,pitchScale:u},i)}}class oH extends oM{}nM("HeatmapBucket",oH,{omit:["layers"]});var oG={get paint(){return l=l||new n2({"heatmap-radius":new nJ(e0.paint_heatmap["heatmap-radius"]),"heatmap-weight":new nJ(e0.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new nK(e0.paint_heatmap["heatmap-intensity"]),"heatmap-color":new n1(e0.paint_heatmap["heatmap-color"]),"heatmap-opacity":new nK(e0.paint_heatmap["heatmap-opacity"])})}};function oW(e,{width:t,height:r},i,n){if(n){if(n instanceof Uint8ClampedArray)n=new Uint8Array(n.buffer);else if(n.length!==t*r*i)throw RangeError(`mismatched image size. expected: ${n.length} but got: ${t*r*i}`)}else n=new Uint8Array(t*r*i);return e.width=t,e.height=r,e.data=n,e}function oY(e,{width:t,height:r},i){if(t===e.width&&r===e.height)return;let n=oW({},{width:t,height:r},i);oZ(e,n,{x:0,y:0},{x:0,y:0},{width:Math.min(e.width,t),height:Math.min(e.height,r)},i),e.width=t,e.height=r,e.data=n.data}function oZ(e,t,r,i,n,a){if(0===n.width||0===n.height)return t;if(n.width>e.width||n.height>e.height||r.x>e.width-n.width||r.y>e.height-n.height)throw RangeError("out of range source coordinates for image copy");if(n.width>t.width||n.height>t.height||i.x>t.width-n.width||i.y>t.height-n.height)throw RangeError("out of range destination coordinates for image copy");let o=e.data,s=t.data;if(o===s)throw Error("srcData equals dstData, so image is already copied");for(let l=0;l{t[e.evaluationKey]=o;let s=e.expression.evaluate(t);n.setPixel(i/4/r,a/4,s)};if(e.clips)for(let t=0,n=0;tthis.max&&(this.max=r),r=this.dim+1||t<-1||t>=this.dim+1)throw RangeError(`Out of range source coordinates for DEM data. x: ${e}, y: ${t}, dim: ${this.dim}`);return(t+1)*this.stride+(e+1)}unpack(e,t,r){return e*this.redFactor+t*this.greenFactor+r*this.blueFactor-this.baseShift}pack(e){return o6(e,this.getUnpackVector())}getPixels(){return new oX({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(e,t,r){if(this.dim!==e.dim)throw Error("dem dimension mismatch");let i=t*this.dim,n=t*this.dim+this.dim,a=r*this.dim,o=r*this.dim+this.dim;switch(t){case -1:i=n-1;break;case 1:n=i+1}switch(r){case -1:a=o-1;break;case 1:o=a+1}let s=-t*this.dim,l=-r*this.dim;for(let t=a;t0)for(let n=t;n=t;n-=i)a=sp(n/i|0,e[n],e[n+1],a);return a&&sl(a,a.next)&&(sm(a),a=a.next),a}function sr(e,t){if(!e)return e;t||(t=e);let r,i=e;do if(r=!1,i.steiner||!sl(i,i.next)&&0!==ss(i.prev,i,i.next))i=i.next;else{if(sm(i),(i=t=i.prev)===i.next)break;r=!0}while(r||i!==t);return t}function si(e,t){let r=e.x-t.x;return 0===r&&0==(r=e.y-t.y)&&(r=(e.next.y-e.y)/(e.next.x-e.x)-(t.next.y-t.y)/(t.next.x-t.x)),r}function sn(e,t,r,i,n){return(e=0x55555555&((e=0x33333333&((e=0xf0f0f0f&((e=0xff00ff&((e=(e-r)*n|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=0x55555555&((t=0x33333333&((t=0xf0f0f0f&((t=0xff00ff&((t=(t-i)*n|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function sa(e,t,r,i,n,a,o,s){return(n-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(i-s)>=(r-o)*(t-s)&&(r-o)*(a-s)>=(n-o)*(i-s)}function so(e,t,r,i,n,a,o,s){return(e!==o||t!==s)&&sa(e,t,r,i,n,a,o,s)}function ss(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function sl(e,t){return e.x===t.x&&e.y===t.y}function sc(e,t,r,i){let n=sh(ss(e,t,r)),a=sh(ss(e,t,i)),o=sh(ss(r,i,e)),s=sh(ss(r,i,t));return n!==a&&o!==s||!(0!==n||!su(e,r,t))||!(0!==a||!su(e,i,t))||!(0!==o||!su(r,e,i))||!(0!==s||!su(r,t,i))}function su(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function sh(e){return e>0?1:e<0?-1:0}function sd(e,t){return 0>ss(e.prev,e,e.next)?ss(e,t,e.next)>=0&&ss(e,e.prev,t)>=0:0>ss(e,t,e.prev)||0>ss(e,e.next,t)}function sf(e,t){let r=sg(e.i,e.x,e.y),i=sg(t.i,t.x,t.y),n=e.next,a=t.prev;return e.next=t,t.prev=e,r.next=n,n.prev=r,i.next=r,r.prev=i,a.next=i,i.prev=a,i}function sp(e,t,r,i){let n=sg(e,t,r);return i?(n.next=i.next,n.prev=i,i.next.prev=n,i.next=n):(n.prev=n,n.next=n),n}function sm(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function sg(e,t,r){return{i:e,x:t,y:r,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class sy{constructor(e,t){if(t>e)throw Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=e,this._minGranularity=t}getGranularityForZoomLevel(e){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||t>32767)throw Error("Vertex coordinates are out of signed 16 bit integer range.");let r=0|Math.round(e),i=0|Math.round(t),n=this._getKey(r,i);if(this._vertexDictionary.has(n))return this._vertexDictionary.get(n);let a=this._vertexBuffer.length/2;return this._vertexDictionary.set(n,a),this._vertexBuffer.push(r,i),a}_subdivideTrianglesScanline(e){if(this._granularity<2)return function(e,t){let r=[];for(let i=0;i0?(r.push(n),r.push(o),r.push(a)):(r.push(n),r.push(a),r.push(o))}return r}(this._vertexBuffer,e);let t=[],r=e.length;for(let i=0;i=0?o-1:a-1,n=(s+1)%a,l=e[2*t[i]],c=e[2*t[n]],u=e[2*t[o]],h=e[2*t[o]+1],d=e[2*t[s]+1],f=!1;if(lc)f=!1;else{let r=d-h,a=-(e[2*t[s]]-u),o=h((c-u)*r+(e[2*t[n]+1]-h)*a)*o&&(f=!0)}if(f){let e=t[i],n=t[o],l=t[s];e!==n&&e!==l&&n!==l&&r.push(l,n,e),--o<0&&(o=a-1)}else{let e=t[n],i=t[o],l=t[s];e!==i&&e!==l&&i!==l&&r.push(l,i,e),++s>=a&&(s=0)}if(i===n)break}}(this._vertexBuffer,i,t)}else t.push(...r)}return t}_scanlineGenerateVertexRingForCellRow(e,t,r){let i=e*this._granularityCellSize,n=i+this._granularityCellSize,a=[];for(let e=0;e<3;e++){let o=t[2*e],s=t[2*e+1],l=t[2*(e+1)%6],c=t[(2*(e+1)+1)%6],u=t[2*(e+2)%6],h=t[(2*(e+2)+1)%6],d=l-o,f=c-s,p=0===d,m=0===f,g=(i-s)/f,y=(n-s)/f,v=Math.min(g,y),x=Math.max(g,y);if(!m&&(v>=1||x<=0)||m&&(sn)){c>=i&&c<=n&&a.push(r[(e+1)%3]);continue}!m&&v>0&&a.push(this._vertexToIndex(o+d*v,s+f*v));let b=o+d*Math.max(v,0),_=o+d*Math.min(x,1);p||this._generateIntraEdgeVertices(a,o,s,l,c,b,_),!m&&x<1&&a.push(this._vertexToIndex(o+d*x,s+f*x)),(m||c>=i&&c<=n)&&a.push(r[(e+1)%3]),!m&&(c<=i||c>=n)&&this._generateInterEdgeVertices(a,o,s,l,c,u,h,_,i,n)}return a}_generateIntraEdgeVertices(e,t,r,i,n,a,o){let s=i-t,l=n-r,c=0===l,u=c?Math.min(t,i):Math.min(a,o),h=c?Math.max(t,i):Math.max(a,o),d=Math.floor(u/this._granularityCellSize)+1,f=Math.ceil(h/this._granularityCellSize)-1;if(c?t=d;i--){let n=i*this._granularityCellSize;e.push(this._vertexToIndex(n,r+l*(n-t)/s))}}_generateInterEdgeVertices(e,t,r,i,n,a,o,s,l,c){let u=o-n,h=(l-n)/u,d=(c-n)/u,f=Math.min(h,d),p=Math.max(h,d),m=i+(a-i)*f,g=Math.floor(Math.min(m,s)/this._granularityCellSize)+1,y=Math.ceil(Math.max(m,s)/this._granularityCellSize)-1,v=s=1||p<=0){let e=r-o,i=a+(t-a)*Math.min((l-o)/e,(c-o)/e);g=Math.floor(Math.min(i,s)/this._granularityCellSize)+1,y=Math.ceil(Math.max(i,s)/this._granularityCellSize)-1,v=s0?c:l;if(v)for(let t=g;t<=y;t++)e.push(this._vertexToIndex(t*this._granularityCellSize,b));else for(let t=y;t>=g;t--)e.push(this._vertexToIndex(t*this._granularityCellSize,b))}_generateOutline(e){let t=[];for(let r of e){let e=s_(r,this._granularity,!0),i=this._pointArrayToIndices(e),n=[];for(let e=1;en!=(-32768===a)?(e.push(t),e.push(r),e.push(this._vertexToIndex(i,a)),e.push(r),e.push(this._vertexToIndex(n,a))):(e.push(r),e.push(t),e.push(this._vertexToIndex(i,a)),e.push(this._vertexToIndex(n,a)),e.push(r)),e.push(this._vertexToIndex(i,a))}_fillPoles(e,t,r){let i=this._vertexBuffer,n=e.length;for(let a=2;a=r.next.y&&r.next.y!==r.y){let e=r.x+(n-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=i&&e>o&&(o=e,a=r.x=r.x&&r.x>=l&&i!==r.x&&sa(na.x||r.x===a.x&&(h=a,d=r,0>ss(h.prev,h,d.prev)&&0>ss(d.next,h,h.next))))&&(a=r,u=t)}r=r.next}while(r!==s);return a}(e,t);if(!r)return t;let i=sf(r,e);return sr(i,i.next),sr(r,r.next)}(n[e],r);return r}(e,t,l,r)),e.length>80*r){i=e[0],n=e[1];let t=i,o=n;for(let a=r;at&&(t=r),s>o&&(o=s)}a=Math.max(t-i,o-n),a=0!==a?32767/a:0}return function e(t,r,i,n,a,o,s){if(!t)return;!s&&o&&function(e,t,r,i){let n=e;do 0===n.z&&(n.z=sn(n.x,n.y,t,r,i)),n.prevZ=n.prev,n.nextZ=n.next,n=n.next;while(n!==e);n.prevZ.nextZ=null,n.prevZ=null,function(e){let t,r=1;do{let i,n=e;e=null;let a=null;for(t=0;n;){t++;let o=n,s=0;for(let e=0;e0||l>0&&o;)0!==s&&(0===l||!o||n.z<=o.z)?(i=n,n=n.nextZ,s--):(i=o,o=o.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=o}a.nextZ=null,r*=2}while(t>1)}(n)}(t,n,a,o);let l=t;for(;t.prev!==t.next;){let c=t.prev,u=t.next;if(o?function(e,t,r,i){let n=e.prev,a=e.next;if(ss(n,e,a)>=0)return!1;let o=n.x,s=e.x,l=a.x,c=n.y,u=e.y,h=a.y,d=Math.min(o,s,l),f=Math.min(c,u,h),p=Math.max(o,s,l),m=Math.max(c,u,h),g=sn(d,f,t,r,i),y=sn(p,m,t,r,i),v=e.prevZ,x=e.nextZ;for(;v&&v.z>=g&&x&&x.z<=y;){if(v.x>=d&&v.x<=p&&v.y>=f&&v.y<=m&&v!==n&&v!==a&&so(o,c,s,u,l,h,v.x,v.y)&&ss(v.prev,v,v.next)>=0||(v=v.prevZ,x.x>=d&&x.x<=p&&x.y>=f&&x.y<=m&&x!==n&&x!==a&&so(o,c,s,u,l,h,x.x,x.y)&&ss(x.prev,x,x.next)>=0))return!1;x=x.nextZ}for(;v&&v.z>=g;){if(v.x>=d&&v.x<=p&&v.y>=f&&v.y<=m&&v!==n&&v!==a&&so(o,c,s,u,l,h,v.x,v.y)&&ss(v.prev,v,v.next)>=0)return!1;v=v.prevZ}for(;x&&x.z<=y;){if(x.x>=d&&x.x<=p&&x.y>=f&&x.y<=m&&x!==n&&x!==a&&so(o,c,s,u,l,h,x.x,x.y)&&ss(x.prev,x,x.next)>=0)return!1;x=x.nextZ}return!0}(t,n,a,o):function(e){let t=e.prev,r=e.next;if(ss(t,e,r)>=0)return!1;let i=t.x,n=e.x,a=r.x,o=t.y,s=e.y,l=r.y,c=Math.min(i,n,a),u=Math.min(o,s,l),h=Math.max(i,n,a),d=Math.max(o,s,l),f=r.next;for(;f!==t;){if(f.x>=c&&f.x<=h&&f.y>=u&&f.y<=d&&so(i,o,n,s,a,l,f.x,f.y)&&ss(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}(t))r.push(c.i,t.i,u.i),sm(t),t=u.next,l=u.next;else if((t=u)===l){s?1===s?e(t=function(e,t){let r=e;do{let i=r.prev,n=r.next.next;!sl(i,n)&&sc(i,r,r.next,n)&&sd(i,n)&&sd(n,i)&&(t.push(i.i,r.i,n.i),sm(r),sm(r.next),r=e=n),r=r.next}while(r!==e);return sr(r)}(sr(t),r),r,i,n,a,o,2):2===s&&function(t,r,i,n,a,o){let s=t;do{let t=s.next.next;for(;t!==s.prev;){var l,c;if(s.i!==t.i&&(l=s,c=t,l.next.i!==c.i&&l.prev.i!==c.i&&!function(e,t){let r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&sc(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}(l,c)&&(sd(l,c)&&sd(c,l)&&function(e,t){let r=e,i=!1,n=(e.x+t.x)/2,a=(e.y+t.y)/2;do r.y>a!=r.next.y>a&&r.next.y!==r.y&&n<(r.next.x-r.x)*(a-r.y)/(r.next.y-r.y)+r.x&&(i=!i),r=r.next;while(r!==e);return i}(l,c)&&(ss(l.prev,l,c.prev)||ss(l,c.prev,c))||sl(l,c)&&ss(l.prev,l,l.next)>0&&ss(c.prev,c,c.next)>0))){let l=sf(s,t);return s=sr(s,s.next),l=sr(l,l.next),e(s,r,i,n,a,o,0),void e(l,r,i,n,a,o,0)}t=t.next}s=s.next}while(s!==t)}(t,r,i,n,a,o):e(sr(t),r,i,n,a,o,1);break}}}(l,c,r,i,n,a,0),c}(r,i),t=this._convertIndices(r,e);n=this._subdivideTrianglesScanline(t)}catch(e){console.error(e)}let a=[];return t&&(a=this._generateOutline(e)),this._ensureNoPoleVertices(),this._handlePoles(n),{verticesFlattened:this._vertexBuffer,indicesTriangles:n,indicesLineList:a}}_convertIndices(e,t){let r=[];for(let i of t)r.push(this._vertexToIndex(e[2*i],e[2*i+1]));return r}_pointArrayToIndices(e){let t=[];for(let r of e)t.push(this._vertexToIndex(r.x,r.y));return t}}function sb(e,t,r,i=!0){return new sx(r,t).subdividePolygonInternal(e,i)}function s_(e,t,r=!1){if(!e||e.length<1||e.length<2)return[];let i=e[0],n=e[e.length-1],a=r&&(i.x!==n.x||i.y!==n.y);if(t<2)return a?[...e,e[0]]:[...e];let o=Math.floor(8192/t),s=[];s.push(new w(e[0].x,e[0].y));let l=e.length,c=a?l:l-1;for(let t=0;t0?(Math.floor(y/o)+1)*o:(Math.ceil(y/o)-1)*o,t=p>0?(Math.floor(v/o)+1)*o:(Math.ceil(v/o)-1)*o,r=Math.abs(y-e),i=Math.abs(v-t),n=Math.abs(v-u),a=h?r/m:1/0,l=d?i/g:1/0;if((Math.abs(y-c)<=r||!h)&&(n<=i||!d))break;if(aa1.MAX_VERTEX_ARRAY_LENGTH&&(c=e.createNewSegment(t,r),l=s.count,m=!0,g=!0,y=!0,u=0);let v=sT(o,i,a,s,d,m,c),x=sT(o,i,a,s,f,g,c),b=sT(o,i,a,s,p,y,c);r.emplaceBack(u+v-l,u+x-l,u+b-l),c.primitiveLength++}})(t,r,i,n,a,e),u&&function(e,t,r,i,n,a){let o=[];for(let e=0;ea1.MAX_VERTEX_ARRAY_LENGTH&&(c=e.createNewSegment(t,r),l=s.count,p=!0,m=!0,u=0);let g=sT(o,i,a,s,d,p,c),y=sT(o,i,a,s,f,m,c);r.emplaceBack(u+g-l,u+y-l),c.primitiveLength++}}(o,r,s,n,l,e),t.forceNewSegmentOnNextPrepare(),o?.forceNewSegmentOnNextPrepare()}function sT(e,t,r,i,n,a,o){if(a){let a=i.count;return r(t[2*n],t[2*n+1]),e[n]=i.count,i.count++,o.vertexLength++,a}return e[n]}class sM{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new aU,this.indexArray=new aJ,this.indexArray2=new aQ,this.programConfigurations=new ox(e.layers,e.zoom),this.segments=new a1,this.segments2=new a1,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=o9("fill",this.layers,t);let i=this.layers[0].layout.get("fill-sort-key"),n=!i.isConstant(),a=[];for(let{feature:o,id:s,index:l,sourceLayerIndex:c}of e){let e=this.layers[0]._featureFilter.needGeometry,u=oT(o,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),u,r))continue;let h=n?i.evaluate(u,{},r,t.availableImages):void 0,d={id:s,properties:o.properties,type:o.type,sourceLayerIndex:c,index:l,geometry:e?u.geometry:ow(o),patterns:{},sortKey:h};a.push(d)}for(let i of(n&&a.sort((e,t)=>e.sortKey-t.sortKey),a)){let{geometry:n,index:a,sourceLayerIndex:o}=i;if(this.hasDependencies){let e=se("fill",this.layers,i,{zoom:this.zoom},t);this.patternFeatures.push(e)}else this.addFeature(i,n,a,r,{},t.subdivisionGranularity);t.featureIndex.insert(e[a].feature,n,a,o,this.index)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}addFeatures(e,t,r){for(let i of this.patternFeatures)this.addFeature(i,i.geometry,i.index,t,r,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,o7),this.indexBuffer=e.createIndexBuffer(this.indexArray),this.indexBuffer2=e.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(e,t,r,i,n,a){for(let e of rZ(t,500)){let t=sb(e,i,a.fill.getGranularityForZoomLevel(i.z)),r=this.layoutVertexArray;sw((e,t)=>{r.emplaceBack(e,t)},this.segments,this.layoutVertexArray,this.indexArray,t.verticesFlattened,t.indicesTriangles,this.segments2,this.indexArray2,t.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,canonical:i})}}nM("FillBucket",sM,{omit:["layers","patternFeatures"]});var sk={get paint(){return f=f||new n2({"fill-antialias":new nK(e0.paint_fill["fill-antialias"]),"fill-opacity":new nJ(e0.paint_fill["fill-opacity"]),"fill-color":new nJ(e0.paint_fill["fill-color"]),"fill-outline-color":new nJ(e0.paint_fill["fill-outline-color"]),"fill-translate":new nK(e0.paint_fill["fill-translate"]),"fill-translate-anchor":new nK(e0.paint_fill["fill-translate-anchor"]),"fill-pattern":new nQ(e0.paint_fill["fill-pattern"])})},get layout(){return h=h||new n2({"fill-sort-key":new nJ(e0.layout_fill["fill-sort-key"])})}};class sA extends n4{constructor(e,t){super(e,sk,t)}recalculate(e,t){super.recalculate(e,t);let r=this.paint._values["fill-outline-color"];"constant"===r.value.kind&&void 0===r.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(e){return new sM(e)}queryRadius(){return oD(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:e,geometry:t,transform:r,pixelsToTileUnits:i}){return oS(oO(e,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-r.bearingInRadians,i),t)}isTileClipped(){return!0}}let sS=at([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),sE=at([{name:"a_centroid",components:2,type:"Int16"}],4),{members:sC}=sS;class sL{constructor(e,t,r,i,n){this.properties={},this.extent=r,this.type=0,this.id=void 0,this._pbf=e,this._geometry=-1,this._keys=i,this._values=n,e.readFields(sP,this,t)}loadGeometry(){let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=[],i,n=1,a=0,o=0,s=0;for(;e.pos>3}if(a--,1===n||2===n)o+=e.readSVarint(),s+=e.readSVarint(),1===n&&(i&&r.push(i),i=[]),i&&i.push(new w(o,s));else{if(7!==n)throw Error(`unknown command ${n}`);i&&i.push(i[0].clone())}}return i&&r.push(i),r}bbox(){let e=this._pbf;e.pos=this._geometry;let t=e.readVarint()+e.pos,r=1,i=0,n=0,a=0,o=1/0,s=-1/0,l=1/0,c=-1/0;for(;e.pos>3}if(i--,1===r||2===r)n+=e.readSVarint(),a+=e.readSVarint(),ns&&(s=n),ac&&(c=a);else if(7!==r)throw Error(`unknown command ${r}`)}return[o,l,s,c]}toGeoJSON(e,t,r){let i,n=this.extent*Math.pow(2,r),a=this.extent*e,o=this.extent*t,s=this.loadGeometry();function l(e){return[360*(e.x+a)/n-180,360/Math.PI*Math.atan(Math.exp((1-2*(e.y+o)/n)*Math.PI))-90]}function c(e){return e.map(l)}if(1===this.type){let e=[];for(let t of s)e.push(t[0]);let t=c(e);i=1===e.length?{type:"Point",coordinates:t[0]}:{type:"MultiPoint",coordinates:t}}else if(2===this.type){let e=s.map(c);i=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}}else{if(3!==this.type)throw Error("unknown feature type");{let e=sI(s),t=[];for(let r of e)t.push(r.map(c));i=1===t.length?{type:"Polygon",coordinates:t[0]}:{type:"MultiPolygon",coordinates:t}}}let u={type:"Feature",geometry:i,properties:this.properties};return null!=this.id&&(u.id=this.id),u}}function sP(e,t,r){1===e?t.id=r.readVarint():2===e?function(e,t){let r=e.readVarint()+e.pos;for(;e.pos=this._features.length)throw Error("feature index out of bounds");this._pbf.pos=this._features[e];let t=this._pbf.readVarint()+this._pbf.pos;return new sL(this._pbf,t,this.extent,this._keys,this._values)}}function sD(e,t,r){15===e?t.version=r.readVarint():1===e?t.name=r.readString():5===e?t.extent=r.readVarint():2===e?t._features.push(r.pos):3===e?t._keys.push(r.readString()):4===e&&t._values.push(function(e){let t=null,r=e.readVarint()+e.pos;for(;e.pos>3;t=1===r?e.readString():2===r?e.readFloat():3===r?e.readDouble():4===r?e.readVarint64():5===r?e.readVarint():6===r?e.readSVarint():7===r?e.readBoolean():null}if(null==t)throw Error("unknown feature value");return t}(r))}class sO{constructor(e,t){this.layers=e.readFields(sR,{},t)}}function sR(e,t,r){if(3===e){let e=new sz(r,r.readVarint()+r.pos);e.length&&(t[e.name]=e)}}function sF(e,t,r,i,n,a,o,s){e.emplaceBack(t,r,2*Math.floor(8192*i)+o,8192*n*2,8192*a*2,Math.round(s))}class sj{constructor(e){this.zoom=e.zoom,this.overscaling=e.overscaling,this.layers=e.layers,this.layerIds=this.layers.map(e=>e.id),this.index=e.index,this.hasDependencies=!1,this.layoutVertexArray=new aV,this.centroidVertexArray=new aB,this.indexArray=new aJ,this.programConfigurations=new ox(e.layers,e.zoom),this.segments=new a1,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){for(let{feature:i,id:n,index:a,sourceLayerIndex:o}of(this.features=[],this.hasDependencies=o9("fill-extrusion",this.layers,t),e)){let e=this.layers[0]._featureFilter.needGeometry,s=oT(i,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),s,r))continue;let l={id:n,sourceLayerIndex:o,index:a,geometry:e?s.geometry:ow(i),properties:i.properties,type:i.type,patterns:{}};this.hasDependencies?this.features.push(se("fill-extrusion",this.layers,l,{zoom:this.zoom},t)):this.addFeature(l,l.geometry,a,r,{},t.subdivisionGranularity),t.featureIndex.insert(i,l.geometry,a,o,this.index,!0)}}addFeatures(e,t,r){for(let i of this.features){let{geometry:n}=i;this.addFeature(i,n,i.index,t,r,e.subdivisionGranularity)}}update(e,t,r){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r})}isEmpty(){return 0===this.layoutVertexArray.length&&0===this.centroidVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,sC),this.centroidVertexBuffer=e.createVertexBuffer(this.centroidVertexArray,sE.members,!0),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(e,t,r,i,n,a){for(let r of rZ(t,500)){let t={x:0,y:0,sampleCount:0},n=this.layoutVertexArray.length;this.processPolygon(t,i,e,r,a);let o=this.layoutVertexArray.length-n,s=Math.floor(t.x/t.sampleCount),l=Math.floor(t.y/t.sampleCount);for(let e=0;e{sF(c,e,t,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,l.verticesFlattened,l.indicesTriangles)}_generateSideFaces(e,t){let r=0;for(let a=1;a8192)||i.y===n.y&&(i.y<0||i.y>8192))continue;t.segment.vertexLength+4>a1.MAX_VERTEX_ARRAY_LENGTH&&(t.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let l=o.sub(s)._perp()._unit(),c=s.dist(o);r+c>32768&&(r=0),sF(this.layoutVertexArray,o.x,o.y,l.x,l.y,0,0,r),sF(this.layoutVertexArray,o.x,o.y,l.x,l.y,0,1,r),r+=c,sF(this.layoutVertexArray,s.x,s.y,l.x,l.y,0,0,r),sF(this.layoutVertexArray,s.x,s.y,l.x,l.y,0,1,r);let u=t.segment.vertexLength;this.indexArray.emplaceBack(u,u+2,u+1),this.indexArray.emplaceBack(u+1,u+2,u+3),t.segment.vertexLength+=4,t.segment.primitiveLength+=2}}}function sB(e){return e.every(e=>e.x<0)||e.every(e=>e.x>8192)||e.every(e=>e.y<0)||e.every(e=>e.y>8192)}nM("FillExtrusionBucket",sj,{omit:["layers","features"]});var sN={get paint(){return p=p||new n2({"fill-extrusion-opacity":new nK(e0["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new nJ(e0["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new nK(e0["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new nK(e0["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new nQ(e0["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new nJ(e0["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new nJ(e0["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new nK(e0["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class sU extends n4{constructor(e,t){super(e,sN,t)}createBucket(e){return new sj(e)}queryRadius(){return oD(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a,pixelPosMatrix:o}){let s=oO(e,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-n.bearingInRadians,a),l=this.paint.get("fill-extrusion-height").evaluate(t,r),c=this.paint.get("fill-extrusion-base").evaluate(t,r),u=function(e,t){let r=[];for(let i of e){let e=[i.x,i.y,0,1];eo(e,e,t),r.push(new w(e[0]/e[3],e[1]/e[3]))}return r}(s,o),h=function(e,t,r,i){let n=[],a=[],o=i[8]*t,s=i[9]*t,l=i[10]*t,c=i[11]*t,u=i[8]*r,h=i[9]*r,d=i[10]*r,f=i[11]*r;for(let t of e){let e=[],r=[];for(let n of t){let t=n.x,a=n.y,p=i[0]*t+i[4]*a+i[12],m=i[1]*t+i[5]*a+i[13],g=i[2]*t+i[6]*a+i[14],y=i[3]*t+i[7]*a+i[15],v=g+l,x=y+c,b=p+u,_=m+h,T=g+d,M=y+f,k=new w((p+o)/x,(m+s)/x);k.z=v/x,e.push(k);let A=new w(b/M,_/M);A.z=T/M,r.push(A)}n.push(e),a.push(r)}return[n,a]}(i,c,l,o);return function(e,t,r){let i=1/0;oS(r,t)&&(i=sq(r,t[0]));for(let n=0;n>4;if(1!==i)throw Error(`Got v${i} data when expected v1.`);let n=sH[15&r];if(!n)throw Error("Unrecognized array type.");let[a]=new Uint16Array(e,2,1),[o]=new Uint32Array(e,4,1);return new sG(o,a,n,e)}constructor(e,t=64,r=Float64Array,i){if(isNaN(e)||e<0)throw Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let n=sH.indexOf(this.ArrayType),a=2*e*this.ArrayType.BYTES_PER_ELEMENT,o=e*this.IndexArrayType.BYTES_PER_ELEMENT,s=(8-o%8)%8;if(n<0)throw Error(`Unexpected typed array class: ${r}.`);i&&i instanceof ArrayBuffer?(this.data=i,this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=2*e,this._finished=!0):(this.data=new ArrayBuffer(8+a+o+s),this.ids=new this.IndexArrayType(this.data,8,e),this.coords=new this.ArrayType(this.data,8+o+s,2*e),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+n]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){let e=this._pos>>1;if(e!==this.numItems)throw Error(`Added ${e} items when expected ${this.numItems}.`);return function e(t,r,i,n,a,o){if(a-n<=i)return;let s=n+a>>1;(function e(t,r,i,n,a,o){for(;a>n;){if(a-n>600){let s=a-n+1,l=i-n+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);e(t,r,i,Math.max(n,Math.floor(i-l*u/s+h)),Math.min(a,Math.floor(i+(s-l)*u/s+h)),o)}let s=r[2*i+o],l=n,c=a;for(sW(t,r,n,i),r[2*a+o]>s&&sW(t,r,n,a);ls;)c--}r[2*n+o]===s?sW(t,r,n,c):sW(t,r,++c,a),c<=i&&(n=c+1),i<=c&&(a=c-1)}})(t,r,s,n,a,o),e(t,r,i,n,s-1,1-o),e(t,r,i,s+1,a,1-o)}(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,i){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:n,coords:a,nodeSize:o}=this,s=[0,n.length-1,0],l=[];for(;s.length;){let c=s.pop()||0,u=s.pop()||0,h=s.pop()||0;if(u-h<=o){for(let o=h;o<=u;o++){let s=a[2*o],c=a[2*o+1];s>=e&&s<=r&&c>=t&&c<=i&&l.push(n[o])}continue}let d=h+u>>1,f=a[2*d],p=a[2*d+1];f>=e&&f<=r&&p>=t&&p<=i&&l.push(n[d]),(0===c?e<=f:t<=p)&&(s.push(h),s.push(d-1),s.push(1-c)),(0===c?r>=f:i>=p)&&(s.push(d+1),s.push(u),s.push(1-c))}return l}within(e,t,r){if(!this._finished)throw Error("Data not yet indexed - call index.finish().");let{ids:i,coords:n,nodeSize:a}=this,o=[0,i.length-1,0],s=[],l=r*r;for(;o.length;){let c=o.pop()||0,u=o.pop()||0,h=o.pop()||0;if(u-h<=a){for(let r=h;r<=u;r++)sZ(n[2*r],n[2*r+1],e,t)<=l&&s.push(i[r]);continue}let d=h+u>>1,f=n[2*d],p=n[2*d+1];sZ(f,p,e,t)<=l&&s.push(i[d]),(0===c?e-r<=f:t-r<=p)&&(o.push(h),o.push(d-1),o.push(1-c)),(0===c?e+r>=f:t+r>=p)&&(o.push(d+1),o.push(u),o.push(1-c))}return s}}function sW(e,t,r,i){sY(e,r,i),sY(t,2*r,2*i),sY(t,2*r+1,2*i+1)}function sY(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function sZ(e,t,r,i){let n=e-r,a=t-i;return n*n+a*a}function s$(e,t,r,i){let n={id:e??null,type:t,geometry:r,tags:i,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(t){case"Point":case"MultiPoint":sK(n,r);break;case"LineString":sK(n,r.points);break;case"Polygon":sK(n,r[0].points);break;case"MultiLineString":for(let e of r)sK(n,e.points);break;case"MultiPolygon":for(let e of r)sK(n,e[0].points)}return n}function sX(e){e.points.length>64&&(e.points=new Float64Array(e.points))}function sK(e,t){for(let r=0;r0&&(o+=i?(n*l-s*a)/2:Math.sqrt(Math.pow(s-n,2)+Math.pow(l-a,2))),n=s,a=l}let s=t.points.length-3;t.points[2]=1,r>0&&function e(t,r,i,n){let a=n,o=r+(i-r>>1),s,l=i-r,c=t[r],u=t[r+1],h=t[i],d=t[i+1];for(let e=r+3;e1?(r=n,i=a):l>0&&(r+=o*l,i+=s*l)}return(o=e-r)*o+(s=t-i)*s}(t[e],t[e+1],c,u,h,d);if(r>a)s=e,a=r;else if(r===a){let t=Math.abs(e-o);tn&&(s-r>3&&e(t,r,s,n),t[s+2]=a,i-s>3&&e(t,s,i,n))}(t.points,0,s,r),t.points[s+2]=1,sX(t),t.size=Math.abs(o),t.start=0,t.end=t.size}function s1(e,t,r,i){for(let n=0;n1?1:r}function s5(e){let t={type:"Feature",geometry:function(e){let{type:t,geometry:r}=e;switch(t){case"Point":return{type:t,coordinates:function(e,t){return[s6(e),s8(t)]}(r[0],r[1])};case"MultiPoint":return{type:t,coordinates:s4(r)};case"LineString":return{type:t,coordinates:s4(r.points)};case"MultiLineString":case"Polygon":return{type:t,coordinates:r.map(e=>s4(e.points))};case"MultiPolygon":return{type:t,coordinates:r.map(e=>e.map(e=>s4(e.points)))}}}(e),properties:e.tags};return null!=e.id&&(t.id=e.id),t}function s4(e){let t=[];for(let n=0;n=(r/=t)&&o=i)return null;let l=[];for(let t of e){let e=n===O.X?t.minX:t.minY,a=n===O.X?t.maxX:t.maxY;if(e>=r&&a=i))switch(t.type){case"Point":case"MultiPoint":!function(e,t,r,i,n){let a=[];(function(e,t,r,i,n){for(let a=0;a=r&&o<=i&&lr(t,e[a],e[a+1],e[a+2])}})(e.geometry,a,r,i,n),a.length&&t.push(s$(e.id,3===a.length?"Point":"MultiPoint",a,e.tags))}(t,l,r,i,n);continue;case"LineString":!function(e,t,r,i,n,a){let o=[];if(s9(e.geometry,o,r,i,n,!1,a.lineMetrics),o.length)if(a.lineMetrics)for(let r of o)t.push(s$(e.id,"LineString",r,e.tags));else t.push(o.length>1?s$(e.id,"MultiLineString",o,e.tags):s$(e.id,"LineString",o[0],e.tags))}(t,l,r,i,n,s);continue;case"MultiLineString":!function(e,t,r,i,n){let a=[];lt(e.geometry,a,r,i,n,!1),a.length&&t.push(1!==a.length?s$(e.id,"MultiLineString",a,e.tags):s$(e.id,"LineString",a[0],e.tags))}(t,l,r,i,n);continue;case"Polygon":!function(e,t,r,i,n){let a=[];lt(e.geometry,a,r,i,n,!0),a.length&&t.push(s$(e.id,"Polygon",a,e.tags))}(t,l,r,i,n);continue;case"MultiPolygon":!function(e,t,r,i,n){let a=[];for(let t of e.geometry){let e=[];lt(t,e,r,i,n,!0),e.length&&a.push(e)}a.length&&t.push(s$(e.id,"MultiPolygon",a,e.tags))}(t,l,r,i,n);continue}}return l.length?l:null}function s9(e,t,r,i,n,a,o){let s=le(e),l=n===O.X?li:ln,c,u,h=e.start;for(let d=0;dr&&(u=l(s,f,p,g,y,r),o&&(s.start=h+c*u)):v>i?x=r&&(u=l(s,f,p,g,y,r),b=!0),x>i&&v<=i&&(u=l(s,f,p,g,y,i),b=!0),!a&&b&&(o&&(s.end=h+c*u),t.push(s),s=le(e)),o&&(h+=c)}let d=e.points.length-3,f=e.points[d],p=e.points[d+1],m=n===O.X?f:p;m>=r&&m<=i&&lr(s.points,f,p,e.points[d+2]),d=s.points.length-3,a&&d>=3&&(s.points[d]!==s.points[0]||s.points[d+1]!==s.points[1])&&lr(s.points,s.points[0],s.points[1],s.points[2]),s.points.length&&(sX(s),t.push(s))}function le(e){return{points:[],size:e.size,start:e.start,end:e.end}}function lt(e,t,r,i,n,a){for(let o of e)s9(o,t,r,i,n,a,!1)}function lr(e,t,r,i){e.push(t,r,i)}function li(e,t,r,i,n,a){let o=(a-t)/(i-t);return lr(e.points,a,r+(n-r)*o,1),o}function ln(e,t,r,i,n,a){let o=(a-r)/(n-r);return lr(e.points,t+(i-t)*o,a,1),o}function la(e,t){let r=t.buffer/t.extent,i=e,n=s7(e,1,-1-r,r,O.X,-1,2,t),a=s7(e,1,1-r,2+r,O.X,-1,2,t);return(n||a)&&(i=s7(e,1,-r,1+r,O.X,-1,2,t)||[],n&&(i=lo(n,1).concat(i)),a&&(i=i.concat(lo(a,-1)))),i}function lo(e,t){let r=[];for(let i of e)switch(i.type){case"Point":case"MultiPoint":{let e=function(e,t){let r=[];for(let i=0;ie};class lu{constructor(e){this.options=Object.assign(Object.create(lc),e),this.trees=Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(e){let t=[];for(let r of e){if(!r.geometry)continue;let[e,i]=r.geometry.coordinates,[n,a]=[s2(e),s3(i)];t.push({id:r.id,type:"Point",geometry:[n,a],tags:r.properties})}this.createIndex(t)}initialize(e){let t=[];for(let r of e)"Point"===r.type&&t.push(r);this.createIndex(t)}updateIndex(e,t,r){this.options=Object.assign(Object.create(lc),r.clusterOptions),this.initialize(e)}createIndex(e){let{log:t,minZoom:r,maxZoom:i}=this.options;t&&console.time("total time");let n=`prepare ${e.length} points`;t&&console.time(n),this.points=e;let a=[];for(let t=0;t=r;e--){let r=Date.now();o=this.trees[e]=this.createTree(this.cluster(o,e)),t&&console.log("z%d: %d clusters in %dms",e,o.numItems,Date.now()-r)}t&&console.timeEnd("total time")}getClusters(e,t){return this.getClustersInternal(e,t).map(e=>s5(e))}getClustersInternal(e,t){let r=((e[0]+180)%360+360)%360-180,i=Math.max(-90,Math.min(90,e[1])),n=180===e[2]?180:((e[2]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,n=180;else if(r>n){let e=this.getClustersInternal([r,i,180,a],t),o=this.getClustersInternal([-180,i,n,a],t);return e.concat(o)}let o=this.trees[this.limitZoom(t)],s=o.range(s2(r),s3(a),s2(n),s3(i)),l=o.flatData,c=[];for(let e of s){var u,h,d;let t=this.stride*e;c.push(l[t+5]>1?(u=l,h=t,d=this.clusterProps,{id:u[h+3],type:"Point",tags:lh(u,h,d),geometry:[u[h],u[h+1]]}):this.points[l[t+3]])}return c}getChildren(e){let t=this.getOriginId(e),r=this.getOriginZoom(e),i=Error("No cluster with the specified id: "+e),n=this.trees[r];if(!n)throw i;let a=n.flatData;if(t*this.stride>=a.length)throw i;let o=this.options.radius/(this.options.extent*Math.pow(2,r-1)),s=n.within(a[t*this.stride],a[t*this.stride+1],o),l=[];for(let t of s){var c,u,h;let r=t*this.stride;a[r+4]===e&&l.push(a[r+5]>1?(c=a,u=r,h=this.clusterProps,{type:"Feature",id:c[u+3],properties:lh(c,u,h),geometry:{type:"Point",coordinates:[s6(c[u]),s8(c[u+1])]}}):s5(this.points[a[r+3]]))}if(0===l.length)throw i;return l}getLeaves(e,t,r){let i=[];return this.appendLeaves(i,e,t=t||10,r=r||0,0),i}getTile(e,t,r){let i=this.trees[this.limitZoom(e)];if(!i)return null;let n=Math.pow(2,e),{extent:a,radius:o}=this.options,s=o/a,l=(r-s)/n,c=(r+1+s)/n,u={transformed:!0,features:[],source:null,x:t,y:r,z:e};return this.addTileFeatures(i.range((t-s)/n,l,(t+1+s)/n,c),i.flatData,t,r,n,u),0===t&&this.addTileFeatures(i.range(1-s/n,l,1,c),i.flatData,n,r,n,u),t===n-1&&this.addTileFeatures(i.range(0,l,s/n,c),i.flatData,-1,r,n,u),u}getClusterExpansionZoom(e){return this.getOriginZoom(e)}appendLeaves(e,t,r,i,n){for(let a of this.getChildren(t)){let t=a.properties;if(t?.cluster?n+t.point_count<=i?n+=t.point_count:n=this.appendLeaves(e,t.cluster_id,r,i,n):n1,l,c,u;if(s)l=lh(t,e,this.clusterProps),c=t[e],u=t[e+1];else{let r=this.points[t[e+3]];l=r.tags,[c,u]=r.geometry}let h={type:1,geometry:[[Math.round(this.options.extent*(c*n-r)),Math.round(this.options.extent*(u*n-i))]],tags:l},d;void 0!==(d=s||this.options.generateId?t[e+3]:this.points[t[e+3]].id)&&(h.id=d),a.features.push(h)}}limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}cluster(e,t){let{radius:r,extent:i,reduce:n,minPoints:a}=this.options,o=r/(i*Math.pow(2,t)),s=e.flatData,l=[],c=this.stride;for(let r=0;rt&&(f+=s[r+5])}if(f>d&&f>=a){let e,a=i*d,o=u*d,p=-1,m=(r/c<<5)+(t+1)+this.points.length;for(let i of h){let l=i*c;if(s[l+2]<=t)continue;s[l+2]=t;let u=s[l+5];a+=s[l]*u,o+=s[l+1]*u,s[l+4]=m,n&&(e||(e=this.map(s,r,!0),p=this.clusterProps.length,this.clusterProps.push(e)),n(e,this.map(s,l)))}s[r+4]=m,l.push(a/f,o/f,1/0,m,-1,f),n&&l.push(p)}else{for(let e=0;e1)for(let e of h){let r=e*c;if(!(s[r+2]<=t)){s[r+2]=t;for(let e=0;e>5}getOriginZoom(e){return(e-this.points.length)%32}map(e,t,r){if(e[t+5]>1){let i=this.clusterProps[e[t+6]];return r?Object.assign({},i):i}let i=this.points[e[t+3]].tags,n=this.options.map(i);return r&&n===i?Object.assign({},n):n}}function lh(e,t,r){let i=e[t+5],n=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?Math.round(i/100)/10+"k":i,a=e[t+6];return Object.assign(-1===a?{}:Object.assign({},r[a]),{cluster:!0,cluster_id:e[t+3],point_count:i,point_count_abbreviated:n})}let ld="geojsonvt_clip_start",lf="geojsonvt_clip_end";function lp(e,t,r,i,n){let a=t===n.maxZoom?0:n.tolerance/((1<0&&t.size<(n?o:i))return void(r.numPoints+=t.points.length/3);let s=[];for(let e=0;eo)&&(r.numSimplified++,s.push(t.points[e],t.points[e+1])),r.numPoints++;n&&function(e,t){let r=0;for(let t=0,i=e.length,n=i-2;t0===t)for(let t=0,r=e.length;t1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(t),r.debug>1&&console.timeEnd("invalidating");let[i,n,a]=[0,0,0],o=lp(e,i,n,a,r);o.source=e;let s=lx(i,n,a);if(this.tiles[s]=o,this.tileCoords.push({z:i,x:n,y:a,id:s}),r.debug){let e=`z${i}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}}getClusterExpansionZoom(e){return null}getChildren(e){return null}getLeaves(e,t,r){return null}getTile(e,t,r){let{extent:i,debug:n}=this.options,a=1<1&&console.log("drilling down to z%d-%d-%d",e,t,r);let s,l=e,c=t,u=r;for(;!s&&l>0;)l--,c>>=1,u>>=1,s=this.tiles[lx(l,c,u)];return s?.source?(n>1&&(console.log("found parent tile z%d-%d-%d",l,c,u),console.time("drilling down")),this.splitTile(s.source,l,c,u,e,t,r),n>1&&console.timeEnd("drilling down"),this.tiles[o]?lg(this.tiles[o],i):null):null}splitTile(e,t,r,i,n,a,o){let s=[e,t,r,i],l=this.options,c=l.debug;for(;s.length;){i=s.pop(),r=s.pop(),t=s.pop(),e=s.pop();let u=1<1&&console.time("creation"),d=this.tiles[h]=lp(e,t,r,i,l),this.tileCoords.push({z:t,x:r,y:i,id:h}),c)){c>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",t,r,i,d.numFeatures,d.numPoints,d.numSimplified),console.timeEnd("creation"));let e=`z${t}`;this.stats[e]=(this.stats[e]||0)+1,this.total++}if(d.source=e,null==n){if(t===l.indexMaxZoom||d.numPoints<=l.indexMaxPoints)continue}else{if(t===l.maxZoom||t===n)continue;if(null!=n){let e=n-t;if(r!==a>>e||i!==o>>e)continue}}if(d.source=null,!e.length)continue;c>1&&console.time("clipping");let f=.5*l.buffer/l.extent,p=.5-f,m=.5+f,g=1+f,y=null,v=null,x=null,b=null,_=s7(e,u,r-f,r+m,O.X,d.minX,d.maxX,l),w=s7(e,u,r+p,r+g,O.X,d.minX,d.maxX,l);_&&(y=s7(_,u,i-f,i+m,O.Y,d.minY,d.maxY,l),v=s7(_,u,i+p,i+g,O.Y,d.minY,d.maxY,l)),w&&(x=s7(w,u,i-f,i+m,O.Y,d.minY,d.maxY,l),b=s7(w,u,i+p,i+g,O.Y,d.minY,d.maxY,l)),c>1&&console.timeEnd("clipping"),s.push(y||[],t+1,2*r,2*i),s.push(v||[],t+1,2*r,2*i+1),s.push(x||[],t+1,2*r+1,2*i),s.push(b||[],t+1,2*r+1,2*i+1)}}invalidateTiles(e){if(!e.length)return;let t=this.options,{debug:r}=t,i=1/0,n=-1/0,a=1/0,o=-1/0;for(let t of e)i=Math.min(i,t.minX),n=Math.max(n,t.maxX),a=Math.min(a,t.minY),o=Math.max(o,t.maxY);let s=t.buffer/t.extent,l=new Set;for(let t in this.tiles){let c=this.tiles[t],u=1<=d||o=p)continue;let m=!1;for(let t of e)if(t.maxX>=h&&t.minX=f&&t.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",c.z,c.x,c.y,c.numFeatures,c.numPoints,c.numSimplified);let e=`z${c.z}`;this.stats[e]=(this.stats[e]||0)-1,this.total--}delete this.tiles[t],l.add(t)}}l.size&&(this.tileCoords=this.tileCoords.filter(e=>!l.has(e.id)))}}function lx(e,t,r){return 32*((1<e.id),this.index=e.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers))this.gradients[t.id]={};this.layoutVertexArray=new aq,this.layoutVertexArray2=new aH,this.indexArray=new aJ,this.programConfigurations=new ox(e.layers,e.zoom),this.segments=new a1,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id)}populate(e,t,r){this.hasDependencies=o9("line",this.layers,t)||this.hasLineDasharray(this.layers);let i=this.layers[0].layout.get("line-sort-key"),n=!i.isConstant(),a=[];for(let{feature:t,id:o,index:s,sourceLayerIndex:l}of e){let e=this.layers[0]._featureFilter.needGeometry,c=oT(t,e);if(!this.layers[0]._featureFilter.filter(new nN(this.zoom),c,r))continue;let u=n?i.evaluate(c,{},r):void 0,h={id:o,properties:t.properties,type:t.type,sourceLayerIndex:l,index:s,geometry:e?c.geometry:ow(t),patterns:{},dashes:{},sortKey:u};a.push(h)}for(let i of(n&&a.sort((e,t)=>e.sortKey-t.sortKey),a)){let{geometry:n,index:a,sourceLayerIndex:o}=i;this.hasDependencies?(o9("line",this.layers,t)?se("line",this.layers,i,{zoom:this.zoom},t):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,i,this.zoom,t),this.patternFeatures.push(i)):this.addFeature(i,n,a,r,{},{},t.subdivisionGranularity),t.featureIndex.insert(e[a].feature,n,a,o,this.index)}}update(e,t,r,i){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(e,t,this.stateDependentLayers,{imagePositions:r,dashPositions:i})}addFeatures(e,t,r,i){for(let n of this.patternFeatures)this.addFeature(n,n.geometry,n.index,t,r,i,e.subdivisionGranularity)}isEmpty(){return 0===this.layoutVertexArray.length}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(e){this.uploaded||(0!==this.layoutVertexArray2.length&&(this.layoutVertexBuffer2=e.createVertexBuffer(this.layoutVertexArray2,lw)),this.layoutVertexBuffer=e.createVertexBuffer(this.layoutVertexArray,l_),this.indexBuffer=e.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(e),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(e){if(e.properties&&Object.hasOwn(e.properties,ld)&&Object.hasOwn(e.properties,lf))return{start:+e.properties[ld],end:+e.properties[lf]}}addFeature(e,t,r,i,n,a,o){let s=this.layers[0].layout,l=s.get("line-join").evaluate(e,{}),c=s.get("line-cap").evaluate(e,{}),u=s.get("line-miter-limit").evaluate(e,{}),h=s.get("line-round-limit").evaluate(e,{});for(let r of(this.lineClips=this.lineFeatureClips(e),t))this.addLine(r,e,l,c,u,h,i,o);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,e,r,{imagePositions:n,dashPositions:a,canonical:i})}addLine(e,t,r,i,n,a,o,s){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,e=s_(e,o?s.line.getGranularityForZoomLevel(o.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let t=0;t=2&&e[c-1].equals(e[c-2]);)c--;let u=0;for(;u0;if(_&&t>u){let e=f.dist(p);if(e>2*h){let t=f.sub(f.sub(p)._mult(h/e)._round());this.updateDistance(p,t),this.addCurrentVertex(t,g,0,0,d),p=t}}let T=p&&m,M=T?r:l?"butt":i;if(T&&"round"===M&&(xn&&(M="bevel"),"bevel"===M&&(x>2&&(M="flipbevel"),x100)o=y.mult(-1);else{let e=x*g.add(y).mag()/g.sub(y).mag();o._perp()._mult(e*(w?-1:1))}this.addCurrentVertex(f,o,0,0,d),this.addCurrentVertex(f,o.mult(-1),0,0,d)}else if("bevel"===M||"fakeround"===M){let e=-Math.sqrt(x*x-1),t=w?e:0,r=w?0:e;if(p&&this.addCurrentVertex(f,g,t,r,d),"fakeround"===M){let e=Math.round(180*b/Math.PI/20);for(let t=1;t2*h){let t=f.add(m.sub(f)._mult(h/e)._round());this.updateDistance(f,t),this.addCurrentVertex(t,y,0,0,d),f=t}}}}addCurrentVertex(e,t,r,i,n,a=!1){let o=t.y*i-t.x,s=-t.y-t.x*i;this.addHalfVertex(e,t.x+t.y*r,t.y-t.x*r,a,!1,r,n),this.addHalfVertex(e,o,s,a,!0,-i,n),this.distance>16384&&0===this.totalDistance&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(e,t,r,i,n,a))}addHalfVertex({x:e,y:t},r,i,n,a,o,s){let l=.5*(this.lineClips?32767*this.scaledDistance:this.scaledDistance);this.layoutVertexArray.emplaceBack((e<<1)+ +!!n,(t<<1)+ +!!a,Math.round(63*r)+128,Math.round(63*i)+128,1+(0===o?0:o<0?-1:1)|(63&l)<<2,l>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let c=s.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,c,this.e2),s.primitiveLength++),a?this.e2=c:this.e1=c}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(e,t){this.distance+=e.dist(t),this.updateScaledDistance()}hasLineDasharray(e){for(let t of e){let e=t.paint.get("line-dasharray");if(e&&!e.isConstant())return!0}return!1}addLineDashDependencies(e,t,r,i){for(let n of e){let e=n.paint.get("line-dasharray");if(!e||"constant"===e.value.kind)continue;let a="round"===n.layout.get("line-cap").evaluate(t,{}),o={dasharray:e.value.evaluate({zoom:r-1},t,{}),round:a},s={dasharray:e.value.evaluate({zoom:r},t,{}),round:a},l={dasharray:e.value.evaluate({zoom:r+1},t,{}),round:a},c=`${o.dasharray.join(",")},${o.round}`,u=`${s.dasharray.join(",")},${s.round}`,h=`${l.dasharray.join(",")},${l.round}`;i.dashDependencies[c]=o,i.dashDependencies[u]=s,i.dashDependencies[h]=l,t.dashes[n.id]={min:c,mid:u,max:h}}}}nM("LineBucket",lM,{omit:["layers","patternFeatures"]});var lk={get paint(){return g=g||new n2({"line-opacity":new nJ(e0.paint_line["line-opacity"]),"line-color":new nJ(e0.paint_line["line-color"]),"line-translate":new nK(e0.paint_line["line-translate"]),"line-translate-anchor":new nK(e0.paint_line["line-translate-anchor"]),"line-width":new nJ(e0.paint_line["line-width"]),"line-gap-width":new nJ(e0.paint_line["line-gap-width"]),"line-offset":new nJ(e0.paint_line["line-offset"]),"line-blur":new nJ(e0.paint_line["line-blur"]),"line-dasharray":new nQ(e0.paint_line["line-dasharray"]),"line-pattern":new nQ(e0.paint_line["line-pattern"]),"line-gradient":new n1(e0.paint_line["line-gradient"])})},get layout(){return m=m||new n2({"line-cap":new nJ(e0.layout_line["line-cap"]),"line-join":new nJ(e0.layout_line["line-join"]),"line-miter-limit":new nJ(e0.layout_line["line-miter-limit"]),"line-round-limit":new nJ(e0.layout_line["line-round-limit"]),"line-sort-key":new nJ(e0.layout_line["line-sort-key"])})}};class lA extends nJ{possiblyEvaluate(e,t){return t=new nN(Math.floor(t.zoom),{now:t.now,fadeDuration:t.fadeDuration,zoomHistory:t.zoomHistory,transition:t.transition}),super.possiblyEvaluate(e,t)}evaluate(e,t,r,i){return t=eb({},t,{zoom:Math.floor(t.zoom)}),super.evaluate(e,t,r,i)}}class lS extends n4{constructor(e,t){super(e,lk,t),this.gradientVersion=0,y||((y=new lA(lk.paint.properties["line-width"].specification)).useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(e){if("line-gradient"===e){let e=this.gradientExpression();this.stepInterpolant=void 0!==e._styleExpression&&e._styleExpression.expression instanceof ru,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(e,t){super.recalculate(e,t),this.paint._values["line-floorwidth"]=y.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,e)}createBucket(e){return new lM(e)}queryRadius(e){var t,r;return t=oz("line-width",this,e),((r=oz("line-gap-width",this,e))>0?r+2*t:t)/2+Math.abs(oz("line-offset",this,e))+oD(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:e,feature:t,featureState:r,geometry:i,transform:n,pixelsToTileUnits:a}){var o,s;let l=oO(e,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-n.bearingInRadians,a),c=a/2*(o=this.paint.get("line-width").evaluate(t,r),(s=this.paint.get("line-gap-width").evaluate(t,r))>0?s+2*o:o),u=this.paint.get("line-offset").evaluate(t,r);return u&&(i=function(e,t){let r=[];for(let i of e){let e=function(e){let t=[];for(let r=0;r=3){for(let t of i)if(oI(e,t))return!0}if(function(e,t,r){if(e.length>1){if(oE(e,t))return!0;for(let i of t)if(oC(i,e,r))return!0}for(let i of e)if(oC(i,t,r))return!0;return!1}(e,i,r))return!0}return!1}(l,i,c)}isTileClipped(){return!0}}let lE=at([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),lC=at([{name:"a_projected_pos",components:3,type:"Float32"}],4);at([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let lL=at([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);at([{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"}]);let lP=at([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),lI=at([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);at([{name:"triangle",components:3,type:"Uint16"}]),at([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),at([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),at([{type:"Float32",name:"offsetX"}]),at([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),at([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let lz={"!":"︕","#":"#",$:"$","%":"%","&":"&","(":"︵",")":"︶","*":"*","+":"+",",":"︐","-":"︲",".":"・","/":"/",":":"︓",";":"︔","<":"︿","=":"=",">":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","\xa2":"¢","\xa3":"£","\xa5":"¥","\xa6":"¦","\xac":"¬","\xaf":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","⋯":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"},lD={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},lO={40:!0};function lR(e,t,r,i,n,a){if("fontStack"in t){let i=r[t.fontStack],a=i?.[e];return a?a.metrics.advance*t.scale+n:0}{let e=i[t.imageName];return e?e.displaySize[0]*t.scale*24/a+n:0}}function lF(e,t,r,i){let n=Math.pow(e-t,2);return i?eMath.max(e,this.sections[t].scale),0)}getMaxImageSize(e){let t=0,r=0;for(let i=0;ir))}addImageSection(e){let t=e.image?e.image.name:"";if(0===t.length)return void eA("Can't add FormattedSection with an empty image.");let r=this.getNextImageSectionCharCode();r?(this.text+=String.fromCharCode(r),this.sections.push({scale:1,verticalAlign:e.verticalAlign||"bottom",imageName:t}),this.sectionIndex.push(this.sections.length-1)):eA("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(e,t,r,i,n){let a=[],o=this.determineAverageLineWidth(e,t,r,i,n),s=this.hasZeroWidthSpaces(),l=0,c=0,u=this.text[Symbol.iterator](),h=u.next(),d=this.text[Symbol.iterator]();d.next();let f=d.next(),p=this.text[Symbol.iterator]();p.next(),p.next();let m=p.next();for(;!h.done;){let t=this.getSection(c),g=h.value.codePointAt(0);if(nI(g)||(l+=lR(g,t,r,i,e,n)),!f.done){let e=/[\u02EA\u02EB\u2E80-\u2FDF\u2FF0-\u303F\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FD-\u30FF\u3105-\u312F\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(g)),r=f.value.codePointAt(0);(lD[g]||e||"imageName"in t||!m.done&&lO[r])&&a.push(lj(c+1,l,o,a,function(e,t,r){let i=0;return 10===e&&(i-=1e4),r&&(i+=150),40!==e&&65288!==e||(i+=50),41!==t&&65289!==t||(i+=50),i}(g,r,e&&s),!1))}c++,h=u.next(),f=d.next(),m=p.next()}return function e(t){return t?e(t.priorBreak).concat(t.index):[]}(lj(this.length(),l,o,a,0,!0))}determineAverageLineWidth(e,t,r,i,n){let a=0,o=0;for(let t of this.text){let s=this.getSection(o);a+=lR(t.codePointAt(0),s,r,i,e,n),o++}return a/Math.max(1,Math.ceil(a/t))}}let lN=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class lU{constructor(e=new Uint8Array(16)){this.buf=ArrayBuffer.isView(e)?e:new Uint8Array(e),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(e,t,r=this.length){for(;this.pos>3,n=this.pos;this.type=7&r,e(i,t,this),this.pos===n&&this.skip(r)}return t}readMessage(e,t){return this.readFields(e,t,this.readVarint()+this.pos)}readFixed32(){let e=this.dataView.getUint32(this.pos,!0);return this.pos+=4,e}readSFixed32(){let e=this.dataView.getInt32(this.pos,!0);return this.pos+=4,e}readFixed64(){let e=this.dataView.getUint32(this.pos,!0)+0x100000000*this.dataView.getUint32(this.pos+4,!0);return this.pos+=8,e}readSFixed64(){let e=this.dataView.getUint32(this.pos,!0)+0x100000000*this.dataView.getInt32(this.pos+4,!0);return this.pos+=8,e}readFloat(){let e=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,e}readDouble(){let e=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,e}readVarint(e){let t=this.buf,r,i;return r=127&(i=t[this.pos++]),i<128?r:(r|=(127&(i=t[this.pos++]))<<7,i<128?r:(r|=(127&(i=t[this.pos++]))<<14,i<128?r:(r|=(127&(i=t[this.pos++]))<<21,i<128?r:function(e,t,r){let i=r.buf,n,a;if(n=(112&(a=i[r.pos++]))>>4,a<128||(n|=(127&(a=i[r.pos++]))<<3,a<128)||(n|=(127&(a=i[r.pos++]))<<10,a<128)||(n|=(127&(a=i[r.pos++]))<<17,a<128)||(n|=(127&(a=i[r.pos++]))<<24,a<128)||(n|=(1&(a=i[r.pos++]))<<31,a<128)){var o,s;return o=e,s=n,t?0x100000000*s+(o>>>0):0x100000000*(s>>>0)+(o>>>0)}throw Error("Expected varint not more than 10 bytes")}(r|=(15&(i=t[this.pos]))<<28,e,this))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let e=this.readVarint();return e%2==1?-((e+1)/2):e/2}readBoolean(){return!!this.readVarint()}readString(){let e=this.readVarint()+this.pos,t=this.pos;return this.pos=e,e-t>=12&&lN?lN.decode(this.buf.subarray(t,e)):function(e,t,r){let i="",n=t;for(;n239?4:t>223?3:t>191?2:1;if(n+c>r)break;1===c?t<128&&(l=t):2===c?(192&(a=e[n+1]))==128&&(l=(31&t)<<6|63&a)<=127&&(l=null):3===c?(a=e[n+1],o=e[n+2],(192&a)==128&&(192&o)==128&&((l=(15&t)<<12|(63&a)<<6|63&o)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(a=e[n+1],o=e[n+2],s=e[n+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&((l=(15&t)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),n+=c}return i}(this.buf,t,e)}readBytes(){let e=this.readVarint()+this.pos,t=this.buf.subarray(this.pos,e);return this.pos=e,t}readPackedVarint(e=[],t){let r=this.readPackedEnd();for(;this.pos127;);else if(2===t)this.pos=this.readVarint()+this.pos;else if(5===t)this.pos+=4;else{if(1!==t)throw Error(`Unimplemented type: ${t}`);this.pos+=8}}writeTag(e,t){this.writeVarint(e<<3|t)}realloc(e){let t=this.length||16;for(;t0xfffffff||e<0?function(e,t){var r,i;let n,a,o;if(e>=0?(n=e%0x100000000|0,a=e/0x100000000|0):(n=~(-e%0x100000000),a=~(-e/0x100000000),0xffffffff^n?n=n+1|0:(n=0,a=a+1|0)),e>=0xffffffffffffffff||e<-0xffffffffffffffff)throw Error("Given varint doesn't fit into 10 bytes");t.realloc(10),r=n,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,r>>>=7,t.buf[t.pos++]=127&r|128,t.buf[t.pos]=127&(r>>>=7),o=(7&(i=a))<<4,t.buf[t.pos++]|=o|128*!!(i>>>=3),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i|128*!!(i>>>=7),i&&(t.buf[t.pos++]=127&i)))))}(e,this):(this.realloc(4),this.buf[this.pos++]=127&e|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=127&(e>>>=7)|128*(e>127),e<=127||(this.buf[this.pos++]=e>>>7&127))))}writeSVarint(e){this.writeVarint(e<0?-(2*e)-1:2*e)}writeBoolean(e){this.writeVarint(+e)}writeString(e){e=String(e),this.realloc(4*e.length),this.pos++;let t=this.pos;this.pos=function(e,t,r){for(let i,n,a=0;a55295&&i<57344){if(!n){i>56319||a+1===t.length?(e[r++]=239,e[r++]=191,e[r++]=189):n=i;continue}if(i<56320){e[r++]=239,e[r++]=191,e[r++]=189,n=i;continue}i=n-55296<<10|i-56320|65536,n=null}else n&&(e[r++]=239,e[r++]=191,e[r++]=189,n=null);i<128?e[r++]=i:(i<2048?e[r++]=i>>6|192:(i<65536?e[r++]=i>>12|224:(e[r++]=i>>18|240,e[r++]=i>>12&63|128),e[r++]=i>>6&63|128),e[r++]=63&i|128)}return r}(this.buf,e,this.pos);let r=this.pos-t;r>=128&&lV(t,r,this),this.pos=t-1,this.writeVarint(r),this.pos+=r}writeFloat(e){this.realloc(4),this.dataView.setFloat32(this.pos,e,!0),this.pos+=4}writeDouble(e){this.realloc(8),this.dataView.setFloat64(this.pos,e,!0),this.pos+=8}writeBytes(e){let t=e.length;this.writeVarint(t),this.realloc(t);for(let r=0;r=128&&lV(r,i,this),this.pos=r-1,this.writeVarint(i),this.pos+=i}writeMessage(e,t,r){this.writeTag(e,2),this.writeRawMessage(t,r)}writePackedVarint(e,t){t.length&&this.writeMessage(e,lq,t)}writePackedSVarint(e,t){t.length&&this.writeMessage(e,lH,t)}writePackedBoolean(e,t){t.length&&this.writeMessage(e,lY,t)}writePackedFloat(e,t){t.length&&this.writeMessage(e,lG,t)}writePackedDouble(e,t){t.length&&this.writeMessage(e,lW,t)}writePackedFixed32(e,t){t.length&&this.writeMessage(e,lZ,t)}writePackedSFixed32(e,t){t.length&&this.writeMessage(e,l$,t)}writePackedFixed64(e,t){t.length&&this.writeMessage(e,lX,t)}writePackedSFixed64(e,t){t.length&&this.writeMessage(e,lK,t)}writeBytesField(e,t){this.writeTag(e,2),this.writeBytes(t)}writeFixed32Field(e,t){this.writeTag(e,5),this.writeFixed32(t)}writeSFixed32Field(e,t){this.writeTag(e,5),this.writeSFixed32(t)}writeFixed64Field(e,t){this.writeTag(e,1),this.writeFixed64(t)}writeSFixed64Field(e,t){this.writeTag(e,1),this.writeSFixed64(t)}writeVarintField(e,t){this.writeTag(e,0),this.writeVarint(t)}writeSVarintField(e,t){this.writeTag(e,0),this.writeSVarint(t)}writeStringField(e,t){this.writeTag(e,2),this.writeString(t)}writeFloatField(e,t){this.writeTag(e,5),this.writeFloat(t)}writeDoubleField(e,t){this.writeTag(e,1),this.writeDouble(t)}writeBooleanField(e,t){this.writeVarintField(e,+t)}}function lV(e,t,r){let i=t<=16383?1:t<=2097151?2:t<=0xfffffff?3:Math.floor(Math.log(t)/(7*Math.LN2));r.realloc(i);for(let t=r.pos-1;t>=e;t--)r.buf[t+i]=r.buf[t]}function lq(e,t){for(let r=0;rt.h-e.h);let i=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(t/.95)),r),h:1/0}],n=0,a=0;for(let t of e)for(let e=i.length-1;e>=0;e--){let r=i[e];if(!(t.w>r.w||t.h>r.h)){if(t.x=r.x,t.y=r.y,a=Math.max(a,t.y+t.h),n=Math.max(n,t.x+t.w),t.w===r.w&&t.h===r.h){let t=i.pop();t&&eg.toCodeUnitIndex(e)),x(g.toString(),v))){let t=[...e].map(()=>0);y.push(new lB(e,g.sections,t))}else if(b){y=[],v=v.map(e=>g.toCodeUnitIndex(e));let e=0,t=[];for(let r of g.text)t.push(...Array(r.length).fill(g.sectionIndex[e])),e++;for(let e of b(g.text,t,v)){let t=[],r="";for(let i of e[0])t.push(e[1][r.length]),r+=i;y.push(new lB(e[0],g.sections,t))}}else y=function(e,t){let r=[],i=0;for(let n of t)r.push(e.substring(i,n)),i=n;return ic){let e=Math.ceil(a/c);n*=e/o,o=e}return{x1:i,y1:n,x2:i+a,y2:n+o}}function l7(e,t,r,i,n,a){let o=e.image,s;if(o.content){let e=o.content,t=o.pixelRatio||1;s=[e[0]/t,e[1]/t,o.displaySize[0]-e[2]/t,o.displaySize[1]-e[3]/t]}let l=t.left*a,c=t.right*a,u,h,d,f;"width"===r||"both"===r?(f=n[0]+l-i[3],h=n[0]+c+i[1]):h=(f=n[0]+(l+c-o.displaySize[0])/2)+o.displaySize[0];let p=t.top*a,m=t.bottom*a;return"height"===r||"both"===r?(u=n[1]+p-i[0],d=n[1]+m+i[2]):d=(u=n[1]+(p+m-o.displaySize[1])/2)+o.displaySize[1],{image:o,top:u,right:h,bottom:d,left:f,collisionPadding:s}}function l9(e,t){let{expression:r}=t;if("constant"===r.kind)return{kind:"constant",layoutSize:r.evaluate(new nN(e+1))};if("source"===r.kind)return{kind:"source"};{let{zoomStops:t,interpolationType:i}=r,n=0;for(;ne.id),this.index=t.index,this.pixelRatio=t.pixelRatio,this.sourceLayerIndex=t.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let r=this.layers[0]._unevaluatedLayout._values;this.textSizeData=l9(this.zoom,r["text-size"]),this.iconSizeData=l9(this.zoom,r["icon-size"]);let i=this.layers[0].layout,n=i.get("symbol-sort-key"),a=i.get("symbol-z-order");this.canOverlap="never"!==ce(i,"text-overlap","text-allow-overlap")||"never"!==ce(i,"icon-overlap","icon-allow-overlap")||i.get("text-ignore-placement")||i.get("icon-ignore-placement"),this.sortFeaturesByKey="viewport-y"!==a&&!n.isConstant(),this.sortFeaturesByY=("viewport-y"===a||"auto"===a&&!this.sortFeaturesByKey)&&this.canOverlap,"point"===i.get("symbol-placement")&&(this.writingModes=i.get("text-writing-mode").map(t=>e.ax[t])),this.stateDependentLayerIds=this.layers.filter(e=>e.isStateDependent()).map(e=>e.id),this.sourceID=t.sourceID}createArrays(){this.text=new cn(new ox(this.layers,this.zoom,e=>e.startsWith("text"))),this.icon=new cn(new ox(this.layers,this.zoom,e=>e.startsWith("icon"))),this.glyphOffsetArray=new az,this.lineVertexArray=new aD,this.symbolInstances=new aI,this.textAnchorOffsets=new aR}calculateGlyphDependencies(e,t,r,i,n){for(let a of e)if(t[a.codePointAt(0)]=!0,(r||i)&&n){let e=lz[a];e&&(t[e.codePointAt(0)]=!0)}}populate(t,r,i){var n;let a=this.layers[0],o=a.layout,s=o.get("text-font"),l=o.get("text-field"),c=o.get("icon-image"),u=("constant"!==l.value.kind||l.value.value instanceof tX&&!l.value.value.isEmpty()||l.value.value.toString().length>0)&&("constant"!==s.value.kind||s.value.value.length>0),h="constant"!==c.value.kind||!!c.value.value||Object.keys(c.parameters).length>0,d=o.get("symbol-sort-key");if(this.features=[],!u&&!h)return;let f=r.iconDependencies,p=r.glyphDependencies,m=r.availableImages,g=new nN(this.zoom);for(let{feature:r,id:l,index:c,sourceLayerIndex:y}of t){let t,v,x=a._featureFilter.needGeometry,b=oT(r,x);if(!a._featureFilter.filter(g,b,i))continue;if(x||(b.geometry=ow(r)),u){let e=a.getValueAndResolveTokens("text-field",b,i,m),r=tX.factory(e);this.hasRTLText||(this.hasRTLText=function(e){for(let t of e.sections)if(function(e){for(let t of e)if(nj(t.codePointAt(0)))return!0;return!1}(t.text))return!0;return!1}(r)),(!this.hasRTLText||"unavailable"===nB.getRTLTextPluginStatus()||this.hasRTLText&&nB.isParsed())&&(t=function(e,t,r){for(let i of e.sections)i.text=function(e,t,r){let i=t.layout.get("text-transform").evaluate(r,{});return"uppercase"===i?e=e.toLocaleUpperCase():"lowercase"===i&&(e=e.toLocaleLowerCase()),nB.applyArabicShaping&&(e=nB.applyArabicShaping(e)),e}(i.text,t,r);return e}(r,a,b))}if(h){let e=a.getValueAndResolveTokens("icon-image",b,i,m);v=e instanceof t3?e:t3.fromString(e)}if(!t&&!v)continue;let _=this.sortFeaturesByKey?d.evaluate(b,{},i):void 0;if(this.features.push({id:l,text:t,icon:v,index:c,sourceLayerIndex:y,geometry:b.geometry,properties:r.properties,type:sL.types[r.type],sortKey:_}),v&&(f[v.name]=!0),t){let r=s.evaluate(b,{},i).join(","),a="viewport"!==o.get("text-rotation-alignment")&&"point"!==o.get("symbol-placement");for(let i of(this.allowVerticalPlacement=null==(n=this.writingModes)?void 0:n.includes(e.ax.vertical),t.sections))if(i.image)f[i.image.name]=!0;else{let e=nz(t.toString()),n=i.fontStack||r;p[n]||(p[n]={}),this.calculateGlyphDependencies(i.text,p[n],a,this.allowVerticalPlacement,e)}}}"line"===o.get("symbol-placement")&&(this.features=function(e){let t={},r={},i=[],n=0;function a(t){i.push(e[t]),n++}function o(e,t,n){let a=r[e];return delete r[e],r[t]=a,i[a].geometry[0].pop(),i[a].geometry[0]=i[a].geometry[0].concat(n[0]),a}function s(e,r,n){let a=t[r];return delete t[r],t[e]=a,i[a].geometry[0].shift(),i[a].geometry[0]=n[0].concat(i[a].geometry[0]),a}function l(e,t,r){let i=r?t[0][t[0].length-1]:t[0][0];return`${e}:${i.x}:${i.y}`}for(let c=0;ce.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((e,t)=>e.sortKey-t.sortKey)}update(e,t,r){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}),this.icon.programConfigurations.updatePaintArrays(e,t,this.layers,{imagePositions:r}))}isEmpty(){return 0===this.symbolInstances.length&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(e){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(e),this.iconCollisionBox.upload(e)),this.text.upload(e,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(e,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(e,t){let r=this.lineVertexArray.length;if(void 0!==e.segment){let r=e.dist(t[e.segment+1]),i=e.dist(t[e.segment]),n={};for(let i=e.segment+1;i=0;r--)n[r]={x:t[r].x,y:t[r].y,tileUnitDistanceFromAnchor:i},r>0&&(i+=t[r-1].dist(t[r]));for(let e=0;e0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(e,t){let r=e.placedSymbolArray.get(t),i=r.vertexStartIndex+4*r.numGlyphs;for(let t=r.vertexStartIndex;ti[e]-i[t]||n[t]-n[e]),a}addToSortKeyRanges(e,t){let r=this.sortKeyRanges[this.sortKeyRanges.length-1];r?.sortKey===t?r.symbolInstanceEnd=e+1:this.sortKeyRanges.push({sortKey:t,symbolInstanceStart:e,symbolInstanceEnd:e+1})}sortFeatures(e){if(this.sortFeaturesByY&&this.sortedAngle!==e&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){for(let t of(this.symbolInstanceIndexes=this.getSortedSymbolIndexes(e),this.sortedAngle=e,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[],this.symbolInstanceIndexes)){let e=this.symbolInstances.get(t);this.featureSortOrder.push(e.featureIndex);let r=[e.rightJustifiedTextSymbolIndex,e.centerJustifiedTextSymbolIndex,e.leftJustifiedTextSymbolIndex];for(let e=0;e=0&&r.indexOf(t)===e&&this.addIndicesForPlacedSymbol(this.text,t)}e.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,e.verticalPlacedTextSymbolIndex),e.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.placedIconSymbolIndex),e.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,e.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}nM("SymbolBucket",co,{omit:["layers","collisionBoxArray","features","compareText"]}),co.MAX_GLYPHS=65535,co.addDynamicAttributes=ci;var cs={get paint(){return x=x||new n2({"icon-opacity":new nJ(e0.paint_symbol["icon-opacity"]),"icon-color":new nJ(e0.paint_symbol["icon-color"]),"icon-halo-color":new nJ(e0.paint_symbol["icon-halo-color"]),"icon-halo-width":new nJ(e0.paint_symbol["icon-halo-width"]),"icon-halo-blur":new nJ(e0.paint_symbol["icon-halo-blur"]),"icon-translate":new nK(e0.paint_symbol["icon-translate"]),"icon-translate-anchor":new nK(e0.paint_symbol["icon-translate-anchor"]),"text-opacity":new nJ(e0.paint_symbol["text-opacity"]),"text-color":new nJ(e0.paint_symbol["text-color"],{runtimeType:ts,getOverride:e=>e.textColor,hasOverride:e=>!!e.textColor}),"text-halo-color":new nJ(e0.paint_symbol["text-halo-color"]),"text-halo-width":new nJ(e0.paint_symbol["text-halo-width"]),"text-halo-blur":new nJ(e0.paint_symbol["text-halo-blur"]),"text-translate":new nK(e0.paint_symbol["text-translate"]),"text-translate-anchor":new nK(e0.paint_symbol["text-translate-anchor"])})},get layout(){return v=v||new n2({"symbol-placement":new nK(e0.layout_symbol["symbol-placement"]),"symbol-spacing":new nK(e0.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new nK(e0.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new nJ(e0.layout_symbol["symbol-sort-key"]),"symbol-z-order":new nK(e0.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new nK(e0.layout_symbol["icon-allow-overlap"]),"icon-overlap":new nK(e0.layout_symbol["icon-overlap"]),"icon-ignore-placement":new nK(e0.layout_symbol["icon-ignore-placement"]),"icon-optional":new nK(e0.layout_symbol["icon-optional"]),"icon-rotation-alignment":new nK(e0.layout_symbol["icon-rotation-alignment"]),"icon-size":new nJ(e0.layout_symbol["icon-size"]),"icon-text-fit":new nK(e0.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new nK(e0.layout_symbol["icon-text-fit-padding"]),"icon-image":new nJ(e0.layout_symbol["icon-image"]),"icon-rotate":new nJ(e0.layout_symbol["icon-rotate"]),"icon-padding":new nJ(e0.layout_symbol["icon-padding"]),"icon-keep-upright":new nK(e0.layout_symbol["icon-keep-upright"]),"icon-offset":new nJ(e0.layout_symbol["icon-offset"]),"icon-anchor":new nJ(e0.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new nK(e0.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new nK(e0.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new nK(e0.layout_symbol["text-rotation-alignment"]),"text-field":new nJ(e0.layout_symbol["text-field"]),"text-font":new nJ(e0.layout_symbol["text-font"]),"text-size":new nJ(e0.layout_symbol["text-size"]),"text-max-width":new nJ(e0.layout_symbol["text-max-width"]),"text-line-height":new nK(e0.layout_symbol["text-line-height"]),"text-letter-spacing":new nJ(e0.layout_symbol["text-letter-spacing"]),"text-justify":new nJ(e0.layout_symbol["text-justify"]),"text-radial-offset":new nJ(e0.layout_symbol["text-radial-offset"]),"text-variable-anchor":new nK(e0.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new nJ(e0.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new nJ(e0.layout_symbol["text-anchor"]),"text-max-angle":new nK(e0.layout_symbol["text-max-angle"]),"text-writing-mode":new nK(e0.layout_symbol["text-writing-mode"]),"text-rotate":new nJ(e0.layout_symbol["text-rotate"]),"text-padding":new nK(e0.layout_symbol["text-padding"]),"text-keep-upright":new nK(e0.layout_symbol["text-keep-upright"]),"text-transform":new nJ(e0.layout_symbol["text-transform"]),"text-offset":new nJ(e0.layout_symbol["text-offset"]),"text-allow-overlap":new nK(e0.layout_symbol["text-allow-overlap"]),"text-overlap":new nK(e0.layout_symbol["text-overlap"]),"text-ignore-placement":new nK(e0.layout_symbol["text-ignore-placement"]),"text-optional":new nK(e0.layout_symbol["text-optional"])})}};class cl{constructor(e){if(void 0===e.property.overrides)throw Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=e.property.overrides?e.property.overrides.runtimeType:ti,this.defaultValue=e}evaluate(e){if(e.formattedSection){let t=this.defaultValue.property.overrides;if(t?.hasOverride(e.formattedSection))return t.getOverride(e.formattedSection)}return e.feature&&e.featureState?this.defaultValue.evaluate(e.feature,e.featureState):this.defaultValue.property.specification.default}eachChild(e){this.defaultValue.isConstant()||e(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}nM("FormatSectionOverride",cl,{omit:["defaultValue"]});class cc extends n4{constructor(e,t){super(e,cs,t)}recalculate(e,t){if(super.recalculate(e,t),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]="map"===this.layout.get("text-rotation-alignment")?"map":"viewport"),"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")){let e=this.layout.get("text-writing-mode");if(e){let t=[];for(let r of e)t.includes(r)||t.push(r);this.layout._values["text-writing-mode"]=t}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(e,t,r,i){var n;let a=this.layout.get(e).evaluate(t,{},r,i),o=this._unevaluatedLayout._values[e];return o.isDataDriven()||iI(o.value)||!a?a:(n=t.properties,a.replace(/{([^{}]+)}/g,(e,t)=>n&&t in n?String(n[t]):""))}createBucket(e){return new co(e)}queryRadius(){return 0}queryIntersectsFeature(){throw Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let e of cs.paint.overridableProperties){if(!cc.hasPaintOverride(this.layout,e))continue;let t=this.paint.get(e),r=new iP(new cl(t),t.property.specification),i=null;i="constant"===t.value.kind||"source"===t.value.kind?new iD("source",r):new iO("composite",r,t.value.zoomStops),this.paint._values[e]=new n$(t.property,i,t.parameters)}}_handleOverridablePaintPropertyUpdate(e,t,r){return!(!this.layout||t.isDataDriven()||r.isDataDriven())&&cc.hasPaintOverride(this.layout,e)}static hasPaintOverride(e,t){let r=e.get("text-field"),i=cs.paint.properties[t],n=!1,a=e=>{var t;for(let r of e)if(null!=(t=i.overrides)&&t.hasOverride(r))return void(n=!0)};if("constant"===r.value.kind&&r.value.value instanceof tX)a(r.value.value.sections);else if("source"===r.value.kind||"composite"===r.value.kind){let e=t=>{n||(t instanceof t9&&t8(t.value)===td?a(t.value.sections):t instanceof rI?a(t.sections):t.eachChild(e))},t=r.value;t._styleExpression&&e(t._styleExpression.expression)}return n}}var cu={get paint(){return b=b||new n2({"background-color":new nK(e0.paint_background["background-color"]),"background-pattern":new n0(e0.paint_background["background-pattern"]),"background-opacity":new nK(e0.paint_background["background-opacity"])})}};class ch extends n4{constructor(e,t){super(e,cu,t)}}class cd extends n4{constructor(e,t){super(e,{},t),this.onAdd=e=>{this.implementation.onAdd&&this.implementation.onAdd(e,e.painter.context.gl)},this.onRemove=e=>{this.implementation.onRemove&&this.implementation.onRemove(e,e.painter.context.gl)},this.implementation=e}is3D(){return"3d"===this.implementation.renderingMode}hasOffscreenPass(){return void 0!==this.implementation.prerender}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw Error("Custom layers cannot be serialized")}}class cf{constructor(e){this._methodToThrottle=e,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var e;this._triggered||(this._triggered=!0,null==(e=this._channel)||e.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let cp={once:!0};class cm{constructor(e,t){if(isNaN(e)||isNaN(t))throw Error(`Invalid LngLat object: (${e}, ${t})`);if(this.lng=+e,this.lat=+t,this.lat>90||this.lat<-90)throw Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new cm(ex(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(e){let t=Math.PI/180,r=this.lat*t,i=e.lat*t;return 6371008.8*Math.acos(Math.min(Math.sin(r)*Math.sin(i)+Math.cos(r)*Math.cos(i)*Math.cos((e.lng-this.lng)*t),1))}static convert(e){if(e instanceof cm)return e;if(Array.isArray(e)&&(2===e.length||3===e.length))return new cm(Number(e[0]),Number(e[1]));if(!Array.isArray(e)&&"object"==typeof e&&null!==e)return new cm(Number("lng"in e?e.lng:e.lon),Number(e.lat));throw Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")}}let cg=2*Math.PI*6371008.8;function cy(e){return cg*Math.cos(e*Math.PI/180)}function cv(e){return(180+e)/360}function cx(e){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+e*Math.PI/360)))/360}function cb(e){return 360*e-180}function c_(e){return 360/Math.PI*Math.atan(Math.exp((180-360*e)*Math.PI/180))-90}function cw(e,t){return e*cy(c_(t))}class cT{constructor(e,t,r=0){this.x=+e,this.y=+t,this.z=+r}static fromLngLat(e,t=0){let r=cm.convert(e);return new cT(cv(r.lng),cx(r.lat),t/cy(r.lat))}toLngLat(){return new cm(cb(this.x),c_(this.y))}toAltitude(){return cw(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/cg*(1/Math.cos(c_(this.y)*Math.PI/180))}}function cM(e,t,r){var i=2*Math.PI*6378137/256/Math.pow(2,r);return[e*i-2*Math.PI*6378137/2,t*i-2*Math.PI*6378137/2]}class ck{constructor(e,t,r){if(!function(e,t,r){return!(e<0||e>25||r<0||r>=Math.pow(2,e)||t<0||t>=Math.pow(2,e))}(e,t,r))throw Error(`x=${t}, y=${r}, z=${e} outside of bounds. 0<=x<${Math.pow(2,e)}, 0<=y<${Math.pow(2,e)} 0<=z<=25 `);this.z=e,this.x=t,this.y=r,this.key=cE(0,e,e,t,r)}equals(e){return this.z===e.z&&this.x===e.x&&this.y===e.y}url(e,t,r){var i,n,a,o,s;let l=(n=this.y,a=this.z,o=cM(256*(i=this.x),256*(n=Math.pow(2,a)-n-1),a),s=cM(256*(i+1),256*(n+1),a),o[0]+","+o[1]+","+s[0]+","+s[1]),c=function(e,t,r){let i="";for(let n=e;n>0;n--){let e=1<1?"@2x":"").replace(/{quadkey}/g,c).replace(/{bbox-epsg-3857}/g,l)}isChildOf(e){let t=this.z-e.z;return t>0&&e.x===this.x>>t&&e.y===this.y>>t}getTilePoint(e){let t=Math.pow(2,this.z);return new w((e.x*t-this.x)*8192,(e.y*t-this.y)*8192)}toString(){return`${this.z}/${this.x}/${this.y}`}}class cA{constructor(e,t){this.wrap=e,this.canonical=t,this.key=cE(e,t.z,t.z,t.x,t.y)}}class cS{constructor(e,t,r,i,n){if(this.terrainRttPosMatrix32f=null,e= z; overscaledZ = ${e}; z = ${r}`);this.overscaledZ=e,this.wrap=t,this.canonical=new ck(r,+i,+n),this.key=cE(t,e,r,i,n)}clone(){return new cS(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(e){return this.overscaledZ===e.overscaledZ&&this.wrap===e.wrap&&this.canonical.equals(e.canonical)}scaledTo(e){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let t=this.canonical.z-e;return e>this.canonical.z?new cS(e,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new cS(e,this.wrap,e,this.canonical.x>>t,this.canonical.y>>t)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(e,t){if(e>this.overscaledZ)throw Error(`targetZ > this.overscaledZ; targetZ = ${e}; overscaledZ = ${this.overscaledZ}`);let r=this.canonical.z-e;return e>this.canonical.z?cE(this.wrap*t,e,this.canonical.z,this.canonical.x,this.canonical.y):cE(this.wrap*t,e,e,this.canonical.x>>r,this.canonical.y>>r)}isChildOf(e){if(e.wrap!==this.wrap||this.overscaledZ-e.overscaledZ<=0)return!1;if(0===e.overscaledZ)return this.overscaledZ>0;let t=this.canonical.z-e.canonical.z;return!(t<0)&&e.canonical.x===this.canonical.x>>t&&e.canonical.y===this.canonical.y>>t}children(e){if(this.overscaledZ>=e)return[new cS(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let t=this.canonical.z+1,r=2*this.canonical.x,i=2*this.canonical.y;return[new cS(t,this.wrap,t,r,i),new cS(t,this.wrap,t,r+1,i),new cS(t,this.wrap,t,r,i+1),new cS(t,this.wrap,t,r+1,i+1)]}isLessThan(e){return this.wrape.wrap)&&(this.overscaledZe.overscaledZ)&&(this.canonical.xe.canonical.x)&&this.canonical.y=0&&e=0&&t=o)return null;let l=this.canonical.x+i,c=this.wrap;return l<0?(c-=Math.ceil(-l/o),l=(l%o+o)%o):l>=o&&(c+=Math.floor(l/o),l%=o),{tileID:new cS(this.overscaledZ,c,a,l,s),x:e-i*r,y:t-n*r}}}function cE(e,t,r,i,n){(e*=2)<0&&(e=-1*e-1);let a=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(e){return this.expandBy(-e)}map(e){let t=new cC;return t.extend(e(new w(this.minX,this.minY))),t.extend(e(new w(this.maxX,this.minY))),t.extend(e(new w(this.minX,this.maxY))),t.extend(e(new w(this.maxX,this.maxY))),t}static fromPoints(e){let t=new cC;for(let r of e)t.extend(r);return t}contains(e){return e.x>=this.minX&&e.x<=this.maxX&&e.y>=this.minY&&e.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(e){return!this.empty()&&!e.empty()&&e.minX>=this.minX&&e.maxX<=this.maxX&&e.minY>=this.minY&&e.maxY<=this.maxY}intersects(e){return!this.empty()&&!e.empty()&&e.minX<=this.maxX&&e.maxX>=this.minX&&e.minY<=this.maxY&&e.maxY>=this.minY}}class cL{constructor(e){this._stringToNumber={},this._numberToString=[];for(let t=0;t=this._numberToString.length)throw Error(`Out of bounds. Index requested n=${e} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[e]}}class cP{constructor(e,t,r,i,n){this.type="Feature",this._vectorTileFeature=e,this._x=r,this._y=i,this._z=t,this.properties=e.properties,this.id=n}projectPoint(e,t,r,i){return[360*(e.x+t)/i-180,360/Math.PI*Math.atan(Math.exp((1-2*(e.y+r)/i)*Math.PI))-90]}projectLine(e,t,r,i){return e.map(e=>this.projectPoint(e,t,r,i))}get geometry(){if(this._geometry)return this._geometry;let e=this._vectorTileFeature,t=e.extent*Math.pow(2,this._z),r=e.extent*this._x,i=e.extent*this._y,n=e.loadGeometry();switch(e.type){case 1:{let e=[];for(let t of n)e.push(t[0]);let a=this.projectLine(e,r,i,t);this._geometry=1===e.length?{type:"Point",coordinates:a[0]}:{type:"MultiPoint",coordinates:a};break}case 2:{let e=n.map(e=>this.projectLine(e,r,i,t));this._geometry=1===e.length?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e};break}case 3:{let e=sI(n),a=[];for(let n of e)a.push(n.map(e=>this.projectLine(e,r,i,t)));this._geometry=1===a.length?{type:"Polygon",coordinates:a[0]}:{type:"MultiPolygon",coordinates:a};break}default:throw Error(`unknown feature type: ${e.type}`)}return this._geometry}set geometry(e){this._geometry=e}toJSON(){let e={geometry:this.geometry};for(let t in this)"_geometry"!==t&&"_vectorTileFeature"!==t&&"_x"!==t&&"_y"!==t&&"_z"!==t&&(e[t]=this[t]);return e}}class cI{constructor(e,t,r){this._name=e,this.dataBuffer=t,"number"==typeof r?this._size=r:(this.nullabilityBuffer=r,this._size=r.size())}getValue(e){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(e)?null:this.getValueFromBuffer(e)}has(e){var t;return(null==(t=this.nullabilityBuffer)?void 0:t.get(e))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class cz extends cI{}class cD extends cz{getValueFromBuffer(e){return this.dataBuffer[e]}}class cO extends cz{getValueFromBuffer(e){return this.dataBuffer[e]}}class cR extends cI{constructor(e,t,r,i){super(e,t,i),this.delta=r}}class cF extends cR{constructor(e,t,r,i){super(e,Int32Array.of(t),r,i)}getValueFromBuffer(e){return this.dataBuffer[0]+e*this.delta}}class cj extends cI{constructor(e,t,r,i){super(e,i?Int32Array.of(t):Uint32Array.of(t),r)}getValueFromBuffer(e){return this.dataBuffer[0]}}class cB{constructor(e,t,r,i,n=4096){this._name=e,this._geometryVector=t,this._idVector=r,this._propertyVectors=i,this._extent=n}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(e){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(e=>[e.name,e]))),this.propertyVectorsMap.get(e)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let e=[],t=this.geometryVector.getGeometries();for(let r=0;r>>32-e;let cV=function(){var e;if(!Number.isFinite(65536))return 65536;let t=(e=Math.floor(65536))-e%256;return 0===t?256:t}(),cq=3*cV/256+cV|0;function cH(){let e=new Uint8Array(cq);return{dataToBePacked:Array(33),dataPointers:new Int32Array(33),byteContainer:e,byteContainerI32:new Int32Array(e.buffer,e.byteOffset,e.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function cG(e,t,r){let i=new Uint32Array(r),n=0,a=t.get();for(let t=0;t=64)throw Error("Varint too long")}return t.set(n),r}(e,t);return i}function cY(e){return e>>>1^-(1&e)}function cZ(e){return e>>BigInt("1")^-(BigInt("1")&e)}function c$(e){return e%2==1?-((e+1)/2):e/2}function cX(e,t,r){if(void 0===r){r=0;for(let i=0;i=4)for(;i=4)for(;i=4)for(let i=e[0];r>4],n=null;switch(i){case B.DATA:n={dictionaryType:Object.values(N)[15&r]};break;case B.OFFSET:n={offsetType:Object.values(U)[15&r]};break;case B.LENGTH:n={lengthType:Object.values(V)[15&r]}}t.increment();let a=e[t.get()],o=Object.values(F)[a>>5],s=Object.values(F)[a>>2&7],l=Object.values(j)[3&a];t.increment();let c=cG(e,t,2),u=c[0];return{physicalStreamType:i,logicalStreamType:n,logicalLevelTechnique1:o,logicalLevelTechnique2:s,physicalLevelTechnique:l,numValues:u,byteLength:c[1],decompressedCount:u}}(e,t);return n.logicalLevelTechnique1===F.MORTON?(r=cG(e,t,2),{physicalStreamType:n.physicalStreamType,logicalStreamType:n.logicalStreamType,logicalLevelTechnique1:n.logicalLevelTechnique1,logicalLevelTechnique2:n.logicalLevelTechnique2,physicalLevelTechnique:n.physicalLevelTechnique,numValues:n.numValues,byteLength:n.byteLength,decompressedCount:n.decompressedCount,numBits:r[0],coordinateShift:r[1]}):F.RLE!==n.logicalLevelTechnique1&&F.RLE!==n.logicalLevelTechnique2||j.NONE===n.physicalLevelTechnique?n:(i=cG(e,t,2),{physicalStreamType:n.physicalStreamType,logicalStreamType:n.logicalStreamType,logicalLevelTechnique1:n.logicalLevelTechnique1,logicalLevelTechnique2:n.logicalLevelTechnique2,physicalLevelTechnique:n.physicalLevelTechnique,numValues:n.numValues,byteLength:n.byteLength,decompressedCount:i[1],runs:i[0],numRleValues:i[1]})}(S=B||(B={})).PRESENT="PRESENT",S.DATA="DATA",S.OFFSET="OFFSET",S.LENGTH="LENGTH",(E=N||(N={})).NONE="NONE",E.SINGLE="SINGLE",E.SHARED="SHARED",E.VERTEX="VERTEX",E.MORTON="MORTON",E.FSST="FSST",(C=U||(U={})).VERTEX="VERTEX",C.INDEX="INDEX",C.STRING="STRING",C.KEY="KEY",(L=V||(V={})).VAR_BINARY="VAR_BINARY",L.GEOMETRIES="GEOMETRIES",L.PARTS="PARTS",L.RINGS="RINGS",L.TRIANGLES="TRIANGLES",L.SYMBOL="SYMBOL",L.DICTIONARY="DICTIONARY",(P=q||(q={}))[P.FLAT=0]="FLAT",P[P.CONST=1]="CONST",P[P.SEQUENCE=2]="SEQUENCE",P[P.DICTIONARY=3]="DICTIONARY",P[P.FSST_DICTIONARY=4]="FSST_DICTIONARY";class c3{constructor(e,t){this.values=e,this._size=t}get(e){let t=Math.floor(e/8);return(this.values[t]>>e%8&1)==1}set(e,t){let r=Math.floor(e/8);this.values[r]=this.values[r]|!!t<>e%8&1}size(){return this._size}getBuffer(){return this.values}}function c5(e,t,r){if(!t)return e;let i=t.size(),n=new e.constructor(i),a=0;for(let o=0;o=4)for(;i>>0;for(let r=1;r>>0;return t}(r.logicalLevelTechnique2===F.RLE?cX(o,r.runs,r.numRleValues):o);break;case F.RLE:a=cX(o,r.runs,r.numRleValues);break;case F.MORTON:c1(o),a=o;break;case F.COMPONENTWISE_DELTA:a=function(e){if(e.length<2)return new Uint32Array(e);let t=new Uint32Array(e.length);t[0]=cY(e[0])>>>0,t[1]=cY(e[1])>>>0;for(let r=2;r>>0,t[r+1]=t[r-1]+cY(e[r+1])>>>0;return t}(o);break;case F.NONE:a=o;break;default:throw Error(`The specified Logical level technique is not supported: ${r.logicalLevelTechnique1}`)}return n?c5(a,n,0):a}function c8(e,t,r){return function(e,t){if(t.logicalLevelTechnique1===F.DELTA&&t.logicalLevelTechnique2===F.NONE){let t=new Int32Array(e.length+1);t[0]=0,t[1]=cY(e[0]);let r=t[1];for(let i=2;i!==t.length;++i)r+=cY(e[i-1]),t[i]=t[i-1]+r;return new Uint32Array(t)}if(t.logicalLevelTechnique1===F.RLE&&t.logicalLevelTechnique2===F.NONE)return function(e,t,r){let i=new Uint32Array(r+1);i[0]=0;let n=1,a=i[0];for(let r=0;r>>2,s=function(e,t){if(t<=e.encodedWords.length)return e.encodedWords;let r=new Uint32Array(Math.max(16,2*t));return e.encodedWords=r,r}(n,o);!function(e,t,r,i){if(t<0||r<0||t+r>e.length)throw RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${t}, byteLength=${r}, bytes.length=${e.length})`);let n=Math.floor(r/4),a=r%4!=0,o=a?n+1:n;if(i.length0){let r=e.byteOffset+t;if(3&r)for(let r=0;r>>0;return((255&t)<<24|(65280&t)<<8|t>>>8&65280|t>>>24&255)>>>0}(t[e])}}if(a){let a=t+4*n,o=r-4*n,s=0;for(let t=0;t0){let t=0|e[i];if(i=i+1|0,255&t)throw Error(`FastPFOR decode: invalid alignedLength=${t} (expected multiple of 256)`);if(n+t>a.length)throw Error(`FastPFOR decode: output buffer too small (outPos=${n}, alignedLength=${t}, out.length=${a.length})`);i=function(e,t,r,i,n,a){let o=i+(n-n%256),s=i,l=r;for(;s!==o;){let r=Math.min(cV,o-s);l=function(e,t,r,i,n,a){let o=0|r,s=0|e[o];if(s<=0||o+s>e.length-1)throw Error(`FastPFOR decode: invalid whereMeta=${s} at pageStart=${o} (expected > 0 and pageStart+whereMeta < encoded.length=${e.length})`);let l=o+s|0,c=e[l]>>>0,u=c+3>>>2,h=l+1,d=h+u;if(d>=e.length)throw Error(`FastPFOR decode: invalid byteSize=${c} (metaInts=${u}, pageStart=${o}, packedEnd=${l}, byteContainerStart=${h}) causes bitmapPos=${d} out of bounds (encoded.length=${e.length})`);let f=function(e,t,r,i){i.byteContainer.length>>2;if(3&n.byteOffset)for(let r=0;r>>8&255,n[a+2|0]=i>>>16&255,n[a+3|0]=i>>>24&255}else{let r=i.byteContainerI32;(!r||r.buffer!==n.buffer||r.byteOffset!==n.byteOffset||r.length>>2)),r.set(e.subarray(t,t+a))}let o=3&r;if(o>0){let r=0|e[t+a|0],i=a<<2;for(let e=0;e>>(e<<3)&255}return n}(e,h,c,a),p=function(e,t,r){let i=0|e[t++],n=r.dataToBePacked;for(let o=2;o<=32;o=o+1|0){var a;if(!(i>>>o-1&1))continue;if(t>=e.length)throw Error(`FastPFOR decode: truncated exception stream header (bitWidth=${o}, streamWordIndex=${t}, needWords=1, availableWords=${e.length-t}, encodedWords=${e.length})`);let s=e[t++]>>>0,l=(a=s+31)-a%32,c=s*o+31>>>5;if(t+c>e.length)throw Error(`FastPFOR decode: truncated exception stream (bitWidth=${o}, size=${s}, streamWordIndex=${t}, needWords=${c}, availableWords=${e.length-t}, encodedWords=${e.length})`);let u=n[o];(!u||u.length>>0,s=e[t+1]>>>0,r[a++]=o>>>0&3,r[a++]=o>>>2&3,r[a++]=o>>>4&3,r[a++]=o>>>6&3,r[a++]=o>>>8&3,r[a++]=o>>>10&3,r[a++]=o>>>12&3,r[a++]=o>>>14&3,r[a++]=o>>>16&3,r[a++]=o>>>18&3,r[a++]=o>>>20&3,r[a++]=o>>>22&3,r[a++]=o>>>24&3,r[a++]=o>>>26&3,r[a++]=o>>>28&3,r[a++]=o>>>30&3,r[a++]=s>>>0&3,r[a++]=s>>>2&3,r[a++]=s>>>4&3,r[a++]=s>>>6&3,r[a++]=s>>>8&3,r[a++]=s>>>10&3,r[a++]=s>>>12&3,r[a++]=s>>>14&3,r[a++]=s>>>16&3,r[a++]=s>>>18&3,r[a++]=s>>>20&3,r[a++]=s>>>22&3,r[a++]=s>>>24&3,r[a++]=s>>>26&3,r[a++]=s>>>28&3,r[a]=s>>>30&3;case 3:let l,c,u,h;return l=i,c=e[t]>>>0,u=e[t+1]>>>0,h=e[t+2]>>>0,r[l++]=c>>>0&7,r[l++]=c>>>3&7,r[l++]=c>>>6&7,r[l++]=c>>>9&7,r[l++]=c>>>12&7,r[l++]=c>>>15&7,r[l++]=c>>>18&7,r[l++]=c>>>21&7,r[l++]=c>>>24&7,r[l++]=c>>>27&7,r[l++]=7&(c>>>30|(1&u)<<2),r[l++]=u>>>1&7,r[l++]=u>>>4&7,r[l++]=u>>>7&7,r[l++]=u>>>10&7,r[l++]=u>>>13&7,r[l++]=u>>>16&7,r[l++]=u>>>19&7,r[l++]=u>>>22&7,r[l++]=u>>>25&7,r[l++]=u>>>28&7,r[l++]=7&(u>>>31|(3&h)<<1),r[l++]=h>>>2&7,r[l++]=h>>>5&7,r[l++]=h>>>8&7,r[l++]=h>>>11&7,r[l++]=h>>>14&7,r[l++]=h>>>17&7,r[l++]=h>>>20&7,r[l++]=h>>>23&7,r[l++]=h>>>26&7,r[l]=h>>>29&7;case 4:let d,f,p,m,g;return d=i,f=e[t]>>>0,p=e[t+1]>>>0,m=e[t+2]>>>0,g=e[t+3]>>>0,r[d++]=f>>>0&15,r[d++]=f>>>4&15,r[d++]=f>>>8&15,r[d++]=f>>>12&15,r[d++]=f>>>16&15,r[d++]=f>>>20&15,r[d++]=f>>>24&15,r[d++]=f>>>28&15,r[d++]=p>>>0&15,r[d++]=p>>>4&15,r[d++]=p>>>8&15,r[d++]=p>>>12&15,r[d++]=p>>>16&15,r[d++]=p>>>20&15,r[d++]=p>>>24&15,r[d++]=p>>>28&15,r[d++]=m>>>0&15,r[d++]=m>>>4&15,r[d++]=m>>>8&15,r[d++]=m>>>12&15,r[d++]=m>>>16&15,r[d++]=m>>>20&15,r[d++]=m>>>24&15,r[d++]=m>>>28&15,r[d++]=g>>>0&15,r[d++]=g>>>4&15,r[d++]=g>>>8&15,r[d++]=g>>>12&15,r[d++]=g>>>16&15,r[d++]=g>>>20&15,r[d++]=g>>>24&15,r[d]=g>>>28&15;case 5:let y,v,x,b,_,w;return y=i,v=e[t]>>>0,x=e[t+1]>>>0,b=e[t+2]>>>0,_=e[t+3]>>>0,w=e[t+4]>>>0,r[y++]=v>>>0&31,r[y++]=v>>>5&31,r[y++]=v>>>10&31,r[y++]=v>>>15&31,r[y++]=v>>>20&31,r[y++]=v>>>25&31,r[y++]=31&(v>>>30|(7&x)<<2),r[y++]=x>>>3&31,r[y++]=x>>>8&31,r[y++]=x>>>13&31,r[y++]=x>>>18&31,r[y++]=x>>>23&31,r[y++]=31&(x>>>28|(1&b)<<4),r[y++]=b>>>1&31,r[y++]=b>>>6&31,r[y++]=b>>>11&31,r[y++]=b>>>16&31,r[y++]=b>>>21&31,r[y++]=b>>>26&31,r[y++]=31&(b>>>31|(15&_)<<1),r[y++]=_>>>4&31,r[y++]=_>>>9&31,r[y++]=_>>>14&31,r[y++]=_>>>19&31,r[y++]=_>>>24&31,r[y++]=31&(_>>>29|(3&w)<<3),r[y++]=w>>>2&31,r[y++]=w>>>7&31,r[y++]=w>>>12&31,r[y++]=w>>>17&31,r[y++]=w>>>22&31,r[y]=w>>>27&31;case 6:let T,M,k,A,S,E,C;return T=i,M=e[t]>>>0,k=e[t+1]>>>0,A=e[t+2]>>>0,S=e[t+3]>>>0,E=e[t+4]>>>0,C=e[t+5]>>>0,r[T++]=M>>>0&63,r[T++]=M>>>6&63,r[T++]=M>>>12&63,r[T++]=M>>>18&63,r[T++]=M>>>24&63,r[T++]=63&(M>>>30|(15&k)<<2),r[T++]=k>>>4&63,r[T++]=k>>>10&63,r[T++]=k>>>16&63,r[T++]=k>>>22&63,r[T++]=63&(k>>>28|(3&A)<<4),r[T++]=A>>>2&63,r[T++]=A>>>8&63,r[T++]=A>>>14&63,r[T++]=A>>>20&63,r[T++]=A>>>26&63,r[T++]=S>>>0&63,r[T++]=S>>>6&63,r[T++]=S>>>12&63,r[T++]=S>>>18&63,r[T++]=S>>>24&63,r[T++]=63&(S>>>30|(15&E)<<2),r[T++]=E>>>4&63,r[T++]=E>>>10&63,r[T++]=E>>>16&63,r[T++]=E>>>22&63,r[T++]=63&(E>>>28|(3&C)<<4),r[T++]=C>>>2&63,r[T++]=C>>>8&63,r[T++]=C>>>14&63,r[T++]=C>>>20&63,r[T]=C>>>26&63;case 7:let L,P,I,z,D,O,R,F;return L=i,P=e[t]>>>0,I=e[t+1]>>>0,z=e[t+2]>>>0,D=e[t+3]>>>0,O=e[t+4]>>>0,R=e[t+5]>>>0,F=e[t+6]>>>0,r[L++]=P>>>0&127,r[L++]=P>>>7&127,r[L++]=P>>>14&127,r[L++]=P>>>21&127,r[L++]=127&(P>>>28|(7&I)<<4),r[L++]=I>>>3&127,r[L++]=I>>>10&127,r[L++]=I>>>17&127,r[L++]=I>>>24&127,r[L++]=127&(I>>>31|(63&z)<<1),r[L++]=z>>>6&127,r[L++]=z>>>13&127,r[L++]=z>>>20&127,r[L++]=127&(z>>>27|(3&D)<<5),r[L++]=D>>>2&127,r[L++]=D>>>9&127,r[L++]=D>>>16&127,r[L++]=D>>>23&127,r[L++]=127&(D>>>30|(31&O)<<2),r[L++]=O>>>5&127,r[L++]=O>>>12&127,r[L++]=O>>>19&127,r[L++]=127&(O>>>26|(1&R)<<6),r[L++]=R>>>1&127,r[L++]=R>>>8&127,r[L++]=R>>>15&127,r[L++]=R>>>22&127,r[L++]=127&(R>>>29|(15&F)<<3),r[L++]=F>>>4&127,r[L++]=F>>>11&127,r[L++]=F>>>18&127,r[L]=F>>>25&127;case 8:let j,B,N,U,V,q,H,G,W;return j=i,B=e[t]>>>0,N=e[t+1]>>>0,U=e[t+2]>>>0,V=e[t+3]>>>0,q=e[t+4]>>>0,H=e[t+5]>>>0,G=e[t+6]>>>0,W=e[t+7]>>>0,r[j++]=B>>>0&255,r[j++]=B>>>8&255,r[j++]=B>>>16&255,r[j++]=B>>>24&255,r[j++]=N>>>0&255,r[j++]=N>>>8&255,r[j++]=N>>>16&255,r[j++]=N>>>24&255,r[j++]=U>>>0&255,r[j++]=U>>>8&255,r[j++]=U>>>16&255,r[j++]=U>>>24&255,r[j++]=V>>>0&255,r[j++]=V>>>8&255,r[j++]=V>>>16&255,r[j++]=V>>>24&255,r[j++]=q>>>0&255,r[j++]=q>>>8&255,r[j++]=q>>>16&255,r[j++]=q>>>24&255,r[j++]=H>>>0&255,r[j++]=H>>>8&255,r[j++]=H>>>16&255,r[j++]=H>>>24&255,r[j++]=G>>>0&255,r[j++]=G>>>8&255,r[j++]=G>>>16&255,r[j++]=G>>>24&255,r[j++]=W>>>0&255,r[j++]=W>>>8&255,r[j++]=W>>>16&255,r[j]=W>>>24&255;case 9:let Y,Z,$,X,K,J,Q,ee,et,er;return Y=i,Z=e[t]>>>0,$=e[t+1]>>>0,X=e[t+2]>>>0,K=e[t+3]>>>0,J=e[t+4]>>>0,Q=e[t+5]>>>0,ee=e[t+6]>>>0,et=e[t+7]>>>0,er=e[t+8]>>>0,r[Y++]=Z>>>0&511,r[Y++]=Z>>>9&511,r[Y++]=Z>>>18&511,r[Y++]=511&(Z>>>27|(15&$)<<5),r[Y++]=$>>>4&511,r[Y++]=$>>>13&511,r[Y++]=$>>>22&511,r[Y++]=511&($>>>31|(255&X)<<1),r[Y++]=X>>>8&511,r[Y++]=X>>>17&511,r[Y++]=511&(X>>>26|(7&K)<<6),r[Y++]=K>>>3&511,r[Y++]=K>>>12&511,r[Y++]=K>>>21&511,r[Y++]=511&(K>>>30|(127&J)<<2),r[Y++]=J>>>7&511,r[Y++]=J>>>16&511,r[Y++]=511&(J>>>25|(3&Q)<<7),r[Y++]=Q>>>2&511,r[Y++]=Q>>>11&511,r[Y++]=Q>>>20&511,r[Y++]=511&(Q>>>29|(63&ee)<<3),r[Y++]=ee>>>6&511,r[Y++]=ee>>>15&511,r[Y++]=511&(ee>>>24|(1&et)<<8),r[Y++]=et>>>1&511,r[Y++]=et>>>10&511,r[Y++]=et>>>19&511,r[Y++]=511&(et>>>28|(31&er)<<4),r[Y++]=er>>>5&511,r[Y++]=er>>>14&511,r[Y]=er>>>23&511;case 10:let ei,en,ea,eo,es,el,ec,eu,eh,ed,ef;return ei=i,en=e[t]>>>0,ea=e[t+1]>>>0,eo=e[t+2]>>>0,es=e[t+3]>>>0,el=e[t+4]>>>0,ec=e[t+5]>>>0,eu=e[t+6]>>>0,eh=e[t+7]>>>0,ed=e[t+8]>>>0,ef=e[t+9]>>>0,r[ei++]=en>>>0&1023,r[ei++]=en>>>10&1023,r[ei++]=en>>>20&1023,r[ei++]=1023&(en>>>30|(255&ea)<<2),r[ei++]=ea>>>8&1023,r[ei++]=ea>>>18&1023,r[ei++]=1023&(ea>>>28|(63&eo)<<4),r[ei++]=eo>>>6&1023,r[ei++]=eo>>>16&1023,r[ei++]=1023&(eo>>>26|(15&es)<<6),r[ei++]=es>>>4&1023,r[ei++]=es>>>14&1023,r[ei++]=1023&(es>>>24|(3&el)<<8),r[ei++]=el>>>2&1023,r[ei++]=el>>>12&1023,r[ei++]=el>>>22&1023,r[ei++]=ec>>>0&1023,r[ei++]=ec>>>10&1023,r[ei++]=ec>>>20&1023,r[ei++]=1023&(ec>>>30|(255&eu)<<2),r[ei++]=eu>>>8&1023,r[ei++]=eu>>>18&1023,r[ei++]=1023&(eu>>>28|(63&eh)<<4),r[ei++]=eh>>>6&1023,r[ei++]=eh>>>16&1023,r[ei++]=1023&(eh>>>26|(15&ed)<<6),r[ei++]=ed>>>4&1023,r[ei++]=ed>>>14&1023,r[ei++]=1023&(ed>>>24|(3&ef)<<8),r[ei++]=ef>>>2&1023,r[ei++]=ef>>>12&1023,r[ei]=ef>>>22&1023;case 11:let ep,em,eg,ey,ev,ex,eb,e_,ew,eT,eM,ek;return ep=i,em=e[t]>>>0,eg=e[t+1]>>>0,ey=e[t+2]>>>0,ev=e[t+3]>>>0,ex=e[t+4]>>>0,eb=e[t+5]>>>0,e_=e[t+6]>>>0,ew=e[t+7]>>>0,eT=e[t+8]>>>0,eM=e[t+9]>>>0,ek=e[t+10]>>>0,r[ep++]=em>>>0&2047,r[ep++]=em>>>11&2047,r[ep++]=2047&(em>>>22|(1&eg)<<10),r[ep++]=eg>>>1&2047,r[ep++]=eg>>>12&2047,r[ep++]=2047&(eg>>>23|(3&ey)<<9),r[ep++]=ey>>>2&2047,r[ep++]=ey>>>13&2047,r[ep++]=2047&(ey>>>24|(7&ev)<<8),r[ep++]=ev>>>3&2047,r[ep++]=ev>>>14&2047,r[ep++]=2047&(ev>>>25|(15&ex)<<7),r[ep++]=ex>>>4&2047,r[ep++]=ex>>>15&2047,r[ep++]=2047&(ex>>>26|(31&eb)<<6),r[ep++]=eb>>>5&2047,r[ep++]=eb>>>16&2047,r[ep++]=2047&(eb>>>27|(63&e_)<<5),r[ep++]=e_>>>6&2047,r[ep++]=e_>>>17&2047,r[ep++]=2047&(e_>>>28|(127&ew)<<4),r[ep++]=ew>>>7&2047,r[ep++]=ew>>>18&2047,r[ep++]=2047&(ew>>>29|(255&eT)<<3),r[ep++]=eT>>>8&2047,r[ep++]=eT>>>19&2047,r[ep++]=2047&(eT>>>30|(511&eM)<<2),r[ep++]=eM>>>9&2047,r[ep++]=eM>>>20&2047,r[ep++]=2047&(eM>>>31|(1023&ek)<<1),r[ep++]=ek>>>10&2047,r[ep]=ek>>>21&2047;case 12:let eA,eS,eE,eC,eL,eP,eI,ez,eD,eO,eR,eF,ej;return eA=i,eS=e[t]>>>0,eE=e[t+1]>>>0,eC=e[t+2]>>>0,eL=e[t+3]>>>0,eP=e[t+4]>>>0,eI=e[t+5]>>>0,ez=e[t+6]>>>0,eD=e[t+7]>>>0,eO=e[t+8]>>>0,eR=e[t+9]>>>0,eF=e[t+10]>>>0,ej=e[t+11]>>>0,r[eA++]=eS>>>0&4095,r[eA++]=eS>>>12&4095,r[eA++]=4095&(eS>>>24|(15&eE)<<8),r[eA++]=eE>>>4&4095,r[eA++]=eE>>>16&4095,r[eA++]=4095&(eE>>>28|(255&eC)<<4),r[eA++]=eC>>>8&4095,r[eA++]=eC>>>20&4095,r[eA++]=eL>>>0&4095,r[eA++]=eL>>>12&4095,r[eA++]=4095&(eL>>>24|(15&eP)<<8),r[eA++]=eP>>>4&4095,r[eA++]=eP>>>16&4095,r[eA++]=4095&(eP>>>28|(255&eI)<<4),r[eA++]=eI>>>8&4095,r[eA++]=eI>>>20&4095,r[eA++]=ez>>>0&4095,r[eA++]=ez>>>12&4095,r[eA++]=4095&(ez>>>24|(15&eD)<<8),r[eA++]=eD>>>4&4095,r[eA++]=eD>>>16&4095,r[eA++]=4095&(eD>>>28|(255&eO)<<4),r[eA++]=eO>>>8&4095,r[eA++]=eO>>>20&4095,r[eA++]=eR>>>0&4095,r[eA++]=eR>>>12&4095,r[eA++]=4095&(eR>>>24|(15&eF)<<8),r[eA++]=eF>>>4&4095,r[eA++]=eF>>>16&4095,r[eA++]=4095&(eF>>>28|(255&ej)<<4),r[eA++]=ej>>>8&4095,r[eA]=ej>>>20&4095;case 16:let eB,eN,eU,eV,eq,eH,eG,eW,eY,eZ,e$,eX,eK,eJ,eQ,e0,e1;return eB=i,eN=e[t]>>>0,eU=e[t+1]>>>0,eV=e[t+2]>>>0,eq=e[t+3]>>>0,eH=e[t+4]>>>0,eG=e[t+5]>>>0,eW=e[t+6]>>>0,eY=e[t+7]>>>0,eZ=e[t+8]>>>0,e$=e[t+9]>>>0,eX=e[t+10]>>>0,eK=e[t+11]>>>0,eJ=e[t+12]>>>0,eQ=e[t+13]>>>0,e0=e[t+14]>>>0,e1=e[t+15]>>>0,r[eB++]=eN>>>0&65535,r[eB++]=eN>>>16&65535,r[eB++]=eU>>>0&65535,r[eB++]=eU>>>16&65535,r[eB++]=eV>>>0&65535,r[eB++]=eV>>>16&65535,r[eB++]=eq>>>0&65535,r[eB++]=eq>>>16&65535,r[eB++]=eH>>>0&65535,r[eB++]=eH>>>16&65535,r[eB++]=eG>>>0&65535,r[eB++]=eG>>>16&65535,r[eB++]=eW>>>0&65535,r[eB++]=eW>>>16&65535,r[eB++]=eY>>>0&65535,r[eB++]=eY>>>16&65535,r[eB++]=eZ>>>0&65535,r[eB++]=eZ>>>16&65535,r[eB++]=e$>>>0&65535,r[eB++]=e$>>>16&65535,r[eB++]=eX>>>0&65535,r[eB++]=eX>>>16&65535,r[eB++]=eK>>>0&65535,r[eB++]=eK>>>16&65535,r[eB++]=eJ>>>0&65535,r[eB++]=eJ>>>16&65535,r[eB++]=eQ>>>0&65535,r[eB++]=eQ>>>16&65535,r[eB++]=e0>>>0&65535,r[eB++]=e0>>>16&65535,r[eB++]=e1>>>0&65535,r[eB]=e1>>>16&65535;case 32:for(let n=0;n<32;n=n+1|0)r[i+n|0]=0|e[t+n|0];return}let e2=cU[n]>>>0,e3=t,e5=0,e4=e[e3]>>>0;for(let t=0;t<32;t++)if(e5+n<=32)r[i+t]=e4>>>e5&e2,32===(e5+=n)&&(e5=0,e3++,31!==t&&(e4=e[e3]>>>0));else{let a=32-e5,o=e4>>>e5;e4=e[++e3]>>>0,r[i+t]=(o|(e4&cU[n-a]>>>0)<>>5)|0,r.exceptionSizes[o]=s}return t}(e,d,a);return a.dataPointers.fill(0),function(e,t,r,i,n,a,o,s,l,c){let u=0|r,h=0;for(let t=0;tt)throw Error(`FastPFOR decode: byteContainer underflow at block=${i} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${r}, byteSize=${t})`);let n=e[r++],a=e[r++];if(n>32)throw Error(`FastPFOR decode: invalid bitWidth=${n} at block=${i} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:n,exceptionCount:a,bytePosIn:r}}(s,l,h,t);h=r.bytePosIn;let i=r.bitWidth,o=r.exceptionCount,d=a+256*t|0;switch(i){case 0:n.fill(0,d,d+256);break;case 32:for(let t=0;t<256;t=t+1|0)n[d+t|0]=0|e[u+t|0];u=u+256|0;break;default:u=function(e,t,r,i,n){switch(n){case 1:let a=i,o=t;for(let t=0;t<8;t++){let t=e[o++]>>>0;r[a++]=t>>>0&1,r[a++]=t>>>1&1,r[a++]=t>>>2&1,r[a++]=t>>>3&1,r[a++]=t>>>4&1,r[a++]=t>>>5&1,r[a++]=t>>>6&1,r[a++]=t>>>7&1,r[a++]=t>>>8&1,r[a++]=t>>>9&1,r[a++]=t>>>10&1,r[a++]=t>>>11&1,r[a++]=t>>>12&1,r[a++]=t>>>13&1,r[a++]=t>>>14&1,r[a++]=t>>>15&1,r[a++]=t>>>16&1,r[a++]=t>>>17&1,r[a++]=t>>>18&1,r[a++]=t>>>19&1,r[a++]=t>>>20&1,r[a++]=t>>>21&1,r[a++]=t>>>22&1,r[a++]=t>>>23&1,r[a++]=t>>>24&1,r[a++]=t>>>25&1,r[a++]=t>>>26&1,r[a++]=t>>>27&1,r[a++]=t>>>28&1,r[a++]=t>>>29&1,r[a++]=t>>>30&1,r[a++]=t>>>31&1}break;case 2:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0;r[n++]=t>>>0&3,r[n++]=t>>>2&3,r[n++]=t>>>4&3,r[n++]=t>>>6&3,r[n++]=t>>>8&3,r[n++]=t>>>10&3,r[n++]=t>>>12&3,r[n++]=t>>>14&3,r[n++]=t>>>16&3,r[n++]=t>>>18&3,r[n++]=t>>>20&3,r[n++]=t>>>22&3,r[n++]=t>>>24&3,r[n++]=t>>>26&3,r[n++]=t>>>28&3,r[n++]=t>>>30&3,r[n++]=i>>>0&3,r[n++]=i>>>2&3,r[n++]=i>>>4&3,r[n++]=i>>>6&3,r[n++]=i>>>8&3,r[n++]=i>>>10&3,r[n++]=i>>>12&3,r[n++]=i>>>14&3,r[n++]=i>>>16&3,r[n++]=i>>>18&3,r[n++]=i>>>20&3,r[n++]=i>>>22&3,r[n++]=i>>>24&3,r[n++]=i>>>26&3,r[n++]=i>>>28&3,r[n++]=i>>>30&3}}(e,t,r,i);break;case 3:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0;r[n++]=t>>>0&7,r[n++]=t>>>3&7,r[n++]=t>>>6&7,r[n++]=t>>>9&7,r[n++]=t>>>12&7,r[n++]=t>>>15&7,r[n++]=t>>>18&7,r[n++]=t>>>21&7,r[n++]=t>>>24&7,r[n++]=t>>>27&7,r[n++]=7&(t>>>30|(1&i)<<2),r[n++]=i>>>1&7,r[n++]=i>>>4&7,r[n++]=i>>>7&7,r[n++]=i>>>10&7,r[n++]=i>>>13&7,r[n++]=i>>>16&7,r[n++]=i>>>19&7,r[n++]=i>>>22&7,r[n++]=i>>>25&7,r[n++]=i>>>28&7,r[n++]=7&(i>>>31|(3&o)<<1),r[n++]=o>>>2&7,r[n++]=o>>>5&7,r[n++]=o>>>8&7,r[n++]=o>>>11&7,r[n++]=o>>>14&7,r[n++]=o>>>17&7,r[n++]=o>>>20&7,r[n++]=o>>>23&7,r[n++]=o>>>26&7,r[n++]=o>>>29&7}}(e,t,r,i);break;case 4:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0;r[n++]=t>>>0&15,r[n++]=t>>>4&15,r[n++]=t>>>8&15,r[n++]=t>>>12&15,r[n++]=t>>>16&15,r[n++]=t>>>20&15,r[n++]=t>>>24&15,r[n++]=t>>>28&15,r[n++]=i>>>0&15,r[n++]=i>>>4&15,r[n++]=i>>>8&15,r[n++]=i>>>12&15,r[n++]=i>>>16&15,r[n++]=i>>>20&15,r[n++]=i>>>24&15,r[n++]=i>>>28&15,r[n++]=o>>>0&15,r[n++]=o>>>4&15,r[n++]=o>>>8&15,r[n++]=o>>>12&15,r[n++]=o>>>16&15,r[n++]=o>>>20&15,r[n++]=o>>>24&15,r[n++]=o>>>28&15,r[n++]=s>>>0&15,r[n++]=s>>>4&15,r[n++]=s>>>8&15,r[n++]=s>>>12&15,r[n++]=s>>>16&15,r[n++]=s>>>20&15,r[n++]=s>>>24&15,r[n++]=s>>>28&15}}(e,t,r,i);break;case 5:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0;r[n++]=t>>>0&31,r[n++]=t>>>5&31,r[n++]=t>>>10&31,r[n++]=t>>>15&31,r[n++]=t>>>20&31,r[n++]=t>>>25&31,r[n++]=31&(t>>>30|(7&i)<<2),r[n++]=i>>>3&31,r[n++]=i>>>8&31,r[n++]=i>>>13&31,r[n++]=i>>>18&31,r[n++]=i>>>23&31,r[n++]=31&(i>>>28|(1&o)<<4),r[n++]=o>>>1&31,r[n++]=o>>>6&31,r[n++]=o>>>11&31,r[n++]=o>>>16&31,r[n++]=o>>>21&31,r[n++]=o>>>26&31,r[n++]=31&(o>>>31|(15&s)<<1),r[n++]=s>>>4&31,r[n++]=s>>>9&31,r[n++]=s>>>14&31,r[n++]=s>>>19&31,r[n++]=s>>>24&31,r[n++]=31&(s>>>29|(3&l)<<3),r[n++]=l>>>2&31,r[n++]=l>>>7&31,r[n++]=l>>>12&31,r[n++]=l>>>17&31,r[n++]=l>>>22&31,r[n++]=l>>>27&31}}(e,t,r,i);break;case 6:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,c=e[a++]>>>0;r[n++]=t>>>0&63,r[n++]=t>>>6&63,r[n++]=t>>>12&63,r[n++]=t>>>18&63,r[n++]=t>>>24&63,r[n++]=63&(t>>>30|(15&i)<<2),r[n++]=i>>>4&63,r[n++]=i>>>10&63,r[n++]=i>>>16&63,r[n++]=i>>>22&63,r[n++]=63&(i>>>28|(3&o)<<4),r[n++]=o>>>2&63,r[n++]=o>>>8&63,r[n++]=o>>>14&63,r[n++]=o>>>20&63,r[n++]=o>>>26&63,r[n++]=s>>>0&63,r[n++]=s>>>6&63,r[n++]=s>>>12&63,r[n++]=s>>>18&63,r[n++]=s>>>24&63,r[n++]=63&(s>>>30|(15&l)<<2),r[n++]=l>>>4&63,r[n++]=l>>>10&63,r[n++]=l>>>16&63,r[n++]=l>>>22&63,r[n++]=63&(l>>>28|(3&c)<<4),r[n++]=c>>>2&63,r[n++]=c>>>8&63,r[n++]=c>>>14&63,r[n++]=c>>>20&63,r[n++]=c>>>26&63}}(e,t,r,i);break;case 7:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,c=e[a++]>>>0,u=e[a++]>>>0;r[n++]=t>>>0&127,r[n++]=t>>>7&127,r[n++]=t>>>14&127,r[n++]=t>>>21&127,r[n++]=127&(t>>>28|(7&i)<<4),r[n++]=i>>>3&127,r[n++]=i>>>10&127,r[n++]=i>>>17&127,r[n++]=i>>>24&127,r[n++]=127&(i>>>31|(63&o)<<1),r[n++]=o>>>6&127,r[n++]=o>>>13&127,r[n++]=o>>>20&127,r[n++]=127&(o>>>27|(3&s)<<5),r[n++]=s>>>2&127,r[n++]=s>>>9&127,r[n++]=s>>>16&127,r[n++]=s>>>23&127,r[n++]=127&(s>>>30|(31&l)<<2),r[n++]=l>>>5&127,r[n++]=l>>>12&127,r[n++]=l>>>19&127,r[n++]=127&(l>>>26|(1&c)<<6),r[n++]=c>>>1&127,r[n++]=c>>>8&127,r[n++]=c>>>15&127,r[n++]=c>>>22&127,r[n++]=127&(c>>>29|(15&u)<<3),r[n++]=u>>>4&127,r[n++]=u>>>11&127,r[n++]=u>>>18&127,r[n++]=u>>>25&127}}(e,t,r,i);break;case 8:!function(e,t,r,i){let n=i,a=t;for(let t=0;t<8;t++){let t=e[a++]>>>0,i=e[a++]>>>0,o=e[a++]>>>0,s=e[a++]>>>0,l=e[a++]>>>0,c=e[a++]>>>0,u=e[a++]>>>0,h=e[a++]>>>0;r[n++]=t>>>0&255,r[n++]=t>>>8&255,r[n++]=t>>>16&255,r[n++]=t>>>24&255,r[n++]=i>>>0&255,r[n++]=i>>>8&255,r[n++]=i>>>16&255,r[n++]=i>>>24&255,r[n++]=o>>>0&255,r[n++]=o>>>8&255,r[n++]=o>>>16&255,r[n++]=o>>>24&255,r[n++]=s>>>0&255,r[n++]=s>>>8&255,r[n++]=s>>>16&255,r[n++]=s>>>24&255,r[n++]=l>>>0&255,r[n++]=l>>>8&255,r[n++]=l>>>16&255,r[n++]=l>>>24&255,r[n++]=c>>>0&255,r[n++]=c>>>8&255,r[n++]=c>>>16&255,r[n++]=c>>>24&255,r[n++]=u>>>0&255,r[n++]=u>>>8&255,r[n++]=u>>>16&255,r[n++]=u>>>24&255,r[n++]=h>>>0&255,r[n++]=h>>>8&255,r[n++]=h>>>16&255,r[n++]=h>>>24&255}}(e,t,r,i);break;case 16:let s=i,l=t;for(let t=0;t<128;t++){let t=e[l++]>>>0;r[s++]=65535&t,r[s++]=t>>>16&65535}break;default:!function(e,t,r,i,n){let a=cU[n]>>>0,o=t,s=0,l=e[o]>>>0,c=i;for(let t=0;t<8;t++){for(let t=0;t<32;t++)if(s+n<=32)r[c+t]=l>>>s&a,32===(s+=n)&&(s=0,o++,31!==t&&(l=e[o]>>>0));else{let i=32-s,u=l>>>s;l=e[++o]>>>0;let h=n-i;r[c+t]=(u|(l&-1>>>32-h>>>0)<>>0)}}(e,t,r,i,n)}return t+(n<<3)|0}(e,u,n,d,i)}o>0&&(h=function(e,t,r,i,n,a,o,s,l){let{maxBits:c,exceptionBitWidth:u,bytePosIn:h}=function(e,t,r,i,n,a){if(r+1>t)throw Error(`FastPFOR decode: exception header underflow at block=${a} (need 1 byte for maxBits, bytePos=${r}, byteSize=${t})`);let o=e[r++];if(o32)throw Error(`FastPFOR decode: invalid maxBits=${o} at block=${a} (bitWidth=${i}, expected ${i}..32)`);let s=o-i|0;if(s<1||s>32)throw Error(`FastPFOR decode: invalid exceptionBitWidth=${s} at block=${a} (bitWidth=${i}, maxBits=${o})`);if(r+n>t)throw Error(`FastPFOR decode: exception positions underflow at block=${a} (need=${n}, have=${t-r})`);return{maxBits:o,exceptionBitWidth:s,bytePosIn:r}}(n,a,o,r,i,l);if(o=h,1===u){let a=1<m)throw Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${u} (ptr=${p}, need ${i}, size=${m}) at block ${l}`);for(let a=0;a>>o&255;if(o+=8,s+=o>>>5,o&=31,h|=(127&t)<28)throw Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${d}, partial=${h}, decoded=${c-n}/${a}, inPos=${s}, inEnd=${l})`)}if(c!==u)throw Error(`FastPFOR VByte: truncated stream (decoded=${c-n}, expected=${a}, consumedWords=${s-t}/${r}, vbyteStart=${t}, vbyteEnd=${l})`)}(e,i,e.length-i|0,a,n,t-n|0),a}(s.subarray(0,o),t,n.decoderWorkspace);return i.add(r),l}(e,n,a=r.byteLength,t,function(e=16){if(e<0)throw RangeError(`initialEncodedWordCapacity must be >= 0, got ${e}`);return{encodedWords:new Uint32Array(Math.max(16,0|e)),decoderWorkspace:cH()}}(a>>>2));case j.VARINT:return cG(e,t,r.numValues);case j.NONE:{let i=t.get();return t.add(r.byteLength),new Uint32Array(e.subarray(i,t.get()))}default:throw Error(`Specified physicalLevelTechnique ${i} is not supported (yet).`)}}function c9(e,t,r){let i=c7(e,t,r);return 1===i.length?i[0]:i[1]}function ue(e,t,r){var i=c7(e,t,r);if(2===i.length){let e=cY(i[1]);return[e,e]}return[cY(i[2]),cY(i[3])]}function ut(e,t,r){var i=cW(e,t,r.numValues);if(2===i.length){let e=cZ(i[1]);return[e,e]}return[cZ(i[2]),cZ(i[3])]}function ur(e,t,r,i){let n;var a=cW(e,t,r.numValues);switch(r.logicalLevelTechnique1){case F.DELTA:n=function(e){let t=new BigUint64Array(e.length);t[0]=BigInt.asUintN(64,cZ(e[0]));for(let r=1;r>1,t)-r}}function ul(e,t){let r=0;for(let i=0;i>i;return r}function uc(e,t,r,i,n,a,o){return e===W.MORTON?function(e,t,r,i,n,a){let o=Array(n?i+1:i);for(let n=0;n[e]),r+=e,i+=e}break;case H.LINESTRING:{let c,y;m?(c=d[i]-d[i-1],i++):c=h[r]-h[r-1],r++,p?(y=uu(g,o,c,!1),o+=2*c):(y=uc(e.vertexBufferType,g,f,s,c,!1,l),s+=c),t[a++]=[y],u&&n++}break;case H.POLYGON:{let c=h[r]-h[r-1];r++;let m=Array(c-1),y,v=d[i]-d[i-1];if(i++,p){y=uu(g,o,v,!0),o+=2*v;for(let e=0;e0&&t.push(t[0]),u.push(t)}e[t]=u,n&&l++}break;case H.MULTIPOLYGON:{let c=n[l]-n[l-1];l++;let u=[];for(let e=0;e0&&t.push(t[0]),u.push(t)}}e[t]=u}}return e}[Symbol.iterator](){return null}}class um extends up{constructor(e,t,r,i,n,a){super(r,i,n,a),this._numGeometries=e,this._geometryType=t}geometryType(e){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}class ug extends up{constructor(e,t,r,i,n){super(t,r,i,n),this._geometryTypes=e}geometryType(e){return this._geometryTypes[e]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function uy(e,t,r){let i=new Uint32Array(e.length+1),n=0;i[0]=n;let a=0;for(let o=0;or?t[a++]:1);return i}function uv(e,t,r,i){let n=new Uint32Array(t[t.length-1]+1),a=0;n[0]=a;let o=1,s=0;for(let l=0;l=o);){let r=e[i.increment()];if(r<=127){let o=r+3,s=e[i.increment()],l=Math.min(a+o,t);n.fill(s,a,l),a=l}else{let o=256-r;for(let r=0;r=12?uT.decode(e.subarray(t,r)):function(e,t,r){let i="",n=t;for(;n239?4:t>223?3:t>191?2:1;if(n+c>r)break;1===c?t<128&&(l=t):2===c?(192&(a=e[n+1]))==128&&(l=(31&t)<<6|63&a)<=127&&(l=null):3===c?(a=e[n+1],o=e[n+2],(192&a)==128&&(192&o)==128&&((l=(15&t)<<12|(63&a)<<6|63&o)<=2047||l>=55296&&l<=57343)&&(l=null)):4===c&&(a=e[n+1],o=e[n+2],s=e[n+3],(192&a)==128&&(192&o)==128&&(192&s)==128&&((l=(15&t)<<18|(63&a)<<12|(63&o)<<6|63&s)<=65535||l>=1114112)&&(l=null)),null===l?(l=65533,c=1):l>65535&&(l-=65536,i+=String.fromCharCode(l>>>10&1023|55296),l=56320|1023&l),i+=String.fromCharCode(l),n+=c}return i}(e,t,r)}class uk extends cI{constructor(e,t,r,i){super(e,r,i),this.offsetBuffer=t}}class uA extends uk{constructor(e,t,r,i){super(e,t,r,i??t.length-1)}getValueFromBuffer(e){return uM(this.dataBuffer,this.offsetBuffer[e],this.offsetBuffer[e+1])}}class uS extends uk{constructor(e,t,r,i,n){super(e,r,i,n??t.length),this.indexBuffer=t,this.indexBuffer=t}getValueFromBuffer(e){let t=this.indexBuffer[e];return uM(this.dataBuffer,this.offsetBuffer[t],this.offsetBuffer[t+1])}}class uE extends uk{constructor(e,t,r,i,n,a,o){super(e,r,i,o),this.indexBuffer=t,this.symbolOffsetBuffer=n,this.symbolTableBuffer=a}getValueFromBuffer(e){null==this.decodedDictionary&&(null==this.symbolLengthBuffer&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(e,t,r){let i=[],n=Array(t.length).fill(0);for(let e=1;e>>0,s=n.get()+o;if(s>e.length)throw Error(`Block overruns tile: ${s} > ${e.length}`);if(cG(e,n,1)[0]>>>0!=1){n.set(s);continue}let[l,c]=function(e,t){let r={featureTables:[]},i={};i.name=uI(e,t);let n=cG(e,t,1)[0]>>>0,a=cG(e,t,1)[0]>>>0;i.columns=Array(a);for(let r=0;r>>0,i=uL(r);if(!i)throw Error(`Unsupported column type code ${r}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(r>=10?i.name=uI(e,t):r>=0&&r<=3?i.name="id":4===r&&(i.name="geometry"),30===r){let r=cG(e,t,1)[0]>>>0,n=i.complexType;n.children=Array(r);for(let i=0;i>>0;if(i<10||i>30)throw Error(`Unsupported field type code ${i}. Supported: 10-29(scalars), 30(STRUCT)`);let n=uL(i);if(i>=10&&(n.name=uI(t,r)),30===i){let i=cG(t,r,1)[0]>>>0;n.complexType.children=Array(i);for(let a=0;a>4,n<128||(n=t[r.get()],r.increment(),i|=(127&n)<<3,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<10,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<17,n<128)||(n=t[r.get()],r.increment(),i|=(127&n)<<24,n<128)||(n=t[r.get()],r.increment(),i|=(1&n)<<31,n<128))return 0x100000000*i+(e>>>0);throw Error("Expected varint not more than 10 bytes")}(r|=(15&(i=e[t.get()]))<<28,e,t))))}(e,t);return i}(e,t,r.numValues);switch(r.logicalLevelTechnique1){case F.DELTA:return r.logicalLevelTechnique2===F.RLE&&(i=cJ(i,r.runs,r.numRleValues)),function(e){e[0]=c$(e[0]);let t=e.length/4*4,r=1;if(t>=4)for(;rObject.assign(Object.assign({},e),{[t.name]:new uD(t)}),{})}}class uR{constructor(e,t){this.feature=e,this.type=e.type,this.properties=e.tags?e.tags:{},this.extent=t,"id"in e&&("string"==typeof e.id?this.id=parseInt(e.id,10):"number"!=typeof e.id||isNaN(e.id)||(this.id=e.id))}loadGeometry(){let e=[];for(let t of 1===this.feature.type?[this.feature.geometry]:this.feature.geometry){let r=[];for(let e of t)r.push(new w(e[0],e[1]));e.push(r)}return e}}let uF="_geojsonTileLayer";function uj(e,t){if(!e.feature)return;let r=e.feature;void 0!==r.id&&t.writeVarintField(1,r.id),t.writeMessage(2,uB,e),t.writeVarintField(3,r.type),t.writeMessage(4,uN,r)}function uB(e,t){var r;for(let i in null==(r=e.feature)?void 0:r.properties){let r=e.feature.properties[i],n=e.keycache[i];if(null==r)continue;void 0===n&&(e.keys.push(i),n=e.keys.length-1,e.keycache[i]=n),t.writeVarint(n),"string"!=typeof r&&"boolean"!=typeof r&&"number"!=typeof r&&(r=e.jsonPrefix+JSON.stringify(r));let a=typeof r+":"+r,o=e.valuecache[a];void 0===o&&(e.values.push(r),o=e.values.length-1,e.valuecache[a]=o),t.writeVarint(o)}}function uN(e,t){let r=e.loadGeometry(),i=e.type,n=0,a=0;for(let o of r){let r=1;1===i&&(r=o.length),t.writeVarint((r<<3)+1);let s=3===i?o.length-1:o.length;for(let e=0;e>31),t.writeVarint(l<<1^l>>31),n+=r,a+=l}3===e.type&&t.writeVarint(15)}}function uU(e,t){let r=typeof e;"string"===r?t.writeStringField(1,e):"boolean"===r?t.writeBooleanField(7,e):"number"===r&&(e%1!=0?t.writeDoubleField(3,e):e<0?t.writeSVarintField(6,e):t.writeVarintField(5,e))}class uV{constructor(e,t){this.tileID=e,this.x=e.canonical.x,this.y=e.canonical.y,this.z=e.canonical.z,this.grid=new nw(8192,16,0),this.grid3D=new nw(8192,16,0),this.featureIndexArray=new aj,this.promoteId=t}insert(e,t,r,i,n,a){let o=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(r,i,n);let s=a?this.grid3D:this.grid;for(let e of t){let t=[1/0,1/0,-1/0,-1/0];for(let r of e)t[0]=Math.min(t[0],r.x),t[1]=Math.min(t[1],r.y),t[2]=Math.max(t[2],r.x),t[3]=Math.max(t[3],r.y);t[0]<8192&&t[1]<8192&&t[2]>=0&&t[3]>=0&&s.insert(o,t[0],t[1],t[2],t[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers="mlt"!==this.encoding?new sO(new lU(this.rawTileData)).layers:new uO(this.rawTileData).layers,this.sourceLayerCoder=new cL(this.vtLayers?Object.keys(this.vtLayers).sort():[uF])),this.vtLayers}query(e,t,r,i){this.loadVTLayers();let n=e.params,a=8192/e.tileSize/e.scale,o=iV(n.filter,n.globalState),s=e.queryGeometry,l=e.queryPadding*a,c=cC.fromPoints(s),u=this.grid.query(c.minX-l,c.minY-l,c.maxX+l,c.maxY+l),h=cC.fromPoints(e.cameraQueryGeometry).expandBy(l);for(let t of this.grid3D.query(h.minX,h.minY,h.maxX,h.maxY,(t,r,i,n)=>(function(e,t,r,i,n){for(let a of e)if(t<=a.x&&r<=a.y&&i>=a.x&&n>=a.y)return!0;let a=[new w(t,r),new w(t,n),new w(i,n),new w(i,r)];if(e.length>2){for(let t of a)if(oI(e,t))return!0}for(let t=0;tn.x&&t.x>n.x||e.yn.y&&t.y>n.y)return!1;let a=eS(e,t,r[0]);return a!==eS(e,t,r[1])||a!==eS(e,t,r[2])||a!==eS(e,t,r[3])}(e[t],e[t+1],a))return!0;return!1})(e.cameraQueryGeometry,t-l,r-l,i+l,n+l)))u.push(t);u.sort(uH);let d={},f;for(let l of u){if(l===f)continue;f=l;let c=this.featureIndexArray.get(l),u=null;this.loadMatchingFeature(d,c.bucketIndex,c.sourceLayerIndex,c.featureIndex,o,n.layers,n.availableImages,t,r,i,(t,r,i)=>(u||(u=ow(t)),r.queryIntersectsFeature({queryGeometry:s,feature:t,featureState:i,geometry:u,zoom:this.z,transform:e.transform,pixelsToTileUnits:a,pixelPosMatrix:e.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:e.getElevation})))}return d}loadMatchingFeature(e,t,r,i,n,a,o,s,l,c,u){let h=this.bucketLayerIDs[t];if(a&&!h.some(e=>a.has(e)))return;let d=this.sourceLayerCoder.decode(r),f=this.vtLayers[d].feature(i);if(n.needGeometry){let e=oT(f,!0);if(!n.filter(new nN(this.tileID.overscaledZ),e,this.tileID.canonical))return}else if(!n.filter(new nN(this.tileID.overscaledZ),f))return;let p=this.getId(f,d);for(let t of h){if(a&&!a.has(t))continue;let r=s[t];if(!r)continue;let n={};p&&c&&(n=c.getState(r.sourceLayer||uF,p));let h=eb({},l[t]);h.paint=uq(h.paint,r.paint,f,n,o),h.layout=uq(h.layout,r.layout,f,n,o);let d=!u||u(f,r,n);if(!d)continue;let m=new cP(f,this.z,this.x,this.y,p);m.layer=h;let g=e[t];void 0===g&&(g=e[t]=[]),g.push({featureIndex:i,feature:m,intersectionZ:d})}}lookupSymbolFeatures(e,t,r,i,n,a,o,s){let l={};this.loadVTLayers();let c=iV(n.filterSpec,n.globalState);for(let n of e)this.loadMatchingFeature(l,r,i,n,c,a,o,s,t);return l}hasLayer(e){for(let t of this.bucketLayerIDs)for(let r of t)if(e===r)return!0;return!1}getId(e,t){var r;let i=e.id;return this.promoteId&&("boolean"==typeof(i=e.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[t]])&&(i=Number(i)),void 0===i&&null!=(r=e.properties)&&r.cluster&&this.promoteId&&(i=Number(e.properties.cluster_id))),i}}function uq(e,t,r,i,n){return ew(e,(e,a)=>{let o=t instanceof nX?t.get(a):null;return o?.evaluate?o.evaluate(r,i,n):o})}function uH(e,t){return t-e}function uG(e,t,r,i,n){let a=[];for(let o of e){let e;for(let s=0;s=i&&c.x>=i||(l.x>=i?l=new w(i,l.y+(i-l.x)/(c.x-l.x)*(c.y-l.y))._round():c.x>=i&&(c=new w(i,l.y+(i-l.x)/(c.x-l.x)*(c.y-l.y))._round()),l.y>=n&&c.y>=n||(l.y>=n?l=new w(l.x+(n-l.y)/(c.y-l.y)*(c.x-l.x),n)._round():c.y>=n&&(c=new w(l.x+(n-l.y)/(c.y-l.y)*(c.x-l.x),n)._round()),e&&l.equals(e[e.length-1])||(e=[l],a.push(e)),e.push(c)))))}}return a}function uW(e,t,r,i,n){switch(t){case 1:let a=[];for(let t of e)for(let e of t){let t=0===n?e.x:e.y;t>=r&&t<=i&&a.push([e])}return a;case 2:return uY(e,r,i,n,!1);case 3:return uY(e,r,i,n,!0)}return[]}function uY(e,t,r,i,n){let a=[];for(let o of e){let e=function(e,t,r,i,n){let a=0===i?uZ:u$,o=[],s=[];for(let l=0;lt&&o.push(a(c,u,t)):h>r?d=t&&(o.push(a(c,u,t)),f=!0),d>r&&h<=r&&(o.push(a(c,u,r)),f=!0),!n&&f&&(s.push(o),o=[])}let l=e.length-1,c=0===i?e[l].x:e[l].y;return c>=t&&c<=r&&o.push(e[l]),n&&o.length>0&&!o[0].equals(o[o.length-1])&&o.push(new w(o[0].x,o[0].y)),o.length>0&&s.push(o),s}(o,t,r,i,n);e.length>0&&a.push(...e)}return a}function uZ(e,t,r){return new w(r,e.y+(r-e.x)/(t.x-e.x)*(t.y-e.y))}function u$(e,t,r){return new w(e.x+(r-e.y)/(t.y-e.y)*(t.x-e.x),r)}nM("FeatureIndex",uV,{omit:["rawTileData","sourceLayerCoder"]});class uX extends w{constructor(e,t,r,i){super(e,t),this.angle=r,void 0!==i&&(this.segment=i)}clone(){return new uX(this.x,this.y,this.angle,this.segment)}}function uK(e,t,r,i,n){if(void 0===t.segment||0===r)return!0;let a=t,o=t.segment+1,s=0;for(;s>-r/2;){if(--o<0)return!1;s-=e[o].dist(a),a=e[o]}s+=e[o].dist(e[o+1]),o++;let l=[],c=0;for(;si;)c-=l.shift().angleDelta;if(c>n)return!1;o++,s+=t.dist(r)}return!0}function uJ(e){let t=0;for(let r=0;re+t[1]-t[0],f=u.reduce(d,0),p=h.reduce(d,0),m=s-f,g=l-p,y=0,v=f,x=0,b=p,_=0,T=m,M=0,k=g;if(a.content&&i){let t=a.content,r=t[2]-t[0],i=t[3]-t[1];(a.textFitWidth||a.textFitHeight)&&(c=l8(e)),y=u1(u,0,t[0]),x=u1(h,0,t[1]),v=u1(u,t[0],t[2]),b=u1(h,t[1],t[3]),_=t[0]-y,M=t[1]-x,T=r-v,k=i-b}let A=c.x1,S=c.y1,E=c.x2-A,C=c.y2-S,L=(e,i,n,s)=>{var l,c,u,h,d,m,g,L,P,I,z,D,O,R,F,j;let B=(l=e.stretch-y,l/v*E+A),N=(c=e.fixed-_,u=T,h=e.stretch,c-u*h/f),U=(d=i.stretch-x,d/b*C+S),V=(m=i.fixed-M,g=k,L=i.stretch,m-g*L/p),q=(P=n.stretch-y,P/v*E+A),H=(I=n.fixed-_,z=T,D=n.stretch,I-z*D/f),G=(O=s.stretch-x,O/b*C+S),W=(R=s.fixed-M,F=k,j=s.stretch,R-F*j/p),Y=new w(B,U),Z=new w(q,U),$=new w(q,G),X=new w(B,G),K=new w(N/o,V/o),J=new w(H/o,W/o),Q=t*Math.PI/180;if(Q){let e=Math.sin(Q),t=Math.cos(Q),r=[t,-e,e,t];Y._matMult(r),Z._matMult(r),X._matMult(r),$._matMult(r)}let ee=e.stretch+e.fixed,et=i.stretch+i.fixed;return{tl:Y,tr:Z,bl:X,br:$,tex:{x:a.paddedRect.x+1+ee,y:a.paddedRect.y+1+et,w:n.stretch+n.fixed-ee,h:s.stretch+s.fixed-et},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:K,pixelOffsetBR:J,minFontScaleX:T/o/E,minFontScaleY:k/o/C,isSDF:r}};if(i&&(a.stretchX||a.stretchY)){let e=u2(u,m,f),t=u2(h,g,p);for(let r=0;r0&&(i=Math.max(10,i),this.circleDiameter=i)}else{let l=null!=(u=a.image)&&u.content&&(a.image.textFitWidth||a.image.textFitHeight)?l8(a):{x1:a.left,y1:a.top,x2:a.right,y2:a.bottom};l.y1=l.y1*o-s[0],l.y2=l.y2*o+s[2],l.x1=l.x1*o-s[3],l.x2=l.x2*o+s[1];let h=a.collisionPadding;if(h&&(l.x1-=h[0]*o,l.y1-=h[1]*o,l.x2+=h[2]*o,l.y2+=h[3]*o),c){let e=new w(l.x1,l.y1),t=new w(l.x2,l.y1),r=new w(l.x1,l.y2),i=new w(l.x2,l.y2),n=c*Math.PI/180;e._rotate(n),t._rotate(n),r._rotate(n),i._rotate(n),l.x1=Math.min(e.x,t.x,r.x,i.x),l.x2=Math.max(e.x,t.x,r.x,i.x),l.y1=Math.min(e.y,t.y,r.y,i.y),l.y2=Math.max(e.y,t.y,r.y,i.y)}e.emplaceBack(t.x,t.y,l.x1,l.y1,l.x2,l.y2,r,i,n)}this.boxEndIndex=e.length}}class u5{constructor(e=[],t=(e,t)=>et)){if(this.data=e,this.length=this.data.length,this.compare=t,this.length>0)for(let e=(this.length>>1)-1;e>=0;e--)this._down(e)}push(e){this.data.push(e),this._up(this.length++)}pop(){if(0===this.length)return;let e=this.data[0],t=this.data.pop();return--this.length>0&&(this.data[0]=t,this._down(0)),e}peek(){return this.data[0]}_up(e){let{data:t,compare:r}=this,i=t[e];for(;e>0;){let n=e-1>>1,a=t[n];if(r(i,a)>=0)break;t[e]=a,e=n}t[e]=i}_down(e){let{data:t,compare:r}=this,i=this.length>>1,n=t[e];for(;er(t[a],t[i])&&(i=a),r(t[i],n)>=0)break;t[e]=t[i],e=i}t[e]=n}}function u4(e,t){return t.max-e.max}class u6{constructor(e,t,r,i){this.p=new w(e,t),this.h=r,this.d=function(e,t){let r=!1,i=1/0;for(let n of t)for(let t=0,a=n.length,o=a-1;te.y!=s.y>e.y&&e.x<(s.x-a.x)*(e.y-a.y)/(s.y-a.y)+a.x&&(r=!r),i=Math.min(i,oL(e,a,s))}return(r?1:-1)*Math.sqrt(i)}(this.p,i),this.max=this.d+this.h*Math.SQRT2}}e.aM=void 0,(Y=e.aM||(e.aM={}))[Y.center=1]="center",Y[Y.left=2]="left",Y[Y.right=3]="right",Y[Y.top=4]="top",Y[Y.bottom=5]="bottom",Y[Y["top-left"]=6]="top-left",Y[Y["top-right"]=7]="top-right",Y[Y["bottom-left"]=8]="bottom-left",Y[Y["bottom-right"]=9]="bottom-right";let u8=1/0;function u7(e,t){return t[1]!==u8?function(e,t,r){let i=0,n=0;switch(t=Math.abs(t),r=Math.abs(r),e){case"top-right":case"top-left":case"top":n=r-7;break;case"bottom-right":case"bottom-left":case"bottom":n=7-r}switch(e){case"top-right":case"bottom-right":case"right":i=-t;break;case"top-left":case"bottom-left":case"left":i=t}return[i,n]}(e,t[0],t[1]):function(e,t){let r=0,i=0;t<0&&(t=0);let n=t/Math.SQRT2;switch(e){case"top-right":case"top-left":i=n-7;break;case"bottom-right":case"bottom-left":i=7-n;break;case"bottom":i=7-t;break;case"top":i=t-7}switch(e){case"top-right":case"bottom-right":r=-n;break;case"top-left":case"bottom-left":r=n;break;case"left":r=t;break;case"right":r=-t}return[r,i]}(e,t[0])}function u9(e,t,r){var i;let n=e.layout,a=null==(i=n.get("text-variable-anchor-offset"))?void 0:i.evaluate(t,{},r);if(a){let e=a.values,t=[];for(let r=0;r24*e);i.startsWith("top")?n[1]-=7:i.startsWith("bottom")&&(n[1]+=7),t[r+1]=n}return new t2(t)}let o=n.get("text-variable-anchor");if(o){let i;i=void 0!==e._unevaluatedLayout.getValue("text-radial-offset")?[24*n.get("text-radial-offset").evaluate(t,{},r),u8]:n.get("text-offset").evaluate(t,{},r).map(e=>24*e);let a=[];for(let e of o)a.push(e,u7(e,i));return new t2(a)}return null}function he(e){switch(e){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function ht(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p){let m=function(e,t,r,i,n,a,o){let s=r.layout.get("text-rotate").evaluate(n,{})*Math.PI/180,l=[];for(let r of e.positionedLines)for(let n of r.positionedGlyphs){if(!n.rect)continue;let c=n.rect||{},u=4,h=!0,d=1,f=0,p=(i||o)&&n.vertical,m=n.metrics.advance*n.scale/2;if(o&&e.verticalizable&&(f=r.lineOffset/2-(n.imageName?-(24-n.metrics.width*n.scale)/2:(n.scale-1)*24)),n.imageName){let e=a[n.imageName];h=e.sdf,u=1/(d=e.pixelRatio)}let g=i?[n.x+m,n.y]:[0,0],y=i?[0,0]:[n.x+m+t[0],n.y+t[1]-f],v=[0,0];p&&(v=y,y=[0,0]);let x=n.metrics.isDoubleResolution?2:1,b=(n.metrics.left-u)*n.scale-m+y[0],_=(-n.metrics.top-u)*n.scale+y[1],T=b+c.w/x*n.scale/d,M=_+c.h/x*n.scale/d,k=new w(b,_),A=new w(T,_),S=new w(b,M),E=new w(T,M);if(p){let e=new w(-m,m- -17),t=-Math.PI/2,r=12-m,i=new w(22-r,-(n.imageName?r:0)),a=new w(...v);k._rotateAround(t,e)._add(i)._add(a),A._rotateAround(t,e)._add(i)._add(a),S._rotateAround(t,e)._add(i)._add(a),E._rotateAround(t,e)._add(i)._add(a)}if(s){let e=Math.sin(s),t=Math.cos(s),r=[t,-e,e,t];k._matMult(r),A._matMult(r),S._matMult(r),E._matMult(r)}let C=new w(0,0),L=new w(0,0);l.push({tl:k,tr:A,bl:S,br:E,tex:c,writingMode:e.writingMode,glyphOffset:g,sectionIndex:n.sectionIndex,isSDF:h,pixelOffsetTL:C,pixelOffsetBR:L,minFontScaleX:0,minFontScaleY:0})}return l}(r,s,n,a,o,i,e.allowVerticalPlacement),g=e.textSizeData,y=null;for(let r of("source"===g.kind?(y=[128*n.layout.get("text-size").evaluate(o,{})])[0]>32640&&eA(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`):"composite"===g.kind&&((y=[128*f.compositeTextSizes[0].evaluate(o,{},p),128*f.compositeTextSizes[1].evaluate(o,{},p)])[0]>32640||y[1]>32640)&&eA(`${e.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`),e.addSymbols(e.text,m,y,s,a,o,c,t,l.lineStartIndex,l.lineLength,d,p),u))h[r]=e.text.placedSymbolArray.length-1;return 4*m.length}function hr(e){for(let t in e)return e[t];return null}e.$=eN,e.A=K,e.B=nV,e.C=n_,e.D=nK,e.E=eQ,e.F=nh,e.G=function([e,t,r]){return t+=90,{x:e*Math.cos(t*=Math.PI/180)*Math.sin(r*=Math.PI/180),y:e*Math.sin(t)*Math.sin(r),z:e*Math.cos(r)}},e.H=rb,e.I=l2,e.J=nN,e.K=nv,e.L=function(e){if(null==eC){let t=e.navigator?e.navigator.userAgent:null;eC=!!e.safari||!(!t||!(/\b(iPad|iPhone|iPod)\b/.test(t)||t.match("Safari")&&!t.match("Chrome")))}return eC},e.M=eH,e.N=class{constructor(e,t){this.target=e,this.mapId=t,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new cf(()=>this.process()),this.subscription=ez(this.target,"message",e=>this.receive(e),!1),this.globalScope=eE(self)?e:window}registerMessageHandler(e,t){this.messageHandlers[e]=t}unregisterMessageHandler(e){delete this.messageHandlers[e]}sendAsync(e,t){return new Promise((r,i)=>{let n=Math.round(1e18*Math.random()).toString(36).substring(0,10),a=t?ez(t.signal,"abort",()=>{a?.unsubscribe(),delete this.resolveRejects[n];let t={id:n,type:"",origin:location.origin,targetMapId:e.targetMapId,sourceMapId:this.mapId};this.target.postMessage(t)},cp):null;this.resolveRejects[n]={resolve:e=>{a?.unsubscribe(),r(e)},reject:e=>{a?.unsubscribe(),i(e)}};let o=[],s=Object.assign(Object.assign({},e),{id:n,sourceMapId:this.mapId,origin:location.origin,data:nE(e.data,o)});this.target.postMessage(s,{transfer:o})})}receive(e){let t=e.data,r=t.id,i=["file://","resource://android","null"],n=[t.origin,location.origin],a=t.origin===location.origin,o=n.some(e=>i.includes(e));if((a||o)&&(!t.targetMapId||this.mapId===t.targetMapId)){if(""===t.type){delete this.tasks[r];let e=this.abortControllers[r];return delete this.abortControllers[r],void(e&&e.abort())}if(eE(self)||t.mustQueue)return this.tasks[r]=t,this.taskQueue.push(r),void this.invoker.trigger();this.processTask(r,t)}}process(){if(0===this.taskQueue.length)return;let e=this.taskQueue.shift(),t=this.tasks[e];delete this.tasks[e],this.taskQueue.length>0&&this.invoker.trigger(),t&&this.processTask(e,t)}processTask(e,t){return _(this,void 0,void 0,function*(){if(""===t.type){let r=this.resolveRejects[e];return delete this.resolveRejects[e],r?void(t.error?r.reject(ed(nC(t.error))):r.resolve(nC(t.data))):void 0}if(!this.messageHandlers[t.type])return void this.completeTask(e,Error(`Could not find a registered handler for ${t.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let r=nC(t.data),i=new AbortController;this.abortControllers[e]=i;try{let n=yield this.messageHandlers[t.type](t.sourceMapId,r,i);this.completeTask(e,null,n)}catch(t){this.completeTask(e,ed(t))}})}completeTask(e,t,r){let i=[];delete this.abortControllers[e];let n={id:e,type:"",sourceMapId:this.mapId,origin:location.origin,error:t?nE(t):null,data:nE(r,i)};this.target.postMessage(n,{transfer:i})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},e.O=function(){var e=new K(16);return K!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e},e.P=w,e.Q=function(e,t,r){var i,n,a,o,s,l,c,u,h,d,f,p,m=r[0],g=r[1],y=r[2];return t===e?(e[12]=t[0]*m+t[4]*g+t[8]*y+t[12],e[13]=t[1]*m+t[5]*g+t[9]*y+t[13],e[14]=t[2]*m+t[6]*g+t[10]*y+t[14],e[15]=t[3]*m+t[7]*g+t[11]*y+t[15]):(n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],e[0]=i=t[0],e[1]=n,e[2]=a,e[3]=o,e[4]=s,e[5]=l,e[6]=c,e[7]=u,e[8]=h,e[9]=d,e[10]=f,e[11]=p,e[12]=i*m+s*g+h*y+t[12],e[13]=n*m+l*g+d*y+t[13],e[14]=a*m+c*g+f*y+t[14],e[15]=o*m+u*g+p*y+t[15]),e},e.R=oX,e.S=function(e,t,r){var i=r[0],n=r[1],a=r[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*n,e[5]=t[5]*n,e[6]=t[6]*n,e[7]=t[7]*n,e[8]=t[8]*a,e[9]=t[9]*a,e[10]=t[10]*a,e[11]=t[11]*a,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e},e.T=o5,e.U=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=t[3],s=t[4],l=t[5],c=t[6],u=t[7],h=t[8],d=t[9],f=t[10],p=t[11],m=t[12],g=t[13],y=t[14],v=t[15],x=r[0],b=r[1],_=r[2],w=r[3];return e[0]=x*i+b*s+_*h+w*m,e[1]=x*n+b*l+_*d+w*g,e[2]=x*a+b*c+_*f+w*y,e[3]=x*o+b*u+_*p+w*v,e[4]=(x=r[4])*i+(b=r[5])*s+(_=r[6])*h+(w=r[7])*m,e[5]=x*n+b*l+_*d+w*g,e[6]=x*a+b*c+_*f+w*y,e[7]=x*o+b*u+_*p+w*v,e[8]=(x=r[8])*i+(b=r[9])*s+(_=r[10])*h+(w=r[11])*m,e[9]=x*n+b*l+_*d+w*g,e[10]=x*a+b*c+_*f+w*y,e[11]=x*o+b*u+_*p+w*v,e[12]=(x=r[12])*i+(b=r[13])*s+(_=r[14])*h+(w=r[15])*m,e[13]=x*n+b*l+_*d+w*g,e[14]=x*a+b*c+_*f+w*y,e[15]=x*o+b*u+_*p+w*v,e},e.V=function(e,t){let r={};for(let i of t)i in e&&(r[i]=e[i]);return r},e.W=cm,e.X=ex,e.Y=cx,e.Z=cv,e._=_,e.a=eB,e.a$=function(e){var t=new K(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t},e.a0=$,e.a1=X,e.a2=eI,e.a3=cS,e.a4=cb,e.a5=c_,e.a6=8192,e.a7=cT,e.a8=cC,e.a9=25,e.aA=function(e){var t=e[0],r=e[1];return Math.sqrt(t*t+r*r)},e.aB=function(e){return e[0]=0,e[1]=0,e},e.aC=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e},e.aD=ci,e.aE=eo,e.aF=function(e,t,r,i){let n=t.y-e.y,a=t.x-e.x,o=i.y-r.y,s=i.x-r.x,l=o*a-s*n;if(0===l)return null;let c=(s*(e.y-r.y)-o*(e.x-r.x))/l;return new w(e.x+c*a,e.y+c*n)},e.aG=uG,e.aH=ok,e.aI=function(e){let t=1/0,r=1/0,i=-1/0,n=-1/0;for(let a of e)t=Math.min(t,a.x),r=Math.min(r,a.y),i=Math.max(i,a.x),n=Math.max(n,a.y);return[t,r,i,n]},e.aJ=24,e.aK=eh,e.aL=function(e,t,r,i,n=!1){if(!r[0]&&!r[1])return[0,0];let a=n?"map"===i?-e.bearingInRadians:0:"viewport"===i?e.bearingInRadians:0;if(a){let e=Math.sin(a),t=Math.cos(a);r=[r[0]*t-r[1]*e,r[0]*e+r[1]*t]}return[n?r[0]:eh(t,r[0],e.zoom),n?r[1]:eh(t,r[1],e.zoom)]},e.aN=ce,e.aO=he,e.aP=l4,e.aQ=e=>"symbol"===e.type,e.aR=sG,e.aS=at,e.aT=sv,e.aU=aB,e.aV=a1,e.aW=aJ,e.aX=eO,e.aY=cw,e.aZ=en,e.a_=ei,e.aa=ck,e.ab=e=>{let t=window.document.createElement("video");return t.muted=!0,new Promise(r=>{for(let i of(t.onloadstart=()=>{r(t)},e)){let e=window.document.createElement("source");eZ(i)||(t.crossOrigin="Anonymous"),e.src=i,t.appendChild(e)}})},e.ac=e9,e.ad=function(){return e_++},e.ae=aE,e.af=co,e.ag=uF,e.ah=iV,e.ai=oT,e.aj=cP,e.ak=function(e){let t={};if(e.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(e,r,i,n)=>{let a=i||n;return t[r]=!a||a.toLowerCase(),""}),t["max-age"]){let e=parseInt(t["max-age"],10);isNaN(e)?delete t["max-age"]:t["max-age"]=e}return t},e.al=ev,e.am=85.051129,e.an=eD,e.ao=function(e){return Math.pow(2,e)},e.ap=Q,e.aq=function(e,t){return e/cy(t)},e.ar=function(e){return Math.log(e)/Math.LN2},e.as=function(e){var t=e[0],r=e[1];return t*t+r*r},e.at=function(e){if(!e.length)return new Set;let t=Math.max(...e.map(e=>e.canonical.z)),r=1/0,i=-1/0,n=1/0,a=-1/0,o=[];for(let s of e){let{x:e,y:l,z:c}=s.canonical,u=Math.pow(2,t-c),h=e*u,d=l*u;o.push({id:s,x:h,y:d}),hi&&(i=h),da&&(a=d)}let s=new Set;for(let e of o)e.x!==r&&e.x!==i&&e.y!==n&&e.y!==a||s.add(e.id);return s},e.au=function(e,t){let r=Math.abs(2*e.wrap)-(e.wrap<0),i=Math.abs(2*t.wrap)-(t.wrap<0);return e.overscaledZ-t.overscaledZ||i-r||t.canonical.y-e.canonical.y||t.canonical.x-e.canonical.x},e.av=class{constructor(e,t){this.max=e,this.onRemove=t,this.reset()}reset(){for(let e in this.data)for(let t of this.data[e])t.timeout&&clearTimeout(t.timeout),this.onRemove(t.value);return this.data={},this.order=[],this}add(e,t,r){let i=e.wrapped().key;void 0===this.data[i]&&(this.data[i]=[]);let n={value:t,timeout:void 0};if(void 0!==r&&(n.timeout=setTimeout(()=>{this.remove(e,n)},r)),this.data[i].push(n),this.order.push(i),this.order.length>this.max){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}has(e){return e.wrapped().key in this.data}getAndRemove(e){return this.has(e)?this._getAndRemoveByKey(e.wrapped().key):null}_getAndRemoveByKey(e){let t=this.data[e].shift();return t.timeout&&clearTimeout(t.timeout),0===this.data[e].length&&delete this.data[e],this.order.splice(this.order.indexOf(e),1),t.value}getByKey(e){let t=this.data[e];return t?t[0].value:null}get(e){return this.has(e)?this.data[e.wrapped().key][0].value:null}remove(e,t){if(!this.has(e))return this;let r=e.wrapped().key,i=void 0===t?0:this.data[r].indexOf(t),n=this.data[r][i];return this.data[r].splice(i,1),n.timeout&&clearTimeout(n.timeout),0===this.data[r].length&&delete this.data[r],this.onRemove(n.value),this.order.splice(this.order.indexOf(r),1),this}setMaxSize(e){for(this.max=e;this.order.length>this.max;){let e=this._getAndRemoveByKey(this.order[0]);e&&this.onRemove(e)}return this}filter(e){let t=[];for(let r in this.data)for(let i of this.data[r])e(i.value)||t.push(i);for(let e of t)this.remove(e.value.tileID,e)}},e.aw=function(e,t){let r=0,i=0;if("constant"===e.kind)i=e.layoutSize;else if("source"!==e.kind){let{interpolationType:n,minZoom:a,maxZoom:o}=e,s=n?ev(rv.interpolationFactor(n,t,a,o),0,1):0;"camera"===e.kind?i=rb.number(e.minSize,e.maxSize,s):r=s}return{uSizeT:r,uSize:i}},e.ay=function(e,{uSize:t,uSizeT:r},{lowerSize:i,upperSize:n}){return"source"===e.kind?i/128:"composite"===e.kind?rb.number(i/128,n/128,r):t},e.az=ec,e.b=eL,e.b$=ol,e.b0=function(e,t,r){return e[0]=t[0]-r[0],e[1]=t[1]-r[1],e[2]=t[2]-r[2],e},e.b1=function(e,t){var r=t[0],i=t[1],n=t[2],a=r*r+i*i+n*n;return a>0&&(a=1/Math.sqrt(a)),e[0]=t[0]*a,e[1]=t[1]*a,e[2]=t[2]*a,e},e.b2=ea,e.b3=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]},e.b4=function(e,t,r){return e[0]=t[0]*r[0],e[1]=t[1]*r[1],e[2]=t[2]*r[2],e[3]=t[3]*r[3],e},e.b5=et,e.b6=function(e,t,r){let i=t[0]*r[0]+t[1]*r[1]+t[2]*r[2];return 0===i?null:(-(e[0]*r[0]+e[1]*r[1]+e[2]*r[2])-r[3])/i},e.b7=et,e.b8=function(e,t,r){return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e},e.b9=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]},e.bA=el,e.bB=function(e,t,r){var i=r[0],n=r[1],a=r[2],o=r[3],s=t[0],l=t[1],c=t[2],u=n*c-a*l,h=a*s-i*c,d=i*l-n*s;return e[0]=s+o*(u+=u)+n*(d+=d)-a*(h+=h),e[1]=l+o*h+a*u-i*d,e[2]=c+o*d+i*h-n*u,e},e.bC=function(e,t,r){var i,n,a,o,s,l,c;let u=(i=[e[0],e[1],e[2],t[0],t[1],t[2],r[0],r[1],r[2]])[0]*((c=i[8])*(a=i[4])-(o=i[5])*(l=i[7]))+i[1]*(-c*(n=i[3])+o*(s=i[6]))+i[2]*(l*n-a*s);if(0===u)return null;let h=ea([],[t[0],t[1],t[2]],[r[0],r[1],r[2]]),d=ea([],[r[0],r[1],r[2]],[e[0],e[1],e[2]]),f=ea([],[e[0],e[1],e[2]],[t[0],t[1],t[2]]),p=en([],h,-e[3]);return ei(p,p,en([],d,-t[3])),ei(p,p,en([],f,-r[3])),en(p,p,1/u),p},e.bD=6371008.8,e.bE=function(){return new Float64Array(4)},e.bF=function(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0]*Math.cos(i)-n[1]*Math.sin(i),a[1]=n[0]*Math.sin(i)+n[1]*Math.cos(i),a[2]=n[2],e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},e.bG=function(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[0],a[1]=n[1]*Math.cos(i)-n[2]*Math.sin(i),a[2]=n[1]*Math.sin(i)+n[2]*Math.cos(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},e.bH=function(e,t,r,i){var n=[],a=[];return n[0]=t[0]-r[0],n[1]=t[1]-r[1],n[2]=t[2]-r[2],a[0]=n[2]*Math.sin(i)+n[0]*Math.cos(i),a[1]=n[1],a[2]=n[2]*Math.cos(i)-n[0]*Math.sin(i),e[0]=a[0]+r[0],e[1]=a[1]+r[1],e[2]=a[2]+r[2],e},e.bI=function(e,t,r){var i=Math.sin(r),n=Math.cos(r),a=t[0],o=t[1],s=t[2],l=t[3],c=t[8],u=t[9],h=t[10],d=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=a*n-c*i,e[1]=o*n-u*i,e[2]=s*n-h*i,e[3]=l*n-d*i,e[8]=a*i+c*n,e[9]=o*i+u*n,e[10]=s*i+h*n,e[11]=l*i+d*n,e},e.bJ=function(e,t){let r=ef(e,360),i=ef(t,360),n=i-r,a=i>r?n-360:n+360;return Math.abs(n)0?o:-o},e.bM=function(e,t){let r=ef(e,2*Math.PI),i=ef(t,2*Math.PI);return Math.min(Math.abs(r-i),Math.abs(r-i+2*Math.PI),Math.abs(r-i-2*Math.PI))},e.bN=function(){let e={},t=e0.$version;for(let r in e0.$root){let i=e0.$root[r];if(i.required){let n=null;null!=(n="version"===r?t:"array"===i.type?[]:{})&&(e[r]=n)}}return e},e.bO=eW,e.bP=nL,e.bQ=function e(t,r){if(Array.isArray(t)){if(!Array.isArray(r)||t.length!==r.length)return!1;for(let i=0;i{e in t&&(r[e]=t[e])}),r}(e[r],t[e[r].ref]));return e},e.bT=function(e,t){if("custom"===e.type)return new cd(e,t);switch(e.type){case"background":return new ch(e,t);case"circle":return new oq(e,t);case"color-relief":return new o8(e,t);case"fill":return new sA(e,t);case"fill-extrusion":return new sU(e,t);case"heatmap":return new o0(e,t);case"hillshade":return new o2(e,t);case"line":return new lS(e,t);case"raster":return new n8(e,t);case"symbol":return new cc(e,t)}},e.bU=e=>"raster"===e.type,e.bV=eM,e.bW=function(e,t){if(!e)return[{command:"setStyle",args:[t]}];let r=[];try{if(!e2(e.version,t.version))return[{command:"setStyle",args:[t]}];e2(e.center,t.center)||r.push({command:"setCenter",args:[t.center]}),e2(e.state,t.state)||r.push({command:"setGlobalState",args:[t.state]}),e2(e.centerAltitude,t.centerAltitude)||r.push({command:"setCenterAltitude",args:[t.centerAltitude]}),e2(e.zoom,t.zoom)||r.push({command:"setZoom",args:[t.zoom]}),e2(e.bearing,t.bearing)||r.push({command:"setBearing",args:[t.bearing]}),e2(e.pitch,t.pitch)||r.push({command:"setPitch",args:[t.pitch]}),e2(e.roll,t.roll)||r.push({command:"setRoll",args:[t.roll]}),e2(e.sprite,t.sprite)||r.push({command:"setSprite",args:[t.sprite]}),e2(e.glyphs,t.glyphs)||r.push({command:"setGlyphs",args:[t.glyphs]}),e2(e.transition,t.transition)||r.push({command:"setTransition",args:[t.transition]}),e2(e.light,t.light)||r.push({command:"setLight",args:[t.light]}),e2(e.terrain,t.terrain)||r.push({command:"setTerrain",args:[t.terrain]}),e2(e.sky,t.sky)||r.push({command:"setSky",args:[t.sky]}),e2(e.projection,t.projection)||r.push({command:"setProjection",args:[t.projection]});let i={},n=[];!function(e,t,r,i){let n;for(n in t=t||{},e=e||{})Object.prototype.hasOwnProperty.call(e,n)&&(Object.prototype.hasOwnProperty.call(t,n)||e4(n,r,i));for(n in t){var a;Object.prototype.hasOwnProperty.call(t,n)&&(Object.prototype.hasOwnProperty.call(e,n)?e2(e[n],t[n])||("geojson"===e[n].type&&"geojson"===t[n].type&&function(e,t,r){let i;for(i in e[r])if(Object.prototype.hasOwnProperty.call(e[r],i)&&"data"!==i&&!e2(e[r][i],t[r][i]))return!1;for(i in t[r])if(Object.prototype.hasOwnProperty.call(t[r],i)&&"data"!==i&&!e2(e[r][i],t[r][i]))return!1;return!0}(e,t,n)?e3(r,{command:"setGeoJSONSourceData",args:[n,t[n].data]}):(a=t,e4(n,r,i),e5(n,a,r))):e5(n,t,r))}}(e.sources,t.sources,n,i);let a=[];e.layers&&e.layers.forEach(e=>{"source"in e&&i[e.source]?r.push({command:"removeLayer",args:[e.id]}):a.push(e)}),r=r.concat(n),function(e,t,r){t=t||[];let i=(e=e||[]).map(e8),n=t.map(e8),a=e.reduce(e7,{}),o=t.reduce(e7,{}),s=i.slice(),l=Object.create(null),c,u,h,d,f;for(let e=0,t=0;e1e-6?(o=Math.sin(n=Math.acos(a)),s=Math.sin((1-i)*n)/o,l=Math.sin(i*n)/o):(s=1-i,l=i),e[0]=s*c+l*f,e[1]=s*u+l*p,e[2]=s*h+l*m,e[3]=s*d+l*g,e},e.bm=function(e){var t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g;let y=new Float64Array(9);l=(t=e[0])*(a=t+t),c=(r=e[1])*a,h=(i=e[2])*a,d=i*(o=r+r),p=(n=e[3])*a,m=n*o,g=n*(s=i+i),y[0]=1-(u=r*o)-(f=i*s),y[3]=c-g,y[6]=h+m,y[1]=c+g,y[4]=1-l-f,y[7]=d-p,y[2]=h-m,y[5]=d+p,y[8]=1-l-u;let v=eO(-Math.asin(ev(y[2],-1,1))),x,b;return .001>Math.hypot(y[5],y[8])?(x=0,b=-eO(Math.atan2(y[3],y[4]))):(x=eO(0===y[5]&&0===y[8]?0:Math.atan2(y[5],y[8])),b=eO(0===y[1]&&0===y[0]?0:Math.atan2(y[1],y[0]))),{roll:x,pitch:v+90,bearing:b}},e.bn=function(e,t){return e.roll==t.roll&&e.pitch==t.pitch&&e.bearing==t.bearing},e.bo=tW,e.bp=oo,e.bq=-32768,e.br=32767,e.bs=sy,e.bt=ep,e.bu=em,e.bv=t5,e.bw=function(e,t,r,i,n){return ep(i,n,ev((e-t)/(r-t),0,1))},e.bx=function(e,t,r,i){return e[0]=t[0]+r[0]*i,e[1]=t[1]+r[1]*i,e[2]=t[2]+r[2]*i,e},e.by=ef,e.bz=function(){return new Float64Array(3)},e.c=eV,e.c$=iz,e.c0=class extends oa{constructor(e,t){super(e,t),this.current=oc}set(e){if(e[12]!==this.current[12]||e[0]!==this.current[0])return this.current=e,void this.gl.uniformMatrix4fv(this.location,!1,e);for(let t=1;t<16;t++)if(e[t]!==this.current[t]){this.current=e,this.gl.uniformMatrix4fv(this.location,!1,e);break}}},e.c1=os,e.c2=class extends oa{constructor(e,t){super(e,t),this.current=[0,0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]&&e[2]===this.current[2]||(this.current=e,this.gl.uniform3f(this.location,e[0],e[1],e[2]))}},e.c3=class extends oa{constructor(e,t){super(e,t),this.current=[0,0]}set(e){e[0]===this.current[0]&&e[1]===this.current[1]||(this.current=e,this.gl.uniform2f(this.location,e[0],e[1]))}},e.c4=J,e.c5=function(e,t){var r=Math.sin(t),i=Math.cos(t);return e[0]=i,e[1]=r,e[2]=0,e[3]=-r,e[4]=i,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e},e.c6=function(e,t,r){var i=t[0],n=t[1],a=t[2];return e[0]=i*r[0]+n*r[3]+a*r[6],e[1]=i*r[1]+n*r[4]+a*r[7],e[2]=i*r[2]+n*r[5]+a*r[8],e},e.c7=function(e,t,r,i,n,a,o){var s=1/(t-r),l=1/(i-n),c=1/(a-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*c,e[11]=0,e[12]=(t+r)*s,e[13]=(n+i)*l,e[14]=(o+a)*c,e[15]=1,e},e.c8=class extends oa{constructor(e,t){super(e,t),this.current=[]}set(e){if(e!=this.current){this.current=e;let t=new Float32Array(4*e.length);for(let r=0;r25||i<0||i>=1||r<0||r>=1)},e.cE=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e},e.cF=class extends an{},e.cG=eG,e.cH=function(e,t){eV.REGISTERED_PROTOCOLS[e]=t},e.cI=function(e){delete eV.REGISTERED_PROTOCOLS[e]},e.cJ=function(e,t){let r={};for(let i=0;i24*e)}let v=c?"center":a.get("text-justify").evaluate(o,{},t.canonical),b="point"===a.get("symbol-placement")?24*a.get("text-max-width").evaluate(o,{},t.canonical):1/0,_=()=>{t.bucket.allowVerticalPlacement&&nz(r)&&(g.vertical=l5(y,t.glyphMap,t.glyphPositions,t.imagePositions,d,b,l,h,"left",s,x,e.ax.vertical,!0,p,f))};if(!c&&m){let r=new Set;if("auto"===v)for(let e=0;e{d.x<0||d.x>=8192||d.y<0||d.y>=8192||function(t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b,_,w,T,M,k){let A=t.addToLineVertexArray(r,i),S,E,C,L,P=0,I=0,z=0,D=0,O=-1,R=-1,F={},j=ot("");if(t.allowVerticalPlacement&&n.vertical){let e=l.layout.get("text-rotate").evaluate(_,{},M)+90;C=new u3(c,r,u,h,d,n.vertical,f,p,m,e),s&&(L=new u3(c,r,u,h,d,s,y,v,m,e))}if(a){let i=l.layout.get("icon-rotate").evaluate(_,{}),n="none"!==l.layout.get("icon-text-fit"),o=u0(a,i,T,n),f=s?u0(s,i,T,n):void 0;E=new u3(c,r,u,h,d,a,y,v,!1,i),P=4*o.length;let p=t.iconSizeData,m=null;"source"===p.kind?(m=[128*l.layout.get("icon-size").evaluate(_,{})])[0]>32640&&eA(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`):"composite"===p.kind&&((m=[128*w.compositeIconSizes[0].evaluate(_,{},M),128*w.compositeIconSizes[1].evaluate(_,{},M)])[0]>32640||m[1]>32640)&&eA(`${t.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`),t.addSymbols(t.icon,o,m,b,x,_,e.ax.none,r,A.lineStartIndex,A.lineLength,-1,M),O=t.icon.placedSymbolArray.length-1,f&&(I=4*f.length,t.addSymbols(t.icon,f,m,b,x,_,e.ax.vertical,r,A.lineStartIndex,A.lineLength,-1,M),R=t.icon.placedSymbolArray.length-1)}let B=Object.keys(n.horizontal);for(let i of B){let a=n.horizontal[i];S||(j=ot(a.text),S=new u3(c,r,u,h,d,a,f,p,m,l.layout.get("text-rotate").evaluate(_,{},M)));let s=1===a.positionedLines.length;if(z+=ht(t,r,a,o,l,m,_,g,A,n.vertical?e.ax.horizontal:e.ax.horizontalOnly,s?B:[i],F,O,w,M),s)break}n.vertical&&(D+=ht(t,r,n.vertical,o,l,m,_,g,A,e.ax.vertical,["vertical"],F,R,w,M));let N=S?S.boxStartIndex:t.collisionBoxArray.length,U=S?S.boxEndIndex:t.collisionBoxArray.length,V=C?C.boxStartIndex:t.collisionBoxArray.length,q=C?C.boxEndIndex:t.collisionBoxArray.length,H=E?E.boxStartIndex:t.collisionBoxArray.length,G=E?E.boxEndIndex:t.collisionBoxArray.length,W=L?L.boxStartIndex:t.collisionBoxArray.length,Y=L?L.boxEndIndex:t.collisionBoxArray.length,Z=-1,$=(e,t)=>e?.circleDiameter?Math.max(e.circleDiameter,t):t;Z=$(S,-1),Z=$(C,Z),Z=$(E,Z);let X=+((Z=$(L,Z))>-1);X&&(Z*=k/24),t.glyphOffsetArray.length>=co.MAX_GLYPHS&&eA("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==_.sortKey&&t.addToSortKeyRanges(t.symbolInstances.length,_.sortKey);let K=u9(l,_,M),[J,Q]=function(t,r){let i=t.length,n=r?.values;if(n?.length>0)for(let r=0;r=0?F.right:-1,F.center>=0?F.center:-1,F.left>=0?F.left:-1,F.vertical||-1,O,R,j,N,U,V,q,H,G,W,Y,u,z,D,P,I,X,0,f,Z,J,Q)}(t,d,l,i,n,a,P,t.layers[0],t.collisionBoxArray,r.index,r.sourceLayerIndex,t.index,v,[T,T,T,T],A,c,b,M,S,m,r,o,u,h,s)};if("line"===E)for(let e of uG(r.geometry,0,0,8192,8192)){let r=s_(e,I);for(let e of function(e,t,r,i,n,a,o){let s=i?.6*24*a:0,l=uQ(i,n),c=l*a,u=0===e[0].x||8192===e[0].x||0===e[0].y||8192===e[0].y;return t-c=0&&y=0&&v=0&&f+u<=h){let r=new uX(y,v,m,e);r._round(),n&&!uK(t,r,o,n,a)||p.push(r)}}d+=l}return l||p.length||s||(p=e(t,d/2,i,n,a,o,s,!0,c)),p}(e,u?t/2*o%t:(l/2+48)*a*o%t,t,s,r,c,u,!1,8192)}(r,_,k,i.vertical||g,n,x,t.overscaling))g&&function(e,t,r,i){let n=e.compareText;if(t in n){let e=n[t];for(let t=e.length-1;t>=0;t--)if(i.dist(e[t])1){let t=s_(e,I),r=function(e,t,r,i,n){let a=r?.6*24*n:0,o=uQ(r,i)*n,s=0,l=uJ(e)/2;for(let r=0;rl){let u=(l-s)/c,h=new uX(rb.number(i.x,n.x,u),rb.number(i.y,n.y,u),n.angleTo(i),r);return h._round(),!a||uK(e,h,o,a,t)?h:void 0}s+=c}}(t,k,i.vertical||g,n,x);r&&z(t,r)}}else if("Polygon"===r.type)for(let e of rZ(r.geometry,0)){let t=function(e,t=1){let r=cC.fromPoints(e[0]),i=Math.min(r.width(),r.height()),n=i/2,a=new u5([],u4),{minX:o,minY:s,maxX:l,maxY:c}=r;if(0===i)return new w(o,s);for(let t=o;th.d||!h.d)&&(h=r),r.max-h.d<=t||(n=r.h/2,a.push(new u6(r.p.x-n,r.p.y-n,n,e)),a.push(new u6(r.p.x+n,r.p.y-n,n,e)),a.push(new u6(r.p.x-n,r.p.y+n,n,e)),a.push(new u6(r.p.x+n,r.p.y+n,n,e)))}return u.d>0&&h.d-u.d<=t?u.p:h.p}(e,16);z(s_(e[0],I,!0),new uX(t.x,t.y,0))}else if("LineString"===r.type)for(let e of r.geometry){let t=s_(e,I);z(t,new uX(t[0].x,t[0].y,0))}else if("Point"===r.type)for(let e of r.geometry)for(let t of e)z([t],new uX(t.x,t.y,0))}(t.bucket,o,g,v,t.imageMap,s,p,m,x,b,t.canonical,t.subdivisionGranularity)}t.showCollisionBoxes&&t.bucket.generateCollisionDebugBuffers()},e.cP=sM,e.cQ=sj,e.cR=lM,e.cS=function(e,t=""){let r=new lU;return function(e,t,r=""){for(let i in e.layers)t.writeMessage(3,(e,t)=>(function(e,t,r=""){t.writeVarintField(15,e.version||1),t.writeStringField(1,e.name||""),t.writeVarintField(5,e.extent||4096);let i={jsonPrefix:r,keys:[],values:[],keycache:{},valuecache:{}};for(let r=0;r=this.maxEntries){let e=this.map.keys().next().value;this.map.delete(e)}this.map.set(e,t)}clear(){this.map.clear()}},e.cV=sO,e.cW=lU,e.cX=uO,e.cY=function(e,t,r,a,o){return _(this,void 0,void 0,function*(){let s,l,c;if(X())try{return yield eI(e,t,r,a,o)}catch{}return s=e.width,l=e.height,i&&n||(n=(i=new OffscreenCanvas(s,l)).getContext("2d",{willReadFrequently:!0})),i.width=s,i.height=l,n.drawImage(e,0,0,s,l),c=n.getImageData(t,r,a,o),n.clearRect(0,0,s,l),c.data})},e.cZ=o4,e.c_=class{constructor(e,t){this.layers={[uF]:this},this.name=uF,this.version=t?t.version:1,this.extent=t?t.extent:4096,this.length=e.length,this.features=e}feature(e){return new uR(this.features[e],this.extent)}},e.ca=class extends ag{},e.cb=lI,e.cc=class extends av{},e.cd=oQ,e.ce=function(e){return e<=1?1:Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))},e.cf=oJ,e.cg=function(e,t,r){var i=t[0],n=t[1],a=t[2],o=r[3]*i+r[7]*n+r[11]*a+r[15];return e[0]=(r[0]*i+r[4]*n+r[8]*a+r[12])/(o=o||1),e[1]=(r[1]*i+r[5]*n+r[9]*a+r[13])/o,e[2]=(r[2]*i+r[6]*n+r[10]*a+r[14])/o,e},e.ch=class extends aa{},e.ci=class extends ak{},e.cj=function(e,t){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.ck=function(e,t){var r=e[0],i=e[1],n=e[2],a=e[3],o=e[4],s=e[5],l=e[6],c=e[7],u=e[8],h=e[9],d=e[10],f=e[11],p=e[12],m=e[13],g=e[14],y=e[15],v=t[0],x=t[1],b=t[2],_=t[3],w=t[4],T=t[5],M=t[6],k=t[7],A=t[8],S=t[9],E=t[10],C=t[11],L=t[12],P=t[13],I=t[14],z=t[15];return Math.abs(r-v)<=1e-6*Math.max(1,Math.abs(r),Math.abs(v))&&Math.abs(i-x)<=1e-6*Math.max(1,Math.abs(i),Math.abs(x))&&Math.abs(n-b)<=1e-6*Math.max(1,Math.abs(n),Math.abs(b))&&Math.abs(a-_)<=1e-6*Math.max(1,Math.abs(a),Math.abs(_))&&Math.abs(o-w)<=1e-6*Math.max(1,Math.abs(o),Math.abs(w))&&Math.abs(s-T)<=1e-6*Math.max(1,Math.abs(s),Math.abs(T))&&Math.abs(l-M)<=1e-6*Math.max(1,Math.abs(l),Math.abs(M))&&Math.abs(c-k)<=1e-6*Math.max(1,Math.abs(c),Math.abs(k))&&Math.abs(u-A)<=1e-6*Math.max(1,Math.abs(u),Math.abs(A))&&Math.abs(h-S)<=1e-6*Math.max(1,Math.abs(h),Math.abs(S))&&Math.abs(d-E)<=1e-6*Math.max(1,Math.abs(d),Math.abs(E))&&Math.abs(f-C)<=1e-6*Math.max(1,Math.abs(f),Math.abs(C))&&Math.abs(p-L)<=1e-6*Math.max(1,Math.abs(p),Math.abs(L))&&Math.abs(m-P)<=1e-6*Math.max(1,Math.abs(m),Math.abs(P))&&Math.abs(g-I)<=1e-6*Math.max(1,Math.abs(g),Math.abs(I))&&Math.abs(y-z)<=1e-6*Math.max(1,Math.abs(y),Math.abs(z))},e.cl=function(e,t){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},e.cm=e=>"circle"===e.type,e.cn=e=>"heatmap"===e.type,e.co=e=>"line"===e.type,e.cp=e=>"fill"===e.type,e.cq=e=>"fill-extrusion"===e.type,e.cr=e=>"hillshade"===e.type,e.cs=e=>"color-relief"===e.type,e.ct=e=>"background"===e.type,e.cu=e=>"custom"===e.type,e.cv=eg,e.cw=function(e,t,r){if(t<=0)return e;let i=1/t;return void 0===r||1e-10>Math.abs(r)?Math.round(e*i)/i:(r>0?Math.ceil(e*i-1e-9):Math.floor(e*i+1e-10))/i},e.cx=function(e,t,r){let i=eu(t.x-r.x,t.y-r.y),n=eu(e.x-r.x,e.y-r.y);return eO(Math.atan2(i[0]*n[1]-i[1]*n[0],i[0]*n[0]+i[1]*n[1]))},e.cy=ey,e.cz=function(e,t){var r;if(!eF[t])return!1;let i=e?.target,n=(null==(r=i?.ownerDocument)?void 0:r.defaultView)||window;return e instanceof n.MouseEvent||e instanceof n.WheelEvent},e.d=ed,e.d0=class{constructor(e,t){let r=(t=this.options=Object.assign({},lb,t)).debug;if(r&&console.time("preprocess data"),t.maxZoom<0||t.maxZoom>24)throw Error("maxZoom should be in the 0-24 range");if(t.promoteId&&t.generateId)throw Error("promoteId and generateId cannot be used together.");let i=sJ(e,t);r&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",t.indexMaxZoom,t.indexMaxPoints),console.time("generate tiles")),i=la(i,t),t.updateable&&(this.source=i),this.initializeIndex(i,t)}initializeIndex(e,t){this.tileIndex=t.cluster?new lu(t.clusterOptions):new lv(t),e.length&&this.tileIndex.initialize(e)}getTile(e,t,r){return t*=1,r*=1,(e*=1)<0||e>24?null:this.tileIndex.getTile(e,t,r)}updateData(e,t){let r=this.options;if(!r.updateable)throw Error("to update tile geojson `updateable` option must be set to true");let{affected:i,source:n}=function(e,t,r){var i,n;let a=t?{removeAll:t.removeAll,remove:new Set(t.remove||[]),add:new Map(null==(i=t.add)?void 0:i.map(e=>[r.promoteId?e.properties[r.promoteId]:e.id,e])),update:new Map(null==(n=t.update)?void 0:n.map(e=>[e.id,e]))}:{remove:new Set,add:new Map,update:new Map},o=[];if(a.removeAll&&(o=e,e=[]),a.remove.size||a.add.size){let t=[];for(let r of e)(a.remove.has(r.id)||a.add.has(r.id))&&t.push(r);if(t.length){o.push(...t);let r=new Set(t.map(e=>e.id));e=e.filter(e=>!r.has(e.id))}if(a.add.size){let t=sJ({type:"FeatureCollection",features:Array.from(a.add.values())},r);t=la(t,r),o.push(...t),e.push(...t)}}if(a.update.size){let t=new Map,i=[];for(let r of e)a.update.has(r.id)?t.set(r.id,[...t.get(r.id)||[],r]):i.push(r);for(let[e,n]of a.update){let a=t.get(e);if(!a||0===a.length)continue;let s=function(e,t,r){var i,n;let a=!!t.newGeometry,o=t.removeAllProperties||(null==(i=t.removeProperties)?void 0:i.length)>0||(null==(n=t.addOrUpdateProperties)?void 0:n.length)>0;if(a){let i=e[0];return la(sJ({type:"FeatureCollection",features:[{type:"Feature",id:i.id,geometry:t.newGeometry,properties:o?ll(i.tags,t):i.tags}]},r),r)}if(o){let r=[];for(let i of e){let e=d({},i);e.tags=ll(e.tags,t),r.push(e)}return r}return e}(a,n,r);o.push(...a,...s),i.push(...s)}e=i}return{affected:o,source:e}}(this.source,e,r);t&&({affected:i,source:n}=this.filterUpdate(n,i,t)),i.length&&(this.source=n,this.tileIndex.updateIndex(n,i,r))}filterUpdate(e,t,r){let i=new Set;for(let n of e)null!=n.id&&(r(s5(n))||(t.push(n),i.add(n.id)));return{affected:t,source:e=e.filter(e=>!i.has(e.id))}}getData(){if(!this.options.updateable)throw Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(e=>s5(e))}}updateClusterOptions(e,t){let r=this.options.cluster;this.options.cluster=e,this.options.clusterOptions=t,r!=e?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(e){return this.tileIndex.getClusterExpansionZoom(e)}getClusterChildren(e){return this.tileIndex.getChildren(e)}getClusterLeaves(e,t,r){return this.tileIndex.getLeaves(e,t,r)}},e.d1=nB,e.e=eb,e.f=eZ,e.g=eq,e.h=e=>_(void 0,void 0,void 0,function*(){if(0===e.byteLength)return createImageBitmap(new ImageData(1,1));let t=new Blob([new Uint8Array(e)],{type:"image/png"});try{return createImageBitmap(t)}catch(e){throw Error(`Could not load image because of ${ed(e).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),e.i=eE,e.j=e=>new Promise((t,r)=>{let i=new Image;i.onload=()=>{t(i),URL.revokeObjectURL(i.src),i.onload=null,window.requestAnimationFrame(()=>i.src=eP)},i.onerror=()=>r(Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let n=new Blob([new Uint8Array(e)],{type:"image/png"});i.src=e.byteLength?URL.createObjectURL(n):eP}),e.k=(e,t)=>eY(eb(e,{type:"json"}),t),e.l=eJ,e.m=eY,e.n=eK,e.o=(e,t)=>eY(eb(e,{type:"arrayBuffer"}),t),e.p=l1,e.q=function(e){return new lU(e).readFields(lJ,[])},e.r=function(e){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(e))},e.s=ez,e.t=o$,e.u=n2,e.v=e0,e.w=eA,e.x=e0,e.y=nG,e.z=ny}),r("worker",["./shared"],function(e){class t{constructor(e,t){this.keyCache={},e&&this.replace(e,t)}replace(e,t){this._layerConfigs={},this._layers={},this.update(e,[],t)}update(t,r,i){for(let r of t){this._layerConfigs[r.id]=r;let t=this._layers[r.id]=e.bT(r,i);t._featureFilter=e.ah(t.filter,i),this.keyCache[r.id]&&delete this.keyCache[r.id]}for(let e of r)delete this.keyCache[e],delete this._layerConfigs[e],delete this._layers[e];for(let t of(this.familiesBySource={},e.cJ(Object.values(this._layerConfigs),this.keyCache))){let r=t.map(e=>this._layers[e.id]),i=r[0];if(i.isHidden())continue;let n=i.source||"",a=this.familiesBySource[n];a||(a=this.familiesBySource[n]={});let o=i.sourceLayer||e.ag,s=a[o];s||(s=a[o]=[]),s.push(r)}}}class r{constructor(t){let r={},i=[];for(let e in t){let n=t[e],a=r[e]={};for(let e in n){let t=n[+e];if(!t||0===t.bitmap.width||0===t.bitmap.height)continue;let r={x:0,y:0,w:t.bitmap.width+2,h:t.bitmap.height+2};i.push(r),a[e]={rect:r,metrics:t.metrics}}}let{w:n,h:a}=e.p(i),o=new e.t({width:n||1,height:a||1});for(let i in t){let n=t[i];for(let t in n){let a=n[+t];if(!a||0===a.bitmap.width||0===a.bitmap.height)continue;let s=r[i][t].rect;e.t.copy(a.bitmap,o,{x:0,y:0},{x:s.x+1,y:s.y+1},a.bitmap)}}this.image=o,this.positions=r}}e.cK("GlyphAtlas",r);class i{constructor(t){this.tileID=new e.a3(t.tileID.overscaledZ,t.tileID.wrap,t.tileID.canonical.z,t.tileID.canonical.x,t.tileID.canonical.y),this.uid=t.uid,this.zoom=t.zoom,this.pixelRatio=t.pixelRatio,this.tileSize=t.tileSize,this.source=t.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=t.showCollisionBoxes,this.collectResourceTiming=!!t.collectResourceTiming,this.returnDependencies=!!t.returnDependencies,this.promoteId=t.promoteId,this.inFlightDependencies=[]}parse(t,i,a,o,s){return e._(this,void 0,void 0,function*(){this.status="parsing",this.data=t,this.collisionBoxArray=new e.ae;let l=new e.cL(Object.keys(t.layers).sort()),c=new e.cM(this.tileID,this.promoteId);c.bucketLayerIDs=[];let u={},h={featureIndex:c,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:a,subdivisionGranularity:s},d=i.familiesBySource[this.source];for(let r in d){let i=t.layers[r];if(!i)continue;1===i.version&&e.w(`Vector tile source "${this.source}" layer "${r}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let o=l.encode(r),s=[];for(let e=0;ee.id)))}}let f=e.bY(h.glyphDependencies,e=>Object.keys(e).map(Number));for(let e of this.inFlightDependencies)e?.abort();this.inFlightDependencies=[];let p=Promise.resolve({});if(Object.keys(f).length){let e=new AbortController;this.inFlightDependencies.push(e),p=o.sendAsync({type:"GG",data:{stacks:f,source:this.source,tileID:this.tileID,type:"glyphs"}},e)}let m=Object.keys(h.iconDependencies),g=Promise.resolve({});if(m.length){let e=new AbortController;this.inFlightDependencies.push(e),g=o.sendAsync({type:"GI",data:{icons:m,source:this.source,tileID:this.tileID,type:"icons"}},e)}let y=Object.keys(h.patternDependencies),v=Promise.resolve({});if(y.length){let e=new AbortController;this.inFlightDependencies.push(e),v=o.sendAsync({type:"GI",data:{icons:y,source:this.source,tileID:this.tileID,type:"patterns"}},e)}let x=h.dashDependencies,b=Promise.resolve({});if(Object.keys(x).length){let e=new AbortController;this.inFlightDependencies.push(e),b=o.sendAsync({type:"GDA",data:{dashes:x}},e)}let[_,w,T,M]=yield Promise.all([p,g,v,b]),k=new r(_),A=new e.cN(w,T);for(let t in u){let r=u[t];r instanceof e.af?(n(r.layers,this.zoom,a),e.cO({bucket:r,glyphMap:_,glyphPositions:k.positions,imageMap:w,imagePositions:A.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:h.subdivisionGranularity})):r.hasDependencies&&(r instanceof e.cP||r instanceof e.cQ||r instanceof e.cR)&&(n(r.layers,this.zoom,a),r.addFeatures(h,this.tileID.canonical,A.patternPositions,M))}return this.status="done",{buckets:Object.values(u).filter(e=>!e.isEmpty()),featureIndex:c,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:k.image,imageAtlas:A,dashPositions:M,glyphMap:this.returnDependencies?_:null,iconMap:this.returnDependencies?w:null,glyphPositions:this.returnDependencies?k.positions:null}})}}function n(t,r,i){let n=new e.J(r);for(let e of t)e.recalculate(n,i)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(e,t){this.loading[e]=t}finishLoading(e){delete this.loading[e]}abort(e){let t=this.loading[e];t?.abort&&(t.abort.abort(),delete this.loading[e])}setParsing(e,t){this.parsing[e]=t}consumeParsing(e){let t=this.parsing[e];if(t)return delete this.parsing[e],t}clearParsing(e){delete this.parsing[e]}markLoaded(e,t){this.loaded[e]=t}getLoaded(e){let t=this.loaded[e];if(t)return t}removeLoaded(e){delete this.loaded[e]}clearLoaded(){this.loaded={}}}class o{constructor(e){this.start=`${e}#start`,this.end=`${e}#end`,this.measure=e,performance.mark(this.start)}finish(){performance.mark(this.end);let e=performance.getEntriesByName(this.measure);return 0===e.length&&(performance.measure(this.measure,this.start,this.end),e=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),e}}class s{constructor(e,t,r,i,n){this.type=e,this.properties=r||{},this.extent=n,this.pointsArray=t,this.id=i}loadGeometry(){return this.pointsArray.map(t=>t.map(t=>new e.P(t.x,t.y)))}}class l{constructor(e,t,r){this.version=2,this._myFeatures=e,this.name=t,this.length=e.length,this.extent=r}feature(e){return this._myFeatures[e]}}class c{constructor(){this.layers={}}addLayer(e){this.layers[e.name]=e}}function u(t){let r=e.cS(t);return 0===r.byteOffset&&r.byteLength===r.buffer.byteLength||(r=new Uint8Array(r)),{vectorTile:t,rawData:r.buffer}}class h{constructor(t,r,i){this.actor=t,this.layerIndex=r,this.availableImages=i,this.tileState=new a,this.overzoomedTileResultCache=new e.cU(1e3)}loadVectorTile(t,r){try{return{vectorTile:"mlt"!==t.encoding?new e.cV(new e.cW(r)):new e.cX(r),rawData:r}}catch(a){let i=new Uint8Array(r),n=`Unable to parse the tile at ${t.request.url}, `;throw Error(n+=31===i[0]&&139===i[1]?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${e.d(a).message}`)}}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:r,overzoomParameters:n}=t;n&&(t.request=n.overzoomRequest);let a=this._startRequestTiming(t),o=new i(t);this.tileState.startLoading(r,o);let s=new AbortController;o.abort=s;try{let i=yield e.o(t.request,s);if(t.etag&&t.etag===i.etag)return this.tileState.finishLoading(r),this._getEtagUnmodifiedResult(i,a);let l=this.loadVectorTile(t,i.data);if(this.tileState.finishLoading(r),!l)return null;let{vectorTile:c,rawData:u}=l;n&&({vectorTile:c,rawData:u}=this._getOverzoomTile(t,c));let h=this._getExpiryData(i),d=this._finishRequestTiming(a);o.vectorTile=c,this.tileState.markLoaded(r,o);let f={rawData:u,cacheControl:h,resourceTiming:d};this.tileState.setParsing(r,f);try{return yield this._parseWorkerTile(o,t,f)}finally{this.tileState.clearParsing(r)}}catch(e){throw this.tileState.finishLoading(r),o.status="done",this.tileState.markLoaded(r,o),e}})}_getEtagUnmodifiedResult(t,r){let i=this._getExpiryData(t),n=this._finishRequestTiming(r);return e.e({etagUnmodified:!0},i,n)}_parseWorkerTile(t,r,i){return e._(this,void 0,void 0,function*(){let n=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,r.subdivisionGranularity);if(i){let{rawData:t,cacheControl:a,resourceTiming:o}=i;n=e.e({rawTileData:t.slice(0),encoding:r.encoding},n,a,o)}return n})}_getExpiryData({expires:e,cacheControl:t,etag:r}){let i={};return e&&(i.expires=e),t&&(i.cacheControl=t),r&&(i.etag=r),i}_startRequestTiming(e){var t;if(null!=(t=e.request)&&t.collectResourceTiming)return new o(e.request.url)}_finishRequestTiming(e){let t=e?.finish();return t?{resourceTiming:JSON.parse(JSON.stringify(t))}:{}}_getOverzoomTile(t,r){var i;let{tileID:n,source:a,overzoomParameters:o}=t,{maxZoomTileID:h}=o,d=`${h.key}_${n.key}_${null==(i=t.request)?void 0:i.url}`,f=this.overzoomedTileResultCache.get(d);if(f)return f;let p=new c,m=this.layerIndex.familiesBySource[a];for(let t in m){let i=r.layers[t];if(!i)continue;let a=function(t,r,i){let{extent:n}=t,a=Math.pow(2,i.z-r.z),o=(i.x-r.x*a)*n,c=(i.y-r.y*a)*n,u=[];for(let r=0;r0&&p.addLayer(a)}let g=u(p);return this.overzoomedTileResultCache.set(d,g),g}reloadTile(t){return e._(this,void 0,void 0,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)throw Error("Should not be trying to reload a tile that was never loaded or has been removed");if(r.showCollisionBoxes=t.showCollisionBoxes,"parsing"===r.status){let i=this.tileState.consumeParsing(e);return yield this._parseWorkerTile(r,t,i)}if("done"===r.status&&r.vectorTile)return yield this._parseWorkerTile(r,t)})}abortTile(t){return e._(this,void 0,void 0,function*(){this.tileState.abort(t.uid)})}removeTile(t){return e._(this,void 0,void 0,function*(){this.tileState.removeLoaded(t.uid)})}}class d{constructor(){this.loaded={}}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:r,encoding:i,rawImageData:n,redFactor:a,greenFactor:o,blueFactor:s,baseShift:l}=t,c=n.width+2,u=n.height+2,h=e.b(n)?new e.R({width:c,height:u},(yield e.cY(n,-1,-1,c,u))):n,d=new e.cZ(r,h,i,a,o,s,l);return this.loaded||(this.loaded={}),this.loaded[r]=d,d})}removeTile(e){let t=this.loaded,r=e.uid;t?.[r]&&delete t[r]}}class f{constructor(e,t,r,i=p){this.actor=e,this.layerIndex=t,this.availableImages=r,this.tileState=new a,this._createGeoJSONIndex=i}loadVectorTile(t){if(!this._geoJSONIndex)throw Error("Unable to parse the data into a cluster or geojson");let{z:r,x:i,y:n}=t.tileID.canonical,a=this._geoJSONIndex.getTile(r,i,n);return a?u(new e.c_(a.features,{version:2,extent:e.a6})):null}loadTile(t){return e._(this,void 0,void 0,function*(){let{uid:e}=t,r=new i(t);r.abort=new AbortController;try{let i=this.loadVectorTile(t);if(!i)return null;let{vectorTile:n,rawData:a}=i;r.vectorTile=n,this.tileState.markLoaded(e,r);let o={rawData:a};this.tileState.setParsing(e,o);try{return yield this._parseWorkerTile(r,t,o)}finally{this.tileState.clearParsing(e)}}catch(t){throw r.status="done",this.tileState.markLoaded(e,r),t}})}_reloadLoadedTile(t){return e._(this,void 0,void 0,function*(){let e=t.uid,r=this.tileState.getLoaded(e);if(!r)throw Error("Should not be trying to reload a tile that was never loaded or has been removed");if(r.showCollisionBoxes=t.showCollisionBoxes,"parsing"===r.status){let i=this.tileState.consumeParsing(e);return yield this._parseWorkerTile(r,t,i)}if("done"===r.status&&r.vectorTile)return yield this._parseWorkerTile(r,t)})}_parseWorkerTile(t,r,i){return e._(this,void 0,void 0,function*(){let n=yield t.parse(t.vectorTile,this.layerIndex,this.availableImages,this.actor,r.subdivisionGranularity);if(i){let{rawData:t}=i;n=e.e({rawTileData:t.slice(0),encoding:"mvt"},n)}return n})}abortTile(t){return e._(this,void 0,void 0,function*(){this.tileState.abort(t.uid)})}removeTile(t){return e._(this,void 0,void 0,function*(){this.tileState.removeLoaded(t.uid)})}loadData(t){return e._(this,void 0,void 0,function*(){var r;null==(r=this._pendingRequest)||r.abort();let i=this._startRequestTiming(t);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(t,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let e={};return t.request&&(e.data=t.data),this._finishRequestTiming(i,t,e),e}catch(t){if(delete this._pendingRequest,!e.$(t))throw t;return{abandoned:!0}}})}_startRequestTiming(e){var t;if(null!=(t=e.request)&&t.collectResourceTiming)return new o(e.request.url)}_finishRequestTiming(e,t,r){let i=e?.finish();i&&(r.resourceTiming={[t.source]:JSON.parse(JSON.stringify(i))})}reloadTile(e){return this.tileState.getLoaded(e.uid)?this._reloadLoadedTile(e):this.loadTile(e)}loadAndProcessGeoJSON(t,r){return e._(this,void 0,void 0,function*(){if(t.request&&(t.data=(yield e.k(t.request,r)).data),t.data)return t.data=this._filterGeoJSON(t.data,t.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(t.data,t));if(t.dataDiff)return null!=this._geoJSONIndex||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},t)),void this._geoJSONIndex.updateData(t.dataDiff,this._getFilterPredicate(t.filter));if(t.updateCluster&&this._geoJSONIndex.updateClusterOptions(t.geojsonVtOptions.cluster,m(t)),null==this._geoJSONIndex)throw Error(`Input data given to '${t.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(e,t){if("FeatureCollection"!==e.type)return e;let r=this._getFilterPredicate(t);return r?{type:"FeatureCollection",features:e.features.filter(e=>r(e))}:e}_getFilterPredicate(t){if("boolean"!=typeof t&&!t?.length)return;let r=e.c$(t,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if("error"===r.result)throw Error(r.value.map(e=>`${e.key}: ${e.message}`).join(", "));return e=>r.value.evaluate({zoom:0},e)}removeSource(t){return e._(this,void 0,void 0,function*(){var e;null==(e=this._pendingRequest)||e.abort()})}getClusterExpansionZoom(e){return this._geoJSONIndex.getClusterExpansionZoom(e.clusterId)}getClusterChildren(e){return this._geoJSONIndex.getClusterChildren(e.clusterId)}getClusterLeaves(e){return this._geoJSONIndex.getClusterLeaves(e.clusterId,e.limit,e.offset)}}function p(t,r){let i=e.e(r.geojsonVtOptions||{},{updateable:!0,clusterOptions:m(r)});return new e.d0(t,i)}function m({geojsonVtOptions:t,clusterProperties:r}){if(!r||!t.clusterOptions)return t.clusterOptions;let i={},n={},a={accumulated:null,zoom:0},o={properties:null},s=Object.keys(r);for(let t of s){let[a,o]=r[t],s=e.c$(o),l=e.c$("string"==typeof a?[a,["accumulated"],["get",t]]:a);i[t]=s.value,n[t]=l.value}return t.clusterOptions.map=e=>{o.properties=e;let t={};for(let e of s)t[e]=i[e].evaluate(a,o);return t},t.clusterOptions.reduce=(e,t)=>{for(let r of(o.properties=t,s))a.accumulated=e[r],e[r]=n[r].evaluate(a,o)},t.clusterOptions}class g{constructor(t){this.self=t,this.actor=new e.N(t),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(e,t)=>{if(this.externalWorkerSourceTypes[e])throw Error(`Worker source with name "${e}" already registered.`);this.externalWorkerSourceTypes[e]=t},this.self.addProtocol=e.cH,this.self.removeProtocol=e.cI,this.self.registerRTLTextPlugin=t=>{e.d1.setMethods(t)},this.self.makeRequest=e.m,this.actor.registerMessageHandler("LDT",(e,t)=>this._getDEMWorkerSource(e,t.source).loadTile(t)),this.actor.registerMessageHandler("RDT",(t,r)=>e._(this,void 0,void 0,function*(){this._getDEMWorkerSource(t,r.source).removeTile(r)})),this.actor.registerMessageHandler("GCEZ",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterExpansionZoom(r)})),this.actor.registerMessageHandler("GCC",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterChildren(r)})),this.actor.registerMessageHandler("GCL",(t,r)=>e._(this,void 0,void 0,function*(){return this._getWorkerSource(t,r.type,r.source).getClusterLeaves(r)})),this.actor.registerMessageHandler("LD",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadData(t)),this.actor.registerMessageHandler("LT",(e,t)=>this._getWorkerSource(e,t.type,t.source).loadTile(t)),this.actor.registerMessageHandler("RT",(e,t)=>this._getWorkerSource(e,t.type,t.source).reloadTile(t)),this.actor.registerMessageHandler("AT",(e,t)=>this._getWorkerSource(e,t.type,t.source).abortTile(t)),this.actor.registerMessageHandler("RMT",(e,t)=>this._getWorkerSource(e,t.type,t.source).removeTile(t)),this.actor.registerMessageHandler("RS",(t,r)=>e._(this,void 0,void 0,function*(){var e,i;if(!(null!=(i=null==(e=this.workerSources[t])?void 0:e[r.type])&&i[r.source]))return;let n=this.workerSources[t][r.type][r.source];delete this.workerSources[t][r.type][r.source],void 0!==n.removeSource&&n.removeSource(r)})),this.actor.registerMessageHandler("RM",t=>e._(this,void 0,void 0,function*(){delete this.layerIndexes[t],delete this.availableImages[t],delete this.workerSources[t],delete this.demWorkerSources[t],this.globalStates.delete(t)})),this.actor.registerMessageHandler("SR",(t,r)=>e._(this,void 0,void 0,function*(){this.referrer=r})),this.actor.registerMessageHandler("SRPS",(e,t)=>this._syncRTLPluginState(e,t)),this.actor.registerMessageHandler("IS",(t,r)=>e._(this,void 0,void 0,function*(){this.self.importScripts(r)})),this.actor.registerMessageHandler("SI",(e,t)=>this._setImages(e,t)),this.actor.registerMessageHandler("UL",(t,r)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).update(r.layers,r.removedIds,this._getGlobalState(t))})),this.actor.registerMessageHandler("UGS",(t,r)=>e._(this,void 0,void 0,function*(){let e=this._getGlobalState(t);for(let t in r)e[t]=r[t]})),this.actor.registerMessageHandler("SL",(t,r)=>e._(this,void 0,void 0,function*(){this._getLayerIndex(t).replace(r,this._getGlobalState(t))}))}_getGlobalState(e){let t=this.globalStates.get(e);return t||(t={},this.globalStates.set(e,t)),t}_setImages(t,r){return e._(this,void 0,void 0,function*(){for(let e in this.availableImages[t]=r,this.workerSources[t]){let i=this.workerSources[t][e];for(let e in i)i[e].availableImages=r}})}_syncRTLPluginState(t,r){return e._(this,void 0,void 0,function*(){return yield e.d1.syncState(r,this.self.importScripts)})}_getAvailableImages(e){let t=this.availableImages[e];return t||(t=[]),t}_getLayerIndex(e){let r=this.layerIndexes[e];return r||(r=this.layerIndexes[e]=new t),r}_getWorkerSource(e,t,r){var i,n;if((i=this.workerSources)[e]||(i[e]={}),(n=this.workerSources[e])[t]||(n[t]={}),!this.workerSources[e][t][r]){let i={sendAsync:(t,r)=>(t.targetMapId=e,this.actor.sendAsync(t,r))};switch(t){case"vector":this.workerSources[e][t][r]=new h(i,this._getLayerIndex(e),this._getAvailableImages(e));break;case"geojson":this.workerSources[e][t][r]=new f(i,this._getLayerIndex(e),this._getAvailableImages(e));break;default:this.workerSources[e][t][r]=new this.externalWorkerSourceTypes[t](i,this._getLayerIndex(e),this._getAvailableImages(e))}}return this.workerSources[e][t][r]}_getDEMWorkerSource(e,t){var r,i;return(r=this.demWorkerSources)[e]||(r[e]={}),(i=this.demWorkerSources[e])[t]||(i[t]=new d),this.demWorkerSources[e][t]}}return e.i(self)&&(self.worker=new g(self)),g}),r("index",["exports","./shared"],function(e,t){let r,i,n;var a,o,s,l,c,u,h="5.24.0";function d(){var e=new t.A(4);return t.A!=Float32Array&&(e[1]=0,e[2]=0),e[0]=1,e[3]=1,e}let f,p,m,g={frame(e,r,i,n){let a=n||window,o=a.requestAnimationFrame(e=>{s(),r(e)}),{unsubscribe:s}=t.s(e.signal,"abort",()=>{s(),a.cancelAnimationFrame(o),i(new t.a(e.signal.reason))},!1)},frameAsync(e,t){return new Promise((r,i)=>{this.frame(e,r,i,t)})},getImageData(e,t=0){return this.getImageCanvasContext(e).getImageData(-t,-t,e.width+2*t,e.height+2*t)},getImageCanvasContext(e){let t=window.document.createElement("canvas"),r=t.getContext("2d",{willReadFrequently:!0});if(!r)throw Error("failed to create canvas 2d context");return t.width=e.width,t.height=e.height,r.drawImage(e,0,0,e.width,e.height),r},resolveURL:e=>(f||(f=document.createElement("a")),f.href=e,f.href),hardwareConcurrency:"u">typeof navigator&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return void 0!==m?m:!!matchMedia&&(null!=p||(p=matchMedia("(prefers-reduced-motion: reduce)")),p.matches)},set prefersReducedMotion(de){m=de}},y=new class{constructor(){this._frozenAt=null}getCurrentTime(){return null!==this._frozenAt?this._frozenAt:performance.now()}setNow(e){this._frozenAt=e}restoreNow(){this._frozenAt=null}isFrozen(){return null!==this._frozenAt}};function v(){return y.getCurrentTime()}class x{static create(e,t,r){let i=window.document.createElement(e);return void 0!==t&&(i.className=t),r&&r.appendChild(i),i}static createNS(e,t){return window.document.createElementNS(e,t)}static disableDrag(){x.docStyle&&x.selectProp&&(x.userSelect=x.docStyle[x.selectProp],x.docStyle[x.selectProp]="none")}static enableDrag(){x.docStyle&&x.selectProp&&(x.docStyle[x.selectProp]=x.userSelect)}static suppressClickInternal(e){e.preventDefault(),e.stopPropagation(),window.removeEventListener("click",x.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",x.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",x.suppressClickInternal,!0)},0)}static getScale(e){let t=e.getBoundingClientRect();return{x:t.width/e.offsetWidth||1,y:t.height/e.offsetHeight||1,boundingClientRect:t}}static getPoint(e,r,i){let n=r.boundingClientRect;return new t.P((i.clientX-n.left)/r.x-e.clientLeft,(i.clientY-n.top)/r.y-e.clientTop)}static mousePos(e,t){let r=x.getScale(e);return x.getPoint(e,r,t)}static touchPos(e,t){let r=[],i=x.getScale(e);for(let n of t)r.push(x.getPoint(e,i,n));return r}static sanitize(e){let t=new DOMParser().parseFromString(e,"text/html").body||document.createElement("body");for(let e of t.querySelectorAll("script"))e.remove();return x.clean(t),t.innerHTML}static isPossiblyDangerous(e,t){let r=t.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(e)||!r.includes("javascript:")&&!r.includes("data:"))||!!e.startsWith("on")||void 0}static clean(e){for(let t of e.children)x.removeAttributes(t),x.clean(t)}static removeAttributes(e){for(let{name:t,value:r}of e.attributes)x.isPossiblyDangerous(t,r)&&e.removeAttribute(t)}}x.docStyle="u">typeof window&&(null==(s=window.document)?void 0:s.documentElement.style),x.selectProp=!x.docStyle||"userSelect"in x.docStyle?"userSelect":"webkitUserSelect",function(e){let r,i,n,a;e.resetRequestQueue=()=>{r=[],i=0,n=0,a={}},e.addThrottleControl=e=>{let t=n++;return a[t]=e,t},e.removeThrottleControl=e=>{delete a[e],s()},e.getImage=(e,i,n=!0)=>new Promise((a,o)=>{e.headers||(e.headers={}),e.headers.accept="image/webp,*/*",t.e(e,{type:"image"}),r.push({abortController:i,requestParameters:e,supportImageRefresh:n,state:"queued",onError:e=>{o(e)},onSuccess:e=>{a(e)}}),s()});let o=e=>t._(this,void 0,void 0,function*(){var r;e.state="running";let{requestParameters:n,supportImageRefresh:a,onError:o,onSuccess:c,abortController:u}=e,h=!1===a&&!t.i(self)&&!t.g(n.url)&&(!n.headers||Object.keys(n.headers).reduce((e,t)=>e&&"accept"===t,!0));i++;let d=h?l(n,u):t.m(n,u);try{let i=yield d;delete e.abortController,e.state="completed",i.data instanceof HTMLImageElement||t.b(i.data)?c(i):i.data&&c({data:yield(r=i.data,"function"==typeof createImageBitmap?t.h(r):t.j(r)),cacheControl:i.cacheControl,expires:i.expires})}catch(r){delete e.abortController,o(t.d(r))}finally{i--,s()}}),s=()=>{let e=(()=>{for(let e of Object.keys(a))if(a[e]())return!0;return!1})()?t.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:t.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let t=i;t0;t++){let e=r.shift();e.abortController.signal.aborted?t--:o(e)}},l=(e,r)=>new Promise((i,n)=>{let a=new Image,o=e.url,s=e.credentials;s&&"include"===s?a.crossOrigin="use-credentials":(s&&"same-origin"===s||!t.f(o))&&(a.crossOrigin="anonymous"),r.signal.addEventListener("abort",()=>{a.src="",n(new t.a(r.signal.reason))}),a.fetchPriority="high",a.onload=()=>{a.onerror=a.onload=null,i({data:a})},a.onerror=()=>{a.onerror=a.onload=null,r.signal.aborted||n(Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},a.src=o})}(l||(l={})),l.resetRequestQueue();class b{constructor(e){this._transformRequestFn=e??null}transformRequest(e,t){return this._transformRequestFn&&this._transformRequestFn(e,t)||{url:e}}setTransformRequest(e){this._transformRequestFn=e}}function _(e){let t=[];if("string"==typeof e)t.push({id:"default",url:e});else if(e&&e.length>0){let r=[];for(let{id:i,url:n}of e){let e=`${i}${n}`;r.includes(e)||(r.push(e),t.push({id:i,url:n}))}}return t}function w(e,t,r){try{let i=new URL(e);return i.pathname+=`${t}${r}`,i.toString()}catch{throw Error(`Invalid sprite URL "${e}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}class T extends t.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}destroy(){for(let e of(this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null),Object.keys(this.images)))this.removeImage(e);this.patterns={},this.atlasImage=new t.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(e){if(this.loaded!==e&&(this.loaded=e,e)){for(let{ids:e,promiseResolve:t}of this.requestors)t(this._getImagesForIds(e));this.requestors=[]}}getImage(e){let r=this.images[e];if(r&&!r.data&&r.spriteData){let e=r.spriteData;r.data=new t.R({width:e.width,height:e.height},e.context.getImageData(e.x,e.y,e.width,e.height).data),r.spriteData=null}return r}addImage(e,t){if(this.images[e])throw Error(`Image id ${e} already exist, use updateImage instead`);this._validate(e,t)&&(this.images[e]=t)}_validate(e,r){let i=!0,n=r.data||r.spriteData;return this._validateStretch(r.stretchX,n?.width)||(this.fire(new t.l(Error(`Image "${e}" has invalid "stretchX" value`))),i=!1),this._validateStretch(r.stretchY,n?.height)||(this.fire(new t.l(Error(`Image "${e}" has invalid "stretchY" value`))),i=!1),this._validateContent(r.content,r)||(this.fire(new t.l(Error(`Image "${e}" has invalid "content" value`))),i=!1),i}_validateStretch(e,t){if(!e)return!0;let r=0;for(let i of e){if(i[0]=e[1]))}updateImage(e,t,r=!0){let i=this.getImage(e);if(r&&(i.data.width!==t.data.width||i.data.height!==t.data.height))throw Error(`size mismatch between old image (${i.data.width}x${i.data.height}) and new image (${t.data.width}x${t.data.height}).`);t.version=i.version+1,this.images[e]=t,this.updatedImages[e]=!0}removeImage(e){var t;let r=this.images[e];delete this.images[e],delete this.patterns[e],null!=(t=r.userImage)&&t.onRemove&&r.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(e){return new Promise((t,r)=>{let i=!0;if(!this.isLoaded())for(let t of e)this.images[t]||(i=!1);this.isLoaded()||i?t(this._getImagesForIds(e)):this.requestors.push({ids:e,promiseResolve:t})})}_getImagesForIds(e){var r;let i={};for(let n of e){let e=this.getImage(n);e||(this.fire(new t.n("styleimagemissing",{id:n})),e=this.getImage(n)),e?i[n]={data:e.data.clone(),pixelRatio:e.pixelRatio,sdf:e.sdf,version:e.version,stretchX:e.stretchX,stretchY:e.stretchY,content:e.content,textFitWidth:e.textFitWidth,textFitHeight:e.textFitHeight,hasRenderCallback:!!(null!=(r=e.userImage)&&r.render)}:t.w(`Image "${n}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return i}getPixelSize(){let{width:e,height:t}=this.atlasImage;return{width:e,height:t}}getPattern(e){let r=this.patterns[e],i=this.getImage(e);if(!i)return null;if(r&&r.position.version===i.version)return r.position;if(r)r.position.version=i.version;else{let r={w:i.data.width+2,h:i.data.height+2,x:0,y:0},n=new t.I(r,i);this.patterns[e]={bin:r,position:n}}return this._updatePatternAtlas(),this.patterns[e].position}bind(e){let r=e.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new t.T(e,this.atlasImage,r.RGBA),this.atlasTexture.bind(r.LINEAR,r.CLAMP_TO_EDGE)}_updatePatternAtlas(){let e=[];for(let t in this.patterns)e.push(this.patterns[t].bin);let{w:r,h:i}=t.p(e),n=this.atlasImage;for(let e in n.resize({width:r||1,height:i||1}),this.patterns){let{bin:r}=this.patterns[e],i=r.x+1,a=r.y+1,o=this.getImage(e).data,s=o.width,l=o.height;t.R.copy(o,n,{x:0,y:0},{x:i,y:a},{width:s,height:l}),t.R.copy(o,n,{x:0,y:l-1},{x:i,y:a-1},{width:s,height:1}),t.R.copy(o,n,{x:0,y:0},{x:i,y:a+l},{width:s,height:1}),t.R.copy(o,n,{x:s-1,y:0},{x:i-1,y:a},{width:1,height:l}),t.R.copy(o,n,{x:0,y:0},{x:i+s,y:a},{width:1,height:l})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(e){for(let r of e){if(this.callbackDispatchedThisFrame[r])continue;this.callbackDispatchedThisFrame[r]=!0;let e=this.getImage(r);e||t.w(`Image with ID: "${r}" was not found`),function(e){let{userImage:t}=e;return!(!t?.render||!t.render()||(e.data.replace(new Uint8Array(t.data.buffer)),0))}(e)&&this.updateImage(r,e)}}cloneImages(){let e={};for(let t in this.images){let r=this.images[t];e[t]=Object.assign(Object.assign({},r),{data:r.data?r.data.clone():null})}return e}}let M=new Float64Array(256);for(let e=0;e<256;e++){let t=.5-Math.pow(e/255,.45454545454545453);M[e]=t*Math.abs(t)}function k(e,t,r,i,n,a,o,s,l){for(let c=t;c-1);a[++l]=s,o[l]=c,o[l+1]=1e20}for(let s=0,l=0;s/[-\w]+/.test(e)?e:`'${CSS.escape(e)}'`).join(",");return new E.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:r,fontWeight:this._fontWeight(t[0]),fontStyle:this._fontStyle(t[0]),lang:this.lang})}_fontStyle(e){return/italic/i.test(e)?"italic":/oblique/i.test(e)?"oblique":"normal"}_fontWeight(e){let t;for(let[r,i]of Object.entries({thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950}))RegExp(`\\b${r}\\b`,"i").test(e)&&(t=`${i}`);return t}destroy(){for(let e in this.entries){let t=this.entries[e];t.tinySDF=null,t.ideographTinySDF=null,t.glyphs={},t.requests={},t.ranges={}}this.entries={}}}E.loadGlyphRange=function(e,r,i,n){return t._(this,void 0,void 0,function*(){let a=256*r,o=a+255,s=yield n.transformRequest(i.replace("{fontstack}",e).replace("{range}",`${a}-${o}`),"Glyphs"),l=yield t.o(s,new AbortController);if(!l?.data)throw Error(`Could not load glyph range. range: ${r}, ${a}-${o}`);let c={};for(let e of t.q(l.data))c[e.id]=e;return c})},E.TinySDF=class{constructor({fontSize:e=24,buffer:t=3,radius:r=8,cutoff:i=.25,fontFamily:n="sans-serif",fontWeight:a="normal",fontStyle:o="normal",lang:s=null}={}){this.buffer=t,this.radius=r,this.cutoff=i,this.lang=s;let l=this.size=e+4*t,c=this._createCanvas(l),u=this.ctx=c.getContext("2d",{willReadFrequently:!0});u.font=`${o} ${a} ${e}px ${n}`,u.textBaseline="alphabetic",u.textAlign="left",u.fillStyle="black",this.gridOuter=new Float64Array(l*l),this.gridInner=new Float64Array(l*l),this.f=new Float64Array(l),this.z=new Float64Array(l+1),this.v=new Uint16Array(l)}_createCanvas(e){if("u">typeof OffscreenCanvas)return new OffscreenCanvas(e,e);let t=document.createElement("canvas");return t.width=t.height=e,t}draw(e){let{width:t,actualBoundingBoxAscent:r,actualBoundingBoxDescent:i,actualBoundingBoxLeft:n,actualBoundingBoxRight:a}=this.ctx.measureText(e),o=Math.ceil(r),s=Math.floor(n),l=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(a)-s)),c=Math.max(0,Math.min(this.size-this.buffer,o+Math.ceil(i))),u=l+2*this.buffer,h=c+2*this.buffer,d=Math.max(u*h,0),f=new Uint8ClampedArray(d),p={data:f,width:u,height:h,glyphWidth:l,glyphHeight:c,glyphTop:o,glyphLeft:s,glyphAdvance:t};if(0===l||0===c)return p;let{ctx:m,buffer:g,gridInner:y,gridOuter:v}=this;this.lang&&(m.lang=this.lang),m.clearRect(g,g,l,c),m.fillText(e,g-s,g+o);let x=m.getImageData(g,g,l,c);v.fill(1e20,0,d),y.fill(0,0,d);let b=3;for(let e=0;e1&&(o=e[++a]);let l=Math.min(Math.abs(s-o.left),Math.abs(s-o.right)),c,u=t/r*(i+1);if(o.isDash){let e=i-Math.abs(u);c=Math.sqrt(l*l+e*e)}else c=i-Math.sqrt(l*l+u*u);this.data[n+s]=Math.max(0,Math.min(255,c+128))}}}addRegularDash(e){for(let t=e.length-1;t>=0;--t){let r=e[t],i=e[t+1];r.zeroLength?e.splice(t,1):i&&i.isDash===r.isDash&&(i.left=r.left,e.splice(t,1))}let t=e[0],r=e[e.length-1];t.isDash===r.isDash&&(t.left=r.left-this.width,r.right=t.right+this.width);let i=this.width*this.nextRow,n=0,a=e[0];for(let t=0;t1&&(a=e[++n]);let r=Math.min(Math.abs(t-a.left),Math.abs(t-a.right));this.data[i+t]=Math.max(0,Math.min(255,(a.isDash?r:-r)+128))}}addDash(e,r){let i=7*!!r,n=2*i+1;if(this.nextRow+n>this.height)return t.w("LineAtlas out of space"),null;let a=0;for(let t of e)a+=t;if(0!==a){let t=this.width/a,n=this.getDashRanges(e,this.width,t);r?this.addRoundDash(n,t,i):this.addRegularDash(n)}let o={y:this.nextRow+i,height:2*i,width:a};return this.nextRow+=n,this.dirty=!0,o}bind(e){let t=e.gl;this.texture?(t.bindTexture(t.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,t.texSubImage2D(t.TEXTURE_2D,0,0,0,this.width,this.height,t.ALPHA,t.UNSIGNED_BYTE,this.data))):(this.texture=t.createTexture(),t.bindTexture(t.TEXTURE_2D,this.texture),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.REPEAT),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texImage2D(t.TEXTURE_2D,0,t.ALPHA,this.width,this.height,0,t.ALPHA,t.UNSIGNED_BYTE,this.data))}}let D="maplibre_preloaded_worker_pool";class O{constructor(){this.active={}}acquire(e){if(!this.workers)for(this.workers=[];this.workers.lengtht.m(r,i)),j}function V(e,t){let r=e.tileID,i=t.tileID;return r.overscaledZ-i.overscaledZ||r.canonical.y-i.canonical.y||r.wrap-i.wrap||r.canonical.x-i.canonical.x}function q(e,t){let r=e.feature,i=t.getFeatureState(r.layer["source-layer"],r.id);r.source=r.layer.source,r.layer["source-layer"]&&(r.sourceLayer=r.layer["source-layer"]),r.state=i}function H(e,r,i,n){return t._(this,void 0,void 0,function*(){let a=e;if(e.url?a=(yield t.k((yield r.transformRequest(e.url,"Source")),i)).data:yield g.frameAsync(i,n),!a)return null;let o=t.V(t.e(a,e),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in a&&a.vector_layers&&(o.vectorLayerIds=a.vector_layers.map(e=>e.id)),o})}class G{constructor(e,t){e&&(t?this.setSouthWest(e).setNorthEast(t):Array.isArray(e)&&(4===e.length?this.setSouthWest([e[0],e[1]]).setNorthEast([e[2],e[3]]):this.setSouthWest(e[0]).setNorthEast(e[1])))}setNorthEast(e){return this._ne=e instanceof t.W?new t.W(e.lng,e.lat):t.W.convert(e),this}setSouthWest(e){return this._sw=e instanceof t.W?new t.W(e.lng,e.lat):t.W.convert(e),this}extend(e){let r=this._sw,i=this._ne,n,a;if(e instanceof t.W)n=e,a=e;else{if(!(e instanceof G))return Array.isArray(e)?4===e.length||e.every(Array.isArray)?this.extend(G.convert(e)):this.extend(t.W.convert(e)):e&&("lng"in e||"lon"in e)&&"lat"in e?this.extend(t.W.convert(e)):this;if(n=e._sw,a=e._ne,!n||!a)return this}return r||i?(r.lng=Math.min(n.lng,r.lng),r.lat=Math.min(n.lat,r.lat),i.lng=Math.max(a.lng,i.lng),i.lat=Math.max(a.lat,i.lat)):(this._sw=new t.W(n.lng,n.lat),this._ne=new t.W(a.lng,a.lat)),this}getCenter(){return new t.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new t.W(this.getWest(),this.getNorth())}getSouthEast(){return new t.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(e){let{lng:r,lat:i}=t.W.convert(e),n=this._sw.lng<=r&&r<=this._ne.lng;return this._sw.lng>this._ne.lng&&(n=this._sw.lng>=r&&r>=this._ne.lng),this._sw.lat<=i&&i<=this._ne.lat&&n}intersects(e){if(!((e=G.convert(e)).getNorth()>=this.getSouth()&&e.getSouth()<=this.getNorth()))return!1;let r=Math.abs(this.getEast()-this.getWest()),i=Math.abs(e.getEast()-e.getWest());if(r>=360||i>=360)return!0;let n=t.X(this.getWest(),-180,180),a=t.X(this.getEast(),-180,180),o=t.X(e.getWest(),-180,180),s=t.X(e.getEast(),-180,180),l=n>a,c=o>s;return!(!l||!c)||(l?s>=n||o<=a:c?a>=o||n<=s:o<=a&&s>=n)}static convert(e){return e instanceof G?e:e&&new G(e)}static fromLngLat(e,r=0){let i=360*r/0x2637f09,n=i/Math.cos(Math.PI/180*e.lat);return new G(new t.W(e.lng-n,e.lat-i),new t.W(e.lng+n,e.lat+i))}adjustAntiMeridian(){let e=new t.W(this._sw.lng,this._sw.lat),r=new t.W(this._ne.lng,this._ne.lat);return new G(e,e.lng>r.lng?new t.W(r.lng+360,r.lat):r)}}class W{constructor(e,t,r){this.bounds=G.convert(this.validateBounds(e)),this.minzoom=t||0,this.maxzoom=r||24}validateBounds(e){return Array.isArray(e)&&4===e.length?[Math.max(-180,e[0]),Math.max(-90,e[1]),Math.min(180,e[2]),Math.min(90,e[3])]:[-180,-90,180,90]}contains(e){let r=Math.pow(2,e.z),i=Math.floor(t.Z(this.bounds.getWest())*r),n=Math.floor(t.Y(this.bounds.getNorth())*r),a=Math.ceil(t.Z(this.bounds.getEast())*r),o=Math.ceil(t.Y(this.bounds.getSouth())*r);return e.x>=i&&e.x=n&&e.y{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return t.e({},this._options)}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),r={request:yield this.map._requestManager.transformRequest(t,"Tile"),uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,tileSize:this.tileSize*e.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(e),etag:e.etag};r.request.collectResourceTiming=this._collectResourceTiming;let i="RT";if(e.actor&&"expired"!==e.state){if("loading"===e.state)return new Promise((t,r)=>{e.reloadPromise={resolve:t,reject:r}})}else e.actor=this.dispatcher.getActor(),i="LT";e.abortController=new AbortController;try{let t=yield e.actor.sendAsync({type:i,data:r},e.abortController);if(delete e.abortController,e.aborted)return;this._afterTileLoadWorkerResponse(e,t);let n={};return t?.etagUnmodified&&(n.unmodified=!0),n}catch(t){if(delete e.abortController,e.aborted)return;if(t&&404!==t.status)throw t;this._afterTileLoadWorkerResponse(e,null)}})}_getOverzoomParameters(e){return t._(this,void 0,void 0,function*(){if(e.tileID.canonical.z<=this.maxzoom||void 0===this.map._zoomLevelsToOverscale)return;let t=e.tileID.scaledTo(this.maxzoom).canonical,r=t.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:t,overzoomRequest:yield this.map._requestManager.transformRequest(r,"Tile")}})}_afterTileLoadWorkerResponse(e,t){if(t?.resourceTiming&&(e.resourceTiming=t.resourceTiming),t&&this.map._refreshExpiredTiles&&e.setExpiryData(t),e.etag=t?.etag,e.loadVectorData(t,this.map.painter),e.reloadPromise){let t=e.reloadPromise;e.reloadPromise=null,this.loadTile(e).then(t.resolve).catch(t.reject)}}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.actor&&(yield e.actor.sendAsync({type:"AT",data:{uid:e.uid,type:this.type,source:this.id}}))})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),e.actor&&(yield e.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class Z extends t.E{constructor(e,r,i,n){super(),this.id=e,this.dispatcher=i,this.setEventedParent(n),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=t.e({type:"raster"},r),t.e(this,t.V(r,["url","scheme","tileSize"]))}load(){return t._(this,arguments,void 0,function*(e=!1){this._loaded=!1,this.fire(new t.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let r=yield H(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,r&&(t.e(this,r),r.bounds&&(this.tileBounds=new W(r.bounds,this.minzoom,this.maxzoom)),this.fire(new t.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new t.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:e})))}catch(e){this._tileJSONRequest=null,this._loaded=!0,t.$(e)||this.fire(new t.l(t.d(e)))}})}loaded(){return this._loaded}onAdd(e){this.map=e,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(e){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),e(),this.load(!0)}setTiles(e){return this.setSourceProperty(()=>{this._options.tiles=e}),this}setUrl(e){return this.setSourceProperty(()=>{this.url=e,this._options.url=e}),this}serialize(){return t.e({},this._options)}hasTile(e){return!this.tileBounds||this.tileBounds.contains(e.canonical)}loadTile(e){return t._(this,void 0,void 0,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);e.abortController=new AbortController;try{let i=yield l.getImage((yield this.map._requestManager.transformRequest(r,"Tile")),e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(i?.data){this.map._refreshExpiredTiles&&(i.cacheControl||i.expires)&&e.setExpiryData({cacheControl:i.cacheControl,expires:i.expires});let r=this.map.painter.context,n=r.gl,a=i.data;e.texture=this.map.painter.getTileTexture(a.width),e.texture?e.texture.update(a,{useMipmap:!0}):(e.texture=new t.T(r,a,n.RGBA,{useMipmap:!0}),e.texture.bind(n.LINEAR,n.CLAMP_TO_EDGE,n.LINEAR_MIPMAP_NEAREST)),e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController)})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.texture&&this.map.painter.saveTileTexture(e.texture)})}hasTransition(){return!1}}class $ extends Z{constructor(e,r,i,n){super(e,r,i,n),this.type="raster-dem",this.maxzoom=22,this._options=t.e({type:"raster-dem"},r),this.encoding=r.encoding||"mapbox",this.redFactor=r.redFactor,this.greenFactor=r.greenFactor,this.blueFactor=r.blueFactor,this.baseShift=r.baseShift}loadTile(e){return t._(this,void 0,void 0,function*(){let r=e.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),i=yield this.map._requestManager.transformRequest(r,"Tile");e.neighboringTiles=this._getNeighboringTiles(e.tileID),e.abortController=new AbortController;try{let r=yield l.getImage(i,e.abortController,this.map._refreshExpiredTiles);if(delete e.abortController,e.aborted)return void(e.state="unloaded");if(r?.data){let i=r.data;this.map._refreshExpiredTiles&&(r.cacheControl||r.expires)&&e.setExpiryData({cacheControl:r.cacheControl,expires:r.expires});let n=t.b(i)&&t.a0()?i:yield this.readImageNow(i),a={type:this.type,uid:e.uid,source:this.id,rawImageData:n,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(e.actor&&"expired"!==e.state&&"reloading"!==e.state)return;e.actor&&"expired"!==e.state||(e.actor=this.dispatcher.getActor()),e.dem=yield e.actor.sendAsync({type:"LDT",data:a}),e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0,e.state="loaded"}}catch(t){if(delete e.abortController,e.aborted)e.state="unloaded";else if(t)throw e.state="errored",t}})}readImageNow(e){return t._(this,void 0,void 0,function*(){if("u">typeof VideoFrame&&t.a1()){let r=e.width+2,i=e.height+2;try{return new t.R({width:r,height:i},(yield t.a2(e,-1,-1,r,i)))}catch{}}return g.getImageData(e,1)})}_getNeighboringTiles(e){let r=e.canonical,i=Math.pow(2,r.z),n=(r.x-1+i)%i,a=0===r.x?e.wrap-1:e.wrap,o=(r.x+1+i)%i,s=r.x+1===i?e.wrap+1:e.wrap,l={};return l[new t.a3(e.overscaledZ,a,r.z,n,r.y).key]={backfilled:!1},l[new t.a3(e.overscaledZ,s,r.z,o,r.y).key]={backfilled:!1},r.y>0&&(l[new t.a3(e.overscaledZ,a,r.z,n,r.y-1).key]={backfilled:!1},l[new t.a3(e.overscaledZ,e.wrap,r.z,r.x,r.y-1).key]={backfilled:!1},l[new t.a3(e.overscaledZ,s,r.z,o,r.y-1).key]={backfilled:!1}),r.y+1[e.id,e])),i.update=new Map(null==(r=e.update)?void 0:r.map(e=>[e.id,e])),i}function J(e){return"GeometryCollection"===e.type?e.geometries.flatMap(e=>J(e)):function e(t){return t&&0!==t.length?"number"==typeof t[0]?[t]:t.flatMap(t=>e(t)):[]}(e.coordinates)}function Q(e){let t=new G,r;switch(e.type){case"FeatureCollection":r=e.features.flatMap(e=>J(e.geometry));break;case"Feature":r=J(e.geometry);break;default:r=J(e)}if(0===r.length)return t;for(let e of r){let[r,i]=e;t.extend([r,i])}return t}class ee extends t.E{constructor(e,r,i,n){super(),this.id=e,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:r.data},this.actor=i.getActor(),this.setEventedParent(n),this._data="string"==typeof r.data?{url:r.data}:{geojson:r.data},this._options=t.e({},r),this._collectResourceTiming=r.collectResourceTiming,void 0!==r.maxzoom&&(this.maxzoom=r.maxzoom),r.type&&(this.type=r.type),r.attribution&&(this.attribution=r.attribution),this.promoteId=r.promoteId,void 0!==r.clusterMaxZoom&&this.maxzoom<=r.clusterMaxZoom&&t.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${r.clusterMaxZoom}".`),this.workerOptions=t.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(void 0!==r.buffer?r.buffer:128),tolerance:this._pixelsToTileUnits(void 0!==r.tolerance?r.tolerance:.375),extent:t.a6,maxZoom:this.maxzoom,lineMetrics:r.lineMetrics||!1,generateId:r.generateId||!1,promoteId:"string"==typeof r.promoteId?r.promoteId:void 0,cluster:r.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(r.clusterMaxZoom),minPoints:Math.max(2,r.clusterMinPoints||2),extent:t.a6,radius:this._pixelsToTileUnits(r.clusterRadius||50),log:!1,generateId:r.generateId||!1}},clusterProperties:r.clusterProperties,filter:r.filter},r.workerOptions)}_hasPendingWorkerUpdate(){return void 0!==this._pendingWorkerUpdate.data||void 0!==this._pendingWorkerUpdate.diff||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(e){return e*(t.a6/this.tileSize)}_getClusterMaxZoom(e){let r=e?Math.round(e):this.maxzoom-1;return Number.isInteger(e)||void 0===e||t.w(`Integer expected for option 'clusterMaxZoom': provided value "${e}" rounded to "${r}"`),r}load(){return t._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(e){this.map=e,this.load()}setData(e,t){this._data="string"==typeof e?{url:e}:{geojson:e},this._pendingWorkerUpdate={data:e};let r=this._updateWorkerData();return t?r:this}updateData(e,t){this._pendingWorkerUpdate.diff=function(e,t){let r;if(!e)return t||{};if(!t)return e||{};let i=K(e),n=K(t);for(let e of(n.removeAll&&(i.add.clear(),i.update.clear(),i.remove.clear(),n.remove.clear()),n.remove))i.add.delete(e),i.update.delete(e);for(let[e,t]of n.update){let r=i.update.get(e);r&&(n.update.set(e,function(e,t){let r={id:e.id};if(t.removeAllProperties&&(delete e.removeProperties,delete e.addOrUpdateProperties,delete t.removeProperties),t.removeProperties)for(let r of t.removeProperties){let t=e.addOrUpdateProperties.findIndex(e=>e.key===r);t>-1&&e.addOrUpdateProperties.splice(t,1)}return(e.removeAllProperties||t.removeAllProperties)&&(r.removeAllProperties=!0),(e.removeProperties||t.removeProperties)&&(r.removeProperties=[...e.removeProperties||[],...t.removeProperties||[]]),(e.addOrUpdateProperties||t.addOrUpdateProperties)&&(r.addOrUpdateProperties=[...e.addOrUpdateProperties||[],...t.addOrUpdateProperties||[]]),(e.newGeometry||t.newGeometry)&&(r.newGeometry=t.newGeometry||e.newGeometry),r}(r,t)),i.update.delete(e))}let a={};if((i.removeAll||n.removeAll)&&(a.removeAll=!0),a.remove=new Set([...i.remove,...n.remove]),a.add=new Map([...i.add,...n.add]),a.update=new Map([...i.update,...n.update]),a.remove.size&&a.add.size)for(let e of a.add.keys())a.remove.delete(e);return r={},a.removeAll&&(r.removeAll=a.removeAll),a.remove&&(r.remove=Array.from(a.remove)),a.add&&(r.add=Array.from(a.add.values())),a.update&&(r.update=Array.from(a.update.values())),r}(this._pendingWorkerUpdate.diff,e);let r=this._updateWorkerData();return t?r:this}getData(){return t._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return t._(this,void 0,void 0,function*(){return Q((yield this.getData()))})}setClusterOptions(e){return this.workerOptions.geojsonVtOptions.cluster=e.cluster,void 0!==e.clusterRadius&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(e.clusterRadius)),void 0!==e.clusterMaxZoom&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(e.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(e){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:e,source:this.id}})}getClusterChildren(e){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:e,source:this.id}})}getClusterLeaves(e,t,r){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:e,limit:t,offset:r}})}_updateWorkerData(){return t._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void t.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:e,diff:r,updateCluster:i}=this._pendingWorkerUpdate,n=this._getLoadGeoJSONParameters(e,r,i);void 0!==e?this._pendingWorkerUpdate.data=void 0:r?this._pendingWorkerUpdate.diff=void 0:i&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(n)})}_getLoadGeoJSONParameters(e,r,i){return t._(this,void 0,void 0,function*(){let n=t.e({type:this.type},this.workerOptions);return"string"==typeof e?(n.request=yield this.map._requestManager.transformRequest(g.resolveURL(e),"Source"),n.request.collectResourceTiming=this._collectResourceTiming,n):void 0!==e?(n.data=e,n):r?(n.dataDiff=r,n):i?(n.updateCluster=!0,n):void 0})}_dispatchWorkerUpdate(e){return t._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new t.n("dataloading",{dataType:"source"}));try{let r=yield e,i=yield this.actor.sendAsync({type:"LD",data:r});if(this._isUpdatingWorker=!1,this._removed||i.abandoned)return void this.fire(new t.n("dataabort",{dataType:"source"}));i.data&&(this._data={geojson:i.data});let n=this._applyDiffToSource(r.dataDiff),a=this._getShouldReloadTileOptions(n),o={dataType:"source"};this._applyResourceTiming(o,i),this.fire(new t.n("data",Object.assign(Object.assign({},o),{sourceDataType:"metadata"}))),this.fire(new t.n("data",Object.assign(Object.assign({},o),{sourceDataType:"content",shouldReloadTileOptions:a})))}catch(e){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new t.n("dataabort",{dataType:"source"}));this.fire(new t.l(t.d(e)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(e,r){var i;if(!this._collectResourceTiming)return;let n=null==(i=r.resourceTiming)?void 0:i[this.id];if(!n)return;let a=n.slice(0);a?.length&&t.e(e,{resourceTiming:a})}_applyDiffToSource(e){if(!e)return;let t="string"==typeof this.promoteId?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let e=function(e,t){let r=new Map;if(null==e||null==e.type)return r;if("Feature"===e.type){let i=X(e,t);return null==i?void 0:(r.set(i,e),r)}if("FeatureCollection"===e.type){let i=new Set;for(let n of e.features){let e=X(n,t);if(null==e||i.has(e))return;i.add(e),r.set(e,n)}return r}}(this._data.geojson,t);if(!e)throw Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:e}}if(!this._data.updateable)return;let r=function(e,t,r){var i,n;let a=[];if(t.removeAll)e.clear();else if(t.remove)for(let r of t.remove){let t=e.get(r);t&&(a.push(t.geometry),e.delete(r))}if(t.add)for(let i of t.add){let t=X(i,r);if(null==t)continue;let n=e.get(t);n&&a.push(n.geometry),a.push(i.geometry),e.set(t,i)}if(t.update)for(let r of t.update){let t=e.get(r.id);if(!t)continue;let o=!!r.newGeometry,s=r.removeAllProperties||(null==(i=r.removeProperties)?void 0:i.length)>0||(null==(n=r.addOrUpdateProperties)?void 0:n.length)>0;if(!o&&!s)continue;a.push(t.geometry);let l=Object.assign({},t);if(e.set(r.id,l),o&&(a.push(r.newGeometry),l.geometry=r.newGeometry),s){if(l.properties=r.removeAllProperties?{}:Object.assign({},l.properties||{}),r.removeProperties)for(let e of r.removeProperties)delete l.properties[e];if(r.addOrUpdateProperties)for(let{key:e,value:t}of r.addOrUpdateProperties)l.properties[e]=t}}return a}(this._data.updateable,e,t);return e.removeAll||this._options.cluster?void 0:r}_getShouldReloadTileOptions(e){if(e)return{affectedBounds:e.filter(Boolean).map(e=>Q(e))}}shouldReloadTile(e,{affectedBounds:r}){if("loading"===e.state)return!0;if("unloaded"===e.state)return!1;let{buffer:i,extent:n}=this.workerOptions.geojsonVtOptions,a=function({x:e,y:r,z:i},n=0){return new G([t.a4((e-n)/Math.pow(2,i)),t.a5((r+1+n)/Math.pow(2,i))],[t.a4((e+1+n)/Math.pow(2,i)),t.a5((r-n)/Math.pow(2,i))])}(e.tileID.canonical,i/n);for(let e of r)if(a.intersects(e))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(e){return t._(this,void 0,void 0,function*(){let t=e.actor?"RT":"LT";e.actor=this.actor;let r={type:this.type,uid:e.uid,tileID:e.tileID,zoom:e.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};e.abortController=new AbortController;let i=yield this.actor.sendAsync({type:t,data:r},e.abortController);delete e.abortController,e.unloadVectorData(),e.aborted||e.loadVectorData(i,this.map.painter,"RT"===t)})}abortTile(e){return t._(this,void 0,void 0,function*(){e.abortController&&(e.abortController.abort(),delete e.abortController),e.aborted=!0})}unloadTile(e){return t._(this,void 0,void 0,function*(){e.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:e.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return t.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class et extends t.E{constructor(e,t,r,i){super(),this.flippedWindingOrder=!1,this.id=e,this.dispatcher=r,this.coordinates=t.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(i),this.options=t}load(e){return t._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new t.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let t=yield l.getImage((yield this.map._requestManager.transformRequest(this.url,"Image")),this._request);this._request=null,this._loaded=!0,t?.data&&(this.image=t.data,e&&(this.coordinates=e),this._finishLoading())}catch(e){this._request=null,this._loaded=!0,t.$(e)||this.fire(new t.l(t.d(e)))}})}loaded(){return this._loaded}updateImage(e){return e.url&&(this._request&&(this._request.abort(),this._request=null),this.options.url=e.url,this.load(e.coordinates).finally(()=>this.texture=null)),this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new t.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(e){this.map=e,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(e){var r;let i,n,a;this.coordinates=e;let o=e.map(t.a7.fromLngLat);return this.tileID=(a=Math.pow(2,n=Math.max(0,Math.floor(-Math.log(Math.max((i=t.a8.fromPoints(o)).width(),i.height()))/Math.LN2))),new t.aa(n,Math.floor((i.minX+i.maxX)/2*a),Math.floor((i.minY+i.maxY)/2*a))),this.terrainTileRanges=this._getOverlappingTileRanges(o),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=o.map(e=>this.tileID.getTilePoint(e)._round()),this.flippedWindingOrder=((r=this.tileCoords)[1].x-r[0].x)*(r[2].y-r[0].y)-(r[1].y-r[0].y)*(r[2].x-r[0].x)<0,this.fire(new t.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(0===Object.keys(this.tiles).length||!this.image)return;let e=this.map.painter.context,r=e.gl;this.texture||(this.texture=new t.T(e,this.image,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(e){return t._(this,void 0,void 0,function*(){var t;null!=(t=this.tileID)&&t.equals(e.tileID.canonical)?(this.tiles[String(e.tileID.wrap)]=e,e.buckets={}):e.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(e){let{minX:r,minY:i,maxX:n,maxY:a}=t.a8.fromPoints(e),o={};for(let e=0;e<=t.a9;e++){let t=Math.pow(2,e),s=Math.floor(r*t),l=Math.floor(i*t),c=Math.floor(n*t),u=Math.floor(a*t),h=(s%t+t)%t,d=c%t,f=Math.floor(s/t),p=Math.floor(c/t);o[e]={minWrap:f,maxWrap:p,minTileXWrapped:h,maxTileXWrapped:d,minTileY:l,maxTileY:u}}return o}}class er extends et{constructor(e,t,r,i){super(e,t,r,i),this._onPlayingHandler=()=>{var e;null==(e=this.map)||e.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=t}load(){return t._(this,void 0,void 0,function*(){this._loaded=!1;let e=this.options;for(let t of(this.urls=[],e.urls))this.urls.push((yield this.map._requestManager.transformRequest(t,"Source")).url);try{let e=yield t.ab(this.urls);if(this._loaded=!0,!e)return;this.video=e,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(e){this.fire(new t.l(t.d(e)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(e){if(this.video){let r=this.video.seekable;er.end(0)?this.fire(new t.l(new t.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${r.start(0)} and ${r.end(0)}-second mark.`))):this.video.currentTime=e}}getVideo(){return this.video}onAdd(e){this.map||(this.map=e,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(0===Object.keys(this.tiles).length||this.video.readyState<2)return;let e=this.map.painter.context,r=e.gl;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.T(e,this.video,r.RGBA),this.texture.bind(r.LINEAR,r.CLAMP_TO_EDGE));let i=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,i=!0)}i&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ei extends et{constructor(e,r,i,n){super(e,r,i,n),r.coordinates?Array.isArray(r.coordinates)&&4===r.coordinates.length&&!r.coordinates.some(e=>!Array.isArray(e)||2!==e.length||e.some(e=>"number"!=typeof e))||this.fire(new t.l(new t.ac(`sources.${e}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new t.l(new t.ac(`sources.${e}`,null,'missing required property "coordinates"'))),r.animate&&"boolean"!=typeof r.animate&&this.fire(new t.l(new t.ac(`sources.${e}`,null,'optional "animate" property must be a boolean value'))),r.canvas?"string"==typeof r.canvas||r.canvas instanceof HTMLCanvasElement||this.fire(new t.l(new t.ac(`sources.${e}`,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.l(new t.ac(`sources.${e}`,null,'missing required property "canvas"'))),this.options=r,this.animate=void 0===r.animate||r.animate}load(){return t._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new t.l(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())})}getCanvas(){return this.canvas}onAdd(e){this.map=e,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let 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)return;let r=this.map.painter.context,i=r.gl;this.texture?(e||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new t.T(r,this.canvas,i.RGBA,{premultiply:!0}),this.texture.bind(i.LINEAR,i.CLAMP_TO_EDGE));let n=!1;for(let e in this.tiles){let t=this.tiles[e];"loaded"!==t.state&&(t.state="loaded",t.texture=this.texture,n=!0)}n&&this.fire(new t.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let e of[this.canvas.width,this.canvas.height])if(isNaN(e)||e<=0)return!0;return!1}}let en={},ea=e=>{switch(e){case"geojson":return ee;case"image":return et;case"raster":return Z;case"raster-dem":return $;case"vector":return Y;case"video":return er;case"canvas":return ei}return en[e]},eo="RTLPluginLoaded";class es extends t.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=U()}_syncState(e){return this.status=e,this.dispatcher.broadcast("SRPS",{pluginStatus:e,pluginURL:this.url}).catch(e=>{throw this.status="error",e})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(e){return t._(this,arguments,void 0,function*(e,t=!1){if(this.url)throw Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=g.resolveURL(e),!this.url)throw Error(`requested url ${e} is invalid`);if("unavailable"===this.status){if(!t)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if("requested"===this.status)return this._requestImport()})}_requestImport(){return t._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new t.n(eo))})}lazyLoad(){"unavailable"===this.status?this.status="requested":"deferred"===this.status&&this._requestImport()}}let el=null;function ec(){return el||(el=new es),el}(a=c||(c={}))[a.Base=0]="Base",a[a.Parent=1]="Parent",(o=u||(u={}))[o.Departing=0]="Departing",o[o.Incoming=1]="Incoming";class eu{constructor(e,r){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=e,this.uid=t.ad(),this.uses=0,this.tileSize=r,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(e){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(e||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:e,fadingDirection:t,fadingParentID:r,fadeEndTime:i}){this.resetFadeLogic(),this.fadingRole=e,this.fadingDirection=t,this.fadingParentID=r,this.fadeEndTime=i}setSelfFadeLogic(e){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=e}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=v(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state}clearTextures(e){this.demTexture&&e.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(e,r,i){if(e?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",e){for(let n in e.featureIndex&&(this.latestFeatureIndex=e.featureIndex,e.rawTileData?(this.latestRawTileData=e.rawTileData,this.latestEncoding=e.encoding,this.latestFeatureIndex.rawTileData=e.rawTileData,this.latestFeatureIndex.encoding=e.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=e.collisionBoxArray,this.buckets=function(e,t){let r={};if(!t)return r;for(let i of e){let e=i.layerIds.map(e=>t.getLayer(e)).filter(Boolean);if(0!==e.length)for(let t of(i.layers=e,i.stateDependentLayerIds&&(i.stateDependentLayers=i.stateDependentLayerIds.map(t=>e.filter(e=>e.id===t)[0])),e))r[t.id]=i}return r}(e.buckets,r?.style),this.hasSymbolBuckets=!1,this.buckets){let e=this.buckets[n];if(e instanceof t.af){if(this.hasSymbolBuckets=!0,!i)break;e.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let e in this.buckets){let r=this.buckets[e];if(r instanceof t.af&&r.hasRTLText){this.hasRTLText=!0,ec().lazyLoad();break}}for(let e in this.queryPadding=0,this.buckets){let t=this.buckets[e];this.queryPadding=Math.max(this.queryPadding,r.style.getLayer(e).queryRadius(t))}e.imageAtlas&&(this.imageAtlas=e.imageAtlas),e.glyphAtlasImage&&(this.glyphAtlasImage=e.glyphAtlasImage),this.dashPositions=e.dashPositions}else this.collisionBoxArray=new t.ae;else this.state="loaded"}unloadVectorData(){for(let e in this.buckets)this.buckets[e].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(e){return this.buckets[e.id]}upload(e){for(let t in this.buckets){let r=this.buckets[t];r.uploadPending()&&r.upload(e)}let r=e.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new t.T(e,this.imageAtlas.image,r.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new t.T(e,this.glyphAtlasImage,r.ALPHA),this.glyphAtlasImage=null)}prepare(e){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(e,this.imageAtlasTexture)}queryRenderedFeatures(e,t,r,i,n,a,o,s,l,c,u){var h;return null!=(h=this.latestFeatureIndex)&&h.rawTileData?this.latestFeatureIndex.query({queryGeometry:i,cameraQueryGeometry:n,scale:a,tileSize:this.tileSize,pixelPosMatrix:c,transform:s,params:o,queryPadding:this.queryPadding*l,getElevation:u},e,t,r):{}}querySourceFeatures(e,r){let i=this.latestFeatureIndex;if(!i?.rawTileData)return;let n=i.loadVTLayers(),a=r?.sourceLayer?r.sourceLayer:"",o=n[t.ag]||n[a];if(!o)return;let s=t.ah(r?.filter,r?.globalState),{z:l,x:c,y:u}=this.tileID.canonical,h={z:l,x:c,y:u};for(let r=0;re)t=!1;else if(r)if(this.expirationTime({zoom:0,x:0,y:0,wrap:e,fullyVisible:!1}),b=[],_=[];if(e.renderWorldCopies&&s.allowWorldCopies())for(let e=1;e<=3;e++)b.push(x(-e)),b.push(x(e));for(b.push(x(0));b.length>0;){let f=b.pop(),g=f.x,x=f.y,w=f.fullyVisible,T={x:g,y:x,z:f.zoom},M=s.getTileBoundingVolume(T,f.wrap,e.elevation,r);if(!w){let e=function(e,t,r){let i=t.intersectsFrustum(e);if(!r||0===i)return i;let n=t.intersectsPlane(r);return 0===n?0:2===i&&2===n?2:1}(i,M,n);if(0===e)continue;w=2===e}let k=s.distanceToTile2d(a.x,a.y,T,M),A=c;l&&(A=(r.calculateTileZoom||eb)(e.zoom+t.ar(e.tileSize/r.tileSize),k,y,v,e.fov));let S=Math.min(A=Math.max(0,A=(r.roundZoom?Math.round:Math.floor)(A)),h);if(f.wrap=s.getWrap(o,T,f.wrap),f.zoom>=S){if(f.zoom>1),wrap:f.wrap,fullyVisible:w})}return _.sort((e,t)=>e.distanceSq-t.distanceSq).map(e=>e.tileID)}let eT=t.a8.fromPoints([new t.P(0,0),new t.P(t.a6,t.a6)]);function eM(e){return"raster"===e||"image"===e||"video"===e}function ek(e,t,r,i,n,a,o){if(r[0].overscaledZ>=a)return!1;let s=!1;for(let a of r){let r=e.getLoadedTile(a);if(!r)continue;let{fadingRole:l,fadingDirection:h,fadingParentID:d}=r;l===c.Base&&h===u.Departing&&d||(r.setCrossFadeLogic({fadingRole:c.Base,fadingDirection:u.Departing,fadingParentID:t.tileID,fadeEndTime:n+o}),t.setCrossFadeLogic({fadingRole:c.Parent,fadingDirection:u.Incoming,fadeEndTime:n+o})),i[a.key]=a,s=!0}return s}function eA(e,t){var r;e.needsHillshadePrepare=!0,e.needsTerrainPrepare=!0;let i=t.tileID.canonical.x-e.tileID.canonical.x,n=t.tileID.canonical.y-e.tileID.canonical.y,a=Math.pow(2,e.tileID.canonical.z),o=t.tileID.key;0===i&&0===n||Math.abs(n)>1||(Math.abs(i)>1&&(1===Math.abs(i+a)?i+=a:1===Math.abs(i-a)&&(i-=a)),t.dem&&e.dem&&(e.dem.backfillBorder(t.dem,i,n),null!=(r=e.neighboringTiles)&&r[o]&&(e.neighboringTiles[o].backfilled=!0)))}class eS{constructor(){this._tiles={}}handleWrapJump(e){let t={};for(let r in this._tiles){let i=this._tiles[r];i.tileID=i.tileID.unwrapTo(i.tileID.wrap+e),t[i.tileID.key]=i}this._tiles=t}setFeatureState(e,t){for(let r in this._tiles)this._tiles[r].setFeatureState(e,t)}getAllTiles(){return Object.values(this._tiles)}getAllIds(e=!1){return e?Object.values(this._tiles).map(e=>e.tileID).sort(t.au).map(e=>e.key):Object.keys(this._tiles)}getTileById(e){return this._tiles[e]}setTile(e,t){this._tiles[e]=t}deleteTileById(e){delete this._tiles[e]}getLoadedTile(e){let t=this.getTileById(e.key);return t?.hasData()?t:null}isIdRenderable(e,t=!1){var r;return null==(r=this.getTileById(e))?void 0:r.isRenderable(t)}getRenderableIds(e=0,r){let i=[];for(let e of this.getAllIds())this.isIdRenderable(e,r)&&i.push(this.getTileById(e));return r?i.sort((r,i)=>{let n=r.tileID,a=i.tileID,o=new t.P(n.canonical.x,n.canonical.y)._rotate(-e),s=new t.P(a.canonical.x,a.canonical.y)._rotate(-e);return n.overscaledZ-a.overscaledZ||s.y-o.y||s.x-o.x}).map(e=>e.tileID.key):i.map(e=>e.tileID).sort(t.au).map(e=>e.key)}}class eE extends t.E{constructor(e,r,i){super(),this.id=e,this.dispatcher=i,this.on("data",e=>{this._dataHandler(e)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((e,t,r,i)=>{let n=new(ea(t.type))(e,t,r,i);if(n.id!==e)throw Error(`Expected Source id to be ${e} instead of ${n.id}`);return n})(e,r,i,this),this._inViewTiles=new eS,this._outOfViewCache=new t.av(0,e=>this._unloadTile(e)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new eh,this._didEmitContent=!1,this._updated=!1}onAdd(e){var t;this.map=e,this._maxTileCacheSize=e?e._maxTileCacheSize:null,this._maxTileCacheZoomLevels=e?e._maxTileCacheZoomLevels:null,null!=(t=this._source)&&t.onAdd&&this._source.onAdd(e)}onRemove(e){var t;for(let e of this._inViewTiles.getAllTiles())e.unloadVectorData();this.clearTiles(),null!=(t=this._source)&&t.onRemove&&this._source.onRemove(e),this._inViewTiles=new eS}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(void 0===this.used&&void 0===this.usedForTerrain||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let e=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,e&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(e,r,i){return t._(this,void 0,void 0,function*(){try{let t=yield this._source.loadTile(e);this._tileLoaded(e,r,i,t)}catch(r){e.state="errored",404!==r.status?this._source.fire(new t.l(t.d(r),{tile:e})):this.update(this.transform,this.terrain)}})}_unloadTile(e){this._source.unloadTile&&this._source.unloadTile(e)}_abortTile(e){this._source.abortTile&&this._source.abortTile(e),this._source.fire(new t.n("dataabort",{tile:e,coord:e.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(e){for(let t of(this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null),this._inViewTiles.getAllTiles()))t.upload(e),t.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(e){var t;return this._inViewTiles.getRenderableIds(null==(t=this.transform)?void 0:t.bearingInRadians,e)}hasRenderableParent(e){let t=e.overscaledZ-1;if(t>=this._source.minzoom){let r=this.getLoadedTile(e.scaledTo(t));if(r)return this._inViewTiles.isIdRenderable(r.tileID.key)}return!1}reload(e,t){if(this._paused)this._shouldReloadOnResume=!0;else for(let r of(this._outOfViewCache.reset(),this._inViewTiles.getAllIds())){let i=this._inViewTiles.getTileById(r);t&&!this._source.shouldReloadTile(i,t)||(e?this._reloadTile(r,"expired"):"errored"!==i.state&&this._reloadTile(r,"reloading"))}}_reloadTile(e,r){return t._(this,void 0,void 0,function*(){let t=this._inViewTiles.getTileById(e);t&&("loading"!==t.state&&(t.state=r),yield this._loadTile(t,e,r))})}_tileLoaded(e,r,i,n){e.timeAdded=v(),e.selfFading&&(e.fadeEndTime=e.timeAdded+this._rasterFadeDuration),"expired"===i&&(e.refreshedUponExpiration=!0),this._setTileReloadTimer(r,e),n?.unmodified||("raster-dem"===this.getSource().type&&e.dem&&function(e,t){var r,i,n;for(let a of t.getRenderableIds()){if(!(null!=(r=e.neighboringTiles)&&r[a]))continue;let o=t.getTileById(a);e.neighboringTiles[a].backfilled||eA(e,o),null!=(n=null==(i=o.neighboringTiles)?void 0:i[e.tileID.key])&&n.backfilled||eA(o,e)}}(e,this._inViewTiles),this._state.initializeTileState(e,this.map?this.map.painter:null),e.aborted||this._source.fire(new t.n("data",{dataType:"source",tile:e,coord:e.tileID})))}getTile(e){return this.getTileByID(e.key)}getTileByID(e){return this._inViewTiles.getTileById(e)}_retainLoadedChildren(e,t){let r=this._getLoadedDescendents(t),i=new Set;for(let n of t){let t=r[n.key];if(!t?.length){i.add(n);continue}let a=n.overscaledZ+eE.maxOverzooming,o=t.filter(e=>e.tileID.overscaledZ<=a);if(!o.length){i.add(n);continue}let s=Math.min(...o.map(e=>e.tileID.overscaledZ)),l=o.filter(e=>e.tileID.overscaledZ===s).map(e=>e.tileID);for(let t of l)e[t.key]=t;this._areDescendentsComplete(l,s,n.overscaledZ)||i.add(n)}return i}_getLoadedDescendents(e){var t;let r={};for(let i of this._inViewTiles.getAllTiles().filter(e=>e.hasData()))for(let n of e)i.tileID.isChildOf(n)&&(r[t=n.key]||(r[t]=[]),r[n.key].push(i));return r}_areDescendentsComplete(e,t,r){return 1===e.length&&e[0].isOverscaled()?e[0].overscaledZ===t:Math.pow(4,t-r)===e.length}getLoadedTile(e){return this._inViewTiles.getLoadedTile(e)}updateCacheSize(e){let r=Math.floor((Math.ceil(e.width/this._source.tileSize)+1)*(Math.ceil(e.height/this._source.tileSize)+1)*(null===this._maxTileCacheZoomLevels?t.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),i="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,r):r;this._outOfViewCache.setMaxSize(i)}handleWrapJump(e){let t=Math.round((e-(void 0===this._prevLng?e:this._prevLng))/360);this._prevLng=e,t&&(this._inViewTiles.handleWrapJump(t),this._resetTileReloadTimers())}update(e,r){let i;if(!this._sourceLoaded||this._paused)return;this.transform=e,this.terrain=r,this.updateCacheSize(e),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?i=e.getVisibleUnwrappedCoordinates(this._source.tileID).map(e=>new t.a3(e.canonical.z,e.wrap,e.canonical.z,e.canonical.x,e.canonical.y)):(i=ew(e,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:"vector"===this._source.type&&void 0!==this.map._zoomLevelsToOverscale?e.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:r,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(i=i.filter(e=>this._source.hasTile(e)))):i=[],this.usedForTerrain&&(i=this._addTerrainIdealTiles(i));let n=0===i.length&&!this._updated&&this._didEmitContent;this._updated=!0,n&&this.fire(new t.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let a=e_(e,this._source),o=this._updateRetainedTiles(i,a),s=eM(this._source.type);s&&this._rasterFadeDuration>0&&!r&&function(e,r,i,n,a,o,s){let l=v(),h=t.at(r);for(let t of r){let r=e.getTileById(t.key);r.fadingDirection!==u.Departing&&0!==r.fadeOpacity||r.resetFadeLogic(),function(e,t,r,i,n,a,o){if(!t.hasData())return!1;let{tileID:s,fadingRole:l,fadingDirection:h,fadingParentID:d}=t;if(l===c.Base&&h===u.Incoming&&d)return r[d.key]=d,!0;let f=Math.max(s.overscaledZ-n,a);for(let n=s.overscaledZ-1;n>=f;n--){let a=s.scaledTo(n),l=e.getLoadedTile(a);if(l)return t.setCrossFadeLogic({fadingRole:c.Base,fadingDirection:u.Incoming,fadingParentID:l.tileID,fadeEndTime:i+o}),l.setCrossFadeLogic({fadingRole:c.Parent,fadingDirection:u.Departing,fadeEndTime:i+o}),r[a.key]=a,!0}return!1}(e,r,i,l,n,a,s)||function(e,t,r,i,n,a){if(!t.hasData())return!1;let o=t.tileID.children(n),s=ek(e,t,o,r,i,n,a);if(s)return!0;for(let l of o)ek(e,t,l.children(n),r,i,n,a)&&(s=!0);return s}(e,r,i,l,o,s)||function(e,t,r,i){let n=e.tileID;return!!e.selfFading||!e.hasData()&&!!t.has(n)&&(e.setSelfFadeLogic(r+i),!0)}(r,h,l,s)||r.resetFadeLogic()}}(this._inViewTiles,i,o,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),s?this._cleanUpRasterTiles(o):this._cleanUpVectorTiles(o)}_cleanUpRasterTiles(e){for(let t of this._inViewTiles.getAllIds())e[t]||this._removeTile(t)}_cleanUpVectorTiles(e){for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);e[t]?r.clearSymbolFadeHold():r.hasSymbolBuckets?r.holdingForSymbolFade()?r.symbolFadeFinished()&&this._removeTile(t):r.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(t)}}_addTerrainIdealTiles(e){let t=[];for(let r of e)if(r.canonical.z>this._source.minzoom){let e=r.scaledTo(r.canonical.z-1);t.push(e);let i=r.scaledTo(Math.max(this._source.minzoom,Math.min(r.canonical.z,5)));t.push(i)}return e.concat(t)}releaseSymbolFadeTiles(){for(let e of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(e).holdingForSymbolFade()&&this._removeTile(e)}_updateRetainedTiles(e,t){var r;let i=new Set;for(let t of e)this._addTile(t).hasData()||i.add(t);let n=e.reduce((e,t)=>(e[t.key]=t,e),{}),a=this._retainLoadedChildren(n,i),o={},s=Math.max(t-eE.maxUnderzooming,this._source.minzoom);for(let e of a){let t=this._inViewTiles.getTileById(e.key),i=t?.wasRequested();for(let a=e.overscaledZ-1;a>=s;--a){let s=e.scaledTo(a);if(o[s.key])break;if(o[s.key]=!0,(t=this.getTile(s))||!i||(t=this._addTile(s)),t){let e=t.hasData();if((e||!(null!=(r=this.map)&&r.cancelPendingTileRequestsWhileZooming)||i)&&(n[s.key]=s),i=t.wasRequested(),e)break}}}return n}_addTile(e){let r=this._inViewTiles.getTileById(e.key);if(r)return r;(r=this._outOfViewCache.getAndRemove(e))&&(r.resetFadeLogic(),this._setTileReloadTimer(e.key,r),r.tileID=e,this._state.initializeTileState(r,this.map?this.map.painter:null));let i=r;return r||(r=new eu(e,this._source.tileSize*e.overscaleFactor()),this._loadTile(r,e.key,r.state)),r.uses++,this._inViewTiles.setTile(e.key,r),i||this._source.fire(new t.n("dataloading",{tile:r,coord:r.tileID,dataType:"source"})),r}_setTileReloadTimer(e,t){this._clearTileReloadTimer(e);let r=t.getExpiryTimeout();r&&(this._timers[e]=setTimeout(()=>{this._reloadTile(e,"expired"),delete this._timers[e]},r))}_clearTileReloadTimer(e){let t=this._timers[e];t&&(clearTimeout(t),delete this._timers[e])}_resetTileReloadTimers(){for(let e in this._timers)clearTimeout(this._timers[e]),delete this._timers[e];for(let e of this._inViewTiles.getAllIds()){let t=this._inViewTiles.getTileById(e);this._setTileReloadTimer(e,t)}}refreshTiles(e){for(let t of this._inViewTiles.getAllIds()){let r=this._inViewTiles.getTileById(t);(this._inViewTiles.isIdRenderable(t)||"errored"==r.state)&&e.some(e=>e.equals(r.tileID.canonical))&&this._reloadTile(t,"expired")}}_removeTile(e){let t=this._inViewTiles.getTileById(e);t&&(t.uses--,this._inViewTiles.deleteTileById(e),this._clearTileReloadTimer(e),t.uses>0||(t.hasData()&&"reloading"!==t.state?this._outOfViewCache.add(t.tileID,t,t.getExpiryTimeout()):(t.aborted=!0,this._abortTile(t),this._unloadTile(t))))}_dataHandler(e){"source"===e.dataType&&("metadata"!==e.sourceDataType?"content"===e.sourceDataType&&this._sourceLoaded&&!this._paused&&(this.reload(e.sourceDataChanged,e.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){for(let e of(this._shouldReloadOnResume=!1,this._paused=!1,this._inViewTiles.getAllIds()))this._removeTile(e);this._outOfViewCache.reset()}tilesIn(e,r,i){let n=[],a=this.transform;if(!a)return n;let o=a.getCoveringTilesDetailsProvider().allowWorldCopies(),s=i?a.getCameraQueryGeometry(e):e,l=e=>a.screenPointToMercatorCoordinate(e,this.terrain),c=this.transformBbox(e,l,!o),u=this.transformBbox(s,l,!o),h=this.getIds(),d=t.a8.fromPoints(u);for(let e of h){let i=this._inViewTiles.getTileById(e);if(i.holdingForSymbolFade())continue;let s=o?[i.tileID]:[i.tileID.unwrapTo(-1),i.tileID.unwrapTo(0)],l=Math.pow(2,a.zoom-i.tileID.overscaledZ),h=r*i.queryPadding*t.a6/i.tileSize/l;for(let e of s){let r=d.map(r=>e.getTilePoint(new t.a7(r.x,r.y)));if(r.expandBy(h),r.intersects(eT)){let t=c.map(t=>e.getTilePoint(t)),r=u.map(t=>e.getTilePoint(t));n.push({tile:i,tileID:o?e:e.unwrapTo(0),queryGeometry:t,cameraQueryGeometry:r,scale:l})}}}return n}transformBbox(e,r,i){let n=e.map(r);if(i){let i=t.a8.fromPoints(e);i.shrinkBy(.001*Math.min(i.width(),i.height()));let a=i.map(r);t.a8.fromPoints(n).covers(a)||(n=n.map(e=>e.x>.5?new t.a7(e.x-1,e.y,e.z):e))}return n}getVisibleCoordinates(e){let t=this.getRenderableIds(e).map(e=>this._inViewTiles.getTileById(e).tileID);return this.transform&&this.transform.populateCache(t),t}hasTransition(){return!!this._source.hasTransition()||eM(this._source.type)&&function(e,t){if(t<=0)return!1;let r=v();for(let t of e.getAllTiles())if(t.fadeEndTime>=r)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(e){this._rasterFadeDuration=e}setFeatureState(e,r,i){e||(e=t.ag),this._state.updateState(e,r,i)}removeFeatureState(e,r,i){e||(e=t.ag),this._state.removeFeatureState(e,r,i)}getFeatureState(e,r){return e||(e=t.ag),this._state.getState(e,r)}setDependencies(e,t,r){let i=this._inViewTiles.getTileById(e);i&&i.setDependencies(t,r)}reloadTilesForDependencies(e,t){for(let r of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(r).hasDependency(e,t)&&this._reloadTile(r,"reloading");this._outOfViewCache.filter(r=>!r.hasDependency(e,t))}areTilesLoaded(){for(let e of this._inViewTiles.getAllTiles())if("loaded"!==e.state&&"errored"!==e.state)return!1;return!0}}eE.maxUnderzooming=10,eE.maxOverzooming=3;class eC{constructor(e,t){this.reset(e,t)}reset(e,t){this.points=e||[],this._distances=[0];for(let e=1;e0?(n-o)/s:0;return this.points[a].mult(1-l).add(this.points[r].mult(l))}}function eL(e,t){let r=!0;return"always"===e||"never"!==e&&"never"!==t||(r=!1),r}class eP{constructor(e,t,r){let i=this.boxCells=[],n=this.circleCells=[];this.xCellCount=Math.ceil(e/r),this.yCellCount=Math.ceil(t/r);for(let e=0;ethis.width||i<0||t>this.height)return[];let s=[];if(e<=0&&t<=0&&this.width<=r&&this.height<=i){if(n)return[{key:null,x1:e,y1:t,x2:r,y2:i}];for(let e=0;e0}hitTestCircle(e,t,r,i,n){let a=e-r,o=e+r,s=t-r,l=t+r;if(o<0||a>this.width||l<0||s>this.height)return!1;let c=[];return this._forEachCell(a,s,o,l,this._queryCellCircle,c,{hitTest:!0,overlapMode:i,circle:{x:e,y:t,radius:r},seenUids:{box:{},circle:{}}},n),c.length>0}_queryCell(e,t,r,i,n,a,o,s){let{seenUids:l,hitTest:c,overlapMode:u}=o,h=this.boxCells[n];if(null!==h){let n=this.bboxes;for(let o of h)if(!l.box[o]){l.box[o]=!0;let h=4*o,d=this.boxKeys[o];if(e<=n[h+2]+1e-6&&t<=n[h+3]+1e-6&&r>=n[h+0]-1e-6&&i>=n[h+1]-1e-6&&(!s||s(d))&&(!c||!eL(u,d.overlapMode))&&(a.push({key:d,x1:n[h],y1:n[h+1],x2:n[h+2],y2:n[h+3]}),c))return!0}}let d=this.circleCells[n];if(null!==d){let n=this.circles;for(let o of d)if(!l.circle[o]){l.circle[o]=!0;let h=3*o,d=this.circleKeys[o];if(this._circleAndRectCollide(n[h],n[h+1],n[h+2],e,t,r,i)&&(!s||s(d))&&(!c||!eL(u,d.overlapMode))){let e=n[h],t=n[h+1],r=n[h+2];if(a.push({key:d,x1:e-r,y1:t-r,x2:e+r,y2:t+r}),c)return!0}}}return!1}_queryCellCircle(e,t,r,i,n,a,o,s){let{circle:l,seenUids:c,overlapMode:u}=o,h=this.boxCells[n];if(null!==h){let e=this.bboxes;for(let t of h)if(!c.box[t]){c.box[t]=!0;let r=4*t,i=this.boxKeys[t];if(this._circleAndRectCollide(l.x,l.y,l.radius,e[r+0],e[r+1],e[r+2],e[r+3])&&(!s||s(i))&&!eL(u,i.overlapMode))return a.push(!0),!0}}let d=this.circleCells[n];if(null!==d){let e=this.circles;for(let t of d)if(!c.circle[t]){c.circle[t]=!0;let r=3*t,i=this.circleKeys[t];if(this._circlesCollide(e[r],e[r+1],e[r+2],l.x,l.y,l.radius)&&(!s||s(i))&&!eL(u,i.overlapMode))return a.push(!0),!0}}}_forEachCell(e,t,r,i,n,a,o,s){let l=this._convertToXCellCoord(e),c=this._convertToYCellCoord(t),u=this._convertToXCellCoord(r),h=this._convertToYCellCoord(i);for(let d=l;d<=u;d++)for(let l=c;l<=h;l++)if(n.call(this,e,t,r,i,this.xCellCount*l+d,a,o,s))return}_convertToXCellCoord(e){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(e*this.xScale)))}_convertToYCellCoord(e){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(e*this.yScale)))}_circlesCollide(e,t,r,i,n,a){let o=i-e,s=n-t,l=r+a;return l*l>o*o+s*s}_circleAndRectCollide(e,t,r,i,n,a,o){let s=(a-i)/2,l=Math.abs(e-(i+s));if(l>s+r)return!1;let c=(o-n)/2,u=Math.abs(t-(n+c));if(u>c+r)return!1;if(l<=s||u<=c)return!0;let h=l-s,d=u-c;return h*h+d*d<=r*r}}let eI=t.O();function ez(e,r,i){var n,a,o,s,l;let c=t.O();if(!e){let{vecSouth:e,vecEast:t}=eD(r),i=d();i[0]=t[0],i[1]=t[1],i[2]=e[0],i[3]=e[1],(l=(n=i[0])*(s=i[3])-(o=i[2])*(a=i[1]))&&(i[0]=s*(l=1/l),i[1]=-a*l,i[2]=-o*l,i[3]=n*l),c[0]=i[0],c[1]=i[1],c[4]=i[2],c[5]=i[3]}return t.S(c,c,[1/i,1/i,1]),c}function eD(e){let r=Math.cos(e.rollInRadians),i=Math.sin(e.rollInRadians),n=Math.cos(e.pitchInRadians),a=Math.cos(e.bearingInRadians),o=Math.sin(e.bearingInRadians),s=t.az();s[0]=-a*n*i-o*r,s[1]=-o*n*i+a*r;let l=t.aA(s);l<1e-9?t.aB(s):t.aC(s,s,1/l);let c=t.az();c[0]=a*n*r-o*i,c[1]=o*n*r+a*i;let u=t.aA(c);return u<1e-9?t.aB(c):t.aC(c,c,1/u),{vecEast:c,vecSouth:s}}function eO(e,r,i,n){let a;n?(a=[e,r,n(e,r),1],t.aE(a,a,i)):eZ(a=[e,r,0,1],a,i);let o=a[3];return{point:new t.P(a[0]/o,a[1]/o),signedDistanceFromCamera:o,isOccluded:!1}}function eR(e,t,r,i,n,a,o,s){let l=a.glyphStartIndex+a.numGlyphs,c=a.lineStartIndex,u=a.lineStartIndex+a.lineLength,h=t.getoffsetX(a.glyphStartIndex),d=t.getoffsetX(l-1),f=eG(e*h,r,i,n,a.segment,c,u,s,o);if(!f)return null;let p=eG(e*d,r,i,n,a.segment,c,u,s,o);return p?s.projectionCache.anyProjectionOccluded?null:{first:f,last:p}:null}function eF(e,r,i,n){return e===t.ax.horizontal&&Math.abs(i.y-r.y)>Math.abs(i.x-r.x)*n?{useVertical:!0}:(e===t.ax.vertical?r.yi.x)?{needsFlipping:!0}:null}function ej(e){let{projectionContext:r,pitchedLabelPlaneMatrixInverse:i,symbol:n,fontSize:a,flip:o,keepUpright:s,glyphOffsetArray:l,dynamicLayoutVertexArray:c,aspectRatio:u,rotateToLine:h}=e,d=a/24,f=n.lineOffsetX*d,p=n.lineOffsetY*d,m;if(n.numGlyphs>1){let e=n.glyphStartIndex+n.numGlyphs,t=n.lineStartIndex,a=n.lineStartIndex+n.lineLength,c=eR(d,l,f,p,o,n,h,r);if(!c)return{notEnoughRoom:!0};let g=eV(c.first.point.x,c.first.point.y,r,i),y=eV(c.last.point.x,c.last.point.y,r,i);if(s&&!o){let e=eF(n.writingMode,g,y,u);if(e)return e}m=[c.first];for(let i=n.glyphStartIndex+1;i0?s.point:eB(r.tileAnchorPoint,o,e,1,r),c=eV(e.x,e.y,r,i),h=eV(l.x,l.y,r,i),d=eF(n.writingMode,c,h,u);if(d)return d}let e=eG(d*l.getoffsetX(n.glyphStartIndex),f,p,o,n.segment,n.lineStartIndex,n.lineStartIndex+n.lineLength,r,h);if(!e||r.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};m=[e]}for(let e of m)t.aD(c,e.point,e.angle);return{}}function eB(e,t,r,i,n){let a=e.add(e.sub(t)._unit()),o=eU(a.x,a.y,n).point,s=r.sub(o);return r.add(s._mult(i/s.mag()))}function eN(e,r,i){let n=r.projectionCache;if(n.projections[e])return n.projections[e];let a=new t.P(r.lineVertexArray.getx(e),r.lineVertexArray.gety(e)),o=eU(a.x,a.y,r);if(o.signedDistanceFromCamera>0)return n.projections[e]=o.point,n.anyProjectionOccluded||(n.anyProjectionOccluded=o.isOccluded),o.point;let s=e-i.direction;return eB(0===i.distanceFromAnchor?r.tileAnchorPoint:new t.P(r.lineVertexArray.getx(s),r.lineVertexArray.gety(s)),a,i.previousVertex,i.absOffsetX-i.distanceFromAnchor+1,r)}function eU(e,t,r){let i=e+r.translation[0],n=t+r.translation[1],a;return r.pitchWithMap?(a=eO(i,n,r.pitchedLabelPlaneMatrix,r.getElevation)).isOccluded=!1:((a=r.transform.projectTileCoordinates(i,n,r.unwrappedTileID,r.getElevation)).point.x=(.5*a.point.x+.5)*r.width,a.point.y=(-(.5*a.point.y)+.5)*r.height),a}function eV(e,r,i,n){if(i.pitchWithMap){let a=[e,r,0,1];return t.aE(a,a,n),i.transform.projectTileCoordinates(a[0]/a[3],a[1]/a[3],i.unwrappedTileID,i.getElevation).point}return{x:e/i.width*2-1,y:1-r/i.height*2}}function eq(e,t,r){return r.transform.projectTileCoordinates(e,t,r.unwrappedTileID,r.getElevation)}function eH(e,t,r){return e._unit()._perp()._mult(t*r)}function eG(e,r,i,n,a,o,s,l,c){let u=n?e-r:e+r,h=u>0?1:-1,d=0;n&&(h*=-1,d=Math.PI),h<0&&(d+=Math.PI);let f,p=h>0?o+a:o+a+1;l.projectionCache.cachedAnchorPoint?f=l.projectionCache.cachedAnchorPoint:(f=eU(l.tileAnchorPoint.x,l.tileAnchorPoint.y,l).point,l.projectionCache.cachedAnchorPoint=f);let m,g,y=f,v=f,x=0,b=0,_=Math.abs(u),w=[],T;for(;x+b<=_;){if((p+=h)=s)return null;x+=b,v=y,g=m;let e={absOffsetX:_,direction:h,distanceFromAnchor:x,previousVertex:v};if(y=eN(p,l,e),0===i)w.push(v),T=y.sub(v);else{let r,n=y.sub(v);r=0===n.mag()?eH(eN(p+h,l,e).sub(y),i,h):eH(n,i,h),g||(g=v.add(r)),m=function(e,r,i,n,a,o,s,l,c){if(l.projectionCache.offsets[e])return l.projectionCache.offsets[e];let u=i.add(r);if(e+c.direction=a)return l.projectionCache.offsets[e]=u,u;let h=eN(e+c.direction,l,c),d=eH(h.sub(i),s,c.direction),f=i.add(d),p=h.add(d);return l.projectionCache.offsets[e]=t.aF(o,u,f,p)||u,l.projectionCache.offsets[e]}(p,r,y,o,s,g,i,l,e),w.push(g),T=m.sub(g)}b=T.mag()}let M=T._mult((_-x)/b)._add(g||v),k=d+Math.atan2(y.y-v.y,y.x-v.x);return w.push(M),{point:M,angle:c?k:0,path:w}}let eW=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function eY(e,t){for(let r=0;r=1;e--)f.push(o.path[e]);for(let e=1;ee.signedDistanceFromCamera<=0)?[]:e.map(e=>e.point)}let g=[];if(f.length>0){let e=f[0].clone(),r=f[0].clone();for(let t=1;t=i.x&&r.x<=n.x&&e.y>=i.y&&r.y<=n.y?[f]:r.xn.x||r.yn.y?[]:t.aG([f],i.x,i.y,n.x,n.y)}for(let t of g){a.reset(t,.25*r);let i=0;i=a.length<=.5*r?1:Math.ceil(a.paddedLength/p)+1;for(let t=0;tr&&(r=n,t=i);return e.slice(t,t+r)}((i=1/((r=t.pitchedLabelPlaneMatrix)[0]*r[5]-r[1]*r[4]),eI[0]=r[5]*i,eI[1]=-r[1]*i,eI[2]=0,eI[3]=0,eI[4]=-r[4]*i,eI[5]=r[0]*i,eI[6]=0,eI[7]=0,eI[8]=0,eI[9]=0,eI[10]=1/r[10],eI[11]=0,eI[12]=0,eI[13]=0,eI[14]=0,eI[15]=1/r[15],e.map(e=>{let r=eO(e.x,e.y,eI,t.getElevation),i=t.transform.projectTileCoordinates(r.point.x,r.point.y,t.unwrappedTileID,t.getElevation);return i.point.x=(.5*i.point.x+.5)*t.width,i.point.y=(-(.5*i.point.y)+.5)*t.height,i})))}queryRenderedSymbols(e){if(0===e.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};let r=[],i=new t.a8;for(let n of e){let e=new t.P(n.x+100,n.y+100);i.extend(e),r.push(e)}let{minX:n,minY:a,maxX:o,maxY:s}=i,l=this.grid.query(n,a,o,s).concat(this.ignoredGrid.query(n,a,o,s)),c={},u={};for(let e of l){let i=e.key;if(void 0===c[i.bucketInstanceId]&&(c[i.bucketInstanceId]={}),c[i.bucketInstanceId][i.featureIndex])continue;let n=[new t.P(e.x1,e.y1),new t.P(e.x2,e.y1),new t.P(e.x2,e.y2),new t.P(e.x1,e.y2)];t.aH(r,n)&&(c[i.bucketInstanceId][i.featureIndex]=!0,void 0===u[i.bucketInstanceId]&&(u[i.bucketInstanceId]=[]),u[i.bucketInstanceId].push(i.featureIndex))}return u}insertCollisionBox(e,t,r,i,n,a){(r?this.ignoredGrid:this.grid).insert({bucketInstanceId:i,featureIndex:n,collisionGroupID:a,overlapMode:t},e[0],e[1],e[2],e[3])}insertCollisionCircles(e,t,r,i,n,a){let o=r?this.ignoredGrid:this.grid,s={bucketInstanceId:i,featureIndex:n,collisionGroupID:a,overlapMode:t};for(let t=0;t=this.screenRightBoundary||i<100||t>this.screenBottomBoundary}isInsideGrid(e,t,r,i){return r>=0&&e=0&&tthis.projectAndGetPerspectiveRatio(e.x,e.y,n,c,h));E=e.some(e=>!e.isOccluded),S=e.map(e=>new t.P(e.x,e.y))}else E=!0;return{box:t.aI(S),allPointsOccluded:!E}}}class eX{constructor(e,t,r,i){this.opacity=e?Math.max(0,Math.min(1,e.opacity+(e.placed?t:-t))):i&&r?1:0,this.placed=r}isHidden(){return 0===this.opacity&&!this.placed}}class eK{constructor(e,t,r,i,n){this.text=new eX(e?e.text:null,t,r,n),this.icon=new eX(e?e.icon:null,t,i,n)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class eJ{constructor(e,t,r){this.text=e,this.icon=t,this.skipFade=r}}class eQ{constructor(e,t,r,i,n){this.bucketInstanceId=e,this.featureIndex=t,this.sourceLayerIndex=r,this.bucketIndex=i,this.tileID=n}}class e0{constructor(e){this.crossSourceCollisions=e,this.maxGroupID=0,this.collisionGroups={}}get(e){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[e]){let t=++this.maxGroupID;this.collisionGroups[e]={ID:t,predicate:e=>e.collisionGroupID===t}}return this.collisionGroups[e]}}function e1(e,r,i,n,a){let{horizontalAlign:o,verticalAlign:s}=t.aP(e);return new t.P(-(o-.5)*r+n[0]*a,-(s-.5)*i+n[1]*a)}class e2{constructor(e,t,r,i,n){this.transform=e.clone(),this.terrain=t,this.collisionIndex=new e$(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=r,this.retainedQueryData={},this.collisionGroups=new e0(i),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=n,n&&(n.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(e){let t=this.terrain;return t?(r,i)=>t.getElevation(e,r,i):null}getBucketParts(e,r,i,n){let a=i.getBucket(r),o=i.latestFeatureIndex;if(!a||!o||r.id!==a.layerIds[0])return;let s=i.collisionBoxArray,l=a.layers[0].layout,c=a.layers[0].paint,u=Math.pow(2,this.transform.zoom-i.tileID.overscaledZ),h=i.tileSize/t.a6,d=i.tileID.toUnwrapped(),f="map"===l.get("text-rotation-alignment"),p=t.aK(i,1,this.transform.zoom),m=t.aL(this.collisionIndex.transform,i,c.get("text-translate"),c.get("text-translate-anchor")),g=t.aL(this.collisionIndex.transform,i,c.get("icon-translate"),c.get("icon-translate-anchor")),y=ez(f,this.transform,p);this.retainedQueryData[a.bucketInstanceId]=new eQ(a.bucketInstanceId,o,a.sourceLayerIndex,a.index,i.tileID);let v={bucket:a,layout:l,translationText:m,translationIcon:g,unwrappedTileID:d,pitchedLabelPlaneMatrix:y,scale:u,textPixelRatio:h,holdingForFade:i.holdingForSymbolFade(),collisionBoxArray:s,partiallyEvaluatedTextSize:t.aw(a.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(a.sourceID)};if(n)for(let t of a.sortKeyRanges){let{sortKey:r,symbolInstanceStart:i,symbolInstanceEnd:n}=t;e.push({sortKey:r,symbolInstanceStart:i,symbolInstanceEnd:n,parameters:v})}else e.push({symbolInstanceStart:0,symbolInstanceEnd:a.symbolInstances.length,parameters:v})}attemptAnchorPlacement(e,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v,x,b){var _,w,T;let M=t.aM[e.textAnchor],k=[e.textOffset0,e.textOffset1],A=e1(M,i,n,k,a),S=this.collisionIndex.placeCollisionBox(r,d,l,c,u,s,o,g,h.predicate,x,A,b);if((!v||this.collisionIndex.placeCollisionBox(v,d,l,c,u,s,o,y,h.predicate,x,A,b).placeable)&&S.placeable){let e;if(null!=(_=this.prevPlacement)&&_.variableOffsets[f.crossTileID]&&null!=(T=null==(w=this.prevPlacement)?void 0:w.placements[f.crossTileID])&&T.text&&(e=this.prevPlacement.variableOffsets[f.crossTileID].anchor),0===f.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[f.crossTileID]={textOffset:k,width:i,height:n,anchor:M,textBoxScale:a,prevAnchor:e},this.markUsedJustification(p,M,f,m),p.allowVerticalPlacement&&(this.markUsedOrientation(p,m,f),this.placedOrientations[f.crossTileID]=m),{shift:A,placedGlyphBoxes:S}}}placeLayerBucketPart(e,r,i){let{bucket:n,layout:a,translationText:o,translationIcon:s,unwrappedTileID:l,pitchedLabelPlaneMatrix:c,textPixelRatio:u,holdingForFade:h,collisionBoxArray:d,partiallyEvaluatedTextSize:f,collisionGroup:p}=e.parameters,m=a.get("text-optional"),g=a.get("icon-optional"),y=t.aN(a,"text-overlap","text-allow-overlap"),v="always"===y,x=t.aN(a,"icon-overlap","icon-allow-overlap"),b="always"===x,_="map"===a.get("text-rotation-alignment"),w="map"===a.get("text-pitch-alignment"),T="none"!==a.get("icon-text-fit"),M="viewport-y"===a.get("symbol-z-order"),k=v&&(b||!n.hasIconData()||g),A=b&&(v||!n.hasTextData()||m);!n.collisionArrays&&d&&n.deserializeCollisionBoxes(d);let S=this.retainedQueryData[n.bucketInstanceId].tileID,E=this._getTerrainElevationFunc(S),C=this.transform.getFastPathSimpleProjectionMatrix(S),L=(e,d,b)=>{var M,L;if(r[e.crossTileID])return;if(h)return void(this.placements[e.crossTileID]=new eJ(!1,!1,!1));let P=!1,I=!1,z=!0,D=null,O={box:null,placeable:!1,offscreen:null,occluded:!1},R={placeable:!1},F=null,j=null,B=null,N=0,U=0,V=0;d.textFeatureIndex?N=d.textFeatureIndex:e.useRuntimeCollisionCircles&&(N=e.featureIndex),d.verticalTextFeatureIndex&&(U=d.verticalTextFeatureIndex);let q=d.textBox;if(q){let r=r=>{let i=t.ax.horizontal;if(n.allowVerticalPlacement&&!r&&this.prevPlacement){let t=this.prevPlacement.placedOrientations[e.crossTileID];t&&(this.placedOrientations[e.crossTileID]=t,i=t,this.markUsedOrientation(n,i,e))}return i},a=(r,i)=>{if(n.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&d.verticalTextBox){for(let e of n.writingModes)if(e===t.ax.vertical?R=O=i():O=r(),O?.placeable)break}else O=r()},c=e.textAnchorOffsetStartIndex,h=e.textAnchorOffsetEndIndex;if(h===c){let i=(t,r)=>{let i=this.collisionIndex.placeCollisionBox(t,y,u,S,l,w,_,o,p.predicate,E,void 0,C);return i?.placeable&&(this.markUsedOrientation(n,r,e),this.placedOrientations[e.crossTileID]=r),i};a(()=>i(q,t.ax.horizontal),()=>{let r=d.verticalTextBox;return n.allowVerticalPlacement&&e.numVerticalGlyphVertices>0&&r?i(r,t.ax.vertical):{box:null,offscreen:null}}),r(O?.placeable)}else{let f=t.aM[null==(L=null==(M=this.prevPlacement)?void 0:M.variableOffsets[e.crossTileID])?void 0:L.anchor],m=(t,r,a)=>{let d=t.x2-t.x1,m=t.y2-t.y1,g=e.textBoxScale,v=T&&"never"===x?r:null,b=null,M="never"===y?1:2,k="never";f&&M++;for(let r=0;rm(q,d.iconBox,t.ax.horizontal),()=>{let r=d.verticalTextBox;return n.allowVerticalPlacement&&!O?.placeable&&e.numVerticalGlyphVertices>0&&r?m(r,d.verticalIconBox,t.ax.vertical):{box:null,occluded:!0,offscreen:null}}),O&&(P=O.placeable,z=O.offscreen);let g=r(O?.placeable);if(!P&&this.prevPlacement){let t=this.prevPlacement.variableOffsets[e.crossTileID];t&&(this.variableOffsets[e.crossTileID]=t,this.markUsedJustification(n,t.anchor,e,g))}}}if(F=O,P=F?.placeable,z=F?.offscreen,e.useRuntimeCollisionCircles&&e.centerJustifiedTextSymbolIndex>=0){let r=n.text.placedSymbolArray.get(e.centerJustifiedTextSymbolIndex),s=t.ay(n.textSizeData,f,r),u=a.get("text-padding");(j=this.collisionIndex.placeCollisionCircles(y,r,n.lineVertexArray,n.glyphOffsetArray,s,l,c,i,w,p.predicate,e.collisionCircleDiameter,u,o,E)).circles.length&&j.collisionDetected&&!i&&t.w("Collisions detected, but collision boxes are not shown"),P=v||j.circles.length>0&&!j.collisionDetected,z&&(z=j.offscreen)}if(d.iconFeatureIndex&&(V=d.iconFeatureIndex),d.iconBox){let e=e=>this.collisionIndex.placeCollisionBox(e,x,u,S,l,w,_,s,p.predicate,E,T&&D?D:void 0,C);I=R&&R.placeable&&d.verticalIconBox?(B=e(d.verticalIconBox)).placeable:(B=e(d.iconBox)).placeable,z&&(z=B.offscreen)}let H=m||0===e.numHorizontalGlyphVertices&&0===e.numVerticalGlyphVertices,G=g||0===e.numIconVertices;H||G?G?H||I&&(I=P):P=I&&P:I=P=I&&P;let W=I&&B.placeable;if(P&&F.placeable&&this.collisionIndex.insertCollisionBox(F.box,y,a.get("text-ignore-placement"),n.bucketInstanceId,R&&R.placeable&&U?U:N,p.ID),W&&this.collisionIndex.insertCollisionBox(B.box,x,a.get("icon-ignore-placement"),n.bucketInstanceId,V,p.ID),j&&P&&this.collisionIndex.insertCollisionCircles(j.circles,y,a.get("text-ignore-placement"),n.bucketInstanceId,N,p.ID),i&&this.storeCollisionData(n.bucketInstanceId,b,d,F,B,j),0===e.crossTileID)throw Error("symbolInstance.crossTileID can't be 0");if(0===n.bucketInstanceId)throw Error("bucket.bucketInstanceId can't be 0");this.placements[e.crossTileID]=new eJ((P||k)&&!F?.occluded,(I||A)&&!B?.occluded,z||n.justReloaded),r[e.crossTileID]=!0};if(M){if(0!==e.symbolInstanceStart)throw Error("bucket.bucketInstanceId should be 0");let t=n.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let e=t.length-1;e>=0;--e){let r=t[e];L(n.symbolInstances.get(r),n.collisionArrays[r],r)}}else for(let t=e.symbolInstanceStart;t=0&&(e.text.placedSymbolArray.get(o).crossTileID=a>=0&&o!==a?0:i.crossTileID)}markUsedOrientation(e,r,i){let n=r===t.ax.horizontal||r===t.ax.horizontalOnly?r:0,a=r===t.ax.vertical?r:0;for(let t of[i.leftJustifiedTextSymbolIndex,i.centerJustifiedTextSymbolIndex,i.rightJustifiedTextSymbolIndex])e.text.placedSymbolArray.get(t).placedOrientation=n;i.verticalPlacedTextSymbolIndex&&(e.text.placedSymbolArray.get(i.verticalPlacedTextSymbolIndex).placedOrientation=a)}commit(e){this.commitTime=e,this.zoomAtLastRecencyCheck=this.transform.zoom;let t=this.prevPlacement,r=!1;this.prevZoomAdjustment=t?t.zoomAdjustment(this.transform.zoom):0;let i=t?t.symbolFadeChange(e):1,n=t?t.opacities:{},a=t?t.variableOffsets:{},o=t?t.placedOrientations:{};for(let e in this.placements){let t=this.placements[e],a=n[e];a?(this.opacities[e]=new eK(a,i,t.text,t.icon),r||(r=t.text!==a.text.placed),r||(r=t.icon!==a.icon.placed)):(this.opacities[e]=new eK(null,i,t.text,t.icon,t.skipFade),r||(r=t.text||t.icon))}for(let e in n){let t=n[e];if(!this.opacities[e]){let n=new eK(t,i,!1,!1);n.isHidden()||(this.opacities[e]=n,r||(r=t.text.placed),r||(r=t.icon.placed))}}for(let e in a)this.variableOffsets[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.variableOffsets[e]=a[e]);for(let e in o)this.placedOrientations[e]||!this.opacities[e]||this.opacities[e].isHidden()||(this.placedOrientations[e]=o[e]);if(t&&void 0===t.lastPlacementChangeTime)throw Error("Last placement time for previous placement is not defined");r?this.lastPlacementChangeTime=e:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=t?t.lastPlacementChangeTime:e)}updateLayerOpacities(e,t){let r={};for(let i of t){let t=i.getBucket(e);t&&i.latestFeatureIndex&&e.id===t.layerIds[0]&&this.updateBucketOpacities(t,i.tileID,r,i.collisionBoxArray)}}updateBucketOpacities(e,r,i,n){e.hasTextData()&&(e.text.opacityVertexArray.clear(),e.text.hasVisibleVertices=!1),e.hasIconData()&&(e.icon.opacityVertexArray.clear(),e.icon.hasVisibleVertices=!1),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexArray.clear(),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexArray.clear();let a=e.layers[0],o=a.layout,s=new eK(null,0,!1,!1,!0),l=o.get("text-allow-overlap"),c=o.get("icon-allow-overlap"),u=a._unevaluatedLayout.hasValue("text-variable-anchor")||a._unevaluatedLayout.hasValue("text-variable-anchor-offset"),h="map"===o.get("text-rotation-alignment"),d="map"===o.get("text-pitch-alignment"),f="none"!==o.get("icon-text-fit"),p=new eK(null,0,l&&(c||!e.hasIconData()||o.get("icon-optional")),c&&(l||!e.hasTextData()||o.get("text-optional")),!0);!e.collisionArrays&&n&&(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData())&&e.deserializeCollisionBoxes(n);let m=(e,t,r)=>{for(let i=0;i0,v=this.placedOrientations[n.crossTileID],x=v===t.ax.vertical,b=v===t.ax.horizontal||v===t.ax.horizontalOnly;if(a>0||o>0){let t=e5(c.text);m(e.text,a,x?e4:t),m(e.text,o,b?e4:t);let r=c.text.isHidden();for(let t of[n.rightJustifiedTextSymbolIndex,n.centerJustifiedTextSymbolIndex,n.leftJustifiedTextSymbolIndex])t>=0&&(e.text.placedSymbolArray.get(t).hidden=r||x?1:0);n.verticalPlacedTextSymbolIndex>=0&&(e.text.placedSymbolArray.get(n.verticalPlacedTextSymbolIndex).hidden=r||b?1:0);let i=this.variableOffsets[n.crossTileID];i&&this.markUsedJustification(e,i.anchor,n,v);let s=this.placedOrientations[n.crossTileID];s&&(this.markUsedJustification(e,"left",n,s),this.markUsedOrientation(e,s,n))}if(y){let t=e5(c.icon),r=!(f&&n.verticalPlacedIconSymbolIndex&&x);n.placedIconSymbolIndex>=0&&(m(e.icon,n.numIconVertices,r?t:e4),e.icon.placedSymbolArray.get(n.placedIconSymbolIndex).hidden=c.icon.isHidden()),n.verticalPlacedIconSymbolIndex>=0&&(m(e.icon,n.numVerticalIconVertices,r?e4:t),e.icon.placedSymbolArray.get(n.verticalPlacedIconSymbolIndex).hidden=c.icon.isHidden())}let _=g?.has(r)?g.get(r):{text:null,icon:null};if(e.hasIconCollisionBoxData()||e.hasTextCollisionBoxData()){let i=e.collisionArrays[r];if(i){let r=new t.P(0,0);if(i.textBox||i.verticalTextBox){let t=!0;if(u){let e=this.variableOffsets[l];e?(r=e1(e.anchor,e.width,e.height,e.textOffset,e.textBoxScale),h&&r._rotate(d?-this.transform.bearingInRadians:this.transform.bearingInRadians)):t=!1}if(i.textBox||i.verticalTextBox){let n;i.textBox&&(n=x),i.verticalTextBox&&(n=b),e3(e.textCollisionBox.collisionVertexArray,c.text.placed,!t||n,_.text,r.x,r.y)}}if(i.iconBox||i.verticalIconBox){let t=!!(!b&&i.verticalIconBox),n;i.iconBox&&(n=t),i.verticalIconBox&&(n=!t),e3(e.iconCollisionBox.collisionVertexArray,c.icon.placed,n,_.icon,f?r.x:0,f?r.y:0)}}}}if(e.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[e.bucketInstanceId]&&(this.retainedQueryData[e.bucketInstanceId].featureSortOrder=e.featureSortOrder),e.hasTextData()&&e.text.opacityVertexBuffer&&e.text.opacityVertexBuffer.updateData(e.text.opacityVertexArray),e.hasIconData()&&e.icon.opacityVertexBuffer&&e.icon.opacityVertexBuffer.updateData(e.icon.opacityVertexArray),e.hasIconCollisionBoxData()&&e.iconCollisionBox.collisionVertexBuffer&&e.iconCollisionBox.collisionVertexBuffer.updateData(e.iconCollisionBox.collisionVertexArray),e.hasTextCollisionBoxData()&&e.textCollisionBox.collisionVertexBuffer&&e.textCollisionBox.collisionVertexBuffer.updateData(e.textCollisionBox.collisionVertexArray),e.text.opacityVertexArray.length!==e.text.layoutVertexArray.length/4)throw Error(`bucket.text.opacityVertexArray.length (= ${e.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${e.text.layoutVertexArray.length}) / 4`);if(e.icon.opacityVertexArray.length!==e.icon.layoutVertexArray.length/4)throw Error(`bucket.icon.opacityVertexArray.length (= ${e.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${e.icon.layoutVertexArray.length}) / 4`);e.bucketInstanceId in this.collisionCircleArrays&&(e.collisionCircleArray=this.collisionCircleArrays[e.bucketInstanceId],delete this.collisionCircleArrays[e.bucketInstanceId])}symbolFadeChange(e){return 0===this.fadeDuration?1:(e-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(e){return Math.max(0,(this.transform.zoom-e)/1.5)}hasTransitions(e){return this.stale||e-this.lastPlacementChangeTimee}setStale(){this.stale=!0}}function e3(e,t,r,i,n,a){i&&0!==i.length||(i=[0,0,0,0]);let o=i[0]-100,s=i[1]-100,l=i[2]-100,c=i[3]-100;e.emplaceBack(+!!t,+!!r,n||0,a||0,o,s),e.emplaceBack(+!!t,+!!r,n||0,a||0,l,s),e.emplaceBack(+!!t,+!!r,n||0,a||0,l,c),e.emplaceBack(+!!t,+!!r,n||0,a||0,o,c)}function e5(e){if(0===e.opacity&&!e.placed)return 0;if(1===e.opacity&&e.placed)return 0xffffffff;let t=+!!e.placed,r=Math.floor(127*e.opacity);return 0x2000000*r+0x1000000*t+131072*r+65536*t+512*r+256*t+2*r+t}let e4=0;class e6{constructor(e){this._sortAcrossTiles="viewport-y"!==e.layout.get("symbol-z-order")&&!e.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(e,t,r,i,n){let a=this._bucketParts;for(;this._currentTileIndexe.sortKey-t.sortKey));this._currentPartIndex!this._forceFullPlacement&&v()-n>2;for(;this._currentPlacementIndex>=0;){let n=r[e[this._currentPlacementIndex]],o=this.placement.collisionIndex.transform.zoom;if(t.aQ(n)&&n.layout&&(!n.minzoom||n.minzoom<=o)&&(!n.maxzoom||n.maxzoom>o)){if(this._inProgressLayer||(this._inProgressLayer=new e6(n)),this._inProgressLayer.continuePlacement(i[n.source],this.placement,this._showCollisionBoxes,n,a))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(e){return this.placement.commit(e),this.placement}}let e7=512/t.a6/2;class e9{constructor(e,r,i){this.tileID=e,this.bucketInstanceId=i,this._symbolsByKey={};let n=new Map;for(let e=0;e({x:Math.floor(e.anchorX*e7),y:Math.floor(e.anchorY*e7)})),crossTileIDs:r.map(e=>e.crossTileID)};if(i.positions.length>128){let e=new t.aR(i.positions.length,16,Uint16Array);for(let{x:t,y:r}of i.positions)e.add(t,r);e.finish(),delete i.positions,i.index=e}this._symbolsByKey[e]=i}}getScaledCoordinates(e,r){let{x:i,y:n,z:a}=this.tileID.canonical,{x:o,y:s,z:l}=r.canonical,c=e7/Math.pow(2,l-a),u=(s*t.a6+e.anchorY)*c,h=n*t.a6*e7;return{x:Math.floor((o*t.a6+e.anchorX)*c-i*t.a6*e7),y:Math.floor(u-h)}}findMatches(e,t,r){let i=this.tileID.canonical.ze)}}class te{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class tt{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(e){let t=Math.round((e-this.lng)/360);if(0!==t)for(let e in this.indexes){let r=this.indexes[e],i={};for(let e in r){let n=r[e];n.tileID=n.tileID.unwrapTo(n.tileID.wrap+t),i[n.tileID.key]=n}this.indexes[e]=i}this.lng=e}addBucket(e,t,r){var i,n,a;if(null!=(i=this.indexes[e.overscaledZ])&&i[e.key]){if(this.indexes[e.overscaledZ][e.key].bucketInstanceId===t.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(e.overscaledZ,this.indexes[e.overscaledZ][e.key])}for(let e=0;ee.overscaledZ)for(let r in i){let n=i[r];n.tileID.isChildOf(e)&&n.findMatches(t.symbolInstances,e,o)}else{let n=i[e.scaledTo(Number(r)).key];n&&n.findMatches(t.symbolInstances,e,o)}}for(let e=0;e 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; +#else +return 1.0; +#endif +}float ele(vec2 pos) { +#ifdef TERRAIN3D +vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; +#else +return 0.0; +#endif +}float get_elevation(vec2 pos) { +#ifdef TERRAIN3D +#ifdef GLOBE +if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} +#endif +vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; +#else +return 0.0; +#endif +}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:ta("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:ta("",`#define GLOBE_RADIUS 6371008.8 +uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos +);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); +if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len +);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:ta(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:ta(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:ta(`in vec3 v_data;in float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define mediump float radius +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define highp vec4 stroke_color +#pragma mapbox: define mediump float stroke_width +#pragma mapbox: define lowp float stroke_opacity +void main(void) { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize mediump float radius +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize highp vec4 stroke_color +#pragma mapbox: initialize mediump float stroke_width +#pragma mapbox: initialize lowp float stroke_opacity +vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { +#ifdef GLOBE +vec3 center_vector=projectToSphere(circle_center); +#endif +float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else { +#ifdef GLOBE +vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); +#else +vec4 projected_center=projectTileWithElevation(circle_center,ele); +#endif +corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);} +#ifdef GLOBE +vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); +#else +gl_Position=projectTileWithElevation(corner_position,ele); +#endif +} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:ta(ti,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:ta(`uniform highp float u_intensity;in vec2 v_extrude; +#pragma mapbox: define highp float weight +#define GAUSS_COEF 0.3989422804014327 +void main() { +#pragma mapbox: initialize highp float weight +float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude; +#pragma mapbox: define highp float weight +#pragma mapbox: define mediump float radius +const highp float ZERO=1.0/255.0/16.0; +#define GAUSS_COEF 0.3989422804014327 +void main(void) { +#pragma mapbox: initialize highp float weight +#pragma mapbox: initialize mediump float radius +vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0); +#ifdef GLOBE +vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); +#else +gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); +#endif +}`),heatmapTexture:ta(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(0.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:ta("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:ta("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:ta(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else +{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0)); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:ta("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:ta(ti,`in vec2 a_pos;void main() { +#ifdef GLOBE +gl_Position=projectTileFor3D(a_pos,0.0); +#else +gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); +#endif +}`),fill:ta(`#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +fragColor=color*opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_fill_translate;in vec2 a_pos; +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float opacity +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:ta(`in vec2 v_pos; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define highp vec4 outline_color +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 outline_color +#pragma mapbox: initialize lowp float opacity +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}`),fillOutlinePattern:ta(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 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=texture(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=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}`),fillPattern:ta(`#ifdef GL_ES +precision highp float; +#endif +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +vec2 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);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);}`),fillExtrusion:ta(`in vec4 v_color;void main() {fragColor=v_color; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed; +#ifdef TERRAIN3D +in vec2 a_centroid; +#endif +out vec4 v_color; +#pragma mapbox: define highp float base +#pragma mapbox: define highp float height +#pragma mapbox: define highp vec4 color +void main() { +#pragma mapbox: initialize highp float base +#pragma mapbox: initialize highp float height +#pragma mapbox: initialize highp vec4 color +vec3 normal=a_normal_ed.xyz; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +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;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0); +#ifdef GLOBE +mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); +#endif +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;}`),fillExtrusionPattern:ta(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 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=texture(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=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed; +#ifdef TERRAIN3D +in vec2 a_centroid; +#endif +#ifdef GLOBE +out vec3 v_sphere_pos; +#endif +out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; +#pragma mapbox: define lowp float base +#pragma mapbox: define lowp float height +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float base +#pragma mapbox: initialize lowp float height +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to; +#ifdef TERRAIN3D +float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); +#else +float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; +#endif +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 +? a_pos +: vec2(edgedistance,elevation*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;}`),hillshadePrepare:ta(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;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 exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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;}"),hillshade:ta(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; +#define PI 3.141592653589793 +#define STANDARD 0 +#define COMBINED 1 +#define IGOR 2 +#define MULTIDIRECTIONAL 3 +#define BASIC 4 +float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;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_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else +{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else +{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:ta(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +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);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),lineGradient:ta(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +float 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),linePattern:ta(`#ifdef GL_ES +precision highp float; +#endif +uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define lowp vec4 pattern_from +#pragma mapbox: define lowp vec4 pattern_to +#pragma mapbox: define lowp float pixel_ratio_from +#pragma mapbox: define lowp float pixel_ratio_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 pattern_from +#pragma mapbox: initialize mediump vec4 pattern_to +#pragma mapbox: initialize lowp float pixel_ratio_from +#pragma mapbox: initialize lowp float pixel_ratio_to +float 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:ta(`uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +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 sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define highp vec4 color +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +void main() { +#pragma mapbox: initialize highp vec4 color +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +float 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:ta(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +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);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; +#ifdef GLOBE +out float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +float 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;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),raster:ta(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in 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=texture(u_image0,v_pos0);vec4 color1=texture(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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5; +#ifdef GLOBE +if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} +#endif +v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:ta(`uniform sampler2D u_texture;in vec2 v_tex;in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_total_opacity; +#pragma mapbox: define lowp float opacity +void main() { +#pragma mapbox: initialize lowp float opacity +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}`),symbolSDF:ta(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float 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 total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;} +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:ta(`#define SDF_PX 8.0 +#define SDF 1.0 +#define ICON 0.0 +uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +float total_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;} +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1; +#pragma mapbox: define highp vec4 fill_color +#pragma mapbox: define highp vec4 halo_color +#pragma mapbox: define lowp float opacity +#pragma mapbox: define lowp float halo_width +#pragma mapbox: define lowp float halo_blur +void main() { +#pragma mapbox: initialize highp vec4 fill_color +#pragma mapbox: initialize highp vec4 halo_color +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize lowp float halo_width +#pragma mapbox: initialize lowp float halo_blur +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +camera_to_anchor_distance/u_camera_to_center_distance : +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,total_opacity,is_sdf);}`),terrain:ta("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:ta("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:ta("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:ta("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:ta(`#ifdef GL_ES +precision highp float; +#endif +in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 +);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:ta("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function ta(e,t){let r=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,i=t.match(/in ([\w]+) ([\w]+)/g),n=e.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),a=t.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),o=a?a.concat(n):n,s={};return{fragmentSource:e=e.replace(r,(e,t,r,i,n)=>(s[n]=!0,"define"===t?` +#ifndef HAS_UNIFORM_u_${n} +in ${r} ${i} ${n}; +#else +uniform ${r} ${i} u_${n}; +#endif +`:` +#ifdef HAS_UNIFORM_u_${n} + ${r} ${i} ${n} = u_${n}; +#endif +`)),vertexSource:t=t.replace(r,(e,t,r,i,n)=>{let a="float"===i?"vec2":"vec4",o=n.match(/color/)?"color":a;return s[n]?"define"===t?` +#ifndef HAS_UNIFORM_u_${n} +uniform lowp float u_${n}_t; +in ${r} ${a} a_${n}; +out ${r} ${i} ${n}; +#else +uniform ${r} ${i} u_${n}; +#endif +`:"vec4"===o?` +#ifndef HAS_UNIFORM_u_${n} + ${n} = a_${n}; +#else + ${r} ${i} ${n} = u_${n}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${n} + ${n} = unpack_mix_${o}(a_${n}, u_${n}_t); +#else + ${r} ${i} ${n} = u_${n}; +#endif +`:"define"===t?` +#ifndef HAS_UNIFORM_u_${n} +uniform lowp float u_${n}_t; +in ${r} ${a} a_${n}; +#else +uniform ${r} ${i} u_${n}; +#endif +`:"vec4"===o?` +#ifndef HAS_UNIFORM_u_${n} + ${r} ${i} ${n} = a_${n}; +#else + ${r} ${i} ${n} = u_${n}; +#endif +`:` +#ifndef HAS_UNIFORM_u_${n} + ${r} ${i} ${n} = unpack_mix_${o}(a_${n}, u_${n}_t); +#else + ${r} ${i} ${n} = u_${n}; +#endif +`}),staticAttributes:i,staticUniforms:o}}class to{constructor(e,t,r){this.vertexBuffer=e,this.indexBuffer=t,this.segments=r}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var ts=t.aS([{name:"a_pos",type:"Int16",components:2}]);let tl="#define PROJECTION_MERCATOR",tc="mercator";class tu{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return tc}get shaderDefine(){return tl}get shaderPreludeCode(){return tn.projectionMercator}get vertexShaderPreludeCode(){return tn.projectionMercator.vertexSource}get subdivisionGranularity(){return t.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(e){}getMeshFromTileID(e,r,i,n,a){if(this._cachedMesh)return this._cachedMesh;let o=new t.aU;o.emplaceBack(0,0),o.emplaceBack(t.a6,0),o.emplaceBack(0,t.a6),o.emplaceBack(t.a6,t.a6);let s=e.createVertexBuffer(o,ts.members),l=t.aV.simpleSegment(0,0,4,2),c=new t.aW;c.emplaceBack(1,0,2),c.emplaceBack(1,2,3);let u=e.createIndexBuffer(c);return this._cachedMesh=new to(s,u,l),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(e){}}class th{constructor(e=0,t=0,r=0,i=0){if(isNaN(e)||e<0||isNaN(t)||t<0||isNaN(r)||r<0||isNaN(i)||i<0)throw Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=e,this.bottom=t,this.left=r,this.right=i}interpolate(e,r,i){return null!=r.top&&null!=e.top&&(this.top=t.H.number(e.top,r.top,i)),null!=r.bottom&&null!=e.bottom&&(this.bottom=t.H.number(e.bottom,r.bottom,i)),null!=r.left&&null!=e.left&&(this.left=t.H.number(e.left,r.left,i)),null!=r.right&&null!=e.right&&(this.right=t.H.number(e.right,r.right,i)),this}getCenter(e,r){let i=t.al((this.left+e-this.right)/2,0,e),n=t.al((this.top+r-this.bottom)/2,0,r);return new t.P(i,n)}equals(e){return this.top===e.top&&this.bottom===e.bottom&&this.left===e.left&&this.right===e.right}clone(){return new th(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function td(e,t){if(!e.renderWorldCopies||e.lngRange)return;let r=t.lng-e.center.lng;t.lng+=r>180?-360:360*(r<-180)}function tf(e){return Math.max(0,Math.floor(e))}class tp{constructor(e,r){var i;this.applyConstrain=(e,t)=>null!==this._constrainOverride?this._constrainOverride(e,t):this._callbacks.defaultConstrain(e,t),this._callbacks=e,this._tileSize=512,this._renderWorldCopies=r?.renderWorldCopies===void 0||!!r?.renderWorldCopies,this._minZoom=r?.minZoom||0,this._maxZoom=r?.maxZoom||22,this._minPitch=r?.minPitch==null?0:r?.minPitch,this._maxPitch=r?.maxPitch==null?60:r?.maxPitch,this._constrainOverride=null!=(i=r?.constrainOverride)?i:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new t.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=tf(this._zoom),this._scale=t.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new th,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(e,r,i){this._constrainOverride=e.constrainOverride,this._latRange=e.latRange,this._lngRange=e.lngRange,this._width=e.width,this._height=e.height,this._center=e.center,this._elevation=e.elevation,this._minElevationForCurrentTile=e.minElevationForCurrentTile,this._zoom=e.zoom,this._tileZoom=tf(this._zoom),this._scale=t.ao(this._zoom),this._bearingInRadians=e.bearingInRadians,this._fovInRadians=e.fovInRadians,this._pitchInRadians=e.pitchInRadians,this._rollInRadians=e.rollInRadians,this._unmodified=e.unmodified,this._edgeInsets=new th(e.padding.top,e.padding.bottom,e.padding.left,e.padding.right),this._minZoom=e.minZoom,this._maxZoom=e.maxZoom,this._minPitch=e.minPitch,this._maxPitch=e.maxPitch,this._renderWorldCopies=e.renderWorldCopies,this._cameraToCenterDistance=e.cameraToCenterDistance,this._nearZ=e.nearZ,this._farZ=e.farZ,this._autoCalculateNearFarZ=!i&&e.autoCalculateNearFarZ,r&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(e){this._minElevationForCurrentTile=e}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(e){this._minZoom!==e&&(this._minZoom=e,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(e){this._maxZoom!==e&&(this._maxZoom=e,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(e){this._minPitch!==e&&(this._minPitch=e,this.setPitch(Math.max(this.pitch,e)))}get maxPitch(){return this._maxPitch}setMaxPitch(e){this._maxPitch!==e&&(this._maxPitch=e,this.setPitch(Math.min(this.pitch,e)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(e){void 0===e?e=!0:null===e&&(e=!1),this._renderWorldCopies=e}get constrainOverride(){return this._constrainOverride}setConstrainOverride(e){void 0===e&&(e=null),this._constrainOverride!==e&&(this._constrainOverride=e,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new t.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(e){var r,i,n,a,o,s,l,c,u;let h=t.X(e,-180,180)*Math.PI/180;this._bearingInRadians!==h&&(this._unmodified=!1,this._bearingInRadians=h,this._calcMatrices(),this._rotationMatrix=d(),r=this._rotationMatrix,n=-this._bearingInRadians,a=(i=this._rotationMatrix)[0],o=i[1],s=i[2],l=i[3],c=Math.sin(n),u=Math.cos(n),r[0]=a*u+s*c,r[1]=o*u+l*c,r[2]=-(a*c)+s*u,r[3]=-(o*c)+l*u)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(e){let r=t.al(e,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==r&&(this._unmodified=!1,this._pitchInRadians=r,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(e){let t=e/180*Math.PI;this._rollInRadians!==t&&(this._unmodified=!1,this._rollInRadians=t,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return t.aX(this._fovInRadians)}setFov(e){e=t.al(e,.1,150),this.fov!==e&&(this._unmodified=!1,this._fovInRadians=t.an(e),this._calcMatrices())}get zoom(){return this._zoom}setZoom(e){let r=this.applyConstrain(this._center,e).zoom;this._zoom!==r&&(this._unmodified=!1,this._zoom=r,this._tileZoom=Math.max(0,Math.floor(r)),this._scale=t.ao(r),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(e){e.lat===this._center.lat&&e.lng===this._center.lng||(this._unmodified=!1,this._center=e,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(e){e!==this._elevation&&(this._elevation=e,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(e){this._edgeInsets.equals(e)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,e,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(e,t){this._autoCalculateNearFarZ=!1,this._nearZ=e,this._farZ=t,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(e){return this._edgeInsets.equals(e)}interpolatePadding(e,t,r){this._unmodified=!1,this._edgeInsets.interpolate(e,t,r),this.constrainInternal(),this._calcMatrices()}resize(e,t,r=!0){this._width=e,this._height=t,r&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var e,t;return(null==(e=this._latRange)?void 0:e.length)!==2||(null==(t=this._lngRange)?void 0:t.length)!==2?null:new G([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(e){e?(this._lngRange=[e.getWest(),e.getEast()],this._latRange=[e.getSouth(),e.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-t.am,t.am])}getCameraQueryGeometry(e,r){if(1===r.length)return[r[0],e];{let{minX:i,minY:n,maxX:a,maxY:o}=t.a8.fromPoints(r).extend(e);return[new t.P(i,n),new t.P(a,n),new t.P(a,o),new t.P(i,o),new t.P(i,n)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let e=this._unmodified,{center:t,zoom:r}=this.applyConstrain(this.center,this.zoom);this.setCenter(t),this.setZoom(r),this._unmodified=e,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let e=t.ap(new Float64Array(16));t.S(e,e,[this._width/2,-this._height/2,1]),t.Q(e,e,[1,-1,0]),this._clipSpaceToPixelsMatrix=e,e=t.ap(new Float64Array(16)),t.S(e,e,[1,-1,1]),t.Q(e,e,[-1,-1,0]),t.S(e,e,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=e,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(e,r,i,n){let a=void 0!==i?i:this.bearing,o=n=void 0!==n?n:this.pitch,{distanceToCenter:s,clampedElevation:l}=this._distanceToCenterFromAltElevationPitch(r,this.elevation,o),{x:c,y:u}=ey(o,a),h=t.a7.fromLngLat(e,r),d,f,p=t.aY(1,h.y),m=0;do{if((m+=1)>10)break;f=s/p,p=1/(d=new t.a7(h.x+c*f,h.y+u*f)).meterInMercatorCoordinateUnits()}while(Math.abs(s-f*p)>1e-12);return{center:d.toLngLat(),elevation:l,zoom:t.ar(this.height/2/Math.tan(this.fovInRadians/2)/f/this.tileSize)}}recalculateZoomAndCenter(e){if(this.elevation-e==0)return;let r=1/this.worldSize,i=t.aq(1,this.center.lat)*this.worldSize,n=t.a7.fromLngLat(this.center,this.elevation),a=n.x/r,o=n.y/r,s=n.z/r,l=this.pitch,{x:c,y:u,z:h}=ey(l,this.bearing),d=this.cameraToCenterDistance,{distanceToCenter:f,clampedElevation:p}=this._distanceToCenterFromAltElevationPitch((s+d*h)/i,e,l),m=f*i,g=new t.a7((a+-(d*c)+c*m)*r,(o+-(d*u)+u*m)*r,0).toLngLat(),y=t.aq(1,g.lat),v=t.ar(this.height/2/Math.tan(this.fovInRadians/2)/f/y/this.tileSize);this._elevation=p,this._center=g,this.setZoom(v)}_distanceToCenterFromAltElevationPitch(e,r,i){let n=-Math.cos(t.an(i)),a=e-r,o,s=r;return n*a>=0||.1>Math.abs(n)?s=e+(o=1e4)*n:o=-a/n,{distanceToCenter:o,clampedElevation:s}}getCameraPoint(){let e=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new t.P(e*Math.sin(this.rollInRadians),e*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let e=t.aq(1,this.center.lat)*this.worldSize;return eg(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/e).toLngLat()}getMercatorTileCoordinates(e){if(!e)return[0,0,1,1];let r=e.canonical.z>=0?1<this.max[0]||e.aabb.min[1]>this.max[1]||e.aabb.min[2]>this.max[2]||e.aabb.max[0]0?(t+=e[i]*this.min[i],r+=e[i]*this.max[i]):(r+=e[i]*this.min[i],t+=e[i]*this.max[i]);return t>=0?2:r<0?0:1}}class tg{distanceToTile2d(e,t,r,i){return Math.hypot(i.distanceX([e,t]),i.distanceY([e,t]))}getWrap(e,t,r){return r}getTileBoundingVolume(e,r,i,n){var a,o;let s=0,l=0;if(n?.terrain){let c=new t.a3(e.z,r,e.z,e.x,e.y),u=n.terrain.getMinMaxElevation(c);s=null!=(a=u.minElevation)?a:Math.min(0,i),l=null!=(o=u.maxElevation)?o:Math.max(0,i)}let c=1<n}allowWorldCopies(){return!0}prepareNextFrame(){}}class ty{constructor(e,t,r){this.points=e,this.planes=t,this.aabb=r}static fromInvProjectionMatrix(e,r=1,i=0,n,a){let o=a?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],s=Math.pow(2,i),l=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(i=>{let n,a;return a=1/(n=t.aE([],i,e))[3]/r*s,t.b4(n,n,[a,a,1/n[3],a])});n&&function(e,r,i,n){let a,o,s,l=4*!!n,c=4*!n,u=0,h=[],d=[];for(let r=0;r<4;r++){let i=t.b0([],e[r+c],e[r+l]),n=t.b5(i);t.aZ(i,i,1/n),h.push(n),d.push(i)}for(let r=0;r<4;r++){let n=t.b6(e[r+l],d[r],i);u=null!==n&&n>=0?Math.max(u,n):Math.max(u,h[r])}let f=(a=t.b0([],e[r[0]],e[r[1]]),o=t.b0([],e[r[2]],e[r[1]]),s=[0,0,0,0],t.b1(s,t.b2([],a,o)),s[3]=-t.b3(s,e[r[0]]),s),p=function(e,r){let i=t.b7(e),n=t.b8([],e,1/i),a=t.b0([],r,t.aZ([],n,t.b3(r,n))),o=t.b7(a);if(o>0){let e=Math.sqrt(1-n[3]*n[3]),i=t.aZ([],n,-n[3]),s=t.a_([],i,t.aZ([],a,e/o));return t.b9(r,s)}return null}(i,f);null!==p&&(u=Math.min(u,p/t.b3(d[0],f)));for(let t=0;t<4;t++){let r=Math.min(u,h[t]);e[t+c]=[e[t+l][0]+d[t][0]*r,e[t+l][1]+d[t][1]*r,e[t+l][2]+d[t][2]*r,1]}}(l,o[0],n,a);let c=o.map(e=>{let r=t.b0([],l[e[0]],l[e[1]]),i=t.b0([],l[e[2]],l[e[1]]),n=t.b1([],t.b2([],r,i)),a=-t.b3(n,l[e[1]]);return n.concat(a)}),u=[1/0,1/0,1/0],h=[-1/0,-1/0,-1/0];for(let e of l)for(let t=0;t<3;t++)u[t]=Math.min(u[t],e[t]),h[t]=Math.max(h[t],e[t]);return new ty(l,c,new tm(u,h))}}class tv{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,r){this._helper.interpolatePadding(e,t,r)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,r=!0){this._helper.resize(e,t,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(e,t){}constructor(e){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(e,r)=>{r=t.al(+r,this.minZoom,this.maxZoom);let i={center:new t.W(e.lng,e.lat),zoom:r},n=this._helper._lngRange;this._helper._renderWorldCopies||null!==n||(n=[-179.9999999999,179.9999999999]);let a=this.tileSize*t.ao(i.zoom),o=0,s=a,l=0,c=a,u=0,h=0,{x:d,y:f}=this.size;if(this._helper._latRange){let e=this._helper._latRange;o=t.Y(e[1])*a,(s=t.Y(e[0])*a)-os&&(y=s-e)}if(n){let e=(l+c)/2,r=p;this._helper._renderWorldCopies&&(r=t.X(p,e-a/2,e+a/2));let i=d/2;r-ic&&(g=c-i)}return(void 0!==g||void 0!==y)&&(i.center=ef(a,new t.P(g??p,y??m)).wrap()),i},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tp({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new tg}clone(){let e=new tv;return e.apply(this,!1),e}apply(e,t,r){this._helper.apply(e,t,r)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(e){let r=[new t.ba(0,e)];if(this._helper._renderWorldCopies){let i=this.screenPointToMercatorCoordinate(new t.P(0,0)),n=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,0)),a=this.screenPointToMercatorCoordinate(new t.P(this._helper._width,this._helper._height)),o=this.screenPointToMercatorCoordinate(new t.P(0,this._helper._height)),s=Math.floor(Math.min(i.x,n.x,a.x,o.x)),l=Math.floor(Math.max(i.x,n.x,a.x,o.x));for(let i=s-1;i<=l+1;i++)0!==i&&r.push(new t.ba(i,e))}return r}getCameraFrustum(){return ty.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){let t=this.screenPointToLocation(this.centerPoint,e),r=e?e.getElevationForLngLatZoom(t,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(r)}setLocationAtPoint(e,r){let i=t.aq(this.elevation,this.center.lat),n=this.screenPointToMercatorCoordinateAtZ(r,i),a=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,i),o=t.a7.fromLngLat(e),s=new t.a7(o.x-(n.x-a.x),o.y-(n.y-a.y));this.setCenter(s?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(e,r){return r?this.coordinatePoint(t.a7.fromLngLat(e),r.getElevationForLngLat(e,this),this._pixelMatrix3D):this.coordinatePoint(t.a7.fromLngLat(e))}screenPointToLocation(e,t){var r;return null==(r=this.screenPointToMercatorCoordinate(e,t))?void 0:r.toLngLat()}screenPointToMercatorCoordinate(e,t){if(t){let r=t.pointCoordinate(e);if(null!=r)return r}return this.screenPointToMercatorCoordinateAtZ(e)}screenPointToMercatorCoordinateAtZ(e,r){let i=r||0,n=[e.x,e.y,0,1],a=[e.x,e.y,1,1];t.aE(n,n,this._pixelMatrixInverse),t.aE(a,a,this._pixelMatrixInverse);let o=n[3],s=a[3],l=n[1]/o,c=a[1]/s,u=n[2]/o,h=a[2]/s,d=u===h?0:(i-u)/(h-u);return new t.a7(t.H.number(n[0]/o,a[0]/s,d)/this.worldSize,t.H.number(l,c,d)/this.worldSize,i)}coordinatePoint(e,r=0,i=this._pixelMatrix){let n=[e.x*this.worldSize,e.y*this.worldSize,r,1];return t.aE(n,n,i),new t.P(n[0]/n[3],n[1]/n[3])}getBounds(){let e=Math.max(0,this._helper._height/2-ep(this));return new G().extend(this.screenPointToLocation(new t.P(0,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,e))).extend(this.screenPointToLocation(new t.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new t.P(0,this._helper._height)))}isPointOnMapSurface(e,t){return t?null!=t.pointCoordinate(e):e.y>this.height/2-ep(this)}calculatePosMatrix(e,r=!1,i){var n;let a=null!=(n=e.key)?n:t.bb(e.wrap,e.canonical.z,e.canonical.z,e.canonical.x,e.canonical.y),o=r?this._alignedPosMatrixCache:this._posMatrixCache;if(o.has(a)){let e=o.get(a);return i?e.f32:e.f64}let s=em(e,this.worldSize);t.U(s,r?this._alignedProjMatrix:this._viewProjMatrix,s);let l={f64:s,f32:new Float32Array(s)};return o.set(a,l),i?l.f32:l.f64}calculateFogMatrix(e){let r=e.key,i=this._fogMatrixCacheF32;if(i.has(r))return i.get(r);let n=em(e,this.worldSize);return t.U(n,this._fogMatrix,n),i.set(r,new Float32Array(n)),i.get(r)}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}_calculateNearFarZIfNeeded(e,r,i){if(!this._helper.autoCalculateNearFarZ)return;let n=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),a=e-n*this._helper._pixelPerMeter/Math.cos(r),o=n<0?a:e,s=Math.PI/2+this.pitchInRadians,l=t.an(this.fov)*(Math.abs(Math.cos(t.an(this.roll)))*this.height+Math.abs(Math.sin(t.an(this.roll)))*this.width)/this.height*(.5+i.y/this.height),c=Math.sin(l)*o/Math.sin(t.al(Math.PI-s-l,.01,Math.PI-.01)),u=ep(this),h=Math.atan(u/this._helper.cameraToCenterDistance),d=t.an(.75),f=h>d?2*h*(.5+i.y/(2*u)):d,p=Math.min(c,Math.sin(f)*o/Math.sin(t.al(Math.PI-s-f,.01,Math.PI-.01)));this._helper._farZ=1.01*(Math.cos(Math.PI/2-r)*p+o),this._helper._nearZ=this._helper._height/50}_calcMatrices(){var e,r;if(!this._helper._height)return;let i=this.centerOffset,n=ed(this.worldSize,this.center),a=n.x,o=n.y;this._helper._pixelPerMeter=t.aq(1,this.center.lat)*this.worldSize;let s=t.an(Math.min(this.pitch,89.25)),l=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(s)),c;this._calculateNearFarZIfNeeded(l,s,i),c=new Float64Array(16),t.bc(c,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(e=this._invProjMatrix)[0]=1/(r=c)[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1/r[5],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=0,e[11]=1/r[14],e[12]=0,e[13]=0,e[14]=-1,e[15]=r[10]/r[14],c[8]=-(2*i.x)/this._helper._width,c[9]=2*i.y/this._helper._height,this._projectionMatrix=t.bd(c),t.S(c,c,[1,-1,1]),t.Q(c,c,[0,0,-this._helper.cameraToCenterDistance]),t.be(c,c,-this.rollInRadians),t.bf(c,c,this.pitchInRadians),t.be(c,c,-this.bearingInRadians),t.Q(c,c,[-a,-o,0]),this._mercatorMatrix=t.S([],c,[this.worldSize,this.worldSize,this.worldSize]),t.S(c,c,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=t.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,c),t.Q(c,c,[0,0,-this.elevation]),this._viewProjMatrix=c,this._invViewProjMatrix=t.bg([],c);let u=[0,0,-1,1];t.aE(u,u,this._invViewProjMatrix),this._cameraPosition=[u[0]/u[3],u[1]/u[3],u[2]/u[3]],this._fogMatrix=new Float64Array(16),t.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,l,this._helper._farZ),this._fogMatrix[8]=-(2*i.x)/this.width,this._fogMatrix[9]=2*i.y/this.height,t.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),t.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),t.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),t.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),t.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),t.Q(this._fogMatrix,this._fogMatrix,[-a,-o,0]),t.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),t.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=t.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,c);let h=this._helper._width%2/2,d=this._helper._height%2/2,f=Math.cos(this.bearingInRadians),p=Math.sin(-this.bearingInRadians),m=a-Math.round(a)+f*h+p*d,g=o-Math.round(o)+f*d+p*h,y=new Float64Array(c);if(t.Q(y,y,[m>.5?m-1:m,g>.5?g-1:g,0]),this._alignedProjMatrix=y,!(c=t.bg(new Float64Array(16),this._pixelMatrix)))throw Error("failed to invert matrix");this._pixelMatrixInverse=c,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let e=this.screenPointToMercatorCoordinate(new t.P(0,0)),r=[e.x*this.worldSize,e.y*this.worldSize,0,1];return t.aE(r,r,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let e=t.aq(1,this.center.lat)*this.worldSize;return eg(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/e).toLngLat()}lngLatToCameraDepth(e,r){let i=t.a7.fromLngLat(e),n=[i.x*this.worldSize,i.y*this.worldSize,r,1];return t.aE(n,n,this._viewProjMatrix),n[2]/n[3]}getProjectionData(e){let{overscaledTileID:r,aligned:i,applyTerrainMatrix:n}=e,a=this._helper.getMercatorTileCoordinates(r),o=r?this.calculatePosMatrix(r,i,!0):null,s;return{mainMatrix:s=r?.terrainRttPosMatrix32f&&n?r.terrainRttPosMatrix32f:o||t.bh(),tileMercatorCoords:a,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:s}}isLocationOccluded(e){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(e,t,r){return 1}transformLightDirection(e){return t.a$(e)}getRayDirectionFromPixel(e){throw Error("Not implemented.")}projectTileCoordinates(e,r,i,n){let a=this.calculatePosMatrix(i),o;n?(o=[e,r,n(e,r),1],t.aE(o,o,a)):eZ(o=[e,r,0,1],o,a);let s=o[3];return{point:new t.P(o[0]/s,o[1]/s),signedDistanceFromCamera:s,isOccluded:!1}}populateCache(e){for(let t of e)this.calculatePosMatrix(t)}getMatrixForModel(e,r){let i=t.a7.fromLngLat(e,r),n=i.meterInMercatorCoordinateUnits(),a=t.bi();return t.Q(a,a,[i.x,i.y,i.z]),t.be(a,a,Math.PI),t.bf(a,a,Math.PI/2),t.S(a,a,[-n,n,n]),a}getProjectionDataForCustomLayer(e=!0){let r=new t.a3(0,0,0,0,0),i=this.getProjectionData({overscaledTileID:r,applyGlobeMatrix:e}),n=em(r,this.worldSize);t.U(n,this._viewProjMatrix,n),i.tileMercatorCoords=[0,0,1,1];let a=[t.a6,t.a6,this.worldSize/this._helper.pixelsPerMeter],o=t.bj();return t.S(o,n,a),i.fallbackMatrix=o,i.mainMatrix=o,i}getFastPathSimpleProjectionMatrix(e){return this.calculatePosMatrix(e)}}function tx(){t.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function tb(e){if(e.useSlerp)if(e.k<1){let r=t.bk(e.startEulerAngles.roll,e.startEulerAngles.pitch,e.startEulerAngles.bearing),i=t.bk(e.endEulerAngles.roll,e.endEulerAngles.pitch,e.endEulerAngles.bearing),n=new Float64Array(4);t.bl(n,r,i,e.k);let a=t.bm(n);e.tr.setRoll(a.roll),e.tr.setPitch(a.pitch),e.tr.setBearing(a.bearing)}else e.tr.setRoll(e.endEulerAngles.roll),e.tr.setPitch(e.endEulerAngles.pitch),e.tr.setBearing(e.endEulerAngles.bearing);else e.tr.setRoll(t.H.number(e.startEulerAngles.roll,e.endEulerAngles.roll,e.k)),e.tr.setPitch(t.H.number(e.startEulerAngles.pitch,e.endEulerAngles.pitch,e.k)),e.tr.setBearing(t.H.number(e.startEulerAngles.bearing,e.endEulerAngles.bearing,e.k))}function t_(e,r,i,n,a){let o=a.padding,s=ed(a.worldSize,i.getNorthWest()),l=ed(a.worldSize,i.getNorthEast()),c=ed(a.worldSize,i.getSouthEast()),u=ed(a.worldSize,i.getSouthWest()),h=t.an(-n),d=s.rotate(h),f=l.rotate(h),p=c.rotate(h),m=u.rotate(h),g=new t.P(Math.max(d.x,f.x,m.x,p.x),Math.max(d.y,f.y,m.y,p.y)),y=new t.P(Math.min(d.x,f.x,m.x,p.x),Math.min(d.y,f.y,m.y,p.y)),v=g.sub(y),x=(a.width-(o.left+o.right+r.left+r.right))/v.x,b=(a.height-(o.top+o.bottom+r.top+r.bottom))/v.y;if(b<0||x<0)return void tx();let _=Math.min(t.ar(a.scale*Math.min(x,b)),e.maxZoom),w=t.P.convert(e.offset),T=new t.P((r.left-r.right)/2,(r.top-r.bottom)/2).rotate(t.an(n)),M=w.add(T).mult(a.scale/t.ao(_));return{center:ef(a.worldSize,s.add(c).div(2).sub(M)),zoom:_,bearing:n}}class tw{get useGlobeControls(){return!1}handlePanInertia(e,t){let r=e.mag(),i=Math.abs(ep(t));return{easingOffset:e.mult(Math.min(.75*i/r,1)),easingCenter:t.center}}handleMapControlsRollPitchBearingZoom(e,t){e.bearingDelta&&t.setBearing(t.bearing+e.bearingDelta),e.pitchDelta&&t.setPitch(t.pitch+e.pitchDelta),e.rollDelta&&t.setRoll(t.roll+e.rollDelta),e.zoomDelta&&t.setZoom(t.zoom+e.zoomDelta)}handleMapControlsPan(e,t,r){.01>e.around.distSqr(t.centerPoint)||t.setLocationAtPoint(r,e.around)}cameraForBoxAndBearing(e,t,r,i,n){return t_(e,t,r,i,n)}handleJumpToCenterZoom(e,r){e.zoom!==(void 0!==r.zoom?+r.zoom:e.zoom)&&e.setZoom(+r.zoom),void 0!==r.center&&e.setCenter(t.W.convert(r.center))}handleEaseTo(e,r){let i=e.zoom,n=e.padding,a={roll:e.roll,pitch:e.pitch,bearing:e.bearing},o={roll:void 0===r.roll?e.roll:r.roll,pitch:void 0===r.pitch?e.pitch:r.pitch,bearing:void 0===r.bearing?e.bearing:r.bearing},s=void 0!==r.zoom,l=!e.isPaddingEqual(r.padding),c=!1,u=s?+r.zoom:e.zoom,h=e.centerPoint.add(r.offsetAsPoint),d=e.screenPointToLocation(h),{center:f,zoom:p}=e.applyConstrain(t.W.convert(r.center||d),u??i);td(e,f);let m=ed(e.worldSize,d),g=ed(e.worldSize,f).sub(m),y=t.ao(p-i);return{easeFunc:s=>{if(c&&e.setZoom(t.H.number(i,p,s)),t.bn(a,o)||tb({startEulerAngles:a,endEulerAngles:o,tr:e,k:s,useSlerp:a.roll!=o.roll}),l&&(e.interpolatePadding(n,r.padding,s),h=e.centerPoint.add(r.offsetAsPoint)),r.around)e.setLocationAtPoint(r.around,r.aroundPoint);else{let r=t.ao(e.zoom-i),n=Math.pow(p>i?Math.min(2,y):Math.max(.5,y),1-s),a=ef(e.worldSize,m.add(g.mult(s*n)).mult(r));e.setLocationAtPoint(e.renderWorldCopies?a.wrap():a,h)}},isZooming:c=p!==i,elevationCenter:f}}handleFlyTo(e,r){let i=void 0!==r.zoom,n=e.zoom,a=e.applyConstrain(t.W.convert(r.center||r.locationAtOffset),i?+r.zoom:n),o=a.center,s=a.zoom;td(e,o);let l=ed(e.worldSize,r.locationAtOffset),c=ed(e.worldSize,o).sub(l),u=c.mag(),h=t.ao(s-n),d;if(void 0!==r.minZoom){let i=Math.min(+r.minZoom,n,s),a=e.applyConstrain(o,i).zoom;d=t.ao(a-n)}return{easeFunc:(r,i,a,u)=>{e.setZoom(1===r?s:n+t.ar(i));let h=1===r?o:ef(e.worldSize,l.add(c.mult(a)).mult(i));e.setLocationAtPoint(e.renderWorldCopies?h.wrap():h,u)},scaleOfZoom:h,targetCenter:o,scaleOfMinZoom:d,pixelPathLength:u}}}class tT{constructor(e,t,r){this.blendFunction=e,this.blendColor=t,this.mask=r}}tT.Replace=[1,0],tT.disabled=new tT(tT.Replace,t.bo.transparent,[!1,!1,!1,!1]),tT.unblended=new tT(tT.Replace,t.bo.transparent,[!0,!0,!0,!0]),tT.alphaBlended=new tT([1,771],t.bo.transparent,[!0,!0,!0,!0]);class tM{constructor(e,t,r){this.enable=e,this.mode=t,this.frontFace=r}}tM.disabled=new tM(!1,1029,2305),tM.backCCW=new tM(!0,1029,2305),tM.frontCCW=new tM(!0,1028,2305);class tk{constructor(e,t,r){this.func=e,this.mask=t,this.range=r}}tk.ReadOnly=!1,tk.ReadWrite=!0,tk.disabled=new tk(519,tk.ReadOnly,[0,1]);class tA{constructor(e,t,r,i,n,a){this.test=e,this.ref=t,this.mask=r,this.fail=i,this.depthFail=n,this.pass=a}}function tS(e){return"u">typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext}tA.disabled=new tA({func:519,mask:0},0,0,7680,7680,7680);class tE{get awaitingQuery(){return!!this._readbackQueue}constructor(e){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=e;let r=e.context,i=r.gl;this._texFormat=i.RGBA,this._texType=i.UNSIGNED_BYTE;let n=new t.aU;n.emplaceBack(-1,-1),n.emplaceBack(2,-1),n.emplaceBack(-1,2);let a=new t.aW;a.emplaceBack(0,1,2),this._fullscreenTriangle=new to(r.createVertexBuffer(n,ts.members),r.createIndexBuffer(a),t.aV.simpleSegment(0,0,n.length,a.length)),this._resultBuffer=new Uint8Array(4),r.activeTexture.set(i.TEXTURE1);let o=i.createTexture();i.bindTexture(i.TEXTURE_2D,o),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.NEAREST),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,i.NEAREST),i.texImage2D(i.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=r.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(o),tS(i)&&(this._pbo=i.createBuffer(),i.bindBuffer(i.PIXEL_PACK_BUFFER,this._pbo),i.bufferData(i.PIXEL_PACK_BUFFER,4,i.STREAM_READ),i.bindBuffer(i.PIXEL_PACK_BUFFER,null))}destroy(){let e=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),e.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(e,t){let r=this._updateCount;return this._readbackQueue?r>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():r>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(e,t),this._updateCount++,this._measuredError}_bindFramebuffer(){let e=this._cachedRenderContext.context,t=e.gl;e.activeTexture.set(t.TEXTURE1),t.bindTexture(t.TEXTURE_2D,this._fbo.colorAttachment.get()),e.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(e,r){let i=this._cachedRenderContext.context,n=i.gl;if(this._bindFramebuffer(),i.viewport.set([0,0,this._texWidth,this._texHeight]),i.clear({color:t.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(i,n.TRIANGLES,tk.disabled,tA.disabled,tT.unblended,tM.disabled,{u_input:e,u_output_expected:r},null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&tS(n)){n.bindBuffer(n.PIXEL_PACK_BUFFER,this._pbo),n.readBuffer(n.COLOR_ATTACHMENT0),n.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),n.bindBuffer(n.PIXEL_PACK_BUFFER,null);let e=n.fenceSync(n.SYNC_GPU_COMMANDS_COMPLETE,0);n.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:e}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let e=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&tS(e)){let r=e.clientWaitSync(this._readbackQueue.sync,0,0);if(r===e.WAIT_FAILED)return t.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(r===e.TIMEOUT_EXPIRED)return;e.bindBuffer(e.PIXEL_PACK_BUFFER,this._pbo),e.getBufferSubData(e.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),e.bindBuffer(e.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),e.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=tE._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(e){let t;return t=0+(e[0]/256+e[1]/65536+e[2]/0x1000000),e[3]<127&&(t=-t),t/128}}let tC=t.a6/128;function tL(e,r){let i=void 0!==e.granularity?Math.max(e.granularity,1):1,n=i+2*!!e.generateBorders,a=i+(e.extendToNorthPole||e.generateBorders?1:0)+(e.extendToSouthPole||e.generateBorders?1:0),o=n+1,s=a+1,l=e.generateBorders?-1:0,c=e.generateBorders||e.extendToNorthPole?-1:0,u=i+ +!!e.generateBorders,h=i+(e.generateBorders||e.extendToSouthPole?1:0),d=n*a*6,f=o*s>65536;if(f&&"16bit"===r)throw Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let p=f||"32bit"===r,m=new Int16Array(o*s*2),g=0;for(let r=c;r<=h;r++)for(let n=l;n<=u;n++){let a=n/i*t.a6;-1===n&&(a=-tC),n===i+1&&(a=t.a6+tC);let o=r/i*t.a6;-1===r&&(o=e.extendToNorthPole?t.bq:-tC),r===i+1&&(o=e.extendToSouthPole?t.br:t.a6+tC),m[g++]=a,m[g++]=o}let y=p?new Uint32Array(d):new Uint16Array(d),v=0;for(let e=0;e0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(e){this._mercatorProjection.updateGPUdependent(e),this._verticalPerspectiveProjection.updateGPUdependent(e)}getMeshFromTileID(e,t,r,i,n){return this.currentProjection.getMeshFromTileID(e,t,r,i,n)}setProjection(e){this._transitionable.setValue("type",e?.type||"mercator")}updateTransitions(e){this._transitioning=this._transitionable.transitioned(e,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(e){this.properties=this._transitioning.possiblyEvaluate(e)}setErrorQueryLatitudeDegrees(e){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(e),this._mercatorProjection.setErrorQueryLatitudeDegrees(e)}}function tO(e){return 2*Math.PI*tj(e.worldSize,e.center.lat)}function tR(e,r,i,n,a){let o=1/(1<1e-6){let n=e[0]/i,a=Math.acos(e[2]/i),o=(n>0?a:-a)/Math.PI*180;return new t.W(t.X(o,-180,180),r)}return new t.W(0,r)}function tN(e){return Math.cos(e*Math.PI/180)}function tU(e,r){let i=tN(e),n=tN(r);return t.ar(n/i)}function tV(e,r){let i=e.rotate(r.bearingInRadians),n=r.zoom+tU(r.center.lat,0),a=t.bt(1/tN(r.center.lat),1/tN(Math.min(Math.abs(r.center.lat),60)),t.bw(n,7,3,0,1)),o=360/tO({worldSize:r.worldSize,center:{lat:r.center.lat}});return new t.W(r.center.lng-i.x*o*a,t.al(r.center.lat+i.y*o,-t.am,t.am))}function tq(e){let t=.5*e,r=Math.sin(t),i=Math.cos(t);return Math.log(r+i)-Math.log(i-r)}function tH(e,r,i,n){let a=e.lat+i*n;if(Math.abs(i)>1){let o=(Math.sign(e.lat+i)!==Math.sign(e.lat)?-Math.abs(e.lat):Math.abs(e.lat))*Math.PI/180,s=Math.abs(e.lat+i)*Math.PI/180,l=tq(o+n*(s-o)),c=tq(o),u=tq(s);return new t.W(e.lng+(l-c)/(u-c)*r,a)}return new t.W(e.lng+r*n,a)}class tG{constructor(e){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=e}swapBuffers(){if(!this._hadAnyChanges)return;let e=this._cachePrevious;this._cachePrevious=this._cache,this._cache=e,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(e,t,r,i){let n=`${e.z}_${e.x}_${e.y}_${i?.terrain?"t":""}`,a=this._cache.get(n);if(a)return a;let o=this._cachePrevious.get(n);if(o)return this._cache.set(n,o),o;let s=this._boundingVolumeFactory(e,t,r,i);return this._cache.set(n,s),this._hadAnyChanges=!0,s}}class tW{constructor(e,t,r,i){this.min=r,this.max=i,this.points=e,this.planes=t}static fromAabb(e,t){let r=[];for(let i=0;i<8;i++)r.push([1&~i?e[0]:t[0],(i>>1&1)==1?t[1]:e[1],(i>>2&1)==1?t[2]:e[2]]);return new tW(r,[[-1,0,0,t[0]],[1,0,0,-e[0]],[0,-1,0,t[1]],[0,1,0,-e[1]],[0,0,-1,t[2]],[0,0,1,-e[2]]],e,t)}static fromCenterSizeAngles(e,r,i){let n=t.bA([],i[0],i[1],i[2]),a=t.bB([],[r[0],0,0],n),o=t.bB([],[0,r[1],0],n),s=t.bB([],[0,0,r[2]],n),l=[...e],c=[...e];for(let t=0;t<8;t++)for(let r=0;r<3;r++){let i=e[r]+a[r]*(1&~t?-1:1)+o[r]*((t>>1&1)==1?1:-1)+s[r]*((t>>2&1)==1?1:-1);l[r]=Math.min(l[r],i),c[r]=Math.max(c[r],i)}let u=[];for(let r=0;r<8;r++){let i=[...e];t.a_(i,i,t.aZ([],a,1&~r?-1:1)),t.a_(i,i,t.aZ([],o,(r>>1&1)==1?1:-1)),t.a_(i,i,t.aZ([],s,(r>>2&1)==1?1:-1)),u.push(i)}return new tW(u,[[...a,-t.b3(a,u[0])],[...o,-t.b3(o,u[0])],[...s,-t.b3(s,u[0])],[-a[0],-a[1],-a[2],-t.b3(a,u[7])],[-o[0],-o[1],-o[2],-t.b3(o,u[7])],[-s[0],-s[1],-s[2],-t.b3(s,u[7])]],l,c)}intersectsFrustum(e){let t=!0,r=this.points.length,i=this.planes.length,n=e.planes.length,a=e.points.length;for(let i=0;i=0&&a++}if(0===a)return 0;a=0&&i++}if(0===i)return 0}return 1}intersectsPlane(e){let t=this.points.length,r=0;for(let i=0;i=0&&r++}return r===t?2:+(0!==r)}}function tY(e,t,r){let i=e-t;return i<0?-i:Math.max(0,i-r)}function tZ(e,t,r,i,n){let a=e-r;return Math.max(a<0?Math.min(-a,1+a-n):a>n?Math.min(Math.max(a-n,0),1-a):0,tY(t,i,n))}class t${constructor(){this._boundingVolumeCache=new tG(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(e,t,r,i){let n=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(e,t,r,i){return this._boundingVolumeCache.getTileBoundingVolume(e,t,r,i)}_computeTileBoundingVolume(e,r,i,n){var a,o;let s=0,l=0;if(n?.terrain){let c=new t.a3(e.z,r,e.z,e.x,e.y),u=n.terrain.getMinMaxElevation(c);s=null!=(a=u.minElevation)?a:Math.min(0,i),l=null!=(o=u.maxElevation)?o:Math.max(0,i)}if(s/=t.bD,l/=t.bD,s+=1,l+=1,e.z<=0)return tW.fromAabb([-l,-l,-l],[l,l,l]);if(1===e.z)return tW.fromAabb([0===e.x?-l:0,0===e.y?0:-l,-l],[0===e.x?0:l,0===e.y?l:0,l]);{let r=[tR(0,0,e.x,e.y,e.z),tR(t.a6,0,e.x,e.y,e.z),tR(t.a6,t.a6,e.x,e.y,e.z),tR(0,t.a6,e.x,e.y,e.z)],i=[];for(let e of r)i.push(t.aZ([],e,l));if(l!==s)for(let e of r)i.push(t.aZ([],e,s));0===e.y&&i.push([0,1,0]),e.y===(1<=(1<{let i=t.al(e.lat,-t.am,t.am),n=t.al(+r,this.minZoom+tU(0,i),this.maxZoom);return{center:new t.W(e.lng,i),zoom:n}},this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tp({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._coveringTilesDetailsProvider=new t$}clone(){let e=new tK;return e.apply(this,!1),e}apply(e,t,r){this._globeLatitudeErrorCorrectionRadians=r||0,this._helper.apply(e,t)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let e=t.bz();return e[0]=this._cameraPosition[0],e[1]=this._cameraPosition[1],e[2]=this._cameraPosition[2],e}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(e){let{overscaledTileID:t,applyGlobeMatrix:r}=e,i=this._helper.getMercatorTileCoordinates(t);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:i,clippingPlane:this._cachedClippingPlane,projectionTransition:+!!r,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(e){let r=this.pitchInRadians,i=this.cameraToCenterDistance/e,n=Math.sin(r)*i,a=Math.cos(r)*i+1,o=1/Math.sqrt(n*n+a*a)*1,s=-n,l=a,c=Math.sqrt(s*s+l*l),u=[0,s/=c,l/=c];t.bF(u,u,[0,0,0],-this.bearingInRadians),t.bG(u,u,[0,0,0],-1*this.center.lat*Math.PI/180),t.bH(u,u,[0,0,0],this.center.lng*Math.PI/180);let h=1/t.b5(u);return t.aZ(u,u,h),[...u,-o*h]}isLocationOccluded(e){return!this.isSurfacePointVisible(tF(e))}transformLightDirection(e){let r=this._helper._center.lng*Math.PI/180,i=this._helper._center.lat*Math.PI/180,n=Math.cos(i),a=[Math.sin(r)*n,Math.sin(i),Math.cos(r)*n],o=[a[2],0,-a[0]],s=[0,0,0];t.b2(s,o,a),t.b1(o,o),t.b1(s,s);let l=[0,0,0];return t.b1(l,[o[0]*e[0]+s[0]*e[1]+a[0]*e[2],o[1]*e[0]+s[1]*e[1]+a[1]*e[2],o[2]*e[0]+s[2]*e[1]+a[2]*e[2]]),l}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(e,r,i){var n,a;let o,s=(o=1/(1<<(a=i.canonical).z),new t.a7(e/t.a6*o+a.x*o,r/t.a6*o+a.y*o)),l=(n=s.y,[t.by(s.x*Math.PI*2+Math.PI,2*Math.PI),2*Math.atan(Math.exp(Math.PI-n*Math.PI*2))-.5*Math.PI]);return this.getCircleRadiusCorrection()/Math.cos(l[1])}projectTileCoordinates(e,r,i,n){let a=i.canonical,o=tR(e,r,a.x,a.y,a.z),s=1+(n?n(e,r):0)/t.bD,l=[o[0]*s,o[1]*s,o[2]*s,1];t.aE(l,l,this._globeViewProjMatrixNoCorrection);let c=this._cachedClippingPlane,u=c[0]*o[0]+c[1]*o[1]+c[2]*o[2]+c[3]<0;return{point:new t.P(l[0]/l[3],l[1]/l[3]),signedDistanceFromCamera:l[3],isOccluded:u}}_calcMatrices(){if(!this._helper._width||!this._helper._height)return;let e=tj(this.worldSize,this.center.lat),r=t.bj(),i=t.bj();this._helper.autoCalculateNearFarZ&&(this._helper._nearZ=.5,this._helper._farZ=this.cameraToCenterDistance+2*e),t.bc(r,this.fovInRadians,this.width/this.height,this._helper._nearZ,this._helper._farZ);let n=this.centerOffset;r[8]=-(2*n.x)/this._helper._width,r[9]=2*n.y/this._helper._height,this._projectionMatrix=t.bd(r),this._globeProjMatrixInverted=t.bj(),t.bg(this._globeProjMatrixInverted,r),t.Q(r,r,[0,0,-this.cameraToCenterDistance]),t.be(r,r,this.rollInRadians),t.bf(r,r,-this.pitchInRadians),t.be(r,r,this.bearingInRadians),t.Q(r,r,[0,0,-e]);let a=t.bz();a[0]=e,a[1]=e,a[2]=e,t.bf(i,r,this.center.lat*Math.PI/180),t.bI(i,i,-this.center.lng*Math.PI/180),t.S(i,i,a),this._globeViewProjMatrixNoCorrection=i,t.bf(r,r,this.center.lat*Math.PI/180-this._globeLatitudeErrorCorrectionRadians),t.bI(r,r,-this.center.lng*Math.PI/180),t.S(r,r,a),this._globeViewProjMatrix32f=new Float32Array(r),this._globeViewProjMatrixNoCorrectionInverted=t.bj(),t.bg(this._globeViewProjMatrixNoCorrectionInverted,i);let o=t.bz();this._cameraPosition=t.bz(),this._cameraPosition[2]=this.cameraToCenterDistance/e,t.bF(this._cameraPosition,this._cameraPosition,o,-this.rollInRadians),t.bG(this._cameraPosition,this._cameraPosition,o,this.pitchInRadians),t.bF(this._cameraPosition,this._cameraPosition,o,-this.bearingInRadians),t.a_(this._cameraPosition,this._cameraPosition,[0,0,1]),t.bG(this._cameraPosition,this._cameraPosition,o,-this.center.lat*Math.PI/180),t.bH(this._cameraPosition,this._cameraPosition,o,this.center.lng*Math.PI/180),this._cachedClippingPlane=this._computeClippingPlane(e);let s=t.bd(this._globeViewProjMatrixNoCorrectionInverted);t.S(s,s,[1,1,-1]),this._cachedFrustum=ty.fromInvProjectionMatrix(s,1,0,this._cachedClippingPlane,!0)}calculateFogMatrix(e){t.w("calculateFogMatrix is not supported on globe projection.");let r=t.bj();return t.ap(r),r}getVisibleUnwrappedCoordinates(e){return[new t.ba(0,e)]}getCameraFrustum(){return this._cachedFrustum}getClippingPlane(){return this._cachedClippingPlane}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(e){e&&t.w("terrain is not fully supported on vertical perspective projection."),this._helper.recalculateZoomAndCenter(0)}maxPitchScaleFactor(){return 1}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,r){if(!this._globeViewProjMatrixNoCorrection)return 1;let i=tF(e);t.aZ(i,i,1+r/t.bD);let n=t.bE();return t.aE(n,[i[0],i[1],i[2],1],this._globeViewProjMatrixNoCorrection),n[2]/n[3]}populateCache(e){}getBounds(){let e=.5*this.width,r=.5*this.height,i=[new t.P(0,0),new t.P(e,0),new t.P(this.width,0),new t.P(this.width,r),new t.P(this.width,this.height),new t.P(e,this.height),new t.P(0,this.height),new t.P(0,r)],n=[];for(let e of i)n.push(this.unprojectScreenPoint(e));let a=0,o=0,s=0,l=0,c=this.center;for(let e of n){let r=t.bJ(c.lng,e.lng),i=t.bJ(c.lat,e.lat);ra&&(a=r),is&&(s=i)}let u=[c.lng+o,c.lat+l,c.lng+a,c.lat+s];return this.isSurfacePointOnScreen([0,1,0])&&(u[3]=90,u[0]=-180,u[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(u[1]=-90,u[0]=-180,u[2]=180),new G(u)}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}setLocationAtPoint(e,r){let i=tF(this.unprojectScreenPoint(r)),n=tF(e),a=t.bz();t.bK(a);let o=t.bz();t.bH(o,i,a,-this.center.lng*Math.PI/180),t.bG(o,o,a,this.center.lat*Math.PI/180);let s=n[0]*n[0]+n[2]*n[2],l=o[0]*o[0];if(s=-g&&f<=g,v=m>=-g&&m<=g,x,b;if(y&&v){let e=this.center.lng*Math.PI/180,r=this.center.lat*Math.PI/180;t.bM(u,e)+t.bM(f,r)=0}isSurfacePointOnScreen(e){if(!this.isSurfacePointVisible(e))return!1;let r=t.bE();return t.aE(r,[...e,1],this._globeViewProjMatrixNoCorrection),r[0]/=r[3],r[1]/=r[3],r[2]/=r[3],r[0]>-1&&r[0]<1&&r[1]>-1&&r[1]<1&&r[2]>-1&&r[2]<1}rayPlanetIntersection(e,r){let i=t.b3(e,r),n=t.bz(),a=t.bz();t.aZ(a,r,i),t.b0(n,e,a);let o=1-t.b3(n,n);if(o<0)return null;let s=t.b3(e,e)-1,l=-i+(i<0?1:-1)*Math.sqrt(o),c=s/l;return{tMin:Math.min(c,l),tMax:Math.max(c,l)}}unprojectScreenPoint(e){var r,i;let n,a,o,s=this._cameraPosition,l=this.getRayDirectionFromPixel(e),c=this.rayPlanetIntersection(s,l);if(c){let e=t.bz();t.a_(e,s,[l[0]*c.tMin,l[1]*c.tMin,l[2]*c.tMin]);let r=t.bz();return t.b1(r,e),tB(r)}let u=this._cachedClippingPlane,h=u[0]*l[0]+u[1]*l[1]+u[2]*l[2],d=-t.b9(u,s)/h,f=t.bz();if(d>0)t.a_(f,s,[l[0]*d,l[1]*d,l[2]*d]);else{let e=t.bz();t.a_(e,s,[2*l[0],2*l[1],2*l[2]]);let r=t.b9(this._cachedClippingPlane,e);t.b0(f,e,[this._cachedClippingPlane[0]*r,this._cachedClippingPlane[1]*r,this._cachedClippingPlane[2]*r])}let p=((n=t.bz())[0]=-(u[0]*u[3]),n[1]=-(u[1]*u[3]),n[2]=-(u[2]*u[3]),{center:n,radius:Math.sqrt(1-u[3]*u[3])});return tB((r=p.center,i=p.radius,a=t.bz(),t.b0(a,f,r),o=t.bz(),t.bx(o,r,a,i/t.b7(a)),o))}getMatrixForModel(e,r){let i=t.W.convert(e),n=1/t.bD,a=t.bi();return t.bI(a,a,i.lng/180*Math.PI),t.bf(a,a,-i.lat/180*Math.PI),t.Q(a,a,[0,0,1+r/t.bD]),t.bf(a,a,.5*Math.PI),t.S(a,a,[n,n,n]),a}getProjectionDataForCustomLayer(e=!0){let r=this.getProjectionData({overscaledTileID:new t.a3(0,0,0,0,0),applyGlobeMatrix:e});return r.tileMercatorCoords=[0,0,1,1],r}getFastPathSimpleProjectionMatrix(e){}}class tJ{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(e){this._helper.setMinZoom(e)}setMaxZoom(e){this._helper.setMaxZoom(e)}setMinPitch(e){this._helper.setMinPitch(e)}setMaxPitch(e){this._helper.setMaxPitch(e)}setRenderWorldCopies(e){this._helper.setRenderWorldCopies(e)}setBearing(e){this._helper.setBearing(e)}setPitch(e){this._helper.setPitch(e)}setRoll(e){this._helper.setRoll(e)}setFov(e){this._helper.setFov(e)}setZoom(e){this._helper.setZoom(e)}setCenter(e){this._helper.setCenter(e)}setElevation(e){this._helper.setElevation(e)}setMinElevationForCurrentTile(e){this._helper.setMinElevationForCurrentTile(e)}setPadding(e){this._helper.setPadding(e)}interpolatePadding(e,t,r){this._helper.interpolatePadding(e,t,r)}isPaddingEqual(e){return this._helper.isPaddingEqual(e)}resize(e,t,r=!0){this._helper.resize(e,t,r)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(e){this._helper.setMaxBounds(e)}setConstrainOverride(e){this._helper.setConstrainOverride(e)}overrideNearFarZ(e,t){this._helper.overrideNearFarZ(e,t)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(e){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),e)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(e,t){this._globeness=e,this._globeLatitudeErrorCorrectionRadians=t,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(e){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(e,t)=>this.currentTransform.defaultConstrain(e,t),this.applyConstrain=(e,t)=>this._helper.applyConstrain(e,t),this._helper=new tp({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(e,t)=>this.defaultConstrain(e,t)},e),this._globeness=1,this._mercatorTransform=new tv,this._verticalPerspectiveTransform=new tK}clone(){let e=new tJ;return e._globeness=this._globeness,e._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,e.apply(this,!1),e}apply(e,t){this._helper.apply(e,t),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(e){let t=this._mercatorTransform.getProjectionData(e),r=this._verticalPerspectiveTransform.getProjectionData(e);return{mainMatrix:this.isGlobeRendering?r.mainMatrix:t.mainMatrix,clippingPlane:r.clippingPlane,tileMercatorCoords:r.tileMercatorCoords,projectionTransition:e.applyGlobeMatrix?this._globeness:0,fallbackMatrix:t.fallbackMatrix}}isLocationOccluded(e){return this.currentTransform.isLocationOccluded(e)}transformLightDirection(e){return this.currentTransform.transformLightDirection(e)}getPixelScale(){return t.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return t.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(e,r,i){let n=this._mercatorTransform.getPitchedTextCorrection(e,r,i),a=this._verticalPerspectiveTransform.getPitchedTextCorrection(e,r,i);return t.bt(n,a,this._globeness)}projectTileCoordinates(e,t,r,i){return this.currentTransform.projectTileCoordinates(e,t,r,i)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(e){return this.currentTransform.calculateFogMatrix(e)}getVisibleUnwrappedCoordinates(e){return this.currentTransform.getVisibleUnwrappedCoordinates(e)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(e){this._mercatorTransform.recalculateZoomAndCenter(e),this._verticalPerspectiveTransform.recalculateZoomAndCenter(e)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(e,t){return this.currentTransform.lngLatToCameraDepth(e,t)}populateCache(e){this._mercatorTransform.populateCache(e),this._verticalPerspectiveTransform.populateCache(e)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(e,t,r,i){return this._helper.calculateCenterFromCameraLngLatAlt(e,t,r,i)}setLocationAtPoint(e,t){this.isGlobeRendering?(this._verticalPerspectiveTransform.setLocationAtPoint(e,t),this.apply(this._verticalPerspectiveTransform,!1)):(this._mercatorTransform.setLocationAtPoint(e,t),this.apply(this._mercatorTransform,!1))}locationToScreenPoint(e,t){return this.currentTransform.locationToScreenPoint(e,t)}screenPointToMercatorCoordinate(e,t){return this.currentTransform.screenPointToMercatorCoordinate(e,t)}screenPointToLocation(e,t){return this.currentTransform.screenPointToLocation(e,t)}isPointOnMapSurface(e,t){return this.currentTransform.isPointOnMapSurface(e,t)}getRayDirectionFromPixel(e){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(e)}getMatrixForModel(e,t){return this.currentTransform.getMatrixForModel(e,t)}getProjectionDataForCustomLayer(e=!0){let t=this._mercatorTransform.getProjectionDataForCustomLayer(e);if(!this.isGlobeRendering)return t;let r=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(e);return r.fallbackMatrix=t.mainMatrix,r}getFastPathSimpleProjectionMatrix(e){return this.currentTransform.getFastPathSimpleProjectionMatrix(e)}}class tQ{get useGlobeControls(){return!0}handlePanInertia(e,r){let i=tV(e,r);return Math.abs(i.lng-r.center.lng)>180&&(i.lng=r.center.lng+179.5*Math.sign(i.lng-r.center.lng)),{easingCenter:i,easingOffset:new t.P(0,0)}}handleMapControlsRollPitchBearingZoom(e,r){let i=e.around,n=r.screenPointToLocation(i);e.bearingDelta&&r.setBearing(r.bearing+e.bearingDelta),e.pitchDelta&&r.setPitch(r.pitch+e.pitchDelta),e.rollDelta&&r.setRoll(r.roll+e.rollDelta);let a=r.zoom;e.zoomDelta&&r.setZoom(r.zoom+e.zoomDelta);let o=r.zoom-a;if(0===o)return;let s=t.bJ(r.center.lng,n.lng),l=s/(Math.abs(s/180)+1),c=t.bJ(r.center.lat,n.lat),u=r.getRayDirectionFromPixel(i),h=r.cameraPosition,d=-1*t.b3(h,u),f=t.bz();t.a_(f,h,[u[0]*d,u[1]*d,u[2]*d]);let p=Math.exp(-(.5*Math.max(t.b5(f)-1-.3,0))),m=tj(r.worldSize,r.center.lat)/Math.min(r.width,r.height),g=t.bw(m,.9,.5,1,.25),y=(1-t.ao(-o))*Math.min(p,g),v=r.center.lat,x=r.zoom,b=new t.W(r.center.lng+l*y,t.al(r.center.lat+c*y,-t.am,t.am));r.setLocationAtPoint(n,i);let _=r.center,w=Math.pow(Math.max(t.bw(Math.abs(s),45,85,0,1),t.bw(m,.75,.35,0,1)),.25),T=t.bJ(_.lng,b.lng),M=t.bJ(_.lat,b.lat);r.setCenter(new t.W(_.lng+T*w,_.lat+M*w).wrap()),r.setZoom(x+tU(v,r.center.lat))}handleMapControlsPan(e,t,r){if(!e.panDelta)return;let i=t.center.lat,n=t.zoom;t.setCenter(tV(e.panDelta,t).wrap()),t.setZoom(n+tU(i,t.center.lat))}cameraForBoxAndBearing(e,r,i,n,a){let o=t_(e,r,i,n,a),s=r.left/a.width*2-1,l=(a.width-r.right)/a.width*2-1,c=-(r.top/a.height*2)+1,u=-((a.height-r.bottom)/a.height*2)+1,h=0>t.bJ(i.getWest(),i.getEast()),d=h?i.getEast():i.getWest(),f=h?i.getWest():i.getEast(),p=Math.max(i.getNorth(),i.getSouth()),m=Math.min(i.getNorth(),i.getSouth()),g=d+.5*t.bJ(d,f),y=p+.5*t.bJ(p,m),v=a.clone();v.setCenter(o.center),v.setBearing(o.bearing),v.setPitch(0),v.setRoll(0),v.setZoom(o.zoom);let x=v.modelViewProjectionMatrix,b=[tF(i.getNorthWest()),tF(i.getNorthEast()),tF(i.getSouthWest()),tF(i.getSouthEast()),tF(new t.W(f,y)),tF(new t.W(d,y)),tF(new t.W(g,p)),tF(new t.W(g,m))],_=tF(o.center),w=1/0;for(let e of b)s<0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"x",s))),l>0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"x",l))),c>0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"y",c))),u<0&&(w=tQ.getLesserNonNegativeNonNull(w,tQ.solveVectorScale(e,_,x,"y",u)));if(Number.isFinite(w)&&0!==w)return o.zoom=Math.min(v.zoom+t.ar(w),e.maxZoom),o;tx()}handleJumpToCenterZoom(e,r){let i=e.center.lat,n=e.applyConstrain(r.center?t.W.convert(r.center):e.center,e.zoom).center;e.setCenter(n.wrap());let a=void 0!==r.zoom?+r.zoom:e.zoom+tU(i,n.lat);e.zoom!==a&&e.setZoom(a)}handleEaseTo(e,r){let i=e.zoom,n=e.center,a=e.padding,o={roll:e.roll,pitch:e.pitch,bearing:e.bearing},s={roll:void 0===r.roll?e.roll:r.roll,pitch:void 0===r.pitch?e.pitch:r.pitch,bearing:void 0===r.bearing?e.bearing:r.bearing},l=void 0!==r.zoom,c=!e.isPaddingEqual(r.padding),u=!1,h=r.center?t.W.convert(r.center):n,d=e.applyConstrain(h,i).center;td(e,d);let f=e.clone();f.setCenter(d),f.setZoom(l?+r.zoom:i+tU(n.lat,h.lat)),f.setBearing(r.bearing);let p=new t.P(t.al(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),t.al(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));f.setLocationAtPoint(d,p);let m=(r.offset&&r.offsetAsPoint.mag())>0?f.center:d,g=l?+r.zoom:i+tU(n.lat,m.lat),y=i+tU(n.lat,0),v=g+tU(m.lat,0),x=t.bJ(n.lng,m.lng),b=t.bJ(n.lat,m.lat),_=t.ao(v-y);return{easeFunc:i=>{if(t.bn(o,s)||tb({startEulerAngles:o,endEulerAngles:s,tr:e,k:i,useSlerp:o.roll!=s.roll}),c&&e.interpolatePadding(a,r.padding,i),r.around)t.w("Easing around a point is not supported under globe projection."),e.setLocationAtPoint(r.around,r.aroundPoint);else{let t=Math.pow(v>y?Math.min(2,_):Math.max(.5,_),1-i),r=tH(n,x,b,i*t);e.setCenter(r.wrap())}if(u){let r=t.H.number(y,v,i)+tU(0,e.center.lat);e.setZoom(r)}},isZooming:u=g!==i,elevationCenter:m}}handleFlyTo(e,r){let i,n,a=void 0!==r.zoom,o=e.center,s=e.zoom,l=e.padding,c=!e.isPaddingEqual(r.padding),u=e.applyConstrain(t.W.convert(r.center||r.locationAtOffset),s).center,h=a?+r.zoom:e.zoom+tU(e.center.lat,u.lat),d=e.clone();d.setCenter(u),d.setZoom(h),d.setBearing(r.bearing);let f=new t.P(t.al(e.centerPoint.x+r.offsetAsPoint.x,0,e.width),t.al(e.centerPoint.y+r.offsetAsPoint.y,0,e.height));d.setLocationAtPoint(u,f);let p=d.center;td(e,p);let m=(i=tF(o),n=tF(p),Math.acos(t.b3(i,n))/(2*Math.PI)*tO(e)),g=s+tU(o.lat,0),y=h+tU(p.lat,0),v=t.ao(y-g),x;if("number"==typeof r.minZoom){let i=Math.min(+r.minZoom+tU(p.lat,0),g,y)+tU(0,p.lat),n=e.applyConstrain(p,i).zoom+tU(p.lat,0);x=t.ao(n-g)}let b=t.bJ(o.lng,p.lng),_=t.bJ(o.lat,p.lat);return{easeFunc:(i,n,a,s)=>{let u=tH(o,b,_,a);c&&e.interpolatePadding(l,r.padding,i);let d=1===i?p:u;e.setCenter(d.wrap());let f=g+t.ar(n);e.setZoom(1===i?h:f+tU(0,d.lat))},scaleOfZoom:v,targetCenter:p,scaleOfMinZoom:x,pixelPathLength:m}}static solveVectorScale(e,t,r,i,n){let a="x"===i?[r[0],r[4],r[8],r[12]]:[r[1],r[5],r[9],r[13]],o=[r[3],r[7],r[11],r[15]],s=e[0]*a[0]+e[1]*a[1]+e[2]*a[2],l=e[0]*o[0]+e[1]*o[1]+e[2]*o[2],c=t[0]*a[0]+t[1]*a[1]+t[2]*a[2],u=t[0]*o[0]+t[1]*o[1]+t[2]*o[2];return c+n*l===s+n*u||o[3]*(s-c)+a[3]*(u-l)+s*u==c*l?null:(c+a[3]-n*u-n*o[3])/(c-s-n*u+n*l)}static getLesserNonNegativeNonNull(e,t){return null!==t&&t>=0&&tt.C(e,r?.filter(e=>"source.canvas"!==e.identifier)),t2=t.bN();class t3 extends t.E{constructor(e,r={}){var i,n;super(),this._rtlPluginLoaded=()=>{for(let e in this.tileManagers){let t=this.tileManagers[e].getSource().type;"vector"!==t&&"geojson"!==t||this.tileManagers[e].reload()}},this.map=e,this.dispatcher=new N(B(),e._getMapId()),this.dispatcher.registerMessageHandler("GG",(e,t)=>this.getGlyphs(e,t)),this.dispatcher.registerMessageHandler("GI",(e,t)=>this.getImages(e,t)),this.dispatcher.registerMessageHandler("GDA",(e,t)=>this.getDashes(e,t)),this.imageManager=new T,this.imageManager.setEventedParent(this);let a=(null==(i=e._container)?void 0:i.lang)||"u">typeof document&&(null==(n=document.documentElement)?void 0:n.lang)||void 0;this.glyphManager=new E(e._requestManager,r.localIdeographFontFamily,a),this.lineAtlas=new z(256,512),this.crossTileSymbolIndex=new tr,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",t.bO()),ec().on(eo,this._rtlPluginLoaded),this.on("data",e=>{if("source"!==e.dataType||"metadata"!==e.sourceDataType)return;let t=this.tileManagers[e.sourceId];if(!t)return;let r=t.getSource();if(r?.vectorLayerIds)for(let e in this._layers){let t=this._layers[e];t.source===r.id&&this._validateLayer(t)}})}_setInitialValues(){var e;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new t.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new((null==(e=this.crossTileSymbolIndex)?void 0:e.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(e,r){var i,n,a;this._checkLoaded();let o=null===r?null!=(a=null==(n=null==(i=this.stylesheet.state)?void 0:i[e])?void 0:n.default)?a:null:r;if(t.bQ(o,this._globalState[e]))return this;this._globalState[e]=o,this._applyGlobalStateChanges([e])}getGlobalState(){return this._globalState}setGlobalState(e){this._checkLoaded();let r=[];for(let i in e)t.bQ(this._globalState[i],e[i].default)||(r.push(i),this._globalState[i]=e[i].default);this._applyGlobalStateChanges(r)}_applyGlobalStateChanges(e){if(0===e.length)return;let t=new Set,r={};for(let i of e)for(let e in r[i]=this._globalState[i],this._layers){let r=this._layers[e],n=r.getLayoutAffectingGlobalStateRefs(),a=r.getPaintAffectingGlobalStateRefs(),o=r.getVisibilityAffectingGlobalStateRefs();if(n.has(i)&&t.add(r.source),a.has(i))for(let{name:e,value:t}of a.get(i))this._updatePaintProperty(r,e,t);o?.has(i)&&(r.recalculateVisibility(),this._updateLayer(r))}for(let e in this.dispatcher.broadcast("UGS",r),this.tileManagers)t.has(e)&&(this._reloadSource(e),this._changed=!0)}loadURL(e){return t._(this,arguments,void 0,function*(e,r={},i){this.fire(new t.n("dataloading",{dataType:"style"})),r.validate="boolean"!=typeof r.validate||r.validate,this._loadStyleRequest=new AbortController;let n=this._loadStyleRequest;try{let a=yield this.map._requestManager.transformRequest(e,"Style");t.bR(n.signal);let o=yield t.k(a,n);this._loadStyleRequest===n&&(this._loadStyleRequest=null),this._load(o.data,r,i)}catch(e){this._loadStyleRequest===n&&(this._loadStyleRequest=null),e&&!n.signal.aborted&&this.fire(new t.l(t.d(e)))}})}loadJSON(e,r={},i){this.fire(new t.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,g.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,r.validate=!1!==r.validate,this._load(e,r,i)}).catch(()=>{})}loadEmpty(){this.fire(new t.n("dataloading",{dataType:"style"})),this._load(t2,{validate:!1})}_load(e,r,i){var n,a;let o=r.transformStyle?r.transformStyle(i,e):e;if(!r.validate||!t1(this,t.F(o))){for(let e in o=Object.assign({},o),this._loaded=!0,this.stylesheet=o,o.sources)this.addSource(e,o.sources[e],{validate:!1});o.sprite?this._loadSprite(o.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(o.glyphs),this._createLayers(),this.light=new L(this.stylesheet.light),this._setProjectionInternal((null==(n=this.stylesheet.projection)?void 0:n.type)||"mercator"),this.sky=new I(this.stylesheet.sky),this.map.setTerrain(null!=(a=this.stylesheet.terrain)?a:null),this.fire(new t.n("data",{dataType:"style"})),this.fire(new t.n("style.load"))}}_createLayers(){var e,r,i;let n=t.bS(this.stylesheet.layers);for(let a of(this.setGlobalState(null!=(e=this.stylesheet.state)?e:null),this.dispatcher.broadcast("SL",n),this._order=n.map(e=>e.id),this._layers={},this._serializedLayers=null,n)){let e=t.bT(a,this._globalState);if(e.setEventedParent(this,{layer:{id:a.id}}),this._layers[a.id]=e,t.bU(e)&&this.tileManagers[e.source]){let t=null!=(i=null==(r=a.paint)?void 0:r["raster-fade-duration"])?i:e.paint.get("raster-fade-duration");this.tileManagers[e.source].setRasterFadeDuration(t)}}}_loadSprite(e,r=!1,i){this.imageManager.setLoaded(!1);let n=new AbortController,a;this._spriteRequest=n,(function(e,r,i,n){return t._(this,void 0,void 0,function*(){let a=_(e),o=i>1?"@2x":"",s={},c={};for(let{id:e,url:i}of a){let a=yield r.transformRequest(w(i,o,".json"),"SpriteJSON");s[e]=t.k(a,n);let u=yield r.transformRequest(w(i,o,".png"),"SpriteImage");c[e]=l.getImage(u,n)}return yield Promise.all([...Object.values(s),...Object.values(c)]),function(e,r){return t._(this,void 0,void 0,function*(){let t={};for(let i in e){t[i]={};let n=g.getImageCanvasContext((yield r[i]).data),a=(yield e[i]).data;for(let e in a){let{width:r,height:o,x:s,y:l,sdf:c,pixelRatio:u,stretchX:h,stretchY:d,content:f,textFitWidth:p,textFitHeight:m}=a[e];t[i][e]={data:null,pixelRatio:u,sdf:c,stretchX:h,stretchY:d,content:f,textFitWidth:p,textFitHeight:m,spriteData:{width:r,height:o,x:s,y:l,context:n}}}}return t})}(s,c)})})(e,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(e=>{if(this._spriteRequest=null,e)for(let t in e){for(let r of(this._spritesImagesIds[t]=[],this._spritesImagesIds[t]?this._spritesImagesIds[t].filter(t=>!(t in e)):[]))this.imageManager.removeImage(r),this._changedImages[r]=!0;for(let i in e[t]){let n="default"===t?i:`${t}:${i}`;this._spritesImagesIds[t].push(n),n in this.imageManager.images?this.imageManager.updateImage(n,e[t][i],!1):this.imageManager.addImage(n,e[t][i]),r&&(this._changedImages[n]=!0)}}}).catch(e=>{this._spriteRequest=null,a=e,n.signal.aborted||this.fire(new t.l(a))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),r&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"})),i&&i(a)})}_unloadSprite(){for(let e of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(e),this._changedImages[e]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}_validateLayer(e){let r=this.tileManagers[e.source];if(!r)return;let i=e.sourceLayer;if(!i)return;let n=r.getSource();("geojson"===n.type||n.vectorLayerIds&&!n.vectorLayerIds.includes(i))&&this.fire(new t.l(Error(`Source layer "${i}" does not exist on source "${n.id}" as specified by style layer "${e.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let e in this.tileManagers)if(!this.tileManagers[e].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(e,r=!1){let i=this._serializedAllLayers();if(!e||0===e.length)return Object.values(r?t.bV(i):i);let n=[];for(let a of e)if(i[a]){let e=r?t.bV(i[a]):i[a];n.push(e)}return n}_serializedAllLayers(){let e=this._serializedLayers;if(e)return e;for(let t of(e=this._serializedLayers={},Object.keys(this._layers))){let r=this._layers[t];"custom"!==r.type&&(e[t]=r.serialize())}return e}hasTransitions(){var e,t,r;if(null!=(e=this.light)&&e.hasTransition()||null!=(t=this.sky)&&t.hasTransition()||null!=(r=this.projection)&&r.hasTransition())return!0;for(let e in this.tileManagers)if(this.tileManagers[e].hasTransition())return!0;for(let e in this._layers)if(this._layers[e].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw Error("Style is not done loading.")}update(e){if(!this._loaded)return;let r=this._changed;if(r){let t=Object.keys(this._updatedLayers),r=Object.keys(this._removedLayers);for(let e in(t.length||r.length)&&this._updateWorkerLayers(t,r),this._updatedSources){let t=this._updatedSources[e];if("reload"===t)this._reloadSource(e);else{if("clear"!==t)throw Error(`Invalid action ${t}`);this._clearSource(e)}}for(let t in this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs(),this._updatedPaintProps)this._layers[t].updateTransitions(e);this.light.updateTransitions(e),this.sky.updateTransitions(e),this._resetUpdates()}let i={};for(let e in this.tileManagers){let t=this.tileManagers[e];i[e]=t.used,t.used=!1}for(let t of this._order){let r=this._layers[t];r.recalculate(e,this._availableImages),!r.isHidden(e.zoom)&&r.source&&(this.tileManagers[r.source].used=!0)}for(let e in i){let r=this.tileManagers[e];!!i[e]!=!!r.used&&r.fire(new t.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:e}))}this.light.recalculate(e),this.sky.recalculate(e),this.projection.recalculate(e),this.z=e.zoom,r&&this.fire(new t.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let e=Object.keys(this._changedImages);if(e.length){for(let t in this.tileManagers)this.tileManagers[t].reloadTilesForDependencies(["icons","patterns"],e);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let e in this.tileManagers)this.tileManagers[e].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(e,t){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(e,!1),removedIds:t})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(e,r={}){var i;this._checkLoaded();let n=this.serialize();if(e=r.transformStyle?r.transformStyle(n,e):e,(null==(i=r.validate)||i)&&t1(this,t.F(e)))return!1;(e=t.bV(e)).layers=t.bS(e.layers);let a=t.bW(n,e),o=this._getOperationsToPerform(a);if(o.unimplemented.length>0)throw Error(`Unimplemented: ${o.unimplemented.join(", ")}.`);if(0===o.operations.length)return!1;for(let e of o.operations)e();return this.stylesheet=e,this._serializedLayers=null,this.fire(new t.n("style.load",{style:this})),!0}_getOperationsToPerform(e){let t=[],r=[];for(let i of e)switch(i.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":t.push(()=>this.addLayer.apply(this,i.args));break;case"removeLayer":t.push(()=>this.removeLayer.apply(this,i.args));break;case"setPaintProperty":t.push(()=>this.setPaintProperty.apply(this,i.args));break;case"setLayoutProperty":t.push(()=>this.setLayoutProperty.apply(this,i.args));break;case"setFilter":t.push(()=>this.setFilter.apply(this,i.args));break;case"addSource":t.push(()=>this.addSource.apply(this,i.args));break;case"removeSource":t.push(()=>this.removeSource.apply(this,i.args));break;case"setLayerZoomRange":t.push(()=>this.setLayerZoomRange.apply(this,i.args));break;case"setLight":t.push(()=>this.setLight.apply(this,i.args));break;case"setGeoJSONSourceData":t.push(()=>this.setGeoJSONSourceData.apply(this,i.args));break;case"setGlyphs":t.push(()=>this.setGlyphs.apply(this,i.args));break;case"setSprite":t.push(()=>this.setSprite.apply(this,i.args));break;case"setTerrain":t.push(()=>this.map.setTerrain.apply(this,i.args));break;case"setSky":t.push(()=>this.setSky.apply(this,i.args));break;case"setProjection":this.setProjection.apply(this,i.args);break;case"setGlobalState":t.push(()=>this.setGlobalState.apply(this,i.args));break;case"setTransition":t.push(()=>{});break;default:r.push(i.command)}return{operations:t,unimplemented:r}}addImage(e,r){if(this.getImage(e))return this.fire(new t.l(Error(`An image named "${e}" already exists.`)));this.imageManager.addImage(e,r),this._afterImageUpdated(e)}updateImage(e,t){this.imageManager.updateImage(e,t)}getImage(e){return this.imageManager.getImage(e)}removeImage(e){if(!this.getImage(e))return this.fire(new t.l(Error(`An image named "${e}" does not exist.`)));this.imageManager.removeImage(e),this._afterImageUpdated(e)}_afterImageUpdated(e){this._availableImages=this.imageManager.listImages(),this._changedImages[e]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(e,r,i={}){var n;if(this._checkLoaded(),void 0!==this.tileManagers[e])throw Error(`Source "${e}" already exists.`);if(!r.type)throw Error(`The type property must be defined, but only the following properties were given: ${Object.keys(r).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(r.type)&&this._validate(t.F.source,`sources.${e}`,r,null,i))return;null!=(n=this.map)&&n._collectResourceTiming&&(r.collectResourceTiming=!0);let a=this.tileManagers[e]=new eE(e,r,this.dispatcher);a.style=this,a.setEventedParent(this,()=>({isSourceLoaded:a.loaded(),source:a.serialize(),sourceId:e})),a.onAdd(this.map),this._changed=!0}removeSource(e){if(this._checkLoaded(),void 0===this.tileManagers[e])throw Error(`There is no source with this ID=${e}`);for(let r in this._layers)if(this._layers[r].source===e)return this.fire(new t.l(Error(`Source "${e}" cannot be removed while layer "${r}" is using it.`)));let r=this.tileManagers[e];delete this.tileManagers[e],delete this._updatedSources[e],r.fire(new t.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:e})),r.setEventedParent(null),r.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(e,t){if(this._checkLoaded(),void 0===this.tileManagers[e])throw Error(`There is no source with this ID=${e}`);let r=this.tileManagers[e].getSource();if("geojson"!==r.type)throw Error(`geojsonSource.type is ${r.type}, which is !== 'geojson`);r.setData(t),this._changed=!0}getSource(e){var t;return null==(t=this.tileManagers[e])?void 0:t.getSource()}addLayer(e,r,i={}){let n;this._checkLoaded();let a=e.id;if(this.getLayer(a))return void this.fire(new t.l(Error(`Layer "${a}" already exists on this map.`)));if("custom"===e.type){if(t1(this,t.bX(e)))return;n=t.bT(e,this._globalState)}else{if("source"in e&&"object"==typeof e.source&&(this.addSource(a,e.source),e=t.bV(e),e=t.e(e,{source:a})),this._validate(t.F.layer,`layers.${a}`,e,{arrayIndex:-1},i))return;n=t.bT(e,this._globalState),this._validateLayer(n),n.setEventedParent(this,{layer:{id:a}})}let o=r?this._order.indexOf(r):this._order.length;if(r&&-1===o)this.fire(new t.l(Error(`Cannot add layer "${a}" before non-existing layer "${r}".`)));else{if(this._order.splice(o,0,a),this._layerOrderChanged=!0,this._layers[a]=n,this._removedLayers[a]&&n.source&&"custom"!==n.type){let e=this._removedLayers[a];delete this._removedLayers[a],e.type!==n.type?this._updatedSources[n.source]="clear":(this._updatedSources[n.source]="reload",this.tileManagers[n.source].pause())}this._updateLayer(n),n.onAdd&&n.onAdd(this.map)}}moveLayer(e,r){if(this._checkLoaded(),this._changed=!0,!this._layers[e])return void this.fire(new t.l(Error(`The layer '${e}' does not exist in the map's style and cannot be moved.`)));if(e===r)return;let i=this._order.indexOf(e);this._order.splice(i,1);let n=r?this._order.indexOf(r):this._order.length;r&&-1===n?this.fire(new t.l(Error(`Cannot move layer "${e}" before non-existing layer "${r}".`))):(this._order.splice(n,0,e),this._layerOrderChanged=!0)}removeLayer(e){this._checkLoaded();let r=this._layers[e];if(!r)return void this.fire(new t.l(Error(`Cannot remove non-existing layer "${e}".`)));r.setEventedParent(null);let i=this._order.indexOf(e);this._order.splice(i,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[e]=r,delete this._layers[e],this._serializedLayers&&delete this._serializedLayers[e],delete this._updatedLayers[e],delete this._updatedPaintProps[e],r.onRemove&&r.onRemove(this.map)}getLayer(e){return this._layers[e]}getLayersOrder(){return[...this._order]}hasLayer(e){return e in this._layers}setLayerZoomRange(e,r,i){this._checkLoaded();let n=this.getLayer(e);n?n.minzoom===r&&n.maxzoom===i||(null!=r&&(n.minzoom=r),null!=i&&(n.maxzoom=i),this._updateLayer(n)):this.fire(new t.l(Error(`Cannot set the zoom range of non-existing layer "${e}".`)))}setFilter(e,r,i={}){this._checkLoaded();let n=this.getLayer(e);if(n){if(!t.bQ(n.filter,r))return null==r?(n.setFilter(void 0),void this._updateLayer(n)):void(this._validate(t.F.filter,`layers.${n.id}.filter`,r,null,i)||(n.setFilter(t.bV(r)),this._updateLayer(n)))}else this.fire(new t.l(Error(`Cannot filter non-existing layer "${e}".`)))}getFilter(e){return t.bV(this.getLayer(e).filter)}setLayoutProperty(e,r,i,n={}){this._checkLoaded();let a=this.getLayer(e);a?t.bQ(a.getLayoutProperty(r),i)||(a.setLayoutProperty(r,i,n),this._updateLayer(a)):this.fire(new t.l(Error(`Cannot style non-existing layer "${e}".`)))}getLayoutProperty(e,r){let i=this.getLayer(e);if(i)return i.getLayoutProperty(r);this.fire(new t.l(Error(`Cannot get style of non-existing layer "${e}".`)))}setPaintProperty(e,r,i,n={}){this._checkLoaded();let a=this.getLayer(e);a?t.bQ(a.getPaintProperty(r),i)||this._updatePaintProperty(a,r,i,n):this.fire(new t.l(Error(`Cannot style non-existing layer "${e}".`)))}_updatePaintProperty(e,r,i,n={}){e.setPaintProperty(r,i,n)&&this._updateLayer(e),t.bU(e)&&"raster-fade-duration"===r&&this.tileManagers[e.source].setRasterFadeDuration(i),this._changed=!0,this._updatedPaintProps[e.id]=!0,this._serializedLayers=null}getPaintProperty(e,t){return this.getLayer(e).getPaintProperty(t)}setFeatureState(e,r){this._checkLoaded();let i=e.source,n=e.sourceLayer,a=this.tileManagers[i];if(void 0===a)return void this.fire(new t.l(Error(`The source '${i}' does not exist in the map's style.`)));let o=a.getSource().type;"geojson"===o&&n?this.fire(new t.l(Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==o||n?(void 0===e.id&&this.fire(new t.l(Error("The feature id parameter must be provided."))),a.setFeatureState(n,e.id,r)):this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(e,r){this._checkLoaded();let i=e.source,n=this.tileManagers[i];if(void 0===n)return void this.fire(new t.l(Error(`The source '${i}' does not exist in the map's style.`)));let a=n.getSource().type,o="vector"===a?e.sourceLayer:void 0;"vector"!==a||o?r&&"string"!=typeof e.id&&"number"!=typeof e.id?this.fire(new t.l(Error("A feature id is required to remove its specific state property."))):n.removeFeatureState(o,e.id,r):this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(e){this._checkLoaded();let r=e.source,i=e.sourceLayer,n=this.tileManagers[r];if(void 0!==n)return"vector"!==n.getSource().type||i?(void 0===e.id&&this.fire(new t.l(Error("The feature id parameter must be provided."))),n.getFeatureState(i,e.id)):void this.fire(new t.l(Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new t.l(Error(`The source '${r}' does not exist in the map's style.`)))}getTransition(){var e;return t.e({duration:300,delay:0},null==(e=this.stylesheet)?void 0:e.transition)}serialize(){if(!this._loaded)return;let e=t.bY(this.tileManagers,e=>e.serialize()),r=this._serializeByIds(this._order,!0),i=this.map.getTerrain()||void 0,n=this.stylesheet;return t.bZ({version:n.version,name:n.name,metadata:n.metadata,light:n.light,sky:n.sky,center:n.center,zoom:n.zoom,bearing:n.bearing,pitch:n.pitch,sprite:n.sprite,glyphs:n.glyphs,transition:n.transition,projection:n.projection,sources:e,layers:r,terrain:i},e=>void 0!==e)}_updateLayer(e){this._updatedLayers[e.id]=!0,e.source&&!this._updatedSources[e.source]&&"raster"!==this.tileManagers[e.source].getSource().type&&(this._updatedSources[e.source]="reload",this.tileManagers[e.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(e){let t=e=>"fill-extrusion"===this._layers[e].type,r={},i=[];for(let n=this._order.length-1;n>=0;n--){let a=this._order[n];if(t(a))for(let t of(r[a]=n,e)){let e=t[a];if(e)for(let t of e)i.push(t)}}i.sort((e,t)=>t.intersectionZ-e.intersectionZ);let n=[];for(let a=this._order.length-1;a>=0;a--){let o=this._order[a];if(t(o))for(let e=i.length-1;e>=0;e--){let t=i[e].feature;if(r[t.layer.id]s(n.tileID,e,t):void 0)});var d,f=function(e){let t={},r={};for(let{queryResults:i,wrappedTileID:n}of e){r[n]||(r[n]={});let e=r[n];for(let r in i){let n=i[r];e[r]||(e[r]={});let a=e[r];for(let e of(t[r]||(t[r]=[]),n))a[e.featureIndex]||(a[e.featureIndex]=!0,t[r].push(e))}}return t}(h);for(let t in f)for(let r of f[t])q(r,e);return f}(this.tileManagers[s],this._layers,o,e,l,i,this.map.terrain?(e,t,r)=>this.map.terrain.getElevation(e,t,r):void 0));return this.placement&&a.push(function(e,t,r,i,n,a,o){let s={},l=a.queryRenderedSymbols(i),c=[];for(let e of Object.keys(l).map(Number))c.push(o[e]);for(let r of(c.sort(V),c)){let i=r.featureIndex.lookupSymbolFeatures(l[r.bucketInstanceId],t,r.bucketIndex,r.sourceLayerIndex,{filterSpec:n.filter,globalState:n.globalState},n.layers,n.availableImages,e);for(let e in i){s[e]||(s[e]=[]);let t=i[e];for(let i of(t.sort((e,t)=>{let i=r.featureSortOrder;if(i){let r=i.indexOf(e.featureIndex);return i.indexOf(t.featureIndex)-r}return t.featureIndex-e.featureIndex}),t))s[e].push(i)}}for(let t in s)for(let i of s[t])q(i,r[e[t].source]);return s}(this._layers,o,this.tileManagers,e,l,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(a)}querySourceFeatures(e,r){r?.filter&&this._validate(t.F.filter,"querySourceFeatures.filter",r.filter,null,r);let i=this.tileManagers[e];return i?function(e,t){let r=e.getRenderableIds().map(t=>e.getTileByID(t)),i=[],n={};for(let e of r){let r=e.tileID.canonical.key;n[r]||(n[r]=!0,e.querySourceFeatures(i,t))}return i}(i,r?Object.assign(Object.assign({},r),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(e,r={}){this._checkLoaded();let i=this.light.getLight(),n=!1;for(let r in e)if(!t.bQ(e[r],i[r])){n=!0;break}if(!n)return;let a={now:v(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(e,r),this.light.updateTransitions(a)}getProjection(){var e;return null==(e=this.stylesheet)?void 0:e.projection}setProjection(e){this._checkLoaded();let t=e??{type:"mercator"};if(this.stylesheet.projection=e,this.projection){if(this.projection.name===t.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(t.type)}getSky(){var e;return null==(e=this.stylesheet)?void 0:e.sky}setSky(e,r={}){this._checkLoaded();let i=this.getSky(),n=!1;if(!e&&!i)return;if(e&&!i)n=!0;else if(!e&&i)n=!0;else for(let r in e)if(!t.bQ(e[r],i[r])){n=!0;break}if(!n)return;let a={now:v(),transition:t.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=e,this.sky.setSky(e,r),this.sky.updateTransitions(a)}_setProjectionInternal(e){let r=function(e,r){let i={constrainOverride:r};if(Array.isArray(e)){let t=new tD({type:e});return{projection:t,transform:new tJ(i),cameraHelper:new t0(t)}}switch(e){case"mercator":return{projection:new tu,transform:new tv(i),cameraHelper:new tw};case"globe":{let e=new tD({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:e,transform:new tJ(i),cameraHelper:new t0(e)}}case"vertical-perspective":return{projection:new tI,transform:new tK(i),cameraHelper:new tQ};default:return t.w(`Unknown projection name: ${e}. Falling back to mercator projection.`),{projection:new tu,transform:new tv(i),cameraHelper:new tw}}}(e,this.map.transformConstrain);for(let e in this.projection=r.projection,this.map.migrateProjection(r.transform,r.cameraHelper),this.tileManagers)this.tileManagers[e].reload()}_validate(e,r,i,n,a={}){return a?.validate!==!1&&t1(this,e.call(t.F,t.e({key:r,style:this.serialize(),value:i,styleSpec:t.x},n)))}_remove(e=!0){for(let e in this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),ec().off(eo,this._rtlPluginLoaded),this._layers)this._layers[e].setEventedParent(null);for(let e in this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),e&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(e)}_clearSource(e){this.tileManagers[e].clearTiles()}_reloadSource(e){this.tileManagers[e].resume(),this.tileManagers[e].reload()}_updateSources(e){for(let t in this.tileManagers)this.tileManagers[t].update(e,this.map.terrain)}_generateCollisionBoxes(){for(let e in this.tileManagers)this._reloadSource(e)}_updatePlacement(e,t,r,i,n=!1){let a=!1,o=!1,s={};for(let t of this._order){let r=this._layers[t];if("symbol"!==r.type)continue;if(!s[r.source]){let e=this.tileManagers[r.source];s[r.source]=e.getRenderableIds(!0).map(t=>e.getTileByID(t)).sort((e,t)=>t.tileID.overscaledZ-e.tileID.overscaledZ||(e.tileID.isLessThan(t.tileID)?-1:1))}let i=this.crossTileSymbolIndex.addLayer(r,s[r.source],e.center.lng);a||(a=i)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),n||(n=this._layerOrderChanged||0===r),(n||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(v(),e.zoom))&&(this.pauseablePlacement=new e8(e,this.map.terrain,this._order,n,t,r,i,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,s),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(v()),o=!0),a&&this.pauseablePlacement.placement.setStale()),o||a)for(let e of this._order){let t=this._layers[e];"symbol"===t.type&&this.placement.updateLayerOpacities(t,s[t.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(v())}_releaseSymbolFadeTiles(){for(let e in this.tileManagers)this.tileManagers[e].releaseSymbolFadeTiles()}getImages(e,r){return t._(this,void 0,void 0,function*(){let e=yield this.imageManager.getImages(r.icons);this._updateTilesForChangedImages();let t=this.tileManagers[r.source];return t&&t.setDependencies(r.tileID.key,r.type,r.icons),e})}getGlyphs(e,r){return t._(this,void 0,void 0,function*(){let e=yield this.glyphManager.getGlyphs(r.stacks),t=this.tileManagers[r.source];return t&&t.setDependencies(r.tileID.key,r.type,[""]),e})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(e,r={}){this._checkLoaded(),e&&this._validate(t.F.glyphs,"glyphs",e,null,r)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=e,this.glyphManager.entries={},this.glyphManager.setURL(e))}getDashes(e,r){return t._(this,void 0,void 0,function*(){let e={};for(let[t,i]of Object.entries(r.dashes))e[t]=this.lineAtlas.getDash(i.dasharray,i.round);return e})}addSprite(e,r,i={},n){this._checkLoaded();let a=[{id:e,url:r}],o=[..._(this.stylesheet.sprite),...a];this._validate(t.F.sprite,"sprite",o,null,i)||(this.stylesheet.sprite=o,this._loadSprite(a,!0,n))}removeSprite(e){this._checkLoaded();let r=_(this.stylesheet.sprite);if(r.find(t=>t.id===e)){if(this._spritesImagesIds[e])for(let t of this._spritesImagesIds[e])this.imageManager.removeImage(t),this._changedImages[t]=!0;r.splice(r.findIndex(t=>t.id===e),1),this.stylesheet.sprite=r.length>0?r:void 0,delete this._spritesImagesIds[e],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new t.n("data",{dataType:"style"}))}else this.fire(new t.l(Error(`Sprite "${e}" doesn't exists on this map.`)))}getSprite(){return _(this.stylesheet.sprite)}setSprite(e,r={},i){this._checkLoaded(),e&&this._validate(t.F.sprite,"sprite",e,null,r)||(this.stylesheet.sprite=e,e?this._loadSprite(e,!0,i):(this._unloadSprite(),i&&i(null)))}destroy(){for(let e in this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),this.tileManagers){let t=this.tileManagers[e];t.setEventedParent(null),t.onRemove(this.map)}for(let e in this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy(),this._layers){let t=this._layers[e];t.setEventedParent(null),t.onRemove&&t.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var t5=t.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class t4{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(e,t,r,i,n,a,o,s,l){this.context=e;let c=this.boundPaintVertexBuffers.length!==i.length;for(let e=0;!c&&e({u_texture:0,u_ele_delta:e,u_fog_matrix:r,u_fog_color:i?i.properties.get("fog-color"):t.bo.white,u_fog_ground_blend:i?i.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:a?0:i?i.calculateFogBlendOpacity(n):0,u_horizon_color:i?i.properties.get("horizon-color"):t.bo.white,u_horizon_fog_blend:i?i.properties.get("horizon-fog-blend"):1,u_is_globe_mode:+!!a}),t8={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function t7(e){let t=[];for(let r of e){if(null===r)continue;let e=r.split(" ");t.push(e.pop())}return t}class t9{constructor(e,r,i,n,a,o,s,l,c=[]){let u=e.gl;this.program=u.createProgram();let h=t7(r.staticAttributes),d=i?i.getBinderAttributes():[],f=h.concat(d),p=tn.prelude.staticUniforms?t7(tn.prelude.staticUniforms):[],m=s.staticUniforms?t7(s.staticUniforms):[],g=r.staticUniforms?t7(r.staticUniforms):[],y=i?i.getBinderUniforms():[],v=p.concat(m).concat(g).concat(y),x=[];for(let e of v)x.includes(e)||x.push(e);let b=i?i.defines():[];tS(u)&&b.unshift("#version 300 es"),a&&b.push("#define OVERDRAW_INSPECTOR;"),o&&b.push("#define TERRAIN3D;"),l&&b.push(l),c&&b.push(...c);let _=b.concat(tn.prelude.fragmentSource,s.fragmentSource,r.fragmentSource).join(` +`),w=b.concat(tn.prelude.vertexSource,s.vertexSource,r.vertexSource).join(` +`);tS(u)||(_=function(e){return e.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(_),w=function(e){return e.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(w));let T=u.createShader(u.FRAGMENT_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);if(u.shaderSource(T,_),u.compileShader(T),!u.getShaderParameter(T,u.COMPILE_STATUS))throw Error(`Could not compile fragment shader: ${u.getShaderInfoLog(T)}`);u.attachShader(this.program,T);let M=u.createShader(u.VERTEX_SHADER);if(u.isContextLost())return void(this.failedToCreate=!0);if(u.shaderSource(M,w),u.compileShader(M),!u.getShaderParameter(M,u.COMPILE_STATUS))throw Error(`Could not compile vertex shader: ${u.getShaderInfoLog(M)}`);u.attachShader(this.program,M),this.attributes={};let k={};this.numAttributes=f.length;for(let e=0;e({u_depth:new t.b_(e,r.u_depth),u_terrain:new t.b_(e,r.u_terrain),u_terrain_dim:new t.bp(e,r.u_terrain_dim),u_terrain_matrix:new t.c0(e,r.u_terrain_matrix),u_terrain_unpack:new t.c1(e,r.u_terrain_unpack),u_terrain_exaggeration:new t.bp(e,r.u_terrain_exaggeration)}))(e,k),this.projectionUniforms=((e,r)=>({u_projection_matrix:new t.c0(e,r.u_projection_matrix),u_projection_tile_mercator_coords:new t.c1(e,r.u_projection_tile_mercator_coords),u_projection_clipping_plane:new t.c1(e,r.u_projection_clipping_plane),u_projection_transition:new t.bp(e,r.u_projection_transition),u_projection_fallback_matrix:new t.c0(e,r.u_projection_fallback_matrix)}))(e,k),this.binderUniforms=i?i.getUniforms(e,k):[]}draw(e,t,r,i,n,a,o,s,l,c,u,h,d,f,p,m,g,y,v){var x;let b=e.gl;if(this.failedToCreate)return;if(e.program.set(this.program),e.setDepthMode(r),e.setStencilMode(i),e.setColorMode(n),e.setCullFace(a),s)for(let t in e.activeTexture.set(b.TEXTURE2),b.bindTexture(b.TEXTURE_2D,s.depthTexture),e.activeTexture.set(b.TEXTURE3),b.bindTexture(b.TEXTURE_2D,s.texture),this.terrainUniforms)this.terrainUniforms[t].set(s[t]);if(l)for(let e in l)this.projectionUniforms[t8[e]].set(l[e]);if(o)for(let e in this.fixedUniforms)this.fixedUniforms[e].set(o[e]);m&&m.setUniforms(e,this.binderUniforms,f,{zoom:p});let _=0;switch(t){case b.LINES:_=2;break;case b.TRIANGLES:_=3;break;case b.LINE_STRIP:_=1}for(let r of d.get())r.vaos||(r.vaos={}),(x=r.vaos)[c]||(x[c]=new t4),r.vaos[c].bind(e,this,u,m?m.getPaintVertexBuffers():[],h,r.vertexOffset,g,y,v),b.drawElements(t,r.primitiveLength*_,b.UNSIGNED_SHORT,r.primitiveOffset*_*2)}}function re(e,r,i){let n=1/t.aK(i,1,r.transform.tileZoom),a=Math.pow(2,i.tileID.overscaledZ),o=i.tileSize*Math.pow(2,r.transform.tileZoom)/a,s=o*(i.tileID.canonical.x+i.tileID.wrap*a),l=o*i.tileID.canonical.y;return{u_image:0,u_texsize:i.imageAtlasTexture.size,u_scale:[n,e.fromScale,e.toScale],u_fade:e.t,u_pixel_coord_upper:[s>>16,l>>16],u_pixel_coord_lower:[65535&s,65535&l]}}let rt=(e,r,i,n)=>{let a=e.style.light,o=a.properties.get("position"),s=[o.x,o.y,o.z],l=t.c4();"viewport"===a.properties.get("anchor")&&t.c5(l,e.transform.bearingInRadians),t.c6(s,s,l);let c=e.transform.transformLightDirection(s),u=a.properties.get("color");return{u_lightpos:s,u_lightpos_globe:c,u_lightintensity:a.properties.get("intensity"),u_lightcolor:[u.r,u.g,u.b],u_vertical_gradient:+r,u_opacity:i,u_fill_translate:n}},rr=(e,r,i,n,a,o,s)=>t.e(rt(e,r,i,n),re(o,e,s),{u_height_factor:-Math.pow(2,a.overscaledZ)/s.tileSize/8}),ri=(e,r,i,n)=>t.e(re(r,e,i),{u_fill_translate:n}),rn=(e,t)=>({u_world:e,u_fill_translate:t}),ra=(e,r,i,n,a)=>t.e(ri(e,r,i,a),{u_world:n}),ro=(e,r,i,n,a)=>{let o=e.transform,s,l,c=0;if("map"===i.paint.get("circle-pitch-alignment")){let e=t.aK(r,1,o.zoom);s=!0,l=[e,e],c=e/(t.a6*Math.pow(2,r.tileID.overscaledZ))*2*Math.PI*a}else s=!1,l=o.pixelsToGLUnits;return{u_camera_to_center_distance:o.cameraToCenterDistance,u_scale_with_map:+("map"===i.paint.get("circle-pitch-scale")),u_pitch_with_map:+s,u_device_pixel_ratio:e.pixelRatio,u_extrude_scale:l,u_globe_extrude_scale:c,u_translate:n}},rs=e=>({u_pixel_extrude_scale:[1/e.width,1/e.height]}),rl=e=>({u_viewport_size:[e.width,e.height]}),rc=(e,t=1)=>({u_color:e,u_overlay:0,u_overlay_scale:t}),ru=(e,r,i,n)=>{let a=t.aK(e,1,r)/(t.a6*Math.pow(2,e.tileID.overscaledZ))*2*Math.PI*n;return{u_extrude_scale:t.aK(e,1,r),u_intensity:i,u_globe_extrude_scale:a}},rh=(e,r,i,n)=>{let a=t.O();t.c7(a,0,e.width,e.height,0,0,1);let o=e.context.gl;return{u_matrix:a,u_world:[o.drawingBufferWidth,o.drawingBufferHeight],u_image:i,u_color_ramp:n,u_opacity:r.paint.get("heatmap-opacity")}},rd=(e,r,i)=>{var n;let a,o,s=i.paint.get("hillshade-accent-color"),l;switch(i.paint.get("hillshade-method")){case"basic":l=4;break;case"combined":l=1;break;case"igor":l=2;break;case"multidirectional":l=3;break;default:l=0}let c=i.getIlluminationProperties();for(let t=0;t{let i=r.stride,n=t.O();return t.c7(n,0,t.a6,-t.a6,0,0,1),t.Q(n,n,[0,-t.a6,0]),{u_matrix:n,u_image:1,u_dimension:[i,i],u_zoom:e.overscaledZ,u_unpack:r.getUnpackVector()}},rp=(e,t,r=0)=>({u_image:0,u_unpack:t.getUnpackVector(),u_dimension:[t.stride,t.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:r,u_opacity:e.paint.get("color-relief-opacity")}),rm=(e,r,i,n)=>{let a=e.transform;return{u_translation:r_(e,r,i),u_ratio:n/t.aK(r,1,a.zoom),u_device_pixel_ratio:e.pixelRatio,u_units_to_pixels:[1/a.pixelsToGLUnits[0],1/a.pixelsToGLUnits[1]]}},rg=(e,r,i,n,a)=>t.e(rm(e,r,i,n),{u_image:0,u_image_height:a}),ry=(e,r,i,n,a)=>{let o=e.transform,s=rb(r,o);return{u_translation:r_(e,r,i),u_texsize:r.imageAtlasTexture.size,u_ratio:n/t.aK(r,1,o.zoom),u_device_pixel_ratio:e.pixelRatio,u_image:0,u_scale:[s,a.fromScale,a.toScale],u_fade:a.t,u_units_to_pixels:[1/o.pixelsToGLUnits[0],1/o.pixelsToGLUnits[1]]}},rv=(e,r,i,n,a)=>{let o=rb(r,e.transform);return t.e(rm(e,r,i,n),{u_tileratio:o,u_crossfade_from:a.fromScale,u_crossfade_to:a.toScale,u_image:0,u_mix:a.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})},rx=(e,r,i,n,a,o)=>{let s=rb(r,e.transform);return t.e(rm(e,r,i,n),{u_image:0,u_image_height:o,u_tileratio:s,u_crossfade_from:a.fromScale,u_crossfade_to:a.toScale,u_image_dash:1,u_mix:a.t,u_lineatlas_width:e.lineAtlas.width,u_lineatlas_height:e.lineAtlas.height})};function rb(e,r){return 1/t.aK(e,1,r.tileZoom)}function r_(e,r,i){return t.aL(e.transform,r,i.paint.get("line-translate"),i.paint.get("line-translate-anchor"))}let rw=(e,t,r,i,n)=>{var a,o,s;let l,c;return{u_tl_parent:e,u_scale_parent:t,u_buffer_scale:1,u_fade_t:r.mix,u_opacity:r.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:(a=i.paint.get("raster-saturation"))>0?1-1/(1.001-a):-a,u_contrast_factor:(o=i.paint.get("raster-contrast"))>0?1/(1-o):1+o,u_spin_weights:(l=Math.sin(s=i.paint.get("raster-hue-rotate")*(Math.PI/180)),[(2*(c=Math.cos(s))+1)/3,(-Math.sqrt(3)*l-c+1)/3,(Math.sqrt(3)*l-c+1)/3]),u_coords_top:[n[0].x,n[0].y,n[1].x,n[1].y],u_coords_bottom:[n[3].x,n[3].y,n[2].x,n[2].y]}},rT=(e,t,r,i,n,a,o,s,l,c,u,h,d)=>{let f=o.transform;return{u_is_size_zoom_constant:+("constant"===e||"source"===e),u_is_size_feature_constant:+("constant"===e||"camera"===e),u_size_t:t?t.uSizeT:0,u_size:t?t.uSize:0,u_camera_to_center_distance:f.cameraToCenterDistance,u_pitch:f.pitch/360*2*Math.PI,u_rotate_symbol:+r,u_aspect_ratio:f.width/f.height,u_fade_change:o.options.fadeDuration?o.symbolFadeChange:1,u_label_plane_matrix:s,u_coord_matrix:l,u_is_text:+u,u_pitch_with_map:+i,u_is_along_line:n,u_is_variable_anchor:a,u_texsize:h,u_texture:0,u_translation:c,u_pitched_scale:d}},rM=(e,r,i,n,a,o,s,l,c,u,h,d,f,p)=>{let m=s.transform;return t.e(rT(e,r,i,n,a,o,s,l,c,u,h,d,p),{u_gamma_scale:n?Math.cos(m.pitch*Math.PI/180)*m.cameraToCenterDistance:1,u_device_pixel_ratio:s.pixelRatio,u_is_halo:+!!f,u_is_plain:1})},rk=(e,r,i,n,a,o,s,l,c,u,h,d,f)=>t.e(rM(e,r,i,n,a,o,s,l,c,u,!0,h,!0,f),{u_texsize_icon:d,u_texture_icon:1}),rA=(e,t)=>({u_opacity:e,u_color:t}),rS=(e,r,i,n,a)=>t.e(function(e,r,i,n){let a=i.imageManager.getPattern(e.from.toString()),o=i.imageManager.getPattern(e.to.toString()),{width:s,height:l}=i.imageManager.getPixelSize(),c=Math.pow(2,n.tileID.overscaledZ),u=n.tileSize*Math.pow(2,i.transform.tileZoom)/c,h=u*(n.tileID.canonical.x+n.tileID.wrap*c),d=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:o.tl,u_pattern_br_b:o.br,u_texsize:[s,l],u_mix:r.t,u_pattern_size_a:a.displaySize,u_pattern_size_b:o.displaySize,u_scale_a:r.fromScale,u_scale_b:r.toScale,u_tile_units_to_pixels:1/t.aK(n,1,i.transform.tileZoom),u_pixel_coord_upper:[h>>16,d>>16],u_pixel_coord_lower:[65535&h,65535&d]}}(i,a,r,n),{u_opacity:e}),rE=(e,t)=>{},rC={fillExtrusion:(e,r)=>({u_lightpos:new t.c2(e,r.u_lightpos),u_lightpos_globe:new t.c2(e,r.u_lightpos_globe),u_lightintensity:new t.bp(e,r.u_lightintensity),u_lightcolor:new t.c2(e,r.u_lightcolor),u_vertical_gradient:new t.bp(e,r.u_vertical_gradient),u_opacity:new t.bp(e,r.u_opacity),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillExtrusionPattern:(e,r)=>({u_lightpos:new t.c2(e,r.u_lightpos),u_lightpos_globe:new t.c2(e,r.u_lightpos_globe),u_lightintensity:new t.bp(e,r.u_lightintensity),u_lightcolor:new t.c2(e,r.u_lightcolor),u_vertical_gradient:new t.bp(e,r.u_vertical_gradient),u_height_factor:new t.bp(e,r.u_height_factor),u_opacity:new t.bp(e,r.u_opacity),u_fill_translate:new t.c3(e,r.u_fill_translate),u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade)}),fill:(e,r)=>({u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillPattern:(e,r)=>({u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillOutline:(e,r)=>({u_world:new t.c3(e,r.u_world),u_fill_translate:new t.c3(e,r.u_fill_translate)}),fillOutlinePattern:(e,r)=>({u_world:new t.c3(e,r.u_world),u_image:new t.b_(e,r.u_image),u_texsize:new t.c3(e,r.u_texsize),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade),u_fill_translate:new t.c3(e,r.u_fill_translate)}),circle:(e,r)=>({u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_scale_with_map:new t.b_(e,r.u_scale_with_map),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_extrude_scale:new t.c3(e,r.u_extrude_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_globe_extrude_scale:new t.bp(e,r.u_globe_extrude_scale),u_translate:new t.c3(e,r.u_translate)}),collisionBox:(e,r)=>({u_pixel_extrude_scale:new t.c3(e,r.u_pixel_extrude_scale)}),collisionCircle:(e,r)=>({u_viewport_size:new t.c3(e,r.u_viewport_size)}),debug:(e,r)=>({u_color:new t.b$(e,r.u_color),u_overlay:new t.b_(e,r.u_overlay),u_overlay_scale:new t.bp(e,r.u_overlay_scale)}),depth:rE,clippingMask:rE,heatmap:(e,r)=>({u_extrude_scale:new t.bp(e,r.u_extrude_scale),u_intensity:new t.bp(e,r.u_intensity),u_globe_extrude_scale:new t.bp(e,r.u_globe_extrude_scale)}),heatmapTexture:(e,r)=>({u_matrix:new t.c0(e,r.u_matrix),u_world:new t.c3(e,r.u_world),u_image:new t.b_(e,r.u_image),u_color_ramp:new t.b_(e,r.u_color_ramp),u_opacity:new t.bp(e,r.u_opacity)}),hillshade:(e,r)=>({u_image:new t.b_(e,r.u_image),u_latrange:new t.c3(e,r.u_latrange),u_exaggeration:new t.bp(e,r.u_exaggeration),u_altitudes:new t.c9(e,r.u_altitudes),u_azimuths:new t.c9(e,r.u_azimuths),u_accent:new t.b$(e,r.u_accent),u_method:new t.b_(e,r.u_method),u_shadows:new t.c8(e,r.u_shadows),u_highlights:new t.c8(e,r.u_highlights)}),hillshadePrepare:(e,r)=>({u_matrix:new t.c0(e,r.u_matrix),u_image:new t.b_(e,r.u_image),u_dimension:new t.c3(e,r.u_dimension),u_zoom:new t.bp(e,r.u_zoom),u_unpack:new t.c1(e,r.u_unpack)}),colorRelief:(e,r)=>({u_image:new t.b_(e,r.u_image),u_unpack:new t.c1(e,r.u_unpack),u_dimension:new t.c3(e,r.u_dimension),u_elevation_stops:new t.b_(e,r.u_elevation_stops),u_color_stops:new t.b_(e,r.u_color_stops),u_color_ramp_size:new t.b_(e,r.u_color_ramp_size),u_opacity:new t.bp(e,r.u_opacity)}),line:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels)}),lineGradient:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_image_height:new t.bp(e,r.u_image_height)}),linePattern:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_texsize:new t.c3(e,r.u_texsize),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_image:new t.b_(e,r.u_image),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_scale:new t.c2(e,r.u_scale),u_fade:new t.bp(e,r.u_fade)}),lineSDF:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_mix:new t.bp(e,r.u_mix),u_tileratio:new t.bp(e,r.u_tileratio),u_crossfade_from:new t.bp(e,r.u_crossfade_from),u_crossfade_to:new t.bp(e,r.u_crossfade_to),u_lineatlas_width:new t.bp(e,r.u_lineatlas_width),u_lineatlas_height:new t.bp(e,r.u_lineatlas_height)}),lineGradientSDF:(e,r)=>({u_translation:new t.c3(e,r.u_translation),u_ratio:new t.bp(e,r.u_ratio),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_units_to_pixels:new t.c3(e,r.u_units_to_pixels),u_image:new t.b_(e,r.u_image),u_image_height:new t.bp(e,r.u_image_height),u_tileratio:new t.bp(e,r.u_tileratio),u_crossfade_from:new t.bp(e,r.u_crossfade_from),u_crossfade_to:new t.bp(e,r.u_crossfade_to),u_image_dash:new t.b_(e,r.u_image_dash),u_mix:new t.bp(e,r.u_mix),u_lineatlas_width:new t.bp(e,r.u_lineatlas_width),u_lineatlas_height:new t.bp(e,r.u_lineatlas_height)}),raster:(e,r)=>({u_tl_parent:new t.c3(e,r.u_tl_parent),u_scale_parent:new t.bp(e,r.u_scale_parent),u_buffer_scale:new t.bp(e,r.u_buffer_scale),u_fade_t:new t.bp(e,r.u_fade_t),u_opacity:new t.bp(e,r.u_opacity),u_image0:new t.b_(e,r.u_image0),u_image1:new t.b_(e,r.u_image1),u_brightness_low:new t.bp(e,r.u_brightness_low),u_brightness_high:new t.bp(e,r.u_brightness_high),u_saturation_factor:new t.bp(e,r.u_saturation_factor),u_contrast_factor:new t.bp(e,r.u_contrast_factor),u_spin_weights:new t.c2(e,r.u_spin_weights),u_coords_top:new t.c1(e,r.u_coords_top),u_coords_bottom:new t.c1(e,r.u_coords_bottom)}),symbolIcon:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texture:new t.b_(e,r.u_texture),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),symbolSDF:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texture:new t.b_(e,r.u_texture),u_gamma_scale:new t.bp(e,r.u_gamma_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_is_halo:new t.b_(e,r.u_is_halo),u_is_plain:new t.b_(e,r.u_is_plain),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),symbolTextAndIcon:(e,r)=>({u_is_size_zoom_constant:new t.b_(e,r.u_is_size_zoom_constant),u_is_size_feature_constant:new t.b_(e,r.u_is_size_feature_constant),u_size_t:new t.bp(e,r.u_size_t),u_size:new t.bp(e,r.u_size),u_camera_to_center_distance:new t.bp(e,r.u_camera_to_center_distance),u_pitch:new t.bp(e,r.u_pitch),u_rotate_symbol:new t.b_(e,r.u_rotate_symbol),u_aspect_ratio:new t.bp(e,r.u_aspect_ratio),u_fade_change:new t.bp(e,r.u_fade_change),u_label_plane_matrix:new t.c0(e,r.u_label_plane_matrix),u_coord_matrix:new t.c0(e,r.u_coord_matrix),u_is_text:new t.b_(e,r.u_is_text),u_pitch_with_map:new t.b_(e,r.u_pitch_with_map),u_is_along_line:new t.b_(e,r.u_is_along_line),u_is_variable_anchor:new t.b_(e,r.u_is_variable_anchor),u_texsize:new t.c3(e,r.u_texsize),u_texsize_icon:new t.c3(e,r.u_texsize_icon),u_texture:new t.b_(e,r.u_texture),u_texture_icon:new t.b_(e,r.u_texture_icon),u_gamma_scale:new t.bp(e,r.u_gamma_scale),u_device_pixel_ratio:new t.bp(e,r.u_device_pixel_ratio),u_is_halo:new t.b_(e,r.u_is_halo),u_translation:new t.c3(e,r.u_translation),u_pitched_scale:new t.bp(e,r.u_pitched_scale)}),background:(e,r)=>({u_opacity:new t.bp(e,r.u_opacity),u_color:new t.b$(e,r.u_color)}),backgroundPattern:(e,r)=>({u_opacity:new t.bp(e,r.u_opacity),u_image:new t.b_(e,r.u_image),u_pattern_tl_a:new t.c3(e,r.u_pattern_tl_a),u_pattern_br_a:new t.c3(e,r.u_pattern_br_a),u_pattern_tl_b:new t.c3(e,r.u_pattern_tl_b),u_pattern_br_b:new t.c3(e,r.u_pattern_br_b),u_texsize:new t.c3(e,r.u_texsize),u_mix:new t.bp(e,r.u_mix),u_pattern_size_a:new t.c3(e,r.u_pattern_size_a),u_pattern_size_b:new t.c3(e,r.u_pattern_size_b),u_scale_a:new t.bp(e,r.u_scale_a),u_scale_b:new t.bp(e,r.u_scale_b),u_pixel_coord_upper:new t.c3(e,r.u_pixel_coord_upper),u_pixel_coord_lower:new t.c3(e,r.u_pixel_coord_lower),u_tile_units_to_pixels:new t.bp(e,r.u_tile_units_to_pixels)}),terrain:(e,r)=>({u_texture:new t.b_(e,r.u_texture),u_ele_delta:new t.bp(e,r.u_ele_delta),u_fog_matrix:new t.c0(e,r.u_fog_matrix),u_fog_color:new t.b$(e,r.u_fog_color),u_fog_ground_blend:new t.bp(e,r.u_fog_ground_blend),u_fog_ground_blend_opacity:new t.bp(e,r.u_fog_ground_blend_opacity),u_horizon_color:new t.b$(e,r.u_horizon_color),u_horizon_fog_blend:new t.bp(e,r.u_horizon_fog_blend),u_is_globe_mode:new t.bp(e,r.u_is_globe_mode)}),terrainDepth:(e,r)=>({u_ele_delta:new t.bp(e,r.u_ele_delta)}),terrainCoords:(e,r)=>({u_texture:new t.b_(e,r.u_texture),u_terrain_coords_id:new t.bp(e,r.u_terrain_coords_id),u_ele_delta:new t.bp(e,r.u_ele_delta)}),projectionErrorMeasurement:(e,r)=>({u_input:new t.bp(e,r.u_input),u_output_expected:new t.bp(e,r.u_output_expected)}),atmosphere:(e,r)=>({u_sun_pos:new t.c2(e,r.u_sun_pos),u_atmosphere_blend:new t.bp(e,r.u_atmosphere_blend),u_globe_position:new t.c2(e,r.u_globe_position),u_globe_radius:new t.bp(e,r.u_globe_radius),u_inv_proj_matrix:new t.c0(e,r.u_inv_proj_matrix)}),sky:(e,r)=>({u_sky_color:new t.b$(e,r.u_sky_color),u_horizon_color:new t.b$(e,r.u_horizon_color),u_horizon:new t.c3(e,r.u_horizon),u_horizon_normal:new t.c3(e,r.u_horizon_normal),u_sky_horizon_blend:new t.bp(e,r.u_sky_horizon_blend),u_sky_blend:new t.bp(e,r.u_sky_blend)})};class rL{constructor(e,t,r){this.context=e;let i=e.gl;this.buffer=i.createBuffer(),this.dynamicDraw=!!r,this.context.unbindVAO(),e.bindElementBuffer.set(this.buffer),i.bufferData(i.ELEMENT_ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?i.DYNAMIC_DRAW:i.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(e){let t=this.context.gl;if(!this.dynamicDraw)throw Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),t.bufferSubData(t.ELEMENT_ARRAY_BUFFER,0,e.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let rP={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class rI{constructor(e,t,r,i){this.length=t.length,this.attributes=r,this.itemSize=t.bytesPerElement,this.dynamicDraw=i,this.context=e;let n=e.gl;this.buffer=n.createBuffer(),e.bindVertexBuffer.set(this.buffer),n.bufferData(n.ARRAY_BUFFER,t.arrayBuffer,this.dynamicDraw?n.DYNAMIC_DRAW:n.STATIC_DRAW),this.dynamicDraw||t.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(e){if(e.length!==this.length)throw Error(`Length of new data is ${e.length}, which doesn't match current length of ${this.length}`);let t=this.context.gl;this.bind(),t.bufferSubData(t.ARRAY_BUFFER,0,e.arrayBuffer)}enableAttributes(e,t){for(let r of this.attributes){let i=t.attributes[r.name];void 0!==i&&e.enableVertexAttribArray(i)}}setVertexAttribPointers(e,t,r){for(let i of this.attributes){let n=t.attributes[i.name];void 0!==n&&e.vertexAttribPointer(n,i.components,e[rP[i.type]],!1,this.itemSize,i.offset+this.itemSize*(r||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class rz{constructor(e){this.gl=e.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(e){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class rD extends rz{getDefault(){return t.bo.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.clearColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class rO extends rz{getDefault(){return 1}set(e){(e!==this.current||this.dirty)&&(this.gl.clearDepth(e),this.current=e,this.dirty=!1)}}class rR extends rz{getDefault(){return 0}set(e){(e!==this.current||this.dirty)&&(this.gl.clearStencil(e),this.current=e,this.dirty=!1)}}class rF extends rz{getDefault(){return[!0,!0,!0,!0]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.colorMask(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class rj extends rz{getDefault(){return!0}set(e){(e!==this.current||this.dirty)&&(this.gl.depthMask(e),this.current=e,this.dirty=!1)}}class rB extends rz{getDefault(){return 255}set(e){(e!==this.current||this.dirty)&&(this.gl.stencilMask(e),this.current=e,this.dirty=!1)}}class rN extends rz{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(e){let t=this.current;(e.func!==t.func||e.ref!==t.ref||e.mask!==t.mask||this.dirty)&&(this.gl.stencilFunc(e.func,e.ref,e.mask),this.current=e,this.dirty=!1)}}class rU extends rz{getDefault(){let e=this.gl;return[e.KEEP,e.KEEP,e.KEEP]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||this.dirty)&&(this.gl.stencilOp(e[0],e[1],e[2]),this.current=e,this.dirty=!1)}}class rV extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.STENCIL_TEST):t.disable(t.STENCIL_TEST),this.current=e,this.dirty=!1}}class rq extends rz{getDefault(){return[0,1]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.depthRange(e[0],e[1]),this.current=e,this.dirty=!1)}}class rH extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.DEPTH_TEST):t.disable(t.DEPTH_TEST),this.current=e,this.dirty=!1}}class rG extends rz{getDefault(){return this.gl.LESS}set(e){(e!==this.current||this.dirty)&&(this.gl.depthFunc(e),this.current=e,this.dirty=!1)}}class rW extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.BLEND):t.disable(t.BLEND),this.current=e,this.dirty=!1}}class rY extends rz{getDefault(){let e=this.gl;return[e.ONE,e.ZERO]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||this.dirty)&&(this.gl.blendFunc(e[0],e[1]),this.current=e,this.dirty=!1)}}class rZ extends rz{getDefault(){return t.bo.transparent}set(e){let t=this.current;(e.r!==t.r||e.g!==t.g||e.b!==t.b||e.a!==t.a||this.dirty)&&(this.gl.blendColor(e.r,e.g,e.b,e.a),this.current=e,this.dirty=!1)}}class r$ extends rz{getDefault(){return this.gl.FUNC_ADD}set(e){(e!==this.current||this.dirty)&&(this.gl.blendEquation(e),this.current=e,this.dirty=!1)}}class rX extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;e?t.enable(t.CULL_FACE):t.disable(t.CULL_FACE),this.current=e,this.dirty=!1}}class rK extends rz{getDefault(){return this.gl.BACK}set(e){(e!==this.current||this.dirty)&&(this.gl.cullFace(e),this.current=e,this.dirty=!1)}}class rJ extends rz{getDefault(){return this.gl.CCW}set(e){(e!==this.current||this.dirty)&&(this.gl.frontFace(e),this.current=e,this.dirty=!1)}}class rQ extends rz{getDefault(){return null}set(e){(e!==this.current||this.dirty)&&(this.gl.useProgram(e),this.current=e,this.dirty=!1)}}class r0 extends rz{getDefault(){return this.gl.TEXTURE0}set(e){(e!==this.current||this.dirty)&&(this.gl.activeTexture(e),this.current=e,this.dirty=!1)}}class r1 extends rz{getDefault(){let e=this.gl;return[0,0,e.drawingBufferWidth,e.drawingBufferHeight]}set(e){let t=this.current;(e[0]!==t[0]||e[1]!==t[1]||e[2]!==t[2]||e[3]!==t[3]||this.dirty)&&(this.gl.viewport(e[0],e[1],e[2],e[3]),this.current=e,this.dirty=!1)}}class r2 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindFramebuffer(t.FRAMEBUFFER,e),this.current=e,this.dirty=!1}}class r3 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindRenderbuffer(t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class r5 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindTexture(t.TEXTURE_2D,e),this.current=e,this.dirty=!1}}class r4 extends rz{getDefault(){return null}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.bindBuffer(t.ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class r6 extends rz{getDefault(){return null}set(e){let t=this.gl;t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,e),this.current=e,this.dirty=!1}}class r8 extends rz{getDefault(){return null}set(e){var t;if(e===this.current&&!this.dirty)return;let r=this.gl;tS(r)?r.bindVertexArray(e):null==(t=r.getExtension("OES_vertex_array_object"))||t.bindVertexArrayOES(e),this.current=e,this.dirty=!1}}class r7 extends rz{getDefault(){return 4}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_ALIGNMENT,e),this.current=e,this.dirty=!1}}class r9 extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_PREMULTIPLY_ALPHA_WEBGL,e),this.current=e,this.dirty=!1}}class ie extends rz{getDefault(){return!1}set(e){if(e===this.current&&!this.dirty)return;let t=this.gl;t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,e),this.current=e,this.dirty=!1}}class it extends rz{constructor(e,t){super(e),this.context=e,this.parent=t}getDefault(){return null}}class ir extends it{setDirty(){this.dirty=!0}set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferTexture2D(t.FRAMEBUFFER,t.COLOR_ATTACHMENT0,t.TEXTURE_2D,e,0),this.current=e,this.dirty=!1}}class ii extends it{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}class ia extends it{set(e){if(e===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let t=this.gl;t.framebufferRenderbuffer(t.FRAMEBUFFER,t.DEPTH_STENCIL_ATTACHMENT,t.RENDERBUFFER,e),this.current=e,this.dirty=!1}}let io="Framebuffer is not complete";class is{constructor(e,t,r,i,n){this.context=e,this.width=t,this.height=r;let a=e.gl,o=this.framebuffer=a.createFramebuffer();if(this.colorAttachment=new ir(e,o),i)this.depthAttachment=n?new ia(e,o):new ii(e,o);else if(n)throw Error("Stencil cannot be set without depth");if(a.checkFramebufferStatus(a.FRAMEBUFFER)!==a.FRAMEBUFFER_COMPLETE)throw Error(io)}destroy(){let e=this.context.gl,t=this.colorAttachment.get();if(t&&e.deleteTexture(t),this.depthAttachment){let t=this.depthAttachment.get();t&&e.deleteRenderbuffer(t)}e.deleteFramebuffer(this.framebuffer)}}class il{constructor(e){var t,r;if(this.gl=e,this.clearColor=new rD(this),this.clearDepth=new rO(this),this.clearStencil=new rR(this),this.colorMask=new rF(this),this.depthMask=new rj(this),this.stencilMask=new rB(this),this.stencilFunc=new rN(this),this.stencilOp=new rU(this),this.stencilTest=new rV(this),this.depthRange=new rq(this),this.depthTest=new rH(this),this.depthFunc=new rG(this),this.blend=new rW(this),this.blendFunc=new rY(this),this.blendColor=new rZ(this),this.blendEquation=new r$(this),this.cullFace=new rX(this),this.cullFaceSide=new rK(this),this.frontFace=new rJ(this),this.program=new rQ(this),this.activeTexture=new r0(this),this.viewport=new r1(this),this.bindFramebuffer=new r2(this),this.bindRenderbuffer=new r3(this),this.bindTexture=new r5(this),this.bindVertexBuffer=new r4(this),this.bindElementBuffer=new r6(this),this.bindVertexArray=new r8(this),this.pixelStoreUnpack=new r7(this),this.pixelStoreUnpackPremultiplyAlpha=new r9(this),this.pixelStoreUnpackFlipY=new ie(this),this.extTextureFilterAnisotropic=e.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=e.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE),tS(e)){this.HALF_FLOAT=e.HALF_FLOAT;let i=e.getExtension("EXT_color_buffer_half_float");this.RGBA16F=null!=(t=e.RGBA16F)?t:i?.RGBA16F_EXT,this.RGB16F=null!=(r=e.RGB16F)?r:i?.RGB16F_EXT,e.getExtension("EXT_color_buffer_float")}else{e.getExtension("EXT_color_buffer_half_float"),e.getExtension("OES_texture_half_float_linear");let t=e.getExtension("OES_texture_half_float");this.HALF_FLOAT=t?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(e,t){return new rL(this,e,t)}createVertexBuffer(e,t,r){return new rI(this,e,t,r)}createRenderbuffer(e,t,r){let i=this.gl,n=i.createRenderbuffer();return this.bindRenderbuffer.set(n),i.renderbufferStorage(i.RENDERBUFFER,e,t,r),this.bindRenderbuffer.set(null),n}createFramebuffer(e,t,r,i){return new is(this,e,t,r,i)}clear({color:e,depth:t,stencil:r}){let i=this.gl,n=0;e&&(n|=i.COLOR_BUFFER_BIT,this.clearColor.set(e),this.colorMask.set([!0,!0,!0,!0])),void 0!==t&&(n|=i.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(t),this.depthMask.set(!0)),void 0!==r&&(n|=i.STENCIL_BUFFER_BIT,this.clearStencil.set(r),this.stencilMask.set(255)),i.clear(n)}setCullFace(e){!1===e.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(e.mode),this.frontFace.set(e.frontFace))}setDepthMode(e){e.func!==this.gl.ALWAYS||e.mask?(this.depthTest.set(!0),this.depthFunc.set(e.func),this.depthMask.set(e.mask),this.depthRange.set(e.range)):this.depthTest.set(!1)}setStencilMode(e){e.test.func!==this.gl.ALWAYS||e.mask?(this.stencilTest.set(!0),this.stencilMask.set(e.mask),this.stencilOp.set([e.fail,e.depthFail,e.pass]),this.stencilFunc.set({func:e.test.func,ref:e.ref,mask:e.test.mask})):this.stencilTest.set(!1)}setColorMode(e){t.bQ(e.blendFunction,tT.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(e.blendFunction),this.blendColor.set(e.blendColor)),this.colorMask.set(e.mask)}createVertexArray(){var e;return tS(this.gl)?this.gl.createVertexArray():null==(e=this.gl.getExtension("OES_vertex_array_object"))?void 0:e.createVertexArrayOES()}deleteVertexArray(e){var t;tS(this.gl)?this.gl.deleteVertexArray(e):null==(t=this.gl.getExtension("OES_vertex_array_object"))||t.deleteVertexArrayOES(e)}unbindVAO(){this.bindVertexArray.set(null)}}function ic(e,r,n,a,o){var s,l;let c=e.context,u=e.transform,h=c.gl,d=e.useProgram("collisionBox"),f=[],p=0,m=0;for(let t of a){let i=r.getTile(t).getBucket(n);if(!i)continue;let a=o?i.textCollisionBox:i.iconCollisionBox,l=i.collisionCircleArray;l.length>0&&(f.push({circleArray:l,circleOffset:m,coord:t}),p+=l.length/4,m=p),a&&d.draw(c,h.LINES,tk.disabled,tA.disabled,e.colorModeForRenderPass(),tM.disabled,rs(e.transform),null==(s=e.style.map.terrain)?void 0:s.getTerrainData(t),u.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),n.id,a.layoutVertexBuffer,a.indexBuffer,a.segments,null,e.transform.zoom,null,null,a.collisionVertexBuffer)}if(!o||!f.length)return;let g=e.useProgram("collisionCircle"),y=new t.ca;y.resize(4*p),y._trim();let v=0;for(let e of f)for(let t=0;te.style.map.terrain.getElevation(l,t,r):null;!function(e,r,i,n,a,o,s,l,c,u,h,d,f){let p=i?e.textSizeData:e.iconSizeData,m=t.aw(p,r.transform.zoom),g=[256/r.width*2+1,256/r.height*2+1],y=i?e.text.dynamicLayoutVertexArray:e.icon.dynamicLayoutVertexArray;y.clear();let v=e.lineVertexArray,x=i?e.text.placedSymbolArray:e.icon.placedSymbolArray,b=r.transform.width/r.transform.height,_=!1;for(let i=0;i=-g[0]&&w.x<=g[0]&&w.y>=-g[1])||!(w.y<=g[1])){eY(T.numGlyphs,y);continue}let S=.5+r.transform.cameraToCenterDistance/A.signedDistanceFromCamera*.5,E=t.ay(p,m,T),C=o?E*r.transform.getPitchedTextCorrection(T.anchorX,T.anchorY,c)/S:E*S,L=ej({projectionContext:k,pitchedLabelPlaneMatrixInverse:a,symbol:T,fontSize:C,flip:!1,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:y,aspectRatio:b,rotateToLine:l});_=L.useVertical,(L.notEnoughRoom||_||L.needsFlipping&&ej({projectionContext:k,pitchedLabelPlaneMatrixInverse:a,symbol:T,fontSize:C,flip:!0,keepUpright:s,glyphOffsetArray:e.glyphOffsetArray,dynamicLayoutVertexArray:y,aspectRatio:b,rotateToLine:l}).notEnoughRoom)&&eY(T.numGlyphs,y)}i?e.text.dynamicLayoutVertexBuffer.updateData(y):e.icon.dynamicLayoutVertexBuffer.updateData(y)}(c,e,a,B,r,b,u,"map"===i.layout.get("text-rotation-alignment"),l.toUnwrapped(),v.width,v.height,U,n)}let G=a&&A||H,W=_||G?iu:b?B:e.transform.clipSpaceToPixelsMatrix,Y=m&&0!==i.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(1),Z={program:C,buffers:h,uniformValues:m?c.iconsInText?rk(g.kind,L,w,b,_,G,e,W,N,U,I,R,E):rM(g.kind,L,w,b,_,G,e,W,N,U,a,I,Y,E):rT(g.kind,L,w,b,_,G,e,W,N,U,a,I,E),projectionData:V,atlasTexture:z,atlasTextureIcon:F,atlasInterpolation:D,atlasInterpolationIcon:O,isSDF:m,hasHalo:Y};if(T&&c.canOverlap)for(let e of(M=!0,h.segments.get()))S.push({segments:new t.aV([e]),sortKey:e.sortKey,state:Z,terrainData:P});else S.push({segments:h.segments,sortKey:0,state:Z,terrainData:P})}M&&S.sort((e,t)=>e.sortKey-t.sortKey);let C=null!=(m=i.paint.get(a?"text-halo-width":"icon-halo-width").constantOr(null))?m:1/0,L=i.layout.get("text-letter-spacing").constantOr(0)*t.aJ<0||C>1;for(let t of S){let r=t.state;g.activeTexture.set(y.TEXTURE0),r.atlasTexture.bind(r.atlasInterpolation,y.CLAMP_TO_EDGE),r.atlasTextureIcon&&(g.activeTexture.set(y.TEXTURE1),r.atlasTextureIcon&&r.atlasTextureIcon.bind(r.atlasInterpolationIcon,y.CLAMP_TO_EDGE));let n=r.isSDF&&r.hasHalo;if(n){let n=r.uniformValues;n.u_is_halo=1,L&&(n.u_is_plain=0,id(r.buffers,t.segments,i,e,r.program,k,h,d,n,r.projectionData,t.terrainData),n.u_is_halo=0,n.u_is_plain=1)}id(r.buffers,t.segments,i,e,r.program,k,h,d,r.uniformValues,r.projectionData,t.terrainData),n&&!L&&(r.uniformValues.u_is_halo=0)}}function id(e,t,r,i,n,a,o,s,l,c,u){let h=i.context;n.draw(h,h.gl.TRIANGLES,a,o,s,tM.backCCW,l,u,c,r.id,e.layoutVertexBuffer,e.indexBuffer,t,r.paint,i.transform.zoom,e.programConfigurations.get(r.id),e.dynamicLayoutVertexBuffer,e.opacityVertexBuffer)}function ip(e,t,r){var i,n;let a=e.gl,o=a.createTexture();a.bindTexture(a.TEXTURE_2D,o),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);let s=null!=(i=e.HALF_FLOAT)?i:a.UNSIGNED_BYTE,l=null!=(n=e.RGBA16F)?n:a.RGBA;a.texImage2D(a.TEXTURE_2D,0,l,t,r,0,a.RGBA,s,null);let c=e.createFramebuffer(t,r,!1,!1);return c.colorAttachment.set(o),c}function im(e,r){return r.colorRampTexture||(r.colorRampTexture=new t.T(e,r.colorRamp,e.gl.RGBA)),r.colorRampTexture}function ig(e,r,i,n,a,o,s,l){let c=256;if(a.stepInterpolant){let n=r.getSource().maxzoom,a=s.canonical.z===n?Math.ceil(1<e.options.anisotropicFilterPitch&&m.texParameterf(m.TEXTURE_2D,p.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,p.extTextureFilterAnisotropicMax);let I=null==(d=e.style.map.terrain)?void 0:d.getTerrainData(A),z=y.getProjectionData({overscaledTileID:A,aligned:_,applyGlobeMatrix:!h,applyTerrainMatrix:!0}),D=rw(L,C,P.fadeMix,i,l),O=x.getMeshFromTileID(p,A.canonical,o,s,"raster");g.draw(p,m.TRIANGLES,n,a?a[A.overscaledZ]:tA.disabled,b,c?tM.frontCCW:tM.backCCW,D,I,z,i.id,O.vertexBuffer,O.indexBuffer,O.segments)}}let ik=new t.bo(1,0,0,1),iA=new t.bo(0,1,0,1),iS=new t.bo(0,0,1,1),iE=new t.bo(1,0,1,1),iC=new t.bo(0,1,1,1);function iL(e,t,r,i){iI(e,0,t+r/2,e.transform.width,r,i)}function iP(e,t,r,i){iI(e,t-r/2,0,r,e.transform.height,i)}function iI(e,t,r,i,n,a){let o=e.context,s=o.gl;s.enable(s.SCISSOR_TEST),s.scissor(t*e.pixelRatio,r*e.pixelRatio,i*e.pixelRatio,n*e.pixelRatio),o.clear({color:a}),s.disable(s.SCISSOR_TEST)}function iz(e,t,r,i){let{isRenderingGlobe:n}=i,a=e.context,o=a.gl,s=e.transform,l=e.colorModeForRenderPass(),c=e.getDepthModeFor3D(),u=e.useProgram("terrain");for(let i of(a.bindFramebuffer.set(null),a.viewport.set([0,0,e.width,e.height]),r)){let r=t.getTerrainMesh(i.tileID),h=e.renderToTexture.getTexture(i),d=t.getTerrainData(i.tileID);a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,h.texture);let f=t6(t.getMeshFrameDelta(s.zoom),s.calculateFogMatrix(i.tileID.toUnwrapped()),e.style.sky,s.pitch,n),p=s.getProjectionData({overscaledTileID:i.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});u.draw(a,o.TRIANGLES,c,tA.disabled,l,tM.backCCW,f,d,p,"terrain",r.vertexBuffer,r.indexBuffer,r.segments)}}function iD(e,r){if(!r.mesh){let i=new t.aU;i.emplaceBack(-1,-1),i.emplaceBack(1,-1),i.emplaceBack(1,1),i.emplaceBack(-1,1);let n=new t.aW;n.emplaceBack(0,1,2),n.emplaceBack(0,2,3),r.mesh=new to(e.createVertexBuffer(i,ts.members),e.createIndexBuffer(n),t.aV.simpleSegment(0,0,i.length,n.length))}return r.mesh}let iO={symbol:function(e,r,i,n,a,o){if("translucent"!==e.renderPass)return;let{isRenderingToTexture:s}=o,l=tA.disabled,c=e.colorModeForRenderPass();(i._unevaluatedLayout.hasValue("text-variable-anchor")||i._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(e,r,i,n,a,o,s,l,c){var u;let h=r.transform,d=r.style.map.terrain,f="map"===a,p="map"===o;for(let a of e){let e=n.getTile(a),o=e.getBucket(i);if(!(null!=(u=o?.text)&&u.segments.get().length))continue;let m=t.aw(o.textSizeData,h.zoom),g=t.aK(e,1,r.transform.zoom),y=ez(f,r.transform,g),v="none"!==i.layout.get("icon-text-fit")&&o.hasIconData();if(m){let r=Math.pow(2,h.zoom-e.tileID.overscaledZ),i=d?(e,t)=>d.getElevation(a,e,t):null;!function(e,r,i,n,a,o,s,l,c,u,h,d){let f=e.text.placedSymbolArray,p=e.text.dynamicLayoutVertexArray,m=e.icon.dynamicLayoutVertexArray,g={};p.clear();for(let m=0;m=0&&(g[y.associatedIconIndex]={shiftedAnchor:E,angle:C})}else eY(y.numGlyphs,p)}if(c){m.clear();let r=e.icon.placedSymbolArray;for(let e=0;ee.sortKey-t.sortKey),v)){let{programConfiguration:r,program:n,layoutVertexBuffer:a,indexBuffer:o,uniformValues:s,terrainData:l,projectionData:c}=t.state;n.draw(d,f.TRIANGLES,m,g,y,tM.backCCW,s,l,c,i.id,a,o,t.segments,i.paint,e.transform.zoom,r)}},heatmap:function(e,r,i,n,a){if(0===i.paint.get("heatmap-opacity"))return;let o=e.context,{isRenderingToTexture:s,isRenderingGlobe:l}=a;if(e.style.map.terrain){for(let a of n){let n=r.getTile(a);r.hasRenderableParent(a)||("offscreen"===e.renderPass?function(e,r,i,n,a){let o=e.context,s=o.gl,l=tA.disabled,c=new tT([s.ONE,s.ONE],t.bo.transparent,[!0,!0,!0,!0]),u=r.getBucket(i);if(!u)return;let h=n.key,d=i.heatmapFbos.get(h);d||(d=ip(o,r.tileSize,r.tileSize),i.heatmapFbos.set(h,d)),o.bindFramebuffer.set(d.framebuffer),o.viewport.set([0,0,r.tileSize,r.tileSize]),o.clear({color:t.bo.transparent});let f=u.programConfigurations.get(i.id),p=e.useProgram("heatmap",f,!a),m=e.transform.getProjectionData({overscaledTileID:r.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),g=e.style.map.terrain.getTerrainData(n);p.draw(o,s.TRIANGLES,tk.disabled,l,c,tM.disabled,ru(r,e.transform.zoom,i.paint.get("heatmap-intensity"),1),g,m,i.id,u.layoutVertexBuffer,u.indexBuffer,u.segments,i.paint,e.transform.zoom,f)}(e,n,i,a,l):"translucent"===e.renderPass&&function(e,t,r,i,n){let a=e.context,o=a.gl,s=e.transform;a.setColorMode(e.colorModeForRenderPass());let l=im(a,t),c=r.key,u=t.heatmapFbos.get(c);if(!u)return;a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,u.colorAttachment.get()),a.activeTexture.set(o.TEXTURE1),l.bind(o.LINEAR,o.CLAMP_TO_EDGE);let h=s.getProjectionData({overscaledTileID:r,applyTerrainMatrix:n,applyGlobeMatrix:!i});e.useProgram("heatmapTexture").draw(a,o.TRIANGLES,tk.disabled,tA.disabled,e.colorModeForRenderPass(),tM.disabled,rh(e,t,0,1),null,h,t.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments,t.paint,s.zoom),u.destroy(),t.heatmapFbos.delete(c)}(e,i,a,s,l))}o.viewport.set([0,0,e.width,e.height])}else{let a,o,s;"offscreen"===e.renderPass?function(e,r,i,n){let a,o,s=e.context,l=s.gl,c=e.transform,u=tA.disabled,h=new tT([l.ONE,l.ONE],t.bo.transparent,[!0,!0,!0,!0]);for(let d of(a=s.gl,s.activeTexture.set(a.TEXTURE1),s.viewport.set([0,0,e.width/4,e.height/4]),(o=i.heatmapFbos.get(t.cd))?(a.bindTexture(a.TEXTURE_2D,o.colorAttachment.get()),s.bindFramebuffer.set(o.framebuffer)):(o=ip(s,e.width/4,e.height/4),i.heatmapFbos.set(t.cd,o)),s.clear({color:t.bo.transparent}),n)){if(r.hasRenderableParent(d))continue;let t=r.getTile(d),n=t.getBucket(i);if(!n)continue;let a=n.programConfigurations.get(i.id),o=e.useProgram("heatmap",a),f=c.getProjectionData({overscaledTileID:d,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),p=c.getCircleRadiusCorrection();o.draw(s,l.TRIANGLES,tk.disabled,u,h,tM.backCCW,ru(t,c.zoom,i.paint.get("heatmap-intensity"),p),null,f,i.id,n.layoutVertexBuffer,n.indexBuffer,n.segments,i.paint,c.zoom,a)}s.viewport.set([0,0,e.width,e.height])}(e,r,i,n):"translucent"===e.renderPass&&(o=(a=e.context).gl,a.setColorMode(e.colorModeForRenderPass()),(s=i.heatmapFbos.get(t.cd))&&(a.activeTexture.set(o.TEXTURE0),o.bindTexture(o.TEXTURE_2D,s.colorAttachment.get()),a.activeTexture.set(o.TEXTURE1),im(a,i).bind(o.LINEAR,o.CLAMP_TO_EDGE),e.useProgram("heatmapTexture").draw(a,o.TRIANGLES,tk.disabled,tA.disabled,e.colorModeForRenderPass(),tM.disabled,rh(e,i,0,1),null,null,i.id,e.viewportBuffer,e.quadTriangleIndexBuffer,e.viewportSegments,i.paint,e.transform.zoom)))}},line:function(e,t,r,i,n){var a;if("translucent"!==e.renderPass)return;let{isRenderingToTexture:o}=n,s=r.paint.get("line-opacity"),l=r.paint.get("line-width");if(0===s.constantOr(1)||0===l.constantOr(1))return;let c=e.getDepthModeForSublayer(0,tk.ReadOnly),u=e.colorModeForRenderPass(),h=r.paint.get("line-dasharray"),d=h.constantOr(1),f=r.paint.get("line-pattern"),p=f.constantOr(1),m=r.paint.get("line-gradient"),g=r.getCrossfadeParameters(),y;y=p?"linePattern":d&&m?"lineGradientSDF":d?"lineSDF":m?"lineGradient":"line";let v=e.context,x=v.gl,b=e.transform,_=!0;for(let n of i){let i=t.getTile(n);if(p&&!i.patternsLoaded())continue;let s=i.getBucket(r);if(!s)continue;let l=s.programConfigurations.get(r.id),w=e.context.program.get(),T=e.useProgram(y,l),M=_||T.program!==w,k=null==(a=e.style.map.terrain)?void 0:a.getTerrainData(n),A=f.constantOr(null),S=h?.constantOr(null);if(A&&i.imageAtlas){let e=i.imageAtlas,t=e.patternPositions[A.to.toString()],r=e.patternPositions[A.from.toString()];t&&r&&l.setConstantPatternPositions(t,r)}else if(S){let t="round"===r.layout.get("line-cap").constantOr(null),i=e.lineAtlas.getDash(S.to,t),n=e.lineAtlas.getDash(S.from,t);l.setConstantDashPositions(i,n)}let E=b.getProjectionData({overscaledTileID:n,applyGlobeMatrix:!o,applyTerrainMatrix:!0}),C=b.getPixelScale(),L;p?(L=ry(e,i,r,C,g),v.activeTexture.set(x.TEXTURE0),i.imageAtlasTexture.bind(x.LINEAR,x.CLAMP_TO_EDGE),l.updatePaintBuffers(g)):d&&m?(L=rx(e,i,r,C,g,s.lineClipsArray.length),function(e,t,r,i,n,a,o,s,l){let c=a.gradients[n.id],u=c.texture;n.gradientVersion!==c.version&&(u=ig(e,t,r,i,n,a,o,c)),r.activeTexture.set(i.TEXTURE0),u.bind(n.stepInterpolant?i.NEAREST:i.LINEAR,i.CLAMP_TO_EDGE),r.activeTexture.set(i.TEXTURE1),e.lineAtlas.bind(r),s.updatePaintBuffers(l)}(e,t,v,x,r,s,n,l,g)):d?(L=rv(e,i,r,C,g),(M||e.lineAtlas.dirty)&&(v.activeTexture.set(x.TEXTURE0),e.lineAtlas.bind(v)),l.updatePaintBuffers(g)):m?(L=rg(e,i,r,C,s.lineClipsArray.length),function(e,t,r,i,n,a,o){let s=a.gradients[n.id],l=s.texture;n.gradientVersion!==s.version&&(l=ig(e,t,r,i,n,a,o,s)),r.activeTexture.set(i.TEXTURE0),l.bind(n.stepInterpolant?i.NEAREST:i.LINEAR,i.CLAMP_TO_EDGE)}(e,t,v,x,r,s,n)):L=rm(e,i,r,C);let P=e.stencilModeForClipping(n);T.draw(v,x.TRIANGLES,c,P,u,tM.disabled,L,k,E,r.id,s.layoutVertexBuffer,s.indexBuffer,s.segments,r.paint,e.transform.zoom,l,s.layoutVertexBuffer2),_=!1}},fill:function(e,r,i,n,a){let o=i.paint.get("fill-color"),s=i.paint.get("fill-opacity");if(0===s.constantOr(1))return;let{isRenderingToTexture:l}=a,c=e.colorModeForRenderPass(),u=i.paint.get("fill-pattern"),h=e.opaquePassEnabledForLayer()&&!u.constantOr(1)&&1===o.constantOr(t.bo.transparent).a&&1===s.constantOr(0)?"opaque":"translucent";if(e.renderPass===h){let t=e.getDepthModeForSublayer(1,"opaque"===e.renderPass?tk.ReadWrite:tk.ReadOnly);iv(e,r,i,n,t,c,!1,l)}if("translucent"===e.renderPass&&i.paint.get("fill-antialias")){let t=e.getDepthModeForSublayer(2*!!i.getPaintProperty("fill-outline-color"),tk.ReadOnly);iv(e,r,i,n,t,c,!0,l)}},fillExtrusion:function(e,t,r,i,n){let a=r.paint.get("fill-extrusion-opacity");if(0===a)return;let{isRenderingToTexture:o}=n;if("translucent"===e.renderPass){let n=new tk(e.context.gl.LEQUAL,tk.ReadWrite,e.depthRangeFor3D);if(1!==a||r.paint.get("fill-extrusion-pattern").constantOr(1))ix(e,t,r,i,n,tA.disabled,tT.disabled,o),ix(e,t,r,i,n,e.stencilModeFor3D(),e.colorModeForRenderPass(),o);else{let a=e.colorModeForRenderPass();ix(e,t,r,i,n,tA.disabled,a,o)}}},hillshade:function(e,r,i,n,a){if("offscreen"!==e.renderPass&&"translucent"!==e.renderPass)return;let{isRenderingToTexture:o}=a,s=e.context,l=e.style.projection.useSubdivision,c=e.getDepthModeForSublayer(0,tk.ReadOnly),u=e.colorModeForRenderPass();if("offscreen"===e.renderPass)(function(e,r,i,n,a,o,s){let l=e.context,c=l.gl,u="nearest"===n.paint.get("resampling")?c.NEAREST:c.LINEAR;for(let h of i){let i=r.getTile(h),d=i.dem;if(!d?.data||!i.needsHillshadePrepare)continue;let f=d.dim,p=d.stride,m=d.getPixels();if(l.activeTexture.set(c.TEXTURE1),l.pixelStoreUnpackPremultiplyAlpha.set(!1),i.demTexture||(i.demTexture=e.getTileTexture(p)),i.demTexture){let e=i.demTexture;e.update(m,{premultiply:!1}),e.bind(c.NEAREST,c.CLAMP_TO_EDGE)}else i.demTexture=new t.T(l,m,c.RGBA,{premultiply:!1}),i.demTexture.bind(c.NEAREST,c.CLAMP_TO_EDGE);l.activeTexture.set(c.TEXTURE0);let g=i.fbo;if(!g){let e=new t.T(l,{width:f,height:f,data:null},c.RGBA);e.bind(u,c.CLAMP_TO_EDGE),(g=i.fbo=l.createFramebuffer(f,f,!0,!1)).colorAttachment.set(e.texture)}l.bindFramebuffer.set(g.framebuffer),l.viewport.set([0,0,f,f]),e.useProgram("hillshadePrepare").draw(l,c.TRIANGLES,a,o,s,tM.disabled,rf(i.tileID,d),null,null,n.id,e.rasterBoundsBuffer,e.quadTriangleIndexBuffer,e.rasterBoundsSegments),i.needsHillshadePrepare=!1}})(e,r,n,i,c,tA.disabled,u),s.viewport.set([0,0,e.width,e.height]);else if("translucent"===e.renderPass)if(l){let[t,a,s]=e.stencilConfigForOverlapTwoPass(n);ib(e,r,i,s,t,c,u,!1,o),ib(e,r,i,s,a,c,u,!0,o)}else{let[t,a]=e.getStencilConfigForOverlapAndUpdateStencilID(n);ib(e,r,i,a,t,c,u,!1,o)}},colorRelief:function(e,t,r,i,n){if("translucent"!==e.renderPass||!i.length)return;let{isRenderingToTexture:a}=n,o=e.style.projection.useSubdivision,s=e.getDepthModeForSublayer(0,tk.ReadOnly),l=e.colorModeForRenderPass();if(o){let[n,o,c]=e.stencilConfigForOverlapTwoPass(i);iw(e,t,r,c,n,s,l,!1,a),iw(e,t,r,c,o,s,l,!0,a)}else{let[n,o]=e.getStencilConfigForOverlapAndUpdateStencilID(i);iw(e,t,r,o,n,s,l,!1,a)}},raster:function(e,t,r,i,n){if("translucent"!==e.renderPass||0===r.paint.get("raster-opacity")||!i.length)return;let{isRenderingToTexture:a}=n,o=t.getSource(),s=e.style.projection.useSubdivision;if(o instanceof et)iM(e,t,r,i,null,!1,!1,o.tileCoords,o.flippedWindingOrder,a);else if(s){let[n,o,s]=e.stencilConfigForOverlapTwoPass(i);iM(e,t,r,s,n,!1,!0,iT,!1,a),iM(e,t,r,s,o,!0,!0,iT,!1,a)}else{let[n,o]=e.getStencilConfigForOverlapAndUpdateStencilID(i);iM(e,t,r,o,n,!1,!0,iT,!1,a)}},background:function(e,t,r,i,n){var a;let o=r.paint.get("background-color"),s=r.paint.get("background-opacity");if(0===s)return;let{isRenderingToTexture:l}=n,c=e.context,u=c.gl,h=e.style.projection,d=e.transform,f=d.tileSize,p=r.paint.get("background-pattern");if(e.isPatternMissing(p))return;let m=!p&&1===o.a&&1===s&&e.opaquePassEnabledForLayer()?"opaque":"translucent";if(e.renderPass!==m)return;let g=tA.disabled,y=e.getDepthModeForSublayer(0,"opaque"===m?tk.ReadWrite:tk.ReadOnly),v=e.colorModeForRenderPass(),x=e.useProgram(p?"backgroundPattern":"background"),b=i||ew(d,{tileSize:f,terrain:e.style.map.terrain});p&&(c.activeTexture.set(u.TEXTURE0),e.imageManager.bind(e.context));let _=r.getCrossfadeParameters();for(let t of b){let i=d.getProjectionData({overscaledTileID:t,applyGlobeMatrix:!l,applyTerrainMatrix:!0}),n=p?rS(s,e,p,{tileID:t,tileSize:f},_):rA(s,o),m=null==(a=e.style.map.terrain)?void 0:a.getTerrainData(t),b=h.getMeshFromTileID(c,t.canonical,!1,!0,"raster");x.draw(c,u.TRIANGLES,y,g,v,tM.backCCW,n,m,i,r.id,b.vertexBuffer,b.indexBuffer,b.segments)}},sky:function(e,t){var r,i;let n,a,o,s,l=e.context,c=l.gl,u=(r=e.style.map.transform,i=e.pixelRatio,n=Math.cos(r.rollInRadians),a=Math.sin(r.rollInRadians),o=ep(r),s=r.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition,{u_sky_color:t.properties.get("sky-color"),u_horizon_color:t.properties.get("horizon-color"),u_horizon:[(r.width/2-o*a)*i,(r.height/2+o*n)*i],u_horizon_normal:[-a,n],u_sky_horizon_blend:t.properties.get("sky-horizon-blend")*r.height/2*i,u_sky_blend:s}),h=new tk(c.LEQUAL,tk.ReadWrite,[0,1]),d=tA.disabled,f=e.colorModeForRenderPass(),p=e.useProgram("sky"),m=iD(l,t);p.draw(l,c.TRIANGLES,h,d,f,tM.disabled,u,null,void 0,"sky",m.vertexBuffer,m.indexBuffer,m.segments)},atmosphere:function(e,r,i){var n;let a,o,s,l=e.context,c=l.gl,u=e.useProgram("atmosphere"),h=new tk(c.LEQUAL,tk.ReadOnly,[0,1]),d=e.transform,f=(n=e.transform,o=[-(a=i.properties.get("position")).x,-a.y,-a.z],s=t.ap(new Float64Array(16)),"map"===i.properties.get("anchor")&&(t.be(s,s,n.rollInRadians),t.bf(s,s,-n.pitchInRadians),t.be(s,s,n.bearingInRadians),t.bf(s,s,n.center.lat*Math.PI/180),t.bI(s,s,-n.center.lng*Math.PI/180)),t.cg(o,o,s),o),p=d.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),m=r.properties.get("atmosphere-blend")*p.projectionTransition;if(0===m)return;let g=tj(d.worldSize,d.center.lat),y=d.inverseProjectionMatrix,v=new Float64Array(4);v[3]=1,t.aE(v,v,d.modelViewProjectionMatrix),v[0]/=v[3],v[1]/=v[3],v[2]/=v[3],v[3]=1,t.aE(v,v,y),v[0]/=v[3],v[1]/=v[3],v[2]/=v[3],v[3]=1;let x={u_sun_pos:f,u_atmosphere_blend:m,u_globe_position:[v[0],v[1],v[2]],u_globe_radius:g,u_inv_proj_matrix:y},b=iD(l,r);u.draw(l,c.TRIANGLES,h,tA.disabled,tT.alphaBlended,tM.disabled,x,null,null,"atmosphere",b.vertexBuffer,b.indexBuffer,b.segments)},custom:function(e,t,r,i){let{isRenderingGlobe:n}=i,a=e.context,o=r.implementation,s=e.style.projection,l=e.transform,c=l.getProjectionDataForCustomLayer(n),u={farZ:l.farZ,nearZ:l.nearZ,fov:l.fov*Math.PI/180,modelViewProjectionMatrix:l.modelViewProjectionMatrix,projectionMatrix:l.projectionMatrix,shaderData:{variantName:s.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; +uniform mat4 u_projection_matrix; +${s.shaderPreludeCode.vertexSource}`,define:s.shaderDefine},defaultProjectionData:c},h=o.renderingMode?o.renderingMode:"2d";if("offscreen"===e.renderPass){let t=o.prerender;t&&(e.setCustomLayerDefaults(),a.setColorMode(e.colorModeForRenderPass()),t.call(o,a.gl,u),a.setDirty(),e.setBaseState())}else if("translucent"===e.renderPass){e.setCustomLayerDefaults(),a.setColorMode(e.colorModeForRenderPass()),a.setStencilMode(tA.disabled);let t="3d"===h?e.getDepthModeFor3D():e.getDepthModeForSublayer(0,tk.ReadOnly);a.setDepthMode(t),o.render(a.gl,u),a.setDirty(),e.setBaseState(),a.bindFramebuffer.set(null)}},debug:function(e,r,i){for(let n of i)!function(e,r,i){var n,a;let o,s,l,c=e.context,u=c.gl,h=e.useProgram("debug"),d=tk.disabled,f=tA.disabled,p=e.colorModeForRenderPass(),m="$debug",g=null==(n=e.style.map.terrain)?void 0:n.getTerrainData(i);c.activeTexture.set(u.TEXTURE0);let y=r.getTileByID(i.key).latestRawTileData,v=Math.floor((y?.byteLength||0)/1024),x=512/Math.min(r.getTile(i).tileSize,512)*(i.overscaledZ/e.transform.zoom)*.5,b=i.canonical.toString();i.overscaledZ!==i.canonical.z&&(b+=` => ${i.overscaledZ}`),a=`${b} ${v}kB`,e.initDebugOverlayCanvas(),o=e.debugOverlayCanvas,s=e.context.gl,(l=e.debugOverlayCanvas.getContext("2d")).clearRect(0,0,o.width,o.height),l.shadowColor="white",l.shadowBlur=2,l.lineWidth=1.5,l.strokeStyle="white",l.textBaseline="top",l.font="bold 36px Open Sans, sans-serif",l.fillText(a,5,5),l.strokeText(a,5,5),e.debugOverlayTexture.update(o),e.debugOverlayTexture.bind(s.LINEAR,s.CLAMP_TO_EDGE);let _=e.transform.getProjectionData({overscaledTileID:i,applyGlobeMatrix:!0,applyTerrainMatrix:!0});h.draw(c,u.TRIANGLES,d,f,tT.alphaBlended,tM.disabled,rc(t.bo.transparent,x),null,_,m,e.debugBuffer,e.quadTriangleIndexBuffer,e.debugSegments),h.draw(c,u.LINE_STRIP,d,f,p,tM.disabled,rc(t.bo.red),g,_,m,e.debugBuffer,e.tileBorderIndexBuffer,e.debugSegments)}(e,r,n)},debugPadding:function(e){var t,r;let i=e.transform.padding;iL(e,e.transform.height-(i.top||0),3,ik),iL(e,i.bottom||0,3,iA),iP(e,i.left||0,3,iS),iP(e,e.transform.width-(i.right||0),3,iE);let n=e.transform.centerPoint;t=n.x,r=e.transform.height-n.y,iI(e,t-1,r-10,2,20,iC),iI(e,t-10,r-1,20,2,iC)},terrainDepth:function(e,r){let i=e.context,n=i.gl,a=e.transform,o=tT.unblended,s=new tk(n.LEQUAL,tk.ReadWrite,[0,1]),l=r.tileManager.getRenderableTiles(),c=e.useProgram("terrainDepth");for(let u of(i.bindFramebuffer.set(r.getFramebuffer("depth").framebuffer),i.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),i.clear({color:t.bo.transparent,depth:1}),l)){let e=r.getTerrainMesh(u.tileID),t=r.getTerrainData(u.tileID),l=a.getProjectionData({overscaledTileID:u.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),h={u_ele_delta:r.getMeshFrameDelta(a.zoom)};c.draw(i,n.TRIANGLES,s,tA.disabled,o,tM.backCCW,h,t,l,"terrain",e.vertexBuffer,e.indexBuffer,e.segments)}i.bindFramebuffer.set(null),i.viewport.set([0,0,e.width,e.height])},terrainCoords:function(e,r){let i=e.context,n=i.gl,a=e.transform,o=tT.unblended,s=new tk(n.LEQUAL,tk.ReadWrite,[0,1]),l=r.getCoordsTexture(),c=r.tileManager.getRenderableTiles(),u=e.useProgram("terrainCoords");for(let h of(i.bindFramebuffer.set(r.getFramebuffer("coords").framebuffer),i.viewport.set([0,0,e.width/devicePixelRatio,e.height/devicePixelRatio]),i.clear({color:t.bo.transparent,depth:1}),r.coordsIndex=[],c)){let e=r.getTerrainMesh(h.tileID),t=r.getTerrainData(h.tileID);i.activeTexture.set(n.TEXTURE0),n.bindTexture(n.TEXTURE_2D,l.texture);let c={u_terrain_coords_id:(255-r.coordsIndex.length)/255,u_texture:0,u_ele_delta:r.getMeshFrameDelta(a.zoom)},d=a.getProjectionData({overscaledTileID:h.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});u.draw(i,n.TRIANGLES,s,tA.disabled,o,tM.backCCW,c,t,d,"terrain",e.vertexBuffer,e.indexBuffer,e.segments),r.coordsIndex.push(h.tileID.key)}i.bindFramebuffer.set(null),i.viewport.set([0,0,e.width,e.height])}};class iR{constructor(e,r){this.drawFunctions=iO,this.context=new il(e),this.transform=r,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:t.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=eE.maxOverzooming+eE.maxUnderzooming+1,this.depthEpsilon=1/65536,this.crossTileSymbolIndex=new tr}resize(e,t,r){if(this.width=Math.floor(e*r),this.height=Math.floor(t*r),this.pixelRatio=r,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let e of this.style._order)this.style._layers[e].resize()}setup(){let e=this.context,r=new t.aU;r.emplaceBack(0,0),r.emplaceBack(t.a6,0),r.emplaceBack(0,t.a6),r.emplaceBack(t.a6,t.a6),this.tileExtentBuffer=e.createVertexBuffer(r,ts.members),this.tileExtentSegments=t.aV.simpleSegment(0,0,4,2);let i=new t.aU;i.emplaceBack(0,0),i.emplaceBack(t.a6,0),i.emplaceBack(0,t.a6),i.emplaceBack(t.a6,t.a6),this.debugBuffer=e.createVertexBuffer(i,ts.members),this.debugSegments=t.aV.simpleSegment(0,0,4,5);let n=new t.ch;n.emplaceBack(0,0,0,0),n.emplaceBack(t.a6,0,t.a6,0),n.emplaceBack(0,t.a6,0,t.a6),n.emplaceBack(t.a6,t.a6,t.a6,t.a6),this.rasterBoundsBuffer=e.createVertexBuffer(n,t5.members),this.rasterBoundsSegments=t.aV.simpleSegment(0,0,4,2);let a=new t.aU;a.emplaceBack(0,0),a.emplaceBack(t.a6,0),a.emplaceBack(0,t.a6),a.emplaceBack(t.a6,t.a6),this.rasterBoundsBufferPosOnly=e.createVertexBuffer(a,ts.members),this.rasterBoundsSegmentsPosOnly=t.aV.simpleSegment(0,0,4,5);let o=new t.aU;o.emplaceBack(0,0),o.emplaceBack(1,0),o.emplaceBack(0,1),o.emplaceBack(1,1),this.viewportBuffer=e.createVertexBuffer(o,ts.members),this.viewportSegments=t.aV.simpleSegment(0,0,4,2);let s=new t.ci;s.emplaceBack(0),s.emplaceBack(1),s.emplaceBack(3),s.emplaceBack(2),s.emplaceBack(0),this.tileBorderIndexBuffer=e.createIndexBuffer(s);let l=new t.aW;l.emplaceBack(1,0,2),l.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=e.createIndexBuffer(l);let c=this.context.gl;this.stencilClearMode=new tA({func:c.ALWAYS,mask:0},0,255,c.ZERO,c.ZERO,c.ZERO),this.tileExtentMesh=new to(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let e=this.context,r=e.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let i=t.O();t.c7(i,0,this.width,this.height,0,0,1),t.S(i,i,[r.drawingBufferWidth,r.drawingBufferHeight,0]),this.useProgram("clippingMask",null,!0).draw(e,r.TRIANGLES,tk.disabled,this.stencilClearMode,tT.disabled,tM.disabled,null,null,{mainMatrix:i,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:i},"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(e,t,r){if(this.currentStencilSource===e.source||!e.isTileClipped()||!t?.length)return;this.currentStencilSource=e.source,this.nextStencilID+t.length>256&&this.clearStencil();let i=this.context;i.setColorMode(tT.disabled),i.setDepthMode(tk.disabled);let n={};for(let e of t)n[e.key]=this.nextStencilID++;this._renderTileMasks(n,t,r,!0),this._renderTileMasks(n,t,r,!1),this._tileClippingMaskIDs=n}_renderTileMasks(e,t,r,i){var n;let a=this.context,o=a.gl,s=this.style.projection,l=this.transform,c=this.useProgram("clippingMask");for(let u of t){let t=e[u.key],h=null==(n=this.style.map.terrain)?void 0:n.getTerrainData(u),d=s.getMeshFromTileID(this.context,u.canonical,i,!0,"stencil"),f=l.getProjectionData({overscaledTileID:u,applyGlobeMatrix:!r,applyTerrainMatrix:!0});c.draw(a,o.TRIANGLES,tk.disabled,new tA({func:o.ALWAYS,mask:0},t,255,o.KEEP,o.KEEP,o.REPLACE),tT.disabled,r?tM.disabled:tM.backCCW,null,h,f,"$clipping",d.vertexBuffer,d.indexBuffer,d.segments)}}_renderTilesDepthBuffer(){var e;let t=this.context,r=t.gl,i=this.style.projection,n=this.transform,a=this.useProgram("depth"),o=this.getDepthModeFor3D();for(let s of ew(n,{tileSize:n.tileSize})){let l=null==(e=this.style.map.terrain)?void 0:e.getTerrainData(s),c=i.getMeshFromTileID(this.context,s.canonical,!0,!0,"raster"),u=n.getProjectionData({overscaledTileID:s,applyGlobeMatrix:!0,applyTerrainMatrix:!0});a.draw(t,r.TRIANGLES,o,tA.disabled,tT.disabled,tM.backCCW,null,l,u,"$clipping",c.vertexBuffer,c.indexBuffer,c.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let e=this.nextStencilID++,t=this.context.gl;return new tA({func:t.NOTEQUAL,mask:255},e,255,t.KEEP,t.KEEP,t.REPLACE)}stencilModeForClipping(e){let t=this.context.gl;return new tA({func:t.EQUAL,mask:255},this._tileClippingMaskIDs[e.key],0,t.KEEP,t.KEEP,t.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(e){let t=this.context.gl,r=e.sort((e,t)=>t.overscaledZ-e.overscaledZ),i=r[r.length-1].overscaledZ,n=r[0].overscaledZ-i+1;if(n>1){this.currentStencilSource=void 0,this.nextStencilID+n>256&&this.clearStencil();let e={};for(let r=0;rt.overscaledZ-e.overscaledZ),i=r[r.length-1].overscaledZ,n=r[0].overscaledZ-i+1;if(this.clearStencil(),n>1){let e={},a={};for(let r=0;r0};for(let e in s){let t=s[e];t.used&&t.prepare(this.context),l[e]=t.getVisibleCoordinates(!1),c[e]=l[e].slice().reverse(),u[e]=t.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let e=0;ethis.useProgram(e)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:r.showOverdrawInspector?t.bo.black:t.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=r.showOverdrawInspector,this.depthRangeFor3D=[0,1-(e._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=o.length-1;this.currentLayer>=0;this.currentLayer--){let e=this.style._layers[o[this.currentLayer]],t=s[e.source],r=l[e.source];this._renderTileClippingMasks(e,r,!1),this.renderLayer(this,t,e,r,h)}this.renderPass="translucent";let d=!1;for(this.currentLayer=0;this.currentLayerr.source&&!r.isHidden(t)?[e.tileManagers[r.source]]:[]),n=i.filter(e=>"vector"===e.getSource().type),a=i.filter(e=>"vector"!==e.getSource().type),o=e=>{(!r||r.getSource().maxzoom0?t.pop():null}isPatternMissing(e){if(!e)return!1;if(!e.from||!e.to)return!0;let t=this.imageManager.getPattern(e.from.toString()),r=this.imageManager.getPattern(e.to.toString());return!t||!r}useProgram(e,t,r=!1,i=[]){var n;this.cache||(this.cache={});let a=!!this.style.map.terrain,o=this.style.projection,s=r?tn.projectionMercator:o.shaderPreludeCode,l=r?tl:o.shaderDefine,c=e+(t?t.cacheKey:"")+`/${r?tc:o.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(a?"/terrain":"")+(i?`/${i.join("/")}`:"");return(n=this.cache)[c]||(n[c]=new t9(this.context,tn[e],t,rC[e],this._showOverdrawInspector,a,s,l,i)),this.cache[c]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let e=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(e.FUNC_ADD)}initDebugOverlayCanvas(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new t.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var e,t;if(this._tileTextures){for(let e in this._tileTextures){let t=this._tileTextures[e];if(t)for(let e of t)e.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&(null==(e=this.tileExtentMesh.vertexBuffer)||e.destroy()),this.tileExtentMesh&&(null==(t=this.tileExtentMesh.indexBuffer)||t.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let e in this.cache){let t=this.cache[e];t?.program&&this.context.gl.deleteProgram(t.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:e,drawingBufferHeight:t}=this.context.gl;return this.width!==e||this.height!==t}}function iF(e,t){let r,i=!1,n=null,a=()=>{n=null,i&&(e(...r),n=setTimeout(a,t),i=!1)};return(...e)=>(i=!0,r=e,n||a(),n)}iR.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class ij{constructor(e){this._getCurrentHash=()=>{let e=window.location.hash.replace("#","");if(this._hashName){let t;for(let r of e.split("&").map(e=>e.split("=")))r[0]===this._hashName&&(t=r);return(t&&t[1]||"").split("/")}return e.split("/")},this._onHashChange=()=>{let e=this._getCurrentHash();if(!this._isValidHash(e))return!1;let t=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(e[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+e[2],+e[1]],zoom:+e[0],bearing:t,pitch:+(e[4]||0)}),!0},this._updateHashUnthrottled=()=>{let e=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,e)},this._removeHash=()=>{let e=this._getCurrentHash();if(0===e.length)return;let t=e.join("/"),r=t;r.split("&").length>0&&(r=r.split("&")[0]),this._hashName&&(r=`${this._hashName}=${t}`);let i=window.location.hash.replace(r,"");i.startsWith("#&")?i=i.slice(0,1)+i.slice(2):"#"===i&&(i="");let n=window.location.href.replace(/(#.+)?$/,i);n=n.replace("&&","&"),window.history.replaceState(window.history.state,null,n)},this._updateHash=iF(this._updateHashUnthrottled,300),this._hashName=e&&encodeURIComponent(e)}addTo(e){return this._map=e,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(e){let t=this._map.getCenter(),r=Math.round(100*this._map.getZoom())/100,i=Math.pow(10,Math.ceil((r*Math.LN2+Math.log(512/360/.5))/Math.LN10)),n=Math.round(t.lng*i)/i,a=Math.round(t.lat*i)/i,o=this._map.getBearing(),s=this._map.getPitch(),l="";if(l+=e?`/${n}/${a}/${r}`:`${r}/${a}/${n}`,(o||s)&&(l+="/"+Math.round(10*o)/10),s&&(l+=`/${Math.round(s)}`),this._hashName){let e=this._hashName,t=!1,r=window.location.hash.slice(1).split("&").map(r=>{let i=r.split("=")[0];return i===e?(t=!0,`${i}=${l}`):r}).filter(e=>e);return t||r.push(`${e}=${l}`),`#${r.join("&")}`}return`#${l}`}_isValidHash(e){if(e.length<3||e.some(isNaN))return!1;try{new t.W(+e[2],+e[1])}catch{return!1}let r=+e[0],i=+(e[3]||0),n=+(e[4]||0);return r>=this._map.getMinZoom()&&r<=this._map.getMaxZoom()&&i>=-180&&i<=180&&n>=this._map.getMinPitch()&&n<=this._map.getMaxPitch()}}let iB={linearity:.3,easing:t.cv(0,0,.3,1)},iN=t.e({deceleration:2500,maxSpeed:1400},iB),iU=t.e({deceleration:20,maxSpeed:1400},iB),iV=t.e({deceleration:1e3,maxSpeed:360},iB),iq=t.e({deceleration:1e3,maxSpeed:90},iB),iH=t.e({deceleration:1e3,maxSpeed:360},iB);class iG{constructor(e){this._map=e,this.clear()}clear(){this._inertiaBuffer=[]}record(e){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:v(),settings:e})}_drainInertiaBuffer(){let e=this._inertiaBuffer,t=v();for(;e.length>0&&t-e[0].time>160;)e.shift()}_onMoveEnd(e){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let r={zoom:0,bearing:0,pitch:0,roll:0,pan:new t.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:e}of this._inertiaBuffer)r.zoom+=e.zoomDelta||0,r.bearing+=e.bearingDelta||0,r.pitch+=e.pitchDelta||0,r.roll+=e.rollDelta||0,e.panDelta&&r.pan._add(e.panDelta),e.around&&(r.around=e.around),e.pinchAround&&(r.pinchAround=e.pinchAround);let i=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,n={};if(r.pan.mag()){let a=iY(r.pan.mag(),i,t.e({},iN,e||{})),o=r.pan.mult(a.amount/r.pan.mag()),s=this._map.cameraHelper.handlePanInertia(o,this._map.transform);n.center=s.easingCenter,n.offset=s.easingOffset,iW(n,a)}if(r.zoom){let e=iY(r.zoom,i,iU);n.zoom=t.cw(this._map.transform.zoom+e.amount,this._map.getZoomSnap(),e.amount),iW(n,e)}if(r.bearing){let e=iY(r.bearing,i,iV);n.bearing=this._map.transform.bearing+t.al(e.amount,-179,179),iW(n,e)}if(r.pitch){let e=iY(r.pitch,i,iq);n.pitch=this._map.transform.pitch+e.amount,iW(n,e)}if(r.roll){let e=iY(r.roll,i,iH);n.roll=this._map.transform.roll+t.al(e.amount,-179,179),iW(n,e)}if(n.zoom||n.bearing){let e=void 0===r.pinchAround?r.around:r.pinchAround;n.around=e?this._map.unproject(e):this._map.getCenter()}return this.clear(),t.e(n,{noMoveStart:!0})}}function iW(e,t){(!e.duration||e.durationr.unproject(e)),s=a.reduce((e,t,r,i)=>e.add(t.div(i.length)),new t.P(0,0));super(e,{points:a,point:s,lngLats:o,lngLat:r.unproject(s),originalEvent:i}),this._defaultPrevented=!1}}class iX extends t.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(e,t,r){super(e,{originalEvent:r}),this._defaultPrevented=!1}}class iK{constructor(e,t){this._map=e,this._clickTolerance=t.clickTolerance}reset(){delete this._mousedownPos}wheel(e){return this._firePreventable(new iX(e.type,this._map,e))}mousedown(e,t){return this._mousedownPos=t,this._firePreventable(new iZ(e.type,this._map,e))}mouseup(e){this._map.fire(new iZ(e.type,this._map,e))}click(e,t){this._mousedownPos&&this._mousedownPos.dist(t)>=this._clickTolerance||this._map.fire(new iZ(e.type,this._map,e))}dblclick(e){return this._firePreventable(new iZ(e.type,this._map,e))}mouseover(e){this._map.fire(new iZ(e.type,this._map,e))}mouseout(e){this._map.fire(new iZ(e.type,this._map,e))}touchstart(e){return this._firePreventable(new i$(e.type,this._map,e))}touchmove(e){this._map.fire(new i$(e.type,this._map,e))}touchend(e){this._map.fire(new i$(e.type,this._map,e))}touchcancel(e){this._map.fire(new i$(e.type,this._map,e))}_firePreventable(e){if(this._map.fire(e),e.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class iJ{constructor(e){this._map=e}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(e){this._map.fire(new iZ(e.type,this._map,e))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new iZ("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(e){this._delayContextMenu?this._contextMenuEvent=e:this._ignoreContextMenu||this._map.fire(new iZ(e.type,this._map,e)),this._map.listens("contextmenu")&&e.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class iQ{constructor(e){this._map=e}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this._map.terrain)}}class i0{constructor(e,t){this._map=e,this._tr=new iQ(e),this._el=e.getCanvasContainer(),this._container=e.getContainer(),this._clickTolerance=t.clickTolerance||1,t.boxZoom&&"object"==typeof t.boxZoom&&(this._boxZoomEnd=t.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(e,t){this.isEnabled()&&e.shiftKey&&0===e.button&&(x.disableDrag(),this._startPos=this._lastPos=t,this._active=!0)}mousemoveWindow(e,t){if(!this._active||this._lastPos.equals(t)||!this._box&&t.dist(this._startPos)e.fitScreenCoordinates(i,r,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",e)}keydown(e){this._active&&27===e.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",e))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),x.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(e,r){return this._map.fire(new t.n(e,{originalEvent:r}))}}function i1(e,t){if(e.length!==t.length)throw Error(`The number of touches and points are not equal - touches ${e.length}, points ${t.length}`);let r={};for(let i=0;ithis.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=e.timeStamp),i.length===this.numTouches&&(this.centroid=function(e){let r=new t.P(0,0);for(let t of e)r._add(t);return r.div(e.length)}(r),this.touches=i1(i,r)))}touchmove(e,t,r){if(this.aborted||!this.centroid)return;let i=i1(r,t);for(let e in this.touches){let t=i[e];(!t||t.dist(this.touches[e])>30)&&(this.aborted=!0)}}touchend(e,t,r){if((!this.centroid||e.timeStamp-this.startTime>500)&&(this.aborted=!0),0===r.length){let e=!this.aborted&&this.centroid;if(this.reset(),e)return e}}}class i3{constructor(e){this.singleTap=new i2(e),this.numTaps=e.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(e,t,r){this.singleTap.touchstart(e,t,r)}touchmove(e,t,r){this.singleTap.touchmove(e,t,r)}touchend(e,t,r){let i=this.singleTap.touchend(e,t,r);if(i){let t=e.timeStamp-this.lastTime<500,r=!this.lastTap||30>this.lastTap.dist(i);if(t&&r||this.reset(),this.count++,this.lastTime=e.timeStamp,this.lastTap=i,this.count===this.numTaps)return this.reset(),i}}}class i5{constructor(e){this._tr=new iQ(e),this._zoomIn=new i3({numTouches:1,numTaps:2}),this._zoomOut=new i3({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(e,t,r){this._zoomIn.touchstart(e,t,r),this._zoomOut.touchstart(e,t,r)}touchmove(e,t,r){this._zoomIn.touchmove(e,t,r),this._zoomOut.touchmove(e,t,r)}touchend(e,r,i){let n=this._zoomIn.touchend(e,r,i),a=this._zoomOut.touchend(e,r,i),o=this._tr;return n?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:r=>r.easeTo({duration:300,zoom:t.cw(o.zoom+1,r.getZoomSnap()),around:o.unproject(n)},{originalEvent:e})}):a?(this._active=!0,e.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:r=>r.easeTo({duration:300,zoom:t.cw(o.zoom-1,r.getZoomSnap()),around:o.unproject(a)},{originalEvent:e})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class i4{constructor(e){this._enabled=!!e.enable,this._moveStateManager=e.moveStateManager,this._clickTolerance=e.clickTolerance||1,this._moveFunction=e.move,this._activateOnStart=!!e.activateOnStart,e.assignEvents(this),this.reset()}reset(e){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(e)}_move(...e){let t=this._moveFunction(...e);if(t.bearingDelta||t.pitchDelta||t.rollDelta||t.around||t.panDelta)return this._active=!0,t}dragStart(e,t){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(e)&&(this._moveStateManager.startMove(e),this._lastPoint=Array.isArray(t)?t[0]:t,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(e,t){if(!this.isEnabled())return;let r=this._lastPoint;if(!r)return;if(e.preventDefault(),!this._moveStateManager.isValidMoveEvent(e))return void this.reset(e);let i=Array.isArray(t)?t[0]:t;return!this._moved&&i.dist(r)!0}),t=new i7){this.mouseMoveStateManager=e,this.oneFingerTouchMoveStateManager=t}_executeRelevantHandler(e,t,r){return e instanceof MouseEvent?t(e):"u">typeof TouchEvent&&e instanceof TouchEvent?r(e):void 0}startMove(e){this._executeRelevantHandler(e,e=>{this.mouseMoveStateManager.startMove(e)},e=>{this.oneFingerTouchMoveStateManager.startMove(e)})}endMove(e){this._executeRelevantHandler(e,e=>{this.mouseMoveStateManager.endMove(e)},e=>{this.oneFingerTouchMoveStateManager.endMove(e)})}isValidStartEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidStartEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidStartEvent(e))}isValidMoveEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidMoveEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(e))}isValidEndEvent(e){return this._executeRelevantHandler(e,e=>this.mouseMoveStateManager.isValidEndEvent(e),e=>this.oneFingerTouchMoveStateManager.isValidEndEvent(e))}}let ne=e=>{e.mousedown=e.dragStart,e.mousemoveWindow=e.dragMove,e.mouseup=e.dragEnd,e.contextmenu=e=>{e.preventDefault()}};class nt{constructor(e,t){this._clickTolerance=e.clickTolerance||1,this._map=t,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new t.P(0,0)}_shouldBePrevented(e){return e<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(e,t,r){return this._calculateTransform(e,t,r)}touchmove(e,t,r){if(this._active){if(!this._shouldBePrevented(r.length))return e.preventDefault(),this._calculateTransform(e,t,r);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",e)}}touchend(e,t,r){this._calculateTransform(e,t,r),this._active&&this._shouldBePrevented(r.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(e,r,i){i.length>0&&(this._active=!0);let n=i1(i,r),a=new t.P(0,0),o=new t.P(0,0),s=0;for(let e in n){let t=n[e],r=this._touches[e];r&&(a._add(t),o._add(t.sub(r)),s++,n[e]=t)}if(this._touches=n,this._shouldBePrevented(s)||!o.mag())return;let l=o.div(s);return this._sum._add(l),this._sum.mag()Math.abs(e.x)}class nc extends nr{constructor(e){super(),this._currentTouchCount=0,this._map=e}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(e,t,r){super.touchstart(e,t,r),this._currentTouchCount=r.length}_start(e){this._lastPoints=e,nl(e[0].sub(e[1]))&&(this._valid=!1)}_move(e,t,r){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let i=e[0].sub(this._lastPoints[0]),n=e[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(i,n,r.timeStamp),this._valid?(this._lastPoints=e,this._active=!0,{pitchDelta:-((i.y+n.y)/2*.5)}):void 0}gestureBeginsVertically(e,t,r){if(void 0!==this._valid)return this._valid;let i=e.mag()>=2,n=t.mag()>=2;if(!i&&!n)return;if(!i||!n)return void 0===this._firstMove&&(this._firstMove=r),r-this._firstMove<100&&void 0;let a=e.y>0==t.y>0;return nl(e)&&nl(t)&&a}}let nu=100,nh=15,nd=10;class nf{constructor(e){this._tr=new iQ(e),this._panStep=nu,this._bearingStep=nh,this._pitchStep=nd,this._rotationDisabled=!1}reset(){this._active=!1}keydown(e){if(e.altKey||e.ctrlKey||e.metaKey)return;let r=0,i=0,n=0,a=0,o=0;switch(e.keyCode){case 61:case 107:case 171:case 187:r=1;break;case 189:case 109:case 173:r=-1;break;case 37:e.shiftKey?i=-1:(e.preventDefault(),a=-1);break;case 39:e.shiftKey?i=1:(e.preventDefault(),a=1);break;case 38:e.shiftKey?n=1:(e.preventDefault(),o=-1);break;case 40:e.shiftKey?n=-1:(e.preventDefault(),o=1);break;default:return}return this._rotationDisabled&&(i=0,n=0),{cameraAnimation:s=>{let l=this._tr;s.easeTo({duration:300,easeId:"keyboardHandler",easing:np,zoom:r?t.cw(l.zoom+r*(e.shiftKey?2:1),s.getZoomSnap()):l.zoom,bearing:l.bearing+i*this._bearingStep,pitch:l.pitch+n*this._pitchStep,offset:[-a*this._panStep,-o*this._panStep],center:l.center},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function np(e){return e*(2-e)}let nm=1/450;class ng{constructor(e,t){this._onTimeout=e=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(e)},this._map=e,this._tr=new iQ(e),this._triggerRenderFrame=t,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=nm}setZoomRate(e){this._defaultZoomRate=e}setWheelZoomRate(e){this._wheelZoomRate=e}isEnabled(){return!!this._enabled}isActive(){return!!this._active||void 0!==this._finishTimeout}isZooming(){return!!this._zooming}enable(e){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!e&&"center"===e.around)}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(e){return!!this._map.cooperativeGestures.isEnabled()&&!(e.ctrlKey||this._map.cooperativeGestures.isBypassed(e))}wheel(e){if(!this.isEnabled())return;if(this._shouldBePrevented(e))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",e);let t=e.deltaMode===WheelEvent.DOM_DELTA_LINE?40*e.deltaY:e.deltaY,r=v(),i=r-(this._lastWheelEventTime||0);this._lastWheelEventTime=r,0!==t&&t%4.000244140625==0?this._type="wheel":0!==t&&4>Math.abs(t)?this._type="trackpad":i>400?(this._type=null,this._lastValue=t,this._timeout=setTimeout(this._onTimeout,40,e)):this._type||(this._type=200>Math.abs(i*t)?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,t+=this._lastValue)),e.shiftKey&&t&&(t/=4),this._type&&(this._lastWheelEvent=e,this._delta-=t,this._active||this._start(e)),e.preventDefault()}_start(e){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let r=x.mousePos(this._map.getCanvas(),e),i=this._tr;this._aroundPoint=this._aroundCenter?i.transform.locationToScreenPoint(t.W.convert(i.center)):r,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let e=this._tr.transform;if("number"==typeof this._lastExpectedZoom){let t=e.zoom-this._lastExpectedZoom;"number"==typeof this._startZoom&&(this._startZoom+=t),"number"==typeof this._targetZoom&&(this._targetZoom+=t)}if(0!==this._delta){let r="wheel"===this._type&&Math.abs(this._delta)>4.000244140625?this._wheelZoomRate:this._defaultZoomRate,i=2/(1+Math.exp(-Math.abs(this._delta*r)));this._delta<0&&0!==i&&(i=1/i);let n="number"!=typeof this._targetZoom?e.scale:t.ao(this._targetZoom),a=e.applyConstrain(e.getCameraLngLat(),t.ar(n*i)).zoom,o=this._map.getZoomSnap();if("wheel"===this._type&&o>0){let r=t.cw(e.zoom,o);this._targetZoom=t.cw(a,o,a-r)}else this._targetZoom=a;"wheel"===this._type&&(this._startZoom=e.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let r="number"!=typeof this._targetZoom?e.zoom:this._targetZoom,i=this._startZoom,n=this._easing,a,o=!1;if("wheel"===this._type&&i&&n){let e=Math.min((v()-this._lastWheelEventTime+5)/200,1),s=n(e);a=t.H.number(i,r,s),e<1?this._needsRerender=!0:o=!0}else a=r,o=!0;return this._active=!0,o&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=a,{noInertia:!0,needsRenderFrame:!o,zoomDelta:a-e.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(e){let r=t.cy;if(this._prevEase){let e=this._prevEase,i=(v()-e.start)/e.duration,n=e.easing(i+.01)-e.easing(i),a=.27/Math.sqrt(n*n+1e-4)*.01,o=Math.sqrt(.0729-a*a);r=t.cv(a,o,.25,1)}return this._prevEase={start:v(),duration:e,easing:r},r}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ny{constructor(e,t){this._clickZoom=e,this._tapZoom=t}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class nv{constructor(e){this._tr=new iQ(e),this.reset()}reset(){this._active=!1}dblclick(e,r){return e.preventDefault(),{cameraAnimation:i=>{i.easeTo({duration:300,zoom:t.cw(this._tr.zoom+(e.shiftKey?-1:1),i.getZoomSnap()),around:this._tr.unproject(r)},{originalEvent:e})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nx{constructor(){this._tap=new i3({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(e){this._zoomRate=e??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(e,t,r){if(!this._swipePoint)if(this._tapTime){let i=t[0],n=e.timeStamp-this._tapTime<500,a=30>this._tapPoint.dist(i);n&&a?r.length>0&&(this._swipePoint=i,this._swipeTouch=r[0].identifier):this.reset()}else this._tap.touchstart(e,t,r)}touchmove(e,t,r){if(this._tapTime){if(this._swipePoint){if(r[0].identifier!==this._swipeTouch)return;let i=t[0],n=i.y-this._swipePoint.y;return this._swipePoint=i,e.preventDefault(),this._active=!0,{zoomDelta:n/128*this._zoomRate}}}else this._tap.touchmove(e,t,r)}touchend(e,t,r){if(this._tapTime)this._swipePoint&&0===r.length&&this.reset();else{let i=this._tap.touchend(e,t,r);i&&(this._tapTime=e.timeStamp,this._tapPoint=i)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nb{constructor(e,t,r){this._el=e,this._mousePan=t,this._touchPan=r}enable(e){this._inertiaOptions=e||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class n_{constructor(e,t,r,i){this._pitchWithRotate=e.pitchWithRotate,this._rollEnabled=e.rollEnabled,this._mouseRotate=t,this._mousePitch=r,this._mouseRoll=i}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class nw{constructor(e,t,r,i){this._el=e,this._touchZoom=t,this._touchRotate=r,this._tapDragZoom=i,this._rotationDisabled=!1,this._enabled=!0}enable(e){this._touchZoom.enable(e),this._rotationDisabled||this._touchRotate.enable(e),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(e){this._touchZoom.setZoomRate(e),this._tapDragZoom.setZoomRate(e)}setZoomThreshold(e){this._touchZoom.setZoomThreshold(e)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class nT{constructor(e,t){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=e,this._options=t,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let e=this._map.getCanvasContainer();e.classList.add("maplibregl-cooperative-gestures"),this._container=x.create("div","maplibregl-cooperative-gesture-screen",e);let t=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");"metaKey"===this._bypassKey&&(t=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let r=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),i=document.createElement("div");i.className="maplibregl-desktop-message",i.textContent=t,this._container.appendChild(i);let n=document.createElement("div");n.className="maplibregl-mobile-message",n.textContent=r,this._container.appendChild(n),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(e){return e[this._bypassKey]}notifyGestureBlocked(e,r){this._enabled&&(this._map.fire(new t.n("cooperativegestureprevented",{gestureType:e,originalEvent:r})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let nM=e=>e.zoom||e.drag||e.roll||e.pitch||e.rotate;class nk extends t.n{}function nA(e){var t;return(null==(t=e.panDelta)?void 0:t.mag())||e.zoomDelta||e.bearingDelta||e.pitchDelta||e.rollDelta}class nS{get _ownerDocument(){var e;return(null==(e=this._el)?void 0:e.ownerDocument)||document}get _ownerWindow(){var e,t;return(null==(t=null==(e=this._el)?void 0:e.ownerDocument)?void 0:t.defaultView)||window}constructor(e,r){this.handleWindowEvent=e=>{this.handleEvent(e,`${e.type}Window`)},this.handleEvent=(e,r)=>{if("blur"===e.type)return void this.stop(!0);this._updatingCamera=!0;let i="renderFrame"===e.type?void 0:e,n={needsRenderFrame:!1},a={},o={};for(let{handlerName:s,handler:l,allowed:c}of this._handlers){let u;if(l.isEnabled()){if(this._blockedByActive(o,c,s))l.reset();else if(l[r||e.type]){if(t.cz(e,r||e.type)){let t=x.mousePos(this._map.getCanvas(),e);u=l[r||e.type](e,t)}else if(t.cA(e,r||e.type)){let t=this._getMapTouches(e.touches),i=x.touchPos(this._map.getCanvas(),t);u=l[r||e.type](e,i,t)}else t.cB(r||e.type)||(u=l[r||e.type](e));this.mergeHandlerResult(n,a,u,s,i),u?.needsRenderFrame&&this._triggerRenderFrame()}(u||l.isActive())&&(o[s]=l)}}let s={};for(let e in this._previousActiveHandlers)o[e]||(s[e]=i);this._previousActiveHandlers=o,(Object.keys(s).length||nA(n))&&(this._changes.push([n,a,s]),this._triggerRenderFrame()),(Object.keys(o).length||nA(n))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:l}=n;l&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],l(this._map))},this._map=e,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new iG(e),this._bearingSnap=r.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(r);let i=this._el;for(let[e,t,r]of(this._listeners=[[i,"touchstart",{passive:!0}],[i,"touchmove",{passive:!1}],[i,"touchend",void 0],[i,"touchcancel",void 0],[i,"mousedown",void 0],[i,"mousemove",void 0],[i,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[i,"mouseover",void 0],[i,"mouseout",void 0],[i,"dblclick",void 0],[i,"click",void 0],[i,"keydown",{capture:!1}],[i,"keyup",void 0],[i,"wheel",{passive:!1}],[i,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]],this._listeners))e.addEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}destroy(){for(let[e,t,r]of this._listeners)e.removeEventListener(t,e===this._ownerDocument?this.handleWindowEvent:this.handleEvent,r)}_addDefaultHandlers(e){let r=this._map,i=r.getCanvasContainer();this._add("mapEvent",new iK(r,e));let n=r.boxZoom=new i0(r,e);this._add("boxZoom",n),e.interactive&&e.boxZoom&&n.enable();let a=r.cooperativeGestures=new nT(r,e.cooperativeGestures);this._add("cooperativeGestures",a),e.cooperativeGestures&&a.enable();let o=new i5(r),s=new nv(r);r.doubleClickZoom=new ny(s,o),this._add("tapZoom",o),this._add("clickZoom",s),e.interactive&&e.doubleClickZoom&&r.doubleClickZoom.enable();let l=new nx;this._add("tapDragZoom",l);let c=r.touchPitch=new nc(r);this._add("touchPitch",c),e.interactive&&e.touchPitch&&r.touchPitch.enable(e.touchPitch);let u=()=>r.project(r.getCenter()),h=function({enable:e,clickTolerance:r,aroundCenter:i=!0,minPixelCenterThreshold:n=100,rotateDegreesPerPixelMoved:a=.8},o){return new i4({clickTolerance:r,move:(e,r)=>{let s=o();if(i&&Math.abs(s.y-e.y)>n)return{bearingDelta:t.cx(new t.P(e.x,r.y),r,s)};let l=(r.x-e.x)*a;return i&&r.y0===e.button&&e.ctrlKey||2===e.button&&!e.ctrlKey}),enable:e,assignEvents:ne})}(e,u),d=function({enable:e,clickTolerance:t,pitchDegreesPerPixelMoved:r=-.5}){return new i4({clickTolerance:t,move:(e,t)=>({pitchDelta:(t.y-e.y)*r}),moveStateManager:new i8({checkCorrectEvent:e=>0===e.button&&e.ctrlKey||2===e.button}),enable:e,assignEvents:ne})}(e),f=function({enable:e,clickTolerance:t,rollDegreesPerPixelMoved:r=.3},i){return new i4({clickTolerance:t,move:(e,t)=>{let n=i(),a=(t.x-e.x)*r;return t.y2===e.button&&e.ctrlKey}),enable:e,assignEvents:ne})}(e,u);r.dragRotate=new n_(e,h,d,f),this._add("mouseRotate",h,["mousePitch"]),this._add("mousePitch",d,["mouseRotate","mouseRoll"]),this._add("mouseRoll",f,["mousePitch"]),e.interactive&&e.dragRotate&&r.dragRotate.enable();let p=function({enable:e,clickTolerance:t}){return new i4({clickTolerance:t,move:(e,t)=>({around:t,panDelta:t.sub(e)}),activateOnStart:!0,moveStateManager:new i8({checkCorrectEvent:e=>0===e.button&&!e.ctrlKey}),enable:e,assignEvents:ne})}(e),m=new nt(e,r);r.dragPan=new nb(i,p,m),this._add("mousePan",p),this._add("touchPan",m,["touchZoom","touchRotate"]),e.interactive&&e.dragPan&&r.dragPan.enable(e.dragPan);let g=new ns,y=new na;r.touchZoomRotate=new nw(i,y,g,l),this._add("touchRotate",g,["touchPan","touchZoom"]),this._add("touchZoom",y,["touchPan","touchRotate"]),e.interactive&&e.touchZoomRotate&&r.touchZoomRotate.enable(e.touchZoomRotate),this._add("blockableMapEvent",new iJ(r));let v=r.scrollZoom=new ng(r,()=>this._triggerRenderFrame());this._add("scrollZoom",v,["mousePan"]),e.interactive&&e.scrollZoom&&r.scrollZoom.enable(e.scrollZoom);let x=r.keyboard=new nf(r);this._add("keyboard",x),e.interactive&&e.keyboard&&r.keyboard.enable()}_add(e,t,r){this._handlers.push({handlerName:e,handler:t,allowed:r}),this._handlersById[e]=t}stop(e){if(!this._updatingCamera){for(let{handler:e}of this._handlers)e.reset();this._inertia.clear(),this._fireEvents({},{},e),this._changes=[]}}isActive(){for(let{handler:e}of this._handlers)if(e.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!nM(this._eventsInProgress)||this.isZooming()}_blockedByActive(e,t,r){for(let i in e)if(i!==r&&!t?.includes(i))return!0;return!1}_getMapTouches(e){let t=[];for(let r of e)this._el.contains(r.target)&&t.push(r);return t}mergeHandlerResult(e,r,i,n,a){if(!i)return;t.e(e,i);let o={handlerName:n,originalEvent:i.originalEvent||a};void 0!==i.zoomDelta&&(r.zoom=o),void 0!==i.panDelta&&(r.drag=o),void 0!==i.rollDelta&&(r.roll=o),void 0!==i.pitchDelta&&(r.pitch=o),void 0!==i.bearingDelta&&(r.rotate=o)}_applyChanges(){let e={},r={},i={};for(let[n,a,o]of this._changes)n.panDelta&&(e.panDelta=(e.panDelta||new t.P(0,0))._add(n.panDelta)),n.zoomDelta&&(e.zoomDelta=(e.zoomDelta||0)+n.zoomDelta),n.bearingDelta&&(e.bearingDelta=(e.bearingDelta||0)+n.bearingDelta),n.pitchDelta&&(e.pitchDelta=(e.pitchDelta||0)+n.pitchDelta),n.rollDelta&&(e.rollDelta=(e.rollDelta||0)+n.rollDelta),void 0!==n.around&&(e.around=n.around),void 0!==n.pinchAround&&(e.pinchAround=n.pinchAround),n.noInertia&&(e.noInertia=n.noInertia),t.e(r,a),t.e(i,o);this._updateMapTransform(e,r,i),this._changes=[]}_updateMapTransform(e,t,r){let i=this._map,n=i._getTransformForUpdate(),a=i.terrain;if(!(nA(e)||a&&this._terrainMovement))return void this._fireEvents(t,r,!0);i._stop(!0);let{panDelta:o,zoomDelta:s,bearingDelta:l,pitchDelta:c,rollDelta:u,around:h,pinchAround:d}=e;void 0!==d&&(h=d),h||(h=i.transform.centerPoint),a&&!n.isPointOnMapSurface(h)&&(h=n.centerPoint);let f={panDelta:o,zoomDelta:s,rollDelta:u,pitchDelta:c,bearingDelta:l,around:h};this._map.cameraHelper.useGlobeControls&&!n.isPointOnMapSurface(h)&&(h=n.centerPoint);let p=.01>h.distSqr(n.centerPoint)?n.center:n.screenPointToLocation(o?h.sub(o):h);this._handleMapControls({terrain:a,tr:n,deltasForHelper:f,preZoomAroundLoc:p,combinedEventsInProgress:t,panDelta:o}),i._applyUpdatedTransform(n),this._map._update(),e.noInertia||this._inertia.record(e),this._fireEvents(t,r,!0)}_handleMapControls({terrain:e,tr:t,deltasForHelper:r,preZoomAroundLoc:i,combinedEventsInProgress:n,panDelta:a}){let o=this._map.cameraHelper;(o.handleMapControlsRollPitchBearingZoom(r,t),e)?o.useGlobeControls?(!this._terrainMovement&&(n.drag||n.zoom)&&(this._terrainMovement=!0,this._map._elevationFreeze=!0),o.handleMapControlsPan(r,t,i)):!this._terrainMovement&&(n.drag||n.zoom)?(this._terrainMovement=!0,this._map._elevationFreeze=!0,o.handleMapControlsPan(r,t,i)):n.drag&&this._terrainMovement&&a?t.setCenter(t.screenPointToLocation(t.centerPoint.sub(a))):o.handleMapControlsPan(r,t,i):o.handleMapControlsPan(r,t,i)}_fireEvents(e,r,i){let n=nM(this._eventsInProgress),a=nM(e),o={};for(let t in e){let{originalEvent:r}=e[t];this._eventsInProgress[t]||(o[`${t}start`]=r),this._eventsInProgress[t]=e[t]}for(let e in!n&&a&&this._fireEvent("movestart",a.originalEvent),o)this._fireEvent(e,o[e]);for(let t in a&&this._fireEvent("move",a.originalEvent),e){let{originalEvent:r}=e[t];this._fireEvent(t,r)}let s={},l;for(let e in this._eventsInProgress){let{handlerName:t,originalEvent:i}=this._eventsInProgress[e];this._handlersById[t].isActive()||(delete this._eventsInProgress[e],l=r[t]||i,s[`${e}end`]=l)}for(let e in s)this._fireEvent(e,s[e]);let c=nM(this._eventsInProgress),u=(n||a)&&!c;if(u&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let e=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&e.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(e)}if(i&&u){this._updatingCamera=!0;let e=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),r=e=>0!==e&&-this._bearingSnap{delete this._frameId,this.handleEvent(new nk("renderFrame",{timeStamp:e})),this._applyChanges()})}_triggerRenderFrame(){void 0===this._frameId&&(this._frameId=this._requestFrame())}}class nE extends t.E{constructor(e,t,r){super(),this._renderFrameCallback=()=>{let e=Math.min((v()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(e)),e<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=e,this._bearingSnap=r.bearingSnap,this._zoomSnap=r.zoomSnap,this.cameraHelper=t,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(e,t){e.apply(this.transform,!0),this.transform=e,this.cameraHelper=t}getCenter(){return new t.W(this.transform.center.lng,this.transform.center.lat)}setCenter(e,t){return this.jumpTo({center:e},t)}getCenterElevation(){return this.transform.elevation}setCenterElevation(e,t){return this.jumpTo({elevation:e},t),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(e){this._centerClampedToGround=e}panBy(e,r,i){return e=t.P.convert(e).mult(-1),this.panTo(this.transform.center,t.e({offset:e},r),i)}panTo(e,r,i){return this.easeTo(t.e({center:e},r),i)}getZoom(){return this.transform.zoom}setZoom(e,t){return this.jumpTo({zoom:e},t),this}zoomTo(e,r,i){return this.easeTo(t.e({zoom:e},r),i)}zoomIn(e,r){return this.zoomTo(t.cw(this.getZoom()+1,this._zoomSnap),e,r),this}zoomOut(e,r){return this.zoomTo(t.cw(this.getZoom()-1,this._zoomSnap),e,r),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(e,r){return e!=this.transform.fov&&(this.transform.setFov(e),this.fire(new t.n("movestart",r)).fire(new t.n("move",r)).fire(new t.n("moveend",r))),this}getBearing(){return this.transform.bearing}setZoomSnap(e){return this._zoomSnap=e,this}getZoomSnap(){return this._zoomSnap}setBearing(e,t){return this.jumpTo({bearing:e},t),this}getPadding(){return this.transform.padding}setPadding(e,t){return this.jumpTo({padding:e},t),this}rotateTo(e,r,i){return this.easeTo(t.e({bearing:e},r),i)}resetNorth(e,r){return this.rotateTo(0,t.e({duration:1e3},e),r),this}resetNorthPitch(e,r){return this.easeTo(t.e({bearing:0,pitch:0,roll:0,duration:1e3},e),r),this}snapToNorth(e,t){return Math.abs(this.getBearing()){m.easeFunc(t),this.terrain&&!e.freezeElevation&&this._updateElevation(t),this._applyUpdatedTransform(i),this._fireMoveEvents(r)},t=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r,t)},e),this}_prepareEase(e,r,i={}){this._moving=!0,r||i.moving||this.fire(new t.n("movestart",e)),this._zooming&&!i.zooming&&this.fire(new t.n("zoomstart",e)),this._rotating&&!i.rotating&&this.fire(new t.n("rotatestart",e)),this._pitching&&!i.pitching&&this.fire(new t.n("pitchstart",e)),this._rolling&&!i.rolling&&this.fire(new t.n("rollstart",e))}_prepareElevation(e){this._elevationCenter=e,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(e,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(e){void 0!==this._elevationStart&&void 0!==this._elevationCenter||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let r=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(e<1&&r!==this._elevationTarget){let t=this._elevationTarget-this._elevationStart;this._elevationStart+=e*(t-(r-(t*e+this._elevationStart))/(1-e)),this._elevationTarget=r}this.transform.setElevation(t.H.number(this._elevationStart,this._elevationTarget,e))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(e){if(!this.terrain&&e.elevation>=0&&e.pitch<=90)return{};let t=e.getCameraLngLat(),r=e.getCameraAltitude(),i=this.terrain?this.terrain.getElevationForLngLatZoom(t,e.zoom):0;if(rthis._elevateCameraIfInsideTerrain(e)),this.transformCameraUpdate&&t.push(e=>this.transformCameraUpdate(e)),!t.length)return;let r=e.clone();for(let e of t){let t=r.clone(),{center:i,zoom:n,roll:a,pitch:o,bearing:s,elevation:l}=e(t);i&&t.setCenter(i),void 0!==l&&t.setElevation(l),void 0!==n&&t.setZoom(n),void 0!==a&&t.setRoll(a),void 0!==o&&t.setPitch(o),void 0!==s&&t.setBearing(s),r.apply(t,!1)}this.transform.apply(r,!1)}_fireMoveEvents(e){this.fire(new t.n("move",e)),this._zooming&&this.fire(new t.n("zoom",e)),this._rotating&&this.fire(new t.n("rotate",e)),this._pitching&&this.fire(new t.n("pitch",e)),this._rolling&&this.fire(new t.n("roll",e))}_afterEase(e,r){if(this._easeId&&r&&this._easeId===r)return;delete this._easeId;let i=this._zooming,n=this._rotating,a=this._pitching,o=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,i&&this.fire(new t.n("zoomend",e)),n&&this.fire(new t.n("rotateend",e)),a&&this.fire(new t.n("pitchend",e)),o&&this.fire(new t.n("rollend",e)),this.fire(new t.n("moveend",e))}flyTo(e,r){if(!e.essential&&g.prefersReducedMotion){let i=t.V(e,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(i,r)}this.stop(),"zoom"in(e=t.e({offset:[0,0],speed:1.2,curve:1.42,easing:t.cy},e))&&this._zoomSnap&&(e.zoom=t.cw(e.zoom,this._zoomSnap));let i=this._getTransformForUpdate(),n=i.bearing,a=i.pitch,o=i.roll,s=i.padding,l="bearing"in e?this._normalizeBearing(e.bearing,n):n,c="pitch"in e?+e.pitch:a,u="roll"in e?this._normalizeBearing(e.roll,o):o,h="padding"in e?e.padding:i.padding,d=t.P.convert(e.offset),f=i.centerPoint.add(d),p=i.screenPointToLocation(f),m=this.cameraHelper.handleFlyTo(i,{bearing:l,pitch:c,roll:u,padding:h,locationAtOffset:p,offsetAsPoint:d,center:e.center,minZoom:e.minZoom,zoom:e.zoom}),y=e.curve,v=Math.max(i.width,i.height),x=v/m.scaleOfZoom,b=m.pixelPathLength;"number"==typeof m.scaleOfMinZoom&&(y=Math.sqrt(v/m.scaleOfMinZoom/b*2));let _=y*y;function w(e){let t=(x*x-v*v+(e?-1:1)*_*_*b*b)/(2*(e?x:v)*_*b);return Math.log(Math.sqrt(t*t+1)-t)}function T(e){return(Math.exp(e)-Math.exp(-e))/2}function M(e){return(Math.exp(e)+Math.exp(-e))/2}let k=w(!1),A=function(e){return M(k)/M(k+y*e)},S=function(e){var t;return v*((M(k)*(T(t=k+y*e)/M(t))-T(k))/_)/b},E=(w(!0)-k)/y;if(2e-6>Math.abs(b)||!isFinite(E)){if(1e-6>Math.abs(v-x))return this.easeTo(e,r);let t=x0,A=e=>Math.exp(t*y*e)}return e.duration="duration"in e?+e.duration:1e3*E/("screenSpeed"in e?e.screenSpeed/y:+e.speed),e.maxDuration&&e.duration>e.maxDuration&&(e.duration=0),this._zooming=!0,this._rotating=n!==l,this._pitching=c!==a,this._rolling=u!==o,this._padding=!i.isPaddingEqual(h),this._prepareEase(r,!1),this.terrain&&this._prepareElevation(m.targetCenter),this._ease(p=>{let g=p*E,y=1/A(g),v=S(g);this._rotating&&i.setBearing(t.H.number(n,l,p)),this._pitching&&i.setPitch(t.H.number(a,c,p)),this._rolling&&i.setRoll(t.H.number(o,u,p)),this._padding&&(i.interpolatePadding(s,h,p),f=i.centerPoint.add(d)),m.easeFunc(p,y,v,f),this.terrain&&!e.freezeElevation&&this._updateElevation(p),this._applyUpdatedTransform(i),this._fireMoveEvents(r)},()=>{this.terrain&&e.freezeElevation&&this._finalizeElevation(),this._afterEase(r)},e),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(e,t){var r;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let e=this._onEaseEnd;delete this._onEaseEnd,e.call(this,t)}return e||null==(r=this.handlers)||r.stop(!1),this}_ease(e,t,r){!1===r.animate||0===r.duration?(e(1),t()):(this._easeStart=v(),this._easeOptions=r,this._onEaseFrame=e,this._onEaseEnd=t,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(e,r){let i=Math.abs((e=t.X(e,-180,180))-r);return Math.abs(e-360-r)MapLibre'};class nL{constructor(e=nC){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=e=>{e&&("metadata"===e.sourceDataType||"visibility"===e.sourceDataType||"style"===e.dataType||"terrain"===e.type)&&this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1===this._compact?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=e}getDefaultPosition(){return"bottom-right"}onAdd(e){return this._map=e,this._compact=this.options.compact,this._container=x.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=x.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=x.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(e,t){let r=this._map._getUIString(`AttributionControl.${t}`);e.title=r,e.setAttribute("aria-label",r)}_updateAttributions(){if(!this._map.style)return;let e=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?e=e.concat(this.options.customAttribution.map(e=>"string"!=typeof e?"":e)):"string"==typeof this.options.customAttribution&&e.push(this.options.customAttribution)),this._map.style.stylesheet){let e=this._map.style.stylesheet;this.styleOwner=e.owner,this.styleId=e.id}let t=this._map.style.tileManagers;for(let r in t){let i=t[r];if(i.used||i.usedForTerrain){let t=i.getSource();t.attribution&&!e.includes(t.attribution)&&e.push(t.attribution)}}(e=e.filter(e=>String(e).trim())).sort((e,t)=>e.length-t.length);let r=(e=e.filter((t,r)=>{for(let i=r+1;i{let e=this._container.children;if(e.length){let t=e[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?!1!==this._compact&&t.classList.add("maplibregl-compact"):t.classList.remove("maplibregl-compact")}},this.options=e}getDefaultPosition(){return"bottom-left"}onAdd(e){var t;this._map=e,this._compact=null==(t=this.options)?void 0:t.compact,this._container=x.create("div","maplibregl-ctrl");let r=x.create("a","maplibregl-ctrl-logo");return r.target="_blank",r.rel="noopener nofollow",r.href="https://maplibre.org/",r.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),r.setAttribute("rel","noopener nofollow"),this._container.appendChild(r),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class nI{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(e){let t=++this._id;return this._queue.push({callback:e,id:t,cancelled:!1}),t}remove(e){let t=this._currentlyRunning;for(let r of t?this._queue.concat(t):this._queue)if(r.id===e)return void(r.cancelled=!0)}run(e=0){if(this._currentlyRunning)throw Error("Attempting to run(), but is already running.");let t=this._currentlyRunning=this._queue;for(let r of(this._queue=[],t))if(!r.cancelled&&(r.callback(e),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var nz=t.aS([{name:"a_pos3d",type:"Int16",components:3}]);class nD extends t.E{constructor(e){super(),this._lastTilesetChange=v(),this.tileManager=e,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=e._source.tileSize*2**this.deltaZoom,e.usedForTerrain=!0,e.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(e,r){this.tileManager.update(e,r),this._renderableTilesKeys=[];let i={};for(let n of ew(e,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:r,calculateTileZoom:this.tileManager._source.calculateTileZoom}))i[n.key]=!0,this._renderableTilesKeys.push(n.key),this._tiles[n.key]||(n.terrainRttPosMatrix32f=new Float64Array(16),t.c7(n.terrainRttPosMatrix32f,0,t.a6,t.a6,0,0,1),this._tiles[n.key]=new eu(n,this.tileSize),this._lastTilesetChange=v());for(let e in this._tiles)i[e]||delete this._tiles[e]}freeRtt(e){for(let t in this._tiles){let r=this._tiles[t];(!e||r.tileID.equals(e)||r.tileID.isChildOf(e)||e.isChildOf(r.tileID))&&(r.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(e=>this.getTileByID(e))}getTileByID(e){return this._tiles[e]}getTerrainCoords(e,t){return t?this._getTerrainCoordsForTileRanges(e,t):this._getTerrainCoordsForRegularTile(e)}_getTerrainCoordsForRegularTile(e){let r={};for(let i of this._renderableTilesKeys){let n=this._tiles[i].tileID,a=e.clone(),o=t.bj();if(n.canonical.equals(e.canonical))t.c7(o,0,t.a6,t.a6,0,0,1);else if(n.canonical.isChildOf(e.canonical)){let r=n.canonical.z-e.canonical.z,i=n.canonical.x-(n.canonical.x>>r<>r<>r;t.c7(o,0,s,s,0,0,1),t.Q(o,o,[-i*s,-a*s,0])}else{if(!e.canonical.isChildOf(n.canonical))continue;{let r=e.canonical.z-n.canonical.z,i=e.canonical.x-(e.canonical.x>>r<>r<>r;t.c7(o,0,t.a6,t.a6,0,0,1),t.Q(o,o,[i*s,a*s,0]),t.S(o,o,[1/2**r,1/2**r,0])}}a.terrainRttPosMatrix32f=new Float32Array(o),r[i]=a}return r}_getTerrainCoordsForTileRanges(e,r){let i={};for(let n of this._renderableTilesKeys){let a=this._tiles[n].tileID;if(!this._isWithinTileRanges(a,r))continue;let o=e.clone(),s=t.bj();if(a.canonical.z===e.canonical.z){let r=e.canonical.x-a.canonical.x+e.wrap*(1<e.canonical.z){let r=a.canonical.z-e.canonical.z,i=a.canonical.x-(a.canonical.x>>r<>r<>r),l=e.canonical.y-(a.canonical.y>>r),c=t.a6>>r;t.c7(s,0,c,c,0,0,1),t.Q(s,s,[-i*c+o*t.a6,-n*c+l*t.a6,0])}else{let r=e.canonical.z-a.canonical.z,i=e.canonical.x-(e.canonical.x>>r<>r<>r)-a.canonical.x,l=(e.canonical.y>>r)-a.canonical.y,c=t.a6<n.maxzoom&&(a=n.maxzoom),a=n.minzoom&&!o?.dem;)o=this.findTileInCaches(e.scaledTo(a--).key);return o}findTileInCaches(e){let t=this.tileManager.getTileByID(e);return t||(t=this.tileManager._outOfViewCache.getByKey(e))}anyTilesAfterTime(e=Date.now()){return this._lastTilesetChange>=e}_isWithinTileRanges(e,t){let r=t[e.canonical.z];return!!r&&(e.wrap>r.minWrap||e.wrap=r.minTileXWrapped&&e.canonical.x<=r.maxTileXWrapped&&e.canonical.y>=r.minTileY&&e.canonical.y<=r.maxTileY)}}class nO{constructor(e,t,r){this._meshCache={},this.painter=e,this.tileManager=new nD(t),this.options=r,this.exaggeration="number"==typeof r.exaggeration?r.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){for(let e in this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null),this._meshCache)this._meshCache[e].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(e,r,i,n=t.a6){var a;let o=e.normalizeCoordinates(r,i,n);if(!o)return 0;let s=this.getTerrainData(o.tileID),l=null==(a=s.tile)?void 0:a.dem;if(!l)return 0;let c=t.cC([],[o.x/n*t.a6,o.y/n*t.a6],s.u_terrain_matrix),u=[c[0]*l.dim,c[1]*l.dim],h=Math.floor(u[0]),d=Math.floor(u[1]),f=u[0]-h,p=u[1]-d;return l.get(h,d)*(1-f)*(1-p)+l.get(h+1,d)*f*(1-p)+l.get(h,d+1)*(1-f)*p+l.get(h+1,d+1)*f*p}getElevationForLngLatZoom(e,r){if(!t.cD(r,e.wrap()))return 0;let{tileID:i,mercatorX:n,mercatorY:a}=this._getOverscaledTileIDFromLngLatZoom(e,r);return this.getElevation(i,n%t.a6,a%t.a6,t.a6)}getElevationForLngLat(e,t){let r=ew(t,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),i=0;for(let e of r)e.canonical.z>i&&(i=Math.min(e.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(e,i)}getElevation(e,r,i,n=t.a6){return this.getDEMElevation(e,r,i,n)*this.exaggeration}getTerrainData(e){var r,i;if(!this._emptyDemTexture){let e=this.painter.context,r=new t.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new t.T(e,r,e.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new t.T(e,new t.R({width:1,height:1}),e.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=t.ap([])}let n=this.tileManager.getSourceTile(e,!0);if(n?.dem&&(!n.demTexture||n.needsTerrainPrepare)){let e=this.painter.context;n.demTexture=this.painter.getTileTexture(n.dem.stride),n.demTexture?n.demTexture.update(n.dem.getPixels(),{premultiply:!1}):n.demTexture=new t.T(e,n.dem.getPixels(),e.gl.RGBA,{premultiply:!1}),n.demTexture.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),n.needsTerrainPrepare=!1}let a=n&&n.toString()+n.tileID.key+e.key;if(a&&!this._demMatrixCache[a]){let r=this.tileManager.getSource().maxzoom,i=e.canonical.z-n.tileID.canonical.z;e.overscaledZ>e.canonical.z&&(e.canonical.z>=r?i=e.canonical.z-r:t.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let o=e.canonical.x-(e.canonical.x>>i<>i<>8<<4|e>>8,r[t+3]=0;let i=new t.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(r.buffer)),n=new t.T(e,i,e.gl.RGBA,{premultiply:!1});return n.bind(e.gl.NEAREST,e.gl.CLAMP_TO_EDGE),this._coordsTexture=n,n}pointCoordinate(e){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let r=new Uint8Array(4),i=this.painter.context,n=i.gl,a=Math.round(e.x*this.painter.pixelRatio/devicePixelRatio),o=Math.round(e.y*this.painter.pixelRatio/devicePixelRatio),s=Math.round(this.painter.height/devicePixelRatio);i.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),n.readPixels(a,s-o-1,1,1,n.RGBA,n.UNSIGNED_BYTE,r),i.bindFramebuffer.set(null);let l=r[0]+(r[2]>>4<<8),c=r[1]+((15&r[2])<<8),u=this.coordsIndex[255-r[3]],h=u&&this.tileManager.getTileByID(u);if(!h)return null;let d=this._coordsTextureSize,f=(1<0,n=i&&0===e.canonical.y,a=i&&e.canonical.y===(1<e.id!==t),this._recentlyUsed.push(e.id)}stampObject(e){e.stamp=++this._stamp}getOrCreateFreeObject(){for(let e of this._recentlyUsed)if(!this._objects[e].inUse)return this._objects[e];if(this._objects.length>=this._size)throw Error("No free RenderPool available, call freeAllObjects() required!");let e=this._createObject(this._objects.length);return this._objects.push(e),e}freeObject(e){e.inUse=!1}freeAllObjects(){for(let e of this._objects)this.freeObject(e)}isFull(){return!(this._objects.length!e.inUse)}}let nF={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class nj{constructor(e,t){this.painter=e,this.terrain=t,this.pool=new nR(e.context,30,t.tileManager.tileSize*t.qualityFactor)}destruct(){this.pool.destruct()}getTexture(e){return this.pool.getObjectForId(e.rtt[this._stacks.length-1].id).texture}prepareForRender(e,t){var r,i,n;for(let r in this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=e._order.filter(r=>!e._layers[r].isHidden(t)),this._coordsAscending={},e.tileManagers){this._coordsAscending[r]={};let t=e.tileManagers[r].getVisibleCoordinates(),i=e.tileManagers[r].getSource(),a=i instanceof et?i.terrainTileRanges:null;for(let e of t){let t=this.terrain.tileManager.getTerrainCoords(e,a);for(let e in t)(n=this._coordsAscending[r])[e]||(n[e]=[]),this._coordsAscending[r][e].push(t[e])}}for(let t of(this._rttFingerprints={},e._order)){let n=e._layers[t],a=n.source;if(nF[n.type]&&!this._rttFingerprints[a]){this._rttFingerprints[a]={};let t=null!=(i=null==(r=e.tileManagers[a])?void 0:r.getState().revision)?i:0;for(let e in this._coordsAscending[a])this._rttFingerprints[a][e]=`${this._coordsAscending[a][e].map(e=>e.key).sort().join()}#${t}`}}for(let e of this._renderableTiles)for(let t in this._rttFingerprints){let r=this._rttFingerprints[t][e.tileID.key];r&&r!==e.rttFingerprint[t]&&(e.rtt=[])}}renderLayer(e,r){if(e.isHidden(this.painter.transform.zoom))return!1;let i=Object.assign(Object.assign({},r),{isRenderingToTexture:!0}),n=e.type,a=this.painter,o=this._renderableLayerIds[this._renderableLayerIds.length-1]===e.id;if(nF[n]&&(this._prevType&&nF[this._prevType]||this._stacks.push([]),this._prevType=n,this._stacks[this._stacks.length-1].push(e.id),!o))return!0;if(nF[this._prevType]||nF[n]&&o){this._prevType=n;let e=this._stacks.length-1,r=this._stacks[e]||[];for(let n of this._renderableTiles){if(this.pool.isFull()&&(iz(this.painter,this.terrain,this._rttTiles,i),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(n),n.rtt[e]){let t=this.pool.getObjectForId(n.rtt[e].id);if(t.stamp===n.rtt[e].stamp){this.pool.useObject(t);continue}}let o=this.pool.getOrCreateFreeObject();for(let s of(this.pool.useObject(o),this.pool.stampObject(o),n.rtt[e]={id:o.id,stamp:o.stamp},a.context.bindFramebuffer.set(o.fbo.framebuffer),a.context.clear({color:t.bo.transparent,stencil:0}),a.currentStencilSource=void 0,r)){let e=a.style._layers[s],t=e.source?this._coordsAscending[e.source][n.tileID.key]:[n.tileID];a.context.viewport.set([0,0,o.fbo.width,o.fbo.height]),a._renderTileClippingMasks(e,t,!0),a.renderLayer(a,a.style.tileManagers[e.source],e,t,i),e.source&&(n.rttFingerprint[e.source]=this._rttFingerprints[e.source][n.tileID.key])}}return iz(this.painter,this.terrain,this._rttTiles,i),this._rttTiles=[],this.pool.freeAllObjects(),nF[n]}return!1}}let nB={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use ⌘ + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},nN={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:nC,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:t.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},nU=class extends nE{get _ownerWindow(){var e,t;return(null==(t=null==(e=this._container)?void 0:e.ownerDocument)?void 0:t.defaultView)||window}constructor(e){var r,i,n;let a=Object.assign(Object.assign(Object.assign({},nN),e),{canvasContextAttributes:Object.assign(Object.assign({},nN.canvasContextAttributes),e.canvasContextAttributes)});if(null!=a.minZoom&&null!=a.maxZoom&&a.minZoom>a.maxZoom)throw Error("maxZoom must be greater than or equal to minZoom");if(null!=a.minPitch&&null!=a.maxPitch&&a.minPitch>a.maxPitch)throw Error("maxPitch must be greater than or equal to minPitch");if(null!=a.minPitch&&a.minPitch<0)throw Error("minPitch must be greater than or equal to 0");if(null!=a.maxPitch&&a.maxPitch>180)throw Error("maxPitch must be less than or equal to 180");let o=new tv,s=new tw;void 0!==a.minZoom&&o.setMinZoom(a.minZoom),void 0!==a.maxZoom&&o.setMaxZoom(a.maxZoom),void 0!==a.minPitch&&o.setMinPitch(a.minPitch),void 0!==a.maxPitch&&o.setMaxPitch(a.maxPitch),void 0!==a.renderWorldCopies&&o.setRenderWorldCopies(a.renderWorldCopies),null!==a.transformConstrain&&o.setConstrainOverride(a.transformConstrain),super(o,s,{bearingSnap:a.bearingSnap,zoomSnap:a.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new nI,this._controls=[],this._mapId=t.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=e=>{if(e.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let e of Object.values(this.style._layers))if("custom"===e.type&&console.warn(`Custom layer with id '${e.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),e._listeners)for(let[t]of Object.entries(e._listeners))console.warn(`Custom layer with id '${e.id}' had event listeners for event '${t}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new t.n("webglcontextlost",{originalEvent:e}))}else this.fire(new t.n("webglcontextlost",{originalEvent:e}))},this._contextRestored=e=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new t.n("webglcontextrestored",{originalEvent:e}))},this._onMapScroll=e=>{if(e.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=a.interactive,this._maxTileCacheSize=a.maxTileCacheSize,this._maxTileCacheZoomLevels=a.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},a.canvasContextAttributes),this._trackResize=!0===a.trackResize,this._bearingSnap=a.bearingSnap,this._zoomSnap=a.zoomSnap,this._centerClampedToGround=a.centerClampedToGround,this._refreshExpiredTiles=!0===a.refreshExpiredTiles,this._fadeDuration=a.fadeDuration,this._crossSourceCollisions=!0===a.crossSourceCollisions,this._collectResourceTiming=!0===a.collectResourceTiming,this._locale=Object.assign(Object.assign({},nB),a.locale),this._clickTolerance=a.clickTolerance,this._overridePixelRatio=a.pixelRatio,this._maxCanvasSize=a.maxCanvasSize,this._zoomLevelsToOverscale=a.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=a.transformCameraUpdate,this.transformConstrain=a.transformConstrain,this.cancelPendingTileRequestsWhileZooming=!0===a.cancelPendingTileRequestsWhileZooming,this.setAnisotropicFilterPitch(a.anisotropicFilterPitch),void 0!==a.reduceMotion&&(g.prefersReducedMotion=a.reduceMotion),this._imageQueueHandle=l.addThrottleControl(()=>this.isMoving()),this._requestManager=new b(a.transformRequest),this._container=this._resolveContainer(a.container),a.maxBounds&&this.setMaxBounds(a.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),"u">typeof window&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new nS(this,a),this._hash=a.hash?new ij("string"==typeof a.hash&&a.hash||void 0).addTo(this):void 0,null!=(r=this._hash)&&r._onHashChange()||(this.jumpTo({center:a.center,elevation:a.elevation,zoom:a.zoom,bearing:a.bearing,pitch:a.pitch,roll:a.roll}),a.bounds&&(this.resize(),this.fitBounds(a.bounds,t.e({},a.fitBoundsOptions,{duration:0}))));let c="string"==typeof a.style||(null==(n=null==(i=a.style)?void 0:i.projection)?void 0:n.type)!=="globe";this.resize(null,c),this._localIdeographFontFamily=a.localIdeographFontFamily,this._validateStyle=a.validateStyle,a.style&&this.setStyle(a.style,{localIdeographFontFamily:a.localIdeographFontFamily}),a.attributionControl&&this.addControl(new nL("boolean"==typeof a.attributionControl?void 0:a.attributionControl)),a.maplibreLogo&&this.addControl(new nP,a.logoPosition),this.on("style.load",()=>{if(c||this._resizeTransform(),this.transform.unmodified){let e=t.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(e)}}),this.on("data",e=>{this._update("style"===e.dataType),this.fire(new t.n(`${e.dataType}data`,e))}),this.on("dataloading",e=>{this.fire(new t.n(`${e.dataType}dataloading`,e))}),this.on("dataabort",e=>{this.fire(new t.n("sourcedataabort",e))})}_getMapId(){return this._mapId}setGlobalStateProperty(e,t){return this.style.setGlobalStateProperty(e,t),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(e,r){if(void 0===r&&(r=e.getDefaultPosition?e.getDefaultPosition():"top-right"),!e?.onAdd)return this.fire(new t.l(Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let i=e.onAdd(this);this._controls.push(e);let n=this._controlPositions[r];return r.includes("bottom")?n.insertBefore(i,n.firstChild):n.appendChild(i),this}removeControl(e){if(!e?.onRemove)return this.fire(new t.l(Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let r=this._controls.indexOf(e);return r>-1&&this._controls.splice(r,1),e.onRemove(this),this}hasControl(e){return this._controls.includes(e)}coveringTiles(e){return ew(this.transform,e)}calculateCameraOptionsFromTo(e,t,r,i){return null==i&&this.terrain&&(i=this.terrain.getElevationForLngLat(r,this.transform)),super.calculateCameraOptionsFromTo(e,t,r,i)}resize(e,r=!0){if(null!==this._lostContextStyle.style)return this;this._resizeInternal(r);let i=!this._moving;return i&&(this.stop(),this.fire(new t.n("movestart",e)).fire(new t.n("move",e))),this.fire(new t.n("resize",e)),i&&this.fire(new t.n("moveend",e)),this}_resizeInternal(e=!0){let[t,r]=this._containerDimensions(),i=this._getClampedPixelRatio(t,r);if(this._resizeCanvas(t,r,i),this.painter.resize(t,r,i),this.painter.overLimit()){let e=this.painter.context.gl;this._maxCanvasSize=[e.drawingBufferWidth,e.drawingBufferHeight];let i=this._getClampedPixelRatio(t,r);this._resizeCanvas(t,r,i),this.painter.resize(t,r,i)}this._resizeTransform(e)}_resizeTransform(e=!0){var t;let[r,i]=this._containerDimensions();this.transform.resize(r,i,e),null==(t=this._requestedCameraState)||t.resize(r,i,e)}_getClampedPixelRatio(e,t){let{0:r,1:i}=this._maxCanvasSize,n=this.getPixelRatio(),a=e*n,o=t*n;return Math.min(a>r?r/a:1,o>i?i/o:1)*n}getPixelRatio(){var e;return null!=(e=this._overridePixelRatio)?e:devicePixelRatio}setPixelRatio(e){this._overridePixelRatio=e,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(e){return this.transform.setMaxBounds(G.convert(e)),this._update()}setMinZoom(e){if((e=e??-2)>=-2&&e<=this.transform.maxZoom){let r=this.transform.zoom,i=this._getTransformForUpdate();return i.setMinZoom(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.zoom&&this.fire(new t.n("zoomstart")).fire(new t.n("zoom")).fire(new t.n("zoomend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(e){if((e=e??22)>=this.transform.minZoom){let r=this.transform.zoom,i=this._getTransformForUpdate();return i.setMaxZoom(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.zoom&&this.fire(new t.n("zoomstart")).fire(new t.n("zoom")).fire(new t.n("zoomend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(e){if((e=e??0)<0)throw Error("minPitch must be greater than or equal to 0");if(e>=0&&e<=this.transform.maxPitch){let r=this.transform.pitch,i=this._getTransformForUpdate();return i.setMinPitch(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.pitch&&this.fire(new t.n("pitchstart")).fire(new t.n("pitch")).fire(new t.n("pitchend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(e){if((e=e??60)>180)throw Error("maxPitch must be less than or equal to 180");if(e>=this.transform.minPitch){let r=this.transform.pitch,i=this._getTransformForUpdate();return i.setMaxPitch(e),this._applyUpdatedTransform(i),this._update(),r!==this.transform.pitch&&this.fire(new t.n("pitchstart")).fire(new t.n("pitch")).fire(new t.n("pitchend")).fire(new t.n("movestart")).fire(new t.n("move")).fire(new t.n("moveend")),this}throw Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(e){if((e=e??20)>180)throw Error("anisotropicFilterPitch must be less than or equal to 180");if(e<0)throw Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=e,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(e){return this.transform.setRenderWorldCopies(e),this._update()}setTransformConstrain(e){return this.transform.setConstrainOverride(e),this._update()}project(e){return this.transform.locationToScreenPoint(t.W.convert(e),this.style&&this.terrain)}unproject(e){return this.transform.screenPointToLocation(t.P.convert(e),this.terrain)}isMoving(){var e;return this._moving||(null==(e=this.handlers)?void 0:e.isMoving())}isZooming(){var e;return this._zooming||(null==(e=this.handlers)?void 0:e.isZooming())}isRotating(){var e;return this._rotating||(null==(e=this.handlers)?void 0:e.isRotating())}_createDelegatedListener(e,t,r){if("mouseenter"===e||"mouseover"===e){let i=!1;return{layers:t,listener:r,delegates:{mousemove:n=>{let a=t.filter(e=>this.getLayer(e)),o=0!==a.length?this.queryRenderedFeatures(n.point,{layers:a}):[];o.length?i||(i=!0,r.call(this,new iZ(e,this,n.originalEvent,{features:o}))):i=!1},mouseout:()=>{i=!1}}}}if("mouseleave"===e||"mouseout"===e){let i=!1;return{layers:t,listener:r,delegates:{mousemove:n=>{let a=t.filter(e=>this.getLayer(e));(0!==a.length?this.queryRenderedFeatures(n.point,{layers:a}):[]).length?i=!0:i&&(i=!1,r.call(this,new iZ(e,this,n.originalEvent)))},mouseout:t=>{i&&(i=!1,r.call(this,new iZ(e,this,t.originalEvent)))}}}}{let i=e=>{let i=t.filter(e=>this.getLayer(e)),n=0!==i.length?this.queryRenderedFeatures(e.point,{layers:i}):[];n.length&&(e.features=n,r.call(this,e),delete e.features)};return{layers:t,listener:r,delegates:{[e]:i}}}}_saveDelegatedListener(e,t){var r;this._delegatedListeners||(this._delegatedListeners={}),(r=this._delegatedListeners)[e]||(r[e]=[]),this._delegatedListeners[e].push(t)}_removeDelegatedListener(e,t,r){var i;if(!(null!=(i=this._delegatedListeners)&&i[e]))return;let n=this._delegatedListeners[e];for(let e=0;et.includes(e))){for(let e in i.delegates)this.off(e,i.delegates[e]);return void n.splice(e,1)}}}on(e,t,r){if(void 0===r)return super.on(e,t);let i="string"==typeof t?[t]:t,n=this._createDelegatedListener(e,i,r);for(let t in this._saveDelegatedListener(e,n),n.delegates)this.on(t,n.delegates[t]);return{unsubscribe:()=>{this._removeDelegatedListener(e,i,r)}}}once(e,t,r){if(void 0===r)return super.once(e,t);let i="string"==typeof t?[t]:t,n=this._createDelegatedListener(e,i,r);for(let t in n.delegates){let a=n.delegates[t];n.delegates[t]=(...t)=>{this._removeDelegatedListener(e,i,r),a(...t)}}for(let t in this._saveDelegatedListener(e,n),n.delegates)this.once(t,n.delegates[t]);return this}off(e,t,r){return void 0===r?super.off(e,t):(this._removeDelegatedListener(e,"string"==typeof t?[t]:t,r),this)}queryRenderedFeatures(e,r){if(!this.style)return[];let i,n=e instanceof t.P||Array.isArray(e),a=n?e:[[0,0],[this.transform.width,this.transform.height]];if(r||(r=(n?{}:e)||{}),a instanceof t.P||"number"==typeof a[0])i=[t.P.convert(a)];else{let e=t.P.convert(a[0]),r=t.P.convert(a[1]);i=[e,new t.P(r.x,e.y),r,new t.P(e.x,r.y),e]}return this.style.queryRenderedFeatures(i,r,this.transform)}querySourceFeatures(e,t){return this.style.querySourceFeatures(e,t)}setStyle(e,r){return!1!==(r=t.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},r)).diff&&r.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&e?(this._diffStyle(e,r),this):(this._localIdeographFontFamily=r.localIdeographFontFamily,this._updateStyle(e,r))}setTransformRequest(e){return this._requestManager.setTransformRequest(e),this}_getUIString(e){let t=this._locale[e];if(null==t)throw Error(`Missing UI string '${e}'`);return t}_updateStyle(e,t){var r,i,n;if(null==(r=this._diffStyleRequest)||r.abort(),this._diffStyleRequest=null,t.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(e,t));let a=this.style&&t.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!e)),e?(this.style=new t3(this,t||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof e?this.style.loadURL(e,t,a):this.style.loadJSON(e,t,a)):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),null==(n=null==(i=this.style)?void 0:i.projection)||n.destroy(),delete this.style),this}_lazyInitEmptyStyle(){this.style||(this.style=new t3(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(e,r){return t._(this,void 0,void 0,function*(){var i;if(null==(i=this._diffStyleRequest)||i.abort(),"string"==typeof e){this._diffStyleRequest=new AbortController;let i=this._diffStyleRequest;try{let n=yield this._requestManager.transformRequest(e,"Style");if(i.signal.aborted)return void(this._diffStyleRequest=null);let a=yield t.k(n,i);this._diffStyleRequest=null,this._updateDiff(a.data,r)}catch(e){this._diffStyleRequest=null,t.$(e)||this.fire(new t.l(t.d(e)))}}else"object"==typeof e&&(this._diffStyleRequest=null,this._updateDiff(e,r))})}_updateDiff(e,r){try{this.style.setState(e,r)&&this._update(!0)}catch(i){t.w(`Unable to perform style diff: ${t.d(i).message}. Rebuilding the style from scratch.`),this._updateStyle(e,r)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();t.w("There is no style added to the map.")}addSource(e,t){return this._lazyInitEmptyStyle(),this.style.addSource(e,t),this._update(!0)}isSourceLoaded(e){var r;let i=null==(r=this.style)?void 0:r.tileManagers[e];if(void 0!==i)return i.loaded();this.fire(new t.l(Error(`There is no tile manager with ID '${e}'`)))}setTerrain(e){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),e){let r=this.style.tileManagers[e.source];if(!r)throw Error(`cannot load terrain, because there exists no source with ID: ${e.source}`);for(let i in null===this.terrain&&r.reload(),this.style._layers){let r=this.style._layers[i];"hillshade"===r.type&&r.source===e.source&&t.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),"color-relief"===r.type&&r.source===e.source&&t.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new nO(this.painter,r,e),this.painter.renderToTexture=new nj(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=t=>{var r;"style"===t.dataType?this.terrain.tileManager.freeRtt():"source"===t.dataType&&t.tile&&(t.sourceId!==e.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),(null==(r=t.source)?void 0:r.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(t.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new t.n("terrain",{terrain:e})),this}getTerrain(){var e,t;return null!=(t=null==(e=this.terrain)?void 0:e.options)?t:null}areTilesLoaded(){var e;for(let t of Object.values(null==(e=this.style)?void 0:e.tileManagers))if(!t.areTilesLoaded())return!1;return!0}removeSource(e){return this.style.removeSource(e),this._update(!0)}getSource(e){return this.style.getSource(e)}setSourceTileLodParams(e,t,r){if(r){let i=this.getSource(r);if(!i)throw Error(`There is no source with ID "${r}", cannot set LOD parameters`);i.calculateTileZoom=ex(Math.max(1,e),Math.max(1,t))}else for(let r in this.style.tileManagers)this.style.tileManagers[r].getSource().calculateTileZoom=ex(Math.max(1,e),Math.max(1,t));return this._update(!0),this}refreshTiles(e,r){let i=this.style.tileManagers[e];if(!i)throw Error(`There is no tile manager with ID "${e}", cannot refresh tile`);void 0===r?i.reload(!0):i.refreshTiles(r.map(e=>new t.aa(e.z,e.x,e.y)))}addImage(e,r,i={}){let{pixelRatio:n=1,sdf:a=!1,stretchX:o,stretchY:s,content:l,textFitWidth:c,textFitHeight:u}=i;if(this._lazyInitEmptyStyle(),!(r instanceof HTMLImageElement||t.b(r))){if(void 0===r.width||void 0===r.height)return this.fire(new t.l(Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:i,height:h,data:d}=r;return this.style.addImage(e,{data:new t.R({width:i,height:h},new Uint8Array(d)),pixelRatio:n,stretchX:o,stretchY:s,content:l,textFitWidth:c,textFitHeight:u,sdf:a,version:0,userImage:r}),r.onAdd&&r.onAdd(this,e),this}}{let{width:i,height:h,data:d}=g.getImageData(r);this.style.addImage(e,{data:new t.R({width:i,height:h},d),pixelRatio:n,stretchX:o,stretchY:s,content:l,textFitWidth:c,textFitHeight:u,sdf:a,version:0})}}updateImage(e,r){let i=this.style.getImage(e);if(!i)return this.fire(new t.l(Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let{width:n,height:a,data:o}=r instanceof HTMLImageElement||t.b(r)?g.getImageData(r):r;if(void 0===n||void 0===a)return this.fire(new t.l(Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(n!==i.data.width||a!==i.data.height)return this.fire(new t.l(Error("The width and height of the updated image must be that same as the previous version of the image")));let s=!(r instanceof HTMLImageElement||t.b(r));return i.data.replace(o,s),this.style.updateImage(e,i),this}getImage(e){return this.style.getImage(e)}hasImage(e){return e?!!this.style.getImage(e):(this.fire(new t.l(Error("Missing required image id"))),!1)}removeImage(e){this.style.removeImage(e)}loadImage(e){return t._(this,void 0,void 0,function*(){return l.getImage((yield this._requestManager.transformRequest(e,"Image")),new AbortController)})}listImages(){return this.style.listImages()}addLayer(e,t){return this._lazyInitEmptyStyle(),this.style.addLayer(e,t),this._update(!0)}moveLayer(e,t){return this.style.moveLayer(e,t),this._update(!0)}removeLayer(e){return this.style.removeLayer(e),this._update(!0)}getLayer(e){return this.style.getLayer(e)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(e,t,r){return this.style.setLayerZoomRange(e,t,r),this._update(!0)}setFilter(e,t,r={}){return this.style.setFilter(e,t,r),this._update(!0)}getFilter(e){return this.style.getFilter(e)}setPaintProperty(e,t,r,i={}){return this.style.setPaintProperty(e,t,r,i),this._update(!0)}getPaintProperty(e,t){return this.style.getPaintProperty(e,t)}setLayoutProperty(e,t,r,i={}){return this.style.setLayoutProperty(e,t,r,i),this._update(!0)}getLayoutProperty(e,t){return this.style.getLayoutProperty(e,t)}setGlyphs(e,t={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(e,t),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(e,t,r={}){return this._lazyInitEmptyStyle(),this.style.addSprite(e,t,r,e=>{e||this._update(!0)}),this}removeSprite(e){return this._lazyInitEmptyStyle(),this.style.removeSprite(e),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSprite(e,t,e=>{e||this._update(!0)}),this}setLight(e,t={}){return this._lazyInitEmptyStyle(),this.style.setLight(e,t),this._update(!0)}getLight(){return this.style.getLight()}setSky(e,t={}){return this._lazyInitEmptyStyle(),this.style.setSky(e,t),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(e,t){return this.style.setFeatureState(e,t),this._update()}removeFeatureState(e,t){return this.style.removeFeatureState(e,t),this._update()}getFeatureState(e){return this.style.getFeatureState(e)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let e=0,t=0;return this._container&&(e=this._container.clientWidth||400,t=this._container.clientHeight||300),[e,t]}_setupResizeObserver(){var e;let t=!1,r=iF(e=>{this._trackResize&&!this._removed&&(this.resize(e),this.redraw())},50),i=null!=(e=this._ownerWindow.ResizeObserver)?e:ResizeObserver;this._resizeObserver=new i(e=>{t?r(e):t=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(e){if("string"==typeof e){let t=document.getElementById(e);if(!t)throw Error(`Container '${e}' not found.`);return t}if(e instanceof HTMLElement||e&&"object"==typeof e&&1===e.nodeType)return e;throw Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let e=this._container;e.classList.add("maplibregl-map");let t=this._canvasContainer=x.create("div","maplibregl-canvas-container",e);this._interactive&&t.classList.add("maplibregl-interactive"),this._canvas=x.create("canvas","maplibregl-canvas",t),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let r=this._containerDimensions(),i=this._getClampedPixelRatio(r[0],r[1]);this._resizeCanvas(r[0],r[1],i);let n=this._controlContainer=x.create("div","maplibregl-control-container",e),a=this._controlPositions={};for(let e of["top-left","top-right","bottom-left","bottom-right"])a[e]=x.create("div",`maplibregl-ctrl-${e} `,n);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(e,t,r){this._canvas.width=Math.floor(r*e),this._canvas.height=Math.floor(r*t),this._canvas.style.width=`${e}px`,this._canvas.style.height=`${t}px`}_setupPainter(){let e=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),t=null;this._canvas.addEventListener("webglcontextcreationerror",r=>{t={requestedAttributes:e},r&&(t.statusMessage=r.statusMessage,t.type=r.type)},{once:!0});let r=null;if(!(r=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,e):this._canvas.getContext("webgl2",e)||this._canvas.getContext("webgl",e))){let e="Failed to initialize WebGL";throw t?(t.message=e,Error(JSON.stringify(t))):Error(e)}this.painter=new iR(r,this.transform)}migrateProjection(e,r){super.migrateProjection(e,r),this.painter.transform=e,this.fire(new t.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(e){var t;return null!=(t=this.style)&&t._loaded&&(this._styleDirty||(this._styleDirty=e),this._sourcesDirty=!0,this.triggerRepaint()),this}_requestRenderFrame(e){return this._update(),this._renderTaskQueue.add(e)}_cancelRenderFrame(e){this._renderTaskQueue.remove(e)}_render(e){var r,i,n,a,o,s;let l=this._idleTriggered?this._fadeDuration:0,c=(null==(r=this.style.projection)?void 0:r.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(e),this._removed)return;let u=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let e=this.transform.zoom,r=v();this.style.zoomHistory.update(e,r);let i=new t.J(e,{now:r,fadeDuration:l,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),n=i.crossFadingFactor();1===n&&n===this._crossFadingFactor||(u=!0,this._crossFadingFactor=n),this.style.update(i)}let h=(null==(i=this.style.projection)?void 0:i.transitionState)>0!==c;null==(n=this.style.projection)||n.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState(null==(a=this.style.projection)?void 0:a.transitionState,null==(o=this.style.projection)?void 0:o.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||h)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=null==(s=this.style)?void 0:s._updatePlacement(this.transform,this.showCollisionBoxes,l,this._crossSourceCollisions,h),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:l,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new t.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new t.n("load"))),this.style&&(this.style.hasTransitions()||u)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let d=this._sourcesDirty||this._styleDirty||this._placementDirty;return d||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new t.n("idle")),!this._loaded||this._fullyLoaded||d||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var e,r;for(let e of(this._hash&&this._hash.remove(),this._controls))e.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),null==(e=this._diffStyleRequest)||e.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),"u">typeof window&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),l.removeThrottleControl(this._imageQueueHandle),null==(r=this._resizeObserver)||r.disconnect();let i=this.painter.context.gl.getExtension("WEBGL_lose_context");i?.loseContext&&i.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new t.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,g.frame(this._frameRequest,e=>{this._frameRequest=null;try{this._render(e)}catch(e){if(!t.$(e)&&e.message!==io)throw e}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(e){this._showTileBoundaries!==e&&(this._showTileBoundaries=e,this._update())}get showPadding(){return!!this._showPadding}set showPadding(e){this._showPadding!==e&&(this._showPadding=e,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(e){this._showCollisionBoxes!==e&&(this._showCollisionBoxes=e,e?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(e){this._showOverdrawInspector!==e&&(this._showOverdrawInspector=e,this._update())}get repaint(){return!!this._repaint}set repaint(e){this._repaint!==e&&(this._repaint=e,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(e){this._vertices=e,this._update()}get version(){return h}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(e){return this._lazyInitEmptyStyle(),this.style.setProjection(e),this._update(!0)}},nV={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class nq{constructor(e,r,i=!1){this.mousedown=e=>{this.startMove(e,x.mousePos(this.element,e)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=e=>{this.move(e,x.mousePos(this.element,e))},this.mouseup=e=>{this._rotatePitchHandler.dragEnd(e),this.offTemp()},this.touchstart=e=>{1!==e.targetTouches.length?this.reset():(this._startPos=this._lastPos=x.touchPos(this.element,e.targetTouches)[0],this.startMove(e,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=e=>{1!==e.targetTouches.length?this.reset():(this._lastPos=x.touchPos(this.element,e.targetTouches)[0],this.move(e,this._lastPos))},this.touchend=e=>{0===e.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=r;let n=new i9;this._rotatePitchHandler=new i4({clickTolerance:3,move:(e,n)=>{let a=r.getBoundingClientRect(),o=new t.P((a.bottom-a.top)/2,(a.right-a.left)/2);return{bearingDelta:t.cx(new t.P(e.x,n.y),n,o),pitchDelta:i?-.5*(n.y-e.y):void 0}},moveStateManager:n,enable:!0,assignEvents:()=>{}}),this.map=e,r.addEventListener("mousedown",this.mousedown),r.addEventListener("touchstart",this.touchstart,{passive:!1}),r.addEventListener("touchcancel",this.reset)}startMove(e,t){this._rotatePitchHandler.dragStart(e,t),x.disableDrag()}move(e,t){let r=this.map,{bearingDelta:i,pitchDelta:n}=this._rotatePitchHandler.dragMove(e,t)||{};i&&r.setBearing(r.getBearing()+i),n&&r.setPitch(r.getPitch()+n)}off(){let e=this.element;e.removeEventListener("mousedown",this.mousedown),e.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),e.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){x.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}function nH(e,r,i,n=!1){if(n||!i.getCoveringTilesDetailsProvider().allowWorldCopies())return e?.wrap();let a=new t.W(e.lng,e.lat);if(e=new t.W(e.lng,e.lat),r){let n=new t.W(e.lng-360,e.lat),a=new t.W(e.lng+360,e.lat),o=i.locationToScreenPoint(e).distSqr(r);i.locationToScreenPoint(n).distSqr(r)180;){let t=i.locationToScreenPoint(e);if(t.x>=0&&t.y>=0&&t.x<=i.width&&t.y<=i.height)break;e.lng>i.center.lng?e.lng-=360:e.lng+=360}return e.lng!==a.lng&&i.isPointOnMapSurface(i.locationToScreenPoint(e))?e:a}let nG={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 nW(e,t,r){let i=e.classList;for(let e in nG)i.remove(`maplibregl-${r}-anchor-${e}`);i.add(`maplibregl-${r}-anchor-${t}`)}class nY extends t.E{constructor(e){if(super(),this._onClick=e=>{this.fire(new t.n("click",{originalEvent:e}))},this._onKeyPress=e=>{"Space"!==e.code&&"Enter"!==e.code||this.togglePopup()},this._onMapClick=e=>{let t=e.originalEvent.target,r=this._element;this._popup&&(t===r||r.contains(t))&&this.togglePopup()},this._update=e=>{if(!this._map)return;let t=this._map.loaded()&&!this._map.isMoving();e?.type!=="terrain"&&(e?.type!=="render"||t)||this._map.once("render",this._update),this._lngLat=nH(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let r="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?r=`rotateZ(${this._rotation}deg)`:"map"===this._rotationAlignment&&(r=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let i="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?i="rotateX(0deg)":"map"===this._pitchAlignment&&(i=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||e&&"moveend"!==e.type||(this._pos=this._pos.round()),this._element.style.transform=`${nG[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${i} ${r}`,g.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(e?.type==="moveend")}).catch(()=>{})},this._onMove=e=>{if(!this._isDragging){let t=this._clickTolerance||this._map._clickTolerance;this._isDragging=e.point.dist(this._pointerdownPos)>=t}this._isDragging&&(this._pos=e.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new t.n("dragstart"))),this.fire(new t.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new t.n("dragend")),this._state="inactive"},this._addDragHandler=e=>{this._element.contains(e.originalEvent.target)&&(e.preventDefault(),this._positionDelta=e.point.sub(this._pos).add(this._offset),this._pointerdownPos=e.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=e?.anchor||"center",this._color=e?.color||"#3FB1CE",this._scale=e?.scale||1,this._draggable=e?.draggable||!1,this._clickTolerance=e?.clickTolerance||0,this._subpixelPositioning=e?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=e?.rotation||0,this._rotationAlignment=e?.rotationAlignment||"auto",this._pitchAlignment=e?.pitchAlignment&&"auto"!==e.pitchAlignment?e.pitchAlignment:this._rotationAlignment,this.setOpacity(e?.opacity,e?.opacityWhenCovered),e?.element)this._element=e.element,this._offset=t.P.convert(e?.offset||[0,0]);else{this._defaultMarker=!0,this._element=x.create("div");let r=x.createNS("http://www.w3.org/2000/svg","svg");r.setAttributeNS(null,"display","block"),r.setAttributeNS(null,"height","41px"),r.setAttributeNS(null,"width","27px"),r.setAttributeNS(null,"viewBox","0 0 27 41");let i=x.createNS("http://www.w3.org/2000/svg","g");i.setAttributeNS(null,"stroke","none"),i.setAttributeNS(null,"stroke-width","1"),i.setAttributeNS(null,"fill","none"),i.setAttributeNS(null,"fill-rule","evenodd");let n=x.createNS("http://www.w3.org/2000/svg","g");n.setAttributeNS(null,"fill-rule","nonzero");let a=x.createNS("http://www.w3.org/2000/svg","g");for(let e of(a.setAttributeNS(null,"transform","translate(3.0, 29.0)"),a.setAttributeNS(null,"fill","#000000"),[{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"}])){let t=x.createNS("http://www.w3.org/2000/svg","ellipse");t.setAttributeNS(null,"opacity","0.04"),t.setAttributeNS(null,"cx","10.5"),t.setAttributeNS(null,"cy","5.80029008"),t.setAttributeNS(null,"rx",e.rx),t.setAttributeNS(null,"ry",e.ry),a.appendChild(t)}let o=x.createNS("http://www.w3.org/2000/svg","g");o.setAttributeNS(null,"fill",this._color);let s=x.createNS("http://www.w3.org/2000/svg","path");s.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),o.appendChild(s);let l=x.createNS("http://www.w3.org/2000/svg","g");l.setAttributeNS(null,"opacity","0.25"),l.setAttributeNS(null,"fill","#000000");let c=x.createNS("http://www.w3.org/2000/svg","path");c.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),l.appendChild(c);let u=x.createNS("http://www.w3.org/2000/svg","g");u.setAttributeNS(null,"transform","translate(6.0, 7.0)"),u.setAttributeNS(null,"fill","#FFFFFF");let h=x.createNS("http://www.w3.org/2000/svg","g");h.setAttributeNS(null,"transform","translate(8.0, 8.0)");let d=x.createNS("http://www.w3.org/2000/svg","circle");d.setAttributeNS(null,"fill","#000000"),d.setAttributeNS(null,"opacity","0.25"),d.setAttributeNS(null,"cx","5.5"),d.setAttributeNS(null,"cy","5.5"),d.setAttributeNS(null,"r","5.4999962");let f=x.createNS("http://www.w3.org/2000/svg","circle");f.setAttributeNS(null,"fill","#FFFFFF"),f.setAttributeNS(null,"cx","5.5"),f.setAttributeNS(null,"cy","5.5"),f.setAttributeNS(null,"r","5.4999962"),h.appendChild(d),h.appendChild(f),n.appendChild(a),n.appendChild(o),n.appendChild(l),n.appendChild(u),n.appendChild(h),r.appendChild(n),r.setAttributeNS(null,"height",41*this._scale+"px"),r.setAttributeNS(null,"width",27*this._scale+"px"),this._element.appendChild(r),this._offset=t.P.convert(e?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",e=>{e.preventDefault()}),this._element.addEventListener("mousedown",e=>{e.preventDefault()}),nW(this._element,this._anchor,"marker"),e?.className)for(let t of e.className.split(" "))this._element.classList.add(t);this._popup=null}addTo(e){return this.remove(),this._map=e,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",e._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),e.getCanvasContainer().appendChild(this._element),e.on("move",this._update),e.on("moveend",this._update),e.on("terrain",this._update),e.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.W.convert(e),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(e){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),e){if(!("offset"in e.options)){let t=Math.abs(13.5)/Math.SQRT2;e.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[t,-1*(24.6+t)],"bottom-right":[-t,-1*(24.6+t)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=e,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(e){return this._subpixelPositioning=e,this}getPopup(){return this._popup}togglePopup(){let e=this._popup;return this._element.style.opacity===this._opacityWhenCovered||e&&(e.isOpen()?e.remove():(e.setLngLat(this._lngLat),e.addTo(this._map))),this}_updateOpacity(e=!1){var r,i;let n=null==(r=this._map)?void 0:r.terrain,a=this._map.transform.isLocationOccluded(this._lngLat);if(!n||a){let e=a?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==e&&(this._element.style.opacity=e,this._element.classList.toggle("maplibregl-marker-covered",a)))}if(e)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let o=this._map,s=o.terrain.depthAtPoint(this._pos),l=o.terrain.getElevationForLngLat(this._lngLat,o.transform);if(o.transform.lngLatToCameraDepth(this._lngLat,l)-s<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let c=-this._offset.y/o.transform.pixelsPerMeter,u=Math.sin(o.getPitch()*Math.PI/180)*c,h=o.terrain.depthAtPoint(new t.P(this._pos.x,this._pos.y-this._offset.y)),d=o.transform.lngLatToCameraDepth(this._lngLat,l+u)-h>.006;null!=(i=this._popup)&&i.isOpen()&&d&&this._popup.remove(),this._element.style.opacity=d?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",d)}getOffset(){return this._offset}setOffset(e){return this._offset=t.P.convert(e),this._update(),this}addClassName(e){this._element.classList.add(e)}removeClassName(e){this._element.classList.remove(e)}toggleClassName(e){return this._element.classList.toggle(e)}setDraggable(e){return this._draggable=!!e,this._map&&(e?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(e){return this._rotation=e||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(e){return this._rotationAlignment=e||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(e){return this._pitchAlignment=e&&"auto"!==e?e:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(e,t){return(void 0===this._opacity||void 0===e&&void 0===t)&&(this._opacity="1",this._opacityWhenCovered="0.2"),void 0!==e&&(this._opacity=String(e)),void 0!==t&&(this._opacityWhenCovered=String(t)),this._map&&this._updateOpacity(!0),this}}let nZ={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},n$=0,nX=!1,nK={maxWidth:100,unit:"metric"};function nJ(e,t,r){let i=r?.maxWidth||100,n=e._container.clientHeight/2,a=e._container.clientWidth/2,o=e.unproject([a-i/2,n]),s=e.unproject([a+i/2,n]),l=Math.min(i,Math.round(e.project(s).x-e.project(o).x),e._container.clientWidth),c=o.distanceTo(s);if(r?.unit==="imperial"){let r=3.2808*c;r>5280?nQ(t,l,r/5280,e._getUIString("ScaleControl.Miles")):nQ(t,l,r,e._getUIString("ScaleControl.Feet"))}else r?.unit==="nautical"?nQ(t,l,c/1852,e._getUIString("ScaleControl.NauticalMiles")):c>=1e3?nQ(t,l,c/1e3,e._getUIString("ScaleControl.Kilometers")):nQ(t,l,c,e._getUIString("ScaleControl.Meters"))}function nQ(e,t,r,i){var n;let a,o,s,l=(a=Math.pow(10,`${Math.floor(r)}`.length-1),o=r/a,a*(o=o>=10?10:o>=5?5:o>=3?3:o>=2?2:o>=1?1:(s=Math.pow(10,Math.ceil(-Math.log(n=o)/Math.LN10)),Math.round(n*s)/s)));e.style.width=l/r*t+"px",e.innerHTML=`${l} ${i}`}let n0={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0};e.AJAXError=t.cG,e.EXTENT=t.a6,e.Event=t.n,e.Evented=t.E,e.LngLat=t.W,e.MercatorCoordinate=t.a7,e.Point=t.P,e.addProtocol=t.cH,e.config=t.c,e.removeProtocol=t.cI,e.AttributionControl=nL,e.BoxZoomHandler=i0,e.CanvasSource=ei,e.CooperativeGesturesHandler=nT,e.DoubleClickZoomHandler=ny,e.DragPanHandler=nb,e.DragRotateHandler=n_,e.EdgeInsets=th,e.FullscreenControl=class extends t.E{constructor(e={}){var r;super(),this._onFullscreenChange=()=>{var e;let t=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;null!=(e=t?.shadowRoot)&&e.fullscreenElement;)t=t.shadowRoot.fullscreenElement;t===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=null!=(r=e.pseudo)&&r,e?.container&&(e.container instanceof HTMLElement?this._container=e.container:t.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(e){return this._map=e,this._container||(this._container=this._map.getContainer()),this._controlContainer=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let e=this._fullscreenButton=x.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);x.create("span","maplibregl-ctrl-icon",e).setAttribute("aria-hidden","true"),e.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let e=this._getTitle();this._fullscreenButton.setAttribute("aria-label",e),this._fullscreenButton.title=e}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new t.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new t.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},e.GeoJSONSource=ee,e.GeolocateControl=class extends t.E{constructor(e){super(),this._onSuccess=e=>{if(this._map){if(this._isOutOfMapMaxBounds(e))return this._setErrorState(),this.fire(new t.n("outofmaxbounds",e)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=e,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(e),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(e),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new t.n("geolocate",e)),this._finish()}},this._updateCamera=e=>{let r=new t.W(e.coords.longitude,e.coords.latitude),i=e.coords.accuracy,n=this._map.getBearing(),a=t.e({bearing:n},this.options.fitBoundsOptions),o=G.fromLngLat(r,i);this._map.fitBounds(o,a,{geolocateSource:!0})},this._updateMarker=e=>{if(e){let r=new t.W(e.coords.longitude,e.coords.latitude);this._accuracyCircleMarker.setLngLat(r).addTo(this._map),this._userLocationDotMarker.setLngLat(r).addTo(this._map),this._accuracy=e.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=e=>{if(this._map){if(1===e.code){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===e.code&&nX)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new t.n("error",e)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=e=>{if(!this._map)return;let r=e?.[0]instanceof ResizeObserverEntry;e.geolocateSource||"ACTIVE_LOCK"!==this._watchState||r||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new t.n("trackuserlocationend")),this.fire(new t.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",e=>{e.preventDefault()}),this._geolocateButton=x.create("button","maplibregl-ctrl-geolocate",this._container),x.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=e=>{if(this._map){if(!1===e){t.w("Geolocation support is not available so the GeolocateControl will be disabled.");let e=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}else{let e=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=e,this._geolocateButton.setAttribute("aria-label",e)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=x.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new nY({element:this._dotElement}),this._circleElement=x.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new nY({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=t.e({},nZ,e)}onAdd(e){return this._map=e,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return t._(this,arguments,void 0,function*(e=!1){if(void 0!==n&&!e)return n;if(void 0===window.navigator.permissions)return n=!!window.navigator.geolocation;try{n="denied"!==(yield window.navigator.permissions.query({name:"geolocation"})).state}catch{n=!!window.navigator.geolocation}return n})})().then(e=>this._finishSetupUI(e)),this._container}onRemove(){void 0!==this._geolocationWatchID&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,n$=0,nX=!1}_isOutOfMapMaxBounds(e){let t=this._map.getMaxBounds(),r=e.coords;return t&&(r.longitudet.getEast()||r.latitudet.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let e=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&e))return;let t=this._map.project(e),r=this._map.unproject([t.x+100,t.y]),i=e.distanceTo(r)/100,n=2*this._accuracy/i;this._circleElement.style.width=`${n.toFixed(2)}px`,this._circleElement.style.height=`${n.toFixed(2)}px`}trigger(){if(!this._setup)return t.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new t.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":n$--,nX=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new t.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new t.n("trackuserlocationstart")),this.fire(new t.n("userlocationfocus"));break;default:throw Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw Error(`Unexpected watchState ${this._watchState}`)}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){let e;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++n$>1?(e={maximumAge:6e5,timeout:0},nX=!0):(e=this.options.positionOptions,nX=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,e)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},e.GlobeControl=class{constructor(){this._toggleProjection=()=>{var e;let t=null==(e=this._map.getProjection())?void 0:e.type;this._map.setProjection("mercator"!==t&&t?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var e;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),(null==(e=this._map.getProjection())?void 0:e.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(e){return this._map=e,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=x.create("button","maplibregl-ctrl-globe",this._container),x.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},e.Hash=ij,e.ImageSource=et,e.KeyboardHandler=nf,e.LngLatBounds=G,e.LogoControl=nP,e.Map=nU,e.MapLibreMap=nU,e.MapMouseEvent=iZ,e.MapTouchEvent=i$,e.MapWheelEvent=iX,e.Marker=nY,e.NavigationControl=class{constructor(e){this._updateZoomButtons=()=>{let e=this._map.getZoom(),t=e===this._map.getMaxZoom(),r=e===this._map.getMinZoom();this._zoomInButton.disabled=t,this._zoomOutButton.disabled=r,this._zoomInButton.setAttribute("aria-disabled",t.toString()),this._zoomOutButton.setAttribute("aria-disabled",r.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(e,t)=>{let r=this._map._getUIString(`NavigationControl.${t}`);e.title=r,e.setAttribute("aria-label",r)},this.options=t.e({},nV,e),this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",e=>e.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",e=>this._map.zoomIn({},{originalEvent:e})),x.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",e=>this._map.zoomOut({},{originalEvent:e})),x.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",e=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:e}):this._map.resetNorth({},{originalEvent:e})}),this._compassIcon=x.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(e){return this._map=e,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new nq(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(e,t){let r=x.create("button",e,this._container);return r.type="button",r.addEventListener("click",t),r}},e.Popup=class extends t.E{constructor(e){super(),this._updateOpacity=()=>{void 0!==this.options.locationOccludedOpacity&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new t.n("close"))),this),this._update=e=>{let r;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=x.create("div","maplibregl-popup",this._map.getContainer()),this._tip=x.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let e of this.options.className.split(" "))this._container.classList.add(e);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=nH(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),e&&"point"in e&&e.point&&(r=e.point),this._trackPointer&&!r)return;let i=this._flatPos=this._pos=this._trackPointer&&r?r:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&r?r:this._map.transform.locationToScreenPoint(this._lngLat));let n=this.options.anchor,a=function e(r){if(r){if("number"==typeof r){let e=Math.round(Math.abs(r)/Math.SQRT2);return{center:new t.P(0,0),top:new t.P(0,r),"top-left":new t.P(e,e),"top-right":new t.P(-e,e),bottom:new t.P(0,-r),"bottom-left":new t.P(e,-e),"bottom-right":new t.P(-e,-e),left:new t.P(r,0),right:new t.P(-r,0)}}if(r instanceof t.P||Array.isArray(r)){let e=t.P.convert(r);return{center:e,top:e,"top-left":e,"top-right":e,bottom:e,"bottom-left":e,"bottom-right":e,left:e,right:e}}return{center:t.P.convert(r.center||[0,0]),top:t.P.convert(r.top||[0,0]),"top-left":t.P.convert(r["top-left"]||[0,0]),"top-right":t.P.convert(r["top-right"]||[0,0]),bottom:t.P.convert(r.bottom||[0,0]),"bottom-left":t.P.convert(r["bottom-left"]||[0,0]),"bottom-right":t.P.convert(r["bottom-right"]||[0,0]),left:t.P.convert(r.left||[0,0]),right:t.P.convert(r.right||[0,0])}}return e(new t.P(0,0))}(this.options.offset);if(!n){var o,s,l,c,u;let e=this._container.offsetWidth,t=this._container.offsetHeight,r=(o=this.options.padding)?{top:null!=(s=o.top)?s:0,right:null!=(l=o.right)?l:0,bottom:null!=(c=o.bottom)?c:0,left:null!=(u=o.left)?u:0}:{top:0,right:0,bottom:0,left:0},h;h=i.y+a.bottom.ythis._map.transform.height-t-r.bottom?["bottom"]:[],i.xthis._map.transform.width-e/2-r.right&&h.push("right"),n=0===h.length?"bottom":h.join("-")}let h=i.add(a[n]);this.options.subpixelPositioning||(h=h.round()),this._container.style.transform=`${nG[n]} translate(${h.x}px,${h.y}px)`,nW(this._container,n,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=t.e(Object.create(n0),e)}addTo(e){return this._map&&this.remove(),this._map=e,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new t.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(e){return this._lngLat=t.W.convert(e),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(e){return this.setDOMContent(document.createTextNode(e))}setHTML(e){let t=document.createDocumentFragment(),r=document.createElement("body"),i;for(r.innerHTML=e;i=r.firstChild;)t.appendChild(i);return this.setDOMContent(t)}getMaxWidth(){var e;return null==(e=this._container)?void 0:e.style.maxWidth}setMaxWidth(e){return this.options.maxWidth=e,this._update(),this}setDOMContent(e){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=x.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(e),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(e){return this._container&&this._container.classList.add(e),this}removeClassName(e){return this._container&&this._container.classList.remove(e),this}setOffset(e){return this.options.offset=e,this._update(),this}toggleClassName(e){if(this._container)return this._container.classList.toggle(e)}setSubpixelPositioning(e){this.options.subpixelPositioning=e}setPadding(e){this.options.padding=e,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=x.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let e=this._container.querySelector("a[href], [tabindex]:not([tabindex='-1']), [contenteditable]:not([contenteditable='false']), button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled])");e&&e.focus()}},e.RasterDEMTileSource=$,e.RasterTileSource=Z,e.ScaleControl=class{constructor(e){this._onMove=()=>{nJ(this._map,this._container,this.options)},this.setUnit=e=>{this.options.unit=e,nJ(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},nK),e)}getDefaultPosition(){return"bottom-left"}onAdd(e){return this._map=e,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-scale",e.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},e.ScrollZoomHandler=ng,e.Style=t3,e.TerrainControl=class{constructor(e){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=e}onAdd(e){return this._map=e,this._container=x.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=x.create("button","maplibregl-ctrl-terrain",this._container),x.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},e.TwoFingersTouchPitchHandler=nc,e.TwoFingersTouchRotateHandler=ns,e.TwoFingersTouchZoomHandler=na,e.TwoFingersTouchZoomRotateHandler=nw,e.VectorTileSource=Y,e.VideoSource=er,e.addSourceType=(e,r)=>t._(void 0,void 0,void 0,function*(){if(ea(e))throw Error(`A source type called "${e}" already exists.`);en[e]=r}),e.clearPrewarmedResources=function(){let e=F;e&&(e.isPreloaded()&&1===e.numActive()?(e.release(D),F=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},e.createTileMesh=tL,e.getGlobalDispatcher=U,e.getMaxParallelImageRequests=function(){return t.c.MAX_PARALLEL_IMAGE_REQUESTS},e.getRTLTextPluginStatus=function(){return ec().getRTLTextPluginStatus()},e.getVersion=function(){return h},e.getWorkerCount=function(){return O.workerCount},e.getWorkerUrl=function(){return t.c.WORKER_URL},e.importScriptInWorkers=function(e){return U().broadcast("IS",e)},e.isTimeFrozen=function(){return y.isFrozen()},e.now=v,e.prewarm=function(){B().acquire(D)},e.restoreNow=function(){y.restoreNow()},e.setMaxParallelImageRequests=function(e){t.c.MAX_PARALLEL_IMAGE_REQUESTS=e},e.setNow=function(e){y.setNow(e)},e.setRTLTextPlugin=function(e,t){return ec().setRTLTextPlugin(e,t)},e.setWorkerCount=function(e){O.workerCount=e},e.setWorkerUrl=function(e){t.c.WORKER_URL=e}}),e},"object"==typeof e&&"u">typeof t?t.exports=i():(r="u">typeof globalThis?globalThis:r||self).maplibregl=i()}}),vl=p({"src/plots/map/layers.js"(e,t){var r=tv(),i=tF().sanitizeHTML,n=vt(),a=y4();function o(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=a.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var s=o.prototype;function l(e){if(!e.visible)return!1;var t=e.source;if(Array.isArray(t)&&t.length>0){for(var i=0;i0}function c(e){var t={},i={};switch(e.type){case"circle":r.extendFlat(i,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":r.extendFlat(i,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":r.extendFlat(i,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var a=e.symbol,o=n(a.textposition,a.iconsize);r.extendFlat(t,{"icon-image":a.icon,"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}),r.extendFlat(i,{"icon-color":e.color,"text-color":a.textfont.color,"text-opacity":e.opacity});break;case"raster":r.extendFlat(i,{"raster-fade-duration":0,"raster-opacity":e.opacity})}return{layout:t,paint:i}}s.update=function(e){this.visible?this.needsNewImage(e)?this.updateImage(e):this.needsNewSource(e)?(this.removeLayer(),this.updateSource(e),this.updateLayer(e)):this.needsNewLayer(e)?this.updateLayer(e):this.updateStyle(e):(this.updateSource(e),this.updateLayer(e)),this.visible=l(e)},s.needsNewImage=function(e){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===e.sourcetype&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))},s.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type},s.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},s.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},s.updateImage=function(e){this.subplot.map.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var t=this.findFollowingMapLayerId(this.lookupBelow());null!==t&&this.subplot.map.moveLayer(this.idLayer,t)},s.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,l(e)){var r,n,a,o,s,c=(a=(r=e).sourcetype,o=r.source,s={type:a},"geojson"===a?n="data":"vector"===a?n="string"==typeof o?"url":"tiles":"raster"===a?(n="tiles",s.tileSize=256):"image"===a&&(n="url",s.coordinates=r.coordinates),s[n]=o,r.sourceattribution&&(s.attribution=i(r.sourceattribution)),s);t.addSource(this.idSource,c)}},s.findFollowingMapLayerId=function(e){if("traces"===e)for(var t=this.subplot.getMapLayers(),r=0;r1)for(r=0;rt.project(e).x,_subplot:t},t.yaxis={_id:"y",c2p:e=>t.project(e).y,_subplot:t},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},o.setConvert(t.mockAxis,e)},b.initFx=function(e,t){var r=this,i=r.gd,n=r.map;function o(){l.loneUnhover(t._hoverlayer)}function s(){var e=r.getView();i.emit("plotly_relayouting",r.getViewEditsWithDerived(e))}n.on("moveend",function(e){if(r.map){var t=i._fullLayout;if(e.originalEvent||r.wheeling){var n=t[r.id];a.call("_storeDirectGUIEdit",i.layout,t._preGUI,r.getViewEdits(n));var o=r.getView();n._input.center=n.center=o.center,n._input.zoom=n.zoom=o.zoom,n._input.bearing=n.bearing=o.bearing,n._input.pitch=n.pitch=o.pitch,i.emit("plotly_relayout",r.getViewEditsWithDerived(o))}e.originalEvent&&"mouseup"===e.originalEvent.type?r.dragging=!1:r.wheeling&&(r.wheeling=!1),t&&t._rehover&&t._rehover()}}),n.on("wheel",function(){r.wheeling=!0}),n.on("mousemove",function(e){var t=r.div.getBoundingClientRect(),a=[e.originalEvent.offsetX,e.originalEvent.offsetY];e.target.getBoundingClientRect=function(){return t},r.xaxis.p2c=function(){return n.unproject(a).lng},r.yaxis.p2c=function(){return n.unproject(a).lat},i._fullLayout._rehover=function(){i._fullLayout._hoversubplot===r.id&&i._fullLayout[r.id]&&l.hover(i,e,r.id)},l.hover(i,e,r.id),i._fullLayout._hoversubplot=r.id}),n.on("dragstart",function(){r.dragging=!0,o()}),n.on("zoomstart",o),n.on("mouseout",function(){i._fullLayout._hoversubplot=null}),n.on("drag",s),n.on("zoom",s),n.on("dblclick",function(){var e=i._fullLayout[r.id];a.call("_storeDirectGUIEdit",i.layout,i._fullLayout._preGUI,r.getViewEdits(e));var t=r.viewInitial;n.setCenter(k(t.center)),n.setZoom(t.zoom),n.setBearing(t.bearing),n.setPitch(t.pitch);var o=r.getView();e._input.center=e.center=o.center,e._input.zoom=e.zoom=o.zoom,e._input.bearing=e.bearing=o.bearing,e._input.pitch=e.pitch=o.pitch,i.emit("plotly_doubleclick",null),i.emit("plotly_relayout",r.getViewEditsWithDerived(o))}),r.clearOutline=function(){m(r.dragOptions),p(r.dragOptions.gd)},r.onClickInPanFn=function(e){return function(t){var n=i._fullLayout.clickmode;n.indexOf("select")>-1&&g(t.originalEvent,i,[r.xaxis],[r.yaxis],r.id,e),n.indexOf("event")>-1&&l.click(i,t.originalEvent)}}},b.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(!t.isStatic){var a=e.dragmode,o=t.dragOptions;t.dragOptions=i.extendDeep(o||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:function(e,r){r.isRect?(e.range={})[t.id]=[l([r.xmin,r.ymin]),l([r.xmax,r.ymax])]:(e.lassoPoints={})[t.id]=r.map(l)}},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),h(a)||u(a)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(e,r,i){f(e,r,i,t.dragOptions,a)},s.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))}function l(e){var r=t.map.unproject(e);return[r.lng,r.lat]}},b.updateFramework=function(e){var t=e[this.id].domain,r=e._size,i=this.div.style;i.width=r.w*(t.x[1]-t.x[0])+"px",i.height=r.h*(t.y[1]-t.y[0])+"px",i.left=r.l+t.x[0]*r.w+"px",i.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])},b.updateLayers=function(e){var t,r=e[this.id].layers,i=this.layerList;if(r.length!==i.length){for(t=0;tvh});var vd,vf=f({"src/plots/map/get_map_fit_bounds.ts"(){vd=y(pS())}}),vp=p({"src/plots/map/layout_defaults.js"(e,t){var r=tv(),i=o9(),n=t$(),a=y6(),{getMapFitBounds:o}=(vf(),v(vu));function s(e,t,r,i){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let a=r("fitbounds");var s=r("bounds.west"),c=r("bounds.east"),u=r("bounds.south"),h=r("bounds.north");(void 0===s||void 0===c||void 0===u||void 0===h)&&delete t.bounds,n(e,t,{name:"layers",handleItemDefaults:l}),t._fitBounds=null;let{_fitView:{center:d,zoom:f}={},center:p,zoom:m}=e,g=p?.lon===d?.lon&&p?.lat===d?.lat&&m===f;if(a&&g){let e=o(i.fullData,i.id);e&&(t._fitBounds=e)}t._input=e}function l(e,t){function i(i,n){return r.coerce(e,t,a.layers,i,n)}if(i("visible")){var n,o=i("sourcetype"),s="raster"===o||"image"===o;i("source"),i("sourceattribution"),"vector"===o&&i("sourcelayer"),"image"===o&&i("coordinates"),s&&(n="raster");var l=i("type",n);s&&"raster"!==l&&(l=t.type="raster",r.log("Source types *raster* and *image* must drawn *raster* layer type.")),i("below"),i("color"),i("opacity"),i("minzoom"),i("maxzoom"),"circle"===l&&i("circle.radius"),"line"===l&&(i("line.width"),i("line.dash")),"fill"===l&&i("fill.outlinecolor"),"symbol"===l&&(i("symbol.icon"),i("symbol.iconsize"),i("symbol.text"),r.coerceFont(i,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),i("symbol.textposition"),i("symbol.placement"))}}t.exports=function(e,t,r){i(e,t,r,{type:"map",attributes:a,handleDefaults:s,partition:"y",fullData:r})}}}),vm=p({"src/plots/map/index.js"(e){var t=tv(),r=t.strTranslate,i=t.strScale,n=tI().getSubplotCalcData,a=tO(),o=T(),s=t9(),l=tF(),c=vc();e.name="map",e.attr="subplot",e.idRoot="map",e.idRegex=e.attrRegex=t.counterRegex("map"),e.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}},e.layoutAttributes=y6(),e.supplyLayoutDefaults=vp(),e.plot=function(e){for(var t=e._fullLayout,r=e.calcdata,i=t._subplots.map,a=0;av/2){var x=p.split("|").join("
");g.text(x).attr("data-unformatted",x).call(l.convertToTspans,e),y=s.bBox(g.node())}g.attr("transform",r(-3,-y.height+8)),m.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 b=1;y.width+6>v&&(b=v/(y.width+6));var _=[c.l+c.w*d.x[1],c.t+c.h*(1-d.y[0])];m.attr("transform",r(_[0],_[1])+i(b))}},e.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots.map,i=0;i=0;r--)e.removeLayer(t[r][1])},o.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var i=t[0].trace,n=new a(e,i.uid),o=n.sourceId,s=r(t),l=n.below=e.belowLookup["trace-"+i.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),n._addLayers(s,l),t[0].trace._glTrace=n,n}}}),vw=p({"src/traces/choroplethmap/index.js"(e,t){t.exports={attributes:vv(),supplyDefaults:vx(),colorbar:oo(),calc:pH(),plot:v_(),hoverPoints:pY(),eventData:pZ(),selectPoints:p$(),styleOnSelect:function(e,t){t&&t[0].trace._glTrace.updateOnSelect(t)},getBelow:function(e,t){for(var r=t.getMapLayers(),i=r.length-2;i>=0;i--){var n=r[i].id;if("string"==typeof n&&0===n.indexOf("water")){for(var a=i+1;a0?+f[u]:0),h.push({type:"Feature",geometry:{type:"Point",coordinates:y},properties:v})}}var b=a.extractOpts(t),_=b.reversescale?a.flipScale(b.colorscale):b.colorscale,w=_[0][1],T=["interpolate",["linear"],["heatmap-density"],0,1>n.opacity(w)?w:n.addOpacity(w,0)];for(u=1;u<_.length;u++)T.push(_[u][0],_[u][1]);var M=["interpolate",["linear"],["get","z"],b.min,0,b.max,1];return i.extendFlat(c.heatmap.paint,{"heatmap-weight":p?M:1/(b.max-b.min),"heatmap-color":T,"heatmap-radius":m?{type:"identity",property:"r"}:t.radius,"heatmap-opacity":t.opacity}),c.geojson={type:"FeatureCollection",features:h},c.heatmap.layout.visibility="visible",c}}}),vE=p({"src/traces/densitymap/plot.js"(e,t){var r=vS(),i=y4().traceLayerPrefix;function n(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",i+t+"-heatmap"]],this.below=null}var a=n.prototype;a.update=function(e){var t=this.subplot,i=this.layerList,n=r(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(n,a),this.below=a);for(var o=0;o=0;r--)e.removeLayer(t[r][1])},a.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},t.exports=function(e,t){var i=t[0].trace,a=new n(e,i.uid),o=a.sourceId,s=r(t),l=a.below=e.belowLookup["trace-"+i.uid];return e.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,l),a}}}),vC=p({"src/traces/densitymap/hover.js"(e,t){var r=rn(),i=vn().hoverPoints,n=vn().getExtraText;t.exports=function(e,t,a){var o=i(e,t,a);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=r.tickText(h,h.c2l(u.z),"hover").text}return s.extraText=n(c,u,l[0].t.labels),[s]}}}}),vL=p({"src/traces/densitymap/event_data.js"(e,t){t.exports=function(e,t){return e.lon=t.lon,e.lat=t.lat,e.z=t.z,e}}}),vP=p({"src/traces/densitymap/index.js"(e,t){t.exports={attributes:vM(),supplyDefaults:vk(),colorbar:oo(),formatLabels:ve(),calc:vA(),plot:vE(),hoverPoints:vC(),eventData:vL(),getBelow:function(e,t){for(var r=t.getMapLayers(),i=0;in.addOpacity(y[t%y.length],.8))),g("customdata");var v=e.link||{},x=s.newContainer(t,"link");function b(e,t){return r.coerce(v,x,i.link,e,t)}b("label"),b("arrowlen"),b("source"),b("target"),b("value"),b("line.color"),b("line.width"),b("hoverinfo",e.hoverinfo),o(v,x,b,f),b("hovertemplate"),b("sort");var _=.333>n.luminosity(h.paper_bgcolor),w=b("color",_?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)");function T(e){if(!n.isValid(e))return e;let t=n.opacity(e);return t<=.8?n.addOpacity(e,t+.2):_?n.brighten(e,10):n.adjustLightness(e,-10)}b("hovercolor",Array.isArray(w)?w.map(T):T(w)),b("customdata"),l(v,x,{name:"colorscales",handleItemDefaults:c}),a(t,h,d),d("orientation"),d("direction"),d("valueformat"),d("valuesuffix"),d("arrangement",m.x.length&&m.y.length?"freeform":void 0),r.coerceFont(d,"textfont",h.font,{autoShadowDflt:!0}),t._length=null}}}),vO=p({"node_modules/strongly-connected-components/scc.js"(e,t){t.exports=function(e){for(var t=e.length,r=Array(t),i=Array(t),n=Array(t),a=Array(t),o=Array(t),s=Array(t),l=0;l0;){var f=e[t=d[d.length-1]];if(a[t]=0&&s[t].push(o[m])}a[t]=p}else{if(i[t]===r[t]){for(var g=[],y=[],v=0,p=l.length-1;p>=0;--p){var x=l[p];if(n[x]=!1,g.push(x),y.push(s[x]),v+=s[x].length,o[x]=u.length,x===t){l.length=p;break}}u.push(g);for(var b=Array(v),p=0;px&&(x=l.source[t]),l.target[t]>x&&(x=l.target[t]);var b=x+1;e.node._count=b;var _,w=e.node.groups,T={};for(t=0;t0&&o(L,b)&&o(P,b)&&!(T.hasOwnProperty(L)&&T.hasOwnProperty(P)&&T[L]===T[P])){T.hasOwnProperty(P)&&(P=T[P]),T.hasOwnProperty(L)&&(L=T[L]),P*=1,f[L*=1]=f[P]=!0;var I="";l.label&&l.label[t]&&(I=l.label[t]);var z=null;I&&p.hasOwnProperty(I)&&(z=p[I]),c.push({pointNumber:t,label:I,color:u?l.color[t]:l.color,hovercolor:h?l.hovercolor[t]:l.hovercolor,customdata:d?l.customdata[t]:l.customdata,concentrationscale:z,source:L,target:P,value:+C}),S.push(L),E.push(P)}}var D=b+w.length,O=a(n.color),R=a(n.customdata),F=[];for(t=0;tb-1,childrenNodes:[],pointNumber:t,label:j,color:O?n.color[t]:n.color,customdata:R?n.customdata[t]:n.customdata})}var B=!1;return function(e,t,n){for(var a=i.init2dArray(e,0),o=0;o1})}(D,S,E)&&(B=!0),{circular:B,links:c,nodes:F,groups:w,groupLookup:T}}(t);return n({circular:l.circular,_nodes:l.nodes,_links:l.links,_groups:l.groups,_groupLookup:l.groupLookup})}}}),vF=p({"node_modules/d3-quadtree/dist/d3-quadtree.js"(e,t){var r;r=e,function(e){function t(e,t,r,i){if(isNaN(t)||isNaN(r))return e;var n,a,o,s,l,c,u,h,d,f=e._root,p={data:i},m=e._x0,g=e._y0,y=e._x1,v=e._y1;if(!f)return e._root=p,e;for(;f.length;)if((c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o,n=f,!(f=f[h=u<<1|c]))return n[h]=p,e;if(s=+e._x.call(null,f.data),l=+e._y.call(null,f.data),t===s&&r===l)return p.next=f,n?n[h]=p:e._root=p,e;do n=n?n[h]=[,,,,]:e._root=[,,,,],(c=t>=(a=(m+y)/2))?m=a:y=a,(u=r>=(o=(g+v)/2))?g=o:v=o;while((h=u<<1|c)==(d=(l>=o)<<1|s>=a));return n[d]=f,n[h]=p,e}function r(e,t,r,i,n){this.node=e,this.x0=t,this.y0=r,this.x1=i,this.y1=n}function i(e){return e[0]}function n(e){return e[1]}function a(e,t,r){var a=new o(t??i,r??n,NaN,NaN,NaN,NaN);return null==e?a:a.addAll(e)}function o(e,t,r,i,n,a){this._x=e,this._y=t,this._x0=r,this._y0=i,this._x1=n,this._y1=a,this._root=void 0}function s(e){for(var t={data:e.data},r=t;e=e.next;)r=r.next={data:e.data};return t}var l=a.prototype=o.prototype;l.copy=function(){var e,t,r=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return r;if(!i.length)return r._root=s(i),r;for(e=[{source:i,target:r._root=[,,,,]}];i=e.pop();)for(var n=0;n<4;++n)(t=i.source[n])&&(t.length?e.push({source:t,target:i.target[n]=[,,,,]}):i.target[n]=s(t));return r},l.add=function(e){var r=+this._x.call(null,e),i=+this._y.call(null,e);return t(this.cover(r,i),r,i,e)},l.addAll=function(e){var r,i,n,a,o=e.length,s=Array(o),l=Array(o),c=1/0,u=1/0,h=-1/0,d=-1/0;for(i=0;ih&&(h=n),ad&&(d=a));if(c>h||u>d)return this;for(this.cover(c,u).cover(h,d),i=0;ie||e>=n||i>t||t>=a;)switch((o=[,,,,])[s=(tf||(o=c.y0)>p||(s=c.x1)=v)<<1|e>=y)&&(c=m[m.length-1],m[m.length-1]=m[m.length-1-u],m[m.length-1-u]=c)}else{var x=e-this._x.call(null,g.data),b=t-this._y.call(null,g.data),_=x*x+b*b;if(_=(s=(p+g)/2))?p=s:g=s,(u=o>=(l=(m+y)/2))?m=l:y=l,t=f,!(f=f[h=u<<1|c]))return this;if(!f.length)break;(t[h+1&3]||t[h+2&3]||t[h+3&3])&&(r=t,d=h)}for(;f.data!==e;)if(i=f,!(f=f.next))return this;return(n=f.next)&&delete f.next,i?n?i.next=n:delete i.next:t?(n?t[h]=n:delete t[h],(f=t[0]||t[1]||t[2]||t[3])&&f===(t[3]||t[2]||t[1]||t[0])&&!f.length&&(r?r[d]=f:this._root=f)):this._root=n,this},l.removeAll=function(e){for(var t=0,r=e.length;ttypeof t?e:(r=r||self).d3=r.d3||{})}}),vj=p({"node_modules/d3-collection/dist/d3-collection.js"(e,t){(function(e){function t(){}function r(e,r){var i=new t;if(e instanceof t)e.each(function(e,t){i.set(t,e)});else if(Array.isArray(e)){var n,a=-1,o=e.length;if(null==r)for(;++a=l.length)return null!=e&&i.sort(e),null!=t?t(i):i;for(var s,c,h,d=-1,f=i.length,p=l[n++],m=r(),g=a();++dl.length)return r;var n,a=c[i-1];return null!=t&&i>=l.length?n=r.entries():(n=[],r.each(function(t,r){n.push({key:r,values:e(t,i)})})),null!=a?n.sort(function(e,t){return a(e.key,t.key)}):n}(u(e,0,a,o),0)},key:function(e){return l.push(e),s},sortKeys:function(e){return c[l.length-1]=e,s},sortValues:function(t){return e=t,s},rollup:function(e){return t=e,s}}},e.set=c,e.map=r,e.keys=function(e){var t=[];for(var r in e)t.push(r);return t},e.values=function(e){var t=[];for(var r in e)t.push(e[r]);return t},e.entries=function(e){var t=[];for(var r in e)t.push({key:r,value:e[r]});return t},Object.defineProperty(e,"__esModule",{value:!0})})("object"==typeof e&&"u">typeof t?e:e.d3=e.d3||{})}}),vB=p({"node_modules/d3-dispatch/dist/d3-dispatch.js"(e,t){var r;r=e,function(e){var t={value:function(){}};function r(){for(var e,t=0,r=arguments.length,n={};t=0&&(t=e.slice(r+1),e=e.slice(0,r)),e&&!i.hasOwnProperty(e))throw Error("unknown type: "+e);return{type:e,name:t}}),o=-1,s=a.length;if(arguments.length<2){for(;++o0)for(var r,i,n=Array(r),a=0;atypeof t?e:(r=r||self).d3=r.d3||{})}}),vN=p({"node_modules/d3-timer/dist/d3-timer.js"(e,t){var r;r=e,function(e){var t,r,i=0,n=0,a=0,o=0,s=0,l=0,c="object"==typeof performance&&performance.now?performance:Date,u="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function h(){return s||(u(d),s=c.now()+l)}function d(){s=0}function f(){this._call=this._time=this._next=null}function p(e,t,r){var i=new f;return i.restart(e,t,r),i}function m(){h(),++i;for(var e,r=t;r;)(e=s-r._time)>=0&&r._call.call(null,e),r=r._next;--i}function g(){s=(o=c.now())+l,i=n=0;try{m()}finally{i=0,function(){for(var e,i,n=t,a=1/0;n;)n._call?(a>n._time&&(a=n._time),e=n,n=n._next):(i=n._next,n._next=null,n=e?e._next=i:t=i);r=e,v(a)}(),s=0}}function y(){var e=c.now(),t=e-o;t>1e3&&(l-=t,o=e)}function v(e){!i&&(n&&(n=clearTimeout(n)),e-s>24?(e<1/0&&(n=setTimeout(g,e-c.now()-l)),a&&(a=clearInterval(a))):(a||(o=c.now(),a=setInterval(y,1e3)),i=1,u(g)))}f.prototype=p.prototype={constructor:f,restart:function(e,i,n){if("function"!=typeof e)throw TypeError("callback is not a function");n=(null==n?h():+n)+(null==i?0:+i),this._next||r===this||(r?r._next=this:t=this,r=this),this._call=e,this._time=n,v()},stop:function(){this._call&&(this._call=null,this._time=1/0,v())}},e.interval=function(e,t,r){var i=new f,n=t;return null==t?i.restart(e,t,r):(t*=1,r=null==r?h():+r,i.restart(function a(o){o+=n,i.restart(a,n+=t,r),e(o)},t,r)),i},e.now=h,e.timeout=function(e,t,r){var i=new f;return t=null==t?0:+t,i.restart(function(r){i.stop(),e(r+t)},t,r),i},e.timer=p,e.timerFlush=m,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),vU=p({"node_modules/d3-force/dist/d3-force.js"(e,t){var r;r=function(e,t,r,i,n){function a(e){return function(){return e}}function o(){return(Math.random()-.5)*1e-6}function s(e){return e.x+e.vx}function l(e){return e.y+e.vy}function c(e){return e.index}function u(e,t){var r=e.get(t);if(!r)throw Error("missing: "+t);return r}function h(e){return e.x}function d(e){return e.y}var f=Math.PI*(3-Math.sqrt(5));e.forceCenter=function(e,t){var r;function i(){var i,n,a=r.length,o=0,s=0;for(i=0;iu.index){var h=d-s.x-s.vx,g=f-s.y-s.vy,y=h*h+g*g;yd+c||if+c||ae.r&&(e.r=e[t].r)}function d(){if(r){var t,n,a=r.length;for(i=Array(a),t=0;t=c)){(e.data!==r||e.next)&&(0===h&&(p+=(h=o())*h),0===d&&(p+=(d=o())*d),p1?(null==r?u.remove(e):u.set(e,y(r)),t):u.get(e)},find:function(t,r,i){var n,a,o,s,l,c=0,u=e.length;for(null==i?i=1/0:i*=i,c=0;c1?(d.on(e,r),t):d.on(e)}}},e.forceX=function(e){var t,r,i,n=a(.1);function o(e){for(var n,a=0,o=t.length;atypeof t?r(e,vF(),vj(),vB(),vN()):r(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)}}),vV=p({"node_modules/d3-array/dist/d3-array.js"(e,t){var r;r=e,function(e){function t(e,t){return et?1:e>=t?0:NaN}function r(e){var r;let i=e,n=e;function a(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;0>n(e[a],t)?r=a+1:i=a}return r}return 1===e.length&&(i=(t,r)=>e(t)-r,r=e,n=(e,i)=>t(r(e),i)),{left:a,center:function(e,t,r,n){null==r&&(r=0),null==n&&(n=e.length);let o=a(e,t,r,n-1);return o>r&&i(e[o-1],t)>-i(e[o],t)?o-1:o},right:function(e,t,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r>>1;n(e[a],t)>0?i=a:r=a+1}return r}}}function i(e){return null===e?NaN:+e}let n=r(t),a=n.right,o=n.left,s=r(i).center;function l(e,t){let r=0;if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&++r;else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(n*=1)>=n&&++r}return r}function c(e){return 0|e.length}function u(e){return!(e>0)}function h(e){return"object"!=typeof e||"length"in e?e:Array.from(e)}function d(e,t){let r=0,i,n=0,a=0;if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(i=t-n,n+=i/++r,a+=i*(t-n));else{let o=-1;for(let s of e)null!=(s=t(s,++o,e))&&(s*=1)>=s&&(i=s-n,n+=i/++r,a+=i*(s-n))}if(r>1)return a/(r-1)}function f(e,t){let r=d(e,t);return r&&Math.sqrt(r)}function p(e,t){let r,i;if(void 0===t)for(let t of e)null!=t&&(void 0===r?t>=t&&(r=i=t):(r>t&&(r=t),i=a&&(r=i=a):(r>a&&(r=a),i0){for(a=e[--t];t>0&&(a=(r=a)+(i=e[--t]),!(n=i-(a-r))););t>0&&(n<0&&e[t-1]<0||n>0&&e[t-1]>0)&&(r=a+(i=2*n),i==r-a&&(a=r))}return a}}class g extends Map{constructor(e,t=w){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(let[t,r]of e)this.set(t,r)}get(e){return super.get(v(this,e))}has(e){return super.has(v(this,e))}set(e,t){return super.set(x(this,e),t)}delete(e){return super.delete(_(this,e))}}class y extends Set{constructor(e,t=w){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(let t of e)this.add(t)}has(e){return super.has(v(this,e))}add(e){return super.add(x(this,e))}delete(e){return super.delete(_(this,e))}}function v({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):r}function x({_intern:e,_key:t},r){let i=t(r);return e.has(i)?e.get(i):(e.set(i,r),r)}function _({_intern:e,_key:t},r){let i=t(r);return e.has(i)&&(r=e.get(r),e.delete(i)),r}function w(e){return null!==e&&"object"==typeof e?e.valueOf():e}function T(e){return e}function M(e,...t){return S(e,T,T,t)}function k(e,t,...r){return S(e,T,t,r)}function A(e){if(1!==e.length)throw Error("duplicate key");return e[0]}function S(e,t,r,i){return function e(n,a){if(a>=i.length)return r(n);let o=new g,s=i[a++],l=-1;for(let e of n){let t=s(e,++l,n),r=o.get(t);r?r.push(e):o.set(t,[e])}for(let[t,r]of o)o.set(t,e(r,a));return t(o)}(e,0)}function E(e,t){return Array.from(t,t=>e[t])}function C(e,...r){if("function"!=typeof e[Symbol.iterator])throw TypeError("values is not iterable");e=Array.from(e);let[i=t]=r;if(1===i.length||r.length>1){let n=Uint32Array.from(e,(e,t)=>t);return r.length>1?(r=r.map(t=>e.map(t)),n.sort((e,i)=>{for(let n of r){let r=t(n[e],n[i]);if(r)return r}})):(i=e.map(i),n.sort((e,r)=>t(i[e],i[r]))),E(e,n)}return e.sort(i)}var L=Array.prototype.slice;function P(e){return function(){return e}}var I=Math.sqrt(50),z=Math.sqrt(10),D=Math.sqrt(2);function O(e,t,r){var i,n,a,o,s=-1;if(r*=1,(e*=1)==(t*=1)&&r>0)return[e];if((i=t0){let r=Math.round(e/o),i=Math.round(t/o);for(r*ot&&--i,a=Array(n=i-r+1);++st&&--i,a=Array(n=i-r+1);++s=0?(a>=I?10:a>=z?5:a>=D?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=I?10:a>=z?5:a>=D?2:1)}function F(e,t,r){let i;for(;;){let n=R(e,t,r);if(n===i||0===n||!isFinite(n))return[e,t];n>0?(e=Math.floor(e/n)*n,t=Math.ceil(t/n)*n):n<0&&(e=Math.ceil(e*n)/n,t=Math.floor(t*n)/n),i=n}}function j(e){return Math.ceil(Math.log(l(e))/Math.LN2)+1}function B(){var e=T,t=p,r=j;function i(i){Array.isArray(i)||(i=Array.from(i));var n,o,s=i.length,l=Array(s);for(n=0;n=h)if(e>=h&&t===p){let e=R(u,h,r);isFinite(e)&&(e>0?h=(Math.floor(h/e)+1)*e:e<0&&(h=-((Math.ceil(-(h*e))+1)/e)))}else d.pop()}for(var f=d.length;d[0]<=u;)d.shift(),--f;for(;d[f-1]>h;)d.pop(),--f;var m,g=Array(f+1);for(n=0;n<=f;++n)(m=g[n]=[]).x0=n>0?d[n-1]:u,m.x1=n=t)&&(r=t);else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(r=n)&&(r=n)}return r}function U(e,t){let r;if(void 0===t)for(let t of e)null!=t&&(r>t||void 0===r&&t>=t)&&(r=t);else{let i=-1;for(let n of e)null!=(n=t(n,++i,e))&&(r>n||void 0===r&&n>=n)&&(r=n)}return r}function V(e,r,i=0,n=e.length-1,a=t){for(;n>i;){if(n-i>600){let t=n-i+1,o=r-i+1,s=Math.log(t),l=.5*Math.exp(2*s/3),c=.5*Math.sqrt(s*l*(t-l)/t)*(o-t/2<0?-1:1),u=Math.max(i,Math.floor(r-o*l/t+c)),h=Math.min(n,Math.floor(r+(t-o)*l/t+c));V(e,r,u,h,a)}let t=e[r],o=i,s=n;for(q(e,i,r),a(e[n],t)>0&&q(e,i,n);oa(e[o],t);)++o;for(;a(e[s],t)>0;)--s}0===a(e[i],t)?q(e,i,s):q(e,++s,n),s<=r&&(i=s+1),r<=s&&(n=s-1)}return e}function q(e,t,r){let i=e[t];e[t]=e[r],e[r]=i}function H(e,t,r){if(i=(e=Float64Array.from(function*(e,t){if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(yield t);else{let r=-1;for(let i of e)null!=(i=t(i,++r,e))&&(i*=1)>=i&&(yield i)}}(e,r))).length){if((t*=1)<=0||i<2)return U(e);if(t>=1)return N(e);var i,n=(i-1)*t,a=Math.floor(n),o=N(V(e,a).subarray(0,a+1));return o+(U(e.subarray(a+1))-o)*(n-a)}}function G(e,t){let r,i=-1,n=-1;if(void 0===t)for(let t of e)++n,null!=t&&(r=t)&&(r=t,i=n);else for(let a of e)null!=(a=t(a,++n,e))&&(r=a)&&(r=a,i=n);return i}function W(e,t){let r,i=-1,n=-1;if(void 0===t)for(let t of e)++n,null!=t&&(r>t||void 0===r&&t>=t)&&(r=t,i=n);else for(let a of e)null!=(a=t(a,++n,e))&&(r>a||void 0===r&&a>=a)&&(r=a,i=n);return i}function Y(e,t){return[e,t]}function Z(e,r=t){if(1===r.length)return W(e,r);let i,n=-1,a=-1;for(let t of e)++a,(n<0?0===r(t,t):0>r(t,i))&&(i=t,n=a);return n}var $=X(Math.random);function X(e){return function(t,r=0,i=t.length){let n=i-(r*=1);for(;n;){let i=e()*n--|0,a=t[n+r];t[n+r]=t[i+r],t[i+r]=a}return t}}function K(e){if(!(n=e.length))return[];for(var t=-1,r=U(e,J),i=Array(r);++tt(...e)),i=(e=e.map(h)).map(c),n=e.length-1,a=Array(n+1).fill(0),o=[];if(n<0||i.some(u))return o;for(;;){o.push(a.map((t,r)=>e[r][t]));let t=n;for(;++a[t]===i[t];){if(0===t)return r?o.map(r):o;a[t--]=0}}},e.cumsum=function(e,t){var r=0,i=0;return Float64Array.from(e,void 0===t?e=>r+=+e||0:n=>r+=+t(n,i++,e)||0)},e.descending=function(e,t){return te?1:t>=e?0:NaN},e.deviation=f,e.difference=function(e,...t){for(let r of(e=new Set(e),t))for(let t of r)e.delete(t);return e},e.disjoint=function(e,t){let r=t[Symbol.iterator](),i=new Set;for(let t of e){let e,n;if(i.has(t))return!1;for(;({value:e,done:n}=r.next())&&!n;){if(Object.is(t,e))return!1;i.add(e)}}return!0},e.every=function(e,t){if("function"!=typeof t)throw TypeError("test is not a function");let r=-1;for(let i of e)if(!t(i,++r,e))return!1;return!0},e.extent=p,e.fcumsum=function(e,t){let r=new m,i=-1;return Float64Array.from(e,void 0===t?e=>r.add(+e||0):n=>r.add(+t(n,++i,e)||0))},e.filter=function(e,t){if("function"!=typeof t)throw TypeError("test is not a function");let r=[],i=-1;for(let n of e)t(n,++i,e)&&r.push(n);return r},e.fsum=function(e,t){let r=new m;if(void 0===t)for(let t of e)(t*=1)&&r.add(t);else{let i=-1;for(let n of e)(n=+t(n,++i,e))&&r.add(n)}return+r},e.greatest=function(e,r=t){let i,n=!1;if(1===r.length){let a;for(let o of e){let e=r(o);(n?t(e,a)>0:0===t(e,e))&&(i=o,a=e,n=!0)}}else for(let t of e)(n?r(t,i)>0:0===r(t,t))&&(i=t,n=!0);return i},e.greatestIndex=function(e,r=t){if(1===r.length)return G(e,r);let i,n=-1,a=-1;for(let t of e)++a,(n<0?0===r(t,t):r(t,i)>0)&&(i=t,n=a);return n},e.group=M,e.groupSort=function(e,r,i){return(1===r.length?C(k(e,r,i),([e,r],[i,n])=>t(r,n)||t(e,i)):C(M(e,i),([e,i],[n,a])=>r(i,a)||t(e,n))).map(([e])=>e)},e.groups=function(e,...t){return S(e,Array.from,T,t)},e.histogram=B,e.index=function(e,...t){return S(e,T,A,t)},e.indexes=function(e,...t){return S(e,Array.from,A,t)},e.intersection=function(e,...t){e=new Set(e),t=t.map(Q);e:for(let r of e)for(let i of t)if(!i.has(r)){e.delete(r);continue e}return e},e.least=function(e,r=t){let i,n=!1;if(1===r.length){let a;for(let o of e){let e=r(o);(n?0>t(e,a):0===t(e,e))&&(i=o,a=e,n=!0)}}else for(let t of e)(n?0>r(t,i):0===r(t,t))&&(i=t,n=!0);return i},e.leastIndex=Z,e.map=function(e,t){if("function"!=typeof e[Symbol.iterator])throw TypeError("values is not iterable");if("function"!=typeof t)throw TypeError("mapper is not a function");return Array.from(e,(r,i)=>t(r,i,e))},e.max=N,e.maxIndex=G,e.mean=function(e,t){let r=0,i=0;if(void 0===t)for(let t of e)null!=t&&(t*=1)>=t&&(++r,i+=t);else{let n=-1;for(let a of e)null!=(a=t(a,++n,e))&&(a*=1)>=a&&(++r,i+=a)}if(r)return i/r},e.median=function(e,t){return H(e,.5,t)},e.merge=function(e){return Array.from(function*(e){for(let t of e)yield*b(t)}(e))},e.min=U,e.minIndex=W,e.nice=F,e.pairs=function(e,t=Y){let r=[],i,n=!1;for(let a of e)n&&r.push(t(i,a)),i=a,n=!0;return r},e.permute=E,e.quantile=H,e.quantileSorted=function(e,t,r=i){if(n=e.length){if((t*=1)<=0||n<2)return+r(e[0],0,e);if(t>=1)return+r(e[n-1],n-1,e);var n,a=(n-1)*t,o=Math.floor(a),s=+r(e[o],o,e);return s+(r(e[o+1],o+1,e)-s)*(a-o)}},e.quickselect=V,e.range=function(e,t,r){e*=1,t*=1,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((t-e)/r)),a=Array(n);++i=I?n*=10:a>=z?n*=5:a>=D&&(n*=2),ttypeof t?e:(r="u">typeof globalThis?globalThis:r||self).d3=r.d3||{})}}),vq=p({"node_modules/d3-path/dist/d3-path.js"(e,t){var r;r=e,function(e){var t=Math.PI,r=2*t,i=r-1e-6;function n(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function a(){return new n}n.prototype=a.prototype={constructor:n,moveTo:function(e,t){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(e,t){this._+="L"+(this._x1=+e)+","+(this._y1=+t)},quadraticCurveTo:function(e,t,r,i){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+i)},bezierCurveTo:function(e,t,r,i,n,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +i+","+(this._x1=+n)+","+(this._y1=+a)},arcTo:function(e,r,i,n,a){e*=1,r*=1,i*=1,n*=1,a*=1;var o=this._x1,s=this._y1,l=i-e,c=n-r,u=o-e,h=s-r,d=u*u+h*h;if(a<0)throw Error("negative radius: "+a);if(null===this._x1)this._+="M"+(this._x1=e)+","+(this._y1=r);else if(d>1e-6)if(Math.abs(h*l-c*u)>1e-6&&a){var f=i-o,p=n-s,m=l*l+c*c,g=Math.sqrt(m),y=Math.sqrt(d),v=a*Math.tan((t-Math.acos((m+d-(f*f+p*p))/(2*g*y)))/2),x=v/y,b=v/g;Math.abs(x-1)>1e-6&&(this._+="L"+(e+x*u)+","+(r+x*h)),this._+="A"+a+","+a+",0,0,"+ +(h*f>u*p)+","+(this._x1=e+b*l)+","+(this._y1=r+b*c)}else this._+="L"+(this._x1=e)+","+(this._y1=r)},arc:function(e,n,a,o,s,l){e*=1,n*=1,a*=1,l=!!l;var c=a*Math.cos(o),u=a*Math.sin(o),h=e+c,d=n+u,f=1^l,p=l?o-s:s-o;if(a<0)throw Error("negative radius: "+a);null===this._x1?this._+="M"+h+","+d:(Math.abs(this._x1-h)>1e-6||Math.abs(this._y1-d)>1e-6)&&(this._+="L"+h+","+d),a&&(p<0&&(p=p%r+r),p>i?this._+="A"+a+","+a+",0,1,"+f+","+(e-c)+","+(n-u)+"A"+a+","+a+",0,1,"+f+","+(this._x1=h)+","+(this._y1=d):p>1e-6&&(this._+="A"+a+","+a+",0,"+ +(p>=t)+","+f+","+(this._x1=e+a*Math.cos(s))+","+(this._y1=n+a*Math.sin(s))))},rect:function(e,t,r,i){this._+="M"+(this._x0=this._x1=+e)+","+(this._y0=this._y1=+t)+"h"+ +r+"v"+ +i+"h"+-r+"Z"},toString:function(){return this._}},e.path=a,Object.defineProperty(e,"__esModule",{value:!0})}("object"==typeof e&&"u">typeof t?e:(r=r||self).d3=r.d3||{})}}),vH=p({"node_modules/d3-shape/dist/d3-shape.js"(e,t){var r,i;r=e,i=function(e,t){function r(e){return function(){return e}}var i=Math.abs,n=Math.atan2,a=Math.cos,o=Math.max,s=Math.min,l=Math.sin,c=Math.sqrt,u=Math.PI,h=u/2,d=2*u;function f(e){return e>=1?h:e<=-1?-h:Math.asin(e)}function p(e){return e.innerRadius}function m(e){return e.outerRadius}function g(e){return e.startAngle}function y(e){return e.endAngle}function v(e){return e&&e.padAngle}function x(e,t,r,i,n,a,s){var l=e-r,u=t-i,h=(s?a:-a)/c(l*l+u*u),d=h*u,f=-h*l,p=e+d,m=t+f,g=r+d,y=i+f,v=(p+g)/2,x=(m+y)/2,b=g-p,_=y-m,w=b*b+_*_,T=n-a,M=p*y-g*m,k=(_<0?-1:1)*c(o(0,T*T*w-M*M)),A=(M*_-b*k)/w,S=(-M*b-_*k)/w,E=(M*_+b*k)/w,C=(-M*b+_*k)/w,L=A-v,P=S-x,I=E-v,z=C-x;return L*L+P*P>I*I+z*z&&(A=E,S=C),{cx:A,cy:S,x01:-d,y01:-f,x11:A*(n/T-1),y11:S*(n/T-1)}}function b(e){this._context=e}function _(e){return new b(e)}function w(e){return e[0]}function T(e){return e[1]}function M(){var e=w,i=T,n=r(!0),a=null,o=_,s=null;function l(r){var l,c,u,h=r.length,d=!1;for(null==a&&(s=o(u=t.path())),l=0;l<=h;++l)!(l=h;--d)c.point(y[d],v[d]);c.lineEnd(),c.areaEnd()}g&&(y[u]=+e(f,u,r),v[u]=+n(f,u,r),c.point(i?+i(f,u,r):y[u],a?+a(f,u,r):v[u]))}if(p)return c=null,p+""||null}function h(){return M().defined(o).curve(l).context(s)}return u.x=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),i=null,u):e},u.x0=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),u):e},u.x1=function(e){return arguments.length?(i=null==e?null:"function"==typeof e?e:r(+e),u):i},u.y=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),a=null,u):n},u.y0=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),u):n},u.y1=function(e){return arguments.length?(a=null==e?null:"function"==typeof e?e:r(+e),u):a},u.lineX0=u.lineY0=function(){return h().x(e).y(n)},u.lineY1=function(){return h().x(e).y(a)},u.lineX1=function(){return h().x(i).y(n)},u.defined=function(e){return arguments.length?(o="function"==typeof e?e:r(!!e),u):o},u.curve=function(e){return arguments.length?(l=e,null!=s&&(c=l(s)),u):l},u.context=function(e){return arguments.length?(null==e?s=c=null:c=l(s=e),u):s},u}function A(e,t){return te?1:t>=e?0:NaN}function S(e){return e}b.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(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t)}}};var E=L(_);function C(e){this._curve=e}function L(e){function t(t){return new C(e(t))}return t._curve=e,t}function P(e){var t=e.curve;return e.angle=e.x,delete e.x,e.radius=e.y,delete e.y,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function I(){return P(M().curve(E))}function z(){var e=k().curve(E),t=e.curve,r=e.lineX0,i=e.lineX1,n=e.lineY0,a=e.lineY1;return e.angle=e.x,delete e.x,e.startAngle=e.x0,delete e.x0,e.endAngle=e.x1,delete e.x1,e.radius=e.y,delete e.y,e.innerRadius=e.y0,delete e.y0,e.outerRadius=e.y1,delete e.y1,e.lineStartAngle=function(){return P(r())},delete e.lineX0,e.lineEndAngle=function(){return P(i())},delete e.lineX1,e.lineInnerRadius=function(){return P(n())},delete e.lineY0,e.lineOuterRadius=function(){return P(a())},delete e.lineY1,e.curve=function(e){return arguments.length?t(L(e)):t()._curve},e}function D(e,t){return[(t*=1)*Math.cos(e-=Math.PI/2),t*Math.sin(e)]}C.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(e,t){this._curve.point(t*Math.sin(e),-(t*Math.cos(e)))}};var O=Array.prototype.slice;function R(e){return e.source}function F(e){return e.target}function j(e){var i=R,n=F,a=w,o=T,s=null;function l(){var r,l=O.call(arguments),c=i.apply(this,l),u=n.apply(this,l);if(s||(s=r=t.path()),e(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(e){return arguments.length?(i=e,l):i},l.target=function(e){return arguments.length?(n=e,l):n},l.x=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),l):a},l.y=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),l):o},l.context=function(e){return arguments.length?(s=e??null,l):s},l}function B(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t=(t+i)/2,r,t,n,i,n)}function N(e,t,r,i,n){e.moveTo(t,r),e.bezierCurveTo(t,r=(r+n)/2,i,r,i,n)}function U(e,t,r,i,n){var a=D(t,r),o=D(t,r=(r+n)/2),s=D(i,r),l=D(i,n);e.moveTo(a[0],a[1]),e.bezierCurveTo(o[0],o[1],s[0],s[1],l[0],l[1])}var V={draw:function(e,t){var r=Math.sqrt(t/u);e.moveTo(r,0),e.arc(0,0,r,0,d)}},q={draw:function(e,t){var r=Math.sqrt(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}},H=Math.sqrt(1/3),G=2*H,W={draw:function(e,t){var r=Math.sqrt(t/G),i=r*H;e.moveTo(0,-r),e.lineTo(i,0),e.lineTo(0,r),e.lineTo(-i,0),e.closePath()}},Y=Math.sin(u/10)/Math.sin(7*u/10),Z=Math.sin(d/10)*Y,$=-Math.cos(d/10)*Y,X={draw:function(e,t){var r=Math.sqrt(.8908130915292852*t),i=Z*r,n=$*r;e.moveTo(0,-r),e.lineTo(i,n);for(var a=1;a<5;++a){var o=d*a/5,s=Math.cos(o),l=Math.sin(o);e.lineTo(l*r,-s*r),e.lineTo(s*i-l*n,l*i+s*n)}e.closePath()}},K={draw:function(e,t){var r=Math.sqrt(t),i=-r/2;e.rect(i,i,r,r)}},J=Math.sqrt(3),Q={draw:function(e,t){var r=-Math.sqrt(t/(3*J));e.moveTo(0,2*r),e.lineTo(-J*r,-r),e.lineTo(J*r,-r),e.closePath()}},ee=Math.sqrt(3)/2,et=1/Math.sqrt(12),er=(et/2+1)*3,ei={draw:function(e,t){var r=Math.sqrt(t/er),i=r/2,n=r*et,a=r*et+r,o=-i;e.moveTo(i,n),e.lineTo(i,a),e.lineTo(o,a),e.lineTo(-.5*i-ee*n,ee*i+-.5*n),e.lineTo(-.5*i-ee*a,ee*i+-.5*a),e.lineTo(-.5*o-ee*a,ee*o+-.5*a),e.lineTo(-.5*i+ee*n,-.5*n-ee*i),e.lineTo(-.5*i+ee*a,-.5*a-ee*i),e.lineTo(-.5*o+ee*a,-.5*a-ee*o),e.closePath()}},en=[V,q,W,K,X,Q,ei];function ea(){}function eo(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function es(e){this._context=e}function el(e){this._context=e}function ec(e){this._context=e}function eu(e,t){this._basis=new es(e),this._beta=t}es.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:eo(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(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);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:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},el.prototype={areaStart:ea,areaEnd:ea,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(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},ec.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(e,t){switch(e*=1,t*=1,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+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:eo(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}},eu.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i,n=e[0],a=t[0],o=e[r]-n,s=t[r]-a,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*e[l]+(1-this._beta)*(n+i*o),this._beta*t[l]+(1-this._beta)*(a+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var eh=function e(t){function r(e){return 1===t?new es(e):new eu(e,t)}return r.beta=function(t){return e(+t)},r}(.85);function ed(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function ef(e,t){this._context=e,this._k=(1-t)/6}ef.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:ed(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ed(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ep=function e(t){function r(e){return new ef(e,t)}return r.tension=function(t){return e(+t)},r}(0);function em(e,t){this._context=e,this._k=(1-t)/6}em.prototype={areaStart:ea,areaEnd:ea,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(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ed(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var eg=function e(t){function r(e){return new em(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ey(e,t){this._context=e,this._k=(1-t)/6}ey.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(e,t){switch(e*=1,t*=1,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:ed(this,e,t)}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ev=function e(t){function r(e){return new ey(e,t)}return r.tension=function(t){return e(+t)},r}(0);function ex(e,t,r){var i=e._x1,n=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,n=(n*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>1e-12){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/u}e._context.bezierCurveTo(i,n,a,o,e._x2,e._y2)}function eb(e,t){this._context=e,this._alpha=t}eb.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(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var e_=function e(t){function r(e){return t?new eb(e,t):new ef(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function ew(e,t){this._context=e,this._alpha=t}ew.prototype={areaStart:ea,areaEnd:ea,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(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var eT=function e(t){function r(e){return t?new ew(e,t):new em(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function eM(e,t){this._context=e,this._alpha=t}eM.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(e,t){if(e*=1,t*=1,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,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:ex(this,e,t)}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=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var ek=function e(t){function r(e){return t?new eM(e,t):new ey(e,0)}return r.alpha=function(t){return e(+t)},r}(.5);function eA(e){this._context=e}eA.prototype={areaStart:ea,areaEnd:ea,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e*=1,t*=1,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function eS(e,t,r){var i=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(i||n<0&&-0),o=(r-e._y1)/(n||i<0&&-0);return((a<0?-1:1)+(o<0?-1:1))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs((a*n+o*i)/(i+n)))||0}function eE(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function eC(e,t,r){var i=e._x0,n=e._y0,a=e._x1,o=e._y1,s=(a-i)/3;e._context.bezierCurveTo(i+s,n+s*t,a-s,o-s*r,a,o)}function eL(e){this._context=e}function eP(e){this._context=new eI(e)}function eI(e){this._context=e}function ez(e){this._context=e}function eD(e){var t,r,i=e.length-1,n=Array(i),a=Array(i),o=Array(i);for(n[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t=0;--t)n[t]=(o[t]-n[t+1])/a[t];for(a[i-1]=(e[i]+n[i-1])/2,t=0;t1)for(var r,i,n,a=1,o=e[t[0]],s=o.length;a=0;)r[t]=t;return r}function ej(e,t){return e[t]}function eB(e){var t=e.map(eN);return eF(e).sort(function(e,r){return t[e]-t[r]})}function eN(e){for(var t,r=-1,i=0,n=e.length,a=-1/0;++ra&&(a=t,i=r);return i}function eU(e){var t=e.map(eV);return eF(e).sort(function(e,r){return t[e]-t[r]})}function eV(e){for(var t,r=0,i=-1,n=e.length;++i=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e*=1,t*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}}this._x=e,this._y=t}},e.arc=function(){var e=p,o=m,b=r(0),_=null,w=g,T=y,M=v,k=null;function A(){var r,p,m=+e.apply(this,arguments),g=+o.apply(this,arguments),y=w.apply(this,arguments)-h,v=T.apply(this,arguments)-h,A=i(v-y),S=v>y;if(k||(k=r=t.path()),g1e-12)if(A>d-1e-12)k.moveTo(g*a(y),g*l(y)),k.arc(0,0,g,y,v,!S),m>1e-12&&(k.moveTo(m*a(v),m*l(v)),k.arc(0,0,m,v,y,S));else{var E,C,L=y,P=v,I=y,z=v,D=A,O=A,R=M.apply(this,arguments)/2,F=R>1e-12&&(_?+_.apply(this,arguments):c(m*m+g*g)),j=s(i(g-m)/2,+b.apply(this,arguments)),B=j,N=j;if(F>1e-12){var U=f(F/m*l(R)),V=f(F/g*l(R));(D-=2*U)>1e-12?(U*=S?1:-1,I+=U,z-=U):(D=0,I=z=(y+v)/2),(O-=2*V)>1e-12?(V*=S?1:-1,L+=V,P-=V):(O=0,L=P=(y+v)/2)}var q=g*a(L),H=g*l(L),G=m*a(z),W=m*l(z);if(j>1e-12){var Y,Z=g*a(P),$=g*l(P),X=m*a(I),K=m*l(I);if(A1?0:J<-1?u:Math.acos(J))/2),en=c(Y[0]*Y[0]+Y[1]*Y[1]);B=s(j,(m-en)/(ei-1)),N=s(j,(g-en)/(ei+1))}}O>1e-12?N>1e-12?(E=x(X,K,q,H,g,N,S),C=x(Z,$,G,W,g,N,S),k.moveTo(E.cx+E.x01,E.cy+E.y01),N1e-12&&D>1e-12?B>1e-12?(E=x(G,W,Z,$,m,-B,S),C=x(q,H,X,K,m,-B,S),k.lineTo(E.cx+E.x01,E.cy+E.y01),B0&&(p+=h);for(null!=t?m.sort(function(e,r){return t(g[e],g[r])}):null!=i&&m.sort(function(e,t){return i(r[e],r[t])}),s=0,c=p?(v-f*b)/p:0;s0?h*c:0)+b,g[l]={data:r[l],index:s,value:h,startAngle:y,endAngle:u,padAngle:x};return g}return s.value=function(t){return arguments.length?(e="function"==typeof t?t:r(+t),s):e},s.sortValues=function(e){return arguments.length?(t=e,i=null,s):t},s.sort=function(e){return arguments.length?(i=e,t=null,s):i},s.startAngle=function(e){return arguments.length?(n="function"==typeof e?e:r(+e),s):n},s.endAngle=function(e){return arguments.length?(a="function"==typeof e?e:r(+e),s):a},s.padAngle=function(e){return arguments.length?(o="function"==typeof e?e:r(+e),s):o},s},e.pointRadial=D,e.radialArea=z,e.radialLine=I,e.stack=function(){var e=r([]),t=eF,i=eR,n=ej;function a(r){var a,o,s=e.apply(this,arguments),l=r.length,c=s.length,u=Array(c);for(a=0;a0)for(var r,i,n,a,o,s,l=0,c=e[t[0]].length;l0?(i[0]=a,i[1]=a+=n):n<0?(i[1]=o,i[0]=o+=n):(i[0]=0,i[1]=n)},e.stackOffsetExpand=function(e,t){if((i=e.length)>0){for(var r,i,n,a=0,o=e[0].length;a0){for(var r,i=0,n=e[t[0]],a=n.length;i0&&(i=(r=e[t[0]]).length)>0){for(var r,i,n,a=0,o=1;otypeof t?i(e,vq()):i((r=r||self).d3=r.d3||{},r.d3)}}),vG=p({"node_modules/@plotly/d3-sankey/dist/@plotly/d3-sankey.js"(e,t){var r,i;r=e,i=function(e,t,r){function i(e){return e.target.depth}function n(e,t){return e.sourceLinks.length?e.depth:t-1}function a(e){return function(){return e}}function o(e,t){return l(e.source,t.source)||e.index-t.index}function s(e,t){return l(e.target,t.target)||e.index-t.index}function l(e,t){return e.y0-t.y0}function c(e){return e.value}function u(e){return e.index}function h(e){return e.nodes}function d(e){return e.links}function f(e,t){let r=e.get(t);if(!r)throw Error("missing: "+t);return r}function p({nodes:e}){for(let t of e){let e=t.y0,r=e;for(let r of t.sourceLinks)r.y0=e+r.width/2,e+=r.width;for(let e of t.targetLinks)e.y1=r+e.width/2,r+=e.width}}function m(e){return[e.source.x1,e.y0]}function g(e){return[e.target.x0,e.y1]}e.sankey=function(){let e=0,r=0,i=1,m=1,g=24,y=8,v,x=u,b=n,_,w,T=h,M=d,k=6,A=2/3;function S(){let n={nodes:T.apply(null,arguments),links:M.apply(null,arguments)};return function({nodes:e,links:t}){for(let[t,r]of e.entries())r.index=t,r.sourceLinks=[],r.targetLinks=[];let r=new Map(e.map((t,r)=>[x(t,r,e),t]));for(let[e,i]of t.entries()){i.index=e;let{source:t,target:n}=i;"object"!=typeof t&&(t=i.source=f(r,t)),"object"!=typeof n&&(n=i.target=f(r,n)),t.sourceLinks.push(i),n.targetLinks.push(i)}if(null!=w)for(let{sourceLinks:t,targetLinks:r}of e)t.sort(w),r.sort(w)}(n),function({nodes:e}){for(let r of e)r.value=void 0===r.fixedValue?Math.max(t.sum(r.sourceLinks,c),t.sum(r.targetLinks,c)):r.fixedValue}(n),function({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(let e of r)for(let{target:t}of(e.depth=n,e.sourceLinks))i.add(t);if(++n>t)throw Error("circular link");r=i,i=new Set}}(n),function({nodes:e}){let t=e.length,r=new Set(e),i=new Set,n=0;for(;r.size;){for(let e of r)for(let{source:t}of(e.height=n,e.targetLinks))i.add(t);if(++n>t)throw Error("circular link");r=i,i=new Set}}(n),function(n){let a=function({nodes:r}){let n=t.max(r,e=>e.depth)+1,a=(i-e-g)/(n-1),o=Array(n);for(let t of r){let r=Math.max(0,Math.min(n-1,Math.floor(b.call(null,t,n))));t.layer=r,t.x0=e+r*a,t.x1=t.x0+g,o[r]?o[r].push(t):o[r]=[t]}if(_)for(let e of o)e.sort(_);return o}(n);v=Math.min(y,A*(m-r)/(t.max(a,e=>e.length)-1)),function(e){let i=t.min(e,e=>(m-r-(e.length-1)*v)/t.sum(e,c));for(let t of e){let e=r;for(let r of t)for(let t of(r.y0=e,r.y1=e+r.value*i,e=r.y1+v,r.sourceLinks))t.width=t.value*i;e=(m-e+v)/(t.length+1);for(let r=0;r=0;--n){let i=e[n];for(let e of i){let r=0,i=0;for(let{target:t,value:n}of e.sourceLinks){let a=n*(t.layer-e.layer);r+=function(e,t){let r=t.y0-(t.targetLinks.length-1)*v/2;for(let{source:i,width:n}of t.targetLinks){if(i===e)break;r+=n+v}for(let{target:i,width:n}of e.sourceLinks){if(i===t)break;r-=n}return r}(e,t)*a,i+=a}if(!(i>0))continue;let n=(r/i-e.y0)*t;e.y0+=n,e.y1+=n,P(e)}void 0===_&&i.sort(l),E(i,r)}})(a,t,r),function(e,t,r){for(let i=1,n=e.length;i0))continue;let n=(r/i-e.y0)*t;e.y0+=n,e.y1+=n,P(e)}void 0===_&&n.sort(l),E(n,r)}}(a,t,r)}}(n),p(n),n}function E(e,t){let i=e.length>>1,n=e[i];L(e,n.y0-v,i-1,t),C(e,n.y1+v,i+1,t),L(e,m,e.length-1,t),C(e,r,0,t)}function C(e,t,r,i){for(;r1e-6&&(n.y0+=a,n.y1+=a),t=n.y1+v}}function L(e,t,r,i){for(;r>=0;--r){let n=e[r],a=(n.y1-t)*i;a>1e-6&&(n.y0-=a,n.y1-=a),t=n.y0-v}}function P({sourceLinks:e,targetLinks:t}){if(void 0===w){for(let{source:{sourceLinks:e}}of t)e.sort(s);for(let{target:{targetLinks:t}}of e)t.sort(o)}}return S.update=function(e){return p(e),e},S.nodeId=function(e){return arguments.length?(x="function"==typeof e?e:a(e),S):x},S.nodeAlign=function(e){return arguments.length?(b="function"==typeof e?e:a(e),S):b},S.nodeSort=function(e){return arguments.length?(_=e,S):_},S.nodeWidth=function(e){return arguments.length?(g=+e,S):g},S.nodePadding=function(e){return arguments.length?(y=v=+e,S):y},S.nodes=function(e){return arguments.length?(T="function"==typeof e?e:a(e),S):T},S.links=function(e){return arguments.length?(M="function"==typeof e?e:a(e),S):M},S.linkSort=function(e){return arguments.length?(w=e,S):w},S.size=function(t){return arguments.length?(e=r=0,i=+t[0],m=+t[1],S):[i-e,m-r]},S.extent=function(t){return arguments.length?(e=+t[0][0],i=+t[1][0],r=+t[0][1],m=+t[1][1],S):[[e,r],[i,m]]},S.iterations=function(e){return arguments.length?(k=+e,S):k},S},e.sankeyCenter=function(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?t.min(e.sourceLinks,i)-1:0},e.sankeyJustify=n,e.sankeyLeft=function(e){return e.depth},e.sankeyLinkHorizontal=function(){return r.linkHorizontal().source(m).target(g)},e.sankeyRight=function(e,t){return t-1-e.height},Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof e&&"u">typeof t?i(e,vV(),vH()):i((r=r||self).d3=r.d3||{},r.d3,r.d3)}}),vW=p({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(e,t){(function(e){function t(e,t){return et?1:e>=t?0:NaN}function r(e){var r;return 1===e.length&&(r=e,e=function(e,i){return t(r(e),i)}),{left:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;0>e(t[a],r)?i=a+1:n=a}return i},right:function(t,r,i,n){for(null==i&&(i=0),null==n&&(n=t.length);i>>1;e(t[a],r)>0?n=a:i=a+1}return i}}}var i=r(t),n=i.right,a=i.left;function o(e,t){return[e,t]}function s(e){return null===e?NaN:+e}function l(e,t){var r,i,n=e.length,a=0,o=-1,l=0,c=0;if(null==t)for(;++o1)return c/(a-1)}function c(e,t){var r=l(e,t);return r&&Math.sqrt(r)}function u(e,t){var r,i,n,a=e.length,o=-1;if(null==t){for(;++o=r)for(i=n=r;++or&&(i=r),n=r)for(i=n=r;++or&&(i=r),n=0?(a>=y?10:a>=v?5:a>=x?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(a>=y?10:a>=v?5:a>=x?2:1)}function _(e,t,r){var i=Math.abs(t-e)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),a=i/n;return a>=y?n*=10:a>=v?n*=5:a>=x&&(n*=2),t=1)return+r(e[i-1],i-1,e);var i,n=(i-1)*t,a=Math.floor(n),o=+r(e[a],a,e);return o+(r(e[a+1],a+1,e)-o)*(n-a)}}function M(e,t){var r,i,n=e.length,a=-1;if(null==t){for(;++a=r)for(i=r;++ar&&(i=r)}else for(;++a=r)for(i=r;++ar&&(i=r);return i}function k(e){if(!(n=e.length))return[];for(var t=-1,r=M(e,A),i=Array(r);++te?1:t>=e?0:NaN},e.deviation=c,e.extent=u,e.histogram=function(){var e=m,t=u,r=w;function i(i){var a,o,s=i.length,l=Array(s);for(a=0;ah;)d.pop(),--f;var p,m=Array(f+1);for(a=0;a<=f;++a)(p=m[a]=[]).x0=a>0?d[a-1]:u,p.x1=a=r)for(i=r;++ai&&(i=r)}else for(;++a=r)for(i=r;++ai&&(i=r);return i},e.mean=function(e,t){var r,i=e.length,n=i,a=-1,o=0;if(null==t)for(;++a=0;)for(t=(i=e[n]).length;--t>=0;)r[--o]=i[t];return r},e.min=M,e.pairs=function(e,t){null==t&&(t=o);for(var r=0,i=e.length-1,n=e[0],a=Array(i<0?0:i);rr(n=e[a],s)||0!==r(s,s))&&(s=n,o=a);if(0===r(s,s))return o}},e.shuffle=function(e,t,r){for(var i,n,a=(r??e.length)-(t=null==t?0:+t);a;)n=Math.random()*a--|0,i=e[a+t],e[a+t]=e[n+t],e[n+t]=i;return e},e.sum=function(e,t){var r,i=e.length,n=-1,a=0;if(null==t)for(;++n0)return[e];if((i=t0)for(e=Math.ceil(e/o),a=Array(n=Math.ceil((t=Math.floor(t/o))-e+1));++stypeof t?e:e.d3=e.d3||{})}}),vY=p({"node_modules/elementary-circuits-directed-graph/johnson.js"(e,t){var r=vO();t.exports=function(e,t){var i,n=[],a=[],o=[],s={},l=[];i=0;for(var c=e.length;i=t});for(var n,a=r(e),o=a.components.filter(function(e){return e.length>1}),s=1/0,l=0;l1||n>1)}function M(e,t,r){return e.sort(A),e.forEach(function(i,n){var a=0;if(B(i,r)&&T(i))i.circularPathData.verticalBuffer=a+i.width/2;else{for(var o,s,l=0;ls.source.column)){var c=e[l].circularPathData.verticalBuffer+e[l].width/2+t;a=c>a?c:a}i.circularPathData.verticalBuffer=a+i.width/2}}),e}function k(e,r,n,a){var o=t.min(e.links,function(e){return e.source.y0});e.links.forEach(function(e){e.circular&&(e.circularPathData={})}),M(e.links.filter(function(e){return"top"==e.circularLinkType}),r,a),M(e.links.filter(function(e){return"bottom"==e.circularLinkType}),r,a),e.links.forEach(function(t){if(t.circular){if(t.circularPathData.arcRadius=t.width+10,t.circularPathData.leftNodeBuffer=5,t.circularPathData.rightNodeBuffer=5,t.circularPathData.sourceWidth=t.source.x1-t.source.x0,t.circularPathData.sourceX=t.source.x0+t.circularPathData.sourceWidth,t.circularPathData.targetX=t.target.x0,t.circularPathData.sourceY=t.y0,t.circularPathData.targetY=t.y1,B(t,a)&&T(t))t.circularPathData.leftSmallArcRadius=10+t.width/2,t.circularPathData.leftLargeArcRadius=10+t.width/2,t.circularPathData.rightSmallArcRadius=10+t.width/2,t.circularPathData.rightLargeArcRadius=10+t.width/2,"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=t.source.y1+25+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=t.source.y0-25-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius);else{var s,l=t.source.column,c=t.circularLinkType,u=e.links.filter(function(e){return e.source.column==l&&e.circularLinkType==c});"bottom"==t.circularLinkType?u.sort(E):u.sort(S);var h=0;u.forEach(function(e,i){e.circularLinkID==t.circularLinkID&&(t.circularPathData.leftSmallArcRadius=10+t.width/2+h,t.circularPathData.leftLargeArcRadius=10+t.width/2+i*r+h),h+=e.width}),l=t.target.column,u=e.links.filter(function(e){return e.target.column==l&&e.circularLinkType==c}),"bottom"==t.circularLinkType?u.sort(L):u.sort(C),h=0,u.forEach(function(e,i){e.circularLinkID==t.circularLinkID&&(t.circularPathData.rightSmallArcRadius=10+t.width/2+h,t.circularPathData.rightLargeArcRadius=10+t.width/2+i*r+h),h+=e.width}),"bottom"==t.circularLinkType?(t.circularPathData.verticalFullExtent=Math.max(n,t.source.y1,t.target.y1)+25+t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent-t.circularPathData.rightLargeArcRadius):(t.circularPathData.verticalFullExtent=o-25-t.circularPathData.verticalBuffer,t.circularPathData.verticalLeftInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.leftLargeArcRadius,t.circularPathData.verticalRightInnerExtent=t.circularPathData.verticalFullExtent+t.circularPathData.rightLargeArcRadius)}t.circularPathData.leftInnerExtent=t.circularPathData.sourceX+t.circularPathData.leftNodeBuffer,t.circularPathData.rightInnerExtent=t.circularPathData.targetX-t.circularPathData.rightNodeBuffer,t.circularPathData.leftFullExtent=t.circularPathData.sourceX+t.circularPathData.leftLargeArcRadius+t.circularPathData.leftNodeBuffer,t.circularPathData.rightFullExtent=t.circularPathData.targetX-t.circularPathData.rightLargeArcRadius-t.circularPathData.rightNodeBuffer}t.circular?t.path="top"==(s=t).circularLinkType?"M"+s.circularPathData.sourceX+" "+s.circularPathData.sourceY+" L"+s.circularPathData.leftInnerExtent+" "+s.circularPathData.sourceY+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftSmallArcRadius+" 0 0 0 "+s.circularPathData.leftFullExtent+" "+(s.circularPathData.sourceY-s.circularPathData.leftSmallArcRadius)+" L"+s.circularPathData.leftFullExtent+" "+s.circularPathData.verticalLeftInnerExtent+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftLargeArcRadius+" 0 0 0 "+s.circularPathData.leftInnerExtent+" "+s.circularPathData.verticalFullExtent+" L"+s.circularPathData.rightInnerExtent+" "+s.circularPathData.verticalFullExtent+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightLargeArcRadius+" 0 0 0 "+s.circularPathData.rightFullExtent+" "+s.circularPathData.verticalRightInnerExtent+" L"+s.circularPathData.rightFullExtent+" "+(s.circularPathData.targetY-s.circularPathData.rightSmallArcRadius)+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightSmallArcRadius+" 0 0 0 "+s.circularPathData.rightInnerExtent+" "+s.circularPathData.targetY+" L"+s.circularPathData.targetX+" "+s.circularPathData.targetY:"M"+s.circularPathData.sourceX+" "+s.circularPathData.sourceY+" L"+s.circularPathData.leftInnerExtent+" "+s.circularPathData.sourceY+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftSmallArcRadius+" 0 0 1 "+s.circularPathData.leftFullExtent+" "+(s.circularPathData.sourceY+s.circularPathData.leftSmallArcRadius)+" L"+s.circularPathData.leftFullExtent+" "+s.circularPathData.verticalLeftInnerExtent+" A"+s.circularPathData.leftLargeArcRadius+" "+s.circularPathData.leftLargeArcRadius+" 0 0 1 "+s.circularPathData.leftInnerExtent+" "+s.circularPathData.verticalFullExtent+" L"+s.circularPathData.rightInnerExtent+" "+s.circularPathData.verticalFullExtent+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightLargeArcRadius+" 0 0 1 "+s.circularPathData.rightFullExtent+" "+s.circularPathData.verticalRightInnerExtent+" L"+s.circularPathData.rightFullExtent+" "+(s.circularPathData.targetY+s.circularPathData.rightSmallArcRadius)+" A"+s.circularPathData.rightLargeArcRadius+" "+s.circularPathData.rightSmallArcRadius+" 0 0 1 "+s.circularPathData.rightInnerExtent+" "+s.circularPathData.targetY+" L"+s.circularPathData.targetX+" "+s.circularPathData.targetY:t.path=i.linkHorizontal().source(function(e){return[e.source.x0+(e.source.x1-e.source.x0),e.y0]}).target(function(e){return[e.target.x0,e.y1]})(t)})}function A(e,t){return P(e)==P(t)?"bottom"==e.circularLinkType?E(e,t):S(e,t):P(t)-P(e)}function S(e,t){return e.y0-t.y0}function E(e,t){return t.y0-e.y0}function C(e,t){return e.y1-t.y1}function L(e,t){return t.y1-e.y1}function P(e){return e.target.column-e.source.column}function I(e){return e.target.x0-e.source.x1}function z(e,t){var r=_(e),i=I(t)/Math.tan(r);return"up"==j(e)?e.y1+i:e.y1-i}function D(e,t){var r=_(e),i=I(t)/Math.tan(r);return"up"==j(e)?e.y1-i:e.y1+i}function O(e,t,r,i){return e.y0+t>=r&&e.y1+t<=i&&(e.y0=e.y0+t,e.y1=e.y1+t,e.targetLinks.forEach(function(e){e.y1=e.y1+t}),e.sourceLinks.forEach(function(e){e.y0=e.y0+t})),e}function R(e,t,r,i){e.nodes.forEach(function(n){i&&n.y+(n.y1-n.y0)>t&&(n.y=n.y-(n.y+(n.y1-n.y0)-t));var a=e.links.filter(function(e){return r(e.source)==r(n)}),o=a.length;o>1&&a.sort(function(e,t){if(!e.circular&&!t.circular){if(e.target.column==t.target.column)return e.y1-t.y1;if(r=e,i=t,j(r)!=j(i))return e.y1-t.y1;if(e.target.column>t.target.column){var r,i,n=D(t,e);return e.y1-n}if(t.target.column>e.target.column)return D(e,t)-t.y1}return e.circular&&!t.circular?"top"==e.circularLinkType?-1:1:t.circular&&!e.circular?"top"==t.circularLinkType?1:-1:e.circular&&t.circular?e.circularLinkType===t.circularLinkType&&"top"==e.circularLinkType?e.target.column===t.target.column?e.target.y1-t.target.y1:t.target.column-e.target.column:e.circularLinkType===t.circularLinkType&&"bottom"==e.circularLinkType?e.target.column===t.target.column?t.target.y1-e.target.y1:e.target.column-t.target.column:"top"==e.circularLinkType?-1:1:void 0});var s=n.y0;a.forEach(function(e){e.y0=s+e.width/2,s+=e.width}),a.forEach(function(e,t){if("bottom"==e.circularLinkType){for(var r=t+1,i=0;r1&&i.sort(function(e,t){if(!e.circular&&!t.circular){if(e.source.column==t.source.column)return e.y0-t.y0;if(r=e,i=t,j(r)!=j(i))return e.y0-t.y0;if(t.source.column0?"up":"down"}function B(e,t){return t(e.source)==t(e.target)}e.sankeyCircular=function(){var e,i,a=0,_=0,T=1,M=1,A=24,S=g,E=o,C=y,L=v,P=32,I=2,z=null;function D(){var o,s,c={nodes:C.apply(null,arguments),links:L.apply(null,arguments)};(o=c).nodes.forEach(function(e,t){e.index=t,e.sourceLinks=[],e.targetLinks=[]}),s=r.map(o.nodes,S),o.links.forEach(function(e,t){e.index=t;var r=e.source,i=e.target;(typeof r>"u"?"undefined":l(r))!=="object"&&(r=e.source=x(s,r)),(typeof i>"u"?"undefined":l(i))!=="object"&&(i=e.target=x(s,i)),r.sourceLinks.push(e),i.targetLinks.push(e)}),function(e,t){var r=0;if(null===t){for(var i=[],a=0;ar.indexOf(e.target)&&!e.circular&&r.push(e.target)})});for(t=e.nodes,r=[],i=0;t.length;++i,t=r,r=[])t.forEach(function(e){e.height=i,e.targetLinks.forEach(function(e){0>r.indexOf(e.source)&&!e.circular&&r.push(e.source)})});e.nodes.forEach(function(e){e.column=Math.floor(E.call(null,e,i))})}(c),b(c,S),function(n,o,s){var l=r.nest().key(function(e){return e.column}).sortKeys(t.ascending).entries(n.nodes).map(function(e){return e.values});(function(r){if(i){var o,s,c,u,h,f,p,m,g,y,v,x,b=1/0;l.forEach(function(e){var t=M*i/(e.length+1);b=t0?o+25+10:o,bottom:s=s>0?s+25+10:s,left:u=u>0?u+25+10:u,right:c=c>0?c+25+10:c}),E=(f=t.max(n.nodes,function(e){return e.column}),p=T-a,m=M-_,g=p+S.right+S.left,y=m+S.top+S.bottom,v=p/g,x=m/y,a=a*v+S.left,T=0==S.right?T:T*v,_=_*x+S.top,M*=x,n.nodes.forEach(function(e){e.x0=a+e.column*((T-a-A)/f),e.x1=e.x0+A}),x);k*=E,n.links.forEach(function(e){e.width=e.value*k}),l.forEach(function(e){var t=e.length;e.forEach(function(e,i){e.depth==l.length-1&&1==t||0==e.depth&&1==t?e.y0=M/2-e.value*k:e.partOfCycle?0==w(e,r)?e.y0=M/2+i:"top"==e.circularLinkType?e.y0=_+i:e.y0=M-e.value*k-i:0==S.top||0==S.bottom?e.y0=(M-_)/t*i:e.y0=(M-_)/2-t/2+i,e.y1=e.y0+e.value*k})})})(s),g();for(var c=1,u=o;u>0;--u)(function(e,r){var i=l.length;l.forEach(function(n){var a=n.length,o=n[0].depth;n.forEach(function(n){var s;if((n.sourceLinks.length||n.targetLinks.length)&&!(n.partOfCycle&&w(n,r)>0))if(0==o&&1==a)s=n.y1-n.y0,n.y0=M/2-s/2,n.y1=M/2+s/2;else if(o==i-1&&1==a)s=n.y1-n.y0,n.y0=M/2-s/2,n.y1=M/2+s/2;else{var l=t.mean(n.sourceLinks,m),c=t.mean(n.targetLinks,p),u=((l&&c?(l+c)/2:l||c)-f(n))*e;n.y0+=u,n.y1+=u}})})})(c*=.99,s),g();function g(){l.forEach(function(t){var r,i,n,a=_,o=t.length;for(t.sort(h),n=0;n0&&(r.y0+=i,r.y1+=i),a=r.y1+e;if((i=a-e-M)>0)for(a=r.y0-=i,r.y1-=i,n=o-2;n>=0;--n)(i=(r=t[n]).y1+e-a)>0&&(r.y0-=i,r.y1-=i),a=r.y0})}}(c,P,S),j(c);for(var u=0;u<4;u++)R(c,M,S),F(c,M,S),function(e,t,r,i){e.links.forEach(function(n){if(!n.circular&&n.target.column-n.source.column>1){var a=n.source.column+1,o=n.target.column-1,s=1,l=o-a+1;for(s=1;a<=o;a++,s++)e.nodes.forEach(function(o){if(o.column==a){var c,u=s/(l+1),h=Math.pow(1-u,3),d=3*u*Math.pow(1-u,2),f=3*Math.pow(u,2)*(1-u),p=Math.pow(u,3),m=h*n.y0+d*n.y0+f*n.y1+p*n.y1,g=m-n.width/2,y=m+n.width/2;g>o.y0&&ga.y0&&n.y0a.y0&&n.y1a.y1)&&O(e,c,t,r))})):y>o.y0&&yo.y1&&O(e,c,t,r)})):go.y1&&(c=y-o.y0+10,o=O(o,c,t,r),e.nodes.forEach(function(e){i(e)==i(o)||e.column!=o.column||e.y0o.y1&&O(e,c,t,r)}))}})}})}(c,_,M,S),R(c,M,S),F(c,M,S);return function(e,r,i){var n=e.nodes,a=e.links,o=!1,s=!1;if(a.forEach(function(e){"top"==e.circularLinkType?o=!0:"bottom"==e.circularLinkType&&(s=!0)}),!1==o||!1==s){var l=t.min(n,function(e){return e.y0}),c=(i-r)/(t.max(n,function(e){return e.y1})-l);n.forEach(function(e){var t=(e.y1-e.y0)*c;e.y0=(e.y0-l)*c,e.y1=e.y0+t}),a.forEach(function(e){e.y0=(e.y0-l)*c,e.y1=(e.y1-l)*c,e.width=e.width*c})}}(c,_,M),k(c,I,M,S),c}function j(e){e.nodes.forEach(function(e){e.sourceLinks.sort(u),e.targetLinks.sort(c)}),e.nodes.forEach(function(e){var t=e.y0,r=t,i=e.y1,n=i;e.sourceLinks.forEach(function(e){e.circular?(e.y0=i-e.width/2,i-=e.width):(e.y0=t+e.width/2,t+=e.width)}),e.targetLinks.forEach(function(e){e.circular?(e.y1=n-e.width/2,n-=e.width):(e.y1=r+e.width/2,r+=e.width)})})}return D.nodeId=function(e){return arguments.length?(S="function"==typeof e?e:s(e),D):S},D.nodeAlign=function(e){return arguments.length?(E="function"==typeof e?e:s(e),D):E},D.nodeWidth=function(e){return arguments.length?(A=+e,D):A},D.nodePadding=function(t){return arguments.length?(e=+t,D):e},D.nodes=function(e){return arguments.length?(C="function"==typeof e?e:s(e),D):C},D.links=function(e){return arguments.length?(L="function"==typeof e?e:s(e),D):L},D.size=function(e){return arguments.length?(a=_=0,T=+e[0],M=+e[1],D):[T-a,M-_]},D.extent=function(e){return arguments.length?(a=+e[0][0],T=+e[1][0],_=+e[0][1],M=+e[1][1],D):[[a,_],[T,M]]},D.iterations=function(e){return arguments.length?(P=+e,D):P},D.circularLinkGap=function(e){return arguments.length?(I=+e,D):I},D.nodePaddingRatio=function(e){return arguments.length?(i=+e,D):i},D.sortNodes=function(e){return arguments.length?(z=e,D):z},D.update=function(e){return b(e,S),j(e),e.links.forEach(function(e){e.circular&&(e.circularLinkType=e.y0+e.y1typeof t?r(e,vW(),vj(),vH(),vY()):r(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)}}),v$=p({"src/traces/sankey/constants.js"(e,t){t.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),vX=p({"src/traces/sankey/render.js"(e,t){var r=vU(),i=(dE(),v(dS)).interpolateNumber,n=T(),a=vG(),o=vZ(),s=v$(),l=ee(),c=t9(),u=tv(),h=u.strTranslate,d=u.strRotate,f=yF(),p=f.keyFun,m=f.repeat,g=f.unwrap,y=tF(),x=eQ(),b=tR(),_=b.CAP_SHIFT,w=b.LINE_SPACING;function M(e,t,r){var i,n=g(t),l=n.trace,c=l.domain,h="h"===l.orientation,d="reversed"===l.direction,f=l.node.pad,p=l.node.thickness,m={justify:a.sankeyJustify,left:a.sankeyLeft,right:a.sankeyRight,center:a.sankeyCenter}[l.node.align],y=e.width*(c.x[1]-c.x[0]),v=e.height*(c.y[1]-c.y[0]),x=n._nodes,b=n._links,_=n.circular;function w(e){"input"===l[e].sort&&(_?u.warn(`Circular Sankey diagrams do not support the "input" ${e}.sort mode; falling back to the default sort.`):i[`${e}Sort`](null))}(i=_?o.sankeyCircular().circularLinkGap(0):a.sankey()).iterations(s.sankeyIterations).size(h?[y,v]:[v,y]).nodeWidth(p).nodePadding(f).nodeId(function(e){return e.pointNumber}).nodeAlign(m).nodes(x).links(b),w("link"),w("node");var T=i();for(var M in i.nodePadding()o+p&&(a+=1,t=s.x0),o=s.x0,n[a]||(n[a]=[]),n[a].push(s),r=t-s.x0,s.x0+=r,s.x1+=r}return n})(x=T.nodes).forEach(function(e){var t,r,i,n=0,a=e.length;for(e.sort(function(e,t){return e.y0-t.y0}),i=0;i=n||(r=n-t.y0)>1e-6&&(t.y0+=r,t.y1+=r),n=t.y1+f}),i.update(T)}return{circular:_,key:r,trace:l,guid:u.randstr(),horizontal:h,reversed:d,width:y,height:v,nodePad:l.node.pad,nodeLineColor:l.node.line.color,nodeLineWidth:l.node.line.width,linkLineColor:l.link.line.color,linkLineWidth:l.link.line.width,linkArrowLength:l.link.arrowlen,valueFormat:l.valueformat,valueSuffix:l.valuesuffix,textFont:l.textfont,translateX:c.x[0]*e.width+e.margin.l,translateY:e.height-c.y[1]*e.height+e.margin.t,dragParallel:h?v:y,dragPerpendicular:h?y:v,arrangement:l.arrangement,sankey:i,graph:T,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function k(e,t,r){var i=t.source.label+"|"+t.target.label;return t.trace=e.trace,t.curveNumber=e.trace.index,{circular:e.circular,key:i+"__"+r,traceId:e.key,pointNumber:t.pointNumber,link:t,rgb:l.rgb(t.color),alpha:l.parse(t.color).alpha,hoverRgb:l.rgb(t.hovercolor),hoverAlpha:l.parse(t.hovercolor).alpha,linkPath:A,linkLineColor:e.linkLineColor,linkLineWidth:e.linkLineWidth,linkArrowLength:e.linkArrowLength,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,parent:e,interactionState:e.interactionState,flow:t.flow}}function A(){return function(e){var t,r,n,a,o,s,l,c=e.linkArrowLength;if(e.link.circular)return t=e.link,r=c,n="",a=t.width/2,s=(o=t.circularPathData).sourceX+o.verticalBuffer0?" L "+o.targetX+" "+o.targetY:"")+"Z"):(n="M "+(o.targetX-r)+" "+(o.targetY-a)+" L "+(o.rightInnerExtent-r)+" "+(o.targetY-a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightSmallArcRadius+a)+" 0 0 0 "+(o.rightFullExtent-a-r)+" "+(o.targetY+o.rightSmallArcRadius)+" L "+(o.rightFullExtent-a-r)+" "+o.verticalRightInnerExtent,s&&l?n+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightInnerExtent-a-r)+" "+(o.verticalFullExtent+a)+" L "+(o.rightFullExtent+a-r-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent+a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent:s?n+=" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightFullExtent-r-a-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" L "+(o.leftFullExtent+a+(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent:n+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightInnerExtent-r)+" "+(o.verticalFullExtent+a)+" L "+o.leftInnerExtent+" "+(o.verticalFullExtent+a)+" A "+(o.leftLargeArcRadius+a)+" "+(o.leftLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+o.verticalLeftInnerExtent,n+=" L "+(o.leftFullExtent+a)+" "+(o.sourceY+o.leftSmallArcRadius)+" A "+(o.leftLargeArcRadius+a)+" "+(o.leftSmallArcRadius+a)+" 0 0 0 "+o.leftInnerExtent+" "+(o.sourceY-a)+" L "+o.sourceX+" "+(o.sourceY-a)+" L "+o.sourceX+" "+(o.sourceY+a)+" L "+o.leftInnerExtent+" "+(o.sourceY+a)+" A "+(o.leftLargeArcRadius-a)+" "+(o.leftSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent-a)+" "+(o.sourceY+o.leftSmallArcRadius)+" L "+(o.leftFullExtent-a)+" "+o.verticalLeftInnerExtent,s&&l?n+=" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.leftFullExtent-a-(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" L "+(o.rightFullExtent+a-r+(o.rightLargeArcRadius-a))+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent:s?n+=" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.leftFullExtent+a)+" "+(o.verticalFullExtent+a)+" L "+(o.rightFullExtent-r-a)+" "+(o.verticalFullExtent+a)+" A "+(o.rightLargeArcRadius+a)+" "+(o.rightLargeArcRadius+a)+" 0 0 0 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent:n+=" A "+(o.leftLargeArcRadius-a)+" "+(o.leftLargeArcRadius-a)+" 0 0 1 "+o.leftInnerExtent+" "+(o.verticalFullExtent-a)+" L "+(o.rightInnerExtent-r)+" "+(o.verticalFullExtent-a)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightLargeArcRadius-a)+" 0 0 1 "+(o.rightFullExtent+a-r)+" "+o.verticalRightInnerExtent,n+=" L "+(o.rightFullExtent+a-r)+" "+(o.targetY+o.rightSmallArcRadius)+" A "+(o.rightLargeArcRadius-a)+" "+(o.rightSmallArcRadius-a)+" 0 0 1 "+(o.rightInnerExtent-r)+" "+(o.targetY+a)+" L "+(o.targetX-r)+" "+(o.targetY+a)+(r>0?" L "+o.targetX+" "+o.targetY:"")+"Z"),n;var u=Math.abs((e.link.target.x0-e.link.source.x1)/2);c>u&&(c=u);var h=e.link.source.x1,d=e.link.target.x0-c,f=i(h,d),p=f(.5),m=f(.5),g=e.link.y0-e.link.width/2,y=e.link.y0+e.link.width/2,v=e.link.y1-e.link.width/2,x=e.link.y1+e.link.width/2,b="M"+h+","+g,_="C"+p+","+g+" "+m+","+v+" "+d+","+v,w="C"+m+","+x+" "+p+","+y+" "+h+","+y,T=c>0?"L"+(d+c)+","+(v+e.link.width/2):"";return b+_+(T+="L"+d+","+x)+w+"Z"}}function S(e,t){var r=s.nodePadAcross,i=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var n=t.dx,a=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=u.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(n),visibleHeight:a,zoneX:-r,zoneY:-i,zoneWidth:n+2*r,zoneHeight:a+2*i,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:1===t.originalLayer,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,reversed:e.reversed,rgb:l.rgb(t.color),alpha:l.parse(t.color).alpha,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function E(e){e.attr("transform",function(e){return h(e.node.x0.toFixed(3),e.node.y0.toFixed(3))})}function C(e){e.call(E)}function L(e,t){e.call(C),t.attr("d",A())}function P(e){e.attr("width",function(e){return e.node.x1-e.node.x0}).attr("height",function(e){return e.visibleHeight})}function I(e){return e.link.width>1||e.linkLineWidth>0}function z(e){return e.horizontal?e.reversed?h(e.translateX+e.width,e.translateY)+"matrix(-1 0 0 1 0 0)":h(e.translateX,e.translateY)+"matrix(1 0 0 1 0 0)":e.reversed?h(e.translateX,e.translateY+e.height)+"matrix(0 -1 1 0 0 0)":h(e.translateX,e.translateY)+"matrix(0 1 1 0 0 0)"}function D(e,t,r){e.on(".basic",null).on("mouseover.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.hover(this,e,t),e.interactionState.hovered=[this,e])}).on("mousemove.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.follow(this,e),e.interactionState.hovered=[this,e])}).on("mouseout.basic",function(e){e.interactionState.dragInProgress||e.partOfGroup||(r.unhover(this,e,t),e.interactionState.hovered=!1)}).on("click.basic",function(e){e.interactionState.hovered&&(r.unhover(this,e,t),e.interactionState.hovered=!1),e.interactionState.dragInProgress||e.partOfGroup||r.select(this,e,t)})}function O(e,t,i,a){var o=n.behavior.drag().origin(function(e){return{x:e.node.x0+e.visibleWidth/2,y:e.node.y0+e.visibleHeight/2}}).on("dragstart",function(n){if("fixed"!==n.arrangement&&(u.ensureSingle(a._fullLayout._infolayer,"g","dragcover",function(e){a._fullLayout._dragCover=e}),u.raiseToTop(this),n.interactionState.dragInProgress=n.node,F(n.node),n.interactionState.hovered&&(i.nodeEvents.unhover.apply(0,n.interactionState.hovered),n.interactionState.hovered=!1),"snap"===n.arrangement)){var o,l,c,h,d,f=n.traceId+"|"+n.key;n.forceLayouts[f]?n.forceLayouts[f].alpha(1):function(e,t,i){for(var n,a,o,l=i.graph.nodes,c=0;c0&&o.forceLayouts[n].alpha(0)})).stop()}(e,f,n),o=e,l=t,c=n,h=f,d=a,window.requestAnimationFrame(function e(){for(t=0;t0)window.requestAnimationFrame(e);else{var t,r=c.node.originalX;c.node.x0=r-c.visibleWidth/2,c.node.x1=r+c.visibleWidth/2,R(c,d)}})}}).on("drag",function(r){if("fixed"!==r.arrangement){var i=n.event.x,a=n.event.y;"snap"===r.arrangement?(r.node.x0=i-r.visibleWidth/2,r.node.x1=i+r.visibleWidth/2):("freeform"===r.arrangement&&(r.node.x0=i-r.visibleWidth/2,r.node.x1=i+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,F(r.node),"snap"!==r.arrangement&&(r.sankey.update(r.graph),L(e.filter(j(r)),t))}}).on("dragend",function(e){if("fixed"!==e.arrangement){e.interactionState.dragInProgress=!1;for(var t=0;tI(e)?l.rgb(e.linkLineColor):e.rgb).style("stroke-opacity",e=>I(e)?l.opacity(e.linkLineColor):e.alpha).style("fill",e=>e.rgb).style("fill-opacity",e=>e.alpha).style("stroke-width",e=>I(e)?e.linkLineWidth:1).attr("d",A()),C.style("opacity",function(){return e._context.staticPlot||f||v?1:0}).transition().ease(s.ease).duration(s.duration).style("opacity",1),C.exit().transition().ease(s.ease).duration(s.duration).style("opacity",0).remove();var L=b.selectAll("."+s.cn.sankeyNodeSet).data(m,p);L.enter().append("g").classed(s.cn.sankeyNodeSet,!0),L.style("cursor",function(e){switch(e.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var R=L.selectAll("."+s.cn.sankeyNode).data(function(e){var t=e.graph.nodes;return function(e){var t,r=[];for(t=0;te.rgb).style("fill-opacity",e=>e.alpha),F.transition().ease(s.ease).duration(s.duration).call(P);var j=R.selectAll("."+s.cn.nodeLabel).data(m);j.enter().append("text").classed(s.cn.nodeLabel,!0).style("cursor","default"),j.attr("data-notex",1).text(function(e){return e.node.label}).each(function(t){var r=n.select(this);c.font(r,t.textFont),y.convertToTspans(r,e)}).attr("text-anchor",function(e){return e.horizontal&&e.left!==e.reversed?"end":"start"}).attr("transform",function(e){var t=n.select(this),r=y.lineCount(t),i=e.textFont.size*((r-1)*w-_),a=e.nodeLineWidth/2+3;if(!e.horizontal){var o=e.reversed?(e.visibleWidth+i)/2:(e.visibleWidth-i)/2,s=e.reversed?d(90):"scale(-1,1)"+d(90);return h(o,a)+s}var l=a,o=(e.visibleHeight-i)/2;return e.left?l=-l:l+=e.visibleWidth,h(l,o)+(e.reversed?"scale(-1,1)":"")}),j.transition().ease(s.ease).duration(s.duration)}}}),vK=p({"src/traces/sankey/plot.js"(e,t){var r=T(),i=tv(),n=i.numberFormat,a=vX(),o=rD(),s=ee(),l=v$().cn,c=i._;function u(e){return""!==e}function h(e,t){return e.filter(function(e){return e.key===t.traceId})}function d(e,t){r.select(e).select("path").style("fill-opacity",t),r.select(e).select("rect").style("fill-opacity",t)}function f(e){r.select(e).select("text.name").style("fill","black")}function p(e){return function(t){return -1!==e.node.sourceLinks.indexOf(t.link)||-1!==e.node.targetLinks.indexOf(t.link)}}function m(e){return function(t){return -1!==t.node.sourceLinks.indexOf(e.link)||-1!==t.node.targetLinks.indexOf(e.link)}}function g(e,t,r){t&&r&&h(r,t).selectAll("."+l.sankeyLink).filter(p(t)).call(v.bind(0,t,r,!1))}function y(e,t,r){t&&r&&h(r,t).selectAll("."+l.sankeyLink).filter(p(t)).call(x.bind(0,t,r,!1))}function v(e,t,r,i){i.style("fill",function(e){if(!e.link.concentrationscale)return e.hoverRgb}).style("fill-opacity",function(e){if(!e.link.concentrationscale)return e.hoverAlpha}),i.each(function(r){var i=r.link.label;""!==i&&h(t,e).selectAll("."+l.sankeyLink).filter(function(e){return e.link.label===i}).style("fill",function(e){if(!e.link.concentrationscale)return e.hoverRgb}).style("fill-opacity",function(e){if(!e.link.concentrationscale)return e.hoverAlpha})}),r&&h(t,e).selectAll("."+l.sankeyNode).filter(m(e)).call(g)}function x(e,t,r,i){i.style("fill",function(e){return e.rgb}).style("fill-opacity",function(e){return e.alpha}),i.each(function(r){var i=r.link.label;""!==i&&h(t,e).selectAll("."+l.sankeyLink).filter(function(e){return e.link.label===i}).style("fill",e=>e.rgb).style("fill-opacity",e=>e.alpha)}),r&&h(t,e).selectAll(l.sankeyNode).filter(m(e)).call(y)}function b(e,t){var r=e.hoverlabel||{},n=i.nestedProperty(r,t).get();return!Array.isArray(n)&&n}t.exports=function(e,t){for(var i=e._fullLayout,h=i._paper,p=i._size,m=0;m"),color:b(l,"bgcolor")||s.addOpacity(m.color,1),borderColor:b(l,"bordercolor"),fontFamily:b(l,"font.family"),fontSize:b(l,"font.size"),fontColor:b(l,"font.color"),fontWeight:b(l,"font.weight"),fontStyle:b(l,"font.style"),fontVariant:b(l,"font.variant"),fontTextcase:b(l,"font.textcase"),fontLineposition:b(l,"font.lineposition"),fontShadow:b(l,"font.shadow"),nameLength:b(l,"namelength"),textAlign:b(l,"align"),idealAlign:r.event.x"),color:b(s,"bgcolor")||a.rgb,borderColor:b(s,"bordercolor"),fontFamily:b(s,"font.family"),fontSize:b(s,"font.size"),fontColor:b(s,"font.color"),fontWeight:b(s,"font.weight"),fontStyle:b(s,"font.style"),fontVariant:b(s,"font.variant"),fontTextcase:b(s,"font.textcase"),fontLineposition:b(s,"font.lineposition"),fontShadow:b(s,"font.shadow"),nameLength:b(s,"namelength"),textAlign:b(s,"align"),idealAlign:"left",hovertemplate:s.hovertemplate,hovertemplateLabels:v,eventData:[a.node]},{container:i._hoverlayer.node(),outerContainer:i._paper.node(),gd:e});d(w,.85),f(w)}}},unhover:function(t,n,a){!1!==e._fullLayout.hovermode&&(r.select(t).call(y,n,a),"skip"!==n.node.trace.node.hoverinfo&&(n.node.fullData=n.node.trace,e.emit("plotly_unhover",{event:r.event,points:[n.node]})),o.loneUnhover(i._hoverlayer.node()))},select:function(t,i,n){var a=i.node;a.originalEvent=r.event,e._hoverdata=[a],r.select(t).call(y,i,n),o.click(e,{target:!0})}}})}}}),vJ=p({"src/traces/sankey/base_plot.js"(e){var t=eq().overrideAll,r=tI().getModuleCalcData,i=vK(),n=W(),a=rf(),o=rd(),s=iM().prepSelect,l=tv(),c=eQ(),u="sankey";e.name=u,e.baseLayoutAttrOverrides=t({hoverlabel:n.hoverlabel},"plot","nested"),e.plot=function(t){var n=r(t.calcdata,u)[0];i(t,n),e.updateFx(t)},e.clean=function(e,t,r,i){var n=i._has&&i._has(u),a=t._has&&t._has(u);n&&!a&&(i._paperdiv.selectAll(".sankey").remove(),i._paperdiv.selectAll(".bgsankey").remove())},e.updateFx=function(e){for(var t=0;t0}function M(e){e.each(function(e){y.stroke(r.select(this),e.line.color)}).each(function(e){y.fill(r.select(this),e.color)}).style("stroke-width",function(e){return e.line.width})}function k(e,t,r){var i=e._fullLayout,n=a.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),o={type:"linear",_id:"x"+t._id},s={letter:"x",font:i.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function l(e,t){return a.coerce(n,o,g,e,t)}return p(n,o,l,s,i),m(n,o,l,s),o}function A(e,t,r){return[Math.min(t/e.width,r/e.height),e,t+"x"+r]}function S(e,t,i,n){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),o=r.select(a);return o.text(e).attr("x",0).attr("y",0).attr("text-anchor",i).attr("data-unformatted",e).call(d.convertToTspans,n).call(u.font,t),u.bBox(o.node())}function E(e,t,r,i,n,o){var s="_cache"+t;e[s]&&e[s].key===n||(e[s]={key:n,value:r});var l=a.aggNums(o,null,[e[s].value,i],2);return e[s].value=l,l}t.exports=function(e,t,p,m){var g,v=e._fullLayout;w(p)&&m&&(g=m()),a.makeTraceGroups(v._indicatorlayer,t,"trace").each(function(t){var m,T,C,L,P,I=t[0].trace,z=r.select(this),D=I._hasGauge,O=I._isAngular,R=I._isBullet,F=I.domain,j={w:v._size.w*(F.x[1]-F.x[0]),h:v._size.h*(F.y[1]-F.y[0]),l:v._size.l+v._size.w*F.x[0],r:v._size.r+v._size.w*(1-F.x[1]),t:v._size.t+v._size.h*(1-F.y[1]),b:v._size.b+v._size.h*F.y[0]},B=j.l+j.w/2,N=j.t+j.h/2,U=Math.min(j.w/2,j.h),V=h.innerRadius*U,q=I.align||"center";if(L=N,D){if(O&&(C=B,L=N+U/2,P=function(e){var t,r;return t=e,[(r=.9*V)/Math.sqrt(t.width/2*(t.width/2)+t.height*t.height),t,r]}),R){var H=h.bulletPadding,G=1-h.bulletNumberDomainSize+H;C=j.l+(G+(1-G)*b[q])*j.w,P=function(e){return A(e,(h.bulletNumberDomainSize-H)*j.w,j.h)}}}else C=j.l+b[q]*j.w,P=function(e){return A(e,j.w,j.h)};(function(e,t,i,l){var c,h,p,m=i[0].trace,g=l.numbersX,v=l.numbersY,T=m.align||"center",M=x[T],A=l.transitionOpts,C=l.onComplete,L=a.ensureSingle(t,"g","numbers"),P=[];m._hasNumber&&P.push("number"),m._hasDelta&&(P.push("delta"),"left"===m.delta.position&&P.reverse());var I=L.selectAll("text").data(P);function z(t,r,i,n){if(!t.match("s")||i>=0==n>=0||r(i).slice(-1).match(_)||r(n).slice(-1).match(_))return r;var a=k(e,{tickformat:t.slice().replace("s","f").replace(/\d+/,function(e){return parseInt(e)-1})});return function(e){return 1>Math.abs(e)?f.tickText(a,e).text:r(e)}}I.enter().append("text"),I.attr("text-anchor",function(){return M}).attr("class",function(e){return e}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),I.exit().remove();var D,O=m.mode+m.align;if(m._hasDelta&&(D=function(){var t=k(e,{tickformat:m.delta.valueformat},m._range);t.setScale(),f.prepTicks(t);var a=function(e){return f.tickText(t,e).text},o=m.delta.suffix,s=m.delta.prefix,l=function(e){return m.delta.relative?e.relativeDelta:e.delta},c=function(e,t){return 0===e||"number"!=typeof e||isNaN(e)?"-":(e>0?m.delta.increasing.symbol:m.delta.decreasing.symbol)+s+t(e)+o},p=function(e){return e.delta>=0?m.delta.increasing.color:m.delta.decreasing.color};void 0===m._deltaLastValue&&(m._deltaLastValue=l(i[0]));var g=L.select("text.delta");function v(){g.text(c(l(i[0]),a)).call(y.fill,p(i[0])).call(d.convertToTspans,e)}return g.call(u.font,m.delta.font).call(y.fill,p({delta:m._deltaLastValue})),w(A)?g.transition().duration(A.duration).ease(A.easing).tween("text",function(){var e=r.select(this),t=l(i[0]),o=m._deltaLastValue,s=z(m.delta.valueformat,a,o,t),u=n(o,t);return m._deltaLastValue=t,function(t){e.text(c(u(t),s)),e.call(y.fill,p({delta:u(t)}))}}).each("end",function(){v(),C&&C()}).each("interrupt",function(){v(),C&&C()}):v(),h=S(c(l(i[0]),a),m.delta.font,M,e),g}(),O+=m.delta.position+m.delta.font.size+m.delta.font.family+m.delta.valueformat,O+=m.delta.increasing.symbol+m.delta.decreasing.symbol,p=h),m._hasNumber&&(function(){var t=k(e,{tickformat:m.number.valueformat},m._range);t.setScale(),f.prepTicks(t);var a=function(e){return f.tickText(t,e).text},o=m.number.suffix,s=m.number.prefix,l=L.select("text.number");function h(){var t="number"==typeof i[0].y?s+a(i[0].y)+o:"-";l.text(t).call(u.font,m.number.font).call(d.convertToTspans,e)}w(A)?l.transition().duration(A.duration).ease(A.easing).each("end",function(){h(),C&&C()}).each("interrupt",function(){h(),C&&C()}).attrTween("text",function(){var e=r.select(this),t=n(i[0].lastY,i[0].y);m._lastValue=i[0].y;var l=z(m.number.valueformat,a,i[0].lastY,i[0].y);return function(r){e.text(s+l(t(r))+o)}}):h(),c=S(s+a(i[0].y)+o,m.number.font,M,e)}(),O+=m.number.font.size+m.number.font.family+m.number.valueformat+m.number.suffix+m.number.prefix,p=c),m._hasDelta&&m._hasNumber){var R,F,j=[(c.left+c.right)/2,(c.top+c.bottom)/2],B=[(h.left+h.right)/2,(h.top+h.bottom)/2],N=.75*m.delta.font.size;"left"===m.delta.position&&(R=E(m,"deltaPos",0,-1*(c.width*b[m.align]+h.width*(1-b[m.align])+N),O,Math.min),F=j[1]-B[1],p={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:h.left+R,right:c.right,top:Math.min(c.top,h.top+F),bottom:Math.max(c.bottom,h.bottom+F)}),"right"===m.delta.position&&(R=E(m,"deltaPos",0,c.width*(1-b[m.align])+h.width*b[m.align]+N,O,Math.max),F=j[1]-B[1],p={width:c.width+h.width+N,height:Math.max(c.height,h.height),left:c.left,right:h.right+R,top:Math.min(c.top,h.top+F),bottom:Math.max(c.bottom,h.bottom+F)}),"bottom"===m.delta.position&&(R=null,F=h.height,p={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height,bottom:c.bottom+h.height}),"top"===m.delta.position&&(R=null,F=c.top,p={width:Math.max(c.width,h.width),height:c.height+h.height,left:Math.min(c.left,h.left),right:Math.max(c.right,h.right),top:c.bottom-c.height-h.height,bottom:c.bottom}),D.attr({dx:R,dy:F})}(m._hasNumber||m._hasDelta)&&L.attr("transform",function(){var e=l.numbersScaler(p);O+=e[2];var t,r=E(m,"numbersScale",1,e[0],O,Math.min);m._scaleNumbers||(r=1),t=m._isAngular?v-r*p.bottom:v-r*(p.top+p.bottom)/2,m._numbersTop=r*p.top+t;var i=p[T];"center"===T&&(i=(p.left+p.right)/2);var n=g-r*i;return s(n=E(m,"numbersTranslate",0,n,O,Math.max),t)+o(r)})})(e,z,t,{numbersX:C,numbersY:L,numbersScaler:P,transitionOpts:p,onComplete:g}),D&&(m={range:I.gauge.axis.range,color:I.gauge.bgcolor,line:{color:I.gauge.bordercolor,width:0},thickness:1},T={range:I.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:I.gauge.bordercolor,width:I.gauge.borderwidth},thickness:1});var W=z.selectAll("g.angular").data(O?t:[]);W.exit().remove();var Y=z.selectAll("g.angularaxis").data(O?t:[]);Y.exit().remove(),O&&function(e,t,n){var a,o,u,h,d,p,m=t[0].trace,g=n.size,y=n.radius,v=n.innerRadius,x=n.gaugeBg,b=n.gaugeOutline,_=[g.l+g.w/2,g.t+g.h/2+y/2],T=n.gauge,A=n.layer,S=n.transitionOpts,E=n.onComplete,C=Math.PI/2;function L(e){var t=m.gauge.axis.range[0],r=(e-t)/(m.gauge.axis.range[1]-t)*Math.PI-C;return r<-C?-C:r>C?C:r}function P(e){return r.svg.arc().innerRadius((v+y)/2-e/2*(y-v)).outerRadius((v+y)/2+e/2*(y-v)).startAngle(-C)}function I(e){e.attr("d",function(e){return P(e.thickness).startAngle(L(e.range[0])).endAngle(L(e.range[1]))()})}T.enter().append("g").classed("angular",!0),T.attr("transform",s(_[0],_[1])),A.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),A.selectAll("g.xangularaxistick,path,text").remove(),(h=k(e,m.gauge.axis)).type="linear",h.range=m.gauge.axis.range,h._id="xangularaxis",h.ticklabeloverflow="allow",h.setScale();var z=function(e){return(h.range[0]-e.x)/(h.range[1]-h.range[0])*Math.PI+Math.PI},D={},O=f.makeLabelFns(h,0).labelStandoff;D.xFn=function(e){return Math.cos(z(e))*O},D.yFn=function(e){var t=z(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(O+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*c)},D.anchorFn=function(e){var t=Math.cos(z(e));return .1>Math.abs(t)?"middle":t>0?"start":"end"},D.heightFn=function(e,t,r){return -.5*(1+Math.sin(z(e)))*r};var R=function(e){return s(_[0]+y*Math.cos(e),_[1]-y*Math.sin(e))};if(d=f.calcTicks(h),p=f.getTickSigns(h)[2],h.visible){p="inside"===h.ticks?-1:1;var F=(h.linewidth||1)/2;f.drawTicks(e,h,{vals:d,layer:A,path:"M"+p*F+",0h"+p*h.ticklen,transFn:function(e){var t=z(e);return R(t)+"rotate("+-l(t)+")"}}),f.drawLabels(e,h,{vals:d,layer:A,transFn:function(e){return R(z(e))},labelFns:D})}var j=[x].concat(m.gauge.steps),B=T.selectAll("g.bg-arc").data(j);B.enter().append("g").classed("bg-arc",!0).append("path"),B.select("path").call(I).call(M),B.exit().remove();var N=P(m.gauge.bar.thickness),U=T.selectAll("g.value-arc").data([m.gauge.bar]);U.enter().append("g").classed("value-arc",!0).append("path");var V=U.select("path");w(S)?(V.transition().duration(S.duration).ease(S.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()}).attrTween("d",(a=N,o=L(t[0].lastY),u=L(t[0].y),function(){var e=i(o,u);return function(t){return a.endAngle(e(t))()}})),m._lastValue=t[0].y):V.attr("d","number"==typeof t[0].y?N.endAngle(L(t[0].y)):"M0,0Z"),V.call(M),U.exit().remove(),j=[];var q=m.gauge.threshold.value;(q||0===q)&&j.push({range:[q,q],color:m.gauge.threshold.color,line:{color:m.gauge.threshold.line.color,width:m.gauge.threshold.line.width},thickness:m.gauge.threshold.thickness});var H=T.selectAll("g.threshold-arc").data(j);H.enter().append("g").classed("threshold-arc",!0).append("path"),H.select("path").call(I).call(M),H.exit().remove();var G=T.selectAll("g.gauge-outline").data([b]);G.enter().append("g").classed("gauge-outline",!0).append("path"),G.select("path").call(I).call(M),G.exit().remove()}(e,t,{radius:U,innerRadius:V,gauge:W,layer:Y,size:j,gaugeBg:m,gaugeOutline:T,transitionOpts:p,onComplete:g});var Z=z.selectAll("g.bullet").data(R?t:[]);Z.exit().remove();var $=z.selectAll("g.bulletaxis").data(R?t:[]);$.exit().remove(),R&&function(e,t,r){var i,n,a,o,l,c=t[0].trace,u=r.gauge,d=r.layer,p=r.gaugeBg,m=r.gaugeOutline,g=r.size,v=c.domain,x=r.transitionOpts,b=r.onComplete;u.enter().append("g").classed("bullet",!0),u.attr("transform",s(g.l,g.t)),d.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),d.selectAll("g.xbulletaxistick,path,text").remove();var _=g.h,T=c.gauge.bar.thickness*_,A=v.x[0],S=v.x[0]+(v.x[1]-v.x[0])*(c._hasNumber||c._hasDelta?1-h.bulletNumberDomainSize:1);function E(e){e.attr("width",function(e){return Math.max(0,i.c2p(e.range[1])-i.c2p(e.range[0]))}).attr("x",function(e){return i.c2p(e.range[0])}).attr("y",function(e){return .5*(1-e.thickness)*_}).attr("height",function(e){return e.thickness*_})}(i=k(e,c.gauge.axis))._id="xbulletaxis",i.domain=[A,S],i.setScale(),n=f.calcTicks(i),a=f.makeTransTickFn(i),o=f.getTickSigns(i)[2],l=g.t+g.h,i.visible&&(f.drawTicks(e,i,{vals:"inside"===i.ticks?f.clipEnds(i,n):n,layer:d,path:f.makeTickPath(i,l,o),transFn:a}),f.drawLabels(e,i,{vals:n,layer:d,transFn:a,labelFns:f.makeLabelFns(i,l)}));var C=[p].concat(c.gauge.steps),L=u.selectAll("g.bg-bullet").data(C);L.enter().append("g").classed("bg-bullet",!0).append("rect"),L.select("rect").call(E).call(M),L.exit().remove();var P=u.selectAll("g.value-bullet").data([c.gauge.bar]);P.enter().append("g").classed("value-bullet",!0).append("rect"),P.select("rect").attr("height",T).attr("y",(_-T)/2).call(M),w(x)?P.select("rect").transition().duration(x.duration).ease(x.easing).each("end",function(){b&&b()}).each("interrupt",function(){b&&b()}).attr("width",Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],t[0].y)))):P.select("rect").attr("width","number"==typeof t[0].y?Math.max(0,i.c2p(Math.min(c.gauge.axis.range[1],t[0].y))):0),P.exit().remove();var I=t.filter(function(){return c.gauge.threshold.value||0===c.gauge.threshold.value}),z=u.selectAll("g.threshold-bullet").data(I);z.enter().append("g").classed("threshold-bullet",!0).append("line"),z.select("line").attr("x1",i.c2p(c.gauge.threshold.value)).attr("x2",i.c2p(c.gauge.threshold.value)).attr("y1",(1-c.gauge.threshold.thickness)/2*_).attr("y2",(1-(1-c.gauge.threshold.thickness)/2)*_).call(y.stroke,c.gauge.threshold.line.color).style("stroke-width",c.gauge.threshold.line.width),z.exit().remove();var D=u.selectAll("g.gauge-outline").data([m]);D.enter().append("g").classed("gauge-outline",!0).append("rect"),D.select("rect").call(E).call(M),D.exit().remove()}(e,t,{gauge:Z,layer:$,size:j,gaugeBg:m,gaugeOutline:T,transitionOpts:p,onComplete:g});var X=z.selectAll("text.title").data(t);X.exit().remove(),X.enter().append("text").classed("title",!0),X.attr("text-anchor",function(){return R?x.right:x[I.title.align]}).text(I.title.text).call(u.font,I.title.font).call(d.convertToTspans,e),X.attr("transform",function(){var e,t=j.l+j.w*b[I.title.align],r=h.titlePadding,i=u.bBox(X.node());return D?(O&&(e=I.gauge.axis.visible?u.bBox(Y.node()).top-r-i.bottom:j.t+j.h/2-U/2-i.bottom-r),R&&(e=L-(i.top+i.bottom)/2,t=j.l-h.bulletPadding*j.w)):e=I._numbersTop-r-i.bottom,s(t,e)})})}}}),v7=p({"src/traces/indicator/index.js"(e,t){t.exports={moduleType:"trace",name:"indicator",basePlotModule:v2(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:v3(),supplyDefaults:v4().supplyDefaults,calc:v6().calc,plot:v8(),meta:{}}}}),v9=p({"lib/indicator.js"(e,t){t.exports=v7()}}),xe=p({"src/traces/table/attributes.js"(e,t){var r=ig(),i=q().extendFlat,n=eq().overrideAll,a=H(),o=at().attributes,s=tB().descriptionOnlyNumbers;t.exports=n({domain:o({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:i({},r.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:i({},a({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:s("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:i({},r.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:i({},a({arrayOk:!0}))}},"calc","from-root")}}),xt=p({"src/traces/table/defaults.js"(e,t){var r=tv(),i=xe(),n=at().defaults;t.exports=function(e,t,a,o){function s(n,a){return r.coerce(e,t,i,n,a)}n(t,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"),r.coerceFont(s,"header.font",o.font),function(e,t){for(var r=e.columnorder||[],i=e.header.values.length,n=r.slice(0,i),a=n.slice().sort(function(e,t){return e-t}),o=n.map(function(e){return a.indexOf(e)}),s=o.length;s",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"}}}}),xn=p({"src/traces/table/data_preparation_helper.js"(e,t){var r=xi(),i=q().extendFlat,n=C(),a=z().isTypedArray,o=z().isArrayOrTypedArray;function s(e){if(o(e)){for(var t=0,r=0;r=t||c===e.length-1)&&(i[n]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=c,o=p(),n+=a,s=c+1,a=0);return i}function p(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}t.exports=function(e,t){var a=c(t.cells.values),p=function(e){return e.slice(t.header.values.length,e.length)},m=c(t.header.values);m.length&&!m[0].length&&(m[0]=[""],m=c(m));var g=m.concat(p(a).map(function(){return u((m[0]||[""]).length)})),y=t.domain,v=Math.floor(e._fullLayout._size.w*(y.x[1]-y.x[0])),x=Math.floor(e._fullLayout._size.h*(y.y[1]-y.y[0])),b=t.header.values.length?g[0].map(function(){return t.header.height}):[r.emptyHeaderHeight],_=a.length?a[0].map(function(){return t.cells.height}):[],w=b.reduce(l,0),T=f(_,x-w+r.uplift),M=d(f(b,w),[]),k=d(T,M),A={},S=t.columnorder;o(S)&&(S=Array.from(S)),S=S.concat(p(a.map(function(e,t){return t})));var E=g.map(function(e,r){var i=o(t.columnwidth)?t.columnwidth[Math.min(r,t.columnwidth.length-1)]:t.columnwidth;return n(i)?Number(i):1}),C=E.reduce(l,0);E=E.map(function(e){return e/C*v});var L=Math.max(s(t.header.line.width),s(t.cells.line.width)),P={key:t.uid+e._context.staticPlot,translateX:y.x[0]*e._fullLayout._size.w,translateY:e._fullLayout._size.h*(1-y.y[1]),size:e._fullLayout._size,width:v,maxLineWidth:L,height:x,columnOrder:S,groupHeight:x,rowBlocks:k,headerRowBlocks:M,scrollY:0,cells:i({},t.cells,{values:a}),headerCells:i({},t.header,{values:g}),gdColumns:g.map(function(e){return e[0]}),gdColumnsOriginalOrder:g.map(function(e){return e[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:g.map(function(e,t){var r=A[e];return A[e]=(r||0)+1,{key:e+"__"+A[e],label:e,specIndex:t,xIndex:S[t],xScale:h,x:void 0,calcdata:void 0,columnWidth:E[t]}})};return P.columns.forEach(function(e){e.calcdata=P,e.x=h(e)}),P}}}),xa=p({"src/traces/table/data_split_helpers.js"(e){var t=q().extendFlat;e.splitToPanels=function(e){var r=[0,0],i=t({},e,{key:"header",type:"header",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:t({},e.calcdata,{cells:e.calcdata.headerCells})});return[t({},e,{key:"cells1",type:"cells",page:0,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),t({},e,{key:"cells2",type:"cells",page:1,prevPages:r,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),i]},e.splitToCells=function(e){var t,r,i,n,a=(i=(r=(t=e).rowBlocks[t.page])?r.rows[0].rowIndex:0,n=r?i+r.rows.length:0,[i,n]);return(e.values||[]).slice(a[0],a[1]).map(function(t,r){return{keyWithinBlock:r+("string"==typeof t&&t.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:a[0]+r,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:t}})}}}),xo=p({"src/traces/table/plot.js"(e,t){var r=xi(),i=T(),n=tv(),a=n.numberFormat,o=yF(),s=t9(),l=tF(),c=tv().raiseToTop,u=tv().strTranslate,h=tv().cancelTransition,d=xn(),f=xa(),p=ee();function m(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function g(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function y(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function v(e){return[].concat.apply([],e.map(function(e){return e})).map(function(e){return e.__data__})}function x(e,t,n){var a=e.selectAll("."+r.cn.scrollbarKit).data(o.repeat,o.keyFun);a.enter().append("g").classed(r.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each(function(e){var t,i=e.scrollbarState;i.totalHeight=R(t=e.rowBlocks,t.length-1)+(t.length?F(t[t.length-1],1/0):1),i.scrollableAreaHeight=e.groupHeight-E(e),i.currentlyVisibleHeight=Math.min(i.totalHeight,i.scrollableAreaHeight),i.ratio=i.currentlyVisibleHeight/i.totalHeight,i.barLength=Math.max(i.ratio*i.currentlyVisibleHeight,r.goldenRatio*r.scrollbarWidth),i.barWiggleRoom=i.currentlyVisibleHeight-i.barLength,i.wiggleRoom=Math.max(0,i.totalHeight-i.scrollableAreaHeight),i.topY=0===i.barWiggleRoom?0:e.scrollY/i.wiggleRoom*i.barWiggleRoom,i.bottomY=i.topY+i.barLength,i.dragMultiplier=i.wiggleRoom/i.barWiggleRoom}).attr("transform",function(e){return u(e.width+r.scrollbarWidth/2+r.scrollbarOffset,E(e))});var s=a.selectAll("."+r.cn.scrollbar).data(o.repeat,o.keyFun);s.enter().append("g").classed(r.cn.scrollbar,!0);var l=s.selectAll("."+r.cn.scrollbarSlider).data(o.repeat,o.keyFun);l.enter().append("g").classed(r.cn.scrollbarSlider,!0),l.attr("transform",function(e){return u(0,e.scrollbarState.topY||0)});var c=l.selectAll("."+r.cn.scrollbarGlyph).data(o.repeat,o.keyFun);c.enter().append("line").classed(r.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",r.scrollbarWidth).attr("stroke-linecap","round").attr("y1",r.scrollbarWidth/2),c.attr("y2",function(e){return e.scrollbarState.barLength-r.scrollbarWidth/2}).attr("stroke-opacity",function(e){return e.columnDragInProgress||!e.scrollbarState.barWiggleRoom||n?0:.4}),c.transition().delay(0).duration(0),c.transition().delay(r.scrollbarHideDelay).duration(r.scrollbarHideDuration).attr("stroke-opacity",0);var h=s.selectAll("."+r.cn.scrollbarCaptureZone).data(o.repeat,o.keyFun);h.enter().append("line").classed(r.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",r.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(r){var n=i.event.y,a=this.getBoundingClientRect(),o=r.scrollbarState,s=n-a.top,l=i.scale.linear().domain([0,o.scrollableAreaHeight]).range([0,o.totalHeight]).clamp(!0);o.topY<=s&&s<=o.bottomY||L(t,e,null,l(s-o.barLength/2))(r)}).call(i.behavior.drag().origin(function(e){return i.event.stopPropagation(),e.scrollbarState.scrollbarScrollInProgress=!0,e}).on("drag",L(t,e)).on("dragend",function(){})),h.attr("y2",function(e){return e.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(c.remove(),h.remove())}function b(e,t,n,a){var l,c,u,h,d,m=((c=((l=n.selectAll("."+r.cn.columnCells).data(o.repeat,o.keyFun)).enter().append("g").classed(r.cn.columnCells,!0),l.exit().remove(),l).selectAll("."+r.cn.columnCell).data(f.splitToCells,function(e){return e.keyWithinBlock})).enter().append("g").classed(r.cn.columnCell,!0),c.exit().remove(),c);m.each(function(e,t){var r=e.calcdata.cells.font,i=e.column.specIndex,n={size:M(r.size,i,t),color:M(r.color,i,t),family:M(r.family,i,t),weight:M(r.weight,i,t),style:M(r.style,i,t),variant:M(r.variant,i,t),textcase:M(r.textcase,i,t),lineposition:M(r.lineposition,i,t),shadow:M(r.shadow,i,t)};e.rowNumber=e.key,e.align=M(e.calcdata.cells.align,i,t),e.cellBorderWidth=M(e.calcdata.cells.line.width,i,t),e.font=n}),((u=m.selectAll("."+r.cn.cellRect).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("rect").classed(r.cn.cellRect,!0),u).attr("width",function(e){return e.column.columnWidth}).attr("stroke-width",function(e){return e.cellBorderWidth}).each(function(e){var t=i.select(this);p.stroke(t,M(e.calcdata.cells.line.color,e.column.specIndex,e.rowNumber)),p.fill(t,M(e.calcdata.cells.fill.color,e.column.specIndex,e.rowNumber))});var g=((d=((h=m.selectAll("."+r.cn.cellTextHolder).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("g").classed(r.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),h).selectAll("."+r.cn.cellText).data(o.repeat,function(e){return e.keyWithinBlock})).enter().append("text").classed(r.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){i.event.stopPropagation()}),d);g.each(function(e){s.font(i.select(this),e.font)}),_(g,t,a,e),O(m)}function _(e,t,n,o){e.text(function(e){var t,i=e.column.specIndex,n=e.rowNumber,o=e.value,s="string"==typeof o,l=s&&o.match(/
/i),c=!s||l;e.mayHaveMarkup=s&&o.match(/[<&>]/);var u="string"==typeof(h=o)&&h.match(r.latexCheck);e.latex=u;var h,d,f=u?"":M(e.calcdata.cells.prefix,i,n)||"",p=u?"":M(e.calcdata.cells.suffix,i,n)||"",m=u?null:M(e.calcdata.cells.format,i,n)||null,g=f+(m?a(m)(e.value):e.value)+p;if(e.wrappingNeeded=!e.wrapped&&!c&&!u&&(d=w(g)),e.cellHeightMayIncrease=l||u||e.mayHaveMarkup||(void 0===d?w(g):d),e.needsConvertToTspans=e.mayHaveMarkup||e.wrappingNeeded||e.latex,e.wrappingNeeded){var y=(" "===r.wrapSplitCharacter?g.replace(/n&&i.push(a),n+=l}return i}(n,l,s);1===c.length&&(c[0]===n.length-1?c.unshift(c[0]-1):c.push(c[0]+1)),c[0]%2&&c.reverse(),t.each(function(e,t){e.page=c[t],e.scrollY=l}),t.attr("transform",function(e){return u(0,R(e.rowBlocks,e.page)-e.scrollY)}),e&&(P(e,r,t,c,i.prevPages,i,0),P(e,r,t,c,i.prevPages,i,1),x(r,e))}}function L(e,t,n,a){return function(o){var s=o.calcdata?o.calcdata:o,l=t.filter(function(e){return s.key===e.key}),c=n||s.scrollbarState.dragMultiplier,u=s.scrollY;return s.scrollY=void 0===a?s.scrollY+c*i.event.dy:a,C(e,l.selectAll("."+r.cn.yColumn).selectAll("."+r.cn.columnBlock).filter(A),l),s.scrollY===u}}function P(e,t,r,i,n,a,o){i[o]!==n[o]&&(clearTimeout(a.currentRepaint[o]),a.currentRepaint[o]=setTimeout(function(){b(e,t,r.filter(function(e,t){return t===o&&i[t]!==n[t]}),r),n[o]=i[o]}))}function I(e,t,n,a){return function(){var o=i.select(t.parentNode);o.each(function(e){var t=e.fragments;o.selectAll("tspan.line").each(function(e,r){t[r].width=this.getComputedTextLength()});var i,n,a=t[t.length-1].width,s=t.slice(0,-1),l=[],c=0,u=e.column.columnWidth-2*r.cellPad;for(e.value="";s.length;)c+(n=(i=s.shift()).width+a)>u&&(e.value+=l.join(r.wrapSpacer)+r.lineBreaker,l=[],c=0),l.push(i.text),c+=n;c&&(e.value+=l.join(r.wrapSpacer)),e.wrapped=!0}),o.selectAll("tspan.line").remove(),_(o.select("."+r.cn.cellText),n,e,a),i.select(t.parentNode.parentNode).call(O)}}function z(e,t,n,a,o){return function(){if(!o.settledY){var s=i.select(t.parentNode),l=j(o),c=o.key-l.firstRowIndex,h=l.rows[c].rowHeight,d=Math.max(o.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*r.cellPad:h,h);d-l.rows[c].rowHeight&&(l.rows[c].rowHeight=d,e.selectAll("."+r.cn.columnCell).call(O),C(null,e.filter(A),0),x(n,a,!0)),s.attr("transform",function(){var e=this.parentNode.getBoundingClientRect(),t=i.select(this.parentNode).select("."+r.cn.cellRect).node().getBoundingClientRect(),n=this.transform.baseVal.consolidate(),a=t.top-e.top+(n?n.matrix.f:r.cellPad);return u(D(o,i.select(this.parentNode).select("."+r.cn.cellTextHolder).node().getBoundingClientRect().width),a)}),o.settledY=!0}}}function D(e,t){switch(e.align){case"left":default:return r.cellPad;case"right":return e.column.columnWidth-(t||0)-r.cellPad;case"center":return(e.column.columnWidth-(t||0))/2}}function O(e){e.attr("transform",function(e){var t=e.rowBlocks[0].auxiliaryBlocks.reduce(function(e,t){return e+F(t,1/0)},0);return u(0,F(j(e),e.key)+t)}).selectAll("."+r.cn.cellRect).attr("height",function(e){var t,r;return(t=j(e),r=e.key,t.rows[r-t.firstRowIndex]).rowHeight})}function R(e,t){for(var r=0,i=t-1;i>=0;i--)r+=function(e){var t=e.allRowsHeight;if(void 0!==t)return t;for(var r=0,i=0;it.length&&(e=e.slice(0,t.length)):e=[],n=0;n90&&(d-=180,l=-l),{angle:d,flip:l,p:e.c2p(i,t,r),offsetMultplier:c}}}}),xx=p({"src/traces/carpet/plot.js"(e,t){var r=T(),i=t9(),n=xg(),a=xy(),o=xv(),s=tF(),l=tv(),c=l.strRotate,u=l.strTranslate,h=tR();function d(e,t,o,s,l,c,u){var h="const-"+l+"-lines",d=o.selectAll("."+h).data(c);d.enter().append("path").classed(h,!0).style("vector-effect",u?"none":"non-scaling-stroke"),d.each(function(o){var s=o.x,l=o.y,c="M"+a(n([],s,e.c2p),n([],l,t.c2p),o.smoothing);r.select(this).attr("d",c).style("stroke-width",o.width).style("stroke",o.color).style("stroke-dasharray",i.dashStyle(o.dash,o.width)).style("fill","none")}),d.exit().remove()}function f(e,t,n,a,l,h,d,f){var p=h.selectAll("text."+f).data(d);p.enter().append("text").classed(f,!0);var m=0,g={};return p.each(function(l,h){if("auto"===l.axis.tickangle)d=o(a,t,n,l.xy,l.dxy);else{var d,f=(l.axis.tickangle+180)*Math.PI/180;d=o(a,t,n,l.xy,[Math.cos(f),Math.sin(f)])}h||(g={angle:d.angle,flip:d.flip});var p=(l.endAnchor?-1:1)*d.flip,y=r.select(this).attr({"text-anchor":p>0?"start":"end","data-notex":1}).call(i.font,l.font).text(l.text).call(s.convertToTspans,e),v=i.bBox(this);y.attr("transform",u(d.p[0],d.p[1])+c(d.angle)+u(l.axis.labelpadding*p,.3*v.height)),m=Math.max(m,v.width+l.axis.labelpadding)}),p.exit().remove(),g.maxExtent=m,g}t.exports=function(e,t,i,s){var c=e._context.staticPlot,u=t.xaxis,h=t.yaxis,p=e._fullLayout._clips;l.makeTraceGroups(s,i,"trace").each(function(t){var i,s,m,y,v,x,b,_,w,T,M,k,A,S,E,C,L=r.select(this),P=t[0],I=P.trace,z=I.aaxis,D=I.baxis,O=l.ensureSingle(L,"g","minorlayer"),R=l.ensureSingle(L,"g","majorlayer"),F=l.ensureSingle(L,"g","boundarylayer"),j=l.ensureSingle(L,"g","labellayer");L.style("opacity",I.opacity),d(u,h,R,z,"a",z._gridlines,!0),d(u,h,R,D,"b",D._gridlines,!0),d(u,h,O,z,"a",z._minorgridlines,!0),d(u,h,O,D,"b",D._minorgridlines,!0),d(u,h,F,z,"a-boundary",z._boundarylines,c),d(u,h,F,D,"b-boundary",D._boundarylines,c);var B=f(e,u,h,I,P,j,z._labels,"a-label"),N=f(e,u,h,I,P,j,D._labels,"b-label");i=e,s=j,m=I,y=P,v=u,x=h,b=B,_=N,A=l.aggNums(Math.min,null,m.a),S=l.aggNums(Math.max,null,m.a),E=l.aggNums(Math.min,null,m.b),C=l.aggNums(Math.max,null,m.b),w=.5*(A+S),T=E,M=m.ab2xy(w,T,!0),k=m.dxyda_rough(w,T),void 0===b.angle&&l.extendFlat(b,o(m,v,x,M,m.dxydb_rough(w,T))),g(i,s,m,y,M,k,m.aaxis,v,x,b,"a-title"),w=A,T=.5*(E+C),M=m.ab2xy(w,T,!0),k=m.dxydb_rough(w,T),void 0===_.angle&&l.extendFlat(_,o(m,v,x,M,m.dxyda_rough(w,T))),g(i,s,m,y,M,k,m.baxis,v,x,_,"b-title"),function(e,t,r,i,o){var s,c,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var h=l.ensureSingle(u,"path","carpetboundary"),d=t.clipsegments,f=[];for(c=0;c90&&v<270&&(_=(-s.lineCount(x)+m)*p*a-_),x.attr("transform",u(t.p[0],t.p[1])+c(t.angle)+u(0,_)).attr("text-anchor","middle").call(i.font,d.title.font)}),b.exit().remove()}}}),xb=p({"src/traces/carpet/cheater_basis.js"(e,t){var r=tv().isArrayOrTypedArray;t.exports=function(e,t,i){var n,a,o,s,l,c=[],u=r(e)?e.length:e,h=r(t)?t.length:t,d=r(e)?e:null,f=r(t)?t:null;d&&(o=(d.length-1)/(d[d.length-1]-d[0])/(u-1)),f&&(s=(f.length-1)/(f[f.length-1]-f[0])/(h-1));var p,m=1/0,g=-1/0;for(a=0;a=10)return null;for(var n=1/0,a=-1/0,o=t.length,s=0;s0&&(f=e.dxydi([],i-1,o,0,s),y.push(l[0]+f[0]/3),v.push(l[1]+f[1]/3),p=e.dxydi([],i-1,o,1,s),y.push(h[0]-p[0]/3),v.push(h[1]-p[1]/3)),y.push(h[0]),v.push(h[1]),l=h;else for(c=Math.floor(Math.max(0,Math.min(L-2,i=e.a2i(r)))),u=i-c,x.length=L,x.crossLength=P,x.xy=function(t){return e.evalxy([],i,t)},x.dxy=function(t,r){return e.dxydj([],c,t,u,r)},a=0;a0&&(m=e.dxydj([],c,a-1,u,0),y.push(l[0]+m[0]/3),v.push(l[1]+m[1]/3),g=e.dxydj([],c,a-1,u,1),y.push(h[0]-g[0]/3),v.push(h[1]-g[1]/3)),y.push(h[0]),v.push(h[1]),l=h;return x.axisLetter=t,x.axis=b,x.crossAxis=k,x.value=r,x.constvar=n,x.index=d,x.x=y,x.y=v,x.smoothing=k.smoothing,x}function D(r){var i,a,o,s,l,c=[],u=[],h={};if(h.length=x.length,h.crossLength=M.length,"b"===t)for(o=Math.max(0,Math.min(P-2,r)),l=Math.min(1,Math.max(0,r-o)),h.xy=function(t){return e.evalxy([],t,r)},h.dxy=function(t,r){return e.dxydi([],t,o,r,l)},i=0;ix.length-1||_.push(i(D(o),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(d=u;dx.length-1)&&!(m<0||m>x.length-1))for(g=x[s],y=x[m],a=0;ax[x.length-1]||w.push(i(z(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash})));b.startline&&T.push(i(D(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(D(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(e,t){return e-t}))[0],h=c[1],d=u;d<=h;d++)f=b.tick0+b.dtick*d,_.push(i(z(f),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(d=u-1;dx[x.length-1]||w.push(i(z(p),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&T.push(i(z(x[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&T.push(i(z(x[x.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}}}),xT=p({"src/traces/carpet/calc_labels.js"(e,t){var r=rn(),i=q().extendFlat;t.exports=function(e,t){var n,a,o,s,l,c=t._labels=[],u=t._gridlines;for(n=0;n=0;n--)a[u-n]=e[h][n],o[u-n]=t[h][n];for(s.push({x:a,y:o,bicubic:l}),n=h,a=[],o=[];n>=0;n--)a[h-n]=e[n][0],o[h-n]=t[n][0];return s.push({x:a,y:o,bicubic:c}),s}}}),xk=p({"src/traces/carpet/smooth_fill_2d_array.js"(e,t){var r=tv();t.exports=function(e,t,i){var n,a,o,s=[],l=[],c=e[0].length,u=e.length,h=0;for(n=0;n0&&void 0!==(i=e[r][t-1])&&(a++,n+=i),t0&&void 0!==(i=e[r-1][t])&&(a++,n+=i),r0&&a0&&n1e-5);return r.log("Smoother converged to",T,"after",M,"iterations"),e}}}),xA=p({"src/traces/carpet/constants.js"(e,t){t.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),xS=p({"src/traces/carpet/catmull_rom.js"(e,t){t.exports=function(e,t,r,i){var n=e[0]-t[0],a=e[1]-t[1],o=r[0]-t[0],s=r[1]-t[1],l=Math.pow(n*n+a*a,.25),c=Math.pow(o*o+s*s,.25),u=(c*c*n-l*l*o)*i,h=(c*c*a-l*l*s)*i,d=c*(l+c)*3,f=l*(l+c)*3;return[[t[0]+(d&&u/d),t[1]+(d&&h/d)],[t[0]-(f&&u/f),t[1]-(f&&h/f)]]}}}),xE=p({"src/traces/carpet/compute_control_points.js"(e,t){var r=xS(),i=tv().ensureArray;function n(e,t,r){var i=-.5*r[0]+1.5*t[0],n=-.5*r[1]+1.5*t[1];return[(2*i+e[0])/3,(2*n+e[1])/3]}t.exports=function(e,t,a,o,s,l){var c,u,h,d,f,p,m,g,y,v,x=a[0].length,b=a.length,_=s?3*x-2:x,w=l?3*b-2:b;for(e=i(e,w),t=i(t,w),h=0;hf&&em&&tp||tg},e.setScale=function(){var t=e._x,r=e._y,i=n(e._xctrl,e._yctrl,t,r,h.smoothing,d.smoothing);e._xctrl=i[0],e._yctrl=i[1],e.evalxy=a([e._xctrl,e._yctrl],c,u,h.smoothing,d.smoothing),e.dxydi=o([e._xctrl,e._yctrl],h.smoothing,d.smoothing),e.dxydj=s([e._xctrl,e._yctrl],h.smoothing,d.smoothing)},e.i2a=function(e){var r=Math.max(0,Math.floor(e[0]),c-2),i=e[0]-r;return(1-i)*t[r]+i*t[r+1]},e.j2b=function(e){var t=Math.max(0,Math.floor(e[1]),c-2),r=e[1]-t;return(1-r)*l[t]+r*l[t+1]},e.ij2ab=function(t){return[e.i2a(t[0]),e.j2b(t[1])]},e.a2i=function(e){var r=Math.max(0,Math.min(i(e,t),c-2)),n=t[r],a=t[r+1];return Math.max(0,Math.min(c-1,r+(e-n)/(a-n)))},e.b2j=function(e){var t=Math.max(0,Math.min(i(e,l),u-2)),r=l[t],n=l[t+1];return Math.max(0,Math.min(u-1,t+(e-r)/(n-r)))},e.ab2ij=function(t){return[e.a2i(t[0]),e.b2j(t[1])]},e.i2c=function(t,r){return e.evalxy([],t,r)},e.ab2xy=function(r,i,n){if(!n&&(rt[c-1]|il[u-1]))return[!1,!1];var a=e.a2i(r),o=e.b2j(i),s=e.evalxy([],a,o);if(n){var h,d,f,p,m=0,g=0,y=[];rt[c-1]?(h=c-2,d=1,m=(r-t[c-1])/(t[c-1]-t[c-2])):(h=Math.max(0,Math.min(c-2,Math.floor(a))),d=a-h),il[u-1]?(f=u-2,p=1,g=(i-l[u-1])/(l[u-1]-l[u-2])):(f=Math.max(0,Math.min(u-2,Math.floor(o))),p=o-f),m&&(e.dxydi(y,h,f,d,p),s[0]+=y[0]*m,s[1]+=y[1]*m),g&&(e.dxydj(y,h,f,d,p),s[0]+=y[0]*g,s[1]+=y[1]*g)}return s},e.c2p=function(e,t,r){return[t.c2p(e[0]),r.c2p(e[1])]},e.p2x=function(e,t,r){return[t.p2c(e[0]),r.p2c(e[1])]},e.dadi=function(e){var r=Math.max(0,Math.min(t.length-2,e));return t[r+1]-t[r]},e.dbdj=function(e){var t=Math.max(0,Math.min(l.length-2,e));return l[t+1]-l[t]},e.dxyda=function(t,r,i,n){var a=e.dxydi(null,t,r,i,n),o=e.dadi(t,i);return[a[0]/o,a[1]/o]},e.dxydb=function(t,r,i,n){var a=e.dxydj(null,t,r,i,n),o=e.dbdj(r,n);return[a[0]/o,a[1]/o]},e.dxyda_rough=function(t,r,i){var n=y*(i||.1),a=e.ab2xy(t+n,r,!0),o=e.ab2xy(t-n,r,!0);return[(a[0]-o[0])*.5/n,(a[1]-o[1])*.5/n]},e.dxydb_rough=function(t,r,i){var n=v*(i||.1),a=e.ab2xy(t,r+n,!0),o=e.ab2xy(t,r-n,!0);return[(a[0]-o[0])*.5/n,(a[1]-o[1])*.5/n]},e.dpdx=function(e){return e._m},e.dpdy=function(e){return e._m}}}}),xz=p({"src/traces/carpet/calc.js"(e,t){var r=rn(),i=tv().isArray1D,n=xb(),a=x_(),o=xw(),s=xT(),l=xM(),c=a7(),u=xk(),h=a8(),d=xI();t.exports=function(e,t){var f=r.getFromId(e,t.xaxis),p=r.getFromId(e,t.yaxis),m=t.aaxis,g=t.baxis,y=t.x,v=t.y,x=[];y&&i(y)&&x.push("x"),v&&i(v)&&x.push("y"),x.length&&h(t,m,g,"a","b",x);var b=t._a=t._a||t.a,_=t._b=t._b||t.b;y=t._x||t.x,v=t._y||t.y;var w={};t._cheater&&(y=n("index"===m.cheatertype?b.length:b,"index"===g.cheatertype?_.length:_,t.cheaterslope)),t._x=y=c(y),t._y=v=c(v),u(y,b,_),u(v,b,_),d(t),t.setScale();var T=a(y),M=a(v),k=.5*(T[1]-T[0]),A=.5*(T[1]+T[0]),S=.5*(M[1]-M[0]),E=.5*(M[1]+M[0]);return T=[A-1.3*k,A+1.3*k],M=[E-1.3*S,E+1.3*S],t._extremes[f._id]=r.findExtremes(f,T,{padded:!0}),t._extremes[p._id]=r.findExtremes(p,M,{padded:!0}),o(t,"a","b"),o(t,"b","a"),s(t,m),s(t,g),w.clipsegments=l(t._xctrl,t._yctrl,m,g),w.x=y,w.y=v,w.a=b,w.b=_,[w]}}}),xD=p({"src/traces/carpet/index.js"(e,t){t.exports={attributes:xh(),supplyDefaults:xm(),plot:xx(),calc:xz(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:np(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),xO=p({"lib/carpet.js"(e,t){t.exports=xD()}}),xR=p({"src/traces/scattercarpet/attributes.js"(e,t){var r=iv(),i=ix(),n=Z(),{hovertemplateAttrs:a,texttemplateAttrs:o,templatefallbackAttrs:s}=eW(),l=tV(),c=q().extendFlat,u=i.marker,h=i.line,d=u.line;t.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:c({},i.mode,{dflt:"markers"}),text:c({},i.text,{}),texttemplate:o({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:s({editType:"plot"}),hovertext:c({},i.hovertext,{}),line:{color:h.color,width:h.width,dash:h.dash,backoff:h.backoff,shape:c({},h.shape,{values:["linear","spline"]}),smoothing:h.smoothing,editType:"calc"},connectgaps:i.connectgaps,fill:c({},i.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:r(),marker:c({symbol:u.symbol,opacity:u.opacity,maxdisplayed:u.maxdisplayed,angle:u.angle,angleref:u.angleref,standoff:u.standoff,size:u.size,sizeref:u.sizeref,sizemin:u.sizemin,sizemode:u.sizemode,line:c({width:d.width,dash:d.dash,editType:"calc"},l("marker.line")),gradient:u.gradient,editType:"calc"},l("marker")),textfont:i.textfont,textposition:i.textposition,selected:i.selected,unselected:i.unselected,hoverinfo:c({},n.hoverinfo,{flags:["a","b","text","name"]}),hoveron:i.hoveron,hovertemplate:a(),hovertemplatefallback:s(),zorder:i.zorder}}}),xF=p({"src/traces/scattercarpet/defaults.js"(e,t){var r=tv(),i=iy(),n=t5(),a=iq(),o=iH(),s=iG(),l=iW(),c=iY(),u=xR();t.exports=function(e,t,h,d){function f(i,n){return r.coerce(e,t,u,i,n)}f("carpet"),t.xaxis="x",t.yaxis="y";var p=f("a"),m=f("b"),g=Math.min(p.length,m.length);if(!g){t.visible=!1;return}t._length=g,f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("mode",g")}return o}function y(e,t){var r;r=e.labelprefix&&e.labelprefix.length>0?e.labelprefix.replace(/ = $/,""):e._hovertitle,m.push(r+": "+t.toFixed(3)+e.labelsuffix)}}}}),xq=p({"src/traces/scattercarpet/event_data.js"(e,t){t.exports=function(e,t,r,i,n){var a=i[n];return e.a=a.a,e.b=a.b,e.y=a.y,e}}}),xH=p({"src/traces/scattercarpet/index.js"(e,t){t.exports={attributes:xR(),supplyDefaults:xF(),colorbar:ne(),formatLabels:xj(),calc:xN(),plot:xU(),style:nr().style,styleOnSelect:nr().styleOnSelect,hoverPoints:xV(),selectPoints:na(),eventData:xq(),moduleType:"trace",name:"scattercarpet",basePlotModule:np(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),xG=p({"lib/scattercarpet.js"(e,t){t.exports=xH()}}),xW=p({"src/traces/contourcarpet/attributes.js"(e,t){var r=aX(),i=oS(),n=tV(),a=q().extendFlat,o=i.contours;t.exports=a({carpet:{valType:"string",editType:"calc"},z:r.z,a:r.x,a0:r.x0,da:r.dx,b:r.y,b0:r.y0,db:r.dy,text:r.text,hovertext:r.hovertext,transpose:r.transpose,atype:r.xtype,btype:r.ytype,fillcolor:i.fillcolor,autocontour:i.autocontour,ncontours:i.ncontours,contours:{type:o.type,start:o.start,end:o.end,size:o.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:o.showlines,showlabels:o.showlabels,labelfont:o.labelfont,labelformat:o.labelformat,operation:o.operation,value:o.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:i.line.color,width:i.line.width,dash:i.line.dash,smoothing:i.line.smoothing,editType:"plot"},zorder:i.zorder},n("",{cLetter:"z",autoColorDflt:!1}))}}),xY=p({"src/traces/contourcarpet/defaults.js"(e,t){var r=tv(),i=aK(),n=xW(),a=oX(),o=oC(),s=oP();t.exports=function(e,t,l,c){function u(i,a){return r.coerce(e,t,n,i,a)}if(u("carpet"),e.a&&e.b){if(!i(e,t,u,c,"a","b")){t.visible=!1;return}u("text"),"constraint"===u("contours.type")?a(e,t,u,c,l,{hasHover:!1}):(o(e,t,u,function(i){return r.coerce2(e,t,n,i)}),s(e,t,u,c,{hasHover:!1}))}else t._defaultColor=l,t._length=null;u("zorder")}}}),xZ=p({"src/traces/contourcarpet/calc.js"(e,t){var r=t2(),i=tv(),n=a8(),a=a7(),o=a9(),s=oe(),l=ot(),c=xY(),u=xB(),h=oz();t.exports=function(e,t){var d=t._carpetTrace=u(e,t);if(!(!d||!d.visible||"legendonly"===d.visible)){if(!t.a||!t.b){var f,p,m,g,y,v,x,b,_,w,T,M,k,A,S,E,C,L=e.data[d.index],P=e.data[t.index];P.a||(P.a=L.a),P.b||(P.b=L.b),c(P,t,t._defaultColor,e._fullLayout)}var I=(f=e,T=(w=(p=t)._carpetTrace).aaxis,M=w.baxis,T._minDtick=0,M._minDtick=0,i.isArray1D(p.z)&&n(p,T,M,"a","b",["z"]),m=p._a=p._a||p.a,v=p._b=p._b||p.b,m=m?T.makeCalcdata(p,"_a"):[],v=v?M.makeCalcdata(p,"_b"):[],g=p.a0||0,y=p.da||1,x=p.b0||0,b=p.db||1,_=p._z=a(p._z||p.z,p.transpose),p._emptypoints=s(_),o(_,p._emptypoints),k=i.maxRowLength(_),A="scaled"===p.xtype?"":m,S=l(p,A,g,y,k,T),E="scaled"===p.ytype?"":v,C=l(p,E,x,b,_.length,M),"levels"===p.contours.type&&"none"!==p.contours.coloring&&r(f,p,{vals:_,containerStr:"",cLetter:"z"}),[{a:S,b:C,z:_}]);return h(t,t._z),I}}}}),x$=p({"src/traces/carpet/axis_aligned_line.js"(e,t){var r=tv().isArrayOrTypedArray;t.exports=function(e,t,i,n){var a,o,s,l,c,u,h,d,f,p,m,g,y,v=r(i)?"a":"b",x=("a"===v?e.aaxis:e.baxis).smoothing,b="a"===v?e.a2i:e.b2j,_="a"===v?i:n,w="a"===v?n:i,T="a"===v?t.a.length:t.b.length,M="a"===v?t.b.length:t.a.length,k=Math.floor("a"===v?e.b2j(w):e.a2i(w)),A="a"===v?function(t){return e.evalxy([],t,k)}:function(t){return e.evalxy([],k,t)};x&&(s=Math.max(0,Math.min(M-2,k)),l=k-s,o="a"===v?function(t,r){return e.dxydi([],t,s,r,l)}:function(t,r){return e.dxydj([],s,t,l,r)});var S=b(_[0]),E=b(_[1]),C=S0?Math.floor:Math.ceil,I=C>0?Math.ceil:Math.floor,z=C>0?Math.min:Math.max,D=C>0?Math.max:Math.min,O=P(S+L),R=I(E-L),F=[[h=A(S)]];for(a=O;a*C=0;J--)X=i([],($=A.clipsegments[J]).x,_.c2p),K=i([],$.y,w.c2p),X.reverse(),K.reverse(),Q.push(n(X,K,$.bicubic));var ee="M"+Q.join("L")+"Z";(function(e,t,r,a,s,l){var c,u,h=o.ensureSingle(e,"g","contourbg").selectAll("path").data("fill"!==l||s?[]:[0]);h.enter().append("path"),h.exit().remove();var d=[];for(u=0;u=0&&(h=E,f=p):Math.abs(u[1]-h[1])<_?Math.abs(u[1]-E[1])<_&&(E[0]-u[0])*(h[0]-E[0])>=0&&(h=E,f=p):o.log("endpt to newendpt is not vert. or horz.",u,h,E)}if(f>=0)break;y+=A(u,h),u=h}if(f===e.edgepaths.length){o.log("unclosed perimeter path");break}c=f,(x=-1===v.indexOf(c))&&(c=v[0],y+=A(u,h)+"Z",u=null)}for(c=0;cm&&(i.max=m),i.len=i.max-i.min}function x(e,t){var r=0;return(.1>Math.abs(e[0]-l)||.1>Math.abs(e[0]-c))&&(r=Math.max(r,a*v(t,y(n.dxydb_rough(e[0],e[1],.1)))/2)),(.1>Math.abs(e[1]-u)||.1>Math.abs(e[1]-h))&&(r=Math.max(r,a*v(t,y(n.dxyda_rough(e[0],e[1],.1)))/2)),r}}(this,r,e,i,h,t.height),!(i.len<(t.width+t.height)*u.LABELMIN)))for(var n=Math.min(Math.ceil(i.len/z),u.LABELMAX),a=0;ay):g=k>w,y=k;var A=c(w,T,M,k);A.pos=_,A.yc=(w+k)/2,A.i=b,A.dir=g?"increasing":"decreasing",A.x=A.pos,A.y=[M,T],v&&(A.orig_p=a[b]),p&&(A.tx=t.text[b]),m&&(A.htx=t.hovertext[b]),x.push(A)}else x.push({pos:_,empty:!0})}return t._extremes[l._id]=n.findExtremes(l,r.concat(d,h),{padded:!0}),x.length&&(x[0].t={labels:{open:i(e,"open:")+" ",high:i(e,"high:")+" ",low:i(e,"low:")+" ",close:i(e,"close:")+" "}}),x}t.exports={calc:function(e,t){var i=n.getFromId(e,t.xaxis),o=n.getFromId(e,t.yaxis),c=function(e,t,i){var n=i._minDiff;if(!n){var o,s=e._fullData,l=[];for(o=0,n=1/0;o"+u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat)):((y=i.extendFlat({},d)).y0=y.y1=b,y.yLabelVal=x,y.yLabel=u.labels[v]+r.hoverLabelText(s,x,l.yhoverformat),y.name="",h.push(y),m[x]=y)}return h}function h(e,t,i,n){var a=e.cd,s=e.ya,u=a[0].trace,h=a[0].t,d=c(e,t,i,n);if(!d)return[];var f=a[d.index],p=d.index=f.i,m=f.dir;function g(e){return h.labels[e]+r.hoverLabelText(s,u[e][p],u.yhoverformat)}var y=f.hi||u.hoverinfo||"",v=y.split("+"),x="all"===y,b=x||-1!==v.indexOf("y"),_=x||-1!==v.indexOf("text"),w=b?[g("open"),g("high"),g("low"),g("close")+" "+l[m]]:[];return _&&o(f,u,w),d.extraText=w.join("
"),d.y0=d.y1=s.c2p(f.yc,!0),[d]}t.exports={hoverPoints:function(e,t,r,i){return e.cd[0].trace.hoverlabel.split?u(e,t,r,i):h(e,t,r,i)},hoverSplit:u,hoverOnPoints:h}}}),x6=p({"src/traces/ohlc/select.js"(e,t){t.exports=function(e,t){var r,i=e.cd,n=e.xaxis,a=e.yaxis,o=[],s=i[0].t.bPos||0;if(!1===t)for(r=0;rt?function(e){return e<=0}:function(e){return e>=0};s.c2g=function(t){var r=s.c2l(t)-e;return(a(r)?r:0)+n},s.g2c=function(t){return s.l2c(t+e-n)},s.g2p=function(e){return e*i},s.c2p=function(e){return s.g2p(s.c2g(e))}};break;case"angularaxis":var c=e,u=t,h=c.type;if("linear"===h){var d=c.d2c,f=c.c2d;c.d2c=function(e,t){var r;return r=d(e),"degrees"===t?n(r):r},c.c2d=function(e,t){return f("degrees"===t?a(e):e)}}c.makeCalcdata=function(e,t){var r,i,n=e[t],a=e._length,o=function(t){return c.d2c(t,e.thetaunit)};if(n)for(r=Array(a),i=0;i1e-10?e:0}function h(e,t,r){t=t||0,r=r||0;for(var i=e.length,n=Array(i),a=0;a0?r:1/0}),a=r.mod(i+1,t.length);return[t[i],t[a]]},findIntersectionXY:l,findXYatLength:function(e,t,r,i){var n=-t*r,a=t*t+1,o=2*(t*n-r),s=Math.sqrt(o*o-4*a*(n*n+r*r-e*e)),l=(-o+s)/(2*a),c=(-o-s)/(2*a);return[[l,t*l+n+i],[c,t*c+n+i]]},clampTiny:u,pathPolygon:function(e,t,r,i,n,a){return"M"+h(c(e,t,r,i),n,a).join("L")},pathPolygonAnnulus:function(e,t,r,i,n,a,o){e0))!=(a<0?-1:+(a>0))){var f=i(e,r([t,0]));return["M"+l+","+c,"A"+o+","+o+" 0 0,"+(0=90||v>90&&x>=450?1:_<=0&&T<=0?0:Math.max(_,T),[v<=180&&x>=180||v>180&&x>=540?-1:b>=0&&w>=0?0:Math.min(b,w),v<=270&&x>=270||v>270&&x>=630?-1:_>=0&&T>=0?0:Math.min(_,T),x>=360?1:b<=0&&w<=0?0:Math.max(b,w),m]),L=C[2]-C[0],P=Math.abs((C[3]-C[1])/L);d/h>P?(M=h,E=(d-(k=h*P))/i.h/2,A=[c[0],c[1]],S=[u[0]+E,u[1]-E]):(M=d/P,k=d,E=(h-M)/i.w/2,A=[c[0]+E,c[1]-E],S=[u[0],u[1]]),this.xLength2=M,this.yLength2=k,this.xDomain2=A,this.yDomain2=S;var I,z=this.xOffset2=i.l+i.w*A[0],R=this.yOffset2=i.t+i.h*(1-S[1]),F=this.radius=M/L,j=this.innerRadius=this.getHole(t)*F,B=this.cx=z-F*C[0],N=this.cy=R+F*C[3],U=this.cxx=B-z,V=this.cyy=N-R,q=n.side;"counterclockwise"===q?(I=q,q="top"):"clockwise"===q&&(I=q,q="bottom"),this.radialAxis=this.mockAxis(e,t,n,{_id:"x",side:q,_trueSide:I,domain:[j/i.w,F/i.w]}),this.angularAxis=this.mockAxis(e,t,a,{side:"right",domain:[0,Math.PI],autorange:!1}),this.doAutoRange(e,t),this.updateAngularAxis(e,t),this.updateRadialAxis(e,t),this.updateRadialAxisTitle(e,t),this.xaxis=this.mockCartesianAxis(e,t,{_id:"x",domain:A}),this.yaxis=this.mockCartesianAxis(e,t,{_id:"y",domain:S});var H=this.pathSubplot();this.clipPaths.forTraces.select("path").attr("d",H).attr("transform",o(U,V)),r.frontplot.attr("transform",o(z,R)).call(l.setClipUrl,this._hasClipOnAxisFalse?null:this.clipIds.forTraces,this.gd),r.bg.attr("d",H).attr("transform",o(B,N)).call(s.fill,t.bgcolor)},j.mockAxis=function(e,t,r,i){var a=n.extendFlat({},r,i);return d(a,t,e),a},j.mockCartesianAxis=function(e,t,r){var i=this,a=i.isSmith,o=r._id,s=n.extendFlat({type:"linear"},r);h(s,e);var l={x:[0,2],y:[1,3]};return s.setRange=function(){var e=i.sectorBBox,r=l[o],n=i.radialAxis._rl,a=(n[1]-n[0])/(1-i.getHole(t));s.range=[e[r[0]]*a,e[r[1]]*a]},s.isPtWithinRange="x"!==o||a?function(){return!0}:function(e){return i.isPtInside(e)},s.setRange(),s.setScale(),s},j.doAutoRange=function(e,t){var r=this.gd,i=this.radialAxis,n=this.getRadial(t);f(r,i);var a=i.range;if(n.range=a.slice(),n._input.range=a.slice(),i._rl=[i.r2l(a[0],null,"gregorian"),i.r2l(a[1],null,"gregorian")],void 0!==i.minallowed){var o=i.r2l(i.minallowed);i._rl[0]>i._rl[1]?i._rl[1]=Math.max(i._rl[1],o):i._rl[0]=Math.max(i._rl[0],o)}if(void 0!==i.maxallowed){var s=i.r2l(i.maxallowed);i._rl[0]90&&m<=270&&(g.tickangle=180);var x=v?function(e){var t=I(r,C([e.x,0]));return o(t[0]-d,t[1]-f)}:function(e){return o(g.l2p(e.x)+h,0)},b=v?function(e){return P(r,e.x,-1/0,1/0)}:function(e){return r.pathArc(g.r2p(e.x)+h)},_=B(p);if(r.radialTickLayout!==_&&(l["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),y){g.setScale();var w=0,T=v?(g.tickvals||[]).filter(function(e){return e>=0}).map(function(e){return u.tickText(g,e,!0,!1)}):u.calcTicks(g),M=v?T:u.clipEnds(g,T),k=u.getTickSigns(g)[2];v&&(("top"===g.ticks&&"bottom"===g.side||"bottom"===g.ticks&&"top"===g.side)&&(k=-k),"top"===g.ticks&&"top"===g.side&&(w=-g.ticklen),"bottom"===g.ticks&&"bottom"===g.side&&(w=g.ticklen)),u.drawTicks(i,g,{vals:T,layer:l["radial-axis"],path:u.makeTickPath(g,0,k),transFn:x,crisp:!1}),u.drawGrid(i,g,{vals:M,layer:l["radial-grid"],path:b,transFn:n.noop,crisp:!1}),u.drawLabels(i,g,{vals:T,layer:l["radial-axis"],transFn:x,labelFns:u.makeLabelFns(g,w)})}var A=r.radialAxisAngle=r.vangles?R(N(O(p.angle),r.vangles)):p.angle,S=o(d,f),E=S+a(-A);U(l["radial-axis"],y&&(p.showticklabels||p.ticks),{transform:E}),U(l["radial-grid"],y&&p.showgrid,{transform:v?"":S}),U(l["radial-line"].select("line"),y&&p.showline,{x1:v?-c:h,y1:0,x2:c,y2:0,transform:E}).attr("stroke-width",p.linewidth).call(s.stroke,p.linecolor)},j.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var i=this.gd,n=this.radius,a=this.cx,o=this.cy,s=this.getRadial(t),c=this.id+"title",u=0;if(s.title){var h=l.bBox(this.layers["radial-axis"].node()).height,d=s.title.font.size,f=s.side;u="top"===f?d:"counterclockwise"===f?-(h+.4*d):h+.8*d}var p=void 0!==r?r:this.radialAxisAngle,m=O(p),g=Math.cos(m),v=Math.sin(m),x=a+n/2*g+u*v,b=o-n/2*v+u*g;this.layers["radial-axis-title"]=y.draw(i,c,{propContainer:s,propName:this.id+".radialaxis.title.text",placeholder:z(i,"Click to enter radial axis title"),attributes:{x:x,y:b,"text-anchor":"middle"},transform:{rotate:-p}})}},j.updateAngularAxis=function(e,t){var r,i=this,l=i.gd,c=i.layers,h=i.radius,d=i.innerRadius,f=i.cx,p=i.cy,m=i.getAngular(t),g=i.angularAxis,y=i.isSmith;y||(i.fillViewInitialKey("angularaxis.rotation",m.rotation),g.setGeometry(),g.setScale());var v=y?function(e){var t=I(i,C([0,e.x]));return Math.atan2(t[0]-f,t[1]-p)-Math.PI/2}:function(e){return g.t2g(e.x)};"linear"===g.type&&"radians"===g.thetaunit&&(g.tick0=R(g.tick0),g.dtick=R(g.dtick));var x=function(e){return o(f+h*Math.cos(e),p-h*Math.sin(e))},b=y?function(e){var t=I(i,C([0,e.x]));return o(t[0],t[1])}:function(e){return x(v(e))},_=y?function(e){var t=I(i,C([0,e.x])),r=Math.atan2(t[0]-f,t[1]-p)-Math.PI/2;return o(t[0],t[1])+a(-R(r))}:function(e){var t=v(e);return x(t)+a(-R(t))},w=y?function(e){return L(i,e.x,0,1/0)}:function(e){var t=v(e),r=Math.cos(t),i=Math.sin(t);return"M"+[f+d*r,p-d*i]+"L"+[f+h*r,p-h*i]},T=u.makeLabelFns(g,0).labelStandoff,M={};M.xFn=function(e){return Math.cos(v(e))*T},M.yFn=function(e){var t=v(e),r=Math.sin(t)>0?.2:1;return-Math.sin(t)*(T+e.fontSize*r)+Math.abs(Math.cos(t))*(e.fontSize*k)},M.anchorFn=function(e){var t=Math.cos(v(e));return .1>Math.abs(t)?"middle":t>0?"start":"end"},M.heightFn=function(e,t,r){return -.5*(1+Math.sin(v(e)))*r};var A=B(m);i.angularTickLayout!==A&&(c["angular-axis"].selectAll("."+g._id+"tick").remove(),i.angularTickLayout=A);var S=y?[1/0].concat(g.tickvals||[]).map(function(e){return u.tickText(g,e,!0,!1)}):u.calcTicks(g);if(y&&(S[0].text="∞",S[0].fontSize*=1.75),"linear"===t.gridshape?(r=S.map(v),0>n.angleDelta(r[0],r[1])&&(r=r.slice().reverse())):r=null,i.vangles=r,"category"===g.type&&(S=S.filter(function(e){return n.isAngleInsideSector(v(e),i.sectorInRad)})),g.visible){var E="inside"===g.ticks?-1:1,P=(g.linewidth||1)/2;u.drawTicks(l,g,{vals:S,layer:c["angular-axis"],path:"M"+E*P+",0h"+E*g.ticklen,transFn:_,crisp:!1}),u.drawGrid(l,g,{vals:S,layer:c["angular-grid"],path:w,transFn:n.noop,crisp:!1}),u.drawLabels(l,g,{vals:S,layer:c["angular-axis"],repositionOnUpdate:!0,transFn:b,labelFns:M})}U(c["angular-line"].select("path"),m.showline,{d:i.pathSubplot(),transform:o(f,p)}).attr("stroke-width",m.linewidth).call(s.stroke,m.linecolor)},j.updateFx=function(e,t){this.gd._context.staticPlot||(this.isSmith||(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e))},j.updateHoverAndMainDrag=function(e){var t,a,l=this,c=l.isSmith,u=l.gd,h=l.layers,d=e._zoomlayer,f=A.MINZOOM,y=A.OFFEDGE,_=l.radius,w=l.innerRadius,T=l.cx,M=l.cy,k=l.cxx,E=l.cyy,C=l.sectorInRad,L=l.vangles,P=l.radialAxis,I=S.clampTiny,z=S.findXYatLength,D=S.findEnclosingVertexAngles,O=A.cornerHalfWidth,R=A.cornerLen/2,F=p.makeDragger(h,"path","maindrag",!1===e.dragmode?"none":"crosshair");r.select(F).attr("d",l.pathSubplot()).attr("transform",o(T,M)),F.onmousemove=function(e){g.hover(u,e,l.id),u._fullLayout._lasthover=F,u._fullLayout._hoversubplot=l.id},F.onmouseout=function(e){u._dragging||m.unhover(u,e)};var j,B,N,U,V,q,H,G,W,Y={element:F,gd:u,subplot:l.id,plotinfo:{id:l.id,xaxis:l.xaxis,yaxis:l.yaxis},xaxes:[l.xaxis],yaxes:[l.yaxis]};function Z(e,t){return Math.sqrt(e*e+t*t)}function $(e,t){return Math.atan2(E-t,e-k)}function X(e,t){return[e*Math.cos(t),e*Math.sin(-t)]}function K(e,t){if(0===e)return l.pathSector(2*O);var r=R/e,i=t-r,n=t+r,a=Math.max(0,Math.min(e,_)),o=a-O,s=a+O;return"M"+X(o,i)+"A"+[o,o]+" 0,0,0 "+X(o,n)+"L"+X(s,n)+"A"+[s,s]+" 0,0,1 "+X(s,i)+"Z"}function J(e,t,r){if(0===e)return l.pathSector(2*O);var i,n,a,o,s=X(e,t),c=X(e,r),u=I((s[0]+c[0])/2),h=I((s[1]+c[1])/2);if(u&&h){var d=h/u,f=-1/d,p=z(O,d,u,h);a=z(R,f,p[0][0],p[0][1]),o=z(R,f,p[1][0],p[1][1])}else h?(i=R,n=O):(i=O,n=R),a=[[u-i,h-n],[u+i,h-n]],o=[[u-i,h+n],[u+i,h+n]];return"M"+a.join("L")+"L"+o.reverse().join("L")+"Z"}function Q(e,t){return t=Math.max(Math.min(t,_),w),ef?(e-1&&1===e&&x(t,u,[l.xaxis],[l.yaxis],l.id,Y),r.indexOf("event")>-1&&g.click(u,t,l.id)}Y.prepFn=function(e,r,i){var o,h=u._fullLayout.dragmode,f=F.getBoundingClientRect();u._fullLayout._calcInverseTransform(u);var m=u._fullLayout._invTransform;t=u._fullLayout._invScaleX,a=u._fullLayout._invScaleY;var g=n.apply3DTransform(m)(r-f.left,i-f.top);if(j=g[0],B=g[1],L){var y=S.findPolygonOffset(_,C[0],C[1],L);j+=k+y[0],B+=E+y[1]}switch(h){case"zoom":Y.clickFn=eo,c||(L?Y.moveFn=ei:Y.moveFn=et,Y.doneFn=en,N=null,U=null,V=l.pathSubplot(),q=!1,o=u._fullLayout[l.id],H=s.luminosity(o.bgcolor),(G=p.makeZoombox(d,H,T,M,V)).attr("fill-rule","evenodd"),W=p.makeCorners(d,T,M),b(u));break;case"select":case"lasso":v(e,r,i,Y,h)}},m.init(Y)},j.updateRadialDrag=function(e,t,s){var l,c,u,h=this,d=h.gd,f=h.layers,g=h.radius,y=h.innerRadius,v=h.cx,x=h.cy,_=h.radialAxis,T=A.radialDragBoxSize,k=T/2;if(_.visible){var S,E,C,L=O(h.radialAxisAngle),P=_._rl,I=P[0],z=P[1],D=P[s],F=.75*(P[1]-P[0])/(1-h.getHole(t))/g;s?(S=v+(g+k)*Math.cos(L),E=x-(g+k)*Math.sin(L),C="radialdrag"):(S=v+(y-k)*Math.cos(L),E=x-(y-k)*Math.sin(L),C="radialdrag-inner");var j=p.makeRectDragger(f,C,"crosshair",-k,-k,T,T),B={element:j,gd:d};!1===e.dragmode&&(B.dragmode=!1),U(r.select(j),_.visible&&y0!=(s?u>I:u")}}t.exports={hoverPoints:function(e,t,n,a){var o=r(e,t,n,a);if(!(!o||!1===o[0].index)){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}}}),bv=p({"src/traces/scatterpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:bh(),categories:["polar","symbols","showLegend","scatter-like"],attributes:bd(),supplyDefaults:bf().supplyDefaults,colorbar:ne(),formatLabels:bp(),calc:bm(),plot:bg(),style:nr().style,styleOnSelect:nr().styleOnSelect,hoverPoints:by().hoverPoints,selectPoints:na(),meta:{}}}}),bx=p({"lib/scatterpolar.js"(e,t){t.exports=bv()}}),bb=p({"src/traces/scatterpolargl/attributes.js"(e,t){var i=bd(),{cliponaxis:a,hoveron:s}=i,u=((e,t)=>{var r={};for(var i in e)l.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&o)for(var i of o(e))0>t.indexOf(i)&&c.call(e,i)&&(r[i]=e[i]);return r})(i,["cliponaxis","hoveron"]),{connectgaps:h,line:{color:f,dash:p,width:m},fill:g,fillcolor:y,marker:v,textfont:x,textposition:b}=p0();t.exports=r(d({},u),n({connectgaps:h,fill:g,fillcolor:y,line:{color:f,dash:p,editType:"calc",width:m},marker:v,textfont:x,textposition:b}))}}),b_=p({"src/traces/scatterpolargl/defaults.js"(e,t){var r=tv(),i=t5(),n=bf().handleRThetaDefaults,a=iq(),o=iH(),s=iW(),l=iY(),c=iy().PTS_LINESONLY,u=bb();t.exports=function(e,t,h,d){function f(i,n){return r.coerce(e,t,u,i,n)}var p=n(e,t,d,f);if(!p){t.visible=!1;return}f("thetaunit"),f("mode",p=l&&(v.marker.cluster=p.tree),v.marker&&(v.markerSel.positions=v.markerUnsel.positions=v.marker.positions=_),v.line&&_.length>1&&s.extendFlat(v.line,o.linePositions(e,f,_)),v.text&&(s.extendFlat(v.text,{positions:_},o.textPosition(e,f,v.text,v.marker)),s.extendFlat(v.textSel,{positions:_},o.textPosition(e,f,v.text,v.markerSel)),s.extendFlat(v.textUnsel,{positions:_},o.textPosition(e,f,v.text,v.markerUnsel))),v.fill&&!d.fill2d&&(d.fill2d=!0),v.marker&&!d.scatter2d&&(d.scatter2d=!0),v.line&&!d.line2d&&(d.line2d=!0),v.text&&!d.glText&&(d.glText=!0),d.lineOptions.push(v.line),d.fillOptions.push(v.fill),d.markerOptions.push(v.marker),d.markerSelectedOptions.push(v.markerSel),d.markerUnselectedOptions.push(v.markerUnsel),d.textOptions.push(v.text),d.textSelectedOptions.push(v.textSel),d.textUnselectedOptions.push(v.textUnsel),d.selectBatch.push([]),d.unselectBatch.push([]),p.x=w,p.y=T,p.rawx=w,p.rawy=T,p.r=g,p.theta=y,p.positions=_,p._scene=d,p.index=d.count,d.count++}}),n(e,t,c)}},t.exports.reglPrecompiled={}}}),bS=p({"src/traces/scatterpolargl/index.js"(e,t){var r=bk();r.plot=bA(),t.exports=r}}),bE=p({"lib/scatterpolargl.js"(e,t){t.exports=bS()}}),bC=p({"src/traces/barpolar/attributes.js"(e,t){var r,{hovertemplateAttrs:i,templatefallbackAttrs:n}=eW(),a=q().extendFlat,o=bd(),s=a_();t.exports={r:o.r,theta:o.theta,r0:o.r0,dr:o.dr,theta0:o.theta0,dtheta:o.dtheta,thetaunit:o.thetaunit,base:a({},s.base,{}),offset:a({},s.offset,{}),width:a({},s.width,{}),text:a({},s.text,{}),hovertext:a({},s.hovertext,{}),marker:(r=a({},s.marker),delete r.cornerradius,r),hoverinfo:o.hoverinfo,hovertemplate:i(),hovertemplatefallback:n(),selected:s.selected,unselected:s.unselected}}}),bL=p({"src/traces/barpolar/layout_attributes.js"(e,t){t.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),bP=p({"src/traces/barpolar/defaults.js"(e,t){var r=tv(),i=bf().handleRThetaDefaults,n=aT(),a=bC();t.exports=function(e,t,o,s){function l(i,n){return r.coerce(e,t,a,i,n)}if(!i(e,t,s,l)){t.visible=!1;return}l("thetaunit"),l("base"),l("offset"),l("width"),l("text"),l("hovertext"),l("hovertemplate"),l("hovertemplatefallback"),n(e,t,l,o,s),r.coerceSelectionMarkerOpacity(t,l)}}}),bI=p({"src/traces/barpolar/layout_defaults.js"(e,t){var r=tv(),i=bL();t.exports=function(e,t,n){var a,o={};function s(n,o){return r.coerce(e[a]||{},t[a],i,n,o)}for(var l=0;l0?(a=r,s=i):(a=i,s=r);var a,s,h=o.findEnclosingVertexAngles(a,l.vangles)[0],d=o.findEnclosingVertexAngles(s,l.vangles)[1],f=[h,(a+s)/2,d];return o.pathPolygonAnnulus(e,t,a,s,f,c,u)}:function(e,t,r,i){return n.pathAnnulus(e,t,r,i,c,u)}),y=t.layers.frontplot.select("g.barlayer");n.makeTraceGroups(y,s,"trace bars").each(function(){var o=r.select(this),s=n.ensureSingle(o,"g","points").selectAll("g.point").data(n.identity);s.enter().append("g").style("vector-effect",h?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),s.exit().remove(),s.each(function(e){var t,a=r.select(this),o=e.rp0=p.c2p(e.s0),s=e.rp1=p.c2p(e.s1),l=e.thetag0=m.c2g(e.p0),c=e.thetag1=m.c2g(e.p1);if(i(o)&&i(s)&&i(l)&&i(c)&&o!==s&&l!==c){var u=p.c2g(e.s1),h=(l+c)/2;e.ct=[d.c2p(u*Math.cos(h)),f.c2p(u*Math.sin(h))],t=g(o,s,l,c)}else t="M0,0Z";n.ensureSingle(a,"path").attr("d",t)}),a.setClipUrl(o,t._hasClipOnAxisFalse?t.clipIds.forTraces:null,e)})}}}),bO=p({"src/traces/barpolar/hover.js"(e,t){var r=rD(),i=tv(),n=aI().getTraceColor,a=i.fillText,o=by().makeHoverPointText,s=bo().isPtInsidePolygon;t.exports=function(e,t,l){var c=e.cd,u=c[0].trace,h=e.subplot,d=h.radialAxis,f=h.angularAxis,p=h.vangles,m=p?s:i.isPtInsideSector,g=e.maxHoverDistance,y=f._period||2*Math.PI,v=Math.abs(d.g2p(Math.sqrt(t*t+l*l))),x=Math.atan2(l,t);if(d.range[0]>d.range[1]&&(x+=Math.PI),r.getClosest(c,function(e){return m(v,x,[e.rp0,e.rp1],[e.thetag0,e.thetag1],p)?g+Math.min(1,Math.abs(e.thetag1-e.thetag0)/y)-1+(e.rp1-v)/(e.rp1-e.rp0)-1:1/0},e),!1!==e.index){var b=c[e.index];e.x0=e.x1=b.ct[0],e.y0=e.y1=b.ct[1];var _=i.extendFlat({},b,{r:b.s,theta:b.p});return a(b,u,e),o(_,u,h,e),e.hovertemplate=u.hovertemplate,e.color=n(u,b),e.xLabelVal=e.yLabelVal=void 0,b.s<0&&(e.idealAlign="left"),[e]}}}}),bR=p({"src/traces/barpolar/index.js"(e,t){t.exports={moduleType:"trace",name:"barpolar",basePlotModule:bh(),categories:["polar","bar","showLegend"],attributes:bC(),layoutAttributes:bL(),supplyDefaults:bP(),supplyLayoutDefaults:bI(),calc:bz().calc,crossTraceCalc:bz().crossTraceCalc,plot:bD(),colorbar:ne(),formatLabels:bp(),style:aL().style,styleOnSelect:aL().styleOnSelect,hoverPoints:bO(),selectPoints:aD(),meta:{}}}}),bF=p({"lib/barpolar.js"(e,t){t.exports=bR()}}),bj=p({"src/plots/smith/constants.js"(e,t){t.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),bB=p({"src/plots/smith/layout_attributes.js"(e,t){var r=Q(),i=tN(),n=at().attributes,a=tv().extendFlat,o=eq().overrideAll,s=o({color:i.color,showline:a({},i.showline,{dflt:!0}),linecolor:i.linecolor,linewidth:i.linewidth,showgrid:a({},i.showgrid,{dflt:!0}),gridcolor:i.gridcolor,gridwidth:i.gridwidth,griddash:i.griddash},"plot","from-root"),l=o({ticklen:i.ticklen,tickwidth:a({},i.tickwidth,{dflt:2}),tickcolor:i.tickcolor,showticklabels:i.showticklabels,labelalias:i.labelalias,showtickprefix:i.showtickprefix,tickprefix:i.tickprefix,showticksuffix:i.showticksuffix,ticksuffix:i.ticksuffix,tickfont:i.tickfont,tickformat:i.tickformat,hoverformat:i.hoverformat,layer:i.layer},"plot","from-root"),c=a({visible:a({},i.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:a({},i.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},s,l),u=a({visible:a({},i.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:i.ticks,editType:"calc"},s,l);t.exports={domain:n({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:r.background},realaxis:c,imaginaryaxis:u,editType:"calc"}}}),bN=p({"src/plots/smith/layout_defaults.js"(e,t){var r,i,n,a=tv(),o=ee(),s=tS(),l=o9(),c=tI().getSubplotData,u=tK(),h=tX(),d=nc(),f=rt(),p=bB(),m=bj(),g=m.axisNames,y=(r=function(e){return a.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(e){return-e}).concat([0]).concat(e)},i=String,n={},function(e){var t=i?i(e):e;if(t in n)return n[t];var a=r(e);return n[t]=a,a});function v(e,t,r,i){var n=r("bgcolor");i.bgColor=o.combine(n,i.paper_bgcolor);var l,v=c(i.fullData,m.name,i.id),x=i.layoutOut;function b(e,t){return r(l+"."+e,t)}for(var _=0;_")}}t.exports={hoverPoints:function(e,t,n,a){var o=r(e,t,n,a);if(!(!o||!1===o[0].index)){var s=o[0];if(void 0===s.index)return o;var l=e.subplot,c=s.cd[s.index],u=s.trace;if(l.isPtInside(c))return s.xLabelVal=void 0,s.yLabelVal=void 0,i(c,u,l,s),s.hovertemplate=u.hovertemplate,o}},makeHoverPointText:i}}}),bZ=p({"src/traces/scattersmith/index.js"(e,t){t.exports={moduleType:"trace",name:"scattersmith",basePlotModule:bU(),categories:["smith","symbols","showLegend","scatter-like"],attributes:bV(),supplyDefaults:bq(),colorbar:ne(),formatLabels:bH(),calc:bG(),plot:bW(),style:nr().style,styleOnSelect:nr().styleOnSelect,hoverPoints:bY().hoverPoints,selectPoints:na(),meta:{}}}}),b$=p({"lib/scattersmith.js"(e,t){t.exports=bZ()}}),bX=p({"src/traces/quiver/attributes.js"(e,t){var r=Z(),i=eW().hovertemplateAttrs,n=tB().axisHoverFormat,a=q().extendFlat,o=tV(),s=eH().dash,l=ig(),c=ix();t.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:c.x0,dx:c.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:c.y0,dy:c.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:n("x"),yhoverformat:n("y"),uhoverformat:n("u","noDate"),vhoverformat:n("v","noDate"),hoverinfo:a({},r.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:i({},{keys:["x","y","u","v","text","name"]}),text:c.text,textposition:c.textposition,textfont:c.textfont,marker:a({arrowsize:a({},l.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:s,editType:"style"},editType:"calc"},o("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}}}}),bK=p({"src/traces/quiver/defaults.js"(e,t){var r=tv(),i=bX(),n=iN(),a=tj().hasColorscale,o=tQ();t.exports=function(e,t,s,l){function c(n,a){return r.coerce(e,t,i,n,a)}var u=n(e,t,l,c);if(!u){t.visible=!1;return}var h=c("u"),d=c("v");if(!r.isArrayOrTypedArray(h)||0===h.length){t.u=Array(u);for(var f=0;fE&&(E=u[R]),h[R]L&&(L=h[R]),FI&&(I=F),jD&&(D=j);var V=Math.sqrt(F*F+j*j);if(V>m&&(m=V),Vy&&(y=q))}}else B.x=a,B.y=a}if(t._maxNorm=m,"scaled"===T||"paper"===M){let e=E-S,r=L-C;t._scaleFactor=(0===e&&0===r?1:(e+r+Math.sqrt((e-r)*(e-r)+4*O*e*r))/(2*(O-1)))*.97/t._maxNorm}else t._scaleFactor=1;t._scaleFactor*=t.lengthfactor;let H=Array(d),G=Array(d),W=Array(d),Y=Array(d);for(var Z,$,X,R=0;Re.i&&isFinite(o[e.i]))a=o[e.i];else{var s=t.u&&t.u[e.i]||0,l=t.v&&t.v[e.i]||0;a=Math.sqrt(s*s+l*l)}return n(a)})}function l(e,t,a){var l=t[0].trace,c=l.marker||{},u=c.line||{},h=i.isArrayOrTypedArray(c.color)?void 0:c.color,d=l._hasColorscale;if(a)if(l.selectedpoints){var f=(l.selected||{}).marker||{},p=(l.unselected||{}).marker||{},m=f.line||{},g=p.line||{};a.selectAll("path.js-line").each(function(e){var t=r.select(this),i=!e.selected,a=i?p.color:f.color,c=i?void 0!==g.width?g.width:u.width:void 0!==m.width?m.width:u.width;a?(n.lineGroupStyle(t,c,a,u.dash),t.style("stroke-opacity",1)):(n.lineGroupStyle(t,c,h,u.dash),d&&s(t,l),t.style("stroke-opacity",i?o:1))}),n.selectedTextStyle(a.selectAll("text"),l)}else{var y=a.selectAll("path.js-line");y.call(n.lineGroupStyle,u.width,h,u.dash),d&&s(y,l),y.style("stroke-opacity",1),n.textPointStyle(a.selectAll("text"),l,e)}}t.exports={style:function(e){r.select(e).selectAll("g.trace.quiver").each(function(t){l(e,t,r.select(this))})},styleOnSelect:function(e,t,r){l(e,t,r)},colorscaleStroke:s}}}),b1=p({"src/traces/quiver/plot.js"(e,t){var r=T(),i=tv(),n=t9(),a=b0().colorscaleStroke,o=Math.PI/12;function s(e,t,s,l,c,u,h){var d=l[0].trace,f=s.xaxis,p=s.yaxis;l[0][s.isRangePlot?"nodeRangePlot3":"node3"]=r.select(u);var m=r.select(u).selectAll("g.lines").data([l]);m.enter().append("g").classed("lines",!0),n.setClipUrl(m,s.layerClipId,e);var g=m.selectAll("path.js-line").data(l);g.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),g.exit().remove();let{anchor:y,maxNorm:v=0,arrowref:x}=d,b="paper"===x?d._scaleFactor*Math.sqrt(Math.abs(f._m*p._m)):d._scaleFactor,_=d.marker.arrowsize;g.each(function(e){let t=r.select(this);if(void 0===e.x||void 0===e.y)return void t.attr("d",null);let i=("paper"===x?e._u*Math.sign(f._m):r.round(f._m*e._u))*b,n=("paper"===x?e._v*Math.sign(p._m):r.round(p._m*e._v))*b,a=void 0!==(d._input.marker||{}).arrowsize;"tip"===y?(s=f.c2p(e.x)-i,c=p.c2p(e.y)-n,l=f.c2p(e.x),u=p.c2p(e.y)):"center"===y?(s=f.c2p(e.x)-i/2,c=p.c2p(e.y)-n/2,l=f.c2p(e.x)+i/2,u=p.c2p(e.y)+n/2):(s=f.c2p(e.x),c=p.c2p(e.y),l=f.c2p(e.x)+i,u=p.c2p(e.y)+n),e._px0=s,e._py0=c,e._px1=l,e._py1=u;var s,l,c,u,h=d.marker.line.width;a||(h=Math.max(h,1.5));let m=Math.min(5.8*_*h,.7*Math.sqrt((l-s)*(l-s)+(u-c)*(u-c))),g=Math.atan2(u-c,l-s),v=l-m*Math.cos(g-o),w=u-m*Math.sin(g-o),T=l-m*Math.cos(g+o),M=u-m*Math.sin(g+o),k="M"+s+","+c+"L"+l+","+u+"L"+v+","+w+"L"+l+","+u+"L"+T+","+M;t.attr("d",k)});var w=d.marker||{},T=w.line||{},M=i.isArrayOrTypedArray(w.color)?void 0:w.color;n.lineGroupStyle(g,T.width,M,T.dash),d._hasColorscale&&a(g,d);var k=r.select(u).selectAll("g.text").data([l]);k.enter().append("g").classed("text",!0),n.setClipUrl(k,s.layerClipId,e);var A=k.selectAll("g.textpoint").data(l);if(A.enter().append("g").classed("textpoint",!0).append("text"),A.exit().remove(),A.each(function(e){var t=r.select(this);n.translatePoint(e,t.select("text"),f,p)||t.remove()}),A.selectAll("text").call(n.textPointStyle,d,e).each(function(e){var t=f.c2p(e.x),i=p.c2p(e.y);r.select(this).selectAll("tspan.line").each(function(){r.select(this).attr({x:t,y:i})})}),h&&h.duration>0){var S=r.transition().duration(h.duration).ease(h.easing);g.transition(S).style("opacity",1)}}t.exports=function(e,t,i,n,a,o){var l,c,u=!a,h=!!a&&a.duration>0;((l=n.selectAll("g.trace").data(i,function(e){return e[0].trace.uid})).enter().append("g").attr("class",function(e){return"trace quiver trace"+e[0].trace.uid}).style("stroke-miterlimit",2),l.order(),h)?(o&&(c=o()),r.transition().duration(a.duration).ease(a.easing).each("end",function(){c&&c()}).each("interrupt",function(){c&&c()}).each(function(){n.selectAll("g.trace").each(function(r,n){s(e,n,t,r,i,this,a)})})):l.each(function(r,n){s(e,n,t,r,i,this,a)}),u&&l.exit().remove()}}}),b2=p({"src/traces/quiver/hover.js"(e,t){var r=tv(),i=rD(),n=ni();t.exports=function(e,t,a,o){var s=e.cd,l=s[0].trace,c=e.xa,u=e.ya,h=c.c2p(t),d=u.c2p(a);if(i.getClosest(s,function(e){return void 0===e._px0?1/0:function(e,t,r,i,n,a){let o=n-r,s=a-i,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-i)*(t-i));var c=((e-r)*o+(t-i)*s)/l;let u=r+(c=Math.max(0,Math.min(1,c)))*o,h=i+c*s;return Math.sqrt((e-u)*(e-u)+(t-h)*(t-h))}(h,d,e._px0,e._py0,e._px1,e._py1)},e),!1!==e.index){var f=s[e.index],p=c.c2p(f.x,!0),m=u.c2p(f.y,!0),g=Math.sqrt((h-p)*(h-p)+(d-m)*(d-m));e.index=f.i;var y=l.u?l.u[f.i]:0,v=l.v?l.v[f.i]:0;return r.extendFlat(e,{color:n(l,f),x0:p-3,x1:p+3,xLabelVal:f.x,y0:m-3,y1:m+3,yLabelVal:f.y,uLabelVal:y,vLabelVal:v,extraText:"u: "+y+", v: "+v,spikeDistance:g,hovertemplate:l.hovertemplate}),r.fillText(f,l,e),[e]}}}}),b3=p({"src/traces/quiver/format_labels.js"(e,t){var r=rn(),i=tv();t.exports=function(e,t,n){var a={},o={_fullLayout:n},s=r.getFromTrace(o,t,"x"),l=r.getFromTrace(o,t,"y"),c=e.x,u=e.y;a.xLabel=r.tickText(s,s.c2l(c),!0).text,a.yLabel=r.tickText(l,l.c2l(u),!0).text;var h=t.u?t.u[e.i]:0,d=t.v?t.v[e.i]:0,f=t.uhoverformat,p=t.vhoverformat;return a.uLabel=f?i.numberFormat(f)(h):String(h),a.vLabel=p?i.numberFormat(p)(d):String(d),a}}}),b5=p({"src/traces/quiver/event_data.js"(e,t){t.exports=function(e,t,r,i,n){return e.x=t.x,e.y=t.y,e.u=r.u?r.u[n]:void 0,e.v=r.v?r.v[n]:void 0,e}}}),b4=p({"src/traces/quiver/index.js"(e,t){t.exports={moduleType:"trace",name:"quiver",basePlotModule:np(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:bX(),supplyDefaults:bK(),calc:bJ(),crossTraceCalc:bQ(),plot:b1(),style:b0().style,styleOnSelect:b0().styleOnSelect,hoverPoints:b2(),formatLabels:b3(),eventData:b5(),selectPoints:na(),colorbar:ne(),animatable:!0,meta:{}}}}),b6=p({"lib/quiver.js"(e,t){t.exports=b4()}}),b8=p({"node_modules/world-calendars/dist/main.js"(e,t){var r=mR();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 n(e,t,r,i){if(this._calendar=e,this._year=t,this._month=r,this._day=i,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function a(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}function o(){this.shortYearCutoff="+10"}function s(e){this.local=this.regionalOptions[e]||this.regionalOptions[""]}r(i.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,i,n){return(i=(null!=e&&e.year?e.calendar():"string"==typeof i?this.instance(i,n):i)||this.instance()).newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(t){return e[t]})}},substituteChineseDigits:function(e,t){return function(r){for(var i="",n=0;r>0;){var a=r%10;i=(0===a?"":e[a]+t[n])+i,n++,r=Math.floor(r/10)}return 0===i.indexOf(e[1]+t[1])&&(i=i.substr(1)),i||e[0]}}}),r(n.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e??this,t,r)},year:function(e){return 0==arguments.length?this._year:this.set(e,"y")},month:function(e){return 0==arguments.length?this._month:this.set(e,"m")},day:function(e){return 0==arguments.length?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(l.local.invalidDate||l.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,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(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(l.local.differentCalendars||l.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return 0===t?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(0>this.year()?"-":"")+a(Math.abs(this.year()),4)+"-"+a(this.month(),2)+"-"+a(this.day(),2)}}),r(o.prototype,{_validateLevel:0,newDate:function(e,t,r){return null==e?this.today():(e.year&&(this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new n(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){return 0>this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear).year()?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return(0>t.year()?"-":"")+a(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,l.local.invalidYear||l.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,"d"===r||"w"===r){var i=e.toJD()+t*("w"===r?this.daysInWeek():1),n=e.calendar().fromJD(i);return this._validateLevel--,[n.year(),n.month(),n.day()]}try{var a=e.year()+("y"===r?t:0),o=e.monthOfYear()+("m"===r?t:0),n=e.day();"y"===r?(e.month()!==this.fromMonthOfYear(a,o)&&(o=this.newDate(a,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(a)),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o)))):"m"===r&&(function(e){for(;ot-1+e.minMonth;)a++,o-=t,t=e.monthsInYear(a)}(this),n=Math.min(n,this.daysInMonth(a,this.fromMonthOfYear(a,o))));var s=[a,this.fromMonthOfYear(a,o),n];return this._validateLevel--,s}catch(e){throw this._validateLevel--,e}},_correctAdd:function(e,t,r,i){if(!this.hasYearZero&&("y"===i||"m"===i)&&(0===t[0]||e.year()>0!=t[0]>0)){var n={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i];t=this._add(e,r*n[0]+(r<0?-1:1)*n[1],n[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,l.local.invalidDate||l.regionalOptions[""].invalidDate);var i="y"===r?t:e.year(),n="m"===r?t:e.month(),a="d"===r?t:e.day();return("y"===r||"m"===r)&&(a=Math.min(a,this.daysInMonth(i,n))),e.date(i,n,a)},isValid:function(e,t,r){this._validateLevel++;var i=this.hasYearZero||0!==e;if(i){var n=this.newDate(e,t,this.minDay);i=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDayt.year());return e%4==0&&(e%100!=0||e%400==0)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,l.local.invalidMonth||l.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate);e=i.year(),t=i.month(),r=i.day(),e<0&&e++,t<3&&(t+=12,e--);var n=Math.floor(e/100);return Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r+(2-n+Math.floor(n/4))-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=Math.floor((t-1867216.25)/36524.25),i=(r=t+1+r-Math.floor(r/4))+1524,n=Math.floor((i-122.1)/365.25),a=Math.floor(365.25*n),o=Math.floor((i-a)/30.6001),s=i-a-Math.floor(30.6001*o),l=o-(o>13.5?13:1),c=n-(l>2.5?4716:4715);return c<=0&&c--,this.newDate(c,l,s)},toJSDate:function(e,t,r){var i=this._validate(e,t,r,l.local.invalidDate||l.regionalOptions[""].invalidDate),n=new Date(i.year(),i.month()-1,i.day());return n.setHours(0),n.setMinutes(0),n.setSeconds(0),n.setMilliseconds(0),n.setHours(n.getHours()>12?n.getHours()+2:0),n},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var l=t.exports=new i;l.cdate=n,l.baseCalendar=o,l.calendars.gregorian=s}}),b7=p({"node_modules/world-calendars/dist/plus.js"(){var e=mR(),t=b8();e(t.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"}),t.local=t.regionalOptions[""],e(t.cdate.prototype,{formatDate:function(e,t){return"string"!=typeof e&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}}),e(t.baseCalendar.prototype,{UNIX_EPOCH:t.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:t.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(e,r,i){if("string"!=typeof e&&(i=r,r=e,e=""),!r)return"";if(r.calendar()!==this)throw t.local.invalidFormat||t.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,i=i||{};for(var n,a,o,s=i.dayNamesShort||this.local.dayNamesShort,l=i.dayNames||this.local.dayNames,c=i.monthNumbers||this.local.monthNumbers,u=i.monthNamesShort||this.local.monthNamesShort,h=i.monthNames||this.local.monthNames,d=(i.calculateWeek||this.local.calculateWeek,function(t,r){for(var i=1;v+i1}),f=function(e,t,r,i){var n=""+t;if(d(e,i))for(;n.length1},x=function(e,i){var n=v(e,i),a=RegExp("^-?\\d{1,"+[2,3,n?4:2,n?4:2,10,11,20]["oyYJ@!".indexOf(e)+1]+"}"),o=r.substring(T).match(a);if(!o)throw(t.local.missingNumberAt||t.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=o[0].length,parseInt(o[0],10)},b=this,_=function(e,i,n,a){for(var o=v(e,a)?n:i,s=0;s-1){f=1,p=m;for(var A=this.daysInMonth(d,f);p>A;A=this.daysInMonth(d,f))f++,p-=A}return h>-1?this.fromJD(h):this.newDate(d,f,p)},determineDate:function(e,t,r,i,n){r&&"object"!=typeof r&&(n=i,i=r,r=null),"string"!=typeof i&&(n=i,i="");var a=this;return t=t?t.newDate():null,e=null==e?t:"string"==typeof e?function(e){try{return a.parseDate(i,e,n)}catch{}e=e.toLowerCase();for(var t=(e.match(/^c/)&&r?r.newDate():null)||a.today(),o=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,s=o.exec(e);s;)t.add(parseInt(s[1],10),s[2]||"d"),s=o.exec(e);return t}(e):"number"==typeof e?isNaN(e)||e===1/0||e===-1/0?t:a.today().add(e,"d"):a.newDate(e)}})}}),b9=p({"node_modules/world-calendars/dist/calendars/chinese.js"(){var e=b8(),t=mR(),r=e.instance();function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new e.baseCalendar,t(i.prototype,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if("string"==typeof e){var r=e.match(a);return r?r[0]:""}var i=this._validateYear(e),n=e.month(),o=""+this.toChineseMonth(i,n);return t&&o.length<2&&(o="0"+o),this.isIntercalaryMonth(i,n)&&(o+="i"),o},monthNames:function(e){if("string"==typeof e){var t=e.match(o);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][this.toChineseMonth(r,i)-1];return this.isIntercalaryMonth(r,i)&&(n="闰"+n),n},monthNamesShort:function(e){if("string"==typeof e){var t=e.match(s);return t?t[0]:""}var r=this._validateYear(e),i=e.month(),n=["一","二","三","四","五","六","七","八","九","十","十一","十二"][this.toChineseMonth(r,i)-1];return this.isIntercalaryMonth(r,i)&&(n="闰"+n),n},parseMonth:function(e,t){e=this._validateYear(e);var r,i=parseInt(t);if(isNaN(i))"闰"===t[0]&&(r=!0,t=t.substring(1)),"月"===t[t.length-1]&&(t=t.substring(0,t.length-1)),i=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(t);else{var n=t[t.length-1];r="i"===n||"I"===n}return this.toMonthIndex(e,i,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(e,t){if(e.year&&(e=e.year()),"number"!=typeof e||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(t,r,i){var n=this.intercalaryMonth(t);if(i&&r!==n||r<1||r>12)throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return n?!i&&r<=n?r-1:r:r-1},toChineseMonth:function(t,r){t.year&&(r=(t=t.year()).month());var i=this.intercalaryMonth(t);if(r<0||r>(i?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return i?r>13},isIntercalaryMonth:function(e,t){e.year&&(t=(e=e.year()).month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return 0!==this.intercalaryMonth(e)},weekOfYear:function(t,i,n){var a,o=c[this._validateYear(t,e.local.invalidyear)-c[0]];return(a=r.newDate(o>>9&4095,o>>5&15,31&o)).add(4-(a.dayOfWeek()||7),"d"),1+Math.floor((this.toJD(t,i,n)-a.toJD())/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(t,r){t.year&&(r=t.month(),t=t.year());var i=l[(t=this._validateYear(t))-l[0]];if(r>(i>>13?12:11))throw e.local.invalidMonth.replace(/\{0\}/,this.local.name);return i&1<<12-r?30:29},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,i,n){var a=this._validate(t,s,n,e.local.invalidDate);t=this._validateYear(a.year()),i=a.month(),n=a.day();var o=this.isIntercalaryMonth(t,i),s=this.toChineseMonth(t,i),u=function(e,t,r,i){if("object"==typeof e)a=e,n=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw Error("Lunar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw Error("Lunar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=30))throw Error("Lunar day outside range 1 - 30");"object"==typeof i?(o=!1,n=i):(o=!!i,n={}),a={year:e,month:t,day:r,isIntercalary:o}}var n,a,o,s,u=a.day-1,h=l[a.year-l[0]],d=h>>13;s=d&&(a.month>d||a.isIntercalary)?a.month:a.month-1;for(var f=0;f>9&4095,(p>>5&15)-1,(31&p)+u);return n.year=m.getFullYear(),n.month=1+m.getMonth(),n.day=m.getDate(),n}(t,s,n,o);return r.toJD(u.year,u.month,u.day)},fromJD:function(e){var t=r.fromJD(e),i=function(e,t,r){if("object"==typeof e)a=e,o=t||{};else{if(!("number"==typeof e&&e>=1888&&e<=2111))throw Error("Solar year outside range 1888-2111");if(!("number"==typeof t&&t>=1&&t<=12))throw Error("Solar month outside range 1 - 12");if(!("number"==typeof r&&r>=1&&r<=31))throw Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},o={}}var i=c[a.year-c[0]],n=a.year<<9|a.month<<5|a.day;o.year=n>=i?a.year:a.year-1;var a,o,s,u=new Date((i=c[o.year-c[0]])>>9&4095,(i>>5&15)-1,31&i);s=Math.round((new Date(a.year,a.month-1,a.day)-u)/864e5);var h,d=l[o.year-l[0]];for(h=0;h<13;h++){var f=d&1<<12-h?30:29;if(s>13;return!p||hr.year());return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(13===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return(t=n.year())<0&&t++,n.day()+(n.month()-1)*30+(t-1)*365+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--;var i=Math.floor((t=Math.floor(e)+.5-this.newDate(r,1,1).toJD())/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}}),e.calendars.coptic=r}}),_t=p({"node_modules/world-calendars/dist/calendars/discworld.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Discworld",jdEpoch:1721425.5,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),!1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),13},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),400},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/8)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(t,r,i){return(this._validate(t,r,i,e.local.invalidDate).day()+1)%8},weekDay:function(e,t,r){var i=this.dayOfWeek(e,t,r);return i>=2&&i<=6},extraInfo:function(t,r,n){return{century:i[Math.floor((this._validate(t,r,n,e.local.invalidDate).year()-1)/100)+1]||""}},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return t=n.year()+ +(0>n.year()),r=n.month(),(i=n.day())+16*(r>1)+(r>2?(r-2)*32:0)+(t-1)*400+this.jdEpoch-1},fromJD:function(e){var t=Math.floor((e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1)/400)+1;e-=(t-1)*400;var r=Math.floor((e+=16*(e>15))/32)+1,i=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,i)}});var i={20:"Fruitbat",21:"Anchovy"};e.calendars.discworld=r}}),_r=p({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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 r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=r.year()+ +(0>r.year());return t%4==3||t%4==-1},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(13===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return(t=n.year())<0&&t++,n.day()+(n.month()-1)*30+(t-1)*365+Math.floor(t/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--;var i=Math.floor((t=Math.floor(e)+.5-this.newDate(r,1,1).toJD())/30)+1,n=t-(i-1)*30+1;return this.newDate(r,i,n)}}),e.calendars.ethiopian=r}}),_i=p({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function i(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.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 r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return this._leapYear(r.year())},_leapYear:function(e){return 7>i(7*(e=e<0?e+1:e)+1,19)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),this._leapYear(t.year?t.year():t)?13:12},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(t){return t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),this.toJD(-1===t?1:t+1,7,1)-this.toJD(t,7,1)},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),12===r&&this.leapYear(t)||8===r&&5===i(this.daysInYear(t),10)?30:9===r&&3===i(this.daysInYear(t),10)?29:this.daysPerMonth[r-1]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},extraInfo:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);t=n.year(),r=n.month(),i=n.day();var a=t<=0?t+1:t,o=this.jdEpoch+this._delay1(a)+this._delay2(a)+i+1;if(r<7){for(var s=7;s<=this.monthsInYear(t);s++)o+=this.daysInMonth(t,s);for(var s=1;si(3*(r+1),7)&&r++,r},_delay2:function(e){var t=this._delay1(e-1),r=this._delay1(e);return this._delay1(e+1)-r==356?2:+(r-t==382)},fromJD:function(e){e=Math.floor(e)+.5;for(var t=Math.floor((e-this.jdEpoch)*98496/0x224f0b7)-1;e>=this.toJD(-1===t?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}}),e.calendars.hebrew=r}}),_n=p({"node_modules/world-calendars/dist/calendars/islamic.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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īs","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,e.local.invalidYear).year()+14)%30<11},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(12===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return t=n.year(),r=n.month(),(i=n.day())+Math.ceil(29.5*(r-1))+((t=t<=0?t+1:t)-1)*354+Math.floor((3+11*t)/30)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor((30*((e=Math.floor(e)+.5)-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),i=e-this.toJD(t,r,1)+1;return this.newDate(t,r,i)}}),e.calendars.islamic=r}}),_a=p({"node_modules/world-calendars/dist/calendars/julian.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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 r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=0>r.year()?r.year()+1:r.year();return t%4==0},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(4-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(2===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return t=n.year(),r=n.month(),i=n.day(),t<0&&t++,r<=2&&(t--,r+=12),Math.floor(365.25*(t+4716))+Math.floor(30.6001*(r+1))+i-1524.5},fromJD:function(e){var t=Math.floor(e+.5)+1524,r=Math.floor((t-122.1)/365.25),i=Math.floor(365.25*r),n=Math.floor((t-i)/30.6001),a=n-Math.floor(n<14?1:13),o=r-Math.floor(a>2?4716:4715),s=t-i-Math.floor(30.6001*n);return o<=0&&o--,this.newDate(o,a,s)}}),e.calendars.julian=r}}),_o=p({"node_modules/world-calendars/dist/calendars/mayan.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function i(e,t){return e-t*Math.floor(e/t)}r.prototype=new e.baseCalendar,t(r.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,e.local.invalidYear),!1},formatYear:function(t){var r=Math.floor((t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())/400);return t%=400,r+"."+Math.floor((t+=400*(t<0))/20)+"."+t%20},forYear:function(e){if((e=e.split(".")).length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&i<0)throw"Invalid Mayan year";t=20*t+i}return t},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),18},weekOfYear:function(t,r,i){return this._validate(t,r,i,e.local.invalidDate),0},daysInYear:function(t){return this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),360},daysInMonth:function(t,r){return this._validate(t,r,this.minDay,e.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(t,r,i){return this._validate(t,r,i,e.local.invalidDate).day()},weekDay:function(t,r,i){return this._validate(t,r,i,e.local.invalidDate),!0},extraInfo:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate).toJD(),a=this._toHaab(n),o=this._toTzolkin(n);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(e){var t=i((e-=this.jdEpoch)+8+340,365);return[Math.floor(t/20)+1,i(t,20)]},_toTzolkin:function(e){return[i((e-=this.jdEpoch)+20-1,20)+1,i(e+4-1,13)+1]},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);return n.day()+20*n.month()+360*n.year()+this.jdEpoch},fromJD:function(e){var t=Math.floor((e=Math.floor(e)+.5-this.jdEpoch)/360);e%=360;var r=Math.floor((e+=360*(e<0))/20),i=e%20;return this.newDate(t,r,i)}}),e.calendars.mayan=r}}),_s=p({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar;var i=e.instance("gregorian");t(r.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 r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear||e.regionalOptions[""].invalidYear);return i.leapYear(r.year()+ +(1>r.year())+1469)},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(1-(i.dayOfWeek()||7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(12===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidMonth),t=a.year();t<0&&t++;for(var o=a.day(),s=1;s=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,i=1;r>this.daysInMonth(t,i);)r-=this.daysInMonth(t,i),i++;return this.newDate(t,i,r)}}),e.calendars.nanakshahi=r}}),_l=p({"node_modules/world-calendars/dist/calendars/nepali.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(t){if(t=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year(),typeof this.NEPALI_CALENDAR_DATA[t]>"u")return this.daysPerYear;for(var r=0,i=this.minMonth;i<=12;i++)r+=this.NEPALI_CALENDAR_DATA[t][i];return r},daysInMonth:function(t,r){return t.year&&(r=t.month(),t=t.year()),this._validate(t,r,this.minDay,e.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[t]>"u"?this.daysPerMonth[r-1]:this.NEPALI_CALENDAR_DATA[t][r]},weekDay:function(e,t,r){return 6!==this.dayOfWeek(e,t,r)},toJD:function(t,r,i){var n=this._validate(t,r,i,e.local.invalidDate);t=n.year(),r=n.month(),i=n.day();var a=e.instance(),o=0,s=r,l=t;this._createMissingCalendarData(t);var c=t-(s>9||9===s&&i>=this.NEPALI_CALENDAR_DATA[l][0]?56:57);for(9!==r&&(o=i,s--);9!==s;)s<=0&&(s=12,l--),o+=this.NEPALI_CALENDAR_DATA[l][s],s--;return 9===r?(o+=i-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 r=e.instance().fromJD(t),i=r.year(),n=r.dayOfYear(),a=i+56;this._createMissingCalendarData(a);for(var o=9,s=this.NEPALI_CALENDAR_DATA[a][0],l=this.NEPALI_CALENDAR_DATA[a][o]-s+1;n>l;)++o>12&&(o=1,a++),l+=this.NEPALI_CALENDAR_DATA[a][o];var c=this.NEPALI_CALENDAR_DATA[a][o]-(l-n);return this.newDate(a,o,c)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r"u"&&(this.NEPALI_CALENDAR_DATA[r]=t)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),e.calendars.nepali=r}}),_c=p({"node_modules/world-calendars/dist/calendars/persian.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function i(e){var t=e-475;e<0&&t++;var r=.242197*t,i=.242197*(t+1);return r-Math.floor(r)>i-Math.floor(i)}r.prototype=new e.baseCalendar,t(r.prototype,{name:"Persian",jdEpoch:1948320.5,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chahārshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(t){return i(this._validate(t,this.minMonth,this.minDay,e.local.invalidYear).year())},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-((i.dayOfWeek()+1)%7),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(12===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate);t=a.year(),r=a.month(),n=a.day();var o=0;if(t>0)for(var s=1;s0?t-1:t)*365+o+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(475+((e=Math.floor(e)+.5)-this.toJD(475,1,1))/365.242197);t<=0&&t--,e>this.toJD(t,12,i(t)?30:29)&&0==++t&&t++;var r=e-this.toJD(t,1,1)+1,n=r<=186?Math.ceil(r/31):Math.ceil((r-6)/30),a=e-this.toJD(t,n,1)+1;return this.newDate(t,n,a)}}),e.calendars.persian=r,e.calendars.jalali=r}}),_u=p({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var e=b8(),t=mR(),r=e.instance();function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new e.baseCalendar,t(i.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 i=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(i.year());return r.leapYear(t)},weekOfYear:function(t,i,n){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(a.year());return r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(2===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,i,n){var a=this._validate(t,i,n,e.local.invalidDate),t=this._t2gYear(a.year());return r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),i=this._g2tYear(t.year());return this.newDate(i,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+ +(e>=-this.yearsOffset&&e<=-1)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset)}}),e.calendars.taiwan=i}}),_h=p({"node_modules/world-calendars/dist/calendars/thai.js"(){var e=b8(),t=mR(),r=e.instance();function i(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}i.prototype=new e.baseCalendar,t(i.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 i=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(i.year());return r.leapYear(t)},weekOfYear:function(t,i,n){var a=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear),t=this._t2gYear(a.year());return r.weekOfYear(t,a.month(),a.day())},daysInMonth:function(t,r){var i=this._validate(t,r,this.minDay,e.local.invalidMonth);return this.daysPerMonth[i.month()-1]+(2===i.month()&&this.leapYear(i.year())?1:0)},weekDay:function(e,t,r){return 6>(this.dayOfWeek(e,t,r)||7)},toJD:function(t,i,n){var a=this._validate(t,i,n,e.local.invalidDate),t=this._t2gYear(a.year());return r.toJD(t,a.month(),a.day())},fromJD:function(e){var t=r.fromJD(e),i=this._g2tYear(t.year());return this.newDate(i,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset)},_g2tYear:function(e){return e+this.yearsOffset+ +(e>=-this.yearsOffset&&e<=-1)}}),e.calendars.thai=i}}),_d=p({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var e=b8(),t=mR();function r(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}r.prototype=new e.baseCalendar,t(r.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āthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","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 r=this._validate(t,this.minMonth,this.minDay,e.local.invalidYear);return 355===this.daysInYear(r.year())},weekOfYear:function(e,t,r){var i=this.newDate(e,t,r);return i.add(-i.dayOfWeek(),"d"),Math.floor((i.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(t,r){for(var n=this._validate(t,r,this.minDay,e.local.invalidMonth),a=n.toJD()-24e5+.5,o=0,s=0;sa)return i[o]-i[o-1];o++}return 30},weekDay:function(e,t,r){return 5!==this.dayOfWeek(e,t,r)},toJD:function(t,r,n){var a=this._validate(t,r,n,e.local.invalidDate),o=12*(a.year()-1)+a.month()-15292;return a.day()+i[o-1]-1+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,o=Math.floor((a-1)/12),s=t-i[r-1]+1;return this.newDate(o+1,a-12*o,s)},isValid:function(t,r,i){var n=e.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(n=(t=null!=t.year?t.year:t)>=1276&&t<=1500),n},_validate:function(t,r,i,n){var a=e.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}}),e.calendars.ummalqura=r;var i=[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]}}),_f=p({"src/components/calendars/calendars.js"(e,t){t.exports=b8(),b7(),b9(),_e(),_t(),_r(),_i(),_n(),_a(),_o(),_s(),_l(),_c(),_u(),_h(),_d()}}),_p=p({"src/components/calendars/index.js"(e,t){var r=_f(),i=tv(),n=L(),a=n.EPOCHJD,o=n.ONEDAY,s={valType:"enumerated",values:i.sortObjectKeys(r.calendars),editType:"calc",dflt:"gregorian"},l=function(e,t,r,n){var a={};return a[r]=s,i.coerce(e,t,a,r,n)},c={d:{0:"dd","-":"d"},e:{0:"d","-":"d"},a:{0:"D","-":"D"},A:{0:"DD","-":"DD"},j:{0:"oo","-":"o"},W:{0:"ww","-":"w"},m:{0:"mm","-":"m"},b:{0:"M","-":"M"},B:{0:"MM","-":"MM"},y:{0:"yy","-":"yy"},Y:{0:"yyyy","-":"yyyy"},U:"##",w:"##",c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},u={};function h(e){var t=u[e];return t||(t=u[e]=r.instance(e))}function d(e){return i.extendFlat({},s,{description:e})}function f(e){return"Sets the calendar system to use with `"+e+"` date data."}var p={xcalendar:d(f("x"))},m=i.extendFlat({},p,{ycalendar:d(f("y"))}),g=i.extendFlat({},m,{zcalendar:d(f("z"))}),y=d("Sets the calendar system to use for `range` and `tick0` if this is a date axis. This does not set the calendar for interpreting data on this axis, that's specified in the trace or via the global `layout.calendar`");t.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:m,bar:m,box:m,heatmap:m,contour:m,histogram:m,histogram2d:m,histogram2dcontour:m,scatter3d:g,surface:g,mesh3d:g,scattergl:m,ohlc:p,candlestick:p},layout:{calendar:d("Sets the default calendar system to use for interpreting and displaying dates throughout the plot.")},subplots:{xaxis:{calendar:y},yaxis:{calendar:y},scene:{xaxis:{calendar:y},yaxis:{calendar:y},zaxis:{calendar:y}},polar:{radialaxis:{calendar:y}}}},layoutAttributes:s,handleDefaults:l,handleTraceDefaults:function(e,t,r,i){for(var n=0;n{i.preventDefault(),i.stopPropagation(),i.clipboardData.setData("text",e),t.removeEventListener("copy",r,!0)};t.addEventListener("copy",r,!0),document.execCommand("copy")},(q=$||($={})).boxSizing=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.borderTopWidth)||0,i=parseFloat(t.borderLeftWidth)||0,n=parseFloat(t.borderRightWidth)||0,a=parseFloat(t.borderBottomWidth)||0,o=parseFloat(t.paddingTop)||0,s=parseFloat(t.paddingLeft)||0,l=parseFloat(t.paddingRight)||0,c=parseFloat(t.paddingBottom)||0;return{borderTop:r,borderLeft:i,borderRight:n,borderBottom:a,paddingTop:o,paddingLeft:s,paddingRight:l,paddingBottom:c,horizontalSum:i+s+l+n,verticalSum:r+o+c+a}},q.sizeLimits=function(e){let t=window.getComputedStyle(e),r=parseFloat(t.minWidth)||0,i=parseFloat(t.minHeight)||0,n=parseFloat(t.maxWidth)||1/0,a=parseFloat(t.maxHeight)||1/0;return n=Math.max(r,n),a=Math.max(i,a),{minWidth:r,minHeight:i,maxWidth:n,maxHeight:a}},q.hitTest=function(e,t,r){let i=e.getBoundingClientRect();return t>=i.left&&t=i.top&&r=r.bottom)){if(i.topr.bottom&&i.height>=r.height){e.scrollTop-=r.top-i.top;return}if(i.topr.height||i.bottom>r.bottom&&i.height0;){if(d(n)){t++;continue}if(d(a)||d(o)){r++;continue}if(d(l)){i++;continue}if(d(c)){r++;continue}if(d(s)){i++;continue}if(!d(u))return 0}return(t=Math.min(t,255))<<16|(r=Math.min(r,255))<<8|(i=Math.min(i,255))},n=/^#[^\s\+>~#\.\[:]+/,a=/^\.[^\s\+>~#\.\[:]+/,o=/^\[[^\]]+\]/,s=/^[^\s\+>~#\.\[:]+/,l=/^(::[^\s\+>~#\.\[:]+|:first-line|:first-letter|:before|:after)/,c=/^:[^\s\+>~#\.\[:]+/,u=/^[\s\+>~\*]+/,h=/:not\(([^\)]+)\)/g;var U=O(R()),V=class{constructor(){this._first=null,this._last=null,this._size=0}get isEmpty(){return 0===this._size}get size(){return this._size}get length(){return this._size}get first(){return this._first?this._first.value:void 0}get last(){return this._last?this._last.value:void 0}get firstNode(){return this._first}get lastNode(){return this._last}*[Symbol.iterator](){let e=this._first;for(;e;)yield e.value,e=e.next}*retro(){let e=this._last;for(;e;)yield e.value,e=e.prev}*nodes(){let e=this._first;for(;e;)yield e,e=e.next}*retroNodes(){let e=this._last;for(;e;)yield e,e=e.prev}assign(e){for(let t of(this.clear(),e))this.addLast(t)}push(e){this.addLast(e)}pop(){return this.removeLast()}shift(e){this.addFirst(e)}unshift(){return this.removeFirst()}addFirst(e){let t=new Q.LinkedListNode(this,e);return this._first?(t.next=this._first,this._first.prev=t,this._first=t):(this._first=t,this._last=t),this._size++,t}addLast(e){let t=new Q.LinkedListNode(this,e);return this._last?(t.prev=this._last,this._last.next=t):this._first=t,this._last=t,this._size++,t}insertBefore(e,t){if(!t||t===this._first)return this.addFirst(e);if(!(t instanceof Q.LinkedListNode)||t.list!==this)throw Error("Reference node is not owned by the list.");let r=new Q.LinkedListNode(this,e),i=t.prev;return r.next=t,r.prev=i,t.prev=r,i.next=r,this._size++,r}insertAfter(e,t){if(!t||t===this._last)return this.addLast(e);if(!(t instanceof Q.LinkedListNode)||t.list!==this)throw Error("Reference node is not owned by the list.");let r=new Q.LinkedListNode(this,e),i=t.next;return r.next=i,r.prev=t,t.next=r,i.prev=r,this._size++,r}removeFirst(){let e=this._first;if(e)return e===this._last?(this._first=null,this._last=null):(this._first=e.next,this._first.prev=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeLast(){let e=this._last;if(e)return e===this._first?(this._first=null,this._last=null):(this._last=e.prev,this._last.next=null),e.list=null,e.next=null,e.prev=null,this._size--,e.value}removeNode(e){if(!(e instanceof Q.LinkedListNode)||e.list!==this)throw Error("Node is not owned by the list.");e===this._first&&e===this._last?(this._first=null,this._last=null):e===this._first?(this._first=e.next,this._first.prev=null):e===this._last?(this._last=e.prev,this._last.next=null):(e.next.prev=e.prev,e.prev.next=e.next),e.list=null,e.next=null,e.prev=null,this._size--}clear(){let e=this._first;for(;e;){let t=e.next;e.list=null,e.prev=null,e.next=null,e=t}this._first=null,this._last=null,this._size=0}};(Y=V||(V={})).from=function(e){let t=new Y;return t.assign(e),t},(Q||(Q={})).LinkedListNode=class{constructor(e,t){this.list=null,this.next=null,this.prev=null,this.list=e,this.value=t}};var q,H,G,W,Y,Z,$,X,K,J,Q,ee,et=class{constructor(e){this.type=e}get isConflatable(){return!1}conflate(e){return!1}},er=class extends et{get isConflatable(){return!0}conflate(e){return!0}};!function(e){let t,r=null,i=(t=Promise.resolve(),e=>{let r=!1;return t.then(()=>!r&&e()),()=>{r=!0}});function n(e,t){let r=o.get(e);r&&0!==r.length?(0,U.every)((0,U.retro)(r),r=>!r||function(e,t,r){let i=!0;try{i="function"==typeof e?e(t,r):e.messageHook(t,r)}catch(e){l(e)}return i}(r,e,t))&&u(e,t):u(e,t)}e.sendMessage=n,e.postMessage=function(e,t){t.isConflatable&&(0,U.some)(a,r=>r.handler===e&&!!r.msg&&r.msg.type===t.type&&!!r.msg.isConflatable&&r.msg.conflate(t))||h(e,t)},e.installMessageHook=function(e,t){let r=o.get(e);r&&-1!==r.indexOf(t)||(r?r.push(t):o.set(e,[t]))},e.removeMessageHook=function(e,t){let r=o.get(e);if(!r)return;let i=r.indexOf(t);-1!==i&&(r[i]=null,f(r))},e.clearData=function(e){let t=o.get(e);for(let r of(t&&t.length>0&&(U.ArrayExt.fill(t,null),f(t)),a))r.handler===e&&(r.handler=null,r.msg=null)},e.flush=function(){c||null===r||(r(),r=null,c=!0,d(),c=!1)},e.getExceptionHandler=function(){return l},e.setExceptionHandler=function(e){let t=l;return l=e,t};let a=new V,o=new WeakMap,s=new Set,l=e=>{console.error(e)},c=!1;function u(e,t){try{e.processMessage(t)}catch(e){l(e)}}function h(e,t){a.addLast({handler:e,msg:t}),null===r&&(r=i(d))}function d(){if(r=null,a.isEmpty)return;let e={handler:null,msg:null};for(a.addLast(e);;){let t=a.removeFirst();if(t===e)return;t.handler&&t.msg&&n(t.handler,t.msg)}}function f(e){0===s.size&&i(p),s.add(e)}function p(){s.forEach(m),s.clear()}function m(e){U.ArrayExt.removeAllWhere(e,g)}function g(e){return null===e}}(ee||(ee={}));var ei=class{constructor(e){this._pid=e_.nextPID(),this.name=e.name,this._create=e.create,this._coerce=e.coerce||null,this._compare=e.compare||null,this._changed=e.changed||null}get(e){let t=e_.ensureMap(e);return this._pid in t?t[this._pid]:t[this._pid]=this._createValue(e)}set(e,t){let r,i=e_.ensureMap(e);r=this._pid in i?i[this._pid]:i[this._pid]=this._createValue(e);let n=this._coerceValue(e,t);this._maybeNotify(e,r,i[this._pid]=n)}coerce(e){let t,r=e_.ensureMap(e);t=this._pid in r?r[this._pid]:r[this._pid]=this._createValue(e);let i=this._coerceValue(e,t);this._maybeNotify(e,t,r[this._pid]=i)}_createValue(e){return(0,this._create)(e)}_coerceValue(e,t){let r=this._coerce;return r?r(e,t):t}_compareValue(e,t){let r=this._compare;return r?r(e,t):e===t}_maybeNotify(e,t,r){let i=this._changed;i&&!this._compareValue(t,r)&&i(e,t,r)}};(ei||(ei={})).clearData=function(e){e_.ownerData.delete(e)},(eg=e_||(e_={})).ownerData=new WeakMap,d=0,eg.nextPID=()=>`pid-${`${Math.random()}`.slice(2)}-${d++}`,eg.ensureMap=function(e){let t=eg.ownerData.get(e);return t||(t=Object.create(null),eg.ownerData.set(e,t),t)};var en=O(R()),ea=(O(F()),class{constructor(e){this.sender=e}connect(e,t){return ew.connect(this,e,t)}disconnect(e,t){return ew.disconnect(this,e,t)}emit(e){ew.emit(this,e)}});(ey=ea||(ea={})).disconnectBetween=function(e,t){ew.disconnectBetween(e,t)},ey.disconnectSender=function(e){ew.disconnectSender(e)},ey.disconnectReceiver=function(e){ew.disconnectReceiver(e)},ey.disconnectAll=function(e){ew.disconnectAll(e)},ey.clearData=function(e){ew.disconnectAll(e)},ey.getExceptionHandler=function(){return ew.exceptionHandler},ey.setExceptionHandler=function(e){let t=ew.exceptionHandler;return ew.exceptionHandler=e,t},function(e){function t(e){let t=i.get(e);if(!(!t||0===t.length)){for(let e of t){if(!e.signal)continue;let t=e.thisArg||e.slot;e.signal=null,l(n.get(t))}l(t)}}function r(e){let t=n.get(e);if(!(!t||0===t.length)){for(let e of t){if(!e.signal)continue;let t=e.signal.sender;e.signal=null,l(i.get(t))}l(t)}}e.exceptionHandler=e=>{console.error(e)},e.connect=function(e,t,r){r=r||void 0;let a=i.get(e.sender);if(a||(a=[],i.set(e.sender,a)),s(a,e,t,r))return!1;let o=r||t,l=n.get(o);l||(l=[],n.set(o,l));let c={signal:e,slot:t,thisArg:r};return a.push(c),l.push(c),!0},e.disconnect=function(e,t,r){r=r||void 0;let a=i.get(e.sender);if(!a||0===a.length)return!1;let o=s(a,e,t,r);if(!o)return!1;let c=r||t,u=n.get(c);return o.signal=null,l(a),l(u),!0},e.disconnectBetween=function(e,t){let r=i.get(e);if(!r||0===r.length)return;let a=n.get(t);if(!(!a||0===a.length)){for(let t of a)t.signal&&t.signal.sender===e&&(t.signal=null);l(r),l(a)}},e.disconnectSender=t,e.disconnectReceiver=r,e.disconnectAll=function(e){t(e),r(e)},e.emit=function(t,r){let n=i.get(t.sender);if(!(!n||0===n.length))for(let i=0,a=n.length;ie.signal===t&&e.slot===r&&e.thisArg===i)}function l(e){0===a.size&&o(c),a.add(e)}function c(){a.forEach(u),a.clear()}function u(e){en.ArrayExt.removeAllWhere(e,h)}function h(e){return null===e.signal}}(ew||(ew={}));var eo=class{constructor(e){this._fn=e}get isDisposed(){return!this._fn}dispose(){if(!this._fn)return;let e=this._fn;this._fn=null,e()}},es=class{constructor(){this._isDisposed=!1,this._items=new Set}get isDisposed(){return this._isDisposed}dispose(){this._isDisposed||(this._isDisposed=!0,this._items.forEach(e=>{e.dispose()}),this._items.clear())}contains(e){return this._items.has(e)}add(e){this._items.add(e)}remove(e){this._items.delete(e)}clear(){this._items.clear()}};(ev=es||(es={})).from=function(e){let t=new ev;for(let r of e)t.add(r);return t};var el=class extends es{constructor(){super(...arguments),this._disposed=new ea(this)}get disposed(){return this._disposed}dispose(){this.isDisposed||(super.dispose(),this._disposed.emit(void 0),ea.clearData(this))}};(ex=el||(el={})).from=function(e){let t=new ex;for(let r of e)t.add(r);return t};var ec=class e{constructor(e){this._onScrollFrame=()=>{if(!this._scrollTarget)return;let{element:e,edge:t,distance:r}=this._scrollTarget,i=Math.max(1,Math.round(Math.pow((eT.SCROLL_EDGE_SIZE-r)/eT.SCROLL_EDGE_SIZE,2)*eT.SCROLL_EDGE_SIZE));switch(t){case"top":e.scrollTop-=i;break;case"left":e.scrollLeft-=i;break;case"right":e.scrollLeft+=i;break;case"bottom":e.scrollTop+=i}requestAnimationFrame(this._onScrollFrame)},this._disposed=!1,this._dropAction="none",this._override=null,this._currentTarget=null,this._currentElement=null,this._promise=null,this._scrollTarget=null,this._resolve=null,this.document=e.document||document,this.mimeData=e.mimeData,this.dragImage=e.dragImage||null,this.proposedAction=e.proposedAction||"copy",this.supportedActions=e.supportedActions||"all",this.source=e.source||null}dispose(){if(!this._disposed){if(this._disposed=!0,this._currentTarget){let e=new PointerEvent("pointerup",{bubbles:!0,cancelable:!0,clientX:-1,clientY:-1});eT.dispatchDragLeave(this,this._currentTarget,null,e)}this._finalize("none")}}get isDisposed(){return this._disposed}start(e,t){if(this._disposed)return Promise.resolve("none");if(this._promise)return this._promise;this._addListeners(),this._attachDragImage(e,t),this._promise=new Promise(e=>{this._resolve=e});let r=new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,clientX:e,clientY:t});return document.dispatchEvent(r),this._promise}handleEvent(e){switch(e.type){case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;default:e.preventDefault(),e.stopPropagation()}}moveDragImage(e,t){this.dragImage&&(this.dragImage.style.transform=`translate(${e}px, ${t}px)`)}_evtPointerMove(e){e.preventDefault(),e.stopPropagation(),this._updateCurrentTarget(e),this._updateDragScroll(e),this.moveDragImage(e.clientX,e.clientY)}_evtPointerUp(e){if(e.preventDefault(),e.stopPropagation(),0!==e.button)return;if(this._updateCurrentTarget(e),!this._currentTarget)return void this._finalize("none");if("none"===this._dropAction){eT.dispatchDragLeave(this,this._currentTarget,null,e),this._finalize("none");return}let t=eT.dispatchDrop(this,this._currentTarget,e);this._finalize(t)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&this.dispose()}_addListeners(){document.addEventListener("pointerdown",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("pointerup",this,!0),document.addEventListener("pointerenter",this,!0),document.addEventListener("pointerleave",this,!0),document.addEventListener("pointerover",this,!0),document.addEventListener("pointerout",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("keyup",this,!0),document.addEventListener("keypress",this,!0),document.addEventListener("contextmenu",this,!0)}_removeListeners(){document.removeEventListener("pointerdown",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointerenter",this,!0),document.removeEventListener("pointerleave",this,!0),document.removeEventListener("pointerover",this,!0),document.removeEventListener("pointerout",this,!0),document.removeEventListener("keydown",this,!0),document.removeEventListener("keyup",this,!0),document.removeEventListener("keypress",this,!0),document.removeEventListener("contextmenu",this,!0)}_updateDragScroll(e){let t=eT.findScrollTarget(e);(this._scrollTarget||t)&&(this._scrollTarget||setTimeout(this._onScrollFrame,500),this._scrollTarget=t)}_updateCurrentTarget(e){let t=this._currentTarget,r=this._currentTarget,i=this._currentElement,n=eT.findElementBehindBackdrop(e,this.document);this._currentElement=n,n!==i&&n!==r&&eT.dispatchDragExit(this,r,n,e),n!==i&&n!==r&&(r=eT.dispatchDragEnter(this,n,r,e)),r!==t&&(this._currentTarget=r,eT.dispatchDragLeave(this,t,r,e));let a=eT.dispatchDragOver(this,r,e);this._setDropAction(a)}_attachDragImage(e,t){if(!this.dragImage)return;this.dragImage.classList.add("lm-mod-drag-image");let r=this.dragImage.style;r.pointerEvents="none",r.position="fixed",r.transform=`translate(${e}px, ${t}px)`,(this.document instanceof Document?this.document.body:this.document.firstElementChild).appendChild(this.dragImage)}_detachDragImage(){if(!this.dragImage)return;let e=this.dragImage.parentNode;e&&e.removeChild(this.dragImage)}_setDropAction(t){if(t=eT.validateAction(t,this.supportedActions),!(this._override&&this._dropAction===t))switch(t){case"none":this._dropAction=t,this._override=e.overrideCursor("no-drop",this.document);break;case"copy":this._dropAction=t,this._override=e.overrideCursor("copy",this.document);break;case"link":this._dropAction=t,this._override=e.overrideCursor("alias",this.document);break;case"move":this._dropAction=t,this._override=e.overrideCursor("move",this.document)}}_finalize(e){let t=this._resolve;this._removeListeners(),this._detachDragImage(),this._override&&(this._override.dispose(),this._override=null),this.mimeData.clear(),this._disposed=!0,this._dropAction="none",this._currentTarget=null,this._currentElement=null,this._scrollTarget=null,this._promise=null,this._resolve=null,t&&t(e)}},eu=ec||(ec={});class eh extends DragEvent{constructor(e,t){super(t.type,{bubbles:!0,cancelable:!0,altKey:e.altKey,button:e.button,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,detail:0,metaKey:e.metaKey,relatedTarget:t.related,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey,view:window});let{drag:r}=t;this.dropAction="none",this.mimeData=r.mimeData,this.proposedAction=r.proposedAction,this.supportedActions=r.supportedActions,this.source=r.source}}eu.Event=eh,eu.overrideCursor=function(e,t=document){return eT.overrideCursor(e,t)},function(e){let t;function r(t,a=document){if(t){if(i&&t==i.event)return i.element;e.cursorBackdrop.style.zIndex="-1000";let r=a.elementFromPoint(t.clientX,t.clientY);return e.cursorBackdrop.style.zIndex="",i={event:t,element:r},r}{let t=e.cursorBackdrop.style.transform;if(n&&t===n.transform)return n.element;let r=e.cursorBackdrop.getBoundingClientRect();e.cursorBackdrop.style.zIndex="-1000";let i=a.elementFromPoint(r.left+r.width/2,r.top+r.height/2);return e.cursorBackdrop.style.zIndex="",n={transform:t,element:i},i}}e.SCROLL_EDGE_SIZE=20,e.validateAction=function(e,t){return a[e]&o[t]?e:"none"},e.findElementBehindBackdrop=r;let i=null,n=null;e.findScrollTarget=function(t){let i=t.clientX,n=t.clientY,a=r(t);for(;a;a=a.parentElement){let t;if(!a.hasAttribute("data-lm-dragscroll"))continue;let r=0,o=0;a===document.body&&(r=window.pageXOffset,o=window.pageYOffset);let s=a.getBoundingClientRect(),l=s.top+o,c=s.left+r,u=c+s.width,h=l+s.height;if(i=u||n=h)continue;let d=i-c+1,f=n-l+1,p=u-i,m=h-n,g=Math.min(d,f,p,m);if(g>e.SCROLL_EDGE_SIZE)continue;switch(g){case m:t="bottom";break;case f:t="top";break;case p:t="right";break;case d:t="left";break;default:throw"unreachable"}let y=a.scrollWidth-a.clientWidth,v=a.scrollHeight-a.clientHeight,x;switch(t){case"top":x=v>0&&a.scrollTop>0;break;case"left":x=y>0&&a.scrollLeft>0;break;case"right":x=y>0&&a.scrollLeft0&&a.scrollTop{i===h&&e.cursorBackdrop.isConnected&&(document.removeEventListener("pointermove",s,!0),e.cursorBackdrop.removeEventListener("scroll",l,!0),n.removeChild(e.cursorBackdrop))})};let u=500,h=0;(t=document.createElement("div")).classList.add("lm-cursor-backdrop"),e.cursorBackdrop=t}(eT||(eT={}));var ed=O(R()),ef=O(F());function ep(){return eM.keyboardLayout}var em=class e{constructor(t,r,i=[]){this.name=t,this._codes=r,this._keys=e.extractKeys(r),this._modifierKeys=e.convertToKeySet(i)}keys(){return Object.keys(this._keys)}isValidKey(e){return e in this._keys}isModifierKey(e){return e in this._modifierKeys}keyForKeydownEvent(e){return this._codes[e.keyCode]||""}};(eb=em||(em={})).extractKeys=function(e){let t=Object.create(null);for(let r in e)t[e[r]]=!0;return t},eb.convertToKeySet=function(e){let t=Object(null);for(let r=0,i=e.length;r{this._commands.delete(e),this._commandChanged.emit({id:e,type:"removed"})})}notifyCommandChanged(e){if(void 0!==e&&!this._commands.has(e))throw Error(`Command '${e}' is not registered.`);this._commandChanged.emit({id:e,type:e?"changed":"many-changed"})}describedBy(e,t=ef.JSONExt.emptyObject){var r;let i=this._commands.get(e);return Promise.resolve(null!=(r=i?.describedBy.call(void 0,t))?r:{args:null})}label(e,t=ef.JSONExt.emptyObject){var r;let i=this._commands.get(e);return null!=(r=i?.label.call(void 0,t))?r:""}mnemonic(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.mnemonic.call(void 0,t):-1}icon(e,t=ef.JSONExt.emptyObject){var r;return null==(r=this._commands.get(e))?void 0:r.icon.call(void 0,t)}iconClass(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconClass.call(void 0,t):""}iconLabel(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.iconLabel.call(void 0,t):""}caption(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.caption.call(void 0,t):""}usage(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.usage.call(void 0,t):""}className(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.className.call(void 0,t):""}dataset(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return r?r.dataset.call(void 0,t):{}}isEnabled(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isEnabled.call(void 0,t)}isToggled(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggled.call(void 0,t)}isToggleable(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isToggleable}isVisible(e,t=ef.JSONExt.emptyObject){let r=this._commands.get(e);return!!r&&r.isVisible.call(void 0,t)}execute(e,t=ef.JSONExt.emptyObject){let r,i=this._commands.get(e);if(!i)return Promise.reject(Error(`Command '${e}' not registered.`));try{r=i.execute.call(void 0,t)}catch(e){r=Promise.reject(e)}let n=Promise.resolve(r);return this._commandExecuted.emit({id:e,args:t,result:n}),n}addKeyBinding(e){let t=eB.createKeyBinding(e);return this._keyBindings.push(t),this._keyBindingChanged.emit({binding:t,type:"added"}),new eo(()=>{ed.ArrayExt.removeFirstOf(this._keyBindings,t),this._keyBindingChanged.emit({binding:t,type:"removed"})})}processKeydownEvent(t){if(t.defaultPrevented||this._replaying)return;let r=e.keystrokeForKeydownEvent(t);if(!r){this._replayKeydownEvents(),this._clearPendingState();return}if(e.isModifierKeyPressed(t)){let{exact:e}=eB.matchKeyBinding(this._keyBindings,[r],t);e?(t.preventDefault(),t.stopPropagation(),this._startModifierTimer(e)):this._clearModifierTimer();return}this._keystrokes.push(r);let{exact:i,partial:n}=eB.matchKeyBinding(this._keyBindings,this._keystrokes,t),a=0!==n.length;if(!i&&!a){this._replayKeydownEvents(),this._clearPendingState();return}if((i?.preventDefault||n.some(e=>e.preventDefault))&&(t.preventDefault(),t.stopPropagation()),this._keydownEvents.push(t),i&&!a){this._executeKeyBinding(i),this._clearPendingState();return}i&&(this._exactKeyMatch=i),this._startTimer()}holdKeyBindingExecution(e,t){this._holdKeyBindingPromises.set(e,t)}processKeyupEvent(e){this._clearModifierTimer()}_startModifierTimer(e){this._clearModifierTimer(),this._timerModifierID=window.setTimeout(()=>{this._executeKeyBinding(e)},eB.modifierkeyTimeOut)}_clearModifierTimer(){0!==this._timerModifierID&&(clearTimeout(this._timerModifierID),this._timerModifierID=0)}_startTimer(){this._clearTimer(),this._timerID=window.setTimeout(()=>{this._onPendingTimeout()},eB.CHORD_TIMEOUT)}_clearTimer(){0!==this._timerID&&(clearTimeout(this._timerID),this._timerID=0)}_replayKeydownEvents(){0!==this._keydownEvents.length&&(this._replaying=!0,this._keydownEvents.forEach(eB.replayKeyEvent),this._replaying=!1)}async _executeKeyBinding(e){if(0!==this._holdKeyBindingPromises.size){let e=[...this._keydownEvents],t=(await Promise.race([Promise.all(e.map(async e=>{var t;return null!=(t=this._holdKeyBindingPromises.get(e))?t:Promise.resolve(!0)})),new Promise(e=>{setTimeout(()=>e([!1]),eB.KEYBINDING_HOLD_TIMEOUT)})])).every(Boolean);if(this._holdKeyBindingPromises.clear(),!t)return}let{command:t,args:r}=e,i={_luminoEvent:{type:"keybinding",keys:e.keys},...r};if(!this.hasCommand(t)||!this.isEnabled(t,i)){let r=this.hasCommand(t)?"enabled":"registered",i=`Cannot execute key binding '${e.keys.join(", ")}':`,n=`command '${t}' is not ${r}.`;console.warn(`${i} ${n}`);return}await this.execute(t,i)}_clearPendingState(){this._clearTimer(),this._clearModifierTimer(),this._exactKeyMatch=null,this._keystrokes.length=0,this._keydownEvents.length=0}_onPendingTimeout(){this._timerID=0,this._exactKeyMatch?this._executeKeyBinding(this._exactKeyMatch):this._replayKeydownEvents(),this._clearPendingState()}},eS=eA||(eA={});function eE(e){let t="",r=!1,i=!1,n=!1,a=!1;for(let o of e.split(/\s+/))"Accel"===o?X.IS_MAC?i=!0:n=!0:"Alt"===o?r=!0:"Cmd"===o?i=!0:"Ctrl"===o?n=!0:"Shift"===o?a=!0:o.length>0&&(t=o);return{cmd:i,ctrl:n,alt:r,shift:a,key:t}}function eC(e){let t="",r=eE(e);return r.ctrl&&(t+="Ctrl "),r.alt&&(t+="Alt "),r.shift&&(t+="Shift "),r.cmd&&X.IS_MAC&&(t+="Cmd "),r.key?t+r.key:t.trim()}eS.parseKeystroke=eE,eS.normalizeKeystroke=eC,eS.normalizeKeys=function(e){return(X.IS_WIN?e.winKeys||e.keys:X.IS_MAC?e.macKeys||e.keys:e.linuxKeys||e.keys).map(eC)},eS.formatKeystroke=function(e){return"string"==typeof e?t(e):e.map(t).join(", ");function t(e){let t=[],r=X.IS_MAC?" ":"+",i=eE(e);return i.ctrl&&t.push("Ctrl"),i.alt&&t.push("Alt"),i.shift&&t.push("Shift"),X.IS_MAC&&i.cmd&&t.push("Cmd"),t.push(i.key),t.map(eB.formatKey).join(r)}},eS.isModifierKeyPressed=function(e){let t=ep(),r=t.keyForKeydownEvent(e);return t.isModifierKey(r)},eS.keystrokeForKeydownEvent=function(e){let t=ep(),r=t.keyForKeydownEvent(e),i=[];return e.ctrlKey&&i.push("Ctrl"),e.altKey&&i.push("Alt"),e.shiftKey&&i.push("Shift"),e.metaKey&&X.IS_MAC&&i.push("Cmd"),t.isModifierKey(r)||i.push(r),i.join(" ")},function(e){e.CHORD_TIMEOUT=1e3,e.KEYBINDING_HOLD_TIMEOUT=1e3,e.modifierkeyTimeOut=500,e.createCommand=function(e){return{execute:e.execute,describedBy:c("function"==typeof e.describedBy?e.describedBy:{args:null,...e.describedBy},()=>({args:null})),label:c(e.label,i),mnemonic:c(e.mnemonic,n),icon:c(e.icon,l),iconClass:c(e.iconClass,i),iconLabel:c(e.iconLabel,i),caption:c(e.caption,i),usage:c(e.usage,i),className:c(e.className,i),dataset:c(e.dataset,s),isEnabled:e.isEnabled||a,isToggled:e.isToggled||o,isToggleable:e.isToggleable||!!e.isToggled,isVisible:e.isVisible||a}},e.createKeyBinding=function(e){var t;return{keys:eA.normalizeKeys(e),selector:function(e){if(-1!==e.selector.indexOf(","))throw Error(`Selector cannot contain commas: ${e.selector}`);if(!K.isValid(e.selector))throw Error(`Invalid selector: ${e.selector}`);return e.selector}(e),command:e.command,args:e.args||ef.JSONExt.emptyObject,preventDefault:null==(t=e.preventDefault)||t}},e.matchKeyBinding=function(e,t,r){let i=null,n=[],a=1/0,o=0;for(let s=0,l=e.length;st.length?2:1}(l.keys,t);if(0===c)continue;if(2===c){-1!==u(l.selector,r)&&n.push(l);continue}let h=u(l.selector,r);if(-1===h||h>a)continue;let d=K.calculateSpecificity(l.selector);(!i||h=o)&&(i=l,a=h,o=d)}return{exact:i,partial:n}},e.replayKeyEvent=function(e){var t;let r,i,n;e.target.dispatchEvent((t=e,r=document.createEvent("Event"),i=t.bubbles||!0,n=t.cancelable||!0,r.initEvent(t.type||"keydown",i,n),r.key=t.key||"",r.keyCode=t.keyCode||0,r.which=t.keyCode||0,r.ctrlKey=t.ctrlKey||!1,r.altKey=t.altKey||!1,r.shiftKey=t.shiftKey||!1,r.metaKey=t.metaKey||!1,r.view=t.view||window,r))},e.formatKey=function(e){return X.IS_MAC?t.hasOwnProperty(e)?t[e]:e:r.hasOwnProperty(e)?r[e]:e};let t={Backspace:"⌫",Tab:"⇥",Enter:"⏎",Shift:"⇧",Ctrl:"⌃",Alt:"⌥",Escape:"⎋",PageUp:"⇞",PageDown:"⇟",End:"↘",Home:"↖",ArrowLeft:"←",ArrowUp:"↑",ArrowRight:"→",ArrowDown:"↓",Delete:"⌦",Cmd:"⌘"},r={Escape:"Esc",PageUp:"Page Up",PageDown:"Page Down",ArrowLeft:"Left",ArrowUp:"Up",ArrowRight:"Right",ArrowDown:"Down",Delete:"Del"},i=()=>"",n=()=>-1,a=()=>!0,o=()=>!1,s=()=>({}),l=()=>{};function c(e,t){return void 0===e?t:"function"==typeof e?e:()=>e}function u(e,t){let r=t.target,i=t.currentTarget;for(let t=0;null!==r&&!r.hasAttribute("data-lm-suppress-shortcuts");r=r.parentElement,++t){if(K.matches(r,e))return t;if(r===i)break}return -1}}(eB||(eB={}));var eL=O(R()),eP=class{constructor(e){this.type="text",this.content=e}},eI=class{constructor(e,t,r,i){this.type="element",this.tag=e,this.attrs=t,this.children=r,this.renderer=i}};function ez(e){let t={},r,i=[];for(let e=1,n=arguments.length;e=a.length){eO(i[r],t);continue}let s=a[r],l=i[r];if(s===l){o=o.nextSibling;continue}if("text"===s.type&&"text"===l.type){o.textContent!==l.content&&(o.textContent=l.content),o=o.nextSibling;continue}if("text"===s.type||"text"===l.type||!s.renderer!=!l.renderer){eL.ArrayExt.insert(a,r,l),eO(l,t,o);continue}let c=l.attrs.key;if(c&&c in n){let e=n[c];e.vNode!==s&&(eL.ArrayExt.move(a,a.indexOf(e.vNode,r+1),r),t.insertBefore(e.element,o),s=e.vNode,o=e.element)}if(s===l){o=o.nextSibling;continue}let u=s.attrs.key;if(u&&u!==c||s.tag!==l.tag){eL.ArrayExt.insert(a,r,l),eO(l,t,o);continue}(function(e,t,r){let i;if(t!==r){for(i in t)i in eR||i in r||("on"===i.substr(0,2)?e[i]=null:e.removeAttribute(i));for(i in r)i in eR||t[i]===r[i]||("on"===i.substr(0,2)?e[i]=r[i]:e.setAttribute(i,r[i]));t.className!==r.className&&(void 0!==r.className?e.setAttribute("class",r.className):e.removeAttribute("class")),t.htmlFor!==r.htmlFor&&(void 0!==r.htmlFor?e.setAttribute("for",r.htmlFor):e.removeAttribute("for")),t.dataset!==r.dataset&&function(e,t,r){for(let i in t)i in r||e.removeAttribute(`data-${i}`);for(let i in r)t[i]!==r[i]&&e.setAttribute(`data-${i}`,r[i])}(e,t.dataset||{},r.dataset||{}),t.style!==r.style&&function(e,t,r){let i=e.style,n;for(n in t)n in r||(i[n]="");for(n in r)t[n]!==r[n]&&(i[n]=r[n])}(e,t.style||{},r.style||{})}})(o,s.attrs,l.attrs),l.renderer?l.renderer.render(o,{attrs:l.attrs,children:l.children}):e(o,s.children,l.children),o=o.nextSibling}!function e(t,r,i,n){for(let a=r.length-1;a>=i;--a){let i=r[a],o=n?t.lastChild:t.childNodes[a];"text"===i.type||(i.renderer&&i.renderer.unrender?i.renderer.unrender(o,{attrs:i.attrs,children:i.children}):e(o,i.children,0,!1)),n&&t.removeChild(o)}}(t,a,s,!0)};let eR={key:!0,className:!0,htmlFor:!0,dataset:!0,style:!0};var eF,ej,eB,eN,eU,eV,eq=class{constructor(){this.sizeHint=0,this.minSize=0,this.maxSize=1/0,this.stretch=1,this.size=0,this.done=!1}};(eY=eV||(eV={})).calc=function(e,t){let r=e.length;if(0===r)return t;let i=0,n=0,a=0,o=0,s=0;for(let t=0;t0&&(o+=r.stretch,s++)}if(t===a)return 0;if(t<=i){for(let t=0;t=n){for(let t=0;t0&&i>.01;){let t=i,n=o;for(let a=0;a0&&i>.01;){let t=i/l;for(let n=0;n0&&i>.01;){let t=i,n=o;for(let a=0;a=r.maxSize?(i-=r.maxSize-r.size,o-=r.stretch,r.size=r.maxSize,r.done=!0,l--,s--):(i-=c,r.size+=c)}}for(;l>0&&i>.01;){let t=i/l;for(let n=0;n=r.maxSize?(i-=r.maxSize-r.size,r.size=r.maxSize,r.done=!0,l--):(i-=t,r.size+=t))}}}return 0},eY.adjust=function(e,t,r){0===e.length||0===r||(r>0?function(e,t,r){let i=0;for(let r=0;r<=t;++r){let t=e[r];i+=t.maxSize-t.size}let n=0;for(let r=t+1,i=e.length;r=0&&a>0;--r){let t=e[r],i=t.maxSize-t.size;i>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+i,a-=i)}let o=r;for(let r=t+1,i=e.length;r0;++r){let t=e[r],i=t.size-t.minSize;i>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-i,o-=i)}}(e,t,r):function(e,t,r){let i=0;for(let r=t+1,n=e.length;r0;++r){let t=e[r],i=t.maxSize-t.size;i>=a?(t.sizeHint=t.size+a,a=0):(t.sizeHint=t.size+i,a-=i)}let o=r;for(let r=t;r>=0&&o>0;--r){let t=e[r],i=t.size-t.minSize;i>=o?(t.sizeHint=t.size-o,o=0):(t.sizeHint=t.size-i,o-=i)}}(e,t,-r))};var eH=class{constructor(e){this._label="",this._caption="",this._mnemonic=-1,this._icon=void 0,this._iconClass="",this._iconLabel="",this._className="",this._closable=!1,this._changed=new ea(this),this._isDisposed=!1,this.owner=e.owner,void 0!==e.label&&(this._label=e.label),void 0!==e.mnemonic&&(this._mnemonic=e.mnemonic),void 0!==e.icon&&(this._icon=e.icon),void 0!==e.iconClass&&(this._iconClass=e.iconClass),void 0!==e.iconLabel&&(this._iconLabel=e.iconLabel),void 0!==e.caption&&(this._caption=e.caption),void 0!==e.className&&(this._className=e.className),void 0!==e.closable&&(this._closable=e.closable),this._dataset=e.dataset||{}}get changed(){return this._changed}get label(){return this._label}set label(e){this._label!==e&&(this._label=e,this._changed.emit(void 0))}get mnemonic(){return this._mnemonic}set mnemonic(e){this._mnemonic!==e&&(this._mnemonic=e,this._changed.emit(void 0))}get icon(){return this._icon}set icon(e){this._icon!==e&&(this._icon=e,this._changed.emit(void 0))}get iconClass(){return this._iconClass}set iconClass(e){this._iconClass!==e&&(this._iconClass=e,this._changed.emit(void 0))}get iconLabel(){return this._iconLabel}set iconLabel(e){this._iconLabel!==e&&(this._iconLabel=e,this._changed.emit(void 0))}get caption(){return this._caption}set caption(e){this._caption!==e&&(this._caption=e,this._changed.emit(void 0))}get className(){return this._className}set className(e){this._className!==e&&(this._className=e,this._changed.emit(void 0))}get closable(){return this._closable}set closable(e){this._closable!==e&&(this._closable=e,this._changed.emit(void 0))}get dataset(){return this._dataset}set dataset(e){this._dataset!==e&&(this._dataset=e,this._changed.emit(void 0))}get isDisposed(){return this._isDisposed}dispose(){this.isDisposed||(this._isDisposed=!0,ea.clearData(this))}},eG=class e{constructor(t={}){this._flags=0,this._layout=null,this._parent=null,this._disposed=new ea(this),this._hiddenMode=e.HiddenMode.Display,this.node=eX.createNode(t),this.addClass("lm-Widget")}dispose(){this.isDisposed||(this.setFlag(e.Flag.IsDisposed),this._disposed.emit(void 0),this.parent?this.parent=null:this.isAttached&&e.detach(this),this._layout&&(this._layout.dispose(),this._layout=null),this.title.dispose(),ea.clearData(this),ee.clearData(this),ei.clearData(this))}get disposed(){return this._disposed}get isDisposed(){return this.testFlag(e.Flag.IsDisposed)}get isAttached(){return this.testFlag(e.Flag.IsAttached)}get isHidden(){return this.testFlag(e.Flag.IsHidden)}get isVisible(){return this.testFlag(e.Flag.IsVisible)}get title(){return eX.titleProperty.get(this)}get id(){return this.node.id}set id(e){this.node.id=e}get dataset(){return this.node.dataset}get hiddenMode(){return this._hiddenMode}set hiddenMode(t){this._hiddenMode!==t&&(this.isHidden&&this._toggleHidden(!1),t==e.HiddenMode.Scale?this.node.style.willChange="transform":this.node.style.willChange="auto",this._hiddenMode=t,this.isHidden&&this._toggleHidden(!0))}get parent(){return this._parent}set parent(t){if(this._parent!==t){if(t&&this.contains(t))throw Error("Invalid parent widget.");if(this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-removed",this);ee.sendMessage(this._parent,t)}if(this._parent=t,this._parent&&!this._parent.isDisposed){let t=new e.ChildMessage("child-added",this);ee.sendMessage(this._parent,t)}this.isDisposed||ee.sendMessage(this,e.Msg.ParentChanged)}}get layout(){return this._layout}set layout(t){if(this._layout!==t){if(this.testFlag(e.Flag.DisallowLayout))throw Error("Cannot set widget layout.");if(this._layout)throw Error("Cannot change widget layout.");if(t.parent)throw Error("Cannot change layout parent.");this._layout=t,t.parent=this}}*children(){this._layout&&(yield*this._layout)}contains(e){for(let t=e;t;t=t._parent)if(t===this)return!0;return!1}hasClass(e){return this.node.classList.contains(e)}addClass(e){this.node.classList.add(e)}removeClass(e){this.node.classList.remove(e)}toggleClass(e,t){return!0===t?(this.node.classList.add(e),!0):!1===t?(this.node.classList.remove(e),!1):this.node.classList.toggle(e)}update(){ee.postMessage(this,e.Msg.UpdateRequest)}fit(){ee.postMessage(this,e.Msg.FitRequest)}activate(){ee.postMessage(this,e.Msg.ActivateRequest)}close(){ee.sendMessage(this,e.Msg.CloseRequest)}show(){if(this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.BeforeShow),this.clearFlag(e.Flag.IsHidden),this._toggleHidden(!1),this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.AfterShow),this.parent)){let t=new e.ChildMessage("child-shown",this);ee.sendMessage(this.parent,t)}}hide(){if(!this.testFlag(e.Flag.IsHidden)&&(this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.BeforeHide),this.setFlag(e.Flag.IsHidden),this._toggleHidden(!0),this.isAttached&&(!this.parent||this.parent.isVisible)&&ee.sendMessage(this,e.Msg.AfterHide),this.parent)){let t=new e.ChildMessage("child-hidden",this);ee.sendMessage(this.parent,t)}}setHidden(e){e?this.hide():this.show()}testFlag(e){return(this._flags&e)!=0}setFlag(e){this._flags|=e}clearFlag(e){this._flags&=~e}processMessage(t){switch(t.type){case"resize":this.notifyLayout(t),this.onResize(t);break;case"update-request":this.notifyLayout(t),this.onUpdateRequest(t);break;case"fit-request":this.notifyLayout(t),this.onFitRequest(t);break;case"before-show":this.notifyLayout(t),this.onBeforeShow(t);break;case"after-show":this.setFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterShow(t);break;case"before-hide":this.notifyLayout(t),this.onBeforeHide(t);break;case"after-hide":this.clearFlag(e.Flag.IsVisible),this.notifyLayout(t),this.onAfterHide(t);break;case"before-attach":this.notifyLayout(t),this.onBeforeAttach(t);break;case"after-attach":this.isHidden||this.parent&&!this.parent.isVisible||this.setFlag(e.Flag.IsVisible),this.setFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterAttach(t);break;case"before-detach":this.notifyLayout(t),this.onBeforeDetach(t);break;case"after-detach":this.clearFlag(e.Flag.IsVisible),this.clearFlag(e.Flag.IsAttached),this.notifyLayout(t),this.onAfterDetach(t);break;case"activate-request":this.notifyLayout(t),this.onActivateRequest(t);break;case"close-request":this.notifyLayout(t),this.onCloseRequest(t);break;case"child-added":this.notifyLayout(t),this.onChildAdded(t);break;case"child-removed":this.notifyLayout(t),this.onChildRemoved(t);break;default:this.notifyLayout(t)}}notifyLayout(e){this._layout&&this._layout.processParentMessage(e)}onCloseRequest(t){this.parent?this.parent=null:this.isAttached&&e.detach(this)}onResize(e){}onUpdateRequest(e){}onFitRequest(e){}onActivateRequest(e){}onBeforeShow(e){}onAfterShow(e){}onBeforeHide(e){}onAfterHide(e){}onBeforeAttach(e){}onAfterAttach(e){}onBeforeDetach(e){}onAfterDetach(e){}onChildAdded(e){}onChildRemoved(e){}_toggleHidden(t){if(t)switch(this._hiddenMode){case e.HiddenMode.Display:this.addClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="scale(0)",this.node.setAttribute("aria-hidden","true");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="hidden",this.node.style.zIndex="-1"}else switch(this._hiddenMode){case e.HiddenMode.Display:this.removeClass("lm-mod-hidden");break;case e.HiddenMode.Scale:this.node.style.transform="",this.node.removeAttribute("aria-hidden");break;case e.HiddenMode.ContentVisibility:this.node.style.contentVisibility="",this.node.style.zIndex=""}}};!function(e){var t,r,i,n;(t=e.HiddenMode||(e.HiddenMode={}))[t.Display=0]="Display",t[t.Scale=1]="Scale",t[t.ContentVisibility=2]="ContentVisibility",(r=e.Flag||(e.Flag={}))[r.IsDisposed=1]="IsDisposed",r[r.IsAttached=2]="IsAttached",r[r.IsHidden=4]="IsHidden",r[r.IsVisible=8]="IsVisible",r[r.DisallowLayout=16]="DisallowLayout",(i=e.Msg||(e.Msg={})).BeforeShow=new et("before-show"),i.AfterShow=new et("after-show"),i.BeforeHide=new et("before-hide"),i.AfterHide=new et("after-hide"),i.BeforeAttach=new et("before-attach"),i.AfterAttach=new et("after-attach"),i.BeforeDetach=new et("before-detach"),i.AfterDetach=new et("after-detach"),i.ParentChanged=new et("parent-changed"),i.UpdateRequest=new er("update-request"),i.FitRequest=new er("fit-request"),i.ActivateRequest=new er("activate-request"),i.CloseRequest=new er("close-request"),e.ChildMessage=class extends et{constructor(e,t){super(e),this.child=t}};class a extends et{constructor(e,t){super("resize"),this.width=e,this.height=t}}e.ResizeMessage=a,(n=a=e.ResizeMessage||(e.ResizeMessage={})).UnknownSize=new n(-1,-1),e.attach=function(t,r,i=null){if(t.parent)throw Error("Cannot attach a child widget.");if(t.isAttached||t.node.isConnected)throw Error("Widget is already attached.");if(!r.isConnected)throw Error("Host is not attached.");ee.sendMessage(t,e.Msg.BeforeAttach),r.insertBefore(t.node,i),ee.sendMessage(t,e.Msg.AfterAttach)},e.detach=function(t){if(t.parent)throw Error("Cannot detach a child widget.");if(!t.isAttached||!t.node.isConnected)throw Error("Widget is not attached.");ee.sendMessage(t,e.Msg.BeforeDetach),t.node.parentNode.removeChild(t.node),ee.sendMessage(t,e.Msg.AfterDetach)}}(eG||(eG={})),(eZ=eX||(eX={})).titleProperty=new ei({name:"title",create:e=>new eH({owner:e})}),eZ.createNode=function(e){return e.node||document.createElement(e.tag||"div")};var eW=class{constructor(e={}){this._disposed=!1,this._parent=null,this._fitPolicy=e.fitPolicy||"set-min-size"}dispose(){this._parent=null,this._disposed=!0,ea.clearData(this),ei.clearData(this)}get isDisposed(){return this._disposed}get parent(){return this._parent}set parent(e){if(this._parent!==e){if(this._parent)throw Error("Cannot change parent widget.");if(e.layout!==this)throw Error("Invalid parent widget.");this._parent=e,this.init()}}get fitPolicy(){return this._fitPolicy}set fitPolicy(e){if(this._fitPolicy!==e&&(this._fitPolicy=e,this._parent)){let e=this._parent.node.style;e.minWidth="",e.minHeight="",e.maxWidth="",e.maxHeight="",this._parent.fit()}}processParentMessage(e){switch(e.type){case"resize":this.onResize(e);break;case"update-request":this.onUpdateRequest(e);break;case"fit-request":this.onFitRequest(e);break;case"before-show":this.onBeforeShow(e);break;case"after-show":this.onAfterShow(e);break;case"before-hide":this.onBeforeHide(e);break;case"after-hide":this.onAfterHide(e);break;case"before-attach":this.onBeforeAttach(e);break;case"after-attach":this.onAfterAttach(e);break;case"before-detach":this.onBeforeDetach(e);break;case"after-detach":this.onAfterDetach(e);break;case"child-removed":this.onChildRemoved(e);break;case"child-shown":this.onChildShown(e);break;case"child-hidden":this.onChildHidden(e)}}init(){for(let e of this)e.parent=this.parent}onResize(e){for(let e of this)ee.sendMessage(e,eG.ResizeMessage.UnknownSize)}onUpdateRequest(e){for(let e of this)ee.sendMessage(e,eG.ResizeMessage.UnknownSize)}onBeforeAttach(e){for(let t of this)ee.sendMessage(t,e)}onAfterAttach(e){for(let t of this)ee.sendMessage(t,e)}onBeforeDetach(e){for(let t of this)ee.sendMessage(t,e)}onAfterDetach(e){for(let t of this)ee.sendMessage(t,e)}onBeforeShow(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onAfterShow(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onBeforeHide(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onAfterHide(e){for(let t of this)t.isHidden||ee.sendMessage(t,e)}onChildRemoved(e){this.removeWidget(e.child)}onFitRequest(e){}onChildShown(e){}onChildHidden(e){}};(e$=eW||(eW={})).getHorizontalAlignment=function(e){return eK.horizontalAlignmentProperty.get(e)},e$.setHorizontalAlignment=function(e,t){eK.horizontalAlignmentProperty.set(e,t)},e$.getVerticalAlignment=function(e){return eK.verticalAlignmentProperty.get(e)},e$.setVerticalAlignment=function(e,t){eK.verticalAlignmentProperty.set(e,t)};var eY,eZ,e$,eX,eK,eJ=class{constructor(e){this._top=NaN,this._left=NaN,this._width=NaN,this._height=NaN,this._minWidth=0,this._minHeight=0,this._maxWidth=1/0,this._maxHeight=1/0,this._disposed=!1,this.widget=e,this.widget.node.style.position="absolute",this.widget.node.style.contain="strict"}dispose(){if(this._disposed)return;this._disposed=!0;let e=this.widget.node.style;e.position="",e.top="",e.left="",e.width="",e.height="",e.contain=""}get minWidth(){return this._minWidth}get minHeight(){return this._minHeight}get maxWidth(){return this._maxWidth}get maxHeight(){return this._maxHeight}get isDisposed(){return this._disposed}get isHidden(){return this.widget.isHidden}get isVisible(){return this.widget.isVisible}get isAttached(){return this.widget.isAttached}fit(){let e=$.sizeLimits(this.widget.node);this._minWidth=e.minWidth,this._minHeight=e.minHeight,this._maxWidth=e.maxWidth,this._maxHeight=e.maxHeight}update(e,t,r,i){let n=Math.max(this._minWidth,Math.min(r,this._maxWidth)),a=Math.max(this._minHeight,Math.min(i,this._maxHeight));if(n"center",changed:e0}),eQ.verticalAlignmentProperty=new ei({name:"verticalAlignment",create:()=>"top",changed:e0});var e1,e2=class extends eW{constructor(){super(...arguments),this._widgets=[]}dispose(){for(;this._widgets.length>0;)this._widgets.pop().dispose();super.dispose()}get widgets(){return this._widgets}*[Symbol.iterator](){yield*this._widgets}addWidget(e){this.insertWidget(this._widgets.length,e)}insertWidget(e,t){t.parent=this.parent;let r=this._widgets.indexOf(t),i=Math.max(0,Math.min(e,this._widgets.length));if(-1===r){B.ArrayExt.insert(this._widgets,i,t),this.parent&&this.attachWidget(i,t);return}i===this._widgets.length&&i--,r!==i&&(B.ArrayExt.move(this._widgets,r,i),this.parent&&this.moveWidget(r,i,t))}removeWidget(e){this.removeWidgetAt(this._widgets.indexOf(e))}removeWidgetAt(e){let t=B.ArrayExt.removeAt(this._widgets,e);t&&this.parent&&this.detachWidget(e,t)}init(){super.init();let e=0;for(let t of this)this.attachWidget(e++,t)}attachWidget(e,t){let r=this.parent.node.children[e];this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.insertBefore(t.node,r),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach)}moveWidget(e,t,r){this.parent.isAttached&&ee.sendMessage(r,eG.Msg.BeforeDetach),this.parent.node.removeChild(r.node),this.parent.isAttached&&ee.sendMessage(r,eG.Msg.AfterDetach);let i=this.parent.node.children[t];this.parent.isAttached&&ee.sendMessage(r,eG.Msg.BeforeAttach),this.parent.node.insertBefore(r.node,i),this.parent.isAttached&&ee.sendMessage(r,eG.Msg.AfterAttach)}detachWidget(e,t){this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach)}};(e1||(e1={})).clampDimension=function(e){return Math.max(0,Math.floor(e))};var e3=e1,e5=class e extends e2{constructor(e){super(),this.widgetOffset=0,this._fixed=0,this._spacing=4,this._dirty=!1,this._hasNormedSizes=!1,this._sizers=[],this._items=[],this._handles=[],this._box=null,this._alignment="start",this._orientation="horizontal",this.renderer=e.renderer,void 0!==e.orientation&&(this._orientation=e.orientation),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=e1.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,this._handles.length=0,super.dispose()}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._orientation=e,this.parent&&(this.parent.dataset.orientation=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=e1.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get handles(){return this._handles}absoluteSizes(){return this._sizers.map(e=>e.size)}relativeSizes(){return e8.normalize(this._sizers.map(e=>e.size))}setRelativeSizes(e,t=!0){let r=this._sizers.length,i=e.slice(0,r);for(;i.length0&&(e.sizeHint=e.size);eV.adjust(this._sizers,e,r),this.parent&&this.parent.update()}}init(){this.parent.dataset.orientation=this.orientation,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){let r=new eJ(t),i=e8.createHandle(this.renderer),n=e8.averageSize(this._sizers),a=e8.createSizer(n);B.ArrayExt.insert(this._items,e,r),B.ArrayExt.insert(this._sizers,e,a),B.ArrayExt.insert(this._handles,e,i),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.node.appendChild(i),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),B.ArrayExt.move(this._sizers,e,t),B.ArrayExt.move(this._handles,e,t),this.parent.fit()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e),i=B.ArrayExt.removeAt(this._handles,e);B.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.node.removeChild(i),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}updateItemPosition(e,t,r,i,n,a,o){let s=this._items[e];if(s.isHidden)return;let l=this._handles[e].style;t?(r+=this.widgetOffset,s.update(r,i,o,n),r+=o,l.top=`${i}px`,l.left=`${r}px`,l.width=`${this._spacing}px`,l.height=`${n}px`):(i+=this.widgetOffset,s.update(r,i,a,o),i+=o,l.top=`${i}px`,l.left=`${r}px`,l.width=`${a}px`,l.height=`${this._spacing}px`)}_fit(){let t=0,r=-1;for(let e=0,i=this._items.length;e0&&(o.sizeHint=o.size),r.isHidden){o.minSize=0,o.maxSize=0;continue}r.fit(),o.stretch=e.getStretch(r.widget),i?(o.minSize=r.minWidth,o.maxSize=r.maxWidth,n+=r.minWidth,a=Math.max(a,r.minHeight)):(o.minSize=r.minHeight,o.maxSize=r.maxHeight,a+=r.minHeight,n=Math.max(n,r.minWidth))}let o=this._box=$.boxSizing(this.parent.node);n+=o.horizontalSum,a+=o.verticalSum;let s=this.parent.node.style;s.minWidth=`${n}px`,s.minHeight=`${a}px`,this._dirty=!0,this.parent.parent&&ee.sendMessage(this.parent.parent,eG.Msg.FitRequest),this._dirty&&ee.sendMessage(this.parent,eG.Msg.UpdateRequest)}_update(e,t){this._dirty=!1;let r=0;for(let e=0,t=this._items.length;e0){let e;if(e=c?Math.max(0,a-this._fixed):Math.max(0,o-this._fixed),this._hasNormedSizes){for(let t of this._sizers)t.sizeHint*=e;this._hasNormedSizes=!1}let t=eV.calc(this._sizers,e);if(t>0)switch(this._alignment){case"start":break;case"center":s=0,l=t/2;break;case"end":s=0,l=t;break;case"justify":s=t/r,l=0;break;default:throw"unreachable"}}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:function(e){e.parent&&e.parent.layout instanceof e5&&e.parent.fit()}}),e6.createSizer=function(e){let t=new eq;return t.sizeHint=Math.floor(e),t},e6.createHandle=function(e){let t=e.createHandle();return t.style.position="absolute",t.style.contain="style",t},e6.averageSize=function(e){return e.reduce((e,t)=>e+t.size,0)/e.length||0},e6.normalize=function(e){let t=e.length;if(0===t)return[];let r=e.reduce((e,t)=>e+Math.abs(t),0);return 0===r?e.map(e=>1/t):e.map(e=>e/r)};var e4,e6,e8,e7,e9=class extends e5{constructor(e){super({...e,orientation:e.orientation||"vertical"}),this._titles=[],this.titleSpace=e.titleSpace||22}get titleSpace(){return this.widgetOffset}set titleSpace(e){e=e3.clampDimension(e),this.widgetOffset!==e&&(this.widgetOffset=e,this.parent&&this.parent.fit())}get titles(){return this._titles}dispose(){this.isDisposed||(this._titles.length=0,super.dispose())}updateTitle(e,t){let r=this._titles[e],i=r.classList.contains("lm-mod-expanded"),n=e7.createTitle(this.renderer,t.title,i);this._titles[e]=n,this.parent.node.replaceChild(n,r)}insertWidget(e,t){t.id||(t.id=`id-${N.UUID.uuid4()}`),super.insertWidget(e,t)}attachWidget(e,t){let r=e7.createTitle(this.renderer,t.title);B.ArrayExt.insert(this._titles,e,r),this.parent.node.appendChild(r),t.node.setAttribute("role","region"),t.node.setAttribute("aria-labelledby",r.id),super.attachWidget(e,t)}moveWidget(e,t,r){B.ArrayExt.move(this._titles,e,t),super.moveWidget(e,t,r)}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._titles,e);this.parent.node.removeChild(r),super.detachWidget(e,t)}updateItemPosition(e,t,r,i,n,a,o){let s=this._titles[e].style;s.top=`${i}px`,s.left=`${r}px`,s.height=`${this.widgetOffset}px`,t?s.width=`${n}px`:s.width=`${a}px`,super.updateItemPosition(e,t,r,i,n,a,o)}};(e7||(e7={})).createTitle=function(e,t,r=!0){let i=e.createSectionTitle(t);return i.style.position="absolute",i.style.contain="strict",i.setAttribute("aria-label",`${t.label} Section`),i.setAttribute("aria-expanded",r?"true":"false"),i.setAttribute("aria-controls",t.owner.id),r&&i.classList.add("lm-mod-expanded"),i};var te,tt=class extends eG{constructor(e={}){super(),this.addClass("lm-Panel"),this.layout=te.createLayout(e)}get widgets(){return this.layout.widgets}addWidget(e){this.layout.addWidget(e)}insertWidget(e,t){this.layout.insertWidget(e,t)}};(te||(te={})).createLayout=function(e){return e.layout||new e2};var tr=class extends tt{constructor(e={}){super({layout:tP.createLayout(e)}),this._handleMoved=new ea(this),this._pressData=null,this.addClass("lm-SplitPanel")}dispose(){this._releaseMouse(),super.dispose()}get orientation(){return this.layout.orientation}set orientation(e){this.layout.orientation=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get renderer(){return this.layout.renderer}get handleMoved(){return this._handleMoved}get handles(){return this.layout.handles}relativeSizes(){return this.layout.relativeSizes()}setRelativeSizes(e,t=!0){this.layout.setRelativeSizes(e,t)}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){e.child.addClass("lm-SplitPanel-child"),this._releaseMouse()}onChildRemoved(e){e.child.removeClass("lm-SplitPanel-child"),this._releaseMouse()}_evtKeyDown(e){this._pressData&&(e.preventDefault(),e.stopPropagation()),27===e.keyCode&&this._releaseMouse()}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=B.ArrayExt.findFirstIndex(t.handles,t=>t.contains(e.target));if(-1===r)return;e.preventDefault(),e.stopPropagation(),document.addEventListener("pointerup",this,!0),document.addEventListener("pointermove",this,!0),document.addEventListener("keydown",this,!0),document.addEventListener("contextmenu",this,!0);let i,n=t.handles[r],a=n.getBoundingClientRect();i="horizontal"===t.orientation?e.clientX-a.left:e.clientY-a.top;let o=window.getComputedStyle(n),s=ec.overrideCursor(o.cursor);this._pressData={index:r,delta:i,override:s}}_evtPointerMove(e){e.preventDefault(),e.stopPropagation();let t,r=this.layout,i=this.node.getBoundingClientRect();t="horizontal"===r.orientation?e.clientX-i.left-this._pressData.delta:e.clientY-i.top-this._pressData.delta,r.moveHandle(this._pressData.index,t)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse())}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._handleMoved.emit(),document.removeEventListener("keydown",this,!0),document.removeEventListener("pointerup",this,!0),document.removeEventListener("pointermove",this,!0),document.removeEventListener("contextmenu",this,!0))}},ti=tr||(tr={});class tn{createHandle(){let e=document.createElement("div");return e.className="lm-SplitPanel-handle",e}}ti.Renderer=tn,ti.defaultRenderer=new tn,ti.getStretch=function(e){return e5.getStretch(e)},ti.setStretch=function(e,t){e5.setStretch(e,t)},(tP||(tP={})).createLayout=function(e){return e.layout||new e5({renderer:e.renderer||tr.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing})};var ta=class extends tr{constructor(e={}){super({...e,layout:tI.createLayout(e)}),this._widgetSizesCache=new WeakMap,this._expansionToggled=new ea(this),this.addClass("lm-AccordionPanel")}get renderer(){return this.layout.renderer}get titleSpace(){return this.layout.titleSpace}set titleSpace(e){this.layout.titleSpace=e}get titles(){return this.layout.titles}get expansionToggled(){return this._expansionToggled}addWidget(e){super.addWidget(e),e.title.changed.connect(this._onTitleChanged,this)}collapse(e){let t=this.layout.widgets[e];t&&!t.isHidden&&this._toggleExpansion(e)}expand(e){let t=this.layout.widgets[e];t&&t.isHidden&&this._toggleExpansion(e)}insertWidget(e,t){super.insertWidget(e,t),t.title.changed.connect(this._onTitleChanged,this)}handleEvent(e){switch(super.handleEvent(e),e.type){case"click":this._evtClick(e);break;case"keydown":this._eventKeyDown(e)}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),super.onBeforeAttach(e)}onAfterDetach(e){super.onAfterDetach(e),this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this)}_onTitleChanged(e){let t=B.ArrayExt.findFirstIndex(this.widgets,t=>t.contains(e.owner));t>=0&&(this.layout.updateTitle(t,e.owner),this.update())}_computeWidgetSize(e){let t=this.layout,r=t.widgets[e];if(!r)return;let i=r.isHidden,n=t.absoluteSizes(),a=(i?-1:1)*this.spacing,o=n.reduce((e,t)=>e+t),s=[...n];if(i){let t=this._widgetSizesCache.get(r);if(!t)return;s[e]+=t;let i=s.map(e=>e-t>0).lastIndexOf(!0);-1===i?s.forEach((r,i)=>{i!==e&&(s[i]-=n[i]/o*(t-a))}):s[i]-=t-a}else{let t=n[e];this._widgetSizesCache.set(r,t),s[e]=0;let i=s.map(e=>e>0).lastIndexOf(!0);if(-1===i)return;s[i]=n[i]+t+a}return s.map(e=>e/(o+a))}_evtClick(e){let t=e.target;if(t){let r=B.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));r>=0&&(e.preventDefault(),e.stopPropagation(),this._toggleExpansion(r))}}_eventKeyDown(e){if(e.defaultPrevented)return;let t=e.target,r=!1;if(t){let i=B.ArrayExt.findFirstIndex(this.titles,e=>e.contains(t));if(i>=0){let n=e.keyCode.toString();if(e.key.match(/Space|Enter/)||n.match(/13|32/))t.click(),r=!0;else if("horizontal"===this.orientation?e.key.match(/ArrowLeft|ArrowRight/)||n.match(/37|39/):e.key.match(/ArrowUp|ArrowDown/)||n.match(/38|40/)){let t=e.key.match(/ArrowLeft|ArrowUp/)||n.match(/37|38/)?-1:1,a=this.titles.length;this.titles[(i+a+t)%a].focus(),r=!0}else"End"===e.key||"35"===n?(this.titles[this.titles.length-1].focus(),r=!0):("Home"===e.key||"36"===n)&&(this.titles[0].focus(),r=!0)}r&&e.preventDefault()}}_toggleExpansion(e){let t=this.titles[e],r=this.layout.widgets[e],i=this._computeWidgetSize(e);i&&this.setRelativeSizes(i,!1),r.isHidden?(t.classList.add("lm-mod-expanded"),t.setAttribute("aria-expanded","true"),r.show()):(t.classList.remove("lm-mod-expanded"),t.setAttribute("aria-expanded","false"),r.hide()),this._expansionToggled.emit(e)}},to=ta||(ta={});class ts extends tr.Renderer{constructor(){super(),this.titleClassName="lm-AccordionPanel-title",this._titleID=0,this._titleKeys=new WeakMap,this._uuid=++ts._nInstance}createCollapseIcon(e){return document.createElement("span")}createSectionTitle(e){let t=document.createElement("h3");for(let r in t.setAttribute("tabindex","0"),t.id=this.createTitleKey(e),t.className=this.titleClassName,e.dataset)t.dataset[r]=e.dataset[r];t.appendChild(this.createCollapseIcon(e)).className="lm-AccordionPanel-titleCollapser";let r=t.appendChild(document.createElement("span"));return r.className="lm-AccordionPanel-titleLabel",r.textContent=e.label,r.title=e.caption||e.label,t}createTitleKey(e){let t=this._titleKeys.get(e);return void 0===t&&(t=`title-key-${this._uuid}-${this._titleID++}`,this._titleKeys.set(e,t)),t}}ts._nInstance=0,to.Renderer=ts,to.defaultRenderer=new ts,(tI||(tI={})).createLayout=function(e){return e.layout||new e9({renderer:e.renderer||ta.defaultRenderer,orientation:e.orientation,alignment:e.alignment,spacing:e.spacing,titleSpace:e.titleSpace})};var tl=class e extends e2{constructor(e={}){super(),this._fixed=0,this._spacing=4,this._dirty=!1,this._sizers=[],this._items=[],this._box=null,this._alignment="start",this._direction="top-to-bottom",void 0!==e.direction&&(this._direction=e.direction),void 0!==e.alignment&&(this._alignment=e.alignment),void 0!==e.spacing&&(this._spacing=e3.clampDimension(e.spacing))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,this._sizers.length=0,super.dispose()}get direction(){return this._direction}set direction(e){this._direction!==e&&(this._direction=e,this.parent&&(this.parent.dataset.direction=e,this.parent.fit()))}get alignment(){return this._alignment}set alignment(e){this._alignment!==e&&(this._alignment=e,this.parent&&(this.parent.dataset.alignment=e,this.parent.update()))}get spacing(){return this._spacing}set spacing(e){e=e3.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}init(){this.parent.dataset.direction=this.direction,this.parent.dataset.alignment=this.alignment,super.init()}attachWidget(e,t){B.ArrayExt.insert(this._items,e,new eJ(t)),B.ArrayExt.insert(this._sizers,e,new eq),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),B.ArrayExt.move(this._sizers,e,t),this.parent.update()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e);B.ArrayExt.removeAt(this._sizers,e),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let t=0;for(let e=0,r=this._items.length;e0)switch(this._alignment){case"start":break;case"center":l=0,c=s/2;break;case"end":l=0,c=s;break;case"justify":l=s/r,c=0;break;default:throw"unreachable"}for(let e=0,t=this._items.length;e0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:tu}),tc.sizeBasisProperty=new ei({name:"sizeBasis",create:()=>0,coerce:(e,t)=>Math.max(0,Math.floor(t)),changed:tu}),tc.isHorizontal=function(e){return"left-to-right"===e||"right-to-left"===e},tc.clampSpacing=function(e){return Math.max(0,Math.floor(e))};var th=class extends tt{constructor(e={}){super({layout:tD.createLayout(e)}),this.addClass("lm-BoxPanel")}get direction(){return this.layout.direction}set direction(e){this.layout.direction=e}get alignment(){return this.layout.alignment}set alignment(e){this.layout.alignment=e}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}onChildAdded(e){e.child.addClass("lm-BoxPanel-child")}onChildRemoved(e){e.child.removeClass("lm-BoxPanel-child")}};(tC=th||(th={})).getStretch=function(e){return tl.getStretch(e)},tC.setStretch=function(e,t){tl.setStretch(e,t)},tC.getSizeBasis=function(e){return tl.getSizeBasis(e)},tC.setSizeBasis=function(e,t){tl.setSizeBasis(e,t)},(tD||(tD={})).createLayout=function(e){return e.layout||new tl(e)};var td=class e extends eG{constructor(t){super({node:tO.createNode()}),this._activeIndex=-1,this._items=[],this._results=null,this.addClass("lm-CommandPalette"),this.setFlag(eG.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer,this.commands.commandChanged.connect(this._onGenericChange,this),this.commands.keyBindingChanged.connect(this._onGenericChange,this)}dispose(){this._items.length=0,this._results=null,super.dispose()}get searchNode(){return this.node.getElementsByClassName("lm-CommandPalette-search")[0]}get inputNode(){return this.node.getElementsByClassName("lm-CommandPalette-input")[0]}get contentNode(){return this.node.getElementsByClassName("lm-CommandPalette-content")[0]}get items(){return this._items}addItem(e){let t=tO.createItem(this.commands,e);return this._items.push(t),this.refresh(),t}addItems(e){let t=e.map(e=>tO.createItem(this.commands,e));return t.forEach(e=>this._items.push(e)),this.refresh(),t}removeItem(e){this.removeItemAt(this._items.indexOf(e))}removeItemAt(e){B.ArrayExt.removeAt(this._items,e)&&this.refresh()}clearItems(){0!==this._items.length&&(this._items.length=0,this.refresh())}refresh(){(this._results=null,""!==this.inputNode.value)?this.node.getElementsByClassName("lm-close-icon")[0].style.display="inherit":this.node.getElementsByClassName("lm-close-icon")[0].style.display="none",this.update()}handleEvent(e){switch(e.type){case"click":this._evtClick(e);break;case"keydown":this._evtKeyDown(e);break;case"input":this.refresh();break;case"focus":case"blur":this._toggleFocused()}}onBeforeAttach(e){this.node.addEventListener("click",this),this.node.addEventListener("keydown",this),this.node.addEventListener("input",this),this.node.addEventListener("focus",this,!0),this.node.addEventListener("blur",this,!0)}onAfterDetach(e){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),this.node.removeEventListener("input",this),this.node.removeEventListener("focus",this,!0),this.node.removeEventListener("blur",this,!0)}onAfterShow(e){this.update(),super.onAfterShow(e)}onActivateRequest(e){if(this.isAttached){let e=this.inputNode;e.focus(),e.select()}}onUpdateRequest(e){if(this.isHidden)return;let t=this.inputNode.value,r=this.contentNode,i=this._results;if(i||(i=this._results=tO.search(this._items,t),this._activeIndex=t?B.ArrayExt.findFirstIndex(i,tO.canActivate):-1),!t&&0===i.length)return void eN.render(null,r);if(t&&0===i.length){let e=this.renderer.renderEmptyMessage({query:t});eN.render(e,r);return}let n=this.renderer,a=this._activeIndex,o=Array(i.length);for(let e=0,t=i.length;e=i.length)r.scrollTop=0;else{let e=r.children[a];$.scrollIntoViewIfNeeded(r,e)}}_evtClick(e){if(0!==e.button)return;if(e.target.classList.contains("lm-close-icon")){this.inputNode.value="",this.refresh();return}let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>t.contains(e.target));-1!==t&&(e.preventDefault(),e.stopPropagation(),this._execute(t))}_evtKeyDown(e){if(!(e.altKey||e.ctrlKey||e.metaKey||e.shiftKey))switch(e.keyCode){case 13:e.preventDefault(),e.stopPropagation(),this._execute(this._activeIndex);break;case 38:e.preventDefault(),e.stopPropagation(),this._activatePreviousItem();break;case 40:e.preventDefault(),e.stopPropagation(),this._activateNextItem()}}_activateNextItem(){if(!this._results||0===this._results.length)return;let e=this._activeIndex,t=this._results.length,r=ee-t),u=o.slice(0,c),h=o.slice(c);for(let e=0,t=h.length;er.command===e&&N.JSONExt.deepEqual(r.args,t))||null}}var tv=class e extends eG{constructor(t){super({node:tR.createNode()}),this._childIndex=-1,this._activeIndex=-1,this._openTimerID=0,this._closeTimerID=0,this._items=[],this._childMenu=null,this._parentMenu=null,this._aboutToClose=new ea(this),this._menuRequested=new ea(this),this.addClass("lm-Menu"),this.setFlag(eG.Flag.DisallowLayout),this.commands=t.commands,this.renderer=t.renderer||e.defaultRenderer}dispose(){this.close(),this._items.length=0,super.dispose()}get aboutToClose(){return this._aboutToClose}get menuRequested(){return this._menuRequested}get parentMenu(){return this._parentMenu}get childMenu(){return this._childMenu}get rootMenu(){let e=this;for(;e._parentMenu;)e=e._parentMenu;return e}get leafMenu(){let e=this;for(;e._childMenu;)e=e._childMenu;return e}get contentNode(){return this.node.getElementsByClassName("lm-Menu-content")[0]}get activeItem(){return this._items[this._activeIndex]||null}set activeItem(e){this.activeIndex=e?this._items.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._items.length)&&(e=-1),-1===e||tR.canActivate(this._items[e])||(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this._activeIndex>=0&&this.contentNode.childNodes[this._activeIndex]&&this.contentNode.childNodes[this._activeIndex].focus(),this.update())}get items(){return this._items}activateNextItem(){let e=this._items.length,t=this._activeIndex,r=t{this.activeIndex=e}})}eN.render(a,this.contentNode)}onCloseRequest(e){this._cancelOpenTimer(),this._cancelCloseTimer(),this.activeIndex=-1;let t=this._childMenu;t&&(this._childIndex=-1,this._childMenu=null,t._parentMenu=null,t.close());let r=this._parentMenu;r&&(this._parentMenu=null,r._childIndex=-1,r._childMenu=null,r.activate()),this.isAttached&&this._aboutToClose.emit(void 0),super.onCloseRequest(e)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation();let t=e.keyCode;if(13===t)return void this.triggerActiveItem();if(27===t)return void this.close();if(37===t)return void(this._parentMenu?this.close():this._menuRequested.emit("previous"));if(38===t)return void this.activatePreviousItem();if(39===t){let e=this.activeItem;e&&"submenu"===e.type?this.triggerActiveItem():this.rootMenu._menuRequested.emit("next");return}if(40===t)return void this.activateNextItem();let r=ep().keyForKeydownEvent(e);if(!r)return;let i=this._activeIndex+1,n=tR.findMnemonic(this._items,r,i);-1===n.index||n.multiple?-1!==n.index?this.activeIndex=n.index:-1!==n.auto&&(this.activeIndex=n.auto):(this.activeIndex=n.index,this.triggerActiveItem())}_evtMouseUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this.triggerActiveItem())}_evtMouseMove(e){let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>$.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex)return;if(this.activeIndex=t,(t=this.activeIndex)===this._childIndex){this._cancelOpenTimer(),this._cancelCloseTimer();return}-1!==this._childIndex&&this._startCloseTimer(),this._cancelOpenTimer();let r=this.activeItem;r&&"submenu"===r.type&&r.submenu&&this._startOpenTimer()}_evtMouseEnter(e){for(let e=this._parentMenu;e;e=e._parentMenu)e._cancelOpenTimer(),e._cancelCloseTimer(),e.activeIndex=e._childIndex}_evtMouseLeave(e){if(this._cancelOpenTimer(),!this._childMenu){this.activeIndex=-1;return}let{clientX:t,clientY:r}=e;$.hitTest(this._childMenu.node,t,r)?this._cancelCloseTimer():(this.activeIndex=-1,this._startCloseTimer())}_evtMouseDown(e){this._parentMenu||(tR.hitTestMenus(this,e.clientX,e.clientY)?(e.preventDefault(),e.stopPropagation()):this.close())}_openChildMenu(t=!1){let r=this.activeItem;if(!r||"submenu"!==r.type||!r.submenu)return void this._closeChildMenu();let i=r.submenu;if(i===this._childMenu)return;e.saveWindowData(),this._closeChildMenu(),this._childMenu=i,this._childIndex=this._activeIndex,i._parentMenu=this,ee.sendMessage(this,eG.Msg.UpdateRequest);let n=this.contentNode.children[this._activeIndex];tR.openSubmenu(i,n),t&&(i.activeIndex=-1,i.activateNextItem()),i.activate()}_closeChildMenu(){this._childMenu&&this._childMenu.close()}_startOpenTimer(){0===this._openTimerID&&(this._openTimerID=window.setTimeout(()=>{this._openTimerID=0,this._openChildMenu()},tR.TIMER_DELAY))}_startCloseTimer(){0===this._closeTimerID&&(this._closeTimerID=window.setTimeout(()=>{this._closeTimerID=0,this._closeChildMenu()},tR.TIMER_DELAY))}_cancelOpenTimer(){0!==this._openTimerID&&(clearTimeout(this._openTimerID),this._openTimerID=0)}_cancelCloseTimer(){0!==this._closeTimerID&&(clearTimeout(this._closeTimerID),this._closeTimerID=0)}static saveWindowData(){tR.saveWindowData()}},tx=tv||(tv={});class tb{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),i=this.createItemARIA(e);return ez.li({className:t,dataset:r,tabindex:"0",onfocus:e.onfocus,...i},this.renderIcon(e),this.renderLabel(e),this.renderShortcut(e),this.renderSubmenu(e))}renderIcon(e){let t=this.createIconClass(e);return ez.div({className:t},e.item.icon,e.item.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return ez.div({className:"lm-Menu-itemLabel"},t)}renderShortcut(e){let t=this.formatShortcut(e);return ez.div({className:"lm-Menu-itemShortcut"},t)}renderSubmenu(e){return ez.div({className:"lm-Menu-itemSubmenuIcon"})}createItemClass(e){let t="lm-Menu-item";e.item.isEnabled||(t+=" lm-mod-disabled"),e.item.isToggled&&(t+=" lm-mod-toggled"),e.item.isVisible||(t+=" lm-mod-hidden"),e.active&&(t+=" lm-mod-active"),e.collapsed&&(t+=" lm-mod-collapsed");let r=e.item.className;return r&&(t+=` ${r}`),t}createItemDataset(e){let{type:t,command:r,dataset:i}=e.item;return"command"===t?{...i,type:t,command:r}:{...i,type:t}}createIconClass(e){let t="lm-Menu-itemIcon",r=e.item.iconClass;return r?`${t} ${r}`:t}createItemARIA(e){let t={};switch(e.item.type){case"separator":t.role="presentation";break;case"submenu":t["aria-haspopup"]="true",e.item.isEnabled||(t["aria-disabled"]="true");break;default:e.item.isEnabled||(t["aria-disabled"]="true"),t.role="menuitem"}return t}formatLabel(e){let{label:t,mnemonic:r}=e.item;if(r<0||r>=t.length)return t;let i=t.slice(0,r),n=t.slice(r+1),a=t[r];return[i,ez.span({className:"lm-Menu-itemMnemonic"},a),n]}formatShortcut(e){let t=e.item.keyBinding;return t?eA.formatKeystroke(t.keys):null}}tx.Renderer=tb,tx.defaultRenderer=new tb,function(e){e.TIMER_DELAY=300,e.SUBMENU_OVERLAP=3;let t=null,r=0;function i(){return r>0?(r--,t):a()}function n(e){return"separator"!==e.type&&e.isEnabled&&e.isVisible}function a(){return{pageXOffset:window.pageXOffset,pageYOffset:window.pageYOffset,clientWidth:document.documentElement.clientWidth,clientHeight:document.documentElement.clientHeight}}e.saveWindowData=function(){t=a(),r++},e.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-Menu-content",e.appendChild(t),t.setAttribute("role","menu"),e.tabIndex=0,e},e.canActivate=n,e.createItem=function(e,t){return new o(e.commands,t)},e.hitTestMenus=function(e,t,r){for(let i=e;i;i=i.childMenu)if($.hitTest(i.node,t,r))return!0;return!1},e.computeCollapsed=function(e){let t=Array(e.length);B.ArrayExt.fill(t,!1);let r=0,i=e.length;for(;r=0;--n){let r=e[n];if(r.isVisible){if("separator"!==r.type)break;t[n]=!0}}let a=!1;for(;++rc+h&&(t=c+h-g),!a&&r+y>u+d&&(r>u+d?r=u+d-y:r-=y),m.transform=`translate(${Math.max(0,t)}px, ${Math.max(0,r)}px`,m.opacity="1"},e.openSubmenu=function(t,r){let n=i(),a=n.pageXOffset,o=n.pageYOffset,s=n.clientWidth,l=n.clientHeight;ee.sendMessage(t,eG.Msg.UpdateRequest);let c=t.node,u=c.style;u.opacity="0",u.maxHeight=`${l}px`,eG.attach(t,document.body);let{width:h,height:d}=c.getBoundingClientRect(),f=$.boxSizing(t.node),p=r.getBoundingClientRect(),m=p.right-e.SUBMENU_OVERLAP;m+h>a+s&&(m=p.left+e.SUBMENU_OVERLAP-h);let g=p.top-f.borderTop-f.paddingTop;g+d>o+l&&(g=p.bottom+f.borderBottom+f.paddingBottom-d),u.transform=`translate(${Math.max(0,m)}px, ${Math.max(0,g)}px`,u.opacity="1"},e.findMnemonic=function(e,t,r){let i=-1,a=-1,o=!1,s=t.toUpperCase();for(let t=0,l=e.length;t=0&&dr.command===e&&N.JSONExt.deepEqual(r.args,t))||null}return null}}}(tR||(tR={}));var t_=tF||(tF={});function tw(e,t){let r=e.rank,i=t.rank;return r!==i?r=this._titles.length)&&(e=-1),this._currentIndex===e)return;let t=this._currentIndex,r=this._titles[t]||null,i=e,n=this._titles[i]||null;this._currentIndex=i,this._previousTitle=r,this.update(),this._currentChanged.emit({previousIndex:t,previousTitle:r,currentIndex:i,currentTitle:n})}get name(){return this._name}set name(e){this._name=e,e?this.contentNode.setAttribute("aria-label",e):this.contentNode.removeAttribute("aria-label")}get orientation(){return this._orientation}set orientation(e){this._orientation!==e&&(this._releaseMouse(),this._orientation=e,this.dataset.orientation=e,this.contentNode.setAttribute("aria-orientation",e))}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){this._addButtonEnabled!==e&&(this._addButtonEnabled=e,e?this.addButtonNode.classList.remove("lm-mod-hidden"):this.addButtonNode.classList.add("lm-mod-hidden"))}get titles(){return this._titles}get contentNode(){return this.node.getElementsByClassName("lm-TabBar-content")[0]}get addButtonNode(){return this.node.getElementsByClassName("lm-TabBar-addButton")[0]}addTab(e){return this.insertTab(this._titles.length,e)}insertTab(e,t){this._releaseMouse();let r=tj.asTitle(t),i=this._titles.indexOf(r),n=Math.max(0,Math.min(e,this._titles.length));return -1===i?(B.ArrayExt.insert(this._titles,n,r),r.changed.connect(this._onTitleChanged,this),this.update(),this._adjustCurrentForInsert(n,r)):(n===this._titles.length&&n--,i===n||(B.ArrayExt.move(this._titles,i,n),this.update(),this._adjustCurrentForMove(i,n))),r}removeTab(e){this.removeTabAt(this._titles.indexOf(e))}removeTabAt(e){this._releaseMouse();let t=B.ArrayExt.removeAt(this._titles,e);t&&(t.changed.disconnect(this._onTitleChanged,this),t===this._previousTitle&&(this._previousTitle=null),this.update(),this._adjustCurrentForRemove(e,t))}clearTabs(){if(0===this._titles.length)return;for(let e of(this._releaseMouse(),this._titles))e.changed.disconnect(this._onTitleChanged,this);let e=this.currentIndex,t=this.currentTitle;this._currentIndex=-1,this._previousTitle=null,this._titles.length=0,this.update(),-1!==e&&this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}releaseMouse(){this._releaseMouse()}handleEvent(e){switch(e.type){case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"dblclick":this._evtDblClick(e);break;case"keydown":e.eventPhase===Event.CAPTURING_PHASE?this._evtKeyDownCapturing(e):this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("pointerdown",this),this.node.addEventListener("dblclick",this),this.node.addEventListener("keydown",this)}onAfterDetach(e){this.node.removeEventListener("pointerdown",this),this.node.removeEventListener("dblclick",this),this.node.removeEventListener("keydown",this),this._releaseMouse()}onUpdateRequest(e){var t;let r=this._titles,i=this.renderer,n=this.currentTitle,a=Array(r.length),o=null!=(t=this._getCurrentTabindex())?t:this._currentIndex>-1?this._currentIndex:0;for(let e=0,t=r.length;e$.hitTest(t,e.clientX,e.clientY));if(-1===r)return;let i=this.titles[r],n=t[r].querySelector(".lm-TabBar-tabLabel");if(n&&n.contains(e.target)){let e=i.label||"",t=n.innerHTML;n.innerHTML="";let r=document.createElement("input");r.classList.add("lm-TabBar-tabInput"),r.value=e,n.appendChild(r);let a=()=>{r.removeEventListener("blur",a),n.innerHTML=t,this.node.addEventListener("keydown",this)};r.addEventListener("dblclick",e=>e.stopPropagation()),r.addEventListener("blur",a),r.addEventListener("keydown",e=>{"Enter"===e.key?(""!==r.value&&(i.label=i.caption=r.value),a()):"Escape"===e.key&&a()}),this.node.removeEventListener("keydown",this),r.select(),r.focus(),n.children.length>0&&n.children[0].focus()}}_evtKeyDownCapturing(e){e.eventPhase===Event.CAPTURING_PHASE&&(e.preventDefault(),e.stopPropagation(),"Escape"===e.key&&this._releaseMouse())}_evtKeyDown(e){var t,r,i;if("Tab"!==e.key&&e.eventPhase!==Event.CAPTURING_PHASE){if("Enter"===e.key||"Spacebar"===e.key||" "===e.key){let t=document.activeElement;if(this.addButtonEnabled&&this.addButtonNode.contains(t))e.preventDefault(),e.stopPropagation(),this._addRequested.emit();else{let r=B.ArrayExt.findFirstIndex(this.contentNode.children,e=>e.contains(t));r>=0&&(e.preventDefault(),e.stopPropagation(),this.currentIndex=r)}}else if(tM.includes(e.key)){let n,a=[...this.contentNode.children];if(this.addButtonEnabled&&a.push(this.addButtonNode),a.length<=1)return;e.preventDefault(),e.stopPropagation();let o=a.indexOf(document.activeElement);-1===o&&(o=this._currentIndex),"ArrowRight"===e.key&&"horizontal"===this._orientation||"ArrowDown"===e.key&&"vertical"===this._orientation?n=null!=(t=a[o+1])?t:a[0]:"ArrowLeft"===e.key&&"horizontal"===this._orientation||"ArrowUp"===e.key&&"vertical"===this._orientation?n=null!=(r=a[o-1])?r:a[a.length-1]:"Home"===e.key?n=a[0]:"End"===e.key&&(n=a[a.length-1]),n&&(null==(i=a[o])||i.setAttribute("tabindex","-1"),n?.setAttribute("tabindex","0"),n.focus())}}}_evtPointerDown(e){if(0!==e.button&&1!==e.button||this._dragData||e.target.classList.contains("lm-TabBar-tabInput"))return;let t=this.addButtonEnabled&&this.addButtonNode.contains(e.target),r=this.contentNode.children,i=B.ArrayExt.findFirstIndex(r,t=>$.hitTest(t,e.clientX,e.clientY));if(-1===i&&!t||(e.preventDefault(),e.stopPropagation(),this._dragData={tab:r[i],index:i,pressX:e.clientX,pressY:e.clientY,tabPos:-1,tabSize:-1,tabPressPos:-1,targetIndex:-1,tabLayout:null,contentRect:null,override:null,dragActive:!1,dragAborted:!1,detachRequested:!1},this.document.addEventListener("pointerup",this,!0),1===e.button||t))return;let n=r[i].querySelector(this.renderer.closeIconSelector);n&&n.contains(e.target)||(this.tabsMovable&&(this.document.addEventListener("pointermove",this,!0),this.document.addEventListener("keydown",this,!0),this.document.addEventListener("contextmenu",this,!0)),this.allowDeselect&&this.currentIndex===i?this.currentIndex=-1:this.currentIndex=i,-1!==this.currentIndex&&this._tabActivateRequested.emit({index:this.currentIndex,title:this.currentTitle}))}_evtPointerMove(e){let t=this._dragData;if(!t)return;e.preventDefault(),e.stopPropagation();let r=this.contentNode.children;if(!(!t.dragActive&&!tj.dragExceeded(t,e))){if(!t.dragActive){let e=t.tab.getBoundingClientRect();"horizontal"===this._orientation?(t.tabPos=t.tab.offsetLeft,t.tabSize=e.width,t.tabPressPos=t.pressX-e.left):(t.tabPos=t.tab.offsetTop,t.tabSize=e.height,t.tabPressPos=t.pressY-e.top),t.tabPressOffset={x:t.pressX-e.left,y:t.pressY-e.top},t.tabLayout=tj.snapTabLayout(r,this._orientation),t.contentRect=this.contentNode.getBoundingClientRect(),t.override=ec.overrideCursor("default"),t.tab.classList.add("lm-mod-dragging"),this.addClass("lm-mod-dragging"),t.dragActive=!0}if(!t.detachRequested&&tj.detachExceeded(t,e)){t.detachRequested=!0;let i=t.index,n=e.clientX,a=e.clientY,o=r[i],s=this._titles[i];if(this._tabDetachRequested.emit({index:i,title:s,tab:o,clientX:n,clientY:a,offset:t.tabPressOffset}),t.dragAborted)return}tj.layoutTabs(r,t,e,this._orientation)}}_evtPointerUp(e){if(0!==e.button&&1!==e.button)return;let t=this._dragData;if(t){if(e.preventDefault(),e.stopPropagation(),this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),!t.dragActive){if(this._dragData=null,this.addButtonEnabled&&this.addButtonNode.contains(e.target))return void this._addRequested.emit(void 0);let r=this.contentNode.children,i=B.ArrayExt.findFirstIndex(r,t=>$.hitTest(t,e.clientX,e.clientY));if(i!==t.index)return;let n=this._titles[i];if(!n.closable)return;if(1===e.button)return void this._tabCloseRequested.emit({index:i,title:n});let a=r[i].querySelector(this.renderer.closeIconSelector);return a&&a.contains(e.target)?void this._tabCloseRequested.emit({index:i,title:n}):void 0}0!==e.button||(tj.finalizeTabPosition(t,this._orientation),t.tab.classList.remove("lm-mod-dragging"),setTimeout(()=>{if(t.dragAborted)return;this._dragData=null,tj.resetTabPositions(this.contentNode.children,this._orientation),t.override.dispose(),this.removeClass("lm-mod-dragging");let e=t.index,r=t.targetIndex;-1===r||e===r||(B.ArrayExt.move(this._titles,e,r),this._adjustCurrentForMove(e,r),this._tabMoved.emit({fromIndex:e,toIndex:r,title:this._titles[r]}),ee.sendMessage(this,eG.Msg.UpdateRequest))},tj.parseTransitionDuration(t.tab)))}}_releaseMouse(){let e=this._dragData;e&&(this._dragData=null,this.document.removeEventListener("pointermove",this,!0),this.document.removeEventListener("pointerup",this,!0),this.document.removeEventListener("keydown",this,!0),this.document.removeEventListener("contextmenu",this,!0),e.dragAborted=!0,e.dragActive&&(tj.resetTabPositions(this.contentNode.children,this._orientation),e.override.dispose(),e.tab.classList.remove("lm-mod-dragging"),this.removeClass("lm-mod-dragging")))}_adjustCurrentForInsert(e,t){let r=this.currentTitle,i=this._currentIndex,n=this.insertBehavior;if("select-tab"===n||"select-tab-if-needed"===n&&-1===i){this._currentIndex=e,this._previousTitle=r,this._currentChanged.emit({previousIndex:i,previousTitle:r,currentIndex:e,currentTitle:t});return}i>=e&&this._currentIndex++}_adjustCurrentForMove(e,t){this._currentIndex===e?this._currentIndex=t:this._currentIndex=t?this._currentIndex++:this._currentIndex>e&&this._currentIndex<=t&&this._currentIndex--}_adjustCurrentForRemove(e,t){let r=this._currentIndex,i=this.removeBehavior;if(r!==e){r>e&&this._currentIndex--;return}if(0===this._titles.length){this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null});return}if("select-tab-after"===i){this._currentIndex=Math.min(e,this._titles.length-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if("select-tab-before"===i){this._currentIndex=Math.max(0,e-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}if("select-previous-tab"===i){this._previousTitle?(this._currentIndex=this._titles.indexOf(this._previousTitle),this._previousTitle=null):this._currentIndex=Math.min(e,this._titles.length-1),this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:this._currentIndex,currentTitle:this.currentTitle});return}this._currentIndex=-1,this._currentChanged.emit({previousIndex:e,previousTitle:t,currentIndex:-1,currentTitle:null})}_onTitleChanged(e){this.update()}},tA=tk||(tk={});class tS{constructor(){this.closeIconSelector=".lm-TabBar-tabCloseIcon",this._tabID=0,this._tabKeys=new WeakMap,this._uuid=++tS._nInstance}renderTab(e){let t=e.title.caption,r=this.createTabKey(e),i=this.createTabStyle(e),n=this.createTabClass(e),a=this.createTabDataset(e),o=this.createTabARIA(e);return e.title.closable?ez.li({id:r,key:r,className:n,title:t,style:i,dataset:a,...o},this.renderIcon(e),this.renderLabel(e),this.renderCloseIcon(e)):ez.li({id:r,key:r,className:n,title:t,style:i,dataset:a,...o},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let{title:t}=e,r=this.createIconClass(e);return ez.div({className:r},t.icon,t.iconLabel)}renderLabel(e){return ez.div({className:"lm-TabBar-tabLabel"},e.title.label)}renderCloseIcon(e){return ez.div({className:"lm-TabBar-tabCloseIcon"})}createTabKey(e){let t=this._tabKeys.get(e.title);return void 0===t&&(t=`tab-key-${this._uuid}-${this._tabID++}`,this._tabKeys.set(e.title,t)),t}createTabStyle(e){return{zIndex:`${e.zIndex}`}}createTabClass(e){let t="lm-TabBar-tab";return e.title.className&&(t+=` ${e.title.className}`),e.title.closable&&(t+=" lm-mod-closable"),e.current&&(t+=" lm-mod-current"),t}createTabDataset(e){return e.title.dataset}createTabARIA(e){var t;return{role:"tab","aria-selected":e.current.toString(),tabindex:`${null!=(t=e.tabIndex)?t:"-1"}`}}createIconClass(e){let t="lm-TabBar-tabIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}}tS._nInstance=0,tA.Renderer=tS,tA.defaultRenderer=new tS,tA.addButtonSelector=".lm-TabBar-addButton",(tL=tj||(tj={})).DRAG_THRESHOLD=5,tL.DETACH_THRESHOLD=20,tL.createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");t.setAttribute("role","tablist"),t.className="lm-TabBar-content",e.appendChild(t);let r=document.createElement("div");return r.className="lm-TabBar-addButton lm-mod-hidden",r.setAttribute("tabindex","-1"),r.setAttribute("role","button"),e.appendChild(r),e},tL.asTitle=function(e){return e instanceof eH?e:new eH(e)},tL.parseTransitionDuration=function(e){return 1e3*(parseFloat(window.getComputedStyle(e).transitionDuration)||0)},tL.snapTabLayout=function(e,t){let r=Array(e.length);for(let i=0,n=e.length;i=tL.DRAG_THRESHOLD||i>=tL.DRAG_THRESHOLD},tL.detachExceeded=function(e,t){let r=e.contentRect;return t.clientX=r.right+tL.DETACH_THRESHOLD||t.clientY=r.bottom+tL.DETACH_THRESHOLD},tL.layoutTabs=function(e,t,r,i){let n,a,o,s;"horizontal"===i?(n=t.pressX,a=r.clientX-t.contentRect.left,o=r.clientX,s=t.contentRect.width):(n=t.pressY,a=r.clientY-t.contentRect.top,o=r.clientY,s=t.contentRect.height);let l=t.index,c=a-t.tabPressPos,u=c+t.tabSize;for(let r=0,a=e.length;r>1);if(rt.index&&u>d)a=`${-t.tabSize-h.margin}px`,l=Math.max(l,r);else if(r===t.index){let e=o-n,r=s-(t.tabPos+t.tabSize);a=`${Math.max(-t.tabPos,Math.min(e,r))}px`}else a="";"horizontal"===i?e[r].style.left=a:e[r].style.top=a}t.targetIndex=l},tL.finalizeTabPosition=function(e,t){let r,i;if(r="horizontal"===t?e.contentRect.width:e.contentRect.height,e.targetIndex===e.index)i=0;else if(e.targetIndex>e.index){let t=e.tabLayout[e.targetIndex];i=t.pos+t.size-e.tabSize-e.tabPos}else i=e.tabLayout[e.targetIndex].pos-e.tabPos;let n=r-(e.tabPos+e.tabSize),a=Math.max(-e.tabPos,Math.min(i,n));"horizontal"===t?e.tab.style.left=`${a}px`:e.tab.style.top=`${a}px`},tL.resetTabPositions=function(e,t){for(let r of e)"horizontal"===t?r.style.left="":r.style.top=""};var tE,tC,tL,tP,tI,tz,tD,tO,tR,tF,tj,tB,tN=class extends eW{constructor(e){super(),this._spacing=4,this._dirty=!1,this._root=null,this._box=null,this._items=new Map,this.renderer=e.renderer,void 0!==e.spacing&&(this._spacing=e3.clampDimension(e.spacing)),this._document=e.document||document,this._hiddenMode=void 0!==e.hiddenMode?e.hiddenMode:eG.HiddenMode.Display}dispose(){let e=this[Symbol.iterator]();for(let t of(this._items.forEach(e=>{e.dispose()}),this._box=null,this._root=null,this._items.clear(),e))t.dispose();super.dispose()}get hiddenMode(){return this._hiddenMode}set hiddenMode(e){if(this._hiddenMode!==e){for(let t of(this._hiddenMode=e,this.tabBars()))if(t.titles.length>1)for(let e of t.titles)e.owner.hiddenMode=this._hiddenMode}}get spacing(){return this._spacing}set spacing(e){e=e3.clampDimension(e),this._spacing!==e&&(this._spacing=e,this.parent&&this.parent.fit())}get isEmpty(){return null===this._root}[Symbol.iterator](){return this._root?this._root.iterAllWidgets():(0,B.empty)()}widgets(){return this._root?this._root.iterUserWidgets():(0,B.empty)()}selectedWidgets(){return this._root?this._root.iterSelectedWidgets():(0,B.empty)()}tabBars(){return this._root?this._root.iterTabBars():(0,B.empty)()}handles(){return this._root?this._root.iterHandles():(0,B.empty)()}moveHandle(e,t,r){let i,n=e.classList.contains("lm-mod-hidden");if(!this._root||n)return;let a=this._root.findSplitNode(e);a&&0!=(i="horizontal"===a.node.orientation?t-e.offsetLeft:r-e.offsetTop)&&(a.node.holdSizes(),eV.adjust(a.node.sizers,a.index,i),this.parent&&this.parent.update())}saveLayout(){return this._root?(this._root.holdAllSizes(),{main:this._root.createConfig()}):{main:null}}restoreLayout(e){let t=new Set,r;r=e.main?tB.normalizeAreaConfig(e.main,t):null;let i=this.widgets(),n=this.tabBars(),a=this.handles();for(let e of(this._root=null,i))t.has(e)||(e.parent=null);for(let e of n)e.dispose();for(let e of a)e.parentNode&&e.parentNode.removeChild(e);for(let e of t)e.parent=this.parent;r?this._root=tB.realizeAreaConfig(r,{createTabBar:e=>this._createTabBar(),createHandle:()=>this._createHandle()},this._document):this._root=null,this.parent&&(t.forEach(e=>{this.attachWidget(e)}),this.parent.fit())}addWidget(e,t={}){let r=t.ref||null,i=t.mode||"tab-after",n=null;if(this._root&&r&&(n=this._root.findTabNode(r)),r&&!n)throw Error("Reference widget is not in the layout.");switch(e.parent=this.parent,i){case"tab-after":this._insertTab(e,r,n,!0);break;case"tab-before":this._insertTab(e,r,n,!1);break;case"split-top":this._insertSplit(e,r,n,"vertical",!1);break;case"split-left":this._insertSplit(e,r,n,"horizontal",!1);break;case"split-right":this._insertSplit(e,r,n,"horizontal",!0);break;case"split-bottom":this._insertSplit(e,r,n,"vertical",!0);break;case"merge-top":this._insertSplit(e,r,n,"vertical",!1,!0);break;case"merge-left":this._insertSplit(e,r,n,"horizontal",!1,!0);break;case"merge-right":this._insertSplit(e,r,n,"horizontal",!0,!0);break;case"merge-bottom":this._insertSplit(e,r,n,"vertical",!0,!0)}this.parent&&(this.attachWidget(e),this.parent.fit())}removeWidget(e){this._removeWidget(e),this.parent&&(this.detachWidget(e),this.parent.fit())}hitTestTabAreas(e,t){if(!this._root||!this.parent||!this.parent.isVisible)return null;this._box||(this._box=$.boxSizing(this.parent.node));let r=this.parent.node.getBoundingClientRect(),i=e-r.left-this._box.borderLeft,n=t-r.top-this._box.borderTop,a=this._root.hitTestTabNodes(i,n);if(!a)return null;let{tabBar:o,top:s,left:l,width:c,height:u}=a,h=this._box.borderLeft+this._box.borderRight,d=this._box.borderTop+this._box.borderBottom,f=r.width-h-(l+c),p=r.height-d-(s+u);return{tabBar:o,x:i,y:n,top:s,left:l,right:f,bottom:p,width:c,height:u}}init(){for(let e of(super.init(),this))this.attachWidget(e);for(let e of this.handles())this.parent.node.appendChild(e);this.parent.fit()}attachWidget(e){this.parent.node!==e.node.parentNode&&(this._items.set(e,new eJ(e)),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterAttach))}detachWidget(e){if(this.parent.node!==e.node.parentNode)return;this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterDetach);let t=this._items.get(e);t&&(this._items.delete(e),t.dispose())}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_removeWidget(e){if(!this._root)return;let t=this._root.findTabNode(e);if(!t)return;if(tB.removeAria(e),t.tabBar.titles.length>1){t.tabBar.removeTab(e.title),this._hiddenMode===eG.HiddenMode.Scale&&1==t.tabBar.titles.length&&(t.tabBar.titles[0].owner.hiddenMode=eG.HiddenMode.Display);return}if(t.tabBar.dispose(),this._root===t){this._root=null;return}this._root.holdAllSizes();let r=t.parent;t.parent=null;let i=B.ArrayExt.removeFirstOf(r.children,t),n=B.ArrayExt.removeAt(r.handles,i);if(B.ArrayExt.removeAt(r.sizers,i),n.parentNode&&n.parentNode.removeChild(n),r.children.length>1)return void r.syncHandles();let a=r.parent;r.parent=null;let o=r.children[0],s=r.handles[0];if(r.children.length=0,r.handles.length=0,r.sizers.length=0,s.parentNode&&s.parentNode.removeChild(s),this._root===r){o.parent=null,this._root=o;return}let l=a.children.indexOf(r);if(o instanceof tB.TabLayoutNode){o.parent=a,a.children[l]=o;return}let c=B.ArrayExt.removeAt(a.handles,l);B.ArrayExt.removeAt(a.children,l),B.ArrayExt.removeAt(a.sizers,l),c.parentNode&&c.parentNode.removeChild(c);for(let e=0,t=o.children.length;e=r.length)&&(i=0),{type:"tab-area",widgets:r,currentIndex:i}}(t,r):function(t,r){let i=t.orientation,n=[],a=[];for(let o=0,s=t.children.length;o{let i=n(e,c,u),a=t(l.sizes[r]),o=c.createHandle();h.children.push(i),h.handles.push(o),h.sizers.push(a),i.parent=h}),h.syncHandles(),h.normalizeSizes(),h)};class r{constructor(e){this.parent=null,this._top=0,this._left=0,this._width=0,this._height=0;let t=new eq,r=new eq;t.stretch=0,r.stretch=1,this.tabBar=e,this.sizers=[t,r]}get top(){return this._top}get left(){return this._left}get width(){return this._width}get height(){return this._height}*iterAllWidgets(){yield this.tabBar,yield*this.iterUserWidgets()}*iterUserWidgets(){for(let e of this.tabBar.titles)yield e.owner}*iterSelectedWidgets(){let e=this.tabBar.currentTitle;e&&(yield e.owner)}*iterTabBars(){yield this.tabBar}*iterHandles(){}findTabNode(e){return -1!==this.tabBar.titles.indexOf(e.title)?this:null}findSplitNode(e){return null}findFirstTabNode(){return this}hitTestTabNodes(e,t){return e=this._left+this._width||t=this._top+this._height?null:this}createConfig(){return{type:"tab-area",widgets:this.tabBar.titles.map(e=>e.owner),currentIndex:this.tabBar.currentIndex}}holdAllSizes(){}fit(e,t){let r=0,i=0,n=t.get(this.tabBar),a=this.tabBar.currentTitle,o=a?t.get(a.owner):void 0,[s,l]=this.sizers;return n&&n.fit(),o&&o.fit(),n&&!n.isHidden?(r=Math.max(r,n.minWidth),i+=n.minHeight,s.minSize=n.minHeight,s.maxSize=n.maxHeight):(s.minSize=0,s.maxSize=0),o&&!o.isHidden?(r=Math.max(r,o.minWidth),i+=o.minHeight,l.minSize=o.minHeight):l.minSize=0,l.maxSize=1/0,{minWidth:r,minHeight:i,maxWidth:1/0,maxHeight:1/0}}update(e,t,r,i,n,a){this._top=t,this._left=e,this._width=r,this._height=i;let o=a.get(this.tabBar),s=this.tabBar.currentTitle,l=s?a.get(s.owner):void 0;if(eV.calc(this.sizers,i),o&&!o.isHidden){let i=this.sizers[0].size;o.update(e,t,r,i),t+=i}if(l&&!l.isHidden){let i=this.sizers[1].size;l.update(e,t,r,i)}}}e.TabLayoutNode=r;class i{constructor(e){this.parent=null,this.normalized=!1,this.children=[],this.sizers=[],this.handles=[],this.orientation=e}*iterAllWidgets(){for(let e of this.children)yield*e.iterAllWidgets()}*iterUserWidgets(){for(let e of this.children)yield*e.iterUserWidgets()}*iterSelectedWidgets(){for(let e of this.children)yield*e.iterSelectedWidgets()}*iterTabBars(){for(let e of this.children)yield*e.iterTabBars()}*iterHandles(){for(let e of(yield*this.handles,this.children))yield*e.iterHandles()}findTabNode(e){for(let t=0,r=this.children.length;te.createConfig()),sizes:t}}syncHandles(){this.handles.forEach((e,t)=>{e.setAttribute("data-orientation",this.orientation),t===this.handles.length-1?e.classList.add("lm-mod-hidden"):e.classList.remove("lm-mod-hidden")})}holdSizes(){for(let e of this.sizers)e.sizeHint=e.size}holdAllSizes(){for(let e of this.children)e.holdAllSizes();this.holdSizes()}normalizeSizes(){let e=this.sizers.length;if(0===e)return;this.holdSizes();let t=this.sizers.reduce((e,t)=>e+t.sizeHint,0);if(0===t)for(let t of this.sizers)t.size=t.sizeHint=1/e;else for(let e of this.sizers)e.size=e.sizeHint/=t;this.normalized=!0}createNormalizedSizes(){let e=this.sizers.length;if(0===e)return[];let t=this.sizers.map(e=>e.size),r=t.reduce((e,t)=>e+t,0);if(0===r)for(let r=t.length-1;r>-1;r--)t[r]=1/e;else for(let e=t.length-1;e>-1;e--)t[e]/=r;return t}fit(e,t){let r="horizontal"===this.orientation,i=Math.max(0,this.children.length-1)*e,n=r?i:0,a=r?0:i;for(let i=0,o=this.children.length;ithis._createTabBar(),createHandle:()=>this._createHandle()},spacing:t.spacing,hiddenMode:t.hiddenMode}),this.overlay=t.overlay||new e.Overlay,this.node.appendChild(this.overlay.node)}dispose(){this._releaseMouse(),this.overlay.hide(0),this._drag&&this._drag.dispose(),super.dispose()}get hiddenMode(){return this.layout.hiddenMode}set hiddenMode(e){this.layout.hiddenMode=e}get layoutModified(){return this._layoutModified}get addRequested(){return this._addRequested}get renderer(){return this.layout.renderer}get spacing(){return this.layout.spacing}set spacing(e){this.layout.spacing=e}get mode(){return this._mode}set mode(e){if(this._mode===e)return;this._mode=e,this.dataset.mode=e;let t=this.layout;switch(e){case"multiple-document":for(let e of t.tabBars())e.show();break;case"single-document":t.restoreLayout(_.createSingleDocumentConfig(this));break;default:throw"unreachable"}ee.postMessage(this,_.LayoutModified)}get tabsMovable(){return this._tabsMovable}set tabsMovable(e){for(let t of(this._tabsMovable=e,this.tabBars()))t.tabsMovable=e}get tabsConstrained(){return this._tabsConstrained}set tabsConstrained(e){this._tabsConstrained=e}get addButtonEnabled(){return this._addButtonEnabled}set addButtonEnabled(e){for(let t of(this._addButtonEnabled=e,this.tabBars()))t.addButtonEnabled=e}get isEmpty(){return this.layout.isEmpty}*widgets(){yield*this.layout.widgets()}*selectedWidgets(){yield*this.layout.selectedWidgets()}*tabBars(){yield*this.layout.tabBars()}*handles(){yield*this.layout.handles()}selectWidget(e){let t=(0,B.find)(this.tabBars(),t=>-1!==t.titles.indexOf(e.title));if(!t)throw Error("Widget is not contained in the dock panel.");t.currentTitle=e.title}activateWidget(e){this.selectWidget(e),e.activate()}saveLayout(){return this.layout.saveLayout()}restoreLayout(e){this._mode="multiple-document",this.layout.restoreLayout(e),(X.IS_EDGE||X.IS_IE)&&ee.flush(),ee.postMessage(this,_.LayoutModified)}addWidget(e,t={}){"single-document"===this._mode?this.layout.addWidget(e):this.layout.addWidget(e,t),ee.postMessage(this,_.LayoutModified)}processMessage(e){"layout-modified"===e.type?this._layoutModified.emit(void 0):super.processMessage(e)}handleEvent(e){switch(e.type){case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;case"pointerdown":this._evtPointerDown(e);break;case"pointermove":this._evtPointerMove(e);break;case"pointerup":this._evtPointerUp(e);break;case"keydown":this._evtKeyDown(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("lm-dragenter",this),this.node.addEventListener("lm-dragleave",this),this.node.addEventListener("lm-dragover",this),this.node.addEventListener("lm-drop",this),this.node.addEventListener("pointerdown",this)}onAfterDetach(e){this.node.removeEventListener("lm-dragenter",this),this.node.removeEventListener("lm-dragleave",this),this.node.removeEventListener("lm-dragover",this),this.node.removeEventListener("lm-drop",this),this.node.removeEventListener("pointerdown",this),this._releaseMouse()}onChildAdded(e){_.isGeneratedTabBarProperty.get(e.child)||e.child.addClass("lm-DockPanel-widget")}onChildRemoved(e){_.isGeneratedTabBarProperty.get(e.child)||(e.child.removeClass("lm-DockPanel-widget"),ee.postMessage(this,_.LayoutModified))}_evtDragEnter(e){e.mimeData.hasData("application/vnd.lumino.widget-factory")&&(e.preventDefault(),e.stopPropagation())}_evtDragLeave(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||(e.stopPropagation(),this.overlay.hide(1))}_evtDragOver(e){e.preventDefault(),this._tabsConstrained&&e.source!==this||"invalid"===this._showOverlay(e.clientX,e.clientY)?e.dropAction="none":(e.stopPropagation(),e.dropAction=e.proposedAction)}_evtDrop(e){if(e.preventDefault(),this.overlay.hide(0),"none"===e.proposedAction){e.dropAction="none";return}let{clientX:t,clientY:r}=e,{zone:i,target:n}=_.findDropTarget(this,t,r,this._edges);if(this._tabsConstrained&&e.source!==this||"invalid"===i){e.dropAction="none";return}let a=e.mimeData.getData("application/vnd.lumino.widget-factory");if("function"!=typeof a){e.dropAction="none";return}let o=a();if(!(o instanceof eG)||o.contains(this)){e.dropAction="none";return}let s=n?_.getDropRef(n.tabBar):null;switch(i){case"root-all":this.addWidget(o);break;case"root-top":this.addWidget(o,{mode:"split-top"});break;case"root-left":this.addWidget(o,{mode:"split-left"});break;case"root-right":this.addWidget(o,{mode:"split-right"});break;case"root-bottom":this.addWidget(o,{mode:"split-bottom"});break;case"widget-all":case"widget-tab":this.addWidget(o,{mode:"tab-after",ref:s});break;case"widget-top":this.addWidget(o,{mode:"split-top",ref:s});break;case"widget-left":this.addWidget(o,{mode:"split-left",ref:s});break;case"widget-right":this.addWidget(o,{mode:"split-right",ref:s});break;case"widget-bottom":this.addWidget(o,{mode:"split-bottom",ref:s});break;default:throw"unreachable"}e.dropAction=e.proposedAction,e.stopPropagation(),this.activateWidget(o)}_evtKeyDown(e){e.preventDefault(),e.stopPropagation(),27===e.keyCode&&(this._releaseMouse(),ee.postMessage(this,_.LayoutModified))}_evtPointerDown(e){if(0!==e.button)return;let t=this.layout,r=e.target,i=(0,B.find)(t.handles(),e=>e.contains(r));if(!i)return;e.preventDefault(),e.stopPropagation(),this._document.addEventListener("keydown",this,!0),this._document.addEventListener("pointerup",this,!0),this._document.addEventListener("pointermove",this,!0),this._document.addEventListener("contextmenu",this,!0);let n=i.getBoundingClientRect(),a=e.clientX-n.left,o=e.clientY-n.top,s=window.getComputedStyle(i),l=ec.overrideCursor(s.cursor,this._document);this._pressData={handle:i,deltaX:a,deltaY:o,override:l}}_evtPointerMove(e){if(!this._pressData)return;e.preventDefault(),e.stopPropagation();let t=this.node.getBoundingClientRect(),r=e.clientX-t.left-this._pressData.deltaX,i=e.clientY-t.top-this._pressData.deltaY;this.layout.moveHandle(this._pressData.handle,r,i)}_evtPointerUp(e){0===e.button&&(e.preventDefault(),e.stopPropagation(),this._releaseMouse(),ee.postMessage(this,_.LayoutModified))}_releaseMouse(){this._pressData&&(this._pressData.override.dispose(),this._pressData=null,this._document.removeEventListener("keydown",this,!0),this._document.removeEventListener("pointerup",this,!0),this._document.removeEventListener("pointermove",this,!0),this._document.removeEventListener("contextmenu",this,!0))}_showOverlay(e,t){let{zone:r,target:i}=_.findDropTarget(this,e,t,this._edges);if("invalid"===r)return this.overlay.hide(100),r;let n,a,o,s,l=$.boxSizing(this.node),c=this.node.getBoundingClientRect();switch(r){case"root-all":n=l.paddingTop,a=l.paddingLeft,o=l.paddingRight,s=l.paddingBottom;break;case"root-top":n=l.paddingTop,a=l.paddingLeft,o=l.paddingRight,s=c.height*_.GOLDEN_RATIO;break;case"root-left":n=l.paddingTop,a=l.paddingLeft,o=c.width*_.GOLDEN_RATIO,s=l.paddingBottom;break;case"root-right":n=l.paddingTop,a=c.width*_.GOLDEN_RATIO,o=l.paddingRight,s=l.paddingBottom;break;case"root-bottom":n=c.height*_.GOLDEN_RATIO,a=l.paddingLeft,o=l.paddingRight,s=l.paddingBottom;break;case"widget-all":n=i.top,a=i.left,o=i.right,s=i.bottom;break;case"widget-top":n=i.top,a=i.left,o=i.right,s=i.bottom+i.height/2;break;case"widget-left":n=i.top,a=i.left,o=i.right+i.width/2,s=i.bottom;break;case"widget-right":n=i.top,a=i.left+i.width/2,o=i.right,s=i.bottom;break;case"widget-bottom":n=i.top+i.height/2,a=i.left,o=i.right,s=i.bottom;break;case"widget-tab":{let e=i.tabBar.node.getBoundingClientRect().height;n=i.top,a=i.left,o=i.right,s=i.bottom+i.height-e;break}default:throw"unreachable"}return this.overlay.show({top:n,left:a,right:o,bottom:s}),r}_createTabBar(){let e=this._renderer.createTabBar(this._document);return _.isGeneratedTabBarProperty.set(e,!0),"single-document"===this._mode&&e.hide(),e.tabsMovable=this._tabsMovable,e.allowDeselect=!1,e.addButtonEnabled=this._addButtonEnabled,e.removeBehavior="select-previous-tab",e.insertBehavior="select-tab-if-needed",e.tabMoved.connect(this._onTabMoved,this),e.currentChanged.connect(this._onCurrentChanged,this),e.tabCloseRequested.connect(this._onTabCloseRequested,this),e.tabDetachRequested.connect(this._onTabDetachRequested,this),e.tabActivateRequested.connect(this._onTabActivateRequested,this),e.addRequested.connect(this._onTabAddRequested,this),e}_createHandle(){return this._renderer.createHandle()}_onTabMoved(){ee.postMessage(this,_.LayoutModified)}_onCurrentChanged(e,t){let{previousTitle:r,currentTitle:i}=t;r&&r.owner.hide(),i&&i.owner.show(),(X.IS_EDGE||X.IS_IE)&&ee.flush(),ee.postMessage(this,_.LayoutModified)}_onTabAddRequested(e){this._addRequested.emit(e)}_onTabActivateRequested(e,t){t.title.owner.activate()}_onTabCloseRequested(e,t){t.title.owner.close()}_onTabDetachRequested(e,t){if(this._drag)return;e.releaseMouse();let{title:r,tab:i,clientX:n,clientY:a,offset:o}=t,s=new N.MimeData;s.setData("application/vnd.lumino.widget-factory",()=>r.owner);let l=i.cloneNode(!0);o&&(l.style.top=`-${o.y}px`,l.style.left=`-${o.x}px`),this._drag=new ec({document:this._document,mimeData:s,dragImage:l,proposedAction:"move",supportedActions:"move",source:this}),i.classList.add("lm-mod-hidden");let c=()=>{this._drag=null,i.classList.remove("lm-mod-hidden")};this._drag.start(n,a).then(c)}},tV=tU||(tU={});tV.Overlay=class{constructor(){this._timer=-1,this._hidden=!0,this.node=document.createElement("div"),this.node.classList.add("lm-DockPanel-overlay"),this.node.classList.add("lm-mod-hidden"),this.node.style.position="absolute",this.node.style.contain="strict"}show(e){let t=this.node.style;t.top=`${e.top}px`,t.left=`${e.left}px`,t.right=`${e.right}px`,t.bottom=`${e.bottom}px`,clearTimeout(this._timer),this._timer=-1,this._hidden&&(this._hidden=!1,this.node.classList.remove("lm-mod-hidden"))}hide(e){if(!this._hidden){if(e<=0){clearTimeout(this._timer),this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden");return}-1===this._timer&&(this._timer=window.setTimeout(()=>{this._timer=-1,this._hidden=!0,this.node.classList.add("lm-mod-hidden")},e))}}};class tq{createTabBar(e){let t=new tk({document:e});return t.addClass("lm-DockPanel-tabBar"),t}createHandle(){let e=document.createElement("div");return e.className="lm-DockPanel-handle",e}}tV.Renderer=tq,tV.defaultRenderer=new tq,(m=_||(_={})).GOLDEN_RATIO=.618,m.DEFAULT_EDGES={top:12,right:40,bottom:40,left:40},m.LayoutModified=new er("layout-modified"),m.isGeneratedTabBarProperty=new ei({name:"isGeneratedTabBar",create:()=>!1}),m.createSingleDocumentConfig=function(e){if(e.isEmpty)return{main:null};let t=Array.from(e.widgets()),r=e.selectedWidgets().next().value,i=r?t.indexOf(r):-1;return{main:{type:"tab-area",widgets:t,currentIndex:i}}},m.findDropTarget=function(e,t,r,i){let n;if(!$.hitTest(e.node,t,r))return{zone:"invalid",target:null};let a=e.layout;if(a.isEmpty)return{zone:"root-all",target:null};if("multiple-document"===e.mode){let n=e.node.getBoundingClientRect(),a=t-n.left+1,o=r-n.top+1,s=n.right-t,l=n.bottom-r;switch(Math.min(o,s,l,a)){case o:if(oh&&c>h&&l>d&&u>d)return{zone:"widget-all",target:o};switch(s/=h,l/=d,Math.min(s,l,c/=h,u/=d)){case s:n="widget-left";break;case l:n="widget-top";break;case c:n="widget-right";break;case u:n="widget-bottom";break;default:throw"unreachable"}return{zone:n,target:o}},m.getDropRef=function(e){return 0===e.titles.length?null:e.currentTitle?e.currentTitle.owner:e.titles[e.titles.length-1].owner};var tH=class e extends eW{constructor(e={}){super(e),this._dirty=!1,this._rowSpacing=4,this._columnSpacing=4,this._items=[],this._rowStarts=[],this._columnStarts=[],this._rowSizers=[new eq],this._columnSizers=[new eq],this._box=null,void 0!==e.rowCount&&w.reallocSizers(this._rowSizers,e.rowCount),void 0!==e.columnCount&&w.reallocSizers(this._columnSizers,e.columnCount),void 0!==e.rowSpacing&&(this._rowSpacing=w.clampValue(e.rowSpacing)),void 0!==e.columnSpacing&&(this._columnSpacing=w.clampValue(e.columnSpacing))}dispose(){for(let e of this._items){let t=e.widget;e.dispose(),t.dispose()}this._box=null,this._items.length=0,this._rowStarts.length=0,this._rowSizers.length=0,this._columnStarts.length=0,this._columnSizers.length=0,super.dispose()}get rowCount(){return this._rowSizers.length}set rowCount(e){e!==this.rowCount&&(w.reallocSizers(this._rowSizers,e),this.parent&&this.parent.fit())}get columnCount(){return this._columnSizers.length}set columnCount(e){e!==this.columnCount&&(w.reallocSizers(this._columnSizers,e),this.parent&&this.parent.fit())}get rowSpacing(){return this._rowSpacing}set rowSpacing(e){e=w.clampValue(e),this._rowSpacing!==e&&(this._rowSpacing=e,this.parent&&this.parent.fit())}get columnSpacing(){return this._columnSpacing}set columnSpacing(e){e=w.clampValue(e),this._columnSpacing!==e&&(this._columnSpacing=e,this.parent&&this.parent.fit())}rowStretch(e){let t=this._rowSizers[e];return t?t.stretch:-1}setRowStretch(e,t){let r=this._rowSizers[e];r&&(t=w.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}columnStretch(e){let t=this._columnSizers[e];return t?t.stretch:-1}setColumnStretch(e,t){let r=this._columnSizers[e];r&&(t=w.clampValue(t),r.stretch!==t&&(r.stretch=t,this.parent&&this.parent.update()))}*[Symbol.iterator](){for(let e of this._items)yield e.widget}addWidget(e){-1===B.ArrayExt.findFirstIndex(this._items,t=>t.widget===e)&&(this._items.push(new eJ(e)),this.parent&&this.attachWidget(e))}removeWidget(e){let t=B.ArrayExt.findFirstIndex(this._items,t=>t.widget===e);if(-1===t)return;let r=B.ArrayExt.removeAt(this._items,t);this.parent&&this.detachWidget(e),r.dispose()}init(){for(let e of(super.init(),this))this.attachWidget(e)}attachWidget(e){this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeAttach),this.parent.node.appendChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterAttach),this.parent.fit()}detachWidget(e){this.parent.isAttached&&ee.sendMessage(e,eG.Msg.BeforeDetach),this.parent.node.removeChild(e.node),this.parent.isAttached&&ee.sendMessage(e,eG.Msg.AfterDetach),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){for(let e=0,t=this.rowCount;e!e.isHidden);for(let e=0,r=t.length;e({row:0,column:0,rowSpan:1,columnSpan:1}),changed:function(e){e.parent&&e.parent.layout instanceof tH&&e.parent.fit()}}),y.normalizeConfig=function(e){return{row:Math.max(0,Math.floor(e.row||0)),column:Math.max(0,Math.floor(e.column||0)),rowSpan:Math.max(1,Math.floor(e.rowSpan||0)),columnSpan:Math.max(1,Math.floor(e.columnSpan||0))}},y.clampValue=function(e){return Math.max(0,Math.floor(e))},y.rowSpanCmp=function(e,t){let r=y.cellConfigProperty.get(e.widget),i=y.cellConfigProperty.get(t.widget);return r.rowSpan-i.rowSpan},y.columnSpanCmp=function(e,t){let r=y.cellConfigProperty.get(e.widget),i=y.cellConfigProperty.get(t.widget);return r.columnSpan-i.columnSpan},y.reallocSizers=function(e,t){for(t=Math.max(1,Math.floor(t));e.lengtht&&(e.length=t)},y.distributeMin=function(e,t,r,i){if(r=i)return;let a=(i-n)/(r-t+1);for(let i=t;i<=r;++i)e[i].minSize+=a};var tG=class e extends eG{constructor(t={}){super({node:T.createNode()}),this._activeIndex=-1,this._tabFocusIndex=0,this._menus=[],this._childMenu=null,this._overflowMenu=null,this._menuItemSizes=[],this._overflowIndex=-1,this.addClass("lm-MenuBar"),this.setFlag(eG.Flag.DisallowLayout),this.renderer=t.renderer||e.defaultRenderer,this._forceItemsPosition=t.forceItemsPosition||{forceX:!0,forceY:!0},this._overflowMenuOptions=t.overflowMenuOptions||{isVisible:!0}}dispose(){this._closeChildMenu(),this._menus.length=0,super.dispose()}get childMenu(){return this._childMenu}get overflowIndex(){return this._overflowIndex}get overflowMenu(){return this._overflowMenu}get contentNode(){return this.node.getElementsByClassName("lm-MenuBar-content")[0]}get activeMenu(){return this._menus[this._activeIndex]||null}set activeMenu(e){this.activeIndex=e?this._menus.indexOf(e):-1}get activeIndex(){return this._activeIndex}set activeIndex(e){(e<0||e>=this._menus.length)&&(e=-1),e>-1&&0===this._menus[e].items.length&&(e=-1),this._activeIndex!==e&&(this._activeIndex=e,this.update())}get menus(){return this._menus}openActiveMenu(){-1!==this._activeIndex&&(this._openChildMenu(),this._childMenu&&(this._childMenu.activeIndex=-1,this._childMenu.activateNextItem()))}addMenu(e,t=!0){this.insertMenu(this._menus.length,e,t)}insertMenu(e,t,r=!0){this._closeChildMenu();let i=this._menus.indexOf(t),n=Math.max(0,Math.min(e,this._menus.length));if(-1===i){B.ArrayExt.insert(this._menus,n,t),t.addClass("lm-MenuBar-menu"),t.aboutToClose.connect(this._onMenuAboutToClose,this),t.menuRequested.connect(this._onMenuMenuRequested,this),t.title.changed.connect(this._onTitleChanged,this),r&&this.update();return}n===this._menus.length&&n--,i!==n&&(B.ArrayExt.move(this._menus,i,n),r&&this.update())}removeMenu(e,t=!0){this.removeMenuAt(this._menus.indexOf(e),t)}removeMenuAt(e,t=!0){this._closeChildMenu();let r=B.ArrayExt.removeAt(this._menus,e);r&&(r.aboutToClose.disconnect(this._onMenuAboutToClose,this),r.menuRequested.disconnect(this._onMenuMenuRequested,this),r.title.changed.disconnect(this._onTitleChanged,this),r.removeClass("lm-MenuBar-menu"),t&&this.update())}clearMenus(){if(0!==this._menus.length){for(let e of(this._closeChildMenu(),this._menus))e.aboutToClose.disconnect(this._onMenuAboutToClose,this),e.menuRequested.disconnect(this._onMenuMenuRequested,this),e.title.changed.disconnect(this._onTitleChanged,this),e.removeClass("lm-MenuBar-menu");this._menus.length=0,this.update()}}handleEvent(e){switch(e.type){case"keydown":this._evtKeyDown(e);break;case"mousedown":this._evtMouseDown(e);break;case"mousemove":this._evtMouseMove(e);break;case"focusout":this._evtFocusOut(e);break;case"contextmenu":e.preventDefault(),e.stopPropagation()}}onBeforeAttach(e){this.node.addEventListener("keydown",this),this.node.addEventListener("mousedown",this),this.node.addEventListener("mousemove",this),this.node.addEventListener("focusout",this),this.node.addEventListener("contextmenu",this)}onAfterDetach(e){this.node.removeEventListener("keydown",this),this.node.removeEventListener("mousedown",this),this.node.removeEventListener("mousemove",this),this.node.removeEventListener("focusout",this),this.node.removeEventListener("contextmenu",this),this._closeChildMenu()}onActivateRequest(e){this.isAttached&&this._focusItemAt(0)}onResize(e){this.update(),super.onResize(e)}onUpdateRequest(e){var t;let r=this._menus,i=this.renderer,n=this._activeIndex,a=this._tabFocusIndex>=0&&this._tabFocusIndex-1?this._overflowIndex:r.length,s=0,l=!1,c=Array(o=null!==this._overflowMenu?o-1:o);for(let e=0;e{this._tabFocusIndex=e,this.activeIndex=e}}),s+=this._menuItemSizes[e],r[e].title.label===this._overflowMenuOptions.title&&(l=!0,o--);if(this._overflowMenuOptions.isVisible){if(this._overflowIndex>-1&&!l){if(null===this._overflowMenu){let e=null!=(t=this._overflowMenuOptions.title)?t:"...";this._overflowMenu=new tv({commands:new eA}),this._overflowMenu.title.label=e,this._overflowMenu.title.mnemonic=0,this.addMenu(this._overflowMenu,!1)}for(let e=r.length-2;e>=o;e--){let t=this.menus[e];t.title.mnemonic=0,this._overflowMenu.insertItem(0,{type:"submenu",submenu:t}),this.removeMenu(t,!1)}c[o]=i.renderItem({title:this._overflowMenu.title,active:o===n&&0!==r[o].items.length,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}else if(null!==this._overflowMenu){let e=this._overflowMenu.items,t=this.node.offsetWidth,n=this._overflowMenu.items.length;for(let l=0;lthis._menuItemSizes[n]){let t=e[0].submenu;this._overflowMenu.removeItemAt(0),this.insertMenu(o,t,!1),c[o]=i.renderItem({title:t.title,active:!1,tabbable:o===a,disabled:0===r[o].items.length,onfocus:()=>{this._tabFocusIndex=o,this.activeIndex=o}}),o++}}0===this._overflowMenu.items.length&&(this.removeMenu(this._overflowMenu,!1),c.pop(),this._overflowMenu=null,this._overflowIndex=-1)}}eN.render(c,this.contentNode),this._updateOverflowIndex()}_updateOverflowIndex(){if(!this._overflowMenuOptions.isVisible)return;let e=this.contentNode.childNodes,t=this.node.offsetWidth,r=0,i=-1,n=e.length;if(0==this._menuItemSizes.length)for(let a=0;at&&-1===i&&(i=a)}else for(let e=0;et){i=e;break}this._overflowIndex=i}_evtKeyDown(e){let t=e.keyCode;if(9===t){this.activeIndex=-1;return}if(e.preventDefault(),e.stopPropagation(),13===t||32===t||38===t||40===t){if(this.activeIndex=this._tabFocusIndex,this.activeIndex!==this._tabFocusIndex)return;this.openActiveMenu();return}if(27===t){this._closeChildMenu(),this._focusItemAt(this.activeIndex);return}if(37===t||39===t){let e=37===t?-1:1,r=this._tabFocusIndex+e,i=this._menus.length;for(let t=0;t$.hitTest(t,e.clientX,e.clientY));if(-1===t)return void this._closeChildMenu();if(0===e.button)if(this._childMenu)this._closeChildMenu(),this.activeIndex=t;else{e.preventDefault();let r=this._positionForMenu(t);tv.saveWindowData(),this.activeIndex=t,this._openChildMenu(r)}}_evtMouseMove(e){let t=B.ArrayExt.findFirstIndex(this.contentNode.children,t=>$.hitTest(t,e.clientX,e.clientY));if(t===this._activeIndex||-1===t&&this._childMenu)return;let r=t>=0&&this._childMenu?this._positionForMenu(t):null;tv.saveWindowData(),this.activeIndex=t,r&&this._openChildMenu(r)}_positionForMenu(e){let{left:t,bottom:r}=this.contentNode.children[e].getBoundingClientRect();return{top:r,left:t}}_evtFocusOut(e){this._childMenu||this.node.contains(e.relatedTarget)||(this.activeIndex=-1)}_focusItemAt(e){let t=this.contentNode.childNodes[e];t&&t.focus()}_openChildMenu(e={}){let t=this.activeMenu;if(!t)return void this._closeChildMenu();let r=this._childMenu;if(r===t)return;this._childMenu=t,r?r.close():document.addEventListener("mousedown",this,!0),this._tabFocusIndex=this.activeIndex,ee.sendMessage(this,eG.Msg.UpdateRequest);let{left:i,top:n}=e;(typeof i>"u"||typeof n>"u")&&({left:i,top:n}=this._positionForMenu(this._activeIndex)),r||this.addClass("lm-mod-active"),t.items.length>0&&t.open(i,n,this._forceItemsPosition)}_closeChildMenu(){if(!this._childMenu)return;this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0);let e=this._childMenu;this._childMenu=null,e.close(),this.activeIndex=-1}_onMenuAboutToClose(e){e===this._childMenu&&(this.removeClass("lm-mod-active"),document.removeEventListener("mousedown",this,!0),this._childMenu=null,this.activeIndex=-1)}_onMenuMenuRequested(e,t){if(e!==this._childMenu)return;let r=this._activeIndex,i=this._menus.length;switch(t){case"next":this.activeIndex=r===i-1?0:r+1;break;case"previous":this.activeIndex=0===r?i-1:r-1}this.openActiveMenu()}_onTitleChanged(){this.update()}},tW=tG||(tG={});class tY{renderItem(e){let t=this.createItemClass(e),r=this.createItemDataset(e),i=this.createItemARIA(e);return ez.li({className:t,dataset:r,...e.disabled?{}:{tabindex:e.tabbable?"0":"-1"},onfocus:e.onfocus,...i},this.renderIcon(e),this.renderLabel(e))}renderIcon(e){let t=this.createIconClass(e);return ez.div({className:t},e.title.icon,e.title.iconLabel)}renderLabel(e){let t=this.formatLabel(e);return ez.div({className:"lm-MenuBar-itemLabel"},t)}createItemClass(e){let t="lm-MenuBar-item";return e.title.className&&(t+=` ${e.title.className}`),e.active&&!e.disabled&&(t+=" lm-mod-active"),t}createItemDataset(e){return e.title.dataset}createItemARIA(e){return{role:"menuitem","aria-haspopup":"true","aria-disabled":e.disabled?"true":"false"}}createIconClass(e){let t="lm-MenuBar-itemIcon",r=e.title.iconClass;return r?`${t} ${r}`:t}formatLabel(e){let{label:t,mnemonic:r}=e.title;if(r<0||r>=t.length)return t;let i=t.slice(0,r),n=t.slice(r+1),a=t[r];return[i,ez.span({className:"lm-MenuBar-itemMnemonic"},a),n]}}tW.Renderer=tY,tW.defaultRenderer=new tY,(v=T||(T={})).createNode=function(){let e=document.createElement("div"),t=document.createElement("ul");return t.className="lm-MenuBar-content",e.appendChild(t),t.setAttribute("role","menubar"),e},v.findMnemonic=function(e,t,r){let i=-1,n=-1,a=!1,o=t.toUpperCase();for(let t=0,s=e.length;t=0&&u1&&this.widgets.forEach(e=>{e.hiddenMode=this._hiddenMode}))}dispose(){for(let e of this._items)e.dispose();this._box=null,this._items.length=0,super.dispose()}attachWidget(e,t){this._hiddenMode===eG.HiddenMode.Scale&&this._items.length>0?(1===this._items.length&&(this.widgets[0].hiddenMode=eG.HiddenMode.Scale),t.hiddenMode=eG.HiddenMode.Scale):t.hiddenMode=eG.HiddenMode.Display,B.ArrayExt.insert(this._items,e,new eJ(t)),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeAttach),this.parent.node.appendChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterAttach),this.parent.fit()}moveWidget(e,t,r){B.ArrayExt.move(this._items,e,t),this.parent.update()}detachWidget(e,t){let r=B.ArrayExt.removeAt(this._items,e);this.parent.isAttached&&ee.sendMessage(t,eG.Msg.BeforeDetach),this.parent.node.removeChild(t.node),this.parent.isAttached&&ee.sendMessage(t,eG.Msg.AfterDetach),r.widget.node.style.zIndex="",this._hiddenMode===eG.HiddenMode.Scale&&(t.hiddenMode=eG.HiddenMode.Display,1===this._items.length&&(this._items[0].widget.hiddenMode=eG.HiddenMode.Display)),r.dispose(),this.parent.fit()}onBeforeShow(e){super.onBeforeShow(e),this.parent.update()}onBeforeAttach(e){super.onBeforeAttach(e),this.parent.fit()}onChildShown(e){this.parent.fit()}onChildHidden(e){this.parent.fit()}onResize(e){this.parent.isVisible&&this._update(e.width,e.height)}onUpdateRequest(e){this.parent.isVisible&&this._update(-1,-1)}onFitRequest(e){this.parent.isAttached&&this._fit()}_fit(){let e=0,t=0;for(let r=0,i=this._items.length;r{this.createGraph(this._model)})}renderModel(e){if(this.hasGraphElement())return Promise.resolve();this._model=e;let t=e.data["image/png"];return null!=t?(this.updateImage(t),Promise.resolve()):this.createGraph(e)}hasGraphElement(){return null!==this.node.querySelector(".plot-container")}updateImage(e){this.hideGraph(),this._img_el.src="data:image/png;base64,"+e,this.showImage()}hideGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="none")}showGraph(){let e=this.node.querySelector(".plot-container");null!=e&&(e.style.display="block")}hideImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="none")}showImage(){let e=this.node.querySelector(".plot-img");null!=e&&(e.style.display="block")}createGraph(t){let{data:r,layout:i,frames:n,config:a}=t.data[this._mimeType];return i.height||(i.height=360),(async()=>(null===e.Plotly&&(e.Plotly=await Promise.resolve().then(()=>O(j())),e._resolveLoadingPlotly()),e.loadingPlotly))().then(()=>e.Plotly.react(this.node,r,i,a)).then(r=>{this.showGraph(),this.hideImage(),this.update(),n&&e.Plotly.addFrames(this.node,n),this.node.offsetWidth>0&&this.node.offsetHeight>0&&e.Plotly.toImage(r,{format:"png",width:this.node.offsetWidth,height:this.node.offsetHeight}).then(e=>{let r=e.split(",")[1];t.data["image/png"]!==r&&t.setData({data:{...t.data,"image/png":r}})}),this.node.on("plotly_webglcontextlost",()=>{let e=t.data["image/png"];if(null!=e)return this.updateImage(e),Promise.resolve()})})}onAfterShow(e){this.update()}onResize(e){this.update()}onUpdateRequest(t){e.Plotly&&this.isVisible&&this.hasGraphElement()&&e.Plotly.redraw(this.node).then(()=>{e.Plotly.Plots.resize(this.node)})}static{this.Plotly=null}static{this.loadingPlotly=new Promise(t=>{e._resolveLoadingPlotly=t})}},tK={safe:!0,mimeTypes:[t$],createRenderer:e=>new tX(e)},tJ=[{id:"@jupyterlab/plotly-extension:factory",rendererFactory:tK,rank:2,dataType:"json",fileTypes:[{name:"plotly",mimeTypes:[t$],extensions:[".plotly",".plotly.json"],iconClass:"jp-MaterialIcon jp-PlotlyIcon"}],documentWidgetFactoryOptions:{name:"Plotly",primaryFileType:"plotly",fileTypes:["plotly","json"],defaultFor:["plotly"]}}];r.d(t,{MIME_TYPE:()=>t$,RenderedPlotly:()=>tX,default:()=>tJ,rendererFactory:()=>tK})},3(e){var t,r,i,n=e.exports={};function a(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}try{t="function"==typeof setTimeout?setTimeout:a}catch(e){t=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}var l=[],c=!1,u=-1;function h(){c&&i&&(c=!1,i.length?l=i.concat(l):u=-1,l.length&&d())}function d(){if(!c){var e=s(h);c=!0;for(var t=l.length;t;){for(i=l,l=[];++u1)for(var r=1;r{"use strict";var e,n,r,t,o,i,u,a,c,l,f,s,p,h,d,v,g,y,m,b,S,j,w,E,k,x,T,P,A,C,O,D,M,L,N,$,_,z={0(e,n,r){var t={"./index":()=>r.e(0).then(()=>()=>r(2)),"./mimeExtension":()=>r.e(0).then(()=>()=>r(2))},o=function(e,n){return r.R=n,n=r.o(t,e)?t[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,n},i=function(e,n){if(r.S){var t="default",o=r.S[t];if(o&&o!==e)throw Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[t]=e,r.I(t,n)}};r.d(n,{get:()=>o,init:()=>i})}},I={};function R(e){var n=I[e];if(void 0!==n)return n.exports;var r=I[e]={exports:{}};return z[e](r,r.exports,R),r.exports}R.m=z,R.c=I,R.d=(e,n,r)=>{var t=(n,r)=>{for(var t in n)R.o(n,t)&&!R.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,[r]:n[t]})};t(n,"get"),t(r,"value")},R.f={},R.e=e=>Promise.all(Object.keys(R.f).reduce((n,r)=>(R.f[r](e,n),n),[])),R.u=e=>""+e+".a64aa5a9e512eb3f.js?v=a64aa5a9e512eb3f",R.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),R.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),U={},R.l=function(e,n,r,t){if(U[e])return void U[e].push(n);if(void 0!==r)for(var o,i,u=document.getElementsByTagName("script"),a=0;a{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},R.S={},R.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"jupyterlab-plotly",version:"7.0.0-rc0",factory:()=>R.e(0).then(()=>()=>R(2)),eager:0,treeShakingMode:null}]},uniqueName:"jupyterlab-plotly"},q={},B={},R.I=function(e,n){n||(n=[]);var r=B[e];if(r||(r=B[e]={}),!(n.indexOf(r)>=0)){if(n.push(r),q[e])return q[e];R.o(R.S,e)||(R.S[e]={});var t=R.S[e],o=function(e){"u">typeof console&&console.warn&&console.warn(e)},i=R.initializeSharingData.uniqueName,u=function(e,n,r,o){var u=t[e]=t[e]||{},a=u[n];(!a||!a.loaded&&(!o!=!a.eager?o:i>a.from))&&(u[n]={get:r,from:i,eager:!!o})},a=function(r){var t=function(e){o("Initialization of sharing external failed: "+e)};try{var i=R(r);if(!i)return;var u=function(r){return r&&r.init&&r.init(R.S[e],n)};if(i.then)return c.push(i.then(u,t));var a=u(i);if(a&&a.then)return c.push(a.catch(t))}catch(e){t(e)}},c=[],l=R.initializeSharingData.scopeToSharingDataMapping;return(l[e]&&l[e].forEach(function(e){"object"==typeof e?u(e.name,e.version,e.factory,e.eager):a(e)}),c.length)?q[e]=Promise.all(c).then(function(){return q[e]=1}):q[e]=1}},R.g.importScripts&&(J=R.g.location+"");var U,q,B,J,Y=R.g.document;if(!J&&Y&&(Y.currentScript&&"SCRIPT"===Y.currentScript.tagName.toUpperCase()&&(J=Y.currentScript.src),!J)){var V=Y.getElementsByTagName("script");if(V.length)for(var F=V.length-1;F>-1&&(!J||!/^http(s?):/.test(J));)J=V[F--].src}if(!J)throw Error("Automatic publicPath is not supported in this browser");R.p=J=J.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),R.consumesLoadingData={chunkMapping:{},moduleIdToConsumeDataMapping:{},initialConsumes:[]},e=function(e){return e.split(".").map(function(e){return+e==e?+e:e})},n=function(n){var r=function(n){var r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(n),t=r[1]?[0].concat(e(r[1])):[0];r[2]&&(t.length++,t.push.apply(t,e(r[2])));let o=t[t.length-1];for(;t.length&&(void 0===o||/^[*xX]$/.test(o));)t.pop(),o=t[t.length-1];return t},t=function(e){return 1===e.length?[0]:2===e.length?[1].concat(e.slice(1)):3===e.length?[2].concat(e.slice(1)):[e.length].concat(e.slice(1))},o=function(e){return[-e[0]-1].concat(e.slice(1))},i=function(e){let n=/^(\^|~|<=|<|>=|>|=|v|!)/.exec(e),i=n?n[0]:"",u=r(i.length?e.slice(i.length).trim():e.trim());switch(i){case"^":if(u.length>1&&0===u[1]){if(u.length>2&&0===u[2])return[3].concat(u.slice(1));return[2].concat(u.slice(1))}return[1].concat(u.slice(1));case"~":return[2].concat(u.slice(1));case">=":return u;case"=":case"v":case"":return t(u);case"<":return o(u);case">":return[,t(u),0,u,2];case"<=":return[,t(u),o(u),1];case"!":return[,t(u),0];default:throw Error("Unexpected start value")}},u=function(e,n){if(1===e.length)return e[0];let r=[];for(let n of e.slice().reverse())0 in n?r.push(n):r.push.apply(r,n.slice(1));return[,].concat(r,e.slice(1).map(()=>n))};return u(n.split(/\s*\|\|\s*/).map(function(e){let n=e.split(/\s+-\s+/);if(1===n.length){e=e.trim();let n=[],r=/[-0-9A-Za-z]\s+/g;for(var a,c=0;a=r.exec(e);){let r=a.index+1;n.push(i(e.slice(c,r).trim())),c=r}return n.push(i(e.slice(c).trim())),u(n,2)}let l=r(n[0]),f=r(n[1]);return[,t(f),o(f),1,l,2]}),1)},r=function(n){var r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(n),t=r[1]?e(r[1]):[];return r[2]&&(t.length++,t.push.apply(t,e(r[2]))),r[3]&&(t.push([]),t.push.apply(t,e(r[3]))),t},t=function(e,n){e=r(e),n=r(n);for(var t=0;;){if(t>=e.length)return t=n.length)return"u"==i;var u=n[t],a=(typeof u)[0];if(i==a){if("o"!=i&&"u"!=i&&o!=u)return o=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var t=1,i=1;i0?".":"")+(t=2,u)}return r}for(var c=[],i=1;i=n.length||"o"==(f=(typeof(l=n[u]))[0])){if(!c)return!0;if("u"==s)return a>t&&!o;return""==s!=o}if("u"==f){if(!c||"u"!=s)return!1}else if(c)if(s==f)if(a<=t){if(l!=e[a])return!1}else{if(o?l>e[a]:ltypeof console&&console.warn&&console.warn(e)},y=function(e,n,r,t){g(d(e,n,r,t))},m=function(e){return e.loaded=1,e.get()},S=(b=function(e){return function(n,r,t,o){var i=R.I(n);return i&&i.then?i.then(e.bind(e,n,R.S[n],r,t,o)):e(n,R.S[n],r,t,o)}})(function(e,n,r){return u(e,r),m(a(n,r))}),j=b(function(e,n,r,t){return n&&R.o(n,r)?m(a(n,r)):t()}),w=b(function(e,n,r,t){return u(e,r),m(h(n,r,t)||y(n,e,r,t)||a(n,r))}),E=b(function(e,n,r){return u(e,r),f(n,e,r)}),k=b(function(e,n,r,t){return u(e,r),s(n,e,r,t)}),x=b(function(e,n,r,t){return u(e,r),v(n,e,r,t)}),T=b(function(e,n,r,t){return u(e,r),p(n,e,r,t)}),P=b(function(e,n,r,t,o){return n&&R.o(n,r)?m(h(n,r,t)||y(n,e,r,t)||a(n,r)):o()}),A=b(function(e,n,r,t){return n&&R.o(n,r)?f(n,e,r):t()}),C=b(function(e,n,r,t,o){return n&&R.o(n,r)?s(n,e,r,t):o()}),O=b(function(e,n,r,t,o){var i=n&&R.o(n,r)&&h(n,r,t);return i?m(i):o()}),D=b(function(e,n,r,t,o){return n&&R.o(n,r)?p(n,e,r,t):o()}),M=function(e){var r=!1,t=!1,o=!1,i=!1,u=[e.shareScope,e.shareKey];return(e.requiredVersion?(e.strictVersion&&(r=!0),e.singleton&&(t=!0),u.push(n(e.requiredVersion)),o=!0):e.singleton&&(t=!0),e.fallback&&(i=!0,u.push(e.fallback)),r&&t&&o&&i)?function(){return D.apply(null,u)}:r&&o&&i?function(){return O.apply(null,u)}:t&&o&&i?function(){return C.apply(null,u)}:r&&t&&o?function(){return T.apply(null,u)}:t&&i?function(){return A.apply(null,u)}:o&&i?function(){return P.apply(null,u)}:r&&o?function(){return x.apply(null,u)}:t&&o?function(){return k.apply(null,u)}:t?function(){return E.apply(null,u)}:o?function(){return w.apply(null,u)}:i?function(){return j.apply(null,u)}:function(){return S.apply(null,u)}},L={},R.f.consumes=function(e,n){var r=R.consumesLoadingData.moduleIdToConsumeDataMapping,t=R.consumesLoadingData.chunkMapping;R.o(t,e)&&t[e].forEach(function(e){if(R.o(L,e))return n.push(L[e]);var t=function(n){L[e]=0,R.m[e]=function(r){delete R.c[e],r.exports=n()}},o=function(n){delete L[e],R.m[e]=function(r){throw delete R.c[e],n}};try{var i=M(r[e])();i.then?n.push(L[e]=i.then(t).catch(o)):t(i)}catch(e){o(e)}})},N={1:0},R.f.j=function(e,n){var r=R.o(N,e)?N[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var t=new Promise((n,t)=>r=N[e]=[n,t]);n.push(r[2]=t);var o=R.p+R.u(e),i=Error();R.l(o,function(n){if(R.o(N,e)&&(0!==(r=N[e])&&(N[e]=void 0),r)){var t=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+e+" failed.\n("+t+": "+o+")",i.name="ChunkLoadError",i.type=t,i.request=o,r[1](i)}},"chunk-"+e,e)}},$=(e,n)=>{var r,t,[o,i,u]=n,a=0;if(o.some(e=>0!==N[e])){for(r in i)R.o(i,r)&&(R.m[r]=i[r]);u&&u(R)}for(e&&e(n);a{"use strict";var e,n,r,t,o,i,u,a,c,l,f,s,p,h,d,v,g,y,m,b,S,j,w,E,k,x,T,P,A,C,O,D,M,L,N,$,_,z={0(e,n,r){var t={"./index":()=>r.e(0).then(()=>()=>r(2)),"./mimeExtension":()=>r.e(0).then(()=>()=>r(2))},o=function(e,n){return r.R=n,n=r.o(t,e)?t[e]():Promise.resolve().then(()=>{throw Error('Module "'+e+'" does not exist in container.')}),r.R=void 0,n},i=function(e,n){if(r.S){var t="default",o=r.S[t];if(o&&o!==e)throw Error("Container initialization failed as it has already been initialized with a different share scope");return r.S[t]=e,r.I(t,n)}};r.d(n,{get:()=>o,init:()=>i})}},I={};function R(e){var n=I[e];if(void 0!==n)return n.exports;var r=I[e]={exports:{}};return z[e](r,r.exports,R),r.exports}R.m=z,R.c=I,R.d=(e,n,r)=>{var t=(n,r)=>{for(var t in n)R.o(n,t)&&!R.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,[r]:n[t]})};t(n,"get"),t(r,"value")},R.f={},R.e=e=>Promise.all(Object.keys(R.f).reduce((n,r)=>(R.f[r](e,n),n),[])),R.u=e=>""+e+".e889754e73c03c32.js?v=e889754e73c03c32",R.g=(()=>{if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(e){if("object"==typeof window)return window}})(),R.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),U={},R.l=function(e,n,r,t){if(U[e])return void U[e].push(n);if(void 0!==r)for(var o,i,u=document.getElementsByTagName("script"),a=0;a{"u">typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},R.S={},R.initializeSharingData={scopeToSharingDataMapping:{default:[{name:"jupyterlab-plotly",version:"7.0.0-rc0",factory:()=>R.e(0).then(()=>()=>R(2)),eager:0,treeShakingMode:null}]},uniqueName:"jupyterlab-plotly"},q={},B={},R.I=function(e,n){n||(n=[]);var r=B[e];if(r||(r=B[e]={}),!(n.indexOf(r)>=0)){if(n.push(r),q[e])return q[e];R.o(R.S,e)||(R.S[e]={});var t=R.S[e],o=function(e){"u">typeof console&&console.warn&&console.warn(e)},i=R.initializeSharingData.uniqueName,u=function(e,n,r,o){var u=t[e]=t[e]||{},a=u[n];(!a||!a.loaded&&(!o!=!a.eager?o:i>a.from))&&(u[n]={get:r,from:i,eager:!!o})},a=function(r){var t=function(e){o("Initialization of sharing external failed: "+e)};try{var i=R(r);if(!i)return;var u=function(r){return r&&r.init&&r.init(R.S[e],n)};if(i.then)return c.push(i.then(u,t));var a=u(i);if(a&&a.then)return c.push(a.catch(t))}catch(e){t(e)}},c=[],l=R.initializeSharingData.scopeToSharingDataMapping;return(l[e]&&l[e].forEach(function(e){"object"==typeof e?u(e.name,e.version,e.factory,e.eager):a(e)}),c.length)?q[e]=Promise.all(c).then(function(){return q[e]=1}):q[e]=1}},R.g.importScripts&&(J=R.g.location+"");var U,q,B,J,Y=R.g.document;if(!J&&Y&&(Y.currentScript&&"SCRIPT"===Y.currentScript.tagName.toUpperCase()&&(J=Y.currentScript.src),!J)){var V=Y.getElementsByTagName("script");if(V.length)for(var F=V.length-1;F>-1&&(!J||!/^http(s?):/.test(J));)J=V[F--].src}if(!J)throw Error("Automatic publicPath is not supported in this browser");R.p=J=J.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),R.consumesLoadingData={chunkMapping:{},moduleIdToConsumeDataMapping:{},initialConsumes:[]},e=function(e){return e.split(".").map(function(e){return+e==e?+e:e})},n=function(n){var r=function(n){var r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(n),t=r[1]?[0].concat(e(r[1])):[0];r[2]&&(t.length++,t.push.apply(t,e(r[2])));let o=t[t.length-1];for(;t.length&&(void 0===o||/^[*xX]$/.test(o));)t.pop(),o=t[t.length-1];return t},t=function(e){return 1===e.length?[0]:2===e.length?[1].concat(e.slice(1)):3===e.length?[2].concat(e.slice(1)):[e.length].concat(e.slice(1))},o=function(e){return[-e[0]-1].concat(e.slice(1))},i=function(e){let n=/^(\^|~|<=|<|>=|>|=|v|!)/.exec(e),i=n?n[0]:"",u=r(i.length?e.slice(i.length).trim():e.trim());switch(i){case"^":if(u.length>1&&0===u[1]){if(u.length>2&&0===u[2])return[3].concat(u.slice(1));return[2].concat(u.slice(1))}return[1].concat(u.slice(1));case"~":return[2].concat(u.slice(1));case">=":return u;case"=":case"v":case"":return t(u);case"<":return o(u);case">":return[,t(u),0,u,2];case"<=":return[,t(u),o(u),1];case"!":return[,t(u),0];default:throw Error("Unexpected start value")}},u=function(e,n){if(1===e.length)return e[0];let r=[];for(let n of e.slice().reverse())0 in n?r.push(n):r.push.apply(r,n.slice(1));return[,].concat(r,e.slice(1).map(()=>n))};return u(n.split(/\s*\|\|\s*/).map(function(e){let n=e.split(/\s+-\s+/);if(1===n.length){e=e.trim();let n=[],r=/[-0-9A-Za-z]\s+/g;for(var a,c=0;a=r.exec(e);){let r=a.index+1;n.push(i(e.slice(c,r).trim())),c=r}return n.push(i(e.slice(c).trim())),u(n,2)}let l=r(n[0]),f=r(n[1]);return[,t(f),o(f),1,l,2]}),1)},r=function(n){var r=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(n),t=r[1]?e(r[1]):[];return r[2]&&(t.length++,t.push.apply(t,e(r[2]))),r[3]&&(t.push([]),t.push.apply(t,e(r[3]))),t},t=function(e,n){e=r(e),n=r(n);for(var t=0;;){if(t>=e.length)return t=n.length)return"u"==i;var u=n[t],a=(typeof u)[0];if(i==a){if("o"!=i&&"u"!=i&&o!=u)return o=":-1==n?"<":1==n?"^":2==n?"~":n>0?"=":"!=";for(var t=1,i=1;i0?".":"")+(t=2,u)}return r}for(var c=[],i=1;i=n.length||"o"==(f=(typeof(l=n[u]))[0])){if(!c)return!0;if("u"==s)return a>t&&!o;return""==s!=o}if("u"==f){if(!c||"u"!=s)return!1}else if(c)if(s==f)if(a<=t){if(l!=e[a])return!1}else{if(o?l>e[a]:ltypeof console&&console.warn&&console.warn(e)},y=function(e,n,r,t){g(d(e,n,r,t))},m=function(e){return e.loaded=1,e.get()},S=(b=function(e){return function(n,r,t,o){var i=R.I(n);return i&&i.then?i.then(e.bind(e,n,R.S[n],r,t,o)):e(n,R.S[n],r,t,o)}})(function(e,n,r){return u(e,r),m(a(n,r))}),j=b(function(e,n,r,t){return n&&R.o(n,r)?m(a(n,r)):t()}),w=b(function(e,n,r,t){return u(e,r),m(h(n,r,t)||y(n,e,r,t)||a(n,r))}),E=b(function(e,n,r){return u(e,r),f(n,e,r)}),k=b(function(e,n,r,t){return u(e,r),s(n,e,r,t)}),x=b(function(e,n,r,t){return u(e,r),v(n,e,r,t)}),T=b(function(e,n,r,t){return u(e,r),p(n,e,r,t)}),P=b(function(e,n,r,t,o){return n&&R.o(n,r)?m(h(n,r,t)||y(n,e,r,t)||a(n,r)):o()}),A=b(function(e,n,r,t){return n&&R.o(n,r)?f(n,e,r):t()}),C=b(function(e,n,r,t,o){return n&&R.o(n,r)?s(n,e,r,t):o()}),O=b(function(e,n,r,t,o){var i=n&&R.o(n,r)&&h(n,r,t);return i?m(i):o()}),D=b(function(e,n,r,t,o){return n&&R.o(n,r)?p(n,e,r,t):o()}),M=function(e){var r=!1,t=!1,o=!1,i=!1,u=[e.shareScope,e.shareKey];return(e.requiredVersion?(e.strictVersion&&(r=!0),e.singleton&&(t=!0),u.push(n(e.requiredVersion)),o=!0):e.singleton&&(t=!0),e.fallback&&(i=!0,u.push(e.fallback)),r&&t&&o&&i)?function(){return D.apply(null,u)}:r&&o&&i?function(){return O.apply(null,u)}:t&&o&&i?function(){return C.apply(null,u)}:r&&t&&o?function(){return T.apply(null,u)}:t&&i?function(){return A.apply(null,u)}:o&&i?function(){return P.apply(null,u)}:r&&o?function(){return x.apply(null,u)}:t&&o?function(){return k.apply(null,u)}:t?function(){return E.apply(null,u)}:o?function(){return w.apply(null,u)}:i?function(){return j.apply(null,u)}:function(){return S.apply(null,u)}},L={},R.f.consumes=function(e,n){var r=R.consumesLoadingData.moduleIdToConsumeDataMapping,t=R.consumesLoadingData.chunkMapping;R.o(t,e)&&t[e].forEach(function(e){if(R.o(L,e))return n.push(L[e]);var t=function(n){L[e]=0,R.m[e]=function(r){delete R.c[e],r.exports=n()}},o=function(n){delete L[e],R.m[e]=function(r){throw delete R.c[e],n}};try{var i=M(r[e])();i.then?n.push(L[e]=i.then(t).catch(o)):t(i)}catch(e){o(e)}})},N={1:0},R.f.j=function(e,n){var r=R.o(N,e)?N[e]:void 0;if(0!==r)if(r)n.push(r[2]);else{var t=new Promise((n,t)=>r=N[e]=[n,t]);n.push(r[2]=t);var o=R.p+R.u(e),i=Error();R.l(o,function(n){if(R.o(N,e)&&(0!==(r=N[e])&&(N[e]=void 0),r)){var t=n&&("load"===n.type?"missing":n.type),o=n&&n.target&&n.target.src;i.message="Loading chunk "+e+" failed.\n("+t+": "+o+")",i.name="ChunkLoadError",i.type=t,i.request=o,r[1](i)}},"chunk-"+e,e)}},$=(e,n)=>{var r,t,[o,i,u]=n,a=0;if(o.some(e=>0!==N[e])){for(r in i)R.o(i,r)&&(R.m[r]=i[r]);u&&u(R)}for(e&&e(n);a { -"use strict";var Plotly=(()=>{var K$e=Object.create;var p5=Object.defineProperty,J$e=Object.defineProperties,Q$e=Object.getOwnPropertyDescriptor,eKe=Object.getOwnPropertyDescriptors,tKe=Object.getOwnPropertyNames,xM=Object.getOwnPropertySymbols,rKe=Object.getPrototypeOf,fD=Object.prototype.hasOwnProperty,k$=Object.prototype.propertyIsEnumerable;var E$=(e,t,r)=>t in e?p5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,uv=(e,t)=>{for(var r in t||(t={}))fD.call(t,r)&&E$(e,r,t[r]);if(xM)for(var r of xM(t))k$.call(t,r)&&E$(e,r,t[r]);return e},Cg=(e,t)=>J$e(e,eKe(t));var C$=(e,t)=>{var r={};for(var n in e)fD.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&xM)for(var n of xM(e))t.indexOf(n)<0&&k$.call(e,n)&&(r[n]=e[n]);return r};var lo=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var ne=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},E0=(e,t)=>{for(var r in t)p5(e,r,{get:t[r],enumerable:!0})},L$=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of tKe(t))!fD.call(e,a)&&a!==r&&p5(e,a,{get:()=>t[a],enumerable:!(n=Q$e(t,a))||n.enumerable});return e};var yp=(e,t,r)=>(r=e!=null?K$e(rKe(e)):{},L$(t||!e||!e.__esModule?p5(r,"default",{value:e,enumerable:!0}):r,e)),vl=e=>L$(p5({},"__esModule",{value:!0}),e);var g5=ne(F$=>{"use strict";F$.version="4.0.0-rc.0"});var D$=ne((P$,bM)=>{(function(t,r,n){r[t]=r[t]||n(),typeof bM!="undefined"&&bM.exports&&(bM.exports=r[t])})("Promise",typeof window!="undefined"?window:P$,function(){"use strict";var t,r,n,a=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(E){return setImmediate(E)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(E,M,w,k){return Object.defineProperty(E,M,{value:w,writable:!0,configurable:k!==!1})}}catch(g){t=function(M,w,k){return M[w]=k,M}}n=(function(){var E,M,w;function k(y,S){this.fn=y,this.self=S,this.next=void 0}return{add:function(S,T){w=new k(S,T),M?M.next=w:E=w,M=w,w=void 0},drain:function(){var S=E;for(E=M=r=void 0;S;)S.fn.call(S.self),S=S.next}}})();function o(g,E){n.add(g,E),r||(r=i(n.drain))}function s(g){var E,M=typeof g;return g!=null&&(M=="object"||M=="function")&&(E=g.then),typeof E=="function"?E:!1}function l(){for(var g=0;g0&&o(l,M))}catch(w){f.call(new v(M),w)}}}function f(g){var E=this;E.triggered||(E.triggered=!0,E.def&&(E=E.def),E.msg=g,E.state=2,E.chain.length>0&&o(l,E))}function h(g,E,M,w){for(var k=0;k{(function(){var e={version:"3.8.2"},t=[].slice,r=function(V){return t.call(V)},n=self.document;function a(V){return V&&(V.ownerDocument||V.document||V).documentElement}function i(V){return V&&(V.ownerDocument&&V.ownerDocument.defaultView||V.document&&V||V.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(V){r=function(Z){for(var ie=Z.length,_e=new Array(ie);ie--;)_e[ie]=Z[ie];return _e}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(V){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(Z,ie){s.call(this,Z,ie+"")},o.setAttributeNS=function(Z,ie,_e){l.call(this,Z,ie,_e+"")},u.setProperty=function(Z,ie,_e){c.call(this,Z,ie+"",_e)}}e.ascending=f;function f(V,Z){return VZ?1:V>=Z?0:NaN}e.descending=function(V,Z){return ZV?1:Z>=V?0:NaN},e.min=function(V,Z){var ie=-1,_e=V.length,Me,Le;if(arguments.length===1){for(;++ie<_e;)if((Le=V[ie])!=null&&Le>=Le){Me=Le;break}for(;++ie<_e;)(Le=V[ie])!=null&&Me>Le&&(Me=Le)}else{for(;++ie<_e;)if((Le=Z.call(V,V[ie],ie))!=null&&Le>=Le){Me=Le;break}for(;++ie<_e;)(Le=Z.call(V,V[ie],ie))!=null&&Me>Le&&(Me=Le)}return Me},e.max=function(V,Z){var ie=-1,_e=V.length,Me,Le;if(arguments.length===1){for(;++ie<_e;)if((Le=V[ie])!=null&&Le>=Le){Me=Le;break}for(;++ie<_e;)(Le=V[ie])!=null&&Le>Me&&(Me=Le)}else{for(;++ie<_e;)if((Le=Z.call(V,V[ie],ie))!=null&&Le>=Le){Me=Le;break}for(;++ie<_e;)(Le=Z.call(V,V[ie],ie))!=null&&Le>Me&&(Me=Le)}return Me},e.extent=function(V,Z){var ie=-1,_e=V.length,Me,Le,at;if(arguments.length===1){for(;++ie<_e;)if((Le=V[ie])!=null&&Le>=Le){Me=at=Le;break}for(;++ie<_e;)(Le=V[ie])!=null&&(Me>Le&&(Me=Le),at=Le){Me=at=Le;break}for(;++ie<_e;)(Le=Z.call(V,V[ie],ie))!=null&&(Me>Le&&(Me=Le),at1)return at/(xt-1)},e.deviation=function(){var V=e.variance.apply(this,arguments);return V&&Math.sqrt(V)};function d(V){return{left:function(Z,ie,_e,Me){for(arguments.length<3&&(_e=0),arguments.length<4&&(Me=Z.length);_e>>1;V(Z[Le],ie)<0?_e=Le+1:Me=Le}return _e},right:function(Z,ie,_e,Me){for(arguments.length<3&&(_e=0),arguments.length<4&&(Me=Z.length);_e>>1;V(Z[Le],ie)>0?Me=Le:_e=Le+1}return _e}}}var m=d(f);e.bisectLeft=m.left,e.bisect=e.bisectRight=m.right,e.bisector=function(V){return d(V.length===1?function(Z,ie){return f(V(Z),ie)}:V)},e.shuffle=function(V,Z,ie){(_e=arguments.length)<3&&(ie=V.length,_e<2&&(Z=0));for(var _e=ie-Z,Me,Le;_e;)Le=Math.random()*_e--|0,Me=V[_e+Z],V[_e+Z]=V[Le+Z],V[Le+Z]=Me;return V},e.permute=function(V,Z){for(var ie=Z.length,_e=new Array(ie);ie--;)_e[ie]=V[Z[ie]];return _e},e.pairs=function(V){for(var Z=0,ie=V.length-1,_e,Me=V[0],Le=new Array(ie<0?0:ie);Z=0;)for(at=V[Z],ie=at.length;--ie>=0;)Le[--Me]=at[ie];return Le};var g=Math.abs;e.range=function(V,Z,ie){if(arguments.length<3&&(ie=1,arguments.length<2&&(Z=V,V=0)),(Z-V)/ie===1/0)throw new Error("infinite range");var _e=[],Me=E(g(ie)),Le=-1,at;if(V*=Me,Z*=Me,ie*=Me,ie<0)for(;(at=V+ie*++Le)>Z;)_e.push(at/Me);else for(;(at=V+ie*++Le)=Z.length)return Me?Me.call(V,xt):_e?xt.sort(_e):xt;for(var It=-1,ar=xt.length,rr=Z[Dt++],Dr,Hr,hr,Tr=new w,Lr;++It=Z.length)return je;var Dt=[],It=ie[xt++];return je.forEach(function(ar,rr){Dt.push({key:ar,values:at(rr,xt)})}),It?Dt.sort(function(ar,rr){return It(ar.key,rr.key)}):Dt}return V.map=function(je,xt){return Le(xt,je,0)},V.entries=function(je){return at(Le(e.map,je,0),0)},V.key=function(je){return Z.push(je),V},V.sortKeys=function(je){return ie[Z.length-1]=je,V},V.sortValues=function(je){return _e=je,V},V.rollup=function(je){return Me=je,V},V},e.set=function(V){var Z=new z;if(V)for(var ie=0,_e=V.length;ie<_e;++ie)Z.add(V[ie]);return Z};function z(){this._=Object.create(null)}M(z,{has:p,add:function(V){return this._[S(V+="")]=!0,V},remove:C,values:A,size:P,empty:D,forEach:function(V){for(var Z in this._)V.call(this,T(Z))}}),e.behavior={};function q(V){return V}e.rebind=function(V,Z){for(var ie=1,_e=arguments.length,Me;++ie<_e;)V[Me=arguments[ie]]=U(V,Z,Z[Me]);return V};function U(V,Z,ie){return function(){var _e=ie.apply(Z,arguments);return _e===Z?V:_e}}function O(V,Z){if(Z in V)return Z;Z=Z.charAt(0).toUpperCase()+Z.slice(1);for(var ie=0,_e=R.length;ie<_e;++ie){var Me=R[ie]+Z;if(Me in V)return Me}}var R=["webkit","ms","moz","Moz","o","O"];function B(){}e.dispatch=function(){for(var V=new Y,Z=-1,ie=arguments.length;++Z=0&&(_e=V.slice(ie+1),V=V.slice(0,ie)),V)return arguments.length<2?this[V].on(_e):this[V].on(_e,Z);if(arguments.length===2){if(Z==null)for(V in this)this.hasOwnProperty(V)&&this[V].on(_e,null);return this}};function X(V){var Z=[],ie=new w;function _e(){for(var Me=Z,Le=-1,at=Me.length,je;++Le=0&&(ie=V.slice(0,Z))!=="xmlns"&&(V=V.slice(Z+1)),ze.hasOwnProperty(ie)?{space:ze[ie],local:V}:V}},he.attr=function(V,Z){if(arguments.length<2){if(typeof V=="string"){var ie=this.node();return V=e.ns.qualify(V),V.local?ie.getAttributeNS(V.space,V.local):ie.getAttribute(V)}for(Z in V)this.each(Xe(Z,V[Z]));return this}return this.each(Xe(V,Z))};function Xe(V,Z){V=e.ns.qualify(V);function ie(){this.removeAttribute(V)}function _e(){this.removeAttributeNS(V.space,V.local)}function Me(){this.setAttribute(V,Z)}function Le(){this.setAttributeNS(V.space,V.local,Z)}function at(){var xt=Z.apply(this,arguments);xt==null?this.removeAttribute(V):this.setAttribute(V,xt)}function je(){var xt=Z.apply(this,arguments);xt==null?this.removeAttributeNS(V.space,V.local):this.setAttributeNS(V.space,V.local,xt)}return Z==null?V.local?_e:ie:typeof Z=="function"?V.local?je:at:V.local?Le:Me}function vt(V){return V.trim().replace(/\s+/g," ")}he.classed=function(V,Z){if(arguments.length<2){if(typeof V=="string"){var ie=this.node(),_e=(V=Oe(V)).length,Me=-1;if(Z=ie.classList){for(;++Me<_e;)if(!Z.contains(V[Me]))return!1}else for(Z=ie.getAttribute("class");++Me<_e;)if(!st(V[Me]).test(Z))return!1;return!0}for(Z in V)this.each(qe(Z,V[Z]));return this}return this.each(qe(V,Z))};function st(V){return new RegExp("(?:^|\\s+)"+e.requote(V)+"(?:\\s+|$)","g")}function Oe(V){return(V+"").trim().split(/^|\s+/)}function qe(V,Z){V=Oe(V).map(mt);var ie=V.length;function _e(){for(var Le=-1;++Le=0;)(Le=ie[_e])&&(Me&&Me!==Le.nextSibling&&Me.parentNode.insertBefore(Le,Me),Me=Le);return this},he.sort=function(V){V=Ge.apply(this,arguments);for(var Z=-1,ie=this.length;++Z=Z&&(Z=Me+1);!(xt=at[Z])&&++Z0&&(V=V.slice(0,Me));var at=pt.get(V);at&&(V=at,Le=qt);function je(){var It=this[_e];It&&(this.removeEventListener(V,It,It.$),delete this[_e])}function xt(){var It=Le(Z,r(arguments));je.call(this),this.addEventListener(V,this[_e]=It,It.$=ie),It._=Z}function Dt(){var It=new RegExp("^__on([^.]+)"+e.requote(V)+"$"),ar;for(var rr in this)if(ar=rr.match(It)){var Dr=this[rr];this.removeEventListener(ar[1],Dr,Dr.$),delete this[rr]}}return Me?Z?xt:je:Z?B:Dt}var pt=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&pt.forEach(function(V){"on"+V in n&&pt.remove(V)});function kt(V,Z){return function(ie){var _e=e.event;e.event=ie,Z[0]=this.__data__;try{V.apply(this,Z)}finally{e.event=_e}}}function qt(V,Z){var ie=kt(V,Z);return function(_e){var Me=this,Le=_e.relatedTarget;(!Le||Le!==Me&&!(Le.compareDocumentPosition(Me)&8))&&ie.call(Me,_e)}}var Wt,_r=0;function tr(V){var Z=".dragsuppress-"+ ++_r,ie="click"+Z,_e=e.select(i(V)).on("touchmove"+Z,te).on("dragstart"+Z,te).on("selectstart"+Z,te);if(Wt==null&&(Wt="onselectstart"in V?!1:O(V.style,"userSelect")),Wt){var Me=a(V).style,Le=Me[Wt];Me[Wt]="none"}return function(at){if(_e.on(Z,null),Wt&&(Me[Wt]=Le),at){var je=function(){_e.on(ie,null)};_e.on(ie,function(){te(),je()},!0),setTimeout(je,0)}}}e.mouse=function(V){return Ye(V,se())};var lr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ye(V,Z){Z.changedTouches&&(Z=Z.changedTouches[0]);var ie=V.ownerSVGElement||V;if(ie.createSVGPoint){var _e=ie.createSVGPoint();if(lr<0){var Me=i(V);if(Me.scrollX||Me.scrollY){ie=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Le=ie[0][0].getScreenCTM();lr=!(Le.f||Le.e),ie.remove()}}return lr?(_e.x=Z.pageX,_e.y=Z.pageY):(_e.x=Z.clientX,_e.y=Z.clientY),_e=_e.matrixTransform(V.getScreenCTM().inverse()),[_e.x,_e.y]}var at=V.getBoundingClientRect();return[Z.clientX-at.left-V.clientLeft,Z.clientY-at.top-V.clientTop]}e.touch=function(V,Z,ie){if(arguments.length<3&&(ie=Z,Z=se().changedTouches),Z){for(var _e=0,Me=Z.length,Le;_e0?1:V<0?-1:0}function $t(V,Z,ie){return(Z[0]-V[0])*(ie[1]-V[1])-(Z[1]-V[1])*(ie[0]-V[0])}function gr(V){return V>1?0:V<-1?Re:Math.acos(V)}function Br(V){return V>1?_t:V<-1?-_t:Math.asin(V)}function Nr(V){return((V=Math.exp(V))-1/V)/2}function Er(V){return((V=Math.exp(V))+1/V)/2}function zr(V){return((V=Math.exp(2*V))-1)/(V+1)}function vn(V){return(V=Math.sin(V/2))*V}var Nn=Math.SQRT2,Xn=2,Kn=4;e.interpolateZoom=function(V,Z){var ie=V[0],_e=V[1],Me=V[2],Le=Z[0],at=Z[1],je=Z[2],xt=Le-ie,Dt=at-_e,It=xt*xt+Dt*Dt,ar,rr;if(It0&&(ma=ma.transition().duration(at)),ma.call(jr.event)}function Ba(){Tr&&Tr.domain(hr.range().map(function(ma){return(ma-V.x)/V.k}).map(hr.invert)),Vr&&Vr.domain(Lr.range().map(function(ma){return(ma-V.y)/V.k}).map(Lr.invert))}function za(ma){je++||ma({type:"zoomstart"})}function bi(ma){Ba(),ma({type:"zoom",scale:V.k,translate:[V.x,V.y]})}function Da(ma){--je||(ma({type:"zoomend"}),ie=null)}function si(){var ma=this,$a=Hr.of(ma,arguments),Ri=0,To=e.select(i(ma)).on(Dt,ou).on(It,wu),Qo=br(e.mouse(ma)),Gs=tr(ma);va.call(ma),za($a);function ou(){Ri=1,ra(e.mouse(ma),Qo),bi($a)}function wu(){To.on(Dt,null).on(It,null),Gs(Ri),Da($a)}}function Fo(){var ma=this,$a=Hr.of(ma,arguments),Ri={},To=0,Qo,Gs=".zoom-"+e.event.changedTouches[0].identifier,ou="touchmove"+Gs,wu="touchend"+Gs,Dc=[],pe=e.select(ma),ot=tr(ma);Kt(),za($a),pe.on(xt,null).on(rr,Kt);function ht(){var ur=e.touches(ma);return Qo=V.k,ur.forEach(function(Rr){Rr.identifier in Ri&&(Ri[Rr.identifier]=br(Rr))}),ur}function Kt(){var ur=e.event.target;e.select(ur).on(ou,cr).on(wu,dr),Dc.push(ur);for(var Rr=e.event.changedTouches,Xr=0,$r=Rr.length;Xr<$r;++Xr)Ri[Rr[Xr].identifier]=null;var Kr=ht(),Hn=Date.now();if(Kr.length===1){if(Hn-Dr<500){var Cn=Kr[0];xa(ma,Cn,Ri[Cn.identifier],Math.floor(Math.log(V.k)/Math.LN2)+1),te()}Dr=Hn}else if(Kr.length>1){var Cn=Kr[0],fn=Kr[1],Sr=Cn[0]-fn[0],Ut=Cn[1]-fn[1];To=Sr*Sr+Ut*Ut}}function cr(){var ur=e.touches(ma),Rr,Xr,$r,Kr;va.call(ma);for(var Hn=0,Cn=ur.length;Hn1?1:Z,ie=ie<0?0:ie>1?1:ie,Me=ie<=.5?ie*(1+Z):ie+Z-ie*Z,_e=2*ie-Me;function Le(je){return je>360?je-=360:je<0&&(je+=360),je<60?_e+(Me-_e)*je/60:je<180?Me:je<240?_e+(Me-_e)*(240-je)/60:_e}function at(je){return Math.round(Le(je)*255)}return new yo(at(V+120),at(V),at(V-120))}e.hcl=pa;function pa(V,Z,ie){return this instanceof pa?(this.h=+V,this.c=+Z,void(this.l=+ie)):arguments.length<2?V instanceof pa?new pa(V.h,V.c,V.l):V instanceof Ti?to(V.l,V.a,V.b):to((V=ia((V=e.rgb(V)).r,V.g,V.b)).l,V.a,V.b):new pa(V,Z,ie)}var no=pa.prototype=new da;no.brighter=function(V){return new pa(this.h,this.c,Math.min(100,this.l+fi*(arguments.length?V:1)))},no.darker=function(V){return new pa(this.h,this.c,Math.max(0,this.l-fi*(arguments.length?V:1)))},no.rgb=function(){return Gi(this.h,this.c,this.l).rgb()};function Gi(V,Z,ie){return isNaN(V)&&(V=0),isNaN(Z)&&(Z=0),new Ti(ie,Math.cos(V*=St)*Z,Math.sin(V)*Z)}e.lab=Ti;function Ti(V,Z,ie){return this instanceof Ti?(this.l=+V,this.a=+Z,void(this.b=+ie)):arguments.length<2?V instanceof Ti?new Ti(V.l,V.a,V.b):V instanceof pa?Gi(V.h,V.c,V.l):ia((V=yo(V)).r,V.g,V.b):new Ti(V,Z,ie)}var fi=18,_o=.95047,Oi=1,ni=1.08883,ao=Ti.prototype=new da;ao.brighter=function(V){return new Ti(Math.min(100,this.l+fi*(arguments.length?V:1)),this.a,this.b)},ao.darker=function(V){return new Ti(Math.max(0,this.l-fi*(arguments.length?V:1)),this.a,this.b)},ao.rgb=function(){return Hi(this.l,this.a,this.b)};function Hi(V,Z,ie){var _e=(V+16)/116,Me=_e+Z/500,Le=_e-ie/200;return Me=Xo(Me)*_o,_e=Xo(_e)*Oi,Le=Xo(Le)*ni,new yo(Fi(3.2404542*Me-1.5371385*_e-.4985314*Le),Fi(-.969266*Me+1.8760108*_e+.041556*Le),Fi(.0556434*Me-.2040259*_e+1.0572252*Le))}function to(V,Z,ie){return V>0?new pa(Math.atan2(ie,Z)*Vt,Math.sqrt(Z*Z+ie*ie),V):new pa(NaN,NaN,V)}function Xo(V){return V>.206893034?V*V*V:(V-4/29)/7.787037}function Zo(V){return V>.008856?Math.pow(V,1/3):7.787037*V+4/29}function Fi(V){return Math.round(255*(V<=.00304?12.92*V:1.055*Math.pow(V,1/2.4)-.055))}e.rgb=yo;function yo(V,Z,ie){return this instanceof yo?(this.r=~~V,this.g=~~Z,void(this.b=~~ie)):arguments.length<2?V instanceof yo?new yo(V.r,V.g,V.b):xi(""+V,yo,ii):new yo(V,Z,ie)}function oo(V){return new yo(V>>16,V>>8&255,V&255)}function rl(V){return oo(V)+""}var Ni=yo.prototype=new da;Ni.brighter=function(V){V=Math.pow(.7,arguments.length?V:1);var Z=this.r,ie=this.g,_e=this.b,Me=30;return!Z&&!ie&&!_e?new yo(Me,Me,Me):(Z&&Z>4,_e=_e>>4|_e,Me=xt&240,Me=Me>>4|Me,Le=xt&15,Le=Le<<4|Le):V.length===7&&(_e=(xt&16711680)>>16,Me=(xt&65280)>>8,Le=xt&255)),Z(_e,Me,Le))}function Pi(V,Z,ie){var _e=Math.min(V/=255,Z/=255,ie/=255),Me=Math.max(V,Z,ie),Le=Me-_e,at,je,xt=(Me+_e)/2;return Le?(je=xt<.5?Le/(Me+_e):Le/(2-Me-_e),V==Me?at=(Z-ie)/Le+(Z0&&xt<1?0:at),new ua(at,je,xt)}function ia(V,Z,ie){V=rt(V),Z=rt(Z),ie=rt(ie);var _e=Zo((.4124564*V+.3575761*Z+.1804375*ie)/_o),Me=Zo((.2126729*V+.7151522*Z+.072175*ie)/Oi),Le=Zo((.0193339*V+.119192*Z+.9503041*ie)/ni);return Ti(116*Me-16,500*(_e-Me),200*(Me-Le))}function rt(V){return(V/=255)<=.04045?V/12.92:Math.pow((V+.055)/1.055,2.4)}function Xt(V){var Z=parseFloat(V);return V.charAt(V.length-1)==="%"?Math.round(Z*2.55):Z}var xr=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});xr.forEach(function(V,Z){xr.set(V,oo(Z))});function Fr(V){return typeof V=="function"?V:function(){return V}}e.functor=Fr,e.xhr=xn(q);function xn(V){return function(Z,ie,_e){return arguments.length===2&&typeof ie=="function"&&(_e=ie,ie=null),Mn(Z,ie,V,_e)}}function Mn(V,Z,ie,_e){var Me={},Le=e.dispatch("beforesend","progress","load","error"),at={},je=new XMLHttpRequest,xt=null;self.XDomainRequest&&!("withCredentials"in je)&&/^(http(s)?:)?\/\//.test(V)&&(je=new XDomainRequest),"onload"in je?je.onload=je.onerror=Dt:je.onreadystatechange=function(){je.readyState>3&&Dt()};function Dt(){var It=je.status,ar;if(!It&&on(je)||It>=200&&It<300||It===304){try{ar=ie.call(Me,je)}catch(rr){Le.error.call(Me,rr);return}Le.load.call(Me,ar)}else Le.error.call(Me,je)}return je.onprogress=function(It){var ar=e.event;e.event=It;try{Le.progress.call(Me,je)}finally{e.event=ar}},Me.header=function(It,ar){return It=(It+"").toLowerCase(),arguments.length<2?at[It]:(ar==null?delete at[It]:at[It]=ar+"",Me)},Me.mimeType=function(It){return arguments.length?(Z=It==null?null:It+"",Me):Z},Me.responseType=function(It){return arguments.length?(xt=It,Me):xt},Me.response=function(It){return ie=It,Me},["get","post"].forEach(function(It){Me[It]=function(){return Me.send.apply(Me,[It].concat(r(arguments)))}}),Me.send=function(It,ar,rr){if(arguments.length===2&&typeof ar=="function"&&(rr=ar,ar=null),je.open(It,V,!0),Z!=null&&!("accept"in at)&&(at.accept=Z+",*/*"),je.setRequestHeader)for(var Dr in at)je.setRequestHeader(Dr,at[Dr]);return Z!=null&&je.overrideMimeType&&je.overrideMimeType(Z),xt!=null&&(je.responseType=xt),rr!=null&&Me.on("error",rr).on("load",function(Hr){rr(null,Hr)}),Le.beforesend.call(Me,je),je.send(ar==null?null:ar),Me},Me.abort=function(){return je.abort(),Me},e.rebind(Me,Le,"on"),_e==null?Me:Me.get(Rn(_e))}function Rn(V){return V.length===1?function(Z,ie){V(Z==null?ie:null)}:V}function on(V){var Z=V.responseType;return Z&&Z!=="text"?V.response:V.responseText}e.dsv=function(V,Z){var ie=new RegExp('["'+V+` -]`),_e=V.charCodeAt(0);function Me(Dt,It,ar){arguments.length<3&&(ar=It,It=null);var rr=Mn(Dt,Z,It==null?Le:at(It),ar);return rr.row=function(Dr){return arguments.length?rr.response((It=Dr)==null?Le:at(Dr)):It},rr}function Le(Dt){return Me.parse(Dt.responseText)}function at(Dt){return function(It){return Me.parse(It.responseText,Dt)}}Me.parse=function(Dt,It){var ar;return Me.parseRows(Dt,function(rr,Dr){if(ar)return ar(rr,Dr-1);var Hr=function(hr){for(var Tr={},Lr=rr.length,Vr=0;Vr=Hr)return rr;if(Vr)return Vr=!1,ar;var Ln=hr;if(Dt.charCodeAt(Ln)===34){for(var On=Ln;On++24?(isFinite(Z)&&(clearTimeout(Ia),Ia=setTimeout(ui,Z)),ba=0):(ba=1,hi(ui))}e.timer.flush=function(){Mi(),_i()};function Mi(){for(var V=Date.now(),Z=En;Z;)V>=Z.t&&Z.c(V-Z.t)&&(Z.c=null),Z=Z.n;return V}function _i(){for(var V,Z=En,ie=1/0;Z;)Z.c?(Z.t=0;--je)hr.push(Me[Dt[ar[je]][2]]);for(je=+Dr;je1&&$t(V[ie[_e-2]],V[ie[_e-1]],V[Me])<=0;)--_e;ie[_e++]=Me}return ie.slice(0,_e)}function Is(V,Z){return V[0]-Z[0]||V[1]-Z[1]}e.geom.polygon=function(V){return j(V,Es),V};var Es=e.geom.polygon.prototype=[];Es.area=function(){for(var V=-1,Z=this.length,ie,_e=this[Z-1],Me=0;++VFe)je=je.L;else if(at=Z-co(je,ie),at>Fe){if(!je.R){_e=je;break}je=je.R}else{Le>-Fe?(_e=je.P,Me=je):at>-Fe?(_e=je,Me=je.N):_e=Me=je;break}var xt=Cs(V);if(Co.insert(_e,xt),!(!_e&&!Me)){if(_e===Me){Vu(_e),Me=Cs(_e.site),Co.insert(xt,Me),xt.edge=Me.edge=Cf(_e.site,xt.site),Os(_e),Os(Me);return}if(!Me){xt.edge=Cf(_e.site,xt.site);return}Vu(_e),Vu(Me);var Dt=_e.site,It=Dt.x,ar=Dt.y,rr=V.x-It,Dr=V.y-ar,Hr=Me.site,hr=Hr.x-It,Tr=Hr.y-ar,Lr=2*(rr*Tr-Dr*hr),Vr=rr*rr+Dr*Dr,jr=hr*hr+Tr*Tr,br={x:(Tr*Vr-Dr*jr)/Lr+It,y:(rr*jr-hr*Vr)/Lr+ar};ol(Me.edge,Dt,Hr,br),xt.edge=Cf(Dt,V,null,br),Me.edge=Cf(V,Hr,null,br),Os(_e),Os(Me)}}function al(V,Z){var ie=V.site,_e=ie.x,Me=ie.y,Le=Me-Z;if(!Le)return _e;var at=V.P;if(!at)return-1/0;ie=at.site;var je=ie.x,xt=ie.y,Dt=xt-Z;if(!Dt)return je;var It=je-_e,ar=1/Le-1/Dt,rr=It/Dt;return ar?(-rr+Math.sqrt(rr*rr-2*ar*(It*It/(-2*Dt)-xt+Dt/2+Me-Le/2)))/ar+_e:(_e+je)/2}function co(V,Z){var ie=V.N;if(ie)return al(ie,Z);var _e=V.site;return _e.y===Z?_e.x:1/0}function Ul(V){this.site=V,this.edges=[]}Ul.prototype.prepare=function(){for(var V=this.edges,Z=V.length,ie;Z--;)ie=V[Z].edge,(!ie.b||!ie.a)&&V.splice(Z,1);return V.sort(il),V.length};function Ls(V){for(var Z=V[0][0],ie=V[1][0],_e=V[0][1],Me=V[1][1],Le,at,je,xt,Dt=xs,It=Dt.length,ar,rr,Dr,Hr,hr,Tr;It--;)if(ar=Dt[It],!(!ar||!ar.prepare()))for(Dr=ar.edges,Hr=Dr.length,rr=0;rrFe||g(xt-at)>Fe)&&(Dr.splice(rr,0,new af(Rd(ar.site,Tr,g(je-Z)Fe?{x:Z,y:g(Le-Z)Fe?{x:g(at-Me)Fe?{x:ie,y:g(Le-ie)Fe?{x:g(at-_e)=-Ae)){var rr=xt*xt+Dt*Dt,Dr=It*It+Tr*Tr,Hr=(Tr*rr-Dt*Dr)/ar,hr=(xt*Dr-It*rr)/ar,Tr=hr+je,Lr=Fl.pop()||new _c;Lr.arc=V,Lr.site=Me,Lr.x=Hr+at,Lr.y=Tr+Math.sqrt(Hr*Hr+hr*hr),Lr.cy=Tr,V.circle=Lr;for(var Vr=null,jr=Bs._;jr;)if(Lr.y0)){if(hr/=Dr,Dr<0){if(hr0){if(hr>rr)return;hr>ar&&(ar=hr)}if(hr=ie-je,!(!Dr&&hr<0)){if(hr/=Dr,Dr<0){if(hr>rr)return;hr>ar&&(ar=hr)}else if(Dr>0){if(hr0)){if(hr/=Hr,Hr<0){if(hr0){if(hr>rr)return;hr>ar&&(ar=hr)}if(hr=_e-xt,!(!Hr&&hr<0)){if(hr/=Hr,Hr<0){if(hr>rr)return;hr>ar&&(ar=hr)}else if(Hr>0){if(hr0&&(Me.a={x:je+ar*Dr,y:xt+ar*Hr}),rr<1&&(Me.b={x:je+rr*Dr,y:xt+rr*Hr}),Me}}}}}}function Jl(V){for(var Z=us,ie=kf(V[0][0],V[0][1],V[1][0],V[1][1]),_e=Z.length,Me;_e--;)Me=Z[_e],(!th(Me,V)||!ie(Me)||g(Me.a.x-Me.b.x)=Le)return;if(It>rr){if(!_e)_e={x:Hr,y:at};else if(_e.y>=je)return;ie={x:Hr,y:je}}else{if(!_e)_e={x:Hr,y:je};else if(_e.y1)if(It>rr){if(!_e)_e={x:(at-Lr)/Tr,y:at};else if(_e.y>=je)return;ie={x:(je-Lr)/Tr,y:je}}else{if(!_e)_e={x:(je-Lr)/Tr,y:je};else if(_e.y=Le)return;ie={x:Le,y:Tr*Le+Lr}}else{if(!_e)_e={x:Le,y:Tr*Le+Lr};else if(_e.x=It&&Lr.x<=rr&&Lr.y>=ar&&Lr.y<=Dr?[[It,Dr],[rr,Dr],[rr,ar],[It,ar]]:[];Vr.point=xt[hr]}),Dt}function je(xt){return xt.map(function(Dt,It){return{x:Math.round(_e(Dt,It)/Fe)*Fe,y:Math.round(Me(Dt,It)/Fe)*Fe,i:It}})}return at.links=function(xt){return tc(je(xt)).edges.filter(function(Dt){return Dt.l&&Dt.r}).map(function(Dt){return{source:xt[Dt.l.i],target:xt[Dt.r.i]}})},at.triangles=function(xt){var Dt=[];return tc(je(xt)).cells.forEach(function(It,ar){for(var rr=It.site,Dr=It.edges.sort(il),Hr=-1,hr=Dr.length,Tr,Lr,Vr=Dr[hr-1].edge,jr=Vr.l===rr?Vr.r:Vr.l;++Hrjr&&(jr=It.x),It.y>br&&(br=It.y),Dr.push(It.x),Hr.push(It.y);else for(hr=0;hrjr&&(jr=Ln),On>br&&(br=On),Dr.push(Ln),Hr.push(On)}var ra=jr-Lr,xa=br-Vr;ra>xa?br=Vr+ra:jr=Lr+xa;function Ba(Da,si,Fo,Ps,Yo,ma,$a,Ri){if(!(isNaN(Fo)||isNaN(Ps)))if(Da.leaf){var To=Da.x,Qo=Da.y;if(To!=null)if(g(To-Fo)+g(Qo-Ps)<.01)za(Da,si,Fo,Ps,Yo,ma,$a,Ri);else{var Gs=Da.point;Da.x=Da.y=Da.point=null,za(Da,Gs,To,Qo,Yo,ma,$a,Ri),za(Da,si,Fo,Ps,Yo,ma,$a,Ri)}else Da.x=Fo,Da.y=Ps,Da.point=si}else za(Da,si,Fo,Ps,Yo,ma,$a,Ri)}function za(Da,si,Fo,Ps,Yo,ma,$a,Ri){var To=(Yo+$a)*.5,Qo=(ma+Ri)*.5,Gs=Fo>=To,ou=Ps>=Qo,wu=ou<<1|Gs;Da.leaf=!1,Da=Da.nodes[wu]||(Da.nodes[wu]=Fh()),Gs?Yo=To:$a=To,ou?ma=Qo:Ri=Qo,Ba(Da,si,Fo,Ps,Yo,ma,$a,Ri)}var bi=Fh();if(bi.add=function(Da){Ba(bi,Da,+ar(Da,++hr),+rr(Da,hr),Lr,Vr,jr,br)},bi.visit=function(Da){pu(Da,bi,Lr,Vr,jr,br)},bi.find=function(Da){return gu(bi,Da[0],Da[1],Lr,Vr,jr,br)},hr=-1,Z==null){for(;++hrLe||rr>at||Dr<_e||Hr=Ln,xa=ie>=On,Ba=xa<<1|ra,za=Ba+4;Baie&&(Le=Z.slice(ie,Le),je[at]?je[at]+=Le:je[++at]=Le),(_e=_e[0])===(Me=Me[0])?je[at]?je[at]+=Me:je[++at]=Me:(je[++at]=null,xt.push({i:at,x:as(_e,Me)})),ie=ku.lastIndex;return ie=0&&!(_e=e.interpolators[ie](V,Z)););return _e}e.interpolators=[function(V,Z){var ie=typeof Z;return(ie==="string"?xr.has(Z.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Z)?mu:fo:Z instanceof da?mu:Array.isArray(Z)?sf:ie==="object"&&isNaN(Z)?Ql:as)(V,Z)}],e.interpolateArray=sf;function sf(V,Z){var ie=[],_e=[],Me=V.length,Le=Z.length,at=Math.min(V.length,Z.length),je;for(je=0;je=0?V.slice(0,Z):V,_e=Z>=0?V.slice(Z+1):"in";return ie=Xh.get(ie)||is,_e=Wi.get(_e)||q,Zh(_e(ie.apply(null,t.call(arguments,1))))};function Zh(V){return function(Z){return Z<=0?0:Z>=1?1:V(Z)}}function so(V){return function(Z){return 1-V(1-Z)}}function ei(V){return function(Z){return .5*(Z<.5?V(2*Z):2-V(2-2*Z))}}function nc(V){return V*V}function Wc(V){return V*V*V}function _l(V){if(V<=0)return 0;if(V>=1)return 1;var Z=V*V,ie=Z*V;return 4*(V<.5?ie:3*(V-Z)+ie-.75)}function nh(V){return function(Z){return Math.pow(Z,V)}}function Cu(V){return 1-Math.cos(V*_t)}function Ac(V){return Math.pow(2,10*(V-1))}function Us(V){return 1-Math.sqrt(1-V*V)}function ah(V,Z){var ie;return arguments.length<2&&(Z=.45),arguments.length?ie=Z/Ze*Math.asin(1/V):(V=1,ie=Z/4),function(_e){return 1+V*Math.pow(2,-10*_e)*Math.sin((_e-ie)*Ze/Z)}}function Df(V){return V||(V=1.70158),function(Z){return Z*Z*((V+1)*Z-V)}}function Mc(V){return V<1/2.75?7.5625*V*V:V<2/2.75?7.5625*(V-=1.5/2.75)*V+.75:V<2.5/2.75?7.5625*(V-=2.25/2.75)*V+.9375:7.5625*(V-=2.625/2.75)*V+.984375}e.interpolateHcl=Sc;function Sc(V,Z){V=e.hcl(V),Z=e.hcl(Z);var ie=V.h,_e=V.c,Me=V.l,Le=Z.h-ie,at=Z.c-_e,je=Z.l-Me;return isNaN(at)&&(at=0,_e=isNaN(_e)?Z.c:_e),isNaN(Le)?(Le=0,ie=isNaN(ie)?Z.h:ie):Le>180?Le-=360:Le<-180&&(Le+=360),function(xt){return Gi(ie+Le*xt,_e+at*xt,Me+je*xt)+""}}e.interpolateHsl=Rf;function Rf(V,Z){V=e.hsl(V),Z=e.hsl(Z);var ie=V.h,_e=V.s,Me=V.l,Le=Z.h-ie,at=Z.s-_e,je=Z.l-Me;return isNaN(at)&&(at=0,_e=isNaN(_e)?Z.s:_e),isNaN(Le)?(Le=0,ie=isNaN(ie)?Z.h:ie):Le>180?Le-=360:Le<-180&&(Le+=360),function(xt){return ii(ie+Le*xt,_e+at*xt,Me+je*xt)+""}}e.interpolateLab=If;function If(V,Z){V=e.lab(V),Z=e.lab(Z);var ie=V.l,_e=V.a,Me=V.b,Le=Z.l-ie,at=Z.a-_e,je=Z.b-Me;return function(xt){return Hi(ie+Le*xt,_e+at*xt,Me+je*xt)+""}}e.interpolateRound=eu;function eu(V,Z){return Z-=V,function(ie){return Math.round(V+Z*ie)}}e.transform=function(V){var Z=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(ie){if(ie!=null){Z.setAttribute("transform",ie);var _e=Z.transform.baseVal.consolidate()}return new lf(_e?_e.matrix:kc)})(V)};function lf(V){var Z=[V.a,V.b],ie=[V.c,V.d],_e=Ec(Z),Me=tu(Z,ie),Le=Ec(bs(ie,Z,-Me))||0;Z[0]*ie[1]180?Z+=360:Z-V>180&&(V+=360),_e.push({i:ie.push(Gu(ie)+"rotate(",null,")")-2,x:as(V,Z)})):Z&&ie.push(Gu(ie)+"rotate("+Z+")")}function $h(V,Z,ie,_e){V!==Z?_e.push({i:ie.push(Gu(ie)+"skewX(",null,")")-2,x:as(V,Z)}):Z&&ie.push(Gu(ie)+"skewX("+Z+")")}function ih(V,Z,ie,_e){if(V[0]!==Z[0]||V[1]!==Z[1]){var Me=ie.push(Gu(ie)+"scale(",null,",",null,")");_e.push({i:Me-4,x:as(V[0],Z[0])},{i:Me-2,x:as(V[1],Z[1])})}else(Z[0]!==1||Z[1]!==1)&&ie.push(Gu(ie)+"scale("+Z+")")}function ac(V,Z){var ie=[],_e=[];return V=e.transform(V),Z=e.transform(Z),po(V.translate,Z.translate,ie,_e),uf(V.rotate,Z.rotate,ie,_e),$h(V.skew,Z.skew,ie,_e),ih(V.scale,Z.scale,ie,_e),V=Z=null,function(Me){for(var Le=-1,at=_e.length,je;++Le0?Le=br:(ie.c=null,ie.t=NaN,ie=null,Z.end({type:"end",alpha:Le=0})):br>0&&(Z.start({type:"start",alpha:Le=br}),ie=ki(V.tick)),V):Le},V.start=function(){var br,Ln=Dr.length,On=Hr.length,ra=_e[0],xa=_e[1],Ba,za;for(br=0;br=0;)Le.push(It=Dt[xt]),It.parent=je,It.depth=je.depth+1;ie&&(je.value=0),je.children=Dt}else ie&&(je.value=+ie.call(_e,je,je.depth)||0),delete je.children;return Lu(Me,function(ar){var rr,Dr;V&&(rr=ar.children)&&rr.sort(V),ie&&(Dr=ar.parent)&&(Dr.value+=ar.value)}),at}return _e.sort=function(Me){return arguments.length?(V=Me,_e):V},_e.children=function(Me){return arguments.length?(Z=Me,_e):Z},_e.value=function(Me){return arguments.length?(ie=Me,_e):ie},_e.revalue=function(Me){return ie&&(ju(Me,function(Le){Le.children&&(Le.value=0)}),Lu(Me,function(Le){var at;Le.children||(Le.value=+ie.call(_e,Le,Le.depth)||0),(at=Le.parent)&&(at.value+=Le.value)})),Me},_e};function yu(V,Z){return e.rebind(V,Z,"sort","children","value"),V.nodes=V,V.links=Vl,V}function ju(V,Z){for(var ie=[V];(V=ie.pop())!=null;)if(Z(V),(Me=V.children)&&(_e=Me.length))for(var _e,Me;--_e>=0;)ie.push(Me[_e])}function Lu(V,Z){for(var ie=[V],_e=[];(V=ie.pop())!=null;)if(_e.push(V),(at=V.children)&&(Le=at.length))for(var Me=-1,Le,at;++MeMe&&(Me=je),_e.push(je)}for(at=0;at_e&&(ie=Z,_e=Me);return ie}function Of(V){return V.reduce(Lc,0)}function Lc(V,Z){return V+Z[1]}e.layout.histogram=function(){var V=!0,Z=Number,ie=ff,_e=Fc;function Me(Le,rr){for(var je=[],xt=Le.map(Z,this),Dt=ie.call(this,xt,rr),It=_e.call(this,Dt,xt,rr),ar,rr=-1,Dr=xt.length,Hr=It.length-1,hr=V?1:1/Dr,Tr;++rr0)for(rr=-1;++rr=Dt[0]&&Tr<=Dt[1]&&(ar=je[e.bisect(It,Tr,1,Hr)-1],ar.y+=hr,ar.push(Le[rr]));return je}return Me.value=function(Le){return arguments.length?(Z=Le,Me):Z},Me.range=function(Le){return arguments.length?(ie=Fr(Le),Me):ie},Me.bins=function(Le){return arguments.length?(_e=typeof Le=="number"?function(at){return nu(at,Le)}:Fr(Le),Me):_e},Me.frequency=function(Le){return arguments.length?(V=!!Le,Me):V},Me};function Fc(V,Z){return nu(V,Math.ceil(Math.log(Z.length)/Math.LN2+1))}function nu(V,Z){for(var ie=-1,_e=+V[0],Me=(V[1]-_e)/Z,Le=[];++ie<=Z;)Le[ie]=Me*ie+_e;return Le}function ff(V){return[e.min(V),e.max(V)]}e.layout.pack=function(){var V=e.layout.hierarchy().sort(sc),Z=0,ie=[1,1],_e;function Me(Le,at){var je=V.call(this,Le,at),xt=je[0],Dt=ie[0],It=ie[1],ar=_e==null?Math.sqrt:typeof _e=="function"?_e:function(){return _e};if(xt.x=xt.y=0,Lu(xt,function(Dr){Dr.r=+ar(Dr.value)}),Lu(xt,Qh),Z){var rr=Z*(_e?1:Math.max(2*xt.r/Dt,2*xt.r/It))/2;Lu(xt,function(Dr){Dr.r+=rr}),Lu(xt,Qh),Lu(xt,function(Dr){Dr.r-=rr})}return df(xt,Dt/2,It/2,_e?1:1/Math.max(2*xt.r/Dt,2*xt.r/It)),je}return Me.size=function(Le){return arguments.length?(ie=Le,Me):ie},Me.radius=function(Le){return arguments.length?(_e=Le==null||typeof Le=="function"?Le:+Le,Me):_e},Me.padding=function(Le){return arguments.length?(Z=+Le,Me):Z},yu(Me,V)};function sc(V,Z){return V.value-Z.value}function Nf(V,Z){var ie=V._pack_next;V._pack_next=Z,Z._pack_prev=V,Z._pack_next=ie,ie._pack_prev=Z}function Uf(V,Z){V._pack_next=Z,Z._pack_prev=V}function uh(V,Z){var ie=Z.x-V.x,_e=Z.y-V.y,Me=V.r+Z.r;return .999*Me*Me>ie*ie+_e*_e}function Qh(V){if(!(Z=V.children)||!(rr=Z.length))return;var Z,ie=1/0,_e=-1/0,Me=1/0,Le=-1/0,at,je,xt,Dt,It,ar,rr;function Dr(br){ie=Math.min(br.x-br.r,ie),_e=Math.max(br.x+br.r,_e),Me=Math.min(br.y-br.r,Me),Le=Math.max(br.y+br.r,Le)}if(Z.forEach(hf),at=Z[0],at.x=-at.r,at.y=0,Dr(at),rr>1&&(je=Z[1],je.x=je.r,je.y=0,Dr(je),rr>2))for(xt=Z[2],sl(at,je,xt),Dr(xt),Nf(at,xt),at._pack_prev=xt,Nf(xt,je),je=at._pack_next,Dt=3;DtTr.x&&(Tr=Ln),Ln.depth>Lr.depth&&(Lr=Ln)});var Vr=Z(hr,Tr)/2-hr.x,jr=ie[0]/(Tr.x+Z(Tr,hr)/2+Vr),br=ie[1]/(Lr.depth||1);ju(Dr,function(Ln){Ln.x=(Ln.x+Vr)*jr,Ln.y=Ln.depth*br})}return rr}function Le(It){for(var ar={A:null,children:[It]},rr=[ar],Dr;(Dr=rr.pop())!=null;)for(var Hr=Dr.children,hr,Tr=0,Lr=Hr.length;Tr0&&(vf(Je(hr,It,rr),It,Ln),Lr+=Ln,Vr+=Ln),jr+=hr.m,Lr+=Dr.m,br+=Tr.m,Vr+=Hr.m;hr&&!ed(Hr)&&(Hr.t=hr,Hr.m+=jr-Vr),Dr&&!fh(Tr)&&(Tr.t=Dr,Tr.m+=Lr-br,rr=It)}return rr}function Dt(It){It.x*=ie[0],It.y=It.depth*ie[1]}return Me.separation=function(It){return arguments.length?(Z=It,Me):Z},Me.size=function(It){return arguments.length?(_e=(ie=It)==null?Dt:null,Me):_e?null:ie},Me.nodeSize=function(It){return arguments.length?(_e=(ie=It)==null?null:Dt,Me):_e?ie:null},yu(Me,V)};function Fu(V,Z){return V.parent==Z.parent?1:2}function fh(V){var Z=V.children;return Z.length?Z[0]:V.t}function ed(V){var Z=V.children,ie;return(ie=Z.length)?Z[ie-1]:V.t}function vf(V,Z,ie){var _e=ie/(Z.i-V.i);Z.c-=_e,Z.s+=ie,V.c+=_e,Z.z+=ie,Z.m+=ie}function Wu(V){for(var Z=0,ie=0,_e=V.children,Me=_e.length,Le;--Me>=0;)Le=_e[Me],Le.z+=Z,Le.m+=Z,Z+=Le.s+(ie+=Le.c)}function Je(V,Z,ie){return V.a.parent===Z.parent?V.a:ie}e.layout.cluster=function(){var V=e.layout.hierarchy().sort(null).value(null),Z=Fu,ie=[1,1],_e=!1;function Me(Le,at){var je=V.call(this,Le,at),xt=je[0],Dt,It=0;Lu(xt,function(hr){var Tr=hr.children;Tr&&Tr.length?(hr.x=Gt(Tr),hr.y=yt(Tr)):(hr.x=Dt?It+=Z(hr,Dt):0,hr.y=0,Dt=hr)});var ar=Bt(xt),rr=mr(xt),Dr=ar.x-Z(ar,rr)/2,Hr=rr.x+Z(rr,ar)/2;return Lu(xt,_e?function(hr){hr.x=(hr.x-xt.x)*ie[0],hr.y=(xt.y-hr.y)*ie[1]}:function(hr){hr.x=(hr.x-Dr)/(Hr-Dr)*ie[0],hr.y=(1-(xt.y?hr.y/xt.y:1))*ie[1]}),je}return Me.separation=function(Le){return arguments.length?(Z=Le,Me):Z},Me.size=function(Le){return arguments.length?(_e=(ie=Le)==null,Me):_e?null:ie},Me.nodeSize=function(Le){return arguments.length?(_e=(ie=Le)!=null,Me):_e?ie:null},yu(Me,V)};function yt(V){return 1+e.max(V,function(Z){return Z.y})}function Gt(V){return V.reduce(function(Z,ie){return Z+ie.x},0)/V.length}function Bt(V){var Z=V.children;return Z&&Z.length?Bt(Z[0]):V}function mr(V){var Z=V.children,ie;return Z&&(ie=Z.length)?mr(Z[ie-1]):V}e.layout.treemap=function(){var V=e.layout.hierarchy(),Z=Math.round,ie=[1,1],_e=null,Me=Ur,Le=!1,at,je="squarify",xt=.5*(1+Math.sqrt(5));function Dt(hr,Tr){for(var Lr=-1,Vr=hr.length,jr,br;++Lr0;)Vr.push(br=jr[xa-1]),Vr.area+=br.area,je!=="squarify"||(On=rr(Vr,ra))<=Ln?(jr.pop(),Ln=On):(Vr.area-=Vr.pop().area,Dr(Vr,ra,Lr,!1),ra=Math.min(Lr.dx,Lr.dy),Vr.length=Vr.area=0,Ln=1/0);Vr.length&&(Dr(Vr,ra,Lr,!0),Vr.length=Vr.area=0),Tr.forEach(It)}}function ar(hr){var Tr=hr.children;if(Tr&&Tr.length){var Lr=Me(hr),Vr=Tr.slice(),jr,br=[];for(Dt(Vr,Lr.dx*Lr.dy/hr.value),br.area=0;jr=Vr.pop();)br.push(jr),br.area+=jr.area,jr.z!=null&&(Dr(br,jr.z?Lr.dx:Lr.dy,Lr,!Vr.length),br.length=br.area=0);Tr.forEach(ar)}}function rr(hr,Tr){for(var Lr=hr.area,Vr,jr=0,br=1/0,Ln=-1,On=hr.length;++Lnjr&&(jr=Vr));return Lr*=Lr,Tr*=Tr,Lr?Math.max(Tr*jr*xt/Lr,Lr/(Tr*br*xt)):1/0}function Dr(hr,Tr,Lr,Vr){var jr=-1,br=hr.length,Ln=Lr.x,On=Lr.y,ra=Tr?Z(hr.area/Tr):0,xa;if(Tr==Lr.dx){for((Vr||ra>Lr.dy)&&(ra=Lr.dy);++jrLr.dx)&&(ra=Lr.dx);++jr1);return V+Z*_e*Math.sqrt(-2*Math.log(Le)/Le)}},logNormal:function(){var V=e.random.normal.apply(e,arguments);return function(){return Math.exp(V())}},bates:function(V){var Z=e.random.irwinHall(V);return function(){return Z()/V}},irwinHall:function(V){return function(){for(var Z=0,ie=0;ie2?Wr:Vn,Dt=_e?cf:oh;return Me=xt(V,Z,Dt,ie),Le=xt(Z,V,Dt,rc),je}function je(xt){return Me(xt)}return je.invert=function(xt){return Le(xt)},je.domain=function(xt){return arguments.length?(V=xt.map(Number),at()):V},je.range=function(xt){return arguments.length?(Z=xt,at()):Z},je.rangeRound=function(xt){return je.range(xt).interpolate(eu)},je.clamp=function(xt){return arguments.length?(_e=xt,at()):_e},je.interpolate=function(xt){return arguments.length?(ie=xt,at()):ie},je.ticks=function(xt){return Va(V,xt)},je.tickFormat=function(xt,Dt){return d3_scale_linearTickFormat(V,xt,Dt)},je.nice=function(xt){return Pa(V,xt),at()},je.copy=function(){return ea(V,Z,ie,_e)},at()}function Ca(V,Z){return e.rebind(V,Z,"range","rangeRound","interpolate","clamp")}function Pa(V,Z){return tn(V,nn(La(V,Z)[2])),tn(V,nn(La(V,Z)[2])),V}function La(V,Z){Z==null&&(Z=10);var ie=mn(V),_e=ie[1]-ie[0],Me=Math.pow(10,Math.floor(Math.log(_e/Z)/Math.LN10)),Le=Z/_e*Me;return Le<=.15?Me*=10:Le<=.35?Me*=5:Le<=.75&&(Me*=2),ie[0]=Math.ceil(ie[0]/Me)*Me,ie[1]=Math.floor(ie[1]/Me)*Me+Me*.5,ie[2]=Me,ie}function Va(V,Z){return e.range.apply(e,La(V,Z))}var na={s:1,g:1,p:1,r:1,e:1};function zn(V){return-Math.floor(Math.log(V)/Math.LN10+.01)}function Ja(V,Z){var ie=zn(Z[2]);return V in na?Math.abs(ie-zn(Math.max(g(Z[0]),g(Z[1]))))+ +(V!=="e"):ie-(V==="%")*2}e.scale.log=function(){return pi(e.scale.linear().domain([0,1]),10,!0,[1,10])};function pi(V,Z,ie,_e){function Me(je){return(ie?Math.log(je<0?0:je):-Math.log(je>0?0:-je))/Math.log(Z)}function Le(je){return ie?Math.pow(Z,je):-Math.pow(Z,-je)}function at(je){return V(Me(je))}return at.invert=function(je){return Le(V.invert(je))},at.domain=function(je){return arguments.length?(ie=je[0]>=0,V.domain((_e=je.map(Number)).map(Me)),at):_e},at.base=function(je){return arguments.length?(Z=+je,V.domain(_e.map(Me)),at):Z},at.nice=function(){var je=tn(_e.map(Me),ie?Math:ji);return V.domain(je),_e=je.map(Le),at},at.ticks=function(){var je=mn(_e),xt=[],Dt=je[0],It=je[1],ar=Math.floor(Me(Dt)),rr=Math.ceil(Me(It)),Dr=Z%1?2:Z;if(isFinite(rr-ar)){if(ie){for(;ar0;Hr--)xt.push(Le(ar)*Hr);for(ar=0;xt[ar]It;rr--);xt=xt.slice(ar,rr)}return xt},at.copy=function(){return pi(V.copy(),Z,ie,_e)},Ca(at,V)}var ji={floor:function(V){return-Math.ceil(-V)},ceil:function(V){return-Math.floor(-V)}};e.scale.pow=function(){return Ao(e.scale.linear(),1,[0,1])};function Ao(V,Z,ie){var _e=Qi(Z),Me=Qi(1/Z);function Le(at){return V(_e(at))}return Le.invert=function(at){return Me(V.invert(at))},Le.domain=function(at){return arguments.length?(V.domain((ie=at.map(Number)).map(_e)),Le):ie},Le.ticks=function(at){return Va(ie,at)},Le.tickFormat=function(at,je){return d3_scale_linearTickFormat(ie,at,je)},Le.nice=function(at){return Le.domain(Pa(ie,at))},Le.exponent=function(at){return arguments.length?(_e=Qi(Z=at),Me=Qi(1/Z),V.domain(ie.map(_e)),Le):Z},Le.copy=function(){return Ao(V.copy(),Z,ie)},Ca(Le,V)}function Qi(V){return function(Z){return Z<0?-Math.pow(-Z,V):Math.pow(Z,V)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return zo([],{t:"range",a:[[]]})};function zo(V,Z){var ie,_e,Me;function Le(je){return _e[((ie.get(je)||(Z.t==="range"?ie.set(je,V.push(je)):NaN))-1)%_e.length]}function at(je,xt){return e.range(V.length).map(function(Dt){return je+xt*Dt})}return Le.domain=function(je){if(!arguments.length)return V;V=[],ie=new w;for(var xt=-1,Dt=je.length,It;++xt0?ie[Le-1]:V[0],Lerr?0:1;if(It=Ke)return xt(It,Hr)+(Dt?xt(Dt,1-Hr):"")+"Z";var hr,Tr,Lr,Vr,jr=0,br=0,Ln,On,ra,xa,Ba,za,bi,Da,si=[];if((Vr=(+at.apply(this,arguments)||0)/2)&&(Lr=_e===xu?Math.sqrt(Dt*Dt+It*It):+_e.apply(this,arguments),Hr||(br*=-1),It&&(br=Br(Lr/It*Math.sin(Vr))),Dt&&(jr=Br(Lr/Dt*Math.sin(Vr)))),It){Ln=It*Math.cos(ar+br),On=It*Math.sin(ar+br),ra=It*Math.cos(rr-br),xa=It*Math.sin(rr-br);var Fo=Math.abs(rr-ar-2*br)<=Re?0:1;if(br&&Pc(Ln,On,ra,xa)===Hr^Fo){var Ps=(ar+rr)/2;Ln=It*Math.cos(Ps),On=It*Math.sin(Ps),ra=xa=null}}else Ln=On=0;if(Dt){Ba=Dt*Math.cos(rr-jr),za=Dt*Math.sin(rr-jr),bi=Dt*Math.cos(ar+jr),Da=Dt*Math.sin(ar+jr);var Yo=Math.abs(ar-rr+2*jr)<=Re?0:1;if(jr&&Pc(Ba,za,bi,Da)===1-Hr^Yo){var ma=(ar+rr)/2;Ba=Dt*Math.cos(ma),za=Dt*Math.sin(ma),bi=Da=null}}else Ba=za=0;if(Dr>Fe&&(hr=Math.min(Math.abs(It-Dt)/2,+ie.apply(this,arguments)))>.001){Tr=Dt0?0:1}function Wa(V,Z,ie,_e,Me){var Le=V[0]-Z[0],at=V[1]-Z[1],je=(Me?_e:-_e)/Math.sqrt(Le*Le+at*at),xt=je*at,Dt=-je*Le,It=V[0]+xt,ar=V[1]+Dt,rr=Z[0]+xt,Dr=Z[1]+Dt,Hr=(It+rr)/2,hr=(ar+Dr)/2,Tr=rr-It,Lr=Dr-ar,Vr=Tr*Tr+Lr*Lr,jr=ie-_e,br=It*Dr-rr*ar,Ln=(Lr<0?-1:1)*Math.sqrt(Math.max(0,jr*jr*Vr-br*br)),On=(br*Lr-Tr*Ln)/Vr,ra=(-br*Tr-Lr*Ln)/Vr,xa=(br*Lr+Tr*Ln)/Vr,Ba=(-br*Tr+Lr*Ln)/Vr,za=On-Hr,bi=ra-hr,Da=xa-Hr,si=Ba-hr;return za*za+bi*bi>Da*Da+si*si&&(On=xa,ra=Ba),[[On-xt,ra-Dt],[On*ie/jr,ra*ie/jr]]}function oi(){return!0}function Ph(V){var Z=ko,ie=Io,_e=oi,Me=iu,Le=Me.key,at=.7;function je(xt){var Dt=[],It=[],ar=-1,rr=xt.length,Dr,Hr=Fr(Z),hr=Fr(ie);function Tr(){Dt.push("M",Me(V(It),at))}for(;++ar1?V.join("L"):V+"Z"}function K(V){return V.join("L")+"Z"}function b(V){for(var Z=0,ie=V.length,_e=V[0],Me=[_e[0],",",_e[1]];++Z1&&Me.push("H",_e[0]),Me.join("")}function I(V){for(var Z=0,ie=V.length,_e=V[0],Me=[_e[0],",",_e[1]];++Z1){je=Z[1],Le=V[xt],xt++,_e+="C"+(Me[0]+at[0])+","+(Me[1]+at[1])+","+(Le[0]-je[0])+","+(Le[1]-je[1])+","+Le[0]+","+Le[1];for(var Dt=2;Dt9&&(Le=ie*3/Math.sqrt(Le),at[je]=Le*_e,at[je+1]=Le*Me));for(je=-1;++je<=xt;)Le=(V[Math.min(xt,je+1)][0]-V[Math.max(0,je-1)][0])/(6*(1+at[je]*at[je])),Z.push([Le||0,at[je]*Le||0]);return Z}function ut(V){return V.length<3?iu(V):V[0]+ke(V,Be(V))}e.svg.line.radial=function(){var V=Ph(gt);return V.radius=V.x,delete V.x,V.angle=V.y,delete V.y,V};function gt(V){for(var Z,ie=-1,_e=V.length,Me,Le;++ie<_e;)Z=V[ie],Me=Z[0],Le=Z[1]-_t,Z[0]=Me*Math.cos(Le),Z[1]=Me*Math.sin(Le);return V}function Mt(V){var Z=ko,ie=ko,_e=0,Me=Io,Le=oi,at=iu,je=at.key,xt=at,Dt="L",It=.7;function ar(rr){var Dr=[],Hr=[],hr=[],Tr=-1,Lr=rr.length,Vr,jr=Fr(Z),br=Fr(_e),Ln=Z===ie?function(){return ra}:Fr(ie),On=_e===Me?function(){return xa}:Fr(Me),ra,xa;function Ba(){Dr.push("M",at(V(hr),It),Dt,xt(V(Hr.reverse()),It),"Z")}for(;++TrRe)+",1 "+ar}function Dt(It,ar,rr,Dr){return"Q 0,0 "+Dr}return Le.radius=function(It){return arguments.length?(ie=Fr(It),Le):ie},Le.source=function(It){return arguments.length?(V=Fr(It),Le):V},Le.target=function(It){return arguments.length?(Z=Fr(It),Le):Z},Le.startAngle=function(It){return arguments.length?(_e=Fr(It),Le):_e},Le.endAngle=function(It){return arguments.length?(Me=Fr(It),Le):Me},Le};function er(V){return V.radius}e.svg.diagonal=function(){var V=Ft,Z=Ot,ie=sr;function _e(Me,Le){var at=V.call(this,Me,Le),je=Z.call(this,Me,Le),xt=(at.y+je.y)/2,Dt=[at,{x:at.x,y:xt},{x:je.x,y:xt},je];return Dt=Dt.map(ie),"M"+Dt[0]+"C"+Dt[1]+" "+Dt[2]+" "+Dt[3]}return _e.source=function(Me){return arguments.length?(V=Fr(Me),_e):V},_e.target=function(Me){return arguments.length?(Z=Fr(Me),_e):Z},_e.projection=function(Me){return arguments.length?(ie=Me,_e):ie},_e};function sr(V){return[V.x,V.y]}e.svg.diagonal.radial=function(){var V=e.svg.diagonal(),Z=sr,ie=V.projection;return V.projection=function(_e){return arguments.length?ie(wr(Z=_e)):Z},V};function wr(V){return function(){var Z=V.apply(this,arguments),ie=Z[0],_e=Z[1]-_t;return[ie*Math.cos(_e),ie*Math.sin(_e)]}}e.svg.symbol=function(){var V=pn,Z=Gr;function ie(_e,Me){return(kn.get(V.call(this,_e,Me))||cn)(Z.call(this,_e,Me))}return ie.type=function(_e){return arguments.length?(V=Fr(_e),ie):V},ie.size=function(_e){return arguments.length?(Z=Fr(_e),ie):Z},ie};function Gr(){return 64}function pn(){return"circle"}function cn(V){var Z=Math.sqrt(V/Re);return"M0,"+Z+"A"+Z+","+Z+" 0 1,1 0,"+-Z+"A"+Z+","+Z+" 0 1,1 0,"+Z+"Z"}var kn=e.map({circle:cn,cross:function(V){var Z=Math.sqrt(V/5)/2;return"M"+-3*Z+","+-Z+"H"+-Z+"V"+-3*Z+"H"+Z+"V"+-Z+"H"+3*Z+"V"+Z+"H"+Z+"V"+3*Z+"H"+-Z+"V"+Z+"H"+-3*Z+"Z"},diamond:function(V){var Z=Math.sqrt(V/(2*ka)),ie=Z*ka;return"M0,"+-Z+"L"+ie+",0 0,"+Z+" "+-ie+",0Z"},square:function(V){var Z=Math.sqrt(V)/2;return"M"+-Z+","+-Z+"L"+Z+","+-Z+" "+Z+","+Z+" "+-Z+","+Z+"Z"},"triangle-down":function(V){var Z=Math.sqrt(V/ta),ie=Z*ta/2;return"M0,"+ie+"L"+Z+","+-ie+" "+-Z+","+-ie+"Z"},"triangle-up":function(V){var Z=Math.sqrt(V/ta),ie=Z*ta/2;return"M0,"+-ie+"L"+Z+","+ie+" "+-Z+","+ie+"Z"}});e.svg.symbolTypes=kn.keys();var ta=Math.sqrt(3),ka=Math.tan(30*St);he.transition=function(V){for(var Z=Xi||++xo,ie=qo(V),_e=[],Me,Le,at=Wo||{time:Date.now(),ease:_l,delay:0,duration:250},je=-1,xt=this.length;++je0;)ar[--Vr].call(V,Lr);if(Tr>=1)return at.event&&at.event.end.call(V,V.__data__,Z),--Le.count?delete Le[_e]:delete V[ie],1}at||(je=Me.time,xt=ki(rr,0,je),at=Le[_e]={tween:new w,time:je,timer:xt,delay:Me.delay,duration:Me.duration,ease:Me.ease,index:Z},Me=null,++Le.count)}e.svg.axis=function(){var V=e.scale.linear(),Z=Tl,ie=6,_e=6,Me=3,Le=[10],at=null,je;function xt(Dt){Dt.each(function(){var It=e.select(this),ar=this.__chart__||V,rr=this.__chart__=V.copy(),Dr=at==null?rr.ticks?rr.ticks.apply(rr,Le):rr.domain():at,Hr=je==null?rr.tickFormat?rr.tickFormat.apply(rr,Le):q:je,hr=It.selectAll(".tick").data(Dr,rr),Tr=hr.enter().insert("g",".domain").attr("class","tick").style("opacity",Fe),Lr=e.transition(hr.exit()).style("opacity",Fe).remove(),Vr=e.transition(hr.order()).style("opacity",1),jr=Math.max(ie,0)+Me,br,Ln=An(rr),On=It.selectAll(".domain").data([0]),ra=(On.enter().append("path").attr("class","domain"),e.transition(On));Tr.append("line"),Tr.append("text");var xa=Tr.select("line"),Ba=Vr.select("line"),za=hr.select("text").text(Hr),bi=Tr.select("text"),Da=Vr.select("text"),si=Z==="top"||Z==="left"?-1:1,Fo,Ps,Yo,ma;if(Z==="bottom"||Z==="top"?(br=Gl,Fo="x",Yo="y",Ps="x2",ma="y2",za.attr("dy",si<0?"0em":".71em").style("text-anchor","middle"),ra.attr("d","M"+Ln[0]+","+si*_e+"V0H"+Ln[1]+"V"+si*_e)):(br=zs,Fo="y",Yo="x",Ps="y2",ma="x2",za.attr("dy",".32em").style("text-anchor",si<0?"end":"start"),ra.attr("d","M"+si*_e+","+Ln[0]+"H0V"+Ln[1]+"H"+si*_e)),xa.attr(ma,si*ie),bi.attr(Yo,si*jr),Ba.attr(Ps,0).attr(ma,si*ie),Da.attr(Fo,0).attr(Yo,si*jr),rr.rangeBand){var $a=rr,Ri=$a.rangeBand()/2;ar=rr=function(To){return $a(To)+Ri}}else ar.rangeBand?ar=rr:Lr.call(br,rr,ar);Tr.call(br,ar,rr),Vr.call(br,rr,rr)})}return xt.scale=function(Dt){return arguments.length?(V=Dt,xt):V},xt.orient=function(Dt){return arguments.length?(Z=Dt in bu?Dt+"":Tl,xt):Z},xt.ticks=function(){return arguments.length?(Le=r(arguments),xt):Le},xt.tickValues=function(Dt){return arguments.length?(at=Dt,xt):at},xt.tickFormat=function(Dt){return arguments.length?(je=Dt,xt):je},xt.tickSize=function(Dt){var It=arguments.length;return It?(ie=+Dt,_e=+arguments[It-1],xt):ie},xt.innerTickSize=function(Dt){return arguments.length?(ie=+Dt,xt):ie},xt.outerTickSize=function(Dt){return arguments.length?(_e=+Dt,xt):_e},xt.tickPadding=function(Dt){return arguments.length?(Me=+Dt,xt):Me},xt.tickSubdivide=function(){return arguments.length&&xt},xt};var Tl="bottom",bu={top:1,right:1,bottom:1,left:1};function Gl(V,Z,ie){V.attr("transform",function(_e){var Me=Z(_e);return"translate("+(isFinite(Me)?Me:ie(_e))+",0)"})}function zs(V,Z,ie){V.attr("transform",function(_e){var Me=Z(_e);return"translate(0,"+(isFinite(Me)?Me:ie(_e))+")"})}e.svg.brush=function(){var V=ue(It,"brushstart","brush","brushend"),Z=null,ie=null,_e=[0,0],Me=[0,0],Le,at,je=!0,xt=!0,Dt=_u[0];function It(hr){hr.each(function(){var Tr=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Hr).on("touchstart.brush",Hr),Lr=Tr.selectAll(".background").data([0]);Lr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Tr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Vr=Tr.selectAll(".resize").data(Dt,q);Vr.exit().remove(),Vr.enter().append("g").attr("class",function(On){return"resize "+On}).style("cursor",function(On){return Du[On]}).append("rect").attr("x",function(On){return/[ew]$/.test(On)?-3:null}).attr("y",function(On){return/^[ns]/.test(On)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Vr.style("display",It.empty()?"none":null);var jr=e.transition(Tr),br=e.transition(Lr),Ln;Z&&(Ln=An(Z),br.attr("x",Ln[0]).attr("width",Ln[1]-Ln[0]),rr(jr)),ie&&(Ln=An(ie),br.attr("y",Ln[0]).attr("height",Ln[1]-Ln[0]),Dr(jr)),ar(jr)})}It.event=function(hr){hr.each(function(){var Tr=V.of(this,arguments),Lr={x:_e,y:Me,i:Le,j:at},Vr=this.__chart__||Lr;this.__chart__=Lr,Xi?e.select(this).transition().each("start.brush",function(){Le=Vr.i,at=Vr.j,_e=Vr.x,Me=Vr.y,Tr({type:"brushstart"})}).tween("brush:brush",function(){var jr=sf(_e,Lr.x),br=sf(Me,Lr.y);return Le=at=null,function(Ln){_e=Lr.x=jr(Ln),Me=Lr.y=br(Ln),Tr({type:"brush",mode:"resize"})}}).each("end.brush",function(){Le=Lr.i,at=Lr.j,Tr({type:"brush",mode:"resize"}),Tr({type:"brushend"})}):(Tr({type:"brushstart"}),Tr({type:"brush",mode:"resize"}),Tr({type:"brushend"}))})};function ar(hr){hr.selectAll(".resize").attr("transform",function(Tr){return"translate("+_e[+/e$/.test(Tr)]+","+Me[+/^s/.test(Tr)]+")"})}function rr(hr){hr.select(".extent").attr("x",_e[0]),hr.selectAll(".extent,.n>rect,.s>rect").attr("width",_e[1]-_e[0])}function Dr(hr){hr.select(".extent").attr("y",Me[0]),hr.selectAll(".extent,.e>rect,.w>rect").attr("height",Me[1]-Me[0])}function Hr(){var hr=this,Tr=e.select(e.event.target),Lr=V.of(hr,arguments),Vr=e.select(hr),jr=Tr.datum(),br=!/^(n|s)$/.test(jr)&&Z,Ln=!/^(e|w)$/.test(jr)&&ie,On=Tr.classed("extent"),ra=tr(hr),xa,Ba=e.mouse(hr),za,bi=e.select(i(hr)).on("keydown.brush",Fo).on("keyup.brush",Ps);if(e.event.changedTouches?bi.on("touchmove.brush",Yo).on("touchend.brush",$a):bi.on("mousemove.brush",Yo).on("mouseup.brush",$a),Vr.interrupt().selectAll("*").interrupt(),On)Ba[0]=_e[0]-Ba[0],Ba[1]=Me[0]-Ba[1];else if(jr){var Da=+/w$/.test(jr),si=+/^n/.test(jr);za=[_e[1-Da]-Ba[0],Me[1-si]-Ba[1]],Ba[0]=_e[Da],Ba[1]=Me[si]}else e.event.altKey&&(xa=Ba.slice());Vr.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",Tr.style("cursor")),Lr({type:"brushstart"}),Yo();function Fo(){e.event.keyCode==32&&(On||(xa=null,Ba[0]-=_e[1],Ba[1]-=Me[1],On=2),te())}function Ps(){e.event.keyCode==32&&On==2&&(Ba[0]+=_e[1],Ba[1]+=Me[1],On=0,te())}function Yo(){var Ri=e.mouse(hr),To=!1;za&&(Ri[0]+=za[0],Ri[1]+=za[1]),On||(e.event.altKey?(xa||(xa=[(_e[0]+_e[1])/2,(Me[0]+Me[1])/2]),Ba[0]=_e[+(Ri[0]{(function(e,t){typeof wM=="object"&&typeof R$!="undefined"?t(wM):(e=e||self,t(e.d3=e.d3||{}))})(wM,function(e){"use strict";var t=new Date,r=new Date;function n(ge,Ge,tt,ft){function He(Qe){return ge(Qe=arguments.length===0?new Date:new Date(+Qe)),Qe}return He.floor=function(Qe){return ge(Qe=new Date(+Qe)),Qe},He.ceil=function(Qe){return ge(Qe=new Date(Qe-1)),Ge(Qe,1),ge(Qe),Qe},He.round=function(Qe){var We=He(Qe),pt=He.ceil(Qe);return Qe-We0))return kt;do kt.push(qt=new Date(+Qe)),Ge(Qe,pt),ge(Qe);while(qt=We)for(;ge(We),!Qe(We);)We.setTime(We-1)},function(We,pt){if(We>=We)if(pt<0)for(;++pt<=0;)for(;Ge(We,-1),!Qe(We););else for(;--pt>=0;)for(;Ge(We,1),!Qe(We););})},tt&&(He.count=function(Qe,We){return t.setTime(+Qe),r.setTime(+We),ge(t),ge(r),Math.floor(tt(t,r))},He.every=function(Qe){return Qe=Math.floor(Qe),!isFinite(Qe)||!(Qe>0)?null:Qe>1?He.filter(ft?function(We){return ft(We)%Qe===0}:function(We){return He.count(0,We)%Qe===0}):He}),He}var a=n(function(){},function(ge,Ge){ge.setTime(+ge+Ge)},function(ge,Ge){return Ge-ge});a.every=function(ge){return ge=Math.floor(ge),!isFinite(ge)||!(ge>0)?null:ge>1?n(function(Ge){Ge.setTime(Math.floor(Ge/ge)*ge)},function(Ge,tt){Ge.setTime(+Ge+tt*ge)},function(Ge,tt){return(tt-Ge)/ge}):a};var i=a.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(ge){ge.setTime(ge-ge.getMilliseconds())},function(ge,Ge){ge.setTime(+ge+Ge*o)},function(ge,Ge){return(Ge-ge)/o},function(ge){return ge.getUTCSeconds()}),h=f.range,v=n(function(ge){ge.setTime(ge-ge.getMilliseconds()-ge.getSeconds()*o)},function(ge,Ge){ge.setTime(+ge+Ge*s)},function(ge,Ge){return(Ge-ge)/s},function(ge){return ge.getMinutes()}),d=v.range,m=n(function(ge){ge.setTime(ge-ge.getMilliseconds()-ge.getSeconds()*o-ge.getMinutes()*s)},function(ge,Ge){ge.setTime(+ge+Ge*l)},function(ge,Ge){return(Ge-ge)/l},function(ge){return ge.getHours()}),x=m.range,g=n(function(ge){ge.setHours(0,0,0,0)},function(ge,Ge){ge.setDate(ge.getDate()+Ge)},function(ge,Ge){return(Ge-ge-(Ge.getTimezoneOffset()-ge.getTimezoneOffset())*s)/u},function(ge){return ge.getDate()-1}),E=g.range;function M(ge){return n(function(Ge){Ge.setDate(Ge.getDate()-(Ge.getDay()+7-ge)%7),Ge.setHours(0,0,0,0)},function(Ge,tt){Ge.setDate(Ge.getDate()+tt*7)},function(Ge,tt){return(tt-Ge-(tt.getTimezoneOffset()-Ge.getTimezoneOffset())*s)/c})}var w=M(0),k=M(1),y=M(2),S=M(3),T=M(4),p=M(5),C=M(6),A=w.range,P=k.range,D=y.range,z=S.range,q=T.range,U=p.range,O=C.range,R=n(function(ge){ge.setDate(1),ge.setHours(0,0,0,0)},function(ge,Ge){ge.setMonth(ge.getMonth()+Ge)},function(ge,Ge){return Ge.getMonth()-ge.getMonth()+(Ge.getFullYear()-ge.getFullYear())*12},function(ge){return ge.getMonth()}),B=R.range,Y=n(function(ge){ge.setMonth(0,1),ge.setHours(0,0,0,0)},function(ge,Ge){ge.setFullYear(ge.getFullYear()+Ge)},function(ge,Ge){return Ge.getFullYear()-ge.getFullYear()},function(ge){return ge.getFullYear()});Y.every=function(ge){return!isFinite(ge=Math.floor(ge))||!(ge>0)?null:n(function(Ge){Ge.setFullYear(Math.floor(Ge.getFullYear()/ge)*ge),Ge.setMonth(0,1),Ge.setHours(0,0,0,0)},function(Ge,tt){Ge.setFullYear(Ge.getFullYear()+tt*ge)})};var X=Y.range,te=n(function(ge){ge.setUTCSeconds(0,0)},function(ge,Ge){ge.setTime(+ge+Ge*s)},function(ge,Ge){return(Ge-ge)/s},function(ge){return ge.getUTCMinutes()}),se=te.range,ue=n(function(ge){ge.setUTCMinutes(0,0,0)},function(ge,Ge){ge.setTime(+ge+Ge*l)},function(ge,Ge){return(Ge-ge)/l},function(ge){return ge.getUTCHours()}),re=ue.range,j=n(function(ge){ge.setUTCHours(0,0,0,0)},function(ge,Ge){ge.setUTCDate(ge.getUTCDate()+Ge)},function(ge,Ge){return(Ge-ge)/u},function(ge){return ge.getUTCDate()-1}),fe=j.range;function ce(ge){return n(function(Ge){Ge.setUTCDate(Ge.getUTCDate()-(Ge.getUTCDay()+7-ge)%7),Ge.setUTCHours(0,0,0,0)},function(Ge,tt){Ge.setUTCDate(Ge.getUTCDate()+tt*7)},function(Ge,tt){return(tt-Ge)/c})}var oe=ce(0),we=ce(1),he=ce(2),ye=ce(3),Pe=ce(4),le=ce(5),ze=ce(6),Xe=oe.range,vt=we.range,st=he.range,Oe=ye.range,qe=Pe.range,mt=le.range,lt=ze.range,Ie=n(function(ge){ge.setUTCDate(1),ge.setUTCHours(0,0,0,0)},function(ge,Ge){ge.setUTCMonth(ge.getUTCMonth()+Ge)},function(ge,Ge){return Ge.getUTCMonth()-ge.getUTCMonth()+(Ge.getUTCFullYear()-ge.getUTCFullYear())*12},function(ge){return ge.getUTCMonth()}),de=Ie.range,Ee=n(function(ge){ge.setUTCMonth(0,1),ge.setUTCHours(0,0,0,0)},function(ge,Ge){ge.setUTCFullYear(ge.getUTCFullYear()+Ge)},function(ge,Ge){return Ge.getUTCFullYear()-ge.getUTCFullYear()},function(ge){return ge.getUTCFullYear()});Ee.every=function(ge){return!isFinite(ge=Math.floor(ge))||!(ge>0)?null:n(function(Ge){Ge.setUTCFullYear(Math.floor(Ge.getUTCFullYear()/ge)*ge),Ge.setUTCMonth(0,1),Ge.setUTCHours(0,0,0,0)},function(Ge,tt){Ge.setUTCFullYear(Ge.getUTCFullYear()+tt*ge)})};var Ue=Ee.range;e.timeDay=g,e.timeDays=E,e.timeFriday=p,e.timeFridays=U,e.timeHour=m,e.timeHours=x,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=v,e.timeMinutes=d,e.timeMonday=k,e.timeMondays=P,e.timeMonth=R,e.timeMonths=B,e.timeSaturday=C,e.timeSaturdays=O,e.timeSecond=f,e.timeSeconds=h,e.timeSunday=w,e.timeSundays=A,e.timeThursday=T,e.timeThursdays=q,e.timeTuesday=y,e.timeTuesdays=D,e.timeWednesday=S,e.timeWednesdays=z,e.timeWeek=w,e.timeWeeks=A,e.timeYear=Y,e.timeYears=X,e.utcDay=j,e.utcDays=fe,e.utcFriday=le,e.utcFridays=mt,e.utcHour=ue,e.utcHours=re,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=te,e.utcMinutes=se,e.utcMonday=we,e.utcMondays=vt,e.utcMonth=Ie,e.utcMonths=de,e.utcSaturday=ze,e.utcSaturdays=lt,e.utcSecond=f,e.utcSeconds=h,e.utcSunday=oe,e.utcSundays=Xe,e.utcThursday=Pe,e.utcThursdays=qe,e.utcTuesday=he,e.utcTuesdays=st,e.utcWednesday=ye,e.utcWednesdays=Oe,e.utcWeek=oe,e.utcWeeks=Xe,e.utcYear=Ee,e.utcYears=Ue,Object.defineProperty(e,"__esModule",{value:!0})})});var ub=ne((TM,I$)=>{(function(e,t){typeof TM=="object"&&typeof I$!="undefined"?t(TM,hD()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(TM,function(e,t){"use strict";function r(Te){if(0<=Te.y&&Te.y<100){var Fe=new Date(-1,Te.m,Te.d,Te.H,Te.M,Te.S,Te.L);return Fe.setFullYear(Te.y),Fe}return new Date(Te.y,Te.m,Te.d,Te.H,Te.M,Te.S,Te.L)}function n(Te){if(0<=Te.y&&Te.y<100){var Fe=new Date(Date.UTC(-1,Te.m,Te.d,Te.H,Te.M,Te.S,Te.L));return Fe.setUTCFullYear(Te.y),Fe}return new Date(Date.UTC(Te.y,Te.m,Te.d,Te.H,Te.M,Te.S,Te.L))}function a(Te,Fe,Ae){return{y:Te,m:Fe,d:Ae,H:0,M:0,S:0,L:0}}function i(Te){var Fe=Te.dateTime,Ae=Te.date,Re=Te.time,Ze=Te.periods,Ke=Te.days,_t=Te.shortDays,St=Te.months,Vt=Te.shortMonths,fr=h(Ze),$t=v(Ze),gr=h(Ke),Br=v(Ke),Nr=h(_t),Er=v(_t),zr=h(St),vn=v(St),Nn=h(Vt),Xn=v(Vt),Kn={a:Oi,A:ni,b:ao,B:Hi,c:null,d:R,e:R,f:se,H:B,I:Y,j:X,L:te,m:ue,M:re,p:to,q:Xo,Q:We,s:pt,S:j,u:fe,U:ce,V:oe,w:we,W:he,x:null,X:null,y:ye,Y:Pe,Z:le,"%":Qe},Qn={a:Zo,A:Fi,b:yo,B:oo,c:null,d:ze,e:ze,f:qe,H:Xe,I:vt,j:st,L:Oe,m:mt,M:lt,p:rl,q:Ni,Q:We,s:pt,S:Ie,u:de,U:Ee,V:Ue,w:ge,W:Ge,x:null,X:null,y:tt,Y:ft,Z:He,"%":Qe},un={a:ii,A:pa,b:no,B:Gi,c:Ti,d:T,e:T,f:z,H:C,I:C,j:p,L:D,m:S,M:A,p:qa,q:y,Q:U,s:O,S:P,u:m,U:x,V:g,w:d,W:E,x:fi,X:_o,y:w,Y:M,Z:k,"%":q};Kn.x=aa(Ae,Kn),Kn.X=aa(Re,Kn),Kn.c=aa(Fe,Kn),Qn.x=aa(Ae,Qn),Qn.X=aa(Re,Qn),Qn.c=aa(Fe,Qn);function aa(Oa,xi){return function(Pi){var ia=[],rt=-1,Xt=0,xr=Oa.length,Fr,xn,Mn;for(Pi instanceof Date||(Pi=new Date(+Pi));++rt53)return null;"w"in ia||(ia.w=1),"Z"in ia?(Xt=n(a(ia.y,0,1)),xr=Xt.getUTCDay(),Xt=xr>4||xr===0?t.utcMonday.ceil(Xt):t.utcMonday(Xt),Xt=t.utcDay.offset(Xt,(ia.V-1)*7),ia.y=Xt.getUTCFullYear(),ia.m=Xt.getUTCMonth(),ia.d=Xt.getUTCDate()+(ia.w+6)%7):(Xt=r(a(ia.y,0,1)),xr=Xt.getDay(),Xt=xr>4||xr===0?t.timeMonday.ceil(Xt):t.timeMonday(Xt),Xt=t.timeDay.offset(Xt,(ia.V-1)*7),ia.y=Xt.getFullYear(),ia.m=Xt.getMonth(),ia.d=Xt.getDate()+(ia.w+6)%7)}else("W"in ia||"U"in ia)&&("w"in ia||(ia.w="u"in ia?ia.u%7:"W"in ia?1:0),xr="Z"in ia?n(a(ia.y,0,1)).getUTCDay():r(a(ia.y,0,1)).getDay(),ia.m=0,ia.d="W"in ia?(ia.w+6)%7+ia.W*7-(xr+5)%7:ia.w+ia.U*7-(xr+6)%7);return"Z"in ia?(ia.H+=ia.Z/100|0,ia.M+=ia.Z%100,n(ia)):r(ia)}}function ua(Oa,xi,Pi,ia){for(var rt=0,Xt=xi.length,xr=Pi.length,Fr,xn;rt=xr)return-1;if(Fr=xi.charCodeAt(rt++),Fr===37){if(Fr=xi.charAt(rt++),xn=un[Fr in o?xi.charAt(rt++):Fr],!xn||(ia=xn(Oa,Pi,ia))<0)return-1}else if(Fr!=Pi.charCodeAt(ia++))return-1}return ia}function qa(Oa,xi,Pi){var ia=fr.exec(xi.slice(Pi));return ia?(Oa.p=$t[ia[0].toLowerCase()],Pi+ia[0].length):-1}function ii(Oa,xi,Pi){var ia=Nr.exec(xi.slice(Pi));return ia?(Oa.w=Er[ia[0].toLowerCase()],Pi+ia[0].length):-1}function pa(Oa,xi,Pi){var ia=gr.exec(xi.slice(Pi));return ia?(Oa.w=Br[ia[0].toLowerCase()],Pi+ia[0].length):-1}function no(Oa,xi,Pi){var ia=Nn.exec(xi.slice(Pi));return ia?(Oa.m=Xn[ia[0].toLowerCase()],Pi+ia[0].length):-1}function Gi(Oa,xi,Pi){var ia=zr.exec(xi.slice(Pi));return ia?(Oa.m=vn[ia[0].toLowerCase()],Pi+ia[0].length):-1}function Ti(Oa,xi,Pi){return ua(Oa,Fe,xi,Pi)}function fi(Oa,xi,Pi){return ua(Oa,Ae,xi,Pi)}function _o(Oa,xi,Pi){return ua(Oa,Re,xi,Pi)}function Oi(Oa){return _t[Oa.getDay()]}function ni(Oa){return Ke[Oa.getDay()]}function ao(Oa){return Vt[Oa.getMonth()]}function Hi(Oa){return St[Oa.getMonth()]}function to(Oa){return Ze[+(Oa.getHours()>=12)]}function Xo(Oa){return 1+~~(Oa.getMonth()/3)}function Zo(Oa){return _t[Oa.getUTCDay()]}function Fi(Oa){return Ke[Oa.getUTCDay()]}function yo(Oa){return Vt[Oa.getUTCMonth()]}function oo(Oa){return St[Oa.getUTCMonth()]}function rl(Oa){return Ze[+(Oa.getUTCHours()>=12)]}function Ni(Oa){return 1+~~(Oa.getUTCMonth()/3)}return{format:function(Oa){var xi=aa(Oa+="",Kn);return xi.toString=function(){return Oa},xi},parse:function(Oa){var xi=da(Oa+="",!1);return xi.toString=function(){return Oa},xi},utcFormat:function(Oa){var xi=aa(Oa+="",Qn);return xi.toString=function(){return Oa},xi},utcParse:function(Oa){var xi=da(Oa+="",!0);return xi.toString=function(){return Oa},xi}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(Te,Fe,Ae){var Re=Te<0?"-":"",Ze=(Re?-Te:Te)+"",Ke=Ze.length;return Re+(Ke68?1900:2e3),Ae+Re[0].length):-1}function k(Te,Fe,Ae){var Re=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Fe.slice(Ae,Ae+6));return Re?(Te.Z=Re[1]?0:-(Re[2]+(Re[3]||"00")),Ae+Re[0].length):-1}function y(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae,Ae+1));return Re?(Te.q=Re[0]*3-3,Ae+Re[0].length):-1}function S(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae,Ae+2));return Re?(Te.m=Re[0]-1,Ae+Re[0].length):-1}function T(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae,Ae+2));return Re?(Te.d=+Re[0],Ae+Re[0].length):-1}function p(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae,Ae+3));return Re?(Te.m=0,Te.d=+Re[0],Ae+Re[0].length):-1}function C(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae,Ae+2));return Re?(Te.H=+Re[0],Ae+Re[0].length):-1}function A(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae,Ae+2));return Re?(Te.M=+Re[0],Ae+Re[0].length):-1}function P(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae,Ae+2));return Re?(Te.S=+Re[0],Ae+Re[0].length):-1}function D(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae,Ae+3));return Re?(Te.L=+Re[0],Ae+Re[0].length):-1}function z(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae,Ae+6));return Re?(Te.L=Math.floor(Re[0]/1e3),Ae+Re[0].length):-1}function q(Te,Fe,Ae){var Re=l.exec(Fe.slice(Ae,Ae+1));return Re?Ae+Re[0].length:-1}function U(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae));return Re?(Te.Q=+Re[0],Ae+Re[0].length):-1}function O(Te,Fe,Ae){var Re=s.exec(Fe.slice(Ae));return Re?(Te.s=+Re[0],Ae+Re[0].length):-1}function R(Te,Fe){return c(Te.getDate(),Fe,2)}function B(Te,Fe){return c(Te.getHours(),Fe,2)}function Y(Te,Fe){return c(Te.getHours()%12||12,Fe,2)}function X(Te,Fe){return c(1+t.timeDay.count(t.timeYear(Te),Te),Fe,3)}function te(Te,Fe){return c(Te.getMilliseconds(),Fe,3)}function se(Te,Fe){return te(Te,Fe)+"000"}function ue(Te,Fe){return c(Te.getMonth()+1,Fe,2)}function re(Te,Fe){return c(Te.getMinutes(),Fe,2)}function j(Te,Fe){return c(Te.getSeconds(),Fe,2)}function fe(Te){var Fe=Te.getDay();return Fe===0?7:Fe}function ce(Te,Fe){return c(t.timeSunday.count(t.timeYear(Te)-1,Te),Fe,2)}function oe(Te,Fe){var Ae=Te.getDay();return Te=Ae>=4||Ae===0?t.timeThursday(Te):t.timeThursday.ceil(Te),c(t.timeThursday.count(t.timeYear(Te),Te)+(t.timeYear(Te).getDay()===4),Fe,2)}function we(Te){return Te.getDay()}function he(Te,Fe){return c(t.timeMonday.count(t.timeYear(Te)-1,Te),Fe,2)}function ye(Te,Fe){return c(Te.getFullYear()%100,Fe,2)}function Pe(Te,Fe){return c(Te.getFullYear()%1e4,Fe,4)}function le(Te){var Fe=Te.getTimezoneOffset();return(Fe>0?"-":(Fe*=-1,"+"))+c(Fe/60|0,"0",2)+c(Fe%60,"0",2)}function ze(Te,Fe){return c(Te.getUTCDate(),Fe,2)}function Xe(Te,Fe){return c(Te.getUTCHours(),Fe,2)}function vt(Te,Fe){return c(Te.getUTCHours()%12||12,Fe,2)}function st(Te,Fe){return c(1+t.utcDay.count(t.utcYear(Te),Te),Fe,3)}function Oe(Te,Fe){return c(Te.getUTCMilliseconds(),Fe,3)}function qe(Te,Fe){return Oe(Te,Fe)+"000"}function mt(Te,Fe){return c(Te.getUTCMonth()+1,Fe,2)}function lt(Te,Fe){return c(Te.getUTCMinutes(),Fe,2)}function Ie(Te,Fe){return c(Te.getUTCSeconds(),Fe,2)}function de(Te){var Fe=Te.getUTCDay();return Fe===0?7:Fe}function Ee(Te,Fe){return c(t.utcSunday.count(t.utcYear(Te)-1,Te),Fe,2)}function Ue(Te,Fe){var Ae=Te.getUTCDay();return Te=Ae>=4||Ae===0?t.utcThursday(Te):t.utcThursday.ceil(Te),c(t.utcThursday.count(t.utcYear(Te),Te)+(t.utcYear(Te).getUTCDay()===4),Fe,2)}function ge(Te){return Te.getUTCDay()}function Ge(Te,Fe){return c(t.utcMonday.count(t.utcYear(Te)-1,Te),Fe,2)}function tt(Te,Fe){return c(Te.getUTCFullYear()%100,Fe,2)}function ft(Te,Fe){return c(Te.getUTCFullYear()%1e4,Fe,4)}function He(){return"+0000"}function Qe(){return"%"}function We(Te){return+Te}function pt(Te){return Math.floor(+Te/1e3)}var kt;qt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function qt(Te){return kt=i(Te),e.timeFormat=kt.format,e.timeParse=kt.parse,e.utcFormat=kt.utcFormat,e.utcParse=kt.utcParse,kt}var Wt="%Y-%m-%dT%H:%M:%S.%LZ";function _r(Te){return Te.toISOString()}var tr=Date.prototype.toISOString?_r:e.utcFormat(Wt);function lr(Te){var Fe=new Date(Te);return isNaN(Fe)?null:Fe}var Ye=+new Date("2000-01-01T00:00:00.000Z")?lr:e.utcParse(Wt);e.isoFormat=tr,e.isoParse=Ye,e.timeFormatDefaultLocale=qt,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var dD=ne((AM,z$)=>{(function(e,t){typeof AM=="object"&&typeof z$!="undefined"?t(AM):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(AM,(function(e){"use strict";function t(S){return Math.abs(S=Math.round(S))>=1e21?S.toLocaleString("en").replace(/,/g,""):S.toString(10)}function r(S,T){if((p=(S=T?S.toExponential(T-1):S.toExponential()).indexOf("e"))<0)return null;var p,C=S.slice(0,p);return[C.length>1?C[0]+C.slice(2):C,+S.slice(p+1)]}function n(S){return S=r(Math.abs(S)),S?S[1]:NaN}function a(S,T){return function(p,C){for(var A=p.length,P=[],D=0,z=S[0],q=0;A>0&&z>0&&(q+z+1>C&&(z=Math.max(1,C-q)),P.push(p.substring(A-=z,A+z)),!((q+=z+1)>C));)z=S[D=(D+1)%S.length];return P.reverse().join(T)}}function i(S){return function(T){return T.replace(/[0-9]/g,function(p){return S[+p]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(S){if(!(T=o.exec(S)))throw new Error("invalid format: "+S);var T;return new l({fill:T[1],align:T[2],sign:T[3],symbol:T[4],zero:T[5],width:T[6],comma:T[7],precision:T[8]&&T[8].slice(1),trim:T[9],type:T[10]})}s.prototype=l.prototype;function l(S){this.fill=S.fill===void 0?" ":S.fill+"",this.align=S.align===void 0?">":S.align+"",this.sign=S.sign===void 0?"-":S.sign+"",this.symbol=S.symbol===void 0?"":S.symbol+"",this.zero=!!S.zero,this.width=S.width===void 0?void 0:+S.width,this.comma=!!S.comma,this.precision=S.precision===void 0?void 0:+S.precision,this.trim=!!S.trim,this.type=S.type===void 0?"":S.type+""}l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function u(S){e:for(var T=S.length,p=1,C=-1,A;p0&&(C=0);break}return C>0?S.slice(0,C)+S.slice(A+1):S}var c;function f(S,T){var p=r(S,T);if(!p)return S+"";var C=p[0],A=p[1],P=A-(c=Math.max(-8,Math.min(8,Math.floor(A/3)))*3)+1,D=C.length;return P===D?C:P>D?C+new Array(P-D+1).join("0"):P>0?C.slice(0,P)+"."+C.slice(P):"0."+new Array(1-P).join("0")+r(S,Math.max(0,T+P-1))[0]}function h(S,T){var p=r(S,T);if(!p)return S+"";var C=p[0],A=p[1];return A<0?"0."+new Array(-A).join("0")+C:C.length>A+1?C.slice(0,A+1)+"."+C.slice(A+1):C+new Array(A-C.length+2).join("0")}var v={"%":function(S,T){return(S*100).toFixed(T)},b:function(S){return Math.round(S).toString(2)},c:function(S){return S+""},d:t,e:function(S,T){return S.toExponential(T)},f:function(S,T){return S.toFixed(T)},g:function(S,T){return S.toPrecision(T)},o:function(S){return Math.round(S).toString(8)},p:function(S,T){return h(S*100,T)},r:h,s:f,X:function(S){return Math.round(S).toString(16).toUpperCase()},x:function(S){return Math.round(S).toString(16)}};function d(S){return S}var m=Array.prototype.map,x=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function g(S){var T=S.grouping===void 0||S.thousands===void 0?d:a(m.call(S.grouping,Number),S.thousands+""),p=S.currency===void 0?"":S.currency[0]+"",C=S.currency===void 0?"":S.currency[1]+"",A=S.decimal===void 0?".":S.decimal+"",P=S.numerals===void 0?d:i(m.call(S.numerals,String)),D=S.percent===void 0?"%":S.percent+"",z=S.minus===void 0?"-":S.minus+"",q=S.nan===void 0?"NaN":S.nan+"";function U(R){R=s(R);var B=R.fill,Y=R.align,X=R.sign,te=R.symbol,se=R.zero,ue=R.width,re=R.comma,j=R.precision,fe=R.trim,ce=R.type;ce==="n"?(re=!0,ce="g"):v[ce]||(j===void 0&&(j=12),fe=!0,ce="g"),(se||B==="0"&&Y==="=")&&(se=!0,B="0",Y="=");var oe=te==="$"?p:te==="#"&&/[boxX]/.test(ce)?"0"+ce.toLowerCase():"",we=te==="$"?C:/[%p]/.test(ce)?D:"",he=v[ce],ye=/[defgprs%]/.test(ce);j=j===void 0?6:/[gprs]/.test(ce)?Math.max(1,Math.min(21,j)):Math.max(0,Math.min(20,j));function Pe(le){var ze=oe,Xe=we,vt,st,Oe;if(ce==="c")Xe=he(le)+Xe,le="";else{le=+le;var qe=le<0||1/le<0;if(le=isNaN(le)?q:he(Math.abs(le),j),fe&&(le=u(le)),qe&&+le==0&&X!=="+"&&(qe=!1),ze=(qe?X==="("?X:z:X==="-"||X==="("?"":X)+ze,Xe=(ce==="s"?x[8+c/3]:"")+Xe+(qe&&X==="("?")":""),ye){for(vt=-1,st=le.length;++vtOe||Oe>57){Xe=(Oe===46?A+le.slice(vt+1):le.slice(vt))+Xe,le=le.slice(0,vt);break}}}re&&!se&&(le=T(le,1/0));var mt=ze.length+le.length+Xe.length,lt=mt>1)+ze+le+Xe+lt.slice(mt);break;default:le=lt+ze+le+Xe;break}return P(le)}return Pe.toString=function(){return R+""},Pe}function O(R,B){var Y=U((R=s(R),R.type="f",R)),X=Math.max(-8,Math.min(8,Math.floor(n(B)/3)))*3,te=Math.pow(10,-X),se=x[8+X/3];return function(ue){return Y(te*ue)+se}}return{format:U,formatPrefix:O}}var E;M({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function M(S){return E=g(S),e.format=E.format,e.formatPrefix=E.formatPrefix,E}function w(S){return Math.max(0,-n(Math.abs(S)))}function k(S,T){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(T)/3)))*3-n(Math.abs(S)))}function y(S,T){return S=Math.abs(S),T=Math.abs(T)-S,Math.max(0,n(T)-n(S))+1}e.FormatSpecifier=l,e.formatDefaultLocale=M,e.formatLocale=g,e.formatSpecifier=s,e.precisionFixed=w,e.precisionPrefix=k,e.precisionRound=y,Object.defineProperty(e,"__esModule",{value:!0})}))});var B$=ne((BKt,q$)=>{"use strict";q$.exports=function(e){for(var t=e.length,r,n=0;n13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var mi=ne((OKt,O$)=>{"use strict";var nKe=B$();O$.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&nKe(r))return!1}else if(t!=="number")return!1;return e-e<1}});var uo=ne((NKt,N$)=>{"use strict";N$.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}});var vD=ne((MM,U$)=>{(function(e,t){typeof MM=="object"&&typeof U$!="undefined"?t(MM):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(MM,(function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},i=function(o){var s=o.length*.75,l=o.length,u,c=0,f,h,v,d;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var m=new ArrayBuffer(s),x=new Uint8Array(m);for(u=0;u>4,x[c++]=(h&15)<<4|v>>2,x[c++]=(v&3)<<6|d&63;return m};e.decode=i,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})}))});var Lg=ne((UKt,V$)=>{"use strict";V$.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var Ih=ne(k0=>{"use strict";var aKe=vD().decode,iKe=Lg(),pD=Array.isArray,oKe=ArrayBuffer,sKe=DataView;function G$(e){return oKe.isView(e)&&!(e instanceof sKe)}k0.isTypedArray=G$;function SM(e){return pD(e)||G$(e)}k0.isArrayOrTypedArray=SM;function lKe(e){return!SM(e[0])}k0.isArray1D=lKe;k0.ensureArray=function(e,t){return pD(e)||(e=[]),e.length=t,e};var Hf={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};Hf.uint8c=Hf.u1c;Hf.uint8=Hf.u1;Hf.int8=Hf.i1;Hf.uint16=Hf.u2;Hf.int16=Hf.i2;Hf.uint32=Hf.u4;Hf.int32=Hf.i4;Hf.float32=Hf.f4;Hf.float64=Hf.f8;function gD(e){return e.constructor===ArrayBuffer}k0.isArrayBuffer=gD;k0.decodeTypedArraySpec=function(e){var t=[],r=uKe(e),n=r.dtype,a=Hf[n];if(!a)throw new Error('Error in dtype: "'+n+'"');var i=a.BYTES_PER_ELEMENT,o=r.bdata;gD(o)||(o=aKe(o));var s=r.shape===void 0?[o.byteLength/i]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],h=i*f,v=0;if(l===1)t=new a(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var j$=mi(),yD=Ih().isArrayOrTypedArray;Z$.exports=function(t,r){if(j$(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var n=r.split("."),a,i,o,s;for(s=0;s{"use strict";var cb=m5(),vKe=/^\w*$/,pKe=0,$$=1,EM=2,K$=3,Fy=4;J$.exports=function(t,r,n,a){n=n||"name",a=a||"value";var i,o,s,l={};r&&r.length?(s=cb(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(i=0;i2)return l[v]=l[v]|EM,f.set(h,null);if(c){for(i=v;i{"use strict";var gKe=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,mKe=/^[^\.\[\]]+$/;eK.exports=function(e,t){for(;t;){var r=e.match(gKe);if(r)e=r[1];else if(e.match(mKe))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var kM=ne((WKt,rK)=>{"use strict";var yKe=mi();rK.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return yKe(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var iK=ne((YKt,aK)=>{"use strict";var nK=Ih().isArrayOrTypedArray,y5=Lg();aK.exports=function e(t,r){for(var n in r){var a=r[n],i=t[n];if(i!==a)if(n.charAt(0)==="_"||typeof a=="function"){if(n in t)continue;t[n]=a}else if(nK(a)&&nK(i)&&y5(a[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(a.length,i.length),s=0;sxKe,modHalf:()=>bKe});function xKe(e,t){let r=e%t;return r<0?r+t:r}function bKe(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}var hb=lo(()=>{"use strict"});var ci=ne(_5=>{"use strict";var oK=Lg(),x5=Array.isArray;function _Ke(e,t){var r,n;for(r=0;r{"use strict";sK.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var a={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:a,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var w5=ne(($Kt,lK)=>{"use strict";lK.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var Fg=ne((KKt,fK)=>{"use strict";var uK=w5(),cK=pl(),xD=cK({editType:"none"});xD.family.dflt=uK.HOVERFONT;xD.size.dflt=uK.HOVERFONTSIZE;fK.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:xD,grouptitlefont:cK({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var db=ne((JKt,hK)=>{"use strict";var wKe=pl(),T5=Fg().hoverlabel,A5=ci().extendFlat;hK.exports={hoverlabel:{bgcolor:A5({},T5.bgcolor,{arrayOk:!0}),bordercolor:A5({},T5.bordercolor,{arrayOk:!0}),font:wKe({arrayOk:!0,editType:"none"}),align:A5({},T5.align,{arrayOk:!0}),namelength:A5({},T5.namelength,{arrayOk:!0}),showarrow:A5({},T5.showarrow),editType:"none"}}});var os=ne((QKt,dK)=>{"use strict";var TKe=pl(),AKe=db();dK.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:TKe({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:AKe.hoverlabel,uirevision:{valType:"any",editType:"none"}}});var vb,vK=lo(()=>{vb={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]}});function Pg(e,t,r){return Math.min(Math.max(t,e),r)}function CM(e){let t=Math.round(e).toString(16).toUpperCase();return t.length<2?"0"+t:t}var pK,Bd,Py,gK=lo(()=>{vK();pK=Object.create(null);for(let e in vb)Object.hasOwn(vb,e)&&(pK[vb[e]]=e);Bd={to:{},get:{}};Bd.get=function(e){let t=e.slice(0,3).toLowerCase(),r,n;switch(t){case"hsl":{r=Bd.get.hsl(e),n="hsl";break}case"hwb":{r=Bd.get.hwb(e),n="hwb";break}default:{r=Bd.get.rgb(e),n="rgb";break}}return r?{model:n,value:r}:null};Bd.get.rgb=function(e){if(!e)return null;let t=/^#([a-f\d]{3,4})$/i,r=/^#([a-f\d]{6})([a-f\d]{2})?$/i,n=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,a=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,i=/^(\w+)$/,o=[0,0,0,1],s,l,u;if(s=e.match(r)){for(u=s[2],s=s[1],l=0;l<3;l++){let c=l*2;o[l]=Number.parseInt(s.slice(c,c+2),16)}u&&(o[3]=Number.parseInt(u,16)/255)}else if(s=e.match(t)){for(s=s[1],u=s[3],l=0;l<3;l++)o[l]=Number.parseInt(s[l]+s[l],16);u&&(o[3]=Number.parseInt(u+u,16)/255)}else if(s=e.match(n)){for(l=0;l<3;l++)o[l]=Number.parseFloat(s[l+1]);s[4]&&(o[3]=s[5]?Number.parseFloat(s[4])*.01:Number.parseFloat(s[4]))}else if(s=e.match(a)){for(l=0;l<3;l++)o[l]=Math.round(Number.parseFloat(s[l+1])*2.55);s[4]&&(o[3]=s[5]?Number.parseFloat(s[4])*.01:Number.parseFloat(s[4]))}else return(s=e.toLowerCase().match(i))?s[1]==="transparent"?[0,0,0,0]:Object.hasOwn(vb,s[1])?(o=vb[s[1]].slice(),o[3]=1,o):null:null;for(l=0;l<3;l++)o[l]=Pg(o[l],0,255);return o[3]=Pg(o[3],0,1),o};Bd.get.hsl=function(e){if(!e)return null;let t=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,r=e.match(t);if(r){let n=Number.parseFloat(r[4]),a=(Number.parseFloat(r[1])%360+360)%360,i=Pg(Number.parseFloat(r[2]),0,100),o=Pg(Number.parseFloat(r[3]),0,100),s=Pg(Number.isNaN(n)?1:n,0,1);return[a,i,o,s]}return null};Bd.get.hwb=function(e){if(!e)return null;let t=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,r=e.match(t);if(r){let n=Number.parseFloat(r[4]),a=(Number.parseFloat(r[1])%360+360)%360,i=Pg(Number.parseFloat(r[2]),0,100),o=Pg(Number.parseFloat(r[3]),0,100),s=Pg(Number.isNaN(n)?1:n,0,1);return[a,i,o,s]}return null};Bd.to.hex=function(...e){return"#"+CM(e[0])+CM(e[1])+CM(e[2])+(e[3]<1?CM(Math.round(e[3]*255)):"")};Bd.to.rgb=function(...e){return e.length<4||e[3]===1?"rgb("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+")":"rgba("+Math.round(e[0])+", "+Math.round(e[1])+", "+Math.round(e[2])+", "+e[3]+")"};Bd.to.rgb.percent=function(...e){let t=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),n=Math.round(e[2]/255*100);return e.length<4||e[3]===1?"rgb("+t+"%, "+r+"%, "+n+"%)":"rgba("+t+"%, "+r+"%, "+n+"%, "+e[3]+")"};Bd.to.hsl=function(...e){return e.length<4||e[3]===1?"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)":"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+e[3]+")"};Bd.to.hwb=function(...e){let t="";return e.length>=4&&e[3]!==1&&(t=", "+e[3]),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+t+")"};Bd.to.keyword=function(...e){return pK[e.slice(0,3)]};Py=Bd});var pb,mK=lo(()=>{pb={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]}});function gb(e){let t=e>.0031308?1.055*e**.4166666666666667-.055:e*12.92;return Math.min(Math.max(0,t),1)}function mb(e){return e>.04045?((e+.055)/1.055)**2.4:e/12.92}function MKe(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2+(e[2]-t[2])**2}var yK,yi,w1,_1,bD=lo(()=>{mK();yK={};for(let e of Object.keys(pb))yK[pb[e]]=e;yi={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},w1=yi,_1=(6/29)**3;for(let e of Object.keys(yi)){if(!("channels"in yi[e]))throw new Error("missing channels property: "+e);if(!("labels"in yi[e]))throw new Error("missing channel labels property: "+e);if(yi[e].labels.length!==yi[e].channels)throw new Error("channel and label counts mismatch: "+e);let{channels:t,labels:r}=yi[e];delete yi[e].channels,delete yi[e].labels,Object.defineProperty(yi[e],"channels",{value:t}),Object.defineProperty(yi[e],"labels",{value:r})}yi.rgb.hsl=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=i-a,s,l;switch(i){case a:{s=0;break}case t:{s=(r-n)/o;break}case r:{s=2+(n-t)/o;break}case n:{s=4+(t-r)/o;break}}s=Math.min(s*60,360),s<0&&(s+=360);let u=(a+i)/2;return i===a?l=0:u<=.5?l=o/(i+a):l=o/(2-i-a),[s,l*100,u*100]};yi.rgb.hsv=function(e){let t,r,n,a,i,o=e[0]/255,s=e[1]/255,l=e[2]/255,u=Math.max(o,s,l),c=u-Math.min(o,s,l),f=function(h){return(u-h)/6/c+1/2};if(c===0)a=0,i=0;else{switch(i=c/u,t=f(o),r=f(s),n=f(l),u){case o:{a=n-r;break}case s:{a=1/3+t-n;break}case l:{a=2/3+r-t;break}}a<0?a+=1:a>1&&(a-=1)}return[a*360,i*100,u*100]};yi.rgb.hwb=function(e){let t=e[0],r=e[1],n=e[2],a=yi.rgb.hsl(e)[0],i=1/255*Math.min(t,Math.min(r,n));return n=1-1/255*Math.max(t,Math.max(r,n)),[a,i*100,n*100]};yi.rgb.oklab=function(e){let t=mb(e[0]/255),r=mb(e[1]/255),n=mb(e[2]/255),a=Math.cbrt(.4122214708*t+.5363325363*r+.0514459929*n),i=Math.cbrt(.2119034982*t+.6806995451*r+.1073969566*n),o=Math.cbrt(.0883024619*t+.2817188376*r+.6299787005*n),s=.2104542553*a+.793617785*i-.0040720468*o,l=1.9779984951*a-2.428592205*i+.4505937099*o,u=.0259040371*a+.7827717662*i-.808675766*o;return[s*100,l*100,u*100]};yi.rgb.cmyk=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(1-t,1-r,1-n),i=(1-t-a)/(1-a)||0,o=(1-r-a)/(1-a)||0,s=(1-n-a)/(1-a)||0;return[i*100,o*100,s*100,a*100]};yi.rgb.keyword=function(e){let t=yK[e];if(t)return t;let r=Number.POSITIVE_INFINITY,n;for(let a of Object.keys(pb)){let i=pb[a],o=MKe(e,i);o_1?r**(1/3):7.787*r+16/116,n=n>_1?n**(1/3):7.787*n+16/116,a=a>_1?a**(1/3):7.787*a+16/116;let i=116*n-16,o=500*(r-n),s=200*(n-a);return[i,o,s]};yi.hsl.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,a,i;if(r===0)return i=n*255,[i,i,i];let o=n<.5?n*(1+r):n+r-n*r,s=2*n-o,l=[0,0,0];for(let u=0;u<3;u++)a=t+1/3*-(u-1),a<0&&a++,a>1&&a--,6*a<1?i=s+(o-s)*6*a:2*a<1?i=o:3*a<2?i=s+(o-s)*(2/3-a)*6:i=s,l[u]=i*255;return l};yi.hsl.hsv=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,a=r,i=Math.max(n,.01);n*=2,r*=n<=1?n:2-n,a*=i<=1?i:2-i;let o=(n+r)/2,s=n===0?2*a/(i+a):2*r/(n+r);return[t,s*100,o*100]};yi.hsv.rgb=function(e){let t=e[0]/60,r=e[1]/100,n=e[2]/100,a=Math.floor(t)%6,i=t-Math.floor(t),o=255*n*(1-r),s=255*n*(1-r*i),l=255*n*(1-r*(1-i));switch(n*=255,a){case 0:return[n,l,o];case 1:return[s,n,o];case 2:return[o,n,l];case 3:return[o,s,n];case 4:return[l,o,n];case 5:return[n,o,s]}};yi.hsv.hsl=function(e){let t=e[0],r=e[1]/100,n=e[2]/100,a=Math.max(n,.01),i,o;o=(2-r)*n;let s=(2-r)*a;return i=r*a,i/=s<=1?s:2-s,i=i||0,o/=2,[t,i*100,o*100]};yi.hwb.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100,a=r+n,i;a>1&&(r/=a,n/=a);let o=Math.floor(6*t),s=1-n;i=6*t-o,(o&1)!==0&&(i=1-i);let l=r+i*(s-r),u,c,f;switch(o){default:case 6:case 0:{u=s,c=l,f=r;break}case 1:{u=l,c=s,f=r;break}case 2:{u=r,c=s,f=l;break}case 3:{u=r,c=l,f=s;break}case 4:{u=l,c=r,f=s;break}case 5:{u=s,c=r,f=l;break}}return[u*255,c*255,f*255]};yi.cmyk.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,a=e[3]/100,i=1-Math.min(1,t*(1-a)+a),o=1-Math.min(1,r*(1-a)+a),s=1-Math.min(1,n*(1-a)+a);return[i*255,o*255,s*255]};yi.xyz.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,a,i,o;return a=t*3.2404542+r*-1.5371385+n*-.4985314,i=t*-.969266+r*1.8760108+n*.041556,o=t*.0556434+r*-.2040259+n*1.0572252,a=gb(a),i=gb(i),o=gb(o),[a*255,i*255,o*255]};yi.xyz.lab=function(e){let t=e[0],r=e[1],n=e[2];t/=95.047,r/=100,n/=108.883,t=t>_1?t**(1/3):7.787*t+16/116,r=r>_1?r**(1/3):7.787*r+16/116,n=n>_1?n**(1/3):7.787*n+16/116;let a=116*r-16,i=500*(t-r),o=200*(r-n);return[a,i,o]};yi.xyz.oklab=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,a=Math.cbrt(.8189330101*t+.3618667424*r-.1288597137*n),i=Math.cbrt(.0329845436*t+.9293118715*r+.0361456387*n),o=Math.cbrt(.0482003018*t+.2643662691*r+.633851707*n),s=.2104542553*a+.793617785*i-.0040720468*o,l=1.9779984951*a-2.428592205*i+.4505937099*o,u=.0259040371*a+.7827717662*i-.808675766*o;return[s*100,l*100,u*100]};yi.oklab.oklch=function(e){return yi.lab.lch(e)};yi.oklab.xyz=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,a=(.999999998*t+.396337792*r+.215803758*n)**3,i=(1.000000008*t-.105561342*r-.063854175*n)**3,o=(1.000000055*t-.089484182*r-1.291485538*n)**3,s=1.227013851*a-.55779998*i+.281256149*o,l=-.040580178*a+1.11225687*i-.071676679*o,u=-.076381285*a-.421481978*i+1.58616322*o;return[s*100,l*100,u*100]};yi.oklab.rgb=function(e){let t=e[0]/100,r=e[1]/100,n=e[2]/100,a=(t+.3963377774*r+.2158037573*n)**3,i=(t-.1055613458*r-.0638541728*n)**3,o=(t-.0894841775*r-1.291485548*n)**3,s=gb(4.0767416621*a-3.3077115913*i+.2309699292*o),l=gb(-1.2684380046*a+2.6097574011*i-.3413193965*o),u=gb(-.0041960863*a-.7034186147*i+1.707614701*o);return[s*255,l*255,u*255]};yi.oklch.oklab=function(e){return yi.lch.lab(e)};yi.lab.xyz=function(e){let t=e[0],r=e[1],n=e[2],a,i,o;i=(t+16)/116,a=r/500+i,o=i-n/200;let s=i**3,l=a**3,u=o**3;return i=s>_1?s:(i-16/116)/7.787,a=l>_1?l:(a-16/116)/7.787,o=u>_1?u:(o-16/116)/7.787,a*=95.047,i*=100,o*=108.883,[a,i,o]};yi.lab.lch=function(e){let t=e[0],r=e[1],n=e[2],a;a=Math.atan2(n,r)*360/2/Math.PI,a<0&&(a+=360);let o=Math.sqrt(r*r+n*n);return[t,o,a]};yi.lch.lab=function(e){let t=e[0],r=e[1],a=e[2]/360*2*Math.PI,i=r*Math.cos(a),o=r*Math.sin(a);return[t,i,o]};yi.rgb.ansi16=function(e,t=null){let[r,n,a]=e,i=t===null?yi.rgb.hsv(e)[2]:t;if(i=Math.round(i/50),i===0)return 30;let o=30+(Math.round(a/255)<<2|Math.round(n/255)<<1|Math.round(r/255));return i===2&&(o+=60),o};yi.hsv.ansi16=function(e){return yi.rgb.ansi16(yi.hsv.rgb(e),e[2])};yi.rgb.ansi256=function(e){let t=e[0],r=e[1],n=e[2];return t>>4===r>>4&&r>>4===n>>4?t<8?16:t>248?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(r/255*5)+Math.round(n/255*5)};yi.ansi16.rgb=function(e){e=e[0];let t=e%10;if(t===0||t===7)return e>50&&(t+=3.5),t=t/10.5*255,[t,t,t];let r=(Math.trunc(e>50)+1)*.5,n=(t&1)*r*255,a=(t>>1&1)*r*255,i=(t>>2&1)*r*255;return[n,a,i]};yi.ansi256.rgb=function(e){if(e=e[0],e>=232){let i=(e-232)*10+8;return[i,i,i]}e-=16;let t,r=Math.floor(e/36)/5*255,n=Math.floor((t=e%36)/6)/5*255,a=t%6/5*255;return[r,n,a]};yi.rgb.hex=function(e){let r=(((Math.round(e[0])&255)<<16)+((Math.round(e[1])&255)<<8)+(Math.round(e[2])&255)).toString(16).toUpperCase();return"000000".slice(r.length)+r};yi.hex.rgb=function(e){let t=e.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!t)return[0,0,0];let r=t[0];t[0].length===3&&(r=[...r].map(s=>s+s).join(""));let n=Number.parseInt(r,16),a=n>>16&255,i=n>>8&255,o=n&255;return[a,i,o]};yi.rgb.hcg=function(e){let t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.max(Math.max(t,r),n),i=Math.min(Math.min(t,r),n),o=a-i,s,l=o<1?i/(1-o):0;return o<=0?s=0:a===t?s=(r-n)/o%6:a===r?s=2+(n-t)/o:s=4+(t-r)/o,s/=6,s%=1,[s*360,o*100,l*100]};yi.hsl.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=r<.5?2*t*r:2*t*(1-r),a=0;return n<1&&(a=(r-.5*n)/(1-n)),[e[0],n*100,a*100]};yi.hsv.hcg=function(e){let t=e[1]/100,r=e[2]/100,n=t*r,a=0;return n<1&&(a=(r-n)/(1-n)),[e[0],n*100,a*100]};yi.hcg.rgb=function(e){let t=e[0]/360,r=e[1]/100,n=e[2]/100;if(r===0)return[n*255,n*255,n*255];let a=[0,0,0],i=t%1*6,o=i%1,s=1-o,l=0;switch(Math.floor(i)){case 0:{a[0]=1,a[1]=o,a[2]=0;break}case 1:{a[0]=s,a[1]=1,a[2]=0;break}case 2:{a[0]=0,a[1]=1,a[2]=o;break}case 3:{a[0]=0,a[1]=s,a[2]=1;break}case 4:{a[0]=o,a[1]=0,a[2]=1;break}default:a[0]=1,a[1]=0,a[2]=s}return l=(1-r)*n,[(r*a[0]+l)*255,(r*a[1]+l)*255,(r*a[2]+l)*255]};yi.hcg.hsv=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t),a=0;return n>0&&(a=t/n),[e[0],a*100,n*100]};yi.hcg.hsl=function(e){let t=e[1]/100,n=e[2]/100*(1-t)+.5*t,a=0;return n>0&&n<.5?a=t/(2*n):n>=.5&&n<1&&(a=t/(2*(1-n))),[e[0],a*100,n*100]};yi.hcg.hwb=function(e){let t=e[1]/100,r=e[2]/100,n=t+r*(1-t);return[e[0],(n-t)*100,(1-n)*100]};yi.hwb.hcg=function(e){let t=e[1]/100,n=1-e[2]/100,a=n-t,i=0;return a<1&&(i=(n-a)/(1-a)),[e[0],a*100,i*100]};yi.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]};yi.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]};yi.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]};yi.gray.hsl=function(e){return[0,0,e[0]]};yi.gray.hsv=yi.gray.hsl;yi.gray.hwb=function(e){return[0,100,e[0]]};yi.gray.cmyk=function(e){return[0,0,0,e[0]]};yi.gray.lab=function(e){return[e[0],0,0]};yi.gray.hex=function(e){let t=Math.round(e[0]/100*255)&255,n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".slice(n.length)+n};yi.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}});function SKe(){let e={},t=Object.keys(w1);for(let{length:r}=t,n=0;n0;){let n=r.pop(),a=Object.keys(w1[n]);for(let{length:i}=a,o=0;o{bD();xK=LKe});function PKe(e){let t=function(...r){let n=r[0];return n==null?n:(n.length>1&&(r=n),e(r))};return"conversion"in e&&(t.conversion=e.conversion),t}function DKe(e){let t=function(...r){let n=r[0];if(n==null)return n;n.length>1&&(r=n);let a=e(r);if(typeof a=="object")for(let{length:i}=a,o=0;o{bD();bK();yb={},FKe=Object.keys(w1);for(let e of FKe){yb[e]={},Object.defineProperty(yb[e],"channels",{value:w1[e].channels}),Object.defineProperty(yb[e],"labels",{value:w1[e].labels});let t=xK(e),r=Object.keys(t);for(let n of r){let a=t[n];yb[e][n]=DKe(a),yb[e][n].raw=PKe(a)}}Od=yb});var TK={};E0(TK,{default:()=>qKe});function gh(e,t){if(!(this instanceof gh))return new gh(e,t);if(t&&t in wK&&(t=null),t&&!(t in Od))throw new Error("Unknown model: "+t);let r,n;if(e==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(e instanceof gh)this.model=e.model,this.color=[...e.color],this.valpha=e.valpha;else if(typeof e=="string"){let a=Py.get(e);if(a===null)throw new Error("Unable to parse color from string: "+e);this.model=a.model,n=Od[this.model].channels,this.color=a.value.slice(0,n),this.valpha=typeof a.value[n]=="number"?a.value[n]:1}else if(e.length>0){this.model=t||"rgb",n=Od[this.model].channels;let a=Array.prototype.slice.call(e,0,n);this.color=wD(a,n),this.valpha=typeof e[n]=="number"?e[n]:1}else if(typeof e=="number")this.model="rgb",this.color=[e>>16&255,e>>8&255,e&255],this.valpha=1;else{this.valpha=1;let a=Object.keys(e);"alpha"in e&&(a.splice(a.indexOf("alpha"),1),this.valpha=typeof e.alpha=="number"?e.alpha:0);let i=a.sort().join("");if(!(i in _D))throw new Error("Unable to parse color from object: "+JSON.stringify(e));this.model=_D[i];let{labels:o}=Od[this.model],s=[];for(r=0;r{gK();_K();wK=["keyword","gray","hex"],_D={};for(let e of Object.keys(Od))_D[[...Od[e].labels].sort().join("")]=e;M5={};gh.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(e){let t=this.model in Py.to?this:this.rgb();t=t.round(typeof e=="number"?e:1);let r=t.valpha===1?t.color:[...t.color,this.valpha];return Py.to[t.model](...r)},percentString(e){let t=this.rgb().round(typeof e=="number"?e:1),r=t.valpha===1?t.color:[...t.color,this.valpha];return Py.to.rgb.percent(...r)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let e={},{channels:t}=Od[this.model],{labels:r}=Od[this.model];for(let n=0;n(e%360+360)%360),saturationl:Rc("hsl",1,jf(100)),lightness:Rc("hsl",2,jf(100)),saturationv:Rc("hsv",1,jf(100)),value:Rc("hsv",2,jf(100)),chroma:Rc("hcg",1,jf(100)),gray:Rc("hcg",2,jf(100)),white:Rc("hwb",1,jf(100)),wblack:Rc("hwb",2,jf(100)),cyan:Rc("cmyk",0,jf(100)),magenta:Rc("cmyk",1,jf(100)),yellow:Rc("cmyk",2,jf(100)),black:Rc("cmyk",3,jf(100)),x:Rc("xyz",0,jf(95.047)),y:Rc("xyz",1,jf(100)),z:Rc("xyz",2,jf(108.833)),l:Rc("lab",0,jf(100)),a:Rc("lab",1),b:Rc("lab",2),keyword(e){return e!==void 0?new gh(e):Od[this.model].keyword(this.color)},hex(e){return e!==void 0?new gh(e):Py.to.hex(...this.rgb().round().color)},hexa(e){if(e!==void 0)return new gh(e);let t=this.rgb().round().color,r=Math.round(this.valpha*255).toString(16).toUpperCase();return r.length===1&&(r="0"+r),Py.to.hex(...t)+r},rgbNumber(){let e=this.rgb().color;return(e[0]&255)<<16|(e[1]&255)<<8|e[2]&255},luminosity(){let e=this.rgb().color,t=[];for(let[r,n]of e.entries()){let a=n/255;t[r]=a<=.04045?a/12.92:((a+.055)/1.055)**2.4}return .2126*t[0]+.7152*t[1]+.0722*t[2]},contrast(e){let t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level(e){let t=this.contrast(e);return t>=7?"AAA":t>=4.5?"AA":""},isDark(){let e=this.rgb().color;return(e[0]*2126+e[1]*7152+e[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let e=this.rgb();for(let t=0;t<3;t++)e.color[t]=255-e.color[t];return e},lighten(e){let t=this.hsl();return t.color[2]+=t.color[2]*e,t},darken(e){let t=this.hsl();return t.color[2]-=t.color[2]*e,t},saturate(e){let t=this.hsl();return t.color[1]+=t.color[1]*e,t},desaturate(e){let t=this.hsl();return t.color[1]-=t.color[1]*e,t},whiten(e){let t=this.hwb();return t.color[1]+=t.color[1]*e,t},blacken(e){let t=this.hwb();return t.color[2]+=t.color[2]*e,t},grayscale(){let e=this.rgb().color,t=e[0]*.3+e[1]*.59+e[2]*.11;return gh.rgb(t,t,t)},fade(e){return this.alpha(this.valpha-this.valpha*e)},opaquer(e){return this.alpha(this.valpha+this.valpha*e)},rotate(e){let t=this.hsl(),r=t.color[0];return r=(r+e)%360,r=r<0?360+r:r,t.color[0]=r,t},mix(e,t){if(!e||!e.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof e);let r=e.rgb(),n=this.rgb(),a=t===void 0?.5:t,i=2*a-1,o=r.alpha()-n.alpha(),s=((i*o===-1?i:(i+o)/(1+i*o))+1)/2,l=1-s;return gh.rgb(s*r.red()+l*n.red(),s*r.green()+l*n.green(),s*r.blue()+l*n.blue(),r.alpha()*a+n.alpha()*(1-a))}};for(let e of Object.keys(Od)){if(wK.includes(e))continue;let{channels:t}=Od[e];gh.prototype[e]=function(...r){return this.model===e?new gh(this):r.length>0?new gh(r,e):new gh([...zKe(Od[this.model][e].raw(this.color)),this.valpha],e)},gh[e]=function(...r){let n=r[0];return typeof n=="number"&&(n=wD(r,t)),new gh(n,e)}}qKe=gh});var Dy=ne((dJt,kK)=>{"use strict";var MK={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},SK={};function EK(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),EK(n,t[r]))}}EK(MK,SK);kK.exports={configAttributes:MK,dfltConfig:SK}});var AD=ne((vJt,CK)=>{"use strict";var TD=Ea(),BKe=mi(),S5=[];CK.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||S5.indexOf(e)!==-1)return;S5.push(e);var n=1e3;BKe(t)?n=t:t==="long"&&(n=3e3);var a=TD.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(S5);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=S5.indexOf(u);c!==-1&&S5.splice(c,1),TD.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=TD.select(this);u.append("button").classed("notifier-close",!0).html("×").on("click",function(){u.transition().call(o)});for(var c=u.append("p"),f=l.split(//g),h=0;h{"use strict";var xb=Dy().dfltConfig,MD=AD(),SD=LK.exports={};SD.log=function(){var e;if(xb.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};SD.warn=function(){var e;if(xb.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};SD.error=function(){var e;if(xb.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var Ic=ne(Ry=>{"use strict";Ry.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];Ry.defaultLine="#444";Ry.lightLine="#eee";Ry.background="#fff";Ry.borderLine="#BEC8D9";Ry.lightFraction=1e3/11});var _a=ne((mJt,DK)=>{"use strict";var ED=(AK(),vl(TK)).default,{warn:OKe}=T1(),{background:LM,defaultLine:FK,defaults:NKe,lightLine:UKe}=Ic(),lu=e=>{typeof e=="string"&&(e=e.trim());try{return ED(e)}catch(t){return OKe(`Invalid color specifier: "${e}". Defaulting to "#000"`),ED("#000")}},CD=e=>{let{r:t,g:r,b:n}=lu(e).rgb().object();return`rgb(${Math.round(t)}, ${Math.round(r)}, ${Math.round(n)})`},VKe=e=>e?lu(e).alpha():0,GKe=(e,t)=>{let r=lu(e).rgb().object();return`rgba(${Math.round(r.r)}, ${Math.round(r.g)}, ${Math.round(r.b)}, ${t})`},PK=(e,t)=>{var o,s;t||(t=LM);let r=lu(e).rgb().object();if((o=r.alpha)!=null||(r.alpha=1),r.alpha===1)return lu(e).rgb().string();let n=lu(t).rgb().object();(s=n.alpha)!=null||(n.alpha=1);let a=n.alpha===1?n:{r:255*(1-n.alpha)+n.r*n.alpha,g:255*(1-n.alpha)+n.g*n.alpha,b:255*(1-n.alpha)+n.b*n.alpha},i={r:a.r*(1-r.alpha)+r.r*r.alpha,g:a.g*(1-r.alpha)+r.g*r.alpha,b:a.b*(1-r.alpha)+r.b*r.alpha};return lu(i).rgb().string()},HKe=(e,t,r)=>{let n=lu(e).rgb().object(),a=lu(t).rgb().object(),i={r:r*n.r+(1-r)*a.r,g:r*n.g+(1-r)*a.g,b:r*n.b+(1-r)*a.b};return lu(i).rgb().string()},kD=(e,t)=>{let r=lu(e);return r.lightness(r.lightness()+t)},jKe=(e,t,r)=>{let n=lu(e);return n.alpha()!==1&&(n=lu(PK(e,LM))),(n.isDark()?t?kD(n,t):lu(LM):r?kD(n,-r):lu(FK)).rgb().string()},WKe=(e,t)=>{let r=lu(t);e.style({stroke:CD(t),"stroke-opacity":r.alpha()})},YKe=(e,t)=>{let r=lu(t);e.style({fill:CD(t),"fill-opacity":r.alpha()})},XKe=(e,t)=>!!(e&&t&&lu(e).rgb().string()===lu(t).rgb().string()),ZKe=e=>{if(typeof e!="string")return!1;try{return!!ED(e.trim())}catch(t){return!1}},$Ke=(e,t)=>{var a;t=t===0?0:t||10;let r=lu(e).rgb().object(),n=Math.round(255*(t/100));return lu({r:Math.max(0,Math.min(255,r.r+n)),g:Math.max(0,Math.min(255,r.g+n)),b:Math.max(0,Math.min(255,r.b+n))}).alpha((a=r.alpha)!=null?a:1).rgb().string()},KKe=(e,t,r)=>lu(e).mix(lu(t),r/100).rgb().string(),JKe=(e,t=["#000","#fff"])=>{let r,n=-1/0;for(let a of t){let i=lu(e).contrast(lu(a));i>n&&(n=i,r=lu(a).rgb().string())}return r};DK.exports={addOpacity:GKe,adjustLightness:kD,background:LM,brighten:$Ke,color:lu,combine:PK,contrast:jKe,defaultLine:FK,defaults:NKe,equals:XKe,fill:YKe,interpolate:HKe,isValid:ZKe,lightLine:UKe,mix:KKe,mostReadable:JKe,opacity:VKe,rgb:CD,stroke:WKe}});var Iy=ne((yJt,zK)=>{"use strict";var QKe=_a(),FM={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},RK=FM.RdBu;function eJe(e,t){if(t||(t=RK),!e)return t;function r(){try{e=FM[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),IK(e)?e:t}function IK(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r{"use strict";qK.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var bb={};E0(bb,{counter:()=>rJe});function rJe(e,t="",r,n){let a=t+(r?"":"$"),i=n===!1?"":"^";return e==="xy"?new RegExp(i+"x"+LD+"y"+LD+a):new RegExp(i+e+LD+a)}var LD,_b=lo(()=>{"use strict";LD="([2-9]|[1-9][0-9]+)?"});var NK=ne(Nd=>{"use strict";var FD=mi(),BK=ci().extendFlat,nJe=os(),aJe=Iy(),PD=_a(),iJe=A1().DESELECTDIM,wb=m5(),OK=(_b(),vl(bb)).counter,oJe=(hb(),vl(fb)).modHalf,C0=Ih().isArrayOrTypedArray,Dg=Ih().isTypedArraySpec,Rg=Ih().decodeTypedArraySpec;Nd.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(C0(e)?e:Dg(e)?Rg(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;ni===!0||i===!1;a(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){Dg(e)&&(e=Rg(e)),!FD(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}Dg(e)&&(e=Rg(e)),e%1||!FD(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!="string"){var a=typeof e=="number";n.strict===!0||!a?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){Dg(e)&&(e=Rg(e)),PD.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){!Array.isArray(e)||!e.length?t.set(r):e.every(n=>PD.isValid(n))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(aJe.get(e,r))}},angle:{coerceFunction:function(e,t,r){Dg(e)&&(e=Rg(e)),e==="auto"?t.set("auto"):FD(e)?t.set(oJe(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||OK(r);let i=o=>typeof o=="string"&&a.test(o);i(e)||n.arrayOk&&C0(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!OK(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var a=e.split("+"),i=0;i{"use strict";UK.exports=function(){}});var DD=ne((wJt,VK)=>{"use strict";VK.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),a=0;a{GK.exports=sJe;function sJe(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var WK=ne((AJt,jK)=>{jK.exports=lJe;function lJe(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}});var XK=ne((MJt,YK)=>{YK.exports=uJe;function uJe(e,t){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}});var RD=ne((SJt,ZK)=>{ZK.exports=cJe;function cJe(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var KK=ne((EJt,$K)=>{$K.exports=fJe;function fJe(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var QK=ne((kJt,JK)=>{JK.exports=hJe;function hJe(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],v=t[11],d=t[12],m=t[13],x=t[14],g=t[15],E=r*s-n*o,M=r*l-a*o,w=r*u-i*o,k=n*l-a*s,y=n*u-i*s,S=a*u-i*l,T=c*m-f*d,p=c*x-h*d,C=c*g-v*d,A=f*x-h*m,P=f*g-v*m,D=h*g-v*x,z=E*D-M*P+w*A+k*C-y*p+S*T;return z?(z=1/z,e[0]=(s*D-l*P+u*A)*z,e[1]=(a*P-n*D-i*A)*z,e[2]=(m*S-x*y+g*k)*z,e[3]=(h*y-f*S-v*k)*z,e[4]=(l*C-o*D-u*p)*z,e[5]=(r*D-a*C+i*p)*z,e[6]=(x*w-d*S-g*M)*z,e[7]=(c*S-h*w+v*M)*z,e[8]=(o*P-s*C+u*T)*z,e[9]=(n*C-r*P-i*T)*z,e[10]=(d*y-m*w+g*E)*z,e[11]=(f*w-c*y-v*E)*z,e[12]=(s*p-o*A-l*T)*z,e[13]=(r*A-n*p+a*T)*z,e[14]=(m*M-d*k-x*E)*z,e[15]=(c*k-f*M+h*E)*z,e):null}});var tJ=ne((CJt,eJ)=>{eJ.exports=dJe;function dJe(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],h=t[10],v=t[11],d=t[12],m=t[13],x=t[14],g=t[15];return e[0]=s*(h*g-v*x)-f*(l*g-u*x)+m*(l*v-u*h),e[1]=-(n*(h*g-v*x)-f*(a*g-i*x)+m*(a*v-i*h)),e[2]=n*(l*g-u*x)-s*(a*g-i*x)+m*(a*u-i*l),e[3]=-(n*(l*v-u*h)-s*(a*v-i*h)+f*(a*u-i*l)),e[4]=-(o*(h*g-v*x)-c*(l*g-u*x)+d*(l*v-u*h)),e[5]=r*(h*g-v*x)-c*(a*g-i*x)+d*(a*v-i*h),e[6]=-(r*(l*g-u*x)-o*(a*g-i*x)+d*(a*u-i*l)),e[7]=r*(l*v-u*h)-o*(a*v-i*h)+c*(a*u-i*l),e[8]=o*(f*g-v*m)-c*(s*g-u*m)+d*(s*v-u*f),e[9]=-(r*(f*g-v*m)-c*(n*g-i*m)+d*(n*v-i*f)),e[10]=r*(s*g-u*m)-o*(n*g-i*m)+d*(n*u-i*s),e[11]=-(r*(s*v-u*f)-o*(n*v-i*f)+c*(n*u-i*s)),e[12]=-(o*(f*x-h*m)-c*(s*x-l*m)+d*(s*h-l*f)),e[13]=r*(f*x-h*m)-c*(n*x-a*m)+d*(n*h-a*f),e[14]=-(r*(s*x-l*m)-o*(n*x-a*m)+d*(n*l-a*s)),e[15]=r*(s*h-l*f)-o*(n*h-a*f)+c*(n*l-a*s),e}});var nJ=ne((LJt,rJ)=>{rJ.exports=vJe;function vJe(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],h=e[11],v=e[12],d=e[13],m=e[14],x=e[15],g=t*o-r*i,E=t*s-n*i,M=t*l-a*i,w=r*s-n*o,k=r*l-a*o,y=n*l-a*s,S=u*d-c*v,T=u*m-f*v,p=u*x-h*v,C=c*m-f*d,A=c*x-h*d,P=f*x-h*m;return g*P-E*A+M*C+w*p-k*T+y*S}});var iJ=ne((FJt,aJ)=>{aJ.exports=pJe;function pJe(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],h=t[9],v=t[10],d=t[11],m=t[12],x=t[13],g=t[14],E=t[15],M=r[0],w=r[1],k=r[2],y=r[3];return e[0]=M*n+w*s+k*f+y*m,e[1]=M*a+w*l+k*h+y*x,e[2]=M*i+w*u+k*v+y*g,e[3]=M*o+w*c+k*d+y*E,M=r[4],w=r[5],k=r[6],y=r[7],e[4]=M*n+w*s+k*f+y*m,e[5]=M*a+w*l+k*h+y*x,e[6]=M*i+w*u+k*v+y*g,e[7]=M*o+w*c+k*d+y*E,M=r[8],w=r[9],k=r[10],y=r[11],e[8]=M*n+w*s+k*f+y*m,e[9]=M*a+w*l+k*h+y*x,e[10]=M*i+w*u+k*v+y*g,e[11]=M*o+w*c+k*d+y*E,M=r[12],w=r[13],k=r[14],y=r[15],e[12]=M*n+w*s+k*f+y*m,e[13]=M*a+w*l+k*h+y*x,e[14]=M*i+w*u+k*v+y*g,e[15]=M*o+w*c+k*d+y*E,e}});var sJ=ne((PJt,oJ)=>{oJ.exports=gJe;function gJe(e,t,r){var n=r[0],a=r[1],i=r[2],o,s,l,u,c,f,h,v,d,m,x,g;return t===e?(e[12]=t[0]*n+t[4]*a+t[8]*i+t[12],e[13]=t[1]*n+t[5]*a+t[9]*i+t[13],e[14]=t[2]*n+t[6]*a+t[10]*i+t[14],e[15]=t[3]*n+t[7]*a+t[11]*i+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],h=t[6],v=t[7],d=t[8],m=t[9],x=t[10],g=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=h,e[7]=v,e[8]=d,e[9]=m,e[10]=x,e[11]=g,e[12]=o*n+c*a+d*i+t[12],e[13]=s*n+f*a+m*i+t[13],e[14]=l*n+h*a+x*i+t[14],e[15]=u*n+v*a+g*i+t[15]),e}});var uJ=ne((DJt,lJ)=>{lJ.exports=mJe;function mJe(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var fJ=ne((RJt,cJ)=>{cJ.exports=yJe;function yJe(e,t,r,n){var a=n[0],i=n[1],o=n[2],s=Math.sqrt(a*a+i*i+o*o),l,u,c,f,h,v,d,m,x,g,E,M,w,k,y,S,T,p,C,A,P,D,z,q;return Math.abs(s)<1e-6?null:(s=1/s,a*=s,i*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],h=t[1],v=t[2],d=t[3],m=t[4],x=t[5],g=t[6],E=t[7],M=t[8],w=t[9],k=t[10],y=t[11],S=a*a*c+u,T=i*a*c+o*l,p=o*a*c-i*l,C=a*i*c-o*l,A=i*i*c+u,P=o*i*c+a*l,D=a*o*c+i*l,z=i*o*c-a*l,q=o*o*c+u,e[0]=f*S+m*T+M*p,e[1]=h*S+x*T+w*p,e[2]=v*S+g*T+k*p,e[3]=d*S+E*T+y*p,e[4]=f*C+m*A+M*P,e[5]=h*C+x*A+w*P,e[6]=v*C+g*A+k*P,e[7]=d*C+E*A+y*P,e[8]=f*D+m*z+M*q,e[9]=h*D+x*z+w*q,e[10]=v*D+g*z+k*q,e[11]=d*D+E*z+y*q,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var dJ=ne((IJt,hJ)=>{hJ.exports=xJe;function xJe(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+u*n,e[5]=o*a+c*n,e[6]=s*a+f*n,e[7]=l*a+h*n,e[8]=u*a-i*n,e[9]=c*a-o*n,e[10]=f*a-s*n,e[11]=h*a-l*n,e}});var pJ=ne((zJt,vJ)=>{vJ.exports=bJe;function bJe(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],h=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-u*n,e[1]=o*a-c*n,e[2]=s*a-f*n,e[3]=l*a-h*n,e[8]=i*n+u*a,e[9]=o*n+c*a,e[10]=s*n+f*a,e[11]=l*n+h*a,e}});var mJ=ne((qJt,gJ)=>{gJ.exports=_Je;function _Je(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],h=t[7];return t!==e&&(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[0]=i*a+u*n,e[1]=o*a+c*n,e[2]=s*a+f*n,e[3]=l*a+h*n,e[4]=u*a-i*n,e[5]=c*a-o*n,e[6]=f*a-s*n,e[7]=h*a-l*n,e}});var xJ=ne((BJt,yJ)=>{yJ.exports=wJe;function wJe(e,t,r){var n,a,i,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),a=Math.cos(t),i=1-a,e[0]=o*o*i+a,e[1]=s*o*i+l*n,e[2]=l*o*i-s*n,e[3]=0,e[4]=o*s*i-l*n,e[5]=s*s*i+a,e[6]=l*s*i+o*n,e[7]=0,e[8]=o*l*i+s*n,e[9]=s*l*i-o*n,e[10]=l*l*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var _J=ne((OJt,bJ)=>{bJ.exports=TJe;function TJe(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=n+n,l=a+a,u=i+i,c=n*s,f=n*l,h=n*u,v=a*l,d=a*u,m=i*u,x=o*s,g=o*l,E=o*u;return e[0]=1-(v+m),e[1]=f+E,e[2]=h-g,e[3]=0,e[4]=f-E,e[5]=1-(c+m),e[6]=d+x,e[7]=0,e[8]=h+g,e[9]=d-x,e[10]=1-(c+v),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var TJ=ne((NJt,wJ)=>{wJ.exports=AJe;function AJe(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var MJ=ne((UJt,AJ)=>{AJ.exports=MJe;function MJe(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var EJ=ne((VJt,SJ)=>{SJ.exports=SJe;function SJe(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var CJ=ne((GJt,kJ)=>{kJ.exports=EJe;function EJe(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var FJ=ne((HJt,LJ)=>{LJ.exports=kJe;function kJe(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var DJ=ne((jJt,PJ)=>{PJ.exports=CJe;function CJe(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,s=n+n,l=a+a,u=r*o,c=n*o,f=n*s,h=a*o,v=a*s,d=a*l,m=i*o,x=i*s,g=i*l;return e[0]=1-f-d,e[1]=c+g,e[2]=h-x,e[3]=0,e[4]=c-g,e[5]=1-u-d,e[6]=v+m,e[7]=0,e[8]=h+x,e[9]=v-m,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var IJ=ne((WJt,RJ)=>{RJ.exports=LJe;function LJe(e,t,r,n,a,i,o){var s=1/(r-t),l=1/(a-n),u=1/(i-o);return e[0]=i*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(a+n)*l,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var qJ=ne((YJt,zJ)=>{zJ.exports=FJe;function FJe(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}});var OJ=ne((XJt,BJ)=>{BJ.exports=PJe;function PJe(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(a+i);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(a-i)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var UJ=ne((ZJt,NJ)=>{NJ.exports=DJe;function DJe(e,t,r,n,a,i,o){var s=1/(t-r),l=1/(n-a),u=1/(i-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(a+n)*l,e[14]=(o+i)*u,e[15]=1,e}});var GJ=ne(($Jt,VJ)=>{var RJe=RD();VJ.exports=IJe;function IJe(e,t,r,n){var a,i,o,s,l,u,c,f,h,v,d=t[0],m=t[1],x=t[2],g=n[0],E=n[1],M=n[2],w=r[0],k=r[1],y=r[2];return Math.abs(d-w)<1e-6&&Math.abs(m-k)<1e-6&&Math.abs(x-y)<1e-6?RJe(e):(c=d-w,f=m-k,h=x-y,v=1/Math.sqrt(c*c+f*f+h*h),c*=v,f*=v,h*=v,a=E*h-M*f,i=M*c-g*h,o=g*f-E*c,v=Math.sqrt(a*a+i*i+o*o),v?(v=1/v,a*=v,i*=v,o*=v):(a=0,i=0,o=0),s=f*o-h*i,l=h*a-c*o,u=c*i-f*a,v=Math.sqrt(s*s+l*l+u*u),v?(v=1/v,s*=v,l*=v,u*=v):(s=0,l=0,u=0),e[0]=a,e[1]=s,e[2]=c,e[3]=0,e[4]=i,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=h,e[11]=0,e[12]=-(a*d+i*m+o*x),e[13]=-(s*d+l*m+u*x),e[14]=-(c*d+f*m+h*x),e[15]=1,e)}});var jJ=ne((KJt,HJ)=>{HJ.exports=zJe;function zJe(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}});var ID=ne((JJt,WJ)=>{WJ.exports={create:HK(),clone:WK(),copy:XK(),identity:RD(),transpose:KK(),invert:QK(),adjoint:tJ(),determinant:nJ(),multiply:iJ(),translate:sJ(),scale:uJ(),rotate:fJ(),rotateX:dJ(),rotateY:pJ(),rotateZ:mJ(),fromRotation:xJ(),fromRotationTranslation:_J(),fromScaling:TJ(),fromTranslation:MJ(),fromXRotation:EJ(),fromYRotation:CJ(),fromZRotation:FJ(),fromQuat:DJ(),frustum:IJ(),perspective:qJ(),perspectiveFromFieldOfView:OJ(),ortho:UJ(),lookAt:GJ(),str:jJ()}});var RM=ne(lc=>{"use strict";var qJe=ID();lc.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var BJe=Ea(),YJ=T1(),OJe=RM(),NJe=ID();function UJe(e){var t;if(typeof e=="string"){if(t=document.getElementById(e),t===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function VJe(e){var t=BJe.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function XJ(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function GJe(e,t){ZJ("global",e,t)}function ZJ(e,t,r){var n="plotly.js-style-"+e,a=document.getElementById(n);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var i=a.sheet;i?i.insertRule?i.insertRule(t+"{"+r+"}",0):i.addRule?i.addRule(t,r,0):YJ.warn("addStyleRule failed"):YJ.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function HJe(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&XJ(r)}function jJe(e,t,r,n,a,i){var o=n.split(":"),s=a.split(":"),l="data-btn-style-event-added";i||(i=document),i.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function WJe(e){var t=KJ(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var a=$J(n);if(a){var i=OJe.convertCssMatrix(a);r=NJe.multiply(r,r,i)}}),r}function $J(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function KJ(e){for(var t=[];YJe(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function YJe(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function XJe(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}JJ.exports={getGraphDiv:UJe,isPlotDiv:VJe,removeElement:XJ,addStyleRule:GJe,addRelatedStyleRule:ZJ,deleteRelatedStyleRule:HJe,setStyleOnHover:jJe,getFullTransformMatrix:WJe,getElementTransformMatrix:$J,getElementAndAncestors:KJ,equalDomRects:XJe}});var k5=ne((tQt,QJ)=>{"use strict";QJ.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var Il=ne((rQt,oQ)=>{"use strict";var tQ=ci().extendFlat,ZJe=Lg(),rQ={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},nQ={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},$Je=rQ.flags.slice().concat(["fullReplot"]),KJe=nQ.flags.slice().concat("layoutReplot");oQ.exports={traces:rQ,layout:nQ,traceFlags:function(){return eQ($Je)},layoutFlags:function(){return eQ(KJe)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),a=0;a{"use strict";zD.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};zD.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}});var qD=ne((aQt,sQ)=>{"use strict";sQ.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}});var rs=ne(Tb=>{"use strict";var{DATE_FORMAT_LINK:JJe,FORMAT_LINK:QJe}=qD(),eQe=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function tQe({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,QJe,"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}".`,JJe,"for details on the date formatting syntax.",eQe].join(" ")}Tb.templateFormatStringDescription=tQe;Tb.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>uv({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Tb.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>uv({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Tb.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});Tb.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var qM=ne((sQt,dQ)=>{"use strict";function Ig(e,t){return t?t.d2l(e):e}function lQ(e,t){return t?t.l2d(e):e}function rQe(e){return e.x0}function nQe(e){return e.x1}function aQe(e){return e.y0}function iQe(e){return e.y1}function uQ(e){return e.x0shift||0}function cQ(e){return e.x1shift||0}function fQ(e){return e.y0shift||0}function hQ(e){return e.y1shift||0}function IM(e,t){return Ig(e.x1,t)+cQ(e)-Ig(e.x0,t)-uQ(e)}function zM(e,t,r){return Ig(e.y1,r)+hQ(e)-Ig(e.y0,r)-fQ(e)}function oQe(e,t){return Math.abs(IM(e,t))}function sQe(e,t,r){return Math.abs(zM(e,t,r))}function lQe(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(IM(e,t),2)+Math.pow(zM(e,t,r),2))}function uQe(e,t){return lQ((Ig(e.x1,t)+cQ(e)+Ig(e.x0,t)+uQ(e))/2,t)}function cQe(e,t,r){return lQ((Ig(e.y1,r)+hQ(e)+Ig(e.y0,r)+fQ(e))/2,r)}function fQe(e,t,r){return e.type!=="line"?void 0:zM(e,t,r)/IM(e,t)}var hQe=["x0","x1","y0","y1","dy","height","ycenter"],dQe=["x0","x1","y0","y1","dx","width","xcenter"];dQ.exports={x0:rQe,x1:nQe,y0:aQe,y1:iQe,slope:fQe,dx:IM,dy:zM,width:oQe,height:sQe,length:lQe,xcenter:uQe,ycenter:cQe,simpleXVariables:hQe,simpleYVariables:dQe}});var gQ=ne((lQt,pQ)=>{"use strict";var vQe=Il().overrideAll,zy=os(),vQ=pl(),pQe=xf().dash,zg=ci().extendFlat,{shapeTexttemplateAttrs:gQe,templatefallbackAttrs:mQe}=rs(),yQe=qM();pQ.exports=vQe({newshape:{visible:zg({},zy.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:zg({},zy.legend,{}),legendgroup:zg({},zy.legendgroup,{}),legendgrouptitle:{text:zg({},zy.legendgrouptitle.text,{}),font:vQ({})},legendrank:zg({},zy.legendrank,{}),legendwidth:zg({},zy.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:zg({},pQe,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:zg({},zy.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:gQe({newshape:!0},{keys:Object.keys(yQe)}),texttemplatefallback:mQe({editType:"arraydraw"}),font:vQ({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var yQ=ne((uQt,mQ)=>{"use strict";var xQe=xf().dash,bQe=ci().extendFlat;mQ.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:bQe({},xQe,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}});var BM=ne((cQt,xQ)=>{"use strict";xQ.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var Ab=ne((fQt,TQ)=>{"use strict";var BD=pl(),_Qe=k5(),OM=Ic(),bQ=gQ(),_Q=yQ(),wQe=BM(),wQ=ci().extendFlat,NM=BD({editType:"calc"});NM.family.dflt='"Open Sans", verdana, arial, sans-serif';NM.size.dflt=12;NM.color.dflt=OM.defaultLine;TQ.exports={font:NM,title:{text:{valType:"string",editType:"layoutstyle"},font:BD({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:BD({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:wQ(wQe({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:OM.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:OM.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:OM.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:bQ.newshape,activeshape:bQ.activeshape,newselection:_Q.newselection,activeselection:_Q.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:wQ({},_Qe.transition,{editType:"none"})}});var AQ=ne(()=>{(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var e=document.createElement("style");e.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var Fa=ne(So=>{"use strict";var OD=T1(),MQ=DM(),SQ=DD(),vQt=E5().addStyleRule,EQ=ci(),TQe=os(),AQe=Ab(),MQe=EQ.extendFlat,ND=EQ.extendDeepAll;So.modules={};So.allCategories={};So.allTypes=[];So.subplotsRegistry={};So.componentsRegistry={};So.layoutArrayContainers=[];So.layoutArrayRegexes=[];So.traceLayoutAttributes={};So.localeRegistry={};So.apiMethodRegistry={};So.collectableSubplotTypes=null;So.register=function(t){if(So.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r{"use strict";var LQe=ub().timeFormat,BQ=mi(),UD=T1(),Bg=(hb(),vl(fb)).mod,Eb=uo(),Iv=Eb.BADNUM,Ud=Eb.ONEDAY,C5=Eb.ONEHOUR,qg=Eb.ONEMIN,Sb=Eb.ONESEC,L5=Eb.EPOCHJD,M1=Fa(),PQ=ub().utcFormat,FQe=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,PQe=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,DQ=new Date().getFullYear()-70;function S1(e){return e&&M1.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}uc.dateTick0=function(e,t){var r=DQe(e,!!t);if(t<2)return r;var n=uc.dateTime2ms(r,e);return n+=Ud*(t-1),uc.ms2DateTime(n,0,e)};function DQe(e,t){return S1(e)?t?M1.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:M1.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}uc.dfltRange=function(e){return S1(e)?M1.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};uc.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var VM,GM;uc.dateTime2ms=function(e,t){if(uc.isJSDate(e)){var r=e.getTimezoneOffset()*qg,n=(e.getUTCMinutes()-e.getMinutes())*qg+(e.getUTCSeconds()-e.getSeconds())*Sb+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var a=3*qg;r=r-a/2+Bg(n-r+a/2,a)}return e=Number(e)-r,e>=VM&&e<=GM?e:Iv}if(typeof e!="string"&&typeof e!="number")return Iv;e=String(e);var i=S1(t),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=i&&t.slice(0,7)==="chinese",l=e.match(s?PQe:FQe);if(!l)return Iv;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),h=Number(l[7]||0),v=Number(l[9]||0),d=Number(l[11]||0);if(i){if(u.length===2)return Iv;u=Number(u);var m;try{var x=M1.getComponentMethod("calendars","getCal")(t);if(s){var g=c.charAt(c.length-1)==="i";c=parseInt(c,10),m=x.newDate(u,x.toMonthIndex(u,c,g),f)}else m=x.newDate(u,Number(c),f)}catch(M){return Iv}return m?(m.toJD()-L5)*Ud+h*C5+v*qg+d*Sb:Iv}u.length===2?u=(Number(u)+2e3-DQ)%100+DQ:u=Number(u),c-=1;var E=new Date(Date.UTC(2e3,c,f,h,v));return E.setUTCFullYear(u),E.getUTCMonth()!==c||E.getUTCDate()!==f?Iv:E.getTime()+d*Sb};VM=uc.MIN_MS=uc.dateTime2ms("-9999");GM=uc.MAX_MS=uc.dateTime2ms("9999-12-31 23:59:59.9999");uc.isDateTime=function(e,t){return uc.dateTime2ms(e,t)!==Iv};function Mb(e,t){return String(e+Math.pow(10,t)).slice(1)}var UM=90*Ud,RQ=3*C5,IQ=5*qg;uc.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=VM&&e<=GM))return Iv;t||(t=0);var n=Math.floor(Bg(e+.05,1)*10),a=Math.round(e-n/10),i,o,s,l,u,c;if(S1(r)){var f=Math.floor(a/Ud)+L5,h=Math.floor(Bg(e,Ud));try{i=M1.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(v){i=PQ("G%Y-%m-%d")(new Date(a))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.slice(1);else for(;i.length<10;)i="0"+i;o=t=VM+Ud&&e<=GM-Ud))return Iv;var t=Math.floor(Bg(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=LQe("%Y-%m-%d")(r),a=r.getHours(),i=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return OQ(n,a,i,o,s)};function OQ(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+Mb(t,2)+":"+Mb(r,2),(n||a)&&(e+=":"+Mb(n,2),a))){for(var i=4;a%10===0;)i-=1,a/=10;e+="."+Mb(a,i)}return e}uc.cleanDate=function(e,t,r){if(e===Iv)return t;if(uc.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(S1(r))return UD.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=uc.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!uc.isDateTime(e,r))return UD.error("unrecognized date",e),t;return e};var RQe=/%\d?f/g,IQe=/%h/g,zQe={1:"1",2:"1",3:"2",4:"2"};function zQ(e,t,r,n){e=e.replace(RQe,function(i){var o=Math.min(+i.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var a=new Date(Math.floor(t+.05));if(e=e.replace(IQe,function(){return zQe[r("%q")(a)]}),S1(n))try{e=M1.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(i){return"Invalid"}return r(e)(a)}var qQe=[59,59.9,59.99,59.999,59.9999];function BQe(e,t){var r=Bg(e+.05,Ud),n=Mb(Math.floor(r/C5),2)+":"+Mb(Bg(Math.floor(r/qg),60),2);if(t!=="M"){BQ(t)||(t=0);var a=Math.min(Bg(e/Sb,60),qQe[t]),i=(100+a).toFixed(t).slice(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}uc.formatDate=function(e,t,r,n,a,i){if(a=S1(a)&&a,!t)if(r==="y")t=i.year;else if(r==="m")t=i.month;else if(r==="d")t=i.dayMonth+` -`+i.year;else return BQe(e,r)+` -`+zQ(i.dayMonthYear,e,n,a);return zQ(t,e,n,a)};var qQ=3*Ud;uc.incrementMonth=function(e,t,r){r=S1(r)&&r;var n=Bg(e,Ud);if(e=Math.round(e-n),r)try{var a=Math.round(e/Ud)+L5,i=M1.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-L5)*Ud+n}catch(l){UD.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+qQ);return s.setUTCMonth(s.getUTCMonth()+t)+n-qQ};uc.findExactDates=function(e,t){for(var r=0,n=0,a=0,i=0,o,s,l=S1(t)&&M1.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";UQ.exports=function(t){return t}});var HM=ne(E1=>{"use strict";var OQe=mi(),NQe=T1(),UQe=F5(),VQe=uo().BADNUM,VD=1e-9;E1.findBin=function(e,t,r){if(OQe(t.start))return r?Math.ceil((e-t.start)/t.size-VD)-1:Math.floor((e-t.start)/t.size+VD);var n=0,a=t.length,i=0,o=a>1?(t[a-1]-t[0])/(a-1):1,s,l;for(o>=0?l=r?GQe:HQe:l=r?WQe:jQe,e+=o*VD*(r?-1:1)*(o>=0?1:-1);n90&&NQe.log("Long binary search..."),n-1};function GQe(e,t){return et}function WQe(e,t){return e>=t}E1.sorterAsc=function(e,t){return e-t};E1.sorterDes=function(e,t){return t-e};E1.distinctVals=function(e){var t=e.slice();t.sort(E1.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===VQe;r--);for(var n=t[r]-t[0]||1,a=n/(r||1)/1e4,i=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(i.push(l),o=l):u>a&&(n=Math.min(n,u),i.push(l),o=l)}return{vals:i,minDiff:n}};E1.roundUp=function(e,t,r){for(var n=0,a=t.length-1,i,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};E1.findIndexOfMin=function(e,t){t=t||UQe;for(var r=1/0,n,a=0;aXQe});function YQe(e){return Object.keys(e).sort()}var XQe,By=lo(()=>{"use strict";XQe=YQe});var VQ=ne(cc=>{"use strict";var P5=mi(),ZQe=Ih().isArrayOrTypedArray;cc.aggNums=function(e,t,r,n){var a,i;if((!n||n>r.length)&&(n=r.length),P5(t)||(t=!1),ZQe(r[0])){for(i=new Array(n),a=0;ae.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var YQ=ne((bQt,WQ)=>{"use strict";var GQ=(hb(),vl(fb)),GD=GQ.mod,$Qe=GQ.modHalf,D5=Math.PI,Og=2*D5;function KQe(e){return e/180*D5}function JQe(e){return e/D5*180}function HD(e){return Math.abs(e[1]-e[0])>Og-1e-14}function HQ(e,t){return $Qe(t-e,Og)}function QQe(e,t){return Math.abs(HQ(e,t))}function jQ(e,t){if(HD(t))return!0;var r,n;t[0]n&&(n+=Og);var a=GD(e,Og),i=a+Og;return a>=r&&a<=n||i>=r&&i<=n}function eet(e,t,r,n){if(!jQ(t,n))return!1;var a,i;return r[0]=a&&e<=i}function jD(e,t,r,n,a,i,o){a=a||0,i=i||0;var s=HD([r,n]),l,u,c,f,h;s?(l=0,u=D5,c=Og):r{"use strict";Oy.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};Oy.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};Oy.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};Oy.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};Oy.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};Oy.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var KQ=ne(Ny=>{"use strict";var WD=(hb(),vl(fb)).mod;Ny.segmentsIntersect=$Q;function $Q(e,t,r,n,a,i,o,s){var l=r-e,u=a-e,c=o-a,f=n-t,h=i-t,v=s-i,d=l*v-c*f;if(d===0)return null;var m=(u*v-c*h)/d,x=(u*f-l*h)/d;return x<0||x>1||m<0||m>1?null:{x:e+l*m,y:t+f*m}}Ny.segmentDistance=function(t,r,n,a,i,o,s,l){if($Q(t,r,n,a,i,o,s,l))return 0;var u=n-t,c=a-r,f=s-i,h=l-o,v=u*u+c*c,d=f*f+h*h,m=Math.min(jM(u,c,v,i-t,o-r),jM(u,c,v,s-t,l-r),jM(f,h,d,t-i,r-o),jM(f,h,d,n-i,a-o));return Math.sqrt(m)};function jM(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,s=a-t;return o*o+s*s}else{var l=n*t-a*e;return l*l/r}}var WM,YD,ZQ;Ny.getTextLocation=function(t,r,n,a){if((t!==YD||a!==ZQ)&&(WM={},YD=t,ZQ=a),WM[n])return WM[n];var i=t.getPointAtLength(WD(n-a/2,r)),o=t.getPointAtLength(WD(n+a/2,r)),s=Math.atan((o.y-i.y)/(o.x-i.x)),l=t.getPointAtLength(WD(n,r)),u=(l.x*4+i.x+o.x)/6,c=(l.y*4+i.y+o.y)/6,f={x:u,y:c,theta:s};return WM[n]=f,f};Ny.clearLocationCache=function(){YD=null};Ny.getVisibleSegment=function(t,r,n){var a=r.left,i=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,h;function v(m){var x=t.getPointAtLength(m);m===0?f=x:m===u&&(h=x);var g=x.xi?x.x-i:0,E=x.ys?x.y-s:0;return Math.sqrt(g*g+E*E)}for(var d=v(l);d;){if(l+=d+n,l>c)return;d=v(l)}for(d=v(c);d;){if(c-=d+n,l>c)return;d=v(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-h.x)<.1&&Math.abs(f.y-h.y)<.1}};Ny.findPointOnPath=function(t,r,n,a){a=a||{};for(var i=a.pathLength||t.getTotalLength(),o=a.tolerance||.001,s=a.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(i)[n]?-1:1,u=0,c=0,f=i,h,v,d;u0?f=h:c=h,u++}return v}});var YM=ne(R5=>{"use strict";var k1={};R5.throttle=function(t,r,n){var a=k1[t],i=Date.now();if(!a){for(var o in k1)k1[o].tsa.ts+r){s();return}a.timer=setTimeout(function(){s(),a.timer=null},r)};R5.done=function(e){var t=k1[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};R5.clear=function(e){if(e)JQ(k1[e]),delete k1[e];else for(var t in k1)R5.clear(t)};function JQ(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var eee=ne((AQt,QQ)=>{"use strict";QQ.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var tee=ne((MQt,XM)=>{"use strict";XM.exports=XD;XM.exports.isMobile=XD;XM.exports.default=XD;var aet=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,iet=/CrOS/,oet=/android|ipad|playbook|silk/i;function XD(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!="undefined"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=aet.test(t)&&!iet.test(t)||!!e.tablet&&oet.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var nee=ne((SQt,ree)=>{"use strict";var set=mi(),uet=tee();ree.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=cet(),typeof r!="string")return!0;var n=uet({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var a=r.split(" "),i=1;i-1;s--){var l=a[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(set(u)&&(u=+u),u>=13)return!0}}}return n};function cet(){var e;return typeof navigator!="undefined"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),e}});var iee=ne((EQt,aee)=>{"use strict";var fet=Ea();aee.exports=function(t,r,n){var a=t.selectAll("g."+n.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var i=t.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(o){o[0][i]=fet.select(this)}),a}});var see=ne((kQt,oee)=>{"use strict";var het=Fa();oee.exports=function(t,r){for(var n=t._context.locale,a=0;a<2;a++){for(var i=t._context.locales,o=0;o<2;o++){var s=(i[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}i=het.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var ZD=ne((CQt,lee)=>{"use strict";lee.exports=function(t){for(var r={},n=[],a=0,i=0;i{"use strict";uee.exports=function(t){for(var r=pet(t)?vet:det,n=[],a=0;a{"use strict";fee.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),a=n>1?(n*t+n*r)/n:t+r,i=String(a).length;if(i>16){var o=String(r).length,s=String(t).length;if(i>=s+o){var l=parseFloat(a).toPrecision(12);l.indexOf("e+")===-1&&(a=+l)}}return a}});var pee={};E0(pee,{default:()=>yet});function met(e){return typeof e=="string"&&(e=e.replace(get,"")),(0,dee.default)(e)?Number(e):vee.BADNUM}var dee,vee,get,yet,gee=lo(()=>{"use strict";dee=yp(mi()),vee=yp(uo()),get=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;yet=met});var xee=ne((PQt,yee)=>{"use strict";var xet=/<[^>]*>/g,bet=/[\p{S}\p{P}]/gu,_et=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,wet=/�/g,Tet=/\s+/g,ZM="-",mee=ZM.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Aet=new RegExp(mee+"{3,}","g"),Met=new RegExp(mee+"$","g"),Eet=60;function ket(e){return typeof e.toWellFormed=="function"?e.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(e))}yee.exports=function(t,r=Eet){var n=ket(t!=null?t:"").replace(wet,"").replace(xet," ").replace(bet,a=>a===ZM?a:"").toLowerCase().trim().replace(Tet,ZM).replace(_et,"").replace(Aet,ZM);return n.length<=r?n:Array.from(n).slice(0,r).join("").replace(Met,"")}});var Zt=ne((DQt,Fee)=>{"use strict";var I5=Ea(),Cet=ub().utcFormat,Let=dD().format,Mee=mi(),See=uo(),Eee=See.FP_SAFE,Fet=-Eee,bee=See.BADNUM,qr=Fee.exports={};qr.adjustFormat=function(t){return!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t)?t:t==="0.f"?"~f":/^\d%/.test(t)?"~%":/^\ds/.test(t)?"~s":!/^[~,.0$]/.test(t)&&/[&fps]/.test(t)?"~"+t:t};var _ee={};qr.warnBadFormat=function(e){var t=String(e);_ee[t]||(_ee[t]=1,qr.warn('encountered bad format: "'+t+'"'))};qr.noFormat=function(e){return String(e)};qr.numberFormat=function(e){var t;try{t=Let(qr.adjustFormat(e))}catch(r){return qr.warnBadFormat(e),qr.noFormat}return t};qr.nestedProperty=m5();qr.keyedContainer=Q$();qr.relativeAttr=tK();qr.isPlainObject=Lg();qr.toLogRange=kM();qr.relinkPrivateKeys=iK();var Ng=Ih();qr.isArrayBuffer=Ng.isArrayBuffer;qr.isTypedArray=Ng.isTypedArray;qr.isArrayOrTypedArray=Ng.isArrayOrTypedArray;qr.isArray1D=Ng.isArray1D;qr.ensureArray=Ng.ensureArray;qr.concat=Ng.concat;qr.maxRowLength=Ng.maxRowLength;qr.minRowLength=Ng.minRowLength;var kee=(hb(),vl(fb));qr.mod=kee.mod;qr.modHalf=kee.modHalf;var Ug=NK();qr.valObjectMeta=Ug.valObjectMeta;qr.coerce=Ug.coerce;qr.coerce2=Ug.coerce2;qr.coerceFont=Ug.coerceFont;qr.coercePattern=Ug.coercePattern;qr.coerceHoverinfo=Ug.coerceHoverinfo;qr.coerceSelectionMarkerOpacity=Ug.coerceSelectionMarkerOpacity;qr.validate=Ug.validate;var cv=NQ();qr.dateTime2ms=cv.dateTime2ms;qr.isDateTime=cv.isDateTime;qr.ms2DateTime=cv.ms2DateTime;qr.ms2DateTimeLocal=cv.ms2DateTimeLocal;qr.cleanDate=cv.cleanDate;qr.isJSDate=cv.isJSDate;qr.formatDate=cv.formatDate;qr.incrementMonth=cv.incrementMonth;qr.dateTick0=cv.dateTick0;qr.dfltRange=cv.dfltRange;qr.findExactDates=cv.findExactDates;qr.MIN_MS=cv.MIN_MS;qr.MAX_MS=cv.MAX_MS;var Uy=HM();qr.findBin=Uy.findBin;qr.sorterAsc=Uy.sorterAsc;qr.sorterDes=Uy.sorterDes;qr.distinctVals=Uy.distinctVals;qr.roundUp=Uy.roundUp;qr.sort=Uy.sort;qr.findIndexOfMin=Uy.findIndexOfMin;qr.sortObjectKeys=(By(),vl(qy)).default;var C1=VQ();qr.aggNums=C1.aggNums;qr.len=C1.len;qr.mean=C1.mean;qr.geometricMean=C1.geometricMean;qr.median=C1.median;qr.midRange=C1.midRange;qr.variance=C1.variance;qr.stdev=C1.stdev;qr.interp=C1.interp;var L0=RM();qr.init2dArray=L0.init2dArray;qr.transposeRagged=L0.transposeRagged;qr.dot=L0.dot;qr.translationMatrix=L0.translationMatrix;qr.rotationMatrix=L0.rotationMatrix;qr.rotationXYMatrix=L0.rotationXYMatrix;qr.apply3DTransform=L0.apply3DTransform;qr.apply2DTransform=L0.apply2DTransform;qr.apply2DTransform2=L0.apply2DTransform2;qr.convertCssMatrix=L0.convertCssMatrix;qr.inverseTransformMatrix=L0.inverseTransformMatrix;var xp=YQ();qr.deg2rad=xp.deg2rad;qr.rad2deg=xp.rad2deg;qr.angleDelta=xp.angleDelta;qr.angleDist=xp.angleDist;qr.isFullCircle=xp.isFullCircle;qr.isAngleInsideSector=xp.isAngleInsideSector;qr.isPtInsideSector=xp.isPtInsideSector;qr.pathArc=xp.pathArc;qr.pathSector=xp.pathSector;qr.pathAnnulus=xp.pathAnnulus;var Cb=XQ();qr.isLeftAnchor=Cb.isLeftAnchor;qr.isCenterAnchor=Cb.isCenterAnchor;qr.isRightAnchor=Cb.isRightAnchor;qr.isTopAnchor=Cb.isTopAnchor;qr.isMiddleAnchor=Cb.isMiddleAnchor;qr.isBottomAnchor=Cb.isBottomAnchor;var Lb=KQ();qr.segmentsIntersect=Lb.segmentsIntersect;qr.segmentDistance=Lb.segmentDistance;qr.getTextLocation=Lb.getTextLocation;qr.clearLocationCache=Lb.clearLocationCache;qr.getVisibleSegment=Lb.getVisibleSegment;qr.findPointOnPath=Lb.findPointOnPath;var JM=ci();qr.extendFlat=JM.extendFlat;qr.extendDeep=JM.extendDeep;qr.extendDeepAll=JM.extendDeepAll;qr.extendDeepNoArrays=JM.extendDeepNoArrays;var $D=T1();qr.log=$D.log;qr.warn=$D.warn;qr.error=$D.error;var Pet=(_b(),vl(bb));qr.counterRegex=Pet.counter;var KD=YM();qr.throttle=KD.throttle;qr.throttleDone=KD.done;qr.clearThrottle=KD.clear;var F0=E5();qr.getGraphDiv=F0.getGraphDiv;qr.isPlotDiv=F0.isPlotDiv;qr.removeElement=F0.removeElement;qr.addStyleRule=F0.addStyleRule;qr.addRelatedStyleRule=F0.addRelatedStyleRule;qr.deleteRelatedStyleRule=F0.deleteRelatedStyleRule;qr.setStyleOnHover=F0.setStyleOnHover;qr.getFullTransformMatrix=F0.getFullTransformMatrix;qr.getElementTransformMatrix=F0.getElementTransformMatrix;qr.getElementAndAncestors=F0.getElementAndAncestors;qr.equalDomRects=F0.equalDomRects;qr.clearResponsive=eee();qr.preserveDrawingBuffer=nee();qr.makeTraceGroups=iee();qr._=see();qr.notifier=AD();qr.filterUnique=ZD();qr.filterVisible=cee();qr.pushUnique=DD();qr.increment=hee();qr.cleanNumber=(gee(),vl(pee)).default;qr.slugify=xee();qr.ensureNumber=function(t){return Mee(t)?(t=Number(t),t>Eee||t=t?!1:Mee(e)&&e>=0&&e%1===0};qr.noop=DM();qr.identity=F5();qr.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};qr.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};qr.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),s=0;s=Math.pow(2,r)?a>10?(qr.warn("randstr failed uniqueness"),o):e(t,r,n,(a||0)+1):o};qr.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r["_"+t]=e,r};qr.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,a=2*t-1,i=new Array(a),o=new Array(r),s,l,u,c;for(s=0;s=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*i[l];o[s]=c}return o};qr.syncOrAsync=function(e,t,r){var n,a;function i(){return qr.syncOrAsync(e,t,r)}for(;e.length;)if(a=e.splice(0,1)[0],n=a(t),n&&n.then)return n.then(i);return r&&r(t)};qr.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};qr.noneOrAll=function(e,t,r){if(e){var n=!1,a=!0,i,o;for(i=0;i0?a:0})};qr.fillArray=function(e,t,r,n){if(n=n||qr.identity,qr.isArrayOrTypedArray(e))for(var a=0;aIet.test(window.navigator.userAgent);var zet=/Firefox\/(\d+)\.\d+/;qr.getFirefoxVersion=function(){var e=zet.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};qr.isD3Selection=function(e){return e instanceof I5.selection};qr.ensureSingle=function(e,t,r,n){var a=e.select(t+(r?"."+r:""));if(a.size())return a;var i=e.append(t);return r&&i.classed(r,!0),n&&i.call(n),i};qr.ensureSingleById=function(e,t,r,n){var a=e.select(t+"#"+r);if(a.size())return a;var i=e.append(t).attr("id",r);return n&&i.call(n),i};qr.objectFromPath=function(e,t){for(var r=e.split("."),n,a=n={},i=0;i1?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};qr.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var Lee=/^\w*$/;qr.templateString=function(e,t){var r={};return e.replace(qr.TEMPLATE_STRING_REGEX,function(n,a){var i;return Lee.test(a)?i=t[a]:(r[a]=r[a]||qr.nestedProperty(t,a).get,i=r[a](!0)),i!==void 0?i:""})};var Oet={max:10,count:0,name:"hovertemplate"};qr.hovertemplateString=e=>JD(Cg(uv({},e),{opts:Oet}));var Net={max:10,count:0,name:"texttemplate"};qr.texttemplateString=e=>JD(Cg(uv({},e),{opts:Net}));var Uet=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Vet(e){var t=e.match(Uet);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Get={max:10,count:0,name:"texttemplate",parseMultDiv:!0};qr.texttemplateStringForShapes=e=>JD(Cg(uv({},e),{opts:Get}));var wee=/^[:|\|]/;function JD({data:e=[],locale:t,fallback:r,labels:n={},opts:a,template:i}){return i.replace(qr.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),h=["xother_","yother_"].includes(s),v=u||c||h||f;(c||f)&&(s=s.substring(1)),(h||f)&&(s=s.substring(0,s.length-1));let d=null,m=null;if(a.parseMultDiv){var x=Vet(s);s=x.key,d=x.op,m=x.number}let g;if(v){if(n[s]===void 0)return"";g=n[s]}else for(let k of e)if(k){if(k.hasOwnProperty(s)){g=k[s];break}if(Lee.test(s)||(g=qr.nestedProperty(k,s).get(!0)),g!==void 0)break}if(g===void 0){let{count:k,max:y,name:S}=a,T=r===!1?o:r;return k=KM&&o<=Tee,u=s>=KM&&s<=Tee;if(l&&(n=10*n+o-KM),u&&(a=10*a+s-KM),!l||!u){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var kb=2e9;qr.seedPseudoRandom=function(){kb=2e9};qr.pseudoRandom=function(){var e=kb;return kb=(69069*kb+1)%4294967296,Math.abs(kb-e)<429496729?qr.pseudoRandom():kb/4294967296};qr.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},a=qr.extractOption(e,t,"htx","hovertext");if(qr.isValidTextValue(a))return n(a);var i=qr.extractOption(e,t,"tx","text");if(qr.isValidTextValue(i))return n(i)};qr.isValidTextValue=function(e){return e||e===0};qr.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(u=1):u=0,qr.strTranslate(a-u*(r+o),i-u*(n+s))+qr.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};qr.setTransormAndDisplay=function(e,t){e.attr("transform",qr.getTextTransform(t)),e.style("display",t.scale?null:"none")};qr.ensureUniformFontSize=function(e,t){var r=qr.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};qr.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};qr.bigFont=function(e){return Math.round(1.2*e)};var Aee=qr.getFirefoxVersion(),Het=Aee!==null&&Aee<86;qr.getPositionFromD3Event=function(){return Het?[I5.event.layerX,I5.event.layerY]:[I5.event.offsetX,I5.event.offsetY]}});var Ree=ne(()=>{"use strict";var jet=Zt(),Pee={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.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(QD in Pee)Dee=QD.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),jet.addStyleRule(Dee,Pee[QD]);var Dee,QD});var eR=ne((qQt,Iee)=>{Iee.exports=!0});var rR=ne((BQt,zee)=>{"use strict";var Wet=eR(),tR;typeof window.matchMedia=="function"?tR=!window.matchMedia("(hover: none)").matches:tR=Wet;zee.exports=tR});var Vy=ne((OQt,nR)=>{"use strict";var Fb=typeof Reflect=="object"?Reflect:null,qee=Fb&&typeof Fb.apply=="function"?Fb.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},QM;Fb&&typeof Fb.ownKeys=="function"?QM=Fb.ownKeys:Object.getOwnPropertySymbols?QM=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:QM=function(t){return Object.getOwnPropertyNames(t)};function Yet(e){console&&console.warn&&console.warn(e)}var Oee=Number.isNaN||function(t){return t!==t};function jl(){jl.init.call(this)}nR.exports=jl;nR.exports.once=Ket;jl.EventEmitter=jl;jl.prototype._events=void 0;jl.prototype._eventsCount=0;jl.prototype._maxListeners=void 0;var Bee=10;function eS(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(jl,"defaultMaxListeners",{enumerable:!0,get:function(){return Bee},set:function(e){if(typeof e!="number"||e<0||Oee(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Bee=e}});jl.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};jl.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Oee(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Nee(e){return e._maxListeners===void 0?jl.defaultMaxListeners:e._maxListeners}jl.prototype.getMaxListeners=function(){return Nee(this)};jl.prototype.emit=function(t){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")qee(l,this,r);else for(var u=l.length,c=jee(l,u),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,Yet(s)}return e}jl.prototype.addListener=function(t,r){return Uee(this,t,r,!1)};jl.prototype.on=jl.prototype.addListener;jl.prototype.prependListener=function(t,r){return Uee(this,t,r,!0)};function Xet(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Vee(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=Xet.bind(n);return a.listener=r,n.wrapFn=a,a}jl.prototype.once=function(t,r){return eS(r),this.on(t,Vee(this,t,r)),this};jl.prototype.prependOnceListener=function(t,r){return eS(r),this.prependListener(t,Vee(this,t,r)),this};jl.prototype.removeListener=function(t,r){var n,a,i,o,s;if(eS(r),a=this._events,a===void 0)return this;if(n=a[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,i=o;break}if(i<0)return this;i===0?n.shift():Zet(n,i),n.length===1&&(a[t]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};jl.prototype.off=jl.prototype.removeListener;jl.prototype.removeAllListeners=function(t){var r,n,a;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(t,r[a]);return this};function Gee(e,t,r){var n=e._events;if(n===void 0)return[];var a=n[t];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?$et(a):jee(a,a.length)}jl.prototype.listeners=function(t){return Gee(this,t,!0)};jl.prototype.rawListeners=function(t){return Gee(this,t,!1)};jl.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Hee.call(e,t)};jl.prototype.listenerCount=Hee;function Hee(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}jl.prototype.eventNames=function(){return this._eventsCount>0?QM(this._events):[]};function jee(e,t){for(var r=new Array(t),n=0;n{"use strict";var aR=Vy().EventEmitter,Qet={init:function(e){if(e._ev instanceof aR)return e;var t=new aR,r=new aR;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,a){t.emit(n,a),r.emit(n,a)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,a=e._ev;if(!a)return;var i=a._events[t];if(!i)return;function o(l){if(l.listener){if(a.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(a,[r])}else return l.apply(a,[r])}i=Array.isArray(i)?i:[i];var s;for(s=0;s{"use strict";var Xee=Zt(),ett=Dy().dfltConfig;function ttt(e,t){for(var r=[],n,a=0;aett.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};L1.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};L1.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};L1.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n{"use strict";Kee.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var Ib=ne(Kc=>{"use strict";var zv=Fa(),z5=Zt(),rS=os(),oR=Ab(),rtt=iR(),ntt=k5(),att=Dy().configAttributes,Jee=Il(),P0=z5.extendDeepAll,Db=z5.isPlainObject,itt=z5.isArrayOrTypedArray,nS=z5.nestedProperty,ott=z5.valObjectMeta,sR="_isSubplotObj",aS="_isLinkedToArray",stt="_arrayAttrRegexps",ete="_deprecated",lR=[sR,aS,stt,ete];Kc.IS_SUBPLOT_OBJ=sR;Kc.IS_LINKED_TO_ARRAY=aS;Kc.DEPRECATED=ete;Kc.UNDERSCORE_ATTRS=lR;Kc.get=function(){var e={};return zv.allTypes.forEach(function(t){e[t]=utt(t)}),{defs:{valObjects:ott,metaKeys:lR.concat(["description","role","editType","impliedEdits"]),editType:{traces:Jee.traces,layout:Jee.layout},impliedEdits:{}},traces:e,layout:ctt(),frames:ftt(),animation:Rb(ntt),config:Rb(att)}};Kc.crawl=function(e,t,r,n){var a=r||0;n=n||"",Object.keys(e).forEach(function(i){var o=e[i];if(lR.indexOf(i)===-1){var s=(n?n+".":"")+i;t(o,i,e,a,s),!Kc.isValObject(o)&&Db(o)&&i!=="impliedEdits"&&Kc.crawl(o,t,a+1,s)}})};Kc.isValObject=function(e){return e&&e.valType!==void 0};Kc.findArrayAttributes=function(e){var t=[],r=[],n=[],a,i;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var h=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));h&&s(a,0,"")}function s(l,u,c){var f=l[r[u]],h=c+r[u];if(u===r.length-1)itt(f)&&t.push(i+h);else if(n[u]){if(Array.isArray(f))for(var v=0;v=i.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!tS(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function tS(e){return e===Math.round(e)&&e>=0}function utt(e){var t,r;t=zv.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var a=P0({},rS),i=P0({},t.attributes);Kc.crawl(i,function(l,u,c,f,h){nS(a,h).set(void 0),l===void 0&&nS(i,h).set(void 0)}),P0(n,a),zv.traceIs(e,"noOpacity")&&delete n.opacity,zv.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),zv.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,P0(n,i),r.attributes&&P0(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:Rb(n)};if(t.layoutAttributes){var s={};P0(s,t.layoutAttributes),o.layoutAttributes=Rb(s)}return t.animatable||Kc.crawl(o,function(l){Kc.isValObject(l)&&"anim"in l&&delete l.anim}),o}function ctt(){var e={},t,r;P0(e,oR);for(t in zv.subplotsRegistry)if(r=zv.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var zb=Zt(),gtt=os(),Vg="templateitemname",uR={name:{valType:"string",editType:"none"}};uR[Vg]={valType:"string",editType:"calc"};Gy.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=uR.name,t[Vg]=uR[Vg],t};Gy.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function a(i){r=zb.coerce(i,{},gtt,"type");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:a}};Gy.newContainer=function(e,t,r){var n=e._template,a=n&&(n[t]||r&&n[r]);zb.isPlainObject(a)||(a=null);var i=e[t]={_template:a};return i};Gy.arrayTemplater=function(e,t,r){var n=e._template,a=n&&n[nte(t)],i=n&&n[t];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[Vg]=u[Vg];if(!rte(f))return c._template=a,c;for(var h=0;h=n&&(r._input||{})._templateitemname;i&&(a=n);var o=t+"["+a+"]",s;function l(){s={},i&&(s[o]={},s[o][Vg]=i)}l();function u(v,d){s[v]=d}function c(v,d){i?zb.nestedProperty(s[o],v).set(d):s[o+"."+v]=d}function f(){var v=s;return l(),v}function h(v,d){v&&c(v,d);var m=f();for(var x in m)zb.nestedProperty(e,x).set(m[x])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:h}}});var zc=ne((jQt,ate)=>{"use strict";var q5=(_b(),vl(bb)).counter;ate.exports={idRegex:{x:q5("x","( domain)?"),y:q5("y","( domain)?")},attrRegex:q5("[xy]axis"),xAxisMatch:q5("xaxis"),yAxisMatch:q5("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}});var uu=ne(Vd=>{"use strict";var mtt=Fa(),cR=zc();Vd.id2name=function(t){if(!(typeof t!="string"||!t.match(cR.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Vd.name2id=function(t){if(t.match(cR.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Vd.cleanId=function(t,r,n){var a=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(cR.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(a&&!n)){var i=t.split(" ")[0].slice(1).replace(/^0+/,"");return i==="1"&&(i=""),t.charAt(0)+i+(a&&n?" domain":"")}};Vd.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var a=Vd.listIds(e,t),i=new Array(a.length),o;for(o=0;on?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Vd.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function ite(e,t){if(t&&t.length){for(var r=0;r{"use strict";function ytt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function xtt(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}ote.exports={clearOutlineControllers:ytt,clearOutline:xtt}});var iS=ne((XQt,ste)=>{"use strict";ste.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var mh=ne(sS=>{"use strict";var oS=Fa(),ZQt=zc().SUBPLOT_PATTERN;sS.getSubplotCalcData=function(e,t,r){var n=oS.subplotsRegistry[t];if(!n)return[];for(var a=n.attr,i=[],o=0;o{"use strict";var btt=Fa(),qb=Zt();Hy.manageCommandObserver=function(e,t,r,n){var a={},i=!0;t&&t._commandObserver&&(a=t._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var o=Hy.hasSimpleAPICommandBindings(e,r,a.lookupTable);if(t&&t._commandObserver){if(o)return a;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,a}if(o){lte(e,o,a.cache),a.check=function(){if(i){var c=lte(e,o,a.cache);return c.changed&&n&&a.lookupTable[c.value]!==void 0&&(a.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:a.lookupTable[c.value]})).then(a.enable,a.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+a;qb.isPlainObject(i)?fR(i,t,o,n+1):t(o,a,i)}})}});var Sl=ne((QQt,_te)=>{"use strict";var JQt=Ea(),wtt=ub().timeFormatLocale,Ttt=dD().formatLocale,B5=mi(),Att=vD(),Mtt=g5().version,ns=Fa(),Stt=Ib(),Ett=Bo(),Ha=Zt(),ktt=_a(),hte=uo().BADNUM,Gd=uu(),Ctt=Gg().clearOutline,Ltt=iS(),hR=k5(),Ftt=iR(),Ptt=mh().getModuleCalcData,dte=Ha.relinkPrivateKeys,jy=Ha._,wa=_te.exports={};Ha.extendFlat(wa,ns);wa.attributes=os();wa.attributes.type.values=wa.allTypes;wa.fontAttrs=pl();wa.layoutAttributes=Ab();var uS=fte();wa.executeAPICommand=uS.executeAPICommand;wa.computeAPICommandBindings=uS.computeAPICommandBindings;wa.manageCommandObserver=uS.manageCommandObserver;wa.hasSimpleAPICommandBindings=uS.hasSimpleAPICommandBindings;wa.redrawText=function(e){return e=Ha.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(ns.getComponentMethod("annotations","draw")(e),ns.getComponentMethod("legend","draw")(e),ns.getComponentMethod("colorbar","draw")(e),t(wa.previousPromises(e)))},300)})};wa.resize=function(e){e=Ha.getGraphDiv(e);var t,r=new Promise(function(n,a){(!e||Ha.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ha.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,ns.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};wa.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};wa.sendDataToCloud=function(e,t){e.emit("plotly_beforeexport");let r=new URL(t).origin;var n=wa.graphJson(e,!1,"object");n.version=Mtt;var a=new URL(t);a.searchParams.set("origin",window.location.origin);var i=window.open(a.href,"_blank");if(!i){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),e.emit("plotly_exportfail");return}var o=function(s){s.origin===r&&s.data&&s.data.type==="CHART_AUTH_SUCCESS"&&(i.postMessage({type:"chart",chart:n},r),window.removeEventListener("message",o),e.emit("plotly_afterexport"))};return window.addEventListener("message",o),!1};var Dtt=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],Rtt=["year","month","dayMonth","dayMonthYear"];wa.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var a=e._fullLayout={},i=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||wa.createTransitionData(e),a._dfltTitle={plot:jy(e,"Click to enter Plot title"),subtitle:jy(e,"Click to enter Plot subtitle"),x:jy(e,"Click to enter X axis title"),y:jy(e,"Click to enter Y axis title"),colorbar:jy(e,"Click to enter Colorscale title"),annotation:jy(e,"new text")},a._traceWord=jy(e,"trace");var h=vte(e,Dtt);if(n._initialAutoSizeIsDone){var v=n.width,d=n.height;wa.supplyLayoutGlobalDefaults(i,a,h),i.width||(a.width=v),i.height||(a.height=d),wa.sanitizeMargins(a)}else{wa.supplyLayoutGlobalDefaults(i,a,h);var m=!i.width||!i.height,x=a.autosize,g=c.autosizable,E=m&&(x||g);E?wa.plotAutoSize(e,i,a):m&&wa.sanitizeMargins(a),!x&&m&&(i.width=a.width,i.height=a.height)}a._d3locale=qtt(h,a.separators),a._extraFormat=vte(e,Rtt),a._initialAutoSizeIsDone=!0,a._dataLength=l.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var M=a._subplots=ztt(),w=a._splomAxes={x:{},y:{}},k=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=Itt(o,l),wa.supplyDataDefaults(l,s,i,a);var y=Object.keys(w.x),S=Object.keys(w.y);if(y.length>1&&S.length>1){for(ns.getComponentMethod("grid","sizeDefaults")(i,a),f=0;f15&&S.length>15&&a.shapes.length===0&&a.images.length===0,wa.linkSubplots(s,a,o,n),wa.cleanPlot(s,a,o,n);var P=!!(n._has&&n._has("cartesian")),D=!!(a._has&&a._has("cartesian")),z=P,q=D;z&&!q?n._bgLayer.remove():q&&!z&&(a._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&Ctt({_fullLayout:n}),Btt(s,a),dte(a,n),ns.getComponentMethod("colorscale","crossTraceDefaults")(s,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var U=a._tracePreGUI,O={},R;for(R in U)O[R]="old";for(f=0;f0){var c=1-2*i;o=Math.round(c*o),s=Math.round(c*s)}}var f=wa.layoutAttributes.width.min,h=wa.layoutAttributes.height.min;o1,d=!r.height&&Math.abs(n.height-s)>1;(d||v)&&(v&&(n.width=o),d&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),wa.sanitizeMargins(n)};wa.supplyLayoutModuleDefaults=function(e,t,r,n){var a=ns.componentsRegistry,i=t._basePlotModules,o,s,l,u=ns.subplotsRegistry.cartesian;for(o in a)l=a[o],l.includeBasePlot&&l.includeBasePlot(e,t);i.length||i.push(u),t._has("cartesian")&&(ns.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ha.subplotSort);for(s=0;s1&&(r.l/=x,r.r/=x)}if(h){var g=(r.t+r.b)/h;g>1&&(r.t/=g,r.b/=g)}var E=r.xl!==void 0?r.xl:r.x,M=r.xr!==void 0?r.xr:r.x,w=r.yt!==void 0?r.yt:r.y,k=r.yb!==void 0?r.yb:r.y;v[t]={l:{val:E,size:r.l+m},r:{val:M,size:r.r+m},b:{val:k,size:r.b+m},t:{val:w,size:r.t+m}},d[t]=1}if(!n._replotting)return wa.doAutoMargin(e)}};function Ntt(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=Gd.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}wa.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),mte(t);var a=t._size,i=t.margin,o={t:0,b:0,l:0,r:0},s=Ha.extendFlat({},a),l=i.l,u=i.r,c=i.t,f=i.b,h=t._pushmargin,v=t._pushmarginIds,d=t.minreducedwidth,m=t.minreducedheight;if(i.autoexpand!==!1){for(var x in h)v[x]||delete h[x];var g=e._fullLayout._reservedMargin;for(var E in g)for(var M in g[E]){var w=g[E][M];o[M]=Math.max(o[M],w)}h.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var k in o){var y=0;for(var S in h)S!=="base"&&B5(h[S][k].size)&&(y=h[S][k].size>y?h[S][k].size:y);var T=Math.max(0,i[k]-y);o[k]=Math.max(0,o[k]-T)}for(var p in h){var C=h[p].l||{},A=h[p].b||{},P=C.val,D=C.size,z=A.val,q=A.size,U=r-o.r-o.l,O=n-o.t-o.b;for(var R in h){if(B5(D)&&h[R].r){var B=h[R].r.val,Y=h[R].r.size;if(B>P){var X=(D*B+(Y-U)*P)/(B-P),te=(Y*(1-P)+(D-U)*(1-B))/(B-P);X+te>l+u&&(l=X,u=te)}}if(B5(q)&&h[R].t){var se=h[R].t.val,ue=h[R].t.size;if(se>z){var re=(q*se+(ue-O)*z)/(se-z),j=(ue*(1-z)+(q-O)*(1-se))/(se-z);re+j>f+c&&(f=re,c=j)}}}}}var fe=Ha.constrain(r-i.l-i.r,yte,d),ce=Ha.constrain(n-i.t-i.b,xte,m),oe=Math.max(0,r-fe),we=Math.max(0,n-ce);if(oe){var he=(l+u)/oe;he>1&&(l/=he,u/=he)}if(we){var ye=(f+c)/we;ye>1&&(f/=ye,c/=ye)}if(a.l=Math.round(l)+o.l,a.r=Math.round(u)+o.r,a.t=Math.round(c)+o.t,a.b=Math.round(f)+o.b,a.p=Math.round(i.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&(wa.didMarginChange(s,a)||Ntt(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var Pe=3*(1+Object.keys(v).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};wa.graphJson=function(e,t=!1,r="json",n=!1,a=!1){(n&&t&&!e._fullData||n&&!t&&!e._fullLayout)&&wa.supplyDefaults(e);var i=n?e._fullData:e.data,o=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function l(f,h){if(typeof f=="function")return h?"_function_":null;if(Ha.isPlainObject(f)){var v={};return Object.keys(f).sort().forEach(function(g){if(["_","["].indexOf(g.charAt(0))===-1){if(typeof f[g]=="function"){h&&(v[g]="_function");return}v[g]=l(f[g],h)}}),v}var d=Array.isArray(f),m=Ha.isTypedArray(f);if((d||m)&&f.dtype&&f.shape){var x=f.bdata;return l({dtype:f.dtype,shape:f.shape,bdata:Ha.isArrayBuffer(x)?Att.encode(x):x},h)}return d?f.map(function(g){return l(g,h)}):m?Ha.simpleMap(f,Ha.identity):Ha.isJSDate(f)?Ha.ms2DateTimeLocal(+f):f}var u={data:(i||[]).map(function(f){var h=l(f);return t&&delete h.fit,h})};if(!t&&(u.layout=l(o),n)){var c=o._size;u.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(u.frames=l(s)),a&&(u.config=l(e._context,!0)),r==="object"?u:JSON.stringify(u)};wa.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return ns.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var h=0,v=0;function d(){return h++,function(){v++,!n&&v===h&&s(f)}}r.runFn(d),setTimeout(d())})}function s(f){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return ns.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var u=[wa.previousPromises,l,r.prepareFn,wa.rehover,wa.reselect,o],c=Ha.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}wa.doCalcdata=function(e,t){var r=Gd.list(e),n=e._fullData,a=e._fullLayout,i,o,s,l=new Array(n.length),u=(e.calcdata||[]).slice();for(e.calcdata=l,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},s=0;s{"use strict";Wy.xmlns="http://www.w3.org/2000/xmlns/";Wy.svg="http://www.w3.org/2000/svg";Wy.xlink="http://www.w3.org/1999/xlink";Wy.svgAttrs={xmlns:Wy.svg,"xmlns:xlink":Wy.xlink}});var qc=ne((ter,wte)=>{"use strict";wte.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"}}});var Ms=ne(fv=>{"use strict";var Jc=Ea(),D0=Zt(),jtt=D0.strTranslate,dR=qv(),Wtt=qc().LINE_SPACING,Ytt=/([^$]*)([$]+[^$]*[$]+)([^$]*)/,Ste=e=>e?e.match(Ytt):null;fv.matchTex=Ste;fv.convertToTspans=function(e,t,r){var n=e.text(),a=!e.attr("data-notex")&&t&&t._context.typesetMath&&typeof MathJax!="undefined"&&Ste(n),i=Jc.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function s(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=ort(e.node(),n);l&&e.style("pointer-events","all"),fv.positionText(e),r&&r.call(e)}return a?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u},f=e.attr("text-anchor");Ktt(a[2],c,function(h,v,d){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var m=h&&h.select("svg");if(!m||!m.node()){s(),l();return}e.style("display","none");var x=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});x.node().appendChild(m.node()),v&&v.node()&&m.node().insertBefore(v.node().cloneNode(!0),m.node().firstChild);var g=d.width,E=d.height;m.attr({class:o,height:E,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":c.fontSize+"px"});var M=e.node().style.fill||"black",w=m.select("g");w.attr({fill:M,stroke:M});var k=w.node().getBoundingClientRect(),y=k.width,S=k.height;(y>g||S>E)&&(m.style("overflow","hidden"),k=m.node().getBoundingClientRect(),y=k.width,S=k.height);var T=+e.attr("x"),p=+e.attr("y"),C=u||e.node().getBoundingClientRect().height,A=-C/4;o[0]==="y"?x.attr({transform:"rotate("+[-90,T,p]+")"+jtt(-y/2,A-S/2)}):o[0]==="l"?p=A-S/2:o[0]==="a"&&o.indexOf("atitle")!==0?(T=0,p=A):(T=T-y*(f==="middle"?.5:f==="end"?1:0),p=p+A-S/2),m.attr({x:T,y:p}),r&&r.call(e,x),l(x)})})):s(),e};var Xtt=/(<|<|<)/g,Ztt=/(>|>|>)/g;function $tt(e){return e.replace(Xtt,"\\lt ").replace(Ztt,"\\gt ")}var vR=null;function Ktt(e,t,r){let n=parseInt((MathJax.version||"").split(".")[0]);if(n!==3&&n!==4){D0.warn("Unsupported MathJax version:",MathJax.version);return}var a;let i=function(){if(!vR){let u=MathJax._.output.svg_ts.SVG,c=D0.extendFlat({},MathJax.config.svg,{fontCache:"local"});n===4&&(c.linebreaks=D0.extendFlat({},c.linebreaks,{inline:!1})),vR=MathJax._.mathjax.mathjax.document(document,D0.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new u(c)}))}let s="math-output-"+D0.randstr({},64);a=Jc.select("body").append("div").attr({id:s}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"});let l=$tt(e).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return vR.convert(l,{display:!1})}).then(function(u){a.node().appendChild(u)})},o=function(){let s=a.select(".MathJax"),l=!s.empty()&&a.select("svg").node();if(!l)D0.log("There was an error in the tex syntax.",e),r();else{let u=l.getBoundingClientRect(),c=s.select("defs");r(s,c,u)}a.remove()};Promise.resolve().then(i).then(o).catch(s=>{D0.log("MathJax typesetting failed.",e,s),a&&a.remove(),r()})}var Ete={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},Jtt={sub:"0.3em",sup:"-0.6em"},Qtt={sub:"-0.21em",sup:"0.42em"},Tte="\u200B",Ate=["http:","https:","mailto:","",void 0,":"],kte=fv.NEWLINES=/(\r\n?|\n)/g,gR=/(<[^<>]*>)/,mR=/<(\/?)([^ >]*)(\s+(.*))?>/i,ert=//i;fv.BR_TAG_ALL=//gi;var Cte=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,Lte=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,Fte=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,trt=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Yy(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&cS(n)}var rrt=/(^|;)\s*color:/;fv.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],a="...",i=a.length,o=e.split(gR),s=[],l="",u=0,c=0;ci?s.push(f.slice(0,Math.max(0,m-i))+a):s.push(f.slice(0,m));break}l=""}}return s.join("")};var nrt={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},art=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function cS(e){return e.replace(art,function(t,r){var n;return r.charAt(0)==="#"?n=irt(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=nrt[r],n||t})}fv.convertEntities=cS;function irt(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function ort(e,t){t=t.replace(kte," ");var r=!1,n=[],a,i=-1;function o(){i++;var y=document.createElementNS(dR.svg,"tspan");Jc.select(y).attr({class:"line",dy:i*Wtt+"em"}),e.appendChild(y),a=y;var S=n;if(n=[{node:y}],S.length>1)for(var T=1;T.",t);return}var S=n.pop();y!==S.type&&D0.log("Start tag <"+S.type+"> doesnt match end tag <"+y+">. Pretending it did match.",t),a=n[n.length-1].node}var c=ert.test(t);c?o():(a=e,n=[{node:e}]);for(var f=t.split(gR),h=0;h{"use strict";var srt=Ea(),N5=mi(),fS=Zt(),Bb=_a(),lrt=Iy().isValid;function urt(e,t,r){var n=t?fS.nestedProperty(e,t).get()||{}:e,a=n[r||"color"];a&&a._inputArray&&(a=a._inputArray);var i=!1;if(fS.isArrayOrTypedArray(a)){for(var o=0;o=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function Bte(e,t){t=t||{};for(var r=e.domain,n=e.range,a=n.length,i=new Array(a),o=0;o{"use strict";var Nte=qD(),frt=Nte.FORMAT_LINK,hrt=Nte.DATE_FORMAT_LINK;function drt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?yR:Ute)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function yR(e,t){return["Sets the "+e+" formatting rule"+(t?" for `"+t+"`":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+frt+"."].join(" ")}function Ute(e,t){return yR(e,t)+[" And for dates see: "+hrt+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{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*"].join(" ")}Vte.exports={axisHoverFormat:drt,descriptionOnlyNumbers:yR,descriptionWithDates:Ute}});var Wf=ne((oer,ire)=>{"use strict";var Gte=pl(),Ob=Ic(),are=xf().dash,bR=ci().extendFlat,Hte=Bo().templatedArray,ier=rs().templateFormatStringDescription,jte=Wl().descriptionWithDates,vrt=uo().ONEDAY,bp=zc(),prt=bp.HOUR_PATTERN,grt=bp.WEEKDAY_PATTERN,xR={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},mrt=bR({},xR,{values:xR.values.slice().concat(["sync"])});function Wte(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Yte={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Xte={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Zte={valType:"data_array",editType:"ticks"},$te={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Kte(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Jte(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Qte={valType:"color",dflt:Ob.defaultLine,editType:"ticks"},ere={valType:"color",dflt:Ob.lightLine,editType:"ticks"};function tre(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var rre=bR({},are,{editType:"ticks"}),nre={valType:"boolean",editType:"ticks"};ire.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Ob.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Gte({editType:"ticks",description:"Sets this axis' title font."}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[bp.idRegex.x.toString(),bp.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[bp.idRegex.x.toString(),bp.idRegex.y.toString()],editType:"calc"},rangebreaks:Hte("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[grt,prt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:vrt},editType:"calc"}),tickmode:mrt,nticks:Wte(),tick0:Yte,dtick:Xte,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:Zte,ticktext:{valType:"data_array",editType:"ticks"},ticks:$te,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:Kte(),tickwidth:Jte(),tickcolor:Qte,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:bR({},are,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:Gte({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:jte("tick label")},tickformatstops:Hte("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:jte("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Ob.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:nre,gridcolor:ere,gridwidth:tre(),griddash:rre,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Ob.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Ob.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",bp.idRegex.x.toString(),bp.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",bp.idRegex.x.toString(),bp.idRegex.y.toString()],editType:"plot"},minor:{tickmode:xR,nticks:Wte("minor"),tick0:Yte,dtick:Xte,tickvals:Zte,ticks:$te,ticklen:Kte("minor"),tickwidth:Jte("minor"),tickcolor:Qte,gridcolor:ere,gridwidth:tre("minor"),griddash:rre,showgrid:nre,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var hS=ne((ser,lre)=>{"use strict";var Yl=Wf(),ore=pl(),sre=ci().extendFlat,yrt=Il().overrideAll;lre.exports=yrt({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:Yl.linecolor,outlinewidth:Yl.linewidth,bordercolor:Yl.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:Yl.minor.tickmode,nticks:Yl.nticks,tick0:Yl.tick0,dtick:Yl.dtick,tickvals:Yl.tickvals,ticktext:Yl.ticktext,ticks:sre({},Yl.ticks,{dflt:""}),ticklabeloverflow:sre({},Yl.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:Yl.ticklen,tickwidth:Yl.tickwidth,tickcolor:Yl.tickcolor,ticklabelstep:Yl.ticklabelstep,showticklabels:Yl.showticklabels,labelalias:Yl.labelalias,tickfont:ore({description:"Sets the color bar's tick label font"}),tickangle:Yl.tickangle,tickformat:Yl.tickformat,tickformatstops:Yl.tickformatstops,tickprefix:Yl.tickprefix,showtickprefix:Yl.showtickprefix,ticksuffix:Yl.ticksuffix,showticksuffix:Yl.showticksuffix,separatethousands:Yl.separatethousands,exponentformat:Yl.exponentformat,minexponent:Yl.minexponent,showexponent:Yl.showexponent,title:{text:{valType:"string"},font:ore({description:"Sets this color bar's title font."}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var Ys=ne((uer,cre)=>{"use strict";var xrt=hS(),brt=(_b(),vl(bb)).counter,_rt=(By(),vl(qy)).default,ure=Iy().scales,ler=_rt(ure);function dS(e){return"`"+e+"`"}cre.exports=function(t,r){t=t||"",r=r||{};var n=r.cLetter||"c",a="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,i="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:n==="z",s=typeof r.colorscaleDflt=="string"?ure[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[n],f="in "+dS(u+c));var h=a?" Has an effect only if "+f+" is set to a numerical array.":"",v=n+"auto",d=n+"min",m=n+"max",x=n+"mid",g=dS(u+v),E=dS(u+d),M=dS(u+m),w=E+" and "+M,k={};k[d]=k[m]=void 0;var y={};y[v]=!1;var S={};return c==="color"&&(S.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(S.color.anim=!0)),S[v]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:k},S[d]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:y},S[m]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:y},S[x]={valType:"number",dflt:null,editType:"calc",impliedEdits:k},S.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},S.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},S.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(S.showscale={valType:"boolean",dflt:o,editType:"calc"},S.colorbar=xrt),r.noColorAxis||(S.coloraxis={valType:"subplotid",regex:brt("coloraxis"),dflt:null,editType:"calc"}),S}});var wR=ne((cer,fre)=>{"use strict";var wrt=ci().extendFlat,Trt=Ys(),_R=Iy().scales;fre.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:_R.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:_R.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:_R.RdBu,editType:"calc"}},coloraxis:wrt({_isSubplotObj:!0,editType:"calc"},Trt("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var TR=ne((fer,hre)=>{"use strict";var Art=Zt();hre.exports=function(t){return Art.isPlainObject(t.colorbar)}});var SR=ne(MR=>{"use strict";var AR=mi(),dre=Zt(),vre=uo(),Mrt=vre.ONEDAY,Srt=vre.ONEWEEK;MR.dtick=function(e,t){var r=t==="log",n=t==="date",a=t==="category",i=n?Mrt:1;if(!e)return i;if(AR(e))return e=Number(e),e<=0?i:a?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||r))return i;var o=e.charAt(0),s=e.slice(1);return s=AR(s)?Number(s):0,s<=0||!(n&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?i:e};MR.tick0=function(e,t,r,n){if(t==="date")return dre.cleanDate(e,dre.dateTick0(r,n%Srt===0?1:0));if(!(n==="D1"||n==="D2"))return AR(e)?Number(e):0}});var Xy=ne((der,gre)=>{"use strict";var pre=SR(),Ert=Zt().isArrayOrTypedArray,krt=Ih().isTypedArraySpec,Crt=Ih().decodeTypedArraySpec;gre.exports=function(t,r,n,a,i={}){var o=i.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(w){var k=s[w];return krt(k)&&(k=Crt(k)),k!==void 0?k:(l._template||{})[w]}var f=c("tick0"),h=c("dtick"),v=c("tickvals"),d=c("overlaying"),m=a==="category"||a==="multicategory",x;Ert(v)?x="array":h?x="linear":d&&!m?x="sync":x="auto";var g=n(u+"tickmode",x);if(g==="auto"||g==="sync")n(u+"nticks");else if(g==="linear"){var E=l.dtick=pre.dtick(h,a);l.tick0=pre.tick0(f,a,r.calendar,E)}else if(a!=="multicategory"){var M=n(u+"tickvals");M===void 0?l.tickmode="auto":o||n("ticktext")}}});var Nb=ne((ver,yre)=>{"use strict";var ER=Zt(),mre=Wf();yre.exports=function(t,r,n,a){var i=a.isMinor,o=i?t.minor||{}:t,s=i?r.minor:r,l=i?mre.minor:mre,u=i?"minor.":"",c=ER.coerce2(o,s,l,"ticklen",i?(r.ticklen||5)*.6:void 0),f=ER.coerce2(o,s,l,"tickwidth",i?r.tickwidth||1:void 0),h=ER.coerce2(o,s,l,"tickcolor",(i?r.tickcolor:void 0)||s.color),v=n(u+"ticks",!i&&a.outerTicks||c||f||h?"outside":"");v||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var kR=ne((per,xre)=>{"use strict";xre.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(i){return t[i]!==void 0}),a=function(i){return t[i]===t[n[0]]};if(n.every(a)||n.length===1)return t[n[0]]}});var zh=ne((ger,bre)=>{"use strict";var vS=Zt(),Lrt=Bo();bre.exports=function(t,r,n){var a=n.name,i=n.inclusionAttr||"visible",o=r[a],s=vS.isArrayOrTypedArray(t[a])?t[a]:[],l=r[a]=[],u=Lrt.arrayTemplater(r,a,i),c,f;for(c=0;c{"use strict";var CR=Zt(),Frt=_a().contrast,_re=Wf(),Prt=kR(),Drt=zh();wre.exports=function(t,r,n,a,i){i||(i={});var o=n("labelalias");CR.isPlainObject(o)||delete r.labelalias;var s=Prt(t),l=n("showticklabels");if(l){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var u=i.font||{},c=r.color,f=r.ticklabelposition||"",h=f.indexOf("inside")!==-1?Frt(i.bgColor):c&&c!==_re.color.dflt?c:u.color;if(CR.coerceFont(n,"tickfont",u,{overrideDflt:{color:h}}),!i.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&n("ticklabelstep"),!i.noAng){var v=n("tickangle");!i.noAutotickangles&&v==="auto"&&n("autotickangles")}if(a!=="category"){var d=n("tickformat");Drt(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Rrt}),r.tickformatstops.length||delete r.tickformatstops,!i.noExp&&!d&&a!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}!i.noMinorloglabels&&a==="log"&&n("minorloglabels")}};function Rrt(e,t){function r(a,i){return CR.coerce(e,t,_re.tickformatstops,a,i)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var jg=ne((yer,Tre)=>{"use strict";var Irt=kR();Tre.exports=function(t,r,n,a,i){i||(i={});var o=i.tickSuffixDflt,s=Irt(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var LR=ne((xer,Are)=>{"use strict";var Wg=Zt(),zrt=Bo(),qrt=Xy(),Brt=Nb(),Ort=Hg(),Nrt=jg(),Urt=hS();Are.exports=function(t,r,n){var a=zrt.newContainer(r,"colorbar"),i=t.colorbar||{};function o(A,P){return Wg.coerce(i,a,Urt,A,P)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o("orientation"),f=c==="v",h=o("thicknessmode");o("thickness",h==="fraction"?30/(f?l:u):30);var v=o("lenmode");o("len",v==="fraction"?1:f?u:l);var d=o("yref"),m=o("xref"),x=d==="paper",g=m==="paper",E,M,w,k="left";f?(w="middle",k=g?"left":"right",E=g?1.02:1,M=.5):(w=x?"bottom":"top",k="center",E=.5,M=x?1.02:1),Wg.coerce(i,a,{x:{valType:"number",min:g?-2:0,max:g?3:1,dflt:E}},"x"),Wg.coerce(i,a,{y:{valType:"number",min:x?-2:0,max:x?3:1,dflt:M}},"y"),o("xanchor",k),o("xpad"),o("yanchor",w),o("ypad"),Wg.noneOrAll(i,a,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var y=Wg.coerce(i,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",y.indexOf("inside")!==-1?"hide past domain":"hide past div"),qrt(i,a,o,"linear");var S=n.font,T={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:S};y.indexOf("inside")!==-1&&(T.bgColor="black"),Nrt(i,a,o,"linear",T),Ort(i,a,o,"linear",T),Brt(i,a,o,"linear",T),o("title.text",n._dfltTitle.colorbar);var p=a.showticklabels?a.tickfont:S,C=Wg.extendFlat({},S,{family:p.family,size:Wg.bigFont(p.size)});Wg.coerceFont(o,"title.font",C),o("title.side",f?"top":"right")}});var bf=ne((ber,Ere)=>{"use strict";var Mre=mi(),PR=Zt(),Vrt=TR(),Grt=LR(),Sre=Iy().isValid,Hrt=Fa().traceIs;function FR(e,t){var r=t.slice(0,t.length-1);return t?PR.nestedProperty(e,r).get()||{}:e}Ere.exports=function e(t,r,n,a,i){var o=i.prefix,s=i.cLetter,l="_module"in r,u=FR(t,o),c=FR(r,o),f=FR(r._template||{},o)||{},h=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,a,i)};if(l){var v=n._colorAxes||{},d=a(o+"coloraxis");if(d){var m=Hrt(r,"contour")&&PR.nestedProperty(r,"contours.coloring").get()||"heatmap",x=v[d];x?(x[2].push(h),x[0]!==m&&(x[0]=!1,PR.warn(["Ignoring coloraxis:",d,"setting","as it is linked to incompatible colorscales."].join(" ")))):v[d]=[m,r,[h]];return}}var g=u[s+"min"],E=u[s+"max"],M=Mre(g)&&Mre(E)&&g{"use strict";var kre=Zt(),jrt=Bo(),Cre=wR(),Wrt=bf();Lre.exports=function(t,r){function n(f,h){return kre.coerce(t,r,Cre,f,h)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var a=r._colorAxes,i,o;function s(f,h){return kre.coerce(i,o,Cre.coloraxis,f,h)}for(var l in a){var u=a[l];if(u[0])i=t[l]||{},o=jrt.newContainer(r,l,"coloraxis"),o._name=l,Wrt(i,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var Yrt=Zt(),Xrt=yh().hasColorscale,Zrt=yh().extractOpts;Pre.exports=function(t,r){function n(c,f){var h=c["_"+f];h!==void 0&&(c[f]=h)}function a(c,f){var h=f.container?Yrt.nestedProperty(c,f.container).get():c;if(h)if(h.coloraxis)h._colorAx=r[h.coloraxis];else{var v=Zrt(h),d=v.auto;(d||v.min===void 0)&&n(h,f.min),(d||v.max===void 0)&&n(h,f.max),v.autocolorscale&&n(h,"colorscale")}}for(var i=0;i{"use strict";var Rre=mi(),DR=Zt(),$rt=yh().extractOpts;Ire.exports=function(t,r,n){var a=t._fullLayout,i=n.vals,o=n.containerStr,s=o?DR.nestedProperty(r,o).get():r,l=$rt(s),u=l.auto!==!1,c=l.min,f=l.max,h=l.mid,v=function(){return DR.aggNums(Math.min,null,i)},d=function(){return DR.aggNums(Math.max,null,i)};if(c===void 0?c=v():u&&(s._colorAx&&Rre(c)?c=Math.min(c,v()):c=v()),f===void 0?f=d():u&&(s._colorAx&&Rre(f)?f=Math.max(f,d()):f=d()),u&&h!==void 0&&(f-h>h-c?c=h-(f-h):f-h=0?m=a.colorscale.sequential:m=a.colorscale.sequentialminus,l._sync("colorscale",m)}}});var El=ne((Aer,zre)=>{"use strict";var pS=Iy(),Ub=yh();zre.exports={moduleType:"component",name:"colorscale",attributes:Ys(),layoutAttributes:wR(),supplyLayoutDefaults:Fre(),handleDefaults:bf(),crossTraceDefaults:Dre(),calc:qh(),scales:pS.scales,defaultScale:pS.defaultScale,getScale:pS.get,isValidScale:pS.isValid,hasColorscale:Ub.hasColorscale,extractOpts:Ub.extractOpts,extractScale:Ub.extractScale,flipScale:Ub.flipScale,makeColorScaleFunc:Ub.makeColorScaleFunc,makeColorScaleFuncFromTrace:Ub.makeColorScaleFuncFromTrace}});var ml=ne((Mer,Bre)=>{"use strict";var qre=Zt(),Krt=Ih().isTypedArraySpec;Bre.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return qre.isPlainObject(t)&&(qre.isArrayOrTypedArray(t.size)||Krt(t.size))}}});var U5=ne((Ser,Ore)=>{"use strict";var Jrt=mi();Ore.exports=function(t,r){r||(r=2);var n=t.marker,a=n.sizeref||1,i=n.sizemin||0,o=n.sizemode==="area"?function(s){return Math.sqrt(s/a)}:function(s){return s/a};return function(s){var l=o(s/r);return Jrt(l)&&l>0?Math.max(l,i):0}}});var Hd=ne(Bh=>{"use strict";var gS=Zt();Bh.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Bh.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],a=0;a=0&&r.index{Vre.exports=nnt;var RR={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},rnt=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function nnt(e){var t=[];return e.replace(rnt,function(r,n,a){var i=n.toLowerCase();for(a=int(a),i=="m"&&a.length>2&&(t.push([n].concat(a.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(a.length==RR[i])return a.unshift(n),t.push(a);if(a.length{"use strict";var ont=V5(),la=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},$i="M0,0Z",Gre=Math.sqrt(2),Yg=Math.sqrt(3),IR=Math.PI,zR=Math.cos,qR=Math.sin;Xre.exports={circle:{n:0,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?Ji(t,r,a):a}},square:{n:1,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2);return Ji(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.3,2);return Ji(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*.4,2),a=la(e*1.2,2);return Ji(t,r,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*.8/Gre,2),a="l"+n+","+n,i="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return Ji(t,r,"M0,"+n+a+i+o+i+o+s+o+s+a+s+a+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*2/Yg,2),a=la(e/2,2),i=la(e,2);return Ji(t,r,"M-"+n+","+a+"H"+n+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*2/Yg,2),a=la(e/2,2),i=la(e,2);return Ji(t,r,"M-"+n+",-"+a+"H"+n+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*2/Yg,2),a=la(e/2,2),i=la(e,2);return Ji(t,r,"M"+a+",-"+n+"V"+n+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*2/Yg,2),a=la(e/2,2),i=la(e,2);return Ji(t,r,"M-"+a+",-"+n+"V"+n+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*.6,2),a=la(e*1.2,2);return Ji(t,r,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*.6,2),a=la(e*1.2,2);return Ji(t,r,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*.6,2),a=la(e*1.2,2);return Ji(t,r,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*.6,2),a=la(e*1.2,2);return Ji(t,r,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*.951,2),a=la(e*.588,2),i=la(-e,2),o=la(e*-.309,2),s=la(e*.809,2);return Ji(t,r,"M"+n+","+o+"L"+a+","+s+"H-"+a+"L-"+n+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2),a=la(e/2,2),i=la(e*Yg/2,2);return Ji(t,r,"M"+i+",-"+a+"V"+a+"L0,"+n+"L-"+i+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2),a=la(e/2,2),i=la(e*Yg/2,2);return Ji(t,r,"M-"+a+","+i+"H"+a+"L"+n+",0L"+a+",-"+i+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*.924,2),a=la(e*.383,2);return Ji(t,r,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,t,r){if(Ki(t))return $i;var n=e*1.4,a=la(n*.225,2),i=la(n*.951,2),o=la(n*.363,2),s=la(n*.588,2),l=la(-n,2),u=la(n*-.309,2),c=la(n*.118,2),f=la(n*.809,2),h=la(n*.382,2);return Ji(t,r,"M"+a+","+u+"H"+i+"L"+o+","+c+"L"+s+","+f+"L0,"+h+"L-"+s+","+f+"L-"+o+","+c+"L-"+i+","+u+"H-"+a+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*.66,2),a=la(e*.38,2),i=la(e*.76,2);return Ji(t,r,"M-"+i+",0l-"+a+",-"+n+"h"+i+"l"+a+",-"+n+"l"+a+","+n+"h"+i+"l-"+a+","+n+"l"+a+","+n+"h-"+i+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*Yg*.8,2),a=la(e*.8,2),i=la(e*1.6,2),o=la(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Ji(t,r,"M-"+n+","+a+s+n+","+a+s+"0,-"+i+s+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*Yg*.8,2),a=la(e*.8,2),i=la(e*1.6,2),o=la(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Ji(t,r,"M"+n+",-"+a+s+"-"+n+",-"+a+s+"0,"+i+s+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.1,2),a=la(e*2,2),i="A "+a+","+a+" 0 0 1 ";return Ji(t,r,"M-"+n+",-"+n+i+"-"+n+","+n+i+n+","+n+i+n+",-"+n+i+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.4,2),a=la(e*1.9,2),i="A "+a+","+a+" 0 0 1 ";return Ji(t,r,"M-"+n+",0"+i+"0,"+n+i+n+",0"+i+"0,-"+n+i+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*.7,2),a=la(e*1.4,2);return Ji(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.4,2),a=la(e*.7,2);return Ji(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2);return Ji(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2);return Ji(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2);return Ji(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2),a=la(e/Gre,2);return Ji(t,r,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2);return Ji(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2);return Ji(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.3,2);return Ji(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.3,2),a=la(e*.65,2);return Ji(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.4,2);return Ji(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2);return Ji(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.2,2),a=la(e*.85,2);return Ji(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(Ki(t))return $i;var n=la(e/2,2),a=la(e,2);return Ji(t,r,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.2,2),a=la(e*1.6,2),i=la(e*.8,2);return Ji(t,r,"M-"+n+","+i+"L0,0M"+n+","+i+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.2,2),a=la(e*1.6,2),i=la(e*.8,2);return Ji(t,r,"M-"+n+",-"+i+"L0,0M"+n+",-"+i+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.2,2),a=la(e*1.6,2),i=la(e*.8,2);return Ji(t,r,"M"+i+","+n+"L0,0M"+i+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.2,2),a=la(e*1.6,2),i=la(e*.8,2);return Ji(t,r,"M-"+i+","+n+"L0,0M-"+i+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.4,2);return Ji(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*1.4,2);return Ji(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2);return Ji(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2);return Ji(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2),a=la(e*2,2);return Ji(t,r,"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2),a=la(e*2,2);return Ji(t,r,"M0,0L-"+n+",-"+a+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*2,2),a=la(e,2);return Ji(t,r,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*2,2),a=la(e,2);return Ji(t,r,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2),a=la(e*2,2);return Ji(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(Ki(t))return $i;var n=la(e,2),a=la(e*2,2);return Ji(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+a+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*2,2),a=la(e,2);return Ji(t,r,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(Ki(t))return $i;var n=la(e*2,2),a=la(e,2);return Ji(t,r,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(Ki(t))return $i;var n=IR/2.5,a=2*e*zR(n),i=2*e*qR(n);return Ji(t,r,"M0,0L"+-a+","+i+"L"+a+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(Ki(t))return $i;var n=IR/4,a=2*e*zR(n),i=2*e*qR(n);return Ji(t,r,"M0,0L"+-a+","+i+"A "+2*e+","+2*e+" 0 0 1 "+a+","+i+"Z")},backoff:.4,noDot:!0}};function Ki(e){return e===null}var Hre,jre,Wre,Yre;function Ji(e,t,r){if((!e||e%360===0)&&!t)return r;if(Wre===e&&Yre===t&&Hre===r)return jre;Wre=e,Yre=t,Hre=r;function n(x,g){var E=zR(x),M=qR(x),w=g[0],k=g[1]+(t||0);return[w*E-k*M,w*M+k*E]}for(var a=e/180*IR,i=0,o=0,s=ont(r),l="",u=0;u{"use strict";var _f=Ea(),qs=Zt(),snt=qs.numberFormat,Xg=mi(),yS=Fa(),Qc=_a(),lnt=El(),H5=qs.strTranslate,xS=Ms(),unt=qv(),cnt=qc(),fnt=cnt.LINE_SPACING,ine=A1().DESELECTDIM,hnt=ml(),dnt=U5(),vnt=Hd().appendArrayPointValue,Ta=pne.exports={};Ta.font=function(e,t){var r=t.variant,n=t.style,a=t.weight,i=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),i&&e.call(Qc.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),r&&e.style("font-variant",r),c&&e.style("text-transform",BR(gnt(c))),l&&e.style("text-shadow",l==="auto"?xS.makeTextShadow(Qc.contrast(i)):BR(l)),u&&e.style("text-decoration-line",BR(mnt(u)))};function BR(e){return e==="none"?void 0:e}var pnt={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function gnt(e){return pnt[e]}function mnt(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}Ta.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};Ta.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};Ta.setRect=function(e,t,r,n,a){e.call(Ta.setPosition,t,r).call(Ta.setSize,n,a)};Ta.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);if(Xg(a)&&Xg(i)&&t.node())t.node().nodeName==="text"?t.attr("x",a).attr("y",i):t.attr("transform",H5(a,i));else return!1;return!0};Ta.translatePoints=function(e,t,r){e.each(function(n){var a=_f.select(this);Ta.translatePoint(n,a,t,r)})};Ta.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")};Ta.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(a){var i=a[0].trace,o=i.xcalendar,s=i.ycalendar,l=yS.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){Ta.hideOutsideRangePoint(u,_f.select(this),r,n,o,s)})})}};Ta.crispRound=function(e,t,r){return!t||!Xg(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};Ta.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,s=a||i.dash||"";Qc.stroke(t,n||i.color),Ta.dashLine(t,s,o)};Ta.lineGroupStyle=function(e,t,r,n){e.style("fill","none").each(function(a){var i=(((a||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,s=n||i.dash||"";_f.select(this).call(Qc.stroke,r||i.color).call(Ta.dashLine,s,o)})};Ta.dashLine=function(e,t,r){r=+r||0,t=Ta.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};Ta.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function one(e,t,r,n){var a=t.fillpattern,i=t.fillgradient,o=Ta.getPatternAttr,s=a&&(o(a.shape,0,"")||o(a.path,0,""));if(s){var l=o(a.bgcolor,0,null),u=o(a.fgcolor,0,null),c=a.fgopacity,f=o(a.size,0,8),h=o(a.solidity,0,.3),v=t.uid;Ta.pattern(e,"point",r,v,s,f,h,void 0,a.fillmode,l,u,c)}else if(i&&i.type!=="none"){var d=i.type,m="scatterfill-"+t.uid;if(n&&(m="legendfill-"+t.uid),!n&&(i.start!==void 0||i.stop!==void 0)){var x,g;d==="horizontal"?(x={x:i.start,y:0},g={x:i.stop,y:0}):d==="vertical"&&(x={x:0,y:i.start},g={x:0,y:i.stop}),x.x=t._xA.c2p(x.x===void 0?t._extremes.x.min[0].val:x.x,!0),x.y=t._yA.c2p(x.y===void 0?t._extremes.y.min[0].val:x.y,!0),g.x=t._xA.c2p(g.x===void 0?t._extremes.x.max[0].val:g.x,!0),g.y=t._yA.c2p(g.y===void 0?t._extremes.y.max[0].val:g.y,!0),e.call(une,r,m,"linear",i.colorscale,"fill",x,g,!0,!1)}else d==="horizontal"&&(d=d+"reversed"),e.call(Ta.gradient,r,m,d,i.colorscale,"fill")}else t.fillcolor&&e.call(Qc.fill,t.fillcolor)}Ta.singleFillStyle=function(e,t){var r=_f.select(e.node()),n=r.data(),a=((n[0]||[])[0]||{}).trace||{};one(e,a,t,!1)};Ta.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var a=_f.select(this);n[0].trace&&one(a,n[0].trace,t,r)})};var $re=Zre();Ta.symbolNames=[];Ta.symbolFuncs=[];Ta.symbolBackOffs=[];Ta.symbolNeedLines={};Ta.symbolNoDot={};Ta.symbolNoFill={};Ta.symbolList=[];Object.keys($re).forEach(function(e){var t=$re[e],r=t.n;Ta.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),Ta.symbolNames[r]=e,Ta.symbolFuncs[r]=t.f,Ta.symbolBackOffs[r]=t.backoff||0,t.needLine&&(Ta.symbolNeedLines[r]=!0),t.noDot?Ta.symbolNoDot[r]=!0:Ta.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(Ta.symbolNoFill[r]=!0)});var ynt=Ta.symbolNames.length,xnt="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";Ta.symbolNumber=function(e){if(Xg(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=Ta.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=ynt||e>=400?0:Math.floor(Math.max(e,0))};function sne(e,t,r,n){var a=e%100;return Ta.symbolFuncs[a](t,r,n)+(e>=200?xnt:"")}var Kre=snt("~f"),lne={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};Ta.gradient=function(e,t,r,n,a,i){var o=lne[n];return une(e,t,r,o.type,a,i,o.start,o.stop,!1,o.reversed)};function une(e,t,r,n,a,i,o,s,l,u){var c=a.length,f;n==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(f={node:"radialGradient",reversed:u});for(var h=new Array(c),v=0;v=0&&e.i===void 0&&(e.i=i.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=Ta.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=jR(e,r),f=HR(e,r);t.attr("d",sne(u,l,c,f))}var h=!1,v,d,m;if(e.so)m=s.outlierwidth,d=s.outliercolor,v=o.outliercolor;else{var x=(s||{}).width;m=(e.mlw+1||x+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?d=e.mlcc=n.lineScale(e.mlc):qs.isArrayOrTypedArray(s.color)?d=Qc.defaultLine:d=s.color,qs.isArrayOrTypedArray(o.color)&&(v=Qc.defaultLine,h=!0),"mc"in e?v=e.mcc=n.markerScale(e.mc):v=o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(v=n.selectedColorFn(e))}let g=e.mld||(s||{}).dash;if(g&&Ta.dashLine(t,g,m),e.om)t.call(Qc.stroke,v).style({"stroke-width":(m||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:m)+"px");var E=o.gradient,M=e.mgt;M?h=!0:M=E&&E.type,qs.isArrayOrTypedArray(M)&&(M=M[0],lne[M]||(M=0));var w=o.pattern,k=Ta.getPatternAttr,y=w&&(k(w.shape,e.i,"")||k(w.path,e.i,""));if(M&&M!=="none"){var S=e.mgc;S?h=!0:S=E.color;var T=r.uid;h&&(T+="-"+e.i),Ta.gradient(t,a,T,M,[[0,S],[1,v]],"fill")}else if(y){var p=!1,C=w.fgcolor;!C&&i&&i.color&&(C=i.color,p=!0);var A=k(C,e.i,i&&i.color||null),P=k(w.bgcolor,e.i,null),D=w.fgopacity,z=k(w.size,e.i,8),q=k(w.solidity,e.i,.3);p=p||e.mcc||qs.isArrayOrTypedArray(w.shape)||qs.isArrayOrTypedArray(w.path)||qs.isArrayOrTypedArray(w.bgcolor)||qs.isArrayOrTypedArray(w.fgcolor)||qs.isArrayOrTypedArray(w.size)||qs.isArrayOrTypedArray(w.solidity);var U=r.uid;p&&(U+="-"+e.i),Ta.pattern(t,"point",a,U,y,z,q,e.mcc,w.fillmode,P,A,D)}else qs.isArrayOrTypedArray(v)?Qc.fill(t,v[e.i]):Qc.fill(t,v);m&&Qc.stroke(t,d)}};Ta.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=Ta.tryColorscale(r,""),t.lineScale=Ta.tryColorscale(r,"line"),yS.traceIs(e,"symbols")&&(t.ms2mrc=hnt.isBubble(e)?dnt(e):function(){return(r.size||6)/2}),e.selectedpoints&&qs.extendFlat(t,Ta.makeSelectedPointStyleFns(e)),t};Ta.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.marker||{},i=r.marker||{},o=n.marker||{},s=a.opacity,l=i.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(qs.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(w){var k=w.mo===void 0?a.opacity:w.mo;return w.selected?c?l:k:f?u:ine*k});var h=a.color,v=i.color,d=o.color;(v||d)&&(t.selectedColorFn=function(w){var k=w.mcc||h;return w.selected?v||k:d||k});var m=a.size,x=i.size,g=o.size,E=x!==void 0,M=g!==void 0;return yS.traceIs(e,"symbols")&&(E||M)&&(t.selectedSizeFn=function(w){var k=w.mrc||m/2;return w.selected?E?x/2:k:M?g/2:k}),t};Ta.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},s=a.color,l=i.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Qc.addOpacity(f,ine))},t};Ta.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedPointStyleFns(t),n=t.marker||{},a=[];r.selectedOpacityFn&&a.push(function(i,o){i.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&a.push(function(i,o){Qc.fill(i,r.selectedColorFn(o))}),r.selectedSizeFn&&a.push(function(i,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);i.attr("d",sne(Ta.symbolNumber(s),l,jR(o,t),HR(o,t))),o.mrc2=l}),a.length&&e.each(function(i){for(var o=_f.select(this),s=0;s0?r:0}Ta.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var a=Ta.makeSelectedTextStyleFns(t);n=a.selectedTextColorFn}var i=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=_f.select(this),u=i?qs.extractOption(s,t,"txt","texttemplate"):qs.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(i){var c=t._module.formatLabels,f=c?c(s,t,o):{},h={};vnt(h,t,s.i),u=qs.texttemplateString({data:[h,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var v=s.tp||t.textposition,d=fne(s,t),m=n?n(s):s.tc||t.textfont.color;l.call(Ta.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:d,color:m}).text(u).call(xS.convertToTspans,r).call(cne,v,d,s.mrc)})}};Ta.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=Ta.makeSelectedTextStyleFns(t);e.each(function(n){var a=_f.select(this),i=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=fne(n,t);Qc.fill(a,i);var l=yS.traceIs(t,"bar-like");cne(a,o,s,n.mrc2||n.mrc,l)})}};var Jre=.5;Ta.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],a;for(a=1;a=l||w>=c&&w<=l)&&(k<=f&&k>=u||k>=f&&k<=u)&&(e=[w,k])}return e}Ta.applyBackoff=vne;Ta.makeTester=function(){var e=qs.ensureSingleById(_f.select("body"),"svg","js-plotly-tester",function(r){r.attr(unt.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=qs.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});Ta.tester=e,Ta.testref=t};Ta.savedBBoxes={};var NR=0,wnt=1e4;Ta.bBox=function(e,t,r){r||(r=Qre(e));var n;if(r){if(n=Ta.savedBBoxes[r],n)return qs.extendFlat({},n)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(r=Qre(a),r){var i=+a.getAttribute("x")||0,o=+a.getAttribute("y")||0,s=a.getAttribute("transform");if(!s){var l=Ta.bBox(a,!1,r);return i&&(l.left+=i,l.right+=i),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+i+"~"+o+"~"+s,n=Ta.savedBBoxes[r],n)return qs.extendFlat({},n)}}var u,c;t?u=e:(c=Ta.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),_f.select(u).attr("transform",null).call(xS.positionText,0,0);var f=u.getBoundingClientRect(),h=Ta.testref.node().getBoundingClientRect();t||c.removeChild(u);var v={height:f.height,width:f.width,left:f.left-h.left,top:f.top-h.top,right:f.right-h.left,bottom:f.bottom-h.top};return NR>=wnt&&(Ta.savedBBoxes={},NR=0),r&&(Ta.savedBBoxes[r]=v),NR++,qs.extendFlat({},v)};function Qre(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}Ta.setClipUrl=function(e,t,r){e.attr("clip-path",GR(t,r))};function GR(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}Ta.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",a=n.replace(t,function(i,o,s){return[o,s].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};Ta.setTranslate=function(e,t,r){var n=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return t=t||0,r=r||0,o=o.replace(n,"").trim(),o+=H5(t,r),o=o.trim(),e[i]("transform",o),o};Ta.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",a=n.replace(t,function(i,o,s){return[o,s].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};Ta.setScale=function(e,t,r){var n=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return t=t||1,r=r||1,o=o.replace(n,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[i]("transform",o),o};var Tnt=/\s*sc.*/;Ta.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(Tnt,"");a+=n,a=a.trim(),this.setAttribute("transform",a)})}};var Ant=/translate\([^)]*\)\s*$/;Ta.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,a=_f.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(Ant);t===1&&r===1?n=[]:n=[H5(o,s),"scale("+t+","+r+")",H5(-o,-s)],l&&n.push(l),a.attr("transform",n.join(""))}})};function HR(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}Ta.getMarkerStandoff=HR;var G5=Math.atan2,Zy=Math.cos,Gb=Math.sin;function ene(e,t){var r=t[0],n=t[1];return[r*Zy(e)-n*Gb(e),r*Gb(e)+n*Zy(e)]}var tne,rne,nne,ane,UR,VR;function jR(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!Xg(r)||qs.isArrayOrTypedArray(r))&&(r=0));var n,a,i=t.marker.angleref;if(i==="previous"||i==="north"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],a=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),a=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),h=t._geo.project([u+1e-5,c]),v=G5(h[1]-a,h[0]-n),d=G5(f[1]-a,f[0]-n),m;if(i==="north")m=r/180*Math.PI;else if(i==="previous"){var x=u/180*Math.PI,g=c/180*Math.PI,E=tne/180*Math.PI,M=rne/180*Math.PI,w=E-x,k=Zy(M)*Gb(w),y=Gb(M)*Zy(g)-Zy(M)*Gb(g)*Zy(w);m=-G5(k,y)-Math.PI,tne=u,rne=c}var S=ene(v,[Zy(m),0]),T=ene(d,[Gb(m),0]);r=G5(S[1]+T[1],S[0]+T[0])/Math.PI*180,i==="previous"&&!(VR===t.uid&&e.i===UR+1)&&(r=null)}if(i==="previous"&&!t._geo)if(VR===t.uid&&e.i===UR+1&&Xg(n)&&Xg(a)){var p=n-nne,C=a-ane,A=t.line&&t.line.shape||"",P=A.slice(A.length-1);P==="h"&&(C=0),P==="v"&&(p=0),r+=G5(C,p)/Math.PI*180+90}else r=null}return nne=n,ane=a,UR=e.i,VR=t.uid,r}Ta.getMarkerAngle=jR});var Qy=ne((Fer,xne)=>{"use strict";var Hb=Ea(),Mnt=mi(),Snt=Sl(),WR=Fa(),Jy=Zt(),gne=Jy.strTranslate,bS=li(),_S=_a(),jb=Ms(),mne=A1(),Ent=qc().OPPOSITE_SIDE,yne=/ [XY][0-9]* /,YR=1.6,XR=1.6;function knt(e,t,r){var n=e._fullLayout,a=r.propContainer,i=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,h=1,v=a.title,d=(v&&v.text?v.text:"").trim(),m=!1,x=v&&v.font?v.font:{},g=x.family,E=x.size,M=x.color,w=x.weight,k=x.style,y=x.variant,S=x.textcase,T=x.lineposition,p=x.shadow,C=r.subtitlePropName,A=!!C,P=r.subtitlePlaceholder,D=(a.title||{}).subtitle||{text:"",font:{}},z=(D.text||"").trim(),q=!1,U=1,O=D.font,R=O.family,B=O.size,Y=O.color,X=O.weight,te=O.style,se=O.variant,ue=O.textcase,re=O.lineposition,j=O.shadow,fe;i==="title.text"?fe="titleText":i.indexOf("axis")!==-1?fe="axisTitleText":i.indexOf("colorbar")!==-1&&(fe="colorbarTitleText");var ce=e._context.edits[fe];function oe(lt,Ie){return lt===void 0||Ie===void 0?!1:lt.replace(yne," % ")===Ie.replace(yne," % ")}d===""?h=0:oe(d,o)&&(ce||(d=""),h=.2,m=!0),A&&(z===""?U=0:oe(z,P)&&(ce||(z=""),U=.2,q=!0)),r._meta?d=Jy.templateString(d,r._meta):n._meta&&(d=Jy.templateString(d,n._meta));var we=d||z||ce,he;f||(f=Jy.ensureSingle(n._infolayer,"g","g-"+t),he=n._hColorbarMoveTitle);var ye=f.selectAll("text."+t).data(we?[0]:[]);ye.enter().append("text"),ye.text(d).attr("class",t),ye.exit().remove();var Pe=null,le=t+"-subtitle",ze=z||ce;if(A&&(Pe=f.selectAll("text."+le).data(ze?[0]:[]),Pe.enter().append("text"),Pe.text(z).attr("class",le),Pe.exit().remove()),!we)return f;function Xe(lt,Ie){Jy.syncOrAsync([vt,st],{title:lt,subtitle:Ie})}function vt(lt){var Ie=lt.title,de=lt.subtitle,Ee;!c&&he&&(c={}),c?(Ee="",c.rotate&&(Ee+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||he)&&(Ee+=gne(0,(c.offset||0)-(he||0)))):Ee=null,Ie.attr("transform",Ee);function Ue(Qe){if(Qe){var We=Hb.select(Qe.node().parentNode).select("."+le);if(!We.empty()){var pt=Qe.node().getBBox();if(pt.height){var kt=pt.y+pt.height+YR*B;We.attr("y",kt)}}}}if(Ie.style("opacity",h*_S.opacity(M)).call(bS.font,{color:_S.rgb(M),size:Hb.round(E,2),family:g,weight:w,style:k,variant:y,textcase:S,shadow:p,lineposition:T}).attr(u).call(jb.convertToTspans,e,Ue),de&&!de.empty()){var ge=f.select("."+t+"-math-group"),Ge=Ie.node().getBBox(),tt=ge.node()?ge.node().getBBox():void 0,ft=tt?tt.y+tt.height+YR*B:Ge.y+Ge.height+XR*B,He=Jy.extendFlat({},u,{y:ft});de.attr("transform",Ee),de.style("opacity",U*_S.opacity(Y)).call(bS.font,{color:_S.rgb(Y),size:Hb.round(B,2),family:R,weight:X,style:te,variant:se,textcase:ue,shadow:j,lineposition:re}).attr(He).call(jb.convertToTspans,e)}return Snt.previousPromises(e)}function st(lt){var Ie=lt.title,de=Hb.select(Ie.node().parentNode);if(l&&l.selection&&l.side&&d){de.attr("transform",null);var Ee=Ent[l.side],Ue=l.side==="left"||l.side==="top"?-1:1,ge=Mnt(l.pad)?l.pad:2,Ge=bS.bBox(de.node()),tt={t:0,b:0,l:0,r:0},ft=e._fullLayout._reservedMargin;for(var He in ft)for(var Qe in ft[He]){var We=ft[He][Qe];tt[Qe]=Math.max(tt[Qe],We)}var pt={left:tt.l,top:tt.t,right:n.width-tt.r,bottom:n.height-tt.b},kt=l.maxShift||Ue*(pt[l.side]-Ge[l.side]),qt=0;if(kt<0)qt=kt;else{var Wt=l.offsetLeft||0,_r=l.offsetTop||0;Ge.left-=Wt,Ge.right-=Wt,Ge.top-=_r,Ge.bottom-=_r,l.selection.each(function(){var lr=bS.bBox(this);Jy.bBoxIntersect(Ge,lr,ge)&&(qt=Math.max(qt,Ue*(lr[l.side]-Ge[Ee])+ge))}),qt=Math.min(kt,qt),a._titleScoot=Math.abs(qt)}if(qt>0||kt<0){var tr={left:[-qt,0],right:[qt,0],top:[0,-qt],bottom:[0,qt]}[l.side];de.attr("transform",gne(tr[0],tr[1]))}}}ye.call(Xe,Pe);function Oe(lt,Ie){lt.text(Ie).on("mouseover.opacity",function(){Hb.select(this).transition().duration(mne.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){Hb.select(this).transition().duration(mne.HIDE_PLACEHOLDER).style("opacity",0)})}if(ce&&(d?ye.on(".opacity",null):(Oe(ye,o),m=!0),ye.call(jb.makeEditable,{gd:e}).on("edit",function(lt){s!==void 0?WR.call("_guiRestyle",e,i,lt,s):WR.call("_guiRelayout",e,i,lt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Xe)}).on("input",function(lt){this.text(lt||" ").call(jb.positionText,u.x,u.y)}),A)){if(A&&!d){var qe=ye.node().getBBox(),mt=qe.y+qe.height+XR*B;Pe.attr("y",mt)}z?Pe.on(".opacity",null):(Oe(Pe,P),q=!0),Pe.call(jb.makeEditable,{gd:e}).on("edit",function(lt){WR.call("_guiRelayout",e,"title.subtitle.text",lt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Xe)}).on("input",function(lt){this.text(lt||" ").call(jb.positionText,Pe.attr("x"),Pe.attr("y"))})}return ye.classed("js-placeholder",m),Pe&&!Pe.empty()&&Pe.classed("js-placeholder",q),f}xne.exports={draw:knt,SUBTITLE_PADDING_EM:XR,SUBTITLE_PADDING_MATHJAX_EM:YR}});var Tp=ne((Per,Ane)=>{"use strict";var Cnt=Ea(),Lnt=ub().utcFormat,yl=Zt(),Fnt=yl.numberFormat,_p=mi(),Zg=yl.cleanNumber,Pnt=yl.ms2DateTime,bne=yl.dateTime2ms,wp=yl.ensureNumber,_ne=yl.isArrayOrTypedArray,$g=uo(),wS=$g.FP_SAFE,R0=$g.BADNUM,Dnt=$g.LOG_CLIP,Rnt=$g.ONEWEEK,TS=$g.ONEDAY,AS=$g.ONEHOUR,wne=$g.ONEMIN,Tne=$g.ONESEC,MS=uu(),kS=zc(),SS=kS.HOUR_PATTERN,ES=kS.WEEKDAY_PATTERN;function j5(e){return Math.pow(10,e)}function ZR(e){return e!=null}Ane.exports=function(t,r){r=r||{};var n=t._id||"x",a=n.charAt(0);function i(w,k){if(w>0)return Math.log(w)/Math.LN10;if(w<=0&&k&&t.range&&t.range.length===2){var y=t.range[0],S=t.range[1];return .5*(y+S-2*Dnt*Math.abs(y-S))}else return R0}function o(w,k,y,S){if((S||{}).msUTC&&_p(w))return+w;var T=bne(w,y||t.calendar);if(T===R0)if(_p(w)){w=+w;var p=Math.floor(yl.mod(w+.05,1)*10),C=Math.round(w-p/10);T=bne(new Date(C))+p/10}else return R0;return T}function s(w,k,y){return Pnt(w,k,y||t.calendar)}function l(w){return t._categories[Math.round(w)]}function u(w){if(ZR(w)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[w]!==void 0)return t._categoriesMap[w];t._categories.push(typeof w=="number"?String(w):w);var k=t._categories.length-1;return t._categoriesMap[w]=k,k}return R0}function c(w,k){for(var y=new Array(k),S=0;St.range[1]&&(y=!y);for(var S=y?-1:1,T=S*w,p=0,C=0;CP)p=C+1;else{p=T<(A+P)/2?C:C+1;break}}var D=t._B[p]||0;return isFinite(D)?d(w,t._m2,D):0},g=function(w){var k=t._rangebreaks.length;if(!k)return m(w,t._m,t._b);for(var y=0,S=0;St._rangebreaks[S].pmax&&(y=S+1);return m(w,t._m2,t._B[y])}}t.c2l=t.type==="log"?i:wp,t.l2c=t.type==="log"?j5:wp,t.l2p=x,t.p2l=g,t.c2p=t.type==="log"?function(w,k){return x(i(w,k))}:x,t.p2c=t.type==="log"?function(w){return j5(g(w))}:g,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=Zg,t.c2d=t.c2r=t.l2d=t.l2r=wp,t.d2p=t.r2p=function(w){return t.l2p(Zg(w))},t.p2d=t.p2r=g,t.cleanPos=wp):t.type==="log"?(t.d2r=t.d2l=function(w,k){return i(Zg(w),k)},t.r2d=t.r2c=function(w){return j5(Zg(w))},t.d2c=t.r2l=Zg,t.c2d=t.l2r=wp,t.c2r=i,t.l2d=j5,t.d2p=function(w,k){return t.l2p(t.d2r(w,k))},t.p2d=function(w){return j5(g(w))},t.r2p=function(w){return t.l2p(Zg(w))},t.p2r=g,t.cleanPos=wp):t.type==="date"?(t.d2r=t.r2d=yl.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(w,k,y){return t.l2p(o(w,0,y))},t.p2d=t.p2r=function(w,k,y){return s(g(w),k,y)},t.cleanPos=function(w){return yl.cleanDate(w,R0,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(w){var k=v(w);return k!==void 0?k:t.fraction2r(.5)},t.l2r=t.c2r=wp,t.r2l=v,t.d2p=function(w){return t.l2p(t.r2c(w))},t.p2d=function(w){return l(g(w))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(w){return typeof w=="string"&&w!==""?w:wp(w)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=h,t.r2c=function(w){var k=h(w);return k!==void 0?k:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=wp,t.r2l=h,t.d2p=function(w){return t.l2p(t.r2c(w))},t.p2d=function(w){return l(g(w))},t.r2p=t.d2p,t.p2r=g,t.cleanPos=function(w){return Array.isArray(w)||typeof w=="string"&&w!==""?w:wp(w)},t.setupMultiCategory=function(w){var k=t._traceIndices,y,S,T=t._matchGroup;if(T&&t._categories.length===0){for(var p in T)if(p!==n){var C=r[MS.id2name(p)];k=k.concat(C._traceIndices)}}var A=[[0,{}],[0,{}]],P=[];for(y=0;yC[1]&&(S[p?0:1]=y,T[1]=C[1]),T[0]>=T[1])if(k!==void 0){var A=C[0]+1;y!==void 0&&(A=Math.min(A,C[1])),S[p?0:1]=t.l2r(A)}else y!==void 0&&(S[p?1:0]=t.l2r(C[1]-1))}},t.cleanRange=function(w,k){t._cleanRange(w,k),t.limitRange(w)},t._cleanRange=function(w,k){k||(k={}),w||(w="range");var y=yl.nestedProperty(t,w).get(),S,T;if(t.type==="date"?T=yl.dfltRange(t.calendar):a==="y"?T=kS.DFLTRANGEY:t._name==="realaxis"?T=[0,1]:T=k.dfltRange||kS.DFLTRANGEX,T=T.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(T[0]=0),!y||y.length!==2){yl.nestedProperty(t,w).set(T);return}var p=y[0]===null,C=y[1]===null;for(t.type==="date"&&!t.autorange&&(y[0]=yl.cleanDate(y[0],R0,t.calendar),y[1]=yl.cleanDate(y[1],R0,t.calendar)),S=0;S<2;S++)if(t.type==="date"){if(!yl.isDateTime(y[S],t.calendar)){t[w]=T;break}if(t.r2l(y[0])===t.r2l(y[1])){var A=yl.constrain(t.r2l(y[0]),yl.MIN_MS+1e3,yl.MAX_MS-1e3);y[0]=t.l2r(A-1e3),y[1]=t.l2r(A+1e3);break}}else{if(!_p(y[S]))if(!(p||C)&&_p(y[1-S]))y[S]=y[1-S]*(S?10:.1);else{t[w]=T;break}if(y[S]<-wS?y[S]=-wS:y[S]>wS&&(y[S]=wS),y[0]===y[1]){var P=Math.max(1,Math.abs(y[0]*1e-6));y[0]-=P,y[1]+=P}}},t.setScale=function(w){var k=r._size;if(t.overlaying){var y=MS.getFromId({_fullLayout:r},t.overlaying);t.domain=y.domain}var S=w&&t._r?"_r":"range",T=t.calendar;t.cleanRange(S);var p=t.r2l(t[S][0],T),C=t.r2l(t[S][1],T),A=a==="y";if(A?(t._offset=k.t+(1-t.domain[1])*k.h,t._length=k.h*(t.domain[1]-t.domain[0]),t._m=t._length/(p-C),t._b=-t._m*C):(t._offset=k.l+t.domain[0]*k.w,t._length=k.w*(t.domain[1]-t.domain[0]),t._m=t._length/(C-p),t._b=-t._m*p),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var P,D;if(t._rangebreaks=t.locateBreaks(Math.min(p,C),Math.max(p,C)),t._rangebreaks.length){for(P=0;PC&&(z=!z),z&&t._rangebreaks.reverse();var q=z?-1:1;for(t._m2=q*t._length/(Math.abs(C-p)-t._lBreaks),t._B.push(-t._m2*(A?C:p)),P=0;PT&&(T+=7,pT&&(T+=24,p=S&&p=S&&w=j.min&&(tej.max&&(j.max=se),ue=!1)}ue&&C.push({min:te,max:se})}};for(y=0;y{"use strict";var Mne=mi(),$R=Zt(),Int=uo().BADNUM,CS=$R.isArrayOrTypedArray,znt=$R.isDateTime,qnt=$R.cleanNumber,Sne=Math.round;kne.exports=function(t,r,n){var a=t,i=n.noMultiCategory;if(CS(a)&&!a.length)return"-";if(!i&&Vnt(a))return"multicategory";if(i&&Array.isArray(a[0])){for(var o=[],s=0;si*2}function Ene(e){return Math.max(1,(e-1)/1e3)}function Unt(e,t){for(var r=e.length,n=Ene(r),a=0,i=0,o={},s=0;sa*2}function Vnt(e){return CS(e[0])&&CS(e[1])}});var I0=ne((Rer,zne)=>{"use strict";var Gnt=Ea(),Pne=mi(),Kg=Zt(),LS=uo().FP_SAFE,Hnt=Fa(),jnt=li(),Dne=uu(),Wnt=Dne.getFromId,Ynt=Dne.isLinked;zne.exports={applyAutorangeOptions:Ine,getAutoRange:KR,makePadFn:JR,doAutoRange:Znt,findExtremes:$nt,concatExtremes:tI};function KR(e,t){var r,n,a=[],i=e._fullLayout,o=JR(i,t,0),s=JR(i,t,1),l=tI(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return Kg.simpleMap(t.range,t.r2l);var f=u[0].val,h=c[0].val;for(r=1;r0&&(C=M-o(y)-s(S),C>w?A/C>k&&(T=y,p=S,k=A/C):A/M>k&&(T={val:y.val,nopad:1},p={val:S.val,nopad:1},k=A/M));function P(O,R){return Math.max(O,s(R))}if(f===h){var D=f-1,z=f+1;if(g)if(f===0)a=[0,1];else{var q=(f>0?c:u).reduce(P,0),U=f/(1-Math.min(.5,q/M));a=f>0?[0,U]:[U,0]}else E?a=[Math.max(0,D),Math.max(1,z)]:a=[D,z]}else g?(T.val>=0&&(T={val:0,nopad:1}),p.val<=0&&(p={val:0,nopad:1})):E&&(T.val-k*o(T)<0&&(T={val:0,nopad:1}),p.val<=0&&(p={val:1,nopad:1})),k=(p.val-T.val-Cne(t,y.val,S.val))/(M-o(T)-s(p)),a=[T.val-k*o(T),p.val+k*s(p)];return a=Ine(a,t),t.limitRange&&t.limitRange(),d&&a.reverse(),Kg.simpleMap(a,t.l2r||Number)}function Cne(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i0?r.ppadplus:r.ppadminus)||r.ppad||0),y=w((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),S=w(r.vpadplus||r.vpad),T=w(r.vpadminus||r.vpad);if(!u){if(E=1/0,M=-1/0,l)for(f=0;f0&&(E=h),h>M&&h-LS&&(E=h),h>M&&h=A;f--)C(f);return{min:n,max:a,opts:r}}function QR(e,t,r,n){Rne(e,t,r,n,Knt)}function eI(e,t,r,n){Rne(e,t,r,n,Jnt)}function Rne(e,t,r,n,a){for(var i=n.tozero,o=n.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else a(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=i&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function Fne(e){return Pne(e)&&Math.abs(e)=t}function Qnt(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&FS(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&FS(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function eat(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&FS(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&FS(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function FS(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=l&&(i=l,r=l),o<=l&&(o=l,n=l)}}return r=Qnt(r,t),n=eat(n,t),[r,n]}});var ri=ne((zer,iae)=>{"use strict";var Bv=Ea(),fc=mi(),Yb=Sl(),Y5=Fa(),Ei=Zt(),Xb=Ei.strTranslate,ex=Ms(),tat=Qy(),X5=_a(),hv=li(),rat=Wf(),qne=SR(),Ier=zc(),xh=uo(),nat=xh.ONEMAXYEAR,RS=xh.ONEAVGYEAR,IS=xh.ONEMINYEAR,aat=xh.ONEMAXQUARTER,iI=xh.ONEAVGQUARTER,zS=xh.ONEMINQUARTER,iat=xh.ONEMAXMONTH,Zb=xh.ONEAVGMONTH,qS=xh.ONEMINMONTH,dv=xh.ONEWEEK,id=xh.ONEDAY,Jg=id/2,Mp=xh.ONEHOUR,Z5=xh.ONEMIN,BS=xh.ONESEC,oat=xh.ONEMILLI,sat=xh.ONEMICROSEC,tx=xh.MINUS_SIGN,NS=xh.BADNUM,oI={K:"zeroline"},sI={K:"gridline",L:"path"},lI={K:"minor-gridline",L:"path"},Xne={K:"tick",L:"path"},Bne={K:"tick",L:"text"},One={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},US=qc(),W5=US.MID_SHIFT,rx=US.CAP_SHIFT,$5=US.LINE_SPACING,lat=US.OPPOSITE_SIDE,OS=3,$n=iae.exports={};$n.setConvert=Tp();var uat=Wb(),Sp=uu(),cat=Sp.idSort,fat=Sp.isLinked;$n.id2name=Sp.id2name;$n.name2id=Sp.name2id;$n.cleanId=Sp.cleanId;$n.list=Sp.list;$n.listIds=Sp.listIds;$n.getFromId=Sp.getFromId;$n.getFromTrace=Sp.getFromTrace;var Zne=I0();$n.getAutoRange=Zne.getAutoRange;$n.findExtremes=Zne.findExtremes;var hat=1e-4;function hI(e){var t=(e[1]-e[0])*hat;return[e[0]-t,e[1]+t]}function dat(e,t,r){if(![r,e,t].every(fc)||r===0)return e;let n=Math.round((e-t)/r),a=t+n*r;return e!==a&&Math.abs(e-a)h+" domain")),l=l.concat(i||[]),c.length>o?(Ei.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};$n.saveRangeInitial=function(e,t){for(var r=$n.list(e,"",!0),n=!1,a=0;af*.3||u(n)||u(a))){var h=r.dtick/2;e+=e+ho){var s=Number(r.slice(1));i.exactYears>o&&s%12===0?e=$n.tickIncrement(e,"M6","reverse")+id*1.5:i.exactMonths>o?e=$n.tickIncrement(e,"M1","reverse")+id*15.5:e-=Jg;var l=$n.tickIncrement(e,r);if(l<=n)return l}return e}$n.prepMinorTicks=function(e,t,r){var f,h;if(!((f=t.minor)!=null&&f.dtick)){delete e.dtick;var n=t.dtick&&fc(t._tmin),a;if(n){var i=$n.tickIncrement(t._tmin,t.dtick,!0);a=[t._tmin,i*.99+t._tmin*.01]}else{var o=Ei.simpleMap(t.range,t.r2l);a=[o[0],.8*o[0]+.2*o[1]]}if(e.range=Ei.simpleMap(a,t.l2r),e._isMinor=!0,$n.prepTicks(e,r),n){var s=fc(t.dtick),l=fc(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?rI(u,c)?u===2*dv&&c===2*id&&(e.dtick=dv):u===2*dv&&c===3*id?e.dtick=dv:u===dv&&!(t._input.minor||{}).nticks?e.dtick=id:Vne(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":rI(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?rI(u,c)||(e.dtick=Vne(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}((h=t.minor)==null?void 0:h._tick0Init)===void 0&&(e.tick0=t.tick0)};function rI(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function Vne(e,t){return Math.abs(e/t-1)<.001}$n.prepTicks=function(e,t){var r=Ei.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,a;n||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?Ei.bigFont(e.tickfont.size||12):15,n=e._length/a):(a=e._id.charAt(0)==="y"?40:80,n=Ei.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,$n.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=n-1,o=n):(i=n,o=n);var s=e[i].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=IS?u>=IS&&u<=nat?f=u:f=RS:r===iI&&c>=zS?u>=zS&&u<=aat?f=u:f=iI:c>=qS?u>=qS&&u<=iat?f=u:f=Zb:r===dv&&c>=dv?f=dv:c>=id?f=id:r===Jg&&c>=Jg?f=Jg:r===Mp&&c>=Mp&&(f=Mp);var h;f>=u&&(f=u,h=!0);var v=a+f;if(t.rangebreaks&&f>0){for(var d=84,m=0,x=0;xdv&&(f=u)}(f>0||n===0)&&(e[n].periodX=a+f/2)}}$n.calcTicks=function(t,r){for(var n=t.type,a=t.calendar,i=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||Ei.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=Ei.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(w?0:1);k--){var y=!k;k?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):w&&(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var S=k?t:Ei.extendFlat({},t,w?t.minor:{minor:{}});if(y?$n.prepMinorTicks(S,t,r):$n.prepTicks(S,r),S.tickmode==="array"){k?(x=[],d=Gne(t,!y)):(g=[],m=Gne(t,!y));continue}if(S.tickmode==="sync"){x=[],d=xat(t);continue}var T=hI(u),p=T[0],C=T[1],A=fc(S.dtick),P=n==="log"&&!(A||S.dtick.charAt(0)==="L"),D=$n.tickFirst(S,r);if(k){if(t._tmin=D,D=C:q<=C;q=$n.tickIncrement(q,R,c,a)){if(k&&U++,S.rangebreaks&&!c){if(q=h)break}if(x.length>v||q===z)break;z=q;var Y={value:dat(q,B,R)};k?(q===D&&(Y.first=!0),P&&q!==(q|0)&&(Y.simpleLabel=!0),i>1&&U%i&&(Y.skipLabel=!0),x.push(Y)):(Y.minor=!0,g.push(Y))}}if(!g||g.length<3)l=!1;else{var X=(g[2].value-g[1].value)*(s?-1:1);Hat(X,t.tickformat)||(l=!1,g=g.slice(1))}if(!l)E=x;else{var te=x.concat(g);o&&x.length&&(te=te.slice(1)),te=te.sort(function(Ie,de){return Ie.value-de.value}).filter(function(Ie,de,Ee){return de===0||Ie.value!==Ee[de-1].value});var se=te.map(function(Ie,de){return Ie.minor===void 0&&!Ie.skipLabel?de:null}).filter(function(Ie){return Ie!==null});se.forEach(function(Ie){l.map(function(de){var Ee=Ie+de;Ee>=0&&Ee-1;ye--){if(x[ye].drop){x.splice(ye,1);continue}x[ye].value=aI(x[ye].value,t);var Xe=t.c2p(x[ye].value);(Pe?ze>Xe-le:zeh||Ueh&&(Ee.periodX=h),Uea&&da&&xRS)t/=RS,n=a(10),e.dtick="M"+12*Ap(t,n,PS);else if(i>Zb)t/=Zb,e.dtick="M"+Ap(t,1,Hne);else if(i>id){if(e.dtick=Ap(t,id,e._hasDayOfWeekBreaks?[1,2,7,14]:bat),!r){var o=$n.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=Ei.dateTick0(e.calendar,2):e.tick0=Ei.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else i>Mp?e.dtick=Ap(t,Mp,Hne):i>Z5?e.dtick=Ap(t,Z5,jne):i>BS?e.dtick=Ap(t,BS,jne):(n=a(10),e.dtick=Ap(t,n,PS))}else if(e.type==="log"){e.tick0=0;var l=Ei.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=a(10),e.dtick="L"+Ap(t,n,PS)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):gI(e)?(e.tick0=0,n=1,e.dtick=Ap(t,n,_at)):(e.tick0=0,n=a(10),e.dtick=Ap(t,n,PS));if(e.dtick===0&&(e.dtick=1),!fc(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function Qne(e){var t=e.dtick;if(e._tickexponent=0,!fc(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),a=n.length;if(String(t).charAt(0)==="M")a>10||n.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=id&&a<=10||t>=id*15)e._tickround="d";else if(t>=Z5&&a<=16||t>=Mp)e._tickround="M";else if(t>=BS&&a<=19||t>=Z5)e._tickround="S";else{var i=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,i)-20,e._tickround<0&&(e._tickround=4)}}else if(fc(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);fc(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&($b(e.exponentformat)&&e.exponentformat!=="SI extended"&&!dI(l)||$b(e.exponentformat)&&e.exponentformat==="SI extended"&&!vI(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}$n.tickIncrement=function(e,t,r,n){var a=r?-1:1;if(fc(t))return Ei.increment(e,a*t);var i=t.charAt(0),o=a*Number(t.slice(1));if(i==="M")return Ei.incrementMonth(e,o,n);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var s=t==="D2"?Jne:Kne,l=e+a*.01,u=Ei.roundUp(Ei.mod(l,1),s,r);return Math.floor(l)+Math.log(Bv.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};$n.tickFirst=function(e,t){var r=e.r2l||Number,n=Ei.simpleMap(e.range,r,void 0,void 0,t),a=n[1]=0&&w<=e._length?M:null};if(l&&Ei.isArrayOrTypedArray(e.ticktext)){var d=Ei.simpleMap(e.range,e.r2l),m=(Math.abs(d[1]-d[0])-(e._lBreaks||0))/1e4;for(h=0;h"+s;else{var u=J5(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function Tat(e,t,r,n,a){var i=e.dtick,o=t.x,s=e.tickformat,l=typeof i=="string"&&i.charAt(0);if(a==="never"&&(a=""),n&&l!=="L"&&(i="L3",l="L"),s||l==="L")t.text=K5(Math.pow(10,o),e,a,n);else if(fc(i)||l==="D"&&(e.minorloglabels==="complete"||Ei.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(Ei.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),h=+f[1],v=Math.abs(h),d=e.exponentformat;d==="power"||$b(d)&&d!=="SI extended"&&dI(h)||$b(d)&&d==="SI extended"&&vI(h)?(t.text=f[0],v>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),h!==0&&h!==1&&(t.text+=""+(h>0?"":tx)+v+""),t.fontSize*=1.25):(d==="e"||d==="E")&&v>2?t.text=f[0]+d+(h>0?"+":tx)+v:(t.text=K5(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,Ei.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var m=String(t.text).charAt(0);(m==="0"||m==="1")&&(e._id.charAt(0)==="y"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function Aat(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function Mat(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=a[1]===void 0?"":String(a[1]),o=a[0]===void 0?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}function Sat(e,t,r,n,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=K5(t.x,e,a,n)}function Eat(e,t,r,n,a){if(e.thetaunit==="radians"&&!r){var i=t.x/180;if(i===0)t.text="0";else{var o=kat(i);if(o[1]>=100)t.text=K5(Ei.deg2rad(t.x),e,a,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),s&&(t.text=tx+t.text)}}}else t.text=K5(t.x,e,a,n)}function kat(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var a=n(e),i=e*a,o=Math.abs(r(i,a));return[Math.round(i/o),Math.round(a/o)]}var tae=["f","p","n","\u03BC","m","","k","M","G","T"],Cat=["q","r","y","z","a",...tae,"P","E","Z","Y","R","Q"],$b=e=>["SI","SI extended","B"].includes(e);function dI(e){return e>14||e<-15}function vI(e){return e>32||e<-30}function Lat(e,t){return $b(t)?!!(t==="SI extended"&&vI(e)||t!=="SI extended"&&dI(e)):!1}function K5(e,t,r,n){var a=e<0,i=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=$n.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:fc(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Qne(c),i=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,tx);o==="none"&&(s=0),e=Math.abs(e);let f=Math.pow(10,-i)/2;if(e"+h+"":o==="B"&&s===9?e+="B":$b(o)&&(e+=o==="SI extended"?Cat[s/3+10]:tae[s/3+5])}return a?tx+e:e}$n.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*Zb}function n(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),h=c.indexOf(u.charAt(0));return f===h?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-h}else return typeof l=="number"?1:-1}function a(l,u,c){var f=c||function(d){return d},h=u[0],v=u[1];return(!h&&typeof h!="number"||f(h)<=f(l))&&(!v&&typeof v!="number"||f(v)>=f(l))}function i(l,u){var c=u[0]===null,f=u[1]===null,h=n(l,u[0])>=0,v=n(l,u[1])<=0;return(c||h)&&(f||v)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&a.unshift(a.splice(c,1).shift())}});var s={false:{left:0,right:0}};return Ei.syncOrAsync(a.map(function(l){return function(){if(l){var u=$n.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=$n.drawOne(e,u,r);return u._shiftPusher&&fI(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=Ei.simpleMap(u._r,u.r2l),c}}}))};$n.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},a=r.overlayingShiftedAx||[],i,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=$n.counterLetter(u),h=l._plots[t._mainSubplot],v=t.zerolinelayer==="above traces";if(!h)return;if(t._shiftPusher=t.autoshift||a.indexOf(t._id)!==-1||a.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var d=t.linewidth/2||0;t.ticks==="inside"&&(d+=t.ticklen),fI(t,d,n,!0),fI(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=Gat(t,n));var m=h[c+"axislayer"],x=t._mainLinePosition,g=x+=t._shift,E=t._mainMirrorPosition,M=t._vals=$n.calcTicks(t),w=[t.mirror,g,E].join("_");for(i=0;i0?de.bottom-lt:0,Ie))));var Ge=0,tt=0;if(t._shiftPusher&&(Ge=Math.max(Ie,de.height>0?qe==="l"?lt-de.left:de.right-lt:0),t.title.text!==l._dfltTitle[c]&&(tt=(t._titleStandoff||0)+(t._titleScoot||0),qe==="l"&&(tt+=Yne(t))),t._fullDepth=Math.max(Ge,tt)),t.automargin){Ee={x:0,y:0,r:0,l:0,t:0,b:0};var ft=[0,1],He=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(qe==="b"?Ee[qe]=t._depth:(Ee[qe]=t._depth=Math.max(de.width>0?lt-de.top:0,Ie),ft.reverse()),de.width>0){var Qe=de.right-(t._offset+t._length);Qe>0&&(Ee.xr=1,Ee.r=Qe);var We=t._offset-de.left;We>0&&(Ee.xl=0,Ee.l=We)}}else if(qe==="l"?(t._depth=Math.max(de.height>0?lt-de.left:0,Ie),Ee[qe]=t._depth-He):(t._depth=Math.max(de.height>0?de.right-lt:0,Ie),Ee[qe]=t._depth+He,ft.reverse()),de.height>0){var pt=de.bottom-(t._offset+t._length);pt>0&&(Ee.yb=0,Ee.b=pt);var kt=t._offset-de.top;kt>0&&(Ee.yt=1,Ee.t=kt)}Ee[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[ft[0]],t.title.text!==l._dfltTitle[c]&&(Ee[qe]+=Yne(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(Ue={x:0,y:0,r:0,l:0,t:0,b:0},Ue[mt]=t.linewidth,t.mirror&&t.mirror!==!0&&(Ue[mt]+=Ie),t.mirror===!0||t.mirror==="ticks"?Ue[f]=t._anchorAxis.domain[ft[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(Ue[f]=[t._counterDomainMin,t._counterDomainMax][ft[1]]))}Oe&&(ge=Y5.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Wne(Ee,t.automargin),Wne(Ue,t.automargin)),Yb.autoMargin(e,pI(t),Ee),Yb.autoMargin(e,nae(t),Ue),Yb.autoMargin(e,aae(t),ge)}),Ei.syncOrAsync(vt)}};function Wne(e,t){if(e){var r=Object.keys(One).reduce(function(n,a){return t.indexOf(a)!==-1&&One[a].forEach(function(i){n[i]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function Fat(e,t){var r=[],n,a=function(i,o){var s=i.xbnd[o];s!==null&&r.push(Ei.extendFlat({},i,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;n=n*f}return e._id.charAt(0)==="x"?function(h){return Xb(a+e._offset+e.l2p(uI(h))+r,i+n)}:function(h){return Xb(i+n,a+e._offset+e.l2p(uI(h))+r)}};function uI(e){return e.periodX!==void 0?e.periodX:e.x}function Iat(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(d){return t.indexOf(d)!==-1},a=n("top"),i=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),u=r!=="boundaries"&&(s||i||a||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,h=OS,v=e.tickfont?e.tickfont.size:12;return(s||a)&&(f+=v*rx,h+=(e.linewidth||0)/2),(i||o)&&(f+=(e.linewidth||0)/2,h+=OS),l&&c==="top"&&(h-=v*(1-rx)),(i||a)&&(f=-f),(c==="bottom"||c==="right")&&(h=-h),[u?f:0,l?h:0]}$n.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=n.len!==void 0?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+i*r:"M"+(t+s*r)+",0h"+i*r};$n.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=e.tickson||"",i=function(D){return n.indexOf(D)!==-1},o=i("top"),s=i("left"),l=i("right"),u=i("bottom"),c=a!=="boundaries"&&(u||s||o||l),f=i("inside"),h=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&a!=="boundaries",v=0,d=0,m=h?e.ticklen:0;if(f?m*=-1:c&&(m=0),h&&(v+=m,r)){var x=Ei.deg2rad(r);v=m*Math.cos(x)+1,d=m*Math.sin(x)}e.showticklabels&&(h||e.showline)&&(v+=.2*e.tickfont.size),v+=(e.linewidth||1)/2*(f?-1:1);var g={labelStandoff:v,labelShift:d},E,M,w,k,y=0,S=e.side,T=e._id.charAt(0),p=e.tickangle,C;if(T==="x")C=!f&&S==="bottom"||f&&S==="top",k=C?1:-1,f&&(k*=-1),E=d*k,M=t+v*k,w=C?1:-.2,Math.abs(p)===90&&(f?w+=W5:p===-90&&S==="bottom"?w=rx:p===90&&S==="top"?w=W5:w=.5,y=W5/2*(p/90)),g.xFn=function(D){return D.dx+E+y*D.fontSize},g.yFn=function(D){return D.dy+M+D.fontSize*w},g.anchorFn=function(D,z){if(c){if(s)return"end";if(l)return"start"}return!fc(z)||z===0||z===180?"middle":z*k<0!==f?"end":"start"},g.heightFn=function(D,z,q){return z<-60||z>60?-.5*q:e.side==="top"!==f?-q:0};else if(T==="y"){if(C=!f&&S==="left"||f&&S==="right",k=C?1:-1,f&&(k*=-1),E=v,M=d*k,w=0,!f&&Math.abs(p)===90&&(p===-90&&S==="left"||p===90&&S==="right"?w=rx:w=.5),f){var A=fc(p)?+p:0;if(A!==0){var P=Ei.deg2rad(A);y=Math.abs(Math.sin(P))*rx*k,w=0}}g.xFn=function(D){return D.dx+t-(E+D.fontSize*w)*k+y*D.fontSize},g.yFn=function(D){return D.dy+M+D.fontSize*W5},g.anchorFn=function(D,z){return fc(z)&&Math.abs(z)===90?"middle":C?"end":"start"},g.heightFn=function(D,z,q){return e.side==="right"&&(z*=-1),z<-30?-q:z<30?-.5*q:0}}return g};function VS(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}$n.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=r.layer.selectAll("path."+n).data(a,VS);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return X5.stroke(Bv.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return hv.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),GS(t,[Xne]),i.attr("transform",r.transFn)};$n.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var n=t._id+"grid",a=t.minor&&t.minor.showgrid,i=a?r.vals.filter(function(g){return g.minor}):[],o=t.showgrid?r.vals.filter(function(g){return!g.minor}):[],s=r.counterAxis;if(s&&$n.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;d--){var m=d?h:v;if(m){var x=m.selectAll("path."+n).data(d?o:i,VS);x.exit().remove(),x.enter().append("path").classed(n,1).classed("crisp",r.crisp!==!1),x.attr("transform",r.transFn).attr("d",r.path).each(function(g){return X5.stroke(Bv.select(this),g.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(g){return hv.dashStyle(g.minor?t.minor.griddash:t.griddash,g.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(g){return(g.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&x.attr("d",r.path)}}GS(t,[sI,lI])}};$n.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=$n.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return cat(o.id,s.id)})}),i.attr("transform",r.transFn).attr("d",r.path).call(X5.stroke,t.zerolinecolor||X5.defaultLine).style("stroke-width",hv.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),GS(t,[oI])};$n.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,a=t._id,i=t.zerolinelayer==="above traces",o=r.cls||a+"tick",s=r.vals.filter(function(B){return B.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],VS),h=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(B){var Y=Bv.select(this),X=e._promises.length;Y.call(ex.positionText,l.xFn(B),l.yFn(B)).call(hv.font,{family:B.font,size:B.fontSize,color:B.fontColor,weight:B.fontWeight,style:B.fontStyle,variant:B.fontVariant,textcase:B.fontTextcase,lineposition:B.fontLineposition,shadow:B.fontShadow}).text(B.text).call(ex.convertToTspans,e),e._promises[X]?h.push(e._promises.pop().then(function(){v(Y,u)})):v(Y,u)}),GS(t,[Bne]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(B){Bv.select(this).select("text").call(ex.positionText,l.xFn(B),l.yFn(B))});function v(B,Y){B.each(function(X){var te=Bv.select(this),se=te.select(".text-math-group"),ue=l.anchorFn(X,Y),re=r.transFn.call(te.node(),X)+(fc(Y)&&+Y!=0?" rotate("+Y+","+l.xFn(X)+","+(l.yFn(X)-X.fontSize/2)+")":""),j=ex.lineCount(te),fe=$5*X.fontSize,ce=l.heightFn(X,fc(Y)?+Y:0,(j-1)*fe);if(ce&&(re+=Xb(0,ce)),se.empty()){var oe=te.select("text");oe.attr({transform:re,"text-anchor":ue}),oe.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var we=hv.bBox(se.node()).width,he=we*{end:-.5,start:.5}[ue];se.attr("transform",re+Xb(he,0))}})}t._adjustTickLabelsOverflow=function(){var B=t.ticklabeloverflow;if(!(!B||B==="allow")){var Y=B.indexOf("hide")!==-1,X=t._id.charAt(0)==="x",te=0,se=X?e._fullLayout.width:e._fullLayout.height;if(B.indexOf("domain")!==-1){var ue=Ei.simpleMap(t.range,t.r2l);te=t.l2p(ue[0])+t._offset,se=t.l2p(ue[1])+t._offset}var re=Math.min(te,se),j=Math.max(te,se),fe=t.side,ce=1/0,oe=-1/0;f.each(function(Pe){var le=Bv.select(this),ze=le.select(".text-math-group");if(ze.empty()){var Xe=hv.bBox(le.node()),vt=0;X?(Xe.right>j||Xe.leftj||Xe.top+(t.tickangle?0:Pe.fontSize/4)t["_visibleLabelMin_"+ue._id]?le.style("display","none"):j.K==="tick"&&!re&&le.node().style.display!=="none"&&le.style("display",null)})})})})},v(f,c+1?c:u);function d(){return h.length&&Promise.all(h)}var m=null;function x(){if(v(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){m=t.autotickangles[0];var B=0,Y=[],X,te=1;f.each(function(Ee){B=Math.max(B,Ee.fontSize);var Ue=t.l2p(Ee.x),ge=cI(this),Ge=hv.bBox(ge.node());te=Math.max(te,ex.lineCount(ge)),Y.push({top:0,bottom:10,height:10,left:Ue-Ge.width/2,right:Ue+Ge.width/2+2,width:Ge.width+2})});var se=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,ue=s.length,re=Math.abs((s[ue-1].x-s[0].x)*t._m)/(ue-1),j=se?re/2:re,fe=se?t.ticklen:B*1.25*te,ce=Math.sqrt(Math.pow(j,2)+Math.pow(fe,2)),oe=j/ce,we=t.autotickangles.map(function(Ee){return Ee*Math.PI/180}),he=we.find(function(Ee){return Math.abs(Math.cos(Ee))<=oe});he===void 0&&(he=we.reduce(function(Ee,Ue){return Math.abs(Math.cos(Ee))U*q&&(P=q,p[T]=C[T]=D[T])}var O=Math.abs(P-A);O-k>0?(O-=k,k*=1+k/O):k=0,t._id.charAt(0)!=="y"&&(k=-k),p[S]=M.p2r(M.r2p(C[S])+y*k),M.autorange==="min"||M.autorange==="max reversed"?(p[0]=null,M._rangeInitial0=void 0,M._rangeInitial1=void 0):(M.autorange==="max"||M.autorange==="min reversed")&&(p[1]=null,M._rangeInitial0=void 0,M._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[M._name+".range"]=p}var R=Ei.syncOrAsync(g);return R&&R.then&&e._promises.push(R),R};function zat(e,t,r){var n=t._id+"divider",a=r.vals,i=r.layer.selectAll("path."+n).data(a,VS);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(X5.stroke,t.dividercolor).style("stroke-width",hv.crispRound(e,t.dividerwidth,1)+"px"),i.attr("transform",r.transFn).attr("d",r.path)}$n.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),a=t.side,i;if(t.anchor!=="free"?i=t._anchorAxis:n==="x"?i={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n==="y"&&(i={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),a==="top"||a==="left")return i._offset;if(a==="bottom"||a==="right")return i._offset+i._length};function Yne(e){var t=e.title.font.size,r=(e.title.text.match(ex.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(rx+r*$5):r?t*(r+1)*$5:t}function qat(e,t){var r=e._fullLayout,n=t._id,a=n.charAt(0),i=t.title.font.size,o,s=(t.title.text.match(ex.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+i*rx:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+i*(W5+s*$5));else{var l=J5(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*i;l&&(u=.5*i,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(a==="x"?o+=t.side==="top"?i*(t.showticklabels?1:0):i*(t.showticklabels?1.5:.5):o+=t.side==="right"?i*(t.showticklabels?1:.5):i*(t.showticklabels?.5:0))}var c=$n.getPxPosition(e,t),f,h,v;a==="x"?(h=t._offset+t._length/2,v=t.side==="top"?c-o:c+o):(v=t._offset+t._length/2,h=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var d;if(t.type!=="multicategory"){var m=t._selections[t._id+"tick"];if(d={selection:m,side:t.side},m&&m.node()&&m.node().parentNode){var x=hv.getTranslate(m.node().parentNode);d.offsetLeft=x.x,d.offsetTop=x.y}t.title.hasOwnProperty("standoff")&&(d.pad=0)}return t._titleStandoff=o,tat.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[a],avoid:d,transform:f,attributes:{x:h,y:v,"text-anchor":"middle"}})}$n.shouldShowZeroLine=function(e,t,r){var n=Ei.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===NS)&&(rae(t,0)||!Bat(e,t,r,n)||Oat(e,t))};$n.clipEnds=function(e,t){return t.filter(function(r){return rae(e,r.x)})};function rae(e,t){var r=e.l2p(t);return r>1&&r1)for(a=1;a=a.min&&e=sat:/%L/.test(t)?e>=oat:/%[SX]/.test(t)?e>=BS:/%M/.test(t)?e>=Z5:/%[HI]/.test(t)?e>=Mp:/%p/.test(t)?e>=Jg:/%[Aadejuwx]/.test(t)?e>=id:/%[UVW]/.test(t)?e>=dv:/%[Bbm]/.test(t)?e>=qS:/%[q]/.test(t)?e>=zS:/%[Yy]/.test(t)?e>=IS:!0}});var mI=ne((qer,oae)=>{"use strict";oae.exports=function(t,r,n){var a,i;if(n){var o=r==="reversed"||r==="min reversed"||r==="max reversed";a=n[o?1:0],i=n[o?0:1]}var s=t("autorangeoptions.minallowed",i===null?a:void 0),l=t("autorangeoptions.maxallowed",a===null?i:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var yI=ne((Ber,sae)=>{"use strict";var jat=mI();sae.exports=function(t,r,n,a){var i=r._template||{},o=r.type||i.type||"-";n("minallowed"),n("maxallowed");var s=n("range");if(!s){var l;!a.noInsiderange&&o!=="log"&&(l=n("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n("range",l)))}var u=r.getAutorangeDflt(s,a),c=n("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,a),c=n("autorange",u)),c&&(jat(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var uae=ne((Oer,lae)=>{var Wat={left:0,top:0};lae.exports=Yat;function Yat(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,a=e.clientY||0,i=Xat(t);return r[0]=n-i.left,r[1]=a-i.top,r}function Xat(e){return e===window||e===document||e===document.body?Wat:e.getBoundingClientRect()}});var HS=ne((Ner,cae)=>{"use strict";var Zat=eR();function $at(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}cae.exports=Zat&&$at()});var hae=ne((Uer,fae)=>{"use strict";fae.exports=function(t,r,n,a,i){var o=(t-n)/(a-n),s=o+r/(a-n),l=(o+s)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?l:i==="right"||i==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var pae=ne((Ver,vae)=>{"use strict";var dae=Zt(),Kat=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];vae.exports=function(t,r,n,a){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=dae.constrain(Math.floor(t*3),0,2),a==="bottom"?r=0:a==="middle"?r=1:a==="top"?r=2:r=dae.constrain(Math.floor(r*3),0,2),Kat[r][t]}});var mae=ne((Ger,gae)=>{"use strict";var Jat=Pb(),Qat=YM(),eit=E5().getGraphDiv,tit=w5(),xI=gae.exports={};xI.wrapped=function(e,t,r){e=eit(e),e._fullLayout&&Qat.clear(e._fullLayout._uid+tit.HOVERID),xI.raw(e,t,r)};xI.raw=function(t,r){var n=t._fullLayout,a=t._hoverdata;r||(r={}),!(r.target&&!t._dragged&&Jat.triggerHandler(t,"plotly_beforehover",r)===!1)&&(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&a&&t.emit("plotly_unhover",{event:r,points:a}))}});var od=ne((Her,_ae)=>{"use strict";var rit=uae(),bI=rR(),nit=HS(),ait=Zt().removeElement,iit=zc(),nx=_ae.exports={};nx.align=hae();nx.getCursor=pae();var xae=mae();nx.unhover=xae.wrapped;nx.unhoverRaw=xae.raw;nx.init=function(t){var r=t.gd,n=1,a=r._context.doubleClickDelay,i=t.element,o,s,l,u,c,f,h,v;r._mouseDownTime||(r._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=x,nit?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=x,i.addEventListener("touchstart",x,{passive:!1})):i.ontouchstart=x;function d(M,w,k){return Math.abs(M)a&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var w;f.target===h?w=f:(w={target:h,srcElement:h,toElement:h},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(k=>{var y=f[k];!w[k]&&typeof y!="function"&&(w[k]=y)})),t.clickFn&&t.clickFn(n,w),v||h.dispatchEvent(new MouseEvent("click",M))}r._dragging=!1,r._dragged=!1}};function bae(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}nx.coverSlip=bae;function yae(e){return rit(e.changedTouches?e.changedTouches[0]:e,document.body)}});var z0=ne((jer,wae)=>{"use strict";wae.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}});var Mae=ne((Wer,Aae)=>{"use strict";var _I=z0(),Q5="data-savedcursor",Tae="!!";Aae.exports=function(t,r){var n=t.attr(Q5);if(r){if(!n){for(var a=(t.attr("class")||"").split(" "),i=0;i{"use strict";var wI=pl(),oit=Ic();Sae.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:oit.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:wI({editType:"legend"}),grouptitlefont:wI({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:wI({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var t4=ne(e4=>{"use strict";e4.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};e4.isVertical=function(t){return t.orientation!=="h"};e4.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};e4.getId=function(t){return t._id||"legend"}});var MI=ne((Zer,Eae)=>{"use strict";var jS=Fa(),vv=Zt(),sit=Bo(),lit=os(),uit=TI(),cit=Ab(),AI=t4();function fit(e,t,r,n,a){var i=t[e]||{},o=sit.newContainer(r,e);function s(B,Y){return vv.coerce(i,o,uit,B,Y)}var l=vv.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(B,Y){var X=c._input,te=c;return vv.coerce(X,te,lit,B,Y)},h=r.font||{},v=vv.coerceFont(s,"grouptitlefont",h,{overrideDflt:{size:Math.round(h.size*1.1)}}),d=0,m=!1,x="normal",g=(r.shapes||[]).filter(function(B){return B.showlegend});function E(B){return jS.traceIs(B,"pie-like")&&B._length!=null&&(Array.isArray(B.legend)||Array.isArray(B.showlegend))}n.filter(E).forEach(function(B){B.visible&&d++;for(var Y=0;YB.legend.length)for(var te=B.legend.length;te(e==="legend"?1:0));if(y===!1&&(r[e]=void 0),!(y===!1&&!i.uirevision)&&(s("uirevision",r.uirevision),y!==!1)){s("borderwidth");var S=s("orientation"),T=s("yref"),p=s("xref"),C=S==="h",A=T==="paper",P=p==="paper",D,z,q,U="left";C?(D=0,jS.getComponentMethod("rangeslider","isVisible")(t.xaxis)?A?(z=1.1,q="bottom"):(z=1,q="top"):A?(z=-.1,q="top"):(z=0,q="bottom")):(z=1,q="auto",P?D=1.02:(D=1,U="right")),vv.coerce(i,o,{x:{valType:"number",editType:"legend",min:P?-2:0,max:P?3:1,dflt:D}},"x"),vv.coerce(i,o,{y:{valType:"number",editType:"legend",min:A?-2:0,max:A?3:1,dflt:z}},"y"),s("traceorder",x),AI.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick"),s("groupclick"),s("xanchor",U),s("yanchor",q),s("maxheight"),s("valign"),vv.noneOrAll(i,o,["x","y"]);var O=s("title.text");if(O){s("title.side",C?"left":"top");var R=vv.extendFlat({},l,{size:vv.bigFont(l.size)});vv.coerceFont(s,"title.font",R);let B=a>1;s("titleclick",B?"toggle":!1),s("titledoubleclick",B?"toggleothers":!1)}}}Eae.exports=function(t,r,n){var a,i=n.slice(),o=r.shapes;if(o)for(a=0;a{"use strict";var Qg=Fa(),SI=Zt(),hit=SI.pushUnique,dit=t4(),kae=!0;EI.handleItemClick=function(t,r,n,a){var i=r._fullLayout;if(r._dragged||r._editing)return;var o=t.data()[0][0];if(o.groupTitle&&o.noClick)return;var s=n.groupclick;a==="toggle"&&n.itemdoubleclick==="toggleothers"&&kae&&r.data&&r._context.showTips&&(SI.notifier(SI._(r,"Double-click on legend to isolate one trace"),"long",r),kae=!1);var l=s==="togglegroup",u=i.hiddenlabels?i.hiddenlabels.slice():[],c=r._fullData;let f=(i.shapes||[]).filter(vt=>vt.showlegend||vt.legendgroup);var h=c.concat(f),v=o.trace;v._isShape&&(v=i.shapes[v.index]);var d=v.legendgroup,m,x,g,E,M,w,k={},y=[],S=[],T=[];function p(vt,st){var Oe=y.indexOf(vt),qe=k.visible;return qe||(qe=k.visible=[]),y.indexOf(vt)===-1&&(y.push(vt),Oe=y.length-1),qe[Oe]=st,Oe}var C=(i.shapes||[]).map(function(vt){return vt._input}),A=!1;function P(vt,st){C[vt].visible=st,A=!0}function D(vt,st){if(!(o.groupTitle&&!l)){var Oe=vt._isShape,qe=vt.index;qe===void 0&&(qe=vt._index);var mt=vt.visible===!1?!1:st;Oe?P(qe,mt):p(qe,mt)}}var z=v.legend;if(!v._isShape&&Qg.traceIs(v,"pie-like")){var q=o.label,U=u.indexOf(q);if(a==="toggle")U===-1?u.push(q):u.splice(U,1);else if(a==="toggleothers"){var O=U!==-1,R=[];for(m=0;mg.showlegend||g.legendgroup),l=i.concat(s);function u(g){return(g.legend||"legend")===o}var c,f;if(n==="toggle")c=!l.some(function(E){return u(E)&&E.visible===!0}),f=!1;else{let g=l.some(function(E){return!u(E)&&E.visible===!0&&E.showlegend!==!1});c=!0,f=!g}let h={visible:[]},v=[],d=(a.shapes||[]).map(function(g){return g._input});for(var m=!1,x=0;x{"use strict";Cae.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var Pae=ne((Jer,Fae)=>{"use strict";var{isArrayOrTypedArray:LI}=Ih(),Lae=Fa(),FI=t4();Fae.exports=function(t,r,n){var a=r._inHover,i=FI.isGrouped(r),o=FI.isReversed(r),s={},l=[],u=!1,c={},f=0,h=0,v,d;function m(Y,X,te){if(r.visible!==!1&&!(n&&Y!==r._id))if(X===""||!FI.isGrouped(r)){var se="~~i"+f;l.push(se),s[se]=[te],f++}else l.indexOf(X)===-1?(l.push(X),u=!0,s[X]=[te]):s[X].push(te)}for(v=0;vD&&(A=D)}p[v][0]._groupMinRank=A,p[v][0]._preGroupSort=v}var z=function(Y,X){return Y[0]._groupMinRank-X[0]._groupMinRank||Y[0]._preGroupSort-X[0]._preGroupSort},q=function(Y,X){var te=LI(Y.trace.legendrank)?Y.trace.legendrank[Y.i]:Y.trace.legendrank,se=LI(X.trace.legendrank)?X.trace.legendrank[X.i]:X.trace.legendrank;return te-se||Y._preSort-X._preSort};for(p.forEach(function(Y,X){Y[0]._preGroupSort=X}),p.sort(z),v=0;v{"use strict";var WS=Zt();function Dae(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}ax.formatPiePercent=function(t,r){var n=Dae((t*100).toPrecision(3));return WS.numSeparate(n,r)+"%"};ax.formatPieValue=function(t,r){var n=Dae(t.toPrecision(10));return WS.numSeparate(n,r)};ax.getFirstFilled=function(t,r){if(WS.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var vit=li(),pit=_a();Rae.exports=function(t,r,n,a){var i=n.marker.pattern;i&&i.shape?vit.pointStyle(t,n,a,r):pit.fill(t,r.color)}});var Kb=ne((ttr,Bae)=>{"use strict";var zae=_a(),qae=em().castOption,git=Iae();Bae.exports=function(t,r,n,a){var i=n.marker.line,o=qae(i.color,r.pts)||zae.defaultLine,s=qae(i.width,r.pts)||0;t.call(git,r,n,a).style("stroke-width",s).call(zae.stroke,o)}});var II=ne((rtr,Hae)=>{"use strict";var sd=Ea(),PI=Fa(),Oh=Zt(),Oae=Oh.strTranslate,pv=li(),Ov=_a(),DI=yh().extractOpts,YS=ml(),mit=Kb(),yit=em().castOption,xit=CI(),Nae=12,Uae=5,ix=2,bit=10,Jb=5;Hae.exports=function(t,r,n){var a=r._fullLayout;n||(n=a.legend);var i=n.itemsizing==="constant",o=n.itemwidth,s=(o+xit.itemGap*2)/2,l=Oae(s,0),u=function(S,T,p,C){var A;if(S+1)A=S;else if(T&&T.width>0)A=T.width;else return 0;return i?C:Math.min(A,p)};t.each(function(S){var T=sd.select(this),p=Oh.ensureSingle(T,"g","layers");p.style("opacity",S[0].trace.opacity);var C=n.indentation,A=n.valign,P=S[0].lineHeight,D=S[0].height;if(A==="middle"&&C===0||!P||!D)p.attr("transform",null);else{var z={top:1,bottom:-1}[A],q=z*(.5*(P-D+3))||0,U=n.indentation;p.attr("transform",Oae(U,q))}var O=p.selectAll("g.legendfill").data([S]);O.enter().append("g").classed("legendfill",!0);var R=p.selectAll("g.legendlines").data([S]);R.enter().append("g").classed("legendlines",!0);var B=p.selectAll("g.legendsymbols").data([S]);B.enter().append("g").classed("legendsymbols",!0),B.selectAll("g.legendpoints").data([S]).enter().append("g").classed("legendpoints",!0)}).each(y).each(h).each(d).each(v).each(x).each(w).each(M).each(c).each(f).each(g).each(E);function c(S){var T=Vae(S),p=T.showFill,C=T.showLine,A=T.showGradientLine,P=T.showGradientFill,D=T.anyFill,z=T.anyLine,q=S[0],U=q.trace,O,R,B=DI(U),Y=B.colorscale,X=B.reversescale,te=function(oe){if(oe.size())if(p)pv.fillGroupStyle(oe,r,!0);else{var we="legendfill-"+U.uid;pv.gradient(oe,r,we,RI(X),Y,"fill")}},se=function(oe){if(oe.size()){var we="legendline-"+U.uid;pv.lineGroupStyle(oe),pv.gradient(oe,r,we,RI(X),Y,"stroke")}},ue=YS.hasMarkers(U)||!D?"M5,0":z?"M5,-2":"M5,-3",re=sd.select(this),j=re.select(".legendfill").selectAll("path").data(p||P?[S]:[]);if(j.enter().append("path").classed("js-fill",!0),j.exit().remove(),j.attr("d",ue+"h"+o+"v6h-"+o+"z").call(te),C||A){var fe=u(void 0,U.line,bit,Uae);R=Oh.minExtend(U,{line:{width:fe}}),O=[Oh.minExtend(q,{trace:R})]}var ce=re.select(".legendlines").selectAll("path").data(C||A?[O]:[]);ce.enter().append("path").classed("js-line",!0),ce.exit().remove(),ce.attr("d",ue+(A?"l"+o+",0.0001":"h"+o)).call(C?pv.lineGroupStyle:se)}function f(S){var T=Vae(S),p=T.anyFill,C=T.anyLine,A=T.showLine,P=T.showMarker,D=S[0],z=D.trace,q=!P&&!C&&!p&&YS.hasText(z),U,O;function R(fe,ce,oe,we){var he=Oh.nestedProperty(z,fe).get(),ye=Oh.isArrayOrTypedArray(he)&&ce?ce(he):he;if(i&&ye&&we!==void 0&&(ye=we),oe){if(yeoe[1])return oe[1]}return ye}function B(fe){return D._distinct&&D.index&&fe[D.index]?fe[D.index]:fe[0]}if(P||q||A){var Y={},X={};if(P){Y.mc=R("marker.color",B);var te=z.type==="scattermap";Y.mx=te?"circle":R("marker.symbol",B),Y.mo=R("marker.opacity",Oh.mean,[.2,1]),Y.mlc=R("marker.line.color",B),Y.mlw=R("marker.line.width",Oh.mean,[0,5],ix),Y.mld=R("marker.line.dash",B),X.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var se=R("marker.size",Oh.mean,[2,16],Nae);Y.ms=se,X.marker.size=se}A&&(X.line={width:R("line.width",B,[0,10],Uae)}),q&&(Y.tx="Aa",Y.tp=R("textposition",B),Y.ts=10,Y.tc=R("textfont.color",B),Y.tf=R("textfont.family",B),Y.tw=R("textfont.weight",B),Y.ty=R("textfont.style",B),Y.tv=R("textfont.variant",B),Y.tC=R("textfont.textcase",B),Y.tE=R("textfont.lineposition",B),Y.tS=R("textfont.shadow",B)),U=[Oh.minExtend(D,Y)],O=Oh.minExtend(z,X),O.selectedpoints=null,O.texttemplate=null}var ue=sd.select(this).select("g.legendpoints"),re=ue.selectAll("path.scatterpts").data(P?U:[]);re.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),re.exit().remove(),re.call(pv.pointStyle,O,r),P&&(U[0].mrc=3);var j=ue.selectAll("g.pointtext").data(q?U:[]);j.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),j.exit().remove(),j.selectAll("text").call(pv.textPointStyle,O,r)}function h(S){var T=S[0].trace,p=T.type==="waterfall";if(S[0]._distinct&&p){var C=S[0].trace[S[0].dir].marker;return S[0].mc=C.color,S[0].mlw=C.line.width,S[0].mlc=C.line.color,m(S,this,"waterfall")}var A=[];T.visible&&p&&(A=S[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 P=sd.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(A);P.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),P.exit().remove(),P.each(function(D){var z=sd.select(this),q=T[D[0]].marker,U=u(void 0,q.line,Jb,ix);z.attr("d",D[1]).style("stroke-width",U+"px").call(Ov.fill,q.color),U&&z.call(Ov.stroke,q.line.color)})}function v(S){m(S,this)}function d(S){m(S,this,"funnel")}function m(S,T,p){var C=S[0].trace,A=C.marker||{},P=A.line||{},D=A.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",z=p?C.visible&&C.type===p:PI.traceIs(C,"bar"),q=sd.select(T).select("g.legendpoints").selectAll("path.legend"+p).data(z?[S]:[]);q.enter().append("path").classed("legend"+p,!0).attr("d",D).attr("transform",l),q.exit().remove(),q.each(function(U){var O=sd.select(this),R=U[0],B=u(R.mlw,A.line,Jb,ix);O.style("stroke-width",B+"px");var Y=R.mcc;if(!n._inHover&&"mc"in R){var X=DI(A),te=X.mid;te===void 0&&(te=(X.max+X.min)/2),Y=pv.tryColorscale(A,"")(te)}var se=Y||R.mc||A.color,ue=A.pattern,re=pv.getPatternAttr,j=ue&&(re(ue.shape,0,"")||re(ue.path,0,""));if(j){var fe=re(ue.bgcolor,0,null),ce=re(ue.fgcolor,0,null),oe=ue.fgopacity,we=Gae(ue.size,8,10),he=Gae(ue.solidity,.5,1),ye="legend-"+C.uid;O.call(pv.pattern,"legend",r,ye,j,we,he,Y,ue.fillmode,fe,ce,oe)}else O.call(Ov.fill,se);B&&Ov.stroke(O,R.mlc||P.color)})}function x(S){var T=S[0].trace,p=sd.select(this).select("g.legendpoints").selectAll("path.legendbox").data(T.visible&&PI.traceIs(T,"box-violin")?[S]:[]);p.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),p.exit().remove(),p.each(function(){var C=sd.select(this);if((T.boxpoints==="all"||T.points==="all")&&Ov.opacity(T.fillcolor)===0&&Ov.opacity((T.line||{}).color)===0){var A=Oh.minExtend(T,{marker:{size:i?Nae:Oh.constrain(T.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});p.call(pv.pointStyle,A,r)}else{var P=u(void 0,T.line,Jb,ix);C.style("stroke-width",P+"px").call(Ov.fill,T.fillcolor),P&&Ov.stroke(C,T.line.color)}})}function g(S){var T=S[0].trace,p=sd.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(T.visible&&T.type==="candlestick"?[S,S]:[]);p.enter().append("path").classed("legendcandle",!0).attr("d",function(C,A){return A?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),p.exit().remove(),p.each(function(C,A){var P=sd.select(this),D=T[A?"increasing":"decreasing"],z=u(void 0,D.line,Jb,ix);P.style("stroke-width",z+"px").call(Ov.fill,D.fillcolor),z&&Ov.stroke(P,D.line.color)})}function E(S){var T=S[0].trace,p=sd.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(T.visible&&T.type==="ohlc"?[S,S]:[]);p.enter().append("path").classed("legendohlc",!0).attr("d",function(C,A){return A?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),p.exit().remove(),p.each(function(C,A){var P=sd.select(this),D=T[A?"increasing":"decreasing"],z=u(void 0,D.line,Jb,ix);P.style("fill","none").call(pv.dashLine,D.line.dash,z),z&&Ov.stroke(P,D.line.color)})}function M(S){k(S,this,"pie")}function w(S){k(S,this,"funnelarea")}function k(S,T,p){var C=S[0],A=C.trace,P=p?A.visible&&A.type===p:PI.traceIs(A,p),D=sd.select(T).select("g.legendpoints").selectAll("path.legend"+p).data(P?[S]:[]);if(D.enter().append("path").classed("legend"+p,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),D.exit().remove(),D.size()){var z=A.marker||{},q=u(yit(z.line.width,C.pts),z.line,Jb,ix),U="pieLike",O=Oh.minExtend(A,{marker:{line:{width:q}}},U),R=Oh.minExtend(C,{trace:O},U);mit(D,R,O,r)}}function y(S){var T=S[0].trace,p,C=[];if(T.visible)switch(T.type){case"histogram2d":case"heatmap":C=[["M-15,-2V4H15V-2Z"]],p=!0;break;case"choropleth":case"choroplethmap":C=[["M-6,-6V6H6V-6Z"]],p=!0;break;case"densitymap":C=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],p="radial";break;case"cone":C=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],p=!1;break;case"streamtube":C=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],p=!1;break;case"surface":C=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],p=!0;break;case"mesh3d":C=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],p=!1;break;case"volume":C=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],p=!0;break;case"isosurface":C=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],p=!1;break}var A=sd.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(C);A.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),A.exit().remove(),A.each(function(P,D){var z=sd.select(this),q=DI(T),U=q.colorscale,O=q.reversescale,R=function(te){if(te.size()){var se="legendfill-"+T.uid;pv.gradient(te,r,se,RI(O,p==="radial"),U,"fill")}},B;if(U){if(!p){var X=U.length;B=D===0?U[O?X-1:0][1]:D===1?U[O?0:X-1][1]:U[Math.floor((X-1)/2)][1]}}else{var Y=T.vertexcolor||T.facecolor||T.color;B=Oh.isArrayOrTypedArray(Y)?Y[D]||Y[0]:Y}z.attr("d",P[0]),B?z.call(Ov.fill,B):z.call(R)})}};function RI(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function Vae(e){var t=e[0].trace,r=t.contours,n=YS.hasLines(t)||t.visible&&t.type==="quiver",a=YS.hasMarkers(t),i=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:n=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?i=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:a,showLine:n,showFill:i,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:i||s}}function Gae(e,t,r){return e&&Oh.isArrayOrTypedArray(e)?t:e>r?r:e}});var OI=ne((ntr,Qae)=>{"use strict";var wd=Ea(),hc=Zt(),qI=Sl(),ox=Fa(),$S=Pb(),zI=od(),dc=li(),r4=_a(),sx=Ms(),jae=kI().handleItemClick,Wae=kI().handleTitleClick,Bc=CI(),BI=qc(),Kae=BI.LINE_SPACING,e_=BI.FROM_TL,Yae=BI.FROM_BR,Xae=Pae(),_it=II(),t_=t4(),Qb=1,wit=/^legend[0-9]*$/;Qae.exports=function(t,r){if(r)Zae(t,r);else{var n=t._fullLayout,a=n._legends,i=n._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=wd.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(wit)&&a.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var d=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll("."+a).remove(),n._topdefs.select("#"+i).remove(),qI.autoMargin(e,a);var m=hc.ensureSingle(o,"g",a,function(T){s||T.attr("pointer-events","all")}),x=hc.ensureSingleById(n._topdefs,"clipPath",i,function(T){T.append("rect")}),g=hc.ensureSingle(m,"rect","bg",function(T){T.attr("shape-rendering","crispEdges")});g.call(r4.stroke,r.bordercolor).call(r4.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var E=hc.ensureSingle(m,"g","scrollbox"),M=r.title;r._titleWidth=0,r._titleHeight=0;var w;M.text?(w=hc.ensureSingle(E,"text",a+"titletext"),w.attr("text-anchor","start").call(dc.font,M.font).text(M.text),ZS(w,E,e,r,Qb),!s&&(r.titleclick||r.titledoubleclick)&&Sit(E,e,r,a)):(E.selectAll("."+a+"titletext").remove(),E.selectAll("."+a+"titletoggle").remove());var k=hc.ensureSingle(m,"rect","scrollbar",function(T){T.attr(Bc.scrollBarEnterAttrs).call(r4.fill,Bc.scrollBarColor)}),y=E.selectAll("g.groups").data(l);y.enter().append("g").attr("class","groups"),y.exit().remove();var S=y.selectAll("g.traces").data(hc.identity);S.enter().append("g").attr("class","traces"),S.exit().remove(),S.style("opacity",function(T){let p=T[0],C=p.trace;if(p.groupTitle){let A=C.legendgroup,P=(n.shapes||[]).filter(function(z){return z.showlegend});return e._fullData.concat(P).some(function(z){return z.legendgroup===A&&(z.legend||"legend")===a&&z.visible===!0})?1:.5}return ox.traceIs(C,"pie-like")?d.indexOf(T[0].label)!==-1?.5:1:C.visible==="legendonly"?.5:1}).each(function(){wd.select(this).call(Ait,e,r)}).call(_it,e,r).each(function(T){s||T[0].groupTitle&&r.groupclick==="toggleitem"||wd.select(this).call(Mit,e,a)}),hc.syncOrAsync([qI.previousPromises,function(){return Cit(e,y,S,r,E)},function(){var T=n._size,p=r.borderwidth,C=r.xref==="paper",A=r.yref==="paper";if(M.text){let ze=(n.shapes||[]).filter(function(vt){return vt.showlegend}),Xe=e._fullData.concat(ze).some(function(vt){let st=vt.legend||"legend";var Oe=Array.isArray(st)?st.includes(a):st===a;return Oe&&vt.visible===!0});w.style("opacity",Xe?1:.5)}if(!s){var P,D;C?P=T.l+T.w*r.x-e_[KS(r)]*r._width:P=n.width*r.x-e_[KS(r)]*r._width,A?D=T.t+T.h*(1-r.y)-e_[JS(r)]*r._effHeight:D=n.height*(1-r.y)-e_[JS(r)]*r._effHeight;var z=Lit(e,a,P,D);if(z)return;if(n.margin.autoexpand){var q=P,U=D;P=C?hc.constrain(P,0,n.width-r._width):q,D=A?hc.constrain(D,0,n.height-r._effHeight):U,P!==q&&hc.log("Constrain "+a+".x to make legend fit inside graph"),D!==U&&hc.log("Constrain "+a+".y to make legend fit inside graph")}dc.setTranslate(m,P,D)}if(k.on(".drag",null),m.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var O=r._effHeight;s&&(O=r._height),g.attr({width:r._width-p,height:O-p,x:p/2,y:p/2}),dc.setTranslate(E,0,0),x.select("rect").attr({width:r._width-2*p,height:O-2*p,x:p,y:p}),dc.setClipUrl(E,i,e),dc.setRect(k,0,0,0,0),delete r._scrollY}else{var R=Math.max(Bc.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),B=r._effHeight-R-2*Bc.scrollBarMargin,Y=r._height-r._effHeight,X=B/Y,te=Math.min(r._scrollY||0,Y);g.attr({width:r._width-2*p+Bc.scrollBarWidth+Bc.scrollBarMargin,height:r._effHeight-p,x:p/2,y:p/2}),x.select("rect").attr({width:r._width-2*p+Bc.scrollBarWidth+Bc.scrollBarMargin,height:r._effHeight-2*p,x:p,y:p+te}),dc.setClipUrl(E,i,e),we(te,R,X),m.on("wheel",function(){te=hc.constrain(r._scrollY+wd.event.deltaY/Y*B,0,Y),we(te,R,X),te!==0&&te!==Y&&wd.event.preventDefault()});var se,ue,re,j=function(ze,Xe,vt){var st=(vt-Xe)/X+ze;return hc.constrain(st,0,Y)},fe=function(ze,Xe,vt){var st=(Xe-vt)/X+ze;return hc.constrain(st,0,Y)},ce=wd.behavior.drag().on("dragstart",function(){var ze=wd.event.sourceEvent;ze.type==="touchstart"?se=ze.changedTouches[0].clientY:se=ze.clientY,re=te}).on("drag",function(){var ze=wd.event.sourceEvent;ze.buttons===2||ze.ctrlKey||(ze.type==="touchmove"?ue=ze.changedTouches[0].clientY:ue=ze.clientY,te=j(re,se,ue),we(te,R,X))});k.call(ce);var oe=wd.behavior.drag().on("dragstart",function(){var ze=wd.event.sourceEvent;ze.type==="touchstart"&&(se=ze.changedTouches[0].clientY,re=te)}).on("drag",function(){var ze=wd.event.sourceEvent;ze.type==="touchmove"&&(ue=ze.changedTouches[0].clientY,te=fe(re,se,ue),we(te,R,X))});E.call(oe)}function we(ze,Xe,vt){r._scrollY=e._fullLayout[a]._scrollY=ze,dc.setTranslate(E,0,-ze),dc.setRect(k,r._width,Bc.scrollBarMargin+ze*vt,Bc.scrollBarWidth,Xe),x.select("rect").attr("y",p+ze)}if(e._context.edits.legendPosition){var he,ye,Pe,le;m.classed("cursor-move",!0),zI.init({element:m.node(),gd:e,prepFn:function(ze){if(ze.target!==k.node()){var Xe=dc.getTranslate(m);Pe=Xe.x,le=Xe.y}},moveFn:function(ze,Xe){if(Pe!==void 0&&le!==void 0){var vt=Pe+ze,st=le+Xe;dc.setTranslate(m,vt,st),he=zI.align(vt,r._width,T.l,T.l+T.w,r.xanchor),ye=zI.align(st+r._height,-r._height,T.t+T.h,T.t,r.yanchor)}},doneFn:function(){if(he!==void 0&&ye!==void 0){var ze={};ze[a+".x"]=he,ze[a+".y"]=ye,ox.call("_guiRelayout",e,ze)}},clickFn:function(ze,Xe){var vt=o.selectAll("g.traces").filter(function(){var st=this.getBoundingClientRect();return Xe.clientX>=st.left&&Xe.clientX<=st.right&&Xe.clientY>=st.top&&Xe.clientY<=st.bottom});vt.size()>0&&Jae(e,r,vt,ze,Xe)}})}}],e)}}function XS(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return i==="fraction"?t._maxWidth*o:r+(o||a)}function Jae(e,t,r,n,a){var i=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:a,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:i};o._group&&(u.group=o._group),ox.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=$S.triggerHandler(e,"plotly_legendclick",u);if(n===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&jae(r,e,t,s)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=$S.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&jae(r,e,t,l)}}function Ait(e,t,r){var n=t_.getId(r),a=e.data()[0][0],i=a.trace,o=ox.traceIs(i,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;a.groupTitle?(u=a.groupTitle.text,c=a.groupTitle.font):(c=r.font,r.entries?u=a.text:(u=o?a.label:i.name,i._meta&&(u=hc.templateString(u,i._meta))));var f=hc.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(dc.font,c).text(s?$ae(u,l):u);var h=r.indentation+r.itemwidth+Bc.itemGap*2;sx.positionText(f,h,0),s?f.call(sx.makeEditable,{gd:t,text:u}).call(ZS,e,t,r).on("edit",function(v){this.text($ae(v,l)).call(ZS,e,t,r);var d={};return d.name=v,a.trace._isShape?ox.call("_guiRelayout",t,"shapes["+i.index+"].name",d.name):ox.call("_guiRestyle",t,d,i.index)}):ZS(f,e,t,r)}function $ae(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function Mit(e,t,r){var n=t._context.doubleClickDelay,a,i=1,o=hc.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(r4.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){a=new Date().getTime(),a-t._legendMouseDownTimen&&(i=Math.max(i-1,1)),Jae(t,s,e,i,wd.event)}}))}function Sit(e,t,r,n){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(n):c===n)&&ox.traceIs(u,"pie-like")}))return;let i=t._context.doubleClickDelay;var o,s=1;let l=hc.ensureSingle(e,"rect",n+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(r4.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTimei&&(s=Math.max(s-1,1));let u={event:wd.event,legendId:n,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if($S.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Wae(t,r,r.titleclick)},i)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,$S.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Wae(t,r,r.titledoubleclick))}))}function ZS(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),sx.convertToTspans(e,r,function(){Eit(t,r,n,a)})}function Eit(e,t,r,n){var a=e.data()[0][0],i=a&&a.trace.showlegend;if(Array.isArray(i)&&(i=i[a.i]!==!1),!r._inHover&&a&&!i){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=t_.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===Qb?c=r.title.font:a.groupTitle?c=a.groupTitle.font:c=r.font;var f=c.size*Kae,h,v;if(s){var d=dc.bBox(s);h=d.height,v=d.width,n===Qb?dc.setTranslate(o,u,u+h*.75):dc.setTranslate(o,0,h*.25)}else{var m="."+l+(n===Qb?"title":"")+"text",x=e.select(m),g=sx.lineCount(x),E=x.node();if(h=f*g,v=E?dc.bBox(E).width:0,n===Qb)r.title.side==="left"&&(v+=Bc.itemGap*2),sx.positionText(x,u+Bc.titlePad,u+f);else{var M=Bc.itemGap*2+r.indentation+r.itemwidth;a.groupTitle&&(M=Bc.itemGap,v-=r.indentation+r.itemwidth),sx.positionText(x,M,-f*((g-1)/2-.3))}}n===Qb?(r._titleWidth=v,r._titleHeight=h):(a.lineHeight=f,a.height=Math.max(h,16)+3,a.width=v)}function kit(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(t=e._titleWidth),n.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function Cit(e,t,r,n,a){var i=e._fullLayout,o=t_.getId(n);n||(n=i[o]);var s=i._size,l=t_.isVertical(n),u=t_.isGrouped(n),c=n.entrywidthmode==="fraction",f=n.borderwidth,h=2*f,v=Bc.itemGap,d=n.indentation+n.itemwidth+v*2,m=2*(f+v),x=JS(n),g=n.y<0||n.y===0&&x==="top",E=n.y>1||n.y===1&&x==="bottom",M=n.tracegroupgap,w={};let{orientation:k,yref:y}=n,{maxheight:S}=n,T=g||E||k!=="v"||y!=="paper";S||(S=T?.5:1);let p=T?i.height:s.h;n._maxHeight=Math.max(S>1?S:S*p,30);var C=0;n._width=0,n._height=0;var A=kit(n);if(l)r.each(function(ze){var Xe=ze[0].height;dc.setTranslate(this,f+A[0],f+A[1]+n._height+Xe/2+v),n._height+=Xe,n._width=Math.max(n._width,ze[0].width)}),C=d+n._width,n._width+=v+d+h,n._height+=m,u&&(t.each(function(ze,Xe){dc.setTranslate(this,0,Xe*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var P=KS(n),D=n.x<0||n.x===0&&P==="right",z=n.x>1||n.x===1&&P==="left",q=E||g,U=i.width/2;n._maxWidth=Math.max(D?q&&P==="left"?s.l+s.w:U:z?q&&P==="right"?s.r+s.w:U:s.w,2*d);var O=0,R=0;r.each(function(ze){var Xe=XS(ze,n,d);O=Math.max(O,Xe),R+=Xe}),C=null;var B=0;if(u){var Y=0,X=0,te=0;t.each(function(){var ze=0,Xe=0;wd.select(this).selectAll("g.traces").each(function(st){var Oe=XS(st,n,d),qe=st[0].height;dc.setTranslate(this,A[0],A[1]+f+v+qe/2+Xe),Xe+=qe,ze=Math.max(ze,Oe),w[st[0].trace.legendgroup]=ze});var vt=ze+v;X>0&&vt+f+X>n._maxWidth?(B=Math.max(B,X),X=0,te+=Y+M,Y=Xe):Y=Math.max(Y,Xe),dc.setTranslate(this,X,te),X+=vt}),n._width=Math.max(B,X)+f,n._height=te+Y+m}else{var se=r.size(),ue=R+h+(se-1)*v=n._maxWidth&&(B=Math.max(B,ce),j=0,fe+=re,n._height+=re,re=0),dc.setTranslate(this,A[0]+f+j,A[1]+f+fe+Xe/2+v),ce=j+vt+v,j+=st,re=Math.max(re,Xe)}),ue?(n._width=j+h,n._height=re+m):(n._width=Math.max(B,ce)+h,n._height+=re+m)}}n._width=Math.ceil(Math.max(n._width+A[0],n._titleWidth+2*(f+Bc.titlePad))),n._height=Math.ceil(Math.max(n._height+A[1],n._titleHeight+2*(f+Bc.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var oe=e._context.edits,we=oe.legendText||oe.legendPosition;r.each(function(ze){var Xe=wd.select(this).select("."+o+"toggle"),vt=ze[0].height,st=ze[0].trace.legendgroup,Oe=XS(ze,n,d);u&&st!==""&&(Oe=w[st]);var qe=we?d:C||Oe;!l&&!c&&(qe+=v/2),dc.setRect(Xe,0,-vt/2,qe,vt)});var he=a.select("."+o+"titletext");he.node()&&Tit(he,n,f);var ye=a.select("."+o+"titletoggle");if(ye.size()&&he.node()){var Pe=he.attr("x")||0,le=Bc.titlePad;dc.setRect(ye,Pe-le,f,n._titleWidth+2*le,n._titleHeight+2*le)}}function Lit(e,t,r,n){var a=e._fullLayout,i=a[t],o=KS(i),s=JS(i),l=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=i.y<.5?"b":"t",f=i.x<.5?"l":"r",h={r:a.width-r,l:r+i._width,b:a.height-n,t:n+i._effHeight};if(l&&u)return qI.autoMargin(e,t,{x:i.x,y:i.y,l:i._width*e_[o],r:i._width*Yae[o],b:i._effHeight*Yae[s],t:i._effHeight*e_[s]});l?e._fullLayout._reservedMargin[t][c]=h[c]:u||i.orientation==="v"?e._fullLayout._reservedMargin[t][f]=h[f]:e._fullLayout._reservedMargin[t][c]=h[c]}function KS(e){return hc.isRightAnchor(e)?"right":hc.isCenterAnchor(e)?"center":"left"}function JS(e){return hc.isBottomAnchor(e)?"bottom":hc.isMiddleAnchor(e)?"middle":"top"}});var GI=ne(VI=>{"use strict";var lx=Ea(),F1=mi(),zu=Zt(),Fit=zu.pushUnique,NI=zu.strTranslate,Pit=zu.strRotate,Dit=Pb(),Nv=Ms(),Rit=Mae(),Ep=li(),Zu=_a(),QS=od(),kp=ri(),Iit=zc().zindexSeparator,n_=Fa(),q0=Hd(),ux=w5(),zit=MI(),qit=OI(),sie=ux.YANGLE,UI=Math.PI*sie/180,Bit=1/Math.sin(UI),Oit=Math.cos(UI),Nit=Math.sin(UI),Xl=ux.HOVERARROWSIZE,Po=ux.HOVERTEXTPAD,eie={box:!0,ohlc:!0,violin:!0,candlestick:!0},Uit={scatter:!0,scattergl:!0,splom:!0};function tie(e,t){return e.distance-t.distance}VI.hover=function(t,r,n,a){t=zu.getGraphDiv(t);var i=r.target;zu.throttle(t._fullLayout._uid+ux.HOVERID,ux.HOVERMINTIME,function(){Vit(t,r,n,a,i)})};VI.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var a=r.gd,i=hie(a),o=die(a),s=t.map(function(x){var g=x._x0||x.x0||x.x||0,E=x._x1||x.x1||x.x||0,M=x._y0||x.y0||x.y||0,w=x._y1||x.y1||x.y||0,k=x.eventData;if(k){var y=Math.min(g,E),S=Math.max(g,E),T=Math.min(M,w),p=Math.max(M,w),C=x.trace;if(n_.traceIs(C,"gl3d")){var A=a._fullLayout[C.scene]._scene.container,P=A.offsetLeft,D=A.offsetTop;y+=P,S+=P,T+=D,p+=D}k.bbox={x0:y+o,x1:S+o,y0:T+i,y1:p+i},k.xPixel=(g+E)/2,k.yPixel=(M+w)/2,r.inOut_bbox&&r.inOut_bbox.push(k.bbox)}else k=!1;return{color:x.color||Zu.defaultLine,x0:x.x0||x.x||0,x1:x.x1||x.x||0,y0:x.y0||x.y||0,y1:x.y1||x.y||0,xLabel:x.xLabel,yLabel:x.yLabel,zLabel:x.zLabel,text:x.text,name:x.name,idealAlign:x.idealAlign,borderColor:x.borderColor,fontFamily:x.fontFamily,fontSize:x.fontSize,fontColor:x.fontColor,fontWeight:x.fontWeight,fontStyle:x.fontStyle,fontVariant:x.fontVariant,nameLength:x.nameLength,textAlign:x.textAlign,trace:x.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:x.hovertemplate||!1,hovertemplateLabels:x.hovertemplateLabels||!1,eventData:k}}),l=!1,u=uie(s,{gd:a,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||Zu.background,container:lx.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,h=0,v=0;c.sort(function(x,g){return x.y0-g.y0}).each(function(x,g){var E=x.y0-x.by/2;E-fS[0]._length||le<0||le>T[0]._length)return QS.unhoverRaw(e,t)}if(t.pointerX=Pe+S[0]._offset,t.pointerY=le+T[0]._offset,"xval"in t?U=q0.flat(i,t.xval):U=q0.p2c(S,Pe),"yval"in t?O=q0.flat(i,t.yval):O=q0.p2c(T,le),!F1(U[0])||!F1(O[0]))return zu.warn("Fx.hover failed",t,e),QS.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=U,e._hoverYVals=O,e._hoverXAxes=S,e._hoverYAxes=T);var vt=1/0;function st(un,aa){for(B=0;Bce&&(z.splice(0,ce),vt=z[0].distance),f&&D!==0&&z.length===0){fe.distance=D,fe.index=!1;var pa=X._module.hoverPoints(fe,re,j,"closest",{hoverLayer:s._hoverlayer});if(pa&&(pa=pa.filter(function(Oi){return Oi.spikeDistance<=D})),pa&&pa.length){var no,Gi=pa.filter(function(Oi){return Oi.xa.showspikes&&Oi.xa.spikesnap!=="hovered data"});if(Gi.length){var Ti=Gi[0];F1(Ti.x0)&&F1(Ti.y0)&&(no=qe(Ti),(!oe.vLinePoint||oe.vLinePoint.spikeDistance>no.spikeDistance)&&(oe.vLinePoint=no))}var fi=pa.filter(function(Oi){return Oi.ya.showspikes&&Oi.ya.spikesnap!=="hovered data"});if(fi.length){var _o=fi[0];F1(_o.x0)&&F1(_o.y0)&&(no=qe(_o),(!oe.hLinePoint||oe.hLinePoint.spikeDistance>no.spikeDistance)&&(oe.hLinePoint=no))}}}}}st();function Oe(un,aa,da){for(var ua=null,qa=1/0,ii,pa=0;paun.trace.index===We.trace.index):z=[We];var pt=z.length,kt=oie("x",We,s),qt=oie("y",We,s);st(kt,qt);var Wt=[],_r={},tr=0,lr=function(un){var aa=eie[un.trace.type]?lie(un):un.trace.index;if(!_r[aa])tr++,_r[aa]=tr,Wt.push(un);else{var da=_r[aa]-1,ua=Wt[da];da>0&&Math.abs(un.distance)pt-1;Ye--)lr(z[Ye]);z=Wt,de()}var Te=e._hoverdata,Fe=[],Ae=hie(e),Re=die(e);for(let un of z){var Ze=q0.makeEventData(un,un.trace,un.cd);if(un.hovertemplate!==!1){var Ke=!1;un.cd[un.index]&&un.cd[un.index].ht&&(Ke=un.cd[un.index].ht),un.hovertemplate=Ke||un.trace.hovertemplate||!1}if(un.xa&&un.ya){var _t=un.x0+un.xa._offset,St=un.x1+un.xa._offset,Vt=un.y0+un.ya._offset,fr=un.y1+un.ya._offset,$t=Math.min(_t,St),gr=Math.max(_t,St),Br=Math.min(Vt,fr),Nr=Math.max(Vt,fr);Ze.bbox={x0:$t+Re,x1:gr+Re,y0:Br+Ae,y1:Nr+Ae},Ze.xPixel=(_t+St)/2,Ze.yPixel=(Vt+fr)/2}un.eventData=[Ze],Fe.push(Ze)}e._hoverdata=Fe;var Er=h==="y"&&(q.length>1||z.length>1)||h==="closest"&&we&&z.length>1,zr=Zu.combine(s.plot_bgcolor||Zu.background,s.paper_bgcolor),vn=uie(z,{gd:e,hovermode:h,rotateLabels:Er,bgColor:zr,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Nn=vn.hoverLabels;if(q0.isUnifiedHover(h)||(Hit(Nn,Er,s,vn.commonLabelBoundingBox),fie(Nn,Er,s._invScaleX,s._invScaleY)),a&&a.tagName){var Xn=n_.getComponentMethod("annotations","hasClickToShow")(e,Fe);Rit(lx.select(a),Xn?"pointer":"")}var Kn=Yit(e,t,Te);if(!a||n||!Kn&&!s.hoveranywhere)return;Te&&Kn&&e.emit("plotly_unhover",{event:t,points:Te}),Qn(e._hoverdata);function Qn(un){e.emit("plotly_hover",{event:t,points:un,xaxes:S,yaxes:T,xvals:U,yvals:O})}}function lie(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var Git=/([\s\S]*)<\/extra>/;function uie(e,t){var r=t.gd,n=r._fullLayout,a=t.hovermode,i=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||ux.HOVERFONT,f=t.fontSize||ux.HOVERFONTSIZE,h=t.fontWeight||n.font.weight,v=t.fontStyle||n.font.style,d=t.fontVariant||n.font.variant,m=t.fontTextcase||n.font.textcase,x=t.fontLineposition||n.font.lineposition,g=t.fontShadow||n.font.shadow,E=e[0],M=E.xa,w=E.ya,k=a.charAt(0),y=k+"Label",S=E[y];if(S===void 0&&M.type==="multicategory")for(var T=0;Tn.width-Fe&&(Ae=n.width-Fe),Qe.attr("d","M"+(lr-Ae)+",0L"+(lr-Ae+Xl)+","+Te+Xl+"H"+Fe+"v"+Te+(Po*2+tr.height)+"H"+-Fe+"V"+Te+Xl+"H"+(lr-Ae-Xl)+"Z"),lr=Ae,B.minX=lr-Fe,B.maxX=lr+Fe,M.side==="top"?(B.minY=Ye-(Po*2+tr.height),B.maxY=Ye-Po):(B.minY=Ye+Po,B.maxY=Ye+(Po*2+tr.height))}else{var Re,Ze,Ke;w.side==="right"?(Re="start",Ze=1,Ke="",lr=M._offset+M._length):(Re="end",Ze=-1,Ke="-",lr=M._offset),Ye=w._offset+(E.y0+E.y1)/2,We.attr("text-anchor",Re),Qe.attr("d","M0,0L"+Ke+Xl+","+Xl+"V"+(Po+tr.height/2)+"h"+Ke+(Po*2+tr.width)+"V-"+(Po+tr.height/2)+"H"+Ke+Xl+"V-"+Xl+"Z"),B.minY=Ye-(Po+tr.height/2),B.maxY=Ye+(Po+tr.height/2),w.side==="right"?(B.minX=lr+Xl,B.maxX=lr+Xl+(Po*2+tr.width)):(B.minX=lr-Xl-(Po*2+tr.width),B.maxX=lr-Xl);var _t=tr.height/2,St=C-tr.top-_t,Vt="clip"+n._uid+"commonlabel"+w._id,fr;if(lrQe.hoverinfo!=="none");if(He.length===0)return[];var Y=n.hoverlabel,X=Y.font,te=He[0],se=((a==="x unified"?te.xa:te.ya).unifiedhovertitle||{}).text,ue=se?zu.hovertemplateString({data:a==="x unified"?[{xa:te.xa,x:te.xVal}]:[{ya:te.ya,y:te.yVal}],fallback:te.trace.hovertemplatefallback,locale:n._d3locale,template:se}):S,re={showlegend:!0,legend:{title:{text:ue,font:X},font:X,bgcolor:Y.bgcolor,bordercolor:Y.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},j={font:X};zit(re,j,r._fullData);var fe=j.legend;fe.entries=[];for(var ce=0;ce=0?Ge=de:Ee+Xe=0?Ge=Ee:Ue+Xe=0?tt=lt:Ie+vt=0?tt=Ie:ge+vt=0,(He.idealAlign==="top"||!Br)&&Nr?(Ke-=St/2,He.anchor="end"):Br?(Ke+=St/2,He.anchor="start"):He.anchor="middle",He.crossPos=Ke;else{if(He.pos=Ke,Br=Ze+_t/2+gr<=A,Nr=Ze-_t/2-gr>=0,(He.idealAlign==="left"||!Br)&&Nr)Ze-=_t/2,He.anchor="end";else if(Br)Ze+=_t/2,He.anchor="start";else{He.anchor="middle";var Er=gr/2,zr=Ze+Er-A,vn=Ze-Er;zr>0&&(Ze-=zr),vn<0&&(Ze+=-vn)}He.crossPos=Ze}Ye.attr("text-anchor",He.anchor),Fe&&Te.attr("text-anchor",He.anchor),Qe.attr("transform",NI(Ze,Ke)+(i?Pit(sie):""))}),{hoverLabels:ft,commonLabelBoundingBox:B}}function rie(e,t,r,n,a,i){var f,h;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=zu.templateString(e.name,e.trace._meta)),o=iie(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===a?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"
":"")+e.text),e.extraText!==void 0&&(s+=(s?"
":"")+e.extraText),i&&s===""&&!e.hovertemplate&&(o===""&&i.remove(),s=o),(h=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&h.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let v=e.hovertemplateLabels||e;e[l+"Label"]!==a&&(v[l+"other"]=v[l+"Val"],v[l+"otherLabel"]=v[l+"Label"]),s=zu.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:v,locale:n._d3locale,template:c}),s=s.replace(Git,(d,m)=>(o=iie(m,e.nameLength),""))}return[s,o]}function Hit(e,t,r,n){var a=t?"xa":"ya",i=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,h=n.maxX,v=n.minY,d=n.maxY,m=function(U){return U*r._invScaleX},x=function(U){return U*r._invScaleY};e.each(function(U){var O=U[a],R=U[i],B=O._id.charAt(0)==="x",Y=O.range;c===0&&Y&&Y[0]>Y[1]!==B&&(s=-1);var X=0,te=B?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var se=cie(U,t),ue=U.anchor,re=ue==="end"?-1:1,j,fe;if(ue==="middle")j=U.crossPos+(B?x(se.y-U.by/2):m(U.bx/2+U.tx2width/2)),fe=j+(B?x(U.by):m(U.bx));else if(B)j=U.crossPos+x(Xl+se.y)-x(U.by/2-Xl),fe=j+x(U.by);else{var ce=m(re*Xl+se.x),oe=ce+m(re*U.bx);j=U.crossPos+Math.min(ce,oe),fe=U.crossPos+Math.max(ce,oe)}B?v!==void 0&&d!==void 0&&Math.min(fe,d)-Math.max(j,v)>1&&(R.side==="left"?(X=R._mainLinePosition,te=r.width):te=R._mainLinePosition):f!==void 0&&h!==void 0&&Math.min(fe,h)-Math.max(j,f)>1&&(R.side==="top"?(X=R._mainLinePosition,te=r.height):te=R._mainLinePosition)}u[c++]=[{datum:U,traceIndex:U.trace.index,dp:0,pos:U.pos,posref:U.posref,size:U.by*(B?Bit:1)/2,pmin:X,pmax:te}]}),u.sort(function(U,O){return U[0].posref-O[0].posref||s*(O[0].traceIndex-U[0].traceIndex)});var g,E,M,w,k,y,S;function T(U){var O=U[0],R=U[U.length-1];if(E=O.pmin-O.pos-O.dp+O.size,M=R.pos+R.dp+R.size-O.pmax,E>.01){for(k=U.length-1;k>=0;k--)U[k].dp+=E;g=!1}if(!(M<.01)){if(E<-.01){for(k=U.length-1;k>=0;k--)U[k].dp-=M;g=!1}if(g){var B=0;for(w=0;wO.pmax&&B++;for(w=U.length-1;w>=0&&!(B<=0);w--)y=U[w],y.pos>O.pmax-1&&(y.del=!0,B--);for(w=0;w=0;k--)U[k].dp-=M;for(w=U.length-1;w>=0&&!(B<=0);w--)y=U[w],y.pos+y.dp+y.size>O.pmax&&(y.del=!0,B--)}}}for(;!g&&o<=l;){for(o++,g=!0,w=0;w.01){for(k=C.length-1;k>=0;k--)C[k].dp+=E;for(p.push.apply(p,C),u.splice(w+1,1),S=0,k=p.length-1;k>=0;k--)S+=p[k].dp;for(M=S/p.length,k=p.length-1;k>=0;k--)p[k].dp-=M;g=!1}else w++}u.forEach(T)}for(w=u.length-1;w>=0;w--){var D=u[w];for(k=D.length-1;k>=0;k--){var z=D[k],q=z.datum;q.offset=z.dp,q.del=z.del}}}function cie(e,t){var r=0,n=e.offset;return t&&(n*=-Nit,r=e.offset*Oit),{x:r,y:n}}function jit(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(Xl+Po),n=r+t*(e.txwidth+Po),a=e.anchor==="middle";return a&&(r-=e.tx2width/2,n+=e.txwidth/2+Po),{alignShift:t,textShiftX:r,text2ShiftX:n}}function fie(e,t,r,n){var a=function(o){return o*r},i=function(o){return o*n};e.each(function(o){var s=lx.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=jit(o),h=cie(o,t),v=h.x,d=h.y,m=u==="middle",x="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,g;m?g="M-"+a(o.bx/2+o.tx2width/2)+","+i(d-o.by/2)+"h"+a(o.bx)+"v"+i(o.by)+"h-"+a(o.bx)+"Z":x?g="M0,0L"+a(c*Xl+v)+","+i(Xl+d)+"v"+i(o.by/2-Xl)+"h"+a(c*o.bx)+"v-"+i(o.by)+"H"+a(c*Xl+v)+"V"+i(d-Xl)+"Z":g="M"+a(c*Xl+v)+","+i(d-o.by/2)+"h"+a(c*o.bx)+"v"+i(o.by)+"h"+a(-c*o.bx)+"Z",s.select("path").attr("d",g);var E=v+f.textShiftX,M=d+o.ty0-o.by/2+Po,w=o.textAlign||"auto";w!=="auto"&&(w==="left"&&u!=="start"?(l.attr("text-anchor","start"),E=m?-o.bx/2-o.tx2width/2+Po:-o.bx-Po):w==="right"&&u!=="end"&&(l.attr("text-anchor","end"),E=m?o.bx/2-o.tx2width/2-Po:o.bx+Po)),l.call(Nv.positionText,a(E),i(M)),o.tx2width&&(s.select("text.name").call(Nv.positionText,a(f.text2ShiftX+f.alignShift*Po+v),i(d+o.ty0-o.by/2+Po)),s.select("rect").call(Ep.setRect,a(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+v),i(d-o.by/2-1),a(o.tx2width),i(o.by+2)))})}function Wit(e,t){var r=e.index,n=e.trace||{},a=e.cd[0],i=e.cd[r]||{};function o(h){return h||F1(h)&&h===0}var s=Array.isArray(r)?function(h,v){var d=zu.castOption(a,r,h);return o(d)?d:zu.extractOption({},n,"",v)}:function(h,v){return zu.extractOption(i,n,h,v)};function l(h,v,d){var m=s(v,d);o(m)&&(e[h]=m)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=zu.constrain(e.x0,0,e.xa._length),e.x1=zu.constrain(e.x1,0,e.xa._length),e.y0=zu.constrain(e.y0,0,e.ya._length),e.y1=zu.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:kp.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:kp.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=kp.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+kp.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=kp.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+kp.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function nie(e,t,r){var n=r.container,a=r.fullLayout,i=a._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(".spikeline").remove(),!!(l||s)){var f=Zu.combine(a.plot_bgcolor,a.paper_bgcolor);if(s){var h=t.hLinePoint,v,d;u=h&&h.xa,c=h&&h.ya;var m=c.spikesnap;m==="cursor"?(v=o.pointerX,d=o.pointerY):(v=u._offset+h.x,d=c._offset+h.y);var x=Zu.color(h.color).contrast(Zu.color(f))<1.5?Zu.contrast(f):h.color,g=c.spikemode,E=c.spikethickness,M=c.spikecolor||x,w=kp.getPxPosition(e,c),k,y;if(g.indexOf("toaxis")!==-1||g.indexOf("across")!==-1){if(g.indexOf("toaxis")!==-1&&(k=w,y=v),g.indexOf("across")!==-1){var S=c._counterDomainMin,T=c._counterDomainMax;c.anchor==="free"&&(S=Math.min(S,c.position),T=Math.max(T,c.position)),k=i.l+S*i.w,y=i.l+T*i.w}n.insert("line",":first-child").attr({x1:k,x2:y,y1:d,y2:d,"stroke-width":E,stroke:M,"stroke-dasharray":Ep.dashStyle(c.spikedash,E)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:k,x2:y,y1:d,y2:d,"stroke-width":E+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}g.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:w+(c.side!=="right"?E:-E),cy:d,r:E,fill:M}).classed("spikeline",!0)}if(l){var p=t.vLinePoint,C,A;u=p&&p.xa,c=p&&p.ya;var P=u.spikesnap;P==="cursor"?(C=o.pointerX,A=o.pointerY):(C=u._offset+p.x,A=c._offset+p.y);var D=Zu.color(p.color).contrast(Zu.color(f))<1.5?Zu.contrast(f):p.color,z=u.spikemode,q=u.spikethickness,U=u.spikecolor||D,O=kp.getPxPosition(e,u),R,B;if(z.indexOf("toaxis")!==-1||z.indexOf("across")!==-1){if(z.indexOf("toaxis")!==-1&&(R=O,B=A),z.indexOf("across")!==-1){var Y=u._counterDomainMin,X=u._counterDomainMax;u.anchor==="free"&&(Y=Math.min(Y,u.position),X=Math.max(X,u.position)),R=i.t+(1-X)*i.h,B=i.t+(1-Y)*i.h}n.insert("line",":first-child").attr({x1:C,x2:C,y1:R,y2:B,"stroke-width":q,stroke:U,"stroke-dasharray":Ep.dashStyle(u.spikedash,q)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:C,x2:C,y1:R,y2:B,"stroke-width":q+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}z.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:C,cy:O-(u.side!=="top"?q:-q),r:q,fill:U}).classed("spikeline",!0)}}}function Yit(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers)||a.binNumber!==i.binNumber)return!0}return!1}function aie(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function iie(e,t){return Nv.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Xit(e,t){for(var r=t.charAt(0),n=[],a=[],i=[],o=0;oe.offsetTop+e.clientTop,die=e=>e.offsetLeft+e.clientLeft;function r_(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,i=n.top,o=a+n.width,s=i+n.height,l=zu.apply3DTransform(r._invTransform)(a,i),u=zu.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],h=u[0],v=u[1];return{x:c,y:f,width:h-c,height:v-f,top:Math.min(f,v),left:Math.min(c,h),right:Math.max(c,h),bottom:Math.max(f,v)}}});var n4=ne((itr,vie)=>{"use strict";var Zit=Zt(),$it=_a(),Kit=Hd().isUnifiedHover;vie.exports=function(t,r,n,a){a=a||{};var i=r.legend;function o(s){a.font[s]||(a.font[s]=i?r.legend.font[s]:r.font[s])}r&&Kit(r.hovermode)&&(a.font||(a.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(a.bgcolor||(a.bgcolor=$it.combine(r.legend.bgcolor,r.paper_bgcolor)),a.bordercolor||(a.bordercolor=r.legend.bordercolor)):a.bgcolor||(a.bgcolor=r.paper_bgcolor)),n("hoverlabel.bgcolor",a.bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),n("hoverlabel.showarrow",a.showarrow),Zit.coerceFont(n,"hoverlabel.font",a.font),n("hoverlabel.align",a.align)}});var gie=ne((otr,pie)=>{"use strict";var Jit=Zt(),Qit=n4(),eot=Fg();pie.exports=function(t,r){function n(a,i){return Jit.coerce(t,r,eot,a,i)}Qit(t,r,n)}});var xie=ne((str,yie)=>{"use strict";var mie=Zt(),tot=db(),rot=n4();yie.exports=function(t,r,n,a){function i(s,l){return mie.coerce(t,r,tot,s,l)}var o=mie.extendFlat({},a.hoverlabel);r.hovertemplate&&(o.namelength=-1),rot(t,r,i,o)}});var HI=ne((ltr,bie)=>{"use strict";var not=Zt(),aot=Fg();bie.exports=function(t,r){function n(a,i){return r[a]!==void 0?r[a]:not.coerce(t,r,aot,a,i)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}});var Tie=ne((utr,wie)=>{"use strict";var _ie=Zt(),iot=Fg(),oot=HI(),sot=n4();wie.exports=function(t,r){function n(u,c){return _ie.coerce(t,r,iot,u,c)}var a=oot(t,r);a&&(n("hoverdistance"),n("spikedistance"),a.indexOf("unified")!==-1&&n("hoversort"));var i=n("dragmode");i==="select"&&n("selectdirection");var o=r._has("map"),s=r._has("geo"),l=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s)&&l===1||o&&s&&l===2)&&(r.dragmode="pan"),sot(t,r,n),_ie.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var Sie=ne((ctr,Mie)=>{"use strict";var jI=Zt(),Aie=Fa();Mie.exports=function(t){var r=t.calcdata,n=t._fullLayout;function a(u){return function(c){return jI.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var i=0;i{"use strict";var uot=Fa(),cot=GI().hover;Eie.exports=function(t,r,n){var a=uot.getComponentMethod("annotations","onClick")(t,t._hoverdata),i=t._fullLayout;n!==void 0&&cot(t,r,n,!0);function o(){var l,u,c,f;var s={points:t._hoverdata,event:r};(l=s.xaxes)!=null||(s.xaxes=t._hoverXAxes),(u=s.yaxes)!=null||(s.yaxes=t._hoverYAxes),(c=s.xvals)!=null||(s.xvals=t._hoverXVals),(f=s.yvals)!=null||(s.yvals=t._hoverYVals),t.emit("plotly_click",s)}(t._hoverdata||i.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),a&&a.then?a.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var cu=ne((htr,Fie)=>{"use strict";var fot=Ea(),eE=Zt(),hot=od(),a4=Hd(),Cie=Fg(),Lie=GI();Fie.exports={moduleType:"component",name:"fx",constants:w5(),schema:{layout:Cie},attributes:db(),layoutAttributes:Cie,supplyLayoutGlobalDefaults:gie(),supplyDefaults:xie(),supplyLayoutDefaults:Tie(),calc:Sie(),getDistanceFunction:a4.getDistanceFunction,getClosest:a4.getClosest,inbox:a4.inbox,quadrature:a4.quadrature,appendArrayPointValue:a4.appendArrayPointValue,castHoverOption:vot,castHoverinfo:pot,hover:Lie.hover,unhover:hot.unhover,loneHover:Lie.loneHover,loneUnhover:dot,click:kie()};function dot(e){var t=eE.isD3Selection(e)?e:fot.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function vot(e,t,r){return eE.castOption(e,t,"hoverlabel."+r)}function pot(e,t,r){function n(a){return eE.coerceHoverinfo({hoverinfo:a},{_module:e._module},t)}return eE.castOption(e,r,"hoverinfo",n)}});var Cp=ne(P1=>{"use strict";P1.selectMode=function(e){return e==="lasso"||e==="select"};P1.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};P1.openMode=function(e){return e==="drawline"||e==="drawopenpath"};P1.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};P1.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};P1.selectingOrDrawing=function(e){return P1.freeMode(e)||P1.rectMode(e)}});var i4=ne((vtr,Pie)=>{"use strict";Pie.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var tE=ne((ptr,Die)=>{"use strict";Die.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},cloudupload:{width:640,height:640,path:"M451.5 160C434.9 160 418.8 164.5 404.7 172.7C388.9 156.7 370.5 143.3 350.2 133.2C378.4 109.2 414.3 96 451.5 96C537.9 96 608 166 608 252.5C608 294 591.5 333.8 562.2 363.1L491.1 434.2C461.8 463.5 422 480 380.5 480C294.1 480 224 410 224 323.5C224 322 224 320.5 224.1 319C224.6 301.3 239.3 287.4 257 287.9C274.7 288.4 288.6 303.1 288.1 320.8C288.1 321.7 288.1 322.6 288.1 323.4C288.1 374.5 329.5 415.9 380.6 415.9C405.1 415.9 428.6 406.2 446 388.8L517.1 317.7C534.4 300.4 544.2 276.8 544.2 252.3C544.2 201.2 502.8 159.8 451.7 159.8zM307.2 237.3C305.3 236.5 303.4 235.4 301.7 234.2C289.1 227.7 274.7 224 259.6 224C235.1 224 211.6 233.7 194.2 251.1L123.1 322.2C105.8 339.5 96 363.1 96 387.6C96 438.7 137.4 480.1 188.5 480.1C205 480.1 221.1 475.7 235.2 467.5C251 483.5 269.4 496.9 289.8 507C261.6 530.9 225.8 544.2 188.5 544.2C102.1 544.2 32 474.2 32 387.7C32 346.2 48.5 306.4 77.8 277.1L148.9 206C178.2 176.7 218 160.2 259.5 160.2C346.1 160.2 416 230.8 416 317.1C416 318.4 416 319.7 416 321C415.6 338.7 400.9 352.6 383.2 352.2C365.5 351.8 351.6 337.1 352 319.4C352 318.6 352 317.9 352 317.1C352 283.4 334 253.8 307.2 237.5z",transform:"matrix(1 0 0 1 -15 -15)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}});var nE=ne((gtr,Rie)=>{"use strict";var rE=32;Rie.exports={CIRCLE_SIDES:rE,i000:0,i090:rE/4,i180:rE/2,i270:rE/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var aE=ne((mtr,zie)=>{"use strict";var got=Zt().strTranslate;function Iie(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function mot(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function yot(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return Iie(e,r[t])}}function xot(e){return got(e.xaxis._offset,e.yaxis._offset)}zie.exports={p2r:Iie,r2p:mot,axValue:yot,getTransform:xot}});var tm=ne(D1=>{"use strict";var bot=V5(),Oie=nE(),a_=Oie.CIRCLE_SIDES,WI=Oie.SQRT2,Nie=aE(),qie=Nie.p2r,Bie=Nie.r2p,_ot=[0,3,4,5,6,1,2],wot=[0,3,4,1,2];D1.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var Uie=uu(),Wie=Cp(),Tot=Wie.drawMode,Aot=Wie.openMode,i_=nE(),Vie=i_.i000,Gie=i_.i090,Hie=i_.i180,jie=i_.i270,Mot=i_.cos45,Sot=i_.sin45,Yie=aE(),oE=Yie.p2r,rm=Yie.r2p,Eot=Gg(),kot=Eot.clearOutline,sE=tm(),Cot=sE.readPaths,Lot=sE.writePaths,Fot=sE.ellipseOver,Pot=sE.fixDatesForPaths;function Dot(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,a=t.isActiveShape,i=t.dragmode,o=(n.layout||{}).shapes||[];if(!Tot(i)&&a!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var Rot=Cp(),Iot=Rot.selectMode,zot=Gg(),qot=zot.clearOutline,YI=tm(),Bot=YI.readPaths,Oot=YI.writePaths,Not=YI.fixDatesForPaths;$ie.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var a=n.getAttribute("d"),i=r.gd,o=i._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,h=(i.layout||{}).selections||[];if(!Iot(f)&&c!==void 0){var v=i._fullLayout._activeSelectionIndex;if(v{"use strict";Kie.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var am=ne(Yf=>{"use strict";var Fp=s4(),Jie=Zt(),nm=ri();Yf.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};Yf.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};Yf.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};Yf.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};Yf.extractPathCoords=function(e,t,r){var n=[],a=e.match(Fp.segmentRE);return a.forEach(function(i){var o=t[i.charAt(0)].drawn;if(o!==void 0){var s=i.slice(1).match(Fp.paramRE);if(!(!s||s.length{let s=o.charAt(0),l=a[s].drawn!==void 0;return i+(l?1:0)},0)};Yf.getDataToPixel=function(e,t,r,n,a){var i=e._fullLayout._size,o;if(t)if(a==="domain")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=Yf.shapePositionToRange(t);o=function(l){var u=Lp(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=Yf.decodeDate(o))}else n?o=function(l){return i.t+i.h*(1-l)}:o=function(l){return i.l+i.w*l};return o};Yf.getPixelToData=function(e,t,r,n){var a=e._fullLayout._size,i;if(t)if(n==="domain")i=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=Yf.rangeToShapePosition(t);i=function(s){return o(t.p2r(s-t._offset))}}else r?i=function(s){return 1-(s-a.t)/a.h}:i=function(s){return(s-a.l)/a.w};return i};Yf.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};Yf.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],a=!!n;return a?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!=="paper"&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};Yf.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],a=!!n;return a?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}};Yf.getPathString=function(e,t){let r=t.type,n=nm.getRefType(t.xref),a=nm.getRefType(t.yref),i=e._fullLayout._size;var o,s,l,u,c,f,h,v,d,m,x,g;function E(C,A,P,D){var z;if(C)if(A==="domain")D?z=function(q){return C._offset+C._length*(1-q)}:z=function(q){return C._offset+C._length*q};else{let q=Yf.shapePositionToRange(C);z=function(U){return C._offset+C.r2p(q(U,!0))},P==="path"&&C.type==="date"&&(z=Yf.decodeDate(z))}else D?z=function(q){return i.t+i.h*(1-q)}:z=function(q){return i.l+i.w*q};return z}if(n==="array"?(h=[],o=t.xref.map(function(C){return nm.getFromId(e,C)}),h=t.xref.map(function(C,A){return E(o[A],nm.getRefType(C),r,!1)})):(o=nm.getFromId(e,t.xref),h=E(o,n,r,!1)),a==="array"?(v=[],s=t.yref.map(function(C){return nm.getFromId(e,C)}),v=t.yref.map(function(C,A){return E(s[A],nm.getRefType(C),r,!0)})):(s=nm.getFromId(e,t.yref),v=E(s,a,r,!0)),r==="path")return Uot(t,h,v);if(n==="array")l=Lp(o[0],t.x0shift),u=Lp(o[1],t.x1shift),d=h[0](t.x0)+l,m=h[1](t.x1)+u;else if(l=Lp(o,t.x0shift),u=Lp(o,t.x1shift),t.xsizemode==="pixel"){let C=h(t.xanchor);d=C+t.x0+l,m=C+t.x1+u}else d=h(t.x0)+l,m=h(t.x1)+u;if(a==="array")c=Lp(s[0],t.y0shift),f=Lp(s[1],t.y1shift),x=v[0](t.y0)+c,g=v[1](t.y1)+f;else if(c=Lp(s,t.y0shift),f=Lp(s,t.y1shift),t.ysizemode==="pixel"){let C=v(t.yanchor);x=C-t.y0+c,g=C-t.y1+f}else x=v(t.y0)+c,g=v(t.y1)+f;if(r==="line")return"M"+d+","+x+"L"+m+","+g;if(r==="rect")return"M"+d+","+x+"H"+m+"V"+g+"H"+d+"Z";var M=(d+m)/2,w=(x+g)/2,k=Math.abs(M-d),y=Math.abs(w-x),S="A"+k+","+y,T=M+k+","+w,p=M+","+(w-y);return"M"+T+S+" 0 1,1 "+p+S+" 0 0,1 "+T+"Z"};function Uot(e,t,r){let n=e.path,a=e.xsizemode,i=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return n.replace(Fp.segmentRE,function(h){var v=0,d=h.charAt(0),m=Fp.paramIsX[d],x=Fp.paramIsY[d],g=Fp.numParams[d];let E=m.drawn!==void 0,M=x.drawn!==void 0,w=l?t[c]:t,k=u?r[f]:r;var y=h.slice(1).replace(Fp.paramRE,function(S){return m[v]?a==="pixel"?S=w(o)+Number(S):S=w(S):x[v]&&(i==="pixel"?S=k(s)-Number(S):S=k(S)),v++,v>g&&(S="X"),S});return v>g&&(y=y.replace(/[\s,]*X.*/,""),Jie.log("Ignoring extra params in segment "+h)),E&&c++,M&&f++,d+y})}Yf.getPixelShift=Lp;function Lp(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var ZI=ne((Ttr,toe)=>{"use strict";var Vot=Zt(),Pp=ri(),Qie=Ms(),eoe=li(),Got=tm().readPaths,cx=am(),Hot=cx.getPathString,l4=qM(),jot=qc().FROM_TL;toe.exports=function(t,r,n,a){if(a.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var i;if(n.label.texttemplate){var o={};if(n.type!=="path"){var s=Pp.getFromId(t,n.xref),l=Pp.getFromId(t,n.yref);let X=Array.isArray(n.xref),te=Array.isArray(n.yref);for(var u in l4){var c=typeof l4[u]=="function",f=!X||l4.simpleXVariables.includes(u),h=!te||l4.simpleYVariables.includes(u);if(c&&f&&h){var v=l4[u](n,s,l);v!==void 0&&(o[u]=v)}}}i=Vot.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else i=n.label.text;var d={"data-index":r},m=n.label.font,x={"data-notex":1},g=a.append("g").attr(d).classed("shape-label",!0),E=g.append("text").attr(x).classed("shape-label-text",!0).text(i),M,w,k,y;if(n.path){var S=Hot(t,n),T=Got(S,t);M=1/0,k=1/0,w=-1/0,y=-1/0;for(var p=0;pcx.getDataToPixel(t,ze,le,!1,Xe)(Pe),ye=(Pe,le,ze,Xe)=>cx.getDataToPixel(t,ze,le,!0,Xe)(Pe);if(n.xsizemode==="pixel"){let Pe=he(n.xanchor,void 0,se,fe),le=cx.getPixelShift(se,n.x0shift),ze=cx.getPixelShift(se,n.x1shift);M=Pe+n.x0+le,w=Pe+n.x1+ze}else M=he(n.x0,n.x0shift,se,fe),w=he(n.x1,n.x1shift,ue,ce);if(n.ysizemode==="pixel"){let Pe=ye(n.yanchor,void 0,re,oe),le=cx.getPixelShift(re,n.y0shift),ze=cx.getPixelShift(re,n.y1shift);k=Pe-n.y0+le,y=Pe-n.y1+ze}else k=ye(n.y0,n.y0shift,re,oe),y=ye(n.y1,n.y1shift,j,we)}var q=n.label.textangle;q==="auto"&&(n.type==="line"?q=Wot(M,k,w,y):q=0),E.call(function(X){return X.call(eoe.font,m).attr({}),Qie.convertToTspans(X,t),X});var U=eoe.bBox(E.node()),O=Yot(M,k,w,y,n,q,U),R=O.textx,B=O.texty,Y=O.xanchor;E.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[Y],y:B,x:R,transform:"rotate("+q+","+R+","+B+")"}).call(Qie.positionText,R,B)}};function Wot(e,t,r,n){var a,i;return i=Math.abs(r-e),r>=e?a=t-n:a=n-t,-180/Math.PI*Math.atan2(a,i)}function Yot(e,t,r,n,a,i,o){var s=a.label.textposition,l=a.label.textangle,u=a.label.padding,c=a.type,f=Math.PI/180*i,h=Math.sin(f),v=Math.cos(f),d=a.label.xanchor,m=a.label.yanchor,x,g,E,M;if(c==="line"){s==="start"?(x=e,g=t):s==="end"?(x=r,g=n):(x=(e+r)/2,g=(t+n)/2),d==="auto"&&(s==="start"?l==="auto"?r>e?d="left":re?d="right":re?d="right":re?d="left":r{"use strict";var Xot=Zt(),Zot=Xot.strTranslate,roe=od(),ioe=Cp(),$ot=ioe.drawMode,ooe=ioe.selectMode,soe=Fa(),noe=_a(),cE=nE(),Kot=cE.i000,Jot=cE.i090,Qot=cE.i180,est=cE.i270,tst=Gg(),loe=tst.clearOutlineControllers,KI=tm(),uE=KI.pointsOnRectangle,$I=KI.pointsOnEllipse,rst=KI.writePaths,nst=lE().newShapes,ast=lE().createShapeObj,ist=XI(),ost=ZI();uoe.exports=function e(t,r,n,a){a||(a=0);var i=n.gd;function o(){e(t,r,n,a++),($I(t[0])||n.hasText)&&s({redrawing:!0})}function s(O){var R={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,R=nst(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,R=ist(r,n),i._fullLayout._reselect=!0),Object.keys(R).length&&soe.call((O||{}).redrawing?"relayout":"_guiRelayout",i,R)}var l=i._fullLayout,u=l._zoomlayer,c=n.dragmode,f=$ot(c),h=ooe(c);(f||h)&&(i._fullLayout._outlining=!0),loe(i),r.attr("d",rst(t));var v,d,m,x,g;if(!a&&(n.isActiveShape||n.isActiveSelection)){g=sst([],t);var E=u.append("g").attr("class","outline-controllers");C(E),U()}if(f&&n.hasText){var M=u.select(".label-temp"),w=ast(r,n,n.dragmode);ost(i,"label-temp",w,M)}function k(O){m=+O.srcElement.getAttribute("data-i"),x=+O.srcElement.getAttribute("data-j"),v[m][x].moveFn=y}function y(O,R){if(t.length){var B=g[m][x][1],Y=g[m][x][2],X=t[m],te=X.length;if(uE(X)){var se=O,ue=R;if(n.isActiveSelection){var re=aoe(X,x);re[1]===X[x][1]?ue=0:se=0}for(var j=0;j1&&!(O.length===2&&O[1][0]==="Z")&&(x===0&&(O[0][0]="M"),t[m]=O,o(),s())}}function p(O,R){if(O===2){m=+R.srcElement.getAttribute("data-i"),x=+R.srcElement.getAttribute("data-j");var B=t[m];!uE(B)&&!$I(B)&&T()}}function C(O){v=[];for(var R=0;R{"use strict";var ust=Ea(),poe=Fa(),QI=Zt(),fx=ri(),cst=tm().readPaths,fst=fE(),dE=ZI(),goe=Gg().clearOutlineControllers,JI=_a(),vE=li(),hst=Bo().arrayEditor,coe=od(),foe=cu(),hoe=z0(),hx=s4(),jd=am(),ez=jd.getPathString;xoe.exports={draw:tz,drawOne:moe,eraseActiveShape:mst,drawLabel:dE};function tz(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;a{if(!e._dragging&&e._fullLayout.hoveranywhere){let o=a(i);o&&foe.hover(e,o,r.id)}}),n.addEventListener("click",i=>{if(!e._dragged&&e._fullLayout.clickanywhere){let o=a(i);o&&foe.click(e,o,r.id)}})}function yoe(e,t,r){let n=r.xref,a=r.yref;if(Array.isArray(n)||Array.isArray(a)){let i="clip"+t._fullLayout._uid+"shape"+r._index,o=vst(t,n,a);QI.ensureSingleById(t._fullLayout._clips,"clipPath",i,function(s){s.append("rect")}).select("rect").attr(o),vE.setClipUrl(e,i,t)}else{let i=(n+a).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");vE.setClipUrl(e,i?"clip"+t._fullLayout._uid+i:null,t)}}function vst(e,t,r){let n=e._fullLayout._size;function a(s,l){let u=(Array.isArray(s)?s:[s]).map(h=>fx.getFromId(e,h)).filter(Boolean);if(!u.length)return l?[n.t,n.t+n.h]:[n.l,n.l+n.w];let c=u.map(function(h){return h._offset}),f=u.map(function(h){return h._offset+h._length});return[Math.min(...c),Math.max(...f)]}let i=a(t,!1),o=a(r,!0);return{x:i[0],y:o[0],width:i[1]-i[0],height:o[1]-o[0]}}function pst(e,t,r,n,a,i){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",h=i.modifyItem,v,d,m,x,g,E,M,w,k,y,S,T,p,C,A,P=ust.select(t.node().parentNode),D=fx.getFromId(e,r.xref),z=fx.getRefType(r.xref),q=fx.getFromId(e,r.yref),U=fx.getRefType(r.yref),O=r.x0shift,R=r.x1shift,B=r.y0shift,Y=r.y1shift,X=function(Oe,qe){var mt=jd.getDataToPixel(e,D,qe,!1,z);return mt(Oe)},te=function(Oe,qe){var mt=jd.getDataToPixel(e,q,qe,!0,U);return mt(Oe)},se=jd.getPixelToData(e,D,!1,z),ue=jd.getPixelToData(e,q,!0,U),re=ce(),j={element:re.node(),gd:e,prepFn:he,doneFn:ye,clickFn:Pe},fe;coe.init(j),re.node().onmousemove=we;function ce(){return c?oe():t}function oe(){var Oe=10,qe=Math.max(r.line.width,Oe),mt=a.append("g").attr("data-index",n).attr("drag-helper",!0);mt.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":qe,"stroke-opacity":"0"});var lt={"fill-opacity":"0"},Ie=Math.max(qe/2,Oe);return mt.append("circle").attr({"data-line-point":"start-point",cx:l?X(r.xanchor)+r.x0:X(r.x0,O),cy:u?te(r.yanchor)-r.y0:te(r.y0,B),r:Ie}).style(lt).classed("cursor-grab",!0),mt.append("circle").attr({"data-line-point":"end-point",cx:l?X(r.xanchor)+r.x1:X(r.x1,R),cy:u?te(r.yanchor)-r.y1:te(r.y1,Y),r:Ie}).style(lt).classed("cursor-grab",!0),mt}function we(Oe){if(hE(e)){fe=null;return}if(c)Oe.target.tagName==="path"?fe="move":fe=Oe.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var qe=j.element.getBoundingClientRect(),mt=qe.right-qe.left,lt=qe.bottom-qe.top,Ie=Oe.clientX-qe.left,de=Oe.clientY-qe.top,Ee=!f&&mt>o&<>s&&!Oe.shiftKey?coe.getCursor(Ie/mt,1-de/lt):"move";hoe(t,Ee),fe=Ee.split("-")[0]}}function he(Oe){hE(e)||(l&&(g=X(r.xanchor)),u&&(E=te(r.yanchor)),r.type==="path"?A=r.path:(v=l?r.x0:X(r.x0),d=u?r.y0:te(r.y0),m=l?r.x1:X(r.x1),x=u?r.y1:te(r.y1)),vx?(M=d,S="y0",w=x,T="y1"):(M=x,S="y1",w=d,T="y0"),we(Oe),Xe(a,r),st(t,r,e),j.moveFn=fe==="move"?le:ze,j.altKey=Oe.altKey)}function ye(){hE(e)||(hoe(t),vt(a),yoe(t,e,r),poe.call("_guiRelayout",e,i.getUpdateObj()))}function Pe(){hE(e)||vt(a)}function le(Oe,qe){if(r.type==="path"){var mt=function(de){return de},lt=mt,Ie=mt;l?h("xanchor",r.xanchor=se(g+Oe)):(lt=function(Ee){return se(X(Ee)+Oe)},D&&D.type==="date"&&(lt=jd.encodeDate(lt))),u?h("yanchor",r.yanchor=ue(E+qe)):(Ie=function(Ee){return ue(te(Ee)+qe)},q&&q.type==="date"&&(Ie=jd.encodeDate(Ie))),h("path",r.path=doe(A,lt,Ie))}else l?h("xanchor",r.xanchor=se(g+Oe)):(h("x0",r.x0=se(v+Oe)),h("x1",r.x1=se(m+Oe))),u?h("yanchor",r.yanchor=ue(E+qe)):(h("y0",r.y0=ue(d+qe)),h("y1",r.y1=ue(x+qe)));t.attr("d",ez(e,r)),Xe(a,r),dE(e,n,r,P)}function ze(Oe,qe){if(f){var mt=function(Wt){return Wt},lt=mt,Ie=mt;l?h("xanchor",r.xanchor=se(g+Oe)):(lt=function(_r){return se(X(_r)+Oe)},D&&D.type==="date"&&(lt=jd.encodeDate(lt))),u?h("yanchor",r.yanchor=ue(E+qe)):(Ie=function(_r){return ue(te(_r)+qe)},q&&q.type==="date"&&(Ie=jd.encodeDate(Ie))),h("path",r.path=doe(A,lt,Ie))}else if(c){if(fe==="resize-over-start-point"){var de=v+Oe,Ee=u?d-qe:d+qe;h("x0",r.x0=l?de:se(de)),h("y0",r.y0=u?Ee:ue(Ee))}else if(fe==="resize-over-end-point"){var Ue=m+Oe,ge=u?x-qe:x+qe;h("x1",r.x1=l?Ue:se(Ue)),h("y1",r.y1=u?ge:ue(ge))}}else{var Ge=function(Wt){return fe.indexOf(Wt)!==-1},tt=Ge("n"),ft=Ge("s"),He=Ge("w"),Qe=Ge("e"),We=tt?M+qe:M,pt=ft?w+qe:w,kt=He?k+Oe:k,qt=Qe?y+Oe:y;u&&(tt&&(We=M-qe),ft&&(pt=w-qe)),(!u&&pt-We>s||u&&We-pt>s)&&(h(S,r[S]=u?We:ue(We)),h(T,r[T]=u?pt:ue(pt))),qt-kt>o&&(h(p,r[p]=l?kt:se(kt)),h(C,r[C]=l?qt:se(qt)))}t.attr("d",ez(e,r)),Xe(a,r),dE(e,n,r,P)}function Xe(Oe,qe){(l||u)&&mt();function mt(){var lt=qe.type!=="path",Ie=Oe.selectAll(".visual-cue").data([0]),de=1;Ie.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":de}).classed("visual-cue",!0);var Ee=X(l?qe.xanchor:QI.midRange(lt?[qe.x0,qe.x1]:jd.extractPathCoords(qe.path,hx.paramIsX))),Ue=te(u?qe.yanchor:QI.midRange(lt?[qe.y0,qe.y1]:jd.extractPathCoords(qe.path,hx.paramIsY)));if(Ee=jd.roundPositionForSharpStrokeRendering(Ee,de),Ue=jd.roundPositionForSharpStrokeRendering(Ue,de),l&&u){var ge="M"+(Ee-1-de)+","+(Ue-1-de)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Ie.attr("d",ge)}else if(l){var Ge="M"+(Ee-1-de)+","+(Ue-9-de)+"v18 h2 v-18 Z";Ie.attr("d",Ge)}else{var tt="M"+(Ee-9-de)+","+(Ue-1-de)+"h18 v2 h-18 Z";Ie.attr("d",tt)}}}function vt(Oe){Oe.selectAll(".visual-cue").remove()}function st(Oe,qe,mt){var lt=qe.xref,Ie=qe.yref,de=fx.getFromId(mt,lt),Ee=fx.getFromId(mt,Ie),Ue="";lt!=="paper"&&!de.autorange&&(Ue+=lt),Ie!=="paper"&&!Ee.autorange&&(Ue+=Ie),vE.setClipUrl(Oe,Ue?"clip"+mt._fullLayout._uid+Ue:null,mt)}}function doe(e,t,r){return e.replace(hx.segmentRE,function(n){var a=0,i=n.charAt(0),o=hx.paramIsX[i],s=hx.paramIsY[i],l=hx.numParams[i],u=n.slice(1).replace(hx.paramRE,function(c){return a>=l||(o[a]?c=t(c):s[a]&&(c=r(c)),a++),c});return i+u})}function gst(e,t){if(pE(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){voe(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=voe,tz(e)}}}function voe(e){if(pE(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(goe(e),delete e._fullLayout._activeShapeIndex,tz(e))}}function mst(e){if(pE(e)){goe(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var boe=Ea(),mE=Zt()._;_oe.exports=function(t,r,n){var a=boe.select(t._fullLayout._paperdiv.node());a.selectAll(".plotly-cloud-dialog").remove();var i=a.append("div").classed("plotly-cloud-dialog",!0),o=i.append("div").classed("plotly-cloud-dialog-box",!0);o.append("div").classed("plotly-cloud-dialog-title",!0).text(mE(t,"Share with Plotly Cloud"));var s=new URL(r).hostname,l=o.append("div");l.classed("plotly-cloud-dialog-message",!0),l.append("span").text(mE(t,"This chart and its data will be sent to ")),l.append("span").text(s).classed("plotly-cloud-dialog-message--hostname",!0),l.append("span").text(". ");var u=o.append("div").classed("plotly-cloud-dialog-buttons",!0);function c(){i.remove(),document.removeEventListener("keydown",f)}function f(h){(h.key==="Escape"||h.keyCode===27)&&c()}document.addEventListener("keydown",f),i.on("click",function(){boe.event.target===i.node()&&c()}),u.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(mE(t,"Cancel")).on("click",c),u.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(mE(t,"Share")).on("click",function(){c(),n()})}});var az=ne((Etr,Coe)=>{"use strict";var Uv=Fa(),yst=Sl(),Aoe=uu(),hs=tE(),xst=gE().eraseActiveShape,bst=woe(),yE=Zt(),Vo=yE._,ds=Coe.exports={};ds.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?Vo(e,"Download plot as a PNG"):Vo(e,"Download plot")},icon:hs.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};yE.notifier(Vo(e,"Preparing image - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),Uv.call("downloadImage",e,r).then(function(n){yE.notifier(Vo(e,"Image download succeeded")+" - "+n,"long",e)}).catch(function(){yE.notifier(Vo(e,"Sorry, there was a problem downloading your image!"),"long",e)})}};ds.sendChartToCloud={name:"sendChartToCloud",title:function(e){return Vo(e,"Share Chart")},icon:hs.cloudupload,click:function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(!t){console.error("No destination URL provided (plotlyServerURL is not set)");return}try{new URL(t)}catch(r){console.error("Invalid plotlyServerURL: "+t);return}bst(e,t,function(){yst.sendDataToCloud(e,t)})}};ds.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Vo(e,"Zoom")},attr:"dragmode",val:"zoom",icon:hs.zoombox,click:ld};ds.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Vo(e,"Pan")},attr:"dragmode",val:"pan",icon:hs.pan,click:ld};ds.select2d={name:"select2d",_cat:"select",title:function(e){return Vo(e,"Box Select")},attr:"dragmode",val:"select",icon:hs.selectbox,click:ld};ds.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Vo(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:hs.lasso,click:ld};ds.drawclosedpath={name:"drawclosedpath",title:function(e){return Vo(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:hs.drawclosedpath,click:ld};ds.drawopenpath={name:"drawopenpath",title:function(e){return Vo(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:hs.drawopenpath,click:ld};ds.drawline={name:"drawline",title:function(e){return Vo(e,"Draw line")},attr:"dragmode",val:"drawline",icon:hs.drawline,click:ld};ds.drawrect={name:"drawrect",title:function(e){return Vo(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:hs.drawrect,click:ld};ds.drawcircle={name:"drawcircle",title:function(e){return Vo(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:hs.drawcircle,click:ld};ds.eraseshape={name:"eraseshape",title:function(e){return Vo(e,"Erase active shape")},icon:hs.eraseshape,click:xst};ds.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Vo(e,"Zoom in")},attr:"zoom",val:"in",icon:hs.zoom_plus,click:ld};ds.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Vo(e,"Zoom out")},attr:"zoom",val:"out",icon:hs.zoom_minus,click:ld};ds.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Vo(e,"Autoscale")},attr:"zoom",val:"auto",icon:hs.autoscale,click:ld};ds.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Vo(e,"Reset axes")},attr:"zoom",val:"reset",icon:hs.home,click:ld};ds.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Vo(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:hs.tooltip_basic,gravity:"ne",click:ld};ds.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Vo(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:hs.tooltip_compare,gravity:"ne",click:ld};function ld(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,i=e._fullLayout,o={},s=Aoe.list(e,null,!0),l=i._cartesianSpikesEnabled,u,c;if(n==="zoom"){var f=a==="in"?.5:2,h=(1+f)/2,v=(1-f)/2,d,m;for(c=0;c-y),[m,x]=f.invert(c.midPt),{minscale:g}=u.projection,E=(s=u.projection.maxscale)!=null?s:1/0,M=Math.min(g,E),w=Math.max(g,E),k=a==="in"?Toe*h:1/Toe*h;k>w?k=w:k{"use strict";var Loe=az(),Ast=Object.keys(Loe),Foe=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],Poe=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(Foe),o_=[],Mst=function(e){if(Poe.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();o_.indexOf(t)===-1&&o_.push(t),o_.indexOf(r)===-1&&o_.push(r)}};Ast.forEach(function(e){Mst(Loe[e])});o_.sort();Doe.exports={DRAW_MODES:Foe,backButtons:Poe,foreButtons:o_}});var sz={};E0(sz,{default:()=>Est});var oz,Sst,Est,lz=lo(()=>{"use strict";oz=yp(iz()),Sst={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["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`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${oz.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${oz.default.foreButtons.join("*, *")}*.`].join(" ")}},Est=Sst});var Ioe=ne((Ctr,Roe)=>{"use strict";var kst=Zt(),u4=_a(),Cst=Bo(),Lst=(lz(),vl(sz)).default;Roe.exports=function(t,r){var n=t.modebar||{},a=Cst.newContainer(r,"modebar");function i(s,l){return kst.coerce(n,a,Lst,s,l)}i("orientation"),i("bgcolor",u4.addOpacity(r.paper_bgcolor,.5));var o=u4.contrast(u4.rgb(r.modebar.bgcolor));i("color",u4.addOpacity(o,.3)),i("activecolor",u4.addOpacity(o,.7)),i("uirevision",r.uirevision),i("add"),i("remove")}});var Ooe=ne((Ltr,Boe)=>{"use strict";var uz=Ea(),Fst=mi(),_E=Zt(),zoe=tE(),Pst=g5().version,Dst=new DOMParser;function qoe(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var Dp=qoe.prototype;Dp.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this.element.setAttribute("role","toolbar"),this._uid=a,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var i=n.modebar,o="#"+a+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=i.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),_E.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color,this.element)};Dp.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(a){var i=a.name;if(!i)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");t.buttonsNames.push(i);var o=t.createButton(a);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};Dp.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};Dp.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute("data-title",n),r.setAttribute("aria-label",n)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),r.setAttribute("data-val",a));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&uz.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||zoe.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};Dp.createIcon=function(e){var t=Fst(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(r,"svg"),n.setAttribute("viewBox",[0,0,e.width,t].join(" ")),n.setAttribute("class","icon");var a=document.createElementNS(r,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(a)}if(e.svg){var i=Dst.parseFromString(e.svg,"application/xml");n=i.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};Dp.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var a=n.getAttribute("data-val")||!0,i=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",s=uz.select(n),l=function(f,h){var v=t.modebar,d=f.querySelector(".icon path");d&&(h||f.matches(":hover")?d.style.fill=v.activecolor:d.style.fill=v.color)};if(o){if(i===r){var u=!s.classed("active");s.classed("active",u),l(n,u)}}else{var c=i===null?i:_E.nestedProperty(t,i).get();s.classed("active",c===a),l(n,c===a)}})};Dp.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var zst=uu(),Noe=ml(),cz=Fa(),qst=Hd().isUnifiedHover,Bst=Ooe(),wE=az(),Ost=iz().DRAW_MODES,Nst=Zt().extendDeep;Uoe.exports=function(t){var r=t._fullLayout,n=t._context,a=r._modeBar;if(!n.displayModeBar&&!n.watermark){a&&(a.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=n.modeBarButtons,o;Array.isArray(i)&&i.length?o=Wst(i):!n.displayModeBar&&n.watermark?o=[]:o=Ust(t),a?a.update(t,o):r._modeBar=Bst(t,o)};function Ust(e){var t=e._fullLayout,r=e._fullData,n=e._context;function a(O,R){if(typeof R=="string"){if(R.toLowerCase()===O.toLowerCase())return!0}else{var B=R.name,Y=R._cat||R.name;if(B===O||Y===O.toLowerCase())return!0}return!1}var i=t.modebar.add;typeof i=="string"&&(i=[i]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(i.filter(function(O){for(var R=0;R1?(p=["toggleHover"],C=["resetViews"]):f?(T=["zoomInGeo","zoomOutGeo"],p=["hoverClosestGeo"],C=["resetGeo"]):c?(p=["hoverClosest3d"],C=["resetCameraDefault3d","resetCameraLastSave3d"]):m?(T=["zoomInMap","zoomOutMap"],p=["toggleHover"],C=["resetViewMap"]):h?p=["hoverClosestPie"]:E?(p=["hoverClosestCartesian","hoverCompareCartesian"],C=["resetViewSankey"]):p=["toggleHover"],u&&p.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(Hst(r)||w)&&(p=[]),u&&!M&&(T=["zoomIn2d","zoomOut2d","autoScale2d"],C[0]!=="resetViews"&&(C=["resetScale2d"])),c?A=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!M||d?A=["zoom2d","pan2d"]:m||f?A=["pan2d"]:x&&(A=["zoom2d"]),Gst(r)&&A.push("select2d","lasso2d");var P=[],D=function(O){P.indexOf(O)===-1&&p.indexOf(O)!==-1&&P.push(O)};if(Array.isArray(s)){for(var z=[],q=0;q{"use strict";Goe.exports={moduleType:"component",name:"modebar",layoutAttributes:(lz(),vl(sz)).default,supplyLayoutDefaults:Ioe(),manage:Voe()}});var hz=ne((Dtr,Hoe)=>{"use strict";var Yst=qc().FROM_BL;Hoe.exports=function(t,r,n){n===void 0&&(n=Yst[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=a[0]+(a[1]-a[0])*n;t.range=t._input.range=[t.l2r(i+(a[0]-i)*r),t.l2r(i+(a[1]-i)*r)],t.setScale()}});var vx=ne(c4=>{"use strict";var dx=Zt(),dz=I0(),B0=uu().id2name,Xst=Wf(),joe=hz(),Zst=Tp(),$st=uo().ALMOST_EQUAL,Kst=qc().FROM_BL;c4.handleDefaults=function(e,t,r){var n=r.axIds,a=r.axHasImage,i=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,h,v,d;for(s=0;si?r.slice(i):n.slice(a))+o}function Qst(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;o$st*d&&!E)){for(i=0;iP&&YC&&(C=Y);var te=(C-p)/(2*A);f/=te,p=l.l2r(p),C=l.l2r(C),l.range=l._input.range=y{"use strict";var AE=Ea(),ud=Fa(),gv=Sl(),Vv=Zt(),gz=Ms(),mz=i4(),f4=_a(),s_=li(),Zoe=Qy(),ese=fz(),h4=ri(),R1=qc(),tse=vx(),elt=tse.enforce,tlt=tse.clean,$oe=I0().doAutoRange,rse="start",rlt="middle",nse="end",nlt=zc().zindexSeparator;wf.layoutStyles=function(e){return Vv.syncOrAsync([gv.doAutoMargin,ilt],e)};function alt(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function ilt(e){var t=e._fullLayout,r=t._size,n=r.p,a=h4.list(e,"",!0),i,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(s_.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),wf.drawMainTitle(e),ese.manage(e),!t._has("cartesian"))return gv.previousPromises(e);function f(he,ye,Pe){var le=he._lw/2;if(he._id.charAt(0)==="x"){if(ye){if(Pe==="top")return ye._offset-n-le}else return r.t+r.h*(1-(he.position||0))+le%1;return ye._offset+ye._length+n+le}if(ye){if(Pe==="right")return ye._offset+ye._length+n+le}else return r.l+r.w*(he.position||0)+le%1;return ye._offset-n-le}for(i=0;i0){ult(e,i,u,l),s.attr({x:o,y:i,"text-anchor":n,dy:Qoe(t.yanchor)}).call(gz.positionText,o,i);var c=(t.text.match(gz.BR_TAG_ALL)||[]).length;if(c){var f=R1.LINE_SPACING*c+R1.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var x=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",x)})}var h=AE.select(e).selectAll(".gtitle-subtitle");if(h.node()){var v=s.node().getBBox(),d=v.y+v.height,m=d+Zoe.SUBTITLE_PADDING_EM*t.subtitle.font.size;h.attr({x:o,y:m,"text-anchor":n,dy:Qoe(t.yanchor)}).call(gz.positionText,o,m)}}}};function olt(e,t,r,n,a){var i=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=Vv.isTopAnchor(t)?n:n-a,s=r==="b"?i-o:o;return Vv.isTopAnchor(t)&&r==="t"||Vv.isBottomAnchor(t)&&r==="b"?!1:s.5?"t":"b",o=e._fullLayout.margin[i],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=slt(i,n,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function ult(e,t,r,n){var a="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",s={x:i.x,y:i.y,t:0,b:0},l={};i.yref==="paper"&&olt(e,i,o,t,n)?s[o]=r:i.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[a]=l),gv.allowAutoMargin(e,a),gv.autoMargin(e,a,s)}function clt(e,t){var r=e.title,n=e._size,a=0;return t===rse?a=r.pad.l:t===nse&&(a=-r.pad.r),r.xref==="paper"?n.l+n.w*r.x+a:e.width*r.x+a}function flt(e,t){var r=e.title,n=e._size,a=0;return t==="0em"||!t?a=-r.pad.b:t===R1.CAP_SHIFT+"em"&&(a=r.pad.t),r.y==="auto"?n.t/2:r.yref==="paper"?n.t+n.h-n.h*r.y+a:e.height-e.height*r.y+a}function Qoe(e){return e==="top"?R1.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":R1.MID_SHIFT+"em"}function hlt(e){var t=e.title,r=rlt;return Vv.isRightAnchor(t)?r=nse:Vv.isLeftAnchor(t)&&(r=rse),r}function dlt(e){var t=e.title,r="0em";return Vv.isTopAnchor(t)?r=R1.CAP_SHIFT+"em":Vv.isMiddleAnchor(t)&&(r=R1.MID_SHIFT+"em"),r}wf.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var vlt=tm().readPaths,plt=fE(),ase=Gg().clearOutlineControllers,yz=_a(),ise=li(),glt=Bo().arrayEditor,ose=am(),mlt=ose.getPathString;lse.exports={draw:ME,drawOne:sse,activateLastSelection:blt};function ME(e){var t=e._fullLayout;ase(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a=0;x--){var g=o.append("path").attr(l).style("opacity",x?.1:u).call(yz.stroke,f).call(yz.fill,c).call(ise.dashLine,x?"solid":v,x?4+h:h);if(ylt(g,e,n),d){var E=glt(e.layout,"selections",n);g.style({cursor:"move"});var M={element:g.node(),plotinfo:a,gd:e,editHelpers:E,isActiveSelection:!0},w=vlt(s,e);plt(w,g,M)}else g.style("pointer-events",x?"all":"none");m[x]=g}var k=m[0],y=m[1];y.node().addEventListener("click",function(){return xlt(e,k)})}}function ylt(e,t,r){var n=r.xref+r.yref;ise.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function xlt(e,t){if(SE(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){xz(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=xz,ME(e)}}}function blt(e){if(SE(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=xz,ME(e)}}function xz(e){if(SE(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(ase(e),delete e._fullLayout._activeSelectionIndex,ME(e))}}});var cse=ne((qtr,use)=>{function _lt(){var e,t=0,r=!1;function n(a,i){return e.list.push({type:a,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(a,i){return n("check",{seg1:a,seg2:i})},segmentChop:function(a,i){return n("div_seg",{seg:a,pt:i}),n("chop",{seg:a,pt:i})},statusRemove:function(a){return n("pop_seg",{seg:a})},segmentUpdate:function(a){return n("seg_update",{seg:a})},segmentNew:function(a,i){return n("new_seg",{seg:a,primary:i})},segmentRemove:function(a){return n("rem_seg",{seg:a})},tempStatus:function(a,i,o){return n("temp_status",{seg:a,above:i,below:o})},rewind:function(a){return n("rewind",{seg:a})},status:function(a,i,o){return n("status",{seg:a,above:i,below:o})},vert:function(a){return a===r?e:(r=a,n("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),n("log",{txt:a})},reset:function(){return n("reset")},selected:function(a){return n("selected",{segs:a})},chainStart:function(a){return n("chain_start",{seg:a})},chainRemoveHead:function(a,i){return n("chain_rem_head",{index:a,pt:i})},chainRemoveTail:function(a,i){return n("chain_rem_tail",{index:a,pt:i})},chainNew:function(a,i){return n("chain_new",{pt1:a,pt2:i})},chainMatch:function(a){return n("chain_match",{index:a})},chainClose:function(a){return n("chain_close",{index:a})},chainAddHead:function(a,i){return n("chain_add_head",{index:a,pt:i})},chainAddTail:function(a,i){return n("chain_add_tail",{index:a,pt:i})},chainConnect:function(a,i){return n("chain_con",{index1:a,index2:i})},chainReverse:function(a){return n("chain_rev",{index:a})},chainJoin:function(a,i){return n("chain_join",{index1:a,index2:i})},done:function(){return n("done")}},e}use.exports=_lt});var hse=ne((Btr,fse)=>{function wlt(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,n,a){var i=n[0],o=n[1],s=a[0],l=a[1],u=r[0],c=r[1];return(s-i)*(c-o)-(l-o)*(u-i)>=-e},pointBetween:function(r,n,a){var i=r[1]-n[1],o=a[0]-n[0],s=r[0]-n[0],l=a[1]-n[1],u=s*o+i*l;if(u-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-i>e&&(o-c)*(i-f)/(s-f)+c-a>e&&(l=!l),o=c,s=f}return l}};return t}fse.exports=wlt});var vse=ne((Otr,dse)=>{var Tlt={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,a=e.root.next;a!==null;){if(r(a)){t.prev=a.prev,t.next=a,a.prev.next=t,a.prev=t;return}n=a,a=a.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(a){return a.prev=r,a.next=n,r.next=a,n!==null&&(n.prev=a),a}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};dse.exports=Tlt});var gse=ne((Ntr,pse)=>{var v4=vse();function Alt(e,t,r){function n(d,m){return{id:r?r.segmentId():-1,start:d,end:m,myFill:{above:null,below:null},otherFill:null}}function a(d,m,x){return{id:r?r.segmentId():-1,start:d,end:m,myFill:{above:x.myFill.above,below:x.myFill.below},otherFill:null}}var i=v4.create();function o(d,m,x,g,E,M){var w=t.pointsCompare(m,E);return w!==0?w:t.pointsSame(x,M)?0:d!==g?d?1:-1:t.pointAboveOrOnLine(x,g?E:M,g?M:E)?1:-1}function s(d,m){i.insertBefore(d,function(x){var g=o(d.isStart,d.pt,m,x.isStart,x.pt,x.other.pt);return g<0})}function l(d,m){var x=v4.node({isStart:!0,pt:d.start,seg:d,primary:m,other:null,status:null});return s(x,d.end),x}function u(d,m,x){var g=v4.node({isStart:!1,pt:m.end,seg:m,primary:x,other:d,status:null});d.other=g,s(g,d.pt)}function c(d,m){var x=l(d,m);return u(x,d,m),x}function f(d,m){r&&r.segmentChop(d.seg,m),d.other.remove(),d.seg.end=m,d.other.pt=m,s(d.other,d.pt)}function h(d,m){var x=a(m,d.seg.end,d.seg);return f(d,m),c(x,d.primary)}function v(d,m){var x=v4.create();function g(q,U){var O=q.seg.start,R=q.seg.end,B=U.seg.start,Y=U.seg.end;return t.pointsCollinear(O,B,Y)?t.pointsCollinear(R,B,Y)||t.pointAboveOrOnLine(R,B,Y)?1:-1:t.pointAboveOrOnLine(O,B,Y)?1:-1}function E(q){return x.findTransition(function(U){var O=g(q,U.ev);return O>0})}function M(q,U){var O=q.seg,R=U.seg,B=O.start,Y=O.end,X=R.start,te=R.end;r&&r.checkIntersection(O,R);var se=t.linesIntersect(B,Y,X,te);if(se===!1){if(!t.pointsCollinear(B,Y,X)||t.pointsSame(B,te)||t.pointsSame(Y,X))return!1;var ue=t.pointsSame(B,X),re=t.pointsSame(Y,te);if(ue&&re)return U;var j=!ue&&t.pointBetween(B,X,te),fe=!re&&t.pointBetween(Y,X,te);if(ue)return fe?h(U,Y):h(q,te),U;j&&(re||(fe?h(U,Y):h(q,te)),h(U,B))}else se.alongA===0&&(se.alongB===-1?h(q,X):se.alongB===0?h(q,se.pt):se.alongB===1&&h(q,te)),se.alongB===0&&(se.alongA===-1?h(U,B):se.alongA===0?h(U,se.pt):se.alongA===1&&h(U,Y));return!1}for(var w=[];!i.isEmpty();){var k=i.getHead();if(r&&r.vert(k.pt[0]),k.isStart){let q=function(){if(S){var U=M(k,S);if(U)return U}return T?M(k,T):!1};var z=q;r&&r.segmentNew(k.seg,k.primary);var y=E(k),S=y.before?y.before.ev:null,T=y.after?y.after.ev:null;r&&r.tempStatus(k.seg,S?S.seg:!1,T?T.seg:!1);var p=q();if(p){if(e){var C;k.seg.myFill.below===null?C=!0:C=k.seg.myFill.above!==k.seg.myFill.below,C&&(p.seg.myFill.above=!p.seg.myFill.above)}else p.seg.otherFill=k.seg.myFill;r&&r.segmentUpdate(p.seg),k.other.remove(),k.remove()}if(i.getHead()!==k){r&&r.rewind(k.seg);continue}if(e){var C;k.seg.myFill.below===null?C=!0:C=k.seg.myFill.above!==k.seg.myFill.below,T?k.seg.myFill.below=T.seg.myFill.above:k.seg.myFill.below=d,C?k.seg.myFill.above=!k.seg.myFill.below:k.seg.myFill.above=k.seg.myFill.below}else if(k.seg.otherFill===null){var A;T?k.primary===T.primary?A=T.seg.otherFill.above:A=T.seg.myFill.above:A=k.primary?m:d,k.seg.otherFill={above:A,below:A}}r&&r.status(k.seg,S?S.seg:!1,T?T.seg:!1),k.other.status=y.insert(v4.node({ev:k}))}else{var P=k.status;if(P===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(x.exists(P.prev)&&x.exists(P.next)&&M(P.prev.ev,P.next.ev),r&&r.statusRemove(P.ev.seg),P.remove(),!k.primary){var D=k.seg.myFill;k.seg.myFill=k.seg.otherFill,k.seg.otherFill=D}w.push(k.seg)}i.getHead().remove()}return r&&r.done(),w}return e?{addRegion:function(d){for(var m,x=d[d.length-1],g=0;g{function Mlt(e,t,r){var n=[],a=[];return e.forEach(function(i){var o=i.start,s=i.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(i);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(z,q,U){return c.index=z,c.matches_head=q,c.matches_pt1=U,c===l?(c=u,!1):(c=null,!0)}for(var h=0;h{function p4(e,t,r){var n=[];return e.forEach(function(a){var i=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);t[i]!==0&&n.push({id:r?r.segmentId():-1,start:a.start,end:a.end,myFill:{above:t[i]===1,below:t[i]===2},otherFill:null})}),r&&r.selected(n),n}var Slt={union:function(e,t){return p4(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return p4(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return p4(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return p4(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return p4(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};xse.exports=Slt});var wse=ne((Gtr,_se)=>{var Elt={toPolygon:function(e,t){function r(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(i[0]),l=1;l{var klt=cse(),Clt=hse(),Tse=gse(),Llt=yse(),g4=bse(),Ase=wse(),Gv=!1,m4=Clt(),Wd;Wd={buildLog:function(e){return e===!0?Gv=klt():e===!1&&(Gv=!1),Gv===!1?!1:Gv.list},epsilon:function(e){return m4.epsilon(e)},segments:function(e){var t=Tse(!0,m4,Gv);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=Tse(!1,m4,Gv);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:g4.union(e.combined,Gv),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:g4.intersect(e.combined,Gv),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:g4.difference(e.combined,Gv),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:g4.differenceRev(e.combined,Gv),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:g4.xor(e.combined,Gv),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:Llt(e.segments,m4,Gv),inverted:e.inverted}},polygonFromGeoJSON:function(e){return Ase.toPolygon(Wd,e)},polygonToGeoJSON:function(e){return Ase.fromPolygon(Wd,m4,e)},union:function(e,t){return y4(e,t,Wd.selectUnion)},intersect:function(e,t){return y4(e,t,Wd.selectIntersect)},difference:function(e,t){return y4(e,t,Wd.selectDifference)},differenceRev:function(e,t){return y4(e,t,Wd.selectDifferenceRev)},xor:function(e,t){return y4(e,t,Wd.selectXor)}};function y4(e,t,r){var n=Wd.segments(e),a=Wd.segments(t),i=Wd.combine(n,a),o=r(i);return Wd.polygon(o)}typeof window=="object"&&(window.PolyBool=Wd);Mse.exports=Wd});var kse=ne((jtr,Ese)=>{Ese.exports=function(t,r,n,a){var i=t[0],o=t[1],s=!1;n===void 0&&(n=0),a===void 0&&(a=r.length);for(var l=a-n,u=0,c=l-1;uo!=d>o&&i<(v-f)*(o-h)/(d-h)+f;m&&(s=!s)}return s}});var x4=ne((Wtr,Cse)=>{"use strict";var _z=RM().dot,EE=uo().BADNUM,kE=Cse.exports={};kE.tester=function(t){var r=t.slice(),n=r[0][0],a=n,i=r[0][1],o=i,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;sa||g===EE||go||m&&u(d))}function f(d,m){var x=d[0],g=d[1];if(x===EE||xa||g===EE||go)return!1;var E=r.length,M=r[0][0],w=r[0][1],k=0,y,S,T,p,C;for(y=1;yMath.max(S,M)||g>Math.max(T,w)))if(gs||Math.abs(_z(f,u))>a)return!0;return!1};kE.filter=function(t,r){var n=[t[0]],a=0,i=0;function o(l){t.push(l);var u=n.length,c=a;n.splice(i+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var Fse=ne((Ytr,Lse)=>{"use strict";Lse.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var Qse=ne((Xtr,Jse)=>{"use strict";var Pse=Sse(),Flt=kse(),w4=Fa(),Plt=li().dashStyle,b4=_a(),Dlt=cu(),Rlt=Hd().makeEventData,E4=Cp(),Ilt=E4.freeMode,zlt=E4.rectMode,T4=E4.drawMode,Mz=E4.openMode,Sz=E4.selectMode,Dse=am(),Rse=s4(),Ose=fE(),Nse=Gg().clearOutline,Use=tm(),wz=Use.handleEllipse,qlt=Use.readPaths,Blt=lE().newShapes,Olt=XI(),Nlt=bz().activateLastSelection,LE=Zt(),Ult=LE.sorterAsc,Vse=x4(),_4=YM(),Hv=uu().getFromId,Vlt=i4(),Glt=d4().redrawReglTraces,FE=Fse(),Rp=FE.MINSELECT,Hlt=Vse.filter,Ez=Vse.tester,kz=aE(),Ise=kz.p2r,jlt=kz.axValue,Wlt=kz.getTransform;function Cz(e){return e.subplot!==void 0}function Ylt(e,t,r,n,a){var i=!Cz(n),o=Ilt(a),s=zlt(a),l=Mz(a),u=T4(a),c=Sz(a),f=a==="drawline",h=a==="drawcircle",v=f||h,d=n.gd,m=d._fullLayout,x=c&&m.newselection.mode==="immediate"&&i,g=m._zoomlayer,E=n.element.getBoundingClientRect(),M=n.plotinfo,w=Wlt(M),k=t-E.left,y=r-E.top;m._calcInverseTransform(d);var S=LE.apply3DTransform(m._invTransform)(k,y);k=S[0],y=S[1];var T=m._invScaleX,p=m._invScaleY,C=k,A=y,P="M"+k+","+y,D=n.xaxes[0],z=n.yaxes[0],q=D._length,U=z._length,O=e.altKey&&!(T4(a)&&l),R,B,Y,X,te,se,ue;Hse(e,d,n),o&&(R=Hlt([[k,y]],FE.BENDPX));var re=g.selectAll("path.select-outline-"+M.id).data([1]),j=u?m.newshape:m.newselection;u&&(n.hasText=j.label.text||j.label.texttemplate);var fe=u&&!l?j.fillcolor:"rgba(0,0,0,0)",ce=j.line.color||(i?b4.contrast(d._fullLayout.plot_bgcolor):"#7f7f7f");re.enter().append("path").attr("class","select-outline select-outline-"+M.id).style({opacity:u?j.opacity/2:1,"stroke-dasharray":Plt(j.line.dash,j.line.width),"stroke-width":j.line.width+"px","shape-rendering":"crispEdges"}).call(b4.stroke,ce).call(b4.fill,fe).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",w).attr("d",P+"Z");var oe=g.append("path").attr("class","zoombox-corners").style({fill:b4.background,stroke:b4.defaultLine,"stroke-width":1}).attr("transform",w).attr("d","M0,0Z");if(u&&n.hasText){var we=g.select(".label-temp");we.empty()&&(we=g.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var he=m._uid+FE.SELECTID,ye=[],Pe=PE(d,n.xaxes,n.yaxes,n.subplot);x&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(i){var ze=D._id,Xe=z._id;Zse(d,ze,Xe,Pe);for(var vt=(d.layout||{}).selections||[],st=[],Oe=!1,qe=0;qe=0){d._fullLayout._deactivateShape(d);return}if(!u){var vt=m.clickmode;_4.done(he).then(function(){if(_4.clear(he),ze===2){for(re.remove(),te=0;te-1&&Gse(Xe,d,n.xaxes,n.yaxes,n.subplot,n,re),vt==="event"&&S4(d,void 0);Dlt.click(d,Xe,M.id)}).catch(LE.error)}},n.doneFn=function(){oe.remove(),_4.done(he).then(function(){_4.clear(he),!x&&X&&n.selectionDefs&&(X.subtract=O,n.selectionDefs.push(X),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,Y)),(x||u)&&A4(n,x),n.doneFnCompleted&&n.doneFnCompleted(ye),c&&S4(d,ue)}).catch(LE.error)}}function Gse(e,t,r,n,a,i,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],h,v,d,m,x,g,E,M,w,k;if(Jlt(s)){Hse(e,t,i),h=PE(t,r,n,a);var y=Qlt(s,h),S=y.pointNumbers.length>0;if(S?eut(h,y):tut(h)&&(E=qse(y))){for(o&&o.remove(),k=0;k=0}function Klt(e){return e._fullLayout._activeSelectionIndex>=0}function A4(e,t){var r=e.dragmode,n=e.plotinfo,a=e.gd;$lt(a)&&a._fullLayout._deactivateShape(a),Klt(a)&&a._fullLayout._deactivateSelection(a);var i=a._fullLayout,o=i._zoomlayer,s=T4(r),l=Sz(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&a._fullLayout._outlining){var c;s&&(c=Blt(u,e)),c&&w4.call("_guiRelayout",a,{shapes:c});var f;l&&!Cz(e)&&(f=Olt(u,e)),f&&(a._fullLayout._noEmitSelectedAtStart=!0,w4.call("_guiRelayout",a,{selections:f}).then(function(){t&&Nlt(a)})),a._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function zse(e){return e._id}function PE(e,t,r,n){if(!e.calcdata)return[];var a=[],i=t.map(zse),o=r.map(zse),s,l,u;for(u=0;u0,i=a?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(i)>-1:!1}function eut(e,t){var r=[],n,a,i,o;for(o=0;o0&&r.push(n);if(r.length===1&&(i=r[0]===t.searchInfo,i&&(a=t.searchInfo.cd[0].trace,a.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function M4(e,t,r){var n,a;for(n=0;n-1&&t;if(!o&&t){var ze=Bse(e,!0);if(ze.length){var Xe=ze[0].xref,vt=ze[0].yref;if(Xe&&vt){var st=$se(ze),Oe=Kse([Hv(e,Xe,"x"),Hv(e,vt,"y")]);Oe(ye,st)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:le&&S4(e,ye),h._reselect=!1}if(!o&&h._deselect){var qe=h._deselect;s=qe.xref,l=qe.yref,aut(s,l,c)||Zse(e,s,l,n),le&&(ye.points.length?S4(e,ye):Pz(e)),h._deselect=!1}return{eventData:ye,selectionTesters:r}}function nut(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";ele.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}]});var k4=ne(($tr,tle)=>{"use strict";tle.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e,"axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var om=ne((Jtr,ale)=>{"use strict";var rle=Dz(),nle=pl(),DE=zc(),uut=Bo().templatedArray,Ktr=k4();ale.exports=uut("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:nle({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:rle.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:rle.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",DE.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",DE.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",DE.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",DE.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:nle({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var Ip=ne((Qtr,ile)=>{"use strict";ile.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var zp=ne((err,ole)=>{"use strict";ole.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Tu=ne((trr,vle)=>{"use strict";var sle=Wl().axisHoverFormat,{hovertemplateAttrs:cut,texttemplateAttrs:fut,templatefallbackAttrs:lle}=rs(),ule=Ys(),hut=pl(),cle=xf().dash,dut=xf().pattern,vut=li(),put=Ip(),C4=ci().extendFlat,gut=zp();function fle(e){return{valType:"any",dflt:0,editType:"calc"}}function hle(e){return{valType:"any",editType:"calc"}}function dle(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}vle.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:fle("x"),yperiod:fle("y"),xperiod0:hle("x0"),yperiod0:hle("y0"),xperiodalignment:dle("x"),yperiodalignment:dle("y"),xhoverformat:sle("x"),yhoverformat:sle("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:fut(),texttemplatefallback:lle({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:cut({},{keys:put.eventDataKeys}),hovertemplatefallback:lle(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:C4({},cle,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:gut(!0),fillgradient:C4({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:dut,marker:C4({symbol:{valType:"enumerated",values:vut.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:C4({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:C4({},cle,{arrayOk:!0}),editType:"calc"},ule("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},ule("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:hut({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var Rz=ne((nrr,mle)=>{"use strict";var ple=om(),gle=Tu().line,mut=xf().dash,RE=ci().extendFlat,yut=Il().overrideAll,xut=Bo().templatedArray,rrr=k4();mle.exports=yut(xut("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:RE({},ple.xref,{}),yref:RE({},ple.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:gle.color,width:RE({},gle.width,{min:1,dflt:1}),dash:RE({},mut,{dflt:"dot"})}}),"arraydraw","from-root")});var _le=ne((arr,ble)=>{"use strict";var yle=Zt(),IE=ri(),but=zh(),_ut=Rz(),xle=am();ble.exports=function(t,r){but(t,r,{name:"selections",handleItemDefaults:wut});for(var n=r.selections,a=0;a{"use strict";wle.exports=function(t,r,n){n("newselection.mode");var a=n("newselection.line.width");a&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var L4=ne((orr,Sle)=>{"use strict";var Tut=Fa(),Ale=Zt(),Mle=uu();Sle.exports=function(t){return function(n,a){var i=n[t];if(Array.isArray(i))for(var o=Tut.subplotsRegistry.cartesian,s=o.idRegex,l=a._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,h=a._has("cartesian"),v=0;v{"use strict";var Ele=bz(),F4=Qse();kle.exports={moduleType:"component",name:"selections",layoutAttributes:Rz(),supplyLayoutDefaults:_le(),supplyDrawNewSelectionDefaults:Tle(),includeBasePlot:L4()("selections"),draw:Ele.draw,drawOne:Ele.drawOne,reselect:F4.reselect,prepSelect:F4.prepSelect,clearOutline:F4.clearOutline,clearSelectionsCache:F4.clearSelectionsCache,selectOnClick:F4.selectOnClick}});var Vz=ne((lrr,Yle)=>{"use strict";var Nz=Ea(),jv=Zt(),Cle=jv.numberFormat,Aut=HS(),zE=Fa(),qle=jv.strTranslate,Mut=Ms(),zz=_a(),sm=li(),Sut=cu(),Lle=ri(),Eut=z0(),kut=od(),Ble=Cp(),qE=Ble.selectingOrDrawing,Cut=Ble.freeMode,Lut=qc().FROM_TL,Fut=i4(),Put=d4().redrawReglTraces,Dut=Sl(),qz=uu().getFromId,Rut=ef().prepSelect,Iut=ef().clearOutline,zut=ef().selectOnClick,Iz=hz(),Uz=zc(),Fle=Uz.MINDRAG,Td=Uz.MINZOOM,Ple=!0;function qut(e,t,r,n,a,i,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,h,v,d,m,x,g,E,M,w,k,y,S,T,p,C,A,P,D,z,q,U,O;r+=t.yaxis._shift;function R(){if(f=t.xaxis,h=t.yaxis,M=f._length,w=h._length,g=f._offset,E=h._offset,v={},v[f._id]=f,d={},d[h._id]=h,o&&s)for(var Qe=t.overlays,We=0;We=0){pt._fullLayout._deactivateShape(pt);return}var kt=pt._fullLayout.clickmode;if(Oz(pt),Qe===2&&!c&&Ue(),u)kt.indexOf("select")>-1&&zut(We,pt,m,x,t.id,X),kt.indexOf("event")>-1&&Sut.click(pt,We,t.id);else if(Qe===1&&c){var qt=o?h:f,Wt=o==="s"||s==="w"?0:1,_r=qt._name+".range["+Wt+"]",tr=But(qt,Wt),lr="left",Ye="middle";if(qt.fixedrange)return;o?(Ye=o==="n"?"top":"bottom",qt.side==="right"&&(lr="right")):s==="e"&&(lr="right"),pt._context.showAxisRangeEntryBoxes&&Nz.select(Y).call(Mut.makeEditable,{gd:pt,immediate:!0,background:pt._fullLayout.paper_bgcolor,text:String(tr),fill:qt.tickfont?qt.tickfont.color:"#444",horizontalAlign:lr,verticalAlign:Ye}).on("edit",function(Te){var Fe=qt.d2r(Te);Fe!==void 0&&zE.call("_guiRelayout",pt,_r,Fe)})}}kut.init(X);var ue,re,j,fe,ce,oe,we,he,ye,Pe;function le(Qe,We,pt){var kt=Y.getBoundingClientRect();ue=We-kt.left,re=pt-kt.top,e._fullLayout._calcInverseTransform(e);var qt=jv.apply3DTransform(e._fullLayout._invTransform)(ue,re);ue=qt[0],re=qt[1],j={l:ue,r:ue,w:0,t:re,b:re,h:0},fe=e._hmpixcount?e._hmlumcount/e._hmpixcount:zz.color(e._fullLayout.plot_bgcolor).luminosity(),ce="M0,0H"+M+"V"+w+"H0V0",oe=!1,we="xy",Pe=!1,he=Ule(l,fe,g,E,ce),ye=Vle(l,g,E)}function ze(Qe,We){if(e._transitioningWithDuration)return!1;var pt=Math.max(0,Math.min(M,U*Qe+ue)),kt=Math.max(0,Math.min(w,O*We+re)),qt=Math.abs(pt-ue),Wt=Math.abs(kt-re);j.l=Math.min(ue,pt),j.r=Math.max(ue,pt),j.t=Math.min(re,kt),j.b=Math.max(re,kt);function _r(){we="",j.r=j.l,j.t=j.b,ye.attr("d","M0,0Z")}if(k.isSubplotConstrained)qt>Td||Wt>Td?(we="xy",qt/M>Wt/w?(Wt=qt*w/M,re>kt?j.t=re-Wt:j.b=re+Wt):(qt=Wt*M/w,ue>pt?j.l=ue-qt:j.r=ue+qt),ye.attr("d",BE(j))):_r();else if(y.isSubplotConstrained)if(qt>Td||Wt>Td){we="xy";var tr=Math.min(j.l/M,(w-j.b)/w),lr=Math.max(j.r/M,(w-j.t)/w);j.l=tr*M,j.r=lr*M,j.b=(1-tr)*w,j.t=(1-lr)*w,ye.attr("d",BE(j))}else _r();else!T||Wt0){var Te;if(y.isSubplotConstrained||!S&&T.length===1){for(Te=0;Te1&&(_r.maxallowed!==void 0&&C===(_r.range[0]<_r.range[1]?"e":"w")||_r.minallowed!==void 0&&C===(_r.range[0]<_r.range[1]?"w":"e"))&&(Ze=1,_t=0),Re?(Ke=Fe,St=o||y.isSubplotConstrained?Qe[1]:He(tr,Ke)):y.yaHash[tr._id]?(Ke=Fe,St=Qe[1]*tr._length/h._length):y.xaHash[tr._id]?(Ke=Te,St=S==="ew"?-Qe[0]*tr._length/f._length:He(tr,Ke,{e:"right",w:"left"}[S])):(Ke=tt(tr,Te,Fe),St=ft(tr,Ke)),Ke>1&&(tr.maxallowed!==void 0&&A===(tr.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function Nut(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function Ule(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",qle(r,n)).attr("d",a+"Z")}function Vle(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:zz.background,stroke:zz.defaultLine,"stroke-width":1,opacity:0}).attr("transform",qle(t,r)).attr("d","M0,0Z")}function Gle(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Hle(e,t,a,i)}function Hle(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function Oz(e){Nz.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function jle(e){Ple&&e.data&&e._context.showTips&&(jv.notifier(jv._(e,"Double-click to zoom back out"),"long",e),Ple=!1)}function Uut(e,t){return"M"+(e.l-.5)+","+(t-Td-.5)+"h-3v"+(2*Td+1)+"h3ZM"+(e.r+.5)+","+(t-Td-.5)+"h3v"+(2*Td+1)+"h-3Z"}function Vut(e,t){return"M"+(t-Td-.5)+","+(e.t-.5)+"v-3h"+(2*Td+1)+"v3ZM"+(t-Td-.5)+","+(e.b+.5)+"v3h"+(2*Td+1)+"v-3Z"}function BE(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,Td)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function Ile(e,t,r,n,a){for(var i=!1,o={},s={},l,u,c,f,h=(a||{}).xaHash,v=(a||{}).yaHash,d=0;d{"use strict";var Gut=Ea(),OE=cu(),Hut=od(),jut=z0(),O0=Vz().makeDragBox,Tf=zc().DRAGGERSIZE;NE.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Gut.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var n=Object.keys(r._plots||{}).sort(function(i,o){if((r._plots[i].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=i.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[i].mainplot?1:-1});n.forEach(function(i){var o=r._plots[i],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=O0(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(h){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===i&&t._fullLayout._plots[i]&&OE.hover(t,h,i)},OE.hover(t,h,i),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=i},u.onmouseout=function(h){t._dragging||(t._fullLayout._hoversubplot=null,Hut.unhover(t,h))},t._context.showAxisDragHandles&&(O0(t,o,s._offset-Tf,l._offset-Tf,Tf,Tf,"n","w"),O0(t,o,s._offset+s._length,l._offset-Tf,Tf,Tf,"n","e"),O0(t,o,s._offset-Tf,l._offset+l._length,Tf,Tf,"s","w"),O0(t,o,s._offset+s._length,l._offset+l._length,Tf,Tf,"s","e"))}if(t._context.showAxisDragHandles){if(i===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=Tf),O0(t,o,s._offset+s._length*.1,c,s._length*.8,Tf,"","ew"),O0(t,o,s._offset,c,s._length*.1,Tf,"","w"),O0(t,o,s._offset+s._length*.9,c,s._length*.1,Tf,"","e")}if(i===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=Tf),O0(t,o,f,l._offset+l._length*.1,Tf,l._length*.8,"ns",""),O0(t,o,f,l._offset+l._length*.9,Tf,l._length*.1,"s",""),O0(t,o,f,l._offset,Tf,l._length*.1,"n","")}}});var a=r._hoverlayer.node();a.onmousemove=function(i){i.target=t._fullLayout._lasthover,OE.hover(t,i,r._hoversubplot)},a.onclick=function(i){i.target=t._fullLayout._lasthover,OE.click(t,i)},a.onmousedown=function(i){t._fullLayout._lasthover.onmousedown(i)},NE.updateFx(t)}};NE.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";jut(t._draggers,r)}});var $le=ne((crr,Zle)=>{"use strict";var Xle=Fa();Zle.exports=function(t){for(var r=Xle.layoutArrayContainers,n=Xle.layoutArrayRegexes,a=t.split("[")[0],i,o,s=0;s{"use strict";var Wut=Lg(),Hz=DM(),P4=T1(),Yut=HM().sorterAsc,jz=Fa();D4.containerArrayMatch=$le();var Xut=D4.isAddVal=function(t){return t==="add"||Wut(t)},Kle=D4.isRemoveVal=function(t){return t===null||t==="remove"};D4.applyContainerArrayChanges=function(t,r,n,a,i){var o=r.astr,s=jz.getComponentMethod(o,"supplyLayoutDefaults"),l=jz.getComponentMethod(o,"draw"),u=jz.getComponentMethod(o,"drawOne"),c=a.replot||a.recalc||s===Hz||l===Hz,f=t.layout,h=t._fullLayout;if(n[""]){Object.keys(n).length>1&&P4.warn("Full array edits are incompatible with other edits",o);var v=n[""][""];if(Kle(v))r.set(null);else if(Array.isArray(v))r.set(v);else return P4.warn("Unrecognized full array edit value",o,v),!0;return c?!1:(s(f,h),l(t),!0)}var d=Object.keys(n).map(Number).sort(Yut),m=r.get(),x=m||[],g=i(h,o).get(),E=[],M=-1,w=x.length,k,y,S,T,p,C,A,P;for(k=0;kx.length-(A?0:1)){P4.warn("index out of range",o,S);continue}if(C!==void 0)p.length>1&&P4.warn("Insertion & removal are incompatible with edits to the same index.",o,S),Kle(C)?E.push(S):A?(C==="add"&&(C={}),x.splice(S,0,C),g&&g.splice(S,0,{})):P4.warn("Unrecognized full object edit value",o,S,C),M===-1&&(M=S);else for(y=0;y=0;k--)x.splice(E[k],1),g&&g.splice(E[k],1);if(x.length?m||r.set(x):r.set(null),c)return!1;if(s(f,h),u!==Hz){var D;if(M===-1)D=d;else{for(w=Math.max(x.length,w),D=[],k=0;k=M));k++)D.push(S);for(k=M;k{"use strict";var rue=mi(),nue=Fa(),cd=Zt(),R4=Sl(),aue=uu(),I4=aue.cleanId,Zut=aue.getFromTrace,Wz=nue.traceIs,$ut=["x","y","z"];Wv.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&cd.log("Clearing previous rejected promises from queue."),e._promises=[]};Wv.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(R4.subplotsRegistry.cartesian||{}).attrRegex,a=(R4.subplotsRegistry.polar||{}).attrRegex,i=(R4.subplotsRegistry.ternary||{}).attrRegex,o=(R4.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(x.x=1.02,x.xanchor="left"):x.x<-2&&(x.x=-.02,x.xanchor="right"),x.y>3?(x.y=1.02,x.yanchor="bottom"):x.y<-2&&(x.y=-.02,x.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),e.template&&e.template.layout&&Wv.cleanLayout(e.template.layout),e};function l_(e,t,r=!1){var n=e[t],a=t.charAt(0);r&&Array.isArray(n)||n&&n!=="paper"&&(e[t]=I4(n,a,!0))}Wv.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}Wv.hasParent=function(e,t){for(var r=tue(t);r;){if(r in e)return!0;r=tue(r)}return!1};Wv.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...n)=>n.every(a=>cd.isPlainObject(a))||n.every(a=>Array.isArray(a));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;ncd.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let a=e[n],i=t[n];if(a!==i&&!(r(a,i)?Yz(a,i):!1))return!1}return!0}return!1};Wv.collectionsAreEqual=Yz});var QE=ne(Oo=>{"use strict";var HE=Ea(),Qut=mi(),ect=rR(),Ma=Zt(),kl=Ma.nestedProperty,$z=Pb(),Ad=$ee(),Yv=Fa(),KE=Ib(),zi=Sl(),fd=ri(),tct=yI(),rct=Wf(),Xz=li(),nct=_a(),act=Gz().initInteractions,ict=qv(),oct=ef().clearOutline,cue=Dy().dfltConfig,VE=Jle(),vc=iue(),Rs=d4(),lm=Il(),sct=zc().AX_NAME_PATTERN,Zz=0,oue=5;function lct(e,t,r,n){var a;if(e=Ma.getGraphDiv(e),$z.init(e),Ma.isPlainObject(t)){var i=t;t=i.data,r=i.layout,n=i.config,a=i.frames}var o=$z.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!Ma.isPlotDiv(e)&&Ma.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(a)return Oo.addFrames(e,a)}hue(e,n),r||(r={}),HE.select(e).classed("js-plotly-plot",!0),Xz.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(vc.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=vc.cleanLayout(r)),zi.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(Fct(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),Xz.initGradients(e),Xz.initPatterns(e),l&&fd.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&zi.doCalcdata(e);for(var h=0;h=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function due(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),WE(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&WE(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function dct(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&c=0&&c0&&typeof T.parts[A]!="string";)A--;var P=T.parts[A],D=T.parts[A-1]+"."+P,z=T.parts.slice(0,A).join("."),q=kl(e.layout,z).get(),U=kl(n,z).get(),O=T.get();if(p!==void 0){g[S]=p,E[S]=P==="reverse"?p:I1(O);var R=KE.getLayoutValObject(n,T.parts);if(R&&R.impliedEdits&&p!==null)for(var B in R.impliedEdits)M(Ma.relativeAttr(S,B),R.impliedEdits[B]);if(["width","height"].indexOf(S)!==-1)if(p){M("autosize",null);var Y=S==="height"?"width":"height";M(Y,n[Y])}else n[S]=e._initialAutoSize[S];else if(S==="autosize")M("width",p?null:n.width),M("height",p?null:n.height);else if(D.match(wue))y(D),kl(n,z+"._inputRange").set(null);else if(D.match(Tue)){y(D),kl(n,z+"._inputRange").set(null);var X=kl(n,z).get();X._inputDomain&&(X._input.domain=X._inputDomain.slice())}else D.match(mct)&&kl(n,z+"._inputDomain").set(null);if(P==="type"){k=q;var te=U.type==="linear"&&p==="log",se=U.type==="log"&&p==="linear";if(te||se){if(!k||!k.range)M(z+".autorange",!0);else if(U.autorange)te&&(k.range=k.range[1]>k.range[0]?[1,2]:[2,1]);else{var ue=k.range[0],re=k.range[1];te?(ue<=0&&re<=0&&M(z+".autorange",!0),ue<=0?ue=re/1e6:re<=0&&(re=ue/1e6),M(z+".range[0]",Math.log(ue)/Math.LN10),M(z+".range[1]",Math.log(re)/Math.LN10)):(M(z+".range[0]",Math.pow(10,ue)),M(z+".range[1]",Math.pow(10,re)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[T.parts[0]]&&T.parts[1]==="radialaxis"&&delete n[T.parts[0]]._subplot.viewInitial["radialaxis.range"],Yv.getComponentMethod("annotations","convertCoords")(e,U,p,M),Yv.getComponentMethod("images","convertCoords")(e,U,p,M)}else M(z+".autorange",!0),M(z+".range",null);kl(n,z+"._inputRange").set(null)}else if(P.match(sct)){var j=kl(n,S).get(),fe=(p||{}).type;(!fe||fe==="-")&&(fe="linear"),Yv.getComponentMethod("annotations","convertCoords")(e,j,fe,M),Yv.getComponentMethod("images","convertCoords")(e,j,fe,M)}var ce=VE.containerArrayMatch(S);if(ce){c=ce.array,f=ce.index;var oe=ce.property,we=R||{editType:"calc"};f!==""&&oe===""&&(VE.isAddVal(p)?E[S]=null:VE.isRemoveVal(p)?E[S]=(kl(r,c).get()||[])[f]:Ma.warn("unrecognized full object value",t)),lm.update(x,we),u[c]||(u[c]={});var he=u[c][f];he||(he=u[c][f]={}),he[oe]=p,delete t[S]}else P==="reverse"?(q.range?q.range.reverse():(M(z+".autorange",!0),q.range=[1,0]),U.autorange?x.calc=!0:x.plot=!0):(S==="dragmode"&&(p===!1&&O!==!1||p!==!1&&O===!1)||n._has("scatter-like")&&n._has("regl")&&S==="dragmode"&&(p==="lasso"||p==="select")&&!(O==="lasso"||O==="select")?x.plot=!0:R?lm.update(x,R):x.calc=!0,T.set(p))}}for(c in u){var ye=VE.applyContainerArrayChanges(e,i(r,c),u[c],x,i);ye||(x.plot=!0)}for(var Pe in w){k=fd.getFromId(e,Pe);var le=k&&k._constraintGroup;if(le){x.calc=!0;for(var ze in le)w[ze]||(fd.getFromId(e,ze)._constraintShrinkable=!0)}}(Mue(e)||t.height||t.width)&&(x.plot=!0);var Xe=n.shapes;for(f=0;f1;)if(n.pop(),r=kl(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function bct(e,t){for(var r=0;r[z,e._ev.listeners(z)]);i=Oo.newPlot(e,t,r,n).then(()=>{for(let[z,q]of D)q.forEach(U=>e.on(z,U));return Oo.react(e,t,r,n)})}else{e.data=t||[],vc.cleanData(e.data),e.layout=r||{},vc.cleanLayout(e.layout),wct(e.data,e.layout,s,l),zi.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,h=e._fullLayout,v=h.datarevision===void 0,d=h.transition,m=Mct(e,l,h,v,d),x=m.newDataRevision,g=Act(e,s,f,v,d,x);if(Mue(e)&&(m.layoutReplot=!0),g.calc||m.calc){e.calcdata=void 0;for(var E=Object.getOwnPropertyNames(h),M=0;M(c||e.emit("plotly_react",{config:n,data:t,layout:r}),e))}function Act(e,t,r,n,a,i){var o=t.length===r.length;if(!a&&!o)return{fullReplot:!0,calc:!0};var s=lm.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(v){var d=KE.getTraceValObject(u,v);return!u._module.animatable&&d.anim&&(d.anim=!1),d}var f={getValObject:c,flags:s,immutable:n,transition:a,newDataRevision:i,gd:e},h={};for(l=0;l=a.length?a[0]:a[u]:a}function s(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var P=n._frameQueue.pop();P.onInterrupt&&P.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function h(P){if(P.length!==0){for(var D=0;Dn._timeToNext&&d()};P()}var x=0;function g(P){return Array.isArray(a)?x>=a.length?P.transitionOpts=a[x]:P.transitionOpts=a[0]:P.transitionOpts=a,x++,P}var E,M,w=[],k=t==null,y=Array.isArray(t),S=!k&&!y&&Ma.isPlainObject(t);if(S)w.push({type:"object",data:g(Ma.extendFlat({},t))});else if(k||["string","number"].indexOf(typeof t)!==-1)for(E=0;E0&&CC)&&A.push(M);w=A}}w.length>0?h(w):(e.emit("plotly_animated"),u())})}function Ect(e,t,r){if(e=Ma.getGraphDiv(e),t==null)return Promise.resolve();if(!Ma.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,a,i,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(Ma.isPlainObject(t[n])){var h=t[n].name,v=(l[h]||f[h]||{}).name,d=t[n].name,m=l[v]||f[v];v&&d&&typeof d=="number"&&m&&ZzT.index?-1:S.index=0;n--){if(a=c[n].frame,typeof a.name=="number"&&Ma.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;l[a.name="frame "+e._transitionData._counter++];);if(l[a.name]){for(i=0;i=0;r--)n=t[r],i.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:a[n]});var s=zi.modifyFrames,l=zi.modifyFrames,u=[e,o],c=[e,i];return Ad&&Ad.add(e,s,u,l,c),zi.modifyFrames(e,i)}function Cct(e){e=Ma.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return zi.cleanPlot([],{},r,t),zi.purge(e),$z.purge(e),t._container&&t._container.remove(),delete e._context,e}function Lct(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!Ma.equalDomRects(r,t._lastBBox)){var n=t._invTransform=Ma.inverseTransformMatrix(Ma.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function Fct(e){var t=HE.select(e),r=e._fullLayout;if(r._calcInverseTransform=Lct,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n={};HE.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=Ma.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(ict.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var i=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=i.append("g").classed("imagelayer",!0),r._shapeUpperLayer=i.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}Oo.animate=Sct;Oo.addFrames=Ect;Oo.deleteFrames=kct;Oo.addTraces=yue;Oo.deleteTraces=xue;Oo.extendTraces=gue;Oo.moveTraces=Kz;Oo.prependTraces=mue;Oo.newPlot=hct;Oo._doPlot=lct;Oo.purge=Cct;Oo.react=Tct;Oo.redraw=fct;Oo.relayout=z4;Oo.restyle=YE;Oo.setPlotConfig=uct;Oo.update=ZE;Oo._guiRelayout=Jz(z4);Oo._guiRestyle=Jz(YE);Oo._guiUpdate=Jz(ZE);Oo._storeDirectGUIEdit=gct});var z1=ne(Xv=>{"use strict";var Pct=Fa();Xv.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0};Xv.getRedrawFunc=function(e){return function(){Pct.getComponentMethod("colorbar","draw")(e)}};Xv.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};Xv.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var Sue=window.URL||window.webkitURL;Xv.createObjectURL=function(e){return Sue.createObjectURL(e)};Xv.revokeObjectURL=function(e){return Sue.revokeObjectURL(e)};Xv.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=Dct(window.atob(e));return new window.Blob([r],{type:"image/"+t})};Xv.octetStream=function(e){document.location.href="data:application/octet-stream"+e};Xv.getPlotTitle=function(e){var n,a,i,o;var t=e._fullLayout;if(t){var r=(n=t.title)==null?void 0:n.text;return r===((a=t._dfltTitle)==null?void 0:a.plot)?void 0:r}return(o=(i=e.layout)==null?void 0:i.title)==null?void 0:o.text};Xv.getPlotSubtitle=function(e){var n,a,i,o,s,l;var t=e._fullLayout;if(t){var r=(a=(n=t.title)==null?void 0:n.subtitle)==null?void 0:a.text;return r===((i=t._dfltTitle)==null?void 0:i.subtitle)?void 0:r}return(l=(s=(o=e.layout)==null?void 0:o.title)==null?void 0:s.subtitle)==null?void 0:l.text};function Dct(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),a=0;a{"use strict";var eq=Ea(),prr=Zt(),Rct=li(),Ict=_a(),grr=qv(),Qz=/"/g,px="TOBESTRIPPED",zct=new RegExp(`("${px})|(${px}")|("${px})|(${px}")`,"g"),qct=["&","&","&",""",""",""","'","'","'"],Bct=["<","<","<"],Oct=[">",">",">"];function Nct(e){let t=eq.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,n=>{let a=n.toLowerCase();return qct.includes(a)?n:Bct.includes(a)?"<":Oct.includes(a)?">":n.includes("<")||n.includes(">")?"":t.html(n).text()});return t.remove(),r}function Uct(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}Eue.exports=function(t,r,n){var a=t._fullLayout,i=a._paper,o=a._toppaper,s=a.width,l=a.height,u;i.insert("rect",":first-child").call(Rct.setRect,0,0,s,l).call(Ict.fill,a.paper_bgcolor);var c=a._basePlotModules||[];for(u=0;u{"use strict";var Vct=Zt(),Gct=Vy().EventEmitter,B4=z1();function Hct(e){var t=e.emitter||new Gct,r=new Promise(function(n,a){var i=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,h=u*c,v=u*f,d=l.getContext("2d",{willReadFrequently:!0}),m=new i,x,g;s==="svg"||Vct.isSafari()?g=B4.encodeSVG(o):(x=B4.createBlob(o,"svg"),g=B4.createObjectURL(x)),l.width=h,l.height=v,m.onload=function(){var E;switch(x=null,B4.revokeObjectURL(g),s!=="svg"&&d.drawImage(m,0,0,h,v),s){case"jpeg":E=l.toDataURL("image/jpeg");break;case"png":E=l.toDataURL("image/png");break;case"webp":E=l.toDataURL("image/webp");break;case"svg":E=g;break;default:var M="Image format is not jpeg, png, svg or webp.";if(a(new Error(M)),!e.promise)return t.emit("error",M)}n(E),e.promise||t.emit("success",E)},m.onerror=function(E){if(x=null,B4.revokeObjectURL(g),a(E),!e.promise)return t.emit("error",E)},m.src=g});return e.promise?r:t}kue.exports=Hct});var rq=ne((xrr,Fue)=>{"use strict";var Cue=mi(),Lue=QE(),jct=Sl(),qp=Zt(),O4=z1(),Wct=ek(),Yct=tk(),Xct=g5().version,tq={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function Zct(e,t){t=t||{};var r,n,a,i;qp.isPlainObject(e)?(r=e.data||[],n=e.layout||{},a=e.config||{},i={}):(e=qp.getGraphDiv(e),r=qp.extendDeep([],e.data),n=qp.extendDeep({},e.layout),a=e._context,i=e._fullLayout||{});function o(y){return!(y in t)||qp.validate(t[y],tq[y])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+qp.join2(tq.format.values,", "," or ")+".");var s={};function l(y,S){return qp.coerce(t,s,tq,y,S)}var u=l("format"),c=l("width"),f=l("height"),h=l("scale"),v=l("setBackground"),d=l("imageDataOnly"),m=document.createElement("div");m.style.position="absolute",m.style.left="-5000px",document.body.appendChild(m);var x=qp.extendFlat({},n);c?x.width=c:t.width===null&&Cue(i.width)&&(x.width=i.width),f?x.height=f:t.height===null&&Cue(i.height)&&(x.height=i.height);var g=qp.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:v}),E=O4.getRedrawFunc(m);function M(){return new Promise(function(y){setTimeout(y,O4.getDelay(m._fullLayout))})}function w(){return new Promise(function(y,S){var T=Wct(m,u,h),p=m._fullLayout.width,C=m._fullLayout.height;function A(){Lue.purge(m),document.body.removeChild(m)}if(u==="full-json"){var P=jct.graphJson(m,!1,"object",!0,!0);return P.version=Xct,P=JSON.stringify(P),A(),y(d?P:O4.encodeJSON(P))}if(A(),u==="svg")return y(d?T:O4.encodeSVG(T));var D=document.createElement("canvas");D.id=qp.randstr(),Yct({format:u,width:p,height:C,scale:h,canvas:D,svg:T,promise:!0}).then(y).catch(S)})}function k(y){return d?y.replace(O4.IMAGE_URL_PREFIX,""):y}return new Promise(function(y,S){Lue.newPlot(m,r,x,g).then(E).then(M).then(w).then(function(T){y(k(T))}).catch(function(T){S(T)})})}Fue.exports=Zct});var Rue=ne((brr,Due)=>{"use strict";var Zv=Zt(),$ct=Sl(),Kct=Ib(),Jct=Dy().dfltConfig,N0=Zv.isPlainObject,mx=Array.isArray,nq=Zv.isArrayOrTypedArray;Due.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=Kct.get(),a=[],i={_context:Zv.extendFlat({},Jct)},o,s;mx(t)?(i.data=Zv.extendDeep([],t),o=t):(i.data=[],o=[],a.push(Af("array","data"))),N0(r)?(i.layout=Zv.extendDeep({},r),s=r):(i.layout={},s={},arguments.length>1&&a.push(Af("object","layout"))),$ct.supplyDefaults(i);for(var l=i._fullData,u=o.length,c=0;cf.length&&n.push(Af("unused",a,u.concat(f.length)));var g=f.length,E=Array.isArray(x);E&&(g=Math.min(g,x.length));var M,w,k,y,S;if(h.dimensions===2)for(w=0;wf[w].length&&n.push(Af("unused",a,u.concat(w,f[w].length)));var T=f[w].length;for(M=0;M<(E?Math.min(T,x[w].length):T);M++)k=E?x[w][M]:x,y=c[w][M],S=f[w][M],Zv.validate(y,k)?S!==y&&S!==+y&&n.push(Af("dynamic",a,u.concat(w,M),y,S)):n.push(Af("value",a,u.concat(w,M),y))}else n.push(Af("array",a,u.concat(w),c[w]));else for(w=0;w{"use strict";var ift=Zt(),nk=z1();function oft(e,t,r){var n=document.createElement("a"),a="download"in n,i=new Promise(function(o,s){var l,u;if(a)return l=nk.createBlob(e,r),u=nk.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),nk.revokeObjectURL(u),l=null,o(t);if(ift.isSafari()){var c=r==="svg"?",":";base64,";return nk.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return i}Iue.exports=oft});var aq=ne((wrr,Nue)=>{"use strict";var ak=Zt(),que=Ms(),sft=rq(),lft=zue(),Bue=z1(),Oue=40;function uft(e,t){var r;return ak.isPlainObject(e)||(r=ak.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,a){r&&r._snapshotInProgress&&a(new Error("Image capture already in progress.")),r&&(r._snapshotInProgress=!0);var i=sft(e,t),o=t.filename||e.fn;if(!o){let l=Bue.getPlotTitle(e);if(l&&!que.matchTex(l))o=ak.slugify(l,Oue);else{let u=Bue.getPlotSubtitle(e);u&&!que.matchTex(u)&&(o=ak.slugify(u,Oue))}}var s=o||"plot-image";s+="."+t.format.replace("-","."),i.then(function(l){return r&&(r._snapshotInProgress=!1),lft(l,s,t.format)}).then(function(l){n(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),a(l)})})}Nue.exports=uft});var jue=ne(iq=>{"use strict";var Yd=Zt(),Xd=Yd.isPlainObject,Uue=Ib(),Vue=Sl(),cft=os(),Gue=Bo(),Hue=Dy().dfltConfig;iq.makeTemplate=function(e){e=Yd.isPlainObject(e)?e:Yd.getGraphDiv(e),e=Yd.extendDeep({_context:Hue},{data:e.data,layout:e.layout}),Vue.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(v){var d={};N4(v,d,hft.bind(null,v));var m=Yd.coerce(v,{},cft,"type"),x=n.data[m];x||(x=n.data[m]=[]),x.push(d)}),N4(r,n.layout,fft.bind(null,r)),delete n.layout.template;var a=r.template;if(Xd(a)){var i=a.layout,o,s,l,u,c,f;Xd(i)&&ik(i,n.layout);var h=a.data;if(Xd(h)){for(s in n.data)if(l=h[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;og?o.push({code:"unused",traceType:v,templateCount:x,dataCount:g}):g>x&&o.push({code:"reused",traceType:v,templateCount:x,dataCount:g})}}function E(M,w){for(var k in M)if(k.charAt(0)!=="_"){var y=M[k],S=$v(M,k,w);Xd(y)?(Array.isArray(M)&&y._template===!1&&y.templateitemname&&o.push({code:"missing",path:S,templateitemname:y.templateitemname}),E(y,S)):Array.isArray(y)&&dft(y)&&E(y,S)}}if(E({data:l,layout:s},""),o.length)return o.map(vft)};function dft(e){for(var t=0;t{"use strict";var tf=QE();Zl._doPlot=tf._doPlot;Zl.newPlot=tf.newPlot;Zl.restyle=tf.restyle;Zl.relayout=tf.relayout;Zl.redraw=tf.redraw;Zl.update=tf.update;Zl._guiRestyle=tf._guiRestyle;Zl._guiRelayout=tf._guiRelayout;Zl._guiUpdate=tf._guiUpdate;Zl._storeDirectGUIEdit=tf._storeDirectGUIEdit;Zl.react=tf.react;Zl.extendTraces=tf.extendTraces;Zl.prependTraces=tf.prependTraces;Zl.addTraces=tf.addTraces;Zl.deleteTraces=tf.deleteTraces;Zl.moveTraces=tf.moveTraces;Zl.purge=tf.purge;Zl.addFrames=tf.addFrames;Zl.deleteFrames=tf.deleteFrames;Zl.animate=tf.animate;Zl.setPlotConfig=tf.setPlotConfig;var pft=E5().getGraphDiv,gft=gE().eraseActiveShape;Zl.deleteActiveShape=function(e){return gft(pft(e))};Zl.toImage=rq();Zl.validate=Rue();Zl.downloadImage=aq();var Wue=jue();Zl.makeTemplate=Wue.makeTemplate;Zl.validateTemplate=Wue.validateTemplate});var yx=ne((Mrr,Xue)=>{"use strict";var oq=Zt(),mft=Fa();Xue.exports=function(t,r,n,a){var i=a("x"),o=a("y"),s,l=mft.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),i){var u=oq.minRowLength(i);o?s=Math.min(u,oq.minRowLength(o)):(s=u,a("y0"),a("dy"))}else{if(!o)return 0;s=oq.minRowLength(o),a("x0"),a("dx")}return r._length=s,s}});var U0=ne((Srr,Kue)=>{"use strict";var Zue=Zt().dateTick0,yft=uo(),xft=yft.ONEWEEK;function $ue(e,t){return e%xft===0?Zue(t,1):Zue(t,0)}Kue.exports=function(t,r,n,a,i){if(i||(i={x:!0,y:!0}),i.x){var o=a("xperiod");o&&(a("xperiod0",$ue(o,r.xcalendar)),a("xperiodalignment"))}if(i.y){var s=a("yperiod");s&&(a("yperiod0",$ue(s,r.ycalendar)),a("yperiodalignment"))}}});var ece=ne((Err,Que)=>{"use strict";var Jue=["orientation","groupnorm","stackgaps"];Que.exports=function(t,r,n,a){var i=n._scatterStackOpts,o=a("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=i[s];l||(l=i[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},h=0;h{"use strict";var tce=_a(),rce=yh().hasColorscale,nce=bf(),bft=ml();ace.exports=function(t,r,n,a,i,o={}){var s=bft.isBubble(t),l=(t.line||{}).color,u;if(l&&(n=l),i("marker.symbol"),i("marker.opacity",s?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",n),rce(t,"marker")&&nce(t,r,a,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=tce.background:u=tce.defaultLine,i("marker.line.color",u),rce(t,"marker.line")&&nce(t,r,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",s?1:0),o.noLineDash||i("marker.line.dash")),s&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var c=i("marker.gradient.type");c!=="none"&&i("marker.gradient.color")}}});var V0=ne((Crr,ice)=>{"use strict";var _ft=Zt().isArrayOrTypedArray,wft=yh().hasColorscale,Tft=bf();ice.exports=function(t,r,n,a,i,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),i("line.color",n),wft(t,"line"))Tft(t,r,a,i,{prefix:"line.",cLetter:"c"});else{var l=(_ft(s)?!1:s)||n;i("line.color",l)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var u_=ne((Lrr,oce)=>{"use strict";oce.exports=function(t,r,n){var a=n("line.shape");a==="spline"&&n("line.smoothing")}});var G0=ne((Frr,sce)=>{"use strict";var Aft=Zt();sce.exports=function(e,t,r,n,a){a=a||{},n("textposition"),Aft.coerceFont(n,"textfont",a.font||r.font,a),a.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var Bp=ne((Prr,uce)=>{"use strict";var sk=_a(),lce=Zt().isArrayOrTypedArray;function Mft(e){for(var t=sk.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var cce=Zt(),Sft=Fa(),Eft=Tu(),kft=Ip(),c_=ml(),Cft=yx(),Lft=U0(),Fft=ece(),Pft=Kv(),Dft=V0(),fce=u_(),Rft=G0(),Ift=Bp(),zft=Zt().coercePattern;hce.exports=function(t,r,n,a){function i(v,d){return cce.coerce(t,r,Eft,v,d)}var o=Cft(t,r,a,i);if(o||(r.visible=!1),!!r.visible){Lft(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var s=Fft(t,r,a,i);a.scattermode==="group"&&r.orientation===void 0&&i("orientation","v");var l=!s&&o{"use strict";var qft=vx().getAxisGroup;vce.exports=function(t,r,n,a,i){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=qft(n,s)+o,u=n._alignmentOpts||{},c=a("alignmentgroup"),f=u[l];f||(f=u[l]={});var h=f[c];h?h.traces.push(r):h=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var v=a("offsetgroup")||"",d=h.offsetGroups,m=d[v];r._offsetIndex=0,(i!=="group"||v)&&(m||(m=d[v]={offsetIndex:Object.keys(d).length}),r._offsetIndex=m.offsetIndex)}});var sq=ne((Irr,pce)=>{"use strict";var Bft=Zt(),Oft=xx(),Nft=Tu();pce.exports=function(t,r){var n,a,i,o=r.scattermode;function s(h){return Bft.coerce(a._input,a,Nft,h)}if(r.scattermode==="group")for(i=0;i=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var mce=ne((zrr,gce)=>{"use strict";var Uft=Zt(),Vft=iS();gce.exports=function(e,t){function r(a,i){return Uft.coerce(e,t,Vft,a,i)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var H0=ne((qrr,xce)=>{"use strict";var Gft=mi(),yce=Zt(),Hft=yce.dateTime2ms,lk=yce.incrementMonth,jft=uo(),Wft=jft.ONEAVGMONTH;xce.exports=function(t,r,n,a){if(r.type!=="date")return{vals:a};var i=t[n+"periodalignment"];if(!i)return{vals:a};var o=t[n+"period"],s;if(Gft(o)){if(o=+o,o<=0)return{vals:a}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:a}}for(var u=r.calendar,c=i==="start",f=i==="end",h=t[n+"period0"],v=Hft(h,u)||0,d=[],m=[],x=[],g=a.length,E=0;EM;)y=lk(y,-s,u);for(;y<=M;)y=lk(y,s,u);k=lk(y,-s,u)}else{for(w=Math.round((M-v)/o),y=v+w*o;y>M;)y-=o;for(;y<=M;)y+=o;k=y-o}d[E]=c?k:f?y:(k+y)/2,m[E]=k,x[E]=y}return{vals:d,starts:m,ends:x}}});var Jv=ne((Brr,_ce)=>{"use strict";var lq=yh().hasColorscale,uq=qh(),bce=ml();_ce.exports=function(t,r){bce.hasLines(r)&&lq(r,"line")&&uq(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),bce.hasMarkers(r)&&(lq(r,"marker")&&uq(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),lq(r,"marker.line")&&uq(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var Op=ne((Orr,wce)=>{"use strict";var qu=Zt();wce.exports=function(t,r){for(var n=0;n{"use strict";var Tce=Zt();Ace.exports=function(t,r){Tce.isArrayOrTypedArray(r.selectedpoints)&&Tce.tagSelected(t,r)}});var Qv=ne((Urr,Fce)=>{"use strict";var Mce=mi(),fq=Zt(),U4=ri(),Sce=H0(),cq=uo().BADNUM,hq=ml(),Yft=Jv(),Xft=Op(),Zft=mv();function $ft(e,t){var r=e._fullLayout,n=t._xA=U4.getFromId(e,t.xaxis||"x","x"),a=t._yA=U4.getFromId(e,t.yaxis||"y","y"),i=n.makeCalcdata(t,"x"),o=a.makeCalcdata(t,"y"),s=Sce(t,n,"x",i),l=Sce(t,a,"y",o),u=s.vals,c=l.vals,f=t._length,h=new Array(f),v=t.ids,d=dq(t,r,n,a),m=!1,x,g,E,M,w,k;Cce(r,t);var y="x",S="y",T;if(d)fq.pushUnique(d.traceIndices,t.index),x=d.orientation==="v",x?(S="s",T="x"):(y="s",T="y"),w=d.stackgaps==="interpolate";else{var p=kce(t,f);Ece(e,t,n,a,u,c,p)}var C=!!t.xperiodalignment,A=!!t.yperiodalignment;for(g=0;gg&&h[M].gap;)M--;for(k=h[M].s,E=h.length-1;E>M;E--)h[E].s=k;for(;g{"use strict";Pce.exports=uk;var Kft=Zt().distinctVals;function uk(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),a=[],i=0;i{"use strict";Rce.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var bx=ne((Hrr,Bce)=>{"use strict";var e0=mi(),{isArrayOrTypedArray:q1}=Zt(),{BADNUM:f_}=uo(),Jft=Fa(),V4=ri(),{getAxisGroup:Qft}=vx(),ck=Dce(),{TEXTPAD:eht}=um(),{LINE_SPACING:tht}=qc(),{BR_TAG_ALL:rht}=Ms();function nht(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!e0(s))}for(var c=0;cn(i))):n(e.text);let a=e.outsidetextfont.size*tht*r+eht;return{ppadplus:t.some(i=>i.s<0)?a:0,ppadminus:t.some(i=>i.s>=0)?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function dht(e,t,r,n){for(var a=h_(n),i=0;i{"use strict";var Oce=Qv(),Nce=bx().setGroupPositions;function pht(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,s=[],l=[],u=0;up[c]&&c{"use strict";var mht=li(),Wce=uo(),G4=Wce.BADNUM,Yce=Wce.LOG_CLIP,Gce=Yce+.5,Hce=Yce-.5,fk=Zt(),yht=fk.segmentsIntersect,jce=fk.constrain,bq=Ip();Xce.exports=function(t,r){var n=r.trace||{},a=r.xaxis,i=r.yaxis,o=a.type==="log",s=i.type==="log",l=a._length,u=i._length,c=r.backoff,f=n.marker,h=r.connectGaps,v=r.baseTolerance,d=r.shape,m=d==="linear",x=n.fill&&n.fill!=="none",g=[],E=bq.minTolerance,M=t.length,w=new Array(M),k=0,y,S,T,p,C,A,P,D,z,q,U,O,R,B,Y,X;function te(Ye){var Te=t[Ye];if(!Te)return!1;var Fe=r.linearized?a.l2p(Te.x):a.c2p(Te.x),Ae=r.linearized?i.l2p(Te.y):i.c2p(Te.y);if(Fe===G4){if(o&&(Fe=a.c2p(Te.x,!0)),Fe===G4)return!1;s&&Ae===G4&&(Fe*=Math.abs(a._m*u*(a._m>0?Gce:Hce)/(i._m*l*(i._m>0?Gce:Hce)))),Fe*=1e3}if(Ae===G4){if(s&&(Ae=i.c2p(Te.y,!0)),Ae===G4)return!1;Ae*=1e3}return[Fe,Ae]}function se(Ye,Te,Fe,Ae){var Re=Fe-Ye,Ze=Ae-Te,Ke=.5-Ye,_t=.5-Te,St=Re*Re+Ze*Ze,Vt=Re*Ke+Ze*_t;if(Vt>0&&Vt1||Math.abs(Ke.y-Fe[0][1])>1)&&(Ke=[Ke.x,Ke.y],Ae&&fe(Ke,Ye)we||Ye[1]ye)return[jce(Ye[0],oe,we),jce(Ye[1],he,ye)]}function lt(Ye,Te){if(Ye[0]===Te[0]&&(Ye[0]===oe||Ye[0]===we)||Ye[1]===Te[1]&&(Ye[1]===he||Ye[1]===ye))return!0}function Ie(Ye,Te){var Fe=[],Ae=mt(Ye),Re=mt(Te);return Ae&&Re&<(Ae,Re)||(Ae&&Fe.push(Ae),Re&&Fe.push(Re)),Fe}function de(Ye,Te,Fe){return function(Ae,Re){var Ze=mt(Ae),Ke=mt(Re),_t=[];if(Ze&&Ke&<(Ze,Ke))return _t;Ze&&_t.push(Ze),Ke&&_t.push(Ke);var St=2*fk.constrain((Ae[Ye]+Re[Ye])/2,Te,Fe)-((Ze||Ae)[Ye]+(Ke||Re)[Ye]);if(St){var Vt;Ze&&Ke?Vt=St>0==Ze[Ye]>Ke[Ye]?Ze:Ke:Vt=Ze||Ke,Vt[Ye]+=St}return _t}}var Ee;d==="linear"||d==="spline"?Ee=qe:d==="hv"||d==="vh"?Ee=Ie:d==="hvh"?Ee=de(0,oe,we):d==="vhv"&&(Ee=de(1,he,ye));function Ue(Ye,Te){var Fe=Te[0]-Ye[0],Ae=(Te[1]-Ye[1])/Fe,Re=(Ye[1]*Te[0]-Te[1]*Ye[0])/Fe;return Re>0?[Ae>0?oe:we,ye]:[Ae>0?we:oe,he]}function ge(Ye){var Te=Ye[0],Fe=Ye[1],Ae=Te===w[k-1][0],Re=Fe===w[k-1][1];if(!(Ae&&Re))if(k>1){var Ze=Te===w[k-2][0],Ke=Fe===w[k-2][1];Ae&&(Te===oe||Te===we)&&Ze?Ke?k--:w[k-1]=Ye:Re&&(Fe===he||Fe===ye)&&Ke?Ze?k--:w[k-1]=Ye:w[k++]=Ye}else w[k++]=Ye}function Ge(Ye){w[k-1][0]!==Ye[0]&&w[k-1][1]!==Ye[1]&&ge([Xe,vt]),ge(Ye),st=null,Xe=vt=0}var tt=fk.isArrayOrTypedArray(f);function ft(Ye){if(Ye&&c&&(Ye.i=y,Ye.d=t,Ye.trace=n,Ye.marker=tt?f[Ye.i]:f,Ye.backoff=c),ue=Ye[0]/l,re=Ye[1]/u,le=Ye[0]we?we:0,ze=Ye[1]ye?ye:0,le||ze){if(!k)w[k++]=[le||Ye[0],ze||Ye[1]];else if(st){var Te=Ee(st,Ye);Te.length>1&&(Ge(Te[0]),w[k++]=Te[1])}else Oe=Ee(w[k-1],Ye)[0],w[k++]=Oe;var Fe=w[k-1];le&&ze&&(Fe[0]!==le||Fe[1]!==ze)?(st&&(Xe!==le&&vt!==ze?ge(Xe&&vt?Ue(st,Ye):[Xe||le,vt||ze]):Xe&&vt&&ge([Xe,vt])),ge([le,ze])):Xe-le&&vt-ze&&ge([le||Xe,ze||vt]),st=Ye,Xe=le,vt=ze}else st&&Ge(Ee(st,Ye)[0]),w[k++]=Ye}for(y=0;yj(A,He))break;T=A,R=z[0]*D[0]+z[1]*D[1],R>U?(U=R,p=A,P=!1):R=t.length||!A)break;ft(A),S=A}}st&&ge([Xe||st[0],vt||st[1]]),g.push(w.slice(0,k))}var Qe=d.slice(d.length-1);if(c&&Qe!=="h"&&Qe!=="v"){for(var We=!1,pt=-1,kt=[],qt=0;qt{"use strict";var Zce={tonextx:1,tonexty:1,tonext:1};$ce.exports=function(t,r,n){var a,i,o,s,l,u={},c=!1,f=-1,h=0,v=-1;for(i=0;i=0?l=v:(l=v=h,h++),l{"use strict";var j0=Ea(),xht=Fa(),H4=Zt(),d_=H4.ensureSingle,Jce=H4.identity,$u=li(),v_=ml(),bht=_q(),_ht=wq(),hk=x4().tester;Qce.exports=function(t,r,n,a,i,o){var s,l,u=!i,c=!!i&&i.duration>0,f=_ht(t,r,n);if(s=a.selectAll("g.trace").data(f,function(v){return v[0].trace.uid}),s.enter().append("g").attr("class",function(v){return"trace scatter trace"+v[0].trace.uid}).style("stroke-miterlimit",2),s.order(),wht(t,s,r),c){o&&(l=o());var h=j0.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});h.each(function(){a.selectAll("g.trace").each(function(v,d){Kce(t,d,r,v,f,this,i)})})}else s.each(function(v,d){Kce(t,d,r,v,f,this,i)});u&&s.exit().remove(),a.selectAll("path:not([d])").remove()};function wht(e,t,r){t.each(function(n){var a=d_(j0.select(this),"g","fills");$u.setClipUrl(a,r.layerClipId,e);var i=n[0].trace;i._ownFill=null,i._nextFill=null;var o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var s=a.selectAll("g").data(o,Jce);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){i[l]=d_(j0.select(this),"path","js-fill")})})}function Kce(e,t,r,n,a,i,o){var s=e._context.staticPlot,l;Tht(e,t,r,n,a);var u=!!o&&o.duration>0;function c(de){return u?de.transition():de}var f=r.xaxis,h=r.yaxis,v=n[0].trace,d=v.line,m=j0.select(i),x=d_(m,"g","errorbars"),g=d_(m,"g","lines"),E=d_(m,"g","points"),M=d_(m,"g","text");if(xht.getComponentMethod("errorbars","plot")(e,x,r,o),v.visible!==!0)return;c(m).style("opacity",v.opacity);var w,k,y=v.fill.charAt(v.fill.length-1);y!=="x"&&y!=="y"&&(y="");var S,T;y==="y"?(S=1,T=h.c2p(0,!0)):y==="x"&&(S=0,T=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=m;var p="",C=[],A=v._prevtrace,P=null,D=null;A&&(p=A._prevRevpath||"",k=A._nextFill,C=A._ownPolygons,P=A._fillsegments,D=A._fillElement);var z,q,U="",O="",R,B,Y,X,te,se,ue=[];v._polygons=[];var re=[],j=[],fe=H4.noop;if(w=v._ownFill,v_.hasLines(v)||v.fill!=="none"){k&&k.datum(n),["hv","vh","hvh","vhv"].indexOf(d.shape)!==-1?(R=$u.steps(d.shape),B=$u.steps(d.shape.split("").reverse().join(""))):d.shape==="spline"?R=B=function(de){var Ee=de[de.length-1];return de.length>1&&de[0][0]===Ee[0]&&de[0][1]===Ee[1]?$u.smoothclosed(de.slice(1),d.smoothing):$u.smoothopen(de,d.smoothing)}:R=B=function(de){return"M"+de.join("L")},Y=function(de){return B(de.reverse())},j=bht(n,{xaxis:f,yaxis:h,trace:v,connectGaps:v.connectgaps,baseTolerance:Math.max(d.width||1,3)/4,shape:d.shape,backoff:d.backoff,simplify:d.simplify,fill:v.fill}),re=new Array(j.length);var ce=0;for(l=0;l=s[0]&&m.x<=s[1]&&m.y>=l[0]&&m.y<=l[1]}),h=Math.ceil(f.length/c),v=0;a.forEach(function(m,x){var g=m[0].trace;v_.hasMarkers(g)&&g.marker.maxdisplayed>0&&x{"use strict";efe.exports={container:"marker",min:"cmin",max:"cmax"}});var vk=ne(($rr,tfe)=>{"use strict";var dk=ri();tfe.exports=function(t,r,n){var a={},i={_fullLayout:n},o=dk.getFromTrace(i,r,"x"),s=dk.getFromTrace(i,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),a.xLabel=dk.tickText(o,o.c2l(l),!0).text,a.yLabel=dk.tickText(s,s.c2l(u),!0).text,a}});var Md=ne((Krr,rfe)=>{"use strict";var Tq=Ea(),g_=li(),Aht=Fa();function Mht(e){var t=Tq.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var n=Tq.select(this),a=r.trace||r[0].trace;Aq(n,a,e)}),t.selectAll("g.text").each(function(r){var n=Tq.select(this),a=r.trace||r[0].trace;Mq(n,a,e)}),t.selectAll("g.trace path.js-line").call(g_.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(g_.fillGroupStyle,e,!1),Aht.getComponentMethod("errorbars","style")(t)}function Aq(e,t,r){g_.pointStyle(e.selectAll("path.point"),t,r)}function Mq(e,t,r){g_.textPointStyle(e.selectAll("text"),t,r)}function Sht(e,t,r){var n=t[0].trace;n.selectedpoints?(g_.selectedPointStyle(r.selectAll("path.point"),n),g_.selectedTextStyle(r.selectAll("text"),n)):(Aq(r,n,e),Mq(r,n,e))}rfe.exports={style:Mht,stylePoints:Aq,styleText:Mq,styleOnSelect:Sht}});var y_=ne((Jrr,nfe)=>{"use strict";var m_=_a(),Eht=ml();nfe.exports=function(t,r){var n,a;if(t.mode==="lines")return n=t.line.color,n&&m_.opacity(n)?n:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var i=r.mcc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return a=i&&m_.opacity(i)?i:o&&m_.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",a?m_.opacity(a)<.3?m_.addOpacity(a,.3):a:(n=(t.line||{}).color,n&&m_.opacity(n)&&Eht.hasLines(t)&&t.line.width?n:t.fillcolor)}});var x_=ne((Qrr,ife)=>{"use strict";var pk=Zt(),afe=cu(),kht=Fa(),Cht=y_(),Sq=_a(),Lht=pk.fillText;ife.exports=function(t,r,n,a){var i=t.cd,o=i[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],h=o.hoveron||"",v=o.mode.indexOf("markers")!==-1?3:.5,d=!!o.xperiodalignment,m=!!o.yperiodalignment;if(h.indexOf("points")!==-1){var x=function(O){if(d){var R=s.c2p(O.xStart),B=s.c2p(O.xEnd);return u>=Math.min(R,B)&&u<=Math.max(R,B)?0:1/0}var Y=Math.max(3,O.mrc||0),X=1-1/Y,te=Math.abs(s.c2p(O.x)-u);return te=Math.min(R,B)&&c<=Math.max(R,B)?0:1/0}var Y=Math.max(3,O.mrc||0),X=1-1/Y,te=Math.abs(l.c2p(O.y)-c);return teue!=ye>=ue&&(oe=fe[j-1][0],we=fe[j][0],ye-he&&(ce=oe+(we-oe)*(ue-he)/(ye-he),Y=Math.min(Y,ce),X=Math.max(X,ce)));return Y=Math.max(Y,0),X=Math.min(X,s._length),{x0:Y,x1:X,y0:ue,y1:ue}}if(h.indexOf("fills")!==-1&&o._fillElement){var z=P(o._fillElement)&&!P(o._fillExclusionElement);if(z){var q=D(o._polygons);q===null&&(q={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var U=Sq.defaultLine;return Sq.opacity(o.fillcolor)?U=o.fillcolor:Sq.opacity((o.line||{}).color)&&(U=o.line.color),pk.extendFlat(t,{distance:t.maxHoverDistance,x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1,color:U,hovertemplate:!1}),delete t.index,o.text&&!pk.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var _x=ne((enr,sfe)=>{"use strict";var ofe=ml();sfe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h=s.mode&&!ofe.hasMarkers(s)&&!ofe.hasText(s);if(h)return[];if(r===!1)for(l=0;l{"use strict";lfe.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var kq=ne((rnr,hfe)=>{"use strict";var gk=Fa().traceIs,Eq=Wb();hfe.exports=function(t,r,n,a){n("autotypenumbers",a.autotypenumbersDflt);var i=n("type",(a.splomStash||{}).type);i==="-"&&(Fht(r,a.data),r.type==="-"?r.type="linear":t.type=r.type)};function Fht(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),a;r.indexOf("scene")!==-1&&(r=n);var i=Pht(t,r,n);if(i){if(i.type==="histogram"&&n==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=n+"calendar",s=i[o],l={noMultiCategory:!gk(i,"cartesian")||gk(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&n==={h:"x",v:"y"}[i.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,ffe(i,n)){var u=cfe(i),c=[];for(a=0;a0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(ffe(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}function cfe(e){return{v:"x",h:"y"}[e.orientation||"v"]}function ffe(e,t){var r=cfe(e),n=gk(e,"box-violin");return n&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var mk=ne((nnr,dfe)=>{"use strict";var Dht=Ih().isTypedArraySpec;function Rht(e,t){var r=t.dataAttr||e._id.charAt(0),n={},a,i,o;if(t.axData)a=t.axData;else for(a=[],i=0;i0||Dht(i),s;o&&(s="array");var l=n("categoryorder",s),u;l==="array"&&(u=n("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=Rht(r,a).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var j4=ne((anr,pfe)=>{"use strict";var vfe=_a(),Iht=Ic(),zht=Zt();pfe.exports=function(t,r,n,a){a=a||{};var i=a.dfltColor;function o(T,p){return zht.coerce2(t,r,a.attributes,T,p)}var s=o("linecolor",i),l=o("linewidth"),u=n("showline",a.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=vfe.mix(i,a.bgColor,a.blend||Iht.lightFraction),f=o("gridcolor",c),h=o("gridwidth"),v=o("griddash"),d=n("showgrid",a.showGrid||!!f||!!h||!!v);if(d||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),a.hasMinor){var m=vfe.mix(r.gridcolor,a.bgColor,67),x=o("minor.gridcolor",m),g=o("minor.gridwidth",r.gridwidth||1),E=o("minor.griddash",r.griddash||"solid"),M=n("minor.showgrid",!!x||!!g||!!E);M||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!a.noZeroLine){var w=o("zerolinelayer"),k=o("zerolinecolor",i),y=o("zerolinewidth"),S=n("zeroline",a.showGrid||!!k||!!y);S||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var Y4=ne((inr,_fe)=>{"use strict";var gfe=mi(),qht=Fa(),W4=Zt(),Bht=Bo(),Oht=zh(),Cq=Wf(),mfe=Xy(),yfe=Nb(),Nht=Hg(),Uht=jg(),Vht=mk(),Ght=j4(),Hht=yI(),xfe=Tp(),yk=zc().WEEKDAY_PATTERN,jht=zc().HOUR_PATTERN;_fe.exports=function(t,r,n,a,i){var o=a.letter,s=a.font||{},l=a.splomStash||{},u=n("visible",!a.visibleDflt),c=r._template||{},f=r.type||c.type||"-",h;if(f==="date"){var v=qht.getComponentMethod("calendars","handleDefaults");v(t,r,"calendar",a.calendar),a.noTicklabelmode||(h=n("ticklabelmode"))}!a.noTicklabelindex&&(f==="date"||f==="linear")&&n("ticklabelindex");var d="";(!a.noTicklabelposition||f==="multicategory")&&(d=W4.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:h==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),a.noTicklabeloverflow||n("ticklabeloverflow",d.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),xfe(r,i),Hht(t,r,n,a),Vht(t,r,n,a),a.noHover||(f!=="category"&&n("hoverformat"),a.noUnifiedhovertitle||n("unifiedhovertitle.text"));var m=n("color"),x=m!==Cq.color.dflt?m:s.color,g=l.label||i._dfltTitle[o];if(Uht(t,r,n,f,a),!u)return r;n("title.text",g),W4.coerceFont(n,"title.font",s,{overrideDflt:{size:W4.bigFont(s.size),color:x}}),mfe(t,r,n,f);var E=a.hasMinor;if(E&&(Bht.newContainer(r,"minor"),mfe(t,r,n,f,{isMinor:!0})),Nht(t,r,n,f,a),yfe(t,r,n,a),E){var M=a.isMinor;a.isMinor=!0,yfe(t,r,n,a),a.isMinor=M}Ght(t,r,n,{dfltColor:m,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:E,attributes:Cq}),E&&r.ticklabelindex==null&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var w=f==="multicategory";if(!a.noTickson&&(f==="category"||w)&&(r.ticks||r.showgrid)&&(w?(n("tickson","boundaries"),delete r.ticklabelposition):n("tickson")),w){var k=n("showdividers");k&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(Oht(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:Wht}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var y=0;y=2){var o="",s,l;if(i.length===2){for(s=0;s<2;s++)if(l=bfe(i[s]),l){o=yk;break}}var u=n("pattern",o);if(u===yk)for(s=0;s<2;s++)l=bfe(i[s]),l&&(t.bounds[s]=i[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=i[s],u){case yk:if(!gfe(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=i[s]=l;break;case jht:if(!gfe(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=i[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]c[1]){t.enabled=!1;return}}else if(i[0]>c[0]&&i[1]{"use strict";var Xht=mi(),xk=Zt();wfe.exports=function(t,r,n,a){var i=a.counterAxes||[],o=a.overlayableAxes||[],s=a.letter,l=a.grid,u=a.overlayingDomain,c,f,h,v,d,m;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(h=l[s+"side"].split(" ")[0],v=l.domain[s][h==="right"||h==="top"?1:0])),f=f||[0,1],c=c||(Xht(t.position)?"free":i[0]||"free"),h=h||(s==="x"?"bottom":"left"),v=v||0,d=0,m=!1;var x=xk.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:c}},"anchor"),g=xk.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:h}},"side");if(x==="free"){if(s==="y"){var E=n("autoshift");E&&(v=g==="left"?u[0]:u[1],m=r.automargin?r.automargin:!0,d=g==="left"?-3:3),n("shift",d)}n("position",v)}n("automargin",m);var M=!1;if(o.length&&(M=xk.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!M){var w=n("domain",f);w[0]>w[1]-1/4096&&(r.domain=f),xk.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var Ffe=ne((snr,Lfe)=>{"use strict";var wx=Zt(),Tfe=_a(),Zht=Hd().isUnifiedHover,$ht=HI(),Afe=Bo(),Kht=Ab(),Mfe=Wf(),Jht=kq(),Sfe=Y4(),Qht=vx(),Efe=bk(),Fq=uu(),Np=Fq.id2name,kfe=Fq.name2id,edt=zc().AX_ID_PATTERN,Cfe=Fa(),_k=Cfe.traceIs,Lq=Cfe.getComponentMethod;function wk(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}Lfe.exports=function(t,r,n){var a=r.autotypenumbers,i={},o={},s={},l={},u={},c={},f={},h={},v={},d={},m,x;for(m=0;m{"use strict";var tdt=Ea(),Pfe=Fa(),Tk=Zt(),yv=li(),Ak=ri();Dfe.exports=function(t,r,n,a){var i=t._fullLayout;if(r.length===0){Ak.redrawComponents(t);return}function o(x){var g=x.xaxis,E=x.yaxis;i._defs.select("#"+x.clipId+"> rect").call(yv.setTranslate,0,0).call(yv.setScale,1,1),x.plot.call(yv.setTranslate,g._offset,E._offset).call(yv.setScale,1,1);var M=x.plot.selectAll(".scatterlayer .trace");M.selectAll(".point").call(yv.setPointGroupScale,1,1),M.selectAll(".textpoint").call(yv.setTextPointsScale,1,1),M.call(yv.hideOutsideRangePoints,x)}function s(x,g){var E=x.plotinfo,M=E.xaxis,w=E.yaxis,k=M._length,y=w._length,S=!!x.xr1,T=!!x.yr1,p=[];if(S){var C=Tk.simpleMap(x.xr0,M.r2l),A=Tk.simpleMap(x.xr1,M.r2l),P=C[1]-C[0],D=A[1]-A[0];p[0]=(C[0]*(1-g)+g*A[0]-C[0])/(C[1]-C[0])*k,p[2]=k*(1-g+g*D/P),M.range[0]=M.l2r(C[0]*(1-g)+g*A[0]),M.range[1]=M.l2r(C[1]*(1-g)+g*A[1])}else p[0]=0,p[2]=k;if(T){var z=Tk.simpleMap(x.yr0,w.r2l),q=Tk.simpleMap(x.yr1,w.r2l),U=z[1]-z[0],O=q[1]-q[0];p[1]=(z[1]*(1-g)+g*q[1]-z[1])/(z[0]-z[1])*y,p[3]=y*(1-g+g*O/U),w.range[0]=M.l2r(z[0]*(1-g)+g*q[0]),w.range[1]=w.l2r(z[1]*(1-g)+g*q[1])}else p[1]=0,p[3]=y;Ak.drawOne(t,M,{skipTitle:!0}),Ak.drawOne(t,w,{skipTitle:!0}),Ak.redrawComponents(t,[M._id,w._id]);var R=S?k/p[2]:1,B=T?y/p[3]:1,Y=S?p[0]:0,X=T?p[1]:0,te=S?p[0]/p[2]*k:0,se=T?p[1]/p[3]*y:0,ue=M._offset-te,re=w._offset-se;E.clipRect.call(yv.setTranslate,Y,X).call(yv.setScale,1/R,1/B),E.plot.call(yv.setTranslate,ue,re).call(yv.setScale,R,B),yv.setPointGroupScale(E.zoomScalePts,1/R,1/B),yv.setTextPointsScale(E.zoomScaleTxt,1/R,1/B)}var l;a&&(l=a());function u(){for(var x={},g=0;gn.duration?(u(),v=window.cancelAnimationFrame(m)):v=window.requestAnimationFrame(m)}return f=Date.now(),v=window.requestAnimationFrame(m),Promise.resolve()}});var Ku=ne(Nh=>{"use strict";var Sk=Ea(),Ife=Fa(),Tx=Zt(),rdt=Sl(),ndt=li(),zfe=mh().getModuleCalcData,cm=uu(),W0=zc(),adt=qv(),ss=Tx.ensureSingle;function Mk(e,t,r){return Tx.ensureSingle(e,t,r,function(n){n.datum(r)})}var Ax=W0.zindexSeparator;Nh.name="cartesian";Nh.attr=["xaxis","yaxis"];Nh.idRoot=["x","y"];Nh.idRegex=W0.idRegex;Nh.attrRegex=W0.attrRegex;Nh.attributes=ufe();Nh.layoutAttributes=Wf();Nh.supplyLayoutDefaults=Ffe();Nh.transitionAxes=Rfe();Nh.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,a=r.yaxis,i=r.cartesian,o=i,s={},l={},u,c,f;for(u=0;u0){var v=h.id;if(v.indexOf(Ax)!==-1)continue;v+=Ax+(u+1),h=Tx.extendFlat({},h,{id:v,plot:a._cartesianlayer.selectAll(".subplot").select("."+v)})}for(var d=[],m,x=0;x1&&(k+=Ax+w),M.push(s+k),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=ss(n,"path","xlines-above"),t.ylines=ss(n,"path","ylines-above"),t.xaxislayer=ss(n,"g","xaxislayer-above"),t.yaxislayer=ss(n,"g","yaxislayer-above");else{if(!o){var h=ss(n,"g","layer-subplot");t.shapelayer=ss(h,"g","shapelayer"),t.imagelayer=ss(h,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=ss(n,"g","minor-gridlayer"),t.gridlayer=ss(n,"g","gridlayer"),t.zerolinelayer=ss(n,"g","zerolinelayer"));var v=ss(n,"g","layer-between");t.shapelayerBetween=ss(v,"g","shapelayer"),t.imagelayerBetween=ss(v,"g","imagelayer"),ss(n,"path","xlines-below"),ss(n,"path","ylines-below"),t.overlinesBelow=ss(n,"g","overlines-below"),ss(n,"g","xaxislayer-below"),ss(n,"g","yaxislayer-below"),t.overaxesBelow=ss(n,"g","overaxes-below")}t.overplot=ss(n,"g","overplot"),t.plot=ss(t.overplot,"g",a),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=ss(n,"g","zerolinelayer-above"),o||(t.xlines=ss(n,"path","xlines-above"),t.ylines=ss(n,"path","ylines-above"),t.overlinesAbove=ss(n,"g","overlines-above"),ss(n,"g","xaxislayer-above"),ss(n,"g","yaxislayer-above"),t.overaxesAbove=ss(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var d=f.plotgroup,m=a+"-x",x=a+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,ss(f.overlinesBelow,"path",m),ss(f.overlinesBelow,"path",x),ss(f.overaxesBelow,"g",m),ss(f.overaxesBelow,"g",x),t.plot=ss(f.overplot,"g",a),ss(f.overlinesAbove,"path",m),ss(f.overlinesAbove,"path",x),ss(f.overaxesAbove,"g",m),ss(f.overaxesAbove,"g",x),t.xlines=d.select(".overlines-"+s).select("."+m),t.ylines=d.select(".overlines-"+l).select("."+x),t.xaxislayer=d.select(".overaxes-"+s).select("."+m),t.yaxislayer=d.select(".overaxes-"+l).select("."+x)}o||(u||(Mk(t.minorGridlayer,"g",t.xaxis._id),Mk(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(g){return g[0]}).sort(cm.idSort),Mk(t.gridlayer,"g",t.xaxis._id),Mk(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(g){return g[0]}).sort(cm.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function Ofe(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=Sk.select(this);c.remove(),Nfe(u,t),r[u]=!0});for(var n in t._plots)for(var a=t._plots[n],i=a.overlays||[],o=0;o{"use strict";var Ek=ml();Ufe.exports={hasLines:Ek.hasLines,hasMarkers:Ek.hasMarkers,hasText:Ek.hasText,isBubble:Ek.isBubble,attributes:Tu(),layoutAttributes:iS(),supplyDefaults:dce(),crossTraceDefaults:sq(),supplyLayoutDefaults:mce(),calc:Qv().calc,crossTraceCalc:Vce(),arraysToCalcdata:Op(),plot:p_(),colorbar:bh(),formatLabels:vk(),style:Md().style,styleOnSelect:Md().styleOnSelect,hoverPoints:x_(),selectPoints:_x(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:Ku(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var jfe=ne((fnr,Hfe)=>{"use strict";var odt=Ea(),sdt=_a(),Gfe=Dz(),Pq=Zt(),ldt=Pq.strScale,udt=Pq.strRotate,cdt=Pq.strTranslate;Hfe.exports=function(t,r,n){var a=t.node(),i=Gfe[n.arrowhead||0],o=Gfe[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=i.backoff*s+n.standoff,h=o.backoff*l+n.startstandoff,v,d,m,x;if(a.nodeName==="line"){v={x:+t.attr("x1"),y:+t.attr("y1")},d={x:+t.attr("x2"),y:+t.attr("y2")};var g=v.x-d.x,E=v.y-d.y;if(m=Math.atan2(E,g),x=m+Math.PI,f&&h&&f+h>Math.sqrt(g*g+E*E)){z();return}if(f){if(f*f>g*g+E*E){z();return}var M=f*Math.cos(m),w=f*Math.sin(m);d.x+=M,d.y+=w,t.attr({x2:d.x,y2:d.y})}if(h){if(h*h>g*g+E*E){z();return}var k=h*Math.cos(m),y=h*Math.sin(m);v.x-=k,v.y-=y,t.attr({x1:v.x,y1:v.y})}}else if(a.nodeName==="path"){var S=a.getTotalLength(),T="";if(S{"use strict";var Wfe=Ea(),Dq=Fa(),fdt=Sl(),hm=Zt(),Rq=hm.strTranslate,Z4=ri(),Mx=_a(),B1=li(),Yfe=cu(),Iq=Ms(),zq=z0(),X4=od(),hdt=Bo().arrayEditor,ddt=jfe();$fe.exports={draw:vdt,drawOne:Xfe,drawRaw:Zfe};function vdt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Re="right":Re="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Re]}for(var he=!1,ye=["x","y"],Pe=0;Pe1)&&(Xe===ze?(He=vt.r2fraction(t["a"+le]),(He<0||He>1)&&(he=!0)):he=!0),Ee=vt._offset+vt.r2p(t[le]),Ge=.5}else{var Qe=ft==="domain";le==="x"?(ge=t[le],Ee=Qe?vt._offset+vt._length*ge:Ee=s.l+s.w*ge):(ge=1-t[le],Ee=Qe?vt._offset+vt._length*ge:Ee=s.t+s.h*ge),Ge=t.showarrow?.5:ge}if(t.showarrow){de.head=Ee;var We=t["a"+le];if(tt=Oe*we(.5,t.xanchor)-qe*we(.5,t.yanchor),Xe===ze){var pt=Z4.getRefType(Xe);pt==="domain"?(le==="y"&&(We=1-We),de.tail=vt._offset+vt._length*We):pt==="paper"?le==="y"?(We=1-We,de.tail=s.t+s.h*We):de.tail=s.l+s.w*We:de.tail=vt._offset+vt.r2p(We),Ue=tt}else de.tail=Ee+We,Ue=tt+We;de.text=de.tail+tt;var kt=o[le==="x"?"width":"height"];if(ze==="paper"&&(de.head=hm.constrain(de.head,1,kt-1)),Xe==="pixel"){var qt=-Math.max(de.tail-3,de.text),Wt=Math.min(de.tail+3,de.text)-kt;qt>0?(de.tail+=qt,de.text+=qt):Wt>0&&(de.tail-=Wt,de.text-=Wt)}de.tail+=Ie,de.head+=Ie}else tt=mt*we(Ge,lt),Ue=tt,de.text=Ee+tt;de.text+=Ie,tt+=Ie,Ue+=Ie,t["_"+le+"padplus"]=mt/2+Ue,t["_"+le+"padminus"]=mt/2-Ue,t["_"+le+"size"]=mt,t["_"+le+"shift"]=tt}if(he){S.remove();return}var _r=0,tr=0;if(t.align!=="left"&&(_r=(j-ue)*(t.align==="center"?.5:1)),t.valign!=="top"&&(tr=(fe-re)*(t.valign==="middle"?.5:1)),te)X.select("svg").attr({x:C+_r-1,y:C+tr}).call(B1.setClipUrl,P?m:null,e);else{var lr=C+tr-se.top,Ye=C+_r-se.left;U.call(Iq.positionText,Ye,lr).call(B1.setClipUrl,P?m:null,e)}D.select("rect").call(B1.setRect,C,C,j,fe),A.call(B1.setRect,T/2,T/2,ce-T,oe-T),S.call(B1.setTranslate,Math.round(x.x.text-ce/2),Math.round(x.y.text-oe/2)),M.attr({transform:"rotate("+g+","+x.x.text+","+x.y.text+")"});var Te=function(Ae,Re){E.selectAll(".annotation-arrow-g").remove();var Ze=x.x.head,Ke=x.y.head,_t=x.x.tail+Ae,St=x.y.tail+Re,Vt=x.x.text+Ae,fr=x.y.text+Re,$t=hm.rotationXYMatrix(g,Vt,fr),gr=hm.apply2DTransform($t),Br=hm.apply2DTransform2($t),Nr=+A.attr("width"),Er=+A.attr("height"),zr=Vt-.5*Nr,vn=zr+Nr,Nn=fr-.5*Er,Xn=Nn+Er,Kn=[[zr,Nn,zr,Xn],[zr,Xn,vn,Xn],[vn,Xn,vn,Nn],[vn,Nn,zr,Nn]].map(Br);if(!Kn.reduce(function(fi,_o){return fi^!!hm.segmentsIntersect(Ze,Ke,Ze+1e6,Ke+1e6,_o[0],_o[1],_o[2],_o[3])},!1)){Kn.forEach(function(fi){var _o=hm.segmentsIntersect(_t,St,Ze,Ke,fi[0],fi[1],fi[2],fi[3]);_o&&(_t=_o.x,St=_o.y)});var Qn=t.arrowwidth,un=t.arrowcolor,aa=t.arrowside,da=E.append("g").style({opacity:Mx.opacity(un)}).classed("annotation-arrow-g",!0),ua=da.append("path").attr("d","M"+_t+","+St+"L"+Ze+","+Ke).style("stroke-width",Qn+"px").call(Mx.stroke,Mx.rgb(un));if(ddt(ua,aa,t),l.annotationPosition&&ua.node().parentNode&&!n){var qa=Ze,ii=Ke;if(t.standoff){var pa=Math.sqrt(Math.pow(Ze-_t,2)+Math.pow(Ke-St,2));qa+=t.standoff*(_t-Ze)/pa,ii+=t.standoff*(St-Ke)/pa}var no=da.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(_t-qa)+","+(St-ii),transform:Rq(qa,ii)}).style("stroke-width",Qn+6+"px").call(Mx.stroke,"rgba(0,0,0,0)").call(Mx.fill,"rgba(0,0,0,0)"),Gi,Ti;X4.init({element:no.node(),gd:e,prepFn:function(){var fi=B1.getTranslate(S);Gi=fi.x,Ti=fi.y,a&&a.autorange&&h(a._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0)},moveFn:function(fi,_o){var Oi=gr(Gi,Ti),ni=Oi[0]+fi,ao=Oi[1]+_o;S.call(B1.setTranslate,ni,ao),v("x",fm(a,fi,"x",s,t)),v("y",fm(i,_o,"y",s,t)),t.axref===t.xref&&v("ax",fm(a,fi,"ax",s,t)),t.ayref===t.yref&&v("ay",fm(i,_o,"ay",s,t)),da.attr("transform",Rq(fi,_o)),M.attr({transform:"rotate("+g+","+ni+","+ao+")"})},doneFn:function(){Dq.call("_guiRelayout",e,d());var fi=document.querySelector(".js-notes-box-panel");fi&&fi.redraw(fi.selectedObj)}})}}};if(t.showarrow&&Te(0,0),w){var Fe;X4.init({element:S.node(),gd:e,prepFn:function(){Fe=M.attr("transform")},moveFn:function(Ae,Re){var Ze="pointer";if(t.showarrow)t.axref===t.xref?v("ax",fm(a,Ae,"ax",s,t)):v("ax",t.ax+Ae),t.ayref===t.yref?v("ay",fm(i,Re,"ay",s.w,t)):v("ay",t.ay+Re),Te(Ae,Re);else{if(n)return;var Ke,_t;if(a)Ke=fm(a,Ae,"x",s,t);else{var St=t._xsize/s.w,Vt=t.x+(t._xshift-t.xshift)/s.w-St/2;Ke=X4.align(Vt+Ae/s.w,St,0,1,t.xanchor)}if(i)_t=fm(i,Re,"y",s,t);else{var fr=t._ysize/s.h,$t=t.y-(t._yshift+t.yshift)/s.h-fr/2;_t=X4.align($t-Re/s.h,fr,0,1,t.yanchor)}v("x",Ke),v("y",_t),(!a||!i)&&(Ze=X4.getCursor(a?.5:Ke,i?.5:_t,t.xanchor,t.yanchor))}M.attr({transform:Rq(Ae,Re)+Fe}),zq(S,Ze)},clickFn:function(Ae,Re){t.captureevents&&e.emit("plotly_clickannotation",y(Re))},doneFn:function(){zq(S),Dq.call("_guiRelayout",e,d());var Ae=document.querySelector(".js-notes-box-panel");Ae&&Ae.redraw(Ae.selectedObj)}})}}l.annotationText?U.call(Iq.makeEditable,{delegate:S,gd:e}).call(O).on("edit",function(B){t.text=B,this.call(O),v("text",B),a&&a.autorange&&h(a._name+".autorange",!0),i&&i.autorange&&h(i._name+".autorange",!0),Dq.call("_guiRelayout",e,d())}):U.call(O)}});var rhe=ne((dnr,the)=>{"use strict";var Kfe=Zt(),pdt=Fa(),Jfe=Bo().arrayEditor;the.exports={hasClickToShow:gdt,onClick:mdt};function gdt(e,t){var r=ehe(e,t);return r.on.length>0||r.explicitOff.length>0}function mdt(e,t){var r=ehe(e,t),n=r.on,a=r.off.concat(r.explicitOff),i={},o=e._fullLayout.annotations,s,l;if(n.length||a.length){for(s=0;s{"use strict";var qq=Zt(),b_=_a();nhe.exports=function(t,r,n,a){a("opacity");var i=a("bgcolor"),o=a("bordercolor"),s=b_.opacity(o);a("borderpad");var l=a("borderwidth"),u=a("showarrow");a("text",u?" ":n._dfltTitle.annotation),a("textangle"),qq.coerceFont(a,"font",n.font),a("width"),a("align");var c=a("height");if(c&&a("valign"),u){var f=a("arrowside"),h,v;f.indexOf("end")!==-1&&(h=a("arrowhead"),v=a("arrowsize")),f.indexOf("start")!==-1&&(a("startarrowhead",h),a("startarrowsize",v)),a("arrowcolor",s?r.bordercolor:b_.defaultLine),a("arrowwidth",(s&&l||1)*2),a("standoff"),a("startstandoff")}var d=a("hovertext"),m=n.hoverlabel||{};if(d){var x=a("hoverlabel.bgcolor",m.bgcolor||(b_.opacity(i)?b_.rgb(i):b_.defaultLine)),g=a("hoverlabel.bordercolor",m.bordercolor||b_.contrast(x)),E=qq.extendFlat({},m.font);E.color||(E.color=g),qq.coerceFont(a,"hoverlabel.font",E)}a("captureevents",!!d)}});var ihe=ne((pnr,ahe)=>{"use strict";var Oq=Zt(),Sx=ri(),ydt=zh(),xdt=Bq(),bdt=om();ahe.exports=function(t,r){ydt(t,r,{name:"annotations",handleItemDefaults:_dt})};function _dt(e,t,r){function n(M,w){return Oq.coerce(e,t,bdt,M,w)}var a=n("visible"),i=n("clicktoshow");if(a||i){xdt(e,t,r,n);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],h=Sx.coerceRef(e,t,u,f,"","paper");if(h!=="paper"){var v=Sx.getFromId(u,h);v._annIndices.push(t._index)}if(Sx.coercePosition(t,u,n,h,f,.5),o){var d="a"+f,m=Sx.coerceRef(e,t,u,d,"pixel",["pixel","paper"]);m!=="pixel"&&m!==h&&(m=t[d]="pixel");var x=m==="pixel"?l[c]:.4;Sx.coercePosition(t,u,n,m,d,x)}n(f+"anchor"),n(f+"shift")}if(Oq.noneOrAll(e,t,["x","y"]),o&&Oq.noneOrAll(e,t,["ax","ay"]),i){var g=n("xclick"),E=n("yclick");t._xclick=g===void 0?t.x:Sx.cleanPosition(g,u,t.xref),t._yclick=E===void 0?t.y:Sx.cleanPosition(E,u,t.yref)}}}});var lhe=ne((gnr,she)=>{"use strict";var Nq=Zt(),Ex=ri(),wdt=kk().draw;she.exports=function(t){var r=t._fullLayout,n=Nq.filterVisible(r.annotations);if(n.length&&t._fullData.length)return Nq.syncOrAsync([wdt,Tdt],t)};function Tdt(e){var t=e._fullLayout;Nq.filterVisible(t.annotations).forEach(function(r){var n=Ex.getFromId(e,r.xref),a=Ex.getFromId(e,r.yref),i=Ex.getRefType(r.xref),o=Ex.getRefType(r.yref);r._extremes={},i==="range"&&ohe(r,n),o==="range"&&ohe(r,a)})}function ohe(e,t){var r=t._id,n=r.charAt(0),a=e[n],i=e["a"+n],o=e[n+"ref"],s=e["a"+n+"ref"],l=e["_"+n+"padplus"],u=e["_"+n+"padminus"],c={x:1,y:-1}[n]*e[n+"shift"],f=3*e.arrowsize*e.arrowwidth||0,h=f+c,v=f-c,d=3*e.startarrowsize*e.arrowwidth||0,m=d+c,x=d-c,g;if(s===o){var E=Ex.findExtremes(t,[t.r2c(a)],{ppadplus:h,ppadminus:v}),M=Ex.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,m),ppadminus:Math.max(u,x)});g={min:[E.min[0],M.min[0]],max:[E.max[0],M.max[0]]}}else m=i?m+i:m,x=i?x-i:x,g=Ex.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,h,m),ppadminus:Math.max(u,v,x)});e._extremes[r]=g}});var che=ne((mnr,uhe)=>{"use strict";var Adt=mi(),Mdt=kM();uhe.exports=function(t,r,n,a){r=r||{};var i=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(!(i||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(v){var d=u[v],m=null;i?m=Mdt(d,r.range):m=Math.pow(10,d),Adt(m)||(m=null),a(c+v,m)}for(var h=0;h{"use strict";var Uq=kk(),fhe=rhe();hhe.exports={moduleType:"component",name:"annotations",layoutAttributes:om(),supplyLayoutDefaults:ihe(),includeBasePlot:L4()("annotations"),calcAutorange:lhe(),draw:Uq.draw,drawOne:Uq.drawOne,drawRaw:Uq.drawRaw,hasClickToShow:fhe.hasClickToShow,onClick:fhe.onClick,convertCoords:che()}});var Ck=ne((xnr,vhe)=>{"use strict";var Cl=om(),Sdt=Il().overrideAll,Edt=Bo().templatedArray;vhe.exports=Sdt(Edt("annotation",{visible:Cl.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Cl.xanchor,xshift:Cl.xshift,yanchor:Cl.yanchor,yshift:Cl.yshift,text:Cl.text,textangle:Cl.textangle,font:Cl.font,width:Cl.width,height:Cl.height,opacity:Cl.opacity,align:Cl.align,valign:Cl.valign,bgcolor:Cl.bgcolor,bordercolor:Cl.bordercolor,borderpad:Cl.borderpad,borderwidth:Cl.borderwidth,showarrow:Cl.showarrow,arrowcolor:Cl.arrowcolor,arrowhead:Cl.arrowhead,startarrowhead:Cl.startarrowhead,arrowside:Cl.arrowside,arrowsize:Cl.arrowsize,startarrowsize:Cl.startarrowsize,arrowwidth:Cl.arrowwidth,standoff:Cl.standoff,startstandoff:Cl.startstandoff,hovertext:Cl.hovertext,hoverlabel:Cl.hoverlabel,captureevents:Cl.captureevents}),"calc","from-root")});var ghe=ne((bnr,phe)=>{"use strict";var Vq=Zt(),kdt=ri(),Cdt=zh(),Ldt=Bq(),Fdt=Ck();phe.exports=function(t,r,n){Cdt(t,r,{name:"annotations",handleItemDefaults:Pdt,fullLayout:n.fullLayout})};function Pdt(e,t,r,n){function a(s,l){return Vq.coerce(e,t,Fdt,s,l)}function i(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],kdt.coercePosition(t,u,a,s,s,.5)}var o=a("visible");o&&(Ldt(e,t,n.fullLayout,a),i("x"),i("y"),i("z"),Vq.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",a("ax",-10),a("ay",-30),Vq.noneOrAll(e,t,["ax","ay"])))}});var bhe=ne((_nr,xhe)=>{"use strict";var mhe=Zt(),yhe=ri();xhe.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,a=0;a{"use strict";function Gq(e,t){var r=[0,0,0,0],n,a;for(n=0;n<4;++n)for(a=0;a<4;++a)r[a]+=e[4*n+a]*t[n];return r}function Rdt(e,t){var r=Gq(e.projection,Gq(e.view,Gq(e.model,[t[0],t[1],t[2],1])));return r}_he.exports=Rdt});var The=ne((Tnr,whe)=>{"use strict";var Idt=kk().drawRaw,zdt=Hq(),qdt=["x","y","z"];whe.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,a=r.annotations,i=0;i1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+i+'"]').remove():(o._pdata=zdt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),Idt(t.graphDiv,o,i,t.id,o._xa,o._ya))}}});var She=ne((Anr,Mhe)=>{"use strict";var Bdt=Fa(),Ahe=Zt();Mhe.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Ck()}}},layoutAttributes:Ck(),handleDefaults:ghe(),includeBasePlot:Odt,convert:bhe(),draw:The()};function Odt(e,t){var r=Bdt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,a=Object.keys(e),i=0;i{"use strict";var Mnr=zc(),Ehe=pl(),khe=Tu().line,Ndt=xf().dash,Y0=ci().extendFlat,Udt=Bo().templatedArray,Snr=k4(),__=os(),Che=om(),{shapeTexttemplateAttrs:Vdt,templatefallbackAttrs:Gdt}=rs(),Hdt=qM();Lhe.exports=Udt("shape",{visible:Y0({},__.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:Y0({},__.legend,{editType:"calc+arraydraw"}),legendgroup:Y0({},__.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:Y0({},__.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:Ehe({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:Y0({},__.legendrank,{editType:"calc+arraydraw"}),legendwidth:Y0({},__.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:Y0({},Che.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:Y0({},Che.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:Y0({},khe.color,{editType:"arraydraw"}),width:Y0({},khe.width,{editType:"calc+arraydraw"}),dash:Y0({},Ndt,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:Vdt({},{keys:Object.keys(Hdt)}),texttemplatefallback:Gdt({editType:"arraydraw"}),font:Ehe({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var Phe=ne((knr,Fhe)=>{"use strict";var w_=Zt(),xv=ri(),jdt=zh(),Wdt=jq(),$4=am();Fhe.exports=function(t,r){jdt(t,r,{name:"shapes",handleItemDefaults:Xdt})};function Ydt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function Xdt(e,t,r){function n(M,w){return w_.coerce(e,t,Wdt,M,w)}t._isShape=!0;var a=n("visible");if(!a)return;var i=n("showlegend");n("legend"),n("legendgroup"),i&&(n("legendwidth"),n("legendgrouptitle.text"),w_.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",l=n("type",s),u=l!=="path";u&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var c=n("line.width");c&&(n("line.color"),n("line.dash"));var f=n("xsizemode"),h=n("ysizemode");let v=[.25,.75],d=[0,10];["x","y"].forEach(M=>{var w=M+"anchor",k=M==="x"?f:h,y={_fullLayout:r},S,T,p,C;let A=M+"ref",P=e[A];if(Array.isArray(P)&&P.length>0){let D=$4.countDefiningCoords(l,o,M);C=xv.coerceRefArray(e,t,y,M,void 0,"paper",D),t["_"+M+"refArray"]=!0}else C=xv.coerceRef(e,t,y,M,void 0,"paper");if(Array.isArray(C))C.forEach(function(D){xv.getRefType(D)==="range"&&(S=xv.getFromId(y,D),S&&S._shapeIndices.indexOf(t._index)===-1&&S._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(D){let z=C[D];xv.getRefType(z)==="range"?(S=xv.getFromId(y,z),T=$4.shapePositionToRange(S),p=$4.rangeToShapePosition(S),(S.type==="category"||S.type==="multicategory")&&n(M+D+"shift")):T=p=w_.identity;let U=M+D,O=e[U];if(e[U]=T(e[U],!0),k==="pixel"?n(U,d[D]):xv.coercePosition(t,y,n,z,U,v[D]),t[U]=p(t[U]),e[U]=O,D===0&&k==="pixel"){let R=e[w];e[w]=T(e[w],!0),xv.coercePosition(t,y,n,z,w,.25),t[w]=p(t[w]),e[w]=R}});else{if(xv.getRefType(C)==="range"?(S=xv.getFromId(y,C),S._shapeIndices.push(t._index),p=$4.rangeToShapePosition(S),T=$4.shapePositionToRange(S),u&&(S.type==="category"||S.type==="multicategory")&&(n(M+"0shift"),n(M+"1shift"))):T=p=w_.identity,u){let z=M+"0",q=M+"1",U=e[z],O=e[q];e[z]=T(e[z],!0),e[q]=T(e[q],!0),k==="pixel"?(n(z,d[0]),n(q,d[1])):(xv.coercePosition(t,y,n,C,z,v[0]),xv.coercePosition(t,y,n,C,q,v[1])),t[z]=p(t[z]),t[q]=p(t[q]),e[z]=U,e[q]=O}if(k==="pixel"){let z=e[w];e[w]=T(e[w],!0),xv.coercePosition(t,y,n,C,w,.25),t[w]=p(t[w]),e[w]=z}}}),u&&w_.noneOrAll(e,t,["x0","x1","y0","y1"]);var m=l==="line",x,g;if(u&&(x=n("label.texttemplate"),n("label.texttemplatefallback")),x||(g=n("label.text")),g||x){n("label.textangle");var E=n("label.textposition",m?"middle":"middle center");n("label.xanchor"),n("label.yanchor",Ydt(m,E)),n("label.padding"),w_.coerceFont(n,"label.font",r.font)}}});var Ihe=ne((Cnr,Rhe)=>{"use strict";var Zdt=_a(),Dhe=Zt();function $dt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Rhe.exports=function(t,r,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),Dhe.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var a=n("newshape.line.width");if(a){var i=(t||{}).plot_bgcolor||"#FFF";n("newshape.line.color",Zdt.contrast(i)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",$dt(o,u)),n("newshape.label.padding"),Dhe.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var Vhe=ne((Lnr,Uhe)=>{"use strict";var Wq=Zt(),t0=ri(),Up=s4(),Yq=am();Uhe.exports=function(t){var r=t._fullLayout,n=Wq.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var a=0;a{o=t0.getFromId(t,f),i._extremes[o._id]=t0.findExtremes(o,h,qhe(i))})}else i.xref!=="paper"&&l!=="domain"&&(o=t0.getFromId(t,i.xref),s=Ohe(o,i,Up.paramIsX),s&&(i._extremes[o._id]=t0.findExtremes(o,s,qhe(i))));if(u==="array"){let c=zhe(t,i,"y");Object.entries(c).forEach(([f,h])=>{o=t0.getFromId(t,f),i._extremes[o._id]=t0.findExtremes(o,h,Bhe(i))})}else i.yref!=="paper"&&u!=="domain"&&(o=t0.getFromId(t,i.yref),s=Ohe(o,i,Up.paramIsY),s&&(i._extremes[o._id]=t0.findExtremes(o,s,Bhe(i))))}};function zhe(e,t,r){let n=t[r+"ref"],a=r==="x"?Up.paramIsX:Up.paramIsY;function i(f,h){f==="paper"||t0.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(h))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(Up.segmentRE)||[];for(var s=0,l=0;ld&&(i(n[s],m[d]),s++)}}else i(n[0],t[r+"0"]),i(n[1],t[r+"1"]);let u={};for(let f in o){let h=t0.getFromId(e,f);if(h){var c=h.type==="category"||h.type==="multicategory"?h.r2c:h.d2c;h.type==="date"&&(c=Yq.decodeDate(c)),u[h._id]=o[f].map(c)}}return u}function qhe(e){return Nhe(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function Bhe(e){return Nhe(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function Nhe(e,t,r,n,a,i){var o=e/2,s=i;if(t==="pixel"){var l=a?Yq.extractPathCoords(a,i?Up.paramIsY:Up.paramIsX):[r,n],u=Wq.aggNums(Math.max,null,l),c=Wq.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,h=u>0?u+o:o;return{ppad:o,ppadplus:s?f:h,ppadminus:s?h:f}}else return{ppad:o}}function Ohe(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",i,o,s=0,l=0,u=a?e.r2c:e.d2c,c=t[n+"sizemode"]==="scaled";if(c?(i=t[n+"0"],o=t[n+"1"],a&&(s=t[n+"0shift"],l=t[n+"1shift"])):(i=t[n+"anchor"],o=t[n+"anchor"]),i!==void 0)return[u(i)+s,u(o)+l];if(t.path){var f=1/0,h=-1/0,v=t.path.match(Up.segmentRE),d,m,x,g,E;for(e.type==="date"&&(u=Yq.decodeDate(u)),d=0;dh&&(h=E)));if(h>=f)return[f,h]}}});var jhe=ne((Fnr,Hhe)=>{"use strict";var Ghe=gE();Hhe.exports={moduleType:"component",name:"shapes",layoutAttributes:jq(),supplyLayoutDefaults:Phe(),supplyDrawNewShapeDefaults:Ihe(),includeBasePlot:L4()("shapes"),calcAutorange:Vhe(),draw:Ghe.draw,drawOne:Ghe.drawOne}});var Xq=ne((Dnr,Yhe)=>{"use strict";var Whe=zc(),Kdt=Bo().templatedArray,Pnr=k4();Yhe.exports=Kdt("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",Whe.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",Whe.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var Zhe=ne((Rnr,Xhe)=>{"use strict";var Jdt=Zt(),Zq=ri(),Qdt=zh(),evt=Xq(),tvt="images";Xhe.exports=function(t,r){var n={name:tvt,handleItemDefaults:rvt};Qdt(t,r,n)};function rvt(e,t,r){function n(h,v){return Jdt.coerce(e,t,evt,h,v)}var a=n("source"),i=n("visible",!!a);if(!i)return t;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=Zq.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=Zq.getFromId(o,c);f._imgIndices.push(t._index)}Zq.coercePosition(t,o,n,c,u,0)}return t}});var Qhe=ne((Inr,Jhe)=>{"use strict";var $he=Ea(),nvt=li(),T_=ri(),Khe=uu(),avt=qv();Jhe.exports=function(t){var r=t._fullLayout,n=[],a={},i=[],o,s;for(s=0;s{"use strict";var ede=mi(),ivt=kM();tde.exports=function(t,r,n,a){r=r||{};var i=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(i||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";nde.exports={moduleType:"component",name:"images",layoutAttributes:Xq(),supplyLayoutDefaults:Zhe(),includeBasePlot:L4()("images"),draw:Qhe(),convertCoords:rde()}});var Lk=ne((Bnr,ide)=>{"use strict";ide.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"}}});var $q=ne((Onr,sde)=>{"use strict";var ovt=pl(),svt=Ic(),lvt=ci().extendFlat,uvt=Il().overrideAll,cvt=BM(),ode=Bo().templatedArray,fvt=ode("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});sde.exports=uvt(ode("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:fvt,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:lvt(cvt({editType:"arraydraw"}),{}),font:ovt({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:svt.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var fde=ne((Nnr,cde)=>{"use strict";var Fk=Zt(),lde=zh(),ude=$q(),hvt=Lk(),dvt=hvt.name,vvt=ude.buttons;cde.exports=function(t,r){var n={name:dvt,handleItemDefaults:pvt};lde(t,r,n)};function pvt(e,t,r){function n(o,s){return Fk.coerce(e,t,ude,o,s)}var a=lde(e,t,{name:"buttons",handleItemDefaults:gvt}),i=n("visible",a.length>0);i&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),Fk.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),Fk.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function gvt(e,t){function r(a,i){return Fk.coerce(e,t,vvt,a,i)}var n=r("visible",e.method==="skip"||Array.isArray(e.args));n&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var vde=ne((Unr,dde)=>{"use strict";dde.exports=Au;var X0=Ea(),hde=_a(),A_=li(),Pk=Zt();function Au(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Au.barWidth=2;Au.barLength=20;Au.barRadius=2;Au.barPad=1;Au.barColor="#808BA4";Au.prototype.enable=function(t,r,n){var a=this.gd._fullLayout,i=a.width,o=a.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,h=f==="down",v=f==="left",d=f==="right",m=f==="up",x=l,g=c,E,M,w,k;!h&&!v&&!d&&!m&&(this.position.direction="down",h=!0);var y=h||m;y?(E=s,M=E+x,h?(w=u,k=Math.min(w+g,o),g=k-w):(k=u+g,w=Math.max(k-g,0),g=k-w)):(w=u,k=w+g,v?(M=s+x,E=Math.max(M-x,0),x=M-E):(E=s,M=Math.min(E+x,i),x=M-E)),this._box={l:E,t:w,w:x,h:g};var S=l>x,T=Au.barLength+2*Au.barPad,p=Au.barWidth+2*Au.barPad,C=s,A=u+c;A+p>o&&(A=o-p);var P=this.container.selectAll("rect.scrollbar-horizontal").data(S?[0]:[]);P.exit().on(".drag",null).remove(),P.enter().append("rect").classed("scrollbar-horizontal",!0).call(hde.fill,Au.barColor),S?(this.hbar=P.attr({rx:Au.barRadius,ry:Au.barRadius,x:C,y:A,width:T,height:p}),this._hbarXMin=C+T/2,this._hbarTranslateMax=x-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var D=c>g,z=Au.barWidth+2*Au.barPad,q=Au.barLength+2*Au.barPad,U=s+l,O=u;U+z>i&&(U=i-z);var R=this.container.selectAll("rect.scrollbar-vertical").data(D?[0]:[]);R.exit().on(".drag",null).remove(),R.enter().append("rect").classed("scrollbar-vertical",!0).call(hde.fill,Au.barColor),D?(this.vbar=R.attr({rx:Au.barRadius,ry:Au.barRadius,x:U,y:O,width:z,height:q}),this._vbarYMin=O+q/2,this._vbarTranslateMax=g-q):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var B=this.id,Y=E-.5,X=D?M+z+.5:M+.5,te=w-.5,se=S?k+p+.5:k+.5,ue=a._topdefs.selectAll("#"+B).data(S||D?[0]:[]);if(ue.exit().remove(),ue.enter().append("clipPath").attr("id",B).append("rect"),S||D?(this._clipRect=ue.select("rect").attr({x:Math.floor(Y),y:Math.floor(te),width:Math.ceil(X)-Math.floor(Y),height:Math.ceil(se)-Math.floor(te)}),this.container.call(A_.setClipUrl,B,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(A_.setClipUrl,null),delete this._clipRect),S||D){var re=X0.behavior.drag().on("dragstart",function(){X0.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(re);var j=X0.behavior.drag().on("dragstart",function(){X0.event.sourceEvent.preventDefault(),X0.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));S&&this.hbar.on(".drag",null).call(j),D&&this.vbar.on(".drag",null).call(j)}this.setTranslate(r,n)};Au.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)};Au.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=X0.event.dx),this.vbar&&(r-=X0.event.dy),this.setTranslate(t,r)};Au.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=X0.event.deltaY),this.vbar&&(r+=X0.event.deltaY),this.setTranslate(t,r)};Au.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,a=n+this._hbarTranslateMax,i=Pk.constrain(X0.event.x,n,a),o=(i-n)/(a-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=Pk.constrain(X0.event.y,l,u),f=(c-l)/(u-l),h=this.position.h-this._box.h;r=f*h}this.setTranslate(t,r)};Au.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=Pk.constrain(t||0,0,n),r=Pk.constrain(r||0,0,a),this.translateX=t,this.translateY=r,this.container.call(A_.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var i=t/n;this.hbar.call(A_.setTranslate,t+i*this._hbarTranslateMax,r)}if(this.vbar){var o=r/a;this.vbar.call(A_.setTranslate,t,r+o*this._vbarTranslateMax)}}});var Ade=ne((Vnr,Tde)=>{"use strict";var M_=Ea(),K4=Sl(),J4=_a(),S_=li(),bv=Zt(),Dk=Ms(),mvt=Bo().arrayEditor,gde=qc().LINE_SPACING,Di=Lk(),yvt=vde();Tde.exports=function(t){var r=t._fullLayout,n=bv.filterVisible(r[Di.name]);function a(h){K4.autoMargin(t,_de(h))}var i=r._menulayer.selectAll("g."+Di.containerClassName).data(n.length>0?[0]:[]);if(i.enter().append("g").classed(Di.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){M_.select(this).selectAll("g."+Di.headerGroupClassName).each(a)}).remove(),n.length!==0){var o=i.selectAll("g."+Di.headerGroupClassName).data(n,xvt);o.enter().append("g").classed(Di.headerGroupClassName,!0);for(var s=bv.ensureSingle(i,"g",Di.dropdownButtonGroupClassName,function(h){h.style("pointer-events","all")}),l=0;l{"use strict";var Svt=Lk();Mde.exports={moduleType:"component",name:Svt.name,layoutAttributes:$q(),supplyLayoutDefaults:fde(),draw:Ade()}});var eT=ne((Hnr,Ede)=>{"use strict";Ede.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var eB=ne((jnr,Lde)=>{"use strict";var kde=pl(),Evt=BM(),kvt=ci().extendDeepAll,Cvt=Il().overrideAll,Lvt=k5(),Cde=Bo().templatedArray,kx=eT(),Fvt=Cde("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});Lde.exports=Cvt(Cde("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:Fvt,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:kvt(Evt({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:Lvt.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:kde({})},font:kde({}),activebgcolor:{valType:"color",dflt:kx.gripBgActiveColor},bgcolor:{valType:"color",dflt:kx.railBgColor},bordercolor:{valType:"color",dflt:kx.railBorderColor},borderwidth:{valType:"number",min:0,dflt:kx.railBorderWidth},ticklen:{valType:"number",min:0,dflt:kx.tickLength},tickcolor:{valType:"color",dflt:kx.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:kx.minorTickLength}}),"arraydraw","from-root")});var Rde=ne((Wnr,Dde)=>{"use strict";var E_=Zt(),Fde=zh(),Pde=eB(),Pvt=eT(),Dvt=Pvt.name,Rvt=Pde.steps;Dde.exports=function(t,r){Fde(t,r,{name:Dvt,handleItemDefaults:Ivt})};function Ivt(e,t,r){function n(f,h){return E_.coerce(e,t,Pde,f,h)}for(var a=Fde(e,t,{name:"steps",handleItemDefaults:zvt}),i=0,o=0;o{"use strict";var Z0=Ea(),Rk=Sl(),dm=_a(),$0=li(),_v=Zt(),qvt=_v.strTranslate,tT=Ms(),Bvt=Bo().arrayEditor,vo=eT(),nB=qc(),qde=nB.LINE_SPACING,tB=nB.FROM_TL,rB=nB.FROM_BR;Gde.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,a=Ovt(n,t),i=n._infolayer.selectAll("g."+vo.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(vo.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),Rk.autoMargin(t,Bde(c))}if(i.exit().each(function(){Z0.select(this).selectAll("g."+vo.groupClassName).each(o)}).remove(),a.length!==0){var s=i.selectAll("g."+vo.groupClassName).data(a,Nvt);s.enter().append("g").classed(vo.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",qvt(o-vo.gripWidth*.5,t._dims.currentValueTotalHeight))}}function aB(e,t){var r=e._dims;return r.inputAreaStart+vo.stepInset+(r.inputAreaLength-2*vo.stepInset)*Math.min(1,Math.max(0,t))}function zde(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-vo.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*vo.stepInset-2*r.inputAreaStart)))}function Yvt(e,t,r){var n=r._dims,a=_v.ensureSingle(e,"rect",vo.railTouchRectClass,function(i){i.call(Ude,t,e,r).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,vo.tickOffset+r.ticklen+n.labelHeight)}).call(dm.fill,r.bgcolor).attr("opacity",0),$0.setTranslate(a,0,n.currentValueTotalHeight)}function Xvt(e,t){var r=t._dims,n=r.inputAreaLength-vo.railInset*2,a=_v.ensureSingle(e,"rect",vo.railRectClass);a.attr({width:n,height:vo.railWidth,rx:vo.railRadius,ry:vo.railRadius,"shape-rendering":"crispEdges"}).call(dm.stroke,t.bordercolor).call(dm.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),$0.setTranslate(a,vo.railInset,(r.inputAreaWidth-vo.railWidth)*.5+r.currentValueTotalHeight)}});var Wde=ne((Xnr,jde)=>{"use strict";var Zvt=eT();jde.exports={moduleType:"component",name:Zvt.name,layoutAttributes:eB(),supplyLayoutDefaults:Rde(),draw:Hde()}});var zk=ne((Znr,Xde)=>{"use strict";var Yde=Ic();Xde.exports={bgcolor:{valType:"color",dflt:Yde.background,editType:"plot"},bordercolor:{valType:"color",dflt:Yde.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}});var iB=ne(($nr,Zde)=>{"use strict";Zde.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}});var qk=ne((Knr,$de)=>{"use strict";$de.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var Qde=ne(Ok=>{"use strict";var $vt=uu(),Kvt=Ms(),Kde=qk(),Jvt=qc().LINE_SPACING,Bk=Kde.name;function Jde(e){var t=e&&e[Bk];return t&&t.visible}Ok.isVisible=Jde;Ok.makeData=function(e){for(var t=$vt.list({_fullLayout:e},"x",!0),r=e.margin,n=[],a=0;a{"use strict";var Nk=Zt(),eve=Bo(),tve=uu(),Qvt=zk(),e0t=iB();rve.exports=function(t,r,n){var a=t[n],i=r[n];if(!(a.rangeslider||r._requestRangeslider[i._id]))return;Nk.isPlainObject(a.rangeslider)||(a.rangeslider={});var o=a.rangeslider,s=eve.newContainer(i,"rangeslider");function l(k,y){return Nk.coerce(o,s,Qvt,k,y)}var u,c;function f(k,y){return Nk.coerce(u,c,e0t,k,y)}var h=l("visible");if(h){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!i.isValidRange(o.range)),l("range");var v=r._subplots;if(v)for(var d=v.cartesian.filter(function(k){return k.slice(0,Math.max(0,k.indexOf("y")))===tve.name2id(n)}).map(function(k){return k.slice(k.indexOf("y"),k.length)}),m=Nk.simpleMap(d,tve.id2name),x=0;x{"use strict";var t0t=uu().list,r0t=I0().getAutoRange,n0t=qk();ave.exports=function(t){for(var r=t0t(t,"x",!0),n=0;n{"use strict";var Uk=Ea(),a0t=Fa(),i0t=Sl(),Ju=Zt(),Vk=Ju.strTranslate,sve=li(),vm=_a(),o0t=Qy(),s0t=Ku(),oB=uu(),l0t=od(),u0t=z0(),Eo=qk();lve.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=R.max)U=A[O+1];else if(q=R.pmax)U=A[O+1];else if(q0?e.touches[0].clientX:0}function c0t(e,t,r,n){if(t._context.staticPlot)return;var a=e.select("rect."+Eo.slideBoxClassName).node(),i=e.select("rect."+Eo.grabAreaMinClassName).node(),o=e.select("rect."+Eo.grabAreaMaxClassName).node();function s(){var l=Uk.event,u=l.target,c=ove(l),f=c-e.node().getBoundingClientRect().left,h=n.d2p(r._rl[0]),v=n.d2p(r._rl[1]),d=l0t.coverSlip();this.addEventListener("touchmove",m),this.addEventListener("touchend",x),d.addEventListener("mousemove",m),d.addEventListener("mouseup",x);function m(g){var E=ove(g),M=+E-c,w,k,y;switch(u){case a:if(y="ew-resize",h+M>r._length||v+M<0)return;w=h+M,k=v+M;break;case i:if(y="col-resize",h+M>r._length)return;w=h+M,k=v;break;case o:if(y="col-resize",v+M<0)return;w=h,k=v+M;break;default:y="ew-resize",w=f,k=f+M;break}if(k{"use strict";var b0t=Zt(),_0t=zk(),w0t=iB(),sB=Qde();cve.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:b0t.extendFlat({},_0t,{yaxis:w0t})}}},layoutAttributes:zk(),handleDefaults:nve(),calcAutorange:ive(),draw:uve(),isVisible:sB.isVisible,makeData:sB.makeData,autoMarginOpts:sB.autoMarginOpts}});var Gk=ne((nar,dve)=>{"use strict";var T0t=pl(),hve=Ic(),A0t=Bo().templatedArray,M0t=A0t("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});dve.exports={visible:{valType:"boolean",editType:"plot"},buttons:M0t,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:T0t({editType:"plot"}),bgcolor:{valType:"color",dflt:hve.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:hve.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var lB=ne((aar,vve)=>{"use strict";vve.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var mve=ne((iar,gve)=>{"use strict";var Hk=Zt(),S0t=_a(),E0t=Bo(),k0t=zh(),pve=Gk(),uB=lB();gve.exports=function(t,r,n,a,i){var o=t.rangeselector||{},s=E0t.newContainer(r,"rangeselector");function l(v,d){return Hk.coerce(o,s,pve,v,d)}var u=k0t(o,s,{name:"buttons",handleItemDefaults:C0t,calendar:i}),c=l("visible",u.length>0);if(c){var f=L0t(r,n,a);l("x",f[0]),l("y",f[1]),Hk.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),Hk.coerceFont(l,"font",n.font);var h=l("bgcolor");l("activecolor",S0t.contrast(h,uB.lightAmount,uB.darkAmount)),l("bordercolor"),l("borderwidth")}};function C0t(e,t,r,n){var a=n.calendar;function i(l,u){return Hk.coerce(e,t,pve.buttons,l,u)}var o=i("visible");if(o){var s=i("step");s!=="all"&&(a&&a!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":i("stepmode"),i("count")),i("label")}}function L0t(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),a=0,i=0;i{"use strict";var F0t=hD(),P0t=Zt().titleCase;yve.exports=function(t,r){var n=t._name,a={};if(r.step==="all")a[n+".autorange"]=!0;else{var i=D0t(t,r);a[n+".range[0]"]=i[0],a[n+".range[1]"]=i[1]}return a};function D0t(e,t){var r=e.range,n=new Date(e.r2l(r[1])),a=t.step,i=F0t["utc"+P0t(a)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+i.offset(n,-o));break;case"todate":var l=i.offset(n,-o);s=e.l2r(+i.ceil(l));break}var u=r[1];return[s,u]}});var Eve=ne((sar,Sve)=>{"use strict";var Wk=Ea(),R0t=Fa(),I0t=Sl(),bve=_a(),Mve=li(),O1=Zt(),_ve=O1.strTranslate,jk=Ms(),z0t=uu(),hB=qc(),wve=hB.LINE_SPACING,Tve=hB.FROM_TL,Ave=hB.FROM_BR,fB=lB(),q0t=xve();Sve.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(B0t(t),O0t);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(a){var i=Wk.select(this),o=a,s=o.rangeselector,l=i.selectAll("g.button").data(O1.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=Wk.select(this),f=q0t(o,u);u._isActive=N0t(o,u,f),c.call(cB,s,u),c.call(V0t,s,u,t),c.on("click",function(){t._dragged||R0t.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(cB,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(cB,s,u)})}),H0t(t,l,s,o._name,i)})};function B0t(e){for(var t=z0t.list(e,"x",!0),r=[],n=0;n{"use strict";kve.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:Gk()}}},layoutAttributes:Gk(),handleDefaults:mve(),draw:Eve()}});var zl=ne(dB=>{"use strict";var Lve=ci().extendFlat;dB.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+" ":"",a=e.trace?"trace":"subplot",i=t.description?" "+t.description:"",o={x:Lve({},r,{}),y:Lve({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};dB.defaults=function(e,t,r,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var j0t=Zt(),W0t=(_b(),vl(bb)).counter,Y0t=zl().attributes,Fve=zc().idRegex,X0t=Bo(),vB={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[W0t("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[Fve.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[Fve.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:Y0t({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function Yk(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(a.length)return a}function Z0t(e,t){var r=e.grid||{},n=Yk(t,r,"x"),a=Yk(t,r,"y");if(!e.grid&&!n&&!a)return;var i=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(a),l=o&&n!==r.xaxes&&s&&a!==r.yaxes,u,c;i?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=a.length),o&&(c=n.length));var f=X0t.newContainer(t,"grid");function h(y,S){return j0t.coerce(r,f,vB,y,S)}var v=h("rows",u),d=h("columns",c);if(!(v*d>1)){delete t.grid;return}if(!i&&!o&&!s){var m=h("pattern")==="independent";m&&(i=!0)}f._hasSubplotGrid=i;var x=h("roworder"),g=x==="top to bottom",E=i?.2:.1,M=i?.3:.1,w,k;l&&t._splomGridDflt&&(w=t._splomGridDflt.xside,k=t._splomGridDflt.yside),f._domains={x:Pve("x",h,E,w,d),y:Pve("y",h,M,k,v,g)}}function Pve(e,t,r,n,a,i){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(a),u=s[0],c=(s[1]-u)/(a-o),f=c*(1-o),h=0;h{"use strict";Ive.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"}});var Bve=ne((har,qve)=>{"use strict";var zve=mi(),K0t=Fa(),J0t=Zt(),Q0t=Bo(),ept=gB();qve.exports=function(e,t,r,n){var a="error_"+n.axis,i=Q0t.newContainer(t,a),o=e[a]||{};function s(d,m){return J0t.coerce(o,i,ept,d,m)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var h="copy_"+n.inherit+"style";if(n.inherit){var v=t["error_"+n.inherit];(v||{}).visible&&s(h,!(o.color||zve(o.thickness)||zve(o.width)))}(!n.inherit||!i[h])&&(s("color",r),s("thickness"),s("width",K0t.traceIs(t,"gl3d")?0:4))}}});var mB=ne((dar,Nve)=>{"use strict";Nve.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var a=t.array||[];if(n)return function(u,c){var f=+a[c];return[f,f]};var i=t.arrayminus||[];return function(u,c){var f=+a[c],h=+i[c];return!isNaN(f)||!isNaN(h)?[h||0,f||0]:[NaN,NaN]}}else{var o=Ove(r,t.value),s=Ove(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function Ove(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var Gve=ne((par,Vve)=>{"use strict";var yB=mi(),tpt=Fa(),xB=ri(),rpt=Zt(),npt=mB();Vve.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var Hve=Ea(),pm=mi(),apt=li(),ipt=ml();jve.exports=function(t,r,n,a){var i,o=n.xaxis,s=n.yaxis,l=a&&a.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,h=f.error_x||{},v=f.error_y||{},d;f.ids&&(d=function(E){return E.id});var m=ipt.hasMarkers(f)&&f.marker.maxdisplayed>0;!v.visible&&!h.visible&&(c=[]);var x=Hve.select(this).selectAll("g.errorbar").data(c,d);if(x.exit().remove(),!!c.length){h.visible||x.selectAll("path.xerror").remove(),v.visible||x.selectAll("path.yerror").remove(),x.style("opacity",1);var g=x.enter().append("g").classed("errorbar",!0);l&&g.style("opacity",0).transition().duration(a.duration).style("opacity",1),apt.setClipUrl(x,n.layerClipId,t),x.each(function(E){var M=Hve.select(this),w=opt(E,o,s);if(!(m&&!E.vis)){var k,y=M.select("path.yerror");if(v.visible&&pm(w.x)&&pm(w.yh)&&pm(w.ys)){var S=v.width;k="M"+(w.x-S)+","+w.yh+"h"+2*S+"m-"+S+",0V"+w.ys,w.noYS||(k+="m-"+S+",0h"+2*S),i=!y.size(),i?y=M.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(y=y.transition().duration(a.duration).ease(a.easing)),y.attr("d",k)}else y.remove();var T=M.select("path.xerror");if(h.visible&&pm(w.y)&&pm(w.xh)&&pm(w.xs)){var p=(h.copy_ystyle?v:h).width;k="M"+w.xh+","+(w.y-p)+"v"+2*p+"m0,-"+p+"H"+w.xs,w.noXS||(k+="m0,-"+p+"v"+2*p),i=!T.size(),i?T=M.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(T=T.transition().duration(a.duration).ease(a.easing)),T.attr("d",k)}else T.remove()}})}})};function opt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),pm(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),pm(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var Zve=ne((mar,Xve)=>{"use strict";var spt=Ea(),Yve=_a();Xve.exports=function(t){t.each(function(r){var n=r[0].trace,a=n.error_y||{},i=n.error_x||{},o=spt.select(this);o.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(Yve.stroke,a.color),i.copy_ystyle&&(i=a),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(Yve.stroke,i.color)})}});var Jve=ne((yar,Kve)=>{"use strict";var rT=Zt(),$ve=Il().overrideAll,nT=gB(),Cx={error_x:rT.extendFlat({},nT),error_y:rT.extendFlat({},nT)};delete Cx.error_x.copy_zstyle;delete Cx.error_y.copy_zstyle;delete Cx.error_y.copy_ystyle;var aT={error_x:rT.extendFlat({},nT),error_y:rT.extendFlat({},nT),error_z:rT.extendFlat({},nT)};delete aT.error_x.copy_ystyle;delete aT.error_y.copy_ystyle;delete aT.error_z.copy_ystyle;delete aT.error_z.copy_zstyle;Kve.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:Cx,bar:Cx,histogram:Cx,scatter3d:$ve(aT,"calc","nested"),scattergl:$ve(Cx,"calc","nested")}},supplyDefaults:Bve(),calc:Gve(),makeComputeError:mB(),plot:Wve(),style:Zve(),hoverInfo:lpt};function lpt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var e0e=ne((xar,Qve)=>{"use strict";Qve.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}});var s0e=ne((bar,o0e)=>{"use strict";var gm=Ea(),Zk=Sl(),t0e=Fa(),N1=ri(),Xk=od(),r0=Zt(),J0=r0.strTranslate,i0e=ci().extendFlat,bB=z0(),K0=li(),k_=_a(),upt=Qy(),cpt=Ms(),fpt=yh().flipScale,hpt=Y4(),dpt=bk(),vpt=Wf(),_B=qc(),r0e=_B.LINE_SPACING,n0e=_B.FROM_TL,a0e=_B.FROM_BR,fu=e0e().cn;function ppt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+fu.colorbar).data(gpt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(fu.colorbar,!0),r.each(function(n){var a=gm.select(this);r0.ensureSingle(a,"rect",fu.cbbg),r0.ensureSingle(a,"g",fu.cbfills),r0.ensureSingle(a,"g",fu.cblines),r0.ensureSingle(a,"g",fu.cbaxis,function(o){o.classed(fu.crisp,!0)}),r0.ensureSingle(a,"g",fu.cbtitleunshift,function(o){o.append("g").classed(fu.cbtitle,!0)}),r0.ensureSingle(a,"rect",fu.cboutline);var i=mpt(a,n,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&ypt(a,n,e)}),r.exit().each(function(n){Zk.autoMargin(e,n._id)}).remove(),r.order()}function gpt(e){var t=e._fullLayout,r=e.calcdata,n=[],a,i,o,s;function l(M){return i0e(M,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,a):(a._fillgradient=i.reversescale?fpt(i.colorscale):i.colorscale,a._zrange=[i[s.min],i[s.max]])}for(var c=0;c1){var Pe=Math.pow(10,Math.floor(Math.log(ye)/Math.LN10));we*=Pe*r0.roundUp(ye/Pe,[2,5,10]),(Math.abs(P.start)/P.size+1e-6)%1<2e-6&&(ce.tick0=0)}ce.dtick=we}ce.domain=n?[j+d/w.h,j+B-d/w.h]:[j+v/w.w,j+B-v/w.w],ce.setScale(),e.attr("transform",J0(Math.round(w.l),Math.round(w.t)));var le=e.select("."+fu.cbtitleunshift).attr("transform",J0(-Math.round(w.l),-Math.round(w.t))),ze=ce.ticklabelposition,Xe=ce.title.font.size,vt=e.select("."+fu.cbaxis),st,Oe=0,qe=0;function mt(Ue,ge){var Ge={propContainer:ce,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:M._dfltTitle.colorbar,containerGroup:e.select("."+fu.cbtitle)},tt=Ue.charAt(0)==="h"?Ue.slice(1):"h"+Ue;e.selectAll("."+tt+",."+tt+"-math-group").remove(),upt.draw(r,Ue,i0e(Ge,ge||{}))}function lt(){if(n&&oe||!n&&!oe){var Ue,ge;T==="top"&&(Ue=v+w.l+Y*m,ge=d+w.t+X*(1-j-B)+3+Xe*.75),T==="bottom"&&(Ue=v+w.l+Y*m,ge=d+w.t+X*(1-j)-3-Xe*.25),T==="right"&&(ge=d+w.t+X*x+3+Xe*.75,Ue=v+w.l+Y*j),mt(ce._id+"title",{attributes:{x:Ue,y:ge,"text-anchor":n?"start":"middle"}})}}function Ie(){if(n&&!oe||!n&&oe){var Ue=ce.position||0,ge=ce._offset+ce._length/2,Ge,tt;if(T==="right")tt=ge,Ge=w.l+Y*Ue+10+Xe*(ce.showticklabels?1:.5);else if(Ge=ge,T==="bottom"&&(tt=w.t+X*Ue+10+(ze.indexOf("inside")===-1?ce.tickfont.size:0)+(ce.ticks!=="inside"&&t.ticklen||0)),T==="top"){var ft=S.text.split("
").length;tt=w.t+X*Ue+10-U-r0e*Xe*ft}mt((n?"h":"v")+ce._id+"title",{avoid:{selection:gm.select(r).selectAll("g."+ce._id+"tick"),side:T,offsetTop:n?0:w.t,offsetLeft:n?w.l:0,maxShift:n?M.width:M.height},attributes:{x:Ge,y:tt,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function de(){if(!n&&!oe||n&&oe){var Ue=e.select("."+fu.cbtitle),ge=Ue.select("text"),Ge=[-l/2,l/2],tt=Ue.select(".h"+ce._id+"title-math-group").node(),ft=15.6;ge.node()&&(ft=parseInt(ge.node().style.fontSize,10)*r0e);var He;if(tt?(He=K0.bBox(tt),qe=He.width,Oe=He.height,Oe>ft&&(Ge[1]-=(Oe-ft)/2)):ge.node()&&!ge.classed(fu.jsPlaceholder)&&(He=K0.bBox(ge.node()),qe=He.width,Oe=He.height),n){if(Oe){if(Oe+=5,T==="top")ce.domain[1]-=Oe/w.h,Ge[1]*=-1;else{ce.domain[0]+=Oe/w.h;var Qe=cpt.lineCount(ge);Ge[1]+=(1-Qe)*ft}Ue.attr("transform",J0(Ge[0],Ge[1])),ce.setScale()}}else qe&&(T==="right"&&(ce.domain[0]+=(qe+Xe/2)/w.w),Ue.attr("transform",J0(Ge[0],Ge[1])),ce.setScale())}e.selectAll("."+fu.cbfills+",."+fu.cblines).attr("transform",n?J0(0,Math.round(w.h*(1-ce.domain[1]))):J0(Math.round(w.w*ce.domain[0]),0)),vt.attr("transform",n?J0(0,Math.round(-w.t)):J0(Math.round(-w.l),0));var We=e.select("."+fu.cbfills).selectAll("rect."+fu.cbfill).attr("style","").data(z);We.enter().append("rect").classed(fu.cbfill,!0).attr("style",""),We.exit().remove();var pt=p.map(ce.c2p).map(Math.round).sort(function(tr,lr){return tr-lr});We.each(function(tr,lr){var Ye=[lr===0?p[0]:(z[lr]+z[lr-1])/2,lr===z.length-1?p[1]:(z[lr]+z[lr+1])/2].map(ce.c2p).map(Math.round);n&&(Ye[1]=r0.constrain(Ye[1]+(Ye[1]>Ye[0])?1:-1,pt[0],pt[1]));var Te=gm.select(this).attr(n?"x":"y",te).attr(n?"y":"x",gm.min(Ye)).attr(n?"width":"height",Math.max(U,2)).attr(n?"height":"width",Math.max(gm.max(Ye)-gm.min(Ye),2));if(t._fillgradient)K0.gradient(Te,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var Fe=A(tr).replace("e-","");Te.attr("fill",k_.color(Fe).hex())}});var kt=e.select("."+fu.cblines).selectAll("path."+fu.cbline).data(y.color&&y.width?q:[]);kt.enter().append("path").classed(fu.cbline,!0),kt.exit().remove(),kt.each(function(tr){var lr=te,Ye=Math.round(ce.c2p(tr))+y.width/2%1;gm.select(this).attr("d","M"+(n?lr+","+Ye:Ye+","+lr)+(n?"h":"v")+U).call(K0.lineGroupStyle,y.width,C(tr),y.dash)}),vt.selectAll("g."+ce._id+"tick,path").remove();var qt=te+U+(l||0)/2-(t.ticks==="outside"?1:0),Wt=N1.calcTicks(ce),_r=N1.getTickSigns(ce)[2];return N1.drawTicks(r,ce,{vals:ce.ticks==="inside"?N1.clipEnds(ce,Wt):Wt,layer:vt,path:N1.makeTickPath(ce,qt,_r),transFn:N1.makeTransTickFn(ce)}),N1.drawLabels(r,ce,{vals:Wt,layer:vt,transFn:N1.makeTransTickLabelFn(ce),labelFns:N1.makeLabelFns(ce,qt)})}function Ee(){var Ue,ge=U+l/2;ze.indexOf("inside")===-1&&(Ue=K0.bBox(vt.node()),ge+=n?Ue.width:Ue.height),st=le.select("text");var Ge=0,tt=n&&T==="top",ft=!n&&T==="right",He=0;if(st.node()&&!st.classed(fu.jsPlaceholder)){var Qe,We=le.select(".h"+ce._id+"title-math-group").node();We&&(n&&oe||!n&&!oe)?(Ue=K0.bBox(We),Ge=Ue.width,Qe=Ue.height):(Ue=K0.bBox(le.node()),Ge=Ue.right-w.l-(n?te:fe),Qe=Ue.bottom-w.t-(n?fe:te),!n&&T==="top"&&(ge+=Ue.height,He=Ue.height)),ft&&(st.attr("transform",J0(Ge/2+Xe/2,0)),Ge*=2),ge=Math.max(ge,n?Ge:Qe)}var pt=(n?v:d)*2+ge+u+l/2,kt=0;!n&&S.text&&h==="bottom"&&x<=0&&(kt=pt/2,pt+=kt,He+=kt),M._hColorbarMoveTitle=kt,M._hColorbarMoveCBTitle=He;var qt=u+l,Wt=(n?te:fe)-qt/2-(n?v:0),_r=(n?fe:te)-(n?R:d+He-kt);e.select("."+fu.cbbg).attr("x",Wt).attr("y",_r).attr(n?"width":"height",Math.max(pt-kt,2)).attr(n?"height":"width",Math.max(R+qt,2)).call(k_.fill,c).call(k_.stroke,t.bordercolor).style("stroke-width",u);var tr=ft?Math.max(Ge-10,0):0;e.selectAll("."+fu.cboutline).attr("x",(n?te:fe+v)+tr).attr("y",(n?fe+d-R:te)+(tt?Oe:0)).attr(n?"width":"height",Math.max(U,2)).attr(n?"height":"width",Math.max(R-(n?2*d+Oe:2*v+tr),2)).call(k_.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var lr=n?se*pt:0,Ye=n?0:(1-ue)*pt-He;if(lr=E?w.l-lr:-lr,Ye=g?w.t-Ye:-Ye,e.attr("transform",J0(lr,Ye)),!n&&(u||k_.opacity(c)&&!k_.equals(M.paper_bgcolor,c))){var Te=vt.selectAll("text"),Fe=Te[0].length,Ae=e.select("."+fu.cbbg).node(),Re=K0.bBox(Ae),Ze=K0.getTranslate(e),Ke=2;Te.each(function(zr,vn){var Nn=0,Xn=Fe-1;if(vn===Nn||vn===Xn){var Kn=K0.bBox(this),Qn=K0.getTranslate(this),un;if(vn===Xn){var aa=Kn.right+Qn.x,da=Re.right+Ze.x+fe-u-Ke+m;un=da-aa,un>0&&(un=0)}else if(vn===Nn){var ua=Kn.left+Qn.x,qa=Re.left+Ze.x+fe+u+Ke;un=qa-ua,un<0&&(un=0)}un&&(Fe<3?this.setAttribute("transform","translate("+un+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var _t={},St=n0e[f],Vt=a0e[f],fr=n0e[h],$t=a0e[h],gr=pt-U;n?(i==="pixels"?(_t.y=x,_t.t=R*fr,_t.b=R*$t):(_t.t=_t.b=0,_t.yt=x+a*fr,_t.yb=x-a*$t),s==="pixels"?(_t.x=m,_t.l=pt*St,_t.r=pt*Vt):(_t.l=gr*St,_t.r=gr*Vt,_t.xl=m-o*St,_t.xr=m+o*Vt)):(i==="pixels"?(_t.x=m,_t.l=R*St,_t.r=R*Vt):(_t.l=_t.r=0,_t.xl=m+a*St,_t.xr=m-a*Vt),s==="pixels"?(_t.y=1-x,_t.t=pt*fr,_t.b=pt*$t):(_t.t=gr*fr,_t.b=gr*$t,_t.yt=x-o*fr,_t.yb=x+o*$t));var Br=t.y<.5?"b":"t",Nr=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var Er={r:M.width-Wt-lr,l:Wt+_t.r,b:M.height-_r-Ye,t:_r+_t.b};E&&g?Zk.autoMargin(r,t._id,_t):E?r._fullLayout._reservedMargin[t._id][Br]=Er[Br]:g||n?r._fullLayout._reservedMargin[t._id][Nr]=Er[Nr]:r._fullLayout._reservedMargin[t._id][Br]=Er[Br]}return r0.syncOrAsync([Zk.previousPromises,lt,de,Ie,Zk.previousPromises,Ee],r)}function ypt(e,t,r){var n=t.orientation==="v",a=r._fullLayout,i=a._size,o,s,l;Xk.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),bB(e)},moveFn:function(u,c){e.attr("transform",o+J0(u,c)),s=Xk.align((n?t._uFrac:t._vFrac)+u/i.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=Xk.align((n?t._vFrac:1-t._uFrac)-c/i.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=Xk.getCursor(s,l,t.xanchor,t.yanchor);bB(e,f)},doneFn:function(){if(bB(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?t0e.call("_guiRestyle",r,u,t._traceIndex):t0e.call("_guiRelayout",r,u)}}})}function xpt(e,t,r){var n=t._levels,a=[],i=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";l0e.exports={moduleType:"component",name:"colorbar",attributes:hS(),supplyDefaults:LR(),draw:s0e().draw,hasColorbar:TR()}});var f0e=ne((war,c0e)=>{"use strict";c0e.exports={moduleType:"component",name:"legend",layoutAttributes:TI(),supplyLayoutDefaults:MI(),draw:OI(),style:II()}});var d0e=ne((Tar,h0e)=>{"use strict";h0e.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"}}});var p0e=ne((Aar,v0e)=>{"use strict";v0e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var TB=ne((Mar,x0e)=>{"use strict";var _pt=Fa(),y0e=Zt(),wB=y0e.extendFlat,g0e=y0e.extendDeep;function m0e(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function wpt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}x0e.exports=function(t,r){var n,a=t.data,i=t.layout,o=g0e([],a),s=g0e({},i,m0e(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(n=0;n{"use strict";var Tpt=Vy().EventEmitter,Apt=Fa(),Mpt=Zt(),b0e=z1(),Spt=TB(),Ept=ek(),kpt=tk();function Cpt(e,t){var r=new Tpt,n=Spt(e,{format:"png"}),a=n.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function i(){var s=b0e.getDelay(a._fullLayout);setTimeout(function(){var l=Ept(a),u=document.createElement("canvas");u.id=Mpt.randstr(),r=kpt({format:t.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){a&&document.body.removeChild(a)}},s)}var o=b0e.getRedrawFunc(a);return Apt.call("_doPlot",a,n.data,n.layout,n.config).then(o).then(i).catch(function(s){r.emit("error",s)}),r}_0e.exports=Cpt});var M0e=ne((Ear,A0e)=>{"use strict";var T0e=z1(),Lpt={getDelay:T0e.getDelay,getRedrawFunc:T0e.getRedrawFunc,clone:TB(),toSVG:ek(),svgToImg:tk(),toImage:w0e(),downloadImage:aq()};A0e.exports=Lpt});var E0e=ne(U1=>{"use strict";U1.version=g5().version;D$();Ree();var Fpt=Fa(),iT=U1.register=Fpt.register,MB=Yue(),S0e=Object.keys(MB);for($k=0;$k{"use strict";k0e.exports=E0e()});var Vp=ne((Lar,R0e)=>{"use strict";var Bu=Tu(),L0e=Wl().axisHoverFormat,{hovertemplateAttrs:Ppt,texttemplateAttrs:Dpt,templatefallbackAttrs:F0e}=rs(),D0e=Ys(),Rpt=pl(),P0e=um(),Ipt=xf().pattern,Lx=ci().extendFlat,SB=Rpt({editType:"calc",arrayOk:!0,colorEditType:"style"}),zpt=Bu.marker,qpt=zpt.line,Bpt=Lx({},qpt.width,{dflt:0}),Opt=Lx({width:Bpt,editType:"calc"},D0e("marker.line")),Npt=Lx({line:Opt,editType:"calc"},D0e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:Ipt,cornerradius:{valType:"any",editType:"calc"}});R0e.exports={x:Bu.x,x0:Bu.x0,dx:Bu.dx,y:Bu.y,y0:Bu.y0,dy:Bu.dy,xperiod:Bu.xperiod,yperiod:Bu.yperiod,xperiod0:Bu.xperiod0,yperiod0:Bu.yperiod0,xperiodalignment:Bu.xperiodalignment,yperiodalignment:Bu.yperiodalignment,xhoverformat:L0e("x"),yhoverformat:L0e("y"),text:Bu.text,texttemplate:Dpt({editType:"plot"},{keys:P0e.eventDataKeys}),texttemplatefallback:F0e({editType:"plot"}),hovertext:Bu.hovertext,hovertemplate:Ppt({},{keys:P0e.eventDataKeys}),hovertemplatefallback:F0e(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:Lx({},SB,{}),insidetextfont:Lx({},SB,{}),outsidetextfont:Lx({},SB,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:Lx({},Bu.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:Npt,offsetgroup:Bu.offsetgroup,alignmentgroup:Bu.alignmentgroup,selected:{marker:{opacity:Bu.selected.marker.opacity,color:Bu.selected.marker.color,editType:"style"},textfont:Bu.selected.textfont,editType:"style"},unselected:{marker:{opacity:Bu.unselected.marker.opacity,color:Bu.unselected.marker.color,editType:"style"},textfont:Bu.unselected.textfont,editType:"style"},zorder:Bu.zorder}});var Jk=ne((Far,I0e)=>{"use strict";I0e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}});var Qk=ne((Par,B0e)=>{"use strict";var Upt=_a(),z0e=yh().hasColorscale,q0e=bf(),Vpt=Zt().coercePattern;B0e.exports=function(t,r,n,a,i){var o=n("marker.color",a),s=z0e(t,"marker");s&&q0e(t,r,i,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",Upt.defaultLine),z0e(t,"marker.line")&&q0e(t,r,i,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),Vpt(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var wv=ne((Dar,H0e)=>{"use strict";var O0e=mi(),L_=Zt(),N0e=_a(),Gpt=Fa(),Hpt=yx(),jpt=U0(),Wpt=Qk(),Ypt=xx(),U0e=Vp(),eC=L_.coerceFont;function Xpt(e,t,r,n){function a(u,c){return L_.coerce(e,t,U0e,u,c)}var i=Hpt(e,t,n,a);if(!i){t.visible=!1;return}jpt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("zorder"),a("orientation",t.x&&!t.y?"h":"v"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var o=a("textposition");G0e(e,t,n,a,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),Wpt(e,t,a,r,n);var s=(t.marker.line||{}).color,l=Gpt.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||N0e.defaultLine,{axis:"y"}),l(e,t,s||N0e.defaultLine,{axis:"x",inherit:"y"}),L_.coerceSelectionMarkerOpacity(t,a)}function Zpt(e,t){var r,n;function a(s,l){return L_.coerce(n._input,n,U0e,s,l)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&O0e(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function G0e(e,t,r,n,a,i){i=i||{};var o=i.moduleHasSelected!==!1,s=i.moduleHasUnselected!==!1,l=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,c=i.moduleHasTextangle!==!1,f=i.moduleHasInsideanchor!==!1,h=!!i.hasPathbar,v=Array.isArray(a)||a==="auto",d=v||a==="inside",m=v||a==="outside";if(d||m){var x=eC(n,"textfont",r.font),g=L_.extendFlat({},x),E=e.textfont&&e.textfont.color,M=!E;if(M&&delete g.color,eC(n,"insidetextfont",g),h){var w=L_.extendFlat({},x);M&&delete w.color,eC(n,"pathbar.textfont",w)}m&&eC(n,"outsidetextfont",x),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}d&&f&&n("insidetextanchor")}H0e.exports={supplyDefaults:Xpt,crossTraceDefaults:Zpt,handleText:G0e,validateCornerradius:V0e}});var EB=ne((Rar,j0e)=>{"use strict";var $pt=Fa(),Kpt=ri(),Jpt=Zt(),Qpt=Jk(),e1t=wv().validateCornerradius;j0e.exports=function(e,t,r){function n(m,x){return Jpt.coerce(e,t,Qpt,m,x)}for(var a=!1,i=!1,o=!1,s={},l=n("barmode"),u=l==="group",c=0;c0&&!s[h]&&(o=!0),s[h]=!0),f.visible&&f.type==="histogram"){var v=Kpt.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);v.type!=="category"&&(i=!0)}}if(!a){delete t.barmode;return}l!=="overlay"&&n("barnorm"),n("bargap",i&&!o?0:.2),n("bargroupgap");var d=n("barcornerradius");t.barcornerradius=e1t(d)}});var oT=ne((Iar,W0e)=>{"use strict";var F_=Zt();W0e.exports=function(t,r){for(var n=0;n{"use strict";var Y0e=ri(),X0e=H0(),Z0e=yh().hasColorscale,$0e=qh(),t1t=oT(),r1t=mv();K0e.exports=function(t,r){var n=Y0e.getFromId(t,r.xaxis||"x"),a=Y0e.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(i=n.makeCalcdata(r,"x",f),s=a.makeCalcdata(r,"y"),l=X0e(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=X0e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var h=Math.min(o.length,i.length),v=new Array(h),d=0;d{"use strict";var n1t=Ea(),a1t=Zt();function i1t(e,t,r){var n=e._fullLayout,a=n["_"+r+"Text_minsize"];if(a){var i=n.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=i&&l.hide?0:a/l.fontSize;var u=n1t.select(this).select("text");a1t.setTransormAndDisplay(u,l)}})}}function o1t(e,t,r){if(r.uniformtext.mode){var n=Q0e(e),a=r.uniformtext.minsize,i=t.scale*t.fontSize;t.hide=i{"use strict";var l1t=_a(),u1t=mi(),tpe=Zt().isArrayOrTypedArray;Fx.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};Fx.coerceNumber=function(e,t,r){if(u1t(t)){t=+t;var n=e.min,a=e.max,i=n!==void 0&&ta;if(!i)return t}return r!==void 0?r:e.dflt};Fx.coerceColor=function(e,t,r){return l1t.isValid(t)?t:r!==void 0?r:e.dflt};Fx.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};Fx.getValue=function(e,t){var r;return tpe(e)?t{"use strict";var sT=Ea(),c1t=_a(),lT=li(),rpe=Zt(),npe=Fa(),ape=Uh().resizeText,kB=Vp(),f1t=kB.textfont,h1t=kB.insidetextfont,d1t=kB.outsidetextfont,_h=tC();function v1t(e){var t=sT.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");ape(e,t,"bar");var r=t.size(),n=e._fullLayout;t.style("opacity",function(a){return a[0].trace.opacity}).each(function(a){(n.barmode==="stack"&&r>1||n.bargap===0&&n.bargroupgap===0&&!a[0].trace.marker.line.width)&&sT.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(a){var i=sT.select(this),o=a[0].trace;ipe(i,o,e)}),npe.getComponentMethod("errorbars","style")(t)}function ipe(e,t,r){lT.pointStyle(e.selectAll("path"),t,r),ope(e,t,r)}function ope(e,t,r){e.selectAll("text").each(function(n){var a=sT.select(this),i=rpe.ensureUniformFontSize(r,spe(a,n,t,r));lT.font(a,i)})}function p1t(e,t,r){var n=t[0].trace;n.selectedpoints?g1t(r,n,e):(ipe(r,n,e),npe.getComponentMethod("errorbars","style")(r))}function g1t(e,t,r){lT.selectedPointStyle(e.selectAll("path"),t),m1t(e.selectAll("text"),t,r)}function m1t(e,t,r){e.each(function(n){var a=sT.select(this),i;if(n.selected){i=rpe.ensureUniformFontSize(r,spe(a,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(i.color=o),lT.font(a,i)}else lT.selectedTextStyle(a,t)})}function spe(e,t,r,n){var a=n._fullLayout.font,i=r.textfont;if(e.classed("bartext-inside")){var o=fpe(t,r);i=upe(r,t.i,a,o)}else e.classed("bartext-outside")&&(i=cpe(r,t.i,a));return i}function lpe(e,t,r){return CB(f1t,e.textfont,t,r)}function upe(e,t,r,n){var a=lpe(e,t,r),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return i&&(a={color:c1t.contrast(n),family:a.family,size:a.size,weight:a.weight,style:a.style,variant:a.variant,textcase:a.textcase,lineposition:a.lineposition,shadow:a.shadow}),CB(h1t,e.insidetextfont,t,a)}function cpe(e,t,r){var n=lpe(e,t,r);return CB(d1t,e.outsidetextfont,t,n)}function CB(e,t,r,n){t=t||{};var a=_h.getValue(t.family,r),i=_h.getValue(t.size,r),o=_h.getValue(t.color,r),s=_h.getValue(t.weight,r),l=_h.getValue(t.style,r),u=_h.getValue(t.variant,r),c=_h.getValue(t.textcase,r),f=_h.getValue(t.lineposition,r),h=_h.getValue(t.shadow,r);return{family:_h.coerceString(e.family,a,n.family),size:_h.coerceNumber(e.size,i,n.size),color:_h.coerceColor(e.color,o,n.color),weight:_h.coerceString(e.weight,s,n.weight),style:_h.coerceString(e.style,l,n.style),variant:_h.coerceString(e.variant,u,n.variant),textcase:_h.coerceString(e.variant,c,n.textcase),lineposition:_h.coerceString(e.variant,f,n.lineposition),shadow:_h.coerceString(e.variant,h,n.shadow)}}function fpe(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}hpe.exports={style:v1t,styleTextPoints:ope,styleOnSelect:p1t,getInsideTextFont:upe,getOutsideTextFont:cpe,getBarColor:fpe,resizeText:ape}});var Dx=ne((Nar,bpe)=>{"use strict";var rC=Ea(),nC=mi(),Xf=Zt(),y1t=Ms(),x1t=_a(),mm=li(),b1t=Fa(),aC=ri().tickText,dpe=Uh(),_1t=dpe.recordMinTextSize,w1t=dpe.clearMinTextSize,LB=n0(),P_=tC(),T1t=um(),vpe=Vp(),A1t=vpe.text,M1t=vpe.textposition,S1t=Hd().appendArrayPointValue,hd=T1t.TEXTPAD;function E1t(e){return e.id}function k1t(e){if(e.ids)return E1t}function FB(e){return(e>0)-(e<0)}function Gp(e,t){return e0}function L1t(e,t,r,n,a,i){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;a||(a={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},w1t("bar",l));var c=Xf.makeTraceGroups(n,r,"trace bars").each(function(f){var h=rC.select(this),v=f[0].trace,d=f[0].t,m=v.type==="waterfall",x=v.type==="funnel",g=v.type==="histogram",E=v.type==="bar",M=E||x,w=0;m&&v.connector.visible&&v.connector.mode==="between"&&(w=v.connector.line.width/2);var k=v.orientation==="h",y=gpe(a),S=Xf.ensureSingle(h,"g","points"),T=k1t(v),p=S.selectAll("g.point").data(Xf.identity,T);p.enter().append("g").classed("point",!0),p.exit().remove(),p.each(function(A,P){var D=rC.select(this),z=C1t(A,o,s,k),q=z[0][0],U=z[0][1],O=z[1][0],R=z[1][1],B=(k?U-q:R-O)===0;B&&M&&P_.getLineWidth(v,A)&&(B=!1),B||(B=!nC(q)||!nC(U)||!nC(O)||!nC(R)),A.isBlank=B,B&&(k?U=q:R=O),w&&!B&&(k?(q-=Gp(q,U)*w,U+=Gp(q,U)*w):(O-=Gp(O,R)*w,R+=Gp(O,R)*w));var Y,X;if(v.type==="waterfall"){if(!B){var te=v[A.dir].marker;Y=te.line.width,X=te.color}}else Y=P_.getLineWidth(v,A),X=A.mc||v.marker.color;function se(ge){var Ge=rC.round(Y/2%1,2);return a.gap===0&&a.groupgap===0?rC.round(Math.round(ge)-Ge,2):ge}function ue(ge,Ge,tt){return tt&&ge===Ge?ge:Math.abs(ge-Ge)>=2?se(ge):ge>Ge?Math.ceil(ge):Math.floor(ge)}var re=x1t.opacity(X),j=re<1||Y>.01?se:ue;e._context.staticPlot||(q=j(q,U,k),U=j(U,q,k),O=j(O,R,!k),R=j(R,O,!k));var fe=k?o.c2p:s.c2p,ce;A.s0>0?ce=A._sMax:A.s0<0?ce=A._sMin:ce=A.s1>0?A._sMax:A._sMin;function oe(ge,Ge){if(!ge)return 0;var tt=Math.abs(k?R-O:U-q),ft=Math.abs(k?U-q:R-O),He=j(Math.abs(fe(ce,!0)-fe(0,!0))),Qe=A.hasB?Math.min(tt/2,ft/2):Math.min(tt/2,He),We;if(Ge==="%"){var pt=Math.min(50,ge);We=tt*(pt/100)}else We=ge;return j(Math.max(Math.min(We,Qe),0))}var we=E||g?oe(d.cornerradiusvalue,d.cornerradiusform):0,he,ye,Pe="M"+q+","+O+"V"+R+"H"+U+"V"+O+"Z",le=0;if(we&&A.s){var ze=FB(A.s0)===0||FB(A.s)===FB(A.s0)?A.s1:A.s0;if(le=j(A.hasB?0:Math.abs(fe(ce,!0)-fe(ze,!0))),le0?Math.sqrt(le*(2*we-le)):0,mt=Xe>0?Math.max:Math.min;he="M"+q+","+O+"V"+(R-Oe*vt)+"H"+mt(U-(we-le)*Xe,q)+"A "+we+","+we+" 0 0 "+st+" "+U+","+(R-we*vt-qe)+"V"+(O+we*vt+qe)+"A "+we+","+we+" 0 0 "+st+" "+mt(U-(we-le)*Xe,q)+","+(O+Oe*vt)+"Z"}else if(A.hasB)he="M"+(q+we*Xe)+","+O+"A "+we+","+we+" 0 0 "+st+" "+q+","+(O+we*vt)+"V"+(R-we*vt)+"A "+we+","+we+" 0 0 "+st+" "+(q+we*Xe)+","+R+"H"+(U-we*Xe)+"A "+we+","+we+" 0 0 "+st+" "+U+","+(R-we*vt)+"V"+(O+we*vt)+"A "+we+","+we+" 0 0 "+st+" "+(U-we*Xe)+","+O+"Z";else{ye=Math.abs(R-O)+le;var lt=ye0?Math.sqrt(le*(2*we-le)):0,de=vt>0?Math.max:Math.min;he="M"+(q+lt*Xe)+","+O+"V"+de(R-(we-le)*vt,O)+"A "+we+","+we+" 0 0 "+st+" "+(q+we*Xe-Ie)+","+R+"H"+(U-we*Xe+Ie)+"A "+we+","+we+" 0 0 "+st+" "+(U-lt*Xe)+","+de(R-(we-le)*vt,O)+"V"+O+"Z"}}else he=Pe}else he=Pe;var Ee=ppe(Xf.ensureSingle(D,"path"),l,a,i);if(Ee.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((U-q)*(R-O))||B&&e._context.staticPlot?"M0,0Z":he).call(mm.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&y){var Ue=mm.makePointStyleFns(v);mm.singlePointStyle(A,Ee,v,Ue,e)}F1t(e,t,D,f,P,q,U,O,R,we,le,a,i),t.layerClipId&&mm.hideOutsideRangePoint(A,D.select("text"),o,s,v.xcalendar,v.ycalendar)});var C=v.cliponaxis===!1;mm.setClipUrl(h,C?null:t.layerClipId,e)});b1t.getComponentMethod("errorbars","plot")(e,c,t,a)}function F1t(e,t,r,n,a,i,o,s,l,u,c,f,h){var v=t.xaxis,d=t.yaxis,m=e._fullLayout,x;function g(ye,Pe,le){var ze=Xf.ensureSingle(ye,"text").text(Pe).attr({class:"bartext bartext-"+x,"text-anchor":"middle","data-notex":1}).call(mm.font,le).call(y1t.convertToTspans,e);return ze}var E=n[0].trace,M=E.orientation==="h",w=R1t(m,n,a,v,d);x=I1t(E,a);var k=f.mode==="stack"||f.mode==="relative",y=n[a],S=!k||y._outmost,T=y.hasB,p=u&&u-c>hd;if(!w||x==="none"||(y.isBlank||i===o||s===l)&&(x==="auto"||x==="inside")){r.select("text").remove();return}var C=m.font,A=LB.getBarColor(n[a],E),P=LB.getInsideTextFont(E,a,C,A),D=LB.getOutsideTextFont(E,a,C),z=E.insidetextanchor||"end",q=r.datum();M?v.type==="log"&&q.s0<=0&&(v.range[0]0&&se>0,j;p?T?j=Px(R-2*u,B,te,se,M)||Px(R,B-2*u,te,se,M):M?j=Px(R-(u-c),B,te,se,M)||Px(R,B-2*(u-c),te,se,M):j=Px(R,B-(u-c),te,se,M)||Px(R-2*(u-c),B,te,se,M):j=Px(R,B,te,se,M),re&&j?x="inside":(x="outside",Y.remove(),Y=null)}else x="inside";if(!Y){ue=Xf.ensureUniformFontSize(e,x==="outside"?D:P),Y=g(r,w,ue);var fe=Y.attr("transform");if(Y.attr("transform",""),X=mm.bBox(Y.node()),te=X.width,se=X.height,Y.attr("transform",fe),te<=0||se<=0){Y.remove();return}}var ce=E.textangle,oe,we;x==="outside"?(we=E.constraintext==="both"||E.constraintext==="outside",oe=D1t(i,o,s,l,X,{isHorizontal:M,constrained:we,angle:ce})):(we=E.constraintext==="both"||E.constraintext==="inside",oe=xpe(i,o,s,l,X,{isHorizontal:M,constrained:we,angle:ce,anchor:z,hasB:T,r:u,overhead:c})),oe.fontSize=ue.size,_1t(E.type==="histogram"?"bar":E.type,oe,m),y.transform=oe;var he=ppe(Y,m,f,h);Xf.setTransormAndDisplay(he,oe)}function Px(e,t,r,n,a){if(e<0||t<0)return!1;var i=r<=e&&n<=t,o=r<=t&&n<=e,s=a?e>=r*(t/n):t>=n*(e/r);return i||o||s}function mpe(e){return e==="auto"?0:e}function ype(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function xpe(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=i.anchor,c=u==="end",f=u==="start",h=i.leftToRight||0,v=(h+1)/2,d=1-v,m=i.hasB,x=i.r,g=i.overhead,E=a.width,M=a.height,w=Math.abs(t-e),k=Math.abs(n-r),y=w>2*hd&&k>2*hd?hd:0;w-=2*y,k-=2*y;var S=mpe(l);l==="auto"&&!(E<=w&&M<=k)&&(E>w||M>k)&&(!(E>k||M>w)||Ehd){var A=P1t(e,t,r,n,T,x,g,o,m);p=A.scale,C=A.pad}else p=1,s&&(p=Math.min(1,w/T.x,k/T.y)),C=0;var P=a.left*d+a.right*v,D=(a.top+a.bottom)/2,z=(e+hd)*d+(t-hd)*v,q=(r+n)/2,U=0,O=0;if(f||c){var R=(o?T.x:T.y)/2;x&&(c||m)&&(y+=C);var B=o?Gp(e,t):Gp(r,n);o?f?(z=e+B*y,U=-B*R):(z=t-B*y,U=B*R):f?(q=r+B*y,O=-B*R):(q=n-B*y,O=B*R)}return{textX:P,textY:D,targetX:z,targetY:q,anchorX:U,anchorY:O,scale:p,rotate:S}}function P1t(e,t,r,n,a,i,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*hd),c=Math.max(0,Math.abs(n-r)-2*hd),f=i-hd,h=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,v=l?f*2:s?f-o:2*h,d=l?f*2:s?2*h:f-o,m,x,g,E,M;return a.y/a.x>=c/(u-v)?E=c/a.y:a.y/a.x<=(c-d)/u?E=u/a.x:!l&&s?(m=a.x*a.x+a.y*a.y/4,x=-2*a.x*(u-f)-a.y*(c/2-f),g=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,E=(-x+Math.sqrt(x*x-4*m*g))/(2*m)):l?(m=(a.x*a.x+a.y*a.y)/4,x=-a.x*(u/2-f)-a.y*(c/2-f),g=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,E=(-x+Math.sqrt(x*x-4*m*g))/(2*m)):(m=a.x*a.x/4+a.y*a.y,x=-a.x*(u/2-f)-2*a.y*(c-f),g=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,E=(-x+Math.sqrt(x*x-4*m*g))/(2*m)),E=Math.min(1,E),s?M=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-a.y*E)/2)*(f-(c-a.y*E)/2)))-o):M=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-a.x*E)/2)*(f-(u-a.x*E)/2)))-o),{scale:E,pad:M}}function D1t(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=a.width,c=a.height,f=Math.abs(t-e),h=Math.abs(n-r),v;o?v=h>2*hd?hd:0:v=f>2*hd?hd:0;var d=1;s&&(d=o?Math.min(1,h/c):Math.min(1,f/u));var m=mpe(l),x=ype(a,m),g=(o?x.x:x.y)/2,E=(a.left+a.right)/2,M=(a.top+a.bottom)/2,w=(e+t)/2,k=(r+n)/2,y=0,S=0,T=o?Gp(t,e):Gp(r,n);return o?(w=t-T*v,y=T*g):(k=n+T*v,S=-T*g),{textX:E,textY:M,targetX:w,targetY:k,anchorX:y,anchorY:S,scale:d,rotate:m}}function R1t(e,t,r,n,a){var i=t[0].trace,o=i.texttemplate,s;return o?s=z1t(e,t,r,n,a):i.textinfo?s=q1t(t,r,n,a):s=P_.getValue(i.text,r),P_.coerceString(A1t,s)}function I1t(e,t){var r=P_.getValue(e.textposition,t);return P_.coerceEnumerated(M1t,r)}function z1t(e,t,r,n,a){var i=t[0].trace,o=Xf.castOption(i,r,"texttemplate");if(!o)return"";var s=i.type==="histogram",l=i.type==="waterfall",u=i.type==="funnel",c=i.orientation==="h",f,h,v,d;c?(f="y",h=a,v="x",d=n):(f="x",h=n,v="y",d=a);function m(y){return aC(h,h.c2l(y),!0).text}function x(y){return aC(d,d.c2l(y),!0).text}var g=t[r],E={};E.label=g.p,E.labelLabel=E[f+"Label"]=m(g.p);var M=Xf.castOption(i,g.i,"text");(M===0||M)&&(E.text=M),E.value=g.s,E.valueLabel=E[v+"Label"]=x(g.s);var w={};S1t(w,i,g.i),(s||w.x===void 0)&&(w.x=c?E.value:E.label),(s||w.y===void 0)&&(w.y=c?E.label:E.value),(s||w.xLabel===void 0)&&(w.xLabel=c?E.valueLabel:E.labelLabel),(s||w.yLabel===void 0)&&(w.yLabel=c?E.labelLabel:E.valueLabel),l&&(E.delta=+g.rawS||g.s,E.deltaLabel=x(E.delta),E.final=g.v,E.finalLabel=x(E.final),E.initial=E.final-E.delta,E.initialLabel=x(E.initial)),u&&(E.value=g.s,E.valueLabel=x(E.value),E.percentInitial=g.begR,E.percentInitialLabel=Xf.formatPercent(g.begR),E.percentPrevious=g.difR,E.percentPreviousLabel=Xf.formatPercent(g.difR),E.percentTotal=g.sumR,E.percenTotalLabel=Xf.formatPercent(g.sumR));var k=Xf.castOption(i,g.i,"customdata");return k&&(E.customdata=k),Xf.texttemplateString({data:[w,E,i._meta],fallback:i.texttemplatefallback,labels:E,locale:e._d3locale,template:o})}function q1t(e,t,r,n){var a=e[0].trace,i=a.orientation==="h",o=a.type==="waterfall",s=a.type==="funnel";function l(k){var y=i?n:r;return aC(y,k,!0).text}function u(k){var y=i?r:n;return aC(y,+k,!0).text}var c=a.textinfo,f=e[t],h=c.split("+"),v=[],d,m=function(k){return h.indexOf(k)!==-1};if(m("label")&&v.push(l(e[t].p)),m("text")&&(d=Xf.castOption(a,f.i,"text"),(d===0||d)&&v.push(d)),o){var x=+f.rawS||f.s,g=f.v,E=g-x;m("initial")&&v.push(u(E)),m("delta")&&v.push(u(x)),m("final")&&v.push(u(g))}if(s){m("value")&&v.push(u(f.s));var M=0;m("percent initial")&&M++,m("percent previous")&&M++,m("percent total")&&M++;var w=M>1;m("percent initial")&&(d=Xf.formatPercent(f.begR),w&&(d+=" of initial"),v.push(d)),m("percent previous")&&(d=Xf.formatPercent(f.difR),w&&(d+=" of previous"),v.push(d)),m("percent total")&&(d=Xf.formatPercent(f.sumR),w&&(d+=" of total"),v.push(d))}return v.join("
")}bpe.exports={plot:L1t,toMoveInsideBar:xpe}});var D_=ne((Uar,Ape)=>{"use strict";var uT=cu(),B1t=Fa(),_pe=_a(),O1t=Zt().fillText,N1t=tC().getLineWidth,PB=ri().hoverLabelText,U1t=uo().BADNUM;function V1t(e,t,r,n,a){var i=wpe(e,t,r,n,a);if(i){var o=i.cd,s=o[0].trace,l=o[i.index];return i.color=Tpe(s,l),B1t.getComponentMethod("errorbars","hoverInfo")(l,s,i),[i]}}function wpe(e,t,r,n,a){var i=e.cd,o=i[0].trace,s=i[0].t,l=n==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,h,v,d,m,x,g,E;o.orientation==="h"?(h=r,v=t,d="y",m="x",x=q,g=P):(h=t,v=r,d="x",m="y",g=q,x=P);var M=o[d+"period"],w=l||M;function k(j){return S(j,-1)}function y(j){return S(j,1)}function S(j,fe){var ce=j.w;return j[d]+fe*ce/2}function T(j){return j[d+"End"]-j[d+"Start"]}var p=l?k:M?function(j){return j.p-T(j)/2}:function(j){return Math.min(k(j),j.p-s.bardelta/2)},C=l?y:M?function(j){return j.p+T(j)/2}:function(j){return Math.max(y(j),j.p+s.bardelta/2)};function A(j,fe,ce){return a.finiteRange&&(ce=0),uT.inbox(j-h,fe-h,ce+Math.min(1,Math.abs(fe-j)/E)-1)}function P(j){return A(p(j),C(j),c)}function D(j){return A(k(j),y(j),f)}function z(j){var fe=j[m];if(u){var ce=Math.abs(j.rawS)||0;v>0?fe+=ce:v<0&&(fe-=ce)}return fe}function q(j){var fe=v,ce=j.b,oe=z(j);return uT.inbox(ce-fe,oe-fe,c+(oe-fe)/(oe-ce)-1)}function U(j){var fe=v,ce=j.b,oe=z(j);return uT.inbox(ce-fe,oe-fe,f+(oe-fe)/(oe-ce)-1)}var O=e[d+"a"],R=e[m+"a"];E=Math.abs(O.r2c(O.range[1])-O.r2c(O.range[0]));function B(j){return(x(j)+g(j))/2}var Y=uT.getDistanceFunction(n,x,g,B);if(uT.getClosest(i,Y,e),e.index!==!1&&i[e.index].p!==U1t){w||(p=function(j){return Math.min(k(j),j.p-s.bargroupwidth/2)},C=function(j){return Math.max(y(j),j.p+s.bargroupwidth/2)});var X=e.index,te=i[X],se=o.base?te.b+te.s:te.s;e[m+"0"]=e[m+"1"]=R.c2p(te[m],!0),e[m+"LabelVal"]=se;var ue=s.extents[s.extents.round(te.p)];e[d+"0"]=O.c2p(l?p(te):ue[0],!0),e[d+"1"]=O.c2p(l?C(te):ue[1],!0);var re=te.orig_p!==void 0;return e[d+"LabelVal"]=re?te.orig_p:te.p,e.labelLabel=PB(O,e[d+"LabelVal"],o[d+"hoverformat"]),e.valueLabel=PB(R,e[m+"LabelVal"],o[m+"hoverformat"]),e.baseLabel=PB(R,te.b,o[m+"hoverformat"]),e.spikeDistance=(U(te)+D(te))/2,e[d+"Spike"]=O.c2p(te.p,!0),O1t(te,o,e),e.hovertemplate=o.hovertemplate,e}}function Tpe(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=N1t(e,t);if(_pe.opacity(r))return r;if(_pe.opacity(n)&&a)return n}Ape.exports={hoverPoints:V1t,hoverOnBars:wpe,getTraceColor:Tpe}});var Spe=ne((Var,Mpe)=>{"use strict";Mpe.exports=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var R_=ne((Gar,Epe)=>{"use strict";Epe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=n[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";kpe.exports={attributes:Vp(),layoutAttributes:Jk(),supplyDefaults:wv().supplyDefaults,crossTraceDefaults:wv().crossTraceDefaults,supplyLayoutDefaults:EB(),calc:J0e(),crossTraceCalc:bx().crossTraceCalc,colorbar:bh(),arraysToCalcdata:oT(),plot:Dx().plot,style:n0().style,styleOnSelect:n0().styleOnSelect,hoverPoints:D_().hoverPoints,eventData:Spe(),selectPoints:R_(),moduleType:"trace",name:"bar",basePlotModule:Ku(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var Fpe=ne((jar,Lpe)=>{"use strict";Lpe.exports=Cpe()});var cT=ne((War,Ipe)=>{"use strict";var H1t=zp(),a0=Tu(),Ppe=Vp(),j1t=Ic(),Dpe=Wl().axisHoverFormat,{hovertemplateAttrs:W1t,templatefallbackAttrs:Y1t}=rs(),V1=ci().extendFlat,I_=a0.marker,Rpe=I_.line;Ipe.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:a0.xperiod,yperiod:a0.yperiod,xperiod0:a0.xperiod0,yperiod0:a0.yperiod0,xperiodalignment:a0.xperiodalignment,yperiodalignment:a0.yperiodalignment,xhoverformat:Dpe("x"),yhoverformat:Dpe("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:V1({},I_.symbol,{arrayOk:!1,editType:"plot"}),opacity:V1({},I_.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:V1({},I_.angle,{arrayOk:!1,editType:"calc"}),size:V1({},I_.size,{arrayOk:!1,editType:"calc"}),color:V1({},I_.color,{arrayOk:!1,editType:"style"}),line:{color:V1({},Rpe.color,{arrayOk:!1,dflt:j1t.defaultLine,editType:"style"}),width:V1({},Rpe.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:H1t(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:Ppe.offsetgroup,alignmentgroup:Ppe.alignmentgroup,selected:{marker:a0.selected.marker,editType:"style"},unselected:{marker:a0.unselected.marker,editType:"style"},text:V1({},a0.text,{}),hovertext:V1({},a0.hovertext,{}),hovertemplate:W1t({}),hovertemplatefallback:Y1t(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:a0.zorder}});var fT=ne((Yar,zpe)=>{"use strict";zpe.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var dT=ne((Xar,Npe)=>{"use strict";var i0=Zt(),X1t=Fa(),Z1t=_a(),$1t=U0(),K1t=xx(),qpe=Wb(),hT=cT();function J1t(e,t,r,n){function a(d,m){return i0.coerce(e,t,hT,d,m)}if(Bpe(e,t,a,n),t.visible!==!1){$1t(e,t,n,a),a("xhoverformat"),a("yhoverformat");var i=t._hasPreCompStats;i&&(a("lowerfence"),a("upperfence")),a("line.color",(e.marker||{}).color||r),a("line.width"),a("fillcolor",Z1t.addOpacity(t.line.color,.5));var o=!1;if(i){var s=a("mean"),l=a("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}a("whiskerwidth");var u=a("sizemode"),c;u==="quartiles"&&(c=a("boxmean",o)),a("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&a("sdmultiple"),a("width"),a("quartilemethod");var f=!1;if(i){var h=a("notchspan");h&&h.length&&(f=!0)}else i0.validate(e.notchwidth,hT.notchwidth)&&(f=!0);var v=a("notched",f);v&&a("notchwidth"),Ope(e,t,a,{prefix:"box"}),a("zorder")}}function Bpe(e,t,r,n){function a(C){var A=0;return C&&C.length&&(A+=1,i0.isArrayOrTypedArray(C[0])&&C[0].length&&(A+=1)),A}function i(C){return i0.validate(e[C],hT[C])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(i0.minRowLength(u),i0.minRowLength(c),i0.minRowLength(f))}else t._hasPreCompStats=!1;var h=a(o),v=a(s),d=h&&i0.minRowLength(o),m=v&&i0.minRowLength(s),x=n.calendar,g={autotypenumbers:n.autotypenumbers},E,M;if(t._hasPreCompStats)switch(String(v)+String(h)){case"00":var w=i("x0")||i("dx"),k=i("y0")||i("dy");k&&!w?E="h":E="v",M=l;break;case"10":E="v",M=Math.min(l,m);break;case"20":E="h",M=Math.min(l,s.length);break;case"01":E="h",M=Math.min(l,d);break;case"02":E="v",M=Math.min(l,o.length);break;case"12":E="v",M=Math.min(l,m,o.length);break;case"21":E="h",M=Math.min(l,s.length,d);break;case"11":M=0;break;case"22":var y=!1,S;for(S=0;S0?(E="v",v>0?M=Math.min(m,d):M=Math.min(d)):v>0?(E="h",M=Math.min(m)):M=0;if(!M){t.visible=!1;return}t._length=M;var T=r("orientation",E);t._hasPreCompStats?T==="v"&&v===0?(r("x0",0),r("dx",1)):T==="h"&&h===0&&(r("y0",0),r("dy",1)):T==="v"&&v===0?r("x0"):T==="h"&&h===0&&r("y0");var p=X1t.getComponentMethod("calendars","handleTraceDefaults");p(e,t,["x","y"],n)}function Ope(e,t,r,n){var a=n.prefix,i=i0.coerce2(e,t,hT,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(i||o)&&(s="suspectedoutliers");var l=r(a+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),i0.coerceSelectionMarkerOpacity(t,r)}function Q1t(e,t){var r,n;function a(l){return i0.coerce(n._input,n,hT,l)}for(var i=0;i{"use strict";var egt=Fa(),tgt=Zt(),rgt=fT();function Upe(e,t,r,n,a){for(var i=a+"Layout",o=!1,s=0;s{"use strict";var RB=mi(),oC=ri(),agt=H0(),pc=Zt(),Tv=uo().BADNUM,G1=pc._;Kpe.exports=function(t,r){var n=t._fullLayout,a=oC.getFromId(t,r.xaxis||"x"),i=oC.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,h,v,d;r.orientation==="h"?(c=a,f="x",h=i,v="y",d=!!r.yperiodalignment):(c=i,f="y",h=a,v="x",d=!!r.xperiodalignment);var m=igt(r,v,h,n[s]),x=m[0],g=m[1],E=pc.distinctVals(x,h),M=E.vals,w=E.minDiff/2,k,y,S,T,p,C,A=(r.boxpoints||r.points)==="all"?pc.identity:function(st){return st.vk.uf};if(r._hasPreCompStats){var P=r[f],D=function(st){return c.d2c((r[st]||[])[l])},z=1/0,q=-1/0;for(l=0;l=k.q1&&k.q3>=k.med){var O=D("lowerfence");k.lf=O!==Tv&&O<=k.q1?O:Wpe(k,S,T);var R=D("upperfence");k.uf=R!==Tv&&R>=k.q3?R:Ype(k,S,T);var B=D("mean");k.mean=B!==Tv?B:T?pc.mean(S,T):(k.q1+k.q3)/2;var Y=D("sd");k.sd=B!==Tv&&Y>=0?Y:T?pc.stdev(S,T,k.mean):k.q3-k.q1,k.lo=Xpe(k),k.uo=Zpe(k);var X=D("notchspan");X=X!==Tv&&X>0?X:$pe(k,T),k.ln=k.med-X,k.un=k.med+X;var te=k.lf,se=k.uf;r.boxpoints&&S.length&&(te=Math.min(te,S[0]),se=Math.max(se,S[T-1])),r.notched&&(te=Math.min(te,k.ln),se=Math.max(se,k.un)),k.min=te,k.max=se}else{pc.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+k.q1,"median = "+k.med,"q3 = "+k.q3].join(` -`));var ue;k.med!==Tv?ue=k.med:k.q1!==Tv?k.q3!==Tv?ue=(k.q1+k.q3)/2:ue=k.q1:k.q3!==Tv?ue=k.q3:ue=0,k.med=ue,k.q1=k.q3=ue,k.lf=k.uf=ue,k.mean=k.sd=ue,k.ln=k.un=ue,k.min=k.max=ue}z=Math.min(z,k.min),q=Math.max(q,k.max),k.pts2=y.filter(A),o.push(k)}}r._extremes[c._id]=oC.findExtremes(c,[z,q],{padded:!0})}else{var re=c.makeCalcdata(r,f),j=ogt(M,w),fe=M.length,ce=sgt(fe);for(l=0;l=0&&oe0){if(k={},k.pos=k[v]=M[l],y=k.pts=ce[l].sort(Hpe),S=k[f]=y.map(jpe),T=S.length,k.min=S[0],k.max=S[T-1],k.mean=pc.mean(S,T),k.sd=pc.stdev(S,T,k.mean)*r.sdmultiple,k.med=pc.interp(S,.5),T%2&&(Pe||le)){var ze,Xe;Pe?(ze=S.slice(0,T/2),Xe=S.slice(T/2+1)):le&&(ze=S.slice(0,T/2+1),Xe=S.slice(T/2)),k.q1=pc.interp(ze,.5),k.q3=pc.interp(Xe,.5)}else k.q1=pc.interp(S,.25),k.q3=pc.interp(S,.75);k.lf=Wpe(k,S,T),k.uf=Ype(k,S,T),k.lo=Xpe(k),k.uo=Zpe(k);var vt=$pe(k,T);k.ln=k.med-vt,k.un=k.med+vt,we=Math.min(we,k.ln),he=Math.max(he,k.un),k.pts2=y.filter(A),o.push(k)}r.notched&&pc.isTypedArray(re)&&(re=Array.from(re)),r._extremes[c._id]=oC.findExtremes(c,r.notched?re.concat([we,he]):re,{padded:!0})}return lgt(o,r),o.length>0?(o[0].t={num:n[s],dPos:w,posLetter:v,valLetter:f,labels:{med:G1(t,"median:"),min:G1(t,"min:"),q1:G1(t,"q1:"),q3:G1(t,"q3:"),max:G1(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?G1(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):G1(t,"mean:"),lf:G1(t,"lower fence:"),uf:G1(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function igt(e,t,r,n){var a=t in e,i=t+"0"in e,o="d"+t in e;if(a||i&&o){var s=r.makeCalcdata(e,t),l=agt(e,r,t,s).vals;return[l,s]}var u;i?u=e[t+"0"]:"name"in e&&(r.type==="category"||RB(e.name)&&["linear","log"].indexOf(r.type)!==-1||pc.isDateTime(e.name)&&r.type==="date")?u=e.name:u=n;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,h=new Array(f),v=0;v{"use strict";var Jpe=ri(),ugt=Zt(),cgt=vx().getAxisGroup,Qpe=["v","h"];function fgt(e,t){for(var r=e.calcdata,n=t.xaxis,a=t.yaxis,i=0;i1,E=1-i[e+"gap"],M=1-i[e+"groupgap"];for(l=0;l0;if(S==="positive"?(R=T*(y?1:.5),X=Y,B=X=C):S==="negative"?(R=X=C,B=T*(y?1:.5),te=Y):(R=B=T,X=te=Y),ce){var oe=w.pointpos,we=w.jitter,he=w.marker.size/2,ye=0;oe+we>=0&&(ye=Y*(oe+we),ye>R?(fe=!0,re=he,se=ye):ye>X&&(re=he,se=R)),ye<=R&&(se=R);var Pe=0;oe-we<=0&&(Pe=-Y*(oe-we),Pe>B?(fe=!0,j=he,ue=Pe):Pe>te&&(j=he,ue=B)),Pe<=B&&(ue=B)}else se=R,ue=B;var le=new Array(c.length);for(u=0;u{"use strict";var z_=Ea(),Rx=Zt(),hgt=li(),r1e=5,dgt=.01;function vgt(e,t,r,n){var a=e._context.staticPlot,i=t.xaxis,o=t.yaxis;Rx.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=z_.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var h,v;f.orientation==="h"?(h=o,v=i):(h=i,v=o),n1e(l,{pos:h,val:v},f,c,a),a1e(l,{x:i,y:o},f,c),i1e(l,{pos:h,val:v},f,c)})}function n1e(e,t,r,n,a){var i=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,h=r.whiskerwidth||0,v=r.showwhiskers!==!1,d=r.notched||!1,m=d?1-2*r.notchwidth:1,x,g;Array.isArray(n.bdPos)?(x=n.bdPos[0],g=n.bdPos[1]):(x=n.bdPos,g=n.bdPos);var E=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?Rx.identity:[]);E.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","box"),E.exit().remove(),E.each(function(M){if(M.empty)return z_.select(this).attr("d","M0,0Z");var w=s.c2l(M.pos+u,!0),k=s.l2p(w-x)+f,y=s.l2p(w+g)+f,S=l?(k+y)/2:s.l2p(w)+f,T=r.whiskerwidth,p=l?k*T+(1-T)*S:s.l2p(w-c)+f,C=l?y*T+(1-T)*S:s.l2p(w+c)+f,A=s.l2p(w-x*m)+f,P=s.l2p(w+g*m)+f,D=r.sizemode==="sd",z=o.c2p(D?M.mean-M.sd:M.q1,!0),q=D?o.c2p(M.mean+M.sd,!0):o.c2p(M.q3,!0),U=Rx.constrain(D?o.c2p(M.mean,!0):o.c2p(M.med,!0),Math.min(z,q)+1,Math.max(z,q)-1),O=M.lf===void 0||r.boxpoints===!1||D,R=o.c2p(O?M.min:M.lf,!0),B=o.c2p(O?M.max:M.uf,!0),Y=o.c2p(M.ln,!0),X=o.c2p(M.un,!0);i?z_.select(this).attr("d","M"+U+","+A+"V"+P+"M"+z+","+k+"V"+y+(d?"H"+Y+"L"+U+","+P+"L"+X+","+y:"")+"H"+q+"V"+k+(d?"H"+X+"L"+U+","+A+"L"+Y+","+k:"")+"Z"+(v?"M"+z+","+S+"H"+R+"M"+q+","+S+"H"+B+(h===0?"":"M"+R+","+p+"V"+C+"M"+B+","+p+"V"+C):"")):z_.select(this).attr("d","M"+A+","+U+"H"+P+"M"+k+","+z+"H"+y+(d?"V"+Y+"L"+P+","+U+"L"+y+","+X:"")+"V"+q+"H"+k+(d?"V"+X+"L"+A+","+U+"L"+k+","+Y:"")+"Z"+(v?"M"+S+","+z+"V"+R+"M"+S+","+q+"V"+B+(h===0?"":"M"+p+","+R+"H"+C+"M"+p+","+B+"H"+C):""))})}function a1e(e,t,r,n){var a=t.x,i=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;Rx.seedPseudoRandom();var u=function(h){return h.forEach(function(v){v.t=n,v.trace=r}),h},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(h){var v,d=h.pts2,m=Math.max((h.max-h.min)/10,h.q3-h.q1),x=m*1e-9,g=m*dgt,E=[],M=0,w;if(r.jitter){if(m===0)for(M=1,E=new Array(d.length),v=0;vh.lo&&(C.so=!0)}return d});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(hgt.translatePoints,a,i)}function i1e(e,t,r,n){var a=t.val,i=t.pos,o=!!i.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var h=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?Rx.identity:[]);h.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),h.exit().remove(),h.each(function(v){var d=i.c2l(v.pos+s,!0),m=i.l2p(d-c)+l,x=i.l2p(d+f)+l,g=o?(m+x)/2:i.l2p(d)+l,E=a.c2p(v.mean,!0),M=a.c2p(v.mean-v.sd,!0),w=a.c2p(v.mean+v.sd,!0);r.orientation==="h"?z_.select(this).attr("d","M"+E+","+m+"V"+x+(u==="sd"?"m0,0L"+M+","+g+"L"+E+","+m+"L"+w+","+g+"Z":"")):z_.select(this).attr("d","M"+m+","+E+"H"+x+(u==="sd"?"m0,0L"+g+","+M+"L"+m+","+E+"L"+g+","+w+"Z":""))})}o1e.exports={plot:vgt,plotBoxAndWhiskers:n1e,plotPoints:a1e,plotBoxMean:i1e}});var uC=ne((Qar,s1e)=>{"use strict";var zB=Ea(),qB=_a(),BB=li();function pgt(e,t,r){var n=r||zB.select(e).selectAll("g.trace.boxes");n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=zB.select(this),o=a[0].trace,s=o.line.width;function l(f,h,v,d){f.style("stroke-width",h+"px").call(qB.stroke,v).call(qB.fill,d)}var u=i.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var h=zB.select(this),v=o[f.dir];l(h,v.line.width,v.line.color,v.fillcolor),h.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),i.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(qB.stroke,o.line.color);var c=i.selectAll("path.point");BB.pointStyle(c,o,e)}})}function ggt(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?BB.selectedPointStyle(a,n):BB.pointStyle(a,n,e)}s1e.exports={style:pgt,styleOnSelect:ggt}});var NB=ne((eir,f1e)=>{"use strict";var mgt=ri(),OB=Zt(),ym=cu(),l1e=_a(),ygt=OB.fillText;function xgt(e,t,r,n){var a=e.cd,i=a[0].trace,o=i.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(u1e(e,t,r,n))),o.indexOf("points")!==-1&&(l=c1e(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function u1e(e,t,r,n){var a=e.cd,i=e.xa,o=e.ya,s=a[0].trace,l=a[0].t,u=s.type==="violin",c,f,h,v,d,m,x,g,E,M,w,k=l.bdPos,y,S,T=l.wHover,p=function(he){return h.c2l(he.pos)+l.bPos-h.c2l(m)};u&&s.side!=="both"?(s.side==="positive"&&(E=function(he){var ye=p(he);return ym.inbox(ye,ye+T,M)},y=k,S=0),s.side==="negative"&&(E=function(he){var ye=p(he);return ym.inbox(ye-T,ye,M)},y=0,S=k)):(E=function(he){var ye=p(he);return ym.inbox(ye-T,ye+T,M)},y=S=k);var C;u?C=function(he){return ym.inbox(he.span[0]-d,he.span[1]-d,M)}:C=function(he){return ym.inbox(he.min-d,he.max-d,M)},s.orientation==="h"?(d=t,m=r,x=C,g=E,c="y",h=o,f="x",v=i):(d=r,m=t,x=E,g=C,c="x",h=i,f="y",v=o);var A=Math.min(1,k/Math.abs(h.r2c(h.range[1])-h.r2c(h.range[0])));M=e.maxHoverDistance-A,w=e.maxSpikeDistance-A;function P(he){return(x(he)+g(he))/2}var D=ym.getDistanceFunction(n,x,g,P);if(ym.getClosest(a,D,e),e.index===!1)return[];var z=a[e.index],q=s.line.color,U=(s.marker||{}).color;l1e.opacity(q)&&s.line.width?e.color=q:l1e.opacity(U)&&s.boxpoints?e.color=U:e.color=s.fillcolor,e[c+"0"]=h.c2p(z.pos+l.bPos-S,!0),e[c+"1"]=h.c2p(z.pos+l.bPos+y,!0),e[c+"LabelVal"]=z.orig_p!==void 0?z.orig_p:z.pos;var O=c+"Spike";e.spikeDistance=P(z)*w/M,e[O]=h.c2p(z.pos,!0);var R=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,B=s.boxpoints||s.points,Y=B&&R?["max","uf","q3","med","mean","q1","lf","min"]:B&&!R?["max","uf","q3","med","q1","lf","min"]:!B&&R?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],X=v.range[1]{"use strict";h1e.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var UB=ne((rir,v1e)=>{"use strict";v1e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";p1e.exports={attributes:cT(),layoutAttributes:fT(),supplyDefaults:dT().supplyDefaults,crossTraceDefaults:dT().crossTraceDefaults,supplyLayoutDefaults:iC().supplyLayoutDefaults,calc:IB(),crossTraceCalc:sC().crossTraceCalc,plot:lC().plot,style:uC().style,styleOnSelect:uC().styleOnSelect,hoverPoints:NB().hoverPoints,eventData:d1e(),selectPoints:UB(),moduleType:"trace",name:"box",basePlotModule:Ku(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var y1e=ne((air,m1e)=>{"use strict";m1e.exports=g1e()});var q_=ne((iir,b1e)=>{"use strict";var bgt=Ys(),{extendFlat:Zd}=ci(),_gt=os(),{axisHoverFormat:VB}=Wl(),wgt=pl(),{hovertemplateAttrs:Tgt,templatefallbackAttrs:x1e,texttemplateAttrs:Agt}=rs(),Av=Tu();b1e.exports=Zd({z:{valType:"data_array",editType:"calc"},x:Zd({},Av.x,{impliedEdits:{xtype:"array"}}),x0:Zd({},Av.x0,{impliedEdits:{xtype:"scaled"}}),dx:Zd({},Av.dx,{impliedEdits:{xtype:"scaled"}}),y:Zd({},Av.y,{impliedEdits:{ytype:"array"}}),y0:Zd({},Av.y0,{impliedEdits:{ytype:"scaled"}}),dy:Zd({},Av.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:Zd({},Av.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:Zd({},Av.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:Zd({},Av.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:Zd({},Av.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:Zd({},Av.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:Zd({},Av.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:VB("x"),yhoverformat:VB("y"),zhoverformat:VB("z",1),hovertemplate:Tgt(),hovertemplatefallback:x1e(),texttemplate:Agt({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:x1e({editType:"plot"}),textfont:wgt({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:Zd({},_gt.showlegend,{dflt:!1}),zorder:Av.zorder},bgt("",{cLetter:"z",autoColorDflt:!1}))});var fC=ne((oir,w1e)=>{"use strict";var Mgt=mi(),cC=Zt(),Sgt=Fa();w1e.exports=function(t,r,n,a,i,o){var s=n("z");i=i||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(cC.isArray1D(s)){l=n(i),u=n(o);var c=cC.minRowLength(l),f=cC.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=_1e(i,n),u=_1e(o,n),!Egt(s))return 0;n("transpose"),r._length=null}var h=Sgt.getComponentMethod("calendars","handleTraceDefaults");return h(t,r,[i,o],a),!0};function _1e(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function Egt(e){for(var t=!0,r=!1,n=!1,a,i=0;i0&&(r=!0);for(var o=0;o{"use strict";var T1e=Zt();A1e.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var n=T1e.extendFlat({},r.font,{color:"auto",size:"auto"});T1e.coerceFont(t,"textfont",n)}});var GB=ne((lir,M1e)=>{"use strict";M1e.exports=function(t,r,n){var a=n("zsmooth");a===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var k1e=ne((uir,E1e)=>{"use strict";var S1e=Zt(),kgt=fC(),Cgt=vT(),Lgt=U0(),Fgt=GB(),Pgt=bf(),Dgt=q_();E1e.exports=function(t,r,n,a){function i(s,l){return S1e.coerce(t,r,Dgt,s,l)}var o=kgt(t,r,i,a);if(!o){r.visible=!1;return}Lgt(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),Cgt(i,a),Fgt(t,r,i,a),i("hoverongaps"),i("connectgaps",S1e.isArray1D(r.z)&&r.zsmooth!==!1),Pgt(t,r,a,i,{prefix:"",cLetter:"z"}),i("zorder")}});var HB=ne((cir,C1e)=>{"use strict";var B_=mi();C1e.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var a=n[t];return B_(a)?(a=Number(a),r[e]+=a,a):0},avg:function(e,t,r,n,a){var i=n[t];return B_(i)&&(i=Number(i),r[e]+=i,a[e]++),0},min:function(e,t,r,n){var a=n[t];if(B_(a))if(a=Number(a),B_(r[e])){if(r[e]>a){var i=a-r[e];return r[e]=a,i}}else return r[e]=a,a;return 0},max:function(e,t,r,n){var a=n[t];if(B_(a))if(a=Number(a),B_(r[e])){if(r[e]{"use strict";L1e.exports={percent:function(e,t){for(var r=e.length,n=100/t,a=0;a{"use strict";F1e.exports=function(t,r){for(var n=t.length,a=0,i=0;i{"use strict";var O_=uo(),Ix=O_.ONEAVGYEAR,P1e=O_.ONEAVGMONTH,dC=O_.ONEDAY,D1e=O_.ONEHOUR,R1e=O_.ONEMIN,I1e=O_.ONESEC,z1e=ri().tickIncrement;O1e.exports=function(t,r,n,a,i){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(hC(u+s,u+l,a,i),hC(c+s,c+l,a,i)),h=Math.min(hC(u+o,u+s,a,i),hC(c+o,c+s,a,i)),v,d;if(f>h&&hdC){var m=v===Ix?1:6,x=v===Ix?"M12":"M1";return function(g,E){var M=a.c2d(g,Ix,i),w=M.indexOf("-",m);w>0&&(M=M.slice(0,w));var k=a.d2c(M,0,i);if(kI1e?e>dC?e>Ix*1.1?Ix:e>P1e*1.1?P1e:dC:e>D1e?D1e:e>R1e?R1e:I1e:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function Rgt(e,t,r,n,a,i){if(n&&e>dC){var o=B1e(t,a,i),s=B1e(r,a,i),l=e===Ix?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function B1e(e,t,r){var n=t.c2d(e,Ix,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var $B=ne((vir,H1e)=>{"use strict";var XB=mi(),dd=Zt(),N1e=Fa(),o0=ri(),{hasColorscale:U1e}=yh(),V1e=qh(),Igt=oT(),G1e=HB(),zgt=jB(),qgt=WB(),Bgt=YB();function Ogt(e,t){var r=[],n=[],a=t.orientation==="h",i=o0.getFromId(e,a?t.yaxis:t.xaxis),o=a?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=ZB(e,t,i,o),h=f[0],v=f[1],d=typeof h.size=="string",m=[],x=d?m:h,g=[],E=[],M=[],w=0,k=t.histnorm,y=t.histfunc,S=k.indexOf("density")!==-1,T,p,C;u.enabled&&S&&(k=k.replace(/ ?density$/,""),S=!1);var A=y==="max"||y==="min",P=A?null:0,D=G1e.count,z=zgt[k],q=!1,U=function(ye){return i.r2c(ye,0,l)},O;for(dd.isArrayOrTypedArray(t[s])&&y!=="count"&&(O=t[s],q=y==="avg",D=G1e[y]),c=U(h.start),p=U(h.end)+(c-o0.tickIncrement(c,h.size,!1,l))/1e6;c=0&&C=oe;c--)if(n[c]){we=c;break}for(c=oe;c<=we;c++)if(XB(r[c])&&XB(n[c])){var he={p:r[c],s:n[c],b:0};u.enabled||(he.pts=M[c],X?he.ph0=he.ph1=M[c].length?v[M[c][0]]:r[c]:(t._computePh=!0,he.ph0=j(m[c]),he.ph1=j(m[c+1],!0))),ce.push(he)}return ce.length===1&&(ce[0].width1=o0.tickIncrement(ce[0].p,h.size,!1,l)-ce[0].p),U1e(t,"marker")&&V1e(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),U1e(t,"marker.line")&&V1e(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),Igt(ce,t),dd.isArrayOrTypedArray(t.selectedpoints)&&dd.tagSelected(ce,t,ue),ce}function ZB(e,t,r,n,a){var re;var i=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,h,v,d,m,x,g=function(j){return r.r2c(j,0,v)},E=function(j){return r.c2r(j,0,v)},M=r.type==="date"?function(j){return j||j===0?dd.cleanDate(j,null,v):null}:function(j){return XB(j)?Number(j):null};function w(j,fe,ce){fe[j+"Found"]?(fe[j]=M(fe[j]),fe[j]===null&&(fe[j]=ce[j])):(m[j]=fe[j]=ce[j],dd.nestedProperty(f[0],i+"."+j).set(ce[j]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var k=[],y=!0,S=!1,T=!1;for(c=0;cr.r2l(O)&&(B=o0.tickIncrement(B,l.size,!0,v)),D.start=r.l2r(B),U||dd.nestedProperty(t,i+".start").set(D.start)}var Y=l.end,X=r.r2l(P.end),te=X!==void 0;if((l.endFound||te)&&X!==r.r2l(Y)){var se=te?X:dd.aggNums(Math.max,null,d);D.end=r.l2r(se),te||dd.nestedProperty(t,i+".start").set(D.end)}var ue="autobin"+n;return t._input[ue]===!1&&(t._input[i]=dd.extendFlat({},t[i]||{}),delete t._input[ue],delete t[ue]),[D,d]}function Ngt(e,t,r,n,a){var i=e._fullLayout,o=Ugt(e,t),s=!1,l=1/0,u=[t],c,f,h;for(c=0;c=0;n--)s(n);else if(t==="increasing"){for(n=1;n=0;n--)e[n]+=e[n+1];r==="exclude"&&(e.push(0),e.shift())}}H1e.exports={calc:Ogt,calcAllAutoBins:ZB}});var J1e=ne((pir,K1e)=>{"use strict";var j1e=Zt(),N_=ri(),W1e=HB(),Ggt=jB(),Hgt=WB(),jgt=YB(),Y1e=$B().calcAllAutoBins;K1e.exports=function(t,r){var n=N_.getFromId(t,r.xaxis),a=N_.getFromId(t,r.yaxis),i=r.xcalendar,o=r.ycalendar,s=function(Qe){return n.r2c(Qe,0,i)},l=function(Qe){return a.r2c(Qe,0,o)},u=function(Qe){return n.c2r(Qe,0,i)},c=function(Qe){return a.c2r(Qe,0,o)},f,h,v,d,m=Y1e(t,r,n,"x"),x=m[0],g=m[1],E=Y1e(t,r,a,"y"),M=E[0],w=E[1],k=r._length;g.length>k&&g.splice(k,g.length-k),w.length>k&&w.splice(k,w.length-k);var y=[],S=[],T=[],p=typeof x.size=="string",C=typeof M.size=="string",A=[],P=[],D=p?A:x,z=C?P:M,q=0,U=[],O=[],R=r.histnorm,B=r.histfunc,Y=R.indexOf("density")!==-1,X=B==="max"||B==="min",te=X?null:0,se=W1e.count,ue=Ggt[R],re=!1,j=[],fe=[],ce="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";ce&&B!=="count"&&(re=B==="avg",se=W1e[B]);var oe=x.size,we=s(x.start),he=s(x.end)+(we-N_.tickIncrement(we,oe,!1,i))/1e6;for(f=we;f=0&&v=0&&d{"use strict";var Hp=Zt(),Q1e=uo().BADNUM,ege=H0();tge.exports=function(t,r,n,a,i,o){var s=t._length,l=r.makeCalcdata(t,a),u=n.makeCalcdata(t,i);l=ege(t,r,a,l).vals,u=ege(t,n,i,u).vals;var c=t.text,f=c!==void 0&&Hp.isArray1D(c),h=t.hovertext,v=h!==void 0&&Hp.isArray1D(h),d,m,x=Hp.distinctVals(l),g=x.vals,E=Hp.distinctVals(u),M=E.vals,w=[],k,y,S=M.length,T=g.length;for(d=0;d{"use strict";var Wgt=mi(),Ygt=Zt(),pC=uo().BADNUM;rge.exports=function(t,r,n,a){var i,o,s,l,u,c;function f(g){if(Wgt(g))return+g}if(r&&r.transpose){for(i=0,u=0;u{"use strict";var Xgt=Zt(),nge=.01,Zgt=[[-1,0],[1,0],[0,-1],[0,1]];function $gt(e){return .5-.25*Math.min(1,e*.5)}ige.exports=function(t,r){var n=1,a;for(age(t,r),a=0;ange;a++)n=age(t,r,$gt(n));return n>nge&&Xgt.log("interp2d didn't converge quickly",n),t};function age(e,t,r){var n=0,a,i,o,s,l,u,c,f,h,v,d,m,x;for(s=0;sm&&(n=Math.max(n,Math.abs(e[i][o]-d)/(x-m))))}return n}});var yC=ne((xir,oge)=>{"use strict";var Kgt=Zt().maxRowLength;oge.exports=function(t){var r=[],n={},a=[],i=t[0],o=[],s=[0,0,0],l=Kgt(t),u,c,f,h,v,d,m,x;for(c=0;c=0;v--)h=a[v],c=h[0],f=h[1],d=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,d&&(m[h]=[c,f,d],a.splice(v,1),x=!0);if(!x)throw"findEmpties iterated with no new neighbors";for(h in m)n[h]=m[h],r.push(m[h])}return r.sort(function(g,E){return E[2]-g[2]})}});var KB=ne((bir,uge)=>{"use strict";var sge=Fa(),lge=Zt().isArrayOrTypedArray;uge.exports=function(t,r,n,a,i,o){var s=[],l=sge.traceIs(t,"contour"),u=sge.traceIs(t,"histogram"),c,f,h,v=lge(r)&&r.length>1;if(v&&!u&&o.type!=="category"){var d=r.length;if(d<=i){if(l)s=Array.from(r).slice(0,i);else if(i===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],h=1;h{"use strict";var cge=Fa(),JB=Zt(),xC=ri(),fge=H0(),Jgt=J1e(),Qgt=qh(),emt=vC(),tmt=gC(),rmt=mC(),nmt=yC(),bC=KB(),QB=uo().BADNUM;dge.exports=function(t,r){var n=xC.getFromId(t,r.xaxis||"x"),a=xC.getFromId(t,r.yaxis||"y"),i=cge.traceIs(r,"contour"),o=cge.traceIs(r,"histogram"),s=i?"best":r.zsmooth,l,u,c,f,h,v,d,m,x,g,E;if(n._minDtick=0,a._minDtick=0,o)E=Jgt(t,r),f=E.orig_x,l=E.x,u=E.x0,c=E.dx,m=E.orig_y,h=E.y,v=E.y0,d=E.dy,x=E.z;else{var M=r.z;JB.isArray1D(M)?(emt(r,n,a,"x","y",["z"]),l=r._x,h=r._y,M=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],m=r.y?a.makeCalcdata(r,"y"):[],l=fge(r,n,"x",f).vals,h=fge(r,a,"y",m).vals,r._x=l,r._y=h),u=r.x0,c=r.dx,v=r.y0,d=r.dy,x=tmt(M,r,n,a)}(n.rangebreaks||a.rangebreaks)&&(x=amt(l,h,x),o||(l=hge(l),h=hge(h),r._x=l,r._y=h)),!o&&(i||r.connectgaps)&&(r._emptypoints=nmt(x),rmt(x,r._emptypoints));function w(D){s=r._input.zsmooth=r.zsmooth=!1,JB.warn('cannot use zsmooth: "fast": '+D)}function k(D){if(D.length>1){var z=(D[D.length-1]-D[0])/(D.length-1),q=Math.abs(z/100);for(g=0;gq)return!1}return!0}r._islinear=!1,n.type==="log"||a.type==="log"?s==="fast"&&w("log axis found"):k(l)?k(h)?r._islinear=!0:s==="fast"&&w("y scale is not linear"):s==="fast"&&w("x scale is not linear");var y=JB.maxRowLength(x),S=r.xtype==="scaled"?"":l,T=bC(r,S,u,c,y,n),p=r.ytype==="scaled"?"":h,C=bC(r,p,v,d,x.length,a);r._extremes[n._id]=xC.findExtremes(n,T),r._extremes[a._id]=xC.findExtremes(a,C);var A={x:T,y:C,z:x,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(A.orig_x=f),r.yperiodalignment&&m&&(A.orig_y=m),S&&S.length===T.length-1&&(A.xCenter=S),p&&p.length===C.length-1&&(A.yCenter=p),o&&(A.xRanges=E.xRanges,A.yRanges=E.yRanges,A.pts=E.pts),i||Qgt(t,r,{vals:x,cLetter:"z"}),i&&r.contours&&r.contours.coloring==="heatmap"){var P={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};A.xfill=bC(P,S,u,c,y,n),A.yfill=bC(P,p,v,d,x.length,a)}return[A]};function hge(e){for(var t=[],r=e.length,n=0;n{"use strict";wC.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]];wC.STYLE=wC.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var tO=ne((Tir,pge)=>{"use strict";var vge=TC(),imt=li(),eO=Zt(),U_=null;function omt(){if(U_!==null)return U_;U_=!1;var e=eO.isSafari()||eO.isMacWKWebView()||eO.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(vge.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")U_=t.some(function(o){return r.apply(null,o)});else{var n=imt.tester.append("image").attr("style",vge.STYLE),a=window.getComputedStyle(n.node()),i=a.imageRendering;U_=t.some(function(o){var s=o[1];return i===s||i===s.toLowerCase()}),n.remove()}}return U_}pge.exports=omt});var AC=ne((Air,Mge)=>{"use strict";var gge=Ea(),smt=Fa(),lmt=li(),umt=ri(),s0=Zt(),mge=Ms(),cmt=vk(),yge=_a(),fmt=El().extractOpts,hmt=El().makeColorScaleFuncFromTrace,dmt=qv(),vmt=qc(),rO=vmt.LINE_SPACING,pmt=tO(),gmt=TC().STYLE,Tge="heatmap-label";function Age(e){return e.selectAll("g."+Tge)}function xge(e){Age(e).remove()}Mge.exports=function(e,t,r,n){var a=t.xaxis,i=t.yaxis;s0.makeTraceGroups(n,r,"hm").each(function(o){var s=gge.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,h=l.z,v=l.x,d=l.y,m=l.xCenter,x=l.yCenter,g=smt.traceIs(u,"contour"),E=g?"best":u.zsmooth,M=h.length,w=s0.maxRowLength(h),k=!1,y=!1,S,T,p,C,A,P,D,z;for(P=0;S===void 0&&P0;)T=a.c2p(v[P]),P--;for(T0;)A=i.c2p(d[P]),P--;A=a._length||T<=0||C>=i._length||A<=0;if(B){var Y=s.selectAll("image").data([]);Y.exit().remove(),xge(s);return}var X,te;q==="fast"?(X=w,te=M):(X=O,te=R);var se=document.createElement("canvas");se.width=X,se.height=te;var ue=se.getContext("2d",{willReadFrequently:!0}),re=hmt(u,{noNumericCheck:!0,returnArray:!0}),j,fe;q==="fast"?(j=k?function(ni){return w-1-ni}:s0.identity,fe=y?function(ni){return M-1-ni}:s0.identity):(j=function(ni){return s0.constrain(Math.round(a.c2p(v[ni])-S),0,O)},fe=function(ni){return s0.constrain(Math.round(i.c2p(d[ni])-C),0,R)});var ce=fe(0),oe=[ce,ce],we=k?0:1,he=y?0:1,ye=0,Pe=0,le=0,ze=0,Xe,vt,st,Oe,qe;function mt(ni,ao=0){if(ni===void 0)return[0,0,0,0];var Hi=re(ni);return Hi[0]=Math.round(Hi[0]),Hi[1]=Math.round(Hi[1]),Hi[2]=Math.round(Hi[2]),ye+=ao,Pe+=Hi[0]*ao,le+=Hi[1]*ao,ze+=Hi[2]*ao,Hi}function lt(ni,ao,Hi,to){var Xo=ni[Hi.bin0];if(Xo===void 0)return mt(void 0,1);var Zo=ni[Hi.bin1],Fi=ao[Hi.bin0],yo=ao[Hi.bin1],oo=Zo-Xo||0,rl=Fi-Xo||0,Ni;return Zo===void 0?yo===void 0?Ni=0:Fi===void 0?Ni=2*(yo-Xo):Ni=(2*yo-Fi-Xo)*2/3:yo===void 0?Fi===void 0?Ni=0:Ni=(2*Xo-Zo-Fi)*2/3:Fi===void 0?Ni=(2*yo-Zo-Xo)*2/3:Ni=yo+Xo-Zo-Fi,mt(Xo+Hi.frac*oo+to.frac*(rl+Hi.frac*Ni))}if(q!=="default"){var Ie=0,de;try{de=new Uint8Array(X*te*4)}catch(ni){de=new Array(X*te*4)}if(q==="smooth"){var Ee=m||v,Ue=x||d,ge=new Array(Ee.length),Ge=new Array(Ue.length),tt=new Array(O),ft=m?_ge:bge,He=x?_ge:bge,Qe,We,pt;for(P=0;P$t||$t>i._length))for(D=_t;DBr||Br>a._length)){var Nr=cmt({x:gr,y:fr},u,e._fullLayout);Nr.x=gr,Nr.y=fr;var Er=l.z[P][D];Er===void 0?(Nr.z="",Nr.zLabel=""):(Nr.z=Er,Nr.zLabel=umt.tickText(Fe,Er,"hover").text);var zr=l.text&&l.text[P]&&l.text[P][D];(zr===void 0||zr===!1)&&(zr=""),Nr.text=zr;var vn=s0.texttemplateString({data:[Nr,u._meta],fallback:u.texttemplatefallback,labels:Nr,locale:e._fullLayout._d3locale,template:Ye});if(vn){var Nn=vn.split("
"),Xn=Nn.length,Kn=0;for(z=0;z{"use strict";Sge.exports={min:"zmin",max:"zmax"}});var MC=ne((Sir,Ege)=>{"use strict";var mmt=Ea();Ege.exports=function(t){mmt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var EC=ne((Eir,Cge)=>{"use strict";var kge=cu(),pT=Zt(),SC=pT.isArrayOrTypedArray,ymt=ri(),xmt=El().extractOpts;Cge.exports=function(t,r,n,a,i){i||(i={});var o=i.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,h=s.y,v=s.z,d=s.xCenter,m=s.yCenter,x=s.zmask,g=l.zhoverformat,E=f,M=h,w,k,y,S;if(t.index!==!1){try{y=Math.round(t.index[1]),S=Math.round(t.index[0])}catch(Y){pT.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(y<0||y>=v[0].length||S<0||S>v.length)return}else{if(kge.inbox(r-f[0],r-f[f.length-1],0)>0||kge.inbox(n-h[0],n-h[h.length-1],0)>0)return;if(o){var T;for(E=[2*f[0]-f[1]],T=1;T{"use strict";Lge.exports={attributes:q_(),supplyDefaults:k1e(),calc:_C(),plot:AC(),colorbar:V_(),style:MC(),hoverPoints:EC(),moduleType:"trace",name:"heatmap",basePlotModule:Ku(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var Dge=ne((Cir,Pge)=>{"use strict";Pge.exports=Fge()});var nO=ne((Lir,Rge)=>{"use strict";Rge.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var zge=ne((Fir,Ige)=>{"use strict";Ige.exports={eventDataKeys:["binNumber"]}});var kC=ne((Pir,Nge)=>{"use strict";var $d=Vp(),qge=Wl().axisHoverFormat,{hovertemplateAttrs:bmt,texttemplateAttrs:_mt,templatefallbackAttrs:Bge}=rs(),aO=pl(),Oge=nO(),wmt=zge(),iO=ci().extendFlat;Nge.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:qge("x"),yhoverformat:qge("y"),text:iO({},$d.text,{}),hovertext:iO({},$d.hovertext,{}),orientation:$d.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:Oge("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:Oge("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:bmt({},{keys:wmt.eventDataKeys}),hovertemplatefallback:Bge(),texttemplate:_mt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:Bge({editType:"plot"}),textposition:iO({},$d.textposition,{arrayOk:!1}),textfont:aO({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:aO({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:aO({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:$d.insidetextanchor,textangle:$d.textangle,cliponaxis:$d.cliponaxis,constraintext:$d.constraintext,marker:$d.marker,offsetgroup:$d.offsetgroup,alignmentgroup:$d.alignmentgroup,selected:$d.selected,unselected:$d.unselected,zorder:$d.zorder}});var Hge=ne((Dir,Gge)=>{"use strict";var Uge=Fa(),gT=Zt(),Vge=_a(),Tmt=wv().handleText,Amt=Qk(),Mmt=kC();Gge.exports=function(t,r,n,a){function i(E,M){return gT.coerce(t,r,Mmt,E,M)}var o=i("x"),s=i("y"),l=i("cumulative.enabled");l&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var u=i("textposition");Tmt(t,r,a,i,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat");var c=i("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",h=c==="v"?"y":"x",v=o&&s?Math.min(gT.minRowLength(o)&&gT.minRowLength(s)):gT.minRowLength(r[f]||[]);if(!v){r.visible=!1;return}r._length=v;var d=Uge.getComponentMethod("calendars","handleTraceDefaults");d(t,r,["x","y"],a);var m=r[h];m&&i("histfunc"),i("histnorm"),i("autobin"+f),Amt(t,r,i,n,a),gT.coerceSelectionMarkerOpacity(r,i);var x=(r.marker.line||{}).color,g=Uge.getComponentMethod("errorbars","supplyDefaults");g(t,r,x||Vge.defaultLine,{axis:"y"}),g(t,r,x||Vge.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}});var LC=ne((Rir,Yge)=>{"use strict";var mT=Zt(),Smt=uu(),CC=Fa().traceIs,Emt=xx(),kmt=wv().validateCornerradius,jge=mT.nestedProperty,oO=vx().getAxisGroup,Wge=[{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"}],Cmt=["x","y"];Yge.exports=function(t,r){var n=r._histogramBinOpts={},a=[],i={},o=[],s,l,u,c,f,h,v;function d(q,U){return mT.coerce(s._input,s,s._module.attributes,q,U)}function m(q){return q.orientation==="v"?"x":"y"}function x(q,U){var O=Smt.getFromTrace({_fullLayout:r},q,U);return O.type}function g(q,U,O){var R=q.uid+"__"+O;U||(U=R);var B=x(q,O),Y=q[O+"calendar"]||"",X=n[U],te=!0;X&&(B===X.axType&&Y===X.calendar?(te=!1,X.traces.push(q),X.dirs.push(O)):(U=R,B!==X.axType&&mT.warn(["Attempted to group the bins of trace",q.index,"set on a","type:"+B,"axis","with bins on","type:"+X.axType,"axis."].join(" ")),Y!==X.calendar&&mT.warn(["Attempted to group the bins of trace",q.index,"set with a",Y,"calendar","with bins",X.calendar?"on a "+X.calendar+" calendar":"w/o a set calendar"].join(" ")))),te&&(n[U]={traces:[q],dirs:[O],axType:B,calendar:q[O+"calendar"]||""}),q["_"+O+"bingroup"]=U}for(f=0;f{"use strict";var Lmt=D_().hoverPoints,Fmt=ri().hoverLabelText;Xge.exports=function(t,r,n,a,i){var o=Lmt(t,r,n,a,i);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=Fmt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var sO=ne((zir,$ge)=>{"use strict";$ge.exports=function(t,r,n,a,i){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(i)?a[0].pts[i[0]][i[1]]:a[i].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,t.pointIndices=o}return t}});var Jge=ne((qir,Kge)=>{"use strict";Kge.exports={attributes:kC(),layoutAttributes:Jk(),supplyDefaults:Hge(),crossTraceDefaults:LC(),supplyLayoutDefaults:EB(),calc:$B().calc,crossTraceCalc:bx().crossTraceCalc,plot:Dx().plot,layerName:"barlayer",style:n0().style,styleOnSelect:n0().styleOnSelect,colorbar:bh(),hoverPoints:Zge(),selectPoints:R_(),eventData:sO(),moduleType:"trace",name:"histogram",basePlotModule:Ku(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var eme=ne((Bir,Qge)=>{"use strict";Qge.exports=Jge()});var PC=ne((Oir,nme)=>{"use strict";var Q0=kC(),tme=nO(),FC=q_(),Pmt=os(),lO=Wl().axisHoverFormat,{hovertemplateAttrs:Dmt,texttemplateAttrs:Rmt,templatefallbackAttrs:rme}=rs(),Imt=Ys(),yT=ci().extendFlat;nme.exports=yT({x:Q0.x,y:Q0.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:Q0.histnorm,histfunc:Q0.histfunc,nbinsx:Q0.nbinsx,xbins:tme("x"),nbinsy:Q0.nbinsy,ybins:tme("y"),autobinx:Q0.autobinx,autobiny:Q0.autobiny,bingroup:yT({},Q0.bingroup,{}),xbingroup:yT({},Q0.bingroup,{}),ybingroup:yT({},Q0.bingroup,{}),xgap:FC.xgap,ygap:FC.ygap,zsmooth:FC.zsmooth,xhoverformat:lO("x"),yhoverformat:lO("y"),zhoverformat:lO("z",1),hovertemplate:Dmt({},{keys:["z"]}),hovertemplatefallback:rme(),texttemplate:Rmt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:rme({editType:"plot"}),textfont:FC.textfont,showlegend:yT({},Pmt.showlegend,{dflt:!1})},Imt("",{cLetter:"z",autoColorDflt:!1}))});var uO=ne((Nir,ime)=>{"use strict";var zmt=Fa(),ame=Zt();ime.exports=function(t,r,n,a){var i=n("x"),o=n("y"),s=ame.minRowLength(i),l=ame.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=zmt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],a);var c=n("z")||n("marker.color");c&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var sme=ne((Uir,ome)=>{"use strict";var qmt=Zt(),Bmt=uO(),Omt=GB(),Nmt=bf(),Umt=vT(),Vmt=PC();ome.exports=function(t,r,n,a){function i(o,s){return qmt.coerce(t,r,Vmt,o,s)}Bmt(t,r,i,a),r.visible!==!1&&(Omt(t,r,i,a),Nmt(t,r,a,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),i("hovertemplatefallback"),Umt(i,a),i("xhoverformat"),i("yhoverformat"))}});var cme=ne((Vir,ume)=>{"use strict";var Gmt=EC(),lme=ri().hoverLabelText;ume.exports=function(t,r,n,a,i){var o=Gmt(t,r,n,a,i);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,h=c.xRanges[u],v=c.yRanges[l];return t.xLabel=lme(t.xa,[h[0],h[1]],f.xhoverformat),t.yLabel=lme(t.ya,[v[0],v[1]],f.yhoverformat),o}}});var hme=ne((Gir,fme)=>{"use strict";fme.exports={attributes:PC(),supplyDefaults:sme(),crossTraceDefaults:LC(),calc:_C(),plot:AC(),layerName:"heatmaplayer",colorbar:V_(),style:MC(),hoverPoints:cme(),eventData:sO(),moduleType:"trace",name:"histogram2d",basePlotModule:Ku(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var vme=ne((Hir,dme)=>{"use strict";dme.exports=hme()});var DC=ne((jir,pme)=>{"use strict";pme.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var xT=ne((Wir,xme)=>{"use strict";var gc=q_(),RC=Tu(),mme=Wl(),cO=mme.axisHoverFormat,Hmt=mme.descriptionOnlyNumbers,jmt=Ys(),Wmt=xf().dash,Ymt=pl(),G_=ci().extendFlat,yme=DC(),Xmt=yme.COMPARISON_OPS2,Zmt=yme.INTERVAL_OPS,gme=RC.line;xme.exports=G_({z:gc.z,x:gc.x,x0:gc.x0,dx:gc.dx,y:gc.y,y0:gc.y0,dy:gc.dy,xperiod:gc.xperiod,yperiod:gc.yperiod,xperiod0:RC.xperiod0,yperiod0:RC.yperiod0,xperiodalignment:gc.xperiodalignment,yperiodalignment:gc.yperiodalignment,text:gc.text,hovertext:gc.hovertext,transpose:gc.transpose,xtype:gc.xtype,ytype:gc.ytype,xhoverformat:cO("x"),yhoverformat:cO("y"),zhoverformat:cO("z",1),hovertemplate:gc.hovertemplate,hovertemplatefallback:gc.hovertemplatefallback,texttemplate:G_({},gc.texttemplate,{}),texttemplatefallback:gc.texttemplatefallback,textfont:G_({},gc.textfont,{}),hoverongaps:gc.hoverongaps,connectgaps:G_({},gc.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:Ymt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:Hmt("contour label")},operation:{valType:"enumerated",values:[].concat(Xmt).concat(Zmt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:G_({},gme.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:Wmt,smoothing:G_({},gme.smoothing,{}),editType:"plot"},zorder:RC.zorder},jmt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var hO=ne((Yir,_me)=>{"use strict";var Vh=PC(),jp=xT(),$mt=Ys(),fO=Wl().axisHoverFormat,bme=ci().extendFlat;_me.exports=bme({x:Vh.x,y:Vh.y,z:Vh.z,marker:Vh.marker,histnorm:Vh.histnorm,histfunc:Vh.histfunc,nbinsx:Vh.nbinsx,xbins:Vh.xbins,nbinsy:Vh.nbinsy,ybins:Vh.ybins,autobinx:Vh.autobinx,autobiny:Vh.autobiny,bingroup:Vh.bingroup,xbingroup:Vh.xbingroup,ybingroup:Vh.ybingroup,autocontour:jp.autocontour,ncontours:jp.ncontours,contours:jp.contours,line:{color:jp.line.color,width:bme({},jp.line.width,{dflt:.5}),dash:jp.line.dash,smoothing:jp.line.smoothing,editType:"plot"},xhoverformat:fO("x"),yhoverformat:fO("y"),zhoverformat:fO("z",1),hovertemplate:Vh.hovertemplate,hovertemplatefallback:Vh.hovertemplatefallback,texttemplate:jp.texttemplate,texttemplatefallback:jp.texttemplatefallback,textfont:jp.textfont},$mt("",{cLetter:"z",editTypeOverride:"calc"}))});var IC=ne((Xir,wme)=>{"use strict";wme.exports=function(t,r,n,a){var i=a("contours.start"),o=a("contours.end"),s=i===!1||o===!1,l=n("contours.size"),u;s?u=r.autocontour=!0:u=n("autocontour",!1),(u||!l)&&n("ncontours")}});var dO=ne((Zir,Tme)=>{"use strict";var Kmt=Zt();Tme.exports=function(t,r,n,a){a||(a={});var i=t("contours.showlabels");if(i){var o=r.font;Kmt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}a.hasHover!==!1&&t("zhoverformat")}});var zC=ne(($ir,Ame)=>{"use strict";var Jmt=bf(),Qmt=dO();Ame.exports=function(t,r,n,a,i){var o=n("contours.coloring"),s,l="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(l=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,Jmt(t,r,a,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),Qmt(n,a,l,i)}});var kme=ne((Kir,Eme)=>{"use strict";var Mme=Zt(),eyt=uO(),tyt=IC(),ryt=zC(),nyt=vT(),Sme=hO();Eme.exports=function(t,r,n,a){function i(s,l){return Mme.coerce(t,r,Sme,s,l)}function o(s){return Mme.coerce2(t,r,Sme,s)}eyt(t,r,i,a),r.visible!==!1&&(tyt(t,r,i,o),ryt(t,r,i,a),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),i("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&nyt(i,a))}});var gO=ne((Jir,Lme)=>{"use strict";var pO=ri(),vO=Zt();Lme.exports=function(t,r){var n=t.contours;if(t.autocontour){var a=t.zmin,i=t.zmax;(t.zauto||a===void 0)&&(a=vO.aggNums(Math.min,null,r)),(t.zauto||i===void 0)&&(i=vO.aggNums(Math.max,null,r));var o=Cme(a,i,t.ncontours);n.size=o.dtick,n.start=pO.tickFirst(o),o.range.reverse(),n.end=pO.tickFirst(o),n.start===a&&(n.start+=n.size),n.end===i&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),vO.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!=="constraint"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=Cme(s,l,t.ncontours).dtick,u.size=n.size=c}}};function Cme(e,t,r){var n={type:"linear",range:[e,t]};return pO.autoTicks(n,(t-e)/(r||15)),n}});var bT=ne((Qir,Fme)=>{"use strict";Fme.exports=function(t){return t.end+t.size/1e6}});var mO=ne((eor,Dme)=>{"use strict";var Pme=El(),ayt=_C(),iyt=gO(),oyt=bT();Dme.exports=function(t,r){var n=ayt(t,r),a=n[0].z;iyt(r,a);var i=r.contours,o=Pme.extractOpts(r),s;if(i.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=i.start,u=oyt(i),c=i.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var h=l-c/2,v=h+f*c;s=[h,v]}else s=a;return Pme.calc(t,r,{vals:s,cLetter:"z"}),n}});var _T=ne((tor,Rme)=>{"use strict";Rme.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}}});var yO=ne((ror,Ime)=>{"use strict";var qC=_T();Ime.exports=function(t){var r=t[0].z,n=r.length,a=r[0].length,i=n===2||a===2,o,s,l,u,c,f,h,v,d;for(s=0;se?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var xO=ne((nor,Bme)=>{"use strict";var BC=Zt(),H_=_T();Bme.exports=function(t,r,n){var a,i,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=H_.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[i]=H_.SADDLEREMAINDER[o]):delete e.crossings[i],s=H_.NEWDELTA[o],!s){BC.log("Found bad marching index:",o,t,e.level);break}l.push(qme(e,t,s)),t[0]+=s[0],t[1]+=s[1],i=t.join(","),wT(l[l.length-1],l[l.length-2],n,a)&&l.pop();var d=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),m=t[0]===f[0]&&t[1]===f[1]&&s[0]===h[0]&&s[1]===h[1];if(m||r&&d)break;o=e.crossings[i]}v===1e4&&BC.log("Infinite loop in contour?");var x=wT(l[0],l[l.length-1],n,a),g=0,E=.2*e.smoothing,M=[],w=0,k,y,S,T,p,C,A,P,D,z,q;for(v=1;v=w;v--)if(k=M[v],k=w&&k+M[y]P&&D--,e.edgepaths[D]=q.concat(l,z));break}B||(e.edgepaths[P]=l.concat(z))}for(P=0;P20&&t?e===208||e===1114?n=r[0]===0?1:-1:a=r[1]===0?1:-1:H_.BOTTOMSTART.indexOf(e)!==-1?a=1:H_.LEFTSTART.indexOf(e)!==-1?n=1:H_.TOPSTART.indexOf(e)!==-1?a=-1:n=-1,[n,a]}function qme(e,t,r){var n=t[0]+Math.max(r[0],0),a=t[1]+Math.max(r[1],0),i=e.z[a][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-i)/(e.z[a][n+1]-i),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[a],!0),n+l,a]}else{var c=(e.level-i)/(e.z[a+1][n]-i),f=(c!==1?(1-c)*s.c2l(e.y[a]):0)+(c!==0?c*s.c2l(e.y[a+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,a+c]}}});var Vme=ne((aor,Ume)=>{"use strict";var bO=DC(),cyt=mi();Ume.exports={"[]":Ome("[]"),"][":Ome("]["),">":_O(">"),"<":_O("<"),"=":_O("=")};function Nme(e,t){var r=Array.isArray(t),n;function a(i){return cyt(i)?+i:null}return bO.COMPARISON_OPS2.indexOf(e)!==-1?n=a(r?t[0]:t):bO.INTERVAL_OPS.indexOf(e)!==-1?n=r?[a(t[0]),a(t[1])]:[a(t),a(t)]:bO.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(a):[a(t)]),n}function Ome(e){return function(t){t=Nme(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function _O(e){return function(t){return t=Nme(e,t),{start:t,end:1/0,size:1/0}}}});var wO=ne((ior,Hme)=>{"use strict";var Gme=Zt(),fyt=Vme(),hyt=bT();Hme.exports=function(t,r,n){for(var a=t.type==="constraint"?fyt[t._operation](t.value):t,i=a.size,o=[],s=hyt(a),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=a.start;c1e3){Gme.warn("Too many contours, clipping at 1000",t);break}return o}});var TO=ne((oor,Wme)=>{"use strict";var j_=Zt();Wme.exports=function(e,t){var r,n,a,i=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&j_.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";Yme.exports=function(e,t){var r=e[0],n=r.z,a;switch(t.type){case"levels":var i=Math.min(n[0][0],n[0][1]);for(a=0;ao.level||o.starts.length&&i===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(a=0;a":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&v===c)&&(r.prefixBoundary=!0);break;case"][":h=Math.min(f[0],f[1]),v=Math.max(f[0],f[1]),hu&&(r.prefixBoundary=!0);break}break}}});var OC=ne(vd=>{"use strict";var AT=Ea(),Zf=Zt(),H1=li(),dyt=El(),$me=Ms(),Xme=ri(),Zme=Tp(),vyt=AC(),Kme=yO(),Jme=xO(),pyt=wO(),gyt=TO(),Qme=AO(),TT=_T(),Wp=TT.LABELOPTIMIZER;vd.plot=function(t,r,n,a){var i=r.xaxis,o=r.yaxis;Zf.makeTraceGroups(a,n,"contour").each(function(s){var l=AT.select(this),u=s[0],c=u.trace,f=u.x,h=u.y,v=c.contours,d=pyt(v,r,u),m=Zf.ensureSingle(l,"g","heatmapcoloring"),x=[];v.coloring==="heatmap"&&(x=[s]),vyt(t,r,x,m),Kme(d),Jme(d);var g=i.c2p(f[0],!0),E=i.c2p(f[f.length-1],!0),M=o.c2p(h[0],!0),w=o.c2p(h[h.length-1],!0),k=[[g,w],[E,w],[E,M],[g,M]],y=d;v.type==="constraint"&&(y=gyt(d,v._operation)),myt(l,k,v),yyt(l,y,k,v),xyt(l,d,t,u,v),_yt(l,r,t,u,k)})};function myt(e,t,r){var n=Zf.ensureSingle(e,"g","contourbg"),a=n.selectAll("path").data(r.coloring==="fill"?[0]:[]);a.enter().append("path"),a.exit().remove(),a.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function yyt(e,t,r,n){var a=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",i="M"+r.join("L")+"Z";a&&Qme(t,n);var o=Zf.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(a?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?i:"")+eye(l,r);u?AT.select(this).attr("d",u).style("stroke","none"):AT.select(this).remove()})}function eye(e,t){var r="",n=0,a=e.edgepaths.map(function(g,E){return E}),i=!0,o,s,l,u,c,f;function h(g){return Math.abs(g[1]-t[0][1])<.01}function v(g){return Math.abs(g[1]-t[2][1])<.01}function d(g){return Math.abs(g[0]-t[0][0])<.01}function m(g){return Math.abs(g[0]-t[2][0])<.01}for(;a.length;){for(f=H1.smoothopen(e.edgepaths[n],e.smoothing),r+=i?f:f.replace(/^M/,"L"),a.splice(a.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){Zf.log("Missing end?",n,e);break}for(h(o)&&!m(o)?s=t[1]:d(o)?s=t[0]:v(o)?s=t[3]:m(o)&&(s=t[2]),c=0;c=0&&(s=x,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-x[1])<.01&&(x[0]-o[0])*(s[0]-x[0])>=0&&(s=x,u=c):Zf.log("endpt to newendpt is not vert. or horz.",o,s,x)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){Zf.log("unclosed perimeter path");break}n=u,i=a.indexOf(n)===-1,i&&(n=a[0],r+="Z")}for(n=0;nWp.MAXCOST*2)break;h&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=Wp.MAXCOST)return c};function byt(e,t,r,n){var a=t.width/2,i=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*a,c=Math.sin(l)*a,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*i)),h=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*i);if(f<1||h<1)return 1/0;var v=Wp.EDGECOST*(1/(f-1)+1/(h-1));v+=Wp.ANGLECOST*l*l;for(var d=o-u,m=s-c,x=o+u,g=s+c,E=0;E{"use strict";var Tyt=Ea(),MO=El(),Ayt=bT();tye.exports=function(t){var r=t.contours,n=r.start,a=Ayt(r),i=r.size||1,o=Math.floor((a-n)/i)+1,s=r.coloring==="lines"?0:1,l=MO.extractOpts(t);isFinite(i)||(i=1,o=1);var u=l.reversescale?MO.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),h=new Array(c),v,d,m=l.min,x=l.max;if(r.coloring==="heatmap"){for(d=0;d=x)&&(n<=m&&(n=m),a>=x&&(a=x),o=Math.floor((a-n)/i)+1,s=0),d=0;dm&&(f.unshift(m),h.unshift(h[0])),f[f.length-1]{"use strict";var NC=Ea(),rye=li(),Myt=MC(),Syt=SO();nye.exports=function(t){var r=NC.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var a=NC.select(this),i=n[0].trace,o=i.contours,s=i.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",h=!c&&o.coloring==="fill",v=f||h?Syt(i):null;a.selectAll("g.contourlevel").each(function(x){NC.select(this).selectAll("path").call(rye.lineGroupStyle,s.width,f?v(x.level):s.color,s.dash)});var d=o.labelfont;if(a.selectAll("g.contourlabels text").each(function(x){rye.font(NC.select(this),{weight:d.weight,style:d.style,variant:d.variant,textcase:d.textcase,lineposition:d.lineposition,shadow:d.shadow,family:d.family,size:d.size,color:d.color||(f?v(x.level):s.color)})}),c)a.selectAll("g.contourfill path").style("fill",i.fillcolor);else if(h){var m;a.selectAll("g.contourfill path").style("fill",function(x){return m===void 0&&(m=x.level),v(x.level+.5*l)}),m===void 0&&(m=u),a.selectAll("g.contourbg path").style("fill",v(m-.5*l))}}),Myt(t)}});var VC=ne((hor,iye)=>{"use strict";var aye=El(),Eyt=SO(),kyt=bT();function Cyt(e,t,r){var n=t.contours,a=t.line,i=n.size||1,o=n.coloring,s=Eyt(t,{isColorbar:!0});if(o==="heatmap"){var l=aye.extractOpts(t);r._fillgradient=l.reversescale?aye.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:a.color,width:n.showlines!==!1?a.width:0,dash:a.dash},r._levels={start:n.start,end:kyt(n),size:i}}iye.exports={min:"zmin",max:"zmax",calc:Cyt}});var EO=ne((dor,oye)=>{"use strict";var GC=_a(),Lyt=EC();oye.exports=function(t,r,n,a,i){i||(i={}),i.isContour=!0;var o=Lyt(t,r,n,a,i);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&GC.opacity(l.fillcolor)?s.color=GC.addOpacity(l.fillcolor,1):l.contours.showlines&&GC.opacity(l.line.color)&&(s.color=GC.addOpacity(l.line.color,1)))}),o}});var lye=ne((vor,sye)=>{"use strict";sye.exports={attributes:hO(),supplyDefaults:kme(),crossTraceDefaults:LC(),calc:mO(),plot:OC().plot,layerName:"contourlayer",style:UC(),colorbar:VC(),hoverPoints:EO(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:Ku(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var cye=ne((por,uye)=>{"use strict";uye.exports=lye()});var kO=ne((gor,gye)=>{"use strict";var fye=mi(),Fyt=dO(),vye=_a(),hye=vye.addOpacity,Pyt=vye.opacity,pye=DC(),dye=Zt().isArrayOrTypedArray,Dyt=pye.CONSTRAINT_REDUCTION,Ryt=pye.COMPARISON_OPS2;gye.exports=function(t,r,n,a,i,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=Dyt[f],Iyt(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",hye((t.line||{}).color||i,.5))),l){var h=c&&Pyt(c)?hye(r.fillcolor,1):i;u=n("line.color",h),n("line.width",2),n("line.dash")}n("line.smoothing"),Fyt(n,a,u,o)};function Iyt(e,t){var r;Ryt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),dye(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:fye(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),fye(t.value)||(dye(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var xye=ne((mor,yye)=>{"use strict";var CO=Zt(),zyt=fC(),qyt=U0(),Byt=kO(),Oyt=IC(),Nyt=zC(),Uyt=vT(),mye=xT();yye.exports=function(t,r,n,a){function i(u,c){return CO.coerce(t,r,mye,u,c)}function o(u){return CO.coerce2(t,r,mye,u)}var s=zyt(t,r,i,a);if(!s){r.visible=!1;return}qyt(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hoverongaps"),i("hovertemplate"),i("hovertemplatefallback");var l=i("contours.type")==="constraint";i("connectgaps",CO.isArray1D(r.z)),l?Byt(t,r,i,a,n):(Oyt(t,r,i,o),Nyt(t,r,i,a)),r.contours&&r.contours.coloring==="heatmap"&&Uyt(i,a),i("zorder")}});var _ye=ne((yor,bye)=>{"use strict";bye.exports={attributes:xT(),supplyDefaults:xye(),calc:mO(),plot:OC().plot,style:UC(),colorbar:VC(),hoverPoints:EO(),moduleType:"trace",name:"contour",basePlotModule:Ku(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var Tye=ne((xor,wye)=>{"use strict";wye.exports=_ye()});var LO=ne((bor,Eye)=>{"use strict";var{hovertemplateAttrs:Vyt,texttemplateAttrs:Gyt,templatefallbackAttrs:Aye}=rs(),Hyt=zp(),Mv=Tu(),jyt=os(),Mye=Ys(),Wyt=xf().dash,xm=ci().extendFlat,l0=Mv.marker,MT=Mv.line,Sye=l0.line;Eye.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:xm({},Mv.mode,{dflt:"markers"}),text:xm({},Mv.text,{}),texttemplate:Gyt({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:Aye({editType:"plot"}),hovertext:xm({},Mv.hovertext,{}),line:{color:MT.color,width:MT.width,dash:Wyt,backoff:MT.backoff,shape:xm({},MT.shape,{values:["linear","spline"]}),smoothing:MT.smoothing,editType:"calc"},connectgaps:Mv.connectgaps,cliponaxis:Mv.cliponaxis,fill:xm({},Mv.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:Hyt(),marker:xm({symbol:l0.symbol,opacity:l0.opacity,angle:l0.angle,angleref:l0.angleref,standoff:l0.standoff,maxdisplayed:l0.maxdisplayed,size:l0.size,sizeref:l0.sizeref,sizemin:l0.sizemin,sizemode:l0.sizemode,line:xm({width:Sye.width,dash:Sye.dash,editType:"calc"},Mye("marker.line")),gradient:l0.gradient,editType:"calc"},Mye("marker")),textfont:Mv.textfont,textposition:Mv.textposition,selected:Mv.selected,unselected:Mv.unselected,hoverinfo:xm({},jyt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:Mv.hoveron,hovertemplate:Vyt(),hovertemplatefallback:Aye()}});var Fye=ne((_or,Lye)=>{"use strict";var kye=Zt(),Yyt=Ip(),W_=ml(),Xyt=Kv(),Zyt=V0(),Cye=u_(),$yt=G0(),Kyt=Bp(),Jyt=LO();Lye.exports=function(t,r,n,a){function i(h,v){return kye.coerce(t,r,Jyt,h,v)}var o=i("a"),s=i("b"),l=i("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,i("sum"),i("text"),i("hovertext"),r.hoveron!=="fills"&&(i("hovertemplate"),i("hovertemplatefallback"));var c=u{"use strict";var FO=ri();Pye.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot;return a.aLabel=FO.tickText(i.aaxis,t.a,!0).text,a.bLabel=FO.tickText(i.baxis,t.b,!0).text,a.cLabel=FO.tickText(i.caxis,t.c,!0).text,a}});var qye=ne((Tor,zye)=>{"use strict";var PO=mi(),Qyt=Jv(),ext=Op(),txt=mv(),rxt=Qv().calcMarkerSize,Rye=["a","b","c"],Iye={a:["b","c"],b:["a","c"],c:["a","b"]};zye.exports=function(t,r){var n=t._fullLayout[r.subplot],a=n.sum,i=r.sum||a,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,h,v;for(l=0;l{"use strict";var nxt=p_();Bye.exports=function(t,r,n){var a=r.plotContainer;a.select(".scatterlayer").selectAll("*").remove();for(var i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:a,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var axt=x_();Nye.exports=function(t,r,n,a){var i=axt(t,r,n,a);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),i}var f=o.cd[o.index],h=o.trace,v=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var d={};d[h.subplot]={_subplot:v};var m=h._module.formatLabels(f,h,d);o.aLabel=m.aLabel,o.bLabel=m.bLabel,o.cLabel=m.cLabel;var x=f.hi||h.hoverinfo,g=[];function E(w,k){g.push(w._hovertitle+": "+k)}if(!h.hovertemplate){var M=x.split("+");M.indexOf("all")!==-1&&(M=["a","b","c"]),M.indexOf("a")!==-1&&E(v.aaxis,o.aLabel),M.indexOf("b")!==-1&&E(v.baxis,o.bLabel),M.indexOf("c")!==-1&&E(v.caxis,o.cLabel)}return o.extraText=g.join("
"),o.hovertemplate=h.hovertemplate,i}});var Gye=ne((Sor,Vye)=>{"use strict";Vye.exports=function(t,r,n,a,i){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),a[i]){var o=a[i];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var exe=ne((Eor,Qye)=>{"use strict";var Zye=Ea(),DO=Fa(),j1=Zt(),Yp=j1.strTranslate,HC=j1._,zx=_a(),jC=li(),ST=Tp(),RO=ci().extendFlat,ixt=Sl(),bm=ri(),Hye=od(),jye=cu(),$ye=Cp(),Wye=$ye.freeMode,oxt=$ye.rectMode,IO=Qy(),sxt=ef().prepSelect,lxt=ef().selectOnClick,uxt=ef().clearOutline,cxt=ef().clearSelectionsCache,Kye=zc();function Jye(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}Qye.exports=Jye;var Xp=Jye.prototype;Xp.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};Xp.plot=function(e,t){var r=this,n=t[r.id],a=t._size;r._hasClipOnAxisFalse=!1;for(var i=0;iY_*u?(g=u,x=g*Y_):(x=l,g=x/Y_),E=o*x/l,M=s*g/u,d=t.l+t.w*a-x/2,m=t.t+t.h*(1-i)-g/2,r.x0=d,r.y0=m,r.w=x,r.h=g,r.sum=c,r.xaxis={type:"linear",range:[f+2*v-c,c-f-2*h],domain:[a-E/2,a+E/2],_id:"x"},ST(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(z){return z.a>=r.aaxis.range[0]&&z.a<=r.aaxis.range[1]&&z.b>=r.baxis.range[1]&&z.b<=r.baxis.range[0]&&z.c>=r.caxis.range[1]&&z.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-h-v],domain:[i-M/2,i+M/2],_id:"y"},ST(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var w=r.yaxis.domain[0],k=r.aaxis=RO({},e.aaxis,{range:[f,c-h-v],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[w,w+M*Y_],anchor:"free",position:0,_id:"y",_length:x});ST(k,r.graphDiv._fullLayout),k.setScale();var y=r.baxis=RO({},e.baxis,{range:[c-f-v,h],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:x});ST(y,r.graphDiv._fullLayout),y.setScale();var S=r.caxis=RO({},e.caxis,{range:[c-f-h,v],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[w,w+M*Y_],anchor:"free",position:0,_id:"y",_length:x});ST(S,r.graphDiv._fullLayout),S.setScale();var T="M"+d+","+(m+g)+"h"+x+"l-"+x/2+",-"+g+"Z";r.clipDef.select("path").attr("d",T),r.layers.plotbg.select("path").attr("d",T);var p="M0,"+g+"h"+x+"l-"+x/2+",-"+g+"Z";r.clipDefRelative.select("path").attr("d",p);var C=Yp(d,m);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",C),r.clipDefRelative.select("path").attr("transform",null);var A=Yp(d-y._offset,m+g);r.layers.baxis.attr("transform",A),r.layers.bgrid.attr("transform",A);var P=Yp(d+x/2,m)+"rotate(30)"+Yp(0,-k._offset);r.layers.aaxis.attr("transform",P),r.layers.agrid.attr("transform",P);var D=Yp(d+x/2,m)+"rotate(-30)"+Yp(0,-S._offset);r.layers.caxis.attr("transform",D),r.layers.cgrid.attr("transform",D),r.drawAxes(!0),r.layers.aline.select("path").attr("d",k.showline?"M"+d+","+(m+g)+"l"+x/2+",-"+g:"M0,0").call(zx.stroke,k.linecolor||"#000").style("stroke-width",(k.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",y.showline?"M"+d+","+(m+g)+"h"+x:"M0,0").call(zx.stroke,y.linecolor||"#000").style("stroke-width",(y.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",S.showline?"M"+(d+x/2)+","+m+"l"+x/2+","+g:"M0,0").call(zx.stroke,S.linecolor||"#000").style("stroke-width",(S.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),jC.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};Xp.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",a=t.layers,i=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(i),t.drawAx(o),t.drawAx(s),e){var l=Math.max(i.showticklabels?i.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;a["a-title"]=IO.draw(r,"a"+n,{propContainer:i,propName:t.id+".aaxis.title.text",placeholder:HC(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-i.title.font.size/3-l,"text-anchor":"middle"}}),a["b-title"]=IO.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:HC(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),a["c-title"]=IO.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:HC(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};Xp.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,a=n.charAt(0),i=e._id,o=t.layers[n],s=30,l=a+"tickLayout",u=fxt(e);t[l]!==u&&(o.selectAll("."+i+"tick").remove(),t[l]=u),e.setScale();var c=bm.calcTicks(e),f=bm.clipEnds(e,c),h=bm.makeTransTickFn(e),v=bm.getTickSigns(e)[2],d=j1.deg2rad(s),m=v*(e.linewidth||1)/2,x=v*e.ticklen,g=t.w,E=t.h,M=a==="b"?"M0,"+m+"l"+Math.sin(d)*x+","+Math.cos(d)*x:"M"+m+",0l"+Math.cos(d)*x+","+-Math.sin(d)*x,w={a:"M0,0l"+E+",-"+g/2,b:"M0,0l-"+g/2+",-"+E,c:"M0,0l-"+E+","+g/2}[a];bm.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:M,transFn:h,crisp:!1}),bm.drawGrid(r,e,{vals:f,layer:t.layers[a+"grid"],path:w,transFn:h,crisp:!1}),bm.drawLabels(r,e,{vals:c,layer:o,transFn:h,labelFns:bm.makeLabelFns(e,0,s)})};function fxt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var Mf=Kye.MINZOOM/2+.87,hxt="m-0.87,.5h"+Mf+"v3h-"+(Mf+5.2)+"l"+(Mf/2+2.6)+",-"+(Mf*.87+4.5)+"l2.6,1.5l-"+Mf/2+","+Mf*.87+"Z",dxt="m0.87,.5h-"+Mf+"v3h"+(Mf+5.2)+"l-"+(Mf/2+2.6)+",-"+(Mf*.87+4.5)+"l-2.6,1.5l"+Mf/2+","+Mf*.87+"Z",vxt="m0,1l"+Mf/2+","+Mf*.87+"l2.6,-1.5l-"+(Mf/2+2.6)+",-"+(Mf*.87+4.5)+"l-"+(Mf/2+2.6)+","+(Mf*.87+4.5)+"l2.6,1.5l"+Mf/2+",-"+Mf*.87+"Z",pxt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",Yye=!0;Xp.clearOutline=function(){cxt(this.dragOptions),uxt(this.dragOptions.gd)};Xp.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,a,i;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(A,P,D){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],a=r._fullLayout._invScaleX,i=r._fullLayout._invScaleY;var z=e.dragOptions.dragmode=r._fullLayout.dragmode;Wye(z)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,z==="zoom"?(e.dragOptions.moveFn=y,e.dragOptions.clickFn=g,e.dragOptions.doneFn=S,E(A,P,D)):z==="pan"?(e.dragOptions.moveFn=p,e.dragOptions.clickFn=g,e.dragOptions.doneFn=C,T(),e.clearOutline(r)):(oxt(z)||Wye(z))&&sxt(A,P,D,e.dragOptions,z)}};var o,s,l,u,c,f,h,v,d,m;function x(A){var P={};return P[e.id+".aaxis.min"]=A.a,P[e.id+".baxis.min"]=A.b,P[e.id+".caxis.min"]=A.c,P}function g(A,P){var D=r._fullLayout.clickmode;Xye(r),A===2&&(r.emit("plotly_doubleclick",null),DO.call("_guiRelayout",r,x({a:0,b:0,c:0}))),D.indexOf("select")>-1&&A===1&&lxt(P,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),D.indexOf("event")>-1&&jye.click(r,P,e.id)}function E(A,P,D){var z=t.getBoundingClientRect();o=P-z.left,s=D-z.top,r._fullLayout._calcInverseTransform(r);var q=r._fullLayout._invTransform,U=j1.apply3DTransform(q)(o,s);o=U[0],s=U[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=zx.color(e.graphDiv._fullLayout[e.id].bgcolor).luminosity(),h="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",v=!1,d=n.append("path").attr("class","zoombox").attr("transform",Yp(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",h),m=n.append("path").attr("class","zoombox-corners").attr("transform",Yp(e.x0,e.y0)).style({fill:zx.background,stroke:zx.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function M(A,P){return 1-P/e.h}function w(A,P){return 1-(A+(e.h-P)/Math.sqrt(3))/e.w}function k(A,P){return(A-(e.h-P)/Math.sqrt(3))/e.w}function y(A,P){var D=o+A*a,z=s+P*i,q=Math.max(0,Math.min(1,M(o,s),M(D,z))),U=Math.max(0,Math.min(1,w(o,s),w(D,z))),O=Math.max(0,Math.min(1,k(o,s),k(D,z))),R=(q/2+O)*e.w,B=(1-q/2-U)*e.w,Y=(R+B)/2,X=B-R,te=(1-q)*e.h,se=te-X/Y_;X.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),m.transition().style("opacity",1).duration(200),v=!0),r.emit("plotly_relayouting",x(c))}function S(){Xye(r),c!==l&&(DO.call("_guiRelayout",r,x(c)),Yye&&r.data&&r._context.showTips&&(j1.notifier(HC(r,"Double-click to zoom back out"),"long",r),Yye=!1))}function T(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function p(A,P){var D=A/e.xaxis._m,z=P/e.yaxis._m;c={a:l.a-z,b:l.b+(D+z)/2,c:l.c-(D-z)/2};var q=[c.a,c.b,c.c].sort(j1.sorterAsc),U={a:q.indexOf(c.a),b:q.indexOf(c.b),c:q.indexOf(c.c)};q[0]<0&&(q[1]+q[0]/2<0?(q[2]+=q[0]+q[1],q[0]=q[1]=0):(q[2]+=q[0]/2,q[1]+=q[0]/2,q[0]=0),c={a:q[U.a],b:q[U.b],c:q[U.c]},P=(l.a-c.a)*e.yaxis._m,A=(l.c-c.c-l.b+c.b)*e.xaxis._m);var O=Yp(e.x0+A,e.y0+P);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",O);var R=Yp(-A,-P);e.clipDefRelative.select("path").attr("transform",R),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(jC.hideOutsideRangePoints,e),r.emit("plotly_relayouting",x(c))}function C(){DO.call("_guiRelayout",r,x(c))}t.onmousemove=function(A){jye.hover(r,A,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(A){r._dragging||Hye.unhover(r,A)},Hye.init(this.dragOptions)};function Xye(e){Zye.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var BO=ne((kor,txe)=>{"use strict";var gxt=Ic(),mxt=zl().attributes,vs=Wf(),yxt=Il().overrideAll,zO=ci().extendFlat,qO={title:{text:vs.title.text,font:vs.title.font},color:vs.color,tickmode:vs.minor.tickmode,nticks:zO({},vs.nticks,{dflt:6,min:1}),tick0:vs.tick0,dtick:vs.dtick,tickvals:vs.tickvals,ticktext:vs.ticktext,ticks:vs.ticks,ticklen:vs.ticklen,tickwidth:vs.tickwidth,tickcolor:vs.tickcolor,ticklabelstep:vs.ticklabelstep,showticklabels:vs.showticklabels,labelalias:vs.labelalias,showtickprefix:vs.showtickprefix,tickprefix:vs.tickprefix,showticksuffix:vs.showticksuffix,ticksuffix:vs.ticksuffix,showexponent:vs.showexponent,exponentformat:vs.exponentformat,minexponent:vs.minexponent,separatethousands:vs.separatethousands,tickfont:vs.tickfont,tickangle:vs.tickangle,tickformat:vs.tickformat,tickformatstops:vs.tickformatstops,hoverformat:vs.hoverformat,showline:zO({},vs.showline,{dflt:!0}),linecolor:vs.linecolor,linewidth:vs.linewidth,showgrid:zO({},vs.showgrid,{dflt:!0}),gridcolor:vs.gridcolor,gridwidth:vs.gridwidth,griddash:vs.griddash,layer:vs.layer,min:{valType:"number",dflt:0,min:0}},WC=txe.exports=yxt({domain:mxt({name:"ternary"}),bgcolor:{valType:"color",dflt:gxt.background},sum:{valType:"number",dflt:1,min:0},aaxis:qO,baxis:qO,caxis:qO},"plot","from-root");WC.uirevision={valType:"any",editType:"none"};WC.aaxis.uirevision=WC.baxis.uirevision=WC.caxis.uirevision={valType:"any",editType:"none"}});var qx=ne((Cor,rxe)=>{"use strict";var xxt=Zt(),bxt=Bo(),_xt=zl().defaults;rxe.exports=function(t,r,n,a){var i=a.type,o=a.attributes,s=a.handleDefaults,l=a.partition||"x",u=r._subplots[i],c=u.length,f=c&&u[0].replace(/\d+$/,""),h,v;function d(E,M){return xxt.coerce(h,v,o,E,M)}for(var m=0;m{"use strict";var wxt=_a(),Txt=Bo(),YC=Zt(),Axt=qx(),Mxt=Hg(),Sxt=jg(),Ext=Nb(),kxt=Xy(),Cxt=j4(),axe=BO(),nxe=["aaxis","baxis","caxis"];ixe.exports=function(t,r,n){Axt(t,r,n,{type:"ternary",attributes:axe,handleDefaults:Lxt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function Lxt(e,t,r,n){var a=r("bgcolor"),i=r("sum");n.bgColor=wxt.combine(a,n.paper_bgcolor);for(var o,s,l,u=0;u=i&&(c.min=0,f.min=0,h.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function Fxt(e,t,r,n){var a=axe[t._name];function i(v,d){return YC.coerce(e,t,a,v,d)}i("uirevision",n.uirevision),t.type="linear";var o=i("color"),s=o!==a.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=i("title.text",c);t._hovertitle=f===c?f:u,YC.coerceFont(i,"title.font",r.font,{overrideDflt:{size:YC.bigFont(r.font.size),color:s}}),i("min"),kxt(e,t,i,"linear"),Sxt(e,t,i,"linear"),Mxt(e,t,i,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),Ext(e,t,i,{outerTicks:!0});var h=i("showticklabels");h&&(YC.coerceFont(i,"tickfont",r.font,{overrideDflt:{color:s}}),i("tickangle"),i("tickformat")),Cxt(e,t,i,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),i("hoverformat"),i("layer")}});var sxe=ne(u0=>{"use strict";var Pxt=exe(),Dxt=mh().getSubplotCalcData,Rxt=Zt().counterRegex,X_="ternary";u0.name=X_;var Ixt=u0.attr="subplot";u0.idRoot=X_;u0.idRegex=u0.attrRegex=Rxt(X_);var zxt=u0.attributes={};zxt[Ixt]={valType:"subplotid",dflt:"ternary",editType:"calc"};u0.layoutAttributes=BO();u0.supplyLayoutDefaults=oxe();u0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,a=r._subplots[X_],i=0;i{"use strict";lxe.exports={attributes:LO(),supplyDefaults:Fye(),colorbar:bh(),formatLabels:Dye(),calc:qye(),plot:Oye(),style:Md().style,styleOnSelect:Md().styleOnSelect,hoverPoints:Uye(),selectPoints:_x(),eventData:Gye(),moduleType:"trace",name:"scatterternary",basePlotModule:sxe(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var fxe=ne((Dor,cxe)=>{"use strict";cxe.exports=uxe()});var OO=ne((Ror,dxe)=>{"use strict";var Oc=cT(),Z_=ci().extendFlat,hxe=Wl().axisHoverFormat;dxe.exports={y:Oc.y,x:Oc.x,x0:Oc.x0,y0:Oc.y0,xhoverformat:hxe("x"),yhoverformat:hxe("y"),name:Z_({},Oc.name,{}),orientation:Z_({},Oc.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:Oc.fillcolor,points:Z_({},Oc.boxpoints,{}),jitter:Z_({},Oc.jitter,{}),pointpos:Z_({},Oc.pointpos,{}),width:Z_({},Oc.width,{}),marker:Oc.marker,text:Oc.text,hovertext:Oc.hovertext,hovertemplate:Oc.hovertemplate,hovertemplatefallback:Oc.hovertemplatefallback,quartilemethod:Oc.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:Oc.offsetgroup,alignmentgroup:Oc.alignmentgroup,selected:Oc.selected,unselected:Oc.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:Oc.zorder}});var VO=ne((Ior,vxe)=>{"use strict";var NO=fT(),UO=Zt().extendFlat;vxe.exports={violinmode:UO({},NO.boxmode,{}),violingap:UO({},NO.boxgap,{}),violingroupgap:UO({},NO.boxgroupgap,{})}});var xxe=ne((zor,yxe)=>{"use strict";var pxe=Zt(),qxt=_a(),gxe=dT(),mxe=OO();yxe.exports=function(t,r,n,a){function i(k,y){return pxe.coerce(t,r,mxe,k,y)}function o(k,y){return pxe.coerce2(t,r,mxe,k,y)}if(gxe.handleSampleDefaults(t,r,i,a),r.visible!==!1){i("bandwidth"),i("side");var s=i("width");s||(i("scalegroup",r.name),i("scalemode"));var l=i("span"),u;Array.isArray(l)&&(u="manual"),i("spanmode",u);var c=i("line.color",(t.marker||{}).color||n),f=i("line.width"),h=i("fillcolor",qxt.addOpacity(r.line.color,.5));gxe.handlePointsDefaults(t,r,i,{prefix:""});var v=o("box.width"),d=o("box.fillcolor",h),m=o("box.line.color",c),x=o("box.line.width",f),g=i("box.visible",!!(v||d||m||x));g||(r.box={visible:!1});var E=o("meanline.color",c),M=o("meanline.width",f),w=i("meanline.visible",!!(E||M));w||(r.meanline={visible:!1}),i("quartilemethod"),i("zorder")}}});var _xe=ne((qor,bxe)=>{"use strict";var Bxt=Zt(),Oxt=VO(),Nxt=iC();bxe.exports=function(t,r,n){function a(i,o){return Bxt.coerce(t,r,Oxt,i,o)}Nxt._supply(t,r,n,a,"violin")}});var XC=ne(Bx=>{"use strict";var Uxt=Zt(),Vxt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};Bx.makeKDE=function(e,t,r){var n=r.length,a=Vxt.gaussian,i=e.bandwidth,o=1/(n*i);return function(s){for(var l=0,u=0;u{"use strict";var GO=Zt(),HO=ri(),Gxt=IB(),wxe=XC(),Hxt=uo().BADNUM;Txe.exports=function(t,r){var n=Gxt(t,r);if(n[0].t.empty)return n;for(var a=t._fullLayout,i=HO.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var Xxt=sC().setPositionOffset,Mxe=["v","h"];Sxe.exports=function(t,r){for(var n=t.calcdata,a=r.xaxis,i=r.yaxis,o=0;o{"use strict";var jO=Ea(),WO=Zt(),Zxt=li(),YO=lC(),$xt=_q(),Kxt=XC();kxe.exports=function(t,r,n,a){var i=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var h=$xt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return Zxt.smoothopen(h[0],1)}WO.makeTraceGroups(a,n,"trace violins").each(function(c){var f=jO.select(this),h=c[0],v=h.t,d=h.trace;if(d.visible!==!0||v.empty){f.remove();return}var m=v.bPos,x=v.bdPos,g=r[v.valLetter+"axis"],E=r[v.posLetter+"axis"],M=d.side==="both",w=M||d.side==="positive",k=M||d.side==="negative",y=f.selectAll("path.violin").data(WO.identity);y.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),y.exit().remove(),y.each(function(z){var q=jO.select(this),U=z.density,O=U.length,R=E.c2l(z.pos+m,!0),B=E.l2p(R),Y;if(d.width)Y=v.maxKDE/x;else{var X=o._violinScaleGroupStats[d.scalegroup];Y=d.scalemode==="count"?X.maxKDE/x*(X.maxCount/z.pts.length):X.maxKDE/x}var te,se,ue,re,j,fe,ce;if(w){for(fe=new Array(O),re=0;re{"use strict";var Lxe=Ea(),$_=_a(),Jxt=Md().stylePoints;Fxe.exports=function(t){var r=Lxe.select(t).selectAll("g.trace.violins");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var a=n[0].trace,i=Lxe.select(this),o=a.box||{},s=o.line||{},l=a.meanline||{},u=l.width;i.selectAll("path.violin").style("stroke-width",a.line.width+"px").call($_.stroke,a.line.color).call($_.fill,a.fillcolor),i.selectAll("path.box").style("stroke-width",s.width+"px").call($_.stroke,s.color).call($_.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};i.selectAll("path.mean").style(c).call($_.stroke,l.color),i.selectAll("path.meanline").style(c).call($_.stroke,l.color),Jxt(i,a,t)})}});var zxe=ne((Gor,Ixe)=>{"use strict";var Qxt=_a(),XO=Zt(),e2t=ri(),Dxe=NB(),Rxe=XC();Ixe.exports=function(t,r,n,a,i){i||(i={});var o=i.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,h=[],v,d;if(c||f){var m=Dxe.hoverOnBoxes(t,r,n,a);if(f&&m.length>0){var x=t.xa,g=t.ya,E,M,w,k,y;l.orientation==="h"?(y=r,E="y",w=g,M="x",k=x):(y=n,E="x",w=x,M="y",k=g);var S=s[t.index];if(y>=S.span[0]&&y<=S.span[1]){var T=XO.extendFlat({},t),p=k.c2p(y,!0),C=Rxe.getKdeValue(S,l,y),A=Rxe.getPositionOnKdePath(S,l,p),P=w._offset,D=w._length;T[E+"0"]=A[0],T[E+"1"]=A[1],T[M+"0"]=T[M+"1"]=p,T[M+"Label"]=M+": "+e2t.hoverLabelText(k,y,l[M+"hoverformat"])+", "+s[0].t.labels.kde+" "+C.toFixed(3);for(var z=0,q=0;q{"use strict";qxe.exports={attributes:OO(),layoutAttributes:VO(),supplyDefaults:xxe(),crossTraceDefaults:dT().crossTraceDefaults,supplyLayoutDefaults:_xe(),calc:Axe(),crossTraceCalc:Exe(),plot:Cxe(),style:Pxe(),styleOnSelect:Md().styleOnSelect,hoverPoints:zxe(),selectPoints:UB(),moduleType:"trace",name:"violin",basePlotModule:Ku(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var Nxe=ne((jor,Oxe)=>{"use strict";Oxe.exports=Bxe()});var Vxe=ne((Wor,Uxe)=>{"use strict";Uxe.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var $O=ne((Yor,Wxe)=>{"use strict";var ql=Vp(),ZO=Tu().line,t2t=os(),Gxe=Wl().axisHoverFormat,{hovertemplateAttrs:r2t,texttemplateAttrs:n2t,templatefallbackAttrs:Hxe}=rs(),jxe=Vxe(),W1=ci().extendFlat,a2t=_a();Wxe.exports={x:ql.x,x0:ql.x0,dx:ql.dx,y:ql.y,y0:ql.y0,dy:ql.dy,xperiod:ql.xperiod,yperiod:ql.yperiod,xperiod0:ql.xperiod0,yperiod0:ql.yperiod0,xperiodalignment:ql.xperiodalignment,yperiodalignment:ql.yperiodalignment,xhoverformat:Gxe("x"),yhoverformat:Gxe("y"),hovertext:ql.hovertext,hovertemplate:r2t({},{keys:jxe.eventDataKeys}),hovertemplatefallback:Hxe(),hoverinfo:W1({},t2t.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:n2t({editType:"plot"},{keys:jxe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:Hxe({editType:"plot"}),text:ql.text,textposition:ql.textposition,insidetextanchor:W1({},ql.insidetextanchor,{dflt:"middle"}),textangle:W1({},ql.textangle,{dflt:0}),textfont:ql.textfont,insidetextfont:ql.insidetextfont,outsidetextfont:ql.outsidetextfont,constraintext:ql.constraintext,cliponaxis:ql.cliponaxis,orientation:W1({},ql.orientation,{}),offset:W1({},ql.offset,{arrayOk:!1}),width:W1({},ql.width,{arrayOk:!1}),marker:i2t(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:W1({},ZO.color,{dflt:a2t.defaultLine}),width:W1({},ZO.width,{dflt:0,editType:"plot"}),dash:ZO.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:ql.offsetgroup,alignmentgroup:ql.alignmentgroup,zorder:ql.zorder};function i2t(){var e=W1({},ql.marker);return delete e.pattern,delete e.cornerradius,e}});var KO=ne((Xor,Yxe)=>{"use strict";Yxe.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"}}});var QO=ne((Zor,Zxe)=>{"use strict";var ZC=Zt(),o2t=xx(),s2t=wv().handleText,l2t=yx(),u2t=U0(),Xxe=$O(),JO=_a();function c2t(e,t,r,n){function a(f,h){return ZC.coerce(e,t,Xxe,f,h)}var i=l2t(e,t,n,a);if(!i){t.visible=!1;return}u2t(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("orientation",t.y&&!t.x?"v":"h"),a("offset"),a("width");var o=a("text");a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var s=a("textposition");s2t(e,t,n,a,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&a("textinfo",ZC.isArrayOrTypedArray(o)?"text+value":"value");var l=a("marker.color",r);a("marker.line.color",JO.defaultLine),a("marker.line.width");var u=a("connector.visible");if(u){a("connector.fillcolor",f2t(l));var c=a("connector.line.width");c&&(a("connector.line.color"),a("connector.line.dash"))}a("zorder")}function f2t(e){var t=ZC.isArrayOrTypedArray(e)?"#000":e;return JO.addOpacity(t,.5*JO.opacity(t))}function h2t(e,t){var r,n;function a(o){return ZC.coerce(n._input,n,Xxe,o)}for(var i=0;i{"use strict";var d2t=Zt(),v2t=KO();$xe.exports=function(e,t,r){var n=!1;function a(s,l){return d2t.coerce(e,t,v2t,s,l)}for(var i=0;i{"use strict";var K_=Zt();Jxe.exports=function(t,r){for(var n=0;n{"use strict";var e2e=ri(),t2e=H0(),p2t=Qxe(),g2t=mv(),ET=uo().BADNUM;r2e.exports=function(t,r){var n=e2e.getFromId(t,r.xaxis||"x"),a=e2e.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c,f,h;r.orientation==="h"?(i=n.makeCalcdata(r,"x"),s=a.makeCalcdata(r,"y"),l=t2e(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=t2e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var v=Math.min(o.length,i.length),d=new Array(v);for(r._base=[],f=0;f{"use strict";var a2e=bx().setGroupPositions;i2e.exports=function(t,r){var n=t._fullLayout,a=t._fullData,i=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var $C=Ea(),wm=Zt(),s2e=li(),_m=uo().BADNUM,m2t=Dx(),y2t=Uh().clearMinTextSize;u2e.exports=function(t,r,n,a){var i=t._fullLayout;y2t("funnel",i),x2t(t,r,n,a),b2t(t,r,n,a),m2t.plot(t,r,n,a,{mode:i.funnelmode,norm:i.funnelmode,gap:i.funnelgap,groupgap:i.funnelgroupgap})};function x2t(e,t,r,n){var a=t.xaxis,i=t.yaxis;wm.makeTraceGroups(n,r,"trace bars").each(function(o){var s=$C.select(this),l=o[0].trace,u=wm.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(wm.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var h=f.size();f.each(function(v,d){if(!(d!==h-1&&!v.cNext)){var m=l2e(v,a,i,c),x=m[0],g=m[1],E="";x[0]!==_m&&g[0]!==_m&&x[1]!==_m&&g[1]!==_m&&x[2]!==_m&&g[2]!==_m&&x[3]!==_m&&g[3]!==_m&&(c?E+="M"+x[0]+","+g[1]+"L"+x[2]+","+g[2]+"H"+x[3]+"L"+x[1]+","+g[1]+"Z":E+="M"+x[1]+","+g[1]+"L"+x[2]+","+g[3]+"V"+g[2]+"L"+x[1]+","+g[0]+"Z"),E===""&&(E="M0,0Z"),wm.ensureSingle($C.select(this),"path").attr("d",E).call(s2e.setClipUrl,t.layerClipId,e)}})})}function b2t(e,t,r,n){var a=t.xaxis,i=t.yaxis;wm.makeTraceGroups(n,r,"trace bars").each(function(o){var s=$C.select(this),l=o[0].trace,u=wm.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(wm.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var h=f.size();f.each(function(v,d){if(!(d!==h-1&&!v.cNext)){var m=l2e(v,a,i,c),x=m[0],g=m[1],E="";x[3]!==void 0&&g[3]!==void 0&&(c?(E+="M"+x[0]+","+g[1]+"L"+x[2]+","+g[2],E+="M"+x[1]+","+g[1]+"L"+x[3]+","+g[2]):(E+="M"+x[1]+","+g[1]+"L"+x[2]+","+g[3],E+="M"+x[1]+","+g[0]+"L"+x[2]+","+g[2])),E===""&&(E="M0,0Z"),wm.ensureSingle($C.select(this),"path").attr("d",E).call(s2e.setClipUrl,t.layerClipId,e)}})})}function l2e(e,t,r,n){var a=[],i=[],o=n?t:r,s=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=s.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=s.c2p(e.p1,!0),a[2]=o.c2p(e.nextS0,!0),i[2]=s.c2p(e.nextP0,!0),a[3]=o.c2p(e.nextS1,!0),i[3]=s.c2p(e.nextP1,!0),n?[a,i]:[i,a]}});var d2e=ne((tsr,h2e)=>{"use strict";var kT=Ea(),f2e=li(),tN=_a(),_2t=A1().DESELECTDIM,w2t=n0(),T2t=Uh().resizeText,A2t=w2t.styleTextPoints;function M2t(e,t,r){var n=r||kT.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");T2t(e,n,"funnel"),n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=kT.select(this),o=a[0].trace;i.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;kT.select(this).call(tN.fill,s.mc||l.color).call(tN.stroke,s.mlc||l.line.color).call(f2e.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?_2t:1)}}),A2t(i,o,e),i.selectAll(".regions").each(function(){kT.select(this).selectAll("path").style("stroke-width",0).call(tN.fill,o.connector.fillcolor)}),i.selectAll(".lines").each(function(){var s=o.connector.line;f2e.lineGroupStyle(kT.select(this).selectAll("path"),s.width,s.color,s.dash)})})}h2e.exports={style:M2t}});var g2e=ne((rsr,p2e)=>{"use strict";var v2e=_a().opacity,S2t=D_().hoverOnBars,rN=Zt().formatPercent;p2e.exports=function(t,r,n,a,i){var o=S2t(t,r,n,a,i);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],h=u?"x":"y";o[h+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=rN(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=rN(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=rN(f.sumR,1);var v=f.hi||l.hoverinfo,d=[];if(v&&v!=="none"&&v!=="skip"){var m=v==="all",x=v.split("+"),g=function(E){return m||x.indexOf(E)!==-1};g("percent initial")&&d.push(o.percentInitialLabel+" of initial"),g("percent previous")&&d.push(o.percentPreviousLabel+" of previous"),g("percent total")&&d.push(o.percentTotalLabel+" of total")}return o.extraText=d.join("
"),o.color=E2t(l,f),[o]}};function E2t(e,t){var r=e.marker,n=t.mc||r.color,a=t.mlc||r.line.color,i=t.mlw||r.line.width;if(v2e(n))return n;if(v2e(a)&&i)return a}});var y2e=ne((nsr,m2e)=>{"use strict";m2e.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var b2e=ne((asr,x2e)=>{"use strict";x2e.exports={attributes:$O(),layoutAttributes:KO(),supplyDefaults:QO().supplyDefaults,crossTraceDefaults:QO().crossTraceDefaults,supplyLayoutDefaults:Kxe(),calc:n2e(),crossTraceCalc:o2e(),plot:c2e(),style:d2e().style,hoverPoints:g2e(),eventData:y2e(),selectPoints:R_(),moduleType:"trace",name:"funnel",basePlotModule:Ku(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var w2e=ne((isr,_2e)=>{"use strict";_2e.exports=b2e()});var A2e=ne((osr,T2e)=>{"use strict";T2e.exports={eventDataKeys:["initial","delta","final"]}});var iN=ne((ssr,k2e)=>{"use strict";var xl=Vp(),nN=Tu().line,k2t=os(),M2e=Wl().axisHoverFormat,{hovertemplateAttrs:C2t,texttemplateAttrs:L2t,templatefallbackAttrs:S2e}=rs(),E2e=A2e(),J_=ci().extendFlat,F2t=_a();function aN(e){return{marker:{color:J_({},xl.marker.color,{arrayOk:!1,editType:"style"}),line:{color:J_({},xl.marker.line.color,{arrayOk:!1,editType:"style"}),width:J_({},xl.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}k2e.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:xl.x,x0:xl.x0,dx:xl.dx,y:xl.y,y0:xl.y0,dy:xl.dy,xperiod:xl.xperiod,yperiod:xl.yperiod,xperiod0:xl.xperiod0,yperiod0:xl.yperiod0,xperiodalignment:xl.xperiodalignment,yperiodalignment:xl.yperiodalignment,xhoverformat:M2e("x"),yhoverformat:M2e("y"),hovertext:xl.hovertext,hovertemplate:C2t({},{keys:E2e.eventDataKeys}),hovertemplatefallback:S2e(),hoverinfo:J_({},k2t.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:L2t({editType:"plot"},{keys:E2e.eventDataKeys.concat(["label"])}),texttemplatefallback:S2e({editType:"plot"}),text:xl.text,textposition:xl.textposition,insidetextanchor:xl.insidetextanchor,textangle:xl.textangle,textfont:xl.textfont,insidetextfont:xl.insidetextfont,outsidetextfont:xl.outsidetextfont,constraintext:xl.constraintext,cliponaxis:xl.cliponaxis,orientation:xl.orientation,offset:xl.offset,width:xl.width,increasing:aN("increasing"),decreasing:aN("decreasing"),totals:aN("intermediate sums and total"),connector:{line:{color:J_({},nN.color,{dflt:F2t.defaultLine}),width:J_({},nN.width,{editType:"plot"}),dash:nN.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:xl.offsetgroup,alignmentgroup:xl.alignmentgroup,zorder:xl.zorder}});var oN=ne((lsr,C2e)=>{"use strict";C2e.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"}}});var Q_=ne((usr,L2e)=>{"use strict";L2e.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var lN=ne((csr,R2e)=>{"use strict";var F2e=Zt(),P2t=xx(),D2t=wv().handleText,R2t=yx(),I2t=U0(),P2e=iN(),z2t=_a(),D2e=Q_(),q2t=D2e.INCREASING.COLOR,B2t=D2e.DECREASING.COLOR,O2t="#4499FF";function sN(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",z2t.defaultLine),e(t+".marker.line.width")}function N2t(e,t,r,n){function a(u,c){return F2e.coerce(e,t,P2e,u,c)}var i=R2t(e,t,n,a);if(!i){t.visible=!1;return}I2t(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("measure"),a("orientation",t.x&&!t.y?"h":"v"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var o=a("textposition");D2t(e,t,n,a,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(a("texttemplate"),a("texttemplatefallback"),t.texttemplate||a("textinfo")),sN(a,"increasing",q2t),sN(a,"decreasing",B2t),sN(a,"totals",O2t);var s=a("connector.visible");if(s){a("connector.mode");var l=a("connector.line.width");l&&(a("connector.line.color"),a("connector.line.dash"))}a("zorder")}function U2t(e,t){var r,n;function a(o){return F2e.coerce(n._input,n,P2e,o)}if(t.waterfallmode==="group")for(var i=0;i{"use strict";var V2t=Zt(),G2t=oN();I2e.exports=function(e,t,r){var n=!1;function a(s,l){return V2t.coerce(e,t,G2t,s,l)}for(var i=0;i{"use strict";var q2e=ri(),B2e=H0(),O2e=Zt().mergeArray,H2t=mv(),N2e=uo().BADNUM;function uN(e){return e==="a"||e==="absolute"}function cN(e){return e==="t"||e==="total"}U2e.exports=function(t,r){var n=q2e.getFromId(t,r.xaxis||"x"),a=q2e.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c;r.orientation==="h"?(i=n.makeCalcdata(r,"x"),s=a.makeCalcdata(r,"y"),l=B2e(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=B2e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,i.length),h=new Array(f),v=0,d,m=!1,x=0;x{"use strict";var G2e=bx().setGroupPositions;H2e.exports=function(t,r){var n=t._fullLayout,a=t._fullData,i=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,h;for(h=0;h{"use strict";var W2e=Ea(),KC=Zt(),j2t=li(),e3=uo().BADNUM,W2t=Dx(),Y2t=Uh().clearMinTextSize;Y2e.exports=function(t,r,n,a){var i=t._fullLayout;Y2t("waterfall",i),W2t.plot(t,r,n,a,{mode:i.waterfallmode,norm:i.waterfallmode,gap:i.waterfallgap,groupgap:i.waterfallgroupgap}),X2t(t,r,n,a)};function X2t(e,t,r,n){var a=t.xaxis,i=t.yaxis;KC.makeTraceGroups(n,r,"trace bars").each(function(o){var s=W2e.select(this),l=o[0].trace,u=KC.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,h=u.selectAll("g.line").data(KC.identity);h.enter().append("g").classed("line",!0),h.exit().remove();var v=h.size();h.each(function(d,m){if(!(m!==v-1&&!d.cNext)){var x=Z2t(d,a,i,c),g=x[0],E=x[1],M="";g[0]!==e3&&E[0]!==e3&&g[1]!==e3&&E[1]!==e3&&(f==="spanning"&&!d.isSum&&m>0&&(c?M+="M"+g[0]+","+E[1]+"V"+E[0]:M+="M"+g[1]+","+E[0]+"H"+g[0]),f!=="between"&&(d.isSum||m{"use strict";var JC=Ea(),Z2e=li(),$2e=_a(),$2t=A1().DESELECTDIM,K2t=n0(),J2t=Uh().resizeText,Q2t=K2t.styleTextPoints;function ebt(e,t,r){var n=r||JC.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");J2t(e,n,"waterfall"),n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=JC.select(this),o=a[0].trace;i.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;JC.select(this).call($2e.fill,l.color).call($2e.stroke,l.line.color).call(Z2e.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?$2t:1)}}),Q2t(i,o,e),i.selectAll(".lines").each(function(){var s=o.connector.line;Z2e.lineGroupStyle(JC.select(this).selectAll("path"),s.width,s.color,s.dash)})})}K2e.exports={style:ebt}});var nbe=ne((gsr,rbe)=>{"use strict";var tbt=ri().hoverLabelText,Q2e=_a().opacity,rbt=D_().hoverOnBars,ebe=Q_(),tbe={increasing:ebe.INCREASING.SYMBOL,decreasing:ebe.DECREASING.SYMBOL};rbe.exports=function(t,r,n,a,i){var o=rbt(t,r,n,a,i);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function h(y){return tbt(f,y,l[c+"hoverformat"])}var v=o.index,d=s[v],m=d.isSum?d.b+d.s:d.rawS;o.initial=d.b+d.s-m,o.delta=m,o.final=o.initial+o.delta;var x=h(Math.abs(o.delta));o.deltaLabel=m<0?"("+x+")":x,o.finalLabel=h(o.final),o.initialLabel=h(o.initial);var g=d.hi||l.hoverinfo,E=[];if(g&&g!=="none"&&g!=="skip"){var M=g==="all",w=g.split("+"),k=function(y){return M||w.indexOf(y)!==-1};d.isSum||(k("final")&&(u?!k("x"):!k("y"))&&E.push(o.finalLabel),k("delta")&&(m<0?E.push(o.deltaLabel+" "+tbe.decreasing):E.push(o.deltaLabel+" "+tbe.increasing)),k("initial")&&E.push("Initial: "+o.initialLabel))}return E.length&&(o.extraText=E.join("
")),o.color=nbt(l,d),[o]};function nbt(e,t){var r=e[t.dir].marker,n=r.color,a=r.line.color,i=r.line.width;if(Q2e(n))return n;if(Q2e(a)&&i)return a}});var ibe=ne((msr,abe)=>{"use strict";abe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var sbe=ne((ysr,obe)=>{"use strict";obe.exports={attributes:iN(),layoutAttributes:oN(),supplyDefaults:lN().supplyDefaults,crossTraceDefaults:lN().crossTraceDefaults,supplyLayoutDefaults:z2e(),calc:V2e(),crossTraceCalc:j2e(),plot:X2e(),style:J2e().style,hoverPoints:nbe(),eventData:ibe(),selectPoints:R_(),moduleType:"trace",name:"waterfall",basePlotModule:Ku(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var ube=ne((xsr,lbe)=>{"use strict";lbe.exports=sbe()});var t3=ne((bsr,cbe)=>{"use strict";cbe.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var fN={};E0(fN,{default:()=>ibt});var fbe,hbe,QC,dbe,vbe,pbe,gbe,mbe,abt,ibt,hN=lo(()=>{"use strict";fbe=yp(ci()),hbe=yp(os()),QC=yp(rs()),dbe=yp(Tu()),vbe=yp(t3()),pbe=["rgb","rgba","rgba256","hsl","hsla"],gbe=[],mbe=[];for(let e of pbe){let t=vbe.colormodel[e];gbe.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),mbe.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}abt={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:pbe,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",gbe.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",mbe.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,fbe.extendFlat)({},hbe.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,QC.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,QC.templatefallbackAttrs)(),zorder:dbe.zorder},ibt=abt});var bbe=ne((_sr,xbe)=>{"use strict";var obt=Zt(),sbt=(hN(),vl(fN)).default,ybe=t3(),lbt=z1().IMAGE_URL_PREFIX;xbe.exports=function(t,r){function n(o,s){return obt.coerce(t,r,sbt,o,s)}n("source"),r.source&&!r.source.match(lbt)&&delete r.source,r._hasSource=!!r.source;var a=n("z");if(r._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var i;r._hasZ?(n("colormodel","rgb"),i=ybe.colormodel[r.colormodel],n("zmin",i.zminDflt||i.min),n("zmax",i.zmaxDflt||i.max)):r._hasSource&&(r.colormodel="rgba256",i=ybe.colormodel[r.colormodel],r.zmin=i.zminDflt,r.zmax=i.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),r._length=null,n("zorder")}});var Y1=ne((wsr,dN)=>{typeof Object.create=="function"?dN.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:dN.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var vN=ne((Tsr,_be)=>{_be.exports=Vy().EventEmitter});var Abe=ne(e8=>{"use strict";e8.byteLength=cbt;e8.toByteArray=hbt;e8.fromByteArray=pbt;var Zp=[],c0=[],ubt=typeof Uint8Array!="undefined"?Uint8Array:Array,pN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(Ox=0,wbe=pN.length;Ox0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function cbt(e){var t=Tbe(e),r=t[0],n=t[1];return(r+n)*3/4-n}function fbt(e,t,r){return(t+r)*3/4-r}function hbt(e){var t,r=Tbe(e),n=r[0],a=r[1],i=new ubt(fbt(e,n,a)),o=0,s=a>0?n-4:n,l;for(l=0;l>16&255,i[o++]=t>>8&255,i[o++]=t&255;return a===2&&(t=c0[e.charCodeAt(l)]<<2|c0[e.charCodeAt(l+1)]>>4,i[o++]=t&255),a===1&&(t=c0[e.charCodeAt(l)]<<10|c0[e.charCodeAt(l+1)]<<4|c0[e.charCodeAt(l+2)]>>2,i[o++]=t>>8&255,i[o++]=t&255),i}function dbt(e){return Zp[e>>18&63]+Zp[e>>12&63]+Zp[e>>6&63]+Zp[e&63]}function vbt(e,t,r){for(var n,a=[],i=t;is?s:o+i));return n===1?(t=e[r-1],a.push(Zp[t>>2]+Zp[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],a.push(Zp[t>>10]+Zp[t>>4&63]+Zp[t<<2&63]+"=")),a.join("")}});var Mbe=ne(gN=>{gN.read=function(e,t,r,n,a){var i,o,s=a*8-n-1,l=(1<>1,c=-7,f=r?a-1:0,h=r?-1:1,v=e[t+f];for(f+=h,i=v&(1<<-c)-1,v>>=-c,c+=s;c>0;i=i*256+e[t+f],f+=h,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=h,c-=8);if(i===0)i=1-u;else{if(i===l)return o?NaN:(v?-1:1)*(1/0);o=o+Math.pow(2,n),i=i-u}return(v?-1:1)*o*Math.pow(2,i-n)};gN.write=function(e,t,r,n,a,i){var o,s,l,u=i*8-a-1,c=(1<>1,h=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,v=n?0:i-1,d=n?1:-1,m=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=h/l:t+=h*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,a),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;e[r+v]=s&255,v+=d,s/=256,a-=8);for(o=o<0;e[r+v]=o&255,v+=d,o/=256,u-=8);e[r+v-d]|=m*128}});var Ux=ne(i3=>{"use strict";var mN=Abe(),n3=Mbe(),Sbe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;i3.Buffer=Jn;i3.SlowBuffer=_bt;i3.INSPECT_MAX_BYTES=50;var t8=2147483647;i3.kMaxLength=t8;Jn.TYPED_ARRAY_SUPPORT=gbt();!Jn.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function gbt(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(Jn.prototype,"parent",{enumerable:!0,get:function(){if(Jn.isBuffer(this))return this.buffer}});Object.defineProperty(Jn.prototype,"offset",{enumerable:!0,get:function(){if(Jn.isBuffer(this))return this.byteOffset}});function X1(e){if(e>t8)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Jn.prototype),t}function Jn(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _N(e)}return Lbe(e,t,r)}Jn.poolSize=8192;function Lbe(e,t,r){if(typeof e=="string")return ybt(e,t);if(ArrayBuffer.isView(e))return xbt(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if($p(e,ArrayBuffer)||e&&$p(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&($p(e,SharedArrayBuffer)||e&&$p(e.buffer,SharedArrayBuffer)))return xN(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return Jn.from(n,t,r);let a=bbt(e);if(a)return a;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Jn.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Jn.from=function(e,t,r){return Lbe(e,t,r)};Object.setPrototypeOf(Jn.prototype,Uint8Array.prototype);Object.setPrototypeOf(Jn,Uint8Array);function Fbe(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function mbt(e,t,r){return Fbe(e),e<=0?X1(e):t!==void 0?typeof r=="string"?X1(e).fill(t,r):X1(e).fill(t):X1(e)}Jn.alloc=function(e,t,r){return mbt(e,t,r)};function _N(e){return Fbe(e),X1(e<0?0:wN(e)|0)}Jn.allocUnsafe=function(e){return _N(e)};Jn.allocUnsafeSlow=function(e){return _N(e)};function ybt(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Jn.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=Pbe(e,t)|0,n=X1(r),a=n.write(e,t);return a!==r&&(n=n.slice(0,a)),n}function yN(e){let t=e.length<0?0:wN(e.length)|0,r=X1(t);for(let n=0;n=t8)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+t8.toString(16)+" bytes");return e|0}function _bt(e){return+e!=e&&(e=0),Jn.alloc(+e)}Jn.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Jn.prototype};Jn.compare=function(t,r){if($p(t,Uint8Array)&&(t=Jn.from(t,t.offset,t.byteLength)),$p(r,Uint8Array)&&(r=Jn.from(r,r.offset,r.byteLength)),!Jn.isBuffer(t)||!Jn.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,a=r.length;for(let i=0,o=Math.min(n,a);ia.length?(Jn.isBuffer(o)||(o=Jn.from(o)),o.copy(a,i)):Uint8Array.prototype.set.call(a,o,i);else if(Jn.isBuffer(o))o.copy(a,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return a};function Pbe(e,t){if(Jn.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||$p(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return bN(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return Ube(e).length;default:if(a)return n?-1:bN(e).length;t=(""+t).toLowerCase(),a=!0}}Jn.byteLength=Pbe;function wbt(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return Pbt(this,t,r);case"utf8":case"utf-8":return Rbe(this,t,r);case"ascii":return Lbt(this,t,r);case"latin1":case"binary":return Fbt(this,t,r);case"base64":return kbt(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Dbt(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Jn.prototype._isBuffer=!0;function Nx(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Jn.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};Sbe&&(Jn.prototype[Sbe]=Jn.prototype.inspect);Jn.prototype.compare=function(t,r,n,a,i){if($p(t,Uint8Array)&&(t=Jn.from(t,t.offset,t.byteLength)),!Jn.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),a===void 0&&(a=0),i===void 0&&(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(r>>>=0,n>>>=0,a>>>=0,i>>>=0,this===t)return 0;let o=i-a,s=n-r,l=Math.min(o,s),u=this.slice(a,i),c=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,AN(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0)if(a)r=0;else return-1;if(typeof t=="string"&&(t=Jn.from(t,n)),Jn.isBuffer(t))return t.length===0?-1:Ebe(e,t,r,n,a);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):Ebe(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function Ebe(e,t,r,n,a){let i=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,o/=2,s/=2,r/=2}function l(c,f){return i===1?c[f]:c.readUInt16BE(f*i)}let u;if(a){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fa&&(n=a)):n=a;let i=t.length;n>i/2&&(n=i/2);let o;for(o=0;o>>0,isFinite(n)?(n=n>>>0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((n===void 0||n>i)&&(n=i),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let o=!1;for(;;)switch(a){case"hex":return Tbt(this,t,r,n);case"utf8":case"utf-8":return Abt(this,t,r,n);case"ascii":case"latin1":case"binary":return Mbt(this,t,r,n);case"base64":return Sbt(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ebt(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),o=!0}};Jn.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function kbt(e,t,r){return t===0&&r===e.length?mN.fromByteArray(e):mN.fromByteArray(e.slice(t,r))}function Rbe(e,t,r){r=Math.min(e.length,r);let n=[],a=t;for(;a239?4:i>223?3:i>191?2:1;if(a+s<=r){let l,u,c,f;switch(s){case 1:i<128&&(o=i);break;case 2:l=e[a+1],(l&192)===128&&(f=(i&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[a+1],u=e[a+2],(l&192)===128&&(u&192)===128&&(f=(i&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[a+1],u=e[a+2],c=e[a+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(i&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),a+=s}return Cbt(n)}var kbe=4096;function Cbt(e){let t=e.length;if(t<=kbe)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let a="";for(let i=t;in&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}Jn.prototype.readUintLE=Jn.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||wh(t,r,this.length);let a=this[t],i=1,o=0;for(;++o>>0,r=r>>>0,n||wh(t,r,this.length);let a=this[t+--r],i=1;for(;r>0&&(i*=256);)a+=this[t+--r]*i;return a};Jn.prototype.readUint8=Jn.prototype.readUInt8=function(t,r){return t=t>>>0,r||wh(t,1,this.length),this[t]};Jn.prototype.readUint16LE=Jn.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||wh(t,2,this.length),this[t]|this[t+1]<<8};Jn.prototype.readUint16BE=Jn.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||wh(t,2,this.length),this[t]<<8|this[t+1]};Jn.prototype.readUint32LE=Jn.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||wh(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Jn.prototype.readUint32BE=Jn.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||wh(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Jn.prototype.readBigUInt64LE=Tm(function(t){t=t>>>0,a3(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&CT(t,this.length-8);let a=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(a)+(BigInt(i)<>>0,a3(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&CT(t,this.length-8);let a=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(a)<>>0,r=r>>>0,n||wh(t,r,this.length);let a=this[t],i=1,o=0;for(;++o=i&&(a-=Math.pow(2,8*r)),a};Jn.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||wh(t,r,this.length);let a=r,i=1,o=this[t+--a];for(;a>0&&(i*=256);)o+=this[t+--a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};Jn.prototype.readInt8=function(t,r){return t=t>>>0,r||wh(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Jn.prototype.readInt16LE=function(t,r){t=t>>>0,r||wh(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Jn.prototype.readInt16BE=function(t,r){t=t>>>0,r||wh(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Jn.prototype.readInt32LE=function(t,r){return t=t>>>0,r||wh(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Jn.prototype.readInt32BE=function(t,r){return t=t>>>0,r||wh(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Jn.prototype.readBigInt64LE=Tm(function(t){t=t>>>0,a3(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&CT(t,this.length-8);let a=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(a)<>>0,a3(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&CT(t,this.length-8);let a=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(a)<>>0,r||wh(t,4,this.length),n3.read(this,t,!0,23,4)};Jn.prototype.readFloatBE=function(t,r){return t=t>>>0,r||wh(t,4,this.length),n3.read(this,t,!1,23,4)};Jn.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||wh(t,8,this.length),n3.read(this,t,!0,52,8)};Jn.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||wh(t,8,this.length),n3.read(this,t,!1,52,8)};function Kd(e,t,r,n,a,i){if(!Jn.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}Jn.prototype.writeUintLE=Jn.prototype.writeUIntLE=function(t,r,n,a){if(t=+t,r=r>>>0,n=n>>>0,!a){let s=Math.pow(2,8*n)-1;Kd(this,t,r,n,s,0)}let i=1,o=0;for(this[r]=t&255;++o>>0,n=n>>>0,!a){let s=Math.pow(2,8*n)-1;Kd(this,t,r,n,s,0)}let i=n-1,o=1;for(this[r+i]=t&255;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+n};Jn.prototype.writeUint8=Jn.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||Kd(this,t,r,1,255,0),this[r]=t&255,r+1};Jn.prototype.writeUint16LE=Jn.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Kd(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Jn.prototype.writeUint16BE=Jn.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Kd(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Jn.prototype.writeUint32LE=Jn.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Kd(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};Jn.prototype.writeUint32BE=Jn.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Kd(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function Ibe(e,t,r,n,a){Nbe(t,n,a,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function zbe(e,t,r,n,a){Nbe(t,n,a,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}Jn.prototype.writeBigUInt64LE=Tm(function(t,r=0){return Ibe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Jn.prototype.writeBigUInt64BE=Tm(function(t,r=0){return zbe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Jn.prototype.writeIntLE=function(t,r,n,a){if(t=+t,r=r>>>0,!a){let l=Math.pow(2,8*n-1);Kd(this,t,r,n,l-1,-l)}let i=0,o=1,s=0;for(this[r]=t&255;++i>0)-s&255;return r+n};Jn.prototype.writeIntBE=function(t,r,n,a){if(t=+t,r=r>>>0,!a){let l=Math.pow(2,8*n-1);Kd(this,t,r,n,l-1,-l)}let i=n-1,o=1,s=0;for(this[r+i]=t&255;--i>=0&&(o*=256);)t<0&&s===0&&this[r+i+1]!==0&&(s=1),this[r+i]=(t/o>>0)-s&255;return r+n};Jn.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||Kd(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Jn.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||Kd(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Jn.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||Kd(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Jn.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||Kd(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};Jn.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||Kd(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};Jn.prototype.writeBigInt64LE=Tm(function(t,r=0){return Ibe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Jn.prototype.writeBigInt64BE=Tm(function(t,r=0){return zbe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function qbe(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function Bbe(e,t,r,n,a){return t=+t,r=r>>>0,a||qbe(e,t,r,4,34028234663852886e22,-34028234663852886e22),n3.write(e,t,r,n,23,4),r+4}Jn.prototype.writeFloatLE=function(t,r,n){return Bbe(this,t,r,!0,n)};Jn.prototype.writeFloatBE=function(t,r,n){return Bbe(this,t,r,!1,n)};function Obe(e,t,r,n,a){return t=+t,r=r>>>0,a||qbe(e,t,r,8,17976931348623157e292,-17976931348623157e292),n3.write(e,t,r,n,52,8),r+8}Jn.prototype.writeDoubleLE=function(t,r,n){return Obe(this,t,r,!0,n)};Jn.prototype.writeDoubleBE=function(t,r,n){return Obe(this,t,r,!1,n)};Jn.prototype.copy=function(t,r,n,a){if(!Jn.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!a&&a!==0&&(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,n=n===void 0?this.length:n>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i2**32?a=Cbe(String(r)):typeof r=="bigint"&&(a=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(a=Cbe(a)),a+="n"),n+=` It must be ${t}. Received ${a}`,n},RangeError);function Cbe(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function Rbt(e,t,r){a3(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&CT(t,e.length-(r+1))}function Nbe(e,t,r,n,a,i){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:s=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new r3.ERR_OUT_OF_RANGE("value",s,e)}Rbt(n,a,i)}function a3(e,t){if(typeof e!="number")throw new r3.ERR_INVALID_ARG_TYPE(t,"number",e)}function CT(e,t,r){throw Math.floor(e)!==e?(a3(e,r),new r3.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new r3.ERR_BUFFER_OUT_OF_BOUNDS:new r3.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var Ibt=/[^+/0-9A-Za-z-_]/g;function zbt(e){if(e=e.split("=")[0],e=e.trim().replace(Ibt,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function bN(e,t){t=t||1/0;let r,n=e.length,a=null,i=[];for(let o=0;o55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=(a-55296<<10|r-56320)+65536}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function qbt(e){let t=[];for(let r=0;r>8,a=r%256,i.push(a),i.push(n);return i}function Ube(e){return mN.toByteArray(zbt(e))}function r8(e,t,r,n){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function $p(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function AN(e){return e!==e}var Obt=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let a=0;a<16;++a)t[n+a]=e[r]+e[a]}return t})();function Tm(e){return typeof BigInt=="undefined"?Nbt:e}function Nbt(){throw new Error("BigInt not supported")}});var n8=ne((ksr,Vbe)=>{"use strict";Vbe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;t[r]=a;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==a||s.enumerable!==!0)return!1}return!0}});var LT=ne((Csr,Gbe)=>{"use strict";var Ubt=n8();Gbe.exports=function(){return Ubt()&&!!Symbol.toStringTag}});var MN=ne((Lsr,Hbe)=>{"use strict";Hbe.exports=Object});var Wbe=ne((Fsr,jbe)=>{"use strict";jbe.exports=Error});var Xbe=ne((Psr,Ybe)=>{"use strict";Ybe.exports=EvalError});var $be=ne((Dsr,Zbe)=>{"use strict";Zbe.exports=RangeError});var Jbe=ne((Rsr,Kbe)=>{"use strict";Kbe.exports=ReferenceError});var SN=ne((Isr,Qbe)=>{"use strict";Qbe.exports=SyntaxError});var o3=ne((zsr,e_e)=>{"use strict";e_e.exports=TypeError});var r_e=ne((qsr,t_e)=>{"use strict";t_e.exports=URIError});var a_e=ne((Bsr,n_e)=>{"use strict";n_e.exports=Math.abs});var o_e=ne((Osr,i_e)=>{"use strict";i_e.exports=Math.floor});var l_e=ne((Nsr,s_e)=>{"use strict";s_e.exports=Math.max});var c_e=ne((Usr,u_e)=>{"use strict";u_e.exports=Math.min});var h_e=ne((Vsr,f_e)=>{"use strict";f_e.exports=Math.pow});var v_e=ne((Gsr,d_e)=>{"use strict";d_e.exports=Math.round});var g_e=ne((Hsr,p_e)=>{"use strict";p_e.exports=Number.isNaN||function(t){return t!==t}});var y_e=ne((jsr,m_e)=>{"use strict";var Vbt=g_e();m_e.exports=function(t){return Vbt(t)||t===0?t:t<0?-1:1}});var b_e=ne((Wsr,x_e)=>{"use strict";x_e.exports=Object.getOwnPropertyDescriptor});var Vx=ne((Ysr,__e)=>{"use strict";var a8=b_e();if(a8)try{a8([],"length")}catch(e){a8=null}__e.exports=a8});var FT=ne((Xsr,w_e)=>{"use strict";var i8=Object.defineProperty||!1;if(i8)try{i8({},"a",{value:1})}catch(e){i8=!1}w_e.exports=i8});var M_e=ne((Zsr,A_e)=>{"use strict";var T_e=typeof Symbol!="undefined"&&Symbol,Gbt=n8();A_e.exports=function(){return typeof T_e!="function"||typeof Symbol!="function"||typeof T_e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:Gbt()}});var EN=ne(($sr,S_e)=>{"use strict";S_e.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var kN=ne((Ksr,E_e)=>{"use strict";var Hbt=MN();E_e.exports=Hbt.getPrototypeOf||null});var L_e=ne((Jsr,C_e)=>{"use strict";var jbt="Function.prototype.bind called on incompatible ",Wbt=Object.prototype.toString,Ybt=Math.max,Xbt="[object Function]",k_e=function(t,r){for(var n=[],a=0;a{"use strict";var Kbt=L_e();F_e.exports=Function.prototype.bind||Kbt});var o8=ne((elr,P_e)=>{"use strict";P_e.exports=Function.prototype.call});var CN=ne((tlr,D_e)=>{"use strict";D_e.exports=Function.prototype.apply});var I_e=ne((rlr,R_e)=>{"use strict";R_e.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var q_e=ne((nlr,z_e)=>{"use strict";var Jbt=s3(),Qbt=CN(),e_t=o8(),t_t=I_e();z_e.exports=t_t||Jbt.call(e_t,Qbt)});var O_e=ne((alr,B_e)=>{"use strict";var r_t=s3(),n_t=o3(),a_t=o8(),i_t=q_e();B_e.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new n_t("a function is required");return i_t(r_t,a_t,t)}});var j_e=ne((ilr,H_e)=>{"use strict";var o_t=O_e(),N_e=Vx(),V_e;try{V_e=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var LN=!!V_e&&N_e&&N_e(Object.prototype,"__proto__"),G_e=Object,U_e=G_e.getPrototypeOf;H_e.exports=LN&&typeof LN.get=="function"?o_t([LN.get]):typeof U_e=="function"?function(t){return U_e(t==null?t:G_e(t))}:!1});var $_e=ne((olr,Z_e)=>{"use strict";var W_e=EN(),Y_e=kN(),X_e=j_e();Z_e.exports=W_e?function(t){return W_e(t)}:Y_e?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return Y_e(t)}:X_e?function(t){return X_e(t)}:null});var J_e=ne((slr,K_e)=>{"use strict";var s_t=Function.prototype.call,l_t=Object.prototype.hasOwnProperty,u_t=s3();K_e.exports=u_t.call(s_t,l_t)});var u8=ne((llr,a3e)=>{"use strict";var ps,c_t=MN(),f_t=Wbe(),h_t=Xbe(),d_t=$be(),v_t=Jbe(),f3=SN(),c3=o3(),p_t=r_e(),g_t=a_e(),m_t=o_e(),y_t=l_e(),x_t=c_e(),b_t=h_e(),__t=v_e(),w_t=y_e(),r3e=Function,FN=function(e){try{return r3e('"use strict"; return ('+e+").constructor;")()}catch(t){}},PT=Vx(),T_t=FT(),PN=function(){throw new c3},A_t=PT?(function(){try{return arguments.callee,PN}catch(e){try{return PT(arguments,"callee").get}catch(t){return PN}}})():PN,l3=M_e()(),Th=$_e(),M_t=kN(),S_t=EN(),n3e=CN(),DT=o8(),u3={},E_t=typeof Uint8Array=="undefined"||!Th?ps:Th(Uint8Array),Gx={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?ps:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?ps:ArrayBuffer,"%ArrayIteratorPrototype%":l3&&Th?Th([][Symbol.iterator]()):ps,"%AsyncFromSyncIteratorPrototype%":ps,"%AsyncFunction%":u3,"%AsyncGenerator%":u3,"%AsyncGeneratorFunction%":u3,"%AsyncIteratorPrototype%":u3,"%Atomics%":typeof Atomics=="undefined"?ps:Atomics,"%BigInt%":typeof BigInt=="undefined"?ps:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?ps:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?ps:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?ps:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":f_t,"%eval%":eval,"%EvalError%":h_t,"%Float16Array%":typeof Float16Array=="undefined"?ps:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?ps:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?ps:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?ps:FinalizationRegistry,"%Function%":r3e,"%GeneratorFunction%":u3,"%Int8Array%":typeof Int8Array=="undefined"?ps:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?ps:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?ps:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l3&&Th?Th(Th([][Symbol.iterator]())):ps,"%JSON%":typeof JSON=="object"?JSON:ps,"%Map%":typeof Map=="undefined"?ps:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!l3||!Th?ps:Th(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":c_t,"%Object.getOwnPropertyDescriptor%":PT,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?ps:Promise,"%Proxy%":typeof Proxy=="undefined"?ps:Proxy,"%RangeError%":d_t,"%ReferenceError%":v_t,"%Reflect%":typeof Reflect=="undefined"?ps:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?ps:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!l3||!Th?ps:Th(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?ps:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l3&&Th?Th(""[Symbol.iterator]()):ps,"%Symbol%":l3?Symbol:ps,"%SyntaxError%":f3,"%ThrowTypeError%":A_t,"%TypedArray%":E_t,"%TypeError%":c3,"%Uint8Array%":typeof Uint8Array=="undefined"?ps:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?ps:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?ps:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?ps:Uint32Array,"%URIError%":p_t,"%WeakMap%":typeof WeakMap=="undefined"?ps:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?ps:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?ps:WeakSet,"%Function.prototype.call%":DT,"%Function.prototype.apply%":n3e,"%Object.defineProperty%":T_t,"%Object.getPrototypeOf%":M_t,"%Math.abs%":g_t,"%Math.floor%":m_t,"%Math.max%":y_t,"%Math.min%":x_t,"%Math.pow%":b_t,"%Math.round%":__t,"%Math.sign%":w_t,"%Reflect.getPrototypeOf%":S_t};if(Th)try{null.error}catch(e){Q_e=Th(Th(e)),Gx["%Error.prototype%"]=Q_e}var Q_e,k_t=function e(t){var r;if(t==="%AsyncFunction%")r=FN("async function () {}");else if(t==="%GeneratorFunction%")r=FN("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=FN("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&Th&&(r=Th(a.prototype))}return Gx[t]=r,r},e3e={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},RT=s3(),s8=J_e(),C_t=RT.call(DT,Array.prototype.concat),L_t=RT.call(n3e,Array.prototype.splice),t3e=RT.call(DT,String.prototype.replace),l8=RT.call(DT,String.prototype.slice),F_t=RT.call(DT,RegExp.prototype.exec),P_t=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D_t=/\\(\\)?/g,R_t=function(t){var r=l8(t,0,1),n=l8(t,-1);if(r==="%"&&n!=="%")throw new f3("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new f3("invalid intrinsic syntax, expected opening `%`");var a=[];return t3e(t,P_t,function(i,o,s,l){a[a.length]=s?t3e(l,D_t,"$1"):o||i}),a},I_t=function(t,r){var n=t,a;if(s8(e3e,n)&&(a=e3e[n],n="%"+a[0]+"%"),s8(Gx,n)){var i=Gx[n];if(i===u3&&(i=k_t(n)),typeof i=="undefined"&&!r)throw new c3("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new f3("intrinsic "+t+" does not exist!")};a3e.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new c3("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new c3('"allowMissing" argument must be a boolean');if(F_t(/^%?[^%]*%?$/,t)===null)throw new f3("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=R_t(t),a=n.length>0?n[0]:"",i=I_t("%"+a+"%",r),o=i.name,s=i.value,l=!1,u=i.alias;u&&(a=u[0],L_t(n,C_t([0,1],u)));for(var c=1,f=!0;c=n.length){var m=PT(s,h);f=!!m,f&&"get"in m&&!("originalValue"in m.get)?s=m.get:s=s[h]}else f=s8(s,h),s=s[h];f&&!l&&(Gx[o]=s)}}return s}});var l3e=ne((ulr,s3e)=>{"use strict";var i3e=FT(),z_t=SN(),h3=o3(),o3e=Vx();s3e.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new h3("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new h3("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new h3("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new h3("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new h3("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new h3("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!o3e&&o3e(t,r);if(i3e)i3e(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:i===null&&l?l.writable:!i});else if(s||!a&&!i&&!o)t[r]=n;else throw new z_t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var RN=ne((clr,c3e)=>{"use strict";var DN=FT(),u3e=function(){return!!DN};u3e.hasArrayLengthDefineBug=function(){if(!DN)return null;try{return DN([],"length",{value:1}).length!==1}catch(t){return!0}};c3e.exports=u3e});var p3e=ne((flr,v3e)=>{"use strict";var q_t=u8(),f3e=l3e(),B_t=RN()(),h3e=Vx(),d3e=o3(),O_t=q_t("%Math.floor%");v3e.exports=function(t,r){if(typeof t!="function")throw new d3e("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||O_t(r)!==r)throw new d3e("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,i=!0;if("length"in t&&h3e){var o=h3e(t,"length");o&&!o.configurable&&(a=!1),o&&!o.writable&&(i=!1)}return(a||i||!n)&&(B_t?f3e(t,"length",r,!0,!0):f3e(t,"length",r)),t}});var IT=ne((hlr,c8)=>{"use strict";var IN=s3(),f8=u8(),N_t=p3e(),U_t=o3(),y3e=f8("%Function.prototype.apply%"),x3e=f8("%Function.prototype.call%"),b3e=f8("%Reflect.apply%",!0)||IN.call(x3e,y3e),g3e=FT(),V_t=f8("%Math.max%");c8.exports=function(t){if(typeof t!="function")throw new U_t("a function is required");var r=b3e(IN,x3e,arguments);return N_t(r,1+V_t(0,t.length-(arguments.length-1)),!0)};var m3e=function(){return b3e(IN,y3e,arguments)};g3e?g3e(c8.exports,"apply",{value:m3e}):c8.exports.apply=m3e});var d3=ne((dlr,T3e)=>{"use strict";var _3e=u8(),w3e=IT(),G_t=w3e(_3e("String.prototype.indexOf"));T3e.exports=function(t,r){var n=_3e(t,!!r);return typeof n=="function"&&G_t(t,".prototype.")>-1?w3e(n):n}});var S3e=ne((vlr,M3e)=>{"use strict";var H_t=LT()(),j_t=d3(),zN=j_t("Object.prototype.toString"),h8=function(t){return H_t&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:zN(t)==="[object Arguments]"},A3e=function(t){return h8(t)?!0:t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&zN(t)!=="[object Array]"&&zN(t.callee)==="[object Function]"},W_t=(function(){return h8(arguments)})();h8.isLegacyArguments=A3e;M3e.exports=W_t?h8:A3e});var C3e=ne((plr,k3e)=>{"use strict";var Y_t=Object.prototype.toString,X_t=Function.prototype.toString,Z_t=/^\s*(?:function)?\*/,E3e=LT()(),qN=Object.getPrototypeOf,$_t=function(){if(!E3e)return!1;try{return Function("return function*() {}")()}catch(e){}},BN;k3e.exports=function(t){if(typeof t!="function")return!1;if(Z_t.test(X_t.call(t)))return!0;if(!E3e){var r=Y_t.call(t);return r==="[object GeneratorFunction]"}if(!qN)return!1;if(typeof BN=="undefined"){var n=$_t();BN=n?qN(n):!1}return qN(t)===BN}});var D3e=ne((glr,P3e)=>{"use strict";var F3e=Function.prototype.toString,v3=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,NN,d8;if(typeof v3=="function"&&typeof Object.defineProperty=="function")try{NN=Object.defineProperty({},"length",{get:function(){throw d8}}),d8={},v3(function(){throw 42},null,NN)}catch(e){e!==d8&&(v3=null)}else v3=null;var K_t=/^\s*class\b/,UN=function(t){try{var r=F3e.call(t);return K_t.test(r)}catch(n){return!1}},ON=function(t){try{return UN(t)?!1:(F3e.call(t),!0)}catch(r){return!1}},v8=Object.prototype.toString,J_t="[object Object]",Q_t="[object Function]",e3t="[object GeneratorFunction]",t3t="[object HTMLAllCollection]",r3t="[object HTML document.all class]",n3t="[object HTMLCollection]",a3t=typeof Symbol=="function"&&!!Symbol.toStringTag,i3t=!(0 in[,]),VN=function(){return!1};typeof document=="object"&&(L3e=document.all,v8.call(L3e)===v8.call(document.all)&&(VN=function(t){if((i3t||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=v8.call(t);return(r===t3t||r===r3t||r===n3t||r===J_t)&&t("")==null}catch(n){}return!1}));var L3e;P3e.exports=v3?function(t){if(VN(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{v3(t,null,NN)}catch(r){if(r!==d8)return!1}return!UN(t)&&ON(t)}:function(t){if(VN(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(a3t)return ON(t);if(UN(t))return!1;var r=v8.call(t);return r!==Q_t&&r!==e3t&&!/^\[object HTML/.test(r)?!1:ON(t)}});var GN=ne((mlr,I3e)=>{"use strict";var o3t=D3e(),s3t=Object.prototype.toString,R3e=Object.prototype.hasOwnProperty,l3t=function(t,r,n){for(var a=0,i=t.length;a=3&&(a=n),s3t.call(t)==="[object Array]"?l3t(t,r,a):typeof t=="string"?u3t(t,r,a):c3t(t,r,a)};I3e.exports=f3t});var jN=ne((ylr,z3e)=>{"use strict";var HN=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],h3t=typeof globalThis=="undefined"?window:globalThis;z3e.exports=function(){for(var t=[],r=0;r{"use strict";var g8=GN(),d3t=jN(),q3e=IT(),XN=d3(),p8=Vx(),v3t=XN("Object.prototype.toString"),O3e=LT()(),B3e=typeof globalThis=="undefined"?window:globalThis,YN=d3t(),ZN=XN("String.prototype.slice"),WN=Object.getPrototypeOf,p3t=XN("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1?r:r!=="Object"?!1:m3t(t)}return p8?g3t(t):null}});var Y3e=ne((blr,W3e)=>{"use strict";var V3e=GN(),y3t=jN(),KN=d3(),x3t=KN("Object.prototype.toString"),G3e=LT()(),y8=Vx(),b3t=typeof globalThis=="undefined"?window:globalThis,H3e=y3t(),_3t=KN("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}return y8?T3t(t):!1}});var eU=ne(gs=>{"use strict";var A3t=S3e(),M3t=C3e(),ep=U3e(),X3e=Y3e();function p3(e){return e.call.bind(e)}var Z3e=typeof BigInt!="undefined",$3e=typeof Symbol!="undefined",f0=p3(Object.prototype.toString),S3t=p3(Number.prototype.valueOf),E3t=p3(String.prototype.valueOf),k3t=p3(Boolean.prototype.valueOf);Z3e&&(K3e=p3(BigInt.prototype.valueOf));var K3e;$3e&&(J3e=p3(Symbol.prototype.valueOf));var J3e;function qT(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}gs.isArgumentsObject=A3t;gs.isGeneratorFunction=M3t;gs.isTypedArray=X3e;function C3t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}gs.isPromise=C3t;function L3t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):X3e(e)||ewe(e)}gs.isArrayBufferView=L3t;function F3t(e){return ep(e)==="Uint8Array"}gs.isUint8Array=F3t;function P3t(e){return ep(e)==="Uint8ClampedArray"}gs.isUint8ClampedArray=P3t;function D3t(e){return ep(e)==="Uint16Array"}gs.isUint16Array=D3t;function R3t(e){return ep(e)==="Uint32Array"}gs.isUint32Array=R3t;function I3t(e){return ep(e)==="Int8Array"}gs.isInt8Array=I3t;function z3t(e){return ep(e)==="Int16Array"}gs.isInt16Array=z3t;function q3t(e){return ep(e)==="Int32Array"}gs.isInt32Array=q3t;function B3t(e){return ep(e)==="Float32Array"}gs.isFloat32Array=B3t;function O3t(e){return ep(e)==="Float64Array"}gs.isFloat64Array=O3t;function N3t(e){return ep(e)==="BigInt64Array"}gs.isBigInt64Array=N3t;function U3t(e){return ep(e)==="BigUint64Array"}gs.isBigUint64Array=U3t;function x8(e){return f0(e)==="[object Map]"}x8.working=typeof Map!="undefined"&&x8(new Map);function V3t(e){return typeof Map=="undefined"?!1:x8.working?x8(e):e instanceof Map}gs.isMap=V3t;function b8(e){return f0(e)==="[object Set]"}b8.working=typeof Set!="undefined"&&b8(new Set);function G3t(e){return typeof Set=="undefined"?!1:b8.working?b8(e):e instanceof Set}gs.isSet=G3t;function _8(e){return f0(e)==="[object WeakMap]"}_8.working=typeof WeakMap!="undefined"&&_8(new WeakMap);function H3t(e){return typeof WeakMap=="undefined"?!1:_8.working?_8(e):e instanceof WeakMap}gs.isWeakMap=H3t;function QN(e){return f0(e)==="[object WeakSet]"}QN.working=typeof WeakSet!="undefined"&&QN(new WeakSet);function j3t(e){return QN(e)}gs.isWeakSet=j3t;function w8(e){return f0(e)==="[object ArrayBuffer]"}w8.working=typeof ArrayBuffer!="undefined"&&w8(new ArrayBuffer);function Q3e(e){return typeof ArrayBuffer=="undefined"?!1:w8.working?w8(e):e instanceof ArrayBuffer}gs.isArrayBuffer=Q3e;function T8(e){return f0(e)==="[object DataView]"}T8.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&T8(new DataView(new ArrayBuffer(1),0,1));function ewe(e){return typeof DataView=="undefined"?!1:T8.working?T8(e):e instanceof DataView}gs.isDataView=ewe;var JN=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function zT(e){return f0(e)==="[object SharedArrayBuffer]"}function twe(e){return typeof JN=="undefined"?!1:(typeof zT.working=="undefined"&&(zT.working=zT(new JN)),zT.working?zT(e):e instanceof JN)}gs.isSharedArrayBuffer=twe;function W3t(e){return f0(e)==="[object AsyncFunction]"}gs.isAsyncFunction=W3t;function Y3t(e){return f0(e)==="[object Map Iterator]"}gs.isMapIterator=Y3t;function X3t(e){return f0(e)==="[object Set Iterator]"}gs.isSetIterator=X3t;function Z3t(e){return f0(e)==="[object Generator]"}gs.isGeneratorObject=Z3t;function $3t(e){return f0(e)==="[object WebAssembly.Module]"}gs.isWebAssemblyCompiledModule=$3t;function rwe(e){return qT(e,S3t)}gs.isNumberObject=rwe;function nwe(e){return qT(e,E3t)}gs.isStringObject=nwe;function awe(e){return qT(e,k3t)}gs.isBooleanObject=awe;function iwe(e){return Z3e&&qT(e,K3e)}gs.isBigIntObject=iwe;function owe(e){return $3e&&qT(e,J3e)}gs.isSymbolObject=owe;function K3t(e){return rwe(e)||nwe(e)||awe(e)||iwe(e)||owe(e)}gs.isBoxedPrimitive=K3t;function J3t(e){return typeof Uint8Array!="undefined"&&(Q3e(e)||twe(e))}gs.isAnyArrayBuffer=J3t;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(gs,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var tU=ne((wlr,swe)=>{swe.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var sU=ne(ms=>{var lwe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},a=0;a=a)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),iU(t)?r.showHidden=t:t&&ms._extend(r,t),jx(r.showHidden)&&(r.showHidden=!1),jx(r.depth)&&(r.depth=2),jx(r.colors)&&(r.colors=!1),jx(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=ewt),E8(r,e,r.depth)}ms.inspect=Am;Am.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]};Am.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function ewt(e,t){var r=Am.styles[t];return r?"\x1B["+Am.colors[r][0]+"m"+e+"\x1B["+Am.colors[r][1]+"m":e}function twt(e,t){return e}function rwt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function E8(e,t,r){if(e.customInspect&&t&&S8(t.inspect)&&t.inspect!==ms.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return L8(n)||(n=E8(e,n,r)),n}var a=nwt(e,t);if(a)return a;var i=Object.keys(t),o=rwt(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),OT(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return rU(t);if(i.length===0){if(S8(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(BT(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(k8(t))return e.stylize(Date.prototype.toString.call(t),"date");if(OT(t))return rU(t)}var l="",u=!1,c=["{","}"];if(cwe(t)&&(u=!0,c=["[","]"]),S8(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(BT(t)&&(l=" "+RegExp.prototype.toString.call(t)),k8(t)&&(l=" "+Date.prototype.toUTCString.call(t)),OT(t)&&(l=" "+rU(t)),i.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return BT(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=awt(e,t,r,o,i):h=i.map(function(v){return aU(e,t,r,o,v,u)}),e.seen.pop(),iwt(h,l,c)}function nwt(e,t){if(jx(t))return e.stylize("undefined","undefined");if(L8(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(fwe(t))return e.stylize(""+t,"number");if(iU(t))return e.stylize(""+t,"boolean");if(C8(t))return e.stylize("null","null")}function rU(e){return"["+Error.prototype.toString.call(e)+"]"}function awt(e,t,r,n,a){for(var i=[],o=0,s=t.length;o{var bat=Object.create;var T4=Object.defineProperty,wat=Object.defineProperties,Tat=Object.getOwnPropertyDescriptor,Aat=Object.getOwnPropertyDescriptors,Mat=Object.getOwnPropertyNames,YS=Object.getOwnPropertySymbols,Sat=Object.getPrototypeOf,GI=Object.prototype.hasOwnProperty,Ste=Object.prototype.propertyIsEnumerable;var VI=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Eat=e=>{throw TypeError(e)};var Mte=(e,t,r)=>t in e?T4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zo=(e,t)=>{for(var r in t||(t={}))GI.call(t,r)&&Mte(e,r,t[r]);if(YS)for(var r of YS(t))Ste.call(t,r)&&Mte(e,r,t[r]);return e},tl=(e,t)=>wat(e,Aat(t));var Ete=(e,t)=>{var r={};for(var n in e)GI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&YS)for(var n of YS(e))t.indexOf(n)<0&&Ste.call(e,n)&&(r[n]=e[n]);return r};var Co=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var fe=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},zp=(e,t)=>{for(var r in t)T4(e,r,{get:t[r],enumerable:!0})},kte=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Mat(t))!GI.call(e,a)&&a!==r&&T4(e,a,{get:()=>t[a],enumerable:!(n=Tat(t,a))||n.enumerable});return e};var $0=(e,t,r)=>(r=e!=null?bat(Sat(e)):{},kte(t||!e||!e.__esModule?T4(r,"default",{value:e,enumerable:!0}):r,e)),Gs=e=>kte(T4({},"__esModule",{value:!0}),e);var kat=function(e,t){this[0]=e,this[1]=t};var Cte=e=>{var t=e[VI("asyncIterator")],r=!1,n,a={};return t==null?(t=e[VI("iterator")](),n=i=>a[i]=o=>t[i](o)):(t=t.call(e),n=i=>a[i]=o=>{if(r){if(r=!1,i==="throw")throw o;return o}return r=!0,{done:!1,value:new kat(new Promise(s=>{var l=t[i](o);l instanceof Object||Eat("Object expected"),s(l)}),1)}}),a[VI("iterator")]=()=>a,n("next"),"throw"in t?n("throw"):a.throw=i=>{throw i},"return"in t&&n("return"),a};var A4=fe(Lte=>{"use strict";Lte.version="4.0.0"});var Fte=fe((Pte,XS)=>{(function(t,r,n){r[t]=r[t]||n(),typeof XS!="undefined"&&XS.exports&&(XS.exports=r[t])})("Promise",typeof window!="undefined"?window:Pte,function(){"use strict";var t,r,n,a=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(C){return setImmediate(C)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(C,k,S,L){return Object.defineProperty(C,k,{value:S,writable:!0,configurable:L!==!1})}}catch(y){t=function(k,S,L){return k[S]=L,k}}n=(function(){var C,k,S;function L(w,A){this.fn=w,this.self=A,this.next=void 0}return{add:function(A,T){S=new L(A,T),k?k.next=S:C=S,k=S,S=void 0},drain:function(){var A=C;for(C=k=r=void 0;A;)A.fn.call(A.self),A=A.next}}})();function o(y,C){n.add(y,C),r||(r=i(n.drain))}function s(y){var C,k=typeof y;return y!=null&&(k=="object"||k=="function")&&(C=y.then),typeof C=="function"?C:!1}function l(){for(var y=0;y0&&o(l,k))}catch(S){f.call(new g(k),S)}}}function f(y){var C=this;C.triggered||(C.triggered=!0,C.def&&(C=C.def),C.msg=y,C.state=2,C.chain.length>0&&o(l,C))}function v(y,C,k,S){for(var L=0;L{(function(){var e={version:"3.8.2"},t=[].slice,r=function(W){return t.call(W)},n=self.document;function a(W){return W&&(W.ownerDocument||W.document||W).documentElement}function i(W){return W&&(W.ownerDocument&&W.ownerDocument.defaultView||W.document&&W||W.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(W){r=function(te){for(var ve=te.length,Se=new Array(ve);ve--;)Se[ve]=te[ve];return Se}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(W){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(te,ve){s.call(this,te,ve+"")},o.setAttributeNS=function(te,ve,Se){l.call(this,te,ve,Se+"")},u.setProperty=function(te,ve,Se){c.call(this,te,ve+"",Se)}}e.ascending=f;function f(W,te){return Wte?1:W>=te?0:NaN}e.descending=function(W,te){return teW?1:te>=W?0:NaN},e.min=function(W,te){var ve=-1,Se=W.length,Ee,Re;if(arguments.length===1){for(;++ve=Re){Ee=Re;break}for(;++veRe&&(Ee=Re)}else{for(;++ve=Re){Ee=Re;break}for(;++veRe&&(Ee=Re)}return Ee},e.max=function(W,te){var ve=-1,Se=W.length,Ee,Re;if(arguments.length===1){for(;++ve=Re){Ee=Re;break}for(;++veEe&&(Ee=Re)}else{for(;++ve=Re){Ee=Re;break}for(;++veEe&&(Ee=Re)}return Ee},e.extent=function(W,te){var ve=-1,Se=W.length,Ee,Re,rt;if(arguments.length===1){for(;++ve=Re){Ee=rt=Re;break}for(;++veRe&&(Ee=Re),rt=Re){Ee=rt=Re;break}for(;++veRe&&(Ee=Re),rt1)return rt/(pt-1)},e.deviation=function(){var W=e.variance.apply(this,arguments);return W&&Math.sqrt(W)};function p(W){return{left:function(te,ve,Se,Ee){for(arguments.length<3&&(Se=0),arguments.length<4&&(Ee=te.length);Se>>1;W(te[Re],ve)<0?Se=Re+1:Ee=Re}return Se},right:function(te,ve,Se,Ee){for(arguments.length<3&&(Se=0),arguments.length<4&&(Ee=te.length);Se>>1;W(te[Re],ve)>0?Ee=Re:Se=Re+1}return Se}}}var x=p(f);e.bisectLeft=x.left,e.bisect=e.bisectRight=x.right,e.bisector=function(W){return p(W.length===1?function(te,ve){return f(W(te),ve)}:W)},e.shuffle=function(W,te,ve){(Se=arguments.length)<3&&(ve=W.length,Se<2&&(te=0));for(var Se=ve-te,Ee,Re;Se;)Re=Math.random()*Se--|0,Ee=W[Se+te],W[Se+te]=W[Re+te],W[Re+te]=Ee;return W},e.permute=function(W,te){for(var ve=te.length,Se=new Array(ve);ve--;)Se[ve]=W[te[ve]];return Se},e.pairs=function(W){for(var te=0,ve=W.length-1,Se,Ee=W[0],Re=new Array(ve<0?0:ve);te=0;)for(rt=W[te],ve=rt.length;--ve>=0;)Re[--Ee]=rt[ve];return Re};var y=Math.abs;e.range=function(W,te,ve){if(arguments.length<3&&(ve=1,arguments.length<2&&(te=W,W=0)),(te-W)/ve===1/0)throw new Error("infinite range");var Se=[],Ee=C(y(ve)),Re=-1,rt;if(W*=Ee,te*=Ee,ve*=Ee,ve<0)for(;(rt=W+ve*++Re)>te;)Se.push(rt/Ee);else for(;(rt=W+ve*++Re)=te.length)return Ee?Ee.call(W,pt):Se?pt.sort(Se):pt;for(var Rt=-1,ir=pt.length,nr=te[Ft++],Cr,Vr,sr,br=new S,kr;++Rt=te.length)return He;var Ft=[],Rt=ve[pt++];return He.forEach(function(ir,nr){Ft.push({key:ir,values:rt(nr,pt)})}),Rt?Ft.sort(function(ir,nr){return Rt(ir.key,nr.key)}):Ft}return W.map=function(He,pt){return Re(pt,He,0)},W.entries=function(He){return rt(Re(e.map,He,0),0)},W.key=function(He){return te.push(He),W},W.sortKeys=function(He){return ve[te.length-1]=He,W},W.sortValues=function(He){return Se=He,W},W.rollup=function(He){return Ee=He,W},W},e.set=function(W){var te=new B;if(W)for(var ve=0,Se=W.length;ve=0&&(Se=W.slice(ve+1),W=W.slice(0,ve)),W)return arguments.length<2?this[W].on(Se):this[W].on(Se,te);if(arguments.length===2){if(te==null)for(W in this)this.hasOwnProperty(W)&&this[W].on(Se,null);return this}};function ee(W){var te=[],ve=new S;function Se(){for(var Ee=te,Re=-1,rt=Ee.length,He;++Re=0&&(ve=W.slice(0,te))!=="xmlns"&&(W=W.slice(te+1)),De.hasOwnProperty(ve)?{space:De[ve],local:W}:W}},ie.attr=function(W,te){if(arguments.length<2){if(typeof W=="string"){var ve=this.node();return W=e.ns.qualify(W),W.local?ve.getAttributeNS(W.space,W.local):ve.getAttribute(W)}for(te in W)this.each(Ge(te,W[te]));return this}return this.each(Ge(W,te))};function Ge(W,te){W=e.ns.qualify(W);function ve(){this.removeAttribute(W)}function Se(){this.removeAttributeNS(W.space,W.local)}function Ee(){this.setAttribute(W,te)}function Re(){this.setAttributeNS(W.space,W.local,te)}function rt(){var pt=te.apply(this,arguments);pt==null?this.removeAttribute(W):this.setAttribute(W,pt)}function He(){var pt=te.apply(this,arguments);pt==null?this.removeAttributeNS(W.space,W.local):this.setAttributeNS(W.space,W.local,pt)}return te==null?W.local?Se:ve:typeof te=="function"?W.local?He:rt:W.local?Re:Ee}function ht(W){return W.trim().replace(/\s+/g," ")}ie.classed=function(W,te){if(arguments.length<2){if(typeof W=="string"){var ve=this.node(),Se=(W=Oe(W)).length,Ee=-1;if(te=ve.classList){for(;++Ee=0;)(Re=ve[Se])&&(Ee&&Ee!==Re.nextSibling&&Ee.parentNode.insertBefore(Re,Ee),Ee=Re);return this},ie.sort=function(W){W=Ve.apply(this,arguments);for(var te=-1,ve=this.length;++te=te&&(te=Ee+1);!(pt=rt[te])&&++te0&&(W=W.slice(0,Ee));var rt=mt.get(W);rt&&(W=rt,Re=Yt);function He(){var Rt=this[Se];Rt&&(this.removeEventListener(W,Rt,Rt.$),delete this[Se])}function pt(){var Rt=Re(te,r(arguments));He.call(this),this.addEventListener(W,this[Se]=Rt,Rt.$=ve),Rt._=te}function Ft(){var Rt=new RegExp("^__on([^.]+)"+e.requote(W)+"$"),ir;for(var nr in this)if(ir=nr.match(Rt)){var Cr=this[nr];this.removeEventListener(ir[1],Cr,Cr.$),delete this[nr]}}return Ee?te?pt:He:te?U:Ft}var mt=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&mt.forEach(function(W){"on"+W in n&&mt.remove(W)});function bt(W,te){return function(ve){var Se=e.event;e.event=ve,te[0]=this.__data__;try{W.apply(this,te)}finally{e.event=Se}}}function Yt(W,te){var ve=bt(W,te);return function(Se){var Ee=this,Re=Se.relatedTarget;(!Re||Re!==Ee&&!(Re.compareDocumentPosition(Ee)&8))&&ve.call(Ee,Se)}}var jt,mr=0;function or(W){var te=".dragsuppress-"+ ++mr,ve="click"+te,Se=e.select(i(W)).on("touchmove"+te,ce).on("dragstart"+te,ce).on("selectstart"+te,ce);if(jt==null&&(jt="onselectstart"in W?!1:j(W.style,"userSelect")),jt){var Ee=a(W).style,Re=Ee[jt];Ee[jt]="none"}return function(rt){if(Se.on(te,null),jt&&(Ee[jt]=Re),rt){var He=function(){Se.on(ve,null)};Se.on(ve,function(){ce(),He()},!0),setTimeout(He,0)}}}e.mouse=function(W){return Ot(W,ye())};var fr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(W,te){te.changedTouches&&(te=te.changedTouches[0]);var ve=W.ownerSVGElement||W;if(ve.createSVGPoint){var Se=ve.createSVGPoint();if(fr<0){var Ee=i(W);if(Ee.scrollX||Ee.scrollY){ve=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Re=ve[0][0].getScreenCTM();fr=!(Re.f||Re.e),ve.remove()}}return fr?(Se.x=te.pageX,Se.y=te.pageY):(Se.x=te.clientX,Se.y=te.clientY),Se=Se.matrixTransform(W.getScreenCTM().inverse()),[Se.x,Se.y]}var rt=W.getBoundingClientRect();return[te.clientX-rt.left-W.clientLeft,te.clientY-rt.top-W.clientTop]}e.touch=function(W,te,ve){if(arguments.length<3&&(ve=te,te=ye().changedTouches),te){for(var Se=0,Ee=te.length,Re;Se0?1:W<0?-1:0}function Kr(W,te,ve){return(te[0]-W[0])*(ve[1]-W[1])-(te[1]-W[1])*(ve[0]-W[0])}function Nr(W){return W>1?0:W<-1?Tt:Math.acos(W)}function dn(W){return W>1?ft:W<-1?-ft:Math.asin(W)}function xr(W){return((W=Math.exp(W))-1/W)/2}function Fr(W){return((W=Math.exp(W))+1/W)/2}function Zr(W){return((W=Math.exp(2*W))-1)/(W+1)}function Cn(W){return(W=Math.sin(W/2))*W}var Dt=Math.SQRT2,At=2,Vt=4;e.interpolateZoom=function(W,te){var ve=W[0],Se=W[1],Ee=W[2],Re=te[0],rt=te[1],He=te[2],pt=Re-ve,Ft=rt-Se,Rt=pt*pt+Ft*Ft,ir,nr;if(Rt0&&($=$.transition().duration(rt)),$.call(Wr.event)}function Mi(){br&&br.domain(sr.range().map(function($){return($-W.x)/W.k}).map(sr.invert)),Gr&&Gr.domain(kr.range().map(function($){return($-W.y)/W.k}).map(kr.invert))}function Si($){He++||$({type:"zoomstart"})}function ya($){Mi(),$({type:"zoom",scale:W.k,translate:[W.x,W.y]})}function Y($){--He||($({type:"zoomend"}),ve=null)}function d(){var $=this,se=Vr.of($,arguments),de=0,Ae=e.select(i($)).on(Ft,Ye).on(Rt,st),Fe=Ar(e.mouse($)),Ie=or($);ua.call($),Si(se);function Ye(){de=1,Zn(e.mouse($),Fe),ya(se)}function st(){Ae.on(Ft,null).on(Rt,null),Ie(de),Y(se)}}function P(){var $=this,se=Vr.of($,arguments),de={},Ae=0,Fe,Ie=".zoom-"+e.event.changedTouches[0].identifier,Ye="touchmove"+Ie,st="touchend"+Ie,dt=[],Pe=e.select($),Xe=or($);xt(),Si(se),Pe.on(pt,null).on(nr,xt);function at(){var St=e.touches($);return Fe=W.k,St.forEach(function(Pt){Pt.identifier in de&&(de[Pt.identifier]=Ar(Pt))}),St}function xt(){var St=e.event.target;e.select(St).on(Ye,Et).on(st,Bt),dt.push(St);for(var Pt=e.event.changedTouches,$t=0,Ht=Pt.length;$t1){var Or=dr[0],$r=dr[1],Er=Or[0]-$r[0],Tr=Or[1]-$r[1];Ae=Er*Er+Tr*Tr}}function Et(){var St=e.touches($),Pt,$t,Ht,dr;ua.call($);for(var Xr=0,Or=St.length;Xr1?1:te,ve=ve<0?0:ve>1?1:ve,Ee=ve<=.5?ve*(1+te):ve+te-ve*te,Se=2*ve-Ee;function Re(He){return He>360?He-=360:He<0&&(He+=360),He<60?Se+(Ee-Se)*He/60:He<180?Ee:He<240?Se+(Ee-Se)*(240-He)/60:Se}function rt(He){return Math.round(Re(He)*255)}return new ao(rt(W+120),rt(W),rt(W-120))}e.hcl=Jn;function Jn(W,te,ve){return this instanceof Jn?(this.h=+W,this.c=+te,void(this.l=+ve)):arguments.length<2?W instanceof Jn?new Jn(W.h,W.c,W.l):W instanceof ra?ss(W.l,W.a,W.b):ss((W=Af((W=e.rgb(W)).r,W.g,W.b)).l,W.a,W.b):new Jn(W,te,ve)}var Ii=Jn.prototype=new rn;Ii.brighter=function(W){return new Jn(this.h,this.c,Math.min(100,this.l+ha*(arguments.length?W:1)))},Ii.darker=function(W){return new Jn(this.h,this.c,Math.max(0,this.l-ha*(arguments.length?W:1)))},Ii.rgb=function(){return Vi(this.h,this.c,this.l).rgb()};function Vi(W,te,ve){return isNaN(W)&&(W=0),isNaN(te)&&(te=0),new ra(ve,Math.cos(W*=kt)*te,Math.sin(W)*te)}e.lab=ra;function ra(W,te,ve){return this instanceof ra?(this.l=+W,this.a=+te,void(this.b=+ve)):arguments.length<2?W instanceof ra?new ra(W.l,W.a,W.b):W instanceof Jn?Vi(W.h,W.c,W.l):Af((W=ao(W)).r,W.g,W.b):new ra(W,te,ve)}var ha=18,va=.95047,Xi=1,oa=1.08883,Ma=ra.prototype=new rn;Ma.brighter=function(W){return new ra(Math.min(100,this.l+ha*(arguments.length?W:1)),this.a,this.b)},Ma.darker=function(W){return new ra(Math.max(0,this.l-ha*(arguments.length?W:1)),this.a,this.b)},Ma.rgb=function(){return Ga(this.l,this.a,this.b)};function Ga(W,te,ve){var Se=(W+16)/116,Ee=Se+te/500,Re=Se-ve/200;return Ee=mo(Ee)*va,Se=mo(Se)*Xi,Re=mo(Re)*oa,new ao(Eo(3.2404542*Ee-1.5371385*Se-.4985314*Re),Eo(-.969266*Ee+1.8760108*Se+.041556*Re),Eo(.0556434*Ee-.2040259*Se+1.0572252*Re))}function ss(W,te,ve){return W>0?new Jn(Math.atan2(ve,te)*rr,Math.sqrt(te*te+ve*ve),W):new Jn(NaN,NaN,W)}function mo(W){return W>.206893034?W*W*W:(W-4/29)/7.787037}function sl(W){return W>.008856?Math.pow(W,1/3):7.787037*W+4/29}function Eo(W){return Math.round(255*(W<=.00304?12.92*W:1.055*Math.pow(W,1/2.4)-.055))}e.rgb=ao;function ao(W,te,ve){return this instanceof ao?(this.r=~~W,this.g=~~te,void(this.b=~~ve)):arguments.length<2?W instanceof ao?new ao(W.r,W.g,W.b):su(""+W,ao,ri):new ao(W,te,ve)}function Da(W){return new ao(W>>16,W>>8&255,W&255)}function bl(W){return Da(W)+""}var bo=ao.prototype=new rn;bo.brighter=function(W){W=Math.pow(.7,arguments.length?W:1);var te=this.r,ve=this.g,Se=this.b,Ee=30;return!te&&!ve&&!Se?new ao(Ee,Ee,Ee):(te&&te>4,Se=Se>>4|Se,Ee=pt&240,Ee=Ee>>4|Ee,Re=pt&15,Re=Re<<4|Re):W.length===7&&(Se=(pt&16711680)>>16,Ee=(pt&65280)>>8,Re=pt&255)),te(Se,Ee,Re))}function fc(W,te,ve){var Se=Math.min(W/=255,te/=255,ve/=255),Ee=Math.max(W,te,ve),Re=Ee-Se,rt,He,pt=(Ee+Se)/2;return Re?(He=pt<.5?Re/(Ee+Se):Re/(2-Ee-Se),W==Ee?rt=(te-ve)/Re+(te0&&pt<1?0:rt),new Jr(rt,He,pt)}function Af(W,te,ve){W=ut(W),te=ut(te),ve=ut(ve);var Se=sl((.4124564*W+.3575761*te+.1804375*ve)/va),Ee=sl((.2126729*W+.7151522*te+.072175*ve)/Xi),Re=sl((.0193339*W+.119192*te+.9503041*ve)/oa);return ra(116*Ee-16,500*(Se-Ee),200*(Ee-Re))}function ut(W){return(W/=255)<=.04045?W/12.92:Math.pow((W+.055)/1.055,2.4)}function Jt(W){var te=parseFloat(W);return W.charAt(W.length-1)==="%"?Math.round(te*2.55):te}var er=e.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});er.forEach(function(W,te){er.set(W,Da(te))});function wr(W){return typeof W=="function"?W:function(){return W}}e.functor=wr,e.xhr=nn(O);function nn(W){return function(te,ve,Se){return arguments.length===2&&typeof ve=="function"&&(Se=ve,ve=null),Dr(te,ve,W,Se)}}function Dr(W,te,ve,Se){var Ee={},Re=e.dispatch("beforesend","progress","load","error"),rt={},He=new XMLHttpRequest,pt=null;self.XDomainRequest&&!("withCredentials"in He)&&/^(http(s)?:)?\/\//.test(W)&&(He=new XDomainRequest),"onload"in He?He.onload=He.onerror=Ft:He.onreadystatechange=function(){He.readyState>3&&Ft()};function Ft(){var Rt=He.status,ir;if(!Rt&&Yr(He)||Rt>=200&&Rt<300||Rt===304){try{ir=ve.call(Ee,He)}catch(nr){Re.error.call(Ee,nr);return}Re.load.call(Ee,ir)}else Re.error.call(Ee,He)}return He.onprogress=function(Rt){var ir=e.event;e.event=Rt;try{Re.progress.call(Ee,He)}finally{e.event=ir}},Ee.header=function(Rt,ir){return Rt=(Rt+"").toLowerCase(),arguments.length<2?rt[Rt]:(ir==null?delete rt[Rt]:rt[Rt]=ir+"",Ee)},Ee.mimeType=function(Rt){return arguments.length?(te=Rt==null?null:Rt+"",Ee):te},Ee.responseType=function(Rt){return arguments.length?(pt=Rt,Ee):pt},Ee.response=function(Rt){return ve=Rt,Ee},["get","post"].forEach(function(Rt){Ee[Rt]=function(){return Ee.send.apply(Ee,[Rt].concat(r(arguments)))}}),Ee.send=function(Rt,ir,nr){if(arguments.length===2&&typeof ir=="function"&&(nr=ir,ir=null),He.open(Rt,W,!0),te!=null&&!("accept"in rt)&&(rt.accept=te+",*/*"),He.setRequestHeader)for(var Cr in rt)He.setRequestHeader(Cr,rt[Cr]);return te!=null&&He.overrideMimeType&&He.overrideMimeType(te),pt!=null&&(He.responseType=pt),nr!=null&&Ee.on("error",nr).on("load",function(Vr){nr(null,Vr)}),Re.beforesend.call(Ee,He),He.send(ir==null?null:ir),Ee},Ee.abort=function(){return He.abort(),Ee},e.rebind(Ee,Re,"on"),Se==null?Ee:Ee.get(bn(Se))}function bn(W){return W.length===1?function(te,ve){W(te==null?ve:null)}:W}function Yr(W){var te=W.responseType;return te&&te!=="text"?W.response:W.responseText}e.dsv=function(W,te){var ve=new RegExp('["'+W+` +]`),Se=W.charCodeAt(0);function Ee(Ft,Rt,ir){arguments.length<3&&(ir=Rt,Rt=null);var nr=Dr(Ft,te,Rt==null?Re:rt(Rt),ir);return nr.row=function(Cr){return arguments.length?nr.response((Rt=Cr)==null?Re:rt(Cr)):Rt},nr}function Re(Ft){return Ee.parse(Ft.responseText)}function rt(Ft){return function(Rt){return Ee.parse(Rt.responseText,Ft)}}Ee.parse=function(Ft,Rt){var ir;return Ee.parseRows(Ft,function(nr,Cr){if(ir)return ir(nr,Cr-1);var Vr=function(sr){for(var br={},kr=nr.length,Gr=0;Gr=Vr)return nr;if(Gr)return Gr=!1,ir;var En=sr;if(Ft.charCodeAt(En)===34){for(var zn=En;zn++24?(isFinite(te)&&(clearTimeout(Ai),Ai=setTimeout(ii,te)),Qn=0):(Qn=1,Ji(ii))}e.timer.flush=function(){Za(),ja()};function Za(){for(var W=Date.now(),te=Tn;te;)W>=te.t&&te.c(W-te.t)&&(te.c=null),te=te.n;return W}function ja(){for(var W,te=Tn,ve=1/0;te;)te.c?(te.t=0;--He)sr.push(Ee[Ft[ir[He]][2]]);for(He=+Cr;He1&&Kr(W[ve[Se-2]],W[ve[Se-1]],W[Ee])<=0;)--Se;ve[Se++]=Ee}return ve.slice(0,Se)}function Oa(W,te){return W[0]-te[0]||W[1]-te[1]}e.geom.polygon=function(W){return K(W,Ni),W};var Ni=e.geom.polygon.prototype=[];Ni.area=function(){for(var W=-1,te=this.length,ve,Se=this[te-1],Ee=0;++WCt)He=He.L;else if(rt=te-Gu(He,ve),rt>Ct){if(!He.R){Se=He;break}He=He.R}else{Re>-Ct?(Se=He.P,Ee=He):rt>-Ct?(Se=He,Ee=He.N):Se=Ee=He;break}var pt=rs(W);if(ko.insert(Se,pt),!(!Se&&!Ee)){if(Se===Ee){Ca(Se),Ee=rs(Se.site),ko.insert(pt,Ee),pt.edge=Ee.edge=Mf(Se.site,pt.site),Ps(Se),Ps(Ee);return}if(!Ee){pt.edge=Mf(Se.site,pt.site);return}Ca(Se),Ca(Ee);var Ft=Se.site,Rt=Ft.x,ir=Ft.y,nr=W.x-Rt,Cr=W.y-ir,Vr=Ee.site,sr=Vr.x-Rt,br=Vr.y-ir,kr=2*(nr*br-Cr*sr),Gr=nr*nr+Cr*Cr,Wr=sr*sr+br*br,Ar={x:(br*Gr-Cr*Wr)/kr+Rt,y:(nr*Wr-sr*Gr)/kr+ir};Hu(Ee.edge,Ft,Vr,Ar),pt.edge=Mf(Ft,W,null,Ar),Ee.edge=Mf(W,Vr,null,Ar),Ps(Se),Ps(Ee)}}function _u(W,te){var ve=W.site,Se=ve.x,Ee=ve.y,Re=Ee-te;if(!Re)return Se;var rt=W.P;if(!rt)return-1/0;ve=rt.site;var He=ve.x,pt=ve.y,Ft=pt-te;if(!Ft)return He;var Rt=He-Se,ir=1/Re-1/Ft,nr=Rt/Ft;return ir?(-nr+Math.sqrt(nr*nr-2*ir*(Rt*Rt/(-2*Ft)-pt+Ft/2+Ee-Re/2)))/ir+Se:(Se+He)/2}function Gu(W,te){var ve=W.N;if(ve)return _u(ve,te);var Se=W.site;return Se.y===te?Se.x:1/0}function Ja(W){this.site=W,this.edges=[]}Ja.prototype.prepare=function(){for(var W=this.edges,te=W.length,ve;te--;)ve=W[te].edge,(!ve.b||!ve.a)&&W.splice(te,1);return W.sort(Sa),W.length};function ps(W){for(var te=W[0][0],ve=W[1][0],Se=W[0][1],Ee=W[1][1],Re,rt,He,pt,Ft=oo,Rt=Ft.length,ir,nr,Cr,Vr,sr,br;Rt--;)if(ir=Ft[Rt],!(!ir||!ir.prepare()))for(Cr=ir.edges,Vr=Cr.length,nr=0;nrCt||y(pt-rt)>Ct)&&(Cr.splice(nr,0,new Sf(Bd(ir.site,br,y(He-te)Ct?{x:te,y:y(Re-te)Ct?{x:y(rt-Ee)Ct?{x:ve,y:y(Re-ve)Ct?{x:y(rt-Se)=-wt)){var nr=pt*pt+Ft*Ft,Cr=Rt*Rt+br*br,Vr=(br*nr-Ft*Cr)/ir,sr=(pt*Cr-Rt*nr)/ir,br=sr+He,kr=Ms.pop()||new ma;kr.arc=W,kr.site=Ee,kr.x=Vr+rt,kr.y=br+Math.sqrt(Vr*Vr+sr*sr),kr.cy=br,W.circle=kr;for(var Gr=null,Wr=As._;Wr;)if(kr.y0)){if(sr/=Cr,Cr<0){if(sr0){if(sr>nr)return;sr>ir&&(ir=sr)}if(sr=ve-He,!(!Cr&&sr<0)){if(sr/=Cr,Cr<0){if(sr>nr)return;sr>ir&&(ir=sr)}else if(Cr>0){if(sr0)){if(sr/=Vr,Vr<0){if(sr0){if(sr>nr)return;sr>ir&&(ir=sr)}if(sr=Se-pt,!(!Vr&&sr<0)){if(sr/=Vr,Vr<0){if(sr>nr)return;sr>ir&&(ir=sr)}else if(Vr>0){if(sr0&&(Ee.a={x:He+ir*Cr,y:pt+ir*Vr}),nr<1&&(Ee.b={x:He+nr*Cr,y:pt+nr*Vr}),Ee}}}}}}function ll(W){for(var te=so,ve=Pl(W[0][0],W[0][1],W[1][0],W[1][1]),Se=te.length,Ee;Se--;)Ee=te[Se],(!Jc(Ee,W)||!ve(Ee)||y(Ee.a.x-Ee.b.x)=Re)return;if(Rt>nr){if(!Se)Se={x:Vr,y:rt};else if(Se.y>=He)return;ve={x:Vr,y:He}}else{if(!Se)Se={x:Vr,y:He};else if(Se.y1)if(Rt>nr){if(!Se)Se={x:(rt-kr)/br,y:rt};else if(Se.y>=He)return;ve={x:(He-kr)/br,y:He}}else{if(!Se)Se={x:(He-kr)/br,y:He};else if(Se.y=Re)return;ve={x:Re,y:br*Re+kr}}else{if(!Se)Se={x:Re,y:br*Re+kr};else if(Se.x=Rt&&kr.x<=nr&&kr.y>=ir&&kr.y<=Cr?[[Rt,Cr],[nr,Cr],[nr,ir],[Rt,ir]]:[];Gr.point=pt[sr]}),Ft}function He(pt){return pt.map(function(Ft,Rt){return{x:Math.round(Se(Ft,Rt)/Ct)*Ct,y:Math.round(Ee(Ft,Rt)/Ct)*Ct,i:Rt}})}return rt.links=function(pt){return ju(He(pt)).edges.filter(function(Ft){return Ft.l&&Ft.r}).map(function(Ft){return{source:pt[Ft.l.i],target:pt[Ft.r.i]}})},rt.triangles=function(pt){var Ft=[];return ju(He(pt)).cells.forEach(function(Rt,ir){for(var nr=Rt.site,Cr=Rt.edges.sort(Sa),Vr=-1,sr=Cr.length,br,kr,Gr=Cr[sr-1].edge,Wr=Gr.l===nr?Gr.r:Gr.l;++VrWr&&(Wr=Rt.x),Rt.y>Ar&&(Ar=Rt.y),Cr.push(Rt.x),Vr.push(Rt.y);else for(sr=0;srWr&&(Wr=En),zn>Ar&&(Ar=zn),Cr.push(En),Vr.push(zn)}var Zn=Wr-kr,ai=Ar-Gr;Zn>ai?Ar=Gr+Zn:Wr=kr+ai;function Mi(Y,d,P,N,H,$,se,de){if(!(isNaN(P)||isNaN(N)))if(Y.leaf){var Ae=Y.x,Fe=Y.y;if(Ae!=null)if(y(Ae-P)+y(Fe-N)<.01)Si(Y,d,P,N,H,$,se,de);else{var Ie=Y.point;Y.x=Y.y=Y.point=null,Si(Y,Ie,Ae,Fe,H,$,se,de),Si(Y,d,P,N,H,$,se,de)}else Y.x=P,Y.y=N,Y.point=d}else Si(Y,d,P,N,H,$,se,de)}function Si(Y,d,P,N,H,$,se,de){var Ae=(H+se)*.5,Fe=($+de)*.5,Ie=P>=Ae,Ye=N>=Fe,st=Ye<<1|Ie;Y.leaf=!1,Y=Y.nodes[st]||(Y.nodes[st]=Qc()),Ie?H=Ae:se=Ae,Ye?$=Fe:de=Fe,Mi(Y,d,P,N,H,$,se,de)}var ya=Qc();if(ya.add=function(Y){Mi(ya,Y,+ir(Y,++sr),+nr(Y,sr),kr,Gr,Wr,Ar)},ya.visit=function(Y){uu(Y,ya,kr,Gr,Wr,Ar)},ya.find=function(Y){return oh(ya,Y[0],Y[1],kr,Gr,Wr,Ar)},sr=-1,te==null){for(;++srRe||nr>rt||Cr=En,ai=ve>=zn,Mi=ai<<1|Zn,Si=Mi+4;Mive&&(Re=te.slice(ve,Re),He[rt]?He[rt]+=Re:He[++rt]=Re),(Se=Se[0])===(Ee=Ee[0])?He[rt]?He[rt]+=Ee:He[++rt]=Ee:(He[++rt]=null,pt.push({i:rt,x:Yo(Se,Ee)})),ve=Dl.lastIndex;return ve=0&&!(Se=e.interpolators[ve](W,te)););return Se}e.interpolators=[function(W,te){var ve=typeof te;return(ve==="string"?er.has(te.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(te)?hc:Ro:te instanceof rn?hc:Array.isArray(te)?ef:ve==="object"&&isNaN(te)?Fl:Yo)(W,te)}],e.interpolateArray=ef;function ef(W,te){var ve=[],Se=[],Ee=W.length,Re=te.length,rt=Math.min(W.length,te.length),He;for(He=0;He=0?W.slice(0,te):W,Se=te>=0?W.slice(te+1):"in";return ve=sh.get(ve)||Cc,Se=Y0.get(Se)||O,Nd(Se(ve.apply(null,t.call(arguments,1))))};function Nd(W){return function(te){return te<=0?0:te>=1?1:W(te)}}function Cf(W){return function(te){return 1-W(1-te)}}function Vo(W){return function(te){return .5*(te<.5?W(2*te):2-W(2-2*te))}}function Ud(W){return W*W}function zh(W){return W*W*W}function tf(W){if(W<=0)return 0;if(W>=1)return 1;var te=W*W,ve=te*W;return 4*(W<.5?ve:3*(W-te)+ve-.75)}function Vd(W){return function(te){return Math.pow(te,W)}}function rf(W){return 1-Math.cos(W*ft)}function qh(W){return Math.pow(2,10*(W-1))}function vc(W){return 1-Math.sqrt(1-W*W)}function dd(W,te){var ve;return arguments.length<2&&(te=.45),arguments.length?ve=te/Mt*Math.asin(1/W):(W=1,ve=te/4),function(Se){return 1+W*Math.pow(2,-10*Se)*Math.sin((Se-ve)*Mt/te)}}function Bh(W){return W||(W=1.70158),function(te){return te*te*((W+1)*te-W)}}function Wu(W){return W<1/2.75?7.5625*W*W:W<2/2.75?7.5625*(W-=1.5/2.75)*W+.75:W<2.5/2.75?7.5625*(W-=2.25/2.75)*W+.9375:7.5625*(W-=2.625/2.75)*W+.984375}e.interpolateHcl=vd;function vd(W,te){W=e.hcl(W),te=e.hcl(te);var ve=W.h,Se=W.c,Ee=W.l,Re=te.h-ve,rt=te.c-Se,He=te.l-Ee;return isNaN(rt)&&(rt=0,Se=isNaN(Se)?te.c:Se),isNaN(Re)?(Re=0,ve=isNaN(ve)?te.h:ve):Re>180?Re-=360:Re<-180&&(Re+=360),function(pt){return Vi(ve+Re*pt,Se+rt*pt,Ee+He*pt)+""}}e.interpolateHsl=pd;function pd(W,te){W=e.hsl(W),te=e.hsl(te);var ve=W.h,Se=W.s,Ee=W.l,Re=te.h-ve,rt=te.s-Se,He=te.l-Ee;return isNaN(rt)&&(rt=0,Se=isNaN(Se)?te.s:Se),isNaN(Re)?(Re=0,ve=isNaN(ve)?te.h:ve):Re>180?Re-=360:Re<-180&&(Re+=360),function(pt){return ri(ve+Re*pt,Se+rt*pt,Ee+He*pt)+""}}e.interpolateLab=lh;function lh(W,te){W=e.lab(W),te=e.lab(te);var ve=W.l,Se=W.a,Ee=W.b,Re=te.l-ve,rt=te.a-Se,He=te.b-Ee;return function(pt){return Ga(ve+Re*pt,Se+rt*pt,Ee+He*pt)+""}}e.interpolateRound=nf;function nf(W,te){return te-=W,function(ve){return Math.round(W+te*ve)}}e.transform=function(W){var te=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(ve){if(ve!=null){te.setAttribute("transform",ve);var Se=te.transform.baseVal.consolidate()}return new uh(Se?Se.matrix:ch)})(W)};function uh(W){var te=[W.a,W.b],ve=[W.c,W.d],Se=gd(te),Ee=af(te,ve),Re=gd(Rl(ve,te,-Ee))||0;te[0]*ve[1]180?te+=360:te-W>180&&(W+=360),Se.push({i:ve.push(Lc(ve)+"rotate(",null,")")-2,x:Yo(W,te)})):te&&ve.push(Lc(ve)+"rotate("+te+")")}function Lf(W,te,ve,Se){W!==te?Se.push({i:ve.push(Lc(ve)+"skewX(",null,")")-2,x:Yo(W,te)}):te&&ve.push(Lc(ve)+"skewX("+te+")")}function wu(W,te,ve,Se){if(W[0]!==te[0]||W[1]!==te[1]){var Ee=ve.push(Lc(ve)+"scale(",null,",",null,")");Se.push({i:Ee-4,x:Yo(W[0],te[0])},{i:Ee-2,x:Yo(W[1],te[1])})}else(te[0]!==1||te[1]!==1)&&ve.push(Lc(ve)+"scale("+te+")")}function fh(W,te){var ve=[],Se=[];return W=e.transform(W),te=e.transform(te),md(W.translate,te.translate,ve,Se),yd(W.rotate,te.rotate,ve,Se),Lf(W.skew,te.skew,ve,Se),wu(W.scale,te.scale,ve,Se),W=te=null,function(Ee){for(var Re=-1,rt=Se.length,He;++Re0?Re=Ar:(ve.c=null,ve.t=NaN,ve=null,te.end({type:"end",alpha:Re=0})):Ar>0&&(te.start({type:"start",alpha:Re=Ar}),ve=Ra(W.tick)),W):Re},W.start=function(){var Ar,En=Cr.length,zn=Vr.length,Zn=Se[0],ai=Se[1],Mi,Si;for(Ar=0;Ar=0;)Re.push(Rt=Ft[pt]),Rt.parent=He,Rt.depth=He.depth+1;ve&&(He.value=0),He.children=Ft}else ve&&(He.value=+ve.call(Se,He,He.depth)||0),delete He.children;return Il(Ee,function(ir){var nr,Cr;W&&(nr=ir.children)&&nr.sort(W),ve&&(Cr=ir.parent)&&(Cr.value+=ir.value)}),rt}return Se.sort=function(Ee){return arguments.length?(W=Ee,Se):W},Se.children=function(Ee){return arguments.length?(te=Ee,Se):te},Se.value=function(Ee){return arguments.length?(ve=Ee,Se):ve},Se.revalue=function(Ee){return ve&&(Au(Ee,function(Re){Re.children&&(Re.value=0)}),Il(Ee,function(Re){var rt;Re.children||(Re.value=+ve.call(Se,Re,Re.depth)||0),(rt=Re.parent)&&(rt.value+=Re.value)})),Ee},Se};function Tu(W,te){return e.rebind(W,te,"sort","children","value"),W.nodes=W,W.links=Tl,W}function Au(W,te){for(var ve=[W];(W=ve.pop())!=null;)if(te(W),(Ee=W.children)&&(Se=Ee.length))for(var Se,Ee;--Se>=0;)ve.push(Ee[Se])}function Il(W,te){for(var ve=[W],Se=[];(W=ve.pop())!=null;)if(Se.push(W),(rt=W.children)&&(Re=rt.length))for(var Ee=-1,Re,rt;++EeEe&&(Ee=He),Se.push(He)}for(rt=0;rtSe&&(ve=te,Se=Ee);return ve}function Gh(W){return W.reduce(Xu,0)}function Xu(W,te){return W+te[1]}e.layout.histogram=function(){var W=!0,te=Number,ve=Df,Se=Pc;function Ee(Re,nr){for(var He=[],pt=Re.map(te,this),Ft=ve.call(this,pt,nr),Rt=Se.call(this,Ft,pt,nr),ir,nr=-1,Cr=pt.length,Vr=Rt.length-1,sr=W?1:1/Cr,br;++nr0)for(nr=-1;++nr=Ft[0]&&br<=Ft[1]&&(ir=He[e.bisect(Rt,br,1,Vr)-1],ir.y+=sr,ir.push(Re[nr]));return He}return Ee.value=function(Re){return arguments.length?(te=Re,Ee):te},Ee.range=function(Re){return arguments.length?(ve=wr(Re),Ee):ve},Ee.bins=function(Re){return arguments.length?(Se=typeof Re=="number"?function(rt){return Ff(rt,Re)}:wr(Re),Ee):Se},Ee.frequency=function(Re){return arguments.length?(W=!!Re,Ee):W},Ee};function Pc(W,te){return Ff(W,Math.ceil(Math.log(te.length)/Math.LN2+1))}function Ff(W,te){for(var ve=-1,Se=+W[0],Ee=(W[1]-Se)/te,Re=[];++ve<=te;)Re[ve]=Ee*ve+Se;return Re}function Df(W){return[e.min(W),e.max(W)]}e.layout.pack=function(){var W=e.layout.hierarchy().sort(La),te=0,ve=[1,1],Se;function Ee(Re,rt){var He=W.call(this,Re,rt),pt=He[0],Ft=ve[0],Rt=ve[1],ir=Se==null?Math.sqrt:typeof Se=="function"?Se:function(){return Se};if(pt.x=pt.y=0,Il(pt,function(Cr){Cr.r=+ir(Cr.value)}),Il(pt,Hh),te){var nr=te*(Se?1:Math.max(2*pt.r/Ft,2*pt.r/Rt))/2;Il(pt,function(Cr){Cr.r+=nr}),Il(pt,Hh),Il(pt,function(Cr){Cr.r-=nr})}return Td(pt,Ft/2,Rt/2,Se?1:1/Math.max(2*pt.r/Ft,2*pt.r/Rt)),He}return Ee.size=function(Re){return arguments.length?(ve=Re,Ee):ve},Ee.radius=function(Re){return arguments.length?(Se=Re==null||typeof Re=="function"?Re:+Re,Ee):Se},Ee.padding=function(Re){return arguments.length?(te=+Re,Ee):te},Tu(Ee,W)};function La(W,te){return W.value-te.value}function Rf(W,te){var ve=W._pack_next;W._pack_next=te,te._pack_prev=W,te._pack_next=ve,ve._pack_prev=te}function m0(W,te){W._pack_next=te,te._pack_prev=W}function wd(W,te){var ve=te.x-W.x,Se=te.y-W.y,Ee=W.r+te.r;return .999*Ee*Ee>ve*ve+Se*Se}function Hh(W){if(!(te=W.children)||!(nr=te.length))return;var te,ve=1/0,Se=-1/0,Ee=1/0,Re=-1/0,rt,He,pt,Ft,Rt,ir,nr;function Cr(Ar){ve=Math.min(Ar.x-Ar.r,ve),Se=Math.max(Ar.x+Ar.r,Se),Ee=Math.min(Ar.y-Ar.r,Ee),Re=Math.max(Ar.y+Ar.r,Re)}if(te.forEach(X0),rt=te[0],rt.x=-rt.r,rt.y=0,Cr(rt),nr>1&&(He=te[1],He.x=He.r,He.y=0,Cr(He),nr>2))for(pt=te[2],ul(rt,He,pt),Cr(pt),Rf(rt,pt),rt._pack_prev=pt,Rf(pt,He),He=rt._pack_next,Ft=3;Ftbr.x&&(br=En),En.depth>kr.depth&&(kr=En)});var Gr=te(sr,br)/2-sr.x,Wr=ve[0]/(br.x+te(br,sr)/2+Gr),Ar=ve[1]/(kr.depth||1);Au(Cr,function(En){En.x=(En.x+Gr)*Wr,En.y=En.depth*Ar})}return nr}function Re(Rt){for(var ir={A:null,children:[Rt]},nr=[ir],Cr;(Cr=nr.pop())!=null;)for(var Vr=Cr.children,sr,br=0,kr=Vr.length;br0&&(zf(Ze(sr,Rt,nr),Rt,En),kr+=En,Gr+=En),Wr+=sr.m,kr+=Cr.m,Ar+=br.m,Gr+=Vr.m;sr&&!vh(Vr)&&(Vr.t=sr,Vr.m+=Wr-Gr),Cr&&!If(br)&&(br.t=Cr,br.m+=kr-Ar,nr=Rt)}return nr}function Ft(Rt){Rt.x*=ve[0],Rt.y=Rt.depth*ve[1]}return Ee.separation=function(Rt){return arguments.length?(te=Rt,Ee):te},Ee.size=function(Rt){return arguments.length?(Se=(ve=Rt)==null?Ft:null,Ee):Se?null:ve},Ee.nodeSize=function(Rt){return arguments.length?(Se=(ve=Rt)==null?null:Ft,Ee):Se?ve:null},Tu(Ee,W)};function Wl(W,te){return W.parent==te.parent?1:2}function If(W){var te=W.children;return te.length?te[0]:W.t}function vh(W){var te=W.children,ve;return(ve=te.length)?te[ve-1]:W.t}function zf(W,te,ve){var Se=ve/(te.i-W.i);te.c-=Se,te.s+=ve,W.c+=Se,te.z+=ve,te.m+=ve}function qf(W){for(var te=0,ve=0,Se=W.children,Ee=Se.length,Re;--Ee>=0;)Re=Se[Ee],Re.z+=te,Re.m+=te,te+=Re.s+(ve+=Re.c)}function Ze(W,te,ve){return W.a.parent===te.parent?W.a:ve}e.layout.cluster=function(){var W=e.layout.hierarchy().sort(null).value(null),te=Wl,ve=[1,1],Se=!1;function Ee(Re,rt){var He=W.call(this,Re,rt),pt=He[0],Ft,Rt=0;Il(pt,function(sr){var br=sr.children;br&&br.length?(sr.x=Wt(br),sr.y=yt(br)):(sr.x=Ft?Rt+=te(sr,Ft):0,sr.y=0,Ft=sr)});var ir=zt(pt),nr=hr(pt),Cr=ir.x-te(ir,nr)/2,Vr=nr.x+te(nr,ir)/2;return Il(pt,Se?function(sr){sr.x=(sr.x-pt.x)*ve[0],sr.y=(pt.y-sr.y)*ve[1]}:function(sr){sr.x=(sr.x-Cr)/(Vr-Cr)*ve[0],sr.y=(1-(pt.y?sr.y/pt.y:1))*ve[1]}),He}return Ee.separation=function(Re){return arguments.length?(te=Re,Ee):te},Ee.size=function(Re){return arguments.length?(Se=(ve=Re)==null,Ee):Se?null:ve},Ee.nodeSize=function(Re){return arguments.length?(Se=(ve=Re)!=null,Ee):Se?ve:null},Tu(Ee,W)};function yt(W){return 1+e.max(W,function(te){return te.y})}function Wt(W){return W.reduce(function(te,ve){return te+ve.x},0)/W.length}function zt(W){var te=W.children;return te&&te.length?zt(te[0]):W}function hr(W){var te=W.children,ve;return te&&(ve=te.length)?hr(te[ve-1]):W}e.layout.treemap=function(){var W=e.layout.hierarchy(),te=Math.round,ve=[1,1],Se=null,Ee=Ur,Re=!1,rt,He="squarify",pt=.5*(1+Math.sqrt(5));function Ft(sr,br){for(var kr=-1,Gr=sr.length,Wr,Ar;++kr0;)Gr.push(Ar=Wr[ai-1]),Gr.area+=Ar.area,He!=="squarify"||(zn=nr(Gr,Zn))<=En?(Wr.pop(),En=zn):(Gr.area-=Gr.pop().area,Cr(Gr,Zn,kr,!1),Zn=Math.min(kr.dx,kr.dy),Gr.length=Gr.area=0,En=1/0);Gr.length&&(Cr(Gr,Zn,kr,!0),Gr.length=Gr.area=0),br.forEach(Rt)}}function ir(sr){var br=sr.children;if(br&&br.length){var kr=Ee(sr),Gr=br.slice(),Wr,Ar=[];for(Ft(Gr,kr.dx*kr.dy/sr.value),Ar.area=0;Wr=Gr.pop();)Ar.push(Wr),Ar.area+=Wr.area,Wr.z!=null&&(Cr(Ar,Wr.z?kr.dx:kr.dy,kr,!Gr.length),Ar.length=Ar.area=0);br.forEach(ir)}}function nr(sr,br){for(var kr=sr.area,Gr,Wr=0,Ar=1/0,En=-1,zn=sr.length;++EnWr&&(Wr=Gr));return kr*=kr,br*=br,kr?Math.max(br*Wr*pt/kr,kr/(br*Ar*pt)):1/0}function Cr(sr,br,kr,Gr){var Wr=-1,Ar=sr.length,En=kr.x,zn=kr.y,Zn=br?te(sr.area/br):0,ai;if(br==kr.dx){for((Gr||Zn>kr.dy)&&(Zn=kr.dy);++Wrkr.dx)&&(Zn=kr.dx);++Wr1);return W+te*Se*Math.sqrt(-2*Math.log(Re)/Re)}},logNormal:function(){var W=e.random.normal.apply(e,arguments);return function(){return Math.exp(W())}},bates:function(W){var te=e.random.irwinHall(W);return function(){return te()/W}},irwinHall:function(W){return function(){for(var te=0,ve=0;ve2?Pn:Fn,Ft=Se?hh:Oh;return Ee=pt(W,te,Ft,ve),Re=pt(te,W,Ft,dc),He}function He(pt){return Ee(pt)}return He.invert=function(pt){return Re(pt)},He.domain=function(pt){return arguments.length?(W=pt.map(Number),rt()):W},He.range=function(pt){return arguments.length?(te=pt,rt()):te},He.rangeRound=function(pt){return He.range(pt).interpolate(nf)},He.clamp=function(pt){return arguments.length?(Se=pt,rt()):Se},He.interpolate=function(pt){return arguments.length?(ve=pt,rt()):ve},He.ticks=function(pt){return pi(W,pt)},He.tickFormat=function(pt,Ft){return d3_scale_linearTickFormat(W,pt,Ft)},He.nice=function(pt){return Ci(W,pt),rt()},He.copy=function(){return On(W,te,ve,Se)},rt()}function ki(W,te){return e.rebind(W,te,"range","rangeRound","interpolate","clamp")}function Ci(W,te){return en(W,vn(qi(W,te)[2])),en(W,vn(qi(W,te)[2])),W}function qi(W,te){te==null&&(te=10);var ve=cn(W),Se=ve[1]-ve[0],Ee=Math.pow(10,Math.floor(Math.log(Se/te)/Math.LN10)),Re=te/Se*Ee;return Re<=.15?Ee*=10:Re<=.35?Ee*=5:Re<=.75&&(Ee*=2),ve[0]=Math.ceil(ve[0]/Ee)*Ee,ve[1]=Math.floor(ve[1]/Ee)*Ee+Ee*.5,ve[2]=Ee,ve}function pi(W,te){return e.range.apply(e,qi(W,te))}var Un={s:1,g:1,p:1,r:1,e:1};function Gn(W){return-Math.floor(Math.log(W)/Math.LN10+.01)}function Zi(W,te){var ve=Gn(te[2]);return W in Un?Math.abs(ve-Gn(Math.max(y(te[0]),y(te[1]))))+ +(W!=="e"):ve-(W==="%")*2}e.scale.log=function(){return na(e.scale.linear().domain([0,1]),10,!0,[1,10])};function na(W,te,ve,Se){function Ee(He){return(ve?Math.log(He<0?0:He):-Math.log(He>0?0:-He))/Math.log(te)}function Re(He){return ve?Math.pow(te,He):-Math.pow(te,-He)}function rt(He){return W(Ee(He))}return rt.invert=function(He){return Re(W.invert(He))},rt.domain=function(He){return arguments.length?(ve=He[0]>=0,W.domain((Se=He.map(Number)).map(Ee)),rt):Se},rt.base=function(He){return arguments.length?(te=+He,W.domain(Se.map(Ee)),rt):te},rt.nice=function(){var He=en(Se.map(Ee),ve?Math:Ha);return W.domain(He),Se=He.map(Re),rt},rt.ticks=function(){var He=cn(Se),pt=[],Ft=He[0],Rt=He[1],ir=Math.floor(Ee(Ft)),nr=Math.ceil(Ee(Rt)),Cr=te%1?2:te;if(isFinite(nr-ir)){if(ve){for(;ir0;Vr--)pt.push(Re(ir)*Vr);for(ir=0;pt[ir]Rt;nr--);pt=pt.slice(ir,nr)}return pt},rt.copy=function(){return na(W.copy(),te,ve,Se)},ki(rt,W)}var Ha={floor:function(W){return-Math.ceil(-W)},ceil:function(W){return-Math.floor(-W)}};e.scale.pow=function(){return Qa(e.scale.linear(),1,[0,1])};function Qa(W,te,ve){var Se=Ya(te),Ee=Ya(1/te);function Re(rt){return W(Se(rt))}return Re.invert=function(rt){return Ee(W.invert(rt))},Re.domain=function(rt){return arguments.length?(W.domain((ve=rt.map(Number)).map(Se)),Re):ve},Re.ticks=function(rt){return pi(ve,rt)},Re.tickFormat=function(rt,He){return d3_scale_linearTickFormat(ve,rt,He)},Re.nice=function(rt){return Re.domain(Ci(ve,rt))},Re.exponent=function(rt){return arguments.length?(Se=Ya(te=rt),Ee=Ya(1/te),W.domain(ve.map(Se)),Re):te},Re.copy=function(){return Qa(W.copy(),te,ve)},ki(Re,W)}function Ya(W){return function(te){return te<0?-Math.pow(-te,W):Math.pow(te,W)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ho([],{t:"range",a:[[]]})};function ho(W,te){var ve,Se,Ee;function Re(He){return Se[((ve.get(He)||(te.t==="range"?ve.set(He,W.push(He)):NaN))-1)%Se.length]}function rt(He,pt){return e.range(W.length).map(function(Ft){return He+pt*Ft})}return Re.domain=function(He){if(!arguments.length)return W;W=[],ve=new S;for(var pt=-1,Ft=He.length,Rt;++pt0?ve[Re-1]:W[0],Renr?0:1;if(Rt=Lt)return pt(Rt,Vr)+(Ft?pt(Ft,1-Vr):"")+"Z";var sr,br,kr,Gr,Wr=0,Ar=0,En,zn,Zn,ai,Mi,Si,ya,Y,d=[];if((Gr=(+rt.apply(this,arguments)||0)/2)&&(kr=Se===cu?Math.sqrt(Ft*Ft+Rt*Rt):+Se.apply(this,arguments),Vr||(Ar*=-1),Rt&&(Ar=dn(kr/Rt*Math.sin(Gr))),Ft&&(Wr=dn(kr/Ft*Math.sin(Gr)))),Rt){En=Rt*Math.cos(ir+Ar),zn=Rt*Math.sin(ir+Ar),Zn=Rt*Math.cos(nr-Ar),ai=Rt*Math.sin(nr-Ar);var P=Math.abs(nr-ir-2*Ar)<=Tt?0:1;if(Ar&&ph(En,zn,Zn,ai)===Vr^P){var N=(ir+nr)/2;En=Rt*Math.cos(N),zn=Rt*Math.sin(N),Zn=ai=null}}else En=zn=0;if(Ft){Mi=Ft*Math.cos(nr-Wr),Si=Ft*Math.sin(nr-Wr),ya=Ft*Math.cos(ir+Wr),Y=Ft*Math.sin(ir+Wr);var H=Math.abs(ir-nr+2*Wr)<=Tt?0:1;if(Wr&&ph(Mi,Si,ya,Y)===1-Vr^H){var $=(ir+nr)/2;Mi=Ft*Math.cos($),Si=Ft*Math.sin($),ya=Y=null}}else Mi=Si=0;if(Cr>Ct&&(sr=Math.min(Math.abs(Rt-Ft)/2,+ve.apply(this,arguments)))>.001){br=Ft0?0:1}function gh(W,te,ve,Se,Ee){var Re=W[0]-te[0],rt=W[1]-te[1],He=(Ee?Se:-Se)/Math.sqrt(Re*Re+rt*rt),pt=He*rt,Ft=-He*Re,Rt=W[0]+pt,ir=W[1]+Ft,nr=te[0]+pt,Cr=te[1]+Ft,Vr=(Rt+nr)/2,sr=(ir+Cr)/2,br=nr-Rt,kr=Cr-ir,Gr=br*br+kr*kr,Wr=ve-Se,Ar=Rt*Cr-nr*ir,En=(kr<0?-1:1)*Math.sqrt(Math.max(0,Wr*Wr*Gr-Ar*Ar)),zn=(Ar*kr-br*En)/Gr,Zn=(-Ar*br-kr*En)/Gr,ai=(Ar*kr+br*En)/Gr,Mi=(-Ar*br+kr*En)/Gr,Si=zn-Vr,ya=Zn-sr,Y=ai-Vr,d=Mi-sr;return Si*Si+ya*ya>Y*Y+d*d&&(zn=ai,Zn=Mi),[[zn-pt,Zn-Ft],[zn*ve/Wr,Zn*ve/Wr]]}function uf(){return!0}function Ku(W){var te=qo,ve=$a,Se=uf,Ee=Ju,Re=Ee.key,rt=.7;function He(pt){var Ft=[],Rt=[],ir=-1,nr=pt.length,Cr,Vr=wr(te),sr=wr(ve);function br(){Ft.push("M",Ee(W(Rt),rt))}for(;++ir1?W.join("L"):W+"Z"}function Qu(W){return W.join("L")+"Z"}function Wd(W){for(var te=0,ve=W.length,Se=W[0],Ee=[Se[0],",",Se[1]];++te1&&Ee.push("H",Se[0]),Ee.join("")}function x0(W){for(var te=0,ve=W.length,Se=W[0],Ee=[Se[0],",",Se[1]];++te1){He=te[1],Re=W[pt],pt++,Se+="C"+(Ee[0]+rt[0])+","+(Ee[1]+rt[1])+","+(Re[0]-He[0])+","+(Re[1]-He[1])+","+Re[0]+","+Re[1];for(var Ft=2;Ft9&&(Re=ve*3/Math.sqrt(Re),rt[He]=Re*Se,rt[He+1]=Re*Ee));for(He=-1;++He<=pt;)Re=(W[Math.min(pt,He+1)][0]-W[Math.max(0,He-1)][0])/(6*(1+rt[He]*rt[He])),te.push([Re||0,rt[He]*Re||0]);return te}function Gt(W){return W.length<3?Ju(W):W[0]+jh(W,lt(W))}e.svg.line.radial=function(){var W=Ku(Zt);return W.radius=W.x,delete W.x,W.angle=W.y,delete W.y,W};function Zt(W){for(var te,ve=-1,Se=W.length,Ee,Re;++veTt)+",1 "+ir}function Ft(Rt,ir,nr,Cr){return"Q 0,0 "+Cr}return Re.radius=function(Rt){return arguments.length?(ve=wr(Rt),Re):ve},Re.source=function(Rt){return arguments.length?(W=wr(Rt),Re):W},Re.target=function(Rt){return arguments.length?(te=wr(Rt),Re):te},Re.startAngle=function(Rt){return arguments.length?(Se=wr(Rt),Re):Se},Re.endAngle=function(Rt){return arguments.length?(Ee=wr(Rt),Re):Ee},Re};function Sr(W){return W.radius}e.svg.diagonal=function(){var W=Kt,te=ur,ve=Br;function Se(Ee,Re){var rt=W.call(this,Ee,Re),He=te.call(this,Ee,Re),pt=(rt.y+He.y)/2,Ft=[rt,{x:rt.x,y:pt},{x:He.x,y:pt},He];return Ft=Ft.map(ve),"M"+Ft[0]+"C"+Ft[1]+" "+Ft[2]+" "+Ft[3]}return Se.source=function(Ee){return arguments.length?(W=wr(Ee),Se):W},Se.target=function(Ee){return arguments.length?(te=wr(Ee),Se):te},Se.projection=function(Ee){return arguments.length?(ve=Ee,Se):ve},Se};function Br(W){return[W.x,W.y]}e.svg.diagonal.radial=function(){var W=e.svg.diagonal(),te=Br,ve=W.projection;return W.projection=function(Se){return arguments.length?ve(ln(te=Se)):te},W};function ln(W){return function(){var te=W.apply(this,arguments),ve=te[0],Se=te[1]-ft;return[ve*Math.cos(Se),ve*Math.sin(Se)]}}e.svg.symbol=function(){var W=In,te=wn;function ve(Se,Ee){return(Bi.get(W.call(this,Se,Ee))||gi)(te.call(this,Se,Ee))}return ve.type=function(Se){return arguments.length?(W=wr(Se),ve):W},ve.size=function(Se){return arguments.length?(te=wr(Se),ve):te},ve};function wn(){return 64}function In(){return"circle"}function gi(W){var te=Math.sqrt(W/Tt);return"M0,"+te+"A"+te+","+te+" 0 1,1 0,"+-te+"A"+te+","+te+" 0 1,1 0,"+te+"Z"}var Bi=e.map({circle:gi,cross:function(W){var te=Math.sqrt(W/5)/2;return"M"+-3*te+","+-te+"H"+-te+"V"+-3*te+"H"+te+"V"+-te+"H"+3*te+"V"+te+"H"+te+"V"+3*te+"H"+-te+"V"+te+"H"+-3*te+"Z"},diamond:function(W){var te=Math.sqrt(W/(2*ia)),ve=te*ia;return"M0,"+-te+"L"+ve+",0 0,"+te+" "+-ve+",0Z"},square:function(W){var te=Math.sqrt(W)/2;return"M"+-te+","+-te+"L"+te+","+-te+" "+te+","+te+" "+-te+","+te+"Z"},"triangle-down":function(W){var te=Math.sqrt(W/mi),ve=te*mi/2;return"M0,"+ve+"L"+te+","+-ve+" "+-te+","+-ve+"Z"},"triangle-up":function(W){var te=Math.sqrt(W/mi),ve=te*mi/2;return"M0,"+-ve+"L"+te+","+ve+" "+-te+","+ve+"Z"}});e.svg.symbolTypes=Bi.keys();var mi=Math.sqrt(3),ia=Math.tan(30*kt);ie.transition=function(W){for(var te=cl||++ls,ve=wi(W),Se=[],Ee,Re,rt=Eu||{time:Date.now(),ease:tf,delay:0,duration:250},He=-1,pt=this.length;++He0;)ir[--Gr].call(W,kr);if(br>=1)return rt.event&&rt.event.end.call(W,W.__data__,te),--Re.count?delete Re[Se]:delete W[ve],1}rt||(He=Ee.time,pt=Ra(nr,0,He),rt=Re[Se]={tween:new S,time:He,timer:pt,delay:Ee.delay,duration:Ee.duration,ease:Ee.ease,index:te},Ee=null,++Re.count)}e.svg.axis=function(){var W=e.scale.linear(),te=fl,ve=6,Se=6,Ee=3,Re=[10],rt=null,He;function pt(Ft){Ft.each(function(){var Rt=e.select(this),ir=this.__chart__||W,nr=this.__chart__=W.copy(),Cr=rt==null?nr.ticks?nr.ticks.apply(nr,Re):nr.domain():rt,Vr=He==null?nr.tickFormat?nr.tickFormat.apply(nr,Re):O:He,sr=Rt.selectAll(".tick").data(Cr,nr),br=sr.enter().insert("g",".domain").attr("class","tick").style("opacity",Ct),kr=e.transition(sr.exit()).style("opacity",Ct).remove(),Gr=e.transition(sr.order()).style("opacity",1),Wr=Math.max(ve,0)+Ee,Ar,En=yn(nr),zn=Rt.selectAll(".domain").data([0]),Zn=(zn.enter().append("path").attr("class","domain"),e.transition(zn));br.append("line"),br.append("text");var ai=br.select("line"),Mi=Gr.select("line"),Si=sr.select("text").text(Vr),ya=br.select("text"),Y=Gr.select("text"),d=te==="top"||te==="left"?-1:1,P,N,H,$;if(te==="bottom"||te==="top"?(Ar=du,P="x",H="y",N="x2",$="y2",Si.attr("dy",d<0?"0em":".71em").style("text-anchor","middle"),Zn.attr("d","M"+En[0]+","+d*Se+"V0H"+En[1]+"V"+d*Se)):(Ar=ms,P="y",H="x",N="y2",$="x2",Si.attr("dy",".32em").style("text-anchor",d<0?"end":"start"),Zn.attr("d","M"+d*Se+","+En[0]+"H0V"+En[1]+"H"+d*Se)),ai.attr($,d*ve),ya.attr(H,d*Wr),Mi.attr(N,0).attr($,d*ve),Y.attr(P,0).attr(H,d*Wr),nr.rangeBand){var se=nr,de=se.rangeBand()/2;ir=nr=function(Ae){return se(Ae)+de}}else ir.rangeBand?ir=nr:kr.call(Ar,nr,ir);br.call(Ar,ir,nr),Gr.call(Ar,nr,nr)})}return pt.scale=function(Ft){return arguments.length?(W=Ft,pt):W},pt.orient=function(Ft){return arguments.length?(te=Ft in Fc?Ft+"":fl,pt):te},pt.ticks=function(){return arguments.length?(Re=r(arguments),pt):Re},pt.tickValues=function(Ft){return arguments.length?(rt=Ft,pt):rt},pt.tickFormat=function(Ft){return arguments.length?(He=Ft,pt):He},pt.tickSize=function(Ft){var Rt=arguments.length;return Rt?(ve=+Ft,Se=+arguments[Rt-1],pt):ve},pt.innerTickSize=function(Ft){return arguments.length?(ve=+Ft,pt):ve},pt.outerTickSize=function(Ft){return arguments.length?(Se=+Ft,pt):Se},pt.tickPadding=function(Ft){return arguments.length?(Ee=+Ft,pt):Ee},pt.tickSubdivide=function(){return arguments.length&&pt},pt};var fl="bottom",Fc={top:1,right:1,bottom:1,left:1};function du(W,te,ve){W.attr("transform",function(Se){var Ee=te(Se);return"translate("+(isFinite(Ee)?Ee:ve(Se))+",0)"})}function ms(W,te,ve){W.attr("transform",function(Se){var Ee=te(Se);return"translate(0,"+(isFinite(Ee)?Ee:ve(Se))+")"})}e.svg.brush=function(){var W=xe(Rt,"brushstart","brush","brushend"),te=null,ve=null,Se=[0,0],Ee=[0,0],Re,rt,He=!0,pt=!0,Ft=ku[0];function Rt(sr){sr.each(function(){var br=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Vr).on("touchstart.brush",Vr),kr=br.selectAll(".background").data([0]);kr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),br.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Gr=br.selectAll(".resize").data(Ft,O);Gr.exit().remove(),Gr.enter().append("g").attr("class",function(zn){return"resize "+zn}).style("cursor",function(zn){return ff[zn]}).append("rect").attr("x",function(zn){return/[ew]$/.test(zn)?-3:null}).attr("y",function(zn){return/^[ns]/.test(zn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Gr.style("display",Rt.empty()?"none":null);var Wr=e.transition(br),Ar=e.transition(kr),En;te&&(En=yn(te),Ar.attr("x",En[0]).attr("width",En[1]-En[0]),nr(Wr)),ve&&(En=yn(ve),Ar.attr("y",En[0]).attr("height",En[1]-En[0]),Cr(Wr)),ir(Wr)})}Rt.event=function(sr){sr.each(function(){var br=W.of(this,arguments),kr={x:Se,y:Ee,i:Re,j:rt},Gr=this.__chart__||kr;this.__chart__=kr,cl?e.select(this).transition().each("start.brush",function(){Re=Gr.i,rt=Gr.j,Se=Gr.x,Ee=Gr.y,br({type:"brushstart"})}).tween("brush:brush",function(){var Wr=ef(Se,kr.x),Ar=ef(Ee,kr.y);return Re=rt=null,function(En){Se=kr.x=Wr(En),Ee=kr.y=Ar(En),br({type:"brush",mode:"resize"})}}).each("end.brush",function(){Re=kr.i,rt=kr.j,br({type:"brush",mode:"resize"}),br({type:"brushend"})}):(br({type:"brushstart"}),br({type:"brush",mode:"resize"}),br({type:"brushend"}))})};function ir(sr){sr.selectAll(".resize").attr("transform",function(br){return"translate("+Se[+/e$/.test(br)]+","+Ee[+/^s/.test(br)]+")"})}function nr(sr){sr.select(".extent").attr("x",Se[0]),sr.selectAll(".extent,.n>rect,.s>rect").attr("width",Se[1]-Se[0])}function Cr(sr){sr.select(".extent").attr("y",Ee[0]),sr.selectAll(".extent,.e>rect,.w>rect").attr("height",Ee[1]-Ee[0])}function Vr(){var sr=this,br=e.select(e.event.target),kr=W.of(sr,arguments),Gr=e.select(sr),Wr=br.datum(),Ar=!/^(n|s)$/.test(Wr)&&te,En=!/^(e|w)$/.test(Wr)&&ve,zn=br.classed("extent"),Zn=or(sr),ai,Mi=e.mouse(sr),Si,ya=e.select(i(sr)).on("keydown.brush",P).on("keyup.brush",N);if(e.event.changedTouches?ya.on("touchmove.brush",H).on("touchend.brush",se):ya.on("mousemove.brush",H).on("mouseup.brush",se),Gr.interrupt().selectAll("*").interrupt(),zn)Mi[0]=Se[0]-Mi[0],Mi[1]=Ee[0]-Mi[1];else if(Wr){var Y=+/w$/.test(Wr),d=+/^n/.test(Wr);Si=[Se[1-Y]-Mi[0],Ee[1-d]-Mi[1]],Mi[0]=Se[Y],Mi[1]=Ee[d]}else e.event.altKey&&(ai=Mi.slice());Gr.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",br.style("cursor")),kr({type:"brushstart"}),H();function P(){e.event.keyCode==32&&(zn||(ai=null,Mi[0]-=Se[1],Mi[1]-=Ee[1],zn=2),ce())}function N(){e.event.keyCode==32&&zn==2&&(Mi[0]+=Se[1],Mi[1]+=Ee[1],zn=0,ce())}function H(){var de=e.mouse(sr),Ae=!1;Si&&(de[0]+=Si[0],de[1]+=Si[1]),zn||(e.event.altKey?(ai||(ai=[(Se[0]+Se[1])/2,(Ee[0]+Ee[1])/2]),Mi[0]=Se[+(de[0]{(function(e,t){typeof $S=="object"&&typeof Dte!="undefined"?t($S):(e=e||self,t(e.d3=e.d3||{}))})($S,function(e){"use strict";var t=new Date,r=new Date;function n(Te,Ve,$e,ot){function tt(nt){return Te(nt=arguments.length===0?new Date:new Date(+nt)),nt}return tt.floor=function(nt){return Te(nt=new Date(+nt)),nt},tt.ceil=function(nt){return Te(nt=new Date(nt-1)),Ve(nt,1),Te(nt),nt},tt.round=function(nt){var We=tt(nt),mt=tt.ceil(nt);return nt-We0))return bt;do bt.push(Yt=new Date(+nt)),Ve(nt,mt),Te(nt);while(Yt=We)for(;Te(We),!nt(We);)We.setTime(We-1)},function(We,mt){if(We>=We)if(mt<0)for(;++mt<=0;)for(;Ve(We,-1),!nt(We););else for(;--mt>=0;)for(;Ve(We,1),!nt(We););})},$e&&(tt.count=function(nt,We){return t.setTime(+nt),r.setTime(+We),Te(t),Te(r),Math.floor($e(t,r))},tt.every=function(nt){return nt=Math.floor(nt),!isFinite(nt)||!(nt>0)?null:nt>1?tt.filter(ot?function(We){return ot(We)%nt===0}:function(We){return tt.count(0,We)%nt===0}):tt}),tt}var a=n(function(){},function(Te,Ve){Te.setTime(+Te+Ve)},function(Te,Ve){return Ve-Te});a.every=function(Te){return Te=Math.floor(Te),!isFinite(Te)||!(Te>0)?null:Te>1?n(function(Ve){Ve.setTime(Math.floor(Ve/Te)*Te)},function(Ve,$e){Ve.setTime(+Ve+$e*Te)},function(Ve,$e){return($e-Ve)/Te}):a};var i=a.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(Te){Te.setTime(Te-Te.getMilliseconds())},function(Te,Ve){Te.setTime(+Te+Ve*o)},function(Te,Ve){return(Ve-Te)/o},function(Te){return Te.getUTCSeconds()}),v=f.range,g=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o)},function(Te,Ve){Te.setTime(+Te+Ve*s)},function(Te,Ve){return(Ve-Te)/s},function(Te){return Te.getMinutes()}),p=g.range,x=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o-Te.getMinutes()*s)},function(Te,Ve){Te.setTime(+Te+Ve*l)},function(Te,Ve){return(Ve-Te)/l},function(Te){return Te.getHours()}),_=x.range,y=n(function(Te){Te.setHours(0,0,0,0)},function(Te,Ve){Te.setDate(Te.getDate()+Ve)},function(Te,Ve){return(Ve-Te-(Ve.getTimezoneOffset()-Te.getTimezoneOffset())*s)/u},function(Te){return Te.getDate()-1}),C=y.range;function k(Te){return n(function(Ve){Ve.setDate(Ve.getDate()-(Ve.getDay()+7-Te)%7),Ve.setHours(0,0,0,0)},function(Ve,$e){Ve.setDate(Ve.getDate()+$e*7)},function(Ve,$e){return($e-Ve-($e.getTimezoneOffset()-Ve.getTimezoneOffset())*s)/c})}var S=k(0),L=k(1),w=k(2),A=k(3),T=k(4),m=k(5),F=k(6),E=S.range,I=L.range,R=w.range,B=A.range,O=T.range,V=m.range,j=F.range,q=n(function(Te){Te.setDate(1),Te.setHours(0,0,0,0)},function(Te,Ve){Te.setMonth(Te.getMonth()+Ve)},function(Te,Ve){return Ve.getMonth()-Te.getMonth()+(Ve.getFullYear()-Te.getFullYear())*12},function(Te){return Te.getMonth()}),U=q.range,J=n(function(Te){Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,Ve){Te.setFullYear(Te.getFullYear()+Ve)},function(Te,Ve){return Ve.getFullYear()-Te.getFullYear()},function(Te){return Te.getFullYear()});J.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(Ve){Ve.setFullYear(Math.floor(Ve.getFullYear()/Te)*Te),Ve.setMonth(0,1),Ve.setHours(0,0,0,0)},function(Ve,$e){Ve.setFullYear(Ve.getFullYear()+$e*Te)})};var ee=J.range,ce=n(function(Te){Te.setUTCSeconds(0,0)},function(Te,Ve){Te.setTime(+Te+Ve*s)},function(Te,Ve){return(Ve-Te)/s},function(Te){return Te.getUTCMinutes()}),ye=ce.range,xe=n(function(Te){Te.setUTCMinutes(0,0,0)},function(Te,Ve){Te.setTime(+Te+Ve*l)},function(Te,Ve){return(Ve-Te)/l},function(Te){return Te.getUTCHours()}),ue=xe.range,K=n(function(Te){Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCDate(Te.getUTCDate()+Ve)},function(Te,Ve){return(Ve-Te)/u},function(Te){return Te.getUTCDate()-1}),_e=K.range;function ne(Te){return n(function(Ve){Ve.setUTCDate(Ve.getUTCDate()-(Ve.getUTCDay()+7-Te)%7),Ve.setUTCHours(0,0,0,0)},function(Ve,$e){Ve.setUTCDate(Ve.getUTCDate()+$e*7)},function(Ve,$e){return($e-Ve)/c})}var ae=ne(0),pe=ne(1),ie=ne(2),le=ne(3),me=ne(4),be=ne(5),De=ne(6),Ge=ae.range,ht=pe.range,it=ie.range,Oe=le.range,ze=me.range,ct=be.range,et=De.range,qe=n(function(Te){Te.setUTCDate(1),Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCMonth(Te.getUTCMonth()+Ve)},function(Te,Ve){return Ve.getUTCMonth()-Te.getUTCMonth()+(Ve.getUTCFullYear()-Te.getUTCFullYear())*12},function(Te){return Te.getUTCMonth()}),we=qe.range,Le=n(function(Te){Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCFullYear(Te.getUTCFullYear()+Ve)},function(Te,Ve){return Ve.getUTCFullYear()-Te.getUTCFullYear()},function(Te){return Te.getUTCFullYear()});Le.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(Ve){Ve.setUTCFullYear(Math.floor(Ve.getUTCFullYear()/Te)*Te),Ve.setUTCMonth(0,1),Ve.setUTCHours(0,0,0,0)},function(Ve,$e){Ve.setUTCFullYear(Ve.getUTCFullYear()+$e*Te)})};var Ke=Le.range;e.timeDay=y,e.timeDays=C,e.timeFriday=m,e.timeFridays=V,e.timeHour=x,e.timeHours=_,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=g,e.timeMinutes=p,e.timeMonday=L,e.timeMondays=I,e.timeMonth=q,e.timeMonths=U,e.timeSaturday=F,e.timeSaturdays=j,e.timeSecond=f,e.timeSeconds=v,e.timeSunday=S,e.timeSundays=E,e.timeThursday=T,e.timeThursdays=O,e.timeTuesday=w,e.timeTuesdays=R,e.timeWednesday=A,e.timeWednesdays=B,e.timeWeek=S,e.timeWeeks=E,e.timeYear=J,e.timeYears=ee,e.utcDay=K,e.utcDays=_e,e.utcFriday=be,e.utcFridays=ct,e.utcHour=xe,e.utcHours=ue,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=ce,e.utcMinutes=ye,e.utcMonday=pe,e.utcMondays=ht,e.utcMonth=qe,e.utcMonths=we,e.utcSaturday=De,e.utcSaturdays=et,e.utcSecond=f,e.utcSeconds=v,e.utcSunday=ae,e.utcSundays=Ge,e.utcThursday=me,e.utcThursdays=ze,e.utcTuesday=ie,e.utcTuesdays=it,e.utcWednesday=le,e.utcWednesdays=Oe,e.utcWeek=ae,e.utcWeeks=Ge,e.utcYear=Le,e.utcYears=Ke,Object.defineProperty(e,"__esModule",{value:!0})})});var lb=fe((KS,Rte)=>{(function(e,t){typeof KS=="object"&&typeof Rte!="undefined"?t(KS,HI()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(KS,function(e,t){"use strict";function r(ft){if(0<=ft.y&&ft.y<100){var kt=new Date(-1,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L);return kt.setFullYear(ft.y),kt}return new Date(ft.y,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L)}function n(ft){if(0<=ft.y&&ft.y<100){var kt=new Date(Date.UTC(-1,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L));return kt.setUTCFullYear(ft.y),kt}return new Date(Date.UTC(ft.y,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L))}function a(ft,kt,rr){return{y:ft,m:kt,d:rr,H:0,M:0,S:0,L:0}}function i(ft){var kt=ft.dateTime,rr=ft.date,pr=ft.time,Kr=ft.periods,Nr=ft.days,dn=ft.shortDays,xr=ft.months,Fr=ft.shortMonths,Zr=v(Kr),Cn=g(Kr),Dt=v(Nr),At=g(Nr),Vt=v(dn),Qt=g(dn),Ut=v(xr),_r=g(xr),rn=v(Fr),Jr=g(Fr),qn={a:sl,A:Eo,b:ao,B:Da,c:null,d:q,e:q,f:ye,g:be,G:Ge,H:U,I:J,j:ee,L:ce,m:xe,M:ue,p:bl,q:bo,Q:or,s:fr,S:K,u:_e,U:ne,V:pe,w:ie,W:le,x:null,X:null,y:me,Y:De,Z:ht,"%":mr},ri={a:Zs,A:su,b:fc,B:Af,c:null,d:it,e:it,f:qe,g:mt,G:Yt,H:Oe,I:ze,j:ct,L:et,m:we,M:Le,p:ut,q:Jt,Q:or,s:fr,S:Ke,u:Te,U:Ve,V:ot,w:tt,W:nt,x:null,X:null,y:We,Y:bt,Z:jt,"%":mr},Jn={a:va,A:Xi,b:oa,B:Ma,c:Ga,d:T,e:T,f:B,g:S,G:k,H:F,I:F,j:m,L:R,m:A,M:E,p:ha,q:w,Q:V,s:j,S:I,u:x,U:_,V:y,w:p,W:C,x:ss,X:mo,y:S,Y:k,Z:L,"%":O};qn.x=Ii(rr,qn),qn.X=Ii(pr,qn),qn.c=Ii(kt,qn),ri.x=Ii(rr,ri),ri.X=Ii(pr,ri),ri.c=Ii(kt,ri);function Ii(er,wr){return function(nn){var Dr=[],bn=-1,Yr=0,Tn=er.length,Kn,Qn,Ai;for(nn instanceof Date||(nn=new Date(+nn));++bn53)return null;"w"in Dr||(Dr.w=1),"Z"in Dr?(Yr=n(a(Dr.y,0,1)),Tn=Yr.getUTCDay(),Yr=Tn>4||Tn===0?t.utcMonday.ceil(Yr):t.utcMonday(Yr),Yr=t.utcDay.offset(Yr,(Dr.V-1)*7),Dr.y=Yr.getUTCFullYear(),Dr.m=Yr.getUTCMonth(),Dr.d=Yr.getUTCDate()+(Dr.w+6)%7):(Yr=r(a(Dr.y,0,1)),Tn=Yr.getDay(),Yr=Tn>4||Tn===0?t.timeMonday.ceil(Yr):t.timeMonday(Yr),Yr=t.timeDay.offset(Yr,(Dr.V-1)*7),Dr.y=Yr.getFullYear(),Dr.m=Yr.getMonth(),Dr.d=Yr.getDate()+(Dr.w+6)%7)}else("W"in Dr||"U"in Dr)&&("w"in Dr||(Dr.w="u"in Dr?Dr.u%7:"W"in Dr?1:0),Tn="Z"in Dr?n(a(Dr.y,0,1)).getUTCDay():r(a(Dr.y,0,1)).getDay(),Dr.m=0,Dr.d="W"in Dr?(Dr.w+6)%7+Dr.W*7-(Tn+5)%7:Dr.w+Dr.U*7-(Tn+6)%7);return"Z"in Dr?(Dr.H+=Dr.Z/100|0,Dr.M+=Dr.Z%100,n(Dr)):r(Dr)}}function ra(er,wr,nn,Dr){for(var bn=0,Yr=wr.length,Tn=nn.length,Kn,Qn;bn=Tn)return-1;if(Kn=wr.charCodeAt(bn++),Kn===37){if(Kn=wr.charAt(bn++),Qn=Jn[Kn in o?wr.charAt(bn++):Kn],!Qn||(Dr=Qn(er,nn,Dr))<0)return-1}else if(Kn!=nn.charCodeAt(Dr++))return-1}return Dr}function ha(er,wr,nn){var Dr=Zr.exec(wr.slice(nn));return Dr?(er.p=Cn[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function va(er,wr,nn){var Dr=Vt.exec(wr.slice(nn));return Dr?(er.w=Qt[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Xi(er,wr,nn){var Dr=Dt.exec(wr.slice(nn));return Dr?(er.w=At[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function oa(er,wr,nn){var Dr=rn.exec(wr.slice(nn));return Dr?(er.m=Jr[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Ma(er,wr,nn){var Dr=Ut.exec(wr.slice(nn));return Dr?(er.m=_r[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Ga(er,wr,nn){return ra(er,kt,wr,nn)}function ss(er,wr,nn){return ra(er,rr,wr,nn)}function mo(er,wr,nn){return ra(er,pr,wr,nn)}function sl(er){return dn[er.getDay()]}function Eo(er){return Nr[er.getDay()]}function ao(er){return Fr[er.getMonth()]}function Da(er){return xr[er.getMonth()]}function bl(er){return Kr[+(er.getHours()>=12)]}function bo(er){return 1+~~(er.getMonth()/3)}function Zs(er){return dn[er.getUTCDay()]}function su(er){return Nr[er.getUTCDay()]}function fc(er){return Fr[er.getUTCMonth()]}function Af(er){return xr[er.getUTCMonth()]}function ut(er){return Kr[+(er.getUTCHours()>=12)]}function Jt(er){return 1+~~(er.getUTCMonth()/3)}return{format:function(er){var wr=Ii(er+="",qn);return wr.toString=function(){return er},wr},parse:function(er){var wr=Vi(er+="",!1);return wr.toString=function(){return er},wr},utcFormat:function(er){var wr=Ii(er+="",ri);return wr.toString=function(){return er},wr},utcParse:function(er){var wr=Vi(er+="",!0);return wr.toString=function(){return er},wr}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(ft,kt,rr){var pr=ft<0?"-":"",Kr=(pr?-ft:ft)+"",Nr=Kr.length;return pr+(Nr68?1900:2e3),rr+pr[0].length):-1}function L(ft,kt,rr){var pr=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(kt.slice(rr,rr+6));return pr?(ft.Z=pr[1]?0:-(pr[2]+(pr[3]||"00")),rr+pr[0].length):-1}function w(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+1));return pr?(ft.q=pr[0]*3-3,rr+pr[0].length):-1}function A(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.m=pr[0]-1,rr+pr[0].length):-1}function T(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.d=+pr[0],rr+pr[0].length):-1}function m(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+3));return pr?(ft.m=0,ft.d=+pr[0],rr+pr[0].length):-1}function F(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.H=+pr[0],rr+pr[0].length):-1}function E(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.M=+pr[0],rr+pr[0].length):-1}function I(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.S=+pr[0],rr+pr[0].length):-1}function R(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+3));return pr?(ft.L=+pr[0],rr+pr[0].length):-1}function B(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+6));return pr?(ft.L=Math.floor(pr[0]/1e3),rr+pr[0].length):-1}function O(ft,kt,rr){var pr=l.exec(kt.slice(rr,rr+1));return pr?rr+pr[0].length:-1}function V(ft,kt,rr){var pr=s.exec(kt.slice(rr));return pr?(ft.Q=+pr[0],rr+pr[0].length):-1}function j(ft,kt,rr){var pr=s.exec(kt.slice(rr));return pr?(ft.s=+pr[0],rr+pr[0].length):-1}function q(ft,kt){return c(ft.getDate(),kt,2)}function U(ft,kt){return c(ft.getHours(),kt,2)}function J(ft,kt){return c(ft.getHours()%12||12,kt,2)}function ee(ft,kt){return c(1+t.timeDay.count(t.timeYear(ft),ft),kt,3)}function ce(ft,kt){return c(ft.getMilliseconds(),kt,3)}function ye(ft,kt){return ce(ft,kt)+"000"}function xe(ft,kt){return c(ft.getMonth()+1,kt,2)}function ue(ft,kt){return c(ft.getMinutes(),kt,2)}function K(ft,kt){return c(ft.getSeconds(),kt,2)}function _e(ft){var kt=ft.getDay();return kt===0?7:kt}function ne(ft,kt){return c(t.timeSunday.count(t.timeYear(ft)-1,ft),kt,2)}function ae(ft){var kt=ft.getDay();return kt>=4||kt===0?t.timeThursday(ft):t.timeThursday.ceil(ft)}function pe(ft,kt){return ft=ae(ft),c(t.timeThursday.count(t.timeYear(ft),ft)+(t.timeYear(ft).getDay()===4),kt,2)}function ie(ft){return ft.getDay()}function le(ft,kt){return c(t.timeMonday.count(t.timeYear(ft)-1,ft),kt,2)}function me(ft,kt){return c(ft.getFullYear()%100,kt,2)}function be(ft,kt){return ft=ae(ft),c(ft.getFullYear()%100,kt,2)}function De(ft,kt){return c(ft.getFullYear()%1e4,kt,4)}function Ge(ft,kt){var rr=ft.getDay();return ft=rr>=4||rr===0?t.timeThursday(ft):t.timeThursday.ceil(ft),c(ft.getFullYear()%1e4,kt,4)}function ht(ft){var kt=ft.getTimezoneOffset();return(kt>0?"-":(kt*=-1,"+"))+c(kt/60|0,"0",2)+c(kt%60,"0",2)}function it(ft,kt){return c(ft.getUTCDate(),kt,2)}function Oe(ft,kt){return c(ft.getUTCHours(),kt,2)}function ze(ft,kt){return c(ft.getUTCHours()%12||12,kt,2)}function ct(ft,kt){return c(1+t.utcDay.count(t.utcYear(ft),ft),kt,3)}function et(ft,kt){return c(ft.getUTCMilliseconds(),kt,3)}function qe(ft,kt){return et(ft,kt)+"000"}function we(ft,kt){return c(ft.getUTCMonth()+1,kt,2)}function Le(ft,kt){return c(ft.getUTCMinutes(),kt,2)}function Ke(ft,kt){return c(ft.getUTCSeconds(),kt,2)}function Te(ft){var kt=ft.getUTCDay();return kt===0?7:kt}function Ve(ft,kt){return c(t.utcSunday.count(t.utcYear(ft)-1,ft),kt,2)}function $e(ft){var kt=ft.getUTCDay();return kt>=4||kt===0?t.utcThursday(ft):t.utcThursday.ceil(ft)}function ot(ft,kt){return ft=$e(ft),c(t.utcThursday.count(t.utcYear(ft),ft)+(t.utcYear(ft).getUTCDay()===4),kt,2)}function tt(ft){return ft.getUTCDay()}function nt(ft,kt){return c(t.utcMonday.count(t.utcYear(ft)-1,ft),kt,2)}function We(ft,kt){return c(ft.getUTCFullYear()%100,kt,2)}function mt(ft,kt){return ft=$e(ft),c(ft.getUTCFullYear()%100,kt,2)}function bt(ft,kt){return c(ft.getUTCFullYear()%1e4,kt,4)}function Yt(ft,kt){var rr=ft.getUTCDay();return ft=rr>=4||rr===0?t.utcThursday(ft):t.utcThursday.ceil(ft),c(ft.getUTCFullYear()%1e4,kt,4)}function jt(){return"+0000"}function mr(){return"%"}function or(ft){return+ft}function fr(ft){return Math.floor(+ft/1e3)}var Ot;cr({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function cr(ft){return Ot=i(ft),e.timeFormat=Ot.format,e.timeParse=Ot.parse,e.utcFormat=Ot.utcFormat,e.utcParse=Ot.utcParse,Ot}var Ct="%Y-%m-%dT%H:%M:%S.%LZ";function wt(ft){return ft.toISOString()}var Tt=Date.prototype.toISOString?wt:e.utcFormat(Ct);function Mt(ft){var kt=new Date(ft);return isNaN(kt)?null:kt}var Lt=+new Date("2000-01-01T00:00:00.000Z")?Mt:e.utcParse(Ct);e.isoFormat=Tt,e.isoParse=Lt,e.timeFormatDefaultLocale=cr,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var jI=fe((JS,Ite)=>{(function(e,t){typeof JS=="object"&&typeof Ite!="undefined"?t(JS):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(JS,(function(e){"use strict";function t(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function r(A,T){if((m=(A=T?A.toExponential(T-1):A.toExponential()).indexOf("e"))<0)return null;var m,F=A.slice(0,m);return[F.length>1?F[0]+F.slice(2):F,+A.slice(m+1)]}function n(A){return A=r(Math.abs(A)),A?A[1]:NaN}function a(A,T){return function(m,F){for(var E=m.length,I=[],R=0,B=A[0],O=0;E>0&&B>0&&(O+B+1>F&&(B=Math.max(1,F-O)),I.push(m.substring(E-=B,E+B)),!((O+=B+1)>F));)B=A[R=(R+1)%A.length];return I.reverse().join(T)}}function i(A){return function(T){return T.replace(/[0-9]/g,function(m){return A[+m]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(A){if(!(T=o.exec(A)))throw new Error("invalid format: "+A);var T;return new l({fill:T[1],align:T[2],sign:T[3],symbol:T[4],zero:T[5],width:T[6],comma:T[7],precision:T[8]&&T[8].slice(1),trim:T[9],type:T[10]})}s.prototype=l.prototype;function l(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}l.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function u(A){e:for(var T=A.length,m=1,F=-1,E;m0&&(F=0);break}return F>0?A.slice(0,F)+A.slice(E+1):A}var c;function f(A,T){var m=r(A,T);if(!m)return A+"";var F=m[0],E=m[1],I=E-(c=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,R=F.length;return I===R?F:I>R?F+new Array(I-R+1).join("0"):I>0?F.slice(0,I)+"."+F.slice(I):"0."+new Array(1-I).join("0")+r(A,Math.max(0,T+I-1))[0]}function v(A,T){var m=r(A,T);if(!m)return A+"";var F=m[0],E=m[1];return E<0?"0."+new Array(-E).join("0")+F:F.length>E+1?F.slice(0,E+1)+"."+F.slice(E+1):F+new Array(E-F.length+2).join("0")}var g={"%":function(A,T){return(A*100).toFixed(T)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:t,e:function(A,T){return A.toExponential(T)},f:function(A,T){return A.toFixed(T)},g:function(A,T){return A.toPrecision(T)},o:function(A){return Math.round(A).toString(8)},p:function(A,T){return v(A*100,T)},r:v,s:f,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function p(A){return A}var x=Array.prototype.map,_=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function y(A){var T=A.grouping===void 0||A.thousands===void 0?p:a(x.call(A.grouping,Number),A.thousands+""),m=A.currency===void 0?"":A.currency[0]+"",F=A.currency===void 0?"":A.currency[1]+"",E=A.decimal===void 0?".":A.decimal+"",I=A.numerals===void 0?p:i(x.call(A.numerals,String)),R=A.percent===void 0?"%":A.percent+"",B=A.minus===void 0?"-":A.minus+"",O=A.nan===void 0?"NaN":A.nan+"";function V(q){q=s(q);var U=q.fill,J=q.align,ee=q.sign,ce=q.symbol,ye=q.zero,xe=q.width,ue=q.comma,K=q.precision,_e=q.trim,ne=q.type;ne==="n"?(ue=!0,ne="g"):g[ne]||(K===void 0&&(K=12),_e=!0,ne="g"),(ye||U==="0"&&J==="=")&&(ye=!0,U="0",J="=");var ae=ce==="$"?m:ce==="#"&&/[boxX]/.test(ne)?"0"+ne.toLowerCase():"",pe=ce==="$"?F:/[%p]/.test(ne)?R:"",ie=g[ne],le=/[defgprs%]/.test(ne);K=K===void 0?6:/[gprs]/.test(ne)?Math.max(1,Math.min(21,K)):Math.max(0,Math.min(20,K));function me(be){var De=ae,Ge=pe,ht,it,Oe;if(ne==="c")Ge=ie(be)+Ge,be="";else{be=+be;var ze=be<0||1/be<0;if(be=isNaN(be)?O:ie(Math.abs(be),K),_e&&(be=u(be)),ze&&+be==0&&ee!=="+"&&(ze=!1),De=(ze?ee==="("?ee:B:ee==="-"||ee==="("?"":ee)+De,Ge=(ne==="s"?_[8+c/3]:"")+Ge+(ze&&ee==="("?")":""),le){for(ht=-1,it=be.length;++htOe||Oe>57){Ge=(Oe===46?E+be.slice(ht+1):be.slice(ht))+Ge,be=be.slice(0,ht);break}}}ue&&!ye&&(be=T(be,1/0));var ct=De.length+be.length+Ge.length,et=ct>1)+De+be+Ge+et.slice(ct);break;default:be=et+De+be+Ge;break}return I(be)}return me.toString=function(){return q+""},me}function j(q,U){var J=V((q=s(q),q.type="f",q)),ee=Math.max(-8,Math.min(8,Math.floor(n(U)/3)))*3,ce=Math.pow(10,-ee),ye=_[8+ee/3];return function(xe){return J(ce*xe)+ye}}return{format:V,formatPrefix:j}}var C;k({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function k(A){return C=y(A),e.format=C.format,e.formatPrefix=C.formatPrefix,C}function S(A){return Math.max(0,-n(Math.abs(A)))}function L(A,T){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(T)/3)))*3-n(Math.abs(A)))}function w(A,T){return A=Math.abs(A),T=Math.abs(T)-A,Math.max(0,n(T)-n(A))+1}e.FormatSpecifier=l,e.formatDefaultLocale=k,e.formatLocale=y,e.formatSpecifier=s,e.precisionFixed=S,e.precisionPrefix=L,e.precisionRound=w,Object.defineProperty(e,"__esModule",{value:!0})}))});var qte=fe((Hcr,zte)=>{"use strict";zte.exports=function(e){for(var t=e.length,r,n=0;n13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var aa=fe((jcr,Bte)=>{"use strict";var Cat=qte();Bte.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Cat(r))return!1}else if(t!=="number")return!1;return e-e<1}});var Wa=fe((Wcr,Ote)=>{"use strict";Ote.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}});var WI=fe((QS,Nte)=>{(function(e,t){typeof QS=="object"&&typeof Nte!="undefined"?t(QS):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(QS,(function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},i=function(o){var s=o.length*.75,l=o.length,u,c=0,f,v,g,p;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var x=new ArrayBuffer(s),_=new Uint8Array(x);for(u=0;u>4,_[c++]=(v&15)<<4|g>>2,_[c++]=(g&3)<<6|p&63;return x};e.decode=i,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})}))});var em=fe((Ycr,Ute)=>{"use strict";Ute.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var Gf=fe(Zv=>{"use strict";var Lat=WI().decode,Pat=em(),YI=Array.isArray,Fat=ArrayBuffer,Dat=DataView;function Vte(e){return Fat.isView(e)&&!(e instanceof Dat)}Zv.isTypedArray=Vte;function eE(e){return YI(e)||Vte(e)}Zv.isArrayOrTypedArray=eE;function Rat(e){return!eE(e[0])}Zv.isArray1D=Rat;Zv.ensureArray=function(e,t){return YI(e)||(e=[]),e.length=t,e};var vf={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};vf.uint8c=vf.u1c;vf.uint8=vf.u1;vf.int8=vf.i1;vf.uint16=vf.u2;vf.int16=vf.i2;vf.uint32=vf.u4;vf.int32=vf.i4;vf.float32=vf.f4;vf.float64=vf.f8;function XI(e){return e.constructor===ArrayBuffer}Zv.isArrayBuffer=XI;Zv.decodeTypedArraySpec=function(e){var t=[],r=Iat(e),n=r.dtype,a=vf[n];if(!a)throw new Error('Error in dtype: "'+n+'"');var i=a.BYTES_PER_ELEMENT,o=r.bdata;XI(o)||(o=Lat(o));var s=r.shape===void 0?[o.byteLength/i]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],v=i*f,g=0;if(l===1)t=new a(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var Hte=aa(),$I=Gf().isArrayOrTypedArray;Xte.exports=function(t,r){if(Hte(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var n=r.split("."),a,i,o,s;for(s=0;s{"use strict";var ub=M4(),Nat=/^\w*$/,Uat=0,Zte=1,tE=2,$te=3,ux=4;Kte.exports=function(t,r,n,a){n=n||"name",a=a||"value";var i,o,s,l={};r&&r.length?(s=ub(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(i=0;i2)return l[g]=l[g]|tE,f.set(v,null);if(c){for(i=g;i{"use strict";var Vat=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Gat=/^[^\.\[\]]+$/;Qte.exports=function(e,t){for(;t;){var r=e.match(Vat);if(r)e=r[1];else if(e.match(Gat))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var rE=fe((Jcr,tre)=>{"use strict";var Hat=aa();tre.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return Hat(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var ire=fe((Qcr,nre)=>{"use strict";var rre=Gf().isArrayOrTypedArray,S4=em();nre.exports=function e(t,r){for(var n in r){var a=r[n],i=t[n];if(i!==a)if(n.charAt(0)==="_"||typeof a=="function"){if(n in t)continue;t[n]=a}else if(rre(a)&&rre(i)&&S4(a[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(a.length,i.length),s=0;sjat,modHalf:()=>Wat});function jat(e,t){let r=e%t;return r<0?r+t:r}function Wat(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}var fb=Co(()=>{"use strict"});var ta=fe(C4=>{"use strict";var are=em(),E4=Array.isArray;function Yat(e,t){var r,n;for(r=0;r{"use strict";ore.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var a={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:a,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var L4=fe((rfr,sre)=>{"use strict";sre.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var tm=fe((nfr,cre)=>{"use strict";var lre=L4(),ure=Ds(),KI=ure({editType:"none"});KI.family.dflt=lre.HOVERFONT;KI.size.dflt=lre.HOVERFONTSIZE;cre.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:KI,grouptitlefont:ure({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var hb=fe((ifr,fre)=>{"use strict";var Xat=Ds(),P4=tm().hoverlabel,F4=ta().extendFlat;fre.exports={hoverlabel:{bgcolor:F4({},P4.bgcolor,{arrayOk:!0}),bordercolor:F4({},P4.bordercolor,{arrayOk:!0}),font:Xat({arrayOk:!0,editType:"none"}),align:F4({},P4.align,{arrayOk:!0}),namelength:F4({},P4.namelength,{arrayOk:!0}),showarrow:F4({},P4.showarrow),editType:"none"}}});var Ho=fe((afr,hre)=>{"use strict";var Zat=Ds(),$at=hb();hre.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:Zat({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:$at.hoverlabel,uirevision:{valType:"any",editType:"none"}}});var iie=fe((hfr,nie)=>{var Gz=Object.defineProperty,Kat=Object.getOwnPropertyDescriptor,Jat=Object.getOwnPropertyNames,Qat=Object.prototype.hasOwnProperty,eot=(e,t)=>{for(var r in t)Gz(e,r,{get:t[r],enumerable:!0})},tot=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Jat(t))!Qat.call(e,a)&&a!==r&&Gz(e,a,{get:()=>t[a],enumerable:!(n=Kat(t,a))||n.enumerable});return e},rot=e=>tot(Gz({},"__esModule",{value:!0}),e),wre={};eot(wre,{a98:()=>Yut,average:()=>Jot,averageAngle:()=>Op,averageNumber:()=>Ore,blend:()=>Klt,blerp:()=>Tz,clampChroma:()=>mut,clampGamut:()=>gq,clampRgb:()=>gut,colorsNamed:()=>Are,convertA98ToXyz65:()=>Az,convertCubehelixToRgb:()=>qre,convertDlchToLab65:()=>fE,convertHsiToRgb:()=>Yre,convertHslToRgb:()=>$re,convertHsvToRgb:()=>Zz,convertHwbToRgb:()=>ene,convertItpToXyz65:()=>Sz,convertJabToJch:()=>kz,convertJabToRgb:()=>tq,convertJabToXyz65:()=>Qz,convertJchToJab:()=>Cz,convertLab65ToDlch:()=>hE,convertLab65ToRgb:()=>N4,convertLab65ToXyz65:()=>Wz,convertLabToLch:()=>H1,convertLabToRgb:()=>nq,convertLabToXyz50:()=>wE,convertLchToLab:()=>j1,convertLchuvToLuv:()=>oq,convertLrgbToOklab:()=>sq,convertLrgbToRgb:()=>gx,convertLuvToLchuv:()=>aq,convertLuvToXyz50:()=>vE,convertOkhslToOklab:()=>Fz,convertOkhsvToOklab:()=>Rz,convertOklabToLrgb:()=>_b,convertOklabToOkhsl:()=>Pz,convertOklabToOkhsv:()=>Dz,convertOklabToRgb:()=>G4,convertP3ToXyz65:()=>Iz,convertProphotoToXyz50:()=>Bz,convertRec2020ToXyz65:()=>Nz,convertRgbToCubehelix:()=>zre,convertRgbToHsi:()=>Xre,convertRgbToHsl:()=>Kre,convertRgbToHsv:()=>$z,convertRgbToHwb:()=>tne,convertRgbToJab:()=>eq,convertRgbToLab:()=>iq,convertRgbToLab65:()=>U4,convertRgbToLrgb:()=>px,convertRgbToOklab:()=>V4,convertRgbToXyb:()=>Cne,convertRgbToXyz50:()=>xb,convertRgbToXyz65:()=>rm,convertRgbToYiq:()=>zne,convertXybToRgb:()=>Lne,convertXyz50ToLab:()=>TE,convertXyz50ToLuv:()=>dE,convertXyz50ToProphoto:()=>qz,convertXyz50ToRgb:()=>yb,convertXyz50ToXyz65:()=>Rne,convertXyz65ToA98:()=>Mz,convertXyz65ToItp:()=>Ez,convertXyz65ToJab:()=>Jz,convertXyz65ToLab65:()=>Yz,convertXyz65ToP3:()=>zz,convertXyz65ToRec2020:()=>Oz,convertXyz65ToRgb:()=>nm,convertXyz65ToXyz50:()=>Dne,convertYiqToRgb:()=>qne,converter:()=>dl,cubehelix:()=>Xut,differenceCie76:()=>jot,differenceCie94:()=>Wot,differenceCiede2000:()=>Yot,differenceCmc:()=>Xot,differenceEuclidean:()=>mb,differenceHueChroma:()=>O4,differenceHueNaive:()=>Bre,differenceHueSaturation:()=>B4,differenceHyab:()=>Zot,differenceItp:()=>Kot,differenceKotsarenkoRamos:()=>$ot,displayable:()=>pq,dlab:()=>Zut,dlch:()=>$ut,easingGamma:()=>Jne,easingInOutSine:()=>jut,easingMidpoint:()=>jne,easingSmootherstep:()=>Gut,easingSmoothstep:()=>Nut,easingSmoothstepInverse:()=>Uut,filterBrightness:()=>Sut,filterContrast:()=>Eut,filterDeficiencyDeuter:()=>But,filterDeficiencyProt:()=>qut,filterDeficiencyTrit:()=>Out,filterGrayscale:()=>Lut,filterHueRotate:()=>Fut,filterInvert:()=>Put,filterSaturate:()=>Cut,filterSepia:()=>kut,fixupAlpha:()=>Nc,fixupHueDecreasing:()=>Not,fixupHueIncreasing:()=>Oot,fixupHueLonger:()=>Bot,fixupHueShorter:()=>Bp,formatCss:()=>Hlt,formatHex:()=>jlt,formatHex8:()=>Wlt,formatHsl:()=>Xlt,formatRgb:()=>Ylt,getMode:()=>Kh,hsi:()=>Kut,hsl:()=>Jut,hsv:()=>Qut,hwb:()=>ect,inGamut:()=>SE,interpolate:()=>out,interpolateWith:()=>Yne,interpolateWithPremultipliedAlpha:()=>sut,interpolatorLinear:()=>Ui,interpolatorPiecewise:()=>Rre,interpolatorSplineBasis:()=>Zne,interpolatorSplineBasisClosed:()=>$ne,interpolatorSplineMonotone:()=>cut,interpolatorSplineMonotone2:()=>fut,interpolatorSplineMonotoneClosed:()=>hut,interpolatorSplineNatural:()=>lut,interpolatorSplineNaturalClosed:()=>uut,itp:()=>tct,jab:()=>rct,jch:()=>nct,lab:()=>ict,lab65:()=>act,lch:()=>oct,lch65:()=>sct,lchuv:()=>lct,lerp:()=>fx,lrgb:()=>uct,luv:()=>cct,mapAlphaDivide:()=>Hne,mapAlphaMultiply:()=>Gne,mapTransferGamma:()=>rut,mapTransferLinear:()=>hq,mapper:()=>H4,modeA98:()=>Ire,modeCubehelix:()=>Nre,modeDlab:()=>jre,modeDlch:()=>Wre,modeHsi:()=>Zre,modeHsl:()=>Xz,modeHsv:()=>Kz,modeHwb:()=>nne,modeItp:()=>one,modeJab:()=>sne,modeJch:()=>lne,modeLab:()=>AE,modeLab65:()=>cne,modeLch:()=>ME,modeLch65:()=>hne,modeLchuv:()=>pne,modeLrgb:()=>gne,modeLuv:()=>mne,modeOkhsl:()=>xne,modeOkhsv:()=>_ne,modeOklab:()=>wne,modeOklch:()=>Ane,modeP3:()=>Mne,modeProphoto:()=>Sne,modeRec2020:()=>Ene,modeRgb:()=>vx,modeXyb:()=>Pne,modeXyz50:()=>Fne,modeXyz65:()=>Ine,modeYiq:()=>Bne,nearest:()=>_ut,okhsl:()=>fct,okhsv:()=>hct,oklab:()=>dct,oklch:()=>vct,p3:()=>pct,parse:()=>Pre,parseHex:()=>Sre,parseHsl:()=>Qre,parseHslLegacy:()=>Jre,parseHwb:()=>rne,parseLab:()=>une,parseLch:()=>fne,parseNamed:()=>Mre,parseOklab:()=>bne,parseOklch:()=>Tne,parseRgb:()=>Fre,parseRgbLegacy:()=>Ere,parseTransparent:()=>Dre,prophoto:()=>gct,random:()=>tut,rec2020:()=>mct,removeParser:()=>got,rgb:()=>yct,round:()=>One,samples:()=>put,serializeHex:()=>fq,serializeHex8:()=>Nne,serializeHsl:()=>Vne,serializeRgb:()=>Une,toGamut:()=>yut,trilerp:()=>Eot,unlerp:()=>Sot,useMode:()=>Rs,useParser:()=>Cre,wcagContrast:()=>Wut,wcagLuminance:()=>Vz,xyb:()=>xct,xyz50:()=>_ct,xyz65:()=>bct,yiq:()=>wct});nie.exports=rot(wre);var not=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},Tre=not,iot={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},Are=iot,aot=e=>Tre(Are[e.toLowerCase()],6),Mre=aot,oot=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,sot=e=>{let t;return(t=e.match(oot))?Tre(parseInt(t[1],16),t[1].length):void 0},Sre=sot,$d="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",ofr=`(?:${$d}|none)`,I4=`${$d}%`,sfr=`(?:${$d}%|none)`,Hz=`(?:${$d}%|${$d})`,lot=`(?:${$d}%|${$d}|none)`,uot=`(?:${$d}(deg|grad|rad|turn)|${$d})`,lfr=`(?:${$d}(deg|grad|rad|turn)|${$d}|none)`,pb="\\s*,\\s*",ufr=new RegExp("^"+lot+"$"),cot=new RegExp(`^rgba?\\(\\s*${$d}${pb}${$d}${pb}${$d}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),fot=new RegExp(`^rgba?\\(\\s*${I4}${pb}${I4}${pb}${I4}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),hot=e=>{let t={mode:"rgb"},r;if(r=e.match(cot))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(fot))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Ere=hot,dot=(e,t)=>e===void 0?void 0:typeof e!="object"?Pre(e):e.mode!==void 0?e:t?tl(zo({},e),{mode:t}):void 0,$v=dot,vot=(e="rgb")=>t=>(t=$v(t,e))!==void 0?t.mode===e?t:qp[t.mode][e]?qp[t.mode][e](t):e==="rgb"?qp[t.mode].rgb(t):qp.rgb[e](qp[t.mode].rgb(t)):void 0,dl=vot,qp={},kre={},gb=[],jz={},pot=e=>e,Rs=e=>(qp[e.mode]=zo(zo({},qp[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{qp[t]||(qp[t]={}),qp[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=pot)}),kre[e.mode]=e,(e.parse||[]).forEach(t=>{Cre(t,e.mode)}),dl(e.mode)),Kh=e=>kre[e],Cre=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");jz[e]=t}else typeof e=="function"&&gb.indexOf(e)<0&&gb.push(e)},got=e=>{if(typeof e=="string")delete jz[e];else if(typeof e=="function"){let t=gb.indexOf(e);t>0&&gb.splice(t,1)}},bz=/[^\x00-\x7F]|[a-zA-Z_]/,mot=/[^\x00-\x7F]|[-\w]/,Ti={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},eo=0;function nE(e){let t=e[eo],r=e[eo+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[eo+2]):t==="."?/\d/.test(r):/\d/.test(t)}function wz(e){if(eo>=e.length)return!1;let t=e[eo];if(bz.test(t))return!0;if(t==="-"){if(e.length-eo<2)return!1;let r=e[eo+1];return!!(r==="-"||bz.test(r))}return!1}var yot={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function D4(e){let t="";if((e[eo]==="-"||e[eo]==="+")&&(t+=e[eo++]),t+=iE(e),e[eo]==="."&&/\d/.test(e[eo+1])&&(t+=e[eo++]+iE(e)),(e[eo]==="e"||e[eo]==="E")&&((e[eo+1]==="-"||e[eo+1]==="+")&&/\d/.test(e[eo+2])?t+=e[eo++]+e[eo++]+iE(e):/\d/.test(e[eo+1])&&(t+=e[eo++]+iE(e))),wz(e)){let r=sE(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:Ti.Hue,value:t*yot[r]}:void 0}return e[eo]==="%"?(eo++,{type:Ti.Percentage,value:+t}):{type:Ti.Number,value:+t}}function iE(e){let t="";for(;/\d/.test(e[eo]);)t+=e[eo++];return t}function sE(e){let t="";for(;eo4)){if(r.length===4){if(r[3].type!==Ti.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:Ti.None,value:void 0}),r.every(a=>a.type!==Ti.Alpha)?r:void 0}}function wot(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==Ti.Function)return;let n=Lre(e,t);if(n)return n.unshift(r.value),n}var Tot=e=>{if(typeof e!="string")return;let t=_ot(e),r=t?wot(t,!0):void 0,n,a=0,i=gb.length;for(;ae==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Dre=Mot,fx=(e,t,r)=>e+r*(t-e),Sot=(e,t,r)=>(r-e)/(t-e),Tz=(e,t,r,n,a,i)=>fx(fx(e,t,a),fx(r,n,a),i),Eot=(e,t,r,n,a,i,o,s,l,u,c)=>fx(Tz(e,t,r,n,l,u),Tz(a,i,o,s,l,u),c),kot=e=>{let t=[];for(let r=0;rt=>{let r=kot(t);return n=>{let a=n*r.length,i=n>=1?r.length-1:Math.max(Math.floor(a),0),o=r[i];return o===void 0?void 0:e(o[0],o[1],a-i)}},Ui=Rre(fx),Nc=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e},Cot={mode:"rgb",channels:["r","g","b","alpha"],parse:[Fre,Sre,Ere,Mre,Dre,"srgb"],serialize:"srgb",interpolate:{r:Ui,g:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},vx=Cot,JI=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Lot=e=>{let t=JI(e.r),r=JI(e.g),n=JI(e.b),a={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Az=Lot,QI=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Pot=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"a98",r:QI(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:QI(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:QI(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(a.alpha=n),a},Mz=Pot,ez=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Fot=({r:e,g:t,b:r,alpha:n})=>{let a={mode:"lrgb",r:ez(e),g:ez(t),b:ez(r)};return n!==void 0&&(a.alpha=n),a},px=Fot,Dot=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return a!==void 0&&(i.alpha=a),i},rm=Dot,tz=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},Rot=({r:e,g:t,b:r,alpha:n},a="rgb")=>{let i={mode:a,r:tz(e),g:tz(t),b:tz(r)};return n!==void 0&&(i.alpha=n),i},gx=Rot,Iot=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=gx({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(a.alpha=n),a},nm=Iot,zot=tl(zo({},vx),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Mz(rm(e)),xyz65:Mz},toMode:{rgb:e=>nm(Az(e)),xyz65:Az}}),Ire=zot,qot=e=>(e=e%360)<0?e+360:e,Th=qot,gE=(e,t)=>e.map((r,n,a)=>{if(r===void 0)return r;let i=Th(r);return n===0||e[n-1]===void 0?i:t(i-Th(a[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),Bp=e=>gE(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),Bot=e=>gE(e,t=>Math.abs(t)>=180||t===0?t:t-360*Math.sign(t)),Oot=e=>gE(e,t=>t>=0?t:t+360),Not=e=>gE(e,t=>t<=0?t:t-360),Hf=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Uot=Math.PI/180,Vot=180/Math.PI,dre=Hf[3]*Hf[4],vre=Hf[1]*Hf[4],pre=Hf[1]*Hf[2]-Hf[0]*Hf[3],Got=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(pre*r+e*dre-t*vre)/(pre+dre-vre),i=r-a,o=(Hf[4]*(t-a)-Hf[2]*i)/Hf[3],s={mode:"cubehelix",l:a,s:a===0||a===1?void 0:Math.sqrt(i*i+o*o)/(Hf[4]*a*(1-a))};return s.s&&(s.h=Math.atan2(o,i)*Vot-120),n!==void 0&&(s.alpha=n),s},zre=Got,Hot=({h:e,s:t,l:r,alpha:n})=>{let a={mode:"rgb"};e=(e===void 0?0:e+120)*Uot,r===void 0&&(r=0);let i=t===void 0?0:t*r*(1-r),o=Math.cos(e),s=Math.sin(e);return a.r=r+i*(Hf[0]*o+Hf[1]*s),a.g=r+i*(Hf[2]*o+Hf[3]*s),a.b=r+i*(Hf[4]*o+Hf[5]*s),n!==void 0&&(a.alpha=n),a},qre=Hot,B4=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=Th(e.h),n=Th(t.h),a=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*a},Bre=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=Th(e.h),n=Th(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},O4=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=Th(e.h),n=Th(t.h),a=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*a},mb=(e="rgb",t=[1,1,1,0])=>{let r=Kh(e),n=r.channels,a=r.difference,i=dl(e);return(o,s)=>{let l=i(o),u=i(s);return Math.sqrt(n.reduce((c,f,v)=>{let g=a[f]?a[f](l,u):l[f]-u[f];return c+(t[v]||0)*Math.pow(isNaN(g)?0:g,2)},0))}},jot=()=>mb("lab65"),Wot=(e=1,t=.045,r=.015)=>{let n=dl("lab65");return(a,i)=>{let o=n(a),s=n(i),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),v=s.l,g=s.a,p=s.b,x=Math.sqrt(g*g+p*p),_=Math.pow(l-v,2),y=Math.pow(f-x,2),C=Math.pow(u-g,2)+Math.pow(c-p,2)-y;return Math.sqrt(_/Math.pow(e,2)+y/Math.pow(1+t*f,2)+C/Math.pow(1+r*f,2))}},Yot=(e=1,t=1,r=1)=>{let n=dl("lab65");return(a,i)=>{let o=n(a),s=n(i),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),v=s.l,g=s.a,p=s.b,x=Math.sqrt(g*g+p*p),_=(f+x)/2,y=.5*(1-Math.sqrt(Math.pow(_,7)/(Math.pow(_,7)+Math.pow(25,7)))),C=u*(1+y),k=g*(1+y),S=Math.sqrt(C*C+c*c),L=Math.sqrt(k*k+p*p),w=Math.abs(C)+Math.abs(c)===0?0:Math.atan2(c,C);w+=(w<0)*2*Math.PI;let A=Math.abs(k)+Math.abs(p)===0?0:Math.atan2(p,k);A+=(A<0)*2*Math.PI;let T=v-l,m=L-S,F=S*L===0?0:A-w;F-=(F>Math.PI)*2*Math.PI,F+=(F<-Math.PI)*2*Math.PI;let E=2*Math.sqrt(S*L)*Math.sin(F/2),I=(l+v)/2,R=(S+L)/2,B;S*L===0?B=w+A:(B=(w+A)/2,B-=(Math.abs(w-A)>Math.PI)*Math.PI,B+=(B<0)*2*Math.PI);let O=Math.pow(I-50,2),V=1-.17*Math.cos(B-Math.PI/6)+.24*Math.cos(2*B)+.32*Math.cos(3*B+Math.PI/30)-.2*Math.cos(4*B-63*Math.PI/180),j=1+.015*O/Math.sqrt(20+O),q=1+.045*R,U=1+.015*R*V,J=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*B-275)/25,2)),ee=2*Math.sqrt(Math.pow(R,7)/(Math.pow(R,7)+Math.pow(25,7))),ce=-1*Math.sin(2*J)*ee;return Math.sqrt(Math.pow(T/(e*j),2)+Math.pow(m/(t*q),2)+Math.pow(E/(r*U),2)+ce*m/(t*q)*E/(r*U))}},Xot=(e=1,t=1)=>{let r=dl("lab65");return(n,a)=>{let i=r(n),o=i.l,s=i.a,l=i.b,u=Math.sqrt(s*s+l*l),c=Math.atan2(l,s);c=c+2*Math.PI*(c<0);let f=r(a),v=f.l,g=f.a,p=f.b,x=Math.sqrt(g*g+p*p),_=Math.pow(o-v,2),y=Math.pow(u-x,2),C=Math.pow(s-g,2)+Math.pow(l-p,2)-y,k=Math.sqrt(Math.pow(u,4)/(Math.pow(u,4)+1900)),S=c>=164/180*Math.PI&&c<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(c+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(c+35/180*Math.PI)),L=o<16?.511:.040975*o/(1+.01765*o),w=.0638*u/(1+.0131*u)+.638,A=w*(k*S+1-k);return Math.sqrt(_/Math.pow(e*L,2)+y/Math.pow(t*w,2)+C/Math.pow(A,2))}},Zot=()=>{let e=dl("lab65");return(t,r)=>{let n=e(t),a=e(r),i=n.l-a.l,o=n.a-a.a,s=n.b-a.b;return Math.abs(i)+Math.sqrt(o*o+s*s)}},$ot=()=>mb("yiq",[.5053,.299,.1957]),Kot=()=>mb("itp",[518400,129600,518400]),Op=e=>{let t=e.reduce((n,a)=>{if(a!==void 0){let i=a*Math.PI/180;n.sin+=Math.sin(i),n.cos+=Math.cos(i)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},Ore=e=>{let t=e.filter(r=>r!==void 0);return t.length?t.reduce((r,n)=>r+n,0)/t.length:void 0},rz=e=>typeof e=="function";function Jot(e,t="rgb",r){let n=Kh(t),a=e.map(dl(t));return n.channels.reduce((i,o)=>{let s=a.map(l=>l[o]).filter(l=>l!==void 0);if(s.length){let l;rz(r)?l=r:r&&rz(r[o])?l=r[o]:n.average&&rz(n.average[o])?l=n.average[o]:l=Ore,i[o]=l(s,o)}return i},{mode:t})}var Qot={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:zre},toMode:{rgb:qre},interpolate:{h:{use:Ui,fixup:Bp},s:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:B4},average:{h:Op}},Nre=Qot,est=({l:e,a:t,b:r,alpha:n},a="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let i=Math.sqrt(t*t+r*r),o={mode:a,l:e,c:i};return i&&(o.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(o.alpha=n),o},H1=est,tst=({l:e,c:t,h:r,alpha:n},a="lab")=>{r===void 0&&(r=0);let i={mode:a,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(i.alpha=n),i},j1=tst,Ure=Math.pow(29,3)/Math.pow(3,3),Vre=Math.pow(6,3)/Math.pow(29,3),Oc={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},vb={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},cfr=Math.pow(29,3)/Math.pow(3,3),ffr=Math.pow(6,3)/Math.pow(29,3),nz=e=>Math.pow(e,3)>Vre?Math.pow(e,3):(116*e-16)/Ure,rst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+16)/116,i=t/500+a,o=a-r/200,s={mode:"xyz65",x:nz(i)*vb.X,y:nz(a)*vb.Y,z:nz(o)*vb.Z};return n!==void 0&&(s.alpha=n),s},Wz=rst,nst=e=>nm(Wz(e)),N4=nst,iz=e=>e>Vre?Math.cbrt(e):(Ure*e+16)/116,ist=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=iz(e/vb.X),i=iz(t/vb.Y),o=iz(r/vb.Z),s={mode:"lab65",l:116*i-16,a:500*(a-i),b:200*(i-o)};return n!==void 0&&(s.alpha=n),s},Yz=ist,ast=e=>{let t=Yz(rm(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},U4=ast,lE=1,Gre=1,q4=26/180*Math.PI,uE=Math.cos(q4),cE=Math.sin(q4),Hre=100/Math.log(139/100),ost=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"lab65",l:(Math.exp(e*lE/Hre)-1)/.0039},i=(Math.exp(.0435*t*Gre*lE)-1)/.075,o=i*Math.cos(r/180*Math.PI-q4),s=i*Math.sin(r/180*Math.PI-q4);return a.a=o*uE-s/.83*cE,a.b=o*cE+s/.83*uE,n!==void 0&&(a.alpha=n),a},fE=ost,sst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=t*uE+r*cE,i=.83*(r*uE-t*cE),o=Math.sqrt(a*a+i*i),s={mode:"dlch",l:Hre/lE*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*Gre*lE)};return s.c&&(s.h=Th((Math.atan2(i,a)+q4)/Math.PI*180)),n!==void 0&&(s.alpha=n),s},hE=sst,gre=e=>fE(H1(e,"dlch")),mre=e=>j1(hE(e),"dlab"),lst={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:gre,rgb:e=>N4(gre(e))},fromMode:{lab65:mre,rgb:e=>mre(U4(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},jre=lst,ust={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:fE,dlab:e=>j1(e,"dlab"),rgb:e=>N4(fE(e))},fromMode:{lab65:hE,dlab:e=>H1(e,"dlch"),rgb:e=>hE(U4(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ui,c:Ui,h:{use:Ui,fixup:Bp},alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},Wre=ust;function Yre({h:e,s:t,i:r,alpha:n}){e=Th(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1-t)};break;case 1:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1+t*(3/(2-a)-1)),b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r*(1+t*(3/(2-a)-1)),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;case 3:i={r:r*(1-t),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1+t*(3/(2-a)-1))};break;case 4:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3/(2-a)-1))};break;case 5:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function Xre({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.max(e,t,r),i=Math.min(e,t,r),o={mode:"hsi",s:e+t+r===0?0:1-3*i/(e+t+r),i:(e+t+r)/3};return a-i!==0&&(o.h=(a===e?(t-r)/(a-i)+(t{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},hst=fst,dst=new RegExp(`^hsla?\\(\\s*${uot}${pb}${I4}${pb}${I4}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),vst=e=>{let t=e.match(dst);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=hst(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},Jre=vst;function pst(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Percentage)return;r.h=n.value}if(a.type!==Ti.None){if(a.type===Ti.Hue)return;r.s=a.value/100}if(i.type!==Ti.None){if(i.type===Ti.Hue)return;r.l=i.value/100}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var Qre=pst,gst={mode:"hsl",toMode:{rgb:$re},fromMode:{rgb:Kre},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Qre,Jre],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},s:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:B4},average:{h:Op}},Xz=gst;function Zz({h:e,s:t,v:r,alpha:n}){e=Th(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r,g:r*(1-t*a),b:r*(1-t)};break;case 1:i={r:r*(1-t*a),g:r,b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r,b:r*(1-t*a)};break;case 3:i={r:r*(1-t),g:r*(1-t*a),b:r};break;case 4:i={r:r*(1-t*a),g:r*(1-t),b:r};break;case 5:i={r,g:r*(1-t),b:r*(1-t*a)};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function $z({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.max(e,t,r),i=Math.min(e,t,r),o={mode:"hsv",s:a===0?0:1-i/a,v:a};return a-i!==0&&(o.h=(a===e?(t-r)/(a-i)+(t1){let a=t+r;t/=a,r/=a}return Zz({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function tne(e){let t=$z(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,a={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(a.h=t.h),t.alpha!==void 0&&(a.alpha=t.alpha),a}function yst(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Percentage)return;r.h=n.value}if(a.type!==Ti.None){if(a.type===Ti.Hue)return;r.w=a.value/100}if(i.type!==Ti.None){if(i.type===Ti.Hue)return;r.b=i.value/100}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var rne=yst,xst={mode:"hwb",toMode:{rgb:ene},fromMode:{rgb:tne},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[rne],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},w:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:Bre},average:{h:Op}},nne=xst,ine=203,mE=.1593017578125,ane=78.84375,yE=.8359375,xE=18.8515625,_E=18.6875;function az(e){if(e<0)return 0;let t=Math.pow(e,1/ane);return 1e4*Math.pow(Math.max(0,t-yE)/(xE-_E*t),1/mE)}function oz(e){if(e<0)return 0;let t=Math.pow(e/1e4,mE);return Math.pow((yE+xE*t)/(1+_E*t),ane)}var sz=e=>Math.max(e/ine,0),_st=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=az(e+.008609037037932761*t+.11102962500302593*r),i=az(e-.00860903703793275*t-.11102962500302599*r),o=az(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:sz(2.070152218389422*a-1.3263473389671556*i+.2066510476294051*o),y:sz(.3647385209748074*a+.680566024947227*i-.0453045459220346*o),z:sz(-.049747207535812*a-.0492609666966138*i+1.1880659249923042*o)};return n!==void 0&&(s.alpha=n),s},Sz=_st,lz=(e=0)=>Math.max(e*ine,0),bst=({x:e,y:t,z:r,alpha:n})=>{let a=lz(e),i=lz(t),o=lz(r),s=oz(.3592832590121217*a+.6976051147779502*i-.0358915932320289*o),l=oz(-.1920808463704995*a+1.1004767970374323*i+.0753748658519118*o),u=oz(.0070797844607477*a+.0748396662186366*i+.8433265453898765*o),c=.5*s+.5*l,f=1.61376953125*s-3.323486328125*l+1.709716796875*u,v=4.378173828125*s-4.24560546875*l-.132568359375*u,g={mode:"itp",i:c,t:f,p:v};return n!==void 0&&(g.alpha=n),g},Ez=bst,wst={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Sz,rgb:e=>nm(Sz(e))},fromMode:{xyz65:Ez,rgb:e=>Ez(rm(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ui,t:Ui,p:Ui,alpha:{use:Ui,fixup:Nc}}},one=wst,Tst=134.03437499999998,Ast=16295499532821565e-27,uz=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,mE);return Math.pow((yE+xE*t)/(1+_E*t),Tst)},cz=(e=0)=>Math.max(e*203,0),Mst=({x:e,y:t,z:r,alpha:n})=>{e=cz(e),t=cz(t),r=cz(r);let a=1.15*e-.15*r,i=.66*t+.34*e,o=uz(.41478972*a+.579999*i+.014648*r),s=uz(-.20151*a+1.120649*i+.0531008*r),l=uz(-.0166008*a+.2648*i+.6684799*r),u=(o+s)/2,c={mode:"jab",j:.44*u/(1-.56*u)-Ast,a:3.524*o-4.066708*s+.542708*l,b:.199076*o+1.096799*s-1.295875*l};return n!==void 0&&(c.alpha=n),c},Jz=Mst,Sst=134.03437499999998,yre=16295499532821565e-27,fz=e=>{if(e<0)return 0;let t=Math.pow(e,1/Sst);return 1e4*Math.pow((yE-t)/(_E*t-xE),1/mE)},hz=e=>e/203,Est=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+yre)/(.44+.56*(e+yre)),i=fz(a+.13860504*t+.058047316*r),o=fz(a-.13860504*t-.058047316*r),s=fz(a-.096019242*t-.8118919*r),l={mode:"xyz65",x:hz(1.661373024652174*i-.914523081304348*o+.23136208173913045*s),y:hz(-.3250758611844533*i+1.571847026732543*o-.21825383453227928*s),z:hz(-.090982811*i-.31272829*o+1.5227666*s)};return n!==void 0&&(l.alpha=n),l},Qz=Est,kst=e=>{let t=Jz(rm(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},eq=kst,Cst=e=>nm(Qz(e)),tq=Cst,Lst={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:eq,xyz65:Jz},toMode:{rgb:tq,xyz65:Qz},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},sne=Lst,Pst=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:"jch",j:e,c:a};return a&&(i.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},kz=Pst,Fst=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let a={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},Cz=Fst,Dst={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Cz,rgb:e=>tq(Cz(e))},fromMode:{rgb:e=>kz(eq(e)),jab:kz},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ui,fixup:Bp},c:Ui,j:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},lne=Dst,bE=Math.pow(29,3)/Math.pow(3,3),rq=Math.pow(6,3)/Math.pow(29,3),dz=e=>Math.pow(e,3)>rq?Math.pow(e,3):(116*e-16)/bE,Rst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+16)/116,i=t/500+a,o=a-r/200,s={mode:"xyz50",x:dz(i)*Oc.X,y:dz(a)*Oc.Y,z:dz(o)*Oc.Z};return n!==void 0&&(s.alpha=n),s},wE=Rst,Ist=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=gx({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(a.alpha=n),a},yb=Ist,zst=e=>yb(wE(e)),nq=zst,qst=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return a!==void 0&&(i.alpha=a),i},xb=qst,vz=e=>e>rq?Math.cbrt(e):(bE*e+16)/116,Bst=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=vz(e/Oc.X),i=vz(t/Oc.Y),o=vz(r/Oc.Z),s={mode:"lab",l:116*i-16,a:500*(a-i),b:200*(i-o)};return n!==void 0&&(s.alpha=n),s},TE=Bst,Ost=e=>{let t=TE(xb(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},iq=Ost;function Nst(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,a,i,o]=t;if(!(n.type===Ti.Hue||a.type===Ti.Hue||i.type===Ti.Hue))return n.type!==Ti.None&&(r.l=Math.min(Math.max(0,n.value),100)),a.type!==Ti.None&&(r.a=a.type===Ti.Number?a.value:a.value*125/100),i.type!==Ti.None&&(r.b=i.type===Ti.Number?i.value:i.value*125/100),o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var une=Nst,Ust={mode:"lab",toMode:{xyz50:wE,rgb:nq},fromMode:{xyz50:TE,rgb:iq},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[une],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},AE=Ust,Vst=tl(zo({},AE),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Wz,rgb:N4},fromMode:{xyz65:Yz,rgb:U4},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),cne=Vst;function Gst(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(a.type!==Ti.None&&(r.c=Math.max(0,a.type===Ti.Number?a.value:a.value*150/100)),i.type!==Ti.None){if(i.type===Ti.Percentage)return;r.h=i.value}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var fne=Gst,Hst={mode:"lch",toMode:{lab:j1,rgb:e=>nq(j1(e))},fromMode:{rgb:e=>H1(iq(e)),lab:H1},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[fne],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},c:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},ME=Hst,jst=tl(zo({},ME),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>j1(e,"lab65"),rgb:e=>N4(j1(e,"lab65"))},fromMode:{rgb:e=>H1(U4(e),"lch65"),lab65:e=>H1(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),hne=jst,Wst=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:"lchuv",l:e,c:a};return a&&(i.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},aq=Wst,Yst=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let a={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},oq=Yst,dne=(e,t,r)=>4*e/(e+15*t+3*r),vne=(e,t,r)=>9*t/(e+15*t+3*r),Xst=dne(Oc.X,Oc.Y,Oc.Z),Zst=vne(Oc.X,Oc.Y,Oc.Z),$st=e=>e<=rq?bE*e:116*Math.cbrt(e)-16,Kst=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=$st(t/Oc.Y),i=dne(e,t,r),o=vne(e,t,r);!isFinite(i)||!isFinite(o)?a=i=o=0:(i=13*a*(i-Xst),o=13*a*(o-Zst));let s={mode:"luv",l:a,u:i,v:o};return n!==void 0&&(s.alpha=n),s},dE=Kst,Jst=(e,t,r)=>4*e/(e+15*t+3*r),Qst=(e,t,r)=>9*t/(e+15*t+3*r),elt=Jst(Oc.X,Oc.Y,Oc.Z),tlt=Qst(Oc.X,Oc.Y,Oc.Z),rlt=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let a=t/(13*e)+elt,i=r/(13*e)+tlt,o=Oc.Y*(e<=8?e/bE:Math.pow((e+16)/116,3)),s=o*(9*a)/(4*i),l=o*(12-3*a-20*i)/(4*i),u={mode:"xyz50",x:s,y:o,z:l};return n!==void 0&&(u.alpha=n),u},vE=rlt,nlt=e=>aq(dE(xb(e))),ilt=e=>yb(vE(oq(e))),alt={mode:"lchuv",toMode:{luv:oq,rgb:ilt},fromMode:{rgb:nlt,luv:aq},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Ui,fixup:Bp},c:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},pne=alt,olt=tl(zo({},vx),{mode:"lrgb",toMode:{rgb:gx},fromMode:{rgb:px},parse:["srgb-linear"],serialize:"srgb-linear"}),gne=olt,slt={mode:"luv",toMode:{xyz50:vE,rgb:e=>yb(vE(e))},fromMode:{xyz50:dE,rgb:e=>dE(xb(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:Ui,u:Ui,v:Ui,alpha:{use:Ui,fixup:Nc}}},mne=slt,llt=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),i=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*a+.7936177747023054*i-.0040720430116193*o,a:1.9779985324311684*a-2.42859224204858*i+.450593709617411*o,b:.0259040424655478*a+.7827717124575296*i-.8086757549230774*o};return n!==void 0&&(s.alpha=n),s},sq=llt,ult=e=>{let t=sq(px(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},V4=ult,clt=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),i=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*a-3.3077115392580616*i+.2309699031821044*o,g:-1.2684379732850317*a+2.6097573492876887*i-.3413193760026573*o,b:-.0041960761386756*a-.7034186179359362*i+1.7076146940746117*o};return n!==void 0&&(s.alpha=n),s},_b=clt,flt=e=>gx(_b(e)),G4=flt;function Lz(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function pE(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function hlt(e,t){let r,n,a,i,o,s,l,u;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,a=.59662641,i=.75515197,o=.56771245,s=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,a=.08285427,i=.1254107,o=.14503204,s=-1.2684380046,l=2.6097574011,u=-.3413193965):(r=1.35733652,n=-.00915799,a=-1.1513021,i=-.50559606,o=.00692167,s=-.0041960863,l=-.7034186147,u=1.707614701);let c=r+n*e+a*t+i*e*e+o*e*t,f=.3963377774*e+.2158037573*t,v=-.1055613458*e-.0638541728*t,g=-.0894841775*e-1.291485548*t;{let p=1+c*f,x=1+c*v,_=1+c*g,y=p*p*p,C=x*x*x,k=_*_*_,S=3*f*p*p,L=3*v*x*x,w=3*g*_*_,A=6*f*f*p,T=6*v*v*x,m=6*g*g*_,F=s*y+l*C+u*k,E=s*S+l*L+u*w,I=s*A+l*T+u*m;c=c-F*E/(E*E-.5*F*I)}return c}function lq(e,t){let r=hlt(e,t),n=_b({l:1,a:r*e,b:r*t}),a=Math.cbrt(1/Math.max(n.r,n.g,n.b)),i=a*r;return[a,i]}function dlt(e,t,r,n,a,i=null){i||(i=lq(e,t));let o;if((r-a)*i[1]-(i[0]-a)*n<=0)o=i[1]*a/(n*i[0]+i[1]*(a-r));else{o=i[1]*(a-1)/(n*(i[0]-1)+i[1]*(a-r));{let s=r-a,l=n,u=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,v=s+l*u,g=s+l*c,p=s+l*f;{let x=a*(1-o)+o*r,_=o*n,y=x+_*u,C=x+_*c,k=x+_*f,S=y*y*y,L=C*C*C,w=k*k*k,A=3*v*y*y,T=3*g*C*C,m=3*p*k*k,F=6*v*v*y,E=6*g*g*C,I=6*p*p*k,R=4.0767416621*S-3.3077115913*L+.2309699292*w-1,B=4.0767416621*A-3.3077115913*T+.2309699292*m,O=4.0767416621*F-3.3077115913*E+.2309699292*I,V=B/(B*B-.5*R*O),j=-R*V,q=-1.2684380046*S+2.6097574011*L-.3413193965*w-1,U=-1.2684380046*A+2.6097574011*T-.3413193965*m,J=-1.2684380046*F+2.6097574011*E-.3413193965*I,ee=U/(U*U-.5*q*J),ce=-q*ee,ye=-.0041960863*S-.7034186147*L+1.707614701*w-1,xe=-.0041960863*A-.7034186147*T+1.707614701*m,ue=-.0041960863*F-.7034186147*E+1.707614701*I,K=xe/(xe*xe-.5*ye*ue),_e=-ye*K;j=V>=0?j:1e6,ce=ee>=0?ce:1e6,_e=K>=0?_e:1e6,o+=Math.min(j,Math.min(ce,_e))}}}return o}function uq(e,t,r=null){r||(r=lq(e,t));let n=r[0],a=r[1];return[a/n,a/(1-n)]}function yne(e,t,r){let n=lq(t,r),a=dlt(t,r,e,1,e,n),i=uq(t,r,n),o=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=a/Math.min(e*i[0],(1-e)*i[1]),u=e*o,c=(1-e)*s,f=.9*l*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return u=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(c*c))),f,a]}function Pz(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,a={mode:"okhsl",l:Lz(t)};e.alpha!==void 0&&(a.alpha=e.alpha);let i=Math.sqrt(r*r+n*n);if(!i)return a.s=0,a;let[o,s,l]=yne(t,r/i,n/i),u;if(iPz(V4(e))},toMode:{oklab:Fz,rgb:e=>G4(Fz(e))}}),xne=vlt;function Dz(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,a=Math.sqrt(r*r+n*n),i=a?r/a:1,o=a?n/a:1,[s,l]=uq(i,o),u=.5,c=1-u/s,f=l/(a+t*l),v=f*t,g=f*a,p=pE(v),x=g*p/v,_=_b({l:p,a:i*x,b:o*x}),y=Math.cbrt(1/Math.max(_.r,_.g,_.b,0));t=t/y,a=a/y*Lz(t)/t,t=Lz(t);let C={mode:"okhsv",s:a?(u+l)*g/(l*u+l*c*g):0,v:t?t/v:0};return C.s&&(C.h=Th(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(C.alpha=e.alpha),C}function Rz(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,a=e.v!==void 0?e.v:0,i=Math.cos(r/180*Math.PI),o=Math.sin(r/180*Math.PI),[s,l]=uq(i,o),u=.5,c=1-u/s,f=1-n*u/(u+l-l*c*n),v=n*l*u/(u+l-l*c*n),g=pE(f),p=v*g/f,x=_b({l:g,a:i*p,b:o*p}),_=Math.cbrt(1/Math.max(x.r,x.g,x.b,0)),y=pE(a*f),C=v*y/f;return t.l=y*_,t.a=C*i*_,t.b=C*o*_,t}var plt=tl(zo({},Kz),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Dz,rgb:e=>Dz(V4(e))},toMode:{oklab:Rz,rgb:e=>G4(Rz(e))}}),_ne=plt;function glt(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,a,i,o]=t;if(!(n.type===Ti.Hue||a.type===Ti.Hue||i.type===Ti.Hue))return n.type!==Ti.None&&(r.l=Math.min(Math.max(0,n.type===Ti.Number?n.value:n.value/100),1)),a.type!==Ti.None&&(r.a=a.type===Ti.Number?a.value:a.value*.4/100),i.type!==Ti.None&&(r.b=i.type===Ti.Number?i.value:i.value*.4/100),o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var bne=glt,mlt=tl(zo({},AE),{mode:"oklab",toMode:{lrgb:_b,rgb:G4},fromMode:{lrgb:sq,rgb:V4},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[bne],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`}),wne=mlt;function ylt(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Hue)return;r.l=Math.min(Math.max(0,n.type===Ti.Number?n.value:n.value/100),1)}if(a.type!==Ti.None&&(r.c=Math.max(0,a.type===Ti.Number?a.value:a.value*.4/100)),i.type!==Ti.None){if(i.type===Ti.Percentage)return;r.h=i.value}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var Tne=ylt,xlt=tl(zo({},ME),{mode:"oklch",toMode:{oklab:e=>j1(e,"oklab"),rgb:e=>G4(j1(e,"oklab"))},fromMode:{rgb:e=>H1(V4(e),"oklch"),oklab:e=>H1(e,"oklch")},parse:[Tne],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),Ane=xlt,_lt=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return a!==void 0&&(i.alpha=a),i},Iz=_lt,blt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=gx({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(a.alpha=n),a},zz=blt,wlt=tl(zo({},vx),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>zz(rm(e)),xyz65:zz},toMode:{rgb:e=>nm(Iz(e)),xyz65:Iz}}),Mne=wlt,pz=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},Tlt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"prophoto",r:pz(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:pz(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:pz(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(a.alpha=n),a},qz=Tlt,gz=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},Alt=e=>{let t=gz(e.r),r=gz(e.g),n=gz(e.b),a={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Bz=Alt,Mlt=tl(zo({},vx),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:qz,rgb:e=>qz(xb(e))},toMode:{xyz50:Bz,rgb:e=>yb(Bz(e))}}),Sne=Mlt,xre=1.09929682680944,Slt=.018053968510807,mz=e=>{let t=Math.abs(e);return t>Slt?(Math.sign(e)||1)*(xre*Math.pow(t,.45)-(xre-1)):4.5*e},Elt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"rec2020",r:mz(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:mz(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:mz(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(a.alpha=n),a},Oz=Elt,_re=1.09929682680944,klt=.018053968510807,yz=(e=0)=>{let t=Math.abs(e);return t{let t=yz(e.r),r=yz(e.g),n=yz(e.b),a={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Nz=Clt,Llt=tl(zo({},vx),{mode:"rec2020",fromMode:{xyz65:Oz,rgb:e=>Oz(rm(e))},toMode:{xyz65:Nz,rgb:e=>nm(Nz(e))},parse:["rec2020"],serialize:"rec2020"}),Ene=Llt,hx=.0037930732552754493,kne=Math.cbrt(hx),xz=e=>Math.cbrt(e)-kne,Plt=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i=xz(.3*t+.622*r+.078*n+hx),o=xz(.23*t+.692*r+.078*n+hx),s=xz(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+hx),l={mode:"xyb",x:(i-o)/2,y:(i+o)/2,b:s-(i+o)/2};return a!==void 0&&(l.alpha=a),l},Cne=Plt,_z=e=>Math.pow(e+kne,3),Flt=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=_z(e+t)-hx,i=_z(t-e)-hx,o=_z(r+t)-hx,s=gx({r:11.031566904639861*a-9.866943908131562*i-.16462299650829934*o,g:-3.2541473810744237*a+4.418770377582723*i-.16462299650829934*o,b:-3.6588512867136815*a+2.7129230459360922*i+1.9459282407775895*o});return n!==void 0&&(s.alpha=n),s},Lne=Flt,Dlt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Lne},fromMode:{rgb:Cne},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ui,y:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},Pne=Dlt,Rlt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:yb,lab:TE},fromMode:{rgb:xb,lab:wE},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ui,y:Ui,z:Ui,alpha:{use:Ui,fixup:Nc}}},Fne=Rlt,Ilt=e=>{let{x:t,y:r,z:n,alpha:a}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let i={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return a!==void 0&&(i.alpha=a),i},Dne=Ilt,zlt=e=>{let{x:t,y:r,z:n,alpha:a}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let i={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return a!==void 0&&(i.alpha=a),i},Rne=zlt,qlt={mode:"xyz65",toMode:{rgb:nm,xyz50:Dne},fromMode:{rgb:rm,xyz50:Rne},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:Ui,y:Ui,z:Ui,alpha:{use:Ui,fixup:Nc}}},Ine=qlt,Blt=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(a.alpha=n),a},zne=Blt,Olt=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(a.alpha=n),a},qne=Olt,Nlt={mode:"yiq",toMode:{rgb:qne},fromMode:{rgb:zne},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ui,i:Ui,q:Ui,alpha:{use:Ui,fixup:Nc}}},Bne=Nlt,Ult=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Vlt=(e=4)=>t=>typeof t=="number"?Ult(t,e):t,One=Vlt,R4=One(2),z4=e=>Math.max(0,Math.min(1,e||0)),dx=e=>Math.round(z4(e)*255),cq=dl("rgb"),Glt=dl("hsl"),fq=e=>{if(e===void 0)return;let t=dx(e.r),r=dx(e.g),n=dx(e.b);return"#"+(1<<24|t<<16|r<<8|n).toString(16).slice(1)},Nne=e=>{if(e===void 0)return;let t=dx(e.alpha!==void 0?e.alpha:1);return fq(e)+(256|t).toString(16).slice(1)},Une=e=>{if(e===void 0)return;let t=dx(e.r),r=dx(e.g),n=dx(e.b);return e.alpha===void 0||e.alpha===1?`rgb(${t}, ${r}, ${n})`:`rgba(${t}, ${r}, ${n}, ${R4(z4(e.alpha))})`},Vne=e=>{if(e===void 0)return;let t=R4(e.h||0),r=R4(z4(e.s)*100)+"%",n=R4(z4(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${r}, ${n})`:`hsla(${t}, ${r}, ${n}, ${R4(z4(e.alpha))})`},Hlt=e=>{let t=$v(e);if(!t)return;let r=Kh(t.mode);if(!r.serialize||typeof r.serialize=="string"){let n=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((a,i)=>{a!=="alpha"&&(n+=(i?" ":"")+(t[a]!==void 0?t[a]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(n+=` / ${t.alpha}`),n+")"}if(typeof r.serialize=="function")return r.serialize(t)},jlt=e=>fq(cq(e)),Wlt=e=>Nne(cq(e)),Ylt=e=>Une(cq(e)),Xlt=e=>Vne(Glt(e)),Zlt={normal:(e,t)=>t,multiply:(e,t)=>e*t,screen:(e,t)=>e+t-e*t,"hard-light":(e,t)=>t<.5?e*2*t:2*t*(1-e)-1,overlay:(e,t)=>e<.5?t*2*e:2*e*(1-t)-1,darken:(e,t)=>Math.min(e,t),lighten:(e,t)=>Math.max(e,t),"color-dodge":(e,t)=>e===0?0:t===1?1:Math.min(1,e/(1-t)),"color-burn":(e,t)=>e===1?1:t===0?0:1-Math.min(1,(1-e)/t),"soft-light":(e,t)=>t<.5?e-(1-2*t)*e*(1-e):e+(2*t-1)*((e<.25?((16*e-12)*e+4)*e:Math.sqrt(e))-e),difference:(e,t)=>Math.abs(e-t),exclusion:(e,t)=>e+t-2*e*t},$lt=(e,t="normal",r="rgb")=>{let n=typeof t=="function"?t:Zlt[t],a=dl(r),i=Kh(r).channels;return e.map(s=>{let l=a(s);return l.alpha===void 0&&(l.alpha=1),l}).reduce((s,l)=>{if(s===void 0)return l;let u=l.alpha+s.alpha*(1-l.alpha);return i.reduce((c,f)=>(f!=="alpha"&&(u===0?c[f]=0:(c[f]=l.alpha*(1-s.alpha)*l[f]+l.alpha*s.alpha*n(s[f],l[f])+(1-l.alpha)*s.alpha*s[f],c[f]=Math.max(0,Math.min(1,c[f]/u)))),c),{mode:r,alpha:u})})},Klt=$lt,Jlt=([e,t])=>e+Math.random()*(t-e),Qlt=e=>Object.keys(e).reduce((t,r)=>{let n=e[r];return t[r]=Array.isArray(n)?n:[n,n],t},{}),eut=(e="rgb",t={})=>{let r=Kh(e),n=Qlt(t);return r.channels.reduce((a,i)=>((n.alpha||i!=="alpha")&&(a[i]=Jlt(n[i]||r.ranges[i])),a),{mode:e})},tut=eut,H4=(e,t="rgb",r=!1)=>{let n=t?Kh(t).channels:null,a=t?dl(t):$v;return i=>{let o=a(i);if(!o)return;let s=(n||Kh(o.mode).channels).reduce((u,c)=>{let f=e(o[c],c,o,t);return f!==void 0&&!isNaN(f)&&(u[c]=f),u},{mode:o.mode});if(!r)return s;let l=$v(i);return l&&l.mode!==s.mode?dl(l.mode)(s):s}},Gne=(e,t,r)=>t!=="alpha"?(e||0)*(r.alpha!==void 0?r.alpha:1):e,Hne=(e,t,r)=>t!=="alpha"&&r.alpha!==0?(e||0)/(r.alpha!==void 0?r.alpha:1):e,hq=(e=1,t=0)=>(r,n)=>n!=="alpha"?r*e+t:r,rut=(e=1,t=1,r=0)=>(n,a)=>a!=="alpha"?e*Math.pow(n,t)+r:n,nut=e=>{e[0]===void 0&&(e[0]=0),e[e.length-1]===void 0&&(e[e.length-1]=1);let t=1,r,n,a,i;for(;tt=>e<=0?1:e>=1?0:Math.pow(t,Math.log(.5)/Math.log(e)),jne=aut,aE=e=>typeof e=="function",cx=e=>e&&typeof e=="object",bre=e=>typeof e=="number",Wne=(e,t="rgb",r,n)=>{let a=Kh(t),i=dl(t),o=[],s=[],l={};e.forEach(v=>{Array.isArray(v)?(o.push(i(v[0])),s.push(v[1])):bre(v)||aE(v)?l[s.length]=v:(o.push(i(v)),s.push(void 0))}),iut(s);let u=a.channels.reduce((v,g)=>{let p;return cx(r)&&cx(r[g])&&r[g].fixup?p=r[g].fixup:cx(a.interpolate[g])&&a.interpolate[g].fixup?p=a.interpolate[g].fixup:p=x=>x,v[g]=p(o.map(x=>x[g])),v},{});if(n){let v=o.map((g,p)=>a.channels.reduce((x,_)=>(x[_]=u[_][p],x),{mode:t}));u=a.channels.reduce((g,p)=>(g[p]=v.map(x=>{let _=n(x[p],p,x,t);return isNaN(_)?void 0:_}),g),{})}let c=a.channels.reduce((v,g)=>{let p;return aE(r)?p=r:cx(r)&&aE(r[g])?p=r[g]:cx(r)&&cx(r[g])&&r[g].use?p=r[g].use:aE(a.interpolate[g])?p=a.interpolate[g]:cx(a.interpolate[g])&&(p=a.interpolate[g].use),v[g]=p(u[g]),v},{}),f=o.length-1;return v=>{if(v=Math.min(Math.max(0,v),1),v<=s[0])return o[0];if(v>s[f])return o[f];let g=0;for(;s[g]{let L=c[S](C);return L!==void 0&&(k[S]=L),k},{mode:t})}},out=(e,t="rgb",r)=>Wne(e,t,r),Yne=(e,t)=>(r,n="rgb",a)=>{let i=t?H4(t,n):void 0,o=Wne(r,n,a,e);return i?s=>i(o(s)):o},sut=Yne(Gne,Hne),oE=(e,t)=>(e+t)%t,Xne=(e,t,r,n,a)=>{let i=a*a,o=i*a;return((1-3*a+3*i-o)*e+(4-6*i+3*o)*t+(1+3*a+3*i-3*o)*r+o*n)/6},Zne=e=>t=>{let r=e.length-1,n=t>=1?r-1:Math.max(0,Math.floor(t*r));return Xne(n>0?e[n-1]:2*e[n]-e[n+1],e[n],e[n+1],nt=>{let r=e.length-1,n=Math.floor(t*r);return Xne(e[oE(n-1,e.length)],e[oE(n,e.length)],e[oE(n+1,e.length)],e[oE(n+2,e.length)],(t-n/r)*r)},Kne=e=>{let t,r=e.length-1,n=new Array(r),a=new Array(r),i=new Array(r);for(n[1]=1/4,a[1]=(6*e[1]-e[0])/4,t=2;t0&&(i[r-1]=a[r-1]),t=r-2;t>0;--t)i[t]=a[t]-n[t]*i[t+1];return i},lut=e=>Zne(Kne(e)),uut=e=>$ne(Kne(e)),db=Math.sign,Uz=Math.min,b0=Math.abs,dq=e=>{let t=e.length-1,r=[],n=[],a=[];for(let i=0;i0?.5*(e[i+1]-e[i-1])*t:void 0),a.push(i>0?(db(r[i-1])+db(r[i]))*Uz(b0(r[i-1]),b0(r[i]),.5*b0(n[i])):void 0);return[r,n,a]},vq=(e,t,r)=>{let n=e.length-1,a=n*n;return i=>{let o;i>=1?o=n-1:o=Math.max(0,Math.floor(i*n));let s=i-o/n,l=s*s,u=l*s;return(t[o]+t[o+1]-2*r[o])*a*u+(3*r[o]-2*t[o]-t[o+1])*n*l+t[o]*s+e[o]}},cut=e=>{if(e.length<3)return Ui(e);let t=e.length-1,[r,,n]=dq(e);return n[0]=r[0],n[t]=r[t-1],vq(e,n,r)},fut=e=>{if(e.length<3)return Ui(e);let t=e.length-1,[r,n,a]=dq(e);return n[0]=(e[1]*2-e[0]*1.5-e[2]*.5)*t,n[t]=(e[t]*1.5-e[t-1]*2+e[t-2]*.5)*t,a[0]=n[0]*r[0]<=0?0:b0(n[0])>2*b0(r[0])?2*r[0]:n[0],a[t]=n[t]*r[t-1]<=0?0:b0(n[t])>2*b0(r[t-1])?2*r[t-1]:n[t],vq(e,a,r)},hut=e=>{let t=e.length-1,[r,n,a]=dq(e);n[0]=.5*(e[1]-e[t])*t,n[t]=.5*(e[0]-e[t-1])*t;let i=(e[0]-e[t])*t,o=i;return a[0]=(db(i)+db(r[0]))*Uz(b0(i),b0(r[0]),.5*b0(n[0])),a[t]=(db(r[t-1])+db(o))*Uz(b0(r[t-1]),b0(o),.5*b0(n[t])),vq(e,a,r)},dut=(e=1)=>e===1?t=>t:t=>Math.pow(t,e),Jne=dut,vut=(e=2,t=1)=>{let r=Jne(t);if(e<2)return e<1?[]:[r(.5)];let n=[];for(let a=0;a{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},tie=e=>eie(Qne(e)),rie=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function pq(e){return rie(Qne(e))}function SE(e="rgb"){let{gamut:t}=Kh(e);if(!t)return n=>!0;let r=dl(typeof t=="string"?t:e);return n=>rie(r(n))}function gut(e){return e=$v(e),e===void 0||pq(e)?e:dl(e.mode)(tie(e))}function gq(e="rgb"){let{gamut:t}=Kh(e);if(!t)return i=>$v(i);let r=typeof t=="string"?t:e,n=dl(r),a=SE(r);return i=>{let o=$v(i);if(!o)return;let s=n(o);if(a(s))return o;let l=eie(s);return o.mode===l.mode?l:dl(o.mode)(l)}}function mut(e,t="lch",r="rgb"){e=$v(e);let n=r==="rgb"?pq:SE(r),a=r==="rgb"?tie:gq(r);if(e===void 0||n(e))return e;let i=dl(e.mode);e=dl(t)(e);let o=tl(zo({},e),{c:0});if(!n(o))return i(a(o));let s=0,l=e.c!==void 0?e.c:0,u=Kh(t).ranges.c,c=(u[1]-u[0])/Math.pow(2,13),f=o.c;for(;l-s>c;)o.c=s+(l-s)*.5,n(o)?(f=o.c,s=o.c):l=o.c;return i(n(o)?o:tl(zo({},o),{c:f}))}function yut(e="rgb",t="oklch",r=mb("oklch"),n=.02){let a=dl(e),i=Kh(e);if(!i.gamut)return c=>a(c);let o=SE(e),s=gq(e),l=dl(t),{ranges:u}=Kh(t);if(!u.l||!u.c)throw new Error("LCH-like space expected");return c=>{if(c=$v(c),c===void 0)return;let f=zo({},l(c));if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=u.l[1]){let _=tl(zo({},i.white),{mode:e});return c.alpha!==void 0&&(_.alpha=c.alpha),_}if(f.l<=u.l[0]){let _=tl(zo({},i.black),{mode:e});return c.alpha!==void 0&&(_.alpha=c.alpha),_}if(o(f))return a(f);let v=0,g=f.c,p=(u.c[1]-u.c[0])/4e3,x=s(f);for(;g-v>p;)f.c=(v+g)*.5,x=s(f),o(f)||r&&n>0&&r(f,x)<=n?v=f.c:g=f.c;return a(o(f)?f:x)}}var xut=(e,t=mb(),r=n=>n)=>{let n=e.map((a,i)=>({color:r(a),i}));return(a,i=1,o=1/0)=>(isFinite(i)&&(i=Math.max(1,Math.min(i,n.length-1))),n.forEach(s=>{s.d=t(a,s.color)}),n.sort((s,l)=>s.d-l.d).slice(0,i).filter(s=>s.de[s.i]))},_ut=xut,mq=e=>Math.max(e,0),yq=e=>Math.max(Math.min(e,1),0),but=(e,t,r)=>e===void 0||t===void 0?void 0:e+r*(t-e),wut=e=>{let t=1-yq(e);return[.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1]},Tut=e=>{let t=mq(e);return[.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1]},Aut=e=>{let t=1-yq(e);return[.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1]},Mut=e=>{let t=Math.PI*e/180,r=Math.cos(t),n=Math.sin(t);return[.213+r*.787-n*.213,.715-r*.715-n*.715,.072-r*.072+n*.928,0,.213-r*.213+n*.143,.715+r*.285+n*.14,.072-r*.072-n*.283,0,.213-r*.213-n*.787,.715-r*.715+n*.715,.072+r*.928+n*.072,0,0,0,0,1]},EE=(e,t,r=!1)=>{let n=dl(t),a=Kh(t).channels;return i=>{let o=n(i);if(!o)return;let s={mode:t},l,u=a.length;for(let f=0;f{let r=mq(e);return H4(hq(r),t,!0)},Eut=(e=1,t="rgb")=>{let r=mq(e);return H4(hq(r,(1-r)/2),t,!0)},kut=(e=1,t="rgb")=>EE(wut(e),t,!0),Cut=(e=1,t="rgb")=>EE(Tut(e),t,!0),Lut=(e=1,t="rgb")=>EE(Aut(e),t,!0),Put=(e=1,t="rgb")=>{let r=yq(e);return H4((n,a)=>a==="alpha"?n:but(r,1-r,n),t,!0)},Fut=(e=0,t="rgb")=>EE(Mut(e),t,!0),Dut=dl("rgb"),Rut=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],Iut=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],zut=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],xq=(e,t)=>{let r=Math.max(0,Math.min(1,t)),n=Math.round(r/.1),a=Math.round(r%.1),i=e[n];if(a>0&&nfx(i[l],o[l],a))}return o=>{let s=$v(o);if(s===void 0)return;let{r:l,g:u,b:c}=Dut(s),f={mode:"rgb",r:i[0]*l+i[1]*u+i[2]*c,g:i[3]*l+i[4]*u+i[5]*c,b:i[6]*l+i[7]*u+i[8]*c};return s.alpha!==void 0&&(f.alpha=s.alpha),dl(s.mode)(f)}},qut=(e=1)=>xq(Rut,e),But=(e=1)=>xq(Iut,e),Out=(e=1)=>xq(zut,e),Nut=e=>e*e*(3-2*e),Uut=e=>.5-Math.sin(Math.asin(1-2*e)/3),Vut=e=>e*e*e*(e*(e*6-15)+10),Gut=Vut,Hut=e=>(1-Math.cos(e*Math.PI))/2,jut=Hut;function Vz(e){let t=dl("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function Wut(e,t){let r=Vz(e),n=Vz(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var Yut=Rs(Ire),Xut=Rs(Nre),Zut=Rs(jre),$ut=Rs(Wre),Kut=Rs(Zre),Jut=Rs(Xz),Qut=Rs(Kz),ect=Rs(nne),tct=Rs(one),rct=Rs(sne),nct=Rs(lne),ict=Rs(AE),act=Rs(cne),oct=Rs(ME),sct=Rs(hne),lct=Rs(pne),uct=Rs(gne),cct=Rs(mne),fct=Rs(xne),hct=Rs(_ne),dct=Rs(wne),vct=Rs(Ane),pct=Rs(Mne),gct=Rs(Sne),mct=Rs(Ene),yct=Rs(vx),xct=Rs(Pne),_ct=Rs(Fne),bct=Rs(Ine),wct=Rs(Bne)});var im=fe((vfr,lie)=>{"use strict";var aie={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},oie={};function sie(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),sie(n,t[r]))}}sie(aie,oie);lie.exports={configAttributes:aie,dfltConfig:oie}});var bq=fe((pfr,uie)=>{"use strict";var _q=xi(),Tct=aa(),j4=[];uie.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||j4.indexOf(e)!==-1)return;j4.push(e);var n=1e3;Tct(t)?n=t:t==="long"&&(n=3e3);var a=_q.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(j4);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=j4.indexOf(u);c!==-1&&j4.splice(c,1),_q.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=_q.select(this);u.append("button").classed("notifier-close",!0).html("×").on("click",function(){u.transition().call(o)});for(var c=u.append("p"),f=l.split(//g),v=0;v{"use strict";var bb=im().dfltConfig,wq=bq(),Tq=cie.exports={};Tq.log=function(){var e;if(bb.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};Tq.warn=function(){var e;if(bb.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};Tq.error=function(){var e;if(bb.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var tc=fe(mx=>{"use strict";mx.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];mx.defaultLine="#444";mx.lightLine="#eee";mx.background="#fff";mx.borderLine="#BEC8D9";mx.lightFraction=1e3/11});var ni=fe((yfr,yie)=>{"use strict";var{converter:fie,formatHex:Act,formatRgb:Mct,wcagContrast:Sct,wcagLuminance:Ect}=iie(),{isArrayOrTypedArray:kct}=Gf(),{warn:Cct}=W1(),{background:Y4,defaultLine:Sq,defaults:Lct,lightLine:Pct}=tc(),hie=fie("rgb"),Fct=fie("hsl"),die=e=>{if(typeof e!="string")return;let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t))try{return hie(t)}catch(r){return}},Jh=e=>e>0?e>1?1:e:0,Dct={mode:"rgb",r:0,g:0,b:0,alpha:1},Aq=e=>Math.round(e*255e6)/255e6,vie=e=>tl(zo({},e),{r:Aq(e.r),g:Aq(e.g),b:Aq(e.b)}),w0=e=>Mct(vie(e)),Rct=e=>Act(vie(e)),eu=(e,t)=>{var n;let r=die(e);return r?((n=r.alpha)!=null||(r.alpha=1),r):(!t&&e!=null&&Cct(`Invalid color specifier: "${e}". Defaulting to "#000"`),Dct)},W4=e=>w0(tl(zo({},eu(e)),{alpha:1})),Ict=e=>e?eu(e).alpha:0,pie=e=>kct(e)&&e.length>2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2]),zct=e=>{let[t,r,n,a]=e,i=Math.max(t,r,n)>1?1/255:1,o=a!=null?a:1;return{mode:"rgb",r:t*i,g:r*i,b:n*i,alpha:o>1?o/255:o}},qct=(e,t)=>{let r=pie(e)?zct(e):eu(e,!0),n=[Jh(r.r),Jh(r.g),Jh(r.b),Jh(r.alpha)];return t==="uint8"||t==="uint8_clamped"?Uint8Array.from(n,a=>Math.round(a*255)):t==="float32"?Float32Array.from(n):t==="float64"?Float64Array.from(n):n},Bct=(e,t)=>w0(tl(zo({},eu(e)),{alpha:Jh(t)})),gie=(e,t)=>{let r=eu(e),n=r.alpha;if(n===1)return w0(r);let a=eu(t||Y4),i=a.alpha,o=(s,l)=>(i===1?l:1-i+l*i)*(1-n)+s*n;return w0({mode:"rgb",r:o(r.r,a.r),g:o(r.g,a.g),b:o(r.b,a.b)})},Oct=(e,t,r)=>{let n=eu(e),a=eu(t),i=(o,s)=>r*o+(1-r)*s;return w0({mode:"rgb",r:i(n.r,a.r),g:i(n.g,a.g),b:i(n.b,a.b)})},Mq=(e,t)=>{let r=eu(e),n=Fct(r)||{mode:"hsl",h:0,s:0,l:0};return w0(hie(tl(zo({},n),{l:Jh((n.l*100+t)/100),alpha:r.alpha})))},kE=(e,t)=>Sct(eu(e),eu(t)),mie=e=>kE(e,Y4)>kE(e,Sq),Nct=w0(eu(Y4)),Uct=w0(eu(Sq)),Vct=(e,t,r)=>(eu(e).alpha!==1&&(e=gie(e,Y4)),mie(e)?t?Mq(e,t):Nct:r?Mq(e,-r):Uct),Gct=(e,t)=>{e.style({stroke:W4(t),"stroke-opacity":eu(t).alpha})},Hct=(e,t)=>{e.style({fill:W4(t),"fill-opacity":eu(t).alpha})},jct=(e,t)=>!!(e&&t&&W4(e)===W4(t)),Wct=e=>die(e)!==void 0,Yct=(e,t)=>{t=t===0?0:t||10;let r=eu(e),n=t/100;return w0(tl(zo({},r),{r:Jh(r.r+n),g:Jh(r.g+n),b:Jh(r.b+n)}))},Xct=(e,t,r)=>{let n=eu(e),a=eu(t),i=r/100,o=a.alpha-n.alpha,s=2*i-1,l=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-l,c=(f,v)=>u*f+l*v;return w0({mode:"rgb",r:c(n.r,a.r),g:c(n.g,a.g),b:c(n.b,a.b),alpha:n.alpha*(1-i)+a.alpha*i})},Zct=(e,t=["#000","#fff"])=>{let r,n=-1/0;for(let a of t){let i=kE(e,a);i>n&&(n=i,r=w0(eu(a)))}return r},$ct=e=>w0(eu(e)),Kct=e=>Rct(eu(e)).toUpperCase(),Jct=e=>{let t=eu(e);return[Jh(t.r)*255,Jh(t.g)*255,Jh(t.b)*255,Jh(t.alpha)]},Qct=([e,t,r,n])=>w0({mode:"rgb",r:e/255,g:t/255,b:r/255,alpha:n}),eft=e=>{let t=eu(e);return Ect({mode:"rgb",r:Jh(t.r),g:Jh(t.g),b:Jh(t.b)})};yie.exports={addOpacity:Bct,adjustLightness:Mq,background:Y4,brighten:Yct,combine:gie,contrast:Vct,defaultLine:Sq,defaults:Lct,equals:jct,fill:Hct,hexString:Kct,interpolate:Oct,isChannelArray:pie,isDark:mie,isValid:Wct,lightLine:Pct,luminosity:eft,mix:Xct,mostReadable:Zct,normalize:qct,opacity:Ict,parse:eu,rgb:W4,rgbaArray:Jct,rgbaArrayToString:Qct,rgbaString:$ct,stroke:Gct,wcagContrast:kE}});var yx=fe((_fr,bie)=>{"use strict";var tft=ni(),CE={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},xie=CE.RdBu;function rft(e,t){if(t||(t=xie),!e)return t;function r(){try{e=CE[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),_ie(e)?e:t}function _ie(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r{"use strict";wie.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var wb={};zp(wb,{counter:()=>ift});function ift(e,t="",r,n){let a=t+(r?"":"$"),i=n===!1?"":"^";return e==="xy"?new RegExp(i+"x"+Eq+"y"+Eq+a):new RegExp(i+e+Eq+a)}var Eq,Tb=Co(()=>{"use strict";Eq="([2-9]|[1-9][0-9]+)?"});var Mie=fe(Kd=>{"use strict";var kq=aa(),Tie=ta().extendFlat,aft=Ho(),oft=yx(),Cq=ni(),sft=Y1().DESELECTDIM,Ab=M4(),Aie=(Tb(),Gs(wb)).counter,lft=(fb(),Gs(cb)).modHalf,Kv=Gf().isArrayOrTypedArray,am=Gf().isTypedArraySpec,om=Gf().decodeTypedArraySpec;Kd.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(Kv(e)?e:am(e)?om(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;ni===!0||i===!1;a(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){am(e)&&(e=om(e)),!kq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}am(e)&&(e=om(e)),e%1||!kq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!="string"){var a=typeof e=="number";n.strict===!0||!a?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){am(e)&&(e=om(e)),Cq.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){!Array.isArray(e)||!e.length?t.set(r):e.every(n=>Cq.isValid(n))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(oft.get(e,r))}},angle:{coerceFunction:function(e,t,r){am(e)&&(e=om(e)),e==="auto"?t.set("auto"):kq(e)?t.set(lft(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||Aie(r);let i=o=>typeof o=="string"&&a.test(o);i(e)||n.arrayOk&&Kv(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!Aie(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var a=e.split("+"),i=0;i{"use strict";Sie.exports=function(){}});var Lq=fe((Afr,Eie)=>{"use strict";Eie.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),a=0;a{kie.exports=uft;function uft(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var Pie=fe((Sfr,Lie)=>{Lie.exports=cft;function cft(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}});var Die=fe((Efr,Fie)=>{Fie.exports=fft;function fft(e,t){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}});var Pq=fe((kfr,Rie)=>{Rie.exports=hft;function hft(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var zie=fe((Cfr,Iie)=>{Iie.exports=dft;function dft(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Bie=fe((Lfr,qie)=>{qie.exports=vft;function vft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],v=t[10],g=t[11],p=t[12],x=t[13],_=t[14],y=t[15],C=r*s-n*o,k=r*l-a*o,S=r*u-i*o,L=n*l-a*s,w=n*u-i*s,A=a*u-i*l,T=c*x-f*p,m=c*_-v*p,F=c*y-g*p,E=f*_-v*x,I=f*y-g*x,R=v*y-g*_,B=C*R-k*I+S*E+L*F-w*m+A*T;return B?(B=1/B,e[0]=(s*R-l*I+u*E)*B,e[1]=(a*I-n*R-i*E)*B,e[2]=(x*A-_*w+y*L)*B,e[3]=(v*w-f*A-g*L)*B,e[4]=(l*F-o*R-u*m)*B,e[5]=(r*R-a*F+i*m)*B,e[6]=(_*S-p*A-y*k)*B,e[7]=(c*A-v*S+g*k)*B,e[8]=(o*I-s*F+u*T)*B,e[9]=(n*F-r*I-i*T)*B,e[10]=(p*w-x*S+y*C)*B,e[11]=(f*S-c*w-g*C)*B,e[12]=(s*m-o*E-l*T)*B,e[13]=(r*E-n*m+a*T)*B,e[14]=(x*k-p*L-_*C)*B,e[15]=(c*L-f*k+v*C)*B,e):null}});var Nie=fe((Pfr,Oie)=>{Oie.exports=pft;function pft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],v=t[10],g=t[11],p=t[12],x=t[13],_=t[14],y=t[15];return e[0]=s*(v*y-g*_)-f*(l*y-u*_)+x*(l*g-u*v),e[1]=-(n*(v*y-g*_)-f*(a*y-i*_)+x*(a*g-i*v)),e[2]=n*(l*y-u*_)-s*(a*y-i*_)+x*(a*u-i*l),e[3]=-(n*(l*g-u*v)-s*(a*g-i*v)+f*(a*u-i*l)),e[4]=-(o*(v*y-g*_)-c*(l*y-u*_)+p*(l*g-u*v)),e[5]=r*(v*y-g*_)-c*(a*y-i*_)+p*(a*g-i*v),e[6]=-(r*(l*y-u*_)-o*(a*y-i*_)+p*(a*u-i*l)),e[7]=r*(l*g-u*v)-o*(a*g-i*v)+c*(a*u-i*l),e[8]=o*(f*y-g*x)-c*(s*y-u*x)+p*(s*g-u*f),e[9]=-(r*(f*y-g*x)-c*(n*y-i*x)+p*(n*g-i*f)),e[10]=r*(s*y-u*x)-o*(n*y-i*x)+p*(n*u-i*s),e[11]=-(r*(s*g-u*f)-o*(n*g-i*f)+c*(n*u-i*s)),e[12]=-(o*(f*_-v*x)-c*(s*_-l*x)+p*(s*v-l*f)),e[13]=r*(f*_-v*x)-c*(n*_-a*x)+p*(n*v-a*f),e[14]=-(r*(s*_-l*x)-o*(n*_-a*x)+p*(n*l-a*s)),e[15]=r*(s*v-l*f)-o*(n*v-a*f)+c*(n*l-a*s),e}});var Vie=fe((Ffr,Uie)=>{Uie.exports=gft;function gft(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],v=e[11],g=e[12],p=e[13],x=e[14],_=e[15],y=t*o-r*i,C=t*s-n*i,k=t*l-a*i,S=r*s-n*o,L=r*l-a*o,w=n*l-a*s,A=u*p-c*g,T=u*x-f*g,m=u*_-v*g,F=c*x-f*p,E=c*_-v*p,I=f*_-v*x;return y*I-C*E+k*F+S*m-L*T+w*A}});var Hie=fe((Dfr,Gie)=>{Gie.exports=mft;function mft(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],v=t[9],g=t[10],p=t[11],x=t[12],_=t[13],y=t[14],C=t[15],k=r[0],S=r[1],L=r[2],w=r[3];return e[0]=k*n+S*s+L*f+w*x,e[1]=k*a+S*l+L*v+w*_,e[2]=k*i+S*u+L*g+w*y,e[3]=k*o+S*c+L*p+w*C,k=r[4],S=r[5],L=r[6],w=r[7],e[4]=k*n+S*s+L*f+w*x,e[5]=k*a+S*l+L*v+w*_,e[6]=k*i+S*u+L*g+w*y,e[7]=k*o+S*c+L*p+w*C,k=r[8],S=r[9],L=r[10],w=r[11],e[8]=k*n+S*s+L*f+w*x,e[9]=k*a+S*l+L*v+w*_,e[10]=k*i+S*u+L*g+w*y,e[11]=k*o+S*c+L*p+w*C,k=r[12],S=r[13],L=r[14],w=r[15],e[12]=k*n+S*s+L*f+w*x,e[13]=k*a+S*l+L*v+w*_,e[14]=k*i+S*u+L*g+w*y,e[15]=k*o+S*c+L*p+w*C,e}});var Wie=fe((Rfr,jie)=>{jie.exports=yft;function yft(e,t,r){var n=r[0],a=r[1],i=r[2],o,s,l,u,c,f,v,g,p,x,_,y;return t===e?(e[12]=t[0]*n+t[4]*a+t[8]*i+t[12],e[13]=t[1]*n+t[5]*a+t[9]*i+t[13],e[14]=t[2]*n+t[6]*a+t[10]*i+t[14],e[15]=t[3]*n+t[7]*a+t[11]*i+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],v=t[6],g=t[7],p=t[8],x=t[9],_=t[10],y=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=v,e[7]=g,e[8]=p,e[9]=x,e[10]=_,e[11]=y,e[12]=o*n+c*a+p*i+t[12],e[13]=s*n+f*a+x*i+t[13],e[14]=l*n+v*a+_*i+t[14],e[15]=u*n+g*a+y*i+t[15]),e}});var Xie=fe((Ifr,Yie)=>{Yie.exports=xft;function xft(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var $ie=fe((zfr,Zie)=>{Zie.exports=_ft;function _ft(e,t,r,n){var a=n[0],i=n[1],o=n[2],s=Math.sqrt(a*a+i*i+o*o),l,u,c,f,v,g,p,x,_,y,C,k,S,L,w,A,T,m,F,E,I,R,B,O;return Math.abs(s)<1e-6?null:(s=1/s,a*=s,i*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],v=t[1],g=t[2],p=t[3],x=t[4],_=t[5],y=t[6],C=t[7],k=t[8],S=t[9],L=t[10],w=t[11],A=a*a*c+u,T=i*a*c+o*l,m=o*a*c-i*l,F=a*i*c-o*l,E=i*i*c+u,I=o*i*c+a*l,R=a*o*c+i*l,B=i*o*c-a*l,O=o*o*c+u,e[0]=f*A+x*T+k*m,e[1]=v*A+_*T+S*m,e[2]=g*A+y*T+L*m,e[3]=p*A+C*T+w*m,e[4]=f*F+x*E+k*I,e[5]=v*F+_*E+S*I,e[6]=g*F+y*E+L*I,e[7]=p*F+C*E+w*I,e[8]=f*R+x*B+k*O,e[9]=v*R+_*B+S*O,e[10]=g*R+y*B+L*O,e[11]=p*R+C*B+w*O,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Jie=fe((qfr,Kie)=>{Kie.exports=bft;function bft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],v=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+u*n,e[5]=o*a+c*n,e[6]=s*a+f*n,e[7]=l*a+v*n,e[8]=u*a-i*n,e[9]=c*a-o*n,e[10]=f*a-s*n,e[11]=v*a-l*n,e}});var eae=fe((Bfr,Qie)=>{Qie.exports=wft;function wft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],v=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-u*n,e[1]=o*a-c*n,e[2]=s*a-f*n,e[3]=l*a-v*n,e[8]=i*n+u*a,e[9]=o*n+c*a,e[10]=s*n+f*a,e[11]=l*n+v*a,e}});var rae=fe((Ofr,tae)=>{tae.exports=Tft;function Tft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],v=t[7];return t!==e&&(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[0]=i*a+u*n,e[1]=o*a+c*n,e[2]=s*a+f*n,e[3]=l*a+v*n,e[4]=u*a-i*n,e[5]=c*a-o*n,e[6]=f*a-s*n,e[7]=v*a-l*n,e}});var iae=fe((Nfr,nae)=>{nae.exports=Aft;function Aft(e,t,r){var n,a,i,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),a=Math.cos(t),i=1-a,e[0]=o*o*i+a,e[1]=s*o*i+l*n,e[2]=l*o*i-s*n,e[3]=0,e[4]=o*s*i-l*n,e[5]=s*s*i+a,e[6]=l*s*i+o*n,e[7]=0,e[8]=o*l*i+s*n,e[9]=s*l*i-o*n,e[10]=l*l*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var oae=fe((Ufr,aae)=>{aae.exports=Mft;function Mft(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=n+n,l=a+a,u=i+i,c=n*s,f=n*l,v=n*u,g=a*l,p=a*u,x=i*u,_=o*s,y=o*l,C=o*u;return e[0]=1-(g+x),e[1]=f+C,e[2]=v-y,e[3]=0,e[4]=f-C,e[5]=1-(c+x),e[6]=p+_,e[7]=0,e[8]=v+y,e[9]=p-_,e[10]=1-(c+g),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var lae=fe((Vfr,sae)=>{sae.exports=Sft;function Sft(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var cae=fe((Gfr,uae)=>{uae.exports=Eft;function Eft(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var hae=fe((Hfr,fae)=>{fae.exports=kft;function kft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var vae=fe((jfr,dae)=>{dae.exports=Cft;function Cft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var gae=fe((Wfr,pae)=>{pae.exports=Lft;function Lft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var yae=fe((Yfr,mae)=>{mae.exports=Pft;function Pft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,s=n+n,l=a+a,u=r*o,c=n*o,f=n*s,v=a*o,g=a*s,p=a*l,x=i*o,_=i*s,y=i*l;return e[0]=1-f-p,e[1]=c+y,e[2]=v-_,e[3]=0,e[4]=c-y,e[5]=1-u-p,e[6]=g+x,e[7]=0,e[8]=v+_,e[9]=g-x,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var _ae=fe((Xfr,xae)=>{xae.exports=Fft;function Fft(e,t,r,n,a,i,o){var s=1/(r-t),l=1/(a-n),u=1/(i-o);return e[0]=i*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(a+n)*l,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var wae=fe((Zfr,bae)=>{bae.exports=Dft;function Dft(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}});var Aae=fe(($fr,Tae)=>{Tae.exports=Rft;function Rft(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(a+i);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(a-i)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var Sae=fe((Kfr,Mae)=>{Mae.exports=Ift;function Ift(e,t,r,n,a,i,o){var s=1/(t-r),l=1/(n-a),u=1/(i-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(a+n)*l,e[14]=(o+i)*u,e[15]=1,e}});var kae=fe((Jfr,Eae)=>{var zft=Pq();Eae.exports=qft;function qft(e,t,r,n){var a,i,o,s,l,u,c,f,v,g,p=t[0],x=t[1],_=t[2],y=n[0],C=n[1],k=n[2],S=r[0],L=r[1],w=r[2];return Math.abs(p-S)<1e-6&&Math.abs(x-L)<1e-6&&Math.abs(_-w)<1e-6?zft(e):(c=p-S,f=x-L,v=_-w,g=1/Math.sqrt(c*c+f*f+v*v),c*=g,f*=g,v*=g,a=C*v-k*f,i=k*c-y*v,o=y*f-C*c,g=Math.sqrt(a*a+i*i+o*o),g?(g=1/g,a*=g,i*=g,o*=g):(a=0,i=0,o=0),s=f*o-v*i,l=v*a-c*o,u=c*i-f*a,g=Math.sqrt(s*s+l*l+u*u),g?(g=1/g,s*=g,l*=g,u*=g):(s=0,l=0,u=0),e[0]=a,e[1]=s,e[2]=c,e[3]=0,e[4]=i,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=v,e[11]=0,e[12]=-(a*p+i*x+o*_),e[13]=-(s*p+l*x+u*_),e[14]=-(c*p+f*x+v*_),e[15]=1,e)}});var Lae=fe((Qfr,Cae)=>{Cae.exports=Bft;function Bft(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}});var Fq=fe((ehr,Pae)=>{Pae.exports={create:Cie(),clone:Pie(),copy:Die(),identity:Pq(),transpose:zie(),invert:Bie(),adjoint:Nie(),determinant:Vie(),multiply:Hie(),translate:Wie(),scale:Xie(),rotate:$ie(),rotateX:Jie(),rotateY:eae(),rotateZ:rae(),fromRotation:iae(),fromRotationTranslation:oae(),fromScaling:lae(),fromTranslation:cae(),fromXRotation:hae(),fromYRotation:vae(),fromZRotation:gae(),fromQuat:yae(),frustum:_ae(),perspective:wae(),perspectiveFromFieldOfView:Aae(),ortho:Sae(),lookAt:kae(),str:Lae()}});var FE=fe(Lu=>{"use strict";var Oft=Fq();Lu.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var Nft=xi(),Fae=W1(),Uft=FE(),Vft=Fq();function Gft(e){var t;if(typeof e=="string"){if(t=document.getElementById(e),t===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function Hft(e){var t=Nft.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function Dae(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function jft(e,t){Rae("global",e,t)}function Rae(e,t,r){var n="plotly.js-style-"+e,a=document.getElementById(n);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var i=a.sheet;i?i.insertRule?i.insertRule(t+"{"+r+"}",0):i.addRule?i.addRule(t,r,0):Fae.warn("addStyleRule failed"):Fae.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Wft(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&Dae(r)}function Yft(e,t,r,n,a,i){var o=n.split(":"),s=a.split(":"),l="data-btn-style-event-added";i||(i=document),i.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function Xft(e){var t=zae(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var a=Iae(n);if(a){var i=Uft.convertCssMatrix(a);r=Vft.multiply(r,r,i)}}),r}function Iae(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function zae(e){for(var t=[];Zft(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function Zft(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function $ft(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}qae.exports={getGraphDiv:Gft,isPlotDiv:Hft,removeElement:Dae,addStyleRule:jft,addRelatedStyleRule:Rae,deleteRelatedStyleRule:Wft,setStyleOnHover:Yft,getFullTransformMatrix:Xft,getElementTransformMatrix:Iae,getElementAndAncestors:zae,equalDomRects:$ft}});var Z4=fe((nhr,Bae)=>{"use strict";Bae.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var rl=fe((ihr,jae)=>{"use strict";var Nae=ta().extendFlat,Kft=em(),Uae={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},Vae={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},Jft=Uae.flags.slice().concat(["fullReplot"]),Qft=Vae.flags.slice().concat("layoutReplot");jae.exports={traces:Uae,layout:Vae,traceFlags:function(){return Oae(Jft)},layoutFlags:function(){return Oae(Qft)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),a=0;a{"use strict";Dq.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Dq.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}});var Rq=fe((ohr,Wae)=>{"use strict";Wae.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}});var Oo=fe(Mb=>{"use strict";var{DATE_FORMAT_LINK:eht,FORMAT_LINK:tht}=Rq(),rht=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function nht({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,tht,"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}".`,eht,"for details on the date formatting syntax.",rht].join(" ")}Mb.templateFormatStringDescription=nht;Mb.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>zo({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Mb.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>zo({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Mb.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});Mb.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var IE=fe((uhr,Jae)=>{"use strict";function sm(e,t){return t?t.d2l(e):e}function Yae(e,t){return t?t.l2d(e):e}function iht(e){return e.x0}function aht(e){return e.x1}function oht(e){return e.y0}function sht(e){return e.y1}function Xae(e){return e.x0shift||0}function Zae(e){return e.x1shift||0}function $ae(e){return e.y0shift||0}function Kae(e){return e.y1shift||0}function DE(e,t){return sm(e.x1,t)+Zae(e)-sm(e.x0,t)-Xae(e)}function RE(e,t,r){return sm(e.y1,r)+Kae(e)-sm(e.y0,r)-$ae(e)}function lht(e,t){return Math.abs(DE(e,t))}function uht(e,t,r){return Math.abs(RE(e,t,r))}function cht(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(DE(e,t),2)+Math.pow(RE(e,t,r),2))}function fht(e,t){return Yae((sm(e.x1,t)+Zae(e)+sm(e.x0,t)+Xae(e))/2,t)}function hht(e,t,r){return Yae((sm(e.y1,r)+Kae(e)+sm(e.y0,r)+$ae(e))/2,r)}function dht(e,t,r){return e.type!=="line"?void 0:RE(e,t,r)/DE(e,t)}var vht=["x0","x1","y0","y1","dy","height","ycenter"],pht=["x0","x1","y0","y1","dx","width","xcenter"];Jae.exports={x0:iht,x1:aht,y0:oht,y1:sht,slope:dht,dx:DE,dy:RE,width:lht,height:uht,length:cht,xcenter:fht,ycenter:hht,simpleXVariables:vht,simpleYVariables:pht}});var toe=fe((chr,eoe)=>{"use strict";var ght=rl().overrideAll,xx=Ho(),Qae=Ds(),mht=Uc().dash,lm=ta().extendFlat,{shapeTexttemplateAttrs:yht,templatefallbackAttrs:xht}=Oo(),_ht=IE();eoe.exports=ght({newshape:{visible:lm({},xx.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:lm({},xx.legend,{}),legendgroup:lm({},xx.legendgroup,{}),legendgrouptitle:{text:lm({},xx.legendgrouptitle.text,{}),font:Qae({})},legendrank:lm({},xx.legendrank,{}),legendwidth:lm({},xx.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:lm({},mht,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:lm({},xx.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:yht({newshape:!0},{keys:Object.keys(_ht)}),texttemplatefallback:xht({editType:"arraydraw"}),font:Qae({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var noe=fe((fhr,roe)=>{"use strict";var bht=Uc().dash,wht=ta().extendFlat;roe.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:wht({},bht,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}});var zE=fe((hhr,ioe)=>{"use strict";ioe.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var Sb=fe((dhr,loe)=>{"use strict";var Iq=Ds(),Tht=Z4(),qE=tc(),aoe=toe(),ooe=noe(),Aht=zE(),soe=ta().extendFlat,BE=Iq({editType:"calc"});BE.family.dflt='"Open Sans", verdana, arial, sans-serif';BE.size.dflt=12;BE.color.dflt=qE.defaultLine;loe.exports={font:BE,title:{text:{valType:"string",editType:"layoutstyle"},font:Iq({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Iq({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:soe(Aht({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:qE.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:qE.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:qE.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:aoe.newshape,activeshape:aoe.activeshape,newselection:ooe.newselection,activeselection:ooe.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:soe({},Tht.transition,{editType:"none"})}});var uoe=fe(()=>{(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var e=document.createElement("style");e.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var bi=fe(co=>{"use strict";var zq=W1(),coe=PE(),foe=Lq(),ghr=X4().addStyleRule,hoe=ta(),Mht=Ho(),Sht=Sb(),Eht=hoe.extendFlat,qq=hoe.extendDeepAll;co.modules={};co.allCategories={};co.allTypes=[];co.subplotsRegistry={};co.componentsRegistry={};co.layoutArrayContainers=[];co.layoutArrayRegexes=[];co.traceLayoutAttributes={};co.localeRegistry={};co.apiMethodRegistry={};co.collectableSubplotTypes=null;co.register=function(t){if(co.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r{"use strict";var Fht=lb().timeFormat,Toe=aa(),Bq=W1(),cm=(fb(),Gs(cb)).mod,Cb=Wa(),K0=Cb.BADNUM,Jd=Cb.ONEDAY,$4=Cb.ONEHOUR,um=Cb.ONEMIN,kb=Cb.ONESEC,K4=Cb.EPOCHJD,X1=bi(),moe=lb().utcFormat,Dht=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,Rht=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,yoe=new Date().getFullYear()-70;function Z1(e){return e&&X1.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Pu.dateTick0=function(e,t){var r=Iht(e,!!t);if(t<2)return r;var n=Pu.dateTime2ms(r,e);return n+=Jd*(t-1),Pu.ms2DateTime(n,0,e)};function Iht(e,t){return Z1(e)?t?X1.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:X1.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}Pu.dfltRange=function(e){return Z1(e)?X1.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Pu.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var NE,UE;Pu.dateTime2ms=function(e,t){if(Pu.isJSDate(e)){var r=e.getTimezoneOffset()*um,n=(e.getUTCMinutes()-e.getMinutes())*um+(e.getUTCSeconds()-e.getSeconds())*kb+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var a=3*um;r=r-a/2+cm(n-r+a/2,a)}return e=Number(e)-r,e>=NE&&e<=UE?e:K0}if(typeof e!="string"&&typeof e!="number")return K0;e=String(e);var i=Z1(t),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=i&&t.slice(0,7)==="chinese",l=e.match(s?Rht:Dht);if(!l)return K0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),v=Number(l[7]||0),g=Number(l[9]||0),p=Number(l[11]||0);if(i){if(u.length===2)return K0;u=Number(u);var x;try{var _=X1.getComponentMethod("calendars","getCal")(t);if(s){var y=c.charAt(c.length-1)==="i";c=parseInt(c,10),x=_.newDate(u,_.toMonthIndex(u,c,y),f)}else x=_.newDate(u,Number(c),f)}catch(k){return K0}return x?(x.toJD()-K4)*Jd+v*$4+g*um+p*kb:K0}u.length===2?u=(Number(u)+2e3-yoe)%100+yoe:u=Number(u),c-=1;var C=new Date(Date.UTC(2e3,c,f,v,g));return C.setUTCFullYear(u),C.getUTCMonth()!==c||C.getUTCDate()!==f?K0:C.getTime()+p*kb};NE=Pu.MIN_MS=Pu.dateTime2ms("-9999");UE=Pu.MAX_MS=Pu.dateTime2ms("9999-12-31 23:59:59.9999");Pu.isDateTime=function(e,t){return Pu.dateTime2ms(e,t)!==K0};function Eb(e,t){return String(e+Math.pow(10,t)).slice(1)}var OE=90*Jd,xoe=3*$4,_oe=5*um;Pu.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=NE&&e<=UE))return K0;t||(t=0);var n=Math.floor(cm(e+.05,1)*10),a=Math.round(e-n/10),i,o,s,l,u,c;if(Z1(r)){var f=Math.floor(a/Jd)+K4,v=Math.floor(cm(e,Jd));try{i=X1.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(g){i=moe("G%Y-%m-%d")(new Date(a))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.slice(1);else for(;i.length<10;)i="0"+i;o=t=NE+Jd&&e<=UE-Jd))return K0;var t=Math.floor(cm(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Fht("%Y-%m-%d")(r),a=r.getHours(),i=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return Aoe(n,a,i,o,s)};function Aoe(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+Eb(t,2)+":"+Eb(r,2),(n||a)&&(e+=":"+Eb(n,2),a))){for(var i=4;a%10===0;)i-=1,a/=10;e+="."+Eb(a,i)}return e}Pu.cleanDate=function(e,t,r){if(e===K0)return t;if(Pu.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Z1(r))return Bq.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=Pu.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!Pu.isDateTime(e,r))return Bq.error("unrecognized date",e),t;return e};var zht=/%\d?f/g,qht=/%h/g,Bht={1:"1",2:"1",3:"2",4:"2"};function boe(e,t,r,n){e=e.replace(zht,function(i){var o=Math.min(+i.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var a=new Date(Math.floor(t+.05));if(e=e.replace(qht,function(){return Bht[r("%q")(a)]}),Z1(n))try{e=X1.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(i){return"Invalid"}return r(e)(a)}var Oht=[59,59.9,59.99,59.999,59.9999];function Nht(e,t){var r=cm(e+.05,Jd),n=Eb(Math.floor(r/$4),2)+":"+Eb(cm(Math.floor(r/um),60),2);if(t!=="M"){Toe(t)||(t=0);var a=Math.min(cm(e/kb,60),Oht[t]),i=(100+a).toFixed(t).slice(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}Pu.formatDate=function(e,t,r,n,a,i){if(a=Z1(a)&&a,!t)if(r==="y")t=i.year;else if(r==="m")t=i.month;else if(r==="d")t=i.dayMonth+` +`+i.year;else return Nht(e,r)+` +`+boe(i.dayMonthYear,e,n,a);return boe(t,e,n,a)};var woe=3*Jd;Pu.incrementMonth=function(e,t,r){r=Z1(r)&&r;var n=cm(e,Jd);if(e=Math.round(e-n),r)try{var a=Math.round(e/Jd)+K4,i=X1.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-K4)*Jd+n}catch(l){Bq.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+woe);return s.setUTCMonth(s.getUTCMonth()+t)+n-woe};Pu.findExactDates=function(e,t){for(var r=0,n=0,a=0,i=0,o,s,l=Z1(t)&&X1.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";Soe.exports=function(t){return t}});var VE=fe($1=>{"use strict";var Uht=aa(),Vht=W1(),Ght=J4(),Hht=Wa().BADNUM,Oq=1e-9;$1.findBin=function(e,t,r){if(Uht(t.start))return r?Math.ceil((e-t.start)/t.size-Oq)-1:Math.floor((e-t.start)/t.size+Oq);var n=0,a=t.length,i=0,o=a>1?(t[a-1]-t[0])/(a-1):1,s,l;for(o>=0?l=r?jht:Wht:l=r?Xht:Yht,e+=o*Oq*(r?-1:1)*(o>=0?1:-1);n90&&Vht.log("Long binary search..."),n-1};function jht(e,t){return et}function Xht(e,t){return e>=t}$1.sorterAsc=function(e,t){return e-t};$1.sorterDes=function(e,t){return t-e};$1.distinctVals=function(e){var t=e.slice();t.sort($1.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===Hht;r--);for(var n=t[r]-t[0]||1,a=n/(r||1)/1e4,i=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(i.push(l),o=l):u>a&&(n=Math.min(n,u),i.push(l),o=l)}return{vals:i,minDiff:n}};$1.roundUp=function(e,t,r){for(var n=0,a=t.length-1,i,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};$1.findIndexOfMin=function(e,t){t=t||Ght;for(var r=1/0,n,a=0;a$ht});function Zht(e){return Object.keys(e).sort()}var $ht,bx=Co(()=>{"use strict";$ht=Zht});var Eoe=fe(Fu=>{"use strict";var Q4=aa(),Kht=Gf().isArrayOrTypedArray;Fu.aggNums=function(e,t,r,n){var a,i;if((!n||n>r.length)&&(n=r.length),Q4(t)||(t=!1),Kht(r[0])){for(i=new Array(n),a=0;ae.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Foe=fe((whr,Poe)=>{"use strict";var koe=(fb(),Gs(cb)),Nq=koe.mod,Jht=koe.modHalf,eT=Math.PI,fm=2*eT;function Qht(e){return e/180*eT}function edt(e){return e/eT*180}function Uq(e){return Math.abs(e[1]-e[0])>fm-1e-14}function Coe(e,t){return Jht(t-e,fm)}function tdt(e,t){return Math.abs(Coe(e,t))}function Loe(e,t){if(Uq(t))return!0;var r,n;t[0]n&&(n+=fm);var a=Nq(e,fm),i=a+fm;return a>=r&&a<=n||i>=r&&i<=n}function rdt(e,t,r,n){if(!Loe(t,n))return!1;var a,i;return r[0]=a&&e<=i}function Vq(e,t,r,n,a,i,o){a=a||0,i=i||0;var s=Uq([r,n]),l,u,c,f,v;s?(l=0,u=eT,c=fm):r{"use strict";wx.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};wx.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};wx.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};wx.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};wx.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};wx.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var zoe=fe(Tx=>{"use strict";var Gq=(fb(),Gs(cb)).mod;Tx.segmentsIntersect=Ioe;function Ioe(e,t,r,n,a,i,o,s){var l=r-e,u=a-e,c=o-a,f=n-t,v=i-t,g=s-i,p=l*g-c*f;if(p===0)return null;var x=(u*g-c*v)/p,_=(u*f-l*v)/p;return _<0||_>1||x<0||x>1?null:{x:e+l*x,y:t+f*x}}Tx.segmentDistance=function(t,r,n,a,i,o,s,l){if(Ioe(t,r,n,a,i,o,s,l))return 0;var u=n-t,c=a-r,f=s-i,v=l-o,g=u*u+c*c,p=f*f+v*v,x=Math.min(GE(u,c,g,i-t,o-r),GE(u,c,g,s-t,l-r),GE(f,v,p,t-i,r-o),GE(f,v,p,n-i,a-o));return Math.sqrt(x)};function GE(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,s=a-t;return o*o+s*s}else{var l=n*t-a*e;return l*l/r}}var HE,Hq,Roe;Tx.getTextLocation=function(t,r,n,a){if((t!==Hq||a!==Roe)&&(HE={},Hq=t,Roe=a),HE[n])return HE[n];var i=t.getPointAtLength(Gq(n-a/2,r)),o=t.getPointAtLength(Gq(n+a/2,r)),s=Math.atan((o.y-i.y)/(o.x-i.x)),l=t.getPointAtLength(Gq(n,r)),u=(l.x*4+i.x+o.x)/6,c=(l.y*4+i.y+o.y)/6,f={x:u,y:c,theta:s};return HE[n]=f,f};Tx.clearLocationCache=function(){Hq=null};Tx.getVisibleSegment=function(t,r,n){var a=r.left,i=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,v;function g(x){var _=t.getPointAtLength(x);x===0?f=_:x===u&&(v=_);var y=_.xi?_.x-i:0,C=_.ys?_.y-s:0;return Math.sqrt(y*y+C*C)}for(var p=g(l);p;){if(l+=p+n,l>c)return;p=g(l)}for(p=g(c);p;){if(c-=p+n,l>c)return;p=g(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-v.x)<.1&&Math.abs(f.y-v.y)<.1}};Tx.findPointOnPath=function(t,r,n,a){a=a||{};for(var i=a.pathLength||t.getTotalLength(),o=a.tolerance||.001,s=a.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(i)[n]?-1:1,u=0,c=0,f=i,v,g,p;u0?f=v:c=v,u++}return g}});var jE=fe(tT=>{"use strict";var K1={};tT.throttle=function(t,r,n){var a=K1[t],i=Date.now();if(!a){for(var o in K1)K1[o].tsa.ts+r){s();return}a.timer=setTimeout(function(){s(),a.timer=null},r)};tT.done=function(e){var t=K1[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};tT.clear=function(e){if(e)qoe(K1[e]),delete K1[e];else for(var t in K1)tT.clear(t)};function qoe(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Ooe=fe((Shr,Boe)=>{"use strict";Boe.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Noe=fe((Ehr,WE)=>{"use strict";WE.exports=jq;WE.exports.isMobile=jq;WE.exports.default=jq;var odt=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,sdt=/CrOS/,ldt=/android|ipad|playbook|silk/i;function jq(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!="undefined"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=odt.test(t)&&!sdt.test(t)||!!e.tablet&&ldt.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var Voe=fe((khr,Uoe)=>{"use strict";var udt=aa(),cdt=Noe();Uoe.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=fdt(),typeof r!="string")return!0;var n=cdt({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var a=r.split(" "),i=1;i-1;s--){var l=a[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(udt(u)&&(u=+u),u>=13)return!0}}}return n};function fdt(){var e;return typeof navigator!="undefined"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),e}});var Hoe=fe((Chr,Goe)=>{"use strict";var hdt=xi();Goe.exports=function(t,r,n){var a=t.selectAll("g."+n.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var i=t.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(o){o[0][i]=hdt.select(this)}),a}});var Woe=fe((Lhr,joe)=>{"use strict";var ddt=bi();joe.exports=function(t,r){for(var n=t._context.locale,a=0;a<2;a++){for(var i=t._context.locales,o=0;o<2;o++){var s=(i[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}i=ddt.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var Wq=fe((Phr,Yoe)=>{"use strict";Yoe.exports=function(t){for(var r={},n=[],a=0,i=0;i{"use strict";Xoe.exports=function(t){for(var r=gdt(t)?pdt:vdt,n=[],a=0;a{"use strict";$oe.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),a=n>1?(n*t+n*r)/n:t+r,i=String(a).length;if(i>16){var o=String(r).length,s=String(t).length;if(i>=s+o){var l=parseFloat(a).toPrecision(12);l.indexOf("e+")===-1&&(a=+l)}}return a}});var ese={};zp(ese,{default:()=>xdt});function ydt(e){return typeof e=="string"&&(e=e.replace(mdt,"")),(0,Joe.default)(e)?Number(e):Qoe.BADNUM}var Joe,Qoe,mdt,xdt,tse=Co(()=>{"use strict";Joe=$0(aa()),Qoe=$0(Wa()),mdt=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;xdt=ydt});var ise=fe((Rhr,nse)=>{"use strict";var _dt=/<[^>]*>/g,bdt=/[\p{S}\p{P}]/gu,wdt=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,Tdt=/�/g,Adt=/\s+/g,YE="-",rse=YE.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Mdt=new RegExp(rse+"{3,}","g"),Sdt=new RegExp(rse+"$","g"),Edt=60;function kdt(e){return typeof e.toWellFormed=="function"?e.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(e))}nse.exports=function(t,r=Edt){var n=kdt(t!=null?t:"").replace(Tdt,"").replace(_dt," ").replace(bdt,a=>a===YE?a:"").toLowerCase().trim().replace(Adt,YE).replace(wdt,"").replace(Mdt,YE);return n.length<=r?n:Array.from(n).slice(0,r).join("").replace(Sdt,"")}});var Xt=fe((Ihr,gse)=>{"use strict";var rT=xi(),Cdt=lb().utcFormat,Ldt=jI().format,cse=aa(),fse=Wa(),hse=fse.FP_SAFE,Pdt=-hse,ase=fse.BADNUM,Ir=gse.exports={};Ir.adjustFormat=function(t){if(!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t))return t;if(t==="0.f")return"~f";if(/^\d%/.test(t))return"~%";if(/^\ds/.test(t))return"~s";var r=(t.match(/^[+\-( ]?/)||[""])[0],n=t.slice(r.length);return!/^[~,.0$#]/.test(n)&&/[&fps]/.test(n)?r+"~"+n:t};var ose={};Ir.warnBadFormat=function(e){var t=String(e);ose[t]||(ose[t]=1,Ir.warn('encountered bad format: "'+t+'"'))};Ir.noFormat=function(e){return String(e)};Ir.numberFormat=function(e){var t;try{t=Ldt(Ir.adjustFormat(e))}catch(r){return Ir.warnBadFormat(e),Ir.noFormat}return t};Ir.nestedProperty=M4();Ir.keyedContainer=Jte();Ir.relativeAttr=ere();Ir.isPlainObject=em();Ir.toLogRange=rE();Ir.relinkPrivateKeys=ire();var hm=Gf();Ir.isArrayBuffer=hm.isArrayBuffer;Ir.isTypedArray=hm.isTypedArray;Ir.isArrayOrTypedArray=hm.isArrayOrTypedArray;Ir.isArray1D=hm.isArray1D;Ir.ensureArray=hm.ensureArray;Ir.concat=hm.concat;Ir.maxRowLength=hm.maxRowLength;Ir.minRowLength=hm.minRowLength;var dse=(fb(),Gs(cb));Ir.mod=dse.mod;Ir.modHalf=dse.modHalf;var dm=Mie();Ir.valObjectMeta=dm.valObjectMeta;Ir.coerce=dm.coerce;Ir.coerce2=dm.coerce2;Ir.coerceFont=dm.coerceFont;Ir.coercePattern=dm.coercePattern;Ir.coerceHoverinfo=dm.coerceHoverinfo;Ir.coerceSelectionMarkerOpacity=dm.coerceSelectionMarkerOpacity;Ir.validate=dm.validate;var T0=Moe();Ir.dateTime2ms=T0.dateTime2ms;Ir.isDateTime=T0.isDateTime;Ir.ms2DateTime=T0.ms2DateTime;Ir.ms2DateTimeLocal=T0.ms2DateTimeLocal;Ir.cleanDate=T0.cleanDate;Ir.isJSDate=T0.isJSDate;Ir.formatDate=T0.formatDate;Ir.incrementMonth=T0.incrementMonth;Ir.dateTick0=T0.dateTick0;Ir.dfltRange=T0.dfltRange;Ir.findExactDates=T0.findExactDates;Ir.MIN_MS=T0.MIN_MS;Ir.MAX_MS=T0.MAX_MS;var Ax=VE();Ir.findBin=Ax.findBin;Ir.sorterAsc=Ax.sorterAsc;Ir.sorterDes=Ax.sorterDes;Ir.distinctVals=Ax.distinctVals;Ir.roundUp=Ax.roundUp;Ir.sort=Ax.sort;Ir.findIndexOfMin=Ax.findIndexOfMin;Ir.sortObjectKeys=(bx(),Gs(_x)).default;var J1=Eoe();Ir.aggNums=J1.aggNums;Ir.len=J1.len;Ir.mean=J1.mean;Ir.geometricMean=J1.geometricMean;Ir.median=J1.median;Ir.midRange=J1.midRange;Ir.variance=J1.variance;Ir.stdev=J1.stdev;Ir.interp=J1.interp;var Jv=FE();Ir.init2dArray=Jv.init2dArray;Ir.transposeRagged=Jv.transposeRagged;Ir.dot=Jv.dot;Ir.translationMatrix=Jv.translationMatrix;Ir.rotationMatrix=Jv.rotationMatrix;Ir.rotationXYMatrix=Jv.rotationXYMatrix;Ir.apply3DTransform=Jv.apply3DTransform;Ir.apply2DTransform=Jv.apply2DTransform;Ir.apply2DTransform2=Jv.apply2DTransform2;Ir.convertCssMatrix=Jv.convertCssMatrix;Ir.inverseTransformMatrix=Jv.inverseTransformMatrix;var Np=Foe();Ir.deg2rad=Np.deg2rad;Ir.rad2deg=Np.rad2deg;Ir.angleDelta=Np.angleDelta;Ir.angleDist=Np.angleDist;Ir.isFullCircle=Np.isFullCircle;Ir.isAngleInsideSector=Np.isAngleInsideSector;Ir.isPtInsideSector=Np.isPtInsideSector;Ir.pathArc=Np.pathArc;Ir.pathSector=Np.pathSector;Ir.pathAnnulus=Np.pathAnnulus;var Pb=Doe();Ir.isLeftAnchor=Pb.isLeftAnchor;Ir.isCenterAnchor=Pb.isCenterAnchor;Ir.isRightAnchor=Pb.isRightAnchor;Ir.isTopAnchor=Pb.isTopAnchor;Ir.isMiddleAnchor=Pb.isMiddleAnchor;Ir.isBottomAnchor=Pb.isBottomAnchor;var Fb=zoe();Ir.segmentsIntersect=Fb.segmentsIntersect;Ir.segmentDistance=Fb.segmentDistance;Ir.getTextLocation=Fb.getTextLocation;Ir.clearLocationCache=Fb.clearLocationCache;Ir.getVisibleSegment=Fb.getVisibleSegment;Ir.findPointOnPath=Fb.findPointOnPath;var $E=ta();Ir.extendFlat=$E.extendFlat;Ir.extendDeep=$E.extendDeep;Ir.extendDeepAll=$E.extendDeepAll;Ir.extendDeepNoArrays=$E.extendDeepNoArrays;var Yq=W1();Ir.log=Yq.log;Ir.warn=Yq.warn;Ir.error=Yq.error;var Fdt=(Tb(),Gs(wb));Ir.counterRegex=Fdt.counter;var Xq=jE();Ir.throttle=Xq.throttle;Ir.throttleDone=Xq.done;Ir.clearThrottle=Xq.clear;var Qv=X4();Ir.getGraphDiv=Qv.getGraphDiv;Ir.isPlotDiv=Qv.isPlotDiv;Ir.removeElement=Qv.removeElement;Ir.addStyleRule=Qv.addStyleRule;Ir.addRelatedStyleRule=Qv.addRelatedStyleRule;Ir.deleteRelatedStyleRule=Qv.deleteRelatedStyleRule;Ir.setStyleOnHover=Qv.setStyleOnHover;Ir.getFullTransformMatrix=Qv.getFullTransformMatrix;Ir.getElementTransformMatrix=Qv.getElementTransformMatrix;Ir.getElementAndAncestors=Qv.getElementAndAncestors;Ir.equalDomRects=Qv.equalDomRects;Ir.clearResponsive=Ooe();Ir.preserveDrawingBuffer=Voe();Ir.makeTraceGroups=Hoe();Ir._=Woe();Ir.notifier=bq();Ir.filterUnique=Wq();Ir.filterVisible=Zoe();Ir.pushUnique=Lq();Ir.increment=Koe();Ir.cleanNumber=(tse(),Gs(ese)).default;Ir.slugify=ise();Ir.ensureNumber=function(t){return cse(t)?(t=Number(t),t>hse||t=t?!1:cse(e)&&e>=0&&e%1===0};Ir.noop=PE();Ir.identity=J4();Ir.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Ir.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};Ir.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),s=0;s=Math.pow(2,r)?a>10?(Ir.warn("randstr failed uniqueness"),o):e(t,r,n,(a||0)+1):o};Ir.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r["_"+t]=e,r};Ir.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,a=2*t-1,i=new Array(a),o=new Array(r),s,l,u,c;for(s=0;s=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*i[l];o[s]=c}return o};Ir.syncOrAsync=function(e,t,r){var n,a;function i(){return Ir.syncOrAsync(e,t,r)}for(;e.length;)if(a=e.splice(0,1)[0],n=a(t),n&&n.then)return n.then(i);return r&&r(t)};Ir.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};Ir.noneOrAll=function(e,t,r){if(e){var n=!1,a=!0,i,o;for(i=0;i0?a:0})};Ir.fillArray=function(e,t,r,n){if(n=n||Ir.identity,Ir.isArrayOrTypedArray(e))for(var a=0;aIdt.test(window.navigator.userAgent);var zdt=/Firefox\/(\d+)\.\d+/;Ir.getFirefoxVersion=function(){var e=zdt.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Ir.isD3Selection=function(e){return e instanceof rT.selection};Ir.ensureSingle=function(e,t,r,n){var a=e.select(t+(r?"."+r:""));if(a.size())return a;var i=e.append(t);return r&&i.classed(r,!0),n&&i.call(n),i};Ir.ensureSingleById=function(e,t,r,n){var a=e.select(t+"#"+r);if(a.size())return a;var i=e.append(t).attr("id",r);return n&&i.call(n),i};Ir.objectFromPath=function(e,t){for(var r=e.split("."),n,a=n={},i=0;i1?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};Ir.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var pse=/^\w*$/;Ir.templateString=function(e,t){var r={};return e.replace(Ir.TEMPLATE_STRING_REGEX,function(n,a){var i;return pse.test(a)?i=t[a]:(r[a]=r[a]||Ir.nestedProperty(t,a).get,i=r[a](!0)),i!==void 0?i:""})};var Odt={max:10,count:0,name:"hovertemplate"};Ir.hovertemplateString=e=>Zq(tl(zo({},e),{opts:Odt}));var Ndt={max:10,count:0,name:"texttemplate"};Ir.texttemplateString=e=>Zq(tl(zo({},e),{opts:Ndt}));var Udt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Vdt(e){var t=e.match(Udt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Gdt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ir.texttemplateStringForShapes=e=>Zq(tl(zo({},e),{opts:Gdt}));var sse=/^[:|\|]/;function Zq({data:e=[],locale:t,fallback:r,labels:n={},opts:a,template:i}){return i.replace(Ir.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),v=["xother_","yother_"].includes(s),g=u||c||v||f;(c||f)&&(s=s.substring(1)),(v||f)&&(s=s.substring(0,s.length-1));let p=null,x=null;if(a.parseMultDiv){var _=Vdt(s);s=_.key,p=_.op,x=_.number}let y;if(g){if(n[s]===void 0)return"";y=n[s]}else for(let L of e)if(L){if(L.hasOwnProperty(s)){y=L[s];break}if(pse.test(s)||(y=Ir.nestedProperty(L,s).get(!0)),y!==void 0)break}if(y===void 0){let{count:L,max:w,name:A}=a,T=r===!1?o:r;return L=ZE&&o<=lse,u=s>=ZE&&s<=lse;if(l&&(n=10*n+o-ZE),u&&(a=10*a+s-ZE),!l||!u){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var Lb=2e9;Ir.seedPseudoRandom=function(){Lb=2e9};Ir.pseudoRandom=function(){var e=Lb;return Lb=(69069*Lb+1)%4294967296,Math.abs(Lb-e)<429496729?Ir.pseudoRandom():Lb/4294967296};Ir.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},a=Ir.extractOption(e,t,"htx","hovertext");if(Ir.isValidTextValue(a))return n(a);var i=Ir.extractOption(e,t,"tx","text");if(Ir.isValidTextValue(i))return n(i)};Ir.isValidTextValue=function(e){return e||e===0};Ir.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(u=1):u=0,Ir.strTranslate(a-u*(r+o),i-u*(n+s))+Ir.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};Ir.setTransormAndDisplay=function(e,t){e.attr("transform",Ir.getTextTransform(t)),e.style("display",t.scale?null:"none")};Ir.ensureUniformFontSize=function(e,t){var r=Ir.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Ir.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};Ir.bigFont=function(e){return Math.round(1.2*e)};var use=Ir.getFirefoxVersion(),Hdt=use!==null&&use<86;Ir.getPositionFromD3Event=function(){return Hdt?[rT.event.layerX,rT.event.layerY]:[rT.event.offsetX,rT.event.offsetY]}});var xse=fe(()=>{"use strict";var jdt=Xt(),mse={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.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($q in mse)yse=$q.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),jdt.addStyleRule(yse,mse[$q]);var yse,$q});var Kq=fe((Ohr,_se)=>{_se.exports=!0});var Qq=fe((Nhr,bse)=>{"use strict";var Wdt=Kq(),Jq;typeof window.matchMedia=="function"?Jq=!window.matchMedia("(hover: none)").matches:Jq=Wdt;bse.exports=Jq});var Mx=fe((Uhr,eB)=>{"use strict";var Db=typeof Reflect=="object"?Reflect:null,wse=Db&&typeof Db.apply=="function"?Db.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},KE;Db&&typeof Db.ownKeys=="function"?KE=Db.ownKeys:Object.getOwnPropertySymbols?KE=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:KE=function(t){return Object.getOwnPropertyNames(t)};function Ydt(e){console&&console.warn&&console.warn(e)}var Ase=Number.isNaN||function(t){return t!==t};function vl(){vl.init.call(this)}eB.exports=vl;eB.exports.once=Kdt;vl.EventEmitter=vl;vl.prototype._events=void 0;vl.prototype._eventsCount=0;vl.prototype._maxListeners=void 0;var Tse=10;function JE(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(vl,"defaultMaxListeners",{enumerable:!0,get:function(){return Tse},set:function(e){if(typeof e!="number"||e<0||Ase(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Tse=e}});vl.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};vl.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Ase(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Mse(e){return e._maxListeners===void 0?vl.defaultMaxListeners:e._maxListeners}vl.prototype.getMaxListeners=function(){return Mse(this)};vl.prototype.emit=function(t){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")wse(l,this,r);else for(var u=l.length,c=Lse(l,u),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,Ydt(s)}return e}vl.prototype.addListener=function(t,r){return Sse(this,t,r,!1)};vl.prototype.on=vl.prototype.addListener;vl.prototype.prependListener=function(t,r){return Sse(this,t,r,!0)};function Xdt(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function Ese(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=Xdt.bind(n);return a.listener=r,n.wrapFn=a,a}vl.prototype.once=function(t,r){return JE(r),this.on(t,Ese(this,t,r)),this};vl.prototype.prependOnceListener=function(t,r){return JE(r),this.prependListener(t,Ese(this,t,r)),this};vl.prototype.removeListener=function(t,r){var n,a,i,o,s;if(JE(r),a=this._events,a===void 0)return this;if(n=a[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,i=o;break}if(i<0)return this;i===0?n.shift():Zdt(n,i),n.length===1&&(a[t]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};vl.prototype.off=vl.prototype.removeListener;vl.prototype.removeAllListeners=function(t){var r,n,a;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(t,r[a]);return this};function kse(e,t,r){var n=e._events;if(n===void 0)return[];var a=n[t];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?$dt(a):Lse(a,a.length)}vl.prototype.listeners=function(t){return kse(this,t,!0)};vl.prototype.rawListeners=function(t){return kse(this,t,!1)};vl.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Cse.call(e,t)};vl.prototype.listenerCount=Cse;function Cse(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}vl.prototype.eventNames=function(){return this._eventsCount>0?KE(this._events):[]};function Lse(e,t){for(var r=new Array(t),n=0;n{"use strict";var tB=Mx().EventEmitter,Qdt={init:function(e){if(e._ev instanceof tB)return e;var t=new tB,r=new tB;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,a){t.emit(n,a),r.emit(n,a)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,a=e._ev;if(!a)return;var i=a._events[t];if(!i)return;function o(l){if(l.listener){if(a.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(a,[r])}else return l.apply(a,[r])}i=Array.isArray(i)?i:[i];var s;for(s=0;s{"use strict";var Dse=Xt(),e0t=im().dfltConfig;function t0t(e,t){for(var r=[],n,a=0;ae0t.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Q1.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Q1.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Q1.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n{"use strict";zse.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var qb=fe(bc=>{"use strict";var J0=bi(),nT=Xt(),ek=Ho(),nB=Sb(),r0t=rB(),n0t=Z4(),i0t=im().configAttributes,qse=rl(),ep=nT.extendDeepAll,Ib=nT.isPlainObject,a0t=nT.isArrayOrTypedArray,tk=nT.nestedProperty,o0t=nT.valObjectMeta,iB="_isSubplotObj",rk="_isLinkedToArray",s0t="_arrayAttrRegexps",Ose="_deprecated",aB=[iB,rk,s0t,Ose];bc.IS_SUBPLOT_OBJ=iB;bc.IS_LINKED_TO_ARRAY=rk;bc.DEPRECATED=Ose;bc.UNDERSCORE_ATTRS=aB;bc.get=function(){var e={};return J0.allTypes.forEach(function(t){e[t]=u0t(t)}),{defs:{valObjects:o0t,metaKeys:aB.concat(["description","role","editType","impliedEdits"]),editType:{traces:qse.traces,layout:qse.layout},impliedEdits:{}},traces:e,layout:c0t(),frames:f0t(),animation:zb(n0t),config:zb(i0t)}};bc.crawl=function(e,t,r,n){var a=r||0;n=n||"",Object.keys(e).forEach(function(i){var o=e[i];if(aB.indexOf(i)===-1){var s=(n?n+".":"")+i;t(o,i,e,a,s),!bc.isValObject(o)&&Ib(o)&&i!=="impliedEdits"&&bc.crawl(o,t,a+1,s)}})};bc.isValObject=function(e){return e&&e.valType!==void 0};bc.findArrayAttributes=function(e){var t=[],r=[],n=[],a,i;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var v=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));v&&s(a,0,"")}function s(l,u,c){var f=l[r[u]],v=c+r[u];if(u===r.length-1)a0t(f)&&t.push(i+v);else if(n[u]){if(Array.isArray(f))for(var g=0;g=i.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!QE(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function QE(e){return e===Math.round(e)&&e>=0}function u0t(e){var t,r;t=J0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var a=ep({},ek),i=ep({},t.attributes);bc.crawl(i,function(l,u,c,f,v){tk(a,v).set(void 0),l===void 0&&tk(i,v).set(void 0)}),ep(n,a),J0.traceIs(e,"noOpacity")&&delete n.opacity,J0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),J0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,ep(n,i),r.attributes&&ep(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:zb(n)};if(t.layoutAttributes){var s={};ep(s,t.layoutAttributes),o.layoutAttributes=zb(s)}return t.animatable||bc.crawl(o,function(l){bc.isValObject(l)&&"anim"in l&&delete l.anim}),o}function c0t(){var e={},t,r;ep(e,nB);for(t in J0.subplotsRegistry)if(r=J0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var Bb=Xt(),g0t=Ho(),vm="templateitemname",oB={name:{valType:"string",editType:"none"}};oB[vm]={valType:"string",editType:"calc"};Sx.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=oB.name,t[vm]=oB[vm],t};Sx.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function a(i){r=Bb.coerce(i,{},g0t,"type");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:a}};Sx.newContainer=function(e,t,r){var n=e._template,a=n&&(n[t]||r&&n[r]);Bb.isPlainObject(a)||(a=null);var i=e[t]={_template:a};return i};Sx.arrayTemplater=function(e,t,r){var n=e._template,a=n&&n[Vse(t)],i=n&&n[t];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[vm]=u[vm];if(!Use(f))return c._template=a,c;for(var v=0;v=n&&(r._input||{})._templateitemname;i&&(a=n);var o=t+"["+a+"]",s;function l(){s={},i&&(s[o]={},s[o][vm]=i)}l();function u(g,p){s[g]=p}function c(g,p){i?Bb.nestedProperty(s[o],g).set(p):s[o+"."+g]=p}function f(){var g=s;return l(),g}function v(g,p){g&&c(g,p);var x=f();for(var _ in x)Bb.nestedProperty(e,_).set(x[_])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:v}}});var rc=fe((Yhr,Gse)=>{"use strict";var iT=(Tb(),Gs(wb)).counter;Gse.exports={idRegex:{x:iT("x","( domain)?"),y:iT("y","( domain)?")},attrRegex:iT("[xy]axis"),xAxisMatch:iT("xaxis"),yAxisMatch:iT("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}});var El=fe(Qd=>{"use strict";var m0t=bi(),sB=rc();Qd.id2name=function(t){if(!(typeof t!="string"||!t.match(sB.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Qd.name2id=function(t){if(t.match(sB.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Qd.cleanId=function(t,r,n){var a=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(sB.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(a&&!n)){var i=t.split(" ")[0].slice(1).replace(/^0+/,"");return i==="1"&&(i=""),t.charAt(0)+i+(a&&n?" domain":"")}};Qd.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var a=Qd.listIds(e,t),i=new Array(a.length),o;for(o=0;on?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Qd.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Hse(e,t){if(t&&t.length){for(var r=0;r{"use strict";function y0t(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function x0t(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}jse.exports={clearOutlineControllers:y0t,clearOutline:x0t}});var nk=fe(($hr,Wse)=>{"use strict";Wse.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var jf=fe(ak=>{"use strict";var ik=bi(),Khr=rc().SUBPLOT_PATTERN;ak.getSubplotCalcData=function(e,t,r){var n=ik.subplotsRegistry[t];if(!n)return[];for(var a=n.attr,i=[],o=0;o{"use strict";var _0t=bi(),Ob=Xt();Ex.manageCommandObserver=function(e,t,r,n){var a={},i=!0;t&&t._commandObserver&&(a=t._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var o=Ex.hasSimpleAPICommandBindings(e,r,a.lookupTable);if(t&&t._commandObserver){if(o)return a;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,a}if(o){Yse(e,o,a.cache),a.check=function(){if(i){var c=Yse(e,o,a.cache);return c.changed&&n&&a.lookupTable[c.value]!==void 0&&(a.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:a.lookupTable[c.value]})).then(a.enable,a.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+a;Ob.isPlainObject(i)?lB(i,t,o,n+1):t(o,a,i)}})}});var Hs=fe((tdr,ole)=>{"use strict";var edr=xi(),w0t=lb().timeFormatLocale,T0t=jI().formatLocale,aT=aa(),A0t=WI(),M0t=A4().version,No=bi(),S0t=qb(),E0t=Mo(),Ri=Xt(),k0t=ni(),Kse=Wa().BADNUM,e0=El(),C0t=pm().clearOutline,L0t=nk(),uB=Z4(),P0t=rB(),F0t=jf().getModuleCalcData,Jse=Ri.relinkPrivateKeys,kx=Ri._,fi=ole.exports={};Ri.extendFlat(fi,No);fi.attributes=Ho();fi.attributes.type.values=fi.allTypes;fi.fontAttrs=Ds();fi.layoutAttributes=Sb();var sk=$se();fi.executeAPICommand=sk.executeAPICommand;fi.computeAPICommandBindings=sk.computeAPICommandBindings;fi.manageCommandObserver=sk.manageCommandObserver;fi.hasSimpleAPICommandBindings=sk.hasSimpleAPICommandBindings;fi.redrawText=function(e){return e=Ri.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(No.getComponentMethod("annotations","draw")(e),No.getComponentMethod("legend","draw")(e),No.getComponentMethod("colorbar","draw")(e),t(fi.previousPromises(e)))},300)})};fi.resize=function(e){e=Ri.getGraphDiv(e);var t,r=new Promise(function(n,a){(!e||Ri.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ri.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,No.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};fi.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};fi.sendDataToCloud=function(e,t){e.emit("plotly_beforeexport");let r=new URL(t).origin;var n=fi.graphJson(e,!1,"object");n.version=M0t;var a=new URL(t);a.searchParams.set("origin",window.location.origin);var i=window.open(a.href,"_blank");if(!i){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),e.emit("plotly_exportfail");return}var o=function(s){s.origin===r&&s.data&&s.data.type==="CHART_AUTH_SUCCESS"&&(i.postMessage({type:"chart",chart:n},r),window.removeEventListener("message",o),e.emit("plotly_afterexport"))};return window.addEventListener("message",o),!1};var D0t=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],R0t=["year","month","dayMonth","dayMonthYear"];fi.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var a=e._fullLayout={},i=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||fi.createTransitionData(e),a._dfltTitle={plot:kx(e,"Click to enter Plot title"),subtitle:kx(e,"Click to enter Plot subtitle"),x:kx(e,"Click to enter X axis title"),y:kx(e,"Click to enter Y axis title"),colorbar:kx(e,"Click to enter Colorscale title"),annotation:kx(e,"new text")},a._traceWord=kx(e,"trace");var v=Qse(e,D0t);if(n._initialAutoSizeIsDone){var g=n.width,p=n.height;fi.supplyLayoutGlobalDefaults(i,a,v),i.width||(a.width=g),i.height||(a.height=p),fi.sanitizeMargins(a)}else{fi.supplyLayoutGlobalDefaults(i,a,v);var x=!i.width||!i.height,_=a.autosize,y=c.autosizable,C=x&&(_||y);C?fi.plotAutoSize(e,i,a):x&&fi.sanitizeMargins(a),!_&&x&&(i.width=a.width,i.height=a.height)}a._d3locale=q0t(v,a.separators),a._extraFormat=Qse(e,R0t),a._initialAutoSizeIsDone=!0,a._dataLength=l.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var k=a._subplots=z0t(),S=a._splomAxes={x:{},y:{}},L=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=I0t(o,l),fi.supplyDataDefaults(l,s,i,a);var w=Object.keys(S.x),A=Object.keys(S.y);if(w.length>1&&A.length>1){for(No.getComponentMethod("grid","sizeDefaults")(i,a),f=0;f15&&A.length>15&&a.shapes.length===0&&a.images.length===0,fi.linkSubplots(s,a,o,n),fi.cleanPlot(s,a,o,n);var I=!!(n._has&&n._has("cartesian")),R=!!(a._has&&a._has("cartesian")),B=I,O=R;B&&!O?n._bgLayer.remove():O&&!B&&(a._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&C0t({_fullLayout:n}),B0t(s,a),Jse(a,n),No.getComponentMethod("colorscale","crossTraceDefaults")(s,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var V=a._tracePreGUI,j={},q;for(q in V)j[q]="old";for(f=0;f0){var c=1-2*i;o=Math.round(c*o),s=Math.round(c*s)}}var f=fi.layoutAttributes.width.min,v=fi.layoutAttributes.height.min;o1,p=!r.height&&Math.abs(n.height-s)>1;(p||g)&&(g&&(n.width=o),p&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),fi.sanitizeMargins(n)};fi.supplyLayoutModuleDefaults=function(e,t,r,n){var a=No.componentsRegistry,i=t._basePlotModules,o,s,l,u=No.subplotsRegistry.cartesian;for(o in a)l=a[o],l.includeBasePlot&&l.includeBasePlot(e,t);i.length||i.push(u),t._has("cartesian")&&(No.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ri.subplotSort);for(s=0;s1&&(r.l/=_,r.r/=_)}if(v){var y=(r.t+r.b)/v;y>1&&(r.t/=y,r.b/=y)}var C=r.xl!==void 0?r.xl:r.x,k=r.xr!==void 0?r.xr:r.x,S=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;g[t]={l:{val:C,size:r.l+x},r:{val:k,size:r.r+x},b:{val:L,size:r.b+x},t:{val:S,size:r.t+x}},p[t]=1}if(!n._replotting)return fi.doAutoMargin(e)}};function N0t(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=e0.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}fi.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),rle(t);var a=t._size,i=t.margin,o={t:0,b:0,l:0,r:0},s=Ri.extendFlat({},a),l=i.l,u=i.r,c=i.t,f=i.b,v=t._pushmargin,g=t._pushmarginIds,p=t.minreducedwidth,x=t.minreducedheight;if(i.autoexpand!==!1){for(var _ in v)g[_]||delete v[_];var y=e._fullLayout._reservedMargin;for(var C in y)for(var k in y[C]){var S=y[C][k];o[k]=Math.max(o[k],S)}v.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var w=0;for(var A in v)A!=="base"&&aT(v[A][L].size)&&(w=v[A][L].size>w?v[A][L].size:w);var T=Math.max(0,i[L]-w);o[L]=Math.max(0,o[L]-T)}for(var m in v){var F=v[m].l||{},E=v[m].b||{},I=F.val,R=F.size,B=E.val,O=E.size,V=r-o.r-o.l,j=n-o.t-o.b;for(var q in v){if(aT(R)&&v[q].r){var U=v[q].r.val,J=v[q].r.size;if(U>I){var ee=(R*U+(J-V)*I)/(U-I),ce=(J*(1-I)+(R-V)*(1-U))/(U-I);ee+ce>l+u&&(l=ee,u=ce)}}if(aT(O)&&v[q].t){var ye=v[q].t.val,xe=v[q].t.size;if(ye>B){var ue=(O*ye+(xe-j)*B)/(ye-B),K=(xe*(1-B)+(O-j)*(1-ye))/(ye-B);ue+K>f+c&&(f=ue,c=K)}}}}}var _e=Ri.constrain(r-i.l-i.r,nle,p),ne=Ri.constrain(n-i.t-i.b,ile,x),ae=Math.max(0,r-_e),pe=Math.max(0,n-ne);if(ae){var ie=(l+u)/ae;ie>1&&(l/=ie,u/=ie)}if(pe){var le=(f+c)/pe;le>1&&(f/=le,c/=le)}if(a.l=Math.round(l)+o.l,a.r=Math.round(u)+o.r,a.t=Math.round(c)+o.t,a.b=Math.round(f)+o.b,a.p=Math.round(i.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&(fi.didMarginChange(s,a)||N0t(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var me=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};fi.graphJson=function(e,t=!1,r="json",n=!1,a=!1){(n&&t&&!e._fullData||n&&!t&&!e._fullLayout)&&fi.supplyDefaults(e);var i=n?e._fullData:e.data,o=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function l(f,v){if(typeof f=="function")return v?"_function_":null;if(Ri.isPlainObject(f)){var g={};return Object.keys(f).sort().forEach(function(y){if(["_","["].indexOf(y.charAt(0))===-1){if(typeof f[y]=="function"){v&&(g[y]="_function");return}g[y]=l(f[y],v)}}),g}var p=Array.isArray(f),x=Ri.isTypedArray(f);if((p||x)&&f.dtype&&f.shape){var _=f.bdata;return l({dtype:f.dtype,shape:f.shape,bdata:Ri.isArrayBuffer(_)?A0t.encode(_):_},v)}return p?f.map(function(y){return l(y,v)}):x?Ri.simpleMap(f,Ri.identity):Ri.isJSDate(f)?Ri.ms2DateTimeLocal(+f):f}var u={data:(i||[]).map(function(f){var v=l(f);return t&&delete v.fit,v})};if(!t&&(u.layout=l(o),n)){var c=o._size;u.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(u.frames=l(s)),a&&(u.config=l(e._context,!0)),r==="object"?u:JSON.stringify(u)};fi.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return No.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var v=0,g=0;function p(){return v++,function(){g++,!n&&g===v&&s(f)}}r.runFn(p),setTimeout(p())})}function s(f){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return No.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var u=[fi.previousPromises,l,r.prepareFn,fi.rehover,fi.reselect,o],c=Ri.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}fi.doCalcdata=function(e,t){var r=e0.list(e),n=e._fullData,a=e._fullLayout,i,o,s,l=new Array(n.length),u=(e.calcdata||[]).slice();for(e.calcdata=l,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},s=0;s{"use strict";Cx.xmlns="http://www.w3.org/2000/xmlns/";Cx.svg="http://www.w3.org/2000/svg";Cx.xlink="http://www.w3.org/1999/xlink";Cx.svgAttrs={xmlns:Cx.svg,"xmlns:xlink":Cx.xlink}});var nc=fe((ndr,sle)=>{"use strict";sle.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"}}});var as=fe(A0=>{"use strict";var wc=xi(),ev=Xt(),j0t=ev.strTranslate,cB=Q0(),W0t=nc().LINE_SPACING,Y0t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/,dle=e=>e?e.match(Y0t):null;A0.matchTex=dle;A0.convertToTspans=function(e,t,r){var n=e.text(),a=!e.attr("data-notex")&&t&&t._context.typesetMath&&dle(n);a&&!K0t()&&(a=null);var i=wc.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function s(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=svt(e.node(),n);l&&e.style("pointer-events","all"),A0.positionText(e),r&&r.call(e)}return a?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u},f=e.attr("text-anchor");J0t(a[2],c,function(v,g,p){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var x=v&&v.select("svg");if(!x||!x.node()){s(),l();return}e.style("display","none");var _=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});_.node().appendChild(x.node()),g&&g.node()&&x.node().insertBefore(g.node().cloneNode(!0),x.node().firstChild);var y=p.width,C=p.height;x.attr({class:o,height:C,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":c.fontSize+"px"});var k=e.node().style.fill||"black",S=x.select("g");S.attr({fill:k,stroke:k});var L=S.node().getBoundingClientRect(),w=L.width,A=L.height;(w>y||A>C)&&(x.style("overflow","hidden"),L=x.node().getBoundingClientRect(),w=L.width,A=L.height);var T=+e.attr("x"),m=+e.attr("y"),F=u||e.node().getBoundingClientRect().height,E=-F/4;o[0]==="y"?_.attr({transform:"rotate("+[-90,T,m]+")"+j0t(-w/2,E-A/2)}):o[0]==="l"?m=E-A/2:o[0]==="a"&&o.indexOf("atitle")!==0?(T=0,m=E):(T=T-w*(f==="middle"?.5:f==="end"?1:0),m=m+E-A/2),x.attr({x:T,y:m}),r&&r.call(e,_),l(_)})})):s(),e};var X0t=/(<|<|<)/g,Z0t=/(>|>|>)/g;function $0t(e){return e.replace(X0t,"\\lt ").replace(Z0t,"\\gt ")}var fB=null,vle=()=>typeof MathJax!="undefined"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,lle=!1,ule=!1;function K0t(){let e=vle();return e===3||e===4?!0:(e===null?lle||(lle=!0,ev.warn("MathJax is not loaded. Math equations will not be rendered.")):ule||(ule=!0,ev.warn("Unsupported MathJax version:",MathJax.version)),!1)}function J0t(e,t,r){let n=vle();var a;let i=function(){if(!fB){let u=MathJax._.output.svg_ts.SVG,c=ev.extendFlat({},MathJax.config.svg,{fontCache:"local"});n===4&&(c.linebreaks=ev.extendFlat({},c.linebreaks,{inline:!1})),fB=MathJax._.mathjax.mathjax.document(document,ev.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new u(c)}))}let s="math-output-"+ev.randstr({},64);a=wc.select("body").append("div").attr({id:s}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"});let l=$0t(e).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return fB.convert(l,{display:!1})}).then(function(u){a.node().appendChild(u)})},o=function(){let s=a.select(".MathJax"),l=!s.empty()&&a.select("svg").node();if(!l)ev.log("There was an error in the tex syntax.",e),r();else{let u=l.getBoundingClientRect(),c=s.select("defs");r(s,c,u)}a.remove()};Promise.resolve().then(i).then(o).catch(s=>{ev.log("MathJax typesetting failed.",e,s),a&&a.remove(),r()})}var ple={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},Q0t={sub:"0.3em",sup:"-0.6em"},evt={sub:"-0.21em",sup:"0.42em"},cle="\u200B",fle=["http:","https:","mailto:","",void 0,":"],gle=A0.NEWLINES=/(\r\n?|\n)/g,dB=/(<[^<>]*>)/,vB=/<(\/?)([^ >]*)(\s+(.*))?>/i,tvt=//i;A0.BR_TAG_ALL=//gi;var mle=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,yle=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,xle=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,rvt=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Lx(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&lk(n)}var nvt=/(^|;)\s*color:/;A0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],a="...",i=a.length,o=e.split(dB),s=[],l="",u=0,c=0;ci?s.push(f.slice(0,Math.max(0,x-i))+a):s.push(f.slice(0,x));break}l=""}}return s.join("")};var ivt={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},avt=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function lk(e){return e.replace(avt,function(t,r){var n;return r.charAt(0)==="#"?n=ovt(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=ivt[r],n||t})}A0.convertEntities=lk;function ovt(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function svt(e,t){t=t.replace(gle," ");var r=!1,n=[],a,i=-1;function o(){i++;var w=document.createElementNS(cB.svg,"tspan");wc.select(w).attr({class:"line",dy:i*W0t+"em"}),e.appendChild(w),a=w;var A=n;if(n=[{node:w}],A.length>1)for(var T=1;T.",t);return}var A=n.pop();w!==A.type&&ev.log("Start tag <"+A.type+"> doesnt match end tag <"+w+">. Pretending it did match.",t),a=n[n.length-1].node}var c=tvt.test(t);c?o():(a=e,n=[{node:e}]);for(var f=t.split(dB),v=0;v{"use strict";var lvt=xi(),sT=aa(),uk=Xt(),Px=ni(),uvt=yx().isValid;function cvt(e,t,r){var n=t?uk.nestedProperty(e,t).get()||{}:e,a=n[r||"color"];a&&a._inputArray&&(a=a._inputArray);var i=!1;if(uk.isArrayOrTypedArray(a)){for(var o=0;o=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function Mle(e,t){t=t||{};for(var r=e.domain,n=e.range,a=n.length,i=new Array(a),o=0;o{"use strict";var Ele=Rq(),hvt=Ele.FORMAT_LINK,dvt=Ele.DATE_FORMAT_LINK;function vvt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?pB:kle)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function pB(e,t){return["Sets the "+e+" formatting rule"+(t?" for `"+t+"`":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+hvt+"."].join(" ")}function kle(e,t){return pB(e,t)+[" And for dates see: "+dvt+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{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*"].join(" ")}Cle.exports={axisHoverFormat:vvt,descriptionOnlyNumbers:pB,descriptionWithDates:kle}});var pf=fe((ldr,Wle)=>{"use strict";var Lle=Ds(),Nb=tc(),jle=Uc().dash,mB=ta().extendFlat,Ple=Mo().templatedArray,sdr=Oo().templateFormatStringDescription,Fle=pl().descriptionWithDates,pvt=Wa().ONEDAY,Up=rc(),gvt=Up.HOUR_PATTERN,mvt=Up.WEEKDAY_PATTERN,gB={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},yvt=mB({},gB,{values:gB.values.slice().concat(["sync"])});function Dle(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Rle={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Ile={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},zle={valType:"data_array",editType:"ticks"},qle={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Ble(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Ole(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Nle={valType:"color",dflt:Nb.defaultLine,editType:"ticks"},Ule={valType:"color",dflt:Nb.lightLine,editType:"ticks"};function Vle(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Gle=mB({},jle,{editType:"ticks"}),Hle={valType:"boolean",editType:"ticks"};Wle.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Lle({editType:"ticks",description:"Sets this axis' title font."}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Up.idRegex.x.toString(),Up.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"calc"},rangebreaks:Ple("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[mvt,gvt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:pvt},editType:"calc"}),tickmode:yvt,nticks:Dle(),tick0:Rle,dtick:Ile,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:zle,ticktext:{valType:"data_array",editType:"ticks"},ticks:qle,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:Ble(),tickwidth:Ole(),tickcolor:Nle,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:mB({},jle,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:Lle({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Fle("tick label")},tickformatstops:Ple("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Fle("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Nb.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:Hle,gridcolor:Ule,gridwidth:Vle(),griddash:Gle,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"plot"},minor:{tickmode:gB,nticks:Dle("minor"),tick0:Rle,dtick:Ile,tickvals:zle,ticks:qle,ticklen:Ble("minor"),tickwidth:Ole("minor"),tickcolor:Nle,gridcolor:Ule,gridwidth:Vle("minor"),griddash:Gle,showgrid:Hle,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var ck=fe((udr,Zle)=>{"use strict";var ml=pf(),Yle=Ds(),Xle=ta().extendFlat,xvt=rl().overrideAll;Zle.exports=xvt({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:ml.linecolor,outlinewidth:ml.linewidth,bordercolor:ml.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:ml.minor.tickmode,nticks:ml.nticks,tick0:ml.tick0,dtick:ml.dtick,tickvals:ml.tickvals,ticktext:ml.ticktext,ticks:Xle({},ml.ticks,{dflt:""}),ticklabeloverflow:Xle({},ml.ticklabeloverflow,{}),ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside"},ticklen:ml.ticklen,tickwidth:ml.tickwidth,tickcolor:ml.tickcolor,ticklabelstep:ml.ticklabelstep,showticklabels:ml.showticklabels,labelalias:ml.labelalias,tickfont:Yle({description:"Sets the color bar's tick label font"}),tickangle:ml.tickangle,tickformat:ml.tickformat,tickformatstops:ml.tickformatstops,tickprefix:ml.tickprefix,showtickprefix:ml.showtickprefix,ticksuffix:ml.ticksuffix,showticksuffix:ml.showticksuffix,separatethousands:ml.separatethousands,exponentformat:ml.exponentformat,minexponent:ml.minexponent,showexponent:ml.showexponent,title:{text:{valType:"string"},font:Yle({description:"Sets this color bar's title font."}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var _s=fe((fdr,Kle)=>{"use strict";var _vt=ck(),bvt=(Tb(),Gs(wb)).counter,wvt=(bx(),Gs(_x)).default,$le=yx().scales,cdr=wvt($le);function fk(e){return"`"+e+"`"}Kle.exports=function(t,r){t=t||"",r=r||{};var n=r.cLetter||"c",a="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,i="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:n==="z",s=typeof r.colorscaleDflt=="string"?$le[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[n],f="in "+fk(u+c));var v=a?" Has an effect only if "+f+" is set to a numerical array.":"",g=n+"auto",p=n+"min",x=n+"max",_=n+"mid",y=fk(u+g),C=fk(u+p),k=fk(u+x),S=C+" and "+k,L={};L[p]=L[x]=void 0;var w={};w[g]=!1;var A={};return c==="color"&&(A.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(A.color.anim=!0)),A[g]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},A[p]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:w},A[x]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:w},A[_]={valType:"number",dflt:null,editType:"calc",impliedEdits:L},A.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},A.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},A.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(A.showscale={valType:"boolean",dflt:o,editType:"calc"},A.colorbar=_vt),r.noColorAxis||(A.coloraxis={valType:"subplotid",regex:bvt("coloraxis"),dflt:null,editType:"calc"}),A}});var xB=fe((hdr,Jle)=>{"use strict";var Tvt=ta().extendFlat,Avt=_s(),yB=yx().scales;Jle.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:yB.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:yB.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:yB.RdBu,editType:"calc"}},coloraxis:Tvt({_isSubplotObj:!0,editType:"calc"},Avt("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var _B=fe((ddr,Qle)=>{"use strict";var Mvt=Xt();Qle.exports=function(t){return Mvt.isPlainObject(t.colorbar)}});var TB=fe(wB=>{"use strict";var bB=aa(),eue=Xt(),tue=Wa(),Svt=tue.ONEDAY,Evt=tue.ONEWEEK;wB.dtick=function(e,t){var r=t==="log",n=t==="date",a=t==="category",i=n?Svt:1;if(!e)return i;if(bB(e))return e=Number(e),e<=0?i:a?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||r))return i;var o=e.charAt(0),s=e.slice(1);return s=bB(s)?Number(s):0,s<=0||!(n&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?i:e};wB.tick0=function(e,t,r,n){if(t==="date")return eue.cleanDate(e,eue.dateTick0(r,n%Evt===0?1:0));if(!(n==="D1"||n==="D2"))return bB(e)?Number(e):0}});var Fx=fe((pdr,nue)=>{"use strict";var rue=TB(),kvt=Xt().isArrayOrTypedArray,Cvt=Gf().isTypedArraySpec,Lvt=Gf().decodeTypedArraySpec;nue.exports=function(t,r,n,a,i={}){var o=i.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(S){var L=s[S];return Cvt(L)&&(L=Lvt(L)),L!==void 0?L:(l._template||{})[S]}var f=c("tick0"),v=c("dtick"),g=c("tickvals"),p=c("overlaying"),x=a==="category"||a==="multicategory",_;kvt(g)?_="array":v?_="linear":p&&!x?_="sync":_="auto";var y=n(u+"tickmode",_);if(y==="auto"||y==="sync")n(u+"nticks");else if(y==="linear"){var C=l.dtick=rue.dtick(v,a);l.tick0=rue.tick0(f,a,r.calendar,C)}else if(a!=="multicategory"){var k=n(u+"tickvals");k===void 0?l.tickmode="auto":o||n("ticktext")}}});var Ub=fe((gdr,aue)=>{"use strict";var AB=Xt(),iue=pf();aue.exports=function(t,r,n,a){var i=a.isMinor,o=i?t.minor||{}:t,s=i?r.minor:r,l=i?iue.minor:iue,u=i?"minor.":"",c=AB.coerce2(o,s,l,"ticklen",i?(r.ticklen||5)*.6:void 0),f=AB.coerce2(o,s,l,"tickwidth",i?r.tickwidth||1:void 0),v=AB.coerce2(o,s,l,"tickcolor",(i?r.tickcolor:void 0)||s.color),g=n(u+"ticks",!i&&a.outerTicks||c||f||v?"outside":"");g||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var MB=fe((mdr,oue)=>{"use strict";oue.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(i){return t[i]!==void 0}),a=function(i){return t[i]===t[n[0]]};if(n.every(a)||n.length===1)return t[n[0]]}});var Ah=fe((ydr,sue)=>{"use strict";var hk=Xt(),Pvt=Mo();sue.exports=function(t,r,n){var a=n.name,i=n.inclusionAttr||"visible",o=r[a],s=hk.isArrayOrTypedArray(t[a])?t[a]:[],l=r[a]=[],u=Pvt.arrayTemplater(r,a,i),c,f;for(c=0;c{"use strict";var SB=Xt(),Fvt=ni().contrast,lue=pf(),Dvt=MB(),Rvt=Ah();uue.exports=function(t,r,n,a,i){i||(i={});var o=n("labelalias");SB.isPlainObject(o)||delete r.labelalias;var s=Dvt(t),l=n("showticklabels");if(l){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var u=i.font||{},c=r.color,f=r.ticklabelposition||"",v=f.indexOf("inside")!==-1?Fvt(i.bgColor):c&&c!==lue.color.dflt?c:u.color;if(SB.coerceFont(n,"tickfont",u,{overrideDflt:{color:v}}),!i.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&n("ticklabelstep"),!i.noAng){var g=n("tickangle");!i.noAutotickangles&&g==="auto"&&n("autotickangles")}if(a!=="category"){var p=n("tickformat");Rvt(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Ivt}),r.tickformatstops.length||delete r.tickformatstops,!i.noExp&&!p&&a!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}!i.noMinorloglabels&&a==="log"&&n("minorloglabels")}};function Ivt(e,t){function r(a,i){return SB.coerce(e,t,lue.tickformatstops,a,i)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var mm=fe((_dr,cue)=>{"use strict";var zvt=MB();cue.exports=function(t,r,n,a,i){i||(i={});var o=i.tickSuffixDflt,s=zvt(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var EB=fe((bdr,fue)=>{"use strict";var ym=Xt(),qvt=Mo(),Bvt=Fx(),Ovt=Ub(),Nvt=gm(),Uvt=mm(),Vvt=ck();fue.exports=function(t,r,n){var a=qvt.newContainer(r,"colorbar"),i=t.colorbar||{};function o(E,I){return ym.coerce(i,a,Vvt,E,I)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o("orientation"),f=c==="v",v=o("thicknessmode");o("thickness",v==="fraction"?30/(f?l:u):30);var g=o("lenmode");o("len",g==="fraction"?1:f?u:l);var p=o("yref"),x=o("xref"),_=p==="paper",y=x==="paper",C,k,S,L="left";f?(S="middle",L=y?"left":"right",C=y?1.02:1,k=.5):(S=_?"bottom":"top",L="center",C=.5,k=_?1.02:1),ym.coerce(i,a,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:C}},"x"),ym.coerce(i,a,{y:{valType:"number",min:_?-2:0,max:_?3:1,dflt:k}},"y"),o("xanchor",L),o("xpad"),o("yanchor",S),o("ypad"),ym.noneOrAll(i,a,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var w=ym.coerce(i,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",w.indexOf("inside")!==-1?"hide past domain":"hide past div"),Bvt(i,a,o,"linear");var A=n.font,T={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:A};w.indexOf("inside")!==-1&&(T.bgColor="black"),Uvt(i,a,o,"linear",T),Nvt(i,a,o,"linear",T),Ovt(i,a,o,"linear",T),o("title.text",n._dfltTitle.colorbar);var m=a.showticklabels?a.tickfont:A,F=ym.extendFlat({},A,{family:m.family,size:ym.bigFont(m.size)});ym.coerceFont(o,"title.font",F),o("title.side",f?"top":"right")}});var Vc=fe((wdr,vue)=>{"use strict";var hue=aa(),CB=Xt(),Gvt=_B(),Hvt=EB(),due=yx().isValid,jvt=bi().traceIs;function kB(e,t){var r=t.slice(0,t.length-1);return t?CB.nestedProperty(e,r).get()||{}:e}vue.exports=function e(t,r,n,a,i){var o=i.prefix,s=i.cLetter,l="_module"in r,u=kB(t,o),c=kB(r,o),f=kB(r._template||{},o)||{},v=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,a,i)};if(l){var g=n._colorAxes||{},p=a(o+"coloraxis");if(p){var x=jvt(r,"contour")&&CB.nestedProperty(r,"contours.coloring").get()||"heatmap",_=g[p];_?(_[2].push(v),_[0]!==x&&(_[0]=!1,CB.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):g[p]=[x,r,[v]];return}}var y=u[s+"min"],C=u[s+"max"],k=hue(y)&&hue(C)&&y{"use strict";var pue=Xt(),Wvt=Mo(),gue=xB(),Yvt=Vc();mue.exports=function(t,r){function n(f,v){return pue.coerce(t,r,gue,f,v)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var a=r._colorAxes,i,o;function s(f,v){return pue.coerce(i,o,gue.coloraxis,f,v)}for(var l in a){var u=a[l];if(u[0])i=t[l]||{},o=Wvt.newContainer(r,l,"coloraxis"),o._name=l,Yvt(i,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var Xvt=Xt(),Zvt=Wf().hasColorscale,$vt=Wf().extractOpts;xue.exports=function(t,r){function n(c,f){var v=c["_"+f];v!==void 0&&(c[f]=v)}function a(c,f){var v=f.container?Xvt.nestedProperty(c,f.container).get():c;if(v)if(v.coloraxis)v._colorAx=r[v.coloraxis];else{var g=$vt(v),p=g.auto;(p||g.min===void 0)&&n(v,f.min),(p||g.max===void 0)&&n(v,f.max),g.autocolorscale&&n(v,"colorscale")}}for(var i=0;i{"use strict";var bue=aa(),LB=Xt(),Kvt=Wf().extractOpts;wue.exports=function(t,r,n){var a=t._fullLayout,i=n.vals,o=n.containerStr,s=o?LB.nestedProperty(r,o).get():r,l=Kvt(s),u=l.auto!==!1,c=l.min,f=l.max,v=l.mid,g=function(){return LB.aggNums(Math.min,null,i)},p=function(){return LB.aggNums(Math.max,null,i)};if(c===void 0?c=g():u&&(s._colorAx&&bue(c)?c=Math.min(c,g()):c=g()),f===void 0?f=p():u&&(s._colorAx&&bue(f)?f=Math.max(f,p()):f=p()),u&&v!==void 0&&(f-v>v-c?c=v-(f-v):f-v=0?x=a.colorscale.sequential:x=a.colorscale.sequentialminus,l._sync("colorscale",x)}}});var js=fe((Sdr,Tue)=>{"use strict";var dk=yx(),Vb=Wf();Tue.exports={moduleType:"component",name:"colorscale",attributes:_s(),layoutAttributes:xB(),supplyLayoutDefaults:yue(),handleDefaults:Vc(),crossTraceDefaults:_ue(),calc:Mh(),scales:dk.scales,defaultScale:dk.defaultScale,getScale:dk.get,isValidScale:dk.isValid,hasColorscale:Vb.hasColorscale,extractOpts:Vb.extractOpts,extractScale:Vb.extractScale,flipScale:Vb.flipScale,makeColorScaleFunc:Vb.makeColorScaleFunc,makeColorScaleFuncFromTrace:Vb.makeColorScaleFuncFromTrace}});var Is=fe((Edr,Mue)=>{"use strict";var Aue=Xt(),Jvt=Gf().isTypedArraySpec;Mue.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return Aue.isPlainObject(t)&&(Aue.isArrayOrTypedArray(t.size)||Jvt(t.size))}}});var lT=fe((kdr,Sue)=>{"use strict";var Qvt=aa();Sue.exports=function(t,r){r||(r=2);var n=t.marker,a=n.sizeref||1,i=n.sizemin||0,o=n.sizemode==="area"?function(s){return Math.sqrt(s/a)}:function(s){return s/a};return function(s){var l=o(s/r);return Qvt(l)&&l>0?Math.max(l,i):0}}});var Sd=fe(Yf=>{"use strict";var uT=Xt();Yf.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Yf.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],a=0;a=0&&r.index{var PB={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},npt=/([astvzqmhlc])([^astvzqmhlc]*)/gi,ipt=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function apt(e){let t=[];return e.replace(npt,(r,n,a)=>{let i=n.toLowerCase(),o=n,s=opt(a);for(i==="m"&&s.length>2&&(t.push([o,...s.splice(0,2)]),i="l",o=o==="m"?"l":"L");;){if(s.length===PB[i])return t.push([o,...s]),"";if(s.length{"use strict";var spt=FB(),$n=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},za="M0,0Z",Lue=Math.sqrt(2),xm=Math.sqrt(3),DB=Math.PI,RB=Math.cos,IB=Math.sin;Iue.exports={circle:{n:0,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?Ba(t,r,a):a}},square:{n:1,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.4,2),a=$n(e*1.2,2);return Ba(t,r,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.8/Lue,2),a="l"+n+","+n,i="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return Ba(t,r,"M0,"+n+a+i+o+i+o+s+o+s+a+s+a+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+n+","+a+"H"+n+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+n+",-"+a+"H"+n+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M"+a+",-"+n+"V"+n+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+a+",-"+n+"V"+n+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.951,2),a=$n(e*.588,2),i=$n(-e,2),o=$n(e*-.309,2),s=$n(e*.809,2);return Ba(t,r,"M"+n+","+o+"L"+a+","+s+"H-"+a+"L-"+n+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/2,2),i=$n(e*xm/2,2);return Ba(t,r,"M"+i+",-"+a+"V"+a+"L0,"+n+"L-"+i+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/2,2),i=$n(e*xm/2,2);return Ba(t,r,"M-"+a+","+i+"H"+a+"L"+n+",0L"+a+",-"+i+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.924,2),a=$n(e*.383,2);return Ba(t,r,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,t,r){if(qa(t))return za;var n=e*1.4,a=$n(n*.225,2),i=$n(n*.951,2),o=$n(n*.363,2),s=$n(n*.588,2),l=$n(-n,2),u=$n(n*-.309,2),c=$n(n*.118,2),f=$n(n*.809,2),v=$n(n*.382,2);return Ba(t,r,"M"+a+","+u+"H"+i+"L"+o+","+c+"L"+s+","+f+"L0,"+v+"L-"+s+","+f+"L-"+o+","+c+"L-"+i+","+u+"H-"+a+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.66,2),a=$n(e*.38,2),i=$n(e*.76,2);return Ba(t,r,"M-"+i+",0l-"+a+",-"+n+"h"+i+"l"+a+",-"+n+"l"+a+","+n+"h"+i+"l-"+a+","+n+"l"+a+","+n+"h-"+i+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(qa(t))return za;var n=$n(e*xm*.8,2),a=$n(e*.8,2),i=$n(e*1.6,2),o=$n(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Ba(t,r,"M-"+n+","+a+s+n+","+a+s+"0,-"+i+s+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(qa(t))return za;var n=$n(e*xm*.8,2),a=$n(e*.8,2),i=$n(e*1.6,2),o=$n(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Ba(t,r,"M"+n+",-"+a+s+"-"+n+",-"+a+s+"0,"+i+s+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.1,2),a=$n(e*2,2),i="A "+a+","+a+" 0 0 1 ";return Ba(t,r,"M-"+n+",-"+n+i+"-"+n+","+n+i+n+","+n+i+n+",-"+n+i+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2),a=$n(e*1.9,2),i="A "+a+","+a+" 0 0 1 ";return Ba(t,r,"M-"+n+",0"+i+"0,"+n+i+n+",0"+i+"0,-"+n+i+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.7,2),a=$n(e*1.4,2);return Ba(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2),a=$n(e*.7,2);return Ba(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/Lue,2);return Ba(t,r,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2),a=$n(e*.65,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*.85,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(qa(t))return za;var n=$n(e/2,2),a=$n(e,2);return Ba(t,r,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+n+","+i+"L0,0M"+n+","+i+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+n+",-"+i+"L0,0M"+n+",-"+i+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M"+i+","+n+"L0,0M"+i+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+i+","+n+"L0,0M-"+i+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M0,0L-"+n+",-"+a+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+a+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(qa(t))return za;var n=DB/2.5,a=2*e*RB(n),i=2*e*IB(n);return Ba(t,r,"M0,0L"+-a+","+i+"L"+a+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(qa(t))return za;var n=DB/4,a=2*e*RB(n),i=2*e*IB(n);return Ba(t,r,"M0,0L"+-a+","+i+"A "+2*e+","+2*e+" 0 0 1 "+a+","+i+"Z")},backoff:.4,noDot:!0}};function qa(e){return e===null}var Pue,Fue,Due,Rue;function Ba(e,t,r){if((!e||e%360===0)&&!t)return r;if(Due===e&&Rue===t&&Pue===r)return Fue;Due=e,Rue=t,Pue=r;function n(_,y){var C=RB(_),k=IB(_),S=y[0],L=y[1]+(t||0);return[S*C-L*k,S*k+L*C]}for(var a=e/180*DB,i=0,o=0,s=spt(r),l="",u=0;u{"use strict";var Gc=xi(),hs=Xt(),lpt=hs.numberFormat,_m=aa(),pk=bi(),Tc=ni(),upt=js(),fT=hs.strTranslate,gk=as(),cpt=Q0(),fpt=nc(),hpt=fpt.LINE_SPACING,Wue=Y1().DESELECTDIM,dpt=Is(),vpt=lT(),ppt=Sd().appendArrayPointValue,hi=rce.exports={};hi.font=function(e,t){var r=t.variant,n=t.style,a=t.weight,i=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),i&&e.call(Tc.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),r&&e.style("font-variant",r),c&&e.style("text-transform",zB(mpt(c))),l&&e.style("text-shadow",l==="auto"?gk.makeTextShadow(Tc.contrast(i)):zB(l)),u&&e.style("text-decoration-line",zB(ypt(u)))};function zB(e){return e==="none"?void 0:e}var gpt={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function mpt(e){return gpt[e]}function ypt(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}hi.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};hi.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};hi.setRect=function(e,t,r,n,a){e.call(hi.setPosition,t,r).call(hi.setSize,n,a)};hi.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);if(_m(a)&&_m(i)&&t.node())t.node().nodeName==="text"?t.attr("x",a).attr("y",i):t.attr("transform",fT(a,i));else return!1;return!0};hi.translatePoints=function(e,t,r){e.each(function(n){var a=Gc.select(this);hi.translatePoint(n,a,t,r)})};hi.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")};hi.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(a){var i=a[0].trace,o=i.xcalendar,s=i.ycalendar,l=pk.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){hi.hideOutsideRangePoint(u,Gc.select(this),r,n,o,s)})})}};hi.crispRound=function(e,t,r){return!t||!_m(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};hi.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,s=a||i.dash||"";Tc.stroke(t,n||i.color),hi.dashLine(t,s,o)};hi.lineGroupStyle=function(e,t,r,n){e.style("fill","none").each(function(a){var i=(((a||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,s=n||i.dash||"";Gc.select(this).call(Tc.stroke,r||i.color).call(hi.dashLine,s,o)})};hi.dashLine=function(e,t,r){r=+r||0,t=hi.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};hi.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function Yue(e,t,r,n){var a=t.fillpattern,i=t.fillgradient,o=hi.getPatternAttr,s=a&&(o(a.shape,0,"")||o(a.path,0,""));if(s){var l=o(a.bgcolor,0,null),u=o(a.fgcolor,0,null),c=a.fgopacity,f=o(a.size,0,8),v=o(a.solidity,0,.3),g=t.uid;hi.pattern(e,"point",r,g,s,f,v,void 0,a.fillmode,l,u,c)}else if(i&&i.type!=="none"){var p=i.type,x="scatterfill-"+t.uid;if(n&&(x="legendfill-"+t.uid),!n&&(i.start!==void 0||i.stop!==void 0)){var _,y;p==="horizontal"?(_={x:i.start,y:0},y={x:i.stop,y:0}):p==="vertical"&&(_={x:0,y:i.start},y={x:0,y:i.stop}),_.x=t._xA.c2p(_.x===void 0?t._extremes.x.min[0].val:_.x,!0),_.y=t._yA.c2p(_.y===void 0?t._extremes.y.min[0].val:_.y,!0),y.x=t._xA.c2p(y.x===void 0?t._extremes.x.max[0].val:y.x,!0),y.y=t._yA.c2p(y.y===void 0?t._extremes.y.max[0].val:y.y,!0),e.call($ue,r,x,"linear",i.colorscale,"fill",_,y,!0,!1)}else p==="horizontal"&&(p=p+"reversed"),e.call(hi.gradient,r,x,p,i.colorscale,"fill")}else t.fillcolor&&e.call(Tc.fill,t.fillcolor)}hi.singleFillStyle=function(e,t){var r=Gc.select(e.node()),n=r.data(),a=((n[0]||[])[0]||{}).trace||{};Yue(e,a,t,!1)};hi.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var a=Gc.select(this);n[0].trace&&Yue(a,n[0].trace,t,r)})};var que=zue();hi.symbolNames=[];hi.symbolFuncs=[];hi.symbolBackOffs=[];hi.symbolNeedLines={};hi.symbolNoDot={};hi.symbolNoFill={};hi.symbolList=[];Object.keys(que).forEach(function(e){var t=que[e],r=t.n;hi.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),hi.symbolNames[r]=e,hi.symbolFuncs[r]=t.f,hi.symbolBackOffs[r]=t.backoff||0,t.needLine&&(hi.symbolNeedLines[r]=!0),t.noDot?hi.symbolNoDot[r]=!0:hi.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(hi.symbolNoFill[r]=!0)});var xpt=hi.symbolNames.length,_pt="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";hi.symbolNumber=function(e){if(_m(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=hi.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=xpt||e>=400?0:Math.floor(Math.max(e,0))};function Xue(e,t,r,n){var a=e%100;return hi.symbolFuncs[a](t,r,n)+(e>=200?_pt:"")}var Bue=lpt("~f"),Zue={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};hi.gradient=function(e,t,r,n,a,i){var o=Zue[n];return $ue(e,t,r,o.type,a,i,o.start,o.stop,!1,o.reversed)};function $ue(e,t,r,n,a,i,o,s,l,u){var c=a.length,f;n==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(f={node:"radialGradient",reversed:u});for(var v=new Array(c),g=0;g=0&&e.i===void 0&&(e.i=i.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=hi.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=GB(e,r),f=VB(e,r);t.attr("d",Xue(u,l,c,f))}var v=!1,g,p,x;if(e.so)x=s.outlierwidth,p=s.outliercolor,g=o.outliercolor;else{var _=(s||{}).width;x=(e.mlw+1||_+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=n.lineScale(e.mlc):hs.isArrayOrTypedArray(s.color)?p=Tc.defaultLine:p=s.color,hs.isArrayOrTypedArray(o.color)&&(g=Tc.defaultLine,v=!0),"mc"in e?g=e.mcc=n.markerScale(e.mc):g=o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(g=n.selectedColorFn(e))}let y=e.mld||(s||{}).dash;if(y&&hi.dashLine(t,y,x),e.om)t.call(Tc.stroke,g).style({"stroke-width":(x||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:x)+"px");var C=o.gradient,k=e.mgt;k?v=!0:k=C&&C.type,hs.isArrayOrTypedArray(k)&&(k=k[0],Zue[k]||(k=0));var S=o.pattern,L=hi.getPatternAttr,w=S&&(L(S.shape,e.i,"")||L(S.path,e.i,""));if(k&&k!=="none"){var A=e.mgc;A?v=!0:A=C.color;var T=r.uid;v&&(T+="-"+e.i),hi.gradient(t,a,T,k,[[0,A],[1,g]],"fill")}else if(w){var m=!1,F=S.fgcolor;!F&&i&&i.color&&(F=i.color,m=!0);var E=L(F,e.i,i&&i.color||null),I=L(S.bgcolor,e.i,null),R=S.fgopacity,B=L(S.size,e.i,8),O=L(S.solidity,e.i,.3);m=m||e.mcc||hs.isArrayOrTypedArray(S.shape)||hs.isArrayOrTypedArray(S.path)||hs.isArrayOrTypedArray(S.bgcolor)||hs.isArrayOrTypedArray(S.fgcolor)||hs.isArrayOrTypedArray(S.size)||hs.isArrayOrTypedArray(S.solidity);var V=r.uid;m&&(V+="-"+e.i),hi.pattern(t,"point",a,V,w,B,O,e.mcc,S.fillmode,I,E,R)}else hs.isArrayOrTypedArray(g)?Tc.fill(t,g[e.i]):Tc.fill(t,g);x&&Tc.stroke(t,p)}};hi.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=hi.tryColorscale(r,""),t.lineScale=hi.tryColorscale(r,"line"),pk.traceIs(e,"symbols")&&(t.ms2mrc=dpt.isBubble(e)?vpt(e):function(){return(r.size||6)/2}),e.selectedpoints&&hs.extendFlat(t,hi.makeSelectedPointStyleFns(e)),t};hi.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.marker||{},i=r.marker||{},o=n.marker||{},s=a.opacity,l=i.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(hs.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(S){var L=S.mo===void 0?a.opacity:S.mo;return S.selected?c?l:L:f?u:Wue*L});var v=a.color,g=i.color,p=o.color;(g||p)&&(t.selectedColorFn=function(S){var L=S.mcc||v;return S.selected?g||L:p||L});var x=a.size,_=i.size,y=o.size,C=_!==void 0,k=y!==void 0;return pk.traceIs(e,"symbols")&&(C||k)&&(t.selectedSizeFn=function(S){var L=S.mrc||x/2;return S.selected?C?_/2:L:k?y/2:L}),t};hi.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},s=a.color,l=i.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Tc.addOpacity(f,Wue))},t};hi.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=hi.makeSelectedPointStyleFns(t),n=t.marker||{},a=[];r.selectedOpacityFn&&a.push(function(i,o){i.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&a.push(function(i,o){Tc.fill(i,r.selectedColorFn(o))}),r.selectedSizeFn&&a.push(function(i,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);i.attr("d",Xue(hi.symbolNumber(s),l,GB(o,t),VB(o,t))),o.mrc2=l}),a.length&&e.each(function(i){for(var o=Gc.select(this),s=0;s0?r:0}hi.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var a=hi.makeSelectedTextStyleFns(t);n=a.selectedTextColorFn}var i=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=Gc.select(this),u=i?hs.extractOption(s,t,"txt","texttemplate"):hs.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(i){var c=t._module.formatLabels,f=c?c(s,t,o):{},v={};ppt(v,t,s.i),u=hs.texttemplateString({data:[v,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var g=s.tp||t.textposition,p=Jue(s,t),x=n?n(s):s.tc||t.textfont.color;l.call(hi.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:p,color:x}).text(u).call(gk.convertToTspans,r).call(Kue,g,p,s.mrc)})}};hi.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=hi.makeSelectedTextStyleFns(t);e.each(function(n){var a=Gc.select(this),i=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=Jue(n,t);Tc.fill(a,i);var l=pk.traceIs(t,"bar-like");Kue(a,o,s,n.mrc2||n.mrc,l)})}};var Oue=.5;hi.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],a;for(a=1;a=l||S>=c&&S<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[S,L])}return e}hi.applyBackoff=tce;hi.makeTester=function(){var e=hs.ensureSingleById(Gc.select("body"),"svg","js-plotly-tester",function(r){r.attr(cpt.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=hs.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});hi.tester=e,hi.testref=t};hi.savedBBoxes={};var BB=0,Tpt=1e4;hi.bBox=function(e,t,r){r||(r=Nue(e));var n;if(r){if(n=hi.savedBBoxes[r],n)return hs.extendFlat({},n)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(r=Nue(a),r){var i=+a.getAttribute("x")||0,o=+a.getAttribute("y")||0,s=a.getAttribute("transform");if(!s){var l=hi.bBox(a,!1,r);return i&&(l.left+=i,l.right+=i),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+i+"~"+o+"~"+s,n=hi.savedBBoxes[r],n)return hs.extendFlat({},n)}}var u,c;t?u=e:(c=hi.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),Gc.select(u).attr("transform",null).call(gk.positionText,0,0);var f=u.getBoundingClientRect(),v=hi.testref.node().getBoundingClientRect();t||c.removeChild(u);var g={height:f.height,width:f.width,left:f.left-v.left,top:f.top-v.top,right:f.right-v.left,bottom:f.bottom-v.top};return BB>=Tpt&&(hi.savedBBoxes={},BB=0),r&&(hi.savedBBoxes[r]=g),BB++,hs.extendFlat({},g)};function Nue(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}hi.setClipUrl=function(e,t,r){e.attr("clip-path",UB(t,r))};function UB(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}hi.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",a=n.replace(t,function(i,o,s){return[o,s].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};hi.setTranslate=function(e,t,r){var n=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return t=t||0,r=r||0,o=o.replace(n,"").trim(),o+=fT(t,r),o=o.trim(),e[i]("transform",o),o};hi.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",a=n.replace(t,function(i,o,s){return[o,s].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};hi.setScale=function(e,t,r){var n=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return t=t||1,r=r||1,o=o.replace(n,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[i]("transform",o),o};var Apt=/\s*sc.*/;hi.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(Apt,"");a+=n,a=a.trim(),this.setAttribute("transform",a)})}};var Mpt=/translate\([^)]*\)\s*$/;hi.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,a=Gc.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(Mpt);t===1&&r===1?n=[]:n=[fT(o,s),"scale("+t+","+r+")",fT(-o,-s)],l&&n.push(l),a.attr("transform",n.join(""))}})};function VB(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}hi.getMarkerStandoff=VB;var cT=Math.atan2,Dx=Math.cos,Hb=Math.sin;function Uue(e,t){var r=t[0],n=t[1];return[r*Dx(e)-n*Hb(e),r*Hb(e)+n*Dx(e)]}var Vue,Gue,Hue,jue,OB,NB;function GB(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!_m(r)||hs.isArrayOrTypedArray(r))&&(r=0));var n,a,i=t.marker.angleref;if(i==="previous"||i==="north"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],a=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),a=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),v=t._geo.project([u+1e-5,c]),g=cT(v[1]-a,v[0]-n),p=cT(f[1]-a,f[0]-n),x;if(i==="north")x=r/180*Math.PI;else if(i==="previous"){var _=u/180*Math.PI,y=c/180*Math.PI,C=Vue/180*Math.PI,k=Gue/180*Math.PI,S=C-_,L=Dx(k)*Hb(S),w=Hb(k)*Dx(y)-Dx(k)*Hb(y)*Dx(S);x=-cT(L,w)-Math.PI,Vue=u,Gue=c}var A=Uue(g,[Dx(x),0]),T=Uue(p,[Hb(x),0]);r=cT(A[1]+T[1],A[0]+T[0])/Math.PI*180,i==="previous"&&!(NB===t.uid&&e.i===OB+1)&&(r=null)}if(i==="previous"&&!t._geo)if(NB===t.uid&&e.i===OB+1&&_m(n)&&_m(a)){var m=n-Hue,F=a-jue,E=t.line&&t.line.shape||"",I=E.slice(E.length-1);I==="h"&&(F=0),I==="v"&&(m=0),r+=cT(F,m)/Math.PI*180+90}else r=null}return Hue=n,jue=a,OB=e.i,NB=t.uid,r}hi.getMarkerAngle=GB});var qx=fe((Ddr,oce)=>{"use strict";var jb=xi(),Spt=aa(),Ept=Hs(),HB=bi(),zx=Xt(),nce=zx.strTranslate,mk=ea(),yk=ni(),Wb=as(),ice=Y1(),kpt=nc().OPPOSITE_SIDE,ace=/ [XY][0-9]* /,jB=1.6,WB=1.6;function Cpt(e,t,r){var n=e._fullLayout,a=r.propContainer,i=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,v=1,g=a.title,p=(g&&g.text?g.text:"").trim(),x=!1,_=g&&g.font?g.font:{},y=_.family,C=_.size,k=_.color,S=_.weight,L=_.style,w=_.variant,A=_.textcase,T=_.lineposition,m=_.shadow,F=r.subtitlePropName,E=!!F,I=r.subtitlePlaceholder,R=(a.title||{}).subtitle||{text:"",font:{}},B=(R.text||"").trim(),O=!1,V=1,j=R.font,q=j.family,U=j.size,J=j.color,ee=j.weight,ce=j.style,ye=j.variant,xe=j.textcase,ue=j.lineposition,K=j.shadow,_e;i==="title.text"?_e="titleText":i.indexOf("axis")!==-1?_e="axisTitleText":i.indexOf("colorbar")!==-1&&(_e="colorbarTitleText");var ne=e._context.edits[_e];function ae(et,qe){return et===void 0||qe===void 0?!1:et.replace(ace," % ")===qe.replace(ace," % ")}p===""?v=0:ae(p,o)&&(ne||(p=""),v=.2,x=!0),E&&(B===""?V=0:ae(B,I)&&(ne||(B=""),V=.2,O=!0)),r._meta?p=zx.templateString(p,r._meta):n._meta&&(p=zx.templateString(p,n._meta));var pe=p||B||ne,ie;f||(f=zx.ensureSingle(n._infolayer,"g","g-"+t),ie=n._hColorbarMoveTitle);var le=f.selectAll("text."+t).data(pe?[0]:[]);le.enter().append("text"),le.text(p).attr("class",t),le.exit().remove();var me=null,be=t+"-subtitle",De=B||ne;if(E&&(me=f.selectAll("text."+be).data(De?[0]:[]),me.enter().append("text"),me.text(B).attr("class",be),me.exit().remove()),!pe)return f;function Ge(et,qe){zx.syncOrAsync([ht,it],{title:et,subtitle:qe})}function ht(et){var qe=et.title,we=et.subtitle,Le;!c&&ie&&(c={}),c?(Le="",c.rotate&&(Le+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||ie)&&(Le+=nce(0,(c.offset||0)-(ie||0)))):Le=null,qe.attr("transform",Le);function Ke(nt){if(nt){var We=jb.select(nt.node().parentNode).select("."+be);if(!We.empty()){var mt=nt.node().getBBox();if(mt.height){var bt=mt.y+mt.height+jB*U;We.attr("y",bt)}}}}if(qe.style("opacity",v*yk.opacity(k)).call(mk.font,{color:yk.rgb(k),size:jb.round(C,2),family:y,weight:S,style:L,variant:w,textcase:A,shadow:m,lineposition:T}).attr(u).call(Wb.convertToTspans,e,Ke),we&&!we.empty()){var Te=f.select("."+t+"-math-group"),Ve=qe.node().getBBox(),$e=Te.node()?Te.node().getBBox():void 0,ot=$e?$e.y+$e.height+jB*U:Ve.y+Ve.height+WB*U,tt=zx.extendFlat({},u,{y:ot});we.attr("transform",Le),we.style("opacity",V*yk.opacity(J)).call(mk.font,{color:yk.rgb(J),size:jb.round(U,2),family:q,weight:ee,style:ce,variant:ye,textcase:xe,shadow:K,lineposition:ue}).attr(tt).call(Wb.convertToTspans,e)}return Ept.previousPromises(e)}function it(et){var qe=et.title,we=jb.select(qe.node().parentNode);if(l&&l.selection&&l.side&&p){we.attr("transform",null);var Le=kpt[l.side],Ke=l.side==="left"||l.side==="top"?-1:1,Te=Spt(l.pad)?l.pad:2,Ve=mk.bBox(we.node()),$e={t:0,b:0,l:0,r:0},ot=e._fullLayout._reservedMargin;for(var tt in ot)for(var nt in ot[tt]){var We=ot[tt][nt];$e[nt]=Math.max($e[nt],We)}var mt={left:$e.l,top:$e.t,right:n.width-$e.r,bottom:n.height-$e.b},bt=l.maxShift||Ke*(mt[l.side]-Ve[l.side]),Yt=0;if(bt<0)Yt=bt;else{var jt=l.offsetLeft||0,mr=l.offsetTop||0;Ve.left-=jt,Ve.right-=jt,Ve.top-=mr,Ve.bottom-=mr,l.selection.each(function(){var fr=mk.bBox(this);zx.bBoxIntersect(Ve,fr,Te)&&(Yt=Math.max(Yt,Ke*(fr[l.side]-Ve[Le])+Te))}),Yt=Math.min(bt,Yt),a._titleScoot=Math.abs(Yt)}if(Yt>0||bt<0){var or={left:[-Yt,0],right:[Yt,0],top:[0,-Yt],bottom:[0,Yt]}[l.side];we.attr("transform",nce(or[0],or[1]))}}}le.call(Ge,me);function Oe(et,qe){et.text(qe).on("mouseover.opacity",function(){jb.select(this).transition().duration(ice.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){jb.select(this).transition().duration(ice.HIDE_PLACEHOLDER).style("opacity",0)})}if(ne&&(p?le.on(".opacity",null):(Oe(le,o),x=!0),le.call(Wb.makeEditable,{gd:e}).on("edit",function(et){s!==void 0?HB.call("_guiRestyle",e,i,et,s):HB.call("_guiRelayout",e,i,et)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(et){this.text(et||" ").call(Wb.positionText,u.x,u.y)}),E)){if(E&&!p){var ze=le.node().getBBox(),ct=ze.y+ze.height+WB*U;me.attr("y",ct)}B?me.on(".opacity",null):(Oe(me,I),O=!0),me.call(Wb.makeEditable,{gd:e}).on("edit",function(et){HB.call("_guiRelayout",e,"title.subtitle.text",et)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(et){this.text(et||" ").call(Wb.positionText,me.attr("x"),me.attr("y"))})}return le.classed("js-placeholder",x),me&&!me.empty()&&me.classed("js-placeholder",O),f}oce.exports={draw:Cpt,SUBTITLE_PADDING_EM:WB,SUBTITLE_PADDING_MATHJAX_EM:jB}});var Hp=fe((Rdr,fce)=>{"use strict";var Lpt=xi(),Ppt=lb().utcFormat,zs=Xt(),Fpt=zs.numberFormat,Vp=aa(),bm=zs.cleanNumber,Dpt=zs.ms2DateTime,sce=zs.dateTime2ms,Gp=zs.ensureNumber,lce=zs.isArrayOrTypedArray,wm=Wa(),xk=wm.FP_SAFE,tp=wm.BADNUM,Rpt=wm.LOG_CLIP,Ipt=wm.ONEWEEK,_k=wm.ONEDAY,bk=wm.ONEHOUR,uce=wm.ONEMIN,cce=wm.ONESEC,wk=El(),Mk=rc(),Tk=Mk.HOUR_PATTERN,Ak=Mk.WEEKDAY_PATTERN;function hT(e){return Math.pow(10,e)}function YB(e){return e!=null}fce.exports=function(t,r){r=r||{};var n=t._id||"x",a=n.charAt(0);function i(S,L){if(S>0)return Math.log(S)/Math.LN10;if(S<=0&&L&&t.range&&t.range.length===2){var w=t.range[0],A=t.range[1];return .5*(w+A-2*Rpt*Math.abs(w-A))}else return tp}function o(S,L,w,A){if((A||{}).msUTC&&Vp(S))return+S;var T=sce(S,w||t.calendar);if(T===tp)if(Vp(S)){S=+S;var m=Math.floor(zs.mod(S+.05,1)*10),F=Math.round(S-m/10);T=sce(new Date(F))+m/10}else return tp;return T}function s(S,L,w){return Dpt(S,L,w||t.calendar)}function l(S){return t._categories[Math.round(S)]}function u(S){if(YB(S)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[S]!==void 0)return t._categoriesMap[S];t._categories.push(typeof S=="number"?String(S):S);var L=t._categories.length-1;return t._categoriesMap[S]=L,L}return tp}function c(S,L){for(var w=new Array(L),A=0;At.range[1]&&(w=!w);for(var A=w?-1:1,T=A*S,m=0,F=0;FI)m=F+1;else{m=T<(E+I)/2?F:F+1;break}}var R=t._B[m]||0;return isFinite(R)?p(S,t._m2,R):0},y=function(S){var L=t._rangebreaks.length;if(!L)return x(S,t._m,t._b);for(var w=0,A=0;At._rangebreaks[A].pmax&&(w=A+1);return x(S,t._m2,t._B[w])}}t.c2l=t.type==="log"?i:Gp,t.l2c=t.type==="log"?hT:Gp,t.l2p=_,t.p2l=y,t.c2p=t.type==="log"?function(S,L){return _(i(S,L))}:_,t.p2c=t.type==="log"?function(S){return hT(y(S))}:y,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=bm,t.c2d=t.c2r=t.l2d=t.l2r=Gp,t.d2p=t.r2p=function(S){return t.l2p(bm(S))},t.p2d=t.p2r=y,t.cleanPos=Gp):t.type==="log"?(t.d2r=t.d2l=function(S,L){return i(bm(S),L)},t.r2d=t.r2c=function(S){return hT(bm(S))},t.d2c=t.r2l=bm,t.c2d=t.l2r=Gp,t.c2r=i,t.l2d=hT,t.d2p=function(S,L){return t.l2p(t.d2r(S,L))},t.p2d=function(S){return hT(y(S))},t.r2p=function(S){return t.l2p(bm(S))},t.p2r=y,t.cleanPos=Gp):t.type==="date"?(t.d2r=t.r2d=zs.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(S,L,w){return t.l2p(o(S,0,w))},t.p2d=t.p2r=function(S,L,w){return s(y(S),L,w)},t.cleanPos=function(S){return zs.cleanDate(S,tp,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=v,t.r2c=function(S){var L=g(S);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=Gp,t.r2l=g,t.d2p=function(S){return t.l2p(t.r2c(S))},t.p2d=function(S){return l(y(S))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(S){return typeof S=="string"&&S!==""?S:Gp(S)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=v,t.r2c=function(S){var L=v(S);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=Gp,t.r2l=v,t.d2p=function(S){return t.l2p(t.r2c(S))},t.p2d=function(S){return l(y(S))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(S){return Array.isArray(S)||typeof S=="string"&&S!==""?S:Gp(S)},t.setupMultiCategory=function(S){var L=t._traceIndices,w,A,T=t._matchGroup;if(T&&t._categories.length===0){for(var m in T)if(m!==n){var F=r[wk.id2name(m)];L=L.concat(F._traceIndices)}}var E=[[0,{}],[0,{}]],I=[];for(w=0;wF[1]&&(A[m?0:1]=w,T[1]=F[1]),T[0]>=T[1])if(L!==void 0){var E=F[0]+1;w!==void 0&&(E=Math.min(E,F[1])),A[m?0:1]=t.l2r(E)}else w!==void 0&&(A[m?1:0]=t.l2r(F[1]-1))}},t.cleanRange=function(S,L){t._cleanRange(S,L),t.limitRange(S)},t._cleanRange=function(S,L){L||(L={}),S||(S="range");var w=zs.nestedProperty(t,S).get(),A,T;if(t.type==="date"?T=zs.dfltRange(t.calendar):a==="y"?T=Mk.DFLTRANGEY:t._name==="realaxis"?T=[0,1]:T=L.dfltRange||Mk.DFLTRANGEX,T=T.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(T[0]=0),!w||w.length!==2){zs.nestedProperty(t,S).set(T);return}var m=w[0]===null,F=w[1]===null;for(t.type==="date"&&!t.autorange&&(w[0]=zs.cleanDate(w[0],tp,t.calendar),w[1]=zs.cleanDate(w[1],tp,t.calendar)),A=0;A<2;A++)if(t.type==="date"){if(!zs.isDateTime(w[A],t.calendar)){t[S]=T;break}if(t.r2l(w[0])===t.r2l(w[1])){var E=zs.constrain(t.r2l(w[0]),zs.MIN_MS+1e3,zs.MAX_MS-1e3);w[0]=t.l2r(E-1e3),w[1]=t.l2r(E+1e3);break}}else{if(!Vp(w[A]))if(!(m||F)&&Vp(w[1-A]))w[A]=w[1-A]*(A?10:.1);else{t[S]=T;break}if(w[A]<-xk?w[A]=-xk:w[A]>xk&&(w[A]=xk),w[0]===w[1]){var I=Math.max(1,Math.abs(w[0]*1e-6));w[0]-=I,w[1]+=I}}},t.setScale=function(S){var L=r._size;if(t.overlaying){var w=wk.getFromId({_fullLayout:r},t.overlaying);t.domain=w.domain}var A=S&&t._r?"_r":"range",T=t.calendar;t.cleanRange(A);var m=t.r2l(t[A][0],T),F=t.r2l(t[A][1],T),E=a==="y";if(E?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(m-F),t._b=-t._m*F):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(F-m),t._b=-t._m*m),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var I,R;if(t._rangebreaks=t.locateBreaks(Math.min(m,F),Math.max(m,F)),t._rangebreaks.length){for(I=0;IF&&(B=!B),B&&t._rangebreaks.reverse();var O=B?-1:1;for(t._m2=O*t._length/(Math.abs(F-m)-t._lBreaks),t._B.push(-t._m2*(E?F:m)),I=0;IT&&(T+=7,mT&&(T+=24,m=A&&m=A&&S=K.min&&(ceK.max&&(K.max=ye),xe=!1)}xe&&F.push({min:ce,max:ye})}};for(w=0;w{"use strict";var hce=aa(),XB=Xt(),zpt=Wa().BADNUM,Sk=XB.isArrayOrTypedArray,qpt=XB.isDateTime,Bpt=XB.cleanNumber,dce=Math.round;pce.exports=function(t,r,n){var a=t,i=n.noMultiCategory;if(Sk(a)&&!a.length)return"-";if(!i&&Gpt(a))return"multicategory";if(i&&Array.isArray(a[0])){for(var o=[],s=0;si*2}function vce(e){return Math.max(1,(e-1)/1e3)}function Vpt(e,t){for(var r=e.length,n=vce(r),a=0,i=0,o={},s=0;sa*2}function Gpt(e){return Sk(e[0])&&Sk(e[1])}});var rp=fe((zdr,Tce)=>{"use strict";var Hpt=xi(),xce=aa(),Tm=Xt(),Ek=Wa().FP_SAFE,jpt=bi(),Wpt=ea(),_ce=El(),Ypt=_ce.getFromId,Xpt=_ce.isLinked;Tce.exports={applyAutorangeOptions:wce,getAutoRange:ZB,makePadFn:$B,doAutoRange:$pt,findExtremes:Kpt,concatExtremes:QB};function ZB(e,t){var r,n,a=[],i=e._fullLayout,o=$B(i,t,0),s=$B(i,t,1),l=QB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return Tm.simpleMap(t.range,t.r2l);var f=u[0].val,v=c[0].val;for(r=1;r0&&(F=k-o(w)-s(A),F>S?E/F>L&&(T=w,m=A,L=E/F):E/k>L&&(T={val:w.val,nopad:1},m={val:A.val,nopad:1},L=E/k));function I(j,q){return Math.max(j,s(q))}if(f===v){var R=f-1,B=f+1;if(y)if(f===0)a=[0,1];else{var O=(f>0?c:u).reduce(I,0),V=f/(1-Math.min(.5,O/k));a=f>0?[0,V]:[V,0]}else C?a=[Math.max(0,R),Math.max(1,B)]:a=[R,B]}else y?(T.val>=0&&(T={val:0,nopad:1}),m.val<=0&&(m={val:0,nopad:1})):C&&(T.val-L*o(T)<0&&(T={val:0,nopad:1}),m.val<=0&&(m={val:1,nopad:1})),L=(m.val-T.val-gce(t,w.val,A.val))/(k-o(T)-s(m)),a=[T.val-L*o(T),m.val+L*s(m)];return a=wce(a,t),t.limitRange&&t.limitRange(),p&&a.reverse(),Tm.simpleMap(a,t.l2r||Number)}function gce(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i0?r.ppadplus:r.ppadminus)||r.ppad||0),w=S((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),A=S(r.vpadplus||r.vpad),T=S(r.vpadminus||r.vpad);if(!u){if(C=1/0,k=-1/0,l)for(f=0;f0&&(C=v),v>k&&v-Ek&&(C=v),v>k&&v=E;f--)F(f);return{min:n,max:a,opts:r}}function KB(e,t,r,n){bce(e,t,r,n,Jpt)}function JB(e,t,r,n){bce(e,t,r,n,Qpt)}function bce(e,t,r,n,a){for(var i=n.tozero,o=n.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else a(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=i&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function yce(e){return xce(e)&&Math.abs(e)=t}function e1t(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&kk(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&kk(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function t1t(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&kk(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&kk(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function kk(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=l&&(i=l,r=l),o<=l&&(o=l,n=l)}}return r=e1t(r,t),n=t1t(n,t),[r,n]}});var Yi=fe((Bdr,Wce)=>{"use strict";var tv=xi(),Du=aa(),Xb=Hs(),vT=bi(),ga=Xt(),Zb=ga.strTranslate,Bx=as(),r1t=qx(),pT=ni(),M0=ea(),n1t=pf(),Ace=TB(),qdr=rc(),Xf=Wa(),i1t=Xf.ONEMAXYEAR,Pk=Xf.ONEAVGYEAR,Fk=Xf.ONEMINYEAR,a1t=Xf.ONEMAXQUARTER,nO=Xf.ONEAVGQUARTER,Dk=Xf.ONEMINQUARTER,o1t=Xf.ONEMAXMONTH,$b=Xf.ONEAVGMONTH,Rk=Xf.ONEMINMONTH,S0=Xf.ONEWEEK,Qh=Xf.ONEDAY,Am=Qh/2,Wp=Xf.ONEHOUR,gT=Xf.ONEMIN,Ik=Xf.ONESEC,s1t=Xf.ONEMILLI,l1t=Xf.ONEMICROSEC,Ox=Xf.MINUS_SIGN,qk=Xf.BADNUM,iO={K:"zeroline"},aO={K:"gridline",L:"path"},oO={K:"minor-gridline",L:"path"},Ice={K:"tick",L:"path"},Mce={K:"tick",L:"text"},Sce={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Bk=nc(),dT=Bk.MID_SHIFT,Nx=Bk.CAP_SHIFT,mT=Bk.LINE_SPACING,u1t=Bk.OPPOSITE_SIDE,zk=3,Rn=Wce.exports={};Rn.setConvert=Hp();var c1t=Yb(),Yp=El(),f1t=Yp.idSort,h1t=Yp.isLinked;Rn.id2name=Yp.id2name;Rn.name2id=Yp.name2id;Rn.cleanId=Yp.cleanId;Rn.list=Yp.list;Rn.listIds=Yp.listIds;Rn.getFromId=Yp.getFromId;Rn.getFromTrace=Yp.getFromTrace;var zce=rp();Rn.getAutoRange=zce.getAutoRange;Rn.findExtremes=zce.findExtremes;var d1t=1e-4;function cO(e){var t=(e[1]-e[0])*d1t;return[e[0]-t,e[1]+t]}function v1t(e,t,r){if(![r,e,t].every(Du)||r===0)return e;let n=Math.round((e-t)/r),a=t+n*r;return e!==a&&Math.abs(e-a)v+" domain")),l=l.concat(i||[]),c.length>o?(ga.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Rn.saveRangeInitial=function(e,t){for(var r=Rn.list(e,"",!0),n=!1,a=0;af*.3||u(n)||u(a))){var v=r.dtick/2;e+=e+vo){var s=Number(r.slice(1));i.exactYears>o&&s%12===0?e=Rn.tickIncrement(e,"M6","reverse")+Qh*1.5:i.exactMonths>o?e=Rn.tickIncrement(e,"M1","reverse")+Qh*15.5:e-=Am;var l=Rn.tickIncrement(e,r);if(l<=n)return l}return e}Rn.prepMinorTicks=function(e,t,r){var f,v;if(!((f=t.minor)!=null&&f.dtick)){delete e.dtick;var n=t.dtick&&Du(t._tmin),a;if(n){var i=Rn.tickIncrement(t._tmin,t.dtick,!0);a=[t._tmin,i*.99+t._tmin*.01]}else{var o=ga.simpleMap(t.range,t.r2l);a=[o[0],.8*o[0]+.2*o[1]]}if(e.range=ga.simpleMap(a,t.l2r),e._isMinor=!0,Rn.prepTicks(e,r),n){var s=Du(t.dtick),l=Du(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?eO(u,c)?u===2*S0&&c===2*Qh&&(e.dtick=S0):u===2*S0&&c===3*Qh?e.dtick=S0:u===S0&&!(t._input.minor||{}).nticks?e.dtick=Qh:Cce(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":eO(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?eO(u,c)||(e.dtick=Cce(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}((v=t.minor)==null?void 0:v._tick0Init)===void 0&&(e.tick0=t.tick0)};function eO(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function Cce(e,t){return Math.abs(e/t-1)<.001}Rn.prepTicks=function(e,t){var r=ga.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,a;n||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?ga.bigFont(e.tickfont.size||12):15,n=e._length/a):(a=e._id.charAt(0)==="y"?40:80,n=ga.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,Rn.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=n-1,o=n):(i=n,o=n);var s=e[i].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=Fk?u>=Fk&&u<=i1t?f=u:f=Pk:r===nO&&c>=Dk?u>=Dk&&u<=a1t?f=u:f=nO:c>=Rk?u>=Rk&&u<=o1t?f=u:f=$b:r===S0&&c>=S0?f=S0:c>=Qh?f=Qh:r===Am&&c>=Am?f=Am:r===Wp&&c>=Wp&&(f=Wp);var v;f>=u&&(f=u,v=!0);var g=a+f;if(t.rangebreaks&&f>0){for(var p=84,x=0,_=0;_S0&&(f=u)}(f>0||n===0)&&(e[n].periodX=a+f/2)}}Rn.calcTicks=function(t,r){for(var n=t.type,a=t.calendar,i=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||ga.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=ga.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(S?0:1);L--){var w=!L;L?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):S&&(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var A=L?t:ga.extendFlat({},t,S?t.minor:{minor:{}});if(w?Rn.prepMinorTicks(A,t,r):Rn.prepTicks(A,r),A.tickmode==="array"){L?(_=[],p=Lce(t,!w)):(y=[],x=Lce(t,!w));continue}if(A.tickmode==="sync"){_=[],p=_1t(t);continue}var T=cO(u),m=T[0],F=T[1],E=Du(A.dtick),I=n==="log"&&!(E||A.dtick.charAt(0)==="L"),R=Rn.tickFirst(A,r);if(L){if(t._tmin=R,R=F:O<=F;O=Rn.tickIncrement(O,q,c,a)){if(L&&V++,A.rangebreaks&&!c){if(O=v)break}if(_.length>g||O===B)break;B=O;var J={value:v1t(O,U,q)};L?(O===R&&(J.first=!0),I&&O!==(O|0)&&(J.simpleLabel=!0),i>1&&V%i&&(J.skipLabel=!0),_.push(J)):(J.minor=!0,y.push(J))}}if(!y||y.length<3)l=!1;else{var ee=(y[2].value-y[1].value)*(s?-1:1);j1t(ee,t.tickformat)||(l=!1,y=y.slice(1))}if(!l)C=_;else{var ce=_.concat(y);o&&_.length&&(ce=ce.slice(1)),ce=ce.sort(function(qe,we){return qe.value-we.value}).filter(function(qe,we,Le){return we===0||qe.value!==Le[we-1].value});var ye=ce.map(function(qe,we){return qe.minor===void 0&&!qe.skipLabel?we:null}).filter(function(qe){return qe!==null});ye.forEach(function(qe){l.map(function(we){var Le=qe+we;Le>=0&&Le-1;le--){if(_[le].drop){_.splice(le,1);continue}_[le].value=rO(_[le].value,t);var Ge=t.c2p(_[le].value);(me?De>Ge-be:Dev||Kev&&(Le.periodX=v),Kea&&pa&&_Pk)t/=Pk,n=a(10),e.dtick="M"+12*jp(t,n,Ck);else if(i>$b)t/=$b,e.dtick="M"+jp(t,1,Pce);else if(i>Qh){if(e.dtick=jp(t,Qh,e._hasDayOfWeekBreaks?[1,2,7,14]:b1t),!r){var o=Rn.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=ga.dateTick0(e.calendar,2):e.tick0=ga.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else i>Wp?e.dtick=jp(t,Wp,Pce):i>gT?e.dtick=jp(t,gT,Fce):i>Ik?e.dtick=jp(t,Ik,Fce):(n=a(10),e.dtick=jp(t,n,Ck))}else if(e.type==="log"){e.tick0=0;var l=ga.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=a(10),e.dtick="L"+jp(t,n,Ck)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):vO(e)?(e.tick0=0,n=1,e.dtick=jp(t,n,w1t)):(e.tick0=0,n=a(10),e.dtick=jp(t,n,Ck));if(e.dtick===0&&(e.dtick=1),!Du(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function Nce(e){var t=e.dtick;if(e._tickexponent=0,!Du(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),a=n.length;if(String(t).charAt(0)==="M")a>10||n.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=Qh&&a<=10||t>=Qh*15)e._tickround="d";else if(t>=gT&&a<=16||t>=Wp)e._tickround="M";else if(t>=Ik&&a<=19||t>=gT)e._tickround="S";else{var i=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,i)-20,e._tickround<0&&(e._tickround=4)}}else if(Du(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);Du(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(Kb(e.exponentformat)&&e.exponentformat!=="SI extended"&&!fO(l)||Kb(e.exponentformat)&&e.exponentformat==="SI extended"&&!hO(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Rn.tickIncrement=function(e,t,r,n){var a=r?-1:1;if(Du(t))return ga.increment(e,a*t);var i=t.charAt(0),o=a*Number(t.slice(1));if(i==="M")return ga.incrementMonth(e,o,n);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var s=t==="D2"?Oce:Bce,l=e+a*.01,u=ga.roundUp(ga.mod(l,1),s,r);return Math.floor(l)+Math.log(tv.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Rn.tickFirst=function(e,t){var r=e.r2l||Number,n=ga.simpleMap(e.range,r,void 0,void 0,t),a=n[1]=0&&S<=e._length?k:null};if(l&&ga.isArrayOrTypedArray(e.ticktext)){var p=ga.simpleMap(e.range,e.r2l),x=(Math.abs(p[1]-p[0])-(e._lBreaks||0))/1e4;for(v=0;v"+s;else{var u=xT(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function A1t(e,t,r,n,a){var i=e.dtick,o=t.x,s=e.tickformat,l=typeof i=="string"&&i.charAt(0);if(a==="never"&&(a=""),n&&l!=="L"&&(i="L3",l="L"),s||l==="L")t.text=yT(Math.pow(10,o),e,a,n);else if(Du(i)||l==="D"&&(e.minorloglabels==="complete"||ga.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(ga.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),v=+f[1],g=Math.abs(v),p=e.exponentformat;p==="power"||Kb(p)&&p!=="SI extended"&&fO(v)||Kb(p)&&p==="SI extended"&&hO(v)?(t.text=f[0],g>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),v!==0&&v!==1&&(t.text+=""+(v>0?"":Ox)+g+""),t.fontSize*=1.25):(p==="e"||p==="E")&&g>2?t.text=f[0]+p+(v>0?"+":Ox)+g:(t.text=yT(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,ga.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var x=String(t.text).charAt(0);(x==="0"||x==="1")&&(e._id.charAt(0)==="y"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function M1t(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function S1t(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=a[1]===void 0?"":String(a[1]),o=a[0]===void 0?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}function E1t(e,t,r,n,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=yT(t.x,e,a,n)}function k1t(e,t,r,n,a){if(e.thetaunit==="radians"&&!r){var i=t.x/180;if(i===0)t.text="0";else{var o=C1t(i);if(o[1]>=100)t.text=yT(ga.deg2rad(t.x),e,a,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),s&&(t.text=Ox+t.text)}}}else t.text=yT(t.x,e,a,n)}function C1t(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var a=n(e),i=e*a,o=Math.abs(r(i,a));return[Math.round(i/o),Math.round(a/o)]}var Vce=["f","p","n","\u03BC","m","","k","M","G","T"],L1t=["q","r","y","z","a",...Vce,"P","E","Z","Y","R","Q"],Kb=e=>["SI","SI extended","B"].includes(e);function fO(e){return e>14||e<-15}function hO(e){return e>32||e<-30}function P1t(e,t){return Kb(t)?!!(t==="SI extended"&&hO(e)||t!=="SI extended"&&fO(e)):!1}function yT(e,t,r,n){var a=e<0,i=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=Rn.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:Du(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Nce(c),i=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,Ox);o==="none"&&(s=0),e=Math.abs(e);let f=Math.pow(10,-i)/2;if(e"+v+"":o==="B"&&s===9?e+="B":Kb(o)&&(e+=o==="SI extended"?L1t[s/3+10]:Vce[s/3+5])}return a?Ox+e:e}Rn.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*$b}function n(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),v=c.indexOf(u.charAt(0));return f===v?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-v}else return typeof l=="number"?1:-1}function a(l,u,c){var f=c||function(p){return p},v=u[0],g=u[1];return(!v&&typeof v!="number"||f(v)<=f(l))&&(!g&&typeof g!="number"||f(g)>=f(l))}function i(l,u){var c=u[0]===null,f=u[1]===null,v=n(l,u[0])>=0,g=n(l,u[1])<=0;return(c||v)&&(f||g)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&a.unshift(a.splice(c,1).shift())}});var s={false:{left:0,right:0}};return ga.syncOrAsync(a.map(function(l){return function(){if(l){var u=Rn.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Rn.drawOne(e,u,r);return u._shiftPusher&&uO(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=ga.simpleMap(u._r,u.r2l),c}}}))};Rn.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},a=r.overlayingShiftedAx||[],i,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Rn.counterLetter(u),v=l._plots[t._mainSubplot],g=t.zerolinelayer==="above traces";if(!v)return;if(t._shiftPusher=t.autoshift||a.indexOf(t._id)!==-1||a.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var p=t.linewidth/2||0;t.ticks==="inside"&&(p+=t.ticklen),uO(t,p,n,!0),uO(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=H1t(t,n));var x=v[c+"axislayer"],_=t._mainLinePosition,y=_+=t._shift,C=t._mainMirrorPosition,k=t._vals=Rn.calcTicks(t),S=[t.mirror,y,C].join("_");for(i=0;i0?we.bottom-et:0,qe))));var Ve=0,$e=0;if(t._shiftPusher&&(Ve=Math.max(qe,we.height>0?ze==="l"?et-we.left:we.right-et:0),t.title.text!==l._dfltTitle[c]&&($e=(t._titleStandoff||0)+(t._titleScoot||0),ze==="l"&&($e+=Rce(t))),t._fullDepth=Math.max(Ve,$e)),t.automargin){Le={x:0,y:0,r:0,l:0,t:0,b:0};var ot=[0,1],tt=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(ze==="b"?Le[ze]=t._depth:(Le[ze]=t._depth=Math.max(we.width>0?et-we.top:0,qe),ot.reverse()),we.width>0){var nt=we.right-(t._offset+t._length);nt>0&&(Le.xr=1,Le.r=nt);var We=t._offset-we.left;We>0&&(Le.xl=0,Le.l=We)}}else if(ze==="l"?(t._depth=Math.max(we.height>0?et-we.left:0,qe),Le[ze]=t._depth-tt):(t._depth=Math.max(we.height>0?we.right-et:0,qe),Le[ze]=t._depth+tt,ot.reverse()),we.height>0){var mt=we.bottom-(t._offset+t._length);mt>0&&(Le.yb=0,Le.b=mt);var bt=t._offset-we.top;bt>0&&(Le.yt=1,Le.t=bt)}Le[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[ot[0]],t.title.text!==l._dfltTitle[c]&&(Le[ze]+=Rce(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(Ke={x:0,y:0,r:0,l:0,t:0,b:0},Ke[ct]=t.linewidth,t.mirror&&t.mirror!==!0&&(Ke[ct]+=qe),t.mirror===!0||t.mirror==="ticks"?Ke[f]=t._anchorAxis.domain[ot[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(Ke[f]=[t._counterDomainMin,t._counterDomainMax][ot[1]]))}Oe&&(Te=vT.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Dce(Le,t.automargin),Dce(Ke,t.automargin)),Xb.autoMargin(e,dO(t),Le),Xb.autoMargin(e,Hce(t),Ke),Xb.autoMargin(e,jce(t),Te)}),ga.syncOrAsync(ht)}};function Dce(e,t){if(e){var r=Object.keys(Sce).reduce(function(n,a){return t.indexOf(a)!==-1&&Sce[a].forEach(function(i){n[i]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function F1t(e,t){var r=[],n,a=function(i,o){var s=i.xbnd[o];s!==null&&r.push(ga.extendFlat({},i,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;n=n*f}return e._id.charAt(0)==="x"?function(v){return Zb(a+e._offset+e.l2p(sO(v))+r,i+n)}:function(v){return Zb(i+n,a+e._offset+e.l2p(sO(v))+r)}};function sO(e){return e.periodX!==void 0?e.periodX:e.x}function z1t(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(p){return t.indexOf(p)!==-1},a=n("top"),i=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),u=r!=="boundaries"&&(s||i||a||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,v=zk,g=e.tickfont?e.tickfont.size:12;return(s||a)&&(f+=g*Nx,v+=(e.linewidth||0)/2),(i||o)&&(f+=(e.linewidth||0)/2,v+=zk),l&&c==="top"&&(v-=g*(1-Nx)),(i||a)&&(f=-f),(c==="bottom"||c==="right")&&(v=-v),[u?f:0,l?v:0]}Rn.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=n.len!==void 0?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+i*r:"M"+(t+s*r)+",0h"+i*r};Rn.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=e.tickson||"",i=function(R){return n.indexOf(R)!==-1},o=i("top"),s=i("left"),l=i("right"),u=i("bottom"),c=a!=="boundaries"&&(u||s||o||l),f=i("inside"),v=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&a!=="boundaries",g=0,p=0,x=v?e.ticklen:0;if(f?x*=-1:c&&(x=0),v&&(g+=x,r)){var _=ga.deg2rad(r);g=x*Math.cos(_)+1,p=x*Math.sin(_)}e.showticklabels&&(v||e.showline)&&(g+=.2*e.tickfont.size),g+=(e.linewidth||1)/2*(f?-1:1);var y={labelStandoff:g,labelShift:p},C,k,S,L,w=0,A=e.side,T=e._id.charAt(0),m=e.tickangle,F;if(T==="x")F=!f&&A==="bottom"||f&&A==="top",L=F?1:-1,f&&(L*=-1),C=p*L,k=t+g*L,S=F?1:-.2,Math.abs(m)===90&&(f?S+=dT:m===-90&&A==="bottom"?S=Nx:m===90&&A==="top"?S=dT:S=.5,w=dT/2*(m/90)),y.xFn=function(R){return R.dx+C+w*R.fontSize},y.yFn=function(R){return R.dy+k+R.fontSize*S},y.anchorFn=function(R,B){if(c){if(s)return"end";if(l)return"start"}return!Du(B)||B===0||B===180?"middle":B*L<0!==f?"end":"start"},y.heightFn=function(R,B,O){return B<-60||B>60?-.5*O:e.side==="top"!==f?-O:0};else if(T==="y"){if(F=!f&&A==="left"||f&&A==="right",L=F?1:-1,f&&(L*=-1),C=g,k=p*L,S=0,!f&&Math.abs(m)===90&&(m===-90&&A==="left"||m===90&&A==="right"?S=Nx:S=.5),f){var E=Du(m)?+m:0;if(E!==0){var I=ga.deg2rad(E);w=Math.abs(Math.sin(I))*Nx*L,S=0}}y.xFn=function(R){return R.dx+t-(C+R.fontSize*S)*L+w*R.fontSize},y.yFn=function(R){return R.dy+k+R.fontSize*dT},y.anchorFn=function(R,B){return Du(B)&&Math.abs(B)===90?"middle":F?"end":"start"},y.heightFn=function(R,B,O){return e.side==="right"&&(B*=-1),B<-30?-O:B<30?-.5*O:0}}return y};function Ok(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Rn.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=r.layer.selectAll("path."+n).data(a,Ok);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return pT.stroke(tv.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return M0.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Nk(t,[Ice]),i.attr("transform",r.transFn)};Rn.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var n=t._id+"grid",a=t.minor&&t.minor.showgrid,i=a?r.vals.filter(function(y){return y.minor}):[],o=t.showgrid?r.vals.filter(function(y){return!y.minor}):[],s=r.counterAxis;if(s&&Rn.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;p--){var x=p?v:g;if(x){var _=x.selectAll("path."+n).data(p?o:i,Ok);_.exit().remove(),_.enter().append("path").classed(n,1).classed("crisp",r.crisp!==!1),_.attr("transform",r.transFn).attr("d",r.path).each(function(y){return pT.stroke(tv.select(this),y.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return M0.dashStyle(y.minor?t.minor.griddash:t.griddash,y.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(y){return(y.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&_.attr("d",r.path)}}Nk(t,[aO,oO])}};Rn.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=Rn.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return f1t(o.id,s.id)})}),i.attr("transform",r.transFn).attr("d",r.path).call(pT.stroke,t.zerolinecolor||pT.defaultLine).style("stroke-width",M0.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Nk(t,[iO])};Rn.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,a=t._id,i=t.zerolinelayer==="above traces",o=r.cls||a+"tick",s=r.vals.filter(function(U){return U.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],Ok),v=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(U){var J=tv.select(this),ee=e._promises.length;J.call(Bx.positionText,l.xFn(U),l.yFn(U)).call(M0.font,{family:U.font,size:U.fontSize,color:U.fontColor,weight:U.fontWeight,style:U.fontStyle,variant:U.fontVariant,textcase:U.fontTextcase,lineposition:U.fontLineposition,shadow:U.fontShadow}).text(U.text).call(Bx.convertToTspans,e),e._promises[ee]?v.push(e._promises.pop().then(function(){g(J,u)})):g(J,u)}),Nk(t,[Mce]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(U){tv.select(this).select("text").call(Bx.positionText,l.xFn(U),l.yFn(U))});function g(U,J){U.each(function(ee){var ce=tv.select(this),ye=ce.select(".text-math-group"),xe=l.anchorFn(ee,J),ue=r.transFn.call(ce.node(),ee)+(Du(J)&&+J!=0?" rotate("+J+","+l.xFn(ee)+","+(l.yFn(ee)-ee.fontSize/2)+")":""),K=Bx.lineCount(ce),_e=mT*ee.fontSize,ne=l.heightFn(ee,Du(J)?+J:0,(K-1)*_e);if(ne&&(ue+=Zb(0,ne)),ye.empty()){var ae=ce.select("text");ae.attr({transform:ue,"text-anchor":xe}),ae.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var pe=M0.bBox(ye.node()).width,ie=pe*{end:-.5,start:.5}[xe];ye.attr("transform",ue+Zb(ie,0))}})}t._adjustTickLabelsOverflow=function(){var U=t.ticklabeloverflow;if(!(!U||U==="allow")){var J=U.indexOf("hide")!==-1,ee=t._id.charAt(0)==="x",ce=0,ye=ee?e._fullLayout.width:e._fullLayout.height;if(U.indexOf("domain")!==-1){var xe=ga.simpleMap(t.range,t.r2l);ce=t.l2p(xe[0])+t._offset,ye=t.l2p(xe[1])+t._offset}var ue=Math.min(ce,ye),K=Math.max(ce,ye),_e=t.side,ne=1/0,ae=-1/0;f.each(function(me){var be=tv.select(this),De=be.select(".text-math-group");if(De.empty()){var Ge=M0.bBox(be.node()),ht=0;ee?(Ge.right>K||Ge.leftK||Ge.top+(t.tickangle?0:me.fontSize/4)t["_visibleLabelMin_"+xe._id]?be.style("display","none"):K.K==="tick"&&!ue&&be.node().style.display!=="none"&&be.style("display",null)})})})})},g(f,c+1?c:u);function p(){return v.length&&Promise.all(v)}var x=null;function _(){if(g(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){x=t.autotickangles[0];var U=0,J=[],ee,ce=1;f.each(function(Le){U=Math.max(U,Le.fontSize);var Ke=t.l2p(Le.x),Te=lO(this),Ve=M0.bBox(Te.node());ce=Math.max(ce,Bx.lineCount(Te)),J.push({top:0,bottom:10,height:10,left:Ke-Ve.width/2,right:Ke+Ve.width/2+2,width:Ve.width+2})});var ye=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,xe=s.length,ue=Math.abs((s[xe-1].x-s[0].x)*t._m)/(xe-1),K=ye?ue/2:ue,_e=ye?t.ticklen:U*1.25*ce,ne=Math.sqrt(Math.pow(K,2)+Math.pow(_e,2)),ae=K/ne,pe=t.autotickangles.map(function(Le){return Le*Math.PI/180}),ie=pe.find(function(Le){return Math.abs(Math.cos(Le))<=ae});ie===void 0&&(ie=pe.reduce(function(Le,Ke){return Math.abs(Math.cos(Le))V*O&&(I=O,m[T]=F[T]=R[T])}var j=Math.abs(I-E);j-L>0?(j-=L,L*=1+L/j):L=0,t._id.charAt(0)!=="y"&&(L=-L),m[A]=k.p2r(k.r2p(F[A])+w*L),k.autorange==="min"||k.autorange==="max reversed"?(m[0]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0):(k.autorange==="max"||k.autorange==="min reversed")&&(m[1]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[k._name+".range"]=m}var q=ga.syncOrAsync(y);return q&&q.then&&e._promises.push(q),q};function q1t(e,t,r){var n=t._id+"divider",a=r.vals,i=r.layer.selectAll("path."+n).data(a,Ok);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(pT.stroke,t.dividercolor).style("stroke-width",M0.crispRound(e,t.dividerwidth,1)+"px"),i.attr("transform",r.transFn).attr("d",r.path)}Rn.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),a=t.side,i;if(t.anchor!=="free"?i=t._anchorAxis:n==="x"?i={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n==="y"&&(i={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),a==="top"||a==="left")return i._offset;if(a==="bottom"||a==="right")return i._offset+i._length};function Rce(e){var t=e.title.font.size,r=(e.title.text.match(Bx.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Nx+r*mT):r?t*(r+1)*mT:t}function B1t(e,t){var r=e._fullLayout,n=t._id,a=n.charAt(0),i=t.title.font.size,o,s=(t.title.text.match(Bx.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+i*Nx:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+i*(dT+s*mT));else{var l=xT(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*i;l&&(u=.5*i,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(a==="x"?o+=t.side==="top"?i*(t.showticklabels?1:0):i*(t.showticklabels?1.5:.5):o+=t.side==="right"?i*(t.showticklabels?1:.5):i*(t.showticklabels?.5:0))}var c=Rn.getPxPosition(e,t),f,v,g;a==="x"?(v=t._offset+t._length/2,g=t.side==="top"?c-o:c+o):(g=t._offset+t._length/2,v=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var p;if(t.type!=="multicategory"){var x=t._selections[t._id+"tick"];if(p={selection:x,side:t.side},x&&x.node()&&x.node().parentNode){var _=M0.getTranslate(x.node().parentNode);p.offsetLeft=_.x,p.offsetTop=_.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return t._titleStandoff=o,r1t.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[a],avoid:p,transform:f,attributes:{x:v,y:g,"text-anchor":"middle"}})}Rn.shouldShowZeroLine=function(e,t,r){var n=ga.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===qk)&&(Gce(t,0)||!O1t(e,t,r,n)||N1t(e,t))};Rn.clipEnds=function(e,t){return t.filter(function(r){return Gce(e,r.x)})};function Gce(e,t){var r=e.l2p(t);return r>1&&r1)for(a=1;a=a.min&&e=l1t:/%L/.test(t)?e>=s1t:/%[SX]/.test(t)?e>=Ik:/%M/.test(t)?e>=gT:/%[HI]/.test(t)?e>=Wp:/%p/.test(t)?e>=Am:/%[Aadejuwx]/.test(t)?e>=Qh:/%[UVW]/.test(t)?e>=S0:/%[Bbm]/.test(t)?e>=Rk:/%[q]/.test(t)?e>=Dk:/%[Yy]/.test(t)?e>=Fk:!0}});var pO=fe((Odr,Yce)=>{"use strict";Yce.exports=function(t,r,n){var a,i;if(n){var o=r==="reversed"||r==="min reversed"||r==="max reversed";a=n[o?1:0],i=n[o?0:1]}var s=t("autorangeoptions.minallowed",i===null?a:void 0),l=t("autorangeoptions.maxallowed",a===null?i:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var gO=fe((Ndr,Xce)=>{"use strict";var W1t=pO();Xce.exports=function(t,r,n,a){var i=r._template||{},o=r.type||i.type||"-";n("minallowed"),n("maxallowed");var s=n("range");if(!s){var l;!a.noInsiderange&&o!=="log"&&(l=n("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n("range",l)))}var u=r.getAutorangeDflt(s,a),c=n("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,a),c=n("autorange",u)),c&&(W1t(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var $ce=fe((Udr,Zce)=>{var Y1t={left:0,top:0};Zce.exports=X1t;function X1t(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,a=e.clientY||0,i=Z1t(t);return r[0]=n-i.left,r[1]=a-i.top,r}function Z1t(e){return e===window||e===document||e===document.body?Y1t:e.getBoundingClientRect()}});var Uk=fe((Vdr,Kce)=>{"use strict";var $1t=Kq();function K1t(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}Kce.exports=$1t&&K1t()});var Qce=fe((Gdr,Jce)=>{"use strict";Jce.exports=function(t,r,n,a,i){var o=(t-n)/(a-n),s=o+r/(a-n),l=(o+s)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?l:i==="right"||i==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var rfe=fe((Hdr,tfe)=>{"use strict";var efe=Xt(),J1t=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];tfe.exports=function(t,r,n,a){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=efe.constrain(Math.floor(t*3),0,2),a==="bottom"?r=0:a==="middle"?r=1:a==="top"?r=2:r=efe.constrain(Math.floor(r*3),0,2),J1t[r][t]}});var ife=fe((jdr,nfe)=>{"use strict";var Q1t=Rb(),egt=jE(),tgt=X4().getGraphDiv,rgt=L4(),mO=nfe.exports={};mO.wrapped=function(e,t,r){var i;e=tgt(e),e._fullLayout&&egt.clear(e._fullLayout._uid+rgt.HOVERID);let n=e._hoverdata;mO.raw(e,t,r)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(i=e._fullLayout)!=null&&i.hoveranywhere&&(t!=null&&t.target)&&!n&&e.emit("plotly_unhover",{event:t,points:[]}))};mO.raw=function(t,r){var n=t._fullLayout,a=t._hoverdata;return r||(r={}),r.target&&!t._dragged&&Q1t.triggerHandler(t,"plotly_beforehover",r)===!1?!1:(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&a&&t.emit("plotly_unhover",{event:r,points:a}),!0)}});var ed=fe((Wdr,lfe)=>{"use strict";var ngt=$ce(),yO=Qq(),igt=Uk(),agt=Xt().removeElement,ogt=rc(),Ux=lfe.exports={};Ux.align=Qce();Ux.getCursor=rfe();var ofe=ife();Ux.unhover=ofe.wrapped;Ux.unhoverRaw=ofe.raw;Ux.init=function(t){var r=t.gd,n=1,a=r._context.doubleClickDelay,i=t.element,o,s,l,u,c,f,v,g;r._mouseDownTime||(r._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=_,igt?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=_,i.addEventListener("touchstart",_,{passive:!1})):i.ontouchstart=_;function p(k,S,L){return Math.abs(k)a&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var S;f.target===v?S=f:(S={target:v,srcElement:v,toElement:v},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var w=f[L];!S[L]&&typeof w!="function"&&(S[L]=w)})),t.clickFn&&t.clickFn(n,S),g||v.dispatchEvent(new MouseEvent("click",k))}r._dragging=!1,r._dragged=!1}};function sfe(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}Ux.coverSlip=sfe;function afe(e){return ngt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var np=fe((Ydr,ufe)=>{"use strict";ufe.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}});var hfe=fe((Xdr,ffe)=>{"use strict";var xO=np(),_T="data-savedcursor",cfe="!!";ffe.exports=function(t,r){var n=t.attr(_T);if(r){if(!n){for(var a=(t.attr("class")||"").split(" "),i=0;i{"use strict";var _O=Ds(),sgt=tc();dfe.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:sgt.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:_O({editType:"legend"}),grouptitlefont:_O({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:_O({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var wT=fe(bT=>{"use strict";bT.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};bT.isVertical=function(t){return t.orientation!=="h"};bT.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};bT.getId=function(t){return t._id||"legend"}});var TO=fe((Kdr,vfe)=>{"use strict";var Vk=bi(),E0=Xt(),lgt=Mo(),ugt=Ho(),cgt=bO(),fgt=Sb(),wO=wT();function hgt(e,t,r,n,a){var i=t[e]||{},o=lgt.newContainer(r,e);function s(U,J){return E0.coerce(i,o,cgt,U,J)}var l=E0.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(U,J){var ee=c._input,ce=c;return E0.coerce(ee,ce,ugt,U,J)},v=r.font||{},g=E0.coerceFont(s,"grouptitlefont",v,{overrideDflt:{size:Math.round(v.size*1.1)}}),p=0,x=!1,_="normal",y=(r.shapes||[]).filter(function(U){return U.showlegend});function C(U){return Vk.traceIs(U,"pie-like")&&U._length!=null&&(Array.isArray(U.legend)||Array.isArray(U.showlegend))}n.filter(C).forEach(function(U){U.visible&&p++;for(var J=0;JU.legend.length)for(var ce=U.legend.length;ce(e==="legend"?1:0));if(w===!1&&(r[e]=void 0),!(w===!1&&!i.uirevision)&&(s("uirevision",r.uirevision),w!==!1)){s("borderwidth");var A=s("orientation"),T=s("yref"),m=s("xref"),F=A==="h",E=T==="paper",I=m==="paper",R,B,O,V="left";F?(R=0,Vk.getComponentMethod("rangeslider","isVisible")(t.xaxis)?E?(B=1.1,O="bottom"):(B=1,O="top"):E?(B=-.1,O="top"):(B=0,O="bottom")):(B=1,O="auto",I?R=1.02:(R=1,V="right")),E0.coerce(i,o,{x:{valType:"number",editType:"legend",min:I?-2:0,max:I?3:1,dflt:R}},"x"),E0.coerce(i,o,{y:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:B}},"y"),s("traceorder",_),wO.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick"),s("groupclick"),s("xanchor",V),s("yanchor",O),s("maxheight"),s("valign"),E0.noneOrAll(i,o,["x","y"]);var j=s("title.text");if(j){s("title.side",F?"left":"top");var q=E0.extendFlat({},l,{size:E0.bigFont(l.size)});E0.coerceFont(s,"title.font",q);let U=a>1;s("titleclick",U?"toggle":!1),s("titledoubleclick",U?"toggleothers":!1)}}}vfe.exports=function(t,r,n){var a,i=n.slice(),o=r.shapes;if(o)for(a=0;a{"use strict";var Mm=bi(),AO=Xt(),dgt=AO.pushUnique,vgt=wT(),pfe=!0;MO.handleItemClick=function(t,r,n,a){var i=r._fullLayout;if(r._dragged||r._editing)return;var o=t.data()[0][0];if(o.groupTitle&&o.noClick)return;var s=n.groupclick;a==="toggle"&&n.itemdoubleclick==="toggleothers"&&pfe&&r.data&&r._context.showTips&&(AO.notifier(AO._(r,"Double-click on legend to isolate one trace"),"long",r),pfe=!1);var l=s==="togglegroup",u=i.hiddenlabels?i.hiddenlabels.slice():[],c=r._fullData;let f=(i.shapes||[]).filter(ht=>ht.showlegend||ht.legendgroup);var v=c.concat(f),g=o.trace;g._isShape&&(g=i.shapes[g.index]);var p=g.legendgroup,x,_,y,C,k,S,L={},w=[],A=[],T=[];function m(ht,it){var Oe=w.indexOf(ht),ze=L.visible;return ze||(ze=L.visible=[]),w.indexOf(ht)===-1&&(w.push(ht),Oe=w.length-1),ze[Oe]=it,Oe}var F=(i.shapes||[]).map(function(ht){return ht._input}),E=!1;function I(ht,it){F[ht].visible=it,E=!0}function R(ht,it){if(!(o.groupTitle&&!l)){var Oe=ht._isShape,ze=ht.index;ze===void 0&&(ze=ht._index);var ct=ht.visible===!1?!1:it;Oe?I(ze,ct):m(ze,ct)}}var B=g.legend;if(!g._isShape&&Mm.traceIs(g,"pie-like")){var O=o.label,V=u.indexOf(O);if(a==="toggle")V===-1?u.push(O):u.splice(V,1);else if(a==="toggleothers"){var j=V!==-1,q=[];for(x=0;xy.showlegend||y.legendgroup),l=i.concat(s);function u(y){return(y.legend||"legend")===o}var c,f;if(n==="toggle")c=!l.some(function(C){return u(C)&&C.visible===!0}),f=!1;else{let y=l.some(function(C){return!u(C)&&C.visible===!0&&C.showlegend!==!1});c=!0,f=!y}let v={visible:[]},g=[],p=(a.shapes||[]).map(function(y){return y._input});for(var x=!1,_=0;_{"use strict";gfe.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var xfe=fe((e0r,yfe)=>{"use strict";var{isArrayOrTypedArray:kO}=Gf(),mfe=bi(),CO=wT();yfe.exports=function(t,r,n){var a=r._inHover,i=CO.isGrouped(r),o=CO.isReversed(r),s={},l=[],u=!1,c={},f=0,v=0,g,p;function x(J,ee,ce){if(r.visible!==!1&&!(n&&J!==r._id))if(ee===""||!CO.isGrouped(r)){var ye="~~i"+f;l.push(ye),s[ye]=[ce],f++}else l.indexOf(ee)===-1?(l.push(ee),u=!0,s[ee]=[ce]):s[ee].push(ce)}for(g=0;gR&&(E=R)}m[g][0]._groupMinRank=E,m[g][0]._preGroupSort=g}var B=function(J,ee){return J[0]._groupMinRank-ee[0]._groupMinRank||J[0]._preGroupSort-ee[0]._preGroupSort},O=function(J,ee){var ce=kO(J.trace.legendrank)?J.trace.legendrank[J.i]:J.trace.legendrank,ye=kO(ee.trace.legendrank)?ee.trace.legendrank[ee.i]:ee.trace.legendrank;return ce-ye||J._preSort-ee._preSort};for(m.forEach(function(J,ee){J[0]._preGroupSort=ee}),m.sort(B),g=0;g{"use strict";var Gk=Xt();function _fe(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Vx.formatPiePercent=function(t,r){var n=_fe((t*100).toPrecision(3));return Gk.numSeparate(n,r)+"%"};Vx.formatPieValue=function(t,r){var n=_fe(t.toPrecision(10));return Gk.numSeparate(n,r)};Vx.getFirstFilled=function(t,r){if(Gk.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var pgt=ea(),ggt=ni();bfe.exports=function(t,r,n,a){var i=n.marker.pattern;i&&i.shape?pgt.pointStyle(t,n,a,r):ggt.fill(t,r.color)}});var Jb=fe((n0r,Mfe)=>{"use strict";var Tfe=ni(),Afe=Sm().castOption,mgt=wfe();Mfe.exports=function(t,r,n,a){var i=n.marker.line,o=Afe(i.color,r.pts)||Tfe.defaultLine,s=Afe(i.width,r.pts)||0;t.call(mgt,r,n,a).style("stroke-width",s).call(Tfe.stroke,o)}});var DO=fe((i0r,Pfe)=>{"use strict";var td=xi(),LO=bi(),Sh=Xt(),Sfe=Sh.strTranslate,k0=ea(),rv=ni(),PO=Wf().extractOpts,Hk=Is(),ygt=Jb(),xgt=Sm().castOption,_gt=EO(),Efe=12,kfe=5,Gx=2,bgt=10,Qb=5;Pfe.exports=function(t,r,n){var a=r._fullLayout;n||(n=a.legend);var i=n.itemsizing==="constant",o=n.itemwidth,s=(o+_gt.itemGap*2)/2,l=Sfe(s,0),u=function(A,T,m,F){var E;if(A+1)E=A;else if(T&&T.width>0)E=T.width;else return 0;return i?F:Math.min(E,m)};t.each(function(A){var T=td.select(this),m=Sh.ensureSingle(T,"g","layers");m.style("opacity",A[0].trace.opacity);var F=n.indentation,E=n.valign,I=A[0].lineHeight,R=A[0].height;if(E==="middle"&&F===0||!I||!R)m.attr("transform",null);else{var B={top:1,bottom:-1}[E],O=B*(.5*(I-R+3))||0,V=n.indentation;m.attr("transform",Sfe(V,O))}var j=m.selectAll("g.legendfill").data([A]);j.enter().append("g").classed("legendfill",!0);var q=m.selectAll("g.legendlines").data([A]);q.enter().append("g").classed("legendlines",!0);var U=m.selectAll("g.legendsymbols").data([A]);U.enter().append("g").classed("legendsymbols",!0),U.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(w).each(v).each(p).each(g).each(_).each(S).each(k).each(c).each(f).each(y).each(C);function c(A){var T=Cfe(A),m=T.showFill,F=T.showLine,E=T.showGradientLine,I=T.showGradientFill,R=T.anyFill,B=T.anyLine,O=A[0],V=O.trace,j,q,U=PO(V),J=U.colorscale,ee=U.reversescale,ce=function(ae){if(ae.size())if(m)k0.fillGroupStyle(ae,r,!0);else{var pe="legendfill-"+V.uid;k0.gradient(ae,r,pe,FO(ee),J,"fill")}},ye=function(ae){if(ae.size()){var pe="legendline-"+V.uid;k0.lineGroupStyle(ae),k0.gradient(ae,r,pe,FO(ee),J,"stroke")}},xe=Hk.hasMarkers(V)||!R?"M5,0":B?"M5,-2":"M5,-3",ue=td.select(this),K=ue.select(".legendfill").selectAll("path").data(m||I?[A]:[]);if(K.enter().append("path").classed("js-fill",!0),K.exit().remove(),K.attr("d",xe+"h"+o+"v6h-"+o+"z").call(ce),F||E){var _e=u(void 0,V.line,bgt,kfe);q=Sh.minExtend(V,{line:{width:_e}}),j=[Sh.minExtend(O,{trace:q})]}var ne=ue.select(".legendlines").selectAll("path").data(F||E?[j]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",xe+(E?"l"+o+",0.0001":"h"+o)).call(F?k0.lineGroupStyle:ye)}function f(A){var T=Cfe(A),m=T.anyFill,F=T.anyLine,E=T.showLine,I=T.showMarker,R=A[0],B=R.trace,O=!I&&!F&&!m&&Hk.hasText(B),V,j;function q(_e,ne,ae,pe){var ie=Sh.nestedProperty(B,_e).get(),le=Sh.isArrayOrTypedArray(ie)&&ne?ne(ie):ie;if(i&&le&&pe!==void 0&&(le=pe),ae){if(leae[1])return ae[1]}return le}function U(_e){return R._distinct&&R.index&&_e[R.index]?_e[R.index]:_e[0]}if(I||O||E){var J={},ee={};if(I){J.mc=q("marker.color",U);var ce=B.type==="scattermap";J.mx=ce?"circle":q("marker.symbol",U),J.mo=q("marker.opacity",Sh.mean,[.2,1]),J.mlc=q("marker.line.color",U),J.mlw=q("marker.line.width",Sh.mean,[0,5],Gx),J.mld=q("marker.line.dash",U),ee.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var ye=q("marker.size",Sh.mean,[2,16],Efe);J.ms=ye,ee.marker.size=ye}E&&(ee.line={width:q("line.width",U,[0,10],kfe)}),O&&(J.tx="Aa",J.tp=q("textposition",U),J.ts=10,J.tc=q("textfont.color",U),J.tf=q("textfont.family",U),J.tw=q("textfont.weight",U),J.ty=q("textfont.style",U),J.tv=q("textfont.variant",U),J.tC=q("textfont.textcase",U),J.tE=q("textfont.lineposition",U),J.tS=q("textfont.shadow",U)),V=[Sh.minExtend(R,J)],j=Sh.minExtend(B,ee),j.selectedpoints=null,j.texttemplate=null}var xe=td.select(this).select("g.legendpoints"),ue=xe.selectAll("path.scatterpts").data(I?V:[]);ue.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),ue.exit().remove(),ue.call(k0.pointStyle,j,r),I&&(V[0].mrc=3);var K=xe.selectAll("g.pointtext").data(O?V:[]);K.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),K.exit().remove(),K.selectAll("text").call(k0.textPointStyle,j,r)}function v(A){var T=A[0].trace,m=T.type==="waterfall";if(A[0]._distinct&&m){var F=A[0].trace[A[0].dir].marker;return A[0].mc=F.color,A[0].mlw=F.line.width,A[0].mlc=F.line.color,x(A,this,"waterfall")}var E=[];T.visible&&m&&(E=A[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=td.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(E);I.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),I.exit().remove(),I.each(function(R){var B=td.select(this),O=T[R[0]].marker,V=u(void 0,O.line,Qb,Gx);B.attr("d",R[1]).style("stroke-width",V+"px").call(rv.fill,O.color),V&&B.call(rv.stroke,O.line.color)})}function g(A){x(A,this)}function p(A){x(A,this,"funnel")}function x(A,T,m){var F=A[0].trace,E=F.marker||{},I=E.line||{},R=E.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",B=m?F.visible&&F.type===m:LO.traceIs(F,"bar"),O=td.select(T).select("g.legendpoints").selectAll("path.legend"+m).data(B?[A]:[]);O.enter().append("path").classed("legend"+m,!0).attr("d",R).attr("transform",l),O.exit().remove(),O.each(function(V){var j=td.select(this),q=V[0],U=u(q.mlw,E.line,Qb,Gx);j.style("stroke-width",U+"px");var J=q.mcc;if(!n._inHover&&"mc"in q){var ee=PO(E),ce=ee.mid;ce===void 0&&(ce=(ee.max+ee.min)/2),J=k0.tryColorscale(E,"")(ce)}var ye=J||q.mc||E.color,xe=E.pattern,ue=k0.getPatternAttr,K=xe&&(ue(xe.shape,0,"")||ue(xe.path,0,""));if(K){var _e=ue(xe.bgcolor,0,null),ne=ue(xe.fgcolor,0,null),ae=xe.fgopacity,pe=Lfe(xe.size,8,10),ie=Lfe(xe.solidity,.5,1),le="legend-"+F.uid;j.call(k0.pattern,"legend",r,le,K,pe,ie,J,xe.fillmode,_e,ne,ae)}else j.call(rv.fill,ye);U&&rv.stroke(j,q.mlc||I.color)})}function _(A){var T=A[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendbox").data(T.visible&&LO.traceIs(T,"box-violin")?[A]:[]);m.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),m.exit().remove(),m.each(function(){var F=td.select(this);if((T.boxpoints==="all"||T.points==="all")&&rv.opacity(T.fillcolor)===0&&rv.opacity((T.line||{}).color)===0){var E=Sh.minExtend(T,{marker:{size:i?Efe:Sh.constrain(T.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});m.call(k0.pointStyle,E,r)}else{var I=u(void 0,T.line,Qb,Gx);F.style("stroke-width",I+"px").call(rv.fill,T.fillcolor),I&&rv.stroke(F,T.line.color)}})}function y(A){var T=A[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(T.visible&&T.type==="candlestick"?[A,A]:[]);m.enter().append("path").classed("legendcandle",!0).attr("d",function(F,E){return E?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),m.exit().remove(),m.each(function(F,E){var I=td.select(this),R=T[E?"increasing":"decreasing"],B=u(void 0,R.line,Qb,Gx);I.style("stroke-width",B+"px").call(rv.fill,R.fillcolor),B&&rv.stroke(I,R.line.color)})}function C(A){var T=A[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(T.visible&&T.type==="ohlc"?[A,A]:[]);m.enter().append("path").classed("legendohlc",!0).attr("d",function(F,E){return E?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),m.exit().remove(),m.each(function(F,E){var I=td.select(this),R=T[E?"increasing":"decreasing"],B=u(void 0,R.line,Qb,Gx);I.style("fill","none").call(k0.dashLine,R.line.dash,B),B&&rv.stroke(I,R.line.color)})}function k(A){L(A,this,"pie")}function S(A){L(A,this,"funnelarea")}function L(A,T,m){var F=A[0],E=F.trace,I=m?E.visible&&E.type===m:LO.traceIs(E,m),R=td.select(T).select("g.legendpoints").selectAll("path.legend"+m).data(I?[A]:[]);if(R.enter().append("path").classed("legend"+m,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),R.exit().remove(),R.size()){var B=E.marker||{},O=u(xgt(B.line.width,F.pts),B.line,Qb,Gx),V="pieLike",j=Sh.minExtend(E,{marker:{line:{width:O}}},V),q=Sh.minExtend(F,{trace:j},V);ygt(R,q,j,r)}}function w(A){var T=A[0].trace,m,F=[];if(T.visible)switch(T.type){case"histogram2d":case"heatmap":F=[["M-15,-2V4H15V-2Z"]],m=!0;break;case"choropleth":case"choroplethmap":F=[["M-6,-6V6H6V-6Z"]],m=!0;break;case"densitymap":F=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],m="radial";break;case"cone":F=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],m=!1;break;case"streamtube":F=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],m=!1;break;case"surface":F=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],m=!0;break;case"mesh3d":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],m=!1;break;case"volume":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],m=!0;break;case"isosurface":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],m=!1;break}var E=td.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(F);E.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(I,R){var B=td.select(this),O=PO(T),V=O.colorscale,j=O.reversescale,q=function(ce){if(ce.size()){var ye="legendfill-"+T.uid;k0.gradient(ce,r,ye,FO(j,m==="radial"),V,"fill")}},U;if(V){if(!m){var ee=V.length;U=R===0?V[j?ee-1:0][1]:R===1?V[j?0:ee-1][1]:V[Math.floor((ee-1)/2)][1]}}else{var J=T.vertexcolor||T.facecolor||T.color;U=Sh.isArrayOrTypedArray(J)?J[R]||J[0]:J}B.attr("d",I[0]),U?B.call(rv.fill,U):B.call(q)})}};function FO(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function Cfe(e){var t=e[0].trace,r=t.contours,n=Hk.hasLines(t)||t.visible&&t.type==="quiver",a=Hk.hasMarkers(t),i=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:n=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?i=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:a,showLine:n,showFill:i,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:i||s}}function Lfe(e,t,r){return e&&Sh.isArrayOrTypedArray(e)?t:e>r?r:e}});var qO=fe((a0r,Nfe)=>{"use strict";var Ed=xi(),Ru=Xt(),IO=Hs(),Hx=bi(),Yk=Rb(),RO=ed(),Iu=ea(),TT=ni(),jx=as(),Ffe=SO().handleItemClick,Dfe=SO().handleTitleClick,ic=EO(),zO=nc(),Bfe=zO.LINE_SPACING,t3=zO.FROM_TL,Rfe=zO.FROM_BR,Ife=xfe(),wgt=DO(),r3=wT(),e3=1,Tgt=/^legend[0-9]*$/;Nfe.exports=function(t,r){if(r)zfe(t,r);else{var n=t._fullLayout,a=n._legends,i=n._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=Ed.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(Tgt)&&a.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var p=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll("."+a).remove(),n._topdefs.select("#"+i).remove(),IO.autoMargin(e,a);var x=Ru.ensureSingle(o,"g",a,function(T){s||T.attr("pointer-events","all")}),_=Ru.ensureSingleById(n._topdefs,"clipPath",i,function(T){T.append("rect")}),y=Ru.ensureSingle(x,"rect","bg",function(T){T.attr("shape-rendering","crispEdges")});y.call(TT.stroke,r.bordercolor).call(TT.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var C=Ru.ensureSingle(x,"g","scrollbox"),k=r.title;r._titleWidth=0,r._titleHeight=0;var S;k.text?(S=Ru.ensureSingle(C,"text",a+"titletext"),S.attr("text-anchor","start").call(Iu.font,k.font).text(k.text),Wk(S,C,e,r,e3),!s&&(r.titleclick||r.titledoubleclick)&&Egt(C,e,r,a)):(C.selectAll("."+a+"titletext").remove(),C.selectAll("."+a+"titletoggle").remove());var L=Ru.ensureSingle(x,"rect","scrollbar",function(T){T.attr(ic.scrollBarEnterAttrs).call(TT.fill,ic.scrollBarColor)}),w=C.selectAll("g.groups").data(l);w.enter().append("g").attr("class","groups"),w.exit().remove();var A=w.selectAll("g.traces").data(Ru.identity);A.enter().append("g").attr("class","traces"),A.exit().remove(),A.style("opacity",function(T){let m=T[0],F=m.trace;if(m.groupTitle){let E=F.legendgroup,I=(n.shapes||[]).filter(function(B){return B.showlegend});return e._fullData.concat(I).some(function(B){return B.legendgroup===E&&(B.legend||"legend")===a&&B.visible===!0})?1:.5}return Hx.traceIs(F,"pie-like")?p.indexOf(T[0].label)!==-1?.5:1:F.visible==="legendonly"?.5:1}).each(function(){Ed.select(this).call(Mgt,e,r)}).call(wgt,e,r).each(function(T){s||T[0].groupTitle&&r.groupclick==="toggleitem"||Ed.select(this).call(Sgt,e,a)}),Ru.syncOrAsync([IO.previousPromises,function(){return Lgt(e,w,A,r,C)},function(){var T=n._size,m=r.borderwidth,F=r.xref==="paper",E=r.yref==="paper";if(k.text){let De=(n.shapes||[]).filter(function(ht){return ht.showlegend}),Ge=e._fullData.concat(De).some(function(ht){let it=ht.legend||"legend";var Oe=Array.isArray(it)?it.includes(a):it===a;return Oe&&ht.visible===!0});S.style("opacity",Ge?1:.5)}if(!s){var I,R;F?I=T.l+T.w*r.x-t3[Xk(r)]*r._width:I=n.width*r.x-t3[Xk(r)]*r._width,E?R=T.t+T.h*(1-r.y)-t3[Zk(r)]*r._effHeight:R=n.height*(1-r.y)-t3[Zk(r)]*r._effHeight;var B=Pgt(e,a,I,R);if(B)return;if(n.margin.autoexpand){var O=I,V=R;I=F?Ru.constrain(I,0,n.width-r._width):O,R=E?Ru.constrain(R,0,n.height-r._effHeight):V,I!==O&&Ru.log("Constrain "+a+".x to make legend fit inside graph"),R!==V&&Ru.log("Constrain "+a+".y to make legend fit inside graph")}Iu.setTranslate(x,I,R)}if(L.on(".drag",null),x.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var j=r._effHeight;s&&(j=r._height),y.attr({width:r._width-m,height:j-m,x:m/2,y:m/2}),Iu.setTranslate(C,0,0),_.select("rect").attr({width:r._width-2*m,height:j-2*m,x:m,y:m}),Iu.setClipUrl(C,i,e),Iu.setRect(L,0,0,0,0),delete r._scrollY}else{var q=Math.max(ic.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),U=r._effHeight-q-2*ic.scrollBarMargin,J=r._height-r._effHeight,ee=U/J,ce=Math.min(r._scrollY||0,J);y.attr({width:r._width-2*m+ic.scrollBarWidth+ic.scrollBarMargin,height:r._effHeight-m,x:m/2,y:m/2}),_.select("rect").attr({width:r._width-2*m+ic.scrollBarWidth+ic.scrollBarMargin,height:r._effHeight-2*m,x:m,y:m+ce}),Iu.setClipUrl(C,i,e),pe(ce,q,ee),x.on("wheel",function(){ce=Ru.constrain(r._scrollY+Ed.event.deltaY/J*U,0,J),pe(ce,q,ee),ce!==0&&ce!==J&&Ed.event.preventDefault()});var ye,xe,ue,K=function(De,Ge,ht){var it=(ht-Ge)/ee+De;return Ru.constrain(it,0,J)},_e=function(De,Ge,ht){var it=(Ge-ht)/ee+De;return Ru.constrain(it,0,J)},ne=Ed.behavior.drag().on("dragstart",function(){var De=Ed.event.sourceEvent;De.type==="touchstart"?ye=De.changedTouches[0].clientY:ye=De.clientY,ue=ce}).on("drag",function(){var De=Ed.event.sourceEvent;De.buttons===2||De.ctrlKey||(De.type==="touchmove"?xe=De.changedTouches[0].clientY:xe=De.clientY,ce=K(ue,ye,xe),pe(ce,q,ee))});L.call(ne);var ae=Ed.behavior.drag().on("dragstart",function(){var De=Ed.event.sourceEvent;De.type==="touchstart"&&(ye=De.changedTouches[0].clientY,ue=ce)}).on("drag",function(){var De=Ed.event.sourceEvent;De.type==="touchmove"&&(xe=De.changedTouches[0].clientY,ce=_e(ue,ye,xe),pe(ce,q,ee))});C.call(ae)}function pe(De,Ge,ht){r._scrollY=e._fullLayout[a]._scrollY=De,Iu.setTranslate(C,0,-De),Iu.setRect(L,r._width,ic.scrollBarMargin+De*ht,ic.scrollBarWidth,Ge),_.select("rect").attr("y",m+De)}if(e._context.edits.legendPosition){var ie,le,me,be;x.classed("cursor-move",!0),RO.init({element:x.node(),gd:e,prepFn:function(De){if(De.target!==L.node()){var Ge=Iu.getTranslate(x);me=Ge.x,be=Ge.y}},moveFn:function(De,Ge){if(me!==void 0&&be!==void 0){var ht=me+De,it=be+Ge;Iu.setTranslate(x,ht,it),ie=RO.align(ht,r._width,T.l,T.l+T.w,r.xanchor),le=RO.align(it+r._height,-r._height,T.t+T.h,T.t,r.yanchor)}},doneFn:function(){if(ie!==void 0&&le!==void 0){var De={};De[a+".x"]=ie,De[a+".y"]=le,Hx.call("_guiRelayout",e,De)}},clickFn:function(De,Ge){var ht=o.selectAll("g.traces").filter(function(){var it=this.getBoundingClientRect();return Ge.clientX>=it.left&&Ge.clientX<=it.right&&Ge.clientY>=it.top&&Ge.clientY<=it.bottom});ht.size()>0&&Ofe(e,r,ht,De,Ge)}})}}],e)}}function jk(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return i==="fraction"?t._maxWidth*o:r+(o||a)}function Ofe(e,t,r,n,a){var i=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:a,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:i};o._group&&(u.group=o._group),Hx.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=Yk.triggerHandler(e,"plotly_legendclick",u);if(n===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&Ffe(r,e,t,s)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=Yk.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&Ffe(r,e,t,l)}}function Mgt(e,t,r){var n=r3.getId(r),a=e.data()[0][0],i=a.trace,o=Hx.traceIs(i,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;a.groupTitle?(u=a.groupTitle.text,c=a.groupTitle.font):(c=r.font,r.entries?u=a.text:(u=o?a.label:i.name,i._meta&&(u=Ru.templateString(u,i._meta))));var f=Ru.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(Iu.font,c).text(s?qfe(u,l):u);var v=r.indentation+r.itemwidth+ic.itemGap*2;jx.positionText(f,v,0),s?f.call(jx.makeEditable,{gd:t,text:u}).call(Wk,e,t,r).on("edit",function(g){this.text(qfe(g,l)).call(Wk,e,t,r);var p={};return p.name=g,a.trace._isShape?Hx.call("_guiRelayout",t,"shapes["+i.index+"].name",p.name):Hx.call("_guiRestyle",t,p,i.index)}):Wk(f,e,t,r)}function qfe(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function Sgt(e,t,r){var n=t._context.doubleClickDelay,a,i=1,o=Ru.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(TT.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){a=new Date().getTime(),a-t._legendMouseDownTimen&&(i=Math.max(i-1,1)),Ofe(t,s,e,i,Ed.event)}}))}function Egt(e,t,r,n){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(n):c===n)&&Hx.traceIs(u,"pie-like")}))return;let i=t._context.doubleClickDelay;var o,s=1;let l=Ru.ensureSingle(e,"rect",n+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(TT.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTimei&&(s=Math.max(s-1,1));let u={event:Ed.event,legendId:n,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(Yk.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Dfe(t,r,r.titleclick)},i)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,Yk.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Dfe(t,r,r.titledoubleclick))}))}function Wk(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),jx.convertToTspans(e,r,function(){kgt(t,r,n,a)})}function kgt(e,t,r,n){var a=e.data()[0][0],i=a&&a.trace.showlegend;if(Array.isArray(i)&&(i=i[a.i]!==!1),!r._inHover&&a&&!i){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=r3.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===e3?c=r.title.font:a.groupTitle?c=a.groupTitle.font:c=r.font;var f=c.size*Bfe,v,g;if(s){var p=Iu.bBox(s);v=p.height,g=p.width,n===e3?Iu.setTranslate(o,u,u+v*.75):Iu.setTranslate(o,0,v*.25)}else{var x="."+l+(n===e3?"title":"")+"text",_=e.select(x),y=jx.lineCount(_),C=_.node();if(v=f*y,g=C?Iu.bBox(C).width:0,n===e3)r.title.side==="left"&&(g+=ic.itemGap*2),jx.positionText(_,u+ic.titlePad,u+f);else{var k=ic.itemGap*2+r.indentation+r.itemwidth;a.groupTitle&&(k=ic.itemGap,g-=r.indentation+r.itemwidth),jx.positionText(_,k,-f*((y-1)/2-.3))}}n===e3?(r._titleWidth=g,r._titleHeight=v):(a.lineHeight=f,a.height=Math.max(v,16)+3,a.width=g)}function Cgt(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(t=e._titleWidth),n.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function Lgt(e,t,r,n,a){var i=e._fullLayout,o=r3.getId(n);n||(n=i[o]);var s=i._size,l=r3.isVertical(n),u=r3.isGrouped(n),c=n.entrywidthmode==="fraction",f=n.borderwidth,v=2*f,g=ic.itemGap,p=n.indentation+n.itemwidth+g*2,x=2*(f+g),_=Zk(n),y=n.y<0||n.y===0&&_==="top",C=n.y>1||n.y===1&&_==="bottom",k=n.tracegroupgap,S={};let{orientation:L,yref:w}=n,{maxheight:A}=n,T=y||C||L!=="v"||w!=="paper";A||(A=T?.5:1);let m=T?i.height:s.h;n._maxHeight=Math.max(A>1?A:A*m,30);var F=0;n._width=0,n._height=0;var E=Cgt(n);if(l)r.each(function(De){var Ge=De[0].height;Iu.setTranslate(this,f+E[0],f+E[1]+n._height+Ge/2+g),n._height+=Ge,n._width=Math.max(n._width,De[0].width)}),F=p+n._width,n._width+=g+p+v,n._height+=x,u&&(t.each(function(De,Ge){Iu.setTranslate(this,0,Ge*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var I=Xk(n),R=n.x<0||n.x===0&&I==="right",B=n.x>1||n.x===1&&I==="left",O=C||y,V=i.width/2;n._maxWidth=Math.max(R?O&&I==="left"?s.l+s.w:V:B?O&&I==="right"?s.r+s.w:V:s.w,2*p);var j=0,q=0;r.each(function(De){var Ge=jk(De,n,p);j=Math.max(j,Ge),q+=Ge}),F=null;var U=0;if(u){var J=0,ee=0,ce=0;t.each(function(){var De=0,Ge=0;Ed.select(this).selectAll("g.traces").each(function(it){var Oe=jk(it,n,p),ze=it[0].height;Iu.setTranslate(this,E[0],E[1]+f+g+ze/2+Ge),Ge+=ze,De=Math.max(De,Oe),S[it[0].trace.legendgroup]=De});var ht=De+g;ee>0&&ht+f+ee>n._maxWidth?(U=Math.max(U,ee),ee=0,ce+=J+k,J=Ge):J=Math.max(J,Ge),Iu.setTranslate(this,ee,ce),ee+=ht}),n._width=Math.max(U,ee)+f,n._height=ce+J+x}else{var ye=r.size(),xe=q+v+(ye-1)*g=n._maxWidth&&(U=Math.max(U,ne),K=0,_e+=ue,n._height+=ue,ue=0),Iu.setTranslate(this,E[0]+f+K,E[1]+f+_e+Ge/2+g),ne=K+ht+g,K+=it,ue=Math.max(ue,Ge)}),xe?(n._width=K+v,n._height=ue+x):(n._width=Math.max(U,ne)+v,n._height+=ue+x)}}n._width=Math.ceil(Math.max(n._width+E[0],n._titleWidth+2*(f+ic.titlePad))),n._height=Math.ceil(Math.max(n._height+E[1],n._titleHeight+2*(f+ic.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var ae=e._context.edits,pe=ae.legendText||ae.legendPosition;r.each(function(De){var Ge=Ed.select(this).select("."+o+"toggle"),ht=De[0].height,it=De[0].trace.legendgroup,Oe=jk(De,n,p);u&&it!==""&&(Oe=S[it]);var ze=pe?p:F||Oe;!l&&!c&&(ze+=g/2),Iu.setRect(Ge,0,-ht/2,ze,ht)});var ie=a.select("."+o+"titletext");ie.node()&&Agt(ie,n,f);var le=a.select("."+o+"titletoggle");if(le.size()&&ie.node()){var me=ie.attr("x")||0,be=ic.titlePad;Iu.setRect(le,me-be,f,n._titleWidth+2*be,n._titleHeight+2*be)}}function Pgt(e,t,r,n){var a=e._fullLayout,i=a[t],o=Xk(i),s=Zk(i),l=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=i.y<.5?"b":"t",f=i.x<.5?"l":"r",v={r:a.width-r,l:r+i._width,b:a.height-n,t:n+i._effHeight};if(l&&u)return IO.autoMargin(e,t,{x:i.x,y:i.y,l:i._width*t3[o],r:i._width*Rfe[o],b:i._effHeight*Rfe[s],t:i._effHeight*t3[s]});l?e._fullLayout._reservedMargin[t][c]=v[c]:u||i.orientation==="v"?e._fullLayout._reservedMargin[t][f]=v[f]:e._fullLayout._reservedMargin[t][c]=v[c]}function Xk(e){return Ru.isRightAnchor(e)?"right":Ru.isCenterAnchor(e)?"center":"left"}function Zk(e){return Ru.isBottomAnchor(e)?"bottom":Ru.isMiddleAnchor(e)?"middle":"top"}});var UO=fe(NO=>{"use strict";var Wx=xi(),eg=aa(),tu=Xt(),Fgt=tu.pushUnique,BO=tu.strTranslate,Dgt=tu.strRotate,Rgt=Rb(),nv=as(),Igt=hfe(),Xp=ea(),ac=ni(),$k=ed(),Zp=Yi(),zgt=rc().zindexSeparator,i3=bi(),C0=Sd(),Yx=L4(),qgt=TO(),Bgt=qO(),Xfe=Yx.YANGLE,OO=Math.PI*Xfe/180,Ogt=1/Math.sin(OO),Ngt=Math.cos(OO),Ugt=Math.sin(OO),yl=Yx.HOVERARROWSIZE,go=Yx.HOVERTEXTPAD,Ufe={box:!0,ohlc:!0,violin:!0,candlestick:!0},Vgt={scatter:!0,scattergl:!0,splom:!0};function Vfe(e,t){return e.distance-t.distance}NO.hover=function(t,r,n,a){t=tu.getGraphDiv(t);var i=r.target;tu.throttle(t._fullLayout._uid+Yx.HOVERID,Yx.HOVERMINTIME,function(){Ggt(t,r,n,a,i)})};NO.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var a=r.gd,i=Qfe(a),o=ehe(a),s=t.map(function(_){var y=_._x0||_.x0||_.x||0,C=_._x1||_.x1||_.x||0,k=_._y0||_.y0||_.y||0,S=_._y1||_.y1||_.y||0,L=_.eventData;if(L){var w=Math.min(y,C),A=Math.max(y,C),T=Math.min(k,S),m=Math.max(k,S),F=_.trace;if(i3.traceIs(F,"gl3d")){var E=a._fullLayout[F.scene]._scene.container,I=E.offsetLeft,R=E.offsetTop;w+=I,A+=I,T+=R,m+=R}L.bbox={x0:w+o,x1:A+o,y0:T+i,y1:m+i},L.xPixel=(y+C)/2,L.yPixel=(k+S)/2,r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:_.color||ac.defaultLine,x0:_.x0||_.x||0,x1:_.x1||_.x||0,y0:_.y0||_.y||0,y1:_.y1||_.y||0,xLabel:_.xLabel,yLabel:_.yLabel,zLabel:_.zLabel,text:_.text,name:_.name,idealAlign:_.idealAlign,borderColor:_.borderColor,fontFamily:_.fontFamily,fontSize:_.fontSize,fontColor:_.fontColor,fontWeight:_.fontWeight,fontStyle:_.fontStyle,fontVariant:_.fontVariant,nameLength:_.nameLength,textAlign:_.textAlign,trace:_.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:_.hovertemplate||!1,hovertemplateLabels:_.hovertemplateLabels||!1,eventData:L}}),l=!1,u=$fe(s,{gd:a,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||ac.background,container:Wx.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,v=0,g=0;c.sort(function(_,y){return _.y0-y.y0}).each(function(_,y){var C=_.y0-_.by/2;C-fA[0]._length||be<0||be>T[0]._length)return $k.unhoverRaw(e,t)}if(t.pointerX=me+A[0]._offset,t.pointerY=be+T[0]._offset,"xval"in t?V=C0.flat(i,t.xval):V=C0.p2c(A,me),"yval"in t?j=C0.flat(i,t.yval):j=C0.p2c(T,be),e._hoverPointerX=t.pointerX,e._hoverPointerY=t.pointerY,!eg(V[0])||!eg(j[0]))return tu.warn("Fx.hover failed",t,e),$k.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=V,e._hoverYVals=j,e._hoverXAxes=A,e._hoverYAxes=T);var ht=1/0;function it(Ut,_r){for(U=0;Une&&(B.splice(0,ne),ht=B[0].distance),f&&R!==0&&B.length===0){_e.distance=R,_e.index=!1;var Jn=ee._module.hoverPoints(_e,ue,K,"closest",{hoverLayer:s._hoverlayer});if(Jn&&(Jn=Jn.filter(function(Xi){return Xi.spikeDistance<=R})),Jn&&Jn.length){var Ii,Vi=Jn.filter(function(Xi){return Xi.xa.showspikes&&Xi.xa.spikesnap!=="hovered data"});if(Vi.length){var ra=Vi[0];eg(ra.x0)&&eg(ra.y0)&&(Ii=ze(ra),(!ae.vLinePoint||ae.vLinePoint.spikeDistance>Ii.spikeDistance)&&(ae.vLinePoint=Ii))}var ha=Jn.filter(function(Xi){return Xi.ya.showspikes&&Xi.ya.spikesnap!=="hovered data"});if(ha.length){var va=ha[0];eg(va.x0)&&eg(va.y0)&&(Ii=ze(va),(!ae.hLinePoint||ae.hLinePoint.spikeDistance>Ii.spikeDistance)&&(ae.hLinePoint=Ii))}}}}}it();function Oe(Ut,_r,rn){for(var Jr=null,qn=1/0,ri,Jn=0;JnUt.trace.index===We.trace.index):B=[We];var mt=B.length,bt=Yfe("x",We,s),Yt=Yfe("y",We,s);it(bt,Yt);var jt=[],mr={},or=0,fr=function(Ut){var _r=Ufe[Ut.trace.type]?Zfe(Ut):Ut.trace.index;if(!mr[_r])or++,mr[_r]=or,jt.push(Ut);else{var rn=mr[_r]-1,Jr=jt[rn];rn>0&&Math.abs(Ut.distance)mt-1;Ot--)fr(B[Ot]);B=jt,we()}var cr=e._hoverdata,Ct=[],wt=Qfe(e),Tt=ehe(e);for(let Ut of B){var Mt=C0.makeEventData(Ut,Ut.trace,Ut.cd);if(Ut.hovertemplate!==!1){var Lt=!1;Ut.cd[Ut.index]&&Ut.cd[Ut.index].ht&&(Lt=Ut.cd[Ut.index].ht),Ut.hovertemplate=Lt||Ut.trace.hovertemplate||!1}if(Ut.xa&&Ut.ya){var ft=Ut.x0+Ut.xa._offset,kt=Ut.x1+Ut.xa._offset,rr=Ut.y0+Ut.ya._offset,pr=Ut.y1+Ut.ya._offset,Kr=Math.min(ft,kt),Nr=Math.max(ft,kt),dn=Math.min(rr,pr),xr=Math.max(rr,pr);Mt.bbox={x0:Kr+Tt,x1:Nr+Tt,y0:dn+wt,y1:xr+wt},Mt.xPixel=(ft+kt)/2,Mt.yPixel=(rr+pr)/2}Ut.eventData=[Mt],Ct.push(Mt)}e._hoverdata=Ct;var Fr=v==="y"&&(O.length>1||B.length>1)||v==="closest"&&pe&&B.length>1,Zr=ac.combine(s.plot_bgcolor||ac.background,s.paper_bgcolor),Cn=$fe(B,{gd:e,hovermode:v,rotateLabels:Fr,bgColor:Zr,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Dt=Cn.hoverLabels;if(C0.isUnifiedHover(v)||(jgt(Dt,Fr,s,Cn.commonLabelBoundingBox),Jfe(Dt,Fr,s._invScaleX,s._invScaleY)),a&&a.tagName){var At=i3.getComponentMethod("annotations","hasClickToShow")(e,Ct);Igt(Wx.select(a),At?"pointer":"")}var Vt=Xgt(e,t,cr);if(!a||n||!Vt&&!s.hoveranywhere)return;cr&&Vt&&e.emit("plotly_unhover",{event:t,points:cr}),Qt(e._hoverdata);function Qt(Ut){e.emit("plotly_hover",{event:t,points:Ut,xaxes:A,yaxes:T,xvals:C0.c2dApply(A,V),yvals:C0.c2dApply(T,j),xPixel:t.pointerX,yPixel:t.pointerY})}}function Zfe(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var Hgt=/([\s\S]*)<\/extra>/;function $fe(e,t){var r=t.gd,n=r._fullLayout,a=t.hovermode,i=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||Yx.HOVERFONT,f=t.fontSize||Yx.HOVERFONTSIZE,v=t.fontWeight||n.font.weight,g=t.fontStyle||n.font.style,p=t.fontVariant||n.font.variant,x=t.fontTextcase||n.font.textcase,_=t.fontLineposition||n.font.lineposition,y=t.fontShadow||n.font.shadow,C=e[0],k=C.xa,S=C.ya,L=a.charAt(0),w=L+"Label",A=C[w];if(A===void 0&&k.type==="multicategory")for(var T=0;Tn.width-Ct&&(wt=n.width-Ct),nt.attr("d","M"+(fr-wt)+",0L"+(fr-wt+yl)+","+cr+yl+"H"+Ct+"v"+cr+(go*2+or.height)+"H"+-Ct+"V"+cr+yl+"H"+(fr-wt-yl)+"Z"),fr=wt,U.minX=fr-Ct,U.maxX=fr+Ct,k.side==="top"?(U.minY=Ot-(go*2+or.height),U.maxY=Ot-go):(U.minY=Ot+go,U.maxY=Ot+(go*2+or.height))}else{var Tt,Mt,Lt;S.side==="right"?(Tt="start",Mt=1,Lt="",fr=k._offset+k._length):(Tt="end",Mt=-1,Lt="-",fr=k._offset),Ot=S._offset+(C.y0+C.y1)/2,We.attr("text-anchor",Tt),nt.attr("d","M0,0L"+Lt+yl+","+yl+"V"+(go+or.height/2)+"h"+Lt+(go*2+or.width)+"V-"+(go+or.height/2)+"H"+Lt+yl+"V-"+yl+"Z"),U.minY=Ot-(go+or.height/2),U.maxY=Ot+(go+or.height/2),S.side==="right"?(U.minX=fr+yl,U.maxX=fr+yl+(go*2+or.width)):(U.minX=fr-yl-(go*2+or.width),U.maxX=fr-yl);var ft=or.height/2,kt=F-or.top-ft,rr="clip"+n._uid+"commonlabel"+S._id,pr;if(frnt.hoverinfo!=="none");if(tt.length===0)return[];var J=n.hoverlabel,ee=J.font,ce=tt[0],ye=((a==="x unified"?ce.xa:ce.ya).unifiedhovertitle||{}).text,xe=ye?tu.hovertemplateString({data:a==="x unified"?[{xa:ce.xa,x:ce.xVal}]:[{ya:ce.ya,y:ce.yVal}],fallback:ce.trace.hovertemplatefallback,locale:n._d3locale,template:ye}):A,ue={showlegend:!0,legend:{title:{text:xe,font:ee},font:ee,bgcolor:J.bgcolor,bordercolor:J.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},K={font:ee};qgt(ue,K,r._fullData);var _e=K.legend;_e.entries=[];for(var ne=0;ne=0?Ve=we:Le+Ge=0?Ve=Le:Ke+Ge=0?$e=et:qe+ht=0?$e=qe:Te+ht=0,(tt.idealAlign==="top"||!dn)&&xr?(Lt-=kt/2,tt.anchor="end"):dn?(Lt+=kt/2,tt.anchor="start"):tt.anchor="middle",tt.crossPos=Lt;else{if(tt.pos=Lt,dn=Mt+ft/2+Nr<=E,xr=Mt-ft/2-Nr>=0,(tt.idealAlign==="left"||!dn)&&xr)Mt-=ft/2,tt.anchor="end";else if(dn)Mt+=ft/2,tt.anchor="start";else{tt.anchor="middle";var Fr=Nr/2,Zr=Mt+Fr-E,Cn=Mt-Fr;Zr>0&&(Mt-=Zr),Cn<0&&(Mt+=-Cn)}tt.crossPos=Mt}Ot.attr("text-anchor",tt.anchor),Ct&&cr.attr("text-anchor",tt.anchor),nt.attr("transform",BO(Mt,Lt)+(i?Dgt(Xfe):""))}),{hoverLabels:ot,commonLabelBoundingBox:U}}function Gfe(e,t,r,n,a,i){var f,v;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=tu.templateString(e.name,e.trace._meta)),o=Wfe(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===a?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"
":"")+e.text),e.extraText!==void 0&&(s+=(s?"
":"")+e.extraText),i&&s===""&&!e.hovertemplate&&(o===""&&i.remove(),s=o),(v=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&v.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let g=e.hovertemplateLabels||e;e[l+"Label"]!==a&&(g[l+"other"]=g[l+"Val"],g[l+"otherLabel"]=g[l+"Label"]),s=tu.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:g,locale:n._d3locale,template:c}),s=s.replace(Hgt,(p,x)=>(o=Wfe(x,e.nameLength),""))}return[s,o]}function jgt(e,t,r,n){var a=t?"xa":"ya",i=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,v=n.maxX,g=n.minY,p=n.maxY,x=function(V){return V*r._invScaleX},_=function(V){return V*r._invScaleY};e.each(function(V){var j=V[a],q=V[i],U=j._id.charAt(0)==="x",J=j.range;c===0&&J&&J[0]>J[1]!==U&&(s=-1);var ee=0,ce=U?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var ye=Kfe(V,t),xe=V.anchor,ue=xe==="end"?-1:1,K,_e;if(xe==="middle")K=V.crossPos+(U?_(ye.y-V.by/2):x(V.bx/2+V.tx2width/2)),_e=K+(U?_(V.by):x(V.bx));else if(U)K=V.crossPos+_(yl+ye.y)-_(V.by/2-yl),_e=K+_(V.by);else{var ne=x(ue*yl+ye.x),ae=ne+x(ue*V.bx);K=V.crossPos+Math.min(ne,ae),_e=V.crossPos+Math.max(ne,ae)}U?g!==void 0&&p!==void 0&&Math.min(_e,p)-Math.max(K,g)>1&&(q.side==="left"?(ee=q._mainLinePosition,ce=r.width):ce=q._mainLinePosition):f!==void 0&&v!==void 0&&Math.min(_e,v)-Math.max(K,f)>1&&(q.side==="top"?(ee=q._mainLinePosition,ce=r.height):ce=q._mainLinePosition)}u[c++]=[{datum:V,traceIndex:V.trace.index,dp:0,pos:V.pos,posref:V.posref,size:V.by*(U?Ogt:1)/2,pmin:ee,pmax:ce}]}),u.sort(function(V,j){return V[0].posref-j[0].posref||s*(j[0].traceIndex-V[0].traceIndex)});var y,C,k,S,L,w,A;function T(V){var j=V[0],q=V[V.length-1];if(C=j.pmin-j.pos-j.dp+j.size,k=q.pos+q.dp+q.size-j.pmax,C>.01){for(L=V.length-1;L>=0;L--)V[L].dp+=C;y=!1}if(!(k<.01)){if(C<-.01){for(L=V.length-1;L>=0;L--)V[L].dp-=k;y=!1}if(y){var U=0;for(S=0;Sj.pmax&&U++;for(S=V.length-1;S>=0&&!(U<=0);S--)w=V[S],w.pos>j.pmax-1&&(w.del=!0,U--);for(S=0;S=0;L--)V[L].dp-=k;for(S=V.length-1;S>=0&&!(U<=0);S--)w=V[S],w.pos+w.dp+w.size>j.pmax&&(w.del=!0,U--)}}}for(;!y&&o<=l;){for(o++,y=!0,S=0;S.01){for(L=F.length-1;L>=0;L--)F[L].dp+=C;for(m.push.apply(m,F),u.splice(S+1,1),A=0,L=m.length-1;L>=0;L--)A+=m[L].dp;for(k=A/m.length,L=m.length-1;L>=0;L--)m[L].dp-=k;y=!1}else S++}u.forEach(T)}for(S=u.length-1;S>=0;S--){var R=u[S];for(L=R.length-1;L>=0;L--){var B=R[L],O=B.datum;O.offset=B.dp,O.del=B.del}}}function Kfe(e,t){var r=0,n=e.offset;return t&&(n*=-Ugt,r=e.offset*Ngt),{x:r,y:n}}function Wgt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(yl+go),n=r+t*(e.txwidth+go),a=e.anchor==="middle";return a&&(r-=e.tx2width/2,n+=e.txwidth/2+go),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Jfe(e,t,r,n){var a=function(o){return o*r},i=function(o){return o*n};e.each(function(o){var s=Wx.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=Wgt(o),v=Kfe(o,t),g=v.x,p=v.y,x=u==="middle",_="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,y;x?y="M-"+a(o.bx/2+o.tx2width/2)+","+i(p-o.by/2)+"h"+a(o.bx)+"v"+i(o.by)+"h-"+a(o.bx)+"Z":_?y="M0,0L"+a(c*yl+g)+","+i(yl+p)+"v"+i(o.by/2-yl)+"h"+a(c*o.bx)+"v-"+i(o.by)+"H"+a(c*yl+g)+"V"+i(p-yl)+"Z":y="M"+a(c*yl+g)+","+i(p-o.by/2)+"h"+a(c*o.bx)+"v"+i(o.by)+"h"+a(-c*o.bx)+"Z",s.select("path").attr("d",y);var C=g+f.textShiftX,k=p+o.ty0-o.by/2+go,S=o.textAlign||"auto";S!=="auto"&&(S==="left"&&u!=="start"?(l.attr("text-anchor","start"),C=x?-o.bx/2-o.tx2width/2+go:-o.bx-go):S==="right"&&u!=="end"&&(l.attr("text-anchor","end"),C=x?o.bx/2-o.tx2width/2-go:o.bx+go)),l.call(nv.positionText,a(C),i(k)),o.tx2width&&(s.select("text.name").call(nv.positionText,a(f.text2ShiftX+f.alignShift*go+g),i(p+o.ty0-o.by/2+go)),s.select("rect").call(Xp.setRect,a(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+g),i(p-o.by/2-1),a(o.tx2width),i(o.by+2)))})}function Ygt(e,t){var r=e.index,n=e.trace||{},a=e.cd[0],i=e.cd[r]||{};function o(v){return v||eg(v)&&v===0}var s=Array.isArray(r)?function(v,g){var p=tu.castOption(a,r,v);return o(p)?p:tu.extractOption({},n,"",g)}:function(v,g){return tu.extractOption(i,n,v,g)};function l(v,g,p){var x=s(g,p);o(x)&&(e[v]=x)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=tu.constrain(e.x0,0,e.xa._length),e.x1=tu.constrain(e.x1,0,e.xa._length),e.y0=tu.constrain(e.y0,0,e.ya._length),e.y1=tu.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Zp.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Zp.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=Zp.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Zp.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=Zp.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+Zp.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function Hfe(e,t,r){var n=r.container,a=r.fullLayout,i=a._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(".spikeline").remove(),!!(l||s)){var f=ac.combine(a.plot_bgcolor,a.paper_bgcolor);if(s){var v=t.hLinePoint,g,p;u=v&&v.xa,c=v&&v.ya;var x=c.spikesnap;x==="cursor"?(g=o.pointerX,p=o.pointerY):(g=u._offset+v.x,p=c._offset+v.y);var _=ac.wcagContrast(v.color,f)<1.5?ac.contrast(f):v.color,y=c.spikemode,C=c.spikethickness,k=c.spikecolor||_,S=Zp.getPxPosition(e,c),L,w;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(L=S,w=g),y.indexOf("across")!==-1){var A=c._counterDomainMin,T=c._counterDomainMax;c.anchor==="free"&&(A=Math.min(A,c.position),T=Math.max(T,c.position)),L=i.l+A*i.w,w=i.l+T*i.w}n.insert("line",":first-child").attr({x1:L,x2:w,y1:p,y2:p,"stroke-width":C,stroke:k,"stroke-dasharray":Xp.dashStyle(c.spikedash,C)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:w,y1:p,y2:p,"stroke-width":C+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}y.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:S+(c.side!=="right"?C:-C),cy:p,r:C,fill:k}).classed("spikeline",!0)}if(l){var m=t.vLinePoint,F,E;u=m&&m.xa,c=m&&m.ya;var I=u.spikesnap;I==="cursor"?(F=o.pointerX,E=o.pointerY):(F=u._offset+m.x,E=c._offset+m.y);var R=ac.wcagContrast(m.color,f)<1.5?ac.contrast(f):m.color,B=u.spikemode,O=u.spikethickness,V=u.spikecolor||R,j=Zp.getPxPosition(e,u),q,U;if(B.indexOf("toaxis")!==-1||B.indexOf("across")!==-1){if(B.indexOf("toaxis")!==-1&&(q=j,U=E),B.indexOf("across")!==-1){var J=u._counterDomainMin,ee=u._counterDomainMax;u.anchor==="free"&&(J=Math.min(J,u.position),ee=Math.max(ee,u.position)),q=i.t+(1-ee)*i.h,U=i.t+(1-J)*i.h}n.insert("line",":first-child").attr({x1:F,x2:F,y1:q,y2:U,"stroke-width":O,stroke:V,"stroke-dasharray":Xp.dashStyle(u.spikedash,O)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:F,x2:F,y1:q,y2:U,"stroke-width":O+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}B.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:F,cy:j-(u.side!=="top"?O:-O),r:O,fill:V}).classed("spikeline",!0)}}}function Xgt(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers)||a.binNumber!==i.binNumber)return!0}return!1}function jfe(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Wfe(e,t){return nv.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Zgt(e,t){for(var r=t.charAt(0),n=[],a=[],i=[],o=0;oe.offsetTop+e.clientTop,ehe=e=>e.offsetLeft+e.clientLeft;function n3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,i=n.top,o=a+n.width,s=i+n.height,l=tu.apply3DTransform(r._invTransform)(a,i),u=tu.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],v=u[0],g=u[1];return{x:c,y:f,width:v-c,height:g-f,top:Math.min(f,g),left:Math.min(c,v),right:Math.max(c,v),bottom:Math.max(f,g)}}});var AT=fe((s0r,the)=>{"use strict";var $gt=Xt(),Kgt=ni(),Jgt=Sd().isUnifiedHover;the.exports=function(t,r,n,a){a=a||{};var i=r.legend;function o(s){a.font[s]||(a.font[s]=i?r.legend.font[s]:r.font[s])}r&&Jgt(r.hovermode)&&(a.font||(a.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(a.bgcolor||(a.bgcolor=Kgt.combine(r.legend.bgcolor,r.paper_bgcolor)),a.bordercolor||(a.bordercolor=r.legend.bordercolor)):a.bgcolor||(a.bgcolor=r.paper_bgcolor)),n("hoverlabel.bgcolor",a.bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),n("hoverlabel.showarrow",a.showarrow),$gt.coerceFont(n,"hoverlabel.font",a.font),n("hoverlabel.align",a.align)}});var nhe=fe((l0r,rhe)=>{"use strict";var Qgt=Xt(),emt=AT(),tmt=tm();rhe.exports=function(t,r){function n(a,i){return Qgt.coerce(t,r,tmt,a,i)}emt(t,r,n)}});var ohe=fe((u0r,ahe)=>{"use strict";var ihe=Xt(),rmt=hb(),nmt=AT();ahe.exports=function(t,r,n,a){function i(s,l){return ihe.coerce(t,r,rmt,s,l)}var o=ihe.extendFlat({},a.hoverlabel);r.hovertemplate&&(o.namelength=-1),nmt(t,r,i,o)}});var VO=fe((c0r,she)=>{"use strict";var imt=Xt(),amt=tm();she.exports=function(t,r){function n(a,i){return r[a]!==void 0?r[a]:imt.coerce(t,r,amt,a,i)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}});var che=fe((f0r,uhe)=>{"use strict";var lhe=Xt(),omt=tm(),smt=VO(),lmt=AT();uhe.exports=function(t,r){function n(u,c){return lhe.coerce(t,r,omt,u,c)}var a=smt(t,r);a&&(n("hoverdistance"),n("spikedistance"),a.indexOf("unified")!==-1&&n("hoversort"));var i=n("dragmode");i==="select"&&n("selectdirection");var o=r._has("map"),s=r._has("geo"),l=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s)&&l===1||o&&s&&l===2)&&(r.dragmode="pan"),lmt(t,r,n),lhe.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var dhe=fe((h0r,hhe)=>{"use strict";var GO=Xt(),fhe=bi();hhe.exports=function(t){var r=t.calcdata,n=t._fullLayout;function a(u){return function(c){return GO.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var i=0;i{"use strict";var cmt=bi(),vhe=Sd(),fmt=UO().hover;phe.exports=function(t,r,n){var a=cmt.getComponentMethod("annotations","onClick")(t,t._hoverdata),i=t._fullLayout;n!==void 0&&fmt(t,r,n,!0);function o(){var l,u,c,f,v,g;var s={points:t._hoverdata,event:r};(l=s.xaxes)!=null||(s.xaxes=t._hoverXAxes),(u=s.yaxes)!=null||(s.yaxes=t._hoverYAxes),(c=s.xvals)!=null||(s.xvals=t._hoverXVals&&vhe.c2dApply(t._hoverXAxes,t._hoverXVals)),(f=s.yvals)!=null||(s.yvals=t._hoverYVals&&vhe.c2dApply(t._hoverYAxes,t._hoverYVals)),(v=s.xPixel)!=null||(s.xPixel=t._hoverPointerX),(g=s.yPixel)!=null||(s.yPixel=t._hoverPointerY),t.emit("plotly_click",s)}(t._hoverdata||i.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),a&&a.then?a.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var kl=fe((v0r,xhe)=>{"use strict";var hmt=xi(),Kk=Xt(),dmt=ed(),MT=Sd(),mhe=tm(),yhe=UO();xhe.exports={moduleType:"component",name:"fx",constants:L4(),schema:{layout:mhe},attributes:hb(),layoutAttributes:mhe,supplyLayoutGlobalDefaults:nhe(),supplyDefaults:ohe(),supplyLayoutDefaults:che(),calc:dhe(),getDistanceFunction:MT.getDistanceFunction,getClosest:MT.getClosest,inbox:MT.inbox,quadrature:MT.quadrature,appendArrayPointValue:MT.appendArrayPointValue,castHoverOption:pmt,castHoverinfo:gmt,hover:yhe.hover,unhover:dmt.unhover,loneHover:yhe.loneHover,loneUnhover:vmt,click:ghe()};function vmt(e){var t=Kk.isD3Selection(e)?e:hmt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function pmt(e,t,r){return Kk.castOption(e,t,"hoverlabel."+r)}function gmt(e,t,r){function n(a){return Kk.coerceHoverinfo({hoverinfo:a},{_module:e._module},t)}return Kk.castOption(e,r,"hoverinfo",n)}});var $p=fe(tg=>{"use strict";tg.selectMode=function(e){return e==="lasso"||e==="select"};tg.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};tg.openMode=function(e){return e==="drawline"||e==="drawopenpath"};tg.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};tg.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};tg.selectingOrDrawing=function(e){return tg.freeMode(e)||tg.rectMode(e)}});var ST=fe((g0r,_he)=>{"use strict";_he.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var Jk=fe((m0r,bhe)=>{"use strict";bhe.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},cloudupload:{width:640,height:640,path:"M451.5 160C434.9 160 418.8 164.5 404.7 172.7C388.9 156.7 370.5 143.3 350.2 133.2C378.4 109.2 414.3 96 451.5 96C537.9 96 608 166 608 252.5C608 294 591.5 333.8 562.2 363.1L491.1 434.2C461.8 463.5 422 480 380.5 480C294.1 480 224 410 224 323.5C224 322 224 320.5 224.1 319C224.6 301.3 239.3 287.4 257 287.9C274.7 288.4 288.6 303.1 288.1 320.8C288.1 321.7 288.1 322.6 288.1 323.4C288.1 374.5 329.5 415.9 380.6 415.9C405.1 415.9 428.6 406.2 446 388.8L517.1 317.7C534.4 300.4 544.2 276.8 544.2 252.3C544.2 201.2 502.8 159.8 451.7 159.8zM307.2 237.3C305.3 236.5 303.4 235.4 301.7 234.2C289.1 227.7 274.7 224 259.6 224C235.1 224 211.6 233.7 194.2 251.1L123.1 322.2C105.8 339.5 96 363.1 96 387.6C96 438.7 137.4 480.1 188.5 480.1C205 480.1 221.1 475.7 235.2 467.5C251 483.5 269.4 496.9 289.8 507C261.6 530.9 225.8 544.2 188.5 544.2C102.1 544.2 32 474.2 32 387.7C32 346.2 48.5 306.4 77.8 277.1L148.9 206C178.2 176.7 218 160.2 259.5 160.2C346.1 160.2 416 230.8 416 317.1C416 318.4 416 319.7 416 321C415.6 338.7 400.9 352.6 383.2 352.2C365.5 351.8 351.6 337.1 352 319.4C352 318.6 352 317.9 352 317.1C352 283.4 334 253.8 307.2 237.5z",transform:"matrix(1 0 0 1 -15 -15)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}});var e8=fe((y0r,whe)=>{"use strict";var Qk=32;whe.exports={CIRCLE_SIDES:Qk,i000:0,i090:Qk/4,i180:Qk/2,i270:Qk/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var t8=fe((x0r,Ahe)=>{"use strict";var mmt=Xt().strTranslate;function The(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function ymt(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function xmt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return The(e,r[t])}}function _mt(e){return mmt(e.xaxis._offset,e.yaxis._offset)}Ahe.exports={p2r:The,r2p:ymt,axValue:xmt,getTransform:_mt}});var Em=fe(rg=>{"use strict";var bmt=FB(),Ehe=e8(),a3=Ehe.CIRCLE_SIDES,HO=Ehe.SQRT2,khe=t8(),Mhe=khe.p2r,She=khe.r2p,wmt=[0,3,4,5,6,1,2],Tmt=[0,3,4,1,2];rg.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var Che=El(),Rhe=$p(),Amt=Rhe.drawMode,Mmt=Rhe.openMode,o3=e8(),Lhe=o3.i000,Phe=o3.i090,Fhe=o3.i180,Dhe=o3.i270,Smt=o3.cos45,Emt=o3.sin45,Ihe=t8(),n8=Ihe.p2r,km=Ihe.r2p,kmt=pm(),Cmt=kmt.clearOutline,i8=Em(),Lmt=i8.readPaths,Pmt=i8.writePaths,Fmt=i8.ellipseOver,Dmt=i8.fixDatesForPaths;function Rmt(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,a=t.isActiveShape,i=t.dragmode,o=(n.layout||{}).shapes||[];if(!Amt(i)&&a!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var Imt=$p(),zmt=Imt.selectMode,qmt=pm(),Bmt=qmt.clearOutline,jO=Em(),Omt=jO.readPaths,Nmt=jO.writePaths,Umt=jO.fixDatesForPaths;Bhe.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var a=n.getAttribute("d"),i=r.gd,o=i._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,v=(i.layout||{}).selections||[];if(!zmt(f)&&c!==void 0){var g=i._fullLayout._activeSelectionIndex;if(g{"use strict";Ohe.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var Lm=fe(gf=>{"use strict";var Jp=kT(),Nhe=Xt(),Cm=Yi();gf.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};gf.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};gf.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};gf.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};gf.extractPathCoords=function(e,t,r){var n=[],a=e.match(Jp.segmentRE);return a.forEach(function(i){var o=t[i.charAt(0)].drawn;if(o!==void 0){var s=i.slice(1).match(Jp.paramRE);if(!(!s||s.length{let s=o.charAt(0),l=a[s].drawn!==void 0;return i+(l?1:0)},0)};gf.getDataToPixel=function(e,t,r,n,a){var i=e._fullLayout._size,o;if(t)if(a==="domain")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=gf.shapePositionToRange(t);o=function(l){var u=Kp(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=gf.decodeDate(o))}else n?o=function(l){return i.t+i.h*(1-l)}:o=function(l){return i.l+i.w*l};return o};gf.getPixelToData=function(e,t,r,n){var a=e._fullLayout._size,i;if(t)if(n==="domain")i=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=gf.rangeToShapePosition(t);i=function(s){return o(t.p2r(s-t._offset))}}else r?i=function(s){return 1-(s-a.t)/a.h}:i=function(s){return(s-a.l)/a.w};return i};gf.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};gf.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],a=!!n;return a?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!=="paper"&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};gf.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],a=!!n;return a?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}};gf.getPathString=function(e,t){let r=t.type,n=Cm.getRefType(t.xref),a=Cm.getRefType(t.yref),i=e._fullLayout._size;var o,s,l,u,c,f,v,g,p,x,_,y;function C(F,E,I,R){var B;if(F)if(E==="domain")R?B=function(O){return F._offset+F._length*(1-O)}:B=function(O){return F._offset+F._length*O};else{let O=gf.shapePositionToRange(F);B=function(V){return F._offset+F.r2p(O(V,!0))},I==="path"&&F.type==="date"&&(B=gf.decodeDate(B))}else R?B=function(O){return i.t+i.h*(1-O)}:B=function(O){return i.l+i.w*O};return B}if(n==="array"?(v=[],o=t.xref.map(function(F){return Cm.getFromId(e,F)}),v=t.xref.map(function(F,E){return C(o[E],Cm.getRefType(F),r,!1)})):(o=Cm.getFromId(e,t.xref),v=C(o,n,r,!1)),a==="array"?(g=[],s=t.yref.map(function(F){return Cm.getFromId(e,F)}),g=t.yref.map(function(F,E){return C(s[E],Cm.getRefType(F),r,!0)})):(s=Cm.getFromId(e,t.yref),g=C(s,a,r,!0)),r==="path")return Vmt(t,v,g);if(n==="array")l=Kp(o[0],t.x0shift),u=Kp(o[1],t.x1shift),p=v[0](t.x0)+l,x=v[1](t.x1)+u;else if(l=Kp(o,t.x0shift),u=Kp(o,t.x1shift),t.xsizemode==="pixel"){let F=v(t.xanchor);p=F+t.x0+l,x=F+t.x1+u}else p=v(t.x0)+l,x=v(t.x1)+u;if(a==="array")c=Kp(s[0],t.y0shift),f=Kp(s[1],t.y1shift),_=g[0](t.y0)+c,y=g[1](t.y1)+f;else if(c=Kp(s,t.y0shift),f=Kp(s,t.y1shift),t.ysizemode==="pixel"){let F=g(t.yanchor);_=F-t.y0+c,y=F-t.y1+f}else _=g(t.y0)+c,y=g(t.y1)+f;if(r==="line")return"M"+p+","+_+"L"+x+","+y;if(r==="rect")return"M"+p+","+_+"H"+x+"V"+y+"H"+p+"Z";var k=(p+x)/2,S=(_+y)/2,L=Math.abs(k-p),w=Math.abs(S-_),A="A"+L+","+w,T=k+L+","+S,m=k+","+(S-w);return"M"+T+A+" 0 1,1 "+m+A+" 0 0,1 "+T+"Z"};function Vmt(e,t,r){let n=e.path,a=e.xsizemode,i=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return n.replace(Jp.segmentRE,function(v){var g=0,p=v.charAt(0),x=Jp.paramIsX[p],_=Jp.paramIsY[p],y=Jp.numParams[p];let C=x.drawn!==void 0,k=_.drawn!==void 0,S=l?t[c]:t,L=u?r[f]:r;var w=v.slice(1).replace(Jp.paramRE,function(A){return x[g]?a==="pixel"?A=S(o)+Number(A):A=S(A):_[g]&&(i==="pixel"?A=L(s)-Number(A):A=L(A)),g++,g>y&&(A="X"),A});return g>y&&(w=w.replace(/[\s,]*X.*/,""),Nhe.log("Ignoring extra params in segment "+v)),C&&c++,k&&f++,p+w})}gf.getPixelShift=Kp;function Kp(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var YO=fe((M0r,Ghe)=>{"use strict";var Gmt=Xt(),Qp=Yi(),Uhe=as(),Vhe=ea(),Hmt=Em().readPaths,Xx=Lm(),jmt=Xx.getPathString,CT=IE(),Wmt=nc().FROM_TL;Ghe.exports=function(t,r,n,a){if(a.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var i;if(n.label.texttemplate){var o={};if(n.type!=="path"){var s=Qp.getFromId(t,n.xref),l=Qp.getFromId(t,n.yref);let ee=Array.isArray(n.xref),ce=Array.isArray(n.yref);for(var u in CT){var c=typeof CT[u]=="function",f=!ee||CT.simpleXVariables.includes(u),v=!ce||CT.simpleYVariables.includes(u);if(c&&f&&v){var g=CT[u](n,s,l);g!==void 0&&(o[u]=g)}}}i=Gmt.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else i=n.label.text;var p={"data-index":r},x=n.label.font,_={"data-notex":1},y=a.append("g").attr(p).classed("shape-label",!0),C=y.append("text").attr(_).classed("shape-label-text",!0).text(i),k,S,L,w;if(n.path){var A=jmt(t,n),T=Hmt(A,t);k=1/0,L=1/0,S=-1/0,w=-1/0;for(var m=0;mXx.getDataToPixel(t,De,be,!1,Ge)(me),le=(me,be,De,Ge)=>Xx.getDataToPixel(t,De,be,!0,Ge)(me);if(n.xsizemode==="pixel"){let me=ie(n.xanchor,void 0,ye,_e),be=Xx.getPixelShift(ye,n.x0shift),De=Xx.getPixelShift(ye,n.x1shift);k=me+n.x0+be,S=me+n.x1+De}else k=ie(n.x0,n.x0shift,ye,_e),S=ie(n.x1,n.x1shift,xe,ne);if(n.ysizemode==="pixel"){let me=le(n.yanchor,void 0,ue,ae),be=Xx.getPixelShift(ue,n.y0shift),De=Xx.getPixelShift(ue,n.y1shift);L=me-n.y0+be,w=me-n.y1+De}else L=le(n.y0,n.y0shift,ue,ae),w=le(n.y1,n.y1shift,K,pe)}var O=n.label.textangle;O==="auto"&&(n.type==="line"?O=Ymt(k,L,S,w):O=0),C.call(function(ee){return ee.call(Vhe.font,x).attr({}),Uhe.convertToTspans(ee,t),ee});var V=Vhe.bBox(C.node()),j=Xmt(k,L,S,w,n,O,V),q=j.textx,U=j.texty,J=j.xanchor;C.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[J],y:U,x:q,transform:"rotate("+O+","+q+","+U+")"}).call(Uhe.positionText,q,U)}};function Ymt(e,t,r,n){var a,i;return i=Math.abs(r-e),r>=e?a=t-n:a=n-t,-180/Math.PI*Math.atan2(a,i)}function Xmt(e,t,r,n,a,i,o){var s=a.label.textposition,l=a.label.textangle,u=a.label.padding,c=a.type,f=Math.PI/180*i,v=Math.sin(f),g=Math.cos(f),p=a.label.xanchor,x=a.label.yanchor,_,y,C,k;if(c==="line"){s==="start"?(_=e,y=t):s==="end"?(_=r,y=n):(_=(e+r)/2,y=(t+n)/2),p==="auto"&&(s==="start"?l==="auto"?r>e?p="left":re?p="right":re?p="right":re?p="left":r{"use strict";var Zmt=Xt(),$mt=Zmt.strTranslate,Hhe=ed(),Yhe=$p(),Kmt=Yhe.drawMode,Xhe=Yhe.selectMode,Zhe=bi(),jhe=ni(),s8=e8(),Jmt=s8.i000,Qmt=s8.i090,eyt=s8.i180,tyt=s8.i270,ryt=pm(),$he=ryt.clearOutlineControllers,ZO=Em(),o8=ZO.pointsOnRectangle,XO=ZO.pointsOnEllipse,nyt=ZO.writePaths,iyt=a8().newShapes,ayt=a8().createShapeObj,oyt=WO(),syt=YO();Khe.exports=function e(t,r,n,a){a||(a=0);var i=n.gd;function o(){e(t,r,n,a++),(XO(t[0])||n.hasText)&&s({redrawing:!0})}function s(j){var q={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,q=iyt(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,q=oyt(r,n),i._fullLayout._reselect=!0),Object.keys(q).length&&Zhe.call((j||{}).redrawing?"relayout":"_guiRelayout",i,q)}var l=i._fullLayout,u=l._zoomlayer,c=n.dragmode,f=Kmt(c),v=Xhe(c);(f||v)&&(i._fullLayout._outlining=!0),$he(i),r.attr("d",nyt(t));var g,p,x,_,y;if(!a&&(n.isActiveShape||n.isActiveSelection)){y=lyt([],t);var C=u.append("g").attr("class","outline-controllers");F(C),V()}if(f&&n.hasText){var k=u.select(".label-temp"),S=ayt(r,n,n.dragmode);syt(i,"label-temp",S,k)}function L(j){x=+j.srcElement.getAttribute("data-i"),_=+j.srcElement.getAttribute("data-j"),g[x][_].moveFn=w}function w(j,q){if(t.length){var U=y[x][_][1],J=y[x][_][2],ee=t[x],ce=ee.length;if(o8(ee)){var ye=j,xe=q;if(n.isActiveSelection){var ue=Whe(ee,_);ue[1]===ee[_][1]?xe=0:ye=0}for(var K=0;K1&&!(j.length===2&&j[1][0]==="Z")&&(_===0&&(j[0][0]="M"),t[x]=j,o(),s())}}function m(j,q){if(j===2){x=+q.srcElement.getAttribute("data-i"),_=+q.srcElement.getAttribute("data-j");var U=t[x];!o8(U)&&!XO(U)&&T()}}function F(j){g=[];for(var q=0;q{"use strict";var cyt=xi(),nde=bi(),KO=Xt(),Zx=Yi(),fyt=Em().readPaths,hyt=l8(),c8=YO(),ide=pm().clearOutlineControllers,$O=ni(),f8=ea(),dyt=Mo().arrayEditor,Jhe=ed(),Qhe=kl(),ede=np(),$x=kT(),t0=Lm(),JO=t0.getPathString;sde.exports={draw:QO,drawOne:ade,eraseActiveShape:yyt,drawLabel:c8};function QO(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;a{if(!e._dragging&&e._fullLayout.hoveranywhere){let o=a(i);o&&Qhe.hover(e,o,r.id)}}),n.addEventListener("click",i=>{if(!e._dragged&&e._fullLayout.clickanywhere){let o=a(i);o&&Qhe.click(e,o,r.id)}})}function ode(e,t,r){let n=r.xref,a=r.yref;if(Array.isArray(n)||Array.isArray(a)){let i="clip"+t._fullLayout._uid+"shape"+r._index,o=pyt(t,n,a);KO.ensureSingleById(t._fullLayout._clips,"clipPath",i,function(s){s.append("rect")}).select("rect").attr(o),f8.setClipUrl(e,i,t)}else{let i=(n+a).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");f8.setClipUrl(e,i?"clip"+t._fullLayout._uid+i:null,t)}}function pyt(e,t,r){let n=e._fullLayout._size;function a(s,l){let u=(Array.isArray(s)?s:[s]).map(v=>Zx.getFromId(e,v)).filter(Boolean);if(!u.length)return l?[n.t,n.t+n.h]:[n.l,n.l+n.w];let c=u.map(function(v){return v._offset}),f=u.map(function(v){return v._offset+v._length});return[Math.min(...c),Math.max(...f)]}let i=a(t,!1),o=a(r,!0);return{x:i[0],y:o[0],width:i[1]-i[0],height:o[1]-o[0]}}function gyt(e,t,r,n,a,i){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",v=i.modifyItem,g,p,x,_,y,C,k,S,L,w,A,T,m,F,E,I=cyt.select(t.node().parentNode),R=Zx.getFromId(e,r.xref),B=Zx.getRefType(r.xref),O=Zx.getFromId(e,r.yref),V=Zx.getRefType(r.yref),j=r.x0shift,q=r.x1shift,U=r.y0shift,J=r.y1shift,ee=function(Oe,ze){var ct=t0.getDataToPixel(e,R,ze,!1,B);return ct(Oe)},ce=function(Oe,ze){var ct=t0.getDataToPixel(e,O,ze,!0,V);return ct(Oe)},ye=t0.getPixelToData(e,R,!1,B),xe=t0.getPixelToData(e,O,!0,V),ue=ne(),K={element:ue.node(),gd:e,prepFn:ie,doneFn:le,clickFn:me},_e;Jhe.init(K),ue.node().onmousemove=pe;function ne(){return c?ae():t}function ae(){var Oe=10,ze=Math.max(r.line.width,Oe),ct=a.append("g").attr("data-index",n).attr("drag-helper",!0);ct.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":ze,"stroke-opacity":"0"});var et={"fill-opacity":"0"},qe=Math.max(ze/2,Oe);return ct.append("circle").attr({"data-line-point":"start-point",cx:l?ee(r.xanchor)+r.x0:ee(r.x0,j),cy:u?ce(r.yanchor)-r.y0:ce(r.y0,U),r:qe}).style(et).classed("cursor-grab",!0),ct.append("circle").attr({"data-line-point":"end-point",cx:l?ee(r.xanchor)+r.x1:ee(r.x1,q),cy:u?ce(r.yanchor)-r.y1:ce(r.y1,J),r:qe}).style(et).classed("cursor-grab",!0),ct}function pe(Oe){if(u8(e)){_e=null;return}if(c)Oe.target.tagName==="path"?_e="move":_e=Oe.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ze=K.element.getBoundingClientRect(),ct=ze.right-ze.left,et=ze.bottom-ze.top,qe=Oe.clientX-ze.left,we=Oe.clientY-ze.top,Le=!f&&ct>o&&et>s&&!Oe.shiftKey?Jhe.getCursor(qe/ct,1-we/et):"move";ede(t,Le),_e=Le.split("-")[0]}}function ie(Oe){u8(e)||(l&&(y=ee(r.xanchor)),u&&(C=ce(r.yanchor)),r.type==="path"?E=r.path:(g=l?r.x0:ee(r.x0),p=u?r.y0:ce(r.y0),x=l?r.x1:ee(r.x1),_=u?r.y1:ce(r.y1)),g_?(k=p,A="y0",S=_,T="y1"):(k=_,A="y1",S=p,T="y0"),pe(Oe),Ge(a,r),it(t,r,e),K.moveFn=_e==="move"?be:De,K.altKey=Oe.altKey)}function le(){u8(e)||(ede(t),ht(a),ode(t,e,r),nde.call("_guiRelayout",e,i.getUpdateObj()))}function me(){u8(e)||ht(a)}function be(Oe,ze){if(r.type==="path"){var ct=function(we){return we},et=ct,qe=ct;l?v("xanchor",r.xanchor=ye(y+Oe)):(et=function(Le){return ye(ee(Le)+Oe)},R&&R.type==="date"&&(et=t0.encodeDate(et))),u?v("yanchor",r.yanchor=xe(C+ze)):(qe=function(Le){return xe(ce(Le)+ze)},O&&O.type==="date"&&(qe=t0.encodeDate(qe))),v("path",r.path=tde(E,et,qe))}else l?v("xanchor",r.xanchor=ye(y+Oe)):(v("x0",r.x0=ye(g+Oe)),v("x1",r.x1=ye(x+Oe))),u?v("yanchor",r.yanchor=xe(C+ze)):(v("y0",r.y0=xe(p+ze)),v("y1",r.y1=xe(_+ze)));t.attr("d",JO(e,r)),Ge(a,r),c8(e,n,r,I)}function De(Oe,ze){if(f){var ct=function(jt){return jt},et=ct,qe=ct;l?v("xanchor",r.xanchor=ye(y+Oe)):(et=function(mr){return ye(ee(mr)+Oe)},R&&R.type==="date"&&(et=t0.encodeDate(et))),u?v("yanchor",r.yanchor=xe(C+ze)):(qe=function(mr){return xe(ce(mr)+ze)},O&&O.type==="date"&&(qe=t0.encodeDate(qe))),v("path",r.path=tde(E,et,qe))}else if(c){if(_e==="resize-over-start-point"){var we=g+Oe,Le=u?p-ze:p+ze;v("x0",r.x0=l?we:ye(we)),v("y0",r.y0=u?Le:xe(Le))}else if(_e==="resize-over-end-point"){var Ke=x+Oe,Te=u?_-ze:_+ze;v("x1",r.x1=l?Ke:ye(Ke)),v("y1",r.y1=u?Te:xe(Te))}}else{var Ve=function(jt){return _e.indexOf(jt)!==-1},$e=Ve("n"),ot=Ve("s"),tt=Ve("w"),nt=Ve("e"),We=$e?k+ze:k,mt=ot?S+ze:S,bt=tt?L+Oe:L,Yt=nt?w+Oe:w;u&&($e&&(We=k-ze),ot&&(mt=S-ze)),(!u&&mt-We>s||u&&We-mt>s)&&(v(A,r[A]=u?We:xe(We)),v(T,r[T]=u?mt:xe(mt))),Yt-bt>o&&(v(m,r[m]=l?bt:ye(bt)),v(F,r[F]=l?Yt:ye(Yt)))}t.attr("d",JO(e,r)),Ge(a,r),c8(e,n,r,I)}function Ge(Oe,ze){(l||u)&&ct();function ct(){var et=ze.type!=="path",qe=Oe.selectAll(".visual-cue").data([0]),we=1;qe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":we}).classed("visual-cue",!0);var Le=ee(l?ze.xanchor:KO.midRange(et?[ze.x0,ze.x1]:t0.extractPathCoords(ze.path,$x.paramIsX))),Ke=ce(u?ze.yanchor:KO.midRange(et?[ze.y0,ze.y1]:t0.extractPathCoords(ze.path,$x.paramIsY)));if(Le=t0.roundPositionForSharpStrokeRendering(Le,we),Ke=t0.roundPositionForSharpStrokeRendering(Ke,we),l&&u){var Te="M"+(Le-1-we)+","+(Ke-1-we)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";qe.attr("d",Te)}else if(l){var Ve="M"+(Le-1-we)+","+(Ke-9-we)+"v18 h2 v-18 Z";qe.attr("d",Ve)}else{var $e="M"+(Le-9-we)+","+(Ke-1-we)+"h18 v2 h-18 Z";qe.attr("d",$e)}}}function ht(Oe){Oe.selectAll(".visual-cue").remove()}function it(Oe,ze,ct){var et=ze.xref,qe=ze.yref,we=Zx.getFromId(ct,et),Le=Zx.getFromId(ct,qe),Ke="";et!=="paper"&&!we.autorange&&(Ke+=et),qe!=="paper"&&!Le.autorange&&(Ke+=qe),f8.setClipUrl(Oe,Ke?"clip"+ct._fullLayout._uid+Ke:null,ct)}}function tde(e,t,r){return e.replace($x.segmentRE,function(n){var a=0,i=n.charAt(0),o=$x.paramIsX[i],s=$x.paramIsY[i],l=$x.numParams[i],u=n.slice(1).replace($x.paramRE,function(c){return a>=l||(o[a]?c=t(c):s[a]&&(c=r(c)),a++),c});return i+u})}function myt(e,t){if(h8(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){rde(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=rde,QO(e)}}}function rde(e){if(h8(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(ide(e),delete e._fullLayout._activeShapeIndex,QO(e))}}function yyt(e){if(h8(e)){ide(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var s3=Xt()._,xyt=function(e){return{DIALOG_TITLE:s3(e,"Share chart"),DIALOG_MESSAGE_CLOUD:s3(e,"This chart will be uploaded to {Plotly Cloud} to create a sharing link. Only you can see it until you change its visibility."),DIALOG_MESSAGE_CLOUD_ACCOUNT:s3(e,"If you don't have a Plotly Cloud account yet, you'll have a chance to create one."),DIALOG_MESSAGE_OTHER:s3(e,"This chart will be sent to {serverUrl}."),DIALOG_CANCEL:s3(e,"Cancel"),DIALOG_CONFIRM:s3(e,"Share")}};lde.exports=xyt});var hde=fe((C0r,fde)=>{"use strict";var cde=xi(),{dfltConfig:_yt}=im(),byt=ude(),wyt=(e,t,r,n,a)=>{let i=byt(e),o=t.append("div").classed("plotly-cloud-dialog-box",!0);if(o.append("div").classed("plotly-cloud-dialog-title",!0).text(i.DIALOG_TITLE),r===_yt.plotlyServerURL){let l=o.append("div").classed("plotly-cloud-dialog-message",!0),u=new URL(r).origin,c=i.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),f=c[0],v=c[2],g=c[4];l.append("span").text(f),l.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",u).attr("target","_blank").text(v),l.append("span").text(g),l.append("div").classed("plotly-cloud-dialog-message--account",!0).text(i.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let l=new URL(r),u=l.hostname,c=l.origin,f=i.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),v=f[0],g=f[4],p=o.append("div").classed("plotly-cloud-dialog-message",!0);p.append("span").text(v),p.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",c).attr("target","_blank").text(u),p.append("span").text(g)}let s=o.append("div").classed("plotly-cloud-dialog-buttons",!0);s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(i.DIALOG_CANCEL).on("click",a),s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(i.DIALOG_CONFIRM).on("click",n)},Tyt=(e,t,r)=>{let n=cde.select(e._fullLayout._paperdiv.node());n.selectAll(".plotly-cloud-dialog").remove();let a=n.append("div").classed("plotly-cloud-dialog",!0),i=()=>{a.remove(),document.removeEventListener("keydown",o)},o=s=>{(s.key==="Escape"||s.keyCode===27)&&i()};document.addEventListener("keydown",o),a.on("click",()=>{cde.event.target===a.node()&&i()}),wyt(e,a,t,()=>{i(),r()},i)};fde.exports=Tyt});var rN=fe((L0r,xde)=>{"use strict";var iv=bi(),Ayt=Hs(),vde=El(),Zo=Jk(),Myt=d8().eraseActiveShape,Syt=hde(),v8=Xt(),Lo=v8._,$o=xde.exports={};$o.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?Lo(e,"Download plot as a PNG"):Lo(e,"Download plot")},icon:Zo.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};v8.notifier(Lo(e,"Preparing image - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),iv.call("downloadImage",e,r).then(function(n){v8.notifier(Lo(e,"Image download succeeded")+" - "+n,"long",e)}).catch(function(){v8.notifier(Lo(e,"Sorry, there was a problem downloading your image!"),"long",e)})}};$o.sendChartToCloud={name:"sendChartToCloud",title:function(e){return Lo(e,"Share chart...")},icon:Zo.cloudupload,click:function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(!t){console.error("No destination URL provided (plotlyServerURL is empty)");return}var r;try{r=new URL(t)}catch(a){console.error("Invalid plotlyServerURL: "+t);return}let n=["http:","https:"];if(!n.includes(r.protocol)){console.error(`Invalid protocol '${r.protocol}' in plotlyServerURL '${t}'. Must be one of: ${n.join(", ")}`);return}Syt(e,t,function(){Ayt.sendDataToCloud(e,t)})}};$o.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Lo(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Zo.zoombox,click:rd};$o.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Lo(e,"Pan")},attr:"dragmode",val:"pan",icon:Zo.pan,click:rd};$o.select2d={name:"select2d",_cat:"select",title:function(e){return Lo(e,"Box Select")},attr:"dragmode",val:"select",icon:Zo.selectbox,click:rd};$o.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Lo(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Zo.lasso,click:rd};$o.drawclosedpath={name:"drawclosedpath",title:function(e){return Lo(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Zo.drawclosedpath,click:rd};$o.drawopenpath={name:"drawopenpath",title:function(e){return Lo(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Zo.drawopenpath,click:rd};$o.drawline={name:"drawline",title:function(e){return Lo(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Zo.drawline,click:rd};$o.drawrect={name:"drawrect",title:function(e){return Lo(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Zo.drawrect,click:rd};$o.drawcircle={name:"drawcircle",title:function(e){return Lo(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Zo.drawcircle,click:rd};$o.eraseshape={name:"eraseshape",title:function(e){return Lo(e,"Erase active shape")},icon:Zo.eraseshape,click:Myt};$o.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Lo(e,"Zoom in")},attr:"zoom",val:"in",icon:Zo.zoom_plus,click:rd};$o.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Lo(e,"Zoom out")},attr:"zoom",val:"out",icon:Zo.zoom_minus,click:rd};$o.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Lo(e,"Autoscale")},attr:"zoom",val:"auto",icon:Zo.autoscale,click:rd};$o.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Lo(e,"Reset axes")},attr:"zoom",val:"reset",icon:Zo.home,click:rd};$o.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Lo(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Zo.tooltip_basic,gravity:"ne",click:rd};$o.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Lo(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Zo.tooltip_compare,gravity:"ne",click:rd};function rd(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,i=e._fullLayout,o={},s=vde.list(e,null,!0),l=i._cartesianSpikesEnabled,u,c;if(n==="zoom"){var f=a==="in"?.5:2,v=(1+f)/2,g=(1-f)/2,p,x;for(c=0;c-w),[x,_]=f.invert(c.midPt),{minscale:y}=u.projection,C=(s=u.projection.maxscale)!=null?s:1/0,k=Math.min(y,C),S=Math.max(y,C),L=a==="in"?dde*v:1/dde*v;L>S?L=S:L{"use strict";var _de=rN(),Lyt=Object.keys(_de),bde=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],wde=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(bde),l3=[],Pyt=function(e){if(wde.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();l3.indexOf(t)===-1&&l3.push(t),l3.indexOf(r)===-1&&l3.push(r)}};Lyt.forEach(function(e){Pyt(_de[e])});l3.sort();Tde.exports={DRAW_MODES:bde,backButtons:wde,foreButtons:l3}});var aN={};zp(aN,{default:()=>Dyt});var iN,Fyt,Dyt,oN=Co(()=>{"use strict";iN=$0(nN()),Fyt={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["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`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${iN.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${iN.default.foreButtons.join("*, *")}*.`].join(" ")}},Dyt=Fyt});var Mde=fe((F0r,Ade)=>{"use strict";var Ryt=Xt(),LT=ni(),Iyt=Mo(),zyt=(oN(),Gs(aN)).default;Ade.exports=function(t,r){var n=t.modebar||{},a=Iyt.newContainer(r,"modebar");function i(s,l){return Ryt.coerce(n,a,zyt,s,l)}i("orientation"),i("bgcolor",LT.addOpacity(r.paper_bgcolor,.5));var o=LT.contrast(LT.rgb(r.modebar.bgcolor));i("color",LT.addOpacity(o,.3)),i("activecolor",LT.addOpacity(o,.7)),i("uirevision",r.uirevision),i("add"),i("remove")}});var Cde=fe((D0r,kde)=>{"use strict";var sN=xi(),qyt=aa(),m8=Xt(),Sde=Jk(),Byt=A4().version,Oyt=new DOMParser;function Ede(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var e1=Ede.prototype;e1.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this.element.setAttribute("role","toolbar"),this._uid=a,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var i=n.modebar,o="#"+a+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=i.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),m8.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color,this.element)};e1.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(a){var i=a.name;if(!i)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");t.buttonsNames.push(i);var o=t.createButton(a);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};e1.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};e1.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute("data-title",n),r.setAttribute("aria-label",n)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),r.setAttribute("data-val",a));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&sN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||Sde.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};e1.createIcon=function(e){var t=qyt(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(r,"svg"),n.setAttribute("viewBox",[0,0,e.width,t].join(" ")),n.setAttribute("class","icon");var a=document.createElementNS(r,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(a)}if(e.svg){var i=Oyt.parseFromString(e.svg,"application/xml");n=i.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};e1.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var a=n.getAttribute("data-val")||!0,i=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",s=sN.select(n),l=function(f,v){var g=t.modebar,p=f.querySelector(".icon path");p&&(v||f.matches(":hover")?p.style.fill=g.activecolor:p.style.fill=g.color)};if(o){if(i===r){var u=!s.classed("active");s.classed("active",u),l(n,u)}}else{var c=i===null?i:m8.nestedProperty(t,i).get();s.classed("active",c===a),l(n,c===a)}})};e1.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var Vyt=El(),Lde=Is(),lN=bi(),Gyt=Sd().isUnifiedHover,Hyt=Cde(),y8=rN(),jyt=nN().DRAW_MODES,Wyt=Xt().extendDeep;Pde.exports=function(t){var r=t._fullLayout,n=t._context,a=r._modeBar;if(!n.displayModeBar&&!n.watermark){a&&(a.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=n.modeBarButtons,o;Array.isArray(i)&&i.length?o=Jyt(i):!n.displayModeBar&&n.watermark?o=[]:o=Yyt(t),a?a.update(t,o):r._modeBar=Hyt(t,o)};function Yyt(e){var t=e._fullLayout,r=e._fullData,n=e._context;function a(j,q){if(typeof q=="string"){if(q.toLowerCase()===j.toLowerCase())return!0}else{var U=q.name,J=q._cat||q.name;if(U===j||J===j.toLowerCase())return!0}return!1}var i=t.modebar.add;typeof i=="string"&&(i=[i]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(i.filter(function(j){for(var q=0;q1?(m=["toggleHover"],F=["resetViews"]):f?(T=["zoomInGeo","zoomOutGeo"],m=["hoverClosestGeo"],F=["resetGeo"]):c?(m=["hoverClosest3d"],F=["resetCameraDefault3d","resetCameraLastSave3d"]):x?(T=["zoomInMap","zoomOutMap"],m=["toggleHover"],F=["resetViewMap"]):v?m=["hoverClosestPie"]:C?(m=["hoverClosestCartesian","hoverCompareCartesian"],F=["resetViewSankey"]):m=["toggleHover"],u&&m.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),($yt(r)||S)&&(m=[]),u&&!k&&(T=["zoomIn2d","zoomOut2d","autoScale2d"],F[0]!=="resetViews"&&(F=["resetScale2d"])),c?E=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!k||p?E=["zoom2d","pan2d"]:x||f?E=["pan2d"]:_&&(E=["zoom2d"]),Zyt(r)&&E.push("select2d","lasso2d");var I=[],R=function(j){I.indexOf(j)===-1&&m.indexOf(j)!==-1&&I.push(j)};if(Array.isArray(s)){for(var B=[],O=0;O{"use strict";Dde.exports={moduleType:"component",name:"modebar",layoutAttributes:(oN(),Gs(aN)).default,supplyLayoutDefaults:Mde(),manage:Fde()}});var cN=fe((z0r,Rde)=>{"use strict";var Qyt=nc().FROM_BL;Rde.exports=function(t,r,n){n===void 0&&(n=Qyt[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=a[0]+(a[1]-a[0])*n;t.range=t._input.range=[t.l2r(i+(a[0]-i)*r),t.l2r(i+(a[1]-i)*r)],t.setScale()}});var Jx=fe(PT=>{"use strict";var Kx=Xt(),fN=rp(),ip=El().id2name,ext=pf(),Ide=cN(),txt=Hp(),rxt=Wa().ALMOST_EQUAL,nxt=nc().FROM_BL;PT.handleDefaults=function(e,t,r){var n=r.axIds,a=r.axHasImage,i=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,v,g,p;for(s=0;si?r.slice(i):n.slice(a))+o}function axt(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;orxt*p&&!C)){for(i=0;iI&&JF&&(F=J);var ce=(F-m)/(2*E);f/=ce,m=l.l2r(m),F=l.l2r(F),l.range=l._input.range=w{"use strict";var _8=xi(),nd=bi(),L0=Hs(),av=Xt(),vN=as(),pN=ST(),FT=ni(),u3=ea(),Ode=qx(),Hde=uN(),DT=Yi(),ng=nc(),jde=Jx(),oxt=jde.enforce,sxt=jde.clean,Nde=rp().doAutoRange,Wde="start",lxt="middle",Yde="end",uxt=rc().zindexSeparator;Hc.layoutStyles=function(e){return av.syncOrAsync([L0.doAutoMargin,fxt],e)};function cxt(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function fxt(e){var t=e._fullLayout,r=t._size,n=r.p,a=DT.list(e,"",!0),i,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(u3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),Hc.drawMainTitle(e),Hde.manage(e),!t._has("cartesian"))return L0.previousPromises(e);function f(ie,le,me){var be=ie._lw/2;if(ie._id.charAt(0)==="x"){if(le){if(me==="top")return le._offset-n-be}else return r.t+r.h*(1-(ie.position||0))+be%1;return le._offset+le._length+n+be}if(le){if(me==="right")return le._offset+le._length+n+be}else return r.l+r.w*(ie.position||0)+be%1;return le._offset-n-be}for(i=0;i0){pxt(e,i,u,l),s.attr({x:o,y:i,"text-anchor":n,dy:Gde(t.yanchor)}).call(vN.positionText,o,i);var c=(t.text.match(vN.BR_TAG_ALL)||[]).length;if(c){var f=ng.LINE_SPACING*c+ng.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var _=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",_)})}var v=_8.select(e).selectAll(".gtitle-subtitle");if(v.node()){var g=s.node().getBBox(),p=g.y+g.height,x=p+Ode.SUBTITLE_PADDING_EM*t.subtitle.font.size;v.attr({x:o,y:x,"text-anchor":n,dy:Gde(t.yanchor)}).call(vN.positionText,o,x)}}}};function hxt(e,t,r,n,a){var i=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=av.isTopAnchor(t)?n:n-a,s=r==="b"?i-o:o;return av.isTopAnchor(t)&&r==="t"||av.isBottomAnchor(t)&&r==="b"?!1:s.5?"t":"b",o=e._fullLayout.margin[i],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=dxt(i,n,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function pxt(e,t,r,n){var a="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",s={x:i.x,y:i.y,t:0,b:0},l={};i.yref==="paper"&&hxt(e,i,o,t,n)?s[o]=r:i.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[a]=l),L0.allowAutoMargin(e,a),L0.autoMargin(e,a,s)}function gxt(e,t){var r=e.title,n=e._size,a=0;return t===Wde?a=r.pad.l:t===Yde&&(a=-r.pad.r),r.xref==="paper"?n.l+n.w*r.x+a:e.width*r.x+a}function mxt(e,t){var r=e.title,n=e._size,a=0;return t==="0em"||!t?a=-r.pad.b:t===ng.CAP_SHIFT+"em"&&(a=r.pad.t),r.y==="auto"?n.t/2:r.yref==="paper"?n.t+n.h-n.h*r.y+a:e.height-e.height*r.y+a}function Gde(e){return e==="top"?ng.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":ng.MID_SHIFT+"em"}function yxt(e){var t=e.title,r=lxt;return av.isRightAnchor(t)?r=Yde:av.isLeftAnchor(t)&&(r=Wde),r}function xxt(e){var t=e.title,r="0em";return av.isTopAnchor(t)?r=ng.CAP_SHIFT+"em":av.isMiddleAnchor(t)&&(r=ng.MID_SHIFT+"em"),r}Hc.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var _xt=Em().readPaths,bxt=l8(),Xde=pm().clearOutlineControllers,gN=ni(),Zde=ea(),wxt=Mo().arrayEditor,$de=Lm(),Txt=$de.getPathString;Jde.exports={draw:b8,drawOne:Kde,activateLastSelection:Sxt};function b8(e){var t=e._fullLayout;Xde(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a=0;_--){var y=o.append("path").attr(l).style("opacity",_?.1:u).call(gN.stroke,f).call(gN.fill,c).call(Zde.dashLine,_?"solid":g,_?4+v:v);if(Axt(y,e,n),p){var C=wxt(e.layout,"selections",n);y.style({cursor:"move"});var k={element:y.node(),plotinfo:a,gd:e,editHelpers:C,isActiveSelection:!0},S=_xt(s,e);bxt(S,y,k)}else y.style("pointer-events",_?"all":"none");x[_]=y}var L=x[0],w=x[1];w.node().addEventListener("click",function(){return Mxt(e,L)})}}function Axt(e,t,r){var n=r.xref+r.yref;Zde.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function Mxt(e,t){if(w8(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){mN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=mN,b8(e)}}}function Sxt(e){if(w8(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=mN,b8(e)}}function mN(e){if(w8(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Xde(e),delete e._fullLayout._activeSelectionIndex,b8(e))}}});var e0e=fe((N0r,Qde)=>{function Ext(){var e,t=0,r=!1;function n(a,i){return e.list.push({type:a,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(a,i){return n("check",{seg1:a,seg2:i})},segmentChop:function(a,i){return n("div_seg",{seg:a,pt:i}),n("chop",{seg:a,pt:i})},statusRemove:function(a){return n("pop_seg",{seg:a})},segmentUpdate:function(a){return n("seg_update",{seg:a})},segmentNew:function(a,i){return n("new_seg",{seg:a,primary:i})},segmentRemove:function(a){return n("rem_seg",{seg:a})},tempStatus:function(a,i,o){return n("temp_status",{seg:a,above:i,below:o})},rewind:function(a){return n("rewind",{seg:a})},status:function(a,i,o){return n("status",{seg:a,above:i,below:o})},vert:function(a){return a===r?e:(r=a,n("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),n("log",{txt:a})},reset:function(){return n("reset")},selected:function(a){return n("selected",{segs:a})},chainStart:function(a){return n("chain_start",{seg:a})},chainRemoveHead:function(a,i){return n("chain_rem_head",{index:a,pt:i})},chainRemoveTail:function(a,i){return n("chain_rem_tail",{index:a,pt:i})},chainNew:function(a,i){return n("chain_new",{pt1:a,pt2:i})},chainMatch:function(a){return n("chain_match",{index:a})},chainClose:function(a){return n("chain_close",{index:a})},chainAddHead:function(a,i){return n("chain_add_head",{index:a,pt:i})},chainAddTail:function(a,i){return n("chain_add_tail",{index:a,pt:i})},chainConnect:function(a,i){return n("chain_con",{index1:a,index2:i})},chainReverse:function(a){return n("chain_rev",{index:a})},chainJoin:function(a,i){return n("chain_join",{index1:a,index2:i})},done:function(){return n("done")}},e}Qde.exports=Ext});var r0e=fe((U0r,t0e)=>{function kxt(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,n,a){var i=n[0],o=n[1],s=a[0],l=a[1],u=r[0],c=r[1];return(s-i)*(c-o)-(l-o)*(u-i)>=-e},pointBetween:function(r,n,a){var i=r[1]-n[1],o=a[0]-n[0],s=r[0]-n[0],l=a[1]-n[1],u=s*o+i*l;if(u-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-i>e&&(o-c)*(i-f)/(s-f)+c-a>e&&(l=!l),o=c,s=f}return l}};return t}t0e.exports=kxt});var i0e=fe((V0r,n0e)=>{var Cxt={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,a=e.root.next;a!==null;){if(r(a)){t.prev=a.prev,t.next=a,a.prev.next=t,a.prev=t;return}n=a,a=a.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(a){return a.prev=r,a.next=n,r.next=a,n!==null&&(n.prev=a),a}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};n0e.exports=Cxt});var o0e=fe((G0r,a0e)=>{var IT=i0e();function Lxt(e,t,r){function n(p,x){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:null,below:null},otherFill:null}}function a(p,x,_){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:_.myFill.above,below:_.myFill.below},otherFill:null}}var i=IT.create();function o(p,x,_,y,C,k){var S=t.pointsCompare(x,C);return S!==0?S:t.pointsSame(_,k)?0:p!==y?p?1:-1:t.pointAboveOrOnLine(_,y?C:k,y?k:C)?1:-1}function s(p,x){i.insertBefore(p,function(_){var y=o(p.isStart,p.pt,x,_.isStart,_.pt,_.other.pt);return y<0})}function l(p,x){var _=IT.node({isStart:!0,pt:p.start,seg:p,primary:x,other:null,status:null});return s(_,p.end),_}function u(p,x,_){var y=IT.node({isStart:!1,pt:x.end,seg:x,primary:_,other:p,status:null});p.other=y,s(y,p.pt)}function c(p,x){var _=l(p,x);return u(_,p,x),_}function f(p,x){r&&r.segmentChop(p.seg,x),p.other.remove(),p.seg.end=x,p.other.pt=x,s(p.other,p.pt)}function v(p,x){var _=a(x,p.seg.end,p.seg);return f(p,x),c(_,p.primary)}function g(p,x){var _=IT.create();function y(O,V){var j=O.seg.start,q=O.seg.end,U=V.seg.start,J=V.seg.end;return t.pointsCollinear(j,U,J)?t.pointsCollinear(q,U,J)||t.pointAboveOrOnLine(q,U,J)?1:-1:t.pointAboveOrOnLine(j,U,J)?1:-1}function C(O){return _.findTransition(function(V){var j=y(O,V.ev);return j>0})}function k(O,V){var j=O.seg,q=V.seg,U=j.start,J=j.end,ee=q.start,ce=q.end;r&&r.checkIntersection(j,q);var ye=t.linesIntersect(U,J,ee,ce);if(ye===!1){if(!t.pointsCollinear(U,J,ee)||t.pointsSame(U,ce)||t.pointsSame(J,ee))return!1;var xe=t.pointsSame(U,ee),ue=t.pointsSame(J,ce);if(xe&&ue)return V;var K=!xe&&t.pointBetween(U,ee,ce),_e=!ue&&t.pointBetween(J,ee,ce);if(xe)return _e?v(V,J):v(O,ce),V;K&&(ue||(_e?v(V,J):v(O,ce)),v(V,U))}else ye.alongA===0&&(ye.alongB===-1?v(O,ee):ye.alongB===0?v(O,ye.pt):ye.alongB===1&&v(O,ce)),ye.alongB===0&&(ye.alongA===-1?v(V,U):ye.alongA===0?v(V,ye.pt):ye.alongA===1&&v(V,J));return!1}for(var S=[];!i.isEmpty();){var L=i.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let O=function(){if(A){var V=k(L,A);if(V)return V}return T?k(L,T):!1};var B=O;r&&r.segmentNew(L.seg,L.primary);var w=C(L),A=w.before?w.before.ev:null,T=w.after?w.after.ev:null;r&&r.tempStatus(L.seg,A?A.seg:!1,T?T.seg:!1);var m=O();if(m){if(e){var F;L.seg.myFill.below===null?F=!0:F=L.seg.myFill.above!==L.seg.myFill.below,F&&(m.seg.myFill.above=!m.seg.myFill.above)}else m.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(m.seg),L.other.remove(),L.remove()}if(i.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var F;L.seg.myFill.below===null?F=!0:F=L.seg.myFill.above!==L.seg.myFill.below,T?L.seg.myFill.below=T.seg.myFill.above:L.seg.myFill.below=p,F?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var E;T?L.primary===T.primary?E=T.seg.otherFill.above:E=T.seg.myFill.above:E=L.primary?x:p,L.seg.otherFill={above:E,below:E}}r&&r.status(L.seg,A?A.seg:!1,T?T.seg:!1),L.other.status=w.insert(IT.node({ev:L}))}else{var I=L.status;if(I===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(_.exists(I.prev)&&_.exists(I.next)&&k(I.prev.ev,I.next.ev),r&&r.statusRemove(I.ev.seg),I.remove(),!L.primary){var R=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=R}S.push(L.seg)}i.getHead().remove()}return r&&r.done(),S}return e?{addRegion:function(p){for(var x,_=p[p.length-1],y=0;y{function Pxt(e,t,r){var n=[],a=[];return e.forEach(function(i){var o=i.start,s=i.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(i);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(B,O,V){return c.index=B,c.matches_head=O,c.matches_pt1=V,c===l?(c=u,!1):(c=null,!0)}for(var v=0;v{function zT(e,t,r){var n=[];return e.forEach(function(a){var i=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);t[i]!==0&&n.push({id:r?r.segmentId():-1,start:a.start,end:a.end,myFill:{above:t[i]===1,below:t[i]===2},otherFill:null})}),r&&r.selected(n),n}var Fxt={union:function(e,t){return zT(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return zT(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return zT(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return zT(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return zT(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};u0e.exports=Fxt});var h0e=fe((W0r,f0e)=>{var Dxt={toPolygon:function(e,t){function r(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(i[0]),l=1;l{var Rxt=e0e(),Ixt=r0e(),d0e=o0e(),zxt=l0e(),qT=c0e(),v0e=h0e(),ov=!1,BT=Ixt(),r0;r0={buildLog:function(e){return e===!0?ov=Rxt():e===!1&&(ov=!1),ov===!1?!1:ov.list},epsilon:function(e){return BT.epsilon(e)},segments:function(e){var t=d0e(!0,BT,ov);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=d0e(!1,BT,ov);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:qT.union(e.combined,ov),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:qT.intersect(e.combined,ov),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:qT.difference(e.combined,ov),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:qT.differenceRev(e.combined,ov),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:qT.xor(e.combined,ov),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:zxt(e.segments,BT,ov),inverted:e.inverted}},polygonFromGeoJSON:function(e){return v0e.toPolygon(r0,e)},polygonToGeoJSON:function(e){return v0e.fromPolygon(r0,BT,e)},union:function(e,t){return OT(e,t,r0.selectUnion)},intersect:function(e,t){return OT(e,t,r0.selectIntersect)},difference:function(e,t){return OT(e,t,r0.selectDifference)},differenceRev:function(e,t){return OT(e,t,r0.selectDifferenceRev)},xor:function(e,t){return OT(e,t,r0.selectXor)}};function OT(e,t,r){var n=r0.segments(e),a=r0.segments(t),i=r0.combine(n,a),o=r(i);return r0.polygon(o)}typeof window=="object"&&(window.PolyBool=r0);p0e.exports=r0});var y0e=fe((X0r,m0e)=>{m0e.exports=function(t,r,n,a){var i=t[0],o=t[1],s=!1;n===void 0&&(n=0),a===void 0&&(a=r.length);for(var l=a-n,u=0,c=l-1;uo!=p>o&&i<(g-f)*(o-v)/(p-v)+f;x&&(s=!s)}return s}});var NT=fe((Z0r,x0e)=>{"use strict";var xN=FE().dot,T8=Wa().BADNUM,A8=x0e.exports={};A8.tester=function(t){var r=t.slice(),n=r[0][0],a=n,i=r[0][1],o=i,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;sa||y===T8||yo||x&&u(p))}function f(p,x){var _=p[0],y=p[1];if(_===T8||_a||y===T8||yo)return!1;var C=r.length,k=r[0][0],S=r[0][1],L=0,w,A,T,m,F;for(w=1;wMath.max(A,k)||y>Math.max(T,S)))if(ys||Math.abs(xN(f,u))>a)return!0;return!1};A8.filter=function(t,r){var n=[t[0]],a=0,i=0;function o(l){t.push(l);var u=n.length,c=a;n.splice(i+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var b0e=fe(($0r,_0e)=>{"use strict";_0e.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var G0e=fe((K0r,V0e)=>{"use strict";var w0e=g0e(),qxt=y0e(),GT=bi(),Bxt=ea().dashStyle,UT=ni(),Oxt=kl(),Nxt=Sd().makeEventData,XT=$p(),Uxt=XT.freeMode,Vxt=XT.rectMode,HT=XT.drawMode,TN=XT.openMode,AN=XT.selectMode,T0e=Lm(),A0e=kT(),C0e=l8(),L0e=pm().clearOutline,P0e=Em(),_N=P0e.handleEllipse,Gxt=P0e.readPaths,Hxt=a8().newShapes,jxt=WO(),Wxt=yN().activateLastSelection,S8=Xt(),Yxt=S8.sorterAsc,F0e=NT(),VT=jE(),sv=El().getFromId,Xxt=ST(),Zxt=RT().redrawReglTraces,E8=b0e(),t1=E8.MINSELECT,$xt=F0e.filter,MN=F0e.tester,SN=t8(),M0e=SN.p2r,Kxt=SN.axValue,Jxt=SN.getTransform;function EN(e){return e.subplot!==void 0}function Qxt(e,t,r,n,a){var i=!EN(n),o=Uxt(a),s=Vxt(a),l=TN(a),u=HT(a),c=AN(a),f=a==="drawline",v=a==="drawcircle",g=f||v,p=n.gd,x=p._fullLayout,_=c&&x.newselection.mode==="immediate"&&i,y=x._zoomlayer,C=n.element.getBoundingClientRect(),k=n.plotinfo,S=Jxt(k),L=t-C.left,w=r-C.top;x._calcInverseTransform(p);var A=S8.apply3DTransform(x._invTransform)(L,w);L=A[0],w=A[1];var T=x._invScaleX,m=x._invScaleY,F=L,E=w,I="M"+L+","+w,R=n.xaxes[0],B=n.yaxes[0],O=R._length,V=B._length,j=e.altKey&&!(HT(a)&&l),q,U,J,ee,ce,ye,xe;R0e(e,p,n),o&&(q=$xt([[L,w]],E8.BENDPX));var ue=y.selectAll("path.select-outline-"+k.id).data([1]),K=u?x.newshape:x.newselection;u&&(n.hasText=K.label.text||K.label.texttemplate);var _e=u&&!l?K.fillcolor:"rgba(0,0,0,0)",ne=K.line.color||(i?UT.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");ue.enter().append("path").attr("class","select-outline select-outline-"+k.id).style({opacity:u?K.opacity/2:1,"stroke-dasharray":Bxt(K.line.dash,K.line.width),"stroke-width":K.line.width+"px","shape-rendering":"crispEdges"}).call(UT.stroke,ne).call(UT.fill,_e).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",S).attr("d",I+"Z");var ae=y.append("path").attr("class","zoombox-corners").style({fill:UT.background,stroke:UT.defaultLine,"stroke-width":1}).attr("transform",S).attr("d","M0,0Z");if(u&&n.hasText){var pe=y.select(".label-temp");pe.empty()&&(pe=y.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var ie=x._uid+E8.SELECTID,le=[],me=k8(p,n.xaxes,n.yaxes,n.subplot);_&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(i){var De=R._id,Ge=B._id;O0e(p,De,Ge,me);for(var ht=(p.layout||{}).selections||[],it=[],Oe=!1,ze=0;ze=0){p._fullLayout._deactivateShape(p);return}if(!u){var ht=x.clickmode;VT.done(ie).then(function(){if(VT.clear(ie),De===2){for(ue.remove(),ce=0;ce-1&&D0e(Ge,p,n.xaxes,n.yaxes,n.subplot,n,ue),ht==="event"&&YT(p,void 0);Oxt.click(p,Ge,k.id)}).catch(S8.error)}},n.doneFn=function(){ae.remove(),VT.done(ie).then(function(){VT.clear(ie),!_&&ee&&n.selectionDefs&&(ee.subtract=j,n.selectionDefs.push(ee),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,J)),(_||u)&&jT(n,_),n.doneFnCompleted&&n.doneFnCompleted(le),c&&YT(p,xe)}).catch(S8.error)}}function D0e(e,t,r,n,a,i,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],v,g,p,x,_,y,C,k,S,L;if(i2t(s)){R0e(e,t,i),v=k8(t,r,n,a);var w=a2t(s,v),A=w.pointNumbers.length>0;if(A?o2t(v,w):s2t(v)&&(C=E0e(w))){for(o&&o.remove(),L=0;L=0}function n2t(e){return e._fullLayout._activeSelectionIndex>=0}function jT(e,t){var r=e.dragmode,n=e.plotinfo,a=e.gd;r2t(a)&&a._fullLayout._deactivateShape(a),n2t(a)&&a._fullLayout._deactivateSelection(a);var i=a._fullLayout,o=i._zoomlayer,s=HT(r),l=AN(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&a._fullLayout._outlining){var c;s&&(c=Hxt(u,e)),c&>.call("_guiRelayout",a,{shapes:c});var f;l&&!EN(e)&&(f=jxt(u,e)),f&&(a._fullLayout._noEmitSelectedAtStart=!0,GT.call("_guiRelayout",a,{selections:f}).then(function(){t&&Wxt(a)})),a._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function S0e(e){return e._id}function k8(e,t,r,n){if(!e.calcdata)return[];var a=[],i=t.map(S0e),o=r.map(S0e),s,l,u;for(u=0;u0,i=a?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(i)>-1:!1}function o2t(e,t){var r=[],n,a,i,o;for(o=0;o0&&r.push(n);if(r.length===1&&(i=r[0]===t.searchInfo,i&&(a=t.searchInfo.cd[0].trace,a.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function WT(e,t,r){var n,a;for(n=0;n-1&&t;if(!o&&t){var De=k0e(e,!0);if(De.length){var Ge=De[0].xref,ht=De[0].yref;if(Ge&&ht){var it=N0e(De),Oe=U0e([sv(e,Ge,"x"),sv(e,ht,"y")]);Oe(le,it)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:be&&YT(e,le),v._reselect=!1}if(!o&&v._deselect){var ze=v._deselect;s=ze.xref,l=ze.yref,c2t(s,l,c)||O0e(e,s,l,n),be&&(le.points.length?YT(e,le):LN(e)),v._deselect=!1}return{eventData:le,selectionTesters:r}}function u2t(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";H0e.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}]});var ZT=fe((Q0r,j0e)=>{"use strict";j0e.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"axis ID followed by","*domain* (separated by a space), the position behaves like for","*paper*, but refers to the distance in fractions of the domain","length from the",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e,"axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var Fm=fe((tvr,X0e)=>{"use strict";var W0e=PN(),Y0e=Ds(),C8=rc(),p2t=Mo().templatedArray,evr=ZT();X0e.exports=p2t("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Y0e({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:W0e.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:W0e.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",C8.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",C8.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",C8.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",C8.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:Y0e({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var r1=fe((rvr,Z0e)=>{"use strict";Z0e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var n1=fe((nvr,$0e)=>{"use strict";$0e.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Ol=fe((ivr,ive)=>{"use strict";var K0e=pl().axisHoverFormat,{hovertemplateAttrs:g2t,texttemplateAttrs:m2t,templatefallbackAttrs:J0e}=Oo(),Q0e=_s(),y2t=Ds(),eve=Uc().dash,x2t=Uc().pattern,_2t=ea(),b2t=r1(),$T=ta().extendFlat,w2t=n1();function tve(e){return{valType:"any",dflt:0,editType:"calc"}}function rve(e){return{valType:"any",editType:"calc"}}function nve(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}ive.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:tve("x"),yperiod:tve("y"),xperiod0:rve("x0"),yperiod0:rve("y0"),xperiodalignment:nve("x"),yperiodalignment:nve("y"),xhoverformat:K0e("x"),yhoverformat:K0e("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:m2t(),texttemplatefallback:J0e({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:g2t({},{keys:b2t.eventDataKeys}),hovertemplatefallback:J0e(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:$T({},eve,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:w2t(!0),fillgradient:$T({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:x2t,marker:$T({symbol:{valType:"enumerated",values:_2t.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:$T({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:$T({},eve,{arrayOk:!0}),editType:"calc"},Q0e("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},Q0e("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:y2t({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var FN=fe((ovr,sve)=>{"use strict";var ave=Fm(),ove=Ol().line,T2t=Uc().dash,L8=ta().extendFlat,A2t=rl().overrideAll,M2t=Mo().templatedArray,avr=ZT();sve.exports=A2t(M2t("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:L8({},ave.xref,{}),yref:L8({},ave.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:ove.color,width:L8({},ove.width,{min:1,dflt:1}),dash:L8({},T2t,{dflt:"dot"})}}),"arraydraw","from-root")});var fve=fe((svr,cve)=>{"use strict";var lve=Xt(),P8=Yi(),S2t=Ah(),E2t=FN(),uve=Lm();cve.exports=function(t,r){S2t(t,r,{name:"selections",handleItemDefaults:k2t});for(var n=r.selections,a=0;a{"use strict";hve.exports=function(t,r,n){n("newselection.mode");var a=n("newselection.line.width");a&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var KT=fe((uvr,gve)=>{"use strict";var C2t=bi(),vve=Xt(),pve=El();gve.exports=function(t){return function(n,a){var i=n[t];if(Array.isArray(i))for(var o=C2t.subplotsRegistry.cartesian,s=o.idRegex,l=a._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,v=a._has("cartesian"),g=0;g{"use strict";var mve=yN(),JT=G0e();yve.exports={moduleType:"component",name:"selections",layoutAttributes:FN(),supplyLayoutDefaults:fve(),supplyDrawNewSelectionDefaults:dve(),includeBasePlot:KT()("selections"),draw:mve.draw,drawOne:mve.drawOne,reselect:JT.reselect,prepSelect:JT.prepSelect,clearOutline:JT.clearOutline,clearSelectionsCache:JT.clearSelectionsCache,selectOnClick:JT.selectOnClick}});var NN=fe((fvr,qve)=>{"use strict";var BN=xi(),lv=Xt(),xve=lv.numberFormat,L2t=Uk(),F8=bi(),Eve=lv.strTranslate,P2t=as(),RN=ni(),Dm=ea(),F2t=kl(),_ve=Yi(),D2t=np(),R2t=ed(),kve=$p(),D8=kve.selectingOrDrawing,I2t=kve.freeMode,z2t=nc().FROM_TL,q2t=ST(),B2t=RT().redrawReglTraces,O2t=Hs(),IN=El().getFromId,N2t=Ac().prepSelect,U2t=Ac().clearOutline,V2t=Ac().selectOnClick,DN=cN(),ON=rc(),bve=ON.MINDRAG,kd=ON.MINZOOM,wve=!0;function G2t(e,t,r,n,a,i,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,v,g,p,x,_,y,C,k,S,L,w,A,T,m,F,E,I,R,B,O,V,j;r+=t.yaxis._shift;function q(){if(f=t.xaxis,v=t.yaxis,k=f._length,S=v._length,y=f._offset,C=v._offset,g={},g[f._id]=f,p={},p[v._id]=v,o&&s)for(var nt=t.overlays,We=0;We=0){mt._fullLayout._deactivateShape(mt);return}var bt=mt._fullLayout.clickmode;if(qN(mt),nt===2&&!c&&Ke(),u)bt.indexOf("select")>-1&&V2t(We,mt,x,_,t.id,ee),bt.indexOf("event")>-1&&F2t.click(mt,We,t.id);else if(nt===1&&c){var Yt=o?v:f,jt=o==="s"||s==="w"?0:1,mr=Yt._name+".range["+jt+"]",or=H2t(Yt,jt),fr="left",Ot="middle";if(Yt.fixedrange)return;o?(Ot=o==="n"?"top":"bottom",Yt.side==="right"&&(fr="right")):s==="e"&&(fr="right"),mt._context.showAxisRangeEntryBoxes&&BN.select(J).call(P2t.makeEditable,{gd:mt,immediate:!0,background:mt._fullLayout.paper_bgcolor,text:String(or),fill:Yt.tickfont?Yt.tickfont.color:"#444",horizontalAlign:fr,verticalAlign:Ot}).on("edit",function(cr){var Ct=Yt.d2r(cr);Ct!==void 0&&F8.call("_guiRelayout",mt,mr,Ct)})}}R2t.init(ee);var xe,ue,K,_e,ne,ae,pe,ie,le,me;function be(nt,We,mt){var bt=J.getBoundingClientRect();xe=We-bt.left,ue=mt-bt.top,e._fullLayout._calcInverseTransform(e);var Yt=lv.apply3DTransform(e._fullLayout._invTransform)(xe,ue);xe=Yt[0],ue=Yt[1],K={l:xe,r:xe,w:0,t:ue,b:ue,h:0},_e=e._hmpixcount?e._hmlumcount/e._hmpixcount:RN.luminosity(e._fullLayout.plot_bgcolor),ne="M0,0H"+k+"V"+S+"H0V0",ae=!1,pe="xy",me=!1,ie=Pve(l,_e,y,C,ne),le=Fve(l,y,C)}function De(nt,We){if(e._transitioningWithDuration)return!1;var mt=Math.max(0,Math.min(k,V*nt+xe)),bt=Math.max(0,Math.min(S,j*We+ue)),Yt=Math.abs(mt-xe),jt=Math.abs(bt-ue);K.l=Math.min(xe,mt),K.r=Math.max(xe,mt),K.t=Math.min(ue,bt),K.b=Math.max(ue,bt);function mr(){pe="",K.r=K.l,K.t=K.b,le.attr("d","M0,0Z")}if(L.isSubplotConstrained)Yt>kd||jt>kd?(pe="xy",Yt/k>jt/S?(jt=Yt*S/k,ue>bt?K.t=ue-jt:K.b=ue+jt):(Yt=jt*k/S,xe>mt?K.l=xe-Yt:K.r=xe+Yt),le.attr("d",R8(K))):mr();else if(w.isSubplotConstrained)if(Yt>kd||jt>kd){pe="xy";var or=Math.min(K.l/k,(S-K.b)/S),fr=Math.max(K.r/k,(S-K.t)/S);K.l=or*k,K.r=fr*k,K.b=(1-or)*S,K.t=(1-fr)*S,le.attr("d",R8(K))}else mr();else!T||jt0){var cr;if(w.isSubplotConstrained||!A&&T.length===1){for(cr=0;cr1&&(mr.maxallowed!==void 0&&F===(mr.range[0]1&&(or.maxallowed!==void 0&&E===(or.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function W2t(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function Pve(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",Eve(r,n)).attr("d",a+"Z")}function Fve(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:RN.background,stroke:RN.defaultLine,"stroke-width":1,opacity:0}).attr("transform",Eve(t,r)).attr("d","M0,0Z")}function Dve(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Rve(e,t,a,i)}function Rve(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function qN(e){BN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Ive(e){wve&&e.data&&e._context.showTips&&(lv.notifier(lv._(e,"Double-click to zoom back out"),"long",e),wve=!1)}function Y2t(e,t){return"M"+(e.l-.5)+","+(t-kd-.5)+"h-3v"+(2*kd+1)+"h3ZM"+(e.r+.5)+","+(t-kd-.5)+"h3v"+(2*kd+1)+"h-3Z"}function X2t(e,t){return"M"+(t-kd-.5)+","+(e.t-.5)+"v-3h"+(2*kd+1)+"v3ZM"+(t-kd-.5)+","+(e.b+.5)+"v3h"+(2*kd+1)+"v-3Z"}function R8(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,kd)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function Mve(e,t,r,n,a){for(var i=!1,o={},s={},l,u,c,f,v=(a||{}).xaHash,g=(a||{}).yaHash,p=0;p{"use strict";var Z2t=xi(),I8=kl(),$2t=ed(),K2t=np(),ap=NN().makeDragBox,jc=rc().DRAGGERSIZE;z8.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Z2t.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var n=Object.keys(r._plots||{}).sort(function(i,o){if((r._plots[i].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=i.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[i].mainplot?1:-1});n.forEach(function(i){var o=r._plots[i],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=ap(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(v){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===i&&t._fullLayout._plots[i]&&I8.hover(t,v,i)},I8.hover(t,v,i),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=i},u.onmouseout=function(v){t._dragging||(t._fullLayout._hoversubplot=null,$2t.unhover(t,v))},t._context.showAxisDragHandles&&(ap(t,o,s._offset-jc,l._offset-jc,jc,jc,"n","w"),ap(t,o,s._offset+s._length,l._offset-jc,jc,jc,"n","e"),ap(t,o,s._offset-jc,l._offset+l._length,jc,jc,"s","w"),ap(t,o,s._offset+s._length,l._offset+l._length,jc,jc,"s","e"))}if(t._context.showAxisDragHandles){if(i===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=jc),ap(t,o,s._offset+s._length*.1,c,s._length*.8,jc,"","ew"),ap(t,o,s._offset,c,s._length*.1,jc,"","w"),ap(t,o,s._offset+s._length*.9,c,s._length*.1,jc,"","e")}if(i===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=jc),ap(t,o,f,l._offset+l._length*.1,jc,l._length*.8,"ns",""),ap(t,o,f,l._offset+l._length*.9,jc,l._length*.1,"s",""),ap(t,o,f,l._offset,jc,l._length*.1,"n","")}}});var a=r._hoverlayer.node();a.onmousemove=function(i){i.target=t._fullLayout._lasthover,I8.hover(t,i,r._hoversubplot)},a.onclick=function(i){i.target=t._fullLayout._lasthover,I8.click(t,i)},a.onmousedown=function(i){t._fullLayout._lasthover.onmousedown(i)},z8.updateFx(t)}};z8.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";K2t(t._draggers,r)}});var Nve=fe((dvr,Ove)=>{"use strict";var Bve=bi();Ove.exports=function(t){for(var r=Bve.layoutArrayContainers,n=Bve.layoutArrayRegexes,a=t.split("[")[0],i,o,s=0;s{"use strict";var J2t=em(),VN=PE(),QT=W1(),Q2t=VE().sorterAsc,GN=bi();eA.containerArrayMatch=Nve();var e_t=eA.isAddVal=function(t){return t==="add"||J2t(t)},Uve=eA.isRemoveVal=function(t){return t===null||t==="remove"};eA.applyContainerArrayChanges=function(t,r,n,a,i){var o=r.astr,s=GN.getComponentMethod(o,"supplyLayoutDefaults"),l=GN.getComponentMethod(o,"draw"),u=GN.getComponentMethod(o,"drawOne"),c=a.replot||a.recalc||s===VN||l===VN,f=t.layout,v=t._fullLayout;if(n[""]){Object.keys(n).length>1&&QT.warn("Full array edits are incompatible with other edits",o);var g=n[""][""];if(Uve(g))r.set(null);else if(Array.isArray(g))r.set(g);else return QT.warn("Unrecognized full array edit value",o,g),!0;return c?!1:(s(f,v),l(t),!0)}var p=Object.keys(n).map(Number).sort(Q2t),x=r.get(),_=x||[],y=i(v,o).get(),C=[],k=-1,S=_.length,L,w,A,T,m,F,E,I;for(L=0;L_.length-(E?0:1)){QT.warn("index out of range",o,A);continue}if(F!==void 0)m.length>1&&QT.warn("Insertion & removal are incompatible with edits to the same index.",o,A),Uve(F)?C.push(A):E?(F==="add"&&(F={}),_.splice(A,0,F),y&&y.splice(A,0,{})):QT.warn("Unrecognized full object edit value",o,A,F),k===-1&&(k=A);else for(w=0;w=0;L--)_.splice(C[L],1),y&&y.splice(C[L],1);if(_.length?x||r.set(_):r.set(null),c)return!1;if(s(f,v),u!==VN){var R;if(k===-1)R=p;else{for(S=Math.max(_.length,S),R=[],L=0;L=k));L++)R.push(A);for(L=k;L{"use strict";var Wve=aa(),Yve=bi(),id=Xt(),tA=Hs(),Xve=El(),rA=Xve.cleanId,t_t=Xve.getFromTrace,HN=Yve.traceIs,r_t=["x","y","z"];uv.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&id.log("Clearing previous rejected promises from queue."),e._promises=[]};uv.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(tA.subplotsRegistry.cartesian||{}).attrRegex,a=(tA.subplotsRegistry.polar||{}).attrRegex,i=(tA.subplotsRegistry.ternary||{}).attrRegex,o=(tA.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(_.x=1.02,_.xanchor="left"):_.x<-2&&(_.x=-.02,_.xanchor="right"),_.y>3?(_.y=1.02,_.yanchor="bottom"):_.y<-2&&(_.y=-.02,_.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),e.template&&e.template.layout&&uv.cleanLayout(e.template.layout),e};function c3(e,t,r=!1){var n=e[t],a=t.charAt(0);r&&Array.isArray(n)||n&&n!=="paper"&&(e[t]=rA(n,a,!0))}uv.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}uv.hasParent=function(e,t){for(var r=jve(t);r;){if(r in e)return!0;r=jve(r)}return!1};uv.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...n)=>n.every(a=>id.isPlainObject(a))||n.every(a=>Array.isArray(a));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;nid.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let a=e[n],i=t[n];if(a!==i&&!(r(a,i)?jN(a,i):!1))return!1}return!0}return!1};uv.collectionsAreEqual=jN});var Z8=fe(So=>{"use strict";var N8=xi(),a_t=aa(),o_t=Qq(),vi=Xt(),Ws=vi.nestedProperty,XN=Rb(),Cd=Ise(),cv=bi(),Y8=qb(),wa=Hs(),ad=Yi(),s_t=gO(),l_t=pf(),WN=ea(),u_t=ni(),c_t=UN().initInteractions,f_t=Q0(),h_t=Ac().clearOutline,epe=im().dfltConfig,B8=Vve(),zu=Zve(),cs=RT(),Rm=rl(),d_t=rc().AX_NAME_PATTERN,YN=0,$ve=5;function v_t(e,t,r,n){var a;if(e=vi.getGraphDiv(e),XN.init(e),vi.isPlainObject(t)){var i=t;t=i.data,r=i.layout,n=i.config,a=i.frames}var o=XN.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!vi.isPlotDiv(e)&&vi.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(a)return So.addFrames(e,a)}rpe(e,n),r||(r={}),N8.select(e).classed("js-plotly-plot",!0),WN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(zu.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=zu.cleanLayout(r)),wa.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(q_t(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),WN.initGradients(e),WN.initPatterns(e),l&&ad.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&wa.doCalcdata(e);for(var v=0;v=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function npe(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),V8(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&V8(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function x_t(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&c=0&&c0&&typeof T.parts[E]!="string";)E--;var I=T.parts[E],R=T.parts[E-1]+"."+I,B=T.parts.slice(0,E).join("."),O=Ws(e.layout,B).get(),V=Ws(n,B).get(),j=T.get();if(m!==void 0){y[A]=m,C[A]=I==="reverse"?m:ig(j);var q=Y8.getLayoutValObject(n,T.parts);if(q&&q.impliedEdits&&m!==null)for(var U in q.impliedEdits)k(vi.relativeAttr(A,U),q.impliedEdits[U]);if(["width","height"].indexOf(A)!==-1)if(m){k("autosize",null);var J=A==="height"?"width":"height";k(J,n[J])}else n[A]=e._initialAutoSize[A];else if(A==="autosize")k("width",m?null:n.width),k("height",m?null:n.height);else if(R.match(hpe))w(R),Ws(n,B+"._inputRange").set(null);else if(R.match(dpe)){w(R),Ws(n,B+"._inputRange").set(null);var ee=Ws(n,B).get();ee._inputDomain&&(ee._input.domain=ee._inputDomain.slice())}else R.match(T_t)&&Ws(n,B+"._inputDomain").set(null);if(I==="type"){L=O;var ce=V.type==="linear"&&m==="log",ye=V.type==="log"&&m==="linear";if(ce||ye){if(!L||!L.range)k(B+".autorange",!0);else if(V.autorange)ce&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var xe=L.range[0],ue=L.range[1];ce?(xe<=0&&ue<=0&&k(B+".autorange",!0),xe<=0?xe=ue/1e6:ue<=0&&(ue=xe/1e6),k(B+".range[0]",Math.log(xe)/Math.LN10),k(B+".range[1]",Math.log(ue)/Math.LN10)):(k(B+".range[0]",Math.pow(10,xe)),k(B+".range[1]",Math.pow(10,ue)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[T.parts[0]]&&T.parts[1]==="radialaxis"&&delete n[T.parts[0]]._subplot.viewInitial["radialaxis.range"],cv.getComponentMethod("annotations","convertCoords")(e,V,m,k),cv.getComponentMethod("images","convertCoords")(e,V,m,k)}else k(B+".autorange",!0),k(B+".range",null);Ws(n,B+"._inputRange").set(null)}else if(I.match(d_t)){var K=Ws(n,A).get(),_e=(m||{}).type;(!_e||_e==="-")&&(_e="linear"),cv.getComponentMethod("annotations","convertCoords")(e,K,_e,k),cv.getComponentMethod("images","convertCoords")(e,K,_e,k)}var ne=B8.containerArrayMatch(A);if(ne){c=ne.array,f=ne.index;var ae=ne.property,pe=q||{editType:"calc"};f!==""&&ae===""&&(B8.isAddVal(m)?C[A]=null:B8.isRemoveVal(m)?C[A]=(Ws(r,c).get()||[])[f]:vi.warn("unrecognized full object value",t)),Rm.update(_,pe),u[c]||(u[c]={});var ie=u[c][f];ie||(ie=u[c][f]={}),ie[ae]=m,delete t[A]}else I==="reverse"?(O.range?O.range.reverse():(k(B+".autorange",!0),O.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):(A==="dragmode"&&(m===!1&&j!==!1||m!==!1&&j===!1)||n._has("scatter-like")&&n._has("regl")&&A==="dragmode"&&(m==="lasso"||m==="select")&&!(j==="lasso"||j==="select")?_.plot=!0:q?Rm.update(_,q):_.calc=!0,T.set(m))}}for(c in u){var le=B8.applyContainerArrayChanges(e,i(r,c),u[c],_,i);le||(_.plot=!0)}for(var me in S){L=ad.getFromId(e,me);var be=L&&L._constraintGroup;if(be){_.calc=!0;for(var De in be)S[De]||(ad.getFromId(e,De)._constraintShrinkable=!0)}}(ppe(e)||t.height||t.width)&&(_.plot=!0);var Ge=n.shapes;for(f=0;f1;)if(n.pop(),r=Ws(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function S_t(e,t){for(var r=0;r[B,e._ev.listeners(B)]);i=So.newPlot(e,t,r,n).then(()=>{for(let[B,O]of R)O.forEach(V=>e.on(B,V));return So.react(e,t,r,n)})}else{e.data=t||[],zu.cleanData(e.data),e.layout=r||{},zu.cleanLayout(e.layout),k_t(e.data,e.layout,s,l),wa.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,v=e._fullLayout,g=v.datarevision===void 0,p=v.transition,x=P_t(e,l,v,g,p),_=x.newDataRevision,y=L_t(e,s,f,g,p,_);if(ppe(e)&&(x.layoutReplot=!0),y.calc||x.calc){e.calcdata=void 0;for(var C=Object.getOwnPropertyNames(v),k=0;k(c||e.emit("plotly_react",{config:n,data:t,layout:r}),e))}function L_t(e,t,r,n,a,i){var o=t.length===r.length;if(!a&&!o)return{fullReplot:!0,calc:!0};var s=Rm.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(g){var p=Y8.getTraceValObject(u,g);return!u._module.animatable&&p.anim&&(p.anim=!1),p}var f={getValObject:c,flags:s,immutable:n,transition:a,newDataRevision:i,gd:e},v={};for(l=0;l=a.length?a[0]:a[u]:a}function s(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var I=n._frameQueue.pop();I.onInterrupt&&I.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function v(I){if(I.length!==0){for(var R=0;Rn._timeToNext&&p()};I()}var _=0;function y(I){return Array.isArray(a)?_>=a.length?I.transitionOpts=a[_]:I.transitionOpts=a[0]:I.transitionOpts=a,_++,I}var C,k,S=[],L=t==null,w=Array.isArray(t),A=!L&&!w&&vi.isPlainObject(t);if(A)S.push({type:"object",data:y(vi.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(C=0;C0&&FF)&&E.push(k);S=E}}S.length>0?v(S):(e.emit("plotly_animated"),u())})}function D_t(e,t,r){if(e=vi.getGraphDiv(e),t==null)return Promise.resolve();if(!vi.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,a,i,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(vi.isPlainObject(t[n])){var v=t[n].name,g=(l[v]||f[v]||{}).name,p=t[n].name,x=l[g]||f[g];g&&p&&typeof p=="number"&&x&&YN<$ve&&(YN++,vi.warn('addFrames: overwriting frame "'+(l[g]||f[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),YN===$ve&&vi.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f[v]={name:v},c.push({frame:wa.supplyFrameDefaults(t[n]),index:r&&r[n]!==void 0&&r[n]!==null?r[n]:u+n})}c.sort(function(A,T){return A.index>T.index?-1:A.index=0;n--){if(a=c[n].frame,typeof a.name=="number"&&vi.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;l[a.name="frame "+e._transitionData._counter++];);if(l[a.name]){for(i=0;i=0;r--)n=t[r],i.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:a[n]});var s=wa.modifyFrames,l=wa.modifyFrames,u=[e,o],c=[e,i];return Cd&&Cd.add(e,s,u,l,c),wa.modifyFrames(e,i)}function I_t(e){e=vi.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return wa.cleanPlot([],{},r,t),wa.purge(e),XN.purge(e),t._container&&t._container.remove(),delete e._context,e}function z_t(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!vi.equalDomRects(r,t._lastBBox)){var n=t._invTransform=vi.inverseTransformMatrix(vi.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function q_t(e){var t=N8.select(e),r=e._fullLayout;if(r._calcInverseTransform=z_t,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n={};N8.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=vi.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(f_t.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var i=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=i.append("g").classed("imagelayer",!0),r._shapeUpperLayer=i.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}So.animate=F_t;So.addFrames=D_t;So.deleteFrames=R_t;So.addTraces=lpe;So.deleteTraces=upe;So.extendTraces=ope;So.moveTraces=ZN;So.prependTraces=spe;So.newPlot=y_t;So._doPlot=v_t;So.purge=I_t;So.react=C_t;So.redraw=m_t;So.relayout=nA;So.restyle=G8;So.setPlotConfig=p_t;So.update=j8;So._guiRelayout=$N(nA);So._guiRestyle=$N(G8);So._guiUpdate=$N(j8);So._storeDirectGUIEdit=w_t});var ag=fe(fv=>{"use strict";var B_t=bi();fv.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0};fv.getRedrawFunc=function(e){return function(){B_t.getComponentMethod("colorbar","draw")(e)}};fv.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};fv.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var gpe=window.URL||window.webkitURL;fv.createObjectURL=function(e){return gpe.createObjectURL(e)};fv.revokeObjectURL=function(e){return gpe.revokeObjectURL(e)};fv.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=O_t(window.atob(e));return new window.Blob([r],{type:"image/"+t})};fv.octetStream=function(e){document.location.href="data:application/octet-stream"+e};fv.getPlotTitle=function(e){var n,a,i,o;var t=e._fullLayout;if(t){var r=(n=t.title)==null?void 0:n.text;return r===((a=t._dfltTitle)==null?void 0:a.plot)?void 0:r}return(o=(i=e.layout)==null?void 0:i.title)==null?void 0:o.text};fv.getPlotSubtitle=function(e){var n,a,i,o,s,l;var t=e._fullLayout;if(t){var r=(a=(n=t.title)==null?void 0:n.subtitle)==null?void 0:a.text;return r===((i=t._dfltTitle)==null?void 0:i.subtitle)?void 0:r}return(l=(s=(o=e.layout)==null?void 0:o.title)==null?void 0:s.subtitle)==null?void 0:l.text};function O_t(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),a=0;a{"use strict";var JN=xi(),yvr=Xt(),N_t=ea(),U_t=ni(),xvr=Q0(),KN=/"/g,Qx="TOBESTRIPPED",V_t=new RegExp(`("${Qx})|(${Qx}")|("${Qx})|(${Qx}")`,"g"),G_t=["&","&","&",""",""",""","'","'","'"],H_t=["<","<","<"],j_t=[">",">",">"];function W_t(e){let t=JN.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,n=>{let a=n.toLowerCase();return G_t.includes(a)?n:H_t.includes(a)?"<":j_t.includes(a)?">":n.includes("<")||n.includes(">")?"":t.html(n).text()});return t.remove(),r}function Y_t(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}mpe.exports=function(t,r,n){var a=t._fullLayout,i=a._paper,o=a._toppaper,s=a.width,l=a.height,u;i.insert("rect",":first-child").call(N_t.setRect,0,0,s,l).call(U_t.fill,a.paper_bgcolor);var c=a._basePlotModules||[];for(u=0;u{"use strict";var X_t=Xt(),Z_t=Mx().EventEmitter,aA=ag();function $_t(e){var t=e.emitter||new Z_t,r=new Promise(function(n,a){var i=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,v=u*c,g=u*f,p=l.getContext("2d",{willReadFrequently:!0}),x=new i,_,y;s==="svg"||X_t.isSafari()?y=aA.encodeSVG(o):(_=aA.createBlob(o,"svg"),y=aA.createObjectURL(_)),l.width=v,l.height=g,x.onload=function(){var C;switch(_=null,aA.revokeObjectURL(y),s!=="svg"&&p.drawImage(x,0,0,v,g),s){case"jpeg":C=l.toDataURL("image/jpeg");break;case"png":C=l.toDataURL("image/png");break;case"webp":C=l.toDataURL("image/webp");break;case"svg":C=y;break;default:var k="Image format is not jpeg, png, svg or webp.";if(a(new Error(k)),!e.promise)return t.emit("error",k)}n(C),e.promise||t.emit("success",C)},x.onerror=function(C){if(_=null,aA.revokeObjectURL(y),a(C),!e.promise)return t.emit("error",C)},x.src=y});return e.promise?r:t}ype.exports=$_t});var eU=fe((wvr,bpe)=>{"use strict";var xpe=aa(),_pe=Z8(),K_t=Hs(),i1=Xt(),oA=ag(),J_t=$8(),Q_t=K8(),ebt=A4().version,QN={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function tbt(e,t){t=t||{};var r,n,a,i;i1.isPlainObject(e)?(r=e.data||[],n=e.layout||{},a=e.config||{},i={}):(e=i1.getGraphDiv(e),r=i1.extendDeep([],e.data),n=i1.extendDeep({},e.layout),a=e._context,i=e._fullLayout||{});function o(w){return!(w in t)||i1.validate(t[w],QN[w])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+i1.join2(QN.format.values,", "," or ")+".");var s={};function l(w,A){return i1.coerce(t,s,QN,w,A)}var u=l("format"),c=l("width"),f=l("height"),v=l("scale"),g=l("setBackground"),p=l("imageDataOnly"),x=document.createElement("div");x.style.position="absolute",x.style.left="-5000px",document.body.appendChild(x);var _=i1.extendFlat({},n);c?_.width=c:t.width===null&&xpe(i.width)&&(_.width=i.width),f?_.height=f:t.height===null&&xpe(i.height)&&(_.height=i.height);var y=i1.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:g}),C=oA.getRedrawFunc(x);function k(){return new Promise(function(w){setTimeout(w,oA.getDelay(x._fullLayout))})}function S(){return new Promise(function(w,A){var T=J_t(x,u,v),m=x._fullLayout.width,F=x._fullLayout.height;function E(){_pe.purge(x),document.body.removeChild(x)}if(u==="full-json"){var I=K_t.graphJson(x,!1,"object",!0,!0);return I.version=ebt,I=JSON.stringify(I),E(),w(p?I:oA.encodeJSON(I))}if(E(),u==="svg")return w(p?T:oA.encodeSVG(T));var R=document.createElement("canvas");R.id=i1.randstr(),Q_t({format:u,width:m,height:F,scale:v,canvas:R,svg:T,promise:!0}).then(w).catch(A)})}function L(w){return p?w.replace(oA.IMAGE_URL_PREFIX,""):w}return new Promise(function(w,A){_pe.newPlot(x,r,_,y).then(C).then(k).then(S).then(function(T){w(L(T))}).catch(function(T){A(T)})})}bpe.exports=tbt});var Ape=fe((Tvr,Tpe)=>{"use strict";var hv=Xt(),rbt=Hs(),nbt=qb(),ibt=im().dfltConfig,op=hv.isPlainObject,t2=Array.isArray,tU=hv.isArrayOrTypedArray;Tpe.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=nbt.get(),a=[],i={_context:hv.extendFlat({},ibt)},o,s;t2(t)?(i.data=hv.extendDeep([],t),o=t):(i.data=[],o=[],a.push(Wc("array","data"))),op(r)?(i.layout=hv.extendDeep({},r),s=r):(i.layout={},s={},arguments.length>1&&a.push(Wc("object","layout"))),rbt.supplyDefaults(i);for(var l=i._fullData,u=o.length,c=0;cf.length&&n.push(Wc("unused",a,u.concat(f.length)));var y=f.length,C=Array.isArray(_);C&&(y=Math.min(y,_.length));var k,S,L,w,A;if(v.dimensions===2)for(S=0;Sf[S].length&&n.push(Wc("unused",a,u.concat(S,f[S].length)));var T=f[S].length;for(k=0;k<(C?Math.min(T,_[S].length):T);k++)L=C?_[S][k]:_,w=c[S][k],A=f[S][k],hv.validate(w,L)?A!==w&&A!==+w&&n.push(Wc("dynamic",a,u.concat(S,k),w,A)):n.push(Wc("value",a,u.concat(S,k),w))}else n.push(Wc("array",a,u.concat(S),c[S]));else for(S=0;S{"use strict";var fbt=Xt(),Q8=ag();function hbt(e,t,r){var n=document.createElement("a"),a="download"in n,i=new Promise(function(o,s){var l,u;if(a)return l=Q8.createBlob(e,r),u=Q8.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),Q8.revokeObjectURL(u),l=null,o(t);if(fbt.isSafari()){var c=r==="svg"?",":";base64,";return Q8.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return i}Mpe.exports=hbt});var rU=fe((Mvr,Lpe)=>{"use strict";var eC=Xt(),Epe=as(),dbt=eU(),vbt=Spe(),kpe=ag(),Cpe=40;function pbt(e,t){var r;return eC.isPlainObject(e)||(r=eC.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,a){r&&r._snapshotInProgress&&a(new Error("Image capture already in progress.")),r&&(r._snapshotInProgress=!0);var i=dbt(e,t),o=t.filename||e.fn;if(!o){let l=kpe.getPlotTitle(e);if(l&&!Epe.matchTex(l))o=eC.slugify(l,Cpe);else{let u=kpe.getPlotSubtitle(e);u&&!Epe.matchTex(u)&&(o=eC.slugify(u,Cpe))}}var s=o||"plot-image";s+="."+t.format.replace("-","."),i.then(function(l){return r&&(r._snapshotInProgress=!1),vbt(l,s,t.format)}).then(function(l){n(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),a(l)})})}Lpe.exports=pbt});var Ipe=fe(nU=>{"use strict";var n0=Xt(),i0=n0.isPlainObject,Ppe=qb(),Fpe=Hs(),gbt=Ho(),Dpe=Mo(),Rpe=im().dfltConfig;nU.makeTemplate=function(e){e=n0.isPlainObject(e)?e:n0.getGraphDiv(e),e=n0.extendDeep({_context:Rpe},{data:e.data,layout:e.layout}),Fpe.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(g){var p={};sA(g,p,ybt.bind(null,g));var x=n0.coerce(g,{},gbt,"type"),_=n.data[x];_||(_=n.data[x]=[]),_.push(p)}),sA(r,n.layout,mbt.bind(null,r)),delete n.layout.template;var a=r.template;if(i0(a)){var i=a.layout,o,s,l,u,c,f;i0(i)&&tC(i,n.layout);var v=a.data;if(i0(v)){for(s in n.data)if(l=v[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;oy?o.push({code:"unused",traceType:g,templateCount:_,dataCount:y}):y>_&&o.push({code:"reused",traceType:g,templateCount:_,dataCount:y})}}function C(k,S){for(var L in k)if(L.charAt(0)!=="_"){var w=k[L],A=dv(k,L,S);i0(w)?(Array.isArray(k)&&w._template===!1&&w.templateitemname&&o.push({code:"missing",path:A,templateitemname:w.templateitemname}),C(w,A)):Array.isArray(w)&&xbt(w)&&C(w,A)}}if(C({data:l,layout:s},""),o.length)return o.map(_bt)};function xbt(e){for(var t=0;t{"use strict";var Mc=Z8();xl._doPlot=Mc._doPlot;xl.newPlot=Mc.newPlot;xl.restyle=Mc.restyle;xl.relayout=Mc.relayout;xl.redraw=Mc.redraw;xl.update=Mc.update;xl._guiRestyle=Mc._guiRestyle;xl._guiRelayout=Mc._guiRelayout;xl._guiUpdate=Mc._guiUpdate;xl._storeDirectGUIEdit=Mc._storeDirectGUIEdit;xl.react=Mc.react;xl.extendTraces=Mc.extendTraces;xl.prependTraces=Mc.prependTraces;xl.addTraces=Mc.addTraces;xl.deleteTraces=Mc.deleteTraces;xl.moveTraces=Mc.moveTraces;xl.purge=Mc.purge;xl.addFrames=Mc.addFrames;xl.deleteFrames=Mc.deleteFrames;xl.animate=Mc.animate;xl.setPlotConfig=Mc.setPlotConfig;var bbt=X4().getGraphDiv,wbt=d8().eraseActiveShape;xl.deleteActiveShape=function(e){return wbt(bbt(e))};xl.toImage=eU();xl.validate=Ape();xl.downloadImage=rU();var zpe=Ipe();xl.makeTemplate=zpe.makeTemplate;xl.validateTemplate=zpe.validateTemplate});var r2=fe((kvr,Bpe)=>{"use strict";var iU=Xt(),Tbt=bi();Bpe.exports=function(t,r,n,a){var i=a("x"),o=a("y"),s,l=Tbt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),i){var u=iU.minRowLength(i);o?s=Math.min(u,iU.minRowLength(o)):(s=u,a("y0"),a("dy"))}else{if(!o)return 0;s=iU.minRowLength(o),a("x0"),a("dx")}return r._length=s,s}});var sp=fe((Cvr,Upe)=>{"use strict";var Ope=Xt().dateTick0,Abt=Wa(),Mbt=Abt.ONEWEEK;function Npe(e,t){return e%Mbt===0?Ope(t,1):Ope(t,0)}Upe.exports=function(t,r,n,a,i){if(i||(i={x:!0,y:!0}),i.x){var o=a("xperiod");o&&(a("xperiod0",Npe(o,r.xcalendar)),a("xperiodalignment"))}if(i.y){var s=a("yperiod");s&&(a("yperiod0",Npe(s,r.ycalendar)),a("yperiodalignment"))}}});var Hpe=fe((Lvr,Gpe)=>{"use strict";var Vpe=["orientation","groupnorm","stackgaps"];Gpe.exports=function(t,r,n,a){var i=n._scatterStackOpts,o=a("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=i[s];l||(l=i[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},v=0;v{"use strict";var jpe=ni(),Wpe=Wf().hasColorscale,Ype=Vc(),Sbt=Is();Xpe.exports=function(t,r,n,a,i,o={}){var s=Sbt.isBubble(t),l=(t.line||{}).color,u;if(l&&(n=l),i("marker.symbol"),i("marker.opacity",s?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",n),Wpe(t,"marker")&&Ype(t,r,a,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=jpe.background:u=jpe.defaultLine,i("marker.line.color",u),Wpe(t,"marker.line")&&Ype(t,r,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",s?1:0),o.noLineDash||i("marker.line.dash")),s&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var c=i("marker.gradient.type");c!=="none"&&i("marker.gradient.color")}}});var lp=fe((Fvr,Zpe)=>{"use strict";var Ebt=Xt().isArrayOrTypedArray,kbt=Wf().hasColorscale,Cbt=Vc();Zpe.exports=function(t,r,n,a,i,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),i("line.color",n),kbt(t,"line"))Cbt(t,r,a,i,{prefix:"line.",cLetter:"c"});else{var l=(Ebt(s)?!1:s)||n;i("line.color",l)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var f3=fe((Dvr,$pe)=>{"use strict";$pe.exports=function(t,r,n){var a=n("line.shape");a==="spline"&&n("line.smoothing")}});var up=fe((Rvr,Kpe)=>{"use strict";var Lbt=Xt();Kpe.exports=function(e,t,r,n,a){a=a||{},n("textposition"),Lbt.coerceFont(n,"textfont",a.font||r.font,a),a.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var a1=fe((Ivr,Qpe)=>{"use strict";var nC=ni(),Jpe=Xt().isArrayOrTypedArray;function Pbt(e){for(var t=nC.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var e1e=Xt(),Fbt=bi(),Dbt=Ol(),Rbt=r1(),h3=Is(),Ibt=r2(),zbt=sp(),qbt=Hpe(),Bbt=vv(),Obt=lp(),t1e=f3(),Nbt=up(),Ubt=a1(),Vbt=Xt().coercePattern;r1e.exports=function(t,r,n,a){function i(g,p){return e1e.coerce(t,r,Dbt,g,p)}var o=Ibt(t,r,a,i);if(o||(r.visible=!1),!!r.visible){zbt(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var s=qbt(t,r,a,i);a.scattermode==="group"&&r.orientation===void 0&&i("orientation","v");var l=!s&&o{"use strict";var Gbt=Jx().getAxisGroup;i1e.exports=function(t,r,n,a,i){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=Gbt(n,s)+o,u=n._alignmentOpts||{},c=a("alignmentgroup"),f=u[l];f||(f=u[l]={});var v=f[c];v?v.traces.push(r):v=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var g=a("offsetgroup")||"",p=v.offsetGroups,x=p[g];r._offsetIndex=0,(i!=="group"||g)&&(x||(x=p[g]={offsetIndex:Object.keys(p).length}),r._offsetIndex=x.offsetIndex)}});var aU=fe((Bvr,a1e)=>{"use strict";var Hbt=Xt(),jbt=n2(),Wbt=Ol();a1e.exports=function(t,r){var n,a,i,o=r.scattermode;function s(v){return Hbt.coerce(a._input,a,Wbt,v)}if(r.scattermode==="group")for(i=0;i=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var s1e=fe((Ovr,o1e)=>{"use strict";var Ybt=Xt(),Xbt=nk();o1e.exports=function(e,t){function r(a,i){return Ybt.coerce(e,t,Xbt,a,i)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var cp=fe((Nvr,u1e)=>{"use strict";var Zbt=aa(),l1e=Xt(),$bt=l1e.dateTime2ms,iC=l1e.incrementMonth,Kbt=Wa(),Jbt=Kbt.ONEAVGMONTH;u1e.exports=function(t,r,n,a){if(r.type!=="date")return{vals:a};var i=t[n+"periodalignment"];if(!i)return{vals:a};var o=t[n+"period"],s;if(Zbt(o)){if(o=+o,o<=0)return{vals:a}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:a}}for(var u=r.calendar,c=i==="start",f=i==="end",v=t[n+"period0"],g=$bt(v,u)||0,p=[],x=[],_=[],y=a.length,C=0;Ck;)w=iC(w,-s,u);for(;w<=k;)w=iC(w,s,u);L=iC(w,-s,u)}else{for(S=Math.round((k-g)/o),w=g+S*o;w>k;)w-=o;for(;w<=k;)w+=o;L=w-o}p[C]=c?L:f?w:(L+w)/2,x[C]=L,_[C]=w}return{vals:p,starts:x,ends:_}}});var pv=fe((Uvr,f1e)=>{"use strict";var oU=Wf().hasColorscale,sU=Mh(),c1e=Is();f1e.exports=function(t,r){c1e.hasLines(r)&&oU(r,"line")&&sU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),c1e.hasMarkers(r)&&(oU(r,"marker")&&sU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),oU(r,"marker.line")&&sU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var o1=fe((Vvr,h1e)=>{"use strict";var ru=Xt();h1e.exports=function(t,r){for(var n=0;n{"use strict";var d1e=Xt();v1e.exports=function(t,r){d1e.isArrayOrTypedArray(r.selectedpoints)&&d1e.tagSelected(t,r)}});var gv=fe((Hvr,b1e)=>{"use strict";var p1e=aa(),uU=Xt(),lA=Yi(),g1e=cp(),lU=Wa().BADNUM,cU=Is(),Qbt=pv(),e3t=o1(),t3t=P0();function r3t(e,t){var r=e._fullLayout,n=t._xA=lA.getFromId(e,t.xaxis||"x","x"),a=t._yA=lA.getFromId(e,t.yaxis||"y","y"),i=n.makeCalcdata(t,"x"),o=a.makeCalcdata(t,"y"),s=g1e(t,n,"x",i),l=g1e(t,a,"y",o),u=s.vals,c=l.vals,f=t._length,v=new Array(f),g=t.ids,p=fU(t,r,n,a),x=!1,_,y,C,k,S,L;x1e(r,t);var w="x",A="y",T;if(p)uU.pushUnique(p.traceIndices,t.index),_=p.orientation==="v",_?(A="s",T="x"):(w="s",T="y"),S=p.stackgaps==="interpolate";else{var m=y1e(t,f);m1e(e,t,n,a,u,c,m)}var F=!!t.xperiodalignment,E=!!t.yperiodalignment;for(y=0;yy&&v[k].gap;)k--;for(L=v[k].s,C=v.length-1;C>k;C--)v[C].s=L;for(;y{"use strict";w1e.exports=aC;var n3t=Xt().distinctVals;function aC(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),a=[],i=0;i{"use strict";A1e.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var i2=fe((Yvr,k1e)=>{"use strict";var mv=aa(),{isArrayOrTypedArray:og}=Xt(),{BADNUM:d3}=Wa(),i3t=bi(),uA=Yi(),{getAxisGroup:a3t}=Jx(),oC=T1e(),{TEXTPAD:o3t}=Im(),{LINE_SPACING:s3t}=nc(),{BR_TAG_ALL:l3t}=as();function u3t(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!mv(s))}for(var c=0;cn(i))):n(e.text);let a=e.outsidetextfont.size*s3t*r+o3t;return{ppadplus:t.some(i=>i.s<0)?a:0,ppadminus:t.some(i=>i.s>=0)?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function x3t(e,t,r,n){for(var a=v3(n),i=0;i{"use strict";var C1e=gv(),L1e=i2().setGroupPositions;function b3t(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,s=[],l=[],u=0;um[c]&&c{"use strict";var T3t=ea(),z1e=Wa(),cA=z1e.BADNUM,q1e=z1e.LOG_CLIP,D1e=q1e+.5,R1e=q1e-.5,sC=Xt(),A3t=sC.segmentsIntersect,I1e=sC.constrain,yU=r1();B1e.exports=function(t,r){var n=r.trace||{},a=r.xaxis,i=r.yaxis,o=a.type==="log",s=i.type==="log",l=a._length,u=i._length,c=r.backoff,f=n.marker,v=r.connectGaps,g=r.baseTolerance,p=r.shape,x=p==="linear",_=n.fill&&n.fill!=="none",y=[],C=yU.minTolerance,k=t.length,S=new Array(k),L=0,w,A,T,m,F,E,I,R,B,O,V,j,q,U,J,ee;function ce(Ot){var cr=t[Ot];if(!cr)return!1;var Ct=r.linearized?a.l2p(cr.x):a.c2p(cr.x),wt=r.linearized?i.l2p(cr.y):i.c2p(cr.y);if(Ct===cA){if(o&&(Ct=a.c2p(cr.x,!0)),Ct===cA)return!1;s&&wt===cA&&(Ct*=Math.abs(a._m*u*(a._m>0?D1e:R1e)/(i._m*l*(i._m>0?D1e:R1e)))),Ct*=1e3}if(wt===cA){if(s&&(wt=i.c2p(cr.y,!0)),wt===cA)return!1;wt*=1e3}return[Ct,wt]}function ye(Ot,cr,Ct,wt){var Tt=Ct-Ot,Mt=wt-cr,Lt=.5-Ot,ft=.5-cr,kt=Tt*Tt+Mt*Mt,rr=Tt*Lt+Mt*ft;if(rr>0&&rr1||Math.abs(Lt.y-Ct[0][1])>1)&&(Lt=[Lt.x,Lt.y],wt&&_e(Lt,Ot)<_e(Ct[0],Ot)?Ct.unshift(Lt):Ct.push(Lt),wt++)}return Ct}function ct(Ot){if(Ot[0]pe||Ot[1]le)return[I1e(Ot[0],ae,pe),I1e(Ot[1],ie,le)]}function et(Ot,cr){if(Ot[0]===cr[0]&&(Ot[0]===ae||Ot[0]===pe)||Ot[1]===cr[1]&&(Ot[1]===ie||Ot[1]===le))return!0}function qe(Ot,cr){var Ct=[],wt=ct(Ot),Tt=ct(cr);return wt&&Tt&&et(wt,Tt)||(wt&&Ct.push(wt),Tt&&Ct.push(Tt)),Ct}function we(Ot,cr,Ct){return function(wt,Tt){var Mt=ct(wt),Lt=ct(Tt),ft=[];if(Mt&&Lt&&et(Mt,Lt))return ft;Mt&&ft.push(Mt),Lt&&ft.push(Lt);var kt=2*sC.constrain((wt[Ot]+Tt[Ot])/2,cr,Ct)-((Mt||wt)[Ot]+(Lt||Tt)[Ot]);if(kt){var rr;Mt&&Lt?rr=kt>0==Mt[Ot]>Lt[Ot]?Mt:Lt:rr=Mt||Lt,rr[Ot]+=kt}return ft}}var Le;p==="linear"||p==="spline"?Le=ze:p==="hv"||p==="vh"?Le=qe:p==="hvh"?Le=we(0,ae,pe):p==="vhv"&&(Le=we(1,ie,le));function Ke(Ot,cr){var Ct=cr[0]-Ot[0],wt=(cr[1]-Ot[1])/Ct,Tt=(Ot[1]*cr[0]-cr[1]*Ot[0])/Ct;return Tt>0?[wt>0?ae:pe,le]:[wt>0?pe:ae,ie]}function Te(Ot){var cr=Ot[0],Ct=Ot[1],wt=cr===S[L-1][0],Tt=Ct===S[L-1][1];if(!(wt&&Tt))if(L>1){var Mt=cr===S[L-2][0],Lt=Ct===S[L-2][1];wt&&(cr===ae||cr===pe)&&Mt?Lt?L--:S[L-1]=Ot:Tt&&(Ct===ie||Ct===le)&&Lt?Mt?L--:S[L-1]=Ot:S[L++]=Ot}else S[L++]=Ot}function Ve(Ot){S[L-1][0]!==Ot[0]&&S[L-1][1]!==Ot[1]&&Te([Ge,ht]),Te(Ot),it=null,Ge=ht=0}var $e=sC.isArrayOrTypedArray(f);function ot(Ot){if(Ot&&c&&(Ot.i=w,Ot.d=t,Ot.trace=n,Ot.marker=$e?f[Ot.i]:f,Ot.backoff=c),xe=Ot[0]/l,ue=Ot[1]/u,be=Ot[0]pe?pe:0,De=Ot[1]le?le:0,be||De){if(!L)S[L++]=[be||Ot[0],De||Ot[1]];else if(it){var cr=Le(it,Ot);cr.length>1&&(Ve(cr[0]),S[L++]=cr[1])}else Oe=Le(S[L-1],Ot)[0],S[L++]=Oe;var Ct=S[L-1];be&&De&&(Ct[0]!==be||Ct[1]!==De)?(it&&(Ge!==be&&ht!==De?Te(Ge&&ht?Ke(it,Ot):[Ge||be,ht||De]):Ge&&ht&&Te([Ge,ht])),Te([be,De])):Ge-be&&ht-De&&Te([be||Ge,De||ht]),it=Ot,Ge=be,ht=De}else it&&Ve(Le(it,Ot)[0]),S[L++]=Ot}for(w=0;wK(E,tt))break;T=E,q=B[0]*R[0]+B[1]*R[1],q>V?(V=q,m=E,I=!1):q=t.length||!E)break;ot(E),A=E}}it&&Te([Ge||it[0],ht||it[1]]),y.push(S.slice(0,L))}var nt=p.slice(p.length-1);if(c&&nt!=="h"&&nt!=="v"){for(var We=!1,mt=-1,bt=[],Yt=0;Yt{"use strict";var O1e={tonextx:1,tonexty:1,tonext:1};N1e.exports=function(t,r,n){var a,i,o,s,l,u={},c=!1,f=-1,v=0,g=-1;for(i=0;i=0?l=g:(l=g=v,v++),l{"use strict";var fp=xi(),M3t=bi(),fA=Xt(),p3=fA.ensureSingle,V1e=fA.identity,pu=ea(),g3=Is(),S3t=xU(),E3t=_U(),lC=NT().tester;G1e.exports=function(t,r,n,a,i,o){var s,l,u=!i,c=!!i&&i.duration>0,f=E3t(t,r,n);if(s=a.selectAll("g.trace").data(f,function(g){return g[0].trace.uid}),s.enter().append("g").attr("class",function(g){return"trace scatter trace"+g[0].trace.uid}).style("stroke-miterlimit",2),s.order(),k3t(t,s,r),c){o&&(l=o());var v=fp.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});v.each(function(){a.selectAll("g.trace").each(function(g,p){U1e(t,p,r,g,f,this,i)})})}else s.each(function(g,p){U1e(t,p,r,g,f,this,i)});u&&s.exit().remove(),a.selectAll("path:not([d])").remove()};function k3t(e,t,r){t.each(function(n){var a=p3(fp.select(this),"g","fills");pu.setClipUrl(a,r.layerClipId,e);var i=n[0].trace;i._ownFill=null,i._nextFill=null;var o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var s=a.selectAll("g").data(o,V1e);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){i[l]=p3(fp.select(this),"path","js-fill")})})}function U1e(e,t,r,n,a,i,o){var s=e._context.staticPlot,l;C3t(e,t,r,n,a);var u=!!o&&o.duration>0;function c(we){return u?we.transition():we}var f=r.xaxis,v=r.yaxis,g=n[0].trace,p=g.line,x=fp.select(i),_=p3(x,"g","errorbars"),y=p3(x,"g","lines"),C=p3(x,"g","points"),k=p3(x,"g","text");if(M3t.getComponentMethod("errorbars","plot")(e,_,r,o),g.visible!==!0)return;c(x).style("opacity",g.opacity);var S,L,w=g.fill.charAt(g.fill.length-1);w!=="x"&&w!=="y"&&(w="");var A,T;w==="y"?(A=1,T=v.c2p(0,!0)):w==="x"&&(A=0,T=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=x;var m="",F=[],E=g._prevtrace,I=null,R=null;E&&(m=E._prevRevpath||"",L=E._nextFill,F=E._ownPolygons,I=E._fillsegments,R=E._fillElement);var B,O,V="",j="",q,U,J,ee,ce,ye,xe=[];g._polygons=[];var ue=[],K=[],_e=fA.noop;if(S=g._ownFill,g3.hasLines(g)||g.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(q=pu.steps(p.shape),U=pu.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?q=U=function(we){var Le=we[we.length-1];return we.length>1&&we[0][0]===Le[0]&&we[0][1]===Le[1]?pu.smoothclosed(we.slice(1),p.smoothing):pu.smoothopen(we,p.smoothing)}:q=U=function(we){return"M"+we.join("L")},J=function(we){return U(we.reverse())},K=S3t(n,{xaxis:f,yaxis:v,trace:g,connectGaps:g.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:g.fill}),ue=new Array(K.length);var ne=0;for(l=0;l=s[0]&&x.x<=s[1]&&x.y>=l[0]&&x.y<=l[1]}),v=Math.ceil(f.length/c),g=0;a.forEach(function(x,_){var y=x[0].trace;g3.hasMarkers(y)&&y.marker.maxdisplayed>0&&_{"use strict";H1e.exports={container:"marker",min:"cmin",max:"cmax"}});var cC=fe((Qvr,j1e)=>{"use strict";var uC=Yi();j1e.exports=function(t,r,n){var a={},i={_fullLayout:n},o=uC.getFromTrace(i,r,"x"),s=uC.getFromTrace(i,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),a.xLabel=uC.tickText(o,o.c2l(l),!0).text,a.yLabel=uC.tickText(s,s.c2l(u),!0).text,a}});var Ld=fe((epr,W1e)=>{"use strict";var bU=xi(),y3=ea(),L3t=bi();function P3t(e){var t=bU.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var n=bU.select(this),a=r.trace||r[0].trace;wU(n,a,e)}),t.selectAll("g.text").each(function(r){var n=bU.select(this),a=r.trace||r[0].trace;TU(n,a,e)}),t.selectAll("g.trace path.js-line").call(y3.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(y3.fillGroupStyle,e,!1),L3t.getComponentMethod("errorbars","style")(t)}function wU(e,t,r){y3.pointStyle(e.selectAll("path.point"),t,r)}function TU(e,t,r){y3.textPointStyle(e.selectAll("text"),t,r)}function F3t(e,t,r){var n=t[0].trace;n.selectedpoints?(y3.selectedPointStyle(r.selectAll("path.point"),n),y3.selectedTextStyle(r.selectAll("text"),n)):(wU(r,n,e),TU(r,n,e))}W1e.exports={style:P3t,stylePoints:wU,styleText:TU,styleOnSelect:F3t}});var _3=fe((tpr,Y1e)=>{"use strict";var x3=ni(),D3t=Is();Y1e.exports=function(t,r){var n,a;if(t.mode==="lines")return n=t.line.color,n&&x3.opacity(n)?n:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var i=r.mcc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return a=i&&x3.opacity(i)?i:o&&x3.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",a?x3.opacity(a)<.3?x3.addOpacity(a,.3):a:(n=(t.line||{}).color,n&&x3.opacity(n)&&D3t.hasLines(t)&&t.line.width?n:t.fillcolor)}});var b3=fe((rpr,Z1e)=>{"use strict";var fC=Xt(),X1e=kl(),R3t=bi(),I3t=_3(),AU=ni(),z3t=fC.fillText;Z1e.exports=function(t,r,n,a){var i=t.cd,o=i[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],v=o.hoveron||"",g=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,x=!!o.yperiodalignment;if(v.indexOf("points")!==-1){var _=function(j){if(p){var q=s.c2p(j.xStart),U=s.c2p(j.xEnd);return u>=Math.min(q,U)&&u<=Math.max(q,U)?0:1/0}var J=Math.max(3,j.mrc||0),ee=1-1/J,ce=Math.abs(s.c2p(j.x)-u);return ce=Math.min(q,U)&&c<=Math.max(q,U)?0:1/0}var J=Math.max(3,j.mrc||0),ee=1-1/J,ce=Math.abs(l.c2p(j.y)-c);return cexe!=le>=xe&&(ae=_e[K-1][0],pe=_e[K][0],le-ie&&(ne=ae+(pe-ae)*(xe-ie)/(le-ie),J=Math.min(J,ne),ee=Math.max(ee,ne)));return J=Math.max(J,0),ee=Math.min(ee,s._length),{x0:J,x1:ee,y0:xe,y1:xe}}if(v.indexOf("fills")!==-1&&o._fillElement){var B=I(o._fillElement)&&!I(o._fillExclusionElement);if(B){var O=R(o._polygons);O===null&&(O={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var V=AU.defaultLine;return AU.opacity(o.fillcolor)?V=o.fillcolor:AU.opacity((o.line||{}).color)&&(V=o.line.color),fC.extendFlat(t,{distance:t.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:V,hovertemplate:!1}),delete t.index,o.text&&!fC.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var a2=fe((npr,K1e)=>{"use strict";var $1e=Is();K1e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l,u,c,f,v=s.mode&&!$1e.hasMarkers(s)&&!$1e.hasText(s);if(v)return[];if(r===!1)for(l=0;l{"use strict";J1e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var SU=fe((apr,rge)=>{"use strict";var hC=bi().traceIs,MU=Yb();rge.exports=function(t,r,n,a){n("autotypenumbers",a.autotypenumbersDflt);var i=n("type",(a.splomStash||{}).type);i==="-"&&(q3t(r,a.data),r.type==="-"?r.type="linear":t.type=r.type)};function q3t(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),a;r.indexOf("scene")!==-1&&(r=n);var i=B3t(t,r,n);if(i){if(i.type==="histogram"&&n==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=n+"calendar",s=i[o],l={noMultiCategory:!hC(i,"cartesian")||hC(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&n==={h:"x",v:"y"}[i.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,tge(i,n)){var u=ege(i),c=[];for(a=0;a0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(tge(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}function ege(e){return{v:"x",h:"y"}[e.orientation||"v"]}function tge(e,t){var r=ege(e),n=hC(e,"box-violin");return n&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var dC=fe((opr,nge)=>{"use strict";var O3t=Gf().isTypedArraySpec;function N3t(e,t){var r=t.dataAttr||e._id.charAt(0),n={},a,i,o;if(t.axData)a=t.axData;else for(a=[],i=0;i0||O3t(i),s;o&&(s="array");var l=n("categoryorder",s),u;l==="array"&&(u=n("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=N3t(r,a).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var hA=fe((spr,age)=>{"use strict";var ige=ni(),U3t=tc(),V3t=Xt();age.exports=function(t,r,n,a){a=a||{};var i=a.dfltColor;function o(T,m){return V3t.coerce2(t,r,a.attributes,T,m)}var s=o("linecolor",i),l=o("linewidth"),u=n("showline",a.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=ige.mix(i,a.bgColor,a.blend||U3t.lightFraction),f=o("gridcolor",c),v=o("gridwidth"),g=o("griddash"),p=n("showgrid",a.showGrid||!!f||!!v||!!g);if(p||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),a.hasMinor){var x=ige.mix(r.gridcolor,a.bgColor,67),_=o("minor.gridcolor",x),y=o("minor.gridwidth",r.gridwidth||1),C=o("minor.griddash",r.griddash||"solid"),k=n("minor.showgrid",!!_||!!y||!!C);k||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!a.noZeroLine){var S=o("zerolinelayer"),L=o("zerolinecolor",i),w=o("zerolinewidth"),A=n("zeroline",a.showGrid||!!L||!!w);A||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var vA=fe((lpr,fge)=>{"use strict";var oge=aa(),G3t=bi(),dA=Xt(),H3t=Mo(),j3t=Ah(),EU=pf(),sge=Fx(),lge=Ub(),W3t=gm(),Y3t=mm(),X3t=dC(),Z3t=hA(),$3t=gO(),uge=Hp(),vC=rc().WEEKDAY_PATTERN,K3t=rc().HOUR_PATTERN;fge.exports=function(t,r,n,a,i){var o=a.letter,s=a.font||{},l=a.splomStash||{},u=n("visible",!a.visibleDflt),c=r._template||{},f=r.type||c.type||"-",v;if(f==="date"){var g=G3t.getComponentMethod("calendars","handleDefaults");g(t,r,"calendar",a.calendar),a.noTicklabelmode||(v=n("ticklabelmode"))}!a.noTicklabelindex&&(f==="date"||f==="linear")&&n("ticklabelindex");var p="";(!a.noTicklabelposition||f==="multicategory")&&(p=dA.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),a.noTicklabeloverflow||n("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),uge(r,i),$3t(t,r,n,a),X3t(t,r,n,a),a.noHover||(f!=="category"&&n("hoverformat"),a.noUnifiedhovertitle||n("unifiedhovertitle.text"));var x=n("color"),_=x!==EU.color.dflt?x:s.color,y=l.label||i._dfltTitle[o];if(Y3t(t,r,n,f,a),!u)return r;n("title.text",y),dA.coerceFont(n,"title.font",s,{overrideDflt:{size:dA.bigFont(s.size),color:_}}),sge(t,r,n,f);var C=a.hasMinor;if(C&&(H3t.newContainer(r,"minor"),sge(t,r,n,f,{isMinor:!0})),W3t(t,r,n,f,a),lge(t,r,n,a),C){var k=a.isMinor;a.isMinor=!0,lge(t,r,n,a),a.isMinor=k}Z3t(t,r,n,{dfltColor:x,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:C,attributes:EU}),C&&r.ticklabelindex==null&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var S=f==="multicategory";if(!a.noTickson&&(f==="category"||S)&&(r.ticks||r.showgrid)&&(S?(n("tickson","boundaries"),delete r.ticklabelposition):n("tickson")),S){var L=n("showdividers");L&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(j3t(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:J3t}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var w=0;w=2){var o="",s,l;if(i.length===2){for(s=0;s<2;s++)if(l=cge(i[s]),l){o=vC;break}}var u=n("pattern",o);if(u===vC)for(s=0;s<2;s++)l=cge(i[s]),l&&(t.bounds[s]=i[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=i[s],u){case vC:if(!oge(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=i[s]=l;break;case K3t:if(!oge(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=i[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]c[1]){t.enabled=!1;return}}else if(i[0]>c[0]&&i[1]{"use strict";var ewt=aa(),pC=Xt();hge.exports=function(t,r,n,a){var i=a.counterAxes||[],o=a.overlayableAxes||[],s=a.letter,l=a.grid,u=a.overlayingDomain,c,f,v,g,p,x;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(v=l[s+"side"].split(" ")[0],g=l.domain[s][v==="right"||v==="top"?1:0])),f=f||[0,1],c=c||(ewt(t.position)?"free":i[0]||"free"),v=v||(s==="x"?"bottom":"left"),g=g||0,p=0,x=!1;var _=pC.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:c}},"anchor"),y=pC.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");if(_==="free"){if(s==="y"){var C=n("autoshift");C&&(g=y==="left"?u[0]:u[1],x=r.automargin?r.automargin:!0,p=y==="left"?-3:3),n("shift",p)}n("position",g)}n("automargin",x);var k=!1;if(o.length&&(k=pC.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!k){var S=n("domain",f);S[0]>S[1]-1/4096&&(r.domain=f),pC.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var bge=fe((cpr,_ge)=>{"use strict";var o2=Xt(),dge=ni(),twt=Sd().isUnifiedHover,rwt=VO(),vge=Mo(),nwt=Sb(),pge=pf(),iwt=SU(),gge=vA(),awt=Jx(),mge=gC(),CU=El(),s1=CU.id2name,yge=CU.name2id,owt=rc().AX_ID_PATTERN,xge=bi(),mC=xge.traceIs,kU=xge.getComponentMethod;function yC(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}_ge.exports=function(t,r,n){var a=r.autotypenumbers,i={},o={},s={},l={},u={},c={},f={},v={},g={},p={},x,_;for(x=0;x{"use strict";var swt=xi(),wge=bi(),xC=Xt(),F0=ea(),_C=Yi();Tge.exports=function(t,r,n,a){var i=t._fullLayout;if(r.length===0){_C.redrawComponents(t);return}function o(_){var y=_.xaxis,C=_.yaxis;i._defs.select("#"+_.clipId+"> rect").call(F0.setTranslate,0,0).call(F0.setScale,1,1),_.plot.call(F0.setTranslate,y._offset,C._offset).call(F0.setScale,1,1);var k=_.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(F0.setPointGroupScale,1,1),k.selectAll(".textpoint").call(F0.setTextPointsScale,1,1),k.call(F0.hideOutsideRangePoints,_)}function s(_,y){var C=_.plotinfo,k=C.xaxis,S=C.yaxis,L=k._length,w=S._length,A=!!_.xr1,T=!!_.yr1,m=[];if(A){var F=xC.simpleMap(_.xr0,k.r2l),E=xC.simpleMap(_.xr1,k.r2l),I=F[1]-F[0],R=E[1]-E[0];m[0]=(F[0]*(1-y)+y*E[0]-F[0])/(F[1]-F[0])*L,m[2]=L*(1-y+y*R/I),k.range[0]=k.l2r(F[0]*(1-y)+y*E[0]),k.range[1]=k.l2r(F[1]*(1-y)+y*E[1])}else m[0]=0,m[2]=L;if(T){var B=xC.simpleMap(_.yr0,S.r2l),O=xC.simpleMap(_.yr1,S.r2l),V=B[1]-B[0],j=O[1]-O[0];m[1]=(B[1]*(1-y)+y*O[1]-B[1])/(B[0]-B[1])*w,m[3]=w*(1-y+y*j/V),S.range[0]=k.l2r(B[0]*(1-y)+y*O[0]),S.range[1]=S.l2r(B[1]*(1-y)+y*O[1])}else m[1]=0,m[3]=w;_C.drawOne(t,k,{skipTitle:!0}),_C.drawOne(t,S,{skipTitle:!0}),_C.redrawComponents(t,[k._id,S._id]);var q=A?L/m[2]:1,U=T?w/m[3]:1,J=A?m[0]:0,ee=T?m[1]:0,ce=A?m[0]/m[2]*L:0,ye=T?m[1]/m[3]*w:0,xe=k._offset-ce,ue=S._offset-ye;C.clipRect.call(F0.setTranslate,J,ee).call(F0.setScale,1/q,1/U),C.plot.call(F0.setTranslate,xe,ue).call(F0.setScale,q,U),F0.setPointGroupScale(C.zoomScalePts,1/q,1/U),F0.setTextPointsScale(C.zoomScaleTxt,1/q,1/U)}var l;a&&(l=a());function u(){for(var _={},y=0;yn.duration?(u(),g=window.cancelAnimationFrame(x)):g=window.requestAnimationFrame(x)}return f=Date.now(),g=window.requestAnimationFrame(x),Promise.resolve()}});var gu=fe(Eh=>{"use strict";var wC=xi(),Mge=bi(),s2=Xt(),lwt=Hs(),uwt=ea(),Sge=jf().getModuleCalcData,zm=El(),hp=rc(),cwt=Q0(),jo=s2.ensureSingle;function bC(e,t,r){return s2.ensureSingle(e,t,r,function(n){n.datum(r)})}var l2=hp.zindexSeparator;Eh.name="cartesian";Eh.attr=["xaxis","yaxis"];Eh.idRoot=["x","y"];Eh.idRegex=hp.idRegex;Eh.attrRegex=hp.attrRegex;Eh.attributes=Q1e();Eh.layoutAttributes=pf();Eh.supplyLayoutDefaults=bge();Eh.transitionAxes=Age();Eh.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,a=r.yaxis,i=r.cartesian,o=i,s={},l={},u,c,f;for(u=0;u0){var g=v.id;if(g.indexOf(l2)!==-1)continue;g+=l2+(u+1),v=s2.extendFlat({},v,{id:g,plot:a._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var p=[],x,_=0;_1&&(L+=l2+S),k.push(s+L),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=jo(n,"path","xlines-above"),t.ylines=jo(n,"path","ylines-above"),t.xaxislayer=jo(n,"g","xaxislayer-above"),t.yaxislayer=jo(n,"g","yaxislayer-above");else{if(!o){var v=jo(n,"g","layer-subplot");t.shapelayer=jo(v,"g","shapelayer"),t.imagelayer=jo(v,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=jo(n,"g","minor-gridlayer"),t.gridlayer=jo(n,"g","gridlayer"),t.zerolinelayer=jo(n,"g","zerolinelayer"));var g=jo(n,"g","layer-between");t.shapelayerBetween=jo(g,"g","shapelayer"),t.imagelayerBetween=jo(g,"g","imagelayer"),jo(n,"path","xlines-below"),jo(n,"path","ylines-below"),t.overlinesBelow=jo(n,"g","overlines-below"),jo(n,"g","xaxislayer-below"),jo(n,"g","yaxislayer-below"),t.overaxesBelow=jo(n,"g","overaxes-below")}t.overplot=jo(n,"g","overplot"),t.plot=jo(t.overplot,"g",a),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=jo(n,"g","zerolinelayer-above"),o||(t.xlines=jo(n,"path","xlines-above"),t.ylines=jo(n,"path","ylines-above"),t.overlinesAbove=jo(n,"g","overlines-above"),jo(n,"g","xaxislayer-above"),jo(n,"g","yaxislayer-above"),t.overaxesAbove=jo(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var p=f.plotgroup,x=a+"-x",_=a+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,jo(f.overlinesBelow,"path",x),jo(f.overlinesBelow,"path",_),jo(f.overaxesBelow,"g",x),jo(f.overaxesBelow,"g",_),t.plot=jo(f.overplot,"g",a),jo(f.overlinesAbove,"path",x),jo(f.overlinesAbove,"path",_),jo(f.overaxesAbove,"g",x),jo(f.overaxesAbove,"g",_),t.xlines=p.select(".overlines-"+s).select("."+x),t.ylines=p.select(".overlines-"+l).select("."+_),t.xaxislayer=p.select(".overaxes-"+s).select("."+x),t.yaxislayer=p.select(".overaxes-"+l).select("."+_)}o||(u||(bC(t.minorGridlayer,"g",t.xaxis._id),bC(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(y){return y[0]}).sort(zm.idSort),bC(t.gridlayer,"g",t.xaxis._id),bC(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(y){return y[0]}).sort(zm.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function Cge(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=wC.select(this);c.remove(),Lge(u,t),r[u]=!0});for(var n in t._plots)for(var a=t._plots[n],i=a.overlays||[],o=0;o{"use strict";var TC=Is();Pge.exports={hasLines:TC.hasLines,hasMarkers:TC.hasMarkers,hasText:TC.hasText,isBubble:TC.isBubble,attributes:Ol(),layoutAttributes:nk(),supplyDefaults:n1e(),crossTraceDefaults:aU(),supplyLayoutDefaults:s1e(),calc:gv().calc,crossTraceCalc:F1e(),arraysToCalcdata:o1(),plot:m3(),colorbar:Zf(),formatLabels:cC(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:b3(),selectPoints:a2(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:gu(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var Ige=fe((vpr,Rge)=>{"use strict";var hwt=xi(),dwt=ni(),Dge=PN(),LU=Xt(),vwt=LU.strScale,pwt=LU.strRotate,gwt=LU.strTranslate;Rge.exports=function(t,r,n){var a=t.node(),i=Dge[n.arrowhead||0],o=Dge[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=i.backoff*s+n.standoff,v=o.backoff*l+n.startstandoff,g,p,x,_;if(a.nodeName==="line"){g={x:+t.attr("x1"),y:+t.attr("y1")},p={x:+t.attr("x2"),y:+t.attr("y2")};var y=g.x-p.x,C=g.y-p.y;if(x=Math.atan2(C,y),_=x+Math.PI,f&&v&&f+v>Math.sqrt(y*y+C*C)){B();return}if(f){if(f*f>y*y+C*C){B();return}var k=f*Math.cos(x),S=f*Math.sin(x);p.x+=k,p.y+=S,t.attr({x2:p.x,y2:p.y})}if(v){if(v*v>y*y+C*C){B();return}var L=v*Math.cos(x),w=v*Math.sin(x);g.x-=L,g.y-=w,t.attr({x1:g.x,y1:g.y})}}else if(a.nodeName==="path"){var A=a.getTotalLength(),T="";if(A{"use strict";var zge=xi(),PU=bi(),mwt=Hs(),Bm=Xt(),FU=Bm.strTranslate,gA=Yi(),u2=ni(),sg=ea(),qge=kl(),DU=as(),RU=np(),pA=ed(),ywt=Mo().arrayEditor,xwt=Ige();Nge.exports={draw:_wt,drawOne:Bge,drawRaw:Oge};function _wt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Tt="right":Tt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Tt]}for(var ie=!1,le=["x","y"],me=0;me1)&&(Ge===De?(tt=ht.r2fraction(t["a"+be]),(tt<0||tt>1)&&(ie=!0)):ie=!0),Le=ht._offset+ht.r2p(t[be]),Ve=.5}else{var nt=ot==="domain";be==="x"?(Te=t[be],Le=nt?ht._offset+ht._length*Te:Le=s.l+s.w*Te):(Te=1-t[be],Le=nt?ht._offset+ht._length*Te:Le=s.t+s.h*Te),Ve=t.showarrow?.5:Te}if(t.showarrow){we.head=Le;var We=t["a"+be];if($e=Oe*pe(.5,t.xanchor)-ze*pe(.5,t.yanchor),Ge===De){var mt=gA.getRefType(Ge);mt==="domain"?(be==="y"&&(We=1-We),we.tail=ht._offset+ht._length*We):mt==="paper"?be==="y"?(We=1-We,we.tail=s.t+s.h*We):we.tail=s.l+s.w*We:we.tail=ht._offset+ht.r2p(We),Ke=$e}else we.tail=Le+We,Ke=$e+We;we.text=we.tail+$e;var bt=o[be==="x"?"width":"height"];if(De==="paper"&&(we.head=Bm.constrain(we.head,1,bt-1)),Ge==="pixel"){var Yt=-Math.max(we.tail-3,we.text),jt=Math.min(we.tail+3,we.text)-bt;Yt>0?(we.tail+=Yt,we.text+=Yt):jt>0&&(we.tail-=jt,we.text-=jt)}we.tail+=qe,we.head+=qe}else $e=ct*pe(Ve,et),Ke=$e,we.text=Le+$e;we.text+=qe,$e+=qe,Ke+=qe,t["_"+be+"padplus"]=ct/2+Ke,t["_"+be+"padminus"]=ct/2-Ke,t["_"+be+"size"]=ct,t["_"+be+"shift"]=$e}if(ie){A.remove();return}var mr=0,or=0;if(t.align!=="left"&&(mr=(K-xe)*(t.align==="center"?.5:1)),t.valign!=="top"&&(or=(_e-ue)*(t.valign==="middle"?.5:1)),ce)ee.select("svg").attr({x:F+mr-1,y:F+or}).call(sg.setClipUrl,I?x:null,e);else{var fr=F+or-ye.top,Ot=F+mr-ye.left;V.call(DU.positionText,Ot,fr).call(sg.setClipUrl,I?x:null,e)}R.select("rect").call(sg.setRect,F,F,K,_e),E.call(sg.setRect,T/2,T/2,ne-T,ae-T),A.call(sg.setTranslate,Math.round(_.x.text-ne/2),Math.round(_.y.text-ae/2)),k.attr({transform:"rotate("+y+","+_.x.text+","+_.y.text+")"});var cr=function(wt,Tt){C.selectAll(".annotation-arrow-g").remove();var Mt=_.x.head,Lt=_.y.head,ft=_.x.tail+wt,kt=_.y.tail+Tt,rr=_.x.text+wt,pr=_.y.text+Tt,Kr=Bm.rotationXYMatrix(y,rr,pr),Nr=Bm.apply2DTransform(Kr),dn=Bm.apply2DTransform2(Kr),xr=+E.attr("width"),Fr=+E.attr("height"),Zr=rr-.5*xr,Cn=Zr+xr,Dt=pr-.5*Fr,At=Dt+Fr,Vt=[[Zr,Dt,Zr,At],[Zr,At,Cn,At],[Cn,At,Cn,Dt],[Cn,Dt,Zr,Dt]].map(dn);if(!Vt.reduce(function(ha,va){return ha^!!Bm.segmentsIntersect(Mt,Lt,Mt+1e6,Lt+1e6,va[0],va[1],va[2],va[3])},!1)){Vt.forEach(function(ha){var va=Bm.segmentsIntersect(ft,kt,Mt,Lt,ha[0],ha[1],ha[2],ha[3]);va&&(ft=va.x,kt=va.y)});var Qt=t.arrowwidth,Ut=t.arrowcolor,_r=t.arrowside,rn=C.append("g").style({opacity:u2.opacity(Ut)}).classed("annotation-arrow-g",!0),Jr=rn.append("path").attr("d","M"+ft+","+kt+"L"+Mt+","+Lt).style("stroke-width",Qt+"px").call(u2.stroke,u2.rgb(Ut));if(xwt(Jr,_r,t),l.annotationPosition&&Jr.node().parentNode&&!n){var qn=Mt,ri=Lt;if(t.standoff){var Jn=Math.sqrt(Math.pow(Mt-ft,2)+Math.pow(Lt-kt,2));qn+=t.standoff*(ft-Mt)/Jn,ri+=t.standoff*(kt-Lt)/Jn}var Ii=rn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(ft-qn)+","+(kt-ri),transform:FU(qn,ri)}).style("stroke-width",Qt+6+"px").call(u2.stroke,"rgba(0,0,0,0)").call(u2.fill,"rgba(0,0,0,0)"),Vi,ra;pA.init({element:Ii.node(),gd:e,prepFn:function(){var ha=sg.getTranslate(A);Vi=ha.x,ra=ha.y,a&&a.autorange&&v(a._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0)},moveFn:function(ha,va){var Xi=Nr(Vi,ra),oa=Xi[0]+ha,Ma=Xi[1]+va;A.call(sg.setTranslate,oa,Ma),g("x",qm(a,ha,"x",s,t)),g("y",qm(i,va,"y",s,t)),t.axref===t.xref&&g("ax",qm(a,ha,"ax",s,t)),t.ayref===t.yref&&g("ay",qm(i,va,"ay",s,t)),rn.attr("transform",FU(ha,va)),k.attr({transform:"rotate("+y+","+oa+","+Ma+")"})},doneFn:function(){PU.call("_guiRelayout",e,p());var ha=document.querySelector(".js-notes-box-panel");ha&&ha.redraw(ha.selectedObj)}})}}};if(t.showarrow&&cr(0,0),S){var Ct;pA.init({element:A.node(),gd:e,prepFn:function(){Ct=k.attr("transform")},moveFn:function(wt,Tt){var Mt="pointer";if(t.showarrow)t.axref===t.xref?g("ax",qm(a,wt,"ax",s,t)):g("ax",t.ax+wt),t.ayref===t.yref?g("ay",qm(i,Tt,"ay",s.w,t)):g("ay",t.ay+Tt),cr(wt,Tt);else{if(n)return;var Lt,ft;if(a)Lt=qm(a,wt,"x",s,t);else{var kt=t._xsize/s.w,rr=t.x+(t._xshift-t.xshift)/s.w-kt/2;Lt=pA.align(rr+wt/s.w,kt,0,1,t.xanchor)}if(i)ft=qm(i,Tt,"y",s,t);else{var pr=t._ysize/s.h,Kr=t.y-(t._yshift+t.yshift)/s.h-pr/2;ft=pA.align(Kr-Tt/s.h,pr,0,1,t.yanchor)}g("x",Lt),g("y",ft),(!a||!i)&&(Mt=pA.getCursor(a?.5:Lt,i?.5:ft,t.xanchor,t.yanchor))}k.attr({transform:FU(wt,Tt)+Ct}),RU(A,Mt)},clickFn:function(wt,Tt){t.captureevents&&e.emit("plotly_clickannotation",w(Tt))},doneFn:function(){RU(A),PU.call("_guiRelayout",e,p());var wt=document.querySelector(".js-notes-box-panel");wt&&wt.redraw(wt.selectedObj)}})}}l.annotationText?V.call(DU.makeEditable,{delegate:A,gd:e}).call(j).on("edit",function(U){t.text=U,this.call(j),g("text",U),a&&a.autorange&&v(a._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0),PU.call("_guiRelayout",e,p())}):V.call(j)}});var Wge=fe((gpr,jge)=>{"use strict";var Uge=Xt(),bwt=bi(),Vge=Mo().arrayEditor;jge.exports={hasClickToShow:wwt,onClick:Twt};function wwt(e,t){var r=Hge(e,t);return r.on.length>0||r.explicitOff.length>0}function Twt(e,t){var r=Hge(e,t),n=r.on,a=r.off.concat(r.explicitOff),i={},o=e._fullLayout.annotations,s,l;if(n.length||a.length){for(s=0;s{"use strict";var IU=Xt(),w3=ni();Yge.exports=function(t,r,n,a){a("opacity");var i=a("bgcolor"),o=a("bordercolor"),s=w3.opacity(o);a("borderpad");var l=a("borderwidth"),u=a("showarrow");a("text",u?" ":n._dfltTitle.annotation),a("textangle"),IU.coerceFont(a,"font",n.font),a("width"),a("align");var c=a("height");if(c&&a("valign"),u){var f=a("arrowside"),v,g;f.indexOf("end")!==-1&&(v=a("arrowhead"),g=a("arrowsize")),f.indexOf("start")!==-1&&(a("startarrowhead",v),a("startarrowsize",g)),a("arrowcolor",s?r.bordercolor:w3.defaultLine),a("arrowwidth",(s&&l||1)*2),a("standoff"),a("startstandoff")}var p=a("hovertext"),x=n.hoverlabel||{};if(p){var _=a("hoverlabel.bgcolor",x.bgcolor||(w3.opacity(i)?w3.rgb(i):w3.defaultLine)),y=a("hoverlabel.bordercolor",x.bordercolor||w3.contrast(_)),C=IU.extendFlat({},x.font);C.color||(C.color=y),IU.coerceFont(a,"hoverlabel.font",C)}a("captureevents",!!p)}});var Zge=fe((ypr,Xge)=>{"use strict";var qU=Xt(),c2=Yi(),Awt=Ah(),Mwt=zU(),Swt=Fm();Xge.exports=function(t,r){Awt(t,r,{name:"annotations",handleItemDefaults:Ewt})};function Ewt(e,t,r){function n(k,S){return qU.coerce(e,t,Swt,k,S)}var a=n("visible"),i=n("clicktoshow");if(a||i){Mwt(e,t,r,n);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],v=c2.coerceRef(e,t,u,f,"","paper");if(v!=="paper"){var g=c2.getFromId(u,v);g._annIndices.push(t._index)}if(c2.coercePosition(t,u,n,v,f,.5),o){var p="a"+f,x=c2.coerceRef(e,t,u,p,"pixel",["pixel","paper"]);x!=="pixel"&&x!==v&&(x=t[p]="pixel");var _=x==="pixel"?l[c]:.4;c2.coercePosition(t,u,n,x,p,_)}n(f+"anchor"),n(f+"shift")}if(qU.noneOrAll(e,t,["x","y"]),o&&qU.noneOrAll(e,t,["ax","ay"]),i){var y=n("xclick"),C=n("yclick");t._xclick=y===void 0?t.x:c2.cleanPosition(y,u,t.xref),t._yclick=C===void 0?t.y:c2.cleanPosition(C,u,t.yref)}}}});var Jge=fe((xpr,Kge)=>{"use strict";var BU=Xt(),f2=Yi(),kwt=AC().draw;Kge.exports=function(t){var r=t._fullLayout,n=BU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return BU.syncOrAsync([kwt,Cwt],t)};function Cwt(e){var t=e._fullLayout;BU.filterVisible(t.annotations).forEach(function(r){var n=f2.getFromId(e,r.xref),a=f2.getFromId(e,r.yref),i=f2.getRefType(r.xref),o=f2.getRefType(r.yref);r._extremes={},i==="range"&&$ge(r,n),o==="range"&&$ge(r,a)})}function $ge(e,t){var r=t._id,n=r.charAt(0),a=e[n],i=e["a"+n],o=e[n+"ref"],s=e["a"+n+"ref"],l=e["_"+n+"padplus"],u=e["_"+n+"padminus"],c={x:1,y:-1}[n]*e[n+"shift"],f=3*e.arrowsize*e.arrowwidth||0,v=f+c,g=f-c,p=3*e.startarrowsize*e.arrowwidth||0,x=p+c,_=p-c,y;if(s===o){var C=f2.findExtremes(t,[t.r2c(a)],{ppadplus:v,ppadminus:g}),k=f2.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,x),ppadminus:Math.max(u,_)});y={min:[C.min[0],k.min[0]],max:[C.max[0],k.max[0]]}}else x=i?x+i:x,_=i?_-i:_,y=f2.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,v,x),ppadminus:Math.max(u,g,_)});e._extremes[r]=y}});var eme=fe((_pr,Qge)=>{"use strict";var Lwt=aa(),Pwt=rE();Qge.exports=function(t,r,n,a){r=r||{};var i=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(!(i||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(g){var p=u[g],x=null;i?x=Pwt(p,r.range):x=Math.pow(10,p),Lwt(x)||(x=null),a(c+g,x)}for(var v=0;v{"use strict";var OU=AC(),tme=Wge();rme.exports={moduleType:"component",name:"annotations",layoutAttributes:Fm(),supplyLayoutDefaults:Zge(),includeBasePlot:KT()("annotations"),calcAutorange:Jge(),draw:OU.draw,drawOne:OU.drawOne,drawRaw:OU.drawRaw,hasClickToShow:tme.hasClickToShow,onClick:tme.onClick,convertCoords:eme()}});var MC=fe((wpr,ime)=>{"use strict";var Ys=Fm(),Fwt=rl().overrideAll,Dwt=Mo().templatedArray;ime.exports=Fwt(Dwt("annotation",{visible:Ys.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Ys.xanchor,xshift:Ys.xshift,yanchor:Ys.yanchor,yshift:Ys.yshift,text:Ys.text,textangle:Ys.textangle,font:Ys.font,width:Ys.width,height:Ys.height,opacity:Ys.opacity,align:Ys.align,valign:Ys.valign,bgcolor:Ys.bgcolor,bordercolor:Ys.bordercolor,borderpad:Ys.borderpad,borderwidth:Ys.borderwidth,showarrow:Ys.showarrow,arrowcolor:Ys.arrowcolor,arrowhead:Ys.arrowhead,startarrowhead:Ys.startarrowhead,arrowside:Ys.arrowside,arrowsize:Ys.arrowsize,startarrowsize:Ys.startarrowsize,arrowwidth:Ys.arrowwidth,standoff:Ys.standoff,startstandoff:Ys.startstandoff,hovertext:Ys.hovertext,hoverlabel:Ys.hoverlabel,captureevents:Ys.captureevents}),"calc","from-root")});var ome=fe((Tpr,ame)=>{"use strict";var NU=Xt(),Rwt=Yi(),Iwt=Ah(),zwt=zU(),qwt=MC();ame.exports=function(t,r,n){Iwt(t,r,{name:"annotations",handleItemDefaults:Bwt,fullLayout:n.fullLayout})};function Bwt(e,t,r,n){function a(s,l){return NU.coerce(e,t,qwt,s,l)}function i(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],Rwt.coercePosition(t,u,a,s,s,.5)}var o=a("visible");o&&(zwt(e,t,n.fullLayout,a),i("x"),i("y"),i("z"),NU.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",a("ax",-10),a("ay",-30),NU.noneOrAll(e,t,["ax","ay"])))}});var cme=fe((Apr,ume)=>{"use strict";var sme=Xt(),lme=Yi();ume.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,a=0;a{"use strict";function UU(e,t){var r=[0,0,0,0],n,a;for(n=0;n<4;++n)for(a=0;a<4;++a)r[a]+=e[4*n+a]*t[n];return r}function Nwt(e,t){var r=UU(e.projection,UU(e.view,UU(e.model,[t[0],t[1],t[2],1])));return r}fme.exports=Nwt});var dme=fe((Spr,hme)=>{"use strict";var Uwt=AC().drawRaw,Vwt=VU(),Gwt=["x","y","z"];hme.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,a=r.annotations,i=0;i1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+i+'"]').remove():(o._pdata=Vwt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),Uwt(t.graphDiv,o,i,t.id,o._xa,o._ya))}}});var gme=fe((Epr,pme)=>{"use strict";var Hwt=bi(),vme=Xt();pme.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:MC()}}},layoutAttributes:MC(),handleDefaults:ome(),includeBasePlot:jwt,convert:cme(),draw:dme()};function jwt(e,t){var r=Hwt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,a=Object.keys(e),i=0;i{"use strict";var kpr=rc(),mme=Ds(),yme=Ol().line,Wwt=Uc().dash,dp=ta().extendFlat,Ywt=Mo().templatedArray,Cpr=ZT(),T3=Ho(),xme=Fm(),{shapeTexttemplateAttrs:Xwt,templatefallbackAttrs:Zwt}=Oo(),$wt=IE();_me.exports=Ywt("shape",{visible:dp({},T3.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:dp({},T3.legend,{editType:"calc+arraydraw"}),legendgroup:dp({},T3.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:dp({},T3.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:mme({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:dp({},T3.legendrank,{editType:"calc+arraydraw"}),legendwidth:dp({},T3.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:dp({},xme.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:dp({},xme.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:dp({},yme.color,{editType:"arraydraw"}),width:dp({},yme.width,{editType:"calc+arraydraw"}),dash:dp({},Wwt,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:Xwt({},{keys:Object.keys($wt)}),texttemplatefallback:Zwt({editType:"arraydraw"}),font:mme({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var wme=fe((Ppr,bme)=>{"use strict";var A3=Xt(),D0=Yi(),Kwt=Ah(),Jwt=GU(),mA=Lm();bme.exports=function(t,r){Kwt(t,r,{name:"shapes",handleItemDefaults:e5t})};function Qwt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function e5t(e,t,r){function n(k,S){return A3.coerce(e,t,Jwt,k,S)}t._isShape=!0;var a=n("visible");if(!a)return;var i=n("showlegend");n("legend"),n("legendgroup"),i&&(n("legendwidth"),n("legendgrouptitle.text"),A3.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",l=n("type",s),u=l!=="path";u&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var c=n("line.width");c&&(n("line.color"),n("line.dash"));var f=n("xsizemode"),v=n("ysizemode");let g=[.25,.75],p=[0,10];["x","y"].forEach(k=>{var S=k+"anchor",L=k==="x"?f:v,w={_fullLayout:r},A,T,m,F;let E=k+"ref",I=e[E];if(Array.isArray(I)&&I.length>0){let R=mA.countDefiningCoords(l,o,k);F=D0.coerceRefArray(e,t,w,k,void 0,"paper",R),t["_"+k+"refArray"]=!0}else F=D0.coerceRef(e,t,w,k,void 0,"paper");if(Array.isArray(F))F.forEach(function(R){D0.getRefType(R)==="range"&&(A=D0.getFromId(w,R),A&&A._shapeIndices.indexOf(t._index)===-1&&A._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(R){let B=F[R];D0.getRefType(B)==="range"?(A=D0.getFromId(w,B),T=mA.shapePositionToRange(A),m=mA.rangeToShapePosition(A),(A.type==="category"||A.type==="multicategory")&&n(k+R+"shift")):T=m=A3.identity;let V=k+R,j=e[V];if(e[V]=T(e[V],!0),L==="pixel"?n(V,p[R]):D0.coercePosition(t,w,n,B,V,g[R]),t[V]=m(t[V]),e[V]=j,R===0&&L==="pixel"){let q=e[S];e[S]=T(e[S],!0),D0.coercePosition(t,w,n,B,S,.25),t[S]=m(t[S]),e[S]=q}});else{if(D0.getRefType(F)==="range"?(A=D0.getFromId(w,F),A._shapeIndices.push(t._index),m=mA.rangeToShapePosition(A),T=mA.shapePositionToRange(A),u&&(A.type==="category"||A.type==="multicategory")&&(n(k+"0shift"),n(k+"1shift"))):T=m=A3.identity,u){let B=k+"0",O=k+"1",V=e[B],j=e[O];e[B]=T(e[B],!0),e[O]=T(e[O],!0),L==="pixel"?(n(B,p[0]),n(O,p[1])):(D0.coercePosition(t,w,n,F,B,g[0]),D0.coercePosition(t,w,n,F,O,g[1])),t[B]=m(t[B]),t[O]=m(t[O]),e[B]=V,e[O]=j}if(L==="pixel"){let B=e[S];e[S]=T(e[S],!0),D0.coercePosition(t,w,n,F,S,.25),t[S]=m(t[S]),e[S]=B}}}),u&&A3.noneOrAll(e,t,["x0","x1","y0","y1"]);var x=l==="line",_,y;if(u&&(_=n("label.texttemplate"),n("label.texttemplatefallback")),_||(y=n("label.text")),y||_){n("label.textangle");var C=n("label.textposition",x?"middle":"middle center");n("label.xanchor"),n("label.yanchor",Qwt(x,C)),n("label.padding"),A3.coerceFont(n,"label.font",r.font)}}});var Mme=fe((Fpr,Ame)=>{"use strict";var t5t=ni(),Tme=Xt();function r5t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Ame.exports=function(t,r,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),Tme.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var a=n("newshape.line.width");if(a){var i=(t||{}).plot_bgcolor||"#FFF";n("newshape.line.color",t5t.contrast(i)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",r5t(o,u)),n("newshape.label.padding"),Tme.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var Fme=fe((Dpr,Pme)=>{"use strict";var HU=Xt(),yv=Yi(),l1=kT(),jU=Lm();Pme.exports=function(t){var r=t._fullLayout,n=HU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var a=0;a{o=yv.getFromId(t,f),i._extremes[o._id]=yv.findExtremes(o,v,Eme(i))})}else i.xref!=="paper"&&l!=="domain"&&(o=yv.getFromId(t,i.xref),s=Cme(o,i,l1.paramIsX),s&&(i._extremes[o._id]=yv.findExtremes(o,s,Eme(i))));if(u==="array"){let c=Sme(t,i,"y");Object.entries(c).forEach(([f,v])=>{o=yv.getFromId(t,f),i._extremes[o._id]=yv.findExtremes(o,v,kme(i))})}else i.yref!=="paper"&&u!=="domain"&&(o=yv.getFromId(t,i.yref),s=Cme(o,i,l1.paramIsY),s&&(i._extremes[o._id]=yv.findExtremes(o,s,kme(i))))}};function Sme(e,t,r){let n=t[r+"ref"],a=r==="x"?l1.paramIsX:l1.paramIsY;function i(f,v){f==="paper"||yv.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(v))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(l1.segmentRE)||[];for(var s=0,l=0;lp&&(i(n[s],x[p]),s++)}}else i(n[0],t[r+"0"]),i(n[1],t[r+"1"]);let u={};for(let f in o){let v=yv.getFromId(e,f);if(v){var c=v.type==="category"||v.type==="multicategory"?v.r2c:v.d2c;v.type==="date"&&(c=jU.decodeDate(c)),u[v._id]=o[f].map(c)}}return u}function Eme(e){return Lme(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function kme(e){return Lme(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function Lme(e,t,r,n,a,i){var o=e/2,s=i;if(t==="pixel"){var l=a?jU.extractPathCoords(a,i?l1.paramIsY:l1.paramIsX):[r,n],u=HU.aggNums(Math.max,null,l),c=HU.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,v=u>0?u+o:o;return{ppad:o,ppadplus:s?f:v,ppadminus:s?v:f}}else return{ppad:o}}function Cme(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",i,o,s=0,l=0,u=a?e.r2c:e.d2c,c=t[n+"sizemode"]==="scaled";if(c?(i=t[n+"0"],o=t[n+"1"],a&&(s=t[n+"0shift"],l=t[n+"1shift"])):(i=t[n+"anchor"],o=t[n+"anchor"]),i!==void 0)return[u(i)+s,u(o)+l];if(t.path){var f=1/0,v=-1/0,g=t.path.match(l1.segmentRE),p,x,_,y,C;for(e.type==="date"&&(u=jU.decodeDate(u)),p=0;pv&&(v=C)));if(v>=f)return[f,v]}}});var Ime=fe((Rpr,Rme)=>{"use strict";var Dme=d8();Rme.exports={moduleType:"component",name:"shapes",layoutAttributes:GU(),supplyLayoutDefaults:wme(),supplyDrawNewShapeDefaults:Mme(),includeBasePlot:KT()("shapes"),calcAutorange:Fme(),draw:Dme.draw,drawOne:Dme.drawOne}});var WU=fe((zpr,qme)=>{"use strict";var zme=rc(),n5t=Mo().templatedArray,Ipr=ZT();qme.exports=n5t("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",zme.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",zme.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var Ome=fe((qpr,Bme)=>{"use strict";var i5t=Xt(),YU=Yi(),a5t=Ah(),o5t=WU(),s5t="images";Bme.exports=function(t,r){var n={name:s5t,handleItemDefaults:l5t};a5t(t,r,n)};function l5t(e,t,r){function n(v,g){return i5t.coerce(e,t,o5t,v,g)}var a=n("source"),i=n("visible",!!a);if(!i)return t;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=YU.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=YU.getFromId(o,c);f._imgIndices.push(t._index)}YU.coercePosition(t,o,n,c,u,0)}return t}});var Gme=fe((Bpr,Vme)=>{"use strict";var Nme=xi(),u5t=ea(),M3=Yi(),Ume=El(),c5t=Q0();Vme.exports=function(t){var r=t._fullLayout,n=[],a={},i=[],o,s;for(s=0;s{"use strict";var Hme=aa(),f5t=rE();jme.exports=function(t,r,n,a){r=r||{};var i=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(i||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";Yme.exports={moduleType:"component",name:"images",layoutAttributes:WU(),supplyLayoutDefaults:Ome(),includeBasePlot:KT()("images"),draw:Gme(),convertCoords:Wme()}});var SC=fe((Upr,Zme)=>{"use strict";Zme.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"}}});var XU=fe((Vpr,Kme)=>{"use strict";var h5t=Ds(),d5t=tc(),v5t=ta().extendFlat,p5t=rl().overrideAll,g5t=zE(),$me=Mo().templatedArray,m5t=$me("button",{visible:{valType:"boolean"},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},args2:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string",dflt:""},execute:{valType:"boolean",dflt:!0}});Kme.exports=p5t($me("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:m5t,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:v5t(g5t({editType:"arraydraw"}),{}),font:h5t({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:d5t.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var tye=fe((Gpr,eye)=>{"use strict";var EC=Xt(),Jme=Ah(),Qme=XU(),y5t=SC(),x5t=y5t.name,_5t=Qme.buttons;eye.exports=function(t,r){var n={name:x5t,handleItemDefaults:b5t};Jme(t,r,n)};function b5t(e,t,r){function n(o,s){return EC.coerce(e,t,Qme,o,s)}var a=Jme(e,t,{name:"buttons",handleItemDefaults:w5t}),i=n("visible",a.length>0);i&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),EC.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),EC.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function w5t(e,t){function r(a,i){return EC.coerce(e,t,_5t,a,i)}var n=r("visible",e.method==="skip"||Array.isArray(e.args));n&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var iye=fe((Hpr,nye)=>{"use strict";nye.exports=Nl;var vp=xi(),rye=ni(),S3=ea(),kC=Xt();function Nl(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Nl.barWidth=2;Nl.barLength=20;Nl.barRadius=2;Nl.barPad=1;Nl.barColor="#808BA4";Nl.prototype.enable=function(t,r,n){var a=this.gd._fullLayout,i=a.width,o=a.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,v=f==="down",g=f==="left",p=f==="right",x=f==="up",_=l,y=c,C,k,S,L;!v&&!g&&!p&&!x&&(this.position.direction="down",v=!0);var w=v||x;w?(C=s,k=C+_,v?(S=u,L=Math.min(S+y,o),y=L-S):(L=u+y,S=Math.max(L-y,0),y=L-S)):(S=u,L=S+y,g?(k=s+_,C=Math.max(k-_,0),_=k-C):(C=s,k=Math.min(C+_,i),_=k-C)),this._box={l:C,t:S,w:_,h:y};var A=l>_,T=Nl.barLength+2*Nl.barPad,m=Nl.barWidth+2*Nl.barPad,F=s,E=u+c;E+m>o&&(E=o-m);var I=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-horizontal",!0).call(rye.fill,Nl.barColor),A?(this.hbar=I.attr({rx:Nl.barRadius,ry:Nl.barRadius,x:F,y:E,width:T,height:m}),this._hbarXMin=F+T/2,this._hbarTranslateMax=_-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var R=c>y,B=Nl.barWidth+2*Nl.barPad,O=Nl.barLength+2*Nl.barPad,V=s+l,j=u;V+B>i&&(V=i-B);var q=this.container.selectAll("rect.scrollbar-vertical").data(R?[0]:[]);q.exit().on(".drag",null).remove(),q.enter().append("rect").classed("scrollbar-vertical",!0).call(rye.fill,Nl.barColor),R?(this.vbar=q.attr({rx:Nl.barRadius,ry:Nl.barRadius,x:V,y:j,width:B,height:O}),this._vbarYMin=j+O/2,this._vbarTranslateMax=y-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var U=this.id,J=C-.5,ee=R?k+B+.5:k+.5,ce=S-.5,ye=A?L+m+.5:L+.5,xe=a._topdefs.selectAll("#"+U).data(A||R?[0]:[]);if(xe.exit().remove(),xe.enter().append("clipPath").attr("id",U).append("rect"),A||R?(this._clipRect=xe.select("rect").attr({x:Math.floor(J),y:Math.floor(ce),width:Math.ceil(ee)-Math.floor(J),height:Math.ceil(ye)-Math.floor(ce)}),this.container.call(S3.setClipUrl,U,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S3.setClipUrl,null),delete this._clipRect),A||R){var ue=vp.behavior.drag().on("dragstart",function(){vp.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ue);var K=vp.behavior.drag().on("dragstart",function(){vp.event.sourceEvent.preventDefault(),vp.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(K),R&&this.vbar.on(".drag",null).call(K)}this.setTranslate(r,n)};Nl.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S3.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)};Nl.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=vp.event.dx),this.vbar&&(r-=vp.event.dy),this.setTranslate(t,r)};Nl.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=vp.event.deltaY),this.vbar&&(r+=vp.event.deltaY),this.setTranslate(t,r)};Nl.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,a=n+this._hbarTranslateMax,i=kC.constrain(vp.event.x,n,a),o=(i-n)/(a-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=kC.constrain(vp.event.y,l,u),f=(c-l)/(u-l),v=this.position.h-this._box.h;r=f*v}this.setTranslate(t,r)};Nl.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=kC.constrain(t||0,0,n),r=kC.constrain(r||0,0,a),this.translateX=t,this.translateY=r,this.container.call(S3.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var i=t/n;this.hbar.call(S3.setTranslate,t+i*this._hbarTranslateMax,r)}if(this.vbar){var o=r/a;this.vbar.call(S3.setTranslate,t,r+o*this._vbarTranslateMax)}}});var vye=fe((jpr,dye)=>{"use strict";var E3=xi(),yA=Hs(),xA=ni(),k3=ea(),R0=Xt(),CC=as(),T5t=Mo().arrayEditor,oye=nc().LINE_SPACING,ba=SC(),A5t=iye();dye.exports=function(t){var r=t._fullLayout,n=R0.filterVisible(r[ba.name]);function a(v){yA.autoMargin(t,fye(v))}var i=r._menulayer.selectAll("g."+ba.containerClassName).data(n.length>0?[0]:[]);if(i.enter().append("g").classed(ba.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){E3.select(this).selectAll("g."+ba.headerGroupClassName).each(a)}).remove(),n.length!==0){var o=i.selectAll("g."+ba.headerGroupClassName).data(n,M5t);o.enter().append("g").classed(ba.headerGroupClassName,!0);for(var s=R0.ensureSingle(i,"g",ba.dropdownButtonGroupClassName,function(v){v.style("pointer-events","all")}),l=0;l{"use strict";var F5t=SC();pye.exports={moduleType:"component",name:F5t.name,layoutAttributes:XU(),supplyLayoutDefaults:tye(),draw:vye()}});var bA=fe((Ypr,mye)=>{"use strict";mye.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}});var JU=fe((Xpr,_ye)=>{"use strict";var yye=Ds(),D5t=zE(),R5t=ta().extendDeepAll,I5t=rl().overrideAll,z5t=Z4(),xye=Mo().templatedArray,h2=bA(),q5t=xye("step",{visible:{valType:"boolean",dflt:!0},method:{valType:"enumerated",values:["restyle","relayout","animate","update","skip"],dflt:"restyle"},args:{valType:"info_array",freeLength:!0,items:[{valType:"any"},{valType:"any"},{valType:"any"}]},label:{valType:"string"},value:{valType:"string"},execute:{valType:"boolean",dflt:!0}});_ye.exports=I5t(xye("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:q5t,lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3,dflt:0},pad:R5t(D5t({editType:"arraydraw"}),{},{t:{dflt:20}}),xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left"},y:{valType:"number",min:-2,max:3,dflt:0},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"top"},transition:{duration:{valType:"number",min:0,dflt:150},easing:{valType:"enumerated",values:z5t.transition.easing.values,dflt:"cubic-in-out"}},currentvalue:{visible:{valType:"boolean",dflt:!0},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left"},offset:{valType:"number",dflt:10},prefix:{valType:"string"},suffix:{valType:"string"},font:yye({})},font:yye({}),activebgcolor:{valType:"color",dflt:h2.gripBgActiveColor},bgcolor:{valType:"color",dflt:h2.railBgColor},bordercolor:{valType:"color",dflt:h2.railBorderColor},borderwidth:{valType:"number",min:0,dflt:h2.railBorderWidth},ticklen:{valType:"number",min:0,dflt:h2.tickLength},tickcolor:{valType:"color",dflt:h2.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:h2.minorTickLength}}),"arraydraw","from-root")});var Aye=fe((Zpr,Tye)=>{"use strict";var C3=Xt(),bye=Ah(),wye=JU(),B5t=bA(),O5t=B5t.name,N5t=wye.steps;Tye.exports=function(t,r){bye(t,r,{name:O5t,handleItemDefaults:U5t})};function U5t(e,t,r){function n(f,v){return C3.coerce(e,t,wye,f,v)}for(var a=bye(e,t,{name:"steps",handleItemDefaults:V5t}),i=0,o=0;o{"use strict";var pp=xi(),LC=Hs(),Om=ni(),gp=ea(),I0=Xt(),G5t=I0.strTranslate,wA=as(),H5t=Mo().arrayEditor,Xa=bA(),tV=nc(),Eye=tV.LINE_SPACING,QU=tV.FROM_TL,eV=tV.FROM_BR;Dye.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,a=j5t(n,t),i=n._infolayer.selectAll("g."+Xa.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(Xa.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),LC.autoMargin(t,kye(c))}if(i.exit().each(function(){pp.select(this).selectAll("g."+Xa.groupClassName).each(o)}).remove(),a.length!==0){var s=i.selectAll("g."+Xa.groupClassName).data(a,W5t);s.enter().append("g").classed(Xa.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",G5t(o-Xa.gripWidth*.5,t._dims.currentValueTotalHeight))}}function rV(e,t){var r=e._dims;return r.inputAreaStart+Xa.stepInset+(r.inputAreaLength-2*Xa.stepInset)*Math.min(1,Math.max(0,t))}function Sye(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Xa.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Xa.stepInset-2*r.inputAreaStart)))}function Q5t(e,t,r){var n=r._dims,a=I0.ensureSingle(e,"rect",Xa.railTouchRectClass,function(i){i.call(Pye,t,e,r).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Xa.tickOffset+r.ticklen+n.labelHeight)}).call(Om.fill,r.bgcolor).attr("opacity",0),gp.setTranslate(a,0,n.currentValueTotalHeight)}function e4t(e,t){var r=t._dims,n=r.inputAreaLength-Xa.railInset*2,a=I0.ensureSingle(e,"rect",Xa.railRectClass);a.attr({width:n,height:Xa.railWidth,rx:Xa.railRadius,ry:Xa.railRadius,"shape-rendering":"crispEdges"}).call(Om.stroke,t.bordercolor).call(Om.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),gp.setTranslate(a,Xa.railInset,(r.inputAreaWidth-Xa.railWidth)*.5+r.currentValueTotalHeight)}});var zye=fe((Kpr,Iye)=>{"use strict";var t4t=bA();Iye.exports={moduleType:"component",name:t4t.name,layoutAttributes:JU(),supplyLayoutDefaults:Aye(),draw:Rye()}});var FC=fe((Jpr,Bye)=>{"use strict";var qye=tc();Bye.exports={bgcolor:{valType:"color",dflt:qye.background,editType:"plot"},bordercolor:{valType:"color",dflt:qye.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}});var nV=fe((Qpr,Oye)=>{"use strict";Oye.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}});var DC=fe((e1r,Nye)=>{"use strict";Nye.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var Gye=fe(IC=>{"use strict";var r4t=El(),n4t=as(),Uye=DC(),i4t=nc().LINE_SPACING,RC=Uye.name;function Vye(e){var t=e&&e[RC];return t&&t.visible}IC.isVisible=Vye;IC.makeData=function(e){for(var t=r4t.list({_fullLayout:e},"x",!0),r=e.margin,n=[],a=0;a{"use strict";var zC=Xt(),Hye=Mo(),jye=El(),a4t=FC(),o4t=nV();Wye.exports=function(t,r,n){var a=t[n],i=r[n];if(!(a.rangeslider||r._requestRangeslider[i._id]))return;zC.isPlainObject(a.rangeslider)||(a.rangeslider={});var o=a.rangeslider,s=Hye.newContainer(i,"rangeslider");function l(L,w){return zC.coerce(o,s,a4t,L,w)}var u,c;function f(L,w){return zC.coerce(u,c,o4t,L,w)}var v=l("visible");if(v){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!i.isValidRange(o.range)),l("range");var g=r._subplots;if(g)for(var p=g.cartesian.filter(function(L){return L.slice(0,Math.max(0,L.indexOf("y")))===jye.name2id(n)}).map(function(L){return L.slice(L.indexOf("y"),L.length)}),x=zC.simpleMap(p,jye.id2name),_=0;_{"use strict";var s4t=El().list,l4t=rp().getAutoRange,u4t=DC();Xye.exports=function(t){for(var r=s4t(t,"x",!0),n=0;n{"use strict";var qC=xi(),c4t=bi(),f4t=Hs(),mu=Xt(),BC=mu.strTranslate,Kye=ea(),Nm=ni(),h4t=qx(),d4t=gu(),iV=El(),v4t=ed(),p4t=np(),fo=DC();Jye.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=q.max)V=E[j+1];else if(O=q.pmax)V=E[j+1];else if(O0?e.touches[0].clientX:0}function g4t(e,t,r,n){if(t._context.staticPlot)return;var a=e.select("rect."+fo.slideBoxClassName).node(),i=e.select("rect."+fo.grabAreaMinClassName).node(),o=e.select("rect."+fo.grabAreaMaxClassName).node();function s(){var l=qC.event,u=l.target,c=$ye(l),f=c-e.node().getBoundingClientRect().left,v=n.d2p(r._rl[0]),g=n.d2p(r._rl[1]),p=v4t.coverSlip();this.addEventListener("touchmove",x),this.addEventListener("touchend",_),p.addEventListener("mousemove",x),p.addEventListener("mouseup",_);function x(y){var C=$ye(y),k=+C-c,S,L,w;switch(u){case a:if(w="ew-resize",v+k>r._length||g+k<0)return;S=v+k,L=g+k;break;case i:if(w="col-resize",v+k>r._length)return;S=v+k,L=g;break;case o:if(w="col-resize",g+k<0)return;S=v,L=g+k;break;default:w="ew-resize",S=f,L=f+k;break}if(L{"use strict";var S4t=Xt(),E4t=FC(),k4t=nV(),aV=Gye();exe.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:S4t.extendFlat({},E4t,{yaxis:k4t})}}},layoutAttributes:FC(),handleDefaults:Yye(),calcAutorange:Zye(),draw:Qye(),isVisible:aV.isVisible,makeData:aV.makeData,autoMarginOpts:aV.autoMarginOpts}});var OC=fe((o1r,nxe)=>{"use strict";var C4t=Ds(),rxe=tc(),L4t=Mo().templatedArray,P4t=L4t("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});nxe.exports={visible:{valType:"boolean",editType:"plot"},buttons:P4t,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:C4t({editType:"plot"}),bgcolor:{valType:"color",dflt:rxe.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:rxe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var oV=fe((s1r,ixe)=>{"use strict";ixe.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var sxe=fe((l1r,oxe)=>{"use strict";var NC=Xt(),F4t=ni(),D4t=Mo(),R4t=Ah(),axe=OC(),sV=oV();oxe.exports=function(t,r,n,a,i){var o=t.rangeselector||{},s=D4t.newContainer(r,"rangeselector");function l(g,p){return NC.coerce(o,s,axe,g,p)}var u=R4t(o,s,{name:"buttons",handleItemDefaults:I4t,calendar:i}),c=l("visible",u.length>0);if(c){var f=z4t(r,n,a);l("x",f[0]),l("y",f[1]),NC.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),NC.coerceFont(l,"font",n.font);var v=l("bgcolor");l("activecolor",F4t.contrast(v,sV.lightAmount,sV.darkAmount)),l("bordercolor"),l("borderwidth")}};function I4t(e,t,r,n){var a=n.calendar;function i(l,u){return NC.coerce(e,t,axe.buttons,l,u)}var o=i("visible");if(o){var s=i("step");s!=="all"&&(a&&a!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":i("stepmode"),i("count")),i("label")}}function z4t(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),a=0,i=0;i{"use strict";var q4t=HI(),B4t=Xt().titleCase;lxe.exports=function(t,r){var n=t._name,a={};if(r.step==="all")a[n+".autorange"]=!0;else{var i=O4t(t,r);a[n+".range[0]"]=i[0],a[n+".range[1]"]=i[1]}return a};function O4t(e,t){var r=e.range,n=new Date(e.r2l(r[1])),a=t.step,i=q4t["utc"+B4t(a)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+i.offset(n,-o));break;case"todate":var l=i.offset(n,-o);s=e.l2r(+i.ceil(l));break}var u=r[1];return[s,u]}});var mxe=fe((c1r,gxe)=>{"use strict";var VC=xi(),N4t=bi(),U4t=Hs(),cxe=ni(),pxe=ea(),lg=Xt(),fxe=lg.strTranslate,UC=as(),V4t=El(),cV=nc(),hxe=cV.LINE_SPACING,dxe=cV.FROM_TL,vxe=cV.FROM_BR,uV=oV(),G4t=uxe();gxe.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(H4t(t),j4t);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(a){var i=VC.select(this),o=a,s=o.rangeselector,l=i.selectAll("g.button").data(lg.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=VC.select(this),f=G4t(o,u);u._isActive=W4t(o,u,f),c.call(lV,s,u),c.call(X4t,s,u,t),c.on("click",function(){t._dragged||N4t.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(lV,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(lV,s,u)})}),$4t(t,l,s,o._name,i)})};function H4t(e){for(var t=V4t.list(e,"x",!0),r=[],n=0;n{"use strict";yxe.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:OC()}}},layoutAttributes:OC(),handleDefaults:sxe(),draw:mxe()}});var nl=fe(fV=>{"use strict";var _xe=ta().extendFlat;fV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+" ":"",a=e.trace?"trace":"subplot",i=t.description?" "+t.description:"",o={x:_xe({},r,{}),y:_xe({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};fV.defaults=function(e,t,r,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var K4t=Xt(),J4t=(Tb(),Gs(wb)).counter,Q4t=nl().attributes,bxe=rc().idRegex,eTt=Mo(),hV={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[J4t("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[bxe.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[bxe.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:Q4t({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function GC(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(a.length)return a}function tTt(e,t){var r=e.grid||{},n=GC(t,r,"x"),a=GC(t,r,"y");if(!e.grid&&!n&&!a)return;var i=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(a),l=o&&n!==r.xaxes&&s&&a!==r.yaxes,u,c;i?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=a.length),o&&(c=n.length));var f=eTt.newContainer(t,"grid");function v(w,A){return K4t.coerce(r,f,hV,w,A)}var g=v("rows",u),p=v("columns",c);if(!(g*p>1)){delete t.grid;return}if(!i&&!o&&!s){var x=v("pattern")==="independent";x&&(i=!0)}f._hasSubplotGrid=i;var _=v("roworder"),y=_==="top to bottom",C=i?.2:.1,k=i?.3:.1,S,L;l&&t._splomGridDflt&&(S=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:wxe("x",v,C,S,p),y:wxe("y",v,k,L,g,y)}}function wxe(e,t,r,n,a,i){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(a),u=s[0],c=(s[1]-u)/(a-o),f=c*(1-o),v=0;v{"use strict";Mxe.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"}});var kxe=fe((p1r,Exe)=>{"use strict";var Sxe=aa(),nTt=bi(),iTt=Xt(),aTt=Mo(),oTt=vV();Exe.exports=function(e,t,r,n){var a="error_"+n.axis,i=aTt.newContainer(t,a),o=e[a]||{};function s(p,x){return iTt.coerce(o,i,oTt,p,x)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var v="copy_"+n.inherit+"style";if(n.inherit){var g=t["error_"+n.inherit];(g||{}).visible&&s(v,!(o.color||Sxe(o.thickness)||Sxe(o.width)))}(!n.inherit||!i[v])&&(s("color",r),s("thickness"),s("width",nTt.traceIs(t,"gl3d")?0:4))}}});var pV=fe((g1r,Lxe)=>{"use strict";Lxe.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var a=t.array||[];if(n)return function(u,c){var f=+a[c];return[f,f]};var i=t.arrayminus||[];return function(u,c){var f=+a[c],v=+i[c];return!isNaN(f)||!isNaN(v)?[v||0,f||0]:[NaN,NaN]}}else{var o=Cxe(r,t.value),s=Cxe(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function Cxe(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var Dxe=fe((m1r,Fxe)=>{"use strict";var gV=aa(),sTt=bi(),mV=Yi(),lTt=Xt(),uTt=pV();Fxe.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var Rxe=xi(),Um=aa(),cTt=ea(),fTt=Is();Ixe.exports=function(t,r,n,a){var i,o=n.xaxis,s=n.yaxis,l=a&&a.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,v=f.error_x||{},g=f.error_y||{},p;f.ids&&(p=function(C){return C.id});var x=fTt.hasMarkers(f)&&f.marker.maxdisplayed>0;!g.visible&&!v.visible&&(c=[]);var _=Rxe.select(this).selectAll("g.errorbar").data(c,p);if(_.exit().remove(),!!c.length){v.visible||_.selectAll("path.xerror").remove(),g.visible||_.selectAll("path.yerror").remove(),_.style("opacity",1);var y=_.enter().append("g").classed("errorbar",!0);l&&y.style("opacity",0).transition().duration(a.duration).style("opacity",1),cTt.setClipUrl(_,n.layerClipId,t),_.each(function(C){var k=Rxe.select(this),S=hTt(C,o,s);if(!(x&&!C.vis)){var L,w=k.select("path.yerror");if(g.visible&&Um(S.x)&&Um(S.yh)&&Um(S.ys)){var A=g.width;L="M"+(S.x-A)+","+S.yh+"h"+2*A+"m-"+A+",0V"+S.ys,S.noYS||(L+="m-"+A+",0h"+2*A),i=!w.size(),i?w=k.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(w=w.transition().duration(a.duration).ease(a.easing)),w.attr("d",L)}else w.remove();var T=k.select("path.xerror");if(v.visible&&Um(S.y)&&Um(S.xh)&&Um(S.xs)){var m=(v.copy_ystyle?g:v).width;L="M"+S.xh+","+(S.y-m)+"v"+2*m+"m0,-"+m+"H"+S.xs,S.noXS||(L+="m0,-"+m+"v"+2*m),i=!T.size(),i?T=k.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(T=T.transition().duration(a.duration).ease(a.easing)),T.attr("d",L)}else T.remove()}})}})};function hTt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),Um(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),Um(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var Oxe=fe((x1r,Bxe)=>{"use strict";var dTt=xi(),qxe=ni();Bxe.exports=function(t){t.each(function(r){var n=r[0].trace,a=n.error_y||{},i=n.error_x||{},o=dTt.select(this);o.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(qxe.stroke,a.color),i.copy_ystyle&&(i=a),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(qxe.stroke,i.color)})}});var Vxe=fe((_1r,Uxe)=>{"use strict";var TA=Xt(),Nxe=rl().overrideAll,AA=vV(),d2={error_x:TA.extendFlat({},AA),error_y:TA.extendFlat({},AA)};delete d2.error_x.copy_zstyle;delete d2.error_y.copy_zstyle;delete d2.error_y.copy_ystyle;var MA={error_x:TA.extendFlat({},AA),error_y:TA.extendFlat({},AA),error_z:TA.extendFlat({},AA)};delete MA.error_x.copy_ystyle;delete MA.error_y.copy_ystyle;delete MA.error_z.copy_ystyle;delete MA.error_z.copy_zstyle;Uxe.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:d2,bar:d2,histogram:d2,scatter3d:Nxe(MA,"calc","nested"),scattergl:Nxe(d2,"calc","nested")}},supplyDefaults:kxe(),calc:Dxe(),makeComputeError:pV(),plot:zxe(),style:Oxe(),hoverInfo:vTt};function vTt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var Hxe=fe((b1r,Gxe)=>{"use strict";Gxe.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}});var Jxe=fe((w1r,Kxe)=>{"use strict";var Vm=xi(),jC=Hs(),jxe=bi(),ug=Yi(),HC=ed(),xv=Xt(),yp=xv.strTranslate,$xe=ta().extendFlat,yV=np(),mp=ea(),L3=ni(),pTt=qx(),gTt=as(),mTt=Wf().flipScale,yTt=vA(),xTt=gC(),_Tt=pf(),_V=nc(),Wxe=_V.LINE_SPACING,Yxe=_V.FROM_TL,Xxe=_V.FROM_BR,Cl=Hxe().cn;function bTt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Cl.colorbar).data(wTt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(Cl.colorbar,!0),r.each(function(n){var a=Vm.select(this);xv.ensureSingle(a,"rect",Cl.cbbg),xv.ensureSingle(a,"g",Cl.cbfills),xv.ensureSingle(a,"g",Cl.cblines),xv.ensureSingle(a,"g",Cl.cbaxis,function(o){o.classed(Cl.crisp,!0)}),xv.ensureSingle(a,"g",Cl.cbtitleunshift,function(o){o.append("g").classed(Cl.cbtitle,!0)}),xv.ensureSingle(a,"rect",Cl.cboutline);var i=TTt(a,n,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&ATt(a,n,e)}),r.exit().each(function(n){jC.autoMargin(e,n._id)}).remove(),r.order()}function wTt(e){var t=e._fullLayout,r=e.calcdata,n=[],a,i,o,s;function l(k){return $xe(k,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,a):(a._fillgradient=i.reversescale?mTt(i.colorscale):i.colorscale,a._zrange=[i[s.min],i[s.max]])}for(var c=0;c[Math.min(e[0]+t,e[1]),e[1]],Zxe=(e,t)=>[e[0],Math.max(e[1]-t,e[0])];function TTt(e,t,r){var n=t.orientation==="v",a=t.len,i=t.lenmode,o=t.thickness,s=t.thicknessmode,l=t.outlinewidth,u=t.borderwidth,c=t.bgcolor,f=t.xanchor,v=t.yanchor,g=t.xpad,p=t.ypad,x=t.x,_=n?t.y:1-t.y,y=t.yref==="paper",C=t.xref==="paper",k=r._fullLayout,S=k._size,L=t._fillcolor,w=t._line,A=t.title,T=A.side,m=t._zrange||Vm.extent((typeof L=="function"?L:w.color).domain()),F=typeof w.color=="function"?w.color:function(){return w.color},E=typeof L=="function"?L:function(){return L},I=t._levels,R=MTt(r,t,m),B=R.fill,O=R.line,V=Math.round(o*(s==="fraction"?n?S.w:S.h:1)),j=V/(n?S.w:S.h),q=Math.round(a*(i==="fraction"?n?S.h:S.w:1)),U=q/(n?S.h:S.w),J=C?S.w:r._fullLayout.width,ee=y?S.h:r._fullLayout.height,ce=Math.round(n?x*J+g:_*ee+p),ye={center:.5,right:1}[f]||0,xe={top:1,middle:.5}[v]||0,ue=n?x-ye*j:_-xe*j,K=n?_-xe*U:x-ye*U,_e=Math.round(n?ee*(1-K):J*K);t._lenFrac=U,t._thickFrac=j,t._uFrac=ue,t._vFrac=K;var ne=t._axis=STt(r,t,m);ne.position=j+(n?x+g/S.w:_+p/S.h);var ae=["top","bottom"].indexOf(T)!==-1;if(n&&ae&&(ne.title.side=T,ne.titlex=x+g/S.w,ne.titley=K+(A.side==="top"?U-p/S.h:p/S.h)),!n&&!ae&&(ne.title.side=T,ne.titley=_+p/S.h,ne.titlex=K+g/S.w),w.color&&t.tickmode==="auto"){ne.tickmode="linear",ne.tick0=I.start;var pe=I.size,ie=xv.constrain(q/50,4,15)+1,le=(m[1]-m[0])/((t.nticks||ie)*pe);if(le>1){var me=Math.pow(10,Math.floor(Math.log(le)/Math.LN10));pe*=me*xv.roundUp(le/me,[2,5,10]),(Math.abs(I.start)/I.size+1e-6)%1<2e-6&&(ne.tick0=0)}ne.dtick=pe}var be=n?p/S.h:g/S.w;ne.domain=Zxe(xV([K,K+U],be),be),ne.setScale(),e.attr("transform",yp(Math.round(S.l),Math.round(S.t)));var De=e.select("."+Cl.cbtitleunshift).attr("transform",yp(-Math.round(S.l),-Math.round(S.t))),Ge=ne.ticklabelposition,ht=ne.title.font.size,it=e.select("."+Cl.cbaxis),Oe,ze=0,ct=0;function et(Te,Ve){var $e={propContainer:ne,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:k._dfltTitle.colorbar,containerGroup:e.select("."+Cl.cbtitle)},ot=Te.charAt(0)==="h"?Te.slice(1):"h"+Te;e.selectAll("."+ot+",."+ot+"-math-group").remove(),pTt.draw(r,Te,$xe($e,Ve||{}))}function qe(){if(n&&ae||!n&&!ae){var Te,Ve;T==="top"&&(Te=g+S.l+J*x,Ve=p+S.t+ee*(1-K-U)+3+ht*.75),T==="bottom"&&(Te=g+S.l+J*x,Ve=p+S.t+ee*(1-K)-3-ht*.25),T==="right"&&(Ve=p+S.t+ee*_+3+ht*.75,Te=g+S.l+J*K),et(ne._id+"title",{attributes:{x:Te,y:Ve,"text-anchor":n?"start":"middle"}})}}function we(){if(n&&!ae||!n&&ae){var Te=ne.position||0,Ve=ne._offset+ne._length/2,$e,ot;if(T==="right")ot=Ve,$e=S.l+J*Te+10+ht*(ne.showticklabels?1:.5);else if($e=Ve,T==="bottom"&&(ot=S.t+ee*Te+10+(Ge.indexOf("inside")===-1?ne.tickfont.size:0)+(ne.ticks!=="inside"&&t.ticklen||0)),T==="top"){var tt=A.text.split("
").length;ot=S.t+ee*Te+10-V-Wxe*ht*tt}et((n?"h":"v")+ne._id+"title",{avoid:{selection:Vm.select(r).selectAll("g."+ne._id+"tick"),side:T,offsetTop:n?0:S.t,offsetLeft:n?S.l:0,maxShift:n?k.width:k.height},attributes:{x:$e,y:ot,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Le(){if(!n&&!ae||n&&ae){var Te=e.select("."+Cl.cbtitle),Ve=Te.select("text"),$e=[-l/2,l/2],ot=Te.select(".h"+ne._id+"title-math-group").node(),tt=15.6;Ve.node()&&(tt=parseInt(Ve.node().style.fontSize,10)*Wxe);var nt;if(ot?(nt=mp.bBox(ot),ct=nt.width,ze=nt.height,ze>tt&&($e[1]-=(ze-tt)/2)):Ve.node()&&!Ve.classed(Cl.jsPlaceholder)&&(nt=mp.bBox(Ve.node()),ct=nt.width,ze=nt.height),n){if(ze){if(ze+=5,T==="top")ne.domain=Zxe(ne.domain,ze/S.h),$e[1]*=-1;else{ne.domain=xV(ne.domain,ze/S.h);var We=gTt.lineCount(Ve);$e[1]+=(1-We)*tt}Te.attr("transform",yp($e[0],$e[1])),ne.setScale()}}else ct&&(T==="right"&&(ne.domain=xV(ne.domain,(ct+ht/2)/S.w)),Te.attr("transform",yp($e[0],$e[1])),ne.setScale())}e.selectAll("."+Cl.cbfills+",."+Cl.cblines).attr("transform",n?yp(0,Math.round(S.h*(1-ne.domain[1]))):yp(Math.round(S.w*ne.domain[0]),0)),it.attr("transform",n?yp(0,Math.round(-S.t)):yp(Math.round(-S.l),0));var mt=e.select("."+Cl.cbfills).selectAll("rect."+Cl.cbfill).attr("style","").data(B);mt.enter().append("rect").classed(Cl.cbfill,!0).attr("style",""),mt.exit().remove();var bt=m.map(ne.c2p).map(Math.round).sort(function(fr,Ot){return fr-Ot});mt.each(function(fr,Ot){var cr=[Ot===0?m[0]:(B[Ot]+B[Ot-1])/2,Ot===B.length-1?m[1]:(B[Ot]+B[Ot+1])/2].map(ne.c2p).map(Math.round);n&&(cr[1]=xv.constrain(cr[1]+(cr[1]>cr[0])?1:-1,bt[0],bt[1]));var Ct=Vm.select(this).attr(n?"x":"y",ce).attr(n?"y":"x",Vm.min(cr)).attr(n?"width":"height",Math.max(V,2)).attr(n?"height":"width",Math.max(Vm.max(cr)-Vm.min(cr),2));if(t._fillgradient)mp.gradient(Ct,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var wt=E(fr).replace("e-","");Ct.attr("fill",L3.hexString(wt))}});var Yt=e.select("."+Cl.cblines).selectAll("path."+Cl.cbline).data(w.color&&w.width?O:[]);Yt.enter().append("path").classed(Cl.cbline,!0),Yt.exit().remove(),Yt.each(function(fr){var Ot=ce,cr=Math.round(ne.c2p(fr))+w.width/2%1;Vm.select(this).attr("d","M"+(n?Ot+","+cr:cr+","+Ot)+(n?"h":"v")+V).call(mp.lineGroupStyle,w.width,F(fr),w.dash)}),it.selectAll("g."+ne._id+"tick,path").remove();var jt=ce+V+(l||0)/2-(t.ticks==="outside"?1:0),mr=ug.calcTicks(ne),or=ug.getTickSigns(ne)[2];return ug.drawTicks(r,ne,{vals:ne.ticks==="inside"?ug.clipEnds(ne,mr):mr,layer:it,path:ug.makeTickPath(ne,jt,or),transFn:ug.makeTransTickFn(ne)}),ug.drawLabels(r,ne,{vals:mr,layer:it,transFn:ug.makeTransTickLabelFn(ne),labelFns:ug.makeLabelFns(ne,jt)})}function Ke(){var Te,Ve=V+l/2;Ge.indexOf("inside")===-1&&(Te=mp.bBox(it.node()),Ve+=n?Te.width:Te.height),Oe=De.select("text");var $e=0,ot=n&&T==="top",tt=!n&&T==="right",nt=0;if(Oe.node()&&!Oe.classed(Cl.jsPlaceholder)){var We,mt=De.select(".h"+ne._id+"title-math-group").node();mt&&(n&&ae||!n&&!ae)?(Te=mp.bBox(mt),$e=Te.width,We=Te.height):(Te=mp.bBox(De.node()),$e=Te.right-S.l-(n?ce:_e),We=Te.bottom-S.t-(n?_e:ce),!n&&T==="top"&&(Ve+=Te.height,nt=Te.height)),tt&&(Oe.attr("transform",yp($e/2+ht/2,0)),$e*=2),Ve=Math.max(Ve,n?$e:We)}var bt=(n?g:p)*2+Ve+u+l/2,Yt=0;!n&&A.text&&v==="bottom"&&_<=0&&(Yt=bt/2,bt+=Yt,nt+=Yt),k._hColorbarMoveTitle=Yt,k._hColorbarMoveCBTitle=nt;var jt=u+l,mr=(n?ce:_e)-jt/2-(n?g:0),or=(n?_e:ce)-(n?q:p+nt-Yt);e.select("."+Cl.cbbg).attr("x",mr).attr("y",or).attr(n?"width":"height",Math.max(bt-Yt,2)).attr(n?"height":"width",Math.max(q+jt,2)).call(L3.fill,c).call(L3.stroke,t.bordercolor).style("stroke-width",u);var fr=tt?Math.max($e-10,0):0;e.selectAll("."+Cl.cboutline).attr("x",(n?ce:_e+g)+fr).attr("y",(n?_e+p-q:ce)+(ot?ze:0)).attr(n?"width":"height",Math.max(V,2)).attr(n?"height":"width",Math.max(q-(n?2*p+ze:2*g+fr),2)).call(L3.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Ot=n?ye*bt:0,cr=n?0:(1-xe)*bt-nt;if(Ot=C?S.l-Ot:-Ot,cr=y?S.t-cr:-cr,e.attr("transform",yp(Ot,cr)),!n&&(u||L3.opacity(c)&&!L3.equals(k.paper_bgcolor,c))){var Ct=it.selectAll("text"),wt=Ct[0].length,Tt=e.select("."+Cl.cbbg).node(),Mt=mp.bBox(Tt),Lt=mp.getTranslate(e),ft=2;Ct.each(function(Cn,Dt){var At=0,Vt=wt-1;if(Dt===At||Dt===Vt){var Qt=mp.bBox(this),Ut=mp.getTranslate(this),_r;if(Dt===Vt){var rn=Qt.right+Ut.x,Jr=Mt.right+Lt.x+_e-u-ft+x;_r=Jr-rn,_r>0&&(_r=0)}else if(Dt===At){var qn=Qt.left+Ut.x,ri=Mt.left+Lt.x+_e+u+ft;_r=ri-qn,_r<0&&(_r=0)}_r&&(wt<3?this.setAttribute("transform","translate("+_r+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var kt={},rr=Yxe[f],pr=Xxe[f],Kr=Yxe[v],Nr=Xxe[v],dn=bt-V;n?(i==="pixels"?(kt.y=_,kt.t=q*Kr,kt.b=q*Nr):(kt.t=kt.b=0,kt.yt=_+a*Kr,kt.yb=_-a*Nr),s==="pixels"?(kt.x=x,kt.l=bt*rr,kt.r=bt*pr):(kt.l=dn*rr,kt.r=dn*pr,kt.xl=x-o*rr,kt.xr=x+o*pr)):(i==="pixels"?(kt.x=x,kt.l=q*rr,kt.r=q*pr):(kt.l=kt.r=0,kt.xl=x+a*rr,kt.xr=x-a*pr),s==="pixels"?(kt.y=1-_,kt.t=bt*Kr,kt.b=bt*Nr):(kt.t=dn*Kr,kt.b=dn*Nr,kt.yt=_-o*Kr,kt.yb=_+o*Nr));var xr=t.y<.5?"b":"t",Fr=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var Zr={r:k.width-mr-Ot,l:mr+kt.r,b:k.height-or-cr,t:or+kt.b};C&&y?jC.autoMargin(r,t._id,kt):C?r._fullLayout._reservedMargin[t._id][xr]=Zr[xr]:y||n?r._fullLayout._reservedMargin[t._id][Fr]=Zr[Fr]:r._fullLayout._reservedMargin[t._id][xr]=Zr[xr]}return xv.syncOrAsync([jC.previousPromises,qe,Le,we,jC.previousPromises,Ke],r)}function ATt(e,t,r){var n=t.orientation==="v",a=r._fullLayout,i=a._size,o,s,l;HC.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),yV(e)},moveFn:function(u,c){e.attr("transform",o+yp(u,c)),s=HC.align((n?t._uFrac:t._vFrac)+u/i.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=HC.align((n?t._vFrac:1-t._uFrac)-c/i.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=HC.getCursor(s,l,t.xanchor,t.yanchor);yV(e,f)},doneFn:function(){if(yV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?jxe.call("_guiRestyle",r,u,t._traceIndex):jxe.call("_guiRelayout",r,u)}}})}function MTt(e,t,r){var n=t._levels,a=[],i=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";Qxe.exports={moduleType:"component",name:"colorbar",attributes:ck(),supplyDefaults:EB(),draw:Jxe().draw,hasColorbar:_B()}});var r2e=fe((A1r,t2e)=>{"use strict";t2e.exports={moduleType:"component",name:"legend",layoutAttributes:bO(),supplyLayoutDefaults:TO(),draw:qO(),style:DO()}});var i2e=fe((M1r,n2e)=>{"use strict";n2e.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"}}});var o2e=fe((S1r,a2e)=>{"use strict";a2e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var wV=fe((E1r,c2e)=>{"use strict";var ETt=bi(),u2e=Xt(),bV=u2e.extendFlat,s2e=u2e.extendDeep;function l2e(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function kTt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}c2e.exports=function(t,r){var n,a=t.data,i=t.layout,o=s2e([],a),s=s2e({},i,l2e(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(n=0;n{"use strict";var CTt=Mx().EventEmitter,LTt=bi(),PTt=Xt(),f2e=ag(),FTt=wV(),DTt=$8(),RTt=K8();function ITt(e,t){var r=new CTt,n=FTt(e,{format:"png"}),a=n.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function i(){var s=f2e.getDelay(a._fullLayout);setTimeout(function(){var l=DTt(a),u=document.createElement("canvas");u.id=PTt.randstr(),r=RTt({format:t.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){a&&document.body.removeChild(a)}},s)}var o=f2e.getRedrawFunc(a);return LTt.call("_doPlot",a,n.data,n.layout,n.config).then(o).then(i).catch(function(s){r.emit("error",s)}),r}h2e.exports=ITt});var g2e=fe((C1r,p2e)=>{"use strict";var v2e=ag(),zTt={getDelay:v2e.getDelay,getRedrawFunc:v2e.getRedrawFunc,clone:wV(),toSVG:$8(),svgToImg:K8(),toImage:d2e(),downloadImage:rU()};p2e.exports=zTt});var y2e=fe(cg=>{"use strict";cg.version=A4().version;Fte();xse();var qTt=bi(),SA=cg.register=qTt.register,AV=qpe(),m2e=Object.keys(AV);for(WC=0;WC{"use strict";x2e.exports=y2e()});var u1=fe((F1r,M2e)=>{"use strict";var nu=Ol(),b2e=pl().axisHoverFormat,{hovertemplateAttrs:BTt,texttemplateAttrs:OTt,templatefallbackAttrs:w2e}=Oo(),A2e=_s(),NTt=Ds(),T2e=Im(),UTt=Uc().pattern,v2=ta().extendFlat,MV=NTt({editType:"calc",arrayOk:!0,colorEditType:"style"}),VTt=nu.marker,GTt=VTt.line,HTt=v2({},GTt.width,{dflt:0}),jTt=v2({width:HTt,editType:"calc"},A2e("marker.line")),WTt=v2({line:jTt,editType:"calc"},A2e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:UTt,cornerradius:{valType:"any",editType:"calc"}});M2e.exports={x:nu.x,x0:nu.x0,dx:nu.dx,y:nu.y,y0:nu.y0,dy:nu.dy,xperiod:nu.xperiod,yperiod:nu.yperiod,xperiod0:nu.xperiod0,yperiod0:nu.yperiod0,xperiodalignment:nu.xperiodalignment,yperiodalignment:nu.yperiodalignment,xhoverformat:b2e("x"),yhoverformat:b2e("y"),text:nu.text,texttemplate:OTt({editType:"plot"},{keys:T2e.eventDataKeys}),texttemplatefallback:w2e({editType:"plot"}),hovertext:nu.hovertext,hovertemplate:BTt({},{keys:T2e.eventDataKeys}),hovertemplatefallback:w2e(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:v2({},MV,{}),insidetextfont:v2({},MV,{}),outsidetextfont:v2({},MV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:v2({},nu.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:WTt,offsetgroup:nu.offsetgroup,alignmentgroup:nu.alignmentgroup,selected:{marker:{opacity:nu.selected.marker.opacity,color:nu.selected.marker.color,editType:"style"},textfont:nu.selected.textfont,editType:"style"},unselected:{marker:{opacity:nu.unselected.marker.opacity,color:nu.unselected.marker.color,editType:"style"},textfont:nu.unselected.textfont,editType:"style"},zorder:nu.zorder}});var XC=fe((D1r,S2e)=>{"use strict";S2e.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}});var ZC=fe((R1r,C2e)=>{"use strict";var YTt=ni(),E2e=Wf().hasColorscale,k2e=Vc(),XTt=Xt().coercePattern;C2e.exports=function(t,r,n,a,i){var o=n("marker.color",a),s=E2e(t,"marker");s&&k2e(t,r,i,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",YTt.defaultLine),E2e(t,"marker.line")&&k2e(t,r,i,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),XTt(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var z0=fe((I1r,I2e)=>{"use strict";var L2e=aa(),F3=Xt(),P2e=ni(),ZTt=bi(),$Tt=r2(),KTt=sp(),JTt=ZC(),QTt=n2(),F2e=u1(),$C=F3.coerceFont;function eAt(e,t,r,n){function a(u,c){return F3.coerce(e,t,F2e,u,c)}var i=$Tt(e,t,n,a);if(!i){t.visible=!1;return}KTt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("zorder"),a("orientation",t.x&&!t.y?"h":"v"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var o=a("textposition");R2e(e,t,n,a,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),JTt(e,t,a,r,n);var s=(t.marker.line||{}).color,l=ZTt.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||P2e.defaultLine,{axis:"y"}),l(e,t,s||P2e.defaultLine,{axis:"x",inherit:"y"}),F3.coerceSelectionMarkerOpacity(t,a)}function tAt(e,t){var r,n;function a(s,l){return F3.coerce(n._input,n,F2e,s,l)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&L2e(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function R2e(e,t,r,n,a,i){i=i||{};var o=i.moduleHasSelected!==!1,s=i.moduleHasUnselected!==!1,l=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,c=i.moduleHasTextangle!==!1,f=i.moduleHasInsideanchor!==!1,v=!!i.hasPathbar,g=Array.isArray(a)||a==="auto",p=g||a==="inside",x=g||a==="outside";if(p||x){var _=$C(n,"textfont",r.font),y=F3.extendFlat({},_),C=e.textfont&&e.textfont.color,k=!C;if(k&&delete y.color,$C(n,"insidetextfont",y),v){var S=F3.extendFlat({},_);k&&delete S.color,$C(n,"pathbar.textfont",S)}x&&$C(n,"outsidetextfont",_),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}p&&f&&n("insidetextanchor")}I2e.exports={supplyDefaults:eAt,crossTraceDefaults:tAt,handleText:R2e,validateCornerradius:D2e}});var SV=fe((z1r,z2e)=>{"use strict";var rAt=bi(),nAt=Yi(),iAt=Xt(),aAt=XC(),oAt=z0().validateCornerradius;z2e.exports=function(e,t,r){function n(x,_){return iAt.coerce(e,t,aAt,x,_)}for(var a=!1,i=!1,o=!1,s={},l=n("barmode"),u=l==="group",c=0;c0&&!s[v]&&(o=!0),s[v]=!0),f.visible&&f.type==="histogram"){var g=nAt.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);g.type!=="category"&&(i=!0)}}if(!a){delete t.barmode;return}l!=="overlay"&&n("barnorm"),n("bargap",i&&!o?0:.2),n("bargroupgap");var p=n("barcornerradius");t.barcornerradius=oAt(p)}});var EA=fe((q1r,q2e)=>{"use strict";var D3=Xt();q2e.exports=function(t,r){for(var n=0;n{"use strict";var B2e=Yi(),O2e=cp(),N2e=Wf().hasColorscale,U2e=Mh(),sAt=EA(),lAt=P0();V2e.exports=function(t,r){var n=B2e.getFromId(t,r.xaxis||"x"),a=B2e.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(i=n.makeCalcdata(r,"x",f),s=a.makeCalcdata(r,"y"),l=O2e(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=O2e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var v=Math.min(o.length,i.length),g=new Array(v),p=0;p{"use strict";var uAt=xi(),cAt=Xt();function fAt(e,t,r){var n=e._fullLayout,a=n["_"+r+"Text_minsize"];if(a){var i=n.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=i&&l.hide?0:a/l.fontSize;var u=uAt.select(this).select("text");cAt.setTransormAndDisplay(u,l)}})}}function hAt(e,t,r){if(r.uniformtext.mode){var n=H2e(e),a=r.uniformtext.minsize,i=t.scale*t.fontSize;t.hide=i{"use strict";var vAt=ni(),pAt=aa(),W2e=Xt().isArrayOrTypedArray;p2.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};p2.coerceNumber=function(e,t,r){if(pAt(t)){t=+t;var n=e.min,a=e.max,i=n!==void 0&&ta;if(!i)return t}return r!==void 0?r:e.dflt};p2.coerceColor=function(e,t,r){return vAt.isValid(t)?t:r!==void 0?r:e.dflt};p2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};p2.getValue=function(e,t){var r;return W2e(e)?t{"use strict";var kA=xi(),gAt=ni(),CA=ea(),Y2e=Xt(),X2e=bi(),Z2e=kh().resizeText,EV=u1(),mAt=EV.textfont,yAt=EV.insidetextfont,xAt=EV.outsidetextfont,$f=KC();function _At(e){var t=kA.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");Z2e(e,t,"bar");var r=t.size(),n=e._fullLayout;t.style("opacity",function(a){return a[0].trace.opacity}).each(function(a){(n.barmode==="stack"&&r>1||n.bargap===0&&n.bargroupgap===0&&!a[0].trace.marker.line.width)&&kA.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(a){var i=kA.select(this),o=a[0].trace;$2e(i,o,e)}),X2e.getComponentMethod("errorbars","style")(t)}function $2e(e,t,r){CA.pointStyle(e.selectAll("path"),t,r),K2e(e,t,r)}function K2e(e,t,r){e.selectAll("text").each(function(n){var a=kA.select(this),i=Y2e.ensureUniformFontSize(r,J2e(a,n,t,r));CA.font(a,i)})}function bAt(e,t,r){var n=t[0].trace;n.selectedpoints?wAt(r,n,e):($2e(r,n,e),X2e.getComponentMethod("errorbars","style")(r))}function wAt(e,t,r){CA.selectedPointStyle(e.selectAll("path"),t),TAt(e.selectAll("text"),t,r)}function TAt(e,t,r){e.each(function(n){var a=kA.select(this),i;if(n.selected){i=Y2e.ensureUniformFontSize(r,J2e(a,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(i.color=o),CA.font(a,i)}else CA.selectedTextStyle(a,t)})}function J2e(e,t,r,n){var a=n._fullLayout.font,i=r.textfont;if(e.classed("bartext-inside")){var o=r_e(t,r);i=e_e(r,t.i,a,o)}else e.classed("bartext-outside")&&(i=t_e(r,t.i,a));return i}function Q2e(e,t,r){return kV(mAt,e.textfont,t,r)}function e_e(e,t,r,n){var a=Q2e(e,t,r),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return i&&(a={color:gAt.contrast(n),family:a.family,size:a.size,weight:a.weight,style:a.style,variant:a.variant,textcase:a.textcase,lineposition:a.lineposition,shadow:a.shadow}),kV(yAt,e.insidetextfont,t,a)}function t_e(e,t,r){var n=Q2e(e,t,r);return kV(xAt,e.outsidetextfont,t,n)}function kV(e,t,r,n){t=t||{};var a=$f.getValue(t.family,r),i=$f.getValue(t.size,r),o=$f.getValue(t.color,r),s=$f.getValue(t.weight,r),l=$f.getValue(t.style,r),u=$f.getValue(t.variant,r),c=$f.getValue(t.textcase,r),f=$f.getValue(t.lineposition,r),v=$f.getValue(t.shadow,r);return{family:$f.coerceString(e.family,a,n.family),size:$f.coerceNumber(e.size,i,n.size),color:$f.coerceColor(e.color,o,n.color),weight:$f.coerceString(e.weight,s,n.weight),style:$f.coerceString(e.style,l,n.style),variant:$f.coerceString(e.variant,u,n.variant),textcase:$f.coerceString(e.variant,c,n.textcase),lineposition:$f.coerceString(e.variant,f,n.lineposition),shadow:$f.coerceString(e.variant,v,n.shadow)}}function r_e(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}n_e.exports={style:_At,styleTextPoints:K2e,styleOnSelect:bAt,getInsideTextFont:e_e,getOutsideTextFont:t_e,getBarColor:r_e,resizeText:Z2e}});var m2=fe((V1r,f_e)=>{"use strict";var JC=xi(),QC=aa(),mf=Xt(),AAt=as(),MAt=ni(),Gm=ea(),SAt=bi(),e7=Yi().tickText,i_e=kh(),EAt=i_e.recordMinTextSize,kAt=i_e.clearMinTextSize,CV=_v(),R3=KC(),CAt=Im(),a_e=u1(),LAt=a_e.text,PAt=a_e.textposition,FAt=Sd().appendArrayPointValue,od=CAt.TEXTPAD;function DAt(e){return e.id}function RAt(e){if(e.ids)return DAt}function LV(e){return(e>0)-(e<0)}function xp(e,t){return e0}function zAt(e,t,r,n,a,i){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;a||(a={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},kAt("bar",l));var c=mf.makeTraceGroups(n,r,"trace bars").each(function(f){var v=JC.select(this),g=f[0].trace,p=f[0].t,x=g.type==="waterfall",_=g.type==="funnel",y=g.type==="histogram",C=g.type==="bar",k=C||_,S=0;x&&g.connector.visible&&g.connector.mode==="between"&&(S=g.connector.line.width/2);var L=g.orientation==="h",w=s_e(a),A=mf.ensureSingle(v,"g","points"),T=RAt(g),m=A.selectAll("g.point").data(mf.identity,T);m.enter().append("g").classed("point",!0),m.exit().remove(),m.each(function(E,I){var R=JC.select(this),B=IAt(E,o,s,L),O=B[0][0],V=B[0][1],j=B[1][0],q=B[1][1],U=(L?V-O:q-j)===0;U&&k&&R3.getLineWidth(g,E)&&(U=!1),U||(U=!QC(O)||!QC(V)||!QC(j)||!QC(q)),E.isBlank=U,U&&(L?V=O:q=j),S&&!U&&(L?(O-=xp(O,V)*S,V+=xp(O,V)*S):(j-=xp(j,q)*S,q+=xp(j,q)*S));var J,ee;if(g.type==="waterfall"){if(!U){var ce=g[E.dir].marker;J=ce.line.width,ee=ce.color}}else J=R3.getLineWidth(g,E),ee=E.mc||g.marker.color;function ye(Te){var Ve=JC.round(J/2%1,2);return a.gap===0&&a.groupgap===0?JC.round(Math.round(Te)-Ve,2):Te}function xe(Te,Ve,$e){return $e&&Te===Ve?Te:Math.abs(Te-Ve)>=2?ye(Te):Te>Ve?Math.ceil(Te):Math.floor(Te)}var ue=MAt.opacity(ee),K=ue<1||J>.01?ye:xe;e._context.staticPlot||(O=K(O,V,L),V=K(V,O,L),j=K(j,q,!L),q=K(q,j,!L));var _e=L?o.c2p:s.c2p,ne;E.s0>0?ne=E._sMax:E.s0<0?ne=E._sMin:ne=E.s1>0?E._sMax:E._sMin;function ae(Te,Ve){if(!Te)return 0;var $e=Math.abs(L?q-j:V-O),ot=Math.abs(L?V-O:q-j),tt=K(Math.abs(_e(ne,!0)-_e(0,!0))),nt=E.hasB?Math.min($e/2,ot/2):Math.min($e/2,tt),We;if(Ve==="%"){var mt=Math.min(50,Te);We=$e*(mt/100)}else We=Te;return K(Math.max(Math.min(We,nt),0))}var pe=C||y?ae(p.cornerradiusvalue,p.cornerradiusform):0,ie,le,me="M"+O+","+j+"V"+q+"H"+V+"V"+j+"Z",be=0;if(pe&&E.s){var De=LV(E.s0)===0||LV(E.s)===LV(E.s0)?E.s1:E.s0;if(be=K(E.hasB?0:Math.abs(_e(ne,!0)-_e(De,!0))),be0?Math.sqrt(be*(2*pe-be)):0,ct=Ge>0?Math.max:Math.min;ie="M"+O+","+j+"V"+(q-Oe*ht)+"H"+ct(V-(pe-be)*Ge,O)+"A "+pe+","+pe+" 0 0 "+it+" "+V+","+(q-pe*ht-ze)+"V"+(j+pe*ht+ze)+"A "+pe+","+pe+" 0 0 "+it+" "+ct(V-(pe-be)*Ge,O)+","+(j+Oe*ht)+"Z"}else if(E.hasB)ie="M"+(O+pe*Ge)+","+j+"A "+pe+","+pe+" 0 0 "+it+" "+O+","+(j+pe*ht)+"V"+(q-pe*ht)+"A "+pe+","+pe+" 0 0 "+it+" "+(O+pe*Ge)+","+q+"H"+(V-pe*Ge)+"A "+pe+","+pe+" 0 0 "+it+" "+V+","+(q-pe*ht)+"V"+(j+pe*ht)+"A "+pe+","+pe+" 0 0 "+it+" "+(V-pe*Ge)+","+j+"Z";else{le=Math.abs(q-j)+be;var et=le0?Math.sqrt(be*(2*pe-be)):0,we=ht>0?Math.max:Math.min;ie="M"+(O+et*Ge)+","+j+"V"+we(q-(pe-be)*ht,j)+"A "+pe+","+pe+" 0 0 "+it+" "+(O+pe*Ge-qe)+","+q+"H"+(V-pe*Ge+qe)+"A "+pe+","+pe+" 0 0 "+it+" "+(V-et*Ge)+","+we(q-(pe-be)*ht,j)+"V"+j+"Z"}}else ie=me}else ie=me;var Le=o_e(mf.ensureSingle(R,"path"),l,a,i);if(Le.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((V-O)*(q-j))||U&&e._context.staticPlot?"M0,0Z":ie).call(Gm.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&w){var Ke=Gm.makePointStyleFns(g);Gm.singlePointStyle(E,Le,g,Ke,e)}qAt(e,t,R,f,I,O,V,j,q,pe,be,a,i),t.layerClipId&&Gm.hideOutsideRangePoint(E,R.select("text"),o,s,g.xcalendar,g.ycalendar)});var F=g.cliponaxis===!1;Gm.setClipUrl(v,F?null:t.layerClipId,e)});SAt.getComponentMethod("errorbars","plot")(e,c,t,a)}function qAt(e,t,r,n,a,i,o,s,l,u,c,f,v){var g=t.xaxis,p=t.yaxis,x=e._fullLayout,_;function y(me,be,De){var Ge=mf.ensureSingle(me,"text").text(be).attr({class:"bartext bartext-"+_,"text-anchor":"middle","data-notex":1}).call(Gm.font,De).call(AAt.convertToTspans,e);return Ge}var C=n[0].trace,k=C.orientation==="h",S=VAt(n,k,g,p),L=NAt(x,n,a,g,p);_=UAt(C,a);var w=f.mode==="stack"||f.mode==="relative",A=n[a],T=!w||A._outmost,m=A.hasB,F=u&&u-c>od;if(!L||_==="none"||(A.isBlank||i===o||s===l)&&(_==="auto"||_==="inside")){r.select("text").remove();return}var E=x.font,I=CV.getBarColor(n[a],C),R=CV.getInsideTextFont(C,a,E,I),B=CV.getOutsideTextFont(C,a,E),O=C.insidetextanchor||"end",V=r.datum();k?g.type==="log"&&V.s0<=0&&(g.range[0]0&&xe>0,_e;F?m?_e=g2(U-2*u,J,ye,xe,k)||g2(U,J-2*u,ye,xe,k):k?_e=g2(U-(u-c),J,ye,xe,k)||g2(U,J-2*(u-c),ye,xe,k):_e=g2(U,J-(u-c),ye,xe,k)||g2(U-2*(u-c),J,ye,xe,k):_e=g2(U,J,ye,xe,k),K&&_e?_="inside":(_="outside",ee.remove(),ee=null)}else _="inside";if(!ee){ue=mf.ensureUniformFontSize(e,_==="outside"?B:R),ee=y(r,L,ue);var ne=ee.attr("transform");if(ee.attr("transform",""),ce=Gm.bBox(ee.node()),ye=ce.width,xe=ce.height,ee.attr("transform",ne),ye<=0||xe<=0){ee.remove();return}}var ae=C.textangle,pe,ie;_==="outside"?(ie=C.constraintext==="both"||C.constraintext==="outside",pe=OAt(i,o,s,l,ce,{isHorizontal:k,constrained:ie,angle:ae,zeroBarDir:S})):(ie=C.constraintext==="both"||C.constraintext==="inside",pe=c_e(i,o,s,l,ce,{isHorizontal:k,constrained:ie,angle:ae,anchor:O,hasB:m,r:u,overhead:c})),pe.fontSize=ue.size,EAt(C.type==="histogram"?"bar":C.type,pe,x),A.transform=pe;var le=o_e(ee,x,f,v);mf.setTransormAndDisplay(le,pe)}function g2(e,t,r,n,a){if(e<0||t<0)return!1;var i=r<=e&&n<=t,o=r<=t&&n<=e,s=a?e>=r*(t/n):t>=n*(e/r);return i||o||s}function l_e(e){return e==="auto"?0:e}function u_e(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function c_e(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=i.anchor,c=u==="end",f=u==="start",v=i.leftToRight||0,g=(v+1)/2,p=1-g,x=i.hasB,_=i.r,y=i.overhead,C=a.width,k=a.height,S=Math.abs(t-e),L=Math.abs(n-r),w=S>2*od&&L>2*od?od:0;S-=2*w,L-=2*w;var A=l_e(l);l==="auto"&&!(C<=S&&k<=L)&&(C>S||k>L)&&(!(C>L||k>S)||Cod){var E=BAt(e,t,r,n,T,_,y,o,x);m=E.scale,F=E.pad}else m=1,s&&(m=Math.min(1,S/T.x,L/T.y)),F=0;var I=a.left*p+a.right*g,R=(a.top+a.bottom)/2,B=(e+od)*p+(t-od)*g,O=(r+n)/2,V=0,j=0;if(f||c){var q=(o?T.x:T.y)/2;_&&(c||x)&&(w+=F);var U=o?xp(e,t):xp(r,n);o?f?(B=e+U*w,V=-U*q):(B=t-U*w,V=U*q):f?(O=r+U*w,j=-U*q):(O=n-U*w,j=U*q)}return{textX:I,textY:R,targetX:B,targetY:O,anchorX:V,anchorY:j,scale:m,rotate:A}}function BAt(e,t,r,n,a,i,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*od),c=Math.max(0,Math.abs(n-r)-2*od),f=i-od,v=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,g=l?f*2:s?f-o:2*v,p=l?f*2:s?2*v:f-o,x,_,y,C,k;return a.y/a.x>=c/(u-g)?C=c/a.y:a.y/a.x<=(c-p)/u?C=u/a.x:!l&&s?(x=a.x*a.x+a.y*a.y/4,_=-2*a.x*(u-f)-a.y*(c/2-f),y=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,C=(-_+Math.sqrt(_*_-4*x*y))/(2*x)):l?(x=(a.x*a.x+a.y*a.y)/4,_=-a.x*(u/2-f)-a.y*(c/2-f),y=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,C=(-_+Math.sqrt(_*_-4*x*y))/(2*x)):(x=a.x*a.x/4+a.y*a.y,_=-a.x*(u/2-f)-2*a.y*(c-f),y=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,C=(-_+Math.sqrt(_*_-4*x*y))/(2*x)),C=Math.min(1,C),s?k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-a.y*C)/2)*(f-(c-a.y*C)/2)))-o):k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-a.x*C)/2)*(f-(u-a.x*C)/2)))-o),{scale:C,pad:k}}function OAt(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=a.width,c=a.height,f=Math.abs(t-e),v=Math.abs(n-r),g;o?g=v>2*od?od:0:g=f>2*od?od:0;var p=1;s&&(p=o?Math.min(1,v/c):Math.min(1,f/u));var x=l_e(l),_=u_e(a,x),y=(o?_.x:_.y)/2,C=(a.left+a.right)/2,k=(a.top+a.bottom)/2,S=(e+t)/2,L=(r+n)/2,w=0,A=0,T;return(o?e===t:r===n)&&i.zeroBarDir?T=i.zeroBarDir:T=o?xp(t,e):xp(r,n),o?(S=t-T*g,w=T*y):(L=n+T*g,A=-T*y),{textX:C,textY:k,targetX:S,targetY:L,anchorX:w,anchorY:A,scale:p,rotate:x}}function NAt(e,t,r,n,a){var i=t[0].trace,o=i.texttemplate,s;return o?s=GAt(e,t,r,n,a):i.textinfo?s=HAt(t,r,n,a):s=R3.getValue(i.text,r),R3.coerceString(LAt,s)}function UAt(e,t){var r=R3.getValue(e.textposition,t);return R3.coerceEnumerated(PAt,r)}function VAt(e,t,r,n){for(var a=!1,i=!1,o=0;o0?a=!0:s<0&&(i=!0),a&&i)return 0}var l=t?r:n,u=-xp(l.range[0],l.range[1]);return i?a?0:-u:u}function GAt(e,t,r,n,a){var i=t[0].trace,o=mf.castOption(i,r,"texttemplate");if(!o)return"";var s=i.type==="histogram",l=i.type==="waterfall",u=i.type==="funnel",c=i.orientation==="h",f,v,g,p;c?(f="y",v=a,g="x",p=n):(f="x",v=n,g="y",p=a);function x(w){return e7(v,v.c2l(w),!0).text}function _(w){return e7(p,p.c2l(w),!0).text}var y=t[r],C={};C.label=y.p,C.labelLabel=C[f+"Label"]=x(y.p);var k=mf.castOption(i,y.i,"text");(k===0||k)&&(C.text=k),C.value=y.s,C.valueLabel=C[g+"Label"]=_(y.s);var S={};FAt(S,i,y.i),(s||S.x===void 0)&&(S.x=c?C.value:C.label),(s||S.y===void 0)&&(S.y=c?C.label:C.value),(s||S.xLabel===void 0)&&(S.xLabel=c?C.valueLabel:C.labelLabel),(s||S.yLabel===void 0)&&(S.yLabel=c?C.labelLabel:C.valueLabel),l&&(C.delta=+y.rawS||y.s,C.deltaLabel=_(C.delta),C.final=y.v,C.finalLabel=_(C.final),C.initial=C.final-C.delta,C.initialLabel=_(C.initial)),u&&(C.value=y.s,C.valueLabel=_(C.value),C.percentInitial=y.begR,C.percentInitialLabel=mf.formatPercent(y.begR),C.percentPrevious=y.difR,C.percentPreviousLabel=mf.formatPercent(y.difR),C.percentTotal=y.sumR,C.percenTotalLabel=mf.formatPercent(y.sumR));var L=mf.castOption(i,y.i,"customdata");return L&&(C.customdata=L),mf.texttemplateString({data:[S,C,i._meta],fallback:i.texttemplatefallback,labels:C,locale:e._d3locale,template:o})}function HAt(e,t,r,n){var a=e[0].trace,i=a.orientation==="h",o=a.type==="waterfall",s=a.type==="funnel";function l(L){var w=i?n:r;return e7(w,L,!0).text}function u(L){var w=i?r:n;return e7(w,+L,!0).text}var c=a.textinfo,f=e[t],v=c.split("+"),g=[],p,x=function(L){return v.indexOf(L)!==-1};if(x("label")&&g.push(l(e[t].p)),x("text")&&(p=mf.castOption(a,f.i,"text"),(p===0||p)&&g.push(p)),o){var _=+f.rawS||f.s,y=f.v,C=y-_;x("initial")&&g.push(u(C)),x("delta")&&g.push(u(_)),x("final")&&g.push(u(y))}if(s){x("value")&&g.push(u(f.s));var k=0;x("percent initial")&&k++,x("percent previous")&&k++,x("percent total")&&k++;var S=k>1;x("percent initial")&&(p=mf.formatPercent(f.begR),S&&(p+=" of initial"),g.push(p)),x("percent previous")&&(p=mf.formatPercent(f.difR),S&&(p+=" of previous"),g.push(p)),x("percent total")&&(p=mf.formatPercent(f.sumR),S&&(p+=" of total"),g.push(p))}return g.join("
")}f_e.exports={plot:zAt,toMoveInsideBar:c_e}});var I3=fe((G1r,p_e)=>{"use strict";var LA=kl(),jAt=bi(),h_e=ni(),WAt=Xt().fillText,YAt=KC().getLineWidth,PV=Yi().hoverLabelText,XAt=Wa().BADNUM;function ZAt(e,t,r,n,a){var i=d_e(e,t,r,n,a);if(i){var o=i.cd,s=o[0].trace,l=o[i.index];return i.color=v_e(s,l),jAt.getComponentMethod("errorbars","hoverInfo")(l,s,i),[i]}}function d_e(e,t,r,n,a){var i=e.cd,o=i[0].trace,s=i[0].t,l=n==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,v,g,p,x,_,y,C;o.orientation==="h"?(v=r,g=t,p="y",x="x",_=O,y=I):(v=t,g=r,p="x",x="y",y=O,_=I);var k=o[p+"period"],S=l||k;function L(K){return A(K,-1)}function w(K){return A(K,1)}function A(K,_e){var ne=K.w;return K[p]+_e*ne/2}function T(K){return K[p+"End"]-K[p+"Start"]}var m=l?L:k?function(K){return K.p-T(K)/2}:function(K){return Math.min(L(K),K.p-s.bardelta/2)},F=l?w:k?function(K){return K.p+T(K)/2}:function(K){return Math.max(w(K),K.p+s.bardelta/2)};function E(K,_e,ne){return a.finiteRange&&(ne=0),LA.inbox(K-v,_e-v,ne+Math.min(1,Math.abs(_e-K)/C)-1)}function I(K){return E(m(K),F(K),c)}function R(K){return E(L(K),w(K),f)}function B(K){var _e=K[x];if(u){var ne=Math.abs(K.rawS)||0;g>0?_e+=ne:g<0&&(_e-=ne)}return _e}function O(K){var _e=g,ne=K.b,ae=B(K);return LA.inbox(ne-_e,ae-_e,c+(ae-_e)/(ae-ne)-1)}function V(K){var _e=g,ne=K.b,ae=B(K);return LA.inbox(ne-_e,ae-_e,f+(ae-_e)/(ae-ne)-1)}var j=e[p+"a"],q=e[x+"a"];C=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function U(K){return(_(K)+y(K))/2}var J=LA.getDistanceFunction(n,_,y,U);if(LA.getClosest(i,J,e),e.index!==!1&&i[e.index].p!==XAt){S||(m=function(K){return Math.min(L(K),K.p-s.bargroupwidth/2)},F=function(K){return Math.max(w(K),K.p+s.bargroupwidth/2)});var ee=e.index,ce=i[ee],ye=o.base?ce.b+ce.s:ce.s;e[x+"0"]=e[x+"1"]=q.c2p(ce[x],!0),e[x+"LabelVal"]=ye;var xe=s.extents[s.extents.round(ce.p)];e[p+"0"]=j.c2p(l?m(ce):xe[0],!0),e[p+"1"]=j.c2p(l?F(ce):xe[1],!0);var ue=ce.orig_p!==void 0;return e[p+"LabelVal"]=ue?ce.orig_p:ce.p,e.labelLabel=PV(j,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=PV(q,e[x+"LabelVal"],o[x+"hoverformat"]),e.baseLabel=PV(q,ce.b,o[x+"hoverformat"]),e.spikeDistance=(V(ce)+R(ce))/2,e[p+"Spike"]=j.c2p(ce.p,!0),WAt(ce,o,e),e.hovertemplate=o.hovertemplate,e}}function v_e(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=YAt(e,t);if(h_e.opacity(r))return r;if(h_e.opacity(n)&&a)return n}p_e.exports={hoverPoints:ZAt,hoverOnBars:d_e,getTraceColor:v_e}});var m_e=fe((H1r,g_e)=>{"use strict";g_e.exports=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var z3=fe((j1r,y_e)=>{"use strict";y_e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=n[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";x_e.exports={attributes:u1(),layoutAttributes:XC(),supplyDefaults:z0().supplyDefaults,crossTraceDefaults:z0().crossTraceDefaults,supplyLayoutDefaults:SV(),calc:G2e(),crossTraceCalc:i2().crossTraceCalc,colorbar:Zf(),arraysToCalcdata:EA(),plot:m2().plot,style:_v().style,styleOnSelect:_v().styleOnSelect,hoverPoints:I3().hoverPoints,eventData:m_e(),selectPoints:z3(),moduleType:"trace",name:"bar",basePlotModule:gu(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var w_e=fe((Y1r,b_e)=>{"use strict";b_e.exports=__e()});var PA=fe((X1r,S_e)=>{"use strict";var KAt=n1(),bv=Ol(),T_e=u1(),JAt=tc(),A_e=pl().axisHoverFormat,{hovertemplateAttrs:QAt,templatefallbackAttrs:e6t}=Oo(),fg=ta().extendFlat,q3=bv.marker,M_e=q3.line;S_e.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:bv.xperiod,yperiod:bv.yperiod,xperiod0:bv.xperiod0,yperiod0:bv.yperiod0,xperiodalignment:bv.xperiodalignment,yperiodalignment:bv.yperiodalignment,xhoverformat:A_e("x"),yhoverformat:A_e("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:fg({},q3.symbol,{arrayOk:!1,editType:"plot"}),opacity:fg({},q3.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:fg({},q3.angle,{arrayOk:!1,editType:"calc"}),size:fg({},q3.size,{arrayOk:!1,editType:"calc"}),color:fg({},q3.color,{arrayOk:!1,editType:"style"}),line:{color:fg({},M_e.color,{arrayOk:!1,dflt:JAt.defaultLine,editType:"style"}),width:fg({},M_e.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:KAt(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:T_e.offsetgroup,alignmentgroup:T_e.alignmentgroup,selected:{marker:bv.selected.marker,editType:"style"},unselected:{marker:bv.unselected.marker,editType:"style"},text:fg({},bv.text,{}),hovertext:fg({},bv.hovertext,{}),hovertemplate:QAt({}),hovertemplatefallback:e6t(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:bv.zorder}});var FA=fe((Z1r,E_e)=>{"use strict";E_e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var RA=fe(($1r,P_e)=>{"use strict";var wv=Xt(),t6t=bi(),r6t=ni(),n6t=sp(),i6t=n2(),k_e=Yb(),DA=PA();function a6t(e,t,r,n){function a(p,x){return wv.coerce(e,t,DA,p,x)}if(C_e(e,t,a,n),t.visible!==!1){n6t(e,t,n,a),a("xhoverformat"),a("yhoverformat");var i=t._hasPreCompStats;i&&(a("lowerfence"),a("upperfence")),a("line.color",(e.marker||{}).color||r),a("line.width"),a("fillcolor",r6t.addOpacity(t.line.color,.5));var o=!1;if(i){var s=a("mean"),l=a("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}a("whiskerwidth");var u=a("sizemode"),c;u==="quartiles"&&(c=a("boxmean",o)),a("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&a("sdmultiple"),a("width"),a("quartilemethod");var f=!1;if(i){var v=a("notchspan");v&&v.length&&(f=!0)}else wv.validate(e.notchwidth,DA.notchwidth)&&(f=!0);var g=a("notched",f);g&&a("notchwidth"),L_e(e,t,a,{prefix:"box"}),a("zorder")}}function C_e(e,t,r,n){function a(F){var E=0;return F&&F.length&&(E+=1,wv.isArrayOrTypedArray(F[0])&&F[0].length&&(E+=1)),E}function i(F){return wv.validate(e[F],DA[F])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(wv.minRowLength(u),wv.minRowLength(c),wv.minRowLength(f))}else t._hasPreCompStats=!1;var v=a(o),g=a(s),p=v&&wv.minRowLength(o),x=g&&wv.minRowLength(s),_=n.calendar,y={autotypenumbers:n.autotypenumbers},C,k;if(t._hasPreCompStats)switch(String(g)+String(v)){case"00":var S=i("x0")||i("dx"),L=i("y0")||i("dy");L&&!S?C="h":C="v",k=l;break;case"10":C="v",k=Math.min(l,x);break;case"20":C="h",k=Math.min(l,s.length);break;case"01":C="h",k=Math.min(l,p);break;case"02":C="v",k=Math.min(l,o.length);break;case"12":C="v",k=Math.min(l,x,o.length);break;case"21":C="h",k=Math.min(l,s.length,p);break;case"11":k=0;break;case"22":var w=!1,A;for(A=0;A0?(C="v",g>0?k=Math.min(x,p):k=Math.min(p)):g>0?(C="h",k=Math.min(x)):k=0;if(!k){t.visible=!1;return}t._length=k;var T=r("orientation",C);t._hasPreCompStats?T==="v"&&g===0?(r("x0",0),r("dx",1)):T==="h"&&v===0&&(r("y0",0),r("dy",1)):T==="v"&&g===0?r("x0"):T==="h"&&v===0&&r("y0");var m=t6t.getComponentMethod("calendars","handleTraceDefaults");m(e,t,["x","y"],n)}function L_e(e,t,r,n){var a=n.prefix,i=wv.coerce2(e,t,DA,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(i||o)&&(s="suspectedoutliers");var l=r(a+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),wv.coerceSelectionMarkerOpacity(t,r)}function o6t(e,t){var r,n;function a(l){return wv.coerce(n._input,n,DA,l)}for(var i=0;i{"use strict";var s6t=bi(),l6t=Xt(),u6t=FA();function F_e(e,t,r,n,a){for(var i=a+"Layout",o=!1,s=0;s{"use strict";var DV=aa(),r7=Yi(),f6t=cp(),qu=Xt(),q0=Wa().BADNUM,hg=qu._;V_e.exports=function(t,r){var n=t._fullLayout,a=r7.getFromId(t,r.xaxis||"x"),i=r7.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,v,g,p;r.orientation==="h"?(c=a,f="x",v=i,g="y",p=!!r.yperiodalignment):(c=i,f="y",v=a,g="x",p=!!r.xperiodalignment);var x=h6t(r,g,v,n[s]),_=x[0],y=x[1],C=qu.distinctVals(_,v),k=C.vals,S=C.minDiff/2,L,w,A,T,m,F,E=(r.boxpoints||r.points)==="all"?qu.identity:function(it){return it.vL.uf};if(r._hasPreCompStats){var I=r[f],R=function(it){return c.d2c((r[it]||[])[l])},B=1/0,O=-1/0;for(l=0;l=L.q1&&L.q3>=L.med){var j=R("lowerfence");L.lf=j!==q0&&j<=L.q1?j:q_e(L,A,T);var q=R("upperfence");L.uf=q!==q0&&q>=L.q3?q:B_e(L,A,T);var U=R("mean");L.mean=U!==q0?U:T?qu.mean(A,T):(L.q1+L.q3)/2;var J=R("sd");L.sd=U!==q0&&J>=0?J:T?qu.stdev(A,T,L.mean):L.q3-L.q1,L.lo=O_e(L),L.uo=N_e(L);var ee=R("notchspan");ee=ee!==q0&&ee>0?ee:U_e(L,T),L.ln=L.med-ee,L.un=L.med+ee;var ce=L.lf,ye=L.uf;r.boxpoints&&A.length&&(ce=Math.min(ce,A[0]),ye=Math.max(ye,A[T-1])),r.notched&&(ce=Math.min(ce,L.ln),ye=Math.max(ye,L.un)),L.min=ce,L.max=ye}else{qu.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(` +`));var xe;L.med!==q0?xe=L.med:L.q1!==q0?L.q3!==q0?xe=(L.q1+L.q3)/2:xe=L.q1:L.q3!==q0?xe=L.q3:xe=0,L.med=xe,L.q1=L.q3=xe,L.lf=L.uf=xe,L.mean=L.sd=xe,L.ln=L.un=xe,L.min=L.max=xe}B=Math.min(B,L.min),O=Math.max(O,L.max),L.pts2=w.filter(E),o.push(L)}}r._extremes[c._id]=r7.findExtremes(c,[B,O],{padded:!0})}else{var ue=c.makeCalcdata(r,f),K=d6t(k,S),_e=k.length,ne=v6t(_e);for(l=0;l=0&&ae<_e&&(m={v:F,i:l},R_e(m,r,l),ne[ae].push(m))}var pe=1/0,ie=-1/0,le=r.quartilemethod,me=le==="exclusive",be=le==="inclusive";for(l=0;l<_e;l++)if(ne[l].length>0){if(L={},L.pos=L[g]=k[l],w=L.pts=ne[l].sort(I_e),A=L[f]=w.map(z_e),T=A.length,L.min=A[0],L.max=A[T-1],L.mean=qu.mean(A,T),L.sd=qu.stdev(A,T,L.mean)*r.sdmultiple,L.med=qu.interp(A,.5),T%2&&(me||be)){var De,Ge;me?(De=A.slice(0,T/2),Ge=A.slice(T/2+1)):be&&(De=A.slice(0,T/2+1),Ge=A.slice(T/2)),L.q1=qu.interp(De,.5),L.q3=qu.interp(Ge,.5)}else L.q1=qu.interp(A,.25),L.q3=qu.interp(A,.75);L.lf=q_e(L,A,T),L.uf=B_e(L,A,T),L.lo=O_e(L),L.uo=N_e(L);var ht=U_e(L,T);L.ln=L.med-ht,L.un=L.med+ht,pe=Math.min(pe,L.ln),ie=Math.max(ie,L.un),L.pts2=w.filter(E),o.push(L)}r.notched&&qu.isTypedArray(ue)&&(ue=Array.from(ue)),r._extremes[c._id]=r7.findExtremes(c,r.notched?ue.concat([pe,ie]):ue,{padded:!0})}return p6t(o,r),o.length>0?(o[0].t={num:n[s],dPos:S,posLetter:g,valLetter:f,labels:{med:hg(t,"median:"),min:hg(t,"min:"),q1:hg(t,"q1:"),q3:hg(t,"q3:"),max:hg(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?hg(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):hg(t,"mean:"),lf:hg(t,"lower fence:"),uf:hg(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function h6t(e,t,r,n){var a=t in e,i=t+"0"in e,o="d"+t in e;if(a||i&&o){var s=r.makeCalcdata(e,t),l=f6t(e,r,t,s).vals;return[l,s]}var u;i?u=e[t+"0"]:"name"in e&&(r.type==="category"||DV(e.name)&&["linear","log"].indexOf(r.type)!==-1||qu.isDateTime(e.name)&&r.type==="date")?u=e.name:u=n;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,v=new Array(f),g=0;g{"use strict";var G_e=Yi(),g6t=Xt(),m6t=Jx().getAxisGroup,H_e=["v","h"];function y6t(e,t){for(var r=e.calcdata,n=t.xaxis,a=t.yaxis,i=0;i1,C=1-i[e+"gap"],k=1-i[e+"groupgap"];for(l=0;l0;if(A==="positive"?(q=T*(w?1:.5),ee=J,U=ee=F):A==="negative"?(q=ee=F,U=T*(w?1:.5),ce=J):(q=U=T,ee=ce=J),ne){var ae=S.pointpos,pe=S.jitter,ie=S.marker.size/2,le=0;ae+pe>=0&&(le=J*(ae+pe),le>q?(_e=!0,ue=ie,ye=le):le>ee&&(ue=ie,ye=q)),le<=q&&(ye=q);var me=0;ae-pe<=0&&(me=-J*(ae-pe),me>U?(_e=!0,K=ie,xe=me):me>ce&&(K=ie,xe=U)),me<=U&&(xe=U)}else ye=q,xe=U;var be=new Array(c.length);for(u=0;u{"use strict";var B3=xi(),y2=Xt(),x6t=ea(),Y_e=5,_6t=.01;function b6t(e,t,r,n){var a=e._context.staticPlot,i=t.xaxis,o=t.yaxis;y2.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=B3.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var v,g;f.orientation==="h"?(v=o,g=i):(v=i,g=o),X_e(l,{pos:v,val:g},f,c,a),Z_e(l,{x:i,y:o},f,c),$_e(l,{pos:v,val:g},f,c)})}function X_e(e,t,r,n,a){var i=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,v=r.whiskerwidth||0,g=r.showwhiskers!==!1,p=r.notched||!1,x=p?1-2*r.notchwidth:1,_,y;Array.isArray(n.bdPos)?(_=n.bdPos[0],y=n.bdPos[1]):(_=n.bdPos,y=n.bdPos);var C=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?y2.identity:[]);C.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","box"),C.exit().remove(),C.each(function(k){if(k.empty)return B3.select(this).attr("d","M0,0Z");var S=s.c2l(k.pos+u,!0),L=s.l2p(S-_)+f,w=s.l2p(S+y)+f,A=l?(L+w)/2:s.l2p(S)+f,T=r.whiskerwidth,m=l?L*T+(1-T)*A:s.l2p(S-c)+f,F=l?w*T+(1-T)*A:s.l2p(S+c)+f,E=s.l2p(S-_*x)+f,I=s.l2p(S+y*x)+f,R=r.sizemode==="sd",B=o.c2p(R?k.mean-k.sd:k.q1,!0),O=R?o.c2p(k.mean+k.sd,!0):o.c2p(k.q3,!0),V=y2.constrain(R?o.c2p(k.mean,!0):o.c2p(k.med,!0),Math.min(B,O)+1,Math.max(B,O)-1),j=k.lf===void 0||r.boxpoints===!1||R,q=o.c2p(j?k.min:k.lf,!0),U=o.c2p(j?k.max:k.uf,!0),J=o.c2p(k.ln,!0),ee=o.c2p(k.un,!0);i?B3.select(this).attr("d","M"+V+","+E+"V"+I+"M"+B+","+L+"V"+w+(p?"H"+J+"L"+V+","+I+"L"+ee+","+w:"")+"H"+O+"V"+L+(p?"H"+ee+"L"+V+","+E+"L"+J+","+L:"")+"Z"+(g?"M"+B+","+A+"H"+q+"M"+O+","+A+"H"+U+(v===0?"":"M"+q+","+m+"V"+F+"M"+U+","+m+"V"+F):"")):B3.select(this).attr("d","M"+E+","+V+"H"+I+"M"+L+","+B+"H"+w+(p?"V"+J+"L"+I+","+V+"L"+w+","+ee:"")+"V"+O+"H"+L+(p?"V"+ee+"L"+E+","+V+"L"+L+","+J:"")+"Z"+(g?"M"+A+","+B+"V"+q+"M"+A+","+O+"V"+U+(v===0?"":"M"+m+","+q+"H"+F+"M"+m+","+U+"H"+F):""))})}function Z_e(e,t,r,n){var a=t.x,i=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;y2.seedPseudoRandom();var u=function(v){return v.forEach(function(g){g.t=n,g.trace=r}),v},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(v){var g,p=v.pts2,x=Math.max((v.max-v.min)/10,v.q3-v.q1),_=x*1e-9,y=x*_6t,C=[],k=0,S;if(r.jitter){if(x===0)for(k=1,C=new Array(p.length),g=0;gv.lo&&(F.so=!0)}return p});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(x6t.translatePoints,a,i)}function $_e(e,t,r,n){var a=t.val,i=t.pos,o=!!i.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var v=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?y2.identity:[]);v.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),v.exit().remove(),v.each(function(g){var p=i.c2l(g.pos+s,!0),x=i.l2p(p-c)+l,_=i.l2p(p+f)+l,y=o?(x+_)/2:i.l2p(p)+l,C=a.c2p(g.mean,!0),k=a.c2p(g.mean-g.sd,!0),S=a.c2p(g.mean+g.sd,!0);r.orientation==="h"?B3.select(this).attr("d","M"+C+","+x+"V"+_+(u==="sd"?"m0,0L"+k+","+y+"L"+C+","+x+"L"+S+","+y+"Z":"")):B3.select(this).attr("d","M"+x+","+C+"H"+_+(u==="sd"?"m0,0L"+y+","+k+"L"+x+","+C+"L"+y+","+S+"Z":""))})}K_e.exports={plot:b6t,plotBoxAndWhiskers:X_e,plotPoints:Z_e,plotBoxMean:$_e}});var a7=fe((tgr,J_e)=>{"use strict";var IV=xi(),zV=ni(),qV=ea();function w6t(e,t,r){var n=r||IV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=IV.select(this),o=a[0].trace,s=o.line.width;function l(f,v,g,p){f.style("stroke-width",v+"px").call(zV.stroke,g).call(zV.fill,p)}var u=i.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var v=IV.select(this),g=o[f.dir];l(v,g.line.width,g.line.color,g.fillcolor),v.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),i.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(zV.stroke,o.line.color);var c=i.selectAll("path.point");qV.pointStyle(c,o,e)}})}function T6t(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?qV.selectedPointStyle(a,n):qV.pointStyle(a,n,e)}J_e.exports={style:w6t,styleOnSelect:T6t}});var OV=fe((rgr,rbe)=>{"use strict";var A6t=Yi(),BV=Xt(),Hm=kl(),Q_e=ni(),M6t=BV.fillText;function S6t(e,t,r,n){var a=e.cd,i=a[0].trace,o=i.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(ebe(e,t,r,n))),o.indexOf("points")!==-1&&(l=tbe(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function ebe(e,t,r,n){var a=e.cd,i=e.xa,o=e.ya,s=a[0].trace,l=a[0].t,u=s.type==="violin",c,f,v,g,p,x,_,y,C,k,S,L=l.bdPos,w,A,T=l.wHover,m=function(ie){return v.c2l(ie.pos)+l.bPos-v.c2l(x)};u&&s.side!=="both"?(s.side==="positive"&&(C=function(ie){var le=m(ie);return Hm.inbox(le,le+T,k)},w=L,A=0),s.side==="negative"&&(C=function(ie){var le=m(ie);return Hm.inbox(le-T,le,k)},w=0,A=L)):(C=function(ie){var le=m(ie);return Hm.inbox(le-T,le+T,k)},w=A=L);var F;u?F=function(ie){return Hm.inbox(ie.span[0]-p,ie.span[1]-p,k)}:F=function(ie){return Hm.inbox(ie.min-p,ie.max-p,k)},s.orientation==="h"?(p=t,x=r,_=F,y=C,c="y",v=o,f="x",g=i):(p=r,x=t,_=C,y=F,c="x",v=i,f="y",g=o);var E=Math.min(1,L/Math.abs(v.r2c(v.range[1])-v.r2c(v.range[0])));k=e.maxHoverDistance-E,S=e.maxSpikeDistance-E;function I(ie){return(_(ie)+y(ie))/2}var R=Hm.getDistanceFunction(n,_,y,I);if(Hm.getClosest(a,R,e),e.index===!1)return[];var B=a[e.index],O=s.line.color,V=(s.marker||{}).color;Q_e.opacity(O)&&s.line.width?e.color=O:Q_e.opacity(V)&&s.boxpoints?e.color=V:e.color=s.fillcolor,e[c+"0"]=v.c2p(B.pos+l.bPos-A,!0),e[c+"1"]=v.c2p(B.pos+l.bPos+w,!0),e[c+"LabelVal"]=B.orig_p!==void 0?B.orig_p:B.pos;var j=c+"Spike";e.spikeDistance=I(B)*S/k,e[j]=v.c2p(B.pos,!0);var q=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,U=s.boxpoints||s.points,J=U&&q?["max","uf","q3","med","mean","q1","lf","min"]:U&&!q?["max","uf","q3","med","q1","lf","min"]:!U&&q?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ee=g.range[1]{"use strict";nbe.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var NV=fe((igr,abe)=>{"use strict";abe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";obe.exports={attributes:PA(),layoutAttributes:FA(),supplyDefaults:RA().supplyDefaults,crossTraceDefaults:RA().crossTraceDefaults,supplyLayoutDefaults:t7().supplyLayoutDefaults,calc:RV(),crossTraceCalc:n7().crossTraceCalc,plot:i7().plot,style:a7().style,styleOnSelect:a7().styleOnSelect,hoverPoints:OV().hoverPoints,eventData:ibe(),selectPoints:NV(),moduleType:"trace",name:"box",basePlotModule:gu(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var ube=fe((ogr,lbe)=>{"use strict";lbe.exports=sbe()});var O3=fe((sgr,fbe)=>{"use strict";var E6t=_s(),{extendFlat:a0}=ta(),k6t=Ho(),{axisHoverFormat:UV}=pl(),C6t=Ds(),{hovertemplateAttrs:L6t,templatefallbackAttrs:cbe,texttemplateAttrs:P6t}=Oo(),B0=Ol();fbe.exports=a0({z:{valType:"data_array",editType:"calc"},x:a0({},B0.x,{impliedEdits:{xtype:"array"}}),x0:a0({},B0.x0,{impliedEdits:{xtype:"scaled"}}),dx:a0({},B0.dx,{impliedEdits:{xtype:"scaled"}}),y:a0({},B0.y,{impliedEdits:{ytype:"array"}}),y0:a0({},B0.y0,{impliedEdits:{ytype:"scaled"}}),dy:a0({},B0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:a0({},B0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:a0({},B0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:a0({},B0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:a0({},B0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:a0({},B0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:a0({},B0.yperiodalignment,{impliedEdits:{ytype:"scaled"}}),text:{valType:"data_array",editType:"calc"},hovertext:{valType:"data_array",editType:"calc"},transpose:{valType:"boolean",dflt:!1,editType:"calc"},xtype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},ytype:{valType:"enumerated",values:["array","scaled"],editType:"calc+clearAxisTypes"},zsmooth:{valType:"enumerated",values:["fast","best",!1],dflt:!1,editType:"calc"},hoverongaps:{valType:"boolean",dflt:!0,editType:"none"},connectgaps:{valType:"boolean",editType:"calc"},xgap:{valType:"number",dflt:0,min:0,editType:"plot"},ygap:{valType:"number",dflt:0,min:0,editType:"plot"},xhoverformat:UV("x"),yhoverformat:UV("y"),zhoverformat:UV("z",1),hovertemplate:L6t(),hovertemplatefallback:cbe(),texttemplate:P6t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:cbe({editType:"plot"}),textfont:C6t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:a0({},k6t.showlegend,{dflt:!1}),zorder:B0.zorder},E6t("",{cLetter:"z",autoColorDflt:!1}))});var s7=fe((lgr,dbe)=>{"use strict";var F6t=aa(),o7=Xt(),D6t=bi();dbe.exports=function(t,r,n,a,i,o){var s=n("z");i=i||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(o7.isArray1D(s)){l=n(i),u=n(o);var c=o7.minRowLength(l),f=o7.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=hbe(i,n),u=hbe(o,n),!R6t(s))return 0;n("transpose"),r._length=null}var v=D6t.getComponentMethod("calendars","handleTraceDefaults");return v(t,r,[i,o],a),!0};function hbe(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function R6t(e){for(var t=!0,r=!1,n=!1,a,i=0;i0&&(r=!0);for(var o=0;o{"use strict";var vbe=Xt();pbe.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var n=vbe.extendFlat({},r.font,{color:"auto",size:"auto"});vbe.coerceFont(t,"textfont",n)}});var VV=fe((cgr,gbe)=>{"use strict";gbe.exports=function(t,r,n){var a=n("zsmooth");a===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var xbe=fe((fgr,ybe)=>{"use strict";var mbe=Xt(),I6t=s7(),z6t=IA(),q6t=sp(),B6t=VV(),O6t=Vc(),N6t=O3();ybe.exports=function(t,r,n,a){function i(s,l){return mbe.coerce(t,r,N6t,s,l)}var o=I6t(t,r,i,a);if(!o){r.visible=!1;return}q6t(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),z6t(i,a),B6t(t,r,i,a),i("hoverongaps"),i("connectgaps",mbe.isArray1D(r.z)&&r.zsmooth!==!1),O6t(t,r,a,i,{prefix:"",cLetter:"z"}),i("zorder")}});var GV=fe((hgr,_be)=>{"use strict";var N3=aa();_be.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var a=n[t];return N3(a)?(a=Number(a),r[e]+=a,a):0},avg:function(e,t,r,n,a){var i=n[t];return N3(i)&&(i=Number(i),r[e]+=i,a[e]++),0},min:function(e,t,r,n){var a=n[t];if(N3(a))if(a=Number(a),N3(r[e])){if(r[e]>a){var i=a-r[e];return r[e]=a,i}}else return r[e]=a,a;return 0},max:function(e,t,r,n){var a=n[t];if(N3(a))if(a=Number(a),N3(r[e])){if(r[e]{"use strict";bbe.exports={percent:function(e,t){for(var r=e.length,n=100/t,a=0;a{"use strict";wbe.exports=function(t,r){for(var n=t.length,a=0,i=0;i{"use strict";var U3=Wa(),x2=U3.ONEAVGYEAR,Tbe=U3.ONEAVGMONTH,u7=U3.ONEDAY,Abe=U3.ONEHOUR,Mbe=U3.ONEMIN,Sbe=U3.ONESEC,Ebe=Yi().tickIncrement;Lbe.exports=function(t,r,n,a,i){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(l7(u+s,u+l,a,i),l7(c+s,c+l,a,i)),v=Math.min(l7(u+o,u+s,a,i),l7(c+o,c+s,a,i)),g,p;if(f>v&&vu7){var x=g===x2?1:6,_=g===x2?"M12":"M1";return function(y,C){var k=a.c2d(y,x2,i),S=k.indexOf("-",x);S>0&&(k=k.slice(0,S));var L=a.d2c(k,0,i);if(LSbe?e>u7?e>x2*1.1?x2:e>Tbe*1.1?Tbe:u7:e>Abe?Abe:e>Mbe?Mbe:Sbe:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function U6t(e,t,r,n,a,i){if(n&&e>u7){var o=Cbe(t,a,i),s=Cbe(r,a,i),l=e===x2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function Cbe(e,t,r){var n=t.c2d(e,x2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var ZV=fe((ggr,Ibe)=>{"use strict";var YV=aa(),sd=Xt(),Pbe=bi(),Tv=Yi(),{hasColorscale:Fbe}=Wf(),Dbe=Mh(),V6t=EA(),Rbe=GV(),G6t=HV(),H6t=jV(),j6t=WV();function W6t(e,t){var r=[],n=[],a=t.orientation==="h",i=Tv.getFromId(e,a?t.yaxis:t.xaxis),o=a?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=XV(e,t,i,o),v=f[0],g=f[1],p=typeof v.size=="string",x=[],_=p?x:v,y=[],C=[],k=[],S=0,L=t.histnorm,w=t.histfunc,A=L.indexOf("density")!==-1,T,m,F;u.enabled&&A&&(L=L.replace(/ ?density$/,""),A=!1);var E=w==="max"||w==="min",I=E?null:0,R=Rbe.count,B=G6t[L],O=!1,V=function(le){return i.r2c(le,0,l)},j;for(sd.isArrayOrTypedArray(t[s])&&w!=="count"&&(j=t[s],O=w==="avg",R=Rbe[w]),c=V(v.start),m=V(v.end)+(c-Tv.tickIncrement(c,v.size,!1,l))/1e6;c=0&&F=ae;c--)if(n[c]){pe=c;break}for(c=ae;c<=pe;c++)if(YV(r[c])&&YV(n[c])){var ie={p:r[c],s:n[c],b:0};u.enabled||(ie.pts=k[c],ee?ie.ph0=ie.ph1=k[c].length?g[k[c][0]]:r[c]:(t._computePh=!0,ie.ph0=K(x[c]),ie.ph1=K(x[c+1],!0))),ne.push(ie)}return ne.length===1&&(ne[0].width1=Tv.tickIncrement(ne[0].p,v.size,!1,l)-ne[0].p),Fbe(t,"marker")&&Dbe(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),Fbe(t,"marker.line")&&Dbe(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),V6t(ne,t),sd.isArrayOrTypedArray(t.selectedpoints)&&sd.tagSelected(ne,t,xe),ne}function XV(e,t,r,n,a){var ue;var i=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,v,g,p,x,_,y=function(K){return r.r2c(K,0,g)},C=function(K){return r.c2r(K,0,g)},k=r.type==="date"?function(K){return K||K===0?sd.cleanDate(K,null,g):null}:function(K){return YV(K)?Number(K):null};function S(K,_e,ne){_e[K+"Found"]?(_e[K]=k(_e[K]),_e[K]===null&&(_e[K]=ne[K])):(x[K]=_e[K]=ne[K],sd.nestedProperty(f[0],i+"."+K).set(ne[K]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],w=!0,A=!1,T=!1;for(c=0;cr.r2l(j)&&(U=Tv.tickIncrement(U,l.size,!0,g)),R.start=r.l2r(U),V||sd.nestedProperty(t,i+".start").set(R.start)}var J=l.end,ee=r.r2l(I.end),ce=ee!==void 0;if((l.endFound||ce)&&ee!==r.r2l(J)){var ye=ce?ee:sd.aggNums(Math.max,null,p);R.end=r.l2r(ye),ce||sd.nestedProperty(t,i+".start").set(R.end)}var xe="autobin"+n;return t._input[xe]===!1&&(t._input[i]=sd.extendFlat({},t[i]||{}),delete t._input[xe],delete t[xe]),[R,p]}function Y6t(e,t,r,n,a){var i=e._fullLayout,o=X6t(e,t),s=!1,l=1/0,u=[t],c,f,v;for(c=0;c=0;n--)s(n);else if(t==="increasing"){for(n=1;n=0;n--)e[n]+=e[n+1];r==="exclude"&&(e.push(0),e.shift())}}Ibe.exports={calc:W6t,calcAllAutoBins:XV}});var Gbe=fe((mgr,Vbe)=>{"use strict";var zbe=Xt(),V3=Yi(),qbe=GV(),$6t=HV(),K6t=jV(),J6t=WV(),Bbe=ZV().calcAllAutoBins;Vbe.exports=function(t,r){var n=V3.getFromId(t,r.xaxis),a=V3.getFromId(t,r.yaxis),i=r.xcalendar,o=r.ycalendar,s=function(nt){return n.r2c(nt,0,i)},l=function(nt){return a.r2c(nt,0,o)},u=function(nt){return n.c2r(nt,0,i)},c=function(nt){return a.c2r(nt,0,o)},f,v,g,p,x=Bbe(t,r,n,"x"),_=x[0],y=x[1],C=Bbe(t,r,a,"y"),k=C[0],S=C[1],L=r._length;y.length>L&&y.splice(L,y.length-L),S.length>L&&S.splice(L,S.length-L);var w=[],A=[],T=[],m=typeof _.size=="string",F=typeof k.size=="string",E=[],I=[],R=m?E:_,B=F?I:k,O=0,V=[],j=[],q=r.histnorm,U=r.histfunc,J=q.indexOf("density")!==-1,ee=U==="max"||U==="min",ce=ee?null:0,ye=qbe.count,xe=$6t[q],ue=!1,K=[],_e=[],ne="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";ne&&U!=="count"&&(ue=U==="avg",ye=qbe[U]);var ae=_.size,pe=s(_.start),ie=s(_.end)+(pe-V3.tickIncrement(pe,ae,!1,i))/1e6;for(f=pe;f=0&&g=0&&p{"use strict";var c1=Xt(),Hbe=Wa().BADNUM,jbe=cp();Wbe.exports=function(t,r,n,a,i,o){var s=t._length,l=r.makeCalcdata(t,a),u=n.makeCalcdata(t,i);l=jbe(t,r,a,l).vals,u=jbe(t,n,i,u).vals;var c=t.text,f=c!==void 0&&c1.isArray1D(c),v=t.hovertext,g=v!==void 0&&c1.isArray1D(v),p,x,_=c1.distinctVals(l),y=_.vals,C=c1.distinctVals(u),k=C.vals,S=[],L,w,A=k.length,T=y.length;for(p=0;p{"use strict";var Q6t=aa(),eMt=Xt(),f7=Wa().BADNUM;Ybe.exports=function(t,r,n,a){var i,o,s,l,u,c;function f(y){if(Q6t(y))return+y}if(r&&r.transpose){for(i=0,u=0;u{"use strict";var tMt=Xt(),Xbe=.01,rMt=[[-1,0],[1,0],[0,-1],[0,1]];function nMt(e){return .5-.25*Math.min(1,e*.5)}$be.exports=function(t,r){var n=1,a;for(Zbe(t,r),a=0;aXbe;a++)n=Zbe(t,r,nMt(n));return n>Xbe&&tMt.log("interp2d didn't converge quickly",n),t};function Zbe(e,t,r){var n=0,a,i,o,s,l,u,c,f,v,g,p,x,_;for(s=0;sx&&(n=Math.max(n,Math.abs(e[i][o]-p)/(_-x))))}return n}});var v7=fe((bgr,Kbe)=>{"use strict";var iMt=Xt().maxRowLength;Kbe.exports=function(t){var r=[],n={},a=[],i=t[0],o=[],s=[0,0,0],l=iMt(t),u,c,f,v,g,p,x,_;for(c=0;c=0;g--)v=a[g],c=v[0],f=v[1],p=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,p&&(x[v]=[c,f,p],a.splice(g,1),_=!0);if(!_)throw"findEmpties iterated with no new neighbors";for(v in x)n[v]=x[v],r.push(x[v])}return r.sort(function(y,C){return C[2]-y[2]})}});var $V=fe((wgr,e3e)=>{"use strict";var Jbe=bi(),Qbe=Xt().isArrayOrTypedArray;e3e.exports=function(t,r,n,a,i,o){var s=[],l=Jbe.traceIs(t,"contour"),u=Jbe.traceIs(t,"histogram"),c,f,v,g=Qbe(r)&&r.length>1;if(g&&!u&&o.type!=="category"){var p=r.length;if(p<=i){if(l)s=Array.from(r).slice(0,i);else if(i===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],v=1;v{"use strict";var t3e=bi(),KV=Xt(),p7=Yi(),r3e=cp(),aMt=Gbe(),oMt=Mh(),sMt=c7(),lMt=h7(),uMt=d7(),cMt=v7(),g7=$V(),JV=Wa().BADNUM;i3e.exports=function(t,r){var n=p7.getFromId(t,r.xaxis||"x"),a=p7.getFromId(t,r.yaxis||"y"),i=t3e.traceIs(r,"contour"),o=t3e.traceIs(r,"histogram"),s=i?"best":r.zsmooth,l,u,c,f,v,g,p,x,_,y,C;if(n._minDtick=0,a._minDtick=0,o)C=aMt(t,r),f=C.orig_x,l=C.x,u=C.x0,c=C.dx,x=C.orig_y,v=C.y,g=C.y0,p=C.dy,_=C.z;else{var k=r.z;KV.isArray1D(k)?(sMt(r,n,a,"x","y",["z"]),l=r._x,v=r._y,k=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],x=r.y?a.makeCalcdata(r,"y"):[],l=r3e(r,n,"x",f).vals,v=r3e(r,a,"y",x).vals,r._x=l,r._y=v),u=r.x0,c=r.dx,g=r.y0,p=r.dy,_=lMt(k,r,n,a)}(n.rangebreaks||a.rangebreaks)&&(_=fMt(l,v,_),o||(l=n3e(l),v=n3e(v),r._x=l,r._y=v)),!o&&(i||r.connectgaps)&&(r._emptypoints=cMt(_),uMt(_,r._emptypoints));function S(R){s=r._input.zsmooth=r.zsmooth=!1,KV.warn('cannot use zsmooth: "fast": '+R)}function L(R){if(R.length>1){var B=(R[R.length-1]-R[0])/(R.length-1),O=Math.abs(B/100);for(y=0;yO)return!1}return!0}r._islinear=!1,n.type==="log"||a.type==="log"?s==="fast"&&S("log axis found"):L(l)?L(v)?r._islinear=!0:s==="fast"&&S("y scale is not linear"):s==="fast"&&S("x scale is not linear");var w=KV.maxRowLength(_),A=r.xtype==="scaled"?"":l,T=g7(r,A,u,c,w,n),m=r.ytype==="scaled"?"":v,F=g7(r,m,g,p,_.length,a);r._extremes[n._id]=p7.findExtremes(n,T),r._extremes[a._id]=p7.findExtremes(a,F);var E={x:T,y:F,z:_,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(E.orig_x=f),r.yperiodalignment&&x&&(E.orig_y=x),A&&A.length===T.length-1&&(E.xCenter=A),m&&m.length===F.length-1&&(E.yCenter=m),o&&(E.xRanges=C.xRanges,E.yRanges=C.yRanges,E.pts=C.pts),i||oMt(t,r,{vals:_,cLetter:"z"}),i&&r.contours&&r.contours.coloring==="heatmap"){var I={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};E.xfill=g7(I,A,u,c,w,n),E.yfill=g7(I,m,g,p,_.length,a)}return[E]};function n3e(e){for(var t=[],r=e.length,n=0;n{"use strict";y7.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]];y7.STYLE=y7.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var eG=fe((Mgr,o3e)=>{"use strict";var a3e=x7(),hMt=ea(),QV=Xt(),G3=null;function dMt(){if(G3!==null)return G3;G3=!1;var e=QV.isSafari()||QV.isMacWKWebView()||QV.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(a3e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")G3=t.some(function(o){return r.apply(null,o)});else{var n=hMt.tester.append("image").attr("style",a3e.STYLE),a=window.getComputedStyle(n.node()),i=a.imageRendering;G3=t.some(function(o){var s=o[1];return i===s||i===s.toLowerCase()}),n.remove()}}return G3}o3e.exports=dMt});var _7=fe((Sgr,g3e)=>{"use strict";var s3e=xi(),vMt=bi(),pMt=ea(),gMt=Yi(),Av=Xt(),l3e=as(),mMt=cC(),u3e=ni(),yMt=js().extractOpts,xMt=js().makeColorScaleFuncFromTrace,_Mt=Q0(),bMt=nc(),tG=bMt.LINE_SPACING,wMt=eG(),TMt=x7().STYLE,v3e="heatmap-label";function p3e(e){return e.selectAll("g."+v3e)}function c3e(e){p3e(e).remove()}g3e.exports=function(e,t,r,n){var a=t.xaxis,i=t.yaxis;Av.makeTraceGroups(n,r,"hm").each(function(o){var s=s3e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,v=l.z,g=l.x,p=l.y,x=l.xCenter,_=l.yCenter,y=vMt.traceIs(u,"contour"),C=y?"best":u.zsmooth,k=v.length,S=Av.maxRowLength(v),L=!1,w=!1,A,T,m,F,E,I,R,B;for(I=0;A===void 0&&I0;)T=a.c2p(g[I]),I--;for(T0;)E=i.c2p(p[I]),I--;E=a._length||T<=0||F>=i._length||E<=0;if(U){var J=s.selectAll("image").data([]);J.exit().remove(),c3e(s);return}var ee,ce;O==="fast"?(ee=S,ce=k):(ee=j,ce=q);var ye=document.createElement("canvas");ye.width=ee,ye.height=ce;var xe=ye.getContext("2d",{willReadFrequently:!0}),ue=xMt(u,{noNumericCheck:!0,returnArray:!0}),K,_e;O==="fast"?(K=L?function(oa){return S-1-oa}:Av.identity,_e=w?function(oa){return k-1-oa}:Av.identity):(K=function(oa){return Av.constrain(Math.round(a.c2p(g[oa])-A),0,j)},_e=function(oa){return Av.constrain(Math.round(i.c2p(p[oa])-F),0,q)});var ne=_e(0),ae=[ne,ne],pe=L?0:1,ie=w?0:1,le=0,me=0,be=0,De=0,Ge,ht,it,Oe,ze;function ct(oa,Ma=0){if(oa===void 0)return[0,0,0,0];var Ga=ue(oa);return Ga[0]=Math.round(Ga[0]),Ga[1]=Math.round(Ga[1]),Ga[2]=Math.round(Ga[2]),le+=Ma,me+=Ga[0]*Ma,be+=Ga[1]*Ma,De+=Ga[2]*Ma,Ga}function et(oa,Ma,Ga,ss){var mo=oa[Ga.bin0];if(mo===void 0)return ct(void 0,1);var sl=oa[Ga.bin1],Eo=Ma[Ga.bin0],ao=Ma[Ga.bin1],Da=sl-mo||0,bl=Eo-mo||0,bo;return sl===void 0?ao===void 0?bo=0:Eo===void 0?bo=2*(ao-mo):bo=(2*ao-Eo-mo)*2/3:ao===void 0?Eo===void 0?bo=0:bo=(2*mo-sl-Eo)*2/3:Eo===void 0?bo=(2*ao-sl-mo)*2/3:bo=ao+mo-sl-Eo,ct(mo+Ga.frac*Da+ss.frac*(bl+Ga.frac*bo))}if(O!=="default"){var qe=0,we;try{we=new Uint8Array(ee*ce*4)}catch(oa){we=new Array(ee*ce*4)}if(O==="smooth"){var Le=x||g,Ke=_||p,Te=new Array(Le.length),Ve=new Array(Ke.length),$e=new Array(j),ot=x?h3e:f3e,tt=_?h3e:f3e,nt,We,mt;for(I=0;IKr||Kr>i._length))for(R=ft;Rdn||dn>a._length)){var xr=mMt({x:Nr,y:pr},u,e._fullLayout);xr.x=Nr,xr.y=pr;var Fr=l.z[I][R];Fr===void 0?(xr.z="",xr.zLabel=""):(xr.z=Fr,xr.zLabel=gMt.tickText(Ct,Fr,"hover").text);var Zr=l.text&&l.text[I]&&l.text[I][R];(Zr===void 0||Zr===!1)&&(Zr=""),xr.text=Zr;var Cn=Av.texttemplateString({data:[xr,u._meta],fallback:u.texttemplatefallback,labels:xr,locale:e._fullLayout._d3locale,template:Ot});if(Cn){var Dt=Cn.split("
"),At=Dt.length,Vt=0;for(B=0;B{"use strict";m3e.exports={min:"zmin",max:"zmax"}});var b7=fe((kgr,y3e)=>{"use strict";var AMt=xi();y3e.exports=function(t){AMt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var T7=fe((Cgr,_3e)=>{"use strict";var x3e=kl(),zA=Xt(),w7=zA.isArrayOrTypedArray,MMt=Yi(),SMt=js().extractOpts;_3e.exports=function(t,r,n,a,i){i||(i={});var o=i.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,v=s.y,g=s.z,p=s.xCenter,x=s.yCenter,_=s.zmask,y=l.zhoverformat,C=f,k=v,S,L,w,A;if(t.index!==!1){try{w=Math.round(t.index[1]),A=Math.round(t.index[0])}catch(J){zA.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(w<0||w>=g[0].length||A<0||A>g.length)return}else{if(x3e.inbox(r-f[0],r-f[f.length-1],0)>0||x3e.inbox(n-v[0],n-v[v.length-1],0)>0)return;if(o){var T;for(C=[2*f[0]-f[1]],T=1;T{"use strict";b3e.exports={attributes:O3(),supplyDefaults:xbe(),calc:m7(),plot:_7(),colorbar:H3(),style:b7(),hoverPoints:T7(),moduleType:"trace",name:"heatmap",basePlotModule:gu(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var A3e=fe((Pgr,T3e)=>{"use strict";T3e.exports=w3e()});var rG=fe((Fgr,M3e)=>{"use strict";M3e.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var E3e=fe((Dgr,S3e)=>{"use strict";S3e.exports={eventDataKeys:["binNumber"]}});var A7=fe((Rgr,P3e)=>{"use strict";var o0=u1(),k3e=pl().axisHoverFormat,{hovertemplateAttrs:EMt,texttemplateAttrs:kMt,templatefallbackAttrs:C3e}=Oo(),nG=Ds(),L3e=rG(),CMt=E3e(),iG=ta().extendFlat;P3e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:k3e("x"),yhoverformat:k3e("y"),text:iG({},o0.text,{}),hovertext:iG({},o0.hovertext,{}),orientation:o0.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:L3e("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:L3e("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:EMt({},{keys:CMt.eventDataKeys}),hovertemplatefallback:C3e(),texttemplate:kMt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:C3e({editType:"plot"}),textposition:iG({},o0.textposition,{arrayOk:!1}),textfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:o0.insidetextanchor,textangle:o0.textangle,cliponaxis:o0.cliponaxis,constraintext:o0.constraintext,marker:o0.marker,offsetgroup:o0.offsetgroup,alignmentgroup:o0.alignmentgroup,selected:o0.selected,unselected:o0.unselected,zorder:o0.zorder}});var I3e=fe((Igr,R3e)=>{"use strict";var F3e=bi(),qA=Xt(),D3e=ni(),LMt=z0().handleText,PMt=ZC(),FMt=A7();R3e.exports=function(t,r,n,a){function i(C,k){return qA.coerce(t,r,FMt,C,k)}var o=i("x"),s=i("y"),l=i("cumulative.enabled");l&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var u=i("textposition");LMt(t,r,a,i,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat");var c=i("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",v=c==="v"?"y":"x",g=o&&s?Math.min(qA.minRowLength(o)&&qA.minRowLength(s)):qA.minRowLength(r[f]||[]);if(!g){r.visible=!1;return}r._length=g;var p=F3e.getComponentMethod("calendars","handleTraceDefaults");p(t,r,["x","y"],a);var x=r[v];x&&i("histfunc"),i("histnorm"),i("autobin"+f),PMt(t,r,i,n,a),qA.coerceSelectionMarkerOpacity(r,i);var _=(r.marker.line||{}).color,y=F3e.getComponentMethod("errorbars","supplyDefaults");y(t,r,_||D3e.defaultLine,{axis:"y"}),y(t,r,_||D3e.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}});var S7=fe((zgr,B3e)=>{"use strict";var BA=Xt(),DMt=El(),M7=bi().traceIs,RMt=n2(),IMt=z0().validateCornerradius,z3e=BA.nestedProperty,aG=Jx().getAxisGroup,q3e=[{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"}],zMt=["x","y"];B3e.exports=function(t,r){var n=r._histogramBinOpts={},a=[],i={},o=[],s,l,u,c,f,v,g;function p(O,V){return BA.coerce(s._input,s,s._module.attributes,O,V)}function x(O){return O.orientation==="v"?"x":"y"}function _(O,V){var j=DMt.getFromTrace({_fullLayout:r},O,V);return j.type}function y(O,V,j){var q=O.uid+"__"+j;V||(V=q);var U=_(O,j),J=O[j+"calendar"]||"",ee=n[V],ce=!0;ee&&(U===ee.axType&&J===ee.calendar?(ce=!1,ee.traces.push(O),ee.dirs.push(j)):(V=q,U!==ee.axType&&BA.warn(["Attempted to group the bins of trace",O.index,"set on a","type:"+U,"axis","with bins on","type:"+ee.axType,"axis."].join(" ")),J!==ee.calendar&&BA.warn(["Attempted to group the bins of trace",O.index,"set with a",J,"calendar","with bins",ee.calendar?"on a "+ee.calendar+" calendar":"w/o a set calendar"].join(" ")))),ce&&(n[V]={traces:[O],dirs:[j],axType:U,calendar:O[j+"calendar"]||""}),O["_"+j+"bingroup"]=V}for(f=0;f{"use strict";var qMt=I3().hoverPoints,BMt=Yi().hoverLabelText;O3e.exports=function(t,r,n,a,i){var o=qMt(t,r,n,a,i);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=BMt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var oG=fe((Bgr,U3e)=>{"use strict";U3e.exports=function(t,r,n,a,i){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(i)?a[0].pts[i[0]][i[1]]:a[i].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,t.pointIndices=o}return t}});var G3e=fe((Ogr,V3e)=>{"use strict";V3e.exports={attributes:A7(),layoutAttributes:XC(),supplyDefaults:I3e(),crossTraceDefaults:S7(),supplyLayoutDefaults:SV(),calc:ZV().calc,crossTraceCalc:i2().crossTraceCalc,plot:m2().plot,layerName:"barlayer",style:_v().style,styleOnSelect:_v().styleOnSelect,colorbar:Zf(),hoverPoints:N3e(),selectPoints:z3(),eventData:oG(),moduleType:"trace",name:"histogram",basePlotModule:gu(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var j3e=fe((Ngr,H3e)=>{"use strict";H3e.exports=G3e()});var k7=fe((Ugr,X3e)=>{"use strict";var _p=A7(),W3e=rG(),E7=O3(),OMt=Ho(),sG=pl().axisHoverFormat,{hovertemplateAttrs:NMt,texttemplateAttrs:UMt,templatefallbackAttrs:Y3e}=Oo(),VMt=_s(),OA=ta().extendFlat;X3e.exports=OA({x:_p.x,y:_p.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:_p.histnorm,histfunc:_p.histfunc,nbinsx:_p.nbinsx,xbins:W3e("x"),nbinsy:_p.nbinsy,ybins:W3e("y"),autobinx:_p.autobinx,autobiny:_p.autobiny,bingroup:OA({},_p.bingroup,{}),xbingroup:OA({},_p.bingroup,{}),ybingroup:OA({},_p.bingroup,{}),xgap:E7.xgap,ygap:E7.ygap,zsmooth:E7.zsmooth,xhoverformat:sG("x"),yhoverformat:sG("y"),zhoverformat:sG("z",1),hovertemplate:NMt({},{keys:["z"]}),hovertemplatefallback:Y3e(),texttemplate:UMt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:Y3e({editType:"plot"}),textfont:E7.textfont,showlegend:OA({},OMt.showlegend,{dflt:!1})},VMt("",{cLetter:"z",autoColorDflt:!1}))});var lG=fe((Vgr,$3e)=>{"use strict";var GMt=bi(),Z3e=Xt();$3e.exports=function(t,r,n,a){var i=n("x"),o=n("y"),s=Z3e.minRowLength(i),l=Z3e.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=GMt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],a);var c=n("z")||n("marker.color");c&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var J3e=fe((Ggr,K3e)=>{"use strict";var HMt=Xt(),jMt=lG(),WMt=VV(),YMt=Vc(),XMt=IA(),ZMt=k7();K3e.exports=function(t,r,n,a){function i(o,s){return HMt.coerce(t,r,ZMt,o,s)}jMt(t,r,i,a),r.visible!==!1&&(WMt(t,r,i,a),YMt(t,r,a,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),i("hovertemplatefallback"),XMt(i,a),i("xhoverformat"),i("yhoverformat"))}});var twe=fe((Hgr,ewe)=>{"use strict";var $Mt=T7(),Q3e=Yi().hoverLabelText;ewe.exports=function(t,r,n,a,i){var o=$Mt(t,r,n,a,i);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,v=c.xRanges[u],g=c.yRanges[l];return t.xLabel=Q3e(t.xa,[v[0],v[1]],f.xhoverformat),t.yLabel=Q3e(t.ya,[g[0],g[1]],f.yhoverformat),o}}});var nwe=fe((jgr,rwe)=>{"use strict";rwe.exports={attributes:k7(),supplyDefaults:J3e(),crossTraceDefaults:S7(),calc:m7(),plot:_7(),layerName:"heatmaplayer",colorbar:H3(),style:b7(),hoverPoints:twe(),eventData:oG(),moduleType:"trace",name:"histogram2d",basePlotModule:gu(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var awe=fe((Wgr,iwe)=>{"use strict";iwe.exports=nwe()});var C7=fe((Ygr,owe)=>{"use strict";owe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var NA=fe((Xgr,cwe)=>{"use strict";var Bu=O3(),L7=Ol(),lwe=pl(),uG=lwe.axisHoverFormat,KMt=lwe.descriptionOnlyNumbers,JMt=_s(),QMt=Uc().dash,eSt=Ds(),j3=ta().extendFlat,uwe=C7(),tSt=uwe.COMPARISON_OPS2,rSt=uwe.INTERVAL_OPS,swe=L7.line;cwe.exports=j3({z:Bu.z,x:Bu.x,x0:Bu.x0,dx:Bu.dx,y:Bu.y,y0:Bu.y0,dy:Bu.dy,xperiod:Bu.xperiod,yperiod:Bu.yperiod,xperiod0:L7.xperiod0,yperiod0:L7.yperiod0,xperiodalignment:Bu.xperiodalignment,yperiodalignment:Bu.yperiodalignment,text:Bu.text,hovertext:Bu.hovertext,transpose:Bu.transpose,xtype:Bu.xtype,ytype:Bu.ytype,xhoverformat:uG("x"),yhoverformat:uG("y"),zhoverformat:uG("z",1),hovertemplate:Bu.hovertemplate,hovertemplatefallback:Bu.hovertemplatefallback,texttemplate:j3({},Bu.texttemplate,{}),texttemplatefallback:Bu.texttemplatefallback,textfont:j3({},Bu.textfont,{}),hoverongaps:Bu.hoverongaps,connectgaps:j3({},Bu.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:eSt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:KMt("contour label")},operation:{valType:"enumerated",values:[].concat(tSt).concat(rSt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:j3({},swe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:QMt,smoothing:j3({},swe.smoothing,{}),editType:"plot"},zorder:L7.zorder},JMt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var fG=fe((Zgr,hwe)=>{"use strict";var Ch=k7(),f1=NA(),nSt=_s(),cG=pl().axisHoverFormat,fwe=ta().extendFlat;hwe.exports=fwe({x:Ch.x,y:Ch.y,z:Ch.z,marker:Ch.marker,histnorm:Ch.histnorm,histfunc:Ch.histfunc,nbinsx:Ch.nbinsx,xbins:Ch.xbins,nbinsy:Ch.nbinsy,ybins:Ch.ybins,autobinx:Ch.autobinx,autobiny:Ch.autobiny,bingroup:Ch.bingroup,xbingroup:Ch.xbingroup,ybingroup:Ch.ybingroup,autocontour:f1.autocontour,ncontours:f1.ncontours,contours:f1.contours,line:{color:f1.line.color,width:fwe({},f1.line.width,{dflt:.5}),dash:f1.line.dash,smoothing:f1.line.smoothing,editType:"plot"},xhoverformat:cG("x"),yhoverformat:cG("y"),zhoverformat:cG("z",1),hovertemplate:Ch.hovertemplate,hovertemplatefallback:Ch.hovertemplatefallback,texttemplate:f1.texttemplate,texttemplatefallback:f1.texttemplatefallback,textfont:f1.textfont},nSt("",{cLetter:"z",editTypeOverride:"calc"}))});var P7=fe(($gr,dwe)=>{"use strict";dwe.exports=function(t,r,n,a){var i=a("contours.start"),o=a("contours.end"),s=i===!1||o===!1,l=n("contours.size"),u;s?u=r.autocontour=!0:u=n("autocontour",!1),(u||!l)&&n("ncontours")}});var hG=fe((Kgr,vwe)=>{"use strict";var iSt=Xt();vwe.exports=function(t,r,n,a){a||(a={});var i=t("contours.showlabels");if(i){var o=r.font;iSt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}a.hasHover!==!1&&t("zhoverformat")}});var F7=fe((Jgr,pwe)=>{"use strict";var aSt=Vc(),oSt=hG();pwe.exports=function(t,r,n,a,i){var o=n("contours.coloring"),s,l="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(l=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,aSt(t,r,a,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),oSt(n,a,l,i)}});var xwe=fe((Qgr,ywe)=>{"use strict";var gwe=Xt(),sSt=lG(),lSt=P7(),uSt=F7(),cSt=IA(),mwe=fG();ywe.exports=function(t,r,n,a){function i(s,l){return gwe.coerce(t,r,mwe,s,l)}function o(s){return gwe.coerce2(t,r,mwe,s)}sSt(t,r,i,a),r.visible!==!1&&(lSt(t,r,i,o),uSt(t,r,i,a),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),i("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&cSt(i,a))}});var pG=fe((emr,bwe)=>{"use strict";var vG=Yi(),dG=Xt();bwe.exports=function(t,r){var n=t.contours;if(t.autocontour){var a=t.zmin,i=t.zmax;(t.zauto||a===void 0)&&(a=dG.aggNums(Math.min,null,r)),(t.zauto||i===void 0)&&(i=dG.aggNums(Math.max,null,r));var o=_we(a,i,t.ncontours);n.size=o.dtick,n.start=vG.tickFirst(o),o.range.reverse(),n.end=vG.tickFirst(o),n.start===a&&(n.start+=n.size),n.end===i&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),dG.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!=="constraint"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=_we(s,l,t.ncontours).dtick,u.size=n.size=c}}};function _we(e,t,r){var n={type:"linear",range:[e,t]};return vG.autoTicks(n,(t-e)/(r||15)),n}});var UA=fe((tmr,wwe)=>{"use strict";wwe.exports=function(t){return t.end+t.size/1e6}});var gG=fe((rmr,Awe)=>{"use strict";var Twe=js(),fSt=m7(),hSt=pG(),dSt=UA();Awe.exports=function(t,r){var n=fSt(t,r),a=n[0].z;hSt(r,a);var i=r.contours,o=Twe.extractOpts(r),s;if(i.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=i.start,u=dSt(i),c=i.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var v=l-c/2,g=v+f*c;s=[v,g]}else s=a;return Twe.calc(t,r,{vals:s,cLetter:"z"}),n}});var VA=fe((nmr,Mwe)=>{"use strict";Mwe.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}}});var mG=fe((imr,Swe)=>{"use strict";var D7=VA();Swe.exports=function(t){var r=t[0].z,n=r.length,a=r[0].length,i=n===2||a===2,o,s,l,u,c,f,v,g,p;for(s=0;se?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var yG=fe((amr,Cwe)=>{"use strict";var R7=Xt(),W3=VA();Cwe.exports=function(t,r,n){var a,i,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=W3.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[i]=W3.SADDLEREMAINDER[o]):delete e.crossings[i],s=W3.NEWDELTA[o],!s){R7.log("Found bad marching index:",o,t,e.level);break}l.push(kwe(e,t,s)),t[0]+=s[0],t[1]+=s[1],i=t.join(","),GA(l[l.length-1],l[l.length-2],n,a)&&l.pop();var p=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),x=t[0]===f[0]&&t[1]===f[1]&&s[0]===v[0]&&s[1]===v[1];if(x||r&&p)break;o=e.crossings[i]}g===1e4&&R7.log("Infinite loop in contour?");var _=GA(l[0],l[l.length-1],n,a),y=0,C=.2*e.smoothing,k=[],S=0,L,w,A,T,m,F,E,I,R,B,O;for(g=1;g=S;g--)if(L=k[g],L=S&&L+k[w]I&&R--,e.edgepaths[R]=O.concat(l,B));break}U||(e.edgepaths[I]=l.concat(B))}for(I=0;I20&&t?e===208||e===1114?n=r[0]===0?1:-1:a=r[1]===0?1:-1:W3.BOTTOMSTART.indexOf(e)!==-1?a=1:W3.LEFTSTART.indexOf(e)!==-1?n=1:W3.TOPSTART.indexOf(e)!==-1?a=-1:n=-1,[n,a]}function kwe(e,t,r){var n=t[0]+Math.max(r[0],0),a=t[1]+Math.max(r[1],0),i=e.z[a][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-i)/(e.z[a][n+1]-i),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[a],!0),n+l,a]}else{var c=(e.level-i)/(e.z[a+1][n]-i),f=(c!==1?(1-c)*s.c2l(e.y[a]):0)+(c!==0?c*s.c2l(e.y[a+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,a+c]}}});var Dwe=fe((omr,Fwe)=>{"use strict";var xG=C7(),mSt=aa();Fwe.exports={"[]":Lwe("[]"),"][":Lwe("]["),">":_G(">"),"<":_G("<"),"=":_G("=")};function Pwe(e,t){var r=Array.isArray(t),n;function a(i){return mSt(i)?+i:null}return xG.COMPARISON_OPS2.indexOf(e)!==-1?n=a(r?t[0]:t):xG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[a(t[0]),a(t[1])]:[a(t),a(t)]:xG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(a):[a(t)]),n}function Lwe(e){return function(t){t=Pwe(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function _G(e){return function(t){return t=Pwe(e,t),{start:t,end:1/0,size:1/0}}}});var bG=fe((smr,Iwe)=>{"use strict";var Rwe=Xt(),ySt=Dwe(),xSt=UA();Iwe.exports=function(t,r,n){for(var a=t.type==="constraint"?ySt[t._operation](t.value):t,i=a.size,o=[],s=xSt(a),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=a.start;c1e3){Rwe.warn("Too many contours, clipping at 1000",t);break}return o}});var wG=fe((lmr,qwe)=>{"use strict";var Y3=Xt();qwe.exports=function(e,t){var r,n,a,i=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&Y3.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";Bwe.exports=function(e,t){var r=e[0],n=r.z,a;switch(t.type){case"levels":var i=Math.min(n[0][0],n[0][1]);for(a=0;ao.level||o.starts.length&&i===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(a=0;a":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&g===c)&&(r.prefixBoundary=!0);break;case"][":v=Math.min(f[0],f[1]),g=Math.max(f[0],f[1]),vu&&(r.prefixBoundary=!0);break}break}}});var I7=fe(ld=>{"use strict";var jA=xi(),yf=Xt(),dg=ea(),_St=js(),Uwe=as(),Owe=Yi(),Nwe=Hp(),bSt=_7(),Vwe=mG(),Gwe=yG(),wSt=bG(),TSt=wG(),Hwe=TG(),HA=VA(),h1=HA.LABELOPTIMIZER;ld.plot=function(t,r,n,a){var i=r.xaxis,o=r.yaxis;yf.makeTraceGroups(a,n,"contour").each(function(s){var l=jA.select(this),u=s[0],c=u.trace,f=u.x,v=u.y,g=c.contours,p=wSt(g,r,u),x=yf.ensureSingle(l,"g","heatmapcoloring"),_=[];g.coloring==="heatmap"&&(_=[s]),bSt(t,r,_,x),Vwe(p),Gwe(p);var y=i.c2p(f[0],!0),C=i.c2p(f[f.length-1],!0),k=o.c2p(v[0],!0),S=o.c2p(v[v.length-1],!0),L=[[y,S],[C,S],[C,k],[y,k]],w=p;g.type==="constraint"&&(w=TSt(p,g._operation)),ASt(l,L,g),MSt(l,w,L,g),SSt(l,p,t,u,g),kSt(l,r,t,u,L)})};function ASt(e,t,r){var n=yf.ensureSingle(e,"g","contourbg"),a=n.selectAll("path").data(r.coloring==="fill"?[0]:[]);a.enter().append("path"),a.exit().remove(),a.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function MSt(e,t,r,n){var a=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",i="M"+r.join("L")+"Z";a&&Hwe(t,n);var o=yf.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(a?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?i:"")+jwe(l,r);u?jA.select(this).attr("d",u).style("stroke","none"):jA.select(this).remove()})}function jwe(e,t){var r="",n=0,a=e.edgepaths.map(function(y,C){return C}),i=!0,o,s,l,u,c,f;function v(y){return Math.abs(y[1]-t[0][1])<.01}function g(y){return Math.abs(y[1]-t[2][1])<.01}function p(y){return Math.abs(y[0]-t[0][0])<.01}function x(y){return Math.abs(y[0]-t[2][0])<.01}for(;a.length;){for(f=dg.smoothopen(e.edgepaths[n],e.smoothing),r+=i?f:f.replace(/^M/,"L"),a.splice(a.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){yf.log("Missing end?",n,e);break}for(v(o)&&!x(o)?s=t[1]:p(o)?s=t[0]:g(o)?s=t[3]:x(o)&&(s=t[2]),c=0;c=0&&(s=_,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-_[1])<.01&&(_[0]-o[0])*(s[0]-_[0])>=0&&(s=_,u=c):yf.log("endpt to newendpt is not vert. or horz.",o,s,_)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){yf.log("unclosed perimeter path");break}n=u,i=a.indexOf(n)===-1,i&&(n=a[0],r+="Z")}for(n=0;nh1.MAXCOST*2)break;v&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=h1.MAXCOST)return c};function ESt(e,t,r,n){var a=t.width/2,i=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*a,c=Math.sin(l)*a,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*i)),v=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*i);if(f<1||v<1)return 1/0;var g=h1.EDGECOST*(1/(f-1)+1/(v-1));g+=h1.ANGLECOST*l*l;for(var p=o-u,x=s-c,_=o+u,y=s+c,C=0;C{"use strict";var LSt=xi(),AG=js(),PSt=UA();Wwe.exports=function(t){var r=t.contours,n=r.start,a=PSt(r),i=r.size||1,o=Math.floor((a-n)/i)+1,s=r.coloring==="lines"?0:1,l=AG.extractOpts(t);isFinite(i)||(i=1,o=1);var u=l.reversescale?AG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),v=new Array(c),g,p,x=l.min,_=l.max;if(r.coloring==="heatmap"){for(p=0;p=_)&&(n<=x&&(n=x),a>=_&&(a=_),o=Math.floor((a-n)/i)+1,s=0),p=0;px&&(f.unshift(x),v.unshift(v[0])),f[f.length-1]<_&&(f.push(_),v.push(v[v.length-1])))}return AG.makeColorScaleFunc({domain:f,range:v},{noNumericCheck:!0})}});var q7=fe((hmr,Xwe)=>{"use strict";var z7=xi(),Ywe=ea(),FSt=b7(),DSt=MG();Xwe.exports=function(t){var r=z7.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var a=z7.select(this),i=n[0].trace,o=i.contours,s=i.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",v=!c&&o.coloring==="fill",g=f||v?DSt(i):null;a.selectAll("g.contourlevel").each(function(_){z7.select(this).selectAll("path").call(Ywe.lineGroupStyle,s.width,f?g(_.level):s.color,s.dash)});var p=o.labelfont;if(a.selectAll("g.contourlabels text").each(function(_){Ywe.font(z7.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(f?g(_.level):s.color)})}),c)a.selectAll("g.contourfill path").style("fill",i.fillcolor);else if(v){var x;a.selectAll("g.contourfill path").style("fill",function(_){return x===void 0&&(x=_.level),g(_.level+.5*l)}),x===void 0&&(x=u),a.selectAll("g.contourbg path").style("fill",g(x-.5*l))}}),FSt(t)}});var B7=fe((dmr,$we)=>{"use strict";var Zwe=js(),RSt=MG(),ISt=UA();function zSt(e,t,r){var n=t.contours,a=t.line,i=n.size||1,o=n.coloring,s=RSt(t,{isColorbar:!0});if(o==="heatmap"){var l=Zwe.extractOpts(t);r._fillgradient=l.reversescale?Zwe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:a.color,width:n.showlines!==!1?a.width:0,dash:a.dash},r._levels={start:n.start,end:ISt(n),size:i}}$we.exports={min:"zmin",max:"zmax",calc:zSt}});var SG=fe((vmr,Kwe)=>{"use strict";var O7=ni(),qSt=T7();Kwe.exports=function(t,r,n,a,i){i||(i={}),i.isContour=!0;var o=qSt(t,r,n,a,i);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&O7.opacity(l.fillcolor)?s.color=O7.addOpacity(l.fillcolor,1):l.contours.showlines&&O7.opacity(l.line.color)&&(s.color=O7.addOpacity(l.line.color,1)))}),o}});var Qwe=fe((pmr,Jwe)=>{"use strict";Jwe.exports={attributes:fG(),supplyDefaults:xwe(),crossTraceDefaults:S7(),calc:gG(),plot:I7().plot,layerName:"contourlayer",style:q7(),colorbar:B7(),hoverPoints:SG(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:gu(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var t5e=fe((gmr,e5e)=>{"use strict";e5e.exports=Qwe()});var EG=fe((mmr,s5e)=>{"use strict";var r5e=aa(),BSt=hG(),a5e=ni(),n5e=a5e.addOpacity,OSt=a5e.opacity,o5e=C7(),i5e=Xt().isArrayOrTypedArray,NSt=o5e.CONSTRAINT_REDUCTION,USt=o5e.COMPARISON_OPS2;s5e.exports=function(t,r,n,a,i,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=NSt[f],VSt(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",n5e((t.line||{}).color||i,.5))),l){var v=c&&OSt(c)?n5e(r.fillcolor,1):i;u=n("line.color",v),n("line.width",2),n("line.dash")}n("line.smoothing"),BSt(n,a,u,o)};function VSt(e,t){var r;USt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),i5e(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:r5e(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),r5e(t.value)||(i5e(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var c5e=fe((ymr,u5e)=>{"use strict";var kG=Xt(),GSt=s7(),HSt=sp(),jSt=EG(),WSt=P7(),YSt=F7(),XSt=IA(),l5e=NA();u5e.exports=function(t,r,n,a){function i(u,c){return kG.coerce(t,r,l5e,u,c)}function o(u){return kG.coerce2(t,r,l5e,u)}var s=GSt(t,r,i,a);if(!s){r.visible=!1;return}HSt(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hoverongaps"),i("hovertemplate"),i("hovertemplatefallback");var l=i("contours.type")==="constraint";i("connectgaps",kG.isArray1D(r.z)),l?jSt(t,r,i,a,n):(WSt(t,r,i,o),YSt(t,r,i,a)),r.contours&&r.contours.coloring==="heatmap"&&XSt(i,a),i("zorder")}});var h5e=fe((xmr,f5e)=>{"use strict";f5e.exports={attributes:NA(),supplyDefaults:c5e(),calc:gG(),plot:I7().plot,style:q7(),colorbar:B7(),hoverPoints:SG(),moduleType:"trace",name:"contour",basePlotModule:gu(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var v5e=fe((_mr,d5e)=>{"use strict";d5e.exports=h5e()});var CG=fe((bmr,y5e)=>{"use strict";var{hovertemplateAttrs:ZSt,texttemplateAttrs:$St,templatefallbackAttrs:p5e}=Oo(),KSt=n1(),O0=Ol(),JSt=Ho(),g5e=_s(),QSt=Uc().dash,jm=ta().extendFlat,Mv=O0.marker,WA=O0.line,m5e=Mv.line;y5e.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:jm({},O0.mode,{dflt:"markers"}),text:jm({},O0.text,{}),texttemplate:$St({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:p5e({editType:"plot"}),hovertext:jm({},O0.hovertext,{}),line:{color:WA.color,width:WA.width,dash:QSt,backoff:WA.backoff,shape:jm({},WA.shape,{values:["linear","spline"]}),smoothing:WA.smoothing,editType:"calc"},connectgaps:O0.connectgaps,cliponaxis:O0.cliponaxis,fill:jm({},O0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:KSt(),marker:jm({symbol:Mv.symbol,opacity:Mv.opacity,angle:Mv.angle,angleref:Mv.angleref,standoff:Mv.standoff,maxdisplayed:Mv.maxdisplayed,size:Mv.size,sizeref:Mv.sizeref,sizemin:Mv.sizemin,sizemode:Mv.sizemode,line:jm({width:m5e.width,dash:m5e.dash,editType:"calc"},g5e("marker.line")),gradient:Mv.gradient,editType:"calc"},g5e("marker")),textfont:O0.textfont,textposition:O0.textposition,selected:O0.selected,unselected:O0.unselected,hoverinfo:jm({},JSt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:O0.hoveron,hovertemplate:ZSt(),hovertemplatefallback:p5e()}});var w5e=fe((wmr,b5e)=>{"use strict";var x5e=Xt(),eEt=r1(),X3=Is(),tEt=vv(),rEt=lp(),_5e=f3(),nEt=up(),iEt=a1(),aEt=CG();b5e.exports=function(t,r,n,a){function i(v,g){return x5e.coerce(t,r,aEt,v,g)}var o=i("a"),s=i("b"),l=i("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,i("sum"),i("text"),i("hovertext"),r.hoveron!=="fills"&&(i("hovertemplate"),i("hovertemplatefallback"));var c=u{"use strict";var LG=Yi();T5e.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot;return a.aLabel=LG.tickText(i.aaxis,t.a,!0).text,a.bLabel=LG.tickText(i.baxis,t.b,!0).text,a.cLabel=LG.tickText(i.caxis,t.c,!0).text,a}});var k5e=fe((Amr,E5e)=>{"use strict";var PG=aa(),oEt=pv(),sEt=o1(),lEt=P0(),uEt=gv().calcMarkerSize,M5e=["a","b","c"],S5e={a:["b","c"],b:["a","c"],c:["a","b"]};E5e.exports=function(t,r){var n=t._fullLayout[r.subplot],a=n.sum,i=r.sum||a,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,v,g;for(l=0;l{"use strict";var cEt=m3();C5e.exports=function(t,r,n){var a=r.plotContainer;a.select(".scatterlayer").selectAll("*").remove();for(var i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:a,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var fEt=b3();P5e.exports=function(t,r,n,a){var i=fEt(t,r,n,a);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),i}var f=o.cd[o.index],v=o.trace,g=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[v.subplot]={_subplot:g};var x=v._module.formatLabels(f,v,p);o.aLabel=x.aLabel,o.bLabel=x.bLabel,o.cLabel=x.cLabel;var _=f.hi||v.hoverinfo,y=[];function C(S,L){y.push(S._hovertitle+": "+L)}if(!v.hovertemplate){var k=_.split("+");k.indexOf("all")!==-1&&(k=["a","b","c"]),k.indexOf("a")!==-1&&C(g.aaxis,o.aLabel),k.indexOf("b")!==-1&&C(g.baxis,o.bLabel),k.indexOf("c")!==-1&&C(g.caxis,o.cLabel)}return o.extraText=y.join("
"),o.hovertemplate=v.hovertemplate,i}});var R5e=fe((Emr,D5e)=>{"use strict";D5e.exports=function(t,r,n,a,i){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),a[i]){var o=a[i];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var j5e=fe((kmr,H5e)=>{"use strict";var N5e=xi(),FG=bi(),vg=Xt(),d1=vg.strTranslate,N7=vg._,_2=ni(),U7=ea(),YA=Hp(),DG=ta().extendFlat,hEt=Hs(),Wm=Yi(),I5e=ed(),z5e=kl(),U5e=$p(),q5e=U5e.freeMode,dEt=U5e.rectMode,RG=qx(),vEt=Ac().prepSelect,pEt=Ac().selectOnClick,gEt=Ac().clearOutline,mEt=Ac().clearSelectionsCache,V5e=rc();function G5e(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}H5e.exports=G5e;var v1=G5e.prototype;v1.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};v1.plot=function(e,t){var r=this,n=t[r.id],a=t._size;r._hasClipOnAxisFalse=!1;for(var i=0;iZ3*u?(y=u,_=y*Z3):(_=l,y=_/Z3),C=o*_/l,k=s*y/u,p=t.l+t.w*a-_/2,x=t.t+t.h*(1-i)-y/2,r.x0=p,r.y0=x,r.w=_,r.h=y,r.sum=c,r.xaxis={type:"linear",range:[f+2*g-c,c-f-2*v],domain:[a-C/2,a+C/2],_id:"x"},YA(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(B){return B.a>=r.aaxis.range[0]&&B.a<=r.aaxis.range[1]&&B.b>=r.baxis.range[1]&&B.b<=r.baxis.range[0]&&B.c>=r.caxis.range[1]&&B.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-v-g],domain:[i-k/2,i+k/2],_id:"y"},YA(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var S=r.yaxis.domain[0],L=r.aaxis=DG({},e.aaxis,{range:[f,c-v-g],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[S,S+k*Z3],anchor:"free",position:0,_id:"y",_length:_});YA(L,r.graphDiv._fullLayout),L.setScale();var w=r.baxis=DG({},e.baxis,{range:[c-f-g,v],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:_});YA(w,r.graphDiv._fullLayout),w.setScale();var A=r.caxis=DG({},e.caxis,{range:[c-f-v,g],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[S,S+k*Z3],anchor:"free",position:0,_id:"y",_length:_});YA(A,r.graphDiv._fullLayout),A.setScale();var T="M"+p+","+(x+y)+"h"+_+"l-"+_/2+",-"+y+"Z";r.clipDef.select("path").attr("d",T),r.layers.plotbg.select("path").attr("d",T);var m="M0,"+y+"h"+_+"l-"+_/2+",-"+y+"Z";r.clipDefRelative.select("path").attr("d",m);var F=d1(p,x);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",F),r.clipDefRelative.select("path").attr("transform",null);var E=d1(p-w._offset,x+y);r.layers.baxis.attr("transform",E),r.layers.bgrid.attr("transform",E);var I=d1(p+_/2,x)+"rotate(30)"+d1(0,-L._offset);r.layers.aaxis.attr("transform",I),r.layers.agrid.attr("transform",I);var R=d1(p+_/2,x)+"rotate(-30)"+d1(0,-A._offset);r.layers.caxis.attr("transform",R),r.layers.cgrid.attr("transform",R),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+p+","+(x+y)+"l"+_/2+",-"+y:"M0,0").call(_2.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",w.showline?"M"+p+","+(x+y)+"h"+_:"M0,0").call(_2.stroke,w.linecolor||"#000").style("stroke-width",(w.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",A.showline?"M"+(p+_/2)+","+x+"l"+_/2+","+y:"M0,0").call(_2.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),U7.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};v1.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",a=t.layers,i=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(i),t.drawAx(o),t.drawAx(s),e){var l=Math.max(i.showticklabels?i.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;a["a-title"]=RG.draw(r,"a"+n,{propContainer:i,propName:t.id+".aaxis.title.text",placeholder:N7(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-i.title.font.size/3-l,"text-anchor":"middle"}}),a["b-title"]=RG.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:N7(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),a["c-title"]=RG.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:N7(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};v1.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,a=n.charAt(0),i=e._id,o=t.layers[n],s=30,l=a+"tickLayout",u=yEt(e);t[l]!==u&&(o.selectAll("."+i+"tick").remove(),t[l]=u),e.setScale();var c=Wm.calcTicks(e),f=Wm.clipEnds(e,c),v=Wm.makeTransTickFn(e),g=Wm.getTickSigns(e)[2],p=vg.deg2rad(s),x=g*(e.linewidth||1)/2,_=g*e.ticklen,y=t.w,C=t.h,k=a==="b"?"M0,"+x+"l"+Math.sin(p)*_+","+Math.cos(p)*_:"M"+x+",0l"+Math.cos(p)*_+","+-Math.sin(p)*_,S={a:"M0,0l"+C+",-"+y/2,b:"M0,0l-"+y/2+",-"+C,c:"M0,0l-"+C+","+y/2}[a];Wm.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:k,transFn:v,crisp:!1}),Wm.drawGrid(r,e,{vals:f,layer:t.layers[a+"grid"],path:S,transFn:v,crisp:!1}),Wm.drawLabels(r,e,{vals:c,layer:o,transFn:v,labelFns:Wm.makeLabelFns(e,0,s)})};function yEt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var Yc=V5e.MINZOOM/2+.87,xEt="m-0.87,.5h"+Yc+"v3h-"+(Yc+5.2)+"l"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l2.6,1.5l-"+Yc/2+","+Yc*.87+"Z",_Et="m0.87,.5h-"+Yc+"v3h"+(Yc+5.2)+"l-"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l-2.6,1.5l"+Yc/2+","+Yc*.87+"Z",bEt="m0,1l"+Yc/2+","+Yc*.87+"l2.6,-1.5l-"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l-"+(Yc/2+2.6)+","+(Yc*.87+4.5)+"l2.6,1.5l"+Yc/2+",-"+Yc*.87+"Z",wEt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",B5e=!0;v1.clearOutline=function(){mEt(this.dragOptions),gEt(this.dragOptions.gd)};v1.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,a,i;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(E,I,R){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],a=r._fullLayout._invScaleX,i=r._fullLayout._invScaleY;var B=e.dragOptions.dragmode=r._fullLayout.dragmode;q5e(B)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,B==="zoom"?(e.dragOptions.moveFn=w,e.dragOptions.clickFn=y,e.dragOptions.doneFn=A,C(E,I,R)):B==="pan"?(e.dragOptions.moveFn=m,e.dragOptions.clickFn=y,e.dragOptions.doneFn=F,T(),e.clearOutline(r)):(dEt(B)||q5e(B))&&vEt(E,I,R,e.dragOptions,B)}};var o,s,l,u,c,f,v,g,p,x;function _(E){var I={};return I[e.id+".aaxis.min"]=E.a,I[e.id+".baxis.min"]=E.b,I[e.id+".caxis.min"]=E.c,I}function y(E,I){var R=r._fullLayout.clickmode;O5e(r),E===2&&(r.emit("plotly_doubleclick",null),FG.call("_guiRelayout",r,_({a:0,b:0,c:0}))),R.indexOf("select")>-1&&E===1&&pEt(I,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),R.indexOf("event")>-1&&z5e.click(r,I,e.id)}function C(E,I,R){var B=t.getBoundingClientRect();o=I-B.left,s=R-B.top,r._fullLayout._calcInverseTransform(r);var O=r._fullLayout._invTransform,V=vg.apply3DTransform(O)(o,s);o=V[0],s=V[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=_2.luminosity(e.graphDiv._fullLayout[e.id].bgcolor),v="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",g=!1,p=n.append("path").attr("class","zoombox").attr("transform",d1(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),x=n.append("path").attr("class","zoombox-corners").attr("transform",d1(e.x0,e.y0)).style({fill:_2.background,stroke:_2.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function k(E,I){return 1-I/e.h}function S(E,I){return 1-(E+(e.h-I)/Math.sqrt(3))/e.w}function L(E,I){return(E-(e.h-I)/Math.sqrt(3))/e.w}function w(E,I){var R=o+E*a,B=s+I*i,O=Math.max(0,Math.min(1,k(o,s),k(R,B))),V=Math.max(0,Math.min(1,S(o,s),S(R,B))),j=Math.max(0,Math.min(1,L(o,s),L(R,B))),q=(O/2+j)*e.w,U=(1-O/2-V)*e.w,J=(q+U)/2,ee=U-q,ce=(1-O)*e.h,ye=ce-ee/Z3;ee.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),x.transition().style("opacity",1).duration(200),g=!0),r.emit("plotly_relayouting",_(c))}function A(){O5e(r),c!==l&&(FG.call("_guiRelayout",r,_(c)),B5e&&r.data&&r._context.showTips&&(vg.notifier(N7(r,"Double-click to zoom back out"),"long",r),B5e=!1))}function T(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function m(E,I){var R=E/e.xaxis._m,B=I/e.yaxis._m;c={a:l.a-B,b:l.b+(R+B)/2,c:l.c-(R-B)/2};var O=[c.a,c.b,c.c].sort(vg.sorterAsc),V={a:O.indexOf(c.a),b:O.indexOf(c.b),c:O.indexOf(c.c)};O[0]<0&&(O[1]+O[0]/2<0?(O[2]+=O[0]+O[1],O[0]=O[1]=0):(O[2]+=O[0]/2,O[1]+=O[0]/2,O[0]=0),c={a:O[V.a],b:O[V.b],c:O[V.c]},I=(l.a-c.a)*e.yaxis._m,E=(l.c-c.c-l.b+c.b)*e.xaxis._m);var j=d1(e.x0+E,e.y0+I);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",j);var q=d1(-E,-I);e.clipDefRelative.select("path").attr("transform",q),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(U7.hideOutsideRangePoints,e),r.emit("plotly_relayouting",_(c))}function F(){FG.call("_guiRelayout",r,_(c))}t.onmousemove=function(E){z5e.hover(r,E,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(E){r._dragging||I5e.unhover(r,E)},I5e.init(this.dragOptions)};function O5e(e){N5e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var qG=fe((Cmr,W5e)=>{"use strict";var TEt=tc(),AEt=nl().attributes,Ko=pf(),MEt=rl().overrideAll,IG=ta().extendFlat,zG={title:{text:Ko.title.text,font:Ko.title.font},color:Ko.color,tickmode:Ko.minor.tickmode,nticks:IG({},Ko.nticks,{dflt:6,min:1}),tick0:Ko.tick0,dtick:Ko.dtick,tickvals:Ko.tickvals,ticktext:Ko.ticktext,ticks:Ko.ticks,ticklen:Ko.ticklen,tickwidth:Ko.tickwidth,tickcolor:Ko.tickcolor,ticklabelstep:Ko.ticklabelstep,showticklabels:Ko.showticklabels,labelalias:Ko.labelalias,showtickprefix:Ko.showtickprefix,tickprefix:Ko.tickprefix,showticksuffix:Ko.showticksuffix,ticksuffix:Ko.ticksuffix,showexponent:Ko.showexponent,exponentformat:Ko.exponentformat,minexponent:Ko.minexponent,separatethousands:Ko.separatethousands,tickfont:Ko.tickfont,tickangle:Ko.tickangle,tickformat:Ko.tickformat,tickformatstops:Ko.tickformatstops,hoverformat:Ko.hoverformat,showline:IG({},Ko.showline,{dflt:!0}),linecolor:Ko.linecolor,linewidth:Ko.linewidth,showgrid:IG({},Ko.showgrid,{dflt:!0}),gridcolor:Ko.gridcolor,gridwidth:Ko.gridwidth,griddash:Ko.griddash,layer:Ko.layer,min:{valType:"number",dflt:0,min:0}},V7=W5e.exports=MEt({domain:AEt({name:"ternary"}),bgcolor:{valType:"color",dflt:TEt.background},sum:{valType:"number",dflt:1,min:0},aaxis:zG,baxis:zG,caxis:zG},"plot","from-root");V7.uirevision={valType:"any",editType:"none"};V7.aaxis.uirevision=V7.baxis.uirevision=V7.caxis.uirevision={valType:"any",editType:"none"}});var b2=fe((Lmr,Y5e)=>{"use strict";var SEt=Xt(),EEt=Mo(),kEt=nl().defaults;Y5e.exports=function(t,r,n,a){var i=a.type,o=a.attributes,s=a.handleDefaults,l=a.partition||"x",u=r._subplots[i],c=u.length,f=c&&u[0].replace(/\d+$/,""),v,g;function p(C,k){return SEt.coerce(v,g,o,C,k)}for(var x=0;x{"use strict";var CEt=ni(),LEt=Mo(),G7=Xt(),PEt=b2(),FEt=gm(),DEt=mm(),REt=Ub(),IEt=Fx(),zEt=hA(),Z5e=qG(),X5e=["aaxis","baxis","caxis"];$5e.exports=function(t,r,n){PEt(t,r,n,{type:"ternary",attributes:Z5e,handleDefaults:qEt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function qEt(e,t,r,n){var a=r("bgcolor"),i=r("sum");n.bgColor=CEt.combine(a,n.paper_bgcolor);for(var o,s,l,u=0;u=i&&(c.min=0,f.min=0,v.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function BEt(e,t,r,n){var a=Z5e[t._name];function i(g,p){return G7.coerce(e,t,a,g,p)}i("uirevision",n.uirevision),t.type="linear";var o=i("color"),s=o!==a.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=i("title.text",c);t._hovertitle=f===c?f:u,G7.coerceFont(i,"title.font",r.font,{overrideDflt:{size:G7.bigFont(r.font.size),color:s}}),i("min"),IEt(e,t,i,"linear"),DEt(e,t,i,"linear"),FEt(e,t,i,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),REt(e,t,i,{outerTicks:!0});var v=i("showticklabels");v&&(G7.coerceFont(i,"tickfont",r.font,{overrideDflt:{color:s}}),i("tickangle"),i("tickformat")),zEt(e,t,i,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),i("hoverformat"),i("layer")}});var J5e=fe(Sv=>{"use strict";var OEt=j5e(),NEt=jf().getSubplotCalcData,UEt=Xt().counterRegex,$3="ternary";Sv.name=$3;var VEt=Sv.attr="subplot";Sv.idRoot=$3;Sv.idRegex=Sv.attrRegex=UEt($3);var GEt=Sv.attributes={};GEt[VEt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Sv.layoutAttributes=qG();Sv.supplyLayoutDefaults=K5e();Sv.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,a=r._subplots[$3],i=0;i{"use strict";Q5e.exports={attributes:CG(),supplyDefaults:w5e(),colorbar:Zf(),formatLabels:A5e(),calc:k5e(),plot:L5e(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:F5e(),selectPoints:a2(),eventData:R5e(),moduleType:"trace",name:"scatterternary",basePlotModule:J5e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var r4e=fe((Rmr,t4e)=>{"use strict";t4e.exports=e4e()});var BG=fe((Imr,i4e)=>{"use strict";var oc=PA(),K3=ta().extendFlat,n4e=pl().axisHoverFormat;i4e.exports={y:oc.y,x:oc.x,x0:oc.x0,y0:oc.y0,xhoverformat:n4e("x"),yhoverformat:n4e("y"),name:K3({},oc.name,{}),orientation:K3({},oc.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:oc.fillcolor,points:K3({},oc.boxpoints,{}),jitter:K3({},oc.jitter,{}),pointpos:K3({},oc.pointpos,{}),width:K3({},oc.width,{}),marker:oc.marker,text:oc.text,hovertext:oc.hovertext,hovertemplate:oc.hovertemplate,hovertemplatefallback:oc.hovertemplatefallback,quartilemethod:oc.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:oc.offsetgroup,alignmentgroup:oc.alignmentgroup,selected:oc.selected,unselected:oc.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:oc.zorder}});var UG=fe((zmr,a4e)=>{"use strict";var OG=FA(),NG=Xt().extendFlat;a4e.exports={violinmode:NG({},OG.boxmode,{}),violingap:NG({},OG.boxgap,{}),violingroupgap:NG({},OG.boxgroupgap,{})}});var c4e=fe((qmr,u4e)=>{"use strict";var o4e=Xt(),HEt=ni(),s4e=RA(),l4e=BG();u4e.exports=function(t,r,n,a){function i(L,w){return o4e.coerce(t,r,l4e,L,w)}function o(L,w){return o4e.coerce2(t,r,l4e,L,w)}if(s4e.handleSampleDefaults(t,r,i,a),r.visible!==!1){i("bandwidth"),i("side");var s=i("width");s||(i("scalegroup",r.name),i("scalemode"));var l=i("span"),u;Array.isArray(l)&&(u="manual"),i("spanmode",u);var c=i("line.color",(t.marker||{}).color||n),f=i("line.width"),v=i("fillcolor",HEt.addOpacity(r.line.color,.5));s4e.handlePointsDefaults(t,r,i,{prefix:""});var g=o("box.width"),p=o("box.fillcolor",v),x=o("box.line.color",c),_=o("box.line.width",f),y=i("box.visible",!!(g||p||x||_));y||(r.box={visible:!1});var C=o("meanline.color",c),k=o("meanline.width",f),S=i("meanline.visible",!!(C||k));S||(r.meanline={visible:!1}),i("quartilemethod"),i("zorder")}}});var h4e=fe((Bmr,f4e)=>{"use strict";var jEt=Xt(),WEt=UG(),YEt=t7();f4e.exports=function(t,r,n){function a(i,o){return jEt.coerce(t,r,WEt,i,o)}YEt._supply(t,r,n,a,"violin")}});var H7=fe(w2=>{"use strict";var XEt=Xt(),ZEt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};w2.makeKDE=function(e,t,r){var n=r.length,a=ZEt.gaussian,i=e.bandwidth,o=1/(n*i);return function(s){for(var l=0,u=0;u{"use strict";var VG=Xt(),GG=Yi(),$Et=RV(),d4e=H7(),KEt=Wa().BADNUM;v4e.exports=function(t,r){var n=$Et(t,r);if(n[0].t.empty)return n;for(var a=t._fullLayout,i=GG.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var tkt=n7().setPositionOffset,g4e=["v","h"];m4e.exports=function(t,r){for(var n=t.calcdata,a=r.xaxis,i=r.yaxis,o=0;o{"use strict";var HG=xi(),jG=Xt(),rkt=ea(),WG=i7(),nkt=xU(),ikt=H7();x4e.exports=function(t,r,n,a){var i=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var v=nkt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return rkt.smoothopen(v[0],1)}jG.makeTraceGroups(a,n,"trace violins").each(function(c){var f=HG.select(this),v=c[0],g=v.t,p=v.trace;if(p.visible!==!0||g.empty){f.remove();return}var x=g.bPos,_=g.bdPos,y=r[g.valLetter+"axis"],C=r[g.posLetter+"axis"],k=p.side==="both",S=k||p.side==="positive",L=k||p.side==="negative",w=f.selectAll("path.violin").data(jG.identity);w.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),w.exit().remove(),w.each(function(B){var O=HG.select(this),V=B.density,j=V.length,q=C.c2l(B.pos+x,!0),U=C.l2p(q),J;if(p.width)J=g.maxKDE/_;else{var ee=o._violinScaleGroupStats[p.scalegroup];J=p.scalemode==="count"?ee.maxKDE/_*(ee.maxCount/B.pts.length):ee.maxKDE/_}var ce,ye,xe,ue,K,_e,ne;if(S){for(_e=new Array(j),ue=0;ue{"use strict";var b4e=xi(),J3=ni(),akt=Ld().stylePoints;w4e.exports=function(t){var r=b4e.select(t).selectAll("g.trace.violins");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var a=n[0].trace,i=b4e.select(this),o=a.box||{},s=o.line||{},l=a.meanline||{},u=l.width;i.selectAll("path.violin").style("stroke-width",a.line.width+"px").call(J3.stroke,a.line.color).call(J3.fill,a.fillcolor),i.selectAll("path.box").style("stroke-width",s.width+"px").call(J3.stroke,s.color).call(J3.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};i.selectAll("path.mean").style(c).call(J3.stroke,l.color),i.selectAll("path.meanline").style(c).call(J3.stroke,l.color),akt(i,a,t)})}});var E4e=fe((Hmr,S4e)=>{"use strict";var okt=ni(),YG=Xt(),skt=Yi(),A4e=OV(),M4e=H7();S4e.exports=function(t,r,n,a,i){i||(i={});var o=i.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,v=[],g,p;if(c||f){var x=A4e.hoverOnBoxes(t,r,n,a);if(f&&x.length>0){var _=t.xa,y=t.ya,C,k,S,L,w;l.orientation==="h"?(w=r,C="y",S=y,k="x",L=_):(w=n,C="x",S=_,k="y",L=y);var A=s[t.index];if(w>=A.span[0]&&w<=A.span[1]){var T=YG.extendFlat({},t),m=L.c2p(w,!0),F=M4e.getKdeValue(A,l,w),E=M4e.getPositionOnKdePath(A,l,m),I=S._offset,R=S._length;T[C+"0"]=E[0],T[C+"1"]=E[1],T[k+"0"]=T[k+"1"]=m,T[k+"Label"]=k+": "+skt.hoverLabelText(L,w,l[k+"hoverformat"])+", "+s[0].t.labels.kde+" "+F.toFixed(3);for(var B=0,O=0;O{"use strict";k4e.exports={attributes:BG(),layoutAttributes:UG(),supplyDefaults:c4e(),crossTraceDefaults:RA().crossTraceDefaults,supplyLayoutDefaults:h4e(),calc:p4e(),crossTraceCalc:y4e(),plot:_4e(),style:T4e(),styleOnSelect:Ld().styleOnSelect,hoverPoints:E4e(),selectPoints:NV(),moduleType:"trace",name:"violin",basePlotModule:gu(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var P4e=fe((Wmr,L4e)=>{"use strict";L4e.exports=C4e()});var D4e=fe((Ymr,F4e)=>{"use strict";F4e.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var ZG=fe((Xmr,q4e)=>{"use strict";var il=u1(),XG=Ol().line,lkt=Ho(),R4e=pl().axisHoverFormat,{hovertemplateAttrs:ukt,texttemplateAttrs:ckt,templatefallbackAttrs:I4e}=Oo(),z4e=D4e(),pg=ta().extendFlat,fkt=ni();q4e.exports={x:il.x,x0:il.x0,dx:il.dx,y:il.y,y0:il.y0,dy:il.dy,xperiod:il.xperiod,yperiod:il.yperiod,xperiod0:il.xperiod0,yperiod0:il.yperiod0,xperiodalignment:il.xperiodalignment,yperiodalignment:il.yperiodalignment,xhoverformat:R4e("x"),yhoverformat:R4e("y"),hovertext:il.hovertext,hovertemplate:ukt({},{keys:z4e.eventDataKeys}),hovertemplatefallback:I4e(),hoverinfo:pg({},lkt.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:ckt({editType:"plot"},{keys:z4e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:I4e({editType:"plot"}),text:il.text,textposition:il.textposition,insidetextanchor:pg({},il.insidetextanchor,{dflt:"middle"}),textangle:pg({},il.textangle,{dflt:0}),textfont:il.textfont,insidetextfont:il.insidetextfont,outsidetextfont:il.outsidetextfont,constraintext:il.constraintext,cliponaxis:il.cliponaxis,orientation:pg({},il.orientation,{}),offset:pg({},il.offset,{arrayOk:!1}),width:pg({},il.width,{arrayOk:!1}),marker:hkt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:pg({},XG.color,{dflt:fkt.defaultLine}),width:pg({},XG.width,{dflt:0,editType:"plot"}),dash:XG.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:il.offsetgroup,alignmentgroup:il.alignmentgroup,zorder:il.zorder};function hkt(){var e=pg({},il.marker);return delete e.pattern,delete e.cornerradius,e}});var $G=fe((Zmr,B4e)=>{"use strict";B4e.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"}}});var JG=fe(($mr,N4e)=>{"use strict";var j7=Xt(),dkt=n2(),vkt=z0().handleText,pkt=r2(),gkt=sp(),O4e=ZG(),KG=ni();function mkt(e,t,r,n){function a(f,v){return j7.coerce(e,t,O4e,f,v)}var i=pkt(e,t,n,a);if(!i){t.visible=!1;return}gkt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("orientation",t.y&&!t.x?"v":"h"),a("offset"),a("width");var o=a("text");a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var s=a("textposition");vkt(e,t,n,a,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&a("textinfo",j7.isArrayOrTypedArray(o)?"text+value":"value");var l=a("marker.color",r);a("marker.line.color",KG.defaultLine),a("marker.line.width");var u=a("connector.visible");if(u){a("connector.fillcolor",ykt(l));var c=a("connector.line.width");c&&(a("connector.line.color"),a("connector.line.dash"))}a("zorder")}function ykt(e){var t=j7.isArrayOrTypedArray(e)?"#000":e;return KG.addOpacity(t,.5*KG.opacity(t))}function xkt(e,t){var r,n;function a(o){return j7.coerce(n._input,n,O4e,o)}for(var i=0;i{"use strict";var _kt=Xt(),bkt=$G();U4e.exports=function(e,t,r){var n=!1;function a(s,l){return _kt.coerce(e,t,bkt,s,l)}for(var i=0;i{"use strict";var Q3=Xt();G4e.exports=function(t,r){for(var n=0;n{"use strict";var j4e=Yi(),W4e=cp(),wkt=H4e(),Tkt=P0(),XA=Wa().BADNUM;Y4e.exports=function(t,r){var n=j4e.getFromId(t,r.xaxis||"x"),a=j4e.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c,f,v;r.orientation==="h"?(i=n.makeCalcdata(r,"x"),s=a.makeCalcdata(r,"y"),l=W4e(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=W4e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var g=Math.min(o.length,i.length),p=new Array(g);for(r._base=[],f=0;f{"use strict";var Z4e=i2().setGroupPositions;$4e.exports=function(t,r){var n=t._fullLayout,a=t._fullData,i=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,v;for(v=0;v{"use strict";var W7=xi(),Xm=Xt(),J4e=ea(),Ym=Wa().BADNUM,Akt=m2(),Mkt=kh().clearMinTextSize;eTe.exports=function(t,r,n,a){var i=t._fullLayout;Mkt("funnel",i),Skt(t,r,n,a),Ekt(t,r,n,a),Akt.plot(t,r,n,a,{mode:i.funnelmode,norm:i.funnelmode,gap:i.funnelgap,groupgap:i.funnelgroupgap})};function Skt(e,t,r,n){var a=t.xaxis,i=t.yaxis;Xm.makeTraceGroups(n,r,"trace bars").each(function(o){var s=W7.select(this),l=o[0].trace,u=Xm.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(Xm.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var v=f.size();f.each(function(g,p){if(!(p!==v-1&&!g.cNext)){var x=Q4e(g,a,i,c),_=x[0],y=x[1],C="";_[0]!==Ym&&y[0]!==Ym&&_[1]!==Ym&&y[1]!==Ym&&_[2]!==Ym&&y[2]!==Ym&&_[3]!==Ym&&y[3]!==Ym&&(c?C+="M"+_[0]+","+y[1]+"L"+_[2]+","+y[2]+"H"+_[3]+"L"+_[1]+","+y[1]+"Z":C+="M"+_[1]+","+y[1]+"L"+_[2]+","+y[3]+"V"+y[2]+"L"+_[1]+","+y[0]+"Z"),C===""&&(C="M0,0Z"),Xm.ensureSingle(W7.select(this),"path").attr("d",C).call(J4e.setClipUrl,t.layerClipId,e)}})})}function Ekt(e,t,r,n){var a=t.xaxis,i=t.yaxis;Xm.makeTraceGroups(n,r,"trace bars").each(function(o){var s=W7.select(this),l=o[0].trace,u=Xm.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(Xm.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var v=f.size();f.each(function(g,p){if(!(p!==v-1&&!g.cNext)){var x=Q4e(g,a,i,c),_=x[0],y=x[1],C="";_[3]!==void 0&&y[3]!==void 0&&(c?(C+="M"+_[0]+","+y[1]+"L"+_[2]+","+y[2],C+="M"+_[1]+","+y[1]+"L"+_[3]+","+y[2]):(C+="M"+_[1]+","+y[1]+"L"+_[2]+","+y[3],C+="M"+_[1]+","+y[0]+"L"+_[2]+","+y[2])),C===""&&(C="M0,0Z"),Xm.ensureSingle(W7.select(this),"path").attr("d",C).call(J4e.setClipUrl,t.layerClipId,e)}})})}function Q4e(e,t,r,n){var a=[],i=[],o=n?t:r,s=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=s.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=s.c2p(e.p1,!0),a[2]=o.c2p(e.nextS0,!0),i[2]=s.c2p(e.nextP0,!0),a[3]=o.c2p(e.nextS1,!0),i[3]=s.c2p(e.nextP1,!0),n?[a,i]:[i,a]}});var iTe=fe((ryr,nTe)=>{"use strict";var ZA=xi(),rTe=ea(),eH=ni(),kkt=Y1().DESELECTDIM,Ckt=_v(),Lkt=kh().resizeText,Pkt=Ckt.styleTextPoints;function Fkt(e,t,r){var n=r||ZA.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");Lkt(e,n,"funnel"),n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=ZA.select(this),o=a[0].trace;i.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;ZA.select(this).call(eH.fill,s.mc||l.color).call(eH.stroke,s.mlc||l.line.color).call(rTe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?kkt:1)}}),Pkt(i,o,e),i.selectAll(".regions").each(function(){ZA.select(this).selectAll("path").style("stroke-width",0).call(eH.fill,o.connector.fillcolor)}),i.selectAll(".lines").each(function(){var s=o.connector.line;rTe.lineGroupStyle(ZA.select(this).selectAll("path"),s.width,s.color,s.dash)})})}nTe.exports={style:Fkt}});var sTe=fe((nyr,oTe)=>{"use strict";var aTe=ni().opacity,Dkt=I3().hoverOnBars,tH=Xt().formatPercent;oTe.exports=function(t,r,n,a,i){var o=Dkt(t,r,n,a,i);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],v=u?"x":"y";o[v+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=tH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=tH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=tH(f.sumR,1);var g=f.hi||l.hoverinfo,p=[];if(g&&g!=="none"&&g!=="skip"){var x=g==="all",_=g.split("+"),y=function(C){return x||_.indexOf(C)!==-1};y("percent initial")&&p.push(o.percentInitialLabel+" of initial"),y("percent previous")&&p.push(o.percentPreviousLabel+" of previous"),y("percent total")&&p.push(o.percentTotalLabel+" of total")}return o.extraText=p.join("
"),o.color=Rkt(l,f),[o]}};function Rkt(e,t){var r=e.marker,n=t.mc||r.color,a=t.mlc||r.line.color,i=t.mlw||r.line.width;if(aTe(n))return n;if(aTe(a)&&i)return a}});var uTe=fe((iyr,lTe)=>{"use strict";lTe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var fTe=fe((ayr,cTe)=>{"use strict";cTe.exports={attributes:ZG(),layoutAttributes:$G(),supplyDefaults:JG().supplyDefaults,crossTraceDefaults:JG().crossTraceDefaults,supplyLayoutDefaults:V4e(),calc:X4e(),crossTraceCalc:K4e(),plot:tTe(),style:iTe().style,hoverPoints:sTe(),eventData:uTe(),selectPoints:z3(),moduleType:"trace",name:"funnel",basePlotModule:gu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var dTe=fe((oyr,hTe)=>{"use strict";hTe.exports=fTe()});var pTe=fe((syr,vTe)=>{"use strict";vTe.exports={eventDataKeys:["initial","delta","final"]}});var iH=fe((lyr,xTe)=>{"use strict";var qs=u1(),rH=Ol().line,Ikt=Ho(),gTe=pl().axisHoverFormat,{hovertemplateAttrs:zkt,texttemplateAttrs:qkt,templatefallbackAttrs:mTe}=Oo(),yTe=pTe(),ew=ta().extendFlat,Bkt=ni();function nH(e){return{marker:{color:ew({},qs.marker.color,{arrayOk:!1,editType:"style"}),line:{color:ew({},qs.marker.line.color,{arrayOk:!1,editType:"style"}),width:ew({},qs.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}xTe.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:qs.x,x0:qs.x0,dx:qs.dx,y:qs.y,y0:qs.y0,dy:qs.dy,xperiod:qs.xperiod,yperiod:qs.yperiod,xperiod0:qs.xperiod0,yperiod0:qs.yperiod0,xperiodalignment:qs.xperiodalignment,yperiodalignment:qs.yperiodalignment,xhoverformat:gTe("x"),yhoverformat:gTe("y"),hovertext:qs.hovertext,hovertemplate:zkt({},{keys:yTe.eventDataKeys}),hovertemplatefallback:mTe(),hoverinfo:ew({},Ikt.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:qkt({editType:"plot"},{keys:yTe.eventDataKeys.concat(["label"])}),texttemplatefallback:mTe({editType:"plot"}),text:qs.text,textposition:qs.textposition,insidetextanchor:qs.insidetextanchor,textangle:qs.textangle,textfont:qs.textfont,insidetextfont:qs.insidetextfont,outsidetextfont:qs.outsidetextfont,constraintext:qs.constraintext,cliponaxis:qs.cliponaxis,orientation:qs.orientation,offset:qs.offset,width:qs.width,increasing:nH("increasing"),decreasing:nH("decreasing"),totals:nH("intermediate sums and total"),connector:{line:{color:ew({},rH.color,{dflt:Bkt.defaultLine}),width:ew({},rH.width,{editType:"plot"}),dash:rH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:qs.offsetgroup,alignmentgroup:qs.alignmentgroup,zorder:qs.zorder}});var aH=fe((uyr,_Te)=>{"use strict";_Te.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"}}});var tw=fe((cyr,bTe)=>{"use strict";bTe.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var sH=fe((fyr,MTe)=>{"use strict";var wTe=Xt(),Okt=n2(),Nkt=z0().handleText,Ukt=r2(),Vkt=sp(),TTe=iH(),Gkt=ni(),ATe=tw(),Hkt=ATe.INCREASING.COLOR,jkt=ATe.DECREASING.COLOR,Wkt="#4499FF";function oH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",Gkt.defaultLine),e(t+".marker.line.width")}function Ykt(e,t,r,n){function a(u,c){return wTe.coerce(e,t,TTe,u,c)}var i=Ukt(e,t,n,a);if(!i){t.visible=!1;return}Vkt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("measure"),a("orientation",t.x&&!t.y?"h":"v"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var o=a("textposition");Nkt(e,t,n,a,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(a("texttemplate"),a("texttemplatefallback"),t.texttemplate||a("textinfo")),oH(a,"increasing",Hkt),oH(a,"decreasing",jkt),oH(a,"totals",Wkt);var s=a("connector.visible");if(s){a("connector.mode");var l=a("connector.line.width");l&&(a("connector.line.color"),a("connector.line.dash"))}a("zorder")}function Xkt(e,t){var r,n;function a(o){return wTe.coerce(n._input,n,TTe,o)}if(t.waterfallmode==="group")for(var i=0;i{"use strict";var Zkt=Xt(),$kt=aH();STe.exports=function(e,t,r){var n=!1;function a(s,l){return Zkt.coerce(e,t,$kt,s,l)}for(var i=0;i{"use strict";var kTe=Yi(),CTe=cp(),LTe=Xt().mergeArray,Kkt=P0(),PTe=Wa().BADNUM;function lH(e){return e==="a"||e==="absolute"}function uH(e){return e==="t"||e==="total"}FTe.exports=function(t,r){var n=kTe.getFromId(t,r.xaxis||"x"),a=kTe.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c;r.orientation==="h"?(i=n.makeCalcdata(r,"x"),s=a.makeCalcdata(r,"y"),l=CTe(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=CTe(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,i.length),v=new Array(f),g=0,p,x=!1,_=0;_{"use strict";var RTe=i2().setGroupPositions;ITe.exports=function(t,r){var n=t._fullLayout,a=t._fullData,i=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,v;for(v=0;v{"use strict";var qTe=xi(),Y7=Xt(),Jkt=ea(),rw=Wa().BADNUM,Qkt=m2(),e8t=kh().clearMinTextSize;BTe.exports=function(t,r,n,a){var i=t._fullLayout;e8t("waterfall",i),Qkt.plot(t,r,n,a,{mode:i.waterfallmode,norm:i.waterfallmode,gap:i.waterfallgap,groupgap:i.waterfallgroupgap}),t8t(t,r,n,a)};function t8t(e,t,r,n){var a=t.xaxis,i=t.yaxis;Y7.makeTraceGroups(n,r,"trace bars").each(function(o){var s=qTe.select(this),l=o[0].trace,u=Y7.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,v=u.selectAll("g.line").data(Y7.identity);v.enter().append("g").classed("line",!0),v.exit().remove();var g=v.size();v.each(function(p,x){if(!(x!==g-1&&!p.cNext)){var _=r8t(p,a,i,c),y=_[0],C=_[1],k="";y[0]!==rw&&C[0]!==rw&&y[1]!==rw&&C[1]!==rw&&(f==="spanning"&&!p.isSum&&x>0&&(c?k+="M"+y[0]+","+C[1]+"V"+C[0]:k+="M"+y[1]+","+C[0]+"H"+y[0]),f!=="between"&&(p.isSum||x{"use strict";var X7=xi(),NTe=ea(),UTe=ni(),n8t=Y1().DESELECTDIM,i8t=_v(),a8t=kh().resizeText,o8t=i8t.styleTextPoints;function s8t(e,t,r){var n=r||X7.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");a8t(e,n,"waterfall"),n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=X7.select(this),o=a[0].trace;i.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;X7.select(this).call(UTe.fill,l.color).call(UTe.stroke,l.line.color).call(NTe.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?n8t:1)}}),o8t(i,o,e),i.selectAll(".lines").each(function(){var s=o.connector.line;NTe.lineGroupStyle(X7.select(this).selectAll("path"),s.width,s.color,s.dash)})})}VTe.exports={style:s8t}});var XTe=fe((myr,YTe)=>{"use strict";var l8t=Yi().hoverLabelText,HTe=ni().opacity,u8t=I3().hoverOnBars,jTe=tw(),WTe={increasing:jTe.INCREASING.SYMBOL,decreasing:jTe.DECREASING.SYMBOL};YTe.exports=function(t,r,n,a,i){var o=u8t(t,r,n,a,i);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function v(w){return l8t(f,w,l[c+"hoverformat"])}var g=o.index,p=s[g],x=p.isSum?p.b+p.s:p.rawS;o.initial=p.b+p.s-x,o.delta=x,o.final=o.initial+o.delta;var _=v(Math.abs(o.delta));o.deltaLabel=x<0?"("+_+")":_,o.finalLabel=v(o.final),o.initialLabel=v(o.initial);var y=p.hi||l.hoverinfo,C=[];if(y&&y!=="none"&&y!=="skip"){var k=y==="all",S=y.split("+"),L=function(w){return k||S.indexOf(w)!==-1};p.isSum||(L("final")&&(u?!L("x"):!L("y"))&&C.push(o.finalLabel),L("delta")&&(x<0?C.push(o.deltaLabel+" "+WTe.decreasing):C.push(o.deltaLabel+" "+WTe.increasing)),L("initial")&&C.push("Initial: "+o.initialLabel))}return C.length&&(o.extraText=C.join("
")),o.color=c8t(l,p),[o]};function c8t(e,t){var r=e[t.dir].marker,n=r.color,a=r.line.color,i=r.line.width;if(HTe(n))return n;if(HTe(a)&&i)return a}});var $Te=fe((yyr,ZTe)=>{"use strict";ZTe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var JTe=fe((xyr,KTe)=>{"use strict";KTe.exports={attributes:iH(),layoutAttributes:aH(),supplyDefaults:sH().supplyDefaults,crossTraceDefaults:sH().crossTraceDefaults,supplyLayoutDefaults:ETe(),calc:DTe(),crossTraceCalc:zTe(),plot:OTe(),style:GTe().style,hoverPoints:XTe(),eventData:$Te(),selectPoints:z3(),moduleType:"trace",name:"waterfall",basePlotModule:gu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var eAe=fe((_yr,QTe)=>{"use strict";QTe.exports=JTe()});var nw=fe((byr,tAe)=>{"use strict";tAe.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var cH={};zp(cH,{default:()=>h8t});var rAe,nAe,Z7,iAe,aAe,oAe,sAe,lAe,f8t,h8t,fH=Co(()=>{"use strict";rAe=$0(ta()),nAe=$0(Ho()),Z7=$0(Oo()),iAe=$0(Ol()),aAe=$0(nw()),oAe=["rgb","rgba","rgba256","hsl","hsla"],sAe=[],lAe=[];for(let e of oAe){let t=aAe.colormodel[e];sAe.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),lAe.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}f8t={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:oAe,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",sAe.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",lAe.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,rAe.extendFlat)({},nAe.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,Z7.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,Z7.templatefallbackAttrs)(),zorder:iAe.zorder},h8t=f8t});var fAe=fe((wyr,cAe)=>{"use strict";var d8t=Xt(),v8t=(fH(),Gs(cH)).default,uAe=nw(),p8t=ag().IMAGE_URL_PREFIX;cAe.exports=function(t,r){function n(o,s){return d8t.coerce(t,r,v8t,o,s)}n("source"),r.source&&!r.source.match(p8t)&&delete r.source,r._hasSource=!!r.source;var a=n("z");if(r._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var i;r._hasZ?(n("colormodel","rgb"),i=uAe.colormodel[r.colormodel],n("zmin",i.zminDflt||i.min),n("zmax",i.zmaxDflt||i.max)):r._hasSource&&(r.colormodel="rgba256",i=uAe.colormodel[r.colormodel],r.zmin=i.zminDflt,r.zmax=i.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),r._length=null,n("zorder")}});var gg=fe((Tyr,hH)=>{typeof Object.create=="function"?hH.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:hH.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var dH=fe((Ayr,hAe)=>{hAe.exports=Mx().EventEmitter});var pAe=fe($7=>{"use strict";$7.byteLength=m8t;$7.toByteArray=x8t;$7.fromByteArray=w8t;var p1=[],Ev=[],g8t=typeof Uint8Array!="undefined"?Uint8Array:Array,vH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(T2=0,dAe=vH.length;T20)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function m8t(e){var t=vAe(e),r=t[0],n=t[1];return(r+n)*3/4-n}function y8t(e,t,r){return(t+r)*3/4-r}function x8t(e){var t,r=vAe(e),n=r[0],a=r[1],i=new g8t(y8t(e,n,a)),o=0,s=a>0?n-4:n,l;for(l=0;l>16&255,i[o++]=t>>8&255,i[o++]=t&255;return a===2&&(t=Ev[e.charCodeAt(l)]<<2|Ev[e.charCodeAt(l+1)]>>4,i[o++]=t&255),a===1&&(t=Ev[e.charCodeAt(l)]<<10|Ev[e.charCodeAt(l+1)]<<4|Ev[e.charCodeAt(l+2)]>>2,i[o++]=t>>8&255,i[o++]=t&255),i}function _8t(e){return p1[e>>18&63]+p1[e>>12&63]+p1[e>>6&63]+p1[e&63]}function b8t(e,t,r){for(var n,a=[],i=t;is?s:o+i));return n===1?(t=e[r-1],a.push(p1[t>>2]+p1[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],a.push(p1[t>>10]+p1[t>>4&63]+p1[t<<2&63]+"=")),a.join("")}});var gAe=fe(pH=>{pH.read=function(e,t,r,n,a){var i,o,s=a*8-n-1,l=(1<>1,c=-7,f=r?a-1:0,v=r?-1:1,g=e[t+f];for(f+=v,i=g&(1<<-c)-1,g>>=-c,c+=s;c>0;i=i*256+e[t+f],f+=v,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=v,c-=8);if(i===0)i=1-u;else{if(i===l)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,n),i=i-u}return(g?-1:1)*o*Math.pow(2,i-n)};pH.write=function(e,t,r,n,a,i){var o,s,l,u=i*8-a-1,c=(1<>1,v=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:i-1,p=n?1:-1,x=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=v/l:t+=v*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,a),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;e[r+g]=s&255,g+=p,s/=256,a-=8);for(o=o<0;e[r+g]=o&255,g+=p,o/=256,u-=8);e[r+g-p]|=x*128}});var M2=fe(sw=>{"use strict";var gH=pAe(),aw=gAe(),mAe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;sw.Buffer=Bn;sw.SlowBuffer=k8t;sw.INSPECT_MAX_BYTES=50;var K7=2147483647;sw.kMaxLength=K7;Bn.TYPED_ARRAY_SUPPORT=T8t();!Bn.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function T8t(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(Bn.prototype,"parent",{enumerable:!0,get:function(){if(Bn.isBuffer(this))return this.buffer}});Object.defineProperty(Bn.prototype,"offset",{enumerable:!0,get:function(){if(Bn.isBuffer(this))return this.byteOffset}});function mg(e){if(e>K7)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Bn.prototype),t}function Bn(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _H(e)}return bAe(e,t,r)}Bn.poolSize=8192;function bAe(e,t,r){if(typeof e=="string")return M8t(e,t);if(ArrayBuffer.isView(e))return S8t(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(g1(e,ArrayBuffer)||e&&g1(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(g1(e,SharedArrayBuffer)||e&&g1(e.buffer,SharedArrayBuffer)))return yH(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return Bn.from(n,t,r);let a=E8t(e);if(a)return a;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Bn.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Bn.from=function(e,t,r){return bAe(e,t,r)};Object.setPrototypeOf(Bn.prototype,Uint8Array.prototype);Object.setPrototypeOf(Bn,Uint8Array);function wAe(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function A8t(e,t,r){return wAe(e),e<=0?mg(e):t!==void 0?typeof r=="string"?mg(e).fill(t,r):mg(e).fill(t):mg(e)}Bn.alloc=function(e,t,r){return A8t(e,t,r)};function _H(e){return wAe(e),mg(e<0?0:bH(e)|0)}Bn.allocUnsafe=function(e){return _H(e)};Bn.allocUnsafeSlow=function(e){return _H(e)};function M8t(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Bn.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=TAe(e,t)|0,n=mg(r),a=n.write(e,t);return a!==r&&(n=n.slice(0,a)),n}function mH(e){let t=e.length<0?0:bH(e.length)|0,r=mg(t);for(let n=0;n=K7)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K7.toString(16)+" bytes");return e|0}function k8t(e){return+e!=e&&(e=0),Bn.alloc(+e)}Bn.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Bn.prototype};Bn.compare=function(t,r){if(g1(t,Uint8Array)&&(t=Bn.from(t,t.offset,t.byteLength)),g1(r,Uint8Array)&&(r=Bn.from(r,r.offset,r.byteLength)),!Bn.isBuffer(t)||!Bn.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,a=r.length;for(let i=0,o=Math.min(n,a);ia.length?(Bn.isBuffer(o)||(o=Bn.from(o)),o.copy(a,i)):Uint8Array.prototype.set.call(a,o,i);else if(Bn.isBuffer(o))o.copy(a,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return a};function TAe(e,t){if(Bn.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||g1(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return xH(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return FAe(e).length;default:if(a)return n?-1:xH(e).length;t=(""+t).toLowerCase(),a=!0}}Bn.byteLength=TAe;function C8t(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return O8t(this,t,r);case"utf8":case"utf-8":return MAe(this,t,r);case"ascii":return q8t(this,t,r);case"latin1":case"binary":return B8t(this,t,r);case"base64":return I8t(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N8t(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Bn.prototype._isBuffer=!0;function A2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Bn.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};mAe&&(Bn.prototype[mAe]=Bn.prototype.inspect);Bn.prototype.compare=function(t,r,n,a,i){if(g1(t,Uint8Array)&&(t=Bn.from(t,t.offset,t.byteLength)),!Bn.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),a===void 0&&(a=0),i===void 0&&(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(r>>>=0,n>>>=0,a>>>=0,i>>>=0,this===t)return 0;let o=i-a,s=n-r,l=Math.min(o,s),u=this.slice(a,i),c=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,TH(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0)if(a)r=0;else return-1;if(typeof t=="string"&&(t=Bn.from(t,n)),Bn.isBuffer(t))return t.length===0?-1:yAe(e,t,r,n,a);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):yAe(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function yAe(e,t,r,n,a){let i=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,o/=2,s/=2,r/=2}function l(c,f){return i===1?c[f]:c.readUInt16BE(f*i)}let u;if(a){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fa&&(n=a)):n=a;let i=t.length;n>i/2&&(n=i/2);let o;for(o=0;o>>0,isFinite(n)?(n=n>>>0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((n===void 0||n>i)&&(n=i),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let o=!1;for(;;)switch(a){case"hex":return L8t(this,t,r,n);case"utf8":case"utf-8":return P8t(this,t,r,n);case"ascii":case"latin1":case"binary":return F8t(this,t,r,n);case"base64":return D8t(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R8t(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),o=!0}};Bn.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I8t(e,t,r){return t===0&&r===e.length?gH.fromByteArray(e):gH.fromByteArray(e.slice(t,r))}function MAe(e,t,r){r=Math.min(e.length,r);let n=[],a=t;for(;a239?4:i>223?3:i>191?2:1;if(a+s<=r){let l,u,c,f;switch(s){case 1:i<128&&(o=i);break;case 2:l=e[a+1],(l&192)===128&&(f=(i&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[a+1],u=e[a+2],(l&192)===128&&(u&192)===128&&(f=(i&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[a+1],u=e[a+2],c=e[a+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(i&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),a+=s}return z8t(n)}var xAe=4096;function z8t(e){let t=e.length;if(t<=xAe)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let a="";for(let i=t;in&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}Bn.prototype.readUintLE=Bn.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t],i=1,o=0;for(;++o>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t+--r],i=1;for(;r>0&&(i*=256);)a+=this[t+--r]*i;return a};Bn.prototype.readUint8=Bn.prototype.readUInt8=function(t,r){return t=t>>>0,r||Kf(t,1,this.length),this[t]};Bn.prototype.readUint16LE=Bn.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Kf(t,2,this.length),this[t]|this[t+1]<<8};Bn.prototype.readUint16BE=Bn.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Kf(t,2,this.length),this[t]<<8|this[t+1]};Bn.prototype.readUint32LE=Bn.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Bn.prototype.readUint32BE=Bn.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Bn.prototype.readBigUInt64LE=Zm(function(t){t=t>>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(a)+(BigInt(i)<>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(a)<>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t],i=1,o=0;for(;++o=i&&(a-=Math.pow(2,8*r)),a};Bn.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||Kf(t,r,this.length);let a=r,i=1,o=this[t+--a];for(;a>0&&(i*=256);)o+=this[t+--a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};Bn.prototype.readInt8=function(t,r){return t=t>>>0,r||Kf(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Bn.prototype.readInt16LE=function(t,r){t=t>>>0,r||Kf(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Bn.prototype.readInt16BE=function(t,r){t=t>>>0,r||Kf(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Bn.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Bn.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Bn.prototype.readBigInt64LE=Zm(function(t){t=t>>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(a)<>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(a)<>>0,r||Kf(t,4,this.length),aw.read(this,t,!0,23,4)};Bn.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),aw.read(this,t,!1,23,4)};Bn.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Kf(t,8,this.length),aw.read(this,t,!0,52,8)};Bn.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Kf(t,8,this.length),aw.read(this,t,!1,52,8)};function s0(e,t,r,n,a,i){if(!Bn.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}Bn.prototype.writeUintLE=Bn.prototype.writeUIntLE=function(t,r,n,a){if(t=+t,r=r>>>0,n=n>>>0,!a){let s=Math.pow(2,8*n)-1;s0(this,t,r,n,s,0)}let i=1,o=0;for(this[r]=t&255;++o>>0,n=n>>>0,!a){let s=Math.pow(2,8*n)-1;s0(this,t,r,n,s,0)}let i=n-1,o=1;for(this[r+i]=t&255;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+n};Bn.prototype.writeUint8=Bn.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,1,255,0),this[r]=t&255,r+1};Bn.prototype.writeUint16LE=Bn.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Bn.prototype.writeUint16BE=Bn.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Bn.prototype.writeUint32LE=Bn.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};Bn.prototype.writeUint32BE=Bn.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function SAe(e,t,r,n,a){PAe(t,n,a,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function EAe(e,t,r,n,a){PAe(t,n,a,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}Bn.prototype.writeBigUInt64LE=Zm(function(t,r=0){return SAe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Bn.prototype.writeBigUInt64BE=Zm(function(t,r=0){return EAe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Bn.prototype.writeIntLE=function(t,r,n,a){if(t=+t,r=r>>>0,!a){let l=Math.pow(2,8*n-1);s0(this,t,r,n,l-1,-l)}let i=0,o=1,s=0;for(this[r]=t&255;++i>0)-s&255;return r+n};Bn.prototype.writeIntBE=function(t,r,n,a){if(t=+t,r=r>>>0,!a){let l=Math.pow(2,8*n-1);s0(this,t,r,n,l-1,-l)}let i=n-1,o=1,s=0;for(this[r+i]=t&255;--i>=0&&(o*=256);)t<0&&s===0&&this[r+i+1]!==0&&(s=1),this[r+i]=(t/o>>0)-s&255;return r+n};Bn.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Bn.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Bn.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Bn.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};Bn.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};Bn.prototype.writeBigInt64LE=Zm(function(t,r=0){return SAe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Bn.prototype.writeBigInt64BE=Zm(function(t,r=0){return EAe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function kAe(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function CAe(e,t,r,n,a){return t=+t,r=r>>>0,a||kAe(e,t,r,4,34028234663852886e22,-34028234663852886e22),aw.write(e,t,r,n,23,4),r+4}Bn.prototype.writeFloatLE=function(t,r,n){return CAe(this,t,r,!0,n)};Bn.prototype.writeFloatBE=function(t,r,n){return CAe(this,t,r,!1,n)};function LAe(e,t,r,n,a){return t=+t,r=r>>>0,a||kAe(e,t,r,8,17976931348623157e292,-17976931348623157e292),aw.write(e,t,r,n,52,8),r+8}Bn.prototype.writeDoubleLE=function(t,r,n){return LAe(this,t,r,!0,n)};Bn.prototype.writeDoubleBE=function(t,r,n){return LAe(this,t,r,!1,n)};Bn.prototype.copy=function(t,r,n,a){if(!Bn.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!a&&a!==0&&(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,n=n===void 0?this.length:n>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i2**32?a=_Ae(String(r)):typeof r=="bigint"&&(a=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(a=_Ae(a)),a+="n"),n+=` It must be ${t}. Received ${a}`,n},RangeError);function _Ae(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function U8t(e,t,r){ow(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&$A(t,e.length-(r+1))}function PAe(e,t,r,n,a,i){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:s=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new iw.ERR_OUT_OF_RANGE("value",s,e)}U8t(n,a,i)}function ow(e,t){if(typeof e!="number")throw new iw.ERR_INVALID_ARG_TYPE(t,"number",e)}function $A(e,t,r){throw Math.floor(e)!==e?(ow(e,r),new iw.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new iw.ERR_BUFFER_OUT_OF_BOUNDS:new iw.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var V8t=/[^+/0-9A-Za-z-_]/g;function G8t(e){if(e=e.split("=")[0],e=e.trim().replace(V8t,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function xH(e,t){t=t||1/0;let r,n=e.length,a=null,i=[];for(let o=0;o55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=(a-55296<<10|r-56320)+65536}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function H8t(e){let t=[];for(let r=0;r>8,a=r%256,i.push(a),i.push(n);return i}function FAe(e){return gH.toByteArray(G8t(e))}function J7(e,t,r,n){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function g1(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function TH(e){return e!==e}var W8t=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let a=0;a<16;++a)t[n+a]=e[r]+e[a]}return t})();function Zm(e){return typeof BigInt=="undefined"?Y8t:e}function Y8t(){throw new Error("BigInt not supported")}});var Q7=fe((Cyr,DAe)=>{"use strict";DAe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;t[r]=a;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==a||s.enumerable!==!0)return!1}return!0}});var KA=fe((Lyr,RAe)=>{"use strict";var X8t=Q7();RAe.exports=function(){return X8t()&&!!Symbol.toStringTag}});var eL=fe((Pyr,IAe)=>{"use strict";IAe.exports=Object});var qAe=fe((Fyr,zAe)=>{"use strict";zAe.exports=Error});var OAe=fe((Dyr,BAe)=>{"use strict";BAe.exports=EvalError});var UAe=fe((Ryr,NAe)=>{"use strict";NAe.exports=RangeError});var GAe=fe((Iyr,VAe)=>{"use strict";VAe.exports=ReferenceError});var AH=fe((zyr,HAe)=>{"use strict";HAe.exports=SyntaxError});var lw=fe((qyr,jAe)=>{"use strict";jAe.exports=TypeError});var YAe=fe((Byr,WAe)=>{"use strict";WAe.exports=URIError});var ZAe=fe((Oyr,XAe)=>{"use strict";XAe.exports=Math.abs});var KAe=fe((Nyr,$Ae)=>{"use strict";$Ae.exports=Math.floor});var QAe=fe((Uyr,JAe)=>{"use strict";JAe.exports=Math.max});var t6e=fe((Vyr,e6e)=>{"use strict";e6e.exports=Math.min});var n6e=fe((Gyr,r6e)=>{"use strict";r6e.exports=Math.pow});var a6e=fe((Hyr,i6e)=>{"use strict";i6e.exports=Math.round});var s6e=fe((jyr,o6e)=>{"use strict";o6e.exports=Number.isNaN||function(t){return t!==t}});var u6e=fe((Wyr,l6e)=>{"use strict";var Z8t=s6e();l6e.exports=function(t){return Z8t(t)||t===0?t:t<0?-1:1}});var f6e=fe((Yyr,c6e)=>{"use strict";c6e.exports=Object.getOwnPropertyDescriptor});var S2=fe((Xyr,h6e)=>{"use strict";var tL=f6e();if(tL)try{tL([],"length")}catch(e){tL=null}h6e.exports=tL});var JA=fe((Zyr,d6e)=>{"use strict";var rL=Object.defineProperty||!1;if(rL)try{rL({},"a",{value:1})}catch(e){rL=!1}d6e.exports=rL});var g6e=fe(($yr,p6e)=>{"use strict";var v6e=typeof Symbol!="undefined"&&Symbol,$8t=Q7();p6e.exports=function(){return typeof v6e!="function"||typeof Symbol!="function"||typeof v6e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$8t()}});var MH=fe((Kyr,m6e)=>{"use strict";m6e.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var SH=fe((Jyr,y6e)=>{"use strict";var K8t=eL();y6e.exports=K8t.getPrototypeOf||null});var b6e=fe((Qyr,_6e)=>{"use strict";var J8t="Function.prototype.bind called on incompatible ",Q8t=Object.prototype.toString,eCt=Math.max,tCt="[object Function]",x6e=function(t,r){for(var n=[],a=0;a{"use strict";var iCt=b6e();w6e.exports=Function.prototype.bind||iCt});var nL=fe((txr,T6e)=>{"use strict";T6e.exports=Function.prototype.call});var iL=fe((rxr,A6e)=>{"use strict";A6e.exports=Function.prototype.apply});var S6e=fe((nxr,M6e)=>{"use strict";M6e.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var EH=fe((ixr,E6e)=>{"use strict";var aCt=uw(),oCt=iL(),sCt=nL(),lCt=S6e();E6e.exports=lCt||aCt.call(sCt,oCt)});var aL=fe((axr,k6e)=>{"use strict";var uCt=uw(),cCt=lw(),fCt=nL(),hCt=EH();k6e.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new cCt("a function is required");return hCt(uCt,fCt,t)}});var R6e=fe((oxr,D6e)=>{"use strict";var dCt=aL(),C6e=S2(),P6e;try{P6e=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var kH=!!P6e&&C6e&&C6e(Object.prototype,"__proto__"),F6e=Object,L6e=F6e.getPrototypeOf;D6e.exports=kH&&typeof kH.get=="function"?dCt([kH.get]):typeof L6e=="function"?function(t){return L6e(t==null?t:F6e(t))}:!1});var oL=fe((sxr,B6e)=>{"use strict";var I6e=MH(),z6e=SH(),q6e=R6e();B6e.exports=I6e?function(t){return I6e(t)}:z6e?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return z6e(t)}:q6e?function(t){return q6e(t)}:null});var CH=fe((lxr,O6e)=>{"use strict";var vCt=Function.prototype.call,pCt=Object.prototype.hasOwnProperty,gCt=uw();O6e.exports=gCt.call(vCt,pCt)});var uL=fe((uxr,j6e)=>{"use strict";var Jo,mCt=eL(),yCt=qAe(),xCt=OAe(),_Ct=UAe(),bCt=GAe(),dw=AH(),hw=lw(),wCt=YAe(),TCt=ZAe(),ACt=KAe(),MCt=QAe(),SCt=t6e(),ECt=n6e(),kCt=a6e(),CCt=u6e(),G6e=Function,LH=function(e){try{return G6e('"use strict"; return ('+e+").constructor;")()}catch(t){}},QA=S2(),LCt=JA(),PH=function(){throw new hw},PCt=QA?(function(){try{return arguments.callee,PH}catch(e){try{return QA(arguments,"callee").get}catch(t){return PH}}})():PH,cw=g6e()(),Jf=oL(),FCt=SH(),DCt=MH(),H6e=iL(),e6=nL(),fw={},RCt=typeof Uint8Array=="undefined"||!Jf?Jo:Jf(Uint8Array),E2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Jo:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Jo:ArrayBuffer,"%ArrayIteratorPrototype%":cw&&Jf?Jf([][Symbol.iterator]()):Jo,"%AsyncFromSyncIteratorPrototype%":Jo,"%AsyncFunction%":fw,"%AsyncGenerator%":fw,"%AsyncGeneratorFunction%":fw,"%AsyncIteratorPrototype%":fw,"%Atomics%":typeof Atomics=="undefined"?Jo:Atomics,"%BigInt%":typeof BigInt=="undefined"?Jo:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Jo:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Jo:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Jo:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":yCt,"%eval%":eval,"%EvalError%":xCt,"%Float16Array%":typeof Float16Array=="undefined"?Jo:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?Jo:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Jo:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Jo:FinalizationRegistry,"%Function%":G6e,"%GeneratorFunction%":fw,"%Int8Array%":typeof Int8Array=="undefined"?Jo:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Jo:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Jo:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":cw&&Jf?Jf(Jf([][Symbol.iterator]())):Jo,"%JSON%":typeof JSON=="object"?JSON:Jo,"%Map%":typeof Map=="undefined"?Jo:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!cw||!Jf?Jo:Jf(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":mCt,"%Object.getOwnPropertyDescriptor%":QA,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Jo:Promise,"%Proxy%":typeof Proxy=="undefined"?Jo:Proxy,"%RangeError%":_Ct,"%ReferenceError%":bCt,"%Reflect%":typeof Reflect=="undefined"?Jo:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Jo:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!cw||!Jf?Jo:Jf(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Jo:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":cw&&Jf?Jf(""[Symbol.iterator]()):Jo,"%Symbol%":cw?Symbol:Jo,"%SyntaxError%":dw,"%ThrowTypeError%":PCt,"%TypedArray%":RCt,"%TypeError%":hw,"%Uint8Array%":typeof Uint8Array=="undefined"?Jo:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Jo:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Jo:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Jo:Uint32Array,"%URIError%":wCt,"%WeakMap%":typeof WeakMap=="undefined"?Jo:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Jo:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Jo:WeakSet,"%Function.prototype.call%":e6,"%Function.prototype.apply%":H6e,"%Object.defineProperty%":LCt,"%Object.getPrototypeOf%":FCt,"%Math.abs%":TCt,"%Math.floor%":ACt,"%Math.max%":MCt,"%Math.min%":SCt,"%Math.pow%":ECt,"%Math.round%":kCt,"%Math.sign%":CCt,"%Reflect.getPrototypeOf%":DCt};if(Jf)try{null.error}catch(e){N6e=Jf(Jf(e)),E2["%Error.prototype%"]=N6e}var N6e,ICt=function e(t){var r;if(t==="%AsyncFunction%")r=LH("async function () {}");else if(t==="%GeneratorFunction%")r=LH("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=LH("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&Jf&&(r=Jf(a.prototype))}return E2[t]=r,r},U6e={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},t6=uw(),sL=CH(),zCt=t6.call(e6,Array.prototype.concat),qCt=t6.call(H6e,Array.prototype.splice),V6e=t6.call(e6,String.prototype.replace),lL=t6.call(e6,String.prototype.slice),BCt=t6.call(e6,RegExp.prototype.exec),OCt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,NCt=/\\(\\)?/g,UCt=function(t){var r=lL(t,0,1),n=lL(t,-1);if(r==="%"&&n!=="%")throw new dw("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new dw("invalid intrinsic syntax, expected opening `%`");var a=[];return V6e(t,OCt,function(i,o,s,l){a[a.length]=s?V6e(l,NCt,"$1"):o||i}),a},VCt=function(t,r){var n=t,a;if(sL(U6e,n)&&(a=U6e[n],n="%"+a[0]+"%"),sL(E2,n)){var i=E2[n];if(i===fw&&(i=ICt(n)),typeof i=="undefined"&&!r)throw new hw("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new dw("intrinsic "+t+" does not exist!")};j6e.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new hw("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new hw('"allowMissing" argument must be a boolean');if(BCt(/^%?[^%]*%?$/,t)===null)throw new dw("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=UCt(t),a=n.length>0?n[0]:"",i=VCt("%"+a+"%",r),o=i.name,s=i.value,l=!1,u=i.alias;u&&(a=u[0],qCt(n,zCt([0,1],u)));for(var c=1,f=!0;c=n.length){var x=QA(s,v);f=!!x,f&&"get"in x&&!("originalValue"in x.get)?s=x.get:s=s[v]}else f=sL(s,v),s=s[v];f&&!l&&(E2[o]=s)}}return s}});var k2=fe((cxr,X6e)=>{"use strict";var W6e=uL(),Y6e=aL(),GCt=Y6e([W6e("%String.prototype.indexOf%")]);X6e.exports=function(t,r){var n=W6e(t,!!r);return typeof n=="function"&&GCt(t,".prototype.")>-1?Y6e([n]):n}});var K6e=fe((fxr,$6e)=>{"use strict";var HCt=KA()(),jCt=k2(),FH=jCt("Object.prototype.toString"),cL=function(t){return HCt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:FH(t)==="[object Arguments]"},Z6e=function(t){return cL(t)?!0:t!==null&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&t.length>=0&&FH(t)!=="[object Array]"&&"callee"in t&&FH(t.callee)==="[object Function]"},WCt=(function(){return cL(arguments)})();cL.isLegacyArguments=Z6e;$6e.exports=WCt?cL:Z6e});var nMe=fe((hxr,rMe)=>{"use strict";var J6e=k2(),YCt=KA()(),XCt=CH(),ZCt=S2(),IH;YCt?(Q6e=J6e("RegExp.prototype.exec"),DH={},fL=function(){throw DH},RH={toString:fL,valueOf:fL},typeof Symbol.toPrimitive=="symbol"&&(RH[Symbol.toPrimitive]=fL),IH=function(t){if(!t||typeof t!="object")return!1;var r=ZCt(t,"lastIndex"),n=r&&XCt(r,"value");if(!n)return!1;try{Q6e(t,RH)}catch(a){return a===DH}}):(eMe=J6e("Object.prototype.toString"),tMe="[object RegExp]",IH=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:eMe(t)===tMe});var Q6e,DH,fL,RH,eMe,tMe;rMe.exports=IH});var aMe=fe((dxr,iMe)=>{"use strict";var $Ct=k2(),KCt=nMe(),JCt=$Ct("RegExp.prototype.exec"),QCt=lw();iMe.exports=function(t){if(!KCt(t))throw new QCt("`regex` must be a RegExp");return function(n){return JCt(t,n)!==null}}});var sMe=fe((vxr,oMe)=>{"use strict";var e7t=function*(){}.constructor;oMe.exports=()=>e7t});var fMe=fe((pxr,cMe)=>{"use strict";var uMe=k2(),t7t=aMe(),r7t=t7t(/^\s*(?:function)?\*/),n7t=KA()(),lMe=oL(),i7t=uMe("Object.prototype.toString"),a7t=uMe("Function.prototype.toString"),o7t=sMe();cMe.exports=function(t){if(typeof t!="function")return!1;if(r7t(a7t(t)))return!0;if(!n7t){var r=i7t(t);return r==="[object GeneratorFunction]"}if(!lMe)return!1;var n=o7t();return n&&lMe(t)===n.prototype}});var pMe=fe((gxr,vMe)=>{"use strict";var dMe=Function.prototype.toString,vw=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,qH,hL;if(typeof vw=="function"&&typeof Object.defineProperty=="function")try{qH=Object.defineProperty({},"length",{get:function(){throw hL}}),hL={},vw(function(){throw 42},null,qH)}catch(e){e!==hL&&(vw=null)}else vw=null;var s7t=/^\s*class\b/,BH=function(t){try{var r=dMe.call(t);return s7t.test(r)}catch(n){return!1}},zH=function(t){try{return BH(t)?!1:(dMe.call(t),!0)}catch(r){return!1}},dL=Object.prototype.toString,l7t="[object Object]",u7t="[object Function]",c7t="[object GeneratorFunction]",f7t="[object HTMLAllCollection]",h7t="[object HTML document.all class]",d7t="[object HTMLCollection]",v7t=typeof Symbol=="function"&&!!Symbol.toStringTag,p7t=!(0 in[,]),OH=function(){return!1};typeof document=="object"&&(hMe=document.all,dL.call(hMe)===dL.call(document.all)&&(OH=function(t){if((p7t||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=dL.call(t);return(r===f7t||r===h7t||r===d7t||r===l7t)&&t("")==null}catch(n){}return!1}));var hMe;vMe.exports=vw?function(t){if(OH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{vw(t,null,qH)}catch(r){if(r!==hL)return!1}return!BH(t)&&zH(t)}:function(t){if(OH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(v7t)return zH(t);if(BH(t))return!1;var r=dL.call(t);return r!==u7t&&r!==c7t&&!/^\[object HTML/.test(r)?!1:zH(t)}});var yMe=fe((mxr,mMe)=>{"use strict";var g7t=pMe(),m7t=Object.prototype.toString,gMe=Object.prototype.hasOwnProperty,y7t=function(t,r,n){for(var a=0,i=t.length;a=3&&(a=n),b7t(t)?y7t(t,r,a):typeof t=="string"?x7t(t,r,a):_7t(t,r,a)}});var _Me=fe((yxr,xMe)=>{"use strict";xMe.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var wMe=fe((xxr,bMe)=>{"use strict";var NH=_Me(),w7t=typeof globalThis=="undefined"?window:globalThis;bMe.exports=function(){for(var t=[],r=0;r{"use strict";var TMe=JA(),T7t=AH(),pw=lw(),AMe=S2();MMe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new pw("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new pw("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new pw("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new pw("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new pw("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new pw("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!AMe&&AMe(t,r);if(TMe)TMe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:i===null&&l?l.writable:!i});else if(s||!a&&!i&&!o)t[r]=n;else throw new T7t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var GH=fe((bxr,EMe)=>{"use strict";var VH=JA(),SMe=function(){return!!VH};SMe.hasArrayLengthDefineBug=function(){if(!VH)return null;try{return VH([],"length",{value:1}).length!==1}catch(t){return!0}};EMe.exports=SMe});var FMe=fe((wxr,PMe)=>{"use strict";var A7t=uL(),kMe=UH(),M7t=GH()(),CMe=S2(),LMe=lw(),S7t=A7t("%Math.floor%");PMe.exports=function(t,r){if(typeof t!="function")throw new LMe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||S7t(r)!==r)throw new LMe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,i=!0;if("length"in t&&CMe){var o=CMe(t,"length");o&&!o.configurable&&(a=!1),o&&!o.writable&&(i=!1)}return(a||i||!n)&&(M7t?kMe(t,"length",r,!0,!0):kMe(t,"length",r)),t}});var RMe=fe((Txr,DMe)=>{"use strict";var E7t=uw(),k7t=iL(),C7t=EH();DMe.exports=function(){return C7t(E7t,k7t,arguments)}});var r6=fe((Axr,vL)=>{"use strict";var L7t=FMe(),IMe=JA(),P7t=aL(),zMe=RMe();vL.exports=function(t){var r=P7t(arguments),n=1+t.length-(arguments.length-1);return L7t(r,n>0?n:0,!0)};IMe?IMe(vL.exports,"apply",{value:zMe}):vL.exports.apply=zMe});var YH=fe((Mxr,NMe)=>{"use strict";var mL=yMe(),F7t=wMe(),qMe=r6(),jH=k2(),gL=S2(),pL=oL(),D7t=jH("Object.prototype.toString"),OMe=KA()(),BMe=typeof globalThis=="undefined"?window:globalThis,HH=F7t(),WH=jH("String.prototype.slice"),R7t=jH("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}NMe.exports=function(t){if(!t||typeof t!="object")return!1;if(!OMe){var r=WH(D7t(t),8,-1);return q7t(r)?r:r!=="Object"?!1:z7t(t)}return gL?I7t(t):null}});var VMe=fe((Sxr,UMe)=>{"use strict";var B7t=YH();UMe.exports=function(t){return!!B7t(t)}});var $H=fe(Qo=>{"use strict";var O7t=K6e(),N7t=fMe(),bp=YH(),GMe=VMe();function gw(e){return e.call.bind(e)}var HMe=typeof BigInt!="undefined",jMe=typeof Symbol!="undefined",kv=gw(Object.prototype.toString),U7t=gw(Number.prototype.valueOf),V7t=gw(String.prototype.valueOf),G7t=gw(Boolean.prototype.valueOf);HMe&&(WMe=gw(BigInt.prototype.valueOf));var WMe;jMe&&(YMe=gw(Symbol.prototype.valueOf));var YMe;function i6(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}Qo.isArgumentsObject=O7t;Qo.isGeneratorFunction=N7t;Qo.isTypedArray=GMe;function H7t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}Qo.isPromise=H7t;function j7t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):GMe(e)||ZMe(e)}Qo.isArrayBufferView=j7t;function W7t(e){return bp(e)==="Uint8Array"}Qo.isUint8Array=W7t;function Y7t(e){return bp(e)==="Uint8ClampedArray"}Qo.isUint8ClampedArray=Y7t;function X7t(e){return bp(e)==="Uint16Array"}Qo.isUint16Array=X7t;function Z7t(e){return bp(e)==="Uint32Array"}Qo.isUint32Array=Z7t;function $7t(e){return bp(e)==="Int8Array"}Qo.isInt8Array=$7t;function K7t(e){return bp(e)==="Int16Array"}Qo.isInt16Array=K7t;function J7t(e){return bp(e)==="Int32Array"}Qo.isInt32Array=J7t;function Q7t(e){return bp(e)==="Float32Array"}Qo.isFloat32Array=Q7t;function eLt(e){return bp(e)==="Float64Array"}Qo.isFloat64Array=eLt;function tLt(e){return bp(e)==="BigInt64Array"}Qo.isBigInt64Array=tLt;function rLt(e){return bp(e)==="BigUint64Array"}Qo.isBigUint64Array=rLt;function xL(e){return kv(e)==="[object Map]"}xL.working=typeof Map!="undefined"&&xL(new Map);function nLt(e){return typeof Map=="undefined"?!1:xL.working?xL(e):e instanceof Map}Qo.isMap=nLt;function _L(e){return kv(e)==="[object Set]"}_L.working=typeof Set!="undefined"&&_L(new Set);function iLt(e){return typeof Set=="undefined"?!1:_L.working?_L(e):e instanceof Set}Qo.isSet=iLt;function bL(e){return kv(e)==="[object WeakMap]"}bL.working=typeof WeakMap!="undefined"&&bL(new WeakMap);function aLt(e){return typeof WeakMap=="undefined"?!1:bL.working?bL(e):e instanceof WeakMap}Qo.isWeakMap=aLt;function ZH(e){return kv(e)==="[object WeakSet]"}ZH.working=typeof WeakSet!="undefined"&&ZH(new WeakSet);function oLt(e){return ZH(e)}Qo.isWeakSet=oLt;function wL(e){return kv(e)==="[object ArrayBuffer]"}wL.working=typeof ArrayBuffer!="undefined"&&wL(new ArrayBuffer);function XMe(e){return typeof ArrayBuffer=="undefined"?!1:wL.working?wL(e):e instanceof ArrayBuffer}Qo.isArrayBuffer=XMe;function TL(e){return kv(e)==="[object DataView]"}TL.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&TL(new DataView(new ArrayBuffer(1),0,1));function ZMe(e){return typeof DataView=="undefined"?!1:TL.working?TL(e):e instanceof DataView}Qo.isDataView=ZMe;var XH=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function n6(e){return kv(e)==="[object SharedArrayBuffer]"}function $Me(e){return typeof XH=="undefined"?!1:(typeof n6.working=="undefined"&&(n6.working=n6(new XH)),n6.working?n6(e):e instanceof XH)}Qo.isSharedArrayBuffer=$Me;function sLt(e){return kv(e)==="[object AsyncFunction]"}Qo.isAsyncFunction=sLt;function lLt(e){return kv(e)==="[object Map Iterator]"}Qo.isMapIterator=lLt;function uLt(e){return kv(e)==="[object Set Iterator]"}Qo.isSetIterator=uLt;function cLt(e){return kv(e)==="[object Generator]"}Qo.isGeneratorObject=cLt;function fLt(e){return kv(e)==="[object WebAssembly.Module]"}Qo.isWebAssemblyCompiledModule=fLt;function KMe(e){return i6(e,U7t)}Qo.isNumberObject=KMe;function JMe(e){return i6(e,V7t)}Qo.isStringObject=JMe;function QMe(e){return i6(e,G7t)}Qo.isBooleanObject=QMe;function eSe(e){return HMe&&i6(e,WMe)}Qo.isBigIntObject=eSe;function tSe(e){return jMe&&i6(e,YMe)}Qo.isSymbolObject=tSe;function hLt(e){return KMe(e)||JMe(e)||QMe(e)||eSe(e)||tSe(e)}Qo.isBoxedPrimitive=hLt;function dLt(e){return typeof Uint8Array!="undefined"&&(XMe(e)||$Me(e))}Qo.isAnyArrayBuffer=dLt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(Qo,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var KH=fe((kxr,rSe)=>{rSe.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var nj=fe(es=>{var nSe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},a=0;a=a)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),tj(t)?r.showHidden=t:t&&es._extend(r,t),L2(r.showHidden)&&(r.showHidden=!1),L2(r.depth)&&(r.depth=2),L2(r.colors)&&(r.colors=!1),L2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=pLt),EL(r,e,r.depth)}es.inspect=$m;$m.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]};$m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function pLt(e,t){var r=$m.styles[t];return r?"\x1B["+$m.colors[r][0]+"m"+e+"\x1B["+$m.colors[r][1]+"m":e}function gLt(e,t){return e}function mLt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function EL(e,t,r){if(e.customInspect&&t&&SL(t.inspect)&&t.inspect!==es.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return LL(n)||(n=EL(e,n,r)),n}var a=yLt(e,t);if(a)return a;var i=Object.keys(t),o=mLt(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),o6(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return JH(t);if(i.length===0){if(SL(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(a6(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(kL(t))return e.stylize(Date.prototype.toString.call(t),"date");if(o6(t))return JH(t)}var l="",u=!1,c=["{","}"];if(aSe(t)&&(u=!0,c=["[","]"]),SL(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(a6(t)&&(l=" "+RegExp.prototype.toString.call(t)),kL(t)&&(l=" "+Date.prototype.toUTCString.call(t)),o6(t)&&(l=" "+JH(t)),i.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return a6(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var v;return u?v=xLt(e,t,r,o,i):v=i.map(function(g){return ej(e,t,r,o,g,u)}),e.seen.pop(),_Lt(v,l,c)}function yLt(e,t){if(L2(t))return e.stylize("undefined","undefined");if(LL(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(oSe(t))return e.stylize(""+t,"number");if(tj(t))return e.stylize(""+t,"boolean");if(CL(t))return e.stylize("null","null")}function JH(e){return"["+Error.prototype.toString.call(e)+"]"}function xLt(e,t,r,n,a){for(var i=[],o=0,s=t.length;o-1&&(i?s=s.split(` `).map(function(u){return" "+u}).join(` `).slice(2):s=` `+s.split(` `).map(function(u){return" "+u}).join(` -`))):s=e.stylize("[Circular]","special")),jx(o)){if(i&&a.match(/^\d+$/))return s;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function iwt(e,t,r){var n=0,a=e.reduce(function(i,o){return n++,o.indexOf(` +`))):s=e.stylize("[Circular]","special")),L2(o)){if(i&&a.match(/^\d+$/))return s;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function _Lt(e,t,r){var n=0,a=e.reduce(function(i,o){return n++,o.indexOf(` `)>=0&&n++,i+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}ms.types=eU();function cwe(e){return Array.isArray(e)}ms.isArray=cwe;function iU(e){return typeof e=="boolean"}ms.isBoolean=iU;function C8(e){return e===null}ms.isNull=C8;function owt(e){return e==null}ms.isNullOrUndefined=owt;function fwe(e){return typeof e=="number"}ms.isNumber=fwe;function L8(e){return typeof e=="string"}ms.isString=L8;function swt(e){return typeof e=="symbol"}ms.isSymbol=swt;function jx(e){return e===void 0}ms.isUndefined=jx;function BT(e){return g3(e)&&oU(e)==="[object RegExp]"}ms.isRegExp=BT;ms.types.isRegExp=BT;function g3(e){return typeof e=="object"&&e!==null}ms.isObject=g3;function k8(e){return g3(e)&&oU(e)==="[object Date]"}ms.isDate=k8;ms.types.isDate=k8;function OT(e){return g3(e)&&(oU(e)==="[object Error]"||e instanceof Error)}ms.isError=OT;ms.types.isNativeError=OT;function S8(e){return typeof e=="function"}ms.isFunction=S8;function lwt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}ms.isPrimitive=lwt;ms.isBuffer=tU();function oU(e){return Object.prototype.toString.call(e)}function nU(e){return e<10?"0"+e.toString(10):e.toString(10)}var uwt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function cwt(){var e=new Date,t=[nU(e.getHours()),nU(e.getMinutes()),nU(e.getSeconds())].join(":");return[e.getDate(),uwt[e.getMonth()],t].join(" ")}ms.log=function(){console.log("%s - %s",cwt(),ms.format.apply(ms,arguments))};ms.inherits=Y1();ms._extend=function(e,t){if(!t||!g3(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function hwe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Hx=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;ms.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(Hx&&t[Hx]){var r=t[Hx];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,Hx,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,a,i=new Promise(function(l,u){n=l,a=u}),o=[],s=0;s{"use strict";function dwe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function dwt(e){for(var t=1;t0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,a=""+n.data;n=n.next;)a+=r+n.data;return a}},{key:"concat",value:function(r){if(this.length===0)return F8.alloc(0);for(var n=F8.allocUnsafe(r>>>0),a=this.head,i=0;a;)bwt(a.data,n,i),i+=a.data.length,a=a.next;return n}},{key:"consume",value:function(r,n){var a;return ro.length?o.length:r;if(s===o.length?i+=o:i+=o.slice(0,r),r-=s,r===0){s===o.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++a}return this.length-=a,i}},{key:"_getBuffer",value:function(r){var n=F8.allocUnsafe(r),a=this.head,i=1;for(a.data.copy(n),r-=a.data.length;a=a.next;){var o=a.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++i,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=o.slice(s));break}++i}return this.length-=i,n}},{key:xwt,value:function(r,n){return lU(this,dwt({},n,{depth:0,customInspect:!1}))}}]),e})()});var cU=ne((Mlr,ywe)=>{"use strict";function _wt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(uU,this,e)):process.nextTick(uU,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(P8,r):(r._writableState.errorEmitted=!0,process.nextTick(mwe,r,i)):process.nextTick(mwe,r,i):t?(process.nextTick(P8,r),t(i)):process.nextTick(P8,r)}),this)}function mwe(e,t){uU(e,t),P8(e)}function P8(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function wwt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function uU(e,t){e.emit("error",t)}function Twt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}ywe.exports={destroy:_wt,undestroy:wwt,errorOrDestroy:Twt}});var Wx=ne((Slr,_we)=>{"use strict";function Awt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var bwe={};function h0(e,t,r){r||(r=Error);function n(i,o,s){return typeof t=="string"?t:t(i,o,s)}var a=(function(i){Awt(o,i);function o(s,l,u){return i.call(this,n(s,l,u))||this}return o})(r);a.prototype.name=r.name,a.prototype.code=e,bwe[e]=a}function xwe(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function Mwt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function Swt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function Ewt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}h0("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);h0("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&Mwt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var a;if(Swt(e," argument"))a="The ".concat(e," ").concat(n," ").concat(xwe(t,"type"));else{var i=Ewt(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(xwe(t,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError);h0("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");h0("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});h0("ERR_STREAM_PREMATURE_CLOSE","Premature close");h0("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});h0("ERR_MULTIPLE_CALLBACK","Callback called multiple times");h0("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");h0("ERR_STREAM_WRITE_AFTER_END","write after end");h0("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);h0("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);h0("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");_we.exports.codes=bwe});var fU=ne((Elr,wwe)=>{"use strict";var kwt=Wx().codes.ERR_INVALID_OPT_VALUE;function Cwt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function Lwt(e,t,r,n){var a=Cwt(t,n,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var i=n?r:"highWaterMark";throw new kwt(i,a)}return Math.floor(a)}return e.objectMode?16:16*1024}wwe.exports={getHighWaterMark:Lwt}});var Awe=ne((klr,Twe)=>{Twe.exports=Fwt;function Fwt(e,t){if(hU("noDeprecation"))return e;var r=!1;function n(){if(!r){if(hU("throwDeprecation"))throw new Error(t);hU("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function hU(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var pU=ne((Clr,Lwe)=>{"use strict";Lwe.exports=Nc;function Swe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){a5t(t,e)}}var m3;Nc.WritableState=UT;var Pwt={deprecate:Awe()},Ewe=vN(),R8=Ux().Buffer,Dwt=window.Uint8Array||function(){};function Rwt(e){return R8.from(e)}function Iwt(e){return R8.isBuffer(e)||e instanceof Dwt}var vU=cU(),zwt=fU(),qwt=zwt.getHighWaterMark,Mm=Wx().codes,Bwt=Mm.ERR_INVALID_ARG_TYPE,Owt=Mm.ERR_METHOD_NOT_IMPLEMENTED,Nwt=Mm.ERR_MULTIPLE_CALLBACK,Uwt=Mm.ERR_STREAM_CANNOT_PIPE,Vwt=Mm.ERR_STREAM_DESTROYED,Gwt=Mm.ERR_STREAM_NULL_VALUES,Hwt=Mm.ERR_STREAM_WRITE_AFTER_END,jwt=Mm.ERR_UNKNOWN_ENCODING,y3=vU.errorOrDestroy;Y1()(Nc,Ewe);function Wwt(){}function UT(e,t,r){m3=m3||Yx(),e=e||{},typeof r!="boolean"&&(r=t instanceof m3),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=qwt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){Qwt(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new Swe(this)}UT.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(UT.prototype,"buffer",{get:Pwt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var D8;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(D8=Function.prototype[Symbol.hasInstance],Object.defineProperty(Nc,Symbol.hasInstance,{value:function(t){return D8.call(this,t)?!0:this!==Nc?!1:t&&t._writableState instanceof UT}})):D8=function(t){return t instanceof this};function Nc(e){m3=m3||Yx();var t=this instanceof m3;if(!t&&!D8.call(Nc,this))return new Nc(e);this._writableState=new UT(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),Ewe.call(this)}Nc.prototype.pipe=function(){y3(this,new Uwt)};function Ywt(e,t){var r=new Hwt;y3(e,r),process.nextTick(t,r)}function Xwt(e,t,r,n){var a;return r===null?a=new Gwt:typeof r!="string"&&!t.objectMode&&(a=new Bwt("chunk",["string","Buffer"],r)),a?(y3(e,a),process.nextTick(n,a),!1):!0}Nc.prototype.write=function(e,t,r){var n=this._writableState,a=!1,i=!n.objectMode&&Iwt(e);return i&&!R8.isBuffer(e)&&(e=Rwt(e)),typeof t=="function"&&(r=t,t=null),i?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=Wwt),n.ending?Ywt(this,r):(i||Xwt(this,n,e,r))&&(n.pendingcb++,a=$wt(this,n,i,e,t,r)),a};Nc.prototype.cork=function(){this._writableState.corked++};Nc.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&kwe(this,e))};Nc.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new jwt(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(Nc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function Zwt(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=R8.from(t,r)),t}Object.defineProperty(Nc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function $wt(e,t,r,n,a,i){if(!r){var o=Zwt(t,n,a);n!==o&&(r=!0,a="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length{"use strict";var i5t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};Pwe.exports=Kp;var Fwe=yU(),mU=pU();Y1()(Kp,Fwe);for(gU=i5t(mU.prototype),I8=0;I8{var q8=Ux(),Jp=q8.Buffer;function Dwe(e,t){for(var r in e)t[r]=e[r]}Jp.from&&Jp.alloc&&Jp.allocUnsafe&&Jp.allocUnsafeSlow?Rwe.exports=q8:(Dwe(q8,xU),xU.Buffer=Xx);function Xx(e,t,r){return Jp(e,t,r)}Xx.prototype=Object.create(Jp.prototype);Dwe(Jp,Xx);Xx.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return Jp(e,t,r)};Xx.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=Jp(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};Xx.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return Jp(e)};Xx.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return q8.SlowBuffer(e)}});var wU=ne(qwe=>{"use strict";var _U=Iwe().Buffer,zwe=_U.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function l5t(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function u5t(e){var t=l5t(e);if(typeof t!="string"&&(_U.isEncoding===zwe||!zwe(e)))throw new Error("Unknown encoding: "+e);return t||e}qwe.StringDecoder=VT;function VT(e){this.encoding=u5t(e);var t;switch(this.encoding){case"utf16le":this.text=p5t,this.end=g5t,t=4;break;case"utf8":this.fillLast=h5t,t=4;break;case"base64":this.text=m5t,this.end=y5t,t=3;break;default:this.write=x5t,this.end=b5t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=_U.allocUnsafe(t)}VT.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function c5t(e,t,r){var n=t.length-1;if(n=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(a===2?a=0:e.lastNeed=a-3),a):0))}function f5t(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function h5t(e){var t=this.lastTotal-this.lastNeed,r=f5t(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function d5t(e,t){var r=c5t(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function v5t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function p5t(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function g5t(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function m5t(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function y5t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function x5t(e){return e.toString(this.encoding)}function b5t(e){return e&&e.length?this.write(e):""}});var B8=ne((Plr,Nwe)=>{"use strict";var Bwe=Wx().codes.ERR_STREAM_PREMATURE_CLOSE;function _5t(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),a=0;a{"use strict";var O8;function Sm(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var A5t=B8(),Em=Symbol("lastResolve"),Zx=Symbol("lastReject"),GT=Symbol("error"),N8=Symbol("ended"),$x=Symbol("lastPromise"),TU=Symbol("handlePromise"),Kx=Symbol("stream");function km(e,t){return{value:e,done:t}}function M5t(e){var t=e[Em];if(t!==null){var r=e[Kx].read();r!==null&&(e[$x]=null,e[Em]=null,e[Zx]=null,t(km(r,!1)))}}function S5t(e){process.nextTick(M5t,e)}function E5t(e,t){return function(r,n){e.then(function(){if(t[N8]){r(km(void 0,!0));return}t[TU](r,n)},n)}}var k5t=Object.getPrototypeOf(function(){}),C5t=Object.setPrototypeOf((O8={get stream(){return this[Kx]},next:function(){var t=this,r=this[GT];if(r!==null)return Promise.reject(r);if(this[N8])return Promise.resolve(km(void 0,!0));if(this[Kx].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[GT]?s(t[GT]):o(km(void 0,!0))})});var n=this[$x],a;if(n)a=new Promise(E5t(n,this));else{var i=this[Kx].read();if(i!==null)return Promise.resolve(km(i,!1));a=new Promise(this[TU])}return this[$x]=a,a}},Sm(O8,Symbol.asyncIterator,function(){return this}),Sm(O8,"return",function(){var t=this;return new Promise(function(r,n){t[Kx].destroy(null,function(a){if(a){n(a);return}r(km(void 0,!0))})})}),O8),k5t),L5t=function(t){var r,n=Object.create(C5t,(r={},Sm(r,Kx,{value:t,writable:!0}),Sm(r,Em,{value:null,writable:!0}),Sm(r,Zx,{value:null,writable:!0}),Sm(r,GT,{value:null,writable:!0}),Sm(r,N8,{value:t._readableState.endEmitted,writable:!0}),Sm(r,TU,{value:function(i,o){var s=n[Kx].read();s?(n[$x]=null,n[Em]=null,n[Zx]=null,i(km(s,!1))):(n[Em]=i,n[Zx]=o)},writable:!0}),r));return n[$x]=null,A5t(t,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var i=n[Zx];i!==null&&(n[$x]=null,n[Em]=null,n[Zx]=null,i(a)),n[GT]=a;return}var o=n[Em];o!==null&&(n[$x]=null,n[Em]=null,n[Zx]=null,o(km(void 0,!0))),n[N8]=!0}),t.on("readable",S5t.bind(null,n)),n};Uwe.exports=L5t});var Hwe=ne((Rlr,Gwe)=>{Gwe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var yU=ne((zlr,e5e)=>{"use strict";e5e.exports=Xs;var x3;Xs.ReadableState=Xwe;var Ilr=Vy().EventEmitter,Ywe=function(t,r){return t.listeners(r).length},jT=vN(),U8=Ux().Buffer,F5t=window.Uint8Array||function(){};function P5t(e){return U8.from(e)}function D5t(e){return U8.isBuffer(e)||e instanceof F5t}var AU=sU(),ls;AU&&AU.debuglog?ls=AU.debuglog("stream"):ls=function(){};var R5t=gwe(),FU=cU(),I5t=fU(),z5t=I5t.getHighWaterMark,V8=Wx().codes,q5t=V8.ERR_INVALID_ARG_TYPE,B5t=V8.ERR_STREAM_PUSH_AFTER_EOF,O5t=V8.ERR_METHOD_NOT_IMPLEMENTED,N5t=V8.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,b3,MU,SU;Y1()(Xs,jT);var HT=FU.errorOrDestroy,EU=["error","close","destroy","pause","resume"];function U5t(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function Xwe(e,t,r){x3=x3||Yx(),e=e||{},typeof r!="boolean"&&(r=t instanceof x3),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=z5t(this,e,"readableHighWaterMark",r),this.buffer=new R5t,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(b3||(b3=wU().StringDecoder),this.decoder=new b3(e.encoding),this.encoding=e.encoding)}function Xs(e){if(x3=x3||Yx(),!(this instanceof Xs))return new Xs(e);var t=this instanceof x3;this._readableState=new Xwe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),jT.call(this)}Object.defineProperty(Xs.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});Xs.prototype.destroy=FU.destroy;Xs.prototype._undestroy=FU.undestroy;Xs.prototype._destroy=function(e,t){t(e)};Xs.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=U8.from(e,t),t=""),n=!0),Zwe(this,e,t,!1,n)};Xs.prototype.unshift=function(e){return Zwe(this,e,null,!0,!1)};function Zwe(e,t,r,n,a){ls("readableAddChunk",t);var i=e._readableState;if(t===null)i.reading=!1,H5t(e,i);else{var o;if(a||(o=V5t(i,t)),o)HT(e,o);else if(i.objectMode||t&&t.length>0)if(typeof t!="string"&&!i.objectMode&&Object.getPrototypeOf(t)!==U8.prototype&&(t=P5t(t)),n)i.endEmitted?HT(e,new N5t):kU(e,i,t,!0);else if(i.ended)HT(e,new B5t);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||t.length!==0?kU(e,i,t,!1):LU(e,i)):kU(e,i,t,!1)}else n||(i.reading=!1,LU(e,i))}return!i.ended&&(i.length=jwe?e=jwe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function Wwe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=G5t(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}Xs.prototype.read=function(e){ls("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return ls("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?CU(this):G8(this),null;if(e=Wwe(e,t),e===0&&t.ended)return t.length===0&&CU(this),null;var n=t.needReadable;ls("need readable",n),(t.length===0||t.length-e0?a=Jwe(e,t):a=null,a===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&CU(this)),a!==null&&this.emit("data",a),a};function H5t(e,t){if(ls("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?G8(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,$we(e)))}}function G8(e){var t=e._readableState;ls("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(ls("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick($we,e))}function $we(e){var t=e._readableState;ls("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,PU(e)}function LU(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(j5t,e,t))}function j5t(e,t){for(;!t.reading&&!t.ended&&(t.length1&&Qwe(n.pipes,e)!==-1)&&!u&&(ls("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(x){ls("onerror",x),m(),e.removeListener("error",h),Ywe(e,"error")===0&&HT(e,x)}U5t(e,"error",h);function v(){e.removeListener("finish",d),m()}e.once("close",v);function d(){ls("onfinish"),e.removeListener("close",v),m()}e.once("finish",d);function m(){ls("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(ls("pipe resume"),r.resume()),e};function W5t(e){return function(){var r=e._readableState;ls("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&Ywe(e,"data")&&(r.flowing=!0,PU(e))}}Xs.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,ls("on readable",n.length,n.reading),n.length?G8(this):n.reading||process.nextTick(Y5t,this)),r};Xs.prototype.addListener=Xs.prototype.on;Xs.prototype.removeListener=function(e,t){var r=jT.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(Kwe,this),r};Xs.prototype.removeAllListeners=function(e){var t=jT.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(Kwe,this),t};function Kwe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function Y5t(e){ls("readable nexttick read 0"),e.read(0)}Xs.prototype.resume=function(){var e=this._readableState;return e.flowing||(ls("resume"),e.flowing=!e.readableListening,X5t(this,e)),e.paused=!1,this};function X5t(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(Z5t,e,t))}function Z5t(e,t){ls("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),PU(e),t.flowing&&!t.reading&&e.read(0)}Xs.prototype.pause=function(){return ls("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(ls("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function PU(e){var t=e._readableState;for(ls("flow",t.flowing);t.flowing&&e.read()!==null;);}Xs.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(ls("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(ls("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var a in e)this[a]===void 0&&typeof e[a]=="function"&&(this[a]=(function(s){return function(){return e[s].apply(e,arguments)}})(a));for(var i=0;i=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function CU(e){var t=e._readableState;ls("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick($5t,t,e))}function $5t(e,t){if(ls("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(Xs.from=function(e,t){return SU===void 0&&(SU=Hwe()),SU(Xs,e,t)});function Qwe(e,t){for(var r=0,n=e.length;r{"use strict";r5e.exports=Z1;var H8=Wx().codes,K5t=H8.ERR_METHOD_NOT_IMPLEMENTED,J5t=H8.ERR_MULTIPLE_CALLBACK,Q5t=H8.ERR_TRANSFORM_ALREADY_TRANSFORMING,e4t=H8.ERR_TRANSFORM_WITH_LENGTH_0,j8=Yx();Y1()(Z1,j8);function t4t(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new J5t);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{"use strict";a5e.exports=WT;var n5e=DU();Y1()(WT,n5e);function WT(e){if(!(this instanceof WT))return new WT(e);n5e.call(this,e)}WT.prototype._transform=function(e,t,r){r(null,e)}});var c5e=ne((Olr,u5e)=>{"use strict";var RU;function n4t(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var l5e=Wx().codes,a4t=l5e.ERR_MISSING_ARGS,i4t=l5e.ERR_STREAM_DESTROYED;function o5e(e){if(e)throw e}function o4t(e){return e.setHeader&&typeof e.abort=="function"}function s4t(e,t,r,n){n=n4t(n);var a=!1;e.on("close",function(){a=!0}),RU===void 0&&(RU=B8()),RU(e,{readable:t,writable:r},function(o){if(o)return n(o);a=!0,n()});var i=!1;return function(o){if(!a&&!i){if(i=!0,o4t(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new i4t("pipe"))}}}function s5e(e){e()}function l4t(e,t){return e.pipe(t)}function u4t(e){return!e.length||typeof e[e.length-1]!="function"?o5e:e.pop()}function c4t(){for(var e=arguments.length,t=new Array(e),r=0;r0;return s4t(o,l,u,function(c){a||(a=c),c&&i.forEach(s5e),!l&&(i.forEach(s5e),n(a))})});return t.reduce(l4t)}u5e.exports=c4t});var h5e=ne((Nlr,f5e)=>{f5e.exports=d0;var IU=Vy().EventEmitter,f4t=Y1();f4t(d0,IU);d0.Readable=yU();d0.Writable=pU();d0.Duplex=Yx();d0.Transform=DU();d0.PassThrough=i5e();d0.finished=B8();d0.pipeline=c5e();d0.Stream=d0;function d0(){IU.call(this)}d0.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",n);function a(){r.readable&&r.resume&&r.resume()}e.on("drain",a),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var i=!1;function o(){i||(i=!0,e.end())}function s(){i||(i=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),IU.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",n),e.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var w3=ne(ys=>{var d5e=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},a=0;a=a)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),OU(t)?r.showHidden=t:t&&ys._extend(r,t),Qx(r.showHidden)&&(r.showHidden=!1),Qx(r.depth)&&(r.depth=2),Qx(r.colors)&&(r.colors=!1),Qx(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=d4t),Z8(r,e,r.depth)}ys.inspect=Cm;Cm.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]};Cm.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function d4t(e,t){var r=Cm.styles[t];return r?"\x1B["+Cm.colors[r][0]+"m"+e+"\x1B["+Cm.colors[r][1]+"m":e}function v4t(e,t){return e}function p4t(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function Z8(e,t,r){if(e.customInspect&&t&&X8(t.inspect)&&t.inspect!==ys.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return J8(n)||(n=Z8(e,n,r)),n}var a=g4t(e,t);if(a)return a;var i=Object.keys(t),o=p4t(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),XT(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return zU(t);if(i.length===0){if(X8(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(YT(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if($8(t))return e.stylize(Date.prototype.toString.call(t),"date");if(XT(t))return zU(t)}var l="",u=!1,c=["{","}"];if(p5e(t)&&(u=!0,c=["[","]"]),X8(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(YT(t)&&(l=" "+RegExp.prototype.toString.call(t)),$8(t)&&(l=" "+Date.prototype.toUTCString.call(t)),XT(t)&&(l=" "+zU(t)),i.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return YT(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var h;return u?h=m4t(e,t,r,o,i):h=i.map(function(v){return BU(e,t,r,o,v,u)}),e.seen.pop(),y4t(h,l,c)}function g4t(e,t){if(Qx(t))return e.stylize("undefined","undefined");if(J8(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(g5e(t))return e.stylize(""+t,"number");if(OU(t))return e.stylize(""+t,"boolean");if(K8(t))return e.stylize("null","null")}function zU(e){return"["+Error.prototype.toString.call(e)+"]"}function m4t(e,t,r,n,a){for(var i=[],o=0,s=t.length;o{"use strict";function lSe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function uSe(e){for(var t=1;t0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,a=""+n.data;n=n.next;)a+=r+n.data;return a}},{key:"concat",value:function(r){if(this.length===0)return PL.alloc(0);for(var n=PL.allocUnsafe(r>>>0),a=this.head,i=0;a;)ILt(a.data,n,i),i+=a.data.length,a=a.next;return n}},{key:"consume",value:function(r,n){var a;return ro.length?o.length:r;if(s===o.length?i+=o:i+=o.slice(0,r),r-=s,r===0){s===o.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++a}return this.length-=a,i}},{key:"_getBuffer",value:function(r){var n=PL.allocUnsafe(r),a=this.head,i=1;for(a.data.copy(n),r-=a.data.length;a=a.next;){var o=a.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++i,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=o.slice(s));break}++i}return this.length-=i,n}},{key:RLt,value:function(r,n){return ij(this,uSe(uSe({},n),{},{depth:0,customInspect:!1}))}}]),e})()});var oj=fe((Pxr,pSe)=>{"use strict";function zLt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(aj,this,e)):process.nextTick(aj,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(FL,r):(r._writableState.errorEmitted=!0,process.nextTick(vSe,r,i)):process.nextTick(vSe,r,i):t?(process.nextTick(FL,r),t(i)):process.nextTick(FL,r)}),this)}function vSe(e,t){aj(e,t),FL(e)}function FL(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function qLt(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function aj(e,t){e.emit("error",t)}function BLt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}pSe.exports={destroy:zLt,undestroy:qLt,errorOrDestroy:BLt}});var P2=fe((Fxr,ySe)=>{"use strict";function OLt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var mSe={};function Cv(e,t,r){r||(r=Error);function n(i,o,s){return typeof t=="string"?t:t(i,o,s)}var a=(function(i){OLt(o,i);function o(s,l,u){return i.call(this,n(s,l,u))||this}return o})(r);a.prototype.name=r.name,a.prototype.code=e,mSe[e]=a}function gSe(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function NLt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function ULt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function VLt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Cv("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Cv("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&NLt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var a;if(ULt(e," argument"))a="The ".concat(e," ").concat(n," ").concat(gSe(t,"type"));else{var i=VLt(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(gSe(t,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError);Cv("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Cv("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Cv("ERR_STREAM_PREMATURE_CLOSE","Premature close");Cv("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Cv("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Cv("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Cv("ERR_STREAM_WRITE_AFTER_END","write after end");Cv("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Cv("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Cv("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");ySe.exports.codes=mSe});var sj=fe((Dxr,xSe)=>{"use strict";var GLt=P2().codes.ERR_INVALID_OPT_VALUE;function HLt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function jLt(e,t,r,n){var a=HLt(t,n,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var i=n?r:"highWaterMark";throw new GLt(i,a)}return Math.floor(a)}return e.objectMode?16:16*1024}xSe.exports={getHighWaterMark:jLt}});var bSe=fe((Rxr,_Se)=>{_Se.exports=WLt;function WLt(e,t){if(lj("noDeprecation"))return e;var r=!1;function n(){if(!r){if(lj("throwDeprecation"))throw new Error(t);lj("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function lj(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var fj=fe((Ixr,ESe)=>{"use strict";ESe.exports=sc;function TSe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){x9t(t,e)}}var yw;sc.WritableState=l6;var YLt={deprecate:bSe()},ASe=dH(),RL=M2().Buffer,XLt=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function ZLt(e){return RL.from(e)}function $Lt(e){return RL.isBuffer(e)||e instanceof XLt}var cj=oj(),KLt=sj(),JLt=KLt.getHighWaterMark,Km=P2().codes,QLt=Km.ERR_INVALID_ARG_TYPE,e9t=Km.ERR_METHOD_NOT_IMPLEMENTED,t9t=Km.ERR_MULTIPLE_CALLBACK,r9t=Km.ERR_STREAM_CANNOT_PIPE,n9t=Km.ERR_STREAM_DESTROYED,i9t=Km.ERR_STREAM_NULL_VALUES,a9t=Km.ERR_STREAM_WRITE_AFTER_END,o9t=Km.ERR_UNKNOWN_ENCODING,xw=cj.errorOrDestroy;gg()(sc,ASe);function s9t(){}function l6(e,t,r){yw=yw||F2(),e=e||{},typeof r!="boolean"&&(r=t instanceof yw),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=JLt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){v9t(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new TSe(this)}l6.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(l6.prototype,"buffer",{get:YLt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var DL;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(DL=Function.prototype[Symbol.hasInstance],Object.defineProperty(sc,Symbol.hasInstance,{value:function(t){return DL.call(this,t)?!0:this!==sc?!1:t&&t._writableState instanceof l6}})):DL=function(t){return t instanceof this};function sc(e){yw=yw||F2();var t=this instanceof yw;if(!t&&!DL.call(sc,this))return new sc(e);this._writableState=new l6(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),ASe.call(this)}sc.prototype.pipe=function(){xw(this,new r9t)};function l9t(e,t){var r=new a9t;xw(e,r),process.nextTick(t,r)}function u9t(e,t,r,n){var a;return r===null?a=new i9t:typeof r!="string"&&!t.objectMode&&(a=new QLt("chunk",["string","Buffer"],r)),a?(xw(e,a),process.nextTick(n,a),!1):!0}sc.prototype.write=function(e,t,r){var n=this._writableState,a=!1,i=!n.objectMode&&$Lt(e);return i&&!RL.isBuffer(e)&&(e=ZLt(e)),typeof t=="function"&&(r=t,t=null),i?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=s9t),n.ending?l9t(this,r):(i||u9t(this,n,e,r))&&(n.pendingcb++,a=f9t(this,n,i,e,t,r)),a};sc.prototype.cork=function(){this._writableState.corked++};sc.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&MSe(this,e))};sc.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new o9t(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(sc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function c9t(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=RL.from(t,r)),t}Object.defineProperty(sc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function f9t(e,t,r,n,a,i){if(!r){var o=c9t(t,n,a);n!==o&&(r=!0,a="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length{"use strict";var _9t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};CSe.exports=m1;var kSe=vj(),dj=fj();gg()(m1,kSe);for(hj=_9t(dj.prototype),IL=0;IL{var qL=M2(),y1=qL.Buffer;function LSe(e,t){for(var r in e)t[r]=e[r]}y1.from&&y1.alloc&&y1.allocUnsafe&&y1.allocUnsafeSlow?PSe.exports=qL:(LSe(qL,pj),pj.Buffer=D2);function D2(e,t,r){return y1(e,t,r)}D2.prototype=Object.create(y1.prototype);LSe(y1,D2);D2.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return y1(e,t,r)};D2.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=y1(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};D2.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return y1(e)};D2.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return qL.SlowBuffer(e)}});var yj=fe(RSe=>{"use strict";var mj=FSe().Buffer,DSe=mj.isEncoding||function(e){switch(e=""+e,e&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function T9t(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function A9t(e){var t=T9t(e);if(typeof t!="string"&&(mj.isEncoding===DSe||!DSe(e)))throw new Error("Unknown encoding: "+e);return t||e}RSe.StringDecoder=u6;function u6(e){this.encoding=A9t(e);var t;switch(this.encoding){case"utf16le":this.text=L9t,this.end=P9t,t=4;break;case"utf8":this.fillLast=E9t,t=4;break;case"base64":this.text=F9t,this.end=D9t,t=3;break;default:this.write=R9t,this.end=I9t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=mj.allocUnsafe(t)}u6.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function M9t(e,t,r){var n=t.length-1;if(n=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(a===2?a=0:e.lastNeed=a-3),a):0))}function S9t(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function E9t(e){var t=this.lastTotal-this.lastNeed,r=S9t(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function k9t(e,t){var r=M9t(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function C9t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function L9t(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function P9t(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function F9t(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function D9t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function R9t(e){return e.toString(this.encoding)}function I9t(e){return e&&e.length?this.write(e):""}});var BL=fe((Bxr,qSe)=>{"use strict";var ISe=P2().codes.ERR_STREAM_PREMATURE_CLOSE;function z9t(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),a=0;a{"use strict";var OL;function Jm(e,t,r){return t=O9t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O9t(e){var t=N9t(e,"string");return typeof t=="symbol"?t:String(t)}function N9t(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U9t=BL(),Qm=Symbol("lastResolve"),R2=Symbol("lastReject"),c6=Symbol("error"),NL=Symbol("ended"),I2=Symbol("lastPromise"),xj=Symbol("handlePromise"),z2=Symbol("stream");function ey(e,t){return{value:e,done:t}}function V9t(e){var t=e[Qm];if(t!==null){var r=e[z2].read();r!==null&&(e[I2]=null,e[Qm]=null,e[R2]=null,t(ey(r,!1)))}}function G9t(e){process.nextTick(V9t,e)}function H9t(e,t){return function(r,n){e.then(function(){if(t[NL]){r(ey(void 0,!0));return}t[xj](r,n)},n)}}var j9t=Object.getPrototypeOf(function(){}),W9t=Object.setPrototypeOf((OL={get stream(){return this[z2]},next:function(){var t=this,r=this[c6];if(r!==null)return Promise.reject(r);if(this[NL])return Promise.resolve(ey(void 0,!0));if(this[z2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[c6]?s(t[c6]):o(ey(void 0,!0))})});var n=this[I2],a;if(n)a=new Promise(H9t(n,this));else{var i=this[z2].read();if(i!==null)return Promise.resolve(ey(i,!1));a=new Promise(this[xj])}return this[I2]=a,a}},Jm(OL,Symbol.asyncIterator,function(){return this}),Jm(OL,"return",function(){var t=this;return new Promise(function(r,n){t[z2].destroy(null,function(a){if(a){n(a);return}r(ey(void 0,!0))})})}),OL),j9t),Y9t=function(t){var r,n=Object.create(W9t,(r={},Jm(r,z2,{value:t,writable:!0}),Jm(r,Qm,{value:null,writable:!0}),Jm(r,R2,{value:null,writable:!0}),Jm(r,c6,{value:null,writable:!0}),Jm(r,NL,{value:t._readableState.endEmitted,writable:!0}),Jm(r,xj,{value:function(i,o){var s=n[z2].read();s?(n[I2]=null,n[Qm]=null,n[R2]=null,i(ey(s,!1))):(n[Qm]=i,n[R2]=o)},writable:!0}),r));return n[I2]=null,U9t(t,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var i=n[R2];i!==null&&(n[I2]=null,n[Qm]=null,n[R2]=null,i(a)),n[c6]=a;return}var o=n[Qm];o!==null&&(n[I2]=null,n[Qm]=null,n[R2]=null,o(ey(void 0,!0))),n[NL]=!0}),t.on("readable",G9t.bind(null,n)),n};BSe.exports=Y9t});var USe=fe((Nxr,NSe)=>{NSe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var vj=fe((Vxr,KSe)=>{"use strict";KSe.exports=bs;var _w;bs.ReadableState=jSe;var Uxr=Mx().EventEmitter,HSe=function(t,r){return t.listeners(r).length},h6=dH(),UL=M2().Buffer,X9t=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function Z9t(e){return UL.from(e)}function $9t(e){return UL.isBuffer(e)||e instanceof X9t}var _j=nj(),Wo;_j&&_j.debuglog?Wo=_j.debuglog("stream"):Wo=function(){};var K9t=dSe(),Ej=oj(),J9t=sj(),Q9t=J9t.getHighWaterMark,VL=P2().codes,ePt=VL.ERR_INVALID_ARG_TYPE,tPt=VL.ERR_STREAM_PUSH_AFTER_EOF,rPt=VL.ERR_METHOD_NOT_IMPLEMENTED,nPt=VL.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,bw,bj,wj;gg()(bs,h6);var f6=Ej.errorOrDestroy,Tj=["error","close","destroy","pause","resume"];function iPt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function jSe(e,t,r){_w=_w||F2(),e=e||{},typeof r!="boolean"&&(r=t instanceof _w),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Q9t(this,e,"readableHighWaterMark",r),this.buffer=new K9t,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(bw||(bw=yj().StringDecoder),this.decoder=new bw(e.encoding),this.encoding=e.encoding)}function bs(e){if(_w=_w||F2(),!(this instanceof bs))return new bs(e);var t=this instanceof _w;this._readableState=new jSe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),h6.call(this)}Object.defineProperty(bs.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});bs.prototype.destroy=Ej.destroy;bs.prototype._undestroy=Ej.undestroy;bs.prototype._destroy=function(e,t){t(e)};bs.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=UL.from(e,t),t=""),n=!0),WSe(this,e,t,!1,n)};bs.prototype.unshift=function(e){return WSe(this,e,null,!0,!1)};function WSe(e,t,r,n,a){Wo("readableAddChunk",t);var i=e._readableState;if(t===null)i.reading=!1,sPt(e,i);else{var o;if(a||(o=aPt(i,t)),o)f6(e,o);else if(i.objectMode||t&&t.length>0)if(typeof t!="string"&&!i.objectMode&&Object.getPrototypeOf(t)!==UL.prototype&&(t=Z9t(t)),n)i.endEmitted?f6(e,new nPt):Aj(e,i,t,!0);else if(i.ended)f6(e,new tPt);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||t.length!==0?Aj(e,i,t,!1):Sj(e,i)):Aj(e,i,t,!1)}else n||(i.reading=!1,Sj(e,i))}return!i.ended&&(i.length=VSe?e=VSe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function GSe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=oPt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}bs.prototype.read=function(e){Wo("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return Wo("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Mj(this):GL(this),null;if(e=GSe(e,t),e===0&&t.ended)return t.length===0&&Mj(this),null;var n=t.needReadable;Wo("need readable",n),(t.length===0||t.length-e0?a=ZSe(e,t):a=null,a===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Mj(this)),a!==null&&this.emit("data",a),a};function sPt(e,t){if(Wo("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?GL(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,YSe(e)))}}function GL(e){var t=e._readableState;Wo("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(Wo("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(YSe,e))}function YSe(e){var t=e._readableState;Wo("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,kj(e)}function Sj(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(lPt,e,t))}function lPt(e,t){for(;!t.reading&&!t.ended&&(t.length1&&$Se(n.pipes,e)!==-1)&&!u&&(Wo("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function v(_){Wo("onerror",_),x(),e.removeListener("error",v),HSe(e,"error")===0&&f6(e,_)}iPt(e,"error",v);function g(){e.removeListener("finish",p),x()}e.once("close",g);function p(){Wo("onfinish"),e.removeListener("close",g),x()}e.once("finish",p);function x(){Wo("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(Wo("pipe resume"),r.resume()),e};function uPt(e){return function(){var r=e._readableState;Wo("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&HSe(e,"data")&&(r.flowing=!0,kj(e))}}bs.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Wo("on readable",n.length,n.reading),n.length?GL(this):n.reading||process.nextTick(cPt,this)),r};bs.prototype.addListener=bs.prototype.on;bs.prototype.removeListener=function(e,t){var r=h6.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(XSe,this),r};bs.prototype.removeAllListeners=function(e){var t=h6.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(XSe,this),t};function XSe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function cPt(e){Wo("readable nexttick read 0"),e.read(0)}bs.prototype.resume=function(){var e=this._readableState;return e.flowing||(Wo("resume"),e.flowing=!e.readableListening,fPt(this,e)),e.paused=!1,this};function fPt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(hPt,e,t))}function hPt(e,t){Wo("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),kj(e),t.flowing&&!t.reading&&e.read(0)}bs.prototype.pause=function(){return Wo("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Wo("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function kj(e){var t=e._readableState;for(Wo("flow",t.flowing);t.flowing&&e.read()!==null;);}bs.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(Wo("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(Wo("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var a in e)this[a]===void 0&&typeof e[a]=="function"&&(this[a]=(function(s){return function(){return e[s].apply(e,arguments)}})(a));for(var i=0;i=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Mj(e){var t=e._readableState;Wo("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(dPt,t,e))}function dPt(e,t){if(Wo("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(bs.from=function(e,t){return wj===void 0&&(wj=USe()),wj(bs,e,t)});function $Se(e,t){for(var r=0,n=e.length;r{"use strict";QSe.exports=yg;var HL=P2().codes,vPt=HL.ERR_METHOD_NOT_IMPLEMENTED,pPt=HL.ERR_MULTIPLE_CALLBACK,gPt=HL.ERR_TRANSFORM_ALREADY_TRANSFORMING,mPt=HL.ERR_TRANSFORM_WITH_LENGTH_0,jL=F2();gg()(yg,jL);function yPt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new pPt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{"use strict";tEe.exports=d6;var eEe=Cj();gg()(d6,eEe);function d6(e){if(!(this instanceof d6))return new d6(e);eEe.call(this,e)}d6.prototype._transform=function(e,t,r){r(null,e)}});var sEe=fe((jxr,oEe)=>{"use strict";var Lj;function _Pt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var aEe=P2().codes,bPt=aEe.ERR_MISSING_ARGS,wPt=aEe.ERR_STREAM_DESTROYED;function nEe(e){if(e)throw e}function TPt(e){return e.setHeader&&typeof e.abort=="function"}function APt(e,t,r,n){n=_Pt(n);var a=!1;e.on("close",function(){a=!0}),Lj===void 0&&(Lj=BL()),Lj(e,{readable:t,writable:r},function(o){if(o)return n(o);a=!0,n()});var i=!1;return function(o){if(!a&&!i){if(i=!0,TPt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new wPt("pipe"))}}}function iEe(e){e()}function MPt(e,t){return e.pipe(t)}function SPt(e){return!e.length||typeof e[e.length-1]!="function"?nEe:e.pop()}function EPt(){for(var e=arguments.length,t=new Array(e),r=0;r0;return APt(o,l,u,function(c){a||(a=c),c&&i.forEach(iEe),!l&&(i.forEach(iEe),n(a))})});return t.reduce(MPt)}oEe.exports=EPt});var uEe=fe((Wxr,lEe)=>{lEe.exports=Lv;var Pj=Mx().EventEmitter,kPt=gg();kPt(Lv,Pj);Lv.Readable=vj();Lv.Writable=fj();Lv.Duplex=F2();Lv.Transform=Cj();Lv.PassThrough=rEe();Lv.finished=BL();Lv.pipeline=sEe();Lv.Stream=Lv;function Lv(){Pj.call(this)}Lv.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",n);function a(){r.readable&&r.resume&&r.resume()}e.on("drain",a),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var i=!1;function o(){i||(i=!0,e.end())}function s(){i||(i=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),Pj.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",n),e.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var Tw=fe(ts=>{var cEe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},a=0;a=a)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Ij(t)?r.showHidden=t:t&&ts._extend(r,t),B2(r.showHidden)&&(r.showHidden=!1),B2(r.depth)&&(r.depth=2),B2(r.colors)&&(r.colors=!1),B2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=LPt),ZL(r,e,r.depth)}ts.inspect=ty;ty.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]};ty.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function LPt(e,t){var r=ty.styles[t];return r?"\x1B["+ty.colors[r][0]+"m"+e+"\x1B["+ty.colors[r][1]+"m":e}function PPt(e,t){return e}function FPt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function ZL(e,t,r){if(e.customInspect&&t&&XL(t.inspect)&&t.inspect!==ts.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return JL(n)||(n=ZL(e,n,r)),n}var a=DPt(e,t);if(a)return a;var i=Object.keys(t),o=FPt(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),p6(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Fj(t);if(i.length===0){if(XL(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(v6(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if($L(t))return e.stylize(Date.prototype.toString.call(t),"date");if(p6(t))return Fj(t)}var l="",u=!1,c=["{","}"];if(hEe(t)&&(u=!0,c=["[","]"]),XL(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(v6(t)&&(l=" "+RegExp.prototype.toString.call(t)),$L(t)&&(l=" "+Date.prototype.toUTCString.call(t)),p6(t)&&(l=" "+Fj(t)),i.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return v6(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var v;return u?v=RPt(e,t,r,o,i):v=i.map(function(g){return Rj(e,t,r,o,g,u)}),e.seen.pop(),IPt(v,l,c)}function DPt(e,t){if(B2(t))return e.stylize("undefined","undefined");if(JL(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(dEe(t))return e.stylize(""+t,"number");if(Ij(t))return e.stylize(""+t,"boolean");if(KL(t))return e.stylize("null","null")}function Fj(e){return"["+Error.prototype.toString.call(e)+"]"}function RPt(e,t,r,n,a){for(var i=[],o=0,s=t.length;o-1&&(i?s=s.split(` `).map(function(u){return" "+u}).join(` `).slice(2):s=` `+s.split(` `).map(function(u){return" "+u}).join(` -`))):s=e.stylize("[Circular]","special")),Qx(o)){if(i&&a.match(/^\d+$/))return s;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function y4t(e,t,r){var n=0,a=e.reduce(function(i,o){return n++,o.indexOf(` +`))):s=e.stylize("[Circular]","special")),B2(o)){if(i&&a.match(/^\d+$/))return s;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function IPt(e,t,r){var n=0,a=e.reduce(function(i,o){return n++,o.indexOf(` `)>=0&&n++,i+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, - `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}ys.types=eU();function p5e(e){return Array.isArray(e)}ys.isArray=p5e;function OU(e){return typeof e=="boolean"}ys.isBoolean=OU;function K8(e){return e===null}ys.isNull=K8;function x4t(e){return e==null}ys.isNullOrUndefined=x4t;function g5e(e){return typeof e=="number"}ys.isNumber=g5e;function J8(e){return typeof e=="string"}ys.isString=J8;function b4t(e){return typeof e=="symbol"}ys.isSymbol=b4t;function Qx(e){return e===void 0}ys.isUndefined=Qx;function YT(e){return _3(e)&&NU(e)==="[object RegExp]"}ys.isRegExp=YT;ys.types.isRegExp=YT;function _3(e){return typeof e=="object"&&e!==null}ys.isObject=_3;function $8(e){return _3(e)&&NU(e)==="[object Date]"}ys.isDate=$8;ys.types.isDate=$8;function XT(e){return _3(e)&&(NU(e)==="[object Error]"||e instanceof Error)}ys.isError=XT;ys.types.isNativeError=XT;function X8(e){return typeof e=="function"}ys.isFunction=X8;function _4t(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}ys.isPrimitive=_4t;ys.isBuffer=tU();function NU(e){return Object.prototype.toString.call(e)}function qU(e){return e<10?"0"+e.toString(10):e.toString(10)}var w4t=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function T4t(){var e=new Date,t=[qU(e.getHours()),qU(e.getMinutes()),qU(e.getSeconds())].join(":");return[e.getDate(),w4t[e.getMonth()],t].join(" ")}ys.log=function(){console.log("%s - %s",T4t(),ys.format.apply(ys,arguments))};ys.inherits=Y1();ys._extend=function(e,t){if(!t||!_3(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function m5e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Jx=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;ys.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(Jx&&t[Jx]){var r=t[Jx];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,Jx,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,a,i=new Promise(function(l,u){n=l,a=u}),o=[],s=0;s{"use strict";function Lm(e){"@babel/helpers - typeof";return Lm=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lm(e)}function y5e(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function I4t(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function z4t(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function q4t(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}ZT("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);ZT("ERR_INVALID_ARG_TYPE",function(e,t,r){T3===void 0&&(T3=$T()),T3(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&I4t(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var a;if(z4t(e," argument"))a="The ".concat(e," ").concat(n," ").concat(x5e(t,"type"));else{var i=q4t(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(x5e(t,"type"))}return a+=". Received type ".concat(Lm(r)),a},TypeError);ZT("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";UU===void 0&&(UU=w3());var n=UU.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);ZT("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(Lm(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);ZT("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",a=t.length;switch(t=t.map(function(i){return'"'.concat(i,'"')}),a){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,a-1).join(", "),n+=", and ".concat(t[a-1]," arguments");break}return"".concat(n," must be specified")},TypeError);_5e.exports.codes=b5e});var F5e=ne((Glr,L5e)=>{"use strict";function w5e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function T5e(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function X4t(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var tp="",KT="",JT="",Gh="",e2={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},Z4t=10;function S5e(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function QT(e){return WU(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function $4t(e,t,r){var n="",a="",i=0,o="",s=!1,l=QT(e),u=l.split(` -`),c=QT(t).split(` -`),f=0,h="";if(r==="strictEqual"&&Jd(e)==="object"&&Jd(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var v=u[0].length+c[0].length;if(v<=Z4t){if((Jd(e)!=="object"||e===null)&&(Jd(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(e2[r],` + `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}ts.types=$H();function hEe(e){return Array.isArray(e)}ts.isArray=hEe;function Ij(e){return typeof e=="boolean"}ts.isBoolean=Ij;function KL(e){return e===null}ts.isNull=KL;function zPt(e){return e==null}ts.isNullOrUndefined=zPt;function dEe(e){return typeof e=="number"}ts.isNumber=dEe;function JL(e){return typeof e=="string"}ts.isString=JL;function qPt(e){return typeof e=="symbol"}ts.isSymbol=qPt;function B2(e){return e===void 0}ts.isUndefined=B2;function v6(e){return ww(e)&&zj(e)==="[object RegExp]"}ts.isRegExp=v6;ts.types.isRegExp=v6;function ww(e){return typeof e=="object"&&e!==null}ts.isObject=ww;function $L(e){return ww(e)&&zj(e)==="[object Date]"}ts.isDate=$L;ts.types.isDate=$L;function p6(e){return ww(e)&&(zj(e)==="[object Error]"||e instanceof Error)}ts.isError=p6;ts.types.isNativeError=p6;function XL(e){return typeof e=="function"}ts.isFunction=XL;function BPt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}ts.isPrimitive=BPt;ts.isBuffer=KH();function zj(e){return Object.prototype.toString.call(e)}function Dj(e){return e<10?"0"+e.toString(10):e.toString(10)}var OPt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function NPt(){var e=new Date,t=[Dj(e.getHours()),Dj(e.getMinutes()),Dj(e.getSeconds())].join(":");return[e.getDate(),OPt[e.getMonth()],t].join(" ")}ts.log=function(){console.log("%s - %s",NPt(),ts.format.apply(ts,arguments))};ts.inherits=gg();ts._extend=function(e,t){if(!t||!ww(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function vEe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var q2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;ts.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(q2&&t[q2]){var r=t[q2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,q2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,a,i=new Promise(function(l,u){n=l,a=u}),o=[],s=0;s{"use strict";function ry(e){"@babel/helpers - typeof";return ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ry(e)}function pEe(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function JPt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function QPt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function eFt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}g6("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);g6("ERR_INVALID_ARG_TYPE",function(e,t,r){Aw===void 0&&(Aw=e9()),Aw(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&JPt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var a;if(QPt(e," argument"))a="The ".concat(e," ").concat(n," ").concat(gEe(t,"type"));else{var i=eFt(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(gEe(t,"type"))}return a+=". Received type ".concat(ry(r)),a},TypeError);g6("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";qj===void 0&&(qj=Tw());var n=qj.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);g6("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(ry(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);g6("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",a=t.length;switch(t=t.map(function(i){return'"'.concat(i,'"')}),a){case 1:n+="".concat(t[0]," argument");break;case 2:n+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:n+=t.slice(0,a-1).join(", "),n+=", and ".concat(t[a-1]," arguments");break}return"".concat(n," must be specified")},TypeError);yEe.exports.codes=mEe});var kEe=fe((Zxr,EEe)=>{"use strict";function xEe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _Ee(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function fFt(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var wp="",m6="",y6="",Lh="",O2={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},hFt=10;function TEe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function x6(e){return Vj(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function dFt(e,t,r){var n="",a="",i=0,o="",s=!1,l=x6(e),u=l.split(` +`),c=x6(t).split(` +`),f=0,v="";if(r==="strictEqual"&&l0(e)==="object"&&l0(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var g=u[0].length+c[0].length;if(g<=hFt){if((l0(e)!=="object"||e===null)&&(l0(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(O2[r],` `)+"".concat(u[0]," !== ").concat(c[0],` -`)}else if(r!=="strictEqualObject"){var d=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(v2&&(h=` - `.concat(X4t(" ",f),"^"),f=0)}}}for(var m=u[u.length-1],x=c[c.length-1];m===x&&(f++<2?o=` - `.concat(m).concat(o):n=m,u.pop(),c.pop(),!(u.length===0||c.length===0));)m=u[u.length-1],x=c[c.length-1];var g=Math.max(u.length,c.length);if(g===0){var E=l.split(` -`);if(E.length>30)for(E[26]="".concat(tp,"...").concat(Gh);E.length>27;)E.pop();return"".concat(e2.notIdentical,` +`)}else if(r!=="strictEqualObject"){var p=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(g2&&(v=` + `.concat(fFt(" ",f),"^"),f=0)}}}for(var x=u[u.length-1],_=c[c.length-1];x===_&&(f++<2?o=` + `.concat(x).concat(o):n=x,u.pop(),c.pop(),!(u.length===0||c.length===0));)x=u[u.length-1],_=c[c.length-1];var y=Math.max(u.length,c.length);if(y===0){var C=l.split(` +`);if(C.length>30)for(C[26]="".concat(wp,"...").concat(Lh);C.length>27;)C.pop();return"".concat(O2.notIdentical,` -`).concat(E.join(` +`).concat(C.join(` `),` `)}f>3&&(o=` -`.concat(tp,"...").concat(Gh).concat(o),s=!0),n!==""&&(o=` - `.concat(n).concat(o),n="");var M=0,w=e2[r]+` -`.concat(KT,"+ actual").concat(Gh," ").concat(JT,"- expected").concat(Gh),k=" ".concat(tp,"...").concat(Gh," Lines skipped");for(f=0;f1&&f>2&&(y>4?(a+=` -`.concat(tp,"...").concat(Gh),s=!0):y>3&&(a+=` - `.concat(c[f-2]),M++),a+=` - `.concat(c[f-1]),M++),i=f,n+=` -`.concat(JT,"-").concat(Gh," ").concat(c[f]),M++;else if(c.length1&&f>2&&(y>4?(a+=` -`.concat(tp,"...").concat(Gh),s=!0):y>3&&(a+=` - `.concat(u[f-2]),M++),a+=` - `.concat(u[f-1]),M++),i=f,a+=` -`.concat(KT,"+").concat(Gh," ").concat(u[f]),M++;else{var S=c[f],T=u[f],p=T!==S&&(!M5e(T,",")||T.slice(0,-1)!==S);p&&M5e(S,",")&&S.slice(0,-1)===T&&(p=!1,T+=","),p?(y>1&&f>2&&(y>4?(a+=` -`.concat(tp,"...").concat(Gh),s=!0):y>3&&(a+=` - `.concat(u[f-2]),M++),a+=` - `.concat(u[f-1]),M++),i=f,a+=` -`.concat(KT,"+").concat(Gh," ").concat(T),n+=` -`.concat(JT,"-").concat(Gh," ").concat(S),M+=2):(a+=n,n="",(y===1||f===0)&&(a+=` - `.concat(T),M++))}if(M>20&&f1&&f>2&&(w>4?(a+=` +`.concat(wp,"...").concat(Lh),s=!0):w>3&&(a+=` + `.concat(c[f-2]),k++),a+=` + `.concat(c[f-1]),k++),i=f,n+=` +`.concat(y6,"-").concat(Lh," ").concat(c[f]),k++;else if(c.length1&&f>2&&(w>4?(a+=` +`.concat(wp,"...").concat(Lh),s=!0):w>3&&(a+=` + `.concat(u[f-2]),k++),a+=` + `.concat(u[f-1]),k++),i=f,a+=` +`.concat(m6,"+").concat(Lh," ").concat(u[f]),k++;else{var A=c[f],T=u[f],m=T!==A&&(!wEe(T,",")||T.slice(0,-1)!==A);m&&wEe(A,",")&&A.slice(0,-1)===T&&(m=!1,T+=","),m?(w>1&&f>2&&(w>4?(a+=` +`.concat(wp,"...").concat(Lh),s=!0):w>3&&(a+=` + `.concat(u[f-2]),k++),a+=` + `.concat(u[f-1]),k++),i=f,a+=` +`.concat(m6,"+").concat(Lh," ").concat(T),n+=` +`.concat(y6,"-").concat(Lh," ").concat(A),k+=2):(a+=n,n="",(w===1||f===0)&&(a+=` + `.concat(T),k++))}if(k>20&&f30)for(v[26]="".concat(tp,"...").concat(Gh);v.length>27;)v.pop();v.length===1?i=r.call(this,"".concat(h," ").concat(v[0])):i=r.call(this,"".concat(h,` +`).concat(wp,"...").concat(Lh).concat(n,` +`)+"".concat(wp,"...").concat(Lh)}return"".concat(S).concat(s?L:"",` +`).concat(a).concat(n).concat(o).concat(v)}var vFt=(function(e,t){aFt(n,e);var r=oFt(n);function n(a){var i;if(rFt(this,n),l0(a)!=="object"||a===null)throw new cFt("options","Object",a);var o=a.message,s=a.operator,l=a.stackStartFn,u=a.actual,c=a.expected,f=Error.stackTraceLimit;if(Error.stackTraceLimit=0,o!=null)i=r.call(this,String(o));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&process.stderr.getColorDepth()!==1?(wp="\x1B[34m",m6="\x1B[32m",Lh="\x1B[39m",y6="\x1B[31m"):(wp="",m6="",Lh="",y6="")),l0(u)==="object"&&u!==null&&l0(c)==="object"&&c!==null&&"stack"in u&&u instanceof Error&&"stack"in c&&c instanceof Error&&(u=TEe(u),c=TEe(c)),s==="deepStrictEqual"||s==="strictEqual")i=r.call(this,dFt(u,c,s));else if(s==="notDeepStrictEqual"||s==="notStrictEqual"){var v=O2[s],g=x6(u).split(` +`);if(s==="notStrictEqual"&&l0(u)==="object"&&u!==null&&(v=O2.notStrictEqualObject),g.length>30)for(g[26]="".concat(wp,"...").concat(Lh);g.length>27;)g.pop();g.length===1?i=r.call(this,"".concat(v," ").concat(g[0])):i=r.call(this,"".concat(v,` -`).concat(v.join(` +`).concat(g.join(` `),` -`))}else{var d=QT(u),m="",x=e2[s];s==="notDeepEqual"||s==="notEqual"?(d="".concat(e2[s],` +`))}else{var p=x6(u),x="",_=O2[s];s==="notDeepEqual"||s==="notEqual"?(p="".concat(O2[s],` -`).concat(d),d.length>1024&&(d="".concat(d.slice(0,1021),"..."))):(m="".concat(QT(c)),d.length>512&&(d="".concat(d.slice(0,509),"...")),m.length>512&&(m="".concat(m.slice(0,509),"...")),s==="deepEqual"||s==="equal"?d="".concat(x,` +`).concat(p),p.length>1024&&(p="".concat(p.slice(0,1021),"..."))):(x="".concat(x6(c)),p.length>512&&(p="".concat(p.slice(0,509),"...")),x.length>512&&(x="".concat(x.slice(0,509),"...")),s==="deepEqual"||s==="equal"?p="".concat(_,` -`).concat(d,` +`).concat(p,` should equal -`):m=" ".concat(s," ").concat(m)),i=r.call(this,"".concat(d).concat(m))}return Error.stackTraceLimit=f,i.generatedMessage=!o,Object.defineProperty(HU(i),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),i.code="ERR_ASSERTION",i.actual=u,i.expected=c,i.operator=s,Error.captureStackTrace&&Error.captureStackTrace(HU(i),l),i.stack,i.name="AssertionError",k5e(i)}return N4t(n,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(i,o){return WU(this,T5e(T5e({},o),{},{customInspect:!1,depth:0}))}}]),n})(jU(Error),WU.custom);L5e.exports=K4t});var YU=ne((Hlr,D5e)=>{"use strict";var P5e=Object.prototype.toString;D5e.exports=function(t){var r=P5e.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&P5e.call(t.callee)==="[object Function]"),n}});var V5e=ne((jlr,U5e)=>{"use strict";var N5e;Object.keys||(rA=Object.prototype.hasOwnProperty,XU=Object.prototype.toString,R5e=YU(),ZU=Object.prototype.propertyIsEnumerable,I5e=!ZU.call({toString:null},"toString"),z5e=ZU.call(function(){},"prototype"),nA=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],tL=function(e){var t=e.constructor;return t&&t.prototype===e},q5e={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},B5e=(function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!q5e["$"+e]&&rA.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{tL(window[e])}catch(t){return!0}}catch(t){return!0}return!1})(),O5e=function(e){if(typeof window=="undefined"||!B5e)return tL(e);try{return tL(e)}catch(t){return!1}},N5e=function(t){var r=t!==null&&typeof t=="object",n=XU.call(t)==="[object Function]",a=R5e(t),i=r&&XU.call(t)==="[object String]",o=[];if(!r&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var s=z5e&&n;if(i&&t.length>0&&!rA.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var J4t=Array.prototype.slice,Q4t=YU(),G5e=Object.keys,rL=G5e?function(t){return G5e(t)}:V5e(),H5e=Object.keys;rL.shim=function(){if(Object.keys){var t=(function(){var r=Object.keys(arguments);return r&&r.length===arguments.length})(1,2);t||(Object.keys=function(n){return Q4t(n)?H5e(J4t.call(n)):H5e(n)})}else Object.keys=rL;return Object.keys||rL};j5e.exports=rL});var K5e=ne((Ylr,$5e)=>{"use strict";var eTt=$U(),X5e=n8()(),Z5e=d3(),W5e=Object,tTt=Z5e("Array.prototype.push"),Y5e=Z5e("Object.prototype.propertyIsEnumerable"),rTt=X5e?Object.getOwnPropertySymbols:null;$5e.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=W5e(t);if(arguments.length===1)return n;for(var a=1;a{"use strict";var KU=K5e(),nTt=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";var e4e=function(e){return e!==e};t4e.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||e4e(t)&&e4e(r))}});var nL=ne(($lr,r4e)=>{"use strict";var iTt=JU();r4e.exports=function(){return typeof Object.is=="function"?Object.is:iTt}});var aA=ne((Klr,o4e)=>{"use strict";var oTt=$U(),sTt=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",lTt=Object.prototype.toString,uTt=Array.prototype.concat,n4e=Object.defineProperty,cTt=function(e){return typeof e=="function"&&lTt.call(e)==="[object Function]"},fTt=RN()(),a4e=n4e&&fTt,hTt=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!cTt(n)||!n())return}a4e?n4e(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r},i4e=function(e,t){var r=arguments.length>2?arguments[2]:{},n=oTt(t);sTt&&(n=uTt.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a{"use strict";var dTt=nL(),vTt=aA();s4e.exports=function(){var t=dTt();return vTt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var h4e=ne((Qlr,f4e)=>{"use strict";var pTt=aA(),gTt=IT(),mTt=JU(),u4e=nL(),yTt=l4e(),c4e=gTt(u4e(),Object);pTt(c4e,{getPolyfill:u4e,implementation:mTt,shim:yTt});f4e.exports=c4e});var QU=ne((eur,d4e)=>{"use strict";d4e.exports=function(t){return t!==t}});var eV=ne((tur,v4e)=>{"use strict";var xTt=QU();v4e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:xTt}});var g4e=ne((rur,p4e)=>{"use strict";var bTt=aA(),_Tt=eV();p4e.exports=function(){var t=_Tt();return bTt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var b4e=ne((nur,x4e)=>{"use strict";var wTt=IT(),TTt=aA(),ATt=QU(),m4e=eV(),MTt=g4e(),y4e=wTt(m4e(),Number);TTt(y4e,{getPolyfill:m4e,implementation:ATt,shim:MTt});x4e.exports=y4e});var N4e=ne((aur,O4e)=>{"use strict";function _4e(e,t){return CTt(e)||kTt(e,t)||ETt(e,t)||STt()}function STt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ETt(e,t){if(e){if(typeof e=="string")return w4e(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return w4e(e,t)}}function w4e(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function oL(e){return Object.keys(e).filter(BTt).concat(lL(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function I4e(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a{"use strict";function rp(e){"@babel/helpers - typeof";return rp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rp(e)}function U4e(e,t){for(var r=0;r1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;a{"use strict";var CEe=Object.prototype.toString;LEe.exports=function(t){var r=CEe.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&CEe.call(t.callee)==="[object Function]"),n}});var OEe=fe((Kxr,BEe)=>{"use strict";var qEe;Object.keys||(w6=Object.prototype.hasOwnProperty,Hj=Object.prototype.toString,PEe=Gj(),jj=Object.prototype.propertyIsEnumerable,FEe=!jj.call({toString:null},"toString"),DEe=jj.call(function(){},"prototype"),T6=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r9=function(e){var t=e.constructor;return t&&t.prototype===e},REe={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},IEe=(function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!REe["$"+e]&&w6.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{r9(window[e])}catch(t){return!0}}catch(t){return!0}return!1})(),zEe=function(e){if(typeof window=="undefined"||!IEe)return r9(e);try{return r9(e)}catch(t){return!1}},qEe=function(t){var r=t!==null&&typeof t=="object",n=Hj.call(t)==="[object Function]",a=PEe(t),i=r&&Hj.call(t)==="[object String]",o=[];if(!r&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var s=DEe&&n;if(i&&t.length>0&&!w6.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var pFt=Array.prototype.slice,gFt=Gj(),NEe=Object.keys,n9=NEe?function(t){return NEe(t)}:OEe(),UEe=Object.keys;n9.shim=function(){if(Object.keys){var t=(function(){var r=Object.keys(arguments);return r&&r.length===arguments.length})(1,2);t||(Object.keys=function(n){return gFt(n)?UEe(pFt.call(n)):UEe(n)})}else Object.keys=n9;return Object.keys||n9};VEe.exports=n9});var YEe=fe((Qxr,WEe)=>{"use strict";var mFt=Wj(),HEe=Q7()(),jEe=k2(),i9=eL(),yFt=jEe("Array.prototype.push"),GEe=jEe("Object.prototype.propertyIsEnumerable"),xFt=HEe?i9.getOwnPropertySymbols:null;WEe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=i9(t);if(arguments.length===1)return n;for(var a=1;a{"use strict";var Yj=YEe(),_Ft=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";var $Ee=function(e){return e!==e};KEe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||$Ee(t)&&$Ee(r))}});var a9=fe((r2r,JEe)=>{"use strict";var wFt=Xj();JEe.exports=function(){return typeof Object.is=="function"?Object.is:wFt}});var rke=fe((n2r,tke)=>{"use strict";var QEe=uL(),eke=r6(),TFt=eke(QEe("String.prototype.indexOf"));tke.exports=function(t,r){var n=QEe(t,!!r);return typeof n=="function"&&TFt(t,".prototype.")>-1?eke(n):n}});var A6=fe((i2r,oke)=>{"use strict";var AFt=Wj(),MFt=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",SFt=Object.prototype.toString,EFt=Array.prototype.concat,nke=UH(),kFt=function(e){return typeof e=="function"&&SFt.call(e)==="[object Function]"},ike=GH()(),CFt=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!kFt(n)||!n())return}ike?nke(e,t,r,!0):nke(e,t,r)},ake=function(e,t){var r=arguments.length>2?arguments[2]:{},n=AFt(t);MFt&&(n=EFt.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a{"use strict";var LFt=a9(),PFt=A6();ske.exports=function(){var t=LFt();return PFt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var hke=fe((o2r,fke)=>{"use strict";var FFt=A6(),DFt=r6(),RFt=Xj(),uke=a9(),IFt=lke(),cke=DFt(uke(),Object);FFt(cke,{getPolyfill:uke,implementation:RFt,shim:IFt});fke.exports=cke});var Zj=fe((s2r,dke)=>{"use strict";dke.exports=function(t){return t!==t}});var $j=fe((l2r,vke)=>{"use strict";var zFt=Zj();vke.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:zFt}});var gke=fe((u2r,pke)=>{"use strict";var qFt=A6(),BFt=$j();pke.exports=function(){var t=BFt();return qFt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var _ke=fe((c2r,xke)=>{"use strict";var OFt=r6(),NFt=A6(),UFt=Zj(),mke=$j(),VFt=gke(),yke=OFt(mke(),Number);NFt(yke,{getPolyfill:mke,implementation:UFt,shim:VFt});xke.exports=yke});var Nke=fe((f2r,Oke)=>{"use strict";function bke(e,t){return WFt(e)||jFt(e,t)||HFt(e,t)||GFt()}function GFt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HFt(e,t){if(e){if(typeof e=="string")return wke(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wke(e,t)}}function wke(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function l9(e){return Object.keys(e).filter(tDt).concat(c9(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function Ike(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a{"use strict";function Tp(e){"@babel/helpers - typeof";return Tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tp(e)}function Uke(e,t){for(var r=0;r1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;a{var uA=1e3,cA=uA*60,fA=cA*60,hA=fA*24,cAt=hA*365.25;iTe.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return fAt(e);if(r==="number"&&isNaN(e)===!1)return t.long?dAt(e):hAt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function fAt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*cAt;case"days":case"day":case"d":return r*hA;case"hours":case"hour":case"hrs":case"hr":case"h":return r*fA;case"minutes":case"minute":case"mins":case"min":case"m":return r*cA;case"seconds":case"second":case"secs":case"sec":case"s":return r*uA;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function hAt(e){return e>=hA?Math.round(e/hA)+"d":e>=fA?Math.round(e/fA)+"h":e>=cA?Math.round(e/cA)+"m":e>=uA?Math.round(e/uA)+"s":e+"ms"}function dAt(e){return gL(e,hA,"day")||gL(e,fA,"hour")||gL(e,cA,"minute")||gL(e,uA,"second")||e+" ms"}function gL(e,t,r){if(!(e{Ll=sTe.exports=sV.debug=sV.default=sV;Ll.coerce=yAt;Ll.disable=gAt;Ll.enable=pAt;Ll.enabled=mAt;Ll.humanize=oTe();Ll.names=[];Ll.skips=[];Ll.formatters={};var oV;function vAt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Ll.colors[Math.abs(t)%Ll.colors.length]}function sV(e){function t(){if(t.enabled){var r=t,n=+new Date,a=n-(oV||n);r.diff=a,r.prev=oV,r.curr=n,oV=n;for(var i=new Array(arguments.length),o=0;o{Ed=cTe.exports=lTe();Ed.log=_At;Ed.formatArgs=bAt;Ed.save=wAt;Ed.load=uTe;Ed.useColors=xAt;Ed.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:TAt();Ed.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function xAt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Ed.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function bAt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+Ed.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(i){i!=="%%"&&(n++,i==="%c"&&(a=n))}),e.splice(a,0,r)}}function _At(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function wAt(e){try{e==null?Ed.storage.removeItem("debug"):Ed.storage.debug=e}catch(t){}}function uTe(){var e;try{e=Ed.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}Ed.enable(uTe());function TAt(){try{return window.localStorage}catch(e){}}});var xTe=ne((sur,yTe)=>{var M3=$T(),Rm=fTe()("stream-parser");yTe.exports=MAt;var dTe=-1,mL=0,AAt=1,vTe=2;function MAt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");Rm("extending Parser into stream"),e._bytes=SAt,e._skipBytes=EAt,t&&(e._passthrough=kAt),t?e._transform=LAt:e._write=CAt}function dA(e){Rm("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=dTe,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function SAt(e,t){M3(!this._parserCallback,'there is already a "callback" set!'),M3(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||dA(this),Rm("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=mL}function EAt(e,t){M3(!this._parserCallback,'there is already a "callback" set!'),M3(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||dA(this),Rm("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=AAt}function kAt(e,t){M3(!this._parserCallback,'There is already a "callback" set!'),M3(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||dA(this),Rm("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=vTe}function CAt(e,t,r){this._parserInit||dA(this),Rm("write(%o bytes)",e.length),typeof t=="function"&&(r=t),gTe(this,e,null,r)}function LAt(e,t,r){this._parserInit||dA(this),Rm("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),gTe(this,e,t,r)}function pTe(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return hTe(e,t,r,n)}:function(){var a=t.slice(0,e._parserBytesLeft);return hTe(e,a,r,function(i){if(i)return n(i);if(t.length>a.length)return function(){return pTe(e,t.slice(a.length),r,n)}})}}function hTe(e,t,r,n){if(e._parserBytesLeft-=t.length,Rm("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===mL?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===vTe&&r(t),e._parserBytesLeft===0){var a=e._parserCallback;if(a&&e._parserState===mL&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==mL&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=dTe,e._parserBuffers.splice(0),a){var i=[];t&&i.push(t),r&&i.push(r);var o=a.length>i.length;o&&i.push(mTe(n));var s=a.apply(e,i);if(!o||n===s)return n}}else return n}var gTe=mTe(pTe);function mTe(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var el=ne($1=>{"use strict";var bTe=h5e().Transform,FAt=xTe();function vA(){bTe.call(this,{readableObjectMode:!0})}vA.prototype=Object.create(bTe.prototype);vA.prototype.constructor=vA;FAt(vA.prototype);$1.ParserStream=vA;$1.sliceEq=function(e,t,r){for(var n=t,a=0;a{"use strict";var S3=el().readUInt16BE,uV=el().readUInt32BE;function pA(e,t){if(e.length<4+t)return null;var r=uV(e,t);return e.length>4&15,n=e[4]&15,a=e[5]>>4&15,i=S3(e,6),o=8,s=0;si.width||a.width===i.width&&a.height>i.height?a:i}),r=e.reduce(function(a,i){return a.height>i.height||a.height===i.height&&a.width>i.width?a:i}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}xL.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(zAt(e,t),!!t.sizes.length){var r=qAt(t.sizes),n=1;t.transforms.forEach(function(i){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(i.type==="imir"&&(i.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),i.type==="irot")for(var l=0;l{"use strict";function bL(e,t){var r=new Error(e);return r.code=t,r}function BAt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function K1(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!=="II*\0"&&n!=="MM\0*")throw bL("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}K1.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};K1.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw bL("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};K1.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw bL("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};K1.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};K1.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};K1.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};K1.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw bL("unexpected EOF","EBADDATA");for(var h=[],v=c,d=0;d0&&(this.ifds_to_read.push({id:i,offset:h[0]}),f=!0);var x={is_big_endian:this.big_endian,ifd:e,tag:i,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:h,is_subifd_link:f};if(r(x)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};cV.exports.ExifParser=K1;cV.exports.get_orientation=function(e){var t=0;try{return new K1(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var TTe=ne((fur,wTe)=>{"use strict";var OAt=el().str2arr,NAt=el().sliceEq,UAt=el().readUInt32BE,wL=_Te(),VAt=_L(),GAt=OAt("ftyp");wTe.exports=function(e){if(NAt(e,4,GAt)){var t=wL.unbox(e,0);if(t){var r=wL.getMimeType(t.data);if(r){for(var n,a=t.end;;){var i=wL.unbox(e,a);if(!i)break;if(a=i.end,i.boxtype==="mdat")return;if(i.boxtype==="meta"){n=i.data;break}}if(n){var o=wL.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=UAt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=VAt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var STe=ne((hur,MTe)=>{"use strict";var HAt=el().str2arr,jAt=el().sliceEq,ATe=el().readUInt16LE,WAt=HAt("BM");MTe.exports=function(e){if(!(e.length<26)&&jAt(e,0,WAt))return{width:ATe(e,18),height:ATe(e,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}});var FTe=ne((dur,LTe)=>{"use strict";var CTe=el().str2arr,ETe=el().sliceEq,kTe=el().readUInt16LE,YAt=CTe("GIF87a"),XAt=CTe("GIF89a");LTe.exports=function(e){if(!(e.length<10)&&!(!ETe(e,0,YAt)&&!ETe(e,0,XAt)))return{width:kTe(e,6),height:kTe(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var RTe=ne((vur,DTe)=>{"use strict";var fV=el().readUInt16LE,ZAt=0,$At=1,PTe=16;DTe.exports=function(e){var t=fV(e,0),r=fV(e,2),n=fV(e,4);if(!(t!==ZAt||r!==$At||!n)){for(var a=[],i={width:0,height:0},o=0;oi.width||l>i.height)&&(i=u)}return{width:i.width,height:i.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var zTe=ne((pur,ITe)=>{"use strict";var hV=el().readUInt16BE,KAt=el().str2arr,JAt=el().sliceEq,QAt=_L(),e6t=KAt("Exif\0\0");ITe.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(208<=r&&r<=217||r===1)n=0;else if(192<=r&&r<=254){if(e.length-t<2)return;n=hV(e,t)-2,t+=2}else return;if(r===217||r===218)return;var a;if(r===225&&n>=10&&JAt(e,t,e6t)&&(a=QAt.get_orientation(e.slice(t+6,t+n))),n>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(i.orientation=a),i}t+=n}}});var UTe=ne((gur,NTe)=>{"use strict";var OTe=el().str2arr,qTe=el().sliceEq,BTe=el().readUInt32BE,t6t=OTe(`\x89PNG\r +`).concat(d9(e),` +`));var s=new ay({actual:e,expected:t,message:r,operator:a,stackStartFn:n});throw s.generatedMessage=o,s}}Ul.match=function e(t,r,n){r8e(t,r,n,e,"match")};Ul.doesNotMatch=function e(t,r,n){r8e(t,r,n,e,"doesNotMatch")};function n8e(){for(var e=arguments.length,t=new Array(e),r=0;r{var C6=1e3,L6=C6*60,P6=L6*60,F6=P6*24,EDt=F6*365.25;a8e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return kDt(e);if(r==="number"&&isNaN(e)===!1)return t.long?LDt(e):CDt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function kDt(e){if(e=String(e),!(e.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*EDt;case"days":case"day":case"d":return r*F6;case"hours":case"hour":case"hrs":case"hr":case"h":return r*P6;case"minutes":case"minute":case"mins":case"min":case"m":return r*L6;case"seconds":case"second":case"secs":case"sec":case"s":return r*C6;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function CDt(e){return e>=F6?Math.round(e/F6)+"d":e>=P6?Math.round(e/P6)+"h":e>=L6?Math.round(e/L6)+"m":e>=C6?Math.round(e/C6)+"s":e+"ms"}function LDt(e){return y9(e,F6,"day")||y9(e,P6,"hour")||y9(e,L6,"minute")||y9(e,C6,"second")||e+" ms"}function y9(e,t,r){if(!(e{Xs=s8e.exports=nW.debug=nW.default=nW;Xs.coerce=IDt;Xs.disable=DDt;Xs.enable=FDt;Xs.enabled=RDt;Xs.humanize=o8e();Xs.names=[];Xs.skips=[];Xs.formatters={};var rW;function PDt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Xs.colors[Math.abs(t)%Xs.colors.length]}function nW(e){function t(){if(t.enabled){var r=t,n=+new Date,a=n-(rW||n);r.diff=a,r.prev=rW,r.curr=n,rW=n;for(var i=new Array(arguments.length),o=0;o{Fd=c8e.exports=l8e();Fd.log=BDt;Fd.formatArgs=qDt;Fd.save=ODt;Fd.load=u8e;Fd.useColors=zDt;Fd.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:NDt();Fd.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function zDt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Fd.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function qDt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+Fd.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(i){i!=="%%"&&(n++,i==="%c"&&(a=n))}),e.splice(a,0,r)}}function BDt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function ODt(e){try{e==null?Fd.storage.removeItem("debug"):Fd.storage.debug=e}catch(t){}}function u8e(){var e;try{e=Fd.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}Fd.enable(u8e());function NDt(){try{return window.localStorage}catch(e){}}});var x8e=fe((v2r,y8e)=>{var Sw=e9(),oy=f8e()("stream-parser");y8e.exports=VDt;var d8e=-1,x9=0,UDt=1,v8e=2;function VDt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");oy("extending Parser into stream"),e._bytes=GDt,e._skipBytes=HDt,t&&(e._passthrough=jDt),t?e._transform=YDt:e._write=WDt}function D6(e){oy("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=d8e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function GDt(e,t){Sw(!this._parserCallback,'there is already a "callback" set!'),Sw(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||D6(this),oy("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=x9}function HDt(e,t){Sw(!this._parserCallback,'there is already a "callback" set!'),Sw(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||D6(this),oy("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=UDt}function jDt(e,t){Sw(!this._parserCallback,'There is already a "callback" set!'),Sw(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||D6(this),oy("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=v8e}function WDt(e,t,r){this._parserInit||D6(this),oy("write(%o bytes)",e.length),typeof t=="function"&&(r=t),g8e(this,e,null,r)}function YDt(e,t,r){this._parserInit||D6(this),oy("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),g8e(this,e,t,r)}function p8e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return h8e(e,t,r,n)}:function(){var a=t.slice(0,e._parserBytesLeft);return h8e(e,a,r,function(i){if(i)return n(i);if(t.length>a.length)return function(){return p8e(e,t.slice(a.length),r,n)}})}}function h8e(e,t,r,n){if(e._parserBytesLeft-=t.length,oy("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===x9?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===v8e&&r(t),e._parserBytesLeft===0){var a=e._parserCallback;if(a&&e._parserState===x9&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==x9&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=d8e,e._parserBuffers.splice(0),a){var i=[];t&&i.push(t),r&&i.push(r);var o=a.length>i.length;o&&i.push(m8e(n));var s=a.apply(e,i);if(!o||n===s)return n}}else return n}var g8e=m8e(p8e);function m8e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var ds=fe(Ph=>{"use strict";var _8e=uEe().Transform,XDt=x8e();function R6(){_8e.call(this,{readableObjectMode:!0})}R6.prototype=Object.create(_8e.prototype);R6.prototype.constructor=R6;XDt(R6.prototype);Ph.ParserStream=R6;Ph.sliceEq=function(e,t,r){for(var n=t,a=0;a>16};Ph.readInt16BE=function(e,t){return Ph.readUInt16BE(e,t)<<16>>16};Ph.readUInt32LE=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216};Ph.readUInt32BE=function(e,t){return e[t]*16777216+(e[t+1]<<16|e[t+2]<<8|e[t+3])};Ph.readInt32LE=function(e,t){return Ph.readUInt32LE(e,t)|0};Ph.readInt32BE=function(e,t){return Ph.readUInt32BE(e,t)|0};function _9(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}_9.prototype=Object.create(Error.prototype);_9.prototype.constructor=_9;Ph.ProbeError=_9});var b8e=fe((g2r,b9)=>{"use strict";var Ew=ds().readUInt16BE,aW=ds().readUInt32BE;function I6(e,t){if(e.length<4+t)return null;var r=aW(e,t);return e.length>4&15,n=e[4]&15,a=e[5]>>4&15,i=Ew(e,6),o=8,s=0;si.width||a.width===i.width&&a.height>i.height?a:i}),r=e.reduce(function(a,i){return a.height>i.height||a.height===i.height&&a.width>i.width?a:i}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}b9.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(QDt(e,t),!!t.sizes.length){var r=eRt(t.sizes),n=1;t.transforms.forEach(function(i){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(i.type==="imir"&&(i.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),i.type==="irot")for(var l=0;l{"use strict";function w9(e,t){var r=new Error(e);return r.code=t,r}function tRt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function xg(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!=="II*\0"&&n!=="MM\0*")throw w9("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}xg.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};xg.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw w9("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};xg.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw w9("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};xg.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};xg.prototype.exif_format_length=function(e){switch(e){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}};xg.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};xg.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw w9("unexpected EOF","EBADDATA");for(var v=[],g=c,p=0;p0&&(this.ifds_to_read.push({id:i,offset:v[0]}),f=!0);var _={is_big_endian:this.big_endian,ifd:e,tag:i,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:v,is_subifd_link:f};if(r(_)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};oW.exports.ExifParser=xg;oW.exports.get_orientation=function(e){var t=0;try{return new xg(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var T8e=fe((y2r,w8e)=>{"use strict";var rRt=ds().str2arr,nRt=ds().sliceEq,iRt=ds().readUInt32BE,A9=b8e(),aRt=T9(),oRt=rRt("ftyp");w8e.exports=function(e){if(nRt(e,4,oRt)){var t=A9.unbox(e,0);if(t){var r=A9.getMimeType(t.data);if(r){for(var n,a=t.end;;){var i=A9.unbox(e,a);if(!i)break;if(a=i.end,i.boxtype==="mdat")return;if(i.boxtype==="meta"){n=i.data;break}}if(n){var o=A9.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=iRt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=aRt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var E8e=fe((x2r,S8e)=>{"use strict";var sRt=ds().str2arr,lRt=ds().sliceEq,A8e=ds().readInt16LE,M8e=ds().readInt32LE,uRt=ds().readUInt32LE,cRt=sRt("BM");S8e.exports=function(e){if(!(e.length<26)&&lRt(e,0,cRt)){var t,r,n=uRt(e,14);if(n===12)r=A8e(e,18),t=A8e(e,20);else if(n>12)r=M8e(e,18),t=M8e(e,22);else return;return{width:r,height:Math.abs(t),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}});var F8e=fe((_2r,P8e)=>{"use strict";var L8e=ds().str2arr,k8e=ds().sliceEq,C8e=ds().readUInt16LE,fRt=L8e("GIF87a"),hRt=L8e("GIF89a");P8e.exports=function(e){if(!(e.length<10)&&!(!k8e(e,0,fRt)&&!k8e(e,0,hRt)))return{width:C8e(e,6),height:C8e(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var R8e=fe((b2r,D8e)=>{"use strict";var sW=ds().readUInt16LE,dRt=0,vRt=1,lW=16;D8e.exports=function(e){var t=sW(e,0),r=sW(e,2),n=sW(e,4);if(!(t!==dRt||r!==vRt||!n)&&!(e.length<6+n*lW)){for(var a=[],i={width:0,height:0},o=0;oi.width||l>i.height)&&(i=u)}return{width:i.width,height:i.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var z8e=fe((w2r,I8e)=>{"use strict";var uW=ds().readUInt16BE,pRt=ds().str2arr,gRt=ds().sliceEq,mRt=T9(),yRt=pRt("Exif\0\0");I8e.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(r>=208&&r<=217||r===1)n=0;else if(r>=192&&r<=254){if(e.length-t<2)return;n=uW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var a;if(r===225&&n>=10&&gRt(e,t,yRt)&&(a=mRt.get_orientation(e.slice(t+6,t+n))),n>=5&&r>=192&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(i.orientation=a),i}t+=n}}});var U8e=fe((T2r,N8e)=>{"use strict";var O8e=ds().str2arr,q8e=ds().sliceEq,B8e=ds().readUInt32BE,xRt=O8e(`\x89PNG\r  -`),r6t=OTe("IHDR");NTe.exports=function(e){if(!(e.length<24)&&qTe(e,0,t6t)&&qTe(e,12,r6t))return{width:BTe(e,16),height:BTe(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var HTe=ne((mur,GTe)=>{"use strict";var n6t=el().str2arr,a6t=el().sliceEq,VTe=el().readUInt32BE,i6t=n6t("8BPS\0");GTe.exports=function(e){if(!(e.length<22)&&a6t(e,0,i6t))return{width:VTe(e,18),height:VTe(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var YTe=ne((yur,WTe)=>{"use strict";function o6t(e){return e===32||e===9||e===13||e===10}function E3(e){return typeof e=="number"&&isFinite(e)&&e>0}function s6t(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,u6t=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,c6t=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,f6t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,h6t=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,jTe=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function d6t(e){var t=e.match(c6t),r=e.match(f6t),n=e.match(h6t);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function Qp(e){return jTe.test(e)?e.match(jTe)[0]:"px"}WTe.exports=function(e){if(s6t(e)){for(var t="",r=0;r{"use strict";var $Te=el().str2arr,XTe=el().sliceEq,v6t=el().readUInt16LE,p6t=el().readUInt16BE,g6t=el().readUInt32LE,m6t=el().readUInt32BE,y6t=$Te("II*\0"),x6t=$Te("MM\0*");function TL(e,t,r){return r?p6t(e,t):v6t(e,t)}function dV(e,t,r){return r?m6t(e,t):g6t(e,t)}function ZTe(e,t,r){var n=TL(e,t+2,r),a=dV(e,t+4,r);return a!==1||n!==3&&n!==4?null:n===3?TL(e,t+8,r):dV(e,t+8,r)}KTe.exports=function(e){if(!(e.length<8)&&!(!XTe(e,0,y6t)&&!XTe(e,0,x6t))){var t=e[0]===77,r=dV(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var a=TL(e,n+0,t)*12;if(!(a<=0)&&(n+=2,!(e.length-n{"use strict";var tAe=el().str2arr,QTe=el().sliceEq,eAe=el().readUInt16LE,vV=el().readUInt32LE,b6t=_L(),_6t=tAe("RIFF"),w6t=tAe("WEBP");function T6t(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:eAe(e,t+6)&16383,height:eAe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function A6t(e,t){if(e[t]===47){var r=vV(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function M6t(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<e.length)){for(;t+8=10?r=r||T6t(e,t+8):i==="VP8L"&&o>=9?r=r||A6t(e,t+8):i==="VP8X"&&o>=10?r=r||M6t(e,t+8):i==="EXIF"&&(n=b6t.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var iAe=ne((_ur,aAe)=>{"use strict";aAe.exports={avif:TTe(),bmp:STe(),gif:FTe(),ico:RTe(),jpeg:zTe(),png:UTe(),psd:HTe(),svg:YTe(),tiff:JTe(),webp:nAe()}});var oAe=ne((wur,gV)=>{"use strict";var pV=iAe();function S6t(e){for(var t=Object.keys(pV),r=0;r{"use strict";var E6t=oAe(),k6t=z1().IMAGE_URL_PREFIX,C6t=Ux().Buffer;sAe.getImageSize=function(e){var t=e.replace(k6t,""),r=new C6t(t,"base64");return E6t(r)}});var fAe=ne((Aur,cAe)=>{"use strict";var uAe=Zt(),L6t=t3(),F6t=mi(),AL=ri(),P6t=Zt().maxRowLength,D6t=lAe().getImageSize;cAe.exports=function(t,r){var n,a;if(r._hasZ)n=r.z.length,a=P6t(r.z);else if(r._hasSource){var i=D6t(r.source);n=i.height,a=i.width}var o=AL.getFromId(t,r.xaxis||"x"),s=AL.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+a*r.dx],h=[u,u+n*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var q6t=Ea(),t2=Zt(),hAe=t2.strTranslate,B6t=qv(),O6t=t3(),N6t=tO(),U6t=TC().STYLE;dAe.exports=function(t,r,n,a){var i=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&N6t();t2.makeTraceGroups(a,n,"im").each(function(l){var u=q6t.select(this),c=l[0],f=c.trace,h=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&i.type==="linear"&&o.type==="linear";f._realImage=h;var v=c.z,d=c.x0,m=c.y0,x=c.w,g=c.h,E=f.dx,M=f.dy,w,k,y,S,T,p;for(p=0;w===void 0&&p0;)k=i.c2p(d+p*E),p--;for(p=0;S===void 0&&p0;)T=o.c2p(m+p*M),p--;if(kB[0];if(Y||X){var te=w+A/2,se=S+P/2;O+="transform:"+hAe(te+"px",se+"px")+"scale("+(Y?-1:1)+","+(X?-1:1)+")"+hAe(-te+"px",-se+"px")+";"}}U.attr("style",O);var ue=new Promise(function(re){if(f._hasZ)re();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===x&&f._canvas.el.height===g&&f._canvas.source===f.source)re();else{var j=document.createElement("canvas");j.width=x,j.height=g;var fe=j.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var ce=f._image;ce.onload=function(){fe.drawImage(ce,0,0),f._canvas={el:j,source:f.source},re()},ce.setAttribute("src",f.source)}}).then(function(){var re,j;if(f._hasZ)j=q(function(oe,we){var he=v[we][oe];return t2.isTypedArray(he)&&(he=Array.from(he)),he}),re=j.toDataURL("image/png");else if(f._hasSource)if(h)re=f.source;else{var fe=f._canvas.el.getContext("2d",{willReadFrequently:!0}),ce=fe.getImageData(0,0,x,g).data;j=q(function(oe,we){var he=4*(we*x+oe);return[ce[he],ce[he+1],ce[he+2],ce[he+3]]}),re=j.toDataURL("image/png")}U.attr({"xlink:href":re,height:P,width:A,x:w,y:S})});t._promises.push(ue)})}});var gAe=ne((Sur,pAe)=>{"use strict";var V6t=Ea();pAe.exports=function(t){V6t.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var bAe=ne((Eur,xAe)=>{"use strict";var mAe=cu(),yAe=Zt(),ML=yAe.isArrayOrTypedArray,G6t=t3();xAe.exports=function(t,r,n){var a=t.cd[0],i=a.trace,o=t.xa,s=t.ya;if(!(mAe.inbox(r-a.x0,r-(a.x0+a.w*i.dx),0)>0||mAe.inbox(n-a.y0,n-(a.y0+a.h*i.dy),0)>0)){var l=Math.floor((r-a.x0)/i.dx),u=Math.floor(Math.abs(n-a.y0)/i.dy),c;if(i._hasZ?c=a.z[u][l]:i._hasSource&&(c=i._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=a.hi||i.hoverinfo,h;if(f){var v=f.split("+");v.indexOf("all")!==-1&&(v=["color"]),v.indexOf("color")!==-1&&(h=!0)}var d=G6t.colormodel[i.colormodel],m=d.colormodel||i.colormodel,x=m.length,g=i._scaler(c),E=d.suffix,M=[];(i.hovertemplate||h)&&(M.push("["+[g[0]+E[0],g[1]+E[1],g[2]+E[2]].join(", ")),x===4&&M.push(", "+g[3]+E[3]),M.push("]"),M=M.join(""),t.extraText=m.toUpperCase()+": "+M);var w;ML(i.hovertext)&&ML(i.hovertext[u])?w=i.hovertext[u][l]:ML(i.text)&&ML(i.text[u])&&(w=i.text[u][l]);var k=s.c2p(a.y0+(u+.5)*i.dy),y=a.x0+(l+.5)*i.dx,S=a.y0+(u+.5)*i.dy,T="["+c.slice(0,i.colormodel.length).join(", ")+"]";return[yAe.extendFlat(t,{index:[u,l],x0:o.c2p(a.x0+l*i.dx),x1:o.c2p(a.x0+(l+1)*i.dx),y0:k,y1:k,color:g,xVal:y,xLabelVal:y,yVal:S,yLabelVal:S,zLabelVal:T,text:w,hovertemplateLabels:{zLabel:T,colorLabel:M,"color[0]Label":g[0]+E[0],"color[1]Label":g[1]+E[1],"color[2]Label":g[2]+E[2],"color[3]Label":g[3]+E[3]}})]}}}});var wAe=ne((kur,_Ae)=>{"use strict";_Ae.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var AAe=ne((Cur,TAe)=>{"use strict";TAe.exports={attributes:(hN(),vl(fN)).default,supplyDefaults:bbe(),calc:fAe(),plot:vAe(),style:gAe(),hoverPoints:bAe(),eventData:wAe(),moduleType:"trace",name:"image",basePlotModule:Ku(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var SAe=ne((Lur,MAe)=>{"use strict";MAe.exports=AAe()});var r2=ne((Fur,kAe)=>{"use strict";var SL=os(),H6t=zl().attributes,j6t=pl(),W6t=Ic(),{hovertemplateAttrs:Y6t,texttemplateAttrs:X6t,templatefallbackAttrs:EAe}=rs(),Im=ci().extendFlat,Z6t=xf().pattern,EL=j6t({editType:"plot",arrayOk:!0,colorEditType:"plot"});kAe.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:W6t.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:Z6t,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:Im({},SL.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:Y6t({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:EAe(),texttemplate:X6t({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:EAe({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:Im({},EL,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:Im({},EL,{}),outsidetextfont:Im({},EL,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:Im({},SL.showlegend,{arrayOk:!0}),legend:Im({},SL.legend,{arrayOk:!0}),legendrank:Im({},SL.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:Im({},EL,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:H6t({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:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}});var n2=ne((Pur,FAe)=>{"use strict";var $6t=mi(),gA=Zt(),K6t=r2(),J6t=zl().defaults,Q6t=wv().handleText,eMt=Zt().coercePattern;function CAe(e,t){var r=gA.isArrayOrTypedArray(e),n=gA.isArrayOrTypedArray(t),a=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(a)||(a=0),a&&n){for(var i,o=0;o0){i=!0;break}}i||(a=0)}return{hasLabels:r,hasValues:n,len:a}}function LAe(e,t,r,n,a){var i=n("marker.line.width");i&&n("marker.line.color",a?void 0:r.paper_bgcolor);var o=n("marker.colors");eMt(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function tMt(e,t,r,n){function a(E,M){return gA.coerce(e,t,K6t,E,M)}var i=a("labels"),o=a("values"),s=CAe(i,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(a("label0"),a("dlabel")),!l){t.visible=!1;return}t._length=l,LAe(e,t,n,a,!0),a("scalegroup");var u=a("text"),c=a("texttemplate");a("texttemplatefallback");var f;if(c||(f=a("textinfo",gA.isArrayOrTypedArray(u)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),c||f&&f!=="none"){var h=a("textposition");Q6t(e,t,n,a,h,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var v=Array.isArray(h)||h==="auto",d=v||h==="outside";d&&a("automargin"),(h==="inside"||h==="auto"||Array.isArray(h))&&a("insidetextorientation")}else f==="none"&&a("textposition","none");J6t(t,n,a);var m=a("hole"),x=a("title.text");if(x){var g=a("title.position",m?"middle center":"top center");!m&&g==="middle center"&&(t.title.position="top center"),gA.coerceFont(a,"title.font",n.font)}a("sort"),a("direction"),a("rotation"),a("pull")}FAe.exports={handleLabelsAndValues:CAe,handleMarkerDefaults:LAe,supplyDefaults:tMt}});var kL=ne((Dur,PAe)=>{"use strict";PAe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var RAe=ne((Rur,DAe)=>{"use strict";var rMt=Zt(),nMt=kL();DAe.exports=function(t,r){function n(a,i){return rMt.coerce(t,r,nMt,a,i)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var k3=ne((Iur,qAe)=>{"use strict";var aMt=mi(),CL=_a(),iMt={};function oMt(e,t){var r=[],n=e._fullLayout,a=n.hiddenlabels||[],i=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(i=new Array(l),c=0;c=0});var w=t.type==="funnelarea"?m:t.sort;return w&&r.sort(function(k,y){return y.v-k.v}),r[0]&&(r[0].vTotal=d),r}function IAe(e){return function(r,n){if(!r||!CL.isValid(r))return!1;let a=CL.color(r).rgb().string();return e[n]||(e[n]=a),a}}function sMt(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,i=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(i=zAe(i,iMt));for(var s=0,l=0;l{"use strict";var lMt=Hd().appendArrayMultiPointValues;BAe.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),lMt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var DL=ne((qur,o6e)=>{"use strict";var Qd=Ea(),uMt=Sl(),LL=cu(),jAe=_a(),J1=li(),Ah=Zt(),cMt=Ah.strScale,NAe=Ah.strTranslate,mV=Ms(),WAe=Uh(),fMt=WAe.recordMinTextSize,hMt=WAe.clearMinTextSize,YAe=um().TEXTPAD,Bi=em(),FL=OAe(),UAe=Zt().isValidTextValue;function dMt(e,t){var r=e._context.staticPlot,n=e._fullLayout,a=n._size;hMt("pie",n),$Ae(t,e),n6e(t,a);var i=Ah.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=Qd.select(this),l=o[0],u=l.trace;wMt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=Qd.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],h=!1;c.each(function(w,k){if(w.hidden){Qd.select(this).selectAll("path,g").remove();return}w.pointNumber=w.i,w.curveNumber=u.index,f[w.pxmid[1]<0?0:1][w.pxmid[0]<0?0:1].push(w);var y=l.cx,S=l.cy,T=Qd.select(this),p=T.selectAll("path.surface").data([w]);if(p.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),T.call(XAe,e,o),u.pull){var C=+Bi.castOption(u.pull,w.pts)||0;C>0&&(y+=C*w.pxmid[0],S+=C*w.pxmid[1])}w.cxFinal=y,w.cyFinal=S;function A(R,B,Y,X){var te=X*(B[0]-R[0]),se=X*(B[1]-R[1]);return"a"+X*l.r+","+X*l.r+" 0 "+w.largeArc+(Y?" 1 ":" 0 ")+te+","+se}var P=u.hole;if(w.v===l.vTotal){var D="M"+(y+w.px0[0])+","+(S+w.px0[1])+A(w.px0,w.pxmid,!0,1)+A(w.pxmid,w.px0,!0,1)+"Z";P?p.attr("d","M"+(y+P*w.px0[0])+","+(S+P*w.px0[1])+A(w.px0,w.pxmid,!1,P)+A(w.pxmid,w.px0,!1,P)+"Z"+D):p.attr("d",D)}else{var z=A(w.px0,w.px1,!0,1);if(P){var q=1-P;p.attr("d","M"+(y+P*w.px1[0])+","+(S+P*w.px1[1])+A(w.px1,w.px0,!1,P)+"l"+q*w.px0[0]+","+q*w.px0[1]+z+"Z")}else p.attr("d","M"+y+","+S+"l"+w.px0[0]+","+w.px0[1]+z+"Z")}a6e(e,w,l);var U=Bi.castOption(u.textposition,w.pts),O=T.selectAll("g.slicetext").data(w.text&&U!=="none"?[0]:[]);O.enter().append("g").classed("slicetext",!0),O.exit().remove(),O.each(function(){var R=Ah.ensureSingle(Qd.select(this),"text","",function(j){j.attr("data-notex",1)}),B=Ah.ensureUniformFontSize(e,U==="outside"?pMt(u,w,n.font):ZAe(u,w,n.font));R.text(w.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(J1.font,B).call(mV.convertToTspans,e);var Y=J1.bBox(R.node()),X;if(U==="outside")X=HAe(Y,w);else if(X=KAe(Y,w,l),U==="auto"&&X.scale<1){var te=Ah.ensureUniformFontSize(e,u.outsidetextfont);R.call(J1.font,te),Y=J1.bBox(R.node()),X=HAe(Y,w)}var se=X.textPosAngle,ue=se===void 0?w.pxmid:PL(l.r,se);if(X.targetX=y+ue[0]*X.rCenter+(X.x||0),X.targetY=S+ue[1]*X.rCenter+(X.y||0),i6e(X,Y),X.outside){var re=X.targetY;w.yLabelMin=re-Y.height/2,w.yLabelMid=re,w.yLabelMax=re+Y.height/2,w.labelExtraX=0,w.labelExtraY=0,h=!0}X.fontSize=B.size,fMt(u.type,X,n),o[k].transform=X,Ah.setTransormAndDisplay(R,X)})});var v=Qd.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(v.enter().append("g").classed("titletext",!0),v.exit().remove(),v.each(function(){var w=Ah.ensureSingle(Qd.select(this),"text","",function(S){S.attr("data-notex",1)}),k=u.title.text;u._meta&&(k=Ah.templateString(k,u._meta)),w.text(k).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(J1.font,u.title.font).call(mV.convertToTspans,e);var y;u.title.position==="middle center"?y=yMt(l):y=t6e(l,a),w.attr("transform",NAe(y.x,y.y)+cMt(Math.min(1,y.scale))+NAe(y.tx,y.ty))}),h&&bMt(f,u),vMt(c,u),h&&u.automargin){var d=J1.bBox(s.node()),m=u.domain,x=a.w*(m.x[1]-m.x[0]),g=a.h*(m.y[1]-m.y[0]),E=(.5*x-l.r)/a.w,M=(.5*g-l.r)/a.h;uMt.autoMargin(e,"pie."+u.uid+".automargin",{xl:m.x[0]-E,xr:m.x[1]+E,yb:m.y[0]-M,yt:m.y[1]+M,l:Math.max(l.cx-l.r-d.left,0),r:Math.max(d.right-(l.cx+l.r),0),b:Math.max(d.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-d.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var o=Qd.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function vMt(e,t){e.each(function(r){var n=Qd.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select("path.textline").remove();return}var a=n.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,Ah.setTransormAndDisplay(a,r.transform);var i=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+i+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(i+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;Ah.ensureSingle(n,"path","textline").call(jAe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function XAe(e,t,r){var n=r[0],a=n.cx,i=n.cy,o=n.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=LL.castHoverinfo({hoverinfo:[Bi.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var h=l.rInscribed||0,v=a+l.pxmid[0]*(1-h),d=i+l.pxmid[1]*(1-h),m=u.separators,x=[];if(f&&f.indexOf("label")!==-1&&x.push(l.label),l.text=Bi.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var g=l.text;Ah.isValidTextValue(g)&&x.push(g)}l.value=l.v,l.valueLabel=Bi.formatPieValue(l.v,m),f&&f.indexOf("value")!==-1&&x.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=Bi.formatPiePercent(l.percent,m),f&&f.indexOf("percent")!==-1&&x.push(l.percentLabel);var E=c.hoverlabel,M=E.font,w=[];LL.loneHover({trace:o,x0:v-h*n.r,x1:v+h*n.r,y:d,_x0:s?a+l.TL[0]:v-h*n.r,_x1:s?a+l.TR[0]:v+h*n.r,_y0:s?i+l.TL[1]:d-h*n.r,_y1:s?i+l.BL[1]:d+h*n.r,text:x.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:Bi.castOption(E.bgcolor,l.pts)||l.color,borderColor:Bi.castOption(E.bordercolor,l.pts),fontFamily:Bi.castOption(M.family,l.pts),fontSize:Bi.castOption(M.size,l.pts),fontColor:Bi.castOption(M.color,l.pts),nameLength:Bi.castOption(E.namelength,l.pts),textAlign:Bi.castOption(E.align,l.pts),hovertemplate:Bi.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[FL(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:w}),l.bbox=w[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[FL(l,c)],event:Qd.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=Qd.select(this).datum();o._hasHoverEvent&&(l.originalEvent=Qd.event,t.emit("plotly_unhover",{points:[FL(f,c)],event:Qd.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(LL.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[FL(l,c)],LL.click(t,Qd.event))})}function pMt(e,t,r){var n=Bi.castOption(e.outsidetextfont.color,t.pts)||Bi.castOption(e.textfont.color,t.pts)||r.color,a=Bi.castOption(e.outsidetextfont.family,t.pts)||Bi.castOption(e.textfont.family,t.pts)||r.family,i=Bi.castOption(e.outsidetextfont.size,t.pts)||Bi.castOption(e.textfont.size,t.pts)||r.size,o=Bi.castOption(e.outsidetextfont.weight,t.pts)||Bi.castOption(e.textfont.weight,t.pts)||r.weight,s=Bi.castOption(e.outsidetextfont.style,t.pts)||Bi.castOption(e.textfont.style,t.pts)||r.style,l=Bi.castOption(e.outsidetextfont.variant,t.pts)||Bi.castOption(e.textfont.variant,t.pts)||r.variant,u=Bi.castOption(e.outsidetextfont.textcase,t.pts)||Bi.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Bi.castOption(e.outsidetextfont.lineposition,t.pts)||Bi.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Bi.castOption(e.outsidetextfont.shadow,t.pts)||Bi.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:a,size:i,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function ZAe(e,t,r){var n=Bi.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=Bi.castOption(e._input.textfont.color,t.pts));var a=Bi.castOption(e.insidetextfont.family,t.pts)||Bi.castOption(e.textfont.family,t.pts)||r.family,i=Bi.castOption(e.insidetextfont.size,t.pts)||Bi.castOption(e.textfont.size,t.pts)||r.size,o=Bi.castOption(e.insidetextfont.weight,t.pts)||Bi.castOption(e.textfont.weight,t.pts)||r.weight,s=Bi.castOption(e.insidetextfont.style,t.pts)||Bi.castOption(e.textfont.style,t.pts)||r.style,l=Bi.castOption(e.insidetextfont.variant,t.pts)||Bi.castOption(e.textfont.variant,t.pts)||r.variant,u=Bi.castOption(e.insidetextfont.textcase,t.pts)||Bi.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Bi.castOption(e.insidetextfont.lineposition,t.pts)||Bi.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Bi.castOption(e.insidetextfont.shadow,t.pts)||Bi.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||jAe.contrast(t.color),family:a,size:i,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function $Ae(e,t){for(var r,n,a=0;a=-4;E-=2)g(Math.PI*E,"tan");for(E=4;E>=-4;E-=2)g(Math.PI*(E+1),"tan")}if(f||v){for(E=4;E>=-4;E-=2)g(Math.PI*(E+1.5),"rad");for(E=4;E>=-4;E-=2)g(Math.PI*(E+.5),"rad")}}if(s||d||f){var M=Math.sqrt(e.width*e.width+e.height*e.height);if(x={scale:a*n*2/M,rCenter:1-a,rotate:0},x.textPosAngle=(t.startangle+t.stopangle)/2,x.scale>=1)return x;m.push(x)}(d||v)&&(x=VAe(e,n,o,l,u),x.textPosAngle=(t.startangle+t.stopangle)/2,m.push(x)),(d||h)&&(x=GAe(e,n,o,l,u),x.textPosAngle=(t.startangle+t.stopangle)/2,m.push(x));for(var w=0,k=0,y=0;y=1)break}return m[w]}function gMt(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function yMt(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function t6e(e,t){var r=1,n=1,a,i=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=r6e(i),i.title.position.indexOf("top")!==-1?(o.y-=(1+a)*e.r,s.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(o.y+=(1+a)*e.r);var l=xMt(e.r,e.trace.aspectratio),u=t.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+a)*l,s.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+a)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=yV(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function xMt(e,t){return e/(t===void 0?1:t)}function yV(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function r6e(e){var t=e.pull;if(!t)return 0;var r;if(Ah.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function bMt(e,t){var r,n,a,i,o,s,l,u,c,f,h,v,d;function m(M,w){return M.pxmid[1]-w.pxmid[1]}function x(M,w){return w.pxmid[1]-M.pxmid[1]}function g(M,w){w||(w={});var k=w.labelExtraY+(n?w.yLabelMax:w.yLabelMin),y=n?M.yLabelMin:M.yLabelMax,S=n?M.yLabelMax:M.yLabelMin,T=M.cyFinal+o(M.px0[1],M.px1[1]),p=k-y,C,A,P,D,z,q;if(p*l>0&&(M.labelExtraY=p),!!Ah.isArrayOrTypedArray(t.pull))for(A=0;A=(Bi.castOption(t.pull,P.pts)||0))&&((M.pxmid[1]-P.pxmid[1])*l>0?(D=P.cyFinal+o(P.px0[1],P.px1[1]),p=D-y-M.labelExtraY,p*l>0&&(M.labelExtraY+=p)):(S+M.labelExtraY-T)*l>0&&(C=3*s*Math.abs(A-f.indexOf(M)),z=P.cxFinal+i(P.px0[0],P.px1[0]),q=z+C-(M.cxFinal+M.pxmid[0])-M.labelExtraX,q*s>0&&(M.labelExtraX+=q)))}for(n=0;n<2;n++)for(a=n?m:x,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=e[n][r],u.sort(a),c=e[1-n][r],f=c.concat(u),v=[],h=0;h1?(u=r.r,c=u/a.aspectratio):(c=r.r,u=c*a.aspectratio),u*=(1+a.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;nt.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=mMt(u,t))}function PL(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function a6e(e,t,r){var n=e._fullLayout,a=r.trace,i=a.texttemplate,o=a.textinfo;if(!i&&o&&o!=="none"){var s=o.split("+"),l=function(w){return s.indexOf(w)!==-1},u=l("label"),c=l("text"),f=l("value"),h=l("percent"),v=n.separators,d;if(d=u?[t.label]:[],c){var m=Bi.getFirstFilled(a.text,t.pts);UAe(m)&&d.push(m)}f&&d.push(Bi.formatPieValue(t.v,v)),h&&d.push(Bi.formatPiePercent(t.v/r.vTotal,v)),t.text=d.join("
")}function x(w){return{label:w.label,value:w.v,valueLabel:Bi.formatPieValue(w.v,n.separators),percent:w.v/r.vTotal,percentLabel:Bi.formatPiePercent(w.v/r.vTotal,n.separators),color:w.color,text:w.text,customdata:Ah.castOption(a,w.i,"customdata")}}if(i){var g=Ah.castOption(a,t.i,"texttemplate");if(!g)t.text="";else{var E=x(t),M=Bi.getFirstFilled(a.text,t.pts);(UAe(M)||M==="")&&(E.text=M),t.text=Ah.texttemplateString({data:[E,a._meta],fallback:a.texttemplatefallback,labels:E,locale:e._fullLayout._d3locale,template:g})}}}function i6e(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),a=Math.sin(r),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*n-o*a,e.textY=i*a+o*n,e.noCenter=!0}o6e.exports={plot:dMt,formatSliceLabel:a6e,transformInsideText:KAe,determineInsideTextFont:ZAe,positionTitleOutside:t6e,prerenderTitles:$Ae,layoutAreas:n6e,attachFxHandlers:XAe,computeTransform:i6e}});var u6e=ne((Bur,l6e)=>{"use strict";var s6e=Ea(),TMt=Kb(),AMt=Uh().resizeText;l6e.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");AMt(t,r,"pie"),r.each(function(n){var a=n[0],i=a.trace,o=s6e.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(s){s6e.select(this).call(TMt,s,i,t)})})}});var f6e=ne(C3=>{"use strict";var c6e=Sl();C3.name="pie";C3.plot=function(e,t,r,n){c6e.plotBasePlot(C3.name,e,t,r,n)};C3.clean=function(e,t,r,n){c6e.cleanBasePlot(C3.name,e,t,r,n)}});var d6e=ne((Nur,h6e)=>{"use strict";h6e.exports={attributes:r2(),supplyDefaults:n2().supplyDefaults,supplyLayoutDefaults:RAe(),layoutAttributes:kL(),calc:k3().calc,crossTraceCalc:k3().crossTraceCalc,plot:DL().plot,style:u6e(),styleOne:Kb(),moduleType:"trace",name:"pie",basePlotModule:f6e(),categories:["pie-like","pie","showLegend"],meta:{}}});var p6e=ne((Uur,v6e)=>{"use strict";v6e.exports=d6e()});var m6e=ne(L3=>{"use strict";var g6e=Sl();L3.name="sunburst";L3.plot=function(e,t,r,n){g6e.plotBasePlot(L3.name,e,t,r,n)};L3.clean=function(e,t,r,n){g6e.cleanBasePlot(L3.name,e,t,r,n)}});var xV=ne((Gur,y6e)=>{"use strict";y6e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var yA=ne((Hur,_6e)=>{"use strict";var MMt=os(),{hovertemplateAttrs:SMt,texttemplateAttrs:EMt,templatefallbackAttrs:x6e}=rs(),kMt=Ys(),CMt=zl().attributes,Q1=r2(),b6e=xV(),mA=ci().extendFlat,LMt=xf().pattern;_6e.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:mA({colors:{valType:"data_array",editType:"calc"},line:{color:mA({},Q1.marker.line.color,{dflt:null}),width:mA({},Q1.marker.line.width,{dflt:1}),editType:"calc"},pattern:LMt,editType:"calc"},kMt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:Q1.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:EMt({editType:"plot"},{keys:b6e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:x6e({editType:"plot"}),hovertext:Q1.hovertext,hoverinfo:mA({},MMt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:SMt({},{keys:b6e.eventDataKeys}),hovertemplatefallback:x6e(),textfont:Q1.textfont,insidetextorientation:Q1.insidetextorientation,insidetextfont:Q1.insidetextfont,outsidetextfont:mA({},Q1.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:Q1.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:CMt({name:"sunburst",trace:!0,editType:"calc"})}});var bV=ne((jur,w6e)=>{"use strict";w6e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var S6e=ne((Wur,M6e)=>{"use strict";var T6e=Zt(),FMt=yA(),PMt=zl().defaults,DMt=wv().handleText,RMt=n2().handleMarkerDefaults,A6e=El(),IMt=A6e.hasColorscale,zMt=A6e.handleDefaults;M6e.exports=function(t,r,n,a){function i(h,v){return T6e.coerce(t,r,FMt,h,v)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),RMt(t,r,a,i);var u=r._hasColorscale=IMt(t,"marker","colors")||(t.marker||{}).coloraxis;u&&zMt(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",u?1:.7);var c=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",T6e.isArrayOrTypedArray(c)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f="auto";DMt(t,r,a,i,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("insidetextorientation"),i("sort"),i("rotation"),i("root.color"),PMt(r,a,i),r._length=null}});var k6e=ne((Yur,E6e)=>{"use strict";var qMt=Zt(),BMt=bV();E6e.exports=function(t,r){function n(a,i){return qMt.coerce(t,r,BMt,a,i)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var xA=ne((RL,C6e)=>{(function(e,t){typeof RL=="object"&&typeof C6e!="undefined"?t(RL):(e=e||self,t(e.d3=e.d3||{}))})(RL,function(e){"use strict";function t(Ae,Re){return Ae.parent===Re.parent?1:2}function r(Ae){return Ae.reduce(n,0)/Ae.length}function n(Ae,Re){return Ae+Re.x}function a(Ae){return 1+Ae.reduce(i,0)}function i(Ae,Re){return Math.max(Ae,Re.y)}function o(Ae){for(var Re;Re=Ae.children;)Ae=Re[0];return Ae}function s(Ae){for(var Re;Re=Ae.children;)Ae=Re[Re.length-1];return Ae}function l(){var Ae=t,Re=1,Ze=1,Ke=!1;function _t(St){var Vt,fr=0;St.eachAfter(function(Er){var zr=Er.children;zr?(Er.x=r(zr),Er.y=a(zr)):(Er.x=Vt?fr+=Ae(Er,Vt):0,Er.y=0,Vt=Er)});var $t=o(St),gr=s(St),Br=$t.x-Ae($t,gr)/2,Nr=gr.x+Ae(gr,$t)/2;return St.eachAfter(Ke?function(Er){Er.x=(Er.x-St.x)*Re,Er.y=(St.y-Er.y)*Ze}:function(Er){Er.x=(Er.x-Br)/(Nr-Br)*Re,Er.y=(1-(St.y?Er.y/St.y:1))*Ze})}return _t.separation=function(St){return arguments.length?(Ae=St,_t):Ae},_t.size=function(St){return arguments.length?(Ke=!1,Re=+St[0],Ze=+St[1],_t):Ke?null:[Re,Ze]},_t.nodeSize=function(St){return arguments.length?(Ke=!0,Re=+St[0],Ze=+St[1],_t):Ke?[Re,Ze]:null},_t}function u(Ae){var Re=0,Ze=Ae.children,Ke=Ze&&Ze.length;if(!Ke)Re=1;else for(;--Ke>=0;)Re+=Ze[Ke].value;Ae.value=Re}function c(){return this.eachAfter(u)}function f(Ae){var Re=this,Ze,Ke=[Re],_t,St,Vt;do for(Ze=Ke.reverse(),Ke=[];Re=Ze.pop();)if(Ae(Re),_t=Re.children,_t)for(St=0,Vt=_t.length;St=0;--_t)Ze.push(Ke[_t]);return this}function v(Ae){for(var Re=this,Ze=[Re],Ke=[],_t,St,Vt;Re=Ze.pop();)if(Ke.push(Re),_t=Re.children,_t)for(St=0,Vt=_t.length;St=0;)Ze+=Ke[_t].value;Re.value=Ze})}function m(Ae){return this.eachBefore(function(Re){Re.children&&Re.children.sort(Ae)})}function x(Ae){for(var Re=this,Ze=g(Re,Ae),Ke=[Re];Re!==Ze;)Re=Re.parent,Ke.push(Re);for(var _t=Ke.length;Ae!==Ze;)Ke.splice(_t,0,Ae),Ae=Ae.parent;return Ke}function g(Ae,Re){if(Ae===Re)return Ae;var Ze=Ae.ancestors(),Ke=Re.ancestors(),_t=null;for(Ae=Ze.pop(),Re=Ke.pop();Ae===Re;)_t=Ae,Ae=Ze.pop(),Re=Ke.pop();return _t}function E(){for(var Ae=this,Re=[Ae];Ae=Ae.parent;)Re.push(Ae);return Re}function M(){var Ae=[];return this.each(function(Re){Ae.push(Re)}),Ae}function w(){var Ae=[];return this.eachBefore(function(Re){Re.children||Ae.push(Re)}),Ae}function k(){var Ae=this,Re=[];return Ae.each(function(Ze){Ze!==Ae&&Re.push({source:Ze.parent,target:Ze})}),Re}function y(Ae,Re){var Ze=new A(Ae),Ke=+Ae.value&&(Ze.value=Ae.value),_t,St=[Ze],Vt,fr,$t,gr;for(Re==null&&(Re=T);_t=St.pop();)if(Ke&&(_t.value=+_t.data.value),(fr=Re(_t.data))&&(gr=fr.length))for(_t.children=new Array(gr),$t=gr-1;$t>=0;--$t)St.push(Vt=_t.children[$t]=new A(fr[$t])),Vt.parent=_t,Vt.depth=_t.depth+1;return Ze.eachBefore(C)}function S(){return y(this).eachBefore(p)}function T(Ae){return Ae.children}function p(Ae){Ae.data=Ae.data.data}function C(Ae){var Re=0;do Ae.height=Re;while((Ae=Ae.parent)&&Ae.height<++Re)}function A(Ae){this.data=Ae,this.depth=this.height=0,this.parent=null}A.prototype=y.prototype={constructor:A,count:c,each:f,eachAfter:v,eachBefore:h,sum:d,sort:m,path:x,ancestors:E,descendants:M,leaves:w,links:k,copy:S};var P=Array.prototype.slice;function D(Ae){for(var Re=Ae.length,Ze,Ke;Re;)Ke=Math.random()*Re--|0,Ze=Ae[Re],Ae[Re]=Ae[Ke],Ae[Ke]=Ze;return Ae}function z(Ae){for(var Re=0,Ze=(Ae=D(P.call(Ae))).length,Ke=[],_t,St;Re0&&Ze*Ze>Ke*Ke+_t*_t}function R(Ae,Re){for(var Ze=0;Ze$t?(_t=(gr+$t-St)/(2*gr),fr=Math.sqrt(Math.max(0,$t/gr-_t*_t)),Ze.x=Ae.x-_t*Ke-fr*Vt,Ze.y=Ae.y-_t*Vt+fr*Ke):(_t=(gr+St-$t)/(2*gr),fr=Math.sqrt(Math.max(0,St/gr-_t*_t)),Ze.x=Re.x+_t*Ke-fr*Vt,Ze.y=Re.y+_t*Vt+fr*Ke)):(Ze.x=Re.x+Ze.r,Ze.y=Re.y)}function ue(Ae,Re){var Ze=Ae.r+Re.r-1e-6,Ke=Re.x-Ae.x,_t=Re.y-Ae.y;return Ze>0&&Ze*Ze>Ke*Ke+_t*_t}function re(Ae){var Re=Ae._,Ze=Ae.next._,Ke=Re.r+Ze.r,_t=(Re.x*Ze.r+Ze.x*Re.r)/Ke,St=(Re.y*Ze.r+Ze.y*Re.r)/Ke;return _t*_t+St*St}function j(Ae){this._=Ae,this.next=null,this.previous=null}function fe(Ae){if(!(_t=Ae.length))return 0;var Re,Ze,Ke,_t,St,Vt,fr,$t,gr,Br,Nr;if(Re=Ae[0],Re.x=0,Re.y=0,!(_t>1))return Re.r;if(Ze=Ae[1],Re.x=-Ze.r,Ze.x=Re.r,Ze.y=0,!(_t>2))return Re.r+Ze.r;se(Ze,Re,Ke=Ae[2]),Re=new j(Re),Ze=new j(Ze),Ke=new j(Ke),Re.next=Ke.previous=Ze,Ze.next=Re.previous=Ke,Ke.next=Ze.previous=Re;e:for(fr=3;fr<_t;++fr){se(Re._,Ze._,Ke=Ae[fr]),Ke=new j(Ke),$t=Ze.next,gr=Re.previous,Br=Ze._.r,Nr=Re._.r;do if(Br<=Nr){if(ue($t._,Ke._)){Ze=$t,Re.next=Ze,Ze.previous=Re,--fr;continue e}Br+=$t._.r,$t=$t.next}else{if(ue(gr._,Ke._)){Re=gr,Re.next=Ze,Ze.previous=Re,--fr;continue e}Nr+=gr._.r,gr=gr.previous}while($t!==gr.next);for(Ke.previous=Re,Ke.next=Ze,Re.next=Ze.previous=Ze=Ke,St=re(Re);(Ke=Ke.next)!==Ze;)(Vt=re(Ke))0)throw new Error("cycle");return fr}return Ze.id=function(Ke){return arguments.length?(Ae=we(Ke),Ze):Ae},Ze.parentId=function(Ke){return arguments.length?(Re=we(Ke),Ze):Re},Ze}function ge(Ae,Re){return Ae.parent===Re.parent?1:2}function Ge(Ae){var Re=Ae.children;return Re?Re[0]:Ae.t}function tt(Ae){var Re=Ae.children;return Re?Re[Re.length-1]:Ae.t}function ft(Ae,Re,Ze){var Ke=Ze/(Re.i-Ae.i);Re.c-=Ke,Re.s+=Ze,Ae.c+=Ke,Re.z+=Ze,Re.m+=Ze}function He(Ae){for(var Re=0,Ze=0,Ke=Ae.children,_t=Ke.length,St;--_t>=0;)St=Ke[_t],St.z+=Re,St.m+=Re,Re+=St.s+(Ze+=St.c)}function Qe(Ae,Re,Ze){return Ae.a.parent===Re.parent?Ae.a:Ze}function We(Ae,Re){this._=Ae,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Re}We.prototype=Object.create(A.prototype);function pt(Ae){for(var Re=new We(Ae,0),Ze,Ke=[Re],_t,St,Vt,fr;Ze=Ke.pop();)if(St=Ze._.children)for(Ze.children=new Array(fr=St.length),Vt=fr-1;Vt>=0;--Vt)Ke.push(_t=Ze.children[Vt]=new We(St[Vt],Vt)),_t.parent=Ze;return(Re.parent=new We(null,0)).children=[Re],Re}function kt(){var Ae=ge,Re=1,Ze=1,Ke=null;function _t(gr){var Br=pt(gr);if(Br.eachAfter(St),Br.parent.m=-Br.z,Br.eachBefore(Vt),Ke)gr.eachBefore($t);else{var Nr=gr,Er=gr,zr=gr;gr.eachBefore(function(Qn){Qn.xEr.x&&(Er=Qn),Qn.depth>zr.depth&&(zr=Qn)});var vn=Nr===Er?1:Ae(Nr,Er)/2,Nn=vn-Nr.x,Xn=Re/(Er.x+vn+Nn),Kn=Ze/(zr.depth||1);gr.eachBefore(function(Qn){Qn.x=(Qn.x+Nn)*Xn,Qn.y=Qn.depth*Kn})}return gr}function St(gr){var Br=gr.children,Nr=gr.parent.children,Er=gr.i?Nr[gr.i-1]:null;if(Br){He(gr);var zr=(Br[0].z+Br[Br.length-1].z)/2;Er?(gr.z=Er.z+Ae(gr._,Er._),gr.m=gr.z-zr):gr.z=zr}else Er&&(gr.z=Er.z+Ae(gr._,Er._));gr.parent.A=fr(gr,Er,gr.parent.A||Nr[0])}function Vt(gr){gr._.x=gr.z+gr.parent.m,gr.m+=gr.parent.m}function fr(gr,Br,Nr){if(Br){for(var Er=gr,zr=gr,vn=Br,Nn=Er.parent.children[0],Xn=Er.m,Kn=zr.m,Qn=vn.m,un=Nn.m,aa;vn=tt(vn),Er=Ge(Er),vn&&Er;)Nn=Ge(Nn),zr=tt(zr),zr.a=gr,aa=vn.z+Qn-Er.z-Xn+Ae(vn._,Er._),aa>0&&(ft(Qe(vn,gr,Nr),gr,aa),Xn+=aa,Kn+=aa),Qn+=vn.m,Xn+=Er.m,un+=Nn.m,Kn+=zr.m;vn&&!tt(zr)&&(zr.t=vn,zr.m+=Qn-Kn),Er&&!Ge(Nn)&&(Nn.t=Er,Nn.m+=Xn-un,Nr=gr)}return Nr}function $t(gr){gr.x*=Re,gr.y=gr.depth*Ze}return _t.separation=function(gr){return arguments.length?(Ae=gr,_t):Ae},_t.size=function(gr){return arguments.length?(Ke=!1,Re=+gr[0],Ze=+gr[1],_t):Ke?null:[Re,Ze]},_t.nodeSize=function(gr){return arguments.length?(Ke=!0,Re=+gr[0],Ze=+gr[1],_t):Ke?[Re,Ze]:null},_t}function qt(Ae,Re,Ze,Ke,_t){for(var St=Ae.children,Vt,fr=-1,$t=St.length,gr=Ae.value&&(_t-Ze)/Ae.value;++fr<$t;)Vt=St[fr],Vt.x0=Re,Vt.x1=Ke,Vt.y0=Ze,Vt.y1=Ze+=Vt.value*gr}var Wt=(1+Math.sqrt(5))/2;function _r(Ae,Re,Ze,Ke,_t,St){for(var Vt=[],fr=Re.children,$t,gr,Br=0,Nr=0,Er=fr.length,zr,vn,Nn=Re.value,Xn,Kn,Qn,un,aa,da,ua;BrQn&&(Qn=gr),ua=Xn*Xn*da,un=Math.max(Qn/ua,ua/Kn),un>aa){Xn-=gr;break}aa=un}Vt.push($t={value:Xn,dice:zr1?Ke:1)},Ze})(Wt);function lr(){var Ae=tr,Re=!1,Ze=1,Ke=1,_t=[0],St=he,Vt=he,fr=he,$t=he,gr=he;function Br(Er){return Er.x0=Er.y0=0,Er.x1=Ze,Er.y1=Ke,Er.eachBefore(Nr),_t=[0],Re&&Er.eachBefore(st),Er}function Nr(Er){var zr=_t[Er.depth],vn=Er.x0+zr,Nn=Er.y0+zr,Xn=Er.x1-zr,Kn=Er.y1-zr;Xn=Er-1){var Qn=St[Nr];Qn.x0=vn,Qn.y0=Nn,Qn.x1=Xn,Qn.y1=Kn;return}for(var un=gr[Nr],aa=zr/2+un,da=Nr+1,ua=Er-1;da>>1;gr[qa]Kn-Nn){var no=(vn*pa+Xn*ii)/zr;Br(Nr,da,ii,vn,Nn,no,Kn),Br(da,Er,pa,no,Nn,Xn,Kn)}else{var Gi=(Nn*pa+Kn*ii)/zr;Br(Nr,da,ii,vn,Nn,Xn,Gi),Br(da,Er,pa,vn,Gi,Xn,Kn)}}}function Te(Ae,Re,Ze,Ke,_t){(Ae.depth&1?qt:Oe)(Ae,Re,Ze,Ke,_t)}var Fe=(function Ae(Re){function Ze(Ke,_t,St,Vt,fr){if(($t=Ke._squarify)&&$t.ratio===Re)for(var $t,gr,Br,Nr,Er=-1,zr,vn=$t.length,Nn=Ke.value;++Er1?Ke:1)},Ze})(Wt);e.cluster=l,e.hierarchy=y,e.pack=le,e.packEnclose=z,e.packSiblings=ce,e.partition=qe,e.stratify=Ue,e.tree=kt,e.treemap=lr,e.treemapBinary=Ye,e.treemapDice=Oe,e.treemapResquarify=Fe,e.treemapSlice=qt,e.treemapSliceDice=Te,e.treemapSquarify=tr,Object.defineProperty(e,"__esModule",{value:!0})})});var _A=ne(bA=>{"use strict";var L6e=xA(),OMt=mi(),F3=Zt(),NMt=El().makeColorScaleFuncFromTrace,UMt=k3().makePullColorFn,VMt=k3().generateExtendedColors,GMt=El().calc,HMt=uo().ALMOST_EQUAL,jMt={},WMt={},YMt={};bA.calc=function(e,t){var r=e._fullLayout,n=t.ids,a=F3.isArrayOrTypedArray(n),i=t.labels,o=t.parents,s=t.values,l=F3.isArrayOrTypedArray(s),u=[],c={},f={},h=function(O,R){c[O]?c[O].push(R):c[O]=[R],f[R]=1},v=function(O){return O||typeof O=="number"},d=function(O){return!l||OMt(s[O])&&s[O]>=0},m,x,g;a?(m=Math.min(n.length,o.length),x=function(O){return v(n[O])&&d(O)},g=function(O){return String(n[O])}):(m=Math.min(i.length,o.length),x=function(O){return v(i[O])&&d(O)},g=function(O){return String(i[O])}),l&&(m=Math.min(m,s.length));for(var E=0;E1){for(var T=F3.randstr(),p=0;p{});function t1(){}function D6e(){return this.rgb().formatHex()}function tSt(){return this.rgb().formatHex8()}function rSt(){return N6e(this).formatHsl()}function R6e(){return this.rgb().formatRgb()}function Bm(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=XMt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?I6e(t):r===3?new Sf(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?zL(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?zL(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=ZMt.exec(e))?new Sf(t[1],t[2],t[3],1):(t=$Mt.exec(e))?new Sf(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=KMt.exec(e))?zL(t[1],t[2],t[3],t[4]):(t=JMt.exec(e))?zL(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=QMt.exec(e))?B6e(t[1],t[2]/100,t[3]/100,1):(t=eSt.exec(e))?B6e(t[1],t[2]/100,t[3]/100,t[4]):P6e.hasOwnProperty(e)?I6e(P6e[e]):e==="transparent"?new Sf(NaN,NaN,NaN,0):null}function I6e(e){return new Sf(e>>16&255,e>>8&255,e&255,1)}function zL(e,t,r,n){return n<=0&&(e=t=r=NaN),new Sf(e,t,r,n)}function TA(e){return e instanceof t1||(e=Bm(e)),e?(e=e.rgb(),new Sf(e.r,e.g,e.b,e.opacity)):new Sf}function D3(e,t,r,n){return arguments.length===1?TA(e):new Sf(e,t,r,n==null?1:n)}function Sf(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function z6e(){return`#${a2(this.r)}${a2(this.g)}${a2(this.b)}`}function nSt(){return`#${a2(this.r)}${a2(this.g)}${a2(this.b)}${a2((isNaN(this.opacity)?1:this.opacity)*255)}`}function q6e(){let e=BL(this.opacity);return`${e===1?"rgb(":"rgba("}${i2(this.r)}, ${i2(this.g)}, ${i2(this.b)}${e===1?")":`, ${e})`}`}function BL(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function i2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function a2(e){return e=i2(e),(e<16?"0":"")+e.toString(16)}function B6e(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ap(e,t,r,n)}function N6e(e){if(e instanceof ap)return new ap(e.h,e.s,e.l,e.opacity);if(e instanceof t1||(e=Bm(e)),!e)return new ap;if(e instanceof ap)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r0&&l<1?0:o,new ap(o,s,l,e.opacity)}function AA(e,t,r,n){return arguments.length===1?N6e(e):new ap(e,t,r,n==null?1:n)}function ap(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function O6e(e){return e=(e||0)%360,e<0?e+360:e}function qL(e){return Math.max(0,Math.min(1,e||0))}function _V(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var qm,o2,P3,wA,e1,XMt,ZMt,$Mt,KMt,JMt,QMt,eSt,P6e,OL=lo(()=>{IL();qm=.7,o2=1/qm,P3="\\s*([+-]?\\d+)\\s*",wA="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",e1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",XMt=/^#([0-9a-f]{3,8})$/,ZMt=new RegExp(`^rgb\\(${P3},${P3},${P3}\\)$`),$Mt=new RegExp(`^rgb\\(${e1},${e1},${e1}\\)$`),KMt=new RegExp(`^rgba\\(${P3},${P3},${P3},${wA}\\)$`),JMt=new RegExp(`^rgba\\(${e1},${e1},${e1},${wA}\\)$`),QMt=new RegExp(`^hsl\\(${wA},${e1},${e1}\\)$`),eSt=new RegExp(`^hsla\\(${wA},${e1},${e1},${wA}\\)$`),P6e={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};eg(t1,Bm,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:D6e,formatHex:D6e,formatHex8:tSt,formatHsl:rSt,formatRgb:R6e,toString:R6e});eg(Sf,D3,zm(t1,{brighter(e){return e=e==null?o2:Math.pow(o2,e),new Sf(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?qm:Math.pow(qm,e),new Sf(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Sf(i2(this.r),i2(this.g),i2(this.b),BL(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:z6e,formatHex:z6e,formatHex8:nSt,formatRgb:q6e,toString:q6e}));eg(ap,AA,zm(t1,{brighter(e){return e=e==null?o2:Math.pow(o2,e),new ap(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qm:Math.pow(qm,e),new ap(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Sf(_V(e>=240?e-240:e+120,a,n),_V(e,a,n),_V(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new ap(O6e(this.h),qL(this.s),qL(this.l),BL(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=BL(this.opacity);return`${e===1?"hsl(":"hsla("}${O6e(this.h)}, ${qL(this.s)*100}%, ${qL(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var NL,UL,wV=lo(()=>{NL=Math.PI/180,UL=180/Math.PI});function W6e(e){if(e instanceof r1)return new r1(e.l,e.a,e.b,e.opacity);if(e instanceof tg)return Y6e(e);e instanceof Sf||(e=TA(e));var t=SV(e.r),r=SV(e.g),n=SV(e.b),a=TV((.2225045*t+.7168786*r+.0606169*n)/V6e),i,o;return t===r&&r===n?i=o=a:(i=TV((.4360747*t+.3850649*r+.1430804*n)/U6e),o=TV((.0139322*t+.0971045*r+.7141733*n)/G6e)),new r1(116*a-16,500*(i-a),200*(a-o),e.opacity)}function I3(e,t,r,n){return arguments.length===1?W6e(e):new r1(e,t,r,n==null?1:n)}function r1(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function TV(e){return e>aSt?Math.pow(e,1/3):e/j6e+H6e}function AV(e){return e>R3?e*e*e:j6e*(e-H6e)}function MV(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function SV(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function iSt(e){if(e instanceof tg)return new tg(e.h,e.c,e.l,e.opacity);if(e instanceof r1||(e=W6e(e)),e.a===0&&e.b===0)return new tg(NaN,0{IL();OL();wV();VL=18,U6e=.96422,V6e=1,G6e=.82521,H6e=4/29,R3=6/29,j6e=3*R3*R3,aSt=R3*R3*R3;eg(r1,I3,zm(t1,{brighter(e){return new r1(this.l+VL*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new r1(this.l-VL*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=U6e*AV(t),e=V6e*AV(e),r=G6e*AV(r),new Sf(MV(3.1338561*t-1.6168667*e-.4906146*r),MV(-.9787684*t+1.9161415*e+.033454*r),MV(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));eg(tg,MA,zm(t1,{brighter(e){return new tg(this.h,this.c,this.l+VL*(e==null?1:e),this.opacity)},darker(e){return new tg(this.h,this.c,this.l-VL*(e==null?1:e),this.opacity)},rgb(){return Y6e(this).rgb()}}))});function oSt(e){if(e instanceof s2)return new s2(e.h,e.s,e.l,e.opacity);e instanceof Sf||(e=TA(e));var t=e.r/255,r=e.g/255,n=e.b/255,a=(K6e*n+Z6e*t-$6e*r)/(K6e+Z6e-$6e),i=n-a,o=(SA*(r-a)-kV*i)/GL,s=Math.sqrt(o*o+i*i)/(SA*a*(1-a)),l=s?Math.atan2(o,i)*UL-120:NaN;return new s2(l<0?l+360:l,s,a,e.opacity)}function z3(e,t,r,n){return arguments.length===1?oSt(e):new s2(e,t,r,n==null?1:n)}function s2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var J6e,EV,kV,GL,SA,Z6e,$6e,K6e,Q6e=lo(()=>{IL();OL();wV();J6e=-.14861,EV=1.78277,kV=-.29227,GL=-.90649,SA=1.97294,Z6e=SA*GL,$6e=SA*EV,K6e=EV*kV-GL*J6e;eg(s2,z3,zm(t1,{brighter(e){return e=e==null?o2:Math.pow(o2,e),new s2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?qm:Math.pow(qm,e),new s2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*NL,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),a=Math.sin(e);return new Sf(255*(t+r*(J6e*n+EV*a)),255*(t+r*(kV*n+GL*a)),255*(t+r*(SA*n)),this.opacity)}}))});var l2=lo(()=>{OL();X6e();Q6e()});function CV(e,t,r,n,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*r+(1+3*e+3*i-3*o)*n+o*a)/6}function HL(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),a=e[n],i=e[n+1],o=n>0?e[n-1]:2*a-i,s=n{});function WL(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),a=e[(n+t-1)%t],i=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return CV((r-n/t)*t,a,i,o,s)}}var LV=lo(()=>{jL()});var q3,FV=lo(()=>{q3=e=>()=>e});function eMe(e,t){return function(r){return e+r*t}}function sSt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function Om(e,t){var r=t-e;return r?eMe(e,r>180||r<-180?r-360*Math.round(r/360):r):q3(isNaN(e)?t:e)}function tMe(e){return(e=+e)==1?Qu:function(t,r){return r-t?sSt(t,r,e):q3(isNaN(t)?r:t)}}function Qu(e,t){var r=t-e;return r?eMe(e,r):q3(isNaN(e)?t:e)}var u2=lo(()=>{FV()});function rMe(e){return function(t){var r=t.length,n=new Array(r),a=new Array(r),i=new Array(r),o,s;for(o=0;o{l2();jL();LV();u2();EA=(function e(t){var r=tMe(t);function n(a,i){var o=r((a=D3(a)).r,(i=D3(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=Qu(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=s(c),a.b=l(c),a.opacity=u(c),a+""}}return n.gamma=e,n})(1);nMe=rMe(HL),aMe=rMe(WL)});function B3(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a{});function iMe(e,t){return(YL(t)?B3:DV)(e,t)}function DV(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o{kA();XL()});function ZL(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var IV=lo(()=>{});function ev(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var CA=lo(()=>{});function $L(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=Nm(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var zV=lo(()=>{kA()});function lSt(e){return function(){return e}}function uSt(e){return function(t){return e(t)+""}}function KL(e,t){var r=BV.lastIndex=qV.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=BV.exec(e))&&(a=qV.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:ev(n,a)})),r=qV.lastIndex;return r{CA();BV=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,qV=new RegExp(BV.source,"g")});function Nm(e,t){var r=typeof t,n;return t==null||r==="boolean"?q3(t):(r==="number"?ev:r==="string"?(n=Bm(t))?(t=n,EA):KL:t instanceof Bm?EA:t instanceof Date?ZL:YL(t)?B3:Array.isArray(t)?DV:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?$L:ev)(e,t)}var kA=lo(()=>{l2();PV();RV();IV();CA();zV();OV();FV();XL()});function oMe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var sMe=lo(()=>{});function lMe(e,t){var r=Om(+e,+t);return function(n){var a=r(n);return a-360*Math.floor(a/360)}}var uMe=lo(()=>{u2()});function cMe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var fMe=lo(()=>{});function NV(e,t,r,n,a,i){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n{hMe=180/Math.PI,JL={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function vMe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?JL:NV(t.a,t.b,t.c,t.d,t.e,t.f)}function pMe(e){return e==null?JL:(QL||(QL=document.createElementNS("http://www.w3.org/2000/svg","g")),QL.setAttribute("transform",e),(e=QL.transform.baseVal.consolidate())?(e=e.matrix,NV(e.a,e.b,e.c,e.d,e.e,e.f)):JL)}var QL,gMe=lo(()=>{dMe()});function mMe(e,t,r,n){function a(u){return u.length?u.pop()+" ":""}function i(u,c,f,h,v,d){if(u!==f||c!==h){var m=v.push("translate(",null,t,null,r);d.push({i:m-4,x:ev(u,f)},{i:m-2,x:ev(c,h)})}else(f||h)&&v.push("translate("+f+t+h+r)}function o(u,c,f,h){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),h.push({i:f.push(a(f)+"rotate(",null,n)-2,x:ev(u,c)})):c&&f.push(a(f)+"rotate("+c+n)}function s(u,c,f,h){u!==c?h.push({i:f.push(a(f)+"skewX(",null,n)-2,x:ev(u,c)}):c&&f.push(a(f)+"skewX("+c+n)}function l(u,c,f,h,v,d){if(u!==f||c!==h){var m=v.push(a(v)+"scale(",null,",",null,")");d.push({i:m-4,x:ev(u,f)},{i:m-2,x:ev(c,h)})}else(f!==1||h!==1)&&v.push(a(v)+"scale("+f+","+h+")")}return function(u,c){var f=[],h=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,h),o(u.rotate,c.rotate,f,h),s(u.skewX,c.skewX,f,h),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,h),u=c=null,function(v){for(var d=-1,m=h.length,x;++d{CA();gMe();yMe=mMe(vMe,"px, ","px)","deg)"),xMe=mMe(pMe,", ",")",")")});function _Me(e){return((e=Math.exp(e))+1/e)/2}function fSt(e){return((e=Math.exp(e))-1/e)/2}function hSt(e){return((e=Math.exp(2*e))-1)/(e+1)}var cSt,wMe,TMe=lo(()=>{cSt=1e-12;wMe=(function e(t,r,n){function a(i,o){var s=i[0],l=i[1],u=i[2],c=o[0],f=o[1],h=o[2],v=c-s,d=f-l,m=v*v+d*d,x,g;if(m{l2();u2();MMe=AMe(Om),SMe=AMe(Qu)});function UV(e,t){var r=Qu((e=I3(e)).l,(t=I3(t)).l),n=Qu(e.a,t.a),a=Qu(e.b,t.b),i=Qu(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=a(o),e.opacity=i(o),e+""}}var kMe=lo(()=>{l2();u2()});function CMe(e){return function(t,r){var n=e((t=MA(t)).h,(r=MA(r)).h),a=Qu(t.c,r.c),i=Qu(t.l,r.l),o=Qu(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=a(s),t.l=i(s),t.opacity=o(s),t+""}}}var LMe,FMe,PMe=lo(()=>{l2();u2();LMe=CMe(Om),FMe=CMe(Qu)});function DMe(e){return(function t(r){r=+r;function n(a,i){var o=e((a=z3(a)).h,(i=z3(i)).h),s=Qu(a.s,i.s),l=Qu(a.l,i.l),u=Qu(a.opacity,i.opacity);return function(c){return a.h=o(c),a.s=s(c),a.l=l(Math.pow(c,r)),a.opacity=u(c),a+""}}return n.gamma=t,n})(1)}var RMe,IMe,zMe=lo(()=>{l2();u2();RMe=DMe(Om),IMe=DMe(Qu)});function VV(e,t){t===void 0&&(t=e,e=Nm);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r{kA()});function BMe(e,t){for(var r=new Array(t),n=0;n{});var c2={};E0(c2,{interpolate:()=>Nm,interpolateArray:()=>iMe,interpolateBasis:()=>HL,interpolateBasisClosed:()=>WL,interpolateCubehelix:()=>RMe,interpolateCubehelixLong:()=>IMe,interpolateDate:()=>ZL,interpolateDiscrete:()=>oMe,interpolateHcl:()=>LMe,interpolateHclLong:()=>FMe,interpolateHsl:()=>MMe,interpolateHslLong:()=>SMe,interpolateHue:()=>lMe,interpolateLab:()=>UV,interpolateNumber:()=>ev,interpolateNumberArray:()=>B3,interpolateObject:()=>$L,interpolateRgb:()=>EA,interpolateRgbBasis:()=>nMe,interpolateRgbBasisClosed:()=>aMe,interpolateRound:()=>cMe,interpolateString:()=>KL,interpolateTransformCss:()=>yMe,interpolateTransformSvg:()=>xMe,interpolateZoom:()=>wMe,piecewise:()=>VV,quantize:()=>BMe});var f2=lo(()=>{kA();RV();jL();LV();IV();sMe();uMe();CA();XL();zV();fMe();OV();bMe();TMe();PV();EMe();kMe();PMe();zMe();qMe();OMe()});var e7=ne((qfr,NMe)=>{"use strict";var dSt=li(),vSt=_a();NMe.exports=function(t,r,n,a,i){var o=r.data.data,s=o.i,l=i||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),dSt.pointStyle(t,n,a,r)}else vSt.fill(t,l)}});var GV=ne((Bfr,jMe)=>{"use strict";var UMe=Ea(),VMe=_a(),GMe=Zt(),pSt=Uh().resizeText,gSt=e7();function mSt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");pSt(e,t,"sunburst"),t.each(function(r){var n=UMe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){UMe.select(this).call(HMe,o,i,e)})})}function HMe(e,t,r,n){var a=t.data.data,i=!t.children,o=a.i,s=GMe.castOption(r,o,"marker.line.color")||VMe.defaultLine,l=GMe.castOption(r,o,"marker.line.width")||0;e.call(gSt,t,r,n).style("stroke-width",l).call(VMe.stroke,s).style("opacity",i?r.leaf.opacity:null)}jMe.exports={style:mSt,styleOne:HMe}});var rg=ne(mo=>{"use strict";var h2=Zt(),ySt=_a(),xSt=z0(),WMe=em();mo.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(mo.getPtId(n)===t)return r=n.copy()}),r||e};mo.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var a=n.children||[],i=0;i0)};mo.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};mo.isHeader=function(e,t){return!(mo.isLeaf(e)||e.depth===t._maxDepth-1)};function YMe(e){return e.data.data.pid}mo.getParent=function(e,t){return mo.findEntryWithLevel(e,YMe(t))};mo.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return mo.listPath(r,t).concat(n)};mo.getPath=function(e){return mo.listPath(e,"label").join("/")+"/"};mo.formatValue=WMe.formatPieValue;mo.formatPercent=function(e,t){var r=h2.formatPercent(e,0);return r==="0%"&&(r=WMe.formatPiePercent(e,t)),r}});var PA=ne((Nfr,$Me)=>{"use strict";var O3=Ea(),XMe=Fa(),wSt=Hd().appendArrayPointValue,LA=cu(),ZMe=Zt(),TSt=Pb(),rf=rg(),ASt=em(),MSt=ASt.formatPieValue;$Me.exports=function(t,r,n,a,i){var o=a[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(d){var m=n._fullLayout;if(!(n._dragging||m.hovermode===!1)){var x=n._fullData[s.index],g=d.data.data,E=g.i,M=rf.isHierarchyRoot(d),w=rf.getParent(l,d),k=rf.getValue(d),y=function(se){return ZMe.castOption(x,E,se)},S=y("hovertemplate"),T=LA.castHoverinfo(x,m,E),p=m.separators,C;if(S||T&&T!=="none"&&T!=="skip"){var A,P;u&&(A=o.cx+d.pxmid[0]*(1-d.rInscribed),P=o.cy+d.pxmid[1]*(1-d.rInscribed)),c&&(A=d._hoverX,P=d._hoverY);var D={},z=[],q=[],U=function(se){return z.indexOf(se)!==-1};T&&(z=T==="all"?x._module.attributes.hoverinfo.flags:T.split("+")),D.label=g.label,U("label")&&D.label&&q.push(D.label),g.hasOwnProperty("v")&&(D.value=g.v,D.valueLabel=MSt(D.value,p),U("value")&&q.push(D.valueLabel)),D.currentPath=d.currentPath=rf.getPath(d.data),U("current path")&&!M&&q.push(D.currentPath);var O,R=[],B=function(){R.indexOf(O)===-1&&(q.push(O),R.push(O))};D.percentParent=d.percentParent=k/rf.getValue(w),D.parent=d.parentString=rf.getPtLabel(w),U("percent parent")&&(O=rf.formatPercent(D.percentParent,p)+" of "+D.parent,B()),D.percentEntry=d.percentEntry=k/rf.getValue(r),D.entry=d.entry=rf.getPtLabel(r),U("percent entry")&&!M&&!d.onPathbar&&(O=rf.formatPercent(D.percentEntry,p)+" of "+D.entry,B()),D.percentRoot=d.percentRoot=k/rf.getValue(l),D.root=d.root=rf.getPtLabel(l),U("percent root")&&!M&&(O=rf.formatPercent(D.percentRoot,p)+" of "+D.root,B()),D.text=y("hovertext")||y("text"),U("text")&&(O=D.text,ZMe.isValidTextValue(O)&&q.push(O)),C=[FA(d,x,i.eventDataKeys)];var Y={trace:x,y:P,_x0:d._x0,_x1:d._x1,_y0:d._y0,_y1:d._y1,text:q.join("
"),name:S||U("name")?x.name:void 0,color:y("hoverlabel.bgcolor")||g.color,borderColor:y("hoverlabel.bordercolor"),fontFamily:y("hoverlabel.font.family"),fontSize:y("hoverlabel.font.size"),fontColor:y("hoverlabel.font.color"),fontWeight:y("hoverlabel.font.weight"),fontStyle:y("hoverlabel.font.style"),fontVariant:y("hoverlabel.font.variant"),nameLength:y("hoverlabel.namelength"),textAlign:y("hoverlabel.align"),hovertemplate:S,hovertemplateLabels:D,eventData:C};u&&(Y.x0=A-d.rInscribed*d.rpx1,Y.x1=A+d.rInscribed*d.rpx1,Y.idealAlign=d.pxmid[0]<0?"left":"right"),c&&(Y.x=A,Y.idealAlign=A<0?"left":"right");var X=[];LA.loneHover(Y,{container:m._hoverlayer.node(),outerContainer:m._paper.node(),gd:n,inOut_bbox:X}),C[0].bbox=X[0],s._hasHoverLabel=!0}if(c){var te=t.select("path.surface");i.styleOne(te,d,x,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:C||[FA(d,x,i.eventDataKeys)],event:O3.event})}},h=function(d){var m=n._fullLayout,x=n._fullData[s.index],g=O3.select(this).datum();if(s._hasHoverEvent&&(d.originalEvent=O3.event,n.emit("plotly_unhover",{points:[FA(g,x,i.eventDataKeys)],event:O3.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&(LA.loneUnhover(m._hoverlayer.node()),s._hasHoverLabel=!1),c){var E=t.select("path.surface");i.styleOne(E,g,x,n,{hovered:!1})}},v=function(d){var m=n._fullLayout,x=n._fullData[s.index],g=u&&(rf.isHierarchyRoot(d)||rf.isLeaf(d)),E=rf.getPtId(d),M=rf.isEntry(d)?rf.findEntryWithChild(l,E):rf.findEntryWithLevel(l,E),w=rf.getPtId(M),k={points:[FA(d,x,i.eventDataKeys)],event:O3.event};g||(k.nextLevel=w);var y=TSt.triggerHandler(n,"plotly_"+s.type+"click",k);if(y!==!1&&m.hovermode&&(n._hoverdata=[FA(d,x,i.eventDataKeys)],LA.click(n,O3.event)),!g&&y!==!1&&!n._dragging&&!n._transitioning){XMe.call("_storeDirectGUIEdit",x,m._tracePreGUI[x.uid],{level:x.level});var S={data:[{level:w}],traces:[s.index]},T={frame:{redraw:!1,duration:i.transitionTime},transition:{duration:i.transitionTime,easing:i.transitionEasing},mode:"immediate",fromcurrent:!0};LA.loneUnhover(m._hoverlayer.node()),XMe.call("animate",n,S,T)}};t.on("mouseover",f),t.on("mouseout",h),t.on("click",v)};function FA(e,t,r){for(var n=e.data.data,a={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},i=0;i{"use strict";var DA=Ea(),SSt=xA(),ip=(f2(),vl(c2)).interpolate,KMe=li(),Hh=Zt(),ESt=Ms(),tSe=Uh(),JMe=tSe.recordMinTextSize,kSt=tSe.clearMinTextSize,rSe=DL(),CSt=em().getRotationAngle,LSt=rSe.computeTransform,FSt=rSe.transformInsideText,PSt=GV().styleOne,DSt=n0().resizeText,RSt=PA(),HV=xV(),Go=rg();t7.plot=function(e,t,r,n){var a=e._fullLayout,i=a._sunburstlayer,o,s,l=!r,u=!a.uniformtext.mode&&Go.hasTransition(r);if(kSt("sunburst",a),o=i.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){n&&(s=n());var c=DA.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){i.selectAll("g.trace").each(function(f){QMe(e,f,this,r)})})}else o.each(function(f){QMe(e,f,this,r)}),a.uniformtext.mode&&DSt(e,a._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function QMe(e,t,r,n){var a=e._context.staticPlot,i=e._fullLayout,o=!i.uniformtext.mode&&Go.hasTransition(n),s=DA.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,h=Go.findEntryWithLevel(f,c.level),v=Go.getMaxDepth(c),d=i._size,m=c.domain,x=d.w*(m.x[1]-m.x[0]),g=d.h*(m.y[1]-m.y[0]),E=.5*Math.min(x,g),M=u.cx=d.l+d.w*(m.x[1]+m.x[0])/2,w=u.cy=d.t+d.h*(1-m.y[0])-g/2;if(!h)return l.remove();var k=null,y={};o&&l.each(function(re){y[Go.getPtId(re)]={rpx0:re.rpx0,rpx1:re.rpx1,x0:re.x0,x1:re.x1,transform:re.transform},!k&&Go.isEntry(re)&&(k=re)});var S=ISt(h).descendants(),T=h.height+1,p=0,C=v;u.hasMultipleRoots&&Go.isHierarchyRoot(h)&&(S=S.slice(1),T-=1,p=1,C+=1),S=S.filter(function(re){return re.y1<=C});var A=CSt(c.rotation);A&&S.forEach(function(re){re.x0+=A,re.x1+=A});var P=Math.min(T,v),D=function(re){return(re-p)/P*E},z=function(re,j){return[re*Math.cos(j),-re*Math.sin(j)]},q=function(re){return Hh.pathAnnulus(re.rpx0,re.rpx1,re.x0,re.x1,M,w)},U=function(re){return M+eSe(re)[0]*(re.transform.rCenter||0)+(re.transform.x||0)},O=function(re){return w+eSe(re)[1]*(re.transform.rCenter||0)+(re.transform.y||0)};l=l.data(S,Go.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var re=DA.select(this),j=re.select("path.surface");j.transition().attrTween("d",function(ce){var oe=X(ce);return function(we){return q(oe(we))}});var fe=re.select("g.slicetext");fe.attr("opacity",0)}).remove():l.exit().remove(),l.order();var R=null;if(o&&k){var B=Go.getPtId(k);l.each(function(re){R===null&&Go.getPtId(re)===B&&(R=re.x1)})}var Y=l;o&&(Y=Y.transition().each("end",function(){var re=DA.select(this);Go.setSliceCursor(re,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),Y.each(function(re){var j=DA.select(this),fe=Hh.ensureSingle(j,"path","surface",function(Pe){Pe.style("pointer-events",a?"none":"all")});re.rpx0=D(re.y0),re.rpx1=D(re.y1),re.xmid=(re.x0+re.x1)/2,re.pxmid=z(re.rpx1,re.xmid),re.midangle=-(re.xmid-Math.PI/2),re.startangle=-(re.x0-Math.PI/2),re.stopangle=-(re.x1-Math.PI/2),re.halfangle=.5*Math.min(Hh.angleDelta(re.x0,re.x1)||Math.PI,Math.PI),re.ring=1-re.rpx0/re.rpx1,re.rInscribed=zSt(re,c),o?fe.transition().attrTween("d",function(Pe){var le=te(Pe);return function(ze){return q(le(ze))}}):fe.attr("d",q),j.call(RSt,h,e,t,{eventDataKeys:HV.eventDataKeys,transitionTime:HV.CLICK_TRANSITION_TIME,transitionEasing:HV.CLICK_TRANSITION_EASING}).call(Go.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),fe.call(PSt,re,c,e);var ce=Hh.ensureSingle(j,"g","slicetext"),oe=Hh.ensureSingle(ce,"text","",function(Pe){Pe.attr("data-notex",1)}),we=Hh.ensureUniformFontSize(e,Go.determineTextFont(c,re,i.font));oe.text(t7.formatSliceLabel(re,h,c,t,i)).classed("slicetext",!0).attr("text-anchor","middle").call(KMe.font,we).call(ESt.convertToTspans,e);var he=KMe.bBox(oe.node());re.transform=FSt(he,re,u),re.transform.targetX=U(re),re.transform.targetY=O(re);var ye=function(Pe,le){var ze=Pe.transform;return LSt(ze,le),ze.fontSize=we.size,JMe(c.type,ze,i),Hh.getTextTransform(ze)};o?oe.transition().attrTween("transform",function(Pe){var le=se(Pe);return function(ze){return ye(le(ze),he)}}):oe.attr("transform",ye(re,he))});function X(re){var j=Go.getPtId(re),fe=y[j],ce=y[Go.getPtId(h)],oe;if(ce){var we=(re.x1>ce.x1?2*Math.PI:0)+A;oe=re.rpx1R?2*Math.PI:0)+A;fe={x0:oe,x1:oe}}else fe={rpx0:E,rpx1:E},Hh.extendFlat(fe,ue(re));else fe={rpx0:0,rpx1:0};else fe={x0:A,x1:A};return ip(fe,ce)}function se(re){var j=y[Go.getPtId(re)],fe,ce=re.transform;if(j)fe=j;else if(fe={rpx1:re.rpx1,transform:{textPosAngle:ce.textPosAngle,scale:0,rotate:ce.rotate,rCenter:ce.rCenter,x:ce.x,y:ce.y}},k)if(re.parent)if(R){var oe=re.x1>R?2*Math.PI:0;fe.x0=fe.x1=oe}else Hh.extendFlat(fe,ue(re));else fe.x0=fe.x1=A;else fe.x0=fe.x1=A;var we=ip(fe.transform.textPosAngle,re.transform.textPosAngle),he=ip(fe.rpx1,re.rpx1),ye=ip(fe.x0,re.x0),Pe=ip(fe.x1,re.x1),le=ip(fe.transform.scale,ce.scale),ze=ip(fe.transform.rotate,ce.rotate),Xe=ce.rCenter===0?3:fe.transform.rCenter===0?1/3:1,vt=ip(fe.transform.rCenter,ce.rCenter),st=function(Oe){return vt(Math.pow(Oe,Xe))};return function(Oe){var qe=he(Oe),mt=ye(Oe),lt=Pe(Oe),Ie=st(Oe),de=z(qe,(mt+lt)/2),Ee=we(Oe),Ue={pxmid:de,rpx1:qe,transform:{textPosAngle:Ee,rCenter:Ie,x:ce.x,y:ce.y}};return JMe(c.type,ce,i),{transform:{targetX:U(Ue),targetY:O(Ue),scale:le(Oe),rotate:ze(Oe),rCenter:Ie}}}}function ue(re){var j=re.parent,fe=y[Go.getPtId(j)],ce={};if(fe){var oe=j.children,we=oe.indexOf(re),he=oe.length,ye=ip(fe.x0,fe.x1);ce.x0=ye(we/he),ce.x1=ye(we/he)}else ce.x0=ce.x1=0;return ce}}function ISt(e){return SSt.partition().size([2*Math.PI,e.height+1])(e)}t7.formatSliceLabel=function(e,t,r,n,a){var i=r.texttemplate,o=r.textinfo;if(!i&&(!o||o==="none"))return"";var s=a.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Go.isHierarchyRoot(e),h=Go.getParent(c,e),v=Go.getValue(e);if(!i){var d=o.split("+"),m=function(p){return d.indexOf(p)!==-1},x=[],g;if(m("label")&&u.label&&x.push(u.label),u.hasOwnProperty("v")&&m("value")&&x.push(Go.formatValue(u.v,s)),!f){m("current path")&&x.push(Go.getPath(e.data));var E=0;m("percent parent")&&E++,m("percent entry")&&E++,m("percent root")&&E++;var M=E>1;if(E){var w,k=function(p){g=Go.formatPercent(w,s),M&&(g+=" of "+p),x.push(g)};m("percent parent")&&!f&&(w=v/Go.getValue(h),k("parent")),m("percent entry")&&(w=v/Go.getValue(t),k("entry")),m("percent root")&&(w=v/Go.getValue(c),k("root"))}}return m("text")&&(g=Hh.castOption(r,u.i,"text"),Hh.isValidTextValue(g)&&x.push(g)),x.join("
")}var y=Hh.castOption(r,u.i,"texttemplate");if(!y)return"";var S={};u.label&&(S.label=u.label),u.hasOwnProperty("v")&&(S.value=u.v,S.valueLabel=Go.formatValue(u.v,s)),S.currentPath=Go.getPath(e.data),f||(S.percentParent=v/Go.getValue(h),S.percentParentLabel=Go.formatPercent(S.percentParent,s),S.parent=Go.getPtLabel(h)),S.percentEntry=v/Go.getValue(t),S.percentEntryLabel=Go.formatPercent(S.percentEntry,s),S.entry=Go.getPtLabel(t),S.percentRoot=v/Go.getValue(c),S.percentRootLabel=Go.formatPercent(S.percentRoot,s),S.root=Go.getPtLabel(c),u.hasOwnProperty("color")&&(S.color=u.color);var T=Hh.castOption(r,u.i,"text");return(Hh.isValidTextValue(T)||T==="")&&(S.text=T),S.customdata=Hh.castOption(r,u.i,"customdata"),Hh.texttemplateString({data:[S,r._meta],fallback:r.texttemplatefallback,labels:S,locale:a._d3locale,template:y})};function zSt(e){return e.rpx0===0&&Hh.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function eSe(e){return qSt(e.rpx1,e.transform.textPosAngle)}function qSt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var aSe=ne((Vfr,nSe)=>{"use strict";nSe.exports={moduleType:"trace",name:"sunburst",basePlotModule:m6e(),categories:[],animatable:!0,attributes:yA(),layoutAttributes:bV(),supplyDefaults:S6e(),supplyLayoutDefaults:k6e(),calc:_A().calc,crossTraceCalc:_A().crossTraceCalc,plot:r7().plot,style:GV().style,colorbar:bh(),meta:{}}});var oSe=ne((Gfr,iSe)=>{"use strict";iSe.exports=aSe()});var lSe=ne(N3=>{"use strict";var sSe=Sl();N3.name="treemap";N3.plot=function(e,t,r,n){sSe.plotBasePlot(N3.name,e,t,r,n)};N3.clean=function(e,t,r,n){sSe.cleanBasePlot(N3.name,e,t,r,n)}});var d2=ne((jfr,uSe)=>{"use strict";uSe.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var n7=ne((Wfr,hSe)=>{"use strict";var{hovertemplateAttrs:BSt,texttemplateAttrs:OSt,templatefallbackAttrs:cSe}=rs(),NSt=Ys(),USt=zl().attributes,v2=r2(),g0=yA(),fSe=d2(),jV=ci().extendFlat,VSt=xf().pattern;hSe.exports={labels:g0.labels,parents:g0.parents,values:g0.values,branchvalues:g0.branchvalues,count:g0.count,level:g0.level,maxdepth:g0.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:jV({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:g0.marker.colors,pattern:VSt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:g0.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},NSt("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:jV({},v2.textfont,{}),editType:"calc"},text:v2.text,textinfo:g0.textinfo,texttemplate:OSt({editType:"plot"},{keys:fSe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:cSe({editType:"plot"}),hovertext:v2.hovertext,hoverinfo:g0.hoverinfo,hovertemplate:BSt({},{keys:fSe.eventDataKeys}),hovertemplatefallback:cSe(),textfont:v2.textfont,insidetextfont:v2.insidetextfont,outsidetextfont:jV({},v2.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:v2.sort,root:g0.root,domain:USt({name:"treemap",trace:!0,editType:"calc"})}});var WV=ne((Yfr,dSe)=>{"use strict";dSe.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var mSe=ne((Xfr,gSe)=>{"use strict";var vSe=Zt(),GSt=n7(),HSt=_a(),jSt=zl().defaults,WSt=wv().handleText,YSt=um().TEXTPAD,XSt=n2().handleMarkerDefaults,pSe=El(),ZSt=pSe.hasColorscale,$St=pSe.handleDefaults;gSe.exports=function(t,r,n,a){function i(x,g){return vSe.coerce(t,r,GSt,x,g)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth");var u=i("tiling.packing");u==="squarify"&&i("tiling.squarifyratio"),i("tiling.flip"),i("tiling.pad");var c=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",vSe.isArrayOrTypedArray(c)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f=i("pathbar.visible"),h="auto";WSt(t,r,a,i,h,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("textposition");var v=r.textposition.indexOf("bottom")!==-1;XSt(t,r,a,i);var d=r._hasColorscale=ZSt(t,"marker","colors")||(t.marker||{}).coloraxis;d?$St(t,r,a,i,{prefix:"marker.",cLetter:"c"}):i("marker.depthfade",!(r.marker.colors||[]).length);var m=r.textfont.size*2;i("marker.pad.t",v?m/4:m),i("marker.pad.l",m/4),i("marker.pad.r",m/4),i("marker.pad.b",v?m:m/4),i("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:HSt.contrast(a.paper_bgcolor)}}},f&&(i("pathbar.thickness",r.pathbar.textfont.size+2*YSt),i("pathbar.side"),i("pathbar.edgeshape")),i("sort"),i("root.color"),jSt(r,a,i),r._length=null}});var xSe=ne((Zfr,ySe)=>{"use strict";var KSt=Zt(),JSt=WV();ySe.exports=function(t,r){function n(a,i){return KSt.coerce(t,r,JSt,a,i)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var XV=ne(YV=>{"use strict";var bSe=_A();YV.calc=function(e,t){return bSe.calc(e,t)};YV.crossTraceCalc=function(e){return bSe._runCrossTraceCalc("treemap",e)}});var ZV=ne((Kfr,_Se)=>{"use strict";_Se.exports=function e(t,r,n){var a;n.swapXY&&(a=t.x0,t.x0=t.y0,t.y0=a,a=t.x1,t.x1=t.y1,t.y1=a),n.flipX&&(a=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-a),n.flipY&&(a=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-a);var i=t.children;if(i)for(var o=0;o{"use strict";var U3=xA(),QSt=ZV();wSe.exports=function(t,r,n){var a=n.flipX,i=n.flipY,o=n.packing==="dice-slice",s=n.pad[i?"bottom":"top"],l=n.pad[a?"right":"left"],u=n.pad[a?"left":"right"],c=n.pad[i?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var h=U3.treemap().tile(eEt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||a||i)&&QSt(h,r,{swapXY:o,flipX:a,flipY:i}),h};function eEt(e,t){switch(e){case"squarify":return U3.treemapSquarify.ratio(t);case"binary":return U3.treemapBinary;case"dice":return U3.treemapDice;case"slice":return U3.treemapSlice;default:return U3.treemapSliceDice}}});var a7=ne((Qfr,SSe)=>{"use strict";var TSe=Ea(),V3=_a(),ASe=Zt(),KV=rg(),tEt=Uh().resizeText,rEt=e7();function nEt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");tEt(e,t,"treemap"),t.each(function(r){var n=TSe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){TSe.select(this).call(MSe,o,i,e,{hovered:!1})})})}function MSe(e,t,r,n,a){var i=(a||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=KV.isHierarchyRoot(t),h=1;if(i)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)h=100,l="rgba(0,0,0,0)",u=0;else if(l=ASe.castOption(r,s,"marker.line.color")||V3.defaultLine,u=ASe.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var v=r.marker.depthfade;if(v){var d=V3.combine(V3.addOpacity(r._backgroundColor,.75),c),m;if(v===!0){var x=KV.getMaxDepth(r);isFinite(x)?KV.isLeaf(t)?m=0:m=r._maxVisibleLayers-(t.data.depth-r._entryDepth):m=t.data.height+1}else m=t.data.depth-r._entryDepth,r._atRootLevel||m++;if(m>0)for(var g=0;g{"use strict";var ESe=Ea(),i7=Zt(),kSe=li(),aEt=Ms(),iEt=$V(),CSe=a7().styleOne,JV=d2(),G3=rg(),oEt=PA(),QV=!0;LSe.exports=function(t,r,n,a,i){var o=i.barDifY,s=i.width,l=i.height,u=i.viewX,c=i.viewY,f=i.pathSlice,h=i.toMoveInsideSlice,v=i.strTransform,d=i.hasTransition,m=i.handleSlicesExit,x=i.makeUpdateSliceInterpolator,g=i.makeUpdateTextInterpolator,E={},M=t._context.staticPlot,w=t._fullLayout,k=r[0],y=k.trace,S=k.hierarchy,T=s/y._entryDepth,p=G3.listPath(n.data,"id"),C=iEt(S.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();C=C.filter(function(P){var D=p.indexOf(P.data.id);return D===-1?!1:(P.x0=T*D,P.x1=T*(D+1),P.y0=o,P.y1=o+l,P.onPathbar=!0,!0)}),C.reverse(),a=a.data(C,G3.getPtId),a.enter().append("g").classed("pathbar",!0),m(a,QV,E,[s,l],f),a.order();var A=a;d&&(A=A.transition().each("end",function(){var P=ESe.select(this);G3.setSliceCursor(P,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),A.each(function(P){P._x0=u(P.x0),P._x1=u(P.x1),P._y0=c(P.y0),P._y1=c(P.y1),P._hoverX=u(P.x1-Math.min(s,l)/2),P._hoverY=c(P.y1-l/2);var D=ESe.select(this),z=i7.ensureSingle(D,"path","surface",function(R){R.style("pointer-events",M?"none":"all")});d?z.transition().attrTween("d",function(R){var B=x(R,QV,E,[s,l]);return function(Y){return f(B(Y))}}):z.attr("d",f),D.call(oEt,n,t,r,{styleOne:CSe,eventDataKeys:JV.eventDataKeys,transitionTime:JV.CLICK_TRANSITION_TIME,transitionEasing:JV.CLICK_TRANSITION_EASING}).call(G3.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),z.call(CSe,P,y,t,{hovered:!1}),P._text=(G3.getPtLabel(P)||"").split("
").join(" ")||"";var q=i7.ensureSingle(D,"g","slicetext"),U=i7.ensureSingle(q,"text","",function(R){R.attr("data-notex",1)}),O=i7.ensureUniformFontSize(t,G3.determineTextFont(y,P,w.font,{onPathbar:!0}));U.text(P._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(kSe.font,O).call(aEt.convertToTspans,t),P.textBB=kSe.bBox(U.node()),P.transform=h(P,{fontSize:O.size,onPathbar:!0}),P.transform.fontSize=O.size,d?U.transition().attrTween("transform",function(R){var B=g(R,QV,E,[s,l]);return function(Y){return v(B(Y))}}):U.attr("transform",v(P))})}});var ISe=ne((thr,RSe)=>{"use strict";var PSe=Ea(),eG=(f2(),vl(c2)).interpolate,Um=rg(),RA=Zt(),DSe=um().TEXTPAD,sEt=Dx(),lEt=sEt.toMoveInsideBar,uEt=Uh(),tG=uEt.recordMinTextSize,cEt=d2(),fEt=FSe();function p2(e){return Um.isHierarchyRoot(e)?"":Um.getPtId(e)}RSe.exports=function(t,r,n,a,i){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,h=Um.findEntryWithLevel(f,l.level),v=PSe.select(n),d=v.selectAll("g.pathbar"),m=v.selectAll("g.slice");if(!h){d.remove(),m.remove();return}var x=Um.isHierarchyRoot(h),g=!o.uniformtext.mode&&Um.hasTransition(a),E=Um.getMaxDepth(l),M=function(ge){return ge.data.depth-h.data.depth-1?S+C:-(p+C):0,P={x0:T,x1:T,y0:A,y1:A+p},D=function(ge,Ge,tt){var ft=l.tiling.pad,He=function(kt){return kt-ft<=Ge.x0},Qe=function(kt){return kt+ft>=Ge.x1},We=function(kt){return kt-ft<=Ge.y0},pt=function(kt){return kt+ft>=Ge.y1};return ge.x0===Ge.x0&&ge.x1===Ge.x1&&ge.y0===Ge.y0&&ge.y1===Ge.y1?{x0:ge.x0,x1:ge.x1,y0:ge.y0,y1:ge.y1}:{x0:He(ge.x0-ft)?0:Qe(ge.x0-ft)?tt[0]:ge.x0,x1:He(ge.x1+ft)?0:Qe(ge.x1+ft)?tt[0]:ge.x1,y0:We(ge.y0-ft)?0:pt(ge.y0-ft)?tt[1]:ge.y0,y1:We(ge.y1+ft)?0:pt(ge.y1+ft)?tt[1]:ge.y1}},z=null,q={},U={},O=null,R=function(ge,Ge){return Ge?q[p2(ge)]:U[p2(ge)]},B=function(ge,Ge,tt,ft){if(Ge)return q[p2(f)]||P;var He=U[l.level]||tt;return M(ge)?D(ge,He,ft):{}};s.hasMultipleRoots&&x&&E++,l._maxDepth=E,l._backgroundColor=o.paper_bgcolor,l._entryDepth=h.data.depth,l._atRootLevel=x;var Y=-y/2+w.l+w.w*(k.x[1]+k.x[0])/2,X=-S/2+w.t+w.h*(1-(k.y[1]+k.y[0])/2),te=function(ge){return Y+ge},se=function(ge){return X+ge},ue=se(0),re=te(0),j=function(ge){return re+ge},fe=function(ge){return ue+ge};function ce(ge,Ge){return ge+","+Ge}var oe=j(0),we=function(ge){ge.x=Math.max(oe,ge.x)},he=l.pathbar.edgeshape,ye=function(ge){var Ge=j(Math.max(Math.min(ge.x0,ge.x0),0)),tt=j(Math.min(Math.max(ge.x1,ge.x1),T)),ft=fe(ge.y0),He=fe(ge.y1),Qe=p/2,We={},pt={};We.x=Ge,pt.x=tt,We.y=pt.y=(ft+He)/2;var kt={x:Ge,y:ft},qt={x:tt,y:ft},Wt={x:tt,y:He},_r={x:Ge,y:He};return he===">"?(kt.x-=Qe,qt.x-=Qe,Wt.x-=Qe,_r.x-=Qe):he==="/"?(Wt.x-=Qe,_r.x-=Qe,We.x-=Qe/2,pt.x-=Qe/2):he==="\\"?(kt.x-=Qe,qt.x-=Qe,We.x-=Qe/2,pt.x-=Qe/2):he==="<"&&(We.x-=Qe,pt.x-=Qe),we(kt),we(_r),we(We),we(qt),we(Wt),we(pt),"M"+ce(kt.x,kt.y)+"L"+ce(qt.x,qt.y)+"L"+ce(pt.x,pt.y)+"L"+ce(Wt.x,Wt.y)+"L"+ce(_r.x,_r.y)+"L"+ce(We.x,We.y)+"Z"},Pe=l[c?"tiling":"marker"].pad,le=function(ge){return l.textposition.indexOf(ge)!==-1},ze=le("top"),Xe=le("left"),vt=le("right"),st=le("bottom"),Oe=function(ge){var Ge=te(ge.x0),tt=te(ge.x1),ft=se(ge.y0),He=se(ge.y1),Qe=tt-Ge,We=He-ft;if(!Qe||!We)return"";var pt=l.marker.cornerradius||0,kt=Math.min(pt,Qe/2,We/2);kt&&ge.data&&ge.data.data&&ge.data.data.label&&(ze&&(kt=Math.min(kt,Pe.t)),Xe&&(kt=Math.min(kt,Pe.l)),vt&&(kt=Math.min(kt,Pe.r)),st&&(kt=Math.min(kt,Pe.b)));var qt=function(Wt,_r){return kt?"a"+ce(kt,kt)+" 0 0 1 "+ce(Wt,_r):""};return"M"+ce(Ge,ft+kt)+qt(kt,-kt)+"L"+ce(tt-kt,ft)+qt(kt,kt)+"L"+ce(tt,He-kt)+qt(-kt,kt)+"L"+ce(Ge+kt,He)+qt(-kt,-kt)+"Z"},qe=function(ge,Ge){var tt=ge.x0,ft=ge.x1,He=ge.y0,Qe=ge.y1,We=ge.textBB,pt=ze||Ge.isHeader&&!st,kt=pt?"start":st?"end":"middle",qt=le("right"),Wt=le("left")||Ge.onPathbar,_r=Wt?-1:qt?1:0;if(Ge.isHeader){if(tt+=(c?Pe:Pe.l)-DSe,ft-=(c?Pe:Pe.r)-DSe,tt>=ft){var tr=(tt+ft)/2;tt=tr,ft=tr}var lr;st?(lr=Qe-(c?Pe:Pe.b),He{"use strict";var hEt=Ea(),dEt=rg(),vEt=Uh(),pEt=vEt.clearMinTextSize,gEt=n0().resizeText,zSe=ISe();qSe.exports=function(t,r,n,a,i){var o=i.type,s=i.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,h=!n;if(pEt(o,l),c=u.selectAll("g.trace."+o).data(r,function(d){return d[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&dEt.hasTransition(n)){a&&(f=a());var v=hEt.transition().duration(n.duration).ease(n.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});v.each(function(){u.selectAll("g.trace").each(function(d){zSe(t,d,this,n,s)})})}else c.each(function(d){zSe(t,d,this,n,s)}),l.uniformtext.mode&&gEt(t,u.selectAll(".trace"),o);h&&c.exit().remove()}});var VSe=ne((nhr,USe)=>{"use strict";var BSe=Ea(),o7=Zt(),OSe=li(),mEt=Ms(),yEt=$V(),NSe=a7().styleOne,nG=d2(),Vm=rg(),xEt=PA(),bEt=r7().formatSliceLabel,aG=!1;USe.exports=function(t,r,n,a,i){var o=i.width,s=i.height,l=i.viewX,u=i.viewY,c=i.pathSlice,f=i.toMoveInsideSlice,h=i.strTransform,v=i.hasTransition,d=i.handleSlicesExit,m=i.makeUpdateSliceInterpolator,x=i.makeUpdateTextInterpolator,g=i.prevEntry,E={},M=t._context.staticPlot,w=t._fullLayout,k=r[0],y=k.trace,S=y.textposition.indexOf("left")!==-1,T=y.textposition.indexOf("right")!==-1,p=y.textposition.indexOf("bottom")!==-1,C=!p&&!y.marker.pad.t||p&&!y.marker.pad.b,A=yEt(n,[o,s],{packing:y.tiling.packing,squarifyratio:y.tiling.squarifyratio,flipX:y.tiling.flip.indexOf("x")>-1,flipY:y.tiling.flip.indexOf("y")>-1,pad:{inner:y.tiling.pad,top:y.marker.pad.t,left:y.marker.pad.l,right:y.marker.pad.r,bottom:y.marker.pad.b}}),P=A.descendants(),D=1/0,z=-1/0;P.forEach(function(B){var Y=B.depth;Y>=y._maxDepth?(B.x0=B.x1=(B.x0+B.x1)/2,B.y0=B.y1=(B.y0+B.y1)/2):(D=Math.min(D,Y),z=Math.max(z,Y))}),a=a.data(P,Vm.getPtId),y._maxVisibleLayers=isFinite(z)?z-D+1:0,a.enter().append("g").classed("slice",!0),d(a,aG,E,[o,s],c),a.order();var q=null;if(v&&g){var U=Vm.getPtId(g);a.each(function(B){q===null&&Vm.getPtId(B)===U&&(q={x0:B.x0,x1:B.x1,y0:B.y0,y1:B.y1})})}var O=function(){return q||{x0:0,x1:o,y0:0,y1:s}},R=a;return v&&(R=R.transition().each("end",function(){var B=BSe.select(this);Vm.setSliceCursor(B,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),R.each(function(B){var Y=Vm.isHeader(B,y);B._x0=l(B.x0),B._x1=l(B.x1),B._y0=u(B.y0),B._y1=u(B.y1),B._hoverX=l(B.x1-y.marker.pad.r),B._hoverY=u(p?B.y1-y.marker.pad.b/2:B.y0+y.marker.pad.t/2);var X=BSe.select(this),te=o7.ensureSingle(X,"path","surface",function(ce){ce.style("pointer-events",M?"none":"all")});v?te.transition().attrTween("d",function(ce){var oe=m(ce,aG,O(),[o,s]);return function(we){return c(oe(we))}}):te.attr("d",c),X.call(xEt,n,t,r,{styleOne:NSe,eventDataKeys:nG.eventDataKeys,transitionTime:nG.CLICK_TRANSITION_TIME,transitionEasing:nG.CLICK_TRANSITION_EASING}).call(Vm.setSliceCursor,t,{isTransitioning:t._transitioning}),te.call(NSe,B,y,t,{hovered:!1}),B.x0===B.x1||B.y0===B.y1?B._text="":Y?B._text=C?"":Vm.getPtLabel(B)||"":B._text=bEt(B,n,y,r,w)||"";var se=o7.ensureSingle(X,"g","slicetext"),ue=o7.ensureSingle(se,"text","",function(ce){ce.attr("data-notex",1)}),re=o7.ensureUniformFontSize(t,Vm.determineTextFont(y,B,w.font)),j=B._text||" ",fe=Y&&j.indexOf("
")===-1;ue.text(j).classed("slicetext",!0).attr("text-anchor",T?"end":S||fe?"start":"middle").call(OSe.font,re).call(mEt.convertToTspans,t),B.textBB=OSe.bBox(ue.node()),B.transform=f(B,{fontSize:re.size,isHeader:Y}),B.transform.fontSize=re.size,v?ue.transition().attrTween("transform",function(ce){var oe=x(ce,aG,O(),[o,s]);return function(we){return h(oe(we))}}):ue.attr("transform",h(B))}),q}});var HSe=ne((ahr,GSe)=>{"use strict";var _Et=rG(),wEt=VSe();GSe.exports=function(t,r,n,a){return _Et(t,r,n,a,{type:"treemap",drawDescendants:wEt})}});var WSe=ne((ihr,jSe)=>{"use strict";jSe.exports={moduleType:"trace",name:"treemap",basePlotModule:lSe(),categories:[],animatable:!0,attributes:n7(),layoutAttributes:WV(),supplyDefaults:mSe(),supplyLayoutDefaults:xSe(),calc:XV().calc,crossTraceCalc:XV().crossTraceCalc,plot:HSe(),style:a7().style,colorbar:bh(),meta:{}}});var XSe=ne((ohr,YSe)=>{"use strict";YSe.exports=WSe()});var $Se=ne(H3=>{"use strict";var ZSe=Sl();H3.name="icicle";H3.plot=function(e,t,r,n){ZSe.plotBasePlot(H3.name,e,t,r,n)};H3.clean=function(e,t,r,n){ZSe.cleanBasePlot(H3.name,e,t,r,n)}});var iG=ne((lhr,QSe)=>{"use strict";var{hovertemplateAttrs:TEt,texttemplateAttrs:AEt,templatefallbackAttrs:KSe}=rs(),MEt=Ys(),SEt=zl().attributes,IA=r2(),Sv=yA(),s7=n7(),JSe=d2(),EEt=ci().extendFlat,kEt=xf().pattern;QSe.exports={labels:Sv.labels,parents:Sv.parents,values:Sv.values,branchvalues:Sv.branchvalues,count:Sv.count,level:Sv.level,maxdepth:Sv.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:s7.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:EEt({colors:Sv.marker.colors,line:Sv.marker.line,pattern:kEt,editType:"calc"},MEt("marker",{colorAttr:"colors",anim:!1})),leaf:Sv.leaf,pathbar:s7.pathbar,text:IA.text,textinfo:Sv.textinfo,texttemplate:AEt({editType:"plot"},{keys:JSe.eventDataKeys.concat(["label","value"])}),texttemplatefallback:KSe({editType:"plot"}),hovertext:IA.hovertext,hoverinfo:Sv.hoverinfo,hovertemplate:TEt({},{keys:JSe.eventDataKeys}),hovertemplatefallback:KSe(),textfont:IA.textfont,insidetextfont:IA.insidetextfont,outsidetextfont:s7.outsidetextfont,textposition:s7.textposition,sort:IA.sort,root:Sv.root,domain:SEt({name:"icicle",trace:!0,editType:"calc"})}});var oG=ne((uhr,eEe)=>{"use strict";eEe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var aEe=ne((chr,nEe)=>{"use strict";var tEe=Zt(),CEt=iG(),LEt=_a(),FEt=zl().defaults,PEt=wv().handleText,DEt=um().TEXTPAD,REt=n2().handleMarkerDefaults,rEe=El(),IEt=rEe.hasColorscale,zEt=rEe.handleDefaults;nEe.exports=function(t,r,n,a){function i(v,d){return tEe.coerce(t,r,CEt,v,d)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),i("tiling.orientation"),i("tiling.flip"),i("tiling.pad");var u=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",tEe.isArrayOrTypedArray(u)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var c=i("pathbar.visible"),f="auto";PEt(t,r,a,i,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("textposition"),REt(t,r,a,i);var h=r._hasColorscale=IEt(t,"marker","colors")||(t.marker||{}).coloraxis;h&&zEt(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",h?1:.7),r._hovered={marker:{line:{width:2,color:LEt.contrast(a.paper_bgcolor)}}},c&&(i("pathbar.thickness",r.pathbar.textfont.size+2*DEt),i("pathbar.side"),i("pathbar.edgeshape")),i("sort"),i("root.color"),FEt(r,a,i),r._length=null}});var oEe=ne((fhr,iEe)=>{"use strict";var qEt=Zt(),BEt=oG();iEe.exports=function(t,r){function n(a,i){return qEt.coerce(t,r,BEt,a,i)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var lG=ne(sG=>{"use strict";var sEe=_A();sG.calc=function(e,t){return sEe.calc(e,t)};sG.crossTraceCalc=function(e){return sEe._runCrossTraceCalc("icicle",e)}});var uEe=ne((dhr,lEe)=>{"use strict";var OEt=xA(),NEt=ZV();lEe.exports=function(t,r,n){var a=n.flipX,i=n.flipY,o=n.orientation==="h",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=OEt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||a||i)&&NEt(c,r,{swapXY:o,flipX:a,flipY:i}),c}});var uG=ne((vhr,vEe)=>{"use strict";var cEe=Ea(),fEe=_a(),hEe=Zt(),UEt=Uh().resizeText,VEt=e7();function GEt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");UEt(e,t,"icicle"),t.each(function(r){var n=cEe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){cEe.select(this).call(dEe,o,i,e)})})}function dEe(e,t,r,n){var a=t.data.data,i=!t.children,o=a.i,s=hEe.castOption(r,o,"marker.line.color")||fEe.defaultLine,l=hEe.castOption(r,o,"marker.line.width")||0;e.call(VEt,t,r,n).style("stroke-width",l).call(fEe.stroke,s).style("opacity",i?r.leaf.opacity:null)}vEe.exports={style:GEt,styleOne:dEe}});var xEe=ne((phr,yEe)=>{"use strict";var pEe=Ea(),l7=Zt(),gEe=li(),HEt=Ms(),jEt=uEe(),mEe=uG().styleOne,cG=d2(),j3=rg(),WEt=PA(),YEt=r7().formatSliceLabel,fG=!1;yEe.exports=function(t,r,n,a,i){var o=i.width,s=i.height,l=i.viewX,u=i.viewY,c=i.pathSlice,f=i.toMoveInsideSlice,h=i.strTransform,v=i.hasTransition,d=i.handleSlicesExit,m=i.makeUpdateSliceInterpolator,x=i.makeUpdateTextInterpolator,g=i.prevEntry,E={},M=t._context.staticPlot,w=t._fullLayout,k=r[0],y=k.trace,S=y.textposition.indexOf("left")!==-1,T=y.textposition.indexOf("right")!==-1,p=y.textposition.indexOf("bottom")!==-1,C=jEt(n,[o,s],{flipX:y.tiling.flip.indexOf("x")>-1,flipY:y.tiling.flip.indexOf("y")>-1,orientation:y.tiling.orientation,pad:{inner:y.tiling.pad},maxDepth:y._maxDepth}),A=C.descendants(),P=1/0,D=-1/0;A.forEach(function(R){var B=R.depth;B>=y._maxDepth?(R.x0=R.x1=(R.x0+R.x1)/2,R.y0=R.y1=(R.y0+R.y1)/2):(P=Math.min(P,B),D=Math.max(D,B))}),a=a.data(A,j3.getPtId),y._maxVisibleLayers=isFinite(D)?D-P+1:0,a.enter().append("g").classed("slice",!0),d(a,fG,E,[o,s],c),a.order();var z=null;if(v&&g){var q=j3.getPtId(g);a.each(function(R){z===null&&j3.getPtId(R)===q&&(z={x0:R.x0,x1:R.x1,y0:R.y0,y1:R.y1})})}var U=function(){return z||{x0:0,x1:o,y0:0,y1:s}},O=a;return v&&(O=O.transition().each("end",function(){var R=pEe.select(this);j3.setSliceCursor(R,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),O.each(function(R){R._x0=l(R.x0),R._x1=l(R.x1),R._y0=u(R.y0),R._y1=u(R.y1),R._hoverX=l(R.x1-y.tiling.pad),R._hoverY=u(p?R.y1-y.tiling.pad/2:R.y0+y.tiling.pad/2);var B=pEe.select(this),Y=l7.ensureSingle(B,"path","surface",function(ue){ue.style("pointer-events",M?"none":"all")});v?Y.transition().attrTween("d",function(ue){var re=m(ue,fG,U(),[o,s],{orientation:y.tiling.orientation,flipX:y.tiling.flip.indexOf("x")>-1,flipY:y.tiling.flip.indexOf("y")>-1});return function(j){return c(re(j))}}):Y.attr("d",c),B.call(WEt,n,t,r,{styleOne:mEe,eventDataKeys:cG.eventDataKeys,transitionTime:cG.CLICK_TRANSITION_TIME,transitionEasing:cG.CLICK_TRANSITION_EASING}).call(j3.setSliceCursor,t,{isTransitioning:t._transitioning}),Y.call(mEe,R,y,t,{hovered:!1}),R.x0===R.x1||R.y0===R.y1?R._text="":R._text=YEt(R,n,y,r,w)||"";var X=l7.ensureSingle(B,"g","slicetext"),te=l7.ensureSingle(X,"text","",function(ue){ue.attr("data-notex",1)}),se=l7.ensureUniformFontSize(t,j3.determineTextFont(y,R,w.font));te.text(R._text||" ").classed("slicetext",!0).attr("text-anchor",T?"end":S?"start":"middle").call(gEe.font,se).call(HEt.convertToTspans,t),R.textBB=gEe.bBox(te.node()),R.transform=f(R,{fontSize:se.size}),R.transform.fontSize=se.size,v?te.transition().attrTween("transform",function(ue){var re=x(ue,fG,U(),[o,s]);return function(j){return h(re(j))}}):te.attr("transform",h(R))}),z}});var _Ee=ne((ghr,bEe)=>{"use strict";var XEt=rG(),ZEt=xEe();bEe.exports=function(t,r,n,a){return XEt(t,r,n,a,{type:"icicle",drawDescendants:ZEt})}});var TEe=ne((mhr,wEe)=>{"use strict";wEe.exports={moduleType:"trace",name:"icicle",basePlotModule:$Se(),categories:[],animatable:!0,attributes:iG(),layoutAttributes:oG(),supplyDefaults:aEe(),supplyLayoutDefaults:oEe(),calc:lG().calc,crossTraceCalc:lG().crossTraceCalc,plot:_Ee(),style:uG().style,colorbar:bh(),meta:{}}});var MEe=ne((yhr,AEe)=>{"use strict";AEe.exports=TEe()});var EEe=ne(W3=>{"use strict";var SEe=Sl();W3.name="funnelarea";W3.plot=function(e,t,r,n){SEe.plotBasePlot(W3.name,e,t,r,n)};W3.clean=function(e,t,r,n){SEe.cleanBasePlot(W3.name,e,t,r,n)}});var hG=ne((bhr,CEe)=>{"use strict";var Mh=r2(),$Et=os(),KEt=zl().attributes,{hovertemplateAttrs:JEt,texttemplateAttrs:QEt,templatefallbackAttrs:kEe}=rs(),g2=ci().extendFlat;CEe.exports={labels:Mh.labels,label0:Mh.label0,dlabel:Mh.dlabel,values:Mh.values,marker:{colors:Mh.marker.colors,line:{color:g2({},Mh.marker.line.color,{dflt:null}),width:g2({},Mh.marker.line.width,{dflt:1}),editType:"calc"},pattern:Mh.marker.pattern,editType:"calc"},text:Mh.text,hovertext:Mh.hovertext,scalegroup:g2({},Mh.scalegroup,{}),textinfo:g2({},Mh.textinfo,{flags:["label","text","value","percent"]}),texttemplate:QEt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:kEe({editType:"plot"}),hoverinfo:g2({},$Et.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:JEt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:kEe(),textposition:g2({},Mh.textposition,{values:["inside","none"],dflt:"inside"}),textfont:Mh.textfont,insidetextfont:Mh.insidetextfont,title:{text:Mh.title.text,font:Mh.title.font,position:g2({},Mh.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:KEt({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"}}});var dG=ne((_hr,LEe)=>{"use strict";var ekt=kL().hiddenlabels;LEe.exports={hiddenlabels:ekt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var DEe=ne((whr,PEe)=>{"use strict";var FEe=Zt(),tkt=hG(),rkt=zl().defaults,nkt=wv().handleText,akt=n2().handleLabelsAndValues,ikt=n2().handleMarkerDefaults;PEe.exports=function(t,r,n,a){function i(m,x){return FEe.coerce(t,r,tkt,m,x)}var o=i("labels"),s=i("values"),l=akt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(i("label0"),i("dlabel")),!u){r.visible=!1;return}r._length=u,ikt(t,r,a,i),i("scalegroup");var c=i("text"),f=i("texttemplate");i("texttemplatefallback");var h;if(f||(h=i("textinfo",Array.isArray(c)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),f||h&&h!=="none"){var v=i("textposition");nkt(t,r,a,i,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else h==="none"&&i("textposition","none");rkt(r,a,i);var d=i("title.text");d&&(i("title.position"),FEe.coerceFont(i,"title.font",a.font)),i("aspectratio"),i("baseratio")}});var IEe=ne((Thr,REe)=>{"use strict";var okt=Zt(),skt=dG();REe.exports=function(t,r){function n(a,i){return okt.coerce(t,r,skt,a,i)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var vG=ne((Ahr,qEe)=>{"use strict";var zEe=k3();function lkt(e,t){return zEe.calc(e,t)}function ukt(e){zEe.crossTraceCalc(e,{type:"funnelarea"})}qEe.exports={calc:lkt,crossTraceCalc:ukt}});var VEe=ne((Mhr,UEe)=>{"use strict";var m2=Ea(),pG=li(),Gm=Zt(),ckt=Gm.strScale,BEe=Gm.strTranslate,OEe=Ms(),fkt=Dx(),hkt=fkt.toMoveInsideBar,NEe=Uh(),dkt=NEe.recordMinTextSize,vkt=NEe.clearMinTextSize,pkt=em(),Y3=DL(),gkt=Y3.attachFxHandlers,mkt=Y3.determineInsideTextFont,ykt=Y3.layoutAreas,xkt=Y3.prerenderTitles,bkt=Y3.positionTitleOutside,_kt=Y3.formatSliceLabel;UEe.exports=function(t,r){var n=t._context.staticPlot,a=t._fullLayout;vkt("funnelarea",a),xkt(r,t),ykt(r,a._size),Gm.makeTraceGroups(a._funnelarealayer,r,"trace").each(function(i){var o=m2.select(this),s=i[0],l=s.trace;Tkt(i),o.each(function(){var u=m2.select(this).selectAll("g.slice").data(i);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,h){if(f.hidden){m2.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var v=s.cx,d=s.cy,m=m2.select(this),x=m.selectAll("path.surface").data([f]);x.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),m.call(gkt,t,i);var g="M"+(v+f.TR[0])+","+(d+f.TR[1])+gG(f.TR,f.BR)+gG(f.BR,f.BL)+gG(f.BL,f.TL)+"Z";x.attr("d",g),_kt(t,f,s);var E=pkt.castOption(l.textposition,f.pts),M=m.selectAll("g.slicetext").data(f.text&&E!=="none"?[0]:[]);M.enter().append("g").classed("slicetext",!0),M.exit().remove(),M.each(function(){var w=Gm.ensureSingle(m2.select(this),"text","",function(P){P.attr("data-notex",1)}),k=Gm.ensureUniformFontSize(t,mkt(l,f,a.font));w.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(pG.font,k).call(OEe.convertToTspans,t);var y=pG.bBox(w.node()),S,T,p,C=Math.min(f.BL[1],f.BR[1])+d,A=Math.max(f.TL[1],f.TR[1])+d;T=Math.max(f.TL[0],f.BL[0])+v,p=Math.min(f.TR[0],f.BR[0])+v,S=hkt(T,p,C,A,y,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),S.fontSize=k.size,dkt(l.type,S,a),i[h].transform=S,Gm.setTransormAndDisplay(w,S)})});var c=m2.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=Gm.ensureSingle(m2.select(this),"text","",function(d){d.attr("data-notex",1)}),h=l.title.text;l._meta&&(h=Gm.templateString(h,l._meta)),f.text(h).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(pG.font,l.title.font).call(OEe.convertToTspans,t);var v=bkt(s,a._size);f.attr("transform",BEe(v.x,v.y)+ckt(Math.min(1,v.scale))+BEe(v.tx,v.ty))})})})};function gG(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function wkt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function Tkt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i=Math.pow(a,2),o=t.vTotal,s=o*i/(1-i),l=o,u=s/o;function c(){var D=Math.sqrt(u);return{x:D,y:-D}}function f(){var D=c();return[D.x,D.y]}var h,v=[];v.push(f());var d,m;for(d=e.length-1;d>-1;d--)if(m=e[d],!m.hidden){var x=m.v/l;u+=x,v.push(f())}var g=1/0,E=-1/0;for(d=0;d-1;d--)if(m=e[d],!m.hidden){C+=1;var A=v[C][0],P=v[C][1];m.TL=[-A,P],m.TR=[A,P],m.BL=T,m.BR=p,m.pxmid=wkt(m.TR,m.BR),T=m.TL,p=m.TR}}});var jEe=ne((Shr,HEe)=>{"use strict";var GEe=Ea(),Akt=Kb(),Mkt=Uh().resizeText;HEe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");Mkt(t,r,"funnelarea"),r.each(function(n){var a=n[0],i=a.trace,o=GEe.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(s){GEe.select(this).call(Akt,s,i,t)})})}});var YEe=ne((Ehr,WEe)=>{"use strict";WEe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:EEe(),categories:["pie-like","funnelarea","showLegend"],attributes:hG(),layoutAttributes:dG(),supplyDefaults:DEe(),supplyLayoutDefaults:IEe(),calc:vG().calc,crossTraceCalc:vG().crossTraceCalc,plot:VEe(),style:jEe(),styleOne:Kb(),meta:{}}});var ZEe=ne((khr,XEe)=>{"use strict";XEe.exports=YEe()});var $f=ne((Chr,$Ee)=>{"use strict";(function(){var e={1964:(function(a,i,o){a.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}}),4793:(function(a,i,o){"use strict";var s;var l=o(7507),u=o(3778),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;i.hp=d,s=p,i.IS=50;var f=2147483647;s=f,d.TYPED_ARRAY_SUPPORT=h(),!d.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function h(){try{var Ie=new Uint8Array(1),de={foo:function(){return 42}};return Object.setPrototypeOf(de,Uint8Array.prototype),Object.setPrototypeOf(Ie,de),Ie.foo()===42}catch(Ee){return!1}}Object.defineProperty(d.prototype,"parent",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.buffer}}),Object.defineProperty(d.prototype,"offset",{enumerable:!0,get:function(){if(d.isBuffer(this))return this.byteOffset}});function v(Ie){if(Ie>f)throw new RangeError('The value "'+Ie+'" is invalid for option "size"');var de=new Uint8Array(Ie);return Object.setPrototypeOf(de,d.prototype),de}function d(Ie,de,Ee){if(typeof Ie=="number"){if(typeof de=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(Ie)}return m(Ie,de,Ee)}d.poolSize=8192;function m(Ie,de,Ee){if(typeof Ie=="string")return M(Ie,de);if(ArrayBuffer.isView(Ie))return k(Ie);if(Ie==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ie);if(qe(Ie,ArrayBuffer)||Ie&&qe(Ie.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(qe(Ie,SharedArrayBuffer)||Ie&&qe(Ie.buffer,SharedArrayBuffer)))return y(Ie,de,Ee);if(typeof Ie=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ue=Ie.valueOf&&Ie.valueOf();if(Ue!=null&&Ue!==Ie)return d.from(Ue,de,Ee);var ge=S(Ie);if(ge)return ge;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof Ie[Symbol.toPrimitive]=="function")return d.from(Ie[Symbol.toPrimitive]("string"),de,Ee);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof Ie)}d.from=function(Ie,de,Ee){return m(Ie,de,Ee)},Object.setPrototypeOf(d.prototype,Uint8Array.prototype),Object.setPrototypeOf(d,Uint8Array);function x(Ie){if(typeof Ie!="number")throw new TypeError('"size" argument must be of type number');if(Ie<0)throw new RangeError('The value "'+Ie+'" is invalid for option "size"')}function g(Ie,de,Ee){return x(Ie),Ie<=0?v(Ie):de!==void 0?typeof Ee=="string"?v(Ie).fill(de,Ee):v(Ie).fill(de):v(Ie)}d.alloc=function(Ie,de,Ee){return g(Ie,de,Ee)};function E(Ie){return x(Ie),v(Ie<0?0:T(Ie)|0)}d.allocUnsafe=function(Ie){return E(Ie)},d.allocUnsafeSlow=function(Ie){return E(Ie)};function M(Ie,de){if((typeof de!="string"||de==="")&&(de="utf8"),!d.isEncoding(de))throw new TypeError("Unknown encoding: "+de);var Ee=C(Ie,de)|0,Ue=v(Ee),ge=Ue.write(Ie,de);return ge!==Ee&&(Ue=Ue.slice(0,ge)),Ue}function w(Ie){for(var de=Ie.length<0?0:T(Ie.length)|0,Ee=v(de),Ue=0;Ue=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return Ie|0}function p(Ie){return+Ie!=Ie&&(Ie=0),d.alloc(+Ie)}d.isBuffer=function(de){return de!=null&&de._isBuffer===!0&&de!==d.prototype},d.compare=function(de,Ee){if(qe(de,Uint8Array)&&(de=d.from(de,de.offset,de.byteLength)),qe(Ee,Uint8Array)&&(Ee=d.from(Ee,Ee.offset,Ee.byteLength)),!d.isBuffer(de)||!d.isBuffer(Ee))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(de===Ee)return 0;for(var Ue=de.length,ge=Ee.length,Ge=0,tt=Math.min(Ue,ge);Gege.length?d.from(tt).copy(ge,Ge):Uint8Array.prototype.set.call(ge,tt,Ge);else if(d.isBuffer(tt))tt.copy(ge,Ge);else throw new TypeError('"list" argument must be an Array of Buffers');Ge+=tt.length}return ge};function C(Ie,de){if(d.isBuffer(Ie))return Ie.length;if(ArrayBuffer.isView(Ie)||qe(Ie,ArrayBuffer))return Ie.byteLength;if(typeof Ie!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof Ie);var Ee=Ie.length,Ue=arguments.length>2&&arguments[2]===!0;if(!Ue&&Ee===0)return 0;for(var ge=!1;;)switch(de){case"ascii":case"latin1":case"binary":return Ee;case"utf8":case"utf-8":return ze(Ie).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ee*2;case"hex":return Ee>>>1;case"base64":return st(Ie).length;default:if(ge)return Ue?-1:ze(Ie).length;de=(""+de).toLowerCase(),ge=!0}}d.byteLength=C;function A(Ie,de,Ee){var Ue=!1;if((de===void 0||de<0)&&(de=0),de>this.length||((Ee===void 0||Ee>this.length)&&(Ee=this.length),Ee<=0)||(Ee>>>=0,de>>>=0,Ee<=de))return"";for(Ie||(Ie="utf8");;)switch(Ie){case"hex":return j(this,de,Ee);case"utf8":case"utf-8":return X(this,de,Ee);case"ascii":return ue(this,de,Ee);case"latin1":case"binary":return re(this,de,Ee);case"base64":return Y(this,de,Ee);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return fe(this,de,Ee);default:if(Ue)throw new TypeError("Unknown encoding: "+Ie);Ie=(Ie+"").toLowerCase(),Ue=!0}}d.prototype._isBuffer=!0;function P(Ie,de,Ee){var Ue=Ie[de];Ie[de]=Ie[Ee],Ie[Ee]=Ue}d.prototype.swap16=function(){var de=this.length;if(de%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ee=0;EeEe&&(de+=" ... "),""},c&&(d.prototype[c]=d.prototype.inspect),d.prototype.compare=function(de,Ee,Ue,ge,Ge){if(qe(de,Uint8Array)&&(de=d.from(de,de.offset,de.byteLength)),!d.isBuffer(de))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof de);if(Ee===void 0&&(Ee=0),Ue===void 0&&(Ue=de?de.length:0),ge===void 0&&(ge=0),Ge===void 0&&(Ge=this.length),Ee<0||Ue>de.length||ge<0||Ge>this.length)throw new RangeError("out of range index");if(ge>=Ge&&Ee>=Ue)return 0;if(ge>=Ge)return-1;if(Ee>=Ue)return 1;if(Ee>>>=0,Ue>>>=0,ge>>>=0,Ge>>>=0,this===de)return 0;for(var tt=Ge-ge,ft=Ue-Ee,He=Math.min(tt,ft),Qe=this.slice(ge,Ge),We=de.slice(Ee,Ue),pt=0;pt2147483647?Ee=2147483647:Ee<-2147483648&&(Ee=-2147483648),Ee=+Ee,mt(Ee)&&(Ee=ge?0:Ie.length-1),Ee<0&&(Ee=Ie.length+Ee),Ee>=Ie.length){if(ge)return-1;Ee=Ie.length-1}else if(Ee<0)if(ge)Ee=0;else return-1;if(typeof de=="string"&&(de=d.from(de,Ue)),d.isBuffer(de))return de.length===0?-1:z(Ie,de,Ee,Ue,ge);if(typeof de=="number")return de=de&255,typeof Uint8Array.prototype.indexOf=="function"?ge?Uint8Array.prototype.indexOf.call(Ie,de,Ee):Uint8Array.prototype.lastIndexOf.call(Ie,de,Ee):z(Ie,[de],Ee,Ue,ge);throw new TypeError("val must be string, number or Buffer")}function z(Ie,de,Ee,Ue,ge){var Ge=1,tt=Ie.length,ft=de.length;if(Ue!==void 0&&(Ue=String(Ue).toLowerCase(),Ue==="ucs2"||Ue==="ucs-2"||Ue==="utf16le"||Ue==="utf-16le")){if(Ie.length<2||de.length<2)return-1;Ge=2,tt/=2,ft/=2,Ee/=2}function He(qt,Wt){return Ge===1?qt[Wt]:qt.readUInt16BE(Wt*Ge)}var Qe;if(ge){var We=-1;for(Qe=Ee;Qett&&(Ee=tt-ft),Qe=Ee;Qe>=0;Qe--){for(var pt=!0,kt=0;ktge&&(Ue=ge)):Ue=ge;var Ge=de.length;Ue>Ge/2&&(Ue=Ge/2);for(var tt=0;tt>>0,isFinite(Ue)?(Ue=Ue>>>0,ge===void 0&&(ge="utf8")):(ge=Ue,Ue=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ge=this.length-Ee;if((Ue===void 0||Ue>Ge)&&(Ue=Ge),de.length>0&&(Ue<0||Ee<0)||Ee>this.length)throw new RangeError("Attempt to write outside buffer bounds");ge||(ge="utf8");for(var tt=!1;;)switch(ge){case"hex":return q(this,de,Ee,Ue);case"utf8":case"utf-8":return U(this,de,Ee,Ue);case"ascii":case"latin1":case"binary":return O(this,de,Ee,Ue);case"base64":return R(this,de,Ee,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,de,Ee,Ue);default:if(tt)throw new TypeError("Unknown encoding: "+ge);ge=(""+ge).toLowerCase(),tt=!0}},d.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function Y(Ie,de,Ee){return de===0&&Ee===Ie.length?l.fromByteArray(Ie):l.fromByteArray(Ie.slice(de,Ee))}function X(Ie,de,Ee){Ee=Math.min(Ie.length,Ee);for(var Ue=[],ge=de;ge239?4:Ge>223?3:Ge>191?2:1;if(ge+ft<=Ee){var He,Qe,We,pt;switch(ft){case 1:Ge<128&&(tt=Ge);break;case 2:He=Ie[ge+1],(He&192)===128&&(pt=(Ge&31)<<6|He&63,pt>127&&(tt=pt));break;case 3:He=Ie[ge+1],Qe=Ie[ge+2],(He&192)===128&&(Qe&192)===128&&(pt=(Ge&15)<<12|(He&63)<<6|Qe&63,pt>2047&&(pt<55296||pt>57343)&&(tt=pt));break;case 4:He=Ie[ge+1],Qe=Ie[ge+2],We=Ie[ge+3],(He&192)===128&&(Qe&192)===128&&(We&192)===128&&(pt=(Ge&15)<<18|(He&63)<<12|(Qe&63)<<6|We&63,pt>65535&&pt<1114112&&(tt=pt))}}tt===null?(tt=65533,ft=1):tt>65535&&(tt-=65536,Ue.push(tt>>>10&1023|55296),tt=56320|tt&1023),Ue.push(tt),ge+=ft}return se(Ue)}var te=4096;function se(Ie){var de=Ie.length;if(de<=te)return String.fromCharCode.apply(String,Ie);for(var Ee="",Ue=0;UeUe)&&(Ee=Ue);for(var ge="",Ge=de;GeUe&&(de=Ue),Ee<0?(Ee+=Ue,Ee<0&&(Ee=0)):Ee>Ue&&(Ee=Ue),EeEe)throw new RangeError("Trying to access beyond buffer length")}d.prototype.readUintLE=d.prototype.readUIntLE=function(de,Ee,Ue){de=de>>>0,Ee=Ee>>>0,Ue||ce(de,Ee,this.length);for(var ge=this[de],Ge=1,tt=0;++tt>>0,Ee=Ee>>>0,Ue||ce(de,Ee,this.length);for(var ge=this[de+--Ee],Ge=1;Ee>0&&(Ge*=256);)ge+=this[de+--Ee]*Ge;return ge},d.prototype.readUint8=d.prototype.readUInt8=function(de,Ee){return de=de>>>0,Ee||ce(de,1,this.length),this[de]},d.prototype.readUint16LE=d.prototype.readUInt16LE=function(de,Ee){return de=de>>>0,Ee||ce(de,2,this.length),this[de]|this[de+1]<<8},d.prototype.readUint16BE=d.prototype.readUInt16BE=function(de,Ee){return de=de>>>0,Ee||ce(de,2,this.length),this[de]<<8|this[de+1]},d.prototype.readUint32LE=d.prototype.readUInt32LE=function(de,Ee){return de=de>>>0,Ee||ce(de,4,this.length),(this[de]|this[de+1]<<8|this[de+2]<<16)+this[de+3]*16777216},d.prototype.readUint32BE=d.prototype.readUInt32BE=function(de,Ee){return de=de>>>0,Ee||ce(de,4,this.length),this[de]*16777216+(this[de+1]<<16|this[de+2]<<8|this[de+3])},d.prototype.readIntLE=function(de,Ee,Ue){de=de>>>0,Ee=Ee>>>0,Ue||ce(de,Ee,this.length);for(var ge=this[de],Ge=1,tt=0;++tt=Ge&&(ge-=Math.pow(2,8*Ee)),ge},d.prototype.readIntBE=function(de,Ee,Ue){de=de>>>0,Ee=Ee>>>0,Ue||ce(de,Ee,this.length);for(var ge=Ee,Ge=1,tt=this[de+--ge];ge>0&&(Ge*=256);)tt+=this[de+--ge]*Ge;return Ge*=128,tt>=Ge&&(tt-=Math.pow(2,8*Ee)),tt},d.prototype.readInt8=function(de,Ee){return de=de>>>0,Ee||ce(de,1,this.length),this[de]&128?(255-this[de]+1)*-1:this[de]},d.prototype.readInt16LE=function(de,Ee){de=de>>>0,Ee||ce(de,2,this.length);var Ue=this[de]|this[de+1]<<8;return Ue&32768?Ue|4294901760:Ue},d.prototype.readInt16BE=function(de,Ee){de=de>>>0,Ee||ce(de,2,this.length);var Ue=this[de+1]|this[de]<<8;return Ue&32768?Ue|4294901760:Ue},d.prototype.readInt32LE=function(de,Ee){return de=de>>>0,Ee||ce(de,4,this.length),this[de]|this[de+1]<<8|this[de+2]<<16|this[de+3]<<24},d.prototype.readInt32BE=function(de,Ee){return de=de>>>0,Ee||ce(de,4,this.length),this[de]<<24|this[de+1]<<16|this[de+2]<<8|this[de+3]},d.prototype.readFloatLE=function(de,Ee){return de=de>>>0,Ee||ce(de,4,this.length),u.read(this,de,!0,23,4)},d.prototype.readFloatBE=function(de,Ee){return de=de>>>0,Ee||ce(de,4,this.length),u.read(this,de,!1,23,4)},d.prototype.readDoubleLE=function(de,Ee){return de=de>>>0,Ee||ce(de,8,this.length),u.read(this,de,!0,52,8)},d.prototype.readDoubleBE=function(de,Ee){return de=de>>>0,Ee||ce(de,8,this.length),u.read(this,de,!1,52,8)};function oe(Ie,de,Ee,Ue,ge,Ge){if(!d.isBuffer(Ie))throw new TypeError('"buffer" argument must be a Buffer instance');if(de>ge||deIe.length)throw new RangeError("Index out of range")}d.prototype.writeUintLE=d.prototype.writeUIntLE=function(de,Ee,Ue,ge){if(de=+de,Ee=Ee>>>0,Ue=Ue>>>0,!ge){var Ge=Math.pow(2,8*Ue)-1;oe(this,de,Ee,Ue,Ge,0)}var tt=1,ft=0;for(this[Ee]=de&255;++ft>>0,Ue=Ue>>>0,!ge){var Ge=Math.pow(2,8*Ue)-1;oe(this,de,Ee,Ue,Ge,0)}var tt=Ue-1,ft=1;for(this[Ee+tt]=de&255;--tt>=0&&(ft*=256);)this[Ee+tt]=de/ft&255;return Ee+Ue},d.prototype.writeUint8=d.prototype.writeUInt8=function(de,Ee,Ue){return de=+de,Ee=Ee>>>0,Ue||oe(this,de,Ee,1,255,0),this[Ee]=de&255,Ee+1},d.prototype.writeUint16LE=d.prototype.writeUInt16LE=function(de,Ee,Ue){return de=+de,Ee=Ee>>>0,Ue||oe(this,de,Ee,2,65535,0),this[Ee]=de&255,this[Ee+1]=de>>>8,Ee+2},d.prototype.writeUint16BE=d.prototype.writeUInt16BE=function(de,Ee,Ue){return de=+de,Ee=Ee>>>0,Ue||oe(this,de,Ee,2,65535,0),this[Ee]=de>>>8,this[Ee+1]=de&255,Ee+2},d.prototype.writeUint32LE=d.prototype.writeUInt32LE=function(de,Ee,Ue){return de=+de,Ee=Ee>>>0,Ue||oe(this,de,Ee,4,4294967295,0),this[Ee+3]=de>>>24,this[Ee+2]=de>>>16,this[Ee+1]=de>>>8,this[Ee]=de&255,Ee+4},d.prototype.writeUint32BE=d.prototype.writeUInt32BE=function(de,Ee,Ue){return de=+de,Ee=Ee>>>0,Ue||oe(this,de,Ee,4,4294967295,0),this[Ee]=de>>>24,this[Ee+1]=de>>>16,this[Ee+2]=de>>>8,this[Ee+3]=de&255,Ee+4},d.prototype.writeIntLE=function(de,Ee,Ue,ge){if(de=+de,Ee=Ee>>>0,!ge){var Ge=Math.pow(2,8*Ue-1);oe(this,de,Ee,Ue,Ge-1,-Ge)}var tt=0,ft=1,He=0;for(this[Ee]=de&255;++tt>0)-He&255;return Ee+Ue},d.prototype.writeIntBE=function(de,Ee,Ue,ge){if(de=+de,Ee=Ee>>>0,!ge){var Ge=Math.pow(2,8*Ue-1);oe(this,de,Ee,Ue,Ge-1,-Ge)}var tt=Ue-1,ft=1,He=0;for(this[Ee+tt]=de&255;--tt>=0&&(ft*=256);)de<0&&He===0&&this[Ee+tt+1]!==0&&(He=1),this[Ee+tt]=(de/ft>>0)-He&255;return Ee+Ue},d.prototype.writeInt8=function(de,Ee,Ue){return de=+de,Ee=Ee>>>0,Ue||oe(this,de,Ee,1,127,-128),de<0&&(de=255+de+1),this[Ee]=de&255,Ee+1},d.prototype.writeInt16LE=function(de,Ee,Ue){return de=+de,Ee=Ee>>>0,Ue||oe(this,de,Ee,2,32767,-32768),this[Ee]=de&255,this[Ee+1]=de>>>8,Ee+2},d.prototype.writeInt16BE=function(de,Ee,Ue){return de=+de,Ee=Ee>>>0,Ue||oe(this,de,Ee,2,32767,-32768),this[Ee]=de>>>8,this[Ee+1]=de&255,Ee+2},d.prototype.writeInt32LE=function(de,Ee,Ue){return de=+de,Ee=Ee>>>0,Ue||oe(this,de,Ee,4,2147483647,-2147483648),this[Ee]=de&255,this[Ee+1]=de>>>8,this[Ee+2]=de>>>16,this[Ee+3]=de>>>24,Ee+4},d.prototype.writeInt32BE=function(de,Ee,Ue){return de=+de,Ee=Ee>>>0,Ue||oe(this,de,Ee,4,2147483647,-2147483648),de<0&&(de=4294967295+de+1),this[Ee]=de>>>24,this[Ee+1]=de>>>16,this[Ee+2]=de>>>8,this[Ee+3]=de&255,Ee+4};function we(Ie,de,Ee,Ue,ge,Ge){if(Ee+Ue>Ie.length)throw new RangeError("Index out of range");if(Ee<0)throw new RangeError("Index out of range")}function he(Ie,de,Ee,Ue,ge){return de=+de,Ee=Ee>>>0,ge||we(Ie,de,Ee,4,34028234663852886e22,-34028234663852886e22),u.write(Ie,de,Ee,Ue,23,4),Ee+4}d.prototype.writeFloatLE=function(de,Ee,Ue){return he(this,de,Ee,!0,Ue)},d.prototype.writeFloatBE=function(de,Ee,Ue){return he(this,de,Ee,!1,Ue)};function ye(Ie,de,Ee,Ue,ge){return de=+de,Ee=Ee>>>0,ge||we(Ie,de,Ee,8,17976931348623157e292,-17976931348623157e292),u.write(Ie,de,Ee,Ue,52,8),Ee+8}d.prototype.writeDoubleLE=function(de,Ee,Ue){return ye(this,de,Ee,!0,Ue)},d.prototype.writeDoubleBE=function(de,Ee,Ue){return ye(this,de,Ee,!1,Ue)},d.prototype.copy=function(de,Ee,Ue,ge){if(!d.isBuffer(de))throw new TypeError("argument should be a Buffer");if(Ue||(Ue=0),!ge&&ge!==0&&(ge=this.length),Ee>=de.length&&(Ee=de.length),Ee||(Ee=0),ge>0&&ge=this.length)throw new RangeError("Index out of range");if(ge<0)throw new RangeError("sourceEnd out of bounds");ge>this.length&&(ge=this.length),de.length-Ee>>0,Ue=Ue===void 0?this.length:Ue>>>0,de||(de=0);var tt;if(typeof de=="number")for(tt=Ee;tt55295&&Ee<57344){if(!ge){if(Ee>56319){(de-=3)>-1&&Ge.push(239,191,189);continue}else if(tt+1===Ue){(de-=3)>-1&&Ge.push(239,191,189);continue}ge=Ee;continue}if(Ee<56320){(de-=3)>-1&&Ge.push(239,191,189),ge=Ee;continue}Ee=(ge-55296<<10|Ee-56320)+65536}else ge&&(de-=3)>-1&&Ge.push(239,191,189);if(ge=null,Ee<128){if((de-=1)<0)break;Ge.push(Ee)}else if(Ee<2048){if((de-=2)<0)break;Ge.push(Ee>>6|192,Ee&63|128)}else if(Ee<65536){if((de-=3)<0)break;Ge.push(Ee>>12|224,Ee>>6&63|128,Ee&63|128)}else if(Ee<1114112){if((de-=4)<0)break;Ge.push(Ee>>18|240,Ee>>12&63|128,Ee>>6&63|128,Ee&63|128)}else throw new Error("Invalid code point")}return Ge}function Xe(Ie){for(var de=[],Ee=0;Ee>8,ge=Ee%256,Ge.push(ge),Ge.push(Ue);return Ge}function st(Ie){return l.toByteArray(le(Ie))}function Oe(Ie,de,Ee,Ue){for(var ge=0;ge=de.length||ge>=Ie.length);++ge)de[ge+Ee]=Ie[ge];return ge}function qe(Ie,de){return Ie instanceof de||Ie!=null&&Ie.constructor!=null&&Ie.constructor.name!=null&&Ie.constructor.name===de.name}function mt(Ie){return Ie!==Ie}var lt=(function(){for(var Ie="0123456789abcdef",de=new Array(256),Ee=0;Ee<16;++Ee)for(var Ue=Ee*16,ge=0;ge<16;++ge)de[Ue+ge]=Ie[Ee]+Ie[ge];return de})()}),9216:(function(a){"use strict";a.exports=l,a.exports.isMobile=l,a.exports.default=l;let i=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});let c=u.ua;if(!c&&typeof navigator!="undefined"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;let f=i.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}}),6296:(function(a,i,o){"use strict";a.exports=h;var s=o(7261),l=o(9977),u=o(1811);function c(v,d){this._controllerNames=Object.keys(v),this._controllerList=this._controllerNames.map(function(m){return v[m]}),this._mode=d,this._active=v[d],this._active||(this._mode="turntable",this._active=v.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 f=c.prototype;f.flush=function(v){for(var d=this._controllerList,m=0;m0)throw new Error("Invalid string. Length must be a multiple of 4");var k=M.indexOf("=");k===-1&&(k=w);var y=k===w?0:4-k%4;return[k,y]}function v(M){var w=h(M),k=w[0],y=w[1];return(k+y)*3/4-y}function d(M,w,k){return(w+k)*3/4-k}function m(M){var w,k=h(M),y=k[0],S=k[1],T=new l(d(M,y,S)),p=0,C=S>0?y-4:y,A;for(A=0;A>16&255,T[p++]=w>>8&255,T[p++]=w&255;return S===2&&(w=s[M.charCodeAt(A)]<<2|s[M.charCodeAt(A+1)]>>4,T[p++]=w&255),S===1&&(w=s[M.charCodeAt(A)]<<10|s[M.charCodeAt(A+1)]<<4|s[M.charCodeAt(A+2)]>>2,T[p++]=w>>8&255,T[p++]=w&255),T}function x(M){return o[M>>18&63]+o[M>>12&63]+o[M>>6&63]+o[M&63]}function g(M,w,k){for(var y,S=[],T=w;TC?C:p+T));return y===1?(w=M[k-1],S.push(o[w>>2]+o[w<<4&63]+"==")):y===2&&(w=(M[k-2]<<8)+M[k-1],S.push(o[w>>10]+o[w>>4&63]+o[w<<2&63]+"=")),S.join("")}}),3865:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}}),1318:(function(a){"use strict";a.exports=i;function i(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}}),8697:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}}),7842:(function(a,i,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),h=o(8697);a.exports=v;function v(d,m){if(s(d))return m?h(d,v(m)):[d[0].clone(),d[1].clone()];var x=0,g,E;if(l(d))g=d.clone();else if(typeof d=="string")g=c(d);else{if(d===0)return[u(0),u(1)];if(d===Math.floor(d))g=u(d);else{for(;d!==Math.floor(d);)d=d*Math.pow(2,256),x-=256;g=u(d)}}if(s(m))g.mul(m[1]),E=m[0].clone();else if(l(m))E=m.clone();else if(typeof m=="string")E=c(m);else if(!m)E=u(1);else if(m===Math.floor(m))E=u(m);else{for(;m!==Math.floor(m);)m=m*Math.pow(2,256),x+=256;E=u(m)}return x>0?g=g.ushln(x):x<0&&(E=E.ushln(-x)),f(g,E)}}),6330:(function(a,i,o){"use strict";var s=o(1533);a.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}}),5716:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return u.cmp(new s(0))}}),1369:(function(a,i,o){"use strict";var s=o(5716);a.exports=l;function l(u){var c=u.length,f=u.words,h=0;if(c===1)h=f[0];else if(c===2)h=f[0]+f[1]*67108864;else for(var v=0;v20?52:h+32}}),1533:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}}),2651:(function(a,i,o){"use strict";var s=o(6859),l=o(2361);a.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}}),869:(function(a,i,o){"use strict";var s=o(2651),l=o(5716);a.exports=u;function u(c,f){var h=l(c),v=l(f);if(h===0)return[s(0),s(1)];if(v===0)return[s(0),s(0)];v<0&&(c=c.neg(),f=f.neg());var d=c.gcd(f);return d.cmpn(1)?[c.div(d),f.div(d)]:[c,f]}}),6768:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return new s(u)}}),6504:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}}),7721:(function(a,i,o){"use strict";var s=o(5716);a.exports=l;function l(u){return s(u[0])*s(u[1])}}),5572:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}}),946:(function(a,i,o){"use strict";var s=o(1369),l=o(4025);a.exports=u;function u(c){var f=c[0],h=c[1];if(f.cmpn(0)===0)return 0;var v=f.abs().divmod(h.abs()),d=v.div,m=s(d),x=v.mod,g=f.negative!==h.negative?-1:1;if(x.cmpn(0)===0)return g*m;if(m){var E=l(m)+4,M=s(x.ushln(E).divRound(h));return g*(m+M*Math.pow(2,-E))}else{var w=h.bitLength()-x.bitLength()+53,M=s(x.ushln(w).divRound(h));return w<1023?g*M*Math.pow(2,-w):(M*=Math.pow(2,-1023),g*M*Math.pow(2,1023-w))}}}),2478:(function(a){"use strict";function i(f,h,v,d,m){for(var x=m+1;d<=m;){var g=d+m>>>1,E=f[g],M=v!==void 0?v(E,h):E-h;M>=0?(x=g,m=g-1):d=g+1}return x}function o(f,h,v,d,m){for(var x=m+1;d<=m;){var g=d+m>>>1,E=f[g],M=v!==void 0?v(E,h):E-h;M>0?(x=g,m=g-1):d=g+1}return x}function s(f,h,v,d,m){for(var x=d-1;d<=m;){var g=d+m>>>1,E=f[g],M=v!==void 0?v(E,h):E-h;M<0?(x=g,d=g+1):m=g-1}return x}function l(f,h,v,d,m){for(var x=d-1;d<=m;){var g=d+m>>>1,E=f[g],M=v!==void 0?v(E,h):E-h;M<=0?(x=g,d=g+1):m=g-1}return x}function u(f,h,v,d,m){for(;d<=m;){var x=d+m>>>1,g=f[x],E=v!==void 0?v(g,h):g-h;if(E===0)return x;E<=0?d=x+1:m=x-1}return-1}function c(f,h,v,d,m,x){return typeof v=="function"?x(f,h,v,d===void 0?0:d|0,m===void 0?f.length-1:m|0):x(f,h,void 0,v===void 0?0:v|0,d===void 0?f.length-1:d|0)}a.exports={ge:function(f,h,v,d,m){return c(f,h,v,d,m,i)},gt:function(f,h,v,d,m){return c(f,h,v,d,m,o)},lt:function(f,h,v,d,m){return c(f,h,v,d,m,s)},le:function(f,h,v,d,m){return c(f,h,v,d,m,l)},eq:function(f,h,v,d,m){return c(f,h,v,d,m,u)}}}),8828:(function(a,i){"use strict";"use restrict";var o=32;i.INT_BITS=o,i.INT_MAX=2147483647,i.INT_MIN=-1<0)-(u<0)},i.abs=function(u){var c=u>>o-1;return(u^c)-c},i.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},i.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},i.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}i.countTrailingZeros=s,i.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},i.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},i.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,v=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--v;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},i.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},i.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},i.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},i.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},i.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}}),6859:(function(a,i,o){a=o.nmd(a),(function(s,l){"use strict";function u(O,R){if(!O)throw new Error(R||"Assertion failed")}function c(O,R){O.super_=R;var B=function(){};B.prototype=R.prototype,O.prototype=new B,O.prototype.constructor=O}function f(O,R,B){if(f.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,O!==null&&((R==="le"||R==="be")&&(B=R,R=10),this._init(O||0,R||10,B||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var h;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?h=window.Buffer:h=o(7790).Buffer}catch(O){}f.isBN=function(R){return R instanceof f?!0:R!==null&&typeof R=="object"&&R.constructor.wordSize===f.wordSize&&Array.isArray(R.words)},f.max=function(R,B){return R.cmp(B)>0?R:B},f.min=function(R,B){return R.cmp(B)<0?R:B},f.prototype._init=function(R,B,Y){if(typeof R=="number")return this._initNumber(R,B,Y);if(typeof R=="object")return this._initArray(R,B,Y);B==="hex"&&(B=16),u(B===(B|0)&&B>=2&&B<=36),R=R.toString().replace(/\s+/g,"");var X=0;R[0]==="-"&&(X++,this.negative=1),X=0;X-=3)se=R[X]|R[X-1]<<8|R[X-2]<<16,this.words[te]|=se<>>26-ue&67108863,ue+=24,ue>=26&&(ue-=26,te++);else if(Y==="le")for(X=0,te=0;X>>26-ue&67108863,ue+=24,ue>=26&&(ue-=26,te++);return this.strip()};function v(O,R){var B=O.charCodeAt(R);return B>=65&&B<=70?B-55:B>=97&&B<=102?B-87:B-48&15}function d(O,R,B){var Y=v(O,B);return B-1>=R&&(Y|=v(O,B-1)<<4),Y}f.prototype._parseHex=function(R,B,Y){this.length=Math.ceil((R.length-B)/6),this.words=new Array(this.length);for(var X=0;X=B;X-=2)ue=d(R,B,X)<=18?(te-=18,se+=1,this.words[se]|=ue>>>26):te+=8;else{var re=R.length-B;for(X=re%2===0?B+1:B;X=18?(te-=18,se+=1,this.words[se]|=ue>>>26):te+=8}this.strip()};function m(O,R,B,Y){for(var X=0,te=Math.min(O.length,B),se=R;se=49?X+=ue-49+10:ue>=17?X+=ue-17+10:X+=ue}return X}f.prototype._parseBase=function(R,B,Y){this.words=[0],this.length=1;for(var X=0,te=1;te<=67108863;te*=B)X++;X--,te=te/B|0;for(var se=R.length-Y,ue=se%X,re=Math.min(se,se-ue)+Y,j=0,fe=Y;fe1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?""};var x=["","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"],g=[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],E=[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];f.prototype.toString=function(R,B){R=R||10,B=B|0||1;var Y;if(R===16||R==="hex"){Y="";for(var X=0,te=0,se=0;se>>24-X&16777215,X+=2,X>=26&&(X-=26,se--),te!==0||se!==this.length-1?Y=x[6-re.length]+re+Y:Y=re+Y}for(te!==0&&(Y=te.toString(16)+Y);Y.length%B!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}if(R===(R|0)&&R>=2&&R<=36){var j=g[R],fe=E[R];Y="";var ce=this.clone();for(ce.negative=0;!ce.isZero();){var oe=ce.modn(fe).toString(R);ce=ce.idivn(fe),ce.isZero()?Y=oe+Y:Y=x[j-oe.length]+oe+Y}for(this.isZero()&&(Y="0"+Y);Y.length%B!==0;)Y="0"+Y;return this.negative!==0&&(Y="-"+Y),Y}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var R=this.words[0];return this.length===2?R+=this.words[1]*67108864:this.length===3&&this.words[2]===1?R+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-R:R},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(R,B){return u(typeof h!="undefined"),this.toArrayLike(h,R,B)},f.prototype.toArray=function(R,B){return this.toArrayLike(Array,R,B)},f.prototype.toArrayLike=function(R,B,Y){var X=this.byteLength(),te=Y||Math.max(1,X);u(X<=te,"byte array longer than desired length"),u(te>0,"Requested array length <= 0"),this.strip();var se=B==="le",ue=new R(te),re,j,fe=this.clone();if(se){for(j=0;!fe.isZero();j++)re=fe.andln(255),fe.iushrn(8),ue[j]=re;for(;j=4096&&(Y+=13,B>>>=13),B>=64&&(Y+=7,B>>>=7),B>=8&&(Y+=4,B>>>=4),B>=2&&(Y+=2,B>>>=2),Y+B},f.prototype._zeroBits=function(R){if(R===0)return 26;var B=R,Y=0;return(B&8191)===0&&(Y+=13,B>>>=13),(B&127)===0&&(Y+=7,B>>>=7),(B&15)===0&&(Y+=4,B>>>=4),(B&3)===0&&(Y+=2,B>>>=2),(B&1)===0&&Y++,Y},f.prototype.bitLength=function(){var R=this.words[this.length-1],B=this._countBits(R);return(this.length-1)*26+B};function M(O){for(var R=new Array(O.bitLength()),B=0;B>>X}return R}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var R=0,B=0;BR.length?this.clone().ior(R):R.clone().ior(this)},f.prototype.uor=function(R){return this.length>R.length?this.clone().iuor(R):R.clone().iuor(this)},f.prototype.iuand=function(R){var B;this.length>R.length?B=R:B=this;for(var Y=0;YR.length?this.clone().iand(R):R.clone().iand(this)},f.prototype.uand=function(R){return this.length>R.length?this.clone().iuand(R):R.clone().iuand(this)},f.prototype.iuxor=function(R){var B,Y;this.length>R.length?(B=this,Y=R):(B=R,Y=this);for(var X=0;XR.length?this.clone().ixor(R):R.clone().ixor(this)},f.prototype.uxor=function(R){return this.length>R.length?this.clone().iuxor(R):R.clone().iuxor(this)},f.prototype.inotn=function(R){u(typeof R=="number"&&R>=0);var B=Math.ceil(R/26)|0,Y=R%26;this._expand(B),Y>0&&B--;for(var X=0;X0&&(this.words[X]=~this.words[X]&67108863>>26-Y),this.strip()},f.prototype.notn=function(R){return this.clone().inotn(R)},f.prototype.setn=function(R,B){u(typeof R=="number"&&R>=0);var Y=R/26|0,X=R%26;return this._expand(Y+1),B?this.words[Y]=this.words[Y]|1<R.length?(Y=this,X=R):(Y=R,X=this);for(var te=0,se=0;se>>26;for(;te!==0&&se>>26;if(this.length=Y.length,te!==0)this.words[this.length]=te,this.length++;else if(Y!==this)for(;seR.length?this.clone().iadd(R):R.clone().iadd(this)},f.prototype.isub=function(R){if(R.negative!==0){R.negative=0;var B=this.iadd(R);return R.negative=1,B._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(R),this.negative=1,this._normSign();var Y=this.cmp(R);if(Y===0)return this.negative=0,this.length=1,this.words[0]=0,this;var X,te;Y>0?(X=this,te=R):(X=R,te=this);for(var se=0,ue=0;ue>26,this.words[ue]=B&67108863;for(;se!==0&&ue>26,this.words[ue]=B&67108863;if(se===0&&ue>>26,ce=re&67108863,oe=Math.min(j,R.length-1),we=Math.max(0,j-O.length+1);we<=oe;we++){var he=j-we|0;X=O.words[he]|0,te=R.words[we]|0,se=X*te+ce,fe+=se/67108864|0,ce=se&67108863}B.words[j]=ce|0,re=fe|0}return re!==0?B.words[j]=re|0:B.length--,B.strip()}var k=function(R,B,Y){var X=R.words,te=B.words,se=Y.words,ue=0,re,j,fe,ce=X[0]|0,oe=ce&8191,we=ce>>>13,he=X[1]|0,ye=he&8191,Pe=he>>>13,le=X[2]|0,ze=le&8191,Xe=le>>>13,vt=X[3]|0,st=vt&8191,Oe=vt>>>13,qe=X[4]|0,mt=qe&8191,lt=qe>>>13,Ie=X[5]|0,de=Ie&8191,Ee=Ie>>>13,Ue=X[6]|0,ge=Ue&8191,Ge=Ue>>>13,tt=X[7]|0,ft=tt&8191,He=tt>>>13,Qe=X[8]|0,We=Qe&8191,pt=Qe>>>13,kt=X[9]|0,qt=kt&8191,Wt=kt>>>13,_r=te[0]|0,tr=_r&8191,lr=_r>>>13,Ye=te[1]|0,Te=Ye&8191,Fe=Ye>>>13,Ae=te[2]|0,Re=Ae&8191,Ze=Ae>>>13,Ke=te[3]|0,_t=Ke&8191,St=Ke>>>13,Vt=te[4]|0,fr=Vt&8191,$t=Vt>>>13,gr=te[5]|0,Br=gr&8191,Nr=gr>>>13,Er=te[6]|0,zr=Er&8191,vn=Er>>>13,Nn=te[7]|0,Xn=Nn&8191,Kn=Nn>>>13,Qn=te[8]|0,un=Qn&8191,aa=Qn>>>13,da=te[9]|0,ua=da&8191,qa=da>>>13;Y.negative=R.negative^B.negative,Y.length=19,re=Math.imul(oe,tr),j=Math.imul(oe,lr),j=j+Math.imul(we,tr)|0,fe=Math.imul(we,lr);var ii=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(ii>>>26)|0,ii&=67108863,re=Math.imul(ye,tr),j=Math.imul(ye,lr),j=j+Math.imul(Pe,tr)|0,fe=Math.imul(Pe,lr),re=re+Math.imul(oe,Te)|0,j=j+Math.imul(oe,Fe)|0,j=j+Math.imul(we,Te)|0,fe=fe+Math.imul(we,Fe)|0;var pa=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(pa>>>26)|0,pa&=67108863,re=Math.imul(ze,tr),j=Math.imul(ze,lr),j=j+Math.imul(Xe,tr)|0,fe=Math.imul(Xe,lr),re=re+Math.imul(ye,Te)|0,j=j+Math.imul(ye,Fe)|0,j=j+Math.imul(Pe,Te)|0,fe=fe+Math.imul(Pe,Fe)|0,re=re+Math.imul(oe,Re)|0,j=j+Math.imul(oe,Ze)|0,j=j+Math.imul(we,Re)|0,fe=fe+Math.imul(we,Ze)|0;var no=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(no>>>26)|0,no&=67108863,re=Math.imul(st,tr),j=Math.imul(st,lr),j=j+Math.imul(Oe,tr)|0,fe=Math.imul(Oe,lr),re=re+Math.imul(ze,Te)|0,j=j+Math.imul(ze,Fe)|0,j=j+Math.imul(Xe,Te)|0,fe=fe+Math.imul(Xe,Fe)|0,re=re+Math.imul(ye,Re)|0,j=j+Math.imul(ye,Ze)|0,j=j+Math.imul(Pe,Re)|0,fe=fe+Math.imul(Pe,Ze)|0,re=re+Math.imul(oe,_t)|0,j=j+Math.imul(oe,St)|0,j=j+Math.imul(we,_t)|0,fe=fe+Math.imul(we,St)|0;var Gi=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(Gi>>>26)|0,Gi&=67108863,re=Math.imul(mt,tr),j=Math.imul(mt,lr),j=j+Math.imul(lt,tr)|0,fe=Math.imul(lt,lr),re=re+Math.imul(st,Te)|0,j=j+Math.imul(st,Fe)|0,j=j+Math.imul(Oe,Te)|0,fe=fe+Math.imul(Oe,Fe)|0,re=re+Math.imul(ze,Re)|0,j=j+Math.imul(ze,Ze)|0,j=j+Math.imul(Xe,Re)|0,fe=fe+Math.imul(Xe,Ze)|0,re=re+Math.imul(ye,_t)|0,j=j+Math.imul(ye,St)|0,j=j+Math.imul(Pe,_t)|0,fe=fe+Math.imul(Pe,St)|0,re=re+Math.imul(oe,fr)|0,j=j+Math.imul(oe,$t)|0,j=j+Math.imul(we,fr)|0,fe=fe+Math.imul(we,$t)|0;var Ti=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(Ti>>>26)|0,Ti&=67108863,re=Math.imul(de,tr),j=Math.imul(de,lr),j=j+Math.imul(Ee,tr)|0,fe=Math.imul(Ee,lr),re=re+Math.imul(mt,Te)|0,j=j+Math.imul(mt,Fe)|0,j=j+Math.imul(lt,Te)|0,fe=fe+Math.imul(lt,Fe)|0,re=re+Math.imul(st,Re)|0,j=j+Math.imul(st,Ze)|0,j=j+Math.imul(Oe,Re)|0,fe=fe+Math.imul(Oe,Ze)|0,re=re+Math.imul(ze,_t)|0,j=j+Math.imul(ze,St)|0,j=j+Math.imul(Xe,_t)|0,fe=fe+Math.imul(Xe,St)|0,re=re+Math.imul(ye,fr)|0,j=j+Math.imul(ye,$t)|0,j=j+Math.imul(Pe,fr)|0,fe=fe+Math.imul(Pe,$t)|0,re=re+Math.imul(oe,Br)|0,j=j+Math.imul(oe,Nr)|0,j=j+Math.imul(we,Br)|0,fe=fe+Math.imul(we,Nr)|0;var fi=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(fi>>>26)|0,fi&=67108863,re=Math.imul(ge,tr),j=Math.imul(ge,lr),j=j+Math.imul(Ge,tr)|0,fe=Math.imul(Ge,lr),re=re+Math.imul(de,Te)|0,j=j+Math.imul(de,Fe)|0,j=j+Math.imul(Ee,Te)|0,fe=fe+Math.imul(Ee,Fe)|0,re=re+Math.imul(mt,Re)|0,j=j+Math.imul(mt,Ze)|0,j=j+Math.imul(lt,Re)|0,fe=fe+Math.imul(lt,Ze)|0,re=re+Math.imul(st,_t)|0,j=j+Math.imul(st,St)|0,j=j+Math.imul(Oe,_t)|0,fe=fe+Math.imul(Oe,St)|0,re=re+Math.imul(ze,fr)|0,j=j+Math.imul(ze,$t)|0,j=j+Math.imul(Xe,fr)|0,fe=fe+Math.imul(Xe,$t)|0,re=re+Math.imul(ye,Br)|0,j=j+Math.imul(ye,Nr)|0,j=j+Math.imul(Pe,Br)|0,fe=fe+Math.imul(Pe,Nr)|0,re=re+Math.imul(oe,zr)|0,j=j+Math.imul(oe,vn)|0,j=j+Math.imul(we,zr)|0,fe=fe+Math.imul(we,vn)|0;var _o=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(_o>>>26)|0,_o&=67108863,re=Math.imul(ft,tr),j=Math.imul(ft,lr),j=j+Math.imul(He,tr)|0,fe=Math.imul(He,lr),re=re+Math.imul(ge,Te)|0,j=j+Math.imul(ge,Fe)|0,j=j+Math.imul(Ge,Te)|0,fe=fe+Math.imul(Ge,Fe)|0,re=re+Math.imul(de,Re)|0,j=j+Math.imul(de,Ze)|0,j=j+Math.imul(Ee,Re)|0,fe=fe+Math.imul(Ee,Ze)|0,re=re+Math.imul(mt,_t)|0,j=j+Math.imul(mt,St)|0,j=j+Math.imul(lt,_t)|0,fe=fe+Math.imul(lt,St)|0,re=re+Math.imul(st,fr)|0,j=j+Math.imul(st,$t)|0,j=j+Math.imul(Oe,fr)|0,fe=fe+Math.imul(Oe,$t)|0,re=re+Math.imul(ze,Br)|0,j=j+Math.imul(ze,Nr)|0,j=j+Math.imul(Xe,Br)|0,fe=fe+Math.imul(Xe,Nr)|0,re=re+Math.imul(ye,zr)|0,j=j+Math.imul(ye,vn)|0,j=j+Math.imul(Pe,zr)|0,fe=fe+Math.imul(Pe,vn)|0,re=re+Math.imul(oe,Xn)|0,j=j+Math.imul(oe,Kn)|0,j=j+Math.imul(we,Xn)|0,fe=fe+Math.imul(we,Kn)|0;var Oi=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(Oi>>>26)|0,Oi&=67108863,re=Math.imul(We,tr),j=Math.imul(We,lr),j=j+Math.imul(pt,tr)|0,fe=Math.imul(pt,lr),re=re+Math.imul(ft,Te)|0,j=j+Math.imul(ft,Fe)|0,j=j+Math.imul(He,Te)|0,fe=fe+Math.imul(He,Fe)|0,re=re+Math.imul(ge,Re)|0,j=j+Math.imul(ge,Ze)|0,j=j+Math.imul(Ge,Re)|0,fe=fe+Math.imul(Ge,Ze)|0,re=re+Math.imul(de,_t)|0,j=j+Math.imul(de,St)|0,j=j+Math.imul(Ee,_t)|0,fe=fe+Math.imul(Ee,St)|0,re=re+Math.imul(mt,fr)|0,j=j+Math.imul(mt,$t)|0,j=j+Math.imul(lt,fr)|0,fe=fe+Math.imul(lt,$t)|0,re=re+Math.imul(st,Br)|0,j=j+Math.imul(st,Nr)|0,j=j+Math.imul(Oe,Br)|0,fe=fe+Math.imul(Oe,Nr)|0,re=re+Math.imul(ze,zr)|0,j=j+Math.imul(ze,vn)|0,j=j+Math.imul(Xe,zr)|0,fe=fe+Math.imul(Xe,vn)|0,re=re+Math.imul(ye,Xn)|0,j=j+Math.imul(ye,Kn)|0,j=j+Math.imul(Pe,Xn)|0,fe=fe+Math.imul(Pe,Kn)|0,re=re+Math.imul(oe,un)|0,j=j+Math.imul(oe,aa)|0,j=j+Math.imul(we,un)|0,fe=fe+Math.imul(we,aa)|0;var ni=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(ni>>>26)|0,ni&=67108863,re=Math.imul(qt,tr),j=Math.imul(qt,lr),j=j+Math.imul(Wt,tr)|0,fe=Math.imul(Wt,lr),re=re+Math.imul(We,Te)|0,j=j+Math.imul(We,Fe)|0,j=j+Math.imul(pt,Te)|0,fe=fe+Math.imul(pt,Fe)|0,re=re+Math.imul(ft,Re)|0,j=j+Math.imul(ft,Ze)|0,j=j+Math.imul(He,Re)|0,fe=fe+Math.imul(He,Ze)|0,re=re+Math.imul(ge,_t)|0,j=j+Math.imul(ge,St)|0,j=j+Math.imul(Ge,_t)|0,fe=fe+Math.imul(Ge,St)|0,re=re+Math.imul(de,fr)|0,j=j+Math.imul(de,$t)|0,j=j+Math.imul(Ee,fr)|0,fe=fe+Math.imul(Ee,$t)|0,re=re+Math.imul(mt,Br)|0,j=j+Math.imul(mt,Nr)|0,j=j+Math.imul(lt,Br)|0,fe=fe+Math.imul(lt,Nr)|0,re=re+Math.imul(st,zr)|0,j=j+Math.imul(st,vn)|0,j=j+Math.imul(Oe,zr)|0,fe=fe+Math.imul(Oe,vn)|0,re=re+Math.imul(ze,Xn)|0,j=j+Math.imul(ze,Kn)|0,j=j+Math.imul(Xe,Xn)|0,fe=fe+Math.imul(Xe,Kn)|0,re=re+Math.imul(ye,un)|0,j=j+Math.imul(ye,aa)|0,j=j+Math.imul(Pe,un)|0,fe=fe+Math.imul(Pe,aa)|0,re=re+Math.imul(oe,ua)|0,j=j+Math.imul(oe,qa)|0,j=j+Math.imul(we,ua)|0,fe=fe+Math.imul(we,qa)|0;var ao=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(ao>>>26)|0,ao&=67108863,re=Math.imul(qt,Te),j=Math.imul(qt,Fe),j=j+Math.imul(Wt,Te)|0,fe=Math.imul(Wt,Fe),re=re+Math.imul(We,Re)|0,j=j+Math.imul(We,Ze)|0,j=j+Math.imul(pt,Re)|0,fe=fe+Math.imul(pt,Ze)|0,re=re+Math.imul(ft,_t)|0,j=j+Math.imul(ft,St)|0,j=j+Math.imul(He,_t)|0,fe=fe+Math.imul(He,St)|0,re=re+Math.imul(ge,fr)|0,j=j+Math.imul(ge,$t)|0,j=j+Math.imul(Ge,fr)|0,fe=fe+Math.imul(Ge,$t)|0,re=re+Math.imul(de,Br)|0,j=j+Math.imul(de,Nr)|0,j=j+Math.imul(Ee,Br)|0,fe=fe+Math.imul(Ee,Nr)|0,re=re+Math.imul(mt,zr)|0,j=j+Math.imul(mt,vn)|0,j=j+Math.imul(lt,zr)|0,fe=fe+Math.imul(lt,vn)|0,re=re+Math.imul(st,Xn)|0,j=j+Math.imul(st,Kn)|0,j=j+Math.imul(Oe,Xn)|0,fe=fe+Math.imul(Oe,Kn)|0,re=re+Math.imul(ze,un)|0,j=j+Math.imul(ze,aa)|0,j=j+Math.imul(Xe,un)|0,fe=fe+Math.imul(Xe,aa)|0,re=re+Math.imul(ye,ua)|0,j=j+Math.imul(ye,qa)|0,j=j+Math.imul(Pe,ua)|0,fe=fe+Math.imul(Pe,qa)|0;var Hi=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,re=Math.imul(qt,Re),j=Math.imul(qt,Ze),j=j+Math.imul(Wt,Re)|0,fe=Math.imul(Wt,Ze),re=re+Math.imul(We,_t)|0,j=j+Math.imul(We,St)|0,j=j+Math.imul(pt,_t)|0,fe=fe+Math.imul(pt,St)|0,re=re+Math.imul(ft,fr)|0,j=j+Math.imul(ft,$t)|0,j=j+Math.imul(He,fr)|0,fe=fe+Math.imul(He,$t)|0,re=re+Math.imul(ge,Br)|0,j=j+Math.imul(ge,Nr)|0,j=j+Math.imul(Ge,Br)|0,fe=fe+Math.imul(Ge,Nr)|0,re=re+Math.imul(de,zr)|0,j=j+Math.imul(de,vn)|0,j=j+Math.imul(Ee,zr)|0,fe=fe+Math.imul(Ee,vn)|0,re=re+Math.imul(mt,Xn)|0,j=j+Math.imul(mt,Kn)|0,j=j+Math.imul(lt,Xn)|0,fe=fe+Math.imul(lt,Kn)|0,re=re+Math.imul(st,un)|0,j=j+Math.imul(st,aa)|0,j=j+Math.imul(Oe,un)|0,fe=fe+Math.imul(Oe,aa)|0,re=re+Math.imul(ze,ua)|0,j=j+Math.imul(ze,qa)|0,j=j+Math.imul(Xe,ua)|0,fe=fe+Math.imul(Xe,qa)|0;var to=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(to>>>26)|0,to&=67108863,re=Math.imul(qt,_t),j=Math.imul(qt,St),j=j+Math.imul(Wt,_t)|0,fe=Math.imul(Wt,St),re=re+Math.imul(We,fr)|0,j=j+Math.imul(We,$t)|0,j=j+Math.imul(pt,fr)|0,fe=fe+Math.imul(pt,$t)|0,re=re+Math.imul(ft,Br)|0,j=j+Math.imul(ft,Nr)|0,j=j+Math.imul(He,Br)|0,fe=fe+Math.imul(He,Nr)|0,re=re+Math.imul(ge,zr)|0,j=j+Math.imul(ge,vn)|0,j=j+Math.imul(Ge,zr)|0,fe=fe+Math.imul(Ge,vn)|0,re=re+Math.imul(de,Xn)|0,j=j+Math.imul(de,Kn)|0,j=j+Math.imul(Ee,Xn)|0,fe=fe+Math.imul(Ee,Kn)|0,re=re+Math.imul(mt,un)|0,j=j+Math.imul(mt,aa)|0,j=j+Math.imul(lt,un)|0,fe=fe+Math.imul(lt,aa)|0,re=re+Math.imul(st,ua)|0,j=j+Math.imul(st,qa)|0,j=j+Math.imul(Oe,ua)|0,fe=fe+Math.imul(Oe,qa)|0;var Xo=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(Xo>>>26)|0,Xo&=67108863,re=Math.imul(qt,fr),j=Math.imul(qt,$t),j=j+Math.imul(Wt,fr)|0,fe=Math.imul(Wt,$t),re=re+Math.imul(We,Br)|0,j=j+Math.imul(We,Nr)|0,j=j+Math.imul(pt,Br)|0,fe=fe+Math.imul(pt,Nr)|0,re=re+Math.imul(ft,zr)|0,j=j+Math.imul(ft,vn)|0,j=j+Math.imul(He,zr)|0,fe=fe+Math.imul(He,vn)|0,re=re+Math.imul(ge,Xn)|0,j=j+Math.imul(ge,Kn)|0,j=j+Math.imul(Ge,Xn)|0,fe=fe+Math.imul(Ge,Kn)|0,re=re+Math.imul(de,un)|0,j=j+Math.imul(de,aa)|0,j=j+Math.imul(Ee,un)|0,fe=fe+Math.imul(Ee,aa)|0,re=re+Math.imul(mt,ua)|0,j=j+Math.imul(mt,qa)|0,j=j+Math.imul(lt,ua)|0,fe=fe+Math.imul(lt,qa)|0;var Zo=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(Zo>>>26)|0,Zo&=67108863,re=Math.imul(qt,Br),j=Math.imul(qt,Nr),j=j+Math.imul(Wt,Br)|0,fe=Math.imul(Wt,Nr),re=re+Math.imul(We,zr)|0,j=j+Math.imul(We,vn)|0,j=j+Math.imul(pt,zr)|0,fe=fe+Math.imul(pt,vn)|0,re=re+Math.imul(ft,Xn)|0,j=j+Math.imul(ft,Kn)|0,j=j+Math.imul(He,Xn)|0,fe=fe+Math.imul(He,Kn)|0,re=re+Math.imul(ge,un)|0,j=j+Math.imul(ge,aa)|0,j=j+Math.imul(Ge,un)|0,fe=fe+Math.imul(Ge,aa)|0,re=re+Math.imul(de,ua)|0,j=j+Math.imul(de,qa)|0,j=j+Math.imul(Ee,ua)|0,fe=fe+Math.imul(Ee,qa)|0;var Fi=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(Fi>>>26)|0,Fi&=67108863,re=Math.imul(qt,zr),j=Math.imul(qt,vn),j=j+Math.imul(Wt,zr)|0,fe=Math.imul(Wt,vn),re=re+Math.imul(We,Xn)|0,j=j+Math.imul(We,Kn)|0,j=j+Math.imul(pt,Xn)|0,fe=fe+Math.imul(pt,Kn)|0,re=re+Math.imul(ft,un)|0,j=j+Math.imul(ft,aa)|0,j=j+Math.imul(He,un)|0,fe=fe+Math.imul(He,aa)|0,re=re+Math.imul(ge,ua)|0,j=j+Math.imul(ge,qa)|0,j=j+Math.imul(Ge,ua)|0,fe=fe+Math.imul(Ge,qa)|0;var yo=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(yo>>>26)|0,yo&=67108863,re=Math.imul(qt,Xn),j=Math.imul(qt,Kn),j=j+Math.imul(Wt,Xn)|0,fe=Math.imul(Wt,Kn),re=re+Math.imul(We,un)|0,j=j+Math.imul(We,aa)|0,j=j+Math.imul(pt,un)|0,fe=fe+Math.imul(pt,aa)|0,re=re+Math.imul(ft,ua)|0,j=j+Math.imul(ft,qa)|0,j=j+Math.imul(He,ua)|0,fe=fe+Math.imul(He,qa)|0;var oo=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(oo>>>26)|0,oo&=67108863,re=Math.imul(qt,un),j=Math.imul(qt,aa),j=j+Math.imul(Wt,un)|0,fe=Math.imul(Wt,aa),re=re+Math.imul(We,ua)|0,j=j+Math.imul(We,qa)|0,j=j+Math.imul(pt,ua)|0,fe=fe+Math.imul(pt,qa)|0;var rl=(ue+re|0)+((j&8191)<<13)|0;ue=(fe+(j>>>13)|0)+(rl>>>26)|0,rl&=67108863,re=Math.imul(qt,ua),j=Math.imul(qt,qa),j=j+Math.imul(Wt,ua)|0,fe=Math.imul(Wt,qa);var Ni=(ue+re|0)+((j&8191)<<13)|0;return ue=(fe+(j>>>13)|0)+(Ni>>>26)|0,Ni&=67108863,se[0]=ii,se[1]=pa,se[2]=no,se[3]=Gi,se[4]=Ti,se[5]=fi,se[6]=_o,se[7]=Oi,se[8]=ni,se[9]=ao,se[10]=Hi,se[11]=to,se[12]=Xo,se[13]=Zo,se[14]=Fi,se[15]=yo,se[16]=oo,se[17]=rl,se[18]=Ni,ue!==0&&(se[19]=ue,Y.length++),Y};Math.imul||(k=w);function y(O,R,B){B.negative=R.negative^O.negative,B.length=O.length+R.length;for(var Y=0,X=0,te=0;te>>26)|0,X+=se>>>26,se&=67108863}B.words[te]=ue,Y=se,se=X}return Y!==0?B.words[te]=Y:B.length--,B.strip()}function S(O,R,B){var Y=new T;return Y.mulp(O,R,B)}f.prototype.mulTo=function(R,B){var Y,X=this.length+R.length;return this.length===10&&R.length===10?Y=k(this,R,B):X<63?Y=w(this,R,B):X<1024?Y=y(this,R,B):Y=S(this,R,B),Y};function T(O,R){this.x=O,this.y=R}T.prototype.makeRBT=function(R){for(var B=new Array(R),Y=f.prototype._countBits(R)-1,X=0;X>=1;return X},T.prototype.permute=function(R,B,Y,X,te,se){for(var ue=0;ue>>1)te++;return 1<>>13,Y[2*se+1]=te&8191,te=te>>>13;for(se=2*B;se>=26,B+=X/67108864|0,B+=te>>>26,this.words[Y]=te&67108863}return B!==0&&(this.words[Y]=B,this.length++),this.length=R===0?1:this.length,this},f.prototype.muln=function(R){return this.clone().imuln(R)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(R){var B=M(R);if(B.length===0)return new f(1);for(var Y=this,X=0;X=0);var B=R%26,Y=(R-B)/26,X=67108863>>>26-B<<26-B,te;if(B!==0){var se=0;for(te=0;te>>26-B}se&&(this.words[te]=se,this.length++)}if(Y!==0){for(te=this.length-1;te>=0;te--)this.words[te+Y]=this.words[te];for(te=0;te=0);var X;B?X=(B-B%26)/26:X=0;var te=R%26,se=Math.min((R-te)/26,this.length),ue=67108863^67108863>>>te<se)for(this.length-=se,j=0;j=0&&(fe!==0||j>=X);j--){var ce=this.words[j]|0;this.words[j]=fe<<26-te|ce>>>te,fe=ce&ue}return re&&fe!==0&&(re.words[re.length++]=fe),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(R,B,Y){return u(this.negative===0),this.iushrn(R,B,Y)},f.prototype.shln=function(R){return this.clone().ishln(R)},f.prototype.ushln=function(R){return this.clone().iushln(R)},f.prototype.shrn=function(R){return this.clone().ishrn(R)},f.prototype.ushrn=function(R){return this.clone().iushrn(R)},f.prototype.testn=function(R){u(typeof R=="number"&&R>=0);var B=R%26,Y=(R-B)/26,X=1<=0);var B=R%26,Y=(R-B)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=Y)return this;if(B!==0&&Y++,this.length=Math.min(Y,this.length),B!==0){var X=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},f.prototype.isubn=function(R){if(u(typeof R=="number"),u(R<67108864),R<0)return this.iaddn(-R);if(this.negative!==0)return this.negative=0,this.iaddn(R),this.negative=1,this;if(this.words[0]-=R,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(re/67108864|0),this.words[te+Y]=se&67108863}for(;te>26,this.words[te+Y]=se&67108863;if(ue===0)return this.strip();for(u(ue===-1),ue=0,te=0;te>26,this.words[te]=se&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(R,B){var Y=this.length-R.length,X=this.clone(),te=R,se=te.words[te.length-1]|0,ue=this._countBits(se);Y=26-ue,Y!==0&&(te=te.ushln(Y),X.iushln(Y),se=te.words[te.length-1]|0);var re=X.length-te.length,j;if(B!=="mod"){j=new f(null),j.length=re+1,j.words=new Array(j.length);for(var fe=0;fe=0;oe--){var we=(X.words[te.length+oe]|0)*67108864+(X.words[te.length+oe-1]|0);for(we=Math.min(we/se|0,67108863),X._ishlnsubmul(te,we,oe);X.negative!==0;)we--,X.negative=0,X._ishlnsubmul(te,1,oe),X.isZero()||(X.negative^=1);j&&(j.words[oe]=we)}return j&&j.strip(),X.strip(),B!=="div"&&Y!==0&&X.iushrn(Y),{div:j||null,mod:X}},f.prototype.divmod=function(R,B,Y){if(u(!R.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var X,te,se;return this.negative!==0&&R.negative===0?(se=this.neg().divmod(R,B),B!=="mod"&&(X=se.div.neg()),B!=="div"&&(te=se.mod.neg(),Y&&te.negative!==0&&te.iadd(R)),{div:X,mod:te}):this.negative===0&&R.negative!==0?(se=this.divmod(R.neg(),B),B!=="mod"&&(X=se.div.neg()),{div:X,mod:se.mod}):(this.negative&R.negative)!==0?(se=this.neg().divmod(R.neg(),B),B!=="div"&&(te=se.mod.neg(),Y&&te.negative!==0&&te.isub(R)),{div:se.div,mod:te}):R.length>this.length||this.cmp(R)<0?{div:new f(0),mod:this}:R.length===1?B==="div"?{div:this.divn(R.words[0]),mod:null}:B==="mod"?{div:null,mod:new f(this.modn(R.words[0]))}:{div:this.divn(R.words[0]),mod:new f(this.modn(R.words[0]))}:this._wordDiv(R,B)},f.prototype.div=function(R){return this.divmod(R,"div",!1).div},f.prototype.mod=function(R){return this.divmod(R,"mod",!1).mod},f.prototype.umod=function(R){return this.divmod(R,"mod",!0).mod},f.prototype.divRound=function(R){var B=this.divmod(R);if(B.mod.isZero())return B.div;var Y=B.div.negative!==0?B.mod.isub(R):B.mod,X=R.ushrn(1),te=R.andln(1),se=Y.cmp(X);return se<0||te===1&&se===0?B.div:B.div.negative!==0?B.div.isubn(1):B.div.iaddn(1)},f.prototype.modn=function(R){u(R<=67108863);for(var B=(1<<26)%R,Y=0,X=this.length-1;X>=0;X--)Y=(B*Y+(this.words[X]|0))%R;return Y},f.prototype.idivn=function(R){u(R<=67108863);for(var B=0,Y=this.length-1;Y>=0;Y--){var X=(this.words[Y]|0)+B*67108864;this.words[Y]=X/R|0,B=X%R}return this.strip()},f.prototype.divn=function(R){return this.clone().idivn(R)},f.prototype.egcd=function(R){u(R.negative===0),u(!R.isZero());var B=this,Y=R.clone();B.negative!==0?B=B.umod(R):B=B.clone();for(var X=new f(1),te=new f(0),se=new f(0),ue=new f(1),re=0;B.isEven()&&Y.isEven();)B.iushrn(1),Y.iushrn(1),++re;for(var j=Y.clone(),fe=B.clone();!B.isZero();){for(var ce=0,oe=1;(B.words[0]&oe)===0&&ce<26;++ce,oe<<=1);if(ce>0)for(B.iushrn(ce);ce-- >0;)(X.isOdd()||te.isOdd())&&(X.iadd(j),te.isub(fe)),X.iushrn(1),te.iushrn(1);for(var we=0,he=1;(Y.words[0]&he)===0&&we<26;++we,he<<=1);if(we>0)for(Y.iushrn(we);we-- >0;)(se.isOdd()||ue.isOdd())&&(se.iadd(j),ue.isub(fe)),se.iushrn(1),ue.iushrn(1);B.cmp(Y)>=0?(B.isub(Y),X.isub(se),te.isub(ue)):(Y.isub(B),se.isub(X),ue.isub(te))}return{a:se,b:ue,gcd:Y.iushln(re)}},f.prototype._invmp=function(R){u(R.negative===0),u(!R.isZero());var B=this,Y=R.clone();B.negative!==0?B=B.umod(R):B=B.clone();for(var X=new f(1),te=new f(0),se=Y.clone();B.cmpn(1)>0&&Y.cmpn(1)>0;){for(var ue=0,re=1;(B.words[0]&re)===0&&ue<26;++ue,re<<=1);if(ue>0)for(B.iushrn(ue);ue-- >0;)X.isOdd()&&X.iadd(se),X.iushrn(1);for(var j=0,fe=1;(Y.words[0]&fe)===0&&j<26;++j,fe<<=1);if(j>0)for(Y.iushrn(j);j-- >0;)te.isOdd()&&te.iadd(se),te.iushrn(1);B.cmp(Y)>=0?(B.isub(Y),X.isub(te)):(Y.isub(B),te.isub(X))}var ce;return B.cmpn(1)===0?ce=X:ce=te,ce.cmpn(0)<0&&ce.iadd(R),ce},f.prototype.gcd=function(R){if(this.isZero())return R.abs();if(R.isZero())return this.abs();var B=this.clone(),Y=R.clone();B.negative=0,Y.negative=0;for(var X=0;B.isEven()&&Y.isEven();X++)B.iushrn(1),Y.iushrn(1);do{for(;B.isEven();)B.iushrn(1);for(;Y.isEven();)Y.iushrn(1);var te=B.cmp(Y);if(te<0){var se=B;B=Y,Y=se}else if(te===0||Y.cmpn(1)===0)break;B.isub(Y)}while(!0);return Y.iushln(X)},f.prototype.invm=function(R){return this.egcd(R).a.umod(R)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(R){return this.words[0]&R},f.prototype.bincn=function(R){u(typeof R=="number");var B=R%26,Y=(R-B)/26,X=1<>>26,ue&=67108863,this.words[se]=ue}return te!==0&&(this.words[se]=te,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(R){var B=R<0;if(this.negative!==0&&!B)return-1;if(this.negative===0&&B)return 1;this.strip();var Y;if(this.length>1)Y=1;else{B&&(R=-R),u(R<=67108863,"Number is too big");var X=this.words[0]|0;Y=X===R?0:XR.length)return 1;if(this.length=0;Y--){var X=this.words[Y]|0,te=R.words[Y]|0;if(X!==te){Xte&&(B=1);break}}return B},f.prototype.gtn=function(R){return this.cmpn(R)===1},f.prototype.gt=function(R){return this.cmp(R)===1},f.prototype.gten=function(R){return this.cmpn(R)>=0},f.prototype.gte=function(R){return this.cmp(R)>=0},f.prototype.ltn=function(R){return this.cmpn(R)===-1},f.prototype.lt=function(R){return this.cmp(R)===-1},f.prototype.lten=function(R){return this.cmpn(R)<=0},f.prototype.lte=function(R){return this.cmp(R)<=0},f.prototype.eqn=function(R){return this.cmpn(R)===0},f.prototype.eq=function(R){return this.cmp(R)===0},f.red=function(R){return new q(R)},f.prototype.toRed=function(R){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),R.convertTo(this)._forceRed(R)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(R){return this.red=R,this},f.prototype.forceRed=function(R){return u(!this.red,"Already a number in reduction context"),this._forceRed(R)},f.prototype.redAdd=function(R){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,R)},f.prototype.redIAdd=function(R){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,R)},f.prototype.redSub=function(R){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,R)},f.prototype.redISub=function(R){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,R)},f.prototype.redShl=function(R){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,R)},f.prototype.redMul=function(R){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,R),this.red.mul(this,R)},f.prototype.redIMul=function(R){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,R),this.red.imul(this,R)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(R){return u(this.red&&!R.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,R)};var p={k256:null,p224:null,p192:null,p25519:null};function C(O,R){this.name=O,this.p=new f(R,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}C.prototype._tmp=function(){var R=new f(null);return R.words=new Array(Math.ceil(this.n/13)),R},C.prototype.ireduce=function(R){var B=R,Y;do this.split(B,this.tmp),B=this.imulK(B),B=B.iadd(this.tmp),Y=B.bitLength();while(Y>this.n);var X=Y0?B.isub(this.p):B.strip!==void 0?B.strip():B._strip(),B},C.prototype.split=function(R,B){R.iushrn(this.n,0,B)},C.prototype.imulK=function(R){return R.imul(this.k)};function A(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(A,C),A.prototype.split=function(R,B){for(var Y=4194303,X=Math.min(R.length,9),te=0;te>>22,se=ue}se>>>=22,R.words[te-10]=se,se===0&&R.length>10?R.length-=10:R.length-=9},A.prototype.imulK=function(R){R.words[R.length]=0,R.words[R.length+1]=0,R.length+=2;for(var B=0,Y=0;Y>>=26,R.words[Y]=te,B=X}return B!==0&&(R.words[R.length++]=B),R},f._prime=function(R){if(p[R])return p[R];var B;if(R==="k256")B=new A;else if(R==="p224")B=new P;else if(R==="p192")B=new D;else if(R==="p25519")B=new z;else throw new Error("Unknown prime "+R);return p[R]=B,B};function q(O){if(typeof O=="string"){var R=f._prime(O);this.m=R.p,this.prime=R}else u(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}q.prototype._verify1=function(R){u(R.negative===0,"red works only with positives"),u(R.red,"red works only with red numbers")},q.prototype._verify2=function(R,B){u((R.negative|B.negative)===0,"red works only with positives"),u(R.red&&R.red===B.red,"red works only with red numbers")},q.prototype.imod=function(R){return this.prime?this.prime.ireduce(R)._forceRed(this):R.umod(this.m)._forceRed(this)},q.prototype.neg=function(R){return R.isZero()?R.clone():this.m.sub(R)._forceRed(this)},q.prototype.add=function(R,B){this._verify2(R,B);var Y=R.add(B);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y._forceRed(this)},q.prototype.iadd=function(R,B){this._verify2(R,B);var Y=R.iadd(B);return Y.cmp(this.m)>=0&&Y.isub(this.m),Y},q.prototype.sub=function(R,B){this._verify2(R,B);var Y=R.sub(B);return Y.cmpn(0)<0&&Y.iadd(this.m),Y._forceRed(this)},q.prototype.isub=function(R,B){this._verify2(R,B);var Y=R.isub(B);return Y.cmpn(0)<0&&Y.iadd(this.m),Y},q.prototype.shl=function(R,B){return this._verify1(R),this.imod(R.ushln(B))},q.prototype.imul=function(R,B){return this._verify2(R,B),this.imod(R.imul(B))},q.prototype.mul=function(R,B){return this._verify2(R,B),this.imod(R.mul(B))},q.prototype.isqr=function(R){return this.imul(R,R.clone())},q.prototype.sqr=function(R){return this.mul(R,R)},q.prototype.sqrt=function(R){if(R.isZero())return R.clone();var B=this.m.andln(3);if(u(B%2===1),B===3){var Y=this.m.add(new f(1)).iushrn(2);return this.pow(R,Y)}for(var X=this.m.subn(1),te=0;!X.isZero()&&X.andln(1)===0;)te++,X.iushrn(1);u(!X.isZero());var se=new f(1).toRed(this),ue=se.redNeg(),re=this.m.subn(1).iushrn(1),j=this.m.bitLength();for(j=new f(2*j*j).toRed(this);this.pow(j,re).cmp(ue)!==0;)j.redIAdd(ue);for(var fe=this.pow(j,X),ce=this.pow(R,X.addn(1).iushrn(1)),oe=this.pow(R,X),we=te;oe.cmp(se)!==0;){for(var he=oe,ye=0;he.cmp(se)!==0;ye++)he=he.redSqr();u(ye=0;te--){for(var fe=B.words[te],ce=j-1;ce>=0;ce--){var oe=fe>>ce&1;if(se!==X[0]&&(se=this.sqr(se)),oe===0&&ue===0){re=0;continue}ue<<=1,ue|=oe,re++,!(re!==Y&&(te!==0||ce!==0))&&(se=this.mul(se,X[ue]),re=0,ue=0)}j=26}return se},q.prototype.convertTo=function(R){var B=R.umod(this.m);return B===R?B.clone():B},q.prototype.convertFrom=function(R){var B=R.clone();return B.red=null,B},f.mont=function(R){return new U(R)};function U(O){q.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}c(U,q),U.prototype.convertTo=function(R){return this.imod(R.ushln(this.shift))},U.prototype.convertFrom=function(R){var B=this.imod(R.mul(this.rinv));return B.red=null,B},U.prototype.imul=function(R,B){if(R.isZero()||B.isZero())return R.words[0]=0,R.length=1,R;var Y=R.imul(B),X=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),te=Y.isub(X).iushrn(this.shift),se=te;return te.cmp(this.m)>=0?se=te.isub(this.m):te.cmpn(0)<0&&(se=te.iadd(this.m)),se._forceRed(this)},U.prototype.mul=function(R,B){if(R.isZero()||B.isZero())return new f(0)._forceRed(this);var Y=R.mul(B),X=Y.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),te=Y.isub(X).iushrn(this.shift),se=te;return te.cmp(this.m)>=0?se=te.isub(this.m):te.cmpn(0)<0&&(se=te.iadd(this.m)),se._forceRed(this)},U.prototype.invm=function(R){var B=this.imod(R._invmp(this.m).mul(this.r2));return B._forceRed(this)}})(a,this)}),6204:(function(a){"use strict";a.exports=i;function i(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(T<=0)){var p,C=s.mallocDouble(2*T*y),A=s.mallocInt32(y);if(y=f(E,T,C,A),y>0){if(T===1&&k)l.init(y),p=l.sweepComplete(T,w,0,y,C,A,0,y,C,A);else{var P=s.mallocDouble(2*T*S),D=s.mallocInt32(S);S=f(M,T,P,D),S>0&&(l.init(y+S),T===1?p=l.sweepBipartite(T,w,0,y,C,A,0,S,P,D):p=u(T,w,k,y,C,A,S,P,D),s.free(P),s.free(D))}s.free(C),s.free(A)}return p}}}var v;function d(E,M){v.push([E,M])}function m(E){return v=[],h(E,E,d,!0),v}function x(E,M){return v=[],h(E,M,d,!1),v}function g(E,M,w){switch(arguments.length){case 1:return m(E);case 2:return typeof M=="function"?h(E,E,M,!0):x(E,M);case 3:return h(E,M,w,!1);default:throw new Error("box-intersect: Invalid arguments")}}}),2455:(function(a,i){"use strict";function o(){function u(h,v,d,m,x,g,E,M,w,k,y){for(var S=2*h,T=m,p=S*m;Tw-M?u(h,v,d,m,x,g,E,M,w,k,y):c(h,v,d,m,x,g,E,M,w,k,y)}return f}function s(){function u(d,m,x,g,E,M,w,k,y,S,T){for(var p=2*d,C=g,A=p*g;CS-y?g?u(d,m,x,E,M,w,k,y,S,T,p):c(d,m,x,E,M,w,k,y,S,T,p):g?f(d,m,x,E,M,w,k,y,S,T,p):h(d,m,x,E,M,w,k,y,S,T,p)}return v}function l(u){return u?o():s()}i.partial=l(!1),i.full=l(!0)}),7150:(function(a,i,o){"use strict";a.exports=O;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,h=o(855),v=o(3545),d=o(8105),m=128,x=1<<22,g=1<<22,E=d("!(lo>=p0)&&!(p1>=hi)"),M=d("lo===p0"),w=d("lo0;){fe-=1;var we=fe*T,he=A[we],ye=A[we+1],Pe=A[we+2],le=A[we+3],ze=A[we+4],Xe=A[we+5],vt=fe*p,st=P[vt],Oe=P[vt+1],qe=Xe&1,mt=!!(Xe&16),lt=te,Ie=se,de=re,Ee=j;if(qe&&(lt=re,Ie=j,de=te,Ee=se),!(Xe&2&&(Pe=w(R,he,ye,Pe,lt,Ie,Oe),ye>=Pe))&&!(Xe&4&&(ye=k(R,he,ye,Pe,lt,Ie,st),ye>=Pe))){var Ue=Pe-ye,ge=ze-le;if(mt){if(R*Ue*(Ue+ge)d&&x[S+v]>k;--y,S-=E){for(var T=S,p=S+E,C=0;C>>1,k=2*h,y=w,S=x[k*w+v];E=P?(y=A,S=P):C>=z?(y=p,S=C):(y=D,S=z):P>=z?(y=A,S=P):z>=C?(y=p,S=C):(y=D,S=z);for(var O=k*(M-1),R=k*y,q=0;q=p0)&&!(p1>=hi)":v};function o(d){return i[d]}function s(d,m,x,g,E,M,w){for(var k=2*d,y=k*x,S=y,T=x,p=m,C=d+m,A=x;g>A;++A,y+=k){var P=E[y+p];if(P===w)if(T===A)T+=1,S+=k;else{for(var D=0;k>D;++D){var z=E[y+D];E[y+D]=E[S],E[S++]=z}var q=M[A];M[A]=M[T],M[T++]=q}}return T}function l(d,m,x,g,E,M,w){for(var k=2*d,y=k*x,S=y,T=x,p=m,C=d+m,A=x;g>A;++A,y+=k){var P=E[y+p];if(PD;++D){var z=E[y+D];E[y+D]=E[S],E[S++]=z}var q=M[A];M[A]=M[T],M[T++]=q}}return T}function u(d,m,x,g,E,M,w){for(var k=2*d,y=k*x,S=y,T=x,p=m,C=d+m,A=x;g>A;++A,y+=k){var P=E[y+C];if(P<=w)if(T===A)T+=1,S+=k;else{for(var D=0;k>D;++D){var z=E[y+D];E[y+D]=E[S],E[S++]=z}var q=M[A];M[A]=M[T],M[T++]=q}}return T}function c(d,m,x,g,E,M,w){for(var k=2*d,y=k*x,S=y,T=x,p=m,C=d+m,A=x;g>A;++A,y+=k){var P=E[y+C];if(P<=w)if(T===A)T+=1,S+=k;else{for(var D=0;k>D;++D){var z=E[y+D];E[y+D]=E[S],E[S++]=z}var q=M[A];M[A]=M[T],M[T++]=q}}return T}function f(d,m,x,g,E,M,w){for(var k=2*d,y=k*x,S=y,T=x,p=m,C=d+m,A=x;g>A;++A,y+=k){var P=E[y+p],D=E[y+C];if(P<=w&&w<=D)if(T===A)T+=1,S+=k;else{for(var z=0;k>z;++z){var q=E[y+z];E[y+z]=E[S],E[S++]=q}var U=M[A];M[A]=M[T],M[T++]=U}}return T}function h(d,m,x,g,E,M,w){for(var k=2*d,y=k*x,S=y,T=x,p=m,C=d+m,A=x;g>A;++A,y+=k){var P=E[y+p],D=E[y+C];if(Pz;++z){var q=E[y+z];E[y+z]=E[S],E[S++]=q}var U=M[A];M[A]=M[T],M[T++]=U}}return T}function v(d,m,x,g,E,M,w,k){for(var y=2*d,S=y*x,T=S,p=x,C=m,A=d+m,P=x;g>P;++P,S+=y){var D=E[S+C],z=E[S+A];if(!(D>=w)&&!(k>=z))if(p===P)p+=1,T+=y;else{for(var q=0;y>q;++q){var U=E[S+q];E[S+q]=E[T],E[T++]=U}var O=M[P];M[P]=M[p],M[p++]=O}}return p}}),4192:(function(a){"use strict";a.exports=o;var i=32;function o(m,x){x<=4*i?s(0,x-1,m):d(0,x-1,m)}function s(m,x,g){for(var E=2*(m+1),M=m+1;M<=x;++M){for(var w=g[E++],k=g[E++],y=M,S=E-2;y-- >m;){var T=g[S-2],p=g[S-1];if(Tg[x+1]:!0}function v(m,x,g,E){m*=2;var M=E[m];return M>1,y=k-E,S=k+E,T=M,p=y,C=k,A=S,P=w,D=m+1,z=x-1,q=0;h(T,p,g)&&(q=T,T=p,p=q),h(A,P,g)&&(q=A,A=P,P=q),h(T,C,g)&&(q=T,T=C,C=q),h(p,C,g)&&(q=p,p=C,C=q),h(T,A,g)&&(q=T,T=A,A=q),h(C,A,g)&&(q=C,C=A,A=q),h(p,P,g)&&(q=p,p=P,P=q),h(p,C,g)&&(q=p,p=C,C=q),h(A,P,g)&&(q=A,A=P,P=q);for(var U=g[2*p],O=g[2*p+1],R=g[2*A],B=g[2*A+1],Y=2*T,X=2*C,te=2*P,se=2*M,ue=2*k,re=2*w,j=0;j<2;++j){var fe=g[Y+j],ce=g[X+j],oe=g[te+j];g[se+j]=fe,g[ue+j]=ce,g[re+j]=oe}u(y,m,g),u(S,x,g);for(var we=D;we<=z;++we)if(v(we,U,O,g))we!==D&&l(we,D,g),++D;else if(!v(we,R,B,g))for(;;)if(v(z,R,B,g)){v(z,U,O,g)?(c(we,D,z,g),++D,--z):(l(we,z,g),--z);break}else{if(--z>>1;u(E,ce);for(var oe=0,we=0,ue=0;ue=c)he=he-c|0,w(d,m,we--,he);else if(he>=0)w(h,v,oe--,he);else if(he<=-c){he=-he-c|0;for(var ye=0;ye>>1;u(E,ce);for(var oe=0,we=0,he=0,ue=0;ue>1===E[2*ue+3]>>1&&(Pe=2,ue+=1),ye<0){for(var le=-(ye>>1)-1,ze=0;ze>1)-1;Pe===0?w(h,v,oe--,le):Pe===1?w(d,m,we--,le):Pe===2&&w(x,g,he--,le)}}}function T(C,A,P,D,z,q,U,O,R,B,Y,X){var te=0,se=2*C,ue=A,re=A+C,j=1,fe=1;D?fe=c:j=c;for(var ce=z;ce>>1;u(E,ye);for(var Pe=0,ce=0;ce=c?(ze=!D,oe-=c):(ze=!!D,oe-=1),ze)k(h,v,Pe++,oe);else{var Xe=X[oe],vt=se*oe,st=Y[vt+A+1],Oe=Y[vt+A+1+C];e:for(var qe=0;qe>>1;u(E,oe);for(var we=0,re=0;re=c)h[we++]=j-c;else{j-=1;var ye=Y[j],Pe=te*j,le=B[Pe+A+1],ze=B[Pe+A+1+C];e:for(var Xe=0;Xe=0;--Xe)if(h[Xe]===j){for(var qe=Xe+1;qe0;){for(var M=v.pop(),x=v.pop(),w=-1,k=-1,g=m[x],S=1;S=0||(h.flip(x,M),u(f,h,v,w,x,k),u(f,h,v,x,k,w),u(f,h,v,k,M,w),u(f,h,v,M,w,k))}}}),5023:(function(a,i,o){"use strict";var s=o(2478);a.exports=v;function l(d,m,x,g,E,M,w){this.cells=d,this.neighbor=m,this.flags=g,this.constraint=x,this.active=E,this.next=M,this.boundary=w}var u=l.prototype;function c(d,m){return d[0]-m[0]||d[1]-m[1]||d[2]-m[2]}u.locate=(function(){var d=[0,0,0];return function(m,x,g){var E=m,M=x,w=g;return x0||w.length>0;){for(;M.length>0;){var p=M.pop();if(k[p]!==-E){k[p]=E;for(var C=y[p],A=0;A<3;++A){var P=T[3*p+A];P>=0&&k[P]===0&&(S[3*p+A]?w.push(P):(M.push(P),k[P]=E))}}}var D=w;w=M,M=D,w.length=0,E=-E}var z=h(y,k,m);return x?z.concat(g.boundary):z}}),8902:(function(a,i,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;a.exports=w;function h(k,y,S,T,p){this.a=k,this.b=y,this.idx=S,this.lowerIds=T,this.upperIds=p}function v(k,y,S,T){this.a=k,this.b=y,this.type=S,this.idx=T}function d(k,y){var S=k.a[0]-y.a[0]||k.a[1]-y.a[1]||k.type-y.type;return S||k.type!==u&&(S=l(k.a,k.b,y.b),S)?S:k.idx-y.idx}function m(k,y){return l(k.a,k.b,y)}function x(k,y,S,T,p){for(var C=s.lt(y,T,m),A=s.gt(y,T,m),P=C;P1&&l(S[z[U-2]],S[z[U-1]],T)>0;)k.push([z[U-1],z[U-2],p]),U-=1;z.length=U,z.push(p);for(var q=D.upperIds,U=q.length;U>1&&l(S[q[U-2]],S[q[U-1]],T)<0;)k.push([q[U-2],q[U-1],p]),U-=1;q.length=U,q.push(p)}}function g(k,y){var S;return k.a[0]D[0]&&p.push(new v(D,P,f,C),new v(P,D,c,C))}p.sort(d);for(var z=p[0].a[0]-(1+Math.abs(p[0].a[0]))*Math.pow(2,-52),q=[new h([z,1],[z,0],-1,[],[],[],[])],U=[],C=0,O=p.length;C=0}})(),u.removeTriangle=function(h,v,d){var m=this.stars;c(m[h],v,d),c(m[v],d,h),c(m[d],h,v)},u.addTriangle=function(h,v,d){var m=this.stars;m[h].push(v,d),m[v].push(d,h),m[d].push(h,v)},u.opposite=function(h,v){for(var d=this.stars[v],m=1,x=d.length;m=0;--R){var fe=U[R];B=fe[0];var ce=z[B],oe=ce[0],we=ce[1],he=D[oe],ye=D[we];if((he[0]-ye[0]||he[1]-ye[1])<0){var Pe=oe;oe=we,we=Pe}ce[0]=oe;var le=ce[1]=fe[1],ze;for(O&&(ze=ce[2]);R>0&&U[R-1][0]===B;){var fe=U[--R],Xe=fe[1];O?z.push([le,Xe,ze]):z.push([le,Xe]),le=Xe}O?z.push([le,we,ze]):z.push([le,we])}return Y}function y(D,z,q){for(var U=z.length,O=new s(U),R=[],B=0;Bz[2]?1:0)}function p(D,z,q){if(D.length!==0){if(z)for(var U=0;U0||B.length>0}function P(D,z,q){var U;if(q){U=z;for(var O=new Array(z.length),R=0;Rk+1)throw new Error(M+" map requires nshades to be at least size "+E.length);Array.isArray(v.alpha)?v.alpha.length!==2?y=[1,1]:y=v.alpha.slice():typeof v.alpha=="number"?y=[v.alpha,v.alpha]:y=[1,1],d=E.map(function(P){return Math.round(P.index*k)}),y[0]=Math.min(Math.max(y[0],0),1),y[1]=Math.min(Math.max(y[1],0),1);var T=E.map(function(P,D){var z=E[D].index,q=E[D].rgb.slice();return q.length===4&&q[3]>=0&&q[3]<=1||(q[3]=y[0]+(y[1]-y[0])*z),q}),p=[];for(S=0;S=0}function v(d,m,x,g){var E=s(m,x,g);if(E===0){var M=l(s(d,m,x)),w=l(s(d,m,g));if(M===w){if(M===0){var k=h(d,m,x),y=h(d,m,g);return k===y?0:k?1:-1}return 0}else{if(w===0)return M>0||h(d,m,g)?-1:1;if(M===0)return w>0||h(d,m,x)?1:-1}return l(w-M)}var S=s(d,m,x);if(S>0)return E>0&&s(d,m,g)>0?1:-1;if(S<0)return E>0||s(d,m,g)>0?1:-1;var T=s(d,m,g);return T>0||h(d,m,x)?1:-1}}),8572:(function(a){"use strict";a.exports=function(o){return o<0?-1:o>0?1:0}}),8507:(function(a){a.exports=s;var i=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||i(l[0],l[1])-i(u[0],u[1]);case 3:var h=l[0]+l[1],v=u[0]+u[1];if(f=h+l[2]-(v+u[2]),f)return f;var d=i(l[0],l[1]),m=i(u[0],u[1]);return i(d,l[2])-i(m,u[2])||i(d+l[2],h)-i(m+u[2],v);case 4:var x=l[0],g=l[1],E=l[2],M=l[3],w=u[0],k=u[1],y=u[2],S=u[3];return x+g+E+M-(w+k+y+S)||i(x,g,E,M)-i(w,k,y,S,w)||i(x+g,x+E,x+M,g+E,g+M,E+M)-i(w+k,w+y,w+S,k+y,k+S,y+S)||i(x+g+E,x+g+M,x+E+M,g+E+M)-i(w+k+y,w+k+S,w+y+S,k+y+S);default:for(var T=l.slice().sort(o),p=u.slice().sort(o),C=0;Co[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}}),4750:(function(a,i,o){"use strict";a.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var h=new Array(f),v=c[f-1],d=0;d=v[w]&&(M+=1);g[E]=M}}return h}function f(h,v){try{return s(h,!0)}catch(g){var d=l(h);if(d.length<=v)return[];var m=u(h,d),x=s(m,!0);return c(x,d)}}}),4769:(function(a){"use strict";function i(s,l,u,c,f,h){var v=6*f*f-6*f,d=3*f*f-4*f+1,m=-6*f*f+6*f,x=3*f*f-2*f;if(s.length){h||(h=new Array(s.length));for(var g=s.length-1;g>=0;--g)h[g]=v*s[g]+d*l[g]+m*u[g]+x*c[g];return h}return v*s+d*l+m*u[g]+x*c}function o(s,l,u,c,f,h){var v=f-1,d=f*f,m=v*v,x=(1+2*f)*m,g=f*m,E=d*(3-2*f),M=d*v;if(s.length){h||(h=new Array(s.length));for(var w=s.length-1;w>=0;--w)h[w]=x*s[w]+g*l[w]+E*u[w]+M*c[w];return h}return x*s+g*l+E*u+M*c}a.exports=o,a.exports.derivative=i}),7642:(function(a,i,o){"use strict";var s=o(8954),l=o(1682);a.exports=h;function u(v,d){this.point=v,this.index=d}function c(v,d){for(var m=v.point,x=d.point,g=m.length,E=0;E=2)return!1;q[O]=R}return!0}):z=z.filter(function(q){for(var U=0;U<=x;++U){var O=C[q[U]];if(O<0)return!1;q[U]=O}return!0}),x&1)for(var M=0;M>>31},a.exports.exponent=function(E){var M=a.exports.hi(E);return(M<<1>>>21)-1023},a.exports.fraction=function(E){var M=a.exports.lo(E),w=a.exports.hi(E),k=w&(1<<20)-1;return w&2146435072&&(k+=1048576),[M,k]},a.exports.denormalized=function(E){var M=a.exports.hi(E);return!(M&2146435072)}}),1338:(function(a){"use strict";function i(l,u,c){var f=l[c]|0;if(f<=0)return[];var h=new Array(f),v;if(c===l.length-1)for(v=0;v0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return i(l,u,0);break}return[]}a.exports=s}),3134:(function(a,i,o){"use strict";a.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var h=0;h=x-1)for(var S=M.length-1,p=d-m[x-1],T=0;T=x-1)for(var y=M.length-1,S=d-m[x-1],T=0;T=0;--x)if(d[--m])return!1;return!0},f.jump=function(d){var m=this.lastT(),x=this.dimension;if(!(d0;--T)g.push(u(k[T-1],y[T-1],arguments[T])),E.push(0)}},f.push=function(d){var m=this.lastT(),x=this.dimension;if(!(d1e-6?1/w:0;this._time.push(d);for(var p=x;p>0;--p){var C=u(y[p-1],S[p-1],arguments[p]);g.push(C),E.push((C-g[M++])*T)}}},f.set=function(d){var m=this.dimension;if(!(d0;--k)x.push(u(M[k-1],w[k-1],arguments[k])),g.push(0)}},f.move=function(d){var m=this.lastT(),x=this.dimension;if(!(d<=m||arguments.length!==x+1)){var g=this._state,E=this._velocity,M=g.length-this.dimension,w=this.bounds,k=w[0],y=w[1],S=d-m,T=S>1e-6?1/S:0;this._time.push(d);for(var p=x;p>0;--p){var C=arguments[p];g.push(u(k[p-1],y[p-1],g[M++]+C)),E.push(C*T)}}},f.idle=function(d){var m=this.lastT();if(!(d=0;--T)g.push(u(k[T],y[T],g[M]+S*E[M])),E.push(0),M+=1}};function h(d){for(var m=new Array(d),x=0;x=0;--D){var p=C[D];A[D]<=0?C[D]=new s(p._color,p.key,p.value,C[D+1],p.right,p._count+1):C[D]=new s(p._color,p.key,p.value,p.left,C[D+1],p._count+1)}for(var D=C.length-1;D>1;--D){var z=C[D-1],p=C[D];if(z._color===o||p._color===o)break;var q=C[D-2];if(q.left===z)if(z.left===p){var U=q.right;if(U&&U._color===i)z._color=o,q.right=u(o,U),q._color=i,D-=1;else{if(q._color=i,q.left=z.right,z._color=o,z.right=q,C[D-2]=z,C[D-1]=p,c(q),c(z),D>=3){var O=C[D-3];O.left===q?O.left=z:O.right=z}break}}else{var U=q.right;if(U&&U._color===i)z._color=o,q.right=u(o,U),q._color=i,D-=1;else{if(z.right=p.left,q._color=i,q.left=p.right,p._color=o,p.left=z,p.right=q,C[D-2]=p,C[D-1]=z,c(q),c(z),c(p),D>=3){var O=C[D-3];O.left===q?O.left=p:O.right=p}break}}else if(z.right===p){var U=q.left;if(U&&U._color===i)z._color=o,q.left=u(o,U),q._color=i,D-=1;else{if(q._color=i,q.right=z.left,z._color=o,z.left=q,C[D-2]=z,C[D-1]=p,c(q),c(z),D>=3){var O=C[D-3];O.right===q?O.right=z:O.left=z}break}}else{var U=q.left;if(U&&U._color===i)z._color=o,q.left=u(o,U),q._color=i,D-=1;else{if(z.left=p.right,q._color=i,q.right=p.left,p._color=o,p.right=z,p.left=q,C[D-2]=p,C[D-1]=z,c(q),c(z),c(p),D>=3){var O=C[D-3];O.right===q?O.right=p:O.left=p}break}}}return C[0]._color=o,new f(T,C[0])};function v(y,S){if(S.left){var T=v(y,S.left);if(T)return T}var T=y(S.key,S.value);if(T)return T;if(S.right)return v(y,S.right)}function d(y,S,T,p){var C=S(y,p.key);if(C<=0){if(p.left){var A=d(y,S,T,p.left);if(A)return A}var A=T(p.key,p.value);if(A)return A}if(p.right)return d(y,S,T,p.right)}function m(y,S,T,p,C){var A=T(y,C.key),P=T(S,C.key),D;if(A<=0&&(C.left&&(D=m(y,S,T,p,C.left),D)||P>0&&(D=p(C.key,C.value),D)))return D;if(P>0&&C.right)return m(y,S,T,p,C.right)}h.forEach=function(S,T,p){if(this.root)switch(arguments.length){case 1:return v(S,this.root);case 2:return d(T,this._compare,S,this.root);case 3:return this._compare(T,p)>=0?void 0:m(T,p,this._compare,S,this.root)}},Object.defineProperty(h,"begin",{get:function(){for(var y=[],S=this.root;S;)y.push(S),S=S.left;return new x(this,y)}}),Object.defineProperty(h,"end",{get:function(){for(var y=[],S=this.root;S;)y.push(S),S=S.right;return new x(this,y)}}),h.at=function(y){if(y<0)return new x(this,[]);for(var S=this.root,T=[];;){if(T.push(S),S.left){if(y=S.right._count)break;S=S.right}else break}return new x(this,[])},h.ge=function(y){for(var S=this._compare,T=this.root,p=[],C=0;T;){var A=S(y,T.key);p.push(T),A<=0&&(C=p.length),A<=0?T=T.left:T=T.right}return p.length=C,new x(this,p)},h.gt=function(y){for(var S=this._compare,T=this.root,p=[],C=0;T;){var A=S(y,T.key);p.push(T),A<0&&(C=p.length),A<0?T=T.left:T=T.right}return p.length=C,new x(this,p)},h.lt=function(y){for(var S=this._compare,T=this.root,p=[],C=0;T;){var A=S(y,T.key);p.push(T),A>0&&(C=p.length),A<=0?T=T.left:T=T.right}return p.length=C,new x(this,p)},h.le=function(y){for(var S=this._compare,T=this.root,p=[],C=0;T;){var A=S(y,T.key);p.push(T),A>=0&&(C=p.length),A<0?T=T.left:T=T.right}return p.length=C,new x(this,p)},h.find=function(y){for(var S=this._compare,T=this.root,p=[];T;){var C=S(y,T.key);if(p.push(T),C===0)return new x(this,p);C<=0?T=T.left:T=T.right}return new x(this,[])},h.remove=function(y){var S=this.find(y);return S?S.remove():this},h.get=function(y){for(var S=this._compare,T=this.root;T;){var p=S(y,T.key);if(p===0)return T.value;p<=0?T=T.left:T=T.right}};function x(y,S){this.tree=y,this._stack=S}var g=x.prototype;Object.defineProperty(g,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(g,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),g.clone=function(){return new x(this.tree,this._stack.slice())};function E(y,S){y.key=S.key,y.value=S.value,y.left=S.left,y.right=S.right,y._color=S._color,y._count=S._count}function M(y){for(var S,T,p,C,A=y.length-1;A>=0;--A){if(S=y[A],A===0){S._color=o;return}if(T=y[A-1],T.left===S){if(p=T.right,p.right&&p.right._color===i){if(p=T.right=l(p),C=p.right=l(p.right),T.right=p.left,p.left=T,p.right=C,p._color=T._color,S._color=o,T._color=o,C._color=o,c(T),c(p),A>1){var P=y[A-2];P.left===T?P.left=p:P.right=p}y[A-1]=p;return}else if(p.left&&p.left._color===i){if(p=T.right=l(p),C=p.left=l(p.left),T.right=C.left,p.left=C.right,C.left=T,C.right=p,C._color=T._color,T._color=o,p._color=o,S._color=o,c(T),c(p),c(C),A>1){var P=y[A-2];P.left===T?P.left=C:P.right=C}y[A-1]=C;return}if(p._color===o)if(T._color===i){T._color=o,T.right=u(i,p);return}else{T.right=u(i,p);continue}else{if(p=l(p),T.right=p.left,p.left=T,p._color=T._color,T._color=i,c(T),c(p),A>1){var P=y[A-2];P.left===T?P.left=p:P.right=p}y[A-1]=p,y[A]=T,A+11){var P=y[A-2];P.right===T?P.right=p:P.left=p}y[A-1]=p;return}else if(p.right&&p.right._color===i){if(p=T.left=l(p),C=p.right=l(p.right),T.left=C.right,p.right=C.left,C.right=T,C.left=p,C._color=T._color,T._color=o,p._color=o,S._color=o,c(T),c(p),c(C),A>1){var P=y[A-2];P.right===T?P.right=C:P.left=C}y[A-1]=C;return}if(p._color===o)if(T._color===i){T._color=o,T.left=u(i,p);return}else{T.left=u(i,p);continue}else{if(p=l(p),T.left=p.right,p.right=T,p._color=T._color,T._color=i,c(T),c(p),A>1){var P=y[A-2];P.right===T?P.right=p:P.left=p}y[A-1]=p,y[A]=T,A+1=0;--p){var T=y[p];T.left===y[p+1]?S[p]=new s(T._color,T.key,T.value,S[p+1],T.right,T._count):S[p]=new s(T._color,T.key,T.value,T.left,S[p+1],T._count)}if(T=S[S.length-1],T.left&&T.right){var C=S.length;for(T=T.left;T.right;)S.push(T),T=T.right;var A=S[C-1];S.push(new s(T._color,A.key,A.value,T.left,T.right,T._count)),S[C-1].key=T.key,S[C-1].value=T.value;for(var p=S.length-2;p>=C;--p)T=S[p],S[p]=new s(T._color,T.key,T.value,T.left,S[p+1],T._count);S[C-1].left=S[C]}if(T=S[S.length-1],T._color===i){var P=S[S.length-2];P.left===T?P.left=null:P.right===T&&(P.right=null),S.pop();for(var p=0;p0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(g,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(g,"index",{get:function(){var y=0,S=this._stack;if(S.length===0){var T=this.tree.root;return T?T._count:0}else S[S.length-1].left&&(y=S[S.length-1].left._count);for(var p=S.length-2;p>=0;--p)S[p+1]===S[p].right&&(++y,S[p].left&&(y+=S[p].left._count));return y},enumerable:!0}),g.next=function(){var y=this._stack;if(y.length!==0){var S=y[y.length-1];if(S.right)for(S=S.right;S;)y.push(S),S=S.left;else for(y.pop();y.length>0&&y[y.length-1].right===S;)S=y[y.length-1],y.pop()}},Object.defineProperty(g,"hasNext",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].right)return!0;for(var S=y.length-1;S>0;--S)if(y[S-1].left===y[S])return!0;return!1}}),g.update=function(y){var S=this._stack;if(S.length===0)throw new Error("Can't update empty node!");var T=new Array(S.length),p=S[S.length-1];T[T.length-1]=new s(p._color,p.key,y,p.left,p.right,p._count);for(var C=S.length-2;C>=0;--C)p=S[C],p.left===S[C+1]?T[C]=new s(p._color,p.key,p.value,T[C+1],p.right,p._count):T[C]=new s(p._color,p.key,p.value,p.left,T[C+1],p._count);return new f(this.tree._compare,T[0])},g.prev=function(){var y=this._stack;if(y.length!==0){var S=y[y.length-1];if(S.left)for(S=S.left;S;)y.push(S),S=S.right;else for(y.pop();y.length>0&&y[y.length-1].left===S;)S=y[y.length-1],y.pop()}},Object.defineProperty(g,"hasPrev",{get:function(){var y=this._stack;if(y.length===0)return!1;if(y[y.length-1].left)return!0;for(var S=y.length-1;S>0;--S)if(y[S-1].right===y[S])return!0;return!1}});function w(y,S){return yS?1:0}function k(y){return new f(y||w,null)}}),3837:(function(a,i,o){"use strict";a.exports=D;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),h=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),v=ArrayBuffer,d=DataView;function m(z){return v.isView(z)&&!(z instanceof d)}function x(z){return Array.isArray(z)||m(z)}function g(z,q){return z[0]=q[0],z[1]=q[1],z[2]=q[2],z}function E(z){this.gl=z,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=u(z)}var M=E.prototype;M.update=function(z){z=z||{};function q(oe,we,he){if(he in z){var ye=z[he],Pe=this[he],le;(oe?x(ye)&&x(ye[0]):x(ye))?this[he]=le=[we(ye[0]),we(ye[1]),we(ye[2])]:this[he]=le=[we(ye),we(ye),we(ye)];for(var ze=0;ze<3;++ze)if(le[ze]!==Pe[ze])return!0}return!1}var U=q.bind(this,!1,Number),O=q.bind(this,!1,Boolean),R=q.bind(this,!1,String),B=q.bind(this,!0,function(oe){if(x(oe)){if(oe.length===3)return[+oe[0],+oe[1],+oe[2],1];if(oe.length===4)return[+oe[0],+oe[1],+oe[2],+oe[3]]}return[0,0,0,1]}),Y,X=!1,te=!1;if("bounds"in z)for(var se=z.bounds,ue=0;ue<2;++ue)for(var re=0;re<3;++re)se[ue][re]!==this.bounds[ue][re]&&(te=!0),this.bounds[ue][re]=se[ue][re];if("ticks"in z){Y=z.ticks,X=!0,this.autoTicks=!1;for(var ue=0;ue<3;++ue)this.tickSpacing[ue]=0}else U("tickSpacing")&&(this.autoTicks=!0,te=!0);if(this._firstInit&&("ticks"in z||"tickSpacing"in z||(this.autoTicks=!0),te=!0,X=!0,this._firstInit=!1),te&&this.autoTicks&&(Y=f.create(this.bounds,this.tickSpacing),X=!0),X){for(var ue=0;ue<3;++ue)Y[ue].sort(function(we,he){return we.x-he.x});f.equal(Y,this.ticks)?X=!1:this.ticks=Y}O("tickEnable"),R("tickFont")&&(X=!0),R("tickFontStyle")&&(X=!0),R("tickFontWeight")&&(X=!0),R("tickFontVariant")&&(X=!0),U("tickSize"),U("tickAngle"),U("tickPad"),B("tickColor");var j=R("labels");R("labelFont")&&(j=!0),R("labelFontStyle")&&(j=!0),R("labelFontWeight")&&(j=!0),R("labelFontVariant")&&(j=!0),O("labelEnable"),U("labelSize"),U("labelPad"),B("labelColor"),O("lineEnable"),O("lineMirror"),U("lineWidth"),B("lineColor"),O("lineTickEnable"),O("lineTickMirror"),U("lineTickLength"),U("lineTickWidth"),B("lineTickColor"),O("gridEnable"),U("gridWidth"),B("gridColor"),O("zeroEnable"),B("zeroLineColor"),U("zeroLineWidth"),O("backgroundEnable"),B("backgroundColor");var fe=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],ce=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(j||X)&&this._text.update(this.bounds,this.labels,fe,this.ticks,ce):this._text=s(this.gl,this.bounds,this.labels,fe,this.ticks,ce),this._lines&&X&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function w(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var k=[new w,new w,new w];function y(z,q,U,O,R){for(var B=z.primalOffset,Y=z.primalMinor,X=z.mirrorOffset,te=z.mirrorMinor,se=O[q],ue=0;ue<3;++ue)if(q!==ue){var re=B,j=X,fe=Y,ce=te;se&1<0?(fe[ue]=-1,ce[ue]=0):(fe[ue]=0,ce[ue]=1)}}var S=[0,0,0],T={model:h,view:h,projection:h,_ortho:!1};M.isOpaque=function(){return!0},M.isTransparent=function(){return!1},M.drawTransparent=function(z){};var p=0,C=[0,0,0],A=[0,0,0],P=[0,0,0];M.draw=function(z){z=z||T;for(var he=this.gl,q=z.model||h,U=z.view||h,O=z.projection||h,R=this.bounds,B=z._ortho||!1,Y=c(q,U,O,R,B),X=Y.cubeEdges,te=Y.axis,se=U[12],ue=U[13],re=U[14],j=U[15],fe=B?2:1,ce=fe*this.pixelRatio*(O[3]*se+O[7]*ue+O[11]*re+O[15]*j)/he.drawingBufferHeight,oe=0;oe<3;++oe)this.lastCubeProps.cubeEdges[oe]=X[oe],this.lastCubeProps.axis[oe]=te[oe];for(var we=k,oe=0;oe<3;++oe)y(k[oe],oe,this.bounds,X,te);for(var he=this.gl,ye=S,oe=0;oe<3;++oe)this.backgroundEnable[oe]?ye[oe]=te[oe]:ye[oe]=0;this._background.draw(q,U,O,R,ye,this.backgroundColor),this._lines.bind(q,U,O,this);for(var oe=0;oe<3;++oe){var Pe=[0,0,0];te[oe]>0?Pe[oe]=R[1][oe]:Pe[oe]=R[0][oe];for(var le=0;le<2;++le){var ze=(oe+1+le)%3,Xe=(oe+1+(le^1))%3;this.gridEnable[ze]&&this._lines.drawGrid(ze,Xe,this.bounds,Pe,this.gridColor[ze],this.gridWidth[ze]*this.pixelRatio)}for(var le=0;le<2;++le){var ze=(oe+1+le)%3,Xe=(oe+1+(le^1))%3;this.zeroEnable[Xe]&&Math.min(R[0][Xe],R[1][Xe])<=0&&Math.max(R[0][Xe],R[1][Xe])>=0&&this._lines.drawZero(ze,Xe,this.bounds,Pe,this.zeroLineColor[Xe],this.zeroLineWidth[Xe]*this.pixelRatio)}}for(var oe=0;oe<3;++oe){this.lineEnable[oe]&&this._lines.drawAxisLine(oe,this.bounds,we[oe].primalOffset,this.lineColor[oe],this.lineWidth[oe]*this.pixelRatio),this.lineMirror[oe]&&this._lines.drawAxisLine(oe,this.bounds,we[oe].mirrorOffset,this.lineColor[oe],this.lineWidth[oe]*this.pixelRatio);for(var vt=g(C,we[oe].primalMinor),st=g(A,we[oe].mirrorMinor),Oe=this.lineTickLength,le=0;le<3;++le){var qe=ce/q[5*le];vt[le]*=Oe[le]*qe,st[le]*=Oe[le]*qe}this.lineTickEnable[oe]&&this._lines.drawAxisTicks(oe,we[oe].primalOffset,vt,this.lineTickColor[oe],this.lineTickWidth[oe]*this.pixelRatio),this.lineTickMirror[oe]&&this._lines.drawAxisTicks(oe,we[oe].mirrorOffset,st,this.lineTickColor[oe],this.lineTickWidth[oe]*this.pixelRatio)}this._lines.unbind(),this._text.bind(q,U,O,this.pixelRatio);var mt,lt=.5,Ie,de;function Ee(He){de=[0,0,0],de[He]=1}function Ue(He,Qe,We){var pt=(He+1)%3,kt=(He+2)%3,qt=Qe[pt],Wt=Qe[kt],_r=We[pt],tr=We[kt];if(qt>0&&tr>0){Ee(pt);return}else if(qt>0&&tr<0){Ee(pt);return}else if(qt<0&&tr>0){Ee(pt);return}else if(qt<0&&tr<0){Ee(pt);return}else if(Wt>0&&_r>0){Ee(kt);return}else if(Wt>0&&_r<0){Ee(kt);return}else if(Wt<0&&_r>0){Ee(kt);return}else if(Wt<0&&_r<0){Ee(kt);return}}for(var oe=0;oe<3;++oe){for(var ge=we[oe].primalMinor,Ge=we[oe].mirrorMinor,tt=g(P,we[oe].primalOffset),le=0;le<3;++le)this.lineTickEnable[oe]&&(tt[le]+=ce*ge[le]*Math.max(this.lineTickLength[le],0)/q[5*le]);var ft=[0,0,0];if(ft[oe]=1,this.tickEnable[oe]){this.tickAngle[oe]===-3600?(this.tickAngle[oe]=0,this.tickAlign[oe]="auto"):this.tickAlign[oe]=-1,Ie=1,mt=[this.tickAlign[oe],lt,Ie],mt[0]==="auto"?mt[0]=p:mt[0]=parseInt(""+mt[0]),de=[0,0,0],Ue(oe,ge,Ge);for(var le=0;le<3;++le)tt[le]+=ce*ge[le]*this.tickPad[le]/q[5*le];this._text.drawTicks(oe,this.tickSize[oe],this.tickAngle[oe],tt,this.tickColor[oe],ft,de,mt)}if(this.labelEnable[oe]){Ie=0,de=[0,0,0],this.labels[oe].length>4&&(Ee(oe),Ie=1),mt=[this.labelAlign[oe],lt,Ie],mt[0]==="auto"?mt[0]=p:mt[0]=parseInt(""+mt[0]);for(var le=0;le<3;++le)tt[le]+=ce*ge[le]*this.labelPad[le]/q[5*le];tt[oe]+=.5*(R[0][oe]+R[1][oe]),this._text.drawLabel(oe,this.labelSize[oe],this.labelAngle[oe],tt,this.labelColor[oe],[0,0,0],de,mt)}}this._text.unbind()},M.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function D(z,q){var U=new E(z);return U.update(q),U}}),5304:(function(a,i,o){"use strict";a.exports=h;var s=o(2762),l=o(8116),u=o(1879).bg;function c(v,d,m,x){this.gl=v,this.buffer=d,this.vao=m,this.shader=x}var f=c.prototype;f.draw=function(v,d,m,x,g,E){for(var M=!1,w=0;w<3;++w)M=M||g[w];if(M){var k=this.gl;k.enable(k.POLYGON_OFFSET_FILL),k.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:v,view:d,projection:m,bounds:x,enable:g,colors:E},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),k.disable(k.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function h(v){for(var d=[],m=[],x=0,g=0;g<3;++g)for(var E=(g+1)%3,M=(g+2)%3,w=[0,0,0],k=[0,0,0],y=-1;y<=1;y+=2){m.push(x,x+2,x+1,x+1,x+2,x+3),w[g]=y,k[g]=y;for(var S=-1;S<=1;S+=2){w[E]=S;for(var T=-1;T<=1;T+=2)w[M]=T,d.push(w[0],w[1],w[2],k[0],k[1],k[2]),x+=1}var p=E;E=M,M=p}var C=s(v,new Float32Array(d)),A=s(v,new Uint16Array(m),v.ELEMENT_ARRAY_BUFFER),P=l(v,[{buffer:C,type:v.FLOAT,size:3,offset:0,stride:24},{buffer:C,type:v.FLOAT,size:3,offset:12,stride:24}],A),D=u(v);return D.attributes.position.location=0,D.attributes.normal.location=1,new c(v,C,P,D)}}),6429:(function(a,i,o){"use strict";a.exports=y;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),h=new Array(8),v=new Array(8),d=new Array(3),m=[0,0,0];(function(){for(var S=0;S<8;++S)h[S]=[1,1,1,1],v[S]=[1,1,1]})();function x(S,T,p){for(var C=0;C<4;++C){S[C]=p[12+C];for(var A=0;A<3;++A)S[C]+=T[A]*p[4*A+C]}}var g=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function E(S){for(var T=0;Tte&&(U|=1<te){U|=1<v[D][1])&&(we=D);for(var he=-1,D=0;D<3;++D){var ye=we^1<v[Pe][0]&&(Pe=ye)}}var le=M;le[0]=le[1]=le[2]=0,le[s.log2(he^we)]=we&he,le[s.log2(we^Pe)]=we&Pe;var ze=Pe^7;ze===U||ze===oe?(ze=he^7,le[s.log2(Pe^ze)]=ze&Pe):le[s.log2(he^ze)]=ze&he;for(var Xe=w,vt=U,B=0;B<3;++B)vt&1<{"use strict";var bRt=ds().str2arr,wRt=ds().sliceEq,V8e=ds().readUInt32BE,TRt=bRt("8BPS\0");G8e.exports=function(e){if(!(e.length<22)&&wRt(e,0,TRt))return{width:V8e(e,18),height:V8e(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var Y8e=fe((M2r,W8e)=>{"use strict";function ARt(e){return e===32||e===9||e===13||e===10}function kw(e){return typeof e=="number"&&isFinite(e)&&e>0}function MRt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,ERt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,kRt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,CRt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,LRt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,j8e=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function PRt(e){var t=e.match(kRt),r=e.match(CRt),n=e.match(LRt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function x1(e){return j8e.test(e)?e.match(j8e)[0]:"px"}W8e.exports=function(e){if(MRt(e)){for(var t="",r=0;r{"use strict";var $8e=ds().str2arr,X8e=ds().sliceEq,FRt=ds().readUInt16LE,DRt=ds().readUInt16BE,RRt=ds().readUInt32LE,IRt=ds().readUInt32BE,zRt=$8e("II*\0"),qRt=$8e("MM\0*");function M9(e,t,r){return r?DRt(e,t):FRt(e,t)}function cW(e,t,r){return r?IRt(e,t):RRt(e,t)}function Z8e(e,t,r){var n=M9(e,t+2,r),a=cW(e,t+4,r);return a!==1||n!==3&&n!==4?null:n===3?M9(e,t+8,r):cW(e,t+8,r)}K8e.exports=function(e){if(!(e.length<8)&&!(!X8e(e,0,zRt)&&!X8e(e,0,qRt))){var t=e[0]===77,r=cW(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var a=M9(e,n+0,t)*12;if(!(a<=0)&&(n+=2,!(e.length-n{"use strict";var tCe=ds().str2arr,Q8e=ds().sliceEq,eCe=ds().readUInt16LE,fW=ds().readUInt32LE,BRt=T9(),ORt=tCe("RIFF"),NRt=tCe("WEBP");function URt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:eCe(e,t+6)&16383,height:eCe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function VRt(e,t){if(e[t]===47){var r=fW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function GRt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<<16|e[t+8]<<8|e[t+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}rCe.exports=function(e){if(!(e.length<16)&&!(!Q8e(e,0,ORt)||!Q8e(e,8,NRt))){var t=12,r=null,n=0,a=fW(e,4)+8;if(!(a>e.length)){for(;t+8=10?r=r||URt(e,t+8):i==="VP8L"&&o>=5?r=r||VRt(e,t+8):i==="VP8X"&&o>=10?r=r||GRt(e,t+8):i==="EXIF"&&(n=BRt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var aCe=fe((k2r,iCe)=>{"use strict";iCe.exports={avif:T8e(),bmp:E8e(),gif:F8e(),ico:R8e(),jpeg:z8e(),png:U8e(),psd:H8e(),svg:Y8e(),tiff:J8e(),webp:nCe()}});var oCe=fe((C2r,dW)=>{"use strict";var hW=aCe();function HRt(e){for(var t=Object.keys(hW),r=0;r0&&n.height>0?n:null}return null}dW.exports=function(t){return HRt(t)};dW.exports.parsers=hW});var lCe=fe(sCe=>{"use strict";var jRt=oCe(),WRt=ag().IMAGE_URL_PREFIX,YRt=M2().Buffer;sCe.getImageSize=function(e){var t=e.replace(WRt,""),r=new YRt(t,"base64");return jRt(r)}});var fCe=fe((P2r,cCe)=>{"use strict";var uCe=Xt(),XRt=nw(),ZRt=aa(),S9=Yi(),$Rt=Xt().maxRowLength,KRt=lCe().getImageSize;cCe.exports=function(t,r){var n,a;if(r._hasZ)n=r.z.length,a=$Rt(r.z);else if(r._hasSource){var i=KRt(r.source);n=i.height,a=i.width}var o=S9.getFromId(t,r.xaxis||"x"),s=S9.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+a*r.dx],v=[u,u+n*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var tIt=xi(),N2=Xt(),hCe=N2.strTranslate,rIt=Q0(),nIt=nw(),iIt=eG(),aIt=x7().STYLE;dCe.exports=function(t,r,n,a){var i=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&iIt();N2.makeTraceGroups(a,n,"im").each(function(l){var u=tIt.select(this),c=l[0],f=c.trace,v=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&i.type==="linear"&&o.type==="linear";f._realImage=v;var g=c.z,p=c.x0,x=c.y0,_=c.w,y=c.h,C=f.dx,k=f.dy,S,L,w,A,T,m;for(m=0;S===void 0&&m<_;)S=i.c2p(p+m*C),m++;for(m=_;L===void 0&&m>0;)L=i.c2p(p+m*C),m--;for(m=0;A===void 0&&m0;)T=o.c2p(x+m*k),m--;if(LU[0];if(J||ee){var ce=S+E/2,ye=A+I/2;j+="transform:"+hCe(ce+"px",ye+"px")+"scale("+(J?-1:1)+","+(ee?-1:1)+")"+hCe(-ce+"px",-ye+"px")+";"}}V.attr("style",j);var xe=new Promise(function(ue){if(f._hasZ)ue();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===_&&f._canvas.el.height===y&&f._canvas.source===f.source)ue();else{var K=document.createElement("canvas");K.width=_,K.height=y;var _e=K.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var ne=f._image;ne.onload=function(){_e.drawImage(ne,0,0),f._canvas={el:K,source:f.source},ue()},ne.setAttribute("src",f.source)}}).then(function(){var ue,K;if(f._hasZ)K=O(function(ae,pe){var ie=g[pe][ae];return N2.isTypedArray(ie)&&(ie=Array.from(ie)),ie}),ue=K.toDataURL("image/png");else if(f._hasSource)if(v)ue=f.source;else{var _e=f._canvas.el.getContext("2d",{willReadFrequently:!0}),ne=_e.getImageData(0,0,_,y).data;K=O(function(ae,pe){var ie=4*(pe*_+ae);return[ne[ie],ne[ie+1],ne[ie+2],ne[ie+3]]}),ue=K.toDataURL("image/png")}V.attr({"xlink:href":ue,height:I,width:E,x:S,y:A})});t._promises.push(xe)})}});var gCe=fe((D2r,pCe)=>{"use strict";var oIt=xi();pCe.exports=function(t){oIt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var _Ce=fe((R2r,xCe)=>{"use strict";var mCe=kl(),yCe=Xt(),E9=yCe.isArrayOrTypedArray,sIt=nw();xCe.exports=function(t,r,n){var a=t.cd[0],i=a.trace,o=t.xa,s=t.ya;if(!(mCe.inbox(r-a.x0,r-(a.x0+a.w*i.dx),0)>0||mCe.inbox(n-a.y0,n-(a.y0+a.h*i.dy),0)>0)){var l=Math.floor((r-a.x0)/i.dx),u=Math.floor(Math.abs(n-a.y0)/i.dy),c;if(i._hasZ?c=a.z[u][l]:i._hasSource&&(c=i._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=a.hi||i.hoverinfo,v;if(f){var g=f.split("+");g.indexOf("all")!==-1&&(g=["color"]),g.indexOf("color")!==-1&&(v=!0)}var p=sIt.colormodel[i.colormodel],x=p.colormodel||i.colormodel,_=x.length,y=i._scaler(c),C=p.suffix,k=[];(i.hovertemplate||v)&&(k.push("["+[y[0]+C[0],y[1]+C[1],y[2]+C[2]].join(", ")),_===4&&k.push(", "+y[3]+C[3]),k.push("]"),k=k.join(""),t.extraText=x.toUpperCase()+": "+k);var S;E9(i.hovertext)&&E9(i.hovertext[u])?S=i.hovertext[u][l]:E9(i.text)&&E9(i.text[u])&&(S=i.text[u][l]);var L=s.c2p(a.y0+(u+.5)*i.dy),w=a.x0+(l+.5)*i.dx,A=a.y0+(u+.5)*i.dy,T="["+c.slice(0,i.colormodel.length).join(", ")+"]";return[yCe.extendFlat(t,{index:[u,l],x0:o.c2p(a.x0+l*i.dx),x1:o.c2p(a.x0+(l+1)*i.dx),y0:L,y1:L,color:y,xVal:w,xLabelVal:w,yVal:A,yLabelVal:A,zLabelVal:T,text:S,hovertemplateLabels:{zLabel:T,colorLabel:k,"color[0]Label":y[0]+C[0],"color[1]Label":y[1]+C[1],"color[2]Label":y[2]+C[2],"color[3]Label":y[3]+C[3]}})]}}}});var wCe=fe((I2r,bCe)=>{"use strict";bCe.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var ACe=fe((z2r,TCe)=>{"use strict";TCe.exports={attributes:(fH(),Gs(cH)).default,supplyDefaults:fAe(),calc:fCe(),plot:vCe(),style:gCe(),hoverPoints:_Ce(),eventData:wCe(),moduleType:"trace",name:"image",basePlotModule:gu(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var SCe=fe((q2r,MCe)=>{"use strict";MCe.exports=ACe()});var U2=fe((B2r,kCe)=>{"use strict";var k9=Ho(),lIt=nl().attributes,uIt=Ds(),cIt=tc(),{hovertemplateAttrs:fIt,texttemplateAttrs:hIt,templatefallbackAttrs:ECe}=Oo(),sy=ta().extendFlat,dIt=Uc().pattern,C9=uIt({editType:"plot",arrayOk:!0,colorEditType:"plot"});kCe.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:cIt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:dIt,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:sy({},k9.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:fIt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:ECe(),texttemplate:hIt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:ECe({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:sy({},C9,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:sy({},C9,{}),outsidetextfont:sy({},C9,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:sy({},k9.showlegend,{arrayOk:!0}),legend:sy({},k9.legend,{arrayOk:!0}),legendrank:sy({},k9.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:sy({},C9,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:lIt({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:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}});var V2=fe((O2r,PCe)=>{"use strict";var vIt=aa(),z6=Xt(),pIt=U2(),gIt=nl().defaults,mIt=z0().handleText,yIt=Xt().coercePattern;function CCe(e,t){var r=z6.isArrayOrTypedArray(e),n=z6.isArrayOrTypedArray(t),a=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(a)||(a=0),a&&n){for(var i,o=0;o0){i=!0;break}}i||(a=0)}return{hasLabels:r,hasValues:n,len:a}}function LCe(e,t,r,n,a){var i=n("marker.line.width");i&&n("marker.line.color",a?void 0:r.paper_bgcolor);var o=n("marker.colors");yIt(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function xIt(e,t,r,n){function a(C,k){return z6.coerce(e,t,pIt,C,k)}var i=a("labels"),o=a("values"),s=CCe(i,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(a("label0"),a("dlabel")),!l){t.visible=!1;return}t._length=l,LCe(e,t,n,a,!0),a("scalegroup");var u=a("text"),c=a("texttemplate");a("texttemplatefallback");var f;if(c||(f=a("textinfo",z6.isArrayOrTypedArray(u)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),c||f&&f!=="none"){var v=a("textposition");mIt(e,t,n,a,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var g=Array.isArray(v)||v==="auto",p=g||v==="outside";p&&a("automargin"),(v==="inside"||v==="auto"||Array.isArray(v))&&a("insidetextorientation")}else f==="none"&&a("textposition","none");gIt(t,n,a);var x=a("hole"),_=a("title.text");if(_){var y=a("title.position",x?"middle center":"top center");!x&&y==="middle center"&&(t.title.position="top center"),z6.coerceFont(a,"title.font",n.font)}a("sort"),a("direction"),a("rotation"),a("pull")}PCe.exports={handleLabelsAndValues:CCe,handleMarkerDefaults:LCe,supplyDefaults:xIt}});var L9=fe((N2r,FCe)=>{"use strict";FCe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var RCe=fe((U2r,DCe)=>{"use strict";var _It=Xt(),bIt=L9();DCe.exports=function(t,r){function n(a,i){return _It.coerce(t,r,bIt,a,i)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var Lw=fe((V2r,qCe)=>{"use strict";var wIt=aa(),Cw=ni(),TIt={};function AIt(e,t){var r=[],n=e._fullLayout,a=n.hiddenlabels||[],i=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(i=new Array(l),c=0;c=0});var S=t.type==="funnelarea"?x:t.sort;return S&&r.sort(function(L,w){return w.v-L.v}),r[0]&&(r[0].vTotal=p),r}function ICe(e){return function(r,n){if(!r||!Cw.isValid(r))return!1;let a=Cw.rgbaString(r);return e[n]||(e[n]=a),a}}function MIt(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,i=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(i=zCe(i,TIt));for(var s=0,l=0;l{"use strict";var SIt=Sd().appendArrayMultiPointValues;BCe.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),SIt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var R9=fe((H2r,o7e)=>{"use strict";var u0=xi(),EIt=Hs(),P9=kl(),jCe=ni(),_g=ea(),Qf=Xt(),kIt=Qf.strScale,NCe=Qf.strTranslate,vW=as(),WCe=kh(),CIt=WCe.recordMinTextSize,LIt=WCe.clearMinTextSize,YCe=Im().TEXTPAD,Aa=Sm(),F9=OCe(),UCe=Xt().isValidTextValue;function PIt(e,t){var r=e._context.staticPlot,n=e._fullLayout,a=n._size;LIt("pie",n),$Ce(t,e),n7e(t,a);var i=Qf.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=u0.select(this),l=o[0],u=l.trace;NIt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=u0.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],v=!1;c.each(function(S,L){if(S.hidden){u0.select(this).selectAll("path,g").remove();return}S.pointNumber=S.i,S.curveNumber=u.index,f[S.pxmid[1]<0?0:1][S.pxmid[0]<0?0:1].push(S);var w=l.cx,A=l.cy,T=u0.select(this),m=T.selectAll("path.surface").data([S]);if(m.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),T.call(XCe,e,o),u.pull){var F=+Aa.castOption(u.pull,S.pts)||0;F>0&&(w+=F*S.pxmid[0],A+=F*S.pxmid[1])}S.cxFinal=w,S.cyFinal=A;function E(q,U,J,ee){var ce=ee*(U[0]-q[0]),ye=ee*(U[1]-q[1]);return"a"+ee*l.r+","+ee*l.r+" 0 "+S.largeArc+(J?" 1 ":" 0 ")+ce+","+ye}var I=u.hole;if(S.v===l.vTotal){var R="M"+(w+S.px0[0])+","+(A+S.px0[1])+E(S.px0,S.pxmid,!0,1)+E(S.pxmid,S.px0,!0,1)+"Z";I?m.attr("d","M"+(w+I*S.px0[0])+","+(A+I*S.px0[1])+E(S.px0,S.pxmid,!1,I)+E(S.pxmid,S.px0,!1,I)+"Z"+R):m.attr("d",R)}else{var B=E(S.px0,S.px1,!0,1);if(I){var O=1-I;m.attr("d","M"+(w+I*S.px1[0])+","+(A+I*S.px1[1])+E(S.px1,S.px0,!1,I)+"l"+O*S.px0[0]+","+O*S.px0[1]+B+"Z")}else m.attr("d","M"+w+","+A+"l"+S.px0[0]+","+S.px0[1]+B+"Z")}i7e(e,S,l);var V=Aa.castOption(u.textposition,S.pts),j=T.selectAll("g.slicetext").data(S.text&&V!=="none"?[0]:[]);j.enter().append("g").classed("slicetext",!0),j.exit().remove(),j.each(function(){var q=Qf.ensureSingle(u0.select(this),"text","",function(K){K.attr("data-notex",1)}),U=Qf.ensureUniformFontSize(e,V==="outside"?DIt(u,S,n.font):ZCe(u,S,n.font));q.text(S.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(_g.font,U).call(vW.convertToTspans,e);var J=_g.bBox(q.node()),ee;if(V==="outside")ee=HCe(J,S);else if(ee=KCe(J,S,l),V==="auto"&&ee.scale<1){var ce=Qf.ensureUniformFontSize(e,u.outsidetextfont);q.call(_g.font,ce),J=_g.bBox(q.node()),ee=HCe(J,S)}var ye=ee.textPosAngle,xe=ye===void 0?S.pxmid:D9(l.r,ye);if(ee.targetX=w+xe[0]*ee.rCenter+(ee.x||0),ee.targetY=A+xe[1]*ee.rCenter+(ee.y||0),a7e(ee,J),ee.outside){var ue=ee.targetY;S.yLabelMin=ue-J.height/2,S.yLabelMid=ue,S.yLabelMax=ue+J.height/2,S.labelExtraX=0,S.labelExtraY=0,v=!0}ee.fontSize=U.size,CIt(u.type,ee,n),o[L].transform=ee,Qf.setTransormAndDisplay(q,ee)})});var g=u0.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(g.enter().append("g").classed("titletext",!0),g.exit().remove(),g.each(function(){var S=Qf.ensureSingle(u0.select(this),"text","",function(A){A.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=Qf.templateString(L,u._meta)),S.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(_g.font,u.title.font).call(vW.convertToTspans,e);var w;u.title.position==="middle center"?w=zIt(l):w=t7e(l,a),S.attr("transform",NCe(w.x,w.y)+kIt(Math.min(1,w.scale))+NCe(w.tx,w.ty))}),v&&BIt(f,u),FIt(c,u),v&&u.automargin){var p=_g.bBox(s.node()),x=u.domain,_=a.w*(x.x[1]-x.x[0]),y=a.h*(x.y[1]-x.y[0]),C=(.5*_-l.r)/a.w,k=(.5*y-l.r)/a.h;EIt.autoMargin(e,"pie."+u.uid+".automargin",{xl:x.x[0]-C,xr:x.x[1]+C,yb:x.y[0]-k,yt:x.y[1]+k,l:Math.max(l.cx-l.r-p.left,0),r:Math.max(p.right-(l.cx+l.r),0),b:Math.max(p.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-p.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var o=u0.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function FIt(e,t){e.each(function(r){var n=u0.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select("path.textline").remove();return}var a=n.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,Qf.setTransormAndDisplay(a,r.transform);var i=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+i+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(i+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;Qf.ensureSingle(n,"path","textline").call(jCe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function XCe(e,t,r){var n=r[0],a=n.cx,i=n.cy,o=n.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=P9.castHoverinfo({hoverinfo:[Aa.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var v=l.rInscribed||0,g=a+l.pxmid[0]*(1-v),p=i+l.pxmid[1]*(1-v),x=u.separators,_=[];if(f&&f.indexOf("label")!==-1&&_.push(l.label),l.text=Aa.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var y=l.text;Qf.isValidTextValue(y)&&_.push(y)}l.value=l.v,l.valueLabel=Aa.formatPieValue(l.v,x),f&&f.indexOf("value")!==-1&&_.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=Aa.formatPiePercent(l.percent,x),f&&f.indexOf("percent")!==-1&&_.push(l.percentLabel);var C=c.hoverlabel,k=C.font,S=[];P9.loneHover({trace:o,x0:g-v*n.r,x1:g+v*n.r,y:p,_x0:s?a+l.TL[0]:g-v*n.r,_x1:s?a+l.TR[0]:g+v*n.r,_y0:s?i+l.TL[1]:p-v*n.r,_y1:s?i+l.BL[1]:p+v*n.r,text:_.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:Aa.castOption(C.bgcolor,l.pts)||l.color,borderColor:Aa.castOption(C.bordercolor,l.pts),fontFamily:Aa.castOption(k.family,l.pts),fontSize:Aa.castOption(k.size,l.pts),fontColor:Aa.castOption(k.color,l.pts),nameLength:Aa.castOption(C.namelength,l.pts),textAlign:Aa.castOption(C.align,l.pts),hovertemplate:Aa.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[F9(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:S}),l.bbox=S[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[F9(l,c)],event:u0.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=u0.select(this).datum();o._hasHoverEvent&&(l.originalEvent=u0.event,t.emit("plotly_unhover",{points:[F9(f,c)],event:u0.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(P9.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[F9(l,c)],P9.click(t,u0.event))})}function DIt(e,t,r){var n=Aa.castOption(e.outsidetextfont.color,t.pts)||Aa.castOption(e.textfont.color,t.pts)||r.color,a=Aa.castOption(e.outsidetextfont.family,t.pts)||Aa.castOption(e.textfont.family,t.pts)||r.family,i=Aa.castOption(e.outsidetextfont.size,t.pts)||Aa.castOption(e.textfont.size,t.pts)||r.size,o=Aa.castOption(e.outsidetextfont.weight,t.pts)||Aa.castOption(e.textfont.weight,t.pts)||r.weight,s=Aa.castOption(e.outsidetextfont.style,t.pts)||Aa.castOption(e.textfont.style,t.pts)||r.style,l=Aa.castOption(e.outsidetextfont.variant,t.pts)||Aa.castOption(e.textfont.variant,t.pts)||r.variant,u=Aa.castOption(e.outsidetextfont.textcase,t.pts)||Aa.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Aa.castOption(e.outsidetextfont.lineposition,t.pts)||Aa.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Aa.castOption(e.outsidetextfont.shadow,t.pts)||Aa.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:a,size:i,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function ZCe(e,t,r){var n=Aa.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=Aa.castOption(e._input.textfont.color,t.pts));var a=Aa.castOption(e.insidetextfont.family,t.pts)||Aa.castOption(e.textfont.family,t.pts)||r.family,i=Aa.castOption(e.insidetextfont.size,t.pts)||Aa.castOption(e.textfont.size,t.pts)||r.size,o=Aa.castOption(e.insidetextfont.weight,t.pts)||Aa.castOption(e.textfont.weight,t.pts)||r.weight,s=Aa.castOption(e.insidetextfont.style,t.pts)||Aa.castOption(e.textfont.style,t.pts)||r.style,l=Aa.castOption(e.insidetextfont.variant,t.pts)||Aa.castOption(e.textfont.variant,t.pts)||r.variant,u=Aa.castOption(e.insidetextfont.textcase,t.pts)||Aa.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Aa.castOption(e.insidetextfont.lineposition,t.pts)||Aa.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Aa.castOption(e.insidetextfont.shadow,t.pts)||Aa.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||jCe.contrast(t.color),family:a,size:i,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function $Ce(e,t){for(var r,n,a=0;a=-4;C-=2)y(Math.PI*C,"tan");for(C=4;C>=-4;C-=2)y(Math.PI*(C+1),"tan")}if(f||g){for(C=4;C>=-4;C-=2)y(Math.PI*(C+1.5),"rad");for(C=4;C>=-4;C-=2)y(Math.PI*(C+.5),"rad")}}if(s||p||f){var k=Math.sqrt(e.width*e.width+e.height*e.height);if(_={scale:a*n*2/k,rCenter:1-a,rotate:0},_.textPosAngle=(t.startangle+t.stopangle)/2,_.scale>=1)return _;x.push(_)}(p||g)&&(_=VCe(e,n,o,l,u),_.textPosAngle=(t.startangle+t.stopangle)/2,x.push(_)),(p||v)&&(_=GCe(e,n,o,l,u),_.textPosAngle=(t.startangle+t.stopangle)/2,x.push(_));for(var S=0,L=0,w=0;w=1)break}return x[S]}function RIt(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function zIt(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function t7e(e,t){var r=1,n=1,a,i=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=r7e(i),i.title.position.indexOf("top")!==-1?(o.y-=(1+a)*e.r,s.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(o.y+=(1+a)*e.r);var l=qIt(e.r,e.trace.aspectratio),u=t.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+a)*l,s.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+a)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=pW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function qIt(e,t){return e/(t===void 0?1:t)}function pW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function r7e(e){var t=e.pull;if(!t)return 0;var r;if(Qf.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function BIt(e,t){var r,n,a,i,o,s,l,u,c,f,v,g,p;function x(k,S){return k.pxmid[1]-S.pxmid[1]}function _(k,S){return S.pxmid[1]-k.pxmid[1]}function y(k,S){S||(S={});var L=S.labelExtraY+(n?S.yLabelMax:S.yLabelMin),w=n?k.yLabelMin:k.yLabelMax,A=n?k.yLabelMax:k.yLabelMin,T=k.cyFinal+o(k.px0[1],k.px1[1]),m=L-w,F,E,I,R,B,O;if(m*l>0&&(k.labelExtraY=m),!!Qf.isArrayOrTypedArray(t.pull))for(E=0;E=(Aa.castOption(t.pull,I.pts)||0))&&((k.pxmid[1]-I.pxmid[1])*l>0?(R=I.cyFinal+o(I.px0[1],I.px1[1]),m=R-w-k.labelExtraY,m*l>0&&(k.labelExtraY+=m)):(A+k.labelExtraY-T)*l>0&&(F=3*s*Math.abs(E-f.indexOf(k)),B=I.cxFinal+i(I.px0[0],I.px1[0]),O=B+F-(k.cxFinal+k.pxmid[0])-k.labelExtraX,O*s>0&&(k.labelExtraX+=O)))}for(n=0;n<2;n++)for(a=n?x:_,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=e[n][r],u.sort(a),c=e[1-n][r],f=c.concat(u),g=[],v=0;v1?(u=r.r,c=u/a.aspectratio):(c=r.r,u=c*a.aspectratio),u*=(1+a.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;nt.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=IIt(u,t))}function D9(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function i7e(e,t,r){var n=e._fullLayout,a=r.trace,i=a.texttemplate,o=a.textinfo;if(!i&&o&&o!=="none"){var s=o.split("+"),l=function(S){return s.indexOf(S)!==-1},u=l("label"),c=l("text"),f=l("value"),v=l("percent"),g=n.separators,p;if(p=u?[t.label]:[],c){var x=Aa.getFirstFilled(a.text,t.pts);UCe(x)&&p.push(x)}f&&p.push(Aa.formatPieValue(t.v,g)),v&&p.push(Aa.formatPiePercent(t.v/r.vTotal,g)),t.text=p.join("
")}function _(S){return{label:S.label,value:S.v,valueLabel:Aa.formatPieValue(S.v,n.separators),percent:S.v/r.vTotal,percentLabel:Aa.formatPiePercent(S.v/r.vTotal,n.separators),color:S.color,text:S.text,customdata:Qf.castOption(a,S.i,"customdata")}}if(i){var y=Qf.castOption(a,t.i,"texttemplate");if(!y)t.text="";else{var C=_(t),k=Aa.getFirstFilled(a.text,t.pts);(UCe(k)||k==="")&&(C.text=k),t.text=Qf.texttemplateString({data:[C,a._meta],fallback:a.texttemplatefallback,labels:C,locale:e._fullLayout._d3locale,template:y})}}}function a7e(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),a=Math.sin(r),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*n-o*a,e.textY=i*a+o*n,e.noCenter=!0}o7e.exports={plot:PIt,formatSliceLabel:i7e,transformInsideText:KCe,determineInsideTextFont:ZCe,positionTitleOutside:t7e,prerenderTitles:$Ce,layoutAreas:n7e,attachFxHandlers:XCe,computeTransform:a7e}});var u7e=fe((j2r,l7e)=>{"use strict";var s7e=xi(),UIt=Jb(),VIt=kh().resizeText;l7e.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");VIt(t,r,"pie"),r.each(function(n){var a=n[0],i=a.trace,o=s7e.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(s){s7e.select(this).call(UIt,s,i,t)})})}});var f7e=fe(Pw=>{"use strict";var c7e=Hs();Pw.name="pie";Pw.plot=function(e,t,r,n){c7e.plotBasePlot(Pw.name,e,t,r,n)};Pw.clean=function(e,t,r,n){c7e.cleanBasePlot(Pw.name,e,t,r,n)}});var d7e=fe((Y2r,h7e)=>{"use strict";h7e.exports={attributes:U2(),supplyDefaults:V2().supplyDefaults,supplyLayoutDefaults:RCe(),layoutAttributes:L9(),calc:Lw().calc,crossTraceCalc:Lw().crossTraceCalc,plot:R9().plot,style:u7e(),styleOne:Jb(),moduleType:"trace",name:"pie",basePlotModule:f7e(),categories:["pie-like","pie","showLegend"],meta:{}}});var p7e=fe((X2r,v7e)=>{"use strict";v7e.exports=d7e()});var m7e=fe(Fw=>{"use strict";var g7e=Hs();Fw.name="sunburst";Fw.plot=function(e,t,r,n){g7e.plotBasePlot(Fw.name,e,t,r,n)};Fw.clean=function(e,t,r,n){g7e.cleanBasePlot(Fw.name,e,t,r,n)}});var gW=fe(($2r,y7e)=>{"use strict";y7e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var B6=fe((K2r,b7e)=>{"use strict";var GIt=Ho(),{hovertemplateAttrs:HIt,texttemplateAttrs:jIt,templatefallbackAttrs:x7e}=Oo(),WIt=_s(),YIt=nl().attributes,bg=U2(),_7e=gW(),q6=ta().extendFlat,XIt=Uc().pattern;b7e.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:q6({colors:{valType:"data_array",editType:"calc"},line:{color:q6({},bg.marker.line.color,{dflt:null}),width:q6({},bg.marker.line.width,{dflt:1}),editType:"calc"},pattern:XIt,editType:"calc"},WIt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:bg.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:jIt({editType:"plot"},{keys:_7e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:x7e({editType:"plot"}),hovertext:bg.hovertext,hoverinfo:q6({},GIt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:HIt({},{keys:_7e.eventDataKeys}),hovertemplatefallback:x7e(),textfont:bg.textfont,insidetextorientation:bg.insidetextorientation,insidetextfont:bg.insidetextfont,outsidetextfont:q6({},bg.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:bg.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:YIt({name:"sunburst",trace:!0,editType:"calc"})}});var mW=fe((J2r,w7e)=>{"use strict";w7e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var S7e=fe((Q2r,M7e)=>{"use strict";var T7e=Xt(),ZIt=B6(),$It=nl().defaults,KIt=z0().handleText,JIt=V2().handleMarkerDefaults,A7e=js(),QIt=A7e.hasColorscale,ezt=A7e.handleDefaults;M7e.exports=function(t,r,n,a){function i(v,g){return T7e.coerce(t,r,ZIt,v,g)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),JIt(t,r,a,i);var u=r._hasColorscale=QIt(t,"marker","colors")||(t.marker||{}).coloraxis;u&&ezt(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",u?1:.7);var c=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",T7e.isArrayOrTypedArray(c)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f="auto";KIt(t,r,a,i,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("insidetextorientation"),i("sort"),i("rotation"),i("root.color"),$It(r,a,i),r._length=null}});var k7e=fe((e_r,E7e)=>{"use strict";var tzt=Xt(),rzt=mW();E7e.exports=function(t,r){function n(a,i){return tzt.coerce(t,r,rzt,a,i)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var O6=fe((I9,C7e)=>{(function(e,t){typeof I9=="object"&&typeof C7e!="undefined"?t(I9):(e=e||self,t(e.d3=e.d3||{}))})(I9,function(e){"use strict";function t(wt,Tt){return wt.parent===Tt.parent?1:2}function r(wt){return wt.reduce(n,0)/wt.length}function n(wt,Tt){return wt+Tt.x}function a(wt){return 1+wt.reduce(i,0)}function i(wt,Tt){return Math.max(wt,Tt.y)}function o(wt){for(var Tt;Tt=wt.children;)wt=Tt[0];return wt}function s(wt){for(var Tt;Tt=wt.children;)wt=Tt[Tt.length-1];return wt}function l(){var wt=t,Tt=1,Mt=1,Lt=!1;function ft(kt){var rr,pr=0;kt.eachAfter(function(Fr){var Zr=Fr.children;Zr?(Fr.x=r(Zr),Fr.y=a(Zr)):(Fr.x=rr?pr+=wt(Fr,rr):0,Fr.y=0,rr=Fr)});var Kr=o(kt),Nr=s(kt),dn=Kr.x-wt(Kr,Nr)/2,xr=Nr.x+wt(Nr,Kr)/2;return kt.eachAfter(Lt?function(Fr){Fr.x=(Fr.x-kt.x)*Tt,Fr.y=(kt.y-Fr.y)*Mt}:function(Fr){Fr.x=(Fr.x-dn)/(xr-dn)*Tt,Fr.y=(1-(kt.y?Fr.y/kt.y:1))*Mt})}return ft.separation=function(kt){return arguments.length?(wt=kt,ft):wt},ft.size=function(kt){return arguments.length?(Lt=!1,Tt=+kt[0],Mt=+kt[1],ft):Lt?null:[Tt,Mt]},ft.nodeSize=function(kt){return arguments.length?(Lt=!0,Tt=+kt[0],Mt=+kt[1],ft):Lt?[Tt,Mt]:null},ft}function u(wt){var Tt=0,Mt=wt.children,Lt=Mt&&Mt.length;if(!Lt)Tt=1;else for(;--Lt>=0;)Tt+=Mt[Lt].value;wt.value=Tt}function c(){return this.eachAfter(u)}function f(wt){var Tt=this,Mt,Lt=[Tt],ft,kt,rr;do for(Mt=Lt.reverse(),Lt=[];Tt=Mt.pop();)if(wt(Tt),ft=Tt.children,ft)for(kt=0,rr=ft.length;kt=0;--ft)Mt.push(Lt[ft]);return this}function g(wt){for(var Tt=this,Mt=[Tt],Lt=[],ft,kt,rr;Tt=Mt.pop();)if(Lt.push(Tt),ft=Tt.children,ft)for(kt=0,rr=ft.length;kt=0;)Mt+=Lt[ft].value;Tt.value=Mt})}function x(wt){return this.eachBefore(function(Tt){Tt.children&&Tt.children.sort(wt)})}function _(wt){for(var Tt=this,Mt=y(Tt,wt),Lt=[Tt];Tt!==Mt;)Tt=Tt.parent,Lt.push(Tt);for(var ft=Lt.length;wt!==Mt;)Lt.splice(ft,0,wt),wt=wt.parent;return Lt}function y(wt,Tt){if(wt===Tt)return wt;var Mt=wt.ancestors(),Lt=Tt.ancestors(),ft=null;for(wt=Mt.pop(),Tt=Lt.pop();wt===Tt;)ft=wt,wt=Mt.pop(),Tt=Lt.pop();return ft}function C(){for(var wt=this,Tt=[wt];wt=wt.parent;)Tt.push(wt);return Tt}function k(){var wt=[];return this.each(function(Tt){wt.push(Tt)}),wt}function S(){var wt=[];return this.eachBefore(function(Tt){Tt.children||wt.push(Tt)}),wt}function L(){var wt=this,Tt=[];return wt.each(function(Mt){Mt!==wt&&Tt.push({source:Mt.parent,target:Mt})}),Tt}function w(wt,Tt){var Mt=new E(wt),Lt=+wt.value&&(Mt.value=wt.value),ft,kt=[Mt],rr,pr,Kr,Nr;for(Tt==null&&(Tt=T);ft=kt.pop();)if(Lt&&(ft.value=+ft.data.value),(pr=Tt(ft.data))&&(Nr=pr.length))for(ft.children=new Array(Nr),Kr=Nr-1;Kr>=0;--Kr)kt.push(rr=ft.children[Kr]=new E(pr[Kr])),rr.parent=ft,rr.depth=ft.depth+1;return Mt.eachBefore(F)}function A(){return w(this).eachBefore(m)}function T(wt){return wt.children}function m(wt){wt.data=wt.data.data}function F(wt){var Tt=0;do wt.height=Tt;while((wt=wt.parent)&&wt.height<++Tt)}function E(wt){this.data=wt,this.depth=this.height=0,this.parent=null}E.prototype=w.prototype={constructor:E,count:c,each:f,eachAfter:g,eachBefore:v,sum:p,sort:x,path:_,ancestors:C,descendants:k,leaves:S,links:L,copy:A};var I=Array.prototype.slice;function R(wt){for(var Tt=wt.length,Mt,Lt;Tt;)Lt=Math.random()*Tt--|0,Mt=wt[Tt],wt[Tt]=wt[Lt],wt[Lt]=Mt;return wt}function B(wt){for(var Tt=0,Mt=(wt=R(I.call(wt))).length,Lt=[],ft,kt;Tt0&&Mt*Mt>Lt*Lt+ft*ft}function q(wt,Tt){for(var Mt=0;MtKr?(ft=(Nr+Kr-kt)/(2*Nr),pr=Math.sqrt(Math.max(0,Kr/Nr-ft*ft)),Mt.x=wt.x-ft*Lt-pr*rr,Mt.y=wt.y-ft*rr+pr*Lt):(ft=(Nr+kt-Kr)/(2*Nr),pr=Math.sqrt(Math.max(0,kt/Nr-ft*ft)),Mt.x=Tt.x+ft*Lt-pr*rr,Mt.y=Tt.y+ft*rr+pr*Lt)):(Mt.x=Tt.x+Mt.r,Mt.y=Tt.y)}function xe(wt,Tt){var Mt=wt.r+Tt.r-1e-6,Lt=Tt.x-wt.x,ft=Tt.y-wt.y;return Mt>0&&Mt*Mt>Lt*Lt+ft*ft}function ue(wt){var Tt=wt._,Mt=wt.next._,Lt=Tt.r+Mt.r,ft=(Tt.x*Mt.r+Mt.x*Tt.r)/Lt,kt=(Tt.y*Mt.r+Mt.y*Tt.r)/Lt;return ft*ft+kt*kt}function K(wt){this._=wt,this.next=null,this.previous=null}function _e(wt){if(!(ft=wt.length))return 0;var Tt,Mt,Lt,ft,kt,rr,pr,Kr,Nr,dn,xr;if(Tt=wt[0],Tt.x=0,Tt.y=0,!(ft>1))return Tt.r;if(Mt=wt[1],Tt.x=-Mt.r,Mt.x=Tt.r,Mt.y=0,!(ft>2))return Tt.r+Mt.r;ye(Mt,Tt,Lt=wt[2]),Tt=new K(Tt),Mt=new K(Mt),Lt=new K(Lt),Tt.next=Lt.previous=Mt,Mt.next=Tt.previous=Lt,Lt.next=Mt.previous=Tt;e:for(pr=3;pr0)throw new Error("cycle");return pr}return Mt.id=function(Lt){return arguments.length?(wt=pe(Lt),Mt):wt},Mt.parentId=function(Lt){return arguments.length?(Tt=pe(Lt),Mt):Tt},Mt}function Te(wt,Tt){return wt.parent===Tt.parent?1:2}function Ve(wt){var Tt=wt.children;return Tt?Tt[0]:wt.t}function $e(wt){var Tt=wt.children;return Tt?Tt[Tt.length-1]:wt.t}function ot(wt,Tt,Mt){var Lt=Mt/(Tt.i-wt.i);Tt.c-=Lt,Tt.s+=Mt,wt.c+=Lt,Tt.z+=Mt,Tt.m+=Mt}function tt(wt){for(var Tt=0,Mt=0,Lt=wt.children,ft=Lt.length,kt;--ft>=0;)kt=Lt[ft],kt.z+=Tt,kt.m+=Tt,Tt+=kt.s+(Mt+=kt.c)}function nt(wt,Tt,Mt){return wt.a.parent===Tt.parent?wt.a:Mt}function We(wt,Tt){this._=wt,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Tt}We.prototype=Object.create(E.prototype);function mt(wt){for(var Tt=new We(wt,0),Mt,Lt=[Tt],ft,kt,rr,pr;Mt=Lt.pop();)if(kt=Mt._.children)for(Mt.children=new Array(pr=kt.length),rr=pr-1;rr>=0;--rr)Lt.push(ft=Mt.children[rr]=new We(kt[rr],rr)),ft.parent=Mt;return(Tt.parent=new We(null,0)).children=[Tt],Tt}function bt(){var wt=Te,Tt=1,Mt=1,Lt=null;function ft(Nr){var dn=mt(Nr);if(dn.eachAfter(kt),dn.parent.m=-dn.z,dn.eachBefore(rr),Lt)Nr.eachBefore(Kr);else{var xr=Nr,Fr=Nr,Zr=Nr;Nr.eachBefore(function(Qt){Qt.xFr.x&&(Fr=Qt),Qt.depth>Zr.depth&&(Zr=Qt)});var Cn=xr===Fr?1:wt(xr,Fr)/2,Dt=Cn-xr.x,At=Tt/(Fr.x+Cn+Dt),Vt=Mt/(Zr.depth||1);Nr.eachBefore(function(Qt){Qt.x=(Qt.x+Dt)*At,Qt.y=Qt.depth*Vt})}return Nr}function kt(Nr){var dn=Nr.children,xr=Nr.parent.children,Fr=Nr.i?xr[Nr.i-1]:null;if(dn){tt(Nr);var Zr=(dn[0].z+dn[dn.length-1].z)/2;Fr?(Nr.z=Fr.z+wt(Nr._,Fr._),Nr.m=Nr.z-Zr):Nr.z=Zr}else Fr&&(Nr.z=Fr.z+wt(Nr._,Fr._));Nr.parent.A=pr(Nr,Fr,Nr.parent.A||xr[0])}function rr(Nr){Nr._.x=Nr.z+Nr.parent.m,Nr.m+=Nr.parent.m}function pr(Nr,dn,xr){if(dn){for(var Fr=Nr,Zr=Nr,Cn=dn,Dt=Fr.parent.children[0],At=Fr.m,Vt=Zr.m,Qt=Cn.m,Ut=Dt.m,_r;Cn=$e(Cn),Fr=Ve(Fr),Cn&&Fr;)Dt=Ve(Dt),Zr=$e(Zr),Zr.a=Nr,_r=Cn.z+Qt-Fr.z-At+wt(Cn._,Fr._),_r>0&&(ot(nt(Cn,Nr,xr),Nr,_r),At+=_r,Vt+=_r),Qt+=Cn.m,At+=Fr.m,Ut+=Dt.m,Vt+=Zr.m;Cn&&!$e(Zr)&&(Zr.t=Cn,Zr.m+=Qt-Vt),Fr&&!Ve(Dt)&&(Dt.t=Fr,Dt.m+=At-Ut,xr=Nr)}return xr}function Kr(Nr){Nr.x*=Tt,Nr.y=Nr.depth*Mt}return ft.separation=function(Nr){return arguments.length?(wt=Nr,ft):wt},ft.size=function(Nr){return arguments.length?(Lt=!1,Tt=+Nr[0],Mt=+Nr[1],ft):Lt?null:[Tt,Mt]},ft.nodeSize=function(Nr){return arguments.length?(Lt=!0,Tt=+Nr[0],Mt=+Nr[1],ft):Lt?[Tt,Mt]:null},ft}function Yt(wt,Tt,Mt,Lt,ft){for(var kt=wt.children,rr,pr=-1,Kr=kt.length,Nr=wt.value&&(ft-Mt)/wt.value;++prQt&&(Qt=Nr),Jr=At*At*rn,Ut=Math.max(Qt/Jr,Jr/Vt),Ut>_r){At-=Nr;break}_r=Ut}rr.push(Kr={value:At,dice:Zr1?Lt:1)},Mt})(jt);function fr(){var wt=or,Tt=!1,Mt=1,Lt=1,ft=[0],kt=ie,rr=ie,pr=ie,Kr=ie,Nr=ie;function dn(Fr){return Fr.x0=Fr.y0=0,Fr.x1=Mt,Fr.y1=Lt,Fr.eachBefore(xr),ft=[0],Tt&&Fr.eachBefore(it),Fr}function xr(Fr){var Zr=ft[Fr.depth],Cn=Fr.x0+Zr,Dt=Fr.y0+Zr,At=Fr.x1-Zr,Vt=Fr.y1-Zr;At=Fr-1){var Qt=kt[xr];Qt.x0=Cn,Qt.y0=Dt,Qt.x1=At,Qt.y1=Vt;return}for(var Ut=Nr[xr],_r=Zr/2+Ut,rn=xr+1,Jr=Fr-1;rn>>1;Nr[qn]<_r?rn=qn+1:Jr=qn}_r-Nr[rn-1]Vt-Dt){var Ii=(Cn*Jn+At*ri)/Zr;dn(xr,rn,ri,Cn,Dt,Ii,Vt),dn(rn,Fr,Jn,Ii,Dt,At,Vt)}else{var Vi=(Dt*Jn+Vt*ri)/Zr;dn(xr,rn,ri,Cn,Dt,At,Vi),dn(rn,Fr,Jn,Cn,Vi,At,Vt)}}}function cr(wt,Tt,Mt,Lt,ft){(wt.depth&1?Yt:Oe)(wt,Tt,Mt,Lt,ft)}var Ct=(function wt(Tt){function Mt(Lt,ft,kt,rr,pr){if((Kr=Lt._squarify)&&Kr.ratio===Tt)for(var Kr,Nr,dn,xr,Fr=-1,Zr,Cn=Kr.length,Dt=Lt.value;++Fr1?Lt:1)},Mt})(jt);e.cluster=l,e.hierarchy=w,e.pack=be,e.packEnclose=B,e.packSiblings=ne,e.partition=ze,e.stratify=Ke,e.tree=bt,e.treemap=fr,e.treemapBinary=Ot,e.treemapDice=Oe,e.treemapResquarify=Ct,e.treemapSlice=Yt,e.treemapSliceDice=cr,e.treemapSquarify=or,Object.defineProperty(e,"__esModule",{value:!0})})});var U6=fe(N6=>{"use strict";var L7e=O6(),nzt=aa(),Dw=Xt(),izt=js().makeColorScaleFuncFromTrace,azt=Lw().makePullColorFn,ozt=Lw().generateExtendedColors,szt=js().calc,lzt=Wa().ALMOST_EQUAL,uzt={},czt={},fzt={};N6.calc=function(e,t){var r=e._fullLayout,n=t.ids,a=Dw.isArrayOrTypedArray(n),i=t.labels,o=t.parents,s=t.values,l=Dw.isArrayOrTypedArray(s),u=[],c={},f={},v=function(j,q){c[j]?c[j].push(q):c[j]=[q],f[q]=1},g=function(j){return j||typeof j=="number"},p=function(j){return!l||nzt(s[j])&&s[j]>=0},x,_,y;a?(x=Math.min(n.length,o.length),_=function(j){return g(n[j])&&p(j)},y=function(j){return String(n[j])}):(x=Math.min(i.length,o.length),_=function(j){return g(i[j])&&p(j)},y=function(j){return String(i[j])}),l&&(x=Math.min(x,s.length));for(var C=0;C1){for(var T=Dw.randstr(),m=0;m{});function b1(){}function D7e(){return this.rgb().formatHex()}function xzt(){return this.rgb().formatHex8()}function _zt(){return N7e(this).formatHsl()}function R7e(){return this.rgb().formatRgb()}function cy(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=hzt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?I7e(t):r===3?new Xc(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?q9(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?q9(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=dzt.exec(e))?new Xc(t[1],t[2],t[3],1):(t=vzt.exec(e))?new Xc(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=pzt.exec(e))?q9(t[1],t[2],t[3],t[4]):(t=gzt.exec(e))?q9(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mzt.exec(e))?B7e(t[1],t[2]/100,t[3]/100,1):(t=yzt.exec(e))?B7e(t[1],t[2]/100,t[3]/100,t[4]):F7e.hasOwnProperty(e)?I7e(F7e[e]):e==="transparent"?new Xc(NaN,NaN,NaN,0):null}function I7e(e){return new Xc(e>>16&255,e>>8&255,e&255,1)}function q9(e,t,r,n){return n<=0&&(e=t=r=NaN),new Xc(e,t,r,n)}function G6(e){return e instanceof b1||(e=cy(e)),e?(e=e.rgb(),new Xc(e.r,e.g,e.b,e.opacity)):new Xc}function Iw(e,t,r,n){return arguments.length===1?G6(e):new Xc(e,t,r,n==null?1:n)}function Xc(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function z7e(){return`#${G2(this.r)}${G2(this.g)}${G2(this.b)}`}function bzt(){return`#${G2(this.r)}${G2(this.g)}${G2(this.b)}${G2((isNaN(this.opacity)?1:this.opacity)*255)}`}function q7e(){let e=O9(this.opacity);return`${e===1?"rgb(":"rgba("}${H2(this.r)}, ${H2(this.g)}, ${H2(this.b)}${e===1?")":`, ${e})`}`}function O9(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function H2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function G2(e){return e=H2(e),(e<16?"0":"")+e.toString(16)}function B7e(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Mp(e,t,r,n)}function N7e(e){if(e instanceof Mp)return new Mp(e.h,e.s,e.l,e.opacity);if(e instanceof b1||(e=cy(e)),!e)return new Mp;if(e instanceof Mp)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r0&&l<1?0:o,new Mp(o,s,l,e.opacity)}function H6(e,t,r,n){return arguments.length===1?N7e(e):new Mp(e,t,r,n==null?1:n)}function Mp(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function O7e(e){return e=(e||0)%360,e<0?e+360:e}function B9(e){return Math.max(0,Math.min(1,e||0))}function yW(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var uy,j2,Rw,V6,_1,hzt,dzt,vzt,pzt,gzt,mzt,yzt,F7e,N9=Co(()=>{z9();uy=.7,j2=1/uy,Rw="\\s*([+-]?\\d+)\\s*",V6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",_1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hzt=/^#([0-9a-f]{3,8})$/,dzt=new RegExp(`^rgb\\(${Rw},${Rw},${Rw}\\)$`),vzt=new RegExp(`^rgb\\(${_1},${_1},${_1}\\)$`),pzt=new RegExp(`^rgba\\(${Rw},${Rw},${Rw},${V6}\\)$`),gzt=new RegExp(`^rgba\\(${_1},${_1},${_1},${V6}\\)$`),mzt=new RegExp(`^hsl\\(${V6},${_1},${_1}\\)$`),yzt=new RegExp(`^hsla\\(${V6},${_1},${_1},${V6}\\)$`),F7e={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};wg(b1,cy,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:D7e,formatHex:D7e,formatHex8:xzt,formatHsl:_zt,formatRgb:R7e,toString:R7e});wg(Xc,Iw,ly(b1,{brighter(e){return e=e==null?j2:Math.pow(j2,e),new Xc(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new Xc(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xc(H2(this.r),H2(this.g),H2(this.b),O9(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:z7e,formatHex:z7e,formatHex8:bzt,formatRgb:q7e,toString:q7e}));wg(Mp,H6,ly(b1,{brighter(e){return e=e==null?j2:Math.pow(j2,e),new Mp(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new Mp(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Xc(yW(e>=240?e-240:e+120,a,n),yW(e,a,n),yW(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Mp(O7e(this.h),B9(this.s),B9(this.l),O9(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=O9(this.opacity);return`${e===1?"hsl(":"hsla("}${O7e(this.h)}, ${B9(this.s)*100}%, ${B9(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var U9,V9,xW=Co(()=>{U9=Math.PI/180,V9=180/Math.PI});function W7e(e){if(e instanceof w1)return new w1(e.l,e.a,e.b,e.opacity);if(e instanceof Tg)return Y7e(e);e instanceof Xc||(e=G6(e));var t=TW(e.r),r=TW(e.g),n=TW(e.b),a=_W((.2225045*t+.7168786*r+.0606169*n)/V7e),i,o;return t===r&&r===n?i=o=a:(i=_W((.4360747*t+.3850649*r+.1430804*n)/U7e),o=_W((.0139322*t+.0971045*r+.7141733*n)/G7e)),new w1(116*a-16,500*(i-a),200*(a-o),e.opacity)}function qw(e,t,r,n){return arguments.length===1?W7e(e):new w1(e,t,r,n==null?1:n)}function w1(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function _W(e){return e>wzt?Math.pow(e,1/3):e/j7e+H7e}function bW(e){return e>zw?e*e*e:j7e*(e-H7e)}function wW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function TW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Tzt(e){if(e instanceof Tg)return new Tg(e.h,e.c,e.l,e.opacity);if(e instanceof w1||(e=W7e(e)),e.a===0&&e.b===0)return new Tg(NaN,0{z9();N9();xW();G9=18,U7e=.96422,V7e=1,G7e=.82521,H7e=4/29,zw=6/29,j7e=3*zw*zw,wzt=zw*zw*zw;wg(w1,qw,ly(b1,{brighter(e){return new w1(this.l+G9*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new w1(this.l-G9*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=U7e*bW(t),e=V7e*bW(e),r=G7e*bW(r),new Xc(wW(3.1338561*t-1.6168667*e-.4906146*r),wW(-.9787684*t+1.9161415*e+.033454*r),wW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));wg(Tg,j6,ly(b1,{brighter(e){return new Tg(this.h,this.c,this.l+G9*(e==null?1:e),this.opacity)},darker(e){return new Tg(this.h,this.c,this.l-G9*(e==null?1:e),this.opacity)},rgb(){return Y7e(this).rgb()}}))});function Azt(e){if(e instanceof W2)return new W2(e.h,e.s,e.l,e.opacity);e instanceof Xc||(e=G6(e));var t=e.r/255,r=e.g/255,n=e.b/255,a=(K7e*n+Z7e*t-$7e*r)/(K7e+Z7e-$7e),i=n-a,o=(W6*(r-a)-MW*i)/H9,s=Math.sqrt(o*o+i*i)/(W6*a*(1-a)),l=s?Math.atan2(o,i)*V9-120:NaN;return new W2(l<0?l+360:l,s,a,e.opacity)}function Bw(e,t,r,n){return arguments.length===1?Azt(e):new W2(e,t,r,n==null?1:n)}function W2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var J7e,AW,MW,H9,W6,Z7e,$7e,K7e,Q7e=Co(()=>{z9();N9();xW();J7e=-.14861,AW=1.78277,MW=-.29227,H9=-.90649,W6=1.97294,Z7e=W6*H9,$7e=W6*AW,K7e=AW*MW-H9*J7e;wg(W2,Bw,ly(b1,{brighter(e){return e=e==null?j2:Math.pow(j2,e),new W2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new W2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*U9,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),a=Math.sin(e);return new Xc(255*(t+r*(J7e*n+AW*a)),255*(t+r*(MW*n+H9*a)),255*(t+r*(W6*n)),this.opacity)}}))});var Y2=Co(()=>{N9();X7e();Q7e()});function SW(e,t,r,n,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*r+(1+3*e+3*i-3*o)*n+o*a)/6}function j9(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),a=e[n],i=e[n+1],o=n>0?e[n-1]:2*a-i,s=n{});function Y9(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),a=e[(n+t-1)%t],i=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return SW((r-n/t)*t,a,i,o,s)}}var EW=Co(()=>{W9()});var Ow,kW=Co(()=>{Ow=e=>()=>e});function eLe(e,t){return function(r){return e+r*t}}function Mzt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function fy(e,t){var r=t-e;return r?eLe(e,r>180||r<-180?r-360*Math.round(r/360):r):Ow(isNaN(e)?t:e)}function tLe(e){return(e=+e)==1?yu:function(t,r){return r-t?Mzt(t,r,e):Ow(isNaN(t)?r:t)}}function yu(e,t){var r=t-e;return r?eLe(e,r):Ow(isNaN(e)?t:e)}var X2=Co(()=>{kW()});function rLe(e){return function(t){var r=t.length,n=new Array(r),a=new Array(r),i=new Array(r),o,s;for(o=0;o{Y2();W9();EW();X2();Y6=(function e(t){var r=tLe(t);function n(a,i){var o=r((a=Iw(a)).r,(i=Iw(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=yu(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=s(c),a.b=l(c),a.opacity=u(c),a+""}}return n.gamma=e,n})(1);nLe=rLe(j9),iLe=rLe(Y9)});function Nw(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a{});function aLe(e,t){return(X9(t)?Nw:LW)(e,t)}function LW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o{X6();Z9()});function $9(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var FW=Co(()=>{});function c0(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Z6=Co(()=>{});function K9(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=hy(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var DW=Co(()=>{X6()});function Szt(e){return function(){return e}}function Ezt(e){return function(t){return e(t)+""}}function J9(e,t){var r=IW.lastIndex=RW.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=IW.exec(e))&&(a=RW.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:c0(n,a)})),r=RW.lastIndex;return r{Z6();IW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,RW=new RegExp(IW.source,"g")});function hy(e,t){var r=typeof t,n;return t==null||r==="boolean"?Ow(t):(r==="number"?c0:r==="string"?(n=cy(t))?(t=n,Y6):J9:t instanceof cy?Y6:t instanceof Date?$9:X9(t)?Nw:Array.isArray(t)?LW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?K9:c0)(e,t)}var X6=Co(()=>{Y2();CW();PW();FW();Z6();DW();zW();kW();Z9()});function oLe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var sLe=Co(()=>{});function lLe(e,t){var r=fy(+e,+t);return function(n){var a=r(n);return a-360*Math.floor(a/360)}}var uLe=Co(()=>{X2()});function cLe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var fLe=Co(()=>{});function qW(e,t,r,n,a,i){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n{hLe=180/Math.PI,Q9={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function vLe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Q9:qW(t.a,t.b,t.c,t.d,t.e,t.f)}function pLe(e){return e==null?Q9:(eP||(eP=document.createElementNS("http://www.w3.org/2000/svg","g")),eP.setAttribute("transform",e),(e=eP.transform.baseVal.consolidate())?(e=e.matrix,qW(e.a,e.b,e.c,e.d,e.e,e.f)):Q9)}var eP,gLe=Co(()=>{dLe()});function mLe(e,t,r,n){function a(u){return u.length?u.pop()+" ":""}function i(u,c,f,v,g,p){if(u!==f||c!==v){var x=g.push("translate(",null,t,null,r);p.push({i:x-4,x:c0(u,f)},{i:x-2,x:c0(c,v)})}else(f||v)&&g.push("translate("+f+t+v+r)}function o(u,c,f,v){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),v.push({i:f.push(a(f)+"rotate(",null,n)-2,x:c0(u,c)})):c&&f.push(a(f)+"rotate("+c+n)}function s(u,c,f,v){u!==c?v.push({i:f.push(a(f)+"skewX(",null,n)-2,x:c0(u,c)}):c&&f.push(a(f)+"skewX("+c+n)}function l(u,c,f,v,g,p){if(u!==f||c!==v){var x=g.push(a(g)+"scale(",null,",",null,")");p.push({i:x-4,x:c0(u,f)},{i:x-2,x:c0(c,v)})}else(f!==1||v!==1)&&g.push(a(g)+"scale("+f+","+v+")")}return function(u,c){var f=[],v=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,v),o(u.rotate,c.rotate,f,v),s(u.skewX,c.skewX,f,v),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,v),u=c=null,function(g){for(var p=-1,x=v.length,_;++p{Z6();gLe();yLe=mLe(vLe,"px, ","px)","deg)"),xLe=mLe(pLe,", ",")",")")});function bLe(e){return((e=Math.exp(e))+1/e)/2}function Czt(e){return((e=Math.exp(e))-1/e)/2}function Lzt(e){return((e=Math.exp(2*e))-1)/(e+1)}var kzt,wLe,TLe=Co(()=>{kzt=1e-12;wLe=(function e(t,r,n){function a(i,o){var s=i[0],l=i[1],u=i[2],c=o[0],f=o[1],v=o[2],g=c-s,p=f-l,x=g*g+p*p,_,y;if(x{Y2();X2();MLe=ALe(fy),SLe=ALe(yu)});function BW(e,t){var r=yu((e=qw(e)).l,(t=qw(t)).l),n=yu(e.a,t.a),a=yu(e.b,t.b),i=yu(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=a(o),e.opacity=i(o),e+""}}var kLe=Co(()=>{Y2();X2()});function CLe(e){return function(t,r){var n=e((t=j6(t)).h,(r=j6(r)).h),a=yu(t.c,r.c),i=yu(t.l,r.l),o=yu(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=a(s),t.l=i(s),t.opacity=o(s),t+""}}}var LLe,PLe,FLe=Co(()=>{Y2();X2();LLe=CLe(fy),PLe=CLe(yu)});function DLe(e){return(function t(r){r=+r;function n(a,i){var o=e((a=Bw(a)).h,(i=Bw(i)).h),s=yu(a.s,i.s),l=yu(a.l,i.l),u=yu(a.opacity,i.opacity);return function(c){return a.h=o(c),a.s=s(c),a.l=l(Math.pow(c,r)),a.opacity=u(c),a+""}}return n.gamma=t,n})(1)}var RLe,ILe,zLe=Co(()=>{Y2();X2();RLe=DLe(fy),ILe=DLe(yu)});function OW(e,t){t===void 0&&(t=e,e=hy);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r{X6()});function BLe(e,t){for(var r=new Array(t),n=0;n{});var Z2={};zp(Z2,{interpolate:()=>hy,interpolateArray:()=>aLe,interpolateBasis:()=>j9,interpolateBasisClosed:()=>Y9,interpolateCubehelix:()=>RLe,interpolateCubehelixLong:()=>ILe,interpolateDate:()=>$9,interpolateDiscrete:()=>oLe,interpolateHcl:()=>LLe,interpolateHclLong:()=>PLe,interpolateHsl:()=>MLe,interpolateHslLong:()=>SLe,interpolateHue:()=>lLe,interpolateLab:()=>BW,interpolateNumber:()=>c0,interpolateNumberArray:()=>Nw,interpolateObject:()=>K9,interpolateRgb:()=>Y6,interpolateRgbBasis:()=>nLe,interpolateRgbBasisClosed:()=>iLe,interpolateRound:()=>cLe,interpolateString:()=>J9,interpolateTransformCss:()=>yLe,interpolateTransformSvg:()=>xLe,interpolateZoom:()=>wLe,piecewise:()=>OW,quantize:()=>BLe});var $2=Co(()=>{X6();PW();W9();EW();FW();sLe();uLe();Z6();Z9();DW();fLe();zW();_Le();TLe();CW();ELe();kLe();FLe();zLe();qLe();OLe()});var tP=fe((Hbr,NLe)=>{"use strict";var Pzt=ea(),Fzt=ni();NLe.exports=function(t,r,n,a,i){var o=r.data.data,s=o.i,l=i||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),Pzt.pointStyle(t,n,a,r)}else Fzt.fill(t,l)}});var NW=fe((jbr,jLe)=>{"use strict";var ULe=xi(),VLe=ni(),GLe=Xt(),Dzt=kh().resizeText,Rzt=tP();function Izt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");Dzt(e,t,"sunburst"),t.each(function(r){var n=ULe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){ULe.select(this).call(HLe,o,i,e)})})}function HLe(e,t,r,n){var a=t.data.data,i=!t.children,o=a.i,s=GLe.castOption(r,o,"marker.line.color")||VLe.defaultLine,l=GLe.castOption(r,o,"marker.line.width")||0;e.call(Rzt,t,r,n).style("stroke-width",l).call(VLe.stroke,s).style("opacity",i?r.leaf.opacity:null)}jLe.exports={style:Izt,styleOne:HLe}});var Ag=fe(to=>{"use strict";var K2=Xt(),zzt=ni(),qzt=np(),WLe=Sm();to.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(to.getPtId(n)===t)return r=n.copy()}),r||e};to.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var a=n.children||[],i=0;i0)};to.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};to.isHeader=function(e,t){return!(to.isLeaf(e)||e.depth===t._maxDepth-1)};function YLe(e){return e.data.data.pid}to.getParent=function(e,t){return to.findEntryWithLevel(e,YLe(t))};to.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return to.listPath(r,t).concat(n)};to.getPath=function(e){return to.listPath(e,"label").join("/")+"/"};to.formatValue=WLe.formatPieValue;to.formatPercent=function(e,t){var r=K2.formatPercent(e,0);return r==="0%"&&(r=WLe.formatPiePercent(e,t)),r}});var J6=fe((Ybr,$Le)=>{"use strict";var Uw=xi(),XLe=bi(),Nzt=Sd().appendArrayPointValue,$6=kl(),ZLe=Xt(),Uzt=Rb(),Sc=Ag(),Vzt=Sm(),Gzt=Vzt.formatPieValue;$Le.exports=function(t,r,n,a,i){var o=a[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(p){var x=n._fullLayout;if(!(n._dragging||x.hovermode===!1)){var _=n._fullData[s.index],y=p.data.data,C=y.i,k=Sc.isHierarchyRoot(p),S=Sc.getParent(l,p),L=Sc.getValue(p),w=function(ye){return ZLe.castOption(_,C,ye)},A=w("hovertemplate"),T=$6.castHoverinfo(_,x,C),m=x.separators,F;if(A||T&&T!=="none"&&T!=="skip"){var E,I;u&&(E=o.cx+p.pxmid[0]*(1-p.rInscribed),I=o.cy+p.pxmid[1]*(1-p.rInscribed)),c&&(E=p._hoverX,I=p._hoverY);var R={},B=[],O=[],V=function(ye){return B.indexOf(ye)!==-1};T&&(B=T==="all"?_._module.attributes.hoverinfo.flags:T.split("+")),R.label=y.label,V("label")&&R.label&&O.push(R.label),y.hasOwnProperty("v")&&(R.value=y.v,R.valueLabel=Gzt(R.value,m),V("value")&&O.push(R.valueLabel)),R.currentPath=p.currentPath=Sc.getPath(p.data),V("current path")&&!k&&O.push(R.currentPath);var j,q=[],U=function(){q.indexOf(j)===-1&&(O.push(j),q.push(j))};R.percentParent=p.percentParent=L/Sc.getValue(S),R.parent=p.parentString=Sc.getPtLabel(S),V("percent parent")&&(j=Sc.formatPercent(R.percentParent,m)+" of "+R.parent,U()),R.percentEntry=p.percentEntry=L/Sc.getValue(r),R.entry=p.entry=Sc.getPtLabel(r),V("percent entry")&&!k&&!p.onPathbar&&(j=Sc.formatPercent(R.percentEntry,m)+" of "+R.entry,U()),R.percentRoot=p.percentRoot=L/Sc.getValue(l),R.root=p.root=Sc.getPtLabel(l),V("percent root")&&!k&&(j=Sc.formatPercent(R.percentRoot,m)+" of "+R.root,U()),R.text=w("hovertext")||w("text"),V("text")&&(j=R.text,ZLe.isValidTextValue(j)&&O.push(j)),F=[K6(p,_,i.eventDataKeys)];var J={trace:_,y:I,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:O.join("
"),name:A||V("name")?_.name:void 0,color:w("hoverlabel.bgcolor")||y.color,borderColor:w("hoverlabel.bordercolor"),fontFamily:w("hoverlabel.font.family"),fontSize:w("hoverlabel.font.size"),fontColor:w("hoverlabel.font.color"),fontWeight:w("hoverlabel.font.weight"),fontStyle:w("hoverlabel.font.style"),fontVariant:w("hoverlabel.font.variant"),nameLength:w("hoverlabel.namelength"),textAlign:w("hoverlabel.align"),hovertemplate:A,hovertemplateLabels:R,eventData:F};u&&(J.x0=E-p.rInscribed*p.rpx1,J.x1=E+p.rInscribed*p.rpx1,J.idealAlign=p.pxmid[0]<0?"left":"right"),c&&(J.x=E,J.idealAlign=E<0?"left":"right");var ee=[];$6.loneHover(J,{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:n,inOut_bbox:ee}),F[0].bbox=ee[0],s._hasHoverLabel=!0}if(c){var ce=t.select("path.surface");i.styleOne(ce,p,_,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:F||[K6(p,_,i.eventDataKeys)],event:Uw.event})}},v=function(p){var x=n._fullLayout,_=n._fullData[s.index],y=Uw.select(this).datum();if(s._hasHoverEvent&&(p.originalEvent=Uw.event,n.emit("plotly_unhover",{points:[K6(y,_,i.eventDataKeys)],event:Uw.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&($6.loneUnhover(x._hoverlayer.node()),s._hasHoverLabel=!1),c){var C=t.select("path.surface");i.styleOne(C,y,_,n,{hovered:!1})}},g=function(p){var x=n._fullLayout,_=n._fullData[s.index],y=u&&(Sc.isHierarchyRoot(p)||Sc.isLeaf(p)),C=Sc.getPtId(p),k=Sc.isEntry(p)?Sc.findEntryWithChild(l,C):Sc.findEntryWithLevel(l,C),S=Sc.getPtId(k),L={points:[K6(p,_,i.eventDataKeys)],event:Uw.event};y||(L.nextLevel=S);var w=Uzt.triggerHandler(n,"plotly_"+s.type+"click",L);if(w!==!1&&x.hovermode&&(n._hoverdata=[K6(p,_,i.eventDataKeys)],$6.click(n,Uw.event)),!y&&w!==!1&&!n._dragging&&!n._transitioning){XLe.call("_storeDirectGUIEdit",_,x._tracePreGUI[_.uid],{level:_.level});var A={data:[{level:S}],traces:[s.index]},T={frame:{redraw:!1,duration:i.transitionTime},transition:{duration:i.transitionTime,easing:i.transitionEasing},mode:"immediate",fromcurrent:!0};$6.loneUnhover(x._hoverlayer.node()),XLe.call("animate",n,A,T)}};t.on("mouseover",f),t.on("mouseout",v),t.on("click",g)};function K6(e,t,r){for(var n=e.data.data,a={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},i=0;i{"use strict";var Q6=xi(),Hzt=O6(),Sp=($2(),Gs(Z2)).interpolate,KLe=ea(),Fh=Xt(),jzt=as(),t9e=kh(),JLe=t9e.recordMinTextSize,Wzt=t9e.clearMinTextSize,r9e=R9(),Yzt=Sm().getRotationAngle,Xzt=r9e.computeTransform,Zzt=r9e.transformInsideText,$zt=NW().styleOne,Kzt=_v().resizeText,Jzt=J6(),UW=gW(),Po=Ag();rP.plot=function(e,t,r,n){var a=e._fullLayout,i=a._sunburstlayer,o,s,l=!r,u=!a.uniformtext.mode&&Po.hasTransition(r);if(Wzt("sunburst",a),o=i.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){n&&(s=n());var c=Q6.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){i.selectAll("g.trace").each(function(f){QLe(e,f,this,r)})})}else o.each(function(f){QLe(e,f,this,r)}),a.uniformtext.mode&&Kzt(e,a._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function QLe(e,t,r,n){var a=e._context.staticPlot,i=e._fullLayout,o=!i.uniformtext.mode&&Po.hasTransition(n),s=Q6.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,v=Po.findEntryWithLevel(f,c.level),g=Po.getMaxDepth(c),p=i._size,x=c.domain,_=p.w*(x.x[1]-x.x[0]),y=p.h*(x.y[1]-x.y[0]),C=.5*Math.min(_,y),k=u.cx=p.l+p.w*(x.x[1]+x.x[0])/2,S=u.cy=p.t+p.h*(1-x.y[0])-y/2;if(!v)return l.remove();var L=null,w={};o&&l.each(function(ue){w[Po.getPtId(ue)]={rpx0:ue.rpx0,rpx1:ue.rpx1,x0:ue.x0,x1:ue.x1,transform:ue.transform},!L&&Po.isEntry(ue)&&(L=ue)});var A=Qzt(v).descendants(),T=v.height+1,m=0,F=g;u.hasMultipleRoots&&Po.isHierarchyRoot(v)&&(A=A.slice(1),T-=1,m=1,F+=1),A=A.filter(function(ue){return ue.y1<=F});var E=Yzt(c.rotation);E&&A.forEach(function(ue){ue.x0+=E,ue.x1+=E});var I=Math.min(T,g),R=function(ue){return(ue-m)/I*C},B=function(ue,K){return[ue*Math.cos(K),-ue*Math.sin(K)]},O=function(ue){return Fh.pathAnnulus(ue.rpx0,ue.rpx1,ue.x0,ue.x1,k,S)},V=function(ue){return k+e9e(ue)[0]*(ue.transform.rCenter||0)+(ue.transform.x||0)},j=function(ue){return S+e9e(ue)[1]*(ue.transform.rCenter||0)+(ue.transform.y||0)};l=l.data(A,Po.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var ue=Q6.select(this),K=ue.select("path.surface");K.transition().attrTween("d",function(ne){var ae=ee(ne);return function(pe){return O(ae(pe))}});var _e=ue.select("g.slicetext");_e.attr("opacity",0)}).remove():l.exit().remove(),l.order();var q=null;if(o&&L){var U=Po.getPtId(L);l.each(function(ue){q===null&&Po.getPtId(ue)===U&&(q=ue.x1)})}var J=l;o&&(J=J.transition().each("end",function(){var ue=Q6.select(this);Po.setSliceCursor(ue,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),J.each(function(ue){var K=Q6.select(this),_e=Fh.ensureSingle(K,"path","surface",function(me){me.style("pointer-events",a?"none":"all")});ue.rpx0=R(ue.y0),ue.rpx1=R(ue.y1),ue.xmid=(ue.x0+ue.x1)/2,ue.pxmid=B(ue.rpx1,ue.xmid),ue.midangle=-(ue.xmid-Math.PI/2),ue.startangle=-(ue.x0-Math.PI/2),ue.stopangle=-(ue.x1-Math.PI/2),ue.halfangle=.5*Math.min(Fh.angleDelta(ue.x0,ue.x1)||Math.PI,Math.PI),ue.ring=1-ue.rpx0/ue.rpx1,ue.rInscribed=eqt(ue,c),o?_e.transition().attrTween("d",function(me){var be=ce(me);return function(De){return O(be(De))}}):_e.attr("d",O),K.call(Jzt,v,e,t,{eventDataKeys:UW.eventDataKeys,transitionTime:UW.CLICK_TRANSITION_TIME,transitionEasing:UW.CLICK_TRANSITION_EASING}).call(Po.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),_e.call($zt,ue,c,e);var ne=Fh.ensureSingle(K,"g","slicetext"),ae=Fh.ensureSingle(ne,"text","",function(me){me.attr("data-notex",1)}),pe=Fh.ensureUniformFontSize(e,Po.determineTextFont(c,ue,i.font));ae.text(rP.formatSliceLabel(ue,v,c,t,i)).classed("slicetext",!0).attr("text-anchor","middle").call(KLe.font,pe).call(jzt.convertToTspans,e);var ie=KLe.bBox(ae.node());ue.transform=Zzt(ie,ue,u),ue.transform.targetX=V(ue),ue.transform.targetY=j(ue);var le=function(me,be){var De=me.transform;return Xzt(De,be),De.fontSize=pe.size,JLe(c.type,De,i),Fh.getTextTransform(De)};o?ae.transition().attrTween("transform",function(me){var be=ye(me);return function(De){return le(be(De),ie)}}):ae.attr("transform",le(ue,ie))});function ee(ue){var K=Po.getPtId(ue),_e=w[K],ne=w[Po.getPtId(v)],ae;if(ne){var pe=(ue.x1>ne.x1?2*Math.PI:0)+E;ae=ue.rpx1q?2*Math.PI:0)+E;_e={x0:ae,x1:ae}}else _e={rpx0:C,rpx1:C},Fh.extendFlat(_e,xe(ue));else _e={rpx0:0,rpx1:0};else _e={x0:E,x1:E};return Sp(_e,ne)}function ye(ue){var K=w[Po.getPtId(ue)],_e,ne=ue.transform;if(K)_e=K;else if(_e={rpx1:ue.rpx1,transform:{textPosAngle:ne.textPosAngle,scale:0,rotate:ne.rotate,rCenter:ne.rCenter,x:ne.x,y:ne.y}},L)if(ue.parent)if(q){var ae=ue.x1>q?2*Math.PI:0;_e.x0=_e.x1=ae}else Fh.extendFlat(_e,xe(ue));else _e.x0=_e.x1=E;else _e.x0=_e.x1=E;var pe=Sp(_e.transform.textPosAngle,ue.transform.textPosAngle),ie=Sp(_e.rpx1,ue.rpx1),le=Sp(_e.x0,ue.x0),me=Sp(_e.x1,ue.x1),be=Sp(_e.transform.scale,ne.scale),De=Sp(_e.transform.rotate,ne.rotate),Ge=ne.rCenter===0?3:_e.transform.rCenter===0?1/3:1,ht=Sp(_e.transform.rCenter,ne.rCenter),it=function(Oe){return ht(Math.pow(Oe,Ge))};return function(Oe){var ze=ie(Oe),ct=le(Oe),et=me(Oe),qe=it(Oe),we=B(ze,(ct+et)/2),Le=pe(Oe),Ke={pxmid:we,rpx1:ze,transform:{textPosAngle:Le,rCenter:qe,x:ne.x,y:ne.y}};return JLe(c.type,ne,i),{transform:{targetX:V(Ke),targetY:j(Ke),scale:be(Oe),rotate:De(Oe),rCenter:qe}}}}function xe(ue){var K=ue.parent,_e=w[Po.getPtId(K)],ne={};if(_e){var ae=K.children,pe=ae.indexOf(ue),ie=ae.length,le=Sp(_e.x0,_e.x1);ne.x0=le(pe/ie),ne.x1=le(pe/ie)}else ne.x0=ne.x1=0;return ne}}function Qzt(e){return Hzt.partition().size([2*Math.PI,e.height+1])(e)}rP.formatSliceLabel=function(e,t,r,n,a){var i=r.texttemplate,o=r.textinfo;if(!i&&(!o||o==="none"))return"";var s=a.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Po.isHierarchyRoot(e),v=Po.getParent(c,e),g=Po.getValue(e);if(!i){var p=o.split("+"),x=function(m){return p.indexOf(m)!==-1},_=[],y;if(x("label")&&u.label&&_.push(u.label),u.hasOwnProperty("v")&&x("value")&&_.push(Po.formatValue(u.v,s)),!f){x("current path")&&_.push(Po.getPath(e.data));var C=0;x("percent parent")&&C++,x("percent entry")&&C++,x("percent root")&&C++;var k=C>1;if(C){var S,L=function(m){y=Po.formatPercent(S,s),k&&(y+=" of "+m),_.push(y)};x("percent parent")&&!f&&(S=g/Po.getValue(v),L("parent")),x("percent entry")&&(S=g/Po.getValue(t),L("entry")),x("percent root")&&(S=g/Po.getValue(c),L("root"))}}return x("text")&&(y=Fh.castOption(r,u.i,"text"),Fh.isValidTextValue(y)&&_.push(y)),_.join("
")}var w=Fh.castOption(r,u.i,"texttemplate");if(!w)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=Po.formatValue(u.v,s)),A.currentPath=Po.getPath(e.data),f||(A.percentParent=g/Po.getValue(v),A.percentParentLabel=Po.formatPercent(A.percentParent,s),A.parent=Po.getPtLabel(v)),A.percentEntry=g/Po.getValue(t),A.percentEntryLabel=Po.formatPercent(A.percentEntry,s),A.entry=Po.getPtLabel(t),A.percentRoot=g/Po.getValue(c),A.percentRootLabel=Po.formatPercent(A.percentRoot,s),A.root=Po.getPtLabel(c),u.hasOwnProperty("color")&&(A.color=u.color);var T=Fh.castOption(r,u.i,"text");return(Fh.isValidTextValue(T)||T==="")&&(A.text=T),A.customdata=Fh.castOption(r,u.i,"customdata"),Fh.texttemplateString({data:[A,r._meta],fallback:r.texttemplatefallback,labels:A,locale:a._d3locale,template:w})};function eqt(e){return e.rpx0===0&&Fh.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function e9e(e){return tqt(e.rpx1,e.transform.textPosAngle)}function tqt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var i9e=fe((Zbr,n9e)=>{"use strict";n9e.exports={moduleType:"trace",name:"sunburst",basePlotModule:m7e(),categories:[],animatable:!0,attributes:B6(),layoutAttributes:mW(),supplyDefaults:S7e(),supplyLayoutDefaults:k7e(),calc:U6().calc,crossTraceCalc:U6().crossTraceCalc,plot:nP().plot,style:NW().style,colorbar:Zf(),meta:{}}});var o9e=fe(($br,a9e)=>{"use strict";a9e.exports=i9e()});var l9e=fe(Vw=>{"use strict";var s9e=Hs();Vw.name="treemap";Vw.plot=function(e,t,r,n){s9e.plotBasePlot(Vw.name,e,t,r,n)};Vw.clean=function(e,t,r,n){s9e.cleanBasePlot(Vw.name,e,t,r,n)}});var J2=fe((Jbr,u9e)=>{"use strict";u9e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var iP=fe((Qbr,h9e)=>{"use strict";var{hovertemplateAttrs:rqt,texttemplateAttrs:nqt,templatefallbackAttrs:c9e}=Oo(),iqt=_s(),aqt=nl().attributes,Q2=U2(),Dv=B6(),f9e=J2(),VW=ta().extendFlat,oqt=Uc().pattern;h9e.exports={labels:Dv.labels,parents:Dv.parents,values:Dv.values,branchvalues:Dv.branchvalues,count:Dv.count,level:Dv.level,maxdepth:Dv.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:VW({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:Dv.marker.colors,pattern:oqt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Dv.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},iqt("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:VW({},Q2.textfont,{}),editType:"calc"},text:Q2.text,textinfo:Dv.textinfo,texttemplate:nqt({editType:"plot"},{keys:f9e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:c9e({editType:"plot"}),hovertext:Q2.hovertext,hoverinfo:Dv.hoverinfo,hovertemplate:rqt({},{keys:f9e.eventDataKeys}),hovertemplatefallback:c9e(),textfont:Q2.textfont,insidetextfont:Q2.insidetextfont,outsidetextfont:VW({},Q2.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:Q2.sort,root:Dv.root,domain:aqt({name:"treemap",trace:!0,editType:"calc"})}});var GW=fe((e3r,d9e)=>{"use strict";d9e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var m9e=fe((t3r,g9e)=>{"use strict";var v9e=Xt(),sqt=iP(),lqt=ni(),uqt=nl().defaults,cqt=z0().handleText,fqt=Im().TEXTPAD,hqt=V2().handleMarkerDefaults,p9e=js(),dqt=p9e.hasColorscale,vqt=p9e.handleDefaults;g9e.exports=function(t,r,n,a){function i(_,y){return v9e.coerce(t,r,sqt,_,y)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth");var u=i("tiling.packing");u==="squarify"&&i("tiling.squarifyratio"),i("tiling.flip"),i("tiling.pad");var c=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",v9e.isArrayOrTypedArray(c)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f=i("pathbar.visible"),v="auto";cqt(t,r,a,i,v,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("textposition");var g=r.textposition.indexOf("bottom")!==-1;hqt(t,r,a,i);var p=r._hasColorscale=dqt(t,"marker","colors")||(t.marker||{}).coloraxis;p?vqt(t,r,a,i,{prefix:"marker.",cLetter:"c"}):i("marker.depthfade",!(r.marker.colors||[]).length);var x=r.textfont.size*2;i("marker.pad.t",g?x/4:x),i("marker.pad.l",x/4),i("marker.pad.r",x/4),i("marker.pad.b",g?x:x/4),i("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:lqt.contrast(a.paper_bgcolor)}}},f&&(i("pathbar.thickness",r.pathbar.textfont.size+2*fqt),i("pathbar.side"),i("pathbar.edgeshape")),i("sort"),i("root.color"),uqt(r,a,i),r._length=null}});var x9e=fe((r3r,y9e)=>{"use strict";var pqt=Xt(),gqt=GW();y9e.exports=function(t,r){function n(a,i){return pqt.coerce(t,r,gqt,a,i)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var jW=fe(HW=>{"use strict";var _9e=U6();HW.calc=function(e,t){return _9e.calc(e,t)};HW.crossTraceCalc=function(e){return _9e._runCrossTraceCalc("treemap",e)}});var WW=fe((i3r,b9e)=>{"use strict";b9e.exports=function e(t,r,n){var a;n.swapXY&&(a=t.x0,t.x0=t.y0,t.y0=a,a=t.x1,t.x1=t.y1,t.y1=a),n.flipX&&(a=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-a),n.flipY&&(a=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-a);var i=t.children;if(i)for(var o=0;o{"use strict";var Gw=O6(),mqt=WW();w9e.exports=function(t,r,n){var a=n.flipX,i=n.flipY,o=n.packing==="dice-slice",s=n.pad[i?"bottom":"top"],l=n.pad[a?"right":"left"],u=n.pad[a?"left":"right"],c=n.pad[i?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var v=Gw.treemap().tile(yqt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||a||i)&&mqt(v,r,{swapXY:o,flipX:a,flipY:i}),v};function yqt(e,t){switch(e){case"squarify":return Gw.treemapSquarify.ratio(t);case"binary":return Gw.treemapBinary;case"dice":return Gw.treemapDice;case"slice":return Gw.treemapSlice;default:return Gw.treemapSliceDice}}});var aP=fe((o3r,S9e)=>{"use strict";var T9e=xi(),Hw=ni(),A9e=Xt(),XW=Ag(),xqt=kh().resizeText,_qt=tP();function bqt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");xqt(e,t,"treemap"),t.each(function(r){var n=T9e.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){T9e.select(this).call(M9e,o,i,e,{hovered:!1})})})}function M9e(e,t,r,n,a){var i=(a||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=XW.isHierarchyRoot(t),v=1;if(i)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)v=100,l="rgba(0,0,0,0)",u=0;else if(l=A9e.castOption(r,s,"marker.line.color")||Hw.defaultLine,u=A9e.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var g=r.marker.depthfade;if(g){var p=Hw.combine(Hw.addOpacity(r._backgroundColor,.75),c),x;if(g===!0){var _=XW.getMaxDepth(r);isFinite(_)?XW.isLeaf(t)?x=0:x=r._maxVisibleLayers-(t.data.depth-r._entryDepth):x=t.data.height+1}else x=t.data.depth-r._entryDepth,r._atRootLevel||x++;if(x>0)for(var y=0;y{"use strict";var E9e=xi(),oP=Xt(),k9e=ea(),wqt=as(),Tqt=YW(),C9e=aP().styleOne,ZW=J2(),jw=Ag(),Aqt=J6(),$W=!0;L9e.exports=function(t,r,n,a,i){var o=i.barDifY,s=i.width,l=i.height,u=i.viewX,c=i.viewY,f=i.pathSlice,v=i.toMoveInsideSlice,g=i.strTransform,p=i.hasTransition,x=i.handleSlicesExit,_=i.makeUpdateSliceInterpolator,y=i.makeUpdateTextInterpolator,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,A=L.hierarchy,T=s/w._entryDepth,m=jw.listPath(n.data,"id"),F=Tqt(A.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();F=F.filter(function(I){var R=m.indexOf(I.data.id);return R===-1?!1:(I.x0=T*R,I.x1=T*(R+1),I.y0=o,I.y1=o+l,I.onPathbar=!0,!0)}),F.reverse(),a=a.data(F,jw.getPtId),a.enter().append("g").classed("pathbar",!0),x(a,$W,C,[s,l],f),a.order();var E=a;p&&(E=E.transition().each("end",function(){var I=E9e.select(this);jw.setSliceCursor(I,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),E.each(function(I){I._x0=u(I.x0),I._x1=u(I.x1),I._y0=c(I.y0),I._y1=c(I.y1),I._hoverX=u(I.x1-Math.min(s,l)/2),I._hoverY=c(I.y1-l/2);var R=E9e.select(this),B=oP.ensureSingle(R,"path","surface",function(q){q.style("pointer-events",k?"none":"all")});p?B.transition().attrTween("d",function(q){var U=_(q,$W,C,[s,l]);return function(J){return f(U(J))}}):B.attr("d",f),R.call(Aqt,n,t,r,{styleOne:C9e,eventDataKeys:ZW.eventDataKeys,transitionTime:ZW.CLICK_TRANSITION_TIME,transitionEasing:ZW.CLICK_TRANSITION_EASING}).call(jw.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),B.call(C9e,I,w,t,{hovered:!1}),I._text=(jw.getPtLabel(I)||"").split("
").join(" ")||"";var O=oP.ensureSingle(R,"g","slicetext"),V=oP.ensureSingle(O,"text","",function(q){q.attr("data-notex",1)}),j=oP.ensureUniformFontSize(t,jw.determineTextFont(w,I,S.font,{onPathbar:!0}));V.text(I._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(k9e.font,j).call(wqt.convertToTspans,t),I.textBB=k9e.bBox(V.node()),I.transform=v(I,{fontSize:j.size,onPathbar:!0}),I.transform.fontSize=j.size,p?V.transition().attrTween("transform",function(q){var U=y(q,$W,C,[s,l]);return function(J){return g(U(J))}}):V.attr("transform",g(I))})}});var I9e=fe((l3r,R9e)=>{"use strict";var F9e=xi(),KW=($2(),Gs(Z2)).interpolate,dy=Ag(),eM=Xt(),D9e=Im().TEXTPAD,Mqt=m2(),Sqt=Mqt.toMoveInsideBar,Eqt=kh(),JW=Eqt.recordMinTextSize,kqt=J2(),Cqt=P9e();function e_(e){return dy.isHierarchyRoot(e)?"":dy.getPtId(e)}R9e.exports=function(t,r,n,a,i){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,v=dy.findEntryWithLevel(f,l.level),g=F9e.select(n),p=g.selectAll("g.pathbar"),x=g.selectAll("g.slice");if(!v){p.remove(),x.remove();return}var _=dy.isHierarchyRoot(v),y=!o.uniformtext.mode&&dy.hasTransition(a),C=dy.getMaxDepth(l),k=function(Te){return Te.data.depth-v.data.depth-1?A+F:-(m+F):0,I={x0:T,x1:T,y0:E,y1:E+m},R=function(Te,Ve,$e){var ot=l.tiling.pad,tt=function(bt){return bt-ot<=Ve.x0},nt=function(bt){return bt+ot>=Ve.x1},We=function(bt){return bt-ot<=Ve.y0},mt=function(bt){return bt+ot>=Ve.y1};return Te.x0===Ve.x0&&Te.x1===Ve.x1&&Te.y0===Ve.y0&&Te.y1===Ve.y1?{x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1}:{x0:tt(Te.x0-ot)?0:nt(Te.x0-ot)?$e[0]:Te.x0,x1:tt(Te.x1+ot)?0:nt(Te.x1+ot)?$e[0]:Te.x1,y0:We(Te.y0-ot)?0:mt(Te.y0-ot)?$e[1]:Te.y0,y1:We(Te.y1+ot)?0:mt(Te.y1+ot)?$e[1]:Te.y1}},B=null,O={},V={},j=null,q=function(Te,Ve){return Ve?O[e_(Te)]:V[e_(Te)]},U=function(Te,Ve,$e,ot){if(Ve)return O[e_(f)]||I;var tt=V[l.level]||$e;return k(Te)?R(Te,tt,ot):{}};s.hasMultipleRoots&&_&&C++,l._maxDepth=C,l._backgroundColor=o.paper_bgcolor,l._entryDepth=v.data.depth,l._atRootLevel=_;var J=-w/2+S.l+S.w*(L.x[1]+L.x[0])/2,ee=-A/2+S.t+S.h*(1-(L.y[1]+L.y[0])/2),ce=function(Te){return J+Te},ye=function(Te){return ee+Te},xe=ye(0),ue=ce(0),K=function(Te){return ue+Te},_e=function(Te){return xe+Te};function ne(Te,Ve){return Te+","+Ve}var ae=K(0),pe=function(Te){Te.x=Math.max(ae,Te.x)},ie=l.pathbar.edgeshape,le=function(Te){var Ve=K(Math.max(Math.min(Te.x0,Te.x0),0)),$e=K(Math.min(Math.max(Te.x1,Te.x1),T)),ot=_e(Te.y0),tt=_e(Te.y1),nt=m/2,We={},mt={};We.x=Ve,mt.x=$e,We.y=mt.y=(ot+tt)/2;var bt={x:Ve,y:ot},Yt={x:$e,y:ot},jt={x:$e,y:tt},mr={x:Ve,y:tt};return ie===">"?(bt.x-=nt,Yt.x-=nt,jt.x-=nt,mr.x-=nt):ie==="/"?(jt.x-=nt,mr.x-=nt,We.x-=nt/2,mt.x-=nt/2):ie==="\\"?(bt.x-=nt,Yt.x-=nt,We.x-=nt/2,mt.x-=nt/2):ie==="<"&&(We.x-=nt,mt.x-=nt),pe(bt),pe(mr),pe(We),pe(Yt),pe(jt),pe(mt),"M"+ne(bt.x,bt.y)+"L"+ne(Yt.x,Yt.y)+"L"+ne(mt.x,mt.y)+"L"+ne(jt.x,jt.y)+"L"+ne(mr.x,mr.y)+"L"+ne(We.x,We.y)+"Z"},me=l[c?"tiling":"marker"].pad,be=function(Te){return l.textposition.indexOf(Te)!==-1},De=be("top"),Ge=be("left"),ht=be("right"),it=be("bottom"),Oe=function(Te){var Ve=ce(Te.x0),$e=ce(Te.x1),ot=ye(Te.y0),tt=ye(Te.y1),nt=$e-Ve,We=tt-ot;if(!nt||!We)return"";var mt=l.marker.cornerradius||0,bt=Math.min(mt,nt/2,We/2);bt&&Te.data&&Te.data.data&&Te.data.data.label&&(De&&(bt=Math.min(bt,me.t)),Ge&&(bt=Math.min(bt,me.l)),ht&&(bt=Math.min(bt,me.r)),it&&(bt=Math.min(bt,me.b)));var Yt=function(jt,mr){return bt?"a"+ne(bt,bt)+" 0 0 1 "+ne(jt,mr):""};return"M"+ne(Ve,ot+bt)+Yt(bt,-bt)+"L"+ne($e-bt,ot)+Yt(bt,bt)+"L"+ne($e,tt-bt)+Yt(-bt,bt)+"L"+ne(Ve+bt,tt)+Yt(-bt,-bt)+"Z"},ze=function(Te,Ve){var $e=Te.x0,ot=Te.x1,tt=Te.y0,nt=Te.y1,We=Te.textBB,mt=De||Ve.isHeader&&!it,bt=mt?"start":it?"end":"middle",Yt=be("right"),jt=be("left")||Ve.onPathbar,mr=jt?-1:Yt?1:0;if(Ve.isHeader){if($e+=(c?me:me.l)-D9e,ot-=(c?me:me.r)-D9e,$e>=ot){var or=($e+ot)/2;$e=or,ot=or}var fr;it?(fr=nt-(c?me:me.b),tt{"use strict";var Lqt=xi(),Pqt=Ag(),Fqt=kh(),Dqt=Fqt.clearMinTextSize,Rqt=_v().resizeText,z9e=I9e();q9e.exports=function(t,r,n,a,i){var o=i.type,s=i.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,v=!n;if(Dqt(o,l),c=u.selectAll("g.trace."+o).data(r,function(p){return p[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&Pqt.hasTransition(n)){a&&(f=a());var g=Lqt.transition().duration(n.duration).ease(n.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});g.each(function(){u.selectAll("g.trace").each(function(p){z9e(t,p,this,n,s)})})}else c.each(function(p){z9e(t,p,this,n,s)}),l.uniformtext.mode&&Rqt(t,u.selectAll(".trace"),o);v&&c.exit().remove()}});var V9e=fe((c3r,U9e)=>{"use strict";var B9e=xi(),sP=Xt(),O9e=ea(),Iqt=as(),zqt=YW(),N9e=aP().styleOne,eY=J2(),vy=Ag(),qqt=J6(),Bqt=nP().formatSliceLabel,tY=!1;U9e.exports=function(t,r,n,a,i){var o=i.width,s=i.height,l=i.viewX,u=i.viewY,c=i.pathSlice,f=i.toMoveInsideSlice,v=i.strTransform,g=i.hasTransition,p=i.handleSlicesExit,x=i.makeUpdateSliceInterpolator,_=i.makeUpdateTextInterpolator,y=i.prevEntry,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,A=w.textposition.indexOf("left")!==-1,T=w.textposition.indexOf("right")!==-1,m=w.textposition.indexOf("bottom")!==-1,F=!m&&!w.marker.pad.t||m&&!w.marker.pad.b,E=zqt(n,[o,s],{packing:w.tiling.packing,squarifyratio:w.tiling.squarifyratio,flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1,pad:{inner:w.tiling.pad,top:w.marker.pad.t,left:w.marker.pad.l,right:w.marker.pad.r,bottom:w.marker.pad.b}}),I=E.descendants(),R=1/0,B=-1/0;I.forEach(function(U){var J=U.depth;J>=w._maxDepth?(U.x0=U.x1=(U.x0+U.x1)/2,U.y0=U.y1=(U.y0+U.y1)/2):(R=Math.min(R,J),B=Math.max(B,J))}),a=a.data(I,vy.getPtId),w._maxVisibleLayers=isFinite(B)?B-R+1:0,a.enter().append("g").classed("slice",!0),p(a,tY,C,[o,s],c),a.order();var O=null;if(g&&y){var V=vy.getPtId(y);a.each(function(U){O===null&&vy.getPtId(U)===V&&(O={x0:U.x0,x1:U.x1,y0:U.y0,y1:U.y1})})}var j=function(){return O||{x0:0,x1:o,y0:0,y1:s}},q=a;return g&&(q=q.transition().each("end",function(){var U=B9e.select(this);vy.setSliceCursor(U,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(U){var J=vy.isHeader(U,w);U._x0=l(U.x0),U._x1=l(U.x1),U._y0=u(U.y0),U._y1=u(U.y1),U._hoverX=l(U.x1-w.marker.pad.r),U._hoverY=u(m?U.y1-w.marker.pad.b/2:U.y0+w.marker.pad.t/2);var ee=B9e.select(this),ce=sP.ensureSingle(ee,"path","surface",function(ne){ne.style("pointer-events",k?"none":"all")});g?ce.transition().attrTween("d",function(ne){var ae=x(ne,tY,j(),[o,s]);return function(pe){return c(ae(pe))}}):ce.attr("d",c),ee.call(qqt,n,t,r,{styleOne:N9e,eventDataKeys:eY.eventDataKeys,transitionTime:eY.CLICK_TRANSITION_TIME,transitionEasing:eY.CLICK_TRANSITION_EASING}).call(vy.setSliceCursor,t,{isTransitioning:t._transitioning}),ce.call(N9e,U,w,t,{hovered:!1}),U.x0===U.x1||U.y0===U.y1?U._text="":J?U._text=F?"":vy.getPtLabel(U)||"":U._text=Bqt(U,n,w,r,S)||"";var ye=sP.ensureSingle(ee,"g","slicetext"),xe=sP.ensureSingle(ye,"text","",function(ne){ne.attr("data-notex",1)}),ue=sP.ensureUniformFontSize(t,vy.determineTextFont(w,U,S.font)),K=U._text||" ",_e=J&&K.indexOf("
")===-1;xe.text(K).classed("slicetext",!0).attr("text-anchor",T?"end":A||_e?"start":"middle").call(O9e.font,ue).call(Iqt.convertToTspans,t),U.textBB=O9e.bBox(xe.node()),U.transform=f(U,{fontSize:ue.size,isHeader:J}),U.transform.fontSize=ue.size,g?xe.transition().attrTween("transform",function(ne){var ae=_(ne,tY,j(),[o,s]);return function(pe){return v(ae(pe))}}):xe.attr("transform",v(U))}),O}});var H9e=fe((f3r,G9e)=>{"use strict";var Oqt=QW(),Nqt=V9e();G9e.exports=function(t,r,n,a){return Oqt(t,r,n,a,{type:"treemap",drawDescendants:Nqt})}});var W9e=fe((h3r,j9e)=>{"use strict";j9e.exports={moduleType:"trace",name:"treemap",basePlotModule:l9e(),categories:[],animatable:!0,attributes:iP(),layoutAttributes:GW(),supplyDefaults:m9e(),supplyLayoutDefaults:x9e(),calc:jW().calc,crossTraceCalc:jW().crossTraceCalc,plot:H9e(),style:aP().style,colorbar:Zf(),meta:{}}});var X9e=fe((d3r,Y9e)=>{"use strict";Y9e.exports=W9e()});var $9e=fe(Ww=>{"use strict";var Z9e=Hs();Ww.name="icicle";Ww.plot=function(e,t,r,n){Z9e.plotBasePlot(Ww.name,e,t,r,n)};Ww.clean=function(e,t,r,n){Z9e.cleanBasePlot(Ww.name,e,t,r,n)}});var rY=fe((p3r,Q9e)=>{"use strict";var{hovertemplateAttrs:Uqt,texttemplateAttrs:Vqt,templatefallbackAttrs:K9e}=Oo(),Gqt=_s(),Hqt=nl().attributes,tM=U2(),N0=B6(),lP=iP(),J9e=J2(),jqt=ta().extendFlat,Wqt=Uc().pattern;Q9e.exports={labels:N0.labels,parents:N0.parents,values:N0.values,branchvalues:N0.branchvalues,count:N0.count,level:N0.level,maxdepth:N0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:lP.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:jqt({colors:N0.marker.colors,line:N0.marker.line,pattern:Wqt,editType:"calc"},Gqt("marker",{colorAttr:"colors",anim:!1})),leaf:N0.leaf,pathbar:lP.pathbar,text:tM.text,textinfo:N0.textinfo,texttemplate:Vqt({editType:"plot"},{keys:J9e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:K9e({editType:"plot"}),hovertext:tM.hovertext,hoverinfo:N0.hoverinfo,hovertemplate:Uqt({},{keys:J9e.eventDataKeys}),hovertemplatefallback:K9e(),textfont:tM.textfont,insidetextfont:tM.insidetextfont,outsidetextfont:lP.outsidetextfont,textposition:lP.textposition,sort:tM.sort,root:N0.root,domain:Hqt({name:"icicle",trace:!0,editType:"calc"})}});var nY=fe((g3r,ePe)=>{"use strict";ePe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var iPe=fe((m3r,nPe)=>{"use strict";var tPe=Xt(),Yqt=rY(),Xqt=ni(),Zqt=nl().defaults,$qt=z0().handleText,Kqt=Im().TEXTPAD,Jqt=V2().handleMarkerDefaults,rPe=js(),Qqt=rPe.hasColorscale,eBt=rPe.handleDefaults;nPe.exports=function(t,r,n,a){function i(g,p){return tPe.coerce(t,r,Yqt,g,p)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),i("tiling.orientation"),i("tiling.flip"),i("tiling.pad");var u=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",tPe.isArrayOrTypedArray(u)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var c=i("pathbar.visible"),f="auto";$qt(t,r,a,i,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("textposition"),Jqt(t,r,a,i);var v=r._hasColorscale=Qqt(t,"marker","colors")||(t.marker||{}).coloraxis;v&&eBt(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",v?1:.7),r._hovered={marker:{line:{width:2,color:Xqt.contrast(a.paper_bgcolor)}}},c&&(i("pathbar.thickness",r.pathbar.textfont.size+2*Kqt),i("pathbar.side"),i("pathbar.edgeshape")),i("sort"),i("root.color"),Zqt(r,a,i),r._length=null}});var oPe=fe((y3r,aPe)=>{"use strict";var tBt=Xt(),rBt=nY();aPe.exports=function(t,r){function n(a,i){return tBt.coerce(t,r,rBt,a,i)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var aY=fe(iY=>{"use strict";var sPe=U6();iY.calc=function(e,t){return sPe.calc(e,t)};iY.crossTraceCalc=function(e){return sPe._runCrossTraceCalc("icicle",e)}});var uPe=fe((_3r,lPe)=>{"use strict";var nBt=O6(),iBt=WW();lPe.exports=function(t,r,n){var a=n.flipX,i=n.flipY,o=n.orientation==="h",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=nBt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||a||i)&&iBt(c,r,{swapXY:o,flipX:a,flipY:i}),c}});var oY=fe((b3r,vPe)=>{"use strict";var cPe=xi(),fPe=ni(),hPe=Xt(),aBt=kh().resizeText,oBt=tP();function sBt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");aBt(e,t,"icicle"),t.each(function(r){var n=cPe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){cPe.select(this).call(dPe,o,i,e)})})}function dPe(e,t,r,n){var a=t.data.data,i=!t.children,o=a.i,s=hPe.castOption(r,o,"marker.line.color")||fPe.defaultLine,l=hPe.castOption(r,o,"marker.line.width")||0;e.call(oBt,t,r,n).style("stroke-width",l).call(fPe.stroke,s).style("opacity",i?r.leaf.opacity:null)}vPe.exports={style:sBt,styleOne:dPe}});var xPe=fe((w3r,yPe)=>{"use strict";var pPe=xi(),uP=Xt(),gPe=ea(),lBt=as(),uBt=uPe(),mPe=oY().styleOne,sY=J2(),Yw=Ag(),cBt=J6(),fBt=nP().formatSliceLabel,lY=!1;yPe.exports=function(t,r,n,a,i){var o=i.width,s=i.height,l=i.viewX,u=i.viewY,c=i.pathSlice,f=i.toMoveInsideSlice,v=i.strTransform,g=i.hasTransition,p=i.handleSlicesExit,x=i.makeUpdateSliceInterpolator,_=i.makeUpdateTextInterpolator,y=i.prevEntry,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,A=w.textposition.indexOf("left")!==-1,T=w.textposition.indexOf("right")!==-1,m=w.textposition.indexOf("bottom")!==-1,F=uBt(n,[o,s],{flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1,orientation:w.tiling.orientation,pad:{inner:w.tiling.pad},maxDepth:w._maxDepth}),E=F.descendants(),I=1/0,R=-1/0;E.forEach(function(q){var U=q.depth;U>=w._maxDepth?(q.x0=q.x1=(q.x0+q.x1)/2,q.y0=q.y1=(q.y0+q.y1)/2):(I=Math.min(I,U),R=Math.max(R,U))}),a=a.data(E,Yw.getPtId),w._maxVisibleLayers=isFinite(R)?R-I+1:0,a.enter().append("g").classed("slice",!0),p(a,lY,C,[o,s],c),a.order();var B=null;if(g&&y){var O=Yw.getPtId(y);a.each(function(q){B===null&&Yw.getPtId(q)===O&&(B={x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1})})}var V=function(){return B||{x0:0,x1:o,y0:0,y1:s}},j=a;return g&&(j=j.transition().each("end",function(){var q=pPe.select(this);Yw.setSliceCursor(q,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(q){q._x0=l(q.x0),q._x1=l(q.x1),q._y0=u(q.y0),q._y1=u(q.y1),q._hoverX=l(q.x1-w.tiling.pad),q._hoverY=u(m?q.y1-w.tiling.pad/2:q.y0+w.tiling.pad/2);var U=pPe.select(this),J=uP.ensureSingle(U,"path","surface",function(xe){xe.style("pointer-events",k?"none":"all")});g?J.transition().attrTween("d",function(xe){var ue=x(xe,lY,V(),[o,s],{orientation:w.tiling.orientation,flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1});return function(K){return c(ue(K))}}):J.attr("d",c),U.call(cBt,n,t,r,{styleOne:mPe,eventDataKeys:sY.eventDataKeys,transitionTime:sY.CLICK_TRANSITION_TIME,transitionEasing:sY.CLICK_TRANSITION_EASING}).call(Yw.setSliceCursor,t,{isTransitioning:t._transitioning}),J.call(mPe,q,w,t,{hovered:!1}),q.x0===q.x1||q.y0===q.y1?q._text="":q._text=fBt(q,n,w,r,S)||"";var ee=uP.ensureSingle(U,"g","slicetext"),ce=uP.ensureSingle(ee,"text","",function(xe){xe.attr("data-notex",1)}),ye=uP.ensureUniformFontSize(t,Yw.determineTextFont(w,q,S.font));ce.text(q._text||" ").classed("slicetext",!0).attr("text-anchor",T?"end":A?"start":"middle").call(gPe.font,ye).call(lBt.convertToTspans,t),q.textBB=gPe.bBox(ce.node()),q.transform=f(q,{fontSize:ye.size}),q.transform.fontSize=ye.size,g?ce.transition().attrTween("transform",function(xe){var ue=_(xe,lY,V(),[o,s]);return function(K){return v(ue(K))}}):ce.attr("transform",v(q))}),B}});var bPe=fe((T3r,_Pe)=>{"use strict";var hBt=QW(),dBt=xPe();_Pe.exports=function(t,r,n,a){return hBt(t,r,n,a,{type:"icicle",drawDescendants:dBt})}});var TPe=fe((A3r,wPe)=>{"use strict";wPe.exports={moduleType:"trace",name:"icicle",basePlotModule:$9e(),categories:[],animatable:!0,attributes:rY(),layoutAttributes:nY(),supplyDefaults:iPe(),supplyLayoutDefaults:oPe(),calc:aY().calc,crossTraceCalc:aY().crossTraceCalc,plot:bPe(),style:oY().style,colorbar:Zf(),meta:{}}});var MPe=fe((M3r,APe)=>{"use strict";APe.exports=TPe()});var EPe=fe(Xw=>{"use strict";var SPe=Hs();Xw.name="funnelarea";Xw.plot=function(e,t,r,n){SPe.plotBasePlot(Xw.name,e,t,r,n)};Xw.clean=function(e,t,r,n){SPe.cleanBasePlot(Xw.name,e,t,r,n)}});var uY=fe((E3r,CPe)=>{"use strict";var eh=U2(),vBt=Ho(),pBt=nl().attributes,{hovertemplateAttrs:gBt,texttemplateAttrs:mBt,templatefallbackAttrs:kPe}=Oo(),t_=ta().extendFlat;CPe.exports={labels:eh.labels,label0:eh.label0,dlabel:eh.dlabel,values:eh.values,marker:{colors:eh.marker.colors,line:{color:t_({},eh.marker.line.color,{dflt:null}),width:t_({},eh.marker.line.width,{dflt:1}),editType:"calc"},pattern:eh.marker.pattern,editType:"calc"},text:eh.text,hovertext:eh.hovertext,scalegroup:t_({},eh.scalegroup,{}),textinfo:t_({},eh.textinfo,{flags:["label","text","value","percent"]}),texttemplate:mBt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:kPe({editType:"plot"}),hoverinfo:t_({},vBt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:gBt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:kPe(),textposition:t_({},eh.textposition,{values:["inside","none"],dflt:"inside"}),textfont:eh.textfont,insidetextfont:eh.insidetextfont,title:{text:eh.title.text,font:eh.title.font,position:t_({},eh.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:pBt({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"}}});var cY=fe((k3r,LPe)=>{"use strict";var yBt=L9().hiddenlabels;LPe.exports={hiddenlabels:yBt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var DPe=fe((C3r,FPe)=>{"use strict";var PPe=Xt(),xBt=uY(),_Bt=nl().defaults,bBt=z0().handleText,wBt=V2().handleLabelsAndValues,TBt=V2().handleMarkerDefaults;FPe.exports=function(t,r,n,a){function i(x,_){return PPe.coerce(t,r,xBt,x,_)}var o=i("labels"),s=i("values"),l=wBt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(i("label0"),i("dlabel")),!u){r.visible=!1;return}r._length=u,TBt(t,r,a,i),i("scalegroup");var c=i("text"),f=i("texttemplate");i("texttemplatefallback");var v;if(f||(v=i("textinfo",Array.isArray(c)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),f||v&&v!=="none"){var g=i("textposition");bBt(t,r,a,i,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else v==="none"&&i("textposition","none");_Bt(r,a,i);var p=i("title.text");p&&(i("title.position"),PPe.coerceFont(i,"title.font",a.font)),i("aspectratio"),i("baseratio")}});var IPe=fe((L3r,RPe)=>{"use strict";var ABt=Xt(),MBt=cY();RPe.exports=function(t,r){function n(a,i){return ABt.coerce(t,r,MBt,a,i)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var fY=fe((P3r,qPe)=>{"use strict";var zPe=Lw();function SBt(e,t){return zPe.calc(e,t)}function EBt(e){zPe.crossTraceCalc(e,{type:"funnelarea"})}qPe.exports={calc:SBt,crossTraceCalc:EBt}});var VPe=fe((F3r,UPe)=>{"use strict";var r_=xi(),hY=ea(),py=Xt(),kBt=py.strScale,BPe=py.strTranslate,OPe=as(),CBt=m2(),LBt=CBt.toMoveInsideBar,NPe=kh(),PBt=NPe.recordMinTextSize,FBt=NPe.clearMinTextSize,DBt=Sm(),Zw=R9(),RBt=Zw.attachFxHandlers,IBt=Zw.determineInsideTextFont,zBt=Zw.layoutAreas,qBt=Zw.prerenderTitles,BBt=Zw.positionTitleOutside,OBt=Zw.formatSliceLabel;UPe.exports=function(t,r){var n=t._context.staticPlot,a=t._fullLayout;FBt("funnelarea",a),qBt(r,t),zBt(r,a._size),py.makeTraceGroups(a._funnelarealayer,r,"trace").each(function(i){var o=r_.select(this),s=i[0],l=s.trace;UBt(i),o.each(function(){var u=r_.select(this).selectAll("g.slice").data(i);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,v){if(f.hidden){r_.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var g=s.cx,p=s.cy,x=r_.select(this),_=x.selectAll("path.surface").data([f]);_.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),x.call(RBt,t,i);var y="M"+(g+f.TR[0])+","+(p+f.TR[1])+dY(f.TR,f.BR)+dY(f.BR,f.BL)+dY(f.BL,f.TL)+"Z";_.attr("d",y),OBt(t,f,s);var C=DBt.castOption(l.textposition,f.pts),k=x.selectAll("g.slicetext").data(f.text&&C!=="none"?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each(function(){var S=py.ensureSingle(r_.select(this),"text","",function(I){I.attr("data-notex",1)}),L=py.ensureUniformFontSize(t,IBt(l,f,a.font));S.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(hY.font,L).call(OPe.convertToTspans,t);var w=hY.bBox(S.node()),A,T,m,F=Math.min(f.BL[1],f.BR[1])+p,E=Math.max(f.TL[1],f.TR[1])+p;T=Math.max(f.TL[0],f.BL[0])+g,m=Math.min(f.TR[0],f.BR[0])+g,A=LBt(T,m,F,E,w,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),A.fontSize=L.size,PBt(l.type,A,a),i[v].transform=A,py.setTransormAndDisplay(S,A)})});var c=r_.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=py.ensureSingle(r_.select(this),"text","",function(p){p.attr("data-notex",1)}),v=l.title.text;l._meta&&(v=py.templateString(v,l._meta)),f.text(v).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(hY.font,l.title.font).call(OPe.convertToTspans,t);var g=BBt(s,a._size);f.attr("transform",BPe(g.x,g.y)+kBt(Math.min(1,g.scale))+BPe(g.tx,g.ty))})})})};function dY(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function NBt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function UBt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i=Math.pow(a,2),o=t.vTotal,s=o*i/(1-i),l=o,u=s/o;function c(){var R=Math.sqrt(u);return{x:R,y:-R}}function f(){var R=c();return[R.x,R.y]}var v,g=[];g.push(f());var p,x;for(p=e.length-1;p>-1;p--)if(x=e[p],!x.hidden){var _=x.v/l;u+=_,g.push(f())}var y=1/0,C=-1/0;for(p=0;p-1;p--)if(x=e[p],!x.hidden){F+=1;var E=g[F][0],I=g[F][1];x.TL=[-E,I],x.TR=[E,I],x.BL=T,x.BR=m,x.pxmid=NBt(x.TR,x.BR),T=x.TL,m=x.TR}}});var jPe=fe((D3r,HPe)=>{"use strict";var GPe=xi(),VBt=Jb(),GBt=kh().resizeText;HPe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");GBt(t,r,"funnelarea"),r.each(function(n){var a=n[0],i=a.trace,o=GPe.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(s){GPe.select(this).call(VBt,s,i,t)})})}});var YPe=fe((R3r,WPe)=>{"use strict";WPe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:EPe(),categories:["pie-like","funnelarea","showLegend"],attributes:uY(),layoutAttributes:cY(),supplyDefaults:DPe(),supplyLayoutDefaults:IPe(),calc:fY().calc,crossTraceCalc:fY().crossTraceCalc,plot:VPe(),style:jPe(),styleOne:Jb(),meta:{}}});var ZPe=fe((I3r,XPe)=>{"use strict";XPe.exports=YPe()});var xf=fe((z3r,$Pe)=>{"use strict";(function(){var e={1964:(function(a,i,o){a.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}}),4793:(function(a,i,o){"use strict";var s;var l=o(7507),u=o(3778),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;i.hp=p,s=m,i.IS=50;var f=2147483647;s=f,p.TYPED_ARRAY_SUPPORT=v(),!p.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function v(){try{var qe=new Uint8Array(1),we={foo:function(){return 42}};return Object.setPrototypeOf(we,Uint8Array.prototype),Object.setPrototypeOf(qe,we),qe.foo()===42}catch(Le){return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function g(qe){if(qe>f)throw new RangeError('The value "'+qe+'" is invalid for option "size"');var we=new Uint8Array(qe);return Object.setPrototypeOf(we,p.prototype),we}function p(qe,we,Le){if(typeof qe=="number"){if(typeof we=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(qe)}return x(qe,we,Le)}p.poolSize=8192;function x(qe,we,Le){if(typeof qe=="string")return k(qe,we);if(ArrayBuffer.isView(qe))return L(qe);if(qe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof qe);if(ze(qe,ArrayBuffer)||qe&&ze(qe.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ze(qe,SharedArrayBuffer)||qe&&ze(qe.buffer,SharedArrayBuffer)))return w(qe,we,Le);if(typeof qe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ke=qe.valueOf&&qe.valueOf();if(Ke!=null&&Ke!==qe)return p.from(Ke,we,Le);var Te=A(qe);if(Te)return Te;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof qe[Symbol.toPrimitive]=="function")return p.from(qe[Symbol.toPrimitive]("string"),we,Le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof qe)}p.from=function(qe,we,Le){return x(qe,we,Le)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function _(qe){if(typeof qe!="number")throw new TypeError('"size" argument must be of type number');if(qe<0)throw new RangeError('The value "'+qe+'" is invalid for option "size"')}function y(qe,we,Le){return _(qe),qe<=0?g(qe):we!==void 0?typeof Le=="string"?g(qe).fill(we,Le):g(qe).fill(we):g(qe)}p.alloc=function(qe,we,Le){return y(qe,we,Le)};function C(qe){return _(qe),g(qe<0?0:T(qe)|0)}p.allocUnsafe=function(qe){return C(qe)},p.allocUnsafeSlow=function(qe){return C(qe)};function k(qe,we){if((typeof we!="string"||we==="")&&(we="utf8"),!p.isEncoding(we))throw new TypeError("Unknown encoding: "+we);var Le=F(qe,we)|0,Ke=g(Le),Te=Ke.write(qe,we);return Te!==Le&&(Ke=Ke.slice(0,Te)),Ke}function S(qe){for(var we=qe.length<0?0:T(qe.length)|0,Le=g(we),Ke=0;Ke=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return qe|0}function m(qe){return+qe!=qe&&(qe=0),p.alloc(+qe)}p.isBuffer=function(we){return we!=null&&we._isBuffer===!0&&we!==p.prototype},p.compare=function(we,Le){if(ze(we,Uint8Array)&&(we=p.from(we,we.offset,we.byteLength)),ze(Le,Uint8Array)&&(Le=p.from(Le,Le.offset,Le.byteLength)),!p.isBuffer(we)||!p.isBuffer(Le))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(we===Le)return 0;for(var Ke=we.length,Te=Le.length,Ve=0,$e=Math.min(Ke,Te);Ve<$e;++Ve)if(we[Ve]!==Le[Ve]){Ke=we[Ve],Te=Le[Ve];break}return KeTe.length?p.from($e).copy(Te,Ve):Uint8Array.prototype.set.call(Te,$e,Ve);else if(p.isBuffer($e))$e.copy(Te,Ve);else throw new TypeError('"list" argument must be an Array of Buffers');Ve+=$e.length}return Te};function F(qe,we){if(p.isBuffer(qe))return qe.length;if(ArrayBuffer.isView(qe)||ze(qe,ArrayBuffer))return qe.byteLength;if(typeof qe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof qe);var Le=qe.length,Ke=arguments.length>2&&arguments[2]===!0;if(!Ke&&Le===0)return 0;for(var Te=!1;;)switch(we){case"ascii":case"latin1":case"binary":return Le;case"utf8":case"utf-8":return De(qe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Le*2;case"hex":return Le>>>1;case"base64":return it(qe).length;default:if(Te)return Ke?-1:De(qe).length;we=(""+we).toLowerCase(),Te=!0}}p.byteLength=F;function E(qe,we,Le){var Ke=!1;if((we===void 0||we<0)&&(we=0),we>this.length||((Le===void 0||Le>this.length)&&(Le=this.length),Le<=0)||(Le>>>=0,we>>>=0,Le<=we))return"";for(qe||(qe="utf8");;)switch(qe){case"hex":return K(this,we,Le);case"utf8":case"utf-8":return ee(this,we,Le);case"ascii":return xe(this,we,Le);case"latin1":case"binary":return ue(this,we,Le);case"base64":return J(this,we,Le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,we,Le);default:if(Ke)throw new TypeError("Unknown encoding: "+qe);qe=(qe+"").toLowerCase(),Ke=!0}}p.prototype._isBuffer=!0;function I(qe,we,Le){var Ke=qe[we];qe[we]=qe[Le],qe[Le]=Ke}p.prototype.swap16=function(){var we=this.length;if(we%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Le=0;LeLe&&(we+=" ... "),""},c&&(p.prototype[c]=p.prototype.inspect),p.prototype.compare=function(we,Le,Ke,Te,Ve){if(ze(we,Uint8Array)&&(we=p.from(we,we.offset,we.byteLength)),!p.isBuffer(we))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof we);if(Le===void 0&&(Le=0),Ke===void 0&&(Ke=we?we.length:0),Te===void 0&&(Te=0),Ve===void 0&&(Ve=this.length),Le<0||Ke>we.length||Te<0||Ve>this.length)throw new RangeError("out of range index");if(Te>=Ve&&Le>=Ke)return 0;if(Te>=Ve)return-1;if(Le>=Ke)return 1;if(Le>>>=0,Ke>>>=0,Te>>>=0,Ve>>>=0,this===we)return 0;for(var $e=Ve-Te,ot=Ke-Le,tt=Math.min($e,ot),nt=this.slice(Te,Ve),We=we.slice(Le,Ke),mt=0;mt2147483647?Le=2147483647:Le<-2147483648&&(Le=-2147483648),Le=+Le,ct(Le)&&(Le=Te?0:qe.length-1),Le<0&&(Le=qe.length+Le),Le>=qe.length){if(Te)return-1;Le=qe.length-1}else if(Le<0)if(Te)Le=0;else return-1;if(typeof we=="string"&&(we=p.from(we,Ke)),p.isBuffer(we))return we.length===0?-1:B(qe,we,Le,Ke,Te);if(typeof we=="number")return we=we&255,typeof Uint8Array.prototype.indexOf=="function"?Te?Uint8Array.prototype.indexOf.call(qe,we,Le):Uint8Array.prototype.lastIndexOf.call(qe,we,Le):B(qe,[we],Le,Ke,Te);throw new TypeError("val must be string, number or Buffer")}function B(qe,we,Le,Ke,Te){var Ve=1,$e=qe.length,ot=we.length;if(Ke!==void 0&&(Ke=String(Ke).toLowerCase(),Ke==="ucs2"||Ke==="ucs-2"||Ke==="utf16le"||Ke==="utf-16le")){if(qe.length<2||we.length<2)return-1;Ve=2,$e/=2,ot/=2,Le/=2}function tt(Yt,jt){return Ve===1?Yt[jt]:Yt.readUInt16BE(jt*Ve)}var nt;if(Te){var We=-1;for(nt=Le;nt<$e;nt++)if(tt(qe,nt)===tt(we,We===-1?0:nt-We)){if(We===-1&&(We=nt),nt-We+1===ot)return We*Ve}else We!==-1&&(nt-=nt-We),We=-1}else for(Le+ot>$e&&(Le=$e-ot),nt=Le;nt>=0;nt--){for(var mt=!0,bt=0;btTe&&(Ke=Te)):Ke=Te;var Ve=we.length;Ke>Ve/2&&(Ke=Ve/2);for(var $e=0;$e>>0,isFinite(Ke)?(Ke=Ke>>>0,Te===void 0&&(Te="utf8")):(Te=Ke,Ke=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ve=this.length-Le;if((Ke===void 0||Ke>Ve)&&(Ke=Ve),we.length>0&&(Ke<0||Le<0)||Le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Te||(Te="utf8");for(var $e=!1;;)switch(Te){case"hex":return O(this,we,Le,Ke);case"utf8":case"utf-8":return V(this,we,Le,Ke);case"ascii":case"latin1":case"binary":return j(this,we,Le,Ke);case"base64":return q(this,we,Le,Ke);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,we,Le,Ke);default:if($e)throw new TypeError("Unknown encoding: "+Te);Te=(""+Te).toLowerCase(),$e=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(qe,we,Le){return we===0&&Le===qe.length?l.fromByteArray(qe):l.fromByteArray(qe.slice(we,Le))}function ee(qe,we,Le){Le=Math.min(qe.length,Le);for(var Ke=[],Te=we;Te239?4:Ve>223?3:Ve>191?2:1;if(Te+ot<=Le){var tt,nt,We,mt;switch(ot){case 1:Ve<128&&($e=Ve);break;case 2:tt=qe[Te+1],(tt&192)===128&&(mt=(Ve&31)<<6|tt&63,mt>127&&($e=mt));break;case 3:tt=qe[Te+1],nt=qe[Te+2],(tt&192)===128&&(nt&192)===128&&(mt=(Ve&15)<<12|(tt&63)<<6|nt&63,mt>2047&&(mt<55296||mt>57343)&&($e=mt));break;case 4:tt=qe[Te+1],nt=qe[Te+2],We=qe[Te+3],(tt&192)===128&&(nt&192)===128&&(We&192)===128&&(mt=(Ve&15)<<18|(tt&63)<<12|(nt&63)<<6|We&63,mt>65535&&mt<1114112&&($e=mt))}}$e===null?($e=65533,ot=1):$e>65535&&($e-=65536,Ke.push($e>>>10&1023|55296),$e=56320|$e&1023),Ke.push($e),Te+=ot}return ye(Ke)}var ce=4096;function ye(qe){var we=qe.length;if(we<=ce)return String.fromCharCode.apply(String,qe);for(var Le="",Ke=0;KeKe)&&(Le=Ke);for(var Te="",Ve=we;VeKe&&(we=Ke),Le<0?(Le+=Ke,Le<0&&(Le=0)):Le>Ke&&(Le=Ke),LeLe)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we],Ve=1,$e=0;++$e>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we+--Le],Ve=1;Le>0&&(Ve*=256);)Te+=this[we+--Le]*Ve;return Te},p.prototype.readUint8=p.prototype.readUInt8=function(we,Le){return we=we>>>0,Le||ne(we,1,this.length),this[we]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(we,Le){return we=we>>>0,Le||ne(we,2,this.length),this[we]|this[we+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(we,Le){return we=we>>>0,Le||ne(we,2,this.length),this[we]<<8|this[we+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),(this[we]|this[we+1]<<8|this[we+2]<<16)+this[we+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]*16777216+(this[we+1]<<16|this[we+2]<<8|this[we+3])},p.prototype.readIntLE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we],Ve=1,$e=0;++$e=Ve&&(Te-=Math.pow(2,8*Le)),Te},p.prototype.readIntBE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=Le,Ve=1,$e=this[we+--Te];Te>0&&(Ve*=256);)$e+=this[we+--Te]*Ve;return Ve*=128,$e>=Ve&&($e-=Math.pow(2,8*Le)),$e},p.prototype.readInt8=function(we,Le){return we=we>>>0,Le||ne(we,1,this.length),this[we]&128?(255-this[we]+1)*-1:this[we]},p.prototype.readInt16LE=function(we,Le){we=we>>>0,Le||ne(we,2,this.length);var Ke=this[we]|this[we+1]<<8;return Ke&32768?Ke|4294901760:Ke},p.prototype.readInt16BE=function(we,Le){we=we>>>0,Le||ne(we,2,this.length);var Ke=this[we+1]|this[we]<<8;return Ke&32768?Ke|4294901760:Ke},p.prototype.readInt32LE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]|this[we+1]<<8|this[we+2]<<16|this[we+3]<<24},p.prototype.readInt32BE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]<<24|this[we+1]<<16|this[we+2]<<8|this[we+3]},p.prototype.readFloatLE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),u.read(this,we,!0,23,4)},p.prototype.readFloatBE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),u.read(this,we,!1,23,4)},p.prototype.readDoubleLE=function(we,Le){return we=we>>>0,Le||ne(we,8,this.length),u.read(this,we,!0,52,8)},p.prototype.readDoubleBE=function(we,Le){return we=we>>>0,Le||ne(we,8,this.length),u.read(this,we,!1,52,8)};function ae(qe,we,Le,Ke,Te,Ve){if(!p.isBuffer(qe))throw new TypeError('"buffer" argument must be a Buffer instance');if(we>Te||weqe.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,Ke=Ke>>>0,!Te){var Ve=Math.pow(2,8*Ke)-1;ae(this,we,Le,Ke,Ve,0)}var $e=1,ot=0;for(this[Le]=we&255;++ot>>0,Ke=Ke>>>0,!Te){var Ve=Math.pow(2,8*Ke)-1;ae(this,we,Le,Ke,Ve,0)}var $e=Ke-1,ot=1;for(this[Le+$e]=we&255;--$e>=0&&(ot*=256);)this[Le+$e]=we/ot&255;return Le+Ke},p.prototype.writeUint8=p.prototype.writeUInt8=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,1,255,0),this[Le]=we&255,Le+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,65535,0),this[Le]=we&255,this[Le+1]=we>>>8,Le+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,65535,0),this[Le]=we>>>8,this[Le+1]=we&255,Le+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,4294967295,0),this[Le+3]=we>>>24,this[Le+2]=we>>>16,this[Le+1]=we>>>8,this[Le]=we&255,Le+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,4294967295,0),this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=we&255,Le+4},p.prototype.writeIntLE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,!Te){var Ve=Math.pow(2,8*Ke-1);ae(this,we,Le,Ke,Ve-1,-Ve)}var $e=0,ot=1,tt=0;for(this[Le]=we&255;++$e>0)-tt&255;return Le+Ke},p.prototype.writeIntBE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,!Te){var Ve=Math.pow(2,8*Ke-1);ae(this,we,Le,Ke,Ve-1,-Ve)}var $e=Ke-1,ot=1,tt=0;for(this[Le+$e]=we&255;--$e>=0&&(ot*=256);)we<0&&tt===0&&this[Le+$e+1]!==0&&(tt=1),this[Le+$e]=(we/ot>>0)-tt&255;return Le+Ke},p.prototype.writeInt8=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,1,127,-128),we<0&&(we=255+we+1),this[Le]=we&255,Le+1},p.prototype.writeInt16LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,32767,-32768),this[Le]=we&255,this[Le+1]=we>>>8,Le+2},p.prototype.writeInt16BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,32767,-32768),this[Le]=we>>>8,this[Le+1]=we&255,Le+2},p.prototype.writeInt32LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,2147483647,-2147483648),this[Le]=we&255,this[Le+1]=we>>>8,this[Le+2]=we>>>16,this[Le+3]=we>>>24,Le+4},p.prototype.writeInt32BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,2147483647,-2147483648),we<0&&(we=4294967295+we+1),this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=we&255,Le+4};function pe(qe,we,Le,Ke,Te,Ve){if(Le+Ke>qe.length)throw new RangeError("Index out of range");if(Le<0)throw new RangeError("Index out of range")}function ie(qe,we,Le,Ke,Te){return we=+we,Le=Le>>>0,Te||pe(qe,we,Le,4,34028234663852886e22,-34028234663852886e22),u.write(qe,we,Le,Ke,23,4),Le+4}p.prototype.writeFloatLE=function(we,Le,Ke){return ie(this,we,Le,!0,Ke)},p.prototype.writeFloatBE=function(we,Le,Ke){return ie(this,we,Le,!1,Ke)};function le(qe,we,Le,Ke,Te){return we=+we,Le=Le>>>0,Te||pe(qe,we,Le,8,17976931348623157e292,-17976931348623157e292),u.write(qe,we,Le,Ke,52,8),Le+8}p.prototype.writeDoubleLE=function(we,Le,Ke){return le(this,we,Le,!0,Ke)},p.prototype.writeDoubleBE=function(we,Le,Ke){return le(this,we,Le,!1,Ke)},p.prototype.copy=function(we,Le,Ke,Te){if(!p.isBuffer(we))throw new TypeError("argument should be a Buffer");if(Ke||(Ke=0),!Te&&Te!==0&&(Te=this.length),Le>=we.length&&(Le=we.length),Le||(Le=0),Te>0&&Te=this.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("sourceEnd out of bounds");Te>this.length&&(Te=this.length),we.length-Le>>0,Ke=Ke===void 0?this.length:Ke>>>0,we||(we=0);var $e;if(typeof we=="number")for($e=Le;$e55295&&Le<57344){if(!Te){if(Le>56319){(we-=3)>-1&&Ve.push(239,191,189);continue}else if($e+1===Ke){(we-=3)>-1&&Ve.push(239,191,189);continue}Te=Le;continue}if(Le<56320){(we-=3)>-1&&Ve.push(239,191,189),Te=Le;continue}Le=(Te-55296<<10|Le-56320)+65536}else Te&&(we-=3)>-1&&Ve.push(239,191,189);if(Te=null,Le<128){if((we-=1)<0)break;Ve.push(Le)}else if(Le<2048){if((we-=2)<0)break;Ve.push(Le>>6|192,Le&63|128)}else if(Le<65536){if((we-=3)<0)break;Ve.push(Le>>12|224,Le>>6&63|128,Le&63|128)}else if(Le<1114112){if((we-=4)<0)break;Ve.push(Le>>18|240,Le>>12&63|128,Le>>6&63|128,Le&63|128)}else throw new Error("Invalid code point")}return Ve}function Ge(qe){for(var we=[],Le=0;Le>8,Te=Le%256,Ve.push(Te),Ve.push(Ke);return Ve}function it(qe){return l.toByteArray(be(qe))}function Oe(qe,we,Le,Ke){for(var Te=0;Te=we.length||Te>=qe.length);++Te)we[Te+Le]=qe[Te];return Te}function ze(qe,we){return qe instanceof we||qe!=null&&qe.constructor!=null&&qe.constructor.name!=null&&qe.constructor.name===we.name}function ct(qe){return qe!==qe}var et=(function(){for(var qe="0123456789abcdef",we=new Array(256),Le=0;Le<16;++Le)for(var Ke=Le*16,Te=0;Te<16;++Te)we[Ke+Te]=qe[Le]+qe[Te];return we})()}),9216:(function(a){"use strict";a.exports=l,a.exports.isMobile=l,a.exports.default=l;let i=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});let c=u.ua;if(!c&&typeof navigator!="undefined"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;let f=i.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}}),6296:(function(a,i,o){"use strict";a.exports=v;var s=o(7261),l=o(9977),u=o(1811);function c(g,p){this._controllerNames=Object.keys(g),this._controllerList=this._controllerNames.map(function(x){return g[x]}),this._mode=p,this._active=g[p],this._active||(this._mode="turntable",this._active=g.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 f=c.prototype;f.flush=function(g){for(var p=this._controllerList,x=0;x0)throw new Error("Invalid string. Length must be a multiple of 4");var L=k.indexOf("=");L===-1&&(L=S);var w=L===S?0:4-L%4;return[L,w]}function g(k){var S=v(k),L=S[0],w=S[1];return(L+w)*3/4-w}function p(k,S,L){return(S+L)*3/4-L}function x(k){var S,L=v(k),w=L[0],A=L[1],T=new l(p(k,w,A)),m=0,F=A>0?w-4:w,E;for(E=0;E>16&255,T[m++]=S>>8&255,T[m++]=S&255;return A===2&&(S=s[k.charCodeAt(E)]<<2|s[k.charCodeAt(E+1)]>>4,T[m++]=S&255),A===1&&(S=s[k.charCodeAt(E)]<<10|s[k.charCodeAt(E+1)]<<4|s[k.charCodeAt(E+2)]>>2,T[m++]=S>>8&255,T[m++]=S&255),T}function _(k){return o[k>>18&63]+o[k>>12&63]+o[k>>6&63]+o[k&63]}function y(k,S,L){for(var w,A=[],T=S;TF?F:m+T));return w===1?(S=k[L-1],A.push(o[S>>2]+o[S<<4&63]+"==")):w===2&&(S=(k[L-2]<<8)+k[L-1],A.push(o[S>>10]+o[S>>4&63]+o[S<<2&63]+"=")),A.join("")}}),3865:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}}),1318:(function(a){"use strict";a.exports=i;function i(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}}),8697:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}}),7842:(function(a,i,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),v=o(8697);a.exports=g;function g(p,x){if(s(p))return x?v(p,g(x)):[p[0].clone(),p[1].clone()];var _=0,y,C;if(l(p))y=p.clone();else if(typeof p=="string")y=c(p);else{if(p===0)return[u(0),u(1)];if(p===Math.floor(p))y=u(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),_-=256;y=u(p)}}if(s(x))y.mul(x[1]),C=x[0].clone();else if(l(x))C=x.clone();else if(typeof x=="string")C=c(x);else if(!x)C=u(1);else if(x===Math.floor(x))C=u(x);else{for(;x!==Math.floor(x);)x=x*Math.pow(2,256),_+=256;C=u(x)}return _>0?y=y.ushln(_):_<0&&(C=C.ushln(-_)),f(y,C)}}),6330:(function(a,i,o){"use strict";var s=o(1533);a.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}}),5716:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return u.cmp(new s(0))}}),1369:(function(a,i,o){"use strict";var s=o(5716);a.exports=l;function l(u){var c=u.length,f=u.words,v=0;if(c===1)v=f[0];else if(c===2)v=f[0]+f[1]*67108864;else for(var g=0;g20?52:v+32}}),1533:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}}),2651:(function(a,i,o){"use strict";var s=o(6859),l=o(2361);a.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}}),869:(function(a,i,o){"use strict";var s=o(2651),l=o(5716);a.exports=u;function u(c,f){var v=l(c),g=l(f);if(v===0)return[s(0),s(1)];if(g===0)return[s(0),s(0)];g<0&&(c=c.neg(),f=f.neg());var p=c.gcd(f);return p.cmpn(1)?[c.div(p),f.div(p)]:[c,f]}}),6768:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return new s(u)}}),6504:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}}),7721:(function(a,i,o){"use strict";var s=o(5716);a.exports=l;function l(u){return s(u[0])*s(u[1])}}),5572:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}}),946:(function(a,i,o){"use strict";var s=o(1369),l=o(4025);a.exports=u;function u(c){var f=c[0],v=c[1];if(f.cmpn(0)===0)return 0;var g=f.abs().divmod(v.abs()),p=g.div,x=s(p),_=g.mod,y=f.negative!==v.negative?-1:1;if(_.cmpn(0)===0)return y*x;if(x){var C=l(x)+4,k=s(_.ushln(C).divRound(v));return y*(x+k*Math.pow(2,-C))}else{var S=v.bitLength()-_.bitLength()+53,k=s(_.ushln(S).divRound(v));return S<1023?y*k*Math.pow(2,-S):(k*=Math.pow(2,-1023),y*k*Math.pow(2,1023-S))}}}),2478:(function(a){"use strict";function i(f,v,g,p,x){for(var _=x+1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k>=0?(_=y,x=y-1):p=y+1}return _}function o(f,v,g,p,x){for(var _=x+1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k>0?(_=y,x=y-1):p=y+1}return _}function s(f,v,g,p,x){for(var _=p-1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k<0?(_=y,p=y+1):x=y-1}return _}function l(f,v,g,p,x){for(var _=p-1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k<=0?(_=y,p=y+1):x=y-1}return _}function u(f,v,g,p,x){for(;p<=x;){var _=p+x>>>1,y=f[_],C=g!==void 0?g(y,v):y-v;if(C===0)return _;C<=0?p=_+1:x=_-1}return-1}function c(f,v,g,p,x,_){return typeof g=="function"?_(f,v,g,p===void 0?0:p|0,x===void 0?f.length-1:x|0):_(f,v,void 0,g===void 0?0:g|0,p===void 0?f.length-1:p|0)}a.exports={ge:function(f,v,g,p,x){return c(f,v,g,p,x,i)},gt:function(f,v,g,p,x){return c(f,v,g,p,x,o)},lt:function(f,v,g,p,x){return c(f,v,g,p,x,s)},le:function(f,v,g,p,x){return c(f,v,g,p,x,l)},eq:function(f,v,g,p,x){return c(f,v,g,p,x,u)}}}),8828:(function(a,i){"use strict";"use restrict";var o=32;i.INT_BITS=o,i.INT_MAX=2147483647,i.INT_MIN=-1<0)-(u<0)},i.abs=function(u){var c=u>>o-1;return(u^c)-c},i.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},i.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},i.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}i.countTrailingZeros=s,i.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},i.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},i.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,v=c,g=7;for(f>>>=1;f;f>>>=1)v<<=1,v|=f&1,--g;u[c]=v<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},i.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},i.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},i.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},i.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},i.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}}),6859:(function(a,i,o){a=o.nmd(a),(function(s,l){"use strict";function u(j,q){if(!j)throw new Error(q||"Assertion failed")}function c(j,q){j.super_=q;var U=function(){};U.prototype=q.prototype,j.prototype=new U,j.prototype.constructor=j}function f(j,q,U){if(f.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((q==="le"||q==="be")&&(U=q,q=10),this._init(j||0,q||10,U||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var v;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?v=window.Buffer:v=o(7790).Buffer}catch(j){}f.isBN=function(q){return q instanceof f?!0:q!==null&&typeof q=="object"&&q.constructor.wordSize===f.wordSize&&Array.isArray(q.words)},f.max=function(q,U){return q.cmp(U)>0?q:U},f.min=function(q,U){return q.cmp(U)<0?q:U},f.prototype._init=function(q,U,J){if(typeof q=="number")return this._initNumber(q,U,J);if(typeof q=="object")return this._initArray(q,U,J);U==="hex"&&(U=16),u(U===(U|0)&&U>=2&&U<=36),q=q.toString().replace(/\s+/g,"");var ee=0;q[0]==="-"&&(ee++,this.negative=1),ee=0;ee-=3)ye=q[ee]|q[ee-1]<<8|q[ee-2]<<16,this.words[ce]|=ye<>>26-xe&67108863,xe+=24,xe>=26&&(xe-=26,ce++);else if(J==="le")for(ee=0,ce=0;ee>>26-xe&67108863,xe+=24,xe>=26&&(xe-=26,ce++);return this.strip()};function g(j,q){var U=j.charCodeAt(q);return U>=65&&U<=70?U-55:U>=97&&U<=102?U-87:U-48&15}function p(j,q,U){var J=g(j,U);return U-1>=q&&(J|=g(j,U-1)<<4),J}f.prototype._parseHex=function(q,U,J){this.length=Math.ceil((q.length-U)/6),this.words=new Array(this.length);for(var ee=0;ee=U;ee-=2)xe=p(q,U,ee)<=18?(ce-=18,ye+=1,this.words[ye]|=xe>>>26):ce+=8;else{var ue=q.length-U;for(ee=ue%2===0?U+1:U;ee=18?(ce-=18,ye+=1,this.words[ye]|=xe>>>26):ce+=8}this.strip()};function x(j,q,U,J){for(var ee=0,ce=Math.min(j.length,U),ye=q;ye=49?ee+=xe-49+10:xe>=17?ee+=xe-17+10:ee+=xe}return ee}f.prototype._parseBase=function(q,U,J){this.words=[0],this.length=1;for(var ee=0,ce=1;ce<=67108863;ce*=U)ee++;ee--,ce=ce/U|0;for(var ye=q.length-J,xe=ye%ee,ue=Math.min(ye,ye-xe)+J,K=0,_e=J;_e1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?""};var _=["","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"],y=[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],C=[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];f.prototype.toString=function(q,U){q=q||10,U=U|0||1;var J;if(q===16||q==="hex"){J="";for(var ee=0,ce=0,ye=0;ye>>24-ee&16777215,ee+=2,ee>=26&&(ee-=26,ye--),ce!==0||ye!==this.length-1?J=_[6-ue.length]+ue+J:J=ue+J}for(ce!==0&&(J=ce.toString(16)+J);J.length%U!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(q===(q|0)&&q>=2&&q<=36){var K=y[q],_e=C[q];J="";var ne=this.clone();for(ne.negative=0;!ne.isZero();){var ae=ne.modn(_e).toString(q);ne=ne.idivn(_e),ne.isZero()?J=ae+J:J=_[K-ae.length]+ae+J}for(this.isZero()&&(J="0"+J);J.length%U!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var q=this.words[0];return this.length===2?q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?q+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-q:q},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(q,U){return u(typeof v!="undefined"),this.toArrayLike(v,q,U)},f.prototype.toArray=function(q,U){return this.toArrayLike(Array,q,U)},f.prototype.toArrayLike=function(q,U,J){var ee=this.byteLength(),ce=J||Math.max(1,ee);u(ee<=ce,"byte array longer than desired length"),u(ce>0,"Requested array length <= 0"),this.strip();var ye=U==="le",xe=new q(ce),ue,K,_e=this.clone();if(ye){for(K=0;!_e.isZero();K++)ue=_e.andln(255),_e.iushrn(8),xe[K]=ue;for(;K=4096&&(J+=13,U>>>=13),U>=64&&(J+=7,U>>>=7),U>=8&&(J+=4,U>>>=4),U>=2&&(J+=2,U>>>=2),J+U},f.prototype._zeroBits=function(q){if(q===0)return 26;var U=q,J=0;return(U&8191)===0&&(J+=13,U>>>=13),(U&127)===0&&(J+=7,U>>>=7),(U&15)===0&&(J+=4,U>>>=4),(U&3)===0&&(J+=2,U>>>=2),(U&1)===0&&J++,J},f.prototype.bitLength=function(){var q=this.words[this.length-1],U=this._countBits(q);return(this.length-1)*26+U};function k(j){for(var q=new Array(j.bitLength()),U=0;U>>ee}return q}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var q=0,U=0;Uq.length?this.clone().ior(q):q.clone().ior(this)},f.prototype.uor=function(q){return this.length>q.length?this.clone().iuor(q):q.clone().iuor(this)},f.prototype.iuand=function(q){var U;this.length>q.length?U=q:U=this;for(var J=0;Jq.length?this.clone().iand(q):q.clone().iand(this)},f.prototype.uand=function(q){return this.length>q.length?this.clone().iuand(q):q.clone().iuand(this)},f.prototype.iuxor=function(q){var U,J;this.length>q.length?(U=this,J=q):(U=q,J=this);for(var ee=0;eeq.length?this.clone().ixor(q):q.clone().ixor(this)},f.prototype.uxor=function(q){return this.length>q.length?this.clone().iuxor(q):q.clone().iuxor(this)},f.prototype.inotn=function(q){u(typeof q=="number"&&q>=0);var U=Math.ceil(q/26)|0,J=q%26;this._expand(U),J>0&&U--;for(var ee=0;ee0&&(this.words[ee]=~this.words[ee]&67108863>>26-J),this.strip()},f.prototype.notn=function(q){return this.clone().inotn(q)},f.prototype.setn=function(q,U){u(typeof q=="number"&&q>=0);var J=q/26|0,ee=q%26;return this._expand(J+1),U?this.words[J]=this.words[J]|1<q.length?(J=this,ee=q):(J=q,ee=this);for(var ce=0,ye=0;ye>>26;for(;ce!==0&&ye>>26;if(this.length=J.length,ce!==0)this.words[this.length]=ce,this.length++;else if(J!==this)for(;yeq.length?this.clone().iadd(q):q.clone().iadd(this)},f.prototype.isub=function(q){if(q.negative!==0){q.negative=0;var U=this.iadd(q);return q.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(q),this.negative=1,this._normSign();var J=this.cmp(q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ee,ce;J>0?(ee=this,ce=q):(ee=q,ce=this);for(var ye=0,xe=0;xe>26,this.words[xe]=U&67108863;for(;ye!==0&&xe>26,this.words[xe]=U&67108863;if(ye===0&&xe>>26,ne=ue&67108863,ae=Math.min(K,q.length-1),pe=Math.max(0,K-j.length+1);pe<=ae;pe++){var ie=K-pe|0;ee=j.words[ie]|0,ce=q.words[pe]|0,ye=ee*ce+ne,_e+=ye/67108864|0,ne=ye&67108863}U.words[K]=ne|0,ue=_e|0}return ue!==0?U.words[K]=ue|0:U.length--,U.strip()}var L=function(q,U,J){var ee=q.words,ce=U.words,ye=J.words,xe=0,ue,K,_e,ne=ee[0]|0,ae=ne&8191,pe=ne>>>13,ie=ee[1]|0,le=ie&8191,me=ie>>>13,be=ee[2]|0,De=be&8191,Ge=be>>>13,ht=ee[3]|0,it=ht&8191,Oe=ht>>>13,ze=ee[4]|0,ct=ze&8191,et=ze>>>13,qe=ee[5]|0,we=qe&8191,Le=qe>>>13,Ke=ee[6]|0,Te=Ke&8191,Ve=Ke>>>13,$e=ee[7]|0,ot=$e&8191,tt=$e>>>13,nt=ee[8]|0,We=nt&8191,mt=nt>>>13,bt=ee[9]|0,Yt=bt&8191,jt=bt>>>13,mr=ce[0]|0,or=mr&8191,fr=mr>>>13,Ot=ce[1]|0,cr=Ot&8191,Ct=Ot>>>13,wt=ce[2]|0,Tt=wt&8191,Mt=wt>>>13,Lt=ce[3]|0,ft=Lt&8191,kt=Lt>>>13,rr=ce[4]|0,pr=rr&8191,Kr=rr>>>13,Nr=ce[5]|0,dn=Nr&8191,xr=Nr>>>13,Fr=ce[6]|0,Zr=Fr&8191,Cn=Fr>>>13,Dt=ce[7]|0,At=Dt&8191,Vt=Dt>>>13,Qt=ce[8]|0,Ut=Qt&8191,_r=Qt>>>13,rn=ce[9]|0,Jr=rn&8191,qn=rn>>>13;J.negative=q.negative^U.negative,J.length=19,ue=Math.imul(ae,or),K=Math.imul(ae,fr),K=K+Math.imul(pe,or)|0,_e=Math.imul(pe,fr);var ri=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ri>>>26)|0,ri&=67108863,ue=Math.imul(le,or),K=Math.imul(le,fr),K=K+Math.imul(me,or)|0,_e=Math.imul(me,fr),ue=ue+Math.imul(ae,cr)|0,K=K+Math.imul(ae,Ct)|0,K=K+Math.imul(pe,cr)|0,_e=_e+Math.imul(pe,Ct)|0;var Jn=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,ue=Math.imul(De,or),K=Math.imul(De,fr),K=K+Math.imul(Ge,or)|0,_e=Math.imul(Ge,fr),ue=ue+Math.imul(le,cr)|0,K=K+Math.imul(le,Ct)|0,K=K+Math.imul(me,cr)|0,_e=_e+Math.imul(me,Ct)|0,ue=ue+Math.imul(ae,Tt)|0,K=K+Math.imul(ae,Mt)|0,K=K+Math.imul(pe,Tt)|0,_e=_e+Math.imul(pe,Mt)|0;var Ii=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,ue=Math.imul(it,or),K=Math.imul(it,fr),K=K+Math.imul(Oe,or)|0,_e=Math.imul(Oe,fr),ue=ue+Math.imul(De,cr)|0,K=K+Math.imul(De,Ct)|0,K=K+Math.imul(Ge,cr)|0,_e=_e+Math.imul(Ge,Ct)|0,ue=ue+Math.imul(le,Tt)|0,K=K+Math.imul(le,Mt)|0,K=K+Math.imul(me,Tt)|0,_e=_e+Math.imul(me,Mt)|0,ue=ue+Math.imul(ae,ft)|0,K=K+Math.imul(ae,kt)|0,K=K+Math.imul(pe,ft)|0,_e=_e+Math.imul(pe,kt)|0;var Vi=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,ue=Math.imul(ct,or),K=Math.imul(ct,fr),K=K+Math.imul(et,or)|0,_e=Math.imul(et,fr),ue=ue+Math.imul(it,cr)|0,K=K+Math.imul(it,Ct)|0,K=K+Math.imul(Oe,cr)|0,_e=_e+Math.imul(Oe,Ct)|0,ue=ue+Math.imul(De,Tt)|0,K=K+Math.imul(De,Mt)|0,K=K+Math.imul(Ge,Tt)|0,_e=_e+Math.imul(Ge,Mt)|0,ue=ue+Math.imul(le,ft)|0,K=K+Math.imul(le,kt)|0,K=K+Math.imul(me,ft)|0,_e=_e+Math.imul(me,kt)|0,ue=ue+Math.imul(ae,pr)|0,K=K+Math.imul(ae,Kr)|0,K=K+Math.imul(pe,pr)|0,_e=_e+Math.imul(pe,Kr)|0;var ra=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ra>>>26)|0,ra&=67108863,ue=Math.imul(we,or),K=Math.imul(we,fr),K=K+Math.imul(Le,or)|0,_e=Math.imul(Le,fr),ue=ue+Math.imul(ct,cr)|0,K=K+Math.imul(ct,Ct)|0,K=K+Math.imul(et,cr)|0,_e=_e+Math.imul(et,Ct)|0,ue=ue+Math.imul(it,Tt)|0,K=K+Math.imul(it,Mt)|0,K=K+Math.imul(Oe,Tt)|0,_e=_e+Math.imul(Oe,Mt)|0,ue=ue+Math.imul(De,ft)|0,K=K+Math.imul(De,kt)|0,K=K+Math.imul(Ge,ft)|0,_e=_e+Math.imul(Ge,kt)|0,ue=ue+Math.imul(le,pr)|0,K=K+Math.imul(le,Kr)|0,K=K+Math.imul(me,pr)|0,_e=_e+Math.imul(me,Kr)|0,ue=ue+Math.imul(ae,dn)|0,K=K+Math.imul(ae,xr)|0,K=K+Math.imul(pe,dn)|0,_e=_e+Math.imul(pe,xr)|0;var ha=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ha>>>26)|0,ha&=67108863,ue=Math.imul(Te,or),K=Math.imul(Te,fr),K=K+Math.imul(Ve,or)|0,_e=Math.imul(Ve,fr),ue=ue+Math.imul(we,cr)|0,K=K+Math.imul(we,Ct)|0,K=K+Math.imul(Le,cr)|0,_e=_e+Math.imul(Le,Ct)|0,ue=ue+Math.imul(ct,Tt)|0,K=K+Math.imul(ct,Mt)|0,K=K+Math.imul(et,Tt)|0,_e=_e+Math.imul(et,Mt)|0,ue=ue+Math.imul(it,ft)|0,K=K+Math.imul(it,kt)|0,K=K+Math.imul(Oe,ft)|0,_e=_e+Math.imul(Oe,kt)|0,ue=ue+Math.imul(De,pr)|0,K=K+Math.imul(De,Kr)|0,K=K+Math.imul(Ge,pr)|0,_e=_e+Math.imul(Ge,Kr)|0,ue=ue+Math.imul(le,dn)|0,K=K+Math.imul(le,xr)|0,K=K+Math.imul(me,dn)|0,_e=_e+Math.imul(me,xr)|0,ue=ue+Math.imul(ae,Zr)|0,K=K+Math.imul(ae,Cn)|0,K=K+Math.imul(pe,Zr)|0,_e=_e+Math.imul(pe,Cn)|0;var va=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(va>>>26)|0,va&=67108863,ue=Math.imul(ot,or),K=Math.imul(ot,fr),K=K+Math.imul(tt,or)|0,_e=Math.imul(tt,fr),ue=ue+Math.imul(Te,cr)|0,K=K+Math.imul(Te,Ct)|0,K=K+Math.imul(Ve,cr)|0,_e=_e+Math.imul(Ve,Ct)|0,ue=ue+Math.imul(we,Tt)|0,K=K+Math.imul(we,Mt)|0,K=K+Math.imul(Le,Tt)|0,_e=_e+Math.imul(Le,Mt)|0,ue=ue+Math.imul(ct,ft)|0,K=K+Math.imul(ct,kt)|0,K=K+Math.imul(et,ft)|0,_e=_e+Math.imul(et,kt)|0,ue=ue+Math.imul(it,pr)|0,K=K+Math.imul(it,Kr)|0,K=K+Math.imul(Oe,pr)|0,_e=_e+Math.imul(Oe,Kr)|0,ue=ue+Math.imul(De,dn)|0,K=K+Math.imul(De,xr)|0,K=K+Math.imul(Ge,dn)|0,_e=_e+Math.imul(Ge,xr)|0,ue=ue+Math.imul(le,Zr)|0,K=K+Math.imul(le,Cn)|0,K=K+Math.imul(me,Zr)|0,_e=_e+Math.imul(me,Cn)|0,ue=ue+Math.imul(ae,At)|0,K=K+Math.imul(ae,Vt)|0,K=K+Math.imul(pe,At)|0,_e=_e+Math.imul(pe,Vt)|0;var Xi=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,ue=Math.imul(We,or),K=Math.imul(We,fr),K=K+Math.imul(mt,or)|0,_e=Math.imul(mt,fr),ue=ue+Math.imul(ot,cr)|0,K=K+Math.imul(ot,Ct)|0,K=K+Math.imul(tt,cr)|0,_e=_e+Math.imul(tt,Ct)|0,ue=ue+Math.imul(Te,Tt)|0,K=K+Math.imul(Te,Mt)|0,K=K+Math.imul(Ve,Tt)|0,_e=_e+Math.imul(Ve,Mt)|0,ue=ue+Math.imul(we,ft)|0,K=K+Math.imul(we,kt)|0,K=K+Math.imul(Le,ft)|0,_e=_e+Math.imul(Le,kt)|0,ue=ue+Math.imul(ct,pr)|0,K=K+Math.imul(ct,Kr)|0,K=K+Math.imul(et,pr)|0,_e=_e+Math.imul(et,Kr)|0,ue=ue+Math.imul(it,dn)|0,K=K+Math.imul(it,xr)|0,K=K+Math.imul(Oe,dn)|0,_e=_e+Math.imul(Oe,xr)|0,ue=ue+Math.imul(De,Zr)|0,K=K+Math.imul(De,Cn)|0,K=K+Math.imul(Ge,Zr)|0,_e=_e+Math.imul(Ge,Cn)|0,ue=ue+Math.imul(le,At)|0,K=K+Math.imul(le,Vt)|0,K=K+Math.imul(me,At)|0,_e=_e+Math.imul(me,Vt)|0,ue=ue+Math.imul(ae,Ut)|0,K=K+Math.imul(ae,_r)|0,K=K+Math.imul(pe,Ut)|0,_e=_e+Math.imul(pe,_r)|0;var oa=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(oa>>>26)|0,oa&=67108863,ue=Math.imul(Yt,or),K=Math.imul(Yt,fr),K=K+Math.imul(jt,or)|0,_e=Math.imul(jt,fr),ue=ue+Math.imul(We,cr)|0,K=K+Math.imul(We,Ct)|0,K=K+Math.imul(mt,cr)|0,_e=_e+Math.imul(mt,Ct)|0,ue=ue+Math.imul(ot,Tt)|0,K=K+Math.imul(ot,Mt)|0,K=K+Math.imul(tt,Tt)|0,_e=_e+Math.imul(tt,Mt)|0,ue=ue+Math.imul(Te,ft)|0,K=K+Math.imul(Te,kt)|0,K=K+Math.imul(Ve,ft)|0,_e=_e+Math.imul(Ve,kt)|0,ue=ue+Math.imul(we,pr)|0,K=K+Math.imul(we,Kr)|0,K=K+Math.imul(Le,pr)|0,_e=_e+Math.imul(Le,Kr)|0,ue=ue+Math.imul(ct,dn)|0,K=K+Math.imul(ct,xr)|0,K=K+Math.imul(et,dn)|0,_e=_e+Math.imul(et,xr)|0,ue=ue+Math.imul(it,Zr)|0,K=K+Math.imul(it,Cn)|0,K=K+Math.imul(Oe,Zr)|0,_e=_e+Math.imul(Oe,Cn)|0,ue=ue+Math.imul(De,At)|0,K=K+Math.imul(De,Vt)|0,K=K+Math.imul(Ge,At)|0,_e=_e+Math.imul(Ge,Vt)|0,ue=ue+Math.imul(le,Ut)|0,K=K+Math.imul(le,_r)|0,K=K+Math.imul(me,Ut)|0,_e=_e+Math.imul(me,_r)|0,ue=ue+Math.imul(ae,Jr)|0,K=K+Math.imul(ae,qn)|0,K=K+Math.imul(pe,Jr)|0,_e=_e+Math.imul(pe,qn)|0;var Ma=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,ue=Math.imul(Yt,cr),K=Math.imul(Yt,Ct),K=K+Math.imul(jt,cr)|0,_e=Math.imul(jt,Ct),ue=ue+Math.imul(We,Tt)|0,K=K+Math.imul(We,Mt)|0,K=K+Math.imul(mt,Tt)|0,_e=_e+Math.imul(mt,Mt)|0,ue=ue+Math.imul(ot,ft)|0,K=K+Math.imul(ot,kt)|0,K=K+Math.imul(tt,ft)|0,_e=_e+Math.imul(tt,kt)|0,ue=ue+Math.imul(Te,pr)|0,K=K+Math.imul(Te,Kr)|0,K=K+Math.imul(Ve,pr)|0,_e=_e+Math.imul(Ve,Kr)|0,ue=ue+Math.imul(we,dn)|0,K=K+Math.imul(we,xr)|0,K=K+Math.imul(Le,dn)|0,_e=_e+Math.imul(Le,xr)|0,ue=ue+Math.imul(ct,Zr)|0,K=K+Math.imul(ct,Cn)|0,K=K+Math.imul(et,Zr)|0,_e=_e+Math.imul(et,Cn)|0,ue=ue+Math.imul(it,At)|0,K=K+Math.imul(it,Vt)|0,K=K+Math.imul(Oe,At)|0,_e=_e+Math.imul(Oe,Vt)|0,ue=ue+Math.imul(De,Ut)|0,K=K+Math.imul(De,_r)|0,K=K+Math.imul(Ge,Ut)|0,_e=_e+Math.imul(Ge,_r)|0,ue=ue+Math.imul(le,Jr)|0,K=K+Math.imul(le,qn)|0,K=K+Math.imul(me,Jr)|0,_e=_e+Math.imul(me,qn)|0;var Ga=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,ue=Math.imul(Yt,Tt),K=Math.imul(Yt,Mt),K=K+Math.imul(jt,Tt)|0,_e=Math.imul(jt,Mt),ue=ue+Math.imul(We,ft)|0,K=K+Math.imul(We,kt)|0,K=K+Math.imul(mt,ft)|0,_e=_e+Math.imul(mt,kt)|0,ue=ue+Math.imul(ot,pr)|0,K=K+Math.imul(ot,Kr)|0,K=K+Math.imul(tt,pr)|0,_e=_e+Math.imul(tt,Kr)|0,ue=ue+Math.imul(Te,dn)|0,K=K+Math.imul(Te,xr)|0,K=K+Math.imul(Ve,dn)|0,_e=_e+Math.imul(Ve,xr)|0,ue=ue+Math.imul(we,Zr)|0,K=K+Math.imul(we,Cn)|0,K=K+Math.imul(Le,Zr)|0,_e=_e+Math.imul(Le,Cn)|0,ue=ue+Math.imul(ct,At)|0,K=K+Math.imul(ct,Vt)|0,K=K+Math.imul(et,At)|0,_e=_e+Math.imul(et,Vt)|0,ue=ue+Math.imul(it,Ut)|0,K=K+Math.imul(it,_r)|0,K=K+Math.imul(Oe,Ut)|0,_e=_e+Math.imul(Oe,_r)|0,ue=ue+Math.imul(De,Jr)|0,K=K+Math.imul(De,qn)|0,K=K+Math.imul(Ge,Jr)|0,_e=_e+Math.imul(Ge,qn)|0;var ss=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ss>>>26)|0,ss&=67108863,ue=Math.imul(Yt,ft),K=Math.imul(Yt,kt),K=K+Math.imul(jt,ft)|0,_e=Math.imul(jt,kt),ue=ue+Math.imul(We,pr)|0,K=K+Math.imul(We,Kr)|0,K=K+Math.imul(mt,pr)|0,_e=_e+Math.imul(mt,Kr)|0,ue=ue+Math.imul(ot,dn)|0,K=K+Math.imul(ot,xr)|0,K=K+Math.imul(tt,dn)|0,_e=_e+Math.imul(tt,xr)|0,ue=ue+Math.imul(Te,Zr)|0,K=K+Math.imul(Te,Cn)|0,K=K+Math.imul(Ve,Zr)|0,_e=_e+Math.imul(Ve,Cn)|0,ue=ue+Math.imul(we,At)|0,K=K+Math.imul(we,Vt)|0,K=K+Math.imul(Le,At)|0,_e=_e+Math.imul(Le,Vt)|0,ue=ue+Math.imul(ct,Ut)|0,K=K+Math.imul(ct,_r)|0,K=K+Math.imul(et,Ut)|0,_e=_e+Math.imul(et,_r)|0,ue=ue+Math.imul(it,Jr)|0,K=K+Math.imul(it,qn)|0,K=K+Math.imul(Oe,Jr)|0,_e=_e+Math.imul(Oe,qn)|0;var mo=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(mo>>>26)|0,mo&=67108863,ue=Math.imul(Yt,pr),K=Math.imul(Yt,Kr),K=K+Math.imul(jt,pr)|0,_e=Math.imul(jt,Kr),ue=ue+Math.imul(We,dn)|0,K=K+Math.imul(We,xr)|0,K=K+Math.imul(mt,dn)|0,_e=_e+Math.imul(mt,xr)|0,ue=ue+Math.imul(ot,Zr)|0,K=K+Math.imul(ot,Cn)|0,K=K+Math.imul(tt,Zr)|0,_e=_e+Math.imul(tt,Cn)|0,ue=ue+Math.imul(Te,At)|0,K=K+Math.imul(Te,Vt)|0,K=K+Math.imul(Ve,At)|0,_e=_e+Math.imul(Ve,Vt)|0,ue=ue+Math.imul(we,Ut)|0,K=K+Math.imul(we,_r)|0,K=K+Math.imul(Le,Ut)|0,_e=_e+Math.imul(Le,_r)|0,ue=ue+Math.imul(ct,Jr)|0,K=K+Math.imul(ct,qn)|0,K=K+Math.imul(et,Jr)|0,_e=_e+Math.imul(et,qn)|0;var sl=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(sl>>>26)|0,sl&=67108863,ue=Math.imul(Yt,dn),K=Math.imul(Yt,xr),K=K+Math.imul(jt,dn)|0,_e=Math.imul(jt,xr),ue=ue+Math.imul(We,Zr)|0,K=K+Math.imul(We,Cn)|0,K=K+Math.imul(mt,Zr)|0,_e=_e+Math.imul(mt,Cn)|0,ue=ue+Math.imul(ot,At)|0,K=K+Math.imul(ot,Vt)|0,K=K+Math.imul(tt,At)|0,_e=_e+Math.imul(tt,Vt)|0,ue=ue+Math.imul(Te,Ut)|0,K=K+Math.imul(Te,_r)|0,K=K+Math.imul(Ve,Ut)|0,_e=_e+Math.imul(Ve,_r)|0,ue=ue+Math.imul(we,Jr)|0,K=K+Math.imul(we,qn)|0,K=K+Math.imul(Le,Jr)|0,_e=_e+Math.imul(Le,qn)|0;var Eo=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Eo>>>26)|0,Eo&=67108863,ue=Math.imul(Yt,Zr),K=Math.imul(Yt,Cn),K=K+Math.imul(jt,Zr)|0,_e=Math.imul(jt,Cn),ue=ue+Math.imul(We,At)|0,K=K+Math.imul(We,Vt)|0,K=K+Math.imul(mt,At)|0,_e=_e+Math.imul(mt,Vt)|0,ue=ue+Math.imul(ot,Ut)|0,K=K+Math.imul(ot,_r)|0,K=K+Math.imul(tt,Ut)|0,_e=_e+Math.imul(tt,_r)|0,ue=ue+Math.imul(Te,Jr)|0,K=K+Math.imul(Te,qn)|0,K=K+Math.imul(Ve,Jr)|0,_e=_e+Math.imul(Ve,qn)|0;var ao=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ao>>>26)|0,ao&=67108863,ue=Math.imul(Yt,At),K=Math.imul(Yt,Vt),K=K+Math.imul(jt,At)|0,_e=Math.imul(jt,Vt),ue=ue+Math.imul(We,Ut)|0,K=K+Math.imul(We,_r)|0,K=K+Math.imul(mt,Ut)|0,_e=_e+Math.imul(mt,_r)|0,ue=ue+Math.imul(ot,Jr)|0,K=K+Math.imul(ot,qn)|0,K=K+Math.imul(tt,Jr)|0,_e=_e+Math.imul(tt,qn)|0;var Da=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Da>>>26)|0,Da&=67108863,ue=Math.imul(Yt,Ut),K=Math.imul(Yt,_r),K=K+Math.imul(jt,Ut)|0,_e=Math.imul(jt,_r),ue=ue+Math.imul(We,Jr)|0,K=K+Math.imul(We,qn)|0,K=K+Math.imul(mt,Jr)|0,_e=_e+Math.imul(mt,qn)|0;var bl=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(bl>>>26)|0,bl&=67108863,ue=Math.imul(Yt,Jr),K=Math.imul(Yt,qn),K=K+Math.imul(jt,Jr)|0,_e=Math.imul(jt,qn);var bo=(xe+ue|0)+((K&8191)<<13)|0;return xe=(_e+(K>>>13)|0)+(bo>>>26)|0,bo&=67108863,ye[0]=ri,ye[1]=Jn,ye[2]=Ii,ye[3]=Vi,ye[4]=ra,ye[5]=ha,ye[6]=va,ye[7]=Xi,ye[8]=oa,ye[9]=Ma,ye[10]=Ga,ye[11]=ss,ye[12]=mo,ye[13]=sl,ye[14]=Eo,ye[15]=ao,ye[16]=Da,ye[17]=bl,ye[18]=bo,xe!==0&&(ye[19]=xe,J.length++),J};Math.imul||(L=S);function w(j,q,U){U.negative=q.negative^j.negative,U.length=j.length+q.length;for(var J=0,ee=0,ce=0;ce>>26)|0,ee+=ye>>>26,ye&=67108863}U.words[ce]=xe,J=ye,ye=ee}return J!==0?U.words[ce]=J:U.length--,U.strip()}function A(j,q,U){var J=new T;return J.mulp(j,q,U)}f.prototype.mulTo=function(q,U){var J,ee=this.length+q.length;return this.length===10&&q.length===10?J=L(this,q,U):ee<63?J=S(this,q,U):ee<1024?J=w(this,q,U):J=A(this,q,U),J};function T(j,q){this.x=j,this.y=q}T.prototype.makeRBT=function(q){for(var U=new Array(q),J=f.prototype._countBits(q)-1,ee=0;ee>=1;return ee},T.prototype.permute=function(q,U,J,ee,ce,ye){for(var xe=0;xe>>1)ce++;return 1<>>13,J[2*ye+1]=ce&8191,ce=ce>>>13;for(ye=2*U;ye>=26,U+=ee/67108864|0,U+=ce>>>26,this.words[J]=ce&67108863}return U!==0&&(this.words[J]=U,this.length++),this.length=q===0?1:this.length,this},f.prototype.muln=function(q){return this.clone().imuln(q)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(q){var U=k(q);if(U.length===0)return new f(1);for(var J=this,ee=0;ee=0);var U=q%26,J=(q-U)/26,ee=67108863>>>26-U<<26-U,ce;if(U!==0){var ye=0;for(ce=0;ce>>26-U}ye&&(this.words[ce]=ye,this.length++)}if(J!==0){for(ce=this.length-1;ce>=0;ce--)this.words[ce+J]=this.words[ce];for(ce=0;ce=0);var ee;U?ee=(U-U%26)/26:ee=0;var ce=q%26,ye=Math.min((q-ce)/26,this.length),xe=67108863^67108863>>>ce<ye)for(this.length-=ye,K=0;K=0&&(_e!==0||K>=ee);K--){var ne=this.words[K]|0;this.words[K]=_e<<26-ce|ne>>>ce,_e=ne&xe}return ue&&_e!==0&&(ue.words[ue.length++]=_e),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(q,U,J){return u(this.negative===0),this.iushrn(q,U,J)},f.prototype.shln=function(q){return this.clone().ishln(q)},f.prototype.ushln=function(q){return this.clone().iushln(q)},f.prototype.shrn=function(q){return this.clone().ishrn(q)},f.prototype.ushrn=function(q){return this.clone().iushrn(q)},f.prototype.testn=function(q){u(typeof q=="number"&&q>=0);var U=q%26,J=(q-U)/26,ee=1<=0);var U=q%26,J=(q-U)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(U!==0&&J++,this.length=Math.min(J,this.length),U!==0){var ee=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},f.prototype.isubn=function(q){if(u(typeof q=="number"),u(q<67108864),q<0)return this.iaddn(-q);if(this.negative!==0)return this.negative=0,this.iaddn(q),this.negative=1,this;if(this.words[0]-=q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(ue/67108864|0),this.words[ce+J]=ye&67108863}for(;ce>26,this.words[ce+J]=ye&67108863;if(xe===0)return this.strip();for(u(xe===-1),xe=0,ce=0;ce>26,this.words[ce]=ye&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(q,U){var J=this.length-q.length,ee=this.clone(),ce=q,ye=ce.words[ce.length-1]|0,xe=this._countBits(ye);J=26-xe,J!==0&&(ce=ce.ushln(J),ee.iushln(J),ye=ce.words[ce.length-1]|0);var ue=ee.length-ce.length,K;if(U!=="mod"){K=new f(null),K.length=ue+1,K.words=new Array(K.length);for(var _e=0;_e=0;ae--){var pe=(ee.words[ce.length+ae]|0)*67108864+(ee.words[ce.length+ae-1]|0);for(pe=Math.min(pe/ye|0,67108863),ee._ishlnsubmul(ce,pe,ae);ee.negative!==0;)pe--,ee.negative=0,ee._ishlnsubmul(ce,1,ae),ee.isZero()||(ee.negative^=1);K&&(K.words[ae]=pe)}return K&&K.strip(),ee.strip(),U!=="div"&&J!==0&&ee.iushrn(J),{div:K||null,mod:ee}},f.prototype.divmod=function(q,U,J){if(u(!q.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var ee,ce,ye;return this.negative!==0&&q.negative===0?(ye=this.neg().divmod(q,U),U!=="mod"&&(ee=ye.div.neg()),U!=="div"&&(ce=ye.mod.neg(),J&&ce.negative!==0&&ce.iadd(q)),{div:ee,mod:ce}):this.negative===0&&q.negative!==0?(ye=this.divmod(q.neg(),U),U!=="mod"&&(ee=ye.div.neg()),{div:ee,mod:ye.mod}):(this.negative&q.negative)!==0?(ye=this.neg().divmod(q.neg(),U),U!=="div"&&(ce=ye.mod.neg(),J&&ce.negative!==0&&ce.isub(q)),{div:ye.div,mod:ce}):q.length>this.length||this.cmp(q)<0?{div:new f(0),mod:this}:q.length===1?U==="div"?{div:this.divn(q.words[0]),mod:null}:U==="mod"?{div:null,mod:new f(this.modn(q.words[0]))}:{div:this.divn(q.words[0]),mod:new f(this.modn(q.words[0]))}:this._wordDiv(q,U)},f.prototype.div=function(q){return this.divmod(q,"div",!1).div},f.prototype.mod=function(q){return this.divmod(q,"mod",!1).mod},f.prototype.umod=function(q){return this.divmod(q,"mod",!0).mod},f.prototype.divRound=function(q){var U=this.divmod(q);if(U.mod.isZero())return U.div;var J=U.div.negative!==0?U.mod.isub(q):U.mod,ee=q.ushrn(1),ce=q.andln(1),ye=J.cmp(ee);return ye<0||ce===1&&ye===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},f.prototype.modn=function(q){u(q<=67108863);for(var U=(1<<26)%q,J=0,ee=this.length-1;ee>=0;ee--)J=(U*J+(this.words[ee]|0))%q;return J},f.prototype.idivn=function(q){u(q<=67108863);for(var U=0,J=this.length-1;J>=0;J--){var ee=(this.words[J]|0)+U*67108864;this.words[J]=ee/q|0,U=ee%q}return this.strip()},f.prototype.divn=function(q){return this.clone().idivn(q)},f.prototype.egcd=function(q){u(q.negative===0),u(!q.isZero());var U=this,J=q.clone();U.negative!==0?U=U.umod(q):U=U.clone();for(var ee=new f(1),ce=new f(0),ye=new f(0),xe=new f(1),ue=0;U.isEven()&&J.isEven();)U.iushrn(1),J.iushrn(1),++ue;for(var K=J.clone(),_e=U.clone();!U.isZero();){for(var ne=0,ae=1;(U.words[0]&ae)===0&&ne<26;++ne,ae<<=1);if(ne>0)for(U.iushrn(ne);ne-- >0;)(ee.isOdd()||ce.isOdd())&&(ee.iadd(K),ce.isub(_e)),ee.iushrn(1),ce.iushrn(1);for(var pe=0,ie=1;(J.words[0]&ie)===0&&pe<26;++pe,ie<<=1);if(pe>0)for(J.iushrn(pe);pe-- >0;)(ye.isOdd()||xe.isOdd())&&(ye.iadd(K),xe.isub(_e)),ye.iushrn(1),xe.iushrn(1);U.cmp(J)>=0?(U.isub(J),ee.isub(ye),ce.isub(xe)):(J.isub(U),ye.isub(ee),xe.isub(ce))}return{a:ye,b:xe,gcd:J.iushln(ue)}},f.prototype._invmp=function(q){u(q.negative===0),u(!q.isZero());var U=this,J=q.clone();U.negative!==0?U=U.umod(q):U=U.clone();for(var ee=new f(1),ce=new f(0),ye=J.clone();U.cmpn(1)>0&&J.cmpn(1)>0;){for(var xe=0,ue=1;(U.words[0]&ue)===0&&xe<26;++xe,ue<<=1);if(xe>0)for(U.iushrn(xe);xe-- >0;)ee.isOdd()&&ee.iadd(ye),ee.iushrn(1);for(var K=0,_e=1;(J.words[0]&_e)===0&&K<26;++K,_e<<=1);if(K>0)for(J.iushrn(K);K-- >0;)ce.isOdd()&&ce.iadd(ye),ce.iushrn(1);U.cmp(J)>=0?(U.isub(J),ee.isub(ce)):(J.isub(U),ce.isub(ee))}var ne;return U.cmpn(1)===0?ne=ee:ne=ce,ne.cmpn(0)<0&&ne.iadd(q),ne},f.prototype.gcd=function(q){if(this.isZero())return q.abs();if(q.isZero())return this.abs();var U=this.clone(),J=q.clone();U.negative=0,J.negative=0;for(var ee=0;U.isEven()&&J.isEven();ee++)U.iushrn(1),J.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;J.isEven();)J.iushrn(1);var ce=U.cmp(J);if(ce<0){var ye=U;U=J,J=ye}else if(ce===0||J.cmpn(1)===0)break;U.isub(J)}while(!0);return J.iushln(ee)},f.prototype.invm=function(q){return this.egcd(q).a.umod(q)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(q){return this.words[0]&q},f.prototype.bincn=function(q){u(typeof q=="number");var U=q%26,J=(q-U)/26,ee=1<>>26,xe&=67108863,this.words[ye]=xe}return ce!==0&&(this.words[ye]=ce,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(q){var U=q<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var J;if(this.length>1)J=1;else{U&&(q=-q),u(q<=67108863,"Number is too big");var ee=this.words[0]|0;J=ee===q?0:eeq.length)return 1;if(this.length=0;J--){var ee=this.words[J]|0,ce=q.words[J]|0;if(ee!==ce){eece&&(U=1);break}}return U},f.prototype.gtn=function(q){return this.cmpn(q)===1},f.prototype.gt=function(q){return this.cmp(q)===1},f.prototype.gten=function(q){return this.cmpn(q)>=0},f.prototype.gte=function(q){return this.cmp(q)>=0},f.prototype.ltn=function(q){return this.cmpn(q)===-1},f.prototype.lt=function(q){return this.cmp(q)===-1},f.prototype.lten=function(q){return this.cmpn(q)<=0},f.prototype.lte=function(q){return this.cmp(q)<=0},f.prototype.eqn=function(q){return this.cmpn(q)===0},f.prototype.eq=function(q){return this.cmp(q)===0},f.red=function(q){return new O(q)},f.prototype.toRed=function(q){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),q.convertTo(this)._forceRed(q)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(q){return this.red=q,this},f.prototype.forceRed=function(q){return u(!this.red,"Already a number in reduction context"),this._forceRed(q)},f.prototype.redAdd=function(q){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,q)},f.prototype.redIAdd=function(q){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,q)},f.prototype.redSub=function(q){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,q)},f.prototype.redISub=function(q){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,q)},f.prototype.redShl=function(q){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,q)},f.prototype.redMul=function(q){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,q),this.red.mul(this,q)},f.prototype.redIMul=function(q){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,q),this.red.imul(this,q)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(q){return u(this.red&&!q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,q)};var m={k256:null,p224:null,p192:null,p25519:null};function F(j,q){this.name=j,this.p=new f(q,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var q=new f(null);return q.words=new Array(Math.ceil(this.n/13)),q},F.prototype.ireduce=function(q){var U=q,J;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),J=U.bitLength();while(J>this.n);var ee=J0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},F.prototype.split=function(q,U){q.iushrn(this.n,0,U)},F.prototype.imulK=function(q){return q.imul(this.k)};function E(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(E,F),E.prototype.split=function(q,U){for(var J=4194303,ee=Math.min(q.length,9),ce=0;ce>>22,ye=xe}ye>>>=22,q.words[ce-10]=ye,ye===0&&q.length>10?q.length-=10:q.length-=9},E.prototype.imulK=function(q){q.words[q.length]=0,q.words[q.length+1]=0,q.length+=2;for(var U=0,J=0;J>>=26,q.words[J]=ce,U=ee}return U!==0&&(q.words[q.length++]=U),q},f._prime=function(q){if(m[q])return m[q];var U;if(q==="k256")U=new E;else if(q==="p224")U=new I;else if(q==="p192")U=new R;else if(q==="p25519")U=new B;else throw new Error("Unknown prime "+q);return m[q]=U,U};function O(j){if(typeof j=="string"){var q=f._prime(j);this.m=q.p,this.prime=q}else u(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}O.prototype._verify1=function(q){u(q.negative===0,"red works only with positives"),u(q.red,"red works only with red numbers")},O.prototype._verify2=function(q,U){u((q.negative|U.negative)===0,"red works only with positives"),u(q.red&&q.red===U.red,"red works only with red numbers")},O.prototype.imod=function(q){return this.prime?this.prime.ireduce(q)._forceRed(this):q.umod(this.m)._forceRed(this)},O.prototype.neg=function(q){return q.isZero()?q.clone():this.m.sub(q)._forceRed(this)},O.prototype.add=function(q,U){this._verify2(q,U);var J=q.add(U);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},O.prototype.iadd=function(q,U){this._verify2(q,U);var J=q.iadd(U);return J.cmp(this.m)>=0&&J.isub(this.m),J},O.prototype.sub=function(q,U){this._verify2(q,U);var J=q.sub(U);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},O.prototype.isub=function(q,U){this._verify2(q,U);var J=q.isub(U);return J.cmpn(0)<0&&J.iadd(this.m),J},O.prototype.shl=function(q,U){return this._verify1(q),this.imod(q.ushln(U))},O.prototype.imul=function(q,U){return this._verify2(q,U),this.imod(q.imul(U))},O.prototype.mul=function(q,U){return this._verify2(q,U),this.imod(q.mul(U))},O.prototype.isqr=function(q){return this.imul(q,q.clone())},O.prototype.sqr=function(q){return this.mul(q,q)},O.prototype.sqrt=function(q){if(q.isZero())return q.clone();var U=this.m.andln(3);if(u(U%2===1),U===3){var J=this.m.add(new f(1)).iushrn(2);return this.pow(q,J)}for(var ee=this.m.subn(1),ce=0;!ee.isZero()&&ee.andln(1)===0;)ce++,ee.iushrn(1);u(!ee.isZero());var ye=new f(1).toRed(this),xe=ye.redNeg(),ue=this.m.subn(1).iushrn(1),K=this.m.bitLength();for(K=new f(2*K*K).toRed(this);this.pow(K,ue).cmp(xe)!==0;)K.redIAdd(xe);for(var _e=this.pow(K,ee),ne=this.pow(q,ee.addn(1).iushrn(1)),ae=this.pow(q,ee),pe=ce;ae.cmp(ye)!==0;){for(var ie=ae,le=0;ie.cmp(ye)!==0;le++)ie=ie.redSqr();u(le=0;ce--){for(var _e=U.words[ce],ne=K-1;ne>=0;ne--){var ae=_e>>ne&1;if(ye!==ee[0]&&(ye=this.sqr(ye)),ae===0&&xe===0){ue=0;continue}xe<<=1,xe|=ae,ue++,!(ue!==J&&(ce!==0||ne!==0))&&(ye=this.mul(ye,ee[xe]),ue=0,xe=0)}K=26}return ye},O.prototype.convertTo=function(q){var U=q.umod(this.m);return U===q?U.clone():U},O.prototype.convertFrom=function(q){var U=q.clone();return U.red=null,U},f.mont=function(q){return new V(q)};function V(j){O.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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)}c(V,O),V.prototype.convertTo=function(q){return this.imod(q.ushln(this.shift))},V.prototype.convertFrom=function(q){var U=this.imod(q.mul(this.rinv));return U.red=null,U},V.prototype.imul=function(q,U){if(q.isZero()||U.isZero())return q.words[0]=0,q.length=1,q;var J=q.imul(U),ee=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ce=J.isub(ee).iushrn(this.shift),ye=ce;return ce.cmp(this.m)>=0?ye=ce.isub(this.m):ce.cmpn(0)<0&&(ye=ce.iadd(this.m)),ye._forceRed(this)},V.prototype.mul=function(q,U){if(q.isZero()||U.isZero())return new f(0)._forceRed(this);var J=q.mul(U),ee=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ce=J.isub(ee).iushrn(this.shift),ye=ce;return ce.cmp(this.m)>=0?ye=ce.isub(this.m):ce.cmpn(0)<0&&(ye=ce.iadd(this.m)),ye._forceRed(this)},V.prototype.invm=function(q){var U=this.imod(q._invmp(this.m).mul(this.r2));return U._forceRed(this)}})(a,this)}),6204:(function(a){"use strict";a.exports=i;function i(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(T<=0)){var m,F=s.mallocDouble(2*T*w),E=s.mallocInt32(w);if(w=f(C,T,F,E),w>0){if(T===1&&L)l.init(w),m=l.sweepComplete(T,S,0,w,F,E,0,w,F,E);else{var I=s.mallocDouble(2*T*A),R=s.mallocInt32(A);A=f(k,T,I,R),A>0&&(l.init(w+A),T===1?m=l.sweepBipartite(T,S,0,w,F,E,0,A,I,R):m=u(T,S,L,w,F,E,A,I,R),s.free(I),s.free(R))}s.free(F),s.free(E)}return m}}}var g;function p(C,k){g.push([C,k])}function x(C){return g=[],v(C,C,p,!0),g}function _(C,k){return g=[],v(C,k,p,!1),g}function y(C,k,S){switch(arguments.length){case 1:return x(C);case 2:return typeof k=="function"?v(C,C,k,!0):_(C,k);case 3:return v(C,k,S,!1);default:throw new Error("box-intersect: Invalid arguments")}}}),2455:(function(a,i){"use strict";function o(){function u(v,g,p,x,_,y,C,k,S,L,w){for(var A=2*v,T=x,m=A*x;T<_;++T,m+=A){var F=y[g+m],E=y[g+m+v],I=C[T];e:for(var R=k,B=A*k;RS-k?u(v,g,p,x,_,y,C,k,S,L,w):c(v,g,p,x,_,y,C,k,S,L,w)}return f}function s(){function u(p,x,_,y,C,k,S,L,w,A,T){for(var m=2*p,F=y,E=m*y;FA-w?y?u(p,x,_,C,k,S,L,w,A,T,m):c(p,x,_,C,k,S,L,w,A,T,m):y?f(p,x,_,C,k,S,L,w,A,T,m):v(p,x,_,C,k,S,L,w,A,T,m)}return g}function l(u){return u?o():s()}i.partial=l(!1),i.full=l(!0)}),7150:(function(a,i,o){"use strict";a.exports=j;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,v=o(855),g=o(3545),p=o(8105),x=128,_=1<<22,y=1<<22,C=p("!(lo>=p0)&&!(p1>=hi)"),k=p("lo===p0"),S=p("lo0;){_e-=1;var pe=_e*T,ie=E[pe],le=E[pe+1],me=E[pe+2],be=E[pe+3],De=E[pe+4],Ge=E[pe+5],ht=_e*m,it=I[ht],Oe=I[ht+1],ze=Ge&1,ct=!!(Ge&16),et=ce,qe=ye,we=ue,Le=K;if(ze&&(et=ue,qe=K,we=ce,Le=ye),!(Ge&2&&(me=S(q,ie,le,me,et,qe,Oe),le>=me))&&!(Ge&4&&(le=L(q,ie,le,me,et,qe,it),le>=me))){var Ke=me-le,Te=De-be;if(ct){if(q*Ke*(Ke+Te)p&&_[A+g]>L;--w,A-=C){for(var T=A,m=A+C,F=0;F>>1,L=2*v,w=S,A=_[L*S+g];C=I?(w=E,A=I):F>=B?(w=m,A=F):(w=R,A=B):I>=B?(w=E,A=I):B>=F?(w=m,A=F):(w=R,A=B);for(var j=L*(k-1),q=L*w,O=0;O=p0)&&!(p1>=hi)":g};function o(p){return i[p]}function s(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m];if(I===S)if(T===E)T+=1,A+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function l(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m];if(IR;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function u(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+F];if(I<=S)if(T===E)T+=1,A+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function c(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+F];if(I<=S)if(T===E)T+=1,A+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function f(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m],R=C[w+F];if(I<=S&&S<=R)if(T===E)T+=1,A+=L;else{for(var B=0;L>B;++B){var O=C[w+B];C[w+B]=C[A],C[A++]=O}var V=k[E];k[E]=k[T],k[T++]=V}}return T}function v(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m],R=C[w+F];if(IB;++B){var O=C[w+B];C[w+B]=C[A],C[A++]=O}var V=k[E];k[E]=k[T],k[T++]=V}}return T}function g(p,x,_,y,C,k,S,L){for(var w=2*p,A=w*_,T=A,m=_,F=x,E=p+x,I=_;y>I;++I,A+=w){var R=C[A+F],B=C[A+E];if(!(R>=S)&&!(L>=B))if(m===I)m+=1,T+=w;else{for(var O=0;w>O;++O){var V=C[A+O];C[A+O]=C[T],C[T++]=V}var j=k[I];k[I]=k[m],k[m++]=j}}return m}}),4192:(function(a){"use strict";a.exports=o;var i=32;function o(x,_){_<=4*i?s(0,_-1,x):p(0,_-1,x)}function s(x,_,y){for(var C=2*(x+1),k=x+1;k<=_;++k){for(var S=y[C++],L=y[C++],w=k,A=C-2;w-- >x;){var T=y[A-2],m=y[A-1];if(Ty[_+1]:!0}function g(x,_,y,C){x*=2;var k=C[x];return k<_?!0:k===_?C[x+1]>1,w=L-C,A=L+C,T=k,m=w,F=L,E=A,I=S,R=x+1,B=_-1,O=0;v(T,m,y)&&(O=T,T=m,m=O),v(E,I,y)&&(O=E,E=I,I=O),v(T,F,y)&&(O=T,T=F,F=O),v(m,F,y)&&(O=m,m=F,F=O),v(T,E,y)&&(O=T,T=E,E=O),v(F,E,y)&&(O=F,F=E,E=O),v(m,I,y)&&(O=m,m=I,I=O),v(m,F,y)&&(O=m,m=F,F=O),v(E,I,y)&&(O=E,E=I,I=O);for(var V=y[2*m],j=y[2*m+1],q=y[2*E],U=y[2*E+1],J=2*T,ee=2*F,ce=2*I,ye=2*k,xe=2*L,ue=2*S,K=0;K<2;++K){var _e=y[J+K],ne=y[ee+K],ae=y[ce+K];y[ye+K]=_e,y[xe+K]=ne,y[ue+K]=ae}u(w,x,y),u(A,_,y);for(var pe=R;pe<=B;++pe)if(g(pe,V,j,y))pe!==R&&l(pe,R,y),++R;else if(!g(pe,q,U,y))for(;;)if(g(B,q,U,y)){g(B,V,j,y)?(c(pe,R,B,y),++R,--B):(l(pe,B,y),--B);break}else{if(--B>>1;u(C,ne);for(var ae=0,pe=0,xe=0;xe=c)ie=ie-c|0,S(p,x,pe--,ie);else if(ie>=0)S(v,g,ae--,ie);else if(ie<=-c){ie=-ie-c|0;for(var le=0;le>>1;u(C,ne);for(var ae=0,pe=0,ie=0,xe=0;xe>1===C[2*xe+3]>>1&&(me=2,xe+=1),le<0){for(var be=-(le>>1)-1,De=0;De>1)-1;me===0?S(v,g,ae--,be):me===1?S(p,x,pe--,be):me===2&&S(_,y,ie--,be)}}}function T(F,E,I,R,B,O,V,j,q,U,J,ee){var ce=0,ye=2*F,xe=E,ue=E+F,K=1,_e=1;R?_e=c:K=c;for(var ne=B;ne>>1;u(C,le);for(var me=0,ne=0;ne=c?(De=!R,ae-=c):(De=!!R,ae-=1),De)L(v,g,me++,ae);else{var Ge=ee[ae],ht=ye*ae,it=J[ht+E+1],Oe=J[ht+E+1+F];e:for(var ze=0;ze>>1;u(C,ae);for(var pe=0,ue=0;ue=c)v[pe++]=K-c;else{K-=1;var le=J[K],me=ce*K,be=U[me+E+1],De=U[me+E+1+F];e:for(var Ge=0;Ge=0;--Ge)if(v[Ge]===K){for(var ze=Ge+1;ze0;){for(var k=g.pop(),_=g.pop(),S=-1,L=-1,y=x[_],A=1;A=0||(v.flip(_,k),u(f,v,g,S,_,L),u(f,v,g,_,L,S),u(f,v,g,L,k,S),u(f,v,g,k,S,L))}}}),5023:(function(a,i,o){"use strict";var s=o(2478);a.exports=g;function l(p,x,_,y,C,k,S){this.cells=p,this.neighbor=x,this.flags=y,this.constraint=_,this.active=C,this.next=k,this.boundary=S}var u=l.prototype;function c(p,x){return p[0]-x[0]||p[1]-x[1]||p[2]-x[2]}u.locate=(function(){var p=[0,0,0];return function(x,_,y){var C=x,k=_,S=y;return _0||S.length>0;){for(;k.length>0;){var m=k.pop();if(L[m]!==-C){L[m]=C;for(var F=w[m],E=0;E<3;++E){var I=T[3*m+E];I>=0&&L[I]===0&&(A[3*m+E]?S.push(I):(k.push(I),L[I]=C))}}}var R=S;S=k,k=R,S.length=0,C=-C}var B=v(w,L,x);return _?B.concat(y.boundary):B}}),8902:(function(a,i,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;a.exports=S;function v(L,w,A,T,m){this.a=L,this.b=w,this.idx=A,this.lowerIds=T,this.upperIds=m}function g(L,w,A,T){this.a=L,this.b=w,this.type=A,this.idx=T}function p(L,w){var A=L.a[0]-w.a[0]||L.a[1]-w.a[1]||L.type-w.type;return A||L.type!==u&&(A=l(L.a,L.b,w.b),A)?A:L.idx-w.idx}function x(L,w){return l(L.a,L.b,w)}function _(L,w,A,T,m){for(var F=s.lt(w,T,x),E=s.gt(w,T,x),I=F;I1&&l(A[B[V-2]],A[B[V-1]],T)>0;)L.push([B[V-1],B[V-2],m]),V-=1;B.length=V,B.push(m);for(var O=R.upperIds,V=O.length;V>1&&l(A[O[V-2]],A[O[V-1]],T)<0;)L.push([O[V-2],O[V-1],m]),V-=1;O.length=V,O.push(m)}}function y(L,w){var A;return L.a[0]R[0]&&m.push(new g(R,I,f,F),new g(I,R,c,F))}m.sort(p);for(var B=m[0].a[0]-(1+Math.abs(m[0].a[0]))*Math.pow(2,-52),O=[new v([B,1],[B,0],-1,[],[],[],[])],V=[],F=0,j=m.length;F=0}})(),u.removeTriangle=function(v,g,p){var x=this.stars;c(x[v],g,p),c(x[g],p,v),c(x[p],v,g)},u.addTriangle=function(v,g,p){var x=this.stars;x[v].push(g,p),x[g].push(p,v),x[p].push(v,g)},u.opposite=function(v,g){for(var p=this.stars[g],x=1,_=p.length;x<_;x+=2)if(p[x]===v)return p[x-1];return-1},u.flip=function(v,g){var p=this.opposite(v,g),x=this.opposite(g,v);this.removeTriangle(v,g,p),this.removeTriangle(g,v,x),this.addTriangle(v,x,p),this.addTriangle(g,p,x)},u.edges=function(){for(var v=this.stars,g=[],p=0,x=v.length;p=0;--q){var _e=V[q];U=_e[0];var ne=B[U],ae=ne[0],pe=ne[1],ie=R[ae],le=R[pe];if((ie[0]-le[0]||ie[1]-le[1])<0){var me=ae;ae=pe,pe=me}ne[0]=ae;var be=ne[1]=_e[1],De;for(j&&(De=ne[2]);q>0&&V[q-1][0]===U;){var _e=V[--q],Ge=_e[1];j?B.push([be,Ge,De]):B.push([be,Ge]),be=Ge}j?B.push([be,pe,De]):B.push([be,pe])}return J}function w(R,B,O){for(var V=B.length,j=new s(V),q=[],U=0;UB[2]?1:0)}function m(R,B,O){if(R.length!==0){if(B)for(var V=0;V0||U.length>0}function I(R,B,O){var V;if(O){V=B;for(var j=new Array(B.length),q=0;qL+1)throw new Error(k+" map requires nshades to be at least size "+C.length);Array.isArray(g.alpha)?g.alpha.length!==2?w=[1,1]:w=g.alpha.slice():typeof g.alpha=="number"?w=[g.alpha,g.alpha]:w=[1,1],p=C.map(function(I){return Math.round(I.index*L)}),w[0]=Math.min(Math.max(w[0],0),1),w[1]=Math.min(Math.max(w[1],0),1);var T=C.map(function(I,R){var B=C[R].index,O=C[R].rgb.slice();return O.length===4&&O[3]>=0&&O[3]<=1||(O[3]=w[0]+(w[1]-w[0])*B),O}),m=[];for(A=0;A=0}function g(p,x,_,y){var C=s(x,_,y);if(C===0){var k=l(s(p,x,_)),S=l(s(p,x,y));if(k===S){if(k===0){var L=v(p,x,_),w=v(p,x,y);return L===w?0:L?1:-1}return 0}else{if(S===0)return k>0||v(p,x,y)?-1:1;if(k===0)return S>0||v(p,x,_)?1:-1}return l(S-k)}var A=s(p,x,_);if(A>0)return C>0&&s(p,x,y)>0?1:-1;if(A<0)return C>0||s(p,x,y)>0?1:-1;var T=s(p,x,y);return T>0||v(p,x,_)?1:-1}}),8572:(function(a){"use strict";a.exports=function(o){return o<0?-1:o>0?1:0}}),8507:(function(a){a.exports=s;var i=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||i(l[0],l[1])-i(u[0],u[1]);case 3:var v=l[0]+l[1],g=u[0]+u[1];if(f=v+l[2]-(g+u[2]),f)return f;var p=i(l[0],l[1]),x=i(u[0],u[1]);return i(p,l[2])-i(x,u[2])||i(p+l[2],v)-i(x+u[2],g);case 4:var _=l[0],y=l[1],C=l[2],k=l[3],S=u[0],L=u[1],w=u[2],A=u[3];return _+y+C+k-(S+L+w+A)||i(_,y,C,k)-i(S,L,w,A,S)||i(_+y,_+C,_+k,y+C,y+k,C+k)-i(S+L,S+w,S+A,L+w,L+A,w+A)||i(_+y+C,_+y+k,_+C+k,y+C+k)-i(S+L+w,S+L+A,S+w+A,L+w+A);default:for(var T=l.slice().sort(o),m=u.slice().sort(o),F=0;Fo[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}}),4750:(function(a,i,o){"use strict";a.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var v=new Array(f),g=c[f-1],p=0;p=g[S]&&(k+=1);y[C]=k}}return v}function f(v,g){try{return s(v,!0)}catch(y){var p=l(v);if(p.length<=g)return[];var x=u(v,p),_=s(x,!0);return c(_,p)}}}),4769:(function(a){"use strict";function i(s,l,u,c,f,v){var g=6*f*f-6*f,p=3*f*f-4*f+1,x=-6*f*f+6*f,_=3*f*f-2*f;if(s.length){v||(v=new Array(s.length));for(var y=s.length-1;y>=0;--y)v[y]=g*s[y]+p*l[y]+x*u[y]+_*c[y];return v}return g*s+p*l+x*u[y]+_*c}function o(s,l,u,c,f,v){var g=f-1,p=f*f,x=g*g,_=(1+2*f)*x,y=f*x,C=p*(3-2*f),k=p*g;if(s.length){v||(v=new Array(s.length));for(var S=s.length-1;S>=0;--S)v[S]=_*s[S]+y*l[S]+C*u[S]+k*c[S];return v}return _*s+y*l+C*u+k*c}a.exports=o,a.exports.derivative=i}),7642:(function(a,i,o){"use strict";var s=o(8954),l=o(1682);a.exports=v;function u(g,p){this.point=g,this.index=p}function c(g,p){for(var x=g.point,_=p.point,y=x.length,C=0;C=2)return!1;O[j]=q}return!0}):B=B.filter(function(O){for(var V=0;V<=_;++V){var j=F[O[V]];if(j<0)return!1;O[V]=j}return!0}),_&1)for(var k=0;k>>31},a.exports.exponent=function(C){var k=a.exports.hi(C);return(k<<1>>>21)-1023},a.exports.fraction=function(C){var k=a.exports.lo(C),S=a.exports.hi(C),L=S&(1<<20)-1;return S&2146435072&&(L+=1048576),[k,L]},a.exports.denormalized=function(C){var k=a.exports.hi(C);return!(k&2146435072)}}),1338:(function(a){"use strict";function i(l,u,c){var f=l[c]|0;if(f<=0)return[];var v=new Array(f),g;if(c===l.length-1)for(g=0;g0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return i(l,u,0);break}return[]}a.exports=s}),3134:(function(a,i,o){"use strict";a.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var v=0;v=_-1)for(var A=k.length-1,m=p-x[_-1],T=0;T=_-1)for(var w=k.length-1,A=p-x[_-1],T=0;T=0;--_)if(p[--x])return!1;return!0},f.jump=function(p){var x=this.lastT(),_=this.dimension;if(!(p0;--T)y.push(u(L[T-1],w[T-1],arguments[T])),C.push(0)}},f.push=function(p){var x=this.lastT(),_=this.dimension;if(!(p1e-6?1/S:0;this._time.push(p);for(var m=_;m>0;--m){var F=u(w[m-1],A[m-1],arguments[m]);y.push(F),C.push((F-y[k++])*T)}}},f.set=function(p){var x=this.dimension;if(!(p0;--L)_.push(u(k[L-1],S[L-1],arguments[L])),y.push(0)}},f.move=function(p){var x=this.lastT(),_=this.dimension;if(!(p<=x||arguments.length!==_+1)){var y=this._state,C=this._velocity,k=y.length-this.dimension,S=this.bounds,L=S[0],w=S[1],A=p-x,T=A>1e-6?1/A:0;this._time.push(p);for(var m=_;m>0;--m){var F=arguments[m];y.push(u(L[m-1],w[m-1],y[k++]+F)),C.push(F*T)}}},f.idle=function(p){var x=this.lastT();if(!(p=0;--T)y.push(u(L[T],w[T],y[k]+A*C[k])),C.push(0),k+=1}};function v(p){for(var x=new Array(p),_=0;_=0;--R){var m=F[R];E[R]<=0?F[R]=new s(m._color,m.key,m.value,F[R+1],m.right,m._count+1):F[R]=new s(m._color,m.key,m.value,m.left,F[R+1],m._count+1)}for(var R=F.length-1;R>1;--R){var B=F[R-1],m=F[R];if(B._color===o||m._color===o)break;var O=F[R-2];if(O.left===B)if(B.left===m){var V=O.right;if(V&&V._color===i)B._color=o,O.right=u(o,V),O._color=i,R-=1;else{if(O._color=i,O.left=B.right,B._color=o,B.right=O,F[R-2]=B,F[R-1]=m,c(O),c(B),R>=3){var j=F[R-3];j.left===O?j.left=B:j.right=B}break}}else{var V=O.right;if(V&&V._color===i)B._color=o,O.right=u(o,V),O._color=i,R-=1;else{if(B.right=m.left,O._color=i,O.left=m.right,m._color=o,m.left=B,m.right=O,F[R-2]=m,F[R-1]=B,c(O),c(B),c(m),R>=3){var j=F[R-3];j.left===O?j.left=m:j.right=m}break}}else if(B.right===m){var V=O.left;if(V&&V._color===i)B._color=o,O.left=u(o,V),O._color=i,R-=1;else{if(O._color=i,O.right=B.left,B._color=o,B.left=O,F[R-2]=B,F[R-1]=m,c(O),c(B),R>=3){var j=F[R-3];j.right===O?j.right=B:j.left=B}break}}else{var V=O.left;if(V&&V._color===i)B._color=o,O.left=u(o,V),O._color=i,R-=1;else{if(B.left=m.right,O._color=i,O.right=m.left,m._color=o,m.right=B,m.left=O,F[R-2]=m,F[R-1]=B,c(O),c(B),c(m),R>=3){var j=F[R-3];j.right===O?j.right=m:j.left=m}break}}}return F[0]._color=o,new f(T,F[0])};function g(w,A){if(A.left){var T=g(w,A.left);if(T)return T}var T=w(A.key,A.value);if(T)return T;if(A.right)return g(w,A.right)}function p(w,A,T,m){var F=A(w,m.key);if(F<=0){if(m.left){var E=p(w,A,T,m.left);if(E)return E}var E=T(m.key,m.value);if(E)return E}if(m.right)return p(w,A,T,m.right)}function x(w,A,T,m,F){var E=T(w,F.key),I=T(A,F.key),R;if(E<=0&&(F.left&&(R=x(w,A,T,m,F.left),R)||I>0&&(R=m(F.key,F.value),R)))return R;if(I>0&&F.right)return x(w,A,T,m,F.right)}v.forEach=function(A,T,m){if(this.root)switch(arguments.length){case 1:return g(A,this.root);case 2:return p(T,this._compare,A,this.root);case 3:return this._compare(T,m)>=0?void 0:x(T,m,this._compare,A,this.root)}},Object.defineProperty(v,"begin",{get:function(){for(var w=[],A=this.root;A;)w.push(A),A=A.left;return new _(this,w)}}),Object.defineProperty(v,"end",{get:function(){for(var w=[],A=this.root;A;)w.push(A),A=A.right;return new _(this,w)}}),v.at=function(w){if(w<0)return new _(this,[]);for(var A=this.root,T=[];;){if(T.push(A),A.left){if(w=A.right._count)break;A=A.right}else break}return new _(this,[])},v.ge=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E<=0&&(F=m.length),E<=0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.gt=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E<0&&(F=m.length),E<0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.lt=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E>0&&(F=m.length),E<=0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.le=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E>=0&&(F=m.length),E<0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.find=function(w){for(var A=this._compare,T=this.root,m=[];T;){var F=A(w,T.key);if(m.push(T),F===0)return new _(this,m);F<=0?T=T.left:T=T.right}return new _(this,[])},v.remove=function(w){var A=this.find(w);return A?A.remove():this},v.get=function(w){for(var A=this._compare,T=this.root;T;){var m=A(w,T.key);if(m===0)return T.value;m<=0?T=T.left:T=T.right}};function _(w,A){this.tree=w,this._stack=A}var y=_.prototype;Object.defineProperty(y,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(y,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),y.clone=function(){return new _(this.tree,this._stack.slice())};function C(w,A){w.key=A.key,w.value=A.value,w.left=A.left,w.right=A.right,w._color=A._color,w._count=A._count}function k(w){for(var A,T,m,F,E=w.length-1;E>=0;--E){if(A=w[E],E===0){A._color=o;return}if(T=w[E-1],T.left===A){if(m=T.right,m.right&&m.right._color===i){if(m=T.right=l(m),F=m.right=l(m.right),T.right=m.left,m.left=T,m.right=F,m._color=T._color,A._color=o,T._color=o,F._color=o,c(T),c(m),E>1){var I=w[E-2];I.left===T?I.left=m:I.right=m}w[E-1]=m;return}else if(m.left&&m.left._color===i){if(m=T.right=l(m),F=m.left=l(m.left),T.right=F.left,m.left=F.right,F.left=T,F.right=m,F._color=T._color,T._color=o,m._color=o,A._color=o,c(T),c(m),c(F),E>1){var I=w[E-2];I.left===T?I.left=F:I.right=F}w[E-1]=F;return}if(m._color===o)if(T._color===i){T._color=o,T.right=u(i,m);return}else{T.right=u(i,m);continue}else{if(m=l(m),T.right=m.left,m.left=T,m._color=T._color,T._color=i,c(T),c(m),E>1){var I=w[E-2];I.left===T?I.left=m:I.right=m}w[E-1]=m,w[E]=T,E+11){var I=w[E-2];I.right===T?I.right=m:I.left=m}w[E-1]=m;return}else if(m.right&&m.right._color===i){if(m=T.left=l(m),F=m.right=l(m.right),T.left=F.right,m.right=F.left,F.right=T,F.left=m,F._color=T._color,T._color=o,m._color=o,A._color=o,c(T),c(m),c(F),E>1){var I=w[E-2];I.right===T?I.right=F:I.left=F}w[E-1]=F;return}if(m._color===o)if(T._color===i){T._color=o,T.left=u(i,m);return}else{T.left=u(i,m);continue}else{if(m=l(m),T.left=m.right,m.right=T,m._color=T._color,T._color=i,c(T),c(m),E>1){var I=w[E-2];I.right===T?I.right=m:I.left=m}w[E-1]=m,w[E]=T,E+1=0;--m){var T=w[m];T.left===w[m+1]?A[m]=new s(T._color,T.key,T.value,A[m+1],T.right,T._count):A[m]=new s(T._color,T.key,T.value,T.left,A[m+1],T._count)}if(T=A[A.length-1],T.left&&T.right){var F=A.length;for(T=T.left;T.right;)A.push(T),T=T.right;var E=A[F-1];A.push(new s(T._color,E.key,E.value,T.left,T.right,T._count)),A[F-1].key=T.key,A[F-1].value=T.value;for(var m=A.length-2;m>=F;--m)T=A[m],A[m]=new s(T._color,T.key,T.value,T.left,A[m+1],T._count);A[F-1].left=A[F]}if(T=A[A.length-1],T._color===i){var I=A[A.length-2];I.left===T?I.left=null:I.right===T&&(I.right=null),A.pop();for(var m=0;m0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(y,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(y,"index",{get:function(){var w=0,A=this._stack;if(A.length===0){var T=this.tree.root;return T?T._count:0}else A[A.length-1].left&&(w=A[A.length-1].left._count);for(var m=A.length-2;m>=0;--m)A[m+1]===A[m].right&&(++w,A[m].left&&(w+=A[m].left._count));return w},enumerable:!0}),y.next=function(){var w=this._stack;if(w.length!==0){var A=w[w.length-1];if(A.right)for(A=A.right;A;)w.push(A),A=A.left;else for(w.pop();w.length>0&&w[w.length-1].right===A;)A=w[w.length-1],w.pop()}},Object.defineProperty(y,"hasNext",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].right)return!0;for(var A=w.length-1;A>0;--A)if(w[A-1].left===w[A])return!0;return!1}}),y.update=function(w){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var T=new Array(A.length),m=A[A.length-1];T[T.length-1]=new s(m._color,m.key,w,m.left,m.right,m._count);for(var F=A.length-2;F>=0;--F)m=A[F],m.left===A[F+1]?T[F]=new s(m._color,m.key,m.value,T[F+1],m.right,m._count):T[F]=new s(m._color,m.key,m.value,m.left,T[F+1],m._count);return new f(this.tree._compare,T[0])},y.prev=function(){var w=this._stack;if(w.length!==0){var A=w[w.length-1];if(A.left)for(A=A.left;A;)w.push(A),A=A.right;else for(w.pop();w.length>0&&w[w.length-1].left===A;)A=w[w.length-1],w.pop()}},Object.defineProperty(y,"hasPrev",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].left)return!0;for(var A=w.length-1;A>0;--A)if(w[A-1].right===w[A])return!0;return!1}});function S(w,A){return wA?1:0}function L(w){return new f(w||S,null)}}),3837:(function(a,i,o){"use strict";a.exports=R;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),v=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),g=ArrayBuffer,p=DataView;function x(B){return g.isView(B)&&!(B instanceof p)}function _(B){return Array.isArray(B)||x(B)}function y(B,O){return B[0]=O[0],B[1]=O[1],B[2]=O[2],B}function C(B){this.gl=B,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=u(B)}var k=C.prototype;k.update=function(B){B=B||{};function O(ae,pe,ie){if(ie in B){var le=B[ie],me=this[ie],be;(ae?_(le)&&_(le[0]):_(le))?this[ie]=be=[pe(le[0]),pe(le[1]),pe(le[2])]:this[ie]=be=[pe(le),pe(le),pe(le)];for(var De=0;De<3;++De)if(be[De]!==me[De])return!0}return!1}var V=O.bind(this,!1,Number),j=O.bind(this,!1,Boolean),q=O.bind(this,!1,String),U=O.bind(this,!0,function(ae){if(_(ae)){if(ae.length===3)return[+ae[0],+ae[1],+ae[2],1];if(ae.length===4)return[+ae[0],+ae[1],+ae[2],+ae[3]]}return[0,0,0,1]}),J,ee=!1,ce=!1;if("bounds"in B)for(var ye=B.bounds,xe=0;xe<2;++xe)for(var ue=0;ue<3;++ue)ye[xe][ue]!==this.bounds[xe][ue]&&(ce=!0),this.bounds[xe][ue]=ye[xe][ue];if("ticks"in B){J=B.ticks,ee=!0,this.autoTicks=!1;for(var xe=0;xe<3;++xe)this.tickSpacing[xe]=0}else V("tickSpacing")&&(this.autoTicks=!0,ce=!0);if(this._firstInit&&("ticks"in B||"tickSpacing"in B||(this.autoTicks=!0),ce=!0,ee=!0,this._firstInit=!1),ce&&this.autoTicks&&(J=f.create(this.bounds,this.tickSpacing),ee=!0),ee){for(var xe=0;xe<3;++xe)J[xe].sort(function(pe,ie){return pe.x-ie.x});f.equal(J,this.ticks)?ee=!1:this.ticks=J}j("tickEnable"),q("tickFont")&&(ee=!0),q("tickFontStyle")&&(ee=!0),q("tickFontWeight")&&(ee=!0),q("tickFontVariant")&&(ee=!0),V("tickSize"),V("tickAngle"),V("tickPad"),U("tickColor");var K=q("labels");q("labelFont")&&(K=!0),q("labelFontStyle")&&(K=!0),q("labelFontWeight")&&(K=!0),q("labelFontVariant")&&(K=!0),j("labelEnable"),V("labelSize"),V("labelPad"),U("labelColor"),j("lineEnable"),j("lineMirror"),V("lineWidth"),U("lineColor"),j("lineTickEnable"),j("lineTickMirror"),V("lineTickLength"),V("lineTickWidth"),U("lineTickColor"),j("gridEnable"),V("gridWidth"),U("gridColor"),j("zeroEnable"),U("zeroLineColor"),V("zeroLineWidth"),j("backgroundEnable"),U("backgroundColor");var _e=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],ne=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(K||ee)&&this._text.update(this.bounds,this.labels,_e,this.ticks,ne):this._text=s(this.gl,this.bounds,this.labels,_e,this.ticks,ne),this._lines&&ee&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function S(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new S,new S,new S];function w(B,O,V,j,q){for(var U=B.primalOffset,J=B.primalMinor,ee=B.mirrorOffset,ce=B.mirrorMinor,ye=j[O],xe=0;xe<3;++xe)if(O!==xe){var ue=U,K=ee,_e=J,ne=ce;ye&1<0?(_e[xe]=-1,ne[xe]=0):(_e[xe]=0,ne[xe]=1)}}var A=[0,0,0],T={model:v,view:v,projection:v,_ortho:!1};k.isOpaque=function(){return!0},k.isTransparent=function(){return!1},k.drawTransparent=function(B){};var m=0,F=[0,0,0],E=[0,0,0],I=[0,0,0];k.draw=function(B){B=B||T;for(var ie=this.gl,O=B.model||v,V=B.view||v,j=B.projection||v,q=this.bounds,U=B._ortho||!1,J=c(O,V,j,q,U),ee=J.cubeEdges,ce=J.axis,ye=V[12],xe=V[13],ue=V[14],K=V[15],_e=U?2:1,ne=_e*this.pixelRatio*(j[3]*ye+j[7]*xe+j[11]*ue+j[15]*K)/ie.drawingBufferHeight,ae=0;ae<3;++ae)this.lastCubeProps.cubeEdges[ae]=ee[ae],this.lastCubeProps.axis[ae]=ce[ae];for(var pe=L,ae=0;ae<3;++ae)w(L[ae],ae,this.bounds,ee,ce);for(var ie=this.gl,le=A,ae=0;ae<3;++ae)this.backgroundEnable[ae]?le[ae]=ce[ae]:le[ae]=0;this._background.draw(O,V,j,q,le,this.backgroundColor),this._lines.bind(O,V,j,this);for(var ae=0;ae<3;++ae){var me=[0,0,0];ce[ae]>0?me[ae]=q[1][ae]:me[ae]=q[0][ae];for(var be=0;be<2;++be){var De=(ae+1+be)%3,Ge=(ae+1+(be^1))%3;this.gridEnable[De]&&this._lines.drawGrid(De,Ge,this.bounds,me,this.gridColor[De],this.gridWidth[De]*this.pixelRatio)}for(var be=0;be<2;++be){var De=(ae+1+be)%3,Ge=(ae+1+(be^1))%3;this.zeroEnable[Ge]&&Math.min(q[0][Ge],q[1][Ge])<=0&&Math.max(q[0][Ge],q[1][Ge])>=0&&this._lines.drawZero(De,Ge,this.bounds,me,this.zeroLineColor[Ge],this.zeroLineWidth[Ge]*this.pixelRatio)}}for(var ae=0;ae<3;++ae){this.lineEnable[ae]&&this._lines.drawAxisLine(ae,this.bounds,pe[ae].primalOffset,this.lineColor[ae],this.lineWidth[ae]*this.pixelRatio),this.lineMirror[ae]&&this._lines.drawAxisLine(ae,this.bounds,pe[ae].mirrorOffset,this.lineColor[ae],this.lineWidth[ae]*this.pixelRatio);for(var ht=y(F,pe[ae].primalMinor),it=y(E,pe[ae].mirrorMinor),Oe=this.lineTickLength,be=0;be<3;++be){var ze=ne/O[5*be];ht[be]*=Oe[be]*ze,it[be]*=Oe[be]*ze}this.lineTickEnable[ae]&&this._lines.drawAxisTicks(ae,pe[ae].primalOffset,ht,this.lineTickColor[ae],this.lineTickWidth[ae]*this.pixelRatio),this.lineTickMirror[ae]&&this._lines.drawAxisTicks(ae,pe[ae].mirrorOffset,it,this.lineTickColor[ae],this.lineTickWidth[ae]*this.pixelRatio)}this._lines.unbind(),this._text.bind(O,V,j,this.pixelRatio);var ct,et=.5,qe,we;function Le(tt){we=[0,0,0],we[tt]=1}function Ke(tt,nt,We){var mt=(tt+1)%3,bt=(tt+2)%3,Yt=nt[mt],jt=nt[bt],mr=We[mt],or=We[bt];if(Yt>0&&or>0){Le(mt);return}else if(Yt>0&&or<0){Le(mt);return}else if(Yt<0&&or>0){Le(mt);return}else if(Yt<0&&or<0){Le(mt);return}else if(jt>0&&mr>0){Le(bt);return}else if(jt>0&&mr<0){Le(bt);return}else if(jt<0&&mr>0){Le(bt);return}else if(jt<0&&mr<0){Le(bt);return}}for(var ae=0;ae<3;++ae){for(var Te=pe[ae].primalMinor,Ve=pe[ae].mirrorMinor,$e=y(I,pe[ae].primalOffset),be=0;be<3;++be)this.lineTickEnable[ae]&&($e[be]+=ne*Te[be]*Math.max(this.lineTickLength[be],0)/O[5*be]);var ot=[0,0,0];if(ot[ae]=1,this.tickEnable[ae]){this.tickAngle[ae]===-3600?(this.tickAngle[ae]=0,this.tickAlign[ae]="auto"):this.tickAlign[ae]=-1,qe=1,ct=[this.tickAlign[ae],et,qe],ct[0]==="auto"?ct[0]=m:ct[0]=parseInt(""+ct[0]),we=[0,0,0],Ke(ae,Te,Ve);for(var be=0;be<3;++be)$e[be]+=ne*Te[be]*this.tickPad[be]/O[5*be];this._text.drawTicks(ae,this.tickSize[ae],this.tickAngle[ae],$e,this.tickColor[ae],ot,we,ct)}if(this.labelEnable[ae]){qe=0,we=[0,0,0],this.labels[ae].length>4&&(Le(ae),qe=1),ct=[this.labelAlign[ae],et,qe],ct[0]==="auto"?ct[0]=m:ct[0]=parseInt(""+ct[0]);for(var be=0;be<3;++be)$e[be]+=ne*Te[be]*this.labelPad[be]/O[5*be];$e[ae]+=.5*(q[0][ae]+q[1][ae]),this._text.drawLabel(ae,this.labelSize[ae],this.labelAngle[ae],$e,this.labelColor[ae],[0,0,0],we,ct)}}this._text.unbind()},k.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function R(B,O){var V=new C(B);return V.update(O),V}}),5304:(function(a,i,o){"use strict";a.exports=v;var s=o(2762),l=o(8116),u=o(1879).bg;function c(g,p,x,_){this.gl=g,this.buffer=p,this.vao=x,this.shader=_}var f=c.prototype;f.draw=function(g,p,x,_,y,C){for(var k=!1,S=0;S<3;++S)k=k||y[S];if(k){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:g,view:p,projection:x,bounds:_,enable:y,colors:C},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function v(g){for(var p=[],x=[],_=0,y=0;y<3;++y)for(var C=(y+1)%3,k=(y+2)%3,S=[0,0,0],L=[0,0,0],w=-1;w<=1;w+=2){x.push(_,_+2,_+1,_+1,_+2,_+3),S[y]=w,L[y]=w;for(var A=-1;A<=1;A+=2){S[C]=A;for(var T=-1;T<=1;T+=2)S[k]=T,p.push(S[0],S[1],S[2],L[0],L[1],L[2]),_+=1}var m=C;C=k,k=m}var F=s(g,new Float32Array(p)),E=s(g,new Uint16Array(x),g.ELEMENT_ARRAY_BUFFER),I=l(g,[{buffer:F,type:g.FLOAT,size:3,offset:0,stride:24},{buffer:F,type:g.FLOAT,size:3,offset:12,stride:24}],E),R=u(g);return R.attributes.position.location=0,R.attributes.normal.location=1,new c(g,F,I,R)}}),6429:(function(a,i,o){"use strict";a.exports=w;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),v=new Array(8),g=new Array(8),p=new Array(3),x=[0,0,0];(function(){for(var A=0;A<8;++A)v[A]=[1,1,1,1],g[A]=[1,1,1]})();function _(A,T,m){for(var F=0;F<4;++F){A[F]=m[12+F];for(var E=0;E<3;++E)A[F]+=T[E]*m[4*E+F]}}var y=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function C(A){for(var T=0;Tce&&(V|=1<ce){V|=1<g[R][1])&&(pe=R);for(var ie=-1,R=0;R<3;++R){var le=pe^1<g[me][0]&&(me=le)}}var be=k;be[0]=be[1]=be[2]=0,be[s.log2(ie^pe)]=pe&ie,be[s.log2(pe^me)]=pe&me;var De=me^7;De===V||De===ae?(De=ie^7,be[s.log2(me^De)]=De&me):be[s.log2(ie^De)]=De&ie;for(var Ge=S,ht=V,U=0;U<3;++U)ht&1<=0;--le){var ze=oe[Pe[le]];T.push(ce*ze[0],-ce*ze[1],B)}}for(var C=[0,0,0],A=[0,0,0],P=[0,0,0],D=[0,0,0],z=1.25,q={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},U=0;U<3;++U){P[U]=T.length/v|0,p(.5*(M[0][U]+M[1][U]),w[U],k[U],12,z,q),D[U]=(T.length/v|0)-P[U],C[U]=T.length/v|0;for(var O=0;O=0&&(v=f.length-h-1);var d=Math.pow(10,v),m=Math.round(u*c*d),x=m+"";if(x.indexOf("e")>=0)return x;var g=m/d,E=m%d;m<0?(g=-Math.ceil(g)|0,E=-E|0):(g=Math.floor(g)|0,E=E|0);var M=""+g;if(m<0&&(M="-"+M),v){for(var w=""+E;w.length=u[0][h];--m)v.push({x:m*c[h],text:o(c[h],m)});f.push(v)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var h=0;hM)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return g.bufferSubData(E,y,k),M}function d(g,E){for(var M=s.malloc(g.length,E),w=g.length,k=0;k=0;--w){if(E[w]!==M)return!1;M*=g[w]}return!0}h.update=function(g,E){if(typeof E!="number"&&(E=-1),this.bind(),typeof g=="object"&&typeof g.shape!="undefined"){var M=g.dtype;if(c.indexOf(M)<0&&(M="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var w=gl.getExtension("OES_element_index_uint");w&&M!=="uint16"?M="uint32":M="uint16"}if(M===g.dtype&&m(g.shape,g.stride))g.offset===0&&g.data.length===g.shape[0]?this.length=v(this.gl,this.type,this.length,this.usage,g.data,E):this.length=v(this.gl,this.type,this.length,this.usage,g.data.subarray(g.offset,g.shape[0]),E);else{var k=s.malloc(g.size,M),y=u(k,g.shape);l.assign(y,g),E<0?this.length=v(this.gl,this.type,this.length,this.usage,k,E):this.length=v(this.gl,this.type,this.length,this.usage,k.subarray(0,g.size),E),s.free(k)}}else if(Array.isArray(g)){var S;this.type===this.gl.ELEMENT_ARRAY_BUFFER?S=d(g,"uint16"):S=d(g,"float32"),E<0?this.length=v(this.gl,this.type,this.length,this.usage,S,E):this.length=v(this.gl,this.type,this.length,this.usage,S.subarray(0,g.length),E),s.free(S)}else if(typeof g=="object"&&typeof g.length=="number")this.length=v(this.gl,this.type,this.length,this.usage,g,E);else if(typeof g=="number"||g===void 0){if(E>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");g=g|0,g<=0&&(g=1),this.gl.bufferData(this.type,g|0,this.usage),this.length=g}else throw new Error("gl-buffer: Invalid data type")};function x(g,E,M,w){if(M=M||g.ARRAY_BUFFER,w=w||g.DYNAMIC_DRAW,M!==g.ARRAY_BUFFER&&M!==g.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(w!==g.DYNAMIC_DRAW&&w!==g.STATIC_DRAW&&w!==g.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 k=g.createBuffer(),y=new f(g,M,k,0,w);return y.update(E),y}a.exports=x}),6405:(function(a,i,o){"use strict";var s=o(2931);a.exports=function(u,c){var f=u.positions,h=u.vectors,v={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),v;for(var d=0,m=1/0,x=-1/0,g=1/0,E=-1/0,M=1/0,w=-1/0,k=null,y=null,S=[],T=1/0,p=!1,C=u.coneSizemode==="raw",A=0;Ad&&(d=s.length(D)),A&&!C){var z=2*s.distance(k,P)/(s.length(y)+s.length(D));z?(T=Math.min(T,z),p=!1):p=!0}p||(k=P,y=D),S.push(D)}var q=[m,g,M],U=[x,E,w];c&&(c[0]=q,c[1]=U),d===0&&(d=1);var O=1/d;isFinite(T)||(T=1),v.vectorScale=T;var R=u.coneSize||(C?1:.5);u.absoluteConeSize&&(R=u.absoluteConeSize*O),v.coneScale=R;for(var A=0,B=0;A=1},g.isTransparent=function(){return this.opacity<1},g.pickSlots=1,g.setPickBase=function(S){this.pickId=S};function E(S){for(var T=d({colormap:S,nshades:256,format:"rgba"}),p=new Uint8Array(256*4),C=0;C<256;++C){for(var A=T[C],P=0;P<3;++P)p[4*C+P]=A[P];p[4*C+3]=A[3]*255}return v(p,[256,256,4],[4,0,1])}function M(S){for(var T=S.length,p=new Array(T),C=0;C0){var B=this.triShader;B.bind(),B.uniforms=z,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},g.drawPick=function(S){S=S||{};for(var T=this.gl,p=S.model||m,C=S.view||m,A=S.projection||m,P=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],D=0;D<3;++D)P[0][D]=Math.max(P[0][D],this.clipBounds[0][D]),P[1][D]=Math.min(P[1][D],this.clipBounds[1][D]);this._model=[].slice.call(p),this._view=[].slice.call(C),this._projection=[].slice.call(A),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var z={model:p,view:C,projection:A,clipBounds:P,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},q=this.pickShader;q.bind(),q.uniforms=z,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},g.pick=function(S){if(!S||S.id!==this.pickId)return null;var T=S.value[0]+256*S.value[1]+65536*S.value[2],p=this.cells[T],C=this.positions[p[1]].slice(0,3),A={position:C,dataCoordinate:C,index:Math.floor(p[1]/48)};return this.traceType==="cone"?A.index=Math.floor(p[1]/48):this.traceType==="streamtube"&&(A.intensity=this.intensity[p[1]],A.velocity=this.vectors[p[1]].slice(0,3),A.divergence=this.vectors[p[1]][3],A.index=T),A},g.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.triangleIds.dispose()};function w(S,T){var p=s(S,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return p.attributes.position.location=0,p.attributes.color.location=2,p.attributes.uv.location=3,p.attributes.vector.location=4,p}function k(S,T){var p=s(S,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return p.attributes.position.location=0,p.attributes.id.location=1,p.attributes.vector.location=4,p}function y(S,T,p){var C=p.shaders;arguments.length===1&&(T=S,S=T.gl);var A=w(S,C),P=k(S,C),D=c(S,v(new Uint8Array([255,255,255,255]),[1,1,4]));D.generateMipmap(),D.minFilter=S.LINEAR_MIPMAP_LINEAR,D.magFilter=S.LINEAR;var z=l(S),q=l(S),U=l(S),O=l(S),R=l(S),B=u(S,[{buffer:z,type:S.FLOAT,size:4},{buffer:R,type:S.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:U,type:S.FLOAT,size:4},{buffer:O,type:S.FLOAT,size:2},{buffer:q,type:S.FLOAT,size:4}]),Y=new x(S,D,A,P,z,q,R,U,O,B,p.traceType||"cone");return Y.update(T),Y}a.exports=y}),614:(function(a,i,o){var s=o(3236),l=s([`precision highp float; +}`]);i.bg=function(x){return l(x,g,p,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}}),4935:(function(a,i,o){"use strict";a.exports=C;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},v=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var g=3;function p(k,S,L,w){this.gl=k,this.shader=S,this.buffer=L,this.vao=w,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var x=p.prototype,_=[0,0];x.bind=function(k,S,L,w){this.vao.bind(),this.shader.bind();var A=this.shader.uniforms;A.model=k,A.view=S,A.projection=L,A.pixelScale=w,_[0]=this.gl.drawingBufferWidth,_[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=_},x.unbind=function(){this.vao.unbind()},x.update=function(k,S,L,w,A){var T=[];function m(U,J,ee,ce,ye,xe){var ue=[ee.style,ee.weight,ee.variant,ee.family].join("_"),K=v[ue];K||(K=v[ue]={});var _e=K[J];_e||(_e=K[J]=y(J,{triangles:!0,font:ee.family,fontStyle:ee.style,fontWeight:ee.weight,fontVariant:ee.variant,textAlign:"center",textBaseline:"middle",lineSpacing:ye,styletags:xe}));for(var ne=(ce||12)/12,ae=_e.positions,pe=_e.cells,ie=0,le=pe.length;ie=0;--be){var De=ae[me[be]];T.push(ne*De[0],-ne*De[1],U)}}for(var F=[0,0,0],E=[0,0,0],I=[0,0,0],R=[0,0,0],B=1.25,O={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},V=0;V<3;++V){I[V]=T.length/g|0,m(.5*(k[0][V]+k[1][V]),S[V],L[V],12,B,O),R[V]=(T.length/g|0)-I[V],F[V]=T.length/g|0;for(var j=0;j=0&&(g=f.length-v-1);var p=Math.pow(10,g),x=Math.round(u*c*p),_=x+"";if(_.indexOf("e")>=0)return _;var y=x/p,C=x%p;x<0?(y=-Math.ceil(y)|0,C=-C|0):(y=Math.floor(y)|0,C=C|0);var k=""+y;if(x<0&&(k="-"+k),g){for(var S=""+C;S.length=u[0][v];--x)g.push({x:x*c[v],text:o(c[v],x)});f.push(g)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var v=0;vk)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return y.bufferSubData(C,w,L),k}function p(y,C){for(var k=s.malloc(y.length,C),S=y.length,L=0;L=0;--S){if(C[S]!==k)return!1;k*=y[S]}return!0}v.update=function(y,C){if(typeof C!="number"&&(C=-1),this.bind(),typeof y=="object"&&typeof y.shape!="undefined"){var k=y.dtype;if(c.indexOf(k)<0&&(k="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var S=gl.getExtension("OES_element_index_uint");S&&k!=="uint16"?k="uint32":k="uint16"}if(k===y.dtype&&x(y.shape,y.stride))y.offset===0&&y.data.length===y.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,y.data,C):this.length=g(this.gl,this.type,this.length,this.usage,y.data.subarray(y.offset,y.shape[0]),C);else{var L=s.malloc(y.size,k),w=u(L,y.shape);l.assign(w,y),C<0?this.length=g(this.gl,this.type,this.length,this.usage,L,C):this.length=g(this.gl,this.type,this.length,this.usage,L.subarray(0,y.size),C),s.free(L)}}else if(Array.isArray(y)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=p(y,"uint16"):A=p(y,"float32"),C<0?this.length=g(this.gl,this.type,this.length,this.usage,A,C):this.length=g(this.gl,this.type,this.length,this.usage,A.subarray(0,y.length),C),s.free(A)}else if(typeof y=="object"&&typeof y.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,y,C);else if(typeof y=="number"||y===void 0){if(C>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");y=y|0,y<=0&&(y=1),this.gl.bufferData(this.type,y|0,this.usage),this.length=y}else throw new Error("gl-buffer: Invalid data type")};function _(y,C,k,S){if(k=k||y.ARRAY_BUFFER,S=S||y.DYNAMIC_DRAW,k!==y.ARRAY_BUFFER&&k!==y.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(S!==y.DYNAMIC_DRAW&&S!==y.STATIC_DRAW&&S!==y.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 L=y.createBuffer(),w=new f(y,k,L,0,S);return w.update(C),w}a.exports=_}),6405:(function(a,i,o){"use strict";var s=o(2931);a.exports=function(u,c){var f=u.positions,v=u.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),g;for(var p=0,x=1/0,_=-1/0,y=1/0,C=-1/0,k=1/0,S=-1/0,L=null,w=null,A=[],T=1/0,m=!1,F=u.coneSizemode==="raw",E=0;Ep&&(p=s.length(R)),E&&!F){var B=2*s.distance(L,I)/(s.length(w)+s.length(R));B?(T=Math.min(T,B),m=!1):m=!0}m||(L=I,w=R),A.push(R)}var O=[x,y,k],V=[_,C,S];c&&(c[0]=O,c[1]=V),p===0&&(p=1);var j=1/p;isFinite(T)||(T=1),g.vectorScale=T;var q=u.coneSize||(F?1:.5);u.absoluteConeSize&&(q=u.absoluteConeSize*j),g.coneScale=q;for(var E=0,U=0;E=1},y.isTransparent=function(){return this.opacity<1},y.pickSlots=1,y.setPickBase=function(A){this.pickId=A};function C(A){for(var T=p({colormap:A,nshades:256,format:"rgba"}),m=new Uint8Array(256*4),F=0;F<256;++F){for(var E=T[F],I=0;I<3;++I)m[4*F+I]=E[I];m[4*F+3]=E[3]*255}return g(m,[256,256,4],[4,0,1])}function k(A){for(var T=A.length,m=new Array(T),F=0;F0){var U=this.triShader;U.bind(),U.uniforms=B,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},y.drawPick=function(A){A=A||{};for(var T=this.gl,m=A.model||x,F=A.view||x,E=A.projection||x,I=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],R=0;R<3;++R)I[0][R]=Math.max(I[0][R],this.clipBounds[0][R]),I[1][R]=Math.min(I[1][R],this.clipBounds[1][R]);this._model=[].slice.call(m),this._view=[].slice.call(F),this._projection=[].slice.call(E),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var B={model:m,view:F,projection:E,clipBounds:I,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},O=this.pickShader;O.bind(),O.uniforms=B,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},y.pick=function(A){if(!A||A.id!==this.pickId)return null;var T=A.value[0]+256*A.value[1]+65536*A.value[2],m=this.cells[T],F=this.positions[m[1]].slice(0,3),E={position:F,dataCoordinate:F,index:Math.floor(m[1]/48)};return this.traceType==="cone"?E.index=Math.floor(m[1]/48):this.traceType==="streamtube"&&(E.intensity=this.intensity[m[1]],E.velocity=this.vectors[m[1]].slice(0,3),E.divergence=this.vectors[m[1]][3],E.index=T),E},y.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.triangleIds.dispose()};function S(A,T){var m=s(A,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return m.attributes.position.location=0,m.attributes.color.location=2,m.attributes.uv.location=3,m.attributes.vector.location=4,m}function L(A,T){var m=s(A,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return m.attributes.position.location=0,m.attributes.id.location=1,m.attributes.vector.location=4,m}function w(A,T,m){var F=m.shaders;arguments.length===1&&(T=A,A=T.gl);var E=S(A,F),I=L(A,F),R=c(A,g(new Uint8Array([255,255,255,255]),[1,1,4]));R.generateMipmap(),R.minFilter=A.LINEAR_MIPMAP_LINEAR,R.magFilter=A.LINEAR;var B=l(A),O=l(A),V=l(A),j=l(A),q=l(A),U=u(A,[{buffer:B,type:A.FLOAT,size:4},{buffer:q,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:V,type:A.FLOAT,size:4},{buffer:j,type:A.FLOAT,size:2},{buffer:O,type:A.FLOAT,size:4}]),J=new _(A,R,E,I,B,O,q,V,j,U,m.traceType||"cone");return J.update(T),J}a.exports=w}),614:(function(a,i,o){var s=o(3236),l=s([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -653,7 +656,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},i.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}}),737:(function(a){a.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",34e3:"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"}}),5171:(function(a,i,o){var s=o(737);a.exports=function(u){return s[u]}}),9165:(function(a,i,o){"use strict";a.exports=x;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(g,E,M,w){this.gl=g,this.shader=w,this.buffer=E,this.vao=M,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 h=f.prototype;h.isOpaque=function(){return!this.hasAlpha},h.isTransparent=function(){return this.hasAlpha},h.drawTransparent=h.draw=function(g){var E=this.gl,M=this.shader.uniforms;this.shader.bind();var w=M.view=g.view||c,k=M.projection=g.projection||c;M.model=g.model||c,M.clipBounds=this.clipBounds,M.opacity=this.opacity;var y=w[12],S=w[13],T=w[14],p=w[15],C=g._ortho||!1,A=C?2:1,P=A*this.pixelRatio*(k[3]*y+k[7]*S+k[11]*T+k[15]*p)/E.drawingBufferHeight;this.vao.bind();for(var D=0;D<3;++D)E.lineWidth(this.lineWidth[D]*this.pixelRatio),M.capSize=this.capSize[D]*P,this.lineCount[D]&&E.drawArrays(E.LINES,this.lineOffset[D],this.lineCount[D]);this.vao.unbind()};function v(g,E){for(var M=0;M<3;++M)g[0][M]=Math.min(g[0][M],E[M]),g[1][M]=Math.max(g[1][M],E[M])}var d=(function(){for(var g=new Array(3),E=0;E<3;++E){for(var M=[],w=1;w<=2;++w)for(var k=-1;k<=1;k+=2){var y=(w+E)%3,S=[0,0,0];S[y]=k,M.push(S)}g[E]=M}return g})();function m(g,E,M,w){for(var k=d[w],y=0;y0){var z=C.slice();z[T]+=P[1][T],k.push(C[0],C[1],C[2],D[0],D[1],D[2],D[3],0,0,0,z[0],z[1],z[2],D[0],D[1],D[2],D[3],0,0,0),v(this.bounds,z),S+=2+m(k,z,D,T)}}}this.lineCount[T]=S-this.lineOffset[T]}this.buffer.update(k)}},h.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function x(g){var E=g.gl,M=s(E),w=l(E,[{buffer:M,type:E.FLOAT,size:3,offset:0,stride:40},{buffer:M,type:E.FLOAT,size:4,offset:12,stride:40},{buffer:M,type:E.FLOAT,size:3,offset:28,stride:40}]),k=u(E);k.attributes.position.location=0,k.attributes.color.location=1,k.attributes.offset.location=2;var y=new f(E,M,w,k);return y.update(g),y}}),3436:(function(a,i,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; +}`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},i.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}}),737:(function(a){a.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",34e3:"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"}}),5171:(function(a,i,o){var s=o(737);a.exports=function(u){return s[u]}}),9165:(function(a,i,o){"use strict";a.exports=_;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(y,C,k,S){this.gl=y,this.shader=S,this.buffer=C,this.vao=k,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 v=f.prototype;v.isOpaque=function(){return!this.hasAlpha},v.isTransparent=function(){return this.hasAlpha},v.drawTransparent=v.draw=function(y){var C=this.gl,k=this.shader.uniforms;this.shader.bind();var S=k.view=y.view||c,L=k.projection=y.projection||c;k.model=y.model||c,k.clipBounds=this.clipBounds,k.opacity=this.opacity;var w=S[12],A=S[13],T=S[14],m=S[15],F=y._ortho||!1,E=F?2:1,I=E*this.pixelRatio*(L[3]*w+L[7]*A+L[11]*T+L[15]*m)/C.drawingBufferHeight;this.vao.bind();for(var R=0;R<3;++R)C.lineWidth(this.lineWidth[R]*this.pixelRatio),k.capSize=this.capSize[R]*I,this.lineCount[R]&&C.drawArrays(C.LINES,this.lineOffset[R],this.lineCount[R]);this.vao.unbind()};function g(y,C){for(var k=0;k<3;++k)y[0][k]=Math.min(y[0][k],C[k]),y[1][k]=Math.max(y[1][k],C[k])}var p=(function(){for(var y=new Array(3),C=0;C<3;++C){for(var k=[],S=1;S<=2;++S)for(var L=-1;L<=1;L+=2){var w=(S+C)%3,A=[0,0,0];A[w]=L,k.push(A)}y[C]=k}return y})();function x(y,C,k,S){for(var L=p[S],w=0;w0){var B=F.slice();B[T]+=I[1][T],L.push(F[0],F[1],F[2],R[0],R[1],R[2],R[3],0,0,0,B[0],B[1],B[2],R[0],R[1],R[2],R[3],0,0,0),g(this.bounds,B),A+=2+x(L,B,R,T)}}}this.lineCount[T]=A-this.lineOffset[T]}this.buffer.update(L)}},v.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function _(y){var C=y.gl,k=s(C),S=l(C,[{buffer:k,type:C.FLOAT,size:3,offset:0,stride:40},{buffer:k,type:C.FLOAT,size:4,offset:12,stride:40},{buffer:k,type:C.FLOAT,size:3,offset:28,stride:40}]),L=u(C);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var w=new f(C,k,S,L);return w.update(y),w}}),3436:(function(a,i,o){"use strict";var s=o(3236),l=o(9405),u=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -704,13 +707,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);a.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}}),2260:(function(a,i,o){"use strict";var s=o(7766);a.exports=S;var l=null,u,c,f,h;function v(T){var p=T.getParameter(T.FRAMEBUFFER_BINDING),C=T.getParameter(T.RENDERBUFFER_BINDING),A=T.getParameter(T.TEXTURE_BINDING_2D);return[p,C,A]}function d(T,p){T.bindFramebuffer(T.FRAMEBUFFER,p[0]),T.bindRenderbuffer(T.RENDERBUFFER,p[1]),T.bindTexture(T.TEXTURE_2D,p[2])}function m(T,p){var C=T.getParameter(p.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(C+1);for(var A=0;A<=C;++A){for(var P=new Array(C),D=0;D1&&q.drawBuffersWEBGL(l[z]);var Y=C.getExtension("WEBGL_depth_texture");Y?U?T.depth=g(C,P,D,Y.UNSIGNED_INT_24_8_WEBGL,C.DEPTH_STENCIL,C.DEPTH_STENCIL_ATTACHMENT):O&&(T.depth=g(C,P,D,C.UNSIGNED_SHORT,C.DEPTH_COMPONENT,C.DEPTH_ATTACHMENT)):O&&U?T._depth_rb=E(C,P,D,C.DEPTH_STENCIL,C.DEPTH_STENCIL_ATTACHMENT):O?T._depth_rb=E(C,P,D,C.DEPTH_COMPONENT16,C.DEPTH_ATTACHMENT):U&&(T._depth_rb=E(C,P,D,C.STENCIL_INDEX,C.STENCIL_ATTACHMENT));var X=C.checkFramebufferStatus(C.FRAMEBUFFER);if(X!==C.FRAMEBUFFER_COMPLETE){T._destroyed=!0,C.bindFramebuffer(C.FRAMEBUFFER,null),C.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(C.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var B=0;BP||C<0||C>P)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=p,T._shape[1]=C;for(var D=v(A),z=0;zD||C<0||C>D)throw new Error("gl-fbo: Parameters are too large for FBO");A=A||{};var z=1;if("color"in A){if(z=Math.max(A.color|0,0),z<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(z>1)if(P){if(z>T.getParameter(P.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+z+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var q=T.UNSIGNED_BYTE,U=T.getExtension("OES_texture_float");if(A.float&&z>0){if(!U)throw new Error("gl-fbo: Context does not support floating point textures");q=T.FLOAT}else A.preferFloat&&z>0&&U&&(q=T.FLOAT);var O=!0;"depth"in A&&(O=!!A.depth);var R=!1;return"stencil"in A&&(R=!!A.stencil),new w(T,p,C,q,z,O,R,P)}}),2992:(function(a,i,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);a.exports=f;function f(h,v,d){"use strict";var m=u(v)||"of unknown name (see npm glsl-shader-name)",x="unknown type";d!==void 0&&(x=d===l.FRAGMENT_SHADER?"fragment":"vertex");for(var g=s(`Error compiling %s shader %s: -`,x,m),E=s("%s%s",g,h),M=h.split(` -`),w={},k=0;k1&&O.drawBuffersWEBGL(l[B]);var J=F.getExtension("WEBGL_depth_texture");J?V?T.depth=y(F,I,R,J.UNSIGNED_INT_24_8_WEBGL,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):j&&(T.depth=y(F,I,R,F.UNSIGNED_SHORT,F.DEPTH_COMPONENT,F.DEPTH_ATTACHMENT)):j&&V?T._depth_rb=C(F,I,R,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):j?T._depth_rb=C(F,I,R,F.DEPTH_COMPONENT16,F.DEPTH_ATTACHMENT):V&&(T._depth_rb=C(F,I,R,F.STENCIL_INDEX,F.STENCIL_ATTACHMENT));var ee=F.checkFramebufferStatus(F.FRAMEBUFFER);if(ee!==F.FRAMEBUFFER_COMPLETE){T._destroyed=!0,F.bindFramebuffer(F.FRAMEBUFFER,null),F.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(F.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var U=0;UI||F<0||F>I)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=m,T._shape[1]=F;for(var R=g(E),B=0;BR||F<0||F>R)throw new Error("gl-fbo: Parameters are too large for FBO");E=E||{};var B=1;if("color"in E){if(B=Math.max(E.color|0,0),B<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(B>1)if(I){if(B>T.getParameter(I.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+B+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var O=T.UNSIGNED_BYTE,V=T.getExtension("OES_texture_float");if(E.float&&B>0){if(!V)throw new Error("gl-fbo: Context does not support floating point textures");O=T.FLOAT}else E.preferFloat&&B>0&&V&&(O=T.FLOAT);var j=!0;"depth"in E&&(j=!!E.depth);var q=!1;return"stencil"in E&&(q=!!E.stencil),new S(T,m,F,O,B,j,q,I)}}),2992:(function(a,i,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);a.exports=f;function f(v,g,p){"use strict";var x=u(g)||"of unknown name (see npm glsl-shader-name)",_="unknown type";p!==void 0&&(_=p===l.FRAGMENT_SHADER?"fragment":"vertex");for(var y=s(`Error compiling %s shader %s: +`,_,x),C=s("%s%s",y,v),k=v.split(` +`),S={},L=0;L0){for(var re=0;re<24;++re)D.push(D[D.length-12]);O+=2,te=!0}continue e}R[0][A]=Math.min(R[0][A],se[A],ue[A]),R[1][A]=Math.max(R[1][A],se[A],ue[A])}var j,fe;Array.isArray(Y[0])?(j=Y.length>C-1?Y[C-1]:Y.length>0?Y[Y.length-1]:[0,0,0,1],fe=Y.length>C?Y[C]:Y.length>0?Y[Y.length-1]:[0,0,0,1]):j=fe=Y,j.length===3&&(j=[j[0],j[1],j[2],1]),fe.length===3&&(fe=[fe[0],fe[1],fe[2],1]),!this.hasAlpha&&j[3]<1&&(this.hasAlpha=!0);var ce;Array.isArray(X)?ce=X.length>C-1?X[C-1]:X.length>0?X[X.length-1]:[0,0,0,1]:ce=X;var oe=U;if(U+=M(se,ue),te){for(A=0;A<2;++A)D.push(se[0],se[1],se[2],ue[0],ue[1],ue[2],oe,ce,j[0],j[1],j[2],j[3]);O+=2,te=!1}D.push(se[0],se[1],se[2],ue[0],ue[1],ue[2],oe,ce,j[0],j[1],j[2],j[3],se[0],se[1],se[2],ue[0],ue[1],ue[2],oe,-ce,j[0],j[1],j[2],j[3],ue[0],ue[1],ue[2],se[0],se[1],se[2],U,-ce,fe[0],fe[1],fe[2],fe[3],ue[0],ue[1],ue[2],se[0],se[1],se[2],U,ce,fe[0],fe[1],fe[2],fe[3]),O+=4}}if(this.buffer.update(D),z.push(U),q.push(B[B.length-1].slice()),this.bounds=R,this.vertexCount=O,this.points=q,this.arcLength=z,"dashes"in p){var we=p.dashes,he=we.slice();for(he.unshift(0),C=1;C1.0001)return null;A+=C[k]}return Math.abs(A-1)>.001?null:[y,h(d,C),C]}}),840:(function(a,i,o){var s=o(3236),l=s([`precision highp float; +}`]),v=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];i.createShader=function(g){return l(g,u,c,null,v)},i.createPickShader=function(g){return l(g,u,f,null,v)}}),5714:(function(a,i,o){"use strict";a.exports=T;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function v(m,F,E,I){return c[0]=I,c[1]=E,c[2]=F,c[3]=m,f[0]}var g=o(2478),p=o(9618),x=o(7319),_=x.createShader,y=x.createPickShader,C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(m,F){for(var E=0,I=0;I<3;++I){var R=m[I]-F[I];E+=R*R}return Math.sqrt(E)}function S(m){for(var F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)F[0][E]=Math.max(m[0][E],F[0][E]),F[1][E]=Math.min(m[1][E],F[1][E]);return F}function L(m,F,E,I){this.arcLength=m,this.position=F,this.index=E,this.dataCoordinate=I}function w(m,F,E,I,R,B){this.gl=m,this.shader=F,this.pickShader=E,this.buffer=I,this.vao=R,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=B,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var A=w.prototype;A.isTransparent=function(){return this.hasAlpha},A.isOpaque=function(){return!this.hasAlpha},A.pickSlots=1,A.setPickBase=function(m){this.pickId=m},A.drawTransparent=A.draw=function(m){if(this.vertexCount){var F=this.gl,E=this.shader,I=this.vao;E.bind(),E.uniforms={model:m.model||C,view:m.view||C,projection:m.projection||C,clipBounds:S(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[F.drawingBufferWidth,F.drawingBufferHeight],pixelRatio:this.pixelRatio},I.bind(),I.draw(F.TRIANGLE_STRIP,this.vertexCount),I.unbind()}},A.drawPick=function(m){if(this.vertexCount){var F=this.gl,E=this.pickShader,I=this.vao;E.bind(),E.uniforms={model:m.model||C,view:m.view||C,projection:m.projection||C,pickId:this.pickId,clipBounds:S(this.clipBounds),screenShape:[F.drawingBufferWidth,F.drawingBufferHeight],pixelRatio:this.pixelRatio},I.bind(),I.draw(F.TRIANGLE_STRIP,this.vertexCount),I.unbind()}},A.update=function(m){var F,E;this.dirty=!0;var I=!!m.connectGaps;"dashScale"in m&&(this.dashScale=m.dashScale),this.hasAlpha=!1,"opacity"in m&&(this.opacity=+m.opacity,this.opacity<1&&(this.hasAlpha=!0));var R=[],B=[],O=[],V=0,j=0,q=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],U=m.position||m.positions;if(U){var J=m.color||m.colors||[0,0,0,1],ee=m.lineWidth||1,ce=!1;e:for(F=1;F0){for(var ue=0;ue<24;++ue)R.push(R[R.length-12]);j+=2,ce=!0}continue e}q[0][E]=Math.min(q[0][E],ye[E],xe[E]),q[1][E]=Math.max(q[1][E],ye[E],xe[E])}var K,_e;Array.isArray(J[0])?(K=J.length>F-1?J[F-1]:J.length>0?J[J.length-1]:[0,0,0,1],_e=J.length>F?J[F]:J.length>0?J[J.length-1]:[0,0,0,1]):K=_e=J,K.length===3&&(K=[K[0],K[1],K[2],1]),_e.length===3&&(_e=[_e[0],_e[1],_e[2],1]),!this.hasAlpha&&K[3]<1&&(this.hasAlpha=!0);var ne;Array.isArray(ee)?ne=ee.length>F-1?ee[F-1]:ee.length>0?ee[ee.length-1]:[0,0,0,1]:ne=ee;var ae=V;if(V+=k(ye,xe),ce){for(E=0;E<2;++E)R.push(ye[0],ye[1],ye[2],xe[0],xe[1],xe[2],ae,ne,K[0],K[1],K[2],K[3]);j+=2,ce=!1}R.push(ye[0],ye[1],ye[2],xe[0],xe[1],xe[2],ae,ne,K[0],K[1],K[2],K[3],ye[0],ye[1],ye[2],xe[0],xe[1],xe[2],ae,-ne,K[0],K[1],K[2],K[3],xe[0],xe[1],xe[2],ye[0],ye[1],ye[2],V,-ne,_e[0],_e[1],_e[2],_e[3],xe[0],xe[1],xe[2],ye[0],ye[1],ye[2],V,ne,_e[0],_e[1],_e[2],_e[3]),j+=4}}if(this.buffer.update(R),B.push(V),O.push(U[U.length-1].slice()),this.bounds=q,this.vertexCount=j,this.points=O,this.arcLength=B,"dashes"in m){var pe=m.dashes,ie=pe.slice();for(ie.unshift(0),F=1;F1.0001)return null;E+=F[L]}return Math.abs(E-1)>.001?null:[w,v(p,F),F]}}),840:(function(a,i,o){var s=o(3236),l=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -1069,7 +1072,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),h=s([`precision highp float; +}`]),v=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1113,7 +1116,7 @@ void main() { gl_PointSize = pointSize; f_color = color; f_uv = uv; -}`]),v=s([`precision highp float; +}`]),g=s([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; @@ -1128,7 +1131,7 @@ void main() { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),d=s([`precision highp float; +}`]),p=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1143,7 +1146,7 @@ void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; -}`]),m=s([`precision highp float; +}`]),x=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1176,7 +1179,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]),x=s([`precision highp float; +}`]),_=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1219,7 +1222,7 @@ void main() { } f_id = id; f_position = position; -}`]),g=s([`precision highp float; +}`]),y=s([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1228,7 +1231,7 @@ uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); -}`]),E=s([`precision highp float; +}`]),C=s([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; @@ -1236,7 +1239,7 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},i.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},i.pointShader={vertex:h,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},i.pickShader={vertex:d,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},i.pointPickShader={vertex:x,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},i.contourShader={vertex:g,fragment:E,attributes:[{name:"position",type:"vec3"}]}}),7201:(function(a,i,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),h=o(7766),v=o(8406),d=o(6760),m=o(7608),x=o(9618),g=o(6729),E=o(7765),M=o(1888),w=o(840),k=o(7626),y=w.meshShader,S=w.wireShader,T=w.pointShader,p=w.pickShader,C=w.pointPickShader,A=w.contourShader,P=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function D(re,j,fe,ce,oe,we,he,ye,Pe,le,ze,Xe,vt,st,Oe,qe,mt,lt,Ie,de,Ee,Ue,ge,Ge,tt,ft,He){this.gl=re,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=j,this.dirty=!0,this.triShader=fe,this.lineShader=ce,this.pointShader=oe,this.pickShader=we,this.pointPickShader=he,this.contourShader=ye,this.trianglePositions=Pe,this.triangleColors=ze,this.triangleNormals=vt,this.triangleUVs=Xe,this.triangleIds=le,this.triangleVAO=st,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Oe,this.edgeColors=mt,this.edgeUVs=lt,this.edgeIds=qe,this.edgeVAO=Ie,this.edgeCount=0,this.pointPositions=de,this.pointColors=Ue,this.pointUVs=ge,this.pointSizes=Ge,this.pointIds=Ee,this.pointVAO=tt,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ft,this.contourVAO=He,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!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=P,this._view=P,this._projection=P,this._resolution=[1,1]}var z=D.prototype;z.isOpaque=function(){return!this.hasAlpha},z.isTransparent=function(){return this.hasAlpha},z.pickSlots=1,z.setPickBase=function(re){this.pickId=re};function q(re,j){if(!j||!j.length)return 1;for(var fe=0;fere&&fe>0){var ce=(j[fe][0]-re)/(j[fe][0]-j[fe-1][0]);return j[fe][1]*(1-ce)+ce*j[fe-1][1]}}return 1}function U(re,j){for(var fe=g({colormap:re,nshades:256,format:"rgba"}),ce=new Uint8Array(256*4),oe=0;oe<256;++oe){for(var we=fe[oe],he=0;he<3;++he)ce[4*oe+he]=we[he];j?ce[4*oe+3]=255*q(oe/255,j):ce[4*oe+3]=255*we[3]}return x(ce,[256,256,4],[4,0,1])}function O(re){for(var j=re.length,fe=new Array(j),ce=0;ce0){var vt=this.triShader;vt.bind(),vt.uniforms=ye,this.triangleVAO.bind(),j.drawArrays(j.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var vt=this.lineShader;vt.bind(),vt.uniforms=ye,this.edgeVAO.bind(),j.lineWidth(this.lineWidth*this.pixelRatio),j.drawArrays(j.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var vt=this.pointShader;vt.bind(),vt.uniforms=ye,this.pointVAO.bind(),j.drawArrays(j.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var vt=this.contourShader;vt.bind(),vt.uniforms=ye,this.contourVAO.bind(),j.drawArrays(j.LINES,0,this.contourCount),this.contourVAO.unbind()}},z.drawPick=function(re){re=re||{};for(var j=this.gl,fe=re.model||P,ce=re.view||P,oe=re.projection||P,we=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],he=0;he<3;++he)we[0][he]=Math.max(we[0][he],this.clipBounds[0][he]),we[1][he]=Math.min(we[1][he],this.clipBounds[1][he]);this._model=[].slice.call(fe),this._view=[].slice.call(ce),this._projection=[].slice.call(oe),this._resolution=[j.drawingBufferWidth,j.drawingBufferHeight];var ye={model:fe,view:ce,projection:oe,clipBounds:we,pickId:this.pickId/255},Pe=this.pickShader;if(Pe.bind(),Pe.uniforms=ye,this.triangleCount>0&&(this.triangleVAO.bind(),j.drawArrays(j.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),j.lineWidth(this.lineWidth*this.pixelRatio),j.drawArrays(j.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Pe=this.pointPickShader;Pe.bind(),Pe.uniforms=ye,this.pointVAO.bind(),j.drawArrays(j.POINTS,0,this.pointCount),this.pointVAO.unbind()}},z.pick=function(re){if(!re||re.id!==this.pickId)return null;for(var j=re.value[0]+256*re.value[1]+65536*re.value[2],fe=this.cells[j],ce=this.positions,oe=new Array(fe.length),we=0;weMath.abs(p))g.rotate(P,0,0,-T*C*Math.PI*y.rotateSpeed/window.innerWidth);else if(!y._ortho){var D=-y.zoomSpeed*A*p/window.innerHeight*(P-g.lastT())/20;g.pan(P,0,0,M*(Math.exp(D)-1))}}},!0)},y.enableMouseListeners(),y}}),799:(function(a,i,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; +`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},i.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},i.pointShader={vertex:v,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},i.pickShader={vertex:p,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},i.pointPickShader={vertex:_,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},i.contourShader={vertex:y,fragment:C,attributes:[{name:"position",type:"vec3"}]}}),7201:(function(a,i,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),v=o(7766),g=o(8406),p=o(6760),x=o(7608),_=o(9618),y=o(6729),C=o(7765),k=o(1888),S=o(840),L=o(7626),w=S.meshShader,A=S.wireShader,T=S.pointShader,m=S.pickShader,F=S.pointPickShader,E=S.contourShader,I=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function R(ue,K,_e,ne,ae,pe,ie,le,me,be,De,Ge,ht,it,Oe,ze,ct,et,qe,we,Le,Ke,Te,Ve,$e,ot,tt){this.gl=ue,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=K,this.dirty=!0,this.triShader=_e,this.lineShader=ne,this.pointShader=ae,this.pickShader=pe,this.pointPickShader=ie,this.contourShader=le,this.trianglePositions=me,this.triangleColors=De,this.triangleNormals=ht,this.triangleUVs=Ge,this.triangleIds=be,this.triangleVAO=it,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Oe,this.edgeColors=ct,this.edgeUVs=et,this.edgeIds=ze,this.edgeVAO=qe,this.edgeCount=0,this.pointPositions=we,this.pointColors=Ke,this.pointUVs=Te,this.pointSizes=Ve,this.pointIds=Le,this.pointVAO=$e,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ot,this.contourVAO=tt,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!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=I,this._view=I,this._projection=I,this._resolution=[1,1]}var B=R.prototype;B.isOpaque=function(){return!this.hasAlpha},B.isTransparent=function(){return this.hasAlpha},B.pickSlots=1,B.setPickBase=function(ue){this.pickId=ue};function O(ue,K){if(!K||!K.length)return 1;for(var _e=0;_eue&&_e>0){var ne=(K[_e][0]-ue)/(K[_e][0]-K[_e-1][0]);return K[_e][1]*(1-ne)+ne*K[_e-1][1]}}return 1}function V(ue,K){for(var _e=y({colormap:ue,nshades:256,format:"rgba"}),ne=new Uint8Array(256*4),ae=0;ae<256;++ae){for(var pe=_e[ae],ie=0;ie<3;++ie)ne[4*ae+ie]=pe[ie];K?ne[4*ae+3]=255*O(ae/255,K):ne[4*ae+3]=255*pe[3]}return _(ne,[256,256,4],[4,0,1])}function j(ue){for(var K=ue.length,_e=new Array(K),ne=0;ne0){var ht=this.triShader;ht.bind(),ht.uniforms=le,this.triangleVAO.bind(),K.drawArrays(K.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var ht=this.lineShader;ht.bind(),ht.uniforms=le,this.edgeVAO.bind(),K.lineWidth(this.lineWidth*this.pixelRatio),K.drawArrays(K.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var ht=this.pointShader;ht.bind(),ht.uniforms=le,this.pointVAO.bind(),K.drawArrays(K.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var ht=this.contourShader;ht.bind(),ht.uniforms=le,this.contourVAO.bind(),K.drawArrays(K.LINES,0,this.contourCount),this.contourVAO.unbind()}},B.drawPick=function(ue){ue=ue||{};for(var K=this.gl,_e=ue.model||I,ne=ue.view||I,ae=ue.projection||I,pe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ie=0;ie<3;++ie)pe[0][ie]=Math.max(pe[0][ie],this.clipBounds[0][ie]),pe[1][ie]=Math.min(pe[1][ie],this.clipBounds[1][ie]);this._model=[].slice.call(_e),this._view=[].slice.call(ne),this._projection=[].slice.call(ae),this._resolution=[K.drawingBufferWidth,K.drawingBufferHeight];var le={model:_e,view:ne,projection:ae,clipBounds:pe,pickId:this.pickId/255},me=this.pickShader;if(me.bind(),me.uniforms=le,this.triangleCount>0&&(this.triangleVAO.bind(),K.drawArrays(K.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),K.lineWidth(this.lineWidth*this.pixelRatio),K.drawArrays(K.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var me=this.pointPickShader;me.bind(),me.uniforms=le,this.pointVAO.bind(),K.drawArrays(K.POINTS,0,this.pointCount),this.pointVAO.unbind()}},B.pick=function(ue){if(!ue||ue.id!==this.pickId)return null;for(var K=ue.value[0]+256*ue.value[1]+65536*ue.value[2],_e=this.cells[K],ne=this.positions,ae=new Array(_e.length),pe=0;pe<_e.length;++pe)ae[pe]=ne[_e[pe]];var ie=ue.coord[0],le=ue.coord[1];if(!this.pickVertex){var me=this.positions[_e[0]],be=this.positions[_e[1]],De=this.positions[_e[2]],Ge=[(me[0]+be[0]+De[0])/3,(me[1]+be[1]+De[1])/3,(me[2]+be[2]+De[2])/3];return{_cellCenter:!0,position:[ie,le],index:K,cell:_e,cellId:K,intensity:this.intensity[K],dataCoordinate:Ge}}var ht=L(ae,[ie*this.pixelRatio,this._resolution[1]-le*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!ht)return null;for(var it=ht[2],Oe=0,pe=0;pe<_e.length;++pe)Oe+=it[pe]*this.intensity[_e[pe]];return{position:ht[1],index:_e[ht[0]],cell:_e,cellId:K,intensity:Oe,dataCoordinate:this.positions[_e[ht[0]]]}},B.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()};function q(ue){var K=u(ue,w.vertex,w.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K.attributes.normal.location=4,K}function U(ue){var K=u(ue,A.vertex,A.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K}function J(ue){var K=u(ue,T.vertex,T.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K.attributes.pointSize.location=4,K}function ee(ue){var K=u(ue,m.vertex,m.fragment);return K.attributes.position.location=0,K.attributes.id.location=1,K}function ce(ue){var K=u(ue,F.vertex,F.fragment);return K.attributes.position.location=0,K.attributes.id.location=1,K.attributes.pointSize.location=4,K}function ye(ue){var K=u(ue,E.vertex,E.fragment);return K.attributes.position.location=0,K}function xe(ue,K){arguments.length===1&&(K=ue,ue=K.gl);var _e=ue.getExtension("OES_standard_derivatives")||ue.getExtension("MOZ_OES_standard_derivatives")||ue.getExtension("WEBKIT_OES_standard_derivatives");if(!_e)throw new Error("derivatives not supported");var ne=q(ue),ae=U(ue),pe=J(ue),ie=ee(ue),le=ce(ue),me=ye(ue),be=v(ue,_(new Uint8Array([255,255,255,255]),[1,1,4]));be.generateMipmap(),be.minFilter=ue.LINEAR_MIPMAP_LINEAR,be.magFilter=ue.LINEAR;var De=c(ue),Ge=c(ue),ht=c(ue),it=c(ue),Oe=c(ue),ze=f(ue,[{buffer:De,type:ue.FLOAT,size:3},{buffer:Oe,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Ge,type:ue.FLOAT,size:4},{buffer:ht,type:ue.FLOAT,size:2},{buffer:it,type:ue.FLOAT,size:3}]),ct=c(ue),et=c(ue),qe=c(ue),we=c(ue),Le=f(ue,[{buffer:ct,type:ue.FLOAT,size:3},{buffer:we,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:et,type:ue.FLOAT,size:4},{buffer:qe,type:ue.FLOAT,size:2}]),Ke=c(ue),Te=c(ue),Ve=c(ue),$e=c(ue),ot=c(ue),tt=f(ue,[{buffer:Ke,type:ue.FLOAT,size:3},{buffer:ot,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Te,type:ue.FLOAT,size:4},{buffer:Ve,type:ue.FLOAT,size:2},{buffer:$e,type:ue.FLOAT,size:1}]),nt=c(ue),We=f(ue,[{buffer:nt,type:ue.FLOAT,size:3}]),mt=new R(ue,be,ne,ae,pe,ie,le,me,De,Oe,Ge,ht,it,ze,ct,we,et,qe,Le,Ke,ot,Te,Ve,$e,tt,nt,We);return mt.update(K),mt}a.exports=xe}),4437:(function(a,i,o){"use strict";a.exports=g;var s=o(3025),l=o(6296),u=o(351),c=o(8512),f=o(24),v=o(7520);function g(p,x){p=p||document.body,x=x||{};var _=[.01,1/0];"distanceLimits"in x&&(_[0]=x.distanceLimits[0],_[1]=x.distanceLimits[1]),"zoomMin"in x&&(_[0]=x.zoomMin),"zoomMax"in x&&(_[1]=x.zoomMax);var y=l({center:x.center||[0,0,0],up:x.up||[0,1,0],eye:x.eye||[0,0,10],mode:x.mode||"orbit",distanceLimits:_}),C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],k=0,S=p.clientWidth,L=p.clientHeight,w={keyBindingMode:"rotate",enableWheel:!0,view:y,element:p,delay:x.delay||16,rotateSpeed:x.rotateSpeed||1,zoomSpeed:x.zoomSpeed||1,translateSpeed:x.translateSpeed||1,flipX:!!x.flipX,flipY:!!x.flipY,modes:y.modes,_ortho:x._ortho||x.projection&&x.projection.type==="orthographic"||!1,tick:function(){var A=s(),T=this.delay,m=A-2*T;y.idle(A-T),y.recalcMatrix(m),y.flush(A-(100+T*2));for(var F=!0,E=y.computedMatrix,I=0;I<16;++I)F=F&&C[I]===E[I],C[I]=E[I];var R=p.clientWidth===S&&p.clientHeight===L;return S=p.clientWidth,L=p.clientHeight,F?!R:(k=Math.exp(y.computedRadius[0]),!0)},lookAt:function(A,T,m){y.lookAt(y.lastT(),A,T,m)},rotate:function(A,T,m){y.rotate(y.lastT(),A,T,m)},pan:function(A,T,m){y.pan(y.lastT(),A,T,m)},translate:function(A,T,m){y.translate(y.lastT(),A,T,m)}};return Object.defineProperties(w,{matrix:{get:function(){return y.computedMatrix},set:function(A){return y.setMatrix(y.lastT(),A),y.computedMatrix},enumerable:!0},mode:{get:function(){return y.getMode()},set:function(A){var T=y.computedUp.slice(),m=y.computedEye.slice(),F=y.computedCenter.slice();if(y.setMode(A),A==="turntable"){var E=s();y._active.lookAt(E,m,F,T),y._active.lookAt(E+500,m,F,[0,0,1]),y._active.flush(E)}return y.getMode()},enumerable:!0},center:{get:function(){return y.computedCenter},set:function(A){return y.lookAt(y.lastT(),null,A),y.computedCenter},enumerable:!0},eye:{get:function(){return y.computedEye},set:function(A){return y.lookAt(y.lastT(),A),y.computedEye},enumerable:!0},up:{get:function(){return y.computedUp},set:function(A){return y.lookAt(y.lastT(),null,null,A),y.computedUp},enumerable:!0},distance:{get:function(){return k},set:function(A){return y.setDistance(y.lastT(),A),A},enumerable:!0},distanceLimits:{get:function(){return y.getDistanceLimits(_)},set:function(A){return y.setDistanceLimits(A),A},enumerable:!0}}),p.addEventListener("contextmenu",function(A){return A.preventDefault(),!1}),w._lastX=-1,w._lastY=-1,w._lastMods={shift:!1,control:!1,alt:!1,meta:!1},w.enableMouseListeners=function(){w.mouseListener=u(p,A),p.addEventListener("touchstart",function(T){var m=f(T.changedTouches[0],p);A(0,m[0],m[1],w._lastMods),A(1,m[0],m[1],w._lastMods)},v?{passive:!0}:!1),p.addEventListener("touchmove",function(T){var m=f(T.changedTouches[0],p);A(1,m[0],m[1],w._lastMods),T.preventDefault()},v?{passive:!1}:!1),p.addEventListener("touchend",function(T){A(0,w._lastX,w._lastY,w._lastMods)},v?{passive:!0}:!1);function A(T,m,F,E){var I=w.keyBindingMode;if(I!==!1){var R=I==="rotate",B=I==="pan",O=I==="zoom",V=!!E.control,j=!!E.alt,q=!!E.shift,U=!!(T&1),J=!!(T&2),ee=!!(T&4),ce=1/p.clientHeight,ye=ce*(m-w._lastX),xe=ce*(F-w._lastY),ue=w.flipX?1:-1,K=w.flipY?1:-1,_e=Math.PI*w.rotateSpeed,ne=s();if(w._lastX!==-1&&w._lastY!==-1&&((R&&U&&!V&&!j&&!q||U&&!V&&!j&&q)&&y.rotate(ne,ue*_e*ye,-K*_e*xe,0),(B&&U&&!V&&!j&&!q||J||U&&V&&!j&&!q)&&y.pan(ne,-w.translateSpeed*ye*k,w.translateSpeed*xe*k,0),O&&U&&!V&&!j&&!q||ee||U&&!V&&j&&!q)){var ae=-w.zoomSpeed*xe/window.innerHeight*(ne-y.lastT())*100;y.pan(ne,0,0,k*(Math.exp(ae)-1))}return w._lastX=m,w._lastY=F,w._lastMods=E,!0}}w.wheelListener=c(p,function(T,m){if(w.keyBindingMode!==!1&&w.enableWheel){var F=w.flipX?1:-1,E=w.flipY?1:-1,I=s();if(Math.abs(T)>Math.abs(m))y.rotate(I,0,0,-T*F*Math.PI*w.rotateSpeed/window.innerWidth);else if(!w._ortho){var R=-w.zoomSpeed*E*m/window.innerHeight*(I-y.lastT())/20;y.pan(I,0,0,k*(Math.exp(R)-1))}}},!0)},w.enableMouseListeners(),w}}),799:(function(a,i,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; @@ -1252,7 +1255,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);a.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}}),4100:(function(a,i,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),h=o(2260),v=o(7169),d=o(351),m=o(4772),x=o(4040),g=o(799),E=o(9216)({tablet:!0,featureDetect:!0});a.exports={createScene:S,createCamera:s};function M(){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 w(p,C){var A=null;try{A=p.getContext("webgl",C),A||(A=p.getContext("experimental-webgl",C))}catch(P){return null}return A}function k(p){var C=Math.round(Math.log(Math.abs(p))/Math.log(10));if(C<0){var A=Math.round(Math.pow(10,-C));return Math.ceil(p*A)/A}else if(C>0){var A=Math.round(Math.pow(10,C));return Math.ceil(p/A)*A}return Math.ceil(p)}function y(p){return typeof p=="boolean"?p:!0}function S(p){p=p||{},p.camera=p.camera||{};var C=p.canvas;if(!C)if(C=document.createElement("canvas"),p.container){var A=p.container;A.appendChild(C)}else document.body.appendChild(C);var P=p.gl;if(P||(p.glOptions&&(E=!!p.glOptions.preserveDrawingBuffer),P=w(C,p.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:E})),!P)throw new Error("webgl not supported");var D=p.bounds||[[-10,-10,-10],[10,10,10]],z=new M,q=h(P,P.drawingBufferWidth,P.drawingBufferHeight,{preferFloat:!E}),U=g(P),O=p.cameraObject&&p.cameraObject._ortho===!0||p.camera.projection&&p.camera.projection.type==="orthographic"||!1,R={eye:p.camera.eye||[2,0,0],center:p.camera.center||[0,0,0],up:p.camera.up||[0,1,0],zoomMin:p.camera.zoomMax||.1,zoomMax:p.camera.zoomMin||100,mode:p.camera.mode||"turntable",_ortho:O},B=p.axes||{},Y=l(P,B);Y.enable=!B.disable;var X=p.spikes||{},te=c(P,X),se=[],ue=[],re=[],j=[],fe=!0,he=!0,ce=new Array(16),oe=new Array(16),we={view:null,projection:ce,model:oe,_ortho:!1},he=!0,ye=[P.drawingBufferWidth,P.drawingBufferHeight],Pe=p.cameraObject||s(C,R),le={gl:P,contextLost:!1,pixelRatio:p.pixelRatio||1,canvas:C,selection:z,camera:Pe,axes:Y,axesPixels:null,spikes:te,bounds:D,objects:se,shape:ye,aspect:p.aspectRatio||[1,1,1],pickRadius:p.pickRadius||10,zNear:p.zNear||.01,zFar:p.zFar||1e3,fovy:p.fovy||Math.PI/4,clearColor:p.clearColor||[0,0,0,0],autoResize:y(p.autoResize),autoBounds:y(p.autoBounds),autoScale:!!p.autoScale,autoCenter:y(p.autoCenter),clipToBounds:y(p.clipToBounds),snapToData:!!p.snapToData,onselect:p.onselect||null,onrender:p.onrender||null,onclick:p.onclick||null,cameraParams:we,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(de){this.aspect[0]=de.x,this.aspect[1]=de.y,this.aspect[2]=de.z,he=!0},setBounds:function(de,Ee){this.bounds[0][de]=Ee.min,this.bounds[1][de]=Ee.max},setClearColor:function(de){this.clearColor=de},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},ze=[P.drawingBufferWidth/le.pixelRatio|0,P.drawingBufferHeight/le.pixelRatio|0];function Xe(){if(!le._stopped&&le.autoResize){var de=C.parentNode,Ee=1,Ue=1;de&&de!==document.body?(Ee=de.clientWidth,Ue=de.clientHeight):(Ee=window.innerWidth,Ue=window.innerHeight);var ge=Math.ceil(Ee*le.pixelRatio)|0,Ge=Math.ceil(Ue*le.pixelRatio)|0;if(ge!==C.width||Ge!==C.height){C.width=ge,C.height=Ge;var tt=C.style;tt.position=tt.position||"absolute",tt.left="0px",tt.top="0px",tt.width=Ee+"px",tt.height=Ue+"px",fe=!0}}}le.autoResize&&Xe(),window.addEventListener("resize",Xe);function vt(){for(var de=se.length,Ee=j.length,Ue=0;Ue0&&re[Ee-1]===0;)re.pop(),j.pop().dispose()}le.update=function(de){le._stopped||(de=de||{},fe=!0,he=!0)},le.add=function(de){le._stopped||(de.axes=Y,se.push(de),ue.push(-1),fe=!0,he=!0,vt())},le.remove=function(de){if(!le._stopped){var Ee=se.indexOf(de);Ee<0||(se.splice(Ee,1),ue.pop(),fe=!0,he=!0,vt())}},le.dispose=function(){if(!le._stopped&&(le._stopped=!0,window.removeEventListener("resize",Xe),C.removeEventListener("webglcontextlost",st),le.mouseListener.enabled=!1,!le.contextLost)){Y.dispose(),te.dispose();for(var de=0;dez.distance)continue;for(var We=0;We1e-6?(E=Math.acos(M),w=Math.sin(E),k=Math.sin((1-u)*E)/w,y=Math.sin(u*E)/w):(k=1-u,y=u),o[0]=k*c+y*d,o[1]=k*f+y*m,o[2]=k*h+y*x,o[3]=k*v+y*g,o}}),5964:(function(a){"use strict";a.exports=function(i){return!i&&i!==0?"":i.toString()}}),9366:(function(a,i,o){"use strict";var s=o(4359);a.exports=u;var l={};function u(c,f,h){var v=[f.style,f.weight,f.variant,f.family].join("_"),d=l[v];if(d||(d=l[v]={}),c in d)return d[c];var m={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};m.triangles=!0;var x=s(c,m);m.triangles=!1;var g=s(c,m),E,M;if(h&&h!==1){for(E=0;E0){var E=Math.round(Math.pow(10,F));return Math.ceil(m/E)*E}return Math.ceil(m)}function w(m){return typeof m=="boolean"?m:!0}function A(m){m=m||{},m.camera=m.camera||{};var F=m.canvas;if(!F)if(F=document.createElement("canvas"),m.container){var E=m.container;E.appendChild(F)}else document.body.appendChild(F);var I=m.gl;if(I||(m.glOptions&&(C=!!m.glOptions.preserveDrawingBuffer),I=S(F,m.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:C})),!I)throw new Error("webgl not supported");var R=m.bounds||[[-10,-10,-10],[10,10,10]],B=new k,O=v(I,I.drawingBufferWidth,I.drawingBufferHeight,{preferFloat:!C}),V=y(I),j=m.cameraObject&&m.cameraObject._ortho===!0||m.camera.projection&&m.camera.projection.type==="orthographic"||!1,q={eye:m.camera.eye||[2,0,0],center:m.camera.center||[0,0,0],up:m.camera.up||[0,1,0],zoomMin:m.camera.zoomMax||.1,zoomMax:m.camera.zoomMin||100,mode:m.camera.mode||"turntable",_ortho:j},U=m.axes||{},J=l(I,U);J.enable=!U.disable;var ee=m.spikes||{},ce=c(I,ee),ye=[],xe=[],ue=[],K=[],_e=!0,ie=!0,ne=new Array(16),ae=new Array(16),pe={view:null,projection:ne,model:ae,_ortho:!1},ie=!0,le=[I.drawingBufferWidth,I.drawingBufferHeight],me=m.cameraObject||s(F,q),be={gl:I,contextLost:!1,pixelRatio:m.pixelRatio||1,canvas:F,selection:B,camera:me,axes:J,axesPixels:null,spikes:ce,bounds:R,objects:ye,shape:le,aspect:m.aspectRatio||[1,1,1],pickRadius:m.pickRadius||10,zNear:m.zNear||.01,zFar:m.zFar||1e3,fovy:m.fovy||Math.PI/4,clearColor:m.clearColor||[0,0,0,0],autoResize:w(m.autoResize),autoBounds:w(m.autoBounds),autoScale:!!m.autoScale,autoCenter:w(m.autoCenter),clipToBounds:w(m.clipToBounds),snapToData:!!m.snapToData,onselect:m.onselect||null,onrender:m.onrender||null,onclick:m.onclick||null,cameraParams:pe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(we){this.aspect[0]=we.x,this.aspect[1]=we.y,this.aspect[2]=we.z,ie=!0},setBounds:function(we,Le){this.bounds[0][we]=Le.min,this.bounds[1][we]=Le.max},setClearColor:function(we){this.clearColor=we},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},De=[I.drawingBufferWidth/be.pixelRatio|0,I.drawingBufferHeight/be.pixelRatio|0];function Ge(){if(!be._stopped&&be.autoResize){var we=F.parentNode,Le=1,Ke=1;we&&we!==document.body?(Le=we.clientWidth,Ke=we.clientHeight):(Le=window.innerWidth,Ke=window.innerHeight);var Te=Math.ceil(Le*be.pixelRatio)|0,Ve=Math.ceil(Ke*be.pixelRatio)|0;if(Te!==F.width||Ve!==F.height){F.width=Te,F.height=Ve;var $e=F.style;$e.position=$e.position||"absolute",$e.left="0px",$e.top="0px",$e.width=Le+"px",$e.height=Ke+"px",_e=!0}}}be.autoResize&&Ge(),window.addEventListener("resize",Ge);function ht(){for(var we=ye.length,Le=K.length,Ke=0;Ke0&&ue[Le-1]===0;)ue.pop(),K.pop().dispose()}be.update=function(we){be._stopped||(we=we||{},_e=!0,ie=!0)},be.add=function(we){be._stopped||(we.axes=J,ye.push(we),xe.push(-1),_e=!0,ie=!0,ht())},be.remove=function(we){if(!be._stopped){var Le=ye.indexOf(we);Le<0||(ye.splice(Le,1),xe.pop(),_e=!0,ie=!0,ht())}},be.dispose=function(){if(!be._stopped&&(be._stopped=!0,window.removeEventListener("resize",Ge),F.removeEventListener("webglcontextlost",it),be.mouseListener.enabled=!1,!be.contextLost)){J.dispose(),ce.dispose();for(var we=0;weB.distance)continue;for(var We=0;We1e-6?(C=Math.acos(k),S=Math.sin(C),L=Math.sin((1-u)*C)/S,w=Math.sin(u*C)/S):(L=1-u,w=u),o[0]=L*c+w*p,o[1]=L*f+w*x,o[2]=L*v+w*_,o[3]=L*g+w*y,o}}),5964:(function(a){"use strict";a.exports=function(i){return!i&&i!==0?"":i.toString()}}),9366:(function(a,i,o){"use strict";var s=o(4359);a.exports=u;var l={};function u(c,f,v){var g=[f.style,f.weight,f.variant,f.family].join("_"),p=l[g];if(p||(p=l[g]={}),c in p)return p[c];var x={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};x.triangles=!0;var _=s(c,x);x.triangles=!1;var y=s(c,x),C,k;if(v&&v!==1){for(C=0;C<_.positions.length;++C)for(k=0;k<_.positions[C].length;++k)_.positions[C][k]/=v;for(C=0;C1?1:oe}function T(oe,we,he,ye,Pe,le,ze,Xe,vt,st,Oe,qe){this.gl=oe,this.pixelRatio=1,this.shader=we,this.orthoShader=he,this.projectShader=ye,this.pointBuffer=Pe,this.colorBuffer=le,this.glyphBuffer=ze,this.idBuffer=Xe,this.vao=vt,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=st,this.pickOrthoShader=Oe,this.pickProjectShader=qe,this.points=[],this._selectResult=new y(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}var p=T.prototype;p.pickSlots=1,p.setPickBase=function(oe){this.pickId=oe},p.isTransparent=function(){if(this.hasAlpha)return!0;for(var oe=0;oe<3;++oe)if(this.axesProject[oe]&&this.projectHasAlpha)return!0;return!1},p.isOpaque=function(){if(!this.hasAlpha)return!0;for(var oe=0;oe<3;++oe)if(this.axesProject[oe]&&!this.projectHasAlpha)return!0;return!1};var C=[0,0],A=[0,0,0],P=[0,0,0],D=[0,0,0,1],z=[0,0,0,1],q=m.slice(),U=[0,0,0],O=[[0,0,0],[0,0,0]];function R(oe){return oe[0]=oe[1]=oe[2]=0,oe}function B(oe,we){return oe[0]=we[0],oe[1]=we[1],oe[2]=we[2],oe[3]=1,oe}function Y(oe,we,he,ye){return oe[0]=we[0],oe[1]=we[1],oe[2]=we[2],oe[he]=ye,oe}function X(oe){for(var we=O,he=0;he<2;++he)for(var ye=0;ye<3;++ye)we[he][ye]=Math.max(Math.min(oe[he][ye],1e8),-1e8);return we}function te(oe,we,he,ye){var Pe=we.axesProject,le=we.gl,ze=oe.uniforms,Xe=he.model||m,vt=he.view||m,st=he.projection||m,Oe=we.axesBounds,qe=X(we.clipBounds),mt;we.axes&&we.axes.lastCubeProps?mt=we.axes.lastCubeProps.axis:mt=[1,1,1],C[0]=2/le.drawingBufferWidth,C[1]=2/le.drawingBufferHeight,oe.bind(),ze.view=vt,ze.projection=st,ze.screenSize=C,ze.highlightId=we.highlightId,ze.highlightScale=we.highlightScale,ze.clipBounds=qe,ze.pickGroup=we.pickId/255,ze.pixelRatio=ye;for(var lt=0;lt<3;++lt)if(Pe[lt]){ze.scale=we.projectScale[lt],ze.opacity=we.projectOpacity[lt];for(var Ie=q,de=0;de<16;++de)Ie[de]=0;for(var de=0;de<4;++de)Ie[5*de]=1;Ie[5*lt]=0,mt[lt]<0?Ie[12+lt]=Oe[0][lt]:Ie[12+lt]=Oe[1][lt],f(Ie,Xe,Ie),ze.model=Ie;var Ee=(lt+1)%3,Ue=(lt+2)%3,ge=R(A),Ge=R(P);ge[Ee]=1,Ge[Ue]=1;var tt=k(st,vt,Xe,B(D,ge)),ft=k(st,vt,Xe,B(z,Ge));if(Math.abs(tt[1])>Math.abs(ft[1])){var He=tt;tt=ft,ft=He,He=ge,ge=Ge,Ge=He;var Qe=Ee;Ee=Ue,Ue=Qe}tt[0]<0&&(ge[Ee]=-1),ft[1]>0&&(Ge[Ue]=-1);for(var We=0,pt=0,de=0;de<4;++de)We+=Math.pow(Xe[4*Ee+de],2),pt+=Math.pow(Xe[4*Ue+de],2);ge[Ee]/=Math.sqrt(We),Ge[Ue]/=Math.sqrt(pt),ze.axes[0]=ge,ze.axes[1]=Ge,ze.fragClipBounds[0]=Y(U,qe[0],lt,-1e8),ze.fragClipBounds[1]=Y(U,qe[1],lt,1e8),we.vao.bind(),we.vao.draw(le.TRIANGLES,we.vertexCount),we.lineWidth>0&&(le.lineWidth(we.lineWidth*ye),we.vao.draw(le.LINES,we.lineVertexCount,we.vertexCount)),we.vao.unbind()}}var se=[-1e8,-1e8,-1e8],ue=[1e8,1e8,1e8],re=[se,ue];function j(oe,we,he,ye,Pe,le,ze){var Xe=he.gl;if((le===he.projectHasAlpha||ze)&&te(we,he,ye,Pe),le===he.hasAlpha||ze){oe.bind();var vt=oe.uniforms;vt.model=ye.model||m,vt.view=ye.view||m,vt.projection=ye.projection||m,C[0]=2/Xe.drawingBufferWidth,C[1]=2/Xe.drawingBufferHeight,vt.screenSize=C,vt.highlightId=he.highlightId,vt.highlightScale=he.highlightScale,vt.fragClipBounds=re,vt.clipBounds=he.axes.bounds,vt.opacity=he.opacity,vt.pickGroup=he.pickId/255,vt.pixelRatio=Pe,he.vao.bind(),he.vao.draw(Xe.TRIANGLES,he.vertexCount),he.lineWidth>0&&(Xe.lineWidth(he.lineWidth*Pe),he.vao.draw(Xe.LINES,he.lineVertexCount,he.vertexCount)),he.vao.unbind()}}p.draw=function(oe){var we=this.useOrtho?this.orthoShader:this.shader;j(we,this.projectShader,this,oe,this.pixelRatio,!1,!1)},p.drawTransparent=function(oe){var we=this.useOrtho?this.orthoShader:this.shader;j(we,this.projectShader,this,oe,this.pixelRatio,!0,!1)},p.drawPick=function(oe){var we=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;j(we,this.pickProjectShader,this,oe,1,!0,!0)},p.pick=function(oe){if(!oe||oe.id!==this.pickId)return null;var we=oe.value[2]+(oe.value[1]<<8)+(oe.value[0]<<16);if(we>=this.pointCount||we<0)return null;var he=this.points[we],ye=this._selectResult;ye.index=we;for(var Pe=0;Pe<3;++Pe)ye.position[Pe]=ye.dataCoordinate[Pe]=he[Pe];return ye},p.highlight=function(oe){if(!oe)this.highlightId=[1,1,1,1];else{var we=oe.index,he=we&255,ye=we>>8&255,Pe=we>>16&255;this.highlightId=[he/255,ye/255,Pe/255,0]}};function fe(oe,we,he,ye){var Pe;M(oe)?we0){var lr=0,Ye=Ue,Te=[0,0,0,1],Fe=[0,0,0,1],Ae=M(mt)&&M(mt[0]),Re=M(de)&&M(de[0]);e:for(var ye=0;ye0?1-pt[0][0]:$t<0?1+pt[1][0]:1,gr*=gr>0?1-pt[0][1]:gr<0?1+pt[1][1]:1;for(var Br=[$t,gr],Nn=Qe.cells||[],Xn=Qe.positions||[],ft=0;ftthis.buffer.length){l.free(this.buffer);for(var M=this.buffer=l.mallocUint8(c(E*g*4)),w=0;wM)for(g=M;gE)for(g=E;g=0){for(var O=U.type.charAt(U.type.length-1)|0,R=new Array(O),B=0;B=0;)Y+=1;z[q]=Y}var X=new Array(M.length);function te(){y.program=c.program(S,y._vref,y._fref,D,z);for(var se=0;se=0){var p=S.charCodeAt(S.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+y+": "+S);f(d,m,T[0],g,p,E,y)}else if(S.indexOf("mat")>=0){var p=S.charCodeAt(S.length-1)-48;if(p<2||p>4)throw new s("","Invalid data type for attribute "+y+": "+S);h(d,m,T,g,p,E,y)}else throw new s("","Unknown data type for attribute "+y+": "+S);break}}return E}}),3327:(function(a,i,o){"use strict";var s=o(216),l=o(8866);a.exports=f;function u(h){return function(){return h}}function c(h,v){for(var d=new Array(h),m=0;m4)throw new l("","Invalid data type");switch(Y.charAt(0)){case"b":case"i":h["uniform"+X+"iv"](m[z],q);break;case"v":h["uniform"+X+"fv"](m[z],q);break;default:throw new l("","Unrecognized data type for vector "+name+": "+Y)}}else if(Y.indexOf("mat")===0&&Y.length===4){if(X=Y.charCodeAt(Y.length-1)-48,X<2||X>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+Y);h["uniformMatrix"+X+"fv"](m[z],!1,q);break}else throw new l("","Unknown uniform data type for "+name+": "+Y)}}}}}function E(S,T){if(typeof T!="object")return[[S,T]];var p=[];for(var C in T){var A=T[C],P=S;parseInt(C)+""===C?P+="["+C+"]":P+="."+C,typeof A=="object"?p.push.apply(p,E(P,A)):p.push([P,A])}return p}function M(S){switch(S){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=S.indexOf("vec");if(0<=T&&T<=1&&S.length===4+T){var p=S.charCodeAt(S.length-1)-48;if(p<2||p>4)throw new l("","Invalid data type");return S.charAt(0)==="b"?c(p,!1):c(p,0)}else if(S.indexOf("mat")===0&&S.length===4){var p=S.charCodeAt(S.length-1)-48;if(p<2||p>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+S);return c(p*p,0)}else throw new l("","Unknown uniform data type for "+name+": "+S)}}function w(S,T,p){if(typeof p=="object"){var C=k(p);Object.defineProperty(S,T,{get:u(C),set:g(p),enumerable:!0,configurable:!1})}else m[p]?Object.defineProperty(S,T,{get:x(p),set:g(p),enumerable:!0,configurable:!1}):S[T]=M(d[p].type)}function k(S){var T;if(Array.isArray(S)){T=new Array(S.length);for(var p=0;p1){d[0]in h||(h[d[0]]=[]),h=h[d[0]];for(var m=1;m1)for(var E=0;E1?1:ae}function T(ae,pe,ie,le,me,be,De,Ge,ht,it,Oe,ze){this.gl=ae,this.pixelRatio=1,this.shader=pe,this.orthoShader=ie,this.projectShader=le,this.pointBuffer=me,this.colorBuffer=be,this.glyphBuffer=De,this.idBuffer=Ge,this.vao=ht,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=it,this.pickOrthoShader=Oe,this.pickProjectShader=ze,this.points=[],this._selectResult=new w(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}var m=T.prototype;m.pickSlots=1,m.setPickBase=function(ae){this.pickId=ae},m.isTransparent=function(){if(this.hasAlpha)return!0;for(var ae=0;ae<3;++ae)if(this.axesProject[ae]&&this.projectHasAlpha)return!0;return!1},m.isOpaque=function(){if(!this.hasAlpha)return!0;for(var ae=0;ae<3;++ae)if(this.axesProject[ae]&&!this.projectHasAlpha)return!0;return!1};var F=[0,0],E=[0,0,0],I=[0,0,0],R=[0,0,0,1],B=[0,0,0,1],O=x.slice(),V=[0,0,0],j=[[0,0,0],[0,0,0]];function q(ae){return ae[0]=ae[1]=ae[2]=0,ae}function U(ae,pe){return ae[0]=pe[0],ae[1]=pe[1],ae[2]=pe[2],ae[3]=1,ae}function J(ae,pe,ie,le){return ae[0]=pe[0],ae[1]=pe[1],ae[2]=pe[2],ae[ie]=le,ae}function ee(ae){for(var pe=j,ie=0;ie<2;++ie)for(var le=0;le<3;++le)pe[ie][le]=Math.max(Math.min(ae[ie][le],1e8),-1e8);return pe}function ce(ae,pe,ie,le){var me=pe.axesProject,be=pe.gl,De=ae.uniforms,Ge=ie.model||x,ht=ie.view||x,it=ie.projection||x,Oe=pe.axesBounds,ze=ee(pe.clipBounds),ct;pe.axes&&pe.axes.lastCubeProps?ct=pe.axes.lastCubeProps.axis:ct=[1,1,1],F[0]=2/be.drawingBufferWidth,F[1]=2/be.drawingBufferHeight,ae.bind(),De.view=ht,De.projection=it,De.screenSize=F,De.highlightId=pe.highlightId,De.highlightScale=pe.highlightScale,De.clipBounds=ze,De.pickGroup=pe.pickId/255,De.pixelRatio=le;for(var et=0;et<3;++et)if(me[et]){De.scale=pe.projectScale[et],De.opacity=pe.projectOpacity[et];for(var qe=O,we=0;we<16;++we)qe[we]=0;for(var we=0;we<4;++we)qe[5*we]=1;qe[5*et]=0,ct[et]<0?qe[12+et]=Oe[0][et]:qe[12+et]=Oe[1][et],f(qe,Ge,qe),De.model=qe;var Le=(et+1)%3,Ke=(et+2)%3,Te=q(E),Ve=q(I);Te[Le]=1,Ve[Ke]=1;var $e=L(it,ht,Ge,U(R,Te)),ot=L(it,ht,Ge,U(B,Ve));if(Math.abs($e[1])>Math.abs(ot[1])){var tt=$e;$e=ot,ot=tt,tt=Te,Te=Ve,Ve=tt;var nt=Le;Le=Ke,Ke=nt}$e[0]<0&&(Te[Le]=-1),ot[1]>0&&(Ve[Ke]=-1);for(var We=0,mt=0,we=0;we<4;++we)We+=Math.pow(Ge[4*Le+we],2),mt+=Math.pow(Ge[4*Ke+we],2);Te[Le]/=Math.sqrt(We),Ve[Ke]/=Math.sqrt(mt),De.axes[0]=Te,De.axes[1]=Ve,De.fragClipBounds[0]=J(V,ze[0],et,-1e8),De.fragClipBounds[1]=J(V,ze[1],et,1e8),pe.vao.bind(),pe.vao.draw(be.TRIANGLES,pe.vertexCount),pe.lineWidth>0&&(be.lineWidth(pe.lineWidth*le),pe.vao.draw(be.LINES,pe.lineVertexCount,pe.vertexCount)),pe.vao.unbind()}}var ye=[-1e8,-1e8,-1e8],xe=[1e8,1e8,1e8],ue=[ye,xe];function K(ae,pe,ie,le,me,be,De){var Ge=ie.gl;if((be===ie.projectHasAlpha||De)&&ce(pe,ie,le,me),be===ie.hasAlpha||De){ae.bind();var ht=ae.uniforms;ht.model=le.model||x,ht.view=le.view||x,ht.projection=le.projection||x,F[0]=2/Ge.drawingBufferWidth,F[1]=2/Ge.drawingBufferHeight,ht.screenSize=F,ht.highlightId=ie.highlightId,ht.highlightScale=ie.highlightScale,ht.fragClipBounds=ue,ht.clipBounds=ie.axes.bounds,ht.opacity=ie.opacity,ht.pickGroup=ie.pickId/255,ht.pixelRatio=me,ie.vao.bind(),ie.vao.draw(Ge.TRIANGLES,ie.vertexCount),ie.lineWidth>0&&(Ge.lineWidth(ie.lineWidth*me),ie.vao.draw(Ge.LINES,ie.lineVertexCount,ie.vertexCount)),ie.vao.unbind()}}m.draw=function(ae){var pe=this.useOrtho?this.orthoShader:this.shader;K(pe,this.projectShader,this,ae,this.pixelRatio,!1,!1)},m.drawTransparent=function(ae){var pe=this.useOrtho?this.orthoShader:this.shader;K(pe,this.projectShader,this,ae,this.pixelRatio,!0,!1)},m.drawPick=function(ae){var pe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;K(pe,this.pickProjectShader,this,ae,1,!0,!0)},m.pick=function(ae){if(!ae||ae.id!==this.pickId)return null;var pe=ae.value[2]+(ae.value[1]<<8)+(ae.value[0]<<16);if(pe>=this.pointCount||pe<0)return null;var ie=this.points[pe],le=this._selectResult;le.index=pe;for(var me=0;me<3;++me)le.position[me]=le.dataCoordinate[me]=ie[me];return le},m.highlight=function(ae){if(!ae)this.highlightId=[1,1,1,1];else{var pe=ae.index,ie=pe&255,le=pe>>8&255,me=pe>>16&255;this.highlightId=[ie/255,le/255,me/255,0]}};function _e(ae,pe,ie,le){var me;k(ae)?pe0){var fr=0,Ot=Ke,cr=[0,0,0,1],Ct=[0,0,0,1],wt=k(ct)&&k(ct[0]),Tt=k(we)&&k(we[0]);e:for(var le=0;le0?1-mt[0][0]:Kr<0?1+mt[1][0]:1,Nr*=Nr>0?1-mt[0][1]:Nr<0?1+mt[1][1]:1;for(var dn=[Kr,Nr],Dt=nt.cells||[],At=nt.positions||[],ot=0;otthis.buffer.length){l.free(this.buffer);for(var k=this.buffer=l.mallocUint8(c(C*y*4)),S=0;Sk)for(y=k;yC)for(y=C;y=0){for(var j=V.type.charAt(V.type.length-1)|0,q=new Array(j),U=0;U=0;)J+=1;B[O]=J}var ee=new Array(k.length);function ce(){w.program=c.program(A,w._vref,w._fref,R,B);for(var ye=0;ye=0){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new s("","Invalid data type for attribute "+w+": "+A);f(p,x,T[0],y,m,C,w)}else if(A.indexOf("mat")>=0){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new s("","Invalid data type for attribute "+w+": "+A);v(p,x,T,y,m,C,w)}else throw new s("","Unknown data type for attribute "+w+": "+A);break}}return C}}),3327:(function(a,i,o){"use strict";var s=o(216),l=o(8866);a.exports=f;function u(v){return function(){return v}}function c(v,g){for(var p=new Array(v),x=0;x4)throw new l("","Invalid data type");switch(J.charAt(0)){case"b":case"i":v["uniform"+ee+"iv"](x[B],O);break;case"v":v["uniform"+ee+"fv"](x[B],O);break;default:throw new l("","Unrecognized data type for vector "+name+": "+J)}}else if(J.indexOf("mat")===0&&J.length===4){if(ee=J.charCodeAt(J.length-1)-48,ee<2||ee>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+J);v["uniformMatrix"+ee+"fv"](x[B],!1,O);break}else throw new l("","Unknown uniform data type for "+name+": "+J)}}}}}function C(A,T){if(typeof T!="object")return[[A,T]];var m=[];for(var F in T){var E=T[F],I=A;parseInt(F)+""===F?I+="["+F+"]":I+="."+F,typeof E=="object"?m.push.apply(m,C(I,E)):m.push([I,E])}return m}function k(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=A.indexOf("vec");if(0<=T&&T<=1&&A.length===4+T){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new l("","Invalid data type");return A.charAt(0)==="b"?c(m,!1):c(m,0)}else if(A.indexOf("mat")===0&&A.length===4){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+A);return c(m*m,0)}else throw new l("","Unknown uniform data type for "+name+": "+A)}}function S(A,T,m){if(typeof m=="object"){var F=L(m);Object.defineProperty(A,T,{get:u(F),set:y(m),enumerable:!0,configurable:!1})}else x[m]?Object.defineProperty(A,T,{get:_(m),set:y(m),enumerable:!0,configurable:!1}):A[T]=k(p[m].type)}function L(A){var T;if(Array.isArray(A)){T=new Array(A.length);for(var m=0;m1){p[0]in v||(v[p[0]]=[]),v=v[p[0]];for(var x=1;x1)for(var C=0;C<_.size;++C)p.push({name:_.name.replace("[0]","["+C+"]"),type:y});else p.push({name:_.name,type:y})}}return p}function c(f,v){for(var g=f.getProgramParameter(v,f.ACTIVE_ATTRIBUTES),p=[],x=0;x0)for(var j=0;jk)return S-1}return S},v=function(w,k,y){return wy?y:w},d=function(w,k,y){var S=k.vectors,T=k.meshgrid,p=w[0],C=w[1],A=w[2],P=T[0].length,D=T[1].length,z=T[2].length,q=h(T[0],p),U=h(T[1],C),O=h(T[2],A),R=q+1,B=U+1,Y=O+1;if(q=v(q,0,P-1),R=v(R,0,P-1),U=v(U,0,D-1),B=v(B,0,D-1),O=v(O,0,z-1),Y=v(Y,0,z-1),q<0||U<0||O<0||R>P-1||B>D-1||Y>z-1)return s.create();var X=T[0][q],te=T[0][R],se=T[1][U],ue=T[1][B],re=T[2][O],j=T[2][Y],fe=(p-X)/(te-X),ce=(C-se)/(ue-se),oe=(A-re)/(j-re);isFinite(fe)||(fe=.5),isFinite(ce)||(ce=.5),isFinite(oe)||(oe=.5);var we,he,ye,Pe,le,ze;switch(y.reversedX&&(q=P-1-q,R=P-1-R),y.reversedY&&(U=D-1-U,B=D-1-B),y.reversedZ&&(O=z-1-O,Y=z-1-Y),y.filled){case 5:le=O,ze=Y,ye=U*z,Pe=B*z,we=q*z*D,he=R*z*D;break;case 4:le=O,ze=Y,we=q*z,he=R*z,ye=U*z*P,Pe=B*z*P;break;case 3:ye=U,Pe=B,le=O*D,ze=Y*D,we=q*D*z,he=R*D*z;break;case 2:ye=U,Pe=B,we=q*D,he=R*D,le=O*D*P,ze=Y*D*P;break;case 1:we=q,he=R,le=O*P,ze=Y*P,ye=U*P*z,Pe=B*P*z;break;default:we=q,he=R,ye=U*P,Pe=B*P,le=O*P*D,ze=Y*P*D;break}var Xe=S[we+ye+le],vt=S[we+ye+ze],st=S[we+Pe+le],Oe=S[we+Pe+ze],qe=S[he+ye+le],mt=S[he+ye+ze],lt=S[he+Pe+le],Ie=S[he+Pe+ze],de=s.create(),Ee=s.create(),Ue=s.create(),ge=s.create();s.lerp(de,Xe,qe,fe),s.lerp(Ee,vt,mt,fe),s.lerp(Ue,st,lt,fe),s.lerp(ge,Oe,Ie,fe);var Ge=s.create(),tt=s.create();s.lerp(Ge,de,Ue,ce),s.lerp(tt,Ee,ge,ce);var ft=s.create();return s.lerp(ft,Ge,tt,oe),ft},m=function(w,k){var y=k[0],S=k[1],T=k[2];return w[0]=y<0?-y:y,w[1]=S<0?-S:S,w[2]=T<0?-T:T,w},x=function(w){var k=1/0;w.sort(function(p,C){return p-C});for(var y=w.length,S=1;SR||IeB||deY)},te=s.distance(k[0],k[1]),se=10*te/S,ue=se*se,re=1,j=0,fe=y.length;fe>1&&(re=g(y));for(var ce=0;cej&&(j=Xe),le.push(Xe),z.push({points:we,velocities:he,divergences:le});for(var vt=0;vtue&&s.scale(st,st,se/Math.sqrt(Oe)),s.add(st,st,oe),ye=P(st),s.squaredDistance(Pe,st)-ue>-1e-4*ue){we.push(st),Pe=st,he.push(ye);var ze=D(st,ye),Xe=s.length(ze);isFinite(Xe)&&Xe>j&&(j=Xe),le.push(Xe)}oe=st}}var qe=f(z,w.colormap,j,re);return p?qe.tubeScale=p:(j===0&&(j=1),qe.tubeScale=T*.5*re/j),qe};var E=o(6740),M=o(6405).createMesh;a.exports.createTubeMesh=function(w,k){return M(w,k,{shaders:E,traceType:"streamtube"})}}),990:(function(a,i,o){var s=o(9405),l=o(3236),u=l([`precision highp float; +}`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},i.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}}),7815:(function(a,i,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(S,L,w,A){for(var T=S.points,m=S.velocities,F=S.divergences,E=[],I=[],R=[],B=[],O=[],V=[],j=0,q=0,U=l.create(),J=l.create(),ee=8,ce=0;ce0)for(var K=0;KL)return A-1}return A},g=function(S,L,w){return Sw?w:S},p=function(S,L,w){var A=L.vectors,T=L.meshgrid,m=S[0],F=S[1],E=S[2],I=T[0].length,R=T[1].length,B=T[2].length,O=v(T[0],m),V=v(T[1],F),j=v(T[2],E),q=O+1,U=V+1,J=j+1;if(O=g(O,0,I-1),q=g(q,0,I-1),V=g(V,0,R-1),U=g(U,0,R-1),j=g(j,0,B-1),J=g(J,0,B-1),O<0||V<0||j<0||q>I-1||U>R-1||J>B-1)return s.create();var ee=T[0][O],ce=T[0][q],ye=T[1][V],xe=T[1][U],ue=T[2][j],K=T[2][J],_e=(m-ee)/(ce-ee),ne=(F-ye)/(xe-ye),ae=(E-ue)/(K-ue);isFinite(_e)||(_e=.5),isFinite(ne)||(ne=.5),isFinite(ae)||(ae=.5);var pe,ie,le,me,be,De;switch(w.reversedX&&(O=I-1-O,q=I-1-q),w.reversedY&&(V=R-1-V,U=R-1-U),w.reversedZ&&(j=B-1-j,J=B-1-J),w.filled){case 5:be=j,De=J,le=V*B,me=U*B,pe=O*B*R,ie=q*B*R;break;case 4:be=j,De=J,pe=O*B,ie=q*B,le=V*B*I,me=U*B*I;break;case 3:le=V,me=U,be=j*R,De=J*R,pe=O*R*B,ie=q*R*B;break;case 2:le=V,me=U,pe=O*R,ie=q*R,be=j*R*I,De=J*R*I;break;case 1:pe=O,ie=q,be=j*I,De=J*I,le=V*I*B,me=U*I*B;break;default:pe=O,ie=q,le=V*I,me=U*I,be=j*I*R,De=J*I*R;break}var Ge=A[pe+le+be],ht=A[pe+le+De],it=A[pe+me+be],Oe=A[pe+me+De],ze=A[ie+le+be],ct=A[ie+le+De],et=A[ie+me+be],qe=A[ie+me+De],we=s.create(),Le=s.create(),Ke=s.create(),Te=s.create();s.lerp(we,Ge,ze,_e),s.lerp(Le,ht,ct,_e),s.lerp(Ke,it,et,_e),s.lerp(Te,Oe,qe,_e);var Ve=s.create(),$e=s.create();s.lerp(Ve,we,Ke,ne),s.lerp($e,Le,Te,ne);var ot=s.create();return s.lerp(ot,Ve,$e,ae),ot},x=function(S,L){var w=L[0],A=L[1],T=L[2];return S[0]=w<0?-w:w,S[1]=A<0?-A:A,S[2]=T<0?-T:T,S},_=function(S){var L=1/0;S.sort(function(m,F){return m-F});for(var w=S.length,A=1;Aq||qeU||weJ)},ce=s.distance(L[0],L[1]),ye=10*ce/A,xe=ye*ye,ue=1,K=0,_e=w.length;_e>1&&(ue=y(w));for(var ne=0;ne<_e;ne++){var ae=s.create();s.copy(ae,w[ne]);var pe=[ae],ie=[],le=I(ae),me=ae;ie.push(le);var be=[],De=R(ae,le),Ge=s.length(De);isFinite(Ge)&&Ge>K&&(K=Ge),be.push(Ge),B.push({points:pe,velocities:ie,divergences:be});for(var ht=0;htxe&&s.scale(it,it,ye/Math.sqrt(Oe)),s.add(it,it,ae),le=I(it),s.squaredDistance(me,it)-xe>-1e-4*xe){pe.push(it),me=it,ie.push(le);var De=R(it,le),Ge=s.length(De);isFinite(Ge)&&Ge>K&&(K=Ge),be.push(Ge)}ae=it}}var ze=f(B,S.colormap,K,ue);return m?ze.tubeScale=m:(K===0&&(K=1),ze.tubeScale=T*.5*ue/K),ze};var C=o(6740),k=o(6405).createMesh;a.exports.createTubeMesh=function(S,L){return k(S,L,{shaders:C,traceType:"streamtube"})}}),990:(function(a,i,o){var s=o(9405),l=o(3236),u=l([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1952,7 +1955,7 @@ void main() { eyeDirection = vec3(0,1,0); lightDirection = vec3(0,0,1); } -`]),h=l([`precision highp float; +`]),v=l([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1999,15 +2002,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);i.createShader=function(v){var d=s(v,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return d.attributes.uv.location=0,d.attributes.f.location=1,d.attributes.normal.location=2,d},i.createPickShader=function(v){var d=s(v,u,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return d.attributes.uv.location=0,d.attributes.f.location=1,d.attributes.normal.location=2,d},i.createContourShader=function(v){var d=s(v,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return d.attributes.uv.location=0,d.attributes.f.location=1,d},i.createPickContourShader=function(v){var d=s(v,f,h,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return d.attributes.uv.location=0,d.attributes.f.location=1,d}}),9499:(function(a,i,o){"use strict";a.exports=we;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),h=o(6729),v=o(5298),d=o(9994),m=o(9618),x=o(3711),g=o(6760),E=o(7608),M=o(2478),w=o(6199),k=o(990),y=k.createShader,S=k.createContourShader,T=k.createPickShader,p=k.createPickContourShader,C=40,A=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],P=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],D=[[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(){for(var he=0;he<3;++he){var ye=D[he],Pe=(he+1)%3,le=(he+2)%3;ye[Pe+0]=1,ye[le+3]=1,ye[he+6]=1}})();function z(he,ye,Pe,le,ze){this.position=he,this.index=ye,this.uv=Pe,this.level=le,this.dataCoordinate=ze}var q=256;function U(he,ye,Pe,le,ze,Xe,vt,st,Oe,qe,mt,lt,Ie,de,Ee){this.gl=he,this.shape=ye,this.bounds=Pe,this.objectOffset=Ee,this.intensityBounds=[],this._shader=le,this._pickShader=ze,this._coordinateBuffer=Xe,this._vao=vt,this._colorMap=st,this._contourShader=Oe,this._contourPickShader=qe,this._contourBuffer=mt,this._contourVAO=lt,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new z([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Ie,this._dynamicVAO=de,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=[m(f.mallocFloat(1024),[0,0]),m(f.mallocFloat(1024),[0,0]),m(f.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 O=U.prototype;O.genColormap=function(he,ye){var Pe=!1,le=d([h({colormap:he,nshades:q,format:"rgba"}).map(function(ze,Xe){var vt=ye?R(Xe/255,ye):ze[3];return vt<1&&(Pe=!0),[ze[0],ze[1],ze[2],255*vt]})]);return v.divseq(le,255),this.hasAlphaScale=Pe,le},O.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},O.isOpaque=function(){return!this.isTransparent()},O.pickSlots=1,O.setPickBase=function(he){this.pickId=he};function R(he,ye){if(!ye||!ye.length)return 1;for(var Pe=0;Pehe&&Pe>0){var le=(ye[Pe][0]-he)/(ye[Pe][0]-ye[Pe-1][0]);return ye[Pe][1]*(1-le)+le*ye[Pe-1][1]}}return 1}var B=[0,0,0],Y={showSurface:!1,showContour:!1,projections:[A.slice(),A.slice(),A.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function X(he,ye){var Pe,le,ze,Xe=ye.axes&&ye.axes.lastCubeProps.axis||B,vt=ye.showSurface,st=ye.showContour;for(Pe=0;Pe<3;++Pe)for(vt=vt||ye.surfaceProject[Pe],le=0;le<3;++le)st=st||ye.contourProject[Pe][le];for(Pe=0;Pe<3;++Pe){var Oe=Y.projections[Pe];for(le=0;le<16;++le)Oe[le]=0;for(le=0;le<4;++le)Oe[5*le]=1;Oe[5*Pe]=0,Oe[12+Pe]=ye.axesBounds[+(Xe[Pe]>0)][Pe],g(Oe,he.model,Oe);var qe=Y.clipBounds[Pe];for(ze=0;ze<2;++ze)for(le=0;le<3;++le)qe[ze][le]=he.clipBounds[ze][le];qe[0][Pe]=-1e8,qe[1][Pe]=1e8}return Y.showSurface=vt,Y.showContour=st,Y}var te={model:A,view:A,projection:A,inverseModel:A.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},se=A.slice(),ue=[1,0,0,0,1,0,0,0,1];function re(he,ye){he=he||{};var Pe=this.gl;Pe.disable(Pe.CULL_FACE),this._colorMap.bind(0);var le=te;le.model=he.model||A,le.view=he.view||A,le.projection=he.projection||A,le.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],le.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],le.objectOffset=this.objectOffset,le.contourColor=this.contourColor[0],le.inverseModel=E(le.inverseModel,le.model);for(var ze=0;ze<2;++ze)for(var Xe=le.clipBounds[ze],vt=0;vt<3;++vt)Xe[vt]=Math.min(Math.max(this.clipBounds[ze][vt],-1e8),1e8);le.kambient=this.ambientLight,le.kdiffuse=this.diffuseLight,le.kspecular=this.specularLight,le.roughness=this.roughness,le.fresnel=this.fresnel,le.opacity=this.opacity,le.height=0,le.permutation=ue,le.vertexColor=this.vertexColor;var st=se;for(g(st,le.view,le.model),g(st,le.projection,st),E(st,st),ze=0;ze<3;++ze)le.eyePosition[ze]=st[12+ze]/st[15];var Oe=st[15];for(ze=0;ze<3;++ze)Oe+=this.lightPosition[ze]*st[4*ze+3];for(ze=0;ze<3;++ze){var qe=st[12+ze];for(vt=0;vt<3;++vt)qe+=st[4*vt+ze]*this.lightPosition[vt];le.lightPosition[ze]=qe/Oe}var mt=X(le,this);if(mt.showSurface){for(this._shader.bind(),this._shader.uniforms=le,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Pe.TRIANGLES,this._vertexCount),ze=0;ze<3;++ze)!this.surfaceProject[ze]||!this.vertexCount||(this._shader.uniforms.model=mt.projections[ze],this._shader.uniforms.clipBounds=mt.clipBounds[ze],this._vao.draw(Pe.TRIANGLES,this._vertexCount));this._vao.unbind()}if(mt.showContour){var lt=this._contourShader;le.kambient=1,le.kdiffuse=0,le.kspecular=0,le.opacity=1,lt.bind(),lt.uniforms=le;var Ie=this._contourVAO;for(Ie.bind(),ze=0;ze<3;++ze)for(lt.uniforms.permutation=D[ze],Pe.lineWidth(this.contourWidth[ze]*this.pixelRatio),vt=0;vt>4)/16)/255,ze=Math.floor(le),Xe=le-ze,vt=ye[1]*(he.value[1]+(he.value[2]&15)/16)/255,st=Math.floor(vt),Oe=vt-st;ze+=1,st+=1;var qe=Pe.position;qe[0]=qe[1]=qe[2]=0;for(var mt=0;mt<2;++mt)for(var lt=mt?Xe:1-Xe,Ie=0;Ie<2;++Ie)for(var de=Ie?Oe:1-Oe,Ee=ze+mt,Ue=st+Ie,ge=lt*de,Ge=0;Ge<3;++Ge)qe[Ge]+=this._field[Ge].get(Ee,Ue)*ge;for(var tt=this._pickResult.level,ft=0;ft<3;++ft)if(tt[ft]=M.le(this.contourLevels[ft],qe[ft]),tt[ft]<0)this.contourLevels[ft].length>0&&(tt[ft]=0);else if(tt[ft]Math.abs(Qe-qe[ft])&&(tt[ft]+=1)}for(Pe.index[0]=Xe<.5?ze:ze+1,Pe.index[1]=Oe<.5?st:st+1,Pe.uv[0]=le/ye[0],Pe.uv[1]=vt/ye[1],Ge=0;Ge<3;++Ge)Pe.dataCoordinate[Ge]=this._field[Ge].get(Pe.index[0],Pe.index[1]);return Pe},O.padField=function(he,ye){var Pe=ye.shape.slice(),le=he.shape.slice();v.assign(he.lo(1,1).hi(Pe[0],Pe[1]),ye),v.assign(he.lo(1).hi(Pe[0],1),ye.hi(Pe[0],1)),v.assign(he.lo(1,le[1]-1).hi(Pe[0],1),ye.lo(0,Pe[1]-1).hi(Pe[0],1)),v.assign(he.lo(0,1).hi(1,Pe[1]),ye.hi(1)),v.assign(he.lo(le[0]-1,1).hi(1,Pe[1]),ye.lo(Pe[0]-1)),he.set(0,0,ye.get(0,0)),he.set(0,le[1]-1,ye.get(0,Pe[1]-1)),he.set(le[0]-1,0,ye.get(Pe[0]-1,0)),he.set(le[0]-1,le[1]-1,ye.get(Pe[0]-1,Pe[1]-1))};function fe(he,ye){return Array.isArray(he)?[ye(he[0]),ye(he[1]),ye(he[2])]:[ye(he),ye(he),ye(he)]}function ce(he){return Array.isArray(he)?he.length===3?[he[0],he[1],he[2],1]:[he[0],he[1],he[2],he[3]]:[0,0,0,1]}function oe(he){if(Array.isArray(he)){if(Array.isArray(he))return[ce(he[0]),ce(he[1]),ce(he[2])];var ye=ce(he);return[ye.slice(),ye.slice(),ye.slice()]}}O.update=function(he){he=he||{},this.objectOffset=he.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in he&&(this.contourWidth=fe(he.contourWidth,Number)),"showContour"in he&&(this.showContour=fe(he.showContour,Boolean)),"showSurface"in he&&(this.showSurface=!!he.showSurface),"contourTint"in he&&(this.contourTint=fe(he.contourTint,Boolean)),"contourColor"in he&&(this.contourColor=oe(he.contourColor)),"contourProject"in he&&(this.contourProject=fe(he.contourProject,function(Hi){return fe(Hi,Boolean)})),"surfaceProject"in he&&(this.surfaceProject=he.surfaceProject),"dynamicColor"in he&&(this.dynamicColor=oe(he.dynamicColor)),"dynamicTint"in he&&(this.dynamicTint=fe(he.dynamicTint,Number)),"dynamicWidth"in he&&(this.dynamicWidth=fe(he.dynamicWidth,Number)),"opacity"in he&&(this.opacity=he.opacity),"opacityscale"in he&&(this.opacityscale=he.opacityscale),"colorBounds"in he&&(this.colorBounds=he.colorBounds),"vertexColor"in he&&(this.vertexColor=he.vertexColor?1:0),"colormap"in he&&this._colorMap.setPixels(this.genColormap(he.colormap,this.opacityscale));var ye=he.field||he.coords&&he.coords[2]||null,Pe=!1;if(ye||(this._field[2].shape[0]||this._field[2].shape[2]?ye=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):ye=this._field[2].hi(0,0)),"field"in he||"coords"in he){var le=(ye.shape[0]+2)*(ye.shape[1]+2);le>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(le))),this._field[2]=m(this._field[2].data,[ye.shape[0]+2,ye.shape[1]+2]),this.padField(this._field[2],ye),this.shape=ye.shape.slice();for(var ze=this.shape,Xe=0;Xe<2;++Xe)this._field[2].size>this._field[Xe].data.length&&(f.freeFloat(this._field[Xe].data),this._field[Xe].data=f.mallocFloat(this._field[2].size)),this._field[Xe]=m(this._field[Xe].data,[ze[0]+2,ze[1]+2]);if(he.coords){var vt=he.coords;if(!Array.isArray(vt)||vt.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(Xe=0;Xe<2;++Xe){var st=vt[Xe];for(Ie=0;Ie<2;++Ie)if(st.shape[Ie]!==ze[Ie])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[Xe],st)}}else if(he.ticks){var Oe=he.ticks;if(!Array.isArray(Oe)||Oe.length!==2)throw new Error("gl-surface: invalid ticks");for(Xe=0;Xe<2;++Xe){var qe=Oe[Xe];if((Array.isArray(qe)||qe.length)&&(qe=m(qe)),qe.shape[0]!==ze[Xe])throw new Error("gl-surface: invalid tick length");var mt=m(qe.data,ze);mt.stride[Xe]=qe.stride[0],mt.stride[Xe^1]=0,this.padField(this._field[Xe],mt)}}else{for(Xe=0;Xe<2;++Xe){var lt=[0,0];lt[Xe]=1,this._field[Xe]=m(this._field[Xe].data,[ze[0]+2,ze[1]+2],lt,0)}this._field[0].set(0,0,0);for(var Ie=0;Ie0){for(var ni=0;ni<5;++ni)Nr.pop();Ae-=1}continue e}}}Nn.push(Ae)}this._contourOffsets[Er]=vn,this._contourCounts[Er]=Nn}var ao=f.mallocFloat(Nr.length);for(Xe=0;Xez||P<0||P>z)throw new Error("gl-texture2d: Invalid texture size");return C._shape=[A,P],C.bind(),D.texImage2D(D.TEXTURE_2D,0,C.format,A,P,0,C.format,C.type,null),C._mipLevels=[0],C}function g(C,A,P,D,z,q){this.gl=C,this.handle=A,this.format=z,this.type=q,this._shape=[P,D],this._mipLevels=[0],this._magFilter=C.NEAREST,this._minFilter=C.NEAREST,this._wrapS=C.CLAMP_TO_EDGE,this._wrapT=C.CLAMP_TO_EDGE,this._anisoSamples=1;var U=this,O=[this._wrapS,this._wrapT];Object.defineProperties(O,[{get:function(){return U._wrapS},set:function(B){return U.wrapS=B}},{get:function(){return U._wrapT},set:function(B){return U.wrapT=B}}]),this._wrapVector=O;var R=[this._shape[0],this._shape[1]];Object.defineProperties(R,[{get:function(){return U._shape[0]},set:function(B){return U.width=B}},{get:function(){return U._shape[1]},set:function(B){return U.height=B}}]),this._shapeVector=R}var E=g.prototype;Object.defineProperties(E,{minFilter:{get:function(){return this._minFilter},set:function(C){this.bind();var A=this.gl;if(this.type===A.FLOAT&&c.indexOf(C)>=0&&(A.getExtension("OES_texture_float_linear")||(C=A.NEAREST)),f.indexOf(C)<0)throw new Error("gl-texture2d: Unknown filter mode "+C);return A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,C),this._minFilter=C}},magFilter:{get:function(){return this._magFilter},set:function(C){this.bind();var A=this.gl;if(this.type===A.FLOAT&&c.indexOf(C)>=0&&(A.getExtension("OES_texture_float_linear")||(C=A.NEAREST)),f.indexOf(C)<0)throw new Error("gl-texture2d: Unknown filter mode "+C);return A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,C),this._magFilter=C}},mipSamples:{get:function(){return this._anisoSamples},set:function(C){var A=this._anisoSamples;if(this._anisoSamples=Math.max(C,1)|0,A!==this._anisoSamples){var P=this.gl.getExtension("EXT_texture_filter_anisotropic");P&&this.gl.texParameterf(this.gl.TEXTURE_2D,P.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(C){if(this.bind(),h.indexOf(C)<0)throw new Error("gl-texture2d: Unknown wrap mode "+C);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,C),this._wrapS=C}},wrapT:{get:function(){return this._wrapT},set:function(C){if(this.bind(),h.indexOf(C)<0)throw new Error("gl-texture2d: Unknown wrap mode "+C);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,C),this._wrapT=C}},wrap:{get:function(){return this._wrapVector},set:function(C){if(Array.isArray(C)||(C=[C,C]),C.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var A=0;A<2;++A)if(h.indexOf(C[A])<0)throw new Error("gl-texture2d: Unknown wrap mode "+C);this._wrapS=C[0],this._wrapT=C[1];var P=this.gl;return this.bind(),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,this._wrapS),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,this._wrapT),C}},shape:{get:function(){return this._shapeVector},set:function(C){if(!Array.isArray(C))C=[C|0,C|0];else if(C.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return x(this,C[0]|0,C[1]|0),[C[0]|0,C[1]|0]}},width:{get:function(){return this._shape[0]},set:function(C){return C=C|0,x(this,C,this._shape[1]),C}},height:{get:function(){return this._shape[1]},set:function(C){return C=C|0,x(this,this._shape[0],C),C}}}),E.bind=function(C){var A=this.gl;return C!==void 0&&A.activeTexture(A.TEXTURE0+(C|0)),A.bindTexture(A.TEXTURE_2D,this.handle),C!==void 0?C|0:A.getParameter(A.ACTIVE_TEXTURE)-A.TEXTURE0},E.dispose=function(){this.gl.deleteTexture(this.handle)},E.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var C=Math.min(this._shape[0],this._shape[1]),A=0;C>0;++A,C>>>=1)this._mipLevels.indexOf(A)<0&&this._mipLevels.push(A)},E.setPixels=function(C,A,P,D){var z=this.gl;this.bind(),Array.isArray(A)?(D=P,P=A[1]|0,A=A[0]|0):(A=A||0,P=P||0),D=D||0;var q=d(C)?C:C.raw;if(q){var U=this._mipLevels.indexOf(D)<0;U?(z.texImage2D(z.TEXTURE_2D,0,this.format,this.format,this.type,q),this._mipLevels.push(D)):z.texSubImage2D(z.TEXTURE_2D,D,A,P,this.format,this.type,q)}else if(C.shape&&C.stride&&C.data){if(C.shape.length<2||A+C.shape[1]>this._shape[1]>>>D||P+C.shape[0]>this._shape[0]>>>D||A<0||P<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");w(z,A,P,D,this.format,this.type,this._mipLevels,C)}else throw new Error("gl-texture2d: Unsupported data type")};function M(C,A){return C.length===3?A[2]===1&&A[1]===C[0]*C[2]&&A[0]===C[2]:A[0]===1&&A[1]===C[0]}function w(C,A,P,D,z,q,U,O){var R=O.dtype,B=O.shape.slice();if(B.length<2||B.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var Y=0,X=0,te=M(B,O.stride.slice());R==="float32"?Y=C.FLOAT:R==="float64"?(Y=C.FLOAT,te=!1,R="float32"):R==="uint8"?Y=C.UNSIGNED_BYTE:(Y=C.UNSIGNED_BYTE,te=!1,R="uint8");var se=1;if(B.length===2)X=C.LUMINANCE,B=[B[0],B[1],1],O=s(O.data,B,[O.stride[0],O.stride[1],1],O.offset);else if(B.length===3){if(B[2]===1)X=C.ALPHA;else if(B[2]===2)X=C.LUMINANCE_ALPHA;else if(B[2]===3)X=C.RGB;else if(B[2]===4)X=C.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");se=B[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((X===C.LUMINANCE||X===C.ALPHA)&&(z===C.LUMINANCE||z===C.ALPHA)&&(X=z),X!==z)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ue=O.size,re=U.indexOf(D)<0;if(re&&U.push(D),Y===q&&te)O.offset===0&&O.data.length===ue?re?C.texImage2D(C.TEXTURE_2D,D,z,B[0],B[1],0,z,q,O.data):C.texSubImage2D(C.TEXTURE_2D,D,A,P,B[0],B[1],z,q,O.data):re?C.texImage2D(C.TEXTURE_2D,D,z,B[0],B[1],0,z,q,O.data.subarray(O.offset,O.offset+ue)):C.texSubImage2D(C.TEXTURE_2D,D,A,P,B[0],B[1],z,q,O.data.subarray(O.offset,O.offset+ue));else{var j;q===C.FLOAT?j=u.mallocFloat32(ue):j=u.mallocUint8(ue);var fe=s(j,B,[B[2],B[2]*B[0],1]);Y===C.FLOAT&&q===C.UNSIGNED_BYTE?m(fe,O):l.assign(fe,O),re?C.texImage2D(C.TEXTURE_2D,D,z,B[0],B[1],0,z,q,j.subarray(0,ue)):C.texSubImage2D(C.TEXTURE_2D,D,A,P,B[0],B[1],z,q,j.subarray(0,ue)),q===C.FLOAT?u.freeFloat32(j):u.freeUint8(j)}}function k(C){var A=C.createTexture();return C.bindTexture(C.TEXTURE_2D,A),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.NEAREST),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.NEAREST),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE),A}function y(C,A,P,D,z){var q=C.getParameter(C.MAX_TEXTURE_SIZE);if(A<0||A>q||P<0||P>q)throw new Error("gl-texture2d: Invalid texture shape");if(z===C.FLOAT&&!C.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var U=k(C);return C.texImage2D(C.TEXTURE_2D,0,D,A,P,0,D,z,null),new g(C,U,A,P,D,z)}function S(C,A,P,D,z,q){var U=k(C);return C.texImage2D(C.TEXTURE_2D,0,z,z,q,A),new g(C,U,P,D,z,q)}function T(C,A){var P=A.dtype,D=A.shape.slice(),z=C.getParameter(C.MAX_TEXTURE_SIZE);if(D[0]<0||D[0]>z||D[1]<0||D[1]>z)throw new Error("gl-texture2d: Invalid texture size");var q=M(D,A.stride.slice()),U=0;P==="float32"?U=C.FLOAT:P==="float64"?(U=C.FLOAT,q=!1,P="float32"):P==="uint8"?U=C.UNSIGNED_BYTE:(U=C.UNSIGNED_BYTE,q=!1,P="uint8");var O=0;if(D.length===2)O=C.LUMINANCE,D=[D[0],D[1],1],A=s(A.data,D,[A.stride[0],A.stride[1],1],A.offset);else if(D.length===3)if(D[2]===1)O=C.ALPHA;else if(D[2]===2)O=C.LUMINANCE_ALPHA;else if(D[2]===3)O=C.RGB;else if(D[2]===4)O=C.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");U===C.FLOAT&&!C.getExtension("OES_texture_float")&&(U=C.UNSIGNED_BYTE,q=!1);var R,B,Y=A.size;if(q)A.offset===0&&A.data.length===Y?R=A.data:R=A.data.subarray(A.offset,A.offset+Y);else{var X=[D[2],D[2]*D[0],1];B=u.malloc(Y,P);var te=s(B,D,X,0);(P==="float32"||P==="float64")&&U===C.UNSIGNED_BYTE?m(te,A):l.assign(te,A),R=B.subarray(0,Y)}var se=k(C);return C.texImage2D(C.TEXTURE_2D,0,O,D[0],D[1],0,O,U,R),q||u.free(B),new g(C,se,D[0],D[1],O,U)}function p(C){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||v(C),typeof arguments[1]=="number")return y(C,arguments[1],arguments[2],arguments[3]||C.RGBA,arguments[4]||C.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return y(C,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||C.RGBA,arguments[3]||C.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var A=arguments[1],P=d(A)?A:A.raw;if(P)return S(C,P,A.width|0,A.height|0,arguments[2]||C.RGBA,arguments[3]||C.UNSIGNED_BYTE);if(A.shape&&A.data&&A.stride)return T(C,A)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}}),1433:(function(a){"use strict";function i(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(m)}}),9226:(function(a){a.exports=i;function i(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}}),3126:(function(a){a.exports=i;function i(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}}),3990:(function(a){a.exports=i;function i(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}}),1091:(function(a){a.exports=i;function i(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}}),5911:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],v=l[1],d=l[2];return o[0]=c*d-f*v,o[1]=f*h-u*d,o[2]=u*v-c*h,o}}),5455:(function(a,i,o){a.exports=o(7056)}),7056:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}}),4008:(function(a,i,o){a.exports=o(6690)}),6690:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}}),244:(function(a){a.exports=i;function i(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}}),2613:(function(a){a.exports=1e-6}),9922:(function(a,i,o){a.exports=l;var s=o(2613);function l(u,c){var f=u[0],h=u[1],v=u[2],d=c[0],m=c[1],x=c[2];return Math.abs(f-d)<=s*Math.max(1,Math.abs(f),Math.abs(d))&&Math.abs(h-m)<=s*Math.max(1,Math.abs(h),Math.abs(m))&&Math.abs(v-x)<=s*Math.max(1,Math.abs(v),Math.abs(x))}}),9265:(function(a){a.exports=i;function i(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}}),2681:(function(a){a.exports=i;function i(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}}),5137:(function(a,i,o){a.exports=l;var s=o(1091)();function l(u,c,f,h,v,d){var m,x;for(c||(c=3),f||(f=0),h?x=Math.min(h*c+f,u.length):x=u.length,m=f;m0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}}),7636:(function(a){a.exports=i;function i(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}}),6894:(function(a){a.exports=i;function i(o,s,l,u){var c=l[1],f=l[2],h=s[1]-c,v=s[2]-f,d=Math.sin(u),m=Math.cos(u);return o[0]=s[0],o[1]=c+h*m-v*d,o[2]=f+h*d+v*m,o}}),109:(function(a){a.exports=i;function i(o,s,l,u){var c=l[0],f=l[2],h=s[0]-c,v=s[2]-f,d=Math.sin(u),m=Math.cos(u);return o[0]=c+v*d+h*m,o[1]=s[1],o[2]=f+v*m-h*d,o}}),8692:(function(a){a.exports=i;function i(o,s,l,u){var c=l[0],f=l[1],h=s[0]-c,v=s[1]-f,d=Math.sin(u),m=Math.cos(u);return o[0]=c+h*m-v*d,o[1]=f+h*d+v*m,o[2]=s[2],o}}),2447:(function(a){a.exports=i;function i(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}}),6621:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}}),8489:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}}),1463:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}}),6141:(function(a,i,o){a.exports=o(2953)}),5486:(function(a,i,o){a.exports=o(3066)}),2953:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}}),3066:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}}),2229:(function(a,i,o){a.exports=o(6843)}),6843:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}}),492:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}}),5673:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[3]*u+l[7]*c+l[11]*f+l[15];return h=h||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/h,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/h,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/h,o}}),264:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],v=l[1],d=l[2],m=l[3],x=m*u+v*f-d*c,g=m*c+d*u-h*f,E=m*f+h*c-v*u,M=-h*u-v*c-d*f;return o[0]=x*m+M*-h+g*-d-E*-v,o[1]=g*m+M*-v+E*-h-x*-d,o[2]=E*m+M*-d+x*-v-g*-h,o}}),4361:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}}),2335:(function(a){a.exports=i;function i(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}}),2933:(function(a){a.exports=i;function i(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}}),7536:(function(a){a.exports=i;function i(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}}),4691:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}}),1373:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}}),3750:(function(a){a.exports=i;function i(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}}),3390:(function(a){a.exports=i;function i(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}}),9970:(function(a,i,o){a.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}}),4494:(function(a){a.exports=i;function i(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}}),6808:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}}),2573:(function(a){a.exports=i;function i(o,s,l,u){var c=s[0],f=s[1],h=s[2],v=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=h+u*(l[2]-h),o[3]=v+u*(l[3]-v),o}}),160:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}}),2334:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}}),3576:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}}),1498:(function(a){a.exports=i;function i(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}}),5177:(function(a){a.exports=i;function i(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],h=l*l+u*u+c*c+f*f;return h>0&&(h=1/Math.sqrt(h),o[0]=l*h,o[1]=u*h,o[2]=c*h,o[3]=f*h),o}}),9131:(function(a,i,o){var s=o(5177),l=o(9288);a.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}}),9288:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}}),4844:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}}),4578:(function(a){a.exports=i;function i(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}}),7960:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}}),483:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}}),6860:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}}),5352:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],h=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*h,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*h,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*h,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*h,o}}),4041:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],h=l[0],v=l[1],d=l[2],m=l[3],x=m*u+v*f-d*c,g=m*c+d*u-h*f,E=m*f+h*c-v*u,M=-h*u-v*c-d*f;return o[0]=x*m+M*-h+g*-d-E*-v,o[1]=g*m+M*-v+E*-h-x*-d,o[2]=E*m+M*-d+x*-v-g*-h,o[3]=s[3],o}}),1848:(function(a,i,o){var s=o(4905),l=o(6468);a.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),h=0;h0)continue;ft=ge.slice(0,1).join("")}return Pe(ft),ue+=ft.length,R=R.slice(ft.length),R.length}while(!0)}function Ie(){return/[^a-fA-F0-9]/.test(U)?(Pe(R.join("")),q=h,D):(R.push(U),O=U,D+1)}function de(){return U==="."||/[eE]/.test(U)?(R.push(U),q=M,O=U,D+1):U==="x"&&R.length===1&&R[0]==="0"?(q=p,R.push(U),O=U,D+1):/[^\d]/.test(U)?(Pe(R.join("")),q=h,D):(R.push(U),O=U,D+1)}function Ee(){return U==="f"&&(R.push(U),O=U,D+=1),/[eE]/.test(U)||(U==="-"||U==="+")&&/[eE]/.test(O)?(R.push(U),O=U,D+1):/[^\d]/.test(U)?(Pe(R.join("")),q=h,D):(R.push(U),O=U,D+1)}function Ue(){if(/[^\d\w_]/.test(U)){var ge=R.join("");return ye[ge]?q=y:he[ge]?q=k:q=w,Pe(R.join("")),q=h,D}return R.push(U),O=U,D+1}}}),3508:(function(a,i,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),a.exports=s.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"])}),6852:(function(a){a.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"]}),7932:(function(a,i,o){var s=o(620);a.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","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"])}),620:(function(a){a.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","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"]}),7827:(function(a){a.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]}),4905:(function(a,i,o){var s=o(5874);a.exports=l;function l(u,c){var f=s(c),h=[];return h=h.concat(f(u)),h=h.concat(f(null)),h}}),3236:(function(a){a.exports=function(i){typeof i=="string"&&(i=[i]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,x=-7,g=l?c-1:0,E=l?-1:1,M=o[s+g];for(g+=E,f=M&(1<<-x)-1,M>>=-x,x+=v;x>0;f=f*256+o[s+g],g+=E,x-=8);for(h=f&(1<<-x)-1,f>>=-x,x+=u;x>0;h=h*256+o[s+g],g+=E,x-=8);if(f===0)f=1-m;else{if(f===d)return h?NaN:(M?-1:1)*(1/0);h=h+Math.pow(2,u),f=f-m}return(M?-1:1)*h*Math.pow(2,f-u)},i.write=function(o,s,l,u,c,f){var h,v,d,m=f*8-c-1,x=(1<>1,E=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=u?0:f-1,w=u?1:-1,k=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(v=isNaN(s)?1:0,h=x):(h=Math.floor(Math.log(s)/Math.LN2),s*(d=Math.pow(2,-h))<1&&(h--,d*=2),h+g>=1?s+=E/d:s+=E*Math.pow(2,1-g),s*d>=2&&(h++,d/=2),h+g>=x?(v=0,h=x):h+g>=1?(v=(s*d-1)*Math.pow(2,c),h=h+g):(v=s*Math.pow(2,g-1)*Math.pow(2,c),h=0));c>=8;o[l+M]=v&255,M+=w,v/=256,c-=8);for(h=h<0;o[l+M]=h&255,M+=w,h/=256,m-=8);o[l+M-w]|=k*128}}),8954:(function(a,i,o){"use strict";a.exports=g;var s=o(3250),l=o(6803).Fw;function u(E,M,w){this.vertices=E,this.adjacent=M,this.boundary=w,this.lastVisited=-1}u.prototype.flip=function(){var E=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=E;var M=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=M};function c(E,M,w){this.vertices=E,this.cell=M,this.index=w}function f(E,M){return l(E.vertices,M.vertices)}function h(E){return function(){var M=this.tuple;return E.apply(this,M)}}function v(E){var M=s[E+1];return M||(M=s),h(M)}var d=[];function m(E,M,w){this.dimension=E,this.vertices=M,this.simplices=w,this.interior=w.filter(function(S){return!S.boundary}),this.tuple=new Array(E+1);for(var k=0;k<=E;++k)this.tuple[k]=this.vertices[k];var y=d[E];y||(y=d[E]=v(E)),this.orient=y}var x=m.prototype;x.handleBoundaryDegeneracy=function(E,M){var w=this.dimension,k=this.vertices.length-1,y=this.tuple,S=this.vertices,T=[E];for(E.lastVisited=-k;T.length>0;){E=T.pop();for(var p=E.adjacent,C=0;C<=w;++C){var A=p[C];if(!(!A.boundary||A.lastVisited<=-k)){for(var P=A.vertices,D=0;D<=w;++D){var z=P[D];z<0?y[D]=M:y[D]=S[z]}var q=this.orient();if(q>0)return A;A.lastVisited=-k,q===0&&T.push(A)}}}return null},x.walk=function(E,M){var w=this.vertices.length-1,k=this.dimension,y=this.vertices,S=this.tuple,T=M?this.interior.length*Math.random()|0:this.interior.length-1,p=this.interior[T];e:for(;!p.boundary;){for(var C=p.vertices,A=p.adjacent,P=0;P<=k;++P)S[P]=y[C[P]];p.lastVisited=w;for(var P=0;P<=k;++P){var D=A[P];if(!(D.lastVisited>=w)){var z=S[P];S[P]=E;var q=this.orient();if(S[P]=z,q<0){p=D;continue e}else D.boundary?D.lastVisited=-w:D.lastVisited=w}}return}return p},x.addPeaks=function(E,M){var w=this.vertices.length-1,k=this.dimension,y=this.vertices,S=this.tuple,T=this.interior,p=this.simplices,C=[M];M.lastVisited=w,M.vertices[M.vertices.indexOf(-1)]=w,M.boundary=!1,T.push(M);for(var A=[];C.length>0;){var M=C.pop(),P=M.vertices,D=M.adjacent,z=P.indexOf(w);if(!(z<0)){for(var q=0;q<=k;++q)if(q!==z){var U=D[q];if(!(!U.boundary||U.lastVisited>=w)){var O=U.vertices;if(U.lastVisited!==-w){for(var R=0,B=0;B<=k;++B)O[B]<0?(R=B,S[B]=E):S[B]=y[O[B]];var Y=this.orient();if(Y>0){O[R]=w,U.boundary=!1,T.push(U),C.push(U),U.lastVisited=w;continue}else U.lastVisited=-w}var X=U.adjacent,te=P.slice(),se=D.slice(),ue=new u(te,se,!0);p.push(ue);var re=X.indexOf(M);if(!(re<0)){X[re]=ue,se[z]=U,te[q]=-1,se[q]=M,D[q]=ue,ue.flip();for(var B=0;B<=k;++B){var j=te[B];if(!(j<0||j===w)){for(var fe=new Array(k-1),ce=0,oe=0;oe<=k;++oe){var we=te[oe];we<0||oe===B||(fe[ce++]=we)}A.push(new c(fe,ue,B))}}}}}}}A.sort(f);for(var q=0;q+1=0?T[C++]=p[P]:A=P&1;if(A===(E&1)){var D=T[0];T[0]=T[1],T[1]=D}M.push(T)}}return M};function g(E,M){var w=E.length;if(w===0)throw new Error("Must have at least d+1 points");var k=E[0].length;if(w<=k)throw new Error("Must input at least d+1 points");var y=E.slice(0,k+1),S=s.apply(void 0,y);if(S===0)throw new Error("Input not in general position");for(var T=new Array(k+1),p=0;p<=k;++p)T[p]=p;S<0&&(T[0]=1,T[1]=0);for(var C=new u(T,new Array(k+1),!1),A=C.adjacent,P=new Array(k+2),p=0;p<=k;++p){for(var D=T.slice(),z=0;z<=k;++z)z===p&&(D[z]=-1);var q=D[0];D[0]=D[1],D[1]=q;var U=new u(D,new Array(k+1),!0);A[p]=U,P[p]=U}P[k+1]=C;for(var p=0;p<=k;++p)for(var D=A[p].vertices,O=A[p].adjacent,z=0;z<=k;++z){var R=D[z];if(R<0){O[z]=C;continue}for(var B=0;B<=k;++B)A[B].vertices.indexOf(R)<0&&(O[z]=A[B])}for(var Y=new m(k,y,P),X=!!M,p=k+1;p3*(P+1)?m(this,A):this.left.insert(A):this.left=S([A]);else if(A[0]>this.mid)this.right?4*(this.right.count+1)>3*(P+1)?m(this,A):this.right.insert(A):this.right=S([A]);else{var D=s.ge(this.leftPoints,A,k),z=s.ge(this.rightPoints,A,y);this.leftPoints.splice(D,0,A),this.rightPoints.splice(z,0,A)}},h.remove=function(A){var P=this.count-this.leftPoints;if(A[1]3*(P-1))return x(this,A);var z=this.left.remove(A);return z===c?(this.left=null,this.count-=1,u):(z===u&&(this.count-=1),z)}else if(A[0]>this.mid){if(!this.right)return l;var q=this.left?this.left.count:0;if(4*q>3*(P-1))return x(this,A);var z=this.right.remove(A);return z===c?(this.right=null,this.count-=1,u):(z===u&&(this.count-=1),z)}else{if(this.count===1)return this.leftPoints[0]===A?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===A){if(this.left&&this.right){for(var U=this,O=this.left;O.right;)U=O,O=O.right;if(U===this)O.right=this.right;else{var R=this.left,z=this.right;U.count-=O.count,U.right=O.left,O.left=R,O.right=z}v(this,O),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?v(this,this.left):v(this,this.right);return u}for(var R=s.ge(this.leftPoints,A,k);R=0&&A[z][1]>=P;--z){var q=D(A[z]);if(q)return q}}function M(A,P){for(var D=0;Dthis.mid){if(this.right){var D=this.right.queryPoint(A,P);if(D)return D}return E(this.rightPoints,A,P)}else return M(this.leftPoints,P)},h.queryInterval=function(A,P,D){if(Athis.mid&&this.right){var z=this.right.queryInterval(A,P,D);if(z)return z}return Pthis.mid?E(this.rightPoints,A,D):M(this.leftPoints,D)};function w(A,P){return A-P}function k(A,P){var D=A[0]-P[0];return D||A[1]-P[1]}function y(A,P){var D=A[1]-P[1];return D||A[0]-P[0]}function S(A){if(A.length===0)return null;for(var P=[],D=0;D>1],q=[],U=[],O=[],D=0;D13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}}),395:(function(a){function i(o,s,l){return o*(1-l)+s*l}a.exports=i}),2652:(function(a,i,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),h=o(5665),v={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},d=l(),m=l(),x=[0,0,0,0],g=[[0,0,0],[0,0,0],[0,0,0]],E=[0,0,0];a.exports=function(S,T,p,C,A,P){if(T||(T=[0,0,0]),p||(p=[0,0,0]),C||(C=[0,0,0]),A||(A=[0,0,0,1]),P||(P=[0,0,0,1]),!s(d,S)||(u(m,d),m[3]=0,m[7]=0,m[11]=0,m[15]=1,Math.abs(c(m)<1e-8)))return!1;var D=d[3],z=d[7],q=d[11],U=d[12],O=d[13],R=d[14],B=d[15];if(D!==0||z!==0||q!==0){x[0]=D,x[1]=z,x[2]=q,x[3]=B;var Y=f(m,m);if(!Y)return!1;h(m,m),M(A,x,m)}else A[0]=A[1]=A[2]=0,A[3]=1;if(T[0]=U,T[1]=O,T[2]=R,w(g,d),p[0]=v.length(g[0]),v.normalize(g[0],g[0]),C[0]=v.dot(g[0],g[1]),k(g[1],g[1],g[0],1,-C[0]),p[1]=v.length(g[1]),v.normalize(g[1],g[1]),C[0]/=p[1],C[1]=v.dot(g[0],g[2]),k(g[2],g[2],g[0],1,-C[1]),C[2]=v.dot(g[1],g[2]),k(g[2],g[2],g[1],1,-C[2]),p[2]=v.length(g[2]),v.normalize(g[2],g[2]),C[1]/=p[2],C[2]/=p[2],v.cross(E,g[1],g[2]),v.dot(g[0],E)<0)for(var X=0;X<3;X++)p[X]*=-1,g[X][0]*=-1,g[X][1]*=-1,g[X][2]*=-1;return P[0]=.5*Math.sqrt(Math.max(1+g[0][0]-g[1][1]-g[2][2],0)),P[1]=.5*Math.sqrt(Math.max(1-g[0][0]+g[1][1]-g[2][2],0)),P[2]=.5*Math.sqrt(Math.max(1-g[0][0]-g[1][1]+g[2][2],0)),P[3]=.5*Math.sqrt(Math.max(1+g[0][0]+g[1][1]+g[2][2],0)),g[2][1]>g[1][2]&&(P[0]=-P[0]),g[0][2]>g[2][0]&&(P[1]=-P[1]),g[1][0]>g[0][1]&&(P[2]=-P[2]),!0};function M(y,S,T){var p=S[0],C=S[1],A=S[2],P=S[3];return y[0]=T[0]*p+T[4]*C+T[8]*A+T[12]*P,y[1]=T[1]*p+T[5]*C+T[9]*A+T[13]*P,y[2]=T[2]*p+T[6]*C+T[10]*A+T[14]*P,y[3]=T[3]*p+T[7]*C+T[11]*A+T[15]*P,y}function w(y,S){y[0][0]=S[0],y[0][1]=S[1],y[0][2]=S[2],y[1][0]=S[4],y[1][1]=S[5],y[1][2]=S[6],y[2][0]=S[8],y[2][1]=S[9],y[2][2]=S[10]}function k(y,S,T,p,C){y[0]=S[0]*p+T[0]*C,y[1]=S[1]*p+T[1]*C,y[2]=S[2]*p+T[2]*C}}),4335:(function(a){a.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}}),7442:(function(a,i,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),h=x(),v=x(),d=x();a.exports=m;function m(M,w,k,y){if(c(w)===0||c(k)===0)return!1;var S=u(w,h.translate,h.scale,h.skew,h.perspective,h.quaternion),T=u(k,v.translate,v.scale,v.skew,v.perspective,v.quaternion);return!S||!T?!1:(s(d.translate,h.translate,v.translate,y),s(d.skew,h.skew,v.skew,y),s(d.scale,h.scale,v.scale,y),s(d.perspective,h.perspective,v.perspective,y),f(d.quaternion,h.quaternion,v.quaternion,y),l(M,d.translate,d.scale,d.skew,d.perspective,d.quaternion),!0)}function x(){return{translate:g(),scale:g(1),skew:g(),perspective:E(),quaternion:E()}}function g(M){return[M||0,M||0,M||0]}function E(){return[0,0,0,1]}}),7182:(function(a,i,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();a.exports=function(f,h,v,d,m,x){return s.identity(f),s.fromRotationTranslation(f,x,h),f[3]=m[0],f[7]=m[1],f[11]=m[2],f[15]=m[3],s.identity(u),d[2]!==0&&(u[9]=d[2],s.multiply(f,f,u)),d[1]!==0&&(u[9]=0,u[8]=d[1],s.multiply(f,f,u)),d[0]!==0&&(u[8]=0,u[4]=d[0],s.multiply(f,f,u)),s.scale(f,f,v),f}}),1811:(function(a,i,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),h=o(7089),v=o(6582),d=o(7656),m=o(2504),x=o(3536),g=[0,0,0];a.exports=k;function E(y){this._components=y.slice(),this._time=[0],this.prevMatrix=y.slice(),this.nextMatrix=y.slice(),this.computedMatrix=y.slice(),this.computedInverse=y.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]}var M=E.prototype;M.recalcMatrix=function(y){var S=this._time,T=s.le(S,y),p=this.computedMatrix;if(!(T<0)){var C=this._components;if(T===S.length-1)for(var A=16*T,P=0;P<16;++P)p[P]=C[A++];else{for(var D=S[T+1]-S[T],A=16*T,z=this.prevMatrix,q=!0,P=0;P<16;++P)z[P]=C[A++];for(var U=this.nextMatrix,P=0;P<16;++P)U[P]=C[A++],q=q&&z[P]===U[P];if(D<1e-6||q)for(var P=0;P<16;++P)p[P]=z[P];else l(p,z,U,(y-S[T])/D)}var O=this.computedUp;O[0]=p[1],O[1]=p[5],O[2]=p[9],x(O,O);var R=this.computedInverse;u(R,p);var B=this.computedEye,Y=R[15];B[0]=R[12]/Y,B[1]=R[13]/Y,B[2]=R[14]/Y;for(var X=this.computedCenter,te=Math.exp(this.computedRadius[0]),P=0;P<3;++P)X[P]=B[P]-p[2+4*P]*te}},M.idle=function(y){if(!(y1&&s(u[v[g-2]],u[v[g-1]],x)<=0;)g-=1,v.pop();for(v.push(m),g=d.length;g>1&&s(u[d[g-2]],u[d[g-1]],x)>=0;)g-=1,d.pop();d.push(m)}for(var E=new Array(d.length+v.length-2),M=0,f=0,w=v.length;f0;--k)E[M++]=d[k];return E}}),351:(function(a,i,o){"use strict";a.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,h=0,v=0,d={shift:!1,alt:!1,control:!1,meta:!1},m=!1;function x(A){var P=!1;return"altKey"in A&&(P=P||A.altKey!==d.alt,d.alt=!!A.altKey),"shiftKey"in A&&(P=P||A.shiftKey!==d.shift,d.shift=!!A.shiftKey),"ctrlKey"in A&&(P=P||A.ctrlKey!==d.control,d.control=!!A.ctrlKey),"metaKey"in A&&(P=P||A.metaKey!==d.meta,d.meta=!!A.metaKey),P}function g(A,P){var D=s.x(P),z=s.y(P);"buttons"in P&&(A=P.buttons|0),(A!==f||D!==h||z!==v||x(P))&&(f=A|0,h=D||0,v=z||0,c&&c(f,h,v,d))}function E(A){g(0,A)}function M(){(f||h||v||d.shift||d.alt||d.meta||d.control)&&(h=v=0,f=0,d.shift=d.alt=d.control=d.meta=!1,c&&c(0,0,0,d))}function w(A){x(A)&&c&&c(f,h,v,d)}function k(A){s.buttons(A)===0?g(0,A):g(f,A)}function y(A){g(f|s.buttons(A),A)}function S(A){g(f&~s.buttons(A),A)}function T(){m||(m=!0,u.addEventListener("mousemove",k),u.addEventListener("mousedown",y),u.addEventListener("mouseup",S),u.addEventListener("mouseleave",E),u.addEventListener("mouseenter",E),u.addEventListener("mouseout",E),u.addEventListener("mouseover",E),u.addEventListener("blur",M),u.addEventListener("keyup",w),u.addEventListener("keydown",w),u.addEventListener("keypress",w),u!==window&&(window.addEventListener("blur",M),window.addEventListener("keyup",w),window.addEventListener("keydown",w),window.addEventListener("keypress",w)))}function p(){m&&(m=!1,u.removeEventListener("mousemove",k),u.removeEventListener("mousedown",y),u.removeEventListener("mouseup",S),u.removeEventListener("mouseleave",E),u.removeEventListener("mouseenter",E),u.removeEventListener("mouseout",E),u.removeEventListener("mouseover",E),u.removeEventListener("blur",M),u.removeEventListener("keyup",w),u.removeEventListener("keydown",w),u.removeEventListener("keypress",w),u!==window&&(window.removeEventListener("blur",M),window.removeEventListener("keyup",w),window.removeEventListener("keydown",w),window.removeEventListener("keypress",w)))}T();var C={element:u};return Object.defineProperties(C,{enabled:{get:function(){return m},set:function(A){A?T():p()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return h},enumerable:!0},y:{get:function(){return v},enumerable:!0},mods:{get:function(){return d},enumerable:!0}}),C}}),24:(function(a){var i={left:0,top:0};a.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,h=l.clientY||0,v=s(u);return c[0]=f-v.left,c[1]=h-v.top,c}function s(l){return l===window||l===document||l===document.body?i:l.getBoundingClientRect()}}),4687:(function(a,i){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<=0)return 1<0){if(se=1,j[ce++]=d(T[P],M,w,k),P+=Y,y>0)for(te=1,D=T[P],oe=j[ce]=d(D,M,w,k),ye=j[ce+we],ze=j[ce+Pe],st=j[ce+Xe],(oe!==ye||oe!==ze||oe!==st)&&(q=T[P+z],O=T[P+U],B=T[P+R],h(te,se,D,q,O,B,oe,ye,ze,st,M,w,k),Oe=fe[ce]=ue++),ce+=1,P+=Y,te=2;te0)for(te=1,D=T[P],oe=j[ce]=d(D,M,w,k),ye=j[ce+we],ze=j[ce+Pe],st=j[ce+Xe],(oe!==ye||oe!==ze||oe!==st)&&(q=T[P+z],O=T[P+U],B=T[P+R],h(te,se,D,q,O,B,oe,ye,ze,st,M,w,k),Oe=fe[ce]=ue++,st!==ze&&v(fe[ce+Pe],Oe,O,B,ze,st,M,w,k)),ce+=1,P+=Y,te=2;te0){if(te=1,j[ce++]=d(T[P],M,w,k),P+=Y,S>0)for(se=1,D=T[P],oe=j[ce]=d(D,M,w,k),ze=j[ce+Pe],ye=j[ce+we],st=j[ce+Xe],(oe!==ze||oe!==ye||oe!==st)&&(q=T[P+z],O=T[P+U],B=T[P+R],h(te,se,D,q,O,B,oe,ze,ye,st,M,w,k),Oe=fe[ce]=ue++),ce+=1,P+=Y,se=2;se0)for(se=1,D=T[P],oe=j[ce]=d(D,M,w,k),ze=j[ce+Pe],ye=j[ce+we],st=j[ce+Xe],(oe!==ze||oe!==ye||oe!==st)&&(q=T[P+z],O=T[P+U],B=T[P+R],h(te,se,D,q,O,B,oe,ze,ye,st,M,w,k),Oe=fe[ce]=ue++,st!==ze&&v(fe[ce+Pe],Oe,B,q,st,ze,M,w,k)),ce+=1,P+=Y,se=2;se 0"),typeof f.vertex!="function"&&h("Must specify vertex creation function"),typeof f.cell!="function"&&h("Must specify cell creation function"),typeof f.phase!="function"&&h("Must specify phase function");for(var x=f.getters||[],g=new Array(d),E=0;E=0?g[E]=!0:g[E]=!1;return u(f.vertex,f.cell,f.phase,m,v,g)}}),6199:(function(a,i,o){"use strict";var s=o(1338),l={zero:function(k,y,S,T){var p=k[0],C=S[0];T|=0;var A=0,P=C;for(A=0;A2&&A[1]>2&&T(C.pick(-1,-1).lo(1,1).hi(A[0]-2,A[1]-2),p.pick(-1,-1,0).lo(1,1).hi(A[0]-2,A[1]-2),p.pick(-1,-1,1).lo(1,1).hi(A[0]-2,A[1]-2)),A[1]>2&&(S(C.pick(0,-1).lo(1).hi(A[1]-2),p.pick(0,-1,1).lo(1).hi(A[1]-2)),y(p.pick(0,-1,0).lo(1).hi(A[1]-2))),A[1]>2&&(S(C.pick(A[0]-1,-1).lo(1).hi(A[1]-2),p.pick(A[0]-1,-1,1).lo(1).hi(A[1]-2)),y(p.pick(A[0]-1,-1,0).lo(1).hi(A[1]-2))),A[0]>2&&(S(C.pick(-1,0).lo(1).hi(A[0]-2),p.pick(-1,0,0).lo(1).hi(A[0]-2)),y(p.pick(-1,0,1).lo(1).hi(A[0]-2))),A[0]>2&&(S(C.pick(-1,A[1]-1).lo(1).hi(A[0]-2),p.pick(-1,A[1]-1,0).lo(1).hi(A[0]-2)),y(p.pick(-1,A[1]-1,1).lo(1).hi(A[0]-2))),p.set(0,0,0,0),p.set(0,0,1,0),p.set(A[0]-1,0,0,0),p.set(A[0]-1,0,1,0),p.set(0,A[1]-1,0,0),p.set(0,A[1]-1,1,0),p.set(A[0]-1,A[1]-1,0,0),p.set(A[0]-1,A[1]-1,1,0),p}}function w(k){var y=k.join(),A=d[y];if(A)return A;for(var S=k.length,T=[x,g],p=1;p<=S;++p)T.push(E(p));var C=M,A=C.apply(void 0,T);return d[y]=A,A}a.exports=function(y,S,T){if(Array.isArray(T)||(typeof T=="string"?T=s(S.dimension,T):T=s(S.dimension,"clamp")),S.size===0)return y;if(S.dimension===0)return y.set(0),y;var p=w(T);return p(y,S)}}),4317:(function(a){"use strict";function i(c,f){var h=Math.floor(f),v=f-h,d=0<=h&&h0;){O<64?(y=O,O=0):(y=64,O-=64);for(var R=d[1]|0;R>0;){R<64?(S=R,R=0):(S=64,R-=64),g=q+O*p+R*C,w=U+O*P+R*D;var B=0,Y=0,X=0,te=A,se=p-T*A,ue=C-y*p,re=z,j=P-T*z,fe=D-y*P;for(X=0;X0;){D<64?(y=D,D=0):(y=64,D-=64);for(var z=d[0]|0;z>0;){z<64?(k=z,z=0):(k=64,z-=64),g=A+D*T+z*S,w=P+D*C+z*p;var q=0,U=0,O=T,R=S-y*T,B=C,Y=p-y*C;for(U=0;U0;){U<64?(S=U,U=0):(S=64,U-=64);for(var O=d[0]|0;O>0;){O<64?(k=O,O=0):(k=64,O-=64);for(var R=d[1]|0;R>0;){R<64?(y=R,R=0):(y=64,R-=64),g=z+U*C+O*T+R*p,w=q+U*D+O*A+R*P;var B=0,Y=0,X=0,te=C,se=T-S*C,ue=p-k*T,re=D,j=A-S*D,fe=P-k*A;for(X=0;XE;){B=0,Y=q-y;t:for(O=0;Ote)break t;Y+=A,B+=P}for(B=q,Y=q-y,O=0;O>1,R=O-z,B=O+z,Y=q,X=R,te=O,se=B,ue=U,re=M+1,j=w-1,fe=!0,ce,oe,we,he,ye,Pe,le,ze,Xe,vt=0,st=0,Oe=0,qe,mt,lt,Ie,de,Ee,Ue,ge,Ge,tt,ft,He,Qe,We,pt,kt,qt=C,Wt=x(qt),_r=x(qt);mt=S*Y,lt=S*X,kt=y;e:for(qe=0;qe0){oe=Y,Y=X,X=oe;break e}if(Oe<0)break e;kt+=P}mt=S*se,lt=S*ue,kt=y;e:for(qe=0;qe0){oe=se,se=ue,ue=oe;break e}if(Oe<0)break e;kt+=P}mt=S*Y,lt=S*te,kt=y;e:for(qe=0;qe0){oe=Y,Y=te,te=oe;break e}if(Oe<0)break e;kt+=P}mt=S*X,lt=S*te,kt=y;e:for(qe=0;qe0){oe=X,X=te,te=oe;break e}if(Oe<0)break e;kt+=P}mt=S*Y,lt=S*se,kt=y;e:for(qe=0;qe0){oe=Y,Y=se,se=oe;break e}if(Oe<0)break e;kt+=P}mt=S*te,lt=S*se,kt=y;e:for(qe=0;qe0){oe=te,te=se,se=oe;break e}if(Oe<0)break e;kt+=P}mt=S*X,lt=S*ue,kt=y;e:for(qe=0;qe0){oe=X,X=ue,ue=oe;break e}if(Oe<0)break e;kt+=P}mt=S*X,lt=S*te,kt=y;e:for(qe=0;qe0){oe=X,X=te,te=oe;break e}if(Oe<0)break e;kt+=P}mt=S*se,lt=S*ue,kt=y;e:for(qe=0;qe0){oe=se,se=ue,ue=oe;break e}if(Oe<0)break e;kt+=P}for(mt=S*Y,lt=S*X,Ie=S*te,de=S*se,Ee=S*ue,Ue=S*q,ge=S*O,Ge=S*U,pt=0,kt=y,qe=0;qe0)j--;else if(Oe<0){for(mt=S*Pe,lt=S*re,Ie=S*j,kt=y,qe=0;qe0)for(;;){le=y+j*S,pt=0;e:for(qe=0;qe0){if(--jU){e:for(;;){for(le=y+re*S,pt=0,kt=y,qe=0;qe1&&E?w(g,E[0],E[1]):w(g)}var v={"uint32,1,0":function(m,x){return function(g){var E=g.data,M=g.offset|0,w=g.shape,k=g.stride,y=k[0]|0,S=w[0]|0,T=k[1]|0,p=w[1]|0,C=T,A=T,P=1;S<=32?m(0,S-1,E,M,y,T,S,p,C,A,P):x(0,S-1,E,M,y,T,S,p,C,A,P)}}};function d(m,x){var g=[x,m].join(","),E=v[g],M=c(m,x),w=h(m,x,M);return E(M,w)}a.exports=d}),446:(function(a,i,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,h=c.dtype,v=[f,h],d=v.join(":"),m=l[d];return m||(l[d]=m=s(f,h)),m(c),c}a.exports=u}),9618:(function(a,i,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(x,g){return x[0]-g[0]}function c(){var x=this.stride,g=new Array(x.length),E;for(E=0;E=0&&(T=y|0,S+=C*T,p-=T),new M(this.data,p,C,S)},w.step=function(y){var S=this.shape[0],T=this.stride[0],p=this.offset,C=0,A=Math.ceil;return typeof y=="number"&&(C=y|0,C<0?(p+=T*(S-1),S=A(-S/C)):S=A(S/C),T*=C),new M(this.data,S,T,p)},w.transpose=function(y){y=y===void 0?0:y|0;var S=this.shape,T=this.stride;return new M(this.data,S[y],T[y],this.offset)},w.pick=function(y){var S=[],T=[],p=this.offset;typeof y=="number"&&y>=0?p=p+this.stride[0]*y|0:(S.push(this.shape[0]),T.push(this.stride[0]));var C=g[S.length+1];return C(this.data,S,T,p)},function(y,S,T,p){return new M(y,S[0],T[0],p)}},2:function(x,g,E){function M(k,y,S,T,p,C){this.data=k,this.shape=[y,S],this.stride=[T,p],this.offset=C|0}var w=M.prototype;return w.dtype=x,w.dimension=2,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(w,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),w.set=function(y,S,T){return x==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*S,T):this.data[this.offset+this.stride[0]*y+this.stride[1]*S]=T},w.get=function(y,S){return x==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*S):this.data[this.offset+this.stride[0]*y+this.stride[1]*S]},w.index=function(y,S){return this.offset+this.stride[0]*y+this.stride[1]*S},w.hi=function(y,S){return new M(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof S!="number"||S<0?this.shape[1]:S|0,this.stride[0],this.stride[1],this.offset)},w.lo=function(y,S){var T=this.offset,p=0,C=this.shape[0],A=this.shape[1],P=this.stride[0],D=this.stride[1];return typeof y=="number"&&y>=0&&(p=y|0,T+=P*p,C-=p),typeof S=="number"&&S>=0&&(p=S|0,T+=D*p,A-=p),new M(this.data,C,A,P,D,T)},w.step=function(y,S){var T=this.shape[0],p=this.shape[1],C=this.stride[0],A=this.stride[1],P=this.offset,D=0,z=Math.ceil;return typeof y=="number"&&(D=y|0,D<0?(P+=C*(T-1),T=z(-T/D)):T=z(T/D),C*=D),typeof S=="number"&&(D=S|0,D<0?(P+=A*(p-1),p=z(-p/D)):p=z(p/D),A*=D),new M(this.data,T,p,C,A,P)},w.transpose=function(y,S){y=y===void 0?0:y|0,S=S===void 0?1:S|0;var T=this.shape,p=this.stride;return new M(this.data,T[y],T[S],p[y],p[S],this.offset)},w.pick=function(y,S){var T=[],p=[],C=this.offset;typeof y=="number"&&y>=0?C=C+this.stride[0]*y|0:(T.push(this.shape[0]),p.push(this.stride[0])),typeof S=="number"&&S>=0?C=C+this.stride[1]*S|0:(T.push(this.shape[1]),p.push(this.stride[1]));var A=g[T.length+1];return A(this.data,T,p,C)},function(y,S,T,p){return new M(y,S[0],S[1],T[0],T[1],p)}},3:function(x,g,E){function M(k,y,S,T,p,C,A,P){this.data=k,this.shape=[y,S,T],this.stride=[p,C,A],this.offset=P|0}var w=M.prototype;return w.dtype=x,w.dimension=3,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(w,"order",{get:function(){var y=Math.abs(this.stride[0]),S=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return y>S?S>T?[2,1,0]:y>T?[1,2,0]:[1,0,2]:y>T?[2,0,1]:T>S?[0,1,2]:[0,2,1]}}),w.set=function(y,S,T,p){return x==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*S+this.stride[2]*T,p):this.data[this.offset+this.stride[0]*y+this.stride[1]*S+this.stride[2]*T]=p},w.get=function(y,S,T){return x==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*S+this.stride[2]*T):this.data[this.offset+this.stride[0]*y+this.stride[1]*S+this.stride[2]*T]},w.index=function(y,S,T){return this.offset+this.stride[0]*y+this.stride[1]*S+this.stride[2]*T},w.hi=function(y,S,T){return new M(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},w.lo=function(y,S,T){var p=this.offset,C=0,A=this.shape[0],P=this.shape[1],D=this.shape[2],z=this.stride[0],q=this.stride[1],U=this.stride[2];return typeof y=="number"&&y>=0&&(C=y|0,p+=z*C,A-=C),typeof S=="number"&&S>=0&&(C=S|0,p+=q*C,P-=C),typeof T=="number"&&T>=0&&(C=T|0,p+=U*C,D-=C),new M(this.data,A,P,D,z,q,U,p)},w.step=function(y,S,T){var p=this.shape[0],C=this.shape[1],A=this.shape[2],P=this.stride[0],D=this.stride[1],z=this.stride[2],q=this.offset,U=0,O=Math.ceil;return typeof y=="number"&&(U=y|0,U<0?(q+=P*(p-1),p=O(-p/U)):p=O(p/U),P*=U),typeof S=="number"&&(U=S|0,U<0?(q+=D*(C-1),C=O(-C/U)):C=O(C/U),D*=U),typeof T=="number"&&(U=T|0,U<0?(q+=z*(A-1),A=O(-A/U)):A=O(A/U),z*=U),new M(this.data,p,C,A,P,D,z,q)},w.transpose=function(y,S,T){y=y===void 0?0:y|0,S=S===void 0?1:S|0,T=T===void 0?2:T|0;var p=this.shape,C=this.stride;return new M(this.data,p[y],p[S],p[T],C[y],C[S],C[T],this.offset)},w.pick=function(y,S,T){var p=[],C=[],A=this.offset;typeof y=="number"&&y>=0?A=A+this.stride[0]*y|0:(p.push(this.shape[0]),C.push(this.stride[0])),typeof S=="number"&&S>=0?A=A+this.stride[1]*S|0:(p.push(this.shape[1]),C.push(this.stride[1])),typeof T=="number"&&T>=0?A=A+this.stride[2]*T|0:(p.push(this.shape[2]),C.push(this.stride[2]));var P=g[p.length+1];return P(this.data,p,C,A)},function(y,S,T,p){return new M(y,S[0],S[1],S[2],T[0],T[1],T[2],p)}},4:function(x,g,E){function M(k,y,S,T,p,C,A,P,D,z){this.data=k,this.shape=[y,S,T,p],this.stride=[C,A,P,D],this.offset=z|0}var w=M.prototype;return w.dtype=x,w.dimension=4,Object.defineProperty(w,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(w,"order",{get:E}),w.set=function(y,S,T,p,C){return x==="generic"?this.data.set(this.offset+this.stride[0]*y+this.stride[1]*S+this.stride[2]*T+this.stride[3]*p,C):this.data[this.offset+this.stride[0]*y+this.stride[1]*S+this.stride[2]*T+this.stride[3]*p]=C},w.get=function(y,S,T,p){return x==="generic"?this.data.get(this.offset+this.stride[0]*y+this.stride[1]*S+this.stride[2]*T+this.stride[3]*p):this.data[this.offset+this.stride[0]*y+this.stride[1]*S+this.stride[2]*T+this.stride[3]*p]},w.index=function(y,S,T,p){return this.offset+this.stride[0]*y+this.stride[1]*S+this.stride[2]*T+this.stride[3]*p},w.hi=function(y,S,T,p){return new M(this.data,typeof y!="number"||y<0?this.shape[0]:y|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof p!="number"||p<0?this.shape[3]:p|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},w.lo=function(y,S,T,p){var C=this.offset,A=0,P=this.shape[0],D=this.shape[1],z=this.shape[2],q=this.shape[3],U=this.stride[0],O=this.stride[1],R=this.stride[2],B=this.stride[3];return typeof y=="number"&&y>=0&&(A=y|0,C+=U*A,P-=A),typeof S=="number"&&S>=0&&(A=S|0,C+=O*A,D-=A),typeof T=="number"&&T>=0&&(A=T|0,C+=R*A,z-=A),typeof p=="number"&&p>=0&&(A=p|0,C+=B*A,q-=A),new M(this.data,P,D,z,q,U,O,R,B,C)},w.step=function(y,S,T,p){var C=this.shape[0],A=this.shape[1],P=this.shape[2],D=this.shape[3],z=this.stride[0],q=this.stride[1],U=this.stride[2],O=this.stride[3],R=this.offset,B=0,Y=Math.ceil;return typeof y=="number"&&(B=y|0,B<0?(R+=z*(C-1),C=Y(-C/B)):C=Y(C/B),z*=B),typeof S=="number"&&(B=S|0,B<0?(R+=q*(A-1),A=Y(-A/B)):A=Y(A/B),q*=B),typeof T=="number"&&(B=T|0,B<0?(R+=U*(P-1),P=Y(-P/B)):P=Y(P/B),U*=B),typeof p=="number"&&(B=p|0,B<0?(R+=O*(D-1),D=Y(-D/B)):D=Y(D/B),O*=B),new M(this.data,C,A,P,D,z,q,U,O,R)},w.transpose=function(y,S,T,p){y=y===void 0?0:y|0,S=S===void 0?1:S|0,T=T===void 0?2:T|0,p=p===void 0?3:p|0;var C=this.shape,A=this.stride;return new M(this.data,C[y],C[S],C[T],C[p],A[y],A[S],A[T],A[p],this.offset)},w.pick=function(y,S,T,p){var C=[],A=[],P=this.offset;typeof y=="number"&&y>=0?P=P+this.stride[0]*y|0:(C.push(this.shape[0]),A.push(this.stride[0])),typeof S=="number"&&S>=0?P=P+this.stride[1]*S|0:(C.push(this.shape[1]),A.push(this.stride[1])),typeof T=="number"&&T>=0?P=P+this.stride[2]*T|0:(C.push(this.shape[2]),A.push(this.stride[2])),typeof p=="number"&&p>=0?P=P+this.stride[3]*p|0:(C.push(this.shape[3]),A.push(this.stride[3]));var D=g[C.length+1];return D(this.data,C,A,P)},function(y,S,T,p){return new M(y,S[0],S[1],S[2],S[3],T[0],T[1],T[2],T[3],p)}},5:function(g,E,M){function w(y,S,T,p,C,A,P,D,z,q,U,O){this.data=y,this.shape=[S,T,p,C,A],this.stride=[P,D,z,q,U],this.offset=O|0}var k=w.prototype;return k.dtype=g,k.dimension=5,Object.defineProperty(k,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(k,"order",{get:M}),k.set=function(S,T,p,C,A,P){return g==="generic"?this.data.set(this.offset+this.stride[0]*S+this.stride[1]*T+this.stride[2]*p+this.stride[3]*C+this.stride[4]*A,P):this.data[this.offset+this.stride[0]*S+this.stride[1]*T+this.stride[2]*p+this.stride[3]*C+this.stride[4]*A]=P},k.get=function(S,T,p,C,A){return g==="generic"?this.data.get(this.offset+this.stride[0]*S+this.stride[1]*T+this.stride[2]*p+this.stride[3]*C+this.stride[4]*A):this.data[this.offset+this.stride[0]*S+this.stride[1]*T+this.stride[2]*p+this.stride[3]*C+this.stride[4]*A]},k.index=function(S,T,p,C,A){return this.offset+this.stride[0]*S+this.stride[1]*T+this.stride[2]*p+this.stride[3]*C+this.stride[4]*A},k.hi=function(S,T,p,C,A){return new w(this.data,typeof S!="number"||S<0?this.shape[0]:S|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof p!="number"||p<0?this.shape[2]:p|0,typeof C!="number"||C<0?this.shape[3]:C|0,typeof A!="number"||A<0?this.shape[4]:A|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},k.lo=function(S,T,p,C,A){var P=this.offset,D=0,z=this.shape[0],q=this.shape[1],U=this.shape[2],O=this.shape[3],R=this.shape[4],B=this.stride[0],Y=this.stride[1],X=this.stride[2],te=this.stride[3],se=this.stride[4];return typeof S=="number"&&S>=0&&(D=S|0,P+=B*D,z-=D),typeof T=="number"&&T>=0&&(D=T|0,P+=Y*D,q-=D),typeof p=="number"&&p>=0&&(D=p|0,P+=X*D,U-=D),typeof C=="number"&&C>=0&&(D=C|0,P+=te*D,O-=D),typeof A=="number"&&A>=0&&(D=A|0,P+=se*D,R-=D),new w(this.data,z,q,U,O,R,B,Y,X,te,se,P)},k.step=function(S,T,p,C,A){var P=this.shape[0],D=this.shape[1],z=this.shape[2],q=this.shape[3],U=this.shape[4],O=this.stride[0],R=this.stride[1],B=this.stride[2],Y=this.stride[3],X=this.stride[4],te=this.offset,se=0,ue=Math.ceil;return typeof S=="number"&&(se=S|0,se<0?(te+=O*(P-1),P=ue(-P/se)):P=ue(P/se),O*=se),typeof T=="number"&&(se=T|0,se<0?(te+=R*(D-1),D=ue(-D/se)):D=ue(D/se),R*=se),typeof p=="number"&&(se=p|0,se<0?(te+=B*(z-1),z=ue(-z/se)):z=ue(z/se),B*=se),typeof C=="number"&&(se=C|0,se<0?(te+=Y*(q-1),q=ue(-q/se)):q=ue(q/se),Y*=se),typeof A=="number"&&(se=A|0,se<0?(te+=X*(U-1),U=ue(-U/se)):U=ue(U/se),X*=se),new w(this.data,P,D,z,q,U,O,R,B,Y,X,te)},k.transpose=function(S,T,p,C,A){S=S===void 0?0:S|0,T=T===void 0?1:T|0,p=p===void 0?2:p|0,C=C===void 0?3:C|0,A=A===void 0?4:A|0;var P=this.shape,D=this.stride;return new w(this.data,P[S],P[T],P[p],P[C],P[A],D[S],D[T],D[p],D[C],D[A],this.offset)},k.pick=function(S,T,p,C,A){var P=[],D=[],z=this.offset;typeof S=="number"&&S>=0?z=z+this.stride[0]*S|0:(P.push(this.shape[0]),D.push(this.stride[0])),typeof T=="number"&&T>=0?z=z+this.stride[1]*T|0:(P.push(this.shape[1]),D.push(this.stride[1])),typeof p=="number"&&p>=0?z=z+this.stride[2]*p|0:(P.push(this.shape[2]),D.push(this.stride[2])),typeof C=="number"&&C>=0?z=z+this.stride[3]*C|0:(P.push(this.shape[3]),D.push(this.stride[3])),typeof A=="number"&&A>=0?z=z+this.stride[4]*A|0:(P.push(this.shape[4]),D.push(this.stride[4]));var q=E[P.length+1];return q(this.data,P,D,z)},function(S,T,p,C){return new w(S,T[0],T[1],T[2],T[3],T[4],p[0],p[1],p[2],p[3],p[4],C)}}};function h(x,g){var E=g===-1?"T":String(g),M=f[E];return g===-1?M(x):g===0?M(x,d[x][0]):M(x,d[x],c)}function v(x){if(s(x))return"buffer";if(l)switch(Object.prototype.toString.call(x)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(x)?"array":"generic"}var d={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function m(x,g,E,M){if(x===void 0){var p=d.array[0];return p([])}else typeof x=="number"&&(x=[x]);g===void 0&&(g=[x.length]);var w=g.length;if(E===void 0){E=new Array(w);for(var k=w-1,y=1;k>=0;--k)E[k]=y,y*=g[k]}if(M===void 0){M=0;for(var k=0;k>>0;a.exports=c;function c(f,h){if(isNaN(f)||isNaN(h))return NaN;if(f===h)return f;if(f===0)return h<0?-l:l;var v=s.hi(f),d=s.lo(f);return h>f==f>0?d===u?(v+=1,d=0):d+=1:d===0?(d=u,v-=1):d-=1,s.pack(d,v)}}),8406:(function(a,i){var o=1e-6,s=1e-6;i.vertexNormals=function(l,u,c){for(var f=u.length,h=new Array(f),v=c===void 0?o:c,d=0;dv)for(var P=h[g],D=1/Math.sqrt(T*C),A=0;A<3;++A){var z=(A+1)%3,q=(A+2)%3;P[A]+=D*(p[z]*S[q]-p[q]*S[z])}}for(var d=0;dv)for(var D=1/Math.sqrt(U),A=0;A<3;++A)P[A]*=D;else for(var A=0;A<3;++A)P[A]=0}return h},i.faceNormals=function(l,u,c){for(var f=l.length,h=new Array(f),v=c===void 0?s:c,d=0;dv?k=1/Math.sqrt(k):k=0;for(var g=0;g<3;++g)w[g]*=k;h[d]=w}return h}}),4081:(function(a){"use strict";a.exports=i;function i(o,s,l,u,c,f,h,v,d,m){var x=s+f+m;if(g>0){var g=Math.sqrt(x+1);o[0]=.5*(h-d)/g,o[1]=.5*(v-u)/g,o[2]=.5*(l-f)/g,o[3]=.5*g}else{var E=Math.max(s,f,m),g=Math.sqrt(2*E-x+1);s>=E?(o[0]=.5*g,o[1]=.5*(c+l)/g,o[2]=.5*(v+u)/g,o[3]=.5*(h-d)/g):f>=E?(o[0]=.5*(l+c)/g,o[1]=.5*g,o[2]=.5*(d+h)/g,o[3]=.5*(v-u)/g):(o[0]=.5*(u+v)/g,o[1]=.5*(h+d)/g,o[2]=.5*g,o[3]=.5*(l-c)/g)}return o}}),9977:(function(a,i,o){"use strict";a.exports=g;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function h(E,M,w){return Math.sqrt(Math.pow(E,2)+Math.pow(M,2)+Math.pow(w,2))}function v(E,M,w,k){return Math.sqrt(Math.pow(E,2)+Math.pow(M,2)+Math.pow(w,2)+Math.pow(k,2))}function d(E,M){var w=M[0],k=M[1],y=M[2],S=M[3],T=v(w,k,y,S);T>1e-6?(E[0]=w/T,E[1]=k/T,E[2]=y/T,E[3]=S/T):(E[0]=E[1]=E[2]=0,E[3]=1)}function m(E,M,w){this.radius=s([w]),this.center=s(M),this.rotation=s(E),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 x=m.prototype;x.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},x.recalcMatrix=function(E){this.radius.curve(E),this.center.curve(E),this.rotation.curve(E);var M=this.computedRotation;d(M,M);var w=this.computedMatrix;u(w,M);var k=this.computedCenter,y=this.computedEye,S=this.computedUp,T=Math.exp(this.computedRadius[0]);y[0]=k[0]+T*w[2],y[1]=k[1]+T*w[6],y[2]=k[2]+T*w[10],S[0]=w[1],S[1]=w[5],S[2]=w[9];for(var p=0;p<3;++p){for(var C=0,A=0;A<3;++A)C+=w[p+4*A]*y[A];w[12+p]=-C}},x.getMatrix=function(E,M){this.recalcMatrix(E);var w=this.computedMatrix;if(M){for(var k=0;k<16;++k)M[k]=w[k];return M}return w},x.idle=function(E){this.center.idle(E),this.radius.idle(E),this.rotation.idle(E)},x.flush=function(E){this.center.flush(E),this.radius.flush(E),this.rotation.flush(E)},x.pan=function(E,M,w,k){M=M||0,w=w||0,k=k||0,this.recalcMatrix(E);var y=this.computedMatrix,S=y[1],T=y[5],p=y[9],C=h(S,T,p);S/=C,T/=C,p/=C;var A=y[0],P=y[4],D=y[8],z=A*S+P*T+D*p;A-=S*z,P-=T*z,D-=p*z;var q=h(A,P,D);A/=q,P/=q,D/=q;var U=y[2],O=y[6],R=y[10],B=U*S+O*T+R*p,Y=U*A+O*P+R*D;U-=B*S+Y*A,O-=B*T+Y*P,R-=B*p+Y*D;var X=h(U,O,R);U/=X,O/=X,R/=X;var te=A*M+S*w,se=P*M+T*w,ue=D*M+p*w;this.center.move(E,te,se,ue);var re=Math.exp(this.computedRadius[0]);re=Math.max(1e-4,re+k),this.radius.set(E,Math.log(re))},x.rotate=function(E,M,w,k){this.recalcMatrix(E),M=M||0,w=w||0;var y=this.computedMatrix,S=y[0],T=y[4],p=y[8],C=y[1],A=y[5],P=y[9],D=y[2],z=y[6],q=y[10],U=M*S+w*C,O=M*T+w*A,R=M*p+w*P,B=-(z*R-q*O),Y=-(q*U-D*R),X=-(D*O-z*U),te=Math.sqrt(Math.max(0,1-Math.pow(B,2)-Math.pow(Y,2)-Math.pow(X,2))),se=v(B,Y,X,te);se>1e-6?(B/=se,Y/=se,X/=se,te/=se):(B=Y=X=0,te=1);var ue=this.computedRotation,re=ue[0],j=ue[1],fe=ue[2],ce=ue[3],oe=re*te+ce*B+j*X-fe*Y,we=j*te+ce*Y+fe*B-re*X,he=fe*te+ce*X+re*Y-j*B,ye=ce*te-re*B-j*Y-fe*X;if(k){B=D,Y=z,X=q;var Pe=Math.sin(k)/h(B,Y,X);B*=Pe,Y*=Pe,X*=Pe,te=Math.cos(M),oe=oe*te+ye*B+we*X-he*Y,we=we*te+ye*Y+he*B-oe*X,he=he*te+ye*X+oe*Y-we*B,ye=ye*te-oe*B-we*Y-he*X}var le=v(oe,we,he,ye);le>1e-6?(oe/=le,we/=le,he/=le,ye/=le):(oe=we=he=0,ye=1),this.rotation.set(E,oe,we,he,ye)},x.lookAt=function(E,M,w,k){this.recalcMatrix(E),w=w||this.computedCenter,M=M||this.computedEye,k=k||this.computedUp;var y=this.computedMatrix;l(y,M,w,k);var S=this.computedRotation;f(S,y[0],y[1],y[2],y[4],y[5],y[6],y[8],y[9],y[10]),d(S,S),this.rotation.set(E,S[0],S[1],S[2],S[3]);for(var T=0,p=0;p<3;++p)T+=Math.pow(w[p]-M[p],2);this.radius.set(E,.5*Math.log(Math.max(T,1e-6))),this.center.set(E,w[0],w[1],w[2])},x.translate=function(E,M,w,k){this.center.move(E,M||0,w||0,k||0)},x.setMatrix=function(E,M){var w=this.computedRotation;f(w,M[0],M[1],M[2],M[4],M[5],M[6],M[8],M[9],M[10]),d(w,w),this.rotation.set(E,w[0],w[1],w[2],w[3]);var k=this.computedMatrix;c(k,M);var y=k[15];if(Math.abs(y)>1e-6){var S=k[12]/y,T=k[13]/y,p=k[14]/y;this.recalcMatrix(E);var C=Math.exp(this.computedRadius[0]);this.center.set(E,S-k[2]*C,T-k[6]*C,p-k[10]*C),this.radius.idle(E)}else this.center.idle(E),this.radius.idle(E)},x.setDistance=function(E,M){M>0&&this.radius.set(E,Math.log(M))},x.setDistanceLimits=function(E,M){E>0?E=Math.log(E):E=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,E),this.radius.bounds[0][0]=E,this.radius.bounds[1][0]=M},x.getDistanceLimits=function(E){var M=this.radius.bounds;return E?(E[0]=Math.exp(M[0][0]),E[1]=Math.exp(M[1][0]),E):[Math.exp(M[0][0]),Math.exp(M[1][0])]},x.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]}},x.fromJSON=function(E){var M=this.lastT(),w=E.center;w&&this.center.set(M,w[0],w[1],w[2]);var k=E.rotation;k&&this.rotation.set(M,k[0],k[1],k[2],k[3]);var y=E.distance;y&&y>0&&this.radius.set(M,Math.log(y)),this.setDistanceLimits(E.zoomMin,E.zoomMax)};function g(E){E=E||{};var M=E.center||[0,0,0],w=E.rotation||[0,0,0,1],k=E.radius||1;M=[].slice.call(M,0,3),w=[].slice.call(w,0,4),d(w,w);var y=new m(w,M,Math.log(k));return y.setDistanceLimits(E.zoomMin,E.zoomMax),("eye"in E||"up"in E)&&y.lookAt(0,E.eye,E.center,E.up),y}}),1371:(function(a,i,o){"use strict";var s=o(3233);a.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}}),3202:(function(a){a.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}}),3088:(function(a,i,o){"use strict";a.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,h=u.length,v=[new Array(f),new Array(f)],d=0;d0){P=v[q][C][0],z=q;break}D=P[z^1];for(var U=0;U<2;++U)for(var O=v[U][C],R=0;R0&&(P=B,D=Y,z=U)}return A||P&&g(P,z),D}function M(p,C){var A=v[C][p][0],P=[p];g(A,C);for(var D=A[C^1],z=C;;){for(;D!==p;)P.push(D),D=E(P[P.length-2],D,!1);if(v[0][p].length+v[1][p].length===0)break;var q=P[P.length-1],U=p,O=P[1],R=E(q,U,!0);if(s(c[q],c[U],c[O],c[R])<0)break;P.push(p),D=E(q,U)}return P}function w(p,C){return C[1]===C[C.length-1]}for(var d=0;d0;){var S=v[0][d].length,T=M(d,k);w(y,T)?y.push.apply(y,T):(y.length>0&&x.push(y),y=T)}y.length>0&&x.push(y)}return x}}),5609:(function(a,i,o){"use strict";a.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),h=new Array(c.length),v=new Array(c.length),d=[],m=0;m0;){var g=d.pop();h[g]=!1;for(var E=f[g],m=0;m0}S=S.filter(T);for(var p=S.length,C=new Array(p),A=new Array(p),y=0;y0;){var le=he.pop(),ze=se[le];h(ze,function(qe,mt){return qe-mt});var Xe=ze.length,vt=ye[le],st;if(vt===0){var O=S[le];st=[O]}for(var y=0;y=0)&&(ye[Oe]=vt^1,he.push(Oe),vt===0)){var O=S[Oe];we(O)||(O.reverse(),st.push(O))}}vt===0&&Pe.push(st)}return Pe}}),5085:(function(a,i,o){a.exports=E;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function h(M){return function(w,k){var y=M[w];return y?!!y.queryPoint(k,f):!1}}function v(M){for(var w={},k=0;k0&&w[y]===k[0])S=M[y-1];else return 1;for(var T=1;S;){var p=S.key,C=s(k,p[0],p[1]);if(p[0][0]0)T=-1,S=S.right;else return 0;else if(C>0)S=S.left;else if(C<0)T=1,S=S.right;else return 0}return T}}function m(M){return 1}function x(M){return function(k){return M(k[0],k[1])?0:1}}function g(M,w){return function(y){return M(y[0],y[1])?0:w(y)}}function E(M){for(var w=M.length,k=[],y=[],S=0,T=0;T=m?(p=1,A=m+2*E+w):(p=-E/m,A=E*p+w)):(p=0,M>=0?(C=0,A=w):-M>=g?(C=1,A=g+2*M+w):(C=-M/g,A=M*C+w));else if(C<0)C=0,E>=0?(p=0,A=w):-E>=m?(p=1,A=m+2*E+w):(p=-E/m,A=E*p+w);else{var P=1/T;p*=P,C*=P,A=p*(m*p+x*C+2*E)+C*(x*p+g*C+2*M)+w}else{var D,z,q,U;p<0?(D=x+E,z=g+M,z>D?(q=z-D,U=m-2*x+g,q>=U?(p=1,C=0,A=m+2*E+w):(p=q/U,C=1-p,A=p*(m*p+x*C+2*E)+C*(x*p+g*C+2*M)+w)):(p=0,z<=0?(C=1,A=g+2*M+w):M>=0?(C=0,A=w):(C=-M/g,A=M*C+w))):C<0?(D=x+M,z=m+E,z>D?(q=z-D,U=m-2*x+g,q>=U?(C=1,p=0,A=g+2*M+w):(C=q/U,p=1-C,A=p*(m*p+x*C+2*E)+C*(x*p+g*C+2*M)+w)):(C=0,z<=0?(p=1,A=m+2*E+w):E>=0?(p=0,A=w):(p=-E/m,A=E*p+w))):(q=g+M-x-E,q<=0?(p=0,C=1,A=g+2*M+w):(U=m-2*x+g,q>=U?(p=1,C=0,A=m+2*E+w):(p=q/U,C=1-p,A=p*(m*p+x*C+2*E)+C*(x*p+g*C+2*M)+w)))}for(var O=1-p-C,d=0;d0){var g=f[v-1];if(s(m,g)===0&&u(g)!==x){v-=1;continue}}f[v++]=m}}return f.length=v,f}}),3233:(function(a){"use strict";var i="",o;a.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,i="";else if(i.length>=c)return i.substr(0,c);for(;c>i.length&&u>1;)u&1&&(i+=l),u>>=1,l+=l;return i+=l,i=i.substr(0,c),i}}),3025:(function(a,i,o){a.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}),7004:(function(a){"use strict";a.exports=i;function i(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,h=o[c];l=f+h;var v=l-f,d=h-v;d&&(o[--u]=l,l=d)}for(var m=0,c=u;c0){if(z<=0)return q;U=D+z}else if(D<0){if(z>=0)return q;U=-(D+z)}else return q;var O=v*U;return q>=O||q<=-O?q:M(C,A,P)},function(C,A,P,D){var z=C[0]-D[0],q=A[0]-D[0],U=P[0]-D[0],O=C[1]-D[1],R=A[1]-D[1],B=P[1]-D[1],Y=C[2]-D[2],X=A[2]-D[2],te=P[2]-D[2],se=q*B,ue=U*R,re=U*O,j=z*B,fe=z*R,ce=q*O,oe=Y*(se-ue)+X*(re-j)+te*(fe-ce),we=(Math.abs(se)+Math.abs(ue))*Math.abs(Y)+(Math.abs(re)+Math.abs(j))*Math.abs(X)+(Math.abs(fe)+Math.abs(ce))*Math.abs(te),he=d*we;return oe>he||-oe>he?oe:w(C,A,P,D)}];function y(p){var C=k[p.length];return C||(C=k[p.length]=E(p.length)),C.apply(void 0,p)}function S(p,C,A,P,D,z,q){return function(O,R,B,Y,X){switch(arguments.length){case 0:case 1:return 0;case 2:return P(O,R);case 3:return D(O,R,B);case 4:return z(O,R,B,Y);case 5:return q(O,R,B,Y,X)}for(var te=new Array(arguments.length),se=0;se0&&m>0||d<0&&m<0)return!1;var x=s(h,c,f),g=s(v,c,f);return x>0&&g>0||x<0&&g<0?!1:d===0&&m===0&&x===0&&g===0?l(c,f,h,v):!0}}),8545:(function(a){"use strict";a.exports=o;function i(s,l){var u=s+l,c=u-s,f=u-c,h=l-c,v=s-f,d=v+h;return d?[d,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return i(s[0],-l[0]);var f=u+c,h=new Array(f),v=0,d=0,m=0,x=Math.abs,g=s[d],E=x(g),M=-l[m],w=x(M),k,y;E=c?(k=g,d+=1,d=c?(k=g,d+=1,d>1,M=f[2*E+1];if(M===m)return E;m>1,M=f[2*E+1];if(M===m)return E;m>1,M=f[2*E+1];if(M===m)return E;m>1,M=f[2*E+1];if(M===m)return E;m>1,U=v(C[q],A);U<=0?(U===0&&(z=q),P=q+1):U>0&&(D=q-1)}return z}s=g;function E(C,A){for(var P=new Array(C.length),D=0,z=P.length;D=C.length||v(C[se],q)!==0););}return P}s=E;function M(C,A){if(!A)return E(x(k(C,0)),C,0);for(var P=new Array(A),D=0;D>>B&1&&R.push(z[B]);A.push(R)}return m(A)}s=w;function k(C,A){if(A<0)return[];for(var P=[],D=(1<0)-(u<0)},i.abs=function(u){var c=u>>o-1;return(u^c)-c},i.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},i.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},i.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}i.countTrailingZeros=s,i.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},i.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},i.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,h=c,v=7;for(f>>>=1;f;f>>>=1)h<<=1,h|=f&1,--v;u[c]=h<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},i.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},i.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},i.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},i.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},i.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}}),2014:(function(a,i,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(p){for(var C=0,A=Math.max,P=0,D=p.length;P>1,q=h(p[z],C);q<=0?(q===0&&(D=z),A=z+1):q>0&&(P=z-1)}return D}i.findCell=x;function g(p,C){for(var A=new Array(p.length),P=0,D=A.length;P=p.length||h(p[te],z)!==0););}return A}i.incidence=g;function E(p,C){if(!C)return g(m(w(p,0)),p,0);for(var A=new Array(C),P=0;P>>R&1&&O.push(D[R]);C.push(O)}return d(C)}i.explode=M;function w(p,C){if(C<0)return[];for(var A=[],P=(1<>1:(j>>1)-1}function P(j){for(var fe=C(j);;){var ce=fe,oe=2*j+1,we=2*(j+1),he=j;if(oe0;){var ce=A(j);if(ce>=0){var oe=C(ce);if(fe0){var j=O[0];return p(0,Y-1),Y-=1,P(0),j}return-1}function q(j,fe){var ce=O[j];return E[ce]===fe?j:(E[ce]=-1/0,D(j),z(),E[ce]=fe,Y+=1,D(Y-1))}function U(j){if(!M[j]){M[j]=!0;var fe=x[j],ce=g[j];x[ce]>=0&&(x[ce]=fe),g[fe]>=0&&(g[fe]=ce),R[fe]>=0&&q(R[fe],T(fe)),R[ce]>=0&&q(R[ce],T(ce))}}for(var O=[],R=new Array(d),w=0;w>1;w>=0;--w)P(w);for(;;){var X=z();if(X<0||E[X]>v)break;U(X)}for(var te=[],w=0;w=0&&ce>=0&&fe!==ce){var oe=R[fe],we=R[ce];oe!==we&&re.push([oe,we])}}),l.unique(l.normalize(re)),{positions:te,edges:re}}}),1303:(function(a,i,o){"use strict";a.exports=u;var s=o(3250);function l(c,f){var h,v;if(f[0][0]f[1][0])h=f[1],v=f[0];else{var d=Math.min(c[0][1],c[1][1]),m=Math.max(c[0][1],c[1][1]),x=Math.min(f[0][1],f[1][1]),g=Math.max(f[0][1],f[1][1]);return mg?d-g:m-g}var E,M;c[0][1]f[1][0])h=f[1],v=f[0];else return l(f,c);var d,m;if(c[0][0]c[1][0])d=c[1],m=c[0];else return-l(c,f);var x=s(h,v,m),g=s(h,v,d);if(x<0){if(g<=0)return x}else if(x>0){if(g>=0)return x}else if(g)return g;if(x=s(m,d,v),g=s(m,d,h),x<0){if(g<=0)return x}else if(x>0){if(g>=0)return x}else if(g)return g;return v[0]-m[0]}}),4209:(function(a,i,o){"use strict";a.exports=g;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(E,M,w){this.slabs=E,this.coordinates=M,this.horizontal=w}var h=f.prototype;function v(E,M){return E.y-M}function d(E,M){for(var w=null;E;){var k=E.key,y,S;k[0][0]0)if(M[0]!==k[1][0])w=E,E=E.right;else{var p=d(E.right,M);if(p)return p;E=E.left}else{if(M[0]!==k[1][0])return E;var p=d(E.right,M);if(p)return p;E=E.left}}return w}h.castUp=function(E){var M=s.le(this.coordinates,E[0]);if(M<0)return-1;var w=this.slabs[M],k=d(this.slabs[M],E),y=-1;if(k&&(y=k.value),this.coordinates[M]===E[0]){var S=null;if(k&&(S=k.key),M>0){var T=d(this.slabs[M-1],E);T&&(S?c(T.key,S)>0&&(S=T.key,y=T.value):(y=T.value,S=T.key))}var p=this.horizontal[M];if(p.length>0){var C=s.ge(p,E[1],v);if(C=p.length)return y;A=p[C]}}if(A.start)if(S){var P=u(S[0],S[1],[E[0],A.y]);S[0][0]>S[1][0]&&(P=-P),P>0&&(y=A.index)}else y=A.index;else A.y!==E[1]&&(y=A.index)}}}return y};function m(E,M,w,k){this.y=E,this.index=M,this.start=w,this.closed=k}function x(E,M,w,k){this.x=E,this.segment=M,this.create=w,this.index=k}function g(E){for(var M=E.length,w=2*M,k=new Array(w),y=0;y1&&(M=1);for(var w=1-M,k=d.length,y=new Array(k),S=0;S0||E>0&&y<0){var S=c(M,y,w,E);x.push(S),g.push(S.slice())}y<0?g.push(w.slice()):y>0?x.push(w.slice()):(x.push(w.slice()),g.push(w.slice())),E=y}return{positive:x,negative:g}}function h(d,m){for(var x=[],g=u(d[d.length-1],m),E=d[d.length-1],M=d[0],w=0;w0||g>0&&k<0)&&x.push(c(E,k,M,g)),k>=0&&x.push(M.slice()),g=k}return x}function v(d,m){for(var x=[],g=u(d[d.length-1],m),E=d[d.length-1],M=d[0],w=0;w0||g>0&&k<0)&&x.push(c(E,k,M,g)),k<=0&&x.push(M.slice()),g=k}return x}}),3387:(function(a,i,o){var s;(function(){"use strict";var l={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 u(d){return f(v(d),arguments)}function c(d,m){return u.apply(null,[d].concat(m||[]))}function f(d,m){var x=1,g=d.length,E,M="",w,k,y,S,T,p,C,A;for(w=0;w=0),y.type){case"b":E=parseInt(E,10).toString(2);break;case"c":E=String.fromCharCode(parseInt(E,10));break;case"d":case"i":E=parseInt(E,10);break;case"j":E=JSON.stringify(E,null,y.width?parseInt(y.width):0);break;case"e":E=y.precision?parseFloat(E).toExponential(y.precision):parseFloat(E).toExponential();break;case"f":E=y.precision?parseFloat(E).toFixed(y.precision):parseFloat(E);break;case"g":E=y.precision?String(Number(E.toPrecision(y.precision))):parseFloat(E);break;case"o":E=(parseInt(E,10)>>>0).toString(8);break;case"s":E=String(E),E=y.precision?E.substring(0,y.precision):E;break;case"t":E=String(!!E),E=y.precision?E.substring(0,y.precision):E;break;case"T":E=Object.prototype.toString.call(E).slice(8,-1).toLowerCase(),E=y.precision?E.substring(0,y.precision):E;break;case"u":E=parseInt(E,10)>>>0;break;case"v":E=E.valueOf(),E=y.precision?E.substring(0,y.precision):E;break;case"x":E=(parseInt(E,10)>>>0).toString(16);break;case"X":E=(parseInt(E,10)>>>0).toString(16).toUpperCase();break}l.json.test(y.type)?M+=E:(l.number.test(y.type)&&(!C||y.sign)?(A=C?"+":"-",E=E.toString().replace(l.sign,"")):A="",T=y.pad_char?y.pad_char==="0"?"0":y.pad_char.charAt(1):" ",p=y.width-(A+E).length,S=y.width&&p>0?T.repeat(p):"",M+=y.align?A+E+S:T==="0"?A+S+E:S+A+E)}return M}var h=Object.create(null);function v(d){if(h[d])return h[d];for(var m=d,x,g=[],E=0;m;){if((x=l.text.exec(m))!==null)g.push(x[0]);else if((x=l.modulo.exec(m))!==null)g.push("%");else if((x=l.placeholder.exec(m))!==null){if(x[2]){E|=1;var M=[],w=x[2],k=[];if((k=l.key.exec(w))!==null)for(M.push(k[1]);(w=w.substring(k[0].length))!=="";)if((k=l.key_access.exec(w))!==null)M.push(k[1]);else if((k=l.index_access.exec(w))!==null)M.push(k[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");x[2]=M}else E|=2;if(E===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");g.push({placeholder:x[0],param_no:x[1],keys:x[2],sign:x[3],pad_char:x[4],align:x[5],width:x[6],precision:x[7],type:x[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");m=m.substring(x[0].length)}return h[d]=g}i.sprintf=u,i.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=(function(){return{sprintf:u,vsprintf:c}}).call(i,o,i,a),s!==void 0&&(a.exports=s))})()}),3711:(function(a,i,o){"use strict";a.exports=v;var s=o(2640),l=o(781),u={"2d":function(d,m,x){var g=d({order:m,scalarArguments:3,getters:x==="generic"?[0]:void 0,phase:function(M,w,k,y){return M>y|0},vertex:function(M,w,k,y,S,T,p,C,A,P,D,z,q){var U=(p<<0)+(C<<1)+(A<<2)+(P<<3)|0;if(!(U===0||U===15))switch(U){case 0:D.push([M-.5,w-.5]);break;case 1:D.push([M-.25-.25*(y+k-2*q)/(k-y),w-.25-.25*(S+k-2*q)/(k-S)]);break;case 2:D.push([M-.75-.25*(-y-k+2*q)/(y-k),w-.25-.25*(T+y-2*q)/(y-T)]);break;case 3:D.push([M-.5,w-.5-.5*(S+k+T+y-4*q)/(k-S+y-T)]);break;case 4:D.push([M-.25-.25*(T+S-2*q)/(S-T),w-.75-.25*(-S-k+2*q)/(S-k)]);break;case 5:D.push([M-.5-.5*(y+k+T+S-4*q)/(k-y+S-T),w-.5]);break;case 6:D.push([M-.5-.25*(-y-k+T+S)/(y-k+S-T),w-.5-.25*(-S-k+T+y)/(S-k+y-T)]);break;case 7:D.push([M-.75-.25*(T+S-2*q)/(S-T),w-.75-.25*(T+y-2*q)/(y-T)]);break;case 8:D.push([M-.75-.25*(-T-S+2*q)/(T-S),w-.75-.25*(-T-y+2*q)/(T-y)]);break;case 9:D.push([M-.5-.25*(y+k+-T-S)/(k-y+T-S),w-.5-.25*(S+k+-T-y)/(k-S+T-y)]);break;case 10:D.push([M-.5-.5*(-y-k+-T-S+4*q)/(y-k+T-S),w-.5]);break;case 11:D.push([M-.25-.25*(-T-S+2*q)/(T-S),w-.75-.25*(S+k-2*q)/(k-S)]);break;case 12:D.push([M-.5,w-.5-.5*(-S-k+-T-y+4*q)/(S-k+T-y)]);break;case 13:D.push([M-.75-.25*(y+k-2*q)/(k-y),w-.25-.25*(-T-y+2*q)/(T-y)]);break;case 14:D.push([M-.25-.25*(-y-k+2*q)/(y-k),w-.25-.25*(-S-k+2*q)/(S-k)]);break;case 15:D.push([M-.5,w-.5]);break}},cell:function(M,w,k,y,S,T,p,C,A){S?C.push([M,w]):C.push([w,M])}});return function(E,M){var w=[],k=[];return g(E,w,k,M),{positions:w,cells:k}}}};function c(d,m){var x=d.length+"d",g=u[x];if(g)return g(s,d,m)}function f(d,m){for(var x=l(d,m),g=x.length,E=new Array(g),M=new Array(g),w=0;wMath.max(y,S)?T[2]=1:y>Math.max(k,S)?T[0]=1:T[1]=1;for(var p=0,C=0,A=0;A<3;++A)p+=w[A]*w[A],C+=T[A]*w[A];for(var A=0;A<3;++A)T[A]-=C/p*w[A];return f(T,T),T}function x(w,k,y,S,T,p,C,A){this.center=s(y),this.up=s(S),this.right=s(T),this.radius=s([p]),this.angle=s([C,A]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(w,k),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 P=0;P<16;++P)this.computedMatrix[P]=.5;this.recalcMatrix(0)}var g=x.prototype;g.setDistanceLimits=function(w,k){w>0?w=Math.log(w):w=-1/0,k>0?k=Math.log(k):k=1/0,k=Math.max(k,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=k},g.getDistanceLimits=function(w){var k=this.radius.bounds[0];return w?(w[0]=Math.exp(k[0][0]),w[1]=Math.exp(k[1][0]),w):[Math.exp(k[0][0]),Math.exp(k[1][0])]},g.recalcMatrix=function(w){this.center.curve(w),this.up.curve(w),this.right.curve(w),this.radius.curve(w),this.angle.curve(w);for(var k=this.computedUp,y=this.computedRight,S=0,T=0,p=0;p<3;++p)T+=k[p]*y[p],S+=k[p]*k[p];for(var C=Math.sqrt(S),A=0,p=0;p<3;++p)y[p]-=k[p]*T/S,A+=y[p]*y[p],k[p]/=C;for(var P=Math.sqrt(A),p=0;p<3;++p)y[p]/=P;var D=this.computedToward;c(D,k,y),f(D,D);for(var z=Math.exp(this.computedRadius[0]),q=this.computedAngle[0],U=this.computedAngle[1],O=Math.cos(q),R=Math.sin(q),B=Math.cos(U),Y=Math.sin(U),X=this.computedCenter,te=O*B,se=R*B,ue=Y,re=-O*Y,j=-R*Y,fe=B,ce=this.computedEye,oe=this.computedMatrix,p=0;p<3;++p){var we=te*y[p]+se*D[p]+ue*k[p];oe[4*p+1]=re*y[p]+j*D[p]+fe*k[p],oe[4*p+2]=we,oe[4*p+3]=0}var he=oe[1],ye=oe[5],Pe=oe[9],le=oe[2],ze=oe[6],Xe=oe[10],vt=ye*Xe-Pe*ze,st=Pe*le-he*Xe,Oe=he*ze-ye*le,qe=v(vt,st,Oe);vt/=qe,st/=qe,Oe/=qe,oe[0]=vt,oe[4]=st,oe[8]=Oe;for(var p=0;p<3;++p)ce[p]=X[p]+oe[2+4*p]*z;for(var p=0;p<3;++p){for(var A=0,mt=0;mt<3;++mt)A+=oe[p+4*mt]*ce[mt];oe[12+p]=-A}oe[15]=1},g.getMatrix=function(w,k){this.recalcMatrix(w);var y=this.computedMatrix;if(k){for(var S=0;S<16;++S)k[S]=y[S];return k}return y};var E=[0,0,0];g.rotate=function(w,k,y,S){if(this.angle.move(w,k,y),S){this.recalcMatrix(w);var T=this.computedMatrix;E[0]=T[2],E[1]=T[6],E[2]=T[10];for(var p=this.computedUp,C=this.computedRight,A=this.computedToward,P=0;P<3;++P)T[4*P]=p[P],T[4*P+1]=C[P],T[4*P+2]=A[P];u(T,T,S,E);for(var P=0;P<3;++P)p[P]=T[4*P],C[P]=T[4*P+1];this.up.set(w,p[0],p[1],p[2]),this.right.set(w,C[0],C[1],C[2])}},g.pan=function(w,k,y,S){k=k||0,y=y||0,S=S||0,this.recalcMatrix(w);var T=this.computedMatrix,p=Math.exp(this.computedRadius[0]),C=T[1],A=T[5],P=T[9],D=v(C,A,P);C/=D,A/=D,P/=D;var z=T[0],q=T[4],U=T[8],O=z*C+q*A+U*P;z-=C*O,q-=A*O,U-=P*O;var R=v(z,q,U);z/=R,q/=R,U/=R;var B=z*k+C*y,Y=q*k+A*y,X=U*k+P*y;this.center.move(w,B,Y,X);var te=Math.exp(this.computedRadius[0]);te=Math.max(1e-4,te+S),this.radius.set(w,Math.log(te))},g.translate=function(w,k,y,S){this.center.move(w,k||0,y||0,S||0)},g.setMatrix=function(w,k,y,S){var T=1;typeof y=="number"&&(T=y|0),(T<0||T>3)&&(T=1);var p=(T+2)%3,C=(T+1)%3;k||(this.recalcMatrix(w),k=this.computedMatrix);var A=k[T],P=k[T+4],D=k[T+8];if(S){var q=Math.abs(A),U=Math.abs(P),O=Math.abs(D),R=Math.max(q,U,O);q===R?(A=A<0?-1:1,P=D=0):O===R?(D=D<0?-1:1,A=P=0):(P=P<0?-1:1,A=D=0)}else{var z=v(A,P,D);A/=z,P/=z,D/=z}var B=k[p],Y=k[p+4],X=k[p+8],te=B*A+Y*P+X*D;B-=A*te,Y-=P*te,X-=D*te;var se=v(B,Y,X);B/=se,Y/=se,X/=se;var ue=P*X-D*Y,re=D*B-A*X,j=A*Y-P*B,fe=v(ue,re,j);ue/=fe,re/=fe,j/=fe,this.center.jump(w,Ue,ge,Ge),this.radius.idle(w),this.up.jump(w,A,P,D),this.right.jump(w,B,Y,X);var ce,oe;if(T===2){var we=k[1],he=k[5],ye=k[9],Pe=we*B+he*Y+ye*X,le=we*ue+he*re+ye*j;st<0?ce=-Math.PI/2:ce=Math.PI/2,oe=Math.atan2(le,Pe)}else{var ze=k[2],Xe=k[6],vt=k[10],st=ze*A+Xe*P+vt*D,Oe=ze*B+Xe*Y+vt*X,qe=ze*ue+Xe*re+vt*j;ce=Math.asin(d(st)),oe=Math.atan2(qe,Oe)}this.angle.jump(w,oe,ce),this.recalcMatrix(w);var mt=k[2],lt=k[6],Ie=k[10],de=this.computedMatrix;l(de,k);var Ee=de[15],Ue=de[12]/Ee,ge=de[13]/Ee,Ge=de[14]/Ee,tt=Math.exp(this.computedRadius[0]);this.center.jump(w,Ue-mt*tt,ge-lt*tt,Ge-Ie*tt)},g.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},g.idle=function(w){this.center.idle(w),this.up.idle(w),this.right.idle(w),this.radius.idle(w),this.angle.idle(w)},g.flush=function(w){this.center.flush(w),this.up.flush(w),this.right.flush(w),this.radius.flush(w),this.angle.flush(w)},g.setDistance=function(w,k){k>0&&this.radius.set(w,Math.log(k))},g.lookAt=function(w,k,y,S){this.recalcMatrix(w),k=k||this.computedEye,y=y||this.computedCenter,S=S||this.computedUp;var T=S[0],p=S[1],C=S[2],A=v(T,p,C);if(!(A<1e-6)){T/=A,p/=A,C/=A;var P=k[0]-y[0],D=k[1]-y[1],z=k[2]-y[2],q=v(P,D,z);if(!(q<1e-6)){P/=q,D/=q,z/=q;var U=this.computedRight,O=U[0],R=U[1],B=U[2],Y=T*O+p*R+C*B;O-=Y*T,R-=Y*p,B-=Y*C;var X=v(O,R,B);if(!(X<.01&&(O=p*z-C*D,R=C*P-T*z,B=T*D-p*P,X=v(O,R,B),X<1e-6))){O/=X,R/=X,B/=X,this.up.set(w,T,p,C),this.right.set(w,O,R,B),this.center.set(w,y[0],y[1],y[2]),this.radius.set(w,Math.log(q));var te=p*B-C*R,se=C*O-T*B,ue=T*R-p*O,re=v(te,se,ue);te/=re,se/=re,ue/=re;var j=T*P+p*D+C*z,fe=O*P+R*D+B*z,ce=te*P+se*D+ue*z,oe=Math.asin(d(j)),we=Math.atan2(ce,fe),he=this.angle._state,ye=he[he.length-1],Pe=he[he.length-2];ye=ye%(2*Math.PI);var le=Math.abs(ye+2*Math.PI-we),ze=Math.abs(ye-we),Xe=Math.abs(ye-2*Math.PI-we);le0?B.pop():new ArrayBuffer(O)}i.mallocArrayBuffer=E;function M(U){return new Uint8Array(E(U),0,U)}i.mallocUint8=M;function w(U){return new Uint16Array(E(2*U),0,U)}i.mallocUint16=w;function k(U){return new Uint32Array(E(4*U),0,U)}i.mallocUint32=k;function y(U){return new Int8Array(E(U),0,U)}i.mallocInt8=y;function S(U){return new Int16Array(E(2*U),0,U)}i.mallocInt16=S;function T(U){return new Int32Array(E(4*U),0,U)}i.mallocInt32=T;function p(U){return new Float32Array(E(4*U),0,U)}i.mallocFloat32=i.mallocFloat=p;function C(U){return new Float64Array(E(8*U),0,U)}i.mallocFloat64=i.mallocDouble=C;function A(U){return c?new Uint8ClampedArray(E(U),0,U):M(U)}i.mallocUint8Clamped=A;function P(U){return f?new BigUint64Array(E(8*U),0,U):null}i.mallocBigUint64=P;function D(U){return h?new BigInt64Array(E(8*U),0,U):null}i.mallocBigInt64=D;function z(U){return new DataView(E(U),0,U)}i.mallocDataView=z;function q(U){U=s.nextPow2(U);var O=s.log2(U),R=m[O];return R.length>0?R.pop():new u(U)}i.mallocBuffer=q,i.clearCache=function(){for(var O=0;O<32;++O)v.UINT8[O].length=0,v.UINT16[O].length=0,v.UINT32[O].length=0,v.INT8[O].length=0,v.INT16[O].length=0,v.INT32[O].length=0,v.FLOAT[O].length=0,v.DOUBLE[O].length=0,v.BIGUINT64[O].length=0,v.BIGINT64[O].length=0,v.UINT8C[O].length=0,d[O].length=0,m[O].length=0}}),1755:(function(a){"use strict";"use restrict";a.exports=i;function i(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",B="",Y=R.length,X=B.length,te=q[0]===E||q[0]===k,se=0,ue=-X;se>-1&&(se=U.indexOf(R,se),!(se===-1||(ue=U.indexOf(B,se+Y),ue===-1)||ue<=se));){for(var re=se;re=ue)O[re]=null,U=U.substr(0,re)+" "+U.substr(re+1);else if(O[re]!==null){var j=O[re].indexOf(q[0]);j===-1?O[re]+=q:te&&(O[re]=O[re].substr(0,j+1)+(1+parseInt(O[re][j+1]))+O[re].substr(j+2))}var fe=se+Y,ce=U.substr(fe,ue-fe),oe=ce.indexOf(R);oe!==-1?se=oe:se=ue+X}return O}function T(z,q,U){for(var O=q.textAlign||"start",R=q.textBaseline||"alphabetic",B=[1<<30,1<<30],Y=[0,0],X=z.length,te=0;te/g,` -`):U=U.replace(/\/g," ");var Y="",X=[];for(ye=0;ye-1?parseInt(ge[1+ft]):0,We=He>-1?parseInt(Ge[1+He]):0;Qe!==We&&(tt=tt.replace(Oe(),"?px "),ze*=Math.pow(.75,We-Qe),tt=tt.replace("?px ",Oe())),le+=.25*j*(We-Qe)}if(B.superscripts===!0){var pt=ge.indexOf(E),kt=Ge.indexOf(E),qt=pt>-1?parseInt(ge[1+pt]):0,Wt=kt>-1?parseInt(Ge[1+kt]):0;qt!==Wt&&(tt=tt.replace(Oe(),"?px "),ze*=Math.pow(.75,Wt-qt),tt=tt.replace("?px ",Oe())),le-=.25*j*(Wt-qt)}if(B.bolds===!0){var _r=ge.indexOf(d)>-1,tr=Ge.indexOf(d)>-1;!_r&&tr&&(lr?tt=tt.replace("italic ","italic bold "):tt="bold "+tt),_r&&!tr&&(tt=tt.replace("bold ",""))}if(B.italics===!0){var lr=ge.indexOf(x)>-1,Ye=Ge.indexOf(x)>-1;!lr&&Ye&&(tt="italic "+tt),lr&&!Ye&&(tt=tt.replace("italic ",""))}q.font=tt}for(he=0;he0&&(R=O.size),O.lineSpacing&&O.lineSpacing>0&&(B=O.lineSpacing),O.styletags&&O.styletags.breaklines&&(Y.breaklines=!!O.styletags.breaklines),O.styletags&&O.styletags.bolds&&(Y.bolds=!!O.styletags.bolds),O.styletags&&O.styletags.italics&&(Y.italics=!!O.styletags.italics),O.styletags&&O.styletags.subscripts&&(Y.subscripts=!!O.styletags.subscripts),O.styletags&&O.styletags.superscripts&&(Y.superscripts=!!O.styletags.superscripts)),U.font=[O.fontStyle,O.fontVariant,O.fontWeight,R+"px",O.font].filter(function(te){return te}).join(" "),U.textAlign="start",U.textBaseline="alphabetic",U.direction="ltr";var X=p(q,U,z,R,B,Y);return P(X,O,R)}}),1538:(function(a){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(A){A.permitHostObjects___&&A.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{a.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,h=Object.getOwnPropertyNames,v=Object.defineProperty,d=Object.isExtensible,m="weakmap:",x=m+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var g=new ArrayBuffer(25),E=new Uint8Array(g);crypto.getRandomValues(E),x=m+"rand:"+Array.prototype.map.call(E,function(A){return(A%36).toString(36)}).join("")+"___"}function M(A){return!(A.substr(0,m.length)==m&&A.substr(A.length-3)==="___")}if(v(Object,"getOwnPropertyNames",{value:function(P){return h(P).filter(M)}}),"getPropertyNames"in Object){var w=Object.getPropertyNames;v(Object,"getPropertyNames",{value:function(P){return w(P).filter(M)}})}function k(A){if(A!==Object(A))throw new TypeError("Not an object: "+A);var P=A[x];if(P&&P.key===A)return P;if(d(A)){P={key:A};try{return v(A,x,{value:P,writable:!1,enumerable:!1,configurable:!1}),P}catch(D){return}}}(function(){var A=Object.freeze;v(Object,"freeze",{value:function(q){return k(q),A(q)}});var P=Object.seal;v(Object,"seal",{value:function(q){return k(q),P(q)}});var D=Object.preventExtensions;v(Object,"preventExtensions",{value:function(q){return k(q),D(q)}})})();function y(A){return A.prototype=null,Object.freeze(A)}var S=!1;function T(){!S&&typeof console!="undefined"&&(S=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var p=0,C=function(){this instanceof C||T();var A=[],P=[],D=p++;function z(R,B){var Y,X=k(R);return X?D in X?X[D]:B:(Y=A.indexOf(R),Y>=0?P[Y]:B)}function q(R){var B=k(R);return B?D in B:A.indexOf(R)>=0}function U(R,B){var Y,X=k(R);return X?X[D]=B:(Y=A.indexOf(R),Y>=0?P[Y]=B:(Y=A.length,P[Y]=B,A[Y]=R)),this}function O(R){var B=k(R),Y,X;return B?D in B&&delete B[D]:(Y=A.indexOf(R),Y<0?!1:(X=A.length-1,A[Y]=void 0,P[Y]=P[X],A[Y]=A[X],A.length=X,P.length=X,!0))}return Object.create(C.prototype,{get___:{value:y(z)},has___:{value:y(q)},set___:{value:y(U)},delete___:{value:y(O)}})};C.prototype=Object.create(Object.prototype,{get:{value:function(P,D){return this.get___(P,D)},writable:!0,configurable:!0},has:{value:function(P){return this.has___(P)},writable:!0,configurable:!0},set:{value:function(P,D){return this.set___(P,D)},writable:!0,configurable:!0},delete:{value:function(P){return this.delete___(P)},writable:!0,configurable:!0}}),typeof l=="function"?(function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function A(){this instanceof C||T();var P=new l,D=void 0,z=!1;function q(B,Y){return D?P.has(B)?P.get(B):D.get___(B,Y):P.get(B,Y)}function U(B){return P.has(B)||(D?D.has___(B):!1)}var O;s?O=function(B,Y){return P.set(B,Y),P.has(B)||(D||(D=new C),D.set(B,Y)),this}:O=function(B,Y){if(z)try{P.set(B,Y)}catch(X){D||(D=new C),D.set___(B,Y)}else P.set(B,Y);return this};function R(B){var Y=!!P.delete(B);return D&&D.delete___(B)||Y}return Object.create(C.prototype,{get___:{value:y(q)},has___:{value:y(U)},set___:{value:y(O)},delete___:{value:y(R)},permitHostObjects___:{value:y(function(B){if(B===o)z=!0;else throw new Error("bogus call to permitHostObjects___")})}})}A.prototype=C.prototype,a.exports=A,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy!="undefined"&&(Proxy=void 0),a.exports=C)})()}),236:(function(a,i,o){var s=o(8284);a.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}}),8284:(function(a){a.exports=i;function i(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}}),606:(function(a,i,o){var s=o(236);a.exports=l;function l(){var u=s();return{get:function(c,f){var h=u(c);return h.hasOwnProperty("value")?h.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}}),3349:(function(a){"use strict";function i(){return function(f,h,v,d,m,x){var g=f[0],E=v[0],M=[0],w=E;d|=0;var k=0,y=E;for(k=0;k=0!=T>=0&&m.push(M[0]+.5+.5*(S+T)/(S-T))}d+=y,++M[0]}}}function o(){return i()}var s=o;function l(f){var h={};return function(d,m,x){var g=d.dtype,E=d.order,M=[g,E.join()].join(),w=h[M];return w||(h[M]=w=f([g,E])),w(d.shape.slice(0),d.data,d.stride,d.offset|0,m,x)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}a.exports=c({funcName:"zeroCrossings"})}),781:(function(a,i,o){"use strict";a.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}}),7790:(function(){})},t={};function r(a){var i=t[a];if(i!==void 0)return i.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(a){if(typeof window=="object")return window}})()})(),(function(){r.nmd=function(a){return a.paths=[],a.children||(a.children=[]),a}})();var n=r(1964);$Ee.exports=n})()});var mG=ne((Lhr,KEe)=>{"use strict";KEe.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]}});var tke=ne((Fhr,eke)=>{"use strict";var JEe=mG();eke.exports=Skt;var QEe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Skt(e){var t,r=[],n=1,a;if(typeof e=="string")if(e=e.toLowerCase(),JEe[e])r=JEe[e].slice(),a="rgb";else if(e==="transparent")n=0,a="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var i=e.slice(1),o=i.length,s=o<=4;n=1,s?(r=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],o===4&&(n=parseInt(i[3]+i[3],16)/255)):(r=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],o===8&&(n=parseInt(i[6]+i[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),a="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",i=l.replace(/a$/,"");a=i;var o=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,v){if(/%$/.test(h))return v===o?parseFloat(h)/100:i==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(i[v]==="h"){if(/deg$/.test(h))return parseFloat(h);if(QEe[h]!==void 0)return QEe[h]}return parseFloat(h)}),l===i&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),a=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],a="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(a="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(a="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(a="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:a,values:r,alpha:n}}});var nke=ne((Phr,rke)=>{"use strict";var Ekt=tke();rke.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,a,i=Ekt(t);if(!i.space)return[];var o=[0,0,0],s=i.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(i.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(i.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(i.values[2],o[2]),s[2]),i.space[0]==="h"&&(r=kkt(r)),r.push(Math.min(Math.max(i.alpha,0),1)),r};function kkt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,a,i,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(i=n<.5?n*(1+r):n+r-n*r,a=2*n-i,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?a+(i-a)*6*o:2*o<1?i:3*o<2?a+(i-a)*(2/3-o)*6:a,s[u++]=l*255;return s}});var zA=ne((Dhr,ake)=>{ake.exports=Ckt;function Ckt(e,t,r){return tr?r:e:et?t:e}});var u7=ne((Rhr,ike)=>{ike.exports=function(e){switch(e){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}}});var Hm=ne((Ihr,oke)=>{"use strict";var Lkt=nke(),c7=zA(),Fkt=u7();oke.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=Fkt(r),a=new n(4),i=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=Lkt(t),t[0]/=255,t[1]/=255,t[2]/=255),Pkt(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,i&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(i?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=c7(Math.floor(t[0]*255),0,255),a[1]=c7(Math.floor(t[1]*255),0,255),a[2]=c7(Math.floor(t[2]*255),0,255),a[3]=t[3]==null?255:c7(Math.floor(t[3]*255),0,255)),a)};function Pkt(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var ng=ne((zhr,ske)=>{"use strict";var Dkt=Hm();function Rkt(e){return e?Dkt(e):[0,0,0,1]}ske.exports=Rkt});var ag=ne((qhr,vke)=>{"use strict";var hke=mi(),f7=Hm(),h7=El(),Ikt=_a(),zkt=Ic().defaultLine,lke=Ih().isArrayOrTypedArray,yG=f7(zkt),dke=1;function uke(e,t){var r=e;return r[3]*=t,r}function cke(e){if(hke(e))return yG;var t=f7(e);return t.length?t:yG}function fke(e){return hke(e)?e:dke}function qkt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var a=lke(n),i=lke(t),o=h7.extractOpts(e),s=[],l,u,c,f,h;if(o.colorscale!==void 0?l=h7.makeColorScaleFuncFromTrace(e):l=cke,a?u=function(d,m){return d[m]===void 0?yG:f7(l(d[m]))}:u=cke,i?c=function(d,m){return d[m]===void 0?dke:fke(d[m])}:c=fke,a||i)for(var v=0;v{"use strict";pke.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]}});var d7=ne((Ohr,gke)=>{"use strict";gke.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var yke=ne((Nhr,mke)=>{"use strict";var Okt=Fa();function bG(e,t,r,n){if(!t||!t.visible)return null;for(var a=Okt.getComponentMethod("errorbars","makeComputeError")(t),i=new Array(e.length),o=0;o0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else i[o]=[-s[0]*r,s[1]*r]}return i}function Nkt(e){for(var t=0;t{"use strict";var Vkt=$f().gl_line3d,xke=$f().gl_scatter3d,Gkt=$f().gl_error3d,Hkt=$f().gl_mesh3d,jkt=$f().delaunay_triangulate,ig=Zt(),Ake=ng(),v7=ag().formatColor,Wkt=U5(),_G=xG(),Ykt=d7(),Xkt=ri(),Zkt=Hd().appendArrayPointValue,$kt=yke();function Mke(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var TG=Mke.prototype;TG.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(ig.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function Kkt(e,t,r){var n=(r+1)%3,a=(r+2)%3,i=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function _ke(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function Qkt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var a=0;a=0){var u=Kkt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=Hkt(u),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)};TG.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function nCt(e,t){var r=new Mke(e,t.uid);return r.update(t),r}Ske.exports=nCt});var kG=ne((Vhr,Fke)=>{"use strict";var og=Tu(),aCt=pl(),EG=Ys(),AG=Wl().axisHoverFormat,{hovertemplateAttrs:iCt,texttemplateAttrs:oCt,templatefallbackAttrs:kke}=rs(),Cke=os(),sCt=xG(),lCt=d7(),op=ci().extendFlat,uCt=Il().overrideAll,Lke=(By(),vl(qy)).default,cCt=og.line,y2=og.marker,fCt=y2.line,hCt=op({width:cCt.width,dash:{valType:"enumerated",values:Lke(sCt),dflt:"solid"}},EG("line"));function MG(e){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var SG=Fke.exports=uCt({x:og.x,y:og.y,z:{valType:"data_array"},text:op({},og.text,{}),texttemplate:oCt(),texttemplatefallback:kke({editType:"calc"}),hovertext:op({},og.hovertext,{}),hovertemplate:iCt(),hovertemplatefallback:kke(),xhoverformat:AG("x"),yhoverformat:AG("y"),zhoverformat:AG("z"),mode:op({},og.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:MG("x"),y:MG("y"),z:MG("z")},connectgaps:og.connectgaps,line:hCt,marker:op({symbol:{valType:"enumerated",values:Lke(lCt),dflt:"circle",arrayOk:!0},size:op({},y2.size,{dflt:8}),sizeref:y2.sizeref,sizemin:y2.sizemin,sizemode:y2.sizemode,opacity:op({},y2.opacity,{arrayOk:!1}),colorbar:y2.colorbar,line:op({width:op({},fCt.width,{arrayOk:!1})},EG("marker.line"))},EG("marker")),textposition:op({},og.textposition,{dflt:"top center"}),textfont:aCt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:Cke.opacity,hoverinfo:op({},Cke.hoverinfo)},"calc","nested");SG.x.editType=SG.y.editType=SG.z.editType="calc+clearAxisTypes"});var Rke=ne((Ghr,Dke)=>{"use strict";var Pke=Fa(),dCt=Zt(),CG=ml(),vCt=Kv(),pCt=V0(),gCt=G0(),mCt=kG();Dke.exports=function(t,r,n,a){function i(v,d){return dCt.coerce(t,r,mCt,v,d)}var o=yCt(t,r,i,a);if(!o){r.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),i("mode"),CG.hasMarkers(r)&&vCt(t,r,n,a,i,{noAngle:!0,noLineDash:!0,noSelect:!0}),CG.hasLines(r)&&(i("connectgaps"),pCt(t,r,n,a,i)),CG.hasText(r)&&(i("texttemplate"),i("texttemplatefallback"),gCt(t,r,a,i,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;i("surfaceaxis")>=0&&i("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];i(f+".show")&&(i(f+".opacity"),i(f+".scale"))}var h=Pke.getComponentMethod("errorbars","supplyDefaults");h(t,r,s||l||n,{axis:"z"}),h(t,r,s||l||n,{axis:"y",inherit:"z"}),h(t,r,s||l||n,{axis:"x",inherit:"z"})};function yCt(e,t,r,n){var a=0,i=r("x"),o=r("y"),s=r("z"),l=Pke.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],n),i&&o&&s&&(a=Math.min(i.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=a),a}});var zke=ne((Hhr,Ike)=>{"use strict";var xCt=Op(),bCt=Jv();Ike.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return xCt(n,r),bCt(t,r),n}});var Bke=ne((jhr,qke)=>{qke.exports=_Ct;function _Ct(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var n=t,a;try{var i=[e];e.indexOf("webgl")===0&&i.push("experimental-"+e);for(var o=0;o{var wCt=Bke();Oke.exports=function(t){return wCt("webgl",t)}});var LG=ne((Yhr,Vke)=>{"use strict";var Uke=_a(),TCt=function(){};Vke.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=TCt);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=Uke.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=Uke.lightLine,n.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",n.appendChild(a),t.container.appendChild(n),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var jke=ne((Xhr,Hke)=>{"use strict";var x2=ng(),ACt=Zt(),MCt=["xaxis","yaxis","zaxis"];function Gke(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var SCt=Gke.prototype;SCt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var a=t[MCt[n]];if(!a.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?ACt.templateString(a.title.text,e._meta):a.title.text,"font"in a.title&&(a.title.font.color&&(r.labelColor[n]=x2(a.title.font.color)),a.title.font.family&&(r.labelFont[n]=a.title.font.family),a.title.font.size&&(r.labelSize[n]=a.title.font.size),a.title.font.weight&&(r.labelFontWeight[n]=a.title.font.weight),a.title.font.style&&(r.labelFontStyle[n]=a.title.font.style),a.title.font.variant&&(r.labelFontVariant[n]=a.title.font.variant)),"showline"in a&&(r.lineEnable[n]=a.showline),"linecolor"in a&&(r.lineColor[n]=x2(a.linecolor)),"linewidth"in a&&(r.lineWidth[n]=a.linewidth),"showgrid"in a&&(r.gridEnable[n]=a.showgrid),"gridcolor"in a&&(r.gridColor[n]=x2(a.gridcolor)),"gridwidth"in a&&(r.gridWidth[n]=a.gridwidth),a.type==="log"?r.zeroEnable[n]=!1:"zeroline"in a&&(r.zeroEnable[n]=a.zeroline),"zerolinecolor"in a&&(r.zeroLineColor[n]=x2(a.zerolinecolor)),"zerolinewidth"in a&&(r.zeroLineWidth[n]=a.zerolinewidth),"ticks"in a&&a.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,"ticklen"in a&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=a.ticklen),"tickcolor"in a&&(r.lineTickColor[n]=x2(a.tickcolor)),"tickwidth"in a&&(r.lineTickWidth[n]=a.tickwidth),"tickangle"in a&&(r.tickAngle[n]=a.tickangle==="auto"?-3600:Math.PI*-a.tickangle/180),"showticklabels"in a&&(r.tickEnable[n]=a.showticklabels),"tickfont"in a&&(a.tickfont.color&&(r.tickColor[n]=x2(a.tickfont.color)),a.tickfont.family&&(r.tickFont[n]=a.tickfont.family),a.tickfont.size&&(r.tickSize[n]=a.tickfont.size),a.tickfont.weight&&(r.tickFontWeight[n]=a.tickfont.weight),a.tickfont.style&&(r.tickFontStyle[n]=a.tickfont.style),a.tickfont.variant&&(r.tickFontVariant[n]=a.tickfont.variant)),"mirror"in a?["ticks","all","allticks"].indexOf(a.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):a.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,"showbackground"in a&&a.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=x2(a.backgroundcolor)):r.backgroundEnable[n]=!1}};function ECt(e,t){var r=new Gke;return r.merge(e,t),r}Hke.exports=ECt});var Xke=ne((Zhr,Yke)=>{"use strict";var kCt=ng(),CCt=["xaxis","yaxis","zaxis"];function Wke(){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]}var LCt=Wke.prototype;LCt.merge=function(e){for(var t=0;t<3;++t){var r=e[CCt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=kCt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function FCt(e){var t=new Wke;return t.merge(e),t}Yke.exports=FCt});var Kke=ne(($hr,$ke)=>{"use strict";$ke.exports=zCt;var Zke=ri(),PCt=Zt(),DCt=["xaxis","yaxis","zaxis"],RCt=[0,0,0];function ICt(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],a=new Array(n.length),i=0;i/g," "));a[i]=u,o.tickmode=s}}t.ticks=a;for(var i=0;i<3;++i){RCt[i]=.5*(e.glplot.bounds[0][i]+e.glplot.bounds[1][i]);for(var c=0;c<2;++c)t.bounds[c][i]=e.glplot.bounds[c][i]}e.contourLevels=ICt(a)}});var aCe=ne((Khr,nCe)=>{"use strict";var eCe=$f().gl_plot3d,qCt=eCe.createCamera,Jke=eCe.createScene,BCt=Nke(),OCt=HS(),m7=Fa(),kd=Zt(),g7=kd.preserveDrawingBuffer(),y7=ri(),sp=cu(),NCt=ng(),UCt=LG(),VCt=Hq(),GCt=jke(),HCt=Xke(),jCt=Kke(),WCt=I0().applyAutorangeOptions,qA,p7,tCe=!1;function rCe(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.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=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=GCt(t,t[this.id]),this.spikeOptions=HCt(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=m7.getComponentMethod("annotations3d","convert"),this.drawAnnotations=m7.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var jh=rCe.prototype;jh.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:g7,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!p7&&(qA=document.createElement("canvas"),p7=BCt({canvas:qA,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!p7))throw new Error("error creating static canvas/context for image server");t.gl=p7,t.canvas=qA}return t};var Qke=!0;jh.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=Jke(t)}catch(n){if(e.staticMode||!Qke||g7)r=!1;else{kd.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{g7=t.glOptions.preserveDrawingBuffer=!0,e.glplot=Jke(t)}catch(a){g7=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return Qke=!1,r};jh.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=qCt(e.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:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};jh.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return UCt(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,a=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},i=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=a();o.saveLayout(n),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){i(e)}),e.glplot.canvas.addEventListener("touchstart",function(){tCe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}i(e)}},OCt?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=a();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};jh.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,a=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var i=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=a.width*i,l=a.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),jCt(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,h=0;h")):r.type==="isosurface"||r.type==="volume"?(g.valueLabel=y7.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),y.push("value: "+g.valueLabel),f.textLabel&&y.push(f.textLabel),k=y.join("
")):k=f.textLabel;var S={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:m._input,fullData:m,curveNumber:m.index,pointNumber:x};sp.appendArrayPointValue(S,m,x),r._module.eventData&&(S=m._module.eventData(S,f,m,{},x));var T={points:[S]};if(e.fullSceneLayout.hovermode){var p=[];sp.loneHover({trace:m,x:(.5+.5*d[0]/d[3])*s,y:(.5-.5*d[1]/d[3])*l,xLabel:g.xLabel,yLabel:g.yLabel,zLabel:g.zLabel,text:k,name:c.name,color:sp.castHoverOption(m,x,"bgcolor")||c.color,borderColor:sp.castHoverOption(m,x,"bordercolor"),fontFamily:sp.castHoverOption(m,x,"font.family"),fontSize:sp.castHoverOption(m,x,"font.size"),fontColor:sp.castHoverOption(m,x,"font.color"),nameLength:sp.castHoverOption(m,x,"namelength"),textAlign:sp.castHoverOption(m,x,"align"),hovertemplate:kd.castOption(m,x,"hovertemplate"),hovertemplateLabels:kd.extendFlat({},S,g),eventData:[S]},{container:n,gd:t,inOut_bbox:p}),S.bbox=p[0]}f.distance<5&&(f.buttons||tCe)?t.emit("plotly_click",T):t.emit("plotly_hover",T),this.oldEventData=T}else sp.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};jh.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){kd.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var BA=["xaxis","yaxis","zaxis"];function YCt(e,t,r){for(var n=e.fullSceneLayout,a=0;a<3;a++){var i=BA[a],o=i.charAt(0),s=n[i],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!kd.isArrayOrTypedArray(l))r[0][a]=Math.min(r[0][a],0),r[1][a]=Math.max(r[1][a],c-1);else for(var f,h=0;h<(c||l.length);h++)if(kd.isArrayOrTypedArray(l[h]))for(var v=0;vm[1][o])m[0][o]=-1,m[1][o]=1;else{var A=m[1][o]-m[0][o];m[0][o]-=A/32,m[1][o]+=A/32}if(E=[m[0][o],m[1][o]],E=WCt(E,l),m[0][o]=E[0],m[1][o]=E[1],l.isReversed()){var P=m[0][o];m[0][o]=m[1][o],m[1][o]=P}}else E=l.range,m[0][o]=l.r2l(E[0]),m[1][o]=l.r2l(E[1]);m[0][o]===m[1][o]&&(m[0][o]-=1,m[1][o]+=1),x[o]=m[1][o]-m[0][o],l.range=[m[0][o],m[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*v[o],max:l.range[1]*v[o]})}var D,z=c.aspectmode;if(z==="cube")D=[1,1,1];else if(z==="manual"){var q=c.aspectratio;D=[q.x,q.y,q.z]}else if(z==="auto"||z==="data"){var U=[1,1,1];for(o=0;o<3;++o){l=c[BA[o]],u=l.type;var O=g[u];U[o]=Math.pow(O.acc,1/O.count)/v[o]}z==="data"||Math.max.apply(null,U)/Math.min.apply(null,U)<=4?D=U:D=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=D[0],c.aspectratio.y=f.aspectratio.y=D[1],c.aspectratio.z=f.aspectratio.z=D[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var R=c.domain||null,B=t._size||null;if(R&&B){var Y=n.container.style;Y.position="absolute",Y.left=B.l+R.x[0]*B.w+"px",Y.top=B.t+(1-R.y[1])*B.h+"px",Y.width=B.w*(R.x[1]-R.x[0])+"px",Y.height=B.h*(R.y[1]-R.y[0])+"px"}n.glplot.redraw()}};jh.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function ZCt(e){return[[e.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]]}function $Ct(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}jh.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),$Ct(e.camera)};jh.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,ZCt(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type==="orthographic",a=t.camera._ortho;n!==a&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};jh.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=kd.nestedProperty(e,t.id+".camera"),a=n.get();function i(u,c,f,h){var v=["up","center","eye"],d=["x","y","z"];return c[v[f]]&&u[v[f]][d[h]]===c[v[f]][d[h]]}var o=!1;if(a===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!i(r,a,s,l)){o=!0;break}(!a.projection||r.projection&&r.projection.type!==a.projection.type)&&(o=!0)}return o};jh.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=kd.nestedProperty(e,t.id+".aspectratio"),a=n.get();return a===void 0||a.x!==r.x||a.y!==r.y||a.z!==r.z};jh.saveLayout=function(e){var t=this,r=t.fullLayout,n,a,i,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var h={};if(u&&(n=t.getCamera(),a=kd.nestedProperty(e,t.id+".camera"),i=a.get(),h[t.id+".camera"]=i),c&&(o=t.glplot.getAspectratio(),s=kd.nestedProperty(e,t.id+".aspectratio"),l=s.get(),h[t.id+".aspectratio"]=l),m7.call("_storeDirectGUIEdit",e,r._preGUI,h),u){a.set(n);var v=kd.nestedProperty(r,t.id+".camera");v.set(n)}if(c){s.set(o);var d=kd.nestedProperty(r,t.id+".aspectratio");d.set(o),t.glplot.redraw()}}return f};jh.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e==="orbit")n.mode="orbit",n.keyBindingMode="rotate";else if(e==="turntable"){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var a=r.graphDiv,i=a._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},h={};h[c]=f;var v=a.layout;m7.call("_storeDirectGUIEdit",v,i._preGUI,h),o.up=f,kd.nestedProperty(v,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function KCt(e,t,r){for(var n=0,a=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[i+l]=Math.min(s*e[i+l],255)}}jh.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(qA),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var i=new Uint8Array(n*a*4);r.readPixels(0,0,n,a,r.RGBA,r.UNSIGNED_BYTE,i),KCt(i,n,a),JCt(i,n,a);var o=document.createElement("canvas");o.width=n,o.height=a;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(n,a);l.data.set(i),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(qA),u};jh.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[BA[t]];y7.setConvert(r,e.fullLayout),r.setScale=kd.noop}};jh.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},y7.setConvert(e._mockAxis,r)};nCe.exports=rCe});var oCe=ne((Jhr,iCe)=>{"use strict";iCe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var PG=ne((Qhr,sCe)=>{"use strict";var QCt=_a(),ro=Wf(),FG=ci().extendFlat,e8t=Il().overrideAll;sCe.exports=e8t({visible:ro.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:QCt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:ro.color,categoryorder:ro.categoryorder,categoryarray:ro.categoryarray,title:{text:ro.title.text,font:ro.title.font},type:FG({},ro.type,{values:["-","linear","log","date","category"]}),autotypenumbers:ro.autotypenumbers,autorange:ro.autorange,autorangeoptions:{minallowed:ro.autorangeoptions.minallowed,maxallowed:ro.autorangeoptions.maxallowed,clipmin:ro.autorangeoptions.clipmin,clipmax:ro.autorangeoptions.clipmax,include:ro.autorangeoptions.include,editType:"plot"},rangemode:ro.rangemode,minallowed:ro.minallowed,maxallowed:ro.maxallowed,range:FG({},ro.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:ro.minor.tickmode,nticks:ro.nticks,tick0:ro.tick0,dtick:ro.dtick,tickvals:ro.tickvals,ticktext:ro.ticktext,ticks:ro.ticks,mirror:ro.mirror,ticklen:ro.ticklen,tickwidth:ro.tickwidth,tickcolor:ro.tickcolor,showticklabels:ro.showticklabels,labelalias:ro.labelalias,tickfont:ro.tickfont,tickangle:ro.tickangle,tickprefix:ro.tickprefix,showtickprefix:ro.showtickprefix,ticksuffix:ro.ticksuffix,showticksuffix:ro.showticksuffix,showexponent:ro.showexponent,exponentformat:ro.exponentformat,minexponent:ro.minexponent,separatethousands:ro.separatethousands,tickformat:ro.tickformat,tickformatstops:ro.tickformatstops,hoverformat:ro.hoverformat,showline:ro.showline,linecolor:ro.linecolor,linewidth:ro.linewidth,showgrid:ro.showgrid,gridcolor:FG({},ro.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:ro.gridwidth,zeroline:ro.zeroline,zerolinecolor:ro.zerolinecolor,zerolinewidth:ro.zerolinewidth},"plot","from-root")});var zG=ne((edr,lCe)=>{"use strict";var DG=PG(),t8t=zl().attributes,RG=ci().extendFlat,r8t=Zt().counterRegex;function IG(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}lCe.exports={_arrayAttrRegexps:[r8t("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:RG(IG(0,0,1),{}),center:RG(IG(0,0,0),{}),eye:RG(IG(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:t8t({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:DG,yaxis:DG,zaxis:DG,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"}});var hCe=ne((tdr,fCe)=>{"use strict";var n8t=_a(),uCe=Zt(),a8t=Bo(),i8t=PG(),o8t=kq(),s8t=Y4(),cCe=["xaxis","yaxis","zaxis"],l8t=13600/187;fCe.exports=function(t,r,n){var a,i;function o(u,c){return uCe.coerce(a,i,i8t,u,c)}for(var s=0;s{"use strict";var u8t=Zt(),c8t=_a(),f8t=Fa(),h8t=qx(),d8t=hCe(),dCe=zG(),v8t=mh().getSubplotData,vCe="gl3d";pCe.exports=function(t,r,n){var a=r._basePlotModules.length>1;function i(o){if(!a){var s=u8t.validate(t[o],dCe[o]);if(s)return t[o]}}h8t(t,r,n,{type:vCe,attributes:dCe,handleDefaults:p8t,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:i,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function p8t(e,t,r,n){for(var a=r("bgcolor"),i=c8t.combine(a,n.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(h="turntable")}else h="turntable";r("dragmode",h),r("hovermode",n.getDfltFromLayout("hovermode"))}});var jm=ne(Cd=>{"use strict";var g8t=Il().overrideAll,m8t=Fg(),y8t=aCe(),x8t=mh().getSubplotData,b8t=Zt(),_8t=qv(),X3="gl3d",qG="scene";Cd.name=X3;Cd.attr=qG;Cd.idRoot=qG;Cd.idRegex=Cd.attrRegex=b8t.counterRegex("scene");Cd.attributes=oCe();Cd.layoutAttributes=zG();Cd.baseLayoutAttrOverrides=g8t({hoverlabel:m8t.hoverlabel},"plot","nested");Cd.supplyLayoutDefaults=gCe();Cd.plot=function(t){for(var r=t._fullLayout,n=t._fullData,a=r._subplots[X3],i=0;i{"use strict";mCe.exports={plot:Eke(),attributes:kG(),markerSymbols:d7(),supplyDefaults:Rke(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:zke(),moduleType:"trace",name:"scatter3d",basePlotModule:jm(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var bCe=ne((idr,xCe)=>{"use strict";xCe.exports=yCe()});var OA=ne((odr,TCe)=>{"use strict";var _Ce=_a(),w8t=Ys(),BG=Wl().axisHoverFormat,{hovertemplateAttrs:T8t,templatefallbackAttrs:A8t}=rs(),wCe=os(),OG=ci().extendFlat,M8t=Il().overrideAll;function NG(e){return{valType:"boolean",dflt:!1}}function UG(e){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:NG("x"),y:NG("y"),z:NG("z")},color:{valType:"color",dflt:_Ce.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:_Ce.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var VG=TCe.exports=M8t(OG({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:T8t(),hovertemplatefallback:A8t(),xhoverformat:BG("x"),yhoverformat:BG("y"),zhoverformat:BG("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},w8t("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:UG("x"),y:UG("y"),z:UG("z")},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,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:OG({},wCe.hoverinfo),showlegend:OG({},wCe.showlegend,{dflt:!1})}),"calc","nested");VG.x.editType=VG.y.editType=VG.z.editType="calc+clearAxisTypes"});var HG=ne((sdr,SCe)=>{"use strict";var S8t=Fa(),ACe=Zt(),E8t=bf(),k8t=OA(),GG=.1;function C8t(e,t){for(var r=[],n=32,a=0;a{"use strict";var ECe=qh();kCe.exports=function(t,r){r.surfacecolor?ECe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):ECe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var ICe=ne((udr,RCe)=>{"use strict";var P8t=$f().gl_surface3d,Z3=$f().ndarray,D8t=$f().ndarray_linear_interpolate.d2,R8t=mC(),I8t=yC(),NA=Zt().isArrayOrTypedArray,z8t=ag().parseColorScale,LCe=ng(),q8t=El().extractOpts;function PCe(e,t,r){this.scene=e,this.uid=r,this.surface=t,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 lp=PCe.prototype;lp.getXat=function(e,t,r,n){var a=NA(this.data.x)?NA(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?a:n.d2l(a,0,r)};lp.getYat=function(e,t,r,n){var a=NA(this.data.y)?NA(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?a:n.d2l(a,0,r)};lp.getZat=function(e,t,r,n){var a=this.data.z[t][e];return a===null&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[t][e]),r===void 0?a:n.d2l(a,0,r)};lp.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,a],e.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],e.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=e.dataCoordinate[i];o!=null&&(e.dataCoordinate[i]*=this.scene.dataScale[i])}var s=this.data.hovertext||this.data.text;return NA(s)&&s[a]&&s[a][n]!==void 0?e.textLabel=s[a][n]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function B8t(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var $3=[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 O8t(e,t){if(e0){r=$3[n];break}return r}function U8t(e,t){if(!(e<1||t<1)){for(var r=jG(e),n=jG(t),a=1,i=0;i<$3.length;i++)a*=Math.pow($3[i],Math.max(r[i],n[i]));return a}}function V8t(e){if(e.length!==0){for(var t=1,r=0;rx7;)n--,n/=N8t(n),n++,n1?a:1};function G8t(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function H8t(e,t,r){return j8t(e,t,G8t,r),e}function j8t(e,t,r,n){for(var a=[0,0],i=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,a=this.contourStart[n];ah&&(this.minValues[u]=h),this.maxValues[u]{"use strict";zCe.exports={attributes:OA(),supplyDefaults:HG().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:CCe(),plot:ICe(),moduleType:"trace",name:"surface",basePlotModule:jm(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var OCe=ne((fdr,BCe)=>{"use strict";BCe.exports=qCe()});var K3=ne((hdr,UCe)=>{"use strict";var X8t=Ys(),WG=Wl().axisHoverFormat,{hovertemplateAttrs:Z8t,templatefallbackAttrs:$8t}=rs(),Wm=OA(),NCe=os(),Ym=ci().extendFlat;UCe.exports=Ym({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:Z8t({editType:"calc"}),hovertemplatefallback:$8t({editType:"calc"}),xhoverformat:WG("x"),yhoverformat:WG("y"),zhoverformat:WG("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},X8t("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:Wm.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:Ym({},Wm.contours.x.show,{}),color:Wm.contours.x.color,width:Wm.contours.x.width,editType:"calc"},lightposition:{x:Ym({},Wm.lightposition.x,{dflt:1e5}),y:Ym({},Wm.lightposition.y,{dflt:1e5}),z:Ym({},Wm.lightposition.z,{dflt:0}),editType:"calc"},lighting:Ym({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},Wm.lighting),hoverinfo:Ym({},NCe.hoverinfo,{editType:"calc"}),showlegend:Ym({},NCe.showlegend,{dflt:!1})})});var _7=ne((ddr,GCe)=>{"use strict";var K8t=Ys(),b7=Wl().axisHoverFormat,{hovertemplateAttrs:J8t,templatefallbackAttrs:Q8t}=rs(),UA=K3(),VCe=os(),YG=ci().extendFlat,eLt=Il().overrideAll;function XG(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function ZG(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var J3=GCe.exports=eLt(YG({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:XG("x"),y:XG("y"),z:XG("z")},caps:{x:ZG("x"),y:ZG("y"),z:ZG("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:J8t(),hovertemplatefallback:Q8t(),xhoverformat:b7("x"),yhoverformat:b7("y"),zhoverformat:b7("z"),valuehoverformat:b7("value",1),showlegend:YG({},VCe.showlegend,{dflt:!1})},K8t("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:UA.opacity,lightposition:UA.lightposition,lighting:UA.lighting,flatshading:UA.flatshading,contour:UA.contour,hoverinfo:YG({},VCe.hoverinfo)}),"calc","nested");J3.flatshading.dflt=!0;J3.lighting.facenormalsepsilon.dflt=0;J3.x.editType=J3.y.editType=J3.z.editType=J3.value.editType="calc+clearAxisTypes"});var $G=ne((vdr,jCe)=>{"use strict";var tLt=Zt(),rLt=Fa(),nLt=_7(),aLt=bf();function iLt(e,t,r,n){function a(i,o){return tLt.coerce(e,t,nLt,i,o)}HCe(e,t,r,n,a)}function HCe(e,t,r,n,a){var i=a("isomin"),o=a("isomax");o!=null&&i!==void 0&&i!==null&&i>o&&(t.isomin=null,t.isomax=null);var s=a("x"),l=a("y"),u=a("z"),c=a("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=rLt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach(function(m){a(m+"hoverformat");var x="caps."+m,g=a(x+".show");g&&a(x+".fill");var E="slices."+m,M=a(E+".show");M&&(a(E+".fill"),a(E+".locations"))});var h=a("spaceframe.show");h&&a("spaceframe.fill");var v=a("surface.show");v&&(a("surface.count"),a("surface.fill"),a("surface.pattern"));var d=a("contour.show");d&&(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(m){a(m)}),aLt(e,t,n,a,{prefix:"",cLetter:"c"}),t._length=null}jCe.exports={supplyDefaults:iLt,supplyIsoDefaults:HCe}});var w7=ne((pdr,YCe)=>{"use strict";var JG=Zt(),oLt=qh();function sLt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=n1(t.u,t._len),t._v=n1(t.v,t._len),t._w=n1(t.w,t._len),t._x=n1(t.x,t._len),t._y=n1(t.y,t._len),t._z=n1(t.z,t._len);var r=WCe(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,a,i,o;t.starts&&(a=n1(t.starts.x||[]),i=n1(t.starts.y||[]),o=n1(t.starts.z||[]),n=Math.min(a.length,i.length,o.length)),t._startsX=a||[],t._startsY=i||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(M=t[a-1],k=r[a-1],S=n[a-1]),i=0;iM?"-":"+")+"x"),d=d.replace("y",(w>k?"-":"+")+"y"),d=d.replace("z",(y>S?"-":"+")+"z");var A=function(){a=0,T=[],p=[],C=[]};(!a||a{"use strict";var lLt=qh(),uLt=w7().processGrid,T7=w7().filter;XCe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=T7(r.x,r._len),r._y=T7(r.y,r._len),r._z=T7(r.z,r._len),r._value=T7(r.value,r._len);var n=uLt(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var a=1/0,i=-1/0,o=0;o{"use strict";ZCe.exports=function(t,r,n,a){a=a||t.length;for(var i=new Array(a),o=0;o{"use strict";var cLt=$f().gl_mesh3d,fLt=ag().parseColorScale,hLt=Zt().isArrayOrTypedArray,dLt=ng(),vLt=El().extractOpts,$Ce=Q3(),VA=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),a=Math.max(t[r],t[r-1]);if(a>n&&n-1}function X(tt,ft){return tt===null?ft:tt}function te(tt,ft,He){A();var Qe=[ft],We=[He];if(O>=1)Qe=[ft],We=[He];else if(O>0){var pt=B(ft,He);Qe=pt.xyzv,We=pt.abc}for(var kt=0;kt-1?He[Wt]:C(_r,tr,lr);Te>-1?qt[Wt]=Te:qt[Wt]=D(_r,tr,lr,X(tt,Ye))}z(qt[0],qt[1],qt[2])}}function se(tt,ft,He){var Qe=function(We,pt,kt){te(tt,[ft[We],ft[pt],ft[kt]],[He[We],He[pt],He[kt]])};Qe(0,1,2),Qe(2,3,0)}function ue(tt,ft,He){var Qe=function(We,pt,kt){te(tt,[ft[We],ft[pt],ft[kt]],[He[We],He[pt],He[kt]])};Qe(0,1,2),Qe(3,0,1),Qe(2,3,0),Qe(1,2,3)}function re(tt,ft,He,Qe){var We=tt[3];WeQe&&(We=Qe);for(var pt=(tt[3]-We)/(tt[3]-ft[3]+1e-9),kt=[],qt=0;qt<4;qt++)kt[qt]=(1-pt)*tt[qt]+pt*ft[qt];return kt}function j(tt,ft,He){return tt>=ft&&tt<=He}function fe(tt){var ft=.001*(k-w);return tt>=w-ft&&tt<=k+ft}function ce(tt){for(var ft=[],He=0;He<4;He++){var Qe=tt[He];ft.push([e._x[Qe],e._y[Qe],e._z[Qe],e._value[Qe]])}return ft}var oe=3;function we(tt,ft,He,Qe,We,pt){pt||(pt=1),He=[-1,-1,-1];var kt=!1,qt=[j(ft[0][3],Qe,We),j(ft[1][3],Qe,We),j(ft[2][3],Qe,We)];if(!qt[0]&&!qt[1]&&!qt[2])return!1;var Wt=function(tr,lr,Ye){return fe(lr[0][3])&&fe(lr[1][3])&&fe(lr[2][3])?(te(tr,lr,Ye),!0):ptqt?[E,pt]:[pt,M];lt(ft,Wt[0],Wt[1])}}var _r=[[Math.min(w,M),Math.max(w,M)],[Math.min(E,k),Math.max(E,k)]];["x","y","z"].forEach(function(tr){for(var lr=[],Ye=0;Ye<_r.length;Ye++){var Te=0,Fe=_r[Ye][0],Ae=_r[Ye][1],Re=e.slices[tr];if(Re.show&&Re.fill){R(Re.fill);var Ze=[],Ke=[],_t=[];if(Re.locations.length)for(var St=0;St0&&(Ke.push(Vt.id),tr==="x"?_t.push([Vt.distRatio,0,0]):tr==="y"?_t.push([0,Vt.distRatio,0]):_t.push([0,0,Vt.distRatio]))}else tr==="x"?Ze=Ue(1,v-1):tr==="y"?Ze=Ue(1,d-1):Ze=Ue(1,m-1);Ke.length>0&&(tr==="x"?lr[Te]=Ie(tt,Ke,Fe,Ae,_t,lr[Te]):tr==="y"?lr[Te]=de(tt,Ke,Fe,Ae,_t,lr[Te]):lr[Te]=Ee(tt,Ke,Fe,Ae,_t,lr[Te]),Te++),Ze.length>0&&(tr==="x"?lr[Te]=vt(tt,Ze,Fe,Ae,lr[Te]):tr==="y"?lr[Te]=st(tt,Ze,Fe,Ae,lr[Te]):lr[Te]=Oe(tt,Ze,Fe,Ae,lr[Te]),Te++)}var fr=e.caps[tr];fr.show&&fr.fill&&(R(fr.fill),tr==="x"?lr[Te]=vt(tt,[0,v-1],Fe,Ae,lr[Te]):tr==="y"?lr[Te]=st(tt,[0,d-1],Fe,Ae,lr[Te]):lr[Te]=Oe(tt,[0,m-1],Fe,Ae,lr[Te]),Te++)}}),s===0&&P(),e._meshX=y,e._meshY=S,e._meshZ=T,e._meshIntensity=p,e._Xs=c,e._Ys=f,e._Zs=h}return Ge(),e}function gLt(e,t){var r=e.glplot.gl,n=cLt({gl:r}),a=new KCe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}QCe.exports={findNearestOnAxis:VA,generateIsoMeshes:JCe,createIsosurfaceTrace:gLt}});var t8e=ne((xdr,e8e)=>{"use strict";e8e.exports={attributes:_7(),supplyDefaults:$G().supplyDefaults,calc:QG(),colorbar:{min:"cmin",max:"cmax"},plot:A7().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:jm(),categories:["gl3d","showLegend"],meta:{}}});var n8e=ne((bdr,r8e)=>{"use strict";r8e.exports=t8e()});var rH=ne((_dr,i8e)=>{"use strict";var mLt=Ys(),mc=_7(),yLt=OA(),a8e=os(),tH=ci().extendFlat,xLt=Il().overrideAll,M7=i8e.exports=xLt(tH({x:mc.x,y:mc.y,z:mc.z,value:mc.value,isomin:mc.isomin,isomax:mc.isomax,surface:mc.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:mc.slices,caps:mc.caps,text:mc.text,hovertext:mc.hovertext,xhoverformat:mc.xhoverformat,yhoverformat:mc.yhoverformat,zhoverformat:mc.zhoverformat,valuehoverformat:mc.valuehoverformat,hovertemplate:mc.hovertemplate,hovertemplatefallback:mc.hovertemplatefallback},mLt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:mc.colorbar,opacity:mc.opacity,opacityscale:yLt.opacityscale,lightposition:mc.lightposition,lighting:mc.lighting,flatshading:mc.flatshading,contour:mc.contour,hoverinfo:tH({},a8e.hoverinfo),showlegend:tH({},a8e.showlegend,{dflt:!1})}),"calc","nested");M7.x.editType=M7.y.editType=M7.z.editType=M7.value.editType="calc+clearAxisTypes"});var s8e=ne((wdr,o8e)=>{"use strict";var bLt=Zt(),_Lt=rH(),wLt=$G().supplyIsoDefaults,TLt=HG().opacityscaleDefaults;o8e.exports=function(t,r,n,a){function i(o,s){return bLt.coerce(t,r,_Lt,o,s)}wLt(t,r,n,a,i),TLt(t,r,a,i)}});var f8e=ne((Tdr,c8e)=>{"use strict";var ALt=$f().gl_mesh3d,MLt=ag().parseColorScale,SLt=Zt().isArrayOrTypedArray,ELt=ng(),kLt=El().extractOpts,l8e=Q3(),nH=A7().findNearestOnAxis,CLt=A7().generateIsoMeshes;function u8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var aH=u8e.prototype;aH.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],a=this.data._meshZ[t],i=this.data._Ys.length,o=this.data._Zs.length,s=nH(r,this.data._Xs).id,l=nH(n,this.data._Ys).id,u=nH(a,this.data._Zs).id,c=e.index=u+o*l+o*i*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return SLt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};aH.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=CLt(e);function n(l,u,c,f){return u.map(function(h){return l.d2l(h,0,f)*c})}var a=l8e(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),i=l8e(e._meshI,e._meshJ,e._meshK),o={positions:a,cells:i,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:ELt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=kLt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=MLt(e),this.mesh.update(o)};aH.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function LLt(e,t){var r=e.glplot.gl,n=ALt({gl:r}),a=new u8e(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}c8e.exports=LLt});var d8e=ne((Adr,h8e)=>{"use strict";h8e.exports={attributes:rH(),supplyDefaults:s8e(),calc:QG(),colorbar:{min:"cmin",max:"cmax"},plot:f8e(),moduleType:"trace",name:"volume",basePlotModule:jm(),categories:["gl3d","showLegend"],meta:{}}});var p8e=ne((Mdr,v8e)=>{"use strict";v8e.exports=d8e()});var y8e=ne((Sdr,m8e)=>{"use strict";var FLt=Fa(),g8e=Zt(),PLt=bf(),DLt=K3();m8e.exports=function(t,r,n,a){function i(c,f){return g8e.coerce(t,r,DLt,c,f)}function o(c){var f=c.map(function(h){var v=i(h);return v&&g8e.isArrayOrTypedArray(v)?v:null});return f.every(function(h){return h&&h.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=FLt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){i(c)});var u=i("contour.show");u&&(i("contour.color"),i("contour.width")),"intensity"in t?(i("intensity"),i("intensitymode"),PLt(t,r,a,i,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?i("facecolor"):"vertexcolor"in t?i("vertexcolor"):i("color",n)),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var b8e=ne((Edr,x8e)=>{"use strict";var RLt=qh();x8e.exports=function(t,r){r.intensity&&RLt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var M8e=ne((kdr,A8e)=>{"use strict";var ILt=$f().gl_mesh3d,zLt=$f().delaunay_triangulate,qLt=$f().alpha_shape,BLt=$f().convex_hull,OLt=ag().parseColorScale,NLt=Zt().isArrayOrTypedArray,lH=ng(),ULt=El().extractOpts,_8e=Q3();function T8e(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var uH=T8e.prototype;uH.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return NLt(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function w8e(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}uH.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,a=_8e(iH(r.xaxis,e.x,t.dataScale[0],e.xcalendar),iH(r.yaxis,e.y,t.dataScale[1],e.ycalendar),iH(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),i;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!sH(e.i,n)||!sH(e.j,n)||!sH(e.k,n))return;i=_8e(oH(e.i),oH(e.j),oH(e.k))}else e.alphahull===0?i=BLt(a):e.alphahull>0?i=qLt(e.alphahull,a):i=VLt(e.delaunayaxis,a);var o={positions:a,cells:i,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:lH(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=ULt(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=OLt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=w8e(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=w8e(e.facecolor)):(this.color=e.color,o.meshColor=lH(e.color));this.mesh.update(o)};uH.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function GLt(e,t){var r=e.glplot.gl,n=ILt({gl:r}),a=new T8e(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}A8e.exports=GLt});var E8e=ne((Cdr,S8e)=>{"use strict";S8e.exports={attributes:K3(),supplyDefaults:y8e(),calc:b8e(),colorbar:{min:"cmin",max:"cmax"},plot:M8e(),moduleType:"trace",name:"mesh3d",basePlotModule:jm(),categories:["gl3d","showLegend"],meta:{}}});var C8e=ne((Ldr,k8e)=>{"use strict";k8e.exports=E8e()});var fH=ne((Fdr,F8e)=>{"use strict";var HLt=Ys(),ew=Wl().axisHoverFormat,{hovertemplateAttrs:jLt,templatefallbackAttrs:WLt}=rs(),YLt=K3(),L8e=os(),cH=ci().extendFlat,S7={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","raw"],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:jLt({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:WLt({editType:"calc"}),uhoverformat:ew("u",1),vhoverformat:ew("v",1),whoverformat:ew("w",1),xhoverformat:ew("x"),yhoverformat:ew("y"),zhoverformat:ew("z"),showlegend:cH({},L8e.showlegend,{dflt:!1})};cH(S7,HLt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var XLt=["opacity","lightposition","lighting"];XLt.forEach(function(e){S7[e]=YLt[e]});S7.hoverinfo=cH({},L8e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});F8e.exports=S7});var D8e=ne((Pdr,P8e)=>{"use strict";var ZLt=Zt(),$Lt=bf(),KLt=fH();P8e.exports=function(t,r,n,a){function i(v,d){return ZLt.coerce(t,r,KLt,v,d)}var o=i("u"),s=i("v"),l=i("w"),u=i("x"),c=i("y"),f=i("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var h=i("sizemode");i("sizeref",h==="raw"?1:.5),i("anchor"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),$Lt(t,r,a,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var I8e=ne((Ddr,R8e)=>{"use strict";var JLt=qh();R8e.exports=function(t,r){for(var n=r.u,a=r.v,i=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,a.length,i.length),s=-1/0,l=1/0,u=0;u{"use strict";var QLt=$f().gl_cone3d,e7t=$f().gl_cone3d.createConeMesh,t7t=Zt().simpleMap,r7t=ag().parseColorScale,n7t=El().extractOpts,a7t=Zt().isArrayOrTypedArray,z8e=Q3();function q8e(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var hH=q8e.prototype;hH.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],a=this.data.z[t],i=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,a,i,o,s,Math.sqrt(i*i+o*o+s*s)];var l=this.data.hovertext||this.data.text;return a7t(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var i7t={xaxis:0,yaxis:1,zaxis:2},o7t={tip:1,tail:0,cm:.25,center:.5},s7t={tip:1,tail:1,cm:.75,center:.5};function B8e(e,t){var r=e.fullSceneLayout,n=e.dataScale,a={};function i(c,f){var h=r[f],v=n[i7t[f]];return t7t(c,function(d){return h.d2l(d)*v})}a.vectors=z8e(i(t.u,"xaxis"),i(t.v,"yaxis"),i(t.w,"zaxis"),t._len),a.positions=z8e(i(t.x,"xaxis"),i(t.y,"yaxis"),i(t.z,"zaxis"),t._len);var o=n7t(t);a.colormap=r7t(t),a.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],a.coneOffset=o7t[t.anchor];var s=t.sizemode;s==="scaled"?a.coneSize=t.sizeref||.5:s==="absolute"?a.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(a.coneSize=t.sizeref),a.coneSizemode=s;var l=QLt(a),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=s7t[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}hH.update=function(e){this.data=e;var t=B8e(this.scene,e);this.mesh.update(t)};hH.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function l7t(e,t){var r=e.glplot.gl,n=B8e(e,t),a=e7t(r,n),i=new q8e(e,t.uid);return i.mesh=a,i.data=t,a._trace=i,e.glplot.add(a),i}O8e.exports=l7t});var V8e=ne((Idr,U8e)=>{"use strict";U8e.exports={moduleType:"trace",name:"cone",basePlotModule:jm(),categories:["gl3d","showLegend"],attributes:fH(),supplyDefaults:D8e(),colorbar:{min:"cmin",max:"cmax"},calc:I8e(),plot:N8e(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var H8e=ne((zdr,G8e)=>{"use strict";G8e.exports=V8e()});var vH=ne((qdr,W8e)=>{"use strict";var u7t=Ys(),tw=Wl().axisHoverFormat,{hovertemplateAttrs:c7t,templatefallbackAttrs:f7t}=rs(),h7t=K3(),j8e=os(),dH=ci().extendFlat,E7={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:c7t({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:f7t({editType:"calc"}),uhoverformat:tw("u",1),vhoverformat:tw("v",1),whoverformat:tw("w",1),xhoverformat:tw("x"),yhoverformat:tw("y"),zhoverformat:tw("z"),showlegend:dH({},j8e.showlegend,{dflt:!1})};dH(E7,u7t("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var d7t=["opacity","lightposition","lighting"];d7t.forEach(function(e){E7[e]=h7t[e]});E7.hoverinfo=dH({},j8e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});W8e.exports=E7});var X8e=ne((Bdr,Y8e)=>{"use strict";var v7t=Zt(),p7t=bf(),g7t=vH();Y8e.exports=function(t,r,n,a){function i(h,v){return v7t.coerce(t,r,g7t,h,v)}var o=i("u"),s=i("v"),l=i("w"),u=i("x"),c=i("y"),f=i("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}i("starts.x"),i("starts.y"),i("starts.z"),i("maxdisplayed"),i("sizeref"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),p7t(t,r,a,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var rLe=ne((Odr,tLe)=>{"use strict";var K8e=$f().gl_streamtube3d,m7t=K8e.createTubeMesh,y7t=Zt(),x7t=ag().parseColorScale,b7t=El().extractOpts,Z8e=Q3(),J8e={xaxis:0,yaxis:1,zaxis:2};function Q8e(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var gH=Q8e.prototype;gH.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[J8e[s]];return l.l2c(o)/u}if(e.object===this.mesh){var a=e.data.position,i=e.data.velocity;return e.traceCoordinate=[n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function $8e(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function pH(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function eLe(e,t){var r=e.fullSceneLayout,n=e.dataScale,a=t._len,i={};function o(P,D){var z=r[D],q=n[J8e[D]];return y7t.simpleMap(P,function(U){return z.d2l(U)*q})}if(i.vectors=Z8e(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),a),!a)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");i.meshgrid=[s,l,u],i.gridFill=t._gridFill;var c=t._slen;if(c)i.startingPositions=Z8e(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],h=$8e(s),v=$8e(u),d=new Array(h.length*v.length),m=0,x=0;x{"use strict";nLe.exports={moduleType:"trace",name:"streamtube",basePlotModule:jm(),categories:["gl3d","showLegend"],attributes:vH(),supplyDefaults:X8e(),colorbar:{min:"cmin",max:"cmax"},calc:w7().calc,plot:rLe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var oLe=ne((Udr,iLe)=>{"use strict";iLe.exports=aLe()});var rw=ne((Vdr,fLe)=>{"use strict";var{hovertemplateAttrs:w7t,texttemplateAttrs:T7t,templatefallbackAttrs:sLe}=rs(),A7t=zp(),a1=Tu(),M7t=os(),lLe=Ys(),S7t=xf().dash,b2=ci().extendFlat,E7t=Il().overrideAll,m0=a1.marker,uLe=a1.line,cLe=m0.line;fLe.exports=E7t({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:b2({},a1.mode,{dflt:"markers"}),text:b2({},a1.text,{}),texttemplate:T7t({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:sLe({editType:"plot"}),hovertext:b2({},a1.hovertext,{}),textfont:a1.textfont,textposition:a1.textposition,line:{color:uLe.color,width:uLe.width,dash:S7t},connectgaps:a1.connectgaps,marker:b2({symbol:m0.symbol,opacity:m0.opacity,angle:m0.angle,angleref:b2({},m0.angleref,{values:["previous","up","north"]}),standoff:m0.standoff,size:m0.size,sizeref:m0.sizeref,sizemin:m0.sizemin,sizemode:m0.sizemode,colorbar:m0.colorbar,line:b2({width:cLe.width,dash:cLe.dash},lLe("marker.line")),gradient:m0.gradient},lLe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:A7t(),selected:a1.selected,unselected:a1.unselected,hoverinfo:b2({},M7t.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:w7t(),hovertemplatefallback:sLe()},"calc","nested")});var dLe=ne((Gdr,hLe)=>{"use strict";var mH=Zt(),yH=ml(),k7t=Kv(),C7t=V0(),L7t=G0(),F7t=Bp(),P7t=rw();hLe.exports=function(t,r,n,a){function i(v,d){return mH.coerce(t,r,P7t,v,d)}var o=i("locations"),s;if(o&&o.length){var l=i("geojson"),u;(typeof l=="string"&&l!==""||mH.isPlainObject(l))&&(u="geojson-id");var c=i("locationmode",u);c==="geojson-id"&&i("featureidkey"),s=o.length}else{var f=i("lon")||[],h=i("lat")||[];s=Math.min(f.length,h.length)}if(!s){r.visible=!1;return}r._length=s,i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("mode"),yH.hasMarkers(r)&&k7t(t,r,n,a,i,{gradient:!0}),yH.hasLines(r)&&(C7t(t,r,n,a,i),i("connectgaps")),yH.hasText(r)&&(i("texttemplate"),i("texttemplatefallback"),L7t(t,r,a,i)),i("fill"),r.fill!=="none"&&F7t(t,r,n,i),mH.coerceSelectionMarkerOpacity(r,i)}});var gLe=ne((Hdr,pLe)=>{"use strict";var vLe=ri();pLe.exports=function(t,r,n){var a={},i=n[r.geo]._subplot,o=i.mockAxis,s=t.lonlat;return a.lonLabel=vLe.tickText(o,o.c2l(s[0]),!0).text,a.latLabel=vLe.tickText(o,o.c2l(s[1]),!0).text,a}});var bH=ne((jdr,bLe)=>{"use strict";var xH=mi(),mLe=uo().BADNUM,D7t=Jv(),R7t=Op(),I7t=mv(),z7t=Zt().isArrayOrTypedArray,yLe=Zt()._;function xLe(e){return e&&typeof e=="string"}bLe.exports=function(t,r){var n=z7t(r.locations),a=n?r.locations.length:r._length,i=new Array(a),o;r.geojson?o=function(h){return xLe(h)||xH(h)}:o=xLe;for(var s=0;s{"use strict";Sh.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"};Sh.axesNames=["lonaxis","lataxis"];Sh.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};Sh.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};Sh.fitboundsIncompatible=new Set(["albers usa","craig","satellite"]);Sh.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}};Sh.clipPad=.001;Sh.precision=.1;Sh.landColor="#F0DC82";Sh.waterColor="#3399FF";Sh.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};Sh.sphereSVG={type:"Sphere"};Sh.fillLayers={ocean:1,land:1,lakes:1};Sh.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};Sh.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];Sh.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];Sh.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var _H=ne((k7,_Le)=>{(function(e,t){typeof k7=="object"&&typeof _Le!="undefined"?t(k7):(e=e||self,t(e.topojson=e.topojson||{}))})(k7,function(e){"use strict";function t(M){return M}function r(M){if(M==null)return t;var w,k,y=M.scale[0],S=M.scale[1],T=M.translate[0],p=M.translate[1];return function(C,A){A||(w=k=0);var P=2,D=C.length,z=new Array(D);for(z[0]=(w+=C[0])*y+T,z[1]=(k+=C[1])*S+p;PT&&(T=P[0]),P[1]p&&(p=P[1])}function A(P){switch(P.type){case"GeometryCollection":P.geometries.forEach(A);break;case"Point":C(P.coordinates);break;case"MultiPoint":P.coordinates.forEach(C);break}}M.arcs.forEach(function(P){for(var D=-1,z=P.length,q;++DT&&(T=q[0]),q[1]p&&(p=q[1])});for(k in M.objects)A(M.objects[k]);return[y,S,T,p]}function a(M,w){for(var k,y=M.length,S=y-w;S<--y;)k=M[S],M[S++]=M[y],M[y]=k}function i(M,w){return typeof w=="string"&&(w=M.objects[w]),w.type==="GeometryCollection"?{type:"FeatureCollection",features:w.geometries.map(function(k){return o(M,k)})}:o(M,w)}function o(M,w){var k=w.id,y=w.bbox,S=w.properties==null?{}:w.properties,T=s(M,w);return k==null&&y==null?{type:"Feature",properties:S,geometry:T}:y==null?{type:"Feature",id:k,properties:S,geometry:T}:{type:"Feature",id:k,bbox:y,properties:S,geometry:T}}function s(M,w){var k=r(M.transform),y=M.arcs;function S(D,z){z.length&&z.pop();for(var q=y[D<0?~D:D],U=0,O=q.length;U1)y=f(M,w,k);else for(S=0,y=new Array(T=M.arcs.length);S1)for(var z=1,q=C(P[0]),U,O;zq&&(O=P[0],P[0]=P[z],P[z]=O,q=U);return P}).filter(function(A){return A.length>0})}}function m(M,w){for(var k=0,y=M.length;k>>1;M[S]=2))throw new Error("n must be \u22652");A=M.bbox||n(M);var k=A[0],y=A[1],S=A[2],T=A[3],p;w={scale:[S-k?(S-k)/(p-1):1,T-y?(T-y)/(p-1):1],translate:[k,y]}}else A=M.bbox;var C=g(w),A,P,D=M.objects,z={};function q(R){return C(R)}function U(R){var B;switch(R.type){case"GeometryCollection":B={type:"GeometryCollection",geometries:R.geometries.map(U)};break;case"Point":B={type:"Point",coordinates:q(R.coordinates)};break;case"MultiPoint":B={type:"MultiPoint",coordinates:R.coordinates.map(q)};break;default:return R}return R.id!=null&&(B.id=R.id),R.bbox!=null&&(B.bbox=R.bbox),R.properties!=null&&(B.properties=R.properties),B}function O(R){var B=0,Y=1,X=R.length,te,se=new Array(X);for(se[0]=C(R[0],0);++B{"use strict";var wH=wLe.exports={},q7t=GA().locationmodeToLayer,B7t=_H().feature;wH.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};wH.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};wH.getTopojsonFeatures=function(e,t){var r=q7t[e.locationmode],n=t.objects[r];return B7t(t,n).features}});var jA=ne(HA=>{"use strict";var O7t=uo().BADNUM;HA.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],a=[],i=0;i0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n};HA.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};HA.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{"use strict";var AH=Object.defineProperty,N7t=Object.getOwnPropertyDescriptor,U7t=Object.getOwnPropertyNames,V7t=Object.prototype.hasOwnProperty,G7t=(e,t)=>{for(var r in t)AH(e,r,{get:t[r],enumerable:!0})},H7t=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of U7t(t))!V7t.call(e,a)&&a!==r&&AH(e,a,{get:()=>t[a],enumerable:!(n=N7t(t,a))||n.enumerable});return e},j7t=e=>H7t(AH({},"__esModule",{value:!0}),e),TLe={};G7t(TLe,{COUNTRIES:()=>ALe,byAlpha2:()=>Z7t,byAlpha3:()=>X7t,byM49:()=>$7t,createLookup:()=>MLe,lookup:()=>W7t,lookupAlpha3:()=>Y7t,sanitize:()=>TH});SLe.exports=j7t(TLe);var ALe=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function TH(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function MLe(e){let t=new Map,r=new Map,n=new Map;for(let s of e)t.set(s.iso3,s),s.iso2&&r.set(s.iso2,s),s.m49&&n.set(s.m49,s);let a=new Map;for(let s of e)for(let l of[s.name,...s.aliases]){let u=TH(l),c=a.get(u);if(c!==void 0&&c!==s.iso3)throw new Error(`Duplicate name/alias "${u}": ${c} vs ${s.iso3}`);a.set(u,s.iso3)}function i(s){if(s==null)return;let l=String(s).trim();if(!l)return;if(/^\d+$/.test(l)){let c=n.get(String(parseInt(l,10)).padStart(3,"0"));if(c)return c}if(/^[A-Za-z]{2}$/.test(l)){let c=r.get(l.toUpperCase());if(c)return c}if(/^[A-Za-z]{3}$/.test(l)){let c=t.get(l.toUpperCase());if(c)return c}let u=a.get(TH(l));return u===void 0?void 0:t.get(u)}function o(s){var l;return(l=i(s))==null?void 0:l.iso3}return{lookup:i,lookupAlpha3:o,byAlpha3:t,byAlpha2:r,byM49:n}}var WA=MLe(ALe),W7t=WA.lookup,Y7t=WA.lookupAlpha3,X7t=WA.byAlpha3,Z7t=WA.byAlpha2,$7t=WA.byM49});var P7=ne(tl=>{"use strict";Object.defineProperty(tl,"__esModule",{value:!0});var tv=63710088e-1,SH={centimeters:tv*100,centimetres:tv*100,degrees:360/(2*Math.PI),feet:tv*3.28084,inches:tv*39.37,kilometers:tv/1e3,kilometres:tv/1e3,meters:tv,metres:tv,miles:tv/1609.344,millimeters:tv*1e3,millimetres:tv*1e3,nauticalmiles:tv/1852,radians:1,yards:tv*1.0936},MH={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function Xm(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function K7t(e,t,r={}){switch(e){case"Point":return EH(t).geometry;case"LineString":return CH(t).geometry;case"Polygon":return kH(t).geometry;case"MultiPoint":return CLe(t).geometry;case"MultiLineString":return kLe(t).geometry;case"MultiPolygon":return LLe(t).geometry;default:throw new Error(e+" is invalid")}}function EH(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!L7(e[0])||!L7(e[1]))throw new Error("coordinates must contain numbers");return Xm({type:"Point",coordinates:e},t,r)}function J7t(e,t,r={}){return F7(e.map(n=>EH(n,t)),r)}function kH(e,t,r={}){for(let a of e){if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(a[a.length-1].length!==a[0].length)throw new Error("First and last Position are not equivalent.");for(let i=0;ikH(n,t)),r)}function CH(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return Xm({type:"LineString",coordinates:e},t,r)}function e9t(e,t,r={}){return F7(e.map(n=>CH(n,t)),r)}function F7(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function kLe(e,t,r={}){return Xm({type:"MultiLineString",coordinates:e},t,r)}function CLe(e,t,r={}){return Xm({type:"MultiPoint",coordinates:e},t,r)}function LLe(e,t,r={}){return Xm({type:"MultiPolygon",coordinates:e},t,r)}function t9t(e,t,r={}){return Xm({type:"GeometryCollection",geometries:e},t,r)}function r9t(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function FLe(e,t="kilometers"){let r=SH[t];if(!r)throw new Error(t+" units is invalid");return e*r}function LH(e,t="kilometers"){let r=SH[t];if(!r)throw new Error(t+" units is invalid");return e/r}function n9t(e,t){return PLe(LH(e,t))}function a9t(e){let t=e%360;return t<0&&(t+=360),t}function i9t(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function PLe(e){return e%(2*Math.PI)*180/Math.PI}function o9t(e){return e%360*Math.PI/180}function s9t(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return FLe(LH(e,t),r)}function l9t(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=MH[t];if(!n)throw new Error("invalid original units");let a=MH[r];if(!a)throw new Error("invalid final units");return e/n*a}function L7(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function u9t(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function c9t(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!L7(t))throw new Error("bbox must only contain numbers")})}function f9t(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}tl.areaFactors=MH;tl.azimuthToBearing=i9t;tl.bearingToAzimuth=a9t;tl.convertArea=l9t;tl.convertLength=s9t;tl.degreesToRadians=o9t;tl.earthRadius=tv;tl.factors=SH;tl.feature=Xm;tl.featureCollection=F7;tl.geometry=K7t;tl.geometryCollection=t9t;tl.isNumber=L7;tl.isObject=u9t;tl.lengthToDegrees=n9t;tl.lengthToRadians=LH;tl.lineString=CH;tl.lineStrings=e9t;tl.multiLineString=kLe;tl.multiPoint=CLe;tl.multiPolygon=LLe;tl.point=EH;tl.points=J7t;tl.polygon=kH;tl.polygons=Q7t;tl.radiansToDegrees=PLe;tl.radiansToLength=FLe;tl.round=r9t;tl.validateBBox=c9t;tl.validateId=f9t});var R7=ne(Kf=>{"use strict";Object.defineProperty(Kf,"__esModule",{value:!0});var pd=P7();function YA(e,t,r){if(e!==null)for(var n,a,i,o,s,l,u,c=0,f=0,h,v=e.type,d=v==="FeatureCollection",m=v==="Feature",x=d?e.features.length:1,g=0;gl||d>u||m>c){s=f,l=n,u=d,c=m,i=0;return}var x=pd.lineString.call(void 0,[s,f],r.properties);if(t(x,n,a,m,i)===!1)return!1;i++,s=f})===!1)return!1}}})}function y9t(e,t,r){var n=r,a=!1;return ILe(e,function(i,o,s,l,u){a===!1&&r===void 0?n=i:n=t(n,i,o,s,l,u),a=!0}),n}function zLe(e,t){if(!e)throw new Error("geojson is required");D7(e,function(r,n,a){if(r.geometry!==null){var i=r.geometry.type,o=r.geometry.coordinates;switch(i){case"LineString":if(t(r,n,a,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(I7,"__esModule",{value:!0});var qLe=P7(),w9t=R7();function NLe(e){return w9t.geomReduce.call(void 0,e,(t,r)=>t+T9t(r),0)}function T9t(e){let t=0,r;switch(e.type){case"Polygon":return BLe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(OLe(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=a[0]*PH,l=i[1]*PH,u=o[0]*PH;r+=(u-s)*Math.sin(l),n++}return r*A9t}var M9t=NLe;I7.area=NLe;I7.default=M9t});var GLe=ne(z7=>{"use strict";Object.defineProperty(z7,"__esModule",{value:!0});var S9t=P7(),E9t=R7();function VLe(e,t={}){let r=0,n=0,a=0;return E9t.coordEach.call(void 0,e,function(i){r+=i[0],n+=i[1],a++},!0),S9t.point.call(void 0,[r/a,n/a],t.properties)}var k9t=VLe;z7.centroid=VLe;z7.default=k9t});var XA=ne((q7,HLe)=>{(function(e,t){t(typeof q7=="object"&&typeof HLe!="undefined"?q7:e.d3=e.d3||{})})(q7,(function(e){"use strict";function t(ce,oe){return ceoe?1:ce>=oe?0:NaN}function r(ce){return ce.length===1&&(ce=n(ce)),{left:function(oe,we,he,ye){for(he==null&&(he=0),ye==null&&(ye=oe.length);he>>1;ce(oe[Pe],we)<0?he=Pe+1:ye=Pe}return he},right:function(oe,we,he,ye){for(he==null&&(he=0),ye==null&&(ye=oe.length);he>>1;ce(oe[Pe],we)>0?ye=Pe:he=Pe+1}return he}}}function n(ce){return function(oe,we){return t(ce(oe),we)}}var a=r(t),i=a.right,o=a.left;function s(ce,oe){oe==null&&(oe=l);for(var we=0,he=ce.length-1,ye=ce[0],Pe=new Array(he<0?0:he);wece?1:oe>=ce?0:NaN}function f(ce){return ce===null?NaN:+ce}function h(ce,oe){var we=ce.length,he=0,ye=-1,Pe=0,le,ze,Xe=0;if(oe==null)for(;++ye1)return Xe/(he-1)}function v(ce,oe){var we=h(ce,oe);return we&&Math.sqrt(we)}function d(ce,oe){var we=ce.length,he=-1,ye,Pe,le;if(oe==null){for(;++he=ye)for(Pe=le=ye;++heye&&(Pe=ye),le=ye)for(Pe=le=ye;++heye&&(Pe=ye),le0)return[ce];if((he=oe0)for(ce=Math.ceil(ce/ze),oe=Math.floor(oe/ze),le=new Array(Pe=Math.ceil(oe-ce+1));++ye=0?(Pe>=k?10:Pe>=y?5:Pe>=S?2:1)*Math.pow(10,ye):-Math.pow(10,-ye)/(Pe>=k?10:Pe>=y?5:Pe>=S?2:1)}function C(ce,oe,we){var he=Math.abs(oe-ce)/Math.max(0,we),ye=Math.pow(10,Math.floor(Math.log(he)/Math.LN10)),Pe=he/ye;return Pe>=k?ye*=10:Pe>=y?ye*=5:Pe>=S&&(ye*=2),oeOe;)qe.pop(),--mt;var lt=new Array(mt+1),Ie;for(Pe=0;Pe<=mt;++Pe)Ie=lt[Pe]=[],Ie.x0=Pe>0?qe[Pe-1]:st,Ie.x1=Pe=1)return+we(ce[he-1],he-1,ce);var he,ye=(he-1)*oe,Pe=Math.floor(ye),le=+we(ce[Pe],Pe,ce),ze=+we(ce[Pe+1],Pe+1,ce);return le+(ze-le)*(ye-Pe)}}function z(ce,oe,we){return ce=g.call(ce,f).sort(t),Math.ceil((we-oe)/(2*(D(ce,.75)-D(ce,.25))*Math.pow(ce.length,-1/3)))}function q(ce,oe,we){return Math.ceil((we-oe)/(3.5*v(ce)*Math.pow(ce.length,-1/3)))}function U(ce,oe){var we=ce.length,he=-1,ye,Pe;if(oe==null){for(;++he=ye)for(Pe=ye;++hePe&&(Pe=ye)}else for(;++he=ye)for(Pe=ye;++hePe&&(Pe=ye);return Pe}function O(ce,oe){var we=ce.length,he=we,ye=-1,Pe,le=0;if(oe==null)for(;++ye=0;)for(le=ce[oe],we=le.length;--we>=0;)Pe[--ye]=le[we];return Pe}function Y(ce,oe){var we=ce.length,he=-1,ye,Pe;if(oe==null){for(;++he=ye)for(Pe=ye;++heye&&(Pe=ye)}else for(;++he=ye)for(Pe=ye;++heye&&(Pe=ye);return Pe}function X(ce,oe){for(var we=oe.length,he=new Array(we);we--;)he[we]=ce[oe[we]];return he}function te(ce,oe){if(we=ce.length){var we,he=0,ye=0,Pe,le=ce[ye];for(oe==null&&(oe=t);++he{(function(e,t){typeof B7=="object"&&typeof jLe!="undefined"?t(B7,XA()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(B7,(function(e,t){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(Je){i(a,Je,this.t),i(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new n;function i(Je,yt,Gt){var Bt=Je.s=yt+Gt,mr=Bt-yt,Ur=Bt-mr;Je.t=yt-Ur+(Gt-mr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,h=180/l,v=l/180,d=Math.abs,m=Math.atan,x=Math.atan2,g=Math.cos,E=Math.ceil,M=Math.exp,w=Math.log,k=Math.pow,y=Math.sin,S=Math.sign||function(Je){return Je>0?1:Je<0?-1:0},T=Math.sqrt,p=Math.tan;function C(Je){return Je>1?0:Je<-1?l:Math.acos(Je)}function A(Je){return Je>1?u:Je<-1?-u:Math.asin(Je)}function P(Je){return(Je=y(Je/2))*Je}function D(){}function z(Je,yt){Je&&U.hasOwnProperty(Je.type)&&U[Je.type](Je,yt)}var q={Feature:function(Je,yt){z(Je.geometry,yt)},FeatureCollection:function(Je,yt){for(var Gt=Je.features,Bt=-1,mr=Gt.length;++Bt=0?1:-1,mr=Bt*Gt,Ur=g(yt),en=y(yt),mn=j*en,An=re*Ur+mn*g(mr),Vn=mn*Bt*y(mr);Y.add(x(Vn,An)),ue=Je,re=Ur,j=en}function ye(Je){return X.reset(),B(Je,fe),X*2}function Pe(Je){return[x(Je[1],Je[0]),A(Je[2])]}function le(Je){var yt=Je[0],Gt=Je[1],Bt=g(Gt);return[Bt*g(yt),Bt*y(yt),y(Gt)]}function ze(Je,yt){return Je[0]*yt[0]+Je[1]*yt[1]+Je[2]*yt[2]}function Xe(Je,yt){return[Je[1]*yt[2]-Je[2]*yt[1],Je[2]*yt[0]-Je[0]*yt[2],Je[0]*yt[1]-Je[1]*yt[0]]}function vt(Je,yt){Je[0]+=yt[0],Je[1]+=yt[1],Je[2]+=yt[2]}function st(Je,yt){return[Je[0]*yt,Je[1]*yt,Je[2]*yt]}function Oe(Je){var yt=T(Je[0]*Je[0]+Je[1]*Je[1]+Je[2]*Je[2]);Je[0]/=yt,Je[1]/=yt,Je[2]/=yt}var qe,mt,lt,Ie,de,Ee,Ue,ge,Ge=r(),tt,ft,He={point:Qe,lineStart:pt,lineEnd:kt,polygonStart:function(){He.point=qt,He.lineStart=Wt,He.lineEnd=_r,Ge.reset(),fe.polygonStart()},polygonEnd:function(){fe.polygonEnd(),He.point=Qe,He.lineStart=pt,He.lineEnd=kt,Y<0?(qe=-(lt=180),mt=-(Ie=90)):Ge>o?Ie=90:Ge<-o&&(mt=-90),ft[0]=qe,ft[1]=lt},sphere:function(){qe=-(lt=180),mt=-(Ie=90)}};function Qe(Je,yt){tt.push(ft=[qe=Je,lt=Je]),ytIe&&(Ie=yt)}function We(Je,yt){var Gt=le([Je*v,yt*v]);if(ge){var Bt=Xe(ge,Gt),mr=[Bt[1],-Bt[0],0],Ur=Xe(mr,Bt);Oe(Ur),Ur=Pe(Ur);var en=Je-de,mn=en>0?1:-1,An=Ur[0]*h*mn,Vn,tn=d(en)>180;tn^(mn*deIe&&(Ie=Vn)):(An=(An+360)%360-180,tn^(mn*deIe&&(Ie=yt))),tn?Jetr(qe,lt)&&(lt=Je):tr(Je,lt)>tr(qe,lt)&&(qe=Je):lt>=qe?(Jelt&&(lt=Je)):Je>de?tr(qe,Je)>tr(qe,lt)&&(lt=Je):tr(Je,lt)>tr(qe,lt)&&(qe=Je)}else tt.push(ft=[qe=Je,lt=Je]);ytIe&&(Ie=yt),ge=Gt,de=Je}function pt(){He.point=We}function kt(){ft[0]=qe,ft[1]=lt,He.point=Qe,ge=null}function qt(Je,yt){if(ge){var Gt=Je-de;Ge.add(d(Gt)>180?Gt+(Gt>0?360:-360):Gt)}else Ee=Je,Ue=yt;fe.point(Je,yt),We(Je,yt)}function Wt(){fe.lineStart()}function _r(){qt(Ee,Ue),fe.lineEnd(),d(Ge)>o&&(qe=-(lt=180)),ft[0]=qe,ft[1]=lt,ge=null}function tr(Je,yt){return(yt-=Je)<0?yt+360:yt}function lr(Je,yt){return Je[0]-yt[0]}function Ye(Je,yt){return Je[0]<=Je[1]?Je[0]<=yt&&yt<=Je[1]:yttr(Bt[0],Bt[1])&&(Bt[1]=mr[1]),tr(mr[0],Bt[1])>tr(Bt[0],Bt[1])&&(Bt[0]=mr[0])):Ur.push(Bt=mr);for(en=-1/0,Gt=Ur.length-1,yt=0,Bt=Ur[Gt];yt<=Gt;Bt=mr,++yt)mr=Ur[yt],(mn=tr(Bt[1],mr[0]))>en&&(en=mn,qe=mr[0],lt=Bt[1])}return tt=ft=null,qe===1/0||mt===1/0?[[NaN,NaN],[NaN,NaN]]:[[qe,mt],[lt,Ie]]}var Fe,Ae,Re,Ze,Ke,_t,St,Vt,fr,$t,gr,Br,Nr,Er,zr,vn,Nn={sphere:D,point:Xn,lineStart:Qn,lineEnd:da,polygonStart:function(){Nn.lineStart=ua,Nn.lineEnd=qa},polygonEnd:function(){Nn.lineStart=Qn,Nn.lineEnd=da}};function Xn(Je,yt){Je*=v,yt*=v;var Gt=g(yt);Kn(Gt*g(Je),Gt*y(Je),y(yt))}function Kn(Je,yt,Gt){++Fe,Re+=(Je-Re)/Fe,Ze+=(yt-Ze)/Fe,Ke+=(Gt-Ke)/Fe}function Qn(){Nn.point=un}function un(Je,yt){Je*=v,yt*=v;var Gt=g(yt);Er=Gt*g(Je),zr=Gt*y(Je),vn=y(yt),Nn.point=aa,Kn(Er,zr,vn)}function aa(Je,yt){Je*=v,yt*=v;var Gt=g(yt),Bt=Gt*g(Je),mr=Gt*y(Je),Ur=y(yt),en=x(T((en=zr*Ur-vn*mr)*en+(en=vn*Bt-Er*Ur)*en+(en=Er*mr-zr*Bt)*en),Er*Bt+zr*mr+vn*Ur);Ae+=en,_t+=en*(Er+(Er=Bt)),St+=en*(zr+(zr=mr)),Vt+=en*(vn+(vn=Ur)),Kn(Er,zr,vn)}function da(){Nn.point=Xn}function ua(){Nn.point=ii}function qa(){pa(Br,Nr),Nn.point=Xn}function ii(Je,yt){Br=Je,Nr=yt,Je*=v,yt*=v,Nn.point=pa;var Gt=g(yt);Er=Gt*g(Je),zr=Gt*y(Je),vn=y(yt),Kn(Er,zr,vn)}function pa(Je,yt){Je*=v,yt*=v;var Gt=g(yt),Bt=Gt*g(Je),mr=Gt*y(Je),Ur=y(yt),en=zr*Ur-vn*mr,mn=vn*Bt-Er*Ur,An=Er*mr-zr*Bt,Vn=T(en*en+mn*mn+An*An),tn=A(Vn),nn=Vn&&-tn/Vn;fr+=nn*en,$t+=nn*mn,gr+=nn*An,Ae+=tn,_t+=tn*(Er+(Er=Bt)),St+=tn*(zr+(zr=mr)),Vt+=tn*(vn+(vn=Ur)),Kn(Er,zr,vn)}function no(Je){Fe=Ae=Re=Ze=Ke=_t=St=Vt=fr=$t=gr=0,B(Je,Nn);var yt=fr,Gt=$t,Bt=gr,mr=yt*yt+Gt*Gt+Bt*Bt;return mrl?Je+Math.round(-Je/f)*f:Je,yt]}fi.invert=fi;function _o(Je,yt,Gt){return(Je%=f)?yt||Gt?Ti(ni(Je),ao(yt,Gt)):ni(Je):yt||Gt?ao(yt,Gt):fi}function Oi(Je){return function(yt,Gt){return yt+=Je,[yt>l?yt-f:yt<-l?yt+f:yt,Gt]}}function ni(Je){var yt=Oi(Je);return yt.invert=Oi(-Je),yt}function ao(Je,yt){var Gt=g(Je),Bt=y(Je),mr=g(yt),Ur=y(yt);function en(mn,An){var Vn=g(An),tn=g(mn)*Vn,nn=y(mn)*Vn,dn=y(An),Wr=dn*Gt+tn*Bt;return[x(nn*mr-Wr*Ur,tn*Gt-dn*Bt),A(Wr*mr+nn*Ur)]}return en.invert=function(mn,An){var Vn=g(An),tn=g(mn)*Vn,nn=y(mn)*Vn,dn=y(An),Wr=dn*mr-nn*Ur;return[x(nn*mr+dn*Ur,tn*Gt+Wr*Bt),A(Wr*Gt-tn*Bt)]},en}function Hi(Je){Je=_o(Je[0]*v,Je[1]*v,Je.length>2?Je[2]*v:0);function yt(Gt){return Gt=Je(Gt[0]*v,Gt[1]*v),Gt[0]*=h,Gt[1]*=h,Gt}return yt.invert=function(Gt){return Gt=Je.invert(Gt[0]*v,Gt[1]*v),Gt[0]*=h,Gt[1]*=h,Gt},yt}function to(Je,yt,Gt,Bt,mr,Ur){if(Gt){var en=g(yt),mn=y(yt),An=Bt*Gt;mr==null?(mr=yt+Bt*f,Ur=yt-An/2):(mr=Xo(en,mr),Ur=Xo(en,Ur),(Bt>0?mrUr)&&(mr+=Bt*f));for(var Vn,tn=mr;Bt>0?tn>Ur:tn1&&Je.push(Je.pop().concat(Je.shift()))},result:function(){var Gt=Je;return Je=[],yt=null,Gt}}}function yo(Je,yt){return d(Je[0]-yt[0])=0;--mn)mr.point((nn=tn[mn])[0],nn[1]);else Bt(dn.x,dn.p.x,-1,mr);dn=dn.p}dn=dn.o,tn=dn.z,Wr=!Wr}while(!dn.v);mr.lineEnd()}}}function Ni(Je){if(yt=Je.length){for(var yt,Gt=0,Bt=Je[0],mr;++Gt=0?1:-1,Qi=Ao*ji,zo=Qi>l,Vi=Ca*Ja;if(Oa.add(x(Vi*Ao*y(Qi),Pa*pi+Vi*g(Qi))),en+=zo?ji+Ao*f:ji,zo^Wr>=Gt^na>=Gt){var Js=Xe(le(dn),le(Va));Oe(Js);var cs=Xe(Ur,Js);Oe(cs);var Mo=(zo^ji>=0?-1:1)*A(cs[2]);(Bt>Mo||Bt===Mo&&(Js[0]||Js[1]))&&(mn+=zo^ji>=0?1:-1)}}return(en<-o||en0){for(An||(mr.polygonStart(),An=!0),mr.lineStart(),pi=0;pi1&&zn&2&&Ja.push(Ja.pop().concat(Ja.shift())),tn.push(Ja.filter(rt))}}return dn}}function rt(Je){return Je.length>1}function Xt(Je,yt){return((Je=Je.x)[0]<0?Je[1]-u-o:u-Je[1])-((yt=yt.x)[0]<0?yt[1]-u-o:u-yt[1])}var xr=ia(function(){return!0},Fr,Mn,[-l,-u]);function Fr(Je){var yt=NaN,Gt=NaN,Bt=NaN,mr;return{lineStart:function(){Je.lineStart(),mr=1},point:function(Ur,en){var mn=Ur>0?l:-l,An=d(Ur-yt);d(An-l)0?u:-u),Je.point(Bt,Gt),Je.lineEnd(),Je.lineStart(),Je.point(mn,Gt),Je.point(Ur,Gt),mr=0):Bt!==mn&&An>=l&&(d(yt-Bt)o?m((y(yt)*(Ur=g(Bt))*y(Gt)-y(Bt)*(mr=g(yt))*y(Je))/(mr*Ur*en)):(yt+Bt)/2}function Mn(Je,yt,Gt,Bt){var mr;if(Je==null)mr=Gt*u,Bt.point(-l,mr),Bt.point(0,mr),Bt.point(l,mr),Bt.point(l,0),Bt.point(l,-mr),Bt.point(0,-mr),Bt.point(-l,-mr),Bt.point(-l,0),Bt.point(-l,mr);else if(d(Je[0]-yt[0])>o){var Ur=Je[0]0,mr=d(yt)>o;function Ur(tn,nn,dn,Wr){to(Wr,Je,Gt,dn,tn,nn)}function en(tn,nn){return g(tn)*g(nn)>yt}function mn(tn){var nn,dn,Wr,ea,Ca;return{lineStart:function(){ea=Wr=!1,Ca=1},point:function(Pa,La){var Va=[Pa,La],na,zn=en(Pa,La),Ja=Bt?zn?0:Vn(Pa,La):zn?Vn(Pa+(Pa<0?l:-l),La):0;if(!nn&&(ea=Wr=zn)&&tn.lineStart(),zn!==Wr&&(na=An(nn,Va),(!na||yo(nn,na)||yo(Va,na))&&(Va[2]=1)),zn!==Wr)Ca=0,zn?(tn.lineStart(),na=An(Va,nn),tn.point(na[0],na[1])):(na=An(nn,Va),tn.point(na[0],na[1],2),tn.lineEnd()),nn=na;else if(mr&&nn&&Bt^zn){var pi;!(Ja&dn)&&(pi=An(Va,nn,!0))&&(Ca=0,Bt?(tn.lineStart(),tn.point(pi[0][0],pi[0][1]),tn.point(pi[1][0],pi[1][1]),tn.lineEnd()):(tn.point(pi[1][0],pi[1][1]),tn.lineEnd(),tn.lineStart(),tn.point(pi[0][0],pi[0][1],3)))}zn&&(!nn||!yo(nn,Va))&&tn.point(Va[0],Va[1]),nn=Va,Wr=zn,dn=Ja},lineEnd:function(){Wr&&tn.lineEnd(),nn=null},clean:function(){return Ca|(ea&&Wr)<<1}}}function An(tn,nn,dn){var Wr=le(tn),ea=le(nn),Ca=[1,0,0],Pa=Xe(Wr,ea),La=ze(Pa,Pa),Va=Pa[0],na=La-Va*Va;if(!na)return!dn&&tn;var zn=yt*La/na,Ja=-yt*Va/na,pi=Xe(Ca,Pa),ji=st(Ca,zn),Ao=st(Pa,Ja);vt(ji,Ao);var Qi=pi,zo=ze(ji,Qi),Vi=ze(Qi,Qi),Js=zo*zo-Vi*(ze(ji,ji)-1);if(!(Js<0)){var cs=T(Js),Mo=st(Qi,(-zo-cs)/Vi);if(vt(Mo,ji),Mo=Pe(Mo),!dn)return Mo;var ya=tn[0],ho=nn[0],wo=tn[1],Yi=nn[1],Vs;ho0^Mo[1]<(d(Mo[0]-ya)l^(ya<=Mo[0]&&Mo[0]<=ho)){var ll=st(Qi,(-zo+cs)/Vi);return vt(ll,ji),[Mo,Pe(ll)]}}}function Vn(tn,nn){var dn=Bt?Je:l-Je,Wr=0;return tn<-dn?Wr|=1:tn>dn&&(Wr|=2),nn<-dn?Wr|=4:nn>dn&&(Wr|=8),Wr}return ia(en,mn,Ur,Bt?[0,-Je]:[-l,Je-l])}function on(Je,yt,Gt,Bt,mr,Ur){var en=Je[0],mn=Je[1],An=yt[0],Vn=yt[1],tn=0,nn=1,dn=An-en,Wr=Vn-mn,ea;if(ea=Gt-en,!(!dn&&ea>0)){if(ea/=dn,dn<0){if(ea0){if(ea>nn)return;ea>tn&&(tn=ea)}if(ea=mr-en,!(!dn&&ea<0)){if(ea/=dn,dn<0){if(ea>nn)return;ea>tn&&(tn=ea)}else if(dn>0){if(ea0)){if(ea/=Wr,Wr<0){if(ea0){if(ea>nn)return;ea>tn&&(tn=ea)}if(ea=Ur-mn,!(!Wr&&ea<0)){if(ea/=Wr,Wr<0){if(ea>nn)return;ea>tn&&(tn=ea)}else if(Wr>0){if(ea0&&(Je[0]=en+tn*dn,Je[1]=mn+tn*Wr),nn<1&&(yt[0]=en+nn*dn,yt[1]=mn+nn*Wr),!0}}}}}var En=1e9,Aa=-En;function ba(Je,yt,Gt,Bt){function mr(Vn,tn){return Je<=Vn&&Vn<=Gt&&yt<=tn&&tn<=Bt}function Ur(Vn,tn,nn,dn){var Wr=0,ea=0;if(Vn==null||(Wr=en(Vn,nn))!==(ea=en(tn,nn))||An(Vn,tn)<0^nn>0)do dn.point(Wr===0||Wr===3?Je:Gt,Wr>1?Bt:yt);while((Wr=(Wr+nn+4)%4)!==ea);else dn.point(tn[0],tn[1])}function en(Vn,tn){return d(Vn[0]-Je)0?0:3:d(Vn[0]-Gt)0?2:1:d(Vn[1]-yt)0?1:0:tn>0?3:2}function mn(Vn,tn){return An(Vn.x,tn.x)}function An(Vn,tn){var nn=en(Vn,1),dn=en(tn,1);return nn!==dn?nn-dn:nn===0?tn[1]-Vn[1]:nn===1?Vn[0]-tn[0]:nn===2?Vn[1]-tn[1]:tn[0]-Vn[0]}return function(Vn){var tn=Vn,nn=Fi(),dn,Wr,ea,Ca,Pa,La,Va,na,zn,Ja,pi,ji={point:Ao,lineStart:Js,lineEnd:cs,polygonStart:zo,polygonEnd:Vi};function Ao(ya,ho){mr(ya,ho)&&tn.point(ya,ho)}function Qi(){for(var ya=0,ho=0,wo=Wr.length;hoBt&&(Pu-Yu)*(Bt-ll)>(ul-ll)*(Je-Yu)&&++ya:ul<=Bt&&(Pu-Yu)*(Bt-ll)<(ul-ll)*(Je-Yu)&&--ya;return ya}function zo(){tn=nn,dn=[],Wr=[],pi=!0}function Vi(){var ya=Qi(),ho=pi&&ya,wo=(dn=t.merge(dn)).length;(ho||wo)&&(Vn.polygonStart(),ho&&(Vn.lineStart(),Ur(null,null,1,Vn),Vn.lineEnd()),wo&&rl(dn,mn,ya,Ur,Vn),Vn.polygonEnd()),tn=Vn,dn=Wr=ea=null}function Js(){ji.point=Mo,Wr&&Wr.push(ea=[]),Ja=!0,zn=!1,Va=na=NaN}function cs(){dn&&(Mo(Ca,Pa),La&&zn&&nn.rejoin(),dn.push(nn.result())),ji.point=Ao,zn&&tn.lineEnd()}function Mo(ya,ho){var wo=mr(ya,ho);if(Wr&&ea.push([ya,ho]),Ja)Ca=ya,Pa=ho,La=wo,Ja=!1,wo&&(tn.lineStart(),tn.point(ya,ho));else if(wo&&zn)tn.point(ya,ho);else{var Yi=[Va=Math.max(Aa,Math.min(En,Va)),na=Math.max(Aa,Math.min(En,na))],Vs=[ya=Math.max(Aa,Math.min(En,ya)),ho=Math.max(Aa,Math.min(En,ho))];on(Yi,Vs,Je,yt,Gt,Bt)?(zn||(tn.lineStart(),tn.point(Yi[0],Yi[1])),tn.point(Vs[0],Vs[1]),wo||tn.lineEnd(),pi=!1):wo&&(tn.lineStart(),tn.point(ya,ho),pi=!1)}Va=ya,na=ho,zn=wo}return ji}}function Ia(){var Je=0,yt=0,Gt=960,Bt=500,mr,Ur,en;return en={stream:function(mn){return mr&&Ur===mn?mr:mr=ba(Je,yt,Gt,Bt)(Ur=mn)},extent:function(mn){return arguments.length?(Je=+mn[0][0],yt=+mn[0][1],Gt=+mn[1][0],Bt=+mn[1][1],mr=Ur=null,en):[[Je,yt],[Gt,Bt]]}}}var hi=r(),ki,ui,Mi,_i={sphere:D,point:D,lineStart:ko,lineEnd:D,polygonStart:D,polygonEnd:D};function ko(){_i.point=$o,_i.lineEnd=Io}function Io(){_i.point=_i.lineEnd=D}function $o(Je,yt){Je*=v,yt*=v,ki=Je,ui=y(yt),Mi=g(yt),_i.point=Is}function Is(Je,yt){Je*=v,yt*=v;var Gt=y(yt),Bt=g(yt),mr=d(Je-ki),Ur=g(mr),en=y(mr),mn=Bt*en,An=Mi*Gt-ui*Bt*Ur,Vn=ui*Gt+Mi*Bt*Ur;hi.add(x(T(mn*mn+An*An),Vn)),ki=Je,ui=Gt,Mi=Bt}function Es(Je){return hi.reset(),B(Je,_i),+hi}var Ks=[null,null],nl={type:"LineString",coordinates:Ks};function ks(Je,yt){return Ks[0]=Je,Ks[1]=yt,Es(nl)}var us={Feature:function(Je,yt){return Co(Je.geometry,yt)},FeatureCollection:function(Je,yt){for(var Gt=Je.features,Bt=-1,mr=Gt.length;++Bt0&&(mr=ks(Je[Ur],Je[Ur-1]),mr>0&&Gt<=mr&&Bt<=mr&&(Gt+Bt-mr)*(1-Math.pow((Gt-Bt)/mr,2))o}).map(dn)).concat(t.range(E(Ur/Vn)*Vn,mr,Vn).filter(function(na){return d(na%nn)>o}).map(Wr))}return La.lines=function(){return Va().map(function(na){return{type:"LineString",coordinates:na}})},La.outline=function(){return{type:"Polygon",coordinates:[ea(Bt).concat(Ca(en).slice(1),ea(Gt).reverse().slice(1),Ca(mn).reverse().slice(1))]}},La.extent=function(na){return arguments.length?La.extentMajor(na).extentMinor(na):La.extentMinor()},La.extentMajor=function(na){return arguments.length?(Bt=+na[0][0],Gt=+na[1][0],mn=+na[0][1],en=+na[1][1],Bt>Gt&&(na=Bt,Bt=Gt,Gt=na),mn>en&&(na=mn,mn=en,en=na),La.precision(Pa)):[[Bt,mn],[Gt,en]]},La.extentMinor=function(na){return arguments.length?(yt=+na[0][0],Je=+na[1][0],Ur=+na[0][1],mr=+na[1][1],yt>Je&&(na=yt,yt=Je,Je=na),Ur>mr&&(na=Ur,Ur=mr,mr=na),La.precision(Pa)):[[yt,Ur],[Je,mr]]},La.step=function(na){return arguments.length?La.stepMajor(na).stepMinor(na):La.stepMinor()},La.stepMajor=function(na){return arguments.length?(tn=+na[0],nn=+na[1],La):[tn,nn]},La.stepMinor=function(na){return arguments.length?(An=+na[0],Vn=+na[1],La):[An,Vn]},La.precision=function(na){return arguments.length?(Pa=+na,dn=Nl(Ur,mr,90),Wr=du(yt,Je,Pa),ea=Nl(mn,en,90),Ca=du(Bt,Gt,Pa),La):Pa},La.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function al(){return Kl()()}function co(Je,yt){var Gt=Je[0]*v,Bt=Je[1]*v,mr=yt[0]*v,Ur=yt[1]*v,en=g(Bt),mn=y(Bt),An=g(Ur),Vn=y(Ur),tn=en*g(Gt),nn=en*y(Gt),dn=An*g(mr),Wr=An*y(mr),ea=2*A(T(P(Ur-Bt)+en*An*P(mr-Gt))),Ca=y(ea),Pa=ea?function(La){var Va=y(La*=ea)/Ca,na=y(ea-La)/Ca,zn=na*tn+Va*dn,Ja=na*nn+Va*Wr,pi=na*mn+Va*Vn;return[x(Ja,zn)*h,x(pi,T(zn*zn+Ja*Ja))*h]}:function(){return[Gt*h,Bt*h]};return Pa.distance=ea,Pa}function Ul(Je){return Je}var Ls=r(),il=r(),_c,Os,Vu,kf,Jl={point:D,lineStart:D,lineEnd:D,polygonStart:function(){Jl.lineStart=th,Jl.lineEnd=Rd},polygonEnd:function(){Jl.lineStart=Jl.lineEnd=Jl.point=D,Ls.add(d(il)),il.reset()},result:function(){var Je=Ls/2;return Ls.reset(),Je}};function th(){Jl.point=wc}function wc(Je,yt){Jl.point=Cf,_c=Vu=Je,Os=kf=yt}function Cf(Je,yt){il.add(kf*Je-Vu*yt),Vu=Je,kf=yt}function Rd(){Cf(_c,Os)}var ol=1/0,af=ol,ec=-ol,Tc=ec,vu={point:jc,lineStart:D,lineEnd:D,polygonStart:D,polygonEnd:D,result:function(){var Je=[[ol,af],[ec,Tc]];return ec=Tc=-(af=ol=1/0),Je}};function jc(Je,yt){Jeec&&(ec=Je),ytTc&&(Tc=yt)}var Lf=0,tc=0,Lh=0,of=0,Ff=0,Pf=0,rh=0,Fh=0,pu=0,gu,mu,Ql,as,fo={point:Ns,lineStart:ku,lineEnd:is,polygonStart:function(){fo.lineStart=Xh,fo.lineEnd=Wi},polygonEnd:function(){fo.point=Ns,fo.lineStart=ku,fo.lineEnd=is},result:function(){var Je=pu?[rh/pu,Fh/pu]:Pf?[of/Pf,Ff/Pf]:Lh?[Lf/Lh,tc/Lh]:[NaN,NaN];return Lf=tc=Lh=of=Ff=Pf=rh=Fh=pu=0,Je}};function Ns(Je,yt){Lf+=Je,tc+=yt,++Lh}function ku(){fo.point=rc}function rc(Je,yt){fo.point=sf,Ns(Ql=Je,as=yt)}function sf(Je,yt){var Gt=Je-Ql,Bt=yt-as,mr=T(Gt*Gt+Bt*Bt);of+=mr*(Ql+Je)/2,Ff+=mr*(as+yt)/2,Pf+=mr,Ns(Ql=Je,as=yt)}function is(){fo.point=Ns}function Xh(){fo.point=Zh}function Wi(){so(gu,mu)}function Zh(Je,yt){fo.point=so,Ns(gu=Ql=Je,mu=as=yt)}function so(Je,yt){var Gt=Je-Ql,Bt=yt-as,mr=T(Gt*Gt+Bt*Bt);of+=mr*(Ql+Je)/2,Ff+=mr*(as+yt)/2,Pf+=mr,mr=as*Je-Ql*yt,rh+=mr*(Ql+Je),Fh+=mr*(as+yt),pu+=mr*3,Ns(Ql=Je,as=yt)}function ei(Je){this._context=Je}ei.prototype={_radius:4.5,pointRadius:function(Je){return this._radius=Je,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Je,yt){switch(this._point){case 0:{this._context.moveTo(Je,yt),this._point=1;break}case 1:{this._context.lineTo(Je,yt);break}default:{this._context.moveTo(Je+this._radius,yt),this._context.arc(Je,yt,this._radius,0,f);break}}},result:D};var nc=r(),Wc,_l,nh,Cu,Ac,Us={point:D,lineStart:function(){Us.point=ah},lineEnd:function(){Wc&&Df(_l,nh),Us.point=D},polygonStart:function(){Wc=!0},polygonEnd:function(){Wc=null},result:function(){var Je=+nc;return nc.reset(),Je}};function ah(Je,yt){Us.point=Df,_l=Cu=Je,nh=Ac=yt}function Df(Je,yt){Cu-=Je,Ac-=yt,nc.add(T(Cu*Cu+Ac*Ac)),Cu=Je,Ac=yt}function Mc(){this._string=[]}Mc.prototype={_radius:4.5,_circle:Sc(4.5),pointRadius:function(Je){return(Je=+Je)!==this._radius&&(this._radius=Je,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Je,yt){switch(this._point){case 0:{this._string.push("M",Je,",",yt),this._point=1;break}case 1:{this._string.push("L",Je,",",yt);break}default:{this._circle==null&&(this._circle=Sc(this._radius)),this._string.push("M",Je,",",yt,this._circle);break}}},result:function(){if(this._string.length){var Je=this._string.join("");return this._string=[],Je}else return null}};function Sc(Je){return"m0,"+Je+"a"+Je+","+Je+" 0 1,1 0,"+-2*Je+"a"+Je+","+Je+" 0 1,1 0,"+2*Je+"z"}function Rf(Je,yt){var Gt=4.5,Bt,mr;function Ur(en){return en&&(typeof Gt=="function"&&mr.pointRadius(+Gt.apply(this,arguments)),B(en,Bt(mr))),mr.result()}return Ur.area=function(en){return B(en,Bt(Jl)),Jl.result()},Ur.measure=function(en){return B(en,Bt(Us)),Us.result()},Ur.bounds=function(en){return B(en,Bt(vu)),vu.result()},Ur.centroid=function(en){return B(en,Bt(fo)),fo.result()},Ur.projection=function(en){return arguments.length?(Bt=en==null?(Je=null,Ul):(Je=en).stream,Ur):Je},Ur.context=function(en){return arguments.length?(mr=en==null?(yt=null,new Mc):new ei(yt=en),typeof Gt!="function"&&mr.pointRadius(Gt),Ur):yt},Ur.pointRadius=function(en){return arguments.length?(Gt=typeof en=="function"?en:(mr.pointRadius(+en),+en),Ur):Gt},Ur.projection(Je).context(yt)}function If(Je){return{stream:eu(Je)}}function eu(Je){return function(yt){var Gt=new lf;for(var Bt in Je)Gt[Bt]=Je[Bt];return Gt.stream=yt,Gt}}function lf(){}lf.prototype={constructor:lf,point:function(Je,yt){this.stream.point(Je,yt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function tu(Je,yt,Gt){var Bt=Je.clipExtent&&Je.clipExtent();return Je.scale(150).translate([0,0]),Bt!=null&&Je.clipExtent(null),B(Gt,Je.stream(vu)),yt(vu.result()),Bt!=null&&Je.clipExtent(Bt),Je}function Ec(Je,yt,Gt){return tu(Je,function(Bt){var mr=yt[1][0]-yt[0][0],Ur=yt[1][1]-yt[0][1],en=Math.min(mr/(Bt[1][0]-Bt[0][0]),Ur/(Bt[1][1]-Bt[0][1])),mn=+yt[0][0]+(mr-en*(Bt[1][0]+Bt[0][0]))/2,An=+yt[0][1]+(Ur-en*(Bt[1][1]+Bt[0][1]))/2;Je.scale(150*en).translate([mn,An])},Gt)}function bs(Je,yt,Gt){return Ec(Je,[[0,0],yt],Gt)}function kc(Je,yt,Gt){return tu(Je,function(Bt){var mr=+yt,Ur=mr/(Bt[1][0]-Bt[0][0]),en=(mr-Ur*(Bt[1][0]+Bt[0][0]))/2,mn=-Ur*Bt[0][1];Je.scale(150*Ur).translate([en,mn])},Gt)}function Gu(Je,yt,Gt){return tu(Je,function(Bt){var mr=+yt,Ur=mr/(Bt[1][1]-Bt[0][1]),en=-Ur*Bt[0][0],mn=(mr-Ur*(Bt[1][1]+Bt[0][1]))/2;Je.scale(150*Ur).translate([en,mn])},Gt)}var po=16,uf=g(30*v);function $h(Je,yt){return+yt?ac(Je,yt):ih(Je)}function ih(Je){return eu({point:function(yt,Gt){yt=Je(yt,Gt),this.stream.point(yt[0],yt[1])}})}function ac(Je,yt){function Gt(Bt,mr,Ur,en,mn,An,Vn,tn,nn,dn,Wr,ea,Ca,Pa){var La=Vn-Bt,Va=tn-mr,na=La*La+Va*Va;if(na>4*yt&&Ca--){var zn=en+dn,Ja=mn+Wr,pi=An+ea,ji=T(zn*zn+Ja*Ja+pi*pi),Ao=A(pi/=ji),Qi=d(d(pi)-1)yt||d((La*cs+Va*Mo)/na-.5)>.3||en*dn+mn*Wr+An*ea2?ya[2]%360*v:0,cs()):[mn*h,An*h,Vn*h]},Vi.angle=function(ya){return arguments.length?(nn=ya%360*v,cs()):nn*h},Vi.reflectX=function(ya){return arguments.length?(dn=ya?-1:1,cs()):dn<0},Vi.reflectY=function(ya){return arguments.length?(Wr=ya?-1:1,cs()):Wr<0},Vi.precision=function(ya){return arguments.length?(pi=$h(ji,Ja=ya*ya),Mo()):T(Ja)},Vi.fitExtent=function(ya,ho){return Ec(Vi,ya,ho)},Vi.fitSize=function(ya,ho){return bs(Vi,ya,ho)},Vi.fitWidth=function(ya,ho){return kc(Vi,ya,ho)},Vi.fitHeight=function(ya,ho){return Gu(Vi,ya,ho)};function cs(){var ya=_s(Gt,0,0,dn,Wr,nn).apply(null,yt(Ur,en)),ho=(nn?_s:Kh)(Gt,Bt-ya[0],mr-ya[1],dn,Wr,nn);return tn=_o(mn,An,Vn),ji=Ti(yt,ho),Ao=Ti(tn,ji),pi=$h(ji,Ja),Mo()}function Mo(){return Qi=zo=null,Vi}return function(){return yt=Je.apply(this,arguments),Vi.invert=yt.invert&&Js,cs()}}function Ko(Je){var yt=0,Gt=l/3,Bt=sh(Je),mr=Bt(yt,Gt);return mr.parallels=function(Ur){return arguments.length?Bt(yt=Ur[0]*v,Gt=Ur[1]*v):[yt*h,Gt*h]},mr}function Hu(Je){var yt=g(Je);function Gt(Bt,mr){return[Bt*yt,y(mr)/yt]}return Gt.invert=function(Bt,mr){return[Bt/yt,A(mr*yt)]},Gt}function Pl(Je,yt){var Gt=y(Je),Bt=(Gt+y(yt))/2;if(d(Bt)=.12&&Pa<.234&&Ca>=-.425&&Ca<-.214?mr:Pa>=.166&&Pa<.234&&Ca>=-.214&&Ca<-.115?en:Gt).invert(dn)},tn.stream=function(dn){return Je&&yt===dn?Je:Je=zf([Gt.stream(yt=dn),mr.stream(dn),en.stream(dn)])},tn.precision=function(dn){return arguments.length?(Gt.precision(dn),mr.precision(dn),en.precision(dn),nn()):Gt.precision()},tn.scale=function(dn){return arguments.length?(Gt.scale(dn),mr.scale(dn*.35),en.scale(dn),tn.translate(Gt.translate())):Gt.scale()},tn.translate=function(dn){if(!arguments.length)return Gt.translate();var Wr=Gt.scale(),ea=+dn[0],Ca=+dn[1];return Bt=Gt.translate(dn).clipExtent([[ea-.455*Wr,Ca-.238*Wr],[ea+.455*Wr,Ca+.238*Wr]]).stream(Vn),Ur=mr.translate([ea-.307*Wr,Ca+.201*Wr]).clipExtent([[ea-.425*Wr+o,Ca+.12*Wr+o],[ea-.214*Wr-o,Ca+.234*Wr-o]]).stream(Vn),mn=en.translate([ea-.205*Wr,Ca+.212*Wr]).clipExtent([[ea-.214*Wr+o,Ca+.166*Wr+o],[ea-.115*Wr-o,Ca+.234*Wr-o]]).stream(Vn),nn()},tn.fitExtent=function(dn,Wr){return Ec(tn,dn,Wr)},tn.fitSize=function(dn,Wr){return bs(tn,dn,Wr)},tn.fitWidth=function(dn,Wr){return kc(tn,dn,Wr)},tn.fitHeight=function(dn,Wr){return Gu(tn,dn,Wr)};function nn(){return Je=yt=null,tn}return tn.scale(1070)}function yu(Je){return function(yt,Gt){var Bt=g(yt),mr=g(Gt),Ur=Je(Bt*mr);return[Ur*mr*y(yt),Ur*y(Gt)]}}function ju(Je){return function(yt,Gt){var Bt=T(yt*yt+Gt*Gt),mr=Je(Bt),Ur=y(mr),en=g(mr);return[x(yt*Ur,Bt*en),A(Bt&&Gt*Ur/Bt)]}}var Lu=yu(function(Je){return T(2/(1+Je))});Lu.invert=ju(function(Je){return 2*A(Je/2)});function Id(){return ru(Lu).scale(124.75).clipAngle(180-.001)}var Xc=yu(function(Je){return(Je=C(Je))&&Je/y(Je)});Xc.invert=ju(function(Je){return Je});function Jh(){return ru(Xc).scale(79.4188).clipAngle(180-.001)}function Vl(Je,yt){return[Je,w(p((u+yt)/2))]}Vl.invert=function(Je,yt){return[Je,2*m(M(yt))-u]};function Cc(){return Fs(Vl).scale(961/f)}function Fs(Je){var yt=ru(Je),Gt=yt.center,Bt=yt.scale,mr=yt.translate,Ur=yt.clipExtent,en=null,mn,An,Vn;yt.scale=function(nn){return arguments.length?(Bt(nn),tn()):Bt()},yt.translate=function(nn){return arguments.length?(mr(nn),tn()):mr()},yt.center=function(nn){return arguments.length?(Gt(nn),tn()):Gt()},yt.clipExtent=function(nn){return arguments.length?(nn==null?en=mn=An=Vn=null:(en=+nn[0][0],mn=+nn[0][1],An=+nn[1][0],Vn=+nn[1][1]),tn()):en==null?null:[[en,mn],[An,Vn]]};function tn(){var nn=l*Bt(),dn=yt(Hi(yt.rotate()).invert([0,0]));return Ur(en==null?[[dn[0]-nn,dn[1]-nn],[dn[0]+nn,dn[1]+nn]]:Je===Vl?[[Math.max(dn[0]-nn,en),mn],[Math.min(dn[0]+nn,An),Vn]]:[[en,Math.max(dn[1]-nn,mn)],[An,Math.min(dn[1]+nn,Vn)]])}return tn()}function oc(Je){return p((u+Je)/2)}function xd(Je,yt){var Gt=g(Je),Bt=Je===yt?y(Je):w(Gt/g(yt))/w(oc(yt)/oc(Je)),mr=Gt*k(oc(Je),Bt)/Bt;if(!Bt)return Vl;function Ur(en,mn){mr>0?mn<-u+o&&(mn=-u+o):mn>u-o&&(mn=u-o);var An=mr/k(oc(mn),Bt);return[An*y(Bt*en),mr-An*g(Bt*en)]}return Ur.invert=function(en,mn){var An=mr-mn,Vn=S(Bt)*T(en*en+An*An),tn=x(en,d(An))*S(An);return An*Bt<0&&(tn-=l*S(en)*S(An)),[tn/Bt,2*m(k(mr/Vn,1/Bt))-u]},Ur}function qf(){return Ko(xd).scale(109.5).parallels([30,30])}function Lo(Je,yt){return[Je,yt]}Lo.invert=Lo;function wl(){return ru(Lo).scale(152.63)}function Dl(Je,yt){var Gt=g(Je),Bt=Je===yt?y(Je):(Gt-g(yt))/(yt-Je),mr=Gt/Bt+Je;if(d(Bt)o&&--Bt>0);return[Je/(.8707+(Ur=Gt*Gt)*(-.131979+Ur*(-.013791+Ur*Ur*Ur*(.003971-.001529*Ur)))),Gt]};function df(){return ru(ch).scale(175.295)}function sl(Je,yt){return[g(yt)*y(Je),y(yt)]}sl.invert=ju(A);function Fu(){return ru(sl).scale(249.5).clipAngle(90+o)}function fh(Je,yt){var Gt=g(yt),Bt=1+g(Je)*Gt;return[Gt*y(Je)/Bt,y(yt)/Bt]}fh.invert=ju(function(Je){return 2*m(Je)});function ed(){return ru(fh).scale(250).clipAngle(142)}function vf(Je,yt){return[w(p((u+yt)/2)),-Je]}vf.invert=function(Je,yt){return[-yt,2*m(M(Je))-u]};function Wu(){var Je=Fs(vf),yt=Je.center,Gt=Je.rotate;return Je.center=function(Bt){return arguments.length?yt([-Bt[1],Bt[0]]):(Bt=yt(),[Bt[1],-Bt[0]])},Je.rotate=function(Bt){return arguments.length?Gt([Bt[0],Bt[1],Bt.length>2?Bt[2]+90:90]):(Bt=Gt(),[Bt[0],Bt[1],Bt[2]-90])},Gt([0,0,90]).scale(159.155)}e.geoAlbers=Yc,e.geoAlbersUsa=lh,e.geoArea=ye,e.geoAzimuthalEqualArea=Id,e.geoAzimuthalEqualAreaRaw=Lu,e.geoAzimuthalEquidistant=Jh,e.geoAzimuthalEquidistantRaw=Xc,e.geoBounds=Te,e.geoCentroid=no,e.geoCircle=Zo,e.geoClipAntimeridian=xr,e.geoClipCircle=Rn,e.geoClipExtent=Ia,e.geoClipRectangle=ba,e.geoConicConformal=qf,e.geoConicConformalRaw=xd,e.geoConicEqualArea=ic,e.geoConicEqualAreaRaw=Pl,e.geoConicEquidistant=Bf,e.geoConicEquidistantRaw=Dl,e.geoContains=Cs,e.geoDistance=ks,e.geoEqualEarth=Uf,e.geoEqualEarthRaw=Nf,e.geoEquirectangular=wl,e.geoEquirectangularRaw=Lo,e.geoGnomonic=Qh,e.geoGnomonicRaw=uh,e.geoGraticule=Kl,e.geoGraticule10=al,e.geoIdentity=hf,e.geoInterpolate=co,e.geoLength=Es,e.geoMercator=Cc,e.geoMercatorRaw=Vl,e.geoNaturalEarth1=df,e.geoNaturalEarth1Raw=ch,e.geoOrthographic=Fu,e.geoOrthographicRaw=sl,e.geoPath=Rf,e.geoProjection=ru,e.geoProjectionMutator=sh,e.geoRotation=Hi,e.geoStereographic=ed,e.geoStereographicRaw=fh,e.geoStream=B,e.geoTransform=If,e.geoTransverseMercator=Wu,e.geoTransverseMercatorRaw=vf,Object.defineProperty(e,"__esModule",{value:!0})}))});var XLe=ne((evr,YLe)=>{"use strict";var WLe={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},C9t=new Set(Object.values(WLe));YLe.exports={usaLocationAbbreviations:C9t,usaLocationList:WLe}});var ZLe={};E0(ZLe,{COUNTRIES_X:()=>L9t});var L9t,$Le=lo(()=>{"use strict";L9t=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]});var sg=ne((tvr,QLe)=>{"use strict";var F9t=Ea(),{COUNTRIES:P9t,createLookup:D9t}=ELe(),{area:R9t}=ULe(),{centroid:I9t}=GLe(),{coordAll:z9t}=R7(),{geoBounds:q9t}=O7(),B9t=F5(),_2=T1(),O9t=Lg(),N9t=m5(),N7=x4(),{usaLocationAbbreviations:U9t,usaLocationList:V9t}=XLe(),{COUNTRIES_X:G9t}=($Le(),vl(ZLe)),{lookupAlpha3:H9t}=D9t([...P9t,...G9t]),j9t={"ISO-3":B9t,"USA-states":Y9t,"country names":W9t};function W9t(e){let t=H9t(e);return t||(_2.log("Unrecognized country name: "+e+"."),!1)}function Y9t(e){e=e.trim();let t=U9t.has(e.toUpperCase())?e.toUpperCase():V9t[e.toLowerCase()];return t||(_2.log("Unrecognized US location: "+e+"."),!1)}function X9t(e,t,r){var a;if(!t||typeof t!="string")return!1;let n=j9t[e](t);if(n){let i;if(e==="USA-states"){i=[];for(let o of r)((a=o==null?void 0:o.properties)==null?void 0:a.gu)==="USA"&&i.push(o)}else i=r;for(let o of i)if(o.id===n)return o;_2.log(`Location with id ${n} does not have a matching topojson feature at this resolution.`)}return!1}var ZA=360;function DH(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function Z9t(e){var t=e.geometry,r=t.coordinates,n=e.id,a=[],i,o,s,l;switch(n==="RUS"||n==="FJI"?i=function(u){var c;if(DH(u)===null)c=u;else for(c=new Array(u.length),l=0;lc?f[h++]=[u[l][0]+ZA,u[l][1]]:l===c?(f[h++]=u[l],f[h++]=[u[l][0],-90]):f[h++]=u[l];var v=N7.tester(f);v.pts.pop(),a.push(v)}:i=function(u){a.push(N7.tester(u))},t.type){case"MultiPolygon":for(o=0;o0?d.properties.ct=K9t(d):d.properties.ct=[NaN,NaN],h.fIn=c,h.fOut=d,a.push(d)}else _2.log(["Location",h.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete n[f]}switch(r.type){case"FeatureCollection":var l=r.features;for(i=0;ia&&(a=s,r=o)}else r=t;return I9t(r).geometry.coordinates}function J9t(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){F9t.json(l,function(f,h){if(f){delete t[l];var v=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(v))}return t[l]=h,u(h)})})}function a(l){return new Promise(function(u,c){var f=0,h=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(h),u(t[l]);if(f>100)return clearInterval(h),c("Unexpected error while fetching from "+l);f++},50)})}for(var i=0;is-l);if(t.length<2)return null;let r=t.length,n=t[r-1]-t[0];if(n>=360)return null;let a=-1/0,i=-1;for(let s=0;sa&&(a=l,i=s)}let o=360-n;return a<=o?null:[t[i+1],t[i]+ZA]}function JLe([e,t]){return[e,e>t?t+ZA:t]}QLe.exports={locationToFeature:X9t,feature2polygons:Z9t,getTraceGeojson:KLe,extractTraceFeature:$9t,fetchTraceGeoData:J9t,computeBbox:Q9t,doesCrossAntiMeridian:DH,getFitboundsLonRange:eFt,unwrapLonRange:JLe,ANTIMERIDIAN_LON_SHIFT:ZA}});var RH=ne((rvr,r7e)=>{"use strict";var tFt=Ea(),rFt=li(),e7e=_a(),t7e=Md(),nFt=t7e.stylePoints,aFt=t7e.styleText;r7e.exports=function(t,r){r&&iFt(t,r)};function iFt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),nFt(n,r,e),aFt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(a){var i=tFt.select(this),o=a.trace,s=o.line||{};i.call(e7e.stroke,s.color).call(rFt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&i.call(e7e.fill,o.fillcolor)})}});var BH=ne((nvr,i7e)=>{"use strict";var n7e=Ea(),V7=Zt(),oFt=C7().getTopojsonFeatures,IH=jA(),U7=sg(),a7e=I0().findExtremes,qH=uo().BADNUM,sFt=Qv().calcMarkerSize,zH=ml(),lFt=RH();function uFt(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),a=V7.makeTraceGroups(n,r,"trace scattergeo");function i(o,s){o.lonlat[0]===qH&&n7e.select(s).remove()}a.selectAll("*").remove(),a.each(function(o){var s=n7e.select(this),l=o[0].trace;if(zH.hasLines(l)||l.fill!=="none"){var u=IH.calcTraceToLineCoords(o),c=l.fill!=="none"?IH.makePolygon(u):IH.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}zH.hasMarkers(l)&&s.selectAll("path.point").data(V7.identity).enter().append("path").classed("point",!0).each(function(f){i(f,this)}),zH.hasText(l)&&s.selectAll("g").data(V7.identity).enter().append("g").append("text").each(function(f){i(f,this)}),lFt(e,o)})}function cFt(e,t){var r=e[0].trace,n=t[r.geo],a=n._subplot,i=r._length,o,s;if(V7.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?U7.extractTraceFeature(e):oFt(r,a.topojson);for(o=0;o{"use strict";var fFt=cu(),hFt=uo().BADNUM,dFt=y_(),vFt=Zt().fillText,pFt=rw();o7e.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(E){var M=E.lonlat;if(M[0]===hFt||u(M))return 1/0;var w=c(M),k=c([r,n]),y=Math.abs(w[0]-k[0]),S=Math.abs(w[1]-k[1]),T=Math.max(3,E.mrc||0);return Math.max(Math.sqrt(y*y+S*S)-T,1-3/T)}if(fFt.getClosest(a,f,t),t.index!==!1){var h=a[t.index],v=h.lonlat,d=[o.c2p(v),s.c2p(v)],m=h.mrc||1;t.x0=d[0]-m,t.x1=d[0]+m,t.y0=d[1]-m,t.y1=d[1]+m,t.loc=h.loc,t.lon=v[0],t.lat=v[1];var x={};x[i.geo]={_subplot:l};var g=i._module.formatLabels(h,i,x);return t.lonLabel=g.lonLabel,t.latLabel=g.latLabel,t.color=dFt(i,h),t.extraText=gFt(i,h,t,a[0].t.labels),t.hovertemplate=i.hovertemplate,[t]}};function gFt(e,t,r,n){if(e.hovertemplate)return;var a=t.hi||e.hoverinfo,i=a==="all"?pFt.hoverinfo.flags:a.split("+"),o=i.indexOf("location")!==-1&&Array.isArray(e.locations),s=i.indexOf("lon")!==-1,l=i.indexOf("lat")!==-1,u=i.indexOf("text")!==-1,c=[];function f(h){return h+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&vFt(t,e,c),c.join("
")}});var u7e=ne((ivr,l7e)=>{"use strict";l7e.exports=function(t,r,n,a,i){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=a[i];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var h7e=ne((ovr,f7e)=>{"use strict";var c7e=ml(),mFt=uo().BADNUM;f7e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l,u,c,f,h,v=!c7e.hasMarkers(s)&&!c7e.hasText(s);if(v)return[];if(r===!1)for(h=0;h{(function(e,t){typeof G7=="object"&&typeof d7e!="undefined"?t(G7,O7(),XA()):t(e.d3=e.d3||{},e.d3,e.d3)})(G7,(function(e,t,r){"use strict";var n=Math.abs,a=Math.atan,i=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,h=Math.pow,v=Math.round,d=Math.sign||function(Q){return Q>0?1:Q<0?-1:0},m=Math.sin,x=Math.tan,g=1e-6,E=1e-12,M=Math.PI,w=M/2,k=M/4,y=Math.SQRT1_2,S=q(2),T=q(M),p=M*2,C=180/M,A=M/180;function P(Q){return Q?Q/Math.sin(Q):1}function D(Q){return Q>1?w:Q<-1?-w:Math.asin(Q)}function z(Q){return Q>1?0:Q<-1?M:Math.acos(Q)}function q(Q){return Q>0?Math.sqrt(Q):0}function U(Q){return Q=s(2*Q),(Q-1)/(Q+1)}function O(Q){return(s(Q)-s(-Q))/2}function R(Q){return(s(Q)+s(-Q))/2}function B(Q){return u(Q+q(Q*Q+1))}function Y(Q){return u(Q+q(Q*Q-1))}function X(Q){var ae=x(Q/2),ve=2*u(o(Q/2))/(ae*ae);function be(De,Se){var Be=o(De),ut=o(Se),gt=m(Se),Mt=ut*Be,Ft=-((1-Mt?u((1+Mt)/2)/(1-Mt):-.5)+ve/(1+Mt));return[Ft*ut*m(De),Ft*gt]}return be.invert=function(De,Se){var Be=q(De*De+Se*Se),ut=-Q/2,gt=50,Mt;if(!Be)return[0,0];do{var Ft=ut/2,Ot=o(Ft),er=m(Ft),sr=er/Ot,wr=-u(n(Ot));ut-=Mt=(2/sr*wr-ve*sr-Be)/(-wr/(er*er)+1-ve/(2*Ot*Ot))*(Ot<0?.7:1)}while(n(Mt)>g&&--gt>0);var Gr=m(ut);return[i(De*Gr,Be*o(ut)),D(Se*Gr/Be)]},be}function te(){var Q=w,ae=t.geoProjectionMutator(X),ve=ae(Q);return ve.radius=function(be){return arguments.length?ae(Q=be*A):Q*C},ve.scale(179.976).clipAngle(147)}function se(Q,ae){var ve=o(ae),be=P(z(ve*o(Q/=2)));return[2*ve*m(Q)*be,m(ae)*be]}se.invert=function(Q,ae){if(!(Q*Q+4*ae*ae>M*M+g)){var ve=Q,be=ae,De=25;do{var Se=m(ve),Be=m(ve/2),ut=o(ve/2),gt=m(be),Mt=o(be),Ft=m(2*be),Ot=gt*gt,er=Mt*Mt,sr=Be*Be,wr=1-er*ut*ut,Gr=wr?z(Mt*ut)*q(pn=1/wr):pn=0,pn,cn=2*Gr*Mt*Be-Q,kn=Gr*gt-ae,ta=pn*(er*sr+Gr*Mt*ut*Ot),ka=pn*(.5*Se*Ft-Gr*2*gt*Be),va=pn*.25*(Ft*Be-Gr*gt*er*Se),Xa=pn*(Ot*ut+Gr*sr*Mt),Ai=ka*va-Xa*ta;if(!Ai)break;var di=(kn*ka-cn*Xa)/Ai,xo=(cn*va-kn*ta)/Ai;ve-=di,be-=xo}while((n(di)>g||n(xo)>g)&&--De>0);return[ve,be]}};function ue(){return t.geoProjection(se).scale(152.63)}function re(Q){var ae=m(Q),ve=o(Q),be=Q>=0?1:-1,De=x(be*Q),Se=(1+ae-ve)/2;function Be(ut,gt){var Mt=o(gt),Ft=o(ut/=2);return[(1+Mt)*m(ut),(be*gt>-i(Ft,De)-.001?0:-be*10)+Se+m(gt)*ve-(1+Mt)*ae*Ft]}return Be.invert=function(ut,gt){var Mt=0,Ft=0,Ot=50;do{var er=o(Mt),sr=m(Mt),wr=o(Ft),Gr=m(Ft),pn=1+wr,cn=pn*sr-ut,kn=Se+Gr*ve-pn*ae*er-gt,ta=pn*er/2,ka=-sr*Gr,va=ae*pn*sr/2,Xa=ve*wr+ae*er*Gr,Ai=ka*va-Xa*ta,di=(kn*ka-cn*Xa)/Ai/2,xo=(cn*va-kn*ta)/Ai;n(xo)>2&&(xo/=2),Mt-=di,Ft-=xo}while((n(di)>g||n(xo)>g)&&--Ot>0);return be*Ft>-i(o(Mt),De)-.001?[Mt*2,Ft]:null},Be}function j(){var Q=20*A,ae=Q>=0?1:-1,ve=x(ae*Q),be=t.geoProjectionMutator(re),De=be(Q),Se=De.stream;return De.parallel=function(Be){return arguments.length?(ve=x((ae=(Q=Be*A)>=0?1:-1)*Q),be(Q)):Q*C},De.stream=function(Be){var ut=De.rotate(),gt=Se(Be),Mt=(De.rotate([0,0]),Se(Be)),Ft=De.precision();return De.rotate(ut),gt.sphere=function(){Mt.polygonStart(),Mt.lineStart();for(var Ot=ae*-180;ae*Ot<180;Ot+=ae*90)Mt.point(Ot,ae*90);if(Q)for(;ae*(Ot-=3*ae*Ft)>=-180;)Mt.point(Ot,ae*-i(o(Ot*A/2),ve)*C);Mt.lineEnd(),Mt.polygonEnd()},gt},De.scale(218.695).center([0,28.0974])}function fe(Q,ae){var ve=x(ae/2),be=q(1-ve*ve),De=1+be*o(Q/=2),Se=m(Q)*be/De,Be=ve/De,ut=Se*Se,gt=Be*Be;return[4/3*Se*(3+ut-3*gt),4/3*Be*(3+3*ut-gt)]}fe.invert=function(Q,ae){if(Q*=3/8,ae*=3/8,!Q&&n(ae)>1)return null;var ve=Q*Q,be=ae*ae,De=1+ve+be,Se=q((De-q(De*De-4*ae*ae))/2),Be=D(Se)/3,ut=Se?Y(n(ae/Se))/3:B(n(Q))/3,gt=o(Be),Mt=R(ut),Ft=Mt*Mt-gt*gt;return[d(Q)*2*i(O(ut)*gt,.25-Ft),d(ae)*2*i(Mt*m(Be),.25+Ft)]};function ce(){return t.geoProjection(fe).scale(66.1603)}var oe=q(8),we=u(1+S);function he(Q,ae){var ve=n(ae);return veE&&--be>0);return[Q/(o(ve)*(oe-1/m(ve))),d(ae)*ve]};function ye(){return t.geoProjection(he).scale(112.314)}function Pe(Q){var ae=2*M/Q;function ve(be,De){var Se=t.geoAzimuthalEquidistantRaw(be,De);if(n(be)>w){var Be=i(Se[1],Se[0]),ut=q(Se[0]*Se[0]+Se[1]*Se[1]),gt=ae*v((Be-w)/ae)+w,Mt=i(m(Be-=gt),2-o(Be));Be=gt+D(M/ut*m(Mt))-Mt,Se[0]=ut*o(Be),Se[1]=ut*m(Be)}return Se}return ve.invert=function(be,De){var Se=q(be*be+De*De);if(Se>w){var Be=i(De,be),ut=ae*v((Be-w)/ae)+w,gt=Be>ut?-1:1,Mt=Se*o(ut-Be),Ft=1/x(gt*z((Mt-M)/q(M*(M-2*Mt)+Se*Se)));Be=ut+2*a((Ft+gt*q(Ft*Ft-3))/3),be=Se*o(Be),De=Se*m(Be)}return t.geoAzimuthalEquidistantRaw.invert(be,De)},ve}function le(){var Q=5,ae=t.geoProjectionMutator(Pe),ve=ae(Q),be=ve.stream,De=.01,Se=-o(De*A),Be=m(De*A);return ve.lobes=function(ut){return arguments.length?ae(Q=+ut):Q},ve.stream=function(ut){var gt=ve.rotate(),Mt=be(ut),Ft=(ve.rotate([0,0]),be(ut));return ve.rotate(gt),Mt.sphere=function(){Ft.polygonStart(),Ft.lineStart();for(var Ot=0,er=360/Q,sr=2*M/Q,wr=90-180/Q,Gr=w;Ot0&&n(De)>g);return be<0?NaN:ve}function Oe(Q,ae,ve){return ae===void 0&&(ae=40),ve===void 0&&(ve=E),function(be,De,Se,Be){var ut,gt,Mt;Se=Se===void 0?0:+Se,Be=Be===void 0?0:+Be;for(var Ft=0;Ftut){Se-=gt/=2,Be-=Mt/=2;continue}ut=wr;var Gr=(Se>0?-1:1)*ve,pn=(Be>0?-1:1)*ve,cn=Q(Se+Gr,Be),kn=Q(Se,Be+pn),ta=(cn[0]-Ot[0])/Gr,ka=(cn[1]-Ot[1])/Gr,va=(kn[0]-Ot[0])/pn,Xa=(kn[1]-Ot[1])/pn,Ai=Xa*ta-ka*va,di=(n(Ai)<.5?.5:1)/Ai;if(gt=(sr*va-er*Xa)*di,Mt=(er*ka-sr*ta)*di,Se+=gt,Be+=Mt,n(gt)0&&(ut[1]*=1+gt/1.5*ut[0]*ut[0]),ut}return be.invert=Oe(be),be}function mt(){return t.geoProjection(qe()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function lt(Q,ae){var ve=Q*m(ae),be=30,De;do ae-=De=(ae+m(ae)-ve)/(1+o(ae));while(n(De)>g&&--be>0);return ae/2}function Ie(Q,ae,ve){function be(De,Se){return[Q*De*o(Se=lt(ve,Se)),ae*m(Se)]}return be.invert=function(De,Se){return Se=D(Se/ae),[De/(Q*o(Se)),D((2*Se+m(2*Se))/ve)]},be}var de=Ie(S/w,S,M);function Ee(){return t.geoProjection(de).scale(169.529)}var Ue=2.00276,ge=1.11072;function Ge(Q,ae){var ve=lt(M,ae);return[Ue*Q/(1/o(ae)+ge/o(ve)),(ae+S*m(ve))/Ue]}Ge.invert=function(Q,ae){var ve=Ue*ae,be=ae<0?-k:k,De=25,Se,Be;do Be=ve-S*m(be),be-=Se=(m(2*be)+2*be-M*m(Be))/(2*o(2*be)+2+M*o(Be)*S*o(be));while(n(Se)>g&&--De>0);return Be=ve-S*m(be),[Q*(1/o(Be)+ge/o(be))/Ue,Be]};function tt(){return t.geoProjection(Ge).scale(160.857)}function ft(Q){var ae=0,ve=t.geoProjectionMutator(Q),be=ve(ae);return be.parallel=function(De){return arguments.length?ve(ae=De*A):ae*C},be}function He(Q,ae){return[Q*o(ae),ae]}He.invert=function(Q,ae){return[Q/o(ae),ae]};function Qe(){return t.geoProjection(He).scale(152.63)}function We(Q){if(!Q)return He;var ae=1/x(Q);function ve(be,De){var Se=ae+Q-De,Be=Se&&be*o(De)/Se;return[Se*m(Be),ae-Se*o(Be)]}return ve.invert=function(be,De){var Se=q(be*be+(De=ae-De)*De),Be=ae+Q-Se;return[Se/o(Be)*i(be,De),Be]},ve}function pt(){return ft(We).scale(123.082).center([0,26.1441]).parallel(45)}function kt(Q){function ae(ve,be){var De=w-be,Se=De&&ve*Q*m(De)/De;return[De*m(Se)/Q,w-De*o(Se)]}return ae.invert=function(ve,be){var De=ve*Q,Se=w-be,Be=q(De*De+Se*Se),ut=i(De,Se);return[(Be?Be/m(Be):1)*ut/Q,w-Be]},ae}function qt(){var Q=.5,ae=t.geoProjectionMutator(kt),ve=ae(Q);return ve.fraction=function(be){return arguments.length?ae(Q=+be):Q},ve.scale(158.837)}var Wt=Ie(1,4/M,M);function _r(){return t.geoProjection(Wt).scale(152.63)}function tr(Q,ae,ve,be,De,Se){var Be=o(Se),ut;if(n(Q)>1||n(Se)>1)ut=z(ve*De+ae*be*Be);else{var gt=m(Q/2),Mt=m(Se/2);ut=2*D(q(gt*gt+ae*be*Mt*Mt))}return n(ut)>g?[ut,i(be*m(Se),ae*De-ve*be*Be)]:[0,0]}function lr(Q,ae,ve){return z((Q*Q+ae*ae-ve*ve)/(2*Q*ae))}function Ye(Q){return Q-2*M*l((Q+M)/(2*M))}function Te(Q,ae,ve){for(var be=[[Q[0],Q[1],m(Q[1]),o(Q[1])],[ae[0],ae[1],m(ae[1]),o(ae[1])],[ve[0],ve[1],m(ve[1]),o(ve[1])]],De=be[2],Se,Be=0;Be<3;++Be,De=Se)Se=be[Be],De.v=tr(Se[1]-De[1],De[3],De[2],Se[3],Se[2],Se[0]-De[0]),De.point=[0,0];var ut=lr(be[0].v[0],be[2].v[0],be[1].v[0]),gt=lr(be[0].v[0],be[1].v[0],be[2].v[0]),Mt=M-ut;be[2].point[1]=0,be[0].point[0]=-(be[1].point[0]=be[0].v[0]/2);var Ft=[be[2].point[0]=be[0].point[0]+be[2].v[0]*o(ut),2*(be[0].point[1]=be[1].point[1]=be[2].v[0]*m(ut))];function Ot(er,sr){var wr=m(sr),Gr=o(sr),pn=new Array(3),cn;for(cn=0;cn<3;++cn){var kn=be[cn];if(pn[cn]=tr(sr-kn[1],kn[3],kn[2],Gr,wr,er-kn[0]),!pn[cn][0])return kn.point;pn[cn][1]=Ye(pn[cn][1]-kn.v[1])}var ta=Ft.slice();for(cn=0;cn<3;++cn){var ka=cn==2?0:cn+1,va=lr(be[cn].v[0],pn[cn][0],pn[ka][0]);pn[cn][1]<0&&(va=-va),cn?cn==1?(va=gt-va,ta[0]-=pn[cn][0]*o(va),ta[1]-=pn[cn][0]*m(va)):(va=Mt-va,ta[0]+=pn[cn][0]*o(va),ta[1]+=pn[cn][0]*m(va)):(ta[0]+=pn[cn][0]*o(va),ta[1]-=pn[cn][0]*m(va))}return ta[0]/=3,ta[1]/=3,ta}return Ot}function Fe(Q){return Q[0]*=A,Q[1]*=A,Q}function Ae(){return Re([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Re(Q,ae,ve){var be=t.geoCentroid({type:"MultiPoint",coordinates:[Q,ae,ve]}),De=[-be[0],-be[1]],Se=t.geoRotation(De),Be=Te(Fe(Se(Q)),Fe(Se(ae)),Fe(Se(ve)));Be.invert=Oe(Be);var ut=t.geoProjection(Be).rotate(De),gt=ut.center;return delete ut.rotate,ut.center=function(Mt){return arguments.length?gt(Se(Mt)):Se.invert(gt())},ut.clipAngle(90)}function Ze(Q,ae){var ve=q(1-m(ae));return[2/T*Q*ve,T*(1-ve)]}Ze.invert=function(Q,ae){var ve=(ve=ae/T-1)*ve;return[ve>0?Q*q(M/ve)/2:0,D(1-ve)]};function Ke(){return t.geoProjection(Ze).scale(95.6464).center([0,30])}function _t(Q){var ae=x(Q);function ve(be,De){return[be,(be?be/m(be):1)*(m(De)*o(be)-ae*o(De))]}return ve.invert=ae?function(be,De){be&&(De*=m(be)/be);var Se=o(be);return[be,2*i(q(Se*Se+ae*ae-De*De)-Se,ae-De)]}:function(be,De){return[be,D(be?De*x(be)/be:De)]},ve}function St(){return ft(_t).scale(249.828).clipAngle(90)}var Vt=q(3);function fr(Q,ae){return[Vt*Q*(2*o(2*ae/3)-1)/T,Vt*T*m(ae/3)]}fr.invert=function(Q,ae){var ve=3*D(ae/(Vt*T));return[T*Q/(Vt*(2*o(2*ve/3)-1)),ve]};function $t(){return t.geoProjection(fr).scale(156.19)}function gr(Q){var ae=o(Q);function ve(be,De){return[be*ae,m(De)/ae]}return ve.invert=function(be,De){return[be/ae,D(De*ae)]},ve}function Br(){return ft(gr).parallel(38.58).scale(195.044)}function Nr(Q){var ae=o(Q);function ve(be,De){return[be*ae,(1+ae)*x(De/2)]}return ve.invert=function(be,De){return[be/ae,a(De/(1+ae))*2]},ve}function Er(){return ft(Nr).scale(124.75)}function zr(Q,ae){var ve=q(8/(3*M));return[ve*Q*(1-n(ae)/M),ve*ae]}zr.invert=function(Q,ae){var ve=q(8/(3*M)),be=ae/ve;return[Q/(ve*(1-n(be)/M)),be]};function vn(){return t.geoProjection(zr).scale(165.664)}function Nn(Q,ae){var ve=q(4-3*m(n(ae)));return[2/q(6*M)*Q*ve,d(ae)*q(2*M/3)*(2-ve)]}Nn.invert=function(Q,ae){var ve=2-n(ae)/q(2*M/3);return[Q*q(6*M)/(2*ve),d(ae)*D((4-ve*ve)/3)]};function Xn(){return t.geoProjection(Nn).scale(165.664)}function Kn(Q,ae){var ve=q(M*(4+M));return[2/ve*Q*(1+q(1-4*ae*ae/(M*M))),4/ve*ae]}Kn.invert=function(Q,ae){var ve=q(M*(4+M))/2;return[Q*ve/(1+q(1-ae*ae*(4+M)/(4*M))),ae*ve/2]};function Qn(){return t.geoProjection(Kn).scale(180.739)}function un(Q,ae){var ve=(2+w)*m(ae);ae/=2;for(var be=0,De=1/0;be<10&&n(De)>g;be++){var Se=o(ae);ae-=De=(ae+m(ae)*(Se+2)-ve)/(2*Se*(1+Se))}return[2/q(M*(4+M))*Q*(1+o(ae)),2*q(M/(4+M))*m(ae)]}un.invert=function(Q,ae){var ve=ae*q((4+M)/M)/2,be=D(ve),De=o(be);return[Q/(2/q(M*(4+M))*(1+De)),D((be+ve*(De+2))/(2+w))]};function aa(){return t.geoProjection(un).scale(180.739)}function da(Q,ae){return[Q*(1+o(ae))/q(2+M),2*ae/q(2+M)]}da.invert=function(Q,ae){var ve=q(2+M),be=ae*ve/2;return[ve*Q/(1+o(be)),be]};function ua(){return t.geoProjection(da).scale(173.044)}function qa(Q,ae){for(var ve=(1+w)*m(ae),be=0,De=1/0;be<10&&n(De)>g;be++)ae-=De=(ae+m(ae)-ve)/(1+o(ae));return ve=q(2+M),[Q*(1+o(ae))/ve,2*ae/ve]}qa.invert=function(Q,ae){var ve=1+w,be=q(ve/2);return[Q*2*be/(1+o(ae*=be)),D((ae+m(ae))/ve)]};function ii(){return t.geoProjection(qa).scale(173.044)}var pa=3+2*S;function no(Q,ae){var ve=m(Q/=2),be=o(Q),De=q(o(ae)),Se=o(ae/=2),Be=m(ae)/(Se+S*be*De),ut=q(2/(1+Be*Be)),gt=q((S*Se+(be+ve)*De)/(S*Se+(be-ve)*De));return[pa*(ut*(gt-1/gt)-2*u(gt)),pa*(ut*Be*(gt+1/gt)-2*a(Be))]}no.invert=function(Q,ae){if(!(Se=fe.invert(Q/1.2,ae*1.065)))return null;var ve=Se[0],be=Se[1],De=20,Se;Q/=pa,ae/=pa;do{var Be=ve/2,ut=be/2,gt=m(Be),Mt=o(Be),Ft=m(ut),Ot=o(ut),er=o(be),sr=q(er),wr=Ft/(Ot+S*Mt*sr),Gr=wr*wr,pn=q(2/(1+Gr)),cn=S*Ot+(Mt+gt)*sr,kn=S*Ot+(Mt-gt)*sr,ta=cn/kn,ka=q(ta),va=ka-1/ka,Xa=ka+1/ka,Ai=pn*va-2*u(ka)-Q,di=pn*wr*Xa-2*a(wr)-ae,xo=Ft&&y*sr*gt*Gr/Ft,Xi=(S*Mt*Ot+sr)/(2*(Ot+S*Mt*sr)*(Ot+S*Mt*sr)*sr),Wo=-.5*wr*pn*pn*pn,fs=Wo*xo,ws=Wo*Xi,qo=(qo=2*Ot+S*sr*(Mt-gt))*qo*ka,Jo=(S*Mt*Ot*sr+er)/qo,Tl=-(S*gt*Ft)/(sr*qo),bu=va*fs-2*Jo/ka+pn*(Jo+Jo/ta),Gl=va*ws-2*Tl/ka+pn*(Tl+Tl/ta),zs=wr*Xa*fs-2*xo/(1+Gr)+pn*Xa*xo+pn*wr*(Jo-Jo/ta),Du=wr*Xa*ws-2*Xi/(1+Gr)+pn*Xa*Xi+pn*wr*(Tl-Tl/ta),_u=Gl*zs-Du*bu;if(!_u)break;var Qs=(di*Gl-Ai*Du)/_u,Al=(Ai*zs-di*bu)/_u;ve-=Qs,be=c(-w,f(w,be-Al))}while((n(Qs)>g||n(Al)>g)&&--De>0);return n(n(be)-w)be){var Ot=q(Ft),er=i(Mt,gt),sr=ve*v(er/ve),wr=er-sr,Gr=Q*o(wr),pn=(Q*m(wr)-wr*m(Gr))/(w-Gr),cn=yo(wr,pn),kn=(M-Q)/oo(cn,Gr,M);gt=Ot;var ta=50,ka;do gt-=ka=(Q+oo(cn,Gr,gt)*kn-Ot)/(cn(gt)*kn);while(n(ka)>g&&--ta>0);Mt=wr*m(gt),gtbe){var gt=q(ut),Mt=i(Be,Se),Ft=ve*v(Mt/ve),Ot=Mt-Ft;Se=gt*o(Ot),Be=gt*m(Ot);for(var er=Se-w,sr=m(Se),wr=Be/sr,Gr=Seg||n(wr)>g)&&--Gr>0);return[Ot,er]},gt}var Oa=Ni(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function xi(){return t.geoProjection(Oa).scale(149.995)}var Pi=Ni(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function ia(){return t.geoProjection(Pi).scale(153.93)}var rt=Ni(5/6*M,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Xt(){return t.geoProjection(rt).scale(130.945)}function xr(Q,ae){var ve=Q*Q,be=ae*ae;return[Q*(1-.162388*be)*(.87-952426e-9*ve*ve),ae*(1+be/12)]}xr.invert=function(Q,ae){var ve=Q,be=ae,De=50,Se;do{var Be=be*be;be-=Se=(be*(1+Be/12)-ae)/(1+Be/4)}while(n(Se)>g&&--De>0);De=50,Q/=1-.162388*Be;do{var ut=(ut=ve*ve)*ut;ve-=Se=(ve*(.87-952426e-9*ut)-Q)/(.87-.00476213*ut)}while(n(Se)>g&&--De>0);return[ve,be]};function Fr(){return t.geoProjection(xr).scale(131.747)}var xn=Ni(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Mn(){return t.geoProjection(xn).scale(131.087)}function Rn(Q){var ae=Q(w,0)[0]-Q(-w,0)[0];function ve(be,De){var Se=be>0?-.5:.5,Be=Q(be+Se*M,De);return Be[0]-=Se*ae,Be}return Q.invert&&(ve.invert=function(be,De){var Se=be>0?-.5:.5,Be=Q.invert(be+Se*ae,De),ut=Be[0]-Se*M;return ut<-M?ut+=2*M:ut>M&&(ut-=2*M),Be[0]=ut,Be}),ve}function on(Q,ae){var ve=d(Q),be=d(ae),De=o(ae),Se=o(Q)*De,Be=m(Q)*De,ut=m(be*ae);Q=n(i(Be,ut)),ae=D(Se),n(Q-w)>g&&(Q%=w);var gt=En(Q>M/4?w-Q:Q,ae);return Q>M/4&&(ut=gt[0],gt[0]=-gt[1],gt[1]=-ut),gt[0]*=ve,gt[1]*=-be,gt}on.invert=function(Q,ae){n(Q)>1&&(Q=d(Q)*2-Q),n(ae)>1&&(ae=d(ae)*2-ae);var ve=d(Q),be=d(ae),De=-ve*Q,Se=-be*ae,Be=Se/De<1,ut=Aa(Be?Se:De,Be?De:Se),gt=ut[0],Mt=ut[1],Ft=o(Mt);return Be&&(gt=-w-gt),[ve*(i(m(gt)*Ft,-m(Mt))+M),be*D(o(gt)*Ft)]};function En(Q,ae){if(ae===w)return[0,0];var ve=m(ae),be=ve*ve,De=be*be,Se=1+De,Be=1+3*De,ut=1-De,gt=D(1/q(Se)),Mt=ut+be*Se*gt,Ft=(1-ve)/Mt,Ot=q(Ft),er=Ft*Se,sr=q(er),wr=Ot*ut,Gr,pn;if(Q===0)return[0,-(wr+be*sr)];var cn=o(ae),kn=1/cn,ta=2*ve*cn,ka=(-3*be+gt*Be)*ta,va=(-Mt*cn-(1-ve)*ka)/(Mt*Mt),Xa=.5*va/Ot,Ai=ut*Xa-2*be*Ot*ta,di=be*Se*va+Ft*Be*ta,xo=-kn*ta,Xi=-kn*di,Wo=-2*kn*Ai,fs=4*Q/M,ws;if(Q>.222*M||ae.175*M){if(Gr=(wr+be*q(er*(1+De)-wr*wr))/(1+De),Q>M/4)return[Gr,Gr];var qo=Gr,Jo=.5*Gr;Gr=.5*(Jo+qo),pn=50;do{var Tl=q(er-Gr*Gr),bu=Gr*(Wo+xo*Tl)+Xi*D(Gr/sr)-fs;if(!bu)break;bu<0?Jo=Gr:qo=Gr,Gr=.5*(Jo+qo)}while(n(qo-Jo)>g&&--pn>0)}else{Gr=g,pn=25;do{var Gl=Gr*Gr,zs=q(er-Gl),Du=Wo+xo*zs,_u=Gr*Du+Xi*D(Gr/sr)-fs,Qs=Du+(Xi-xo*Gl)/zs;Gr-=ws=zs?_u/Qs:0}while(n(ws)>g&&--pn>0)}return[Gr,-wr-be*q(er-Gr*Gr)]}function Aa(Q,ae){for(var ve=0,be=1,De=.5,Se=50;;){var Be=De*De,ut=q(De),gt=D(1/q(1+Be)),Mt=1-Be+De*(1+Be)*gt,Ft=(1-ut)/Mt,Ot=q(Ft),er=Ft*(1+Be),sr=Ot*(1-Be),wr=er-Q*Q,Gr=q(wr),pn=ae+sr+De*Gr;if(n(be-ve)0?ve=De:be=De,De=.5*(ve+be)}if(!Se)return null;var cn=D(ut),kn=o(cn),ta=1/kn,ka=2*ut*kn,va=(-3*De+gt*(1+3*Be))*ka,Xa=(-Mt*kn-(1-ut)*va)/(Mt*Mt),Ai=.5*Xa/Ot,di=(1-Be)*Ai-2*De*Ot*ka,xo=-2*ta*di,Xi=-ta*ka,Wo=-ta*(De*(1+Be)*Xa+Ft*(1+3*Be)*ka);return[M/4*(Q*(xo+Xi*Gr)+Wo*D(Q/q(er))),cn]}function ba(){return t.geoProjection(Rn(on)).scale(239.75)}function Ia(Q,ae,ve){var be,De,Se;return Q?(be=hi(Q,ve),ae?(De=hi(ae,1-ve),Se=De[1]*De[1]+ve*be[0]*be[0]*De[0]*De[0],[[be[0]*De[2]/Se,be[1]*be[2]*De[0]*De[1]/Se],[be[1]*De[1]/Se,-be[0]*be[2]*De[0]*De[2]/Se],[be[2]*De[1]*De[2]/Se,-ve*be[0]*be[1]*De[0]/Se]]):[[be[0],0],[be[1],0],[be[2],0]]):(De=hi(ae,1-ve),[[0,De[0]/De[1]],[1/De[1],0],[De[2]/De[1],0]])}function hi(Q,ae){var ve,be,De,Se,Be;if(ae=1-g)return ve=(1-ae)/4,be=R(Q),Se=U(Q),De=1/be,Be=be*O(Q),[Se+ve*(Be-Q)/(be*be),De-ve*Se*De*(Be-Q),De+ve*Se*De*(Be+Q),2*a(s(Q))-w+ve*(Be-Q)/be];var ut=[1,0,0,0,0,0,0,0,0],gt=[q(ae),0,0,0,0,0,0,0,0],Mt=0;for(be=q(1-ae),Be=1;n(gt[Mt]/ut[Mt])>g&&Mt<8;)ve=ut[Mt++],gt[Mt]=(ve-be)/2,ut[Mt]=(ve+be)/2,be=q(ve*be),Be*=2;De=Be*ut[Mt]*Q;do Se=gt[Mt]*m(be=De)/ut[Mt],De=(D(Se)+De)/2;while(--Mt);return[m(De),Se=o(De),Se/o(De-be),De]}function ki(Q,ae,ve){var be=n(Q),De=n(ae),Se=O(De);if(be){var Be=1/m(be),ut=1/(x(be)*x(be)),gt=-(ut+ve*(Se*Se*Be*Be)-1+ve),Mt=(ve-1)*ut,Ft=(-gt+q(gt*gt-4*Mt))/2;return[ui(a(1/q(Ft)),ve)*d(Q),ui(a(q((Ft/ut-1)/ve)),1-ve)*d(ae)]}return[0,ui(a(Se),1-ve)*d(ae)]}function ui(Q,ae){if(!ae)return Q;if(ae===1)return u(x(Q/2+k));for(var ve=1,be=q(1-ae),De=q(ae),Se=0;n(De)>g;Se++){if(Q%M){var Be=a(be*x(Q)/ve);Be<0&&(Be+=M),Q+=Be+~~(Q/M)*M}else Q+=Q;De=(ve+be)/2,be=q(ve*be),De=((ve=De)-be)/2}return Q/(h(2,Se)*ve)}function Mi(Q,ae){var ve=(S-1)/(S+1),be=q(1-ve*ve),De=ui(w,be*be),Se=-1,Be=u(x(M/4+n(ae)/2)),ut=s(Se*Be)/q(ve),gt=_i(ut*o(Se*Q),ut*m(Se*Q)),Mt=ki(gt[0],gt[1],be*be);return[-Mt[1],(ae>=0?1:-1)*(.5*De-Mt[0])]}function _i(Q,ae){var ve=Q*Q,be=ae+1,De=1-ve-ae*ae;return[.5*((Q>=0?w:-w)-i(De,2*Q)),-.25*u(De*De+4*ve)+.5*u(be*be+ve)]}function ko(Q,ae){var ve=ae[0]*ae[0]+ae[1]*ae[1];return[(Q[0]*ae[0]+Q[1]*ae[1])/ve,(Q[1]*ae[0]-Q[0]*ae[1])/ve]}Mi.invert=function(Q,ae){var ve=(S-1)/(S+1),be=q(1-ve*ve),De=ui(w,be*be),Se=-1,Be=Ia(.5*De-ae,-Q,be*be),ut=ko(Be[0],Be[1]),gt=i(ut[1],ut[0])/Se;return[gt,2*a(s(.5/Se*u(ve*ut[0]*ut[0]+ve*ut[1]*ut[1])))-w]};function Io(){return t.geoProjection(Rn(Mi)).scale(151.496)}function $o(Q){var ae=m(Q),ve=o(Q),be=Is(Q);be.invert=Is(-Q);function De(Se,Be){var ut=be(Se,Be);Se=ut[0],Be=ut[1];var gt=m(Be),Mt=o(Be),Ft=o(Se),Ot=z(ae*gt+ve*Mt*Ft),er=m(Ot),sr=n(er)>g?Ot/er:1;return[sr*ve*m(Se),(n(Se)>w?sr:-sr)*(ae*Mt-ve*gt*Ft)]}return De.invert=function(Se,Be){var ut=q(Se*Se+Be*Be),gt=-m(ut),Mt=o(ut),Ft=ut*Mt,Ot=-Be*gt,er=ut*ae,sr=q(Ft*Ft+Ot*Ot-er*er),wr=i(Ft*er+Ot*sr,Ot*er-Ft*sr),Gr=(ut>w?-1:1)*i(Se*gt,ut*o(wr)*Mt+Be*m(wr)*gt);return be.invert(Gr,wr)},De}function Is(Q){var ae=m(Q),ve=o(Q);return function(be,De){var Se=o(De),Be=o(be)*Se,ut=m(be)*Se,gt=m(De);return[i(ut,Be*ve-gt*ae),D(gt*ve+Be*ae)]}}function Es(){var Q=0,ae=t.geoProjectionMutator($o),ve=ae(Q),be=ve.rotate,De=ve.stream,Se=t.geoCircle();return ve.parallel=function(Be){if(!arguments.length)return Q*C;var ut=ve.rotate();return ae(Q=Be*A).rotate(ut)},ve.rotate=function(Be){return arguments.length?(be.call(ve,[Be[0],Be[1]-Q*C]),Se.center([-Be[0],-Be[1]]),ve):(Be=be.call(ve),Be[1]+=Q*C,Be)},ve.stream=function(Be){return Be=De(Be),Be.sphere=function(){Be.polygonStart();var ut=.01,gt=Se.radius(90-ut)().coordinates[0],Mt=gt.length-1,Ft=-1,Ot;for(Be.lineStart();++Ft=0;)Be.point((Ot=gt[Ft])[0],Ot[1]);Be.lineEnd(),Be.polygonEnd()},Be},ve.scale(79.4187).parallel(45).clipAngle(180-.001)}var Ks=3,nl=D(1-1/Ks)*C,ks=gr(0);function us(Q){var ae=nl*A,ve=Ze(M,ae)[0]-Ze(-M,ae)[0],be=ks(0,ae)[1],De=Ze(0,ae)[1],Se=T-De,Be=p/Q,ut=4/p,gt=be+Se*Se*4/p;function Mt(Ft,Ot){var er,sr=n(Ot);if(sr>ae){var wr=f(Q-1,c(0,l((Ft+M)/Be)));Ft+=M*(Q-1)/Q-wr*Be,er=Ze(Ft,sr),er[0]=er[0]*p/ve-p*(Q-1)/(2*Q)+wr*p/Q,er[1]=be+(er[1]-De)*4*Se/p,Ot<0&&(er[1]=-er[1])}else er=ks(Ft,Ot);return er[0]*=ut,er[1]/=gt,er}return Mt.invert=function(Ft,Ot){Ft/=ut,Ot*=gt;var er=n(Ot);if(er>be){var sr=f(Q-1,c(0,l((Ft+M)/Be)));Ft=(Ft+M*(Q-1)/Q-sr*Be)*ve/p;var wr=Ze.invert(Ft,.25*(er-be)*p/Se+De);return wr[0]-=M*(Q-1)/Q-sr*Be,Ot<0&&(wr[1]=-wr[1]),wr}return ks.invert(Ft,Ot)},Mt}function xs(Q,ae){return[Q,ae&1?90-g:nl]}function Co(Q,ae){return[Q,ae&1?-90+g:-nl]}function Si(Q){return[Q[0]*(1-g),Q[1]]}function io(Q){var ae=[].concat(r.range(-180,180+Q/2,Q).map(xs),r.range(180,-180-Q/2,-Q).map(Co));return{type:"Polygon",coordinates:[Q===180?ae.map(Si):ae]}}function Bs(){var Q=4,ae=t.geoProjectionMutator(us),ve=ae(Q),be=ve.stream;return ve.lobes=function(De){return arguments.length?ae(Q=+De):Q},ve.stream=function(De){var Se=ve.rotate(),Be=be(De),ut=(ve.rotate([0,0]),be(De));return ve.rotate(Se),Be.sphere=function(){t.geoStream(io(180/Q),ut)},Be},ve.scale(239.75)}function Fl(Q){var ae=1+Q,ve=m(1/ae),be=D(ve),De=2*q(M/(Se=M+4*be*ae)),Se,Be=.5*De*(ae+q(Q*(2+Q))),ut=Q*Q,gt=ae*ae;function Mt(Ft,Ot){var er=1-m(Ot),sr,wr;if(er&&er<2){var Gr=w-Ot,pn=25,cn;do{var kn=m(Gr),ta=o(Gr),ka=be+i(kn,ae-ta),va=1+gt-2*ae*ta;Gr-=cn=(Gr-ut*be-ae*kn+va*ka-.5*er*Se)/(2*ae*kn*ka)}while(n(cn)>E&&--pn>0);sr=De*q(va),wr=Ft*ka/M}else sr=De*(Q+er),wr=Ft*be/M;return[sr*m(wr),Be-sr*o(wr)]}return Mt.invert=function(Ft,Ot){var er=Ft*Ft+(Ot-=Be)*Ot,sr=(1+gt-er/(De*De))/(2*ae),wr=z(sr),Gr=m(wr),pn=be+i(Gr,ae-sr);return[D(Ft/q(er))*M/pn,D(1-2*(wr-ut*be-ae*Gr+(1+gt-2*ae*sr)*pn)/Se)]},Mt}function Eu(){var Q=1,ae=t.geoProjectionMutator(Fl),ve=ae(Q);return ve.ratio=function(be){return arguments.length?ae(Q=+be):Q},ve.scale(167.774).center([0,18.67])}var Cs=.7109889596207567,Nl=.0528035274542;function du(Q,ae){return ae>-Cs?(Q=de(Q,ae),Q[1]+=Nl,Q):He(Q,ae)}du.invert=function(Q,ae){return ae>-Cs?de.invert(Q,ae-Nl):He.invert(Q,ae)};function Kl(){return t.geoProjection(du).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function al(Q,ae){return n(ae)>Cs?(Q=de(Q,ae),Q[1]-=ae>0?Nl:-Nl,Q):He(Q,ae)}al.invert=function(Q,ae){return n(ae)>Cs?de.invert(Q,ae+(ae>0?Nl:-Nl)):He.invert(Q,ae)};function co(){return t.geoProjection(al).scale(152.63)}function Ul(Q,ae,ve,be){var De=q(4*M/(2*ve+(1+Q-ae/2)*m(2*ve)+(Q+ae)/2*m(4*ve)+ae/2*m(6*ve))),Se=q(be*m(ve)*q((1+Q*o(2*ve)+ae*o(4*ve))/(1+Q+ae))),Be=ve*gt(1);function ut(Ot){return q(1+Q*o(2*Ot)+ae*o(4*Ot))}function gt(Ot){var er=Ot*ve;return(2*er+(1+Q-ae/2)*m(2*er)+(Q+ae)/2*m(4*er)+ae/2*m(6*er))/ve}function Mt(Ot){return ut(Ot)*m(Ot)}var Ft=function(Ot,er){var sr=ve*st(gt,Be*m(er)/ve,er/M);isNaN(sr)&&(sr=ve*d(er));var wr=De*ut(sr);return[wr*Se*Ot/M*o(sr),wr/Se*m(sr)]};return Ft.invert=function(Ot,er){var sr=st(Mt,er*Se/De);return[Ot*M/(o(sr)*De*Se*ut(sr)),D(ve*gt(sr/ve)/Be)]},ve===0&&(De=q(be/M),Ft=function(Ot,er){return[Ot*De,m(er)/De]},Ft.invert=function(Ot,er){return[Ot/De,D(er*De)]}),Ft}function Ls(){var Q=1,ae=0,ve=45*A,be=2,De=t.geoProjectionMutator(Ul),Se=De(Q,ae,ve,be);return Se.a=function(Be){return arguments.length?De(Q=+Be,ae,ve,be):Q},Se.b=function(Be){return arguments.length?De(Q,ae=+Be,ve,be):ae},Se.psiMax=function(Be){return arguments.length?De(Q,ae,ve=+Be*A,be):ve*C},Se.ratio=function(Be){return arguments.length?De(Q,ae,ve,be=+Be):be},Se.scale(180.739)}function il(Q,ae,ve,be,De,Se,Be,ut,gt,Mt,Ft){if(Ft.nanEncountered)return NaN;var Ot,er,sr,wr,Gr,pn,cn,kn,ta,ka;if(Ot=ve-ae,er=Q(ae+Ot*.25),sr=Q(ve-Ot*.25),isNaN(er)){Ft.nanEncountered=!0;return}if(isNaN(sr)){Ft.nanEncountered=!0;return}return wr=Ot*(be+4*er+De)/12,Gr=Ot*(De+4*sr+Se)/12,pn=wr+Gr,ka=(pn-Be)/15,Mt>gt?(Ft.maxDepthCount++,pn+ka):Math.abs(ka)>1;do gt[pn]>sr?Gr=pn:wr=pn,pn=wr+Gr>>1;while(pn>wr);var cn=gt[pn+1]-gt[pn];return cn&&(cn=(sr-gt[pn+1])/cn),(pn+1+cn)/Be}var Ot=2*Ft(1)/M*Se/ve,er=function(sr,wr){var Gr=Ft(n(m(wr))),pn=be(Gr)*sr;return Gr/=Ot,[pn,wr>=0?Gr:-Gr]};return er.invert=function(sr,wr){var Gr;return wr*=Ot,n(wr)<1&&(Gr=d(wr)*D(De(n(wr))*Se)),[sr/be(n(wr)),Gr]},er}function Vu(){var Q=0,ae=2.5,ve=1.183136,be=t.geoProjectionMutator(Os),De=be(Q,ae,ve);return De.alpha=function(Se){return arguments.length?be(Q=+Se,ae,ve):Q},De.k=function(Se){return arguments.length?be(Q,ae=+Se,ve):ae},De.gamma=function(Se){return arguments.length?be(Q,ae,ve=+Se):ve},De.scale(152.63)}function kf(Q,ae){return n(Q[0]-ae[0])=0;--gt)ve=Q[1][gt],be=ve[0][0],De=ve[0][1],Se=ve[1][1],Be=ve[2][0],ut=ve[2][1],ae.push(Jl([[Be-g,ut-g],[Be-g,Se+g],[be+g,Se+g],[be+g,De-g]],30));return{type:"Polygon",coordinates:[r.merge(ae)]}}function wc(Q,ae,ve){var be,De;function Se(gt,Mt){for(var Ft=Mt<0?-1:1,Ot=ae[+(Mt<0)],er=0,sr=Ot.length-1;erOt[er][2][0];++er);var wr=Q(gt-Ot[er][1][0],Mt);return wr[0]+=Q(Ot[er][1][0],Ft*Mt>Ft*Ot[er][0][1]?Ot[er][0][1]:Mt)[0],wr}ve?Se.invert=ve(Se):Q.invert&&(Se.invert=function(gt,Mt){for(var Ft=De[+(Mt<0)],Ot=ae[+(Mt<0)],er=0,sr=Ft.length;erwr&&(Gr=sr,sr=wr,wr=Gr),[[Ot,sr],[er,wr]]})}),Be):ae.map(function(Mt){return Mt.map(function(Ft){return[[Ft[0][0]*C,Ft[0][1]*C],[Ft[1][0]*C,Ft[1][1]*C],[Ft[2][0]*C,Ft[2][1]*C]]})})},ae!=null&&Be.lobes(ae),Be}var Cf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Rd(){return wc(Ge,Cf).scale(160.857)}var ol=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function af(){return wc(al,ol).scale(152.63)}var ec=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Tc(){return wc(de,ec).scale(169.529)}var vu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function jc(){return wc(de,vu).scale(169.529).rotate([20,0])}var Lf=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function tc(){return wc(du,Lf,Oe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Lh=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function of(){return wc(He,Lh).scale(152.63).rotate([-20,0])}function Ff(Q,ae){return[3/p*Q*q(M*M/3-ae*ae),ae]}Ff.invert=function(Q,ae){return[p/3*Q/q(M*M/3-ae*ae),ae]};function Pf(){return t.geoProjection(Ff).scale(158.837)}function rh(Q){function ae(ve,be){if(n(n(be)-w)2)return null;ve/=2,be/=2;var Se=ve*ve,Be=be*be,ut=2*be/(1+Se+Be);return ut=h((1+ut)/(1-ut),1/Q),[i(2*ve,1-Se-Be)/Q,D((ut-1)/(ut+1))]},ae}function Fh(){var Q=.5,ae=t.geoProjectionMutator(rh),ve=ae(Q);return ve.spacing=function(be){return arguments.length?ae(Q=+be):Q},ve.scale(124.75)}var pu=M/S;function gu(Q,ae){return[Q*(1+q(o(ae)))/2,ae/(o(ae/2)*o(Q/6))]}gu.invert=function(Q,ae){var ve=n(Q),be=n(ae),De=g,Se=w;beg||n(pn)>g)&&--De>0);return De&&[ve,be]};function as(){return t.geoProjection(Ql).scale(139.98)}function fo(Q,ae){return[m(Q)/o(ae),x(ae)*o(Q)]}fo.invert=function(Q,ae){var ve=Q*Q,be=ae*ae,De=be+1,Se=ve+De,Be=Q?y*q((Se-q(Se*Se-4*ve))/ve):1/q(De);return[D(Q*Be),d(ae)*z(Be)]};function Ns(){return t.geoProjection(fo).scale(144.049).clipAngle(90-.001)}function ku(Q){var ae=o(Q),ve=x(k+Q/2);function be(De,Se){var Be=Se-Q,ut=n(Be)=0;)Ft=Q[Mt],Ot=Ft[0]+ut*(sr=Ot)-gt*er,er=Ft[1]+ut*er+gt*sr;return Ot=ut*(sr=Ot)-gt*er,er=ut*er+gt*sr,[Ot,er]}return ve.invert=function(be,De){var Se=20,Be=be,ut=De;do{for(var gt=ae,Mt=Q[gt],Ft=Mt[0],Ot=Mt[1],er=0,sr=0,wr;--gt>=0;)Mt=Q[gt],er=Ft+Be*(wr=er)-ut*sr,sr=Ot+Be*sr+ut*wr,Ft=Mt[0]+Be*(wr=Ft)-ut*Ot,Ot=Mt[1]+Be*Ot+ut*wr;er=Ft+Be*(wr=er)-ut*sr,sr=Ot+Be*sr+ut*wr,Ft=Be*(wr=Ft)-ut*Ot-be,Ot=Be*Ot+ut*wr-De;var Gr=er*er+sr*sr,pn,cn;Be-=pn=(Ft*er+Ot*sr)/Gr,ut-=cn=(Ot*er-Ft*sr)/Gr}while(n(pn)+n(cn)>g*g&&--Se>0);if(Se){var kn=q(Be*Be+ut*ut),ta=2*a(kn*.5),ka=m(ta);return[i(Be*ka,kn*o(ta)),kn?D(ut*ka/kn):0]}},ve}var Wi=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Zh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],so=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ei=[[.9245,0],[0,0],[.01943,0]],nc=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Wc(){return Us(Wi,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function _l(){return Us(Zh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function nh(){return Us(so,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Cu(){return Us(ei,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Ac(){return Us(nc,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Us(Q,ae){var ve=t.geoProjection(Xh(Q)).rotate(ae).clipAngle(90),be=t.geoRotation(ae),De=ve.center;return delete ve.rotate,ve.center=function(Se){return arguments.length?De(be(Se)):be.invert(De())},ve}var ah=q(6),Df=q(7);function Mc(Q,ae){var ve=D(7*m(ae)/(3*ah));return[ah*Q*(2*o(2*ve/3)-1)/Df,9*m(ve/3)/Df]}Mc.invert=function(Q,ae){var ve=3*D(ae*Df/9);return[Q*Df/(ah*(2*o(2*ve/3)-1)),D(m(ve)*3*ah/7)]};function Sc(){return t.geoProjection(Mc).scale(164.859)}function Rf(Q,ae){for(var ve=(1+y)*m(ae),be=ae,De=0,Se;De<25&&(be-=Se=(m(be/2)+m(be)-ve)/(.5*o(be/2)+o(be)),!(n(Se)E&&--be>0);return Se=ve*ve,Be=Se*Se,ut=Se*Be,[Q/(.84719-.13063*Se+ut*ut*(-.04515+.05494*Se-.02326*Be+.00331*ut)),ve]};function Ec(){return t.geoProjection(tu).scale(175.295)}function bs(Q,ae){return[Q*(1+o(ae))/2,2*(ae-x(ae/2))]}bs.invert=function(Q,ae){for(var ve=ae/2,be=0,De=1/0;be<10&&n(De)>g;++be){var Se=o(ae/2);ae-=De=(ae-x(ae/2)-ve)/(1-.5/(Se*Se))}return[2*Q/(1+o(ae)),ae]};function kc(){return t.geoProjection(bs).scale(152.63)}var Gu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function po(){return wc(ze(1/0),Gu).rotate([20,0]).scale(152.63)}function uf(Q,ae){var ve=m(ae),be=o(ae),De=d(Q);if(Q===0||n(ae)===w)return[0,ae];if(ae===0)return[Q,0];if(n(Q)===w)return[Q*be,w*ve];var Se=M/(2*Q)-2*Q/M,Be=2*ae/M,ut=(1-Be*Be)/(ve-Be),gt=Se*Se,Mt=ut*ut,Ft=1+gt/Mt,Ot=1+Mt/gt,er=(Se*ve/ut-Se/2)/Ft,sr=(Mt*ve/gt+ut/2)/Ot,wr=er*er+be*be/Ft,Gr=sr*sr-(Mt*ve*ve/gt+ut*ve-1)/Ot;return[w*(er+q(wr)*De),w*(sr+q(Gr<0?0:Gr)*d(-ae*Se)*De)]}uf.invert=function(Q,ae){Q/=w,ae/=w;var ve=Q*Q,be=ae*ae,De=ve+be,Se=M*M;return[Q?(De-1+q((1-De)*(1-De)+4*ve))/(2*Q)*w:0,st(function(Be){return De*(M*m(Be)-2*Be)*M+4*Be*Be*(ae-m(Be))+2*M*Be-Se*ae},0)]};function $h(){return t.geoProjection(uf).scale(127.267)}var ih=1.0148,ac=.23185,oh=-.14499,cf=.02406,Kh=ih,_s=5*ac,ru=7*oh,sh=9*cf,Ko=1.790857183;function Hu(Q,ae){var ve=ae*ae;return[Q,ae*(ih+ve*ve*(ac+ve*(oh+cf*ve)))]}Hu.invert=function(Q,ae){ae>Ko?ae=Ko:ae<-Ko&&(ae=-Ko);var ve=ae,be;do{var De=ve*ve;ve-=be=(ve*(ih+De*De*(ac+De*(oh+cf*De)))-ae)/(Kh+De*De*(_s+De*(ru+sh*De)))}while(n(be)>g);return[Q,ve]};function Pl(){return t.geoProjection(Hu).scale(139.319)}function ic(Q,ae){if(n(ae)g&&--De>0);return Be=x(be),[(n(ae)=0;)if(be=ae[ut],ve[0]===be[0]&&ve[1]===be[1]){if(Se)return[Se,ve];Se=ve}}}function Fs(Q){for(var ae=Q.length,ve=[],be=Q[ae-1],De=0;De0?[-be[0],0]:[180-be[0],180])};var ae=qf.map(function(ve){return{face:ve,project:Q(ve)}});return[-1,0,0,1,0,1,4,5].forEach(function(ve,be){var De=ae[ve];De&&(De.children||(De.children=[])).push(ae[be])}),Xc(ae[0],function(ve,be){return ae[ve<-M/2?be<0?6:4:ve<0?be<0?2:0:vebe^sr>be&&ve<(er-Mt)*(be-Ft)/(sr-Ft)+Mt&&(De=!De)}return De}function uh(Q,ae){var ve=ae.stream,be;if(!ve)throw new Error("invalid projection");switch(Q&&Q.type){case"Feature":be=hf;break;case"FeatureCollection":be=Qh;break;default:be=df;break}return be(Q,ve)}function Qh(Q,ae){return{type:"FeatureCollection",features:Q.features.map(function(ve){return hf(ve,ae)})}}function hf(Q,ae){return{type:"Feature",id:Q.id,properties:Q.properties,geometry:df(Q.geometry,ae)}}function ch(Q,ae){return{type:"GeometryCollection",geometries:Q.geometries.map(function(ve){return df(ve,ae)})}}function df(Q,ae){if(!Q)return null;if(Q.type==="GeometryCollection")return ch(Q,ae);var ve;switch(Q.type){case"Point":ve=fh;break;case"MultiPoint":ve=fh;break;case"LineString":ve=ed;break;case"MultiLineString":ve=ed;break;case"Polygon":ve=vf;break;case"MultiPolygon":ve=vf;break;case"Sphere":ve=vf;break;default:return null}return t.geoStream(Q,ae(ve)),ve.result()}var sl=[],Fu=[],fh={point:function(Q,ae){sl.push([Q,ae])},result:function(){var Q=sl.length?sl.length<2?{type:"Point",coordinates:sl[0]}:{type:"MultiPoint",coordinates:sl}:null;return sl=[],Q}},ed={lineStart:sc,point:function(Q,ae){sl.push([Q,ae])},lineEnd:function(){sl.length&&(Fu.push(sl),sl=[])},result:function(){var Q=Fu.length?Fu.length<2?{type:"LineString",coordinates:Fu[0]}:{type:"MultiLineString",coordinates:Fu}:null;return Fu=[],Q}},vf={polygonStart:sc,lineStart:sc,point:function(Q,ae){sl.push([Q,ae])},lineEnd:function(){var Q=sl.length;if(Q){do sl.push(sl[0].slice());while(++Q<4);Fu.push(sl),sl=[]}},polygonEnd:sc,result:function(){if(!Fu.length)return null;var Q=[],ae=[];return Fu.forEach(function(ve){Nf(ve)?Q.push([ve]):ae.push(ve)}),ae.forEach(function(ve){var be=ve[0];Q.some(function(De){if(Uf(De[0],be))return De.push(ve),!0})||Q.push([ve])}),Fu=[],Q.length?Q.length>1?{type:"MultiPolygon",coordinates:Q}:{type:"Polygon",coordinates:Q[0]}:null}};function Wu(Q){var ae=Q(w,0)[0]-Q(-w,0)[0];function ve(be,De){var Se=n(be)0?be-M:be+M,De),ut=(Be[0]-Be[1])*y,gt=(Be[0]+Be[1])*y;if(Se)return[ut,gt];var Mt=ae*y,Ft=ut>0^gt>0?-1:1;return[Ft*ut-d(gt)*Mt,Ft*gt-d(ut)*Mt]}return Q.invert&&(ve.invert=function(be,De){var Se=(be+De)*y,Be=(De-be)*y,ut=n(Se)<.5*ae&&n(Be)<.5*ae;if(!ut){var gt=ae*y,Mt=Se>0^Be>0?-1:1,Ft=-Mt*be+(Be>0?1:-1)*gt,Ot=-Mt*De+(Se>0?1:-1)*gt;Se=(-Ft-Ot)*y,Be=(Ft-Ot)*y}var er=Q.invert(Se,Be);return ut||(er[0]+=Se>0?M:-M),er}),t.geoProjection(ve).rotate([-90,-90,45]).clipAngle(180-.001)}function Je(){return Wu(on).scale(176.423)}function yt(){return Wu(Mi).scale(111.48)}function Gt(Q,ae){if(!(0<=(ae=+ae)&&ae<=20))throw new Error("invalid digits");function ve(Mt){var Ft=Mt.length,Ot=2,er=new Array(Ft);for(er[0]=+Mt[0].toFixed(ae),er[1]=+Mt[1].toFixed(ae);Ot2||sr[0]!=Ft[0]||sr[1]!=Ft[1])&&(Ot.push(sr),Ft=sr)}return Ot.length===1&&Mt.length>1&&Ot.push(ve(Mt[Mt.length-1])),Ot}function Se(Mt){return Mt.map(De)}function Be(Mt){if(Mt==null)return Mt;var Ft;switch(Mt.type){case"GeometryCollection":Ft={type:"GeometryCollection",geometries:Mt.geometries.map(Be)};break;case"Point":Ft={type:"Point",coordinates:ve(Mt.coordinates)};break;case"MultiPoint":Ft={type:Mt.type,coordinates:be(Mt.coordinates)};break;case"LineString":Ft={type:Mt.type,coordinates:De(Mt.coordinates)};break;case"MultiLineString":case"Polygon":Ft={type:Mt.type,coordinates:Se(Mt.coordinates)};break;case"MultiPolygon":Ft={type:"MultiPolygon",coordinates:Mt.coordinates.map(Se)};break;default:return Mt}return Mt.bbox!=null&&(Ft.bbox=Mt.bbox),Ft}function ut(Mt){var Ft={type:"Feature",properties:Mt.properties,geometry:Be(Mt.geometry)};return Mt.id!=null&&(Ft.id=Mt.id),Mt.bbox!=null&&(Ft.bbox=Mt.bbox),Ft}if(Q!=null)switch(Q.type){case"Feature":return ut(Q);case"FeatureCollection":{var gt={type:"FeatureCollection",features:Q.features.map(ut)};return Q.bbox!=null&&(gt.bbox=Q.bbox),gt}default:return Be(Q)}return Q}function Bt(Q){var ae=m(Q);function ve(be,De){var Se=ae?x(be*ae/2)/ae:be/2;if(!De)return[2*Se,-Q];var Be=2*a(Se*m(De)),ut=1/x(De);return[m(Be)*ut,De+(1-o(Be))*ut-Q]}return ve.invert=function(be,De){if(n(De+=Q)g&&--ut>0);var er=be*(Mt=x(Be)),sr=x(n(De)0?w:-w)*(gt+De*(Ft-Be)/2+De*De*(Ft-2*gt+Be)/2)]}en.invert=function(Q,ae){var ve=ae/w,be=ve*90,De=f(18,n(be/5)),Se=c(0,l(De));do{var Be=Ur[Se][1],ut=Ur[Se+1][1],gt=Ur[f(19,Se+2)][1],Mt=gt-Be,Ft=gt-2*ut+Be,Ot=2*(n(ve)-ut)/Mt,er=Ft/Mt,sr=Ot*(1-er*Ot*(1-2*er*Ot));if(sr>=0||Se===1){be=(ae>=0?5:-5)*(sr+De);var wr=50,Gr;do De=f(18,n(be)/5),Se=l(De),sr=De-Se,Be=Ur[Se][1],ut=Ur[Se+1][1],gt=Ur[f(19,Se+2)][1],be-=(Gr=(ae>=0?w:-w)*(ut+sr*(gt-Be)/2+sr*sr*(gt-2*ut+Be)/2)-ae)*C;while(n(Gr)>E&&--wr>0);break}}while(--Se>=0);var pn=Ur[Se][0],cn=Ur[Se+1][0],kn=Ur[f(19,Se+2)][0];return[Q/(cn+sr*(kn-pn)/2+sr*sr*(kn-2*cn+pn)/2),be*A]};function mn(){return t.geoProjection(en).scale(152.63)}function An(Q){function ae(ve,be){var De=o(be),Se=(Q-1)/(Q-De*o(ve));return[Se*De*m(ve),Se*m(be)]}return ae.invert=function(ve,be){var De=ve*ve+be*be,Se=q(De),Be=(Q-q(1-De*(Q+1)/(Q-1)))/((Q-1)/Se+Se/(Q-1));return[i(ve*Be,Se*q(1-Be*Be)),Se?D(be*Be/Se):0]},ae}function Vn(Q,ae){var ve=An(Q);if(!ae)return ve;var be=o(ae),De=m(ae);function Se(Be,ut){var gt=ve(Be,ut),Mt=gt[1],Ft=Mt*De/(Q-1)+be;return[gt[0]*be/Ft,Mt/Ft]}return Se.invert=function(Be,ut){var gt=(Q-1)/(Q-1-ut*De);return ve.invert(gt*Be,gt*ut*be)},Se}function tn(){var Q=2,ae=0,ve=t.geoProjectionMutator(Vn),be=ve(Q,ae);return be.distance=function(De){return arguments.length?ve(Q=+De,ae):Q},be.tilt=function(De){return arguments.length?ve(Q,ae=De*A):ae*C},be.scale(432.147).clipAngle(z(1/Q)*C-1e-6)}var nn=1e-4,dn=1e4,Wr=-180,ea=Wr+nn,Ca=180,Pa=Ca-nn,La=-90,Va=La+nn,na=90,zn=na-nn;function Ja(Q){return Q.length>0}function pi(Q){return Math.floor(Q*dn)/dn}function ji(Q){return Q===La||Q===na?[0,Q]:[Wr,pi(Q)]}function Ao(Q){var ae=Q[0],ve=Q[1],be=!1;return ae<=ea?(ae=Wr,be=!0):ae>=Pa&&(ae=Ca,be=!0),ve<=Va?(ve=La,be=!0):ve>=zn&&(ve=na,be=!0),be?[ae,ve]:Q}function Qi(Q){return Q.map(Ao)}function zo(Q,ae,ve){for(var be=0,De=Q.length;be=Pa||Ft<=Va||Ft>=zn){Se[Be]=Ao(gt);for(var Ot=Be+1;Otea&&srVa&&wr=ut)break;ve.push({index:-1,polygon:ae,ring:Se=Se.slice(Ot-1)}),Se[0]=ji(Se[0][1]),Be=-1,ut=Se.length}}}}function Vi(Q){var ae,ve=Q.length,be={},De={},Se,Be,ut,gt,Mt;for(ae=0;ae0?M-ut:ut)*C],Mt=t.geoProjection(Q(Be)).rotate(gt),Ft=t.geoRotation(gt),Ot=Mt.center;return delete Mt.rotate,Mt.center=function(er){return arguments.length?Ot(Ft(er)):Ft.invert(Ot())},Mt.clipAngle(90)}function Yi(Q){var ae=o(Q);function ve(be,De){var Se=t.geoGnomonicRaw(be,De);return Se[0]*=ae,Se}return ve.invert=function(be,De){return t.geoGnomonicRaw.invert(be/ae,De)},ve}function Vs(){return xu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function xu(Q,ae){return wo(Yi,Q,ae)}function au(Q){if(!(Q*=2))return t.geoAzimuthalEquidistantRaw;var ae=-Q/2,ve=-ae,be=Q*Q,De=x(ve),Se=.5/m(ve);function Be(ut,gt){var Mt=z(o(gt)*o(ut-ae)),Ft=z(o(gt)*o(ut-ve)),Ot=gt<0?-1:1;return Mt*=Mt,Ft*=Ft,[(Mt-Ft)/(2*Q),Ot*q(4*be*Ft-(be-Mt+Ft)*(be-Mt+Ft))/(2*Q)]}return Be.invert=function(ut,gt){var Mt=gt*gt,Ft=o(q(Mt+(er=ut+ae)*er)),Ot=o(q(Mt+(er=ut+ve)*er)),er,sr;return[i(sr=Ft-Ot,er=(Ft+Ot)*De),(gt<0?-1:1)*z(q(er*er+sr*sr)*Se)]},Be}function Yu(){return ll([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function ll(Q,ae){return wo(au,Q,ae)}function Pu(Q,ae){if(n(ae)g&&--ut>0);return[d(Q)*(q(De*De+4)+De)*M/4,w*Be]};function iu(){return t.geoProjection(pf).scale(127.16)}function K(Q,ae,ve,be,De){function Se(Be,ut){var gt=ve*m(be*ut),Mt=q(1-gt*gt),Ft=q(2/(1+Mt*o(Be*=De)));return[Q*Mt*Ft*m(Be),ae*gt*Ft]}return Se.invert=function(Be,ut){var gt=Be/Q,Mt=ut/ae,Ft=q(gt*gt+Mt*Mt),Ot=2*D(Ft/2);return[i(Be*x(Ot),Q*Ft)/De,Ft&&D(ut*m(Ot)/(ae*ve*Ft))/be]},Se}function b(Q,ae,ve,be){var De=M/3;Q=c(Q,g),ae=c(ae,g),Q=f(Q,w),ae=f(ae,M-g),ve=c(ve,0),ve=f(ve,100-g),be=c(be,g);var Se=ve/100+1,Be=be/100,ut=z(Se*o(De))/De,gt=m(Q)/m(ut*w),Mt=ae/M,Ft=q(Be*m(Q/2)/m(ae/2)),Ot=Ft/q(Mt*gt*ut),er=1/(Ft*q(Mt*gt*ut));return K(Ot,er,gt,ut,Mt)}function I(){var Q=65*A,ae=60*A,ve=20,be=200,De=t.geoProjectionMutator(b),Se=De(Q,ae,ve,be);return Se.poleline=function(Be){return arguments.length?De(Q=+Be*A,ae,ve,be):Q*C},Se.parallels=function(Be){return arguments.length?De(Q,ae=+Be*A,ve,be):ae*C},Se.inflation=function(Be){return arguments.length?De(Q,ae,ve=+Be,be):ve},Se.ratio=function(Be){return arguments.length?De(Q,ae,ve,be=+Be):be},Se.scale(163.775)}function G(){return I().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var H=4*M+3*q(3),$=2*q(2*M*q(3)/H),xe=Ie($*q(3)/M,$,H/6);function ke(){return t.geoProjection(xe).scale(176.84)}function Ne(Q,ae){return[Q*q(1-3*ae*ae/(M*M)),ae]}Ne.invert=function(Q,ae){return[Q/q(1-3*ae*ae/(M*M)),ae]};function et(){return t.geoProjection(Ne).scale(152.63)}function bt(Q,ae){var ve=o(ae),be=o(Q)*ve,De=1-be,Se=o(Q=i(m(Q)*ve,-m(ae))),Be=m(Q);return ve=q(1-be*be),[Be*ve-Se*De,-Se*ve-Be*De]}bt.invert=function(Q,ae){var ve=(Q*Q+ae*ae)/-2,be=q(-ve*(2+ve)),De=ae*ve+Q*be,Se=Q*ve-ae*be,Be=q(Se*Se+De*De);return[i(be*De,Be*(1+ve)),Be?-D(be*Se/Be):0]};function Tt(){return t.geoProjection(bt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function zt(Q,ae){var ve=se(Q,ae);return[(ve[0]+Q/w)/2,(ve[1]+ae)/2]}zt.invert=function(Q,ae){var ve=Q,be=ae,De=25;do{var Se=o(be),Be=m(be),ut=m(2*be),gt=Be*Be,Mt=Se*Se,Ft=m(ve),Ot=o(ve/2),er=m(ve/2),sr=er*er,wr=1-Mt*Ot*Ot,Gr=wr?z(Se*Ot)*q(pn=1/wr):pn=0,pn,cn=.5*(2*Gr*Se*er+ve/w)-Q,kn=.5*(Gr*Be+be)-ae,ta=.5*pn*(Mt*sr+Gr*Se*Ot*gt)+.5/w,ka=pn*(Ft*ut/4-Gr*Be*er),va=.125*pn*(ut*er-Gr*Be*Mt*Ft),Xa=.5*pn*(gt*Ot+Gr*sr*Se)+.5,Ai=ka*va-Xa*ta,di=(kn*ka-cn*Xa)/Ai,xo=(cn*va-kn*ta)/Ai;ve-=di,be-=xo}while((n(di)>g||n(xo)>g)&&--De>0);return[ve,be]};function Yt(){return t.geoProjection(zt).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=te,e.geoAiryRaw=X,e.geoAitoff=ue,e.geoAitoffRaw=se,e.geoArmadillo=j,e.geoArmadilloRaw=re,e.geoAugust=ce,e.geoAugustRaw=fe,e.geoBaker=ye,e.geoBakerRaw=he,e.geoBerghaus=le,e.geoBerghausRaw=Pe,e.geoBertin1953=mt,e.geoBertin1953Raw=qe,e.geoBoggs=tt,e.geoBoggsRaw=Ge,e.geoBonne=pt,e.geoBonneRaw=We,e.geoBottomley=qt,e.geoBottomleyRaw=kt,e.geoBromley=_r,e.geoBromleyRaw=Wt,e.geoChamberlin=Re,e.geoChamberlinRaw=Te,e.geoChamberlinAfrica=Ae,e.geoCollignon=Ke,e.geoCollignonRaw=Ze,e.geoCraig=St,e.geoCraigRaw=_t,e.geoCraster=$t,e.geoCrasterRaw=fr,e.geoCylindricalEqualArea=Br,e.geoCylindricalEqualAreaRaw=gr,e.geoCylindricalStereographic=Er,e.geoCylindricalStereographicRaw=Nr,e.geoEckert1=vn,e.geoEckert1Raw=zr,e.geoEckert2=Xn,e.geoEckert2Raw=Nn,e.geoEckert3=Qn,e.geoEckert3Raw=Kn,e.geoEckert4=aa,e.geoEckert4Raw=un,e.geoEckert5=ua,e.geoEckert5Raw=da,e.geoEckert6=ii,e.geoEckert6Raw=qa,e.geoEisenlohr=Gi,e.geoEisenlohrRaw=no,e.geoFahey=_o,e.geoFaheyRaw=fi,e.geoFoucaut=ni,e.geoFoucautRaw=Oi,e.geoFoucautSinusoidal=Hi,e.geoFoucautSinusoidalRaw=ao,e.geoGilbert=Zo,e.geoGingery=rl,e.geoGingeryRaw=Fi,e.geoGinzburg4=xi,e.geoGinzburg4Raw=Oa,e.geoGinzburg5=ia,e.geoGinzburg5Raw=Pi,e.geoGinzburg6=Xt,e.geoGinzburg6Raw=rt,e.geoGinzburg8=Fr,e.geoGinzburg8Raw=xr,e.geoGinzburg9=Mn,e.geoGinzburg9Raw=xn,e.geoGringorten=ba,e.geoGringortenRaw=on,e.geoGuyou=Io,e.geoGuyouRaw=Mi,e.geoHammer=vt,e.geoHammerRaw=ze,e.geoHammerRetroazimuthal=Es,e.geoHammerRetroazimuthalRaw=$o,e.geoHealpix=Bs,e.geoHealpixRaw=us,e.geoHill=Eu,e.geoHillRaw=Fl,e.geoHomolosine=co,e.geoHomolosineRaw=al,e.geoHufnagel=Ls,e.geoHufnagelRaw=Ul,e.geoHyperelliptical=Vu,e.geoHyperellipticalRaw=Os,e.geoInterrupt=wc,e.geoInterruptedBoggs=Rd,e.geoInterruptedHomolosine=af,e.geoInterruptedMollweide=Tc,e.geoInterruptedMollweideHemispheres=jc,e.geoInterruptedSinuMollweide=tc,e.geoInterruptedSinusoidal=of,e.geoKavrayskiy7=Pf,e.geoKavrayskiy7Raw=Ff,e.geoLagrange=Fh,e.geoLagrangeRaw=rh,e.geoLarrivee=mu,e.geoLarriveeRaw=gu,e.geoLaskowski=as,e.geoLaskowskiRaw=Ql,e.geoLittrow=Ns,e.geoLittrowRaw=fo,e.geoLoximuthal=rc,e.geoLoximuthalRaw=ku,e.geoMiller=is,e.geoMillerRaw=sf,e.geoModifiedStereographic=Us,e.geoModifiedStereographicRaw=Xh,e.geoModifiedStereographicAlaska=Wc,e.geoModifiedStereographicGs48=_l,e.geoModifiedStereographicGs50=nh,e.geoModifiedStereographicMiller=Cu,e.geoModifiedStereographicLee=Ac,e.geoMollweide=Ee,e.geoMollweideRaw=de,e.geoMtFlatPolarParabolic=Sc,e.geoMtFlatPolarParabolicRaw=Mc,e.geoMtFlatPolarQuartic=If,e.geoMtFlatPolarQuarticRaw=Rf,e.geoMtFlatPolarSinusoidal=lf,e.geoMtFlatPolarSinusoidalRaw=eu,e.geoNaturalEarth2=Ec,e.geoNaturalEarth2Raw=tu,e.geoNellHammer=kc,e.geoNellHammerRaw=bs,e.geoInterruptedQuarticAuthalic=po,e.geoNicolosi=$h,e.geoNicolosiRaw=uf,e.geoPatterson=Pl,e.geoPattersonRaw=Hu,e.geoPolyconic=Yc,e.geoPolyconicRaw=ic,e.geoPolyhedral=Xc,e.geoPolyhedralButterfly=Lo,e.geoPolyhedralCollignon=Bf,e.geoPolyhedralWaterman=Of,e.geoProject=uh,e.geoGringortenQuincuncial=Je,e.geoPeirceQuincuncial=yt,e.geoPierceQuincuncial=yt,e.geoQuantize=Gt,e.geoQuincuncial=Wu,e.geoRectangularPolyconic=mr,e.geoRectangularPolyconicRaw=Bt,e.geoRobinson=mn,e.geoRobinsonRaw=en,e.geoSatellite=tn,e.geoSatelliteRaw=Vn,e.geoSinuMollweide=Kl,e.geoSinuMollweideRaw=du,e.geoSinusoidal=Qe,e.geoSinusoidalRaw=He,e.geoStitch=Mo,e.geoTimes=ho,e.geoTimesRaw=ya,e.geoTwoPointAzimuthal=xu,e.geoTwoPointAzimuthalRaw=Yi,e.geoTwoPointAzimuthalUsa=Vs,e.geoTwoPointEquidistant=ll,e.geoTwoPointEquidistantRaw=au,e.geoTwoPointEquidistantUsa=Yu,e.geoVanDerGrinten=ul,e.geoVanDerGrintenRaw=Pu,e.geoVanDerGrinten2=Wa,e.geoVanDerGrinten2Raw=Pc,e.geoVanDerGrinten3=Ph,e.geoVanDerGrinten3Raw=oi,e.geoVanDerGrinten4=iu,e.geoVanDerGrinten4Raw=pf,e.geoWagner=I,e.geoWagner7=G,e.geoWagnerRaw=b,e.geoWagner4=ke,e.geoWagner4Raw=xe,e.geoWagner6=et,e.geoWagner6Raw=Ne,e.geoWiechel=Tt,e.geoWiechelRaw=bt,e.geoWinkel3=Yt,e.geoWinkel3Raw=zt,Object.defineProperty(e,"__esModule",{value:!0})}))});var x7e=ne((svr,y7e)=>{"use strict";var Ou=Ea(),OH=Zt(),yFt=Fa(),nw=Math.PI/180,w2=180/Math.PI,UH={cursor:"pointer"},VH={cursor:"auto"};function xFt(e,t){var r=e.projection,n;return t._isScoped?n=bFt:t._isClipped?n=wFt:n=_Ft,n(e,r)}y7e.exports=xFt;function GH(e,t){return Ou.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function HH(e,t,r){var n=e.id,a=e.graphDiv,i=a.layout,o=i[n],s=a._fullLayout,l=s[n],u={},c={};function f(h,v){u[n+"."+h]=OH.nestedProperty(o,h).get(),yFt.call("_storeDirectGUIEdit",i,s._preGUI,u);var d=OH.nestedProperty(l,h);d.get()!==v&&(d.set(v),OH.nestedProperty(o,h).set(v),c[n+"."+h]=v)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),a.emit("plotly_relayout",c)}function bFt(e,t){var r=GH(e,t);function n(){Ou.select(this).style(UH)}function a(){t.scale(Ou.event.scale).translate(Ou.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function i(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){Ou.select(this).style(VH),HH(e,t,i)}return r.on("zoomstart",n).on("zoom",a).on("zoomend",o),r}function _Ft(e,t){var r=GH(e,t),n=2,a,i,o,s,l,u,c,f,h;function v(M){return t.invert(M)}function d(M){var w=v(M);if(!w)return!0;var k=t(w);return Math.abs(k[0]-M[0])>n||Math.abs(k[1]-M[1])>n}function m(){Ou.select(this).style(UH);let{x:M,y:w,width:k,height:y}=this.getBBox();a=Ou.event.sourceEvent?Ou.mouse(this):[M+k/2,w+y/2],i=t.rotate(),o=t.translate(),s=i,l=v(a)}function x(){let{x:M,y:w,width:k,height:y}=this.getBBox();if(u=Ou.event.sourceEvent?Ou.mouse(this):[M+k/2,w+y/2],d(a)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(Ou.event.scale),t.translate([o[0],Ou.event.translate[1]]),l?v(u)&&(f=v(u),c=[s[0]+(f[0]-l[0]),i[1],i[2]],t.rotate(c),s=c):(a=u,l=v(a)),h=!0,e.render(!0);var S=t.rotate(),T=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":T[0],"geo.center.lat":T[1],"geo.projection.rotation.lon":-S[0]})}function g(){Ou.select(this).style(VH),h&&HH(e,t,E)}function E(M){var w=t.rotate(),k=t.invert(e.midPt);M("projection.rotation.lon",-w[0]),M("center.lon",k[0]),M("center.lat",k[1])}return r.on("zoomstart",m).on("zoom",x).on("zoomend",g),r}function wFt(e,t){var r={r:t.rotate(),k:t.scale()},n=GH(e,t),a=LFt(n,"zoomstart","zoom","zoomend"),i=0,o=n.on,s;n.on("zoomstart",function(){Ou.select(this).style(UH);let{x:h,y:v,width:d,height:m}=this.getBBox(),x=Ou.event.sourceEvent?Ou.mouse(this):[h+d/2,v+m/2],g=t.rotate(),E=g,M=t.translate(),w=TFt(g);s=H7(t,x),o.call(n,"zoom",function(){let{x:k,y,width:S,height:T}=this.getBBox(),p=Ou.event.sourceEvent?Ou.mouse(this):[k+S/2,y+T/2];if(t.scale(r.k=Ou.event.scale),!s)x=p,s=H7(t,x);else if(H7(t,p)){t.rotate(g).translate(M);var C=H7(t,p),A=MFt(s,C),P=EFt(AFt(w,A)),D=r.r=SFt(P,s,E);(!isFinite(D[0])||!isFinite(D[1])||!isFinite(D[2]))&&(D=E),t.rotate(D),E=D}u(a.of(this,arguments))}),l(a.of(this,arguments))}).on("zoomend",function(){Ou.select(this).style(VH),o.call(n,"zoom",null),c(a.of(this,arguments)),HH(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var h=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-h[0],"geo.projection.rotation.lat":-h[1]})});function l(h){i++||h({type:"zoomstart"})}function u(h){h({type:"zoom"})}function c(h){--i||h({type:"zoomend"})}function f(h){var v=t.rotate();h("projection.rotation.lon",-v[0]),h("projection.rotation.lat",-v[1])}return Ou.rebind(n,a,"on")}function H7(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&kFt(r)}function TFt(e){var t=.5*e[0]*nw,r=.5*e[1]*nw,n=.5*e[2]*nw,a=Math.sin(t),i=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[i*s*u+a*o*l,a*s*u-i*o*l,i*o*u+a*s*l,i*s*l-a*o*u]}function AFt(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-a*l-i*u,r*s+n*o+a*u-i*l,r*l-n*u+a*o+i*s,r*u+n*l-a*s+i*o]}function MFt(e,t){if(!(!e||!t)){var r=CFt(e,t),n=Math.sqrt(m7e(r,r)),a=.5*Math.acos(Math.max(-1,Math.min(1,m7e(e,t)))),i=Math.sin(a)/n;return n&&[Math.cos(a),r[2]*i,-r[1]*i,r[0]*i]}}function SFt(e,t,r){var n=NH(t,2,e[0]);n=NH(n,1,e[1]),n=NH(n,0,e[2]-r[2]);var a=t[0],i=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(i,a)*w2,f=Math.sqrt(a*a+i*i),h,v;Math.abs(l)>f?(v=(l>0?90:-90)-c,h=0):(v=Math.asin(l/f)*w2-c,h=Math.sqrt(f*f-l*l));var d=180-v-2*c,m=(Math.atan2(u,s)-Math.atan2(o,h))*w2,x=(Math.atan2(u,s)-Math.atan2(o,-h))*w2,g=p7e(r[0],r[1],v,m),E=p7e(r[0],r[1],d,x);return g<=E?[v,m,r[2]]:[d,x,r[2]]}function p7e(e,t,r,n){var a=g7e(r-e),i=g7e(n-t);return Math.sqrt(a*a+i*i)}function g7e(e){return(e%360+540)%360-180}function NH(e,t,r){var n=r*nw,a=e.slice(),i=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return a[i]=e[i]*s-e[o]*l,a[o]=e[o]*s+e[i]*l,a}function EFt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*w2,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*w2,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*w2]}function kFt(e){var t=e[0]*nw,r=e[1]*nw,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function m7e(e,t){for(var r=0,n=0,a=e.length;n{"use strict";var i1=Ea(),YH=O7(),FFt=YH.geoPath,PFt=YH.geoDistance,DFt=v7e(),RFt=Fa(),T2=Zt(),IFt=T2.strTranslate,j7=_a(),$A=li(),b7e=cu(),zFt=Sl(),WH=ri(),_7e=I0().getAutoRange,jH=od(),qFt=ef().prepSelect,BFt=ef().clearOutline,OFt=ef().selectOnClick,NFt=x7e(),Ld=GA(),T7e=sg(),{getFitboundsLonRange:UFt,unwrapLonRange:VFt}=T7e,A7e=C7(),GFt=_H().feature;function M7e(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var up=M7e.prototype;S7e.exports=function(t){return new M7e(t)};up.plot=function(e,t,r,n){var a=this;if(n)return a.update(e,t,!0);a._geoCalcData=e,a._fullLayout=t;var i=t[this.id],o=[],s=!1;for(var l in Ld.layerNameToAdjective)if(l!=="frame"&&i["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(i,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),zFt.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};up.updateProjection=function(e,t){var re;var r=this.graphDiv,n=t[this.id],a=t._size,i=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=HFt(n),h=[[a.l+a.w*i.x[0],a.t+a.h*(1-i.y[1])],[a.l+a.w*i.x[1],a.t+a.h*(1-i.y[0])]],v=n.center||{},d=o.rotation||{},m=s.range||[],x=l.range||[];if(n.fitbounds){if(u._length=h[1][0]-h[0][0],c._length=h[1][1]-h[0][1],u.range=_7e(r,u),c.range=_7e(r,c),!this.hasChoropleth&&n.fitbounds==="locations"){for(var g=[],E=!1,M=0;M0?(u.range[1]-u.range[0]-p)/2*(T[1]-T[0])/p:0;u.range=[T[0]-C,T[1]+C]}}}var A=(u.range[0]+u.range[1])/2,P=(c.range[0]+c.range[1])/2;if(n._isScoped)v={lon:A,lat:P};else if(n._isClipped){v={lon:A,lat:P},d={lon:A,lat:P,roll:d.roll};var D=o.type,z=Ld.lonaxisSpan[D]/2||180,q=Ld.lataxisSpan[D]/2||90;m=[A-z,A+z],x=[P-q,P+q]}else v={lon:A,lat:P},d={lon:A,lat:d.lat,roll:d.roll}}f.center([v.lon-d.lon,v.lat-d.lat]).rotate([-d.lon,-d.lat,d.roll]).parallels(o.parallels);var U=w7e(m,x);f.fitExtent(h,U);var O=this.bounds=f.getBounds(U),R=this.fitScale=f.scale(),B=f.translate();if(f.scaleExtent=()=>{var ce;let{minscale:j}=o,fe=(ce=o.maxscale)!=null?ce:1/0;return[R*Math.min(j,fe),R*Math.max(j,fe)]},n.fitbounds){var Y=f.getBounds(w7e(u.range,c.range)),X=Math.min((O[1][0]-O[0][0])/(Y[1][0]-Y[0][0]),(O[1][1]-O[0][1])/(Y[1][1]-Y[0][1]));isFinite(X)?f.scale(X*R):T2.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*R);var te=this.midPt=[(O[0][0]+O[1][0])/2,(O[0][1]+O[1][1])/2];if(f.translate([B[0]+(te[0]-B[0]),B[1]+(te[1]-B[1])]).clipExtent(O),n._isAlbersUsa){var se=f([v.lon,v.lat]);if(se){var ue=f.translate();f.translate([ue[0]-(se[0]-ue[0]),ue[1]-(se[1]-ue[1])])}}};up.updateBaseLayers=function(e,t){var r=this,n=r.topojson,a=r.layers,i=r.basePaths;function o(h){return h==="lonaxis"||h==="lataxis"}function s(h){return!!Ld.lineLayers[h]}function l(h){return!!Ld.fillLayers[h]}var u=this.hasChoropleth?Ld.layersForChoropleth:Ld.layers,c=u.filter(function(h){return s(h)||l(h)?t["show"+h]:o(h)?t[h].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(h){delete a[h],delete i[h],i1.select(this).remove()}),f.enter().append("g").attr("class",function(h){return"layer "+h}).each(function(h){var v=a[h]=i1.select(this);h==="bg"?r.bgRect=v.append("rect").style("pointer-events","all"):o(h)?i[h]=v.append("path").style("fill","none"):h==="backplot"?v.append("g").classed("choroplethlayer",!0):h==="frontplot"?v.append("g").classed("scatterlayer",!0):s(h)?i[h]=v.append("path").style("fill","none").style("stroke-miterlimit",2):l(h)&&(i[h]=v.append("path").style("stroke","none"))}),f.order(),f.each(function(h){var v=i[h],d=Ld.layerNameToAdjective[h];h==="frame"?v.datum(Ld.sphereSVG):s(h)||l(h)?v.datum(GFt(n,n.objects[h])):o(h)&&v.datum(jFt(h,t,e)).call(j7.stroke,t[h].gridcolor).call($A.dashLine,t[h].griddash,t[h].gridwidth),s(h)?v.call(j7.stroke,t[d+"color"]).call($A.dashLine,"",t[d+"width"]):l(h)&&v.call(j7.fill,t[d+"color"])})};up.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,a=r[0][0]-n,i=r[0][1]-n,o=r[1][0]-a+n,s=r[1][1]-i+n;$A.setRect(this.clipRect,a,i,o,s),this.bgRect.call($A.setRect,a,i,o,s).call(j7.fill,t.bgcolor),this.xaxis._offset=a,this.xaxis._length=o,this.yaxis._offset=i,this.yaxis._length=s};up.updateFx=function(e,t){var r=this,n=r.graphDiv,a=r.bgRect,i=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,h={};for(var v in f)h[r.id+"."+v]=f[v];RFt.call("_guiRelayout",n,h),n.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,h){if(h.isRect){var v=f.range={};v[r.id]=[l([h.xmin,h.ymin]),l([h.xmax,h.ymax])]}else{var d=f.lassoPoints={};d[r.id]=h.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&BFt(n)}};if(i==="pan"){a.node().onmousedown=null;let f=NFt(r,t);if(a.call(f),!i1.event){let h=r.projection.scale(),[v,d]=r.projection.scaleExtent();(hd)&&f.event(a)}a.on("dblclick.zoom",s),n._context._scrollZoom.geo||a.on("wheel.zoom",null)}else(i==="select"||i==="lasso")&&(a.on(".zoom",null),c.prepFn=function(f,h,v){qFt(f,h,v,c,i)},jH.init(c));a.on("mousemove",function(){var f=r.projection.invert(T2.getPositionFromD3Event());if(!f)return jH.unhover(n,i1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},b7e.hover(n,i1.event,r.id)}),a.on("mouseout",function(){n._dragging||jH.unhover(n,i1.event)}),a.on("click",function(){i!=="select"&&i!=="lasso"&&(o.indexOf("select")>-1&&OFt(i1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&b7e.click(n,i1.event))})};up.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=i1.select(e.container).append("g").attr("class","geo "+e.id).call($A.setClipUrl,n,t),e.project=function(a){var i=e.projection(a);return i?[i[0]-e.xaxis._offset,i[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(a){return e.project(a)[0]}},e.yaxis={_id:"y",c2p:function(a){return e.project(a)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},WH.setConvert(e.mockAxis,r)};up.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var a;e._isScoped?a={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?a={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat,"center.lon":t.lon,"center.lat":t.lat}:a={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":n.lon},T2.extendFlat(this.viewInitial,a)};up.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};up._render=function(){var e=this.projection,t=e.getPath(),r;function n(i){var o=e(i.lonlat);return o?IFt(o[0],o[1]):null}function a(i){return e.isLonLatOverEdges(i.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(i){return t(i.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",a).attr("transform",n)};function HFt(e){var t=e.projection,r=t.type,n=Ld.projNames[r];n="geo"+T2.titleCase(n);for(var a=YH[n]||DFt[n],i=a(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?Ld.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?i:[]},u=0;ud}else return!1},i.getPath=function(){return FFt().projection(i)},i.getBounds=function(f){return i.getPath().bounds(f)},i.precision(Ld.precision),e._isSatellite&&i.tilt(t.tilt).distance(t.distance),o&&i.clipAngle(o-Ld.clipPad),i}function jFt(e,t,r){var n=1e-6,a=2.5,i=t[e],o=Ld.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(E,M){return[E,M]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(E,M){return[M,E]});var c={type:"linear",range:[s[0],s[1]-n],tick0:i.tick0,dtick:i.dtick};WH.setConvert(c,r);var f=WH.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var h=f.length,v=new Array(h),d=0;d{"use strict";var iw=Ic(),WFt=zl().attributes,YFt=xf().dash,aw=GA(),XFt=Il().overrideAll,k7e=(By(),vl(qy)).default,C7e={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:iw.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:YFt},ZFt=L7e.exports=XFt({domain:WFt({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:k7e(aw.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:k7e(aw.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:iw.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:aw.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:aw.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:aw.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:aw.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:iw.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:iw.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:iw.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:iw.background},lonaxis:C7e,lataxis:C7e},"plot","from-root");ZFt.uirevision={valType:"any",editType:"none"}});var D7e=ne((cvr,P7e)=>{"use strict";var W7=Zt(),$Ft=qx(),KFt=mh().getSubplotData,{unwrapLonRange:JFt}=sg(),KA=GA(),QFt=XH(),F7e=KA.axesNames;P7e.exports=function(t,r,n){$Ft(t,r,n,{type:"geo",attributes:QFt,handleDefaults:ePt,fullData:n,partition:"y"})};function ePt(e,t,r,n){var a=KFt(n.fullData,"geo",n.id),i=a.map(function(Y){return Y.index}),o=r("resolution"),s=r("scope"),l=KA.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",h=t._isSatellite=u==="satellite",v=t._isConic=u.indexOf("conic")!==-1||u==="albers",d=t._isClipped=!!KA.lonaxisSpan[u];if(e.visible===!1){var m=W7.extendDeep({},t._template);m.showcoastlines=!1,m.showcountries=!1,m.showframe=!1,m.showlakes=!1,m.showland=!1,m.showocean=!1,m.showrivers=!1,m.showsubunits=!1,m.lonaxis&&(m.lonaxis.showgrid=!1),m.lataxis&&(m.lataxis.showgrid=!1),t._template=m}for(var x=r("visible"),g,E=0;Efe[ce]!=null)||KA.fitboundsIncompatible.has(u)?t.fitbounds=!1:re.forEach(({dst:fe,key:ce})=>fe&&(fe[ce]=null))}}});var ZH=ne((fvr,z7e)=>{"use strict";var tPt=mh().getSubplotCalcData,rPt=Zt().counterRegex,nPt=E7e(),o1="geo",R7e=rPt(o1),I7e={};I7e[o1]={valType:"subplotid",dflt:o1,editType:"calc"};function aPt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[o1],a=0;a{"use strict";q7e.exports={attributes:rw(),supplyDefaults:dLe(),colorbar:bh(),formatLabels:gLe(),calc:bH(),calcGeoJSON:BH().calcGeoJSON,plot:BH().plot,style:RH(),styleOnSelect:Md().styleOnSelect,hoverPoints:s7e(),eventData:u7e(),selectPoints:h7e(),moduleType:"trace",name:"scattergeo",basePlotModule:ZH(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var N7e=ne((dvr,O7e)=>{"use strict";O7e.exports=B7e()});var JA=ne((vvr,G7e)=>{"use strict";var{hovertemplateAttrs:sPt,templatefallbackAttrs:lPt}=rs(),$m=rw(),uPt=Ys(),U7e=os(),cPt=Ic().defaultLine,Zm=ci().extendFlat,V7e=$m.marker.line;G7e.exports=Zm({locations:{valType:"data_array",editType:"calc"},locationmode:$m.locationmode,z:{valType:"data_array",editType:"calc"},geojson:Zm({},$m.geojson,{}),featureidkey:$m.featureidkey,text:Zm({},$m.text,{}),hovertext:Zm({},$m.hovertext,{}),marker:{line:{color:Zm({},V7e.color,{dflt:cPt}),width:Zm({},V7e.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:$m.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:$m.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:Zm({},U7e.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:sPt(),hovertemplatefallback:lPt(),showlegend:Zm({},U7e.showlegend,{dflt:!1})},uPt("",{cLetter:"z",editTypeOverride:"calc"}))});var j7e=ne((pvr,H7e)=>{"use strict";var Y7=Zt(),fPt=bf(),hPt=JA();H7e.exports=function(t,r,n,a){function i(h,v){return Y7.coerce(t,r,hPt,h,v)}var o=i("locations"),s=i("z");if(!(o&&o.length&&Y7.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=i("geojson"),u;(typeof l=="string"&&l!==""||Y7.isPlainObject(l))&&(u="geojson-id");var c=i("locationmode",u);c==="geojson-id"&&i("featureidkey"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f=i("marker.line.width");f&&i("marker.line.color"),i("marker.opacity"),fPt(t,r,a,i,{prefix:"",cLetter:"z"}),Y7.coerceSelectionMarkerOpacity(r,i)}});var $H=ne((gvr,X7e)=>{"use strict";var W7e=mi(),dPt=uo().BADNUM,vPt=qh(),pPt=Op(),gPt=mv();function Y7e(e){return e&&typeof e=="string"}X7e.exports=function(t,r){var n=r._length,a=new Array(n),i;r.geojson?i=function(c){return Y7e(c)||W7e(c)}:i=Y7e;for(var o=0;o{"use strict";var mPt=Ea(),yPt=_a(),KH=li(),xPt=El();function bPt(e,t){t&&Z7e(e,t)}function Z7e(e,t){var r=t[0].trace,n=t[0].node3,a=n.selectAll(".choroplethlocation"),i=r.marker||{},o=i.line||{},s=xPt.makeColorScaleFuncFromTrace(r);a.each(function(l){mPt.select(this).attr("fill",s(l.z)).call(yPt.stroke,l.mlc||o.color).call(KH.dashLine,"",l.mlw||o.width||0).style("opacity",i.opacity)}),KH.selectedPointStyle(a,r)}function _Pt(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?KH.selectedPointStyle(r.selectAll(".choroplethlocation"),n):Z7e(e,t)}$7e.exports={style:bPt,styleOnSelect:_Pt}});var JH=ne((yvr,Q7e)=>{"use strict";var wPt=Ea(),K7e=Zt(),ow=sg(),TPt=C7().getTopojsonFeatures,J7e=I0().findExtremes,APt=X7().style;function MPt(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");K7e.makeTraceGroups(n,r,"trace choropleth").each(function(a){var i=wPt.select(this),o=i.selectAll("path.choroplethlocation").data(K7e.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),APt(e,a)})}function SPt(e,t){var r=e[0].trace,n=t[r.geo],a=n._subplot,i=r.locationmode,o=r._length,s=i==="geojson-id"?ow.extractTraceFeature(e):TPt(r,a.topojson);let l=n.fitbounds==="geojson"&&i==="geojson-id"?ow.computeBbox(ow.getTraceGeojson(r)):null;for(var u=[],c=[],f=0;f{"use strict";var EPt=ri(),kPt=JA(),CPt=Zt().fillText,{ANTIMERIDIAN_LON_SHIFT:LPt}=sg();e9e.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.subplot,s,l,u,c,f=[r,n];let h=[r+LPt,n];for(l=0;l")}}});var ej=ne((bvr,t9e)=>{"use strict";t9e.exports=function(t,r,n,a,i){t.location=r.location,t.z=r.z;var o=a[i];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var tj=ne((_vr,r9e)=>{"use strict";r9e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";n9e.exports={attributes:JA(),supplyDefaults:j7e(),colorbar:V_(),calc:$H(),calcGeoJSON:JH().calcGeoJSON,plot:JH().plot,style:X7().style,styleOnSelect:X7().styleOnSelect,hoverPoints:QH(),eventData:ej(),selectPoints:tj(),moduleType:"trace",name:"choropleth",basePlotModule:ZH(),categories:["geo","noOpacity","showLegend"],meta:{}}});var o9e=ne((Tvr,i9e)=>{"use strict";i9e.exports=a9e()});var Z7=ne((Avr,l9e)=>{"use strict";var PPt=Fa(),Ev=Zt(),DPt=y_();function RPt(e,t,r,n){var a=e.cd,i=a[0].t,o=a[0].trace,s=e.xa,l=e.ya,u=i.x,c=i.y,f=s.c2p(t),h=l.c2p(r),v=e.distance,d;if(i.tree){var m=s.p2c(f-v),x=s.p2c(f+v),g=l.p2c(h-v),E=l.p2c(h+v);n==="x"?d=i.tree.range(Math.min(m,x),Math.min(l._rl[0],l._rl[1]),Math.max(m,x),Math.max(l._rl[0],l._rl[1])):d=i.tree.range(Math.min(m,x),Math.min(g,E),Math.max(m,x),Math.max(g,E))}else d=i.ids;var M,w,k,y,S,T,p,C,A,P=v;if(n==="x"){var D=!!o.xperiodalignment,z=!!o.yperiodalignment;for(S=0;S=Math.min(q,U)&&f<=Math.max(q,U)?0:1/0}if(T=Math.min(O,R)&&h<=Math.max(O,R)?0:1/0}A=Math.sqrt(T*T+p*p),w=d[S]}}}else for(S=d.length-1;S>-1;S--)M=d[S],k=u[M],y=c[M],T=s.c2p(k)-f,p=l.c2p(y)-h,C=Math.sqrt(T*T+p*p),C{"use strict";var u9e=20;c9e.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:u9e,SYMBOL_STROKE:u9e/20,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]}}});var QA=ne((Svr,v9e)=>{"use strict";var IPt=os(),zPt=pl(),qPt=zp(),hu=Tu(),f9e=Wl().axisHoverFormat,h9e=Ys(),BPt=(By(),vl(qy)).default,rj=ci().extendFlat,OPt=Il().overrideAll,NPt=Km().DASHES,d9e=hu.line,lg=hu.marker,UPt=lg.line,Jm=v9e.exports=OPt({x:hu.x,x0:hu.x0,dx:hu.dx,y:hu.y,y0:hu.y0,dy:hu.dy,xperiod:hu.xperiod,yperiod:hu.yperiod,xperiod0:hu.xperiod0,yperiod0:hu.yperiod0,xperiodalignment:hu.xperiodalignment,yperiodalignment:hu.yperiodalignment,xhoverformat:f9e("x"),yhoverformat:f9e("y"),text:hu.text,hovertext:hu.hovertext,textposition:hu.textposition,textfont:zPt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:d9e.color,width:d9e.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:BPt(NPt),dflt:"solid"}},marker:rj({},h9e("marker"),{symbol:lg.symbol,angle:lg.angle,size:lg.size,sizeref:lg.sizeref,sizemin:lg.sizemin,sizemode:lg.sizemode,opacity:lg.opacity,colorbar:lg.colorbar,line:rj({},h9e("marker.line"),{width:UPt.width})}),connectgaps:hu.connectgaps,fill:rj({},hu.fill,{dflt:"none"}),fillcolor:qPt(),selected:{marker:hu.selected.marker,textfont:hu.selected.textfont},unselected:{marker:hu.unselected.marker,textfont:hu.unselected.textfont},opacity:IPt.opacity},"calc","nested");Jm.x.editType=Jm.y.editType=Jm.x0.editType=Jm.y0.editType="calc+clearAxisTypes";Jm.hovertemplate=hu.hovertemplate;Jm.hovertemplatefallback=hu.hovertemplatefallback;Jm.texttemplate=hu.texttemplate;Jm.texttemplatefallback=hu.texttemplatefallback});var $7=ne(nj=>{"use strict";var p9e=Km();nj.isOpenSymbol=function(e){return typeof e=="string"?p9e.OPEN_RE.test(e):e%200>100};nj.isDotSymbol=function(e){return typeof e=="string"?p9e.DOT_RE.test(e):e>200}});var y9e=ne((kvr,m9e)=>{"use strict";var g9e=Zt(),VPt=Fa(),GPt=$7(),HPt=QA(),jPt=Ip(),K7=ml(),WPt=yx(),YPt=U0(),XPt=Kv(),ZPt=V0(),$Pt=Bp(),KPt=G0();m9e.exports=function(t,r,n,a){function i(v,d){return g9e.coerce(t,r,HPt,v,d)}var o=t.marker?GPt.isOpenSymbol(t.marker.symbol):!1,s=K7.isBubble(t),l=WPt(t,r,a,i);if(!l){r.visible=!1;return}YPt(t,r,a,i),i("xhoverformat"),i("yhoverformat");var u=l{"use strict";var JPt=vk();x9e.exports=function(t,r,n){var a=t.i;return"x"in t||(t.x=r._x[a]),"y"in t||(t.y=r._y[a]),JPt(t,r,n)}});var w9e=ne((Lvr,_9e)=>{"use strict";function QPt(e,t,r,n,a){for(var i=a+1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(i=o,a=o-1):n=o+1}return i}function eDt(e,t,r,n,a){for(var i=a+1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(i=o,a=o-1):n=o+1}return i}function tDt(e,t,r,n,a){for(var i=n-1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(i=o,n=o+1):a=o-1}return i}function rDt(e,t,r,n,a){for(var i=n-1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(i=o,n=o+1):a=o-1}return i}function nDt(e,t,r,n,a){for(;n<=a;){var i=n+a>>>1,o=e[i],s=r!==void 0?r(o,t):o-t;if(s===0)return i;s<=0?n=i+1:a=i-1}return-1}function e6(e,t,r,n,a,i){return typeof r=="function"?i(e,t,r,n===void 0?0:n|0,a===void 0?e.length-1:a|0):i(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}_9e.exports={ge:function(e,t,r,n,a){return e6(e,t,r,n,a,QPt)},gt:function(e,t,r,n,a){return e6(e,t,r,n,a,eDt)},lt:function(e,t,r,n,a){return e6(e,t,r,n,a,tDt)},le:function(e,t,r,n,a){return e6(e,t,r,n,a,rDt)},eq:function(e,t,r,n,a){return e6(e,t,r,n,a,nDt)}}});var s1=ne((Fvr,A9e)=>{"use strict";A9e.exports=function(t,r,n){var a={},i,o;if(typeof r=="string"&&(r=T9e(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var aDt=s1();M9e.exports=iDt;function iDt(e){var t;return arguments.length>1&&(e=arguments),typeof e=="string"?e=e.split(/\s/).map(parseFloat):typeof e=="number"&&(e=[e]),e.length&&typeof e[0]=="number"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=aDt(e,{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"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var A2=ne((Dvr,S9e)=>{"use strict";S9e.exports=oDt;function oDt(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;na&&(a=e[o]),e[o]{E9e.exports=function(){for(var e=0;e{var C9e=u7();L9e.exports=sDt;function sDt(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var n=e[0].length,a=e.length*n,i,o,s,l;(!t||typeof t=="string")&&(t=new(C9e(t||"float32"))(a+r));var u=t.length-r;if(a!==u)throw new Error("source length "+a+" ("+n+"x"+e.length+") does not match destination length "+u);for(i=0,s=r;i{"use strict";F9e.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var R9e=ne((qvr,D9e)=>{"use strict";D9e.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var U9e=ne((Bvr,N9e)=>{"use strict";var I9e=w9e(),z9e=zA(),lDt=sw(),uDt=A2(),q9e=s1(),ij=k9e(),cDt=M2(),fDt=P9e(),hDt=u7(),B9e=R9e(),dDt=1073741824;N9e.exports=function(t,r){r||(r={}),t=cDt(t,"float64"),r=q9e(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=ij(r.maxDepth,255),a=ij(r.bounds,uDt(t,2));a[0]===a[2]&&a[2]++,a[1]===a[3]&&a[3]++;let i=O9e(t,a),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(hDt(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let g=0;gn||y>dDt){for(let R=0;Rte||p>se||C=P||Y===X)return;let ue=l[B];X===void 0&&(X=ue.length);for(let Pe=Y;Pe=w&&ze<=y&&Xe>=k&&Xe<=S&&D.push(le)}let re=u[B],j=re[Y*4+0],fe=re[Y*4+1],ce=re[Y*4+2],oe=re[Y*4+3],we=q(re,Y+1),he=R*.5,ye=B+1;z(U,O,he,ye,j,fe||ce||oe||we),z(U,O+he,he,ye,fe,ce||oe||we),z(U+he,O,he,ye,ce,oe||we),z(U+he,O+he,he,ye,oe,we)}function q(U,O){let R=null,B=0;for(;R===null;)if(R=U[O*4+B],B++,B>U.length)return null;return R}return D}function m(g,E,M,w,k){let y=[];for(let S=0;S{"use strict";V9e.exports=U9e()});var oj=ne((Nvr,G9e)=>{G9e.exports=vDt;function vDt(e){var t=0,r=0,n=0,a=0;return e.map(function(i){i=i.slice();var o=i[0],s=o.toUpperCase();if(o!=s)switch(i[0]=s,o){case"a":i[6]+=n,i[7]+=a;break;case"v":i[1]+=a;break;case"h":i[1]+=n;break;default:for(var l=1;l{"use strict";Object.defineProperty(Q7,"__esModule",{value:!0});var pDt=(function(){function e(t,r){var n=[],a=!0,i=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(a=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));a=!0);}catch(u){i=!0,o=u}finally{try{!a&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),t6=Math.PI*2,sj=function(t,r,n,a,i,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=a*l-i*u,f=i*l+a*u;return{x:c+o,y:f+s}},gDt=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),a=Math.cos(t),i=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:a-i*n,y:i+a*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},H9e=function(t,r,n,a){var i=t*a-r*n<0?-1:1,o=t*n+r*a;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)},mDt=function(t,r,n,a,i,o,s,l,u,c,f,h){var v=Math.pow(i,2),d=Math.pow(o,2),m=Math.pow(f,2),x=Math.pow(h,2),g=v*d-v*x-d*m;g<0&&(g=0),g/=v*x+d*m,g=Math.sqrt(g)*(s===l?-1:1);var E=g*i/o*h,M=g*-o/i*f,w=c*E-u*M+(t+n)/2,k=u*E+c*M+(r+a)/2,y=(f-E)/i,S=(h-M)/o,T=(-f-E)/i,p=(-h-M)/o,C=H9e(1,0,y,S),A=H9e(y,S,T,p);return l===0&&A>0&&(A-=t6),l===1&&A<0&&(A+=t6),[w,k,C,A]},yDt=function(t){var r=t.px,n=t.py,a=t.cx,i=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,h=t.sweepFlag,v=h===void 0?0:h,d=[];if(o===0||s===0)return[];var m=Math.sin(u*t6/360),x=Math.cos(u*t6/360),g=x*(r-a)/2+m*(n-i)/2,E=-m*(r-a)/2+x*(n-i)/2;if(g===0&&E===0)return[];o=Math.abs(o),s=Math.abs(s);var M=Math.pow(g,2)/Math.pow(o,2)+Math.pow(E,2)/Math.pow(s,2);M>1&&(o*=Math.sqrt(M),s*=Math.sqrt(M));var w=mDt(r,n,a,i,o,s,f,v,m,x,g,E),k=pDt(w,4),y=k[0],S=k[1],T=k[2],p=k[3],C=Math.abs(p)/(t6/4);Math.abs(1-C)<1e-7&&(C=1);var A=Math.max(Math.ceil(C),1);p/=A;for(var P=0;P{"use strict";X9e.exports=bDt;var xDt=W9e();function bDt(e){for(var t,r=[],n=0,a=0,i=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f4?(n=v[v.length-4],a=v[v.length-3]):(n=u,a=c),r.push(v)}return r}function e9(e,t,r,n){return["C",e,t,r,n,r,n]}function Y9e(e,t,r,n,a,i){return["C",e/3+2/3*r,t/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}});var lj=ne((Vvr,$9e)=>{"use strict";$9e.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var Q9e=ne((Gvr,J9e)=>{"use strict";var _Dt=V5(),wDt=oj(),TDt=Z9e(),ADt=lj(),K9e=$T();J9e.exports=MDt;function MDt(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"&&(K9e(ADt(e),"String is not an SVG path."),e=_Dt(e)),K9e(Array.isArray(e),"Argument should be a string or an array of path segments."),e=wDt(e),e=TDt(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;rt[2]&&(t[2]=a[i+0]),a[i+1]>t[3]&&(t[3]=a[i+1]);return t}});var iFe=ne((Hvr,aFe)=>{var S2=Math.PI,eFe=nFe(120);aFe.exports=SDt;function SDt(e){for(var t,r=[],n=0,a=0,i=0,o=0,s=null,l=null,u=0,c=0,f=0,h=e.length;f7&&(r.push(v.splice(0,7)),v.unshift("C"));break;case"S":var m=u,x=c;(t=="C"||t=="S")&&(m+=m-n,x+=x-a),v=["C",m,x,v[1],v[2],v[3],v[4]];break;case"T":t=="Q"||t=="T"?(s=u*2-s,l=c*2-l):(s=u,l=c),v=tFe(u,c,s,l,v[1],v[2]);break;case"Q":s=v[1],l=v[2],v=tFe(u,c,v[1],v[2],v[3],v[4]);break;case"L":v=t9(u,c,v[1],v[2]);break;case"H":v=t9(u,c,v[1],c);break;case"V":v=t9(u,c,u,v[1]);break;case"Z":v=t9(u,c,i,o);break}t=d,u=v[v.length-2],c=v[v.length-1],v.length>4?(n=v[v.length-4],a=v[v.length-3]):(n=u,a=c),r.push(v)}return r}function t9(e,t,r,n){return["C",e,t,r,n,r,n]}function tFe(e,t,r,n,a,i){return["C",e/3+2/3*r,t/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}function rFe(e,t,r,n,a,i,o,s,l,u){if(u)M=u[0],w=u[1],g=u[2],E=u[3];else{var c=uj(e,t,-a);e=c.x,t=c.y,c=uj(s,l,-a),s=c.x,l=c.y;var f=(e-s)/2,h=(t-l)/2,v=f*f/(r*r)+h*h/(n*n);v>1&&(v=Math.sqrt(v),r=v*r,n=v*n);var d=r*r,m=n*n,x=(i==o?-1:1)*Math.sqrt(Math.abs((d*m-d*h*h-m*f*f)/(d*h*h+m*f*f)));x==1/0&&(x=1);var g=x*r*h/n+(e+s)/2,E=x*-n*f/r+(t+l)/2,M=Math.asin(((t-E)/n).toFixed(9)),w=Math.asin(((l-E)/n).toFixed(9));M=ew&&(M=M-S2*2),!o&&w>M&&(w=w-S2*2)}if(Math.abs(w-M)>eFe){var k=w,y=s,S=l;w=M+eFe*(o&&w>M?1:-1),s=g+r*Math.cos(w),l=E+n*Math.sin(w);var T=rFe(s,l,r,n,a,0,o,y,S,[w,k,g,E])}var p=Math.tan((w-M)/4),C=4/3*r*p,A=4/3*n*p,P=[2*e-(e+C*Math.sin(M)),2*t-(t-A*Math.cos(M)),s+C*Math.sin(w),l-A*Math.cos(w),s,l];if(u)return P;T&&(P=P.concat(T));for(var D=0;D{var EDt=oj(),kDt=iFe(),CDt={M:"moveTo",C:"bezierCurveTo"};oFe.exports=function(e,t){e.beginPath(),kDt(EDt(t)).forEach(function(r){var n=r[0],a=r.slice(1);e[CDt[n]].apply(e,a)}),e.closePath()}});var fFe=ne((Wvr,cFe)=>{"use strict";var LDt=zA();cFe.exports=FDt;var r6=1e20;function FDt(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,a=t.channel||0,i,o,s,l,u,c,f,h,v,d,m;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/i/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(h=e,f=h.getContext("2d"),i=h.width,o=h.height,v=f.getImageData(0,0,i,o),l=v.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(h=e.canvas,f=e,i=h.width,o=h.height,v=f.getImageData(0,0,i,o),l=v.data,c=4):window.ImageData&&e instanceof window.ImageData&&(v=e,i=e.width,o=e.height,l=v.data,c=4);if(s=Math.max(i,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(i*o),d=0,m=u.length;d{"use strict";var PDt=Q9e(),DDt=V5(),RDt=sFe(),IDt=lj(),zDt=fFe(),cj=document.createElement("canvas"),Fd=cj.getContext("2d");hFe.exports=qDt;function qDt(e,t){if(!IDt(e))throw Error("Argument should be valid svg path string");t||(t={});var r,n;t.shape?(r=t.shape[0],n=t.shape[1]):(r=cj.width=t.w||t.width||200,n=cj.height=t.h||t.height||200);var a=Math.min(r,n),i=t.stroke||0,o=t.viewbox||t.viewBox||PDt(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;if(Fd.fillStyle="black",Fd.fillRect(0,0,r,n),Fd.fillStyle="white",i&&(typeof i!="number"&&(i=1),i>0?Fd.strokeStyle="white":Fd.strokeStyle="black",Fd.lineWidth=Math.abs(i)),Fd.translate(r*.5,n*.5),Fd.scale(l,l),BDt()){var u=new Path2D(e);Fd.fill(u),i&&Fd.stroke(u)}else{var c=DDt(e);RDt(Fd,c),Fd.fill(),i&&Fd.stroke()}Fd.setTransform(1,0,0,1,0,0);var f=zDt(Fd,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:a*.5});return f}var r9;function BDt(){if(r9!=null)return r9;var e=document.createElement("canvas").getContext("2d");if(e.canvas.width=e.canvas.height=1,!window.Path2D)return r9=!1;var t=new Path2D("M0,0h1v1h-1v-1Z");e.fillStyle="black",e.fill(t);var r=e.getImageData(0,0,1,1);return r9=r&&r.data&&r.data[3]===255}});var k2=ne((Xvr,AFe)=>{"use strict";var a9=mi(),ODt=dFe(),n9=Hm(),NDt=Fa(),cw=Zt(),yc=cw.isArrayOrTypedArray,lw=li(),vFe=uu(),pFe=ag().formatColor,uw=ml(),UDt=U5(),hj=$7(),n6=Km(),VDt=A1().DESELECTDIM,gFe={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},GDt=Hd().appendArrayPointValue;function HDt(e,t){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},a=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(uw.hasText(t)&&(n.text=TFe(e,t),n.textSel=yFe(e,t,t.selected),n.textUnsel=yFe(e,t,t.unselected)),uw.hasMarkers(t)&&(n.marker=vj(e,t),n.markerSel=dj(e,t,t.selected),n.markerUnsel=dj(e,t,t.unselected),!t.unselected&&yc(t.marker.opacity))){var i=t.marker.opacity;for(n.markerUnsel.opacity=new Array(i.length),r=0;r500?"bold":"normal":e}function vj(e,t){var r=t._length,n=t.marker,a={},i,o=yc(n.symbol),s=yc(n.angle),l=yc(n.color),u=yc(n.line.color),c=yc(n.opacity),f=yc(n.size),h=yc(n.line.width),v;if(o||(v=hj.isOpenSymbol(n.symbol)),o||l||u||c||s){a.symbols=new Array(r),a.angles=new Array(r),a.colors=new Array(r),a.borderColors=new Array(r);var d=n.symbol,m=n.angle,x=pFe(n,n.opacity,r),g=pFe(n.line,n.opacity,r);if(!yc(g[0])){var E=g;for(g=Array(r),i=0;in6.TOO_MANY_POINTS||uw.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=i[0],h=i[1];for(o=0;o1?l[o]:l[0]:l,v=yc(u)?u.length>1?u[o]:u[0]:u,d=gFe[h],m=gFe[v],x=c?c/.8+1:0,g=-m*x-m*.5;i.offset[o]=[d*x/f,g/f]}}return i}AFe.exports={style:HDt,markerStyle:vj,markerSelection:dj,linePositions:WDt,errorBarPositions:YDt,textPosition:XDt}});var pj=ne((Zvr,MFe)=>{"use strict";var i9=Zt();MFe.exports=function(t,r){var n=r._scene,a={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},i={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){i9.extendFlat(n,i,a)},n.init(),n.update=function(s){var l=i9.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u{"use strict";var ZDt=J7(),fw=Zt(),SFe=uu(),$Dt=I0().findExtremes,EFe=H0(),gj=Qv(),KDt=gj.calcMarkerSize,JDt=gj.calcAxisExpansion,QDt=gj.setFirstScatter,eRt=Jv(),hw=k2(),tRt=pj(),kFe=uo().BADNUM,rRt=Km().TOO_MANY_POINTS;LFe.exports=function(t,r){var n=t._fullLayout,a=r._xA=SFe.getFromId(t,r.xaxis,"x"),i=r._yA=SFe.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=rRt,u=s*2,c={},f,h=a.makeCalcdata(r,"x"),v=i.makeCalcdata(r,"y"),d=EFe(r,a,"x",h),m=EFe(r,i,"y",v),x=d.vals,g=m.vals;r._x=x,r._y=g,r.xperiodalignment&&(r._origX=h,r._xStarts=d.starts,r._xEnds=d.ends),r.yperiodalignment&&(r._origY=v,r._yStarts=m.starts,r._yEnds=m.ends);var E=new Array(u),M=new Array(s);for(f=0;f1&&fw.extendFlat(o.line,hw.linePositions(e,r,n)),o.errorX||o.errorY){var s=hw.errorBarPositions(e,r,n,a,i);o.errorX&&fw.extendFlat(o.errorX,s.x),o.errorY&&fw.extendFlat(o.errorY,s.y)}return o.text&&(fw.extendFlat(o.text,{positions:n},hw.textPosition(e,r,o.text,o.marker)),fw.extendFlat(o.textSel,{positions:n},hw.textPosition(e,r,o.text,o.markerSel)),fw.extendFlat(o.textUnsel,{positions:n},hw.textPosition(e,r,o.text,o.markerUnsel))),o}});var mj=ne((Kvr,DFe)=>{"use strict";var PFe=Zt(),aRt=_a(),iRt=A1().DESELECTDIM;function oRt(e){var t=e[0],r=t.trace,n=t.t,a=n._scene,i=n.index,o=a.selectBatch[i],s=a.unselectBatch[i],l=a.textOptions[i],u=a.textSelectedOptions[i]||{},c=a.textUnselectedOptions[i]||{},f=PFe.extendFlat({},l),h,v;if(o.length||s.length){var d=u.color,m=c.color,x=l.color,g=PFe.isArrayOrTypedArray(x);for(f.color=new Array(r._length),h=0;h{"use strict";var RFe=ml(),sRt=mj().styleTextSelection;IFe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,h=l._scene,v=l.index;if(!h)return o;var d=RFe.hasText(s),m=RFe.hasMarkers(s),x=!m&&!d;if(s.visible!==!0||x)return o;var g=[],E=[];if(r!==!1&&!r.degenerate)for(var M=0;M{"use strict";var lRt=Z7();zFe.exports={moduleType:"trace",name:"scattergl",basePlotModule:Ku(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:QA(),supplyDefaults:y9e(),crossTraceDefaults:sq(),colorbar:bh(),formatLabels:b9e(),calc:FFe(),hoverPoints:lRt.hoverPoints,selectPoints:yj(),meta:{}}});var OFe=ne((e0r,s9)=>{"use strict";var o9=zA();s9.exports=BFe;s9.exports.to=BFe;s9.exports.from=uRt;function BFe(e,t){t==null&&(t=!0);var r=e[0],n=e[1],a=e[2],i=e[3];i==null&&(i=t?1:255),t&&(r*=255,n*=255,a*=255,i*=255),r=o9(r,0,255)&255,n=o9(n,0,255)&255,a=o9(a,0,255)&255,i=o9(i,0,255)&255;var o=r*16777216+(n<<16)+(a<<8)+i;return o}function uRt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,a=(e&65280)>>>8,i=e&255;return t===!1?[r,n,a,i]:[r/255,n/255,a/255,i/255]}});var Uc=ne((t0r,UFe)=>{"use strict";var NFe=Object.getOwnPropertySymbols,cRt=Object.prototype.hasOwnProperty,fRt=Object.prototype.propertyIsEnumerable;function hRt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function dRt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(n.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(i){a[i]=i}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}UFe.exports=dRt()?Object.assign:function(e,t){for(var r,n=hRt(e),a,i=1;i{VFe.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";HFe.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var a=0,i=n.length;a{"use strict";jFe.exports=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))});var l9=ne((i0r,dw)=>{"use strict";dw.exports=a6;dw.exports.float32=dw.exports.float=a6;dw.exports.fract32=dw.exports.fract=vRt;var YFe=new Float32Array(1);function vRt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=a6(e));for(var r=0,n=t.length;r{"use strict";function pRt(e,t){var r=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,i,o,s=[],l=!0,u=!1;try{if(i=(r=r.call(e)).next,t===0){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(c){u=!0,a=c}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw a}}return s}}function gRt(e,t){return xRt(e)||pRt(e,t)||ZFe(e,t)||wRt()}function mRt(e){return yRt(e)||bRt(e)||ZFe(e)||_Rt()}function yRt(e){if(Array.isArray(e))return bj(e)}function xRt(e){if(Array.isArray(e))return e}function bRt(e){if(typeof Symbol!="undefined"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function ZFe(e,t){if(e){if(typeof e=="string")return bj(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return bj(e,t)}}function bj(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rie&&me>0){var be=(le[me][0]-ie)/(le[me][0]-le[me-1][0]);return le[me][1]*(1-be)+be*le[me-1][1]}}return 1}var U=[0,0,0],J={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function ee(ie,le){var me,be,De,Ge=le.axes&&le.axes.lastCubeProps.axis||U,ht=le.showSurface,it=le.showContour;for(me=0;me<3;++me)for(ht=ht||le.surfaceProject[me],be=0;be<3;++be)it=it||le.contourProject[me][be];for(me=0;me<3;++me){var Oe=J.projections[me];for(be=0;be<16;++be)Oe[be]=0;for(be=0;be<4;++be)Oe[5*be]=1;Oe[5*me]=0,Oe[12+me]=le.axesBounds[+(Ge[me]>0)][me],y(Oe,ie.model,Oe);var ze=J.clipBounds[me];for(De=0;De<2;++De)for(be=0;be<3;++be)ze[De][be]=ie.clipBounds[De][be];ze[0][me]=-1e8,ze[1][me]=1e8}return J.showSurface=ht,J.showContour=it,J}var ce={model:E,view:E,projection:E,inverseModel:E.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},ye=E.slice(),xe=[1,0,0,0,1,0,0,0,1];function ue(ie,le){ie=ie||{};var me=this.gl;me.disable(me.CULL_FACE),this._colorMap.bind(0);var be=ce;be.model=ie.model||E,be.view=ie.view||E,be.projection=ie.projection||E,be.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],be.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],be.objectOffset=this.objectOffset,be.contourColor=this.contourColor[0],be.inverseModel=C(be.inverseModel,be.model);for(var De=0;De<2;++De)for(var Ge=be.clipBounds[De],ht=0;ht<3;++ht)Ge[ht]=Math.min(Math.max(this.clipBounds[De][ht],-1e8),1e8);be.kambient=this.ambientLight,be.kdiffuse=this.diffuseLight,be.kspecular=this.specularLight,be.roughness=this.roughness,be.fresnel=this.fresnel,be.opacity=this.opacity,be.height=0,be.permutation=xe,be.vertexColor=this.vertexColor;var it=ye;for(y(it,be.view,be.model),y(it,be.projection,it),C(it,it),De=0;De<3;++De)be.eyePosition[De]=it[12+De]/it[15];var Oe=it[15];for(De=0;De<3;++De)Oe+=this.lightPosition[De]*it[4*De+3];for(De=0;De<3;++De){var ze=it[12+De];for(ht=0;ht<3;++ht)ze+=it[4*ht+De]*this.lightPosition[ht];be.lightPosition[De]=ze/Oe}var ct=ee(be,this);if(ct.showSurface){for(this._shader.bind(),this._shader.uniforms=be,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(me.TRIANGLES,this._vertexCount),De=0;De<3;++De)!this.surfaceProject[De]||!this.vertexCount||(this._shader.uniforms.model=ct.projections[De],this._shader.uniforms.clipBounds=ct.clipBounds[De],this._vao.draw(me.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ct.showContour){var et=this._contourShader;be.kambient=1,be.kdiffuse=0,be.kspecular=0,be.opacity=1,et.bind(),et.uniforms=be;var qe=this._contourVAO;for(qe.bind(),De=0;De<3;++De)for(et.uniforms.permutation=R[De],me.lineWidth(this.contourWidth[De]*this.pixelRatio),ht=0;ht>4)/16)/255,De=Math.floor(be),Ge=be-De,ht=le[1]*(ie.value[1]+(ie.value[2]&15)/16)/255,it=Math.floor(ht),Oe=ht-it;De+=1,it+=1;var ze=me.position;ze[0]=ze[1]=ze[2]=0;for(var ct=0;ct<2;++ct)for(var et=ct?Ge:1-Ge,qe=0;qe<2;++qe)for(var we=qe?Oe:1-Oe,Le=De+ct,Ke=it+qe,Te=et*we,Ve=0;Ve<3;++Ve)ze[Ve]+=this._field[Ve].get(Le,Ke)*Te;for(var $e=this._pickResult.level,ot=0;ot<3;++ot)if($e[ot]=k.le(this.contourLevels[ot],ze[ot]),$e[ot]<0)this.contourLevels[ot].length>0&&($e[ot]=0);else if($e[ot]Math.abs(nt-ze[ot])&&($e[ot]+=1)}for(me.index[0]=Ge<.5?De:De+1,me.index[1]=Oe<.5?it:it+1,me.uv[0]=be/le[0],me.uv[1]=ht/le[1],Ve=0;Ve<3;++Ve)me.dataCoordinate[Ve]=this._field[Ve].get(me.index[0],me.index[1]);return me},j.padField=function(ie,le){var me=le.shape.slice(),be=ie.shape.slice();g.assign(ie.lo(1,1).hi(me[0],me[1]),le),g.assign(ie.lo(1).hi(me[0],1),le.hi(me[0],1)),g.assign(ie.lo(1,be[1]-1).hi(me[0],1),le.lo(0,me[1]-1).hi(me[0],1)),g.assign(ie.lo(0,1).hi(1,me[1]),le.hi(1)),g.assign(ie.lo(be[0]-1,1).hi(1,me[1]),le.lo(me[0]-1)),ie.set(0,0,le.get(0,0)),ie.set(0,be[1]-1,le.get(0,me[1]-1)),ie.set(be[0]-1,0,le.get(me[0]-1,0)),ie.set(be[0]-1,be[1]-1,le.get(me[0]-1,me[1]-1))};function _e(ie,le){return Array.isArray(ie)?[le(ie[0]),le(ie[1]),le(ie[2])]:[le(ie),le(ie),le(ie)]}function ne(ie){return Array.isArray(ie)?ie.length===3?[ie[0],ie[1],ie[2],1]:[ie[0],ie[1],ie[2],ie[3]]:[0,0,0,1]}function ae(ie){if(Array.isArray(ie)){if(Array.isArray(ie))return[ne(ie[0]),ne(ie[1]),ne(ie[2])];var le=ne(ie);return[le.slice(),le.slice(),le.slice()]}}j.update=function(ie){ie=ie||{},this.objectOffset=ie.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ie&&(this.contourWidth=_e(ie.contourWidth,Number)),"showContour"in ie&&(this.showContour=_e(ie.showContour,Boolean)),"showSurface"in ie&&(this.showSurface=!!ie.showSurface),"contourTint"in ie&&(this.contourTint=_e(ie.contourTint,Boolean)),"contourColor"in ie&&(this.contourColor=ae(ie.contourColor)),"contourProject"in ie&&(this.contourProject=_e(ie.contourProject,function(Ga){return _e(Ga,Boolean)})),"surfaceProject"in ie&&(this.surfaceProject=ie.surfaceProject),"dynamicColor"in ie&&(this.dynamicColor=ae(ie.dynamicColor)),"dynamicTint"in ie&&(this.dynamicTint=_e(ie.dynamicTint,Number)),"dynamicWidth"in ie&&(this.dynamicWidth=_e(ie.dynamicWidth,Number)),"opacity"in ie&&(this.opacity=ie.opacity),"opacityscale"in ie&&(this.opacityscale=ie.opacityscale),"colorBounds"in ie&&(this.colorBounds=ie.colorBounds),"vertexColor"in ie&&(this.vertexColor=ie.vertexColor?1:0),"colormap"in ie&&this._colorMap.setPixels(this.genColormap(ie.colormap,this.opacityscale));var le=ie.field||ie.coords&&ie.coords[2]||null,me=!1;if(le||(this._field[2].shape[0]||this._field[2].shape[2]?le=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):le=this._field[2].hi(0,0)),"field"in ie||"coords"in ie){var be=(le.shape[0]+2)*(le.shape[1]+2);be>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(be))),this._field[2]=x(this._field[2].data,[le.shape[0]+2,le.shape[1]+2]),this.padField(this._field[2],le),this.shape=le.shape.slice();for(var De=this.shape,Ge=0;Ge<2;++Ge)this._field[2].size>this._field[Ge].data.length&&(f.freeFloat(this._field[Ge].data),this._field[Ge].data=f.mallocFloat(this._field[2].size)),this._field[Ge]=x(this._field[Ge].data,[De[0]+2,De[1]+2]);if(ie.coords){var ht=ie.coords;if(!Array.isArray(ht)||ht.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(Ge=0;Ge<2;++Ge){var it=ht[Ge];for(qe=0;qe<2;++qe)if(it.shape[qe]!==De[qe])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[Ge],it)}}else if(ie.ticks){var Oe=ie.ticks;if(!Array.isArray(Oe)||Oe.length!==2)throw new Error("gl-surface: invalid ticks");for(Ge=0;Ge<2;++Ge){var ze=Oe[Ge];if((Array.isArray(ze)||ze.length)&&(ze=x(ze)),ze.shape[0]!==De[Ge])throw new Error("gl-surface: invalid tick length");var ct=x(ze.data,De);ct.stride[Ge]=ze.stride[0],ct.stride[Ge^1]=0,this.padField(this._field[Ge],ct)}}else{for(Ge=0;Ge<2;++Ge){var et=[0,0];et[Ge]=1,this._field[Ge]=x(this._field[Ge].data,[De[0]+2,De[1]+2],et,0)}this._field[0].set(0,0,0);for(var qe=0;qe0){for(var oa=0;oa<5;++oa)xr.pop();wt-=1}continue e}}}Dt.push(wt)}this._contourOffsets[Fr]=Cn,this._contourCounts[Fr]=Dt}var Ma=f.mallocFloat(xr.length);for(Ge=0;GeB||I<0||I>B)throw new Error("gl-texture2d: Invalid texture size");return F._shape=[E,I],F.bind(),R.texImage2D(R.TEXTURE_2D,0,F.format,E,I,0,F.format,F.type,null),F._mipLevels=[0],F}function y(F,E,I,R,B,O){this.gl=F,this.handle=E,this.format=B,this.type=O,this._shape=[I,R],this._mipLevels=[0],this._magFilter=F.NEAREST,this._minFilter=F.NEAREST,this._wrapS=F.CLAMP_TO_EDGE,this._wrapT=F.CLAMP_TO_EDGE,this._anisoSamples=1;var V=this,j=[this._wrapS,this._wrapT];Object.defineProperties(j,[{get:function(){return V._wrapS},set:function(U){return V.wrapS=U}},{get:function(){return V._wrapT},set:function(U){return V.wrapT=U}}]),this._wrapVector=j;var q=[this._shape[0],this._shape[1]];Object.defineProperties(q,[{get:function(){return V._shape[0]},set:function(U){return V.width=U}},{get:function(){return V._shape[1]},set:function(U){return V.height=U}}]),this._shapeVector=q}var C=y.prototype;Object.defineProperties(C,{minFilter:{get:function(){return this._minFilter},set:function(F){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(F)>=0&&(E.getExtension("OES_texture_float_linear")||(F=E.NEAREST)),f.indexOf(F)<0)throw new Error("gl-texture2d: Unknown filter mode "+F);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,F),this._minFilter=F}},magFilter:{get:function(){return this._magFilter},set:function(F){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(F)>=0&&(E.getExtension("OES_texture_float_linear")||(F=E.NEAREST)),f.indexOf(F)<0)throw new Error("gl-texture2d: Unknown filter mode "+F);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,F),this._magFilter=F}},mipSamples:{get:function(){return this._anisoSamples},set:function(F){var E=this._anisoSamples;if(this._anisoSamples=Math.max(F,1)|0,E!==this._anisoSamples){var I=this.gl.getExtension("EXT_texture_filter_anisotropic");I&&this.gl.texParameterf(this.gl.TEXTURE_2D,I.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(F){if(this.bind(),v.indexOf(F)<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,F),this._wrapS=F}},wrapT:{get:function(){return this._wrapT},set:function(F){if(this.bind(),v.indexOf(F)<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,F),this._wrapT=F}},wrap:{get:function(){return this._wrapVector},set:function(F){if(Array.isArray(F)||(F=[F,F]),F.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var E=0;E<2;++E)if(v.indexOf(F[E])<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);this._wrapS=F[0],this._wrapT=F[1];var I=this.gl;return this.bind(),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_S,this._wrapS),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_T,this._wrapT),F}},shape:{get:function(){return this._shapeVector},set:function(F){if(!Array.isArray(F))F=[F|0,F|0];else if(F.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return _(this,F[0]|0,F[1]|0),[F[0]|0,F[1]|0]}},width:{get:function(){return this._shape[0]},set:function(F){return F=F|0,_(this,F,this._shape[1]),F}},height:{get:function(){return this._shape[1]},set:function(F){return F=F|0,_(this,this._shape[0],F),F}}}),C.bind=function(F){var E=this.gl;return F!==void 0&&E.activeTexture(E.TEXTURE0+(F|0)),E.bindTexture(E.TEXTURE_2D,this.handle),F!==void 0?F|0:E.getParameter(E.ACTIVE_TEXTURE)-E.TEXTURE0},C.dispose=function(){this.gl.deleteTexture(this.handle)},C.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var F=Math.min(this._shape[0],this._shape[1]),E=0;F>0;++E,F>>>=1)this._mipLevels.indexOf(E)<0&&this._mipLevels.push(E)},C.setPixels=function(F,E,I,R){var B=this.gl;this.bind(),Array.isArray(E)?(R=I,I=E[1]|0,E=E[0]|0):(E=E||0,I=I||0),R=R||0;var O=p(F)?F:F.raw;if(O){var V=this._mipLevels.indexOf(R)<0;V?(B.texImage2D(B.TEXTURE_2D,0,this.format,this.format,this.type,O),this._mipLevels.push(R)):B.texSubImage2D(B.TEXTURE_2D,R,E,I,this.format,this.type,O)}else if(F.shape&&F.stride&&F.data){if(F.shape.length<2||E+F.shape[1]>this._shape[1]>>>R||I+F.shape[0]>this._shape[0]>>>R||E<0||I<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");S(B,E,I,R,this.format,this.type,this._mipLevels,F)}else throw new Error("gl-texture2d: Unsupported data type")};function k(F,E){return F.length===3?E[2]===1&&E[1]===F[0]*F[2]&&E[0]===F[2]:E[0]===1&&E[1]===F[0]}function S(F,E,I,R,B,O,V,j){var q=j.dtype,U=j.shape.slice();if(U.length<2||U.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var J=0,ee=0,ce=k(U,j.stride.slice());q==="float32"?J=F.FLOAT:q==="float64"?(J=F.FLOAT,ce=!1,q="float32"):q==="uint8"?J=F.UNSIGNED_BYTE:(J=F.UNSIGNED_BYTE,ce=!1,q="uint8");var ye=1;if(U.length===2)ee=F.LUMINANCE,U=[U[0],U[1],1],j=s(j.data,U,[j.stride[0],j.stride[1],1],j.offset);else if(U.length===3){if(U[2]===1)ee=F.ALPHA;else if(U[2]===2)ee=F.LUMINANCE_ALPHA;else if(U[2]===3)ee=F.RGB;else if(U[2]===4)ee=F.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ye=U[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((ee===F.LUMINANCE||ee===F.ALPHA)&&(B===F.LUMINANCE||B===F.ALPHA)&&(ee=B),ee!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var xe=j.size,ue=V.indexOf(R)<0;if(ue&&V.push(R),J===O&&ce)j.offset===0&&j.data.length===xe?ue?F.texImage2D(F.TEXTURE_2D,R,B,U[0],U[1],0,B,O,j.data):F.texSubImage2D(F.TEXTURE_2D,R,E,I,U[0],U[1],B,O,j.data):ue?F.texImage2D(F.TEXTURE_2D,R,B,U[0],U[1],0,B,O,j.data.subarray(j.offset,j.offset+xe)):F.texSubImage2D(F.TEXTURE_2D,R,E,I,U[0],U[1],B,O,j.data.subarray(j.offset,j.offset+xe));else{var K;O===F.FLOAT?K=u.mallocFloat32(xe):K=u.mallocUint8(xe);var _e=s(K,U,[U[2],U[2]*U[0],1]);J===F.FLOAT&&O===F.UNSIGNED_BYTE?x(_e,j):l.assign(_e,j),ue?F.texImage2D(F.TEXTURE_2D,R,B,U[0],U[1],0,B,O,K.subarray(0,xe)):F.texSubImage2D(F.TEXTURE_2D,R,E,I,U[0],U[1],B,O,K.subarray(0,xe)),O===F.FLOAT?u.freeFloat32(K):u.freeUint8(K)}}function L(F){var E=F.createTexture();return F.bindTexture(F.TEXTURE_2D,E),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MIN_FILTER,F.NEAREST),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MAG_FILTER,F.NEAREST),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,F.CLAMP_TO_EDGE),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_T,F.CLAMP_TO_EDGE),E}function w(F,E,I,R,B){var O=F.getParameter(F.MAX_TEXTURE_SIZE);if(E<0||E>O||I<0||I>O)throw new Error("gl-texture2d: Invalid texture shape");if(B===F.FLOAT&&!F.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var V=L(F);return F.texImage2D(F.TEXTURE_2D,0,R,E,I,0,R,B,null),new y(F,V,E,I,R,B)}function A(F,E,I,R,B,O){var V=L(F);return F.texImage2D(F.TEXTURE_2D,0,B,B,O,E),new y(F,V,I,R,B,O)}function T(F,E){var I=E.dtype,R=E.shape.slice(),B=F.getParameter(F.MAX_TEXTURE_SIZE);if(R[0]<0||R[0]>B||R[1]<0||R[1]>B)throw new Error("gl-texture2d: Invalid texture size");var O=k(R,E.stride.slice()),V=0;I==="float32"?V=F.FLOAT:I==="float64"?(V=F.FLOAT,O=!1,I="float32"):I==="uint8"?V=F.UNSIGNED_BYTE:(V=F.UNSIGNED_BYTE,O=!1,I="uint8");var j=0;if(R.length===2)j=F.LUMINANCE,R=[R[0],R[1],1],E=s(E.data,R,[E.stride[0],E.stride[1],1],E.offset);else if(R.length===3)if(R[2]===1)j=F.ALPHA;else if(R[2]===2)j=F.LUMINANCE_ALPHA;else if(R[2]===3)j=F.RGB;else if(R[2]===4)j=F.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");V===F.FLOAT&&!F.getExtension("OES_texture_float")&&(V=F.UNSIGNED_BYTE,O=!1);var q,U,J=E.size;if(O)E.offset===0&&E.data.length===J?q=E.data:q=E.data.subarray(E.offset,E.offset+J);else{var ee=[R[2],R[2]*R[0],1];U=u.malloc(J,I);var ce=s(U,R,ee,0);(I==="float32"||I==="float64")&&V===F.UNSIGNED_BYTE?x(ce,E):l.assign(ce,E),q=U.subarray(0,J)}var ye=L(F);return F.texImage2D(F.TEXTURE_2D,0,j,R[0],R[1],0,j,V,q),O||u.free(U),new y(F,ye,R[0],R[1],j,V)}function m(F){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||g(F),typeof arguments[1]=="number")return w(F,arguments[1],arguments[2],arguments[3]||F.RGBA,arguments[4]||F.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return w(F,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||F.RGBA,arguments[3]||F.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var E=arguments[1],I=p(E)?E:E.raw;if(I)return A(F,I,E.width|0,E.height|0,arguments[2]||F.RGBA,arguments[3]||F.UNSIGNED_BYTE);if(E.shape&&E.data&&E.stride)return T(F,E)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}}),1433:(function(a){"use strict";function i(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(x)}}),9226:(function(a){a.exports=i;function i(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}}),3126:(function(a){a.exports=i;function i(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}}),3990:(function(a){a.exports=i;function i(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}}),1091:(function(a){a.exports=i;function i(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}}),5911:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2];return o[0]=c*p-f*g,o[1]=f*v-u*p,o[2]=u*g-c*v,o}}),5455:(function(a,i,o){a.exports=o(7056)}),7056:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}}),4008:(function(a,i,o){a.exports=o(6690)}),6690:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}}),244:(function(a){a.exports=i;function i(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}}),2613:(function(a){a.exports=1e-6}),9922:(function(a,i,o){a.exports=l;var s=o(2613);function l(u,c){var f=u[0],v=u[1],g=u[2],p=c[0],x=c[1],_=c[2];return Math.abs(f-p)<=s*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(v-x)<=s*Math.max(1,Math.abs(v),Math.abs(x))&&Math.abs(g-_)<=s*Math.max(1,Math.abs(g),Math.abs(_))}}),9265:(function(a){a.exports=i;function i(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}}),2681:(function(a){a.exports=i;function i(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}}),5137:(function(a,i,o){a.exports=l;var s=o(1091)();function l(u,c,f,v,g,p){var x,_;for(c||(c=3),f||(f=0),v?_=Math.min(v*c+f,u.length):_=u.length,x=f;x<_;x+=c)s[0]=u[x],s[1]=u[x+1],s[2]=u[x+2],g(s,s,p),u[x]=s[0],u[x+1]=s[1],u[x+2]=s[2];return u}}),2825:(function(a){a.exports=i;function i(o,s,l){var u=new Float32Array(3);return u[0]=o,u[1]=s,u[2]=l,u}}),2931:(function(a,i,o){a.exports={EPSILON:o(2613),create:o(1091),clone:o(3126),angle:o(8192),fromValues:o(2825),copy:o(3990),set:o(1463),equals:o(9922),exactEquals:o(9265),add:o(5632),subtract:o(6843),sub:o(2229),multiply:o(5847),mul:o(4505),divide:o(6690),div:o(4008),min:o(8107),max:o(7417),floor:o(2681),ceil:o(9226),round:o(2447),scale:o(6621),scaleAndAdd:o(8489),distance:o(7056),dist:o(5455),squaredDistance:o(2953),sqrDist:o(6141),length:o(1387),len:o(868),squaredLength:o(3066),sqrLen:o(5486),negate:o(5093),inverse:o(811),normalize:o(3536),dot:o(244),cross:o(5911),lerp:o(6658),random:o(7636),transformMat4:o(5673),transformMat3:o(492),transformQuat:o(264),rotateX:o(6894),rotateY:o(109),rotateZ:o(8692),forEach:o(5137)}}),811:(function(a){a.exports=i;function i(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o}}),868:(function(a,i,o){a.exports=o(1387)}),1387:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2];return Math.sqrt(s*s+l*l+u*u)}}),6658:(function(a){a.exports=i;function i(o,s,l,u){var c=s[0],f=s[1],v=s[2];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=v+u*(l[2]-v),o}}),7417:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o}}),8107:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o}}),4505:(function(a,i,o){a.exports=o(5847)}),5847:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o}}),5093:(function(a){a.exports=i;function i(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o}}),3536:(function(a){a.exports=i;function i(o,s){var l=s[0],u=s[1],c=s[2],f=l*l+u*u+c*c;return f>0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}}),7636:(function(a){a.exports=i;function i(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}}),6894:(function(a){a.exports=i;function i(o,s,l,u){var c=l[1],f=l[2],v=s[1]-c,g=s[2]-f,p=Math.sin(u),x=Math.cos(u);return o[0]=s[0],o[1]=c+v*x-g*p,o[2]=f+v*p+g*x,o}}),109:(function(a){a.exports=i;function i(o,s,l,u){var c=l[0],f=l[2],v=s[0]-c,g=s[2]-f,p=Math.sin(u),x=Math.cos(u);return o[0]=c+g*p+v*x,o[1]=s[1],o[2]=f+g*x-v*p,o}}),8692:(function(a){a.exports=i;function i(o,s,l,u){var c=l[0],f=l[1],v=s[0]-c,g=s[1]-f,p=Math.sin(u),x=Math.cos(u);return o[0]=c+v*x-g*p,o[1]=f+v*p+g*x,o[2]=s[2],o}}),2447:(function(a){a.exports=i;function i(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}}),6621:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}}),8489:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}}),1463:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}}),6141:(function(a,i,o){a.exports=o(2953)}),5486:(function(a,i,o){a.exports=o(3066)}),2953:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}}),3066:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}}),2229:(function(a,i,o){a.exports=o(6843)}),6843:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}}),492:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}}),5673:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[3]*u+l[7]*c+l[11]*f+l[15];return v=v||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/v,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/v,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/v,o}}),264:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2],x=l[3],_=x*u+g*f-p*c,y=x*c+p*u-v*f,C=x*f+v*c-g*u,k=-v*u-g*c-p*f;return o[0]=_*x+k*-v+y*-p-C*-g,o[1]=y*x+k*-g+C*-v-_*-p,o[2]=C*x+k*-p+_*-g-y*-v,o}}),4361:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}}),2335:(function(a){a.exports=i;function i(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}}),2933:(function(a){a.exports=i;function i(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}}),7536:(function(a){a.exports=i;function i(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}}),4691:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}}),1373:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}}),3750:(function(a){a.exports=i;function i(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}}),3390:(function(a){a.exports=i;function i(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}}),9970:(function(a,i,o){a.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}}),4494:(function(a){a.exports=i;function i(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}}),6808:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}}),2573:(function(a){a.exports=i;function i(o,s,l,u){var c=s[0],f=s[1],v=s[2],g=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=v+u*(l[2]-v),o[3]=g+u*(l[3]-g),o}}),160:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}}),2334:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}}),3576:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}}),1498:(function(a){a.exports=i;function i(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}}),5177:(function(a){a.exports=i;function i(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],v=l*l+u*u+c*c+f*f;return v>0&&(v=1/Math.sqrt(v),o[0]=l*v,o[1]=u*v,o[2]=c*v,o[3]=f*v),o}}),9131:(function(a,i,o){var s=o(5177),l=o(9288);a.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}}),9288:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}}),4844:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}}),4578:(function(a){a.exports=i;function i(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}}),7960:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}}),483:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}}),6860:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}}),5352:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*v,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*v,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*v,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*v,o}}),4041:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2],x=l[3],_=x*u+g*f-p*c,y=x*c+p*u-v*f,C=x*f+v*c-g*u,k=-v*u-g*c-p*f;return o[0]=_*x+k*-v+y*-p-C*-g,o[1]=y*x+k*-g+C*-v-_*-p,o[2]=C*x+k*-p+_*-g-y*-v,o[3]=s[3],o}}),1848:(function(a,i,o){var s=o(4905),l=o(6468);a.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),v=0;v0)continue;ot=Te.slice(0,1).join("")}return me(ot),xe+=ot.length,q=q.slice(ot.length),q.length}while(!0)}function qe(){return/[^a-fA-F0-9]/.test(V)?(me(q.join("")),O=v,R):(q.push(V),j=V,R+1)}function we(){return V==="."||/[eE]/.test(V)?(q.push(V),O=k,j=V,R+1):V==="x"&&q.length===1&&q[0]==="0"?(O=m,q.push(V),j=V,R+1):/[^\d]/.test(V)?(me(q.join("")),O=v,R):(q.push(V),j=V,R+1)}function Le(){return V==="f"&&(q.push(V),j=V,R+=1),/[eE]/.test(V)||(V==="-"||V==="+")&&/[eE]/.test(j)?(q.push(V),j=V,R+1):/[^\d]/.test(V)?(me(q.join("")),O=v,R):(q.push(V),j=V,R+1)}function Ke(){if(/[^\d\w_]/.test(V)){var Te=q.join("");return le[Te]?O=w:ie[Te]?O=L:O=S,me(q.join("")),O=v,R}return q.push(V),j=V,R+1}}}),3508:(function(a,i,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),a.exports=s.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"])}),6852:(function(a){a.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"]}),7932:(function(a,i,o){var s=o(620);a.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","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"])}),620:(function(a){a.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","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"]}),7827:(function(a){a.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]}),4905:(function(a,i,o){var s=o(5874);a.exports=l;function l(u,c){var f=s(c),v=[];return v=v.concat(f(u)),v=v.concat(f(null)),v}}),3236:(function(a){a.exports=function(i){typeof i=="string"&&(i=[i]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,_=-7,y=l?c-1:0,C=l?-1:1,k=o[s+y];for(y+=C,f=k&(1<<-_)-1,k>>=-_,_+=g;_>0;f=f*256+o[s+y],y+=C,_-=8);for(v=f&(1<<-_)-1,f>>=-_,_+=u;_>0;v=v*256+o[s+y],y+=C,_-=8);if(f===0)f=1-x;else{if(f===p)return v?NaN:(k?-1:1)*(1/0);v=v+Math.pow(2,u),f=f-x}return(k?-1:1)*v*Math.pow(2,f-u)},i.write=function(o,s,l,u,c,f){var v,g,p,x=f*8-c-1,_=(1<>1,C=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=u?0:f-1,S=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(g=isNaN(s)?1:0,v=_):(v=Math.floor(Math.log(s)/Math.LN2),s*(p=Math.pow(2,-v))<1&&(v--,p*=2),v+y>=1?s+=C/p:s+=C*Math.pow(2,1-y),s*p>=2&&(v++,p/=2),v+y>=_?(g=0,v=_):v+y>=1?(g=(s*p-1)*Math.pow(2,c),v=v+y):(g=s*Math.pow(2,y-1)*Math.pow(2,c),v=0));c>=8;o[l+k]=g&255,k+=S,g/=256,c-=8);for(v=v<0;o[l+k]=v&255,k+=S,v/=256,x-=8);o[l+k-S]|=L*128}}),8954:(function(a,i,o){"use strict";a.exports=y;var s=o(3250),l=o(6803).Fw;function u(C,k,S){this.vertices=C,this.adjacent=k,this.boundary=S,this.lastVisited=-1}u.prototype.flip=function(){var C=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=C;var k=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=k};function c(C,k,S){this.vertices=C,this.cell=k,this.index=S}function f(C,k){return l(C.vertices,k.vertices)}function v(C){return function(){var k=this.tuple;return C.apply(this,k)}}function g(C){var k=s[C+1];return k||(k=s),v(k)}var p=[];function x(C,k,S){this.dimension=C,this.vertices=k,this.simplices=S,this.interior=S.filter(function(A){return!A.boundary}),this.tuple=new Array(C+1);for(var L=0;L<=C;++L)this.tuple[L]=this.vertices[L];var w=p[C];w||(w=p[C]=g(C)),this.orient=w}var _=x.prototype;_.handleBoundaryDegeneracy=function(C,k){var S=this.dimension,L=this.vertices.length-1,w=this.tuple,A=this.vertices,T=[C];for(C.lastVisited=-L;T.length>0;){C=T.pop();for(var m=C.adjacent,F=0;F<=S;++F){var E=m[F];if(!(!E.boundary||E.lastVisited<=-L)){for(var I=E.vertices,R=0;R<=S;++R){var B=I[R];B<0?w[R]=k:w[R]=A[B]}var O=this.orient();if(O>0)return E;E.lastVisited=-L,O===0&&T.push(E)}}}return null},_.walk=function(C,k){var S=this.vertices.length-1,L=this.dimension,w=this.vertices,A=this.tuple,T=k?this.interior.length*Math.random()|0:this.interior.length-1,m=this.interior[T];e:for(;!m.boundary;){for(var F=m.vertices,E=m.adjacent,I=0;I<=L;++I)A[I]=w[F[I]];m.lastVisited=S;for(var I=0;I<=L;++I){var R=E[I];if(!(R.lastVisited>=S)){var B=A[I];A[I]=C;var O=this.orient();if(A[I]=B,O<0){m=R;continue e}else R.boundary?R.lastVisited=-S:R.lastVisited=S}}return}return m},_.addPeaks=function(C,k){var S=this.vertices.length-1,L=this.dimension,w=this.vertices,A=this.tuple,T=this.interior,m=this.simplices,F=[k];k.lastVisited=S,k.vertices[k.vertices.indexOf(-1)]=S,k.boundary=!1,T.push(k);for(var E=[];F.length>0;){var k=F.pop(),I=k.vertices,R=k.adjacent,B=I.indexOf(S);if(!(B<0)){for(var O=0;O<=L;++O)if(O!==B){var V=R[O];if(!(!V.boundary||V.lastVisited>=S)){var j=V.vertices;if(V.lastVisited!==-S){for(var q=0,U=0;U<=L;++U)j[U]<0?(q=U,A[U]=C):A[U]=w[j[U]];var J=this.orient();if(J>0){j[q]=S,V.boundary=!1,T.push(V),F.push(V),V.lastVisited=S;continue}else V.lastVisited=-S}var ee=V.adjacent,ce=I.slice(),ye=R.slice(),xe=new u(ce,ye,!0);m.push(xe);var ue=ee.indexOf(k);if(!(ue<0)){ee[ue]=xe,ye[B]=V,ce[O]=-1,ye[O]=k,R[O]=xe,xe.flip();for(var U=0;U<=L;++U){var K=ce[U];if(!(K<0||K===S)){for(var _e=new Array(L-1),ne=0,ae=0;ae<=L;++ae){var pe=ce[ae];pe<0||ae===U||(_e[ne++]=pe)}E.push(new c(_e,xe,U))}}}}}}}E.sort(f);for(var O=0;O+1=0?T[F++]=m[I]:E=I&1;if(E===(C&1)){var R=T[0];T[0]=T[1],T[1]=R}k.push(T)}}return k};function y(C,k){var S=C.length;if(S===0)throw new Error("Must have at least d+1 points");var L=C[0].length;if(S<=L)throw new Error("Must input at least d+1 points");var w=C.slice(0,L+1),A=s.apply(void 0,w);if(A===0)throw new Error("Input not in general position");for(var T=new Array(L+1),m=0;m<=L;++m)T[m]=m;A<0&&(T[0]=1,T[1]=0);for(var F=new u(T,new Array(L+1),!1),E=F.adjacent,I=new Array(L+2),m=0;m<=L;++m){for(var R=T.slice(),B=0;B<=L;++B)B===m&&(R[B]=-1);var O=R[0];R[0]=R[1],R[1]=O;var V=new u(R,new Array(L+1),!0);E[m]=V,I[m]=V}I[L+1]=F;for(var m=0;m<=L;++m)for(var R=E[m].vertices,j=E[m].adjacent,B=0;B<=L;++B){var q=R[B];if(q<0){j[B]=F;continue}for(var U=0;U<=L;++U)E[U].vertices.indexOf(q)<0&&(j[B]=E[U])}for(var J=new x(L,w,I),ee=!!k,m=L+1;m3*(I+1)?x(this,E):this.left.insert(E):this.left=A([E]);else if(E[0]>this.mid)this.right?4*(this.right.count+1)>3*(I+1)?x(this,E):this.right.insert(E):this.right=A([E]);else{var R=s.ge(this.leftPoints,E,L),B=s.ge(this.rightPoints,E,w);this.leftPoints.splice(R,0,E),this.rightPoints.splice(B,0,E)}},v.remove=function(E){var I=this.count-this.leftPoints;if(E[1]3*(I-1))return _(this,E);var B=this.left.remove(E);return B===c?(this.left=null,this.count-=1,u):(B===u&&(this.count-=1),B)}else if(E[0]>this.mid){if(!this.right)return l;var O=this.left?this.left.count:0;if(4*O>3*(I-1))return _(this,E);var B=this.right.remove(E);return B===c?(this.right=null,this.count-=1,u):(B===u&&(this.count-=1),B)}else{if(this.count===1)return this.leftPoints[0]===E?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===E){if(this.left&&this.right){for(var V=this,j=this.left;j.right;)V=j,j=j.right;if(V===this)j.right=this.right;else{var q=this.left,B=this.right;V.count-=j.count,V.right=j.left,j.left=q,j.right=B}g(this,j),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?g(this,this.left):g(this,this.right);return u}for(var q=s.ge(this.leftPoints,E,L);q=0&&E[B][1]>=I;--B){var O=R(E[B]);if(O)return O}}function k(E,I){for(var R=0;Rthis.mid){if(this.right){var R=this.right.queryPoint(E,I);if(R)return R}return C(this.rightPoints,E,I)}else return k(this.leftPoints,I)},v.queryInterval=function(E,I,R){if(Ethis.mid&&this.right){var B=this.right.queryInterval(E,I,R);if(B)return B}return Ithis.mid?C(this.rightPoints,E,R):k(this.leftPoints,R)};function S(E,I){return E-I}function L(E,I){var R=E[0]-I[0];return R||E[1]-I[1]}function w(E,I){var R=E[1]-I[1];return R||E[0]-I[0]}function A(E){if(E.length===0)return null;for(var I=[],R=0;R>1],O=[],V=[],j=[],R=0;R13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}}),395:(function(a){function i(o,s,l){return o*(1-l)+s*l}a.exports=i}),2652:(function(a,i,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),v=o(5665),g={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},p=l(),x=l(),_=[0,0,0,0],y=[[0,0,0],[0,0,0],[0,0,0]],C=[0,0,0];a.exports=function(A,T,m,F,E,I){if(T||(T=[0,0,0]),m||(m=[0,0,0]),F||(F=[0,0,0]),E||(E=[0,0,0,1]),I||(I=[0,0,0,1]),!s(p,A)||(u(x,p),x[3]=0,x[7]=0,x[11]=0,x[15]=1,Math.abs(c(x)<1e-8)))return!1;var R=p[3],B=p[7],O=p[11],V=p[12],j=p[13],q=p[14],U=p[15];if(R!==0||B!==0||O!==0){_[0]=R,_[1]=B,_[2]=O,_[3]=U;var J=f(x,x);if(!J)return!1;v(x,x),k(E,_,x)}else E[0]=E[1]=E[2]=0,E[3]=1;if(T[0]=V,T[1]=j,T[2]=q,S(y,p),m[0]=g.length(y[0]),g.normalize(y[0],y[0]),F[0]=g.dot(y[0],y[1]),L(y[1],y[1],y[0],1,-F[0]),m[1]=g.length(y[1]),g.normalize(y[1],y[1]),F[0]/=m[1],F[1]=g.dot(y[0],y[2]),L(y[2],y[2],y[0],1,-F[1]),F[2]=g.dot(y[1],y[2]),L(y[2],y[2],y[1],1,-F[2]),m[2]=g.length(y[2]),g.normalize(y[2],y[2]),F[1]/=m[2],F[2]/=m[2],g.cross(C,y[1],y[2]),g.dot(y[0],C)<0)for(var ee=0;ee<3;ee++)m[ee]*=-1,y[ee][0]*=-1,y[ee][1]*=-1,y[ee][2]*=-1;return I[0]=.5*Math.sqrt(Math.max(1+y[0][0]-y[1][1]-y[2][2],0)),I[1]=.5*Math.sqrt(Math.max(1-y[0][0]+y[1][1]-y[2][2],0)),I[2]=.5*Math.sqrt(Math.max(1-y[0][0]-y[1][1]+y[2][2],0)),I[3]=.5*Math.sqrt(Math.max(1+y[0][0]+y[1][1]+y[2][2],0)),y[2][1]>y[1][2]&&(I[0]=-I[0]),y[0][2]>y[2][0]&&(I[1]=-I[1]),y[1][0]>y[0][1]&&(I[2]=-I[2]),!0};function k(w,A,T){var m=A[0],F=A[1],E=A[2],I=A[3];return w[0]=T[0]*m+T[4]*F+T[8]*E+T[12]*I,w[1]=T[1]*m+T[5]*F+T[9]*E+T[13]*I,w[2]=T[2]*m+T[6]*F+T[10]*E+T[14]*I,w[3]=T[3]*m+T[7]*F+T[11]*E+T[15]*I,w}function S(w,A){w[0][0]=A[0],w[0][1]=A[1],w[0][2]=A[2],w[1][0]=A[4],w[1][1]=A[5],w[1][2]=A[6],w[2][0]=A[8],w[2][1]=A[9],w[2][2]=A[10]}function L(w,A,T,m,F){w[0]=A[0]*m+T[0]*F,w[1]=A[1]*m+T[1]*F,w[2]=A[2]*m+T[2]*F}}),4335:(function(a){a.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}}),7442:(function(a,i,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),v=_(),g=_(),p=_();a.exports=x;function x(k,S,L,w){if(c(S)===0||c(L)===0)return!1;var A=u(S,v.translate,v.scale,v.skew,v.perspective,v.quaternion),T=u(L,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!A||!T?!1:(s(p.translate,v.translate,g.translate,w),s(p.skew,v.skew,g.skew,w),s(p.scale,v.scale,g.scale,w),s(p.perspective,v.perspective,g.perspective,w),f(p.quaternion,v.quaternion,g.quaternion,w),l(k,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function _(){return{translate:y(),scale:y(1),skew:y(),perspective:C(),quaternion:C()}}function y(k){return[k||0,k||0,k||0]}function C(){return[0,0,0,1]}}),7182:(function(a,i,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();a.exports=function(f,v,g,p,x,_){return s.identity(f),s.fromRotationTranslation(f,_,v),f[3]=x[0],f[7]=x[1],f[11]=x[2],f[15]=x[3],s.identity(u),p[2]!==0&&(u[9]=p[2],s.multiply(f,f,u)),p[1]!==0&&(u[9]=0,u[8]=p[1],s.multiply(f,f,u)),p[0]!==0&&(u[8]=0,u[4]=p[0],s.multiply(f,f,u)),s.scale(f,f,g),f}}),1811:(function(a,i,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),v=o(7089),g=o(6582),p=o(7656),x=o(2504),_=o(3536),y=[0,0,0];a.exports=L;function C(w){this._components=w.slice(),this._time=[0],this.prevMatrix=w.slice(),this.nextMatrix=w.slice(),this.computedMatrix=w.slice(),this.computedInverse=w.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]}var k=C.prototype;k.recalcMatrix=function(w){var A=this._time,T=s.le(A,w),m=this.computedMatrix;if(!(T<0)){var F=this._components;if(T===A.length-1)for(var E=16*T,I=0;I<16;++I)m[I]=F[E++];else{for(var R=A[T+1]-A[T],E=16*T,B=this.prevMatrix,O=!0,I=0;I<16;++I)B[I]=F[E++];for(var V=this.nextMatrix,I=0;I<16;++I)V[I]=F[E++],O=O&&B[I]===V[I];if(R<1e-6||O)for(var I=0;I<16;++I)m[I]=B[I];else l(m,B,V,(w-A[T])/R)}var j=this.computedUp;j[0]=m[1],j[1]=m[5],j[2]=m[9],_(j,j);var q=this.computedInverse;u(q,m);var U=this.computedEye,J=q[15];U[0]=q[12]/J,U[1]=q[13]/J,U[2]=q[14]/J;for(var ee=this.computedCenter,ce=Math.exp(this.computedRadius[0]),I=0;I<3;++I)ee[I]=U[I]-m[2+4*I]*ce}},k.idle=function(w){if(!(w1&&s(u[g[y-2]],u[g[y-1]],_)<=0;)y-=1,g.pop();for(g.push(x),y=p.length;y>1&&s(u[p[y-2]],u[p[y-1]],_)>=0;)y-=1,p.pop();p.push(x)}for(var C=new Array(p.length+g.length-2),k=0,f=0,S=g.length;f0;--L)C[k++]=p[L];return C}}),351:(function(a,i,o){"use strict";a.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,v=0,g=0,p={shift:!1,alt:!1,control:!1,meta:!1},x=!1;function _(E){var I=!1;return"altKey"in E&&(I=I||E.altKey!==p.alt,p.alt=!!E.altKey),"shiftKey"in E&&(I=I||E.shiftKey!==p.shift,p.shift=!!E.shiftKey),"ctrlKey"in E&&(I=I||E.ctrlKey!==p.control,p.control=!!E.ctrlKey),"metaKey"in E&&(I=I||E.metaKey!==p.meta,p.meta=!!E.metaKey),I}function y(E,I){var R=s.x(I),B=s.y(I);"buttons"in I&&(E=I.buttons|0),(E!==f||R!==v||B!==g||_(I))&&(f=E|0,v=R||0,g=B||0,c&&c(f,v,g,p))}function C(E){y(0,E)}function k(){(f||v||g||p.shift||p.alt||p.meta||p.control)&&(v=g=0,f=0,p.shift=p.alt=p.control=p.meta=!1,c&&c(0,0,0,p))}function S(E){_(E)&&c&&c(f,v,g,p)}function L(E){s.buttons(E)===0?y(0,E):y(f,E)}function w(E){y(f|s.buttons(E),E)}function A(E){y(f&~s.buttons(E),E)}function T(){x||(x=!0,u.addEventListener("mousemove",L),u.addEventListener("mousedown",w),u.addEventListener("mouseup",A),u.addEventListener("mouseleave",C),u.addEventListener("mouseenter",C),u.addEventListener("mouseout",C),u.addEventListener("mouseover",C),u.addEventListener("blur",k),u.addEventListener("keyup",S),u.addEventListener("keydown",S),u.addEventListener("keypress",S),u!==window&&(window.addEventListener("blur",k),window.addEventListener("keyup",S),window.addEventListener("keydown",S),window.addEventListener("keypress",S)))}function m(){x&&(x=!1,u.removeEventListener("mousemove",L),u.removeEventListener("mousedown",w),u.removeEventListener("mouseup",A),u.removeEventListener("mouseleave",C),u.removeEventListener("mouseenter",C),u.removeEventListener("mouseout",C),u.removeEventListener("mouseover",C),u.removeEventListener("blur",k),u.removeEventListener("keyup",S),u.removeEventListener("keydown",S),u.removeEventListener("keypress",S),u!==window&&(window.removeEventListener("blur",k),window.removeEventListener("keyup",S),window.removeEventListener("keydown",S),window.removeEventListener("keypress",S)))}T();var F={element:u};return Object.defineProperties(F,{enabled:{get:function(){return x},set:function(E){E?T():m()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return v},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),F}}),24:(function(a){var i={left:0,top:0};a.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,v=l.clientY||0,g=s(u);return c[0]=f-g.left,c[1]=v-g.top,c}function s(l){return l===window||l===document||l===document.body?i:l.getBoundingClientRect()}}),4687:(function(a,i){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<=0)return 1<0){if(ye=1,K[ne++]=p(T[I],k,S,L),I+=J,w>0)for(ce=1,R=T[I],ae=K[ne]=p(R,k,S,L),le=K[ne+pe],De=K[ne+me],it=K[ne+Ge],(ae!==le||ae!==De||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,le,De,it,k,S,L),Oe=_e[ne]=xe++),ne+=1,I+=J,ce=2;ce0)for(ce=1,R=T[I],ae=K[ne]=p(R,k,S,L),le=K[ne+pe],De=K[ne+me],it=K[ne+Ge],(ae!==le||ae!==De||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,le,De,it,k,S,L),Oe=_e[ne]=xe++,it!==De&&g(_e[ne+me],Oe,j,U,De,it,k,S,L)),ne+=1,I+=J,ce=2;ce0){if(ce=1,K[ne++]=p(T[I],k,S,L),I+=J,A>0)for(ye=1,R=T[I],ae=K[ne]=p(R,k,S,L),De=K[ne+me],le=K[ne+pe],it=K[ne+Ge],(ae!==De||ae!==le||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,De,le,it,k,S,L),Oe=_e[ne]=xe++),ne+=1,I+=J,ye=2;ye0)for(ye=1,R=T[I],ae=K[ne]=p(R,k,S,L),De=K[ne+me],le=K[ne+pe],it=K[ne+Ge],(ae!==De||ae!==le||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,De,le,it,k,S,L),Oe=_e[ne]=xe++,it!==De&&g(_e[ne+me],Oe,U,O,it,De,k,S,L)),ne+=1,I+=J,ye=2;ye 0"),typeof f.vertex!="function"&&v("Must specify vertex creation function"),typeof f.cell!="function"&&v("Must specify cell creation function"),typeof f.phase!="function"&&v("Must specify phase function");for(var _=f.getters||[],y=new Array(p),C=0;C=0?y[C]=!0:y[C]=!1;return u(f.vertex,f.cell,f.phase,x,g,y)}}),6199:(function(a,i,o){"use strict";var s=o(1338),l={zero:function(L,w,A,T){var m=L[0],F=A[0];T|=0;var E=0,I=F;for(E=0;E2&&E[1]>2&&T(F.pick(-1,-1).lo(1,1).hi(E[0]-2,E[1]-2),m.pick(-1,-1,0).lo(1,1).hi(E[0]-2,E[1]-2),m.pick(-1,-1,1).lo(1,1).hi(E[0]-2,E[1]-2)),E[1]>2&&(A(F.pick(0,-1).lo(1).hi(E[1]-2),m.pick(0,-1,1).lo(1).hi(E[1]-2)),w(m.pick(0,-1,0).lo(1).hi(E[1]-2))),E[1]>2&&(A(F.pick(E[0]-1,-1).lo(1).hi(E[1]-2),m.pick(E[0]-1,-1,1).lo(1).hi(E[1]-2)),w(m.pick(E[0]-1,-1,0).lo(1).hi(E[1]-2))),E[0]>2&&(A(F.pick(-1,0).lo(1).hi(E[0]-2),m.pick(-1,0,0).lo(1).hi(E[0]-2)),w(m.pick(-1,0,1).lo(1).hi(E[0]-2))),E[0]>2&&(A(F.pick(-1,E[1]-1).lo(1).hi(E[0]-2),m.pick(-1,E[1]-1,0).lo(1).hi(E[0]-2)),w(m.pick(-1,E[1]-1,1).lo(1).hi(E[0]-2))),m.set(0,0,0,0),m.set(0,0,1,0),m.set(E[0]-1,0,0,0),m.set(E[0]-1,0,1,0),m.set(0,E[1]-1,0,0),m.set(0,E[1]-1,1,0),m.set(E[0]-1,E[1]-1,0,0),m.set(E[0]-1,E[1]-1,1,0),m}}function S(L){var w=L.join(),E=p[w];if(E)return E;for(var A=L.length,T=[_,y],m=1;m<=A;++m)T.push(C(m));var F=k,E=F.apply(void 0,T);return p[w]=E,E}a.exports=function(w,A,T){if(Array.isArray(T)||(typeof T=="string"?T=s(A.dimension,T):T=s(A.dimension,"clamp")),A.size===0)return w;if(A.dimension===0)return w.set(0),w;var m=S(T);return m(w,A)}}),4317:(function(a){"use strict";function i(c,f){var v=Math.floor(f),g=f-v,p=0<=v&&v0;){j<64?(w=j,j=0):(w=64,j-=64);for(var q=p[1]|0;q>0;){q<64?(A=q,q=0):(A=64,q-=64),y=O+j*m+q*F,S=V+j*I+q*R;var U=0,J=0,ee=0,ce=E,ye=m-T*E,xe=F-w*m,ue=B,K=I-T*B,_e=R-w*I;for(ee=0;ee0;){R<64?(w=R,R=0):(w=64,R-=64);for(var B=p[0]|0;B>0;){B<64?(L=B,B=0):(L=64,B-=64),y=E+R*T+B*A,S=I+R*F+B*m;var O=0,V=0,j=T,q=A-w*T,U=F,J=m-w*F;for(V=0;V0;){V<64?(A=V,V=0):(A=64,V-=64);for(var j=p[0]|0;j>0;){j<64?(L=j,j=0):(L=64,j-=64);for(var q=p[1]|0;q>0;){q<64?(w=q,q=0):(w=64,q-=64),y=B+V*F+j*T+q*m,S=O+V*R+j*E+q*I;var U=0,J=0,ee=0,ce=F,ye=T-A*F,xe=m-L*T,ue=R,K=E-A*R,_e=I-L*E;for(ee=0;eeC;){U=0,J=O-w;t:for(j=0;jce)break t;J+=E,U+=I}for(U=O,J=O-w,j=0;j>1,q=j-B,U=j+B,J=O,ee=q,ce=j,ye=U,xe=V,ue=k+1,K=S-1,_e=!0,ne,ae,pe,ie,le,me,be,De,Ge,ht=0,it=0,Oe=0,ze,ct,et,qe,we,Le,Ke,Te,Ve,$e,ot,tt,nt,We,mt,bt,Yt=F,jt=_(Yt),mr=_(Yt);ct=A*J,et=A*ee,bt=w;e:for(ze=0;ze0){ae=J,J=ee,ee=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ye,et=A*xe,bt=w;e:for(ze=0;ze0){ae=ye,ye=xe,xe=ae;break e}if(Oe<0)break e;bt+=I}ct=A*J,et=A*ce,bt=w;e:for(ze=0;ze0){ae=J,J=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ee,et=A*ce,bt=w;e:for(ze=0;ze0){ae=ee,ee=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ct=A*J,et=A*ye,bt=w;e:for(ze=0;ze0){ae=J,J=ye,ye=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ce,et=A*ye,bt=w;e:for(ze=0;ze0){ae=ce,ce=ye,ye=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ee,et=A*xe,bt=w;e:for(ze=0;ze0){ae=ee,ee=xe,xe=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ee,et=A*ce,bt=w;e:for(ze=0;ze0){ae=ee,ee=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ye,et=A*xe,bt=w;e:for(ze=0;ze0){ae=ye,ye=xe,xe=ae;break e}if(Oe<0)break e;bt+=I}for(ct=A*J,et=A*ee,qe=A*ce,we=A*ye,Le=A*xe,Ke=A*O,Te=A*j,Ve=A*V,mt=0,bt=w,ze=0;ze0)K--;else if(Oe<0){for(ct=A*me,et=A*ue,qe=A*K,bt=w,ze=0;ze0)for(;;){be=w+K*A,mt=0;e:for(ze=0;ze0){if(--KV){e:for(;;){for(be=w+ue*A,mt=0,bt=w,ze=0;ze1&&C?S(y,C[0],C[1]):S(y)}var g={"uint32,1,0":function(x,_){return function(y){var C=y.data,k=y.offset|0,S=y.shape,L=y.stride,w=L[0]|0,A=S[0]|0,T=L[1]|0,m=S[1]|0,F=T,E=T,I=1;A<=32?x(0,A-1,C,k,w,T,A,m,F,E,I):_(0,A-1,C,k,w,T,A,m,F,E,I)}}};function p(x,_){var y=[_,x].join(","),C=g[y],k=c(x,_),S=v(x,_,k);return C(k,S)}a.exports=p}),446:(function(a,i,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,v=c.dtype,g=[f,v],p=g.join(":"),x=l[p];return x||(l[p]=x=s(f,v)),x(c),c}a.exports=u}),9618:(function(a,i,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(_,y){return _[0]-y[0]}function c(){var _=this.stride,y=new Array(_.length),C;for(C=0;C=0&&(T=w|0,A+=F*T,m-=T),new k(this.data,m,F,A)},S.step=function(w){var A=this.shape[0],T=this.stride[0],m=this.offset,F=0,E=Math.ceil;return typeof w=="number"&&(F=w|0,F<0?(m+=T*(A-1),A=E(-A/F)):A=E(A/F),T*=F),new k(this.data,A,T,m)},S.transpose=function(w){w=w===void 0?0:w|0;var A=this.shape,T=this.stride;return new k(this.data,A[w],T[w],this.offset)},S.pick=function(w){var A=[],T=[],m=this.offset;typeof w=="number"&&w>=0?m=m+this.stride[0]*w|0:(A.push(this.shape[0]),T.push(this.stride[0]));var F=y[A.length+1];return F(this.data,A,T,m)},function(w,A,T,m){return new k(w,A[0],T[0],m)}},2:function(_,y,C){function k(L,w,A,T,m,F){this.data=L,this.shape=[w,A],this.stride=[T,m],this.offset=F|0}var S=k.prototype;return S.dtype=_,S.dimension=2,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(S,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),S.set=function(w,A,T){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*A,T):this.data[this.offset+this.stride[0]*w+this.stride[1]*A]=T},S.get=function(w,A){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*A):this.data[this.offset+this.stride[0]*w+this.stride[1]*A]},S.index=function(w,A){return this.offset+this.stride[0]*w+this.stride[1]*A},S.hi=function(w,A){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof A!="number"||A<0?this.shape[1]:A|0,this.stride[0],this.stride[1],this.offset)},S.lo=function(w,A){var T=this.offset,m=0,F=this.shape[0],E=this.shape[1],I=this.stride[0],R=this.stride[1];return typeof w=="number"&&w>=0&&(m=w|0,T+=I*m,F-=m),typeof A=="number"&&A>=0&&(m=A|0,T+=R*m,E-=m),new k(this.data,F,E,I,R,T)},S.step=function(w,A){var T=this.shape[0],m=this.shape[1],F=this.stride[0],E=this.stride[1],I=this.offset,R=0,B=Math.ceil;return typeof w=="number"&&(R=w|0,R<0?(I+=F*(T-1),T=B(-T/R)):T=B(T/R),F*=R),typeof A=="number"&&(R=A|0,R<0?(I+=E*(m-1),m=B(-m/R)):m=B(m/R),E*=R),new k(this.data,T,m,F,E,I)},S.transpose=function(w,A){w=w===void 0?0:w|0,A=A===void 0?1:A|0;var T=this.shape,m=this.stride;return new k(this.data,T[w],T[A],m[w],m[A],this.offset)},S.pick=function(w,A){var T=[],m=[],F=this.offset;typeof w=="number"&&w>=0?F=F+this.stride[0]*w|0:(T.push(this.shape[0]),m.push(this.stride[0])),typeof A=="number"&&A>=0?F=F+this.stride[1]*A|0:(T.push(this.shape[1]),m.push(this.stride[1]));var E=y[T.length+1];return E(this.data,T,m,F)},function(w,A,T,m){return new k(w,A[0],A[1],T[0],T[1],m)}},3:function(_,y,C){function k(L,w,A,T,m,F,E,I){this.data=L,this.shape=[w,A,T],this.stride=[m,F,E],this.offset=I|0}var S=k.prototype;return S.dtype=_,S.dimension=3,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(S,"order",{get:function(){var w=Math.abs(this.stride[0]),A=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return w>A?A>T?[2,1,0]:w>T?[1,2,0]:[1,0,2]:w>T?[2,0,1]:T>A?[0,1,2]:[0,2,1]}}),S.set=function(w,A,T,m){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T,m):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T]=m},S.get=function(w,A,T){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T]},S.index=function(w,A,T){return this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T},S.hi=function(w,A,T){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},S.lo=function(w,A,T){var m=this.offset,F=0,E=this.shape[0],I=this.shape[1],R=this.shape[2],B=this.stride[0],O=this.stride[1],V=this.stride[2];return typeof w=="number"&&w>=0&&(F=w|0,m+=B*F,E-=F),typeof A=="number"&&A>=0&&(F=A|0,m+=O*F,I-=F),typeof T=="number"&&T>=0&&(F=T|0,m+=V*F,R-=F),new k(this.data,E,I,R,B,O,V,m)},S.step=function(w,A,T){var m=this.shape[0],F=this.shape[1],E=this.shape[2],I=this.stride[0],R=this.stride[1],B=this.stride[2],O=this.offset,V=0,j=Math.ceil;return typeof w=="number"&&(V=w|0,V<0?(O+=I*(m-1),m=j(-m/V)):m=j(m/V),I*=V),typeof A=="number"&&(V=A|0,V<0?(O+=R*(F-1),F=j(-F/V)):F=j(F/V),R*=V),typeof T=="number"&&(V=T|0,V<0?(O+=B*(E-1),E=j(-E/V)):E=j(E/V),B*=V),new k(this.data,m,F,E,I,R,B,O)},S.transpose=function(w,A,T){w=w===void 0?0:w|0,A=A===void 0?1:A|0,T=T===void 0?2:T|0;var m=this.shape,F=this.stride;return new k(this.data,m[w],m[A],m[T],F[w],F[A],F[T],this.offset)},S.pick=function(w,A,T){var m=[],F=[],E=this.offset;typeof w=="number"&&w>=0?E=E+this.stride[0]*w|0:(m.push(this.shape[0]),F.push(this.stride[0])),typeof A=="number"&&A>=0?E=E+this.stride[1]*A|0:(m.push(this.shape[1]),F.push(this.stride[1])),typeof T=="number"&&T>=0?E=E+this.stride[2]*T|0:(m.push(this.shape[2]),F.push(this.stride[2]));var I=y[m.length+1];return I(this.data,m,F,E)},function(w,A,T,m){return new k(w,A[0],A[1],A[2],T[0],T[1],T[2],m)}},4:function(_,y,C){function k(L,w,A,T,m,F,E,I,R,B){this.data=L,this.shape=[w,A,T,m],this.stride=[F,E,I,R],this.offset=B|0}var S=k.prototype;return S.dtype=_,S.dimension=4,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(S,"order",{get:C}),S.set=function(w,A,T,m,F){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m,F):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m]=F},S.get=function(w,A,T,m){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m]},S.index=function(w,A,T,m){return this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m},S.hi=function(w,A,T,m){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof m!="number"||m<0?this.shape[3]:m|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},S.lo=function(w,A,T,m){var F=this.offset,E=0,I=this.shape[0],R=this.shape[1],B=this.shape[2],O=this.shape[3],V=this.stride[0],j=this.stride[1],q=this.stride[2],U=this.stride[3];return typeof w=="number"&&w>=0&&(E=w|0,F+=V*E,I-=E),typeof A=="number"&&A>=0&&(E=A|0,F+=j*E,R-=E),typeof T=="number"&&T>=0&&(E=T|0,F+=q*E,B-=E),typeof m=="number"&&m>=0&&(E=m|0,F+=U*E,O-=E),new k(this.data,I,R,B,O,V,j,q,U,F)},S.step=function(w,A,T,m){var F=this.shape[0],E=this.shape[1],I=this.shape[2],R=this.shape[3],B=this.stride[0],O=this.stride[1],V=this.stride[2],j=this.stride[3],q=this.offset,U=0,J=Math.ceil;return typeof w=="number"&&(U=w|0,U<0?(q+=B*(F-1),F=J(-F/U)):F=J(F/U),B*=U),typeof A=="number"&&(U=A|0,U<0?(q+=O*(E-1),E=J(-E/U)):E=J(E/U),O*=U),typeof T=="number"&&(U=T|0,U<0?(q+=V*(I-1),I=J(-I/U)):I=J(I/U),V*=U),typeof m=="number"&&(U=m|0,U<0?(q+=j*(R-1),R=J(-R/U)):R=J(R/U),j*=U),new k(this.data,F,E,I,R,B,O,V,j,q)},S.transpose=function(w,A,T,m){w=w===void 0?0:w|0,A=A===void 0?1:A|0,T=T===void 0?2:T|0,m=m===void 0?3:m|0;var F=this.shape,E=this.stride;return new k(this.data,F[w],F[A],F[T],F[m],E[w],E[A],E[T],E[m],this.offset)},S.pick=function(w,A,T,m){var F=[],E=[],I=this.offset;typeof w=="number"&&w>=0?I=I+this.stride[0]*w|0:(F.push(this.shape[0]),E.push(this.stride[0])),typeof A=="number"&&A>=0?I=I+this.stride[1]*A|0:(F.push(this.shape[1]),E.push(this.stride[1])),typeof T=="number"&&T>=0?I=I+this.stride[2]*T|0:(F.push(this.shape[2]),E.push(this.stride[2])),typeof m=="number"&&m>=0?I=I+this.stride[3]*m|0:(F.push(this.shape[3]),E.push(this.stride[3]));var R=y[F.length+1];return R(this.data,F,E,I)},function(w,A,T,m){return new k(w,A[0],A[1],A[2],A[3],T[0],T[1],T[2],T[3],m)}},5:function(y,C,k){function S(w,A,T,m,F,E,I,R,B,O,V,j){this.data=w,this.shape=[A,T,m,F,E],this.stride=[I,R,B,O,V],this.offset=j|0}var L=S.prototype;return L.dtype=y,L.dimension=5,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,"order",{get:k}),L.set=function(A,T,m,F,E,I){return y==="generic"?this.data.set(this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E,I):this.data[this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E]=I},L.get=function(A,T,m,F,E){return y==="generic"?this.data.get(this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E):this.data[this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E]},L.index=function(A,T,m,F,E){return this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E},L.hi=function(A,T,m,F,E){return new S(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof m!="number"||m<0?this.shape[2]:m|0,typeof F!="number"||F<0?this.shape[3]:F|0,typeof E!="number"||E<0?this.shape[4]:E|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(A,T,m,F,E){var I=this.offset,R=0,B=this.shape[0],O=this.shape[1],V=this.shape[2],j=this.shape[3],q=this.shape[4],U=this.stride[0],J=this.stride[1],ee=this.stride[2],ce=this.stride[3],ye=this.stride[4];return typeof A=="number"&&A>=0&&(R=A|0,I+=U*R,B-=R),typeof T=="number"&&T>=0&&(R=T|0,I+=J*R,O-=R),typeof m=="number"&&m>=0&&(R=m|0,I+=ee*R,V-=R),typeof F=="number"&&F>=0&&(R=F|0,I+=ce*R,j-=R),typeof E=="number"&&E>=0&&(R=E|0,I+=ye*R,q-=R),new S(this.data,B,O,V,j,q,U,J,ee,ce,ye,I)},L.step=function(A,T,m,F,E){var I=this.shape[0],R=this.shape[1],B=this.shape[2],O=this.shape[3],V=this.shape[4],j=this.stride[0],q=this.stride[1],U=this.stride[2],J=this.stride[3],ee=this.stride[4],ce=this.offset,ye=0,xe=Math.ceil;return typeof A=="number"&&(ye=A|0,ye<0?(ce+=j*(I-1),I=xe(-I/ye)):I=xe(I/ye),j*=ye),typeof T=="number"&&(ye=T|0,ye<0?(ce+=q*(R-1),R=xe(-R/ye)):R=xe(R/ye),q*=ye),typeof m=="number"&&(ye=m|0,ye<0?(ce+=U*(B-1),B=xe(-B/ye)):B=xe(B/ye),U*=ye),typeof F=="number"&&(ye=F|0,ye<0?(ce+=J*(O-1),O=xe(-O/ye)):O=xe(O/ye),J*=ye),typeof E=="number"&&(ye=E|0,ye<0?(ce+=ee*(V-1),V=xe(-V/ye)):V=xe(V/ye),ee*=ye),new S(this.data,I,R,B,O,V,j,q,U,J,ee,ce)},L.transpose=function(A,T,m,F,E){A=A===void 0?0:A|0,T=T===void 0?1:T|0,m=m===void 0?2:m|0,F=F===void 0?3:F|0,E=E===void 0?4:E|0;var I=this.shape,R=this.stride;return new S(this.data,I[A],I[T],I[m],I[F],I[E],R[A],R[T],R[m],R[F],R[E],this.offset)},L.pick=function(A,T,m,F,E){var I=[],R=[],B=this.offset;typeof A=="number"&&A>=0?B=B+this.stride[0]*A|0:(I.push(this.shape[0]),R.push(this.stride[0])),typeof T=="number"&&T>=0?B=B+this.stride[1]*T|0:(I.push(this.shape[1]),R.push(this.stride[1])),typeof m=="number"&&m>=0?B=B+this.stride[2]*m|0:(I.push(this.shape[2]),R.push(this.stride[2])),typeof F=="number"&&F>=0?B=B+this.stride[3]*F|0:(I.push(this.shape[3]),R.push(this.stride[3])),typeof E=="number"&&E>=0?B=B+this.stride[4]*E|0:(I.push(this.shape[4]),R.push(this.stride[4]));var O=C[I.length+1];return O(this.data,I,R,B)},function(A,T,m,F){return new S(A,T[0],T[1],T[2],T[3],T[4],m[0],m[1],m[2],m[3],m[4],F)}}};function v(_,y){var C=y===-1?"T":String(y),k=f[C];return y===-1?k(_):y===0?k(_,p[_][0]):k(_,p[_],c)}function g(_){if(s(_))return"buffer";if(l)switch(Object.prototype.toString.call(_)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(_)?"array":"generic"}var p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function x(_,y,C,k){if(_===void 0){var m=p.array[0];return m([])}else typeof _=="number"&&(_=[_]);y===void 0&&(y=[_.length]);var S=y.length;if(C===void 0){C=new Array(S);for(var L=S-1,w=1;L>=0;--L)C[L]=w,w*=y[L]}if(k===void 0){k=0;for(var L=0;L>>0;a.exports=c;function c(f,v){if(isNaN(f)||isNaN(v))return NaN;if(f===v)return f;if(f===0)return v<0?-l:l;var g=s.hi(f),p=s.lo(f);return v>f==f>0?p===u?(g+=1,p=0):p+=1:p===0?(p=u,g-=1):p-=1,s.pack(p,g)}}),8406:(function(a,i){var o=1e-6,s=1e-6;i.vertexNormals=function(l,u,c){for(var f=u.length,v=new Array(f),g=c===void 0?o:c,p=0;pg)for(var I=v[y],R=1/Math.sqrt(T*F),E=0;E<3;++E){var B=(E+1)%3,O=(E+2)%3;I[E]+=R*(m[B]*A[O]-m[O]*A[B])}}for(var p=0;pg)for(var R=1/Math.sqrt(V),E=0;E<3;++E)I[E]*=R;else for(var E=0;E<3;++E)I[E]=0}return v},i.faceNormals=function(l,u,c){for(var f=l.length,v=new Array(f),g=c===void 0?s:c,p=0;pg?L=1/Math.sqrt(L):L=0;for(var y=0;y<3;++y)S[y]*=L;v[p]=S}return v}}),4081:(function(a){"use strict";a.exports=i;function i(o,s,l,u,c,f,v,g,p,x){var _=s+f+x;if(y>0){var y=Math.sqrt(_+1);o[0]=.5*(v-p)/y,o[1]=.5*(g-u)/y,o[2]=.5*(l-f)/y,o[3]=.5*y}else{var C=Math.max(s,f,x),y=Math.sqrt(2*C-_+1);s>=C?(o[0]=.5*y,o[1]=.5*(c+l)/y,o[2]=.5*(g+u)/y,o[3]=.5*(v-p)/y):f>=C?(o[0]=.5*(l+c)/y,o[1]=.5*y,o[2]=.5*(p+v)/y,o[3]=.5*(g-u)/y):(o[0]=.5*(u+g)/y,o[1]=.5*(v+p)/y,o[2]=.5*y,o[3]=.5*(l-c)/y)}return o}}),9977:(function(a,i,o){"use strict";a.exports=y;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function v(C,k,S){return Math.sqrt(Math.pow(C,2)+Math.pow(k,2)+Math.pow(S,2))}function g(C,k,S,L){return Math.sqrt(Math.pow(C,2)+Math.pow(k,2)+Math.pow(S,2)+Math.pow(L,2))}function p(C,k){var S=k[0],L=k[1],w=k[2],A=k[3],T=g(S,L,w,A);T>1e-6?(C[0]=S/T,C[1]=L/T,C[2]=w/T,C[3]=A/T):(C[0]=C[1]=C[2]=0,C[3]=1)}function x(C,k,S){this.radius=s([S]),this.center=s(k),this.rotation=s(C),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 _=x.prototype;_.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},_.recalcMatrix=function(C){this.radius.curve(C),this.center.curve(C),this.rotation.curve(C);var k=this.computedRotation;p(k,k);var S=this.computedMatrix;u(S,k);var L=this.computedCenter,w=this.computedEye,A=this.computedUp,T=Math.exp(this.computedRadius[0]);w[0]=L[0]+T*S[2],w[1]=L[1]+T*S[6],w[2]=L[2]+T*S[10],A[0]=S[1],A[1]=S[5],A[2]=S[9];for(var m=0;m<3;++m){for(var F=0,E=0;E<3;++E)F+=S[m+4*E]*w[E];S[12+m]=-F}},_.getMatrix=function(C,k){this.recalcMatrix(C);var S=this.computedMatrix;if(k){for(var L=0;L<16;++L)k[L]=S[L];return k}return S},_.idle=function(C){this.center.idle(C),this.radius.idle(C),this.rotation.idle(C)},_.flush=function(C){this.center.flush(C),this.radius.flush(C),this.rotation.flush(C)},_.pan=function(C,k,S,L){k=k||0,S=S||0,L=L||0,this.recalcMatrix(C);var w=this.computedMatrix,A=w[1],T=w[5],m=w[9],F=v(A,T,m);A/=F,T/=F,m/=F;var E=w[0],I=w[4],R=w[8],B=E*A+I*T+R*m;E-=A*B,I-=T*B,R-=m*B;var O=v(E,I,R);E/=O,I/=O,R/=O;var V=w[2],j=w[6],q=w[10],U=V*A+j*T+q*m,J=V*E+j*I+q*R;V-=U*A+J*E,j-=U*T+J*I,q-=U*m+J*R;var ee=v(V,j,q);V/=ee,j/=ee,q/=ee;var ce=E*k+A*S,ye=I*k+T*S,xe=R*k+m*S;this.center.move(C,ce,ye,xe);var ue=Math.exp(this.computedRadius[0]);ue=Math.max(1e-4,ue+L),this.radius.set(C,Math.log(ue))},_.rotate=function(C,k,S,L){this.recalcMatrix(C),k=k||0,S=S||0;var w=this.computedMatrix,A=w[0],T=w[4],m=w[8],F=w[1],E=w[5],I=w[9],R=w[2],B=w[6],O=w[10],V=k*A+S*F,j=k*T+S*E,q=k*m+S*I,U=-(B*q-O*j),J=-(O*V-R*q),ee=-(R*j-B*V),ce=Math.sqrt(Math.max(0,1-Math.pow(U,2)-Math.pow(J,2)-Math.pow(ee,2))),ye=g(U,J,ee,ce);ye>1e-6?(U/=ye,J/=ye,ee/=ye,ce/=ye):(U=J=ee=0,ce=1);var xe=this.computedRotation,ue=xe[0],K=xe[1],_e=xe[2],ne=xe[3],ae=ue*ce+ne*U+K*ee-_e*J,pe=K*ce+ne*J+_e*U-ue*ee,ie=_e*ce+ne*ee+ue*J-K*U,le=ne*ce-ue*U-K*J-_e*ee;if(L){U=R,J=B,ee=O;var me=Math.sin(L)/v(U,J,ee);U*=me,J*=me,ee*=me,ce=Math.cos(k),ae=ae*ce+le*U+pe*ee-ie*J,pe=pe*ce+le*J+ie*U-ae*ee,ie=ie*ce+le*ee+ae*J-pe*U,le=le*ce-ae*U-pe*J-ie*ee}var be=g(ae,pe,ie,le);be>1e-6?(ae/=be,pe/=be,ie/=be,le/=be):(ae=pe=ie=0,le=1),this.rotation.set(C,ae,pe,ie,le)},_.lookAt=function(C,k,S,L){this.recalcMatrix(C),S=S||this.computedCenter,k=k||this.computedEye,L=L||this.computedUp;var w=this.computedMatrix;l(w,k,S,L);var A=this.computedRotation;f(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),p(A,A),this.rotation.set(C,A[0],A[1],A[2],A[3]);for(var T=0,m=0;m<3;++m)T+=Math.pow(S[m]-k[m],2);this.radius.set(C,.5*Math.log(Math.max(T,1e-6))),this.center.set(C,S[0],S[1],S[2])},_.translate=function(C,k,S,L){this.center.move(C,k||0,S||0,L||0)},_.setMatrix=function(C,k){var S=this.computedRotation;f(S,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),p(S,S),this.rotation.set(C,S[0],S[1],S[2],S[3]);var L=this.computedMatrix;c(L,k);var w=L[15];if(Math.abs(w)>1e-6){var A=L[12]/w,T=L[13]/w,m=L[14]/w;this.recalcMatrix(C);var F=Math.exp(this.computedRadius[0]);this.center.set(C,A-L[2]*F,T-L[6]*F,m-L[10]*F),this.radius.idle(C)}else this.center.idle(C),this.radius.idle(C)},_.setDistance=function(C,k){k>0&&this.radius.set(C,Math.log(k))},_.setDistanceLimits=function(C,k){C>0?C=Math.log(C):C=-1/0,k>0?k=Math.log(k):k=1/0,k=Math.max(k,C),this.radius.bounds[0][0]=C,this.radius.bounds[1][0]=k},_.getDistanceLimits=function(C){var k=this.radius.bounds;return C?(C[0]=Math.exp(k[0][0]),C[1]=Math.exp(k[1][0]),C):[Math.exp(k[0][0]),Math.exp(k[1][0])]},_.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]}},_.fromJSON=function(C){var k=this.lastT(),S=C.center;S&&this.center.set(k,S[0],S[1],S[2]);var L=C.rotation;L&&this.rotation.set(k,L[0],L[1],L[2],L[3]);var w=C.distance;w&&w>0&&this.radius.set(k,Math.log(w)),this.setDistanceLimits(C.zoomMin,C.zoomMax)};function y(C){C=C||{};var k=C.center||[0,0,0],S=C.rotation||[0,0,0,1],L=C.radius||1;k=[].slice.call(k,0,3),S=[].slice.call(S,0,4),p(S,S);var w=new x(S,k,Math.log(L));return w.setDistanceLimits(C.zoomMin,C.zoomMax),("eye"in C||"up"in C)&&w.lookAt(0,C.eye,C.center,C.up),w}}),1371:(function(a,i,o){"use strict";var s=o(3233);a.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}}),3202:(function(a){a.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}}),3088:(function(a,i,o){"use strict";a.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,v=u.length,g=[new Array(f),new Array(f)],p=0;p0){I=g[O][F][0],B=O;break}R=I[B^1];for(var V=0;V<2;++V)for(var j=g[V][F],q=0;q0&&(I=U,R=J,B=V)}return E||I&&y(I,B),R}function k(m,F){var E=g[F][m][0],I=[m];y(E,F);for(var R=E[F^1],B=F;;){for(;R!==m;)I.push(R),R=C(I[I.length-2],R,!1);if(g[0][m].length+g[1][m].length===0)break;var O=I[I.length-1],V=m,j=I[1],q=C(O,V,!0);if(s(c[O],c[V],c[j],c[q])<0)break;I.push(m),R=C(O,V)}return I}function S(m,F){return F[1]===F[F.length-1]}for(var p=0;p0;){var A=g[0][p].length,T=k(p,L);S(w,T)?w.push.apply(w,T):(w.length>0&&_.push(w),w=T)}w.length>0&&_.push(w)}return _}}),5609:(function(a,i,o){"use strict";a.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),v=new Array(c.length),g=new Array(c.length),p=[],x=0;x0;){var y=p.pop();v[y]=!1;for(var C=f[y],x=0;x0}A=A.filter(T);for(var m=A.length,F=new Array(m),E=new Array(m),w=0;w0;){var be=ie.pop(),De=ye[be];v(De,function(ze,ct){return ze-ct});var Ge=De.length,ht=le[be],it;if(ht===0){var j=A[be];it=[j]}for(var w=0;w=0)&&(le[Oe]=ht^1,ie.push(Oe),ht===0)){var j=A[Oe];pe(j)||(j.reverse(),it.push(j))}}ht===0&&me.push(it)}return me}}),5085:(function(a,i,o){a.exports=C;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function v(k){return function(S,L){var w=k[S];return w?!!w.queryPoint(L,f):!1}}function g(k){for(var S={},L=0;L0&&S[w]===L[0])A=k[w-1];else return 1;for(var T=1;A;){var m=A.key,F=s(L,m[0],m[1]);if(m[0][0]0)T=-1,A=A.right;else return 0;else if(F>0)A=A.left;else if(F<0)T=1,A=A.right;else return 0}return T}}function x(k){return 1}function _(k){return function(L){return k(L[0],L[1])?0:1}}function y(k,S){return function(w){return k(w[0],w[1])?0:S(w)}}function C(k){for(var S=k.length,L=[],w=[],A=0,T=0;T=x?(m=1,E=x+2*C+S):(m=-C/x,E=C*m+S)):(m=0,k>=0?(F=0,E=S):-k>=y?(F=1,E=y+2*k+S):(F=-k/y,E=k*F+S));else if(F<0)F=0,C>=0?(m=0,E=S):-C>=x?(m=1,E=x+2*C+S):(m=-C/x,E=C*m+S);else{var I=1/T;m*=I,F*=I,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S}else{var R,B,O,V;m<0?(R=_+C,B=y+k,B>R?(O=B-R,V=x-2*_+y,O>=V?(m=1,F=0,E=x+2*C+S):(m=O/V,F=1-m,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S)):(m=0,B<=0?(F=1,E=y+2*k+S):k>=0?(F=0,E=S):(F=-k/y,E=k*F+S))):F<0?(R=_+k,B=x+C,B>R?(O=B-R,V=x-2*_+y,O>=V?(F=1,m=0,E=y+2*k+S):(F=O/V,m=1-F,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S)):(F=0,B<=0?(m=1,E=x+2*C+S):C>=0?(m=0,E=S):(m=-C/x,E=C*m+S))):(O=y+k-_-C,O<=0?(m=0,F=1,E=y+2*k+S):(V=x-2*_+y,O>=V?(m=1,F=0,E=x+2*C+S):(m=O/V,F=1-m,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S)))}for(var j=1-m-F,p=0;p0){var y=f[g-1];if(s(x,y)===0&&u(y)!==_){g-=1;continue}}f[g++]=x}}return f.length=g,f}}),3233:(function(a){"use strict";var i="",o;a.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,i="";else if(i.length>=c)return i.substr(0,c);for(;c>i.length&&u>1;)u&1&&(i+=l),u>>=1,l+=l;return i+=l,i=i.substr(0,c),i}}),3025:(function(a,i,o){a.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}),7004:(function(a){"use strict";a.exports=i;function i(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,v=o[c];l=f+v;var g=l-f,p=v-g;p&&(o[--u]=l,l=p)}for(var x=0,c=u;c0){if(B<=0)return O;V=R+B}else if(R<0){if(B>=0)return O;V=-(R+B)}else return O;var j=g*V;return O>=j||O<=-j?O:k(F,E,I)},function(F,E,I,R){var B=F[0]-R[0],O=E[0]-R[0],V=I[0]-R[0],j=F[1]-R[1],q=E[1]-R[1],U=I[1]-R[1],J=F[2]-R[2],ee=E[2]-R[2],ce=I[2]-R[2],ye=O*U,xe=V*q,ue=V*j,K=B*U,_e=B*q,ne=O*j,ae=J*(ye-xe)+ee*(ue-K)+ce*(_e-ne),pe=(Math.abs(ye)+Math.abs(xe))*Math.abs(J)+(Math.abs(ue)+Math.abs(K))*Math.abs(ee)+(Math.abs(_e)+Math.abs(ne))*Math.abs(ce),ie=p*pe;return ae>ie||-ae>ie?ae:S(F,E,I,R)}];function w(m){var F=L[m.length];return F||(F=L[m.length]=C(m.length)),F.apply(void 0,m)}function A(m,F,E,I,R,B,O){return function(j,q,U,J,ee){switch(arguments.length){case 0:case 1:return 0;case 2:return I(j,q);case 3:return R(j,q,U);case 4:return B(j,q,U,J);case 5:return O(j,q,U,J,ee)}for(var ce=new Array(arguments.length),ye=0;ye0&&x>0||p<0&&x<0)return!1;var _=s(v,c,f),y=s(g,c,f);return _>0&&y>0||_<0&&y<0?!1:p===0&&x===0&&_===0&&y===0?l(c,f,v,g):!0}}),8545:(function(a){"use strict";a.exports=o;function i(s,l){var u=s+l,c=u-s,f=u-c,v=l-c,g=s-f,p=g+v;return p?[p,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return i(s[0],-l[0]);var f=u+c,v=new Array(f),g=0,p=0,x=0,_=Math.abs,y=s[p],C=_(y),k=-l[x],S=_(k),L,w;C=c?(L=y,p+=1,p=c?(L=y,p+=1,p>1,k=f[2*C+1];if(k===x)return C;x>1,k=f[2*C+1];if(k===x)return C;x>1,k=f[2*C+1];if(k===x)return C;x>1,k=f[2*C+1];if(k===x)return C;x>1,V=g(F[O],E);V<=0?(V===0&&(B=O),I=O+1):V>0&&(R=O-1)}return B}s=y;function C(F,E){for(var I=new Array(F.length),R=0,B=I.length;R=F.length||g(F[ye],O)!==0););}return I}s=C;function k(F,E){if(!E)return C(_(L(F,0)),F,0);for(var I=new Array(E),R=0;R>>U&1&&q.push(B[U]);E.push(q)}return x(E)}s=S;function L(F,E){if(E<0)return[];for(var I=[],R=(1<0)-(u<0)},i.abs=function(u){var c=u>>o-1;return(u^c)-c},i.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},i.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},i.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}i.countTrailingZeros=s,i.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},i.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},i.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,v=c,g=7;for(f>>>=1;f;f>>>=1)v<<=1,v|=f&1,--g;u[c]=v<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},i.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},i.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},i.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},i.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},i.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}}),2014:(function(a,i,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(m){for(var F=0,E=Math.max,I=0,R=m.length;I>1,O=v(m[B],F);O<=0?(O===0&&(R=B),E=B+1):O>0&&(I=B-1)}return R}i.findCell=_;function y(m,F){for(var E=new Array(m.length),I=0,R=E.length;I=m.length||v(m[ce],B)!==0););}return E}i.incidence=y;function C(m,F){if(!F)return y(x(S(m,0)),m,0);for(var E=new Array(F),I=0;I>>q&1&&j.push(R[q]);F.push(j)}return p(F)}i.explode=k;function S(m,F){if(F<0)return[];for(var E=[],I=(1<>1:(K>>1)-1}function I(K){for(var _e=F(K);;){var ne=_e,ae=2*K+1,pe=2*(K+1),ie=K;if(ae0;){var ne=E(K);if(ne>=0){var ae=F(ne);if(_e0){var K=j[0];return m(0,J-1),J-=1,I(0),K}return-1}function O(K,_e){var ne=j[K];return C[ne]===_e?K:(C[ne]=-1/0,R(K),B(),C[ne]=_e,J+=1,R(J-1))}function V(K){if(!k[K]){k[K]=!0;var _e=_[K],ne=y[K];_[ne]>=0&&(_[ne]=_e),y[_e]>=0&&(y[_e]=ne),q[_e]>=0&&O(q[_e],T(_e)),q[ne]>=0&&O(q[ne],T(ne))}}for(var j=[],q=new Array(p),S=0;S>1;S>=0;--S)I(S);for(;;){var ee=B();if(ee<0||C[ee]>g)break;V(ee)}for(var ce=[],S=0;S=0&&ne>=0&&_e!==ne){var ae=q[_e],pe=q[ne];ae!==pe&&ue.push([ae,pe])}}),l.unique(l.normalize(ue)),{positions:ce,edges:ue}}}),1303:(function(a,i,o){"use strict";a.exports=u;var s=o(3250);function l(c,f){var v,g;if(f[0][0]f[1][0])v=f[1],g=f[0];else{var p=Math.min(c[0][1],c[1][1]),x=Math.max(c[0][1],c[1][1]),_=Math.min(f[0][1],f[1][1]),y=Math.max(f[0][1],f[1][1]);return x<_?x-_:p>y?p-y:x-y}var C,k;c[0][1]f[1][0])v=f[1],g=f[0];else return l(f,c);var p,x;if(c[0][0]c[1][0])p=c[1],x=c[0];else return-l(c,f);var _=s(v,g,x),y=s(v,g,p);if(_<0){if(y<=0)return _}else if(_>0){if(y>=0)return _}else if(y)return y;if(_=s(x,p,g),y=s(x,p,v),_<0){if(y<=0)return _}else if(_>0){if(y>=0)return _}else if(y)return y;return g[0]-x[0]}}),4209:(function(a,i,o){"use strict";a.exports=y;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(C,k,S){this.slabs=C,this.coordinates=k,this.horizontal=S}var v=f.prototype;function g(C,k){return C.y-k}function p(C,k){for(var S=null;C;){var L=C.key,w,A;L[0][0]0)if(k[0]!==L[1][0])S=C,C=C.right;else{var m=p(C.right,k);if(m)return m;C=C.left}else{if(k[0]!==L[1][0])return C;var m=p(C.right,k);if(m)return m;C=C.left}}return S}v.castUp=function(C){var k=s.le(this.coordinates,C[0]);if(k<0)return-1;var S=this.slabs[k],L=p(this.slabs[k],C),w=-1;if(L&&(w=L.value),this.coordinates[k]===C[0]){var A=null;if(L&&(A=L.key),k>0){var T=p(this.slabs[k-1],C);T&&(A?c(T.key,A)>0&&(A=T.key,w=T.value):(w=T.value,A=T.key))}var m=this.horizontal[k];if(m.length>0){var F=s.ge(m,C[1],g);if(F=m.length)return w;E=m[F]}}if(E.start)if(A){var I=u(A[0],A[1],[C[0],E.y]);A[0][0]>A[1][0]&&(I=-I),I>0&&(w=E.index)}else w=E.index;else E.y!==C[1]&&(w=E.index)}}}return w};function x(C,k,S,L){this.y=C,this.index=k,this.start=S,this.closed=L}function _(C,k,S,L){this.x=C,this.segment=k,this.create=S,this.index=L}function y(C){for(var k=C.length,S=2*k,L=new Array(S),w=0;w1&&(k=1);for(var S=1-k,L=p.length,w=new Array(L),A=0;A0||C>0&&w<0){var A=c(k,w,S,C);_.push(A),y.push(A.slice())}w<0?y.push(S.slice()):w>0?_.push(S.slice()):(_.push(S.slice()),y.push(S.slice())),C=w}return{positive:_,negative:y}}function v(p,x){for(var _=[],y=u(p[p.length-1],x),C=p[p.length-1],k=p[0],S=0;S0||y>0&&L<0)&&_.push(c(C,L,k,y)),L>=0&&_.push(k.slice()),y=L}return _}function g(p,x){for(var _=[],y=u(p[p.length-1],x),C=p[p.length-1],k=p[0],S=0;S0||y>0&&L<0)&&_.push(c(C,L,k,y)),L<=0&&_.push(k.slice()),y=L}return _}}),3387:(function(a,i,o){var s;(function(){"use strict";var l={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 u(p){return f(g(p),arguments)}function c(p,x){return u.apply(null,[p].concat(x||[]))}function f(p,x){var _=1,y=p.length,C,k="",S,L,w,A,T,m,F,E;for(S=0;S=0),w.type){case"b":C=parseInt(C,10).toString(2);break;case"c":C=String.fromCharCode(parseInt(C,10));break;case"d":case"i":C=parseInt(C,10);break;case"j":C=JSON.stringify(C,null,w.width?parseInt(w.width):0);break;case"e":C=w.precision?parseFloat(C).toExponential(w.precision):parseFloat(C).toExponential();break;case"f":C=w.precision?parseFloat(C).toFixed(w.precision):parseFloat(C);break;case"g":C=w.precision?String(Number(C.toPrecision(w.precision))):parseFloat(C);break;case"o":C=(parseInt(C,10)>>>0).toString(8);break;case"s":C=String(C),C=w.precision?C.substring(0,w.precision):C;break;case"t":C=String(!!C),C=w.precision?C.substring(0,w.precision):C;break;case"T":C=Object.prototype.toString.call(C).slice(8,-1).toLowerCase(),C=w.precision?C.substring(0,w.precision):C;break;case"u":C=parseInt(C,10)>>>0;break;case"v":C=C.valueOf(),C=w.precision?C.substring(0,w.precision):C;break;case"x":C=(parseInt(C,10)>>>0).toString(16);break;case"X":C=(parseInt(C,10)>>>0).toString(16).toUpperCase();break}l.json.test(w.type)?k+=C:(l.number.test(w.type)&&(!F||w.sign)?(E=F?"+":"-",C=C.toString().replace(l.sign,"")):E="",T=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",m=w.width-(E+C).length,A=w.width&&m>0?T.repeat(m):"",k+=w.align?E+C+A:T==="0"?E+A+C:A+E+C)}return k}var v=Object.create(null);function g(p){if(v[p])return v[p];for(var x=p,_,y=[],C=0;x;){if((_=l.text.exec(x))!==null)y.push(_[0]);else if((_=l.modulo.exec(x))!==null)y.push("%");else if((_=l.placeholder.exec(x))!==null){if(_[2]){C|=1;var k=[],S=_[2],L=[];if((L=l.key.exec(S))!==null)for(k.push(L[1]);(S=S.substring(L[0].length))!=="";)if((L=l.key_access.exec(S))!==null)k.push(L[1]);else if((L=l.index_access.exec(S))!==null)k.push(L[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");_[2]=k}else C|=2;if(C===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");y.push({placeholder:_[0],param_no:_[1],keys:_[2],sign:_[3],pad_char:_[4],align:_[5],width:_[6],precision:_[7],type:_[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");x=x.substring(_[0].length)}return v[p]=y}i.sprintf=u,i.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=(function(){return{sprintf:u,vsprintf:c}}).call(i,o,i,a),s!==void 0&&(a.exports=s))})()}),3711:(function(a,i,o){"use strict";a.exports=g;var s=o(2640),l=o(781),u={"2d":function(p,x,_){var y=p({order:x,scalarArguments:3,getters:_==="generic"?[0]:void 0,phase:function(k,S,L,w){return k>w|0},vertex:function(k,S,L,w,A,T,m,F,E,I,R,B,O){var V=(m<<0)+(F<<1)+(E<<2)+(I<<3)|0;if(!(V===0||V===15))switch(V){case 0:R.push([k-.5,S-.5]);break;case 1:R.push([k-.25-.25*(w+L-2*O)/(L-w),S-.25-.25*(A+L-2*O)/(L-A)]);break;case 2:R.push([k-.75-.25*(-w-L+2*O)/(w-L),S-.25-.25*(T+w-2*O)/(w-T)]);break;case 3:R.push([k-.5,S-.5-.5*(A+L+T+w-4*O)/(L-A+w-T)]);break;case 4:R.push([k-.25-.25*(T+A-2*O)/(A-T),S-.75-.25*(-A-L+2*O)/(A-L)]);break;case 5:R.push([k-.5-.5*(w+L+T+A-4*O)/(L-w+A-T),S-.5]);break;case 6:R.push([k-.5-.25*(-w-L+T+A)/(w-L+A-T),S-.5-.25*(-A-L+T+w)/(A-L+w-T)]);break;case 7:R.push([k-.75-.25*(T+A-2*O)/(A-T),S-.75-.25*(T+w-2*O)/(w-T)]);break;case 8:R.push([k-.75-.25*(-T-A+2*O)/(T-A),S-.75-.25*(-T-w+2*O)/(T-w)]);break;case 9:R.push([k-.5-.25*(w+L+-T-A)/(L-w+T-A),S-.5-.25*(A+L+-T-w)/(L-A+T-w)]);break;case 10:R.push([k-.5-.5*(-w-L+-T-A+4*O)/(w-L+T-A),S-.5]);break;case 11:R.push([k-.25-.25*(-T-A+2*O)/(T-A),S-.75-.25*(A+L-2*O)/(L-A)]);break;case 12:R.push([k-.5,S-.5-.5*(-A-L+-T-w+4*O)/(A-L+T-w)]);break;case 13:R.push([k-.75-.25*(w+L-2*O)/(L-w),S-.25-.25*(-T-w+2*O)/(T-w)]);break;case 14:R.push([k-.25-.25*(-w-L+2*O)/(w-L),S-.25-.25*(-A-L+2*O)/(A-L)]);break;case 15:R.push([k-.5,S-.5]);break}},cell:function(k,S,L,w,A,T,m,F,E){A?F.push([k,S]):F.push([S,k])}});return function(C,k){var S=[],L=[];return y(C,S,L,k),{positions:S,cells:L}}}};function c(p,x){var _=p.length+"d",y=u[_];if(y)return y(s,p,x)}function f(p,x){for(var _=l(p,x),y=_.length,C=new Array(y),k=new Array(y),S=0;SMath.max(w,A)?T[2]=1:w>Math.max(L,A)?T[0]=1:T[1]=1;for(var m=0,F=0,E=0;E<3;++E)m+=S[E]*S[E],F+=T[E]*S[E];for(var E=0;E<3;++E)T[E]-=F/m*S[E];return f(T,T),T}function _(S,L,w,A,T,m,F,E){this.center=s(w),this.up=s(A),this.right=s(T),this.radius=s([m]),this.angle=s([F,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(S,L),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 I=0;I<16;++I)this.computedMatrix[I]=.5;this.recalcMatrix(0)}var y=_.prototype;y.setDistanceLimits=function(S,L){S>0?S=Math.log(S):S=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,S),this.radius.bounds[0][0]=S,this.radius.bounds[1][0]=L},y.getDistanceLimits=function(S){var L=this.radius.bounds[0];return S?(S[0]=Math.exp(L[0][0]),S[1]=Math.exp(L[1][0]),S):[Math.exp(L[0][0]),Math.exp(L[1][0])]},y.recalcMatrix=function(S){this.center.curve(S),this.up.curve(S),this.right.curve(S),this.radius.curve(S),this.angle.curve(S);for(var L=this.computedUp,w=this.computedRight,A=0,T=0,m=0;m<3;++m)T+=L[m]*w[m],A+=L[m]*L[m];for(var F=Math.sqrt(A),E=0,m=0;m<3;++m)w[m]-=L[m]*T/A,E+=w[m]*w[m],L[m]/=F;for(var I=Math.sqrt(E),m=0;m<3;++m)w[m]/=I;var R=this.computedToward;c(R,L,w),f(R,R);for(var B=Math.exp(this.computedRadius[0]),O=this.computedAngle[0],V=this.computedAngle[1],j=Math.cos(O),q=Math.sin(O),U=Math.cos(V),J=Math.sin(V),ee=this.computedCenter,ce=j*U,ye=q*U,xe=J,ue=-j*J,K=-q*J,_e=U,ne=this.computedEye,ae=this.computedMatrix,m=0;m<3;++m){var pe=ce*w[m]+ye*R[m]+xe*L[m];ae[4*m+1]=ue*w[m]+K*R[m]+_e*L[m],ae[4*m+2]=pe,ae[4*m+3]=0}var ie=ae[1],le=ae[5],me=ae[9],be=ae[2],De=ae[6],Ge=ae[10],ht=le*Ge-me*De,it=me*be-ie*Ge,Oe=ie*De-le*be,ze=g(ht,it,Oe);ht/=ze,it/=ze,Oe/=ze,ae[0]=ht,ae[4]=it,ae[8]=Oe;for(var m=0;m<3;++m)ne[m]=ee[m]+ae[2+4*m]*B;for(var m=0;m<3;++m){for(var E=0,ct=0;ct<3;++ct)E+=ae[m+4*ct]*ne[ct];ae[12+m]=-E}ae[15]=1},y.getMatrix=function(S,L){this.recalcMatrix(S);var w=this.computedMatrix;if(L){for(var A=0;A<16;++A)L[A]=w[A];return L}return w};var C=[0,0,0];y.rotate=function(S,L,w,A){if(this.angle.move(S,L,w),A){this.recalcMatrix(S);var T=this.computedMatrix;C[0]=T[2],C[1]=T[6],C[2]=T[10];for(var m=this.computedUp,F=this.computedRight,E=this.computedToward,I=0;I<3;++I)T[4*I]=m[I],T[4*I+1]=F[I],T[4*I+2]=E[I];u(T,T,A,C);for(var I=0;I<3;++I)m[I]=T[4*I],F[I]=T[4*I+1];this.up.set(S,m[0],m[1],m[2]),this.right.set(S,F[0],F[1],F[2])}},y.pan=function(S,L,w,A){L=L||0,w=w||0,A=A||0,this.recalcMatrix(S);var T=this.computedMatrix,m=Math.exp(this.computedRadius[0]),F=T[1],E=T[5],I=T[9],R=g(F,E,I);F/=R,E/=R,I/=R;var B=T[0],O=T[4],V=T[8],j=B*F+O*E+V*I;B-=F*j,O-=E*j,V-=I*j;var q=g(B,O,V);B/=q,O/=q,V/=q;var U=B*L+F*w,J=O*L+E*w,ee=V*L+I*w;this.center.move(S,U,J,ee);var ce=Math.exp(this.computedRadius[0]);ce=Math.max(1e-4,ce+A),this.radius.set(S,Math.log(ce))},y.translate=function(S,L,w,A){this.center.move(S,L||0,w||0,A||0)},y.setMatrix=function(S,L,w,A){var T=1;typeof w=="number"&&(T=w|0),(T<0||T>3)&&(T=1);var m=(T+2)%3,F=(T+1)%3;L||(this.recalcMatrix(S),L=this.computedMatrix);var E=L[T],I=L[T+4],R=L[T+8];if(A){var O=Math.abs(E),V=Math.abs(I),j=Math.abs(R),q=Math.max(O,V,j);O===q?(E=E<0?-1:1,I=R=0):j===q?(R=R<0?-1:1,E=I=0):(I=I<0?-1:1,E=R=0)}else{var B=g(E,I,R);E/=B,I/=B,R/=B}var U=L[m],J=L[m+4],ee=L[m+8],ce=U*E+J*I+ee*R;U-=E*ce,J-=I*ce,ee-=R*ce;var ye=g(U,J,ee);U/=ye,J/=ye,ee/=ye;var xe=I*ee-R*J,ue=R*U-E*ee,K=E*J-I*U,_e=g(xe,ue,K);xe/=_e,ue/=_e,K/=_e,this.center.jump(S,Ke,Te,Ve),this.radius.idle(S),this.up.jump(S,E,I,R),this.right.jump(S,U,J,ee);var ne,ae;if(T===2){var pe=L[1],ie=L[5],le=L[9],me=pe*U+ie*J+le*ee,be=pe*xe+ie*ue+le*K;it<0?ne=-Math.PI/2:ne=Math.PI/2,ae=Math.atan2(be,me)}else{var De=L[2],Ge=L[6],ht=L[10],it=De*E+Ge*I+ht*R,Oe=De*U+Ge*J+ht*ee,ze=De*xe+Ge*ue+ht*K;ne=Math.asin(p(it)),ae=Math.atan2(ze,Oe)}this.angle.jump(S,ae,ne),this.recalcMatrix(S);var ct=L[2],et=L[6],qe=L[10],we=this.computedMatrix;l(we,L);var Le=we[15],Ke=we[12]/Le,Te=we[13]/Le,Ve=we[14]/Le,$e=Math.exp(this.computedRadius[0]);this.center.jump(S,Ke-ct*$e,Te-et*$e,Ve-qe*$e)},y.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},y.idle=function(S){this.center.idle(S),this.up.idle(S),this.right.idle(S),this.radius.idle(S),this.angle.idle(S)},y.flush=function(S){this.center.flush(S),this.up.flush(S),this.right.flush(S),this.radius.flush(S),this.angle.flush(S)},y.setDistance=function(S,L){L>0&&this.radius.set(S,Math.log(L))},y.lookAt=function(S,L,w,A){this.recalcMatrix(S),L=L||this.computedEye,w=w||this.computedCenter,A=A||this.computedUp;var T=A[0],m=A[1],F=A[2],E=g(T,m,F);if(!(E<1e-6)){T/=E,m/=E,F/=E;var I=L[0]-w[0],R=L[1]-w[1],B=L[2]-w[2],O=g(I,R,B);if(!(O<1e-6)){I/=O,R/=O,B/=O;var V=this.computedRight,j=V[0],q=V[1],U=V[2],J=T*j+m*q+F*U;j-=J*T,q-=J*m,U-=J*F;var ee=g(j,q,U);if(!(ee<.01&&(j=m*B-F*R,q=F*I-T*B,U=T*R-m*I,ee=g(j,q,U),ee<1e-6))){j/=ee,q/=ee,U/=ee,this.up.set(S,T,m,F),this.right.set(S,j,q,U),this.center.set(S,w[0],w[1],w[2]),this.radius.set(S,Math.log(O));var ce=m*U-F*q,ye=F*j-T*U,xe=T*q-m*j,ue=g(ce,ye,xe);ce/=ue,ye/=ue,xe/=ue;var K=T*I+m*R+F*B,_e=j*I+q*R+U*B,ne=ce*I+ye*R+xe*B,ae=Math.asin(p(K)),pe=Math.atan2(ne,_e),ie=this.angle._state,le=ie[ie.length-1],me=ie[ie.length-2];le=le%(2*Math.PI);var be=Math.abs(le+2*Math.PI-pe),De=Math.abs(le-pe),Ge=Math.abs(le-2*Math.PI-pe);be0?U.pop():new ArrayBuffer(j)}i.mallocArrayBuffer=C;function k(V){return new Uint8Array(C(V),0,V)}i.mallocUint8=k;function S(V){return new Uint16Array(C(2*V),0,V)}i.mallocUint16=S;function L(V){return new Uint32Array(C(4*V),0,V)}i.mallocUint32=L;function w(V){return new Int8Array(C(V),0,V)}i.mallocInt8=w;function A(V){return new Int16Array(C(2*V),0,V)}i.mallocInt16=A;function T(V){return new Int32Array(C(4*V),0,V)}i.mallocInt32=T;function m(V){return new Float32Array(C(4*V),0,V)}i.mallocFloat32=i.mallocFloat=m;function F(V){return new Float64Array(C(8*V),0,V)}i.mallocFloat64=i.mallocDouble=F;function E(V){return c?new Uint8ClampedArray(C(V),0,V):k(V)}i.mallocUint8Clamped=E;function I(V){return f?new BigUint64Array(C(8*V),0,V):null}i.mallocBigUint64=I;function R(V){return v?new BigInt64Array(C(8*V),0,V):null}i.mallocBigInt64=R;function B(V){return new DataView(C(V),0,V)}i.mallocDataView=B;function O(V){V=s.nextPow2(V);var j=s.log2(V),q=x[j];return q.length>0?q.pop():new u(V)}i.mallocBuffer=O,i.clearCache=function(){for(var j=0;j<32;++j)g.UINT8[j].length=0,g.UINT16[j].length=0,g.UINT32[j].length=0,g.INT8[j].length=0,g.INT16[j].length=0,g.INT32[j].length=0,g.FLOAT[j].length=0,g.DOUBLE[j].length=0,g.BIGUINT64[j].length=0,g.BIGINT64[j].length=0,g.UINT8C[j].length=0,p[j].length=0,x[j].length=0}}),1755:(function(a){"use strict";"use restrict";a.exports=i;function i(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",U="",J=q.length,ee=U.length,ce=O[0]===C||O[0]===L,ye=0,xe=-ee;ye>-1&&(ye=V.indexOf(q,ye),!(ye===-1||(xe=V.indexOf(U,ye+J),xe===-1)||xe<=ye));){for(var ue=ye;ue=xe)j[ue]=null,V=V.substr(0,ue)+" "+V.substr(ue+1);else if(j[ue]!==null){var K=j[ue].indexOf(O[0]);K===-1?j[ue]+=O:ce&&(j[ue]=j[ue].substr(0,K+1)+(1+parseInt(j[ue][K+1]))+j[ue].substr(K+2))}var _e=ye+J,ne=V.substr(_e,xe-_e),ae=ne.indexOf(q);ae!==-1?ye=ae:ye=xe+ee}return j}function T(B,O,V){for(var j=O.textAlign||"start",q=O.textBaseline||"alphabetic",U=[1<<30,1<<30],J=[0,0],ee=B.length,ce=0;ce/g,` +`):V=V.replace(/\/g," ");var J="",ee=[];for(le=0;le-1?parseInt(Te[1+ot]):0,We=tt>-1?parseInt(Ve[1+tt]):0;nt!==We&&($e=$e.replace(Oe(),"?px "),De*=Math.pow(.75,We-nt),$e=$e.replace("?px ",Oe())),be+=.25*K*(We-nt)}if(U.superscripts===!0){var mt=Te.indexOf(C),bt=Ve.indexOf(C),Yt=mt>-1?parseInt(Te[1+mt]):0,jt=bt>-1?parseInt(Ve[1+bt]):0;Yt!==jt&&($e=$e.replace(Oe(),"?px "),De*=Math.pow(.75,jt-Yt),$e=$e.replace("?px ",Oe())),be-=.25*K*(jt-Yt)}if(U.bolds===!0){var mr=Te.indexOf(p)>-1,or=Ve.indexOf(p)>-1;!mr&&or&&(fr?$e=$e.replace("italic ","italic bold "):$e="bold "+$e),mr&&!or&&($e=$e.replace("bold ",""))}if(U.italics===!0){var fr=Te.indexOf(_)>-1,Ot=Ve.indexOf(_)>-1;!fr&&Ot&&($e="italic "+$e),fr&&!Ot&&($e=$e.replace("italic ",""))}O.font=$e}for(ie=0;ie0&&(q=j.size),j.lineSpacing&&j.lineSpacing>0&&(U=j.lineSpacing),j.styletags&&j.styletags.breaklines&&(J.breaklines=!!j.styletags.breaklines),j.styletags&&j.styletags.bolds&&(J.bolds=!!j.styletags.bolds),j.styletags&&j.styletags.italics&&(J.italics=!!j.styletags.italics),j.styletags&&j.styletags.subscripts&&(J.subscripts=!!j.styletags.subscripts),j.styletags&&j.styletags.superscripts&&(J.superscripts=!!j.styletags.superscripts)),V.font=[j.fontStyle,j.fontVariant,j.fontWeight,q+"px",j.font].filter(function(ce){return ce}).join(" "),V.textAlign="start",V.textBaseline="alphabetic",V.direction="ltr";var ee=m(O,V,B,q,U,J);return I(ee,j,q)}}),1538:(function(a){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(E){E.permitHostObjects___&&E.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{a.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,v=Object.getOwnPropertyNames,g=Object.defineProperty,p=Object.isExtensible,x="weakmap:",_=x+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var y=new ArrayBuffer(25),C=new Uint8Array(y);crypto.getRandomValues(C),_=x+"rand:"+Array.prototype.map.call(C,function(E){return(E%36).toString(36)}).join("")+"___"}function k(E){return!(E.substr(0,x.length)==x&&E.substr(E.length-3)==="___")}if(g(Object,"getOwnPropertyNames",{value:function(I){return v(I).filter(k)}}),"getPropertyNames"in Object){var S=Object.getPropertyNames;g(Object,"getPropertyNames",{value:function(I){return S(I).filter(k)}})}function L(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var I=E[_];if(I&&I.key===E)return I;if(p(E)){I={key:E};try{return g(E,_,{value:I,writable:!1,enumerable:!1,configurable:!1}),I}catch(R){return}}}(function(){var E=Object.freeze;g(Object,"freeze",{value:function(O){return L(O),E(O)}});var I=Object.seal;g(Object,"seal",{value:function(O){return L(O),I(O)}});var R=Object.preventExtensions;g(Object,"preventExtensions",{value:function(O){return L(O),R(O)}})})();function w(E){return E.prototype=null,Object.freeze(E)}var A=!1;function T(){!A&&typeof console!="undefined"&&(A=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var m=0,F=function(){this instanceof F||T();var E=[],I=[],R=m++;function B(q,U){var J,ee=L(q);return ee?R in ee?ee[R]:U:(J=E.indexOf(q),J>=0?I[J]:U)}function O(q){var U=L(q);return U?R in U:E.indexOf(q)>=0}function V(q,U){var J,ee=L(q);return ee?ee[R]=U:(J=E.indexOf(q),J>=0?I[J]=U:(J=E.length,I[J]=U,E[J]=q)),this}function j(q){var U=L(q),J,ee;return U?R in U&&delete U[R]:(J=E.indexOf(q),J<0?!1:(ee=E.length-1,E[J]=void 0,I[J]=I[ee],E[J]=E[ee],E.length=ee,I.length=ee,!0))}return Object.create(F.prototype,{get___:{value:w(B)},has___:{value:w(O)},set___:{value:w(V)},delete___:{value:w(j)}})};F.prototype=Object.create(Object.prototype,{get:{value:function(I,R){return this.get___(I,R)},writable:!0,configurable:!0},has:{value:function(I){return this.has___(I)},writable:!0,configurable:!0},set:{value:function(I,R){return this.set___(I,R)},writable:!0,configurable:!0},delete:{value:function(I){return this.delete___(I)},writable:!0,configurable:!0}}),typeof l=="function"?(function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function E(){this instanceof F||T();var I=new l,R=void 0,B=!1;function O(U,J){return R?I.has(U)?I.get(U):R.get___(U,J):I.get(U,J)}function V(U){return I.has(U)||(R?R.has___(U):!1)}var j;s?j=function(U,J){return I.set(U,J),I.has(U)||(R||(R=new F),R.set(U,J)),this}:j=function(U,J){if(B)try{I.set(U,J)}catch(ee){R||(R=new F),R.set___(U,J)}else I.set(U,J);return this};function q(U){var J=!!I.delete(U);return R&&R.delete___(U)||J}return Object.create(F.prototype,{get___:{value:w(O)},has___:{value:w(V)},set___:{value:w(j)},delete___:{value:w(q)},permitHostObjects___:{value:w(function(U){if(U===o)B=!0;else throw new Error("bogus call to permitHostObjects___")})}})}E.prototype=F.prototype,a.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy!="undefined"&&(Proxy=void 0),a.exports=F)})()}),236:(function(a,i,o){var s=o(8284);a.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}}),8284:(function(a){a.exports=i;function i(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}}),606:(function(a,i,o){var s=o(236);a.exports=l;function l(){var u=s();return{get:function(c,f){var v=u(c);return v.hasOwnProperty("value")?v.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}}),3349:(function(a){"use strict";function i(){return function(f,v,g,p,x,_){var y=f[0],C=g[0],k=[0],S=C;p|=0;var L=0,w=C;for(L=0;L=0!=T>=0&&x.push(k[0]+.5+.5*(A+T)/(A-T))}p+=w,++k[0]}}}function o(){return i()}var s=o;function l(f){var v={};return function(p,x,_){var y=p.dtype,C=p.order,k=[y,C.join()].join(),S=v[k];return S||(v[k]=S=f([y,C])),S(p.shape.slice(0),p.data,p.stride,p.offset|0,x,_)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}a.exports=c({funcName:"zeroCrossings"})}),781:(function(a,i,o){"use strict";a.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}}),7790:(function(){})},t={};function r(a){var i=t[a];if(i!==void 0)return i.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(a){if(typeof window=="object")return window}})()})(),(function(){r.nmd=function(a){return a.paths=[],a.children||(a.children=[]),a}})();var n=r(1964);$Pe.exports=n})()});var Mg=fe((q3r,KPe)=>{"use strict";var{normalize:HBt}=ni();function jBt(e){return e?HBt(e):[0,0,0,1]}KPe.exports=jBt});var Sg=fe((B3r,nFe)=>{"use strict";var tFe=aa(),cP=js(),$w=ni(),WBt=tc().defaultLine,JPe=Gf().isArrayOrTypedArray,pY=$w.normalize(WBt),rFe=1;function QPe(e,t){return[e[0],e[1],e[2],e[3]*t]}function vY(e){return tFe(e)||!$w.isChannelArray(e)&&!$w.isValid(e)?pY:$w.normalize(e)}function eFe(e){return tFe(e)?e:rFe}function YBt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var a=JPe(n),i=JPe(t),o=cP.extractOpts(e),s=[],l,u,c,f,v;if(o.colorscale!==void 0?l=cP.makeColorScaleFuncFromTrace(e):l=vY,a?u=(p,x)=>p[x]===void 0?pY:o.colorscale===void 0?l(p[x]):$w.normalize(l(p[x])):u=vY,i?c=function(p,x){return p[x]===void 0?rFe:eFe(p[x])}:c=eFe,a||i)for(var g=0;g{"use strict";iFe.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]}});var fP=fe((N3r,aFe)=>{"use strict";aFe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var sFe=fe((U3r,oFe)=>{"use strict";var ZBt=bi();function mY(e,t,r,n){if(!t||!t.visible)return null;for(var a=ZBt.getComponentMethod("errorbars","makeComputeError")(t),i=new Array(e.length),o=0;o0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else i[o]=[-s[0]*r,s[1]*r]}return i}function $Bt(e){for(var t=0;t{"use strict";var JBt=xf().gl_line3d,lFe=xf().gl_scatter3d,QBt=xf().gl_error3d,eOt=xf().gl_mesh3d,tOt=xf().delaunay_triangulate,Eg=Xt(),dFe=Mg(),hP=Sg().formatColor,rOt=lT(),yY=gY(),nOt=fP(),iOt=Yi(),aOt=Sd().appendArrayPointValue,oOt=sFe();function vFe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var _Y=vFe.prototype;_Y.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(Eg.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function sOt(e,t,r){var n=(r+1)%3,a=(r+2)%3,i=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function cFe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function uOt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var a=0;a=0){var u=sOt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=eOt(u),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)};_Y.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function dOt(e,t){var r=new vFe(e,t.uid);return r.update(t),r}pFe.exports=dOt});var MY=fe((G3r,_Fe)=>{"use strict";var kg=Ol(),vOt=Ds(),AY=_s(),bY=pl().axisHoverFormat,{hovertemplateAttrs:pOt,texttemplateAttrs:gOt,templatefallbackAttrs:mFe}=Oo(),yFe=Ho(),mOt=gY(),yOt=fP(),Ep=ta().extendFlat,xOt=rl().overrideAll,xFe=(bx(),Gs(_x)).default,_Ot=kg.line,n_=kg.marker,bOt=n_.line,wOt=Ep({width:_Ot.width,dash:{valType:"enumerated",values:xFe(mOt),dflt:"solid"}},AY("line"));function wY(e){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var TY=_Fe.exports=xOt({x:kg.x,y:kg.y,z:{valType:"data_array"},text:Ep({},kg.text,{}),texttemplate:gOt(),texttemplatefallback:mFe({editType:"calc"}),hovertext:Ep({},kg.hovertext,{}),hovertemplate:pOt(),hovertemplatefallback:mFe(),xhoverformat:bY("x"),yhoverformat:bY("y"),zhoverformat:bY("z"),mode:Ep({},kg.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:wY("x"),y:wY("y"),z:wY("z")},connectgaps:kg.connectgaps,line:wOt,marker:Ep({symbol:{valType:"enumerated",values:xFe(yOt),dflt:"circle",arrayOk:!0},size:Ep({},n_.size,{dflt:8}),sizeref:n_.sizeref,sizemin:n_.sizemin,sizemode:n_.sizemode,opacity:Ep({},n_.opacity,{arrayOk:!1}),colorbar:n_.colorbar,line:Ep({width:Ep({},bOt.width,{arrayOk:!1})},AY("marker.line"))},AY("marker")),textposition:Ep({},kg.textposition,{dflt:"top center"}),textfont:vOt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:yFe.opacity,hoverinfo:Ep({},yFe.hoverinfo)},"calc","nested");TY.x.editType=TY.y.editType=TY.z.editType="calc+clearAxisTypes"});var TFe=fe((H3r,wFe)=>{"use strict";var bFe=bi(),TOt=Xt(),SY=Is(),AOt=vv(),MOt=lp(),SOt=up(),EOt=MY();wFe.exports=function(t,r,n,a){function i(g,p){return TOt.coerce(t,r,EOt,g,p)}var o=kOt(t,r,i,a);if(!o){r.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),i("mode"),SY.hasMarkers(r)&&AOt(t,r,n,a,i,{noAngle:!0,noLineDash:!0,noSelect:!0}),SY.hasLines(r)&&(i("connectgaps"),MOt(t,r,n,a,i)),SY.hasText(r)&&(i("texttemplate"),i("texttemplatefallback"),SOt(t,r,a,i,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;i("surfaceaxis")>=0&&i("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];i(f+".show")&&(i(f+".opacity"),i(f+".scale"))}var v=bFe.getComponentMethod("errorbars","supplyDefaults");v(t,r,s||l||n,{axis:"z"}),v(t,r,s||l||n,{axis:"y",inherit:"z"}),v(t,r,s||l||n,{axis:"x",inherit:"z"})};function kOt(e,t,r,n){var a=0,i=r("x"),o=r("y"),s=r("z"),l=bFe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],n),i&&o&&s&&(a=Math.min(i.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=a),a}});var MFe=fe((j3r,AFe)=>{"use strict";var COt=o1(),LOt=pv();AFe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return COt(n,r),LOt(t,r),n}});var EFe=fe((W3r,SFe)=>{SFe.exports=POt;function POt(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var n=t,a;try{var i=[e];e.indexOf("webgl")===0&&i.push("experimental-"+e);for(var o=0;o{var FOt=EFe();kFe.exports=function(t){return FOt("webgl",t)}});var EY=fe((X3r,PFe)=>{"use strict";var LFe=ni(),DOt=function(){};PFe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=DOt);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=LFe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=LFe.lightLine,n.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",n.appendChild(a),t.container.appendChild(n),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var RFe=fe((Z3r,DFe)=>{"use strict";var i_=Mg(),ROt=Xt(),IOt=["xaxis","yaxis","zaxis"];function FFe(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var zOt=FFe.prototype;zOt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var a=t[IOt[n]];if(!a.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?ROt.templateString(a.title.text,e._meta):a.title.text,"font"in a.title&&(a.title.font.color&&(r.labelColor[n]=i_(a.title.font.color)),a.title.font.family&&(r.labelFont[n]=a.title.font.family),a.title.font.size&&(r.labelSize[n]=a.title.font.size),a.title.font.weight&&(r.labelFontWeight[n]=a.title.font.weight),a.title.font.style&&(r.labelFontStyle[n]=a.title.font.style),a.title.font.variant&&(r.labelFontVariant[n]=a.title.font.variant)),"showline"in a&&(r.lineEnable[n]=a.showline),"linecolor"in a&&(r.lineColor[n]=i_(a.linecolor)),"linewidth"in a&&(r.lineWidth[n]=a.linewidth),"showgrid"in a&&(r.gridEnable[n]=a.showgrid),"gridcolor"in a&&(r.gridColor[n]=i_(a.gridcolor)),"gridwidth"in a&&(r.gridWidth[n]=a.gridwidth),a.type==="log"?r.zeroEnable[n]=!1:"zeroline"in a&&(r.zeroEnable[n]=a.zeroline),"zerolinecolor"in a&&(r.zeroLineColor[n]=i_(a.zerolinecolor)),"zerolinewidth"in a&&(r.zeroLineWidth[n]=a.zerolinewidth),"ticks"in a&&a.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,"ticklen"in a&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=a.ticklen),"tickcolor"in a&&(r.lineTickColor[n]=i_(a.tickcolor)),"tickwidth"in a&&(r.lineTickWidth[n]=a.tickwidth),"tickangle"in a&&(r.tickAngle[n]=a.tickangle==="auto"?-3600:Math.PI*-a.tickangle/180),"showticklabels"in a&&(r.tickEnable[n]=a.showticklabels),"tickfont"in a&&(a.tickfont.color&&(r.tickColor[n]=i_(a.tickfont.color)),a.tickfont.family&&(r.tickFont[n]=a.tickfont.family),a.tickfont.size&&(r.tickSize[n]=a.tickfont.size),a.tickfont.weight&&(r.tickFontWeight[n]=a.tickfont.weight),a.tickfont.style&&(r.tickFontStyle[n]=a.tickfont.style),a.tickfont.variant&&(r.tickFontVariant[n]=a.tickfont.variant)),"mirror"in a?["ticks","all","allticks"].indexOf(a.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):a.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,"showbackground"in a&&a.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=i_(a.backgroundcolor)):r.backgroundEnable[n]=!1}};function qOt(e,t){var r=new FFe;return r.merge(e,t),r}DFe.exports=qOt});var qFe=fe(($3r,zFe)=>{"use strict";var BOt=Mg(),OOt=["xaxis","yaxis","zaxis"];function IFe(){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]}var NOt=IFe.prototype;NOt.merge=function(e){for(var t=0;t<3;++t){var r=e[OOt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=BOt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function UOt(e){var t=new IFe;return t.merge(e),t}zFe.exports=UOt});var NFe=fe((K3r,OFe)=>{"use strict";OFe.exports=WOt;var BFe=Yi(),VOt=Xt(),GOt=["xaxis","yaxis","zaxis"],HOt=[0,0,0];function jOt(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],a=new Array(n.length),i=0;i/g," "));a[i]=u,o.tickmode=s}}t.ticks=a;for(var i=0;i<3;++i){HOt[i]=.5*(e.glplot.bounds[0][i]+e.glplot.bounds[1][i]);for(var c=0;c<2;++c)t.bounds[c][i]=e.glplot.bounds[c][i]}e.contourLevels=jOt(a)}});var YFe=fe((J3r,WFe)=>{"use strict";var GFe=xf().gl_plot3d,YOt=GFe.createCamera,UFe=GFe.createScene,XOt=CFe(),ZOt=Uk(),pP=bi(),Dd=Xt(),vP=Dd.preserveDrawingBuffer(),gP=Yi(),kp=kl(),$Ot=Mg(),KOt=EY(),JOt=VU(),QOt=RFe(),eNt=qFe(),tNt=NFe(),rNt=rp().applyAutorangeOptions,rM,dP,HFe=!1;function jFe(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.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=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=QOt(t,t[this.id]),this.spikeOptions=eNt(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=pP.getComponentMethod("annotations3d","convert"),this.drawAnnotations=pP.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Dh=jFe.prototype;Dh.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:vP,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!dP&&(rM=document.createElement("canvas"),dP=XOt({canvas:rM,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!dP))throw new Error("error creating static canvas/context for image server");t.gl=dP,t.canvas=rM}return t};var VFe=!0;Dh.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=UFe(t)}catch(n){if(e.staticMode||!VFe||vP)r=!1;else{Dd.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{vP=t.glOptions.preserveDrawingBuffer=!0,e.glplot=UFe(t)}catch(a){vP=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return VFe=!1,r};Dh.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=YOt(e.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:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};Dh.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return KOt(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,a=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},i=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=a();o.saveLayout(n),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){i(e)}),e.glplot.canvas.addEventListener("touchstart",function(){HFe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}i(e)}},ZOt?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=a();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Dh.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,a=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var i=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=a.width*i,l=a.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),tNt(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,v=0;v")):r.type==="isosurface"||r.type==="volume"?(y.valueLabel=gP.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),w.push("value: "+y.valueLabel),f.textLabel&&w.push(f.textLabel),L=w.join("
")):L=f.textLabel;var A={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:_};kp.appendArrayPointValue(A,x,_),r._module.eventData&&(A=x._module.eventData(A,f,x,{},_));var T={points:[A]};if(e.fullSceneLayout.hovermode){var m=[];kp.loneHover({trace:x,x:(.5+.5*p[0]/p[3])*s,y:(.5-.5*p[1]/p[3])*l,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:L,name:c.name,color:kp.castHoverOption(x,_,"bgcolor")||c.color,borderColor:kp.castHoverOption(x,_,"bordercolor"),fontFamily:kp.castHoverOption(x,_,"font.family"),fontSize:kp.castHoverOption(x,_,"font.size"),fontColor:kp.castHoverOption(x,_,"font.color"),nameLength:kp.castHoverOption(x,_,"namelength"),textAlign:kp.castHoverOption(x,_,"align"),hovertemplate:Dd.castOption(x,_,"hovertemplate"),hovertemplateLabels:Dd.extendFlat({},A,y),eventData:[A]},{container:n,gd:t,inOut_bbox:m}),A.bbox=m[0]}f.distance<5&&(f.buttons||HFe)?t.emit("plotly_click",T):t.emit("plotly_hover",T),this.oldEventData=T}else kp.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Dh.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){Dd.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var nM=["xaxis","yaxis","zaxis"];function nNt(e,t,r){for(var n=e.fullSceneLayout,a=0;a<3;a++){var i=nM[a],o=i.charAt(0),s=n[i],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!Dd.isArrayOrTypedArray(l))r[0][a]=Math.min(r[0][a],0),r[1][a]=Math.max(r[1][a],c-1);else for(var f,v=0;v<(c||l.length);v++)if(Dd.isArrayOrTypedArray(l[v]))for(var g=0;gx[1][o])x[0][o]=-1,x[1][o]=1;else{var E=x[1][o]-x[0][o];x[0][o]-=E/32,x[1][o]+=E/32}if(C=[x[0][o],x[1][o]],C=rNt(C,l),x[0][o]=C[0],x[1][o]=C[1],l.isReversed()){var I=x[0][o];x[0][o]=x[1][o],x[1][o]=I}}else C=l.range,x[0][o]=l.r2l(C[0]),x[1][o]=l.r2l(C[1]);x[0][o]===x[1][o]&&(x[0][o]-=1,x[1][o]+=1),_[o]=x[1][o]-x[0][o],l.range=[x[0][o],x[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*g[o],max:l.range[1]*g[o]})}var R,B=c.aspectmode;if(B==="cube")R=[1,1,1];else if(B==="manual"){var O=c.aspectratio;R=[O.x,O.y,O.z]}else if(B==="auto"||B==="data"){var V=[1,1,1];for(o=0;o<3;++o){l=c[nM[o]],u=l.type;var j=y[u];V[o]=Math.pow(j.acc,1/j.count)/g[o]}B==="data"||Math.max.apply(null,V)/Math.min.apply(null,V)<=4?R=V:R=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=R[0],c.aspectratio.y=f.aspectratio.y=R[1],c.aspectratio.z=f.aspectratio.z=R[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var q=c.domain||null,U=t._size||null;if(q&&U){var J=n.container.style;J.position="absolute",J.left=U.l+q.x[0]*U.w+"px",J.top=U.t+(1-q.y[1])*U.h+"px",J.width=U.w*(q.x[1]-q.x[0])+"px",J.height=U.h*(q.y[1]-q.y[0])+"px"}n.glplot.redraw()}};Dh.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function aNt(e){return[[e.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]]}function oNt(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}Dh.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),oNt(e.camera)};Dh.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,aNt(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type==="orthographic",a=t.camera._ortho;n!==a&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Dh.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=Dd.nestedProperty(e,t.id+".camera"),a=n.get();function i(u,c,f,v){var g=["up","center","eye"],p=["x","y","z"];return c[g[f]]&&u[g[f]][p[v]]===c[g[f]][p[v]]}var o=!1;if(a===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!i(r,a,s,l)){o=!0;break}(!a.projection||r.projection&&r.projection.type!==a.projection.type)&&(o=!0)}return o};Dh.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=Dd.nestedProperty(e,t.id+".aspectratio"),a=n.get();return a===void 0||a.x!==r.x||a.y!==r.y||a.z!==r.z};Dh.saveLayout=function(e){var t=this,r=t.fullLayout,n,a,i,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var v={};if(u&&(n=t.getCamera(),a=Dd.nestedProperty(e,t.id+".camera"),i=a.get(),v[t.id+".camera"]=i),c&&(o=t.glplot.getAspectratio(),s=Dd.nestedProperty(e,t.id+".aspectratio"),l=s.get(),v[t.id+".aspectratio"]=l),pP.call("_storeDirectGUIEdit",e,r._preGUI,v),u){a.set(n);var g=Dd.nestedProperty(r,t.id+".camera");g.set(n)}if(c){s.set(o);var p=Dd.nestedProperty(r,t.id+".aspectratio");p.set(o),t.glplot.redraw()}}return f};Dh.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e==="orbit")n.mode="orbit",n.keyBindingMode="rotate";else if(e==="turntable"){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var a=r.graphDiv,i=a._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},v={};v[c]=f;var g=a.layout;pP.call("_storeDirectGUIEdit",g,i._preGUI,v),o.up=f,Dd.nestedProperty(g,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function sNt(e,t,r){for(var n=0,a=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[i+l]=Math.min(s*e[i+l],255)}}Dh.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(rM),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var i=new Uint8Array(n*a*4);r.readPixels(0,0,n,a,r.RGBA,r.UNSIGNED_BYTE,i),sNt(i,n,a),lNt(i,n,a);var o=document.createElement("canvas");o.width=n,o.height=a;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(n,a);l.data.set(i),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(rM),u};Dh.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[nM[t]];gP.setConvert(r,e.fullLayout),r.setScale=Dd.noop}};Dh.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},gP.setConvert(e._mockAxis,r)};WFe.exports=jFe});var ZFe=fe((Q3r,XFe)=>{"use strict";XFe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var CY=fe((ewr,$Fe)=>{"use strict";var uNt=ni(),Va=pf(),kY=ta().extendFlat,cNt=rl().overrideAll;$Fe.exports=cNt({visible:Va.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:uNt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:Va.color,categoryorder:Va.categoryorder,categoryarray:Va.categoryarray,title:{text:Va.title.text,font:Va.title.font},type:kY({},Va.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Va.autotypenumbers,autorange:Va.autorange,autorangeoptions:{minallowed:Va.autorangeoptions.minallowed,maxallowed:Va.autorangeoptions.maxallowed,clipmin:Va.autorangeoptions.clipmin,clipmax:Va.autorangeoptions.clipmax,include:Va.autorangeoptions.include,editType:"plot"},rangemode:Va.rangemode,minallowed:Va.minallowed,maxallowed:Va.maxallowed,range:kY({},Va.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:Va.minor.tickmode,nticks:Va.nticks,tick0:Va.tick0,dtick:Va.dtick,tickvals:Va.tickvals,ticktext:Va.ticktext,ticks:Va.ticks,mirror:Va.mirror,ticklen:Va.ticklen,tickwidth:Va.tickwidth,tickcolor:Va.tickcolor,showticklabels:Va.showticklabels,labelalias:Va.labelalias,tickfont:Va.tickfont,tickangle:Va.tickangle,tickprefix:Va.tickprefix,showtickprefix:Va.showtickprefix,ticksuffix:Va.ticksuffix,showticksuffix:Va.showticksuffix,showexponent:Va.showexponent,exponentformat:Va.exponentformat,minexponent:Va.minexponent,separatethousands:Va.separatethousands,tickformat:Va.tickformat,tickformatstops:Va.tickformatstops,hoverformat:Va.hoverformat,showline:Va.showline,linecolor:Va.linecolor,linewidth:Va.linewidth,showgrid:Va.showgrid,gridcolor:kY({},Va.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:Va.gridwidth,zeroline:Va.zeroline,zerolinecolor:Va.zerolinecolor,zerolinewidth:Va.zerolinewidth},"plot","from-root")});var DY=fe((twr,KFe)=>{"use strict";var LY=CY(),fNt=nl().attributes,PY=ta().extendFlat,hNt=Xt().counterRegex;function FY(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}KFe.exports={_arrayAttrRegexps:[hNt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:PY(FY(0,0,1),{}),center:PY(FY(0,0,0),{}),eye:PY(FY(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:fNt({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:LY,yaxis:LY,zaxis:LY,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"}});var tDe=fe((rwr,eDe)=>{"use strict";var dNt=ni(),JFe=Xt(),vNt=Mo(),pNt=CY(),gNt=SU(),mNt=vA(),QFe=["xaxis","yaxis","zaxis"],yNt=13600/187;eDe.exports=function(t,r,n){var a,i;function o(u,c){return JFe.coerce(a,i,pNt,u,c)}for(var s=0;s{"use strict";var xNt=Xt(),_Nt=ni(),bNt=bi(),wNt=b2(),TNt=tDe(),rDe=DY(),ANt=jf().getSubplotData,nDe="gl3d";iDe.exports=function(t,r,n){var a=r._basePlotModules.length>1;function i(o){if(!a){var s=xNt.validate(t[o],rDe[o]);if(s)return t[o]}}wNt(t,r,n,{type:nDe,attributes:rDe,handleDefaults:MNt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:i,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function MNt(e,t,r,n){for(var a=r("bgcolor"),i=_Nt.combine(a,n.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(v="turntable")}else v="turntable";r("dragmode",v),r("hovermode",n.getDfltFromLayout("hovermode"))}});var gy=fe(Rd=>{"use strict";var SNt=rl().overrideAll,ENt=tm(),kNt=YFe(),CNt=jf().getSubplotData,LNt=Xt(),PNt=Q0(),Kw="gl3d",RY="scene";Rd.name=Kw;Rd.attr=RY;Rd.idRoot=RY;Rd.idRegex=Rd.attrRegex=LNt.counterRegex("scene");Rd.attributes=ZFe();Rd.layoutAttributes=DY();Rd.baseLayoutAttrOverrides=SNt({hoverlabel:ENt.hoverlabel},"plot","nested");Rd.supplyLayoutDefaults=aDe();Rd.plot=function(t){for(var r=t._fullLayout,n=t._fullData,a=r._subplots[Kw],i=0;i{"use strict";oDe.exports={plot:gFe(),attributes:MY(),markerSymbols:fP(),supplyDefaults:TFe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:MFe(),moduleType:"trace",name:"scatter3d",basePlotModule:gy(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var uDe=fe((owr,lDe)=>{"use strict";lDe.exports=sDe()});var iM=fe((swr,hDe)=>{"use strict";var cDe=ni(),FNt=_s(),IY=pl().axisHoverFormat,{hovertemplateAttrs:DNt,templatefallbackAttrs:RNt}=Oo(),fDe=Ho(),zY=ta().extendFlat,INt=rl().overrideAll;function qY(e){return{valType:"boolean",dflt:!1}}function BY(e){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:qY("x"),y:qY("y"),z:qY("z")},color:{valType:"color",dflt:cDe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:cDe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var OY=hDe.exports=INt(zY({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:DNt(),hovertemplatefallback:RNt(),xhoverformat:IY("x"),yhoverformat:IY("y"),zhoverformat:IY("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},FNt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:BY("x"),y:BY("y"),z:BY("z")},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,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:zY({},fDe.hoverinfo),showlegend:zY({},fDe.showlegend,{dflt:!1})}),"calc","nested");OY.x.editType=OY.y.editType=OY.z.editType="calc+clearAxisTypes"});var UY=fe((lwr,pDe)=>{"use strict";var zNt=bi(),dDe=Xt(),qNt=Vc(),BNt=iM(),NY=.1;function ONt(e,t){for(var r=[],n=32,a=0;a{"use strict";var gDe=Mh();mDe.exports=function(t,r){r.surfacecolor?gDe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):gDe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var ADe=fe((cwr,TDe)=>{"use strict";var VNt=xf().gl_surface3d,Jw=xf().ndarray,GNt=xf().ndarray_linear_interpolate.d2,HNt=d7(),jNt=v7(),aM=Xt().isArrayOrTypedArray,WNt=Sg().parseColorScale,xDe=Mg(),YNt=js().extractOpts;function bDe(e,t,r){this.scene=e,this.uid=r,this.surface=t,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 Cp=bDe.prototype;Cp.getXat=function(e,t,r,n){var a=aM(this.data.x)?aM(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?a:n.d2l(a,0,r)};Cp.getYat=function(e,t,r,n){var a=aM(this.data.y)?aM(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?a:n.d2l(a,0,r)};Cp.getZat=function(e,t,r,n){var a=this.data.z[t][e];return a===null&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[t][e]),r===void 0?a:n.d2l(a,0,r)};Cp.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,a],e.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],e.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=e.dataCoordinate[i];o!=null&&(e.dataCoordinate[i]*=this.scene.dataScale[i])}var s=this.data.hovertext||this.data.text;return aM(s)&&s[a]&&s[a][n]!==void 0?e.textLabel=s[a][n]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function XNt(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var Qw=[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 ZNt(e,t){if(e0){r=Qw[n];break}return r}function KNt(e,t){if(!(e<1||t<1)){for(var r=VY(e),n=VY(t),a=1,i=0;imP;)n--,n/=$Nt(n),n++,n<_De&&(n=mP);var a=Math.round(n/e);return a>1?a:1};function QNt(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function eUt(e,t,r){return tUt(e,t,QNt,r),e}function tUt(e,t,r,n){for(var a=[0,0],i=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,a=this.contourStart[n];av&&(this.minValues[u]=v),this.maxValues[u]{"use strict";MDe.exports={attributes:iM(),supplyDefaults:UY().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:yDe(),plot:ADe(),moduleType:"trace",name:"surface",basePlotModule:gy(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var kDe=fe((hwr,EDe)=>{"use strict";EDe.exports=SDe()});var e5=fe((dwr,LDe)=>{"use strict";var iUt=_s(),GY=pl().axisHoverFormat,{hovertemplateAttrs:aUt,templatefallbackAttrs:oUt}=Oo(),my=iM(),CDe=Ho(),yy=ta().extendFlat;LDe.exports=yy({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:aUt({editType:"calc"}),hovertemplatefallback:oUt({editType:"calc"}),xhoverformat:GY("x"),yhoverformat:GY("y"),zhoverformat:GY("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"}},iUt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:my.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:yy({},my.contours.x.show,{}),color:my.contours.x.color,width:my.contours.x.width,editType:"calc"},lightposition:{x:yy({},my.lightposition.x,{dflt:1e5}),y:yy({},my.lightposition.y,{dflt:1e5}),z:yy({},my.lightposition.z,{dflt:0}),editType:"calc"},lighting:yy({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},my.lighting),hoverinfo:yy({},CDe.hoverinfo,{editType:"calc"}),showlegend:yy({},CDe.showlegend,{dflt:!1})})});var xP=fe((vwr,FDe)=>{"use strict";var sUt=_s(),yP=pl().axisHoverFormat,{hovertemplateAttrs:lUt,templatefallbackAttrs:uUt}=Oo(),oM=e5(),PDe=Ho(),HY=ta().extendFlat,cUt=rl().overrideAll;function jY(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function WY(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var t5=FDe.exports=cUt(HY({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:jY("x"),y:jY("y"),z:jY("z")},caps:{x:WY("x"),y:WY("y"),z:WY("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:lUt(),hovertemplatefallback:uUt(),xhoverformat:yP("x"),yhoverformat:yP("y"),zhoverformat:yP("z"),valuehoverformat:yP("value",1),showlegend:HY({},PDe.showlegend,{dflt:!1})},sUt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:oM.opacity,lightposition:oM.lightposition,lighting:oM.lighting,flatshading:oM.flatshading,contour:oM.contour,hoverinfo:HY({},PDe.hoverinfo)}),"calc","nested");t5.flatshading.dflt=!0;t5.lighting.facenormalsepsilon.dflt=0;t5.x.editType=t5.y.editType=t5.z.editType=t5.value.editType="calc+clearAxisTypes"});var YY=fe((pwr,RDe)=>{"use strict";var fUt=Xt(),hUt=bi(),dUt=xP(),vUt=Vc();function pUt(e,t,r,n){function a(i,o){return fUt.coerce(e,t,dUt,i,o)}DDe(e,t,r,n,a)}function DDe(e,t,r,n,a){var i=a("isomin"),o=a("isomax");o!=null&&i!==void 0&&i!==null&&i>o&&(t.isomin=null,t.isomax=null);var s=a("x"),l=a("y"),u=a("z"),c=a("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=hUt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach(function(x){a(x+"hoverformat");var _="caps."+x,y=a(_+".show");y&&a(_+".fill");var C="slices."+x,k=a(C+".show");k&&(a(C+".fill"),a(C+".locations"))});var v=a("spaceframe.show");v&&a("spaceframe.fill");var g=a("surface.show");g&&(a("surface.count"),a("surface.fill"),a("surface.pattern"));var p=a("contour.show");p&&(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(x){a(x)}),vUt(e,t,n,a,{prefix:"",cLetter:"c"}),t._length=null}RDe.exports={supplyDefaults:pUt,supplyIsoDefaults:DDe}});var _P=fe((gwr,zDe)=>{"use strict";var ZY=Xt(),gUt=Mh();function mUt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=T1(t.u,t._len),t._v=T1(t.v,t._len),t._w=T1(t.w,t._len),t._x=T1(t.x,t._len),t._y=T1(t.y,t._len),t._z=T1(t.z,t._len);var r=IDe(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,a,i,o;t.starts&&(a=T1(t.starts.x||[]),i=T1(t.starts.y||[]),o=T1(t.starts.z||[]),n=Math.min(a.length,i.length,o.length)),t._startsX=a||[],t._startsY=i||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(k=t[a-1],L=r[a-1],A=n[a-1]),i=0;ik?"-":"+")+"x"),p=p.replace("y",(S>L?"-":"+")+"y"),p=p.replace("z",(w>A?"-":"+")+"z");var E=function(){a=0,T=[],m=[],F=[]};(!a||a{"use strict";var yUt=Mh(),xUt=_P().processGrid,bP=_P().filter;qDe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=bP(r.x,r._len),r._y=bP(r.y,r._len),r._z=bP(r.z,r._len),r._value=bP(r.value,r._len);var n=xUt(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var a=1/0,i=-1/0,o=0;o{"use strict";BDe.exports=function(t,r,n,a){a=a||t.length;for(var i=new Array(a),o=0;o{"use strict";var _Ut=xf().gl_mesh3d,bUt=Sg().parseColorScale,wUt=Xt().isArrayOrTypedArray,TUt=Mg(),AUt=js().extractOpts,ODe=r5(),sM=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),a=Math.max(t[r],t[r-1]);if(a>n&&n-1}function ee($e,ot){return $e===null?ot:$e}function ce($e,ot,tt){E();var nt=[ot],We=[tt];if(j>=1)nt=[ot],We=[tt];else if(j>0){var mt=U(ot,tt);nt=mt.xyzv,We=mt.abc}for(var bt=0;bt-1?tt[jt]:F(mr,or,fr);cr>-1?Yt[jt]=cr:Yt[jt]=R(mr,or,fr,ee($e,Ot))}B(Yt[0],Yt[1],Yt[2])}}function ye($e,ot,tt){var nt=function(We,mt,bt){ce($e,[ot[We],ot[mt],ot[bt]],[tt[We],tt[mt],tt[bt]])};nt(0,1,2),nt(2,3,0)}function xe($e,ot,tt){var nt=function(We,mt,bt){ce($e,[ot[We],ot[mt],ot[bt]],[tt[We],tt[mt],tt[bt]])};nt(0,1,2),nt(3,0,1),nt(2,3,0),nt(1,2,3)}function ue($e,ot,tt,nt){var We=$e[3];Went&&(We=nt);for(var mt=($e[3]-We)/($e[3]-ot[3]+1e-9),bt=[],Yt=0;Yt<4;Yt++)bt[Yt]=(1-mt)*$e[Yt]+mt*ot[Yt];return bt}function K($e,ot,tt){return $e>=ot&&$e<=tt}function _e($e){var ot=.001*(L-S);return $e>=S-ot&&$e<=L+ot}function ne($e){for(var ot=[],tt=0;tt<4;tt++){var nt=$e[tt];ot.push([e._x[nt],e._y[nt],e._z[nt],e._value[nt]])}return ot}var ae=3;function pe($e,ot,tt,nt,We,mt){mt||(mt=1),tt=[-1,-1,-1];var bt=!1,Yt=[K(ot[0][3],nt,We),K(ot[1][3],nt,We),K(ot[2][3],nt,We)];if(!Yt[0]&&!Yt[1]&&!Yt[2])return!1;var jt=function(or,fr,Ot){return _e(fr[0][3])&&_e(fr[1][3])&&_e(fr[2][3])?(ce(or,fr,Ot),!0):mtYt?[C,mt]:[mt,k];et(ot,jt[0],jt[1])}}var mr=[[Math.min(S,k),Math.max(S,k)],[Math.min(C,L),Math.max(C,L)]];["x","y","z"].forEach(function(or){for(var fr=[],Ot=0;Ot0&&(Lt.push(rr.id),or==="x"?ft.push([rr.distRatio,0,0]):or==="y"?ft.push([0,rr.distRatio,0]):ft.push([0,0,rr.distRatio]))}else or==="x"?Mt=Ke(1,g-1):or==="y"?Mt=Ke(1,p-1):Mt=Ke(1,x-1);Lt.length>0&&(or==="x"?fr[cr]=qe($e,Lt,Ct,wt,ft,fr[cr]):or==="y"?fr[cr]=we($e,Lt,Ct,wt,ft,fr[cr]):fr[cr]=Le($e,Lt,Ct,wt,ft,fr[cr]),cr++),Mt.length>0&&(or==="x"?fr[cr]=ht($e,Mt,Ct,wt,fr[cr]):or==="y"?fr[cr]=it($e,Mt,Ct,wt,fr[cr]):fr[cr]=Oe($e,Mt,Ct,wt,fr[cr]),cr++)}var pr=e.caps[or];pr.show&&pr.fill&&(q(pr.fill),or==="x"?fr[cr]=ht($e,[0,g-1],Ct,wt,fr[cr]):or==="y"?fr[cr]=it($e,[0,p-1],Ct,wt,fr[cr]):fr[cr]=Oe($e,[0,x-1],Ct,wt,fr[cr]),cr++)}}),s===0&&I(),e._meshX=w,e._meshY=A,e._meshZ=T,e._meshIntensity=m,e._Xs=c,e._Ys=f,e._Zs=v}return Ve(),e}function SUt(e,t){var r=e.glplot.gl,n=_Ut({gl:r}),a=new NDe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}VDe.exports={findNearestOnAxis:sM,generateIsoMeshes:UDe,createIsosurfaceTrace:SUt}});var HDe=fe((_wr,GDe)=>{"use strict";GDe.exports={attributes:xP(),supplyDefaults:YY().supplyDefaults,calc:$Y(),colorbar:{min:"cmin",max:"cmax"},plot:wP().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var WDe=fe((bwr,jDe)=>{"use strict";jDe.exports=HDe()});var QY=fe((wwr,XDe)=>{"use strict";var EUt=_s(),Ou=xP(),kUt=iM(),YDe=Ho(),JY=ta().extendFlat,CUt=rl().overrideAll,TP=XDe.exports=CUt(JY({x:Ou.x,y:Ou.y,z:Ou.z,value:Ou.value,isomin:Ou.isomin,isomax:Ou.isomax,surface:Ou.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Ou.slices,caps:Ou.caps,text:Ou.text,hovertext:Ou.hovertext,xhoverformat:Ou.xhoverformat,yhoverformat:Ou.yhoverformat,zhoverformat:Ou.zhoverformat,valuehoverformat:Ou.valuehoverformat,hovertemplate:Ou.hovertemplate,hovertemplatefallback:Ou.hovertemplatefallback},EUt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Ou.colorbar,opacity:Ou.opacity,opacityscale:kUt.opacityscale,lightposition:Ou.lightposition,lighting:Ou.lighting,flatshading:Ou.flatshading,contour:Ou.contour,hoverinfo:JY({},YDe.hoverinfo),showlegend:JY({},YDe.showlegend,{dflt:!1})}),"calc","nested");TP.x.editType=TP.y.editType=TP.z.editType=TP.value.editType="calc+clearAxisTypes"});var $De=fe((Twr,ZDe)=>{"use strict";var LUt=Xt(),PUt=QY(),FUt=YY().supplyIsoDefaults,DUt=UY().opacityscaleDefaults;ZDe.exports=function(t,r,n,a){function i(o,s){return LUt.coerce(t,r,PUt,o,s)}FUt(t,r,n,a,i),DUt(t,r,a,i)}});var eRe=fe((Awr,QDe)=>{"use strict";var RUt=xf().gl_mesh3d,IUt=Sg().parseColorScale,zUt=Xt().isArrayOrTypedArray,qUt=Mg(),BUt=js().extractOpts,KDe=r5(),eX=wP().findNearestOnAxis,OUt=wP().generateIsoMeshes;function JDe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var tX=JDe.prototype;tX.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],a=this.data._meshZ[t],i=this.data._Ys.length,o=this.data._Zs.length,s=eX(r,this.data._Xs).id,l=eX(n,this.data._Ys).id,u=eX(a,this.data._Zs).id,c=e.index=u+o*l+o*i*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return zUt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};tX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=OUt(e);function n(l,u,c,f){return u.map(function(v){return l.d2l(v,0,f)*c})}var a=KDe(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),i=KDe(e._meshI,e._meshJ,e._meshK),o={positions:a,cells:i,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:qUt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=BUt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=IUt(e),this.mesh.update(o)};tX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function NUt(e,t){var r=e.glplot.gl,n=RUt({gl:r}),a=new JDe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}QDe.exports=NUt});var rRe=fe((Mwr,tRe)=>{"use strict";tRe.exports={attributes:QY(),supplyDefaults:$De(),calc:$Y(),colorbar:{min:"cmin",max:"cmax"},plot:eRe(),moduleType:"trace",name:"volume",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var iRe=fe((Swr,nRe)=>{"use strict";nRe.exports=rRe()});var sRe=fe((Ewr,oRe)=>{"use strict";var UUt=bi(),aRe=Xt(),VUt=Vc(),GUt=e5();oRe.exports=function(t,r,n,a){function i(c,f){return aRe.coerce(t,r,GUt,c,f)}function o(c){var f=c.map(function(v){var g=i(v);return g&&aRe.isArrayOrTypedArray(g)?g:null});return f.every(function(v){return v&&v.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=UUt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],a),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(c){i(c)});var u=i("contour.show");u&&(i("contour.color"),i("contour.width")),"intensity"in t?(i("intensity"),i("intensitymode"),VUt(t,r,a,i,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?i("facecolor"):"vertexcolor"in t?i("vertexcolor"):i("color",n)),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var uRe=fe((kwr,lRe)=>{"use strict";var HUt=Mh();lRe.exports=function(t,r){r.intensity&&HUt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var vRe=fe((Cwr,dRe)=>{"use strict";var jUt=xf().gl_mesh3d,WUt=xf().delaunay_triangulate,YUt=xf().alpha_shape,XUt=xf().convex_hull,ZUt=Sg().parseColorScale,$Ut=Xt().isArrayOrTypedArray,aX=Mg(),KUt=js().extractOpts,cRe=r5();function hRe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var oX=hRe.prototype;oX.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return $Ut(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function fRe(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}oX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,a=cRe(rX(r.xaxis,e.x,t.dataScale[0],e.xcalendar),rX(r.yaxis,e.y,t.dataScale[1],e.ycalendar),rX(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),i;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!iX(e.i,n)||!iX(e.j,n)||!iX(e.k,n))return;i=cRe(nX(e.i),nX(e.j),nX(e.k))}else e.alphahull===0?i=XUt(a):e.alphahull>0?i=YUt(e.alphahull,a):i=JUt(e.delaunayaxis,a);var o={positions:a,cells:i,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:aX(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=KUt(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=ZUt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=fRe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=fRe(e.facecolor)):(this.color=e.color,o.meshColor=aX(e.color));this.mesh.update(o)};oX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function QUt(e,t){var r=e.glplot.gl,n=jUt({gl:r}),a=new hRe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}dRe.exports=QUt});var gRe=fe((Lwr,pRe)=>{"use strict";pRe.exports={attributes:e5(),supplyDefaults:sRe(),calc:uRe(),colorbar:{min:"cmin",max:"cmax"},plot:vRe(),moduleType:"trace",name:"mesh3d",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var yRe=fe((Pwr,mRe)=>{"use strict";mRe.exports=gRe()});var lX=fe((Fwr,_Re)=>{"use strict";var eVt=_s(),n5=pl().axisHoverFormat,{hovertemplateAttrs:tVt,templatefallbackAttrs:rVt}=Oo(),nVt=e5(),xRe=Ho(),sX=ta().extendFlat,AP={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","raw"],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:tVt({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:rVt({editType:"calc"}),uhoverformat:n5("u",1),vhoverformat:n5("v",1),whoverformat:n5("w",1),xhoverformat:n5("x"),yhoverformat:n5("y"),zhoverformat:n5("z"),showlegend:sX({},xRe.showlegend,{dflt:!1})};sX(AP,eVt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var iVt=["opacity","lightposition","lighting"];iVt.forEach(function(e){AP[e]=nVt[e]});AP.hoverinfo=sX({},xRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});_Re.exports=AP});var wRe=fe((Dwr,bRe)=>{"use strict";var aVt=Xt(),oVt=Vc(),sVt=lX();bRe.exports=function(t,r,n,a){function i(g,p){return aVt.coerce(t,r,sVt,g,p)}var o=i("u"),s=i("v"),l=i("w"),u=i("x"),c=i("y"),f=i("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var v=i("sizemode");i("sizeref",v==="raw"?1:.5),i("anchor"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),oVt(t,r,a,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var ARe=fe((Rwr,TRe)=>{"use strict";var lVt=Mh();TRe.exports=function(t,r){for(var n=r.u,a=r.v,i=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,a.length,i.length),s=-1/0,l=1/0,u=0;u{"use strict";var uVt=xf().gl_cone3d,cVt=xf().gl_cone3d.createConeMesh,fVt=Xt().simpleMap,hVt=Sg().parseColorScale,dVt=js().extractOpts,vVt=Xt().isArrayOrTypedArray,MRe=r5();function SRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var uX=SRe.prototype;uX.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],a=this.data.z[t],i=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,a,i,o,s,Math.sqrt(i*i+o*o+s*s)];var l=this.data.hovertext||this.data.text;return vVt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var pVt={xaxis:0,yaxis:1,zaxis:2},gVt={tip:1,tail:0,cm:.25,center:.5},mVt={tip:1,tail:1,cm:.75,center:.5};function ERe(e,t){var r=e.fullSceneLayout,n=e.dataScale,a={};function i(c,f){var v=r[f],g=n[pVt[f]];return fVt(c,function(p){return v.d2l(p)*g})}a.vectors=MRe(i(t.u,"xaxis"),i(t.v,"yaxis"),i(t.w,"zaxis"),t._len),a.positions=MRe(i(t.x,"xaxis"),i(t.y,"yaxis"),i(t.z,"zaxis"),t._len);var o=dVt(t);a.colormap=hVt(t),a.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],a.coneOffset=gVt[t.anchor];var s=t.sizemode;s==="scaled"?a.coneSize=t.sizeref||.5:s==="absolute"?a.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(a.coneSize=t.sizeref),a.coneSizemode=s;var l=uVt(a),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=mVt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}uX.update=function(e){this.data=e;var t=ERe(this.scene,e);this.mesh.update(t)};uX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function yVt(e,t){var r=e.glplot.gl,n=ERe(e,t),a=cVt(r,n),i=new SRe(e,t.uid);return i.mesh=a,i.data=t,a._trace=i,e.glplot.add(a),i}kRe.exports=yVt});var PRe=fe((zwr,LRe)=>{"use strict";LRe.exports={moduleType:"trace",name:"cone",basePlotModule:gy(),categories:["gl3d","showLegend"],attributes:lX(),supplyDefaults:wRe(),colorbar:{min:"cmin",max:"cmax"},calc:ARe(),plot:CRe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var DRe=fe((qwr,FRe)=>{"use strict";FRe.exports=PRe()});var fX=fe((Bwr,IRe)=>{"use strict";var xVt=_s(),i5=pl().axisHoverFormat,{hovertemplateAttrs:_Vt,templatefallbackAttrs:bVt}=Oo(),wVt=e5(),RRe=Ho(),cX=ta().extendFlat,MP={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:_Vt({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:bVt({editType:"calc"}),uhoverformat:i5("u",1),vhoverformat:i5("v",1),whoverformat:i5("w",1),xhoverformat:i5("x"),yhoverformat:i5("y"),zhoverformat:i5("z"),showlegend:cX({},RRe.showlegend,{dflt:!1})};cX(MP,xVt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var TVt=["opacity","lightposition","lighting"];TVt.forEach(function(e){MP[e]=wVt[e]});MP.hoverinfo=cX({},RRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});IRe.exports=MP});var qRe=fe((Owr,zRe)=>{"use strict";var AVt=Xt(),MVt=Vc(),SVt=fX();zRe.exports=function(t,r,n,a){function i(v,g){return AVt.coerce(t,r,SVt,v,g)}var o=i("u"),s=i("v"),l=i("w"),u=i("x"),c=i("y"),f=i("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}i("starts.x"),i("starts.y"),i("starts.z"),i("maxdisplayed"),i("sizeref"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),MVt(t,r,a,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var jRe=fe((Nwr,HRe)=>{"use strict";var NRe=xf().gl_streamtube3d,EVt=NRe.createTubeMesh,kVt=Xt(),CVt=Sg().parseColorScale,LVt=js().extractOpts,BRe=r5(),URe={xaxis:0,yaxis:1,zaxis:2};function VRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var dX=VRe.prototype;dX.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[URe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var a=e.data.position,i=e.data.velocity;return e.traceCoordinate=[n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function ORe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function hX(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function GRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,a=t._len,i={};function o(I,R){var B=r[R],O=n[URe[R]];return kVt.simpleMap(I,function(V){return B.d2l(V)*O})}if(i.vectors=BRe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),a),!a)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");i.meshgrid=[s,l,u],i.gridFill=t._gridFill;var c=t._slen;if(c)i.startingPositions=BRe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],v=ORe(s),g=ORe(u),p=new Array(v.length*g.length),x=0,_=0;_{"use strict";WRe.exports={moduleType:"trace",name:"streamtube",basePlotModule:gy(),categories:["gl3d","showLegend"],attributes:fX(),supplyDefaults:qRe(),colorbar:{min:"cmin",max:"cmax"},calc:_P().calc,plot:jRe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var ZRe=fe((Vwr,XRe)=>{"use strict";XRe.exports=YRe()});var a5=fe((Gwr,eIe)=>{"use strict";var{hovertemplateAttrs:FVt,texttemplateAttrs:DVt,templatefallbackAttrs:$Re}=Oo(),RVt=n1(),A1=Ol(),IVt=Ho(),KRe=_s(),zVt=Uc().dash,a_=ta().extendFlat,qVt=rl().overrideAll,Rv=A1.marker,JRe=A1.line,QRe=Rv.line;eIe.exports=qVt({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:a_({},A1.mode,{dflt:"markers"}),text:a_({},A1.text,{}),texttemplate:DVt({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:$Re({editType:"plot"}),hovertext:a_({},A1.hovertext,{}),textfont:A1.textfont,textposition:A1.textposition,line:{color:JRe.color,width:JRe.width,dash:zVt},connectgaps:A1.connectgaps,marker:a_({symbol:Rv.symbol,opacity:Rv.opacity,angle:Rv.angle,angleref:a_({},Rv.angleref,{values:["previous","up","north"]}),standoff:Rv.standoff,size:Rv.size,sizeref:Rv.sizeref,sizemin:Rv.sizemin,sizemode:Rv.sizemode,colorbar:Rv.colorbar,line:a_({width:QRe.width,dash:QRe.dash},KRe("marker.line")),gradient:Rv.gradient},KRe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:RVt(),selected:A1.selected,unselected:A1.unselected,hoverinfo:a_({},IVt.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:FVt(),hovertemplatefallback:$Re()},"calc","nested")});var rIe=fe((Hwr,tIe)=>{"use strict";var vX=Xt(),pX=Is(),BVt=vv(),OVt=lp(),NVt=up(),UVt=a1(),VVt=a5();tIe.exports=function(t,r,n,a){function i(g,p){return vX.coerce(t,r,VVt,g,p)}var o=i("locations"),s;if(o&&o.length){var l=i("geojson"),u;(typeof l=="string"&&l!==""||vX.isPlainObject(l))&&(u="geojson-id");var c=i("locationmode",u);c==="geojson-id"&&i("featureidkey"),s=o.length}else{var f=i("lon")||[],v=i("lat")||[];s=Math.min(f.length,v.length)}if(!s){r.visible=!1;return}r._length=s,i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("mode"),pX.hasMarkers(r)&&BVt(t,r,n,a,i,{gradient:!0}),pX.hasLines(r)&&(OVt(t,r,n,a,i),i("connectgaps")),pX.hasText(r)&&(i("texttemplate"),i("texttemplatefallback"),NVt(t,r,a,i)),i("fill"),r.fill!=="none"&&UVt(t,r,n,i),vX.coerceSelectionMarkerOpacity(r,i)}});var aIe=fe((jwr,iIe)=>{"use strict";var nIe=Yi();iIe.exports=function(t,r,n){var a={},i=n[r.geo]._subplot,o=i.mockAxis,s=t.lonlat;return a.lonLabel=nIe.tickText(o,o.c2l(s[0]),!0).text,a.latLabel=nIe.tickText(o,o.c2l(s[1]),!0).text,a}});var mX=fe((Wwr,uIe)=>{"use strict";var gX=aa(),oIe=Wa().BADNUM,GVt=pv(),HVt=o1(),jVt=P0(),WVt=Xt().isArrayOrTypedArray,sIe=Xt()._;function lIe(e){return e&&typeof e=="string"}uIe.exports=function(t,r){var n=WVt(r.locations),a=n?r.locations.length:r._length,i=new Array(a),o;r.geojson?o=function(v){return lIe(v)||gX(v)}:o=lIe;for(var s=0;s{"use strict";th.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"};th.axesNames=["lonaxis","lataxis"];th.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};th.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};th.fitboundsIncompatible=new Set(["albers usa","craig","peirce quincuncial","satellite"]);th.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}};th.clipPad=.001;th.precision=.1;th.landColor="#F0DC82";th.waterColor="#3399FF";th.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};th.sphereSVG={type:"Sphere"};th.fillLayers={ocean:1,land:1,lakes:1};th.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};th.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];th.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];th.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var yX=fe((SP,cIe)=>{(function(e,t){typeof SP=="object"&&typeof cIe!="undefined"?t(SP):(e=e||self,t(e.topojson=e.topojson||{}))})(SP,function(e){"use strict";function t(k){return k}function r(k){if(k==null)return t;var S,L,w=k.scale[0],A=k.scale[1],T=k.translate[0],m=k.translate[1];return function(F,E){E||(S=L=0);var I=2,R=F.length,B=new Array(R);for(B[0]=(S+=F[0])*w+T,B[1]=(L+=F[1])*A+m;IT&&(T=I[0]),I[1]m&&(m=I[1])}function E(I){switch(I.type){case"GeometryCollection":I.geometries.forEach(E);break;case"Point":F(I.coordinates);break;case"MultiPoint":I.coordinates.forEach(F);break}}k.arcs.forEach(function(I){for(var R=-1,B=I.length,O;++RT&&(T=O[0]),O[1]m&&(m=O[1])});for(L in k.objects)E(k.objects[L]);return[w,A,T,m]}function a(k,S){for(var L,w=k.length,A=w-S;A<--w;)L=k[A],k[A++]=k[w],k[w]=L}function i(k,S){return typeof S=="string"&&(S=k.objects[S]),S.type==="GeometryCollection"?{type:"FeatureCollection",features:S.geometries.map(function(L){return o(k,L)})}:o(k,S)}function o(k,S){var L=S.id,w=S.bbox,A=S.properties==null?{}:S.properties,T=s(k,S);return L==null&&w==null?{type:"Feature",properties:A,geometry:T}:w==null?{type:"Feature",id:L,properties:A,geometry:T}:{type:"Feature",id:L,bbox:w,properties:A,geometry:T}}function s(k,S){var L=r(k.transform),w=k.arcs;function A(R,B){B.length&&B.pop();for(var O=w[R<0?~R:R],V=0,j=O.length;V1)w=f(k,S,L);else for(A=0,w=new Array(T=k.arcs.length);A1)for(var B=1,O=F(I[0]),V,j;BO&&(j=I[0],I[0]=I[B],I[B]=j,O=V);return I}).filter(function(E){return E.length>0})}}function x(k,S){for(var L=0,w=k.length;L>>1;k[A]=2))throw new Error("n must be \u22652");E=k.bbox||n(k);var L=E[0],w=E[1],A=E[2],T=E[3],m;S={scale:[A-L?(A-L)/(m-1):1,T-w?(T-w)/(m-1):1],translate:[L,w]}}else E=k.bbox;var F=y(S),E,I,R=k.objects,B={};function O(q){return F(q)}function V(q){var U;switch(q.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:q.geometries.map(V)};break;case"Point":U={type:"Point",coordinates:O(q.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:q.coordinates.map(O)};break;default:return q}return q.id!=null&&(U.id=q.id),q.bbox!=null&&(U.bbox=q.bbox),q.properties!=null&&(U.properties=q.properties),U}function j(q){var U=0,J=1,ee=q.length,ce,ye=new Array(ee);for(ye[0]=F(q[0],0);++U{"use strict";var xX=fIe.exports={},YVt=lM().locationmodeToLayer,XVt=yX().feature;xX.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};xX.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};xX.getTopojsonFeatures=function(e,t){var r=YVt[e.locationmode],n=t.objects[r];return XVt(t,n).features}});var cM=fe(uM=>{"use strict";var ZVt=Wa().BADNUM;uM.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],a=[],i=0;i0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n};uM.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};uM.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{"use strict";var bX=Object.defineProperty,$Vt=Object.getOwnPropertyDescriptor,KVt=Object.getOwnPropertyNames,JVt=Object.prototype.hasOwnProperty,QVt=(e,t)=>{for(var r in t)bX(e,r,{get:t[r],enumerable:!0})},eGt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of KVt(t))!JVt.call(e,a)&&a!==r&&bX(e,a,{get:()=>t[a],enumerable:!(n=$Vt(t,a))||n.enumerable});return e},tGt=e=>eGt(bX({},"__esModule",{value:!0}),e),hIe={};QVt(hIe,{COUNTRIES:()=>dIe,byAlpha2:()=>aGt,byAlpha3:()=>iGt,byM49:()=>oGt,createLookup:()=>vIe,lookup:()=>rGt,lookupAlpha3:()=>nGt,sanitize:()=>_X});pIe.exports=tGt(hIe);var dIe=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function _X(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function vIe(e){let t=new Map,r=new Map,n=new Map;for(let s of e)t.set(s.iso3,s),s.iso2&&r.set(s.iso2,s),s.m49&&n.set(s.m49,s);let a=new Map;for(let s of e)for(let l of[s.name,...s.aliases]){let u=_X(l),c=a.get(u);if(c!==void 0&&c!==s.iso3)throw new Error(`Duplicate name/alias "${u}": ${c} vs ${s.iso3}`);a.set(u,s.iso3)}function i(s){if(s==null)return;let l=String(s).trim();if(!l)return;if(/^\d+$/.test(l)){let c=n.get(String(parseInt(l,10)).padStart(3,"0"));if(c)return c}if(/^[A-Za-z]{2}$/.test(l)){let c=r.get(l.toUpperCase());if(c)return c}if(/^[A-Za-z]{3}$/.test(l)){let c=t.get(l.toUpperCase());if(c)return c}let u=a.get(_X(l));return u===void 0?void 0:t.get(u)}function o(s){var l;return(l=i(s))==null?void 0:l.iso3}return{lookup:i,lookupAlpha3:o,byAlpha3:t,byAlpha2:r,byM49:n}}var fM=vIe(dIe),rGt=fM.lookup,nGt=fM.lookupAlpha3,iGt=fM.byAlpha3,aGt=fM.byAlpha2,oGt=fM.byM49});var LP=fe(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var f0=63710088e-1,TX={centimeters:f0*100,centimetres:f0*100,degrees:360/(2*Math.PI),feet:f0*3.28084,inches:f0*39.37,kilometers:f0/1e3,kilometres:f0/1e3,meters:f0,metres:f0,miles:f0/1609.344,millimeters:f0*1e3,millimetres:f0*1e3,nauticalmiles:f0/1852,radians:1,yards:f0*1.0936},wX={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function xy(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function sGt(e,t,r={}){switch(e){case"Point":return AX(t).geometry;case"LineString":return SX(t).geometry;case"Polygon":return MX(t).geometry;case"MultiPoint":return yIe(t).geometry;case"MultiLineString":return mIe(t).geometry;case"MultiPolygon":return xIe(t).geometry;default:throw new Error(e+" is invalid")}}function AX(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!kP(e[0])||!kP(e[1]))throw new Error("coordinates must contain numbers");return xy({type:"Point",coordinates:e},t,r)}function lGt(e,t,r={}){return CP(e.map(n=>AX(n,t)),r)}function MX(e,t,r={}){for(let a of e){if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(a[a.length-1].length!==a[0].length)throw new Error("First and last Position are not equivalent.");for(let i=0;iMX(n,t)),r)}function SX(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return xy({type:"LineString",coordinates:e},t,r)}function cGt(e,t,r={}){return CP(e.map(n=>SX(n,t)),r)}function CP(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function mIe(e,t,r={}){return xy({type:"MultiLineString",coordinates:e},t,r)}function yIe(e,t,r={}){return xy({type:"MultiPoint",coordinates:e},t,r)}function xIe(e,t,r={}){return xy({type:"MultiPolygon",coordinates:e},t,r)}function fGt(e,t,r={}){return xy({type:"GeometryCollection",geometries:e},t,r)}function hGt(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function _Ie(e,t="kilometers"){let r=TX[t];if(!r)throw new Error(t+" units is invalid");return e*r}function EX(e,t="kilometers"){let r=TX[t];if(!r)throw new Error(t+" units is invalid");return e/r}function dGt(e,t){return bIe(EX(e,t))}function vGt(e){let t=e%360;return t<0&&(t+=360),t}function pGt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function bIe(e){return e%(2*Math.PI)*180/Math.PI}function gGt(e){return e%360*Math.PI/180}function mGt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return _Ie(EX(e,t),r)}function yGt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=wX[t];if(!n)throw new Error("invalid original units");let a=wX[r];if(!a)throw new Error("invalid final units");return e/n*a}function kP(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function xGt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function _Gt(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!kP(t))throw new Error("bbox must only contain numbers")})}function bGt(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}Cs.areaFactors=wX;Cs.azimuthToBearing=pGt;Cs.bearingToAzimuth=vGt;Cs.convertArea=yGt;Cs.convertLength=mGt;Cs.degreesToRadians=gGt;Cs.earthRadius=f0;Cs.factors=TX;Cs.feature=xy;Cs.featureCollection=CP;Cs.geometry=sGt;Cs.geometryCollection=fGt;Cs.isNumber=kP;Cs.isObject=xGt;Cs.lengthToDegrees=dGt;Cs.lengthToRadians=EX;Cs.lineString=SX;Cs.lineStrings=cGt;Cs.multiLineString=mIe;Cs.multiPoint=yIe;Cs.multiPolygon=xIe;Cs.point=AX;Cs.points=lGt;Cs.polygon=MX;Cs.polygons=uGt;Cs.radiansToDegrees=bIe;Cs.radiansToLength=_Ie;Cs.round=hGt;Cs.validateBBox=_Gt;Cs.validateId=bGt});var FP=fe(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var ud=LP();function hM(e,t,r){if(e!==null)for(var n,a,i,o,s,l,u,c=0,f=0,v,g=e.type,p=g==="FeatureCollection",x=g==="Feature",_=p?e.features.length:1,y=0;y<_;y++){u=p?e.features[y].geometry:x?e.geometry:e,v=u?u.type==="GeometryCollection":!1,s=v?u.geometries.length:1;for(var C=0;Cl||p>u||x>c){s=f,l=n,u=p,c=x,i=0;return}var _=ud.lineString.call(void 0,[s,f],r.properties);if(t(_,n,a,x,i)===!1)return!1;i++,s=f})===!1)return!1}}})}function kGt(e,t,r){var n=r,a=!1;return AIe(e,function(i,o,s,l,u){a===!1&&r===void 0?n=i:n=t(n,i,o,s,l,u),a=!0}),n}function MIe(e,t){if(!e)throw new Error("geojson is required");PP(e,function(r,n,a){if(r.geometry!==null){var i=r.geometry.type,o=r.geometry.coordinates;switch(i){case"LineString":if(t(r,n,a,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(DP,"__esModule",{value:!0});var SIe=LP(),FGt=FP();function CIe(e){return FGt.geomReduce.call(void 0,e,(t,r)=>t+DGt(r),0)}function DGt(e){let t=0,r;switch(e.type){case"Polygon":return EIe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(kIe(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=a[0]*CX,l=i[1]*CX,u=o[0]*CX;r+=(u-s)*Math.sin(l),n++}return r*RGt}var IGt=CIe;DP.area=CIe;DP.default=IGt});var FIe=fe(RP=>{"use strict";Object.defineProperty(RP,"__esModule",{value:!0});var zGt=LP(),qGt=FP();function PIe(e,t={}){let r=0,n=0,a=0;return qGt.coordEach.call(void 0,e,function(i){r+=i[0],n+=i[1],a++},!0),zGt.point.call(void 0,[r/a,n/a],t.properties)}var BGt=PIe;RP.centroid=PIe;RP.default=BGt});var RIe=fe((IP,DIe)=>{(function(e,t){t(typeof IP=="object"&&typeof DIe!="undefined"?IP:e.d3=e.d3||{})})(IP,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)<0?ie=me+1:le=me}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)>0?le=me:ie=me+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],me=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,me=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,me,be;if(ae==null){for(;++ie=le)for(me=be=le;++iele&&(me=le),be=le)for(me=be=le;++iele&&(me=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(me=Math.ceil(ae-ne+1));++le=0?(me>=L?10:me>=w?5:me>=A?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(me>=L?10:me>=w?5:me>=A?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),me=ie/le;return me>=L?le*=10:me>=w?le*=5:me>=A&&(le*=2),aeOe;)ze.pop(),--ct;var et=new Array(ct+1),qe;for(me=0;me<=ct;++me)qe=et[me]=[],qe.x0=me>0?ze[me-1]:it,qe.x1=me=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,me=Math.floor(le),be=+pe(ne[me],me,ne),De=+pe(ne[me+1],me+1,ne);return be+(De-be)*(le-me)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function V(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++ieme&&(me=le)}else for(;++ie=le)for(me=le;++ieme&&(me=le);return me}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,me,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)me[--le]=be[pe];return me}function J(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++iele&&(me=le)}else for(;++ie=le)for(me=le;++iele&&(me=le);return me}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,me,be=ne[le];for(ae==null&&(ae=t);++ie{(function(e,t){typeof zP=="object"&&typeof IIe!="undefined"?t(zP,RIe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(zP,(function(e,t){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(Ze){i(a,Ze,this.t),i(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new n;function i(Ze,yt,Wt){var zt=Ze.s=yt+Wt,hr=zt-yt,Ur=zt-hr;Ze.t=yt-Ur+(Wt-hr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,v=180/l,g=l/180,p=Math.abs,x=Math.atan,_=Math.atan2,y=Math.cos,C=Math.ceil,k=Math.exp,S=Math.log,L=Math.pow,w=Math.sin,A=Math.sign||function(Ze){return Ze>0?1:Ze<0?-1:0},T=Math.sqrt,m=Math.tan;function F(Ze){return Ze>1?0:Ze<-1?l:Math.acos(Ze)}function E(Ze){return Ze>1?u:Ze<-1?-u:Math.asin(Ze)}function I(Ze){return(Ze=w(Ze/2))*Ze}function R(){}function B(Ze,yt){Ze&&V.hasOwnProperty(Ze.type)&&V[Ze.type](Ze,yt)}var O={Feature:function(Ze,yt){B(Ze.geometry,yt)},FeatureCollection:function(Ze,yt){for(var Wt=Ze.features,zt=-1,hr=Wt.length;++zt=0?1:-1,hr=zt*Wt,Ur=y(yt),Qr=w(yt),cn=K*Qr,yn=ue*Ur+cn*y(hr),Fn=cn*zt*w(hr);J.add(_(Fn,yn)),xe=Ze,ue=Ur,K=Qr}function le(Ze){return ee.reset(),U(Ze,_e),ee*2}function me(Ze){return[_(Ze[1],Ze[0]),E(Ze[2])]}function be(Ze){var yt=Ze[0],Wt=Ze[1],zt=y(Wt);return[zt*y(yt),zt*w(yt),w(Wt)]}function De(Ze,yt){return Ze[0]*yt[0]+Ze[1]*yt[1]+Ze[2]*yt[2]}function Ge(Ze,yt){return[Ze[1]*yt[2]-Ze[2]*yt[1],Ze[2]*yt[0]-Ze[0]*yt[2],Ze[0]*yt[1]-Ze[1]*yt[0]]}function ht(Ze,yt){Ze[0]+=yt[0],Ze[1]+=yt[1],Ze[2]+=yt[2]}function it(Ze,yt){return[Ze[0]*yt,Ze[1]*yt,Ze[2]*yt]}function Oe(Ze){var yt=T(Ze[0]*Ze[0]+Ze[1]*Ze[1]+Ze[2]*Ze[2]);Ze[0]/=yt,Ze[1]/=yt,Ze[2]/=yt}var ze,ct,et,qe,we,Le,Ke,Te,Ve=r(),$e,ot,tt={point:nt,lineStart:mt,lineEnd:bt,polygonStart:function(){tt.point=Yt,tt.lineStart=jt,tt.lineEnd=mr,Ve.reset(),_e.polygonStart()},polygonEnd:function(){_e.polygonEnd(),tt.point=nt,tt.lineStart=mt,tt.lineEnd=bt,J<0?(ze=-(et=180),ct=-(qe=90)):Ve>o?qe=90:Ve<-o&&(ct=-90),ot[0]=ze,ot[1]=et},sphere:function(){ze=-(et=180),ct=-(qe=90)}};function nt(Ze,yt){$e.push(ot=[ze=Ze,et=Ze]),ytqe&&(qe=yt)}function We(Ze,yt){var Wt=be([Ze*g,yt*g]);if(Te){var zt=Ge(Te,Wt),hr=[zt[1],-zt[0],0],Ur=Ge(hr,zt);Oe(Ur),Ur=me(Ur);var Qr=Ze-we,cn=Qr>0?1:-1,yn=Ur[0]*v*cn,Fn,en=p(Qr)>180;en^(cn*weqe&&(qe=Fn)):(yn=(yn+360)%360-180,en^(cn*weqe&&(qe=yt))),en?Zeor(ze,et)&&(et=Ze):or(Ze,et)>or(ze,et)&&(ze=Ze):et>=ze?(Zeet&&(et=Ze)):Ze>we?or(ze,Ze)>or(ze,et)&&(et=Ze):or(Ze,et)>or(ze,et)&&(ze=Ze)}else $e.push(ot=[ze=Ze,et=Ze]);ytqe&&(qe=yt),Te=Wt,we=Ze}function mt(){tt.point=We}function bt(){ot[0]=ze,ot[1]=et,tt.point=nt,Te=null}function Yt(Ze,yt){if(Te){var Wt=Ze-we;Ve.add(p(Wt)>180?Wt+(Wt>0?360:-360):Wt)}else Le=Ze,Ke=yt;_e.point(Ze,yt),We(Ze,yt)}function jt(){_e.lineStart()}function mr(){Yt(Le,Ke),_e.lineEnd(),p(Ve)>o&&(ze=-(et=180)),ot[0]=ze,ot[1]=et,Te=null}function or(Ze,yt){return(yt-=Ze)<0?yt+360:yt}function fr(Ze,yt){return Ze[0]-yt[0]}function Ot(Ze,yt){return Ze[0]<=Ze[1]?Ze[0]<=yt&&yt<=Ze[1]:ytor(zt[0],zt[1])&&(zt[1]=hr[1]),or(hr[0],zt[1])>or(zt[0],zt[1])&&(zt[0]=hr[0])):Ur.push(zt=hr);for(Qr=-1/0,Wt=Ur.length-1,yt=0,zt=Ur[Wt];yt<=Wt;zt=hr,++yt)hr=Ur[yt],(cn=or(zt[1],hr[0]))>Qr&&(Qr=cn,ze=hr[0],et=zt[1])}return $e=ot=null,ze===1/0||ct===1/0?[[NaN,NaN],[NaN,NaN]]:[[ze,ct],[et,qe]]}var Ct,wt,Tt,Mt,Lt,ft,kt,rr,pr,Kr,Nr,dn,xr,Fr,Zr,Cn,Dt={sphere:R,point:At,lineStart:Qt,lineEnd:rn,polygonStart:function(){Dt.lineStart=Jr,Dt.lineEnd=qn},polygonEnd:function(){Dt.lineStart=Qt,Dt.lineEnd=rn}};function At(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt);Vt(Wt*y(Ze),Wt*w(Ze),w(yt))}function Vt(Ze,yt,Wt){++Ct,Tt+=(Ze-Tt)/Ct,Mt+=(yt-Mt)/Ct,Lt+=(Wt-Lt)/Ct}function Qt(){Dt.point=Ut}function Ut(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt);Fr=Wt*y(Ze),Zr=Wt*w(Ze),Cn=w(yt),Dt.point=_r,Vt(Fr,Zr,Cn)}function _r(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt),zt=Wt*y(Ze),hr=Wt*w(Ze),Ur=w(yt),Qr=_(T((Qr=Zr*Ur-Cn*hr)*Qr+(Qr=Cn*zt-Fr*Ur)*Qr+(Qr=Fr*hr-Zr*zt)*Qr),Fr*zt+Zr*hr+Cn*Ur);wt+=Qr,ft+=Qr*(Fr+(Fr=zt)),kt+=Qr*(Zr+(Zr=hr)),rr+=Qr*(Cn+(Cn=Ur)),Vt(Fr,Zr,Cn)}function rn(){Dt.point=At}function Jr(){Dt.point=ri}function qn(){Jn(dn,xr),Dt.point=At}function ri(Ze,yt){dn=Ze,xr=yt,Ze*=g,yt*=g,Dt.point=Jn;var Wt=y(yt);Fr=Wt*y(Ze),Zr=Wt*w(Ze),Cn=w(yt),Vt(Fr,Zr,Cn)}function Jn(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt),zt=Wt*y(Ze),hr=Wt*w(Ze),Ur=w(yt),Qr=Zr*Ur-Cn*hr,cn=Cn*zt-Fr*Ur,yn=Fr*hr-Zr*zt,Fn=T(Qr*Qr+cn*cn+yn*yn),en=E(Fn),vn=Fn&&-en/Fn;pr+=vn*Qr,Kr+=vn*cn,Nr+=vn*yn,wt+=en,ft+=en*(Fr+(Fr=zt)),kt+=en*(Zr+(Zr=hr)),rr+=en*(Cn+(Cn=Ur)),Vt(Fr,Zr,Cn)}function Ii(Ze){Ct=wt=Tt=Mt=Lt=ft=kt=rr=pr=Kr=Nr=0,U(Ze,Dt);var yt=pr,Wt=Kr,zt=Nr,hr=yt*yt+Wt*Wt+zt*zt;return hrl?Ze+Math.round(-Ze/f)*f:Ze,yt]}ha.invert=ha;function va(Ze,yt,Wt){return(Ze%=f)?yt||Wt?ra(oa(Ze),Ma(yt,Wt)):oa(Ze):yt||Wt?Ma(yt,Wt):ha}function Xi(Ze){return function(yt,Wt){return yt+=Ze,[yt>l?yt-f:yt<-l?yt+f:yt,Wt]}}function oa(Ze){var yt=Xi(Ze);return yt.invert=Xi(-Ze),yt}function Ma(Ze,yt){var Wt=y(Ze),zt=w(Ze),hr=y(yt),Ur=w(yt);function Qr(cn,yn){var Fn=y(yn),en=y(cn)*Fn,vn=w(cn)*Fn,mn=w(yn),Pn=mn*Wt+en*zt;return[_(vn*hr-Pn*Ur,en*Wt-mn*zt),E(Pn*hr+vn*Ur)]}return Qr.invert=function(cn,yn){var Fn=y(yn),en=y(cn)*Fn,vn=w(cn)*Fn,mn=w(yn),Pn=mn*hr-vn*Ur;return[_(vn*hr+mn*Ur,en*Wt+Pn*zt),E(Pn*Wt-en*zt)]},Qr}function Ga(Ze){Ze=va(Ze[0]*g,Ze[1]*g,Ze.length>2?Ze[2]*g:0);function yt(Wt){return Wt=Ze(Wt[0]*g,Wt[1]*g),Wt[0]*=v,Wt[1]*=v,Wt}return yt.invert=function(Wt){return Wt=Ze.invert(Wt[0]*g,Wt[1]*g),Wt[0]*=v,Wt[1]*=v,Wt},yt}function ss(Ze,yt,Wt,zt,hr,Ur){if(Wt){var Qr=y(yt),cn=w(yt),yn=zt*Wt;hr==null?(hr=yt+zt*f,Ur=yt-yn/2):(hr=mo(Qr,hr),Ur=mo(Qr,Ur),(zt>0?hrUr)&&(hr+=zt*f));for(var Fn,en=hr;zt>0?en>Ur:en1&&Ze.push(Ze.pop().concat(Ze.shift()))},result:function(){var Wt=Ze;return Ze=[],yt=null,Wt}}}function ao(Ze,yt){return p(Ze[0]-yt[0])=0;--cn)hr.point((vn=en[cn])[0],vn[1]);else zt(mn.x,mn.p.x,-1,hr);mn=mn.p}mn=mn.o,en=mn.z,Pn=!Pn}while(!mn.v);hr.lineEnd()}}}function bo(Ze){if(yt=Ze.length){for(var yt,Wt=0,zt=Ze[0],hr;++Wt=0?1:-1,Ya=Qa*Ha,ho=Ya>l,Pa=ki*Zi;if(Zs.add(_(Pa*Qa*w(Ya),Ci*na+Pa*y(Ya))),Qr+=ho?Ha+Qa*f:Ha,ho^Pn>=Wt^Un>=Wt){var Js=Ge(be(mn),be(pi));Oe(Js);var fs=Ge(Ur,Js);Oe(fs);var Io=(ho^Ha>=0?-1:1)*E(fs[2]);(zt>Io||zt===Io&&(Js[0]||Js[1]))&&(cn+=ho^Ha>=0?1:-1)}}return(Qr<-o||Qr0){for(yn||(hr.polygonStart(),yn=!0),hr.lineStart(),na=0;na1&&Gn&2&&Zi.push(Zi.pop().concat(Zi.shift())),en.push(Zi.filter(ut))}}return mn}}function ut(Ze){return Ze.length>1}function Jt(Ze,yt){return((Ze=Ze.x)[0]<0?Ze[1]-u-o:u-Ze[1])-((yt=yt.x)[0]<0?yt[1]-u-o:u-yt[1])}var er=Af(function(){return!0},wr,Dr,[-l,-u]);function wr(Ze){var yt=NaN,Wt=NaN,zt=NaN,hr;return{lineStart:function(){Ze.lineStart(),hr=1},point:function(Ur,Qr){var cn=Ur>0?l:-l,yn=p(Ur-yt);p(yn-l)0?u:-u),Ze.point(zt,Wt),Ze.lineEnd(),Ze.lineStart(),Ze.point(cn,Wt),Ze.point(Ur,Wt),hr=0):zt!==cn&&yn>=l&&(p(yt-zt)o?x((w(yt)*(Ur=y(zt))*w(Wt)-w(zt)*(hr=y(yt))*w(Ze))/(hr*Ur*Qr)):(yt+zt)/2}function Dr(Ze,yt,Wt,zt){var hr;if(Ze==null)hr=Wt*u,zt.point(-l,hr),zt.point(0,hr),zt.point(l,hr),zt.point(l,0),zt.point(l,-hr),zt.point(0,-hr),zt.point(-l,-hr),zt.point(-l,0),zt.point(-l,hr);else if(p(Ze[0]-yt[0])>o){var Ur=Ze[0]0,hr=p(yt)>o;function Ur(en,vn,mn,Pn){ss(Pn,Ze,Wt,mn,en,vn)}function Qr(en,vn){return y(en)*y(vn)>yt}function cn(en){var vn,mn,Pn,On,ki;return{lineStart:function(){On=Pn=!1,ki=1},point:function(Ci,qi){var pi=[Ci,qi],Un,Gn=Qr(Ci,qi),Zi=zt?Gn?0:Fn(Ci,qi):Gn?Fn(Ci+(Ci<0?l:-l),qi):0;if(!vn&&(On=Pn=Gn)&&en.lineStart(),Gn!==Pn&&(Un=yn(vn,pi),(!Un||ao(vn,Un)||ao(pi,Un))&&(pi[2]=1)),Gn!==Pn)ki=0,Gn?(en.lineStart(),Un=yn(pi,vn),en.point(Un[0],Un[1])):(Un=yn(vn,pi),en.point(Un[0],Un[1],2),en.lineEnd()),vn=Un;else if(hr&&vn&&zt^Gn){var na;!(Zi&mn)&&(na=yn(pi,vn,!0))&&(ki=0,zt?(en.lineStart(),en.point(na[0][0],na[0][1]),en.point(na[1][0],na[1][1]),en.lineEnd()):(en.point(na[1][0],na[1][1]),en.lineEnd(),en.lineStart(),en.point(na[0][0],na[0][1],3)))}Gn&&(!vn||!ao(vn,pi))&&en.point(pi[0],pi[1]),vn=pi,Pn=Gn,mn=Zi},lineEnd:function(){Pn&&en.lineEnd(),vn=null},clean:function(){return ki|(On&&Pn)<<1}}}function yn(en,vn,mn){var Pn=be(en),On=be(vn),ki=[1,0,0],Ci=Ge(Pn,On),qi=De(Ci,Ci),pi=Ci[0],Un=qi-pi*pi;if(!Un)return!mn&&en;var Gn=yt*qi/Un,Zi=-yt*pi/Un,na=Ge(ki,Ci),Ha=it(ki,Gn),Qa=it(Ci,Zi);ht(Ha,Qa);var Ya=na,ho=De(Ha,Ya),Pa=De(Ya,Ya),Js=ho*ho-Pa*(De(Ha,Ha)-1);if(!(Js<0)){var fs=T(Js),Io=it(Ya,(-ho-fs)/Pa);if(ht(Io,Ha),Io=me(Io),!mn)return Io;var oi=en[0],ro=vn[0],Go=en[1],Qs=vn[1],zl;ro0^Io[1]<(p(Io[0]-oi)l^(oi<=Io[0]&&Io[0]<=ro)){var Yl=it(Ya,(-ho+fs)/Pa);return ht(Yl,Ha),[Io,me(Yl)]}}}function Fn(en,vn){var mn=zt?Ze:l-Ze,Pn=0;return en<-mn?Pn|=1:en>mn&&(Pn|=2),vn<-mn?Pn|=4:vn>mn&&(Pn|=8),Pn}return Af(Qr,cn,Ur,zt?[0,-Ze]:[-l,Ze-l])}function Yr(Ze,yt,Wt,zt,hr,Ur){var Qr=Ze[0],cn=Ze[1],yn=yt[0],Fn=yt[1],en=0,vn=1,mn=yn-Qr,Pn=Fn-cn,On;if(On=Wt-Qr,!(!mn&&On>0)){if(On/=mn,mn<0){if(On0){if(On>vn)return;On>en&&(en=On)}if(On=hr-Qr,!(!mn&&On<0)){if(On/=mn,mn<0){if(On>vn)return;On>en&&(en=On)}else if(mn>0){if(On0)){if(On/=Pn,Pn<0){if(On0){if(On>vn)return;On>en&&(en=On)}if(On=Ur-cn,!(!Pn&&On<0)){if(On/=Pn,Pn<0){if(On>vn)return;On>en&&(en=On)}else if(Pn>0){if(On0&&(Ze[0]=Qr+en*mn,Ze[1]=cn+en*Pn),vn<1&&(yt[0]=Qr+vn*mn,yt[1]=cn+vn*Pn),!0}}}}}var Tn=1e9,Kn=-Tn;function Qn(Ze,yt,Wt,zt){function hr(Fn,en){return Ze<=Fn&&Fn<=Wt&&yt<=en&&en<=zt}function Ur(Fn,en,vn,mn){var Pn=0,On=0;if(Fn==null||(Pn=Qr(Fn,vn))!==(On=Qr(en,vn))||yn(Fn,en)<0^vn>0)do mn.point(Pn===0||Pn===3?Ze:Wt,Pn>1?zt:yt);while((Pn=(Pn+vn+4)%4)!==On);else mn.point(en[0],en[1])}function Qr(Fn,en){return p(Fn[0]-Ze)0?0:3:p(Fn[0]-Wt)0?2:1:p(Fn[1]-yt)0?1:0:en>0?3:2}function cn(Fn,en){return yn(Fn.x,en.x)}function yn(Fn,en){var vn=Qr(Fn,1),mn=Qr(en,1);return vn!==mn?vn-mn:vn===0?en[1]-Fn[1]:vn===1?Fn[0]-en[0]:vn===2?Fn[1]-en[1]:en[0]-Fn[0]}return function(Fn){var en=Fn,vn=Eo(),mn,Pn,On,ki,Ci,qi,pi,Un,Gn,Zi,na,Ha={point:Qa,lineStart:Js,lineEnd:fs,polygonStart:ho,polygonEnd:Pa};function Qa(oi,ro){hr(oi,ro)&&en.point(oi,ro)}function Ya(){for(var oi=0,ro=0,Go=Pn.length;rozt&&(lf-mc)*(zt-Yl)>($u-Yl)*(Ze-mc)&&++oi:$u<=zt&&(lf-mc)*(zt-Yl)<($u-Yl)*(Ze-mc)&&--oi;return oi}function ho(){en=vn,mn=[],Pn=[],na=!0}function Pa(){var oi=Ya(),ro=na&&oi,Go=(mn=t.merge(mn)).length;(ro||Go)&&(Fn.polygonStart(),ro&&(Fn.lineStart(),Ur(null,null,1,Fn),Fn.lineEnd()),Go&&bl(mn,cn,oi,Ur,Fn),Fn.polygonEnd()),en=Fn,mn=Pn=On=null}function Js(){Ha.point=Io,Pn&&Pn.push(On=[]),Zi=!0,Gn=!1,pi=Un=NaN}function fs(){mn&&(Io(ki,Ci),qi&&Gn&&vn.rejoin(),mn.push(vn.result())),Ha.point=Qa,Gn&&en.lineEnd()}function Io(oi,ro){var Go=hr(oi,ro);if(Pn&&On.push([oi,ro]),Zi)ki=oi,Ci=ro,qi=Go,Zi=!1,Go&&(en.lineStart(),en.point(oi,ro));else if(Go&&Gn)en.point(oi,ro);else{var Qs=[pi=Math.max(Kn,Math.min(Tn,pi)),Un=Math.max(Kn,Math.min(Tn,Un))],zl=[oi=Math.max(Kn,Math.min(Tn,oi)),ro=Math.max(Kn,Math.min(Tn,ro))];Yr(Qs,zl,Ze,yt,Wt,zt)?(Gn||(en.lineStart(),en.point(Qs[0],Qs[1])),en.point(zl[0],zl[1]),Go||en.lineEnd(),na=!1):Go&&(en.lineStart(),en.point(oi,ro),na=!1)}pi=oi,Un=ro,Gn=Go}return Ha}}function Ai(){var Ze=0,yt=0,Wt=960,zt=500,hr,Ur,Qr;return Qr={stream:function(cn){return hr&&Ur===cn?hr:hr=Qn(Ze,yt,Wt,zt)(Ur=cn)},extent:function(cn){return arguments.length?(Ze=+cn[0][0],yt=+cn[0][1],Wt=+cn[1][0],zt=+cn[1][1],hr=Ur=null,Qr):[[Ze,yt],[Wt,zt]]}}}var Ji=r(),Ra,ii,Za,ja={sphere:R,point:R,lineStart:qo,lineEnd:R,polygonStart:R,polygonEnd:R};function qo(){ja.point=Ka,ja.lineEnd=$a}function $a(){ja.point=ja.lineEnd=R}function Ka(Ze,yt){Ze*=g,yt*=g,Ra=Ze,ii=w(yt),Za=y(yt),ja.point=Oa}function Oa(Ze,yt){Ze*=g,yt*=g;var Wt=w(yt),zt=y(yt),hr=p(Ze-Ra),Ur=y(hr),Qr=w(hr),cn=zt*Qr,yn=Za*Wt-ii*zt*Ur,Fn=ii*Wt+Za*zt*Ur;Ji.add(_(T(cn*cn+yn*yn),Fn)),Ra=Ze,ii=Wt,Za=zt}function Ni(Ze){return Ji.reset(),U(Ze,ja),+Ji}var ka=[null,null],vs={type:"LineString",coordinates:ka};function yo(Ze,yt){return ka[0]=Ze,ka[1]=yt,Ni(vs)}var so={Feature:function(Ze,yt){return ko(Ze.geometry,yt)},FeatureCollection:function(Ze,yt){for(var Wt=Ze.features,zt=-1,hr=Wt.length;++zt0&&(hr=yo(Ze[Ur],Ze[Ur-1]),hr>0&&Wt<=hr&&zt<=hr&&(Wt+zt-hr)*(1-Math.pow((Wt-zt)/hr,2))o}).map(mn)).concat(t.range(C(Ur/Fn)*Fn,hr,Fn).filter(function(Un){return p(Un%vn)>o}).map(Pn))}return qi.lines=function(){return pi().map(function(Un){return{type:"LineString",coordinates:Un}})},qi.outline=function(){return{type:"Polygon",coordinates:[On(zt).concat(ki(Qr).slice(1),On(Wt).reverse().slice(1),ki(cn).reverse().slice(1))]}},qi.extent=function(Un){return arguments.length?qi.extentMajor(Un).extentMinor(Un):qi.extentMinor()},qi.extentMajor=function(Un){return arguments.length?(zt=+Un[0][0],Wt=+Un[1][0],cn=+Un[0][1],Qr=+Un[1][1],zt>Wt&&(Un=zt,zt=Wt,Wt=Un),cn>Qr&&(Un=cn,cn=Qr,Qr=Un),qi.precision(Ci)):[[zt,cn],[Wt,Qr]]},qi.extentMinor=function(Un){return arguments.length?(yt=+Un[0][0],Ze=+Un[1][0],Ur=+Un[0][1],hr=+Un[1][1],yt>Ze&&(Un=yt,yt=Ze,Ze=Un),Ur>hr&&(Un=Ur,Ur=hr,hr=Un),qi.precision(Ci)):[[yt,Ur],[Ze,hr]]},qi.step=function(Un){return arguments.length?qi.stepMajor(Un).stepMinor(Un):qi.stepMinor()},qi.stepMajor=function(Un){return arguments.length?(en=+Un[0],vn=+Un[1],qi):[en,vn]},qi.stepMinor=function(Un){return arguments.length?(yn=+Un[0],Fn=+Un[1],qi):[yn,Fn]},qi.precision=function(Un){return arguments.length?(Ci=+Un,mn=Ls(Ur,hr,90),Pn=$s(yt,Ze,Ci),On=Ls(cn,Qr,90),ki=$s(zt,Wt,Ci),qi):Ci},qi.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function _u(){return Kc()()}function Gu(Ze,yt){var Wt=Ze[0]*g,zt=Ze[1]*g,hr=yt[0]*g,Ur=yt[1]*g,Qr=y(zt),cn=w(zt),yn=y(Ur),Fn=w(Ur),en=Qr*y(Wt),vn=Qr*w(Wt),mn=yn*y(hr),Pn=yn*w(hr),On=2*E(T(I(Ur-zt)+Qr*yn*I(hr-Wt))),ki=w(On),Ci=On?function(qi){var pi=w(qi*=On)/ki,Un=w(On-qi)/ki,Gn=Un*en+pi*mn,Zi=Un*vn+pi*Pn,na=Un*cn+pi*Fn;return[_(Zi,Gn)*v,_(na,T(Gn*Gn+Zi*Zi))*v]}:function(){return[Wt*v,zt*v]};return Ci.distance=On,Ci}function Ja(Ze){return Ze}var ps=r(),Sa=r(),ma,Ps,Ca,Pl,ll={point:R,lineStart:R,lineEnd:R,polygonStart:function(){ll.lineStart=Jc,ll.lineEnd=Bd},polygonEnd:function(){ll.lineStart=ll.lineEnd=ll.point=R,ps.add(p(Sa)),Sa.reset()},result:function(){var Ze=ps/2;return ps.reset(),Ze}};function Jc(){ll.point=lu}function lu(Ze,yt){ll.point=Mf,ma=Ca=Ze,Ps=Pl=yt}function Mf(Ze,yt){Sa.add(Pl*Ze-Ca*yt),Ca=Ze,Pl=yt}function Bd(){Mf(ma,Ps)}var Hu=1/0,Sf=Hu,kc=-Hu,Uo=kc,ns={point:Ks,lineStart:R,lineEnd:R,polygonStart:R,polygonEnd:R,result:function(){var Ze=[[Hu,Sf],[kc,Uo]];return kc=Uo=-(Sf=Hu=1/0),Ze}};function Ks(Ze,yt){Zekc&&(kc=Ze),ytUo&&(Uo=yt)}var Ef=0,ju=0,gs=0,bu=0,kf=0,ah=0,Od=0,Qc=0,uu=0,oh,hc,Fl,Yo,Ro={point:is,lineStart:Dl,lineEnd:Cc,polygonStart:function(){Ro.lineStart=sh,Ro.lineEnd=Y0},polygonEnd:function(){Ro.point=is,Ro.lineStart=Dl,Ro.lineEnd=Cc},result:function(){var Ze=uu?[Od/uu,Qc/uu]:ah?[bu/ah,kf/ah]:gs?[Ef/gs,ju/gs]:[NaN,NaN];return Ef=ju=gs=bu=kf=ah=Od=Qc=uu=0,Ze}};function is(Ze,yt){Ef+=Ze,ju+=yt,++gs}function Dl(){Ro.point=dc}function dc(Ze,yt){Ro.point=ef,is(Fl=Ze,Yo=yt)}function ef(Ze,yt){var Wt=Ze-Fl,zt=yt-Yo,hr=T(Wt*Wt+zt*zt);bu+=hr*(Fl+Ze)/2,kf+=hr*(Yo+yt)/2,ah+=hr,is(Fl=Ze,Yo=yt)}function Cc(){Ro.point=is}function sh(){Ro.point=Nd}function Y0(){Cf(oh,hc)}function Nd(Ze,yt){Ro.point=Cf,is(oh=Fl=Ze,hc=Yo=yt)}function Cf(Ze,yt){var Wt=Ze-Fl,zt=yt-Yo,hr=T(Wt*Wt+zt*zt);bu+=hr*(Fl+Ze)/2,kf+=hr*(Yo+yt)/2,ah+=hr,hr=Yo*Ze-Fl*yt,Od+=hr*(Fl+Ze),Qc+=hr*(Yo+yt),uu+=hr*3,is(Fl=Ze,Yo=yt)}function Vo(Ze){this._context=Ze}Vo.prototype={_radius:4.5,pointRadius:function(Ze){return this._radius=Ze,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Ze,yt){switch(this._point){case 0:{this._context.moveTo(Ze,yt),this._point=1;break}case 1:{this._context.lineTo(Ze,yt);break}default:{this._context.moveTo(Ze+this._radius,yt),this._context.arc(Ze,yt,this._radius,0,f);break}}},result:R};var Ud=r(),zh,tf,Vd,rf,qh,vc={point:R,lineStart:function(){vc.point=dd},lineEnd:function(){zh&&Bh(tf,Vd),vc.point=R},polygonStart:function(){zh=!0},polygonEnd:function(){zh=null},result:function(){var Ze=+Ud;return Ud.reset(),Ze}};function dd(Ze,yt){vc.point=Bh,tf=rf=Ze,Vd=qh=yt}function Bh(Ze,yt){rf-=Ze,qh-=yt,Ud.add(T(rf*rf+qh*qh)),rf=Ze,qh=yt}function Wu(){this._string=[]}Wu.prototype={_radius:4.5,_circle:vd(4.5),pointRadius:function(Ze){return(Ze=+Ze)!==this._radius&&(this._radius=Ze,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Ze,yt){switch(this._point){case 0:{this._string.push("M",Ze,",",yt),this._point=1;break}case 1:{this._string.push("L",Ze,",",yt);break}default:{this._circle==null&&(this._circle=vd(this._radius)),this._string.push("M",Ze,",",yt,this._circle);break}}},result:function(){if(this._string.length){var Ze=this._string.join("");return this._string=[],Ze}else return null}};function vd(Ze){return"m0,"+Ze+"a"+Ze+","+Ze+" 0 1,1 0,"+-2*Ze+"a"+Ze+","+Ze+" 0 1,1 0,"+2*Ze+"z"}function pd(Ze,yt){var Wt=4.5,zt,hr;function Ur(Qr){return Qr&&(typeof Wt=="function"&&hr.pointRadius(+Wt.apply(this,arguments)),U(Qr,zt(hr))),hr.result()}return Ur.area=function(Qr){return U(Qr,zt(ll)),ll.result()},Ur.measure=function(Qr){return U(Qr,zt(vc)),vc.result()},Ur.bounds=function(Qr){return U(Qr,zt(ns)),ns.result()},Ur.centroid=function(Qr){return U(Qr,zt(Ro)),Ro.result()},Ur.projection=function(Qr){return arguments.length?(zt=Qr==null?(Ze=null,Ja):(Ze=Qr).stream,Ur):Ze},Ur.context=function(Qr){return arguments.length?(hr=Qr==null?(yt=null,new Wu):new Vo(yt=Qr),typeof Wt!="function"&&hr.pointRadius(Wt),Ur):yt},Ur.pointRadius=function(Qr){return arguments.length?(Wt=typeof Qr=="function"?Qr:(hr.pointRadius(+Qr),+Qr),Ur):Wt},Ur.projection(Ze).context(yt)}function lh(Ze){return{stream:nf(Ze)}}function nf(Ze){return function(yt){var Wt=new uh;for(var zt in Ze)Wt[zt]=Ze[zt];return Wt.stream=yt,Wt}}function uh(){}uh.prototype={constructor:uh,point:function(Ze,yt){this.stream.point(Ze,yt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function af(Ze,yt,Wt){var zt=Ze.clipExtent&&Ze.clipExtent();return Ze.scale(150).translate([0,0]),zt!=null&&Ze.clipExtent(null),U(Wt,Ze.stream(ns)),yt(ns.result()),zt!=null&&Ze.clipExtent(zt),Ze}function gd(Ze,yt,Wt){return af(Ze,function(zt){var hr=yt[1][0]-yt[0][0],Ur=yt[1][1]-yt[0][1],Qr=Math.min(hr/(zt[1][0]-zt[0][0]),Ur/(zt[1][1]-zt[0][1])),cn=+yt[0][0]+(hr-Qr*(zt[1][0]+zt[0][0]))/2,yn=+yt[0][1]+(Ur-Qr*(zt[1][1]+zt[0][1]))/2;Ze.scale(150*Qr).translate([cn,yn])},Wt)}function Rl(Ze,yt,Wt){return gd(Ze,[[0,0],yt],Wt)}function ch(Ze,yt,Wt){return af(Ze,function(zt){var hr=+yt,Ur=hr/(zt[1][0]-zt[0][0]),Qr=(hr-Ur*(zt[1][0]+zt[0][0]))/2,cn=-Ur*zt[0][1];Ze.scale(150*Ur).translate([Qr,cn])},Wt)}function Lc(Ze,yt,Wt){return af(Ze,function(zt){var hr=+yt,Ur=hr/(zt[1][1]-zt[0][1]),Qr=-Ur*zt[0][0],cn=(hr-Ur*(zt[1][1]+zt[0][1]))/2;Ze.scale(150*Ur).translate([Qr,cn])},Wt)}var md=16,yd=y(30*g);function Lf(Ze,yt){return+yt?fh(Ze,yt):wu(Ze)}function wu(Ze){return nf({point:function(yt,Wt){yt=Ze(yt,Wt),this.stream.point(yt[0],yt[1])}})}function fh(Ze,yt){function Wt(zt,hr,Ur,Qr,cn,yn,Fn,en,vn,mn,Pn,On,ki,Ci){var qi=Fn-zt,pi=en-hr,Un=qi*qi+pi*pi;if(Un>4*yt&&ki--){var Gn=Qr+mn,Zi=cn+Pn,na=yn+On,Ha=T(Gn*Gn+Zi*Zi+na*na),Qa=E(na/=Ha),Ya=p(p(na)-1)yt||p((qi*fs+pi*Io)/Un-.5)>.3||Qr*mn+cn*Pn+yn*On2?oi[2]%360*g:0,fs()):[cn*v,yn*v,Fn*v]},Pa.angle=function(oi){return arguments.length?(vn=oi%360*g,fs()):vn*v},Pa.reflectX=function(oi){return arguments.length?(mn=oi?-1:1,fs()):mn<0},Pa.reflectY=function(oi){return arguments.length?(Pn=oi?-1:1,fs()):Pn<0},Pa.precision=function(oi){return arguments.length?(na=Lf(Ha,Zi=oi*oi),Io()):T(Zi)},Pa.fitExtent=function(oi,ro){return gd(Pa,oi,ro)},Pa.fitSize=function(oi,ro){return Rl(Pa,oi,ro)},Pa.fitWidth=function(oi,ro){return ch(Pa,oi,ro)},Pa.fitHeight=function(oi,ro){return Lc(Pa,oi,ro)};function fs(){var oi=Gl(Wt,0,0,mn,Pn,vn).apply(null,yt(Ur,Qr)),ro=(vn?Gl:Gd)(Wt,zt-oi[0],hr-oi[1],mn,Pn,vn);return en=va(cn,yn,Fn),Ha=ra(yt,ro),Qa=ra(en,Ha),na=Lf(Ha,Zi),Io()}function Io(){return Ya=ho=null,Pa}return function(){return yt=Ze.apply(this,arguments),Pa.invert=yt.invert&&Js,fs()}}function Hl(Ze){var yt=0,Wt=l/3,zt=xd(Ze),hr=zt(yt,Wt);return hr.parallels=function(Ur){return arguments.length?zt(yt=Ur[0]*g,Wt=Ur[1]*g):[yt*v,Wt*v]},hr}function _d(Ze){var yt=y(Ze);function Wt(zt,hr){return[zt*yt,w(hr)/yt]}return Wt.invert=function(zt,hr){return[zt/yt,E(hr*yt)]},Wt}function dh(Ze,yt){var Wt=w(Ze),zt=(Wt+w(yt))/2;if(p(zt)=.12&&Ci<.234&&ki>=-.425&&ki<-.214?hr:Ci>=.166&&Ci<.234&&ki>=-.214&&ki<-.115?Qr:Wt).invert(mn)},en.stream=function(mn){return Ze&&yt===mn?Ze:Ze=xo([Wt.stream(yt=mn),hr.stream(mn),Qr.stream(mn)])},en.precision=function(mn){return arguments.length?(Wt.precision(mn),hr.precision(mn),Qr.precision(mn),vn()):Wt.precision()},en.scale=function(mn){return arguments.length?(Wt.scale(mn),hr.scale(mn*.35),Qr.scale(mn),en.translate(Wt.translate())):Wt.scale()},en.translate=function(mn){if(!arguments.length)return Wt.translate();var Pn=Wt.scale(),On=+mn[0],ki=+mn[1];return zt=Wt.translate(mn).clipExtent([[On-.455*Pn,ki-.238*Pn],[On+.455*Pn,ki+.238*Pn]]).stream(Fn),Ur=hr.translate([On-.307*Pn,ki+.201*Pn]).clipExtent([[On-.425*Pn+o,ki+.12*Pn+o],[On-.214*Pn-o,ki+.234*Pn-o]]).stream(Fn),cn=Qr.translate([On-.205*Pn,ki+.212*Pn]).clipExtent([[On-.214*Pn+o,ki+.166*Pn+o],[On-.115*Pn-o,ki+.234*Pn-o]]).stream(Fn),vn()},en.fitExtent=function(mn,Pn){return gd(en,mn,Pn)},en.fitSize=function(mn,Pn){return Rl(en,mn,Pn)},en.fitWidth=function(mn,Pn){return ch(en,mn,Pn)},en.fitHeight=function(mn,Pn){return Lc(en,mn,Pn)};function vn(){return Ze=yt=null,en}return en.scale(1070)}function Tu(Ze){return function(yt,Wt){var zt=y(yt),hr=y(Wt),Ur=Ze(zt*hr);return[Ur*hr*w(yt),Ur*w(Wt)]}}function Au(Ze){return function(yt,Wt){var zt=T(yt*yt+Wt*Wt),hr=Ze(zt),Ur=w(hr),Qr=y(hr);return[_(yt*Ur,zt*Qr),E(zt&&Wt*Ur/zt)]}}var Il=Tu(function(Ze){return T(2/(1+Ze))});Il.invert=Au(function(Ze){return 2*E(Ze/2)});function g0(){return wl(Il).scale(124.75).clipAngle(180-.001)}var Yu=Tu(function(Ze){return(Ze=F(Ze))&&Ze/w(Ze)});Yu.invert=Au(function(Ze){return Ze});function Nh(){return wl(Yu).scale(79.4188).clipAngle(180-.001)}function Tl(Ze,yt){return[Ze,S(m((u+yt)/2))]}Tl.invert=function(Ze,yt){return[Ze,2*x(k(yt))-u]};function jl(){return Uh(Tl).scale(961/f)}function Uh(Ze){var yt=wl(Ze),Wt=yt.center,zt=yt.scale,hr=yt.translate,Ur=yt.clipExtent,Qr=null,cn,yn,Fn;yt.scale=function(vn){return arguments.length?(zt(vn),en()):zt()},yt.translate=function(vn){return arguments.length?(hr(vn),en()):hr()},yt.center=function(vn){return arguments.length?(Wt(vn),en()):Wt()},yt.clipExtent=function(vn){return arguments.length?(vn==null?Qr=cn=yn=Fn=null:(Qr=+vn[0][0],cn=+vn[0][1],yn=+vn[1][0],Fn=+vn[1][1]),en()):Qr==null?null:[[Qr,cn],[yn,Fn]]};function en(){var vn=l*zt(),mn=yt(Ga(yt.rotate()).invert([0,0]));return Ur(Qr==null?[[mn[0]-vn,mn[1]-vn],[mn[0]+vn,mn[1]+vn]]:Ze===Tl?[[Math.max(mn[0]-vn,Qr),cn],[Math.min(mn[0]+vn,yn),Fn]]:[[Qr,Math.max(mn[1]-vn,cn)],[yn,Math.min(mn[1]+vn,Fn)]])}return en()}function Vh(Ze){return m((u+Ze)/2)}function jd(Ze,yt){var Wt=y(Ze),zt=Ze===yt?w(Ze):S(Wt/y(yt))/S(Vh(yt)/Vh(Ze)),hr=Wt*L(Vh(Ze),zt)/zt;if(!zt)return Tl;function Ur(Qr,cn){hr>0?cn<-u+o&&(cn=-u+o):cn>u-o&&(cn=u-o);var yn=hr/L(Vh(cn),zt);return[yn*w(zt*Qr),hr-yn*y(zt*Qr)]}return Ur.invert=function(Qr,cn){var yn=hr-cn,Fn=A(zt)*T(Qr*Qr+yn*yn),en=_(Qr,p(yn))*A(yn);return yn*zt<0&&(en-=l*A(Qr)*A(yn)),[en/zt,2*x(L(hr/Fn,1/zt))-u]},Ur}function pc(){return Hl(jd).scale(109.5).parallels([30,30])}function gc(Ze,yt){return[Ze,yt]}gc.invert=gc;function of(){return wl(gc).scale(152.63)}function sf(Ze,yt){var Wt=y(Ze),zt=Ze===yt?w(Ze):(Wt-y(yt))/(yt-Ze),hr=Wt/zt+Ze;if(p(zt)o&&--zt>0);return[Ze/(.8707+(Ur=Wt*Wt)*(-.131979+Ur*(-.013791+Ur*Ur*Ur*(.003971-.001529*Ur)))),Wt]};function Td(){return wl(y0).scale(175.295)}function ul(Ze,yt){return[y(yt)*w(Ze),w(yt)]}ul.invert=Au(E);function Wl(){return wl(ul).scale(249.5).clipAngle(90+o)}function If(Ze,yt){var Wt=y(yt),zt=1+y(Ze)*Wt;return[Wt*w(Ze)/zt,w(yt)/zt]}If.invert=Au(function(Ze){return 2*x(Ze)});function vh(){return wl(If).scale(250).clipAngle(142)}function zf(Ze,yt){return[S(m((u+yt)/2)),-Ze]}zf.invert=function(Ze,yt){return[-yt,2*x(k(Ze))-u]};function qf(){var Ze=Uh(zf),yt=Ze.center,Wt=Ze.rotate;return Ze.center=function(zt){return arguments.length?yt([-zt[1],zt[0]]):(zt=yt(),[zt[1],-zt[0]])},Ze.rotate=function(zt){return arguments.length?Wt([zt[0],zt[1],zt.length>2?zt[2]+90:90]):(zt=Wt(),[zt[0],zt[1],zt[2]-90])},Wt([0,0,90]).scale(159.155)}e.geoAlbers=Hd,e.geoAlbersUsa=p0,e.geoArea=le,e.geoAzimuthalEqualArea=g0,e.geoAzimuthalEqualAreaRaw=Il,e.geoAzimuthalEquidistant=Nh,e.geoAzimuthalEquidistantRaw=Yu,e.geoBounds=cr,e.geoCentroid=Ii,e.geoCircle=sl,e.geoClipAntimeridian=er,e.geoClipCircle=bn,e.geoClipExtent=Ai,e.geoClipRectangle=Qn,e.geoConicConformal=pc,e.geoConicConformalRaw=jd,e.geoConicEqualArea=Pf,e.geoConicEqualAreaRaw=dh,e.geoConicEquidistant=bd,e.geoConicEquidistantRaw=sf,e.geoContains=rs,e.geoDistance=yo,e.geoEqualEarth=m0,e.geoEqualEarthRaw=Rf,e.geoEquirectangular=of,e.geoEquirectangularRaw=gc,e.geoGnomonic=Hh,e.geoGnomonicRaw=wd,e.geoGraticule=Kc,e.geoGraticule10=_u,e.geoIdentity=X0,e.geoInterpolate=Gu,e.geoLength=Ni,e.geoMercator=jl,e.geoMercatorRaw=Tl,e.geoNaturalEarth1=Td,e.geoNaturalEarth1Raw=y0,e.geoOrthographic=Wl,e.geoOrthographicRaw=ul,e.geoPath=pd,e.geoProjection=wl,e.geoProjectionMutator=xd,e.geoRotation=Ga,e.geoStereographic=vh,e.geoStereographicRaw=If,e.geoStream=U,e.geoTransform=lh,e.geoTransverseMercator=qf,e.geoTransverseMercatorRaw=zf,Object.defineProperty(e,"__esModule",{value:!0})}))});var BIe=fe((t5r,qIe)=>{"use strict";var zIe={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},OGt=new Set(Object.values(zIe));qIe.exports={usaLocationAbbreviations:OGt,usaLocationList:zIe}});var OIe={};zp(OIe,{COUNTRIES_X:()=>NGt});var NGt,NIe=Co(()=>{"use strict";NGt=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]});var Cg=fe((r5r,GIe)=>{"use strict";var UGt=xi(),{COUNTRIES:VGt,createLookup:GGt}=gIe(),{area:HGt}=LIe(),{centroid:jGt}=FIe(),{coordAll:WGt}=FP(),{geoBounds:YGt}=qP(),XGt=J4(),_y=W1(),ZGt=em(),$Gt=M4(),BP=NT(),{usaLocationAbbreviations:KGt,usaLocationList:JGt}=BIe(),{COUNTRIES_X:QGt}=(NIe(),Gs(OIe)),{lookupAlpha3:eHt}=GGt([...VGt,...QGt]),tHt={"ISO-3":XGt,"USA-states":nHt,"country names":rHt};function rHt(e){let t=eHt(e);return t||(_y.log("Unrecognized country name: "+e+"."),!1)}function nHt(e){e=e.trim();let t=KGt.has(e.toUpperCase())?e.toUpperCase():JGt[e.toLowerCase()];return t||(_y.log("Unrecognized US location: "+e+"."),!1)}function iHt(e,t,r){var a;if(!t||typeof t!="string")return!1;let n=tHt[e](t);if(n){let i;if(e==="USA-states"){i=[];for(let o of r)((a=o==null?void 0:o.properties)==null?void 0:a.gu)==="USA"&&i.push(o)}else i=r;for(let o of i)if(o.id===n)return o;_y.log(`Location with id ${n} does not have a matching topojson feature at this resolution.`)}return!1}var OP=360;function LX(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function aHt(e){var t=e.geometry,r=t.coordinates,n=e.id,a=[],i,o,s,l;switch(n==="RUS"||n==="FJI"?i=function(u){var c;if(LX(u)===null)c=u;else for(c=new Array(u.length),l=0;lc?f[v++]=[u[l][0]+OP,u[l][1]]:l===c?(f[v++]=u[l],f[v++]=[u[l][0],-90]):f[v++]=u[l];var g=BP.tester(f);g.pts.pop(),a.push(g)}:i=function(u){a.push(BP.tester(u))},t.type){case"MultiPolygon":for(o=0;oa&&(a=s,r=o)}else r=t;return!r||!r.coordinates.some(l=>l.length>0)?[NaN,NaN]:jGt(r).geometry.coordinates}function lHt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){UGt.json(l,function(f,v){if(f){delete t[l];var g=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(g))}return t[l]=v,u(v)})})}function a(l){return new Promise(function(u,c){var f=0,v=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(v),u(t[l]);if(f>100)return clearInterval(v),c("Unexpected error while fetching from "+l);f++},50)})}for(var i=0;iDX(FX(e));function FX(e){try{return WGt(e)}catch(t){return[]}}function DX(e){if(e.length===0)return null;if(e.length===1){let[i,o]=e[0];return[i,o,i,o]}let[[t,r],[n,a]]=YGt({type:"MultiPoint",coordinates:e});return[t,r,VIe([t,n])[1],a]}var cHt=(e,t)=>t.fitbounds==="geojson"&&e.locationmode==="geojson-id",UIe=(e,t)=>cHt(e,t)?FX(PX(e)):[],fHt=(e,t)=>DX(UIe(e,t));function VIe([e,t]){return[e,e>t?t+OP:t]}GIe.exports={locationToFeature:iHt,feature2polygons:aHt,getTraceGeojson:PX,extractTraceFeature:oHt,fetchTraceGeoData:lHt,boundsOfCoords:DX,computeBbox:uHt,coordsOf:FX,doesCrossAntiMeridian:LX,fitGeojsonBbox:fHt,fitGeojsonCoords:UIe,unwrapLonRange:VIe,ANTIMERIDIAN_LON_SHIFT:OP}});var RX=fe((n5r,WIe)=>{"use strict";var hHt=xi(),dHt=ea(),HIe=ni(),jIe=Ld(),vHt=jIe.stylePoints,pHt=jIe.styleText;WIe.exports=function(t,r){r&&gHt(t,r)};function gHt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),vHt(n,r,e),pHt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(a){var i=hHt.select(this),o=a.trace,s=o.line||{};i.call(HIe.stroke,s.color).call(dHt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&i.call(HIe.fill,o.fillcolor)})}});var VP=fe((i5r,ZIe)=>{"use strict";var YIe=xi(),NP=Xt(),mHt=EP().getTopojsonFeatures,IX=cM(),UP=Cg(),XIe=rp().findExtremes,qX=Wa().BADNUM,yHt=gv().calcMarkerSize,zX=Is(),xHt=RX();function _Ht(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),a=NP.makeTraceGroups(n,r,"trace scattergeo");function i(o,s){o.lonlat[0]===qX&&YIe.select(s).remove()}a.selectAll("*").remove(),a.each(function(o){var s=YIe.select(this),l=o[0].trace;if(zX.hasLines(l)||l.fill!=="none"){var u=IX.calcTraceToLineCoords(o),c=l.fill!=="none"?IX.makePolygon(u):IX.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}zX.hasMarkers(l)&&s.selectAll("path.point").data(NP.identity).enter().append("path").classed("point",!0).each(function(f){i(f,this)}),zX.hasText(l)&&s.selectAll("g").data(NP.identity).enter().append("g").append("text").each(function(f){i(f,this)}),xHt(e,o)})}function bHt(e,t){var r=e[0].trace,n=t[r.geo],a=n._subplot,i=r._length,o,s;if(NP.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?UP.extractTraceFeature(e):mHt(r,a.topojson);for(o=0;o{"use strict";var THt=kl(),AHt=Wa().BADNUM,MHt=_3(),SHt=Xt().fillText,EHt=a5();$Ie.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(C){var k=C.lonlat;if(k[0]===AHt||u(k))return 1/0;var S=c(k),L=c([r,n]),w=Math.abs(S[0]-L[0]),A=Math.abs(S[1]-L[1]),T=Math.max(3,C.mrc||0);return Math.max(Math.sqrt(w*w+A*A)-T,1-3/T)}if(THt.getClosest(a,f,t),t.index!==!1){var v=a[t.index],g=v.lonlat,p=[o.c2p(g),s.c2p(g)],x=v.mrc||1;t.x0=p[0]-x,t.x1=p[0]+x,t.y0=p[1]-x,t.y1=p[1]+x,t.loc=v.loc,t.lon=g[0],t.lat=g[1];var _={};_[i.geo]={_subplot:l};var y=i._module.formatLabels(v,i,_);return t.lonLabel=y.lonLabel,t.latLabel=y.latLabel,t.color=MHt(i,v),t.extraText=kHt(i,v,t,a[0].t.labels),t.hovertemplate=i.hovertemplate,[t]}};function kHt(e,t,r,n){if(e.hovertemplate)return;var a=t.hi||e.hoverinfo,i=a==="all"?EHt.hoverinfo.flags:a.split("+"),o=i.indexOf("location")!==-1&&Array.isArray(e.locations),s=i.indexOf("lon")!==-1,l=i.indexOf("lat")!==-1,u=i.indexOf("text")!==-1,c=[];function f(v){return v+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&SHt(t,e,c),c.join("
")}});var QIe=fe((o5r,JIe)=>{"use strict";JIe.exports=function(t,r,n,a,i){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=a[i];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var rze=fe((s5r,tze)=>{"use strict";var eze=Is(),CHt=Wa().BADNUM;tze.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l,u,c,f,v,g=!eze.hasMarkers(s)&&!eze.hasText(s);if(g)return[];if(r===!1)for(v=0;v{(function(e,t){t(typeof GP=="object"&&typeof nze!="undefined"?GP:e.d3=e.d3||{})})(GP,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)<0?ie=me+1:le=me}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)>0?le=me:ie=me+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],me=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,me=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,me,be;if(ae==null){for(;++ie=le)for(me=be=le;++iele&&(me=le),be=le)for(me=be=le;++iele&&(me=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(me=Math.ceil(ae-ne+1));++le=0?(me>=L?10:me>=w?5:me>=A?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(me>=L?10:me>=w?5:me>=A?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),me=ie/le;return me>=L?le*=10:me>=w?le*=5:me>=A&&(le*=2),aeOe;)ze.pop(),--ct;var et=new Array(ct+1),qe;for(me=0;me<=ct;++me)qe=et[me]=[],qe.x0=me>0?ze[me-1]:it,qe.x1=me=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,me=Math.floor(le),be=+pe(ne[me],me,ne),De=+pe(ne[me+1],me+1,ne);return be+(De-be)*(le-me)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function V(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++ieme&&(me=le)}else for(;++ie=le)for(me=le;++ieme&&(me=le);return me}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,me,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)me[--le]=be[pe];return me}function J(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++iele&&(me=le)}else for(;++ie=le)for(me=le;++iele&&(me=le);return me}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,me,be=ne[le];for(ae==null&&(ae=t);++ie{(function(e,t){typeof HP=="object"&&typeof aze!="undefined"?t(HP,qP(),ize()):t(e.d3=e.d3||{},e.d3,e.d3)})(HP,(function(e,t,r){"use strict";var n=Math.abs,a=Math.atan,i=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,v=Math.pow,g=Math.round,p=Math.sign||function(Me){return Me>0?1:Me<0?-1:0},x=Math.sin,_=Math.tan,y=1e-6,C=1e-12,k=Math.PI,S=k/2,L=k/4,w=Math.SQRT1_2,A=O(2),T=O(k),m=k*2,F=180/k,E=k/180;function I(Me){return Me?Me/Math.sin(Me):1}function R(Me){return Me>1?S:Me<-1?-S:Math.asin(Me)}function B(Me){return Me>1?0:Me<-1?k:Math.acos(Me)}function O(Me){return Me>0?Math.sqrt(Me):0}function V(Me){return Me=s(2*Me),(Me-1)/(Me+1)}function j(Me){return(s(Me)-s(-Me))/2}function q(Me){return(s(Me)+s(-Me))/2}function U(Me){return u(Me+O(Me*Me+1))}function J(Me){return u(Me+O(Me*Me-1))}function ee(Me){var Ce=_(Me/2),Be=2*u(o(Me/2))/(Ce*Ce);function Ne(Qe,Je){var lt=o(Qe),Gt=o(Je),Zt=x(Je),Nt=Gt*lt,Kt=-((1-Nt?u((1+Nt)/2)/(1-Nt):-.5)+Be/(1+Nt));return[Kt*Gt*x(Qe),Kt*Zt]}return Ne.invert=function(Qe,Je){var lt=O(Qe*Qe+Je*Je),Gt=-Me/2,Zt=50,Nt;if(!lt)return[0,0];do{var Kt=Gt/2,ur=o(Kt),Sr=x(Kt),Br=Sr/ur,ln=-u(n(ur));Gt-=Nt=(2/Br*ln-Be*Br-lt)/(-ln/(Sr*Sr)+1-Be/(2*ur*ur))*(ur<0?.7:1)}while(n(Nt)>y&&--Zt>0);var wn=x(Gt);return[i(Qe*wn,lt*o(Gt)),R(Je*wn/lt)]},Ne}function ce(){var Me=S,Ce=t.geoProjectionMutator(ee),Be=Ce(Me);return Be.radius=function(Ne){return arguments.length?Ce(Me=Ne*E):Me*F},Be.scale(179.976).clipAngle(147)}function ye(Me,Ce){var Be=o(Ce),Ne=I(B(Be*o(Me/=2)));return[2*Be*x(Me)*Ne,x(Ce)*Ne]}ye.invert=function(Me,Ce){if(!(Me*Me+4*Ce*Ce>k*k+y)){var Be=Me,Ne=Ce,Qe=25;do{var Je=x(Be),lt=x(Be/2),Gt=o(Be/2),Zt=x(Ne),Nt=o(Ne),Kt=x(2*Ne),ur=Zt*Zt,Sr=Nt*Nt,Br=lt*lt,ln=1-Sr*Gt*Gt,wn=ln?B(Nt*Gt)*O(In=1/ln):In=0,In,gi=2*wn*Nt*lt-Me,Bi=wn*Zt-Ce,mi=In*(Sr*Br+wn*Nt*Gt*ur),ia=In*(.5*Je*Kt-wn*2*Zt*lt),ua=In*.25*(Kt*lt-wn*Zt*Sr*Je),lo=In*(ur*Gt+wn*Br*Nt),Bo=ia*ua-lo*mi;if(!Bo)break;var Ua=(Bi*ia-gi*lo)/Bo,ls=(gi*ua-Bi*mi)/Bo;Be-=Ua,Ne-=ls}while((n(Ua)>y||n(ls)>y)&&--Qe>0);return[Be,Ne]}};function xe(){return t.geoProjection(ye).scale(152.63)}function ue(Me){var Ce=x(Me),Be=o(Me),Ne=Me>=0?1:-1,Qe=_(Ne*Me),Je=(1+Ce-Be)/2;function lt(Gt,Zt){var Nt=o(Zt),Kt=o(Gt/=2);return[(1+Nt)*x(Gt),(Ne*Zt>-i(Kt,Qe)-.001?0:-Ne*10)+Je+x(Zt)*Be-(1+Nt)*Ce*Kt]}return lt.invert=function(Gt,Zt){var Nt=0,Kt=0,ur=50;do{var Sr=o(Nt),Br=x(Nt),ln=o(Kt),wn=x(Kt),In=1+ln,gi=In*Br-Gt,Bi=Je+wn*Be-In*Ce*Sr-Zt,mi=In*Sr/2,ia=-Br*wn,ua=Ce*In*Br/2,lo=Be*ln+Ce*Sr*wn,Bo=ia*ua-lo*mi,Ua=(Bi*ia-gi*lo)/Bo/2,ls=(gi*ua-Bi*mi)/Bo;n(ls)>2&&(ls/=2),Nt-=Ua,Kt-=ls}while((n(Ua)>y||n(ls)>y)&&--ur>0);return Ne*Kt>-i(o(Nt),Qe)-.001?[Nt*2,Kt]:null},lt}function K(){var Me=20*E,Ce=Me>=0?1:-1,Be=_(Ce*Me),Ne=t.geoProjectionMutator(ue),Qe=Ne(Me),Je=Qe.stream;return Qe.parallel=function(lt){return arguments.length?(Be=_((Ce=(Me=lt*E)>=0?1:-1)*Me),Ne(Me)):Me*F},Qe.stream=function(lt){var Gt=Qe.rotate(),Zt=Je(lt),Nt=(Qe.rotate([0,0]),Je(lt)),Kt=Qe.precision();return Qe.rotate(Gt),Zt.sphere=function(){Nt.polygonStart(),Nt.lineStart();for(var ur=Ce*-180;Ce*ur<180;ur+=Ce*90)Nt.point(ur,Ce*90);if(Me)for(;Ce*(ur-=3*Ce*Kt)>=-180;)Nt.point(ur,Ce*-i(o(ur*E/2),Be)*F);Nt.lineEnd(),Nt.polygonEnd()},Zt},Qe.scale(218.695).center([0,28.0974])}function _e(Me,Ce){var Be=_(Ce/2),Ne=O(1-Be*Be),Qe=1+Ne*o(Me/=2),Je=x(Me)*Ne/Qe,lt=Be/Qe,Gt=Je*Je,Zt=lt*lt;return[4/3*Je*(3+Gt-3*Zt),4/3*lt*(3+3*Gt-Zt)]}_e.invert=function(Me,Ce){if(Me*=3/8,Ce*=3/8,!Me&&n(Ce)>1)return null;var Be=Me*Me,Ne=Ce*Ce,Qe=1+Be+Ne,Je=O((Qe-O(Qe*Qe-4*Ce*Ce))/2),lt=R(Je)/3,Gt=Je?J(n(Ce/Je))/3:U(n(Me))/3,Zt=o(lt),Nt=q(Gt),Kt=Nt*Nt-Zt*Zt;return[p(Me)*2*i(j(Gt)*Zt,.25-Kt),p(Ce)*2*i(Nt*x(lt),.25+Kt)]};function ne(){return t.geoProjection(_e).scale(66.1603)}var ae=O(8),pe=u(1+A);function ie(Me,Ce){var Be=n(Ce);return BeC&&--Ne>0);return[Me/(o(Be)*(ae-1/x(Be))),p(Ce)*Be]};function le(){return t.geoProjection(ie).scale(112.314)}function me(Me){var Ce=2*k/Me;function Be(Ne,Qe){var Je=t.geoAzimuthalEquidistantRaw(Ne,Qe);if(n(Ne)>S){var lt=i(Je[1],Je[0]),Gt=O(Je[0]*Je[0]+Je[1]*Je[1]),Zt=Ce*g((lt-S)/Ce)+S,Nt=i(x(lt-=Zt),2-o(lt));lt=Zt+R(k/Gt*x(Nt))-Nt,Je[0]=Gt*o(lt),Je[1]=Gt*x(lt)}return Je}return Be.invert=function(Ne,Qe){var Je=O(Ne*Ne+Qe*Qe);if(Je>S){var lt=i(Qe,Ne),Gt=Ce*g((lt-S)/Ce)+S,Zt=lt>Gt?-1:1,Nt=Je*o(Gt-lt),Kt=1/_(Zt*B((Nt-k)/O(k*(k-2*Nt)+Je*Je)));lt=Gt+2*a((Kt+Zt*O(Kt*Kt-3))/3),Ne=Je*o(lt),Qe=Je*x(lt)}return t.geoAzimuthalEquidistantRaw.invert(Ne,Qe)},Be}function be(){var Me=5,Ce=t.geoProjectionMutator(me),Be=Ce(Me),Ne=Be.stream,Qe=.01,Je=-o(Qe*E),lt=x(Qe*E);return Be.lobes=function(Gt){return arguments.length?Ce(Me=+Gt):Me},Be.stream=function(Gt){var Zt=Be.rotate(),Nt=Ne(Gt),Kt=(Be.rotate([0,0]),Ne(Gt));return Be.rotate(Zt),Nt.sphere=function(){Kt.polygonStart(),Kt.lineStart();for(var ur=0,Sr=360/Me,Br=2*k/Me,ln=90-180/Me,wn=S;ur0&&n(Qe)>y);return Ne<0?NaN:Be}function Oe(Me,Ce,Be){return Ce===void 0&&(Ce=40),Be===void 0&&(Be=C),function(Ne,Qe,Je,lt){var Gt,Zt,Nt;Je=Je===void 0?0:+Je,lt=lt===void 0?0:+lt;for(var Kt=0;KtGt){Je-=Zt/=2,lt-=Nt/=2;continue}Gt=ln;var wn=(Je>0?-1:1)*Be,In=(lt>0?-1:1)*Be,gi=Me(Je+wn,lt),Bi=Me(Je,lt+In),mi=(gi[0]-ur[0])/wn,ia=(gi[1]-ur[1])/wn,ua=(Bi[0]-ur[0])/In,lo=(Bi[1]-ur[1])/In,Bo=lo*mi-ia*ua,Ua=(n(Bo)<.5?.5:1)/Bo;if(Zt=(Br*ua-Sr*lo)*Ua,Nt=(Sr*ia-Br*mi)*Ua,Je+=Zt,lt+=Nt,n(Zt)0&&(Gt[1]*=1+Zt/1.5*Gt[0]*Gt[0]),Gt}return Ne.invert=Oe(Ne),Ne}function ct(){return t.geoProjection(ze()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function et(Me,Ce){var Be=Me*x(Ce),Ne=30,Qe;do Ce-=Qe=(Ce+x(Ce)-Be)/(1+o(Ce));while(n(Qe)>y&&--Ne>0);return Ce/2}function qe(Me,Ce,Be){function Ne(Qe,Je){return[Me*Qe*o(Je=et(Be,Je)),Ce*x(Je)]}return Ne.invert=function(Qe,Je){return Je=R(Je/Ce),[Qe/(Me*o(Je)),R((2*Je+x(2*Je))/Be)]},Ne}var we=qe(A/S,A,k);function Le(){return t.geoProjection(we).scale(169.529)}var Ke=2.00276,Te=1.11072;function Ve(Me,Ce){var Be=et(k,Ce);return[Ke*Me/(1/o(Ce)+Te/o(Be)),(Ce+A*x(Be))/Ke]}Ve.invert=function(Me,Ce){var Be=Ke*Ce,Ne=Ce<0?-L:L,Qe=25,Je,lt;do lt=Be-A*x(Ne),Ne-=Je=(x(2*Ne)+2*Ne-k*x(lt))/(2*o(2*Ne)+2+k*o(lt)*A*o(Ne));while(n(Je)>y&&--Qe>0);return lt=Be-A*x(Ne),[Me*(1/o(lt)+Te/o(Ne))/Ke,lt]};function $e(){return t.geoProjection(Ve).scale(160.857)}function ot(Me){var Ce=0,Be=t.geoProjectionMutator(Me),Ne=Be(Ce);return Ne.parallel=function(Qe){return arguments.length?Be(Ce=Qe*E):Ce*F},Ne}function tt(Me,Ce){return[Me*o(Ce),Ce]}tt.invert=function(Me,Ce){return[Me/o(Ce),Ce]};function nt(){return t.geoProjection(tt).scale(152.63)}function We(Me){if(!Me)return tt;var Ce=1/_(Me);function Be(Ne,Qe){var Je=Ce+Me-Qe,lt=Je&&Ne*o(Qe)/Je;return[Je*x(lt),Ce-Je*o(lt)]}return Be.invert=function(Ne,Qe){var Je=O(Ne*Ne+(Qe=Ce-Qe)*Qe),lt=Ce+Me-Je;return[Je/o(lt)*i(Ne,Qe),lt]},Be}function mt(){return ot(We).scale(123.082).center([0,26.1441]).parallel(45)}function bt(Me){function Ce(Be,Ne){var Qe=S-Ne,Je=Qe&&Be*Me*x(Qe)/Qe;return[Qe*x(Je)/Me,S-Qe*o(Je)]}return Ce.invert=function(Be,Ne){var Qe=Be*Me,Je=S-Ne,lt=O(Qe*Qe+Je*Je),Gt=i(Qe,Je);return[(lt?lt/x(lt):1)*Gt/Me,S-lt]},Ce}function Yt(){var Me=.5,Ce=t.geoProjectionMutator(bt),Be=Ce(Me);return Be.fraction=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(158.837)}var jt=qe(1,4/k,k);function mr(){return t.geoProjection(jt).scale(152.63)}function or(Me,Ce,Be,Ne,Qe,Je){var lt=o(Je),Gt;if(n(Me)>1||n(Je)>1)Gt=B(Be*Qe+Ce*Ne*lt);else{var Zt=x(Me/2),Nt=x(Je/2);Gt=2*R(O(Zt*Zt+Ce*Ne*Nt*Nt))}return n(Gt)>y?[Gt,i(Ne*x(Je),Ce*Qe-Be*Ne*lt)]:[0,0]}function fr(Me,Ce,Be){return B((Me*Me+Ce*Ce-Be*Be)/(2*Me*Ce))}function Ot(Me){return Me-2*k*l((Me+k)/(2*k))}function cr(Me,Ce,Be){for(var Ne=[[Me[0],Me[1],x(Me[1]),o(Me[1])],[Ce[0],Ce[1],x(Ce[1]),o(Ce[1])],[Be[0],Be[1],x(Be[1]),o(Be[1])]],Qe=Ne[2],Je,lt=0;lt<3;++lt,Qe=Je)Je=Ne[lt],Qe.v=or(Je[1]-Qe[1],Qe[3],Qe[2],Je[3],Je[2],Je[0]-Qe[0]),Qe.point=[0,0];var Gt=fr(Ne[0].v[0],Ne[2].v[0],Ne[1].v[0]),Zt=fr(Ne[0].v[0],Ne[1].v[0],Ne[2].v[0]),Nt=k-Gt;Ne[2].point[1]=0,Ne[0].point[0]=-(Ne[1].point[0]=Ne[0].v[0]/2);var Kt=[Ne[2].point[0]=Ne[0].point[0]+Ne[2].v[0]*o(Gt),2*(Ne[0].point[1]=Ne[1].point[1]=Ne[2].v[0]*x(Gt))];function ur(Sr,Br){var ln=x(Br),wn=o(Br),In=new Array(3),gi;for(gi=0;gi<3;++gi){var Bi=Ne[gi];if(In[gi]=or(Br-Bi[1],Bi[3],Bi[2],wn,ln,Sr-Bi[0]),!In[gi][0])return Bi.point;In[gi][1]=Ot(In[gi][1]-Bi.v[1])}var mi=Kt.slice();for(gi=0;gi<3;++gi){var ia=gi==2?0:gi+1,ua=fr(Ne[gi].v[0],In[gi][0],In[ia][0]);In[gi][1]<0&&(ua=-ua),gi?gi==1?(ua=Zt-ua,mi[0]-=In[gi][0]*o(ua),mi[1]-=In[gi][0]*x(ua)):(ua=Nt-ua,mi[0]+=In[gi][0]*o(ua),mi[1]+=In[gi][0]*x(ua)):(mi[0]+=In[gi][0]*o(ua),mi[1]-=In[gi][0]*x(ua))}return mi[0]/=3,mi[1]/=3,mi}return ur}function Ct(Me){return Me[0]*=E,Me[1]*=E,Me}function wt(){return Tt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Tt(Me,Ce,Be){var Ne=t.geoCentroid({type:"MultiPoint",coordinates:[Me,Ce,Be]}),Qe=[-Ne[0],-Ne[1]],Je=t.geoRotation(Qe),lt=cr(Ct(Je(Me)),Ct(Je(Ce)),Ct(Je(Be)));lt.invert=Oe(lt);var Gt=t.geoProjection(lt).rotate(Qe),Zt=Gt.center;return delete Gt.rotate,Gt.center=function(Nt){return arguments.length?Zt(Je(Nt)):Je.invert(Zt())},Gt.clipAngle(90)}function Mt(Me,Ce){var Be=O(1-x(Ce));return[2/T*Me*Be,T*(1-Be)]}Mt.invert=function(Me,Ce){var Be=(Be=Ce/T-1)*Be;return[Be>0?Me*O(k/Be)/2:0,R(1-Be)]};function Lt(){return t.geoProjection(Mt).scale(95.6464).center([0,30])}function ft(Me){var Ce=_(Me);function Be(Ne,Qe){return[Ne,(Ne?Ne/x(Ne):1)*(x(Qe)*o(Ne)-Ce*o(Qe))]}return Be.invert=Ce?function(Ne,Qe){Ne&&(Qe*=x(Ne)/Ne);var Je=o(Ne);return[Ne,2*i(O(Je*Je+Ce*Ce-Qe*Qe)-Je,Ce-Qe)]}:function(Ne,Qe){return[Ne,R(Ne?Qe*_(Ne)/Ne:Qe)]},Be}function kt(){return ot(ft).scale(249.828).clipAngle(90)}var rr=O(3);function pr(Me,Ce){return[rr*Me*(2*o(2*Ce/3)-1)/T,rr*T*x(Ce/3)]}pr.invert=function(Me,Ce){var Be=3*R(Ce/(rr*T));return[T*Me/(rr*(2*o(2*Be/3)-1)),Be]};function Kr(){return t.geoProjection(pr).scale(156.19)}function Nr(Me){var Ce=o(Me);function Be(Ne,Qe){return[Ne*Ce,x(Qe)/Ce]}return Be.invert=function(Ne,Qe){return[Ne/Ce,R(Qe*Ce)]},Be}function dn(){return ot(Nr).parallel(38.58).scale(195.044)}function xr(Me){var Ce=o(Me);function Be(Ne,Qe){return[Ne*Ce,(1+Ce)*_(Qe/2)]}return Be.invert=function(Ne,Qe){return[Ne/Ce,a(Qe/(1+Ce))*2]},Be}function Fr(){return ot(xr).scale(124.75)}function Zr(Me,Ce){var Be=O(8/(3*k));return[Be*Me*(1-n(Ce)/k),Be*Ce]}Zr.invert=function(Me,Ce){var Be=O(8/(3*k)),Ne=Ce/Be;return[Me/(Be*(1-n(Ne)/k)),Ne]};function Cn(){return t.geoProjection(Zr).scale(165.664)}function Dt(Me,Ce){var Be=O(4-3*x(n(Ce)));return[2/O(6*k)*Me*Be,p(Ce)*O(2*k/3)*(2-Be)]}Dt.invert=function(Me,Ce){var Be=2-n(Ce)/O(2*k/3);return[Me*O(6*k)/(2*Be),p(Ce)*R((4-Be*Be)/3)]};function At(){return t.geoProjection(Dt).scale(165.664)}function Vt(Me,Ce){var Be=O(k*(4+k));return[2/Be*Me*(1+O(1-4*Ce*Ce/(k*k))),4/Be*Ce]}Vt.invert=function(Me,Ce){var Be=O(k*(4+k))/2;return[Me*Be/(1+O(1-Ce*Ce*(4+k)/(4*k))),Ce*Be/2]};function Qt(){return t.geoProjection(Vt).scale(180.739)}function Ut(Me,Ce){var Be=(2+S)*x(Ce);Ce/=2;for(var Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;Ne++){var Je=o(Ce);Ce-=Qe=(Ce+x(Ce)*(Je+2)-Be)/(2*Je*(1+Je))}return[2/O(k*(4+k))*Me*(1+o(Ce)),2*O(k/(4+k))*x(Ce)]}Ut.invert=function(Me,Ce){var Be=Ce*O((4+k)/k)/2,Ne=R(Be),Qe=o(Ne);return[Me/(2/O(k*(4+k))*(1+Qe)),R((Ne+Be*(Qe+2))/(2+S))]};function _r(){return t.geoProjection(Ut).scale(180.739)}function rn(Me,Ce){return[Me*(1+o(Ce))/O(2+k),2*Ce/O(2+k)]}rn.invert=function(Me,Ce){var Be=O(2+k),Ne=Ce*Be/2;return[Be*Me/(1+o(Ne)),Ne]};function Jr(){return t.geoProjection(rn).scale(173.044)}function qn(Me,Ce){for(var Be=(1+S)*x(Ce),Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;Ne++)Ce-=Qe=(Ce+x(Ce)-Be)/(1+o(Ce));return Be=O(2+k),[Me*(1+o(Ce))/Be,2*Ce/Be]}qn.invert=function(Me,Ce){var Be=1+S,Ne=O(Be/2);return[Me*2*Ne/(1+o(Ce*=Ne)),R((Ce+x(Ce))/Be)]};function ri(){return t.geoProjection(qn).scale(173.044)}var Jn=3+2*A;function Ii(Me,Ce){var Be=x(Me/=2),Ne=o(Me),Qe=O(o(Ce)),Je=o(Ce/=2),lt=x(Ce)/(Je+A*Ne*Qe),Gt=O(2/(1+lt*lt)),Zt=O((A*Je+(Ne+Be)*Qe)/(A*Je+(Ne-Be)*Qe));return[Jn*(Gt*(Zt-1/Zt)-2*u(Zt)),Jn*(Gt*lt*(Zt+1/Zt)-2*a(lt))]}Ii.invert=function(Me,Ce){if(!(Je=_e.invert(Me/1.2,Ce*1.065)))return null;var Be=Je[0],Ne=Je[1],Qe=20,Je;Me/=Jn,Ce/=Jn;do{var lt=Be/2,Gt=Ne/2,Zt=x(lt),Nt=o(lt),Kt=x(Gt),ur=o(Gt),Sr=o(Ne),Br=O(Sr),ln=Kt/(ur+A*Nt*Br),wn=ln*ln,In=O(2/(1+wn)),gi=A*ur+(Nt+Zt)*Br,Bi=A*ur+(Nt-Zt)*Br,mi=gi/Bi,ia=O(mi),ua=ia-1/ia,lo=ia+1/ia,Bo=In*ua-2*u(ia)-Me,Ua=In*ln*lo-2*a(ln)-Ce,ls=Kt&&w*Br*Zt*wn/Kt,cl=(A*Nt*ur+Br)/(2*(ur+A*Nt*Br)*(ur+A*Nt*Br)*Br),Eu=-.5*ln*In*In*In,el=Eu*ls,yc=Eu*cl,wi=(wi=2*ur+A*Br*(Nt-Zt))*wi*ia,Di=(A*Nt*ur*Br+Sr)/wi,fl=-(A*Zt*Kt)/(Br*wi),Fc=ua*el-2*Di/ia+In*(Di+Di/mi),du=ua*yc-2*fl/ia+In*(fl+fl/mi),ms=ln*lo*el-2*ls/(1+wn)+In*lo*ls+In*ln*(Di-Di/mi),ff=ln*lo*yc-2*cl/(1+wn)+In*lo*cl+In*ln*(fl-fl/mi),ku=du*ms-ff*Fc;if(!ku)break;var hl=(Ua*du-Bo*ff)/ku,mh=(Bo*ms-Ua*Fc)/ku;Be-=hl,Ne=c(-S,f(S,Ne-mh))}while((n(hl)>y||n(mh)>y)&&--Qe>0);return n(n(Ne)-S)Ne){var ur=O(Kt),Sr=i(Nt,Zt),Br=Be*g(Sr/Be),ln=Sr-Br,wn=Me*o(ln),In=(Me*x(ln)-ln*x(wn))/(S-wn),gi=ao(ln,In),Bi=(k-Me)/Da(gi,wn,k);Zt=ur;var mi=50,ia;do Zt-=ia=(Me+Da(gi,wn,Zt)*Bi-ur)/(gi(Zt)*Bi);while(n(ia)>y&&--mi>0);Nt=ln*x(Zt),ZtNe){var Zt=O(Gt),Nt=i(lt,Je),Kt=Be*g(Nt/Be),ur=Nt-Kt;Je=Zt*o(ur),lt=Zt*x(ur);for(var Sr=Je-S,Br=x(Je),ln=lt/Br,wn=Jey||n(ln)>y)&&--wn>0);return[ur,Sr]},Zt}var Zs=bo(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function su(){return t.geoProjection(Zs).scale(149.995)}var fc=bo(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Af(){return t.geoProjection(fc).scale(153.93)}var ut=bo(5/6*k,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Jt(){return t.geoProjection(ut).scale(130.945)}function er(Me,Ce){var Be=Me*Me,Ne=Ce*Ce;return[Me*(1-.162388*Ne)*(.87-952426e-9*Be*Be),Ce*(1+Ne/12)]}er.invert=function(Me,Ce){var Be=Me,Ne=Ce,Qe=50,Je;do{var lt=Ne*Ne;Ne-=Je=(Ne*(1+lt/12)-Ce)/(1+lt/4)}while(n(Je)>y&&--Qe>0);Qe=50,Me/=1-.162388*lt;do{var Gt=(Gt=Be*Be)*Gt;Be-=Je=(Be*(.87-952426e-9*Gt)-Me)/(.87-.00476213*Gt)}while(n(Je)>y&&--Qe>0);return[Be,Ne]};function wr(){return t.geoProjection(er).scale(131.747)}var nn=bo(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Dr(){return t.geoProjection(nn).scale(131.087)}function bn(Me){var Ce=Me(S,0)[0]-Me(-S,0)[0];function Be(Ne,Qe){var Je=Ne>0?-.5:.5,lt=Me(Ne+Je*k,Qe);return lt[0]-=Je*Ce,lt}return Me.invert&&(Be.invert=function(Ne,Qe){var Je=Ne>0?-.5:.5,lt=Me.invert(Ne+Je*Ce,Qe),Gt=lt[0]-Je*k;return Gt<-k?Gt+=2*k:Gt>k&&(Gt-=2*k),lt[0]=Gt,lt}),Be}function Yr(Me,Ce){var Be=p(Me),Ne=p(Ce),Qe=o(Ce),Je=o(Me)*Qe,lt=x(Me)*Qe,Gt=x(Ne*Ce);Me=n(i(lt,Gt)),Ce=R(Je),n(Me-S)>y&&(Me%=S);var Zt=Tn(Me>k/4?S-Me:Me,Ce);return Me>k/4&&(Gt=Zt[0],Zt[0]=-Zt[1],Zt[1]=-Gt),Zt[0]*=Be,Zt[1]*=-Ne,Zt}Yr.invert=function(Me,Ce){n(Me)>1&&(Me=p(Me)*2-Me),n(Ce)>1&&(Ce=p(Ce)*2-Ce);var Be=p(Me),Ne=p(Ce),Qe=-Be*Me,Je=-Ne*Ce,lt=Je/Qe<1,Gt=Kn(lt?Je:Qe,lt?Qe:Je),Zt=Gt[0],Nt=Gt[1],Kt=o(Nt);return lt&&(Zt=-S-Zt),[Be*(i(x(Zt)*Kt,-x(Nt))+k),Ne*R(o(Zt)*Kt)]};function Tn(Me,Ce){if(Ce===S)return[0,0];var Be=x(Ce),Ne=Be*Be,Qe=Ne*Ne,Je=1+Qe,lt=1+3*Qe,Gt=1-Qe,Zt=R(1/O(Je)),Nt=Gt+Ne*Je*Zt,Kt=(1-Be)/Nt,ur=O(Kt),Sr=Kt*Je,Br=O(Sr),ln=ur*Gt,wn,In;if(Me===0)return[0,-(ln+Ne*Br)];var gi=o(Ce),Bi=1/gi,mi=2*Be*gi,ia=(-3*Ne+Zt*lt)*mi,ua=(-Nt*gi-(1-Be)*ia)/(Nt*Nt),lo=.5*ua/ur,Bo=Gt*lo-2*Ne*ur*mi,Ua=Ne*Je*ua+Kt*lt*mi,ls=-Bi*mi,cl=-Bi*Ua,Eu=-2*Bi*Bo,el=4*Me/k,yc;if(Me>.222*k||Ce.175*k){if(wn=(ln+Ne*O(Sr*(1+Qe)-ln*ln))/(1+Qe),Me>k/4)return[wn,wn];var wi=wn,Di=.5*wn;wn=.5*(Di+wi),In=50;do{var fl=O(Sr-wn*wn),Fc=wn*(Eu+ls*fl)+cl*R(wn/Br)-el;if(!Fc)break;Fc<0?Di=wn:wi=wn,wn=.5*(Di+wi)}while(n(wi-Di)>y&&--In>0)}else{wn=y,In=25;do{var du=wn*wn,ms=O(Sr-du),ff=Eu+ls*ms,ku=wn*ff+cl*R(wn/Br)-el,hl=ff+(cl-ls*du)/ms;wn-=yc=ms?ku/hl:0}while(n(yc)>y&&--In>0)}return[wn,-ln-Ne*O(Sr-wn*wn)]}function Kn(Me,Ce){for(var Be=0,Ne=1,Qe=.5,Je=50;;){var lt=Qe*Qe,Gt=O(Qe),Zt=R(1/O(1+lt)),Nt=1-lt+Qe*(1+lt)*Zt,Kt=(1-Gt)/Nt,ur=O(Kt),Sr=Kt*(1+lt),Br=ur*(1-lt),ln=Sr-Me*Me,wn=O(ln),In=Ce+Br+Qe*wn;if(n(Ne-Be)0?Be=Qe:Ne=Qe,Qe=.5*(Be+Ne)}if(!Je)return null;var gi=R(Gt),Bi=o(gi),mi=1/Bi,ia=2*Gt*Bi,ua=(-3*Qe+Zt*(1+3*lt))*ia,lo=(-Nt*Bi-(1-Gt)*ua)/(Nt*Nt),Bo=.5*lo/ur,Ua=(1-lt)*Bo-2*Qe*ur*ia,ls=-2*mi*Ua,cl=-mi*ia,Eu=-mi*(Qe*(1+lt)*lo+Kt*(1+3*lt)*ia);return[k/4*(Me*(ls+cl*wn)+Eu*R(Me/O(Sr))),gi]}function Qn(){return t.geoProjection(bn(Yr)).scale(239.75)}function Ai(Me,Ce,Be){var Ne,Qe,Je;return Me?(Ne=Ji(Me,Be),Ce?(Qe=Ji(Ce,1-Be),Je=Qe[1]*Qe[1]+Be*Ne[0]*Ne[0]*Qe[0]*Qe[0],[[Ne[0]*Qe[2]/Je,Ne[1]*Ne[2]*Qe[0]*Qe[1]/Je],[Ne[1]*Qe[1]/Je,-Ne[0]*Ne[2]*Qe[0]*Qe[2]/Je],[Ne[2]*Qe[1]*Qe[2]/Je,-Be*Ne[0]*Ne[1]*Qe[0]/Je]]):[[Ne[0],0],[Ne[1],0],[Ne[2],0]]):(Qe=Ji(Ce,1-Be),[[0,Qe[0]/Qe[1]],[1/Qe[1],0],[Qe[2]/Qe[1],0]])}function Ji(Me,Ce){var Be,Ne,Qe,Je,lt;if(Ce=1-y)return Be=(1-Ce)/4,Ne=q(Me),Je=V(Me),Qe=1/Ne,lt=Ne*j(Me),[Je+Be*(lt-Me)/(Ne*Ne),Qe-Be*Je*Qe*(lt-Me),Qe+Be*Je*Qe*(lt+Me),2*a(s(Me))-S+Be*(lt-Me)/Ne];var Gt=[1,0,0,0,0,0,0,0,0],Zt=[O(Ce),0,0,0,0,0,0,0,0],Nt=0;for(Ne=O(1-Ce),lt=1;n(Zt[Nt]/Gt[Nt])>y&&Nt<8;)Be=Gt[Nt++],Zt[Nt]=(Be-Ne)/2,Gt[Nt]=(Be+Ne)/2,Ne=O(Be*Ne),lt*=2;Qe=lt*Gt[Nt]*Me;do Je=Zt[Nt]*x(Ne=Qe)/Gt[Nt],Qe=(R(Je)+Qe)/2;while(--Nt);return[x(Qe),Je=o(Qe),Je/o(Qe-Ne),Qe]}function Ra(Me,Ce,Be){var Ne=n(Me),Qe=n(Ce),Je=j(Qe);if(Ne){var lt=1/x(Ne),Gt=1/(_(Ne)*_(Ne)),Zt=-(Gt+Be*(Je*Je*lt*lt)-1+Be),Nt=(Be-1)*Gt,Kt=(-Zt+O(Zt*Zt-4*Nt))/2;return[ii(a(1/O(Kt)),Be)*p(Me),ii(a(O((Kt/Gt-1)/Be)),1-Be)*p(Ce)]}return[0,ii(a(Je),1-Be)*p(Ce)]}function ii(Me,Ce){if(!Ce)return Me;if(Ce===1)return u(_(Me/2+L));for(var Be=1,Ne=O(1-Ce),Qe=O(Ce),Je=0;n(Qe)>y;Je++){if(Me%k){var lt=a(Ne*_(Me)/Be);lt<0&&(lt+=k),Me+=lt+~~(Me/k)*k}else Me+=Me;Qe=(Be+Ne)/2,Ne=O(Be*Ne),Qe=((Be=Qe)-Ne)/2}return Me/(v(2,Je)*Be)}function Za(Me,Ce){var Be=(A-1)/(A+1),Ne=O(1-Be*Be),Qe=ii(S,Ne*Ne),Je=-1,lt=u(_(k/4+n(Ce)/2)),Gt=s(Je*lt)/O(Be),Zt=ja(Gt*o(Je*Me),Gt*x(Je*Me)),Nt=Ra(Zt[0],Zt[1],Ne*Ne);return[-Nt[1],(Ce>=0?1:-1)*(.5*Qe-Nt[0])]}function ja(Me,Ce){var Be=Me*Me,Ne=Ce+1,Qe=1-Be-Ce*Ce;return[.5*((Me>=0?S:-S)-i(Qe,2*Me)),-.25*u(Qe*Qe+4*Be)+.5*u(Ne*Ne+Be)]}function qo(Me,Ce){var Be=Ce[0]*Ce[0]+Ce[1]*Ce[1];return[(Me[0]*Ce[0]+Me[1]*Ce[1])/Be,(Me[1]*Ce[0]-Me[0]*Ce[1])/Be]}Za.invert=function(Me,Ce){var Be=(A-1)/(A+1),Ne=O(1-Be*Be),Qe=ii(S,Ne*Ne),Je=-1,lt=Ai(.5*Qe-Ce,-Me,Ne*Ne),Gt=qo(lt[0],lt[1]),Zt=i(Gt[1],Gt[0])/Je;return[Zt,2*a(s(.5/Je*u(Be*Gt[0]*Gt[0]+Be*Gt[1]*Gt[1])))-S]};function $a(){return t.geoProjection(bn(Za)).scale(151.496)}function Ka(Me){var Ce=x(Me),Be=o(Me),Ne=Oa(Me);Ne.invert=Oa(-Me);function Qe(Je,lt){var Gt=Ne(Je,lt);Je=Gt[0],lt=Gt[1];var Zt=x(lt),Nt=o(lt),Kt=o(Je),ur=B(Ce*Zt+Be*Nt*Kt),Sr=x(ur),Br=n(Sr)>y?ur/Sr:1;return[Br*Be*x(Je),(n(Je)>S?Br:-Br)*(Ce*Nt-Be*Zt*Kt)]}return Qe.invert=function(Je,lt){var Gt=O(Je*Je+lt*lt),Zt=-x(Gt),Nt=o(Gt),Kt=Gt*Nt,ur=-lt*Zt,Sr=Gt*Ce,Br=O(Kt*Kt+ur*ur-Sr*Sr),ln=i(Kt*Sr+ur*Br,ur*Sr-Kt*Br),wn=(Gt>S?-1:1)*i(Je*Zt,Gt*o(ln)*Nt+lt*x(ln)*Zt);return Ne.invert(wn,ln)},Qe}function Oa(Me){var Ce=x(Me),Be=o(Me);return function(Ne,Qe){var Je=o(Qe),lt=o(Ne)*Je,Gt=x(Ne)*Je,Zt=x(Qe);return[i(Gt,lt*Be-Zt*Ce),R(Zt*Be+lt*Ce)]}}function Ni(){var Me=0,Ce=t.geoProjectionMutator(Ka),Be=Ce(Me),Ne=Be.rotate,Qe=Be.stream,Je=t.geoCircle();return Be.parallel=function(lt){if(!arguments.length)return Me*F;var Gt=Be.rotate();return Ce(Me=lt*E).rotate(Gt)},Be.rotate=function(lt){return arguments.length?(Ne.call(Be,[lt[0],lt[1]-Me*F]),Je.center([-lt[0],-lt[1]]),Be):(lt=Ne.call(Be),lt[1]+=Me*F,lt)},Be.stream=function(lt){return lt=Qe(lt),lt.sphere=function(){lt.polygonStart();var Gt=.01,Zt=Je.radius(90-Gt)().coordinates[0],Nt=Zt.length-1,Kt=-1,ur;for(lt.lineStart();++Kt=0;)lt.point((ur=Zt[Kt])[0],ur[1]);lt.lineEnd(),lt.polygonEnd()},lt},Be.scale(79.4187).parallel(45).clipAngle(180-.001)}var ka=3,vs=R(1-1/ka)*F,yo=Nr(0);function so(Me){var Ce=vs*E,Be=Mt(k,Ce)[0]-Mt(-k,Ce)[0],Ne=yo(0,Ce)[1],Qe=Mt(0,Ce)[1],Je=T-Qe,lt=m/Me,Gt=4/m,Zt=Ne+Je*Je*4/m;function Nt(Kt,ur){var Sr,Br=n(ur);if(Br>Ce){var ln=f(Me-1,c(0,l((Kt+k)/lt)));Kt+=k*(Me-1)/Me-ln*lt,Sr=Mt(Kt,Br),Sr[0]=Sr[0]*m/Be-m*(Me-1)/(2*Me)+ln*m/Me,Sr[1]=Ne+(Sr[1]-Qe)*4*Je/m,ur<0&&(Sr[1]=-Sr[1])}else Sr=yo(Kt,ur);return Sr[0]*=Gt,Sr[1]/=Zt,Sr}return Nt.invert=function(Kt,ur){Kt/=Gt,ur*=Zt;var Sr=n(ur);if(Sr>Ne){var Br=f(Me-1,c(0,l((Kt+k)/lt)));Kt=(Kt+k*(Me-1)/Me-Br*lt)*Be/m;var ln=Mt.invert(Kt,.25*(Sr-Ne)*m/Je+Qe);return ln[0]-=k*(Me-1)/Me-Br*lt,ur<0&&(ln[1]=-ln[1]),ln}return yo.invert(Kt,ur)},Nt}function oo(Me,Ce){return[Me,Ce&1?90-y:vs]}function ko(Me,Ce){return[Me,Ce&1?-90+y:-vs]}function pa(Me){return[Me[0]*(1-y),Me[1]]}function la(Me){var Ce=[].concat(r.range(-180,180+Me/2,Me).map(oo),r.range(180,-180-Me/2,-Me).map(ko));return{type:"Polygon",coordinates:[Me===180?Ce.map(pa):Ce]}}function As(){var Me=4,Ce=t.geoProjectionMutator(so),Be=Ce(Me),Ne=Be.stream;return Be.lobes=function(Qe){return arguments.length?Ce(Me=+Qe):Me},Be.stream=function(Qe){var Je=Be.rotate(),lt=Ne(Qe),Gt=(Be.rotate([0,0]),Ne(Qe));return Be.rotate(Je),lt.sphere=function(){t.geoStream(la(180/Me),Gt)},lt},Be.scale(239.75)}function Ms(Me){var Ce=1+Me,Be=x(1/Ce),Ne=R(Be),Qe=2*O(k/(Je=k+4*Ne*Ce)),Je,lt=.5*Qe*(Ce+O(Me*(2+Me))),Gt=Me*Me,Zt=Ce*Ce;function Nt(Kt,ur){var Sr=1-x(ur),Br,ln;if(Sr&&Sr<2){var wn=S-ur,In=25,gi;do{var Bi=x(wn),mi=o(wn),ia=Ne+i(Bi,Ce-mi),ua=1+Zt-2*Ce*mi;wn-=gi=(wn-Gt*Ne-Ce*Bi+ua*ia-.5*Sr*Je)/(2*Ce*Bi*ia)}while(n(gi)>C&&--In>0);Br=Qe*O(ua),ln=Kt*ia/k}else Br=Qe*(Me+Sr),ln=Kt*Ne/k;return[Br*x(ln),lt-Br*o(ln)]}return Nt.invert=function(Kt,ur){var Sr=Kt*Kt+(ur-=lt)*ur,Br=(1+Zt-Sr/(Qe*Qe))/(2*Ce),ln=B(Br),wn=x(ln),In=Ne+i(wn,Ce-Br);return[R(Kt/O(Sr))*k/In,R(1-2*(ln-Gt*Ne-Ce*wn+(1+Zt-2*Ce*Br)*In)/Je)]},Nt}function xu(){var Me=1,Ce=t.geoProjectionMutator(Ms),Be=Ce(Me);return Be.ratio=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(167.774).center([0,18.67])}var rs=.7109889596207567,Ls=.0528035274542;function $s(Me,Ce){return Ce>-rs?(Me=we(Me,Ce),Me[1]+=Ls,Me):tt(Me,Ce)}$s.invert=function(Me,Ce){return Ce>-rs?we.invert(Me,Ce-Ls):tt.invert(Me,Ce)};function Kc(){return t.geoProjection($s).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function _u(Me,Ce){return n(Ce)>rs?(Me=we(Me,Ce),Me[1]-=Ce>0?Ls:-Ls,Me):tt(Me,Ce)}_u.invert=function(Me,Ce){return n(Ce)>rs?we.invert(Me,Ce+(Ce>0?Ls:-Ls)):tt.invert(Me,Ce)};function Gu(){return t.geoProjection(_u).scale(152.63)}function Ja(Me,Ce,Be,Ne){var Qe=O(4*k/(2*Be+(1+Me-Ce/2)*x(2*Be)+(Me+Ce)/2*x(4*Be)+Ce/2*x(6*Be))),Je=O(Ne*x(Be)*O((1+Me*o(2*Be)+Ce*o(4*Be))/(1+Me+Ce))),lt=Be*Zt(1);function Gt(ur){return O(1+Me*o(2*ur)+Ce*o(4*ur))}function Zt(ur){var Sr=ur*Be;return(2*Sr+(1+Me-Ce/2)*x(2*Sr)+(Me+Ce)/2*x(4*Sr)+Ce/2*x(6*Sr))/Be}function Nt(ur){return Gt(ur)*x(ur)}var Kt=function(ur,Sr){var Br=Be*it(Zt,lt*x(Sr)/Be,Sr/k);isNaN(Br)&&(Br=Be*p(Sr));var ln=Qe*Gt(Br);return[ln*Je*ur/k*o(Br),ln/Je*x(Br)]};return Kt.invert=function(ur,Sr){var Br=it(Nt,Sr*Je/Qe);return[ur*k/(o(Br)*Qe*Je*Gt(Br)),R(Be*Zt(Br/Be)/lt)]},Be===0&&(Qe=O(Ne/k),Kt=function(ur,Sr){return[ur*Qe,x(Sr)/Qe]},Kt.invert=function(ur,Sr){return[ur/Qe,R(Sr*Qe)]}),Kt}function ps(){var Me=1,Ce=0,Be=45*E,Ne=2,Qe=t.geoProjectionMutator(Ja),Je=Qe(Me,Ce,Be,Ne);return Je.a=function(lt){return arguments.length?Qe(Me=+lt,Ce,Be,Ne):Me},Je.b=function(lt){return arguments.length?Qe(Me,Ce=+lt,Be,Ne):Ce},Je.psiMax=function(lt){return arguments.length?Qe(Me,Ce,Be=+lt*E,Ne):Be*F},Je.ratio=function(lt){return arguments.length?Qe(Me,Ce,Be,Ne=+lt):Ne},Je.scale(180.739)}function Sa(Me,Ce,Be,Ne,Qe,Je,lt,Gt,Zt,Nt,Kt){if(Kt.nanEncountered)return NaN;var ur,Sr,Br,ln,wn,In,gi,Bi,mi,ia;if(ur=Be-Ce,Sr=Me(Ce+ur*.25),Br=Me(Be-ur*.25),isNaN(Sr)){Kt.nanEncountered=!0;return}if(isNaN(Br)){Kt.nanEncountered=!0;return}return ln=ur*(Ne+4*Sr+Qe)/12,wn=ur*(Qe+4*Br+Je)/12,In=ln+wn,ia=(In-lt)/15,Nt>Zt?(Kt.maxDepthCount++,In+ia):Math.abs(ia)>1;do Zt[In]>Br?wn=In:ln=In,In=ln+wn>>1;while(In>ln);var gi=Zt[In+1]-Zt[In];return gi&&(gi=(Br-Zt[In+1])/gi),(In+1+gi)/lt}var ur=2*Kt(1)/k*Je/Be,Sr=function(Br,ln){var wn=Kt(n(x(ln))),In=Ne(wn)*Br;return wn/=ur,[In,ln>=0?wn:-wn]};return Sr.invert=function(Br,ln){var wn;return ln*=ur,n(ln)<1&&(wn=p(ln)*R(Qe(n(ln))*Je)),[Br/Ne(n(ln)),wn]},Sr}function Ca(){var Me=0,Ce=2.5,Be=1.183136,Ne=t.geoProjectionMutator(Ps),Qe=Ne(Me,Ce,Be);return Qe.alpha=function(Je){return arguments.length?Ne(Me=+Je,Ce,Be):Me},Qe.k=function(Je){return arguments.length?Ne(Me,Ce=+Je,Be):Ce},Qe.gamma=function(Je){return arguments.length?Ne(Me,Ce,Be=+Je):Be},Qe.scale(152.63)}function Pl(Me,Ce){return n(Me[0]-Ce[0])=0;--Zt)Be=Me[1][Zt],Ne=Be[0][0],Qe=Be[0][1],Je=Be[1][1],lt=Be[2][0],Gt=Be[2][1],Ce.push(ll([[lt-y,Gt-y],[lt-y,Je+y],[Ne+y,Je+y],[Ne+y,Qe-y]],30));return{type:"Polygon",coordinates:[r.merge(Ce)]}}function lu(Me,Ce,Be){var Ne,Qe;function Je(Zt,Nt){for(var Kt=Nt<0?-1:1,ur=Ce[+(Nt<0)],Sr=0,Br=ur.length-1;Srur[Sr][2][0];++Sr);var ln=Me(Zt-ur[Sr][1][0],Nt);return ln[0]+=Me(ur[Sr][1][0],Kt*Nt>Kt*ur[Sr][0][1]?ur[Sr][0][1]:Nt)[0],ln}Be?Je.invert=Be(Je):Me.invert&&(Je.invert=function(Zt,Nt){for(var Kt=Qe[+(Nt<0)],ur=Ce[+(Nt<0)],Sr=0,Br=Kt.length;Srln&&(wn=Br,Br=ln,ln=wn),[[ur,Br],[Sr,ln]]})}),lt):Ce.map(function(Nt){return Nt.map(function(Kt){return[[Kt[0][0]*F,Kt[0][1]*F],[Kt[1][0]*F,Kt[1][1]*F],[Kt[2][0]*F,Kt[2][1]*F]]})})},Ce!=null&<.lobes(Ce),lt}var Mf=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Bd(){return lu(Ve,Mf).scale(160.857)}var Hu=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Sf(){return lu(_u,Hu).scale(152.63)}var kc=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Uo(){return lu(we,kc).scale(169.529)}var ns=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ks(){return lu(we,ns).scale(169.529).rotate([20,0])}var Ef=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function ju(){return lu($s,Ef,Oe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var gs=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function bu(){return lu(tt,gs).scale(152.63).rotate([-20,0])}function kf(Me,Ce){return[3/m*Me*O(k*k/3-Ce*Ce),Ce]}kf.invert=function(Me,Ce){return[m/3*Me/O(k*k/3-Ce*Ce),Ce]};function ah(){return t.geoProjection(kf).scale(158.837)}function Od(Me){function Ce(Be,Ne){if(n(n(Ne)-S)2)return null;Be/=2,Ne/=2;var Je=Be*Be,lt=Ne*Ne,Gt=2*Ne/(1+Je+lt);return Gt=v((1+Gt)/(1-Gt),1/Me),[i(2*Be,1-Je-lt)/Me,R((Gt-1)/(Gt+1))]},Ce}function Qc(){var Me=.5,Ce=t.geoProjectionMutator(Od),Be=Ce(Me);return Be.spacing=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(124.75)}var uu=k/A;function oh(Me,Ce){return[Me*(1+O(o(Ce)))/2,Ce/(o(Ce/2)*o(Me/6))]}oh.invert=function(Me,Ce){var Be=n(Me),Ne=n(Ce),Qe=y,Je=S;Ney||n(In)>y)&&--Qe>0);return Qe&&[Be,Ne]};function Yo(){return t.geoProjection(Fl).scale(139.98)}function Ro(Me,Ce){return[x(Me)/o(Ce),_(Ce)*o(Me)]}Ro.invert=function(Me,Ce){var Be=Me*Me,Ne=Ce*Ce,Qe=Ne+1,Je=Be+Qe,lt=Me?w*O((Je-O(Je*Je-4*Be))/Be):1/O(Qe);return[R(Me*lt),p(Ce)*B(lt)]};function is(){return t.geoProjection(Ro).scale(144.049).clipAngle(90-.001)}function Dl(Me){var Ce=o(Me),Be=_(L+Me/2);function Ne(Qe,Je){var lt=Je-Me,Gt=n(lt)=0;)Kt=Me[Nt],ur=Kt[0]+Gt*(Br=ur)-Zt*Sr,Sr=Kt[1]+Gt*Sr+Zt*Br;return ur=Gt*(Br=ur)-Zt*Sr,Sr=Gt*Sr+Zt*Br,[ur,Sr]}return Be.invert=function(Ne,Qe){var Je=20,lt=Ne,Gt=Qe;do{for(var Zt=Ce,Nt=Me[Zt],Kt=Nt[0],ur=Nt[1],Sr=0,Br=0,ln;--Zt>=0;)Nt=Me[Zt],Sr=Kt+lt*(ln=Sr)-Gt*Br,Br=ur+lt*Br+Gt*ln,Kt=Nt[0]+lt*(ln=Kt)-Gt*ur,ur=Nt[1]+lt*ur+Gt*ln;Sr=Kt+lt*(ln=Sr)-Gt*Br,Br=ur+lt*Br+Gt*ln,Kt=lt*(ln=Kt)-Gt*ur-Ne,ur=lt*ur+Gt*ln-Qe;var wn=Sr*Sr+Br*Br,In,gi;lt-=In=(Kt*Sr+ur*Br)/wn,Gt-=gi=(ur*Sr-Kt*Br)/wn}while(n(In)+n(gi)>y*y&&--Je>0);if(Je){var Bi=O(lt*lt+Gt*Gt),mi=2*a(Bi*.5),ia=x(mi);return[i(lt*ia,Bi*o(mi)),Bi?R(Gt*ia/Bi):0]}},Be}var Y0=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Nd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Cf=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Vo=[[.9245,0],[0,0],[.01943,0]],Ud=[[.721316,0],[0,0],[-.00881625,-.00617325]];function zh(){return vc(Y0,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function tf(){return vc(Nd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Vd(){return vc(Cf,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function rf(){return vc(Vo,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function qh(){return vc(Ud,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function vc(Me,Ce){var Be=t.geoProjection(sh(Me)).rotate(Ce).clipAngle(90),Ne=t.geoRotation(Ce),Qe=Be.center;return delete Be.rotate,Be.center=function(Je){return arguments.length?Qe(Ne(Je)):Ne.invert(Qe())},Be}var dd=O(6),Bh=O(7);function Wu(Me,Ce){var Be=R(7*x(Ce)/(3*dd));return[dd*Me*(2*o(2*Be/3)-1)/Bh,9*x(Be/3)/Bh]}Wu.invert=function(Me,Ce){var Be=3*R(Ce*Bh/9);return[Me*Bh/(dd*(2*o(2*Be/3)-1)),R(x(Be)*3*dd/7)]};function vd(){return t.geoProjection(Wu).scale(164.859)}function pd(Me,Ce){for(var Be=(1+w)*x(Ce),Ne=Ce,Qe=0,Je;Qe<25&&(Ne-=Je=(x(Ne/2)+x(Ne)-Be)/(.5*o(Ne/2)+o(Ne)),!(n(Je)C&&--Ne>0);return Je=Be*Be,lt=Je*Je,Gt=Je*lt,[Me/(.84719-.13063*Je+Gt*Gt*(-.04515+.05494*Je-.02326*lt+.00331*Gt)),Be]};function gd(){return t.geoProjection(af).scale(175.295)}function Rl(Me,Ce){return[Me*(1+o(Ce))/2,2*(Ce-_(Ce/2))]}Rl.invert=function(Me,Ce){for(var Be=Ce/2,Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;++Ne){var Je=o(Ce/2);Ce-=Qe=(Ce-_(Ce/2)-Be)/(1-.5/(Je*Je))}return[2*Me/(1+o(Ce)),Ce]};function ch(){return t.geoProjection(Rl).scale(152.63)}var Lc=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function md(){return lu(De(1/0),Lc).rotate([20,0]).scale(152.63)}function yd(Me,Ce){var Be=x(Ce),Ne=o(Ce),Qe=p(Me);if(Me===0||n(Ce)===S)return[0,Ce];if(Ce===0)return[Me,0];if(n(Me)===S)return[Me*Ne,S*Be];var Je=k/(2*Me)-2*Me/k,lt=2*Ce/k,Gt=(1-lt*lt)/(Be-lt),Zt=Je*Je,Nt=Gt*Gt,Kt=1+Zt/Nt,ur=1+Nt/Zt,Sr=(Je*Be/Gt-Je/2)/Kt,Br=(Nt*Be/Zt+Gt/2)/ur,ln=Sr*Sr+Ne*Ne/Kt,wn=Br*Br-(Nt*Be*Be/Zt+Gt*Be-1)/ur;return[S*(Sr+O(ln)*Qe),S*(Br+O(wn<0?0:wn)*p(-Ce*Je)*Qe)]}yd.invert=function(Me,Ce){Me/=S,Ce/=S;var Be=Me*Me,Ne=Ce*Ce,Qe=Be+Ne,Je=k*k;return[Me?(Qe-1+O((1-Qe)*(1-Qe)+4*Be))/(2*Me)*S:0,it(function(lt){return Qe*(k*x(lt)-2*lt)*k+4*lt*lt*(Ce-x(lt))+2*k*lt-Je*Ce},0)]};function Lf(){return t.geoProjection(yd).scale(127.267)}var wu=1.0148,fh=.23185,Oh=-.14499,hh=.02406,Gd=wu,Gl=5*fh,wl=7*Oh,xd=9*hh,Hl=1.790857183;function _d(Me,Ce){var Be=Ce*Ce;return[Me,Ce*(wu+Be*Be*(fh+Be*(Oh+hh*Be)))]}_d.invert=function(Me,Ce){Ce>Hl?Ce=Hl:Ce<-Hl&&(Ce=-Hl);var Be=Ce,Ne;do{var Qe=Be*Be;Be-=Ne=(Be*(wu+Qe*Qe*(fh+Qe*(Oh+hh*Qe)))-Ce)/(Gd+Qe*Qe*(Gl+Qe*(wl+xd*Qe)))}while(n(Ne)>y);return[Me,Be]};function dh(){return t.geoProjection(_d).scale(139.319)}function Pf(Me,Ce){if(n(Ce)y&&--Qe>0);return lt=_(Ne),[(n(Ce)=0;)if(Ne=Ce[Gt],Be[0]===Ne[0]&&Be[1]===Ne[1]){if(Je)return[Je,Be];Je=Be}}}function Uh(Me){for(var Ce=Me.length,Be=[],Ne=Me[Ce-1],Qe=0;Qe0?[-Ne[0],0]:[180-Ne[0],180])};var Ce=pc.map(function(Be){return{face:Be,project:Me(Be)}});return[-1,0,0,1,0,1,4,5].forEach(function(Be,Ne){var Qe=Ce[Be];Qe&&(Qe.children||(Qe.children=[])).push(Ce[Ne])}),Yu(Ce[0],function(Be,Ne){return Ce[Be<-k/2?Ne<0?6:4:Be<0?Ne<0?2:0:BeNe^Br>Ne&&Be<(Sr-Nt)*(Ne-Kt)/(Br-Kt)+Nt&&(Qe=!Qe)}return Qe}function wd(Me,Ce){var Be=Ce.stream,Ne;if(!Be)throw new Error("invalid projection");switch(Me&&Me.type){case"Feature":Ne=X0;break;case"FeatureCollection":Ne=Hh;break;default:Ne=Td;break}return Ne(Me,Be)}function Hh(Me,Ce){return{type:"FeatureCollection",features:Me.features.map(function(Be){return X0(Be,Ce)})}}function X0(Me,Ce){return{type:"Feature",id:Me.id,properties:Me.properties,geometry:Td(Me.geometry,Ce)}}function y0(Me,Ce){return{type:"GeometryCollection",geometries:Me.geometries.map(function(Be){return Td(Be,Ce)})}}function Td(Me,Ce){if(!Me)return null;if(Me.type==="GeometryCollection")return y0(Me,Ce);var Be;switch(Me.type){case"Point":Be=If;break;case"MultiPoint":Be=If;break;case"LineString":Be=vh;break;case"MultiLineString":Be=vh;break;case"Polygon":Be=zf;break;case"MultiPolygon":Be=zf;break;case"Sphere":Be=zf;break;default:return null}return t.geoStream(Me,Ce(Be)),Be.result()}var ul=[],Wl=[],If={point:function(Me,Ce){ul.push([Me,Ce])},result:function(){var Me=ul.length?ul.length<2?{type:"Point",coordinates:ul[0]}:{type:"MultiPoint",coordinates:ul}:null;return ul=[],Me}},vh={lineStart:La,point:function(Me,Ce){ul.push([Me,Ce])},lineEnd:function(){ul.length&&(Wl.push(ul),ul=[])},result:function(){var Me=Wl.length?Wl.length<2?{type:"LineString",coordinates:Wl[0]}:{type:"MultiLineString",coordinates:Wl}:null;return Wl=[],Me}},zf={polygonStart:La,lineStart:La,point:function(Me,Ce){ul.push([Me,Ce])},lineEnd:function(){var Me=ul.length;if(Me){do ul.push(ul[0].slice());while(++Me<4);Wl.push(ul),ul=[]}},polygonEnd:La,result:function(){if(!Wl.length)return null;var Me=[],Ce=[];return Wl.forEach(function(Be){Rf(Be)?Me.push([Be]):Ce.push(Be)}),Ce.forEach(function(Be){var Ne=Be[0];Me.some(function(Qe){if(m0(Qe[0],Ne))return Qe.push(Be),!0})||Me.push([Be])}),Wl=[],Me.length?Me.length>1?{type:"MultiPolygon",coordinates:Me}:{type:"Polygon",coordinates:Me[0]}:null}};function qf(Me){var Ce=Me(S,0)[0]-Me(-S,0)[0];function Be(Ne,Qe){var Je=n(Ne)0?Ne-k:Ne+k,Qe),Gt=(lt[0]-lt[1])*w,Zt=(lt[0]+lt[1])*w;if(Je)return[Gt,Zt];var Nt=Ce*w,Kt=Gt>0^Zt>0?-1:1;return[Kt*Gt-p(Zt)*Nt,Kt*Zt-p(Gt)*Nt]}return Me.invert&&(Be.invert=function(Ne,Qe){var Je=(Ne+Qe)*w,lt=(Qe-Ne)*w,Gt=n(Je)<.5*Ce&&n(lt)<.5*Ce;if(!Gt){var Zt=Ce*w,Nt=Je>0^lt>0?-1:1,Kt=-Nt*Ne+(lt>0?1:-1)*Zt,ur=-Nt*Qe+(Je>0?1:-1)*Zt;Je=(-Kt-ur)*w,lt=(Kt-ur)*w}var Sr=Me.invert(Je,lt);return Gt||(Sr[0]+=Je>0?k:-k),Sr}),t.geoProjection(Be).rotate([-90,-90,45]).clipAngle(180-.001)}function Ze(){return qf(Yr).scale(176.423)}function yt(){return qf(Za).scale(111.48)}function Wt(Me,Ce){if(!(0<=(Ce=+Ce)&&Ce<=20))throw new Error("invalid digits");function Be(Nt){var Kt=Nt.length,ur=2,Sr=new Array(Kt);for(Sr[0]=+Nt[0].toFixed(Ce),Sr[1]=+Nt[1].toFixed(Ce);ur2||Br[0]!=Kt[0]||Br[1]!=Kt[1])&&(ur.push(Br),Kt=Br)}return ur.length===1&&Nt.length>1&&ur.push(Be(Nt[Nt.length-1])),ur}function Je(Nt){return Nt.map(Qe)}function lt(Nt){if(Nt==null)return Nt;var Kt;switch(Nt.type){case"GeometryCollection":Kt={type:"GeometryCollection",geometries:Nt.geometries.map(lt)};break;case"Point":Kt={type:"Point",coordinates:Be(Nt.coordinates)};break;case"MultiPoint":Kt={type:Nt.type,coordinates:Ne(Nt.coordinates)};break;case"LineString":Kt={type:Nt.type,coordinates:Qe(Nt.coordinates)};break;case"MultiLineString":case"Polygon":Kt={type:Nt.type,coordinates:Je(Nt.coordinates)};break;case"MultiPolygon":Kt={type:"MultiPolygon",coordinates:Nt.coordinates.map(Je)};break;default:return Nt}return Nt.bbox!=null&&(Kt.bbox=Nt.bbox),Kt}function Gt(Nt){var Kt={type:"Feature",properties:Nt.properties,geometry:lt(Nt.geometry)};return Nt.id!=null&&(Kt.id=Nt.id),Nt.bbox!=null&&(Kt.bbox=Nt.bbox),Kt}if(Me!=null)switch(Me.type){case"Feature":return Gt(Me);case"FeatureCollection":{var Zt={type:"FeatureCollection",features:Me.features.map(Gt)};return Me.bbox!=null&&(Zt.bbox=Me.bbox),Zt}default:return lt(Me)}return Me}function zt(Me){var Ce=x(Me);function Be(Ne,Qe){var Je=Ce?_(Ne*Ce/2)/Ce:Ne/2;if(!Qe)return[2*Je,-Me];var lt=2*a(Je*x(Qe)),Gt=1/_(Qe);return[x(lt)*Gt,Qe+(1-o(lt))*Gt-Me]}return Be.invert=function(Ne,Qe){if(n(Qe+=Me)y&&--Gt>0);var Sr=Ne*(Nt=_(lt)),Br=_(n(Qe)0?S:-S)*(Zt+Qe*(Kt-lt)/2+Qe*Qe*(Kt-2*Zt+lt)/2)]}Qr.invert=function(Me,Ce){var Be=Ce/S,Ne=Be*90,Qe=f(18,n(Ne/5)),Je=c(0,l(Qe));do{var lt=Ur[Je][1],Gt=Ur[Je+1][1],Zt=Ur[f(19,Je+2)][1],Nt=Zt-lt,Kt=Zt-2*Gt+lt,ur=2*(n(Be)-Gt)/Nt,Sr=Kt/Nt,Br=ur*(1-Sr*ur*(1-2*Sr*ur));if(Br>=0||Je===1){Ne=(Ce>=0?5:-5)*(Br+Qe);var ln=50,wn;do Qe=f(18,n(Ne)/5),Je=l(Qe),Br=Qe-Je,lt=Ur[Je][1],Gt=Ur[Je+1][1],Zt=Ur[f(19,Je+2)][1],Ne-=(wn=(Ce>=0?S:-S)*(Gt+Br*(Zt-lt)/2+Br*Br*(Zt-2*Gt+lt)/2)-Ce)*F;while(n(wn)>C&&--ln>0);break}}while(--Je>=0);var In=Ur[Je][0],gi=Ur[Je+1][0],Bi=Ur[f(19,Je+2)][0];return[Me/(gi+Br*(Bi-In)/2+Br*Br*(Bi-2*gi+In)/2),Ne*E]};function cn(){return t.geoProjection(Qr).scale(152.63)}function yn(Me){function Ce(Be,Ne){var Qe=o(Ne),Je=(Me-1)/(Me-Qe*o(Be));return[Je*Qe*x(Be),Je*x(Ne)]}return Ce.invert=function(Be,Ne){var Qe=Be*Be+Ne*Ne,Je=O(Qe),lt=(Me-O(1-Qe*(Me+1)/(Me-1)))/((Me-1)/Je+Je/(Me-1));return[i(Be*lt,Je*O(1-lt*lt)),Je?R(Ne*lt/Je):0]},Ce}function Fn(Me,Ce){var Be=yn(Me);if(!Ce)return Be;var Ne=o(Ce),Qe=x(Ce);function Je(lt,Gt){var Zt=Be(lt,Gt),Nt=Zt[1],Kt=Nt*Qe/(Me-1)+Ne;return[Zt[0]*Ne/Kt,Nt/Kt]}return Je.invert=function(lt,Gt){var Zt=(Me-1)/(Me-1-Gt*Qe);return Be.invert(Zt*lt,Zt*Gt*Ne)},Je}function en(){var Me=2,Ce=0,Be=t.geoProjectionMutator(Fn),Ne=Be(Me,Ce);return Ne.distance=function(Qe){return arguments.length?Be(Me=+Qe,Ce):Me},Ne.tilt=function(Qe){return arguments.length?Be(Me,Ce=Qe*E):Ce*F},Ne.scale(432.147).clipAngle(B(1/Me)*F-1e-6)}var vn=1e-4,mn=1e4,Pn=-180,On=Pn+vn,ki=180,Ci=ki-vn,qi=-90,pi=qi+vn,Un=90,Gn=Un-vn;function Zi(Me){return Me.length>0}function na(Me){return Math.floor(Me*mn)/mn}function Ha(Me){return Me===qi||Me===Un?[0,Me]:[Pn,na(Me)]}function Qa(Me){var Ce=Me[0],Be=Me[1],Ne=!1;return Ce<=On?(Ce=Pn,Ne=!0):Ce>=Ci&&(Ce=ki,Ne=!0),Be<=pi?(Be=qi,Ne=!0):Be>=Gn&&(Be=Un,Ne=!0),Ne?[Ce,Be]:Me}function Ya(Me){return Me.map(Qa)}function ho(Me,Ce,Be){for(var Ne=0,Qe=Me.length;Ne=Ci||Kt<=pi||Kt>=Gn){Je[lt]=Qa(Zt);for(var ur=lt+1;urOn&&Brpi&&ln=Gt)break;Be.push({index:-1,polygon:Ce,ring:Je=Je.slice(ur-1)}),Je[0]=Ha(Je[0][1]),lt=-1,Gt=Je.length}}}}function Pa(Me){var Ce,Be=Me.length,Ne={},Qe={},Je,lt,Gt,Zt,Nt;for(Ce=0;Ce0?k-Gt:Gt)*F],Nt=t.geoProjection(Me(lt)).rotate(Zt),Kt=t.geoRotation(Zt),ur=Nt.center;return delete Nt.rotate,Nt.center=function(Sr){return arguments.length?ur(Kt(Sr)):Kt.invert(ur())},Nt.clipAngle(90)}function Qs(Me){var Ce=o(Me);function Be(Ne,Qe){var Je=t.geoGnomonicRaw(Ne,Qe);return Je[0]*=Ce,Je}return Be.invert=function(Ne,Qe){return t.geoGnomonicRaw.invert(Ne/Ce,Qe)},Be}function zl(){return cu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function cu(Me,Ce){return Go(Qs,Me,Ce)}function Zu(Me){if(!(Me*=2))return t.geoAzimuthalEquidistantRaw;var Ce=-Me/2,Be=-Ce,Ne=Me*Me,Qe=_(Be),Je=.5/x(Be);function lt(Gt,Zt){var Nt=B(o(Zt)*o(Gt-Ce)),Kt=B(o(Zt)*o(Gt-Be)),ur=Zt<0?-1:1;return Nt*=Nt,Kt*=Kt,[(Nt-Kt)/(2*Me),ur*O(4*Ne*Kt-(Ne-Nt+Kt)*(Ne-Nt+Kt))/(2*Me)]}return lt.invert=function(Gt,Zt){var Nt=Zt*Zt,Kt=o(O(Nt+(Sr=Gt+Ce)*Sr)),ur=o(O(Nt+(Sr=Gt+Be)*Sr)),Sr,Br;return[i(Br=Kt-ur,Sr=(Kt+ur)*Qe),(Zt<0?-1:1)*B(O(Sr*Sr+Br*Br)*Je)]},lt}function mc(){return Yl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Yl(Me,Ce){return Go(Zu,Me,Ce)}function lf(Me,Ce){if(n(Ce)y&&--Gt>0);return[p(Me)*(O(Qe*Qe+4)+Qe)*k/4,S*lt]};function Ju(){return t.geoProjection(fu).scale(127.16)}function Qu(Me,Ce,Be,Ne,Qe){function Je(lt,Gt){var Zt=Be*x(Ne*Gt),Nt=O(1-Zt*Zt),Kt=O(2/(1+Nt*o(lt*=Qe)));return[Me*Nt*Kt*x(lt),Ce*Zt*Kt]}return Je.invert=function(lt,Gt){var Zt=lt/Me,Nt=Gt/Ce,Kt=O(Zt*Zt+Nt*Nt),ur=2*R(Kt/2);return[i(lt*_(ur),Me*Kt)/Qe,Kt&&R(Gt*x(ur)/(Ce*Be*Kt))/Ne]},Je}function Wd(Me,Ce,Be,Ne){var Qe=k/3;Me=c(Me,y),Ce=c(Ce,y),Me=f(Me,S),Ce=f(Ce,k-y),Be=c(Be,0),Be=f(Be,100-y),Ne=c(Ne,y);var Je=Be/100+1,lt=Ne/100,Gt=B(Je*o(Qe))/Qe,Zt=x(Me)/x(Gt*S),Nt=Ce/k,Kt=O(lt*x(Me/2)/x(Ce/2)),ur=Kt/O(Nt*Zt*Gt),Sr=1/(Kt*O(Nt*Zt*Gt));return Qu(ur,Sr,Zt,Gt,Nt)}function x0(){var Me=65*E,Ce=60*E,Be=20,Ne=200,Qe=t.geoProjectionMutator(Wd),Je=Qe(Me,Ce,Be,Ne);return Je.poleline=function(lt){return arguments.length?Qe(Me=+lt*E,Ce,Be,Ne):Me*F},Je.parallels=function(lt){return arguments.length?Qe(Me,Ce=+lt*E,Be,Ne):Ce*F},Je.inflation=function(lt){return arguments.length?Qe(Me,Ce,Be=+lt,Ne):Be},Je.ratio=function(lt){return arguments.length?Qe(Me,Ce,Be,Ne=+lt):Ne},Je.scale(163.775)}function Bf(){return x0().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Al=4*k+3*O(3),Xl=2*O(2*k*O(3)/Al),cf=qe(Xl*O(3)/k,Xl,Al/6);function jh(){return t.geoProjection(cf).scale(176.84)}function Wh(Me,Ce){return[Me*O(1-3*Ce*Ce/(k*k)),Ce]}Wh.invert=function(Me,Ce){return[Me/O(1-3*Ce*Ce/(k*k)),Ce]};function Yh(){return t.geoProjection(Wh).scale(152.63)}function hu(Me,Ce){var Be=o(Ce),Ne=o(Me)*Be,Qe=1-Ne,Je=o(Me=i(x(Me)*Be,-x(Ce))),lt=x(Me);return Be=O(1-Ne*Ne),[lt*Be-Je*Qe,-Je*Be-lt*Qe]}hu.invert=function(Me,Ce){var Be=(Me*Me+Ce*Ce)/-2,Ne=O(-Be*(2+Be)),Qe=Ce*Be+Me*Ne,Je=Me*Be-Ce*Ne,lt=O(Je*Je+Qe*Qe);return[i(Ne*Qe,lt*(1+Be)),lt?-R(Ne*Je/lt):0]};function Mu(){return t.geoProjection(hu).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function _i(Me,Ce){var Be=ye(Me,Ce);return[(Be[0]+Me/S)/2,(Be[1]+Ce)/2]}_i.invert=function(Me,Ce){var Be=Me,Ne=Ce,Qe=25;do{var Je=o(Ne),lt=x(Ne),Gt=x(2*Ne),Zt=lt*lt,Nt=Je*Je,Kt=x(Be),ur=o(Be/2),Sr=x(Be/2),Br=Sr*Sr,ln=1-Nt*ur*ur,wn=ln?B(Je*ur)*O(In=1/ln):In=0,In,gi=.5*(2*wn*Je*Sr+Be/S)-Me,Bi=.5*(wn*lt+Ne)-Ce,mi=.5*In*(Nt*Br+wn*Je*ur*Zt)+.5/S,ia=In*(Kt*Gt/4-wn*lt*Sr),ua=.125*In*(Gt*Sr-wn*lt*Nt*Kt),lo=.5*In*(Zt*ur+wn*Br*Je)+.5,Bo=ia*ua-lo*mi,Ua=(Bi*ia-gi*lo)/Bo,ls=(gi*ua-Bi*mi)/Bo;Be-=Ua,Ne-=ls}while((n(Ua)>y||n(ls)>y)&&--Qe>0);return[Be,Ne]};function Su(){return t.geoProjection(_i).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=ce,e.geoAiryRaw=ee,e.geoAitoff=xe,e.geoAitoffRaw=ye,e.geoArmadillo=K,e.geoArmadilloRaw=ue,e.geoAugust=ne,e.geoAugustRaw=_e,e.geoBaker=le,e.geoBakerRaw=ie,e.geoBerghaus=be,e.geoBerghausRaw=me,e.geoBertin1953=ct,e.geoBertin1953Raw=ze,e.geoBoggs=$e,e.geoBoggsRaw=Ve,e.geoBonne=mt,e.geoBonneRaw=We,e.geoBottomley=Yt,e.geoBottomleyRaw=bt,e.geoBromley=mr,e.geoBromleyRaw=jt,e.geoChamberlin=Tt,e.geoChamberlinRaw=cr,e.geoChamberlinAfrica=wt,e.geoCollignon=Lt,e.geoCollignonRaw=Mt,e.geoCraig=kt,e.geoCraigRaw=ft,e.geoCraster=Kr,e.geoCrasterRaw=pr,e.geoCylindricalEqualArea=dn,e.geoCylindricalEqualAreaRaw=Nr,e.geoCylindricalStereographic=Fr,e.geoCylindricalStereographicRaw=xr,e.geoEckert1=Cn,e.geoEckert1Raw=Zr,e.geoEckert2=At,e.geoEckert2Raw=Dt,e.geoEckert3=Qt,e.geoEckert3Raw=Vt,e.geoEckert4=_r,e.geoEckert4Raw=Ut,e.geoEckert5=Jr,e.geoEckert5Raw=rn,e.geoEckert6=ri,e.geoEckert6Raw=qn,e.geoEisenlohr=Vi,e.geoEisenlohrRaw=Ii,e.geoFahey=va,e.geoFaheyRaw=ha,e.geoFoucaut=oa,e.geoFoucautRaw=Xi,e.geoFoucautSinusoidal=Ga,e.geoFoucautSinusoidalRaw=Ma,e.geoGilbert=sl,e.geoGingery=bl,e.geoGingeryRaw=Eo,e.geoGinzburg4=su,e.geoGinzburg4Raw=Zs,e.geoGinzburg5=Af,e.geoGinzburg5Raw=fc,e.geoGinzburg6=Jt,e.geoGinzburg6Raw=ut,e.geoGinzburg8=wr,e.geoGinzburg8Raw=er,e.geoGinzburg9=Dr,e.geoGinzburg9Raw=nn,e.geoGringorten=Qn,e.geoGringortenRaw=Yr,e.geoGuyou=$a,e.geoGuyouRaw=Za,e.geoHammer=ht,e.geoHammerRaw=De,e.geoHammerRetroazimuthal=Ni,e.geoHammerRetroazimuthalRaw=Ka,e.geoHealpix=As,e.geoHealpixRaw=so,e.geoHill=xu,e.geoHillRaw=Ms,e.geoHomolosine=Gu,e.geoHomolosineRaw=_u,e.geoHufnagel=ps,e.geoHufnagelRaw=Ja,e.geoHyperelliptical=Ca,e.geoHyperellipticalRaw=Ps,e.geoInterrupt=lu,e.geoInterruptedBoggs=Bd,e.geoInterruptedHomolosine=Sf,e.geoInterruptedMollweide=Uo,e.geoInterruptedMollweideHemispheres=Ks,e.geoInterruptedSinuMollweide=ju,e.geoInterruptedSinusoidal=bu,e.geoKavrayskiy7=ah,e.geoKavrayskiy7Raw=kf,e.geoLagrange=Qc,e.geoLagrangeRaw=Od,e.geoLarrivee=hc,e.geoLarriveeRaw=oh,e.geoLaskowski=Yo,e.geoLaskowskiRaw=Fl,e.geoLittrow=is,e.geoLittrowRaw=Ro,e.geoLoximuthal=dc,e.geoLoximuthalRaw=Dl,e.geoMiller=Cc,e.geoMillerRaw=ef,e.geoModifiedStereographic=vc,e.geoModifiedStereographicRaw=sh,e.geoModifiedStereographicAlaska=zh,e.geoModifiedStereographicGs48=tf,e.geoModifiedStereographicGs50=Vd,e.geoModifiedStereographicMiller=rf,e.geoModifiedStereographicLee=qh,e.geoMollweide=Le,e.geoMollweideRaw=we,e.geoMtFlatPolarParabolic=vd,e.geoMtFlatPolarParabolicRaw=Wu,e.geoMtFlatPolarQuartic=lh,e.geoMtFlatPolarQuarticRaw=pd,e.geoMtFlatPolarSinusoidal=uh,e.geoMtFlatPolarSinusoidalRaw=nf,e.geoNaturalEarth2=gd,e.geoNaturalEarth2Raw=af,e.geoNellHammer=ch,e.geoNellHammerRaw=Rl,e.geoInterruptedQuarticAuthalic=md,e.geoNicolosi=Lf,e.geoNicolosiRaw=yd,e.geoPatterson=dh,e.geoPattersonRaw=_d,e.geoPolyconic=Hd,e.geoPolyconicRaw=Pf,e.geoPolyhedral=Yu,e.geoPolyhedralButterfly=gc,e.geoPolyhedralCollignon=bd,e.geoPolyhedralWaterman=Gh,e.geoProject=wd,e.geoGringortenQuincuncial=Ze,e.geoPeirceQuincuncial=yt,e.geoPierceQuincuncial=yt,e.geoQuantize=Wt,e.geoQuincuncial=qf,e.geoRectangularPolyconic=hr,e.geoRectangularPolyconicRaw=zt,e.geoRobinson=cn,e.geoRobinsonRaw=Qr,e.geoSatellite=en,e.geoSatelliteRaw=Fn,e.geoSinuMollweide=Kc,e.geoSinuMollweideRaw=$s,e.geoSinusoidal=nt,e.geoSinusoidalRaw=tt,e.geoStitch=Io,e.geoTimes=ro,e.geoTimesRaw=oi,e.geoTwoPointAzimuthal=cu,e.geoTwoPointAzimuthalRaw=Qs,e.geoTwoPointAzimuthalUsa=zl,e.geoTwoPointEquidistant=Yl,e.geoTwoPointEquidistantRaw=Zu,e.geoTwoPointEquidistantUsa=mc,e.geoVanDerGrinten=$u,e.geoVanDerGrintenRaw=lf,e.geoVanDerGrinten2=gh,e.geoVanDerGrinten2Raw=ph,e.geoVanDerGrinten3=Ku,e.geoVanDerGrinten3Raw=uf,e.geoVanDerGrinten4=Ju,e.geoVanDerGrinten4Raw=fu,e.geoWagner=x0,e.geoWagner7=Bf,e.geoWagnerRaw=Wd,e.geoWagner4=jh,e.geoWagner4Raw=cf,e.geoWagner6=Yh,e.geoWagner6Raw=Wh,e.geoWiechel=Mu,e.geoWiechelRaw=hu,e.geoWinkel3=Su,e.geoWinkel3Raw=_i,Object.defineProperty(e,"__esModule",{value:!0})}))});var fze=fe((l5r,cze)=>{"use strict";var iu=xi(),BX=Xt(),LHt=bi(),o5=Math.PI/180,o_=180/Math.PI,NX={cursor:"pointer"},UX={cursor:"auto"};function PHt(e,t){var r=e.projection,n;return t._isScoped?n=FHt:t._isClipped?n=RHt:n=DHt,n(e,r)}cze.exports=PHt;function VX(e,t){return iu.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function GX(e,t,r){var n=e.id,a=e.graphDiv,i=a.layout,o=i[n],s=a._fullLayout,l=s[n],u={},c={};function f(v,g){u[n+"."+v]=BX.nestedProperty(o,v).get(),LHt.call("_storeDirectGUIEdit",i,s._preGUI,u);var p=BX.nestedProperty(l,v);p.get()!==g&&(p.set(g),BX.nestedProperty(o,v).set(g),c[n+"."+v]=g)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),a.emit("plotly_relayout",c)}function FHt(e,t){var r=VX(e,t);function n(){iu.select(this).style(NX)}function a(){t.scale(iu.event.scale).translate(iu.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function i(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){iu.select(this).style(UX),GX(e,t,i)}return r.on("zoomstart",n).on("zoom",a).on("zoomend",o),r}function DHt(e,t){var r=VX(e,t),n=2,a,i,o,s,l,u,c,f,v;function g(k){return t.invert(k)}function p(k){var S=g(k);if(!S)return!0;var L=t(S);return Math.abs(L[0]-k[0])>n||Math.abs(L[1]-k[1])>n}function x(){iu.select(this).style(NX);let{x:k,y:S,width:L,height:w}=this.getBBox();a=iu.event.sourceEvent?iu.mouse(this):[k+L/2,S+w/2],i=t.rotate(),o=t.translate(),s=i,l=g(a)}function _(){let{x:k,y:S,width:L,height:w}=this.getBBox();if(u=iu.event.sourceEvent?iu.mouse(this):[k+L/2,S+w/2],p(a)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(iu.event.scale),t.translate([o[0],iu.event.translate[1]]),l?g(u)&&(f=g(u),c=[s[0]+(f[0]-l[0]),i[1],i[2]],t.rotate(c),s=c):(a=u,l=g(a)),v=!0,e.render(!0);var A=t.rotate(),T=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":T[0],"geo.center.lat":T[1],"geo.projection.rotation.lon":-A[0]})}function y(){iu.select(this).style(UX),v&&GX(e,t,C)}function C(k){var S=t.rotate(),L=t.invert(e.midPt);k("projection.rotation.lon",-S[0]),k("center.lon",L[0]),k("center.lat",L[1])}return r.on("zoomstart",x).on("zoom",_).on("zoomend",y),r}function RHt(e,t){var r={r:t.rotate(),k:t.scale()},n=VX(e,t),a=VHt(n,"zoomstart","zoom","zoomend"),i=0,o=n.on,s;n.on("zoomstart",function(){iu.select(this).style(NX);let{x:v,y:g,width:p,height:x}=this.getBBox(),_=iu.event.sourceEvent?iu.mouse(this):[v+p/2,g+x/2],y=t.rotate(),C=y,k=t.translate(),S=IHt(y);s=jP(t,_),o.call(n,"zoom",function(){let{x:L,y:w,width:A,height:T}=this.getBBox(),m=iu.event.sourceEvent?iu.mouse(this):[L+A/2,w+T/2];if(t.scale(r.k=iu.event.scale),!s)_=m,s=jP(t,_);else if(jP(t,m)){t.rotate(y).translate(k);var F=jP(t,m),E=qHt(s,F),I=OHt(zHt(S,E)),R=r.r=BHt(I,s,C);(!isFinite(R[0])||!isFinite(R[1])||!isFinite(R[2]))&&(R=C),t.rotate(R),C=R}u(a.of(this,arguments))}),l(a.of(this,arguments))}).on("zoomend",function(){iu.select(this).style(UX),o.call(n,"zoom",null),c(a.of(this,arguments)),GX(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var v=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-v[0],"geo.projection.rotation.lat":-v[1]})});function l(v){i++||v({type:"zoomstart"})}function u(v){v({type:"zoom"})}function c(v){--i||v({type:"zoomend"})}function f(v){var g=t.rotate();v("projection.rotation.lon",-g[0]),v("projection.rotation.lat",-g[1])}return iu.rebind(n,a,"on")}function jP(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&NHt(r)}function IHt(e){var t=.5*e[0]*o5,r=.5*e[1]*o5,n=.5*e[2]*o5,a=Math.sin(t),i=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[i*s*u+a*o*l,a*s*u-i*o*l,i*o*u+a*s*l,i*s*l-a*o*u]}function zHt(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-a*l-i*u,r*s+n*o+a*u-i*l,r*l-n*u+a*o+i*s,r*u+n*l-a*s+i*o]}function qHt(e,t){if(!(!e||!t)){var r=UHt(e,t),n=Math.sqrt(uze(r,r)),a=.5*Math.acos(Math.max(-1,Math.min(1,uze(e,t)))),i=Math.sin(a)/n;return n&&[Math.cos(a),r[2]*i,-r[1]*i,r[0]*i]}}function BHt(e,t,r){var n=OX(t,2,e[0]);n=OX(n,1,e[1]),n=OX(n,0,e[2]-r[2]);var a=t[0],i=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(i,a)*o_,f=Math.sqrt(a*a+i*i),v,g;Math.abs(l)>f?(g=(l>0?90:-90)-c,v=0):(g=Math.asin(l/f)*o_-c,v=Math.sqrt(f*f-l*l));var p=180-g-2*c,x=(Math.atan2(u,s)-Math.atan2(o,v))*o_,_=(Math.atan2(u,s)-Math.atan2(o,-v))*o_,y=sze(r[0],r[1],g,x),C=sze(r[0],r[1],p,_);return y<=C?[g,x,r[2]]:[p,_,r[2]]}function sze(e,t,r,n){var a=lze(r-e),i=lze(n-t);return Math.sqrt(a*a+i*i)}function lze(e){return(e%360+540)%360-180}function OX(e,t,r){var n=r*o5,a=e.slice(),i=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return a[i]=e[i]*s-e[o]*l,a[o]=e[o]*s+e[i]*l,a}function OHt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*o_,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*o_,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*o_]}function NHt(e){var t=e[0]*o5,r=e[1]*o5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function uze(e,t){for(var r=0,n=0,a=e.length;n{"use strict";var M1=xi(),WX=qP(),GHt=WX.geoPath,HHt=WX.geoDistance,jHt=oze(),WHt=bi(),vM=Xt(),YHt=vM.strTranslate,WP=ni(),dM=ea(),hze=kl(),XHt=Hs(),jX=Yi(),{concatExtremes:ZHt,getAutoRange:dze,makePadFn:vze}=rp(),HX=ed(),$Ht=Ac().prepSelect,KHt=Ac().clearOutline,JHt=Ac().selectOnClick,QHt=fze(),Id=lM(),YX=Cg(),{unwrapLonRange:ejt}=YX,gze=EP(),tjt=yX().feature;function mze(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var Lp=mze.prototype;yze.exports=function(t){return new mze(t)};Lp.plot=function(e,t,r,n){var a=this;if(n)return a.update(e,t,!0);a._geoCalcData=e,a._fullLayout=t;var i=t[this.id],o=[],s=!1;for(var l in Id.layerNameToAdjective)if(l!=="frame"&&i["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(i,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),XHt.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};Lp.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],a=t._size,i=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=rjt(n),v=[[a.l+a.w*i.x[0],a.t+a.h*(1-i.y[1])],[a.l+a.w*i.x[1],a.t+a.h*(1-i.y[0])]],g=n.center||{},p=o.rotation||{},x=s.range||[],_=l.range||[];if(n.fitbounds){u._length=v[1][0]-v[0][0],c._length=v[1][1]-v[0][1],u.range=dze(r,u),c.range=dze(r,c);let O=[];for(let ue of e){let K=ue[0].trace;K.visible===!0&&K._module.fitCoords&&O.push(K._module.fitCoords(ue,n))}let V=ZHt(r,u),j=V.min.reduce((ue,{val:K})=>Math.min(ue,K),1/0),U=V.max.reduce((ue,{val:K})=>Math.max(ue,K),-1/0)-j,J=YX.boundsOfCoords(O.flat()),[ee,,ce]=J||[],ye=ce-ee;if(!!J&&(U>360||U<360&&yeMath.max(le,ue(me)),0),ne=V.max.reduce((le,me)=>Math.max(le,K(me)),0),ae=u._length-_e-ne,pe=ae>u._length/10?ye*u._length/ae:ye,ie=(ee+ce)/2;u.range=[ie-pe/2,ie+pe/2]}var y=(u.range[0]+u.range[1])/2,C=(c.range[0]+c.range[1])/2;if(n._isScoped)g={lon:y,lat:C};else if(n._isClipped){g={lon:y,lat:C},p={lon:y,lat:C,roll:p.roll};var k=o.type,S=Id.lonaxisSpan[k]/2||180,L=Id.lataxisSpan[k]/2||90;x=[y-S,y+S],_=[C-L,C+L]}else g={lon:y,lat:C},p={lon:y,lat:p.lat,roll:p.roll}}f.center([g.lon-p.lon,g.lat-p.lat]).rotate([-p.lon,-p.lat,p.roll]).parallels(o.parallels);var w=pze(x,_);f.fitExtent(v,w);var A=this.bounds=f.getBounds(w),T=this.fitScale=f.scale(),m=f.translate();if(f.scaleExtent=()=>{var j;let{minscale:O}=o,V=(j=o.maxscale)!=null?j:1/0;return[T*Math.min(O,V),T*Math.max(O,V)]},n.fitbounds){var F=f.getBounds(pze(u.range,c.range)),E=Math.min((A[1][0]-A[0][0])/(F[1][0]-F[0][0]),(A[1][1]-A[0][1])/(F[1][1]-F[0][1]));isFinite(E)?f.scale(E*T):vM.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*T);var I=this.midPt=[(A[0][0]+A[1][0])/2,(A[0][1]+A[1][1])/2];if(f.translate([m[0]+(I[0]-m[0]),m[1]+(I[1]-m[1])]).clipExtent(A),n._isAlbersUsa){var R=f([g.lon,g.lat]);if(R){var B=f.translate();f.translate([B[0]-(R[0]-B[0]),B[1]-(R[1]-B[1])])}}};Lp.updateBaseLayers=function(e,t){var r=this,n=r.topojson,a=r.layers,i=r.basePaths;function o(v){return v==="lonaxis"||v==="lataxis"}function s(v){return!!Id.lineLayers[v]}function l(v){return!!Id.fillLayers[v]}var u=this.hasChoropleth?Id.layersForChoropleth:Id.layers,c=u.filter(function(v){return s(v)||l(v)?t["show"+v]:o(v)?t[v].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(v){delete a[v],delete i[v],M1.select(this).remove()}),f.enter().append("g").attr("class",function(v){return"layer "+v}).each(function(v){var g=a[v]=M1.select(this);v==="bg"?r.bgRect=g.append("rect").style("pointer-events","all"):o(v)?i[v]=g.append("path").style("fill","none"):v==="backplot"?g.append("g").classed("choroplethlayer",!0):v==="frontplot"?g.append("g").classed("scatterlayer",!0):s(v)?i[v]=g.append("path").style("fill","none").style("stroke-miterlimit",2):l(v)&&(i[v]=g.append("path").style("stroke","none"))}),f.order(),f.each(function(v){var g=i[v],p=Id.layerNameToAdjective[v];v==="frame"?g.datum(Id.sphereSVG):s(v)||l(v)?g.datum(tjt(n,n.objects[v])):o(v)&&g.datum(njt(v,t,e)).call(WP.stroke,t[v].gridcolor).call(dM.dashLine,t[v].griddash,t[v].gridwidth),s(v)?g.call(WP.stroke,t[p+"color"]).call(dM.dashLine,"",t[p+"width"]):l(v)&&g.call(WP.fill,t[p+"color"])})};Lp.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,a=r[0][0]-n,i=r[0][1]-n,o=r[1][0]-a+n,s=r[1][1]-i+n;dM.setRect(this.clipRect,a,i,o,s),this.bgRect.call(dM.setRect,a,i,o,s).call(WP.fill,t.bgcolor),this.xaxis._offset=a,this.xaxis._length=o,this.yaxis._offset=i,this.yaxis._length=s};Lp.updateFx=function(e,t){var r=this,n=r.graphDiv,a=r.bgRect,i=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,v={};for(var g in f)v[r.id+"."+g]=f[g];WHt.call("_guiRelayout",n,v),n.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,v){if(v.isRect){var g=f.range={};g[r.id]=[l([v.xmin,v.ymin]),l([v.xmax,v.ymax])]}else{var p=f.lassoPoints={};p[r.id]=v.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&KHt(n)}};if(i==="pan"){a.node().onmousedown=null;let f=QHt(r,t);if(a.call(f),!M1.event){let v=r.projection.scale(),[g,p]=r.projection.scaleExtent();(vp)&&f.event(a)}a.on("dblclick.zoom",s),n._context._scrollZoom.geo||a.on("wheel.zoom",null)}else(i==="select"||i==="lasso")&&(a.on(".zoom",null),c.prepFn=function(f,v,g){$Ht(f,v,g,c,i)},HX.init(c));a.on("mousemove",function(){var f=r.projection.invert(vM.getPositionFromD3Event());if(!f)return HX.unhover(n,M1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},hze.hover(n,M1.event,r.id)}),a.on("mouseout",function(){n._dragging||HX.unhover(n,M1.event)}),a.on("click",function(){i!=="select"&&i!=="lasso"&&(o.indexOf("select")>-1&&JHt(M1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&hze.click(n,M1.event))})};Lp.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=M1.select(e.container).append("g").attr("class","geo "+e.id).call(dM.setClipUrl,n,t),e.project=function(a){var i=e.projection(a);return i?[i[0]-e.xaxis._offset,i[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(a){return e.project(a)[0]}},e.yaxis={_id:"y",c2p:function(a){return e.project(a)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},jX.setConvert(e.mockAxis,r)};Lp.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var a;e._isScoped?a={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?a={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat,"center.lon":t.lon,"center.lat":t.lat}:a={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":n.lon},vM.extendFlat(this.viewInitial,a)};Lp.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};Lp._render=function(){var e=this.projection,t=e.getPath(),r;function n(i){var o=e(i.lonlat);return o?YHt(o[0],o[1]):null}function a(i){return e.isLonLatOverEdges(i.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(i){return t(i.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",a).attr("transform",n)};function rjt(e){var t=e.projection,r=t.type,n=Id.projNames[r];n="geo"+vM.titleCase(n);for(var a=WX[n]||jHt[n],i=a(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?Id.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?i:[]},u=0;up}else return!1},i.getPath=function(){return GHt().projection(i)},i.getBounds=function(f){return i.getPath().bounds(f)},i.precision(Id.precision),e._isSatellite&&i.tilt(t.tilt).distance(t.distance),o&&i.clipAngle(o-Id.clipPad),i}function njt(e,t,r){var n=1e-6,a=2.5,i=t[e],o=Id.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(C,k){return[C,k]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(C,k){return[k,C]});var c={type:"linear",range:[s[0],s[1]-n],tick0:i.tick0,dtick:i.dtick};jX.setConvert(c,r);var f=jX.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var v=f.length,g=new Array(v),p=0;p{"use strict";var l5=tc(),ijt=nl().attributes,ajt=Uc().dash,s5=lM(),ojt=rl().overrideAll,_ze=(bx(),Gs(_x)).default,bze={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:l5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:ajt},sjt=wze.exports=ojt({domain:ijt({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:_ze(s5.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:_ze(s5.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:l5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:s5.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:s5.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:s5.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:s5.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:l5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:l5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:l5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:l5.background},lonaxis:bze,lataxis:bze},"plot","from-root");sjt.uirevision={valType:"any",editType:"none"}});var Mze=fe((f5r,Aze)=>{"use strict";var YP=Xt(),ljt=b2(),ujt=jf().getSubplotData,{unwrapLonRange:cjt}=Cg(),pM=lM(),fjt=XX(),Tze=pM.axesNames;Aze.exports=function(t,r,n){ljt(t,r,n,{type:"geo",attributes:fjt,handleDefaults:hjt,fullData:n,partition:"y"})};function hjt(e,t,r,n){var a=ujt(n.fullData,"geo",n.id),i=a.map(function(J){return J.index}),o=r("resolution"),s=r("scope"),l=pM.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",v=t._isSatellite=u==="satellite",g=t._isConic=u.indexOf("conic")!==-1||u==="albers",p=t._isClipped=!!pM.lonaxisSpan[u];if(e.visible===!1){var x=YP.extendDeep({},t._template);x.showcoastlines=!1,x.showcountries=!1,x.showframe=!1,x.showlakes=!1,x.showland=!1,x.showocean=!1,x.showrivers=!1,x.showsubunits=!1,x.lonaxis&&(x.lonaxis.showgrid=!1),x.lataxis&&(x.lataxis.showgrid=!1),t._template=x}for(var _=r("visible"),y,C=0;C_e[ne]!=null)||pM.fitboundsIncompatible.has(u)?t.fitbounds=!1:ue.forEach(({dst:_e,key:ne})=>_e&&(_e[ne]=null))}}});var ZX=fe((h5r,kze)=>{"use strict";var djt=jf().getSubplotCalcData,vjt=Xt().counterRegex,pjt=xze(),S1="geo",Sze=vjt(S1),Eze={};Eze[S1]={valType:"subplotid",dflt:S1,editType:"calc"};function gjt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[S1],a=0;a{"use strict";Cze.exports={attributes:a5(),supplyDefaults:rIe(),colorbar:Zf(),formatLabels:aIe(),calc:mX(),calcGeoJSON:VP().calcGeoJSON,fitCoords:VP().fitCoords,plot:VP().plot,style:RX(),styleOnSelect:Ld().styleOnSelect,hoverPoints:KIe(),eventData:QIe(),selectPoints:rze(),moduleType:"trace",name:"scattergeo",basePlotModule:ZX(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var Fze=fe((v5r,Pze)=>{"use strict";Pze.exports=Lze()});var gM=fe((p5r,Ize)=>{"use strict";var{hovertemplateAttrs:xjt,templatefallbackAttrs:_jt}=Oo(),wy=a5(),bjt=_s(),Dze=Ho(),wjt=tc().defaultLine,by=ta().extendFlat,Rze=wy.marker.line;Ize.exports=by({locations:{valType:"data_array",editType:"calc"},locationmode:wy.locationmode,z:{valType:"data_array",editType:"calc"},geojson:by({},wy.geojson,{}),featureidkey:wy.featureidkey,text:by({},wy.text,{}),hovertext:by({},wy.hovertext,{}),marker:{line:{color:by({},Rze.color,{dflt:wjt}),width:by({},Rze.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:wy.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:wy.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:by({},Dze.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:xjt(),hovertemplatefallback:_jt(),showlegend:by({},Dze.showlegend,{dflt:!1})},bjt("",{cLetter:"z",editTypeOverride:"calc"}))});var qze=fe((g5r,zze)=>{"use strict";var XP=Xt(),Tjt=Vc(),Ajt=gM();zze.exports=function(t,r,n,a){function i(v,g){return XP.coerce(t,r,Ajt,v,g)}var o=i("locations"),s=i("z");if(!(o&&o.length&&XP.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=i("geojson"),u;(typeof l=="string"&&l!==""||XP.isPlainObject(l))&&(u="geojson-id");var c=i("locationmode",u);c==="geojson-id"&&i("featureidkey"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f=i("marker.line.width");f&&i("marker.line.color"),i("marker.opacity"),Tjt(t,r,a,i,{prefix:"",cLetter:"z"}),XP.coerceSelectionMarkerOpacity(r,i)}});var $X=fe((m5r,Nze)=>{"use strict";var Bze=aa(),Mjt=Wa().BADNUM,Sjt=Mh(),Ejt=o1(),kjt=P0();function Oze(e){return e&&typeof e=="string"}Nze.exports=function(t,r){var n=r._length,a=new Array(n),i;r.geojson?i=function(c){return Oze(c)||Bze(c)}:i=Oze;for(var o=0;o{"use strict";var Cjt=xi(),Ljt=ni(),KX=ea(),Pjt=js();function Fjt(e,t){t&&Uze(e,t)}function Uze(e,t){var r=t[0].trace,n=t[0].node3,a=n.selectAll(".choroplethlocation"),i=r.marker||{},o=i.line||{},s=Pjt.makeColorScaleFuncFromTrace(r);a.each(function(l){Cjt.select(this).attr("fill",s(l.z)).call(Ljt.stroke,l.mlc||o.color).call(KX.dashLine,"",l.mlw||o.width||0).style("opacity",i.opacity)}),KX.selectedPointStyle(a,r)}function Djt(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?KX.selectedPointStyle(r.selectAll(".choroplethlocation"),n):Uze(e,t)}Vze.exports={style:Fjt,styleOnSelect:Djt}});var $P=fe((x5r,jze)=>{"use strict";var Rjt=xi(),Gze=Xt(),s_=Cg(),Ijt=EP().getTopojsonFeatures,Hze=rp().findExtremes,zjt=ZP().style;function qjt(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");Gze.makeTraceGroups(n,r,"trace choropleth").each(function(a){var i=Rjt.select(this),o=i.selectAll("path.choroplethlocation").data(Gze.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),zjt(e,a)})}function Bjt(e,t){var r=e[0].trace,n=t[r.geo],a=n._subplot,i=r.locationmode,o=r._length,s=i==="geojson-id"?s_.extractTraceFeature(e):Ijt(r,a.topojson);let l=s_.fitGeojsonBbox(r,n);for(var u=[],c=[],f=0;f{"use strict";var Njt=Yi(),Ujt=gM(),Vjt=Xt().fillText,{ANTIMERIDIAN_LON_SHIFT:Gjt}=Cg();Wze.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.subplot,s,l,u,c,f=[r,n];let v=[r+Gjt,n];for(l=0;l")}}});var QX=fe((b5r,Yze)=>{"use strict";Yze.exports=function(t,r,n,a,i){t.location=r.location,t.z=r.z;var o=a[i];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var eZ=fe((w5r,Xze)=>{"use strict";Xze.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";Zze.exports={attributes:gM(),supplyDefaults:qze(),colorbar:H3(),calc:$X(),calcGeoJSON:$P().calcGeoJSON,fitCoords:$P().fitCoords,plot:$P().plot,style:ZP().style,styleOnSelect:ZP().styleOnSelect,hoverPoints:JX(),eventData:QX(),selectPoints:eZ(),moduleType:"trace",name:"choropleth",basePlotModule:ZX(),categories:["geo","noOpacity","showLegend"],meta:{}}});var Jze=fe((A5r,Kze)=>{"use strict";Kze.exports=$ze()});var KP=fe((M5r,eqe)=>{"use strict";var jjt=bi(),U0=Xt(),Wjt=_3();function Yjt(e,t,r,n){var a=e.cd,i=a[0].t,o=a[0].trace,s=e.xa,l=e.ya,u=i.x,c=i.y,f=s.c2p(t),v=l.c2p(r),g=e.distance,p;if(i.tree){var x=s.p2c(f-g),_=s.p2c(f+g),y=l.p2c(v-g),C=l.p2c(v+g);n==="x"?p=i.tree.range(Math.min(x,_),Math.min(l._rl[0],l._rl[1]),Math.max(x,_),Math.max(l._rl[0],l._rl[1])):p=i.tree.range(Math.min(x,_),Math.min(y,C),Math.max(x,_),Math.max(y,C))}else p=i.ids;var k,S,L,w,A,T,m,F,E,I=g;if(n==="x"){var R=!!o.xperiodalignment,B=!!o.yperiodalignment;for(A=0;A=Math.min(O,V)&&f<=Math.max(O,V)?0:1/0}if(T=Math.min(j,q)&&v<=Math.max(j,q)?0:1/0}E=Math.sqrt(T*T+m*m),S=p[A]}}}else for(A=p.length-1;A>-1;A--)k=p[A],L=u[k],w=c[k],T=s.c2p(L)-f,m=l.c2p(w)-v,F=Math.sqrt(T*T+m*m),F{"use strict";var tqe=20;rqe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:tqe,SYMBOL_STROKE:tqe/20,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]}}});var mM=fe((E5r,oqe)=>{"use strict";var Xjt=Ho(),Zjt=Ds(),$jt=n1(),Ll=Ol(),nqe=pl().axisHoverFormat,iqe=_s(),Kjt=(bx(),Gs(_x)).default,tZ=ta().extendFlat,Jjt=rl().overrideAll,Qjt=Ty().DASHES,aqe=Ll.line,Lg=Ll.marker,eWt=Lg.line,Ay=oqe.exports=Jjt({x:Ll.x,x0:Ll.x0,dx:Ll.dx,y:Ll.y,y0:Ll.y0,dy:Ll.dy,xperiod:Ll.xperiod,yperiod:Ll.yperiod,xperiod0:Ll.xperiod0,yperiod0:Ll.yperiod0,xperiodalignment:Ll.xperiodalignment,yperiodalignment:Ll.yperiodalignment,xhoverformat:nqe("x"),yhoverformat:nqe("y"),text:Ll.text,hovertext:Ll.hovertext,textposition:Ll.textposition,textfont:Zjt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:aqe.color,width:aqe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:Kjt(Qjt),dflt:"solid"}},marker:tZ({},iqe("marker"),{symbol:Lg.symbol,angle:Lg.angle,size:Lg.size,sizeref:Lg.sizeref,sizemin:Lg.sizemin,sizemode:Lg.sizemode,opacity:Lg.opacity,colorbar:Lg.colorbar,line:tZ({},iqe("marker.line"),{width:eWt.width})}),connectgaps:Ll.connectgaps,fill:tZ({},Ll.fill,{dflt:"none"}),fillcolor:$jt(),selected:{marker:Ll.selected.marker,textfont:Ll.selected.textfont},unselected:{marker:Ll.unselected.marker,textfont:Ll.unselected.textfont},opacity:Xjt.opacity},"calc","nested");Ay.x.editType=Ay.y.editType=Ay.x0.editType=Ay.y0.editType="calc+clearAxisTypes";Ay.hovertemplate=Ll.hovertemplate;Ay.hovertemplatefallback=Ll.hovertemplatefallback;Ay.texttemplate=Ll.texttemplate;Ay.texttemplatefallback=Ll.texttemplatefallback});var JP=fe(rZ=>{"use strict";var sqe=Ty();rZ.isOpenSymbol=function(e){return typeof e=="string"?sqe.OPEN_RE.test(e):e%200>100};rZ.isDotSymbol=function(e){return typeof e=="string"?sqe.DOT_RE.test(e):e>200}});var cqe=fe((C5r,uqe)=>{"use strict";var lqe=Xt(),tWt=bi(),rWt=JP(),nWt=mM(),iWt=r1(),QP=Is(),aWt=r2(),oWt=sp(),sWt=vv(),lWt=lp(),uWt=a1(),cWt=up();uqe.exports=function(t,r,n,a){function i(g,p){return lqe.coerce(t,r,nWt,g,p)}var o=t.marker?rWt.isOpenSymbol(t.marker.symbol):!1,s=QP.isBubble(t),l=aWt(t,r,a,i);if(!l){r.visible=!1;return}oWt(t,r,a,i),i("xhoverformat"),i("yhoverformat");var u=l{"use strict";var fWt=cC();fqe.exports=function(t,r,n){var a=t.i;return"x"in t||(t.x=r._x[a]),"y"in t||(t.y=r._y[a]),fWt(t,r,n)}});var vqe=fe((P5r,dqe)=>{"use strict";function hWt(e,t,r,n,a){for(var i=a+1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(i=o,a=o-1):n=o+1}return i}function dWt(e,t,r,n,a){for(var i=a+1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(i=o,a=o-1):n=o+1}return i}function vWt(e,t,r,n,a){for(var i=n-1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(i=o,n=o+1):a=o-1}return i}function pWt(e,t,r,n,a){for(var i=n-1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(i=o,n=o+1):a=o-1}return i}function gWt(e,t,r,n,a){for(;n<=a;){var i=n+a>>>1,o=e[i],s=r!==void 0?r(o,t):o-t;if(s===0)return i;s<=0?n=i+1:a=i-1}return-1}function yM(e,t,r,n,a,i){return typeof r=="function"?i(e,t,r,n===void 0?0:n|0,a===void 0?e.length-1:a|0):i(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}dqe.exports={ge:function(e,t,r,n,a){return yM(e,t,r,n,a,hWt)},gt:function(e,t,r,n,a){return yM(e,t,r,n,a,dWt)},lt:function(e,t,r,n,a){return yM(e,t,r,n,a,vWt)},le:function(e,t,r,n,a){return yM(e,t,r,n,a,pWt)},eq:function(e,t,r,n,a){return yM(e,t,r,n,a,gWt)}}});var nZ=fe((F5r,pqe)=>{pqe.exports=mWt;function mWt(e,t,r){return tr?r:e:et?t:e}});var E1=fe((D5r,mqe)=>{"use strict";mqe.exports=function(t,r,n){var a={},i,o;if(typeof r=="string"&&(r=gqe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var yWt=E1();yqe.exports=xWt;function xWt(e){var t;return arguments.length>1&&(e=arguments),typeof e=="string"?e=e.split(/\s/).map(parseFloat):typeof e=="number"&&(e=[e]),e.length&&typeof e[0]=="number"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=yWt(e,{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"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var l_=fe((I5r,xqe)=>{"use strict";xqe.exports=_Wt;function _Wt(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;na&&(a=e[o]),e[o]{"use strict";_qe.exports=function(){for(var t=0;t{wqe.exports=function(e){switch(e){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}}});var u_=fe((B5r,Aqe)=>{var Tqe=eF();Aqe.exports=bWt;function bWt(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var n=e[0].length,a=e.length*n,i,o,s,l;(!t||typeof t=="string")&&(t=new(Tqe(t||"float32"))(a+r));var u=t.length-r;if(a!==u)throw new Error("source length "+a+" ("+n+"x"+e.length+") does not match destination length "+u);for(i=0,s=r;i{"use strict";Mqe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var kqe=fe((N5r,Eqe)=>{"use strict";Eqe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var Iqe=fe((U5r,Rqe)=>{"use strict";var Cqe=vqe(),Lqe=nZ(),wWt=u5(),TWt=l_(),Pqe=E1(),aZ=bqe(),AWt=u_(),MWt=Sqe(),SWt=eF(),Fqe=kqe(),EWt=1073741824;Rqe.exports=function(t,r){r||(r={}),t=AWt(t,"float64"),r=Pqe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=aZ(r.maxDepth,255),a=aZ(r.bounds,TWt(t,2));a[0]===a[2]&&a[2]++,a[1]===a[3]&&a[3]++;let i=Dqe(t,a),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(SWt(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let y=0;yn||w>EWt){for(let q=0;qce||m>ye||F=I||J===ee)return;let xe=l[U];ee===void 0&&(ee=xe.length);for(let me=J;me=S&&De<=w&&Ge>=L&&Ge<=A&&R.push(be)}let ue=u[U],K=ue[J*4+0],_e=ue[J*4+1],ne=ue[J*4+2],ae=ue[J*4+3],pe=O(ue,J+1),ie=q*.5,le=U+1;B(V,j,ie,le,K,_e||ne||ae||pe),B(V,j+ie,ie,le,_e,ne||ae||pe),B(V+ie,j,ie,le,ne,ae||pe),B(V+ie,j+ie,ie,le,ae,pe)}function O(V,j){let q=null,U=0;for(;q===null;)if(q=V[j*4+U],U++,U>V.length)return null;return q}return R}function x(y,C,k,S,L){let w=[];for(let A=0;A{"use strict";zqe.exports=Iqe()});var Bqe=fe((G5r,qqe)=>{qqe.exports=CWt;var oZ={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},kWt=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function CWt(e){var t=[];return e.replace(kWt,function(r,n,a){var i=n.toLowerCase();for(a=PWt(a),i=="m"&&a.length>2&&(t.push([n].concat(a.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(a.length==oZ[i])return a.unshift(n),t.push(a);if(a.length{Oqe.exports=FWt;function FWt(e){var t=0,r=0,n=0,a=0;return e.map(function(i){i=i.slice();var o=i[0],s=o.toUpperCase();if(o!=s)switch(i[0]=s,o){case"a":i[6]+=n,i[7]+=a;break;case"v":i[1]+=a;break;case"h":i[1]+=n;break;default:for(var l=1;l{"use strict";Object.defineProperty(rF,"__esModule",{value:!0});var DWt=(function(){function e(t,r){var n=[],a=!0,i=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(a=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));a=!0);}catch(u){i=!0,o=u}finally{try{!a&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),xM=Math.PI*2,sZ=function(t,r,n,a,i,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=a*l-i*u,f=i*l+a*u;return{x:c+o,y:f+s}},RWt=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),a=Math.cos(t),i=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:a-i*n,y:i+a*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},Uqe=function(t,r,n,a){var i=t*a-r*n<0?-1:1,o=t*n+r*a;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)},IWt=function(t,r,n,a,i,o,s,l,u,c,f,v){var g=Math.pow(i,2),p=Math.pow(o,2),x=Math.pow(f,2),_=Math.pow(v,2),y=g*p-g*_-p*x;y<0&&(y=0),y/=g*_+p*x,y=Math.sqrt(y)*(s===l?-1:1);var C=y*i/o*v,k=y*-o/i*f,S=c*C-u*k+(t+n)/2,L=u*C+c*k+(r+a)/2,w=(f-C)/i,A=(v-k)/o,T=(-f-C)/i,m=(-v-k)/o,F=Uqe(1,0,w,A),E=Uqe(w,A,T,m);return l===0&&E>0&&(E-=xM),l===1&&E<0&&(E+=xM),[S,L,F,E]},zWt=function(t){var r=t.px,n=t.py,a=t.cx,i=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,v=t.sweepFlag,g=v===void 0?0:v,p=[];if(o===0||s===0)return[];var x=Math.sin(u*xM/360),_=Math.cos(u*xM/360),y=_*(r-a)/2+x*(n-i)/2,C=-x*(r-a)/2+_*(n-i)/2;if(y===0&&C===0)return[];o=Math.abs(o),s=Math.abs(s);var k=Math.pow(y,2)/Math.pow(o,2)+Math.pow(C,2)/Math.pow(s,2);k>1&&(o*=Math.sqrt(k),s*=Math.sqrt(k));var S=IWt(r,n,a,i,o,s,f,g,x,_,y,C),L=DWt(S,4),w=L[0],A=L[1],T=L[2],m=L[3],F=Math.abs(m)/(xM/4);Math.abs(1-F)<1e-7&&(F=1);var E=Math.max(Math.ceil(F),1);m/=E;for(var I=0;I{"use strict";jqe.exports=BWt;var qWt=Gqe();function BWt(e){for(var t,r=[],n=0,a=0,i=0,o=0,s=null,l=null,u=0,c=0,f=0,v=e.length;f4?(n=g[g.length-4],a=g[g.length-3]):(n=u,a=c),r.push(g)}return r}function nF(e,t,r,n){return["C",e,t,r,n,r,n]}function Hqe(e,t,r,n,a,i){return["C",e/3+2/3*r,t/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}});var lZ=fe((W5r,Yqe)=>{"use strict";Yqe.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var Zqe=fe((Y5r,Xqe)=>{"use strict";var OWt=Bqe(),NWt=Nqe(),UWt=Wqe(),VWt=lZ();Xqe.exports=GWt;function GWt(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!VWt(e))throw Error("String is not an SVG path.");e=OWt(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=NWt(e),e=UWt(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;rt[2]&&(t[2]=a[i+0]),a[i+1]>t[3]&&(t[3]=a[i+1]);return t}});var Qqe=fe((X5r,Jqe)=>{"use strict";Jqe.exports=HWt;var _M=1e20;function HWt(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,a=t.channel||0,i,o,s,l,u,c,f,v,g,p,x;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/i/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(v=e,f=v.getContext("2d"),i=v.width,o=v.height,g=f.getImageData(0,0,i,o),l=g.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(v=e.canvas,f=e,i=v.width,o=v.height,g=f.getImageData(0,0,i,o),l=g.data,c=4):window.ImageData&&e instanceof window.ImageData&&(g=e,i=e.width,o=e.height,l=g.data,c=4);if(s=Math.max(i,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(i*o),p=0,x=Math.floor(u.length/c);pnBe});function nBe(e,t={}){if(!(0,tBe.default)(e))throw Error("Invalid SVG path");let r,n;t.shape||Array.isArray(t)?[r,n]=t.shape||t:(r=uZ.width=t.width||t.w||200,n=uZ.height=t.height||t.h||200);let a=Math.min(r,n),i=t.stroke||0,o=t.viewbox||t.viewBox||(0,eBe.default)(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;Pp.fillStyle="black",Pp.fillRect(0,0,r,n),Pp.fillStyle="white",i&&(typeof i!="number"&&(i=1),Pp.strokeStyle=i>0?"white":"black",Pp.lineWidth=Math.abs(i)),Pp.translate(r*.5,n*.5),Pp.scale(l,l);let u=new Path2D(e);return Pp.fill(u),i&&Pp.stroke(u),Pp.setTransform(1,0,0,1,0,0),(0,rBe.default)(Pp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:a*.5})}var eBe,tBe,rBe,uZ,Pp,aBe=Co(()=>{eBe=$0(Zqe()),tBe=$0(lZ()),rBe=$0(Qqe()),uZ=document.createElement("canvas"),Pp=uZ.getContext("2d",{willReadFrequently:!0})});var f_=fe((Z5r,gBe)=>{"use strict";var aF=aa(),jWt=(aBe(),Gs(iBe)).default,{normalize:iF}=ni(),WWt=bi(),h5=Xt(),Nu=h5.isArrayOrTypedArray,c5=ea(),oBe=El(),sBe=Sg().formatColor,f5=Is(),YWt=lT(),fZ=JP(),bM=Ty(),XWt=Y1().DESELECTDIM,lBe={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},ZWt=Sd().appendArrayPointValue;function $Wt(e,t){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},a=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(f5.hasText(t)&&(n.text=pBe(e,t),n.textSel=cBe(e,t,t.selected),n.textUnsel=cBe(e,t,t.unselected)),f5.hasMarkers(t)&&(n.marker=dZ(e,t),n.markerSel=hZ(e,t,t.selected),n.markerUnsel=hZ(e,t,t.unselected),!t.unselected&&Nu(t.marker.opacity))){var i=t.marker.opacity;for(n.markerUnsel.opacity=new Array(i.length),r=0;r500?"bold":"normal":e}function dZ(e,t){var r=t._length,n=t.marker,a={},i,o=Nu(n.symbol),s=Nu(n.angle),l=Nu(n.color),u=Nu(n.line.color),c=Nu(n.opacity),f=Nu(n.size),v=Nu(n.line.width),g;if(o||(g=fZ.isOpenSymbol(n.symbol)),o||l||u||c||s){a.symbols=new Array(r),a.angles=new Array(r),a.colors=new Array(r),a.borderColors=new Array(r);var p=n.symbol,x=n.angle,_=sBe(n,n.opacity,r),y=sBe(n.line,n.opacity,r);if(!Nu(y[0])){var C=y;for(y=Array(r),i=0;ibM.TOO_MANY_POINTS||f5.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=i[0],v=i[1];for(o=0;o1?l[o]:l[0]:l,g=Nu(u)?u.length>1?u[o]:u[0]:u,p=lBe[v],x=lBe[g],_=c?c/.8+1:0,y=-x*_-x*.5;i.offset[o]=[p*_/f,y/f]}}return i}gBe.exports={style:$Wt,markerStyle:dZ,markerSelection:hZ,linePositions:JWt,errorBarPositions:QWt,textPosition:eYt}});var vZ=fe(($5r,mBe)=>{"use strict";var oF=Xt();mBe.exports=function(t,r){var n=r._scene,a={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},i={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){oF.extendFlat(n,i,a)},n.init(),n.update=function(s){var l=oF.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u{"use strict";var tYt=tF(),d5=Xt(),yBe=El(),rYt=rp().findExtremes,xBe=cp(),pZ=gv(),nYt=pZ.calcMarkerSize,iYt=pZ.calcAxisExpansion,aYt=pZ.setFirstScatter,oYt=pv(),v5=f_(),sYt=vZ(),_Be=Wa().BADNUM,lYt=Ty().TOO_MANY_POINTS;wBe.exports=function(t,r){var n=t._fullLayout,a=r._xA=yBe.getFromId(t,r.xaxis,"x"),i=r._yA=yBe.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=lYt,u=s*2,c={},f,v=a.makeCalcdata(r,"x"),g=i.makeCalcdata(r,"y"),p=xBe(r,a,"x",v),x=xBe(r,i,"y",g),_=p.vals,y=x.vals;r._x=_,r._y=y,r.xperiodalignment&&(r._origX=v,r._xStarts=p.starts,r._xEnds=p.ends),r.yperiodalignment&&(r._origY=g,r._yStarts=x.starts,r._yEnds=x.ends);var C=new Array(u),k=new Array(s);for(f=0;f1&&d5.extendFlat(o.line,v5.linePositions(e,r,n)),o.errorX||o.errorY){var s=v5.errorBarPositions(e,r,n,a,i);o.errorX&&d5.extendFlat(o.errorX,s.x),o.errorY&&d5.extendFlat(o.errorY,s.y)}return o.text&&(d5.extendFlat(o.text,{positions:n},v5.textPosition(e,r,o.text,o.marker)),d5.extendFlat(o.textSel,{positions:n},v5.textPosition(e,r,o.text,o.markerSel)),d5.extendFlat(o.textUnsel,{positions:n},v5.textPosition(e,r,o.text,o.markerUnsel))),o}});var gZ=fe((J5r,MBe)=>{"use strict";var ABe=Xt(),cYt=ni(),fYt=Y1().DESELECTDIM;function hYt(e){var t=e[0],r=t.trace,n=t.t,a=n._scene,i=n.index,o=a.selectBatch[i],s=a.unselectBatch[i],l=a.textOptions[i],u=a.textSelectedOptions[i]||{},c=a.textUnselectedOptions[i]||{},f=ABe.extendFlat({},l),v,g;if(o.length||s.length){var p=u.color,x=c.color,_=l.color,y=ABe.isArrayOrTypedArray(_);for(f.color=new Array(r._length),v=0;v{"use strict";var SBe=Is(),dYt=gZ().styleTextSelection;EBe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,v=l._scene,g=l.index;if(!v)return o;var p=SBe.hasText(s),x=SBe.hasMarkers(s),_=!x&&!p;if(s.visible!==!0||_)return o;var y=[],C=[];if(r!==!1&&!r.degenerate)for(var k=0;k{"use strict";var vYt=KP();kBe.exports={moduleType:"trace",name:"scattergl",basePlotModule:gu(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:mM(),supplyDefaults:cqe(),crossTraceDefaults:aU(),colorbar:Zf(),formatLabels:hqe(),calc:TBe(),hoverPoints:vYt.hoverPoints,selectPoints:mZ(),meta:{}}});var PBe=fe((t4r,LBe)=>{"use strict";LBe.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]}});var IBe=fe((r4r,RBe)=>{"use strict";var FBe=PBe();RBe.exports=pYt;var DBe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function pYt(e){var t,r=[],n=1,a;if(typeof e=="string")if(e=e.toLowerCase(),FBe[e])r=FBe[e].slice(),a="rgb";else if(e==="transparent")n=0,a="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var i=e.slice(1),o=i.length,s=o<=4;n=1,s?(r=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],o===4&&(n=parseInt(i[3]+i[3],16)/255)):(r=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],o===8&&(n=parseInt(i[6]+i[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),a="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",i=l.replace(/a$/,"");a=i;var o=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,g){if(/%$/.test(v))return g===o?parseFloat(v)/100:i==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(i[g]==="h"){if(/deg$/.test(v))return parseFloat(v);if(DBe[v]!==void 0)return DBe[v]}return parseFloat(v)}),l===i&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),a=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],a="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(a="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(a="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(a="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:a,values:r,alpha:n}}});var qBe=fe((n4r,zBe)=>{"use strict";var gYt=IBe();zBe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,a,i=gYt(t);if(!i.space)return[];var o=[0,0,0],s=i.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(i.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(i.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(i.values[2],o[2]),s[2]),i.space[0]==="h"&&(r=mYt(r)),r.push(Math.min(Math.max(i.alpha,0),1)),r};function mYt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,a,i,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(i=n<.5?n*(1+r):n+r-n*r,a=2*n-i,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?a+(i-a)*6*o:2*o<1?i:3*o<2?a+(i-a)*(2/3-o)*6:a,s[u++]=l*255;return s}});var wM=fe((i4r,BBe)=>{"use strict";var yYt=qBe(),xYt=eF();BBe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=xYt(r),a=new n(4),i=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=yYt(t),t[0]/=255,t[1]/=255,t[2]/=255),_Yt(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,i&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(i?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=Math.min(Math.max(Math.floor(t[0]*255),0),255),a[1]=Math.min(Math.max(Math.floor(t[1]*255),0),255),a[2]=Math.min(Math.max(Math.floor(t[2]*255),0),255),a[3]=t[3]==null?255:Math.min(Math.max(Math.floor(t[3]*255),0),255)),a)};function _Yt(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var NBe=fe((a4r,lF)=>{"use strict";var sF=nZ();lF.exports=OBe;lF.exports.to=OBe;lF.exports.from=bYt;function OBe(e,t){t==null&&(t=!0);var r=e[0],n=e[1],a=e[2],i=e[3];i==null&&(i=t?1:255),t&&(r*=255,n*=255,a*=255,i*=255),r=sF(r,0,255)&255,n=sF(n,0,255)&255,a=sF(a,0,255)&255,i=sF(i,0,255)&255;var o=r*16777216+(n<<16)+(a<<8)+i;return o}function bYt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,a=(e&65280)>>>8,i=e&255;return t===!1?[r,n,a,i]:[r/255,n/255,a/255,i/255]}});var VBe=fe((o4r,UBe)=>{UBe.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";GBe.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var a=0,i=n.length;a{"use strict";p5.exports=TM;p5.exports.float32=p5.exports.float=TM;p5.exports.fract32=p5.exports.fract=wYt;var HBe=new Float32Array(1);function wYt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=TM(e));for(var r=0,n=t.length;r{"use strict";var TYt=wM(),AYt=l_(),MYt=NBe(),SYt=tF(),cF=VBe(),EYt=E1(),kYt=yZ(),CYt=u_(),fF=uF(),LYt=u5(),PYt=rh;function rh(e,t){if(!(this instanceof rh))return new rh(e,t);typeof e=="function"?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t),e=t.regl;let r=e._gl,n,a=[],i={},o=[],s=[null],l=[null],u=255,c=100;this.tooManyColors=!1,n=e.texture({data:new Uint8Array(u*4),width:u,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),Object.assign(this,{regl:e,gl:r,groups:o,markerCache:l,markerTextures:s,palette:a,paletteIds:i,paletteTexture:n,maxColors:u,maxSize:c,canvas:r.canvas}),this.update(t);let f={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop("opacity"),paletteSize:(p,x)=>[this.tooManyColors?0:u,n.height],pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:n},attributes:{x:(p,x)=>x.xAttr||{buffer:x.positionBuffer,stride:8,offset:0},y:(p,x)=>x.yAttr||{buffer:x.positionBuffer,stride:8,offset:4},xFract:(p,x)=>x.xAttr?{constant:[0,0]}:{buffer:x.positionFractBuffer,stride:8,offset:0},yFract:(p,x)=>x.yAttr?{constant:[0,0]}:{buffer:x.positionFractBuffer,stride:8,offset:4},size:(p,x)=>x.size.length?{buffer:x.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(x.size*255/this.maxSize)]},borderSize:(p,x)=>x.borderSize.length?{buffer:x.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(x.borderSize*255/this.maxSize)]},colorId:(p,x)=>x.color.length?{buffer:x.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?a.slice(x.color*4,x.color*4+4):[x.color]},borderColorId:(p,x)=>x.borderColor.length?{buffer:x.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?a.slice(x.borderColor*4,x.borderColor*4+4):[x.borderColor]},isActive:(p,x)=>x.activation===!0?{constant:[1]}:x.activation?x.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},v=Object.assign({},f);v.frag=cF([`precision highp float; #define GLSLIFY 1 uniform float opacity; @@ -2044,7 +2045,7 @@ void main() { } } -`]),v.vert=u9([`precision highp float; +`]),v.vert=cF([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; @@ -2112,7 +2113,7 @@ void main() { fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); } -`]),this.drawMarker=e(v);var d=C2({},h);d.frag=u9([`precision highp float; +`]),this.drawMarker=e(v);let g=Object.assign({},f);g.frag=cF([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor, fragBorderColor; @@ -2143,7 +2144,7 @@ void main() { color.a *= alpha * opacity; gl_FragColor = color; } -`]),d.vert=u9([`precision highp float; +`]),g.vert=cF([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; @@ -2207,8 +2208,8 @@ void main() { fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } -`]),XFe&&(d.frag=d.frag.replace("smoothstep","smoothStep"),v.frag=v.frag.replace("smoothstep","smoothStep")),this.drawCircle=e(d)}Eh.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};Eh.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this};Eh.prototype.draw=function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;nY)?R.tree=SRt(O,{bounds:re}):Y&&Y.length&&(R.tree=Y),R.tree){var j={primitive:"points",usage:"static",data:R.tree,type:"uint32"};R.elements?R.elements(j):R.elements=o.elements(j)}var fe=c9.float32(O);X({data:fe,usage:"dynamic"});var ce=c9.fract32(O,fe);return te({data:ce,usage:"dynamic"}),se({data:new Uint8Array(ue),type:"uint8",usage:"stream"}),O}},{marker:function(O,R,B){var Y=R.activation;if(Y.forEach(function(ce){return ce&&ce.destroy&&ce.destroy()}),Y.length=0,!O||typeof O[0]=="number"){var X=e.addMarker(O);Y[X]=!0}else{for(var te=[],se=0,ue=Math.min(O.length,R.count);se=0)return a;var i;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)i=e;else{i=new Uint8Array(e.length);for(var o=0,s=e.length;on*4&&(this.tooManyColors=!0),this.updatePalette(r),a.length===1?a[0]:a};Eh.prototype.updatePalette=function(e){if(!this.tooManyColors){var t=this.maxColors,r=this.paletteTexture,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(var a=e.length*.25%t;a{"use strict";Mj.exports=d9;Mj.exports.default=d9;function d9(e,t,r){r=r||2;var n=t&&t.length,a=n?t[0]*r:e.length,i=JFe(e,0,a,r,!0),o=[];if(!i||i.next===i.prev)return o;var s,l,u,c,f,h,v;if(n&&(i=BRt(e,t,i,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var d=r;du&&(u=f),h>c&&(c=h);v=Math.max(u-s,c-l),v=v!==0?32767/v:0}return i6(i,o,r,s,l,v,0),o}function JFe(e,t,r,n,a){var i,o;if(a===Aj(e,t,r,n)>0)for(i=t;i=t;i-=n)o=KFe(i,e[i],e[i+1],o);return o&&v9(o,o.next)&&(s6(o),o=o.next),o}function L2(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(v9(r,r.next)||xc(r.prev,r,r.next)===0)){if(s6(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function i6(e,t,r,n,a,i,o){if(e){!o&&i&&GRt(e,n,a,i);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,i?IRt(e,n,a,i):RRt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),s6(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=zRt(L2(e),t,r),i6(e,t,r,n,a,i,2)):o===2&&qRt(e,t,r,n,a,i):i6(L2(e),t,r,n,a,i,1);break}}}}function RRt(e){var t=e.prev,r=e,n=e.next;if(xc(t,r,n)>=0)return!1;for(var a=t.x,i=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=ai?a>o?a:o:i>o?i:o,v=s>l?s>u?s:u:l>u?l:u,d=n.next;d!==t;){if(d.x>=c&&d.x<=h&&d.y>=f&&d.y<=v&&vw(a,s,i,l,o,u,d.x,d.y)&&xc(d.prev,d,d.next)>=0)return!1;d=d.next}return!0}function IRt(e,t,r,n){var a=e.prev,i=e,o=e.next;if(xc(a,i,o)>=0)return!1;for(var s=a.x,l=i.x,u=o.x,c=a.y,f=i.y,h=o.y,v=sl?s>u?s:u:l>u?l:u,x=c>f?c>h?c:h:f>h?f:h,g=wj(v,d,t,r,n),E=wj(m,x,t,r,n),M=e.prevZ,w=e.nextZ;M&&M.z>=g&&w&&w.z<=E;){if(M.x>=v&&M.x<=m&&M.y>=d&&M.y<=x&&M!==a&&M!==o&&vw(s,c,l,f,u,h,M.x,M.y)&&xc(M.prev,M,M.next)>=0||(M=M.prevZ,w.x>=v&&w.x<=m&&w.y>=d&&w.y<=x&&w!==a&&w!==o&&vw(s,c,l,f,u,h,w.x,w.y)&&xc(w.prev,w,w.next)>=0))return!1;w=w.nextZ}for(;M&&M.z>=g;){if(M.x>=v&&M.x<=m&&M.y>=d&&M.y<=x&&M!==a&&M!==o&&vw(s,c,l,f,u,h,M.x,M.y)&&xc(M.prev,M,M.next)>=0)return!1;M=M.prevZ}for(;w&&w.z<=E;){if(w.x>=v&&w.x<=m&&w.y>=d&&w.y<=x&&w!==a&&w!==o&&vw(s,c,l,f,u,h,w.x,w.y)&&xc(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function zRt(e,t,r){var n=e;do{var a=n.prev,i=n.next.next;!v9(a,i)&&QFe(a,n,n.next,i)&&o6(a,i)&&o6(i,a)&&(t.push(a.i/r|0),t.push(n.i/r|0),t.push(i.i/r|0),s6(n),s6(n.next),n=e=i),n=n.next}while(n!==e);return L2(n)}function qRt(e,t,r,n,a,i){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&WRt(o,s)){var l=ePe(o,s);o=L2(o,o.next),l=L2(l,l.next),i6(o,t,r,n,a,i,0),i6(l,t,r,n,a,i,0);return}s=s.next}o=o.next}while(o!==e)}function BRt(e,t,r,n){var a=[],i,o,s,l,u;for(i=0,o=t.length;i=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>i&&(i=s,o=r.x=r.x&&r.x>=u&&n!==r.x&&vw(ao.x||r.x===o.x&&VRt(o,r)))&&(o=r,f=h)),r=r.next;while(r!==l);return o}function VRt(e,t){return xc(e.prev,e,t.prev)<0&&xc(t.next,e,e.next)<0}function GRt(e,t,r,n){var a=e;do a.z===0&&(a.z=wj(a.x,a.y,t,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next;while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,HRt(a)}function HRt(e){var t,r,n,a,i,o,s,l,u=1;do{for(r=e,e=null,i=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;r=n}i.nextZ=null,u*=2}while(o>1);return e}function wj(e,t,r,n,a){return e=(e-r)*a|0,t=(t-n)*a|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function jRt(e){var t=e,r=e;do(t.x=(e-o)*(i-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(i-s)>=(a-o)*(n-s)}function WRt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!YRt(e,t)&&(o6(e,t)&&o6(t,e)&&XRt(e,t)&&(xc(e.prev,e,t.prev)||xc(e,t.prev,t))||v9(e,t)&&xc(e.prev,e,e.next)>0&&xc(t.prev,t,t.next)>0)}function xc(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function v9(e,t){return e.x===t.x&&e.y===t.y}function QFe(e,t,r,n){var a=h9(xc(e,t,r)),i=h9(xc(e,t,n)),o=h9(xc(r,n,e)),s=h9(xc(r,n,t));return!!(a!==i&&o!==s||a===0&&f9(e,r,t)||i===0&&f9(e,n,t)||o===0&&f9(r,e,n)||s===0&&f9(r,t,n))}function f9(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function h9(e){return e>0?1:e<0?-1:0}function YRt(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&QFe(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function o6(e,t){return xc(e.prev,e,e.next)<0?xc(e,t,e.next)>=0&&xc(e,e.prev,t)>=0:xc(e,t,e.prev)<0||xc(e,e.next,t)<0}function XRt(e,t){var r=e,n=!1,a=(e.x+t.x)/2,i=(e.y+t.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!==e);return n}function ePe(e,t){var r=new Tj(e.i,e.x,e.y),n=new Tj(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function KFe(e,t,r,n){var a=new Tj(e,t,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 s6(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function Tj(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}d9.deviation=function(e,t,r,n){var a=t&&t.length,i=a?t[0]*r:e.length,o=Math.abs(Aj(e,0,i,r));if(a)for(var s=0,l=t.length;s0&&(n+=e[a-1].length,r.holes.push(n))}return r}});var nPe=ne((l0r,rPe)=>{"use strict";var ZRt=A2();rPe.exports=$Rt;function $Rt(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=ZRt(e,t));for(var n=0;n{"use strict";aPe.exports=function(){var e,t;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return!(String(e)!=="[object WeakMap]"||typeof e.set!="function"||e.set({},1)!==e||typeof e.delete!="function"||typeof e.has!="function"||e.get(t)!=="one")}});var sPe=ne((c0r,oPe)=>{"use strict";oPe.exports=function(){}});var Qm=ne((f0r,lPe)=>{"use strict";var KRt=sPe()();lPe.exports=function(e){return e!==KRt&&e!==null}});var Sj=ne((h0r,cPe)=>{"use strict";var JRt=Object.create,QRt=Object.getPrototypeOf,uPe={};cPe.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||JRt;return typeof e!="function"?!1:QRt(e(t(null),uPe))===uPe}});var Ej=ne((d0r,fPe)=>{"use strict";var eIt=Qm(),tIt={function:!0,object:!0};fPe.exports=function(e){return eIt(e)&&tIt[typeof e]||!1}});var ug=ne((v0r,hPe)=>{"use strict";var rIt=Qm();hPe.exports=function(e){if(!rIt(e))throw new TypeError("Cannot use null or undefined");return e}});var vPe=ne((p0r,dPe)=>{"use strict";var kj=Object.create,p9;Sj()()||(p9=Cj());dPe.exports=(function(){var e,t,r;return!p9||p9.level!==1?kj:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n==="__proto__"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(p9,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,a){return kj(n===null?e:n,a)})})()});var Cj=ne((g0r,pPe)=>{"use strict";var nIt=Ej(),aIt=ug(),iIt=Object.prototype.isPrototypeOf,oIt=Object.defineProperty,sIt={configurable:!0,enumerable:!1,writable:!0,value:void 0},g9;g9=function(e,t){if(aIt(e),t===null||nIt(t))return e;throw new TypeError("Prototype must be null or an object")};pPe.exports=(function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,a){return r.call(g9(n,a),a),n}):t=function(n,a){return g9(n,a).__proto__=a,n}:t=function n(a,i){var o;return g9(a,i),o=iIt.call(n.nullPolyfill,a),o&&delete n.nullPolyfill.__proto__,i===null&&(i=n.nullPolyfill),a.__proto__=i,o&&oIt(n.nullPolyfill,"__proto__",sIt),a},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null})((function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{r=n.set,r.call(e,t)}catch(a){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)})());vPe()});var m9=ne((m0r,gPe)=>{"use strict";gPe.exports=Sj()()?Object.setPrototypeOf:Cj()});var yPe=ne((y0r,mPe)=>{"use strict";var lIt=Ej();mPe.exports=function(e){if(!lIt(e))throw new TypeError(e+" is not an Object");return e}});var bPe=ne((x0r,xPe)=>{"use strict";var uIt=Object.create(null),cIt=Math.random;xPe.exports=function(){var e;do e=cIt().toString(36).slice(2);while(uIt[e]);return e}});var F2=ne((b0r,_Pe)=>{"use strict";var fIt=void 0;_Pe.exports=function(e){return e!==fIt&&e!==null}});var y9=ne((_0r,wPe)=>{"use strict";var hIt=F2(),dIt={object:!0,function:!0,undefined:!0};wPe.exports=function(e){return hIt(e)?hasOwnProperty.call(dIt,typeof e):!1}});var APe=ne((w0r,TPe)=>{"use strict";var vIt=y9();TPe.exports=function(e){if(!vIt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var SPe=ne((T0r,MPe)=>{"use strict";var pIt=APe();MPe.exports=function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch(t){return!1}return!pIt(e)}});var Lj=ne((A0r,EPe)=>{"use strict";var gIt=SPe(),mIt=/^\s*class[\s{/}]/,yIt=Function.prototype.toString;EPe.exports=function(e){return!(!gIt(e)||mIt.test(yIt.call(e)))}});var CPe=ne((M0r,kPe)=>{"use strict";kPe.exports=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}});var FPe=ne((S0r,LPe)=>{"use strict";LPe.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var DPe=ne((E0r,PPe)=>{"use strict";var xIt=Qm(),bIt=Object.keys;PPe.exports=function(e){return bIt(xIt(e)?Object(e):e)}});var IPe=ne((k0r,RPe)=>{"use strict";RPe.exports=FPe()()?Object.keys:DPe()});var qPe=ne((C0r,zPe)=>{"use strict";var _It=IPe(),wIt=ug(),TIt=Math.max;zPe.exports=function(e,t){var r,n,a=TIt(arguments.length,2),i;for(e=Object(wIt(e)),i=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";BPe.exports=CPe()()?Object.assign:qPe()});var Fj=ne((F0r,OPe)=>{"use strict";var AIt=Qm(),MIt=Array.prototype.forEach,SIt=Object.create,EIt=function(e,t){var r;for(r in e)t[r]=e[r]};OPe.exports=function(e){var t=SIt(null);return MIt.call(arguments,function(r){AIt(r)&&EIt(Object(r),t)}),t}});var UPe=ne((P0r,NPe)=>{"use strict";var Pj="razdwatrzy";NPe.exports=function(){return typeof Pj.contains!="function"?!1:Pj.contains("dwa")===!0&&Pj.contains("foo")===!1}});var GPe=ne((D0r,VPe)=>{"use strict";var kIt=String.prototype.indexOf;VPe.exports=function(e){return kIt.call(this,e,arguments[1])>-1}});var Dj=ne((R0r,HPe)=>{"use strict";HPe.exports=UPe()()?String.prototype.contains:GPe()});var cg=ne((I0r,XPe)=>{"use strict";var b9=F2(),jPe=Lj(),WPe=x9(),YPe=Fj(),l6=Dj(),CIt=XPe.exports=function(e,t){var r,n,a,i,o;return arguments.length<2||typeof e!="string"?(i=t,t=e,e=null):i=arguments[2],b9(e)?(r=l6.call(e,"c"),n=l6.call(e,"e"),a=l6.call(e,"w")):(r=a=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:a},i?WPe(YPe(i),o):o};CIt.gs=function(e,t,r){var n,a,i,o;return typeof e!="string"?(i=r,r=t,t=e,e=null):i=arguments[3],b9(t)?jPe(t)?b9(r)?jPe(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,b9(e)?(n=l6.call(e,"c"),a=l6.call(e,"e")):(n=!0,a=!1),o={get:t,set:r,configurable:n,enumerable:a},i?WPe(YPe(i),o):o}});var u6=ne((z0r,$Pe)=>{"use strict";var ZPe=Object.prototype.toString,LIt=ZPe.call((function(){return arguments})());$Pe.exports=function(e){return ZPe.call(e)===LIt}});var c6=ne((q0r,JPe)=>{"use strict";var KPe=Object.prototype.toString,FIt=KPe.call("");JPe.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||KPe.call(e)===FIt)||!1}});var eDe=ne((B0r,QPe)=>{"use strict";QPe.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var nDe=ne((O0r,rDe)=>{var tDe=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};rDe.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return tDe()}try{return __global__||tDe()}finally{delete Object.prototype.__global__}})()});var f6=ne((N0r,aDe)=>{"use strict";aDe.exports=eDe()()?globalThis:nDe()});var oDe=ne((U0r,iDe)=>{"use strict";var PIt=f6(),Rj={object:!0,symbol:!0};iDe.exports=function(){var e=PIt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!Rj[typeof e.iterator]||!Rj[typeof e.toPrimitive]||!Rj[typeof e.toStringTag])}});var lDe=ne((V0r,sDe)=>{"use strict";sDe.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var Ij=ne((G0r,uDe)=>{"use strict";var DIt=lDe();uDe.exports=function(e){if(!DIt(e))throw new TypeError(e+" is not a symbol");return e}});var vDe=ne((H0r,dDe)=>{"use strict";var cDe=cg(),RIt=Object.create,fDe=Object.defineProperty,IIt=Object.prototype,hDe=RIt(null);dDe.exports=function(e){for(var t=0,r,n;hDe[e+(t||"")];)++t;return e+=t||"",hDe[e]=!0,r="@@"+e,fDe(IIt,r,cDe.gs(null,function(a){n||(n=!0,fDe(this,r,cDe(a)),n=!1)})),r}});var gDe=ne((j0r,pDe)=>{"use strict";var cp=cg(),Vc=f6().Symbol;pDe.exports=function(e){return Object.defineProperties(e,{hasInstance:cp("",Vc&&Vc.hasInstance||e("hasInstance")),isConcatSpreadable:cp("",Vc&&Vc.isConcatSpreadable||e("isConcatSpreadable")),iterator:cp("",Vc&&Vc.iterator||e("iterator")),match:cp("",Vc&&Vc.match||e("match")),replace:cp("",Vc&&Vc.replace||e("replace")),search:cp("",Vc&&Vc.search||e("search")),species:cp("",Vc&&Vc.species||e("species")),split:cp("",Vc&&Vc.split||e("split")),toPrimitive:cp("",Vc&&Vc.toPrimitive||e("toPrimitive")),toStringTag:cp("",Vc&&Vc.toStringTag||e("toStringTag")),unscopables:cp("",Vc&&Vc.unscopables||e("unscopables"))})}});var xDe=ne((W0r,yDe)=>{"use strict";var mDe=cg(),zIt=Ij(),h6=Object.create(null);yDe.exports=function(e){return Object.defineProperties(e,{for:mDe(function(t){return h6[t]?h6[t]:h6[t]=e(String(t))}),keyFor:mDe(function(t){var r;zIt(t);for(r in h6)if(h6[r]===t)return r})})}});var wDe=ne((Y0r,_De)=>{"use strict";var l1=cg(),zj=Ij(),_9=f6().Symbol,qIt=vDe(),BIt=gDe(),OIt=xDe(),NIt=Object.create,qj=Object.defineProperties,w9=Object.defineProperty,gd,pw,bDe;if(typeof _9=="function")try{String(_9()),bDe=!0}catch(e){}else _9=null;pw=function(t){if(this instanceof pw)throw new TypeError("Symbol is not a constructor");return gd(t)};_De.exports=gd=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return bDe?_9(t):(r=NIt(pw.prototype),t=t===void 0?"":String(t),qj(r,{__description__:l1("",t),__name__:l1("",qIt(t))}))};BIt(gd);OIt(gd);qj(pw.prototype,{constructor:l1(gd),toString:l1("",function(){return this.__name__})});qj(gd.prototype,{toString:l1(function(){return"Symbol ("+zj(this).__description__+")"}),valueOf:l1(function(){return zj(this)})});w9(gd.prototype,gd.toPrimitive,l1("",function(){var e=zj(this);return typeof e=="symbol"?e:e.toString()}));w9(gd.prototype,gd.toStringTag,l1("c","Symbol"));w9(pw.prototype,gd.toStringTag,l1("c",gd.prototype[gd.toStringTag]));w9(pw.prototype,gd.toPrimitive,l1("c",gd.prototype[gd.toPrimitive]))});var ey=ne((X0r,TDe)=>{"use strict";TDe.exports=oDe()()?f6().Symbol:wDe()});var MDe=ne((Z0r,ADe)=>{"use strict";var UIt=ug();ADe.exports=function(){return UIt(this).length=0,this}});var gw=ne(($0r,SDe)=>{"use strict";SDe.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var kDe=ne((K0r,EDe)=>{"use strict";var VIt=F2(),GIt=y9(),HIt=Object.prototype.toString;EDe.exports=function(e){if(!VIt(e))return null;if(GIt(e)){var t=e.toString;if(typeof t!="function"||t===HIt)return null}try{return""+e}catch(r){return null}}});var LDe=ne((J0r,CDe)=>{"use strict";CDe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var PDe=ne((Q0r,FDe)=>{"use strict";var jIt=LDe(),WIt=/[\n\r\u2028\u2029]/g;FDe.exports=function(e){var t=jIt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(WIt,function(r){switch(r){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var Bj=ne((epr,IDe)=>{"use strict";var DDe=F2(),YIt=y9(),XIt=kDe(),ZIt=PDe(),RDe=function(e,t){return e.replace("%v",ZIt(t))};IDe.exports=function(e,t,r){if(!YIt(r))throw new TypeError(RDe(t,e));if(!DDe(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=XIt(r.errorMessage);throw DDe(n)||(n=t),new TypeError(RDe(n,e))}});var qDe=ne((tpr,zDe)=>{"use strict";var $It=Bj(),KIt=F2();zDe.exports=function(e){return KIt(e)?e:$It(e,"Cannot use %v",arguments[1])}});var ODe=ne((rpr,BDe)=>{"use strict";var JIt=Bj(),QIt=Lj();BDe.exports=function(e){return QIt(e)?e:JIt(e,"%v is not a plain function",arguments[1])}});var UDe=ne((npr,NDe)=>{"use strict";NDe.exports=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}});var GDe=ne((apr,VDe)=>{"use strict";var ezt=Object.prototype.toString,tzt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);VDe.exports=function(e){return typeof e=="function"&&tzt(ezt.call(e))}});var jDe=ne((ipr,HDe)=>{"use strict";HDe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var YDe=ne((opr,WDe)=>{"use strict";WDe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var ZDe=ne((spr,XDe)=>{"use strict";XDe.exports=jDe()()?Math.sign:YDe()});var KDe=ne((lpr,$De)=>{"use strict";var rzt=ZDe(),nzt=Math.abs,azt=Math.floor;$De.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:rzt(e)*azt(nzt(e)))}});var QDe=ne((upr,JDe)=>{"use strict";var izt=KDe(),ozt=Math.max;JDe.exports=function(e){return ozt(0,izt(e))}});var nRe=ne((cpr,rRe)=>{"use strict";var szt=ey().iterator,lzt=u6(),uzt=GDe(),czt=QDe(),eRe=gw(),fzt=ug(),hzt=Qm(),dzt=c6(),tRe=Array.isArray,Oj=Function.prototype.call,P2={configurable:!0,enumerable:!0,writable:!0,value:null},Nj=Object.defineProperty;rRe.exports=function(e){var t=arguments[1],r=arguments[2],n,a,i,o,s,l,u,c,f,h;if(e=Object(fzt(e)),hzt(t)&&eRe(t),!this||this===Array||!uzt(this)){if(!t){if(lzt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(tRe(e)){for(o=new Array(s=e.length),a=0;a=55296&&l<=56319&&(h+=e[++a])),h=t?Oj.call(t,r,h,i):h,n?(P2.value=h,Nj(o,i,P2)):o[i]=h,++i;s=i}}if(s===void 0)for(s=czt(e.length),n&&(o=new n(s)),a=0;a{"use strict";aRe.exports=UDe()()?Array.from:nRe()});var sRe=ne((hpr,oRe)=>{"use strict";var vzt=iRe(),pzt=x9(),gzt=ug();oRe.exports=function(e){var t=Object(gzt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var a={};return r?vzt(r,function(i){(n.ensure||i in e)&&(a[i]=e[i])}):pzt(a,e),a}});var cRe=ne((dpr,uRe)=>{"use strict";var mzt=gw(),yzt=ug(),xzt=Function.prototype.bind,lRe=Function.prototype.call,bzt=Object.keys,_zt=Object.prototype.propertyIsEnumerable;uRe.exports=function(e,t){return function(r,n){var a,i=arguments[2],o=arguments[3];return r=Object(yzt(r)),mzt(n),a=bzt(r),o&&a.sort(typeof o=="function"?xzt.call(o,r):void 0),typeof e!="function"&&(e=a[e]),lRe.call(e,a,function(s,l){return _zt.call(r,s)?lRe.call(n,i,r[s],s,r,l):t})}}});var hRe=ne((vpr,fRe)=>{"use strict";fRe.exports=cRe()("forEach")});var vRe=ne((ppr,dRe)=>{"use strict";var wzt=gw(),Tzt=hRe(),Azt=Function.prototype.call;dRe.exports=function(e,t){var r={},n=arguments[2];return wzt(t),Tzt(e,function(a,i,o,s){r[i]=Azt.call(t,n,a,i,o,s)}),r}});var yRe=ne((gpr,mRe)=>{"use strict";var Mzt=F2(),Szt=qDe(),pRe=ODe(),Ezt=sRe(),kzt=Fj(),Czt=vRe(),Lzt=Function.prototype.bind,Fzt=Object.defineProperty,Pzt=Object.prototype.hasOwnProperty,gRe;gRe=function(e,t,r){var n=Szt(t)&&pRe(t.value),a;return a=Ezt(t),delete a.writable,delete a.value,a.get=function(){return!r.overwriteDefinition&&Pzt.call(this,e)?n:(t.value=Lzt.call(n,r.resolveContext?r.resolveContext(this):this),Fzt(this,e,t),this[e])},a};mRe.exports=function(e){var t=kzt(arguments[1]);return Mzt(t.resolveContext)&&pRe(t.resolveContext),Czt(e,function(r,n){return gRe(n,r,t)})}});var Uj=ne((mpr,wRe)=>{"use strict";var Dzt=MDe(),Rzt=x9(),Izt=gw(),zzt=ug(),rv=cg(),qzt=yRe(),xRe=ey(),bRe=Object.defineProperty,_Re=Object.defineProperties,d6;wRe.exports=d6=function(e,t){if(!(this instanceof d6))throw new TypeError("Constructor requires 'new'");_Re(this,{__list__:rv("w",zzt(e)),__context__:rv("w",t),__nextIndex__:rv("w",0)}),t&&(Izt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete d6.prototype.constructor;_Re(d6.prototype,Rzt({_next:rv(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){bRe(this,"__redo__",rv("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:rv(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:rv(function(){this.__redo__&&Dzt.call(this.__redo__),this.__nextIndex__=0})})));bRe(d6.prototype,xRe.iterator,rv(function(){return this}))});var ERe=ne((ypr,SRe)=>{"use strict";var TRe=m9(),ARe=Dj(),Vj=cg(),Bzt=ey(),Gj=Uj(),MRe=Object.defineProperty,mw;mw=SRe.exports=function(e,t){if(!(this instanceof mw))throw new TypeError("Constructor requires 'new'");Gj.call(this,e),t?ARe.call(t,"key+value")?t="key+value":ARe.call(t,"key")?t="key":t="value":t="value",MRe(this,"__kind__",Vj("",t))};TRe&&TRe(mw,Gj);delete mw.prototype.constructor;mw.prototype=Object.create(Gj.prototype,{_resolve:Vj(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});MRe(mw.prototype,Bzt.toStringTag,Vj("c","Array Iterator"))});var FRe=ne((xpr,LRe)=>{"use strict";var kRe=m9(),T9=cg(),Ozt=ey(),Hj=Uj(),CRe=Object.defineProperty,yw;yw=LRe.exports=function(e){if(!(this instanceof yw))throw new TypeError("Constructor requires 'new'");e=String(e),Hj.call(this,e),CRe(this,"__length__",T9("",e.length))};kRe&&kRe(yw,Hj);delete yw.prototype.constructor;yw.prototype=Object.create(Hj.prototype,{_next:T9(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});CRe(yw.prototype,Ozt.toStringTag,T9("c","String Iterator"))});var DRe=ne((bpr,PRe)=>{"use strict";var Nzt=u6(),Uzt=Qm(),Vzt=c6(),Gzt=ey().iterator,Hzt=Array.isArray;PRe.exports=function(e){return Uzt(e)?Hzt(e)||Vzt(e)||Nzt(e)?!0:typeof e[Gzt]=="function":!1}});var IRe=ne((_pr,RRe)=>{"use strict";var jzt=DRe();RRe.exports=function(e){if(!jzt(e))throw new TypeError(e+" is not iterable");return e}});var jj=ne((wpr,BRe)=>{"use strict";var Wzt=u6(),Yzt=c6(),zRe=ERe(),Xzt=FRe(),Zzt=IRe(),qRe=ey().iterator;BRe.exports=function(e){return typeof Zzt(e)[qRe]=="function"?e[qRe]():Wzt(e)?new zRe(e):Yzt(e)?new Xzt(e):new zRe(e)}});var NRe=ne((Tpr,ORe)=>{"use strict";var $zt=u6(),Kzt=gw(),Jzt=c6(),Qzt=jj(),eqt=Array.isArray,Wj=Function.prototype.call,tqt=Array.prototype.some;ORe.exports=function(e,t){var r,n=arguments[2],a,i,o,s,l,u,c;if(eqt(e)||$zt(e)?r="array":Jzt(e)?r="string":e=Qzt(e),Kzt(t),i=function(){o=!0},r==="array"){tqt.call(e,function(f){return Wj.call(t,n,f,i),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),Wj.call(t,n,u,i),!o);++s);return}for(a=e.next();!a.done;){if(Wj.call(t,n,a.value,i),o)return;a=e.next()}}});var VRe=ne((Apr,URe)=>{"use strict";URe.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()});var jRe=ne((Mpr,HRe)=>{"use strict";var rqt=Qm(),M9=m9(),A9=yPe(),nqt=ug(),aqt=bPe(),fg=cg(),iqt=jj(),oqt=NRe(),sqt=ey().toStringTag,GRe=VRe(),lqt=Array.isArray,Xj=Object.defineProperty,Yj=Object.prototype.hasOwnProperty,uqt=Object.getPrototypeOf,ty;HRe.exports=ty=function(){var e=arguments[0],t;if(!(this instanceof ty))throw new TypeError("Constructor requires 'new'");return t=GRe&&M9&&WeakMap!==ty?M9(new WeakMap,uqt(this)):this,rqt(e)&&(lqt(e)||(e=iqt(e))),Xj(t,"__weakMapData__",fg("c","$weakMap$"+aqt())),e&&oqt(e,function(r){nqt(r),t.set(r[0],r[1])}),t};GRe&&(M9&&M9(ty,WeakMap),ty.prototype=Object.create(WeakMap.prototype,{constructor:fg(ty)}));Object.defineProperties(ty.prototype,{delete:fg(function(e){return Yj.call(A9(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:fg(function(e){if(Yj.call(A9(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:fg(function(e){return Yj.call(A9(e),this.__weakMapData__)}),set:fg(function(e,t){return Xj(A9(e),this.__weakMapData__,fg("c",t)),this}),toString:fg(function(){return"[object WeakMap]"})});Xj(ty.prototype,sqt,fg("c","WeakMap"))});var Zj=ne((Spr,WRe)=>{"use strict";WRe.exports=iPe()()?WeakMap:jRe()});var XRe=ne((Epr,YRe)=>{"use strict";YRe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),a=n.length;if(a===0)return-1;for(var i=0;i{"use strict";var S9=Hm(),cqt=A2(),Kj=Uc(),fqt=s1(),hqt=M2(),ZRe=tPe(),dqt=nPe(),{float32:vqt,fract32:$j}=l9(),pqt=Zj(),$Re=sw(),gqt=XRe(),mqt=` +`]),this.drawCircle=e(g)}rh.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};rh.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this};rh.prototype.draw=function(){for(var e=arguments.length,t=new Array(e),r=0;r{this.drawItem(i)});return this};rh.prototype.drawItem=function(e,t){let{groups:r}=this,n=r[e];if(typeof t=="number"&&(e=t,n=r[t],t=null),!(n&&n.count&&n.opacity))return;n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,t));let a=[];for(let i=1;i{let f=n[c];if(u===void 0)return f;u===null?u={positions:null}:typeof u=="function"?u={ondraw:u}:typeof u[0]=="number"&&(u={positions:u}),u=EYt(u,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),u.positions===null&&(u.positions=[]),u.tooManyColors!=null&&(this.tooManyColors=u.tooManyColors),f||(n[c]=f={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:i.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},u=Object.assign({},rh.defaults,u)),u.positions&&!("marker"in u)&&(u.marker=f.marker,delete f.marker),u.marker&&!("positions"in u)&&(u.positions=f.positions,delete f.positions);let v=0,g=0;if(kYt(f,u,[{snap:!0,size:(p,x)=>(p==null&&(p=rh.defaults.size),v+=p&&p.length?1:0,p),borderSize:(p,x)=>(p==null&&(p=rh.defaults.borderSize),v+=p&&p.length?1:0,p),opacity:parseFloat,color:(p,x)=>(p==null&&(p=rh.defaults.color),p=this.updateColor(p),g++,p),borderColor:(p,x)=>(p==null&&(p=rh.defaults.borderColor),p=this.updateColor(p),g++,p),bounds:(p,x,_)=>("range"in _||(_.range=null),p),positions:(p,x,_)=>{let{snap:y}=x,{positionBuffer:C,positionFractBuffer:k,selectionBuffer:S}=x;if(p.x||p.y)return p.x.length?x.xAttr={buffer:i.buffer(p.x),offset:0,stride:4,count:p.x.length}:x.xAttr={buffer:p.x.buffer,offset:p.x.offset*4||0,stride:(p.x.stride||1)*4,count:p.x.count},p.y.length?x.yAttr={buffer:i.buffer(p.y),offset:0,stride:4,count:p.y.length}:x.yAttr={buffer:p.y.buffer,offset:p.y.offset*4||0,stride:(p.y.stride||1)*4,count:p.y.count},x.count=Math.max(x.xAttr.count,x.yAttr.count),p;p=CYt(p,"float64");let L=x.count=Math.floor(p.length/2),w=x.bounds=L?AYt(p,2):null;if(!_.range&&!x.range&&(delete x.range,_.range=w),!_.marker&&!x.marker&&(delete x.marker,_.marker=null),y&&(y===!0||L>y)?x.tree=SYt(p,{bounds:w}):y&&y.length&&(x.tree=y),x.tree){let m={primitive:"points",usage:"static",data:x.tree,type:"uint32"};x.elements?x.elements(m):x.elements=i.elements(m)}var A=fF.float32(p);C({data:A,usage:"dynamic"});var T=fF.fract32(p,A);return k({data:T,usage:"dynamic"}),S({data:new Uint8Array(L),type:"uint8",usage:"stream"}),p}},{marker:(p,x,_)=>{let{activation:y}=x;if(y.forEach(C=>C&&C.destroy&&C.destroy()),y.length=0,!p||typeof p[0]=="number"){let C=this.addMarker(p);y[C]=!0}else{let C=[];for(let k=0,S=Math.min(p.length,x.count);k{let y=x.bounds;if(y)return p||(p=y),x.scale=[1/(p[2]-p[0]),1/(p[3]-p[1])],x.translate=[-p[0],-p[1]],x.scaleFract=fF.fract(x.scale),x.translateFract=fF.fract(x.translate),p},viewport:p=>LYt(p||[a.drawingBufferWidth,a.drawingBufferHeight])}]),v){let{count:p,size:x,borderSize:_,sizeBuffer:y}=f,C=new Uint8Array(p*2);if(x.length||_.length)for(let k=0;k=0)return a;let i;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)i=e;else{i=new Uint8Array(e.length);for(let s=0,l=e.length;sn*4&&(this.tooManyColors=!0),this.updatePalette(r),a.length===1?a[0]:a};rh.prototype.updatePalette=function(e){if(this.tooManyColors)return;let{maxColors:t,paletteTexture:r}=this,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(let a=e.length*.25%t;a{e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(t=>t&&t.destroy&&t.destroy()),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(e=>e&&e.destroy&&e.destroy()),this};var FYt=function(e,t){var r=new PYt(e,t),n=r.render.bind(r);return Object.assign(n,{render:n,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),n};jBe.exports=FYt});var Zc=fe((c4r,YBe)=>{"use strict";var WBe=Object.getOwnPropertySymbols,DYt=Object.prototype.hasOwnProperty,RYt=Object.prototype.propertyIsEnumerable;function IYt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function zYt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(n.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(i){a[i]=i}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}YBe.exports=zYt()?Object.assign:function(e,t){for(var r,n=IYt(e),a,i=1;i{"use strict";TZ.exports=vF;TZ.exports.default=vF;function vF(e,t,r){r=r||2;var n=t&&t.length,a=n?t[0]*r:e.length,i=ZBe(e,0,a,r,!0),o=[];if(!i||i.next===i.prev)return o;var s,l,u,c,f,v,g;if(n&&(i=UYt(e,t,i,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var p=r;pu&&(u=f),v>c&&(c=v);g=Math.max(u-s,c-l),g=g!==0?32767/g:0}return AM(i,o,r,s,l,g,0),o}function ZBe(e,t,r,n,a){var i,o;if(a===wZ(e,t,r,n)>0)for(i=t;i=t;i-=n)o=XBe(i,e[i],e[i+1],o);return o&&pF(o,o.next)&&(SM(o),o=o.next),o}function h_(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(pF(r,r.next)||Uu(r.prev,r,r.next)===0)){if(SM(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function AM(e,t,r,n,a,i,o){if(e){!o&&i&&WYt(e,n,a,i);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,i?BYt(e,n,a,i):qYt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),SM(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=OYt(h_(e),t,r),AM(e,t,r,n,a,i,2)):o===2&&NYt(e,t,r,n,a,i):AM(h_(e),t,r,n,a,i,1);break}}}}function qYt(e){var t=e.prev,r=e,n=e.next;if(Uu(t,r,n)>=0)return!1;for(var a=t.x,i=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=ai?a>o?a:o:i>o?i:o,g=s>l?s>u?s:u:l>u?l:u,p=n.next;p!==t;){if(p.x>=c&&p.x<=v&&p.y>=f&&p.y<=g&&g5(a,s,i,l,o,u,p.x,p.y)&&Uu(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function BYt(e,t,r,n){var a=e.prev,i=e,o=e.next;if(Uu(a,i,o)>=0)return!1;for(var s=a.x,l=i.x,u=o.x,c=a.y,f=i.y,v=o.y,g=sl?s>u?s:u:l>u?l:u,_=c>f?c>v?c:v:f>v?f:v,y=_Z(g,p,t,r,n),C=_Z(x,_,t,r,n),k=e.prevZ,S=e.nextZ;k&&k.z>=y&&S&&S.z<=C;){if(k.x>=g&&k.x<=x&&k.y>=p&&k.y<=_&&k!==a&&k!==o&&g5(s,c,l,f,u,v,k.x,k.y)&&Uu(k.prev,k,k.next)>=0||(k=k.prevZ,S.x>=g&&S.x<=x&&S.y>=p&&S.y<=_&&S!==a&&S!==o&&g5(s,c,l,f,u,v,S.x,S.y)&&Uu(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;k&&k.z>=y;){if(k.x>=g&&k.x<=x&&k.y>=p&&k.y<=_&&k!==a&&k!==o&&g5(s,c,l,f,u,v,k.x,k.y)&&Uu(k.prev,k,k.next)>=0)return!1;k=k.prevZ}for(;S&&S.z<=C;){if(S.x>=g&&S.x<=x&&S.y>=p&&S.y<=_&&S!==a&&S!==o&&g5(s,c,l,f,u,v,S.x,S.y)&&Uu(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function OYt(e,t,r){var n=e;do{var a=n.prev,i=n.next.next;!pF(a,i)&&$Be(a,n,n.next,i)&&MM(a,i)&&MM(i,a)&&(t.push(a.i/r|0),t.push(n.i/r|0),t.push(i.i/r|0),SM(n),SM(n.next),n=e=i),n=n.next}while(n!==e);return h_(n)}function NYt(e,t,r,n,a,i){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&ZYt(o,s)){var l=KBe(o,s);o=h_(o,o.next),l=h_(l,l.next),AM(o,t,r,n,a,i,0),AM(l,t,r,n,a,i,0);return}s=s.next}o=o.next}while(o!==e)}function UYt(e,t,r,n){var a=[],i,o,s,l,u;for(i=0,o=t.length;i=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>i&&(i=s,o=r.x=r.x&&r.x>=u&&n!==r.x&&g5(ao.x||r.x===o.x&&jYt(o,r)))&&(o=r,f=v)),r=r.next;while(r!==l);return o}function jYt(e,t){return Uu(e.prev,e,t.prev)<0&&Uu(t.next,e,e.next)<0}function WYt(e,t,r,n){var a=e;do a.z===0&&(a.z=_Z(a.x,a.y,t,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next;while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,YYt(a)}function YYt(e){var t,r,n,a,i,o,s,l,u=1;do{for(r=e,e=null,i=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;r=n}i.nextZ=null,u*=2}while(o>1);return e}function _Z(e,t,r,n,a){return e=(e-r)*a|0,t=(t-n)*a|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function XYt(e){var t=e,r=e;do(t.x=(e-o)*(i-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(i-s)>=(a-o)*(n-s)}function ZYt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!$Yt(e,t)&&(MM(e,t)&&MM(t,e)&&KYt(e,t)&&(Uu(e.prev,e,t.prev)||Uu(e,t.prev,t))||pF(e,t)&&Uu(e.prev,e,e.next)>0&&Uu(t.prev,t,t.next)>0)}function Uu(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function pF(e,t){return e.x===t.x&&e.y===t.y}function $Be(e,t,r,n){var a=dF(Uu(e,t,r)),i=dF(Uu(e,t,n)),o=dF(Uu(r,n,e)),s=dF(Uu(r,n,t));return!!(a!==i&&o!==s||a===0&&hF(e,r,t)||i===0&&hF(e,n,t)||o===0&&hF(r,e,n)||s===0&&hF(r,t,n))}function hF(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function dF(e){return e>0?1:e<0?-1:0}function $Yt(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&$Be(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function MM(e,t){return Uu(e.prev,e,e.next)<0?Uu(e,t,e.next)>=0&&Uu(e,e.prev,t)>=0:Uu(e,t,e.prev)<0||Uu(e,e.next,t)<0}function KYt(e,t){var r=e,n=!1,a=(e.x+t.x)/2,i=(e.y+t.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!==e);return n}function KBe(e,t){var r=new bZ(e.i,e.x,e.y),n=new bZ(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function XBe(e,t,r,n){var a=new bZ(e,t,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 SM(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function bZ(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}vF.deviation=function(e,t,r,n){var a=t&&t.length,i=a?t[0]*r:e.length,o=Math.abs(wZ(e,0,i,r));if(a)for(var s=0,l=t.length;s0&&(n+=e[a-1].length,r.holes.push(n))}return r}});var eOe=fe((h4r,QBe)=>{"use strict";var JYt=l_();QBe.exports=QYt;function QYt(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=JYt(e,t));for(var n=0;n{"use strict";tOe.exports=function(){var e,t;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return!(String(e)!=="[object WeakMap]"||typeof e.set!="function"||e.set({},1)!==e||typeof e.delete!="function"||typeof e.has!="function"||e.get(t)!=="one")}});var iOe=fe((v4r,nOe)=>{"use strict";nOe.exports=function(){}});var My=fe((p4r,aOe)=>{"use strict";var eXt=iOe()();aOe.exports=function(e){return e!==eXt&&e!==null}});var AZ=fe((g4r,sOe)=>{"use strict";var tXt=Object.create,rXt=Object.getPrototypeOf,oOe={};sOe.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||tXt;return typeof e!="function"?!1:rXt(e(t(null),oOe))===oOe}});var MZ=fe((m4r,lOe)=>{"use strict";var nXt=My(),iXt={function:!0,object:!0};lOe.exports=function(e){return nXt(e)&&iXt[typeof e]||!1}});var Pg=fe((y4r,uOe)=>{"use strict";var aXt=My();uOe.exports=function(e){if(!aXt(e))throw new TypeError("Cannot use null or undefined");return e}});var fOe=fe((x4r,cOe)=>{"use strict";var SZ=Object.create,gF;AZ()()||(gF=EZ());cOe.exports=(function(){var e,t,r;return!gF||gF.level!==1?SZ:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n==="__proto__"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(gF,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,a){return SZ(n===null?e:n,a)})})()});var EZ=fe((_4r,hOe)=>{"use strict";var oXt=MZ(),sXt=Pg(),lXt=Object.prototype.isPrototypeOf,uXt=Object.defineProperty,cXt={configurable:!0,enumerable:!1,writable:!0,value:void 0},mF;mF=function(e,t){if(sXt(e),t===null||oXt(t))return e;throw new TypeError("Prototype must be null or an object")};hOe.exports=(function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,a){return r.call(mF(n,a),a),n}):t=function(n,a){return mF(n,a).__proto__=a,n}:t=function n(a,i){var o;return mF(a,i),o=lXt.call(n.nullPolyfill,a),o&&delete n.nullPolyfill.__proto__,i===null&&(i=n.nullPolyfill),a.__proto__=i,o&&uXt(n.nullPolyfill,"__proto__",cXt),a},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null})((function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{r=n.set,r.call(e,t)}catch(a){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)})());fOe()});var yF=fe((b4r,dOe)=>{"use strict";dOe.exports=AZ()()?Object.setPrototypeOf:EZ()});var pOe=fe((w4r,vOe)=>{"use strict";var fXt=MZ();vOe.exports=function(e){if(!fXt(e))throw new TypeError(e+" is not an Object");return e}});var mOe=fe((T4r,gOe)=>{"use strict";var hXt=Object.create(null),dXt=Math.random;gOe.exports=function(){var e;do e=dXt().toString(36).slice(2);while(hXt[e]);return e}});var d_=fe((A4r,yOe)=>{"use strict";var vXt=void 0;yOe.exports=function(e){return e!==vXt&&e!==null}});var kZ=fe((M4r,xOe)=>{"use strict";var pXt=d_(),gXt={object:!0,function:!0,undefined:!0};xOe.exports=function(e){return pXt(e)?hasOwnProperty.call(gXt,typeof e):!1}});var bOe=fe((S4r,_Oe)=>{"use strict";var mXt=kZ();_Oe.exports=function(e){if(!mXt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var TOe=fe((E4r,wOe)=>{"use strict";var yXt=bOe();wOe.exports=function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch(t){return!1}return!yXt(e)}});var CZ=fe((k4r,AOe)=>{"use strict";var xXt=TOe(),_Xt=/^\s*class[\s{/}]/,bXt=Function.prototype.toString;AOe.exports=function(e){return!(!xXt(e)||_Xt.test(bXt.call(e)))}});var SOe=fe((C4r,MOe)=>{"use strict";MOe.exports=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}});var kOe=fe((L4r,EOe)=>{"use strict";EOe.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var LOe=fe((P4r,COe)=>{"use strict";var wXt=My(),TXt=Object.keys;COe.exports=function(e){return TXt(wXt(e)?Object(e):e)}});var FOe=fe((F4r,POe)=>{"use strict";POe.exports=kOe()()?Object.keys:LOe()});var ROe=fe((D4r,DOe)=>{"use strict";var AXt=FOe(),MXt=Pg(),SXt=Math.max;DOe.exports=function(e,t){var r,n,a=SXt(arguments.length,2),i;for(e=Object(MXt(e)),i=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";IOe.exports=SOe()()?Object.assign:ROe()});var LZ=fe((I4r,zOe)=>{"use strict";var EXt=My(),kXt=Array.prototype.forEach,CXt=Object.create,LXt=function(e,t){var r;for(r in e)t[r]=e[r]};zOe.exports=function(e){var t=CXt(null);return kXt.call(arguments,function(r){EXt(r)&&LXt(Object(r),t)}),t}});var BOe=fe((z4r,qOe)=>{"use strict";var PZ="razdwatrzy";qOe.exports=function(){return typeof PZ.contains!="function"?!1:PZ.contains("dwa")===!0&&PZ.contains("foo")===!1}});var NOe=fe((q4r,OOe)=>{"use strict";var PXt=String.prototype.indexOf;OOe.exports=function(e){return PXt.call(this,e,arguments[1])>-1}});var FZ=fe((B4r,UOe)=>{"use strict";UOe.exports=BOe()()?String.prototype.contains:NOe()});var Fg=fe((O4r,jOe)=>{"use strict";var _F=d_(),VOe=CZ(),GOe=xF(),HOe=LZ(),EM=FZ(),FXt=jOe.exports=function(e,t){var r,n,a,i,o;return arguments.length<2||typeof e!="string"?(i=t,t=e,e=null):i=arguments[2],_F(e)?(r=EM.call(e,"c"),n=EM.call(e,"e"),a=EM.call(e,"w")):(r=a=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:a},i?GOe(HOe(i),o):o};FXt.gs=function(e,t,r){var n,a,i,o;return typeof e!="string"?(i=r,r=t,t=e,e=null):i=arguments[3],_F(t)?VOe(t)?_F(r)?VOe(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,_F(e)?(n=EM.call(e,"c"),a=EM.call(e,"e")):(n=!0,a=!1),o={get:t,set:r,configurable:n,enumerable:a},i?GOe(HOe(i),o):o}});var kM=fe((N4r,YOe)=>{"use strict";var WOe=Object.prototype.toString,DXt=WOe.call((function(){return arguments})());YOe.exports=function(e){return WOe.call(e)===DXt}});var CM=fe((U4r,ZOe)=>{"use strict";var XOe=Object.prototype.toString,RXt=XOe.call("");ZOe.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||XOe.call(e)===RXt)||!1}});var KOe=fe((V4r,$Oe)=>{"use strict";$Oe.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var eNe=fe((G4r,QOe)=>{var JOe=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};QOe.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return JOe()}try{return __global__||JOe()}finally{delete Object.prototype.__global__}})()});var LM=fe((H4r,tNe)=>{"use strict";tNe.exports=KOe()()?globalThis:eNe()});var nNe=fe((j4r,rNe)=>{"use strict";var IXt=LM(),DZ={object:!0,symbol:!0};rNe.exports=function(){var e=IXt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!DZ[typeof e.iterator]||!DZ[typeof e.toPrimitive]||!DZ[typeof e.toStringTag])}});var aNe=fe((W4r,iNe)=>{"use strict";iNe.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var RZ=fe((Y4r,oNe)=>{"use strict";var zXt=aNe();oNe.exports=function(e){if(!zXt(e))throw new TypeError(e+" is not a symbol");return e}});var fNe=fe((X4r,cNe)=>{"use strict";var sNe=Fg(),qXt=Object.create,lNe=Object.defineProperty,BXt=Object.prototype,uNe=qXt(null);cNe.exports=function(e){for(var t=0,r,n;uNe[e+(t||"")];)++t;return e+=t||"",uNe[e]=!0,r="@@"+e,lNe(BXt,r,sNe.gs(null,function(a){n||(n=!0,lNe(this,r,sNe(a)),n=!1)})),r}});var dNe=fe((Z4r,hNe)=>{"use strict";var Fp=Fg(),lc=LM().Symbol;hNe.exports=function(e){return Object.defineProperties(e,{hasInstance:Fp("",lc&&lc.hasInstance||e("hasInstance")),isConcatSpreadable:Fp("",lc&&lc.isConcatSpreadable||e("isConcatSpreadable")),iterator:Fp("",lc&&lc.iterator||e("iterator")),match:Fp("",lc&&lc.match||e("match")),replace:Fp("",lc&&lc.replace||e("replace")),search:Fp("",lc&&lc.search||e("search")),species:Fp("",lc&&lc.species||e("species")),split:Fp("",lc&&lc.split||e("split")),toPrimitive:Fp("",lc&&lc.toPrimitive||e("toPrimitive")),toStringTag:Fp("",lc&&lc.toStringTag||e("toStringTag")),unscopables:Fp("",lc&&lc.unscopables||e("unscopables"))})}});var gNe=fe(($4r,pNe)=>{"use strict";var vNe=Fg(),OXt=RZ(),PM=Object.create(null);pNe.exports=function(e){return Object.defineProperties(e,{for:vNe(function(t){return PM[t]?PM[t]:PM[t]=e(String(t))}),keyFor:vNe(function(t){var r;OXt(t);for(r in PM)if(PM[r]===t)return r})})}});var xNe=fe((K4r,yNe)=>{"use strict";var k1=Fg(),IZ=RZ(),bF=LM().Symbol,NXt=fNe(),UXt=dNe(),VXt=gNe(),GXt=Object.create,zZ=Object.defineProperties,wF=Object.defineProperty,cd,m5,mNe;if(typeof bF=="function")try{String(bF()),mNe=!0}catch(e){}else bF=null;m5=function(t){if(this instanceof m5)throw new TypeError("Symbol is not a constructor");return cd(t)};yNe.exports=cd=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return mNe?bF(t):(r=GXt(m5.prototype),t=t===void 0?"":String(t),zZ(r,{__description__:k1("",t),__name__:k1("",NXt(t))}))};UXt(cd);VXt(cd);zZ(m5.prototype,{constructor:k1(cd),toString:k1("",function(){return this.__name__})});zZ(cd.prototype,{toString:k1(function(){return"Symbol ("+IZ(this).__description__+")"}),valueOf:k1(function(){return IZ(this)})});wF(cd.prototype,cd.toPrimitive,k1("",function(){var e=IZ(this);return typeof e=="symbol"?e:e.toString()}));wF(cd.prototype,cd.toStringTag,k1("c","Symbol"));wF(m5.prototype,cd.toStringTag,k1("c",cd.prototype[cd.toStringTag]));wF(m5.prototype,cd.toPrimitive,k1("c",cd.prototype[cd.toPrimitive]))});var Sy=fe((J4r,_Ne)=>{"use strict";_Ne.exports=nNe()()?LM().Symbol:xNe()});var wNe=fe((Q4r,bNe)=>{"use strict";var HXt=Pg();bNe.exports=function(){return HXt(this).length=0,this}});var y5=fe((eTr,TNe)=>{"use strict";TNe.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var MNe=fe((tTr,ANe)=>{"use strict";var jXt=d_(),WXt=kZ(),YXt=Object.prototype.toString;ANe.exports=function(e){if(!jXt(e))return null;if(WXt(e)){var t=e.toString;if(typeof t!="function"||t===YXt)return null}try{return""+e}catch(r){return null}}});var ENe=fe((rTr,SNe)=>{"use strict";SNe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var CNe=fe((nTr,kNe)=>{"use strict";var XXt=ENe(),ZXt=/[\n\r\u2028\u2029]/g;kNe.exports=function(e){var t=XXt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(ZXt,function(r){switch(r){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var PNe=fe((iTr,LNe)=>{"use strict";var $Xt=MNe(),KXt=CNe();LNe.exports=function(e,t,r){r&&r.errorMessage&&(e=$Xt(r.errorMessage));var n=e.indexOf("%v"),a=n>-1?KXt(t):null;if(r&&r.name){var i=e.indexOf("%n");if(i>-1){if(n>-1){var o,s,l,u;return i>n?(o=a,l=n,s=r.name,u=i):(o=r.name,l=i,s=a,u=n),e.slice(0,l)+o+e.slice(l+2,u)+s+e.slice(u+2)}return e.slice(0,i)+r.name+e.slice(i+2)}}return n>-1?e.slice(0,n)+a+e.slice(n+2):e}});var qZ=fe((aTr,FNe)=>{"use strict";var JXt=d_(),QXt=PNe();FNe.exports=function(e,t,r){if(r&&!JXt(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=r&&r.Error||TypeError,a=new n(QXt(t,e,r));throw r&&r.errorCode&&(a.code=r.errorCode),a}});var RNe=fe((oTr,DNe)=>{"use strict";var eZt=qZ(),tZt=d_();DNe.exports=function(e){if(tZt(e))return e;var t=arguments[1],r=t&&t.name?"Expected a value for %n, received %v":"Cannot use %v";return eZt(e,r,t)}});var zNe=fe((sTr,INe)=>{"use strict";var rZt=qZ(),nZt=CZ();INe.exports=function(e){if(nZt(e))return e;var t=arguments[1],r=t&&t.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return rZt(e,r,t)}});var BNe=fe((lTr,qNe)=>{"use strict";qNe.exports=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}});var NNe=fe((uTr,ONe)=>{"use strict";var iZt=Object.prototype.toString,aZt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);ONe.exports=function(e){return typeof e=="function"&&aZt(iZt.call(e))}});var VNe=fe((cTr,UNe)=>{"use strict";UNe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var HNe=fe((fTr,GNe)=>{"use strict";GNe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var WNe=fe((hTr,jNe)=>{"use strict";jNe.exports=VNe()()?Math.sign:HNe()});var XNe=fe((dTr,YNe)=>{"use strict";var oZt=WNe(),sZt=Math.abs,lZt=Math.floor;YNe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:oZt(e)*lZt(sZt(e)))}});var $Ne=fe((vTr,ZNe)=>{"use strict";var uZt=XNe(),cZt=Math.max;ZNe.exports=function(e){return cZt(0,uZt(e))}});var eUe=fe((pTr,QNe)=>{"use strict";var fZt=Sy().iterator,hZt=kM(),dZt=NNe(),vZt=$Ne(),KNe=y5(),pZt=Pg(),gZt=My(),mZt=CM(),JNe=Array.isArray,BZ=Function.prototype.call,v_={configurable:!0,enumerable:!0,writable:!0,value:null},OZ=Object.defineProperty;QNe.exports=function(e){var t=arguments[1],r=arguments[2],n,a,i,o,s,l,u,c,f,v;if(e=Object(pZt(e)),gZt(t)&&KNe(t),!this||this===Array||!dZt(this)){if(!t){if(hZt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(JNe(e)){for(o=new Array(s=e.length),a=0;a=55296&&l<=56319&&(v+=e[++a])),v=t?BZ.call(t,r,v,i):v,n?(v_.value=v,OZ(o,i,v_)):o[i]=v,++i;s=i}}if(s===void 0)for(s=vZt(e.length),n&&(o=new n(s)),a=0;a{"use strict";tUe.exports=BNe()()?Array.from:eUe()});var iUe=fe((mTr,nUe)=>{"use strict";var yZt=rUe(),xZt=xF(),_Zt=Pg();nUe.exports=function(e){var t=Object(_Zt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var a={};return r?yZt(r,function(i){(n.ensure||i in e)&&(a[i]=e[i])}):xZt(a,e),a}});var sUe=fe((yTr,oUe)=>{"use strict";var bZt=y5(),wZt=Pg(),TZt=Function.prototype.bind,aUe=Function.prototype.call,AZt=Object.keys,MZt=Object.prototype.propertyIsEnumerable;oUe.exports=function(e,t){return function(r,n){var a,i=arguments[2],o=arguments[3];return r=Object(wZt(r)),bZt(n),a=AZt(r),o&&a.sort(typeof o=="function"?TZt.call(o,r):void 0),typeof e!="function"&&(e=a[e]),aUe.call(e,a,function(s,l){return MZt.call(r,s)?aUe.call(n,i,r[s],s,r,l):t})}}});var uUe=fe((xTr,lUe)=>{"use strict";lUe.exports=sUe()("forEach")});var fUe=fe((_Tr,cUe)=>{"use strict";var SZt=y5(),EZt=uUe(),kZt=Function.prototype.call;cUe.exports=function(e,t){var r={},n=arguments[2];return SZt(t),EZt(e,function(a,i,o,s){r[i]=kZt.call(t,n,a,i,o,s)}),r}});var pUe=fe((bTr,vUe)=>{"use strict";var CZt=d_(),LZt=RNe(),hUe=zNe(),PZt=iUe(),FZt=LZ(),DZt=fUe(),RZt=Function.prototype.bind,IZt=Object.defineProperty,zZt=Object.prototype.hasOwnProperty,dUe;dUe=function(e,t,r){var n=LZt(t)&&hUe(t.value),a;return a=PZt(t),delete a.writable,delete a.value,a.get=function(){return!r.overwriteDefinition&&zZt.call(this,e)?n:(t.value=RZt.call(n,r.resolveContext?r.resolveContext(this):this),IZt(this,e,t),this[e])},a};vUe.exports=function(e){var t=FZt(arguments[1]);return CZt(t.resolveContext)&&hUe(t.resolveContext),DZt(e,function(r,n){return dUe(n,r,t)})}});var NZ=fe((wTr,xUe)=>{"use strict";var qZt=wNe(),BZt=xF(),OZt=y5(),NZt=Pg(),h0=Fg(),UZt=pUe(),gUe=Sy(),mUe=Object.defineProperty,yUe=Object.defineProperties,FM;xUe.exports=FM=function(e,t){if(!(this instanceof FM))throw new TypeError("Constructor requires 'new'");yUe(this,{__list__:h0("w",NZt(e)),__context__:h0("w",t),__nextIndex__:h0("w",0)}),t&&(OZt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete FM.prototype.constructor;yUe(FM.prototype,BZt({_next:h0(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){mUe(this,"__redo__",h0("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:h0(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:h0(function(){this.__redo__&&qZt.call(this.__redo__),this.__nextIndex__=0})})));mUe(FM.prototype,gUe.iterator,h0(function(){return this}))});var AUe=fe((TTr,TUe)=>{"use strict";var _Ue=yF(),bUe=FZ(),UZ=Fg(),VZt=Sy(),VZ=NZ(),wUe=Object.defineProperty,x5;x5=TUe.exports=function(e,t){if(!(this instanceof x5))throw new TypeError("Constructor requires 'new'");VZ.call(this,e),t?bUe.call(t,"key+value")?t="key+value":bUe.call(t,"key")?t="key":t="value":t="value",wUe(this,"__kind__",UZ("",t))};_Ue&&_Ue(x5,VZ);delete x5.prototype.constructor;x5.prototype=Object.create(VZ.prototype,{_resolve:UZ(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});wUe(x5.prototype,VZt.toStringTag,UZ("c","Array Iterator"))});var kUe=fe((ATr,EUe)=>{"use strict";var MUe=yF(),TF=Fg(),GZt=Sy(),GZ=NZ(),SUe=Object.defineProperty,_5;_5=EUe.exports=function(e){if(!(this instanceof _5))throw new TypeError("Constructor requires 'new'");e=String(e),GZ.call(this,e),SUe(this,"__length__",TF("",e.length))};MUe&&MUe(_5,GZ);delete _5.prototype.constructor;_5.prototype=Object.create(GZ.prototype,{_next:TF(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});SUe(_5.prototype,GZt.toStringTag,TF("c","String Iterator"))});var LUe=fe((MTr,CUe)=>{"use strict";var HZt=kM(),jZt=My(),WZt=CM(),YZt=Sy().iterator,XZt=Array.isArray;CUe.exports=function(e){return jZt(e)?XZt(e)||WZt(e)||HZt(e)?!0:typeof e[YZt]=="function":!1}});var FUe=fe((STr,PUe)=>{"use strict";var ZZt=LUe();PUe.exports=function(e){if(!ZZt(e))throw new TypeError(e+" is not iterable");return e}});var HZ=fe((ETr,IUe)=>{"use strict";var $Zt=kM(),KZt=CM(),DUe=AUe(),JZt=kUe(),QZt=FUe(),RUe=Sy().iterator;IUe.exports=function(e){return typeof QZt(e)[RUe]=="function"?e[RUe]():$Zt(e)?new DUe(e):KZt(e)?new JZt(e):new DUe(e)}});var qUe=fe((kTr,zUe)=>{"use strict";var e$t=kM(),t$t=y5(),r$t=CM(),n$t=HZ(),i$t=Array.isArray,jZ=Function.prototype.call,a$t=Array.prototype.some;zUe.exports=function(e,t){var r,n=arguments[2],a,i,o,s,l,u,c;if(i$t(e)||e$t(e)?r="array":r$t(e)?r="string":e=n$t(e),t$t(t),i=function(){o=!0},r==="array"){a$t.call(e,function(f){return jZ.call(t,n,f,i),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),jZ.call(t,n,u,i),!o);++s);return}for(a=e.next();!a.done;){if(jZ.call(t,n,a.value,i),o)return;a=e.next()}}});var OUe=fe((CTr,BUe)=>{"use strict";BUe.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()});var VUe=fe((LTr,UUe)=>{"use strict";var o$t=My(),MF=yF(),AF=pOe(),s$t=Pg(),l$t=mOe(),Dg=Fg(),u$t=HZ(),c$t=qUe(),f$t=Sy().toStringTag,NUe=OUe(),h$t=Array.isArray,YZ=Object.defineProperty,WZ=Object.prototype.hasOwnProperty,d$t=Object.getPrototypeOf,Ey;UUe.exports=Ey=function(){var e=arguments[0],t;if(!(this instanceof Ey))throw new TypeError("Constructor requires 'new'");return t=NUe&&MF&&WeakMap!==Ey?MF(new WeakMap,d$t(this)):this,o$t(e)&&(h$t(e)||(e=u$t(e))),YZ(t,"__weakMapData__",Dg("c","$weakMap$"+l$t())),e&&c$t(e,function(r){s$t(r),t.set(r[0],r[1])}),t};NUe&&(MF&&MF(Ey,WeakMap),Ey.prototype=Object.create(WeakMap.prototype,{constructor:Dg(Ey)}));Object.defineProperties(Ey.prototype,{delete:Dg(function(e){return WZ.call(AF(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:Dg(function(e){if(WZ.call(AF(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:Dg(function(e){return WZ.call(AF(e),this.__weakMapData__)}),set:Dg(function(e,t){return YZ(AF(e),this.__weakMapData__,Dg("c",t)),this}),toString:Dg(function(){return"[object WeakMap]"})});YZ(Ey.prototype,f$t,Dg("c","WeakMap"))});var XZ=fe((PTr,GUe)=>{"use strict";GUe.exports=rOe()()?WeakMap:VUe()});var jUe=fe((FTr,HUe)=>{"use strict";HUe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),a=n.length;if(a===0)return-1;for(var i=0;i{"use strict";var SF=wM(),v$t=l_(),$Z=Zc(),p$t=E1(),g$t=u_(),WUe=JBe(),m$t=eOe(),{float32:y$t,fract32:ZZ}=uF(),x$t=XZ(),YUe=u5(),_$t=jUe(),b$t=` precision highp float; attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract; @@ -2247,7 +2248,7 @@ void main() { fragColor = color / 255.; } -`,yqt=` +`,w$t=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id; @@ -2265,7 +2266,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`,xqt=` +`,T$t=` precision highp float; attribute vec2 position, positionFract; @@ -2293,14 +2294,14 @@ void main() { fragColor = color / 255.; fragColor.a *= opacity; } -`,bqt=` +`,A$t=` precision highp float; varying vec4 fragColor; void main() { gl_FragColor = fragColor; } -`,_qt=` +`,M$t=` precision highp float; attribute vec2 aCoord, bCoord, nextCoord, prevCoord; @@ -2504,7 +2505,7 @@ void main() { } } } -`,wqt=` +`,S$t=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; @@ -2584,7 +2585,7 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } -`;KRe.exports=Bl;function Bl(e,t){if(!(this instanceof Bl))return new Bl(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=Bl.shaders.has(e)?Bl.shaders.get(e):Bl.shaders.set(e,Bl.createShaders(e)).get(e),this.update(t)}Bl.dashMult=2;Bl.maxPatternLength=256;Bl.precisionThreshold=3e6;Bl.maxPoints=1e4;Bl.maxLines=2048;Bl.shaders=new pqt;Bl.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e(Kj({vert:mqt,frag:yqt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),a;try{a=e(Kj({cull:{enable:!0,face:"back"},vert:_qt,frag:wqt,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){a=n}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:xqt,frag:bqt,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:a}};Bl.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};Bl.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};Bl.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>Bl.precisionThreshold||t.scale[1]*t.viewport.height>Bl.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=Bl.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};Bl.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((a,i)=>{let o=this.passes[i];if(a!==void 0){if(a===null){this.passes[i]=null;return}if(typeof a[0]=="number"&&(a={positions:a}),a=fqt(a,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[i]=o={id:i,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},a=Kj({},Bl.defaults,a)),a.thickness!=null&&(o.thickness=parseFloat(a.thickness)),a.opacity!=null&&(o.opacity=parseFloat(a.opacity)),a.miterLimit!=null&&(o.miterLimit=parseFloat(a.miterLimit)),a.overlay!=null&&(o.overlay=!!a.overlay,ik-y),E=[],M=0,w=o.hole!=null?o.hole[0]:null;if(w!=null){let k=gqt(g,y=>y>=w);g=g.slice(0,k),g.push(w)}for(let k=0;kp-w+(g[k]-M)),T=ZRe(y,S);T=T.map(p=>p+M+(p+M{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var rIe=ne((Cpr,tIe)=>{"use strict";var Tqt=A2(),Aqt=Hm(),Mqt=xj(),Sqt=s1(),JRe=Uc(),QRe=M2(),{float32:Eqt,fract32:Qj}=l9();tIe.exports=kqt;var eIe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function kqt(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,n,a,i,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:eIe}),d(t),n=e({vert:` +`;XUe.exports=al;function al(e,t){if(!(this instanceof al))return new al(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=al.shaders.has(e)?al.shaders.get(e):al.shaders.set(e,al.createShaders(e)).get(e),this.update(t)}al.dashMult=2;al.maxPatternLength=256;al.precisionThreshold=3e6;al.maxPoints=1e4;al.maxLines=2048;al.shaders=new x$t;al.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e($Z({vert:b$t,frag:w$t,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),a;try{a=e($Z({cull:{enable:!0,face:"back"},vert:M$t,frag:S$t,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){a=n}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:T$t,frag:A$t,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:a}};al.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};al.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};al.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>al.precisionThreshold||t.scale[1]*t.viewport.height>al.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=al.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};al.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((a,i)=>{let o=this.passes[i];if(a!==void 0){if(a===null){this.passes[i]=null;return}if(typeof a[0]=="number"&&(a={positions:a}),a=p$t(a,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),o||(this.passes[i]=o={id:i,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},a=$Z({},al.defaults,a)),a.thickness!=null&&(o.thickness=parseFloat(a.thickness)),a.opacity!=null&&(o.opacity=parseFloat(a.opacity)),a.miterLimit!=null&&(o.miterLimit=parseFloat(a.miterLimit)),a.overlay!=null&&(o.overlay=!!a.overlay,iL-w),C=[],k=0,S=o.hole!=null?o.hole[0]:null;if(S!=null){let L=_$t(y,w=>w>=S);y=y.slice(0,L),y.push(S)}for(let L=0;Lm-S+(y[L]-k)),T=WUe(w,A);T=T.map(m=>m+k+(m+k{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var QUe=fe((RTr,JUe)=>{"use strict";var E$t=l_(),k$t=wM(),C$t=yZ(),L$t=E1(),ZUe=Zc(),$Ue=u_(),{float32:P$t,fract32:JZ}=uF();JUe.exports=F$t;var KUe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function F$t(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,n,a,i,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:KUe}),p(t),n=e({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2628,10 +2629,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(x,g)=>[g.viewport.x,g.viewport.y,x.viewportWidth,x.viewportHeight]},attributes:{color:{buffer:o,offset:(x,g)=>g.offset*4,divisor:1},position:{buffer:a,offset:(x,g)=>g.offset*8,divisor:1},positionFract:{buffer:i,offset:(x,g)=>g.offset*8,divisor:1},error:{buffer:s,offset:(x,g)=>g.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:eIe.length}),JRe(f,{update:d,draw:h,destroy:m,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(x){x?d(x):x===null&&m(),h()}function h(x){if(typeof x=="number")return v(x);x&&!Array.isArray(x)&&(x=[x]),e._refresh(),c.forEach((g,E)=>{if(g){if(x&&(x[E]?g.draw=!0:g.draw=!1),!g.draw){g.draw=!0;return}v(E)}})}function v(x){typeof x=="number"&&(x=c[x]),x!=null&&x&&x.count&&x.color&&x.opacity&&x.positions&&x.positions.length>1&&(x.scaleRatio=[x.scale[0]*x.viewport.width,x.scale[1]*x.viewport.height],n(x),x.after&&x.after(x))}function d(x){if(!x)return;x.length!=null?typeof x[0]=="number"&&(x=[{positions:x}]):Array.isArray(x)||(x=[x]);let g=0,E=0;if(f.groups=c=x.map((k,y)=>{let S=c[y];if(k)typeof k=="function"?k={after:k}:typeof k[0]=="number"&&(k={positions:k});else return S;return k=Sqt(k,{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"}),S||(c[y]=S={id:y,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},k=JRe({},u,k)),Mqt(S,k,[{lineWidth:T=>+T*.5,capSize:T=>+T*.5,opacity:parseFloat,errors:T=>(T=QRe(T),E+=T.length,T),positions:(T,p)=>(T=QRe(T,"float64"),p.count=Math.floor(T.length/2),p.bounds=Tqt(T,2),p.offset=g,g+=p.count,T)},{color:(T,p)=>{let C=p.count;if(T||(T="transparent"),!Array.isArray(T)||typeof T[0]=="number"){let P=T;T=Array(C);for(let D=0;D{let A=p.bounds;return T||(T=A),p.scale=[1/(T[2]-T[0]),1/(T[3]-T[1])],p.translate=[-T[0],-T[1]],p.scaleFract=Qj(p.scale),p.translateFract=Qj(p.translate),T},viewport:T=>{let p;return Array.isArray(T)?p={x:T[0],y:T[1],width:T[2]-T[0],height:T[3]-T[1]}:T?(p={x:T.x||T.left||0,y:T.y||T.top||0},T.right?p.width=T.right-p.x:p.width=T.w||T.width||0,T.bottom?p.height=T.bottom-p.y:p.height=T.h||T.height||0):p={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},p}}]),S}),g||E){let k=c.reduce((p,C,A)=>p+(C?C.count:0),0),y=new Float64Array(k*2),S=new Uint8Array(k*4),T=new Float32Array(k*4);c.forEach((p,C)=>{if(!p)return;let{positions:A,count:P,offset:D,color:z,errors:q}=p;P&&(S.set(z,D*4),T.set(q,D*4),y.set(A,D*2))});var M=Eqt(y);a(M);var w=Qj(y,M);i(w),o(S),s(T)}}function m(){a.destroy(),i.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var iIe=ne((Lpr,aIe)=>{var nIe=/[\'\"]/;aIe.exports=function(t){return t?(nIe.test(t.charAt(0))&&(t=t.substr(1)),nIe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var eW=ne((Fpr,Cqt)=>{Cqt.exports=["inherit","initial","unset"]});var tW=ne((Ppr,Lqt)=>{Lqt.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var rW=ne((Dpr,Fqt)=>{Fqt.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var nW=ne((Rpr,Pqt)=>{Pqt.exports=["normal","italic","oblique"]});var aW=ne((Ipr,Dqt)=>{Dqt.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var uIe=ne((zpr,lIe)=>{"use strict";function oIe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",i=!!t.flat;n.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(h,v,d){var m=r.push(h.slice(l[0].length,-l[1].length))-1;return c.push(m),a+m+a}r.forEach(function(h,v){for(var d,m=0;h!=d;)if(d=h,h=h.replace(u,f),m++>1e4)throw Error("References have circular dependency. Please, check them.");r[v]=h}),c=c.reverse(),r=r.map(function(h){return c.forEach(function(v){h=h.replace(new RegExp("(\\"+a+v+"\\"+a+")","g"),l[0]+"$1"+l[1])}),h})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);function s(l,u,c){for(var f=[],h,v=0;h=o.exec(l);){if(v++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,h.index)),f.push(s(u[h[1]],u)),l=l.slice(h.index+h[0].length)}return f.push(l),f}return i?r:s(r[0],r)}function sIe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],a;if(!n)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;n!=a;){if(o++>1e4)throw Error("Circular references in "+e);a=n,n=n.replace(i,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function iW(e,t){return Array.isArray(e)?sIe(e,t):oIe(e,t)}iW.parse=oIe;iW.stringify=sIe;lIe.exports=iW});var hIe=ne((qpr,fIe)=>{"use strict";var cIe=uIe();fIe.exports=function(t,r,n){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");n?(typeof n=="string"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof n.ignore=="string"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var a=cIe.parse(t,{flat:!0,brackets:n.ignore}),i=a[0],o=i.split(r);if(n.escape){for(var s=[],l=0;l{Rqt.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var oW=ne((Opr,vIe)=>{"use strict";var Iqt=dIe();vIe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||Iqt.indexOf(t)!==-1}}});var yIe=ne((Npr,mIe)=>{"use strict";var zqt=iIe(),qqt=eW(),Bqt=tW(),Oqt=rW(),Nqt=nW(),Uqt=aW(),sW=hIe(),Vqt=oW().isSize;mIe.exports=gIe;var v6=gIe.cache={};function gIe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(v6[e])return v6[e];if(e==="")throw new Error("Cannot parse an empty string.");if(Bqt.indexOf(e)!==-1)return v6[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=sW(e,/\s+/),n;n=r.shift();){if(qqt.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(i){t[i]=n}),v6[e]=t;if(Nqt.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(Uqt.indexOf(n)!==-1){t.stretch=n;continue}if(Oqt.indexOf(n)!==-1){t.weight=n;continue}if(Vqt(n)){var a=sW(n,"/");if(t.size=a[0],a[1]!=null?t.lineHeight=pIe(a[1]):r[0]==="/"&&(r.shift(),t.lineHeight=pIe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=sW(r.join(" "),/\s*,\s*/).map(zqt),v6[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function pIe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var uW=ne((Upr,xIe)=>{"use strict";var Gqt=s1(),Hqt=oW().isSize,jqt=g6(eW()),Wqt=g6(tW()),Yqt=g6(rW()),Xqt=g6(nW()),Zqt=g6(aW()),$qt={normal:1,"small-caps":1},Kqt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},lW={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};xIe.exports=function(t){if(t=Gqt(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),t.system)return t.system&&p6(t.system,Wqt),t.system;if(p6(t.style,Xqt),p6(t.variant,$qt),p6(t.weight,Yqt),p6(t.stretch,Zqt),t.size==null&&(t.size=lW.size),typeof t.size=="number"&&(t.size+="px"),!Hqt)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=lW.family),Array.isArray(t.family)&&(t.family.length||(t.family=[lW.family]),t.family=t.family.map(function(n){return Kqt[n]?n:'"'+n+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function p6(e,t){if(e&&!t[e]&&!jqt[e])throw Error("Unknown keyword `"+e+"`");return e}function g6(e){for(var t={},r=0;r{"use strict";bIe.exports={parse:yIe(),stringify:uW()}});var wIe=ne((cW,fW)=>{(function(e,t){typeof cW=="object"&&typeof fW!="undefined"?fW.exports=t():e.createREGL=t()})(cW,(function(){"use strict";var e=function(pe,ot){for(var ht=Object.keys(ot),Kt=0;Kt1&&ot===ht&&(ot==='"'||ot==="'"))return['"'+o(pe.substr(1,pe.length-2))+'"'];var Kt=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(pe);if(Kt)return s(pe.substr(0,Kt.index)).concat(s(Kt[1])).concat(s(pe.substr(Kt.index+Kt[0].length)));var cr=pe.split(".");if(cr.length===1)return['"'+o(pe)+'"'];for(var dr=[],ur=0;ur65535)<<4,pe>>>=ot,ht=(pe>255)<<3,pe>>>=ht,ot|=ht,ht=(pe>15)<<2,pe>>>=ht,ot|=ht,ht=(pe>3)<<1,pe>>>=ht,ot|=ht,ot|pe>>1}function R(){var pe=T(8,function(){return[]});function ot(dr){var ur=U(dr),Rr=pe[O(ur)>>2];return Rr.length>0?Rr.pop():new ArrayBuffer(ur)}function ht(dr){pe[O(dr.byteLength)>>2].push(dr)}function Kt(dr,ur){var Rr=null;switch(dr){case p:Rr=new Int8Array(ot(ur),0,ur);break;case C:Rr=new Uint8Array(ot(ur),0,ur);break;case A:Rr=new Int16Array(ot(2*ur),0,ur);break;case P:Rr=new Uint16Array(ot(2*ur),0,ur);break;case D:Rr=new Int32Array(ot(4*ur),0,ur);break;case z:Rr=new Uint32Array(ot(4*ur),0,ur);break;case q:Rr=new Float32Array(ot(4*ur),0,ur);break;default:return null}return Rr.length!==ur?Rr.subarray(0,ur):Rr}function cr(dr){ht(dr.buffer)}return{alloc:ot,free:ht,allocType:Kt,freeType:cr}}var B=R();B.zero=R();var Y=3408,X=3410,te=3411,se=3412,ue=3413,re=3414,j=3415,fe=33901,ce=33902,oe=3379,we=3386,he=34921,ye=36347,Pe=36348,le=35661,ze=35660,Xe=34930,vt=36349,st=34076,Oe=34024,qe=7936,mt=7937,lt=7938,Ie=35724,de=34047,Ee=36063,Ue=34852,ge=3553,Ge=34067,tt=34069,ft=33984,He=6408,Qe=5126,We=5121,pt=36160,kt=36053,qt=36064,Wt=16384,_r=function(pe,ot){var ht=1;ot.ext_texture_filter_anisotropic&&(ht=pe.getParameter(de));var Kt=1,cr=1;ot.webgl_draw_buffers&&(Kt=pe.getParameter(Ue),cr=pe.getParameter(Ee));var dr=!!ot.oes_texture_float;if(dr){var ur=pe.createTexture();pe.bindTexture(ge,ur),pe.texImage2D(ge,0,He,1,1,0,He,Qe,null);var Rr=pe.createFramebuffer();if(pe.bindFramebuffer(pt,Rr),pe.framebufferTexture2D(pt,qt,ge,ur,0),pe.bindTexture(ge,null),pe.checkFramebufferStatus(pt)!==kt)dr=!1;else{pe.viewport(0,0,1,1),pe.clearColor(1,0,0,1),pe.clear(Wt);var Xr=B.allocType(Qe,4);pe.readPixels(0,0,1,1,He,Qe,Xr),pe.getError()?dr=!1:(pe.deleteFramebuffer(Rr),pe.deleteTexture(ur),dr=Xr[0]===1),B.freeType(Xr)}}var $r=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Kr=!0;if(!$r){var Hn=pe.createTexture(),Cn=B.allocType(We,36);pe.activeTexture(ft),pe.bindTexture(Ge,Hn),pe.texImage2D(tt,0,He,3,3,0,He,We,Cn),B.freeType(Cn),pe.bindTexture(Ge,null),pe.deleteTexture(Hn),Kr=!pe.getError()}return{colorBits:[pe.getParameter(X),pe.getParameter(te),pe.getParameter(se),pe.getParameter(ue)],depthBits:pe.getParameter(re),stencilBits:pe.getParameter(j),subpixelBits:pe.getParameter(Y),extensions:Object.keys(ot).filter(function(fn){return!!ot[fn]}),maxAnisotropic:ht,maxDrawbuffers:Kt,maxColorAttachments:cr,pointSizeDims:pe.getParameter(fe),lineWidthDims:pe.getParameter(ce),maxViewportDims:pe.getParameter(we),maxCombinedTextureUnits:pe.getParameter(le),maxCubeMapSize:pe.getParameter(st),maxRenderbufferSize:pe.getParameter(Oe),maxTextureUnits:pe.getParameter(Xe),maxTextureSize:pe.getParameter(oe),maxAttributes:pe.getParameter(he),maxVertexUniforms:pe.getParameter(ye),maxVertexTextureUnits:pe.getParameter(ze),maxVaryingVectors:pe.getParameter(Pe),maxFragmentUniforms:pe.getParameter(vt),glsl:pe.getParameter(Ie),renderer:pe.getParameter(mt),vendor:pe.getParameter(qe),version:pe.getParameter(lt),readFloat:dr,npotTextureCube:Kr}},tr=function(pe){return pe instanceof Uint8Array||pe instanceof Uint16Array||pe instanceof Uint32Array||pe instanceof Int8Array||pe instanceof Int16Array||pe instanceof Int32Array||pe instanceof Float32Array||pe instanceof Float64Array||pe instanceof Uint8ClampedArray};function lr(pe){return!!pe&&typeof pe=="object"&&Array.isArray(pe.shape)&&Array.isArray(pe.stride)&&typeof pe.offset=="number"&&pe.shape.length===pe.stride.length&&(Array.isArray(pe.data)||tr(pe.data))}var Ye=function(pe){return Object.keys(pe).map(function(ot){return pe[ot]})},Te={shape:_t,flatten:Ke};function Fe(pe,ot,ht){for(var Kt=0;Kt0){var Gn;if(Array.isArray(pr[0])){sn=un(pr);for(var kr=1,Mr=1;Mr0){if(typeof kr[0]=="number"){var Jr=B.allocType(Cr.dtype,kr.length);no(Jr,kr),sn(Jr,_n),B.freeType(Jr)}else if(Array.isArray(kr[0])||tr(kr[0])){an=un(kr);var Qr=Qn(kr,an,Cr.dtype);sn(Qr,_n),B.freeType(Qr)}}}else if(lr(kr)){an=kr.shape;var wn=kr.stride,jn=0,oa=0,rn=0,Sn=0;an.length===1?(jn=an[0],oa=1,rn=wn[0],Sn=0):an.length===2&&(jn=an[0],oa=an[1],rn=wn[0],Sn=wn[1]);var sa=Array.isArray(kr.data)?Cr.dtype:pa(kr.data),ca=B.allocType(sa,jn*oa);Gi(ca,kr.data,jn,oa,rn,Sn,kr.offset),sn(ca,_n),B.freeType(ca)}return hn}return Ir||hn(Ut),hn._reglType="buffer",hn._buffer=Cr,hn.subdata=Gn,ht.profile&&(hn.stats=Cr.stats),hn.destroy=function(){Cn(Cr)},hn}function Sr(){Ye(dr).forEach(function(Ut){Ut.buffer=pe.createBuffer(),pe.bindBuffer(Ut.type,Ut.buffer),pe.bufferData(Ut.type,Ut.persistentData||Ut.byteLength,Ut.usage)})}return ht.profile&&(ot.getTotalBufferSize=function(){var Ut=0;return Object.keys(dr).forEach(function(pr){Ut+=dr[pr].stats.size}),Ut}),{create:fn,createStream:Xr,destroyStream:$r,clear:function(){Ye(dr).forEach(Cn),Rr.forEach(Cn)},getBuffer:function(Ut){return Ut&&Ut._buffer instanceof ur?Ut._buffer:null},restore:Sr,_initBuffer:Hn}}var fi=0,_o=0,Oi=1,ni=1,ao=4,Hi=4,to={points:fi,point:_o,lines:Oi,line:ni,triangles:ao,triangle:Hi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Xo=0,Zo=1,Fi=4,yo=5120,oo=5121,rl=5122,Ni=5123,Oa=5124,xi=5125,Pi=34963,ia=35040,rt=35044;function Xt(pe,ot,ht,Kt){var cr={},dr=0,ur={uint8:oo,uint16:Ni};ot.oes_element_index_uint&&(ur.uint32=xi);function Rr(Sr){this.id=dr++,cr[this.id]=this,this.buffer=Sr,this.primType=Fi,this.vertCount=0,this.type=0}Rr.prototype.bind=function(){this.buffer.bind()};var Xr=[];function $r(Sr){var Ut=Xr.pop();return Ut||(Ut=new Rr(ht.create(null,Pi,!0,!1)._buffer)),Hn(Ut,Sr,ia,-1,-1,0,0),Ut}function Kr(Sr){Xr.push(Sr)}function Hn(Sr,Ut,pr,Ir,Zr,Cr,hn){Sr.buffer.bind();var sn;if(Ut){var Gn=hn;!hn&&(!tr(Ut)||lr(Ut)&&!tr(Ut.data))&&(Gn=ot.oes_element_index_uint?xi:Ni),ht._initBuffer(Sr.buffer,Ut,pr,Gn,3)}else pe.bufferData(Pi,Cr,pr),Sr.buffer.dtype=sn||oo,Sr.buffer.usage=pr,Sr.buffer.dimension=3,Sr.buffer.byteLength=Cr;if(sn=hn,!hn){switch(Sr.buffer.dtype){case oo:case yo:sn=oo;break;case Ni:case rl:sn=Ni;break;case xi:case Oa:sn=xi;break;default:}Sr.buffer.dtype=sn}Sr.type=sn;var kr=Zr;kr<0&&(kr=Sr.buffer.byteLength,sn===Ni?kr>>=1:sn===xi&&(kr>>=2)),Sr.vertCount=kr;var Mr=Ir;if(Ir<0){Mr=Fi;var _n=Sr.buffer.dimension;_n===1&&(Mr=Xo),_n===2&&(Mr=Zo),_n===3&&(Mr=Fi)}Sr.primType=Mr}function Cn(Sr){Kt.elementsCount--,delete cr[Sr.id],Sr.buffer.destroy(),Sr.buffer=null}function fn(Sr,Ut){var pr=ht.create(null,Pi,!0),Ir=new Rr(pr._buffer);Kt.elementsCount++;function Zr(Cr){if(!Cr)pr(),Ir.primType=Fi,Ir.vertCount=0,Ir.type=oo;else if(typeof Cr=="number")pr(Cr),Ir.primType=Fi,Ir.vertCount=Cr|0,Ir.type=oo;else{var hn=null,sn=rt,Gn=-1,kr=-1,Mr=0,_n=0;Array.isArray(Cr)||tr(Cr)||lr(Cr)?hn=Cr:("data"in Cr&&(hn=Cr.data),"usage"in Cr&&(sn=Kn[Cr.usage]),"primitive"in Cr&&(Gn=to[Cr.primitive]),"count"in Cr&&(kr=Cr.count|0),"type"in Cr&&(_n=ur[Cr.type]),"length"in Cr?Mr=Cr.length|0:(Mr=kr,_n===Ni||_n===rl?Mr*=2:(_n===xi||_n===Oa)&&(Mr*=4))),Hn(Ir,hn,sn,Gn,kr,Mr,_n)}return Zr}return Zr(Sr),Zr._reglType="elements",Zr._elements=Ir,Zr.subdata=function(Cr,hn){return pr.subdata(Cr,hn),Zr},Zr.destroy=function(){Cn(Ir)},Zr}return{create:fn,createStream:$r,destroyStream:Kr,getElements:function(Sr){return typeof Sr=="function"&&Sr._elements instanceof Rr?Sr._elements:null},clear:function(){Ye(cr).forEach(Cn)}}}var xr=new Float32Array(1),Fr=new Uint32Array(xr.buffer),xn=5123;function Mn(pe){for(var ot=B.allocType(xn,pe.length),ht=0;ht>>31<<15,dr=(Kt<<1>>>24)-127,ur=Kt>>13&1023;if(dr<-24)ot[ht]=cr;else if(dr<-14){var Rr=-14-dr;ot[ht]=cr+(ur+1024>>Rr)}else dr>15?ot[ht]=cr+31744:ot[ht]=cr+(dr+15<<10)+ur}return ot}function Rn(pe){return Array.isArray(pe)||tr(pe)}var on=34467,En=3553,Aa=34067,ba=34069,Ia=6408,hi=6406,ki=6407,ui=6409,Mi=6410,_i=32854,ko=32855,Io=36194,$o=32819,Is=32820,Es=33635,Ks=34042,nl=6402,ks=34041,us=35904,xs=35906,Co=36193,Si=33776,io=33777,Bs=33778,Fl=33779,Eu=35986,Cs=35987,Nl=34798,du=35840,Kl=35841,al=35842,co=35843,Ul=36196,Ls=5121,il=5123,_c=5125,Os=5126,Vu=10242,kf=10243,Jl=10497,th=33071,wc=33648,Cf=10240,Rd=10241,ol=9728,af=9729,ec=9984,Tc=9985,vu=9986,jc=9987,Lf=33170,tc=4352,Lh=4353,of=4354,Ff=34046,Pf=3317,rh=37440,Fh=37441,pu=37443,gu=37444,mu=33984,Ql=[ec,vu,Tc,jc],as=[0,ui,Mi,ki,Ia],fo={};fo[ui]=fo[hi]=fo[nl]=1,fo[ks]=fo[Mi]=2,fo[ki]=fo[us]=3,fo[Ia]=fo[xs]=4;function Ns(pe){return"[object "+pe+"]"}var ku=Ns("HTMLCanvasElement"),rc=Ns("OffscreenCanvas"),sf=Ns("CanvasRenderingContext2D"),is=Ns("ImageBitmap"),Xh=Ns("HTMLImageElement"),Wi=Ns("HTMLVideoElement"),Zh=Object.keys(St).concat([ku,rc,sf,is,Xh,Wi]),so=[];so[Ls]=1,so[Os]=4,so[Co]=2,so[il]=2,so[_c]=4;var ei=[];ei[_i]=2,ei[ko]=2,ei[Io]=2,ei[ks]=4,ei[Si]=.5,ei[io]=.5,ei[Bs]=1,ei[Fl]=1,ei[Eu]=.5,ei[Cs]=1,ei[Nl]=1,ei[du]=.5,ei[Kl]=.25,ei[al]=.5,ei[co]=.25,ei[Ul]=.5;function nc(pe){return Array.isArray(pe)&&(pe.length===0||typeof pe[0]=="number")}function Wc(pe){if(!Array.isArray(pe))return!1;var ot=pe.length;return!(ot===0||!Rn(pe[0]))}function _l(pe){return Object.prototype.toString.call(pe)}function nh(pe){return _l(pe)===ku}function Cu(pe){return _l(pe)===rc}function Ac(pe){return _l(pe)===sf}function Us(pe){return _l(pe)===is}function ah(pe){return _l(pe)===Xh}function Df(pe){return _l(pe)===Wi}function Mc(pe){if(!pe)return!1;var ot=_l(pe);return Zh.indexOf(ot)>=0?!0:nc(pe)||Wc(pe)||lr(pe)}function Sc(pe){return St[Object.prototype.toString.call(pe)]|0}function Rf(pe,ot){var ht=ot.length;switch(pe.type){case Ls:case il:case _c:case Os:var Kt=B.allocType(pe.type,ht);Kt.set(ot),pe.data=Kt;break;case Co:pe.data=Mn(ot);break;default:}}function If(pe,ot){return B.allocType(pe.type===Co?Os:pe.type,ot)}function eu(pe,ot){pe.type===Co?(pe.data=Mn(ot),B.freeType(ot)):pe.data=ot}function lf(pe,ot,ht,Kt,cr,dr){for(var ur=pe.width,Rr=pe.height,Xr=pe.channels,$r=ur*Rr*Xr,Kr=If(pe,$r),Hn=0,Cn=0;Cn=1;)Rr+=ur*Xr*Xr,Xr/=2;return Rr}else return ur*ht*Kt}function Ec(pe,ot,ht,Kt,cr,dr,ur){var Rr={"don't care":tc,"dont care":tc,nice:of,fast:Lh},Xr={repeat:Jl,clamp:th,mirror:wc},$r={nearest:ol,linear:af},Kr=e({mipmap:jc,"nearest mipmap nearest":ec,"linear mipmap nearest":Tc,"nearest mipmap linear":vu,"linear mipmap linear":jc},$r),Hn={none:0,browser:gu},Cn={uint8:Ls,rgba4:$o,rgb565:Es,"rgb5 a1":Is},fn={alpha:hi,luminance:ui,"luminance alpha":Mi,rgb:ki,rgba:Ia,rgba4:_i,"rgb5 a1":ko,rgb565:Io},Sr={};ot.ext_srgb&&(fn.srgb=us,fn.srgba=xs),ot.oes_texture_float&&(Cn.float32=Cn.float=Os),ot.oes_texture_half_float&&(Cn.float16=Cn["half float"]=Co),ot.webgl_depth_texture&&(e(fn,{depth:nl,"depth stencil":ks}),e(Cn,{uint16:il,uint32:_c,"depth stencil":Ks})),ot.webgl_compressed_texture_s3tc&&e(Sr,{"rgb s3tc dxt1":Si,"rgba s3tc dxt1":io,"rgba s3tc dxt3":Bs,"rgba s3tc dxt5":Fl}),ot.webgl_compressed_texture_atc&&e(Sr,{"rgb atc":Eu,"rgba atc explicit alpha":Cs,"rgba atc interpolated alpha":Nl}),ot.webgl_compressed_texture_pvrtc&&e(Sr,{"rgb pvrtc 4bppv1":du,"rgb pvrtc 2bppv1":Kl,"rgba pvrtc 4bppv1":al,"rgba pvrtc 2bppv1":co}),ot.webgl_compressed_texture_etc1&&(Sr["rgb etc1"]=Ul);var Ut=Array.prototype.slice.call(pe.getParameter(on));Object.keys(Sr).forEach(function(it){var ir=Sr[it];Ut.indexOf(ir)>=0&&(fn[it]=ir)});var pr=Object.keys(fn);ht.textureFormats=pr;var Ir=[];Object.keys(fn).forEach(function(it){var ir=fn[it];Ir[ir]=it});var Zr=[];Object.keys(Cn).forEach(function(it){var ir=Cn[it];Zr[ir]=it});var Cr=[];Object.keys($r).forEach(function(it){var ir=$r[it];Cr[ir]=it});var hn=[];Object.keys(Kr).forEach(function(it){var ir=Kr[it];hn[ir]=it});var sn=[];Object.keys(Xr).forEach(function(it){var ir=Xr[it];sn[ir]=it});var Gn=pr.reduce(function(it,ir){var or=fn[ir];return or===ui||or===hi||or===ui||or===Mi||or===nl||or===ks||ot.ext_srgb&&(or===us||or===xs)?it[or]=or:or===ko||ir.indexOf("rgba")>=0?it[or]=Ia:it[or]=ki,it},{});function kr(){this.internalformat=Ia,this.format=Ia,this.type=Ls,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=gu,this.width=0,this.height=0,this.channels=0}function Mr(it,ir){it.internalformat=ir.internalformat,it.format=ir.format,it.type=ir.type,it.compressed=ir.compressed,it.premultiplyAlpha=ir.premultiplyAlpha,it.flipY=ir.flipY,it.unpackAlignment=ir.unpackAlignment,it.colorSpace=ir.colorSpace,it.width=ir.width,it.height=ir.height,it.channels=ir.channels}function _n(it,ir){if(!(typeof ir!="object"||!ir)){if("premultiplyAlpha"in ir&&(it.premultiplyAlpha=ir.premultiplyAlpha),"flipY"in ir&&(it.flipY=ir.flipY),"alignment"in ir&&(it.unpackAlignment=ir.alignment),"colorSpace"in ir&&(it.colorSpace=Hn[ir.colorSpace]),"type"in ir){var or=ir.type;it.type=Cn[or]}var Fn=it.width,Ga=it.height,Li=it.channels,Pn=!1;"shape"in ir?(Fn=ir.shape[0],Ga=ir.shape[1],ir.shape.length===3&&(Li=ir.shape[2],Pn=!0)):("radius"in ir&&(Fn=Ga=ir.radius),"width"in ir&&(Fn=ir.width),"height"in ir&&(Ga=ir.height),"channels"in ir&&(Li=ir.channels,Pn=!0)),it.width=Fn|0,it.height=Ga|0,it.channels=Li|0;var $e=!1;if("format"in ir){var ct=ir.format,Et=it.internalformat=fn[ct];it.format=Gn[Et],ct in Cn&&("type"in ir||(it.type=Cn[ct])),ct in Sr&&(it.compressed=!0),$e=!0}!Pn&&$e?it.channels=fo[it.format]:Pn&&!$e&&it.channels!==as[it.format]&&(it.format=it.internalformat=as[it.channels])}}function an(it){pe.pixelStorei(rh,it.flipY),pe.pixelStorei(Fh,it.premultiplyAlpha),pe.pixelStorei(pu,it.colorSpace),pe.pixelStorei(Pf,it.unpackAlignment)}function Jr(){kr.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Qr(it,ir){var or=null;if(Mc(ir)?or=ir:ir&&(_n(it,ir),"x"in ir&&(it.xOffset=ir.x|0),"y"in ir&&(it.yOffset=ir.y|0),Mc(ir.data)&&(or=ir.data)),ir.copy){var Fn=cr.viewportWidth,Ga=cr.viewportHeight;it.width=it.width||Fn-it.xOffset,it.height=it.height||Ga-it.yOffset,it.needsCopy=!0}else if(!or)it.width=it.width||1,it.height=it.height||1,it.channels=it.channels||4;else if(tr(or))it.channels=it.channels||4,it.data=or,!("type"in ir)&&it.type===Ls&&(it.type=Sc(or));else if(nc(or))it.channels=it.channels||4,Rf(it,or),it.alignment=1,it.needsFree=!0;else if(lr(or)){var Li=or.data;!Array.isArray(Li)&&it.type===Ls&&(it.type=Sc(Li));var Pn=or.shape,$e=or.stride,ct,Et,nr,vr,Ht,Nt;Pn.length===3?(nr=Pn[2],Nt=$e[2]):(nr=1,Nt=1),ct=Pn[0],Et=Pn[1],vr=$e[0],Ht=$e[1],it.alignment=1,it.width=ct,it.height=Et,it.channels=nr,it.format=it.internalformat=as[nr],it.needsFree=!0,lf(it,Li,vr,Ht,Nt,or.offset)}else if(nh(or)||Cu(or)||Ac(or))nh(or)||Cu(or)?it.element=or:it.element=or.canvas,it.width=it.element.width,it.height=it.element.height,it.channels=4;else if(Us(or))it.element=or,it.width=or.width,it.height=or.height,it.channels=4;else if(ah(or))it.element=or,it.width=or.naturalWidth,it.height=or.naturalHeight,it.channels=4;else if(Df(or))it.element=or,it.width=or.videoWidth,it.height=or.videoHeight,it.channels=4;else if(Wc(or)){var Pt=it.width||or[0].length,At=it.height||or.length,Lt=it.channels;Rn(or[0][0])?Lt=Lt||or[0][0].length:Lt=Lt||1;for(var dt=Te.shape(or),Jt=1,yr=0;yr>=Ga,or.height>>=Ga,Qr(or,Fn[Ga]),it.mipmask|=1<=0&&!("faces"in ir)&&(it.genMipmaps=!0)}if("mag"in ir){var Fn=ir.mag;it.magFilter=$r[Fn]}var Ga=it.wrapS,Li=it.wrapT;if("wrap"in ir){var Pn=ir.wrap;typeof Pn=="string"?Ga=Li=Xr[Pn]:Array.isArray(Pn)&&(Ga=Xr[Pn[0]],Li=Xr[Pn[1]])}else{if("wrapS"in ir){var $e=ir.wrapS;Ga=Xr[$e]}if("wrapT"in ir){var ct=ir.wrapT;Li=Xr[ct]}}if(it.wrapS=Ga,it.wrapT=Li,"anisotropic"in ir){var Et=ir.anisotropic;it.anisotropic=ir.anisotropic}if("mipmap"in ir){var nr=!1;switch(typeof ir.mipmap){case"string":it.mipmapHint=Rr[ir.mipmap],it.genMipmaps=!0,nr=!0;break;case"boolean":nr=it.genMipmaps=ir.mipmap;break;case"object":it.genMipmaps=!1,nr=!0;break;default:}nr&&!("min"in ir)&&(it.minFilter=ec)}}function es(it,ir){pe.texParameteri(ir,Rd,it.minFilter),pe.texParameteri(ir,Cf,it.magFilter),pe.texParameteri(ir,Vu,it.wrapS),pe.texParameteri(ir,kf,it.wrapT),ot.ext_texture_filter_anisotropic&&pe.texParameteri(ir,Ff,it.anisotropic),it.genMipmaps&&(pe.hint(Lf,it.mipmapHint),pe.generateMipmap(ir))}var Ds=0,Do={},Ro=ht.maxTextureUnits,Uo=Array(Ro).map(function(){return null});function Sa(it){kr.call(this),this.mipmask=0,this.internalformat=Ia,this.id=Ds++,this.refCount=1,this.target=it,this.texture=pe.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Ci,ur.profile&&(this.stats={size:0})}function ts(it){pe.activeTexture(mu),pe.bindTexture(it.target,it.texture)}function qi(){var it=Uo[0];it?pe.bindTexture(it.target,it.texture):pe.bindTexture(En,null)}function Hs(it){var ir=it.texture,or=it.unit,Fn=it.target;or>=0&&(pe.activeTexture(mu+or),pe.bindTexture(Fn,null),Uo[or]=null),pe.deleteTexture(ir),it.texture=null,it.params=null,it.pixels=null,it.refCount=0,delete Do[it.id],dr.textureCount--}e(Sa.prototype,{bind:function(){var it=this;it.bindCount+=1;var ir=it.unit;if(ir<0){for(var or=0;or0)continue;Fn.unit=-1}Uo[or]=it,ir=or;break}ir>=Ro,ur.profile&&dr.maxTextureUnits>Ht)-nr,Nt.height=Nt.height||(or.height>>Ht)-vr,ts(or),jn(Nt,En,nr,vr,Ht),qi(),Sn(Nt),Fn}function Li(Pn,$e){var ct=Pn|0,Et=$e|0||ct;if(ct===or.width&&Et===or.height)return Fn;Fn.width=or.width=ct,Fn.height=or.height=Et,ts(or);for(var nr=0;or.mipmask>>nr;++nr){var vr=ct>>nr,Ht=Et>>nr;if(!vr||!Ht)break;pe.texImage2D(En,nr,or.format,vr,Ht,0,or.format,or.type,null)}return qi(),ur.profile&&(or.stats.size=tu(or.internalformat,or.type,ct,Et,!1,!1)),Fn}return Fn(it,ir),Fn.subimage=Ga,Fn.resize=Li,Fn._reglType="texture2d",Fn._texture=or,ur.profile&&(Fn.stats=or.stats),Fn.destroy=function(){or.decRef()},Fn}function fl(it,ir,or,Fn,Ga,Li){var Pn=new Sa(Aa);Do[Pn.id]=Pn,dr.cubeCount++;var $e=new Array(6);function ct(vr,Ht,Nt,Pt,At,Lt){var dt,Jt=Pn.texInfo;for(Ci.call(Jt),dt=0;dt<6;++dt)$e[dt]=ja();if(typeof vr=="number"||!vr){var yr=vr|0||1;for(dt=0;dt<6;++dt)ca($e[dt],yr,yr)}else if(typeof vr=="object")if(Ht)Ra($e[0],vr),Ra($e[1],Ht),Ra($e[2],Nt),Ra($e[3],Pt),Ra($e[4],At),Ra($e[5],Lt);else if(Ts(Jt,vr),_n(Pn,vr),"faces"in vr){var Or=vr.faces;for(dt=0;dt<6;++dt)Mr($e[dt],Pn),Ra($e[dt],Or[dt])}else for(dt=0;dt<6;++dt)Ra($e[dt],vr);for(Mr(Pn,$e[0]),Jt.genMipmaps?Pn.mipmask=($e[0].width<<1)-1:Pn.mipmask=$e[0].mipmask,Pn.internalformat=$e[0].internalformat,ct.width=$e[0].width,ct.height=$e[0].height,ts(Pn),dt=0;dt<6;++dt)go($e[dt],ba+dt);for(es(Jt,Aa),qi(),ur.profile&&(Pn.stats.size=tu(Pn.internalformat,Pn.type,ct.width,ct.height,Jt.genMipmaps,!0)),ct.format=Ir[Pn.internalformat],ct.type=Zr[Pn.type],ct.mag=Cr[Jt.magFilter],ct.min=hn[Jt.minFilter],ct.wrapS=sn[Jt.wrapS],ct.wrapT=sn[Jt.wrapT],dt=0;dt<6;++dt)cl($e[dt]);return ct}function Et(vr,Ht,Nt,Pt,At){var Lt=Nt|0,dt=Pt|0,Jt=At|0,yr=rn();return Mr(yr,Pn),yr.width=0,yr.height=0,Qr(yr,Ht),yr.width=yr.width||(Pn.width>>Jt)-Lt,yr.height=yr.height||(Pn.height>>Jt)-dt,ts(Pn),jn(yr,ba+vr,Lt,dt,Jt),qi(),Sn(yr),ct}function nr(vr){var Ht=vr|0;if(Ht!==Pn.width){ct.width=Pn.width=Ht,ct.height=Pn.height=Ht,ts(Pn);for(var Nt=0;Nt<6;++Nt)for(var Pt=0;Pn.mipmask>>Pt;++Pt)pe.texImage2D(ba+Nt,Pt,Pn.format,Ht>>Pt,Ht>>Pt,0,Pn.format,Pn.type,null);return qi(),ur.profile&&(Pn.stats.size=tu(Pn.internalformat,Pn.type,ct.width,ct.height,!1,!0)),ct}}return ct(it,ir,or,Fn,Ga,Li),ct.subimage=Et,ct.resize=nr,ct._reglType="textureCube",ct._texture=Pn,ur.profile&&(ct.stats=Pn.stats),ct.destroy=function(){Pn.decRef()},ct}function ha(){for(var it=0;it>Fn,or.height>>Fn,0,or.internalformat,or.type,null);else for(var Ga=0;Ga<6;++Ga)pe.texImage2D(ba+Ga,Fn,or.internalformat,or.width>>Fn,or.height>>Fn,0,or.internalformat,or.type,null);es(or.texInfo,or.target)})}function ti(){for(var it=0;it=0?cl=!0:Xr.indexOf(Ci)>=0&&(cl=!1))),("depthTexture"in Sa||"depthStencilTexture"in Sa)&&(Uo=!!(Sa.depthTexture||Sa.depthStencilTexture)),"depth"in Sa&&(typeof Sa.depth=="boolean"?go=Sa.depth:(Ds=Sa.depth,No=!1)),"stencil"in Sa&&(typeof Sa.stencil=="boolean"?No=Sa.stencil:(Do=Sa.stencil,go=!1)),"depthStencil"in Sa&&(typeof Sa.depthStencil=="boolean"?go=No=Sa.depthStencil:(Ro=Sa.depthStencil,go=!1,No=!1))}var qi=null,Hs=null,js=null,fl=null;if(Array.isArray(ja))qi=ja.map(Sr);else if(ja)qi=[Sr(ja)];else for(qi=new Array(es),sa=0;sa0&&(Sn.depth=Qr[0].depth,Sn.stencil=Qr[0].stencil,Sn.depthStencil=Qr[0].depthStencil),Qr[rn]?Qr[rn](Sn):Qr[rn]=Mr(Sn)}return e(wn,{width:sa,height:sa,color:Ci})}function jn(oa){var rn,Sn=oa|0;if(Sn===wn.width)return wn;var sa=wn.color;for(rn=0;rn=sa.byteLength?ca.subdata(sa):(ca.destroy(),Mr.buffers[oa]=null)),Mr.buffers[oa]||(ca=Mr.buffers[oa]=cr.create(rn,qf,!1,!0)),Sn.buffer=cr.getBuffer(ca),Sn.size=Sn.buffer.dimension|0,Sn.normalized=!1,Sn.type=Sn.buffer.dtype,Sn.offset=0,Sn.stride=0,Sn.divisor=0,Sn.state=1,wn[oa]=1}else cr.getBuffer(rn)?(Sn.buffer=cr.getBuffer(rn),Sn.size=Sn.buffer.dimension|0,Sn.normalized=!1,Sn.type=Sn.buffer.dtype,Sn.offset=0,Sn.stride=0,Sn.divisor=0,Sn.state=1):cr.getBuffer(rn.buffer)?(Sn.buffer=cr.getBuffer(rn.buffer),Sn.size=(+rn.size||Sn.buffer.dimension)|0,Sn.normalized=!!rn.normalized||!1,"type"in rn?Sn.type=vn[rn.type]:Sn.type=Sn.buffer.dtype,Sn.offset=(rn.offset||0)|0,Sn.stride=(rn.stride||0)|0,Sn.divisor=(rn.divisor||0)|0,Sn.state=1):"x"in rn&&(Sn.x=+rn.x||0,Sn.y=+rn.y||0,Sn.z=+rn.z||0,Sn.w=+rn.w||0,Sn.state=2)}for(var Ra=0;Ra1)for(var an=0;anUt&&(Ut=pr.stats.uniformsCount)}),Ut},ht.getMaxAttributesCount=function(){var Ut=0;return Kr.forEach(function(pr){pr.stats.attributesCount>Ut&&(Ut=pr.stats.attributesCount)}),Ut});function Sr(){cr={},dr={};for(var Ut=0;Ut16&&(ht=tn(ht,pe.length*8));for(var Kt=Array(16),cr=Array(16),dr=0;dr<16;dr++)Kt[dr]=ht[dr]^909522486,cr[dr]=ht[dr]^1549556828;var ur=tn(Kt.concat(Wu(ot)),512+ot.length*8);return Je(tn(cr.concat(ur),768))}function Fu(pe){for(var ot=Qh?"0123456789ABCDEF":"0123456789abcdef",ht="",Kt,cr=0;cr>>4&15)+ot.charAt(Kt&15);return ht}function fh(pe){for(var ot="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ht="",Kt=pe.length,cr=0;crpe.length*8?ht+=hf:ht+=ot.charAt(dr>>>6*(3-ur)&63);return ht}function ed(pe,ot){var ht=ot.length,Kt=Array(),cr,dr,ur,Rr,Xr=Array(Math.ceil(pe.length/2));for(cr=0;cr0;){for(Rr=Array(),ur=0,cr=0;cr0||dr>0)&&(Rr[Rr.length]=dr);Kt[Kt.length]=ur,Xr=Rr}var $r="";for(cr=Kt.length-1;cr>=0;cr--)$r+=ot.charAt(Kt[cr]);var Kr=Math.ceil(pe.length*8/(Math.log(ot.length)/Math.log(2)));for(cr=$r.length;cr>>6&31,128|Kt&63):Kt<=65535?ot+=String.fromCharCode(224|Kt>>>12&15,128|Kt>>>6&63,128|Kt&63):Kt<=2097151&&(ot+=String.fromCharCode(240|Kt>>>18&7,128|Kt>>>12&63,128|Kt>>>6&63,128|Kt&63));return ot}function Wu(pe){for(var ot=Array(pe.length>>2),ht=0;ht>5]|=(pe.charCodeAt(ht/8)&255)<<24-ht%32;return ot}function Je(pe){for(var ot="",ht=0;ht>5]>>>24-ht%32&255);return ot}function yt(pe,ot){return pe>>>ot|pe<<32-ot}function Gt(pe,ot){return pe>>>ot}function Bt(pe,ot,ht){return pe&ot^~pe&ht}function mr(pe,ot,ht){return pe&ot^pe&ht^ot&ht}function Ur(pe){return yt(pe,2)^yt(pe,13)^yt(pe,22)}function en(pe){return yt(pe,6)^yt(pe,11)^yt(pe,25)}function mn(pe){return yt(pe,7)^yt(pe,18)^Gt(pe,3)}function An(pe){return yt(pe,17)^yt(pe,19)^Gt(pe,10)}var Vn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function tn(pe,ot){var ht=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Kt=new Array(64),cr,dr,ur,Rr,Xr,$r,Kr,Hn,Cn,fn,Sr,Ut;for(pe[ot>>5]|=128<<24-ot%32,pe[(ot+64>>9<<4)+15]=ot,Cn=0;Cn>16)+(ot>>16)+(ht>>16);return Kt<<16|ht&65535}function dn(pe){return Array.prototype.slice.call(pe)}function Wr(pe){return dn(pe).join("")}function ea(pe){var ot=pe&&pe.cache,ht=0,Kt=[],cr=[],dr=[];function ur(Sr,Ut){var pr=Ut&&Ut.stable;if(!pr){for(var Ir=0;Ir0&&(Sr.push(Zr,"="),Sr.push.apply(Sr,dn(arguments)),Sr.push(";")),Zr}return e(Ut,{def:Ir,toString:function(){return Wr([pr.length>0?"var "+pr.join(",")+";":"",Wr(Sr)])}})}function Xr(){var Sr=Rr(),Ut=Rr(),pr=Sr.toString,Ir=Ut.toString;function Zr(Cr,hn){Ut(Cr,hn,"=",Sr.def(Cr,hn),";")}return e(function(){Sr.apply(Sr,dn(arguments))},{def:Sr.def,entry:Sr,exit:Ut,save:Zr,set:function(Cr,hn,sn){Zr(Cr,hn),Sr(Cr,hn,"=",sn,";")},toString:function(){return pr()+Ir()}})}function $r(){var Sr=Wr(arguments),Ut=Xr(),pr=Xr(),Ir=Ut.toString,Zr=pr.toString;return e(Ut,{then:function(){return Ut.apply(Ut,dn(arguments)),this},else:function(){return pr.apply(pr,dn(arguments)),this},toString:function(){var Cr=Zr();return Cr&&(Cr="else{"+Cr+"}"),Wr(["if(",Sr,"){",Ir(),"}",Cr])}})}var Kr=Rr(),Hn={};function Cn(Sr,Ut){var pr=[];function Ir(){var Gn="a"+pr.length;return pr.push(Gn),Gn}Ut=Ut||0;for(var Zr=0;Zr[y.viewport.x,y.viewport.y,_.viewportWidth,_.viewportHeight]},attributes:{color:{buffer:o,offset:(_,y)=>y.offset*4,divisor:1},position:{buffer:a,offset:(_,y)=>y.offset*8,divisor:1},positionFract:{buffer:i,offset:(_,y)=>y.offset*8,divisor:1},error:{buffer:s,offset:(_,y)=>y.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,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:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:KUe.length}),ZUe(f,{update:p,draw:v,destroy:x,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(_){_?p(_):_===null&&x(),v()}function v(_){if(typeof _=="number")return g(_);_&&!Array.isArray(_)&&(_=[_]),e._refresh(),c.forEach((y,C)=>{if(y){if(_&&(_[C]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}g(C)}})}function g(_){typeof _=="number"&&(_=c[_]),_!=null&&_&&_.count&&_.color&&_.opacity&&_.positions&&_.positions.length>1&&(_.scaleRatio=[_.scale[0]*_.viewport.width,_.scale[1]*_.viewport.height],n(_),_.after&&_.after(_))}function p(_){if(!_)return;_.length!=null?typeof _[0]=="number"&&(_=[{positions:_}]):Array.isArray(_)||(_=[_]);let y=0,C=0;if(f.groups=c=_.map((L,w)=>{let A=c[w];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return A;return L=L$t(L,{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"}),A||(c[w]=A={id:w,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=ZUe({},u,L)),C$t(A,L,[{lineWidth:T=>+T*.5,capSize:T=>+T*.5,opacity:parseFloat,errors:T=>(T=$Ue(T),C+=T.length,T),positions:(T,m)=>(T=$Ue(T,"float64"),m.count=Math.floor(T.length/2),m.bounds=E$t(T,2),m.offset=y,y+=m.count,T)},{color:(T,m)=>{let F=m.count;if(T||(T="transparent"),!Array.isArray(T)||typeof T[0]=="number"){let I=T;T=Array(F);for(let R=0;R{let E=m.bounds;return T||(T=E),m.scale=[1/(T[2]-T[0]),1/(T[3]-T[1])],m.translate=[-T[0],-T[1]],m.scaleFract=JZ(m.scale),m.translateFract=JZ(m.translate),T},viewport:T=>{let m;return Array.isArray(T)?m={x:T[0],y:T[1],width:T[2]-T[0],height:T[3]-T[1]}:T?(m={x:T.x||T.left||0,y:T.y||T.top||0},T.right?m.width=T.right-m.x:m.width=T.w||T.width||0,T.bottom?m.height=T.bottom-m.y:m.height=T.h||T.height||0):m={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},m}}]),A}),y||C){let L=c.reduce((m,F,E)=>m+(F?F.count:0),0),w=new Float64Array(L*2),A=new Uint8Array(L*4),T=new Float32Array(L*4);c.forEach((m,F)=>{if(!m)return;let{positions:E,count:I,offset:R,color:B,errors:O}=m;I&&(A.set(B,R*4),T.set(O,R*4),w.set(E,R*2))});var k=P$t(w);a(k);var S=JZ(w,k);i(S),o(A),s(T)}}function x(){a.destroy(),i.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var rVe=fe((ITr,tVe)=>{var eVe=/[\'\"]/;tVe.exports=function(t){return t?(eVe.test(t.charAt(0))&&(t=t.substr(1)),eVe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var QZ=fe((zTr,D$t)=>{D$t.exports=["inherit","initial","unset"]});var e$=fe((qTr,R$t)=>{R$t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var t$=fe((BTr,I$t)=>{I$t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var r$=fe((OTr,z$t)=>{z$t.exports=["normal","italic","oblique"]});var n$=fe((NTr,q$t)=>{q$t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var oVe=fe((UTr,aVe)=>{"use strict";function nVe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",i=!!t.flat;n.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(v,g,p){var x=r.push(v.slice(l[0].length,-l[1].length))-1;return c.push(x),a+x+a}r.forEach(function(v,g){for(var p,x=0;v!=p;)if(p=v,v=v.replace(u,f),x++>1e4)throw Error("References have circular dependency. Please, check them.");r[g]=v}),c=c.reverse(),r=r.map(function(v){return c.forEach(function(g){v=v.replace(new RegExp("(\\"+a+g+"\\"+a+")","g"),l[0]+"$1"+l[1])}),v})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);function s(l,u,c){for(var f=[],v,g=0;v=o.exec(l);){if(g++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,v.index)),f.push(s(u[v[1]],u)),l=l.slice(v.index+v[0].length)}return f.push(l),f}return i?r:s(r[0],r)}function iVe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],a;if(!n)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;n!=a;){if(o++>1e4)throw Error("Circular references in "+e);a=n,n=n.replace(i,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function i$(e,t){return Array.isArray(e)?iVe(e,t):nVe(e,t)}i$.parse=nVe;i$.stringify=iVe;aVe.exports=i$});var uVe=fe((VTr,lVe)=>{"use strict";var sVe=oVe();lVe.exports=function(t,r,n){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");n?(typeof n=="string"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof n.ignore=="string"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var a=sVe.parse(t,{flat:!0,brackets:n.ignore}),i=a[0],o=i.split(r);if(n.escape){for(var s=[],l=0;l{B$t.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var a$=fe((HTr,fVe)=>{"use strict";var O$t=cVe();fVe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||O$t.indexOf(t)!==-1}}});var pVe=fe((jTr,vVe)=>{"use strict";var N$t=rVe(),U$t=QZ(),V$t=e$(),G$t=t$(),H$t=r$(),j$t=n$(),o$=uVe(),W$t=a$().isSize;vVe.exports=dVe;var DM=dVe.cache={};function dVe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(DM[e])return DM[e];if(e==="")throw new Error("Cannot parse an empty string.");if(V$t.indexOf(e)!==-1)return DM[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=o$(e,/\s+/),n;n=r.shift();){if(U$t.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(i){t[i]=n}),DM[e]=t;if(H$t.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(j$t.indexOf(n)!==-1){t.stretch=n;continue}if(G$t.indexOf(n)!==-1){t.weight=n;continue}if(W$t(n)){var a=o$(n,"/");if(t.size=a[0],a[1]!=null?t.lineHeight=hVe(a[1]):r[0]==="/"&&(r.shift(),t.lineHeight=hVe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=o$(r.join(" "),/\s*,\s*/).map(N$t),DM[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function hVe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var l$=fe((WTr,gVe)=>{"use strict";var Y$t=E1(),X$t=a$().isSize,Z$t=IM(QZ()),$$t=IM(e$()),K$t=IM(t$()),J$t=IM(r$()),Q$t=IM(n$()),eKt={normal:1,"small-caps":1},tKt={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},s$={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};gVe.exports=function(t){if(t=Y$t(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),t.system)return t.system&&RM(t.system,$$t),t.system;if(RM(t.style,J$t),RM(t.variant,eKt),RM(t.weight,K$t),RM(t.stretch,Q$t),t.size==null&&(t.size=s$.size),typeof t.size=="number"&&(t.size+="px"),!X$t)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=s$.family),Array.isArray(t.family)&&(t.family.length||(t.family=[s$.family]),t.family=t.family.map(function(n){return tKt[n]?n:'"'+n+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function RM(e,t){if(e&&!t[e]&&!Z$t[e])throw Error("Unknown keyword `"+e+"`");return e}function IM(e){for(var t={},r=0;r{"use strict";mVe.exports={parse:pVe(),stringify:l$()}});var f$=fe((u$,c$)=>{(function(e,t){typeof u$=="object"&&typeof c$!="undefined"?c$.exports=t():e.createREGL=t()})(u$,(function(){"use strict";var e=function(Pe,Xe){for(var at=Object.keys(Xe),xt=0;xt1&&Xe===at&&(Xe==='"'||Xe==="'"))return['"'+o(Pe.substr(1,Pe.length-2))+'"'];var xt=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Pe);if(xt)return s(Pe.substr(0,xt.index)).concat(s(xt[1])).concat(s(Pe.substr(xt.index+xt[0].length)));var Et=Pe.split(".");if(Et.length===1)return['"'+o(Pe)+'"'];for(var Bt=[],St=0;St65535)<<4,Pe>>>=Xe,at=(Pe>255)<<3,Pe>>>=at,Xe|=at,at=(Pe>15)<<2,Pe>>>=at,Xe|=at,at=(Pe>3)<<1,Pe>>>=at,Xe|=at,Xe|Pe>>1}function q(){var Pe=T(8,function(){return[]});function Xe(Bt){var St=V(Bt),Pt=Pe[j(St)>>2];return Pt.length>0?Pt.pop():new ArrayBuffer(St)}function at(Bt){Pe[j(Bt.byteLength)>>2].push(Bt)}function xt(Bt,St){var Pt=null;switch(Bt){case m:Pt=new Int8Array(Xe(St),0,St);break;case F:Pt=new Uint8Array(Xe(St),0,St);break;case E:Pt=new Int16Array(Xe(2*St),0,St);break;case I:Pt=new Uint16Array(Xe(2*St),0,St);break;case R:Pt=new Int32Array(Xe(4*St),0,St);break;case B:Pt=new Uint32Array(Xe(4*St),0,St);break;case O:Pt=new Float32Array(Xe(4*St),0,St);break;default:return null}return Pt.length!==St?Pt.subarray(0,St):Pt}function Et(Bt){at(Bt.buffer)}return{alloc:Xe,free:at,allocType:xt,freeType:Et}}var U=q();U.zero=q();var J=3408,ee=3410,ce=3411,ye=3412,xe=3413,ue=3414,K=3415,_e=33901,ne=33902,ae=3379,pe=3386,ie=34921,le=36347,me=36348,be=35661,De=35660,Ge=34930,ht=36349,it=34076,Oe=34024,ze=7936,ct=7937,et=7938,qe=35724,we=34047,Le=36063,Ke=34852,Te=3553,Ve=34067,$e=34069,ot=33984,tt=6408,nt=5126,We=5121,mt=36160,bt=36053,Yt=36064,jt=16384,mr=function(Pe,Xe){var at=1;Xe.ext_texture_filter_anisotropic&&(at=Pe.getParameter(we));var xt=1,Et=1;Xe.webgl_draw_buffers&&(xt=Pe.getParameter(Ke),Et=Pe.getParameter(Le));var Bt=!!Xe.oes_texture_float;if(Bt){var St=Pe.createTexture();Pe.bindTexture(Te,St),Pe.texImage2D(Te,0,tt,1,1,0,tt,nt,null);var Pt=Pe.createFramebuffer();if(Pe.bindFramebuffer(mt,Pt),Pe.framebufferTexture2D(mt,Yt,Te,St,0),Pe.bindTexture(Te,null),Pe.checkFramebufferStatus(mt)!==bt)Bt=!1;else{Pe.viewport(0,0,1,1),Pe.clearColor(1,0,0,1),Pe.clear(jt);var $t=U.allocType(nt,4);Pe.readPixels(0,0,1,1,tt,nt,$t),Pe.getError()?Bt=!1:(Pe.deleteFramebuffer(Pt),Pe.deleteTexture(St),Bt=$t[0]===1),U.freeType($t)}}var Ht=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),dr=!0;if(!Ht){var Xr=Pe.createTexture(),Or=U.allocType(We,36);Pe.activeTexture(ot),Pe.bindTexture(Ve,Xr),Pe.texImage2D($e,0,tt,3,3,0,tt,We,Or),U.freeType(Or),Pe.bindTexture(Ve,null),Pe.deleteTexture(Xr),dr=!Pe.getError()}return{colorBits:[Pe.getParameter(ee),Pe.getParameter(ce),Pe.getParameter(ye),Pe.getParameter(xe)],depthBits:Pe.getParameter(ue),stencilBits:Pe.getParameter(K),subpixelBits:Pe.getParameter(J),extensions:Object.keys(Xe).filter(function($r){return!!Xe[$r]}),maxAnisotropic:at,maxDrawbuffers:xt,maxColorAttachments:Et,pointSizeDims:Pe.getParameter(_e),lineWidthDims:Pe.getParameter(ne),maxViewportDims:Pe.getParameter(pe),maxCombinedTextureUnits:Pe.getParameter(be),maxCubeMapSize:Pe.getParameter(it),maxRenderbufferSize:Pe.getParameter(Oe),maxTextureUnits:Pe.getParameter(Ge),maxTextureSize:Pe.getParameter(ae),maxAttributes:Pe.getParameter(ie),maxVertexUniforms:Pe.getParameter(le),maxVertexTextureUnits:Pe.getParameter(De),maxVaryingVectors:Pe.getParameter(me),maxFragmentUniforms:Pe.getParameter(ht),glsl:Pe.getParameter(qe),renderer:Pe.getParameter(ct),vendor:Pe.getParameter(ze),version:Pe.getParameter(et),readFloat:Bt,npotTextureCube:dr}},or=function(Pe){return Pe instanceof Uint8Array||Pe instanceof Uint16Array||Pe instanceof Uint32Array||Pe instanceof Int8Array||Pe instanceof Int16Array||Pe instanceof Int32Array||Pe instanceof Float32Array||Pe instanceof Float64Array||Pe instanceof Uint8ClampedArray};function fr(Pe){return!!Pe&&typeof Pe=="object"&&Array.isArray(Pe.shape)&&Array.isArray(Pe.stride)&&typeof Pe.offset=="number"&&Pe.shape.length===Pe.stride.length&&(Array.isArray(Pe.data)||or(Pe.data))}var Ot=function(Pe){return Object.keys(Pe).map(function(Xe){return Pe[Xe]})},cr={shape:ft,flatten:Lt};function Ct(Pe,Xe,at){for(var xt=0;xt0){var yi;if(Array.isArray(Rr[0])){Yn=Ut(Rr);for(var Sn=1,An=1;An0){if(typeof Sn[0]=="number"){var jn=U.allocType(on.dtype,Sn.length);Ii(jn,Sn),Yn(jn,li),U.freeType(jn)}else if(Array.isArray(Sn[0])||or(Sn[0])){Vn=Ut(Sn);var Wn=Qt(Sn,Vn,on.dtype);Yn(Wn,li),U.freeType(Wn)}}}else if(fr(Sn)){Vn=Sn.shape;var si=Sn.stride,zi=0,da=0,ui=0,Li=0;Vn.length===1?(zi=Vn[0],da=1,ui=si[0],Li=0):Vn.length===2&&(zi=Vn[0],da=Vn[1],ui=si[0],Li=si[1]);var Ki=Array.isArray(Sn.data)?on.dtype:Jn(Sn.data),ca=U.allocType(Ki,zi*da);Vi(ca,Sn.data,zi,da,ui,Li,Sn.offset),Yn(ca,li),U.freeType(ca)}return Nn}return Lr||Nn(Tr),Nn._reglType="buffer",Nn._buffer=on,Nn.subdata=yi,at.profile&&(Nn.stats=on.stats),Nn.destroy=function(){Or(on)},Nn}function Er(){Ot(Bt).forEach(function(Tr){Tr.buffer=Pe.createBuffer(),Pe.bindBuffer(Tr.type,Tr.buffer),Pe.bufferData(Tr.type,Tr.persistentData||Tr.byteLength,Tr.usage)})}return at.profile&&(Xe.getTotalBufferSize=function(){var Tr=0;return Object.keys(Bt).forEach(function(Rr){Tr+=Bt[Rr].stats.size}),Tr}),{create:$r,createStream:$t,destroyStream:Ht,clear:function(){Ot(Bt).forEach(Or),Pt.forEach(Or)},getBuffer:function(Tr){return Tr&&Tr._buffer instanceof St?Tr._buffer:null},restore:Er,_initBuffer:Xr}}var ha=0,va=0,Xi=1,oa=1,Ma=4,Ga=4,ss={points:ha,point:va,lines:Xi,line:oa,triangles:Ma,triangle:Ga,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},mo=0,sl=1,Eo=4,ao=5120,Da=5121,bl=5122,bo=5123,Zs=5124,su=5125,fc=34963,Af=35040,ut=35044;function Jt(Pe,Xe,at,xt){var Et={},Bt=0,St={uint8:Da,uint16:bo};Xe.oes_element_index_uint&&(St.uint32=su);function Pt(Er){this.id=Bt++,Et[this.id]=this,this.buffer=Er,this.primType=Eo,this.vertCount=0,this.type=0}Pt.prototype.bind=function(){this.buffer.bind()};var $t=[];function Ht(Er){var Tr=$t.pop();return Tr||(Tr=new Pt(at.create(null,fc,!0,!1)._buffer)),Xr(Tr,Er,Af,-1,-1,0,0),Tr}function dr(Er){$t.push(Er)}function Xr(Er,Tr,Rr,Lr,an,on,Nn){Er.buffer.bind();var Yn;if(Tr){var yi=Nn;!Nn&&(!or(Tr)||fr(Tr)&&!or(Tr.data))&&(yi=Xe.oes_element_index_uint?su:bo),at._initBuffer(Er.buffer,Tr,Rr,yi,3)}else Pe.bufferData(fc,on,Rr),Er.buffer.dtype=Yn||Da,Er.buffer.usage=Rr,Er.buffer.dimension=3,Er.buffer.byteLength=on;if(Yn=Nn,!Nn){switch(Er.buffer.dtype){case Da:case ao:Yn=Da;break;case bo:case bl:Yn=bo;break;case su:case Zs:Yn=su;break;default:}Er.buffer.dtype=Yn}Er.type=Yn;var Sn=an;Sn<0&&(Sn=Er.buffer.byteLength,Yn===bo?Sn>>=1:Yn===su&&(Sn>>=2)),Er.vertCount=Sn;var An=Lr;if(Lr<0){An=Eo;var li=Er.buffer.dimension;li===1&&(An=mo),li===2&&(An=sl),li===3&&(An=Eo)}Er.primType=An}function Or(Er){xt.elementsCount--,delete Et[Er.id],Er.buffer.destroy(),Er.buffer=null}function $r(Er,Tr){var Rr=at.create(null,fc,!0),Lr=new Pt(Rr._buffer);xt.elementsCount++;function an(on){if(!on)Rr(),Lr.primType=Eo,Lr.vertCount=0,Lr.type=Da;else if(typeof on=="number")Rr(on),Lr.primType=Eo,Lr.vertCount=on|0,Lr.type=Da;else{var Nn=null,Yn=ut,yi=-1,Sn=-1,An=0,li=0;Array.isArray(on)||or(on)||fr(on)?Nn=on:("data"in on&&(Nn=on.data),"usage"in on&&(Yn=Vt[on.usage]),"primitive"in on&&(yi=ss[on.primitive]),"count"in on&&(Sn=on.count|0),"type"in on&&(li=St[on.type]),"length"in on?An=on.length|0:(An=Sn,li===bo||li===bl?An*=2:(li===su||li===Zs)&&(An*=4))),Xr(Lr,Nn,Yn,yi,Sn,An,li)}return an}return an(Er),an._reglType="elements",an._elements=Lr,an.subdata=function(on,Nn){return Rr.subdata(on,Nn),an},an.destroy=function(){Or(Lr)},an}return{create:$r,createStream:Ht,destroyStream:dr,getElements:function(Er){return typeof Er=="function"&&Er._elements instanceof Pt?Er._elements:null},clear:function(){Ot(Et).forEach(Or)}}}var er=new Float32Array(1),wr=new Uint32Array(er.buffer),nn=5123;function Dr(Pe){for(var Xe=U.allocType(nn,Pe.length),at=0;at>>31<<15,Bt=(xt<<1>>>24)-127,St=xt>>13&1023;if(Bt<-24)Xe[at]=Et;else if(Bt<-14){var Pt=-14-Bt;Xe[at]=Et+(St+1024>>Pt)}else Bt>15?Xe[at]=Et+31744:Xe[at]=Et+(Bt+15<<10)+St}return Xe}function bn(Pe){return Array.isArray(Pe)||or(Pe)}var Yr=34467,Tn=3553,Kn=34067,Qn=34069,Ai=6408,Ji=6406,Ra=6407,ii=6409,Za=6410,ja=32854,qo=32855,$a=36194,Ka=32819,Oa=32820,Ni=33635,ka=34042,vs=6402,yo=34041,so=35904,oo=35906,ko=36193,pa=33776,la=33777,As=33778,Ms=33779,xu=35986,rs=35987,Ls=34798,$s=35840,Kc=35841,_u=35842,Gu=35843,Ja=36196,ps=5121,Sa=5123,ma=5125,Ps=5126,Ca=10242,Pl=10243,ll=10497,Jc=33071,lu=33648,Mf=10240,Bd=10241,Hu=9728,Sf=9729,kc=9984,Uo=9985,ns=9986,Ks=9987,Ef=33170,ju=4352,gs=4353,bu=4354,kf=34046,ah=3317,Od=37440,Qc=37441,uu=37443,oh=37444,hc=33984,Fl=[kc,ns,Uo,Ks],Yo=[0,ii,Za,Ra,Ai],Ro={};Ro[ii]=Ro[Ji]=Ro[vs]=1,Ro[yo]=Ro[Za]=2,Ro[Ra]=Ro[so]=3,Ro[Ai]=Ro[oo]=4;function is(Pe){return"[object "+Pe+"]"}var Dl=is("HTMLCanvasElement"),dc=is("OffscreenCanvas"),ef=is("CanvasRenderingContext2D"),Cc=is("ImageBitmap"),sh=is("HTMLImageElement"),Y0=is("HTMLVideoElement"),Nd=Object.keys(kt).concat([Dl,dc,ef,Cc,sh,Y0]),Cf=[];Cf[ps]=1,Cf[Ps]=4,Cf[ko]=2,Cf[Sa]=2,Cf[ma]=4;var Vo=[];Vo[ja]=2,Vo[qo]=2,Vo[$a]=2,Vo[yo]=4,Vo[pa]=.5,Vo[la]=.5,Vo[As]=1,Vo[Ms]=1,Vo[xu]=.5,Vo[rs]=1,Vo[Ls]=1,Vo[$s]=.5,Vo[Kc]=.25,Vo[_u]=.5,Vo[Gu]=.25,Vo[Ja]=.5;function Ud(Pe){return Array.isArray(Pe)&&(Pe.length===0||typeof Pe[0]=="number")}function zh(Pe){if(!Array.isArray(Pe))return!1;var Xe=Pe.length;return!(Xe===0||!bn(Pe[0]))}function tf(Pe){return Object.prototype.toString.call(Pe)}function Vd(Pe){return tf(Pe)===Dl}function rf(Pe){return tf(Pe)===dc}function qh(Pe){return tf(Pe)===ef}function vc(Pe){return tf(Pe)===Cc}function dd(Pe){return tf(Pe)===sh}function Bh(Pe){return tf(Pe)===Y0}function Wu(Pe){if(!Pe)return!1;var Xe=tf(Pe);return Nd.indexOf(Xe)>=0?!0:Ud(Pe)||zh(Pe)||fr(Pe)}function vd(Pe){return kt[Object.prototype.toString.call(Pe)]|0}function pd(Pe,Xe){var at=Xe.length;switch(Pe.type){case ps:case Sa:case ma:case Ps:var xt=U.allocType(Pe.type,at);xt.set(Xe),Pe.data=xt;break;case ko:Pe.data=Dr(Xe);break;default:}}function lh(Pe,Xe){return U.allocType(Pe.type===ko?Ps:Pe.type,Xe)}function nf(Pe,Xe){Pe.type===ko?(Pe.data=Dr(Xe),U.freeType(Xe)):Pe.data=Xe}function uh(Pe,Xe,at,xt,Et,Bt){for(var St=Pe.width,Pt=Pe.height,$t=Pe.channels,Ht=St*Pt*$t,dr=lh(Pe,Ht),Xr=0,Or=0;Or=1;)Pt+=St*$t*$t,$t/=2;return Pt}else return St*at*xt}function gd(Pe,Xe,at,xt,Et,Bt,St){var Pt={"don't care":ju,"dont care":ju,nice:bu,fast:gs},$t={repeat:ll,clamp:Jc,mirror:lu},Ht={nearest:Hu,linear:Sf},dr=e({mipmap:Ks,"nearest mipmap nearest":kc,"linear mipmap nearest":Uo,"nearest mipmap linear":ns,"linear mipmap linear":Ks},Ht),Xr={none:0,browser:oh},Or={uint8:ps,rgba4:Ka,rgb565:Ni,"rgb5 a1":Oa},$r={alpha:Ji,luminance:ii,"luminance alpha":Za,rgb:Ra,rgba:Ai,rgba4:ja,"rgb5 a1":qo,rgb565:$a},Er={};Xe.ext_srgb&&($r.srgb=so,$r.srgba=oo),Xe.oes_texture_float&&(Or.float32=Or.float=Ps),Xe.oes_texture_half_float&&(Or.float16=Or["half float"]=ko),Xe.webgl_depth_texture&&(e($r,{depth:vs,"depth stencil":yo}),e(Or,{uint16:Sa,uint32:ma,"depth stencil":ka})),Xe.webgl_compressed_texture_s3tc&&e(Er,{"rgb s3tc dxt1":pa,"rgba s3tc dxt1":la,"rgba s3tc dxt3":As,"rgba s3tc dxt5":Ms}),Xe.webgl_compressed_texture_atc&&e(Er,{"rgb atc":xu,"rgba atc explicit alpha":rs,"rgba atc interpolated alpha":Ls}),Xe.webgl_compressed_texture_pvrtc&&e(Er,{"rgb pvrtc 4bppv1":$s,"rgb pvrtc 2bppv1":Kc,"rgba pvrtc 4bppv1":_u,"rgba pvrtc 2bppv1":Gu}),Xe.webgl_compressed_texture_etc1&&(Er["rgb etc1"]=Ja);var Tr=Array.prototype.slice.call(Pe.getParameter(Yr));Object.keys(Er).forEach(function(vr){var gn=Er[vr];Tr.indexOf(gn)>=0&&($r[vr]=gn)});var Rr=Object.keys($r);at.textureFormats=Rr;var Lr=[];Object.keys($r).forEach(function(vr){var gn=$r[vr];Lr[gn]=vr});var an=[];Object.keys(Or).forEach(function(vr){var gn=Or[vr];an[gn]=vr});var on=[];Object.keys(Ht).forEach(function(vr){var gn=Ht[vr];on[gn]=vr});var Nn=[];Object.keys(dr).forEach(function(vr){var gn=dr[vr];Nn[gn]=vr});var Yn=[];Object.keys($t).forEach(function(vr){var gn=$t[vr];Yn[gn]=vr});var yi=Rr.reduce(function(vr,gn){var xn=$r[gn];return xn===ii||xn===Ji||xn===ii||xn===Za||xn===vs||xn===yo||Xe.ext_srgb&&(xn===so||xn===oo)?vr[xn]=xn:xn===qo||gn.indexOf("rgba")>=0?vr[xn]=Ai:vr[xn]=Ra,vr},{});function Sn(){this.internalformat=Ai,this.format=Ai,this.type=ps,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=oh,this.width=0,this.height=0,this.channels=0}function An(vr,gn){vr.internalformat=gn.internalformat,vr.format=gn.format,vr.type=gn.type,vr.compressed=gn.compressed,vr.premultiplyAlpha=gn.premultiplyAlpha,vr.flipY=gn.flipY,vr.unpackAlignment=gn.unpackAlignment,vr.colorSpace=gn.colorSpace,vr.width=gn.width,vr.height=gn.height,vr.channels=gn.channels}function li(vr,gn){if(!(typeof gn!="object"||!gn)){if("premultiplyAlpha"in gn&&(vr.premultiplyAlpha=gn.premultiplyAlpha),"flipY"in gn&&(vr.flipY=gn.flipY),"alignment"in gn&&(vr.unpackAlignment=gn.alignment),"colorSpace"in gn&&(vr.colorSpace=Xr[gn.colorSpace]),"type"in gn){var xn=gn.type;vr.type=Or[xn]}var Gi=vr.width,wo=vr.height,xs=vr.channels,Hi=!1;"shape"in gn?(Gi=gn.shape[0],wo=gn.shape[1],gn.shape.length===3&&(xs=gn.shape[2],Hi=!0)):("radius"in gn&&(Gi=wo=gn.radius),"width"in gn&&(Gi=gn.width),"height"in gn&&(wo=gn.height),"channels"in gn&&(xs=gn.channels,Hi=!0)),vr.width=Gi|0,vr.height=wo|0,vr.channels=xs|0;var ar=!1;if("format"in gn){var gr=gn.format,Pr=vr.internalformat=$r[gr];vr.format=yi[Pr],gr in Or&&("type"in gn||(vr.type=Or[gr])),gr in Er&&(vr.compressed=!0),ar=!0}!Hi&&ar?vr.channels=Ro[vr.format]:Hi&&!ar&&vr.channels!==Yo[vr.format]&&(vr.format=vr.internalformat=Yo[vr.channels])}}function Vn(vr){Pe.pixelStorei(Od,vr.flipY),Pe.pixelStorei(Qc,vr.premultiplyAlpha),Pe.pixelStorei(uu,vr.colorSpace),Pe.pixelStorei(ah,vr.unpackAlignment)}function jn(){Sn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Wn(vr,gn){var xn=null;if(Wu(gn)?xn=gn:gn&&(li(vr,gn),"x"in gn&&(vr.xOffset=gn.x|0),"y"in gn&&(vr.yOffset=gn.y|0),Wu(gn.data)&&(xn=gn.data)),gn.copy){var Gi=Et.viewportWidth,wo=Et.viewportHeight;vr.width=vr.width||Gi-vr.xOffset,vr.height=vr.height||wo-vr.yOffset,vr.needsCopy=!0}else if(!xn)vr.width=vr.width||1,vr.height=vr.height||1,vr.channels=vr.channels||4;else if(or(xn))vr.channels=vr.channels||4,vr.data=xn,!("type"in gn)&&vr.type===ps&&(vr.type=vd(xn));else if(Ud(xn))vr.channels=vr.channels||4,pd(vr,xn),vr.alignment=1,vr.needsFree=!0;else if(fr(xn)){var xs=xn.data;!Array.isArray(xs)&&vr.type===ps&&(vr.type=vd(xs));var Hi=xn.shape,ar=xn.stride,gr,Pr,pn,Mn,sn,tn;Hi.length===3?(pn=Hi[2],tn=ar[2]):(pn=1,tn=1),gr=Hi[0],Pr=Hi[1],Mn=ar[0],sn=ar[1],vr.alignment=1,vr.width=gr,vr.height=Pr,vr.channels=pn,vr.format=vr.internalformat=Yo[pn],vr.needsFree=!0,uh(vr,xs,Mn,sn,tn,xn.offset)}else if(Vd(xn)||rf(xn)||qh(xn))Vd(xn)||rf(xn)?vr.element=xn:vr.element=xn.canvas,vr.width=vr.element.width,vr.height=vr.element.height,vr.channels=4;else if(vc(xn))vr.element=xn,vr.width=xn.width,vr.height=xn.height,vr.channels=4;else if(dd(xn))vr.element=xn,vr.width=xn.naturalWidth,vr.height=xn.naturalHeight,vr.channels=4;else if(Bh(xn))vr.element=xn,vr.width=xn.videoWidth,vr.height=xn.videoHeight,vr.channels=4;else if(zh(xn)){var Hr=vr.width||xn[0].length,Mr=vr.height||xn.length,zr=vr.channels;bn(xn[0][0])?zr=zr||xn[0][0].length:zr=zr||1;for(var yr=cr.shape(xn),hn=1,kn=0;kn>=wo,xn.height>>=wo,Wn(xn,Gi[wo]),vr.mipmask|=1<=0&&!("faces"in gn)&&(vr.genMipmaps=!0)}if("mag"in gn){var Gi=gn.mag;vr.magFilter=Ht[Gi]}var wo=vr.wrapS,xs=vr.wrapT;if("wrap"in gn){var Hi=gn.wrap;typeof Hi=="string"?wo=xs=$t[Hi]:Array.isArray(Hi)&&(wo=$t[Hi[0]],xs=$t[Hi[1]])}else{if("wrapS"in gn){var ar=gn.wrapS;wo=$t[ar]}if("wrapT"in gn){var gr=gn.wrapT;xs=$t[gr]}}if(vr.wrapS=wo,vr.wrapT=xs,"anisotropic"in gn){var Pr=gn.anisotropic;vr.anisotropic=gn.anisotropic}if("mipmap"in gn){var pn=!1;switch(typeof gn.mipmap){case"string":vr.mipmapHint=Pt[gn.mipmap],vr.genMipmaps=!0,pn=!0;break;case"boolean":pn=vr.genMipmaps=gn.mipmap;break;case"object":vr.genMipmaps=!1,pn=!0;break;default:}pn&&!("min"in gn)&&(vr.minFilter=kc)}}function po(vr,gn){Pe.texParameteri(gn,Bd,vr.minFilter),Pe.texParameteri(gn,Mf,vr.magFilter),Pe.texParameteri(gn,Ca,vr.wrapS),Pe.texParameteri(gn,Pl,vr.wrapT),Xe.ext_texture_filter_anisotropic&&Pe.texParameteri(gn,kf,vr.anisotropic),vr.genMipmaps&&(Pe.hint(Ef,vr.mipmapHint),Pe.generateMipmap(gn))}var Xo=0,no={},Us=at.maxTextureUnits,ql=Array(Us).map(function(){return null});function Ta(vr){Sn.call(this),this.mipmask=0,this.internalformat=Ai,this.id=Xo++,this.refCount=1,this.target=vr,this.texture=Pe.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new vo,St.profile&&(this.stats={size:0})}function vu(vr){Pe.activeTexture(hc),Pe.bindTexture(vr.target,vr.texture)}function ys(){var vr=ql[0];vr?Pe.bindTexture(vr.target,vr.texture):Pe.bindTexture(Tn,null)}function xc(vr){var gn=vr.texture,xn=vr.unit,Gi=vr.target;xn>=0&&(Pe.activeTexture(hc+xn),Pe.bindTexture(Gi,null),ql[xn]=null),Pe.deleteTexture(gn),vr.texture=null,vr.params=null,vr.pixels=null,vr.refCount=0,delete no[vr.id],Bt.textureCount--}e(Ta.prototype,{bind:function(){var vr=this;vr.bindCount+=1;var gn=vr.unit;if(gn<0){for(var xn=0;xn0)continue;Gi.unit=-1}ql[xn]=vr,gn=xn;break}gn>=Us,St.profile&&Bt.maxTextureUnits>sn)-pn,tn.height=tn.height||(xn.height>>sn)-Mn,vu(xn),zi(tn,Tn,pn,Mn,sn),ys(),Li(tn),Gi}function xs(Hi,ar){var gr=Hi|0,Pr=ar|0||gr;if(gr===xn.width&&Pr===xn.height)return Gi;Gi.width=xn.width=gr,Gi.height=xn.height=Pr,vu(xn);for(var pn=0;xn.mipmask>>pn;++pn){var Mn=gr>>pn,sn=Pr>>pn;if(!Mn||!sn)break;Pe.texImage2D(Tn,pn,xn.format,Mn,sn,0,xn.format,xn.type,null)}return ys(),St.profile&&(xn.stats.size=af(xn.internalformat,xn.type,gr,Pr,!1,!1)),Gi}return Gi(vr,gn),Gi.subimage=wo,Gi.resize=xs,Gi._reglType="texture2d",Gi._texture=xn,St.profile&&(Gi.stats=xn.stats),Gi.destroy=function(){xn.decRef()},Gi}function $l(vr,gn,xn,Gi,wo,xs){var Hi=new Ta(Kn);no[Hi.id]=Hi,Bt.cubeCount++;var ar=new Array(6);function gr(Mn,sn,tn,Hr,Mr,zr){var yr,hn=Hi.texInfo;for(vo.call(hn),yr=0;yr<6;++yr)ar[yr]=Na();if(typeof Mn=="number"||!Mn){var kn=Mn|0||1;for(yr=0;yr<6;++yr)ca(ar[yr],kn,kn)}else if(typeof Mn=="object")if(sn)Ia(ar[0],Mn),Ia(ar[1],sn),Ia(ar[2],tn),Ia(ar[3],Hr),Ia(ar[4],Mr),Ia(ar[5],zr);else if(_o(hn,Mn),li(Hi,Mn),"faces"in Mn){var Xn=Mn.faces;for(yr=0;yr<6;++yr)An(ar[yr],Hi),Ia(ar[yr],Xn[yr])}else for(yr=0;yr<6;++yr)Ia(ar[yr],Mn);for(An(Hi,ar[0]),hn.genMipmaps?Hi.mipmask=(ar[0].width<<1)-1:Hi.mipmask=ar[0].mipmask,Hi.internalformat=ar[0].internalformat,gr.width=ar[0].width,gr.height=ar[0].height,vu(Hi),yr=0;yr<6;++yr)Os(ar[yr],Qn+yr);for(po(hn,Kn),ys(),St.profile&&(Hi.stats.size=af(Hi.internalformat,Hi.type,gr.width,gr.height,hn.genMipmaps,!0)),gr.format=Lr[Hi.internalformat],gr.type=an[Hi.type],gr.mag=on[hn.magFilter],gr.min=Nn[hn.minFilter],gr.wrapS=Yn[hn.wrapS],gr.wrapT=Yn[hn.wrapT],yr=0;yr<6;++yr)Ns(ar[yr]);return gr}function Pr(Mn,sn,tn,Hr,Mr){var zr=tn|0,yr=Hr|0,hn=Mr|0,kn=ui();return An(kn,Hi),kn.width=0,kn.height=0,Wn(kn,sn),kn.width=kn.width||(Hi.width>>hn)-zr,kn.height=kn.height||(Hi.height>>hn)-yr,vu(Hi),zi(kn,Qn+Mn,zr,yr,hn),ys(),Li(kn),gr}function pn(Mn){var sn=Mn|0;if(sn!==Hi.width){gr.width=Hi.width=sn,gr.height=Hi.height=sn,vu(Hi);for(var tn=0;tn<6;++tn)for(var Hr=0;Hi.mipmask>>Hr;++Hr)Pe.texImage2D(Qn+tn,Hr,Hi.format,sn>>Hr,sn>>Hr,0,Hi.format,Hi.type,null);return ys(),St.profile&&(Hi.stats.size=af(Hi.internalformat,Hi.type,gr.width,gr.height,!1,!0)),gr}}return gr(vr,gn,xn,Gi,wo,xs),gr.subimage=Pr,gr.resize=pn,gr._reglType="textureCube",gr._texture=Hi,St.profile&&(gr.stats=Hi.stats),gr.destroy=function(){Hi.decRef()},gr}function xa(){for(var vr=0;vr>Gi,xn.height>>Gi,0,xn.internalformat,xn.type,null);else for(var wo=0;wo<6;++wo)Pe.texImage2D(Qn+wo,Gi,xn.internalformat,xn.width>>Gi,xn.height>>Gi,0,xn.internalformat,xn.type,null);po(xn.texInfo,xn.target)})}function Es(){for(var vr=0;vr=0?Ns=!0:$t.indexOf(vo)>=0&&(Ns=!1))),("depthTexture"in Ta||"depthStencilTexture"in Ta)&&(ql=!!(Ta.depthTexture||Ta.depthStencilTexture)),"depth"in Ta&&(typeof Ta.depth=="boolean"?Os=Ta.depth:(Xo=Ta.depth,Ss=!1)),"stencil"in Ta&&(typeof Ta.stencil=="boolean"?Ss=Ta.stencil:(no=Ta.stencil,Os=!1)),"depthStencil"in Ta&&(typeof Ta.depthStencil=="boolean"?Os=Ss=Ta.depthStencil:(Us=Ta.depthStencil,Os=!1,Ss=!1))}var ys=null,xc=null,Zl=null,$l=null;if(Array.isArray(Na))ys=Na.map(Er);else if(Na)ys=[Er(Na)];else for(ys=new Array(po),Ki=0;Ki0&&(Li.depth=Wn[0].depth,Li.stencil=Wn[0].stencil,Li.depthStencil=Wn[0].depthStencil),Wn[ui]?Wn[ui](Li):Wn[ui]=An(Li)}return e(si,{width:Ki,height:Ki,color:vo})}function zi(da){var ui,Li=da|0;if(Li===si.width)return si;var Ki=si.color;for(ui=0;ui=Ki.byteLength?ca.subdata(Ki):(ca.destroy(),An.buffers[da]=null)),An.buffers[da]||(ca=An.buffers[da]=Et.create(ui,pc,!1,!0)),Li.buffer=Et.getBuffer(ca),Li.size=Li.buffer.dimension|0,Li.normalized=!1,Li.type=Li.buffer.dtype,Li.offset=0,Li.stride=0,Li.divisor=0,Li.state=1,si[da]=1}else Et.getBuffer(ui)?(Li.buffer=Et.getBuffer(ui),Li.size=Li.buffer.dimension|0,Li.normalized=!1,Li.type=Li.buffer.dtype,Li.offset=0,Li.stride=0,Li.divisor=0,Li.state=1):Et.getBuffer(ui.buffer)?(Li.buffer=Et.getBuffer(ui.buffer),Li.size=(+ui.size||Li.buffer.dimension)|0,Li.normalized=!!ui.normalized||!1,"type"in ui?Li.type=Cn[ui.type]:Li.type=Li.buffer.dtype,Li.offset=(ui.offset||0)|0,Li.stride=(ui.stride||0)|0,Li.divisor=(ui.divisor||0)|0,Li.state=1):"x"in ui&&(Li.x=+ui.x||0,Li.y=+ui.y||0,Li.z=+ui.z||0,Li.w=+ui.w||0,Li.state=2)}for(var Ia=0;Ia1)for(var Vn=0;VnTr&&(Tr=Rr.stats.uniformsCount)}),Tr},at.getMaxAttributesCount=function(){var Tr=0;return dr.forEach(function(Rr){Rr.stats.attributesCount>Tr&&(Tr=Rr.stats.attributesCount)}),Tr});function Er(){Et={},Bt={};for(var Tr=0;Tr16&&(at=en(at,Pe.length*8));for(var xt=Array(16),Et=Array(16),Bt=0;Bt<16;Bt++)xt[Bt]=at[Bt]^909522486,Et[Bt]=at[Bt]^1549556828;var St=en(xt.concat(qf(Xe)),512+Xe.length*8);return Ze(en(Et.concat(St),768))}function Wl(Pe){for(var Xe=Hh?"0123456789ABCDEF":"0123456789abcdef",at="",xt,Et=0;Et>>4&15)+Xe.charAt(xt&15);return at}function If(Pe){for(var Xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",at="",xt=Pe.length,Et=0;EtPe.length*8?at+=X0:at+=Xe.charAt(Bt>>>6*(3-St)&63);return at}function vh(Pe,Xe){var at=Xe.length,xt=Array(),Et,Bt,St,Pt,$t=Array(Math.ceil(Pe.length/2));for(Et=0;Et<$t.length;Et++)$t[Et]=Pe.charCodeAt(Et*2)<<8|Pe.charCodeAt(Et*2+1);for(;$t.length>0;){for(Pt=Array(),St=0,Et=0;Et<$t.length;Et++)St=(St<<16)+$t[Et],Bt=Math.floor(St/at),St-=Bt*at,(Pt.length>0||Bt>0)&&(Pt[Pt.length]=Bt);xt[xt.length]=St,$t=Pt}var Ht="";for(Et=xt.length-1;Et>=0;Et--)Ht+=Xe.charAt(xt[Et]);var dr=Math.ceil(Pe.length*8/(Math.log(Xe.length)/Math.log(2)));for(Et=Ht.length;Et>>6&31,128|xt&63):xt<=65535?Xe+=String.fromCharCode(224|xt>>>12&15,128|xt>>>6&63,128|xt&63):xt<=2097151&&(Xe+=String.fromCharCode(240|xt>>>18&7,128|xt>>>12&63,128|xt>>>6&63,128|xt&63));return Xe}function qf(Pe){for(var Xe=Array(Pe.length>>2),at=0;at>5]|=(Pe.charCodeAt(at/8)&255)<<24-at%32;return Xe}function Ze(Pe){for(var Xe="",at=0;at>5]>>>24-at%32&255);return Xe}function yt(Pe,Xe){return Pe>>>Xe|Pe<<32-Xe}function Wt(Pe,Xe){return Pe>>>Xe}function zt(Pe,Xe,at){return Pe&Xe^~Pe&at}function hr(Pe,Xe,at){return Pe&Xe^Pe&at^Xe&at}function Ur(Pe){return yt(Pe,2)^yt(Pe,13)^yt(Pe,22)}function Qr(Pe){return yt(Pe,6)^yt(Pe,11)^yt(Pe,25)}function cn(Pe){return yt(Pe,7)^yt(Pe,18)^Wt(Pe,3)}function yn(Pe){return yt(Pe,17)^yt(Pe,19)^Wt(Pe,10)}var Fn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function en(Pe,Xe){var at=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),xt=new Array(64),Et,Bt,St,Pt,$t,Ht,dr,Xr,Or,$r,Er,Tr;for(Pe[Xe>>5]|=128<<24-Xe%32,Pe[(Xe+64>>9<<4)+15]=Xe,Or=0;Or>16)+(Xe>>16)+(at>>16);return xt<<16|at&65535}function mn(Pe){return Array.prototype.slice.call(Pe)}function Pn(Pe){return mn(Pe).join("")}function On(Pe){var Xe=Pe&&Pe.cache,at=0,xt=[],Et=[],Bt=[];function St(Er,Tr){var Rr=Tr&&Tr.stable;if(!Rr){for(var Lr=0;Lr0&&(Er.push(an,"="),Er.push.apply(Er,mn(arguments)),Er.push(";")),an}return e(Tr,{def:Lr,toString:function(){return Pn([Rr.length>0?"var "+Rr.join(",")+";":"",Pn(Er)])}})}function $t(){var Er=Pt(),Tr=Pt(),Rr=Er.toString,Lr=Tr.toString;function an(on,Nn){Tr(on,Nn,"=",Er.def(on,Nn),";")}return e(function(){Er.apply(Er,mn(arguments))},{def:Er.def,entry:Er,exit:Tr,save:an,set:function(on,Nn,Yn){an(on,Nn),Er(on,Nn,"=",Yn,";")},toString:function(){return Rr()+Lr()}})}function Ht(){var Er=Pn(arguments),Tr=$t(),Rr=$t(),Lr=Tr.toString,an=Rr.toString;return e(Tr,{then:function(){return Tr.apply(Tr,mn(arguments)),this},else:function(){return Rr.apply(Rr,mn(arguments)),this},toString:function(){var on=an();return on&&(on="else{"+on+"}"),Pn(["if(",Er,"){",Lr(),"}",on])}})}var dr=Pt(),Xr={};function Or(Er,Tr){var Rr=[];function Lr(){var yi="a"+Rr.length;return Rr.push(yi),yi}Tr=Tr||0;for(var an=0;an":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Tr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Lr={cw:ie,ccw:_e};function Vr(pe){return Array.isArray(pe)||tr(pe)||lr(pe)}function jr(pe){return pe.sort(function(ot,ht){return ot===H?-1:ht===H?1:ot=1,Kt>=2,ot)}else if(ht===ji){var cr=pe.data;return new br(cr.thisDep,cr.contextDep,cr.propDep,ot)}else{if(ht===Ao)return new br(!1,!1,!1,ot);if(ht===Qi){for(var dr=!1,ur=!1,Rr=!1,Xr=0;Xr=1&&(ur=!0),Kr>=2&&(Rr=!0)}else $r.type===ji&&(dr=dr||$r.data.thisDep,ur=ur||$r.data.contextDep,Rr=Rr||$r.data.propDep)}return new br(dr,ur,Rr,ot)}else return new br(ht===pi,ht===Ja,ht===zn,ot)}}var xa=new br(!1,!1,!1,function(){});function Ba(pe,ot,ht,Kt,cr,dr,ur,Rr,Xr,$r,Kr,Hn,Cn,fn,Sr,Ut){var pr=$r.Record,Ir={add:32774,subtract:32778,"reverse subtract":32779};ht.ext_blend_minmax&&(Ir.min=Me,Ir.max=Le);var Zr=ht.angle_instanced_arrays,Cr=ht.webgl_draw_buffers,hn=ht.oes_vertex_array_object,sn={dirty:!0,profile:Ut.profile},Gn={},kr=[],Mr={},_n={};function an($e){return $e.replace(".","_")}function Jr($e,ct,Et){var nr=an($e);kr.push($e),Gn[nr]=sn[nr]=!!Et,Mr[nr]=ct}function Qr($e,ct,Et){var nr=an($e);kr.push($e),Array.isArray(Et)?(sn[nr]=Et.slice(),Gn[nr]=Et.slice()):sn[nr]=Gn[nr]=Et,_n[nr]=ct}function wn($e){return!!isNaN($e)}Jr(zo,Gr),Jr(Vi,wr),Qr(Js,"blendColor",[0,0,0,0]),Qr(cs,"blendEquationSeparate",[It,It]),Qr(Mo,"blendFuncSeparate",[Dt,xt,Dt,xt]),Jr(ya,cn,!0),Qr(ho,"depthFunc",ar),Qr(wo,"depthRange",[0,1]),Qr(Yi,"depthMask",!0),Qr(Vs,Vs,[!0,!0,!0,!0]),Jr(xu,sr),Qr(au,"cullFace",Z),Qr(Yu,Yu,_e),Qr(ll,ll,1),Jr(Pu,ta),Qr(ul,"polygonOffset",[0,0]),Jr(Pc,ka),Jr(Wa,va),Qr(oi,"sampleCoverage",[1,!1]),Jr(Ph,pn),Qr(pf,"stencilMask",-1),Qr(iu,"stencilFunc",[at,0,-1]),Qr(K,"stencilOpSeparate",[V,je,je,je]),Qr(b,"stencilOpSeparate",[Z,je,je,je]),Jr(I,kn),Qr(G,"scissor",[0,0,pe.drawingBufferWidth,pe.drawingBufferHeight]),Qr(H,H,[0,0,pe.drawingBufferWidth,pe.drawingBufferHeight]);var jn={gl:pe,context:Cn,strings:ot,next:Gn,current:sn,draw:Hn,elements:dr,buffer:cr,shader:Kr,attributes:$r.state,vao:$r,uniforms:Xr,framebuffer:Rr,extensions:ht,timer:fn,isBufferArgs:Vr},oa={primTypes:to,compareFuncs:hr,blendFuncs:Hr,blendEquations:Ir,stencilOps:Tr,glTypes:vn,orientationType:Lr};Cr&&(oa.backBuffer=[Z],oa.drawBuffer=T(Kt.maxDrawbuffers,function($e){return $e===0?[0]:T($e,function(ct){return Dr+ct})}));var rn=0;function Sn(){var $e=ea({cache:Sr}),ct=$e.link,Et=$e.global;$e.id=rn++,$e.batchId="0";var nr=ct(jn),vr=$e.shared={props:"a0"};Object.keys(jn).forEach(function(Lt){vr[Lt]=Et.def(nr,".",Lt)});var Ht=$e.next={},Nt=$e.current={};Object.keys(_n).forEach(function(Lt){Array.isArray(sn[Lt])&&(Ht[Lt]=Et.def(vr.next,".",Lt),Nt[Lt]=Et.def(vr.current,".",Lt))});var Pt=$e.constants={};Object.keys(oa).forEach(function(Lt){Pt[Lt]=Et.def(JSON.stringify(oa[Lt]))}),$e.invoke=function(Lt,dt){switch(dt.type){case na:var Jt=["this",vr.context,vr.props,$e.batchId];return Lt.def(ct(dt.data),".call(",Jt.slice(0,Math.max(dt.data.length+1,4)),")");case zn:return Lt.def(vr.props,dt.data);case Ja:return Lt.def(vr.context,dt.data);case pi:return Lt.def("this",dt.data);case ji:return dt.data.append($e,Lt),dt.data.ref;case Ao:return dt.data.toString();case Qi:return dt.data.map(function(yr){return $e.invoke(Lt,yr)})}},$e.attribCache={};var At={};return $e.scopeAttrib=function(Lt){var dt=ot.id(Lt);if(dt in At)return At[dt];var Jt=$r.scope[dt];Jt||(Jt=$r.scope[dt]=new pr);var yr=At[dt]=ct(Jt);return yr},$e}function sa($e){var ct=$e.static,Et=$e.dynamic,nr;if($ in ct){var vr=!!ct[$];nr=On(function(Nt,Pt){return vr}),nr.enable=vr}else if($ in Et){var Ht=Et[$];nr=ra(Ht,function(Nt,Pt){return Nt.invoke(Pt,Ht)})}return nr}function ca($e,ct){var Et=$e.static,nr=$e.dynamic;if(xe in Et){var vr=Et[xe];return vr?(vr=Rr.getFramebuffer(vr),On(function(Nt,Pt){var At=Nt.link(vr),Lt=Nt.shared;Pt.set(Lt.framebuffer,".next",At);var dt=Lt.context;return Pt.set(dt,"."+be,At+".width"),Pt.set(dt,"."+De,At+".height"),At})):On(function(Nt,Pt){var At=Nt.shared;Pt.set(At.framebuffer,".next","null");var Lt=At.context;return Pt.set(Lt,"."+be,Lt+"."+gt),Pt.set(Lt,"."+De,Lt+"."+Mt),"null"})}else if(xe in nr){var Ht=nr[xe];return ra(Ht,function(Nt,Pt){var At=Nt.invoke(Pt,Ht),Lt=Nt.shared,dt=Lt.framebuffer,Jt=Pt.def(dt,".getFramebuffer(",At,")");Pt.set(dt,".next",Jt);var yr=Lt.context;return Pt.set(yr,"."+be,Jt+"?"+Jt+".width:"+yr+"."+gt),Pt.set(yr,"."+De,Jt+"?"+Jt+".height:"+yr+"."+Mt),Jt})}else return null}function Ra($e,ct,Et){var nr=$e.static,vr=$e.dynamic;function Ht(At){if(At in nr){var Lt=nr[At],dt=!0,Jt=Lt.x|0,yr=Lt.y|0,Or,Yn;return"width"in Lt?Or=Lt.width|0:dt=!1,"height"in Lt?Yn=Lt.height|0:dt=!1,new br(!dt&&ct&&ct.thisDep,!dt&&ct&&ct.contextDep,!dt&&ct&&ct.propDep,function(Wn,Un){var qn=Wn.shared.context,yn=Or;"width"in Lt||(yn=Un.def(qn,".",be,"-",Jt));var Dn=Yn;return"height"in Lt||(Dn=Un.def(qn,".",De,"-",yr)),[Jt,yr,yn,Dn]})}else if(At in vr){var Tn=vr[At],bn=ra(Tn,function(Wn,Un){var qn=Wn.invoke(Un,Tn),yn=Wn.shared.context,Dn=Un.def(qn,".x|0"),In=Un.def(qn,".y|0"),fa=Un.def('"width" in ',qn,"?",qn,".width|0:","(",yn,".",be,"-",Dn,")"),Zi=Un.def('"height" in ',qn,"?",qn,".height|0:","(",yn,".",De,"-",In,")");return[Dn,In,fa,Zi]});return ct&&(bn.thisDep=bn.thisDep||ct.thisDep,bn.contextDep=bn.contextDep||ct.contextDep,bn.propDep=bn.propDep||ct.propDep),bn}else return ct?new br(ct.thisDep,ct.contextDep,ct.propDep,function(Wn,Un){var qn=Wn.shared.context;return[0,0,Un.def(qn,".",be),Un.def(qn,".",De)]}):null}var Nt=Ht(H);if(Nt){var Pt=Nt;Nt=new br(Nt.thisDep,Nt.contextDep,Nt.propDep,function(At,Lt){var dt=Pt.append(At,Lt),Jt=At.shared.context;return Lt.set(Jt,"."+Se,dt[2]),Lt.set(Jt,"."+Be,dt[3]),dt})}return{viewport:Nt,scissor_box:Ht(G)}}function go($e,ct){var Et=$e.static,nr=typeof Et[Ne]=="string"&&typeof Et[ke]=="string";if(nr){if(Object.keys(ct.dynamic).length>0)return null;var vr=ct.static,Ht=Object.keys(vr);if(Ht.length>0&&typeof vr[Ht[0]]=="number"){for(var Nt=[],Pt=0;Pt"+Dn+"?"+dt+".constant["+Dn+"]:0;"}).join(""),"}}else{","if(",Or,"(",dt,".buffer)){",Wn,"=",Yn,".createStream(",Ot,",",dt,".buffer);","}else{",Wn,"=",Yn,".getBuffer(",dt,".buffer);","}",Un,'="type" in ',dt,"?",yr.glTypes,"[",dt,".type]:",Wn,".dtype;",Tn.normalized,"=!!",dt,".normalized;");function qn(yn){Lt(Tn[yn],"=",dt,".",yn,"|0;")}return qn("size"),qn("offset"),qn("stride"),qn("divisor"),Lt("}}"),Lt.exit("if(",Tn.isStream,"){",Yn,".destroyStream(",Wn,");","}"),Tn}vr[Ht]=ra(Nt,Pt)}),vr}function es($e){var ct=$e.static,Et=$e.dynamic,nr={};return Object.keys(ct).forEach(function(vr){var Ht=ct[vr];nr[vr]=On(function(Nt,Pt){return typeof Ht=="number"||typeof Ht=="boolean"?""+Ht:Nt.link(Ht)})}),Object.keys(Et).forEach(function(vr){var Ht=Et[vr];nr[vr]=ra(Ht,function(Nt,Pt){return Nt.invoke(Pt,Ht)})}),nr}function Ds($e,ct,Et,nr,vr){var Ht=$e.static,Nt=$e.dynamic,Pt=go($e,ct),At=ca($e,vr),Lt=Ra($e,At,vr),dt=ja($e,vr),Jt=cl($e,vr),yr=No($e,vr,Pt);function Or(qn){var yn=Lt[qn];yn&&(Jt[qn]=yn)}Or(H),Or(an(G));var Yn=Object.keys(Jt).length>0,Tn={framebuffer:At,draw:dt,shader:yr,state:Jt,dirty:Yn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Tn.profile=sa($e,vr),Tn.uniforms=Ci(Et,vr),Tn.drawVAO=Tn.scopeVAO=dt.vao,!Tn.drawVAO&&yr.program&&!Pt&&ht.angle_instanced_arrays&&dt.static.elements){var bn=!0,Wn=yr.program.attributes.map(function(qn){var yn=ct.static[qn];return bn=bn&&!!yn,yn});if(bn&&Wn.length>0){var Un=$r.getVAO($r.createVAO({attributes:Wn,elements:dt.static.elements}));Tn.drawVAO=new br(null,null,null,function(qn,yn){return qn.link(Un)}),Tn.useVAO=!0}}return Pt?Tn.useVAO=!0:Tn.attributes=Ts(ct,vr),Tn.context=es(nr,vr),Tn}function Do($e,ct,Et){var nr=$e.shared,vr=nr.context,Ht=$e.scope();Object.keys(Et).forEach(function(Nt){ct.save(vr,"."+Nt);var Pt=Et[Nt],At=Pt.append($e,ct);Array.isArray(At)?Ht(vr,".",Nt,"=[",At.join(),"];"):Ht(vr,".",Nt,"=",At,";")}),ct(Ht)}function Ro($e,ct,Et,nr){var vr=$e.shared,Ht=vr.gl,Nt=vr.framebuffer,Pt;Cr&&(Pt=ct.def(vr.extensions,".webgl_draw_buffers"));var At=$e.constants,Lt=At.drawBuffer,dt=At.backBuffer,Jt;Et?Jt=Et.append($e,ct):Jt=ct.def(Nt,".next"),nr||ct("if(",Jt,"!==",Nt,".cur){"),ct("if(",Jt,"){",Ht,".bindFramebuffer(",rr,",",Jt,".framebuffer);"),Cr&&ct(Pt,".drawBuffersWEBGL(",Lt,"[",Jt,".colorAttachments.length]);"),ct("}else{",Ht,".bindFramebuffer(",rr,",null);"),Cr&&ct(Pt,".drawBuffersWEBGL(",dt,");"),ct("}",Nt,".cur=",Jt,";"),nr||ct("}")}function Uo($e,ct,Et){var nr=$e.shared,vr=nr.gl,Ht=$e.current,Nt=$e.next,Pt=nr.current,At=nr.next,Lt=$e.cond(Pt,".dirty");kr.forEach(function(dt){var Jt=an(dt);if(!(Jt in Et.state)){var yr,Or;if(Jt in Nt){yr=Nt[Jt],Or=Ht[Jt];var Yn=T(sn[Jt].length,function(bn){return Lt.def(yr,"[",bn,"]")});Lt($e.cond(Yn.map(function(bn,Wn){return bn+"!=="+Or+"["+Wn+"]"}).join("||")).then(vr,".",_n[Jt],"(",Yn,");",Yn.map(function(bn,Wn){return Or+"["+Wn+"]="+bn}).join(";"),";"))}else{yr=Lt.def(At,".",Jt);var Tn=$e.cond(yr,"!==",Pt,".",Jt);Lt(Tn),Jt in Mr?Tn($e.cond(yr).then(vr,".enable(",Mr[Jt],");").else(vr,".disable(",Mr[Jt],");"),Pt,".",Jt,"=",yr,";"):Tn(vr,".",_n[Jt],"(",yr,");",Pt,".",Jt,"=",yr,";")}}}),Object.keys(Et.state).length===0&&Lt(Pt,".dirty=false;"),ct(Lt)}function Sa($e,ct,Et,nr){var vr=$e.shared,Ht=$e.current,Nt=vr.current,Pt=vr.gl,At;jr(Object.keys(Et)).forEach(function(Lt){var dt=Et[Lt];if(!(nr&&!nr(dt))){var Jt=dt.append($e,ct);if(Mr[Lt]){var yr=Mr[Lt];Ln(dt)?(At=$e.link(Jt,{stable:!0}),ct($e.cond(At).then(Pt,".enable(",yr,");").else(Pt,".disable(",yr,");")),ct(Nt,".",Lt,"=",At,";")):(ct($e.cond(Jt).then(Pt,".enable(",yr,");").else(Pt,".disable(",yr,");")),ct(Nt,".",Lt,"=",Jt,";"))}else if(Rn(Jt)){var Or=Ht[Lt];ct(Pt,".",_n[Lt],"(",Jt,");",Jt.map(function(Yn,Tn){return Or+"["+Tn+"]="+Yn}).join(";"),";")}else Ln(dt)?(At=$e.link(Jt,{stable:!0}),ct(Pt,".",_n[Lt],"(",At,");",Nt,".",Lt,"=",At,";")):ct(Pt,".",_n[Lt],"(",Jt,");",Nt,".",Lt,"=",Jt,";")}})}function ts($e,ct){Zr&&($e.instancing=ct.def($e.shared.extensions,".angle_instanced_arrays"))}function qi($e,ct,Et,nr,vr){var Ht=$e.shared,Nt=$e.stats,Pt=Ht.current,At=Ht.timer,Lt=Et.profile;function dt(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var Jt,yr;function Or(qn){Jt=ct.def(),qn(Jt,"=",dt(),";"),typeof vr=="string"?qn(Nt,".count+=",vr,";"):qn(Nt,".count++;"),fn&&(nr?(yr=ct.def(),qn(yr,"=",At,".getNumPendingQueries();")):qn(At,".beginQuery(",Nt,");"))}function Yn(qn){qn(Nt,".cpuTime+=",dt(),"-",Jt,";"),fn&&(nr?qn(At,".pushScopeStats(",yr,",",At,".getNumPendingQueries(),",Nt,");"):qn(At,".endQuery();"))}function Tn(qn){var yn=ct.def(Pt,".profile");ct(Pt,".profile=",qn,";"),ct.exit(Pt,".profile=",yn,";")}var bn;if(Lt){if(Ln(Lt)){Lt.enable?(Or(ct),Yn(ct.exit),Tn("true")):Tn("false");return}bn=Lt.append($e,ct),Tn(bn)}else bn=ct.def(Pt,".profile");var Wn=$e.block();Or(Wn),ct("if(",bn,"){",Wn,"}");var Un=$e.block();Yn(Un),ct.exit("if(",bn,"){",Un,"}")}function Hs($e,ct,Et,nr,vr){var Ht=$e.shared;function Nt(At){switch(At){case Ai:case Wo:case Jo:return 2;case di:case fs:case Tl:return 3;case xo:case ws:case bu:return 4;default:return 1}}function Pt(At,Lt,dt){var Jt=Ht.gl,yr=ct.def(At,".location"),Or=ct.def(Ht.attributes,"[",yr,"]"),Yn=dt.state,Tn=dt.buffer,bn=[dt.x,dt.y,dt.z,dt.w],Wn=["buffer","normalized","offset","stride"];function Un(){ct("if(!",Or,".buffer){",Jt,".enableVertexAttribArray(",yr,");}");var yn=dt.type,Dn;if(dt.size?Dn=ct.def(dt.size,"||",Lt):Dn=Lt,ct("if(",Or,".type!==",yn,"||",Or,".size!==",Dn,"||",Wn.map(function(fa){return Or+"."+fa+"!=="+dt[fa]}).join("||"),"){",Jt,".bindBuffer(",Ot,",",Tn,".buffer);",Jt,".vertexAttribPointer(",[yr,Dn,yn,dt.normalized,dt.stride,dt.offset],");",Or,".type=",yn,";",Or,".size=",Dn,";",Wn.map(function(fa){return Or+"."+fa+"="+dt[fa]+";"}).join(""),"}"),Zr){var In=dt.divisor;ct("if(",Or,".divisor!==",In,"){",$e.instancing,".vertexAttribDivisorANGLE(",[yr,In],");",Or,".divisor=",In,";}")}}function qn(){ct("if(",Or,".buffer){",Jt,".disableVertexAttribArray(",yr,");",Or,".buffer=null;","}if(",Ca.map(function(yn,Dn){return Or+"."+yn+"!=="+bn[Dn]}).join("||"),"){",Jt,".vertexAttrib4f(",yr,",",bn,");",Ca.map(function(yn,Dn){return Or+"."+yn+"="+bn[Dn]+";"}).join(""),"}")}Yn===La?Un():Yn===Va?qn():(ct("if(",Yn,"===",La,"){"),Un(),ct("}else{"),qn(),ct("}"))}nr.forEach(function(At){var Lt=At.name,dt=Et.attributes[Lt],Jt;if(dt){if(!vr(dt))return;Jt=dt.append($e,ct)}else{if(!vr(xa))return;var yr=$e.scopeAttrib(Lt);Jt={},Object.keys(new pr).forEach(function(Or){Jt[Or]=ct.def(yr,".",Or)})}Pt($e.link(At),Nt(At.info.type),Jt)})}function js($e,ct,Et,nr,vr,Ht){for(var Nt=$e.shared,Pt=Nt.gl,At,Lt=0;Lt1){for(var Ws=[],Ru=[],Zc=0;Zc>1)",Tn],");")}function In(){Et(bn,".drawArraysInstancedANGLE(",[yr,Or,Yn,Tn],");")}dt&&dt!=="null"?Un?Dn():(Et("if(",dt,"){"),Dn(),Et("}else{"),In(),Et("}")):In()}function yn(){function Dn(){Et(Ht+".drawElements("+[yr,Yn,Wn,Or+"<<(("+Wn+"-"+Pa+")>>1)"]+");")}function In(){Et(Ht+".drawArrays("+[yr,Or,Yn]+");")}dt&&dt!=="null"?Un?Dn():(Et("if(",dt,"){"),Dn(),Et("}else{"),In(),Et("}")):In()}Zr&&(typeof Tn!="number"||Tn>=0)?typeof Tn=="string"?(Et("if(",Tn,">0){"),qn(),Et("}else if(",Tn,"<0){"),yn(),Et("}")):qn():yn()}function ha($e,ct,Et,nr,vr){var Ht=Sn(),Nt=Ht.proc("body",vr);return Zr&&(Ht.instancing=Nt.def(Ht.shared.extensions,".angle_instanced_arrays")),$e(Ht,Nt,Et,nr),Ht.compile().body}function Ka($e,ct,Et,nr){ts($e,ct),Et.useVAO?Et.drawVAO?ct($e.shared.vao,".setVAO(",Et.drawVAO.append($e,ct),");"):ct($e.shared.vao,".setVAO(",$e.shared.vao,".targetVAO);"):(ct($e.shared.vao,".setVAO(null);"),Hs($e,ct,Et,nr.attributes,function(){return!0})),js($e,ct,Et,nr.uniforms,function(){return!0},!1),fl($e,ct,ct,Et)}function ti($e,ct){var Et=$e.proc("draw",1);ts($e,Et),Do($e,Et,ct.context),Ro($e,Et,ct.framebuffer),Uo($e,Et,ct),Sa($e,Et,ct.state),qi($e,Et,ct,!1,!0);var nr=ct.shader.progVar.append($e,Et);if(Et($e.shared.gl,".useProgram(",nr,".program);"),ct.shader.program)Ka($e,Et,ct,ct.shader.program);else{Et($e.shared.vao,".setVAO(null);");var vr=$e.global.def("{}"),Ht=Et.def(nr,".id"),Nt=Et.def(vr,"[",Ht,"]");Et($e.cond(Nt).then(Nt,".call(this,a0);").else(Nt,"=",vr,"[",Ht,"]=",$e.link(function(Pt){return ha(Ka,$e,ct,Pt,1)}),"(",nr,");",Nt,".call(this,a0);"))}Object.keys(ct.state).length>0&&Et($e.shared.current,".dirty=true;"),$e.shared.vao&&Et($e.shared.vao,".setVAO(null);")}function it($e,ct,Et,nr){$e.batchId="a1",ts($e,ct);function vr(){return!0}Hs($e,ct,Et,nr.attributes,vr),js($e,ct,Et,nr.uniforms,vr,!1),fl($e,ct,ct,Et)}function ir($e,ct,Et,nr){ts($e,ct);var vr=Et.contextDep,Ht=ct.def(),Nt="a0",Pt="a1",At=ct.def();$e.shared.props=At,$e.batchId=Ht;var Lt=$e.scope(),dt=$e.scope();ct(Lt.entry,"for(",Ht,"=0;",Ht,"<",Pt,";++",Ht,"){",At,"=",Nt,"[",Ht,"];",dt,"}",Lt.exit);function Jt(Wn){return Wn.contextDep&&vr||Wn.propDep}function yr(Wn){return!Jt(Wn)}if(Et.needsContext&&Do($e,dt,Et.context),Et.needsFramebuffer&&Ro($e,dt,Et.framebuffer),Sa($e,dt,Et.state,Jt),Et.profile&&Jt(Et.profile)&&qi($e,dt,Et,!1,!0),nr)Et.useVAO?Et.drawVAO?Jt(Et.drawVAO)?dt($e.shared.vao,".setVAO(",Et.drawVAO.append($e,dt),");"):Lt($e.shared.vao,".setVAO(",Et.drawVAO.append($e,Lt),");"):Lt($e.shared.vao,".setVAO(",$e.shared.vao,".targetVAO);"):(Lt($e.shared.vao,".setVAO(null);"),Hs($e,Lt,Et,nr.attributes,yr),Hs($e,dt,Et,nr.attributes,Jt)),js($e,Lt,Et,nr.uniforms,yr,!1),js($e,dt,Et,nr.uniforms,Jt,!0),fl($e,Lt,dt,Et);else{var Or=$e.global.def("{}"),Yn=Et.shader.progVar.append($e,dt),Tn=dt.def(Yn,".id"),bn=dt.def(Or,"[",Tn,"]");dt($e.shared.gl,".useProgram(",Yn,".program);","if(!",bn,"){",bn,"=",Or,"[",Tn,"]=",$e.link(function(Wn){return ha(it,$e,Et,Wn,2)}),"(",Yn,");}",bn,".call(this,a0[",Ht,"],",Ht,");")}}function or($e,ct){var Et=$e.proc("batch",2);$e.batchId="0",ts($e,Et);var nr=!1,vr=!0;Object.keys(ct.context).forEach(function(Or){nr=nr||ct.context[Or].propDep}),nr||(Do($e,Et,ct.context),vr=!1);var Ht=ct.framebuffer,Nt=!1;Ht?(Ht.propDep?nr=Nt=!0:Ht.contextDep&&nr&&(Nt=!0),Nt||Ro($e,Et,Ht)):Ro($e,Et,null),ct.state.viewport&&ct.state.viewport.propDep&&(nr=!0);function Pt(Or){return Or.contextDep&&nr||Or.propDep}Uo($e,Et,ct),Sa($e,Et,ct.state,function(Or){return!Pt(Or)}),(!ct.profile||!Pt(ct.profile))&&qi($e,Et,ct,!1,"a1"),ct.contextDep=nr,ct.needsContext=vr,ct.needsFramebuffer=Nt;var At=ct.shader.progVar;if(At.contextDep&&nr||At.propDep)ir($e,Et,ct,null);else{var Lt=At.append($e,Et);if(Et($e.shared.gl,".useProgram(",Lt,".program);"),ct.shader.program)ir($e,Et,ct,ct.shader.program);else{Et($e.shared.vao,".setVAO(null);");var dt=$e.global.def("{}"),Jt=Et.def(Lt,".id"),yr=Et.def(dt,"[",Jt,"]");Et($e.cond(yr).then(yr,".call(this,a0,a1);").else(yr,"=",dt,"[",Jt,"]=",$e.link(function(Or){return ha(ir,$e,ct,Or,2)}),"(",Lt,");",yr,".call(this,a0,a1);"))}}Object.keys(ct.state).length>0&&Et($e.shared.current,".dirty=true;"),$e.shared.vao&&Et($e.shared.vao,".setVAO(null);")}function Fn($e,ct){var Et=$e.proc("scope",3);$e.batchId="a2";var nr=$e.shared,vr=nr.current;if(Do($e,Et,ct.context),ct.framebuffer&&ct.framebuffer.append($e,Et),jr(Object.keys(ct.state)).forEach(function(Pt){var At=ct.state[Pt],Lt=At.append($e,Et);Rn(Lt)?Lt.forEach(function(dt,Jt){wn(dt)?Et.set($e.next[Pt],"["+Jt+"]",dt):Et.set($e.next[Pt],"["+Jt+"]",$e.link(dt,{stable:!0}))}):Ln(At)?Et.set(nr.next,"."+Pt,$e.link(Lt,{stable:!0})):Et.set(nr.next,"."+Pt,Lt)}),qi($e,Et,ct,!0,!0),[et,zt,Tt,Yt,bt].forEach(function(Pt){var At=ct.draw[Pt];if(At){var Lt=At.append($e,Et);wn(Lt)?Et.set(nr.draw,"."+Pt,Lt):Et.set(nr.draw,"."+Pt,$e.link(Lt),{stable:!0})}}),Object.keys(ct.uniforms).forEach(function(Pt){var At=ct.uniforms[Pt].append($e,Et);Array.isArray(At)&&(At="["+At.map(function(Lt){return wn(Lt)?Lt:$e.link(Lt,{stable:!0})})+"]"),Et.set(nr.uniforms,"["+$e.link(ot.id(Pt),{stable:!0})+"]",At)}),Object.keys(ct.attributes).forEach(function(Pt){var At=ct.attributes[Pt].append($e,Et),Lt=$e.scopeAttrib(Pt);Object.keys(new pr).forEach(function(dt){Et.set(Lt,"."+dt,At[dt])})}),ct.scopeVAO){var Ht=ct.scopeVAO.append($e,Et);wn(Ht)?Et.set(nr.vao,".targetVAO",Ht):Et.set(nr.vao,".targetVAO",$e.link(Ht,{stable:!0}))}function Nt(Pt){var At=ct.shader[Pt];if(At){var Lt=At.append($e,Et);wn(Lt)?Et.set(nr.shader,"."+Pt,Lt):Et.set(nr.shader,"."+Pt,$e.link(Lt,{stable:!0}))}}Nt(ke),Nt(Ne),Object.keys(ct.state).length>0&&(Et(vr,".dirty=true;"),Et.exit(vr,".dirty=true;")),Et("a1(",$e.shared.context,",a0,",$e.batchId,");")}function Ga($e){if(!(typeof $e!="object"||Rn($e))){for(var ct=Object.keys($e),Et=0;Et=0;--ha){var Ka=jn[ha];Ka&&Ka(Sr,null,0)}ht.flush(),Kr&&Kr.update()}function Ra(){!sa&&jn.length>0&&(sa=v.next(ca))}function go(){sa&&(v.cancel(ca),sa=null)}function No(ha){ha.preventDefault(),cr=!0,go(),oa.forEach(function(Ka){Ka()})}function ja(ha){ht.getError(),cr=!1,dr.restore(),Gn.restore(),Zr.restore(),kr.restore(),Mr.restore(),_n.restore(),hn.restore(),Kr&&Kr.restore(),an.procs.refresh(),Ra(),rn.forEach(function(Ka){Ka()})}wn&&(wn.addEventListener(Ri,No,!1),wn.addEventListener(To,ja,!1));function cl(){jn.length=0,go(),wn&&(wn.removeEventListener(Ri,No),wn.removeEventListener(To,ja)),Gn.clear(),_n.clear(),Mr.clear(),hn.clear(),kr.clear(),Cr.clear(),Zr.clear(),Kr&&Kr.clear(),Sn.forEach(function(ha){ha()})}function Ci(ha){function Ka(Ht){var Nt=e({},Ht);delete Nt.uniforms,delete Nt.attributes,delete Nt.context,delete Nt.vao,"stencil"in Nt&&Nt.stencil.op&&(Nt.stencil.opBack=Nt.stencil.opFront=Nt.stencil.op,delete Nt.stencil.op);function Pt(At){if(At in Nt){var Lt=Nt[At];delete Nt[At],Object.keys(Lt).forEach(function(dt){Nt[At+"."+dt]=Lt[dt]})}}return Pt("blend"),Pt("depth"),Pt("cull"),Pt("stencil"),Pt("polygonOffset"),Pt("scissor"),Pt("sample"),"vao"in Ht&&(Nt.vao=Ht.vao),Nt}function ti(Ht,Nt){var Pt={},At={};return Object.keys(Ht).forEach(function(Lt){var dt=Ht[Lt];if(h.isDynamic(dt)){At[Lt]=h.unbox(dt,Lt);return}else if(Nt&&Array.isArray(dt)){for(var Jt=0;Jt0)return $e.call(this,nr(Ht|0),Ht|0)}else if(Array.isArray(Ht)){if(Ht.length)return $e.call(this,Ht,Ht.length)}else return Pn.call(this,Ht)}return e(vr,{stats:Ga,destroy:function(){Li.destroy()}})}var Ts=_n.setFBO=Ci({framebuffer:h.define.call(null,Qo,"framebuffer")});function es(ha,Ka){var ti=0;an.procs.poll();var it=Ka.color;it&&(ht.clearColor(+it[0]||0,+it[1]||0,+it[2]||0,+it[3]||0),ti|=Ps),"depth"in Ka&&(ht.clearDepth(+Ka.depth),ti|=Yo),"stencil"in Ka&&(ht.clearStencil(Ka.stencil|0),ti|=ma),ht.clear(ti)}function Ds(ha){if("framebuffer"in ha)if(ha.framebuffer&&ha.framebuffer_reglType==="framebufferCube")for(var Ka=0;Ka<6;++Ka)Ts(e({framebuffer:ha.framebuffer.faces[Ka]},ha),es);else Ts(ha,es);else es(null,ha)}function Do(ha){jn.push(ha);function Ka(){var ti=wu(jn,ha);function it(){var ir=wu(jn,it);jn[ir]=jn[jn.length-1],jn.length-=1,jn.length<=0&&go()}jn[ti]=it}return Ra(),{cancel:Ka}}function Ro(){var ha=Qr.viewport,Ka=Qr.scissor_box;ha[0]=ha[1]=Ka[0]=Ka[1]=0,Sr.viewportWidth=Sr.framebufferWidth=Sr.drawingBufferWidth=ha[2]=Ka[2]=ht.drawingBufferWidth,Sr.viewportHeight=Sr.framebufferHeight=Sr.drawingBufferHeight=ha[3]=Ka[3]=ht.drawingBufferHeight}function Uo(){Sr.tick+=1,Sr.time=ts(),Ro(),an.procs.poll()}function Sa(){kr.refresh(),Ro(),an.procs.refresh(),Kr&&Kr.update()}function ts(){return(d()-Hn)/1e3}Sa();function qi(ha,Ka){var ti;switch(ha){case"frame":return Do(Ka);case"lost":ti=oa;break;case"restore":ti=rn;break;case"destroy":ti=Sn;break;default:}return ti.push(Ka),{cancel:function(){for(var it=0;it=0},read:Jr,destroy:cl,_gl:ht,_refresh:Sa,poll:function(){Uo(),Kr&&Kr.update()},now:ts,stats:Rr,getCachedCode:Hs,preloadCachedCode:js});return ot.onDone(null,fl),fl}return Dc}))});var EIe=ne((Gpr,SIe)=>{"use strict";var Jqt=s1();SIe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},AIe(t)?t={container:t}:Qqt(t)?t={container:t}:eBt(t)?t={gl:t}:t=Jqt(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=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}AIe(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=MIe(),t.container.appendChild(t.canvas),TIe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=MIe(),t.container.appendChild(t.canvas),TIe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(a){}return t.gl}),t.gl};function TIe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function AIe(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function Qqt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function eBt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function MIe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var CIe=ne((Hpr,kIe)=>{"use strict";var tBt=uW(),rBt=[32,126];kIe.exports=nBt;function nBt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),n=e.font,a=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],i=e.chars||rBt;if(n&&typeof n!="string"&&(n=tBt(n)),!Array.isArray(i))i=String(i).split("");else if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var o=[],s=i[0],l=0;s<=i[1];s++)o[l++]=String.fromCharCode(s);i=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=a[0]/2,f=a[1]/2,s=0;st[0]-a[0]/2&&(c=a[0]/2,f+=a[1]);return r}});var dW=ne(Gc=>{"use strict";"use restrict";var hW=32;Gc.INT_BITS=hW;Gc.INT_MAX=2147483647;Gc.INT_MIN=-1<0)-(e<0)};Gc.abs=function(e){var t=e>>hW-1;return(e^t)-t};Gc.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};Gc.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};Gc.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function LIe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}Gc.countTrailingZeros=LIe;Gc.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};Gc.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};Gc.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var m6=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,a=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--a;e[t]=n<>>8&255]<<16|m6[e>>>16&255]<<8|m6[e>>>24&255]};Gc.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};Gc.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};Gc.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};Gc.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};Gc.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>LIe(e)+1}});var DIe=ne((Wpr,PIe)=>{"use strict";function FIe(e,t,r){var n=e[r]|0;if(n<=0)return[];var a=new Array(n),i;if(r===e.length-1)for(i=0;i0)return aBt(e|0,t);break;case"object":if(typeof e.length=="number")return FIe(e,t,0);break}return[]}PIe.exports=iBt});var XIe=ne(Ss=>{"use strict";var ry=dW(),Wh=DIe(),RIe=Ux().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Wh([32,0]),UINT16:Wh([32,0]),UINT32:Wh([32,0]),BIGUINT64:Wh([32,0]),INT8:Wh([32,0]),INT16:Wh([32,0]),INT32:Wh([32,0]),BIGINT64:Wh([32,0]),FLOAT:Wh([32,0]),DOUBLE:Wh([32,0]),DATA:Wh([32,0]),UINT8C:Wh([32,0]),BUFFER:Wh([32,0])});var oBt=typeof Uint8ClampedArray!="undefined",sBt=typeof BigUint64Array!="undefined",lBt=typeof BigInt64Array!="undefined",nf=window.__TYPEDARRAY_POOL;nf.UINT8C||(nf.UINT8C=Wh([32,0]));nf.BIGUINT64||(nf.BIGUINT64=Wh([32,0]));nf.BIGINT64||(nf.BIGINT64=Wh([32,0]));nf.BUFFER||(nf.BUFFER=Wh([32,0]));var E9=nf.DATA,k9=nf.BUFFER;Ss.free=function(t){if(RIe.isBuffer(t))k9[ry.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=ry.log2(r)|0;E9[n].push(t)}};function IIe(e){if(e){var t=e.length||e.byteLength,r=ry.log2(t);E9[r].push(e)}}function uBt(e){IIe(e.buffer)}Ss.freeUint8=Ss.freeUint16=Ss.freeUint32=Ss.freeBigUint64=Ss.freeInt8=Ss.freeInt16=Ss.freeInt32=Ss.freeBigInt64=Ss.freeFloat32=Ss.freeFloat=Ss.freeFloat64=Ss.freeDouble=Ss.freeUint8Clamped=Ss.freeDataView=uBt;Ss.freeArrayBuffer=IIe;Ss.freeBuffer=function(t){k9[ry.log2(t.length)].push(t)};Ss.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return nv(t);switch(r){case"uint8":return vW(t);case"uint16":return zIe(t);case"uint32":return qIe(t);case"int8":return BIe(t);case"int16":return OIe(t);case"int32":return NIe(t);case"float":case"float32":return UIe(t);case"double":case"float64":return VIe(t);case"uint8_clamped":return GIe(t);case"bigint64":return jIe(t);case"biguint64":return HIe(t);case"buffer":return YIe(t);case"data":case"dataview":return WIe(t);default:return null}return null};function nv(t){var t=ry.nextPow2(t),r=ry.log2(t),n=E9[r];return n.length>0?n.pop():new ArrayBuffer(t)}Ss.mallocArrayBuffer=nv;function vW(e){return new Uint8Array(nv(e),0,e)}Ss.mallocUint8=vW;function zIe(e){return new Uint16Array(nv(2*e),0,e)}Ss.mallocUint16=zIe;function qIe(e){return new Uint32Array(nv(4*e),0,e)}Ss.mallocUint32=qIe;function BIe(e){return new Int8Array(nv(e),0,e)}Ss.mallocInt8=BIe;function OIe(e){return new Int16Array(nv(2*e),0,e)}Ss.mallocInt16=OIe;function NIe(e){return new Int32Array(nv(4*e),0,e)}Ss.mallocInt32=NIe;function UIe(e){return new Float32Array(nv(4*e),0,e)}Ss.mallocFloat32=Ss.mallocFloat=UIe;function VIe(e){return new Float64Array(nv(8*e),0,e)}Ss.mallocFloat64=Ss.mallocDouble=VIe;function GIe(e){return oBt?new Uint8ClampedArray(nv(e),0,e):vW(e)}Ss.mallocUint8Clamped=GIe;function HIe(e){return sBt?new BigUint64Array(nv(8*e),0,e):null}Ss.mallocBigUint64=HIe;function jIe(e){return lBt?new BigInt64Array(nv(8*e),0,e):null}Ss.mallocBigInt64=jIe;function WIe(e){return new DataView(nv(e),0,e)}Ss.mallocDataView=WIe;function YIe(e){e=ry.nextPow2(e);var t=ry.log2(e),r=k9[t];return r.length>0?r.pop():new RIe(e)}Ss.mallocBuffer=YIe;Ss.clearCache=function(){for(var t=0;t<32;++t)nf.UINT8[t].length=0,nf.UINT16[t].length=0,nf.UINT32[t].length=0,nf.INT8[t].length=0,nf.INT16[t].length=0,nf.INT32[t].length=0,nf.FLOAT[t].length=0,nf.DOUBLE[t].length=0,nf.BIGUINT64[t].length=0,nf.BIGINT64[t].length=0,nf.UINT8C[t].length=0,E9[t].length=0,k9[t].length=0}});var $Ie=ne((Xpr,ZIe)=>{"use strict";var cBt=Object.prototype.toString;ZIe.exports=function(e){var t;return cBt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var pW=ne((Zpr,KIe)=>{KIe.exports=function(t,r){r||(r=[0,""]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var eze=ne(($pr,QIe)=>{"use strict";var fBt=pW();QIe.exports=JIe;var y6=96;function gW(e,t){var r=fBt(getComputedStyle(e).getPropertyValue(t));return r[0]*JIe(r[1],e)}function hBt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=gW(r,"font-size")/128;return t.removeChild(r),n}function JIe(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return hBt(e,t);case"em":return gW(t,"font-size");case"rem":return gW(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return y6;case"cm":return y6/2.54;case"mm":return y6/25.4;case"pt":return y6/72;case"pc":return y6/6}return 1}});var nze=ne((Kpr,rze)=>{"use strict";rze.exports=F9;var dBt=F9.canvas=document.createElement("canvas"),C9=dBt.getContext("2d"),tze=L9([32,126]);F9.createPairs=L9;F9.ascii=tze;function F9(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,a=16,i=.05;t&&(t.length===2&&typeof t[0]=="number"?n=L9(t):Array.isArray(t)?n=t:(t.o?n=L9(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(i=t.threshold))),n||(n=tze),C9.font=a+"px "+e;for(var o=0;oa*i){var c=(u-l)/a;r[s]=c*1e3}}return r}function L9(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),a=e[0];a{"use strict";oze.exports=ny;ny.canvas=document.createElement("canvas");ny.cache={};function ny(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var n=t.size||t.fontSize||t.em||48,a=t.weight||t.fontWeight||"",i=t.style||t.fontStyle||"",o=[i,a,n].join(" ")+"px "+r,s=t.origin||"top";if(ny.cache[r]&&n<=ny.cache[r].em)return aze(ny.cache[r],s);var l=t.canvas||ny.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var h="H",v={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(h,0,0);var d=u1(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(h,0,f);var m=u1(u.getImageData(0,0,f,f));v.lineHeight=v.bottom=f-m+d,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(h,0,f);var x=u1(u.getImageData(0,0,f,f)),g=f-x-1+d;v.baseline=v.alphabetic=g,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(h,0,f*.5);var E=u1(u.getImageData(0,0,f,f));v.median=v.middle=f-E-1+d-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(h,0,f*.5);var M=u1(u.getImageData(0,0,f,f));v.hanging=f-M-1+d-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(h,0,f);var w=u1(u.getImageData(0,0,f,f));if(v.ideographic=f-w-1+d,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),v.upper=u1(u.getImageData(0,0,f,f)),v.capHeight=v.baseline-v.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),v.lower=u1(u.getImageData(0,0,f,f)),v.xHeight=v.baseline-v.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),v.tittle=u1(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),v.ascent=u1(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),v.descent=ize(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var k=ize(u.getImageData(0,0,f,f));v.overshoot=k-g}for(var y in v)v[y]/=n;return v.em=n,ny.cache[r]=v,aze(v,s)}function aze(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var n in e)n!=="em"&&(r[n]=e[n]-t);return r}function u1(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var fze=ne((Qpr,cze)=>{"use strict";var xw=_Ie(),vBt=s1(),pBt=wIe(),gBt=EIe(),mBt=Zj(),mW=Hm(),yBt=CIe(),ay=XIe(),xBt=sw(),bBt=$Ie(),_Bt=pW(),wBt=eze(),TBt=nze(),ABt=Uc(),MBt=sze(),SBt=M2(),EBt=dW(),lze=EBt.nextPow2,uze=new mBt,D9=!1;document.body&&(P9=document.body.appendChild(document.createElement("div")),P9.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(P9).fontStretch&&(D9=!0),document.body.removeChild(P9));var P9,bl=function(t){kBt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=gBt(t),this.shader=uze.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||pBt({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),uze.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(bBt(t)?t:{})};bl.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(a,i){return[i.atlas.width,i.atlas.height]},atlasDim:function(a,i){return[i.atlas.cols,i.atlas.rows]},atlas:function(a,i){return i.atlas.texture},charStep:function(a,i){return i.atlas.step},em:function(a,i){return i.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:` +`),Rr;if(Xe&&(Rr=y0(Tr),Xe[Rr]))return Xe[Rr].apply(null,Et);var Lr=Function.apply(null,xt.concat(Tr));return Xe&&(Xe[Rr]=Lr),Lr.apply(null,Et)}return{global:dr,link:St,block:Pt,proc:Or,scope:$t,cond:Ht,compile:$r}}var ki="xyzw".split(""),Ci=5121,qi=1,pi=2,Un=0,Gn=1,Zi=2,na=3,Ha=4,Qa=5,Ya=6,ho="dither",Pa="blend.enable",Js="blend.color",fs="blend.equation",Io="blend.func",oi="depth.enable",ro="depth.func",Go="depth.range",Qs="depth.mask",zl="colorMask",cu="cull.enable",Zu="cull.face",mc="frontFace",Yl="lineWidth",lf="polygonOffset.enable",$u="polygonOffset.offset",ph="sample.alpha",gh="sample.enable",uf="sample.coverage",Ku="stencil.enable",fu="stencil.mask",Ju="stencil.func",Qu="stencil.opFront",Wd="stencil.opBack",x0="scissor.enable",Bf="scissor.box",Al="viewport",Xl="profile",cf="framebuffer",jh="vert",Wh="frag",Yh="elements",hu="primitive",Mu="count",_i="offset",Su="instances",Me="vao",Ce="Width",Be="Height",Ne=cf+Ce,Qe=cf+Be,Je=Al+Ce,lt=Al+Be,Gt="drawingBuffer",Zt=Gt+Ce,Nt=Gt+Be,Kt=[Io,fs,Ju,Qu,Wd,uf,Al,Bf,$u],ur=34962,Sr=34963,Br=2884,ln=3042,wn=3024,In=2960,gi=2929,Bi=3089,mi=32823,ia=32926,ua=32928,lo=5126,Bo=35664,Ua=35665,ls=35666,cl=5124,Eu=35667,el=35668,yc=35669,wi=35670,Di=35671,fl=35672,Fc=35673,du=35674,ms=35675,ff=35676,ku=35678,hl=35680,mh=4,W=1028,te=1029,ve=2304,Se=2305,Ee=32775,Re=32776,rt=519,He=7680,pt=0,Ft=1,Rt=32774,ir=513,nr=36160,Cr=36064,Vr={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},sr={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},br={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},kr={cw:ve,ccw:Se};function Gr(Pe){return Array.isArray(Pe)||or(Pe)||fr(Pe)}function Wr(Pe){return Pe.sort(function(Xe,at){return Xe===Al?-1:at===Al?1:Xe=1,xt>=2,Xe)}else if(at===Ha){var Et=Pe.data;return new Ar(Et.thisDep,Et.contextDep,Et.propDep,Xe)}else{if(at===Qa)return new Ar(!1,!1,!1,Xe);if(at===Ya){for(var Bt=!1,St=!1,Pt=!1,$t=0;$t=1&&(St=!0),dr>=2&&(Pt=!0)}else Ht.type===Ha&&(Bt=Bt||Ht.data.thisDep,St=St||Ht.data.contextDep,Pt=Pt||Ht.data.propDep)}return new Ar(Bt,St,Pt,Xe)}else return new Ar(at===na,at===Zi,at===Gn,Xe)}}var ai=new Ar(!1,!1,!1,function(){});function Mi(Pe,Xe,at,xt,Et,Bt,St,Pt,$t,Ht,dr,Xr,Or,$r,Er,Tr){var Rr=Ht.Record,Lr={add:32774,subtract:32778,"reverse subtract":32779};at.ext_blend_minmax&&(Lr.min=Ee,Lr.max=Re);var an=at.angle_instanced_arrays,on=at.webgl_draw_buffers,Nn=at.oes_vertex_array_object,Yn={dirty:!0,profile:Tr.profile},yi={},Sn=[],An={},li={};function Vn(ar){return ar.replace(".","_")}function jn(ar,gr,Pr){var pn=Vn(ar);Sn.push(ar),yi[pn]=Yn[pn]=!!Pr,An[pn]=gr}function Wn(ar,gr,Pr){var pn=Vn(ar);Sn.push(ar),Array.isArray(Pr)?(Yn[pn]=Pr.slice(),yi[pn]=Pr.slice()):Yn[pn]=yi[pn]=Pr,li[pn]=gr}function si(ar){return!!isNaN(ar)}jn(ho,wn),jn(Pa,ln),Wn(Js,"blendColor",[0,0,0,0]),Wn(fs,"blendEquationSeparate",[Rt,Rt]),Wn(Io,"blendFuncSeparate",[Ft,pt,Ft,pt]),jn(oi,gi,!0),Wn(ro,"depthFunc",ir),Wn(Go,"depthRange",[0,1]),Wn(Qs,"depthMask",!0),Wn(zl,zl,[!0,!0,!0,!0]),jn(cu,Br),Wn(Zu,"cullFace",te),Wn(mc,mc,Se),Wn(Yl,Yl,1),jn(lf,mi),Wn($u,"polygonOffset",[0,0]),jn(ph,ia),jn(gh,ua),Wn(uf,"sampleCoverage",[1,!1]),jn(Ku,In),Wn(fu,"stencilMask",-1),Wn(Ju,"stencilFunc",[rt,0,-1]),Wn(Qu,"stencilOpSeparate",[W,He,He,He]),Wn(Wd,"stencilOpSeparate",[te,He,He,He]),jn(x0,Bi),Wn(Bf,"scissor",[0,0,Pe.drawingBufferWidth,Pe.drawingBufferHeight]),Wn(Al,Al,[0,0,Pe.drawingBufferWidth,Pe.drawingBufferHeight]);var zi={gl:Pe,context:Or,strings:Xe,next:yi,current:Yn,draw:Xr,elements:Bt,buffer:Et,shader:dr,attributes:Ht.state,vao:Ht,uniforms:$t,framebuffer:Pt,extensions:at,timer:$r,isBufferArgs:Gr},da={primTypes:ss,compareFuncs:sr,blendFuncs:Vr,blendEquations:Lr,stencilOps:br,glTypes:Cn,orientationType:kr};on&&(da.backBuffer=[te],da.drawBuffer=T(xt.maxDrawbuffers,function(ar){return ar===0?[0]:T(ar,function(gr){return Cr+gr})}));var ui=0;function Li(){var ar=On({cache:Er}),gr=ar.link,Pr=ar.global;ar.id=ui++,ar.batchId="0";var pn=gr(zi),Mn=ar.shared={props:"a0"};Object.keys(zi).forEach(function(zr){Mn[zr]=Pr.def(pn,".",zr)});var sn=ar.next={},tn=ar.current={};Object.keys(li).forEach(function(zr){Array.isArray(Yn[zr])&&(sn[zr]=Pr.def(Mn.next,".",zr),tn[zr]=Pr.def(Mn.current,".",zr))});var Hr=ar.constants={};Object.keys(da).forEach(function(zr){Hr[zr]=Pr.def(JSON.stringify(da[zr]))}),ar.invoke=function(zr,yr){switch(yr.type){case Un:var hn=["this",Mn.context,Mn.props,ar.batchId];return zr.def(gr(yr.data),".call(",hn.slice(0,Math.max(yr.data.length+1,4)),")");case Gn:return zr.def(Mn.props,yr.data);case Zi:return zr.def(Mn.context,yr.data);case na:return zr.def("this",yr.data);case Ha:return yr.data.append(ar,zr),yr.data.ref;case Qa:return yr.data.toString();case Ya:return yr.data.map(function(kn){return ar.invoke(zr,kn)})}},ar.attribCache={};var Mr={};return ar.scopeAttrib=function(zr){var yr=Xe.id(zr);if(yr in Mr)return Mr[yr];var hn=Ht.scope[yr];hn||(hn=Ht.scope[yr]=new Rr);var kn=Mr[yr]=gr(hn);return kn},ar}function Ki(ar){var gr=ar.static,Pr=ar.dynamic,pn;if(Xl in gr){var Mn=!!gr[Xl];pn=zn(function(tn,Hr){return Mn}),pn.enable=Mn}else if(Xl in Pr){var sn=Pr[Xl];pn=Zn(sn,function(tn,Hr){return tn.invoke(Hr,sn)})}return pn}function ca(ar,gr){var Pr=ar.static,pn=ar.dynamic;if(cf in Pr){var Mn=Pr[cf];return Mn?(Mn=Pt.getFramebuffer(Mn),zn(function(tn,Hr){var Mr=tn.link(Mn),zr=tn.shared;Hr.set(zr.framebuffer,".next",Mr);var yr=zr.context;return Hr.set(yr,"."+Ne,Mr+".width"),Hr.set(yr,"."+Qe,Mr+".height"),Mr})):zn(function(tn,Hr){var Mr=tn.shared;Hr.set(Mr.framebuffer,".next","null");var zr=Mr.context;return Hr.set(zr,"."+Ne,zr+"."+Zt),Hr.set(zr,"."+Qe,zr+"."+Nt),"null"})}else if(cf in pn){var sn=pn[cf];return Zn(sn,function(tn,Hr){var Mr=tn.invoke(Hr,sn),zr=tn.shared,yr=zr.framebuffer,hn=Hr.def(yr,".getFramebuffer(",Mr,")");Hr.set(yr,".next",hn);var kn=zr.context;return Hr.set(kn,"."+Ne,hn+"?"+hn+".width:"+kn+"."+Zt),Hr.set(kn,"."+Qe,hn+"?"+hn+".height:"+kn+"."+Nt),hn})}else return null}function Ia(ar,gr,Pr){var pn=ar.static,Mn=ar.dynamic;function sn(Mr){if(Mr in pn){var zr=pn[Mr],yr=!0,hn=zr.x|0,kn=zr.y|0,Xn,sa;return"width"in zr?Xn=zr.width|0:yr=!1,"height"in zr?sa=zr.height|0:yr=!1,new Ar(!yr&&gr&&gr.thisDep,!yr&&gr&&gr.contextDep,!yr&&gr&&gr.propDep,function(fa,Qi){var $i=fa.shared.context,Fi=Xn;"width"in zr||(Fi=Qi.def($i,".",Ne,"-",hn));var ji=sa;return"height"in zr||(ji=Qi.def($i,".",Qe,"-",kn)),[hn,kn,Fi,ji]})}else if(Mr in Mn){var Oi=Mn[Mr],Pi=Zn(Oi,function(fa,Qi){var $i=fa.invoke(Qi,Oi),Fi=fa.shared.context,ji=Qi.def($i,".x|0"),Wi=Qi.def($i,".y|0"),Fa=Qi.def('"width" in ',$i,"?",$i,".width|0:","(",Fi,".",Ne,"-",ji,")"),Vs=Qi.def('"height" in ',$i,"?",$i,".height|0:","(",Fi,".",Qe,"-",Wi,")");return[ji,Wi,Fa,Vs]});return gr&&(Pi.thisDep=Pi.thisDep||gr.thisDep,Pi.contextDep=Pi.contextDep||gr.contextDep,Pi.propDep=Pi.propDep||gr.propDep),Pi}else return gr?new Ar(gr.thisDep,gr.contextDep,gr.propDep,function(fa,Qi){var $i=fa.shared.context;return[0,0,Qi.def($i,".",Ne),Qi.def($i,".",Qe)]}):null}var tn=sn(Al);if(tn){var Hr=tn;tn=new Ar(tn.thisDep,tn.contextDep,tn.propDep,function(Mr,zr){var yr=Hr.append(Mr,zr),hn=Mr.shared.context;return zr.set(hn,"."+Je,yr[2]),zr.set(hn,"."+lt,yr[3]),yr})}return{viewport:tn,scissor_box:sn(Bf)}}function Os(ar,gr){var Pr=ar.static,pn=typeof Pr[Wh]=="string"&&typeof Pr[jh]=="string";if(pn){if(Object.keys(gr.dynamic).length>0)return null;var Mn=gr.static,sn=Object.keys(Mn);if(sn.length>0&&typeof Mn[sn[0]]=="number"){for(var tn=[],Hr=0;Hr"+ji+"?"+yr+".constant["+ji+"]:0;"}).join(""),"}}else{","if(",Xn,"(",yr,".buffer)){",fa,"=",sa,".createStream(",ur,",",yr,".buffer);","}else{",fa,"=",sa,".getBuffer(",yr,".buffer);","}",Qi,'="type" in ',yr,"?",kn.glTypes,"[",yr,".type]:",fa,".dtype;",Oi.normalized,"=!!",yr,".normalized;");function $i(Fi){zr(Oi[Fi],"=",yr,".",Fi,"|0;")}return $i("size"),$i("offset"),$i("stride"),$i("divisor"),zr("}}"),zr.exit("if(",Oi.isStream,"){",sa,".destroyStream(",fa,");","}"),Oi}Mn[sn]=Zn(tn,Hr)}),Mn}function po(ar){var gr=ar.static,Pr=ar.dynamic,pn={};return Object.keys(gr).forEach(function(Mn){var sn=gr[Mn];pn[Mn]=zn(function(tn,Hr){return typeof sn=="number"||typeof sn=="boolean"?""+sn:tn.link(sn)})}),Object.keys(Pr).forEach(function(Mn){var sn=Pr[Mn];pn[Mn]=Zn(sn,function(tn,Hr){return tn.invoke(Hr,sn)})}),pn}function Xo(ar,gr,Pr,pn,Mn){var sn=ar.static,tn=ar.dynamic,Hr=Os(ar,gr),Mr=ca(ar,Mn),zr=Ia(ar,Mr,Mn),yr=Na(ar,Mn),hn=Ns(ar,Mn),kn=Ss(ar,Mn,Hr);function Xn($i){var Fi=zr[$i];Fi&&(hn[$i]=Fi)}Xn(Al),Xn(Vn(Bf));var sa=Object.keys(hn).length>0,Oi={framebuffer:Mr,draw:yr,shader:kn,state:hn,dirty:sa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Oi.profile=Ki(ar,Mn),Oi.uniforms=vo(Pr,Mn),Oi.drawVAO=Oi.scopeVAO=yr.vao,!Oi.drawVAO&&kn.program&&!Hr&&at.angle_instanced_arrays&&yr.static.elements){var Pi=!0,fa=kn.program.attributes.map(function($i){var Fi=gr.static[$i];return Pi=Pi&&!!Fi,Fi});if(Pi&&fa.length>0){var Qi=Ht.getVAO(Ht.createVAO({attributes:fa,elements:yr.static.elements}));Oi.drawVAO=new Ar(null,null,null,function($i,Fi){return $i.link(Qi)}),Oi.useVAO=!0}}return Hr?Oi.useVAO=!0:Oi.attributes=_o(gr,Mn),Oi.context=po(pn,Mn),Oi}function no(ar,gr,Pr){var pn=ar.shared,Mn=pn.context,sn=ar.scope();Object.keys(Pr).forEach(function(tn){gr.save(Mn,"."+tn);var Hr=Pr[tn],Mr=Hr.append(ar,gr);Array.isArray(Mr)?sn(Mn,".",tn,"=[",Mr.join(),"];"):sn(Mn,".",tn,"=",Mr,";")}),gr(sn)}function Us(ar,gr,Pr,pn){var Mn=ar.shared,sn=Mn.gl,tn=Mn.framebuffer,Hr;on&&(Hr=gr.def(Mn.extensions,".webgl_draw_buffers"));var Mr=ar.constants,zr=Mr.drawBuffer,yr=Mr.backBuffer,hn;Pr?hn=Pr.append(ar,gr):hn=gr.def(tn,".next"),pn||gr("if(",hn,"!==",tn,".cur){"),gr("if(",hn,"){",sn,".bindFramebuffer(",nr,",",hn,".framebuffer);"),on&&gr(Hr,".drawBuffersWEBGL(",zr,"[",hn,".colorAttachments.length]);"),gr("}else{",sn,".bindFramebuffer(",nr,",null);"),on&&gr(Hr,".drawBuffersWEBGL(",yr,");"),gr("}",tn,".cur=",hn,";"),pn||gr("}")}function ql(ar,gr,Pr){var pn=ar.shared,Mn=pn.gl,sn=ar.current,tn=ar.next,Hr=pn.current,Mr=pn.next,zr=ar.cond(Hr,".dirty");Sn.forEach(function(yr){var hn=Vn(yr);if(!(hn in Pr.state)){var kn,Xn;if(hn in tn){kn=tn[hn],Xn=sn[hn];var sa=T(Yn[hn].length,function(Pi){return zr.def(kn,"[",Pi,"]")});zr(ar.cond(sa.map(function(Pi,fa){return Pi+"!=="+Xn+"["+fa+"]"}).join("||")).then(Mn,".",li[hn],"(",sa,");",sa.map(function(Pi,fa){return Xn+"["+fa+"]="+Pi}).join(";"),";"))}else{kn=zr.def(Mr,".",hn);var Oi=ar.cond(kn,"!==",Hr,".",hn);zr(Oi),hn in An?Oi(ar.cond(kn).then(Mn,".enable(",An[hn],");").else(Mn,".disable(",An[hn],");"),Hr,".",hn,"=",kn,";"):Oi(Mn,".",li[hn],"(",kn,");",Hr,".",hn,"=",kn,";")}}}),Object.keys(Pr.state).length===0&&zr(Hr,".dirty=false;"),gr(zr)}function Ta(ar,gr,Pr,pn){var Mn=ar.shared,sn=ar.current,tn=Mn.current,Hr=Mn.gl,Mr;Wr(Object.keys(Pr)).forEach(function(zr){var yr=Pr[zr];if(!(pn&&!pn(yr))){var hn=yr.append(ar,gr);if(An[zr]){var kn=An[zr];En(yr)?(Mr=ar.link(hn,{stable:!0}),gr(ar.cond(Mr).then(Hr,".enable(",kn,");").else(Hr,".disable(",kn,");")),gr(tn,".",zr,"=",Mr,";")):(gr(ar.cond(hn).then(Hr,".enable(",kn,");").else(Hr,".disable(",kn,");")),gr(tn,".",zr,"=",hn,";"))}else if(bn(hn)){var Xn=sn[zr];gr(Hr,".",li[zr],"(",hn,");",hn.map(function(sa,Oi){return Xn+"["+Oi+"]="+sa}).join(";"),";")}else En(yr)?(Mr=ar.link(hn,{stable:!0}),gr(Hr,".",li[zr],"(",Mr,");",tn,".",zr,"=",Mr,";")):gr(Hr,".",li[zr],"(",hn,");",tn,".",zr,"=",hn,";")}})}function vu(ar,gr){an&&(ar.instancing=gr.def(ar.shared.extensions,".angle_instanced_arrays"))}function ys(ar,gr,Pr,pn,Mn){var sn=ar.shared,tn=ar.stats,Hr=sn.current,Mr=sn.timer,zr=Pr.profile;function yr(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var hn,kn;function Xn($i){hn=gr.def(),$i(hn,"=",yr(),";"),typeof Mn=="string"?$i(tn,".count+=",Mn,";"):$i(tn,".count++;"),$r&&(pn?(kn=gr.def(),$i(kn,"=",Mr,".getNumPendingQueries();")):$i(Mr,".beginQuery(",tn,");"))}function sa($i){$i(tn,".cpuTime+=",yr(),"-",hn,";"),$r&&(pn?$i(Mr,".pushScopeStats(",kn,",",Mr,".getNumPendingQueries(),",tn,");"):$i(Mr,".endQuery();"))}function Oi($i){var Fi=gr.def(Hr,".profile");gr(Hr,".profile=",$i,";"),gr.exit(Hr,".profile=",Fi,";")}var Pi;if(zr){if(En(zr)){zr.enable?(Xn(gr),sa(gr.exit),Oi("true")):Oi("false");return}Pi=zr.append(ar,gr),Oi(Pi)}else Pi=gr.def(Hr,".profile");var fa=ar.block();Xn(fa),gr("if(",Pi,"){",fa,"}");var Qi=ar.block();sa(Qi),gr.exit("if(",Pi,"){",Qi,"}")}function xc(ar,gr,Pr,pn,Mn){var sn=ar.shared;function tn(Mr){switch(Mr){case Bo:case Eu:case Di:return 2;case Ua:case el:case fl:return 3;case ls:case yc:case Fc:return 4;default:return 1}}function Hr(Mr,zr,yr){var hn=sn.gl,kn=gr.def(Mr,".location"),Xn=gr.def(sn.attributes,"[",kn,"]"),sa=yr.state,Oi=yr.buffer,Pi=[yr.x,yr.y,yr.z,yr.w],fa=["buffer","normalized","offset","stride"];function Qi(){gr("if(!",Xn,".buffer){",hn,".enableVertexAttribArray(",kn,");}");var Fi=yr.type,ji;if(yr.size?ji=gr.def(yr.size,"||",zr):ji=zr,gr("if(",Xn,".type!==",Fi,"||",Xn,".size!==",ji,"||",fa.map(function(Fa){return Xn+"."+Fa+"!=="+yr[Fa]}).join("||"),"){",hn,".bindBuffer(",ur,",",Oi,".buffer);",hn,".vertexAttribPointer(",[kn,ji,Fi,yr.normalized,yr.stride,yr.offset],");",Xn,".type=",Fi,";",Xn,".size=",ji,";",fa.map(function(Fa){return Xn+"."+Fa+"="+yr[Fa]+";"}).join(""),"}"),an){var Wi=yr.divisor;gr("if(",Xn,".divisor!==",Wi,"){",ar.instancing,".vertexAttribDivisorANGLE(",[kn,Wi],");",Xn,".divisor=",Wi,";}")}}function $i(){gr("if(",Xn,".buffer){",hn,".disableVertexAttribArray(",kn,");",Xn,".buffer=null;","}if(",ki.map(function(Fi,ji){return Xn+"."+Fi+"!=="+Pi[ji]}).join("||"),"){",hn,".vertexAttrib4f(",kn,",",Pi,");",ki.map(function(Fi,ji){return Xn+"."+Fi+"="+Pi[ji]+";"}).join(""),"}")}sa===qi?Qi():sa===pi?$i():(gr("if(",sa,"===",qi,"){"),Qi(),gr("}else{"),$i(),gr("}"))}pn.forEach(function(Mr){var zr=Mr.name,yr=Pr.attributes[zr],hn;if(yr){if(!Mn(yr))return;hn=yr.append(ar,gr)}else{if(!Mn(ai))return;var kn=ar.scopeAttrib(zr);hn={},Object.keys(new Rr).forEach(function(Xn){hn[Xn]=gr.def(kn,".",Xn)})}Hr(ar.link(Mr),tn(Mr.info.type),hn)})}function Zl(ar,gr,Pr,pn,Mn,sn){for(var tn=ar.shared,Hr=tn.gl,Mr,zr=0;zr1){for(var Dc=[],Kl=[],Vv=0;Vv>1)",Oi],");")}function Wi(){Pr(Pi,".drawArraysInstancedANGLE(",[kn,Xn,sa,Oi],");")}yr&&yr!=="null"?Qi?ji():(Pr("if(",yr,"){"),ji(),Pr("}else{"),Wi(),Pr("}")):Wi()}function Fi(){function ji(){Pr(sn+".drawElements("+[kn,sa,fa,Xn+"<<(("+fa+"-"+Ci+")>>1)"]+");")}function Wi(){Pr(sn+".drawArrays("+[kn,Xn,sa]+");")}yr&&yr!=="null"?Qi?ji():(Pr("if(",yr,"){"),ji(),Pr("}else{"),Wi(),Pr("}")):Wi()}an&&(typeof Oi!="number"||Oi>=0)?typeof Oi=="string"?(Pr("if(",Oi,">0){"),$i(),Pr("}else if(",Oi,"<0){"),Fi(),Pr("}")):$i():Fi()}function xa(ar,gr,Pr,pn,Mn){var sn=Li(),tn=sn.proc("body",Mn);return an&&(sn.instancing=tn.def(sn.shared.extensions,".angle_instanced_arrays")),ar(sn,tn,Pr,pn),sn.compile().body}function uo(ar,gr,Pr,pn){vu(ar,gr),Pr.useVAO?Pr.drawVAO?gr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,gr),");"):gr(ar.shared.vao,".setVAO(",ar.shared.vao,".targetVAO);"):(gr(ar.shared.vao,".setVAO(null);"),xc(ar,gr,Pr,pn.attributes,function(){return!0})),Zl(ar,gr,Pr,pn.uniforms,function(){return!0},!1),$l(ar,gr,gr,Pr)}function Es(ar,gr){var Pr=ar.proc("draw",1);vu(ar,Pr),no(ar,Pr,gr.context),Us(ar,Pr,gr.framebuffer),ql(ar,Pr,gr),Ta(ar,Pr,gr.state),ys(ar,Pr,gr,!1,!0);var pn=gr.shader.progVar.append(ar,Pr);if(Pr(ar.shared.gl,".useProgram(",pn,".program);"),gr.shader.program)uo(ar,Pr,gr,gr.shader.program);else{Pr(ar.shared.vao,".setVAO(null);");var Mn=ar.global.def("{}"),sn=Pr.def(pn,".id"),tn=Pr.def(Mn,"[",sn,"]");Pr(ar.cond(tn).then(tn,".call(this,a0);").else(tn,"=",Mn,"[",sn,"]=",ar.link(function(Hr){return xa(uo,ar,gr,Hr,1)}),"(",pn,");",tn,".call(this,a0);"))}Object.keys(gr.state).length>0&&Pr(ar.shared.current,".dirty=true;"),ar.shared.vao&&Pr(ar.shared.vao,".setVAO(null);")}function vr(ar,gr,Pr,pn){ar.batchId="a1",vu(ar,gr);function Mn(){return!0}xc(ar,gr,Pr,pn.attributes,Mn),Zl(ar,gr,Pr,pn.uniforms,Mn,!1),$l(ar,gr,gr,Pr)}function gn(ar,gr,Pr,pn){vu(ar,gr);var Mn=Pr.contextDep,sn=gr.def(),tn="a0",Hr="a1",Mr=gr.def();ar.shared.props=Mr,ar.batchId=sn;var zr=ar.scope(),yr=ar.scope();gr(zr.entry,"for(",sn,"=0;",sn,"<",Hr,";++",sn,"){",Mr,"=",tn,"[",sn,"];",yr,"}",zr.exit);function hn(fa){return fa.contextDep&&Mn||fa.propDep}function kn(fa){return!hn(fa)}if(Pr.needsContext&&no(ar,yr,Pr.context),Pr.needsFramebuffer&&Us(ar,yr,Pr.framebuffer),Ta(ar,yr,Pr.state,hn),Pr.profile&&hn(Pr.profile)&&ys(ar,yr,Pr,!1,!0),pn)Pr.useVAO?Pr.drawVAO?hn(Pr.drawVAO)?yr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,yr),");"):zr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,zr),");"):zr(ar.shared.vao,".setVAO(",ar.shared.vao,".targetVAO);"):(zr(ar.shared.vao,".setVAO(null);"),xc(ar,zr,Pr,pn.attributes,kn),xc(ar,yr,Pr,pn.attributes,hn)),Zl(ar,zr,Pr,pn.uniforms,kn,!1),Zl(ar,yr,Pr,pn.uniforms,hn,!0),$l(ar,zr,yr,Pr);else{var Xn=ar.global.def("{}"),sa=Pr.shader.progVar.append(ar,yr),Oi=yr.def(sa,".id"),Pi=yr.def(Xn,"[",Oi,"]");yr(ar.shared.gl,".useProgram(",sa,".program);","if(!",Pi,"){",Pi,"=",Xn,"[",Oi,"]=",ar.link(function(fa){return xa(vr,ar,Pr,fa,2)}),"(",sa,");}",Pi,".call(this,a0[",sn,"],",sn,");")}}function xn(ar,gr){var Pr=ar.proc("batch",2);ar.batchId="0",vu(ar,Pr);var pn=!1,Mn=!0;Object.keys(gr.context).forEach(function(Xn){pn=pn||gr.context[Xn].propDep}),pn||(no(ar,Pr,gr.context),Mn=!1);var sn=gr.framebuffer,tn=!1;sn?(sn.propDep?pn=tn=!0:sn.contextDep&&pn&&(tn=!0),tn||Us(ar,Pr,sn)):Us(ar,Pr,null),gr.state.viewport&&gr.state.viewport.propDep&&(pn=!0);function Hr(Xn){return Xn.contextDep&&pn||Xn.propDep}ql(ar,Pr,gr),Ta(ar,Pr,gr.state,function(Xn){return!Hr(Xn)}),(!gr.profile||!Hr(gr.profile))&&ys(ar,Pr,gr,!1,"a1"),gr.contextDep=pn,gr.needsContext=Mn,gr.needsFramebuffer=tn;var Mr=gr.shader.progVar;if(Mr.contextDep&&pn||Mr.propDep)gn(ar,Pr,gr,null);else{var zr=Mr.append(ar,Pr);if(Pr(ar.shared.gl,".useProgram(",zr,".program);"),gr.shader.program)gn(ar,Pr,gr,gr.shader.program);else{Pr(ar.shared.vao,".setVAO(null);");var yr=ar.global.def("{}"),hn=Pr.def(zr,".id"),kn=Pr.def(yr,"[",hn,"]");Pr(ar.cond(kn).then(kn,".call(this,a0,a1);").else(kn,"=",yr,"[",hn,"]=",ar.link(function(Xn){return xa(gn,ar,gr,Xn,2)}),"(",zr,");",kn,".call(this,a0,a1);"))}}Object.keys(gr.state).length>0&&Pr(ar.shared.current,".dirty=true;"),ar.shared.vao&&Pr(ar.shared.vao,".setVAO(null);")}function Gi(ar,gr){var Pr=ar.proc("scope",3);ar.batchId="a2";var pn=ar.shared,Mn=pn.current;if(no(ar,Pr,gr.context),gr.framebuffer&&gr.framebuffer.append(ar,Pr),Wr(Object.keys(gr.state)).forEach(function(Hr){var Mr=gr.state[Hr],zr=Mr.append(ar,Pr);bn(zr)?zr.forEach(function(yr,hn){si(yr)?Pr.set(ar.next[Hr],"["+hn+"]",yr):Pr.set(ar.next[Hr],"["+hn+"]",ar.link(yr,{stable:!0}))}):En(Mr)?Pr.set(pn.next,"."+Hr,ar.link(zr,{stable:!0})):Pr.set(pn.next,"."+Hr,zr)}),ys(ar,Pr,gr,!0,!0),[Yh,_i,Mu,Su,hu].forEach(function(Hr){var Mr=gr.draw[Hr];if(Mr){var zr=Mr.append(ar,Pr);si(zr)?Pr.set(pn.draw,"."+Hr,zr):Pr.set(pn.draw,"."+Hr,ar.link(zr),{stable:!0})}}),Object.keys(gr.uniforms).forEach(function(Hr){var Mr=gr.uniforms[Hr].append(ar,Pr);Array.isArray(Mr)&&(Mr="["+Mr.map(function(zr){return si(zr)?zr:ar.link(zr,{stable:!0})})+"]"),Pr.set(pn.uniforms,"["+ar.link(Xe.id(Hr),{stable:!0})+"]",Mr)}),Object.keys(gr.attributes).forEach(function(Hr){var Mr=gr.attributes[Hr].append(ar,Pr),zr=ar.scopeAttrib(Hr);Object.keys(new Rr).forEach(function(yr){Pr.set(zr,"."+yr,Mr[yr])})}),gr.scopeVAO){var sn=gr.scopeVAO.append(ar,Pr);si(sn)?Pr.set(pn.vao,".targetVAO",sn):Pr.set(pn.vao,".targetVAO",ar.link(sn,{stable:!0}))}function tn(Hr){var Mr=gr.shader[Hr];if(Mr){var zr=Mr.append(ar,Pr);si(zr)?Pr.set(pn.shader,"."+Hr,zr):Pr.set(pn.shader,"."+Hr,ar.link(zr,{stable:!0}))}}tn(jh),tn(Wh),Object.keys(gr.state).length>0&&(Pr(Mn,".dirty=true;"),Pr.exit(Mn,".dirty=true;")),Pr("a1(",ar.shared.context,",a0,",ar.batchId,");")}function wo(ar){if(!(typeof ar!="object"||bn(ar))){for(var gr=Object.keys(ar),Pr=0;Pr=0;--xa){var uo=zi[xa];uo&&uo(Er,null,0)}at.flush(),dr&&dr.update()}function Ia(){!Ki&&zi.length>0&&(Ki=g.next(ca))}function Os(){Ki&&(g.cancel(ca),Ki=null)}function Ss(xa){xa.preventDefault(),Et=!0,Os(),da.forEach(function(uo){uo()})}function Na(xa){at.getError(),Et=!1,Bt.restore(),yi.restore(),an.restore(),Sn.restore(),An.restore(),li.restore(),Nn.restore(),dr&&dr.restore(),Vn.procs.refresh(),Ia(),ui.forEach(function(uo){uo()})}si&&(si.addEventListener(de,Ss,!1),si.addEventListener(Ae,Na,!1));function Ns(){zi.length=0,Os(),si&&(si.removeEventListener(de,Ss),si.removeEventListener(Ae,Na)),yi.clear(),li.clear(),An.clear(),Nn.clear(),Sn.clear(),on.clear(),an.clear(),dr&&dr.clear(),Li.forEach(function(xa){xa()})}function vo(xa){function uo(sn){var tn=e({},sn);delete tn.uniforms,delete tn.attributes,delete tn.context,delete tn.vao,"stencil"in tn&&tn.stencil.op&&(tn.stencil.opBack=tn.stencil.opFront=tn.stencil.op,delete tn.stencil.op);function Hr(Mr){if(Mr in tn){var zr=tn[Mr];delete tn[Mr],Object.keys(zr).forEach(function(yr){tn[Mr+"."+yr]=zr[yr]})}}return Hr("blend"),Hr("depth"),Hr("cull"),Hr("stencil"),Hr("polygonOffset"),Hr("scissor"),Hr("sample"),"vao"in sn&&(tn.vao=sn.vao),tn}function Es(sn,tn){var Hr={},Mr={};return Object.keys(sn).forEach(function(zr){var yr=sn[zr];if(v.isDynamic(yr)){Mr[zr]=v.unbox(yr,zr);return}else if(tn&&Array.isArray(yr)){for(var hn=0;hn0)return ar.call(this,pn(sn|0),sn|0)}else if(Array.isArray(sn)){if(sn.length)return ar.call(this,sn,sn.length)}else return Hi.call(this,sn)}return e(Mn,{stats:wo,destroy:function(){xs.destroy()}})}var _o=li.setFBO=vo({framebuffer:v.define.call(null,Fe,"framebuffer")});function po(xa,uo){var Es=0;Vn.procs.poll();var vr=uo.color;vr&&(at.clearColor(+vr[0]||0,+vr[1]||0,+vr[2]||0,+vr[3]||0),Es|=N),"depth"in uo&&(at.clearDepth(+uo.depth),Es|=H),"stencil"in uo&&(at.clearStencil(uo.stencil|0),Es|=$),at.clear(Es)}function Xo(xa){if("framebuffer"in xa)if(xa.framebuffer&&xa.framebuffer_reglType==="framebufferCube")for(var uo=0;uo<6;++uo)_o(e({framebuffer:xa.framebuffer.faces[uo]},xa),po);else _o(xa,po);else po(null,xa)}function no(xa){zi.push(xa);function uo(){var Es=st(zi,xa);function vr(){var gn=st(zi,vr);zi[gn]=zi[zi.length-1],zi.length-=1,zi.length<=0&&Os()}zi[Es]=vr}return Ia(),{cancel:uo}}function Us(){var xa=Wn.viewport,uo=Wn.scissor_box;xa[0]=xa[1]=uo[0]=uo[1]=0,Er.viewportWidth=Er.framebufferWidth=Er.drawingBufferWidth=xa[2]=uo[2]=at.drawingBufferWidth,Er.viewportHeight=Er.framebufferHeight=Er.drawingBufferHeight=xa[3]=uo[3]=at.drawingBufferHeight}function ql(){Er.tick+=1,Er.time=vu(),Us(),Vn.procs.poll()}function Ta(){Sn.refresh(),Us(),Vn.procs.refresh(),dr&&dr.update()}function vu(){return(p()-Xr)/1e3}Ta();function ys(xa,uo){var Es;switch(xa){case"frame":return no(uo);case"lost":Es=da;break;case"restore":Es=ui;break;case"destroy":Es=Li;break;default:}return Es.push(uo),{cancel:function(){for(var vr=0;vr=0},read:jn,destroy:Ns,_gl:at,_refresh:Ta,poll:function(){ql(),dr&&dr.update()},now:vu,stats:Pt,getCachedCode:xc,preloadCachedCode:Zl});return Xe.onDone(null,$l),$l}return dt}))});var TVe=fe((XTr,wVe)=>{"use strict";var rKt=E1();wVe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},_Ve(t)?t={container:t}:nKt(t)?t={container:t}:iKt(t)?t={gl:t}:t=rKt(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=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}_Ve(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=bVe(),t.container.appendChild(t.canvas),xVe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=bVe(),t.container.appendChild(t.canvas),xVe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(a){}return t.gl}),t.gl};function xVe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function _Ve(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function nKt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function iKt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function bVe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var MVe=fe((ZTr,AVe)=>{"use strict";var aKt=l$(),oKt=[32,126];AVe.exports=sKt;function sKt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),n=e.font,a=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],i=e.chars||oKt;if(n&&typeof n!="string"&&(n=aKt(n)),!Array.isArray(i))i=String(i).split("");else if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var o=[],s=i[0],l=0;s<=i[1];s++)o[l++]=String.fromCharCode(s);i=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=a[0]/2,f=a[1]/2,s=0;st[0]-a[0]/2&&(c=a[0]/2,f+=a[1]);return r}});var d$=fe(uc=>{"use strict";"use restrict";var h$=32;uc.INT_BITS=h$;uc.INT_MAX=2147483647;uc.INT_MIN=-1<0)-(e<0)};uc.abs=function(e){var t=e>>h$-1;return(e^t)-t};uc.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};uc.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};uc.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function SVe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}uc.countTrailingZeros=SVe;uc.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};uc.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};uc.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var zM=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,a=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--a;e[t]=n<>>8&255]<<16|zM[e>>>16&255]<<8|zM[e>>>24&255]};uc.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};uc.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};uc.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};uc.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};uc.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>SVe(e)+1}});var CVe=fe((KTr,kVe)=>{"use strict";function EVe(e,t,r){var n=e[r]|0;if(n<=0)return[];var a=new Array(n),i;if(r===e.length-1)for(i=0;i0)return lKt(e|0,t);break;case"object":if(typeof e.length=="number")return EVe(e,t,0);break}return[]}kVe.exports=uKt});var HVe=fe(os=>{"use strict";var ky=d$(),Rh=CVe(),LVe=M2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Rh([32,0]),UINT16:Rh([32,0]),UINT32:Rh([32,0]),BIGUINT64:Rh([32,0]),INT8:Rh([32,0]),INT16:Rh([32,0]),INT32:Rh([32,0]),BIGINT64:Rh([32,0]),FLOAT:Rh([32,0]),DOUBLE:Rh([32,0]),DATA:Rh([32,0]),UINT8C:Rh([32,0]),BUFFER:Rh([32,0])});var cKt=typeof Uint8ClampedArray!="undefined",fKt=typeof BigUint64Array!="undefined",hKt=typeof BigInt64Array!="undefined",Ec=window.__TYPEDARRAY_POOL;Ec.UINT8C||(Ec.UINT8C=Rh([32,0]));Ec.BIGUINT64||(Ec.BIGUINT64=Rh([32,0]));Ec.BIGINT64||(Ec.BIGINT64=Rh([32,0]));Ec.BUFFER||(Ec.BUFFER=Rh([32,0]));var EF=Ec.DATA,kF=Ec.BUFFER;os.free=function(t){if(LVe.isBuffer(t))kF[ky.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=ky.log2(r)|0;EF[n].push(t)}};function PVe(e){if(e){var t=e.length||e.byteLength,r=ky.log2(t);EF[r].push(e)}}function dKt(e){PVe(e.buffer)}os.freeUint8=os.freeUint16=os.freeUint32=os.freeBigUint64=os.freeInt8=os.freeInt16=os.freeInt32=os.freeBigInt64=os.freeFloat32=os.freeFloat=os.freeFloat64=os.freeDouble=os.freeUint8Clamped=os.freeDataView=dKt;os.freeArrayBuffer=PVe;os.freeBuffer=function(t){kF[ky.log2(t.length)].push(t)};os.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return d0(t);switch(r){case"uint8":return v$(t);case"uint16":return FVe(t);case"uint32":return DVe(t);case"int8":return RVe(t);case"int16":return IVe(t);case"int32":return zVe(t);case"float":case"float32":return qVe(t);case"double":case"float64":return BVe(t);case"uint8_clamped":return OVe(t);case"bigint64":return UVe(t);case"biguint64":return NVe(t);case"buffer":return GVe(t);case"data":case"dataview":return VVe(t);default:return null}return null};function d0(t){var t=ky.nextPow2(t),r=ky.log2(t),n=EF[r];return n.length>0?n.pop():new ArrayBuffer(t)}os.mallocArrayBuffer=d0;function v$(e){return new Uint8Array(d0(e),0,e)}os.mallocUint8=v$;function FVe(e){return new Uint16Array(d0(2*e),0,e)}os.mallocUint16=FVe;function DVe(e){return new Uint32Array(d0(4*e),0,e)}os.mallocUint32=DVe;function RVe(e){return new Int8Array(d0(e),0,e)}os.mallocInt8=RVe;function IVe(e){return new Int16Array(d0(2*e),0,e)}os.mallocInt16=IVe;function zVe(e){return new Int32Array(d0(4*e),0,e)}os.mallocInt32=zVe;function qVe(e){return new Float32Array(d0(4*e),0,e)}os.mallocFloat32=os.mallocFloat=qVe;function BVe(e){return new Float64Array(d0(8*e),0,e)}os.mallocFloat64=os.mallocDouble=BVe;function OVe(e){return cKt?new Uint8ClampedArray(d0(e),0,e):v$(e)}os.mallocUint8Clamped=OVe;function NVe(e){return fKt?new BigUint64Array(d0(8*e),0,e):null}os.mallocBigUint64=NVe;function UVe(e){return hKt?new BigInt64Array(d0(8*e),0,e):null}os.mallocBigInt64=UVe;function VVe(e){return new DataView(d0(e),0,e)}os.mallocDataView=VVe;function GVe(e){e=ky.nextPow2(e);var t=ky.log2(e),r=kF[t];return r.length>0?r.pop():new LVe(e)}os.mallocBuffer=GVe;os.clearCache=function(){for(var t=0;t<32;++t)Ec.UINT8[t].length=0,Ec.UINT16[t].length=0,Ec.UINT32[t].length=0,Ec.INT8[t].length=0,Ec.INT16[t].length=0,Ec.INT32[t].length=0,Ec.FLOAT[t].length=0,Ec.DOUBLE[t].length=0,Ec.BIGUINT64[t].length=0,Ec.BIGINT64[t].length=0,Ec.UINT8C[t].length=0,EF[t].length=0,kF[t].length=0}});var WVe=fe((QTr,jVe)=>{"use strict";var vKt=Object.prototype.toString;jVe.exports=function(e){var t;return vKt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var p$=fe((eAr,YVe)=>{YVe.exports=function(t,r){r||(r=[0,""]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var $Ve=fe((tAr,ZVe)=>{"use strict";var pKt=p$();ZVe.exports=XVe;var qM=96;function g$(e,t){var r=pKt(getComputedStyle(e).getPropertyValue(t));return r[0]*XVe(r[1],e)}function gKt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=g$(r,"font-size")/128;return t.removeChild(r),n}function XVe(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return gKt(e,t);case"em":return g$(t,"font-size");case"rem":return g$(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return qM;case"cm":return qM/2.54;case"mm":return qM/25.4;case"pt":return qM/72;case"pc":return qM/6}return 1}});var QVe=fe((rAr,JVe)=>{"use strict";JVe.exports=PF;var mKt=PF.canvas=document.createElement("canvas"),CF=mKt.getContext("2d"),KVe=LF([32,126]);PF.createPairs=LF;PF.ascii=KVe;function PF(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,a=16,i=.05;t&&(t.length===2&&typeof t[0]=="number"?n=LF(t):Array.isArray(t)?n=t:(t.o?n=LF(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(i=t.threshold))),n||(n=KVe),CF.font=a+"px "+e;for(var o=0;oa*i){var c=(u-l)/a;r[s]=c*1e3}}return r}function LF(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),a=e[0];a{"use strict";rGe.exports=Cy;Cy.canvas=document.createElement("canvas");Cy.cache={};function Cy(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var n=t.size||t.fontSize||t.em||48,a=t.weight||t.fontWeight||"",i=t.style||t.fontStyle||"",o=[i,a,n].join(" ")+"px "+r,s=t.origin||"top";if(Cy.cache[r]&&n<=Cy.cache[r].em)return eGe(Cy.cache[r],s);var l=t.canvas||Cy.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var v="H",g={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(v,0,0);var p=C1(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(v,0,f);var x=C1(u.getImageData(0,0,f,f));g.lineHeight=g.bottom=f-x+p,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(v,0,f);var _=C1(u.getImageData(0,0,f,f)),y=f-_-1+p;g.baseline=g.alphabetic=y,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(v,0,f*.5);var C=C1(u.getImageData(0,0,f,f));g.median=g.middle=f-C-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(v,0,f*.5);var k=C1(u.getImageData(0,0,f,f));g.hanging=f-k-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(v,0,f);var S=C1(u.getImageData(0,0,f,f));if(g.ideographic=f-S-1+p,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),g.upper=C1(u.getImageData(0,0,f,f)),g.capHeight=g.baseline-g.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),g.lower=C1(u.getImageData(0,0,f,f)),g.xHeight=g.baseline-g.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),g.tittle=C1(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),g.ascent=C1(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),g.descent=tGe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var L=tGe(u.getImageData(0,0,f,f));g.overshoot=L-y}for(var w in g)g[w]/=n;return g.em=n,Cy.cache[r]=g,eGe(g,s)}function eGe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var n in e)n!=="em"&&(r[n]=e[n]-t);return r}function C1(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var sGe=fe((iAr,oGe)=>{"use strict";var b5=yVe(),yKt=E1(),xKt=f$(),_Kt=TVe(),bKt=XZ(),m$=wM(),wKt=MVe(),Ly=HVe(),TKt=u5(),AKt=WVe(),MKt=p$(),SKt=$Ve(),EKt=QVe(),kKt=Zc(),CKt=nGe(),LKt=u_(),PKt=d$(),iGe=PKt.nextPow2,aGe=new bKt,DF=!1;document.body&&(FF=document.body.appendChild(document.createElement("div")),FF.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(FF).fontStretch&&(DF=!0),document.body.removeChild(FF));var FF,Bs=function(t){FKt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=_Kt(t),this.shader=aGe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||xKt({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),aGe.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(AKt(t)?t:{})};Bs.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(a,i){return[i.atlas.width,i.atlas.height]},atlasDim:function(a,i){return[i.atlas.cols,i.atlas.rows]},atlas:function(a,i){return i.atlas.texture},charStep:function(a,i){return i.atlas.step},em:function(a,i){return i.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2705,12 +2706,9 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),n={};return{regl:t,draw:r,atlas:n}};bl.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=vBt(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),t.opacity!=null&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(ue){return parseFloat(ue)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=xBt(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(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]),t.kerning!=null&&(this.kerning=t.kerning),t.offset!=null&&(typeof t.offset=="number"&&(t.offset=[t.offset,0]),this.positionOffset=SBt(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=bl.baseFontSize+"px sans-serif");var n=!1,a=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(ue,re){if(typeof ue=="string")try{ue=xw.parse(ue)}catch(ze){ue=xw.parse(bl.baseFontSize+"px "+ue)}else{var j=ue.style,fe=ue.weight,ce=ue.stretch,oe=ue.variant;ue=xw.parse(xw.stringify(ue)),j&&(ue.style=j),fe&&(ue.weight=fe),ce&&(ue.stretch=ce),oe&&(ue.variant=oe)}var we=xw.stringify({size:bl.baseFontSize,family:ue.family,stretch:D9?ue.stretch:void 0,variant:ue.variant,weight:ue.weight,style:ue.style}),he=_Bt(ue.size),ye=Math.round(he[0]*wBt(he[1]));if(ye!==r.fontSize[re]&&(a=!0,r.fontSize[re]=ye),(!r.font[re]||we!=r.font[re].baseString)&&(n=!0,r.font[re]=bl.fonts[we],!r.font[re])){var Pe=ue.family.join(", "),le=[ue.style];ue.style!=ue.variant&&le.push(ue.variant),ue.variant!=ue.weight&&le.push(ue.weight),D9&&ue.weight!=ue.stretch&&le.push(ue.stretch),r.font[re]={baseString:we,family:Pe,weight:ue.weight,stretch:ue.stretch,style:ue.style,variant:ue.variant,width:{},kerning:{},metrics:MBt(Pe,{origin:"top",fontSize:bl.baseFontSize,fontStyle:le.join(" ")})},bl.fonts[we]=r.font[re]}}),(n||a)&&this.font.forEach(function(ue,re){var j=xw.stringify({size:r.fontSize[re],family:ue.family,stretch:D9?ue.stretch:void 0,variant:ue.variant,weight:ue.weight,style:ue.style});if(r.fontAtlas[re]=r.shader.atlas[j],!r.fontAtlas[re]){var fe=ue.metrics;r.shader.atlas[j]=r.fontAtlas[re]={fontString:j,step:Math.ceil(r.fontSize[re]*fe.bottom*.5)*2,em:r.fontSize[re],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var i=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=ay.mallocFloat(this.count*2),f=0,h=0;f1?r.align[re]:r.align[0]:r.align;if(typeof j=="number")return j;switch(j){case"right":case"end":return-ue;case"center":case"centre":case"middle":return-ue*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ue,re){var j=(r.font[re]||r.font[0]).metrics,fe=0;return fe+=j.bottom*.5,typeof ue=="number"?fe+=ue-j.baseline:fe+=-j[ue],fe*=-1,fe})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=mW(t.color,"uint8");else{var q;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var U=t.color.length;q=ay.mallocUint8(U);for(var O=(t.color.subarray||t.color.slice).bind(t.color),R=0;R4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(X){var te=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(te);for(var se=0;se1?this.counts[se]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[se]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(se*4,se*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[se]:this.opacity,baseline:this.baselineOffset[se]!=null?this.baselineOffset[se]:this.baselineOffset[0],align:this.align?this.alignOffset[se]!=null?this.alignOffset[se]:this.alignOffset[0]:0,atlas:this.fontAtlas[se]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(se*2,se*2+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=[]}};bl.prototype.destroy=function(){};bl.prototype.kerning=!0;bl.prototype.position={constant:new Float32Array(2)};bl.prototype.translate=null;bl.prototype.scale=null;bl.prototype.font=null;bl.prototype.text="";bl.prototype.positionOffset=[0,0];bl.prototype.opacity=1;bl.prototype.color=new Uint8Array([0,0,0,255]);bl.prototype.alignOffset=[0,0];bl.maxAtlasSize=1024;bl.atlasCanvas=document.createElement("canvas");bl.atlasContext=bl.atlasCanvas.getContext("2d",{alpha:!1});bl.baseFontSize=64;bl.fonts={};function kBt(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}cze.exports=bl});var hze=ne((yW,xW)=>{(function(e,t){typeof yW=="object"&&typeof xW!="undefined"?xW.exports=t():e.createREGL=t()})(yW,(function(){"use strict";var e=function(pe,ot){for(var ht=Object.keys(ot),Kt=0;Kt1&&ot===ht&&(ot==='"'||ot==="'"))return['"'+o(pe.substr(1,pe.length-2))+'"'];var Kt=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(pe);if(Kt)return s(pe.substr(0,Kt.index)).concat(s(Kt[1])).concat(s(pe.substr(Kt.index+Kt[0].length)));var cr=pe.split(".");if(cr.length===1)return['"'+o(pe)+'"'];for(var dr=[],ur=0;ur65535)<<4,pe>>>=ot,ht=(pe>255)<<3,pe>>>=ht,ot|=ht,ht=(pe>15)<<2,pe>>>=ht,ot|=ht,ht=(pe>3)<<1,pe>>>=ht,ot|=ht,ot|pe>>1}function R(){var pe=T(8,function(){return[]});function ot(dr){var ur=U(dr),Rr=pe[O(ur)>>2];return Rr.length>0?Rr.pop():new ArrayBuffer(ur)}function ht(dr){pe[O(dr.byteLength)>>2].push(dr)}function Kt(dr,ur){var Rr=null;switch(dr){case p:Rr=new Int8Array(ot(ur),0,ur);break;case C:Rr=new Uint8Array(ot(ur),0,ur);break;case A:Rr=new Int16Array(ot(2*ur),0,ur);break;case P:Rr=new Uint16Array(ot(2*ur),0,ur);break;case D:Rr=new Int32Array(ot(4*ur),0,ur);break;case z:Rr=new Uint32Array(ot(4*ur),0,ur);break;case q:Rr=new Float32Array(ot(4*ur),0,ur);break;default:return null}return Rr.length!==ur?Rr.subarray(0,ur):Rr}function cr(dr){ht(dr.buffer)}return{alloc:ot,free:ht,allocType:Kt,freeType:cr}}var B=R();B.zero=R();var Y=3408,X=3410,te=3411,se=3412,ue=3413,re=3414,j=3415,fe=33901,ce=33902,oe=3379,we=3386,he=34921,ye=36347,Pe=36348,le=35661,ze=35660,Xe=34930,vt=36349,st=34076,Oe=34024,qe=7936,mt=7937,lt=7938,Ie=35724,de=34047,Ee=36063,Ue=34852,ge=3553,Ge=34067,tt=34069,ft=33984,He=6408,Qe=5126,We=5121,pt=36160,kt=36053,qt=36064,Wt=16384,_r=function(pe,ot){var ht=1;ot.ext_texture_filter_anisotropic&&(ht=pe.getParameter(de));var Kt=1,cr=1;ot.webgl_draw_buffers&&(Kt=pe.getParameter(Ue),cr=pe.getParameter(Ee));var dr=!!ot.oes_texture_float;if(dr){var ur=pe.createTexture();pe.bindTexture(ge,ur),pe.texImage2D(ge,0,He,1,1,0,He,Qe,null);var Rr=pe.createFramebuffer();if(pe.bindFramebuffer(pt,Rr),pe.framebufferTexture2D(pt,qt,ge,ur,0),pe.bindTexture(ge,null),pe.checkFramebufferStatus(pt)!==kt)dr=!1;else{pe.viewport(0,0,1,1),pe.clearColor(1,0,0,1),pe.clear(Wt);var Xr=B.allocType(Qe,4);pe.readPixels(0,0,1,1,He,Qe,Xr),pe.getError()?dr=!1:(pe.deleteFramebuffer(Rr),pe.deleteTexture(ur),dr=Xr[0]===1),B.freeType(Xr)}}var $r=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Kr=!0;if(!$r){var Hn=pe.createTexture(),Cn=B.allocType(We,36);pe.activeTexture(ft),pe.bindTexture(Ge,Hn),pe.texImage2D(tt,0,He,3,3,0,He,We,Cn),B.freeType(Cn),pe.bindTexture(Ge,null),pe.deleteTexture(Hn),Kr=!pe.getError()}return{colorBits:[pe.getParameter(X),pe.getParameter(te),pe.getParameter(se),pe.getParameter(ue)],depthBits:pe.getParameter(re),stencilBits:pe.getParameter(j),subpixelBits:pe.getParameter(Y),extensions:Object.keys(ot).filter(function(fn){return!!ot[fn]}),maxAnisotropic:ht,maxDrawbuffers:Kt,maxColorAttachments:cr,pointSizeDims:pe.getParameter(fe),lineWidthDims:pe.getParameter(ce),maxViewportDims:pe.getParameter(we),maxCombinedTextureUnits:pe.getParameter(le),maxCubeMapSize:pe.getParameter(st),maxRenderbufferSize:pe.getParameter(Oe),maxTextureUnits:pe.getParameter(Xe),maxTextureSize:pe.getParameter(oe),maxAttributes:pe.getParameter(he),maxVertexUniforms:pe.getParameter(ye),maxVertexTextureUnits:pe.getParameter(ze),maxVaryingVectors:pe.getParameter(Pe),maxFragmentUniforms:pe.getParameter(vt),glsl:pe.getParameter(Ie),renderer:pe.getParameter(mt),vendor:pe.getParameter(qe),version:pe.getParameter(lt),readFloat:dr,npotTextureCube:Kr}},tr=function(pe){return pe instanceof Uint8Array||pe instanceof Uint16Array||pe instanceof Uint32Array||pe instanceof Int8Array||pe instanceof Int16Array||pe instanceof Int32Array||pe instanceof Float32Array||pe instanceof Float64Array||pe instanceof Uint8ClampedArray};function lr(pe){return!!pe&&typeof pe=="object"&&Array.isArray(pe.shape)&&Array.isArray(pe.stride)&&typeof pe.offset=="number"&&pe.shape.length===pe.stride.length&&(Array.isArray(pe.data)||tr(pe.data))}var Ye=function(pe){return Object.keys(pe).map(function(ot){return pe[ot]})},Te={shape:_t,flatten:Ke};function Fe(pe,ot,ht){for(var Kt=0;Kt0){var Gn;if(Array.isArray(pr[0])){sn=un(pr);for(var kr=1,Mr=1;Mr0){if(typeof kr[0]=="number"){var Jr=B.allocType(Cr.dtype,kr.length);no(Jr,kr),sn(Jr,_n),B.freeType(Jr)}else if(Array.isArray(kr[0])||tr(kr[0])){an=un(kr);var Qr=Qn(kr,an,Cr.dtype);sn(Qr,_n),B.freeType(Qr)}}}else if(lr(kr)){an=kr.shape;var wn=kr.stride,jn=0,oa=0,rn=0,Sn=0;an.length===1?(jn=an[0],oa=1,rn=wn[0],Sn=0):an.length===2&&(jn=an[0],oa=an[1],rn=wn[0],Sn=wn[1]);var sa=Array.isArray(kr.data)?Cr.dtype:pa(kr.data),ca=B.allocType(sa,jn*oa);Gi(ca,kr.data,jn,oa,rn,Sn,kr.offset),sn(ca,_n),B.freeType(ca)}return hn}return Ir||hn(Ut),hn._reglType="buffer",hn._buffer=Cr,hn.subdata=Gn,ht.profile&&(hn.stats=Cr.stats),hn.destroy=function(){Cn(Cr)},hn}function Sr(){Ye(dr).forEach(function(Ut){Ut.buffer=pe.createBuffer(),pe.bindBuffer(Ut.type,Ut.buffer),pe.bufferData(Ut.type,Ut.persistentData||Ut.byteLength,Ut.usage)})}return ht.profile&&(ot.getTotalBufferSize=function(){var Ut=0;return Object.keys(dr).forEach(function(pr){Ut+=dr[pr].stats.size}),Ut}),{create:fn,createStream:Xr,destroyStream:$r,clear:function(){Ye(dr).forEach(Cn),Rr.forEach(Cn)},getBuffer:function(Ut){return Ut&&Ut._buffer instanceof ur?Ut._buffer:null},restore:Sr,_initBuffer:Hn}}var fi=0,_o=0,Oi=1,ni=1,ao=4,Hi=4,to={points:fi,point:_o,lines:Oi,line:ni,triangles:ao,triangle:Hi,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},Xo=0,Zo=1,Fi=4,yo=5120,oo=5121,rl=5122,Ni=5123,Oa=5124,xi=5125,Pi=34963,ia=35040,rt=35044;function Xt(pe,ot,ht,Kt){var cr={},dr=0,ur={uint8:oo,uint16:Ni};ot.oes_element_index_uint&&(ur.uint32=xi);function Rr(Sr){this.id=dr++,cr[this.id]=this,this.buffer=Sr,this.primType=Fi,this.vertCount=0,this.type=0}Rr.prototype.bind=function(){this.buffer.bind()};var Xr=[];function $r(Sr){var Ut=Xr.pop();return Ut||(Ut=new Rr(ht.create(null,Pi,!0,!1)._buffer)),Hn(Ut,Sr,ia,-1,-1,0,0),Ut}function Kr(Sr){Xr.push(Sr)}function Hn(Sr,Ut,pr,Ir,Zr,Cr,hn){Sr.buffer.bind();var sn;if(Ut){var Gn=hn;!hn&&(!tr(Ut)||lr(Ut)&&!tr(Ut.data))&&(Gn=ot.oes_element_index_uint?xi:Ni),ht._initBuffer(Sr.buffer,Ut,pr,Gn,3)}else pe.bufferData(Pi,Cr,pr),Sr.buffer.dtype=sn||oo,Sr.buffer.usage=pr,Sr.buffer.dimension=3,Sr.buffer.byteLength=Cr;if(sn=hn,!hn){switch(Sr.buffer.dtype){case oo:case yo:sn=oo;break;case Ni:case rl:sn=Ni;break;case xi:case Oa:sn=xi;break;default:}Sr.buffer.dtype=sn}Sr.type=sn;var kr=Zr;kr<0&&(kr=Sr.buffer.byteLength,sn===Ni?kr>>=1:sn===xi&&(kr>>=2)),Sr.vertCount=kr;var Mr=Ir;if(Ir<0){Mr=Fi;var _n=Sr.buffer.dimension;_n===1&&(Mr=Xo),_n===2&&(Mr=Zo),_n===3&&(Mr=Fi)}Sr.primType=Mr}function Cn(Sr){Kt.elementsCount--,delete cr[Sr.id],Sr.buffer.destroy(),Sr.buffer=null}function fn(Sr,Ut){var pr=ht.create(null,Pi,!0),Ir=new Rr(pr._buffer);Kt.elementsCount++;function Zr(Cr){if(!Cr)pr(),Ir.primType=Fi,Ir.vertCount=0,Ir.type=oo;else if(typeof Cr=="number")pr(Cr),Ir.primType=Fi,Ir.vertCount=Cr|0,Ir.type=oo;else{var hn=null,sn=rt,Gn=-1,kr=-1,Mr=0,_n=0;Array.isArray(Cr)||tr(Cr)||lr(Cr)?hn=Cr:("data"in Cr&&(hn=Cr.data),"usage"in Cr&&(sn=Kn[Cr.usage]),"primitive"in Cr&&(Gn=to[Cr.primitive]),"count"in Cr&&(kr=Cr.count|0),"type"in Cr&&(_n=ur[Cr.type]),"length"in Cr?Mr=Cr.length|0:(Mr=kr,_n===Ni||_n===rl?Mr*=2:(_n===xi||_n===Oa)&&(Mr*=4))),Hn(Ir,hn,sn,Gn,kr,Mr,_n)}return Zr}return Zr(Sr),Zr._reglType="elements",Zr._elements=Ir,Zr.subdata=function(Cr,hn){return pr.subdata(Cr,hn),Zr},Zr.destroy=function(){Cn(Ir)},Zr}return{create:fn,createStream:$r,destroyStream:Kr,getElements:function(Sr){return typeof Sr=="function"&&Sr._elements instanceof Rr?Sr._elements:null},clear:function(){Ye(cr).forEach(Cn)}}}var xr=new Float32Array(1),Fr=new Uint32Array(xr.buffer),xn=5123;function Mn(pe){for(var ot=B.allocType(xn,pe.length),ht=0;ht>>31<<15,dr=(Kt<<1>>>24)-127,ur=Kt>>13&1023;if(dr<-24)ot[ht]=cr;else if(dr<-14){var Rr=-14-dr;ot[ht]=cr+(ur+1024>>Rr)}else dr>15?ot[ht]=cr+31744:ot[ht]=cr+(dr+15<<10)+ur}return ot}function Rn(pe){return Array.isArray(pe)||tr(pe)}var on=34467,En=3553,Aa=34067,ba=34069,Ia=6408,hi=6406,ki=6407,ui=6409,Mi=6410,_i=32854,ko=32855,Io=36194,$o=32819,Is=32820,Es=33635,Ks=34042,nl=6402,ks=34041,us=35904,xs=35906,Co=36193,Si=33776,io=33777,Bs=33778,Fl=33779,Eu=35986,Cs=35987,Nl=34798,du=35840,Kl=35841,al=35842,co=35843,Ul=36196,Ls=5121,il=5123,_c=5125,Os=5126,Vu=10242,kf=10243,Jl=10497,th=33071,wc=33648,Cf=10240,Rd=10241,ol=9728,af=9729,ec=9984,Tc=9985,vu=9986,jc=9987,Lf=33170,tc=4352,Lh=4353,of=4354,Ff=34046,Pf=3317,rh=37440,Fh=37441,pu=37443,gu=37444,mu=33984,Ql=[ec,vu,Tc,jc],as=[0,ui,Mi,ki,Ia],fo={};fo[ui]=fo[hi]=fo[nl]=1,fo[ks]=fo[Mi]=2,fo[ki]=fo[us]=3,fo[Ia]=fo[xs]=4;function Ns(pe){return"[object "+pe+"]"}var ku=Ns("HTMLCanvasElement"),rc=Ns("OffscreenCanvas"),sf=Ns("CanvasRenderingContext2D"),is=Ns("ImageBitmap"),Xh=Ns("HTMLImageElement"),Wi=Ns("HTMLVideoElement"),Zh=Object.keys(St).concat([ku,rc,sf,is,Xh,Wi]),so=[];so[Ls]=1,so[Os]=4,so[Co]=2,so[il]=2,so[_c]=4;var ei=[];ei[_i]=2,ei[ko]=2,ei[Io]=2,ei[ks]=4,ei[Si]=.5,ei[io]=.5,ei[Bs]=1,ei[Fl]=1,ei[Eu]=.5,ei[Cs]=1,ei[Nl]=1,ei[du]=.5,ei[Kl]=.25,ei[al]=.5,ei[co]=.25,ei[Ul]=.5;function nc(pe){return Array.isArray(pe)&&(pe.length===0||typeof pe[0]=="number")}function Wc(pe){if(!Array.isArray(pe))return!1;var ot=pe.length;return!(ot===0||!Rn(pe[0]))}function _l(pe){return Object.prototype.toString.call(pe)}function nh(pe){return _l(pe)===ku}function Cu(pe){return _l(pe)===rc}function Ac(pe){return _l(pe)===sf}function Us(pe){return _l(pe)===is}function ah(pe){return _l(pe)===Xh}function Df(pe){return _l(pe)===Wi}function Mc(pe){if(!pe)return!1;var ot=_l(pe);return Zh.indexOf(ot)>=0?!0:nc(pe)||Wc(pe)||lr(pe)}function Sc(pe){return St[Object.prototype.toString.call(pe)]|0}function Rf(pe,ot){var ht=ot.length;switch(pe.type){case Ls:case il:case _c:case Os:var Kt=B.allocType(pe.type,ht);Kt.set(ot),pe.data=Kt;break;case Co:pe.data=Mn(ot);break;default:}}function If(pe,ot){return B.allocType(pe.type===Co?Os:pe.type,ot)}function eu(pe,ot){pe.type===Co?(pe.data=Mn(ot),B.freeType(ot)):pe.data=ot}function lf(pe,ot,ht,Kt,cr,dr){for(var ur=pe.width,Rr=pe.height,Xr=pe.channels,$r=ur*Rr*Xr,Kr=If(pe,$r),Hn=0,Cn=0;Cn=1;)Rr+=ur*Xr*Xr,Xr/=2;return Rr}else return ur*ht*Kt}function Ec(pe,ot,ht,Kt,cr,dr,ur){var Rr={"don't care":tc,"dont care":tc,nice:of,fast:Lh},Xr={repeat:Jl,clamp:th,mirror:wc},$r={nearest:ol,linear:af},Kr=e({mipmap:jc,"nearest mipmap nearest":ec,"linear mipmap nearest":Tc,"nearest mipmap linear":vu,"linear mipmap linear":jc},$r),Hn={none:0,browser:gu},Cn={uint8:Ls,rgba4:$o,rgb565:Es,"rgb5 a1":Is},fn={alpha:hi,luminance:ui,"luminance alpha":Mi,rgb:ki,rgba:Ia,rgba4:_i,"rgb5 a1":ko,rgb565:Io},Sr={};ot.ext_srgb&&(fn.srgb=us,fn.srgba=xs),ot.oes_texture_float&&(Cn.float32=Cn.float=Os),ot.oes_texture_half_float&&(Cn.float16=Cn["half float"]=Co),ot.webgl_depth_texture&&(e(fn,{depth:nl,"depth stencil":ks}),e(Cn,{uint16:il,uint32:_c,"depth stencil":Ks})),ot.webgl_compressed_texture_s3tc&&e(Sr,{"rgb s3tc dxt1":Si,"rgba s3tc dxt1":io,"rgba s3tc dxt3":Bs,"rgba s3tc dxt5":Fl}),ot.webgl_compressed_texture_atc&&e(Sr,{"rgb atc":Eu,"rgba atc explicit alpha":Cs,"rgba atc interpolated alpha":Nl}),ot.webgl_compressed_texture_pvrtc&&e(Sr,{"rgb pvrtc 4bppv1":du,"rgb pvrtc 2bppv1":Kl,"rgba pvrtc 4bppv1":al,"rgba pvrtc 2bppv1":co}),ot.webgl_compressed_texture_etc1&&(Sr["rgb etc1"]=Ul);var Ut=Array.prototype.slice.call(pe.getParameter(on));Object.keys(Sr).forEach(function(it){var ir=Sr[it];Ut.indexOf(ir)>=0&&(fn[it]=ir)});var pr=Object.keys(fn);ht.textureFormats=pr;var Ir=[];Object.keys(fn).forEach(function(it){var ir=fn[it];Ir[ir]=it});var Zr=[];Object.keys(Cn).forEach(function(it){var ir=Cn[it];Zr[ir]=it});var Cr=[];Object.keys($r).forEach(function(it){var ir=$r[it];Cr[ir]=it});var hn=[];Object.keys(Kr).forEach(function(it){var ir=Kr[it];hn[ir]=it});var sn=[];Object.keys(Xr).forEach(function(it){var ir=Xr[it];sn[ir]=it});var Gn=pr.reduce(function(it,ir){var or=fn[ir];return or===ui||or===hi||or===ui||or===Mi||or===nl||or===ks||ot.ext_srgb&&(or===us||or===xs)?it[or]=or:or===ko||ir.indexOf("rgba")>=0?it[or]=Ia:it[or]=ki,it},{});function kr(){this.internalformat=Ia,this.format=Ia,this.type=Ls,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=gu,this.width=0,this.height=0,this.channels=0}function Mr(it,ir){it.internalformat=ir.internalformat,it.format=ir.format,it.type=ir.type,it.compressed=ir.compressed,it.premultiplyAlpha=ir.premultiplyAlpha,it.flipY=ir.flipY,it.unpackAlignment=ir.unpackAlignment,it.colorSpace=ir.colorSpace,it.width=ir.width,it.height=ir.height,it.channels=ir.channels}function _n(it,ir){if(!(typeof ir!="object"||!ir)){if("premultiplyAlpha"in ir&&(it.premultiplyAlpha=ir.premultiplyAlpha),"flipY"in ir&&(it.flipY=ir.flipY),"alignment"in ir&&(it.unpackAlignment=ir.alignment),"colorSpace"in ir&&(it.colorSpace=Hn[ir.colorSpace]),"type"in ir){var or=ir.type;it.type=Cn[or]}var Fn=it.width,Ga=it.height,Li=it.channels,Pn=!1;"shape"in ir?(Fn=ir.shape[0],Ga=ir.shape[1],ir.shape.length===3&&(Li=ir.shape[2],Pn=!0)):("radius"in ir&&(Fn=Ga=ir.radius),"width"in ir&&(Fn=ir.width),"height"in ir&&(Ga=ir.height),"channels"in ir&&(Li=ir.channels,Pn=!0)),it.width=Fn|0,it.height=Ga|0,it.channels=Li|0;var $e=!1;if("format"in ir){var ct=ir.format,Et=it.internalformat=fn[ct];it.format=Gn[Et],ct in Cn&&("type"in ir||(it.type=Cn[ct])),ct in Sr&&(it.compressed=!0),$e=!0}!Pn&&$e?it.channels=fo[it.format]:Pn&&!$e&&it.channels!==as[it.format]&&(it.format=it.internalformat=as[it.channels])}}function an(it){pe.pixelStorei(rh,it.flipY),pe.pixelStorei(Fh,it.premultiplyAlpha),pe.pixelStorei(pu,it.colorSpace),pe.pixelStorei(Pf,it.unpackAlignment)}function Jr(){kr.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Qr(it,ir){var or=null;if(Mc(ir)?or=ir:ir&&(_n(it,ir),"x"in ir&&(it.xOffset=ir.x|0),"y"in ir&&(it.yOffset=ir.y|0),Mc(ir.data)&&(or=ir.data)),ir.copy){var Fn=cr.viewportWidth,Ga=cr.viewportHeight;it.width=it.width||Fn-it.xOffset,it.height=it.height||Ga-it.yOffset,it.needsCopy=!0}else if(!or)it.width=it.width||1,it.height=it.height||1,it.channels=it.channels||4;else if(tr(or))it.channels=it.channels||4,it.data=or,!("type"in ir)&&it.type===Ls&&(it.type=Sc(or));else if(nc(or))it.channels=it.channels||4,Rf(it,or),it.alignment=1,it.needsFree=!0;else if(lr(or)){var Li=or.data;!Array.isArray(Li)&&it.type===Ls&&(it.type=Sc(Li));var Pn=or.shape,$e=or.stride,ct,Et,nr,vr,Ht,Nt;Pn.length===3?(nr=Pn[2],Nt=$e[2]):(nr=1,Nt=1),ct=Pn[0],Et=Pn[1],vr=$e[0],Ht=$e[1],it.alignment=1,it.width=ct,it.height=Et,it.channels=nr,it.format=it.internalformat=as[nr],it.needsFree=!0,lf(it,Li,vr,Ht,Nt,or.offset)}else if(nh(or)||Cu(or)||Ac(or))nh(or)||Cu(or)?it.element=or:it.element=or.canvas,it.width=it.element.width,it.height=it.element.height,it.channels=4;else if(Us(or))it.element=or,it.width=or.width,it.height=or.height,it.channels=4;else if(ah(or))it.element=or,it.width=or.naturalWidth,it.height=or.naturalHeight,it.channels=4;else if(Df(or))it.element=or,it.width=or.videoWidth,it.height=or.videoHeight,it.channels=4;else if(Wc(or)){var Pt=it.width||or[0].length,At=it.height||or.length,Lt=it.channels;Rn(or[0][0])?Lt=Lt||or[0][0].length:Lt=Lt||1;for(var dt=Te.shape(or),Jt=1,yr=0;yr>=Ga,or.height>>=Ga,Qr(or,Fn[Ga]),it.mipmask|=1<=0&&!("faces"in ir)&&(it.genMipmaps=!0)}if("mag"in ir){var Fn=ir.mag;it.magFilter=$r[Fn]}var Ga=it.wrapS,Li=it.wrapT;if("wrap"in ir){var Pn=ir.wrap;typeof Pn=="string"?Ga=Li=Xr[Pn]:Array.isArray(Pn)&&(Ga=Xr[Pn[0]],Li=Xr[Pn[1]])}else{if("wrapS"in ir){var $e=ir.wrapS;Ga=Xr[$e]}if("wrapT"in ir){var ct=ir.wrapT;Li=Xr[ct]}}if(it.wrapS=Ga,it.wrapT=Li,"anisotropic"in ir){var Et=ir.anisotropic;it.anisotropic=ir.anisotropic}if("mipmap"in ir){var nr=!1;switch(typeof ir.mipmap){case"string":it.mipmapHint=Rr[ir.mipmap],it.genMipmaps=!0,nr=!0;break;case"boolean":nr=it.genMipmaps=ir.mipmap;break;case"object":it.genMipmaps=!1,nr=!0;break;default:}nr&&!("min"in ir)&&(it.minFilter=ec)}}function es(it,ir){pe.texParameteri(ir,Rd,it.minFilter),pe.texParameteri(ir,Cf,it.magFilter),pe.texParameteri(ir,Vu,it.wrapS),pe.texParameteri(ir,kf,it.wrapT),ot.ext_texture_filter_anisotropic&&pe.texParameteri(ir,Ff,it.anisotropic),it.genMipmaps&&(pe.hint(Lf,it.mipmapHint),pe.generateMipmap(ir))}var Ds=0,Do={},Ro=ht.maxTextureUnits,Uo=Array(Ro).map(function(){return null});function Sa(it){kr.call(this),this.mipmask=0,this.internalformat=Ia,this.id=Ds++,this.refCount=1,this.target=it,this.texture=pe.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Ci,ur.profile&&(this.stats={size:0})}function ts(it){pe.activeTexture(mu),pe.bindTexture(it.target,it.texture)}function qi(){var it=Uo[0];it?pe.bindTexture(it.target,it.texture):pe.bindTexture(En,null)}function Hs(it){var ir=it.texture,or=it.unit,Fn=it.target;or>=0&&(pe.activeTexture(mu+or),pe.bindTexture(Fn,null),Uo[or]=null),pe.deleteTexture(ir),it.texture=null,it.params=null,it.pixels=null,it.refCount=0,delete Do[it.id],dr.textureCount--}e(Sa.prototype,{bind:function(){var it=this;it.bindCount+=1;var ir=it.unit;if(ir<0){for(var or=0;or0)continue;Fn.unit=-1}Uo[or]=it,ir=or;break}ir>=Ro,ur.profile&&dr.maxTextureUnits>Ht)-nr,Nt.height=Nt.height||(or.height>>Ht)-vr,ts(or),jn(Nt,En,nr,vr,Ht),qi(),Sn(Nt),Fn}function Li(Pn,$e){var ct=Pn|0,Et=$e|0||ct;if(ct===or.width&&Et===or.height)return Fn;Fn.width=or.width=ct,Fn.height=or.height=Et,ts(or);for(var nr=0;or.mipmask>>nr;++nr){var vr=ct>>nr,Ht=Et>>nr;if(!vr||!Ht)break;pe.texImage2D(En,nr,or.format,vr,Ht,0,or.format,or.type,null)}return qi(),ur.profile&&(or.stats.size=tu(or.internalformat,or.type,ct,Et,!1,!1)),Fn}return Fn(it,ir),Fn.subimage=Ga,Fn.resize=Li,Fn._reglType="texture2d",Fn._texture=or,ur.profile&&(Fn.stats=or.stats),Fn.destroy=function(){or.decRef()},Fn}function fl(it,ir,or,Fn,Ga,Li){var Pn=new Sa(Aa);Do[Pn.id]=Pn,dr.cubeCount++;var $e=new Array(6);function ct(vr,Ht,Nt,Pt,At,Lt){var dt,Jt=Pn.texInfo;for(Ci.call(Jt),dt=0;dt<6;++dt)$e[dt]=ja();if(typeof vr=="number"||!vr){var yr=vr|0||1;for(dt=0;dt<6;++dt)ca($e[dt],yr,yr)}else if(typeof vr=="object")if(Ht)Ra($e[0],vr),Ra($e[1],Ht),Ra($e[2],Nt),Ra($e[3],Pt),Ra($e[4],At),Ra($e[5],Lt);else if(Ts(Jt,vr),_n(Pn,vr),"faces"in vr){var Or=vr.faces;for(dt=0;dt<6;++dt)Mr($e[dt],Pn),Ra($e[dt],Or[dt])}else for(dt=0;dt<6;++dt)Ra($e[dt],vr);for(Mr(Pn,$e[0]),Jt.genMipmaps?Pn.mipmask=($e[0].width<<1)-1:Pn.mipmask=$e[0].mipmask,Pn.internalformat=$e[0].internalformat,ct.width=$e[0].width,ct.height=$e[0].height,ts(Pn),dt=0;dt<6;++dt)go($e[dt],ba+dt);for(es(Jt,Aa),qi(),ur.profile&&(Pn.stats.size=tu(Pn.internalformat,Pn.type,ct.width,ct.height,Jt.genMipmaps,!0)),ct.format=Ir[Pn.internalformat],ct.type=Zr[Pn.type],ct.mag=Cr[Jt.magFilter],ct.min=hn[Jt.minFilter],ct.wrapS=sn[Jt.wrapS],ct.wrapT=sn[Jt.wrapT],dt=0;dt<6;++dt)cl($e[dt]);return ct}function Et(vr,Ht,Nt,Pt,At){var Lt=Nt|0,dt=Pt|0,Jt=At|0,yr=rn();return Mr(yr,Pn),yr.width=0,yr.height=0,Qr(yr,Ht),yr.width=yr.width||(Pn.width>>Jt)-Lt,yr.height=yr.height||(Pn.height>>Jt)-dt,ts(Pn),jn(yr,ba+vr,Lt,dt,Jt),qi(),Sn(yr),ct}function nr(vr){var Ht=vr|0;if(Ht!==Pn.width){ct.width=Pn.width=Ht,ct.height=Pn.height=Ht,ts(Pn);for(var Nt=0;Nt<6;++Nt)for(var Pt=0;Pn.mipmask>>Pt;++Pt)pe.texImage2D(ba+Nt,Pt,Pn.format,Ht>>Pt,Ht>>Pt,0,Pn.format,Pn.type,null);return qi(),ur.profile&&(Pn.stats.size=tu(Pn.internalformat,Pn.type,ct.width,ct.height,!1,!0)),ct}}return ct(it,ir,or,Fn,Ga,Li),ct.subimage=Et,ct.resize=nr,ct._reglType="textureCube",ct._texture=Pn,ur.profile&&(ct.stats=Pn.stats),ct.destroy=function(){Pn.decRef()},ct}function ha(){for(var it=0;it>Fn,or.height>>Fn,0,or.internalformat,or.type,null);else for(var Ga=0;Ga<6;++Ga)pe.texImage2D(ba+Ga,Fn,or.internalformat,or.width>>Fn,or.height>>Fn,0,or.internalformat,or.type,null);es(or.texInfo,or.target)})}function ti(){for(var it=0;it=0?cl=!0:Xr.indexOf(Ci)>=0&&(cl=!1))),("depthTexture"in Sa||"depthStencilTexture"in Sa)&&(Uo=!!(Sa.depthTexture||Sa.depthStencilTexture)),"depth"in Sa&&(typeof Sa.depth=="boolean"?go=Sa.depth:(Ds=Sa.depth,No=!1)),"stencil"in Sa&&(typeof Sa.stencil=="boolean"?No=Sa.stencil:(Do=Sa.stencil,go=!1)),"depthStencil"in Sa&&(typeof Sa.depthStencil=="boolean"?go=No=Sa.depthStencil:(Ro=Sa.depthStencil,go=!1,No=!1))}var qi=null,Hs=null,js=null,fl=null;if(Array.isArray(ja))qi=ja.map(Sr);else if(ja)qi=[Sr(ja)];else for(qi=new Array(es),sa=0;sa0&&(Sn.depth=Qr[0].depth,Sn.stencil=Qr[0].stencil,Sn.depthStencil=Qr[0].depthStencil),Qr[rn]?Qr[rn](Sn):Qr[rn]=Mr(Sn)}return e(wn,{width:sa,height:sa,color:Ci})}function jn(oa){var rn,Sn=oa|0;if(Sn===wn.width)return wn;var sa=wn.color;for(rn=0;rn=sa.byteLength?ca.subdata(sa):(ca.destroy(),Mr.buffers[oa]=null)),Mr.buffers[oa]||(ca=Mr.buffers[oa]=cr.create(rn,qf,!1,!0)),Sn.buffer=cr.getBuffer(ca),Sn.size=Sn.buffer.dimension|0,Sn.normalized=!1,Sn.type=Sn.buffer.dtype,Sn.offset=0,Sn.stride=0,Sn.divisor=0,Sn.state=1,wn[oa]=1}else cr.getBuffer(rn)?(Sn.buffer=cr.getBuffer(rn),Sn.size=Sn.buffer.dimension|0,Sn.normalized=!1,Sn.type=Sn.buffer.dtype,Sn.offset=0,Sn.stride=0,Sn.divisor=0,Sn.state=1):cr.getBuffer(rn.buffer)?(Sn.buffer=cr.getBuffer(rn.buffer),Sn.size=(+rn.size||Sn.buffer.dimension)|0,Sn.normalized=!!rn.normalized||!1,"type"in rn?Sn.type=vn[rn.type]:Sn.type=Sn.buffer.dtype,Sn.offset=(rn.offset||0)|0,Sn.stride=(rn.stride||0)|0,Sn.divisor=(rn.divisor||0)|0,Sn.state=1):"x"in rn&&(Sn.x=+rn.x||0,Sn.y=+rn.y||0,Sn.z=+rn.z||0,Sn.w=+rn.w||0,Sn.state=2)}for(var Ra=0;Ra1)for(var an=0;anUt&&(Ut=pr.stats.uniformsCount)}),Ut},ht.getMaxAttributesCount=function(){var Ut=0;return Kr.forEach(function(pr){pr.stats.attributesCount>Ut&&(Ut=pr.stats.attributesCount)}),Ut});function Sr(){cr={},dr={};for(var Ut=0;Ut16&&(ht=tn(ht,pe.length*8));for(var Kt=Array(16),cr=Array(16),dr=0;dr<16;dr++)Kt[dr]=ht[dr]^909522486,cr[dr]=ht[dr]^1549556828;var ur=tn(Kt.concat(Wu(ot)),512+ot.length*8);return Je(tn(cr.concat(ur),768))}function Fu(pe){for(var ot=Qh?"0123456789ABCDEF":"0123456789abcdef",ht="",Kt,cr=0;cr>>4&15)+ot.charAt(Kt&15);return ht}function fh(pe){for(var ot="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ht="",Kt=pe.length,cr=0;crpe.length*8?ht+=hf:ht+=ot.charAt(dr>>>6*(3-ur)&63);return ht}function ed(pe,ot){var ht=ot.length,Kt=Array(),cr,dr,ur,Rr,Xr=Array(Math.ceil(pe.length/2));for(cr=0;cr0;){for(Rr=Array(),ur=0,cr=0;cr0||dr>0)&&(Rr[Rr.length]=dr);Kt[Kt.length]=ur,Xr=Rr}var $r="";for(cr=Kt.length-1;cr>=0;cr--)$r+=ot.charAt(Kt[cr]);var Kr=Math.ceil(pe.length*8/(Math.log(ot.length)/Math.log(2)));for(cr=$r.length;cr>>6&31,128|Kt&63):Kt<=65535?ot+=String.fromCharCode(224|Kt>>>12&15,128|Kt>>>6&63,128|Kt&63):Kt<=2097151&&(ot+=String.fromCharCode(240|Kt>>>18&7,128|Kt>>>12&63,128|Kt>>>6&63,128|Kt&63));return ot}function Wu(pe){for(var ot=Array(pe.length>>2),ht=0;ht>5]|=(pe.charCodeAt(ht/8)&255)<<24-ht%32;return ot}function Je(pe){for(var ot="",ht=0;ht>5]>>>24-ht%32&255);return ot}function yt(pe,ot){return pe>>>ot|pe<<32-ot}function Gt(pe,ot){return pe>>>ot}function Bt(pe,ot,ht){return pe&ot^~pe&ht}function mr(pe,ot,ht){return pe&ot^pe&ht^ot&ht}function Ur(pe){return yt(pe,2)^yt(pe,13)^yt(pe,22)}function en(pe){return yt(pe,6)^yt(pe,11)^yt(pe,25)}function mn(pe){return yt(pe,7)^yt(pe,18)^Gt(pe,3)}function An(pe){return yt(pe,17)^yt(pe,19)^Gt(pe,10)}var Vn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function tn(pe,ot){var ht=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Kt=new Array(64),cr,dr,ur,Rr,Xr,$r,Kr,Hn,Cn,fn,Sr,Ut;for(pe[ot>>5]|=128<<24-ot%32,pe[(ot+64>>9<<4)+15]=ot,Cn=0;Cn>16)+(ot>>16)+(ht>>16);return Kt<<16|ht&65535}function dn(pe){return Array.prototype.slice.call(pe)}function Wr(pe){return dn(pe).join("")}function ea(pe){var ot=pe&&pe.cache,ht=0,Kt=[],cr=[],dr=[];function ur(Sr,Ut){var pr=Ut&&Ut.stable;if(!pr){for(var Ir=0;Ir0&&(Sr.push(Zr,"="),Sr.push.apply(Sr,dn(arguments)),Sr.push(";")),Zr}return e(Ut,{def:Ir,toString:function(){return Wr([pr.length>0?"var "+pr.join(",")+";":"",Wr(Sr)])}})}function Xr(){var Sr=Rr(),Ut=Rr(),pr=Sr.toString,Ir=Ut.toString;function Zr(Cr,hn){Ut(Cr,hn,"=",Sr.def(Cr,hn),";")}return e(function(){Sr.apply(Sr,dn(arguments))},{def:Sr.def,entry:Sr,exit:Ut,save:Zr,set:function(Cr,hn,sn){Zr(Cr,hn),Sr(Cr,hn,"=",sn,";")},toString:function(){return pr()+Ir()}})}function $r(){var Sr=Wr(arguments),Ut=Xr(),pr=Xr(),Ir=Ut.toString,Zr=pr.toString;return e(Ut,{then:function(){return Ut.apply(Ut,dn(arguments)),this},else:function(){return pr.apply(pr,dn(arguments)),this},toString:function(){var Cr=Zr();return Cr&&(Cr="else{"+Cr+"}"),Wr(["if(",Sr,"){",Ir(),"}",Cr])}})}var Kr=Rr(),Hn={};function Cn(Sr,Ut){var pr=[];function Ir(){var Gn="a"+pr.length;return pr.push(Gn),Gn}Ut=Ut||0;for(var Zr=0;Zr":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Tr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Lr={cw:ie,ccw:_e};function Vr(pe){return Array.isArray(pe)||tr(pe)||lr(pe)}function jr(pe){return pe.sort(function(ot,ht){return ot===H?-1:ht===H?1:ot=1,Kt>=2,ot)}else if(ht===ji){var cr=pe.data;return new br(cr.thisDep,cr.contextDep,cr.propDep,ot)}else{if(ht===Ao)return new br(!1,!1,!1,ot);if(ht===Qi){for(var dr=!1,ur=!1,Rr=!1,Xr=0;Xr=1&&(ur=!0),Kr>=2&&(Rr=!0)}else $r.type===ji&&(dr=dr||$r.data.thisDep,ur=ur||$r.data.contextDep,Rr=Rr||$r.data.propDep)}return new br(dr,ur,Rr,ot)}else return new br(ht===pi,ht===Ja,ht===zn,ot)}}var xa=new br(!1,!1,!1,function(){});function Ba(pe,ot,ht,Kt,cr,dr,ur,Rr,Xr,$r,Kr,Hn,Cn,fn,Sr,Ut){var pr=$r.Record,Ir={add:32774,subtract:32778,"reverse subtract":32779};ht.ext_blend_minmax&&(Ir.min=Me,Ir.max=Le);var Zr=ht.angle_instanced_arrays,Cr=ht.webgl_draw_buffers,hn=ht.oes_vertex_array_object,sn={dirty:!0,profile:Ut.profile},Gn={},kr=[],Mr={},_n={};function an($e){return $e.replace(".","_")}function Jr($e,ct,Et){var nr=an($e);kr.push($e),Gn[nr]=sn[nr]=!!Et,Mr[nr]=ct}function Qr($e,ct,Et){var nr=an($e);kr.push($e),Array.isArray(Et)?(sn[nr]=Et.slice(),Gn[nr]=Et.slice()):sn[nr]=Gn[nr]=Et,_n[nr]=ct}function wn($e){return!!isNaN($e)}Jr(zo,Gr),Jr(Vi,wr),Qr(Js,"blendColor",[0,0,0,0]),Qr(cs,"blendEquationSeparate",[It,It]),Qr(Mo,"blendFuncSeparate",[Dt,xt,Dt,xt]),Jr(ya,cn,!0),Qr(ho,"depthFunc",ar),Qr(wo,"depthRange",[0,1]),Qr(Yi,"depthMask",!0),Qr(Vs,Vs,[!0,!0,!0,!0]),Jr(xu,sr),Qr(au,"cullFace",Z),Qr(Yu,Yu,_e),Qr(ll,ll,1),Jr(Pu,ta),Qr(ul,"polygonOffset",[0,0]),Jr(Pc,ka),Jr(Wa,va),Qr(oi,"sampleCoverage",[1,!1]),Jr(Ph,pn),Qr(pf,"stencilMask",-1),Qr(iu,"stencilFunc",[at,0,-1]),Qr(K,"stencilOpSeparate",[V,je,je,je]),Qr(b,"stencilOpSeparate",[Z,je,je,je]),Jr(I,kn),Qr(G,"scissor",[0,0,pe.drawingBufferWidth,pe.drawingBufferHeight]),Qr(H,H,[0,0,pe.drawingBufferWidth,pe.drawingBufferHeight]);var jn={gl:pe,context:Cn,strings:ot,next:Gn,current:sn,draw:Hn,elements:dr,buffer:cr,shader:Kr,attributes:$r.state,vao:$r,uniforms:Xr,framebuffer:Rr,extensions:ht,timer:fn,isBufferArgs:Vr},oa={primTypes:to,compareFuncs:hr,blendFuncs:Hr,blendEquations:Ir,stencilOps:Tr,glTypes:vn,orientationType:Lr};Cr&&(oa.backBuffer=[Z],oa.drawBuffer=T(Kt.maxDrawbuffers,function($e){return $e===0?[0]:T($e,function(ct){return Dr+ct})}));var rn=0;function Sn(){var $e=ea({cache:Sr}),ct=$e.link,Et=$e.global;$e.id=rn++,$e.batchId="0";var nr=ct(jn),vr=$e.shared={props:"a0"};Object.keys(jn).forEach(function(Lt){vr[Lt]=Et.def(nr,".",Lt)});var Ht=$e.next={},Nt=$e.current={};Object.keys(_n).forEach(function(Lt){Array.isArray(sn[Lt])&&(Ht[Lt]=Et.def(vr.next,".",Lt),Nt[Lt]=Et.def(vr.current,".",Lt))});var Pt=$e.constants={};Object.keys(oa).forEach(function(Lt){Pt[Lt]=Et.def(JSON.stringify(oa[Lt]))}),$e.invoke=function(Lt,dt){switch(dt.type){case na:var Jt=["this",vr.context,vr.props,$e.batchId];return Lt.def(ct(dt.data),".call(",Jt.slice(0,Math.max(dt.data.length+1,4)),")");case zn:return Lt.def(vr.props,dt.data);case Ja:return Lt.def(vr.context,dt.data);case pi:return Lt.def("this",dt.data);case ji:return dt.data.append($e,Lt),dt.data.ref;case Ao:return dt.data.toString();case Qi:return dt.data.map(function(yr){return $e.invoke(Lt,yr)})}},$e.attribCache={};var At={};return $e.scopeAttrib=function(Lt){var dt=ot.id(Lt);if(dt in At)return At[dt];var Jt=$r.scope[dt];Jt||(Jt=$r.scope[dt]=new pr);var yr=At[dt]=ct(Jt);return yr},$e}function sa($e){var ct=$e.static,Et=$e.dynamic,nr;if($ in ct){var vr=!!ct[$];nr=On(function(Nt,Pt){return vr}),nr.enable=vr}else if($ in Et){var Ht=Et[$];nr=ra(Ht,function(Nt,Pt){return Nt.invoke(Pt,Ht)})}return nr}function ca($e,ct){var Et=$e.static,nr=$e.dynamic;if(xe in Et){var vr=Et[xe];return vr?(vr=Rr.getFramebuffer(vr),On(function(Nt,Pt){var At=Nt.link(vr),Lt=Nt.shared;Pt.set(Lt.framebuffer,".next",At);var dt=Lt.context;return Pt.set(dt,"."+be,At+".width"),Pt.set(dt,"."+De,At+".height"),At})):On(function(Nt,Pt){var At=Nt.shared;Pt.set(At.framebuffer,".next","null");var Lt=At.context;return Pt.set(Lt,"."+be,Lt+"."+gt),Pt.set(Lt,"."+De,Lt+"."+Mt),"null"})}else if(xe in nr){var Ht=nr[xe];return ra(Ht,function(Nt,Pt){var At=Nt.invoke(Pt,Ht),Lt=Nt.shared,dt=Lt.framebuffer,Jt=Pt.def(dt,".getFramebuffer(",At,")");Pt.set(dt,".next",Jt);var yr=Lt.context;return Pt.set(yr,"."+be,Jt+"?"+Jt+".width:"+yr+"."+gt),Pt.set(yr,"."+De,Jt+"?"+Jt+".height:"+yr+"."+Mt),Jt})}else return null}function Ra($e,ct,Et){var nr=$e.static,vr=$e.dynamic;function Ht(At){if(At in nr){var Lt=nr[At],dt=!0,Jt=Lt.x|0,yr=Lt.y|0,Or,Yn;return"width"in Lt?Or=Lt.width|0:dt=!1,"height"in Lt?Yn=Lt.height|0:dt=!1,new br(!dt&&ct&&ct.thisDep,!dt&&ct&&ct.contextDep,!dt&&ct&&ct.propDep,function(Wn,Un){var qn=Wn.shared.context,yn=Or;"width"in Lt||(yn=Un.def(qn,".",be,"-",Jt));var Dn=Yn;return"height"in Lt||(Dn=Un.def(qn,".",De,"-",yr)),[Jt,yr,yn,Dn]})}else if(At in vr){var Tn=vr[At],bn=ra(Tn,function(Wn,Un){var qn=Wn.invoke(Un,Tn),yn=Wn.shared.context,Dn=Un.def(qn,".x|0"),In=Un.def(qn,".y|0"),fa=Un.def('"width" in ',qn,"?",qn,".width|0:","(",yn,".",be,"-",Dn,")"),Zi=Un.def('"height" in ',qn,"?",qn,".height|0:","(",yn,".",De,"-",In,")");return[Dn,In,fa,Zi]});return ct&&(bn.thisDep=bn.thisDep||ct.thisDep,bn.contextDep=bn.contextDep||ct.contextDep,bn.propDep=bn.propDep||ct.propDep),bn}else return ct?new br(ct.thisDep,ct.contextDep,ct.propDep,function(Wn,Un){var qn=Wn.shared.context;return[0,0,Un.def(qn,".",be),Un.def(qn,".",De)]}):null}var Nt=Ht(H);if(Nt){var Pt=Nt;Nt=new br(Nt.thisDep,Nt.contextDep,Nt.propDep,function(At,Lt){var dt=Pt.append(At,Lt),Jt=At.shared.context;return Lt.set(Jt,"."+Se,dt[2]),Lt.set(Jt,"."+Be,dt[3]),dt})}return{viewport:Nt,scissor_box:Ht(G)}}function go($e,ct){var Et=$e.static,nr=typeof Et[Ne]=="string"&&typeof Et[ke]=="string";if(nr){if(Object.keys(ct.dynamic).length>0)return null;var vr=ct.static,Ht=Object.keys(vr);if(Ht.length>0&&typeof vr[Ht[0]]=="number"){for(var Nt=[],Pt=0;Pt"+Dn+"?"+dt+".constant["+Dn+"]:0;"}).join(""),"}}else{","if(",Or,"(",dt,".buffer)){",Wn,"=",Yn,".createStream(",Ot,",",dt,".buffer);","}else{",Wn,"=",Yn,".getBuffer(",dt,".buffer);","}",Un,'="type" in ',dt,"?",yr.glTypes,"[",dt,".type]:",Wn,".dtype;",Tn.normalized,"=!!",dt,".normalized;");function qn(yn){Lt(Tn[yn],"=",dt,".",yn,"|0;")}return qn("size"),qn("offset"),qn("stride"),qn("divisor"),Lt("}}"),Lt.exit("if(",Tn.isStream,"){",Yn,".destroyStream(",Wn,");","}"),Tn}vr[Ht]=ra(Nt,Pt)}),vr}function es($e){var ct=$e.static,Et=$e.dynamic,nr={};return Object.keys(ct).forEach(function(vr){var Ht=ct[vr];nr[vr]=On(function(Nt,Pt){return typeof Ht=="number"||typeof Ht=="boolean"?""+Ht:Nt.link(Ht)})}),Object.keys(Et).forEach(function(vr){var Ht=Et[vr];nr[vr]=ra(Ht,function(Nt,Pt){return Nt.invoke(Pt,Ht)})}),nr}function Ds($e,ct,Et,nr,vr){var Ht=$e.static,Nt=$e.dynamic,Pt=go($e,ct),At=ca($e,vr),Lt=Ra($e,At,vr),dt=ja($e,vr),Jt=cl($e,vr),yr=No($e,vr,Pt);function Or(qn){var yn=Lt[qn];yn&&(Jt[qn]=yn)}Or(H),Or(an(G));var Yn=Object.keys(Jt).length>0,Tn={framebuffer:At,draw:dt,shader:yr,state:Jt,dirty:Yn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Tn.profile=sa($e,vr),Tn.uniforms=Ci(Et,vr),Tn.drawVAO=Tn.scopeVAO=dt.vao,!Tn.drawVAO&&yr.program&&!Pt&&ht.angle_instanced_arrays&&dt.static.elements){var bn=!0,Wn=yr.program.attributes.map(function(qn){var yn=ct.static[qn];return bn=bn&&!!yn,yn});if(bn&&Wn.length>0){var Un=$r.getVAO($r.createVAO({attributes:Wn,elements:dt.static.elements}));Tn.drawVAO=new br(null,null,null,function(qn,yn){return qn.link(Un)}),Tn.useVAO=!0}}return Pt?Tn.useVAO=!0:Tn.attributes=Ts(ct,vr),Tn.context=es(nr,vr),Tn}function Do($e,ct,Et){var nr=$e.shared,vr=nr.context,Ht=$e.scope();Object.keys(Et).forEach(function(Nt){ct.save(vr,"."+Nt);var Pt=Et[Nt],At=Pt.append($e,ct);Array.isArray(At)?Ht(vr,".",Nt,"=[",At.join(),"];"):Ht(vr,".",Nt,"=",At,";")}),ct(Ht)}function Ro($e,ct,Et,nr){var vr=$e.shared,Ht=vr.gl,Nt=vr.framebuffer,Pt;Cr&&(Pt=ct.def(vr.extensions,".webgl_draw_buffers"));var At=$e.constants,Lt=At.drawBuffer,dt=At.backBuffer,Jt;Et?Jt=Et.append($e,ct):Jt=ct.def(Nt,".next"),nr||ct("if(",Jt,"!==",Nt,".cur){"),ct("if(",Jt,"){",Ht,".bindFramebuffer(",rr,",",Jt,".framebuffer);"),Cr&&ct(Pt,".drawBuffersWEBGL(",Lt,"[",Jt,".colorAttachments.length]);"),ct("}else{",Ht,".bindFramebuffer(",rr,",null);"),Cr&&ct(Pt,".drawBuffersWEBGL(",dt,");"),ct("}",Nt,".cur=",Jt,";"),nr||ct("}")}function Uo($e,ct,Et){var nr=$e.shared,vr=nr.gl,Ht=$e.current,Nt=$e.next,Pt=nr.current,At=nr.next,Lt=$e.cond(Pt,".dirty");kr.forEach(function(dt){var Jt=an(dt);if(!(Jt in Et.state)){var yr,Or;if(Jt in Nt){yr=Nt[Jt],Or=Ht[Jt];var Yn=T(sn[Jt].length,function(bn){return Lt.def(yr,"[",bn,"]")});Lt($e.cond(Yn.map(function(bn,Wn){return bn+"!=="+Or+"["+Wn+"]"}).join("||")).then(vr,".",_n[Jt],"(",Yn,");",Yn.map(function(bn,Wn){return Or+"["+Wn+"]="+bn}).join(";"),";"))}else{yr=Lt.def(At,".",Jt);var Tn=$e.cond(yr,"!==",Pt,".",Jt);Lt(Tn),Jt in Mr?Tn($e.cond(yr).then(vr,".enable(",Mr[Jt],");").else(vr,".disable(",Mr[Jt],");"),Pt,".",Jt,"=",yr,";"):Tn(vr,".",_n[Jt],"(",yr,");",Pt,".",Jt,"=",yr,";")}}}),Object.keys(Et.state).length===0&&Lt(Pt,".dirty=false;"),ct(Lt)}function Sa($e,ct,Et,nr){var vr=$e.shared,Ht=$e.current,Nt=vr.current,Pt=vr.gl,At;jr(Object.keys(Et)).forEach(function(Lt){var dt=Et[Lt];if(!(nr&&!nr(dt))){var Jt=dt.append($e,ct);if(Mr[Lt]){var yr=Mr[Lt];Ln(dt)?(At=$e.link(Jt,{stable:!0}),ct($e.cond(At).then(Pt,".enable(",yr,");").else(Pt,".disable(",yr,");")),ct(Nt,".",Lt,"=",At,";")):(ct($e.cond(Jt).then(Pt,".enable(",yr,");").else(Pt,".disable(",yr,");")),ct(Nt,".",Lt,"=",Jt,";"))}else if(Rn(Jt)){var Or=Ht[Lt];ct(Pt,".",_n[Lt],"(",Jt,");",Jt.map(function(Yn,Tn){return Or+"["+Tn+"]="+Yn}).join(";"),";")}else Ln(dt)?(At=$e.link(Jt,{stable:!0}),ct(Pt,".",_n[Lt],"(",At,");",Nt,".",Lt,"=",At,";")):ct(Pt,".",_n[Lt],"(",Jt,");",Nt,".",Lt,"=",Jt,";")}})}function ts($e,ct){Zr&&($e.instancing=ct.def($e.shared.extensions,".angle_instanced_arrays"))}function qi($e,ct,Et,nr,vr){var Ht=$e.shared,Nt=$e.stats,Pt=Ht.current,At=Ht.timer,Lt=Et.profile;function dt(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var Jt,yr;function Or(qn){Jt=ct.def(),qn(Jt,"=",dt(),";"),typeof vr=="string"?qn(Nt,".count+=",vr,";"):qn(Nt,".count++;"),fn&&(nr?(yr=ct.def(),qn(yr,"=",At,".getNumPendingQueries();")):qn(At,".beginQuery(",Nt,");"))}function Yn(qn){qn(Nt,".cpuTime+=",dt(),"-",Jt,";"),fn&&(nr?qn(At,".pushScopeStats(",yr,",",At,".getNumPendingQueries(),",Nt,");"):qn(At,".endQuery();"))}function Tn(qn){var yn=ct.def(Pt,".profile");ct(Pt,".profile=",qn,";"),ct.exit(Pt,".profile=",yn,";")}var bn;if(Lt){if(Ln(Lt)){Lt.enable?(Or(ct),Yn(ct.exit),Tn("true")):Tn("false");return}bn=Lt.append($e,ct),Tn(bn)}else bn=ct.def(Pt,".profile");var Wn=$e.block();Or(Wn),ct("if(",bn,"){",Wn,"}");var Un=$e.block();Yn(Un),ct.exit("if(",bn,"){",Un,"}")}function Hs($e,ct,Et,nr,vr){var Ht=$e.shared;function Nt(At){switch(At){case Ai:case Wo:case Jo:return 2;case di:case fs:case Tl:return 3;case xo:case ws:case bu:return 4;default:return 1}}function Pt(At,Lt,dt){var Jt=Ht.gl,yr=ct.def(At,".location"),Or=ct.def(Ht.attributes,"[",yr,"]"),Yn=dt.state,Tn=dt.buffer,bn=[dt.x,dt.y,dt.z,dt.w],Wn=["buffer","normalized","offset","stride"];function Un(){ct("if(!",Or,".buffer){",Jt,".enableVertexAttribArray(",yr,");}");var yn=dt.type,Dn;if(dt.size?Dn=ct.def(dt.size,"||",Lt):Dn=Lt,ct("if(",Or,".type!==",yn,"||",Or,".size!==",Dn,"||",Wn.map(function(fa){return Or+"."+fa+"!=="+dt[fa]}).join("||"),"){",Jt,".bindBuffer(",Ot,",",Tn,".buffer);",Jt,".vertexAttribPointer(",[yr,Dn,yn,dt.normalized,dt.stride,dt.offset],");",Or,".type=",yn,";",Or,".size=",Dn,";",Wn.map(function(fa){return Or+"."+fa+"="+dt[fa]+";"}).join(""),"}"),Zr){var In=dt.divisor;ct("if(",Or,".divisor!==",In,"){",$e.instancing,".vertexAttribDivisorANGLE(",[yr,In],");",Or,".divisor=",In,";}")}}function qn(){ct("if(",Or,".buffer){",Jt,".disableVertexAttribArray(",yr,");",Or,".buffer=null;","}if(",Ca.map(function(yn,Dn){return Or+"."+yn+"!=="+bn[Dn]}).join("||"),"){",Jt,".vertexAttrib4f(",yr,",",bn,");",Ca.map(function(yn,Dn){return Or+"."+yn+"="+bn[Dn]+";"}).join(""),"}")}Yn===La?Un():Yn===Va?qn():(ct("if(",Yn,"===",La,"){"),Un(),ct("}else{"),qn(),ct("}"))}nr.forEach(function(At){var Lt=At.name,dt=Et.attributes[Lt],Jt;if(dt){if(!vr(dt))return;Jt=dt.append($e,ct)}else{if(!vr(xa))return;var yr=$e.scopeAttrib(Lt);Jt={},Object.keys(new pr).forEach(function(Or){Jt[Or]=ct.def(yr,".",Or)})}Pt($e.link(At),Nt(At.info.type),Jt)})}function js($e,ct,Et,nr,vr,Ht){for(var Nt=$e.shared,Pt=Nt.gl,At,Lt=0;Lt1){for(var Ws=[],Ru=[],Zc=0;Zc>1)",Tn],");")}function In(){Et(bn,".drawArraysInstancedANGLE(",[yr,Or,Yn,Tn],");")}dt&&dt!=="null"?Un?Dn():(Et("if(",dt,"){"),Dn(),Et("}else{"),In(),Et("}")):In()}function yn(){function Dn(){Et(Ht+".drawElements("+[yr,Yn,Wn,Or+"<<(("+Wn+"-"+Pa+")>>1)"]+");")}function In(){Et(Ht+".drawArrays("+[yr,Or,Yn]+");")}dt&&dt!=="null"?Un?Dn():(Et("if(",dt,"){"),Dn(),Et("}else{"),In(),Et("}")):In()}Zr&&(typeof Tn!="number"||Tn>=0)?typeof Tn=="string"?(Et("if(",Tn,">0){"),qn(),Et("}else if(",Tn,"<0){"),yn(),Et("}")):qn():yn()}function ha($e,ct,Et,nr,vr){var Ht=Sn(),Nt=Ht.proc("body",vr);return Zr&&(Ht.instancing=Nt.def(Ht.shared.extensions,".angle_instanced_arrays")),$e(Ht,Nt,Et,nr),Ht.compile().body}function Ka($e,ct,Et,nr){ts($e,ct),Et.useVAO?Et.drawVAO?ct($e.shared.vao,".setVAO(",Et.drawVAO.append($e,ct),");"):ct($e.shared.vao,".setVAO(",$e.shared.vao,".targetVAO);"):(ct($e.shared.vao,".setVAO(null);"),Hs($e,ct,Et,nr.attributes,function(){return!0})),js($e,ct,Et,nr.uniforms,function(){return!0},!1),fl($e,ct,ct,Et)}function ti($e,ct){var Et=$e.proc("draw",1);ts($e,Et),Do($e,Et,ct.context),Ro($e,Et,ct.framebuffer),Uo($e,Et,ct),Sa($e,Et,ct.state),qi($e,Et,ct,!1,!0);var nr=ct.shader.progVar.append($e,Et);if(Et($e.shared.gl,".useProgram(",nr,".program);"),ct.shader.program)Ka($e,Et,ct,ct.shader.program);else{Et($e.shared.vao,".setVAO(null);");var vr=$e.global.def("{}"),Ht=Et.def(nr,".id"),Nt=Et.def(vr,"[",Ht,"]");Et($e.cond(Nt).then(Nt,".call(this,a0);").else(Nt,"=",vr,"[",Ht,"]=",$e.link(function(Pt){return ha(Ka,$e,ct,Pt,1)}),"(",nr,");",Nt,".call(this,a0);"))}Object.keys(ct.state).length>0&&Et($e.shared.current,".dirty=true;"),$e.shared.vao&&Et($e.shared.vao,".setVAO(null);")}function it($e,ct,Et,nr){$e.batchId="a1",ts($e,ct);function vr(){return!0}Hs($e,ct,Et,nr.attributes,vr),js($e,ct,Et,nr.uniforms,vr,!1),fl($e,ct,ct,Et)}function ir($e,ct,Et,nr){ts($e,ct);var vr=Et.contextDep,Ht=ct.def(),Nt="a0",Pt="a1",At=ct.def();$e.shared.props=At,$e.batchId=Ht;var Lt=$e.scope(),dt=$e.scope();ct(Lt.entry,"for(",Ht,"=0;",Ht,"<",Pt,";++",Ht,"){",At,"=",Nt,"[",Ht,"];",dt,"}",Lt.exit);function Jt(Wn){return Wn.contextDep&&vr||Wn.propDep}function yr(Wn){return!Jt(Wn)}if(Et.needsContext&&Do($e,dt,Et.context),Et.needsFramebuffer&&Ro($e,dt,Et.framebuffer),Sa($e,dt,Et.state,Jt),Et.profile&&Jt(Et.profile)&&qi($e,dt,Et,!1,!0),nr)Et.useVAO?Et.drawVAO?Jt(Et.drawVAO)?dt($e.shared.vao,".setVAO(",Et.drawVAO.append($e,dt),");"):Lt($e.shared.vao,".setVAO(",Et.drawVAO.append($e,Lt),");"):Lt($e.shared.vao,".setVAO(",$e.shared.vao,".targetVAO);"):(Lt($e.shared.vao,".setVAO(null);"),Hs($e,Lt,Et,nr.attributes,yr),Hs($e,dt,Et,nr.attributes,Jt)),js($e,Lt,Et,nr.uniforms,yr,!1),js($e,dt,Et,nr.uniforms,Jt,!0),fl($e,Lt,dt,Et);else{var Or=$e.global.def("{}"),Yn=Et.shader.progVar.append($e,dt),Tn=dt.def(Yn,".id"),bn=dt.def(Or,"[",Tn,"]");dt($e.shared.gl,".useProgram(",Yn,".program);","if(!",bn,"){",bn,"=",Or,"[",Tn,"]=",$e.link(function(Wn){return ha(it,$e,Et,Wn,2)}),"(",Yn,");}",bn,".call(this,a0[",Ht,"],",Ht,");")}}function or($e,ct){var Et=$e.proc("batch",2);$e.batchId="0",ts($e,Et);var nr=!1,vr=!0;Object.keys(ct.context).forEach(function(Or){nr=nr||ct.context[Or].propDep}),nr||(Do($e,Et,ct.context),vr=!1);var Ht=ct.framebuffer,Nt=!1;Ht?(Ht.propDep?nr=Nt=!0:Ht.contextDep&&nr&&(Nt=!0),Nt||Ro($e,Et,Ht)):Ro($e,Et,null),ct.state.viewport&&ct.state.viewport.propDep&&(nr=!0);function Pt(Or){return Or.contextDep&&nr||Or.propDep}Uo($e,Et,ct),Sa($e,Et,ct.state,function(Or){return!Pt(Or)}),(!ct.profile||!Pt(ct.profile))&&qi($e,Et,ct,!1,"a1"),ct.contextDep=nr,ct.needsContext=vr,ct.needsFramebuffer=Nt;var At=ct.shader.progVar;if(At.contextDep&&nr||At.propDep)ir($e,Et,ct,null);else{var Lt=At.append($e,Et);if(Et($e.shared.gl,".useProgram(",Lt,".program);"),ct.shader.program)ir($e,Et,ct,ct.shader.program);else{Et($e.shared.vao,".setVAO(null);");var dt=$e.global.def("{}"),Jt=Et.def(Lt,".id"),yr=Et.def(dt,"[",Jt,"]");Et($e.cond(yr).then(yr,".call(this,a0,a1);").else(yr,"=",dt,"[",Jt,"]=",$e.link(function(Or){return ha(ir,$e,ct,Or,2)}),"(",Lt,");",yr,".call(this,a0,a1);"))}}Object.keys(ct.state).length>0&&Et($e.shared.current,".dirty=true;"),$e.shared.vao&&Et($e.shared.vao,".setVAO(null);")}function Fn($e,ct){var Et=$e.proc("scope",3);$e.batchId="a2";var nr=$e.shared,vr=nr.current;if(Do($e,Et,ct.context),ct.framebuffer&&ct.framebuffer.append($e,Et),jr(Object.keys(ct.state)).forEach(function(Pt){var At=ct.state[Pt],Lt=At.append($e,Et);Rn(Lt)?Lt.forEach(function(dt,Jt){wn(dt)?Et.set($e.next[Pt],"["+Jt+"]",dt):Et.set($e.next[Pt],"["+Jt+"]",$e.link(dt,{stable:!0}))}):Ln(At)?Et.set(nr.next,"."+Pt,$e.link(Lt,{stable:!0})):Et.set(nr.next,"."+Pt,Lt)}),qi($e,Et,ct,!0,!0),[et,zt,Tt,Yt,bt].forEach(function(Pt){var At=ct.draw[Pt];if(At){var Lt=At.append($e,Et);wn(Lt)?Et.set(nr.draw,"."+Pt,Lt):Et.set(nr.draw,"."+Pt,$e.link(Lt),{stable:!0})}}),Object.keys(ct.uniforms).forEach(function(Pt){var At=ct.uniforms[Pt].append($e,Et);Array.isArray(At)&&(At="["+At.map(function(Lt){return wn(Lt)?Lt:$e.link(Lt,{stable:!0})})+"]"),Et.set(nr.uniforms,"["+$e.link(ot.id(Pt),{stable:!0})+"]",At)}),Object.keys(ct.attributes).forEach(function(Pt){var At=ct.attributes[Pt].append($e,Et),Lt=$e.scopeAttrib(Pt);Object.keys(new pr).forEach(function(dt){Et.set(Lt,"."+dt,At[dt])})}),ct.scopeVAO){var Ht=ct.scopeVAO.append($e,Et);wn(Ht)?Et.set(nr.vao,".targetVAO",Ht):Et.set(nr.vao,".targetVAO",$e.link(Ht,{stable:!0}))}function Nt(Pt){var At=ct.shader[Pt];if(At){var Lt=At.append($e,Et);wn(Lt)?Et.set(nr.shader,"."+Pt,Lt):Et.set(nr.shader,"."+Pt,$e.link(Lt,{stable:!0}))}}Nt(ke),Nt(Ne),Object.keys(ct.state).length>0&&(Et(vr,".dirty=true;"),Et.exit(vr,".dirty=true;")),Et("a1(",$e.shared.context,",a0,",$e.batchId,");")}function Ga($e){if(!(typeof $e!="object"||Rn($e))){for(var ct=Object.keys($e),Et=0;Et=0;--ha){var Ka=jn[ha];Ka&&Ka(Sr,null,0)}ht.flush(),Kr&&Kr.update()}function Ra(){!sa&&jn.length>0&&(sa=v.next(ca))}function go(){sa&&(v.cancel(ca),sa=null)}function No(ha){ha.preventDefault(),cr=!0,go(),oa.forEach(function(Ka){Ka()})}function ja(ha){ht.getError(),cr=!1,dr.restore(),Gn.restore(),Zr.restore(),kr.restore(),Mr.restore(),_n.restore(),hn.restore(),Kr&&Kr.restore(),an.procs.refresh(),Ra(),rn.forEach(function(Ka){Ka()})}wn&&(wn.addEventListener(Ri,No,!1),wn.addEventListener(To,ja,!1));function cl(){jn.length=0,go(),wn&&(wn.removeEventListener(Ri,No),wn.removeEventListener(To,ja)),Gn.clear(),_n.clear(),Mr.clear(),hn.clear(),kr.clear(),Cr.clear(),Zr.clear(),Kr&&Kr.clear(),Sn.forEach(function(ha){ha()})}function Ci(ha){function Ka(Ht){var Nt=e({},Ht);delete Nt.uniforms,delete Nt.attributes,delete Nt.context,delete Nt.vao,"stencil"in Nt&&Nt.stencil.op&&(Nt.stencil.opBack=Nt.stencil.opFront=Nt.stencil.op,delete Nt.stencil.op);function Pt(At){if(At in Nt){var Lt=Nt[At];delete Nt[At],Object.keys(Lt).forEach(function(dt){Nt[At+"."+dt]=Lt[dt]})}}return Pt("blend"),Pt("depth"),Pt("cull"),Pt("stencil"),Pt("polygonOffset"),Pt("scissor"),Pt("sample"),"vao"in Ht&&(Nt.vao=Ht.vao),Nt}function ti(Ht,Nt){var Pt={},At={};return Object.keys(Ht).forEach(function(Lt){var dt=Ht[Lt];if(h.isDynamic(dt)){At[Lt]=h.unbox(dt,Lt);return}else if(Nt&&Array.isArray(dt)){for(var Jt=0;Jt0)return $e.call(this,nr(Ht|0),Ht|0)}else if(Array.isArray(Ht)){if(Ht.length)return $e.call(this,Ht,Ht.length)}else return Pn.call(this,Ht)}return e(vr,{stats:Ga,destroy:function(){Li.destroy()}})}var Ts=_n.setFBO=Ci({framebuffer:h.define.call(null,Qo,"framebuffer")});function es(ha,Ka){var ti=0;an.procs.poll();var it=Ka.color;it&&(ht.clearColor(+it[0]||0,+it[1]||0,+it[2]||0,+it[3]||0),ti|=Ps),"depth"in Ka&&(ht.clearDepth(+Ka.depth),ti|=Yo),"stencil"in Ka&&(ht.clearStencil(Ka.stencil|0),ti|=ma),ht.clear(ti)}function Ds(ha){if("framebuffer"in ha)if(ha.framebuffer&&ha.framebuffer_reglType==="framebufferCube")for(var Ka=0;Ka<6;++Ka)Ts(e({framebuffer:ha.framebuffer.faces[Ka]},ha),es);else Ts(ha,es);else es(null,ha)}function Do(ha){jn.push(ha);function Ka(){var ti=wu(jn,ha);function it(){var ir=wu(jn,it);jn[ir]=jn[jn.length-1],jn.length-=1,jn.length<=0&&go()}jn[ti]=it}return Ra(),{cancel:Ka}}function Ro(){var ha=Qr.viewport,Ka=Qr.scissor_box;ha[0]=ha[1]=Ka[0]=Ka[1]=0,Sr.viewportWidth=Sr.framebufferWidth=Sr.drawingBufferWidth=ha[2]=Ka[2]=ht.drawingBufferWidth,Sr.viewportHeight=Sr.framebufferHeight=Sr.drawingBufferHeight=ha[3]=Ka[3]=ht.drawingBufferHeight}function Uo(){Sr.tick+=1,Sr.time=ts(),Ro(),an.procs.poll()}function Sa(){kr.refresh(),Ro(),an.procs.refresh(),Kr&&Kr.update()}function ts(){return(d()-Hn)/1e3}Sa();function qi(ha,Ka){var ti;switch(ha){case"frame":return Do(Ka);case"lost":ti=oa;break;case"restore":ti=rn;break;case"destroy":ti=Sn;break;default:}return ti.push(Ka),{cancel:function(){for(var it=0;it=0},read:Jr,destroy:cl,_gl:ht,_refresh:Sa,poll:function(){Uo(),Kr&&Kr.update()},now:ts,stats:Rr,getCachedCode:Hs,preloadCachedCode:js});return ot.onDone(null,fl),fl}return Dc}))});var R9=ne((e1r,dze)=>{"use strict";var CBt=LG(),LBt=hze();dze.exports=function(t,r,n){var a=t._fullLayout,i=!0;return a._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!a._has("parcoords"))){try{o.regl=LBt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){i=!1}o.regl||(i=!1),i&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),i||CBt({container:a._glcontainer.node()}),i}});var _W=ne((bW,xze)=>{"use strict";var vze=_j(),pze=Jj(),FBt=rIe(),gze=fze(),mze=Zt(),PBt=Cp().selectMode,DBt=R9(),RBt=ml(),IBt=wq(),zBt=mj().styleTextSelection,yze={};function qBt(e,t,r,n){var a=e._size,i=e.width*n,o=e.height*n,s=a.l*n,l=a.b*n,u=a.r*n,c=a.t*n,f=a.w*n,h=a.h*n;return[s+t.domain[0]*f,l+r.domain[0]*h,i-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*h]}var bW=xze.exports=function(t,r,n){if(n.length){var a=t._fullLayout,i=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(i){var c=DBt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],yze);if(!c){i.init();return}var f=i.count,h=a._glcanvas.data()[0].regl;if(IBt(t,r,n),i.dirty){if((i.line2d||i.error2d)&&!(i.scatter2d||i.fill2d||i.glText)&&h.clear({color:!0,depth:!0}),i.error2d===!0&&(i.error2d=FBt(h)),i.line2d===!0&&(i.line2d=pze(h)),i.scatter2d===!0&&(i.scatter2d=vze(h)),i.fill2d===!0&&(i.fill2d=pze(h)),i.glText===!0)for(i.glText=new Array(f),l=0;li.glText.length){var v=f-i.glText.length;for(l=0;lY&&(isNaN(B[X])||isNaN(B[X+1]));)X-=2;R.positions=B.slice(Y,X+2)}return R}),i.line2d.update(i.lineOptions)),i.error2d){var x=(i.errorXOptions||[]).concat(i.errorYOptions||[]).map(function(R){return R||{positions:[],errors:[]}});i.error2d.update(x)}i.scatter2d&&i.scatter2d.update(i.markerOptions),i.fillOrder=mze.repeat(null,f),i.fill2d&&(i.fillOptions=i.fillOptions.map(function(R,B){var Y=n[B];if(!(!R||!Y||!Y[0]||!Y[0].trace)){var X=Y[0],te=X.trace,se=X.t,ue=i.lineOptions[B],re,j,fe=[];te._ownfill&&fe.push(B),te._nexttrace&&fe.push(B+1),fe.length&&(i.fillOrder[B]=fe);var ce=[],oe=ue&&ue.positions||se.positions,we,he;if(te.fill==="tozeroy"){for(we=0;wewe&&isNaN(oe[he+1]);)he-=2;oe[we+1]!==0&&(ce=[oe[we],0]),ce=ce.concat(oe.slice(we,he+2)),oe[he+1]!==0&&(ce=ce.concat([oe[he],0]))}else if(te.fill==="tozerox"){for(we=0;wewe&&isNaN(oe[he]);)he-=2;oe[we]!==0&&(ce=[0,oe[we+1]]),ce=ce.concat(oe.slice(we,he+2)),oe[he]!==0&&(ce=ce.concat([0,oe[he+1]]))}else if(te.fill==="toself"||te.fill==="tonext"){for(ce=[],re=0,R.splitNull=!0,j=0;j-1;for(let[R]of n)if(R){var w=R.trace,k=R.t,y=k.index,S=w._length,T=k.x,p=k.y;if(w.selectedpoints||E||M){if(E||(E=!0),w.selectedpoints){var C=i.selectBatch[y]=w.selectedpoints,A={};for(u=0;u{"use strict";var bze=qFe();bze.plot=_W();_ze.exports=bze});var Aze=ne((r1r,Tze)=>{"use strict";Tze.exports=wze()});var wW=ne((n1r,kze)=>{"use strict";var BBt=Tu(),Eze=Ys(),Mze=Wl().axisHoverFormat,{hovertemplateAttrs:OBt,templatefallbackAttrs:NBt}=rs(),x6=QA(),UBt=zc().idRegex,VBt=Bo().templatedArray,bw=ci().extendFlat,hg=BBt.marker,GBt=hg.line,HBt=bw(Eze("marker.line",{editTypeOverride:"calc"}),{width:bw({},GBt.width,{editType:"calc"}),editType:"calc"}),I9=bw(Eze("marker"),{symbol:hg.symbol,angle:hg.angle,size:bw({},hg.size,{editType:"markerSize"}),sizeref:hg.sizeref,sizemin:hg.sizemin,sizemode:hg.sizemode,opacity:hg.opacity,colorbar:hg.colorbar,line:HBt,editType:"calc"});I9.color.editType=I9.cmin.editType=I9.cmax.editType="style";function Sze(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:UBt[e],editType:"plot"}}}kze.exports={dimensions:VBt("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:!0,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:bw({},x6.text,{}),hovertext:bw({},x6.hovertext,{}),hovertemplate:OBt(),hovertemplatefallback:NBt(),xhoverformat:Mze("x"),yhoverformat:Mze("y"),marker:I9,xaxes:Sze("x"),yaxes:Sze("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:x6.selected.marker,editType:"calc"},unselected:{marker:x6.unselected.marker,editType:"calc"},opacity:x6.opacity}});var z9=ne((a1r,Cze)=>{"use strict";Cze.exports=function(e,t,r,n){n||(n=1/0);var a,i;for(a=0;a{"use strict";var TW=Zt(),jBt=zh(),Lze=wW(),WBt=ml(),YBt=Kv(),XBt=z9(),ZBt=$7().isOpenSymbol;Fze.exports=function(t,r,n,a){function i(v,d){return TW.coerce(t,r,Lze,v,d)}var o=jBt(t,r,{name:"dimensions",handleItemDefaults:$Bt}),s=i("diagonal.visible"),l=i("showupperhalf"),u=i("showlowerhalf"),c=XBt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),YBt(t,r,n,a,i,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=ZBt(r.marker.symbol),h=WBt.isBubble(r);i("marker.line.width",f||h?1:0),KBt(t,r,a,i),TW.coerceSelectionMarkerOpacity(r,i)};function $Bt(e,t){function r(a,i){return TW.coerce(e,t,Lze.dimensions,a,i)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function KBt(e,t,r,n){var a=t.dimensions,i=a.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(i),h=new Array(i);for(u=0;uc&&o||u{"use strict";var Dze=Zt();Rze.exports=function(t,r){var n=t._fullLayout,a=r.uid,i=n._splomScenes;i||(i=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=i[r.uid];return l||(l=i[a]=Dze.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||Dze.extendFlat(l,o),l}});var Bze=ne((s1r,qze)=>{"use strict";var AW=Zt(),q9=uu(),JBt=Qv().calcMarkerSize,QBt=Qv().calcAxisExpansion,eOt=Jv(),zze=k2().markerSelection,tOt=k2().markerStyle,rOt=Ize(),nOt=uo().BADNUM,aOt=Km().TOO_MANY_POINTS;qze.exports=function(t,r){var n=r.dimensions,a=r._length,i={},o=i.cdata=[],s=i.data=[],l=r._visibleDims=[],u,c,f,h,v;function d(M,w){for(var k=M.makeCalcdata({v:w.values,vcalendar:r.calendar},"v"),y=0;yaOt,g;for(x?g=i.sizeAvg||Math.max(i.size,3):g=JBt(r,a),c=0;c{(function(){var e,t,r,n,a,i;typeof performance!="undefined"&&performance!==null&&performance.now?b6.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(b6.exports=function(){return(e()-a)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),i=process.uptime()*1e9,a=n-i):Date.now?(b6.exports=function(){return Date.now()-r},r=Date.now()):(b6.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(Oze)});var Vze=ne((l1r,N9)=>{var iOt=Nze(),dg=window,B9=["moz","webkit"],ww="AnimationFrame",Tw=dg["request"+ww],_6=dg["cancel"+ww]||dg["cancelRequest"+ww];for(_w=0;!Tw&&_w{Gze.exports=function(t,r){var n=typeof t=="number",a=typeof r=="number";n&&!a?(r=t,t=0):!n&&!a&&(t=0,r=0),t=t|0,r=r|0;var i=r-t;if(i<0)throw new Error("array length must be positive");for(var o=new Array(i),s=0,l=t;s{"use strict";var oOt=_j(),sOt=s1(),lOt=A2(),jze=Vze(),uOt=Hze(),SW=sw(),cOt=M2();Yze.exports=oy;function oy(e,t){if(!(this instanceof oy))return new oy(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=oOt(e),this.canvas=this.scatter.canvas}oy.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=jze(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,jze(()=>{this.dirty=!1})),this)};oy.prototype.update=function(...e){if(!e.length)return;for(let n=0;nx||!a.lower&&m{t[i+s]=n})}this.scatter.draw(...t)}return this};oy.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function fOt(e,t,r){let n=e.id!=null?e.id:e,a=t,i=r;return n<<16|(a&255)<<8|i&255}function U9(e,t,r){let n,a,i,o,s,l,u,c,f=e[t],h=e[r];return f.length>2?(n=f[0],i=f[2],a=f[1],o=f[3]):f.length?(n=a=f[0],i=o=f[1]):(n=f.x,a=f.y,i=f.x+f.width,o=f.y+f.height),h.length>2?(s=h[0],u=h[2],l=h[1],c=h[3]):h.length?(s=l=h[0],u=c=h[1]):(s=h.x,l=h.y,u=h.x+h.width,c=h.y+h.height),[s,a,u,o]}function Wze(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=SW(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var $ze=ne((f1r,Zze)=>{"use strict";var hOt=Xze(),EW=Zt(),V9=uu(),dOt=Cp().selectMode;Zze.exports=function(t,r,n){if(n.length)for(var a=0;a-1,A=dOt(c)||!!a.selectedpoints||C,P=!0;if(A){var D=a._length;if(a.selectedpoints){o.selectBatch=a.selectedpoints;var z=a.selectedpoints,q={};for(v=0;v{"use strict";Kze.getDimIndex=function(t,r){for(var n=r._id,a=n.charAt(0),i={x:0,y:1}[a],o=t._visibleDims,s=0;s{"use strict";var Jze=kW(),pOt=Z7().calcHover,Qze=ri().getFromId,gOt=ci().extendFlat;function mOt(e,t,r,n,a){a||(a={});var i=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=eqe(e,t,r);if((i||o)&&a.hoversubplots==="axis"&&s[0])for(var l=(i?e.xa:e.ya)._subplotsWith,u=a.gd,c=gOt({},e),f=0;f{"use strict";var oqe=Zt(),nqe=oqe.pushUnique,aqe=ml(),iqe=kW();sqe.exports=function(t,r){var n=t.cd,a=n[0].trace,i=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!aqe.hasMarkers(a)&&!aqe.hasText(a);if(a.visible!==!0||f)return c;var h=iqe.getDimIndex(a,l),v=iqe.getDimIndex(a,u);if(h===!1||v===!1)return c;var d=i.xpx[h],m=i.ypx[v],x=s[h],g=s[v],E=(t.scene.selectBatch||[]).slice(),M=[];if(r!==!1&&!r.degenerate)for(var w=0;w{"use strict";var uqe=Zt(),yOt=Jv(),xOt=k2().markerStyle;cqe.exports=function(t,r){var n=r.trace,a=t._fullLayout._splomScenes[n.uid];if(a){yOt(t,n),uqe.extendFlat(a.matrixOptions,xOt(t,n));var i=uqe.extendFlat({},a.matrixOptions,a.viewOpts);a.matrix.update(i,null)}}});var dqe=ne((g1r,hqe)=>{"use strict";var bOt=Fa(),_Ot=pB();hqe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:wW(),supplyDefaults:Pze(),colorbar:bh(),calc:Bze(),plot:$ze(),hoverPoints:rqe().hoverPoints,selectPoints:lqe(),editStyle:fqe(),meta:{}};bOt.register(_Ot)});var xqe=ne((m1r,yqe)=>{"use strict";var wOt=Jj(),TOt=Fa(),AOt=R9(),MOt=mh().getModuleCalcData,sy=Ku(),vqe=uu().getFromId,pqe=ri().shouldShowZeroLine,gqe="splom",mqe={};function SOt(e){var t=e._fullLayout,r=TOt.getModule(gqe),n=MOt(e.calcdata,r)[0],a=AOt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],mqe);a&&(t._hasOnlyLargeSploms&&CW(e),r.plot(e,{},n))}function EOt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&CW(e);for(var n=0;n{"use strict";var bqe=dqe();bqe.basePlotModule=xqe(),_qe.exports=bqe});var Aqe=ne((x1r,Tqe)=>{"use strict";Tqe.exports=wqe()});var PW=ne((b1r,Mqe)=>{"use strict";var FOt=Ys(),LW=Wf(),FW=pl(),POt=zl().attributes,G9=ci().extendFlat,DOt=Bo().templatedArray;Mqe.exports={domain:POt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:FW({editType:"plot"}),tickfont:FW({autoShadowDflt:!0,editType:"plot"}),rangefont:FW({editType:"plot"}),dimensions:DOt("dimension",{label:{valType:"string",editType:"plot"},tickvals:G9({},LW.tickvals,{editType:"plot"}),ticktext:G9({},LW.ticktext,{editType:"plot"}),tickformat:G9({},LW.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:G9({editType:"calc"},FOt("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}});var w6=ne((_1r,Sqe)=>{"use strict";Sqe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var c1=ne((w1r,kqe)=>{"use strict";var ROt=F5();function Eqe(e){return[e]}kqe.exports={keyFun:function(e){return e.key},repeat:Eqe,descend:ROt,wrap:Eqe,unwrap:function(e){return e[0]}}});var IW=ne((T1r,Oqe)=>{"use strict";var bc=w6(),fp=Ea(),IOt=c1().keyFun,H9=c1().repeat,Aw=Zt().sorterAsc,zOt=Zt().strTranslate,Cqe=bc.bar.snapRatio;function Lqe(e,t){return e*(1-Cqe)+t*Cqe}var Fqe=bc.bar.snapClose;function qOt(e,t){return e*(1-Fqe)+t*Fqe}function W9(e,t,r,n){if(BOt(r,n))return r;var a=e?-1:1,i=0,o=t.length-1;if(a<0){var s=i;i=o,o=s}for(var l=t[i],u=l,c=i;a*c=t[r][0]&&e<=t[r][1])return!0;return!1}function OOt(e){e.attr("x",-bc.bar.captureWidth/2).attr("width",bc.bar.captureWidth)}function NOt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function UOt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=Pqe(e.brush.filter.getConsolidated(),e.height),r=[0],n,a,i,o=t.length?t[0][0]:null,s=0;se[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function Dqe(){fp.select(document.body).style("cursor",null)}function RW(e){e.attr("stroke-dasharray",UOt)}function j9(e,t){var r=fp.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(bc.bar.snapDuration).each("end",t):r;RW(n)}function Rqe(e,t){var r=e.brush,n=r.filterSpecified,a=NaN,i={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=Pqe(l,s),c=NaN,f=NaN,h=NaN;for(o=0;o<=u.length;o++){var v=u[o];if(v&&v[0]<=t&&t<=v[1]){c=o;break}else if(f=o?o-1:NaN,v&&v[0]>t){h=o;break}}if(a=c,isNaN(a)&&(isNaN(f)||isNaN(h)?a=isNaN(f)?h:f:a=t-u[f][1]=E[0]&&g<=E[1]){i.clickableOrdinalRange=E;break}}}return i}function GOt(e,t){fp.event.sourceEvent.stopPropagation();var r=t.height-fp.mouse(e)[1]-2*bc.verticalPadding,n=t.unitToPaddedPx.invert(r),a=t.brush,i=Rqe(t,r),o=i.interval,s=a.svgBrush;if(s.wasDragged=!1,s.grabbingBar=i.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-bc.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=i.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&a.filterSpecified?a.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=i.region?o[i.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function Iqe(e,t){fp.event.sourceEvent.stopPropagation();var r=t.height-fp.mouse(e)[1]-2*bc.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(Aw),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),j9(e.parentNode)}function HOt(e,t){var r=t.brush,n=r.filter,a=r.svgBrush;a._dragging||(zqe(e,t),Iqe(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1;var i=fp.event;i.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,Dqe(),!a.wasDragged){a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,a.extent.length===0&&DW(r)):DW(r),a.brushCallback(t),j9(e.parentNode),a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(u?[a.newExtent]:[]),a.extent.length||DW(r),a.brushCallback(t),u?j9(e.parentNode,s):(s(),j9(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function zqe(e,t){var r=t.height-fp.mouse(e)[1]-2*bc.verticalPadding,n=Rqe(t,r),a="crosshair";n.clickableOrdinalRange?a="pointer":n.region&&(a=n.region+"-resize"),fp.select(document.body).style("cursor",a)}function jOt(e){e.on("mousemove",function(t){fp.event.preventDefault(),t.parent.inBrushDrag||zqe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||Dqe()}).call(fp.behavior.drag().on("dragstart",function(t){GOt(this,t)}).on("drag",function(t){Iqe(this,t)}).on("dragend",function(t){HOt(this,t)}))}function qqe(e,t){return e[0]-t[0]}function WOt(e,t,r){var n=r._context.staticPlot,a=e.selectAll(".background").data(H9);a.enter().append("rect").classed("background",!0).call(OOt).call(NOt).style("pointer-events",n?"none":"auto").attr("transform",zOt(0,bc.verticalPadding)),a.call(jOt).attr("height",function(s){return s.height-bc.verticalPadding});var i=e.selectAll(".highlight-shadow").data(H9);i.enter().append("line").classed("highlight-shadow",!0).attr("x",-bc.bar.width/2).attr("stroke-width",bc.bar.width+bc.bar.strokeWidth).attr("stroke",t).attr("opacity",bc.bar.strokeOpacity).attr("stroke-linecap","butt"),i.attr("y1",function(s){return s.height}).call(RW);var o=e.selectAll(".highlight").data(H9);o.enter().append("line").classed("highlight",!0).attr("x",-bc.bar.width/2).attr("stroke-width",bc.bar.width-bc.bar.strokeWidth).attr("stroke",bc.bar.fillColor).attr("opacity",bc.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(RW)}function YOt(e,t,r){var n=e.selectAll("."+bc.cn.axisBrush).data(H9,IOt);n.enter().append("g").classed(bc.cn.axisBrush,!0),WOt(n,t,r)}function XOt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function DW(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function ZOt(e){return function(r){var n=r.brush,a=XOt(n),i=a.slice();n.filter.set(i),e()}}function Bqe(e){for(var t=e.slice(),r=[],n,a=t.shift();a;){for(n=a.slice();(a=t.shift())&&a[0]<=n[1];)n[1]=Math.max(n[1],a[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function $Ot(){var e=[],t,r;return{set:function(n){e=n.map(function(a){return a.slice().sort(Aw)}).sort(qqe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=Bqe(e),r=e.reduce(function(a,i){return[Math.min(a[0],i[0]),Math.max(a[1],i[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function KOt(e,t,r,n,a,i){var o=$Ot();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:ZOt(a),brushEndCallback:i}}}function JOt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(Aw)}),t.multiselect?e=Bqe(e.sort(qqe)):e=[e[0]]):e=[e.sort(Aw)],t.tickvals){var r=t.tickvals.slice().sort(Aw);if(e=e.map(function(n){var a=[W9(0,r,n[0],[]),W9(1,r,n[1],[])];if(a[1]>a[0])return a}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}Oqe.exports={makeBrush:KOt,ensureAxisBrush:YOt,cleanRanges:JOt}});var Vqe=ne((A1r,Uqe)=>{"use strict";var ly=Zt(),QOt=yh().hasColorscale,eNt=bf(),tNt=zl().defaults,rNt=zh(),nNt=ri(),Nqe=PW(),aNt=IW(),zW=w6().maxDimensionCount,iNt=z9();function oNt(e,t,r,n,a){var i=a("line.color",r);if(QOt(e,"line")&&ly.isArrayOrTypedArray(i)){if(i.length)return a("line.colorscale"),eNt(e,t,n,a,{prefix:"line.",cLetter:"c"}),i.length;t.line.color=r}return 1/0}function sNt(e,t,r,n){function a(u,c){return ly.coerce(e,t,Nqe.dimensions,u,c)}var i=a("values"),o=a("visible");if(i&&i.length||(o=t.visible=!1),o){a("label"),a("tickvals"),a("ticktext"),a("tickformat");var s=a("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},nNt.setConvert(t._ax,n.layout),a("multiselect");var l=a("constraintrange");l&&(t.constraintrange=aNt.cleanRanges(l,t))}}Uqe.exports=function(t,r,n,a){function i(c,f){return ly.coerce(t,r,Nqe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>zW&&(ly.log("parcoords traces support up to "+zW+" dimensions at the moment"),o.splice(zW));var s=rNt(t,r,{name:"dimensions",layout:a,handleItemDefaults:sNt}),l=oNt(t,r,n,a,i);tNt(r,a,i),(!Array.isArray(s)||!s.length)&&(r.visible=!1),iNt(r,s,"values",l);var u=ly.extendFlat({},a.font,{size:Math.round(a.font.size/1.2)});ly.coerceFont(i,"labelfont",u),ly.coerceFont(i,"tickfont",u,{autoShadowDflt:!0}),ly.coerceFont(i,"rangefont",u),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}});var Hqe=ne((M1r,Gqe)=>{"use strict";var lNt=Zt().isArrayOrTypedArray,qW=El(),uNt=c1().wrap;Gqe.exports=function(t,r){var n,a;return qW.hasColorscale(r,"line")&&lNt(r.line.color)?(n=r.line.color,a=qW.extractOpts(r.line).colorscale,qW.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=cNt(r._length),a=[[0,r.line.color],[1,r.line.color]]),uNt({lineColor:n,cscale:a})};function cNt(e){for(var t=new Array(e),r=0;r>>16,(e&65280)>>>8,e&255],alpha:1};if(typeof e=="number")return{space:"rgb",values:[e>>>16,(e&65280)>>>8,e&255],alpha:1};if(e=String(e).toLowerCase(),BW.default[e])r=BW.default[e].slice(),a="rgb";else if(e==="transparent")n=0,a="rgb",r=[0,0,0];else if(e[0]==="#"){var i=e.slice(1),o=i.length,s=o<=4;n=1,s?(r=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],o===4&&(n=parseInt(i[3]+i[3],16)/255)):(r=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],o===8&&(n=parseInt(i[6]+i[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),a="rgb"}else if(t=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(e)){var l=t[1];a=l.replace(/a$/,"");var u=a==="cmyk"?4:a==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/),a==="color"&&(a=r.shift()),r=r.map(function(h,v){if(h[h.length-1]==="%")return h=parseFloat(h)/100,v===3?h:a==="rgb"?h*255:a[0]==="h"||a[0]==="l"&&!v?h*100:a==="lab"?h*125:a==="lch"?v<2?h*150:h*360:a[0]==="o"&&!v?h:a==="oklab"?h*.4:a==="oklch"?v<2?h*.4:h*360:h;if(a[v]==="h"||v===2&&a[a.length-1]==="h"){if(jqe[h]!==void 0)return jqe[h];if(h.endsWith("deg"))return parseFloat(h);if(h.endsWith("turn"))return parseFloat(h)*360;if(h.endsWith("grad"))return parseFloat(h)*360/400;if(h.endsWith("rad"))return parseFloat(h)*180/Math.PI}return h==="none"?0:parseFloat(h)}),n=r.length>u?r.pop():1}else/[0-9](?:\s|\/|,)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(h){return parseFloat(h)}),a=((f=(c=e.match(/([a-z])/ig))==null?void 0:c.join(""))==null?void 0:f.toLowerCase())||"rgb");return{space:a,values:r,alpha:n}}var BW,Wqe,jqe,Yqe=lo(()=>{BW=yp(mG(),1),Wqe=fNt,jqe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}});var T6,OW=lo(()=>{T6={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}});var Y9,Xqe=lo(()=>{OW();Y9={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,a,i,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(i=n<.5?n*(1+r):n+r-n*r,a=2*n-i,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?a+(i-a)*6*o:2*o<1?i:3*o<2?a+(i-a)*(2/3-o)*6:a,s[u++]=l*255;return s}};T6.hsl=function(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=i-a,s,l,u;return i===a?s=0:t===i?s=(r-n)/o:r===i?s=2+(n-t)/o:n===i&&(s=4+(t-r)/o),s=Math.min(s*60,360),s<0&&(s+=360),u=(a+i)/2,i===a?l=0:u<=.5?l=o/(i+a):l=o/(2-i-a),[s,l*100,u*100]}});var $qe={};E0($qe,{default:()=>Zqe});function Zqe(e){Array.isArray(e)&&e.raw&&(e=String.raw(...arguments)),e instanceof Number&&(e=+e);var t,r,n,a=Wqe(e);if(!a.space)return[];let i=a.space[0]==="h"?Y9.min:T6.min,o=a.space[0]==="h"?Y9.max:T6.max;return t=Array(3),t[0]=Math.min(Math.max(a.values[0],i[0]),o[0]),t[1]=Math.min(Math.max(a.values[1],i[1]),o[1]),t[2]=Math.min(Math.max(a.values[2],i[2]),o[2]),a.space[0]==="h"&&(t=Y9.rgb(t)),t.push(Math.min(Math.max(a.alpha,0),1)),t}var Kqe=lo(()=>{Yqe();OW();Xqe()});var NW=ne(X9=>{"use strict";var hNt=Zt().isTypedArray;X9.convertTypedArray=function(e){return hNt(e)?Array.prototype.slice.call(e):e};X9.isOrdinal=function(e){return!!e.tickvals};X9.isVisible=function(e){return e.visible||!("visible"in e)}});var sBe=ne((R1r,oBe)=>{"use strict";var dNt=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` -`),vNt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),A6=w6().maxDimensionCount,nBe=Zt(),Jqe=1e-6,Z9=2048,pNt=new Uint8Array(4),Qqe=new Uint8Array(4),eBe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function gNt(e){e.read({x:0,y:0,width:1,height:1,data:pNt})}function aBe(e,t,r,n,a){var i=e._gl;i.enable(i.SCISSOR_TEST),i.scissor(t,r,n,a),e.clear({color:[0,0,0,0],depth:1})}function mNt(e,t,r,n,a,i){var o=i.key;function s(l){var u=Math.min(n,a-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],aBe(e,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),!r.clearOnly&&(i.count=2*u,i.offset=2*l*n,t(i),l*n+u>>8*t)%256/255}function bNt(e,t,r){for(var n=new Array(e*(A6+4)),a=0,i=0;iU&&(U=T[P].dim1.canvasX,z=P);A===0&&aBe(a,0,0,u.canvasWidth,u.canvasHeight);var O=M(r);for(P=0;P{"use strict";var Jf=Ea(),vg=Zt(),VW=vg.isArrayOrTypedArray,dBe=vg.numberFormat,vBe=(Kqe(),vl($qe)).default,pBe=ri(),MNt=vg.strRotate,f1=vg.strTranslate,SNt=Ms(),$9=li(),lBe=El(),jW=c1(),y0=jW.keyFun,h1=jW.repeat,gBe=jW.unwrap,Mw=NW(),Ho=w6(),mBe=IW(),ENt=sBe();function uBe(e,t,r){return vg.aggNums(e,null,t,r)}function yBe(e,t){return WW(uBe(Math.min,e,t),uBe(Math.max,e,t))}function K9(e){var t=e.range;return t?WW(t[0],t[1]):yBe(e.values,e._length)}function WW(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function kNt(e,t){return t?function(r,n){var a=t[n];return a==null?e(r):a}:e}function CNt(e,t,r,n,a){var i=K9(r);return n?Jf.scale.ordinal().domain(n.map(kNt(dBe(r.tickformat),a))).range(n.map(function(o){var s=(o-i[0])/(i[1]-i[0]);return e-t+s*(2*t-e)})):Jf.scale.linear().domain(i).range([e-t,t])}function LNt(e,t){return Jf.scale.linear().range([t,e-t])}function FNt(e,t){return Jf.scale.linear().domain(K9(e)).range([t,1-t])}function PNt(e){if(e.tickvals){var t=K9(e);return Jf.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function DNt(e){var t=e.map(function(i){return i[0]}),r=e.map(function(i){var o=vBe(i[1]);return Jf.rgb("rgb("+o[0]+","+o[1]+","+o[2]+")")}),n=function(i){return function(o){return o[i]}},a="rgb".split("").map(function(i){return Jf.scale.linear().clamp(!0).domain(t).range(r.map(n(i)))});return function(i){return a.map(function(o){return o(i)})}}function HW(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function RNt(e,t,r){var n=gBe(t),a=n.trace,i=Mw.convertTypedArray(n.lineColor),o=a.line,s={color:vBe(a.unselected.line.color),opacity:a.unselected.line.opacity},l=lBe.extractOpts(o),u=l.reversescale?lBe.flipScale(n.cscale):n.cscale,c=a.domain,f=a.dimensions,h=e.width,v=a.labelangle,d=a.labelside,m=a.labelfont,x=a.tickfont,g=a.rangefont,E=vg.extendDeepNoArrays({},o,{color:i.map(Jf.scale.linear().domain(K9({values:i,range:[l.min,l.max],_length:a._length}))),blockLineCount:Ho.blockLineCount,canvasOverdrag:Ho.overdrag*Ho.canvasPixelRatio}),M=Math.floor(h*(c.x[1]-c.x[0])),w=Math.floor(e.height*(c.y[1]-c.y[0])),k=e.margin||{l:80,r:80,t:100,b:80},y=M,S=w;return{key:r,colCount:f.filter(Mw.isVisible).length,dimensions:f,tickDistance:Ho.tickDistance,unitToColor:DNt(u),lines:E,deselectedLines:s,labelAngle:v,labelSide:d,labelFont:m,tickFont:x,rangeFont:g,layoutWidth:h,layoutHeight:e.height,domain:c,translateX:c.x[0]*h,translateY:e.height-c.y[1]*e.height,pad:k,canvasWidth:y*Ho.canvasPixelRatio+2*E.canvasOverdrag,canvasHeight:S*Ho.canvasPixelRatio,width:y,height:S,canvasPixelRatio:Ho.canvasPixelRatio}}function INt(e,t,r){var n=r.width,a=r.height,i=r.dimensions,o=r.canvasPixelRatio,s=function(h){return n*h/Math.max(1,r.colCount-1)},l=Ho.verticalPadding/a,u=LNt(a,Ho.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=i.filter(Mw.isVisible).map(function(h,v){var d=FNt(h,l),m=f[h.label];f[h.label]=(m||0)+1;var x=h.label+(m?"__"+m:""),g=h.constraintrange,E=g&&g.length;E&&!VW(g[0])&&(g=[g]);var M=E?g.map(function(D){return D.map(d)}):[[-1/0,1/0]],w=function(){var D=c;D.focusLayer&&D.focusLayer.render(D.panels,!0);var z=HW(D);!e.contextShown()&&z?(D.contextLayer&&D.contextLayer.render(D.panels,!0),e.contextShown(!0)):e.contextShown()&&!z&&(D.contextLayer&&D.contextLayer.render(D.panels,!0,!0),e.contextShown(!1))},k=h.values;k.length>h._length&&(k=k.slice(0,h._length));var y=h.tickvals,S;function T(D,z){return{val:D,text:S[z]}}function p(D,z){return D.val-z.val}if(VW(y)&&y.length){vg.isTypedArray(y)&&(y=Array.from(y)),S=h.ticktext,!VW(S)||!S.length?S=y.map(dBe(h.tickformat)):S.length>y.length?S=S.slice(0,y.length):y.length>S.length&&(y=y.slice(0,S.length));for(var C=1;C=z||R>=q)return;var B=P.lineLayer.readPixel(O,q-1-R),Y=B[3]!==0,X=Y?B[2]+256*(B[1]+256*B[0]):null,te={x:O,y:R,clientX:D.clientX,clientY:D.clientY,dataIndex:P.model.key,curveNumber:X};X!==d&&(Y?a.hover(te):a.unhover&&a.unhover(te),d=X)}}),v.style("opacity",function(P){return P.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var x=s.selectAll("."+Ho.cn.parcoords).data(h,y0);x.exit().remove(),x.enter().append("g").classed(Ho.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),x.attr("transform",function(P){return f1(P.model.translateX,P.model.translateY)});var g=x.selectAll("."+Ho.cn.parcoordsControlView).data(h1,y0);g.enter().append("g").classed(Ho.cn.parcoordsControlView,!0),g.attr("transform",function(P){return f1(P.model.pad.l,P.model.pad.t)});var E=g.selectAll("."+Ho.cn.yAxis).data(function(P){return P.dimensions},y0);E.enter().append("g").classed(Ho.cn.yAxis,!0),g.each(function(P){GW(E,P,u)}),v.each(function(P){if(P.viewModel){!P.lineLayer||a?P.lineLayer=ENt(this,P):P.lineLayer.update(P),(P.key||P.key===0)&&(P.viewModel[P.key]=P.lineLayer);var D=!P.context||a;P.lineLayer.render(P.viewModel.panels,D)}}),E.attr("transform",function(P){return f1(P.xScale(P.xIndex),0)}),E.call(Jf.behavior.drag().origin(function(P){return P}).on("drag",function(P){var D=P.parent;f.linePickActive(!1),P.x=Math.max(-Ho.overdrag,Math.min(P.model.width+Ho.overdrag,Jf.event.x)),P.canvasX=P.x*P.model.canvasPixelRatio,E.sort(function(z,q){return z.x-q.x}).each(function(z,q){z.xIndex=q,z.x=P===z?z.x:z.xScale(z.xIndex),z.canvasX=z.x*z.model.canvasPixelRatio}),GW(E,D,u),E.filter(function(z){return Math.abs(P.xIndex-z.xIndex)!==0}).attr("transform",function(z){return f1(z.xScale(z.xIndex),0)}),Jf.select(this).attr("transform",f1(P.x,0)),E.each(function(z,q,U){U===P.parent.key&&(D.dimensions[q]=z)}),D.contextLayer&&D.contextLayer.render(D.panels,!1,!HW(D)),D.focusLayer.render&&D.focusLayer.render(D.panels)}).on("dragend",function(P){var D=P.parent;P.x=P.xScale(P.xIndex),P.canvasX=P.x*P.model.canvasPixelRatio,GW(E,D,u),Jf.select(this).attr("transform",function(z){return f1(z.x,0)}),D.contextLayer&&D.contextLayer.render(D.panels,!1,!HW(D)),D.focusLayer&&D.focusLayer.render(D.panels),D.pickLayer&&D.pickLayer.render(D.panels,!0),f.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(D.key,D.dimensions.map(function(z){return z.crossfilterDimensionIndex}))})),E.exit().remove();var M=E.selectAll("."+Ho.cn.axisOverlays).data(h1,y0);M.enter().append("g").classed(Ho.cn.axisOverlays,!0),M.selectAll("."+Ho.cn.axis).remove();var w=M.selectAll("."+Ho.cn.axis).data(h1,y0);w.enter().append("g").classed(Ho.cn.axis,!0),w.each(function(P){var D=P.model.height/P.model.tickDistance,z=P.domainScale,q=z.domain();Jf.select(this).call(Jf.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(D,P.tickFormat).tickValues(P.ordinal?q:null).tickFormat(function(U){return Mw.isOrdinal(P)?U:xBe(P.model.dimensions[P.visibleIndex],U)}).scale(z)),$9.font(w.selectAll("text"),P.model.tickFont)}),w.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),w.selectAll("text").style("cursor","default");var k=M.selectAll("."+Ho.cn.axisHeading).data(h1,y0);k.enter().append("g").classed(Ho.cn.axisHeading,!0);var y=k.selectAll("."+Ho.cn.axisTitle).data(h1,y0);y.enter().append("text").classed(Ho.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",i?"none":"auto"),y.text(function(P){return P.label}).each(function(P){var D=Jf.select(this);$9.font(D,P.model.labelFont),SNt.convertToTspans(D,t)}).attr("transform",function(P){var D=fBe(P.model.labelAngle,P.model.labelSide),z=Ho.axisTitleOffset;return(D.dir>0?"":f1(0,2*z+P.model.height))+MNt(D.degrees)+f1(-z*D.dx,-z*D.dy)}).attr("text-anchor",function(P){var D=fBe(P.model.labelAngle,P.model.labelSide),z=Math.abs(D.dx),q=Math.abs(D.dy);return 2*z>q?D.dir*D.dx<0?"start":"end":"middle"});var S=M.selectAll("."+Ho.cn.axisExtent).data(h1,y0);S.enter().append("g").classed(Ho.cn.axisExtent,!0);var T=S.selectAll("."+Ho.cn.axisExtentTop).data(h1,y0);T.enter().append("g").classed(Ho.cn.axisExtentTop,!0),T.attr("transform",f1(0,-Ho.axisExtentOffset));var p=T.selectAll("."+Ho.cn.axisExtentTopText).data(h1,y0);p.enter().append("text").classed(Ho.cn.axisExtentTopText,!0).call(cBe),p.text(function(P){return hBe(P,!0)}).each(function(P){$9.font(Jf.select(this),P.model.rangeFont)});var C=S.selectAll("."+Ho.cn.axisExtentBottom).data(h1,y0);C.enter().append("g").classed(Ho.cn.axisExtentBottom,!0),C.attr("transform",function(P){return f1(0,P.model.height+Ho.axisExtentOffset)});var A=C.selectAll("."+Ho.cn.axisExtentBottomText).data(h1,y0);A.enter().append("text").classed(Ho.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(cBe),A.text(function(P){return hBe(P,!1)}).each(function(P){$9.font(Jf.select(this),P.model.rangeFont)}),mBe.ensureAxisBrush(M,c,t)}});var XW=ne((YW,MBe)=>{"use strict";var BNt=_Be(),ONt=R9(),wBe=NW().isVisible,ABe={};function TBe(e,t,r){var n=t.indexOf(r),a=e.indexOf(n);return a===-1&&(a+=t.length),a}function NNt(e,t){return function(n,a){return TBe(e,t,n)-TBe(e,t,a)}}var YW=MBe.exports=function(t,r){var n=t._fullLayout,a=ONt(t,[],ABe);if(a){var i={},o={},s={},l=n._size;r.forEach(function(v,d){var m=v[0].trace,x=s[d]=m.index;i[d]=t.data[x].dimensions,o[d]=t.data[x].dimensions.slice()});var u=function(v,d,m){var x=o[v][d],g=m.map(function(S){return S.slice()}),E="dimensions["+d+"].constraintrange",M=n._tracePreGUI[t._fullData[s[v]].uid];if(M[E]===void 0){var w=x.constraintrange;M[E]=w||null}var k=t._fullData[s[v]].dimensions[d];g.length?(g.length===1&&(g=g[0]),x.constraintrange=g,k.constraintrange=g.slice(),g=[g]):(delete x.constraintrange,delete k.constraintrange,g=null);var y={};y[E]=g,t.emit("plotly_restyle",[y,[s[v]]])},c=function(v){t.emit("plotly_hover",v)},f=function(v){t.emit("plotly_unhover",v)},h=function(v,d){var m=NNt(d,o[v].filter(wBe));i[v].sort(m),o[v].filter(function(x){return!wBe(x)}).sort(function(x){return o[v].indexOf(x)}).forEach(function(x){i[v].splice(i[v].indexOf(x),1),i[v].splice(o[v].indexOf(x),0,x)}),t.emit("plotly_restyle",[{dimensions:[i[v]]},[s[v]]])};BNt(t,r,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:f,axesMoved:h})}};YW.reglPrecompiled=ABe});var EBe=ne(M6=>{"use strict";var SBe=Ea(),UNt=mh().getModuleCalcData,VNt=XW(),GNt=qv();M6.name="parcoords";M6.plot=function(e){var t=UNt(e.calcdata,"parcoords")[0];t.length&&VNt(e,t)};M6.clean=function(e,t,r,n){var a=n._has&&n._has("parcoords"),i=t._has&&t._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())};M6.toSVG=function(e){var t=e._fullLayout._glimages,r=SBe.select(e).selectAll(".svg-container"),n=r.filter(function(i,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var i=this,o=i.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:GNt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:i.style.width,height:i.style.height})}n.each(a),window.setTimeout(function(){SBe.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var CBe=ne((q1r,kBe)=>{"use strict";kBe.exports={attributes:PW(),supplyDefaults:Vqe(),calc:Hqe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:EBe(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var PBe=ne((B1r,FBe)=>{"use strict";var LBe=CBe();LBe.plot=XW();FBe.exports=LBe});var RBe=ne((O1r,DBe)=>{"use strict";DBe.exports=PBe()});var ZW=ne((N1r,OBe)=>{"use strict";var zBe=ci().extendFlat,HNt=os(),IBe=pl(),jNt=Ys(),{hovertemplateAttrs:qBe,templatefallbackAttrs:BBe}=rs(),WNt=zl().attributes,YNt=zBe({editType:"calc"},jNt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:qBe({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:BBe({editType:"plot"})});OBe.exports={domain:WNt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:zBe({},HNt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:qBe({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:BBe({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:IBe({editType:"calc"}),tickfont:IBe({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:YNt,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}});var VBe=ne((U1r,UBe)=>{"use strict";var Sw=Zt(),XNt=yh().hasColorscale,ZNt=bf(),$Nt=zl().defaults,KNt=zh(),NBe=ZW(),JNt=z9(),QNt=Ih().isTypedArraySpec;function eUt(e,t,r,n,a){a("line.shape"),a("line.hovertemplate"),a("line.hovertemplatefallback");var i=a("line.color",n.colorway[0]);if(XNt(e,"line")&&Sw.isArrayOrTypedArray(i)){if(i.length)return a("line.colorscale"),ZNt(e,t,n,a,{prefix:"line.",cLetter:"c"}),i.length;t.line.color=r}return 1/0}function tUt(e,t){function r(u,c){return Sw.coerce(e,t,NBe.dimensions,u,c)}var n=r("values"),a=r("visible");if(n&&n.length||(a=t.visible=!1),a){r("label"),r("displayindex",t._index);var i=e.categoryarray,o=Sw.isArrayOrTypedArray(i)&&i.length>0||QNt(i),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}UBe.exports=function(t,r,n,a){function i(u,c){return Sw.coerce(t,r,NBe,u,c)}var o=KNt(t,r,{name:"dimensions",handleItemDefaults:tUt}),s=eUt(t,r,n,a,i);$Nt(r,a,i),(!Array.isArray(o)||!o.length)&&(r.visible=!1),JNt(r,o,"values",s),i("hoveron"),i("hovertemplate"),i("hovertemplatefallback"),i("arrangement"),i("bundlecolors"),i("sortpaths"),i("counts");var l=a.font;Sw.coerceFont(i,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),Sw.coerceFont(i,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var HBe=ne((V1r,GBe)=>{"use strict";var rUt=c1().wrap,nUt=yh().hasColorscale,aUt=qh(),iUt=ZD(),oUt=li(),S6=Zt(),sUt=mi();GBe.exports=function(t,r){var n=S6.filterVisible(r.dimensions);if(n.length===0)return[];var a=n.map(function(p){var C;if(p.categoryorder==="trace")C=null;else if(p.categoryorder==="array")C=p.categoryarray;else{C=iUt(p.values);for(var A=!0,P=0;P=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var QBe=ne((G1r,JBe)=>{"use strict";var jo=Ea(),yUt=(f2(),vl(c2)).interpolateNumber,xUt=QE(),$W=_a(),C6=cu(),uy=Zt(),E6=uy.strTranslate,jBe=li(),bUt=Ms();function _Ut(e,t,r,n){var a=t._context.staticPlot,i=e.map(zUt.bind(0,t,r)),o=n.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all");var s=o.selectAll("g.trace.parcats").data(i,pg),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(E){return E6(E.x,E.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(E){return E.paths},pg);c.attr("fill",function(E){return E.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(E){return E.model.color}).attr("fill-opacity",0);QW(f),c.attr("d",function(E){return E.svgD}),f.empty()||c.sort(KW),c.exit().remove(),c.on("mouseover",wUt).on("mouseout",TUt).on("click",AUt),l.append("g").attr("class","dimensions");var h=s.select("g.dimensions"),v=h.selectAll("g.dimension").data(function(E){return E.dimensions},pg);v.enter().append("g").attr("class","dimension"),v.attr("transform",function(E){return E6(E.x,0)}),v.exit().remove();var d=v.selectAll("g.category").data(function(E){return E.categories},pg),m=d.enter().append("g").attr("class","category");d.attr("transform",function(E){return E6(0,E.y)}),m.append("rect").attr("class","catrect").attr("pointer-events","none"),d.select("rect.catrect").attr("fill","none").attr("width",function(E){return E.width}).attr("height",function(E){return E.height}),YBe(m);var x=d.selectAll("rect.bandrect").data(function(E){return E.bands},pg);x.each(function(){uy.raiseToTop(this)}),x.attr("fill",function(E){return E.color});var g=x.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(E){return E.color}).attr("fill-opacity",0);x.attr("fill",function(E){return E.color}).attr("width",function(E){return E.width}).attr("height",function(E){return E.height}).attr("y",function(E){return E.y}).attr("cursor",function(E){return E.parcatsViewModel.arrangement==="fixed"?"default":E.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),tY(g),x.exit().remove(),m.append("text").attr("class","catlabel").attr("pointer-events","none"),d.select("text.catlabel").attr("text-anchor",function(E){return k6(E)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(E){return k6(E)?E.width+5:-5}).attr("y",function(E){return E.height/2}).text(function(E){return E.model.categoryLabel}).each(function(E){jBe.font(jo.select(this),E.parcatsViewModel.categorylabelfont),bUt.convertToTspans(jo.select(this),t)}),m.append("text").attr("class","dimlabel"),d.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(E){return E.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(E){return E.width/2}).attr("y",-5).text(function(E,M){return M===0?E.parcatsViewModel.model.dimensions[E.model.dimensionInd].dimensionLabel:null}).each(function(E){jBe.font(jo.select(this),E.parcatsViewModel.labelfont)}),d.selectAll("rect.bandrect").on("mouseover",FUt).on("mouseout",PUt),d.exit().remove(),v.call(jo.behavior.drag().origin(function(E){return{x:E.x,y:0}}).on("dragstart",DUt).on("drag",RUt).on("dragend",IUt)),s.each(function(E){E.traceSelection=jo.select(this),E.pathSelection=jo.select(this).selectAll("g.paths").selectAll("path.path"),E.dimensionSelection=jo.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}JBe.exports=function(e,t,r,n){_Ut(r,e,n,t)};function pg(e){return e.key}function k6(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function KW(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColor"),y=jo.mouse(a)[0];C6.loneHover({trace:i,x:d-s.left+l.left,y:m-s.top+l.top,text:k,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:x,idealAlign:y$W.mostReadable(t.model.color)).attr("stroke-width",.3)}function MUt(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function YBe(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function SUt(e){e.attr("stroke","black").attr("stroke-width",1.5)}function tY(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function J9(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,n=e.categoryViewModel.model.categoryInd;return t.filter(function(a){return a.model.categoryInds[r]===n&&a.model.color===e.color})}function EUt(e){var t=jo.select(e.parentNode).selectAll("rect.bandrect");t.each(function(r){var n=J9(r);eY(n),n.each(function(){uy.raiseToTop(this)})}),MUt(jo.select(e.parentNode))}function kUt(e){var t=jo.select(e).datum(),r=J9(t);eY(r),r.each(function(){uy.raiseToTop(this)}),jo.select(e.parentNode).selectAll("rect.bandrect").filter(function(n){return n.color===t.color}).each(function(){uy.raiseToTop(this),SUt(jo.select(this))})}function rY(e,t,r){var n=jo.select(e).datum(),a=n.categoryViewModel.model,i=n.parcatsViewModel.graphDiv,o=jo.select(e.parentNode).selectAll("rect.bandrect"),s=[];o.each(function(u){var c=J9(u);c.each(function(f){Array.prototype.push.apply(s,L6(f))})});var l={};l[a.dimensionInd]=a.categoryValue,i.emit(t,{points:s,event:r,constraints:l})}function nY(e,t,r){var n=jo.select(e).datum(),a=n.categoryViewModel.model,i=n.parcatsViewModel.graphDiv,o=J9(n),s=[];o.each(function(u){Array.prototype.push.apply(s,L6(u))});var l={};l[a.dimensionInd]=a.categoryValue,n.rawColor!==void 0&&(l.color=n.rawColor),i.emit(t,{points:s,event:r,constraints:l})}function XBe(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,i=jo.select(r.parentNode).select("rect.catrect"),o=i.node().getBoundingClientRect(),s=i.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,h,v;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=o.left,v="left"):(h=o.left+o.width,v="right");var d=s.model.count,m=s.model.categoryLabel,x=d/s.parcatsViewModel.model.count,g={countLabel:d,categoryLabel:m,probabilityLabel:x.toFixed(3)},E=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&E.push(["Count:",g.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&E.push(["P("+g.categoryLabel+"):",g.probabilityLabel].join(" "));var M=E.join("
");return{trace:c,x:n*(h-t.left),y:a*(f-t.top),text:M,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:v,hovertemplate:c.hovertemplate,hovertemplateLabels:g,eventData:[{data:c._input,fullData:c,count:d,category:m,probability:x}]}}function CUt(e,t,r){var n=[];return jo.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var a=this;n.push(XBe(e,t,a))}),n}function LUt(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,i=r.getBoundingClientRect(),o=jo.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=i.y+i.height/2,h,v;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(h=i.left,v="left"):(h=i.left+i.width,v="right");var d=s.model.categoryLabel,m=o.parcatsViewModel.model.count,x=0;o.categoryViewModel.bands.forEach(function(C){C.color===o.color&&(x+=C.count)});var g=s.model.count,E=0;l.pathSelection.each(function(C){C.model.color===o.color&&(E+=C.model.count)});var M=x/m,w=x/E,k=x/g,y={countLabel:x,categoryLabel:d,probabilityLabel:M.toFixed(3)},S=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&S.push(["Count:",y.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(S.push("P(color \u2229 "+d+"): "+y.probabilityLabel),S.push("P("+d+" | color): "+w.toFixed(3)),S.push("P(color | "+d+"): "+k.toFixed(3)));var T=S.join("
"),p=$W.mostReadable(o.color);return{trace:c,x:n*(h-t.left),y:a*(f-t.top),text:T,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:p,fontSize:10,idealAlign:v,hovertemplate:c.hovertemplate,hovertemplateLabels:y,eventData:[{data:c._input,fullData:c,category:d,count:m,probability:M,categorycount:g,colorcount:E,bandcolorcount:x}]}}function FUt(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=jo.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,a=n._paperdiv.node().getBoundingClientRect(),i=e.parcatsViewModel.hoveron,o=this;if(i==="color"?(kUt(o),nY(o,"plotly_hover",jo.event)):(EUt(o),rY(o,"plotly_hover",jo.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;i==="category"?s=XBe(r,a,o):i==="color"?s=LUt(r,a,o):i==="dimension"&&(s=CUt(r,a,o)),s&&C6.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function PUt(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(QW(t.pathSelection),YBe(t.dimensionSelection.selectAll("g.category")),tY(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),C6.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(KW),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?nY(n,"plotly_unhover",jo.event):rY(n,"plotly_unhover",jo.event)}}function DUt(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,jo.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=jo.mouse(this)[0],n=jo.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(a){return a.displayInd}),t.model.dragY=t.y,uy.raiseToTop(this.parentNode),jo.select(this.parentNode).selectAll("rect.bandrect").each(function(a){a.yc.y+c.height/2&&(i.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=i.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){a.model.dragX=jo.event.x;var f=e.parcatsViewModel.dimensions[r],h=e.parcatsViewModel.dimensions[n];f!==void 0&&a.model.dragXh.x&&(a.model.displayInd=h.model.displayInd,h.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=a.model.displayInd}iY(e.parcatsViewModel),aY(e.parcatsViewModel),KBe(e.parcatsViewModel),$Be(e.parcatsViewModel)}}function IUt(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){jo.select(this).selectAll("text").attr("font-weight","normal");var t={},r=ZBe(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(h){return h.displayInd}),a=e.initialDragDimensionDisplayInds.some(function(h,v){return h!==n[v]});a&&n.forEach(function(h,v){var d=e.parcatsViewModel.model.dimensions[v].containerInd;t["dimensions["+d+"].displayindex"]=h});var i=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(h){return h.displayInd});if(i=e.initialDragCategoryDisplayInds.some(function(h,v){return h!==o[v]}),i){var s=e.model.categories.slice().sort(function(h,v){return h.displayInd-v.displayInd}),l=s.map(function(h){return h.categoryValue}),u=s.map(function(h){return h.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?nY(e.potentialClickBand,"plotly_click",jo.event.sourceEvent):rY(e.potentialClickBand,"plotly_click",jo.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,iY(e.parcatsViewModel),aY(e.parcatsViewModel);var f=jo.transition().duration(300).ease("cubic-in-out");f.each(function(){KBe(e.parcatsViewModel,!0),$Be(e.parcatsViewModel,!0)}).each("end",function(){(a||i)&&xUt.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function ZBe(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;l--)u+="C"+o[l]+","+(t[l+1]+n)+" "+i[l]+","+(t[l]+n)+" "+(e[l]+r[l])+","+(t[l]+n),u+="l-"+r[l]+",0 ";return u+="Z",u}function aY(e){var t=e.dimensions,r=e.model,n=t.map(function(D){return D.categories.map(function(z){return z.y})}),a=e.model.dimensions.map(function(D){return D.categories.map(function(z){return z.displayInd})}),i=e.model.dimensions.map(function(D){return D.displayInd}),o=e.dimensions.map(function(D){return D.model.dimensionInd}),s=t.map(function(D){return D.x}),l=t.map(function(D){return D.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(D){var z=D.categoryInds.map(function(U,O){return a[O][U]}),q=o.map(function(U){return z[U]});return q}u.sort(function(D,z){var q=f(D),U=f(z);return e.sortpaths==="backward"&&(q.reverse(),U.reverse()),q.push(D.valueInds[0]),U.push(z.valueInds[0]),e.bundlecolors&&(q.unshift(D.rawColor),U.unshift(z.rawColor)),qU?1:0});for(var h=new Array(u.length),v=t[0].model.count,d=t[0].categories.map(function(D){return D.height}).reduce(function(D,z){return D+z}),m=0;m0?g=d*(x.count/v):g=0;for(var E=new Array(n.length),M=0;M1?o=(e.width-2*r-n)/(a-1):o=0,s=r,l=s+o*i;var u=[],c=e.model.maxCats,f=t.categories.length,h=8,v=t.count,d=e.height-h*(c-1),m,x,g,E,M,w=(c-f)*h/2,k=t.categories.map(function(y){return{displayInd:y.displayInd,categoryInd:y.categoryInd}});for(k.sort(function(y,S){return y.displayInd-S.displayInd}),M=0;M0?m=x.count/v*d:m=0,g={key:x.valueInds[0],model:x,width:n,height:m,y:x.dragY!==null?x.dragY:w,bands:[],parcatsViewModel:e},w=w+m+h,u.push(g);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var oY=ne((H1r,eOe)=>{"use strict";var BUt=QBe();eOe.exports=function(t,r,n,a){var i=t._fullLayout,o=i._paper,s=i._size;BUt(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,a)}});var rOe=ne(Q9=>{"use strict";var OUt=mh().getModuleCalcData,NUt=oY(),tOe="parcats";Q9.name=tOe;Q9.plot=function(e,t,r,n){var a=OUt(e.calcdata,tOe);if(a.length){var i=a[0];NUt(e,i,r,n)}};Q9.clean=function(e,t,r,n){var a=n._has&&n._has("parcats"),i=t._has&&t._has("parcats");a&&!i&&n._paperdiv.selectAll(".parcats").remove()}});var aOe=ne((W1r,nOe)=>{"use strict";nOe.exports={attributes:ZW(),supplyDefaults:VBe(),calc:HBe(),plot:oY(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:rOe(),categories:["noOpacity"],meta:{}}});var oOe=ne((Y1r,iOe)=>{"use strict";iOe.exports=aOe()});var lOe=ne((X1r,sOe)=>{"use strict";sOe.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI ©
ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} + }`}),n={};return{regl:t,draw:r,atlas:n}};Bs.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=yKt(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),t.opacity!=null&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(xe){return parseFloat(xe)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=TKt(t.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(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]),t.kerning!=null&&(this.kerning=t.kerning),t.offset!=null&&(typeof t.offset=="number"&&(t.offset=[t.offset,0]),this.positionOffset=LKt(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=Bs.baseFontSize+"px sans-serif");var n=!1,a=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(xe,ue){if(typeof xe=="string")try{xe=b5.parse(xe)}catch(De){xe=b5.parse(Bs.baseFontSize+"px "+xe)}else{var K=xe.style,_e=xe.weight,ne=xe.stretch,ae=xe.variant;xe=b5.parse(b5.stringify(xe)),K&&(xe.style=K),_e&&(xe.weight=_e),ne&&(xe.stretch=ne),ae&&(xe.variant=ae)}var pe=b5.stringify({size:Bs.baseFontSize,family:xe.family,stretch:DF?xe.stretch:void 0,variant:xe.variant,weight:xe.weight,style:xe.style}),ie=MKt(xe.size),le=Math.round(ie[0]*SKt(ie[1]));if(le!==r.fontSize[ue]&&(a=!0,r.fontSize[ue]=le),(!r.font[ue]||pe!=r.font[ue].baseString)&&(n=!0,r.font[ue]=Bs.fonts[pe],!r.font[ue])){var me=xe.family.join(", "),be=[xe.style];xe.style!=xe.variant&&be.push(xe.variant),xe.variant!=xe.weight&&be.push(xe.weight),DF&&xe.weight!=xe.stretch&&be.push(xe.stretch),r.font[ue]={baseString:pe,family:me,weight:xe.weight,stretch:xe.stretch,style:xe.style,variant:xe.variant,width:{},kerning:{},metrics:CKt(me,{origin:"top",fontSize:Bs.baseFontSize,fontStyle:be.join(" ")})},Bs.fonts[pe]=r.font[ue]}}),(n||a)&&this.font.forEach(function(xe,ue){var K=b5.stringify({size:r.fontSize[ue],family:xe.family,stretch:DF?xe.stretch:void 0,variant:xe.variant,weight:xe.weight,style:xe.style});if(r.fontAtlas[ue]=r.shader.atlas[K],!r.fontAtlas[ue]){var _e=xe.metrics;r.shader.atlas[K]=r.fontAtlas[ue]={fontString:K,step:Math.ceil(r.fontSize[ue]*_e.bottom*.5)*2,em:r.fontSize[ue],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var i=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=Ly.mallocFloat(this.count*2),f=0,v=0;f1?r.align[ue]:r.align[0]:r.align;if(typeof K=="number")return K;switch(K){case"right":case"end":return-xe;case"center":case"centre":case"middle":return-xe*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(xe,ue){var K=(r.font[ue]||r.font[0]).metrics,_e=0;return _e+=K.bottom*.5,typeof xe=="number"?_e+=xe-K.baseline:_e+=-K[xe],_e*=-1,_e})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=m$(t.color,"uint8");else{var O;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var V=t.color.length;O=Ly.mallocUint8(V);for(var j=(t.color.subarray||t.color.slice).bind(t.color),q=0;q4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ee){var ce=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(ce);for(var ye=0;ye1?this.counts[ye]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ye]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ye*4,ye*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ye]:this.opacity,baseline:this.baselineOffset[ye]!=null?this.baselineOffset[ye]:this.baselineOffset[0],align:this.align?this.alignOffset[ye]!=null?this.alignOffset[ye]:this.alignOffset[0]:0,atlas:this.fontAtlas[ye]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ye*2,ye*2+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=[]}};Bs.prototype.destroy=function(){};Bs.prototype.kerning=!0;Bs.prototype.position={constant:new Float32Array(2)};Bs.prototype.translate=null;Bs.prototype.scale=null;Bs.prototype.font=null;Bs.prototype.text="";Bs.prototype.positionOffset=[0,0];Bs.prototype.opacity=1;Bs.prototype.color=new Uint8Array([0,0,0,255]);Bs.prototype.alignOffset=[0,0];Bs.maxAtlasSize=1024;Bs.atlasCanvas=document.createElement("canvas");Bs.atlasContext=Bs.atlasCanvas.getContext("2d",{alpha:!1});Bs.baseFontSize=64;Bs.fonts={};function FKt(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}oGe.exports=Bs});var RF=fe((aAr,lGe)=>{"use strict";var DKt=EY(),RKt=f$();lGe.exports=function(t,r,n){var a=t._fullLayout,i=!0;return a._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!a._has("parcoords"))){try{o.regl=RKt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){i=!1}o.regl||(i=!1),i&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),i||DKt({container:a._glcontainer.node()}),i}});var x$=fe((y$,vGe)=>{"use strict";var uGe=xZ(),cGe=KZ(),IKt=QUe(),fGe=sGe(),hGe=Xt(),zKt=$p().selectMode,qKt=RF(),BKt=Is(),OKt=_U(),NKt=gZ().styleTextSelection,dGe={};function UKt(e,t,r,n){var a=e._size,i=e.width*n,o=e.height*n,s=a.l*n,l=a.b*n,u=a.r*n,c=a.t*n,f=a.w*n,v=a.h*n;return[s+t.domain[0]*f,l+r.domain[0]*v,i-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*v]}var y$=vGe.exports=function(t,r,n){if(n.length){var a=t._fullLayout,i=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(i){var c=qKt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],dGe);if(!c){i.init();return}var f=i.count,v=a._glcanvas.data()[0].regl;if(OKt(t,r,n),i.dirty){if((i.line2d||i.error2d)&&!(i.scatter2d||i.fill2d||i.glText)&&v.clear({color:!0,depth:!0}),i.error2d===!0&&(i.error2d=IKt(v)),i.line2d===!0&&(i.line2d=cGe(v)),i.scatter2d===!0&&(i.scatter2d=uGe(v)),i.fill2d===!0&&(i.fill2d=cGe(v)),i.glText===!0)for(i.glText=new Array(f),l=0;li.glText.length){var g=f-i.glText.length;for(l=0;lJ&&(isNaN(U[ee])||isNaN(U[ee+1]));)ee-=2;q.positions=U.slice(J,ee+2)}return q}),i.line2d.update(i.lineOptions)),i.error2d){var _=(i.errorXOptions||[]).concat(i.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});i.error2d.update(_)}i.scatter2d&&i.scatter2d.update(i.markerOptions),i.fillOrder=hGe.repeat(null,f),i.fill2d&&(i.fillOptions=i.fillOptions.map(function(q,U){var J=n[U];if(!(!q||!J||!J[0]||!J[0].trace)){var ee=J[0],ce=ee.trace,ye=ee.t,xe=i.lineOptions[U],ue,K,_e=[];ce._ownfill&&_e.push(U),ce._nexttrace&&_e.push(U+1),_e.length&&(i.fillOrder[U]=_e);var ne=[],ae=xe&&xe.positions||ye.positions,pe,ie;if(ce.fill==="tozeroy"){for(pe=0;pepe&&isNaN(ae[ie+1]);)ie-=2;ae[pe+1]!==0&&(ne=[ae[pe],0]),ne=ne.concat(ae.slice(pe,ie+2)),ae[ie+1]!==0&&(ne=ne.concat([ae[ie],0]))}else if(ce.fill==="tozerox"){for(pe=0;pepe&&isNaN(ae[ie]);)ie-=2;ae[pe]!==0&&(ne=[0,ae[pe+1]]),ne=ne.concat(ae.slice(pe,ie+2)),ae[ie]!==0&&(ne=ne.concat([0,ae[ie+1]]))}else if(ce.fill==="toself"||ce.fill==="tonext"){for(ne=[],ue=0,q.splitNull=!0,K=0;K-1;for(let[q]of n)if(q){var S=q.trace,L=q.t,w=L.index,A=S._length,T=L.x,m=L.y;if(S.selectedpoints||C||k){if(C||(C=!0),S.selectedpoints){var F=i.selectBatch[w]=S.selectedpoints,E={};for(u=0;u{"use strict";var pGe=CBe();pGe.plot=x$();gGe.exports=pGe});var xGe=fe((sAr,yGe)=>{"use strict";yGe.exports=mGe()});var _$=fe((lAr,TGe)=>{"use strict";var VKt=Ol(),wGe=_s(),_Ge=pl().axisHoverFormat,{hovertemplateAttrs:GKt,templatefallbackAttrs:HKt}=Oo(),BM=mM(),jKt=rc().idRegex,WKt=Mo().templatedArray,w5=ta().extendFlat,Rg=VKt.marker,YKt=Rg.line,XKt=w5(wGe("marker.line",{editTypeOverride:"calc"}),{width:w5({},YKt.width,{editType:"calc"}),editType:"calc"}),IF=w5(wGe("marker"),{symbol:Rg.symbol,angle:Rg.angle,size:w5({},Rg.size,{editType:"markerSize"}),sizeref:Rg.sizeref,sizemin:Rg.sizemin,sizemode:Rg.sizemode,opacity:Rg.opacity,colorbar:Rg.colorbar,line:XKt,editType:"calc"});IF.color.editType=IF.cmin.editType=IF.cmax.editType="style";function bGe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:jKt[e],editType:"plot"}}}TGe.exports={dimensions:WKt("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:!0,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:w5({},BM.text,{}),hovertext:w5({},BM.hovertext,{}),hovertemplate:GKt(),hovertemplatefallback:HKt(),xhoverformat:_Ge("x"),yhoverformat:_Ge("y"),marker:IF,xaxes:bGe("x"),yaxes:bGe("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:BM.selected.marker,editType:"calc"},unselected:{marker:BM.unselected.marker,editType:"calc"},opacity:BM.opacity}});var zF=fe((uAr,AGe)=>{"use strict";AGe.exports=function(e,t,r,n){n||(n=1/0);var a,i;for(a=0;a{"use strict";var b$=Xt(),ZKt=Ah(),MGe=_$(),$Kt=Is(),KKt=vv(),JKt=zF(),QKt=JP().isOpenSymbol;SGe.exports=function(t,r,n,a){function i(g,p){return b$.coerce(t,r,MGe,g,p)}var o=ZKt(t,r,{name:"dimensions",handleItemDefaults:eJt}),s=i("diagonal.visible"),l=i("showupperhalf"),u=i("showlowerhalf"),c=JKt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),KKt(t,r,n,a,i,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=QKt(r.marker.symbol),v=$Kt.isBubble(r);i("marker.line.width",f||v?1:0),tJt(t,r,a,i),b$.coerceSelectionMarkerOpacity(r,i)};function eJt(e,t){function r(a,i){return b$.coerce(e,t,MGe.dimensions,a,i)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function tJt(e,t,r,n){var a=t.dimensions,i=a.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(i),v=new Array(i);for(u=0;uc&&o||u{"use strict";var kGe=Xt();CGe.exports=function(t,r){var n=t._fullLayout,a=r.uid,i=n._splomScenes;i||(i=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=i[r.uid];return l||(l=i[a]=kGe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||kGe.extendFlat(l,o),l}});var DGe=fe((hAr,FGe)=>{"use strict";var w$=Xt(),qF=El(),rJt=gv().calcMarkerSize,nJt=gv().calcAxisExpansion,iJt=pv(),PGe=f_().markerSelection,aJt=f_().markerStyle,oJt=LGe(),sJt=Wa().BADNUM,lJt=Ty().TOO_MANY_POINTS;FGe.exports=function(t,r){var n=r.dimensions,a=r._length,i={},o=i.cdata=[],s=i.data=[],l=r._visibleDims=[],u,c,f,v,g;function p(k,S){for(var L=k.makeCalcdata({v:S.values,vcalendar:r.calendar},"v"),w=0;wlJt,y;for(_?y=i.sizeAvg||Math.max(i.size,3):y=rJt(r,a),c=0;c{(function(){var e,t,r,n,a,i;typeof performance!="undefined"&&performance!==null&&performance.now?OM.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(OM.exports=function(){return(e()-a)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),i=process.uptime()*1e9,a=n-i):Date.now?(OM.exports=function(){return Date.now()-r},r=Date.now()):(OM.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(RGe)});var qGe=fe((dAr,NF)=>{var uJt=IGe(),Ig=window,BF=["moz","webkit"],A5="AnimationFrame",M5=Ig["request"+A5],NM=Ig["cancel"+A5]||Ig["cancelRequest"+A5];for(T5=0;!M5&&T5{BGe.exports=function(t,r){var n=typeof t=="number",a=typeof r=="number";n&&!a?(r=t,t=0):!n&&!a&&(t=0,r=0),t=t|0,r=r|0;var i=r-t;if(i<0)throw new Error("array length must be positive");for(var o=new Array(i),s=0,l=t;s{"use strict";var cJt=xZ(),fJt=E1(),hJt=l_(),NGe=qGe(),dJt=OGe(),A$=u5(),vJt=u_();VGe.exports=Fy;function Fy(e,t){if(!(this instanceof Fy))return new Fy(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=cJt(e),this.canvas=this.scatter.canvas}Fy.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=NGe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,NGe(()=>{this.dirty=!1})),this)};Fy.prototype.update=function(...e){if(!e.length)return;for(let n=0;n_||!a.lower&&x<_)continue;let y=pJt(a.id,x,_),C=this.passes[y]||(this.passes[y]={});if(n.data&&(n.transpose?C.positions={x:{buffer:a.buffer,offset:_,count:l,stride:s},y:{buffer:a.buffer,offset:x,count:l,stride:s}}:C.positions={x:{buffer:a.buffer,offset:_*l,count:l},y:{buffer:a.buffer,offset:x*l,count:l}},C.bounds=UF(a.bounds,x,_)),n.domain||n.viewport||n.data){let k=o?UF(a.padding,x,_):a.padding;if(a.domain){let[S,L,w,A]=UF(a.domain,x,_);C.viewport=[f+S*u+k[0],v+L*c+k[1],f+w*u-k[2],v+A*c-k[3]]}else C.viewport=[f+_*g+g*k[0],v+x*p+p*k[1],f+(_+1)*g-g*k[2],v+(x+1)*p-p*k[3]]}n.color&&(C.color=a.color),n.size&&(C.size=a.size),n.marker&&(C.marker=a.marker),n.borderSize&&(C.borderSize=a.borderSize),n.borderColor&&(C.borderColor=a.borderColor),n.opacity&&(C.opacity=a.opacity),n.range&&(C.range=i?UF(a.range,x,_):a.range||C.bounds),a.passes.push(y)}return this};Fy.prototype.draw=function(...e){if(!e.length)this.scatter.draw();else{let t=[];for(let r=0;r{t[i+s]=n})}this.scatter.draw(...t)}return this};Fy.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function pJt(e,t,r){let n=e.id!=null?e.id:e,a=t,i=r;return n<<16|(a&255)<<8|i&255}function UF(e,t,r){let n,a,i,o,s,l,u,c,f=e[t],v=e[r];return f.length>2?(n=f[0],i=f[2],a=f[1],o=f[3]):f.length?(n=a=f[0],i=o=f[1]):(n=f.x,a=f.y,i=f.x+f.width,o=f.y+f.height),v.length>2?(s=v[0],u=v[2],l=v[1],c=v[3]):v.length?(s=l=v[0],u=c=v[1]):(s=v.x,l=v.y,u=v.x+v.width,c=v.y+v.height),[s,a,u,o]}function UGe(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=A$(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var jGe=fe((gAr,HGe)=>{"use strict";var gJt=GGe(),M$=Xt(),VF=El(),mJt=$p().selectMode;HGe.exports=function(t,r,n){if(n.length)for(var a=0;a-1,E=mJt(c)||!!a.selectedpoints||F,I=!0;if(E){var R=a._length;if(a.selectedpoints){o.selectBatch=a.selectedpoints;var B=a.selectedpoints,O={};for(g=0;g{"use strict";WGe.getDimIndex=function(t,r){for(var n=r._id,a=n.charAt(0),i={x:0,y:1}[a],o=t._visibleDims,s=0;s{"use strict";var YGe=S$(),xJt=KP().calcHover,XGe=Yi().getFromId,_Jt=ta().extendFlat;function bJt(e,t,r,n,a){a||(a={});var i=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=ZGe(e,t,r);if((i||o)&&a.hoversubplots==="axis"&&s[0])for(var l=(i?e.xa:e.ya)._subplotsWith,u=a.gd,c=_Jt({},e),f=0;f{"use strict";var tHe=Xt(),JGe=tHe.pushUnique,QGe=Is(),eHe=S$();rHe.exports=function(t,r){var n=t.cd,a=n[0].trace,i=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!QGe.hasMarkers(a)&&!QGe.hasText(a);if(a.visible!==!0||f)return c;var v=eHe.getDimIndex(a,l),g=eHe.getDimIndex(a,u);if(v===!1||g===!1)return c;var p=i.xpx[v],x=i.ypx[g],_=s[v],y=s[g],C=(t.scene.selectBatch||[]).slice(),k=[];if(r!==!1&&!r.degenerate)for(var S=0;S<_.length;S++)r.contains([p[S],x[S]],null,S,t)?(c.push({pointNumber:S,x:_[S],y:y[S]}),JGe(C,S)):C.indexOf(S)!==-1?JGe(C,S):k.push(S);var L=o.matrixOptions;return!C.length&&!k.length?o.matrix.update(L,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,tHe.extendFlat({},L,o.selectedOptions,o.viewOpts)),o.selectBatch=C,o.unselectBatch=k,c}});var oHe=fe((_Ar,aHe)=>{"use strict";var iHe=Xt(),wJt=pv(),TJt=f_().markerStyle;aHe.exports=function(t,r){var n=r.trace,a=t._fullLayout._splomScenes[n.uid];if(a){wJt(t,n),iHe.extendFlat(a.matrixOptions,TJt(t,n));var i=iHe.extendFlat({},a.matrixOptions,a.viewOpts);a.matrix.update(i,null)}}});var lHe=fe((bAr,sHe)=>{"use strict";var AJt=bi(),MJt=dV();sHe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:_$(),supplyDefaults:EGe(),colorbar:Zf(),calc:DGe(),plot:jGe(),hoverPoints:KGe().hoverPoints,selectPoints:nHe(),editStyle:oHe(),meta:{}};AJt.register(MJt)});var vHe=fe((wAr,dHe)=>{"use strict";var SJt=KZ(),EJt=bi(),kJt=RF(),CJt=jf().getModuleCalcData,Dy=gu(),uHe=El().getFromId,cHe=Yi().shouldShowZeroLine,fHe="splom",hHe={};function LJt(e){var t=e._fullLayout,r=EJt.getModule(fHe),n=CJt(e.calcdata,r)[0],a=kJt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],hHe);a&&(t._hasOnlyLargeSploms&&E$(e),r.plot(e,{},n))}function PJt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&E$(e);for(var n=0;n{"use strict";var pHe=lHe();pHe.basePlotModule=vHe(),gHe.exports=pHe});var xHe=fe((AAr,yHe)=>{"use strict";yHe.exports=mHe()});var L$=fe((MAr,_He)=>{"use strict";var IJt=_s(),k$=pf(),C$=Ds(),zJt=nl().attributes,GF=ta().extendFlat,qJt=Mo().templatedArray;_He.exports={domain:zJt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:C$({editType:"plot"}),tickfont:C$({autoShadowDflt:!0,editType:"plot"}),rangefont:C$({editType:"plot"}),dimensions:qJt("dimension",{label:{valType:"string",editType:"plot"},tickvals:GF({},k$.tickvals,{editType:"plot"}),ticktext:GF({},k$.ticktext,{editType:"plot"}),tickformat:GF({},k$.tickformat,{editType:"plot"}),visible:{valType:"boolean",dflt:!0,editType:"plot"},range:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},constraintrange:{valType:"info_array",freeLength:!0,dimensions:"1-2",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},multiselect:{valType:"boolean",dflt:!0,editType:"plot"},values:{valType:"data_array",editType:"calc"},editType:"calc"}),line:GF({editType:"calc"},IJt("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}});var UM=fe((SAr,bHe)=>{"use strict";bHe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var L1=fe((EAr,THe)=>{"use strict";var BJt=J4();function wHe(e){return[e]}THe.exports={keyFun:function(e){return e.key},repeat:wHe,descend:BJt,wrap:wHe,unwrap:function(e){return e[0]}}});var D$=fe((kAr,RHe)=>{"use strict";var Vu=UM(),Dp=xi(),OJt=L1().keyFun,HF=L1().repeat,S5=Xt().sorterAsc,NJt=Xt().strTranslate,AHe=Vu.bar.snapRatio;function MHe(e,t){return e*(1-AHe)+t*AHe}var SHe=Vu.bar.snapClose;function UJt(e,t){return e*(1-SHe)+t*SHe}function WF(e,t,r,n){if(VJt(r,n))return r;var a=e?-1:1,i=0,o=t.length-1;if(a<0){var s=i;i=o,o=s}for(var l=t[i],u=l,c=i;a*c=t[r][0]&&e<=t[r][1])return!0;return!1}function GJt(e){e.attr("x",-Vu.bar.captureWidth/2).attr("width",Vu.bar.captureWidth)}function HJt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function jJt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=EHe(e.brush.filter.getConsolidated(),e.height),r=[0],n,a,i,o=t.length?t[0][0]:null,s=0;se[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function kHe(){Dp.select(document.body).style("cursor",null)}function F$(e){e.attr("stroke-dasharray",jJt)}function jF(e,t){var r=Dp.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Vu.bar.snapDuration).each("end",t):r;F$(n)}function CHe(e,t){var r=e.brush,n=r.filterSpecified,a=NaN,i={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=EHe(l,s),c=NaN,f=NaN,v=NaN;for(o=0;o<=u.length;o++){var g=u[o];if(g&&g[0]<=t&&t<=g[1]){c=o;break}else if(f=o?o-1:NaN,g&&g[0]>t){v=o;break}}if(a=c,isNaN(a)&&(isNaN(f)||isNaN(v)?a=isNaN(f)?v:f:a=t-u[f][1]=C[0]&&y<=C[1]){i.clickableOrdinalRange=C;break}}}return i}function YJt(e,t){Dp.event.sourceEvent.stopPropagation();var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=t.unitToPaddedPx.invert(r),a=t.brush,i=CHe(t,r),o=i.interval,s=a.svgBrush;if(s.wasDragged=!1,s.grabbingBar=i.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Vu.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=i.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&a.filterSpecified?a.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=i.region?o[i.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function LHe(e,t){Dp.event.sourceEvent.stopPropagation();var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(S5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),jF(e.parentNode)}function XJt(e,t){var r=t.brush,n=r.filter,a=r.svgBrush;a._dragging||(PHe(e,t),LHe(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1;var i=Dp.event;i.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,kHe(),!a.wasDragged){a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,a.extent.length===0&&P$(r)):P$(r),a.brushCallback(t),jF(e.parentNode),a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(u?[a.newExtent]:[]),a.extent.length||P$(r),a.brushCallback(t),u?jF(e.parentNode,s):(s(),jF(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function PHe(e,t){var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=CHe(t,r),a="crosshair";n.clickableOrdinalRange?a="pointer":n.region&&(a=n.region+"-resize"),Dp.select(document.body).style("cursor",a)}function ZJt(e){e.on("mousemove",function(t){Dp.event.preventDefault(),t.parent.inBrushDrag||PHe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||kHe()}).call(Dp.behavior.drag().on("dragstart",function(t){YJt(this,t)}).on("drag",function(t){LHe(this,t)}).on("dragend",function(t){XJt(this,t)}))}function FHe(e,t){return e[0]-t[0]}function $Jt(e,t,r){var n=r._context.staticPlot,a=e.selectAll(".background").data(HF);a.enter().append("rect").classed("background",!0).call(GJt).call(HJt).style("pointer-events",n?"none":"auto").attr("transform",NJt(0,Vu.verticalPadding)),a.call(ZJt).attr("height",function(s){return s.height-Vu.verticalPadding});var i=e.selectAll(".highlight-shadow").data(HF);i.enter().append("line").classed("highlight-shadow",!0).attr("x",-Vu.bar.width/2).attr("stroke-width",Vu.bar.width+Vu.bar.strokeWidth).attr("stroke",t).attr("opacity",Vu.bar.strokeOpacity).attr("stroke-linecap","butt"),i.attr("y1",function(s){return s.height}).call(F$);var o=e.selectAll(".highlight").data(HF);o.enter().append("line").classed("highlight",!0).attr("x",-Vu.bar.width/2).attr("stroke-width",Vu.bar.width-Vu.bar.strokeWidth).attr("stroke",Vu.bar.fillColor).attr("opacity",Vu.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(F$)}function KJt(e,t,r){var n=e.selectAll("."+Vu.cn.axisBrush).data(HF,OJt);n.enter().append("g").classed(Vu.cn.axisBrush,!0),$Jt(n,t,r)}function JJt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function P$(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function QJt(e){return function(r){var n=r.brush,a=JJt(n),i=a.slice();n.filter.set(i),e()}}function DHe(e){for(var t=e.slice(),r=[],n,a=t.shift();a;){for(n=a.slice();(a=t.shift())&&a[0]<=n[1];)n[1]=Math.max(n[1],a[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function eQt(){var e=[],t,r;return{set:function(n){e=n.map(function(a){return a.slice().sort(S5)}).sort(FHe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=DHe(e),r=e.reduce(function(a,i){return[Math.min(a[0],i[0]),Math.max(a[1],i[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function tQt(e,t,r,n,a,i){var o=eQt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:QJt(a),brushEndCallback:i}}}function rQt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(S5)}),t.multiselect?e=DHe(e.sort(FHe)):e=[e[0]]):e=[e.sort(S5)],t.tickvals){var r=t.tickvals.slice().sort(S5);if(e=e.map(function(n){var a=[WF(0,r,n[0],[]),WF(1,r,n[1],[])];if(a[1]>a[0])return a}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}RHe.exports={makeBrush:tQt,ensureAxisBrush:KJt,cleanRanges:rQt}});var qHe=fe((CAr,zHe)=>{"use strict";var Ry=Xt(),nQt=Wf().hasColorscale,iQt=Vc(),aQt=nl().defaults,oQt=Ah(),sQt=Yi(),IHe=L$(),lQt=D$(),R$=UM().maxDimensionCount,uQt=zF();function cQt(e,t,r,n,a){var i=a("line.color",r);if(nQt(e,"line")&&Ry.isArrayOrTypedArray(i)){if(i.length)return a("line.colorscale"),iQt(e,t,n,a,{prefix:"line.",cLetter:"c"}),i.length;t.line.color=r}return 1/0}function fQt(e,t,r,n){function a(u,c){return Ry.coerce(e,t,IHe.dimensions,u,c)}var i=a("values"),o=a("visible");if(i&&i.length||(o=t.visible=!1),o){a("label"),a("tickvals"),a("ticktext"),a("tickformat");var s=a("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},sQt.setConvert(t._ax,n.layout),a("multiselect");var l=a("constraintrange");l&&(t.constraintrange=lQt.cleanRanges(l,t))}}zHe.exports=function(t,r,n,a){function i(c,f){return Ry.coerce(t,r,IHe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>R$&&(Ry.log("parcoords traces support up to "+R$+" dimensions at the moment"),o.splice(R$));var s=oQt(t,r,{name:"dimensions",layout:a,handleItemDefaults:fQt}),l=cQt(t,r,n,a,i);aQt(r,a,i),(!Array.isArray(s)||!s.length)&&(r.visible=!1),uQt(r,s,"values",l);var u=Ry.extendFlat({},a.font,{size:Math.round(a.font.size/1.2)});Ry.coerceFont(i,"labelfont",u),Ry.coerceFont(i,"tickfont",u,{autoShadowDflt:!0}),Ry.coerceFont(i,"rangefont",u),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}});var OHe=fe((LAr,BHe)=>{"use strict";var hQt=Xt().isArrayOrTypedArray,I$=js(),dQt=L1().wrap;BHe.exports=function(t,r){var n,a;return I$.hasColorscale(r,"line")&&hQt(r.line.color)?(n=r.line.color,a=I$.extractOpts(r.line).colorscale,I$.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=vQt(r._length),a=[[0,r.line.color],[1,r.line.color]]),dQt({lineColor:n,cscale:a})};function vQt(e){for(var t=new Array(e),r=0;r{"use strict";var pQt=Xt().isTypedArray;YF.convertTypedArray=function(e){return pQt(e)?Array.prototype.slice.call(e):e};YF.isOrdinal=function(e){return!!e.tickvals};YF.isVisible=function(e){return e.visible||!("visible"in e)}});var ZHe=fe((FAr,XHe)=>{"use strict";var gQt=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),mQt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),VM=UM().maxDimensionCount,jHe=Xt(),NHe=1e-6,XF=2048,yQt=new Uint8Array(4),UHe=new Uint8Array(4),VHe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function xQt(e){e.read({x:0,y:0,width:1,height:1,data:yQt})}function WHe(e,t,r,n,a){var i=e._gl;i.enable(i.SCISSOR_TEST),i.scissor(t,r,n,a),e.clear({color:[0,0,0,0],depth:1})}function _Qt(e,t,r,n,a,i){var o=i.key;function s(l){var u=Math.min(n,a-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],WHe(e,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),!r.clearOnly&&(i.count=2*u,i.offset=2*l*n,t(i),l*n+u>>8*t)%256/255}function TQt(e,t,r){for(var n=new Array(e*(VM+4)),a=0,i=0;iV&&(V=T[I].dim1.canvasX,B=I);E===0&&WHe(a,0,0,u.canvasWidth,u.canvasHeight);var j=k(r);for(I=0;I{"use strict";var bf=xi(),zg=Xt(),B$=zg.isArrayOrTypedArray,tje=zg.numberFormat,rje=ni(),nje=Yi(),kQt=zg.strRotate,P1=zg.strTranslate,CQt=as(),ZF=ea(),$He=js(),U$=L1(),Iv=U$.keyFun,F1=U$.repeat,ije=U$.unwrap,E5=z$(),Fo=UM(),aje=D$(),LQt=ZHe();function KHe(e,t,r){return zg.aggNums(e,null,t,r)}function oje(e,t){return V$(KHe(Math.min,e,t),KHe(Math.max,e,t))}function $F(e){var t=e.range;return t?V$(t[0],t[1]):oje(e.values,e._length)}function V$(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function PQt(e,t){return t?function(r,n){var a=t[n];return a==null?e(r):a}:e}function FQt(e,t,r,n,a){var i=$F(r);return n?bf.scale.ordinal().domain(n.map(PQt(tje(r.tickformat),a))).range(n.map(function(o){var s=(o-i[0])/(i[1]-i[0]);return e-t+s*(2*t-e)})):bf.scale.linear().domain(i).range([e-t,t])}function DQt(e,t){return bf.scale.linear().range([t,e-t])}function RQt(e,t){return bf.scale.linear().domain($F(e)).range([t,1-t])}function IQt(e){if(e.tickvals){var t=$F(e);return bf.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function zQt(e){var t=e.map(function(i){return i[0]}),r=e.map(function(i){let[o,s,l]=rje.rgbaArray(i[1]);return bf.rgb(o,s,l)}),n=function(i){return function(o){return o[i]}},a="rgb".split("").map(function(i){return bf.scale.linear().clamp(!0).domain(t).range(r.map(n(i)))});return function(i){return a.map(function(o){return o(i)})}}function N$(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function qQt(e,t,r){var n=ije(t),a=n.trace,i=E5.convertTypedArray(n.lineColor),o=a.line,s={color:rje.normalize(a.unselected.line.color),opacity:a.unselected.line.opacity},l=$He.extractOpts(o),u=l.reversescale?$He.flipScale(n.cscale):n.cscale,c=a.domain,f=a.dimensions,v=e.width,g=a.labelangle,p=a.labelside,x=a.labelfont,_=a.tickfont,y=a.rangefont,C=zg.extendDeepNoArrays({},o,{color:i.map(bf.scale.linear().domain($F({values:i,range:[l.min,l.max],_length:a._length}))),blockLineCount:Fo.blockLineCount,canvasOverdrag:Fo.overdrag*Fo.canvasPixelRatio}),k=Math.floor(v*(c.x[1]-c.x[0])),S=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},w=k,A=S;return{key:r,colCount:f.filter(E5.isVisible).length,dimensions:f,tickDistance:Fo.tickDistance,unitToColor:zQt(u),lines:C,deselectedLines:s,labelAngle:g,labelSide:p,labelFont:x,tickFont:_,rangeFont:y,layoutWidth:v,layoutHeight:e.height,domain:c,translateX:c.x[0]*v,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:w*Fo.canvasPixelRatio+2*C.canvasOverdrag,canvasHeight:A*Fo.canvasPixelRatio,width:w,height:A,canvasPixelRatio:Fo.canvasPixelRatio}}function BQt(e,t,r){var n=r.width,a=r.height,i=r.dimensions,o=r.canvasPixelRatio,s=function(v){return n*v/Math.max(1,r.colCount-1)},l=Fo.verticalPadding/a,u=DQt(a,Fo.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=i.filter(E5.isVisible).map(function(v,g){var p=RQt(v,l),x=f[v.label];f[v.label]=(x||0)+1;var _=v.label+(x?"__"+x:""),y=v.constraintrange,C=y&&y.length;C&&!B$(y[0])&&(y=[y]);var k=C?y.map(function(R){return R.map(p)}):[[-1/0,1/0]],S=function(){var R=c;R.focusLayer&&R.focusLayer.render(R.panels,!0);var B=N$(R);!e.contextShown()&&B?(R.contextLayer&&R.contextLayer.render(R.panels,!0),e.contextShown(!0)):e.contextShown()&&!B&&(R.contextLayer&&R.contextLayer.render(R.panels,!0,!0),e.contextShown(!1))},L=v.values;L.length>v._length&&(L=L.slice(0,v._length));var w=v.tickvals,A;function T(R,B){return{val:R,text:A[B]}}function m(R,B){return R.val-B.val}if(B$(w)&&w.length){zg.isTypedArray(w)&&(w=Array.from(w)),A=v.ticktext,!B$(A)||!A.length?A=w.map(tje(v.tickformat)):A.length>w.length?A=A.slice(0,w.length):w.length>A.length&&(w=w.slice(0,A.length));for(var F=1;F=B||q>=O)return;var U=I.lineLayer.readPixel(j,O-1-q),J=U[3]!==0,ee=J?U[2]+256*(U[1]+256*U[0]):null,ce={x:j,y:q,clientX:R.clientX,clientY:R.clientY,dataIndex:I.model.key,curveNumber:ee};ee!==p&&(J?a.hover(ce):a.unhover&&a.unhover(ce),p=ee)}}),g.style("opacity",function(I){return I.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var _=s.selectAll("."+Fo.cn.parcoords).data(v,Iv);_.exit().remove(),_.enter().append("g").classed(Fo.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),_.attr("transform",function(I){return P1(I.model.translateX,I.model.translateY)});var y=_.selectAll("."+Fo.cn.parcoordsControlView).data(F1,Iv);y.enter().append("g").classed(Fo.cn.parcoordsControlView,!0),y.attr("transform",function(I){return P1(I.model.pad.l,I.model.pad.t)});var C=y.selectAll("."+Fo.cn.yAxis).data(function(I){return I.dimensions},Iv);C.enter().append("g").classed(Fo.cn.yAxis,!0),y.each(function(I){O$(C,I,u)}),g.each(function(I){if(I.viewModel){!I.lineLayer||a?I.lineLayer=LQt(this,I):I.lineLayer.update(I),(I.key||I.key===0)&&(I.viewModel[I.key]=I.lineLayer);var R=!I.context||a;I.lineLayer.render(I.viewModel.panels,R)}}),C.attr("transform",function(I){return P1(I.xScale(I.xIndex),0)}),C.call(bf.behavior.drag().origin(function(I){return I}).on("drag",function(I){var R=I.parent;f.linePickActive(!1),I.x=Math.max(-Fo.overdrag,Math.min(I.model.width+Fo.overdrag,bf.event.x)),I.canvasX=I.x*I.model.canvasPixelRatio,C.sort(function(B,O){return B.x-O.x}).each(function(B,O){B.xIndex=O,B.x=I===B?B.x:B.xScale(B.xIndex),B.canvasX=B.x*B.model.canvasPixelRatio}),O$(C,R,u),C.filter(function(B){return Math.abs(I.xIndex-B.xIndex)!==0}).attr("transform",function(B){return P1(B.xScale(B.xIndex),0)}),bf.select(this).attr("transform",P1(I.x,0)),C.each(function(B,O,V){V===I.parent.key&&(R.dimensions[O]=B)}),R.contextLayer&&R.contextLayer.render(R.panels,!1,!N$(R)),R.focusLayer.render&&R.focusLayer.render(R.panels)}).on("dragend",function(I){var R=I.parent;I.x=I.xScale(I.xIndex),I.canvasX=I.x*I.model.canvasPixelRatio,O$(C,R,u),bf.select(this).attr("transform",function(B){return P1(B.x,0)}),R.contextLayer&&R.contextLayer.render(R.panels,!1,!N$(R)),R.focusLayer&&R.focusLayer.render(R.panels),R.pickLayer&&R.pickLayer.render(R.panels,!0),f.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(R.key,R.dimensions.map(function(B){return B.crossfilterDimensionIndex}))})),C.exit().remove();var k=C.selectAll("."+Fo.cn.axisOverlays).data(F1,Iv);k.enter().append("g").classed(Fo.cn.axisOverlays,!0),k.selectAll("."+Fo.cn.axis).remove();var S=k.selectAll("."+Fo.cn.axis).data(F1,Iv);S.enter().append("g").classed(Fo.cn.axis,!0),S.each(function(I){var R=I.model.height/I.model.tickDistance,B=I.domainScale,O=B.domain();bf.select(this).call(bf.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(R,I.tickFormat).tickValues(I.ordinal?O:null).tickFormat(function(V){return E5.isOrdinal(I)?V:sje(I.model.dimensions[I.visibleIndex],V)}).scale(B)),ZF.font(S.selectAll("text"),I.model.tickFont)}),S.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),S.selectAll("text").style("cursor","default");var L=k.selectAll("."+Fo.cn.axisHeading).data(F1,Iv);L.enter().append("g").classed(Fo.cn.axisHeading,!0);var w=L.selectAll("."+Fo.cn.axisTitle).data(F1,Iv);w.enter().append("text").classed(Fo.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",i?"none":"auto"),w.text(function(I){return I.label}).each(function(I){var R=bf.select(this);ZF.font(R,I.model.labelFont),CQt.convertToTspans(R,t)}).attr("transform",function(I){var R=QHe(I.model.labelAngle,I.model.labelSide),B=Fo.axisTitleOffset;return(R.dir>0?"":P1(0,2*B+I.model.height))+kQt(R.degrees)+P1(-B*R.dx,-B*R.dy)}).attr("text-anchor",function(I){var R=QHe(I.model.labelAngle,I.model.labelSide),B=Math.abs(R.dx),O=Math.abs(R.dy);return 2*B>O?R.dir*R.dx<0?"start":"end":"middle"});var A=k.selectAll("."+Fo.cn.axisExtent).data(F1,Iv);A.enter().append("g").classed(Fo.cn.axisExtent,!0);var T=A.selectAll("."+Fo.cn.axisExtentTop).data(F1,Iv);T.enter().append("g").classed(Fo.cn.axisExtentTop,!0),T.attr("transform",P1(0,-Fo.axisExtentOffset));var m=T.selectAll("."+Fo.cn.axisExtentTopText).data(F1,Iv);m.enter().append("text").classed(Fo.cn.axisExtentTopText,!0).call(JHe),m.text(function(I){return eje(I,!0)}).each(function(I){ZF.font(bf.select(this),I.model.rangeFont)});var F=A.selectAll("."+Fo.cn.axisExtentBottom).data(F1,Iv);F.enter().append("g").classed(Fo.cn.axisExtentBottom,!0),F.attr("transform",function(I){return P1(0,I.model.height+Fo.axisExtentOffset)});var E=F.selectAll("."+Fo.cn.axisExtentBottomText).data(F1,Iv);E.enter().append("text").classed(Fo.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(JHe),E.text(function(I){return eje(I,!1)}).each(function(I){ZF.font(bf.select(this),I.model.rangeFont)}),aje.ensureAxisBrush(k,c,t)}});var H$=fe((G$,dje)=>{"use strict";var UQt=uje(),VQt=RF(),cje=z$().isVisible,hje={};function fje(e,t,r){var n=t.indexOf(r),a=e.indexOf(n);return a===-1&&(a+=t.length),a}function GQt(e,t){return function(n,a){return fje(e,t,n)-fje(e,t,a)}}var G$=dje.exports=function(t,r){var n=t._fullLayout,a=VQt(t,[],hje);if(a){var i={},o={},s={},l=n._size;r.forEach(function(g,p){var x=g[0].trace,_=s[p]=x.index;i[p]=t.data[_].dimensions,o[p]=t.data[_].dimensions.slice()});var u=function(g,p,x){var _=o[g][p],y=x.map(function(A){return A.slice()}),C="dimensions["+p+"].constraintrange",k=n._tracePreGUI[t._fullData[s[g]].uid];if(k[C]===void 0){var S=_.constraintrange;k[C]=S||null}var L=t._fullData[s[g]].dimensions[p];y.length?(y.length===1&&(y=y[0]),_.constraintrange=y,L.constraintrange=y.slice(),y=[y]):(delete _.constraintrange,delete L.constraintrange,y=null);var w={};w[C]=y,t.emit("plotly_restyle",[w,[s[g]]])},c=function(g){t.emit("plotly_hover",g)},f=function(g){t.emit("plotly_unhover",g)},v=function(g,p){var x=GQt(p,o[g].filter(cje));i[g].sort(x),o[g].filter(function(_){return!cje(_)}).sort(function(_){return o[g].indexOf(_)}).forEach(function(_){i[g].splice(i[g].indexOf(_),1),i[g].splice(o[g].indexOf(_),0,_)}),t.emit("plotly_restyle",[{dimensions:[i[g]]},[s[g]]])};UQt(t,r,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:f,axesMoved:v})}};G$.reglPrecompiled=hje});var pje=fe(GM=>{"use strict";var vje=xi(),HQt=jf().getModuleCalcData,jQt=H$(),WQt=Q0();GM.name="parcoords";GM.plot=function(e){var t=HQt(e.calcdata,"parcoords")[0];t.length&&jQt(e,t)};GM.clean=function(e,t,r,n){var a=n._has&&n._has("parcoords"),i=t._has&&t._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())};GM.toSVG=function(e){var t=e._fullLayout._glimages,r=vje.select(e).selectAll(".svg-container"),n=r.filter(function(i,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var i=this,o=i.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:WQt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:i.style.width,height:i.style.height})}n.each(a),window.setTimeout(function(){vje.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var mje=fe((IAr,gje)=>{"use strict";gje.exports={attributes:L$(),supplyDefaults:qHe(),calc:OHe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:pje(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var _je=fe((zAr,xje)=>{"use strict";var yje=mje();yje.plot=H$();xje.exports=yje});var wje=fe((qAr,bje)=>{"use strict";bje.exports=_je()});var j$=fe((BAr,Eje)=>{"use strict";var Aje=ta().extendFlat,YQt=Ho(),Tje=Ds(),XQt=_s(),{hovertemplateAttrs:Mje,templatefallbackAttrs:Sje}=Oo(),ZQt=nl().attributes,$Qt=Aje({editType:"calc"},XQt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:Mje({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:Sje({editType:"plot"})});Eje.exports={domain:ZQt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:Aje({},YQt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:Mje({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:Sje({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:Tje({editType:"calc"}),tickfont:Tje({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:$Qt,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}});var Lje=fe((OAr,Cje)=>{"use strict";var k5=Xt(),KQt=Wf().hasColorscale,JQt=Vc(),QQt=nl().defaults,eer=Ah(),kje=j$(),ter=zF(),rer=Gf().isTypedArraySpec;function ner(e,t,r,n,a){a("line.shape"),a("line.hovertemplate"),a("line.hovertemplatefallback");var i=a("line.color",n.colorway[0]);if(KQt(e,"line")&&k5.isArrayOrTypedArray(i)){if(i.length)return a("line.colorscale"),JQt(e,t,n,a,{prefix:"line.",cLetter:"c"}),i.length;t.line.color=r}return 1/0}function ier(e,t){function r(u,c){return k5.coerce(e,t,kje.dimensions,u,c)}var n=r("values"),a=r("visible");if(n&&n.length||(a=t.visible=!1),a){r("label"),r("displayindex",t._index);var i=e.categoryarray,o=k5.isArrayOrTypedArray(i)&&i.length>0||rer(i),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}Cje.exports=function(t,r,n,a){function i(u,c){return k5.coerce(t,r,kje,u,c)}var o=eer(t,r,{name:"dimensions",handleItemDefaults:ier}),s=ner(t,r,n,a,i);QQt(r,a,i),(!Array.isArray(o)||!o.length)&&(r.visible=!1),ter(r,o,"values",s),i("hoveron"),i("hovertemplate"),i("hovertemplatefallback"),i("arrangement"),i("bundlecolors"),i("sortpaths"),i("counts");var l=a.font;k5.coerceFont(i,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),k5.coerceFont(i,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var Fje=fe((NAr,Pje)=>{"use strict";var aer=L1().wrap,oer=Wf().hasColorscale,ser=Mh(),ler=Wq(),uer=ea(),HM=Xt(),cer=aa();Pje.exports=function(t,r){var n=HM.filterVisible(r.dimensions);if(n.length===0)return[];var a=n.map(function(m){var F;if(m.categoryorder==="trace")F=null;else if(m.categoryorder==="array")F=m.categoryarray;else{F=ler(m.values);for(var E=!0,I=0;I=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var Uje=fe((UAr,Nje)=>{"use strict";var Do=xi(),ber=($2(),Gs(Z2)).interpolateNumber,wer=Z8(),W$=ni(),YM=kl(),Iy=Xt(),jM=Iy.strTranslate,Dje=ea(),Ter=as();function Aer(e,t,r,n){var a=t._context.staticPlot,i=e.map(Ner.bind(0,t,r)),o=n.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all");var s=o.selectAll("g.trace.parcats").data(i,qg),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(C){return jM(C.x,C.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(C){return C.paths},qg);c.attr("fill",function(C){return C.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(C){return C.model.color}).attr("fill-opacity",0);Z$(f),c.attr("d",function(C){return C.svgD}),f.empty()||c.sort(Y$),c.exit().remove(),c.on("mouseover",Ser).on("mouseout",Eer).on("click",ker),l.append("g").attr("class","dimensions");var v=s.select("g.dimensions"),g=v.selectAll("g.dimension").data(function(C){return C.dimensions},qg);g.enter().append("g").attr("class","dimension"),g.attr("transform",function(C){return jM(C.x,0)}),g.exit().remove();var p=g.selectAll("g.category").data(function(C){return C.categories},qg),x=p.enter().append("g").attr("class","category");p.attr("transform",function(C){return jM(0,C.y)}),x.append("rect").attr("class","catrect").attr("pointer-events","none"),p.select("rect.catrect").attr("fill","none").attr("width",function(C){return C.width}).attr("height",function(C){return C.height}),Ije(x);var _=p.selectAll("rect.bandrect").data(function(C){return C.bands},qg);_.each(function(){Iy.raiseToTop(this)}),_.attr("fill",function(C){return C.color});var y=_.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(C){return C.color}).attr("fill-opacity",0);_.attr("fill",function(C){return C.color}).attr("width",function(C){return C.width}).attr("height",function(C){return C.height}).attr("y",function(C){return C.y}).attr("cursor",function(C){return C.parcatsViewModel.arrangement==="fixed"?"default":C.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),K$(y),_.exit().remove(),x.append("text").attr("class","catlabel").attr("pointer-events","none"),p.select("text.catlabel").attr("text-anchor",function(C){return WM(C)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(C){return WM(C)?C.width+5:-5}).attr("y",function(C){return C.height/2}).text(function(C){return C.model.categoryLabel}).each(function(C){Dje.font(Do.select(this),C.parcatsViewModel.categorylabelfont),Ter.convertToTspans(Do.select(this),t)}),x.append("text").attr("class","dimlabel"),p.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(C){return C.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(C){return C.width/2}).attr("y",-5).text(function(C,k){return k===0?C.parcatsViewModel.model.dimensions[C.model.dimensionInd].dimensionLabel:null}).each(function(C){Dje.font(Do.select(this),C.parcatsViewModel.labelfont)}),p.selectAll("rect.bandrect").on("mouseover",Ier).on("mouseout",zer),p.exit().remove(),g.call(Do.behavior.drag().origin(function(C){return{x:C.x,y:0}}).on("dragstart",qer).on("drag",Ber).on("dragend",Oer)),s.each(function(C){C.traceSelection=Do.select(this),C.pathSelection=Do.select(this).selectAll("g.paths").selectAll("path.path"),C.dimensionSelection=Do.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}Nje.exports=function(e,t,r,n){Aer(r,e,n,t)};function qg(e){return e.key}function WM(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function Y$(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColora)return 1;if(n!==a){var i=isNaN(n),o=isNaN(a);if(i!==o)return i?1:-1}}return e.length-t.length}function Ser(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){Iy.raiseToTop(this),$$(Do.select(this));var t=XM(e),r=X$(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:Do.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var n=Do.mouse(this)[0],a=e.parcatsViewModel.graphDiv,i=e.parcatsViewModel.trace,o=a._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.graphDiv.getBoundingClientRect(),u,c,f;for(f=0;f"),w=Do.mouse(a)[0];YM.loneHover({trace:i,x:p-s.left+l.left,y:x-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:_,idealAlign:wW$.mostReadable(t.model.color)).attr("stroke-width",.3)}function Cer(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function Ije(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function Ler(e){e.attr("stroke","black").attr("stroke-width",1.5)}function K$(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function KF(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,n=e.categoryViewModel.model.categoryInd;return t.filter(function(a){return a.model.categoryInds[r]===n&&a.model.color===e.color})}function Per(e){var t=Do.select(e.parentNode).selectAll("rect.bandrect");t.each(function(r){var n=KF(r);$$(n),n.each(function(){Iy.raiseToTop(this)})}),Cer(Do.select(e.parentNode))}function Fer(e){var t=Do.select(e).datum(),r=KF(t);$$(r),r.each(function(){Iy.raiseToTop(this)}),Do.select(e.parentNode).selectAll("rect.bandrect").filter(function(n){return n.color===t.color}).each(function(){Iy.raiseToTop(this),Ler(Do.select(this))})}function J$(e,t,r){var n=Do.select(e).datum(),a=n.categoryViewModel.model,i=n.parcatsViewModel.graphDiv,o=Do.select(e.parentNode).selectAll("rect.bandrect"),s=[];o.each(function(u){var c=KF(u);c.each(function(f){Array.prototype.push.apply(s,XM(f))})});var l={};l[a.dimensionInd]=a.categoryValue,i.emit(t,{points:s,event:r,constraints:l})}function Q$(e,t,r){var n=Do.select(e).datum(),a=n.categoryViewModel.model,i=n.parcatsViewModel.graphDiv,o=KF(n),s=[];o.each(function(u){Array.prototype.push.apply(s,XM(u))});var l={};l[a.dimensionInd]=a.categoryValue,n.rawColor!==void 0&&(l.color=n.rawColor),i.emit(t,{points:s,event:r,constraints:l})}function zje(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,i=Do.select(r.parentNode).select("rect.catrect"),o=i.node().getBoundingClientRect(),s=i.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,v,g;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(v=o.left,g="left"):(v=o.left+o.width,g="right");var p=s.model.count,x=s.model.categoryLabel,_=p/s.parcatsViewModel.model.count,y={countLabel:p,categoryLabel:x,probabilityLabel:_.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",y.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&C.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var k=C.join("
");return{trace:c,x:n*(v-t.left),y:a*(f-t.top),text:k,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:g,hovertemplate:c.hovertemplate,hovertemplateLabels:y,eventData:[{data:c._input,fullData:c,count:p,category:x,probability:_}]}}function Der(e,t,r){var n=[];return Do.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var a=this;n.push(zje(e,t,a))}),n}function Rer(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,i=r.getBoundingClientRect(),o=Do.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=i.y+i.height/2,v,g;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(v=i.left,g="left"):(v=i.left+i.width,g="right");var p=s.model.categoryLabel,x=o.parcatsViewModel.model.count,_=0;o.categoryViewModel.bands.forEach(function(F){F.color===o.color&&(_+=F.count)});var y=s.model.count,C=0;l.pathSelection.each(function(F){F.model.color===o.color&&(C+=F.model.count)});var k=_/x,S=_/C,L=_/y,w={countLabel:_,categoryLabel:p,probabilityLabel:k.toFixed(3)},A=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&A.push(["Count:",w.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(A.push("P(color \u2229 "+p+"): "+w.probabilityLabel),A.push("P("+p+" | color): "+S.toFixed(3)),A.push("P(color | "+p+"): "+L.toFixed(3)));var T=A.join("
"),m=W$.mostReadable(o.color);return{trace:c,x:n*(v-t.left),y:a*(f-t.top),text:T,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:m,fontSize:10,idealAlign:g,hovertemplate:c.hovertemplate,hovertemplateLabels:w,eventData:[{data:c._input,fullData:c,category:p,count:x,probability:k,categorycount:y,colorcount:C,bandcolorcount:_}]}}function Ier(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Do.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,a=n._paperdiv.node().getBoundingClientRect(),i=e.parcatsViewModel.hoveron,o=this;if(i==="color"?(Fer(o),Q$(o,"plotly_hover",Do.event)):(Per(o),J$(o,"plotly_hover",Do.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;i==="category"?s=zje(r,a,o):i==="color"?s=Rer(r,a,o):i==="dimension"&&(s=Der(r,a,o)),s&&YM.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function zer(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(Z$(t.pathSelection),Ije(t.dimensionSelection.selectAll("g.category")),K$(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),YM.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(Y$),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?Q$(n,"plotly_unhover",Do.event):J$(n,"plotly_unhover",Do.event)}}function qer(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Do.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Do.mouse(this)[0],n=Do.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(a){return a.displayInd}),t.model.dragY=t.y,Iy.raiseToTop(this.parentNode),Do.select(this.parentNode).selectAll("rect.bandrect").each(function(a){a.yc.y+c.height/2&&(i.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=i.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){a.model.dragX=Do.event.x;var f=e.parcatsViewModel.dimensions[r],v=e.parcatsViewModel.dimensions[n];f!==void 0&&a.model.dragXv.x&&(a.model.displayInd=v.model.displayInd,v.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=a.model.displayInd}tK(e.parcatsViewModel),eK(e.parcatsViewModel),Oje(e.parcatsViewModel),Bje(e.parcatsViewModel)}}function Oer(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Do.select(this).selectAll("text").attr("font-weight","normal");var t={},r=qje(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(v){return v.displayInd}),a=e.initialDragDimensionDisplayInds.some(function(v,g){return v!==n[g]});a&&n.forEach(function(v,g){var p=e.parcatsViewModel.model.dimensions[g].containerInd;t["dimensions["+p+"].displayindex"]=v});var i=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(v){return v.displayInd});if(i=e.initialDragCategoryDisplayInds.some(function(v,g){return v!==o[g]}),i){var s=e.model.categories.slice().sort(function(v,g){return v.displayInd-g.displayInd}),l=s.map(function(v){return v.categoryValue}),u=s.map(function(v){return v.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?Q$(e.potentialClickBand,"plotly_click",Do.event.sourceEvent):J$(e.potentialClickBand,"plotly_click",Do.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,tK(e.parcatsViewModel),eK(e.parcatsViewModel);var f=Do.transition().duration(300).ease("cubic-in-out");f.each(function(){Oje(e.parcatsViewModel,!0),Bje(e.parcatsViewModel,!0)}).each("end",function(){(a||i)&&wer.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function qje(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;l--)u+="C"+o[l]+","+(t[l+1]+n)+" "+i[l]+","+(t[l]+n)+" "+(e[l]+r[l])+","+(t[l]+n),u+="l-"+r[l]+",0 ";return u+="Z",u}function eK(e){var t=e.dimensions,r=e.model,n=t.map(function(R){return R.categories.map(function(B){return B.y})}),a=e.model.dimensions.map(function(R){return R.categories.map(function(B){return B.displayInd})}),i=e.model.dimensions.map(function(R){return R.displayInd}),o=e.dimensions.map(function(R){return R.model.dimensionInd}),s=t.map(function(R){return R.x}),l=t.map(function(R){return R.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(R){var B=R.categoryInds.map(function(V,j){return a[j][V]}),O=o.map(function(V){return B[V]});return O}u.sort(function(R,B){var O=f(R),V=f(B);return e.sortpaths==="backward"&&(O.reverse(),V.reverse()),O.push(R.valueInds[0]),V.push(B.valueInds[0]),e.bundlecolors&&(O.unshift(R.rawColor),V.unshift(B.rawColor)),Mer(O,V)});for(var v=new Array(u.length),g=t[0].model.count,p=t[0].categories.map(function(R){return R.height}).reduce(function(R,B){return R+B}),x=0;x0?y=p*(_.count/g):y=0;for(var C=new Array(n.length),k=0;k<_.categoryInds.length;k++){var S=_.categoryInds[k],L=a[k][S],w=i[k];C[w]=n[w][L],n[w][L]+=y;var A=e.dimensions[w].categories[L],T=A.bands.length,m=A.bands[T-1];if(m===void 0||_.rawColor!==m.rawColor){var F=m===void 0?0:m.y+m.height;A.bands.push({key:F,color:_.color,rawColor:_.rawColor,height:y,width:A.width,count:_.count,y:F,categoryViewModel:A,parcatsViewModel:e})}else{var E=A.bands[T-1];E.height+=y,E.count+=_.count}}var I;e.pathShape==="hspline"?I=Rje(s,C,l,y,.5):I=Rje(s,C,l,y,0),v[x]={key:_.valueInds[0],model:_,height:y,leftXs:s,topYs:C,dimWidths:l,svgD:I,parcatsViewModel:e}}e.paths=v}function tK(e){var t=e.model.dimensions.map(function(o){return{displayInd:o.displayInd,dimensionInd:o.dimensionInd}});t.sort(function(o,s){return o.displayInd-s.displayInd});var r=[];for(var n in t){var a=t[n].dimensionInd,i=e.model.dimensions[a];r.push(Uer(e,i))}e.dimensions=r}function Uer(e,t){var r=40,n=16,a=e.model.dimensions.length,i=t.displayInd,o,s,l;a>1?o=(e.width-2*r-n)/(a-1):o=0,s=r,l=s+o*i;var u=[],c=e.model.maxCats,f=t.categories.length,v=8,g=t.count,p=e.height-v*(c-1),x,_,y,C,k,S=(c-f)*v/2,L=t.categories.map(function(w){return{displayInd:w.displayInd,categoryInd:w.categoryInd}});for(L.sort(function(w,A){return w.displayInd-A.displayInd}),k=0;k0?x=_.count/g*p:x=0,y={key:_.valueInds[0],model:_,width:n,height:x,y:_.dragY!==null?_.dragY:S,bands:[],parcatsViewModel:e},S=S+x+v,u.push(y);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var rK=fe((VAr,Vje)=>{"use strict";var Ver=Uje();Vje.exports=function(t,r,n,a){var i=t._fullLayout,o=i._paper,s=i._size;Ver(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,a)}});var Hje=fe(JF=>{"use strict";var Ger=jf().getModuleCalcData,Her=rK(),Gje="parcats";JF.name=Gje;JF.plot=function(e,t,r,n){var a=Ger(e.calcdata,Gje);if(a.length){var i=a[0];Her(e,i,r,n)}};JF.clean=function(e,t,r,n){var a=n._has&&n._has("parcats"),i=t._has&&t._has("parcats");a&&!i&&n._paperdiv.selectAll(".parcats").remove()}});var Wje=fe((HAr,jje)=>{"use strict";jje.exports={attributes:j$(),supplyDefaults:Lje(),calc:Fje(),plot:rK(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:Hje(),categories:["noOpacity"],meta:{}}});var Xje=fe((jAr,Yje)=>{"use strict";Yje.exports=Wje()});var $je=fe((WAr,Zje)=>{"use strict";Zje.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} @@ -2721,10 +2719,10 @@ void main() { {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}});var cOe=ne((Z1r,uOe)=>{"use strict";uOe.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}});var cy=ne(($1r,pOe)=>{"use strict";var UUt=(By(),vl(qy)).default,VUt=lOe(),GUt=cOe(),HUt='\xA9 OpenStreetMap contributors',fOe="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",hOe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",eF="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",jUt="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",WUt="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",YUt="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",vOe={basic:eF,streets:eF,outdoors:eF,light:fOe,dark:hOe,satellite:GUt,"satellite-streets":VUt,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:HUt,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":fOe,"carto-darkmatter":hOe,"carto-voyager":eF,"carto-positron-nolabels":jUt,"carto-darkmatter-nolabels":WUt,"carto-voyager-nolabels":YUt},dOe=UUt(vOe);pOe.exports={styleValueDflt:"basic",stylesMap:vOe,styleValuesMap:dOe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",dOe.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}});var F6=ne((K1r,bOe)=>{"use strict";var gOe=Zt(),mOe=_a().defaultLine,XUt=zl().attributes,ZUt=pl(),$Ut=Tu().textposition,KUt=Il().overrideAll,JUt=Bo().templatedArray,yOe=cy(),xOe=ZUt({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});xOe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var QUt=bOe.exports=KUt({_arrayAttrRegexps:[gOe.counterRegex("map",".layers",!0)],domain:XUt({name:"map"}),style:{valType:"any",values:yOe.styleValuesMap,dflt:yOe.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:JUt("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:mOe},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:mOe}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:xOe,textposition:gOe.extendFlat({},$Ut,{arrayOk:!1})}})},"plot","from-root");QUt.uirevision={valType:"any",editType:"none"}});var tF=ne((J1r,AOe)=>{"use strict";var{hovertemplateAttrs:eVt,texttemplateAttrs:tVt,templatefallbackAttrs:_Oe}=rs(),rVt=zp(),P6=rw(),Ew=Tu(),wOe=F6(),nVt=os(),aVt=Ys(),D2=ci().extendFlat,iVt=Il().overrideAll,oVt=F6(),TOe=P6.line,kw=P6.marker;AOe.exports=iVt({lon:P6.lon,lat:P6.lat,cluster:{enabled:{valType:"boolean"},maxzoom:D2({},oVt.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:D2({},kw.opacity,{dflt:1})},mode:D2({},Ew.mode,{dflt:"markers"}),text:D2({},Ew.text,{}),texttemplate:tVt({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:_Oe({editType:"plot"}),hovertext:D2({},Ew.hovertext,{}),line:{color:TOe.color,width:TOe.width},connectgaps:Ew.connectgaps,marker:D2({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:kw.opacity,size:kw.size,sizeref:kw.sizeref,sizemin:kw.sizemin,sizemode:kw.sizemode},aVt("marker")),fill:P6.fill,fillcolor:rVt(),textfont:wOe.layers.symbol.textfont,textposition:wOe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:Ew.selected.marker},unselected:{marker:Ew.unselected.marker},hoverinfo:D2({},nVt.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:eVt(),hovertemplatefallback:_Oe()},"calc","nested")});var sY=ne((Q1r,MOe)=>{"use strict";var sVt=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];MOe.exports={isSupportedFont:function(e){return sVt.indexOf(e)!==-1}}});var kOe=ne((egr,EOe)=>{"use strict";var D6=Zt(),lY=ml(),lVt=Kv(),uVt=V0(),cVt=G0(),fVt=Bp(),SOe=tF(),hVt=sY().isSupportedFont;EOe.exports=function(t,r,n,a){function i(g,E){return D6.coerce(t,r,SOe,g,E)}function o(g,E){return D6.coerce2(t,r,SOe,g,E)}var s=dVt(t,r,i);if(!s){r.visible=!1;return}if(i("text"),i("texttemplate"),i("texttemplatefallback"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("mode"),i("below"),lY.hasMarkers(r)){lVt(t,r,n,a,i,{noLine:!0,noAngle:!0}),i("marker.allowoverlap"),i("marker.angle");var l=r.marker;l.symbol!=="circle"&&(D6.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),D6.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}lY.hasLines(r)&&(uVt(t,r,n,a,i,{noDash:!0}),i("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),h=o("cluster.size"),v=o("cluster.opacity"),d=u!==!1||c!==!1||f!==!1||h!==!1||v!==!1,m=i("cluster.enabled",d);if(m||lY.hasText(r)){var x=a.font.family;cVt(t,r,a,i,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:hVt(x)?x:"Open Sans Regular",weight:a.font.weight,style:a.font.style,size:a.font.size,color:a.font.color}})}i("fill"),r.fill!=="none"&&fVt(t,r,n,i),D6.coerceSelectionMarkerOpacity(r,i)};function dVt(e,t,r){var n=r("lon")||[],a=r("lat")||[],i=Math.min(n.length,a.length);return t._length=i,i}});var uY=ne((tgr,LOe)=>{"use strict";var COe=ri();LOe.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot,o=i.mockAxis,s=t.lonlat;return a.lonLabel=COe.tickText(o,o.c2l(s[0]),!0).text,a.latLabel=COe.tickText(o,o.c2l(s[1]),!0).text,a}});var cY=ne((rgr,POe)=>{"use strict";var FOe=Zt();POe.exports=function(t,r){var n=t.split(" "),a=n[0],i=n[1],o=FOe.isArrayOrTypedArray(r)?FOe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(a){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(i){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var BOe=ne((ngr,qOe)=>{"use strict";var IOe=mi(),kh=Zt(),vVt=uo().BADNUM,nF=jA(),DOe=El(),pVt=li(),gVt=U5(),aF=ml(),mVt=sY().isSupportedFont,yVt=cY(),xVt=Hd().appendArrayPointValue,bVt=Ms().NEWLINES,_Vt=Ms().BR_TAG_ALL;qOe.exports=function(t,r){var n=r[0].trace,a=n.visible===!0&&n._length!==0,i=n.fill!=="none",o=aF.hasLines(n),s=aF.hasMarkers(n),l=aF.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,h=rF("fill"),v=rF("line"),d=rF("circle"),m=rF("symbol"),x={fill:h,line:v,circle:d,symbol:m};if(!a)return x;var g;if((i||o)&&(g=nF.calcTraceToLineCoords(r)),i&&(h.geojson=nF.makePolygon(g),h.layout.visibility="visible",kh.extendFlat(h.paint,{"fill-color":n.fillcolor})),o&&(v.geojson=nF.makeLine(g),v.layout.visibility="visible",kh.extendFlat(v.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var E=wVt(r);d.geojson=E.geojson,d.layout.visibility="visible",f&&(d.filter=["!",["has","point_count"]],x.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":hY(n.cluster.color,n.cluster.step),"circle-radius":hY(n.cluster.size,n.cluster.step),"circle-opacity":hY(n.cluster.opacity,n.cluster.step)}},x.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":ROe(n),"text-size":12}}),kh.extendFlat(d.paint,{"circle-color":E.mcc,"circle-radius":E.mrc,"circle-opacity":E.mo})}if(u&&f&&(d.filter=["!",["has","point_count"]]),(c||l)&&(m.geojson=TVt(r,t),kh.extendFlat(m.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),c&&(kh.extendFlat(m.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&kh.extendFlat(m.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),m.layout["icon-allow-overlap"]=n.marker.allowoverlap,kh.extendFlat(m.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color,"icon-halo-color":n.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),l)){var M=(n.marker||{}).size,w=yVt(n.textposition,M);kh.extendFlat(m.layout,{"text-size":n.textfont.size,"text-anchor":w.anchor,"text-offset":w.offset,"text-font":ROe(n)}),kh.extendFlat(m.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return x};function rF(e){return{type:e,geojson:nF.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function wVt(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,a=kh.isArrayOrTypedArray(r.color),i=kh.isArrayOrTypedArray(r.size),o=kh.isArrayOrTypedArray(r.opacity),s;function l(M){return t.opacity*M}function u(M){return M/2}var c;a&&(DOe.hasColorscale(t,"marker")?c=DOe.makeColorScaleFuncFromTrace(r):c=kh.identity);var f;i&&(f=gVt(t));var h;o&&(h=function(M){var w=IOe(M)?+kh.constrain(M,0,1):0;return l(w)});var v=[];for(s=0;s850?s+=" Black":a>750?s+=" Extra Bold":a>650?s+=" Bold":a>550?s+=" Semi Bold":a>450?s+=" Medium":a>350?s+=" Regular":a>250?s+=" Light":a>150?s+=" Extra Light":s+=" Thin"):i.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",a>750?s+=" Extrabold":a>650?s+=" Bold":a>550?s+=" Semibold":a>350?s+=" Regular":s+=" Light"):i.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",i[3]==="CJK"&&(s+=" CJK"),s+=a>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),mVt(s)||(s=r);var l=s.split(", ");return l}});var VOe=ne((agr,UOe)=>{"use strict";var AVt=Zt(),OOe=BOe(),Cw=cy().traceLayerPrefix,x0={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function NOe(e,t,r,n){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:Cw+t+"-fill",line:Cw+t+"-line",circle:Cw+t+"-circle",symbol:Cw+t+"-symbol",cluster:Cw+t+"-cluster",clusterCount:Cw+t+"-cluster-count"},this.below=null}var R6=NOe.prototype;R6.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&AVt.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[e]);a?a.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};R6.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};R6.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var a=this.layerIds[e],i,o=this.subplot.getMapLayers(),s=0;s=0;k--){var y=w[k];a.removeLayer(u.layerIds[y])}M||a.removeSource(u.sourceIds.circle)}function h(M){for(var w=x0.nonCluster,k=0;k=0;k--){var y=w[k];a.removeLayer(u.layerIds[y]),M||a.removeSource(u.sourceIds[y])}}function d(M){l?f(M):v(M)}function m(M){s?c(M):h(M)}function x(){for(var M=s?x0.cluster:x0.nonCluster,w=0;w=0;n--){var a=r[n];t.removeLayer(this.layerIds[a]),t.removeSource(this.sourceIds[a])}};UOe.exports=function(t,r){var n=r[0].trace,a=n.cluster&&n.cluster.enabled,i=n.visible!==!0,o=new NOe(t,n.uid,a,i),s=OOe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(a)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var MVt=cu(),dY=Zt(),SVt=y_(),EVt=dY.fillText,kVt=uo().BADNUM,CVt=cy().traceLayerPrefix;function LVt(e,t,r){var n=e.cd,a=n[0].trace,i=e.xa,o=e.ya,s=e.subplot,l=[],u=CVt+a.uid+"-circle",c=a.cluster&&a.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(T){return T.id})}var h=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),v=h*360,d=t-v;function m(T){var p=T.lonlat;if(p[0]===kVt||c&&l.indexOf(T.i+1)===-1)return 1/0;var C=dY.modHalf(p[0],360),A=p[1],P=s.project([C,A]),D=P.x-i.c2p([d,A]),z=P.y-o.c2p([C,r]),q=Math.max(3,T.mrc||0);return Math.max(Math.sqrt(D*D+z*z)-q,1-3/q)}if(MVt.getClosest(n,m,e),e.index!==!1){var x=n[e.index],g=x.lonlat,E=[dY.modHalf(g[0],360)+v,g[1]],M=i.c2p(E),w=o.c2p(E),k=x.mrc||1;e.x0=M-k,e.x1=M+k,e.y0=w-k,e.y1=w+k;var y={};y[a.subplot]={_subplot:s};var S=a._module.formatLabels(x,a,y);return e.lonLabel=S.lonLabel,e.latLabel=S.latLabel,e.color=SVt(a,x),e.extraText=GOe(a,x,n[0].t.labels),e.hovertemplate=a.hovertemplate,[e]}}function GOe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,a=n.split("+"),i=a.indexOf("all")!==-1,o=a.indexOf("lon")!==-1,s=a.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return i||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(i||a.indexOf("text")!==-1)&&EVt(t,e,u),u.join("
")}HOe.exports={hoverPoints:LVt,getExtraText:GOe}});var WOe=ne((ogr,jOe)=>{"use strict";jOe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var XOe=ne((sgr,YOe)=>{"use strict";var FVt=Zt(),PVt=ml(),DVt=uo().BADNUM;YOe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l;if(!PVt.hasMarkers(s))return[];if(r===!1)for(l=0;l{(function(e,t){typeof vY=="object"&&typeof pY!="undefined"?pY.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(vY,(function(){"use strict";var e={},t={};function r(a,i,o){if(t[a]=o,a==="index"){var s="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",l={};return t.shared(l),t.index(e,l),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],(function(a){"use strict";function i(L,_,F,N){return new(F||(F=Promise))((function(W,J){function ee(Ve){try{Ce(N.next(Ve))}catch(nt){J(nt)}}function me(Ve){try{Ce(N.throw(Ve))}catch(nt){J(nt)}}function Ce(Ve){var nt;Ve.done?W(Ve.value):(nt=Ve.value,nt instanceof F?nt:new F((function(wt){wt(nt)}))).then(ee,me)}Ce((N=N.apply(L,_||[])).next())}))}function o(L){return L&&L.__esModule&&Object.prototype.hasOwnProperty.call(L,"default")?L.default:L}typeof SuppressedError=="function"&&SuppressedError;var s=l;function l(L,_){this.x=L,this.y=_}l.prototype={clone:function(){return new l(this.x,this.y)},add:function(L){return this.clone()._add(L)},sub:function(L){return this.clone()._sub(L)},multByPoint:function(L){return this.clone()._multByPoint(L)},divByPoint:function(L){return this.clone()._divByPoint(L)},mult:function(L){return this.clone()._mult(L)},div:function(L){return this.clone()._div(L)},rotate:function(L){return this.clone()._rotate(L)},rotateAround:function(L,_){return this.clone()._rotateAround(L,_)},matMult:function(L){return this.clone()._matMult(L)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(L){return this.x===L.x&&this.y===L.y},dist:function(L){return Math.sqrt(this.distSqr(L))},distSqr:function(L){var _=L.x-this.x,F=L.y-this.y;return _*_+F*F},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(L){return Math.atan2(this.y-L.y,this.x-L.x)},angleWith:function(L){return this.angleWithSep(L.x,L.y)},angleWithSep:function(L,_){return Math.atan2(this.x*_-this.y*L,this.x*L+this.y*_)},_matMult:function(L){var _=L[2]*this.x+L[3]*this.y;return this.x=L[0]*this.x+L[1]*this.y,this.y=_,this},_add:function(L){return this.x+=L.x,this.y+=L.y,this},_sub:function(L){return this.x-=L.x,this.y-=L.y,this},_mult:function(L){return this.x*=L,this.y*=L,this},_div:function(L){return this.x/=L,this.y/=L,this},_multByPoint:function(L){return this.x*=L.x,this.y*=L.y,this},_divByPoint:function(L){return this.x/=L.x,this.y/=L.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var L=this.y;return this.y=this.x,this.x=-L,this},_rotate:function(L){var _=Math.cos(L),F=Math.sin(L),N=F*this.x+_*this.y;return this.x=_*this.x-F*this.y,this.y=N,this},_rotateAround:function(L,_){var F=Math.cos(L),N=Math.sin(L),W=_.y+N*(this.x-_.x)+F*(this.y-_.y);return this.x=_.x+F*(this.x-_.x)-N*(this.y-_.y),this.y=W,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},l.convert=function(L){return L instanceof l?L:Array.isArray(L)?new l(L[0],L[1]):L};var u=o(s),c=f;function f(L,_,F,N){this.cx=3*L,this.bx=3*(F-L)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*_,this.by=3*(N-_)-this.cy,this.ay=1-this.cy-this.by,this.p1x=L,this.p1y=_,this.p2x=F,this.p2y=N}f.prototype={sampleCurveX:function(L){return((this.ax*L+this.bx)*L+this.cx)*L},sampleCurveY:function(L){return((this.ay*L+this.by)*L+this.cy)*L},sampleCurveDerivativeX:function(L){return(3*this.ax*L+2*this.bx)*L+this.cx},solveCurveX:function(L,_){if(_===void 0&&(_=1e-6),L<0)return 0;if(L>1)return 1;for(var F=L,N=0;N<8;N++){var W=this.sampleCurveX(F)-L;if(Math.abs(W)<_)return F;var J=this.sampleCurveDerivativeX(F);if(Math.abs(J)<1e-6)break;F-=W/J}var ee=0,me=1;for(F=L,N=0;N<20&&(W=this.sampleCurveX(F),!(Math.abs(W-L)<_));N++)L>W?ee=F:me=F,F=.5*(me-ee)+ee;return F},solve:function(L,_){return this.sampleCurveY(this.solveCurveX(L,_))}};var h=o(c);let v,d;function m(){return v==null&&(v=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),v}function x(){if(d==null&&(d=!1,m())){let _=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(_){for(let N=0;N<25;N++){let W=4*N;_.fillStyle=`rgb(${W},${W+1},${W+2})`,_.fillRect(N%5,Math.floor(N/5),1,1)}let F=_.getImageData(0,0,5,5).data;for(let N=0;N<100;N++)if(N%4!=3&&F[N]!==N){d=!0;break}}}return d||!1}function g(L,_,F,N){let W=new h(L,_,F,N);return J=>W.solve(J)}let E=g(.25,.1,.25,1);function M(L,_,F){return Math.min(F,Math.max(_,L))}function w(L,_,F){let N=F-_,W=((L-_)%N+N)%N+_;return W===_?F:W}function k(L,..._){for(let F of _)for(let N in F)L[N]=F[N];return L}let y=1;function S(L,_,F){let N={};for(let W in L)N[W]=_.call(this,L[W],W,L);return N}function T(L,_,F){let N={};for(let W in L)_.call(this,L[W],W,L)&&(N[W]=L[W]);return N}function p(L){return Array.isArray(L)?L.map(p):typeof L=="object"&&L?S(L,p):L}let C={};function A(L){C[L]||(typeof console!="undefined"&&console.warn(L),C[L]=!0)}function P(L,_,F){return(F.y-L.y)*(_.x-L.x)>(_.y-L.y)*(F.x-L.x)}function D(L){return typeof WorkerGlobalScope!="undefined"&&L!==void 0&&L instanceof WorkerGlobalScope}let z=null;function q(L){return typeof ImageBitmap!="undefined"&&L instanceof ImageBitmap}let U="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function O(L,_,F,N,W){return i(this,void 0,void 0,(function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let J=new VideoFrame(L,{timestamp:0});try{let ee=J==null?void 0:J.format;if(!ee||!ee.startsWith("BGR")&&!ee.startsWith("RGB"))throw new Error(`Unrecognized format ${ee}`);let me=ee.startsWith("BGR"),Ce=new Uint8ClampedArray(N*W*4);if(yield J.copyTo(Ce,(function(Ve,nt,wt,Ct,Rt){let jt=4*Math.max(-nt,0),Qt=(Math.max(0,wt)-wt)*Ct*4+jt,Ar=4*Ct,Pr=Math.max(0,nt),gn=Math.max(0,wt);return{rect:{x:Pr,y:gn,width:Math.min(Ve.width,nt+Ct)-Pr,height:Math.min(Ve.height,wt+Rt)-gn},layout:[{offset:Qt,stride:Ar}]}})(L,_,F,N,W)),me)for(let Ve=0;VeD(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,fe=function(L,_){if(/:\/\//.test(L.url)&&!/^https?:|^file:/.test(L.url)){let N=se(L.url);if(N)return N(L,_);if(D(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:L,targetMapId:ue},_)}if(!(/^file:/.test(F=L.url)||/^file:/.test(j())&&!/^\w+:/.test(F))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return(function(N,W){return i(this,void 0,void 0,(function*(){let J=new Request(N.url,{method:N.method||"GET",body:N.body,credentials:N.credentials,headers:N.headers,cache:N.cache,referrer:j(),signal:W.signal});N.type!=="json"||J.headers.has("Accept")||J.headers.set("Accept","application/json");let ee=yield fetch(J);if(!ee.ok){let Ve=yield ee.blob();throw new re(ee.status,ee.statusText,N.url,Ve)}let me;me=N.type==="arrayBuffer"||N.type==="image"?ee.arrayBuffer():N.type==="json"?ee.json():ee.text();let Ce=yield me;if(W.signal.aborted)throw X();return{data:Ce,cacheControl:ee.headers.get("Cache-Control"),expires:ee.headers.get("Expires")}}))})(L,_);if(D(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:L,mustQueue:!0,targetMapId:ue},_)}var F;return(function(N,W){return new Promise(((J,ee)=>{var me;let Ce=new XMLHttpRequest;Ce.open(N.method||"GET",N.url,!0),N.type!=="arrayBuffer"&&N.type!=="image"||(Ce.responseType="arraybuffer");for(let Ve in N.headers)Ce.setRequestHeader(Ve,N.headers[Ve]);N.type==="json"&&(Ce.responseType="text",!((me=N.headers)===null||me===void 0)&&me.Accept||Ce.setRequestHeader("Accept","application/json")),Ce.withCredentials=N.credentials==="include",Ce.onerror=()=>{ee(new Error(Ce.statusText))},Ce.onload=()=>{if(!W.signal.aborted)if((Ce.status>=200&&Ce.status<300||Ce.status===0)&&Ce.response!==null){let Ve=Ce.response;if(N.type==="json")try{Ve=JSON.parse(Ce.response)}catch(nt){return void ee(nt)}J({data:Ve,cacheControl:Ce.getResponseHeader("Cache-Control"),expires:Ce.getResponseHeader("Expires")})}else{let Ve=new Blob([Ce.response],{type:Ce.getResponseHeader("Content-Type")});ee(new re(Ce.status,Ce.statusText,N.url,Ve))}},W.signal.addEventListener("abort",(()=>{Ce.abort(),ee(X())})),Ce.send(N.body)}))})(L,_)};function ce(L){if(!L||L.indexOf("://")<=0||L.indexOf("data:image/")===0||L.indexOf("blob:")===0)return!0;let _=new URL(L),F=window.location;return _.protocol===F.protocol&&_.host===F.host}function oe(L,_,F){F[L]&&F[L].indexOf(_)!==-1||(F[L]=F[L]||[],F[L].push(_))}function we(L,_,F){if(F&&F[L]){let N=F[L].indexOf(_);N!==-1&&F[L].splice(N,1)}}class he{constructor(_,F={}){k(this,F),this.type=_}}class ye extends he{constructor(_,F={}){super("error",k({error:_},F))}}class Pe{on(_,F){return this._listeners=this._listeners||{},oe(_,F,this._listeners),this}off(_,F){return we(_,F,this._listeners),we(_,F,this._oneTimeListeners),this}once(_,F){return F?(this._oneTimeListeners=this._oneTimeListeners||{},oe(_,F,this._oneTimeListeners),this):new Promise((N=>this.once(_,N)))}fire(_,F){typeof _=="string"&&(_=new he(_,F||{}));let N=_.type;if(this.listens(N)){_.target=this;let W=this._listeners&&this._listeners[N]?this._listeners[N].slice():[];for(let me of W)me.call(this,_);let J=this._oneTimeListeners&&this._oneTimeListeners[N]?this._oneTimeListeners[N].slice():[];for(let me of J)we(N,me,this._oneTimeListeners),me.call(this,_);let ee=this._eventedParent;ee&&(k(_,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),ee.fire(_))}else _ instanceof ye&&console.error(_.error);return this}listens(_){return this._listeners&&this._listeners[_]&&this._listeners[_].length>0||this._oneTimeListeners&&this._oneTimeListeners[_]&&this._oneTimeListeners[_].length>0||this._eventedParent&&this._eventedParent.listens(_)}setEventedParent(_,F){return this._eventedParent=_,this._eventedParentData=F,this}}var le={$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"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let ze=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Xe(L,_){let F={};for(let N in L)N!=="ref"&&(F[N]=L[N]);return ze.forEach((N=>{N in _&&(F[N]=_[N])})),F}function vt(L,_){if(Array.isArray(L)){if(!Array.isArray(_)||L.length!==_.length)return!1;for(let F=0;F`:L.itemType.kind==="value"?"array":`array<${_}>`}return L.kind}let Ae=[ft,He,Qe,We,pt,_r,kt,Te(qt),tr,lr,Ye];function Re(L,_){if(_.kind==="error")return null;if(L.kind==="array"){if(_.kind==="array"&&(_.N===0&&_.itemType.kind==="value"||!Re(L.itemType,_.itemType))&&(typeof L.N!="number"||L.N===_.N))return null}else{if(L.kind===_.kind)return null;if(L.kind==="value"){for(let F of Ae)if(!Re(F,_))return null}}return`Expected ${Fe(L)} but found ${Fe(_)} instead.`}function Ze(L,_){return _.some((F=>F.kind===L.kind))}function Ke(L,_){return _.some((F=>F==="null"?L===null:F==="array"?Array.isArray(L):F==="object"?L&&!Array.isArray(L)&&typeof L=="object":F===typeof L))}function _t(L,_){return L.kind==="array"&&_.kind==="array"?L.itemType.kind===_.itemType.kind&&typeof L.N=="number":L.kind===_.kind}let St=.96422,Vt=.82521,fr=4/29,$t=6/29,gr=3*$t*$t,Br=$t*$t*$t,Nr=Math.PI/180,Er=180/Math.PI;function zr(L){return(L%=360)<0&&(L+=360),L}function vn([L,_,F,N]){let W,J,ee=Xn((.2225045*(L=Nn(L))+.7168786*(_=Nn(_))+.0606169*(F=Nn(F)))/1);L===_&&_===F?W=J=ee:(W=Xn((.4360747*L+.3850649*_+.1430804*F)/St),J=Xn((.0139322*L+.0971045*_+.7141733*F)/Vt));let me=116*ee-16;return[me<0?0:me,500*(W-ee),200*(ee-J),N]}function Nn(L){return L<=.04045?L/12.92:Math.pow((L+.055)/1.055,2.4)}function Xn(L){return L>Br?Math.pow(L,1/3):L/gr+fr}function Kn([L,_,F,N]){let W=(L+16)/116,J=isNaN(_)?W:W+_/500,ee=isNaN(F)?W:W-F/200;return W=1*un(W),J=St*un(J),ee=Vt*un(ee),[Qn(3.1338561*J-1.6168667*W-.4906146*ee),Qn(-.9787684*J+1.9161415*W+.033454*ee),Qn(.0719453*J-.2289914*W+1.4052427*ee),N]}function Qn(L){return(L=L<=.00304?12.92*L:1.055*Math.pow(L,1/2.4)-.055)<0?0:L>1?1:L}function un(L){return L>$t?L*L*L:gr*(L-fr)}function aa(L){return parseInt(L.padEnd(2,L),16)/255}function da(L,_){return ua(_?L/100:L,0,1)}function ua(L,_,F){return Math.min(Math.max(_,L),F)}function qa(L){return!L.some(Number.isNaN)}let ii={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]};class pa{constructor(_,F,N,W=1,J=!0){this.r=_,this.g=F,this.b=N,this.a=W,J||(this.r*=W,this.g*=W,this.b*=W,W||this.overwriteGetter("rgb",[_,F,N,W]))}static parse(_){if(_ instanceof pa)return _;if(typeof _!="string")return;let F=(function(N){if((N=N.toLowerCase().trim())==="transparent")return[0,0,0,0];let W=ii[N];if(W){let[ee,me,Ce]=W;return[ee/255,me/255,Ce/255,1]}if(N.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(N)){let ee=N.length<6?1:2,me=1;return[aa(N.slice(me,me+=ee)),aa(N.slice(me,me+=ee)),aa(N.slice(me,me+=ee)),aa(N.slice(me,me+ee)||"ff")]}if(N.startsWith("rgb")){let ee=N.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ee){let[me,Ce,Ve,nt,wt,Ct,Rt,jt,Qt,Ar,Pr,gn]=ee,Yr=[nt||" ",Rt||" ",Ar].join("");if(Yr===" "||Yr===" /"||Yr===",,"||Yr===",,,"){let ln=[Ve,Ct,Qt].join(""),Bn=ln==="%%%"?100:ln===""?255:0;if(Bn){let ga=[ua(+Ce/Bn,0,1),ua(+wt/Bn,0,1),ua(+jt/Bn,0,1),Pr?da(+Pr,gn):1];if(qa(ga))return ga}}return}}let J=N.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(J){let[ee,me,Ce,Ve,nt,wt,Ct,Rt,jt]=J,Qt=[Ce||" ",nt||" ",Ct].join("");if(Qt===" "||Qt===" /"||Qt===",,"||Qt===",,,"){let Ar=[+me,ua(+Ve,0,100),ua(+wt,0,100),Rt?da(+Rt,jt):1];if(qa(Ar))return(function([Pr,gn,Yr,ln]){function Bn(ga){let Za=(ga+Pr/30)%12,Ii=gn*Math.min(Yr,1-Yr);return Yr-Ii*Math.max(-1,Math.min(Za-3,9-Za,1))}return Pr=zr(Pr),gn/=100,Yr/=100,[Bn(0),Bn(8),Bn(4),ln]})(Ar)}}})(_);return F?new pa(...F,!1):void 0}get rgb(){let{r:_,g:F,b:N,a:W}=this,J=W||1/0;return this.overwriteGetter("rgb",[_/J,F/J,N/J,W])}get hcl(){return this.overwriteGetter("hcl",(function(_){let[F,N,W,J]=vn(_),ee=Math.sqrt(N*N+W*W);return[Math.round(1e4*ee)?zr(Math.atan2(W,N)*Er):NaN,ee,F,J]})(this.rgb))}get lab(){return this.overwriteGetter("lab",vn(this.rgb))}overwriteGetter(_,F){return Object.defineProperty(this,_,{value:F}),F}toString(){let[_,F,N,W]=this.rgb;return`rgba(${[_,F,N].map((J=>Math.round(255*J))).join(",")},${W})`}}pa.black=new pa(0,0,0,1),pa.white=new pa(1,1,1,1),pa.transparent=new pa(0,0,0,0),pa.red=new pa(1,0,0,1);class no{constructor(_,F,N){this.sensitivity=_?F?"variant":"case":F?"accent":"base",this.locale=N,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(_,F){return this.collator.compare(_,F)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Gi{constructor(_,F,N,W,J){this.text=_,this.image=F,this.scale=N,this.fontStack=W,this.textColor=J}}class Ti{constructor(_){this.sections=_}static fromString(_){return new Ti([new Gi(_,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some((_=>_.text.length!==0||_.image&&_.image.name.length!==0))}static factory(_){return _ instanceof Ti?_:Ti.fromString(_)}toString(){return this.sections.length===0?"":this.sections.map((_=>_.text)).join("")}}class fi{constructor(_){this.values=_.slice()}static parse(_){if(_ instanceof fi)return _;if(typeof _=="number")return new fi([_,_,_,_]);if(Array.isArray(_)&&!(_.length<1||_.length>4)){for(let F of _)if(typeof F!="number")return;switch(_.length){case 1:_=[_[0],_[0],_[0],_[0]];break;case 2:_=[_[0],_[1],_[0],_[1]];break;case 3:_=[_[0],_[1],_[2],_[1]]}return new fi(_)}}toString(){return JSON.stringify(this.values)}}let _o=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class Oi{constructor(_){this.values=_.slice()}static parse(_){if(_ instanceof Oi)return _;if(Array.isArray(_)&&!(_.length<1)&&_.length%2==0){for(let F=0;F<_.length;F+=2){let N=_[F],W=_[F+1];if(typeof N!="string"||!_o.has(N)||!Array.isArray(W)||W.length!==2||typeof W[0]!="number"||typeof W[1]!="number")return}return new Oi(_)}}toString(){return JSON.stringify(this.values)}}class ni{constructor(_){this.name=_.name,this.available=_.available}toString(){return this.name}static fromString(_){return _?new ni({name:_,available:!1}):null}}function ao(L,_,F,N){return typeof L=="number"&&L>=0&&L<=255&&typeof _=="number"&&_>=0&&_<=255&&typeof F=="number"&&F>=0&&F<=255?N===void 0||typeof N=="number"&&N>=0&&N<=1?null:`Invalid rgba value [${[L,_,F,N].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof N=="number"?[L,_,F,N]:[L,_,F]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Hi(L){if(L===null||typeof L=="string"||typeof L=="boolean"||typeof L=="number"||L instanceof pa||L instanceof no||L instanceof Ti||L instanceof fi||L instanceof Oi||L instanceof ni)return!0;if(Array.isArray(L)){for(let _ of L)if(!Hi(_))return!1;return!0}if(typeof L=="object"){for(let _ in L)if(!Hi(L[_]))return!1;return!0}return!1}function to(L){if(L===null)return ft;if(typeof L=="string")return Qe;if(typeof L=="boolean")return We;if(typeof L=="number")return He;if(L instanceof pa)return pt;if(L instanceof no)return Wt;if(L instanceof Ti)return _r;if(L instanceof fi)return tr;if(L instanceof Oi)return Ye;if(L instanceof ni)return lr;if(Array.isArray(L)){let _=L.length,F;for(let N of L){let W=to(N);if(F){if(F===W)continue;F=qt;break}F=W}return Te(F||qt,_)}return kt}function Xo(L){let _=typeof L;return L===null?"":_==="string"||_==="number"||_==="boolean"?String(L):L instanceof pa||L instanceof Ti||L instanceof fi||L instanceof Oi||L instanceof ni?L.toString():JSON.stringify(L)}class Zo{constructor(_,F){this.type=_,this.value=F}static parse(_,F){if(_.length!==2)return F.error(`'literal' expression requires exactly one argument, but found ${_.length-1} instead.`);if(!Hi(_[1]))return F.error("invalid value");let N=_[1],W=to(N),J=F.expectedType;return W.kind!=="array"||W.N!==0||!J||J.kind!=="array"||typeof J.N=="number"&&J.N!==0||(W=J),new Zo(W,N)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class Fi{constructor(_){this.name="ExpressionEvaluationError",this.message=_}toJSON(){return this.message}}let yo={string:Qe,number:He,boolean:We,object:kt};class oo{constructor(_,F){this.type=_,this.args=F}static parse(_,F){if(_.length<2)return F.error("Expected at least one argument.");let N,W=1,J=_[0];if(J==="array"){let me,Ce;if(_.length>2){let Ve=_[1];if(typeof Ve!="string"||!(Ve in yo)||Ve==="object")return F.error('The item type argument of "array" must be one of string, number, boolean',1);me=yo[Ve],W++}else me=qt;if(_.length>3){if(_[2]!==null&&(typeof _[2]!="number"||_[2]<0||_[2]!==Math.floor(_[2])))return F.error('The length argument to "array" must be a positive integer literal',2);Ce=_[2],W++}N=Te(me,Ce)}else{if(!yo[J])throw new Error(`Types doesn't contain name = ${J}`);N=yo[J]}let ee=[];for(;W<_.length;W++){let me=F.parse(_[W],W,qt);if(!me)return null;ee.push(me)}return new oo(N,ee)}evaluate(_){for(let F=0;F_.outputDefined()))}}let rl={"to-boolean":We,"to-color":pt,"to-number":He,"to-string":Qe};class Ni{constructor(_,F){this.type=_,this.args=F}static parse(_,F){if(_.length<2)return F.error("Expected at least one argument.");let N=_[0];if(!rl[N])throw new Error(`Can't parse ${N} as it is not part of the known types`);if((N==="to-boolean"||N==="to-string")&&_.length!==2)return F.error("Expected one argument.");let W=rl[N],J=[];for(let ee=1;ee<_.length;ee++){let me=F.parse(_[ee],ee,qt);if(!me)return null;J.push(me)}return new Ni(W,J)}evaluate(_){switch(this.type.kind){case"boolean":return!!this.args[0].evaluate(_);case"color":{let F,N;for(let W of this.args){if(F=W.evaluate(_),N=null,F instanceof pa)return F;if(typeof F=="string"){let J=_.parseColor(F);if(J)return J}else if(Array.isArray(F)&&(N=F.length<3||F.length>4?`Invalid rbga value ${JSON.stringify(F)}: expected an array containing either three or four numeric values.`:ao(F[0],F[1],F[2],F[3]),!N))return new pa(F[0]/255,F[1]/255,F[2]/255,F[3])}throw new Fi(N||`Could not parse color from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"padding":{let F;for(let N of this.args){F=N.evaluate(_);let W=fi.parse(F);if(W)return W}throw new Fi(`Could not parse padding from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"variableAnchorOffsetCollection":{let F;for(let N of this.args){F=N.evaluate(_);let W=Oi.parse(F);if(W)return W}throw new Fi(`Could not parse variableAnchorOffsetCollection from value '${typeof F=="string"?F:JSON.stringify(F)}'`)}case"number":{let F=null;for(let N of this.args){if(F=N.evaluate(_),F===null)return 0;let W=Number(F);if(!isNaN(W))return W}throw new Fi(`Could not convert ${JSON.stringify(F)} to number.`)}case"formatted":return Ti.fromString(Xo(this.args[0].evaluate(_)));case"resolvedImage":return ni.fromString(Xo(this.args[0].evaluate(_)));default:return Xo(this.args[0].evaluate(_))}}eachChild(_){this.args.forEach(_)}outputDefined(){return this.args.every((_=>_.outputDefined()))}}let Oa=["Unknown","Point","LineString","Polygon"];class xi{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Oa[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(_){let F=this._parseColorCache[_];return F||(F=this._parseColorCache[_]=pa.parse(_)),F}}class Pi{constructor(_,F,N=[],W,J=new tt,ee=[]){this.registry=_,this.path=N,this.key=N.map((me=>`[${me}]`)).join(""),this.scope=J,this.errors=ee,this.expectedType=W,this._isConstant=F}parse(_,F,N,W,J={}){return F?this.concat(F,N,W)._parse(_,J):this._parse(_,J)}_parse(_,F){function N(W,J,ee){return ee==="assert"?new oo(J,[W]):ee==="coerce"?new Ni(J,[W]):W}if(_!==null&&typeof _!="string"&&typeof _!="boolean"&&typeof _!="number"||(_=["literal",_]),Array.isArray(_)){if(_.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let W=_[0];if(typeof W!="string")return this.error(`Expression name must be a string, but found ${typeof W} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let J=this.registry[W];if(J){let ee=J.parse(_,this);if(!ee)return null;if(this.expectedType){let me=this.expectedType,Ce=ee.type;if(me.kind!=="string"&&me.kind!=="number"&&me.kind!=="boolean"&&me.kind!=="object"&&me.kind!=="array"||Ce.kind!=="value")if(me.kind!=="color"&&me.kind!=="formatted"&&me.kind!=="resolvedImage"||Ce.kind!=="value"&&Ce.kind!=="string")if(me.kind!=="padding"||Ce.kind!=="value"&&Ce.kind!=="number"&&Ce.kind!=="array")if(me.kind!=="variableAnchorOffsetCollection"||Ce.kind!=="value"&&Ce.kind!=="array"){if(this.checkSubtype(me,Ce))return null}else ee=N(ee,me,F.typeAnnotation||"coerce");else ee=N(ee,me,F.typeAnnotation||"coerce");else ee=N(ee,me,F.typeAnnotation||"coerce");else ee=N(ee,me,F.typeAnnotation||"assert")}if(!(ee instanceof Zo)&&ee.type.kind!=="resolvedImage"&&this._isConstant(ee)){let me=new xi;try{ee=new Zo(ee.type,ee.evaluate(me))}catch(Ce){return this.error(Ce.message),null}}return ee}return this.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(_===void 0?"'undefined' value invalid. Use null instead.":typeof _=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof _} instead.`)}concat(_,F,N){let W=typeof _=="number"?this.path.concat(_):this.path,J=N?this.scope.concat(N):this.scope;return new Pi(this.registry,this._isConstant,W,F||null,J,this.errors)}error(_,...F){let N=`${this.key}${F.map((W=>`[${W}]`)).join("")}`;this.errors.push(new Ge(N,_))}checkSubtype(_,F){let N=Re(_,F);return N&&this.error(N),N}}class ia{constructor(_,F){this.type=F.type,this.bindings=[].concat(_),this.result=F}evaluate(_){return this.result.evaluate(_)}eachChild(_){for(let F of this.bindings)_(F[1]);_(this.result)}static parse(_,F){if(_.length<4)return F.error(`Expected at least 3 arguments, but found ${_.length-1} instead.`);let N=[];for(let J=1;J<_.length-1;J+=2){let ee=_[J];if(typeof ee!="string")return F.error(`Expected string, but found ${typeof ee} instead.`,J);if(/[^a-zA-Z0-9_]/.test(ee))return F.error("Variable names must contain only alphanumeric characters or '_'.",J);let me=F.parse(_[J+1],J+1);if(!me)return null;N.push([ee,me])}let W=F.parse(_[_.length-1],_.length-1,F.expectedType,N);return W?new ia(N,W):null}outputDefined(){return this.result.outputDefined()}}class rt{constructor(_,F){this.type=F.type,this.name=_,this.boundExpression=F}static parse(_,F){if(_.length!==2||typeof _[1]!="string")return F.error("'var' expression requires exactly one string literal argument.");let N=_[1];return F.scope.has(N)?new rt(N,F.scope.get(N)):F.error(`Unknown variable "${N}". Make sure "${N}" has been bound in an enclosing "let" expression before using it.`,1)}evaluate(_){return this.boundExpression.evaluate(_)}eachChild(){}outputDefined(){return!1}}class Xt{constructor(_,F,N){this.type=_,this.index=F,this.input=N}static parse(_,F){if(_.length!==3)return F.error(`Expected 2 arguments, but found ${_.length-1} instead.`);let N=F.parse(_[1],1,He),W=F.parse(_[2],2,Te(F.expectedType||qt));return N&&W?new Xt(W.type.itemType,N,W):null}evaluate(_){let F=this.index.evaluate(_),N=this.input.evaluate(_);if(F<0)throw new Fi(`Array index out of bounds: ${F} < 0.`);if(F>=N.length)throw new Fi(`Array index out of bounds: ${F} > ${N.length-1}.`);if(F!==Math.floor(F))throw new Fi(`Array index must be an integer, but found ${F} instead.`);return N[F]}eachChild(_){_(this.index),_(this.input)}outputDefined(){return!1}}class xr{constructor(_,F){this.type=We,this.needle=_,this.haystack=F}static parse(_,F){if(_.length!==3)return F.error(`Expected 2 arguments, but found ${_.length-1} instead.`);let N=F.parse(_[1],1,qt),W=F.parse(_[2],2,qt);return N&&W?Ze(N.type,[We,Qe,He,ft,qt])?new xr(N,W):F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(N.type)} instead`):null}evaluate(_){let F=this.needle.evaluate(_),N=this.haystack.evaluate(_);if(!N)return!1;if(!Ke(F,["boolean","string","number","null"]))throw new Fi(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(to(F))} instead.`);if(!Ke(N,["string","array"]))throw new Fi(`Expected second argument to be of type array or string, but found ${Fe(to(N))} instead.`);return N.indexOf(F)>=0}eachChild(_){_(this.needle),_(this.haystack)}outputDefined(){return!0}}class Fr{constructor(_,F,N){this.type=He,this.needle=_,this.haystack=F,this.fromIndex=N}static parse(_,F){if(_.length<=2||_.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${_.length-1} instead.`);let N=F.parse(_[1],1,qt),W=F.parse(_[2],2,qt);if(!N||!W)return null;if(!Ze(N.type,[We,Qe,He,ft,qt]))return F.error(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(N.type)} instead`);if(_.length===4){let J=F.parse(_[3],3,He);return J?new Fr(N,W,J):null}return new Fr(N,W)}evaluate(_){let F=this.needle.evaluate(_),N=this.haystack.evaluate(_);if(!Ke(F,["boolean","string","number","null"]))throw new Fi(`Expected first argument to be of type boolean, string, number or null, but found ${Fe(to(F))} instead.`);let W;if(this.fromIndex&&(W=this.fromIndex.evaluate(_)),Ke(N,["string"])){let J=N.indexOf(F,W);return J===-1?-1:[...N.slice(0,J)].length}if(Ke(N,["array"]))return N.indexOf(F,W);throw new Fi(`Expected second argument to be of type array or string, but found ${Fe(to(N))} instead.`)}eachChild(_){_(this.needle),_(this.haystack),this.fromIndex&&_(this.fromIndex)}outputDefined(){return!1}}class xn{constructor(_,F,N,W,J,ee){this.inputType=_,this.type=F,this.input=N,this.cases=W,this.outputs=J,this.otherwise=ee}static parse(_,F){if(_.length<5)return F.error(`Expected at least 4 arguments, but found only ${_.length-1}.`);if(_.length%2!=1)return F.error("Expected an even number of arguments.");let N,W;F.expectedType&&F.expectedType.kind!=="value"&&(W=F.expectedType);let J={},ee=[];for(let Ve=2;Ve<_.length-1;Ve+=2){let nt=_[Ve],wt=_[Ve+1];Array.isArray(nt)||(nt=[nt]);let Ct=F.concat(Ve);if(nt.length===0)return Ct.error("Expected at least one branch label.");for(let jt of nt){if(typeof jt!="number"&&typeof jt!="string")return Ct.error("Branch labels must be numbers or strings.");if(typeof jt=="number"&&Math.abs(jt)>Number.MAX_SAFE_INTEGER)return Ct.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof jt=="number"&&Math.floor(jt)!==jt)return Ct.error("Numeric branch labels must be integer values.");if(N){if(Ct.checkSubtype(N,to(jt)))return null}else N=to(jt);if(J[String(jt)]!==void 0)return Ct.error("Branch labels must be unique.");J[String(jt)]=ee.length}let Rt=F.parse(wt,Ve,W);if(!Rt)return null;W=W||Rt.type,ee.push(Rt)}let me=F.parse(_[1],1,qt);if(!me)return null;let Ce=F.parse(_[_.length-1],_.length-1,W);return Ce?me.type.kind!=="value"&&F.concat(1).checkSubtype(N,me.type)?null:new xn(N,W,me,J,ee,Ce):null}evaluate(_){let F=this.input.evaluate(_);return(to(F)===this.inputType&&this.outputs[this.cases[F]]||this.otherwise).evaluate(_)}eachChild(_){_(this.input),this.outputs.forEach(_),_(this.otherwise)}outputDefined(){return this.outputs.every((_=>_.outputDefined()))&&this.otherwise.outputDefined()}}class Mn{constructor(_,F,N){this.type=_,this.branches=F,this.otherwise=N}static parse(_,F){if(_.length<4)return F.error(`Expected at least 3 arguments, but found only ${_.length-1}.`);if(_.length%2!=0)return F.error("Expected an odd number of arguments.");let N;F.expectedType&&F.expectedType.kind!=="value"&&(N=F.expectedType);let W=[];for(let ee=1;ee<_.length-1;ee+=2){let me=F.parse(_[ee],ee,We);if(!me)return null;let Ce=F.parse(_[ee+1],ee+1,N);if(!Ce)return null;W.push([me,Ce]),N=N||Ce.type}let J=F.parse(_[_.length-1],_.length-1,N);if(!J)return null;if(!N)throw new Error("Can't infer output type");return new Mn(N,W,J)}evaluate(_){for(let[F,N]of this.branches)if(F.evaluate(_))return N.evaluate(_);return this.otherwise.evaluate(_)}eachChild(_){for(let[F,N]of this.branches)_(F),_(N);_(this.otherwise)}outputDefined(){return this.branches.every((([_,F])=>F.outputDefined()))&&this.otherwise.outputDefined()}}class Rn{constructor(_,F,N,W){this.type=_,this.input=F,this.beginIndex=N,this.endIndex=W}static parse(_,F){if(_.length<=2||_.length>=5)return F.error(`Expected 3 or 4 arguments, but found ${_.length-1} instead.`);let N=F.parse(_[1],1,qt),W=F.parse(_[2],2,He);if(!N||!W)return null;if(!Ze(N.type,[Te(qt),Qe,qt]))return F.error(`Expected first argument to be of type array or string, but found ${Fe(N.type)} instead`);if(_.length===4){let J=F.parse(_[3],3,He);return J?new Rn(N.type,N,W,J):null}return new Rn(N.type,N,W)}evaluate(_){let F=this.input.evaluate(_),N=this.beginIndex.evaluate(_),W;if(this.endIndex&&(W=this.endIndex.evaluate(_)),Ke(F,["string"]))return[...F].slice(N,W).join("");if(Ke(F,["array"]))return F.slice(N,W);throw new Fi(`Expected first argument to be of type array or string, but found ${Fe(to(F))} instead.`)}eachChild(_){_(this.input),_(this.beginIndex),this.endIndex&&_(this.endIndex)}outputDefined(){return!1}}function on(L,_){let F=L.length-1,N,W,J=0,ee=F,me=0;for(;J<=ee;)if(me=Math.floor((J+ee)/2),N=L[me],W=L[me+1],N<=_){if(me===F||__))throw new Fi("Input is not a number.");ee=me-1}return 0}class En{constructor(_,F,N){this.type=_,this.input=F,this.labels=[],this.outputs=[];for(let[W,J]of N)this.labels.push(W),this.outputs.push(J)}static parse(_,F){if(_.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${_.length-1}.`);if((_.length-1)%2!=0)return F.error("Expected an even number of arguments.");let N=F.parse(_[1],1,He);if(!N)return null;let W=[],J=null;F.expectedType&&F.expectedType.kind!=="value"&&(J=F.expectedType);for(let ee=1;ee<_.length;ee+=2){let me=ee===1?-1/0:_[ee],Ce=_[ee+1],Ve=ee,nt=ee+1;if(typeof me!="number")return F.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Ve);if(W.length&&W[W.length-1][0]>=me)return F.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Ve);let wt=F.parse(Ce,nt,J);if(!wt)return null;J=J||wt.type,W.push([me,wt])}return new En(J,N,W)}evaluate(_){let F=this.labels,N=this.outputs;if(F.length===1)return N[0].evaluate(_);let W=this.input.evaluate(_);if(W<=F[0])return N[0].evaluate(_);let J=F.length;return W>=F[J-1]?N[J-1].evaluate(_):N[on(F,W)].evaluate(_)}eachChild(_){_(this.input);for(let F of this.outputs)_(F)}outputDefined(){return this.outputs.every((_=>_.outputDefined()))}}function Aa(L){return L&&L.__esModule&&Object.prototype.hasOwnProperty.call(L,"default")?L.default:L}var ba=Ia;function Ia(L,_,F,N){this.cx=3*L,this.bx=3*(F-L)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*_,this.by=3*(N-_)-this.cy,this.ay=1-this.cy-this.by,this.p1x=L,this.p1y=_,this.p2x=F,this.p2y=N}Ia.prototype={sampleCurveX:function(L){return((this.ax*L+this.bx)*L+this.cx)*L},sampleCurveY:function(L){return((this.ay*L+this.by)*L+this.cy)*L},sampleCurveDerivativeX:function(L){return(3*this.ax*L+2*this.bx)*L+this.cx},solveCurveX:function(L,_){if(_===void 0&&(_=1e-6),L<0)return 0;if(L>1)return 1;for(var F=L,N=0;N<8;N++){var W=this.sampleCurveX(F)-L;if(Math.abs(W)<_)return F;var J=this.sampleCurveDerivativeX(F);if(Math.abs(J)<1e-6)break;F-=W/J}var ee=0,me=1;for(F=L,N=0;N<20&&(W=this.sampleCurveX(F),!(Math.abs(W-L)<_));N++)L>W?ee=F:me=F,F=.5*(me-ee)+ee;return F},solve:function(L,_){return this.sampleCurveY(this.solveCurveX(L,_))}};var hi=Aa(ba);function ki(L,_,F){return L+F*(_-L)}function ui(L,_,F){return L.map(((N,W)=>ki(N,_[W],F)))}let Mi={number:ki,color:function(L,_,F,N="rgb"){switch(N){case"rgb":{let[W,J,ee,me]=ui(L.rgb,_.rgb,F);return new pa(W,J,ee,me,!1)}case"hcl":{let[W,J,ee,me]=L.hcl,[Ce,Ve,nt,wt]=_.hcl,Ct,Rt;if(isNaN(W)||isNaN(Ce))isNaN(W)?isNaN(Ce)?Ct=NaN:(Ct=Ce,ee!==1&&ee!==0||(Rt=Ve)):(Ct=W,nt!==1&&nt!==0||(Rt=J));else{let gn=Ce-W;Ce>W&&gn>180?gn-=360:Ce180&&(gn+=360),Ct=W+F*gn}let[jt,Qt,Ar,Pr]=(function([gn,Yr,ln,Bn]){return gn=isNaN(gn)?0:gn*Nr,Kn([ln,Math.cos(gn)*Yr,Math.sin(gn)*Yr,Bn])})([Ct,Rt!=null?Rt:ki(J,Ve,F),ki(ee,nt,F),ki(me,wt,F)]);return new pa(jt,Qt,Ar,Pr,!1)}case"lab":{let[W,J,ee,me]=Kn(ui(L.lab,_.lab,F));return new pa(W,J,ee,me,!1)}}},array:ui,padding:function(L,_,F){return new fi(ui(L.values,_.values,F))},variableAnchorOffsetCollection:function(L,_,F){let N=L.values,W=_.values;if(N.length!==W.length)throw new Fi(`Cannot interpolate values of different length. from: ${L.toString()}, to: ${_.toString()}`);let J=[];for(let ee=0;eetypeof nt!="number"||nt<0||nt>1)))return F.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);W={name:"cubic-bezier",controlPoints:Ve}}}if(_.length-1<4)return F.error(`Expected at least 4 arguments, but found only ${_.length-1}.`);if((_.length-1)%2!=0)return F.error("Expected an even number of arguments.");if(J=F.parse(J,2,He),!J)return null;let me=[],Ce=null;N==="interpolate-hcl"||N==="interpolate-lab"?Ce=pt:F.expectedType&&F.expectedType.kind!=="value"&&(Ce=F.expectedType);for(let Ve=0;Ve=nt)return F.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Ct);let jt=F.parse(wt,Rt,Ce);if(!jt)return null;Ce=Ce||jt.type,me.push([nt,jt])}return _t(Ce,He)||_t(Ce,pt)||_t(Ce,tr)||_t(Ce,Ye)||_t(Ce,Te(He))?new _i(Ce,N,W,J,me):F.error(`Type ${Fe(Ce)} is not interpolatable.`)}evaluate(_){let F=this.labels,N=this.outputs;if(F.length===1)return N[0].evaluate(_);let W=this.input.evaluate(_);if(W<=F[0])return N[0].evaluate(_);let J=F.length;if(W>=F[J-1])return N[J-1].evaluate(_);let ee=on(F,W),me=_i.interpolationFactor(this.interpolation,W,F[ee],F[ee+1]),Ce=N[ee].evaluate(_),Ve=N[ee+1].evaluate(_);switch(this.operator){case"interpolate":return Mi[this.type.kind](Ce,Ve,me);case"interpolate-hcl":return Mi.color(Ce,Ve,me,"hcl");case"interpolate-lab":return Mi.color(Ce,Ve,me,"lab")}}eachChild(_){_(this.input);for(let F of this.outputs)_(F)}outputDefined(){return this.outputs.every((_=>_.outputDefined()))}}function ko(L,_,F,N){let W=N-F,J=L-F;return W===0?0:_===1?J/W:(Math.pow(_,J)-1)/(Math.pow(_,W)-1)}class Io{constructor(_,F){this.type=_,this.args=F}static parse(_,F){if(_.length<2)return F.error("Expectected at least one argument.");let N=null,W=F.expectedType;W&&W.kind!=="value"&&(N=W);let J=[];for(let me of _.slice(1)){let Ce=F.parse(me,1+J.length,N,void 0,{typeAnnotation:"omit"});if(!Ce)return null;N=N||Ce.type,J.push(Ce)}if(!N)throw new Error("No output type");let ee=W&&J.some((me=>Re(W,me.type)));return new Io(ee?qt:N,J)}evaluate(_){let F,N=null,W=0;for(let J of this.args)if(W++,N=J.evaluate(_),N&&N instanceof ni&&!N.available&&(F||(F=N.name),N=null,W===this.args.length&&(N=F)),N!==null)break;return N}eachChild(_){this.args.forEach(_)}outputDefined(){return this.args.every((_=>_.outputDefined()))}}function $o(L,_){return L==="=="||L==="!="?_.kind==="boolean"||_.kind==="string"||_.kind==="number"||_.kind==="null"||_.kind==="value":_.kind==="string"||_.kind==="number"||_.kind==="value"}function Is(L,_,F,N){return N.compare(_,F)===0}function Es(L,_,F){let N=L!=="=="&&L!=="!=";return class ZOe{constructor(J,ee,me){this.type=We,this.lhs=J,this.rhs=ee,this.collator=me,this.hasUntypedArgument=J.type.kind==="value"||ee.type.kind==="value"}static parse(J,ee){if(J.length!==3&&J.length!==4)return ee.error("Expected two or three arguments.");let me=J[0],Ce=ee.parse(J[1],1,qt);if(!Ce)return null;if(!$o(me,Ce.type))return ee.concat(1).error(`"${me}" comparisons are not supported for type '${Fe(Ce.type)}'.`);let Ve=ee.parse(J[2],2,qt);if(!Ve)return null;if(!$o(me,Ve.type))return ee.concat(2).error(`"${me}" comparisons are not supported for type '${Fe(Ve.type)}'.`);if(Ce.type.kind!==Ve.type.kind&&Ce.type.kind!=="value"&&Ve.type.kind!=="value")return ee.error(`Cannot compare types '${Fe(Ce.type)}' and '${Fe(Ve.type)}'.`);N&&(Ce.type.kind==="value"&&Ve.type.kind!=="value"?Ce=new oo(Ve.type,[Ce]):Ce.type.kind!=="value"&&Ve.type.kind==="value"&&(Ve=new oo(Ce.type,[Ve])));let nt=null;if(J.length===4){if(Ce.type.kind!=="string"&&Ve.type.kind!=="string"&&Ce.type.kind!=="value"&&Ve.type.kind!=="value")return ee.error("Cannot use collator to compare non-string types.");if(nt=ee.parse(J[3],3,Wt),!nt)return null}return new ZOe(Ce,Ve,nt)}evaluate(J){let ee=this.lhs.evaluate(J),me=this.rhs.evaluate(J);if(N&&this.hasUntypedArgument){let Ce=to(ee),Ve=to(me);if(Ce.kind!==Ve.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new Fi(`Expected arguments for "${L}" to be (string, string) or (number, number), but found (${Ce.kind}, ${Ve.kind}) instead.`)}if(this.collator&&!N&&this.hasUntypedArgument){let Ce=to(ee),Ve=to(me);if(Ce.kind!=="string"||Ve.kind!=="string")return _(J,ee,me)}return this.collator?F(J,ee,me,this.collator.evaluate(J)):_(J,ee,me)}eachChild(J){J(this.lhs),J(this.rhs),this.collator&&J(this.collator)}outputDefined(){return!0}}}let Ks=Es("==",(function(L,_,F){return _===F}),Is),nl=Es("!=",(function(L,_,F){return _!==F}),(function(L,_,F,N){return!Is(0,_,F,N)})),ks=Es("<",(function(L,_,F){return _",(function(L,_,F){return _>F}),(function(L,_,F,N){return N.compare(_,F)>0})),xs=Es("<=",(function(L,_,F){return _<=F}),(function(L,_,F,N){return N.compare(_,F)<=0})),Co=Es(">=",(function(L,_,F){return _>=F}),(function(L,_,F,N){return N.compare(_,F)>=0}));class Si{constructor(_,F,N){this.type=Wt,this.locale=N,this.caseSensitive=_,this.diacriticSensitive=F}static parse(_,F){if(_.length!==2)return F.error("Expected one argument.");let N=_[1];if(typeof N!="object"||Array.isArray(N))return F.error("Collator options argument must be an object.");let W=F.parse(N["case-sensitive"]!==void 0&&N["case-sensitive"],1,We);if(!W)return null;let J=F.parse(N["diacritic-sensitive"]!==void 0&&N["diacritic-sensitive"],1,We);if(!J)return null;let ee=null;return N.locale&&(ee=F.parse(N.locale,1,Qe),!ee)?null:new Si(W,J,ee)}evaluate(_){return new no(this.caseSensitive.evaluate(_),this.diacriticSensitive.evaluate(_),this.locale?this.locale.evaluate(_):null)}eachChild(_){_(this.caseSensitive),_(this.diacriticSensitive),this.locale&&_(this.locale)}outputDefined(){return!1}}class io{constructor(_,F,N,W,J){this.type=Qe,this.number=_,this.locale=F,this.currency=N,this.minFractionDigits=W,this.maxFractionDigits=J}static parse(_,F){if(_.length!==3)return F.error("Expected two arguments.");let N=F.parse(_[1],1,He);if(!N)return null;let W=_[2];if(typeof W!="object"||Array.isArray(W))return F.error("NumberFormat options argument must be an object.");let J=null;if(W.locale&&(J=F.parse(W.locale,1,Qe),!J))return null;let ee=null;if(W.currency&&(ee=F.parse(W.currency,1,Qe),!ee))return null;let me=null;if(W["min-fraction-digits"]&&(me=F.parse(W["min-fraction-digits"],1,He),!me))return null;let Ce=null;return W["max-fraction-digits"]&&(Ce=F.parse(W["max-fraction-digits"],1,He),!Ce)?null:new io(N,J,ee,me,Ce)}evaluate(_){return new Intl.NumberFormat(this.locale?this.locale.evaluate(_):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(_):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(_):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(_):void 0}).format(this.number.evaluate(_))}eachChild(_){_(this.number),this.locale&&_(this.locale),this.currency&&_(this.currency),this.minFractionDigits&&_(this.minFractionDigits),this.maxFractionDigits&&_(this.maxFractionDigits)}outputDefined(){return!1}}class Bs{constructor(_){this.type=_r,this.sections=_}static parse(_,F){if(_.length<2)return F.error("Expected at least one argument.");let N=_[1];if(!Array.isArray(N)&&typeof N=="object")return F.error("First argument must be an image or text section.");let W=[],J=!1;for(let ee=1;ee<=_.length-1;++ee){let me=_[ee];if(J&&typeof me=="object"&&!Array.isArray(me)){J=!1;let Ce=null;if(me["font-scale"]&&(Ce=F.parse(me["font-scale"],1,He),!Ce))return null;let Ve=null;if(me["text-font"]&&(Ve=F.parse(me["text-font"],1,Te(Qe)),!Ve))return null;let nt=null;if(me["text-color"]&&(nt=F.parse(me["text-color"],1,pt),!nt))return null;let wt=W[W.length-1];wt.scale=Ce,wt.font=Ve,wt.textColor=nt}else{let Ce=F.parse(_[ee],1,qt);if(!Ce)return null;let Ve=Ce.type.kind;if(Ve!=="string"&&Ve!=="value"&&Ve!=="null"&&Ve!=="resolvedImage")return F.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");J=!0,W.push({content:Ce,scale:null,font:null,textColor:null})}}return new Bs(W)}evaluate(_){return new Ti(this.sections.map((F=>{let N=F.content.evaluate(_);return to(N)===lr?new Gi("",N,null,null,null):new Gi(Xo(N),null,F.scale?F.scale.evaluate(_):null,F.font?F.font.evaluate(_).join(","):null,F.textColor?F.textColor.evaluate(_):null)})))}eachChild(_){for(let F of this.sections)_(F.content),F.scale&&_(F.scale),F.font&&_(F.font),F.textColor&&_(F.textColor)}outputDefined(){return!1}}class Fl{constructor(_){this.type=lr,this.input=_}static parse(_,F){if(_.length!==2)return F.error("Expected two arguments.");let N=F.parse(_[1],1,Qe);return N?new Fl(N):F.error("No image name provided.")}evaluate(_){let F=this.input.evaluate(_),N=ni.fromString(F);return N&&_.availableImages&&(N.available=_.availableImages.indexOf(F)>-1),N}eachChild(_){_(this.input)}outputDefined(){return!1}}class Eu{constructor(_){this.type=He,this.input=_}static parse(_,F){if(_.length!==2)return F.error(`Expected 1 argument, but found ${_.length-1} instead.`);let N=F.parse(_[1],1);return N?N.type.kind!=="array"&&N.type.kind!=="string"&&N.type.kind!=="value"?F.error(`Expected argument of type string or array, but found ${Fe(N.type)} instead.`):new Eu(N):null}evaluate(_){let F=this.input.evaluate(_);if(typeof F=="string")return[...F].length;if(Array.isArray(F))return F.length;throw new Fi(`Expected value to be of type string or array, but found ${Fe(to(F))} instead.`)}eachChild(_){_(this.input)}outputDefined(){return!1}}let Cs=8192;function Nl(L,_){let F=(180+L[0])/360,N=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+L[1]*Math.PI/360)))/360,W=Math.pow(2,_.z);return[Math.round(F*W*Cs),Math.round(N*W*Cs)]}function du(L,_){let F=Math.pow(2,_.z);return[(W=(L[0]/Cs+_.x)/F,360*W-180),(N=(L[1]/Cs+_.y)/F,360/Math.PI*Math.atan(Math.exp((180-360*N)*Math.PI/180))-90)];var N,W}function Kl(L,_){L[0]=Math.min(L[0],_[0]),L[1]=Math.min(L[1],_[1]),L[2]=Math.max(L[2],_[0]),L[3]=Math.max(L[3],_[1])}function al(L,_){return!(L[0]<=_[0]||L[2]>=_[2]||L[1]<=_[1]||L[3]>=_[3])}function co(L,_,F){let N=L[0]-_[0],W=L[1]-_[1],J=L[0]-F[0],ee=L[1]-F[1];return N*ee-J*W==0&&N*J<=0&&W*ee<=0}function Ul(L,_,F,N){return(W=[N[0]-F[0],N[1]-F[1]])[0]*(J=[_[0]-L[0],_[1]-L[1]])[1]-W[1]*J[0]!=0&&!(!kf(L,_,F,N)||!kf(F,N,L,_));var W,J}function Ls(L,_,F){for(let N of F)for(let W=0;W(W=L)[1]!=(ee=me[Ce+1])[1]>W[1]&&W[0]<(ee[0]-J[0])*(W[1]-J[1])/(ee[1]-J[1])+J[0]&&(N=!N)}var W,J,ee;return N}function _c(L,_){for(let F of _)if(il(L,F))return!0;return!1}function Os(L,_){for(let F of L)if(!il(F,_))return!1;for(let F=0;F0&&me<0||ee<0&&me>0}function Jl(L,_,F){let N=[];for(let W=0;WF[2]){let W=.5*N,J=L[0]-F[0]>W?-N:F[0]-L[0]>W?N:0;J===0&&(J=L[0]-F[2]>W?-N:F[2]-L[0]>W?N:0),L[0]+=J}Kl(_,L)}function Cf(L,_,F,N){let W=Math.pow(2,N.z)*Cs,J=[N.x*Cs,N.y*Cs],ee=[];for(let me of L)for(let Ce of me){let Ve=[Ce.x+J[0],Ce.y+J[1]];wc(Ve,_,F,W),ee.push(Ve)}return ee}function Rd(L,_,F,N){let W=Math.pow(2,N.z)*Cs,J=[N.x*Cs,N.y*Cs],ee=[];for(let Ce of L){let Ve=[];for(let nt of Ce){let wt=[nt.x+J[0],nt.y+J[1]];Kl(_,wt),Ve.push(wt)}ee.push(Ve)}if(_[2]-_[0]<=W/2){(me=_)[0]=me[1]=1/0,me[2]=me[3]=-1/0;for(let Ce of ee)for(let Ve of Ce)wc(Ve,_,F,W)}var me;return ee}class ol{constructor(_,F){this.type=We,this.geojson=_,this.geometries=F}static parse(_,F){if(_.length!==2)return F.error(`'within' expression requires exactly one argument, but found ${_.length-1} instead.`);if(Hi(_[1])){let N=_[1];if(N.type==="FeatureCollection"){let W=[];for(let J of N.features){let{type:ee,coordinates:me}=J.geometry;ee==="Polygon"&&W.push(me),ee==="MultiPolygon"&&W.push(...me)}if(W.length)return new ol(N,{type:"MultiPolygon",coordinates:W})}else if(N.type==="Feature"){let W=N.geometry.type;if(W==="Polygon"||W==="MultiPolygon")return new ol(N,N.geometry)}else if(N.type==="Polygon"||N.type==="MultiPolygon")return new ol(N,N)}return F.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(_){if(_.geometry()!=null&&_.canonicalID()!=null){if(_.geometryType()==="Point")return(function(F,N){let W=[1/0,1/0,-1/0,-1/0],J=[1/0,1/0,-1/0,-1/0],ee=F.canonicalID();if(N.type==="Polygon"){let me=Jl(N.coordinates,J,ee),Ce=Cf(F.geometry(),W,J,ee);if(!al(W,J))return!1;for(let Ve of Ce)if(!il(Ve,me))return!1}if(N.type==="MultiPolygon"){let me=th(N.coordinates,J,ee),Ce=Cf(F.geometry(),W,J,ee);if(!al(W,J))return!1;for(let Ve of Ce)if(!_c(Ve,me))return!1}return!0})(_,this.geometries);if(_.geometryType()==="LineString")return(function(F,N){let W=[1/0,1/0,-1/0,-1/0],J=[1/0,1/0,-1/0,-1/0],ee=F.canonicalID();if(N.type==="Polygon"){let me=Jl(N.coordinates,J,ee),Ce=Rd(F.geometry(),W,J,ee);if(!al(W,J))return!1;for(let Ve of Ce)if(!Os(Ve,me))return!1}if(N.type==="MultiPolygon"){let me=th(N.coordinates,J,ee),Ce=Rd(F.geometry(),W,J,ee);if(!al(W,J))return!1;for(let Ve of Ce)if(!Vu(Ve,me))return!1}return!0})(_,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let af=class{constructor(L=[],_=((F,N)=>FN?1:0)){if(this.data=L,this.length=this.data.length,this.compare=_,this.length>0)for(let F=(this.length>>1)-1;F>=0;F--)this._down(F)}push(L){this.data.push(L),this._up(this.length++)}pop(){if(this.length===0)return;let L=this.data[0],_=this.data.pop();return--this.length>0&&(this.data[0]=_,this._down(0)),L}peek(){return this.data[0]}_up(L){let{data:_,compare:F}=this,N=_[L];for(;L>0;){let W=L-1>>1,J=_[W];if(F(N,J)>=0)break;_[L]=J,L=W}_[L]=N}_down(L){let{data:_,compare:F}=this,N=this.length>>1,W=_[L];for(;L=0)break;_[L]=_[J],L=J}_[L]=W}};function ec(L,_,F,N,W){Tc(L,_,F,N||L.length-1,W||jc)}function Tc(L,_,F,N,W){for(;N>F;){if(N-F>600){var J=N-F+1,ee=_-F+1,me=Math.log(J),Ce=.5*Math.exp(2*me/3),Ve=.5*Math.sqrt(me*Ce*(J-Ce)/J)*(ee-J/2<0?-1:1);Tc(L,_,Math.max(F,Math.floor(_-ee*Ce/J+Ve)),Math.min(N,Math.floor(_+(J-ee)*Ce/J+Ve)),W)}var nt=L[_],wt=F,Ct=N;for(vu(L,F,_),W(L[N],nt)>0&&vu(L,F,N);wt0;)Ct--}W(L[F],nt)===0?vu(L,F,Ct):vu(L,++Ct,N),Ct<=_&&(F=Ct+1),_<=Ct&&(N=Ct-1)}}function vu(L,_,F){var N=L[_];L[_]=L[F],L[F]=N}function jc(L,_){return L<_?-1:L>_?1:0}function Lf(L,_){if(L.length<=1)return[L];let F=[],N,W;for(let J of L){let ee=Lh(J);ee!==0&&(J.area=Math.abs(ee),W===void 0&&(W=ee<0),W===ee<0?(N&&F.push(N),N=[J]):N.push(J))}if(N&&F.push(N),_>1)for(let J=0;J1?(Ve=_[Ce+1][0],nt=_[Ce+1][1]):Rt>0&&(Ve+=wt/this.kx*Rt,nt+=Ct/this.ky*Rt)),wt=this.wrap(F[0]-Ve)*this.kx,Ct=(F[1]-nt)*this.ky;let jt=wt*wt+Ct*Ct;jt180;)_-=360;return _}}function Fh(L,_){return _[0]-L[0]}function pu(L){return L[1]-L[0]+1}function gu(L,_){return L[1]>=L[0]&&L[1]<_}function mu(L,_){if(L[0]>L[1])return[null,null];let F=pu(L);if(_){if(F===2)return[L,null];let W=Math.floor(F/2);return[[L[0],L[0]+W],[L[0]+W,L[1]]]}if(F===1)return[L,null];let N=Math.floor(F/2)-1;return[[L[0],L[0]+N],[L[0]+N+1,L[1]]]}function Ql(L,_){if(!gu(_,L.length))return[1/0,1/0,-1/0,-1/0];let F=[1/0,1/0,-1/0,-1/0];for(let N=_[0];N<=_[1];++N)Kl(F,L[N]);return F}function as(L){let _=[1/0,1/0,-1/0,-1/0];for(let F of L)for(let N of F)Kl(_,N);return _}function fo(L){return L[0]!==-1/0&&L[1]!==-1/0&&L[2]!==1/0&&L[3]!==1/0}function Ns(L,_,F){if(!fo(L)||!fo(_))return NaN;let N=0,W=0;return L[2]<_[0]&&(N=_[0]-L[2]),L[0]>_[2]&&(N=L[0]-_[2]),L[1]>_[3]&&(W=L[1]-_[3]),L[3]<_[1]&&(W=_[1]-L[3]),F.distance([0,0],[N,W])}function ku(L,_,F){let N=F.pointOnLine(_,L);return F.distance(L,N.point)}function rc(L,_,F,N,W){let J=Math.min(ku(L,[F,N],W),ku(_,[F,N],W)),ee=Math.min(ku(F,[L,_],W),ku(N,[L,_],W));return Math.min(J,ee)}function sf(L,_,F,N,W){if(!gu(_,L.length)||!gu(N,F.length))return 1/0;let J=1/0;for(let ee=_[0];ee<_[1];++ee){let me=L[ee],Ce=L[ee+1];for(let Ve=N[0];Ve=N)return N;if(al(W,J)){if(Zh(L,_))return 0}else if(Zh(_,L))return 0;let ee=1/0;for(let me of L)for(let Ce=0,Ve=me.length,nt=Ve-1;Ce0;){let Ce=ee.pop();if(Ce[0]>=J)continue;let Ve=Ce[1],nt=_?50:100;if(pu(Ve)<=nt){if(!gu(Ve,L.length))return NaN;if(_){let wt=Wi(L,Ve,F,N);if(isNaN(wt)||wt===0)return wt;J=Math.min(J,wt)}else for(let wt=Ve[0];wt<=Ve[1];++wt){let Ct=Xh(L[wt],F,N);if(J=Math.min(J,Ct),J===0)return 0}}else{let wt=mu(Ve,_);ei(ee,J,N,L,me,wt[0]),ei(ee,J,N,L,me,wt[1])}}return J}function _l(L,_,F,N,W,J=1/0){let ee=Math.min(J,W.distance(L[0],F[0]));if(ee===0)return ee;let me=new af([[0,[0,L.length-1],[0,F.length-1]]],Fh);for(;me.length>0;){let Ce=me.pop();if(Ce[0]>=ee)continue;let Ve=Ce[1],nt=Ce[2],wt=_?50:100,Ct=N?50:100;if(pu(Ve)<=wt&&pu(nt)<=Ct){if(!gu(Ve,L.length)&&gu(nt,F.length))return NaN;let Rt;if(_&&N)Rt=sf(L,Ve,F,nt,W),ee=Math.min(ee,Rt);else if(_&&!N){let jt=L.slice(Ve[0],Ve[1]+1);for(let Qt=nt[0];Qt<=nt[1];++Qt)if(Rt=ku(F[Qt],jt,W),ee=Math.min(ee,Rt),ee===0)return ee}else if(!_&&N){let jt=F.slice(nt[0],nt[1]+1);for(let Qt=Ve[0];Qt<=Ve[1];++Qt)if(Rt=ku(L[Qt],jt,W),ee=Math.min(ee,Rt),ee===0)return ee}else Rt=is(L,Ve,F,nt,W),ee=Math.min(ee,Rt)}else{let Rt=mu(Ve,_),jt=mu(nt,N);nc(me,ee,W,L,F,Rt[0],jt[0]),nc(me,ee,W,L,F,Rt[0],jt[1]),nc(me,ee,W,L,F,Rt[1],jt[0]),nc(me,ee,W,L,F,Rt[1],jt[1])}}return ee}function nh(L){return L.type==="MultiPolygon"?L.coordinates.map((_=>({type:"Polygon",coordinates:_}))):L.type==="MultiLineString"?L.coordinates.map((_=>({type:"LineString",coordinates:_}))):L.type==="MultiPoint"?L.coordinates.map((_=>({type:"Point",coordinates:_}))):[L]}class Cu{constructor(_,F){this.type=He,this.geojson=_,this.geometries=F}static parse(_,F){if(_.length!==2)return F.error(`'distance' expression requires exactly one argument, but found ${_.length-1} instead.`);if(Hi(_[1])){let N=_[1];if(N.type==="FeatureCollection")return new Cu(N,N.features.map((W=>nh(W.geometry))).flat());if(N.type==="Feature")return new Cu(N,nh(N.geometry));if("type"in N&&"coordinates"in N)return new Cu(N,nh(N))}return F.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(_){if(_.geometry()!=null&&_.canonicalID()!=null){if(_.geometryType()==="Point")return(function(F,N){let W=F.geometry(),J=W.flat().map((Ce=>du([Ce.x,Ce.y],F.canonical)));if(W.length===0)return NaN;let ee=new rh(J[0][1]),me=1/0;for(let Ce of N){switch(Ce.type){case"Point":me=Math.min(me,_l(J,!1,[Ce.coordinates],!1,ee,me));break;case"LineString":me=Math.min(me,_l(J,!1,Ce.coordinates,!0,ee,me));break;case"Polygon":me=Math.min(me,Wc(J,!1,Ce.coordinates,ee,me))}if(me===0)return me}return me})(_,this.geometries);if(_.geometryType()==="LineString")return(function(F,N){let W=F.geometry(),J=W.flat().map((Ce=>du([Ce.x,Ce.y],F.canonical)));if(W.length===0)return NaN;let ee=new rh(J[0][1]),me=1/0;for(let Ce of N){switch(Ce.type){case"Point":me=Math.min(me,_l(J,!0,[Ce.coordinates],!1,ee,me));break;case"LineString":me=Math.min(me,_l(J,!0,Ce.coordinates,!0,ee,me));break;case"Polygon":me=Math.min(me,Wc(J,!0,Ce.coordinates,ee,me))}if(me===0)return me}return me})(_,this.geometries);if(_.geometryType()==="Polygon")return(function(F,N){let W=F.geometry();if(W.length===0||W[0].length===0)return NaN;let J=Lf(W,0).map((Ce=>Ce.map((Ve=>Ve.map((nt=>du([nt.x,nt.y],F.canonical))))))),ee=new rh(J[0][0][0][1]),me=1/0;for(let Ce of N)for(let Ve of J){switch(Ce.type){case"Point":me=Math.min(me,Wc([Ce.coordinates],!1,Ve,ee,me));break;case"LineString":me=Math.min(me,Wc(Ce.coordinates,!0,Ve,ee,me));break;case"Polygon":me=Math.min(me,so(Ve,Ce.coordinates,ee,me))}if(me===0)return me}return me})(_,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let Ac={"==":Ks,"!=":nl,">":us,"<":ks,">=":Co,"<=":xs,array:oo,at:Xt,boolean:oo,case:Mn,coalesce:Io,collator:Si,format:Bs,image:Fl,in:xr,"index-of":Fr,interpolate:_i,"interpolate-hcl":_i,"interpolate-lab":_i,length:Eu,let:ia,literal:Zo,match:xn,number:oo,"number-format":io,object:oo,slice:Rn,step:En,string:oo,"to-boolean":Ni,"to-color":Ni,"to-number":Ni,"to-string":Ni,var:rt,within:ol,distance:Cu};class Us{constructor(_,F,N,W){this.name=_,this.type=F,this._evaluate=N,this.args=W}evaluate(_){return this._evaluate(_,this.args)}eachChild(_){this.args.forEach(_)}outputDefined(){return!1}static parse(_,F){let N=_[0],W=Us.definitions[N];if(!W)return F.error(`Unknown expression "${N}". If you wanted a literal array, use ["literal", [...]].`,0);let J=Array.isArray(W)?W[0]:W.type,ee=Array.isArray(W)?[[W[1],W[2]]]:W.overloads,me=ee.filter((([Ve])=>!Array.isArray(Ve)||Ve.length===_.length-1)),Ce=null;for(let[Ve,nt]of me){Ce=new Pi(F.registry,Rf,F.path,null,F.scope);let wt=[],Ct=!1;for(let Rt=1;Rt<_.length;Rt++){let jt=_[Rt],Qt=Array.isArray(Ve)?Ve[Rt-1]:Ve.type,Ar=Ce.parse(jt,1+wt.length,Qt);if(!Ar){Ct=!0;break}wt.push(Ar)}if(!Ct)if(Array.isArray(Ve)&&Ve.length!==wt.length)Ce.error(`Expected ${Ve.length} arguments, but found ${wt.length} instead.`);else{for(let Rt=0;Rt{return Ct=wt,Array.isArray(Ct)?`(${Ct.map(Fe).join(", ")})`:`(${Fe(Ct.type)}...)`;var Ct})).join(" | "),nt=[];for(let wt=1;wt<_.length;wt++){let Ct=F.parse(_[wt],1+nt.length);if(!Ct)return null;nt.push(Fe(Ct.type))}F.error(`Expected arguments of type ${Ve}, but found (${nt.join(", ")}) instead.`)}return null}static register(_,F){Us.definitions=F;for(let N in F)_[N]=Us}}function ah(L,[_,F,N,W]){_=_.evaluate(L),F=F.evaluate(L),N=N.evaluate(L);let J=W?W.evaluate(L):1,ee=ao(_,F,N,J);if(ee)throw new Fi(ee);return new pa(_/255,F/255,N/255,J,!1)}function Df(L,_){return L in _}function Mc(L,_){let F=_[L];return F===void 0?null:F}function Sc(L){return{type:L}}function Rf(L){if(L instanceof rt)return Rf(L.boundExpression);if(L instanceof Us&&L.name==="error"||L instanceof Si||L instanceof ol||L instanceof Cu)return!1;let _=L instanceof Ni||L instanceof oo,F=!0;return L.eachChild((N=>{F=_?F&&Rf(N):F&&N instanceof Zo})),!!F&&If(L)&&lf(L,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function If(L){if(L instanceof Us&&(L.name==="get"&&L.args.length===1||L.name==="feature-state"||L.name==="has"&&L.args.length===1||L.name==="properties"||L.name==="geometry-type"||L.name==="id"||/^filter-/.test(L.name))||L instanceof ol||L instanceof Cu)return!1;let _=!0;return L.eachChild((F=>{_&&!If(F)&&(_=!1)})),_}function eu(L){if(L instanceof Us&&L.name==="feature-state")return!1;let _=!0;return L.eachChild((F=>{_&&!eu(F)&&(_=!1)})),_}function lf(L,_){if(L instanceof Us&&_.indexOf(L.name)>=0)return!1;let F=!0;return L.eachChild((N=>{F&&!lf(N,_)&&(F=!1)})),F}function tu(L){return{result:"success",value:L}}function Ec(L){return{result:"error",value:L}}function bs(L){return L["property-type"]==="data-driven"||L["property-type"]==="cross-faded-data-driven"}function kc(L){return!!L.expression&&L.expression.parameters.indexOf("zoom")>-1}function Gu(L){return!!L.expression&&L.expression.interpolated}function po(L){return L instanceof Number?"number":L instanceof String?"string":L instanceof Boolean?"boolean":Array.isArray(L)?"array":L===null?"null":typeof L}function uf(L){return typeof L=="object"&&L!==null&&!Array.isArray(L)}function $h(L){return L}function ih(L,_){let F=_.type==="color",N=L.stops&&typeof L.stops[0][0]=="object",W=N||!(N||L.property!==void 0),J=L.type||(Gu(_)?"exponential":"interval");if(F||_.type==="padding"){let nt=F?pa.parse:fi.parse;(L=ge({},L)).stops&&(L.stops=L.stops.map((wt=>[wt[0],nt(wt[1])]))),L.default=nt(L.default?L.default:_.default)}if(L.colorSpace&&(ee=L.colorSpace)!=="rgb"&&ee!=="hcl"&&ee!=="lab")throw new Error(`Unknown color space: "${L.colorSpace}"`);var ee;let me,Ce,Ve;if(J==="exponential")me=Kh;else if(J==="interval")me=cf;else if(J==="categorical"){me=oh,Ce=Object.create(null);for(let nt of L.stops)Ce[nt[0]]=nt[1];Ve=typeof L.stops[0][0]}else{if(J!=="identity")throw new Error(`Unknown function type "${J}"`);me=_s}if(N){let nt={},wt=[];for(let jt=0;jtjt[0])),evaluate:({zoom:jt},Qt)=>Kh({stops:Ct,base:L.base},_,jt).evaluate(jt,Qt)}}if(W){let nt=J==="exponential"?{name:"exponential",base:L.base!==void 0?L.base:1}:null;return{kind:"camera",interpolationType:nt,interpolationFactor:_i.interpolationFactor.bind(void 0,nt),zoomStops:L.stops.map((wt=>wt[0])),evaluate:({zoom:wt})=>me(L,_,wt,Ce,Ve)}}return{kind:"source",evaluate(nt,wt){let Ct=wt&&wt.properties?wt.properties[L.property]:void 0;return Ct===void 0?ac(L.default,_.default):me(L,_,Ct,Ce,Ve)}}}function ac(L,_,F){return L!==void 0?L:_!==void 0?_:F!==void 0?F:void 0}function oh(L,_,F,N,W){return ac(typeof F===W?N[F]:void 0,L.default,_.default)}function cf(L,_,F){if(po(F)!=="number")return ac(L.default,_.default);let N=L.stops.length;if(N===1||F<=L.stops[0][0])return L.stops[0][1];if(F>=L.stops[N-1][0])return L.stops[N-1][1];let W=on(L.stops.map((J=>J[0])),F);return L.stops[W][1]}function Kh(L,_,F){let N=L.base!==void 0?L.base:1;if(po(F)!=="number")return ac(L.default,_.default);let W=L.stops.length;if(W===1||F<=L.stops[0][0])return L.stops[0][1];if(F>=L.stops[W-1][0])return L.stops[W-1][1];let J=on(L.stops.map((nt=>nt[0])),F),ee=(function(nt,wt,Ct,Rt){let jt=Rt-Ct,Qt=nt-Ct;return jt===0?0:wt===1?Qt/jt:(Math.pow(wt,Qt)-1)/(Math.pow(wt,jt)-1)})(F,N,L.stops[J][0],L.stops[J+1][0]),me=L.stops[J][1],Ce=L.stops[J+1][1],Ve=Mi[_.type]||$h;return typeof me.evaluate=="function"?{evaluate(...nt){let wt=me.evaluate.apply(void 0,nt),Ct=Ce.evaluate.apply(void 0,nt);if(wt!==void 0&&Ct!==void 0)return Ve(wt,Ct,ee,L.colorSpace)}}:Ve(me,Ce,ee,L.colorSpace)}function _s(L,_,F){switch(_.type){case"color":F=pa.parse(F);break;case"formatted":F=Ti.fromString(F.toString());break;case"resolvedImage":F=ni.fromString(F.toString());break;case"padding":F=fi.parse(F);break;default:po(F)===_.type||_.type==="enum"&&_.values[F]||(F=void 0)}return ac(F,L.default,_.default)}Us.register(Ac,{error:[{kind:"error"},[Qe],(L,[_])=>{throw new Fi(_.evaluate(L))}],typeof:[Qe,[qt],(L,[_])=>Fe(to(_.evaluate(L)))],"to-rgba":[Te(He,4),[pt],(L,[_])=>{let[F,N,W,J]=_.evaluate(L).rgb;return[255*F,255*N,255*W,J]}],rgb:[pt,[He,He,He],ah],rgba:[pt,[He,He,He,He],ah],has:{type:We,overloads:[[[Qe],(L,[_])=>Df(_.evaluate(L),L.properties())],[[Qe,kt],(L,[_,F])=>Df(_.evaluate(L),F.evaluate(L))]]},get:{type:qt,overloads:[[[Qe],(L,[_])=>Mc(_.evaluate(L),L.properties())],[[Qe,kt],(L,[_,F])=>Mc(_.evaluate(L),F.evaluate(L))]]},"feature-state":[qt,[Qe],(L,[_])=>Mc(_.evaluate(L),L.featureState||{})],properties:[kt,[],L=>L.properties()],"geometry-type":[Qe,[],L=>L.geometryType()],id:[qt,[],L=>L.id()],zoom:[He,[],L=>L.globals.zoom],"heatmap-density":[He,[],L=>L.globals.heatmapDensity||0],"line-progress":[He,[],L=>L.globals.lineProgress||0],accumulated:[qt,[],L=>L.globals.accumulated===void 0?null:L.globals.accumulated],"+":[He,Sc(He),(L,_)=>{let F=0;for(let N of _)F+=N.evaluate(L);return F}],"*":[He,Sc(He),(L,_)=>{let F=1;for(let N of _)F*=N.evaluate(L);return F}],"-":{type:He,overloads:[[[He,He],(L,[_,F])=>_.evaluate(L)-F.evaluate(L)],[[He],(L,[_])=>-_.evaluate(L)]]},"/":[He,[He,He],(L,[_,F])=>_.evaluate(L)/F.evaluate(L)],"%":[He,[He,He],(L,[_,F])=>_.evaluate(L)%F.evaluate(L)],ln2:[He,[],()=>Math.LN2],pi:[He,[],()=>Math.PI],e:[He,[],()=>Math.E],"^":[He,[He,He],(L,[_,F])=>Math.pow(_.evaluate(L),F.evaluate(L))],sqrt:[He,[He],(L,[_])=>Math.sqrt(_.evaluate(L))],log10:[He,[He],(L,[_])=>Math.log(_.evaluate(L))/Math.LN10],ln:[He,[He],(L,[_])=>Math.log(_.evaluate(L))],log2:[He,[He],(L,[_])=>Math.log(_.evaluate(L))/Math.LN2],sin:[He,[He],(L,[_])=>Math.sin(_.evaluate(L))],cos:[He,[He],(L,[_])=>Math.cos(_.evaluate(L))],tan:[He,[He],(L,[_])=>Math.tan(_.evaluate(L))],asin:[He,[He],(L,[_])=>Math.asin(_.evaluate(L))],acos:[He,[He],(L,[_])=>Math.acos(_.evaluate(L))],atan:[He,[He],(L,[_])=>Math.atan(_.evaluate(L))],min:[He,Sc(He),(L,_)=>Math.min(..._.map((F=>F.evaluate(L))))],max:[He,Sc(He),(L,_)=>Math.max(..._.map((F=>F.evaluate(L))))],abs:[He,[He],(L,[_])=>Math.abs(_.evaluate(L))],round:[He,[He],(L,[_])=>{let F=_.evaluate(L);return F<0?-Math.round(-F):Math.round(F)}],floor:[He,[He],(L,[_])=>Math.floor(_.evaluate(L))],ceil:[He,[He],(L,[_])=>Math.ceil(_.evaluate(L))],"filter-==":[We,[Qe,qt],(L,[_,F])=>L.properties()[_.value]===F.value],"filter-id-==":[We,[qt],(L,[_])=>L.id()===_.value],"filter-type-==":[We,[Qe],(L,[_])=>L.geometryType()===_.value],"filter-<":[We,[Qe,qt],(L,[_,F])=>{let N=L.properties()[_.value],W=F.value;return typeof N==typeof W&&N{let F=L.id(),N=_.value;return typeof F==typeof N&&F":[We,[Qe,qt],(L,[_,F])=>{let N=L.properties()[_.value],W=F.value;return typeof N==typeof W&&N>W}],"filter-id->":[We,[qt],(L,[_])=>{let F=L.id(),N=_.value;return typeof F==typeof N&&F>N}],"filter-<=":[We,[Qe,qt],(L,[_,F])=>{let N=L.properties()[_.value],W=F.value;return typeof N==typeof W&&N<=W}],"filter-id-<=":[We,[qt],(L,[_])=>{let F=L.id(),N=_.value;return typeof F==typeof N&&F<=N}],"filter->=":[We,[Qe,qt],(L,[_,F])=>{let N=L.properties()[_.value],W=F.value;return typeof N==typeof W&&N>=W}],"filter-id->=":[We,[qt],(L,[_])=>{let F=L.id(),N=_.value;return typeof F==typeof N&&F>=N}],"filter-has":[We,[qt],(L,[_])=>_.value in L.properties()],"filter-has-id":[We,[],L=>L.id()!==null&&L.id()!==void 0],"filter-type-in":[We,[Te(Qe)],(L,[_])=>_.value.indexOf(L.geometryType())>=0],"filter-id-in":[We,[Te(qt)],(L,[_])=>_.value.indexOf(L.id())>=0],"filter-in-small":[We,[Qe,Te(qt)],(L,[_,F])=>F.value.indexOf(L.properties()[_.value])>=0],"filter-in-large":[We,[Qe,Te(qt)],(L,[_,F])=>(function(N,W,J,ee){for(;J<=ee;){let me=J+ee>>1;if(W[me]===N)return!0;W[me]>N?ee=me-1:J=me+1}return!1})(L.properties()[_.value],F.value,0,F.value.length-1)],all:{type:We,overloads:[[[We,We],(L,[_,F])=>_.evaluate(L)&&F.evaluate(L)],[Sc(We),(L,_)=>{for(let F of _)if(!F.evaluate(L))return!1;return!0}]]},any:{type:We,overloads:[[[We,We],(L,[_,F])=>_.evaluate(L)||F.evaluate(L)],[Sc(We),(L,_)=>{for(let F of _)if(F.evaluate(L))return!0;return!1}]]},"!":[We,[We],(L,[_])=>!_.evaluate(L)],"is-supported-script":[We,[Qe],(L,[_])=>{let F=L.globals&&L.globals.isSupportedScript;return!F||F(_.evaluate(L))}],upcase:[Qe,[Qe],(L,[_])=>_.evaluate(L).toUpperCase()],downcase:[Qe,[Qe],(L,[_])=>_.evaluate(L).toLowerCase()],concat:[Qe,Sc(qt),(L,_)=>_.map((F=>Xo(F.evaluate(L)))).join("")],"resolved-locale":[Qe,[Wt],(L,[_])=>_.evaluate(L).resolvedLocale()]});class ru{constructor(_,F){var N;this.expression=_,this._warningHistory={},this._evaluator=new xi,this._defaultValue=F?(N=F).type==="color"&&uf(N.default)?new pa(0,0,0,0):N.type==="color"?pa.parse(N.default)||null:N.type==="padding"?fi.parse(N.default)||null:N.type==="variableAnchorOffsetCollection"?Oi.parse(N.default)||null:N.default===void 0?null:N.default:null,this._enumValues=F&&F.type==="enum"?F.values:null}evaluateWithoutErrorHandling(_,F,N,W,J,ee){return this._evaluator.globals=_,this._evaluator.feature=F,this._evaluator.featureState=N,this._evaluator.canonical=W,this._evaluator.availableImages=J||null,this._evaluator.formattedSection=ee,this.expression.evaluate(this._evaluator)}evaluate(_,F,N,W,J,ee){this._evaluator.globals=_,this._evaluator.feature=F||null,this._evaluator.featureState=N||null,this._evaluator.canonical=W,this._evaluator.availableImages=J||null,this._evaluator.formattedSection=ee||null;try{let me=this.expression.evaluate(this._evaluator);if(me==null||typeof me=="number"&&me!=me)return this._defaultValue;if(this._enumValues&&!(me in this._enumValues))throw new Fi(`Expected value to be one of ${Object.keys(this._enumValues).map((Ce=>JSON.stringify(Ce))).join(", ")}, but found ${JSON.stringify(me)} instead.`);return me}catch(me){return this._warningHistory[me.message]||(this._warningHistory[me.message]=!0,typeof console!="undefined"&&console.warn(me.message)),this._defaultValue}}}function sh(L){return Array.isArray(L)&&L.length>0&&typeof L[0]=="string"&&L[0]in Ac}function Ko(L,_){let F=new Pi(Ac,Rf,[],_?(function(W){let J={color:pt,string:Qe,number:He,enum:Qe,boolean:We,formatted:_r,padding:tr,resolvedImage:lr,variableAnchorOffsetCollection:Ye};return W.type==="array"?Te(J[W.value]||qt,W.length):J[W.type]})(_):void 0),N=F.parse(L,void 0,void 0,void 0,_&&_.type==="string"?{typeAnnotation:"coerce"}:void 0);return N?tu(new ru(N,_)):Ec(F.errors)}class Hu{constructor(_,F){this.kind=_,this._styleExpression=F,this.isStateDependent=_!=="constant"&&!eu(F.expression)}evaluateWithoutErrorHandling(_,F,N,W,J,ee){return this._styleExpression.evaluateWithoutErrorHandling(_,F,N,W,J,ee)}evaluate(_,F,N,W,J,ee){return this._styleExpression.evaluate(_,F,N,W,J,ee)}}class Pl{constructor(_,F,N,W){this.kind=_,this.zoomStops=N,this._styleExpression=F,this.isStateDependent=_!=="camera"&&!eu(F.expression),this.interpolationType=W}evaluateWithoutErrorHandling(_,F,N,W,J,ee){return this._styleExpression.evaluateWithoutErrorHandling(_,F,N,W,J,ee)}evaluate(_,F,N,W,J,ee){return this._styleExpression.evaluate(_,F,N,W,J,ee)}interpolationFactor(_,F,N){return this.interpolationType?_i.interpolationFactor(this.interpolationType,_,F,N):0}}function ic(L,_){let F=Ko(L,_);if(F.result==="error")return F;let N=F.value.expression,W=If(N);if(!W&&!bs(_))return Ec([new Ge("","data expressions not supported")]);let J=lf(N,["zoom"]);if(!J&&!kc(_))return Ec([new Ge("","zoom expressions not supported")]);let ee=zf(N);return ee||J?ee instanceof Ge?Ec([ee]):ee instanceof _i&&!Gu(_)?Ec([new Ge("",'"interpolate" expressions cannot be used with this property')]):tu(ee?new Pl(W?"camera":"composite",F.value,ee.labels,ee instanceof _i?ee.interpolation:void 0):new Hu(W?"constant":"source",F.value)):Ec([new Ge("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class Yc{constructor(_,F){this._parameters=_,this._specification=F,ge(this,ih(this._parameters,this._specification))}static deserialize(_){return new Yc(_._parameters,_._specification)}static serialize(_){return{_parameters:_._parameters,_specification:_._specification}}}function zf(L){let _=null;if(L instanceof ia)_=zf(L.result);else if(L instanceof Io){for(let F of L.args)if(_=zf(F),_)break}else(L instanceof En||L instanceof _i)&&L.input instanceof Us&&L.input.name==="zoom"&&(_=L);return _ instanceof Ge||L.eachChild((F=>{let N=zf(F);N instanceof Ge?_=N:!_&&N?_=new Ge("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):_&&N&&_!==N&&(_=new Ge("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),_}function lh(L){if(L===!0||L===!1)return!0;if(!Array.isArray(L)||L.length===0)return!1;switch(L[0]){case"has":return L.length>=2&&L[1]!=="$id"&&L[1]!=="$type";case"in":return L.length>=3&&(typeof L[1]!="string"||Array.isArray(L[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return L.length!==3||Array.isArray(L[1])||Array.isArray(L[2]);case"any":case"all":for(let _ of L.slice(1))if(!lh(_)&&typeof _!="boolean")return!1;return!0;default:return!0}}let yu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ju(L){if(L==null)return{filter:()=>!0,needGeometry:!1};lh(L)||(L=Xc(L));let _=Ko(L,yu);if(_.result==="error")throw new Error(_.value.map((F=>`${F.key}: ${F.message}`)).join(", "));return{filter:(F,N,W)=>_.value.evaluate(F,N,{},W),needGeometry:Id(L)}}function Lu(L,_){return L<_?-1:L>_?1:0}function Id(L){if(!Array.isArray(L))return!1;if(L[0]==="within"||L[0]==="distance")return!0;for(let _=1;_"||_==="<="||_===">="?Jh(L[1],L[2],_):_==="any"?(F=L.slice(1),["any"].concat(F.map(Xc))):_==="all"?["all"].concat(L.slice(1).map(Xc)):_==="none"?["all"].concat(L.slice(1).map(Xc).map(Fs)):_==="in"?Vl(L[1],L.slice(2)):_==="!in"?Fs(Vl(L[1],L.slice(2))):_==="has"?Cc(L[1]):_!=="!has"||Fs(Cc(L[1]));var F}function Jh(L,_,F){switch(L){case"$type":return[`filter-type-${F}`,_];case"$id":return[`filter-id-${F}`,_];default:return[`filter-${F}`,L,_]}}function Vl(L,_){if(_.length===0)return!1;switch(L){case"$type":return["filter-type-in",["literal",_]];case"$id":return["filter-id-in",["literal",_]];default:return _.length>200&&!_.some((F=>typeof F!=typeof _[0]))?["filter-in-large",L,["literal",_.sort(Lu)]]:["filter-in-small",L,["literal",_]]}}function Cc(L){switch(L){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",L]}}function Fs(L){return["!",L]}function oc(L){let _=typeof L;if(_==="number"||_==="boolean"||_==="string"||L==null)return JSON.stringify(L);if(Array.isArray(L)){let W="[";for(let J of L)W+=`${oc(J)},`;return`${W}]`}let F=Object.keys(L).sort(),N="{";for(let W=0;WN.maximum?[new Ue(_,F,`${F} is greater than the maximum value ${N.maximum}`)]:[]}function Lc(L){let _=L.valueSpec,F=Lo(L.value.type),N,W,J,ee={},me=F!=="categorical"&&L.value.property===void 0,Ce=!me,Ve=po(L.value.stops)==="array"&&po(L.value.stops[0])==="array"&&po(L.value.stops[0][0])==="object",nt=Dl({key:L.key,value:L.value,valueSpec:L.styleSpec.function,validateSpec:L.validateSpec,style:L.style,styleSpec:L.styleSpec,objectElementValidators:{stops:function(Rt){if(F==="identity")return[new Ue(Rt.key,Rt.value,'identity function may not have a "stops" property')];let jt=[],Qt=Rt.value;return jt=jt.concat(Bf({key:Rt.key,value:Qt,valueSpec:Rt.valueSpec,validateSpec:Rt.validateSpec,style:Rt.style,styleSpec:Rt.styleSpec,arrayElementValidator:wt})),po(Qt)==="array"&&Qt.length===0&&jt.push(new Ue(Rt.key,Qt,"array must have at least one stop")),jt},default:function(Rt){return Rt.validateSpec({key:Rt.key,value:Rt.value,valueSpec:_,validateSpec:Rt.validateSpec,style:Rt.style,styleSpec:Rt.styleSpec})}}});return F==="identity"&&me&&nt.push(new Ue(L.key,L.value,'missing required property "property"')),F==="identity"||L.value.stops||nt.push(new Ue(L.key,L.value,'missing required property "stops"')),F==="exponential"&&L.valueSpec.expression&&!Gu(L.valueSpec)&&nt.push(new Ue(L.key,L.value,"exponential functions not supported")),L.styleSpec.$version>=8&&(Ce&&!bs(L.valueSpec)?nt.push(new Ue(L.key,L.value,"property functions not supported")):me&&!kc(L.valueSpec)&&nt.push(new Ue(L.key,L.value,"zoom functions not supported"))),F!=="categorical"&&!Ve||L.value.property!==void 0||nt.push(new Ue(L.key,L.value,'"property" property is required')),nt;function wt(Rt){let jt=[],Qt=Rt.value,Ar=Rt.key;if(po(Qt)!=="array")return[new Ue(Ar,Qt,`array expected, ${po(Qt)} found`)];if(Qt.length!==2)return[new Ue(Ar,Qt,`array length 2 expected, length ${Qt.length} found`)];if(Ve){if(po(Qt[0])!=="object")return[new Ue(Ar,Qt,`object expected, ${po(Qt[0])} found`)];if(Qt[0].zoom===void 0)return[new Ue(Ar,Qt,"object stop key must have zoom")];if(Qt[0].value===void 0)return[new Ue(Ar,Qt,"object stop key must have value")];if(J&&J>Lo(Qt[0].zoom))return[new Ue(Ar,Qt[0].zoom,"stop zoom values must appear in ascending order")];Lo(Qt[0].zoom)!==J&&(J=Lo(Qt[0].zoom),W=void 0,ee={}),jt=jt.concat(Dl({key:`${Ar}[0]`,value:Qt[0],valueSpec:{zoom:{}},validateSpec:Rt.validateSpec,style:Rt.style,styleSpec:Rt.styleSpec,objectElementValidators:{zoom:Of,value:Ct}}))}else jt=jt.concat(Ct({key:`${Ar}[0]`,value:Qt[0],valueSpec:{},validateSpec:Rt.validateSpec,style:Rt.style,styleSpec:Rt.styleSpec},Qt));return sh(wl(Qt[1]))?jt.concat([new Ue(`${Ar}[1]`,Qt[1],"expressions are not allowed in function stops.")]):jt.concat(Rt.validateSpec({key:`${Ar}[1]`,value:Qt[1],valueSpec:_,validateSpec:Rt.validateSpec,style:Rt.style,styleSpec:Rt.styleSpec}))}function Ct(Rt,jt){let Qt=po(Rt.value),Ar=Lo(Rt.value),Pr=Rt.value!==null?Rt.value:jt;if(N){if(Qt!==N)return[new Ue(Rt.key,Pr,`${Qt} stop domain type must match previous stop domain type ${N}`)]}else N=Qt;if(Qt!=="number"&&Qt!=="string"&&Qt!=="boolean")return[new Ue(Rt.key,Pr,"stop domain value must be a number, string, or boolean")];if(Qt!=="number"&&F!=="categorical"){let gn=`number expected, ${Qt} found`;return bs(_)&&F===void 0&&(gn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Ue(Rt.key,Pr,gn)]}return F!=="categorical"||Qt!=="number"||isFinite(Ar)&&Math.floor(Ar)===Ar?F!=="categorical"&&Qt==="number"&&W!==void 0&&Arnew Ue(`${L.key}${N.key}`,L.value,N.message)));let F=_.value.expression||_.value._styleExpression.expression;if(L.expressionContext==="property"&&L.propertyKey==="text-font"&&!F.outputDefined())return[new Ue(L.key,L.value,`Invalid data expression for "${L.propertyKey}". Output values must be contained as literals within the expression.`)];if(L.expressionContext==="property"&&L.propertyType==="layout"&&!eu(F))return[new Ue(L.key,L.value,'"feature-state" data expressions are not supported with layout properties.')];if(L.expressionContext==="filter"&&!eu(F))return[new Ue(L.key,L.value,'"feature-state" data expressions are not supported with filters.')];if(L.expressionContext&&L.expressionContext.indexOf("cluster")===0){if(!lf(F,["zoom","feature-state"]))return[new Ue(L.key,L.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(L.expressionContext==="cluster-initial"&&!If(F))return[new Ue(L.key,L.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function nu(L){let _=L.key,F=L.value,N=L.valueSpec,W=[];return Array.isArray(N.values)?N.values.indexOf(Lo(F))===-1&&W.push(new Ue(_,F,`expected one of [${N.values.join(", ")}], ${JSON.stringify(F)} found`)):Object.keys(N.values).indexOf(Lo(F))===-1&&W.push(new Ue(_,F,`expected one of [${Object.keys(N.values).join(", ")}], ${JSON.stringify(F)} found`)),W}function ff(L){return lh(wl(L.value))?Fc(ge({},L,{expressionContext:"filter",valueSpec:{value:"boolean"}})):sc(L)}function sc(L){let _=L.value,F=L.key;if(po(_)!=="array")return[new Ue(F,_,`array expected, ${po(_)} found`)];let N=L.styleSpec,W,J=[];if(_.length<1)return[new Ue(F,_,"filter array must have at least 1 element")];switch(J=J.concat(nu({key:`${F}[0]`,value:_[0],valueSpec:N.filter_operator,style:L.style,styleSpec:L.styleSpec})),Lo(_[0])){case"<":case"<=":case">":case">=":_.length>=2&&Lo(_[1])==="$type"&&J.push(new Ue(F,_,`"$type" cannot be use with operator "${_[0]}"`));case"==":case"!=":_.length!==3&&J.push(new Ue(F,_,`filter array for operator "${_[0]}" must have 3 elements`));case"in":case"!in":_.length>=2&&(W=po(_[1]),W!=="string"&&J.push(new Ue(`${F}[1]`,_[1],`string expected, ${W} found`)));for(let ee=2;ee<_.length;ee++)W=po(_[ee]),Lo(_[1])==="$type"?J=J.concat(nu({key:`${F}[${ee}]`,value:_[ee],valueSpec:N.geometry_type,style:L.style,styleSpec:L.styleSpec})):W!=="string"&&W!=="number"&&W!=="boolean"&&J.push(new Ue(`${F}[${ee}]`,_[ee],`string, number, or boolean expected, ${W} found`));break;case"any":case"all":case"none":for(let ee=1;ee<_.length;ee++)J=J.concat(sc({key:`${F}[${ee}]`,value:_[ee],style:L.style,styleSpec:L.styleSpec}));break;case"has":case"!has":W=po(_[1]),_.length!==2?J.push(new Ue(F,_,`filter array for "${_[0]}" operator must have 2 elements`)):W!=="string"&&J.push(new Ue(`${F}[1]`,_[1],`string expected, ${W} found`))}return J}function Nf(L,_){let F=L.key,N=L.validateSpec,W=L.style,J=L.styleSpec,ee=L.value,me=L.objectKey,Ce=J[`${_}_${L.layerType}`];if(!Ce)return[];let Ve=me.match(/^(.*)-transition$/);if(_==="paint"&&Ve&&Ce[Ve[1]]&&Ce[Ve[1]].transition)return N({key:F,value:ee,valueSpec:J.transition,style:W,styleSpec:J});let nt=L.valueSpec||Ce[me];if(!nt)return[new Ue(F,ee,`unknown property "${me}"`)];let wt;if(po(ee)==="string"&&bs(nt)&&!nt.tokens&&(wt=/^{([^}]+)}$/.exec(ee)))return[new Ue(F,ee,`"${me}" does not support interpolation syntax -Use an identity property function instead: \`{ "type": "identity", "property": ${JSON.stringify(wt[1])} }\`.`)];let Ct=[];return L.layerType==="symbol"&&(me==="text-field"&&W&&!W.glyphs&&Ct.push(new Ue(F,ee,'use of "text-field" requires a style "glyphs" property')),me==="text-font"&&uf(wl(ee))&&Lo(ee.type)==="identity"&&Ct.push(new Ue(F,ee,'"text-font" does not support identity functions'))),Ct.concat(N({key:L.key,value:ee,valueSpec:nt,style:W,styleSpec:J,expressionContext:"property",propertyType:_,propertyKey:me}))}function Uf(L){return Nf(L,"paint")}function uh(L){return Nf(L,"layout")}function Qh(L){let _=[],F=L.value,N=L.key,W=L.style,J=L.styleSpec;F.type||F.ref||_.push(new Ue(N,F,'either "type" or "ref" is required'));let ee=Lo(F.type),me=Lo(F.ref);if(F.id){let Ce=Lo(F.id);for(let Ve=0;Ve{Ve in F&&_.push(new Ue(N,F[Ve],`"${Ve}" is prohibited for ref layers`))})),W.layers.forEach((Ve=>{Lo(Ve.id)===me&&(Ce=Ve)})),Ce?Ce.ref?_.push(new Ue(N,F.ref,"ref cannot reference another ref layer")):ee=Lo(Ce.type):_.push(new Ue(N,F.ref,`ref layer "${me}" not found`))}else if(ee!=="background")if(F.source){let Ce=W.sources&&W.sources[F.source],Ve=Ce&&Lo(Ce.type);Ce?Ve==="vector"&&ee==="raster"?_.push(new Ue(N,F.source,`layer "${F.id}" requires a raster source`)):Ve!=="raster-dem"&&ee==="hillshade"?_.push(new Ue(N,F.source,`layer "${F.id}" requires a raster-dem source`)):Ve==="raster"&&ee!=="raster"?_.push(new Ue(N,F.source,`layer "${F.id}" requires a vector source`)):Ve!=="vector"||F["source-layer"]?Ve==="raster-dem"&&ee!=="hillshade"?_.push(new Ue(N,F.source,"raster-dem source can only be used with layer type 'hillshade'.")):ee!=="line"||!F.paint||!F.paint["line-gradient"]||Ve==="geojson"&&Ce.lineMetrics||_.push(new Ue(N,F,`layer "${F.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):_.push(new Ue(N,F,`layer "${F.id}" must specify a "source-layer"`)):_.push(new Ue(N,F.source,`source "${F.source}" not found`))}else _.push(new Ue(N,F,'missing required property "source"'));return _=_.concat(Dl({key:N,value:F,valueSpec:J.layer,style:L.style,styleSpec:L.styleSpec,validateSpec:L.validateSpec,objectElementValidators:{"*":()=>[],type:()=>L.validateSpec({key:`${N}.type`,value:F.type,valueSpec:J.layer.type,style:L.style,styleSpec:L.styleSpec,validateSpec:L.validateSpec,object:F,objectKey:"type"}),filter:ff,layout:Ce=>Dl({layer:F,key:Ce.key,value:Ce.value,style:Ce.style,styleSpec:Ce.styleSpec,validateSpec:Ce.validateSpec,objectElementValidators:{"*":Ve=>uh(ge({layerType:ee},Ve))}}),paint:Ce=>Dl({layer:F,key:Ce.key,value:Ce.value,style:Ce.style,styleSpec:Ce.styleSpec,validateSpec:Ce.validateSpec,objectElementValidators:{"*":Ve=>Uf(ge({layerType:ee},Ve))}})}})),_}function hf(L){let _=L.value,F=L.key,N=po(_);return N!=="string"?[new Ue(F,_,`string expected, ${N} found`)]:[]}let ch={promoteId:function({key:L,value:_}){if(po(_)==="string")return hf({key:L,value:_});{let F=[];for(let N in _)F.push(...hf({key:`${L}.${N}`,value:_[N]}));return F}}};function df(L){let _=L.value,F=L.key,N=L.styleSpec,W=L.style,J=L.validateSpec;if(!_.type)return[new Ue(F,_,'"type" is required')];let ee=Lo(_.type),me;switch(ee){case"vector":case"raster":return me=Dl({key:F,value:_,valueSpec:N[`source_${ee.replace("-","_")}`],style:L.style,styleSpec:N,objectElementValidators:ch,validateSpec:J}),me;case"raster-dem":return me=(function(Ce){var Ve;let nt=(Ve=Ce.sourceName)!==null&&Ve!==void 0?Ve:"",wt=Ce.value,Ct=Ce.styleSpec,Rt=Ct.source_raster_dem,jt=Ce.style,Qt=[],Ar=po(wt);if(wt===void 0)return Qt;if(Ar!=="object")return Qt.push(new Ue("source_raster_dem",wt,`object expected, ${Ar} found`)),Qt;let Pr=Lo(wt.encoding)==="custom",gn=["redFactor","greenFactor","blueFactor","baseShift"],Yr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let ln in wt)!Pr&&gn.includes(ln)?Qt.push(new Ue(ln,wt[ln],`In "${nt}": "${ln}" is only valid when "encoding" is set to "custom". ${Yr} encoding found`)):Rt[ln]?Qt=Qt.concat(Ce.validateSpec({key:ln,value:wt[ln],valueSpec:Rt[ln],validateSpec:Ce.validateSpec,style:jt,styleSpec:Ct})):Qt.push(new Ue(ln,wt[ln],`unknown property "${ln}"`));return Qt})({sourceName:F,value:_,style:L.style,styleSpec:N,validateSpec:J}),me;case"geojson":if(me=Dl({key:F,value:_,valueSpec:N.source_geojson,style:W,styleSpec:N,validateSpec:J,objectElementValidators:ch}),_.cluster)for(let Ce in _.clusterProperties){let[Ve,nt]=_.clusterProperties[Ce],wt=typeof Ve=="string"?[Ve,["accumulated"],["get",Ce]]:Ve;me.push(...Fc({key:`${F}.${Ce}.map`,value:nt,validateSpec:J,expressionContext:"cluster-map"})),me.push(...Fc({key:`${F}.${Ce}.reduce`,value:wt,validateSpec:J,expressionContext:"cluster-reduce"}))}return me;case"video":return Dl({key:F,value:_,valueSpec:N.source_video,style:W,validateSpec:J,styleSpec:N});case"image":return Dl({key:F,value:_,valueSpec:N.source_image,style:W,validateSpec:J,styleSpec:N});case"canvas":return[new Ue(F,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return nu({key:`${F}.type`,value:_.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:W,validateSpec:J,styleSpec:N})}}function sl(L){let _=L.value,F=L.styleSpec,N=F.light,W=L.style,J=[],ee=po(_);if(_===void 0)return J;if(ee!=="object")return J=J.concat([new Ue("light",_,`object expected, ${ee} found`)]),J;for(let me in _){let Ce=me.match(/^(.*)-transition$/);J=J.concat(Ce&&N[Ce[1]]&&N[Ce[1]].transition?L.validateSpec({key:me,value:_[me],valueSpec:F.transition,validateSpec:L.validateSpec,style:W,styleSpec:F}):N[me]?L.validateSpec({key:me,value:_[me],valueSpec:N[me],validateSpec:L.validateSpec,style:W,styleSpec:F}):[new Ue(me,_[me],`unknown property "${me}"`)])}return J}function Fu(L){let _=L.value,F=L.styleSpec,N=F.sky,W=L.style,J=po(_);if(_===void 0)return[];if(J!=="object")return[new Ue("sky",_,`object expected, ${J} found`)];let ee=[];for(let me in _)ee=ee.concat(N[me]?L.validateSpec({key:me,value:_[me],valueSpec:N[me],style:W,styleSpec:F}):[new Ue(me,_[me],`unknown property "${me}"`)]);return ee}function fh(L){let _=L.value,F=L.styleSpec,N=F.terrain,W=L.style,J=[],ee=po(_);if(_===void 0)return J;if(ee!=="object")return J=J.concat([new Ue("terrain",_,`object expected, ${ee} found`)]),J;for(let me in _)J=J.concat(N[me]?L.validateSpec({key:me,value:_[me],valueSpec:N[me],validateSpec:L.validateSpec,style:W,styleSpec:F}):[new Ue(me,_[me],`unknown property "${me}"`)]);return J}function ed(L){let _=[],F=L.value,N=L.key;if(Array.isArray(F)){let W=[],J=[];for(let ee in F)F[ee].id&&W.includes(F[ee].id)&&_.push(new Ue(N,F,`all the sprites' ids must be unique, but ${F[ee].id} is duplicated`)),W.push(F[ee].id),F[ee].url&&J.includes(F[ee].url)&&_.push(new Ue(N,F,`all the sprites' URLs must be unique, but ${F[ee].url} is duplicated`)),J.push(F[ee].url),_=_.concat(Dl({key:`${N}[${ee}]`,value:F[ee],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:L.validateSpec}));return _}return hf({key:N,value:F})}let vf={"*":()=>[],array:Bf,boolean:function(L){let _=L.value,F=L.key,N=po(_);return N!=="boolean"?[new Ue(F,_,`boolean expected, ${N} found`)]:[]},number:Of,color:function(L){let _=L.key,F=L.value,N=po(F);return N!=="string"?[new Ue(_,F,`color expected, ${N} found`)]:pa.parse(String(F))?[]:[new Ue(_,F,`color expected, "${F}" found`)]},constants:qf,enum:nu,filter:ff,function:Lc,layer:Qh,object:Dl,source:df,light:sl,sky:Fu,terrain:fh,projection:function(L){let _=L.value,F=L.styleSpec,N=F.projection,W=L.style,J=po(_);if(_===void 0)return[];if(J!=="object")return[new Ue("projection",_,`object expected, ${J} found`)];let ee=[];for(let me in _)ee=ee.concat(N[me]?L.validateSpec({key:me,value:_[me],valueSpec:N[me],style:W,styleSpec:F}):[new Ue(me,_[me],`unknown property "${me}"`)]);return ee},string:hf,formatted:function(L){return hf(L).length===0?[]:Fc(L)},resolvedImage:function(L){return hf(L).length===0?[]:Fc(L)},padding:function(L){let _=L.key,F=L.value;if(po(F)==="array"){if(F.length<1||F.length>4)return[new Ue(_,F,`padding requires 1 to 4 values; ${F.length} values found`)];let N={type:"number"},W=[];for(let J=0;J[]}})),L.constants&&(F=F.concat(qf({key:"constants",value:L.constants,style:L,styleSpec:_,validateSpec:Wu}))),Bt(F)}function Gt(L){return function(_){return L(Cg(uv({},_),{validateSpec:Wu}))}}function Bt(L){return[].concat(L).sort(((_,F)=>_.line-F.line))}function mr(L){return function(..._){return Bt(L.apply(this,_))}}yt.source=mr(Gt(df)),yt.sprite=mr(Gt(ed)),yt.glyphs=mr(Gt(Je)),yt.light=mr(Gt(sl)),yt.sky=mr(Gt(Fu)),yt.terrain=mr(Gt(fh)),yt.layer=mr(Gt(Qh)),yt.filter=mr(Gt(ff)),yt.paintProperty=mr(Gt(Uf)),yt.layoutProperty=mr(Gt(uh));let Ur=yt,en=Ur.light,mn=Ur.sky,An=Ur.paintProperty,Vn=Ur.layoutProperty;function tn(L,_){let F=!1;if(_&&_.length)for(let N of _)L.fire(new ye(new Error(N.message))),F=!0;return F}class nn{constructor(_,F,N){let W=this.cells=[];if(_ instanceof ArrayBuffer){this.arrayBuffer=_;let ee=new Int32Array(this.arrayBuffer);_=ee[0],this.d=(F=ee[1])+2*(N=ee[2]);for(let Ce=0;Ce=wt[jt+0]&&W>=wt[jt+1])?(me[Rt]=!0,ee.push(nt[Rt])):me[Rt]=!1}}}}_forEachCell(_,F,N,W,J,ee,me,Ce){let Ve=this._convertToCellCoord(_),nt=this._convertToCellCoord(F),wt=this._convertToCellCoord(N),Ct=this._convertToCellCoord(W);for(let Rt=Ve;Rt<=wt;Rt++)for(let jt=nt;jt<=Ct;jt++){let Qt=this.d*jt+Rt;if((!Ce||Ce(this._convertFromCellCoord(Rt),this._convertFromCellCoord(jt),this._convertFromCellCoord(Rt+1),this._convertFromCellCoord(jt+1)))&&J.call(this,_,F,N,W,Qt,ee,me,Ce))return}}_convertFromCellCoord(_){return(_-this.padding)/this.scale}_convertToCellCoord(_){return Math.max(0,Math.min(this.d-1,Math.floor(_*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let _=this.cells,F=3+this.cells.length+1+1,N=0;for(let ee=0;ee=0)continue;let ee=L[J];W[J]=dn[F].shallow.indexOf(J)>=0?ee:La(ee,_)}L instanceof Error&&(W.message=L.message)}if(W.$name)throw new Error("$name property is reserved for worker serialization logic.");return F!=="Object"&&(W.$name=F),W}function Va(L){if(Pa(L))return L;if(Array.isArray(L))return L.map(Va);if(typeof L!="object")throw new Error("can't deserialize object of type "+typeof L);let _=Ca(L)||"Object";if(!dn[_])throw new Error(`can't deserialize unregistered class ${_}`);let{klass:F}=dn[_];if(!F)throw new Error(`can't deserialize unregistered class ${_}`);if(F.deserialize)return F.deserialize(L);let N=Object.create(F.prototype);for(let W of Object.keys(L)){if(W==="$name")continue;let J=L[W];N[W]=dn[_].shallow.indexOf(W)>=0?J:Va(J)}return N}class na{constructor(){this.first=!0}update(_,F){let N=Math.floor(_);return this.first?(this.first=!1,this.lastIntegerZoom=N,this.lastIntegerZoomTime=0,this.lastZoom=_,this.lastFloorZoom=N,!0):(this.lastFloorZoom>N?(this.lastIntegerZoom=N+1,this.lastIntegerZoomTime=F):this.lastFloorZoomL>=128&&L<=255,"Hangul Jamo":L=>L>=4352&&L<=4607,Khmer:L=>L>=6016&&L<=6143,"General Punctuation":L=>L>=8192&&L<=8303,"Letterlike Symbols":L=>L>=8448&&L<=8527,"Number Forms":L=>L>=8528&&L<=8591,"Miscellaneous Technical":L=>L>=8960&&L<=9215,"Control Pictures":L=>L>=9216&&L<=9279,"Optical Character Recognition":L=>L>=9280&&L<=9311,"Enclosed Alphanumerics":L=>L>=9312&&L<=9471,"Geometric Shapes":L=>L>=9632&&L<=9727,"Miscellaneous Symbols":L=>L>=9728&&L<=9983,"Miscellaneous Symbols and Arrows":L=>L>=11008&&L<=11263,"Ideographic Description Characters":L=>L>=12272&&L<=12287,"CJK Symbols and Punctuation":L=>L>=12288&&L<=12351,Katakana:L=>L>=12448&&L<=12543,Kanbun:L=>L>=12688&&L<=12703,"CJK Strokes":L=>L>=12736&&L<=12783,"Enclosed CJK Letters and Months":L=>L>=12800&&L<=13055,"CJK Compatibility":L=>L>=13056&&L<=13311,"Yijing Hexagram Symbols":L=>L>=19904&&L<=19967,"Private Use Area":L=>L>=57344&&L<=63743,"Vertical Forms":L=>L>=65040&&L<=65055,"CJK Compatibility Forms":L=>L>=65072&&L<=65103,"Small Form Variants":L=>L>=65104&&L<=65135,"Halfwidth and Fullwidth Forms":L=>L>=65280&&L<=65519};function Ja(L){for(let _ of L)if(Vi(_.charCodeAt(0)))return!0;return!1}function pi(L){for(let _ of L)if(!Qi(_.charCodeAt(0)))return!1;return!0}function ji(L){let _=L.map((F=>{try{return new RegExp(`\\p{sc=${F}}`,"u").source}catch(N){return null}})).filter((F=>F));return new RegExp(_.join("|"),"u")}let Ao=ji(["Arab","Dupl","Mong","Ougr","Syrc"]);function Qi(L){return!Ao.test(String.fromCodePoint(L))}let zo=ji(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function Vi(L){return!(L!==746&&L!==747&&(L<4352||!(zn["CJK Compatibility Forms"](L)&&!(L>=65097&&L<=65103)||zn["CJK Compatibility"](L)||zn["CJK Strokes"](L)||!(!zn["CJK Symbols and Punctuation"](L)||L>=12296&&L<=12305||L>=12308&&L<=12319||L===12336)||zn["Enclosed CJK Letters and Months"](L)||zn["Ideographic Description Characters"](L)||zn.Kanbun(L)||zn.Katakana(L)&&L!==12540||!(!zn["Halfwidth and Fullwidth Forms"](L)||L===65288||L===65289||L===65293||L>=65306&&L<=65310||L===65339||L===65341||L===65343||L>=65371&&L<=65503||L===65507||L>=65512&&L<=65519)||!(!zn["Small Form Variants"](L)||L>=65112&&L<=65118||L>=65123&&L<=65126)||zn["Vertical Forms"](L)||zn["Yijing Hexagram Symbols"](L)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(L))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(L))||zo.test(String.fromCodePoint(L)))))}function Js(L){return!(Vi(L)||(function(_){return!!(zn["Latin-1 Supplement"](_)&&(_===167||_===169||_===174||_===177||_===188||_===189||_===190||_===215||_===247)||zn["General Punctuation"](_)&&(_===8214||_===8224||_===8225||_===8240||_===8241||_===8251||_===8252||_===8258||_===8263||_===8264||_===8265||_===8273)||zn["Letterlike Symbols"](_)||zn["Number Forms"](_)||zn["Miscellaneous Technical"](_)&&(_>=8960&&_<=8967||_>=8972&&_<=8991||_>=8996&&_<=9e3||_===9003||_>=9085&&_<=9114||_>=9150&&_<=9165||_===9167||_>=9169&&_<=9179||_>=9186&&_<=9215)||zn["Control Pictures"](_)&&_!==9251||zn["Optical Character Recognition"](_)||zn["Enclosed Alphanumerics"](_)||zn["Geometric Shapes"](_)||zn["Miscellaneous Symbols"](_)&&!(_>=9754&&_<=9759)||zn["Miscellaneous Symbols and Arrows"](_)&&(_>=11026&&_<=11055||_>=11088&&_<=11097||_>=11192&&_<=11243)||zn["CJK Symbols and Punctuation"](_)||zn.Katakana(_)||zn["Private Use Area"](_)||zn["CJK Compatibility Forms"](_)||zn["Small Form Variants"](_)||zn["Halfwidth and Fullwidth Forms"](_)||_===8734||_===8756||_===8757||_>=9984&&_<=10087||_>=10102&&_<=10131||_===65532||_===65533)})(L))}let cs=ji(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function Mo(L){return cs.test(String.fromCodePoint(L))}function ya(L,_){return!(!_&&Mo(L)||L>=2304&&L<=3583||L>=3840&&L<=4255||zn.Khmer(L))}function ho(L){for(let _ of L)if(Mo(_.charCodeAt(0)))return!0;return!1}let wo=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(L){this.pluginStatus=L.pluginStatus,this.pluginURL=L.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(L){this.applyArabicShaping=L.applyArabicShaping,this.processBidirectionalText=L.processBidirectionalText,this.processStyledBidirectionalText=L.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Yi{constructor(_,F){this.zoom=_,F?(this.now=F.now,this.fadeDuration=F.fadeDuration,this.zoomHistory=F.zoomHistory,this.transition=F.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new na,this.transition={})}isSupportedScript(_){return(function(F,N){for(let W of F)if(!ya(W.charCodeAt(0),N))return!1;return!0})(_,wo.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let _=this.zoom,F=_-Math.floor(_),N=this.crossFadingFactor();return _>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:F+(1-F)*N}:{fromScale:.5,toScale:1,t:1-(1-N)*F}}}class Vs{constructor(_,F){this.property=_,this.value=F,this.expression=(function(N,W){if(uf(N))return new Yc(N,W);if(sh(N)){let J=ic(N,W);if(J.result==="error")throw new Error(J.value.map((ee=>`${ee.key}: ${ee.message}`)).join(", "));return J.value}{let J=N;return W.type==="color"&&typeof N=="string"?J=pa.parse(N):W.type!=="padding"||typeof N!="number"&&!Array.isArray(N)?W.type==="variableAnchorOffsetCollection"&&Array.isArray(N)&&(J=Oi.parse(N)):J=fi.parse(N),{kind:"constant",evaluate:()=>J}}})(F===void 0?_.specification.default:F,_.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(_,F,N){return this.property.possiblyEvaluate(this,_,F,N)}}class xu{constructor(_){this.property=_,this.value=new Vs(_,void 0)}transitioned(_,F){return new Yu(this.property,this.value,F,k({},_.transition,this.transition),_.now)}untransitioned(){return new Yu(this.property,this.value,null,{},0)}}class au{constructor(_){this._properties=_,this._values=Object.create(_.defaultTransitionablePropertyValues)}getValue(_){return p(this._values[_].value.value)}setValue(_,F){Object.prototype.hasOwnProperty.call(this._values,_)||(this._values[_]=new xu(this._values[_].property)),this._values[_].value=new Vs(this._values[_].property,F===null?void 0:p(F))}getTransition(_){return p(this._values[_].transition)}setTransition(_,F){Object.prototype.hasOwnProperty.call(this._values,_)||(this._values[_]=new xu(this._values[_].property)),this._values[_].transition=p(F)||void 0}serialize(){let _={};for(let F of Object.keys(this._values)){let N=this.getValue(F);N!==void 0&&(_[F]=N);let W=this.getTransition(F);W!==void 0&&(_[`${F}-transition`]=W)}return _}transitioned(_,F){let N=new ll(this._properties);for(let W of Object.keys(this._values))N._values[W]=this._values[W].transitioned(_,F._values[W]);return N}untransitioned(){let _=new ll(this._properties);for(let F of Object.keys(this._values))_._values[F]=this._values[F].untransitioned();return _}}class Yu{constructor(_,F,N,W,J){this.property=_,this.value=F,this.begin=J+W.delay||0,this.end=this.begin+W.duration||0,_.specification.transition&&(W.delay||W.duration)&&(this.prior=N)}possiblyEvaluate(_,F,N){let W=_.now||0,J=this.value.possiblyEvaluate(_,F,N),ee=this.prior;if(ee){if(W>this.end)return this.prior=null,J;if(this.value.isDataDriven())return this.prior=null,J;if(W=1)return 1;let Ve=Ce*Ce,nt=Ve*Ce;return 4*(Ce<.5?nt:3*(Ce-Ve)+nt-.75)})(me))}}return J}}class ll{constructor(_){this._properties=_,this._values=Object.create(_.defaultTransitioningPropertyValues)}possiblyEvaluate(_,F,N){let W=new Pc(this._properties);for(let J of Object.keys(this._values))W._values[J]=this._values[J].possiblyEvaluate(_,F,N);return W}hasTransition(){for(let _ of Object.keys(this._values))if(this._values[_].prior)return!0;return!1}}class Pu{constructor(_){this._properties=_,this._values=Object.create(_.defaultPropertyValues)}hasValue(_){return this._values[_].value!==void 0}getValue(_){return p(this._values[_].value)}setValue(_,F){this._values[_]=new Vs(this._values[_].property,F===null?void 0:p(F))}serialize(){let _={};for(let F of Object.keys(this._values)){let N=this.getValue(F);N!==void 0&&(_[F]=N)}return _}possiblyEvaluate(_,F,N){let W=new Pc(this._properties);for(let J of Object.keys(this._values))W._values[J]=this._values[J].possiblyEvaluate(_,F,N);return W}}class ul{constructor(_,F,N){this.property=_,this.value=F,this.parameters=N}isConstant(){return this.value.kind==="constant"}constantOr(_){return this.value.kind==="constant"?this.value.value:_}evaluate(_,F,N,W){return this.property.evaluate(this.value,this.parameters,_,F,N,W)}}class Pc{constructor(_){this._properties=_,this._values=Object.create(_.defaultPossiblyEvaluatedValues)}get(_){return this._values[_]}}class Wa{constructor(_){this.specification=_}possiblyEvaluate(_,F){if(_.isDataDriven())throw new Error("Value should not be data driven");return _.expression.evaluate(F)}interpolate(_,F,N){let W=Mi[this.specification.type];return W?W(_,F,N):_}}class oi{constructor(_,F){this.specification=_,this.overrides=F}possiblyEvaluate(_,F,N,W){return new ul(this,_.expression.kind==="constant"||_.expression.kind==="camera"?{kind:"constant",value:_.expression.evaluate(F,null,{},N,W)}:_.expression,F)}interpolate(_,F,N){if(_.value.kind!=="constant"||F.value.kind!=="constant")return _;if(_.value.value===void 0||F.value.value===void 0)return new ul(this,{kind:"constant",value:void 0},_.parameters);let W=Mi[this.specification.type];if(W){let J=W(_.value.value,F.value.value,N);return new ul(this,{kind:"constant",value:J},_.parameters)}return _}evaluate(_,F,N,W,J,ee){return _.kind==="constant"?_.value:_.evaluate(F,N,W,J,ee)}}class Ph extends oi{possiblyEvaluate(_,F,N,W){if(_.value===void 0)return new ul(this,{kind:"constant",value:void 0},F);if(_.expression.kind==="constant"){let J=_.expression.evaluate(F,null,{},N,W),ee=_.property.specification.type==="resolvedImage"&&typeof J!="string"?J.name:J,me=this._calculate(ee,ee,ee,F);return new ul(this,{kind:"constant",value:me},F)}if(_.expression.kind==="camera"){let J=this._calculate(_.expression.evaluate({zoom:F.zoom-1}),_.expression.evaluate({zoom:F.zoom}),_.expression.evaluate({zoom:F.zoom+1}),F);return new ul(this,{kind:"constant",value:J},F)}return new ul(this,_.expression,F)}evaluate(_,F,N,W,J,ee){if(_.kind==="source"){let me=_.evaluate(F,N,W,J,ee);return this._calculate(me,me,me,F)}return _.kind==="composite"?this._calculate(_.evaluate({zoom:Math.floor(F.zoom)-1},N,W),_.evaluate({zoom:Math.floor(F.zoom)},N,W),_.evaluate({zoom:Math.floor(F.zoom)+1},N,W),F):_.value}_calculate(_,F,N,W){return W.zoom>W.zoomHistory.lastIntegerZoom?{from:_,to:F}:{from:N,to:F}}interpolate(_){return _}}class pf{constructor(_){this.specification=_}possiblyEvaluate(_,F,N,W){if(_.value!==void 0){if(_.expression.kind==="constant"){let J=_.expression.evaluate(F,null,{},N,W);return this._calculate(J,J,J,F)}return this._calculate(_.expression.evaluate(new Yi(Math.floor(F.zoom-1),F)),_.expression.evaluate(new Yi(Math.floor(F.zoom),F)),_.expression.evaluate(new Yi(Math.floor(F.zoom+1),F)),F)}}_calculate(_,F,N,W){return W.zoom>W.zoomHistory.lastIntegerZoom?{from:_,to:F}:{from:N,to:F}}interpolate(_){return _}}class iu{constructor(_){this.specification=_}possiblyEvaluate(_,F,N,W){return!!_.expression.evaluate(F,null,{},N,W)}interpolate(){return!1}}class K{constructor(_){this.properties=_,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let F in _){let N=_[F];N.specification.overridable&&this.overridableProperties.push(F);let W=this.defaultPropertyValues[F]=new Vs(N,void 0),J=this.defaultTransitionablePropertyValues[F]=new xu(N);this.defaultTransitioningPropertyValues[F]=J.untransitioned(),this.defaultPossiblyEvaluatedValues[F]=W.possiblyEvaluate({})}}}Wr("DataDrivenProperty",oi),Wr("DataConstantProperty",Wa),Wr("CrossFadedDataDrivenProperty",Ph),Wr("CrossFadedProperty",pf),Wr("ColorRampProperty",iu);let b="-transition";class I extends Pe{constructor(_,F){if(super(),this.id=_.id,this.type=_.type,this._featureFilter={filter:()=>!0,needGeometry:!1},_.type!=="custom"&&(this.metadata=_.metadata,this.minzoom=_.minzoom,this.maxzoom=_.maxzoom,_.type!=="background"&&(this.source=_.source,this.sourceLayer=_["source-layer"],this.filter=_.filter),F.layout&&(this._unevaluatedLayout=new Pu(F.layout)),F.paint)){this._transitionablePaint=new au(F.paint);for(let N in _.paint)this.setPaintProperty(N,_.paint[N],{validate:!1});for(let N in _.layout)this.setLayoutProperty(N,_.layout[N],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Pc(F.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(_){return _==="visibility"?this.visibility:this._unevaluatedLayout.getValue(_)}setLayoutProperty(_,F,N={}){F!=null&&this._validate(Vn,`layers.${this.id}.layout.${_}`,_,F,N)||(_!=="visibility"?this._unevaluatedLayout.setValue(_,F):this.visibility=F)}getPaintProperty(_){return _.endsWith(b)?this._transitionablePaint.getTransition(_.slice(0,-11)):this._transitionablePaint.getValue(_)}setPaintProperty(_,F,N={}){if(F!=null&&this._validate(An,`layers.${this.id}.paint.${_}`,_,F,N))return!1;if(_.endsWith(b))return this._transitionablePaint.setTransition(_.slice(0,-11),F||void 0),!1;{let W=this._transitionablePaint._values[_],J=W.property.specification["property-type"]==="cross-faded-data-driven",ee=W.value.isDataDriven(),me=W.value;this._transitionablePaint.setValue(_,F),this._handleSpecialPaintPropertyUpdate(_);let Ce=this._transitionablePaint._values[_].value;return Ce.isDataDriven()||ee||J||this._handleOverridablePaintPropertyUpdate(_,me,Ce)}}_handleSpecialPaintPropertyUpdate(_){}_handleOverridablePaintPropertyUpdate(_,F,N){return!1}isHidden(_){return!!(this.minzoom&&_=this.maxzoom)||this.visibility==="none"}updateTransitions(_){this._transitioningPaint=this._transitionablePaint.transitioned(_,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(_,F){_.getCrossfadeParameters&&(this._crossfadeParameters=_.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(_,void 0,F)),this.paint=this._transitioningPaint.possiblyEvaluate(_,void 0,F)}serialize(){let _={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&&(_.layout=_.layout||{},_.layout.visibility=this.visibility),T(_,((F,N)=>!(F===void 0||N==="layout"&&!Object.keys(F).length||N==="paint"&&!Object.keys(F).length)))}_validate(_,F,N,W,J={}){return(!J||J.validate!==!1)&&tn(this,_.call(Ur,{key:F,layerType:this.type,objectKey:N,value:W,styleSpec:le,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let _ in this.paint._values){let F=this.paint.get(_);if(F instanceof ul&&bs(F.property.specification)&&(F.value.kind==="source"||F.value.kind==="composite")&&F.value.isStateDependent)return!0}return!1}}let G={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class H{constructor(_,F){this._structArray=_,this._pos1=F*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class ${constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(_,F){return _._trim(),F&&(_.isTransferred=!0,F.push(_.arrayBuffer)),{length:_.length,arrayBuffer:_.arrayBuffer}}static deserialize(_){let F=Object.create(this.prototype);return F.arrayBuffer=_.arrayBuffer,F.length=_.length,F.capacity=_.arrayBuffer.byteLength/F.bytesPerElement,F._refreshViews(),F}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(_){this.reserve(_),this.length=_}reserve(_){if(_>this.capacity){this.capacity=Math.max(_,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let F=this.uint8;this._refreshViews(),F&&this.uint8.set(F)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function xe(L,_=1){let F=0,N=0;return{members:L.map((W=>{let J=G[W.type].BYTES_PER_ELEMENT,ee=F=ke(F,Math.max(_,J)),me=W.components||1;return N=Math.max(N,J),F+=J*me,{name:W.name,type:W.type,components:me,offset:ee}})),size:ke(F,Math.max(N,_)),alignment:_}}function ke(L,_){return Math.ceil(L/_)*_}class Ne extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(_,F){let N=this.length;return this.resize(N+1),this.emplace(N,_,F)}emplace(_,F,N){let W=2*_;return this.int16[W+0]=F,this.int16[W+1]=N,_}}Ne.prototype.bytesPerElement=4,Wr("StructArrayLayout2i4",Ne);class et extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(_,F,N){let W=this.length;return this.resize(W+1),this.emplace(W,_,F,N)}emplace(_,F,N,W){let J=3*_;return this.int16[J+0]=F,this.int16[J+1]=N,this.int16[J+2]=W,_}}et.prototype.bytesPerElement=6,Wr("StructArrayLayout3i6",et);class bt extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(_,F,N,W){let J=this.length;return this.resize(J+1),this.emplace(J,_,F,N,W)}emplace(_,F,N,W,J){let ee=4*_;return this.int16[ee+0]=F,this.int16[ee+1]=N,this.int16[ee+2]=W,this.int16[ee+3]=J,_}}bt.prototype.bytesPerElement=8,Wr("StructArrayLayout4i8",bt);class Tt extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(_,F,N,W,J,ee){let me=this.length;return this.resize(me+1),this.emplace(me,_,F,N,W,J,ee)}emplace(_,F,N,W,J,ee,me){let Ce=6*_;return this.int16[Ce+0]=F,this.int16[Ce+1]=N,this.int16[Ce+2]=W,this.int16[Ce+3]=J,this.int16[Ce+4]=ee,this.int16[Ce+5]=me,_}}Tt.prototype.bytesPerElement=12,Wr("StructArrayLayout2i4i12",Tt);class zt extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(_,F,N,W,J,ee){let me=this.length;return this.resize(me+1),this.emplace(me,_,F,N,W,J,ee)}emplace(_,F,N,W,J,ee,me){let Ce=4*_,Ve=8*_;return this.int16[Ce+0]=F,this.int16[Ce+1]=N,this.uint8[Ve+4]=W,this.uint8[Ve+5]=J,this.uint8[Ve+6]=ee,this.uint8[Ve+7]=me,_}}zt.prototype.bytesPerElement=8,Wr("StructArrayLayout2i4ub8",zt);class Yt extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(_,F){let N=this.length;return this.resize(N+1),this.emplace(N,_,F)}emplace(_,F,N){let W=2*_;return this.float32[W+0]=F,this.float32[W+1]=N,_}}Yt.prototype.bytesPerElement=8,Wr("StructArrayLayout2f8",Yt);class Q extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(_,F,N,W,J,ee,me,Ce,Ve,nt){let wt=this.length;return this.resize(wt+1),this.emplace(wt,_,F,N,W,J,ee,me,Ce,Ve,nt)}emplace(_,F,N,W,J,ee,me,Ce,Ve,nt,wt){let Ct=10*_;return this.uint16[Ct+0]=F,this.uint16[Ct+1]=N,this.uint16[Ct+2]=W,this.uint16[Ct+3]=J,this.uint16[Ct+4]=ee,this.uint16[Ct+5]=me,this.uint16[Ct+6]=Ce,this.uint16[Ct+7]=Ve,this.uint16[Ct+8]=nt,this.uint16[Ct+9]=wt,_}}Q.prototype.bytesPerElement=20,Wr("StructArrayLayout10ui20",Q);class ae extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct){let Rt=this.length;return this.resize(Rt+1),this.emplace(Rt,_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct)}emplace(_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct,Rt){let jt=12*_;return this.int16[jt+0]=F,this.int16[jt+1]=N,this.int16[jt+2]=W,this.int16[jt+3]=J,this.uint16[jt+4]=ee,this.uint16[jt+5]=me,this.uint16[jt+6]=Ce,this.uint16[jt+7]=Ve,this.int16[jt+8]=nt,this.int16[jt+9]=wt,this.int16[jt+10]=Ct,this.int16[jt+11]=Rt,_}}ae.prototype.bytesPerElement=24,Wr("StructArrayLayout4i4ui4i24",ae);class ve extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(_,F,N){let W=this.length;return this.resize(W+1),this.emplace(W,_,F,N)}emplace(_,F,N,W){let J=3*_;return this.float32[J+0]=F,this.float32[J+1]=N,this.float32[J+2]=W,_}}ve.prototype.bytesPerElement=12,Wr("StructArrayLayout3f12",ve);class be extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(_){let F=this.length;return this.resize(F+1),this.emplace(F,_)}emplace(_,F){return this.uint32[1*_+0]=F,_}}be.prototype.bytesPerElement=4,Wr("StructArrayLayout1ul4",be);class De extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(_,F,N,W,J,ee,me,Ce,Ve){let nt=this.length;return this.resize(nt+1),this.emplace(nt,_,F,N,W,J,ee,me,Ce,Ve)}emplace(_,F,N,W,J,ee,me,Ce,Ve,nt){let wt=10*_,Ct=5*_;return this.int16[wt+0]=F,this.int16[wt+1]=N,this.int16[wt+2]=W,this.int16[wt+3]=J,this.int16[wt+4]=ee,this.int16[wt+5]=me,this.uint32[Ct+3]=Ce,this.uint16[wt+8]=Ve,this.uint16[wt+9]=nt,_}}De.prototype.bytesPerElement=20,Wr("StructArrayLayout6i1ul2ui20",De);class Se extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(_,F,N,W,J,ee){let me=this.length;return this.resize(me+1),this.emplace(me,_,F,N,W,J,ee)}emplace(_,F,N,W,J,ee,me){let Ce=6*_;return this.int16[Ce+0]=F,this.int16[Ce+1]=N,this.int16[Ce+2]=W,this.int16[Ce+3]=J,this.int16[Ce+4]=ee,this.int16[Ce+5]=me,_}}Se.prototype.bytesPerElement=12,Wr("StructArrayLayout2i2i2i12",Se);class Be extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(_,F,N,W,J){let ee=this.length;return this.resize(ee+1),this.emplace(ee,_,F,N,W,J)}emplace(_,F,N,W,J,ee){let me=4*_,Ce=8*_;return this.float32[me+0]=F,this.float32[me+1]=N,this.float32[me+2]=W,this.int16[Ce+6]=J,this.int16[Ce+7]=ee,_}}Be.prototype.bytesPerElement=16,Wr("StructArrayLayout2f1f2i16",Be);class ut extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(_,F,N,W,J,ee){let me=this.length;return this.resize(me+1),this.emplace(me,_,F,N,W,J,ee)}emplace(_,F,N,W,J,ee,me){let Ce=16*_,Ve=4*_,nt=8*_;return this.uint8[Ce+0]=F,this.uint8[Ce+1]=N,this.float32[Ve+1]=W,this.float32[Ve+2]=J,this.int16[nt+6]=ee,this.int16[nt+7]=me,_}}ut.prototype.bytesPerElement=16,Wr("StructArrayLayout2ub2f2i16",ut);class gt extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(_,F,N){let W=this.length;return this.resize(W+1),this.emplace(W,_,F,N)}emplace(_,F,N,W){let J=3*_;return this.uint16[J+0]=F,this.uint16[J+1]=N,this.uint16[J+2]=W,_}}gt.prototype.bytesPerElement=6,Wr("StructArrayLayout3ui6",gt);class Mt extends ${_refreshViews(){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)}emplaceBack(_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct,Rt,jt,Qt,Ar,Pr){let gn=this.length;return this.resize(gn+1),this.emplace(gn,_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct,Rt,jt,Qt,Ar,Pr)}emplace(_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct,Rt,jt,Qt,Ar,Pr,gn){let Yr=24*_,ln=12*_,Bn=48*_;return this.int16[Yr+0]=F,this.int16[Yr+1]=N,this.uint16[Yr+2]=W,this.uint16[Yr+3]=J,this.uint32[ln+2]=ee,this.uint32[ln+3]=me,this.uint32[ln+4]=Ce,this.uint16[Yr+10]=Ve,this.uint16[Yr+11]=nt,this.uint16[Yr+12]=wt,this.float32[ln+7]=Ct,this.float32[ln+8]=Rt,this.uint8[Bn+36]=jt,this.uint8[Bn+37]=Qt,this.uint8[Bn+38]=Ar,this.uint32[ln+10]=Pr,this.int16[Yr+22]=gn,_}}Mt.prototype.bytesPerElement=48,Wr("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Mt);class Ft extends ${_refreshViews(){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)}emplaceBack(_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct,Rt,jt,Qt,Ar,Pr,gn,Yr,ln,Bn,ga,Za,Ii,Ya,Ua,gi,ai){let Qa=this.length;return this.resize(Qa+1),this.emplace(Qa,_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct,Rt,jt,Qt,Ar,Pr,gn,Yr,ln,Bn,ga,Za,Ii,Ya,Ua,gi,ai)}emplace(_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct,Rt,jt,Qt,Ar,Pr,gn,Yr,ln,Bn,ga,Za,Ii,Ya,Ua,gi,ai,Qa){let Zn=32*_,wi=16*_;return this.int16[Zn+0]=F,this.int16[Zn+1]=N,this.int16[Zn+2]=W,this.int16[Zn+3]=J,this.int16[Zn+4]=ee,this.int16[Zn+5]=me,this.int16[Zn+6]=Ce,this.int16[Zn+7]=Ve,this.uint16[Zn+8]=nt,this.uint16[Zn+9]=wt,this.uint16[Zn+10]=Ct,this.uint16[Zn+11]=Rt,this.uint16[Zn+12]=jt,this.uint16[Zn+13]=Qt,this.uint16[Zn+14]=Ar,this.uint16[Zn+15]=Pr,this.uint16[Zn+16]=gn,this.uint16[Zn+17]=Yr,this.uint16[Zn+18]=ln,this.uint16[Zn+19]=Bn,this.uint16[Zn+20]=ga,this.uint16[Zn+21]=Za,this.uint16[Zn+22]=Ii,this.uint32[wi+12]=Ya,this.float32[wi+13]=Ua,this.float32[wi+14]=gi,this.uint16[Zn+30]=ai,this.uint16[Zn+31]=Qa,_}}Ft.prototype.bytesPerElement=64,Wr("StructArrayLayout8i15ui1ul2f2ui64",Ft);class Ot extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(_){let F=this.length;return this.resize(F+1),this.emplace(F,_)}emplace(_,F){return this.float32[1*_+0]=F,_}}Ot.prototype.bytesPerElement=4,Wr("StructArrayLayout1f4",Ot);class er extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(_,F,N){let W=this.length;return this.resize(W+1),this.emplace(W,_,F,N)}emplace(_,F,N,W){let J=3*_;return this.uint16[6*_+0]=F,this.float32[J+1]=N,this.float32[J+2]=W,_}}er.prototype.bytesPerElement=12,Wr("StructArrayLayout1ui2f12",er);class sr extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(_,F,N){let W=this.length;return this.resize(W+1),this.emplace(W,_,F,N)}emplace(_,F,N,W){let J=4*_;return this.uint32[2*_+0]=F,this.uint16[J+2]=N,this.uint16[J+3]=W,_}}sr.prototype.bytesPerElement=8,Wr("StructArrayLayout1ul2ui8",sr);class wr extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(_,F){let N=this.length;return this.resize(N+1),this.emplace(N,_,F)}emplace(_,F,N){let W=2*_;return this.uint16[W+0]=F,this.uint16[W+1]=N,_}}wr.prototype.bytesPerElement=4,Wr("StructArrayLayout2ui4",wr);class Gr extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(_){let F=this.length;return this.resize(F+1),this.emplace(F,_)}emplace(_,F){return this.uint16[1*_+0]=F,_}}Gr.prototype.bytesPerElement=2,Wr("StructArrayLayout1ui2",Gr);class pn extends ${_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(_,F,N,W){let J=this.length;return this.resize(J+1),this.emplace(J,_,F,N,W)}emplace(_,F,N,W,J){let ee=4*_;return this.float32[ee+0]=F,this.float32[ee+1]=N,this.float32[ee+2]=W,this.float32[ee+3]=J,_}}pn.prototype.bytesPerElement=16,Wr("StructArrayLayout4f16",pn);class cn extends H{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new u(this.anchorPointX,this.anchorPointY)}}cn.prototype.size=20;class kn extends De{get(_){return new cn(this,_)}}Wr("CollisionBoxArray",kn);class ta extends H{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(_){this._structArray.uint8[this._pos1+37]=_}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(_){this._structArray.uint8[this._pos1+38]=_}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(_){this._structArray.uint32[this._pos4+10]=_}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}ta.prototype.size=48;class ka extends Mt{get(_){return new ta(this,_)}}Wr("PlacedSymbolArray",ka);class va extends H{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(_){this._structArray.uint32[this._pos4+12]=_}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}va.prototype.size=64;class Xa extends Ft{get(_){return new va(this,_)}}Wr("SymbolInstanceArray",Xa);class Ai extends Ot{getoffsetX(_){return this.float32[1*_+0]}}Wr("GlyphOffsetArray",Ai);class di extends et{getx(_){return this.int16[3*_+0]}gety(_){return this.int16[3*_+1]}gettileUnitDistanceFromAnchor(_){return this.int16[3*_+2]}}Wr("SymbolLineVertexArray",di);class xo extends H{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}xo.prototype.size=12;class Xi extends er{get(_){return new xo(this,_)}}Wr("TextAnchorOffsetArray",Xi);class Wo extends H{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Wo.prototype.size=8;class fs extends sr{get(_){return new Wo(this,_)}}Wr("FeatureIndexArray",fs);class ws extends Ne{}class qo extends Ne{}class Jo extends Ne{}class Tl extends Tt{}class bu extends zt{}class Gl extends Yt{}class zs extends Q{}class Du extends ae{}class _u extends ve{}class Qs extends be{}class Al extends Se{}class V extends ut{}class Z extends gt{}class ie extends wr{}let _e=xe([{name:"a_pos",components:2,type:"Int16"}],4),{members:Me}=_e;class Le{constructor(_=[]){this.segments=_}prepareSegment(_,F,N,W){let J=this.segments[this.segments.length-1];return _>Le.MAX_VERTEX_ARRAY_LENGTH&&A(`Max vertices per segment is ${Le.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${_}`),(!J||J.vertexLength+_>Le.MAX_VERTEX_ARRAY_LENGTH||J.sortKey!==W)&&(J={vertexOffset:F.length,primitiveOffset:N.length,vertexLength:0,primitiveLength:0},W!==void 0&&(J.sortKey=W),this.segments.push(J)),J}get(){return this.segments}destroy(){for(let _ of this.segments)for(let F in _.vaos)_.vaos[F].destroy()}static simpleSegment(_,F,N,W){return new Le([{vertexOffset:_,primitiveOffset:F,vertexLength:N,primitiveLength:W,vaos:{},sortKey:0}])}}function at(L,_){return 256*(L=M(Math.floor(L),0,255))+M(Math.floor(_),0,255)}Le.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Wr("SegmentVector",Le);let je=xe([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var xt={exports:{}},Dt={exports:{}};Dt.exports=function(L,_){var F,N,W,J,ee,me,Ce,Ve;for(N=L.length-(F=3&L.length),W=_,ee=3432918353,me=461845907,Ve=0;Ve>>16)*ee&65535)<<16)&4294967295)<<15|Ce>>>17))*me+(((Ce>>>16)*me&65535)<<16)&4294967295)<<13|W>>>19))+((5*(W>>>16)&65535)<<16)&4294967295))+((58964+(J>>>16)&65535)<<16);switch(Ce=0,F){case 3:Ce^=(255&L.charCodeAt(Ve+2))<<16;case 2:Ce^=(255&L.charCodeAt(Ve+1))<<8;case 1:W^=Ce=(65535&(Ce=(Ce=(65535&(Ce^=255&L.charCodeAt(Ve)))*ee+(((Ce>>>16)*ee&65535)<<16)&4294967295)<<15|Ce>>>17))*me+(((Ce>>>16)*me&65535)<<16)&4294967295}return W^=L.length,W=2246822507*(65535&(W^=W>>>16))+((2246822507*(W>>>16)&65535)<<16)&4294967295,W=3266489909*(65535&(W^=W>>>13))+((3266489909*(W>>>16)&65535)<<16)&4294967295,(W^=W>>>16)>>>0};var It=Dt.exports,ar={exports:{}};ar.exports=function(L,_){for(var F,N=L.length,W=_^N,J=0;N>=4;)F=1540483477*(65535&(F=255&L.charCodeAt(J)|(255&L.charCodeAt(++J))<<8|(255&L.charCodeAt(++J))<<16|(255&L.charCodeAt(++J))<<24))+((1540483477*(F>>>16)&65535)<<16),W=1540483477*(65535&W)+((1540483477*(W>>>16)&65535)<<16)^(F=1540483477*(65535&(F^=F>>>24))+((1540483477*(F>>>16)&65535)<<16)),N-=4,++J;switch(N){case 3:W^=(255&L.charCodeAt(J+2))<<16;case 2:W^=(255&L.charCodeAt(J+1))<<8;case 1:W=1540483477*(65535&(W^=255&L.charCodeAt(J)))+((1540483477*(W>>>16)&65535)<<16)}return W=1540483477*(65535&(W^=W>>>13))+((1540483477*(W>>>16)&65535)<<16),(W^=W>>>15)>>>0};var rr=It,Dr=ar.exports;xt.exports=rr,xt.exports.murmur3=rr,xt.exports.murmur2=Dr;var Hr=o(xt.exports);class hr{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(_,F,N,W){this.ids.push(Tr(_)),this.positions.push(F,N,W)}getPositions(_){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let F=Tr(_),N=0,W=this.ids.length-1;for(;N>1;this.ids[ee]>=F?W=ee:N=ee+1}let J=[];for(;this.ids[N]===F;)J.push({index:this.positions[3*N],start:this.positions[3*N+1],end:this.positions[3*N+2]}),N++;return J}static serialize(_,F){let N=new Float64Array(_.ids),W=new Uint32Array(_.positions);return Lr(N,W,0,N.length-1),F&&F.push(N.buffer,W.buffer),{ids:N,positions:W}}static deserialize(_){let F=new hr;return F.ids=_.ids,F.positions=_.positions,F.indexed=!0,F}}function Tr(L){let _=+L;return!isNaN(_)&&_<=Number.MAX_SAFE_INTEGER?_:Hr(String(L))}function Lr(L,_,F,N){for(;F>1],J=F-1,ee=N+1;for(;;){do J++;while(L[J]W);if(J>=ee)break;Vr(L,J,ee),Vr(_,3*J,3*ee),Vr(_,3*J+1,3*ee+1),Vr(_,3*J+2,3*ee+2)}ee-F`u_${W}`)),this.type=N}setUniform(_,F,N){_.set(N.constantOr(this.value))}getBinding(_,F,N){return this.type==="color"?new On(_,F):new br(_,F)}}class za{constructor(_,F){this.uniformNames=F.map((N=>`u_${N}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(_,F){this.pixelRatioFrom=F.pixelRatio,this.pixelRatioTo=_.pixelRatio,this.patternFrom=F.tlbr,this.patternTo=_.tlbr}setUniform(_,F,N,W){let J=W==="u_pattern_to"?this.patternTo:W==="u_pattern_from"?this.patternFrom:W==="u_pixel_ratio_to"?this.pixelRatioTo:W==="u_pixel_ratio_from"?this.pixelRatioFrom:null;J&&_.set(J)}getBinding(_,F,N){return N.substr(0,9)==="u_pattern"?new Ln(_,F):new br(_,F)}}class bi{constructor(_,F,N,W){this.expression=_,this.type=N,this.maxValue=0,this.paintVertexAttributes=F.map((J=>({name:`a_${J}`,type:"Float32",components:N==="color"?2:1,offset:0}))),this.paintVertexArray=new W}populatePaintArray(_,F,N,W,J){let ee=this.paintVertexArray.length,me=this.expression.evaluate(new Yi(0),F,{},W,[],J);this.paintVertexArray.resize(_),this._setPaintValue(ee,_,me)}updatePaintArray(_,F,N,W){let J=this.expression.evaluate({zoom:0},N,W);this._setPaintValue(_,F,J)}_setPaintValue(_,F,N){if(this.type==="color"){let W=xa(N);for(let J=_;J`u_${me}_t`)),this.type=N,this.useIntegerZoom=W,this.zoom=J,this.maxValue=0,this.paintVertexAttributes=F.map((me=>({name:`a_${me}`,type:"Float32",components:N==="color"?4:2,offset:0}))),this.paintVertexArray=new ee}populatePaintArray(_,F,N,W,J){let ee=this.expression.evaluate(new Yi(this.zoom),F,{},W,[],J),me=this.expression.evaluate(new Yi(this.zoom+1),F,{},W,[],J),Ce=this.paintVertexArray.length;this.paintVertexArray.resize(_),this._setPaintValue(Ce,_,ee,me)}updatePaintArray(_,F,N,W){let J=this.expression.evaluate({zoom:this.zoom},N,W),ee=this.expression.evaluate({zoom:this.zoom+1},N,W);this._setPaintValue(_,F,J,ee)}_setPaintValue(_,F,N,W){if(this.type==="color"){let J=xa(N),ee=xa(W);for(let me=_;me`#define HAS_UNIFORM_${W}`)))}return _}getBinderAttributes(){let _=[];for(let F in this.binders){let N=this.binders[F];if(N instanceof bi||N instanceof Da)for(let W=0;W!0)){this.programConfigurations={};for(let W of _)this.programConfigurations[W.id]=new Fo(W,F,N);this.needsUpload=!1,this._featureMap=new hr,this._bufferOffset=0}populatePaintArrays(_,F,N,W,J,ee){for(let me in this.programConfigurations)this.programConfigurations[me].populatePaintArrays(_,F,W,J,ee);F.id!==void 0&&this._featureMap.add(F.id,N,this._bufferOffset,_),this._bufferOffset=_,this.needsUpload=!0}updatePaintArrays(_,F,N,W){for(let J of N)this.needsUpload=this.programConfigurations[J.id].updatePaintArrays(_,this._featureMap,F,J,W)||this.needsUpload}get(_){return this.programConfigurations[_]}upload(_){if(this.needsUpload){for(let F in this.programConfigurations)this.programConfigurations[F].upload(_);this.needsUpload=!1}}destroy(){for(let _ in this.programConfigurations)this.programConfigurations[_].destroy()}}function Yo(L,_){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[L]||[L.replace(`${_}-`,"").replace(/-/g,"_")]}function ma(L,_,F){let N={color:{source:Yt,composite:pn},number:{source:Ot,composite:Yt}},W=(function(J){return{"line-pattern":{source:zs,composite:zs},"fill-pattern":{source:zs,composite:zs},"fill-extrusion-pattern":{source:zs,composite:zs}}[J]})(L);return W&&W[F]||N[_][F]}Wr("ConstantBinder",Ba),Wr("CrossFadedConstantBinder",za),Wr("SourceExpressionBinder",bi),Wr("CrossFadedCompositeBinder",si),Wr("CompositeExpressionBinder",Da),Wr("ProgramConfiguration",Fo,{omit:["_buffers"]}),Wr("ProgramConfigurationSet",Ps);let $a=8192,Ri=Math.pow(2,14)-1,To=-Ri-1;function Qo(L){let _=$a/L.extent,F=L.loadGeometry();for(let N=0;Nee.x+1||Ceee.y+1)&&A("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return F}function Gs(L,_){return{type:L.type,id:L.id,properties:L.properties,geometry:_?Qo(L):[]}}function ou(L,_,F,N,W){L.emplaceBack(2*_+(N+1)/2,2*F+(W+1)/2)}class wu{constructor(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map((F=>F.id)),this.index=_.index,this.hasPattern=!1,this.layoutVertexArray=new qo,this.indexArray=new Z,this.segments=new Le,this.programConfigurations=new Ps(_.layers,_.zoom),this.stateDependentLayerIds=this.layers.filter((F=>F.isStateDependent())).map((F=>F.id))}populate(_,F,N){let W=this.layers[0],J=[],ee=null,me=!1;W.type==="circle"&&(ee=W.layout.get("circle-sort-key"),me=!ee.isConstant());for(let{feature:Ce,id:Ve,index:nt,sourceLayerIndex:wt}of _){let Ct=this.layers[0]._featureFilter.needGeometry,Rt=Gs(Ce,Ct);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),Rt,N))continue;let jt=me?ee.evaluate(Rt,{},N):void 0,Qt={id:Ve,properties:Ce.properties,type:Ce.type,sourceLayerIndex:wt,index:nt,geometry:Ct?Rt.geometry:Qo(Ce),patterns:{},sortKey:jt};J.push(Qt)}me&&J.sort(((Ce,Ve)=>Ce.sortKey-Ve.sortKey));for(let Ce of J){let{geometry:Ve,index:nt,sourceLayerIndex:wt}=Ce,Ct=_[nt].feature;this.addFeature(Ce,Ve,nt,N),F.featureIndex.insert(Ct,Ve,nt,wt,this.index)}}update(_,F,N){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(_,F,this.stateDependentLayers,N)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(_){this.uploaded||(this.layoutVertexBuffer=_.createVertexBuffer(this.layoutVertexArray,Me),this.indexBuffer=_.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(_),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(_,F,N,W){for(let J of F)for(let ee of J){let me=ee.x,Ce=ee.y;if(me<0||me>=$a||Ce<0||Ce>=$a)continue;let Ve=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,_.sortKey),nt=Ve.vertexLength;ou(this.layoutVertexArray,me,Ce,-1,-1),ou(this.layoutVertexArray,me,Ce,1,-1),ou(this.layoutVertexArray,me,Ce,1,1),ou(this.layoutVertexArray,me,Ce,-1,1),this.indexArray.emplaceBack(nt,nt+1,nt+2),this.indexArray.emplaceBack(nt,nt+3,nt+2),Ve.vertexLength+=4,Ve.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,_,N,{},W)}}function Dc(L,_){for(let F=0;F1){if(Kt(L,_))return!0;for(let N=0;N<_.length;N++)if(dr(_[N],L,F))return!0}for(let N=0;N1?F:F.sub(_)._mult(W)._add(_))}function Rr(L,_){let F,N,W,J=!1;for(let ee=0;ee_.y!=W.y>_.y&&_.x<(W.x-N.x)*(_.y-N.y)/(W.y-N.y)+N.x&&(J=!J)}return J}function Xr(L,_){let F=!1;for(let N=0,W=L.length-1;N_.y!=ee.y>_.y&&_.x<(ee.x-J.x)*(_.y-J.y)/(ee.y-J.y)+J.x&&(F=!F)}return F}function $r(L,_,F){let N=F[0],W=F[2];if(L.xW.x&&_.x>W.x||L.yW.y&&_.y>W.y)return!1;let J=P(L,_,F[0]);return J!==P(L,_,F[1])||J!==P(L,_,F[2])||J!==P(L,_,F[3])}function Kr(L,_,F){let N=_.paint.get(L).value;return N.kind==="constant"?N.value:F.programConfigurations.get(_.id).getMaxValue(L)}function Hn(L){return Math.sqrt(L[0]*L[0]+L[1]*L[1])}function Cn(L,_,F,N,W){if(!_[0]&&!_[1])return L;let J=u.convert(_)._mult(W);F==="viewport"&&J._rotate(-N);let ee=[];for(let me=0;meMr(Ar,Qt)))})(Ve,Ce),Rt=wt?nt*me:nt;for(let jt of W)for(let Qt of jt){let Ar=wt?Qt:Mr(Qt,Ce),Pr=Rt,gn=Gn([],[Qt.x,Qt.y,0,1],Ce);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?Pr*=gn[3]/ee.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(Pr*=ee.cameraToCenterDistance/gn[3]),pe(Ct,Ar,Pr))return!0}return!1}}function Mr(L,_){let F=Gn([],[L.x,L.y,0,1],_);return new u(F[0]/F[3],F[1]/F[3])}class _n extends wu{}let an;Wr("HeatmapBucket",_n,{omit:["layers"]});var Jr={get paint(){return an=an||new K({"heatmap-radius":new oi(le.paint_heatmap["heatmap-radius"]),"heatmap-weight":new oi(le.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Wa(le.paint_heatmap["heatmap-intensity"]),"heatmap-color":new iu(le.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Wa(le.paint_heatmap["heatmap-opacity"])})}};function Qr(L,{width:_,height:F},N,W){if(W){if(W instanceof Uint8ClampedArray)W=new Uint8Array(W.buffer);else if(W.length!==_*F*N)throw new RangeError(`mismatched image size. expected: ${W.length} but got: ${_*F*N}`)}else W=new Uint8Array(_*F*N);return L.width=_,L.height=F,L.data=W,L}function wn(L,{width:_,height:F},N){if(_===L.width&&F===L.height)return;let W=Qr({},{width:_,height:F},N);jn(L,W,{x:0,y:0},{x:0,y:0},{width:Math.min(L.width,_),height:Math.min(L.height,F)},N),L.width=_,L.height=F,L.data=W.data}function jn(L,_,F,N,W,J){if(W.width===0||W.height===0)return _;if(W.width>L.width||W.height>L.height||F.x>L.width-W.width||F.y>L.height-W.height)throw new RangeError("out of range source coordinates for image copy");if(W.width>_.width||W.height>_.height||N.x>_.width-W.width||N.y>_.height-W.height)throw new RangeError("out of range destination coordinates for image copy");let ee=L.data,me=_.data;if(ee===me)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{_[L.evaluationKey]=Ce;let Ve=L.expression.evaluate(_);W.data[ee+me+0]=Math.floor(255*Ve.r/Ve.a),W.data[ee+me+1]=Math.floor(255*Ve.g/Ve.a),W.data[ee+me+2]=Math.floor(255*Ve.b/Ve.a),W.data[ee+me+3]=Math.floor(255*Ve.a)};if(L.clips)for(let ee=0,me=0;ee80*F){me=1/0,Ce=1/0;let nt=-1/0,wt=-1/0;for(let Ct=F;Ctnt&&(nt=Rt),jt>wt&&(wt=jt)}Ve=Math.max(nt-me,wt-Ce),Ve=Ve!==0?32767/Ve:0}return Ds(J,ee,F,me,Ce,Ve,0),ee}function Ts(L,_,F,N,W){let J;if(W===(function(ee,me,Ce,Ve){let nt=0;for(let wt=me,Ct=Ce-Ve;wt0)for(let ee=_;ee=_;ee-=N)J=Pn(ee/N|0,L[ee],L[ee+1],J);return J&&it(J,J.next)&&($e(J),J=J.next),J}function es(L,_){if(!L)return L;_||(_=L);let F,N=L;do if(F=!1,N.steiner||!it(N,N.next)&&ti(N.prev,N,N.next)!==0)N=N.next;else{if($e(N),N=_=N.prev,N===N.next)break;F=!0}while(F||N!==_);return _}function Ds(L,_,F,N,W,J,ee){if(!L)return;!ee&&J&&(function(Ce,Ve,nt,wt){let Ct=Ce;do Ct.z===0&&(Ct.z=js(Ct.x,Ct.y,Ve,nt,wt)),Ct.prevZ=Ct.prev,Ct.nextZ=Ct.next,Ct=Ct.next;while(Ct!==Ce);Ct.prevZ.nextZ=null,Ct.prevZ=null,(function(Rt){let jt,Qt=1;do{let Ar,Pr=Rt;Rt=null;let gn=null;for(jt=0;Pr;){jt++;let Yr=Pr,ln=0;for(let ga=0;ga0||Bn>0&&Yr;)ln!==0&&(Bn===0||!Yr||Pr.z<=Yr.z)?(Ar=Pr,Pr=Pr.nextZ,ln--):(Ar=Yr,Yr=Yr.nextZ,Bn--),gn?gn.nextZ=Ar:Rt=Ar,Ar.prevZ=gn,gn=Ar;Pr=Yr}gn.nextZ=null,Qt*=2}while(jt>1)})(Ct)})(L,N,W,J);let me=L;for(;L.prev!==L.next;){let Ce=L.prev,Ve=L.next;if(J?Ro(L,N,W,J):Do(L))_.push(Ce.i,L.i,Ve.i),$e(L),L=Ve.next,me=Ve.next;else if((L=Ve)===me){ee?ee===1?Ds(L=Uo(es(L),_),_,F,N,W,J,2):ee===2&&Sa(L,_,F,N,W,J):Ds(es(L),_,F,N,W,J,1);break}}}function Do(L){let _=L.prev,F=L,N=L.next;if(ti(_,F,N)>=0)return!1;let W=_.x,J=F.x,ee=N.x,me=_.y,Ce=F.y,Ve=N.y,nt=WJ?W>ee?W:ee:J>ee?J:ee,Rt=me>Ce?me>Ve?me:Ve:Ce>Ve?Ce:Ve,jt=N.next;for(;jt!==_;){if(jt.x>=nt&&jt.x<=Ct&&jt.y>=wt&&jt.y<=Rt&&ha(W,me,J,Ce,ee,Ve,jt.x,jt.y)&&ti(jt.prev,jt,jt.next)>=0)return!1;jt=jt.next}return!0}function Ro(L,_,F,N){let W=L.prev,J=L,ee=L.next;if(ti(W,J,ee)>=0)return!1;let me=W.x,Ce=J.x,Ve=ee.x,nt=W.y,wt=J.y,Ct=ee.y,Rt=meCe?me>Ve?me:Ve:Ce>Ve?Ce:Ve,Ar=nt>wt?nt>Ct?nt:Ct:wt>Ct?wt:Ct,Pr=js(Rt,jt,_,F,N),gn=js(Qt,Ar,_,F,N),Yr=L.prevZ,ln=L.nextZ;for(;Yr&&Yr.z>=Pr&&ln&&ln.z<=gn;){if(Yr.x>=Rt&&Yr.x<=Qt&&Yr.y>=jt&&Yr.y<=Ar&&Yr!==W&&Yr!==ee&&ha(me,nt,Ce,wt,Ve,Ct,Yr.x,Yr.y)&&ti(Yr.prev,Yr,Yr.next)>=0||(Yr=Yr.prevZ,ln.x>=Rt&&ln.x<=Qt&&ln.y>=jt&&ln.y<=Ar&&ln!==W&&ln!==ee&&ha(me,nt,Ce,wt,Ve,Ct,ln.x,ln.y)&&ti(ln.prev,ln,ln.next)>=0))return!1;ln=ln.nextZ}for(;Yr&&Yr.z>=Pr;){if(Yr.x>=Rt&&Yr.x<=Qt&&Yr.y>=jt&&Yr.y<=Ar&&Yr!==W&&Yr!==ee&&ha(me,nt,Ce,wt,Ve,Ct,Yr.x,Yr.y)&&ti(Yr.prev,Yr,Yr.next)>=0)return!1;Yr=Yr.prevZ}for(;ln&&ln.z<=gn;){if(ln.x>=Rt&&ln.x<=Qt&&ln.y>=jt&&ln.y<=Ar&&ln!==W&&ln!==ee&&ha(me,nt,Ce,wt,Ve,Ct,ln.x,ln.y)&&ti(ln.prev,ln,ln.next)>=0)return!1;ln=ln.nextZ}return!0}function Uo(L,_){let F=L;do{let N=F.prev,W=F.next.next;!it(N,W)&&ir(N,F,F.next,W)&&Ga(N,W)&&Ga(W,N)&&(_.push(N.i,F.i,W.i),$e(F),$e(F.next),F=L=W),F=F.next}while(F!==L);return es(F)}function Sa(L,_,F,N,W,J){let ee=L;do{let me=ee.next.next;for(;me!==ee.prev;){if(ee.i!==me.i&&Ka(ee,me)){let Ce=Li(ee,me);return ee=es(ee,ee.next),Ce=es(Ce,Ce.next),Ds(ee,_,F,N,W,J,0),void Ds(Ce,_,F,N,W,J,0)}me=me.next}ee=ee.next}while(ee!==L)}function ts(L,_){return L.x-_.x}function qi(L,_){let F=(function(W,J){let ee=J,me=W.x,Ce=W.y,Ve,nt=-1/0;do{if(Ce<=ee.y&&Ce>=ee.next.y&&ee.next.y!==ee.y){let Qt=ee.x+(Ce-ee.y)*(ee.next.x-ee.x)/(ee.next.y-ee.y);if(Qt<=me&&Qt>nt&&(nt=Qt,Ve=ee.x=ee.x&&ee.x>=Ct&&me!==ee.x&&ha(CeVe.x||ee.x===Ve.x&&Hs(Ve,ee)))&&(Ve=ee,jt=Qt)}ee=ee.next}while(ee!==wt);return Ve})(L,_);if(!F)return _;let N=Li(F,L);return es(N,N.next),es(F,F.next)}function Hs(L,_){return ti(L.prev,L,_.prev)<0&&ti(_.next,L,L.next)<0}function js(L,_,F,N,W){return(L=1431655765&((L=858993459&((L=252645135&((L=16711935&((L=(L-F)*W|0)|L<<8))|L<<4))|L<<2))|L<<1))|(_=1431655765&((_=858993459&((_=252645135&((_=16711935&((_=(_-N)*W|0)|_<<8))|_<<4))|_<<2))|_<<1))<<1}function fl(L){let _=L,F=L;do(_.x=(L-ee)*(J-me)&&(L-ee)*(N-me)>=(F-ee)*(_-me)&&(F-ee)*(J-me)>=(W-ee)*(N-me)}function Ka(L,_){return L.next.i!==_.i&&L.prev.i!==_.i&&!(function(F,N){let W=F;do{if(W.i!==F.i&&W.next.i!==F.i&&W.i!==N.i&&W.next.i!==N.i&&ir(W,W.next,F,N))return!0;W=W.next}while(W!==F);return!1})(L,_)&&(Ga(L,_)&&Ga(_,L)&&(function(F,N){let W=F,J=!1,ee=(F.x+N.x)/2,me=(F.y+N.y)/2;do W.y>me!=W.next.y>me&&W.next.y!==W.y&&ee<(W.next.x-W.x)*(me-W.y)/(W.next.y-W.y)+W.x&&(J=!J),W=W.next;while(W!==F);return J})(L,_)&&(ti(L.prev,L,_.prev)||ti(L,_.prev,_))||it(L,_)&&ti(L.prev,L,L.next)>0&&ti(_.prev,_,_.next)>0)}function ti(L,_,F){return(_.y-L.y)*(F.x-_.x)-(_.x-L.x)*(F.y-_.y)}function it(L,_){return L.x===_.x&&L.y===_.y}function ir(L,_,F,N){let W=Fn(ti(L,_,F)),J=Fn(ti(L,_,N)),ee=Fn(ti(F,N,L)),me=Fn(ti(F,N,_));return W!==J&&ee!==me||!(W!==0||!or(L,F,_))||!(J!==0||!or(L,N,_))||!(ee!==0||!or(F,L,N))||!(me!==0||!or(F,_,N))}function or(L,_,F){return _.x<=Math.max(L.x,F.x)&&_.x>=Math.min(L.x,F.x)&&_.y<=Math.max(L.y,F.y)&&_.y>=Math.min(L.y,F.y)}function Fn(L){return L>0?1:L<0?-1:0}function Ga(L,_){return ti(L.prev,L,L.next)<0?ti(L,_,L.next)>=0&&ti(L,L.prev,_)>=0:ti(L,_,L.prev)<0||ti(L,L.next,_)<0}function Li(L,_){let F=ct(L.i,L.x,L.y),N=ct(_.i,_.x,_.y),W=L.next,J=_.prev;return L.next=_,_.prev=L,F.next=W,W.prev=F,N.next=F,F.prev=N,J.next=N,N.prev=J,N}function Pn(L,_,F,N){let W=ct(L,_,F);return N?(W.next=N.next,W.prev=N,N.next.prev=W,N.next=W):(W.prev=W,W.next=W),W}function $e(L){L.next.prev=L.prev,L.prev.next=L.next,L.prevZ&&(L.prevZ.nextZ=L.nextZ),L.nextZ&&(L.nextZ.prevZ=L.prevZ)}function ct(L,_,F){return{i:L,x:_,y:F,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function Et(L,_,F){let N=F.patternDependencies,W=!1;for(let J of _){let ee=J.paint.get(`${L}-pattern`);ee.isConstant()||(W=!0);let me=ee.constantOr(null);me&&(W=!0,N[me.to]=!0,N[me.from]=!0)}return W}function nr(L,_,F,N,W){let J=W.patternDependencies;for(let ee of _){let me=ee.paint.get(`${L}-pattern`).value;if(me.kind!=="constant"){let Ce=me.evaluate({zoom:N-1},F,{},W.availableImages),Ve=me.evaluate({zoom:N},F,{},W.availableImages),nt=me.evaluate({zoom:N+1},F,{},W.availableImages);Ce=Ce&&Ce.name?Ce.name:Ce,Ve=Ve&&Ve.name?Ve.name:Ve,nt=nt&&nt.name?nt.name:nt,J[Ce]=!0,J[Ve]=!0,J[nt]=!0,F.patterns[ee.id]={min:Ce,mid:Ve,max:nt}}}return F}class vr{constructor(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map((F=>F.id)),this.index=_.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Jo,this.indexArray=new Z,this.indexArray2=new ie,this.programConfigurations=new Ps(_.layers,_.zoom),this.segments=new Le,this.segments2=new Le,this.stateDependentLayerIds=this.layers.filter((F=>F.isStateDependent())).map((F=>F.id))}populate(_,F,N){this.hasPattern=Et("fill",this.layers,F);let W=this.layers[0].layout.get("fill-sort-key"),J=!W.isConstant(),ee=[];for(let{feature:me,id:Ce,index:Ve,sourceLayerIndex:nt}of _){let wt=this.layers[0]._featureFilter.needGeometry,Ct=Gs(me,wt);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),Ct,N))continue;let Rt=J?W.evaluate(Ct,{},N,F.availableImages):void 0,jt={id:Ce,properties:me.properties,type:me.type,sourceLayerIndex:nt,index:Ve,geometry:wt?Ct.geometry:Qo(me),patterns:{},sortKey:Rt};ee.push(jt)}J&&ee.sort(((me,Ce)=>me.sortKey-Ce.sortKey));for(let me of ee){let{geometry:Ce,index:Ve,sourceLayerIndex:nt}=me;if(this.hasPattern){let wt=nr("fill",this.layers,me,this.zoom,F);this.patternFeatures.push(wt)}else this.addFeature(me,Ce,Ve,N,{});F.featureIndex.insert(_[Ve].feature,Ce,Ve,nt,this.index)}}update(_,F,N){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(_,F,this.stateDependentLayers,N)}addFeatures(_,F,N){for(let W of this.patternFeatures)this.addFeature(W,W.geometry,W.index,F,N)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(_){this.uploaded||(this.layoutVertexBuffer=_.createVertexBuffer(this.layoutVertexArray,cl),this.indexBuffer=_.createIndexBuffer(this.indexArray),this.indexBuffer2=_.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(_),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(_,F,N,W,J){for(let ee of Lf(F,500)){let me=0;for(let Rt of ee)me+=Rt.length;let Ce=this.segments.prepareSegment(me,this.layoutVertexArray,this.indexArray),Ve=Ce.vertexLength,nt=[],wt=[];for(let Rt of ee){if(Rt.length===0)continue;Rt!==ee[0]&&wt.push(nt.length/2);let jt=this.segments2.prepareSegment(Rt.length,this.layoutVertexArray,this.indexArray2),Qt=jt.vertexLength;this.layoutVertexArray.emplaceBack(Rt[0].x,Rt[0].y),this.indexArray2.emplaceBack(Qt+Rt.length-1,Qt),nt.push(Rt[0].x),nt.push(Rt[0].y);for(let Ar=1;Ar>3}if(W--,N===1||N===2)J+=L.readSVarint(),ee+=L.readSVarint(),N===1&&(_&&me.push(_),_=[]),_.push(new Or(J,ee));else{if(N!==7)throw new Error("unknown command "+N);_&&_.push(_[0].clone())}}return _&&me.push(_),me},Tn.prototype.bbox=function(){var L=this._pbf;L.pos=this._geometry;for(var _=L.readVarint()+L.pos,F=1,N=0,W=0,J=0,ee=1/0,me=-1/0,Ce=1/0,Ve=-1/0;L.pos<_;){if(N<=0){var nt=L.readVarint();F=7&nt,N=nt>>3}if(N--,F===1||F===2)(W+=L.readSVarint())me&&(me=W),(J+=L.readSVarint())Ve&&(Ve=J);else if(F!==7)throw new Error("unknown command "+F)}return[ee,Ce,me,Ve]},Tn.prototype.toGeoJSON=function(L,_,F){var N,W,J=this.extent*Math.pow(2,F),ee=this.extent*L,me=this.extent*_,Ce=this.loadGeometry(),Ve=Tn.types[this.type];function nt(Rt){for(var jt=0;jt>3;W=ee===1?N.readString():ee===2?N.readFloat():ee===3?N.readDouble():ee===4?N.readVarint64():ee===5?N.readVarint():ee===6?N.readSVarint():ee===7?N.readBoolean():null}return W})(F))}yn.prototype.feature=function(L){if(L<0||L>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[L];var _=this._pbf.readVarint()+this._pbf.pos;return new Un(this._pbf,_,this.extent,this._keys,this._values)};var In=qn;function fa(L,_,F){if(L===3){var N=new In(F,F.readVarint()+F.pos);N.length&&(_[N.name]=N)}}yr.VectorTile=function(L,_){this.layers=L.readFields(fa,{},_)},yr.VectorTileFeature=Yn,yr.VectorTileLayer=qn;let Zi=yr.VectorTileFeature.types,Ws=Math.pow(2,13);function Ru(L,_,F,N,W,J,ee,me){L.emplaceBack(_,F,2*Math.floor(N*Ws)+ee,W*Ws*2,J*Ws*2,Math.round(me))}class Zc{constructor(_){this.zoom=_.zoom,this.overscaling=_.overscaling,this.layers=_.layers,this.layerIds=this.layers.map((F=>F.id)),this.index=_.index,this.hasPattern=!1,this.layoutVertexArray=new Tl,this.centroidVertexArray=new ws,this.indexArray=new Z,this.programConfigurations=new Ps(_.layers,_.zoom),this.segments=new Le,this.stateDependentLayerIds=this.layers.filter((F=>F.isStateDependent())).map((F=>F.id))}populate(_,F,N){this.features=[],this.hasPattern=Et("fill-extrusion",this.layers,F);for(let{feature:W,id:J,index:ee,sourceLayerIndex:me}of _){let Ce=this.layers[0]._featureFilter.needGeometry,Ve=Gs(W,Ce);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),Ve,N))continue;let nt={id:J,sourceLayerIndex:me,index:ee,geometry:Ce?Ve.geometry:Qo(W),properties:W.properties,type:W.type,patterns:{}};this.hasPattern?this.features.push(nr("fill-extrusion",this.layers,nt,this.zoom,F)):this.addFeature(nt,nt.geometry,ee,N,{}),F.featureIndex.insert(W,nt.geometry,ee,me,this.index,!0)}}addFeatures(_,F,N){for(let W of this.features){let{geometry:J}=W;this.addFeature(W,J,W.index,F,N)}}update(_,F,N){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(_,F,this.stateDependentLayers,N)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(_){this.uploaded||(this.layoutVertexBuffer=_.createVertexBuffer(this.layoutVertexArray,Jt),this.centroidVertexBuffer=_.createVertexBuffer(this.centroidVertexArray,dt.members,!0),this.indexBuffer=_.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(_),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(_,F,N,W,J){for(let ee of Lf(F,500)){let me={x:0,y:0,vertexCount:0},Ce=0;for(let jt of ee)Ce+=jt.length;let Ve=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let jt of ee){if(jt.length===0||su(jt))continue;let Qt=0;for(let Ar=0;Ar=1){let gn=jt[Ar-1];if(!Vf(Pr,gn)){Ve.vertexLength+4>Le.MAX_VERTEX_ARRAY_LENGTH&&(Ve=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let Yr=Pr.sub(gn)._perp()._unit(),ln=gn.dist(Pr);Qt+ln>32768&&(Qt=0),Ru(this.layoutVertexArray,Pr.x,Pr.y,Yr.x,Yr.y,0,0,Qt),Ru(this.layoutVertexArray,Pr.x,Pr.y,Yr.x,Yr.y,0,1,Qt),me.x+=2*Pr.x,me.y+=2*Pr.y,me.vertexCount+=2,Qt+=ln,Ru(this.layoutVertexArray,gn.x,gn.y,Yr.x,Yr.y,0,0,Qt),Ru(this.layoutVertexArray,gn.x,gn.y,Yr.x,Yr.y,0,1,Qt),me.x+=2*gn.x,me.y+=2*gn.y,me.vertexCount+=2;let Bn=Ve.vertexLength;this.indexArray.emplaceBack(Bn,Bn+2,Bn+1),this.indexArray.emplaceBack(Bn+1,Bn+2,Bn+3),Ve.vertexLength+=4,Ve.primitiveLength+=2}}}}if(Ve.vertexLength+Ce>Le.MAX_VERTEX_ARRAY_LENGTH&&(Ve=this.segments.prepareSegment(Ce,this.layoutVertexArray,this.indexArray)),Zi[_.type]!=="Polygon")continue;let nt=[],wt=[],Ct=Ve.vertexLength;for(let jt of ee)if(jt.length!==0){jt!==ee[0]&&wt.push(nt.length/2);for(let Qt=0;Qt$a)||L.y===_.y&&(L.y<0||L.y>$a)}function su(L){return L.every((_=>_.x<0))||L.every((_=>_.x>$a))||L.every((_=>_.y<0))||L.every((_=>_.y>$a))}let zd;Wr("FillExtrusionBucket",Zc,{omit:["layers","features"]});var HZe={get paint(){return zd=zd||new K({"fill-extrusion-opacity":new Wa(le["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new oi(le["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Wa(le["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Wa(le["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new Ph(le["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new oi(le["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new oi(le["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Wa(le["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class jZe extends I{constructor(_){super(_,HZe)}createBucket(_){return new Zc(_)}queryRadius(){return Hn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(_,F,N,W,J,ee,me,Ce){let Ve=Cn(_,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),ee.angle,me),nt=this.paint.get("fill-extrusion-height").evaluate(F,N),wt=this.paint.get("fill-extrusion-base").evaluate(F,N),Ct=(function(jt,Qt,Ar,Pr){let gn=[];for(let Yr of jt){let ln=[Yr.x,Yr.y,0,1];Gn(ln,ln,Qt),gn.push(new u(ln[0]/ln[3],ln[1]/ln[3]))}return gn})(Ve,Ce),Rt=(function(jt,Qt,Ar,Pr){let gn=[],Yr=[],ln=Pr[8]*Qt,Bn=Pr[9]*Qt,ga=Pr[10]*Qt,Za=Pr[11]*Qt,Ii=Pr[8]*Ar,Ya=Pr[9]*Ar,Ua=Pr[10]*Ar,gi=Pr[11]*Ar;for(let ai of jt){let Qa=[],Zn=[];for(let wi of ai){let vi=wi.x,eo=wi.y,Ml=Pr[0]*vi+Pr[4]*eo+Pr[12],dl=Pr[1]*vi+Pr[5]*eo+Pr[13],gf=Pr[2]*vi+Pr[6]*eo+Pr[14],Dv=Pr[3]*vi+Pr[7]*eo+Pr[15],dh=gf+ga,mf=Dv+Za,td=Ml+Ii,rd=dl+Ya,nd=gf+Ua,Xu=Dv+gi,yf=new u((Ml+ln)/mf,(dl+Bn)/mf);yf.z=dh/mf,Qa.push(yf);let Dh=new u(td/Xu,rd/Xu);Dh.z=nd/Xu,Zn.push(Dh)}gn.push(Qa),Yr.push(Zn)}return[gn,Yr]})(W,wt,nt,Ce);return(function(jt,Qt,Ar){let Pr=1/0;ot(Ar,Qt)&&(Pr=xZ(Ar,Qt[0]));for(let gn=0;gnF.id)),this.index=_.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach((F=>{this.gradients[F.id]={}})),this.layoutVertexArray=new bu,this.layoutVertexArray2=new Gl,this.indexArray=new Z,this.programConfigurations=new Ps(_.layers,_.zoom),this.segments=new Le,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((F=>F.isStateDependent())).map((F=>F.id))}populate(_,F,N){this.hasPattern=Et("line",this.layers,F);let W=this.layers[0].layout.get("line-sort-key"),J=!W.isConstant(),ee=[];for(let{feature:me,id:Ce,index:Ve,sourceLayerIndex:nt}of _){let wt=this.layers[0]._featureFilter.needGeometry,Ct=Gs(me,wt);if(!this.layers[0]._featureFilter.filter(new Yi(this.zoom),Ct,N))continue;let Rt=J?W.evaluate(Ct,{},N):void 0,jt={id:Ce,properties:me.properties,type:me.type,sourceLayerIndex:nt,index:Ve,geometry:wt?Ct.geometry:Qo(me),patterns:{},sortKey:Rt};ee.push(jt)}J&&ee.sort(((me,Ce)=>me.sortKey-Ce.sortKey));for(let me of ee){let{geometry:Ce,index:Ve,sourceLayerIndex:nt}=me;if(this.hasPattern){let wt=nr("line",this.layers,me,this.zoom,F);this.patternFeatures.push(wt)}else this.addFeature(me,Ce,Ve,N,{});F.featureIndex.insert(_[Ve].feature,Ce,Ve,nt,this.index)}}update(_,F,N){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(_,F,this.stateDependentLayers,N)}addFeatures(_,F,N){for(let W of this.patternFeatures)this.addFeature(W,W.geometry,W.index,F,N)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(_){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=_.createVertexBuffer(this.layoutVertexArray2,ZZe)),this.layoutVertexBuffer=_.createVertexBuffer(this.layoutVertexArray,YZe),this.indexBuffer=_.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(_),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(_){if(_.properties&&Object.prototype.hasOwnProperty.call(_.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(_.properties,"mapbox_clip_end"))return{start:+_.properties.mapbox_clip_start,end:+_.properties.mapbox_clip_end}}addFeature(_,F,N,W,J){let ee=this.layers[0].layout,me=ee.get("line-join").evaluate(_,{}),Ce=ee.get("line-cap"),Ve=ee.get("line-miter-limit"),nt=ee.get("line-round-limit");this.lineClips=this.lineFeatureClips(_);for(let wt of F)this.addLine(wt,_,me,Ce,Ve,nt);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,_,N,J,W)}addLine(_,F,N,W,J,ee){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let Pr=0;Pr<_.length-1;Pr++)this.totalDistance+=_[Pr].dist(_[Pr+1]);this.updateScaledDistance(),this.maxLineLength=Math.max(this.maxLineLength,this.totalDistance)}let me=$Ze[F.type]==="Polygon",Ce=_.length;for(;Ce>=2&&_[Ce-1].equals(_[Ce-2]);)Ce--;let Ve=0;for(;Ve0;if(Za&&Pr>Ve){let gi=Ct.dist(Rt);if(gi>2*nt){let ai=Ct.sub(Ct.sub(Rt)._mult(nt/gi)._round());this.updateDistance(Rt,ai),this.addCurrentVertex(ai,Qt,0,0,wt),Rt=ai}}let Ya=Rt&&jt,Ua=Ya?N:me?"butt":W;if(Ya&&Ua==="round"&&(BnJ&&(Ua="bevel"),Ua==="bevel"&&(Bn>2&&(Ua="flipbevel"),Bn100)gn=Ar.mult(-1);else{let gi=Bn*Qt.add(Ar).mag()/Qt.sub(Ar).mag();gn._perp()._mult(gi*(Ii?-1:1))}this.addCurrentVertex(Ct,gn,0,0,wt),this.addCurrentVertex(Ct,gn.mult(-1),0,0,wt)}else if(Ua==="bevel"||Ua==="fakeround"){let gi=-Math.sqrt(Bn*Bn-1),ai=Ii?gi:0,Qa=Ii?0:gi;if(Rt&&this.addCurrentVertex(Ct,Qt,ai,Qa,wt),Ua==="fakeround"){let Zn=Math.round(180*ga/Math.PI/20);for(let wi=1;wi2*nt){let ai=Ct.add(jt.sub(Ct)._mult(nt/gi)._round());this.updateDistance(Ct,ai),this.addCurrentVertex(ai,Ar,0,0,wt),Ct=ai}}}}addCurrentVertex(_,F,N,W,J,ee=!1){let me=F.y*W-F.x,Ce=-F.y-F.x*W;this.addHalfVertex(_,F.x+F.y*N,F.y-F.x*N,ee,!1,N,J),this.addHalfVertex(_,me,Ce,ee,!0,-W,J),this.distance>bZ/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(_,F,N,W,J,ee))}addHalfVertex({x:_,y:F},N,W,J,ee,me,Ce){let Ve=.5*(this.lineClips?this.scaledDistance*(bZ-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((_<<1)+(J?1:0),(F<<1)+(ee?1:0),Math.round(63*N)+128,Math.round(63*W)+128,1+(me===0?0:me<0?-1:1)|(63&Ve)<<2,Ve>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let nt=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,nt),Ce.primitiveLength++),ee?this.e2=nt:this.e1=nt}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(_,F){this.distance+=_.dist(F),this.updateScaledDistance()}}let _Z,wZ;Wr("LineBucket",OP,{omit:["layers","patternFeatures"]});var TZ={get paint(){return wZ=wZ||new K({"line-opacity":new oi(le.paint_line["line-opacity"]),"line-color":new oi(le.paint_line["line-color"]),"line-translate":new Wa(le.paint_line["line-translate"]),"line-translate-anchor":new Wa(le.paint_line["line-translate-anchor"]),"line-width":new oi(le.paint_line["line-width"]),"line-gap-width":new oi(le.paint_line["line-gap-width"]),"line-offset":new oi(le.paint_line["line-offset"]),"line-blur":new oi(le.paint_line["line-blur"]),"line-dasharray":new pf(le.paint_line["line-dasharray"]),"line-pattern":new Ph(le.paint_line["line-pattern"]),"line-gradient":new iu(le.paint_line["line-gradient"])})},get layout(){return _Z=_Z||new K({"line-cap":new Wa(le.layout_line["line-cap"]),"line-join":new oi(le.layout_line["line-join"]),"line-miter-limit":new Wa(le.layout_line["line-miter-limit"]),"line-round-limit":new Wa(le.layout_line["line-round-limit"]),"line-sort-key":new oi(le.layout_line["line-sort-key"])})}};class JZe extends oi{possiblyEvaluate(_,F){return F=new Yi(Math.floor(F.zoom),{now:F.now,fadeDuration:F.fadeDuration,zoomHistory:F.zoomHistory,transition:F.transition}),super.possiblyEvaluate(_,F)}evaluate(_,F,N,W){return F=k({},F,{zoom:Math.floor(F.zoom)}),super.evaluate(_,F,N,W)}}let sM;class QZe extends I{constructor(_){super(_,TZ),this.gradientVersion=0,sM||(sM=new JZe(TZ.paint.properties["line-width"].specification),sM.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(_){if(_==="line-gradient"){let F=this.gradientExpression();this.stepInterpolant=!!(function(N){return N._styleExpression!==void 0})(F)&&F._styleExpression.expression instanceof En,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(_,F){super.recalculate(_,F),this.paint._values["line-floorwidth"]=sM.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,_)}createBucket(_){return new OP(_)}queryRadius(_){let F=_,N=AZ(Kr("line-width",this,F),Kr("line-gap-width",this,F)),W=Kr("line-offset",this,F);return N/2+Math.abs(W)+Hn(this.paint.get("line-translate"))}queryIntersectsFeature(_,F,N,W,J,ee,me){let Ce=Cn(_,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ee.angle,me),Ve=me/2*AZ(this.paint.get("line-width").evaluate(F,N),this.paint.get("line-gap-width").evaluate(F,N)),nt=this.paint.get("line-offset").evaluate(F,N);return nt&&(W=(function(wt,Ct){let Rt=[];for(let jt=0;jt=3){for(let Ar=0;Ar0?_+2*L:L}let e$e=xe([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),t$e=xe([{name:"a_projected_pos",components:3,type:"Float32"}],4);xe([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let r$e=xe([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);xe([{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"}]);let MZ=xe([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),n$e=xe([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function a$e(L,_,F){return L.sections.forEach((N=>{N.text=(function(W,J,ee){let me=J.layout.get("text-transform").evaluate(ee,{});return me==="uppercase"?W=W.toLocaleUpperCase():me==="lowercase"&&(W=W.toLocaleLowerCase()),wo.applyArabicShaping&&(W=wo.applyArabicShaping(W)),W})(N.text,_,F)})),L}xe([{name:"triangle",components:3,type:"Uint16"}]),xe([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),xe([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),xe([{type:"Float32",name:"offsetX"}]),xe([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),xe([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let o5={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var $c=24,SZ=hl,EZ=function(L,_,F,N,W){var J,ee,me=8*W-N-1,Ce=(1<>1,nt=-7,wt=F?W-1:0,Ct=F?-1:1,Rt=L[_+wt];for(wt+=Ct,J=Rt&(1<<-nt)-1,Rt>>=-nt,nt+=me;nt>0;J=256*J+L[_+wt],wt+=Ct,nt-=8);for(ee=J&(1<<-nt)-1,J>>=-nt,nt+=N;nt>0;ee=256*ee+L[_+wt],wt+=Ct,nt-=8);if(J===0)J=1-Ve;else{if(J===Ce)return ee?NaN:1/0*(Rt?-1:1);ee+=Math.pow(2,N),J-=Ve}return(Rt?-1:1)*ee*Math.pow(2,J-N)},kZ=function(L,_,F,N,W,J){var ee,me,Ce,Ve=8*J-W-1,nt=(1<>1,Ct=W===23?Math.pow(2,-24)-Math.pow(2,-77):0,Rt=N?0:J-1,jt=N?1:-1,Qt=_<0||_===0&&1/_<0?1:0;for(_=Math.abs(_),isNaN(_)||_===1/0?(me=isNaN(_)?1:0,ee=nt):(ee=Math.floor(Math.log(_)/Math.LN2),_*(Ce=Math.pow(2,-ee))<1&&(ee--,Ce*=2),(_+=ee+wt>=1?Ct/Ce:Ct*Math.pow(2,1-wt))*Ce>=2&&(ee++,Ce/=2),ee+wt>=nt?(me=0,ee=nt):ee+wt>=1?(me=(_*Ce-1)*Math.pow(2,W),ee+=wt):(me=_*Math.pow(2,wt-1)*Math.pow(2,W),ee=0));W>=8;L[F+Rt]=255&me,Rt+=jt,me/=256,W-=8);for(ee=ee<0;L[F+Rt]=255&ee,Rt+=jt,ee/=256,Ve-=8);L[F+Rt-jt]|=128*Qt};function hl(L){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(L)?L:new Uint8Array(L||0),this.pos=0,this.type=0,this.length=this.buf.length}hl.Varint=0,hl.Fixed64=1,hl.Bytes=2,hl.Fixed32=5;var NP=4294967296,CZ=1/NP,LZ=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");function y1(L){return L.type===hl.Bytes?L.readVarint()+L.pos:L.pos+1}function rb(L,_,F){return F?4294967296*_+(L>>>0):4294967296*(_>>>0)+(L>>>0)}function FZ(L,_,F){var N=_<=16383?1:_<=2097151?2:_<=268435455?3:Math.floor(Math.log(_)/(7*Math.LN2));F.realloc(N);for(var W=F.pos-1;W>=L;W--)F.buf[W+N]=F.buf[W]}function i$e(L,_){for(var F=0;F>>8,L[F+2]=_>>>16,L[F+3]=_>>>24}function PZ(L,_){return(L[_]|L[_+1]<<8|L[_+2]<<16)+(L[_+3]<<24)}hl.prototype={destroy:function(){this.buf=null},readFields:function(L,_,F){for(F=F||this.length;this.pos>3,J=this.pos;this.type=7&N,L(W,_,this),this.pos===J&&this.skip(N)}return _},readMessage:function(L,_){return this.readFields(L,_,this.readVarint()+this.pos)},readFixed32:function(){var L=lM(this.buf,this.pos);return this.pos+=4,L},readSFixed32:function(){var L=PZ(this.buf,this.pos);return this.pos+=4,L},readFixed64:function(){var L=lM(this.buf,this.pos)+lM(this.buf,this.pos+4)*NP;return this.pos+=8,L},readSFixed64:function(){var L=lM(this.buf,this.pos)+PZ(this.buf,this.pos+4)*NP;return this.pos+=8,L},readFloat:function(){var L=EZ(this.buf,this.pos,!0,23,4);return this.pos+=4,L},readDouble:function(){var L=EZ(this.buf,this.pos,!0,52,8);return this.pos+=8,L},readVarint:function(L){var _,F,N=this.buf;return _=127&(F=N[this.pos++]),F<128?_:(_|=(127&(F=N[this.pos++]))<<7,F<128?_:(_|=(127&(F=N[this.pos++]))<<14,F<128?_:(_|=(127&(F=N[this.pos++]))<<21,F<128?_:(function(W,J,ee){var me,Ce,Ve=ee.buf;if(me=(112&(Ce=Ve[ee.pos++]))>>4,Ce<128||(me|=(127&(Ce=Ve[ee.pos++]))<<3,Ce<128)||(me|=(127&(Ce=Ve[ee.pos++]))<<10,Ce<128)||(me|=(127&(Ce=Ve[ee.pos++]))<<17,Ce<128)||(me|=(127&(Ce=Ve[ee.pos++]))<<24,Ce<128)||(me|=(1&(Ce=Ve[ee.pos++]))<<31,Ce<128))return rb(W,me,J);throw new Error("Expected varint not more than 10 bytes")})(_|=(15&(F=N[this.pos]))<<28,L,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var L=this.readVarint();return L%2==1?(L+1)/-2:L/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var L=this.readVarint()+this.pos,_=this.pos;return this.pos=L,L-_>=12&&LZ?(function(F,N,W){return LZ.decode(F.subarray(N,W))})(this.buf,_,L):(function(F,N,W){for(var J="",ee=N;ee239?4:nt>223?3:nt>191?2:1;if(ee+Ct>W)break;Ct===1?nt<128&&(wt=nt):Ct===2?(192&(me=F[ee+1]))==128&&(wt=(31&nt)<<6|63&me)<=127&&(wt=null):Ct===3?(Ce=F[ee+2],(192&(me=F[ee+1]))==128&&(192&Ce)==128&&((wt=(15&nt)<<12|(63&me)<<6|63&Ce)<=2047||wt>=55296&&wt<=57343)&&(wt=null)):Ct===4&&(Ce=F[ee+2],Ve=F[ee+3],(192&(me=F[ee+1]))==128&&(192&Ce)==128&&(192&Ve)==128&&((wt=(15&nt)<<18|(63&me)<<12|(63&Ce)<<6|63&Ve)<=65535||wt>=1114112)&&(wt=null)),wt===null?(wt=65533,Ct=1):wt>65535&&(wt-=65536,J+=String.fromCharCode(wt>>>10&1023|55296),wt=56320|1023&wt),J+=String.fromCharCode(wt),ee+=Ct}return J})(this.buf,_,L)},readBytes:function(){var L=this.readVarint()+this.pos,_=this.buf.subarray(this.pos,L);return this.pos=L,_},readPackedVarint:function(L,_){if(this.type!==hl.Bytes)return L.push(this.readVarint(_));var F=y1(this);for(L=L||[];this.pos127;);else if(_===hl.Bytes)this.pos=this.readVarint()+this.pos;else if(_===hl.Fixed32)this.pos+=4;else{if(_!==hl.Fixed64)throw new Error("Unimplemented type: "+_);this.pos+=8}},writeTag:function(L,_){this.writeVarint(L<<3|_)},realloc:function(L){for(var _=this.length||16;_268435455||L<0?(function(_,F){var N,W;if(_>=0?(N=_%4294967296|0,W=_/4294967296|0):(W=~(-_/4294967296),4294967295^(N=~(-_%4294967296))?N=N+1|0:(N=0,W=W+1|0)),_>=18446744073709552e3||_<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");F.realloc(10),(function(J,ee,me){me.buf[me.pos++]=127&J|128,J>>>=7,me.buf[me.pos++]=127&J|128,J>>>=7,me.buf[me.pos++]=127&J|128,J>>>=7,me.buf[me.pos++]=127&J|128,me.buf[me.pos]=127&(J>>>=7)})(N,0,F),(function(J,ee){var me=(7&J)<<4;ee.buf[ee.pos++]|=me|((J>>>=3)?128:0),J&&(ee.buf[ee.pos++]=127&J|((J>>>=7)?128:0),J&&(ee.buf[ee.pos++]=127&J|((J>>>=7)?128:0),J&&(ee.buf[ee.pos++]=127&J|((J>>>=7)?128:0),J&&(ee.buf[ee.pos++]=127&J|((J>>>=7)?128:0),J&&(ee.buf[ee.pos++]=127&J)))))})(W,F)})(L,this):(this.realloc(4),this.buf[this.pos++]=127&L|(L>127?128:0),L<=127||(this.buf[this.pos++]=127&(L>>>=7)|(L>127?128:0),L<=127||(this.buf[this.pos++]=127&(L>>>=7)|(L>127?128:0),L<=127||(this.buf[this.pos++]=L>>>7&127))))},writeSVarint:function(L){this.writeVarint(L<0?2*-L-1:2*L)},writeBoolean:function(L){this.writeVarint(!!L)},writeString:function(L){L=String(L),this.realloc(4*L.length),this.pos++;var _=this.pos;this.pos=(function(N,W,J){for(var ee,me,Ce=0;Ce55295&&ee<57344){if(!me){ee>56319||Ce+1===W.length?(N[J++]=239,N[J++]=191,N[J++]=189):me=ee;continue}if(ee<56320){N[J++]=239,N[J++]=191,N[J++]=189,me=ee;continue}ee=me-55296<<10|ee-56320|65536,me=null}else me&&(N[J++]=239,N[J++]=191,N[J++]=189,me=null);ee<128?N[J++]=ee:(ee<2048?N[J++]=ee>>6|192:(ee<65536?N[J++]=ee>>12|224:(N[J++]=ee>>18|240,N[J++]=ee>>12&63|128),N[J++]=ee>>6&63|128),N[J++]=63&ee|128)}return J})(this.buf,L,this.pos);var F=this.pos-_;F>=128&&FZ(_,F,this),this.pos=_-1,this.writeVarint(F),this.pos+=F},writeFloat:function(L){this.realloc(4),kZ(this.buf,L,this.pos,!0,23,4),this.pos+=4},writeDouble:function(L){this.realloc(8),kZ(this.buf,L,this.pos,!0,52,8),this.pos+=8},writeBytes:function(L){var _=L.length;this.writeVarint(_),this.realloc(_);for(var F=0;F<_;F++)this.buf[this.pos++]=L[F]},writeRawMessage:function(L,_){this.pos++;var F=this.pos;L(_,this);var N=this.pos-F;N>=128&&FZ(F,N,this),this.pos=F-1,this.writeVarint(N),this.pos+=N},writeMessage:function(L,_,F){this.writeTag(L,hl.Bytes),this.writeRawMessage(_,F)},writePackedVarint:function(L,_){_.length&&this.writeMessage(L,i$e,_)},writePackedSVarint:function(L,_){_.length&&this.writeMessage(L,o$e,_)},writePackedBoolean:function(L,_){_.length&&this.writeMessage(L,u$e,_)},writePackedFloat:function(L,_){_.length&&this.writeMessage(L,s$e,_)},writePackedDouble:function(L,_){_.length&&this.writeMessage(L,l$e,_)},writePackedFixed32:function(L,_){_.length&&this.writeMessage(L,c$e,_)},writePackedSFixed32:function(L,_){_.length&&this.writeMessage(L,f$e,_)},writePackedFixed64:function(L,_){_.length&&this.writeMessage(L,h$e,_)},writePackedSFixed64:function(L,_){_.length&&this.writeMessage(L,d$e,_)},writeBytesField:function(L,_){this.writeTag(L,hl.Bytes),this.writeBytes(_)},writeFixed32Field:function(L,_){this.writeTag(L,hl.Fixed32),this.writeFixed32(_)},writeSFixed32Field:function(L,_){this.writeTag(L,hl.Fixed32),this.writeSFixed32(_)},writeFixed64Field:function(L,_){this.writeTag(L,hl.Fixed64),this.writeFixed64(_)},writeSFixed64Field:function(L,_){this.writeTag(L,hl.Fixed64),this.writeSFixed64(_)},writeVarintField:function(L,_){this.writeTag(L,hl.Varint),this.writeVarint(_)},writeSVarintField:function(L,_){this.writeTag(L,hl.Varint),this.writeSVarint(_)},writeStringField:function(L,_){this.writeTag(L,hl.Bytes),this.writeString(_)},writeFloatField:function(L,_){this.writeTag(L,hl.Fixed32),this.writeFloat(_)},writeDoubleField:function(L,_){this.writeTag(L,hl.Fixed64),this.writeDouble(_)},writeBooleanField:function(L,_){this.writeVarintField(L,!!_)}};var UP=o(SZ);let VP=3;function v$e(L,_,F){L===1&&F.readMessage(p$e,_)}function p$e(L,_,F){if(L===3){let{id:N,bitmap:W,width:J,height:ee,left:me,top:Ce,advance:Ve}=F.readMessage(g$e,{});_.push({id:N,bitmap:new oa({width:J+2*VP,height:ee+2*VP},W),metrics:{width:J,height:ee,left:me,top:Ce,advance:Ve}})}}function g$e(L,_,F){L===1?_.id=F.readVarint():L===2?_.bitmap=F.readBytes():L===3?_.width=F.readVarint():L===4?_.height=F.readVarint():L===5?_.left=F.readSVarint():L===6?_.top=F.readSVarint():L===7&&(_.advance=F.readVarint())}let DZ=VP;function RZ(L){let _=0,F=0;for(let ee of L)_+=ee.w*ee.h,F=Math.max(F,ee.w);L.sort(((ee,me)=>me.h-ee.h));let N=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(_/.95)),F),h:1/0}],W=0,J=0;for(let ee of L)for(let me=N.length-1;me>=0;me--){let Ce=N[me];if(!(ee.w>Ce.w||ee.h>Ce.h)){if(ee.x=Ce.x,ee.y=Ce.y,J=Math.max(J,ee.y+ee.h),W=Math.max(W,ee.x+ee.w),ee.w===Ce.w&&ee.h===Ce.h){let Ve=N.pop();me=0&&N>=_&&cM[this.text.charCodeAt(N)];N--)F--;this.text=this.text.substring(_,F),this.sectionIndex=this.sectionIndex.slice(_,F)}substring(_,F){let N=new ab;return N.text=this.text.substring(_,F),N.sectionIndex=this.sectionIndex.slice(_,F),N.sections=this.sections,N}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce(((_,F)=>Math.max(_,this.sections[F].scale)),0)}addTextSection(_,F){this.text+=_.text,this.sections.push(l5.forText(_.scale,_.fontStack||F));let N=this.sections.length-1;for(let W=0;W<_.text.length;++W)this.sectionIndex.push(N)}addImageSection(_){let F=_.image?_.image.name:"";if(F.length===0)return void A("Can't add FormattedSection with an empty image.");let N=this.getNextImageSectionCharCode();N?(this.text+=String.fromCharCode(N),this.sections.push(l5.forImage(F)),this.sectionIndex.push(this.sections.length-1)):A("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function uM(L,_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct,Rt,jt){let Qt=ab.fromFeature(L,W),Ar;wt===a.ah.vertical&&Qt.verticalizePunctuation();let{processBidirectionalText:Pr,processStyledBidirectionalText:gn}=wo;if(Pr&&Qt.sections.length===1){Ar=[];let Bn=Pr(Qt.toString(),HP(Qt,Ve,J,_,N,Rt));for(let ga of Bn){let Za=new ab;Za.text=ga,Za.sections=Qt.sections;for(let Ii=0;Ii0&&x1>ph&&(ph=x1)}else{let sv=Za[As.fontStack],Gf=sv&&sv[Hl];if(Gf&&Gf.rect)lb=Gf.rect,Iu=Gf.metrics;else{let x1=ga[As.fontStack],v5=x1&&x1[Hl];if(!v5)continue;Iu=v5.metrics}qd=(yf-As.scale)*$c}Rv?(Bn.verticalizable=!0,ad.push({glyph:Hl,imageName:pp,x:eo,y:Ml+qd,vertical:Rv,scale:As.scale,fontStack:As.fontStack,sectionIndex:Rl,metrics:Iu,rect:lb}),eo+=gp*As.scale+Zn):(ad.push({glyph:Hl,imageName:pp,x:eo,y:Ml+qd,vertical:Rv,scale:As.scale,fontStack:As.fontStack,sectionIndex:Rl,metrics:Iu,rect:lb}),eo+=Iu.advance*As.scale+Zn)}ad.length!==0&&(dl=Math.max(eo-Zn,dl),b$e(ad,0,ad.length-1,Dv,ph)),eo=0;let ov=Ua*yf+ph;vh.lineOffset=Math.max(ph,Dh),Ml+=ov,gf=Math.max(ov,gf),++dh}var mf;let td=Ml-s5,{horizontalAlign:rd,verticalAlign:nd}=jP(gi);(function(Xu,yf,Dh,vh,ad,ph,ov,_d,As){let Rl=(yf-Dh)*ad,Hl=0;Hl=ph!==ov?-_d*vh-s5:(-vh*As+.5)*ov;for(let qd of Xu)for(let Iu of qd.positionedGlyphs)Iu.x+=Rl,Iu.y+=Hl})(Bn.positionedLines,Dv,rd,nd,dl,gf,Ua,td,Ya.length),Bn.top+=-nd*td,Bn.bottom=Bn.top+td,Bn.left+=-rd*dl,Bn.right=Bn.left+dl})(ln,_,F,N,Ar,ee,me,Ce,wt,Ve,Ct,jt),!(function(Bn){for(let ga of Bn)if(ga.positionedGlyphs.length!==0)return!1;return!0})(Yr)&&ln}let cM={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},m$e={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},y$e={40:!0};function zZ(L,_,F,N,W,J){if(_.imageName){let ee=N[_.imageName];return ee?ee.displaySize[0]*_.scale*$c/J+W:0}{let ee=F[_.fontStack],me=ee&&ee[L];return me?me.metrics.advance*_.scale+W:0}}function qZ(L,_,F,N){let W=Math.pow(L-_,2);return N?L<_?W/2:2*W:W+Math.abs(F)*F}function x$e(L,_,F){let N=0;return L===10&&(N-=1e4),F&&(N+=150),L!==40&&L!==65288||(N+=50),_!==41&&_!==65289||(N+=50),N}function BZ(L,_,F,N,W,J){let ee=null,me=qZ(_,F,W,J);for(let Ce of N){let Ve=qZ(_-Ce.x,F,W,J)+Ce.badness;Ve<=me&&(ee=Ce,me=Ve)}return{index:L,x:_,priorBreak:ee,badness:me}}function OZ(L){return L?OZ(L.priorBreak).concat(L.index):[]}function HP(L,_,F,N,W,J){if(!L)return[];let ee=[],me=(function(wt,Ct,Rt,jt,Qt,Ar){let Pr=0;for(let gn=0;gn=0,Ve=0;for(let wt=0;wtVe){let nt=Math.ceil(J/Ve);W*=nt/ee,ee=nt}return{x1:N,y1:W,x2:N+J,y2:W+ee}}function UZ(L,_,F,N,W,J){let ee=L.image,me;if(ee.content){let Ar=ee.content,Pr=ee.pixelRatio||1;me=[Ar[0]/Pr,Ar[1]/Pr,ee.displaySize[0]-Ar[2]/Pr,ee.displaySize[1]-Ar[3]/Pr]}let Ce=_.left*J,Ve=_.right*J,nt,wt,Ct,Rt;F==="width"||F==="both"?(Rt=W[0]+Ce-N[3],wt=W[0]+Ve+N[1]):(Rt=W[0]+(Ce+Ve-ee.displaySize[0])/2,wt=Rt+ee.displaySize[0]);let jt=_.top*J,Qt=_.bottom*J;return F==="height"||F==="both"?(nt=W[1]+jt-N[0],Ct=W[1]+Qt+N[2]):(nt=W[1]+(jt+Qt-ee.displaySize[1])/2,Ct=nt+ee.displaySize[1]),{image:ee,top:nt,right:wt,bottom:Ct,left:Rt,collisionPadding:me}}let u5=255,vp=128,Mg=u5*vp;function VZ(L,_){let{expression:F}=_;if(F.kind==="constant")return{kind:"constant",layoutSize:F.evaluate(new Yi(L+1))};if(F.kind==="source")return{kind:"source"};{let{zoomStops:N,interpolationType:W}=F,J=0;for(;Jee.id)),this.index=_.index,this.pixelRatio=_.pixelRatio,this.sourceLayerIndex=_.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Zr([]),this.placementViewportMatrix=Zr([]);let F=this.layers[0]._unevaluatedLayout._values;this.textSizeData=VZ(this.zoom,F["text-size"]),this.iconSizeData=VZ(this.zoom,F["icon-size"]);let N=this.layers[0].layout,W=N.get("symbol-sort-key"),J=N.get("symbol-z-order");this.canOverlap=WP(N,"text-overlap","text-allow-overlap")!=="never"||WP(N,"icon-overlap","icon-allow-overlap")!=="never"||N.get("text-ignore-placement")||N.get("icon-ignore-placement"),this.sortFeaturesByKey=J!=="viewport-y"&&!W.isConstant(),this.sortFeaturesByY=(J==="viewport-y"||J==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,N.get("symbol-placement")==="point"&&(this.writingModes=N.get("text-writing-mode").map((ee=>a.ah[ee]))),this.stateDependentLayerIds=this.layers.filter((ee=>ee.isStateDependent())).map((ee=>ee.id)),this.sourceID=_.sourceID}createArrays(){this.text=new XP(new Ps(this.layers,this.zoom,(_=>/^text/.test(_)))),this.icon=new XP(new Ps(this.layers,this.zoom,(_=>/^icon/.test(_)))),this.glyphOffsetArray=new Ai,this.lineVertexArray=new di,this.symbolInstances=new Xa,this.textAnchorOffsets=new Xi}calculateGlyphDependencies(_,F,N,W,J){for(let ee=0;ee<_.length;ee++)if(F[_.charCodeAt(ee)]=!0,(N||W)&&J){let me=o5[_.charAt(ee)];me&&(F[me.charCodeAt(0)]=!0)}}populate(_,F,N){let W=this.layers[0],J=W.layout,ee=J.get("text-font"),me=J.get("text-field"),Ce=J.get("icon-image"),Ve=(me.value.kind!=="constant"||me.value.value instanceof Ti&&!me.value.value.isEmpty()||me.value.value.toString().length>0)&&(ee.value.kind!=="constant"||ee.value.value.length>0),nt=Ce.value.kind!=="constant"||!!Ce.value.value||Object.keys(Ce.parameters).length>0,wt=J.get("symbol-sort-key");if(this.features=[],!Ve&&!nt)return;let Ct=F.iconDependencies,Rt=F.glyphDependencies,jt=F.availableImages,Qt=new Yi(this.zoom);for(let{feature:Ar,id:Pr,index:gn,sourceLayerIndex:Yr}of _){let ln=W._featureFilter.needGeometry,Bn=Gs(Ar,ln);if(!W._featureFilter.filter(Qt,Bn,N))continue;let ga,Za;if(ln||(Bn.geometry=Qo(Ar)),Ve){let Ya=W.getValueAndResolveTokens("text-field",Bn,N,jt),Ua=Ti.factory(Ya),gi=this.hasRTLText=this.hasRTLText||A$e(Ua);(!gi||wo.getRTLTextPluginStatus()==="unavailable"||gi&&wo.isParsed())&&(ga=a$e(Ua,W,Bn))}if(nt){let Ya=W.getValueAndResolveTokens("icon-image",Bn,N,jt);Za=Ya instanceof ni?Ya:ni.fromString(Ya)}if(!ga&&!Za)continue;let Ii=this.sortFeaturesByKey?wt.evaluate(Bn,{},N):void 0;if(this.features.push({id:Pr,text:ga,icon:Za,index:gn,sourceLayerIndex:Yr,geometry:Bn.geometry,properties:Ar.properties,type:w$e[Ar.type],sortKey:Ii}),Za&&(Ct[Za.name]=!0),ga){let Ya=ee.evaluate(Bn,{},N).join(","),Ua=J.get("text-rotation-alignment")!=="viewport"&&J.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(a.ah.vertical)>=0;for(let gi of ga.sections)if(gi.image)Ct[gi.image.name]=!0;else{let ai=Ja(ga.toString()),Qa=gi.fontStack||Ya,Zn=Rt[Qa]=Rt[Qa]||{};this.calculateGlyphDependencies(gi.text,Zn,Ua,this.allowVerticalPlacement,ai)}}}J.get("symbol-placement")==="line"&&(this.features=(function(Ar){let Pr={},gn={},Yr=[],ln=0;function Bn(Ya){Yr.push(Ar[Ya]),ln++}function ga(Ya,Ua,gi){let ai=gn[Ya];return delete gn[Ya],gn[Ua]=ai,Yr[ai].geometry[0].pop(),Yr[ai].geometry[0]=Yr[ai].geometry[0].concat(gi[0]),ai}function Za(Ya,Ua,gi){let ai=Pr[Ua];return delete Pr[Ua],Pr[Ya]=ai,Yr[ai].geometry[0].shift(),Yr[ai].geometry[0]=gi[0].concat(Yr[ai].geometry[0]),ai}function Ii(Ya,Ua,gi){let ai=gi?Ua[0][Ua[0].length-1]:Ua[0][0];return`${Ya}:${ai.x}:${ai.y}`}for(let Ya=0;YaYa.geometry))})(this.features)),this.sortFeaturesByKey&&this.features.sort(((Ar,Pr)=>Ar.sortKey-Pr.sortKey))}update(_,F,N){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(_,F,this.layers,N),this.icon.programConfigurations.updatePaintArrays(_,F,this.layers,N))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(_){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(_),this.iconCollisionBox.upload(_)),this.text.upload(_,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(_,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(_,F){let N=this.lineVertexArray.length;if(_.segment!==void 0){let W=_.dist(F[_.segment+1]),J=_.dist(F[_.segment]),ee={};for(let me=_.segment+1;me=0;me--)ee[me]={x:F[me].x,y:F[me].y,tileUnitDistanceFromAnchor:J},me>0&&(J+=F[me-1].dist(F[me]));for(let me=0;me0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(_,F){let N=_.placedSymbolArray.get(F),W=N.vertexStartIndex+4*N.numGlyphs;for(let J=N.vertexStartIndex;JW[me]-W[Ce]||J[Ce]-J[me])),ee}addToSortKeyRanges(_,F){let N=this.sortKeyRanges[this.sortKeyRanges.length-1];N&&N.sortKey===F?N.symbolInstanceEnd=_+1:this.sortKeyRanges.push({sortKey:F,symbolInstanceStart:_,symbolInstanceEnd:_+1})}sortFeatures(_){if(this.sortFeaturesByY&&this.sortedAngle!==_&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(_),this.sortedAngle=_,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let F of this.symbolInstanceIndexes){let N=this.symbolInstances.get(F);this.featureSortOrder.push(N.featureIndex),[N.rightJustifiedTextSymbolIndex,N.centerJustifiedTextSymbolIndex,N.leftJustifiedTextSymbolIndex].forEach(((W,J,ee)=>{W>=0&&ee.indexOf(W)===J&&this.addIndicesForPlacedSymbol(this.text,W)})),N.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,N.verticalPlacedTextSymbolIndex),N.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,N.placedIconSymbolIndex),N.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,N.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let GZ,HZ;Wr("SymbolBucket",ib,{omit:["layers","collisionBoxArray","features","compareText"]}),ib.MAX_GLYPHS=65535,ib.addDynamicAttributes=YP;var $P={get paint(){return HZ=HZ||new K({"icon-opacity":new oi(le.paint_symbol["icon-opacity"]),"icon-color":new oi(le.paint_symbol["icon-color"]),"icon-halo-color":new oi(le.paint_symbol["icon-halo-color"]),"icon-halo-width":new oi(le.paint_symbol["icon-halo-width"]),"icon-halo-blur":new oi(le.paint_symbol["icon-halo-blur"]),"icon-translate":new Wa(le.paint_symbol["icon-translate"]),"icon-translate-anchor":new Wa(le.paint_symbol["icon-translate-anchor"]),"text-opacity":new oi(le.paint_symbol["text-opacity"]),"text-color":new oi(le.paint_symbol["text-color"],{runtimeType:pt,getOverride:L=>L.textColor,hasOverride:L=>!!L.textColor}),"text-halo-color":new oi(le.paint_symbol["text-halo-color"]),"text-halo-width":new oi(le.paint_symbol["text-halo-width"]),"text-halo-blur":new oi(le.paint_symbol["text-halo-blur"]),"text-translate":new Wa(le.paint_symbol["text-translate"]),"text-translate-anchor":new Wa(le.paint_symbol["text-translate-anchor"])})},get layout(){return GZ=GZ||new K({"symbol-placement":new Wa(le.layout_symbol["symbol-placement"]),"symbol-spacing":new Wa(le.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Wa(le.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new oi(le.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Wa(le.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Wa(le.layout_symbol["icon-allow-overlap"]),"icon-overlap":new Wa(le.layout_symbol["icon-overlap"]),"icon-ignore-placement":new Wa(le.layout_symbol["icon-ignore-placement"]),"icon-optional":new Wa(le.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Wa(le.layout_symbol["icon-rotation-alignment"]),"icon-size":new oi(le.layout_symbol["icon-size"]),"icon-text-fit":new Wa(le.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Wa(le.layout_symbol["icon-text-fit-padding"]),"icon-image":new oi(le.layout_symbol["icon-image"]),"icon-rotate":new oi(le.layout_symbol["icon-rotate"]),"icon-padding":new oi(le.layout_symbol["icon-padding"]),"icon-keep-upright":new Wa(le.layout_symbol["icon-keep-upright"]),"icon-offset":new oi(le.layout_symbol["icon-offset"]),"icon-anchor":new oi(le.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Wa(le.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Wa(le.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Wa(le.layout_symbol["text-rotation-alignment"]),"text-field":new oi(le.layout_symbol["text-field"]),"text-font":new oi(le.layout_symbol["text-font"]),"text-size":new oi(le.layout_symbol["text-size"]),"text-max-width":new oi(le.layout_symbol["text-max-width"]),"text-line-height":new Wa(le.layout_symbol["text-line-height"]),"text-letter-spacing":new oi(le.layout_symbol["text-letter-spacing"]),"text-justify":new oi(le.layout_symbol["text-justify"]),"text-radial-offset":new oi(le.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Wa(le.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new oi(le.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new oi(le.layout_symbol["text-anchor"]),"text-max-angle":new Wa(le.layout_symbol["text-max-angle"]),"text-writing-mode":new Wa(le.layout_symbol["text-writing-mode"]),"text-rotate":new oi(le.layout_symbol["text-rotate"]),"text-padding":new Wa(le.layout_symbol["text-padding"]),"text-keep-upright":new Wa(le.layout_symbol["text-keep-upright"]),"text-transform":new oi(le.layout_symbol["text-transform"]),"text-offset":new oi(le.layout_symbol["text-offset"]),"text-allow-overlap":new Wa(le.layout_symbol["text-allow-overlap"]),"text-overlap":new Wa(le.layout_symbol["text-overlap"]),"text-ignore-placement":new Wa(le.layout_symbol["text-ignore-placement"]),"text-optional":new Wa(le.layout_symbol["text-optional"])})}};class jZ{constructor(_){if(_.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=_.property.overrides?_.property.overrides.runtimeType:ft,this.defaultValue=_}evaluate(_){if(_.formattedSection){let F=this.defaultValue.property.overrides;if(F&&F.hasOverride(_.formattedSection))return F.getOverride(_.formattedSection)}return _.feature&&_.featureState?this.defaultValue.evaluate(_.feature,_.featureState):this.defaultValue.property.specification.default}eachChild(_){this.defaultValue.isConstant()||_(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Wr("FormatSectionOverride",jZ,{omit:["defaultValue"]});class hM extends I{constructor(_){super(_,$P)}recalculate(_,F){if(super.recalculate(_,F),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let N=this.layout.get("text-writing-mode");if(N){let W=[];for(let J of N)W.indexOf(J)<0&&W.push(J);this.layout._values["text-writing-mode"]=W}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(_,F,N,W){let J=this.layout.get(_).evaluate(F,{},N,W),ee=this._unevaluatedLayout._values[_];return ee.isDataDriven()||sh(ee.value)||!J?J:(function(me,Ce){return Ce.replace(/{([^{}]+)}/g,((Ve,nt)=>me&&nt in me?String(me[nt]):""))})(F.properties,J)}createBucket(_){return new ib(_)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let _ of $P.paint.overridableProperties){if(!hM.hasPaintOverride(this.layout,_))continue;let F=this.paint.get(_),N=new jZ(F),W=new ru(N,F.property.specification),J=null;J=F.value.kind==="constant"||F.value.kind==="source"?new Hu("source",W):new Pl("composite",W,F.value.zoomStops),this.paint._values[_]=new ul(F.property,J,F.parameters)}}_handleOverridablePaintPropertyUpdate(_,F,N){return!(!this.layout||F.isDataDriven()||N.isDataDriven())&&hM.hasPaintOverride(this.layout,_)}static hasPaintOverride(_,F){let N=_.get("text-field"),W=$P.paint.properties[F],J=!1,ee=me=>{for(let Ce of me)if(W.overrides&&W.overrides.hasOverride(Ce))return void(J=!0)};if(N.value.kind==="constant"&&N.value.value instanceof Ti)ee(N.value.value.sections);else if(N.value.kind==="source"){let me=Ve=>{J||(Ve instanceof Zo&&to(Ve.value)===_r?ee(Ve.value.sections):Ve instanceof Bs?ee(Ve.sections):Ve.eachChild(me))},Ce=N.value;Ce._styleExpression&&me(Ce._styleExpression.expression)}return J}}let WZ;var M$e={get paint(){return WZ=WZ||new K({"background-color":new Wa(le.paint_background["background-color"]),"background-pattern":new pf(le.paint_background["background-pattern"]),"background-opacity":new Wa(le.paint_background["background-opacity"])})}};class S$e extends I{constructor(_){super(_,M$e)}}let YZ;var E$e={get paint(){return YZ=YZ||new K({"raster-opacity":new Wa(le.paint_raster["raster-opacity"]),"raster-hue-rotate":new Wa(le.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Wa(le.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Wa(le.paint_raster["raster-brightness-max"]),"raster-saturation":new Wa(le.paint_raster["raster-saturation"]),"raster-contrast":new Wa(le.paint_raster["raster-contrast"]),"raster-resampling":new Wa(le.paint_raster["raster-resampling"]),"raster-fade-duration":new Wa(le.paint_raster["raster-fade-duration"])})}};class k$e extends I{constructor(_){super(_,E$e)}}class C$e extends I{constructor(_){super(_,{}),this.onAdd=F=>{this.implementation.onAdd&&this.implementation.onAdd(F,F.painter.context.gl)},this.onRemove=F=>{this.implementation.onRemove&&this.implementation.onRemove(F,F.painter.context.gl)},this.implementation=_}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class L$e{constructor(_){this._methodToThrottle=_,this._triggered=!1,typeof MessageChannel!="undefined"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout((()=>{this._triggered=!1,this._methodToThrottle()}),0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let KP=63710088e-1;class Sg{constructor(_,F){if(isNaN(_)||isNaN(F))throw new Error(`Invalid LngLat object: (${_}, ${F})`);if(this.lng=+_,this.lat=+F,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Sg(w(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(_){let F=Math.PI/180,N=this.lat*F,W=_.lat*F,J=Math.sin(N)*Math.sin(W)+Math.cos(N)*Math.cos(W)*Math.cos((_.lng-this.lng)*F);return KP*Math.acos(Math.min(J,1))}static convert(_){if(_ instanceof Sg)return _;if(Array.isArray(_)&&(_.length===2||_.length===3))return new Sg(Number(_[0]),Number(_[1]));if(!Array.isArray(_)&&typeof _=="object"&&_!==null)return new Sg(Number("lng"in _?_.lng:_.lon),Number(_.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 [, ]")}}let XZ=2*Math.PI*KP;function ZZ(L){return XZ*Math.cos(L*Math.PI/180)}function $Z(L){return(180+L)/360}function KZ(L){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+L*Math.PI/360)))/360}function JZ(L,_){return L/ZZ(_)}function JP(L){return 360/Math.PI*Math.atan(Math.exp((180-360*L)*Math.PI/180))-90}class c5{constructor(_,F,N=0){this.x=+_,this.y=+F,this.z=+N}static fromLngLat(_,F=0){let N=Sg.convert(_);return new c5($Z(N.lng),KZ(N.lat),JZ(F,N.lat))}toLngLat(){return new Sg(360*this.x-180,JP(this.y))}toAltitude(){return this.z*ZZ(JP(this.y))}meterInMercatorCoordinateUnits(){return 1/XZ*(_=JP(this.y),1/Math.cos(_*Math.PI/180));var _}}function QZ(L,_,F){var N=2*Math.PI*6378137/256/Math.pow(2,F);return[L*N-2*Math.PI*6378137/2,_*N-2*Math.PI*6378137/2]}class QP{constructor(_,F,N){if(!(function(W,J,ee){return!(W<0||W>25||ee<0||ee>=Math.pow(2,W)||J<0||J>=Math.pow(2,W))})(_,F,N))throw new Error(`x=${F}, y=${N}, z=${_} outside of bounds. 0<=x<${Math.pow(2,_)}, 0<=y<${Math.pow(2,_)} 0<=z<=25 `);this.z=_,this.x=F,this.y=N,this.key=f5(0,_,_,F,N)}equals(_){return this.z===_.z&&this.x===_.x&&this.y===_.y}url(_,F,N){let W=(ee=this.y,me=this.z,Ce=QZ(256*(J=this.x),256*(ee=Math.pow(2,me)-ee-1),me),Ve=QZ(256*(J+1),256*(ee+1),me),Ce[0]+","+Ce[1]+","+Ve[0]+","+Ve[1]);var J,ee,me,Ce,Ve;let nt=(function(wt,Ct,Rt){let jt,Qt="";for(let Ar=wt;Ar>0;Ar--)jt=1<1?"@2x":"").replace(/{quadkey}/g,nt).replace(/{bbox-epsg-3857}/g,W)}isChildOf(_){let F=this.z-_.z;return F>0&&_.x===this.x>>F&&_.y===this.y>>F}getTilePoint(_){let F=Math.pow(2,this.z);return new u((_.x*F-this.x)*$a,(_.y*F-this.y)*$a)}toString(){return`${this.z}/${this.x}/${this.y}`}}class e${constructor(_,F){this.wrap=_,this.canonical=F,this.key=f5(_,F.z,F.z,F.x,F.y)}}class iv{constructor(_,F,N,W,J){if(_= z; overscaledZ = ${_}; z = ${N}`);this.overscaledZ=_,this.wrap=F,this.canonical=new QP(N,+W,+J),this.key=f5(F,_,N,W,J)}clone(){return new iv(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(_){return this.overscaledZ===_.overscaledZ&&this.wrap===_.wrap&&this.canonical.equals(_.canonical)}scaledTo(_){if(_>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${_}; overscaledZ = ${this.overscaledZ}`);let F=this.canonical.z-_;return _>this.canonical.z?new iv(_,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new iv(_,this.wrap,_,this.canonical.x>>F,this.canonical.y>>F)}calculateScaledKey(_,F){if(_>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${_}; overscaledZ = ${this.overscaledZ}`);let N=this.canonical.z-_;return _>this.canonical.z?f5(this.wrap*+F,_,this.canonical.z,this.canonical.x,this.canonical.y):f5(this.wrap*+F,_,_,this.canonical.x>>N,this.canonical.y>>N)}isChildOf(_){if(_.wrap!==this.wrap)return!1;let F=this.canonical.z-_.canonical.z;return _.overscaledZ===0||_.overscaledZ>F&&_.canonical.y===this.canonical.y>>F}children(_){if(this.overscaledZ>=_)return[new iv(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let F=this.canonical.z+1,N=2*this.canonical.x,W=2*this.canonical.y;return[new iv(F,this.wrap,F,N,W),new iv(F,this.wrap,F,N+1,W),new iv(F,this.wrap,F,N,W+1),new iv(F,this.wrap,F,N+1,W+1)]}isLessThan(_){return this.wrap<_.wrap||!(this.wrap>_.wrap)&&(this.overscaledZ<_.overscaledZ||!(this.overscaledZ>_.overscaledZ)&&(this.canonical.x<_.canonical.x||!(this.canonical.x>_.canonical.x)&&this.canonical.y<_.canonical.y))}wrapped(){return new iv(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)}unwrapTo(_){return new iv(this.overscaledZ,_,this.canonical.z,this.canonical.x,this.canonical.y)}overscaleFactor(){return Math.pow(2,this.overscaledZ-this.canonical.z)}toUnwrapped(){return new e$(this.wrap,this.canonical)}toString(){return`${this.overscaledZ}/${this.canonical.x}/${this.canonical.y}`}getTilePoint(_){return this.canonical.getTilePoint(new c5(_.x-this.wrap,_.y))}}function f5(L,_,F,N,W){(L*=2)<0&&(L=-1*L-1);let J=1<this.max&&(this.max=wt),wt=this.dim+1||F<-1||F>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(F+1)*this.stride+(_+1)}unpack(_,F,N){return _*this.redFactor+F*this.greenFactor+N*this.blueFactor-this.baseShift}getPixels(){return new rn({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(_,F,N){if(this.dim!==_.dim)throw new Error("dem dimension mismatch");let W=F*this.dim,J=F*this.dim+this.dim,ee=N*this.dim,me=N*this.dim+this.dim;switch(F){case-1:W=J-1;break;case 1:J=W+1}switch(N){case-1:ee=me-1;break;case 1:me=ee+1}let Ce=-F*this.dim,Ve=-N*this.dim;for(let nt=ee;nt=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${_} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[_]}}class n${constructor(_,F,N,W,J){this.type="Feature",this._vectorTileFeature=_,_._z=F,_._x=N,_._y=W,this.properties=_.properties,this.id=J}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(_){this._geometry=_}toJSON(){let _={geometry:this.geometry};for(let F in this)F!=="_geometry"&&F!=="_vectorTileFeature"&&(_[F]=this[F]);return _}}class a${constructor(_,F){this.tileID=_,this.x=_.canonical.x,this.y=_.canonical.y,this.z=_.canonical.z,this.grid=new nn($a,16,0),this.grid3D=new nn($a,16,0),this.featureIndexArray=new fs,this.promoteId=F}insert(_,F,N,W,J,ee){let me=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(N,W,J);let Ce=ee?this.grid3D:this.grid;for(let Ve=0;Ve=0&&wt[3]>=0&&Ce.insert(me,wt[0],wt[1],wt[2],wt[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new yr.VectorTile(new UP(this.rawTileData)).layers,this.sourceLayerCoder=new r$(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(_,F,N,W){this.loadVTLayers();let J=_.params||{},ee=$a/_.tileSize/_.scale,me=ju(J.filter),Ce=_.queryGeometry,Ve=_.queryPadding*ee,nt=o$(Ce),wt=this.grid.query(nt.minX-Ve,nt.minY-Ve,nt.maxX+Ve,nt.maxY+Ve),Ct=o$(_.cameraQueryGeometry),Rt=this.grid3D.query(Ct.minX-Ve,Ct.minY-Ve,Ct.maxX+Ve,Ct.maxY+Ve,((Ar,Pr,gn,Yr)=>(function(ln,Bn,ga,Za,Ii){for(let Ua of ln)if(Bn<=Ua.x&&ga<=Ua.y&&Za>=Ua.x&&Ii>=Ua.y)return!0;let Ya=[new u(Bn,ga),new u(Bn,Ii),new u(Za,Ii),new u(Za,ga)];if(ln.length>2){for(let Ua of Ya)if(Xr(ln,Ua))return!0}for(let Ua=0;Ua(Yr||(Yr=Qo(ln)),Bn.queryIntersectsFeature(Ce,ln,ga,Yr,this.z,_.transform,ee,_.pixelPosMatrix))))}return jt}loadMatchingFeature(_,F,N,W,J,ee,me,Ce,Ve,nt,wt){let Ct=this.bucketLayerIDs[F];if(ee&&!(function(Ar,Pr){for(let gn=0;gn=0)return!0;return!1})(ee,Ct))return;let Rt=this.sourceLayerCoder.decode(N),jt=this.vtLayers[Rt].feature(W);if(J.needGeometry){let Ar=Gs(jt,!0);if(!J.filter(new Yi(this.tileID.overscaledZ),Ar,this.tileID.canonical))return}else if(!J.filter(new Yi(this.tileID.overscaledZ),jt))return;let Qt=this.getId(jt,Rt);for(let Ar=0;Ar{let me=_ instanceof Pc?_.get(ee):null;return me&&me.evaluate?me.evaluate(F,N,W):me}))}function o$(L){let _=1/0,F=1/0,N=-1/0,W=-1/0;for(let J of L)_=Math.min(_,J.x),F=Math.min(F,J.y),N=Math.max(N,J.x),W=Math.max(W,J.y);return{minX:_,minY:F,maxX:N,maxY:W}}function F$e(L,_){return _-L}function s$(L,_,F,N,W){let J=[];for(let ee=0;ee=N&&wt.x>=N||(nt.x>=N?nt=new u(N,nt.y+(N-nt.x)/(wt.x-nt.x)*(wt.y-nt.y))._round():wt.x>=N&&(wt=new u(N,nt.y+(N-nt.x)/(wt.x-nt.x)*(wt.y-nt.y))._round()),nt.y>=W&&wt.y>=W||(nt.y>=W?nt=new u(nt.x+(W-nt.y)/(wt.y-nt.y)*(wt.x-nt.x),W)._round():wt.y>=W&&(wt=new u(nt.x+(W-nt.y)/(wt.y-nt.y)*(wt.x-nt.x),W)._round()),Ce&&nt.equals(Ce[Ce.length-1])||(Ce=[nt],J.push(Ce)),Ce.push(wt)))))}}return J}Wr("FeatureIndex",a$,{omit:["rawTileData","sourceLayerCoder"]});class Eg extends u{constructor(_,F,N,W){super(_,F),this.angle=N,W!==void 0&&(this.segment=W)}clone(){return new Eg(this.x,this.y,this.angle,this.segment)}}function l$(L,_,F,N,W){if(_.segment===void 0||F===0)return!0;let J=_,ee=_.segment+1,me=0;for(;me>-F/2;){if(ee--,ee<0)return!1;me-=L[ee].dist(J),J=L[ee]}me+=L[ee].dist(L[ee+1]),ee++;let Ce=[],Ve=0;for(;meN;)Ve-=Ce.shift().angleDelta;if(Ve>W)return!1;ee++,me+=nt.dist(wt)}return!0}function u$(L){let _=0;for(let F=0;FVe){let jt=(Ve-Ce)/Rt,Qt=Mi.number(wt.x,Ct.x,jt),Ar=Mi.number(wt.y,Ct.y,jt),Pr=new Eg(Qt,Ar,Ct.angleTo(wt),nt);return Pr._round(),!ee||l$(L,Pr,me,ee,_)?Pr:void 0}Ce+=Rt}}function D$e(L,_,F,N,W,J,ee,me,Ce){let Ve=c$(N,J,ee),nt=f$(N,W),wt=nt*ee,Ct=L[0].x===0||L[0].x===Ce||L[0].y===0||L[0].y===Ce;return _-wt<_/4&&(_=wt+_/4),h$(L,Ct?_/2*me%_:(nt/2+2*J)*ee*me%_,_,Ve,F,wt,Ct,!1,Ce)}function h$(L,_,F,N,W,J,ee,me,Ce){let Ve=J/2,nt=u$(L),wt=0,Ct=_-F,Rt=[];for(let jt=0;jt=0&&ln=0&&Bn=0&&Ct+Ve<=nt){let ga=new Eg(ln,Bn,gn,jt);ga._round(),N&&!l$(L,ga,J,N,W)||Rt.push(ga)}}wt+=Pr}return me||Rt.length||ee||(Rt=h$(L,wt/2,F,N,W,J,ee,!0,Ce)),Rt}Wr("Anchor",Eg);let ob=bd;function d$(L,_,F,N){let W=[],J=L.image,ee=J.pixelRatio,me=J.paddedRect.w-2*ob,Ce=J.paddedRect.h-2*ob,Ve={x1:L.left,y1:L.top,x2:L.right,y2:L.bottom},nt=J.stretchX||[[0,me]],wt=J.stretchY||[[0,Ce]],Ct=(Zn,wi)=>Zn+wi[1]-wi[0],Rt=nt.reduce(Ct,0),jt=wt.reduce(Ct,0),Qt=me-Rt,Ar=Ce-jt,Pr=0,gn=Rt,Yr=0,ln=jt,Bn=0,ga=Qt,Za=0,Ii=Ar;if(J.content&&N){let Zn=J.content,wi=Zn[2]-Zn[0],vi=Zn[3]-Zn[1];(J.textFitWidth||J.textFitHeight)&&(Ve=NZ(L)),Pr=dM(nt,0,Zn[0]),Yr=dM(wt,0,Zn[1]),gn=dM(nt,Zn[0],Zn[2]),ln=dM(wt,Zn[1],Zn[3]),Bn=Zn[0]-Pr,Za=Zn[1]-Yr,ga=wi-gn,Ii=vi-ln}let Ya=Ve.x1,Ua=Ve.y1,gi=Ve.x2-Ya,ai=Ve.y2-Ua,Qa=(Zn,wi,vi,eo)=>{let Ml=vM(Zn.stretch-Pr,gn,gi,Ya),dl=pM(Zn.fixed-Bn,ga,Zn.stretch,Rt),gf=vM(wi.stretch-Yr,ln,ai,Ua),Dv=pM(wi.fixed-Za,Ii,wi.stretch,jt),dh=vM(vi.stretch-Pr,gn,gi,Ya),mf=pM(vi.fixed-Bn,ga,vi.stretch,Rt),td=vM(eo.stretch-Yr,ln,ai,Ua),rd=pM(eo.fixed-Za,Ii,eo.stretch,jt),nd=new u(Ml,gf),Xu=new u(dh,gf),yf=new u(dh,td),Dh=new u(Ml,td),vh=new u(dl/ee,Dv/ee),ad=new u(mf/ee,rd/ee),ph=_*Math.PI/180;if(ph){let As=Math.sin(ph),Rl=Math.cos(ph),Hl=[Rl,-As,As,Rl];nd._matMult(Hl),Xu._matMult(Hl),Dh._matMult(Hl),yf._matMult(Hl)}let ov=Zn.stretch+Zn.fixed,_d=wi.stretch+wi.fixed;return{tl:nd,tr:Xu,bl:Dh,br:yf,tex:{x:J.paddedRect.x+ob+ov,y:J.paddedRect.y+ob+_d,w:vi.stretch+vi.fixed-ov,h:eo.stretch+eo.fixed-_d},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:vh,pixelOffsetBR:ad,minFontScaleX:ga/ee/gi,minFontScaleY:Ii/ee/ai,isSDF:F}};if(N&&(J.stretchX||J.stretchY)){let Zn=v$(nt,Qt,Rt),wi=v$(wt,Ar,jt);for(let vi=0;vi0&&(Qt=Math.max(10,Qt),this.circleDiameter=Qt)}else{let Ct=!((wt=ee.image)===null||wt===void 0)&&wt.content&&(ee.image.textFitWidth||ee.image.textFitHeight)?NZ(ee):{x1:ee.left,y1:ee.top,x2:ee.right,y2:ee.bottom};Ct.y1=Ct.y1*me-Ce[0],Ct.y2=Ct.y2*me+Ce[2],Ct.x1=Ct.x1*me-Ce[3],Ct.x2=Ct.x2*me+Ce[1];let Rt=ee.collisionPadding;if(Rt&&(Ct.x1-=Rt[0]*me,Ct.y1-=Rt[1]*me,Ct.x2+=Rt[2]*me,Ct.y2+=Rt[3]*me),nt){let jt=new u(Ct.x1,Ct.y1),Qt=new u(Ct.x2,Ct.y1),Ar=new u(Ct.x1,Ct.y2),Pr=new u(Ct.x2,Ct.y2),gn=nt*Math.PI/180;jt._rotate(gn),Qt._rotate(gn),Ar._rotate(gn),Pr._rotate(gn),Ct.x1=Math.min(jt.x,Qt.x,Ar.x,Pr.x),Ct.x2=Math.max(jt.x,Qt.x,Ar.x,Pr.x),Ct.y1=Math.min(jt.y,Qt.y,Ar.y,Pr.y),Ct.y2=Math.max(jt.y,Qt.y,Ar.y,Pr.y)}_.emplaceBack(F.x,F.y,Ct.x1,Ct.y1,Ct.x2,Ct.y2,N,W,J)}this.boxEndIndex=_.length}}class R$e{constructor(_=[],F=((N,W)=>NW?1:0)){if(this.data=_,this.length=this.data.length,this.compare=F,this.length>0)for(let N=(this.length>>1)-1;N>=0;N--)this._down(N)}push(_){this.data.push(_),this._up(this.length++)}pop(){if(this.length===0)return;let _=this.data[0],F=this.data.pop();return--this.length>0&&(this.data[0]=F,this._down(0)),_}peek(){return this.data[0]}_up(_){let{data:F,compare:N}=this,W=F[_];for(;_>0;){let J=_-1>>1,ee=F[J];if(N(W,ee)>=0)break;F[_]=ee,_=J}F[_]=W}_down(_){let{data:F,compare:N}=this,W=this.length>>1,J=F[_];for(;_=0)break;F[_]=F[ee],_=ee}F[_]=J}}function I$e(L,_=1,F=!1){let N=1/0,W=1/0,J=-1/0,ee=-1/0,me=L[0];for(let Rt=0;RtJ)&&(J=jt.x),(!Rt||jt.y>ee)&&(ee=jt.y)}let Ce=Math.min(J-N,ee-W),Ve=Ce/2,nt=new R$e([],z$e);if(Ce===0)return new u(N,W);for(let Rt=N;Rtwt.d||!wt.d)&&(wt=Rt,F&&console.log("found best %d after %d probes",Math.round(1e4*Rt.d)/1e4,Ct)),Rt.max-wt.d<=_||(Ve=Rt.h/2,nt.push(new sb(Rt.p.x-Ve,Rt.p.y-Ve,Ve,L)),nt.push(new sb(Rt.p.x+Ve,Rt.p.y-Ve,Ve,L)),nt.push(new sb(Rt.p.x-Ve,Rt.p.y+Ve,Ve,L)),nt.push(new sb(Rt.p.x+Ve,Rt.p.y+Ve,Ve,L)),Ct+=4)}return F&&(console.log(`num probes: ${Ct}`),console.log(`best distance: ${wt.d}`)),wt.p}function z$e(L,_){return _.max-L.max}function sb(L,_,F,N){this.p=new u(L,_),this.h=F,this.d=(function(W,J){let ee=!1,me=1/0;for(let Ce=0;CeW.y!=jt.y>W.y&&W.x<(jt.x-Rt.x)*(W.y-Rt.y)/(jt.y-Rt.y)+Rt.x&&(ee=!ee),me=Math.min(me,ur(W,Rt,jt))}}return(ee?1:-1)*Math.sqrt(me)})(this.p,N),this.max=this.d+this.h*Math.SQRT2}var hh;a.aq=void 0,(hh=a.aq||(a.aq={}))[hh.center=1]="center",hh[hh.left=2]="left",hh[hh.right=3]="right",hh[hh.top=4]="top",hh[hh.bottom=5]="bottom",hh[hh["top-left"]=6]="top-left",hh[hh["top-right"]=7]="top-right",hh[hh["bottom-left"]=8]="bottom-left",hh[hh["bottom-right"]=9]="bottom-right";let kg=7,eD=Number.POSITIVE_INFINITY;function p$(L,_){return _[1]!==eD?(function(F,N,W){let J=0,ee=0;switch(N=Math.abs(N),W=Math.abs(W),F){case"top-right":case"top-left":case"top":ee=W-kg;break;case"bottom-right":case"bottom-left":case"bottom":ee=-W+kg}switch(F){case"top-right":case"bottom-right":case"right":J=-N;break;case"top-left":case"bottom-left":case"left":J=N}return[J,ee]})(L,_[0],_[1]):(function(F,N){let W=0,J=0;N<0&&(N=0);let ee=N/Math.SQRT2;switch(F){case"top-right":case"top-left":J=ee-kg;break;case"bottom-right":case"bottom-left":J=-ee+kg;break;case"bottom":J=-N+kg;break;case"top":J=N-kg}switch(F){case"top-right":case"bottom-right":W=-ee;break;case"top-left":case"bottom-left":W=ee;break;case"left":W=N;break;case"right":W=-N}return[W,J]})(L,_[0])}function g$(L,_,F){var N;let W=L.layout,J=(N=W.get("text-variable-anchor-offset"))===null||N===void 0?void 0:N.evaluate(_,{},F);if(J){let me=J.values,Ce=[];for(let Ve=0;VeCt*$c));nt.startsWith("top")?wt[1]-=kg:nt.startsWith("bottom")&&(wt[1]+=kg),Ce[Ve+1]=wt}return new Oi(Ce)}let ee=W.get("text-variable-anchor");if(ee){let me;me=L._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[W.get("text-radial-offset").evaluate(_,{},F)*$c,eD]:W.get("text-offset").evaluate(_,{},F).map((Ve=>Ve*$c));let Ce=[];for(let Ve of ee)Ce.push(Ve,p$(Ve,me));return new Oi(Ce)}return null}function tD(L){switch(L){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function q$e(L,_,F,N,W,J,ee,me,Ce,Ve,nt){let wt=J.textMaxSize.evaluate(_,{});wt===void 0&&(wt=ee);let Ct=L.layers[0].layout,Rt=Ct.get("icon-offset").evaluate(_,{},nt),jt=y$(F.horizontal),Qt=ee/24,Ar=L.tilePixelRatio*Qt,Pr=L.tilePixelRatio*wt/24,gn=L.tilePixelRatio*me,Yr=L.tilePixelRatio*Ct.get("symbol-spacing"),ln=Ct.get("text-padding")*L.tilePixelRatio,Bn=(function(Zn,wi,vi,eo=1){let Ml=Zn.get("icon-padding").evaluate(wi,{},vi),dl=Ml&&Ml.values;return[dl[0]*eo,dl[1]*eo,dl[2]*eo,dl[3]*eo]})(Ct,_,nt,L.tilePixelRatio),ga=Ct.get("text-max-angle")/180*Math.PI,Za=Ct.get("text-rotation-alignment")!=="viewport"&&Ct.get("symbol-placement")!=="point",Ii=Ct.get("icon-rotation-alignment")==="map"&&Ct.get("symbol-placement")!=="point",Ya=Ct.get("symbol-placement"),Ua=Yr/2,gi=Ct.get("icon-text-fit"),ai;N&&gi!=="none"&&(L.allowVerticalPlacement&&F.vertical&&(ai=UZ(N,F.vertical,gi,Ct.get("icon-text-fit-padding"),Rt,Qt)),jt&&(N=UZ(N,jt,gi,Ct.get("icon-text-fit-padding"),Rt,Qt)));let Qa=(Zn,wi)=>{wi.x<0||wi.x>=$a||wi.y<0||wi.y>=$a||(function(vi,eo,Ml,dl,gf,Dv,dh,mf,td,rd,nd,Xu,yf,Dh,vh,ad,ph,ov,_d,As,Rl,Hl,qd,Iu,lb){let pp=vi.addToLineVertexArray(eo,Ml),gp,Rv,sv,Gf,x1=0,v5=0,w$=0,T$=0,uD=-1,cD=-1,b1={},A$=Hr("");if(vi.allowVerticalPlacement&&dl.vertical){let Rh=mf.layout.get("text-rotate").evaluate(Rl,{},Iu)+90;sv=new gM(td,eo,rd,nd,Xu,dl.vertical,yf,Dh,vh,Rh),dh&&(Gf=new gM(td,eo,rd,nd,Xu,dh,ph,ov,vh,Rh))}if(gf){let Rh=mf.layout.get("icon-rotate").evaluate(Rl,{}),lv=mf.layout.get("icon-text-fit")!=="none",Cy=d$(gf,Rh,qd,lv),S0=dh?d$(dh,Rh,qd,lv):void 0;Rv=new gM(td,eo,rd,nd,Xu,gf,ph,ov,!1,Rh),x1=4*Cy.length;let Ly=vi.iconSizeData,mp=null;Ly.kind==="source"?(mp=[vp*mf.layout.get("icon-size").evaluate(Rl,{})],mp[0]>Mg&&A(`${vi.layerIds[0]}: Value for "icon-size" is >= ${u5}. Reduce your "icon-size".`)):Ly.kind==="composite"&&(mp=[vp*Hl.compositeIconSizes[0].evaluate(Rl,{},Iu),vp*Hl.compositeIconSizes[1].evaluate(Rl,{},Iu)],(mp[0]>Mg||mp[1]>Mg)&&A(`${vi.layerIds[0]}: Value for "icon-size" is >= ${u5}. Reduce your "icon-size".`)),vi.addSymbols(vi.icon,Cy,mp,As,_d,Rl,a.ah.none,eo,pp.lineStartIndex,pp.lineLength,-1,Iu),uD=vi.icon.placedSymbolArray.length-1,S0&&(v5=4*S0.length,vi.addSymbols(vi.icon,S0,mp,As,_d,Rl,a.ah.vertical,eo,pp.lineStartIndex,pp.lineLength,-1,Iu),cD=vi.icon.placedSymbolArray.length-1)}let M$=Object.keys(dl.horizontal);for(let Rh of M$){let lv=dl.horizontal[Rh];if(!gp){A$=Hr(lv.text);let S0=mf.layout.get("text-rotate").evaluate(Rl,{},Iu);gp=new gM(td,eo,rd,nd,Xu,lv,yf,Dh,vh,S0)}let Cy=lv.positionedLines.length===1;if(w$+=m$(vi,eo,lv,Dv,mf,vh,Rl,ad,pp,dl.vertical?a.ah.horizontal:a.ah.horizontalOnly,Cy?M$:[Rh],b1,uD,Hl,Iu),Cy)break}dl.vertical&&(T$+=m$(vi,eo,dl.vertical,Dv,mf,vh,Rl,ad,pp,a.ah.vertical,["vertical"],b1,cD,Hl,Iu));let N$e=gp?gp.boxStartIndex:vi.collisionBoxArray.length,U$e=gp?gp.boxEndIndex:vi.collisionBoxArray.length,V$e=sv?sv.boxStartIndex:vi.collisionBoxArray.length,G$e=sv?sv.boxEndIndex:vi.collisionBoxArray.length,H$e=Rv?Rv.boxStartIndex:vi.collisionBoxArray.length,j$e=Rv?Rv.boxEndIndex:vi.collisionBoxArray.length,W$e=Gf?Gf.boxStartIndex:vi.collisionBoxArray.length,Y$e=Gf?Gf.boxEndIndex:vi.collisionBoxArray.length,M0=-1,yM=(Rh,lv)=>Rh&&Rh.circleDiameter?Math.max(Rh.circleDiameter,lv):lv;M0=yM(gp,M0),M0=yM(sv,M0),M0=yM(Rv,M0),M0=yM(Gf,M0);let S$=M0>-1?1:0;S$&&(M0*=lb/$c),vi.glyphOffsetArray.length>=ib.MAX_GLYPHS&&A("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Rl.sortKey!==void 0&&vi.addToSortKeyRanges(vi.symbolInstances.length,Rl.sortKey);let X$e=g$(mf,Rl,Iu),[Z$e,$$e]=(function(Rh,lv){let Cy=Rh.length,S0=lv==null?void 0:lv.values;if((S0==null?void 0:S0.length)>0)for(let Ly=0;Ly=0?b1.right:-1,b1.center>=0?b1.center:-1,b1.left>=0?b1.left:-1,b1.vertical||-1,uD,cD,A$,N$e,U$e,V$e,G$e,H$e,j$e,W$e,Y$e,rd,w$,T$,x1,v5,S$,0,yf,M0,Z$e,$$e)})(L,wi,Zn,F,N,W,ai,L.layers[0],L.collisionBoxArray,_.index,_.sourceLayerIndex,L.index,Ar,[ln,ln,ln,ln],Za,Ce,gn,Bn,Ii,Rt,_,J,Ve,nt,ee)};if(Ya==="line")for(let Zn of s$(_.geometry,0,0,$a,$a)){let wi=D$e(Zn,Yr,ga,F.vertical||jt,N,24,Pr,L.overscaling,$a);for(let vi of wi)jt&&B$e(L,jt.text,Ua,vi)||Qa(Zn,vi)}else if(Ya==="line-center"){for(let Zn of _.geometry)if(Zn.length>1){let wi=P$e(Zn,ga,F.vertical||jt,N,24,Pr);wi&&Qa(Zn,wi)}}else if(_.type==="Polygon")for(let Zn of Lf(_.geometry,0)){let wi=I$e(Zn,16);Qa(Zn[0],new Eg(wi.x,wi.y,0))}else if(_.type==="LineString")for(let Zn of _.geometry)Qa(Zn,new Eg(Zn[0].x,Zn[0].y,0));else if(_.type==="Point")for(let Zn of _.geometry)for(let wi of Zn)Qa([wi],new Eg(wi.x,wi.y,0))}function m$(L,_,F,N,W,J,ee,me,Ce,Ve,nt,wt,Ct,Rt,jt){let Qt=(function(gn,Yr,ln,Bn,ga,Za,Ii,Ya){let Ua=Bn.layout.get("text-rotate").evaluate(Za,{})*Math.PI/180,gi=[];for(let ai of Yr.positionedLines)for(let Qa of ai.positionedGlyphs){if(!Qa.rect)continue;let Zn=Qa.rect||{},wi=DZ+1,vi=!0,eo=1,Ml=0,dl=(ga||Ya)&&Qa.vertical,gf=Qa.metrics.advance*Qa.scale/2;if(Ya&&Yr.verticalizable&&(Ml=ai.lineOffset/2-(Qa.imageName?-($c-Qa.metrics.width*Qa.scale)/2:(Qa.scale-1)*$c)),Qa.imageName){let As=Ii[Qa.imageName];vi=As.sdf,eo=As.pixelRatio,wi=bd/eo}let Dv=ga?[Qa.x+gf,Qa.y]:[0,0],dh=ga?[0,0]:[Qa.x+gf+ln[0],Qa.y+ln[1]-Ml],mf=[0,0];dl&&(mf=dh,dh=[0,0]);let td=Qa.metrics.isDoubleResolution?2:1,rd=(Qa.metrics.left-wi)*Qa.scale-gf+dh[0],nd=(-Qa.metrics.top-wi)*Qa.scale+dh[1],Xu=rd+Zn.w/td*Qa.scale/eo,yf=nd+Zn.h/td*Qa.scale/eo,Dh=new u(rd,nd),vh=new u(Xu,nd),ad=new u(rd,yf),ph=new u(Xu,yf);if(dl){let As=new u(-gf,gf-s5),Rl=-Math.PI/2,Hl=$c/2-gf,qd=new u(5-s5-Hl,-(Qa.imageName?Hl:0)),Iu=new u(...mf);Dh._rotateAround(Rl,As)._add(qd)._add(Iu),vh._rotateAround(Rl,As)._add(qd)._add(Iu),ad._rotateAround(Rl,As)._add(qd)._add(Iu),ph._rotateAround(Rl,As)._add(qd)._add(Iu)}if(Ua){let As=Math.sin(Ua),Rl=Math.cos(Ua),Hl=[Rl,-As,As,Rl];Dh._matMult(Hl),vh._matMult(Hl),ad._matMult(Hl),ph._matMult(Hl)}let ov=new u(0,0),_d=new u(0,0);gi.push({tl:Dh,tr:vh,bl:ad,br:ph,tex:Zn,writingMode:Yr.writingMode,glyphOffset:Dv,sectionIndex:Qa.sectionIndex,isSDF:vi,pixelOffsetTL:ov,pixelOffsetBR:_d,minFontScaleX:0,minFontScaleY:0})}return gi})(0,F,me,W,J,ee,N,L.allowVerticalPlacement),Ar=L.textSizeData,Pr=null;Ar.kind==="source"?(Pr=[vp*W.layout.get("text-size").evaluate(ee,{})],Pr[0]>Mg&&A(`${L.layerIds[0]}: Value for "text-size" is >= ${u5}. Reduce your "text-size".`)):Ar.kind==="composite"&&(Pr=[vp*Rt.compositeTextSizes[0].evaluate(ee,{},jt),vp*Rt.compositeTextSizes[1].evaluate(ee,{},jt)],(Pr[0]>Mg||Pr[1]>Mg)&&A(`${L.layerIds[0]}: Value for "text-size" is >= ${u5}. Reduce your "text-size".`)),L.addSymbols(L.text,Qt,Pr,me,J,ee,Ve,_,Ce.lineStartIndex,Ce.lineLength,Ct,jt);for(let gn of nt)wt[gn]=L.text.placedSymbolArray.length-1;return 4*Qt.length}function y$(L){for(let _ in L)return L[_];return null}function B$e(L,_,F,N){let W=L.compareText;if(_ in W){let J=W[_];for(let ee=J.length-1;ee>=0;ee--)if(N.dist(J[ee])>4;if(W!==1)throw new Error(`Got v${W} data when expected v1.`);let J=x$[15&N];if(!J)throw new Error("Unrecognized array type.");let[ee]=new Uint16Array(_,2,1),[me]=new Uint32Array(_,4,1);return new rD(me,ee,J,_)}constructor(_,F=64,N=Float64Array,W){if(isNaN(_)||_<0)throw new Error(`Unpexpected numItems value: ${_}.`);this.numItems=+_,this.nodeSize=Math.min(Math.max(+F,2),65535),this.ArrayType=N,this.IndexArrayType=_<65536?Uint16Array:Uint32Array;let J=x$.indexOf(this.ArrayType),ee=2*_*this.ArrayType.BYTES_PER_ELEMENT,me=_*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-me%8)%8;if(J<0)throw new Error(`Unexpected typed array class: ${N}.`);W&&W instanceof ArrayBuffer?(this.data=W,this.ids=new this.IndexArrayType(this.data,8,_),this.coords=new this.ArrayType(this.data,8+me+Ce,2*_),this._pos=2*_,this._finished=!0):(this.data=new ArrayBuffer(8+ee+me+Ce),this.ids=new this.IndexArrayType(this.data,8,_),this.coords=new this.ArrayType(this.data,8+me+Ce,2*_),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+J]),new Uint16Array(this.data,2,1)[0]=F,new Uint32Array(this.data,4,1)[0]=_)}add(_,F){let N=this._pos>>1;return this.ids[N]=N,this.coords[this._pos++]=_,this.coords[this._pos++]=F,N}finish(){let _=this._pos>>1;if(_!==this.numItems)throw new Error(`Added ${_} items when expected ${this.numItems}.`);return nD(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(_,F,N,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:J,coords:ee,nodeSize:me}=this,Ce=[0,J.length-1,0],Ve=[];for(;Ce.length;){let nt=Ce.pop()||0,wt=Ce.pop()||0,Ct=Ce.pop()||0;if(wt-Ct<=me){for(let Ar=Ct;Ar<=wt;Ar++){let Pr=ee[2*Ar],gn=ee[2*Ar+1];Pr>=_&&Pr<=N&&gn>=F&&gn<=W&&Ve.push(J[Ar])}continue}let Rt=Ct+wt>>1,jt=ee[2*Rt],Qt=ee[2*Rt+1];jt>=_&&jt<=N&&Qt>=F&&Qt<=W&&Ve.push(J[Rt]),(nt===0?_<=jt:F<=Qt)&&(Ce.push(Ct),Ce.push(Rt-1),Ce.push(1-nt)),(nt===0?N>=jt:W>=Qt)&&(Ce.push(Rt+1),Ce.push(wt),Ce.push(1-nt))}return Ve}within(_,F,N){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:W,coords:J,nodeSize:ee}=this,me=[0,W.length-1,0],Ce=[],Ve=N*N;for(;me.length;){let nt=me.pop()||0,wt=me.pop()||0,Ct=me.pop()||0;if(wt-Ct<=ee){for(let Ar=Ct;Ar<=wt;Ar++)_$(J[2*Ar],J[2*Ar+1],_,F)<=Ve&&Ce.push(W[Ar]);continue}let Rt=Ct+wt>>1,jt=J[2*Rt],Qt=J[2*Rt+1];_$(jt,Qt,_,F)<=Ve&&Ce.push(W[Rt]),(nt===0?_-N<=jt:F-N<=Qt)&&(me.push(Ct),me.push(Rt-1),me.push(1-nt)),(nt===0?_+N>=jt:F+N>=Qt)&&(me.push(Rt+1),me.push(wt),me.push(1-nt))}return Ce}}function nD(L,_,F,N,W,J){if(W-N<=F)return;let ee=N+W>>1;b$(L,_,ee,N,W,J),nD(L,_,F,N,ee-1,1-J),nD(L,_,F,ee+1,W,1-J)}function b$(L,_,F,N,W,J){for(;W>N;){if(W-N>600){let Ve=W-N+1,nt=F-N+1,wt=Math.log(Ve),Ct=.5*Math.exp(2*wt/3),Rt=.5*Math.sqrt(wt*Ct*(Ve-Ct)/Ve)*(nt-Ve/2<0?-1:1);b$(L,_,F,Math.max(N,Math.floor(F-nt*Ct/Ve+Rt)),Math.min(W,Math.floor(F+(Ve-nt)*Ct/Ve+Rt)),J)}let ee=_[2*F+J],me=N,Ce=W;for(h5(L,_,N,F),_[2*W+J]>ee&&h5(L,_,N,W);meee;)Ce--}_[2*N+J]===ee?h5(L,_,N,Ce):(Ce++,h5(L,_,Ce,W)),Ce<=F&&(N=Ce+1),F<=Ce&&(W=Ce-1)}}function h5(L,_,F,N){aD(L,F,N),aD(_,2*F,2*N),aD(_,2*F+1,2*N+1)}function aD(L,_,F){let N=L[_];L[_]=L[F],L[F]=N}function _$(L,_,F,N){let W=L-F,J=_-N;return W*W+J*J}var iD;a.bg=void 0,(iD=a.bg||(a.bg={})).create="create",iD.load="load",iD.fullLoad="fullLoad";let mM=null,d5=[],oD=1e3/60,sD="loadTime",lD="fullLoadTime",O$e={mark(L){performance.mark(L)},frame(L){let _=L;mM!=null&&d5.push(_-mM),mM=_},clearMetrics(){mM=null,d5=[],performance.clearMeasures(sD),performance.clearMeasures(lD);for(let L in a.bg)performance.clearMarks(a.bg[L])},getPerformanceMetrics(){performance.measure(sD,a.bg.create,a.bg.load),performance.measure(lD,a.bg.create,a.bg.fullLoad);let L=performance.getEntriesByName(sD)[0].duration,_=performance.getEntriesByName(lD)[0].duration,F=d5.length,N=1/(d5.reduce(((J,ee)=>J+ee),0)/F/1e3),W=d5.filter((J=>J>oD)).reduce(((J,ee)=>J+(ee-oD)/oD),0);return{loadTime:L,fullLoadTime:_,fps:N,percentDroppedFrames:W/(F+W)*100,totalFrames:F}}};a.$=class extends bt{},a.A=Ir,a.B=mn,a.C=function(L){if(z==null){let _=L.navigator?L.navigator.userAgent:null;z=!!L.safari||!(!_||!(/\b(iPad|iPhone|iPod)\b/.test(_)||_.match("Safari")&&!_.match("Chrome")))}return z},a.D=Wa,a.E=Pe,a.F=class{constructor(L,_){this.target=L,this.mapId=_,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new L$e((()=>this.process())),this.subscription=(function(F,N,W,J){return F.addEventListener(N,W,!1),{unsubscribe:()=>{F.removeEventListener(N,W,!1)}}})(this.target,"message",(F=>this.receive(F))),this.globalScope=D(self)?L:window}registerMessageHandler(L,_){this.messageHandlers[L]=_}sendAsync(L,_){return new Promise(((F,N)=>{let W=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[W]={resolve:F,reject:N},_&&_.signal.addEventListener("abort",(()=>{delete this.resolveRejects[W];let me={id:W,type:"",origin:location.origin,targetMapId:L.targetMapId,sourceMapId:this.mapId};this.target.postMessage(me)}),{once:!0});let J=[],ee=Object.assign(Object.assign({},L),{id:W,sourceMapId:this.mapId,origin:location.origin,data:La(L.data,J)});this.target.postMessage(ee,{transfer:J})}))}receive(L){let _=L.data,F=_.id;if(!(_.origin!=="file://"&&location.origin!=="file://"&&_.origin!=="resource://android"&&location.origin!=="resource://android"&&_.origin!==location.origin||_.targetMapId&&this.mapId!==_.targetMapId)){if(_.type===""){delete this.tasks[F];let N=this.abortControllers[F];return delete this.abortControllers[F],void(N&&N.abort())}if(D(self)||_.mustQueue)return this.tasks[F]=_,this.taskQueue.push(F),void this.invoker.trigger();this.processTask(F,_)}}process(){if(this.taskQueue.length===0)return;let L=this.taskQueue.shift(),_=this.tasks[L];delete this.tasks[L],this.taskQueue.length>0&&this.invoker.trigger(),_&&this.processTask(L,_)}processTask(L,_){return i(this,void 0,void 0,(function*(){if(_.type===""){let W=this.resolveRejects[L];return delete this.resolveRejects[L],W?void(_.error?W.reject(Va(_.error)):W.resolve(Va(_.data))):void 0}if(!this.messageHandlers[_.type])return void this.completeTask(L,new Error(`Could not find a registered handler for ${_.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let F=Va(_.data),N=new AbortController;this.abortControllers[L]=N;try{let W=yield this.messageHandlers[_.type](_.sourceMapId,F,N);this.completeTask(L,null,W)}catch(W){this.completeTask(L,W)}}))}completeTask(L,_,F){let N=[];delete this.abortControllers[L];let W={id:L,type:"",sourceMapId:this.mapId,origin:location.origin,error:_?La(_):null,data:La(F,N)};this.target.postMessage(W,{transfer:N})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},a.G=ue,a.H=function(){var L=new Ir(16);return Ir!=Float32Array&&(L[1]=0,L[2]=0,L[3]=0,L[4]=0,L[6]=0,L[7]=0,L[8]=0,L[9]=0,L[11]=0,L[12]=0,L[13]=0,L[14]=0),L[0]=1,L[5]=1,L[10]=1,L[15]=1,L},a.I=GP,a.J=function(L,_,F){var N,W,J,ee,me,Ce,Ve,nt,wt,Ct,Rt,jt,Qt=F[0],Ar=F[1],Pr=F[2];return _===L?(L[12]=_[0]*Qt+_[4]*Ar+_[8]*Pr+_[12],L[13]=_[1]*Qt+_[5]*Ar+_[9]*Pr+_[13],L[14]=_[2]*Qt+_[6]*Ar+_[10]*Pr+_[14],L[15]=_[3]*Qt+_[7]*Ar+_[11]*Pr+_[15]):(W=_[1],J=_[2],ee=_[3],me=_[4],Ce=_[5],Ve=_[6],nt=_[7],wt=_[8],Ct=_[9],Rt=_[10],jt=_[11],L[0]=N=_[0],L[1]=W,L[2]=J,L[3]=ee,L[4]=me,L[5]=Ce,L[6]=Ve,L[7]=nt,L[8]=wt,L[9]=Ct,L[10]=Rt,L[11]=jt,L[12]=N*Qt+me*Ar+wt*Pr+_[12],L[13]=W*Qt+Ce*Ar+Ct*Pr+_[13],L[14]=J*Qt+Ve*Ar+Rt*Pr+_[14],L[15]=ee*Qt+nt*Ar+jt*Pr+_[15]),L},a.K=function(L,_,F){var N=F[0],W=F[1],J=F[2];return L[0]=_[0]*N,L[1]=_[1]*N,L[2]=_[2]*N,L[3]=_[3]*N,L[4]=_[4]*W,L[5]=_[5]*W,L[6]=_[6]*W,L[7]=_[7]*W,L[8]=_[8]*J,L[9]=_[9]*J,L[10]=_[10]*J,L[11]=_[11]*J,L[12]=_[12],L[13]=_[13],L[14]=_[14],L[15]=_[15],L},a.L=Cr,a.M=function(L,_){let F={};for(let N=0;N<_.length;N++){let W=_[N];W in L&&(F[W]=L[W])}return F},a.N=Sg,a.O=$Z,a.P=u,a.Q=KZ,a.R=rn,a.S=iv,a.T=au,a.U=m,a.V=x,a.W=O,a.X=$a,a.Y=xe,a.Z=c5,a._=i,a.a=te,a.a$=function(L,_){var F=L[0],N=L[1],W=L[2],J=L[3],ee=L[4],me=L[5],Ce=L[6],Ve=L[7],nt=L[8],wt=L[9],Ct=L[10],Rt=L[11],jt=L[12],Qt=L[13],Ar=L[14],Pr=L[15],gn=_[0],Yr=_[1],ln=_[2],Bn=_[3],ga=_[4],Za=_[5],Ii=_[6],Ya=_[7],Ua=_[8],gi=_[9],ai=_[10],Qa=_[11],Zn=_[12],wi=_[13],vi=_[14],eo=_[15];return Math.abs(F-gn)<=pr*Math.max(1,Math.abs(F),Math.abs(gn))&&Math.abs(N-Yr)<=pr*Math.max(1,Math.abs(N),Math.abs(Yr))&&Math.abs(W-ln)<=pr*Math.max(1,Math.abs(W),Math.abs(ln))&&Math.abs(J-Bn)<=pr*Math.max(1,Math.abs(J),Math.abs(Bn))&&Math.abs(ee-ga)<=pr*Math.max(1,Math.abs(ee),Math.abs(ga))&&Math.abs(me-Za)<=pr*Math.max(1,Math.abs(me),Math.abs(Za))&&Math.abs(Ce-Ii)<=pr*Math.max(1,Math.abs(Ce),Math.abs(Ii))&&Math.abs(Ve-Ya)<=pr*Math.max(1,Math.abs(Ve),Math.abs(Ya))&&Math.abs(nt-Ua)<=pr*Math.max(1,Math.abs(nt),Math.abs(Ua))&&Math.abs(wt-gi)<=pr*Math.max(1,Math.abs(wt),Math.abs(gi))&&Math.abs(Ct-ai)<=pr*Math.max(1,Math.abs(Ct),Math.abs(ai))&&Math.abs(Rt-Qa)<=pr*Math.max(1,Math.abs(Rt),Math.abs(Qa))&&Math.abs(jt-Zn)<=pr*Math.max(1,Math.abs(jt),Math.abs(Zn))&&Math.abs(Qt-wi)<=pr*Math.max(1,Math.abs(Qt),Math.abs(wi))&&Math.abs(Ar-vi)<=pr*Math.max(1,Math.abs(Ar),Math.abs(vi))&&Math.abs(Pr-eo)<=pr*Math.max(1,Math.abs(Pr),Math.abs(eo))},a.a0=Le,a.a1=QP,a.a2=Ue,a.a3=L=>{let _=window.document.createElement("video");return _.muted=!0,new Promise((F=>{_.onloadstart=()=>{F(_)};for(let N of L){let W=window.document.createElement("source");ce(N)||(_.crossOrigin="Anonymous"),W.src=N,_.appendChild(W)}}))},a.a4=function(){return y++},a.a5=kn,a.a6=ib,a.a7=ju,a.a8=Gs,a.a9=n$,a.aA=function(L){if(L.type==="custom")return new C$e(L);switch(L.type){case"background":return new S$e(L);case"circle":return new kr(L);case"fill":return new At(L);case"fill-extrusion":return new jZe(L);case"heatmap":return new ca(L);case"hillshade":return new No(L);case"line":return new QZe(L);case"raster":return new k$e(L);case"symbol":return new hM(L)}},a.aB=p,a.aC=function(L,_){if(!L)return[{command:"setStyle",args:[_]}];let F=[];try{if(!vt(L.version,_.version))return[{command:"setStyle",args:[_]}];vt(L.center,_.center)||F.push({command:"setCenter",args:[_.center]}),vt(L.zoom,_.zoom)||F.push({command:"setZoom",args:[_.zoom]}),vt(L.bearing,_.bearing)||F.push({command:"setBearing",args:[_.bearing]}),vt(L.pitch,_.pitch)||F.push({command:"setPitch",args:[_.pitch]}),vt(L.sprite,_.sprite)||F.push({command:"setSprite",args:[_.sprite]}),vt(L.glyphs,_.glyphs)||F.push({command:"setGlyphs",args:[_.glyphs]}),vt(L.transition,_.transition)||F.push({command:"setTransition",args:[_.transition]}),vt(L.light,_.light)||F.push({command:"setLight",args:[_.light]}),vt(L.terrain,_.terrain)||F.push({command:"setTerrain",args:[_.terrain]}),vt(L.sky,_.sky)||F.push({command:"setSky",args:[_.sky]}),vt(L.projection,_.projection)||F.push({command:"setProjection",args:[_.projection]});let N={},W=[];(function(ee,me,Ce,Ve){let nt;for(nt in me=me||{},ee=ee||{})Object.prototype.hasOwnProperty.call(ee,nt)&&(Object.prototype.hasOwnProperty.call(me,nt)||qe(nt,Ce,Ve));for(nt in me)Object.prototype.hasOwnProperty.call(me,nt)&&(Object.prototype.hasOwnProperty.call(ee,nt)?vt(ee[nt],me[nt])||(ee[nt].type==="geojson"&&me[nt].type==="geojson"&<(ee,me,nt)?st(Ce,{command:"setGeoJSONSourceData",args:[nt,me[nt].data]}):mt(nt,me,Ce,Ve)):Oe(nt,me,Ce))})(L.sources,_.sources,W,N);let J=[];L.layers&&L.layers.forEach((ee=>{"source"in ee&&N[ee.source]?F.push({command:"removeLayer",args:[ee.id]}):J.push(ee)})),F=F.concat(W),(function(ee,me,Ce){me=me||[];let Ve=(ee=ee||[]).map(de),nt=me.map(de),wt=ee.reduce(Ee,{}),Ct=me.reduce(Ee,{}),Rt=Ve.slice(),jt=Object.create(null),Qt,Ar,Pr,gn,Yr;for(let ln=0,Bn=0;ln@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((F,N,W,J)=>{let ee=W||J;return _[N]=!ee||ee.toLowerCase(),""})),_["max-age"]){let F=parseInt(_["max-age"],10);isNaN(F)?delete _["max-age"]:_["max-age"]=F}return _},a.ab=function(L,_){let F=[];for(let N in L)N in _||F.push(N);return F},a.ac=M,a.ad=function(L,_,F){var N=Math.sin(F),W=Math.cos(F),J=_[0],ee=_[1],me=_[2],Ce=_[3],Ve=_[4],nt=_[5],wt=_[6],Ct=_[7];return _!==L&&(L[8]=_[8],L[9]=_[9],L[10]=_[10],L[11]=_[11],L[12]=_[12],L[13]=_[13],L[14]=_[14],L[15]=_[15]),L[0]=J*W+Ve*N,L[1]=ee*W+nt*N,L[2]=me*W+wt*N,L[3]=Ce*W+Ct*N,L[4]=Ve*W-J*N,L[5]=nt*W-ee*N,L[6]=wt*W-me*N,L[7]=Ct*W-Ce*N,L},a.ae=function(L){var _=new Ir(16);return _[0]=L[0],_[1]=L[1],_[2]=L[2],_[3]=L[3],_[4]=L[4],_[5]=L[5],_[6]=L[6],_[7]=L[7],_[8]=L[8],_[9]=L[9],_[10]=L[10],_[11]=L[11],_[12]=L[12],_[13]=L[13],_[14]=L[14],_[15]=L[15],_},a.af=Gn,a.ag=function(L,_){let F=0,N=0;if(L.kind==="constant")N=L.layoutSize;else if(L.kind!=="source"){let{interpolationType:W,minZoom:J,maxZoom:ee}=L,me=W?M(_i.interpolationFactor(W,_,J,ee),0,1):0;L.kind==="camera"?N=Mi.number(L.minSize,L.maxSize,me):F=me}return{uSizeT:F,uSize:N}},a.ai=function(L,{uSize:_,uSizeT:F},{lowerSize:N,upperSize:W}){return L.kind==="source"?N/vp:L.kind==="composite"?Mi.number(N/vp,W/vp,F):_},a.aj=YP,a.ak=function(L,_,F,N){let W=_.y-L.y,J=_.x-L.x,ee=N.y-F.y,me=N.x-F.x,Ce=ee*J-me*W;if(Ce===0)return null;let Ve=(me*(L.y-F.y)-ee*(L.x-F.x))/Ce;return new u(L.x+Ve*J,L.y+Ve*W)},a.al=s$,a.am=Dc,a.an=Zr,a.ao=function(L){let _=1/0,F=1/0,N=-1/0,W=-1/0;for(let J of L)_=Math.min(_,J.x),F=Math.min(F,J.y),N=Math.max(N,J.x),W=Math.max(W,J.y);return[_,F,N,W]},a.ap=$c,a.ar=WP,a.as=function(L,_){var F=_[0],N=_[1],W=_[2],J=_[3],ee=_[4],me=_[5],Ce=_[6],Ve=_[7],nt=_[8],wt=_[9],Ct=_[10],Rt=_[11],jt=_[12],Qt=_[13],Ar=_[14],Pr=_[15],gn=F*me-N*ee,Yr=F*Ce-W*ee,ln=F*Ve-J*ee,Bn=N*Ce-W*me,ga=N*Ve-J*me,Za=W*Ve-J*Ce,Ii=nt*Qt-wt*jt,Ya=nt*Ar-Ct*jt,Ua=nt*Pr-Rt*jt,gi=wt*Ar-Ct*Qt,ai=wt*Pr-Rt*Qt,Qa=Ct*Pr-Rt*Ar,Zn=gn*Qa-Yr*ai+ln*gi+Bn*Ua-ga*Ya+Za*Ii;return Zn?(L[0]=(me*Qa-Ce*ai+Ve*gi)*(Zn=1/Zn),L[1]=(W*ai-N*Qa-J*gi)*Zn,L[2]=(Qt*Za-Ar*ga+Pr*Bn)*Zn,L[3]=(Ct*ga-wt*Za-Rt*Bn)*Zn,L[4]=(Ce*Ua-ee*Qa-Ve*Ya)*Zn,L[5]=(F*Qa-W*Ua+J*Ya)*Zn,L[6]=(Ar*ln-jt*Za-Pr*Yr)*Zn,L[7]=(nt*Za-Ct*ln+Rt*Yr)*Zn,L[8]=(ee*ai-me*Ua+Ve*Ii)*Zn,L[9]=(N*Ua-F*ai-J*Ii)*Zn,L[10]=(jt*ga-Qt*ln+Pr*gn)*Zn,L[11]=(wt*ln-nt*ga-Rt*gn)*Zn,L[12]=(me*Ya-ee*gi-Ce*Ii)*Zn,L[13]=(F*gi-N*Ya+W*Ii)*Zn,L[14]=(Qt*Yr-jt*Bn-Ar*gn)*Zn,L[15]=(nt*Bn-wt*Yr+Ct*gn)*Zn,L):null},a.at=tD,a.au=jP,a.av=rD,a.aw=function(){let L={},_=le.$version;for(let F in le.$root){let N=le.$root[F];if(N.required){let W=null;W=F==="version"?_:N.type==="array"?[]:{},W!=null&&(L[F]=W)}}return L},a.ax=na,a.ay=j,a.az=function(L){L=L.slice();let _=Object.create(null);for(let F=0;F25||N<0||N>=1||F<0||F>=1)},a.bc=function(L,_){return L[0]=_[0],L[1]=0,L[2]=0,L[3]=0,L[4]=0,L[5]=_[1],L[6]=0,L[7]=0,L[8]=0,L[9]=0,L[10]=_[2],L[11]=0,L[12]=0,L[13]=0,L[14]=0,L[15]=1,L},a.bd=class extends et{},a.be=KP,a.bf=O$e,a.bh=re,a.bi=function(L,_){te.REGISTERED_PROTOCOLS[L]=_},a.bj=function(L){delete te.REGISTERED_PROTOCOLS[L]},a.bk=function(L,_){let F={};for(let W=0;WQa*$c))}let Ya=ee?"center":F.get("text-justify").evaluate(Ve,{},L.canonical),Ua=F.get("symbol-placement")==="point"?F.get("text-max-width").evaluate(Ve,{},L.canonical)*$c:1/0,gi=()=>{L.bucket.allowVerticalPlacement&&Ja(ln)&&(jt.vertical=uM(Qt,L.glyphMap,L.glyphPositions,L.imagePositions,nt,Ua,J,Za,"left",ga,Pr,a.ah.vertical,!0,Ct,wt))};if(!ee&&Ii){let ai=new Set;if(Ya==="auto")for(let Zn=0;Zni(void 0,void 0,void 0,(function*(){if(L.byteLength===0)return createImageBitmap(new ImageData(1,1));let _=new Blob([new Uint8Array(L)],{type:"image/png"});try{return createImageBitmap(_)}catch(F){throw new Error(`Could not load image because of ${F.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),a.e=k,a.f=L=>new Promise(((_,F)=>{let N=new Image;N.onload=()=>{_(N),URL.revokeObjectURL(N.src),N.onload=null,window.requestAnimationFrame((()=>{N.src=U}))},N.onerror=()=>F(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let W=new Blob([new Uint8Array(L)],{type:"image/png"});N.src=L.byteLength?URL.createObjectURL(W):U})),a.g=se,a.h=(L,_)=>fe(k(L,{type:"json"}),_),a.i=D,a.j=ye,a.k=he,a.l=(L,_)=>fe(k(L,{type:"arrayBuffer"}),_),a.m=fe,a.n=function(L){return new UP(L).readFields(v$e,[])},a.o=oa,a.p=RZ,a.q=K,a.r=en,a.s=ce,a.t=tn,a.u=Ur,a.v=le,a.w=A,a.x=function([L,_,F]){return _+=90,_*=Math.PI/180,F*=Math.PI/180,{x:L*Math.cos(_)*Math.sin(F),y:L*Math.sin(_)*Math.sin(F),z:L*Math.cos(F)}},a.y=Mi,a.z=Yi})),r("worker",["./shared"],(function(a){"use strict";class i{constructor(Te){this.keyCache={},Te&&this.replace(Te)}replace(Te){this._layerConfigs={},this._layers={},this.update(Te,[])}update(Te,Fe){for(let Re of Te){this._layerConfigs[Re.id]=Re;let Ze=this._layers[Re.id]=a.aA(Re);Ze._featureFilter=a.a7(Ze.filter),this.keyCache[Re.id]&&delete this.keyCache[Re.id]}for(let Re of Fe)delete this.keyCache[Re],delete this._layerConfigs[Re],delete this._layers[Re];this.familiesBySource={};let Ae=a.bk(Object.values(this._layerConfigs),this.keyCache);for(let Re of Ae){let Ze=Re.map(($t=>this._layers[$t.id])),Ke=Ze[0];if(Ke.visibility==="none")continue;let _t=Ke.source||"",St=this.familiesBySource[_t];St||(St=this.familiesBySource[_t]={});let Vt=Ke.sourceLayer||"_geojsonTileLayer",fr=St[Vt];fr||(fr=St[Vt]=[]),fr.push(Ze)}}}class o{constructor(Te){let Fe={},Ae=[];for(let _t in Te){let St=Te[_t],Vt=Fe[_t]={};for(let fr in St){let $t=St[+fr];if(!$t||$t.bitmap.width===0||$t.bitmap.height===0)continue;let gr={x:0,y:0,w:$t.bitmap.width+2,h:$t.bitmap.height+2};Ae.push(gr),Vt[fr]={rect:gr,metrics:$t.metrics}}}let{w:Re,h:Ze}=a.p(Ae),Ke=new a.o({width:Re||1,height:Ze||1});for(let _t in Te){let St=Te[_t];for(let Vt in St){let fr=St[+Vt];if(!fr||fr.bitmap.width===0||fr.bitmap.height===0)continue;let $t=Fe[_t][Vt].rect;a.o.copy(fr.bitmap,Ke,{x:0,y:0},{x:$t.x+1,y:$t.y+1},fr.bitmap)}}this.image=Ke,this.positions=Fe}}a.bl("GlyphAtlas",o);class s{constructor(Te){this.tileID=new a.S(Te.tileID.overscaledZ,Te.tileID.wrap,Te.tileID.canonical.z,Te.tileID.canonical.x,Te.tileID.canonical.y),this.uid=Te.uid,this.zoom=Te.zoom,this.pixelRatio=Te.pixelRatio,this.tileSize=Te.tileSize,this.source=Te.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Te.showCollisionBoxes,this.collectResourceTiming=!!Te.collectResourceTiming,this.returnDependencies=!!Te.returnDependencies,this.promoteId=Te.promoteId,this.inFlightDependencies=[]}parse(Te,Fe,Ae,Re){return a._(this,void 0,void 0,(function*(){this.status="parsing",this.data=Te,this.collisionBoxArray=new a.a5;let Ze=new a.bm(Object.keys(Te.layers).sort()),Ke=new a.bn(this.tileID,this.promoteId);Ke.bucketLayerIDs=[];let _t={},St={featureIndex:Ke,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Ae},Vt=Fe.familiesBySource[this.source];for(let Qn in Vt){let un=Te.layers[Qn];if(!un)continue;un.version===1&&a.w(`Vector tile source "${this.source}" layer "${Qn}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let aa=Ze.encode(Qn),da=[];for(let ua=0;ua=qa.maxzoom||qa.visibility!=="none"&&(l(ua,this.zoom,Ae),(_t[qa.id]=qa.createBucket({index:Ke.bucketLayerIDs.length,layers:ua,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:aa,sourceID:this.source})).populate(da,St,this.tileID.canonical),Ke.bucketLayerIDs.push(ua.map((ii=>ii.id))))}}let fr=a.aF(St.glyphDependencies,(Qn=>Object.keys(Qn).map(Number)));this.inFlightDependencies.forEach((Qn=>Qn==null?void 0:Qn.abort())),this.inFlightDependencies=[];let $t=Promise.resolve({});if(Object.keys(fr).length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),$t=Re.sendAsync({type:"GG",data:{stacks:fr,source:this.source,tileID:this.tileID,type:"glyphs"}},Qn)}let gr=Object.keys(St.iconDependencies),Br=Promise.resolve({});if(gr.length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),Br=Re.sendAsync({type:"GI",data:{icons:gr,source:this.source,tileID:this.tileID,type:"icons"}},Qn)}let Nr=Object.keys(St.patternDependencies),Er=Promise.resolve({});if(Nr.length){let Qn=new AbortController;this.inFlightDependencies.push(Qn),Er=Re.sendAsync({type:"GI",data:{icons:Nr,source:this.source,tileID:this.tileID,type:"patterns"}},Qn)}let[zr,vn,Nn]=yield Promise.all([$t,Br,Er]),Xn=new o(zr),Kn=new a.bo(vn,Nn);for(let Qn in _t){let un=_t[Qn];un instanceof a.a6?(l(un.layers,this.zoom,Ae),a.bp({bucket:un,glyphMap:zr,glyphPositions:Xn.positions,imageMap:vn,imagePositions:Kn.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):un.hasPattern&&(un instanceof a.bq||un instanceof a.br||un instanceof a.bs)&&(l(un.layers,this.zoom,Ae),un.addFeatures(St,this.tileID.canonical,Kn.patternPositions))}return this.status="done",{buckets:Object.values(_t).filter((Qn=>!Qn.isEmpty())),featureIndex:Ke,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:Xn.image,imageAtlas:Kn,glyphMap:this.returnDependencies?zr:null,iconMap:this.returnDependencies?vn:null,glyphPositions:this.returnDependencies?Xn.positions:null}}))}}function l(Ye,Te,Fe){let Ae=new a.z(Te);for(let Re of Ye)Re.recalculate(Ae,Fe)}class u{constructor(Te,Fe,Ae){this.actor=Te,this.layerIndex=Fe,this.availableImages=Ae,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Te,Fe){return a._(this,void 0,void 0,(function*(){let Ae=yield a.l(Te.request,Fe);try{return{vectorTile:new a.bt.VectorTile(new a.bu(Ae.data)),rawData:Ae.data,cacheControl:Ae.cacheControl,expires:Ae.expires}}catch(Re){let Ze=new Uint8Array(Ae.data),Ke=`Unable to parse the tile at ${Te.request.url}, `;throw Ke+=Ze[0]===31&&Ze[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${Re.message}`,new Error(Ke)}}))}loadTile(Te){return a._(this,void 0,void 0,(function*(){let Fe=Te.uid,Ae=!!(Te&&Te.request&&Te.request.collectResourceTiming)&&new a.bv(Te.request),Re=new s(Te);this.loading[Fe]=Re;let Ze=new AbortController;Re.abort=Ze;try{let Ke=yield this.loadVectorTile(Te,Ze);if(delete this.loading[Fe],!Ke)return null;let _t=Ke.rawData,St={};Ke.expires&&(St.expires=Ke.expires),Ke.cacheControl&&(St.cacheControl=Ke.cacheControl);let Vt={};if(Ae){let $t=Ae.finish();$t&&(Vt.resourceTiming=JSON.parse(JSON.stringify($t)))}Re.vectorTile=Ke.vectorTile;let fr=Re.parse(Ke.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[Fe]=Re,this.fetching[Fe]={rawTileData:_t,cacheControl:St,resourceTiming:Vt};try{let $t=yield fr;return a.e({rawTileData:_t.slice(0)},$t,St,Vt)}finally{delete this.fetching[Fe]}}catch(Ke){throw delete this.loading[Fe],Re.status="done",this.loaded[Fe]=Re,Ke}}))}reloadTile(Te){return a._(this,void 0,void 0,(function*(){let Fe=Te.uid;if(!this.loaded||!this.loaded[Fe])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let Ae=this.loaded[Fe];if(Ae.showCollisionBoxes=Te.showCollisionBoxes,Ae.status==="parsing"){let Re=yield Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor),Ze;if(this.fetching[Fe]){let{rawTileData:Ke,cacheControl:_t,resourceTiming:St}=this.fetching[Fe];delete this.fetching[Fe],Ze=a.e({rawTileData:Ke.slice(0)},Re,_t,St)}else Ze=Re;return Ze}if(Ae.status==="done"&&Ae.vectorTile)return Ae.parse(Ae.vectorTile,this.layerIndex,this.availableImages,this.actor)}))}abortTile(Te){return a._(this,void 0,void 0,(function*(){let Fe=this.loading,Ae=Te.uid;Fe&&Fe[Ae]&&Fe[Ae].abort&&(Fe[Ae].abort.abort(),delete Fe[Ae])}))}removeTile(Te){return a._(this,void 0,void 0,(function*(){this.loaded&&this.loaded[Te.uid]&&delete this.loaded[Te.uid]}))}}class c{constructor(){this.loaded={}}loadTile(Te){return a._(this,void 0,void 0,(function*(){let{uid:Fe,encoding:Ae,rawImageData:Re,redFactor:Ze,greenFactor:Ke,blueFactor:_t,baseShift:St}=Te,Vt=Re.width+2,fr=Re.height+2,$t=a.b(Re)?new a.R({width:Vt,height:fr},yield a.bw(Re,-1,-1,Vt,fr)):Re,gr=new a.bx(Fe,$t,Ae,Ze,Ke,_t,St);return this.loaded=this.loaded||{},this.loaded[Fe]=gr,gr}))}removeTile(Te){let Fe=this.loaded,Ae=Te.uid;Fe&&Fe[Ae]&&delete Fe[Ae]}}function f(Ye,Te){if(Ye.length!==0){h(Ye[0],Te);for(var Fe=1;Fe=Math.abs(_t)?Fe-St+_t:_t-St+Fe,Fe=St}Fe+Ae>=0!=!!Te&&Ye.reverse()}var v=a.by((function Ye(Te,Fe){var Ae,Re=Te&&Te.type;if(Re==="FeatureCollection")for(Ae=0;Ae>31}function D(Ye,Te){for(var Fe=Ye.loadGeometry(),Ae=Ye.type,Re=0,Ze=0,Ke=Fe.length,_t=0;_tYe},O=Math.fround||(R=new Float32Array(1),Ye=>(R[0]=+Ye,R[0]));var R;let B=3,Y=5,X=6;class te{constructor(Te){this.options=Object.assign(Object.create(U),Te),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Te){let{log:Fe,minZoom:Ae,maxZoom:Re}=this.options;Fe&&console.time("total time");let Ze=`prepare ${Te.length} points`;Fe&&console.time(Ze),this.points=Te;let Ke=[];for(let St=0;St=Ae;St--){let Vt=+Date.now();_t=this.trees[St]=this._createTree(this._cluster(_t,St)),Fe&&console.log("z%d: %d clusters in %dms",St,_t.numItems,+Date.now()-Vt)}return Fe&&console.timeEnd("total time"),this}getClusters(Te,Fe){let Ae=((Te[0]+180)%360+360)%360-180,Re=Math.max(-90,Math.min(90,Te[1])),Ze=Te[2]===180?180:((Te[2]+180)%360+360)%360-180,Ke=Math.max(-90,Math.min(90,Te[3]));if(Te[2]-Te[0]>=360)Ae=-180,Ze=180;else if(Ae>Ze){let $t=this.getClusters([Ae,Re,180,Ke],Fe),gr=this.getClusters([-180,Re,Ze,Ke],Fe);return $t.concat(gr)}let _t=this.trees[this._limitZoom(Fe)],St=_t.range(re(Ae),j(Ke),re(Ze),j(Re)),Vt=_t.data,fr=[];for(let $t of St){let gr=this.stride*$t;fr.push(Vt[gr+Y]>1?se(Vt,gr,this.clusterProps):this.points[Vt[gr+B]])}return fr}getChildren(Te){let Fe=this._getOriginId(Te),Ae=this._getOriginZoom(Te),Re="No cluster with the specified id.",Ze=this.trees[Ae];if(!Ze)throw new Error(Re);let Ke=Ze.data;if(Fe*this.stride>=Ke.length)throw new Error(Re);let _t=this.options.radius/(this.options.extent*Math.pow(2,Ae-1)),St=Ze.within(Ke[Fe*this.stride],Ke[Fe*this.stride+1],_t),Vt=[];for(let fr of St){let $t=fr*this.stride;Ke[$t+4]===Te&&Vt.push(Ke[$t+Y]>1?se(Ke,$t,this.clusterProps):this.points[Ke[$t+B]])}if(Vt.length===0)throw new Error(Re);return Vt}getLeaves(Te,Fe,Ae){let Re=[];return this._appendLeaves(Re,Te,Fe=Fe||10,Ae=Ae||0,0),Re}getTile(Te,Fe,Ae){let Re=this.trees[this._limitZoom(Te)],Ze=Math.pow(2,Te),{extent:Ke,radius:_t}=this.options,St=_t/Ke,Vt=(Ae-St)/Ze,fr=(Ae+1+St)/Ze,$t={features:[]};return this._addTileFeatures(Re.range((Fe-St)/Ze,Vt,(Fe+1+St)/Ze,fr),Re.data,Fe,Ae,Ze,$t),Fe===0&&this._addTileFeatures(Re.range(1-St/Ze,Vt,1,fr),Re.data,Ze,Ae,Ze,$t),Fe===Ze-1&&this._addTileFeatures(Re.range(0,Vt,St/Ze,fr),Re.data,-1,Ae,Ze,$t),$t.features.length?$t:null}getClusterExpansionZoom(Te){let Fe=this._getOriginZoom(Te)-1;for(;Fe<=this.options.maxZoom;){let Ae=this.getChildren(Te);if(Fe++,Ae.length!==1)break;Te=Ae[0].properties.cluster_id}return Fe}_appendLeaves(Te,Fe,Ae,Re,Ze){let Ke=this.getChildren(Fe);for(let _t of Ke){let St=_t.properties;if(St&&St.cluster?Ze+St.point_count<=Re?Ze+=St.point_count:Ze=this._appendLeaves(Te,St.cluster_id,Ae,Re,Ze):Ze1,fr,$t,gr;if(Vt)fr=ue(Fe,St,this.clusterProps),$t=Fe[St],gr=Fe[St+1];else{let Er=this.points[Fe[St+B]];fr=Er.properties;let[zr,vn]=Er.geometry.coordinates;$t=re(zr),gr=j(vn)}let Br={type:1,geometry:[[Math.round(this.options.extent*($t*Ze-Ae)),Math.round(this.options.extent*(gr*Ze-Re))]],tags:fr},Nr;Nr=Vt||this.options.generateId?Fe[St+B]:this.points[Fe[St+B]].id,Nr!==void 0&&(Br.id=Nr),Ke.features.push(Br)}}_limitZoom(Te){return Math.max(this.options.minZoom,Math.min(Math.floor(+Te),this.options.maxZoom+1))}_cluster(Te,Fe){let{radius:Ae,extent:Re,reduce:Ze,minPoints:Ke}=this.options,_t=Ae/(Re*Math.pow(2,Fe)),St=Te.data,Vt=[],fr=this.stride;for(let $t=0;$tFe&&(zr+=St[Nn+Y])}if(zr>Er&&zr>=Ke){let vn,Nn=gr*Er,Xn=Br*Er,Kn=-1,Qn=(($t/fr|0)<<5)+(Fe+1)+this.points.length;for(let un of Nr){let aa=un*fr;if(St[aa+2]<=Fe)continue;St[aa+2]=Fe;let da=St[aa+Y];Nn+=St[aa]*da,Xn+=St[aa+1]*da,St[aa+4]=Qn,Ze&&(vn||(vn=this._map(St,$t,!0),Kn=this.clusterProps.length,this.clusterProps.push(vn)),Ze(vn,this._map(St,aa)))}St[$t+4]=Qn,Vt.push(Nn/zr,Xn/zr,1/0,Qn,-1,zr),Ze&&Vt.push(Kn)}else{for(let vn=0;vn1)for(let vn of Nr){let Nn=vn*fr;if(!(St[Nn+2]<=Fe)){St[Nn+2]=Fe;for(let Xn=0;Xn>5}_getOriginZoom(Te){return(Te-this.points.length)%32}_map(Te,Fe,Ae){if(Te[Fe+Y]>1){let Ke=this.clusterProps[Te[Fe+X]];return Ae?Object.assign({},Ke):Ke}let Re=this.points[Te[Fe+B]].properties,Ze=this.options.map(Re);return Ae&&Ze===Re?Object.assign({},Ze):Ze}}function se(Ye,Te,Fe){return{type:"Feature",id:Ye[Te+B],properties:ue(Ye,Te,Fe),geometry:{type:"Point",coordinates:[(Ae=Ye[Te],360*(Ae-.5)),fe(Ye[Te+1])]}};var Ae}function ue(Ye,Te,Fe){let Ae=Ye[Te+Y],Re=Ae>=1e4?`${Math.round(Ae/1e3)}k`:Ae>=1e3?Math.round(Ae/100)/10+"k":Ae,Ze=Ye[Te+X],Ke=Ze===-1?{}:Object.assign({},Fe[Ze]);return Object.assign(Ke,{cluster:!0,cluster_id:Ye[Te+B],point_count:Ae,point_count_abbreviated:Re})}function re(Ye){return Ye/360+.5}function j(Ye){let Te=Math.sin(Ye*Math.PI/180),Fe=.5-.25*Math.log((1+Te)/(1-Te))/Math.PI;return Fe<0?0:Fe>1?1:Fe}function fe(Ye){let Te=(180-360*Ye)*Math.PI/180;return 360*Math.atan(Math.exp(Te))/Math.PI-90}function ce(Ye,Te,Fe,Ae){let Re=Ae,Ze=Te+(Fe-Te>>1),Ke,_t=Fe-Te,St=Ye[Te],Vt=Ye[Te+1],fr=Ye[Fe],$t=Ye[Fe+1];for(let gr=Te+3;grRe)Ke=gr,Re=Br;else if(Br===Re){let Nr=Math.abs(gr-Ze);Nr<_t&&(Ke=gr,_t=Nr)}}Re>Ae&&(Ke-Te>3&&ce(Ye,Te,Ke,Ae),Ye[Ke+2]=Re,Fe-Ke>3&&ce(Ye,Ke,Fe,Ae))}function oe(Ye,Te,Fe,Ae,Re,Ze){let Ke=Re-Fe,_t=Ze-Ae;if(Ke!==0||_t!==0){let St=((Ye-Fe)*Ke+(Te-Ae)*_t)/(Ke*Ke+_t*_t);St>1?(Fe=Re,Ae=Ze):St>0&&(Fe+=Ke*St,Ae+=_t*St)}return Ke=Ye-Fe,_t=Te-Ae,Ke*Ke+_t*_t}function we(Ye,Te,Fe,Ae){let Re={id:Ye==null?null:Ye,type:Te,geometry:Fe,tags:Ae,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Te==="Point"||Te==="MultiPoint"||Te==="LineString")he(Re,Fe);else if(Te==="Polygon")he(Re,Fe[0]);else if(Te==="MultiLineString")for(let Ze of Fe)he(Re,Ze);else if(Te==="MultiPolygon")for(let Ze of Fe)he(Re,Ze[0]);return Re}function he(Ye,Te){for(let Fe=0;Fe0&&(Ke+=Ae?(Re*fr-Vt*Ze)/2:Math.sqrt(Math.pow(Vt-Re,2)+Math.pow(fr-Ze,2))),Re=Vt,Ze=fr}let _t=Te.length-3;Te[2]=1,ce(Te,0,_t,Fe),Te[_t+2]=1,Te.size=Math.abs(Ke),Te.start=0,Te.end=Te.size}function ze(Ye,Te,Fe,Ae){for(let Re=0;Re1?1:Fe}function st(Ye,Te,Fe,Ae,Re,Ze,Ke,_t){if(Ae/=Te,Ze>=(Fe/=Te)&&Ke=Ae)return null;let St=[];for(let Vt of Ye){let fr=Vt.geometry,$t=Vt.type,gr=Re===0?Vt.minX:Vt.minY,Br=Re===0?Vt.maxX:Vt.maxY;if(gr>=Fe&&Br=Ae)continue;let Nr=[];if($t==="Point"||$t==="MultiPoint")Oe(fr,Nr,Fe,Ae,Re);else if($t==="LineString")qe(fr,Nr,Fe,Ae,Re,!1,_t.lineMetrics);else if($t==="MultiLineString")lt(fr,Nr,Fe,Ae,Re,!1);else if($t==="Polygon")lt(fr,Nr,Fe,Ae,Re,!0);else if($t==="MultiPolygon")for(let Er of fr){let zr=[];lt(Er,zr,Fe,Ae,Re,!0),zr.length&&Nr.push(zr)}if(Nr.length){if(_t.lineMetrics&&$t==="LineString"){for(let Er of Nr)St.push(we(Vt.id,$t,Er,Vt.tags));continue}$t!=="LineString"&&$t!=="MultiLineString"||(Nr.length===1?($t="LineString",Nr=Nr[0]):$t="MultiLineString"),$t!=="Point"&&$t!=="MultiPoint"||($t=Nr.length===3?"Point":"MultiPoint"),St.push(we(Vt.id,$t,Nr,Vt.tags))}}return St.length?St:null}function Oe(Ye,Te,Fe,Ae,Re){for(let Ze=0;Ze=Fe&&Ke<=Ae&&Ie(Te,Ye[Ze],Ye[Ze+1],Ye[Ze+2])}}function qe(Ye,Te,Fe,Ae,Re,Ze,Ke){let _t=mt(Ye),St=Re===0?de:Ee,Vt,fr,$t=Ye.start;for(let zr=0;zrFe&&(fr=St(_t,vn,Nn,Kn,Qn,Fe),Ke&&(_t.start=$t+Vt*fr)):un>Ae?aa=Fe&&(fr=St(_t,vn,Nn,Kn,Qn,Fe),da=!0),aa>Ae&&un<=Ae&&(fr=St(_t,vn,Nn,Kn,Qn,Ae),da=!0),!Ze&&da&&(Ke&&(_t.end=$t+Vt*fr),Te.push(_t),_t=mt(Ye)),Ke&&($t+=Vt)}let gr=Ye.length-3,Br=Ye[gr],Nr=Ye[gr+1],Er=Re===0?Br:Nr;Er>=Fe&&Er<=Ae&&Ie(_t,Br,Nr,Ye[gr+2]),gr=_t.length-3,Ze&&gr>=3&&(_t[gr]!==_t[0]||_t[gr+1]!==_t[1])&&Ie(_t,_t[0],_t[1],_t[2]),_t.length&&Te.push(_t)}function mt(Ye){let Te=[];return Te.size=Ye.size,Te.start=Ye.start,Te.end=Ye.end,Te}function lt(Ye,Te,Fe,Ae,Re,Ze){for(let Ke of Ye)qe(Ke,Te,Fe,Ae,Re,Ze,!1)}function Ie(Ye,Te,Fe,Ae){Ye.push(Te,Fe,Ae)}function de(Ye,Te,Fe,Ae,Re,Ze){let Ke=(Ze-Te)/(Ae-Te);return Ie(Ye,Ze,Fe+(Re-Fe)*Ke,1),Ke}function Ee(Ye,Te,Fe,Ae,Re,Ze){let Ke=(Ze-Fe)/(Re-Fe);return Ie(Ye,Te+(Ae-Te)*Ke,Ze,1),Ke}function Ue(Ye,Te){let Fe=[];for(let Ae=0;Ae0&&Te.size<(Re?Ke:Ae))return void(Fe.numPoints+=Te.length/3);let _t=[];for(let St=0;StKe)&&(Fe.numSimplified++,_t.push(Te[St],Te[St+1])),Fe.numPoints++;Re&&(function(St,Vt){let fr=0;for(let $t=0,gr=St.length,Br=gr-2;$t0===Vt)for(let $t=0,gr=St.length;$t24)throw new Error("maxZoom should be in the 0-24 range");if(Fe.promoteId&&Fe.generateId)throw new Error("promoteId and generateId cannot be used together.");let Re=(function(Ze,Ke){let _t=[];if(Ze.type==="FeatureCollection")for(let St=0;St1&&console.time("creation"),Br=this.tiles[gr]=ft(Te,Fe,Ae,Re,Vt),this.tileCoords.push({z:Fe,x:Ae,y:Re}),fr)){fr>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Fe,Ae,Re,Br.numFeatures,Br.numPoints,Br.numSimplified),console.timeEnd("creation"));let da=`z${Fe}`;this.stats[da]=(this.stats[da]||0)+1,this.total++}if(Br.source=Te,Ze==null){if(Fe===Vt.indexMaxZoom||Br.numPoints<=Vt.indexMaxPoints)continue}else{if(Fe===Vt.maxZoom||Fe===Ze)continue;if(Ze!=null){let da=Ze-Fe;if(Ae!==Ke>>da||Re!==_t>>da)continue}}if(Br.source=null,Te.length===0)continue;fr>1&&console.time("clipping");let Nr=.5*Vt.buffer/Vt.extent,Er=.5-Nr,zr=.5+Nr,vn=1+Nr,Nn=null,Xn=null,Kn=null,Qn=null,un=st(Te,$t,Ae-Nr,Ae+zr,0,Br.minX,Br.maxX,Vt),aa=st(Te,$t,Ae+Er,Ae+vn,0,Br.minX,Br.maxX,Vt);Te=null,un&&(Nn=st(un,$t,Re-Nr,Re+zr,1,Br.minY,Br.maxY,Vt),Xn=st(un,$t,Re+Er,Re+vn,1,Br.minY,Br.maxY,Vt),un=null),aa&&(Kn=st(aa,$t,Re-Nr,Re+zr,1,Br.minY,Br.maxY,Vt),Qn=st(aa,$t,Re+Er,Re+vn,1,Br.minY,Br.maxY,Vt),aa=null),fr>1&&console.timeEnd("clipping"),St.push(Nn||[],Fe+1,2*Ae,2*Re),St.push(Xn||[],Fe+1,2*Ae,2*Re+1),St.push(Kn||[],Fe+1,2*Ae+1,2*Re),St.push(Qn||[],Fe+1,2*Ae+1,2*Re+1)}}getTile(Te,Fe,Ae){Te=+Te,Fe=+Fe,Ae=+Ae;let Re=this.options,{extent:Ze,debug:Ke}=Re;if(Te<0||Te>24)return null;let _t=1<1&&console.log("drilling down to z%d-%d-%d",Te,Fe,Ae);let Vt,fr=Te,$t=Fe,gr=Ae;for(;!Vt&&fr>0;)fr--,$t>>=1,gr>>=1,Vt=this.tiles[kt(fr,$t,gr)];return Vt&&Vt.source?(Ke>1&&(console.log("found parent tile z%d-%d-%d",fr,$t,gr),console.time("drilling down")),this.splitTile(Vt.source,fr,$t,gr,Te,Fe,Ae),Ke>1&&console.timeEnd("drilling down"),this.tiles[St]?Ge(this.tiles[St],Ze):null):null}}function kt(Ye,Te,Fe){return 32*((1<{$t.properties=Br;let Nr={};for(let Er of gr)Nr[Er]=St[Er].evaluate(fr,$t);return Nr},Ke.reduce=(Br,Nr)=>{$t.properties=Nr;for(let Er of gr)fr.accumulated=Br[Er],Br[Er]=Vt[Er].evaluate(fr,$t)},Ke})(Te)).load((yield this._pendingData).features):(Re=yield this._pendingData,new pt(Re,Te.geojsonVtOptions)),this.loaded={};let Ze={};if(Ae){let Ke=Ae.finish();Ke&&(Ze.resourceTiming={},Ze.resourceTiming[Te.source]=JSON.parse(JSON.stringify(Ke)))}return Ze}catch(Ze){if(delete this._pendingRequest,a.bB(Ze))return{abandoned:!0};throw Ze}var Re}))}getData(){return a._(this,void 0,void 0,(function*(){return this._pendingData}))}reloadTile(Te){let Fe=this.loaded;return Fe&&Fe[Te.uid]?super.reloadTile(Te):this.loadTile(Te)}loadAndProcessGeoJSON(Te,Fe){return a._(this,void 0,void 0,(function*(){let Ae=yield this.loadGeoJSON(Te,Fe);if(delete this._pendingRequest,typeof Ae!="object")throw new Error(`Input data given to '${Te.source}' is not a valid GeoJSON object.`);if(v(Ae,!0),Te.filter){let Re=a.bC(Te.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(Re.result==="error")throw new Error(Re.value.map((Ke=>`${Ke.key}: ${Ke.message}`)).join(", "));Ae={type:"FeatureCollection",features:Ae.features.filter((Ke=>Re.value.evaluate({zoom:0},Ke)))}}return Ae}))}loadGeoJSON(Te,Fe){return a._(this,void 0,void 0,(function*(){let{promoteId:Ae}=Te;if(Te.request){let Re=yield a.h(Te.request,Fe);return this._dataUpdateable=Wt(Re.data,Ae)?_r(Re.data,Ae):void 0,Re.data}if(typeof Te.data=="string")try{let Re=JSON.parse(Te.data);return this._dataUpdateable=Wt(Re,Ae)?_r(Re,Ae):void 0,Re}catch(Re){throw new Error(`Input data given to '${Te.source}' is not a valid GeoJSON object.`)}if(!Te.dataDiff)throw new Error(`Input data given to '${Te.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Te.source}`);return(function(Re,Ze,Ke){var _t,St,Vt,fr;if(Ze.removeAll&&Re.clear(),Ze.remove)for(let $t of Ze.remove)Re.delete($t);if(Ze.add)for(let $t of Ze.add){let gr=qt($t,Ke);gr!=null&&Re.set(gr,$t)}if(Ze.update)for(let $t of Ze.update){let gr=Re.get($t.id);if(gr==null)continue;let Br=!$t.removeAllProperties&&(((_t=$t.removeProperties)===null||_t===void 0?void 0:_t.length)>0||((St=$t.addOrUpdateProperties)===null||St===void 0?void 0:St.length)>0);if(($t.newGeometry||$t.removeAllProperties||Br)&&(gr=Object.assign({},gr),Re.set($t.id,gr),Br&&(gr.properties=Object.assign({},gr.properties))),$t.newGeometry&&(gr.geometry=$t.newGeometry),$t.removeAllProperties)gr.properties={};else if(((Vt=$t.removeProperties)===null||Vt===void 0?void 0:Vt.length)>0)for(let Nr of $t.removeProperties)Object.prototype.hasOwnProperty.call(gr.properties,Nr)&&delete gr.properties[Nr];if(((fr=$t.addOrUpdateProperties)===null||fr===void 0?void 0:fr.length)>0)for(let{key:Nr,value:Er}of $t.addOrUpdateProperties)gr.properties[Nr]=Er}})(this._dataUpdateable,Te.dataDiff,Ae),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}}))}removeSource(Te){return a._(this,void 0,void 0,(function*(){this._pendingRequest&&this._pendingRequest.abort()}))}getClusterExpansionZoom(Te){return this._geoJSONIndex.getClusterExpansionZoom(Te.clusterId)}getClusterChildren(Te){return this._geoJSONIndex.getChildren(Te.clusterId)}getClusterLeaves(Te){return this._geoJSONIndex.getLeaves(Te.clusterId,Te.limit,Te.offset)}}class lr{constructor(Te){this.self=Te,this.actor=new a.F(Te),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(Fe,Ae)=>{if(this.externalWorkerSourceTypes[Fe])throw new Error(`Worker source with name "${Fe}" already registered.`);this.externalWorkerSourceTypes[Fe]=Ae},this.self.addProtocol=a.bi,this.self.removeProtocol=a.bj,this.self.registerRTLTextPlugin=Fe=>{if(a.bD.isParsed())throw new Error("RTL text plugin already registered.");a.bD.setMethods(Fe)},this.actor.registerMessageHandler("LDT",((Fe,Ae)=>this._getDEMWorkerSource(Fe,Ae.source).loadTile(Ae))),this.actor.registerMessageHandler("RDT",((Fe,Ae)=>a._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(Fe,Ae.source).removeTile(Ae)})))),this.actor.registerMessageHandler("GCEZ",((Fe,Ae)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(Fe,Ae.type,Ae.source).getClusterExpansionZoom(Ae)})))),this.actor.registerMessageHandler("GCC",((Fe,Ae)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(Fe,Ae.type,Ae.source).getClusterChildren(Ae)})))),this.actor.registerMessageHandler("GCL",((Fe,Ae)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(Fe,Ae.type,Ae.source).getClusterLeaves(Ae)})))),this.actor.registerMessageHandler("LD",((Fe,Ae)=>this._getWorkerSource(Fe,Ae.type,Ae.source).loadData(Ae))),this.actor.registerMessageHandler("GD",((Fe,Ae)=>this._getWorkerSource(Fe,Ae.type,Ae.source).getData())),this.actor.registerMessageHandler("LT",((Fe,Ae)=>this._getWorkerSource(Fe,Ae.type,Ae.source).loadTile(Ae))),this.actor.registerMessageHandler("RT",((Fe,Ae)=>this._getWorkerSource(Fe,Ae.type,Ae.source).reloadTile(Ae))),this.actor.registerMessageHandler("AT",((Fe,Ae)=>this._getWorkerSource(Fe,Ae.type,Ae.source).abortTile(Ae))),this.actor.registerMessageHandler("RMT",((Fe,Ae)=>this._getWorkerSource(Fe,Ae.type,Ae.source).removeTile(Ae))),this.actor.registerMessageHandler("RS",((Fe,Ae)=>a._(this,void 0,void 0,(function*(){if(!this.workerSources[Fe]||!this.workerSources[Fe][Ae.type]||!this.workerSources[Fe][Ae.type][Ae.source])return;let Re=this.workerSources[Fe][Ae.type][Ae.source];delete this.workerSources[Fe][Ae.type][Ae.source],Re.removeSource!==void 0&&Re.removeSource(Ae)})))),this.actor.registerMessageHandler("RM",(Fe=>a._(this,void 0,void 0,(function*(){delete this.layerIndexes[Fe],delete this.availableImages[Fe],delete this.workerSources[Fe],delete this.demWorkerSources[Fe]})))),this.actor.registerMessageHandler("SR",((Fe,Ae)=>a._(this,void 0,void 0,(function*(){this.referrer=Ae})))),this.actor.registerMessageHandler("SRPS",((Fe,Ae)=>this._syncRTLPluginState(Fe,Ae))),this.actor.registerMessageHandler("IS",((Fe,Ae)=>a._(this,void 0,void 0,(function*(){this.self.importScripts(Ae)})))),this.actor.registerMessageHandler("SI",((Fe,Ae)=>this._setImages(Fe,Ae))),this.actor.registerMessageHandler("UL",((Fe,Ae)=>a._(this,void 0,void 0,(function*(){this._getLayerIndex(Fe).update(Ae.layers,Ae.removedIds)})))),this.actor.registerMessageHandler("SL",((Fe,Ae)=>a._(this,void 0,void 0,(function*(){this._getLayerIndex(Fe).replace(Ae)}))))}_setImages(Te,Fe){return a._(this,void 0,void 0,(function*(){this.availableImages[Te]=Fe;for(let Ae in this.workerSources[Te]){let Re=this.workerSources[Te][Ae];for(let Ze in Re)Re[Ze].availableImages=Fe}}))}_syncRTLPluginState(Te,Fe){return a._(this,void 0,void 0,(function*(){if(a.bD.isParsed())return a.bD.getState();if(Fe.pluginStatus!=="loading")return a.bD.setState(Fe),Fe;let Ae=Fe.pluginURL;if(this.self.importScripts(Ae),a.bD.isParsed()){let Re={pluginStatus:"loaded",pluginURL:Ae};return a.bD.setState(Re),Re}throw a.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${Ae}`)}))}_getAvailableImages(Te){let Fe=this.availableImages[Te];return Fe||(Fe=[]),Fe}_getLayerIndex(Te){let Fe=this.layerIndexes[Te];return Fe||(Fe=this.layerIndexes[Te]=new i),Fe}_getWorkerSource(Te,Fe,Ae){if(this.workerSources[Te]||(this.workerSources[Te]={}),this.workerSources[Te][Fe]||(this.workerSources[Te][Fe]={}),!this.workerSources[Te][Fe][Ae]){let Re={sendAsync:(Ze,Ke)=>(Ze.targetMapId=Te,this.actor.sendAsync(Ze,Ke))};switch(Fe){case"vector":this.workerSources[Te][Fe][Ae]=new u(Re,this._getLayerIndex(Te),this._getAvailableImages(Te));break;case"geojson":this.workerSources[Te][Fe][Ae]=new tr(Re,this._getLayerIndex(Te),this._getAvailableImages(Te));break;default:this.workerSources[Te][Fe][Ae]=new this.externalWorkerSourceTypes[Fe](Re,this._getLayerIndex(Te),this._getAvailableImages(Te))}}return this.workerSources[Te][Fe][Ae]}_getDEMWorkerSource(Te,Fe){return this.demWorkerSources[Te]||(this.demWorkerSources[Te]={}),this.demWorkerSources[Te][Fe]||(this.demWorkerSources[Te][Fe]=new c),this.demWorkerSources[Te][Fe]}}return a.i(self)&&(self.worker=new lr(self)),lr})),r("index",["exports","./shared"],(function(a,i){"use strict";var o="4.7.1";let s,l,u={now:typeof performance!="undefined"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:K=>new Promise(((b,I)=>{let G=requestAnimationFrame(b);K.signal.addEventListener("abort",(()=>{cancelAnimationFrame(G),I(i.c())}))})),getImageData(K,b=0){return this.getImageCanvasContext(K).getImageData(-b,-b,K.width+2*b,K.height+2*b)},getImageCanvasContext(K){let b=window.document.createElement("canvas"),I=b.getContext("2d",{willReadFrequently:!0});if(!I)throw new Error("failed to create canvas 2d context");return b.width=K.width,b.height=K.height,I.drawImage(K,0,0,K.width,K.height),I},resolveURL:K=>(s||(s=document.createElement("a")),s.href=K,s.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(l==null&&(l=matchMedia("(prefers-reduced-motion: reduce)")),l.matches)}};class c{static testProp(b){if(!c.docStyle)return b[0];for(let I=0;I{window.removeEventListener("click",c.suppressClickInternal,!0)}),0)}static getScale(b){let I=b.getBoundingClientRect();return{x:I.width/b.offsetWidth||1,y:I.height/b.offsetHeight||1,boundingClientRect:I}}static getPoint(b,I,G){let H=I.boundingClientRect;return new i.P((G.clientX-H.left)/I.x-b.clientLeft,(G.clientY-H.top)/I.y-b.clientTop)}static mousePos(b,I){let G=c.getScale(b);return c.getPoint(b,G,I)}static touchPos(b,I){let G=[],H=c.getScale(b);for(let $=0;${h&&x(h),h=null,m=!0},v.onerror=()=>{d=!0,h=null},v.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),(function(K){let b,I,G,H;K.resetRequestQueue=()=>{b=[],I=0,G=0,H={}},K.addThrottleControl=Ne=>{let et=G++;return H[et]=Ne,et},K.removeThrottleControl=Ne=>{delete H[Ne],xe()},K.getImage=(Ne,et,bt=!0)=>new Promise(((Tt,zt)=>{f.supported&&(Ne.headers||(Ne.headers={}),Ne.headers.accept="image/webp,*/*"),i.e(Ne,{type:"image"}),b.push({abortController:et,requestParameters:Ne,supportImageRefresh:bt,state:"queued",onError:Yt=>{zt(Yt)},onSuccess:Yt=>{Tt(Yt)}}),xe()}));let $=Ne=>i._(this,void 0,void 0,(function*(){Ne.state="running";let{requestParameters:et,supportImageRefresh:bt,onError:Tt,onSuccess:zt,abortController:Yt}=Ne,Q=bt===!1&&!i.i(self)&&!i.g(et.url)&&(!et.headers||Object.keys(et.headers).reduce(((be,De)=>be&&De==="accept"),!0));I++;let ae=Q?ke(et,Yt):i.m(et,Yt);try{let be=yield ae;delete Ne.abortController,Ne.state="completed",be.data instanceof HTMLImageElement||i.b(be.data)?zt(be):be.data&&zt({data:yield(ve=be.data,typeof createImageBitmap=="function"?i.d(ve):i.f(ve)),cacheControl:be.cacheControl,expires:be.expires})}catch(be){delete Ne.abortController,Tt(be)}finally{I--,xe()}var ve})),xe=()=>{let Ne=(()=>{for(let et of Object.keys(H))if(H[et]())return!0;return!1})()?i.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:i.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let et=I;et0;et++){let bt=b.shift();bt.abortController.signal.aborted?et--:$(bt)}},ke=(Ne,et)=>new Promise(((bt,Tt)=>{let zt=new Image,Yt=Ne.url,Q=Ne.credentials;Q&&Q==="include"?zt.crossOrigin="use-credentials":(Q&&Q==="same-origin"||!i.s(Yt))&&(zt.crossOrigin="anonymous"),et.signal.addEventListener("abort",(()=>{zt.src="",Tt(i.c())})),zt.fetchPriority="high",zt.onload=()=>{zt.onerror=zt.onload=null,bt({data:zt})},zt.onerror=()=>{zt.onerror=zt.onload=null,et.signal.aborted||Tt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},zt.src=Yt}))})(g||(g={})),g.resetRequestQueue();class E{constructor(b){this._transformRequestFn=b}transformRequest(b,I){return this._transformRequestFn&&this._transformRequestFn(b,I)||{url:b}}setTransformRequest(b){this._transformRequestFn=b}}function M(K){var b=new i.A(3);return b[0]=K[0],b[1]=K[1],b[2]=K[2],b}var w,k=function(K,b,I){return K[0]=b[0]-I[0],K[1]=b[1]-I[1],K[2]=b[2]-I[2],K};w=new i.A(3),i.A!=Float32Array&&(w[0]=0,w[1]=0,w[2]=0);var y=function(K){var b=K[0],I=K[1];return b*b+I*I};function S(K){let b=[];if(typeof K=="string")b.push({id:"default",url:K});else if(K&&K.length>0){let I=[];for(let{id:G,url:H}of K){let $=`${G}${H}`;I.indexOf($)===-1&&(I.push($),b.push({id:G,url:H}))}}return b}function T(K,b,I){let G=K.split("?");return G[0]+=`${b}${I}`,G.join("?")}(function(){var K=new i.A(2);i.A!=Float32Array&&(K[0]=0,K[1]=0)})();class p{constructor(b,I,G,H){this.context=b,this.format=G,this.texture=b.gl.createTexture(),this.update(I,H)}update(b,I,G){let{width:H,height:$}=b,xe=!(this.size&&this.size[0]===H&&this.size[1]===$||G),{context:ke}=this,{gl:Ne}=ke;if(this.useMipmap=!!(I&&I.useMipmap),Ne.bindTexture(Ne.TEXTURE_2D,this.texture),ke.pixelStoreUnpackFlipY.set(!1),ke.pixelStoreUnpack.set(1),ke.pixelStoreUnpackPremultiplyAlpha.set(this.format===Ne.RGBA&&(!I||I.premultiply!==!1)),xe)this.size=[H,$],b instanceof HTMLImageElement||b instanceof HTMLCanvasElement||b instanceof HTMLVideoElement||b instanceof ImageData||i.b(b)?Ne.texImage2D(Ne.TEXTURE_2D,0,this.format,this.format,Ne.UNSIGNED_BYTE,b):Ne.texImage2D(Ne.TEXTURE_2D,0,this.format,H,$,0,this.format,Ne.UNSIGNED_BYTE,b.data);else{let{x:et,y:bt}=G||{x:0,y:0};b instanceof HTMLImageElement||b instanceof HTMLCanvasElement||b instanceof HTMLVideoElement||b instanceof ImageData||i.b(b)?Ne.texSubImage2D(Ne.TEXTURE_2D,0,et,bt,Ne.RGBA,Ne.UNSIGNED_BYTE,b):Ne.texSubImage2D(Ne.TEXTURE_2D,0,et,bt,H,$,Ne.RGBA,Ne.UNSIGNED_BYTE,b.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Ne.generateMipmap(Ne.TEXTURE_2D)}bind(b,I,G){let{context:H}=this,{gl:$}=H;$.bindTexture($.TEXTURE_2D,this.texture),G!==$.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(G=$.LINEAR),b!==this.filter&&($.texParameteri($.TEXTURE_2D,$.TEXTURE_MAG_FILTER,b),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MIN_FILTER,G||b),this.filter=b),I!==this.wrap&&($.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_S,I),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_T,I),this.wrap=I)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:b}=this.context;b.deleteTexture(this.texture),this.texture=null}}function C(K){let{userImage:b}=K;return!!(b&&b.render&&b.render())&&(K.data.replace(new Uint8Array(b.data.buffer)),!0)}class A extends i.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(b){if(this.loaded!==b&&(this.loaded=b,b)){for(let{ids:I,promiseResolve:G}of this.requestors)G(this._getImagesForIds(I));this.requestors=[]}}getImage(b){let I=this.images[b];if(I&&!I.data&&I.spriteData){let G=I.spriteData;I.data=new i.R({width:G.width,height:G.height},G.context.getImageData(G.x,G.y,G.width,G.height).data),I.spriteData=null}return I}addImage(b,I){if(this.images[b])throw new Error(`Image id ${b} already exist, use updateImage instead`);this._validate(b,I)&&(this.images[b]=I)}_validate(b,I){let G=!0,H=I.data||I.spriteData;return this._validateStretch(I.stretchX,H&&H.width)||(this.fire(new i.j(new Error(`Image "${b}" has invalid "stretchX" value`))),G=!1),this._validateStretch(I.stretchY,H&&H.height)||(this.fire(new i.j(new Error(`Image "${b}" has invalid "stretchY" value`))),G=!1),this._validateContent(I.content,I)||(this.fire(new i.j(new Error(`Image "${b}" has invalid "content" value`))),G=!1),G}_validateStretch(b,I){if(!b)return!0;let G=0;for(let H of b){if(H[0]{let H=!0;if(!this.isLoaded())for(let $ of b)this.images[$]||(H=!1);this.isLoaded()||H?I(this._getImagesForIds(b)):this.requestors.push({ids:b,promiseResolve:I})}))}_getImagesForIds(b){let I={};for(let G of b){let H=this.getImage(G);H||(this.fire(new i.k("styleimagemissing",{id:G})),H=this.getImage(G)),H?I[G]={data:H.data.clone(),pixelRatio:H.pixelRatio,sdf:H.sdf,version:H.version,stretchX:H.stretchX,stretchY:H.stretchY,content:H.content,textFitWidth:H.textFitWidth,textFitHeight:H.textFitHeight,hasRenderCallback:!!(H.userImage&&H.userImage.render)}:i.w(`Image "${G}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return I}getPixelSize(){let{width:b,height:I}=this.atlasImage;return{width:b,height:I}}getPattern(b){let I=this.patterns[b],G=this.getImage(b);if(!G)return null;if(I&&I.position.version===G.version)return I.position;if(I)I.position.version=G.version;else{let H={w:G.data.width+2,h:G.data.height+2,x:0,y:0},$=new i.I(H,G);this.patterns[b]={bin:H,position:$}}return this._updatePatternAtlas(),this.patterns[b].position}bind(b){let I=b.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new p(b,this.atlasImage,I.RGBA),this.atlasTexture.bind(I.LINEAR,I.CLAMP_TO_EDGE)}_updatePatternAtlas(){let b=[];for(let $ in this.patterns)b.push(this.patterns[$].bin);let{w:I,h:G}=i.p(b),H=this.atlasImage;H.resize({width:I||1,height:G||1});for(let $ in this.patterns){let{bin:xe}=this.patterns[$],ke=xe.x+1,Ne=xe.y+1,et=this.getImage($).data,bt=et.width,Tt=et.height;i.R.copy(et,H,{x:0,y:0},{x:ke,y:Ne},{width:bt,height:Tt}),i.R.copy(et,H,{x:0,y:Tt-1},{x:ke,y:Ne-1},{width:bt,height:1}),i.R.copy(et,H,{x:0,y:0},{x:ke,y:Ne+Tt},{width:bt,height:1}),i.R.copy(et,H,{x:bt-1,y:0},{x:ke-1,y:Ne},{width:1,height:Tt}),i.R.copy(et,H,{x:0,y:0},{x:ke+bt,y:Ne},{width:1,height:Tt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(b){for(let I of b){if(this.callbackDispatchedThisFrame[I])continue;this.callbackDispatchedThisFrame[I]=!0;let G=this.getImage(I);G||i.w(`Image with ID: "${I}" was not found`),C(G)&&this.updateImage(I,G)}}}let P=1e20;function D(K,b,I,G,H,$,xe,ke,Ne){for(let et=b;et-1);Ne++,$[Ne]=ke,xe[Ne]=et,xe[Ne+1]=P}for(let ke=0,Ne=0;ke65535)throw new Error("glyphs > 65535 not supported");if(G.ranges[$])return{stack:b,id:I,glyph:H};if(!this.url)throw new Error("glyphsUrl is not set");if(!G.requests[$]){let ke=q.loadGlyphRange(b,$,this.url,this.requestManager);G.requests[$]=ke}let xe=yield G.requests[$];for(let ke in xe)this._doesCharSupportLocalGlyph(+ke)||(G.glyphs[+ke]=xe[+ke]);return G.ranges[$]=!0,{stack:b,id:I,glyph:xe[I]||null}}))}_doesCharSupportLocalGlyph(b){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(b))}_tinySDF(b,I,G){let H=this.localIdeographFontFamily;if(!H||!this._doesCharSupportLocalGlyph(G))return;let $=b.tinySDF;if(!$){let ke="400";/bold/i.test(I)?ke="900":/medium/i.test(I)?ke="500":/light/i.test(I)&&(ke="200"),$=b.tinySDF=new q.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:H,fontWeight:ke})}let xe=$.draw(String.fromCharCode(G));return{id:G,bitmap:new i.o({width:xe.width||60,height:xe.height||60},xe.data),metrics:{width:xe.glyphWidth/2||24,height:xe.glyphHeight/2||24,left:xe.glyphLeft/2+.5||0,top:xe.glyphTop/2-27.5||-8,advance:xe.glyphAdvance/2||24,isDoubleResolution:!0}}}}q.loadGlyphRange=function(K,b,I,G){return i._(this,void 0,void 0,(function*(){let H=256*b,$=H+255,xe=G.transformRequest(I.replace("{fontstack}",K).replace("{range}",`${H}-${$}`),"Glyphs"),ke=yield i.l(xe,new AbortController);if(!ke||!ke.data)throw new Error(`Could not load glyph range. range: ${b}, ${H}-${$}`);let Ne={};for(let et of i.n(ke.data))Ne[et.id]=et;return Ne}))},q.TinySDF=class{constructor({fontSize:K=24,buffer:b=3,radius:I=8,cutoff:G=.25,fontFamily:H="sans-serif",fontWeight:$="normal",fontStyle:xe="normal"}={}){this.buffer=b,this.cutoff=G,this.radius=I;let ke=this.size=K+4*b,Ne=this._createCanvas(ke),et=this.ctx=Ne.getContext("2d",{willReadFrequently:!0});et.font=`${xe} ${$} ${K}px ${H}`,et.textBaseline="alphabetic",et.textAlign="left",et.fillStyle="black",this.gridOuter=new Float64Array(ke*ke),this.gridInner=new Float64Array(ke*ke),this.f=new Float64Array(ke),this.z=new Float64Array(ke+1),this.v=new Uint16Array(ke)}_createCanvas(K){let b=document.createElement("canvas");return b.width=b.height=K,b}draw(K){let{width:b,actualBoundingBoxAscent:I,actualBoundingBoxDescent:G,actualBoundingBoxLeft:H,actualBoundingBoxRight:$}=this.ctx.measureText(K),xe=Math.ceil(I),ke=Math.max(0,Math.min(this.size-this.buffer,Math.ceil($-H))),Ne=Math.min(this.size-this.buffer,xe+Math.ceil(G)),et=ke+2*this.buffer,bt=Ne+2*this.buffer,Tt=Math.max(et*bt,0),zt=new Uint8ClampedArray(Tt),Yt={data:zt,width:et,height:bt,glyphWidth:ke,glyphHeight:Ne,glyphTop:xe,glyphLeft:0,glyphAdvance:b};if(ke===0||Ne===0)return Yt;let{ctx:Q,buffer:ae,gridInner:ve,gridOuter:be}=this;Q.clearRect(ae,ae,ke,Ne),Q.fillText(K,ae,ae+xe);let De=Q.getImageData(ae,ae,ke,Ne);be.fill(P,0,Tt),ve.fill(0,0,Tt);for(let Se=0;Se0?Mt*Mt:0,ve[gt]=Mt<0?Mt*Mt:0}}D(be,0,0,et,bt,et,this.f,this.v,this.z),D(ve,ae,ae,ke,Ne,et,this.f,this.v,this.z);for(let Se=0;Se1&&(Ne=b[++ke]);let bt=Math.abs(et-Ne.left),Tt=Math.abs(et-Ne.right),zt=Math.min(bt,Tt),Yt,Q=$/G*(H+1);if(Ne.isDash){let ae=H-Math.abs(Q);Yt=Math.sqrt(zt*zt+ae*ae)}else Yt=H-Math.sqrt(zt*zt+Q*Q);this.data[xe+et]=Math.max(0,Math.min(255,Yt+128))}}}addRegularDash(b){for(let ke=b.length-1;ke>=0;--ke){let Ne=b[ke],et=b[ke+1];Ne.zeroLength?b.splice(ke,1):et&&et.isDash===Ne.isDash&&(et.left=Ne.left,b.splice(ke,1))}let I=b[0],G=b[b.length-1];I.isDash===G.isDash&&(I.left=G.left-this.width,G.right=I.right+this.width);let H=this.width*this.nextRow,$=0,xe=b[$];for(let ke=0;ke1&&(xe=b[++$]);let Ne=Math.abs(ke-xe.left),et=Math.abs(ke-xe.right),bt=Math.min(Ne,et);this.data[H+ke]=Math.max(0,Math.min(255,(xe.isDash?bt:-bt)+128))}}addDash(b,I){let G=I?7:0,H=2*G+1;if(this.nextRow+H>this.height)return i.w("LineAtlas out of space"),null;let $=0;for(let ke=0;ke{I.terminate()})),this.workers=null)}isPreloaded(){return!!this.active[te]}numActive(){return Object.keys(this.active).length}}let ue=Math.floor(u.hardwareConcurrency/2),re,j;function fe(){return re||(re=new se),re}se.workerCount=i.C(globalThis)?Math.max(Math.min(ue,3),1):1;class ce{constructor(b,I){this.workerPool=b,this.actors=[],this.currentActor=0,this.id=I;let G=this.workerPool.acquire(I);for(let H=0;H{I.remove()})),this.actors=[],b&&this.workerPool.release(this.id)}registerMessageHandler(b,I){for(let G of this.actors)G.registerMessageHandler(b,I)}}function oe(){return j||(j=new ce(fe(),i.G),j.registerMessageHandler("GR",((K,b,I)=>i.m(b,I)))),j}function we(K,b){let I=i.H();return i.J(I,I,[1,1,0]),i.K(I,I,[.5*K.width,.5*K.height,1]),i.L(I,I,K.calculatePosMatrix(b.toUnwrapped()))}function he(K,b,I,G,H,$){let xe=(function(Tt,zt,Yt){if(Tt)for(let Q of Tt){let ae=zt[Q];if(ae&&ae.source===Yt&&ae.type==="fill-extrusion")return!0}else for(let Q in zt){let ae=zt[Q];if(ae.source===Yt&&ae.type==="fill-extrusion")return!0}return!1})(H&&H.layers,b,K.id),ke=$.maxPitchScaleFactor(),Ne=K.tilesIn(G,ke,xe);Ne.sort(ye);let et=[];for(let Tt of Ne)et.push({wrappedTileID:Tt.tileID.wrapped().key,queryResults:Tt.tile.queryRenderedFeatures(b,I,K._state,Tt.queryGeometry,Tt.cameraQueryGeometry,Tt.scale,H,$,ke,we(K.transform,Tt.tileID))});let bt=(function(Tt){let zt={},Yt={};for(let Q of Tt){let ae=Q.queryResults,ve=Q.wrappedTileID,be=Yt[ve]=Yt[ve]||{};for(let De in ae){let Se=ae[De],Be=be[De]=be[De]||{},ut=zt[De]=zt[De]||[];for(let gt of Se)Be[gt.featureIndex]||(Be[gt.featureIndex]=!0,ut.push(gt))}}return zt})(et);for(let Tt in bt)bt[Tt].forEach((zt=>{let Yt=zt.feature,Q=K.getFeatureState(Yt.layer["source-layer"],Yt.id);Yt.source=Yt.layer.source,Yt.layer["source-layer"]&&(Yt.sourceLayer=Yt.layer["source-layer"]),Yt.state=Q}));return bt}function ye(K,b){let I=K.tileID,G=b.tileID;return I.overscaledZ-G.overscaledZ||I.canonical.y-G.canonical.y||I.wrap-G.wrap||I.canonical.x-G.canonical.x}function Pe(K,b,I){return i._(this,void 0,void 0,(function*(){let G=K;if(K.url?G=(yield i.h(b.transformRequest(K.url,"Source"),I)).data:yield u.frameAsync(I),!G)return null;let H=i.M(i.e(G,K),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in G&&G.vector_layers&&(H.vectorLayerIds=G.vector_layers.map(($=>$.id))),H}))}class le{constructor(b,I){b&&(I?this.setSouthWest(b).setNorthEast(I):Array.isArray(b)&&(b.length===4?this.setSouthWest([b[0],b[1]]).setNorthEast([b[2],b[3]]):this.setSouthWest(b[0]).setNorthEast(b[1])))}setNorthEast(b){return this._ne=b instanceof i.N?new i.N(b.lng,b.lat):i.N.convert(b),this}setSouthWest(b){return this._sw=b instanceof i.N?new i.N(b.lng,b.lat):i.N.convert(b),this}extend(b){let I=this._sw,G=this._ne,H,$;if(b instanceof i.N)H=b,$=b;else{if(!(b instanceof le))return Array.isArray(b)?b.length===4||b.every(Array.isArray)?this.extend(le.convert(b)):this.extend(i.N.convert(b)):b&&("lng"in b||"lon"in b)&&"lat"in b?this.extend(i.N.convert(b)):this;if(H=b._sw,$=b._ne,!H||!$)return this}return I||G?(I.lng=Math.min(H.lng,I.lng),I.lat=Math.min(H.lat,I.lat),G.lng=Math.max($.lng,G.lng),G.lat=Math.max($.lat,G.lat)):(this._sw=new i.N(H.lng,H.lat),this._ne=new i.N($.lng,$.lat)),this}getCenter(){return new i.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new i.N(this.getWest(),this.getNorth())}getSouthEast(){return new i.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(b){let{lng:I,lat:G}=i.N.convert(b),H=this._sw.lng<=I&&I<=this._ne.lng;return this._sw.lng>this._ne.lng&&(H=this._sw.lng>=I&&I>=this._ne.lng),this._sw.lat<=G&&G<=this._ne.lat&&H}static convert(b){return b instanceof le?b:b&&new le(b)}static fromLngLat(b,I=0){let G=360*I/40075017,H=G/Math.cos(Math.PI/180*b.lat);return new le(new i.N(b.lng-H,b.lat-G),new i.N(b.lng+H,b.lat+G))}adjustAntiMeridian(){let b=new i.N(this._sw.lng,this._sw.lat),I=new i.N(this._ne.lng,this._ne.lat);return new le(b,b.lng>I.lng?new i.N(I.lng+360,I.lat):I)}}class ze{constructor(b,I,G){this.bounds=le.convert(this.validateBounds(b)),this.minzoom=I||0,this.maxzoom=G||24}validateBounds(b){return Array.isArray(b)&&b.length===4?[Math.max(-180,b[0]),Math.max(-90,b[1]),Math.min(180,b[2]),Math.min(90,b[3])]:[-180,-90,180,90]}contains(b){let I=Math.pow(2,b.z),G=Math.floor(i.O(this.bounds.getWest())*I),H=Math.floor(i.Q(this.bounds.getNorth())*I),$=Math.ceil(i.O(this.bounds.getEast())*I),xe=Math.ceil(i.Q(this.bounds.getSouth())*I);return b.x>=G&&b.x<$&&b.y>=H&&b.y{this._options.tiles=b})),this}setUrl(b){return this.setSourceProperty((()=>{this.url=b,this._options.url=b})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return i.e({},this._options)}loadTile(b){return i._(this,void 0,void 0,(function*(){let I=b.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),G={request:this.map._requestManager.transformRequest(I,"Tile"),uid:b.uid,tileID:b.tileID,zoom:b.tileID.overscaledZ,tileSize:this.tileSize*b.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};G.request.collectResourceTiming=this._collectResourceTiming;let H="RT";if(b.actor&&b.state!=="expired"){if(b.state==="loading")return new Promise((($,xe)=>{b.reloadPromise={resolve:$,reject:xe}}))}else b.actor=this.dispatcher.getActor(),H="LT";b.abortController=new AbortController;try{let $=yield b.actor.sendAsync({type:H,data:G},b.abortController);if(delete b.abortController,b.aborted)return;this._afterTileLoadWorkerResponse(b,$)}catch($){if(delete b.abortController,b.aborted)return;if($&&$.status!==404)throw $;this._afterTileLoadWorkerResponse(b,null)}}))}_afterTileLoadWorkerResponse(b,I){if(I&&I.resourceTiming&&(b.resourceTiming=I.resourceTiming),I&&this.map._refreshExpiredTiles&&b.setExpiryData(I),b.loadVectorData(I,this.map.painter),b.reloadPromise){let G=b.reloadPromise;b.reloadPromise=null,this.loadTile(b).then(G.resolve).catch(G.reject)}}abortTile(b){return i._(this,void 0,void 0,(function*(){b.abortController&&(b.abortController.abort(),delete b.abortController),b.actor&&(yield b.actor.sendAsync({type:"AT",data:{uid:b.uid,type:this.type,source:this.id}}))}))}unloadTile(b){return i._(this,void 0,void 0,(function*(){b.unloadVectorData(),b.actor&&(yield b.actor.sendAsync({type:"RMT",data:{uid:b.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class vt extends i.E{constructor(b,I,G,H){super(),this.id=b,this.dispatcher=G,this.setEventedParent(H),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=i.e({type:"raster"},I),i.e(this,i.M(I,["url","scheme","tileSize"]))}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new i.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let b=yield Pe(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,b&&(i.e(this,b),b.bounds&&(this.tileBounds=new ze(b.bounds,this.minzoom,this.maxzoom)),this.fire(new i.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new i.k("data",{dataType:"source",sourceDataType:"content"})))}catch(b){this._tileJSONRequest=null,this.fire(new i.j(b))}}))}loaded(){return this._loaded}onAdd(b){this.map=b,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(b){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),b(),this.load()}setTiles(b){return this.setSourceProperty((()=>{this._options.tiles=b})),this}setUrl(b){return this.setSourceProperty((()=>{this.url=b,this._options.url=b})),this}serialize(){return i.e({},this._options)}hasTile(b){return!this.tileBounds||this.tileBounds.contains(b.canonical)}loadTile(b){return i._(this,void 0,void 0,(function*(){let I=b.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);b.abortController=new AbortController;try{let G=yield g.getImage(this.map._requestManager.transformRequest(I,"Tile"),b.abortController,this.map._refreshExpiredTiles);if(delete b.abortController,b.aborted)return void(b.state="unloaded");if(G&&G.data){this.map._refreshExpiredTiles&&G.cacheControl&&G.expires&&b.setExpiryData({cacheControl:G.cacheControl,expires:G.expires});let H=this.map.painter.context,$=H.gl,xe=G.data;b.texture=this.map.painter.getTileTexture(xe.width),b.texture?b.texture.update(xe,{useMipmap:!0}):(b.texture=new p(H,xe,$.RGBA,{useMipmap:!0}),b.texture.bind($.LINEAR,$.CLAMP_TO_EDGE,$.LINEAR_MIPMAP_NEAREST)),b.state="loaded"}}catch(G){if(delete b.abortController,b.aborted)b.state="unloaded";else if(G)throw b.state="errored",G}}))}abortTile(b){return i._(this,void 0,void 0,(function*(){b.abortController&&(b.abortController.abort(),delete b.abortController)}))}unloadTile(b){return i._(this,void 0,void 0,(function*(){b.texture&&this.map.painter.saveTileTexture(b.texture)}))}hasTransition(){return!1}}class st extends vt{constructor(b,I,G,H){super(b,I,G,H),this.type="raster-dem",this.maxzoom=22,this._options=i.e({type:"raster-dem"},I),this.encoding=I.encoding||"mapbox",this.redFactor=I.redFactor,this.greenFactor=I.greenFactor,this.blueFactor=I.blueFactor,this.baseShift=I.baseShift}loadTile(b){return i._(this,void 0,void 0,(function*(){let I=b.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),G=this.map._requestManager.transformRequest(I,"Tile");b.neighboringTiles=this._getNeighboringTiles(b.tileID),b.abortController=new AbortController;try{let H=yield g.getImage(G,b.abortController,this.map._refreshExpiredTiles);if(delete b.abortController,b.aborted)return void(b.state="unloaded");if(H&&H.data){let $=H.data;this.map._refreshExpiredTiles&&H.cacheControl&&H.expires&&b.setExpiryData({cacheControl:H.cacheControl,expires:H.expires});let xe=i.b($)&&i.U()?$:yield this.readImageNow($),ke={type:this.type,uid:b.uid,source:this.id,rawImageData:xe,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!b.actor||b.state==="expired"){b.actor=this.dispatcher.getActor();let Ne=yield b.actor.sendAsync({type:"LDT",data:ke});b.dem=Ne,b.needsHillshadePrepare=!0,b.needsTerrainPrepare=!0,b.state="loaded"}}}catch(H){if(delete b.abortController,b.aborted)b.state="unloaded";else if(H)throw b.state="errored",H}}))}readImageNow(b){return i._(this,void 0,void 0,(function*(){if(typeof VideoFrame!="undefined"&&i.V()){let I=b.width+2,G=b.height+2;try{return new i.R({width:I,height:G},yield i.W(b,-1,-1,I,G))}catch(H){}}return u.getImageData(b,1)}))}_getNeighboringTiles(b){let I=b.canonical,G=Math.pow(2,I.z),H=(I.x-1+G)%G,$=I.x===0?b.wrap-1:b.wrap,xe=(I.x+1+G)%G,ke=I.x+1===G?b.wrap+1:b.wrap,Ne={};return Ne[new i.S(b.overscaledZ,$,I.z,H,I.y).key]={backfilled:!1},Ne[new i.S(b.overscaledZ,ke,I.z,xe,I.y).key]={backfilled:!1},I.y>0&&(Ne[new i.S(b.overscaledZ,$,I.z,H,I.y-1).key]={backfilled:!1},Ne[new i.S(b.overscaledZ,b.wrap,I.z,I.x,I.y-1).key]={backfilled:!1},Ne[new i.S(b.overscaledZ,ke,I.z,xe,I.y-1).key]={backfilled:!1}),I.y+10&&i.e($,{resourceTiming:H}),this.fire(new i.k("data",Object.assign(Object.assign({},$),{sourceDataType:"metadata"}))),this.fire(new i.k("data",Object.assign(Object.assign({},$),{sourceDataType:"content"})))}catch(G){if(this._pendingLoads--,this._removed)return void this.fire(new i.k("dataabort",{dataType:"source"}));this.fire(new i.j(G))}}))}loaded(){return this._pendingLoads===0}loadTile(b){return i._(this,void 0,void 0,(function*(){let I=b.actor?"RT":"LT";b.actor=this.actor;let G={type:this.type,uid:b.uid,tileID:b.tileID,zoom:b.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};b.abortController=new AbortController;let H=yield this.actor.sendAsync({type:I,data:G},b.abortController);delete b.abortController,b.unloadVectorData(),b.aborted||b.loadVectorData(H,this.map.painter,I==="RT")}))}abortTile(b){return i._(this,void 0,void 0,(function*(){b.abortController&&(b.abortController.abort(),delete b.abortController),b.aborted=!0}))}unloadTile(b){return i._(this,void 0,void 0,(function*(){b.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:b.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return i.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var qe=i.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class mt extends i.E{constructor(b,I,G,H){super(),this.id=b,this.dispatcher=G,this.coordinates=I.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(H),this.options=I}load(b){return i._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new i.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let I=yield g.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,I&&I.data&&(this.image=I.data,b&&(this.coordinates=b),this._finishLoading())}catch(I){this._request=null,this._loaded=!0,this.fire(new i.j(I))}}))}loaded(){return this._loaded}updateImage(b){return b.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=b.url,this.load(b.coordinates).finally((()=>{this.texture=null})),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(b){this.map=b,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(b){this.coordinates=b;let I=b.map(i.Z.fromLngLat);this.tileID=(function(H){let $=1/0,xe=1/0,ke=-1/0,Ne=-1/0;for(let zt of H)$=Math.min($,zt.x),xe=Math.min(xe,zt.y),ke=Math.max(ke,zt.x),Ne=Math.max(Ne,zt.y);let et=Math.max(ke-$,Ne-xe),bt=Math.max(0,Math.floor(-Math.log(et)/Math.LN2)),Tt=Math.pow(2,bt);return new i.a1(bt,Math.floor(($+ke)/2*Tt),Math.floor((xe+Ne)/2*Tt))})(I),this.minzoom=this.maxzoom=this.tileID.z;let G=I.map((H=>this.tileID.getTilePoint(H)._round()));return this._boundsArray=new i.$,this._boundsArray.emplaceBack(G[0].x,G[0].y,0,0),this._boundsArray.emplaceBack(G[1].x,G[1].y,i.X,0),this._boundsArray.emplaceBack(G[3].x,G[3].y,0,i.X),this._boundsArray.emplaceBack(G[2].x,G[2].y,i.X,i.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new i.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let b=this.map.painter.context,I=b.gl;this.boundsBuffer||(this.boundsBuffer=b.createVertexBuffer(this._boundsArray,qe.members)),this.boundsSegments||(this.boundsSegments=i.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new p(b,this.image,I.RGBA),this.texture.bind(I.LINEAR,I.CLAMP_TO_EDGE));let G=!1;for(let H in this.tiles){let $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture,G=!0)}G&&this.fire(new i.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(b){return i._(this,void 0,void 0,(function*(){this.tileID&&this.tileID.equals(b.tileID.canonical)?(this.tiles[String(b.tileID.wrap)]=b,b.buckets={}):b.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class lt extends mt{constructor(b,I,G,H){super(b,I,G,H),this.roundZoom=!0,this.type="video",this.options=I}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!1;let b=this.options;this.urls=[];for(let I of b.urls)this.urls.push(this.map._requestManager.transformRequest(I,"Source").url);try{let I=yield i.a3(this.urls);if(this._loaded=!0,!I)return;this.video=I,this.video.loop=!0,this.video.addEventListener("playing",(()=>{this.map.triggerRepaint()})),this.map&&this.video.play(),this._finishLoading()}catch(I){this.fire(new i.j(I))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(b){if(this.video){let I=this.video.seekable;bI.end(0)?this.fire(new i.j(new i.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${I.start(0)} and ${I.end(0)}-second mark.`))):this.video.currentTime=b}}getVideo(){return this.video}onAdd(b){this.map||(this.map=b,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let b=this.map.painter.context,I=b.gl;this.boundsBuffer||(this.boundsBuffer=b.createVertexBuffer(this._boundsArray,qe.members)),this.boundsSegments||(this.boundsSegments=i.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(I.LINEAR,I.CLAMP_TO_EDGE),I.texSubImage2D(I.TEXTURE_2D,0,0,0,I.RGBA,I.UNSIGNED_BYTE,this.video)):(this.texture=new p(b,this.video,I.RGBA),this.texture.bind(I.LINEAR,I.CLAMP_TO_EDGE));let G=!1;for(let H in this.tiles){let $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture,G=!0)}G&&this.fire(new i.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Ie extends mt{constructor(b,I,G,H){super(b,I,G,H),I.coordinates?Array.isArray(I.coordinates)&&I.coordinates.length===4&&!I.coordinates.some(($=>!Array.isArray($)||$.length!==2||$.some((xe=>typeof xe!="number"))))||this.fire(new i.j(new i.a2(`sources.${b}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.j(new i.a2(`sources.${b}`,null,'missing required property "coordinates"'))),I.animate&&typeof I.animate!="boolean"&&this.fire(new i.j(new i.a2(`sources.${b}`,null,'optional "animate" property must be a boolean value'))),I.canvas?typeof I.canvas=="string"||I.canvas instanceof HTMLCanvasElement||this.fire(new i.j(new i.a2(`sources.${b}`,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 i.j(new i.a2(`sources.${b}`,null,'missing required property "canvas"'))),this.options=I,this.animate=I.animate===void 0||I.animate}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new i.j(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())}))}getCanvas(){return this.canvas}onAdd(b){this.map=b,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let b=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,b=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,b=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let I=this.map.painter.context,G=I.gl;this.boundsBuffer||(this.boundsBuffer=I.createVertexBuffer(this._boundsArray,qe.members)),this.boundsSegments||(this.boundsSegments=i.a0.simpleSegment(0,0,4,2)),this.texture?(b||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new p(I,this.canvas,G.RGBA,{premultiply:!0});let H=!1;for(let $ in this.tiles){let xe=this.tiles[$];xe.state!=="loaded"&&(xe.state="loaded",xe.texture=this.texture,H=!0)}H&&this.fire(new i.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let b of[this.canvas.width,this.canvas.height])if(isNaN(b)||b<=0)return!0;return!1}}let de={},Ee=K=>{switch(K){case"geojson":return Oe;case"image":return mt;case"raster":return vt;case"raster-dem":return st;case"vector":return Xe;case"video":return lt;case"canvas":return Ie}return de[K]},Ue="RTLPluginLoaded";class ge extends i.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=oe()}_syncState(b){return this.status=b,this.dispatcher.broadcast("SRPS",{pluginStatus:b,pluginURL:this.url}).catch((I=>{throw this.status="error",I}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(b){return i._(this,arguments,void 0,(function*(I,G=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=u.resolveURL(I),!this.url)throw new Error(`requested url ${I} is invalid`);if(this.status==="unavailable"){if(!G)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()}))}_requestImport(){return i._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new i.k(Ue))}))}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Ge=null;function tt(){return Ge||(Ge=new ge),Ge}class ft{constructor(b,I){this.timeAdded=0,this.fadeEndTime=0,this.tileID=b,this.uid=i.a4(),this.uses=0,this.tileSize=I,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(b){let I=b+this.timeAdded;I$.getLayer(et))).filter(Boolean);if(Ne.length!==0){ke.layers=Ne,ke.stateDependentLayerIds&&(ke.stateDependentLayers=ke.stateDependentLayerIds.map((et=>Ne.filter((bt=>bt.id===et))[0])));for(let et of Ne)xe[et.id]=ke}}return xe})(b.buckets,I.style),this.hasSymbolBuckets=!1;for(let H in this.buckets){let $=this.buckets[H];if($ instanceof i.a6){if(this.hasSymbolBuckets=!0,!G)break;$.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let H in this.buckets){let $=this.buckets[H];if($ instanceof i.a6&&$.hasRTLText){this.hasRTLText=!0,tt().lazyLoad();break}}this.queryPadding=0;for(let H in this.buckets){let $=this.buckets[H];this.queryPadding=Math.max(this.queryPadding,I.style.getLayer(H).queryRadius($))}b.imageAtlas&&(this.imageAtlas=b.imageAtlas),b.glyphAtlasImage&&(this.glyphAtlasImage=b.glyphAtlasImage)}else this.collisionBoxArray=new i.a5}unloadVectorData(){for(let b in this.buckets)this.buckets[b].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(b){return this.buckets[b.id]}upload(b){for(let G in this.buckets){let H=this.buckets[G];H.uploadPending()&&H.upload(b)}let I=b.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new p(b,this.imageAtlas.image,I.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new p(b,this.glyphAtlasImage,I.ALPHA),this.glyphAtlasImage=null)}prepare(b){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(b,this.imageAtlasTexture)}queryRenderedFeatures(b,I,G,H,$,xe,ke,Ne,et,bt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:H,cameraQueryGeometry:$,scale:xe,tileSize:this.tileSize,pixelPosMatrix:bt,transform:Ne,params:ke,queryPadding:this.queryPadding*et},b,I,G):{}}querySourceFeatures(b,I){let G=this.latestFeatureIndex;if(!G||!G.rawTileData)return;let H=G.loadVTLayers(),$=I&&I.sourceLayer?I.sourceLayer:"",xe=H._geojsonTileLayer||H[$];if(!xe)return;let ke=i.a7(I&&I.filter),{z:Ne,x:et,y:bt}=this.tileID.canonical,Tt={z:Ne,x:et,y:bt};for(let zt=0;ztG)H=!1;else if(I)if(this.expirationTime{this.remove(b,$)}),G)),this.data[H].push($),this.order.push(H),this.order.length>this.max){let xe=this._getAndRemoveByKey(this.order[0]);xe&&this.onRemove(xe)}return this}has(b){return b.wrapped().key in this.data}getAndRemove(b){return this.has(b)?this._getAndRemoveByKey(b.wrapped().key):null}_getAndRemoveByKey(b){let I=this.data[b].shift();return I.timeout&&clearTimeout(I.timeout),this.data[b].length===0&&delete this.data[b],this.order.splice(this.order.indexOf(b),1),I.value}getByKey(b){let I=this.data[b];return I?I[0].value:null}get(b){return this.has(b)?this.data[b.wrapped().key][0].value:null}remove(b,I){if(!this.has(b))return this;let G=b.wrapped().key,H=I===void 0?0:this.data[G].indexOf(I),$=this.data[G][H];return this.data[G].splice(H,1),$.timeout&&clearTimeout($.timeout),this.data[G].length===0&&delete this.data[G],this.onRemove($.value),this.order.splice(this.order.indexOf(G),1),this}setMaxSize(b){for(this.max=b;this.order.length>this.max;){let I=this._getAndRemoveByKey(this.order[0]);I&&this.onRemove(I)}return this}filter(b){let I=[];for(let G in this.data)for(let H of this.data[G])b(H.value)||I.push(H);for(let G of I)this.remove(G.value.tileID,G)}}class Qe{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(b,I,G){let H=String(I);if(this.stateChanges[b]=this.stateChanges[b]||{},this.stateChanges[b][H]=this.stateChanges[b][H]||{},i.e(this.stateChanges[b][H],G),this.deletedStates[b]===null){this.deletedStates[b]={};for(let $ in this.state[b])$!==H&&(this.deletedStates[b][$]=null)}else if(this.deletedStates[b]&&this.deletedStates[b][H]===null){this.deletedStates[b][H]={};for(let $ in this.state[b][H])G[$]||(this.deletedStates[b][H][$]=null)}else for(let $ in G)this.deletedStates[b]&&this.deletedStates[b][H]&&this.deletedStates[b][H][$]===null&&delete this.deletedStates[b][H][$]}removeFeatureState(b,I,G){if(this.deletedStates[b]===null)return;let H=String(I);if(this.deletedStates[b]=this.deletedStates[b]||{},G&&I!==void 0)this.deletedStates[b][H]!==null&&(this.deletedStates[b][H]=this.deletedStates[b][H]||{},this.deletedStates[b][H][G]=null);else if(I!==void 0)if(this.stateChanges[b]&&this.stateChanges[b][H])for(G in this.deletedStates[b][H]={},this.stateChanges[b][H])this.deletedStates[b][H][G]=null;else this.deletedStates[b][H]=null;else this.deletedStates[b]=null}getState(b,I){let G=String(I),H=i.e({},(this.state[b]||{})[G],(this.stateChanges[b]||{})[G]);if(this.deletedStates[b]===null)return{};if(this.deletedStates[b]){let $=this.deletedStates[b][I];if($===null)return{};for(let xe in $)delete H[xe]}return H}initializeTileState(b,I){b.setFeatureState(this.state,I)}coalesceChanges(b,I){let G={};for(let H in this.stateChanges){this.state[H]=this.state[H]||{};let $={};for(let xe in this.stateChanges[H])this.state[H][xe]||(this.state[H][xe]={}),i.e(this.state[H][xe],this.stateChanges[H][xe]),$[xe]=this.state[H][xe];G[H]=$}for(let H in this.deletedStates){this.state[H]=this.state[H]||{};let $={};if(this.deletedStates[H]===null)for(let xe in this.state[H])$[xe]={},this.state[H][xe]={};else for(let xe in this.deletedStates[H]){if(this.deletedStates[H][xe]===null)this.state[H][xe]={};else for(let ke of Object.keys(this.deletedStates[H][xe]))delete this.state[H][xe][ke];$[xe]=this.state[H][xe]}G[H]=G[H]||{},i.e(G[H],$)}if(this.stateChanges={},this.deletedStates={},Object.keys(G).length!==0)for(let H in b)b[H].setFeatureState(G,I)}}class We extends i.E{constructor(b,I,G){super(),this.id=b,this.dispatcher=G,this.on("data",(H=>this._dataHandler(H))),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((H,$,xe,ke)=>{let Ne=new(Ee($.type))(H,$,xe,ke);if(Ne.id!==H)throw new Error(`Expected Source id to be ${H} instead of ${Ne.id}`);return Ne})(b,I,G,this),this._tiles={},this._cache=new He(0,(H=>this._unloadTile(H))),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new Qe,this._didEmitContent=!1,this._updated=!1}onAdd(b){this.map=b,this._maxTileCacheSize=b?b._maxTileCacheSize:null,this._maxTileCacheZoomLevels=b?b._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(b)}onRemove(b){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(b)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let b in this._tiles){let I=this._tiles[b];if(I.state!=="loaded"&&I.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let b=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,b&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(b,I,G){return i._(this,void 0,void 0,(function*(){try{yield this._source.loadTile(b),this._tileLoaded(b,I,G)}catch(H){b.state="errored",H.status!==404?this._source.fire(new i.j(H,{tile:b})):this.update(this.transform,this.terrain)}}))}_unloadTile(b){this._source.unloadTile&&this._source.unloadTile(b)}_abortTile(b){this._source.abortTile&&this._source.abortTile(b),this._source.fire(new i.k("dataabort",{tile:b,coord:b.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(b){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let I in this._tiles){let G=this._tiles[I];G.upload(b),G.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map((b=>b.tileID)).sort(pt).map((b=>b.key))}getRenderableIds(b){let I=[];for(let G in this._tiles)this._isIdRenderable(G,b)&&I.push(this._tiles[G]);return b?I.sort(((G,H)=>{let $=G.tileID,xe=H.tileID,ke=new i.P($.canonical.x,$.canonical.y)._rotate(this.transform.angle),Ne=new i.P(xe.canonical.x,xe.canonical.y)._rotate(this.transform.angle);return $.overscaledZ-xe.overscaledZ||Ne.y-ke.y||Ne.x-ke.x})).map((G=>G.tileID.key)):I.map((G=>G.tileID)).sort(pt).map((G=>G.key))}hasRenderableParent(b){let I=this.findLoadedParent(b,0);return!!I&&this._isIdRenderable(I.tileID.key)}_isIdRenderable(b,I){return this._tiles[b]&&this._tiles[b].hasData()&&!this._coveredTiles[b]&&(I||!this._tiles[b].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let b in this._tiles)this._tiles[b].state!=="errored"&&this._reloadTile(b,"reloading")}}_reloadTile(b,I){return i._(this,void 0,void 0,(function*(){let G=this._tiles[b];G&&(G.state!=="loading"&&(G.state=I),yield this._loadTile(G,b,I))}))}_tileLoaded(b,I,G){b.timeAdded=u.now(),G==="expired"&&(b.refreshedUponExpiration=!0),this._setTileReloadTimer(I,b),this.getSource().type==="raster-dem"&&b.dem&&this._backfillDEM(b),this._state.initializeTileState(b,this.map?this.map.painter:null),b.aborted||this._source.fire(new i.k("data",{dataType:"source",tile:b,coord:b.tileID}))}_backfillDEM(b){let I=this.getRenderableIds();for(let H=0;H1||(Math.abs(xe)>1&&(Math.abs(xe+Ne)===1?xe+=Ne:Math.abs(xe-Ne)===1&&(xe-=Ne)),$.dem&&H.dem&&(H.dem.backfillBorder($.dem,xe,ke),H.neighboringTiles&&H.neighboringTiles[et]&&(H.neighboringTiles[et].backfilled=!0)))}}getTile(b){return this.getTileByID(b.key)}getTileByID(b){return this._tiles[b]}_retainLoadedChildren(b,I,G,H){for(let $ in this._tiles){let xe=this._tiles[$];if(H[$]||!xe.hasData()||xe.tileID.overscaledZ<=I||xe.tileID.overscaledZ>G)continue;let ke=xe.tileID;for(;xe&&xe.tileID.overscaledZ>I+1;){let et=xe.tileID.scaledTo(xe.tileID.overscaledZ-1);xe=this._tiles[et.key],xe&&xe.hasData()&&(ke=et)}let Ne=ke;for(;Ne.overscaledZ>I;)if(Ne=Ne.scaledTo(Ne.overscaledZ-1),b[Ne.key]){H[ke.key]=ke;break}}}findLoadedParent(b,I){if(b.key in this._loadedParentTiles){let G=this._loadedParentTiles[b.key];return G&&G.tileID.overscaledZ>=I?G:null}for(let G=b.overscaledZ-1;G>=I;G--){let H=b.scaledTo(G),$=this._getLoadedTile(H);if($)return $}}findLoadedSibling(b){return this._getLoadedTile(b)}_getLoadedTile(b){let I=this._tiles[b.key];return I&&I.hasData()?I:this._cache.getByKey(b.wrapped().key)}updateCacheSize(b){let I=Math.ceil(b.width/this._source.tileSize)+1,G=Math.ceil(b.height/this._source.tileSize)+1,H=Math.floor(I*G*(this._maxTileCacheZoomLevels===null?i.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),$=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,H):H;this._cache.setMaxSize($)}handleWrapJump(b){let I=Math.round((b-(this._prevLng===void 0?b:this._prevLng))/360);if(this._prevLng=b,I){let G={};for(let H in this._tiles){let $=this._tiles[H];$.tileID=$.tileID.unwrapTo($.tileID.wrap+I),G[$.tileID.key]=$}this._tiles=G;for(let H in this._timers)clearTimeout(this._timers[H]),delete this._timers[H];for(let H in this._tiles)this._setTileReloadTimer(H,this._tiles[H])}}_updateCoveredAndRetainedTiles(b,I,G,H,$,xe){let ke={},Ne={},et=Object.keys(b),bt=u.now();for(let Tt of et){let zt=b[Tt],Yt=this._tiles[Tt];if(!Yt||Yt.fadeEndTime!==0&&Yt.fadeEndTime<=bt)continue;let Q=this.findLoadedParent(zt,I),ae=this.findLoadedSibling(zt),ve=Q||ae||null;ve&&(this._addTile(ve.tileID),ke[ve.tileID.key]=ve.tileID),Ne[Tt]=zt}this._retainLoadedChildren(Ne,H,G,b);for(let Tt in ke)b[Tt]||(this._coveredTiles[Tt]=!0,b[Tt]=ke[Tt]);if(xe){let Tt={},zt={};for(let Yt of $)this._tiles[Yt.key].hasData()?Tt[Yt.key]=Yt:zt[Yt.key]=Yt;for(let Yt in zt){let Q=zt[Yt].children(this._source.maxzoom);this._tiles[Q[0].key]&&this._tiles[Q[1].key]&&this._tiles[Q[2].key]&&this._tiles[Q[3].key]&&(Tt[Q[0].key]=b[Q[0].key]=Q[0],Tt[Q[1].key]=b[Q[1].key]=Q[1],Tt[Q[2].key]=b[Q[2].key]=Q[2],Tt[Q[3].key]=b[Q[3].key]=Q[3],delete zt[Yt])}for(let Yt in zt){let Q=zt[Yt],ae=this.findLoadedParent(Q,this._source.minzoom),ve=this.findLoadedSibling(Q),be=ae||ve||null;if(be){Tt[be.tileID.key]=b[be.tileID.key]=be.tileID;for(let De in Tt)Tt[De].isChildOf(be.tileID)&&delete Tt[De]}}for(let Yt in this._tiles)Tt[Yt]||(this._coveredTiles[Yt]=!0)}}update(b,I){if(!this._sourceLoaded||this._paused)return;let G;this.transform=b,this.terrain=I,this.updateCacheSize(b),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?G=b.getVisibleUnwrappedCoordinates(this._source.tileID).map((bt=>new i.S(bt.canonical.z,bt.wrap,bt.canonical.z,bt.canonical.x,bt.canonical.y))):(G=b.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:I}),this._source.hasTile&&(G=G.filter((bt=>this._source.hasTile(bt))))):G=[];let H=b.coveringZoomLevel(this._source),$=Math.max(H-We.maxOverzooming,this._source.minzoom),xe=Math.max(H+We.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let bt={};for(let Tt of G)if(Tt.canonical.z>this._source.minzoom){let zt=Tt.scaledTo(Tt.canonical.z-1);bt[zt.key]=zt;let Yt=Tt.scaledTo(Math.max(this._source.minzoom,Math.min(Tt.canonical.z,5)));bt[Yt.key]=Yt}G=G.concat(Object.values(bt))}let ke=G.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,ke&&this.fire(new i.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let Ne=this._updateRetainedTiles(G,H);kt(this._source.type)&&this._updateCoveredAndRetainedTiles(Ne,$,xe,H,G,I);for(let bt in Ne)this._tiles[bt].clearFadeHold();let et=i.ab(this._tiles,Ne);for(let bt of et){let Tt=this._tiles[bt];Tt.hasSymbolBuckets&&!Tt.holdingForFade()?Tt.setHoldDuration(this.map._fadeDuration):Tt.hasSymbolBuckets&&!Tt.symbolFadeFinished()||this._removeTile(bt)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let b in this._tiles)this._tiles[b].holdingForFade()&&this._removeTile(b)}_updateRetainedTiles(b,I){var G;let H={},$={},xe=Math.max(I-We.maxOverzooming,this._source.minzoom),ke=Math.max(I+We.maxUnderzooming,this._source.minzoom),Ne={};for(let et of b){let bt=this._addTile(et);H[et.key]=et,bt.hasData()||Ithis._source.maxzoom){let zt=et.children(this._source.maxzoom)[0],Yt=this.getTile(zt);if(Yt&&Yt.hasData()){H[zt.key]=zt;continue}}else{let zt=et.children(this._source.maxzoom);if(H[zt[0].key]&&H[zt[1].key]&&H[zt[2].key]&&H[zt[3].key])continue}let Tt=bt.wasRequested();for(let zt=et.overscaledZ-1;zt>=xe;--zt){let Yt=et.scaledTo(zt);if($[Yt.key])break;if($[Yt.key]=!0,bt=this.getTile(Yt),!bt&&Tt&&(bt=this._addTile(Yt)),bt){let Q=bt.hasData();if((Q||!(!((G=this.map)===null||G===void 0)&&G.cancelPendingTileRequestsWhileZooming)||Tt)&&(H[Yt.key]=Yt),Tt=bt.wasRequested(),Q)break}}}return H}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let b in this._tiles){let I=[],G,H=this._tiles[b].tileID;for(;H.overscaledZ>0;){if(H.key in this._loadedParentTiles){G=this._loadedParentTiles[H.key];break}I.push(H.key);let $=H.scaledTo(H.overscaledZ-1);if(G=this._getLoadedTile($),G)break;H=$}for(let $ of I)this._loadedParentTiles[$]=G}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let b in this._tiles){let I=this._tiles[b].tileID,G=this._getLoadedTile(I);this._loadedSiblingTiles[I.key]=G}}_addTile(b){let I=this._tiles[b.key];if(I)return I;I=this._cache.getAndRemove(b),I&&(this._setTileReloadTimer(b.key,I),I.tileID=b,this._state.initializeTileState(I,this.map?this.map.painter:null),this._cacheTimers[b.key]&&(clearTimeout(this._cacheTimers[b.key]),delete this._cacheTimers[b.key],this._setTileReloadTimer(b.key,I)));let G=I;return I||(I=new ft(b,this._source.tileSize*b.overscaleFactor()),this._loadTile(I,b.key,I.state)),I.uses++,this._tiles[b.key]=I,G||this._source.fire(new i.k("dataloading",{tile:I,coord:I.tileID,dataType:"source"})),I}_setTileReloadTimer(b,I){b in this._timers&&(clearTimeout(this._timers[b]),delete this._timers[b]);let G=I.getExpiryTimeout();G&&(this._timers[b]=setTimeout((()=>{this._reloadTile(b,"expired"),delete this._timers[b]}),G))}_removeTile(b){let I=this._tiles[b];I&&(I.uses--,delete this._tiles[b],this._timers[b]&&(clearTimeout(this._timers[b]),delete this._timers[b]),I.uses>0||(I.hasData()&&I.state!=="reloading"?this._cache.add(I.tileID,I,I.getExpiryTimeout()):(I.aborted=!0,this._abortTile(I),this._unloadTile(I))))}_dataHandler(b){let I=b.sourceDataType;b.dataType==="source"&&I==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&b.dataType==="source"&&I==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let b in this._tiles)this._removeTile(b);this._cache.reset()}tilesIn(b,I,G){let H=[],$=this.transform;if(!$)return H;let xe=G?$.getCameraQueryGeometry(b):b,ke=b.map((Q=>$.pointCoordinate(Q,this.terrain))),Ne=xe.map((Q=>$.pointCoordinate(Q,this.terrain))),et=this.getIds(),bt=1/0,Tt=1/0,zt=-1/0,Yt=-1/0;for(let Q of Ne)bt=Math.min(bt,Q.x),Tt=Math.min(Tt,Q.y),zt=Math.max(zt,Q.x),Yt=Math.max(Yt,Q.y);for(let Q=0;Q=0&&Se[1].y+De>=0){let Be=ke.map((gt=>ve.getTilePoint(gt))),ut=Ne.map((gt=>ve.getTilePoint(gt)));H.push({tile:ae,tileID:ve,queryGeometry:Be,cameraQueryGeometry:ut,scale:be})}}return H}getVisibleCoordinates(b){let I=this.getRenderableIds(b).map((G=>this._tiles[G].tileID));for(let G of I)G.posMatrix=this.transform.calculatePosMatrix(G.toUnwrapped());return I}hasTransition(){if(this._source.hasTransition())return!0;if(kt(this._source.type)){let b=u.now();for(let I in this._tiles)if(this._tiles[I].fadeEndTime>=b)return!0}return!1}setFeatureState(b,I,G){this._state.updateState(b=b||"_geojsonTileLayer",I,G)}removeFeatureState(b,I,G){this._state.removeFeatureState(b=b||"_geojsonTileLayer",I,G)}getFeatureState(b,I){return this._state.getState(b=b||"_geojsonTileLayer",I)}setDependencies(b,I,G){let H=this._tiles[b];H&&H.setDependencies(I,G)}reloadTilesForDependencies(b,I){for(let G in this._tiles)this._tiles[G].hasDependency(b,I)&&this._reloadTile(G,"reloading");this._cache.filter((G=>!G.hasDependency(b,I)))}}function pt(K,b){let I=Math.abs(2*K.wrap)-+(K.wrap<0),G=Math.abs(2*b.wrap)-+(b.wrap<0);return K.overscaledZ-b.overscaledZ||G-I||b.canonical.y-K.canonical.y||b.canonical.x-K.canonical.x}function kt(K){return K==="raster"||K==="image"||K==="video"}We.maxOverzooming=10,We.maxUnderzooming=3;class qt{constructor(b,I){this.reset(b,I)}reset(b,I){this.points=b||[],this._distances=[0];for(let G=1;G0?(H-xe)/ke:0;return this.points[$].mult(1-Ne).add(this.points[I].mult(Ne))}}function Wt(K,b){let I=!0;return K==="always"||K!=="never"&&b!=="never"||(I=!1),I}class _r{constructor(b,I,G){let H=this.boxCells=[],$=this.circleCells=[];this.xCellCount=Math.ceil(b/G),this.yCellCount=Math.ceil(I/G);for(let xe=0;xethis.width||H<0||I>this.height)return[];let Ne=[];if(b<=0&&I<=0&&this.width<=G&&this.height<=H){if($)return[{key:null,x1:b,y1:I,x2:G,y2:H}];for(let et=0;et0}hitTestCircle(b,I,G,H,$){let xe=b-G,ke=b+G,Ne=I-G,et=I+G;if(ke<0||xe>this.width||et<0||Ne>this.height)return!1;let bt=[];return this._forEachCell(xe,Ne,ke,et,this._queryCellCircle,bt,{hitTest:!0,overlapMode:H,circle:{x:b,y:I,radius:G},seenUids:{box:{},circle:{}}},$),bt.length>0}_queryCell(b,I,G,H,$,xe,ke,Ne){let{seenUids:et,hitTest:bt,overlapMode:Tt}=ke,zt=this.boxCells[$];if(zt!==null){let Q=this.bboxes;for(let ae of zt)if(!et.box[ae]){et.box[ae]=!0;let ve=4*ae,be=this.boxKeys[ae];if(b<=Q[ve+2]&&I<=Q[ve+3]&&G>=Q[ve+0]&&H>=Q[ve+1]&&(!Ne||Ne(be))&&(!bt||!Wt(Tt,be.overlapMode))&&(xe.push({key:be,x1:Q[ve],y1:Q[ve+1],x2:Q[ve+2],y2:Q[ve+3]}),bt))return!0}}let Yt=this.circleCells[$];if(Yt!==null){let Q=this.circles;for(let ae of Yt)if(!et.circle[ae]){et.circle[ae]=!0;let ve=3*ae,be=this.circleKeys[ae];if(this._circleAndRectCollide(Q[ve],Q[ve+1],Q[ve+2],b,I,G,H)&&(!Ne||Ne(be))&&(!bt||!Wt(Tt,be.overlapMode))){let De=Q[ve],Se=Q[ve+1],Be=Q[ve+2];if(xe.push({key:be,x1:De-Be,y1:Se-Be,x2:De+Be,y2:Se+Be}),bt)return!0}}}return!1}_queryCellCircle(b,I,G,H,$,xe,ke,Ne){let{circle:et,seenUids:bt,overlapMode:Tt}=ke,zt=this.boxCells[$];if(zt!==null){let Q=this.bboxes;for(let ae of zt)if(!bt.box[ae]){bt.box[ae]=!0;let ve=4*ae,be=this.boxKeys[ae];if(this._circleAndRectCollide(et.x,et.y,et.radius,Q[ve+0],Q[ve+1],Q[ve+2],Q[ve+3])&&(!Ne||Ne(be))&&!Wt(Tt,be.overlapMode))return xe.push(!0),!0}}let Yt=this.circleCells[$];if(Yt!==null){let Q=this.circles;for(let ae of Yt)if(!bt.circle[ae]){bt.circle[ae]=!0;let ve=3*ae,be=this.circleKeys[ae];if(this._circlesCollide(Q[ve],Q[ve+1],Q[ve+2],et.x,et.y,et.radius)&&(!Ne||Ne(be))&&!Wt(Tt,be.overlapMode))return xe.push(!0),!0}}}_forEachCell(b,I,G,H,$,xe,ke,Ne){let et=this._convertToXCellCoord(b),bt=this._convertToYCellCoord(I),Tt=this._convertToXCellCoord(G),zt=this._convertToYCellCoord(H);for(let Yt=et;Yt<=Tt;Yt++)for(let Q=bt;Q<=zt;Q++)if($.call(this,b,I,G,H,this.xCellCount*Q+Yt,xe,ke,Ne))return}_convertToXCellCoord(b){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(b*this.xScale)))}_convertToYCellCoord(b){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(b*this.yScale)))}_circlesCollide(b,I,G,H,$,xe){let ke=H-b,Ne=$-I,et=G+xe;return et*et>ke*ke+Ne*Ne}_circleAndRectCollide(b,I,G,H,$,xe,ke){let Ne=(xe-H)/2,et=Math.abs(b-(H+Ne));if(et>Ne+G)return!1;let bt=(ke-$)/2,Tt=Math.abs(I-($+bt));if(Tt>bt+G)return!1;if(et<=Ne||Tt<=bt)return!0;let zt=et-Ne,Yt=Tt-bt;return zt*zt+Yt*Yt<=G*G}}function tr(K,b,I,G,H){let $=i.H();return b?(i.K($,$,[1/H,1/H,1]),I||i.ad($,$,G.angle)):i.L($,G.labelPlaneMatrix,K),$}function lr(K,b,I,G,H){if(b){let $=i.ae(K);return i.K($,$,[H,H,1]),I||i.ad($,$,-G.angle),$}return G.glCoordMatrix}function Ye(K,b,I,G){let H;G?(H=[K,b,G(K,b),1],i.af(H,H,I)):(H=[K,b,0,1],Er(H,H,I));let $=H[3];return{point:new i.P(H[0]/$,H[1]/$),signedDistanceFromCamera:$,isOccluded:!1}}function Te(K,b){return .5+K/b*.5}function Fe(K,b){return K.x>=-b[0]&&K.x<=b[0]&&K.y>=-b[1]&&K.y<=b[1]}function Ae(K,b,I,G,H,$,xe,ke,Ne,et,bt,Tt,zt,Yt,Q){let ae=G?K.textSizeData:K.iconSizeData,ve=i.ag(ae,I.transform.zoom),be=[256/I.width*2+1,256/I.height*2+1],De=G?K.text.dynamicLayoutVertexArray:K.icon.dynamicLayoutVertexArray;De.clear();let Se=K.lineVertexArray,Be=G?K.text.placedSymbolArray:K.icon.placedSymbolArray,ut=I.transform.width/I.transform.height,gt=!1;for(let Mt=0;MtMath.abs(I.x-b.x)*G?{useVertical:!0}:(K===i.ah.vertical?b.yI.x)?{needsFlipping:!0}:null}function Ke(K,b,I,G,H,$,xe,ke,Ne,et,bt){let Tt=I/24,zt=b.lineOffsetX*Tt,Yt=b.lineOffsetY*Tt,Q;if(b.numGlyphs>1){let ae=b.glyphStartIndex+b.numGlyphs,ve=b.lineStartIndex,be=b.lineStartIndex+b.lineLength,De=Re(Tt,ke,zt,Yt,G,b,bt,K);if(!De)return{notEnoughRoom:!0};let Se=Ye(De.first.point.x,De.first.point.y,xe,K.getElevation).point,Be=Ye(De.last.point.x,De.last.point.y,xe,K.getElevation).point;if(H&&!G){let ut=Ze(b.writingMode,Se,Be,et);if(ut)return ut}Q=[De.first];for(let ut=b.glyphStartIndex+1;ut0?Se.point:(function(gt,Mt,Ft,Ot,er,sr){return _t(gt,Mt,Ft,1,er,sr)})(K.tileAnchorPoint,De,ve,0,$,K),ut=Ze(b.writingMode,ve,Be,et);if(ut)return ut}let ae=gr(Tt*ke.getoffsetX(b.glyphStartIndex),zt,Yt,G,b.segment,b.lineStartIndex,b.lineStartIndex+b.lineLength,K,bt);if(!ae||K.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Q=[ae]}for(let ae of Q)i.aj(Ne,ae.point,ae.angle);return{}}function _t(K,b,I,G,H,$){let xe=K.add(K.sub(b)._unit()),ke=H!==void 0?Ye(xe.x,xe.y,H,$.getElevation).point:Vt(xe.x,xe.y,$).point,Ne=I.sub(ke);return I.add(Ne._mult(G/Ne.mag()))}function St(K,b,I){let G=b.projectionCache;if(G.projections[K])return G.projections[K];let H=new i.P(b.lineVertexArray.getx(K),b.lineVertexArray.gety(K)),$=Vt(H.x,H.y,b);if($.signedDistanceFromCamera>0)return G.projections[K]=$.point,G.anyProjectionOccluded=G.anyProjectionOccluded||$.isOccluded,$.point;let xe=K-I.direction;return(function(ke,Ne,et,bt,Tt){return _t(ke,Ne,et,bt,void 0,Tt)})(I.distanceFromAnchor===0?b.tileAnchorPoint:new i.P(b.lineVertexArray.getx(xe),b.lineVertexArray.gety(xe)),H,I.previousVertex,I.absOffsetX-I.distanceFromAnchor+1,b)}function Vt(K,b,I){let G=K+I.translation[0],H=b+I.translation[1],$;return!I.pitchWithMap&&I.projection.useSpecialProjectionForSymbols?($=I.projection.projectTileCoordinates(G,H,I.unwrappedTileID,I.getElevation),$.point.x=(.5*$.point.x+.5)*I.width,$.point.y=(.5*-$.point.y+.5)*I.height):($=Ye(G,H,I.labelPlaneMatrix,I.getElevation),$.isOccluded=!1),$}function fr(K,b,I){return K._unit()._perp()._mult(b*I)}function $t(K,b,I,G,H,$,xe,ke,Ne){if(ke.projectionCache.offsets[K])return ke.projectionCache.offsets[K];let et=I.add(b);if(K+Ne.direction=H)return ke.projectionCache.offsets[K]=et,et;let bt=St(K+Ne.direction,ke,Ne),Tt=fr(bt.sub(I),xe,Ne.direction),zt=I.add(Tt),Yt=bt.add(Tt);return ke.projectionCache.offsets[K]=i.ak($,et,zt,Yt)||et,ke.projectionCache.offsets[K]}function gr(K,b,I,G,H,$,xe,ke,Ne){let et=G?K-b:K+b,bt=et>0?1:-1,Tt=0;G&&(bt*=-1,Tt=Math.PI),bt<0&&(Tt+=Math.PI);let zt,Yt=bt>0?$+H:$+H+1;ke.projectionCache.cachedAnchorPoint?zt=ke.projectionCache.cachedAnchorPoint:(zt=Vt(ke.tileAnchorPoint.x,ke.tileAnchorPoint.y,ke).point,ke.projectionCache.cachedAnchorPoint=zt);let Q,ae,ve=zt,be=zt,De=0,Se=0,Be=Math.abs(et),ut=[],gt;for(;De+Se<=Be;){if(Yt+=bt,Yt<$||Yt>=xe)return null;De+=Se,be=ve,ae=Q;let Ot={absOffsetX:Be,direction:bt,distanceFromAnchor:De,previousVertex:be};if(ve=St(Yt,ke,Ot),I===0)ut.push(be),gt=ve.sub(be);else{let er,sr=ve.sub(be);er=sr.mag()===0?fr(St(Yt+bt,ke,Ot).sub(ve),I,bt):fr(sr,I,bt),ae||(ae=be.add(er)),Q=$t(Yt,er,ve,$,xe,ae,I,ke,Ot),ut.push(ae),gt=Q.sub(ae)}Se=gt.mag()}let Mt=gt._mult((Be-De)/Se)._add(ae||be),Ft=Tt+Math.atan2(ve.y-be.y,ve.x-be.x);return ut.push(Mt),{point:Mt,angle:Ne?Ft:0,path:ut}}let Br=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Nr(K,b){for(let I=0;I=1;va--)kn.push(pn.path[va]);for(let va=1;vaXa.signedDistanceFromCamera<=0))?[]:va.map((Xa=>Xa.point))}let ka=[];if(kn.length>0){let va=kn[0].clone(),Xa=kn[0].clone();for(let Ai=1;Ai=sr.x&&Xa.x<=wr.x&&va.y>=sr.y&&Xa.y<=wr.y?[kn]:Xa.xwr.x||Xa.ywr.y?[]:i.al([kn],sr.x,sr.y,wr.x,wr.y)}for(let va of ka){Gr.reset(va,.25*er);let Xa=0;Xa=Gr.length<=.5*er?1:Math.ceil(Gr.paddedLength/ta)+1;for(let Ai=0;AiYe(H.x,H.y,G,I.getElevation)))}queryRenderedSymbols(b){if(b.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let I=[],G=1/0,H=1/0,$=-1/0,xe=-1/0;for(let bt of b){let Tt=new i.P(bt.x+zr,bt.y+zr);G=Math.min(G,Tt.x),H=Math.min(H,Tt.y),$=Math.max($,Tt.x),xe=Math.max(xe,Tt.y),I.push(Tt)}let ke=this.grid.query(G,H,$,xe).concat(this.ignoredGrid.query(G,H,$,xe)),Ne={},et={};for(let bt of ke){let Tt=bt.key;if(Ne[Tt.bucketInstanceId]===void 0&&(Ne[Tt.bucketInstanceId]={}),Ne[Tt.bucketInstanceId][Tt.featureIndex])continue;let zt=[new i.P(bt.x1,bt.y1),new i.P(bt.x2,bt.y1),new i.P(bt.x2,bt.y2),new i.P(bt.x1,bt.y2)];i.am(I,zt)&&(Ne[Tt.bucketInstanceId][Tt.featureIndex]=!0,et[Tt.bucketInstanceId]===void 0&&(et[Tt.bucketInstanceId]=[]),et[Tt.bucketInstanceId].push(Tt.featureIndex))}return et}insertCollisionBox(b,I,G,H,$,xe){(G?this.ignoredGrid:this.grid).insert({bucketInstanceId:H,featureIndex:$,collisionGroupID:xe,overlapMode:I},b[0],b[1],b[2],b[3])}insertCollisionCircles(b,I,G,H,$,xe){let ke=G?this.ignoredGrid:this.grid,Ne={bucketInstanceId:H,featureIndex:$,collisionGroupID:xe,overlapMode:I};for(let et=0;et=this.screenRightBoundary||Hthis.screenBottomBoundary}isInsideGrid(b,I,G,H){return G>=0&&b=0&&Ithis.projectAndGetPerspectiveRatio(G,er.x,er.y,H,et)));Ft=Ot.some((er=>!er.isOccluded)),Mt=Ot.map((er=>er.point))}else Ft=!0;return{box:i.ao(Mt),allPointsOccluded:!Ft}}}function Nn(K,b,I){return b*(i.X/(K.tileSize*Math.pow(2,I-K.tileID.overscaledZ)))}class Xn{constructor(b,I,G,H){this.opacity=b?Math.max(0,Math.min(1,b.opacity+(b.placed?I:-I))):H&&G?1:0,this.placed=G}isHidden(){return this.opacity===0&&!this.placed}}class Kn{constructor(b,I,G,H,$){this.text=new Xn(b?b.text:null,I,G,$),this.icon=new Xn(b?b.icon:null,I,H,$)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Qn{constructor(b,I,G){this.text=b,this.icon=I,this.skipFade=G}}class un{constructor(){this.invProjMatrix=i.H(),this.viewportMatrix=i.H(),this.circles=[]}}class aa{constructor(b,I,G,H,$){this.bucketInstanceId=b,this.featureIndex=I,this.sourceLayerIndex=G,this.bucketIndex=H,this.tileID=$}}class da{constructor(b){this.crossSourceCollisions=b,this.maxGroupID=0,this.collisionGroups={}}get(b){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[b]){let I=++this.maxGroupID;this.collisionGroups[b]={ID:I,predicate:G=>G.collisionGroupID===I}}return this.collisionGroups[b]}}function ua(K,b,I,G,H){let{horizontalAlign:$,verticalAlign:xe}=i.au(K);return new i.P(-($-.5)*b+G[0]*H,-(xe-.5)*I+G[1]*H)}class qa{constructor(b,I,G,H,$,xe){this.transform=b.clone(),this.terrain=G,this.collisionIndex=new vn(this.transform,I),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=H,this.retainedQueryData={},this.collisionGroups=new da($),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=xe,xe&&(xe.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(b){let I=this.terrain;return I?(G,H)=>I.getElevation(b,G,H):null}getBucketParts(b,I,G,H){let $=G.getBucket(I),xe=G.latestFeatureIndex;if(!$||!xe||I.id!==$.layerIds[0])return;let ke=G.collisionBoxArray,Ne=$.layers[0].layout,et=$.layers[0].paint,bt=Math.pow(2,this.transform.zoom-G.tileID.overscaledZ),Tt=G.tileSize/i.X,zt=G.tileID.toUnwrapped(),Yt=this.transform.calculatePosMatrix(zt),Q=Ne.get("text-pitch-alignment")==="map",ae=Ne.get("text-rotation-alignment")==="map",ve=Nn(G,1,this.transform.zoom),be=this.collisionIndex.mapProjection.translatePosition(this.transform,G,et.get("text-translate"),et.get("text-translate-anchor")),De=this.collisionIndex.mapProjection.translatePosition(this.transform,G,et.get("icon-translate"),et.get("icon-translate-anchor")),Se=tr(Yt,Q,ae,this.transform,ve),Be=null;if(Q){let gt=lr(Yt,Q,ae,this.transform,ve);Be=i.L([],this.transform.labelPlaneMatrix,gt)}this.retainedQueryData[$.bucketInstanceId]=new aa($.bucketInstanceId,xe,$.sourceLayerIndex,$.index,G.tileID);let ut={bucket:$,layout:Ne,translationText:be,translationIcon:De,posMatrix:Yt,unwrappedTileID:zt,textLabelPlaneMatrix:Se,labelToScreenMatrix:Be,scale:bt,textPixelRatio:Tt,holdingForFade:G.holdingForFade(),collisionBoxArray:ke,partiallyEvaluatedTextSize:i.ag($.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get($.sourceID)};if(H)for(let gt of $.sortKeyRanges){let{sortKey:Mt,symbolInstanceStart:Ft,symbolInstanceEnd:Ot}=gt;b.push({sortKey:Mt,symbolInstanceStart:Ft,symbolInstanceEnd:Ot,parameters:ut})}else b.push({symbolInstanceStart:0,symbolInstanceEnd:$.symbolInstances.length,parameters:ut})}attemptAnchorPlacement(b,I,G,H,$,xe,ke,Ne,et,bt,Tt,zt,Yt,Q,ae,ve,be,De,Se){let Be=i.aq[b.textAnchor],ut=[b.textOffset0,b.textOffset1],gt=ua(Be,G,H,ut,$),Mt=this.collisionIndex.placeCollisionBox(I,zt,Ne,et,bt,ke,xe,ve,Tt.predicate,Se,gt);if((!De||this.collisionIndex.placeCollisionBox(De,zt,Ne,et,bt,ke,xe,be,Tt.predicate,Se,gt).placeable)&&Mt.placeable){let Ft;if(this.prevPlacement&&this.prevPlacement.variableOffsets[Yt.crossTileID]&&this.prevPlacement.placements[Yt.crossTileID]&&this.prevPlacement.placements[Yt.crossTileID].text&&(Ft=this.prevPlacement.variableOffsets[Yt.crossTileID].anchor),Yt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Yt.crossTileID]={textOffset:ut,width:G,height:H,anchor:Be,textBoxScale:$,prevAnchor:Ft},this.markUsedJustification(Q,Be,Yt,ae),Q.allowVerticalPlacement&&(this.markUsedOrientation(Q,ae,Yt),this.placedOrientations[Yt.crossTileID]=ae),{shift:gt,placedGlyphBoxes:Mt}}}placeLayerBucketPart(b,I,G){let{bucket:H,layout:$,translationText:xe,translationIcon:ke,posMatrix:Ne,unwrappedTileID:et,textLabelPlaneMatrix:bt,labelToScreenMatrix:Tt,textPixelRatio:zt,holdingForFade:Yt,collisionBoxArray:Q,partiallyEvaluatedTextSize:ae,collisionGroup:ve}=b.parameters,be=$.get("text-optional"),De=$.get("icon-optional"),Se=i.ar($,"text-overlap","text-allow-overlap"),Be=Se==="always",ut=i.ar($,"icon-overlap","icon-allow-overlap"),gt=ut==="always",Mt=$.get("text-rotation-alignment")==="map",Ft=$.get("text-pitch-alignment")==="map",Ot=$.get("icon-text-fit")!=="none",er=$.get("symbol-z-order")==="viewport-y",sr=Be&&(gt||!H.hasIconData()||De),wr=gt&&(Be||!H.hasTextData()||be);!H.collisionArrays&&Q&&H.deserializeCollisionBoxes(Q);let Gr=this._getTerrainElevationFunc(this.retainedQueryData[H.bucketInstanceId].tileID),pn=(cn,kn,ta)=>{var ka,va;if(I[cn.crossTileID])return;if(Yt)return void(this.placements[cn.crossTileID]=new Qn(!1,!1,!1));let Xa=!1,Ai=!1,di=!0,xo=null,Xi={box:null,placeable:!1,offscreen:null},Wo={box:null,placeable:!1,offscreen:null},fs=null,ws=null,qo=null,Jo=0,Tl=0,bu=0;kn.textFeatureIndex?Jo=kn.textFeatureIndex:cn.useRuntimeCollisionCircles&&(Jo=cn.featureIndex),kn.verticalTextFeatureIndex&&(Tl=kn.verticalTextFeatureIndex);let Gl=kn.textBox;if(Gl){let Qs=ie=>{let _e=i.ah.horizontal;if(H.allowVerticalPlacement&&!ie&&this.prevPlacement){let Me=this.prevPlacement.placedOrientations[cn.crossTileID];Me&&(this.placedOrientations[cn.crossTileID]=Me,_e=Me,this.markUsedOrientation(H,_e,cn))}return _e},Al=(ie,_e)=>{if(H.allowVerticalPlacement&&cn.numVerticalGlyphVertices>0&&kn.verticalTextBox){for(let Me of H.writingModes)if(Me===i.ah.vertical?(Xi=_e(),Wo=Xi):Xi=ie(),Xi&&Xi.placeable)break}else Xi=ie()},V=cn.textAnchorOffsetStartIndex,Z=cn.textAnchorOffsetEndIndex;if(Z===V){let ie=(_e,Me)=>{let Le=this.collisionIndex.placeCollisionBox(_e,Se,zt,Ne,et,Ft,Mt,xe,ve.predicate,Gr);return Le&&Le.placeable&&(this.markUsedOrientation(H,Me,cn),this.placedOrientations[cn.crossTileID]=Me),Le};Al((()=>ie(Gl,i.ah.horizontal)),(()=>{let _e=kn.verticalTextBox;return H.allowVerticalPlacement&&cn.numVerticalGlyphVertices>0&&_e?ie(_e,i.ah.vertical):{box:null,offscreen:null}})),Qs(Xi&&Xi.placeable)}else{let ie=i.aq[(va=(ka=this.prevPlacement)===null||ka===void 0?void 0:ka.variableOffsets[cn.crossTileID])===null||va===void 0?void 0:va.anchor],_e=(Le,at,je)=>{let xt=Le.x2-Le.x1,Dt=Le.y2-Le.y1,It=cn.textBoxScale,ar=Ot&&ut==="never"?at:null,rr=null,Dr=Se==="never"?1:2,Hr="never";ie&&Dr++;for(let hr=0;hr_e(Gl,kn.iconBox,i.ah.horizontal)),(()=>{let Le=kn.verticalTextBox;return H.allowVerticalPlacement&&(!Xi||!Xi.placeable)&&cn.numVerticalGlyphVertices>0&&Le?_e(Le,kn.verticalIconBox,i.ah.vertical):{box:null,occluded:!0,offscreen:null}})),Xi&&(Xa=Xi.placeable,di=Xi.offscreen);let Me=Qs(Xi&&Xi.placeable);if(!Xa&&this.prevPlacement){let Le=this.prevPlacement.variableOffsets[cn.crossTileID];Le&&(this.variableOffsets[cn.crossTileID]=Le,this.markUsedJustification(H,Le.anchor,cn,Me))}}}if(fs=Xi,Xa=fs&&fs.placeable,di=fs&&fs.offscreen,cn.useRuntimeCollisionCircles){let Qs=H.text.placedSymbolArray.get(cn.centerJustifiedTextSymbolIndex),Al=i.ai(H.textSizeData,ae,Qs),V=$.get("text-padding");ws=this.collisionIndex.placeCollisionCircles(Se,Qs,H.lineVertexArray,H.glyphOffsetArray,Al,Ne,et,bt,Tt,G,Ft,ve.predicate,cn.collisionCircleDiameter,V,xe,Gr),ws.circles.length&&ws.collisionDetected&&!G&&i.w("Collisions detected, but collision boxes are not shown"),Xa=Be||ws.circles.length>0&&!ws.collisionDetected,di=di&&ws.offscreen}if(kn.iconFeatureIndex&&(bu=kn.iconFeatureIndex),kn.iconBox){let Qs=Al=>this.collisionIndex.placeCollisionBox(Al,ut,zt,Ne,et,Ft,Mt,ke,ve.predicate,Gr,Ot&&xo?xo:void 0);Wo&&Wo.placeable&&kn.verticalIconBox?(qo=Qs(kn.verticalIconBox),Ai=qo.placeable):(qo=Qs(kn.iconBox),Ai=qo.placeable),di=di&&qo.offscreen}let zs=be||cn.numHorizontalGlyphVertices===0&&cn.numVerticalGlyphVertices===0,Du=De||cn.numIconVertices===0;zs||Du?Du?zs||(Ai=Ai&&Xa):Xa=Ai&&Xa:Ai=Xa=Ai&&Xa;let _u=Ai&&qo.placeable;if(Xa&&fs.placeable&&this.collisionIndex.insertCollisionBox(fs.box,Se,$.get("text-ignore-placement"),H.bucketInstanceId,Wo&&Wo.placeable&&Tl?Tl:Jo,ve.ID),_u&&this.collisionIndex.insertCollisionBox(qo.box,ut,$.get("icon-ignore-placement"),H.bucketInstanceId,bu,ve.ID),ws&&Xa&&this.collisionIndex.insertCollisionCircles(ws.circles,Se,$.get("text-ignore-placement"),H.bucketInstanceId,Jo,ve.ID),G&&this.storeCollisionData(H.bucketInstanceId,ta,kn,fs,qo,ws),cn.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(H.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[cn.crossTileID]=new Qn(Xa||sr,Ai||wr,di||H.justReloaded),I[cn.crossTileID]=!0};if(er){if(b.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let cn=H.getSortedSymbolIndexes(this.transform.angle);for(let kn=cn.length-1;kn>=0;--kn){let ta=cn[kn];pn(H.symbolInstances.get(ta),H.collisionArrays[ta],ta)}}else for(let cn=b.symbolInstanceStart;cn=0&&(b.text.placedSymbolArray.get(ke).crossTileID=$>=0&&ke!==$?0:G.crossTileID)}markUsedOrientation(b,I,G){let H=I===i.ah.horizontal||I===i.ah.horizontalOnly?I:0,$=I===i.ah.vertical?I:0,xe=[G.leftJustifiedTextSymbolIndex,G.centerJustifiedTextSymbolIndex,G.rightJustifiedTextSymbolIndex];for(let ke of xe)b.text.placedSymbolArray.get(ke).placedOrientation=H;G.verticalPlacedTextSymbolIndex&&(b.text.placedSymbolArray.get(G.verticalPlacedTextSymbolIndex).placedOrientation=$)}commit(b){this.commitTime=b,this.zoomAtLastRecencyCheck=this.transform.zoom;let I=this.prevPlacement,G=!1;this.prevZoomAdjustment=I?I.zoomAdjustment(this.transform.zoom):0;let H=I?I.symbolFadeChange(b):1,$=I?I.opacities:{},xe=I?I.variableOffsets:{},ke=I?I.placedOrientations:{};for(let Ne in this.placements){let et=this.placements[Ne],bt=$[Ne];bt?(this.opacities[Ne]=new Kn(bt,H,et.text,et.icon),G=G||et.text!==bt.text.placed||et.icon!==bt.icon.placed):(this.opacities[Ne]=new Kn(null,H,et.text,et.icon,et.skipFade),G=G||et.text||et.icon)}for(let Ne in $){let et=$[Ne];if(!this.opacities[Ne]){let bt=new Kn(et,H,!1,!1);bt.isHidden()||(this.opacities[Ne]=bt,G=G||et.text.placed||et.icon.placed)}}for(let Ne in xe)this.variableOffsets[Ne]||!this.opacities[Ne]||this.opacities[Ne].isHidden()||(this.variableOffsets[Ne]=xe[Ne]);for(let Ne in ke)this.placedOrientations[Ne]||!this.opacities[Ne]||this.opacities[Ne].isHidden()||(this.placedOrientations[Ne]=ke[Ne]);if(I&&I.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");G?this.lastPlacementChangeTime=b:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=I?I.lastPlacementChangeTime:b)}updateLayerOpacities(b,I){let G={};for(let H of I){let $=H.getBucket(b);$&&H.latestFeatureIndex&&b.id===$.layerIds[0]&&this.updateBucketOpacities($,H.tileID,G,H.collisionBoxArray)}}updateBucketOpacities(b,I,G,H){b.hasTextData()&&(b.text.opacityVertexArray.clear(),b.text.hasVisibleVertices=!1),b.hasIconData()&&(b.icon.opacityVertexArray.clear(),b.icon.hasVisibleVertices=!1),b.hasIconCollisionBoxData()&&b.iconCollisionBox.collisionVertexArray.clear(),b.hasTextCollisionBoxData()&&b.textCollisionBox.collisionVertexArray.clear();let $=b.layers[0],xe=$.layout,ke=new Kn(null,0,!1,!1,!0),Ne=xe.get("text-allow-overlap"),et=xe.get("icon-allow-overlap"),bt=$._unevaluatedLayout.hasValue("text-variable-anchor")||$._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Tt=xe.get("text-rotation-alignment")==="map",zt=xe.get("text-pitch-alignment")==="map",Yt=xe.get("icon-text-fit")!=="none",Q=new Kn(null,0,Ne&&(et||!b.hasIconData()||xe.get("icon-optional")),et&&(Ne||!b.hasTextData()||xe.get("text-optional")),!0);!b.collisionArrays&&H&&(b.hasIconCollisionBoxData()||b.hasTextCollisionBoxData())&&b.deserializeCollisionBoxes(H);let ae=(be,De,Se)=>{for(let Be=0;Be0,Ft=this.placedOrientations[De.crossTileID],Ot=Ft===i.ah.vertical,er=Ft===i.ah.horizontal||Ft===i.ah.horizontalOnly;if(Se>0||Be>0){let wr=ni(gt.text);ae(b.text,Se,Ot?ao:wr),ae(b.text,Be,er?ao:wr);let Gr=gt.text.isHidden();[De.rightJustifiedTextSymbolIndex,De.centerJustifiedTextSymbolIndex,De.leftJustifiedTextSymbolIndex].forEach((kn=>{kn>=0&&(b.text.placedSymbolArray.get(kn).hidden=Gr||Ot?1:0)})),De.verticalPlacedTextSymbolIndex>=0&&(b.text.placedSymbolArray.get(De.verticalPlacedTextSymbolIndex).hidden=Gr||er?1:0);let pn=this.variableOffsets[De.crossTileID];pn&&this.markUsedJustification(b,pn.anchor,De,Ft);let cn=this.placedOrientations[De.crossTileID];cn&&(this.markUsedJustification(b,"left",De,cn),this.markUsedOrientation(b,cn,De))}if(Mt){let wr=ni(gt.icon),Gr=!(Yt&&De.verticalPlacedIconSymbolIndex&&Ot);De.placedIconSymbolIndex>=0&&(ae(b.icon,De.numIconVertices,Gr?wr:ao),b.icon.placedSymbolArray.get(De.placedIconSymbolIndex).hidden=gt.icon.isHidden()),De.verticalPlacedIconSymbolIndex>=0&&(ae(b.icon,De.numVerticalIconVertices,Gr?ao:wr),b.icon.placedSymbolArray.get(De.verticalPlacedIconSymbolIndex).hidden=gt.icon.isHidden())}let sr=ve&&ve.has(be)?ve.get(be):{text:null,icon:null};if(b.hasIconCollisionBoxData()||b.hasTextCollisionBoxData()){let wr=b.collisionArrays[be];if(wr){let Gr=new i.P(0,0);if(wr.textBox||wr.verticalTextBox){let pn=!0;if(bt){let cn=this.variableOffsets[ut];cn?(Gr=ua(cn.anchor,cn.width,cn.height,cn.textOffset,cn.textBoxScale),Tt&&Gr._rotate(zt?this.transform.angle:-this.transform.angle)):pn=!1}if(wr.textBox||wr.verticalTextBox){let cn;wr.textBox&&(cn=Ot),wr.verticalTextBox&&(cn=er),ii(b.textCollisionBox.collisionVertexArray,gt.text.placed,!pn||cn,sr.text,Gr.x,Gr.y)}}if(wr.iconBox||wr.verticalIconBox){let pn=!!(!er&&wr.verticalIconBox),cn;wr.iconBox&&(cn=pn),wr.verticalIconBox&&(cn=!pn),ii(b.iconCollisionBox.collisionVertexArray,gt.icon.placed,cn,sr.icon,Yt?Gr.x:0,Yt?Gr.y:0)}}}}if(b.sortFeatures(this.transform.angle),this.retainedQueryData[b.bucketInstanceId]&&(this.retainedQueryData[b.bucketInstanceId].featureSortOrder=b.featureSortOrder),b.hasTextData()&&b.text.opacityVertexBuffer&&b.text.opacityVertexBuffer.updateData(b.text.opacityVertexArray),b.hasIconData()&&b.icon.opacityVertexBuffer&&b.icon.opacityVertexBuffer.updateData(b.icon.opacityVertexArray),b.hasIconCollisionBoxData()&&b.iconCollisionBox.collisionVertexBuffer&&b.iconCollisionBox.collisionVertexBuffer.updateData(b.iconCollisionBox.collisionVertexArray),b.hasTextCollisionBoxData()&&b.textCollisionBox.collisionVertexBuffer&&b.textCollisionBox.collisionVertexBuffer.updateData(b.textCollisionBox.collisionVertexArray),b.text.opacityVertexArray.length!==b.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${b.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${b.text.layoutVertexArray.length}) / 4`);if(b.icon.opacityVertexArray.length!==b.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${b.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${b.icon.layoutVertexArray.length}) / 4`);if(b.bucketInstanceId in this.collisionCircleArrays){let be=this.collisionCircleArrays[b.bucketInstanceId];b.placementInvProjMatrix=be.invProjMatrix,b.placementViewportMatrix=be.viewportMatrix,b.collisionCircleArray=be.circles,delete this.collisionCircleArrays[b.bucketInstanceId]}}symbolFadeChange(b){return this.fadeDuration===0?1:(b-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(b){return Math.max(0,(this.transform.zoom-b)/1.5)}hasTransitions(b){return this.stale||b-this.lastPlacementChangeTimeb}setStale(){this.stale=!0}}function ii(K,b,I,G,H,$){G&&G.length!==0||(G=[0,0,0,0]);let xe=G[0]-zr,ke=G[1]-zr,Ne=G[2]-zr,et=G[3]-zr;K.emplaceBack(b?1:0,I?1:0,H||0,$||0,xe,ke),K.emplaceBack(b?1:0,I?1:0,H||0,$||0,Ne,ke),K.emplaceBack(b?1:0,I?1:0,H||0,$||0,Ne,et),K.emplaceBack(b?1:0,I?1:0,H||0,$||0,xe,et)}let pa=Math.pow(2,25),no=Math.pow(2,24),Gi=Math.pow(2,17),Ti=Math.pow(2,16),fi=Math.pow(2,9),_o=Math.pow(2,8),Oi=Math.pow(2,1);function ni(K){if(K.opacity===0&&!K.placed)return 0;if(K.opacity===1&&K.placed)return 4294967295;let b=K.placed?1:0,I=Math.floor(127*K.opacity);return I*pa+b*no+I*Gi+b*Ti+I*fi+b*_o+I*Oi+b}let ao=0;function Hi(){return{isOccluded:(K,b,I)=>!1,getPitchedTextCorrection:(K,b,I)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(K,b,I,G){throw new Error("Not implemented.")},translatePosition:(K,b,I,G)=>(function(H,$,xe,ke,Ne=!1){if(!xe[0]&&!xe[1])return[0,0];let et=Ne?ke==="map"?H.angle:0:ke==="viewport"?-H.angle:0;if(et){let bt=Math.sin(et),Tt=Math.cos(et);xe=[xe[0]*Tt-xe[1]*bt,xe[0]*bt+xe[1]*Tt]}return[Ne?xe[0]:Nn($,xe[0],H.zoom),Ne?xe[1]:Nn($,xe[1],H.zoom)]})(K,b,I,G),getCircleRadiusCorrection:K=>1}}class to{constructor(b){this._sortAcrossTiles=b.layout.get("symbol-z-order")!=="viewport-y"&&!b.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(b,I,G,H,$){let xe=this._bucketParts;for(;this._currentTileIndexke.sortKey-Ne.sortKey)));this._currentPartIndex!this._forceFullPlacement&&u.now()-H>2;for(;this._currentPlacementIndex>=0;){let xe=I[b[this._currentPlacementIndex]],ke=this.placement.collisionIndex.transform.zoom;if(xe.type==="symbol"&&(!xe.minzoom||xe.minzoom<=ke)&&(!xe.maxzoom||xe.maxzoom>ke)){if(this._inProgressLayer||(this._inProgressLayer=new to(xe)),this._inProgressLayer.continuePlacement(G[xe.source],this.placement,this._showCollisionBoxes,xe,$))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(b){return this.placement.commit(b),this.placement}}let Zo=512/i.X/2;class Fi{constructor(b,I,G){this.tileID=b,this.bucketInstanceId=G,this._symbolsByKey={};let H=new Map;for(let $=0;$({x:Math.floor(Ne.anchorX*Zo),y:Math.floor(Ne.anchorY*Zo)}))),crossTileIDs:xe.map((Ne=>Ne.crossTileID))};if(ke.positions.length>128){let Ne=new i.av(ke.positions.length,16,Uint16Array);for(let{x:et,y:bt}of ke.positions)Ne.add(et,bt);Ne.finish(),delete ke.positions,ke.index=Ne}this._symbolsByKey[$]=ke}}getScaledCoordinates(b,I){let{x:G,y:H,z:$}=this.tileID.canonical,{x:xe,y:ke,z:Ne}=I.canonical,et=Zo/Math.pow(2,Ne-$),bt=(ke*i.X+b.anchorY)*et,Tt=H*i.X*Zo;return{x:Math.floor((xe*i.X+b.anchorX)*et-G*i.X*Zo),y:Math.floor(bt-Tt)}}findMatches(b,I,G){let H=this.tileID.canonical.zb))}}class yo{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class oo{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(b){let I=Math.round((b-this.lng)/360);if(I!==0)for(let G in this.indexes){let H=this.indexes[G],$={};for(let xe in H){let ke=H[xe];ke.tileID=ke.tileID.unwrapTo(ke.tileID.wrap+I),$[ke.tileID.key]=ke}this.indexes[G]=$}this.lng=b}addBucket(b,I,G){if(this.indexes[b.overscaledZ]&&this.indexes[b.overscaledZ][b.key]){if(this.indexes[b.overscaledZ][b.key].bucketInstanceId===I.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(b.overscaledZ,this.indexes[b.overscaledZ][b.key])}for(let $=0;$b.overscaledZ)for(let ke in xe){let Ne=xe[ke];Ne.tileID.isChildOf(b)&&Ne.findMatches(I.symbolInstances,b,H)}else{let ke=xe[b.scaledTo(Number($)).key];ke&&ke.findMatches(I.symbolInstances,b,H)}}for(let $=0;${I[G]=!0}));for(let G in this.layerIndexes)I[G]||delete this.layerIndexes[G]}}let Ni=(K,b)=>i.t(K,b&&b.filter((I=>I.identifier!=="source.canvas"))),Oa=i.aw();class xi extends i.E{constructor(b,I={}){super(),this._rtlPluginLoaded=()=>{for(let G in this.sourceCaches){let H=this.sourceCaches[G].getSource().type;H!=="vector"&&H!=="geojson"||this.sourceCaches[G].reload()}},this.map=b,this.dispatcher=new ce(fe(),b._getMapId()),this.dispatcher.registerMessageHandler("GG",((G,H)=>this.getGlyphs(G,H))),this.dispatcher.registerMessageHandler("GI",((G,H)=>this.getImages(G,H))),this.imageManager=new A,this.imageManager.setEventedParent(this),this.glyphManager=new q(b._requestManager,I.localIdeographFontFamily),this.lineAtlas=new X(256,512),this.crossTileSymbolIndex=new rl,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new i.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",i.ay()),tt().on(Ue,this._rtlPluginLoaded),this.on("data",(G=>{if(G.dataType!=="source"||G.sourceDataType!=="metadata")return;let H=this.sourceCaches[G.sourceId];if(!H)return;let $=H.getSource();if($&&$.vectorLayerIds)for(let xe in this._layers){let ke=this._layers[xe];ke.source===$.id&&this._validateLayer(ke)}}))}loadURL(b,I={},G){this.fire(new i.k("dataloading",{dataType:"style"})),I.validate=typeof I.validate!="boolean"||I.validate;let H=this.map._requestManager.transformRequest(b,"Style");this._loadStyleRequest=new AbortController;let $=this._loadStyleRequest;i.h(H,this._loadStyleRequest).then((xe=>{this._loadStyleRequest=null,this._load(xe.data,I,G)})).catch((xe=>{this._loadStyleRequest=null,xe&&!$.signal.aborted&&this.fire(new i.j(xe))}))}loadJSON(b,I={},G){this.fire(new i.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then((()=>{this._frameRequest=null,I.validate=I.validate!==!1,this._load(b,I,G)})).catch((()=>{}))}loadEmpty(){this.fire(new i.k("dataloading",{dataType:"style"})),this._load(Oa,{validate:!1})}_load(b,I,G){var H;let $=I.transformStyle?I.transformStyle(G,b):b;if(!I.validate||!Ni(this,i.u($))){this._loaded=!0,this.stylesheet=$;for(let xe in $.sources)this.addSource(xe,$.sources[xe],{validate:!1});$.sprite?this._loadSprite($.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL($.glyphs),this._createLayers(),this.light=new R(this.stylesheet.light),this.sky=new Y(this.stylesheet.sky),this.map.setTerrain((H=this.stylesheet.terrain)!==null&&H!==void 0?H:null),this.fire(new i.k("data",{dataType:"style"})),this.fire(new i.k("style.load"))}}_createLayers(){let b=i.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",b),this._order=b.map((I=>I.id)),this._layers={},this._serializedLayers=null;for(let I of b){let G=i.aA(I);G.setEventedParent(this,{layer:{id:I.id}}),this._layers[I.id]=G}}_loadSprite(b,I=!1,G=void 0){let H;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,(function($,xe,ke,Ne){return i._(this,void 0,void 0,(function*(){let et=S($),bt=ke>1?"@2x":"",Tt={},zt={};for(let{id:Yt,url:Q}of et){let ae=xe.transformRequest(T(Q,bt,".json"),"SpriteJSON");Tt[Yt]=i.h(ae,Ne);let ve=xe.transformRequest(T(Q,bt,".png"),"SpriteImage");zt[Yt]=g.getImage(ve,Ne)}return yield Promise.all([...Object.values(Tt),...Object.values(zt)]),(function(Yt,Q){return i._(this,void 0,void 0,(function*(){let ae={};for(let ve in Yt){ae[ve]={};let be=u.getImageCanvasContext((yield Q[ve]).data),De=(yield Yt[ve]).data;for(let Se in De){let{width:Be,height:ut,x:gt,y:Mt,sdf:Ft,pixelRatio:Ot,stretchX:er,stretchY:sr,content:wr,textFitWidth:Gr,textFitHeight:pn}=De[Se];ae[ve][Se]={data:null,pixelRatio:Ot,sdf:Ft,stretchX:er,stretchY:sr,content:wr,textFitWidth:Gr,textFitHeight:pn,spriteData:{width:Be,height:ut,x:gt,y:Mt,context:be}}}}return ae}))})(Tt,zt)}))})(b,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(($=>{if(this._spriteRequest=null,$)for(let xe in $){this._spritesImagesIds[xe]=[];let ke=this._spritesImagesIds[xe]?this._spritesImagesIds[xe].filter((Ne=>!(Ne in $))):[];for(let Ne of ke)this.imageManager.removeImage(Ne),this._changedImages[Ne]=!0;for(let Ne in $[xe]){let et=xe==="default"?Ne:`${xe}:${Ne}`;this._spritesImagesIds[xe].push(et),et in this.imageManager.images?this.imageManager.updateImage(et,$[xe][Ne],!1):this.imageManager.addImage(et,$[xe][Ne]),I&&(this._changedImages[et]=!0)}}})).catch(($=>{this._spriteRequest=null,H=$,this.fire(new i.j(H))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),I&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.k("data",{dataType:"style"})),G&&G(H)}))}_unloadSprite(){for(let b of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(b),this._changedImages[b]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.k("data",{dataType:"style"}))}_validateLayer(b){let I=this.sourceCaches[b.source];if(!I)return;let G=b.sourceLayer;if(!G)return;let H=I.getSource();(H.type==="geojson"||H.vectorLayerIds&&H.vectorLayerIds.indexOf(G)===-1)&&this.fire(new i.j(new Error(`Source layer "${G}" does not exist on source "${H.id}" as specified by style layer "${b.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let b in this.sourceCaches)if(!this.sourceCaches[b].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(b,I=!1){let G=this._serializedAllLayers();if(!b||b.length===0)return Object.values(I?i.aB(G):G);let H=[];for(let $ of b)if(G[$]){let xe=I?i.aB(G[$]):G[$];H.push(xe)}return H}_serializedAllLayers(){let b=this._serializedLayers;if(b)return b;b=this._serializedLayers={};let I=Object.keys(this._layers);for(let G of I){let H=this._layers[G];H.type!=="custom"&&(b[G]=H.serialize())}return b}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let b in this.sourceCaches)if(this.sourceCaches[b].hasTransition())return!0;for(let b in this._layers)if(this._layers[b].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(b){if(!this._loaded)return;let I=this._changed;if(I){let H=Object.keys(this._updatedLayers),$=Object.keys(this._removedLayers);(H.length||$.length)&&this._updateWorkerLayers(H,$);for(let xe in this._updatedSources){let ke=this._updatedSources[xe];if(ke==="reload")this._reloadSource(xe);else{if(ke!=="clear")throw new Error(`Invalid action ${ke}`);this._clearSource(xe)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let xe in this._updatedPaintProps)this._layers[xe].updateTransitions(b);this.light.updateTransitions(b),this.sky.updateTransitions(b),this._resetUpdates()}let G={};for(let H in this.sourceCaches){let $=this.sourceCaches[H];G[H]=$.used,$.used=!1}for(let H of this._order){let $=this._layers[H];$.recalculate(b,this._availableImages),!$.isHidden(b.zoom)&&$.source&&(this.sourceCaches[$.source].used=!0)}for(let H in G){let $=this.sourceCaches[H];!!G[H]!=!!$.used&&$.fire(new i.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:H}))}this.light.recalculate(b),this.sky.recalculate(b),this.z=b.zoom,I&&this.fire(new i.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let b=Object.keys(this._changedImages);if(b.length){for(let I in this.sourceCaches)this.sourceCaches[I].reloadTilesForDependencies(["icons","patterns"],b);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let b in this.sourceCaches)this.sourceCaches[b].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(b,I){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(b,!1),removedIds:I})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(b,I={}){var G;this._checkLoaded();let H=this.serialize();if(b=I.transformStyle?I.transformStyle(H,b):b,((G=I.validate)===null||G===void 0||G)&&Ni(this,i.u(b)))return!1;(b=i.aB(b)).layers=i.az(b.layers);let $=i.aC(H,b),xe=this._getOperationsToPerform($);if(xe.unimplemented.length>0)throw new Error(`Unimplemented: ${xe.unimplemented.join(", ")}.`);if(xe.operations.length===0)return!1;for(let ke of xe.operations)ke();return this.stylesheet=b,this._serializedLayers=null,!0}_getOperationsToPerform(b){let I=[],G=[];for(let H of b)switch(H.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":I.push((()=>this.addLayer.apply(this,H.args)));break;case"removeLayer":I.push((()=>this.removeLayer.apply(this,H.args)));break;case"setPaintProperty":I.push((()=>this.setPaintProperty.apply(this,H.args)));break;case"setLayoutProperty":I.push((()=>this.setLayoutProperty.apply(this,H.args)));break;case"setFilter":I.push((()=>this.setFilter.apply(this,H.args)));break;case"addSource":I.push((()=>this.addSource.apply(this,H.args)));break;case"removeSource":I.push((()=>this.removeSource.apply(this,H.args)));break;case"setLayerZoomRange":I.push((()=>this.setLayerZoomRange.apply(this,H.args)));break;case"setLight":I.push((()=>this.setLight.apply(this,H.args)));break;case"setGeoJSONSourceData":I.push((()=>this.setGeoJSONSourceData.apply(this,H.args)));break;case"setGlyphs":I.push((()=>this.setGlyphs.apply(this,H.args)));break;case"setSprite":I.push((()=>this.setSprite.apply(this,H.args)));break;case"setSky":I.push((()=>this.setSky.apply(this,H.args)));break;case"setTerrain":I.push((()=>this.map.setTerrain.apply(this,H.args)));break;case"setTransition":I.push((()=>{}));break;default:G.push(H.command)}return{operations:I,unimplemented:G}}addImage(b,I){if(this.getImage(b))return this.fire(new i.j(new Error(`An image named "${b}" already exists.`)));this.imageManager.addImage(b,I),this._afterImageUpdated(b)}updateImage(b,I){this.imageManager.updateImage(b,I)}getImage(b){return this.imageManager.getImage(b)}removeImage(b){if(!this.getImage(b))return this.fire(new i.j(new Error(`An image named "${b}" does not exist.`)));this.imageManager.removeImage(b),this._afterImageUpdated(b)}_afterImageUpdated(b){this._availableImages=this.imageManager.listImages(),this._changedImages[b]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(b,I,G={}){if(this._checkLoaded(),this.sourceCaches[b]!==void 0)throw new Error(`Source "${b}" already exists.`);if(!I.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(I).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(I.type)>=0&&this._validate(i.u.source,`sources.${b}`,I,null,G))return;this.map&&this.map._collectResourceTiming&&(I.collectResourceTiming=!0);let H=this.sourceCaches[b]=new We(b,I,this.dispatcher);H.style=this,H.setEventedParent(this,(()=>({isSourceLoaded:H.loaded(),source:H.serialize(),sourceId:b}))),H.onAdd(this.map),this._changed=!0}removeSource(b){if(this._checkLoaded(),this.sourceCaches[b]===void 0)throw new Error("There is no source with this ID");for(let G in this._layers)if(this._layers[G].source===b)return this.fire(new i.j(new Error(`Source "${b}" cannot be removed while layer "${G}" is using it.`)));let I=this.sourceCaches[b];delete this.sourceCaches[b],delete this._updatedSources[b],I.fire(new i.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:b})),I.setEventedParent(null),I.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(b,I){if(this._checkLoaded(),this.sourceCaches[b]===void 0)throw new Error(`There is no source with this ID=${b}`);let G=this.sourceCaches[b].getSource();if(G.type!=="geojson")throw new Error(`geojsonSource.type is ${G.type}, which is !== 'geojson`);G.setData(I),this._changed=!0}getSource(b){return this.sourceCaches[b]&&this.sourceCaches[b].getSource()}addLayer(b,I,G={}){this._checkLoaded();let H=b.id;if(this.getLayer(H))return void this.fire(new i.j(new Error(`Layer "${H}" already exists on this map.`)));let $;if(b.type==="custom"){if(Ni(this,i.aD(b)))return;$=i.aA(b)}else{if("source"in b&&typeof b.source=="object"&&(this.addSource(H,b.source),b=i.aB(b),b=i.e(b,{source:H})),this._validate(i.u.layer,`layers.${H}`,b,{arrayIndex:-1},G))return;$=i.aA(b),this._validateLayer($),$.setEventedParent(this,{layer:{id:H}})}let xe=I?this._order.indexOf(I):this._order.length;if(I&&xe===-1)this.fire(new i.j(new Error(`Cannot add layer "${H}" before non-existing layer "${I}".`)));else{if(this._order.splice(xe,0,H),this._layerOrderChanged=!0,this._layers[H]=$,this._removedLayers[H]&&$.source&&$.type!=="custom"){let ke=this._removedLayers[H];delete this._removedLayers[H],ke.type!==$.type?this._updatedSources[$.source]="clear":(this._updatedSources[$.source]="reload",this.sourceCaches[$.source].pause())}this._updateLayer($),$.onAdd&&$.onAdd(this.map)}}moveLayer(b,I){if(this._checkLoaded(),this._changed=!0,!this._layers[b])return void this.fire(new i.j(new Error(`The layer '${b}' does not exist in the map's style and cannot be moved.`)));if(b===I)return;let G=this._order.indexOf(b);this._order.splice(G,1);let H=I?this._order.indexOf(I):this._order.length;I&&H===-1?this.fire(new i.j(new Error(`Cannot move layer "${b}" before non-existing layer "${I}".`))):(this._order.splice(H,0,b),this._layerOrderChanged=!0)}removeLayer(b){this._checkLoaded();let I=this._layers[b];if(!I)return void this.fire(new i.j(new Error(`Cannot remove non-existing layer "${b}".`)));I.setEventedParent(null);let G=this._order.indexOf(b);this._order.splice(G,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[b]=I,delete this._layers[b],this._serializedLayers&&delete this._serializedLayers[b],delete this._updatedLayers[b],delete this._updatedPaintProps[b],I.onRemove&&I.onRemove(this.map)}getLayer(b){return this._layers[b]}getLayersOrder(){return[...this._order]}hasLayer(b){return b in this._layers}setLayerZoomRange(b,I,G){this._checkLoaded();let H=this.getLayer(b);H?H.minzoom===I&&H.maxzoom===G||(I!=null&&(H.minzoom=I),G!=null&&(H.maxzoom=G),this._updateLayer(H)):this.fire(new i.j(new Error(`Cannot set the zoom range of non-existing layer "${b}".`)))}setFilter(b,I,G={}){this._checkLoaded();let H=this.getLayer(b);if(H){if(!i.aE(H.filter,I))return I==null?(H.filter=void 0,void this._updateLayer(H)):void(this._validate(i.u.filter,`layers.${H.id}.filter`,I,null,G)||(H.filter=i.aB(I),this._updateLayer(H)))}else this.fire(new i.j(new Error(`Cannot filter non-existing layer "${b}".`)))}getFilter(b){return i.aB(this.getLayer(b).filter)}setLayoutProperty(b,I,G,H={}){this._checkLoaded();let $=this.getLayer(b);$?i.aE($.getLayoutProperty(I),G)||($.setLayoutProperty(I,G,H),this._updateLayer($)):this.fire(new i.j(new Error(`Cannot style non-existing layer "${b}".`)))}getLayoutProperty(b,I){let G=this.getLayer(b);if(G)return G.getLayoutProperty(I);this.fire(new i.j(new Error(`Cannot get style of non-existing layer "${b}".`)))}setPaintProperty(b,I,G,H={}){this._checkLoaded();let $=this.getLayer(b);$?i.aE($.getPaintProperty(I),G)||($.setPaintProperty(I,G,H)&&this._updateLayer($),this._changed=!0,this._updatedPaintProps[b]=!0,this._serializedLayers=null):this.fire(new i.j(new Error(`Cannot style non-existing layer "${b}".`)))}getPaintProperty(b,I){return this.getLayer(b).getPaintProperty(I)}setFeatureState(b,I){this._checkLoaded();let G=b.source,H=b.sourceLayer,$=this.sourceCaches[G];if($===void 0)return void this.fire(new i.j(new Error(`The source '${G}' does not exist in the map's style.`)));let xe=$.getSource().type;xe==="geojson"&&H?this.fire(new i.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):xe!=="vector"||H?(b.id===void 0&&this.fire(new i.j(new Error("The feature id parameter must be provided."))),$.setFeatureState(H,b.id,I)):this.fire(new i.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(b,I){this._checkLoaded();let G=b.source,H=this.sourceCaches[G];if(H===void 0)return void this.fire(new i.j(new Error(`The source '${G}' does not exist in the map's style.`)));let $=H.getSource().type,xe=$==="vector"?b.sourceLayer:void 0;$!=="vector"||xe?I&&typeof b.id!="string"&&typeof b.id!="number"?this.fire(new i.j(new Error("A feature id is required to remove its specific state property."))):H.removeFeatureState(xe,b.id,I):this.fire(new i.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(b){this._checkLoaded();let I=b.source,G=b.sourceLayer,H=this.sourceCaches[I];if(H!==void 0)return H.getSource().type!=="vector"||G?(b.id===void 0&&this.fire(new i.j(new Error("The feature id parameter must be provided."))),H.getFeatureState(G,b.id)):void this.fire(new i.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new i.j(new Error(`The source '${I}' does not exist in the map's style.`)))}getTransition(){return i.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let b=i.aF(this.sourceCaches,($=>$.serialize())),I=this._serializeByIds(this._order,!0),G=this.map.getTerrain()||void 0,H=this.stylesheet;return i.aG({version:H.version,name:H.name,metadata:H.metadata,light:H.light,sky:H.sky,center:H.center,zoom:H.zoom,bearing:H.bearing,pitch:H.pitch,sprite:H.sprite,glyphs:H.glyphs,transition:H.transition,sources:b,layers:I,terrain:G},($=>$!==void 0))}_updateLayer(b){this._updatedLayers[b.id]=!0,b.source&&!this._updatedSources[b.source]&&this.sourceCaches[b.source].getSource().type!=="raster"&&(this._updatedSources[b.source]="reload",this.sourceCaches[b.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(b){let I=xe=>this._layers[xe].type==="fill-extrusion",G={},H=[];for(let xe=this._order.length-1;xe>=0;xe--){let ke=this._order[xe];if(I(ke)){G[ke]=xe;for(let Ne of b){let et=Ne[ke];if(et)for(let bt of et)H.push(bt)}}}H.sort(((xe,ke)=>ke.intersectionZ-xe.intersectionZ));let $=[];for(let xe=this._order.length-1;xe>=0;xe--){let ke=this._order[xe];if(I(ke))for(let Ne=H.length-1;Ne>=0;Ne--){let et=H[Ne].feature;if(G[et.layer.id]{let Ft=be.featureSortOrder;if(Ft){let Ot=Ft.indexOf(gt.featureIndex);return Ft.indexOf(Mt.featureIndex)-Ot}return Mt.featureIndex-gt.featureIndex}));for(let gt of ut)Be.push(gt)}}for(let be in Q)Q[be].forEach((De=>{let Se=De.feature,Be=et[ke[be].source].getFeatureState(Se.layer["source-layer"],Se.id);Se.source=Se.layer.source,Se.layer["source-layer"]&&(Se.sourceLayer=Se.layer["source-layer"]),Se.state=Be}));return Q})(this._layers,xe,this.sourceCaches,b,I,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures($)}querySourceFeatures(b,I){I&&I.filter&&this._validate(i.u.filter,"querySourceFeatures.filter",I.filter,null,I);let G=this.sourceCaches[b];return G?(function(H,$){let xe=H.getRenderableIds().map((et=>H.getTileByID(et))),ke=[],Ne={};for(let et=0;etzt.getTileByID(Yt))).sort(((Yt,Q)=>Q.tileID.overscaledZ-Yt.tileID.overscaledZ||(Yt.tileID.isLessThan(Q.tileID)?-1:1)))}let Tt=this.crossTileSymbolIndex.addLayer(bt,Ne[bt.source],b.center.lng);xe=xe||Tt}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),(($=$||this._layerOrderChanged||G===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(u.now(),b.zoom))&&(this.pauseablePlacement=new Xo(b,this.map.terrain,this._order,$,I,G,H,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ne),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(u.now()),ke=!0),xe&&this.pauseablePlacement.placement.setStale()),ke||xe)for(let et of this._order){let bt=this._layers[et];bt.type==="symbol"&&this.placement.updateLayerOpacities(bt,Ne[bt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(u.now())}_releaseSymbolFadeTiles(){for(let b in this.sourceCaches)this.sourceCaches[b].releaseSymbolFadeTiles()}getImages(b,I){return i._(this,void 0,void 0,(function*(){let G=yield this.imageManager.getImages(I.icons);this._updateTilesForChangedImages();let H=this.sourceCaches[I.source];return H&&H.setDependencies(I.tileID.key,I.type,I.icons),G}))}getGlyphs(b,I){return i._(this,void 0,void 0,(function*(){let G=yield this.glyphManager.getGlyphs(I.stacks),H=this.sourceCaches[I.source];return H&&H.setDependencies(I.tileID.key,I.type,[""]),G}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(b,I={}){this._checkLoaded(),b&&this._validate(i.u.glyphs,"glyphs",b,null,I)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=b,this.glyphManager.entries={},this.glyphManager.setURL(b))}addSprite(b,I,G={},H){this._checkLoaded();let $=[{id:b,url:I}],xe=[...S(this.stylesheet.sprite),...$];this._validate(i.u.sprite,"sprite",xe,null,G)||(this.stylesheet.sprite=xe,this._loadSprite($,!0,H))}removeSprite(b){this._checkLoaded();let I=S(this.stylesheet.sprite);if(I.find((G=>G.id===b))){if(this._spritesImagesIds[b])for(let G of this._spritesImagesIds[b])this.imageManager.removeImage(G),this._changedImages[G]=!0;I.splice(I.findIndex((G=>G.id===b)),1),this.stylesheet.sprite=I.length>0?I:void 0,delete this._spritesImagesIds[b],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.k("data",{dataType:"style"}))}else this.fire(new i.j(new Error(`Sprite "${b}" doesn't exists on this map.`)))}getSprite(){return S(this.stylesheet.sprite)}setSprite(b,I={},G){this._checkLoaded(),b&&this._validate(i.u.sprite,"sprite",b,null,I)||(this.stylesheet.sprite=b,b?this._loadSprite(b,!0,G):(this._unloadSprite(),G&&G(null)))}}var Pi=i.Y([{name:"a_pos",type:"Int16",components:2}]);let ia={prelude:rt(`#ifdef GL_ES +{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}});var Jje=fe((YAr,Kje)=>{"use strict";Kje.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}});var zy=fe((XAr,nWe)=>{"use strict";var jer=(bx(),Gs(_x)).default,Wer=$je(),Yer=Jje(),Xer='\xA9 OpenStreetMap contributors',Qje="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",eWe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",QF="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",Zer="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",$er="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",Ker="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",rWe={basic:QF,streets:QF,outdoors:QF,light:Qje,dark:eWe,satellite:Yer,"satellite-streets":Wer,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:Xer,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":Qje,"carto-darkmatter":eWe,"carto-voyager":QF,"carto-positron-nolabels":Zer,"carto-darkmatter-nolabels":$er,"carto-voyager-nolabels":Ker},tWe=jer(rWe);nWe.exports={styleValueDflt:"basic",stylesMap:rWe,styleValuesMap:tWe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",tWe.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}});var ZM=fe((ZAr,lWe)=>{"use strict";var iWe=Xt(),aWe=ni().defaultLine,Jer=nl().attributes,Qer=Ds(),etr=Ol().textposition,ttr=rl().overrideAll,rtr=Mo().templatedArray,oWe=zy(),sWe=Qer({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});sWe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var ntr=lWe.exports=ttr({_arrayAttrRegexps:[iWe.counterRegex("map",".layers",!0)],domain:Jer({name:"map"}),style:{valType:"any",values:oWe.styleValuesMap,dflt:oWe.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:rtr("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:aWe},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:aWe}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:sWe,textposition:iWe.extendFlat({},etr,{arrayOk:!1})}})},"plot","from-root");ntr.uirevision={valType:"any",editType:"none"}});var eD=fe(($Ar,hWe)=>{"use strict";var{hovertemplateAttrs:itr,texttemplateAttrs:atr,templatefallbackAttrs:uWe}=Oo(),otr=n1(),$M=a5(),C5=Ol(),cWe=ZM(),str=Ho(),ltr=_s(),p_=ta().extendFlat,utr=rl().overrideAll,ctr=ZM(),fWe=$M.line,L5=$M.marker;hWe.exports=utr({lon:$M.lon,lat:$M.lat,cluster:{enabled:{valType:"boolean"},maxzoom:p_({},ctr.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:p_({},L5.opacity,{dflt:1})},mode:p_({},C5.mode,{dflt:"markers"}),text:p_({},C5.text,{}),texttemplate:atr({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:uWe({editType:"plot"}),hovertext:p_({},C5.hovertext,{}),line:{color:fWe.color,width:fWe.width},connectgaps:C5.connectgaps,marker:p_({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:L5.opacity,size:L5.size,sizeref:L5.sizeref,sizemin:L5.sizemin,sizemode:L5.sizemode},ltr("marker")),fill:$M.fill,fillcolor:otr(),textfont:cWe.layers.symbol.textfont,textposition:cWe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:C5.selected.marker},unselected:{marker:C5.unselected.marker},hoverinfo:p_({},str.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:itr(),hovertemplatefallback:uWe()},"calc","nested")});var nK=fe((KAr,dWe)=>{"use strict";var ftr=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];dWe.exports={isSupportedFont:function(e){return ftr.indexOf(e)!==-1}}});var gWe=fe((JAr,pWe)=>{"use strict";var KM=Xt(),iK=Is(),htr=vv(),dtr=lp(),vtr=up(),ptr=a1(),vWe=eD(),gtr=nK().isSupportedFont;pWe.exports=function(t,r,n,a){function i(y,C){return KM.coerce(t,r,vWe,y,C)}function o(y,C){return KM.coerce2(t,r,vWe,y,C)}var s=mtr(t,r,i);if(!s){r.visible=!1;return}if(i("text"),i("texttemplate"),i("texttemplatefallback"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("mode"),i("below"),iK.hasMarkers(r)){htr(t,r,n,a,i,{noLine:!0,noAngle:!0}),i("marker.allowoverlap"),i("marker.angle");var l=r.marker;l.symbol!=="circle"&&(KM.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),KM.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}iK.hasLines(r)&&(dtr(t,r,n,a,i,{noDash:!0}),i("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),v=o("cluster.size"),g=o("cluster.opacity"),p=u!==!1||c!==!1||f!==!1||v!==!1||g!==!1,x=i("cluster.enabled",p);if(x||iK.hasText(r)){var _=a.font.family;vtr(t,r,a,i,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:gtr(_)?_:"Open Sans Regular",weight:a.font.weight,style:a.font.style,size:a.font.size,color:a.font.color}})}i("fill"),r.fill!=="none"&&ptr(t,r,n,i),KM.coerceSelectionMarkerOpacity(r,i)};function mtr(e,t,r){var n=r("lon")||[],a=r("lat")||[],i=Math.min(n.length,a.length);return t._length=i,i}});var aK=fe((QAr,yWe)=>{"use strict";var mWe=Yi();yWe.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot,o=i.mockAxis,s=t.lonlat;return a.lonLabel=mWe.tickText(o,o.c2l(s[0]),!0).text,a.latLabel=mWe.tickText(o,o.c2l(s[1]),!0).text,a}});var oK=fe((e6r,_We)=>{"use strict";var xWe=Xt();_We.exports=function(t,r){var n=t.split(" "),a=n[0],i=n[1],o=xWe.isArrayOrTypedArray(r)?xWe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(a){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(i){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var SWe=fe((t6r,MWe)=>{"use strict";var TWe=aa(),nh=Xt(),ytr=Wa().BADNUM,rD=cM(),bWe=js(),xtr=ea(),_tr=lT(),nD=Is(),btr=nK().isSupportedFont,wtr=oK(),Ttr=Sd().appendArrayPointValue,Atr=as().NEWLINES,Mtr=as().BR_TAG_ALL;MWe.exports=function(t,r){var n=r[0].trace,a=n.visible===!0&&n._length!==0,i=n.fill!=="none",o=nD.hasLines(n),s=nD.hasMarkers(n),l=nD.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,v=tD("fill"),g=tD("line"),p=tD("circle"),x=tD("symbol"),_={fill:v,line:g,circle:p,symbol:x};if(!a)return _;var y;if((i||o)&&(y=rD.calcTraceToLineCoords(r)),i&&(v.geojson=rD.makePolygon(y),v.layout.visibility="visible",nh.extendFlat(v.paint,{"fill-color":n.fillcolor})),o&&(g.geojson=rD.makeLine(y),g.layout.visibility="visible",nh.extendFlat(g.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var C=Str(r);p.geojson=C.geojson,p.layout.visibility="visible",f&&(p.filter=["!",["has","point_count"]],_.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":lK(n.cluster.color,n.cluster.step),"circle-radius":lK(n.cluster.size,n.cluster.step),"circle-opacity":lK(n.cluster.opacity,n.cluster.step)}},_.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":wWe(n),"text-size":12}}),nh.extendFlat(p.paint,{"circle-color":C.mcc,"circle-radius":C.mrc,"circle-opacity":C.mo})}if(u&&f&&(p.filter=["!",["has","point_count"]]),(c||l)&&(x.geojson=Etr(r,t),nh.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),c&&(nh.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&nh.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,nh.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color,"icon-halo-color":n.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),l)){var k=(n.marker||{}).size,S=wtr(n.textposition,k);nh.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":S.anchor,"text-offset":S.offset,"text-font":wWe(n)}),nh.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return _};function tD(e){return{type:e,geojson:rD.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function Str(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,a=nh.isArrayOrTypedArray(r.color),i=nh.isArrayOrTypedArray(r.size),o=nh.isArrayOrTypedArray(r.opacity),s;function l(k){return t.opacity*k}function u(k){return k/2}var c;a&&(bWe.hasColorscale(t,"marker")?c=bWe.makeColorScaleFuncFromTrace(r):c=nh.identity);var f;i&&(f=_tr(t));var v;o&&(v=function(k){var S=TWe(k)?+nh.constrain(k,0,1):0;return l(S)});var g=[];for(s=0;s850?s+=" Black":a>750?s+=" Extra Bold":a>650?s+=" Bold":a>550?s+=" Semi Bold":a>450?s+=" Medium":a>350?s+=" Regular":a>250?s+=" Light":a>150?s+=" Extra Light":s+=" Thin"):i.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",a>750?s+=" Extrabold":a>650?s+=" Bold":a>550?s+=" Semibold":a>350?s+=" Regular":s+=" Light"):i.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",i[3]==="CJK"&&(s+=" CJK"),s+=a>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),btr(s)||(s=r);var l=s.split(", ");return l}});var LWe=fe((r6r,CWe)=>{"use strict";var ktr=Xt(),EWe=SWe(),P5=zy().traceLayerPrefix,zv={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function kWe(e,t,r,n){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:P5+t+"-fill",line:P5+t+"-line",circle:P5+t+"-circle",symbol:P5+t+"-symbol",cluster:P5+t+"-cluster",clusterCount:P5+t+"-cluster-count"},this.below=null}var JM=kWe.prototype;JM.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&ktr.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[e]);a?a.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};JM.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};JM.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var a=this.layerIds[e],i,o=this.subplot.getMapLayers(),s=0;s=0;L--){var w=S[L];a.removeLayer(u.layerIds[w])}k||a.removeSource(u.sourceIds.circle)}function v(k){for(var S=zv.nonCluster,L=0;L=0;L--){var w=S[L];a.removeLayer(u.layerIds[w]),k||a.removeSource(u.sourceIds[w])}}function p(k){l?f(k):g(k)}function x(k){s?c(k):v(k)}function _(){for(var k=s?zv.cluster:zv.nonCluster,S=0;S=0;n--){var a=r[n];t.removeLayer(this.layerIds[a]),t.removeSource(this.sourceIds[a])}};CWe.exports=function(t,r){var n=r[0].trace,a=n.cluster&&n.cluster.enabled,i=n.visible!==!0,o=new kWe(t,n.uid,a,i),s=EWe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(a)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var Ctr=kl(),uK=Xt(),Ltr=_3(),Ptr=uK.fillText,Ftr=Wa().BADNUM,Dtr=zy().traceLayerPrefix;function Rtr(e,t,r){var n=e.cd,a=n[0].trace,i=e.xa,o=e.ya,s=e.subplot,l=[],u=Dtr+a.uid+"-circle",c=a.cluster&&a.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(T){return T.id})}var v=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),g=v*360,p=t-g;function x(T){var m=T.lonlat;if(m[0]===Ftr||c&&l.indexOf(T.i+1)===-1)return 1/0;var F=uK.modHalf(m[0],360),E=m[1],I=s.project([F,E]),R=I.x-i.c2p([p,E]),B=I.y-o.c2p([F,r]),O=Math.max(3,T.mrc||0);return Math.max(Math.sqrt(R*R+B*B)-O,1-3/O)}if(Ctr.getClosest(n,x,e),e.index!==!1){var _=n[e.index],y=_.lonlat,C=[uK.modHalf(y[0],360)+g,y[1]],k=i.c2p(C),S=o.c2p(C),L=_.mrc||1;e.x0=k-L,e.x1=k+L,e.y0=S-L,e.y1=S+L;var w={};w[a.subplot]={_subplot:s};var A=a._module.formatLabels(_,a,w);return e.lonLabel=A.lonLabel,e.latLabel=A.latLabel,e.color=Ltr(a,_),e.extraText=PWe(a,_,n[0].t.labels),e.hovertemplate=a.hovertemplate,[e]}}function PWe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,a=n.split("+"),i=a.indexOf("all")!==-1,o=a.indexOf("lon")!==-1,s=a.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return i||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(i||a.indexOf("text")!==-1)&&Ptr(t,e,u),u.join("
")}FWe.exports={hoverPoints:Rtr,getExtraText:PWe}});var RWe=fe((i6r,DWe)=>{"use strict";DWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var zWe=fe((a6r,IWe)=>{"use strict";var Itr=Xt(),ztr=Is(),{BADNUM:qtr}=Wa();IWe.exports=function(t,r){var c;let{cd:n,xaxis:a,yaxis:i}=t,{trace:o}=n[0];if(!ztr.hasMarkers(o))return[];if(r===!1){for(let f of n)f.selected=0;return[]}let s=(c=a._subplot)==null?void 0:c.map,l=s!=null&&s.getRenderWorldCopies()&&r.xmax>r.xmin?s.transform.worldSize:0,u=[];for(let f=0;f{(function(e,t){typeof cK=="object"&&typeof fK!="undefined"?fK.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(cK,(function(){"use strict";var e={},t={};function r(a,i,o){if(t[a]=o,a==="index"){var s="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",l={};return t.shared(l),t.index(e,l),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],(function(a){"use strict";function i(M,h,b,D){return new(b||(b=Promise))((function(z,G){function X(Q){try{re(D.next(Q))}catch(he){G(he)}}function Z(Q){try{re(D.throw(Q))}catch(he){G(he)}}function re(Q){var he;Q.done?z(Q.value):(he=Q.value,he instanceof b?he:new b((function(oe){oe(he)}))).then(X,Z)}re((D=D.apply(M,h||[])).next())}))}function o(M,h){this.x=M,this.y=h}function s(M){return M&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M}var l,u;typeof SuppressedError=="function"&&SuppressedError,o.prototype={clone(){return new o(this.x,this.y)},add(M){return this.clone()._add(M)},sub(M){return this.clone()._sub(M)},multByPoint(M){return this.clone()._multByPoint(M)},divByPoint(M){return this.clone()._divByPoint(M)},mult(M){return this.clone()._mult(M)},div(M){return this.clone()._div(M)},rotate(M){return this.clone()._rotate(M)},rotateAround(M,h){return this.clone()._rotateAround(M,h)},matMult(M){return this.clone()._matMult(M)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(M){return this.x===M.x&&this.y===M.y},dist(M){return Math.sqrt(this.distSqr(M))},distSqr(M){let h=M.x-this.x,b=M.y-this.y;return h*h+b*b},angle(){return Math.atan2(this.y,this.x)},angleTo(M){return Math.atan2(this.y-M.y,this.x-M.x)},angleWith(M){return this.angleWithSep(M.x,M.y)},angleWithSep(M,h){return Math.atan2(this.x*h-this.y*M,this.x*M+this.y*h)},_matMult(M){let h=M[2]*this.x+M[3]*this.y;return this.x=M[0]*this.x+M[1]*this.y,this.y=h,this},_add(M){return this.x+=M.x,this.y+=M.y,this},_sub(M){return this.x-=M.x,this.y-=M.y,this},_mult(M){return this.x*=M,this.y*=M,this},_div(M){return this.x/=M,this.y/=M,this},_multByPoint(M){return this.x*=M.x,this.y*=M.y,this},_divByPoint(M){return this.x/=M.x,this.y/=M.y,this},_unit(){return this._div(this.mag()),this},_perp(){let M=this.y;return this.y=this.x,this.x=-M,this},_rotate(M){let h=Math.cos(M),b=Math.sin(M),D=b*this.x+h*this.y;return this.x=h*this.x-b*this.y,this.y=D,this},_rotateAround(M,h){let b=Math.cos(M),D=Math.sin(M),z=h.y+D*(this.x-h.x)+b*(this.y-h.y);return this.x=h.x+b*(this.x-h.x)-D*(this.y-h.y),this.y=z,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:o},o.convert=function(M){if(M instanceof o)return M;if(Array.isArray(M))return new o(+M[0],+M[1]);if(M.x!==void 0&&M.y!==void 0)return new o(+M.x,+M.y);throw new Error("Expected [x, y] or {x, y} point format")};var c=(function(){if(u)return l;function M(h,b,D,z){this.cx=3*h,this.bx=3*(D-h)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*b,this.by=3*(z-b)-this.cy,this.ay=1-this.cy-this.by,this.p1x=h,this.p1y=b,this.p2x=D,this.p2y=z}return u=1,l=M,M.prototype={sampleCurveX:function(h){return((this.ax*h+this.bx)*h+this.cx)*h},sampleCurveY:function(h){return((this.ay*h+this.by)*h+this.cy)*h},sampleCurveDerivativeX:function(h){return(3*this.ax*h+2*this.bx)*h+this.cx},solveCurveX:function(h,b){if(b===void 0&&(b=1e-6),h<0)return 0;if(h>1)return 1;for(var D=h,z=0;z<8;z++){var G=this.sampleCurveX(D)-h;if(Math.abs(G)G?Z=D:re=D,D=.5*(re-Z)+Z;return D},solve:function(h,b){return this.sampleCurveY(this.solveCurveX(h,b))}},l})(),f=s(c);let v,g;function p(){return v!=null||(v=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),v}function x(){if(g==null&&(g=!1,p())){let h=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(h){for(let D=0;D<25;D++){let z=4*D;h.fillStyle=`rgb(${z},${z+1},${z+2})`,h.fillRect(D%5,Math.floor(D/5),1,1)}let b=h.getImageData(0,0,5,5).data;for(let D=0;D<100;D++)if(D%4!=3&&b[D]!==D){g=!0;break}}}return g||!1}var _=1e-6,y=typeof Float32Array!="undefined"?Float32Array:Array;function C(){var M=new y(9);return y!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[5]=0,M[6]=0,M[7]=0),M[0]=1,M[4]=1,M[8]=1,M}function k(M){return M[0]=1,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=1,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=1,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function S(){var M=new y(3);return y!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0),M}function L(M){var h=M[0],b=M[1],D=M[2];return Math.sqrt(h*h+b*b+D*D)}function w(M,h,b){var D=new y(3);return D[0]=M,D[1]=h,D[2]=b,D}function A(M,h,b){return M[0]=h[0]+b[0],M[1]=h[1]+b[1],M[2]=h[2]+b[2],M}function T(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M[2]=h[2]*b,M}function m(M,h,b){var D=h[0],z=h[1],G=h[2],X=b[0],Z=b[1],re=b[2];return M[0]=z*re-G*Z,M[1]=G*X-D*re,M[2]=D*Z-z*X,M}var F,E=L;function I(M,h,b){var D=h[0],z=h[1],G=h[2],X=h[3];return M[0]=b[0]*D+b[4]*z+b[8]*G+b[12]*X,M[1]=b[1]*D+b[5]*z+b[9]*G+b[13]*X,M[2]=b[2]*D+b[6]*z+b[10]*G+b[14]*X,M[3]=b[3]*D+b[7]*z+b[11]*G+b[15]*X,M}function R(){var M=new y(4);return y!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0),M[3]=1,M}function B(M,h,b,D){var z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",G=Math.PI/360;h*=G,D*=G,b*=G;var X=Math.sin(h),Z=Math.cos(h),re=Math.sin(b),Q=Math.cos(b),he=Math.sin(D),oe=Math.cos(D);switch(z){case"xyz":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"xzy":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe+X*re*he;break;case"yxz":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe+X*re*he;break;case"yzx":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"zxy":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"zyx":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe+X*re*he;break;default:throw new Error("Unknown angle order "+z)}return M}function O(){var M=new y(2);return y!=Float32Array&&(M[0]=0,M[1]=0),M}function V(M,h){var b=new y(2);return b[0]=M,b[1]=h,b}S(),F=new y(4),y!=Float32Array&&(F[0]=0,F[1]=0,F[2]=0,F[3]=0),S(),w(1,0,0),w(0,1,0),R(),R(),C(),O();let j=8192;function q(M,h,b){return h*(j/(M.tileSize*Math.pow(2,b-M.tileID.overscaledZ)))}function U(M){return M instanceof Error?M:new Error(typeof M=="string"?M:String(M))}function J(M,h){return(M%h+h)%h}function ee(M,h,b){return M*(1-b)+h*b}function ce(M){if(M<=0)return 0;if(M>=1)return 1;let h=M*M,b=h*M;return 4*(M<.5?b:3*(M-h)+b-.75)}function ye(M,h,b,D){let z=new f(M,h,b,D);return G=>z.solve(G)}let xe=ye(.25,.1,.25,1);function ue(M,h,b){return Math.min(b,Math.max(h,M))}function K(M,h,b){let D=b-h,z=((M-h)%D+D)%D+h;return z===h?b:z}function _e(M,...h){for(let b of h)for(let D in b)M[D]=b[D];return M}let ne=1;function ae(M,h,b){let D={};for(let z in M)D[z]=h.call(this,M[z],z,M);return D}function pe(M,h,b){let D={};for(let z in M)h.call(this,M[z],z,M)&&(D[z]=M[z]);return D}function ie(M){return Array.isArray(M)?M.map(ie):typeof M=="object"&&M?ae(M,ie):M}let le={};function me(M){le[M]||(typeof console!="undefined"&&console.warn(M),le[M]=!0)}function be(M,h,b){return(b.y-M.y)*(h.x-M.x)>(h.y-M.y)*(b.x-M.x)}function De(M){return typeof WorkerGlobalScope!="undefined"&&M!==void 0&&M instanceof WorkerGlobalScope}let Ge=null;function ht(M){return typeof ImageBitmap!="undefined"&&M instanceof ImageBitmap}let it="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Oe(M,h,b,D,z){return i(this,void 0,void 0,(function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let G=new VideoFrame(M,{timestamp:0});try{let X=G==null?void 0:G.format;if(!X||!X.startsWith("BGR")&&!X.startsWith("RGB"))throw new Error(`Unrecognized format ${X}`);let Z=X.startsWith("BGR"),re=new Uint8ClampedArray(D*z*4);if(yield G.copyTo(re,(function(Q,he,oe,ke,ge){let Ue=4*Math.max(-he,0),je=(Math.max(0,oe)-oe)*ke*4+Ue,vt=4*ke,gt=Math.max(0,he),It=Math.max(0,oe);return{rect:{x:gt,y:It,width:Math.min(Q.width,he+ke)-gt,height:Math.min(Q.height,oe+ge)-It},layout:[{offset:je,stride:vt}]}})(M,h,b,D,z)),Z)for(let Q=0;Q{M.removeEventListener(h,b,D)}}}function qe(M){return M*Math.PI/180}function we(M){return M/Math.PI*180}let Le={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Ke={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},Te="AbortError";class Ve extends Error{constructor(h=Te){super(h instanceof Error?h.message:h),this.name=Te,h instanceof Error&&h.stack&&(this.stack=h.stack)}}function $e(M){return M instanceof Error&&M.name===Te}function ot(M){if(M.aborted)throw new Ve(M.reason)}let tt={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function nt(M){return tt.REGISTERED_PROTOCOLS[M.substring(0,M.indexOf("://"))]}let We="global-dispatcher";class mt extends Error{constructor(h,b,D,z){super(`AJAXError: ${b} (${h}): ${D}`),this.status=h,this.statusText=b,this.url=D,this.body=z}}let bt=()=>{var M;return De(self)?(M=self.worker)===null||M===void 0?void 0:M.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},Yt=function(M,h){return i(this,void 0,void 0,(function*(){var b,D;if(M.url.includes("://")&&!/^https?:|^file:/.test(M.url)){let z=nt(M.url);if(z){let G=yield z(M,h);return G.data||M.type!=="arrayBuffer"?G:_e(G,{data:new ArrayBuffer(0)})}if(De(self)&&(!((b=self.worker)===null||b===void 0)&&b.actor))return self.worker.actor.sendAsync({type:"GR",data:M,targetMapId:We},h)}if(!(z=>{var G;return z.startsWith("file:")||((G=bt())===null||G===void 0?void 0:G.startsWith("file:"))&&!/^\w+:/.test(z)})(M.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return(function(z,G){return i(this,void 0,void 0,(function*(){let X=new Request(z.url,{method:z.method||"GET",body:z.body,credentials:z.credentials,headers:z.headers,cache:z.cache,referrer:bt(),referrerPolicy:z.referrerPolicy,signal:G.signal}),Z,re;z.type!=="json"||X.headers.has("Accept")||X.headers.set("Accept","application/json");try{Z=yield fetch(X)}catch(he){throw $e(he)?he:new mt(0,U(he).message,z.url,new Blob)}if(!Z.ok){let he=yield Z.blob();throw new mt(Z.status,Z.statusText,z.url,he)}re=z.type==="arrayBuffer"||z.type==="image"?Z.arrayBuffer():z.type==="json"?Z.json():Z.text();let Q=yield re;return ot(G.signal),{data:Q,cacheControl:Z.headers.get("Cache-Control"),expires:Z.headers.get("Expires"),etag:Z.headers.get("ETag")}}))})(M,h);if(De(self)&&(!((D=self.worker)===null||D===void 0)&&D.actor))return self.worker.actor.sendAsync({type:"GR",data:M,mustQueue:!0,targetMapId:We},h)}return(function(z,G){return new Promise(((X,Z)=>{var re;let Q=new XMLHttpRequest;Q.open(z.method||"GET",z.url,!0),z.type!=="arrayBuffer"&&z.type!=="image"||(Q.responseType="arraybuffer");for(let he in z.headers)Q.setRequestHeader(he,z.headers[he]);z.type==="json"&&(Q.responseType="text",!((re=z.headers)===null||re===void 0)&&re.Accept||Q.setRequestHeader("Accept","application/json")),Q.withCredentials=z.credentials==="include",Q.onerror=()=>{Z(new Error(Q.statusText))},Q.onload=()=>{if(!G.signal.aborted)if((Q.status>=200&&Q.status<300||Q.status===0)&&Q.response!==null){let he=Q.response;if(z.type==="json")try{he=JSON.parse(Q.response)}catch(oe){return void Z(oe)}X({data:he,cacheControl:Q.getResponseHeader("Cache-Control"),expires:Q.getResponseHeader("Expires"),etag:Q.getResponseHeader("ETag")})}else{let he=new Blob([Q.response],{type:Q.getResponseHeader("Content-Type")});Z(new mt(Q.status,Q.statusText,z.url,he))}},G.signal.addEventListener("abort",(()=>{Q.abort(),Z(new Ve(G.signal.reason))})),Q.send(z.body)}))})(M,h)}))};function jt(M){if(!M||M.indexOf("://")<=0||M.startsWith("data:image/")||M.startsWith("blob:"))return!0;let h=new URL(M),b=window.location;return h.protocol===b.protocol&&h.host===b.host}function mr(M,h,b){var D;!((D=b[M])===null||D===void 0)&&D.includes(h)||(b[M]||(b[M]=[]),b[M].push(h))}function or(M,h,b){if(b!=null&&b[M]){let D=b[M].indexOf(h);D!==-1&&b[M].splice(D,1)}}class fr{constructor(h,b={}){_e(this,b),this.type=h}}class Ot extends fr{constructor(h,b={}){super("error",_e({error:h},b))}}class cr{on(h,b){return this._listeners||(this._listeners={}),mr(h,b,this._listeners),{unsubscribe:()=>{this.off(h,b)}}}off(h,b){return or(h,b,this._listeners),or(h,b,this._oneTimeListeners),this}once(h,b){return b?(this._oneTimeListeners||(this._oneTimeListeners={}),mr(h,b,this._oneTimeListeners),this):new Promise((D=>this.once(h,D)))}fire(h,b){var D,z;typeof h=="string"&&(h=new fr(h,b||{}));let G=h.type;if(this.listens(G)){h.target=this;let X=!((D=this._listeners)===null||D===void 0)&&D[G]?this._listeners[G].slice():[];for(let Q of X)Q.call(this,h);let Z=!((z=this._oneTimeListeners)===null||z===void 0)&&z[G]?this._oneTimeListeners[G].slice():[];for(let Q of Z)or(G,Q,this._oneTimeListeners),Q.call(this,h);let re=this._eventedParent;re&&(_e(h,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),re.fire(h))}else h instanceof Ot&&console.error(h.error);return this}listens(h){var b,D,z,G,X;return((D=(b=this._listeners)===null||b===void 0?void 0:b[h])===null||D===void 0?void 0:D.length)>0||((G=(z=this._oneTimeListeners)===null||z===void 0?void 0:z[h])===null||G===void 0?void 0:G.length)>0||((X=this._eventedParent)===null||X===void 0?void 0:X.listens(h))}setEventedParent(h,b){return this._eventedParent=h,this._eventedParentData=b,this}}var Ct={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,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:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,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:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",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"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let wt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Tt(M,h){let b={};for(let D in M)D!=="ref"&&(b[D]=M[D]);return wt.forEach((D=>{D in h&&(b[D]=h[D])})),b}function Mt(M,h){if(Array.isArray(M)){if(!Array.isArray(h)||M.length!==h.length)return!1;for(let b=0;b`:M.itemType.kind==="value"?"array":`array<${h}>`}return M.kind}let oa=[Dt,At,Vt,Qt,Ut,_r,ri,rn,va(Jr),Jn,Vi,Ii,ra,ha];function Ma(M,h){if(h.kind==="error")return null;if(M.kind==="array"){if(h.kind==="array"&&(h.N===0&&h.itemType.kind==="value"||!Ma(M.itemType,h.itemType))&&(typeof M.N!="number"||M.N===h.N))return null}else{if(M.kind===h.kind)return null;if(M.kind==="value"){for(let b of oa)if(!Ma(b,h))return null}}return`Expected ${Xi(M)} but found ${Xi(h)} instead.`}function Ga(M,h){return h.some((b=>b.kind===M.kind))}function ss(M,h){return h.some((b=>b==="null"?M===null:b==="array"?Array.isArray(M):b==="object"?M&&!Array.isArray(M)&&typeof M=="object":b===typeof M))}function mo(M,h){return M.kind==="array"&&h.kind==="array"?M.itemType.kind===h.itemType.kind&&typeof M.N=="number":M.kind===h.kind}let sl=.96422,Eo=.82521,ao=4/29,Da=6/29,bl=3*Da*Da,bo=Da*Da*Da,Zs=Math.PI/180,su=180/Math.PI;function fc(M){return(M%=360)<0&&(M+=360),M}function Af([M,h,b,D]){let z,G,X=Jt((.2225045*(M=ut(M))+.7168786*(h=ut(h))+.0606169*(b=ut(b)))/1);M===h&&h===b?z=G=X:(z=Jt((.4360747*M+.3850649*h+.1430804*b)/sl),G=Jt((.0139322*M+.0971045*h+.7141733*b)/Eo));let Z=116*X-16;return[Z<0?0:Z,500*(z-X),200*(X-G),D]}function ut(M){return M<=.04045?M/12.92:Math.pow((M+.055)/1.055,2.4)}function Jt(M){return M>bo?Math.pow(M,1/3):M/bl+ao}function er([M,h,b,D]){let z=(M+16)/116,G=isNaN(h)?z:z+h/500,X=isNaN(b)?z:z-b/200;return z=1*nn(z),G=sl*nn(G),X=Eo*nn(X),[wr(3.1338561*G-1.6168667*z-.4906146*X),wr(-.9787684*G+1.9161415*z+.033454*X),wr(.0719453*G-.2289914*z+1.4052427*X),D]}function wr(M){return(M=M<=.00304?12.92*M:1.055*Math.pow(M,1/2.4)-.055)<0?0:M>1?1:M}function nn(M){return M>Da?M*M*M:bl*(M-ao)}let Dr=Object.hasOwn||function(M,h){return Object.prototype.hasOwnProperty.call(M,h)};function bn(M,h){return Dr(M,h)?M[h]:void 0}function Yr(M){return parseInt(M.padEnd(2,M),16)/255}function Tn(M,h){return Kn(h?M/100:M,0,1)}function Kn(M,h,b){return Math.min(Math.max(h,M),b)}function Qn(M){return!M.some(Number.isNaN)}let Ai={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]};function Ji(M,h,b){return M+b*(h-M)}function Ra(M,h,b){return M.map(((D,z)=>Ji(D,h[z],b)))}class ii{constructor(h,b,D,z=1,G=!0){this.r=h,this.g=b,this.b=D,this.a=z,G||(this.r*=z,this.g*=z,this.b*=z,z||this.overwriteGetter("rgb",[h,b,D,z]))}static parse(h){if(h instanceof ii)return h;if(typeof h!="string")return;let b=(function(D){if((D=D.toLowerCase().trim())==="transparent")return[0,0,0,0];let z=bn(Ai,D);if(z){let[X,Z,re]=z;return[X/255,Z/255,re/255,1]}if(D.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(D)){let X=D.length<6?1:2,Z=1;return[Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+X)||"ff")]}if(D.startsWith("rgb")){let X=D.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(X){let[Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It]=X,_t=[he||" ",ge||" ",vt].join("");if(_t===" "||_t===" /"||_t===",,"||_t===",,,"){let qt=[Q,ke,je].join(""),tr=qt==="%%%"?100:qt===""?255:0;if(tr){let lr=[Kn(+re/tr,0,1),Kn(+oe/tr,0,1),Kn(+Ue/tr,0,1),gt?Tn(+gt,It):1];if(Qn(lr))return lr}}return}}let G=D.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(G){let[X,Z,re,Q,he,oe,ke,ge,Ue]=G,je=[re||" ",he||" ",ke].join("");if(je===" "||je===" /"||je===",,"||je===",,,"){let vt=[+Z,Kn(+Q,0,100),Kn(+oe,0,100),ge?Tn(+ge,Ue):1];if(Qn(vt))return(function([gt,It,_t,qt]){function tr(lr){let qr=(lr+gt/30)%12,jr=It*Math.min(_t,1-_t);return _t-jr*Math.max(-1,Math.min(qr-3,9-qr,1))}return gt=fc(gt),It/=100,_t/=100,[tr(0),tr(8),tr(4),qt]})(vt)}}})(h);return b?new ii(...b,!1):void 0}get rgb(){let{r:h,g:b,b:D,a:z}=this,G=z||1/0;return this.overwriteGetter("rgb",[h/G,b/G,D/G,z])}get hcl(){return this.overwriteGetter("hcl",(function(h){let[b,D,z,G]=Af(h),X=Math.sqrt(D*D+z*z);return[Math.round(1e4*X)?fc(Math.atan2(z,D)*su):NaN,X,b,G]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Af(this.rgb))}overwriteGetter(h,b){return Object.defineProperty(this,h,{value:b}),b}toString(){let[h,b,D,z]=this.rgb;return`rgba(${[h,b,D].map((G=>Math.round(255*G))).join(",")},${z})`}static interpolate(h,b,D,z="rgb"){switch(z){case"rgb":{let[G,X,Z,re]=Ra(h.rgb,b.rgb,D);return new ii(G,X,Z,re,!1)}case"hcl":{let[G,X,Z,re]=h.hcl,[Q,he,oe,ke]=b.hcl,ge,Ue;if(isNaN(G)||isNaN(Q))isNaN(G)?isNaN(Q)?ge=NaN:(ge=Q,Z!==1&&Z!==0||(Ue=he)):(ge=G,oe!==1&&oe!==0||(Ue=X));else{let _t=Q-G;Q>G&&_t>180?_t-=360:Q180&&(_t+=360),ge=G+D*_t}let[je,vt,gt,It]=(function([_t,qt,tr,lr]){return _t=isNaN(_t)?0:_t*Zs,er([tr,Math.cos(_t)*qt,Math.sin(_t)*qt,lr])})([ge,Ue!=null?Ue:Ji(X,he,D),Ji(Z,oe,D),Ji(re,ke,D)]);return new ii(je,vt,gt,It,!1)}case"lab":{let[G,X,Z,re]=er(Ra(h.lab,b.lab,D));return new ii(G,X,Z,re,!1)}}}}ii.black=new ii(0,0,0,1),ii.white=new ii(1,1,1,1),ii.transparent=new ii(0,0,0,0),ii.red=new ii(1,0,0,1);class Za{constructor(h,b,D){this.sensitivity=h?b?"variant":"case":b?"accent":"base",this.locale=D,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(h,b){return this.collator.compare(h,b)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let ja=["bottom","center","top"];class qo{constructor(h,b,D,z,G,X){this.text=h,this.image=b,this.scale=D,this.fontStack=z,this.textColor=G,this.verticalAlign=X}}class $a{constructor(h){this.sections=h}static fromString(h){return new $a([new qo(h,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some((h=>h.text.length!==0||h.image&&h.image.name.length!==0))}static factory(h){return h instanceof $a?h:$a.fromString(h)}toString(){return this.sections.length===0?"":this.sections.map((h=>h.text)).join("")}}class Ka{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Ka)return h;if(typeof h=="number")return new Ka([h,h,h,h]);if(Array.isArray(h)&&!(h.length<1||h.length>4)){for(let b of h)if(typeof b!="number")return;switch(h.length){case 1:h=[h[0],h[0],h[0],h[0]];break;case 2:h=[h[0],h[1],h[0],h[1]];break;case 3:h=[h[0],h[1],h[2],h[1]]}return new Ka(h)}}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D){return new Ka(Ra(h.values,b.values,D))}}class Oa{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Oa)return h;if(typeof h=="number")return new Oa([h]);if(Array.isArray(h)){for(let b of h)if(typeof b!="number")return;return new Oa(h)}}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D){return new Oa(Ra(h.values,b.values,D))}}class Ni{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Ni)return h;if(typeof h=="string"){let D=ii.parse(h);return D?new Ni([D]):void 0}if(!Array.isArray(h))return;let b=[];for(let D of h){if(typeof D!="string")return;let z=ii.parse(D);if(!z)return;b.push(z)}return new Ni(b)}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D,z="rgb"){let G=[];if(h.values.length!=b.values.length)throw new Error(`colorArray: Arrays have mismatched length (${h.values.length} vs. ${b.values.length}), cannot interpolate.`);for(let X=0;X=0&&M<=255&&typeof h=="number"&&h>=0&&h<=255&&typeof b=="number"&&b>=0&&b<=255?D===void 0||typeof D=="number"&&D>=0&&D<=1?null:`Invalid rgba value [${[M,h,b,D].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof D=="number"?[M,h,b,D]:[M,h,b]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pa(M){if(M===null||typeof M=="string"||typeof M=="boolean"||typeof M=="number"||M instanceof oo||M instanceof ii||M instanceof Za||M instanceof $a||M instanceof Ka||M instanceof Oa||M instanceof Ni||M instanceof yo||M instanceof so)return!0;if(Array.isArray(M)){for(let h of M)if(!pa(h))return!1;return!0}if(typeof M=="object"){for(let h in M)if(!pa(M[h]))return!1;return!0}return!1}function la(M){if(M===null)return Dt;if(typeof M=="string")return Vt;if(typeof M=="boolean")return Qt;if(typeof M=="number")return At;if(M instanceof ii)return Ut;if(M instanceof oo)return _r;if(M instanceof Za)return qn;if(M instanceof $a)return ri;if(M instanceof Ka)return Jn;if(M instanceof Oa)return Vi;if(M instanceof Ni)return Ii;if(M instanceof yo)return ha;if(M instanceof so)return ra;if(Array.isArray(M)){let h=M.length,b;for(let D of M){let z=la(D);if(b){if(b===z)continue;b=Jr;break}b=z}return va(b||Jr,h)}return rn}function As(M){let h=typeof M;return M===null?"":h==="string"||h==="number"||h==="boolean"?String(M):M instanceof ii||M instanceof oo||M instanceof $a||M instanceof Ka||M instanceof Oa||M instanceof Ni||M instanceof yo||M instanceof so?M.toString():JSON.stringify(M)}class Ms{constructor(h,b){this.type=h,this.value=b}static parse(h,b){if(h.length!==2)return b.error(`'literal' expression requires exactly one argument, but found ${h.length-1} instead.`);if(!pa(h[1]))return b.error("invalid value");let D=h[1],z=la(D),G=b.expectedType;return z.kind!=="array"||z.N!==0||!G||G.kind!=="array"||typeof G.N=="number"&&G.N!==0||(z=G),new Ms(z,D)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let xu={string:Vt,number:At,boolean:Qt,object:rn};class rs{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D,z=1,G=h[0];if(G==="array"){let Z,re;if(h.length>2){let Q=h[1];if(typeof Q!="string"||!(Q in xu)||Q==="object")return b.error('The item type argument of "array" must be one of string, number, boolean',1);Z=xu[Q],z++}else Z=Jr;if(h.length>3){if(h[2]!==null&&(typeof h[2]!="number"||h[2]<0||h[2]!==Math.floor(h[2])))return b.error('The length argument to "array" must be a positive integer literal',2);re=h[2],z++}D=va(Z,re)}else{if(!xu[G])throw new Error(`Types doesn't contain name = ${G}`);D=xu[G]}let X=[];for(;zh.outputDefined()))}}let Ls={"to-boolean":Qt,"to-color":Ut,"to-number":At,"to-string":Vt};class $s{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=h[0];if(!Ls[D])throw new Error(`Can't parse ${D} as it is not part of the known types`);if((D==="to-boolean"||D==="to-string")&&h.length!==2)return b.error("Expected one argument.");let z=Ls[D],G=[];for(let X=1;X4?`Invalid rgba value ${JSON.stringify(b)}: expected an array containing either three or four numeric values.`:ko(b[0],b[1],b[2],b[3]),!D))return new ii(b[0]/255,b[1]/255,b[2]/255,b[3])}throw new ka(D||`Could not parse color from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"padding":{let b;for(let D of this.args){b=D.evaluate(h);let z=Ka.parse(b);if(z)return z}throw new ka(`Could not parse padding from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"numberArray":{let b;for(let D of this.args){b=D.evaluate(h);let z=Oa.parse(b);if(z)return z}throw new ka(`Could not parse numberArray from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"colorArray":{let b;for(let D of this.args){b=D.evaluate(h);let z=Ni.parse(b);if(z)return z}throw new ka(`Could not parse colorArray from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"variableAnchorOffsetCollection":{let b;for(let D of this.args){b=D.evaluate(h);let z=yo.parse(b);if(z)return z}throw new ka(`Could not parse variableAnchorOffsetCollection from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"number":{let b=null;for(let D of this.args){if(b=D.evaluate(h),b===null)return 0;let z=Number(b);if(!isNaN(z))return z}throw new ka(`Could not convert ${JSON.stringify(b)} to number.`)}case"formatted":return $a.fromString(As(this.args[0].evaluate(h)));case"resolvedImage":return so.fromString(As(this.args[0].evaluate(h)));case"projectionDefinition":return this.args[0].evaluate(h);default:return As(this.args[0].evaluate(h))}}eachChild(h){this.args.forEach(h)}outputDefined(){return this.args.every((h=>h.outputDefined()))}}let Kc=["Unknown","Point","LineString","Polygon"];class _u{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Kc[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(h){let b=this._parseColorCache.get(h);return b||(b=ii.parse(h),this._parseColorCache.set(h,b)),b}}class Gu{constructor(h,b,D=[],z,G=new Cn,X=[]){this.registry=h,this.path=D,this.key=D.map((Z=>`[${Z}]`)).join(""),this.scope=G,this.errors=X,this.expectedType=z,this._isConstant=b}parse(h,b,D,z,G={}){return b?this.concat(b,D,z)._parse(h,G):this._parse(h,G)}_parse(h,b){function D(z,G,X){return X==="assert"?new rs(G,[z]):X==="coerce"?new $s(G,[z]):z}if(h!==null&&typeof h!="string"&&typeof h!="boolean"&&typeof h!="number"||(h=["literal",h]),Array.isArray(h)){if(h.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let z=h[0];if(typeof z!="string")return this.error(`Expression name must be a string, but found ${typeof z} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let G=this.registry[z];if(G){let X=G.parse(h,this);if(!X)return null;if(this.expectedType){let Z=this.expectedType,re=X.type;if(Z.kind!=="string"&&Z.kind!=="number"&&Z.kind!=="boolean"&&Z.kind!=="object"&&Z.kind!=="array"||re.kind!=="value"){if(Z.kind==="projectionDefinition"&&["string","array"].includes(re.kind)||["color","formatted","resolvedImage"].includes(Z.kind)&&["value","string"].includes(re.kind)||["padding","numberArray"].includes(Z.kind)&&["value","number","array"].includes(re.kind)||Z.kind==="colorArray"&&["value","string","array"].includes(re.kind)||Z.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(re.kind))X=D(X,Z,b.typeAnnotation||"coerce");else if(this.checkSubtype(Z,re))return null}else X=D(X,Z,b.typeAnnotation||"assert")}if(!(X instanceof Ms)&&X.type.kind!=="resolvedImage"&&this._isConstant(X)){let Z=new _u;try{X=new Ms(X.type,X.evaluate(Z))}catch(re){return this.error(re.message),null}}return X}return this.error(`Unknown expression "${z}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(h===void 0?"'undefined' value invalid. Use null instead.":typeof h=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof h} instead.`)}concat(h,b,D){let z=typeof h=="number"?this.path.concat(h):this.path,G=D?this.scope.concat(D):this.scope;return new Gu(this.registry,this._isConstant,z,b||null,G,this.errors)}error(h,...b){let D=`${this.key}${b.map((z=>`[${z}]`)).join("")}`;this.errors.push(new Zr(D,h))}checkSubtype(h,b){let D=Ma(h,b);return D&&this.error(D),D}}class Ja{constructor(h,b){this.type=b.type,this.bindings=[].concat(h),this.result=b}evaluate(h){return this.result.evaluate(h)}eachChild(h){for(let b of this.bindings)h(b[1]);h(this.result)}static parse(h,b){if(h.length<4)return b.error(`Expected at least 3 arguments, but found ${h.length-1} instead.`);let D=[];for(let G=1;G=D.length)throw new ka(`Array index out of bounds: ${b} > ${D.length-1}.`);if(b!==Math.floor(b))throw new ka(`Array index must be an integer, but found ${b} instead.`);return D[b]}eachChild(h){h(this.index),h(this.input)}outputDefined(){return!1}}class ma{constructor(h,b){this.type=Qt,this.needle=h,this.haystack=b}static parse(h,b){if(h.length!==3)return b.error(`Expected 2 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,Jr);return D&&z?Ga(D.type,[Qt,Vt,At,Dt,Jr])?new ma(D,z):b.error(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(D.type)} instead`):null}evaluate(h){let b=this.needle.evaluate(h),D=this.haystack.evaluate(h);if(!D)return!1;if(!ss(b,["boolean","string","number","null"]))throw new ka(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(la(b))} instead.`);if(!ss(D,["string","array"]))throw new ka(`Expected second argument to be of type array or string, but found ${Xi(la(D))} instead.`);return D.indexOf(b)>=0}eachChild(h){h(this.needle),h(this.haystack)}outputDefined(){return!0}}class Ps{constructor(h,b,D){this.type=At,this.needle=h,this.haystack=b,this.fromIndex=D}static parse(h,b){if(h.length<=2||h.length>=5)return b.error(`Expected 2 or 3 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,Jr);if(!D||!z)return null;if(!Ga(D.type,[Qt,Vt,At,Dt,Jr]))return b.error(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(D.type)} instead`);if(h.length===4){let G=b.parse(h[3],3,At);return G?new Ps(D,z,G):null}return new Ps(D,z)}evaluate(h){let b=this.needle.evaluate(h),D=this.haystack.evaluate(h);if(!ss(b,["boolean","string","number","null"]))throw new ka(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(la(b))} instead.`);let z;if(this.fromIndex&&(z=this.fromIndex.evaluate(h)),ss(D,["string"])){let G=D.indexOf(b,z);return G===-1?-1:[...D.slice(0,G)].length}if(ss(D,["array"]))return D.indexOf(b,z);throw new ka(`Expected second argument to be of type array or string, but found ${Xi(la(D))} instead.`)}eachChild(h){h(this.needle),h(this.haystack),this.fromIndex&&h(this.fromIndex)}outputDefined(){return!1}}class Ca{constructor(h,b,D,z,G,X){this.inputType=h,this.type=b,this.input=D,this.cases=z,this.outputs=G,this.otherwise=X}static parse(h,b){if(h.length<5)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if(h.length%2!=1)return b.error("Expected an even number of arguments.");let D,z;b.expectedType&&b.expectedType.kind!=="value"&&(z=b.expectedType);let G={},X=[];for(let Q=2;QNumber.MAX_SAFE_INTEGER)return ke.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Ue=="number"&&Math.floor(Ue)!==Ue)return ke.error("Numeric branch labels must be integer values.");if(D){if(ke.checkSubtype(D,la(Ue)))return null}else D=la(Ue);if(G[String(Ue)]!==void 0)return ke.error("Branch labels must be unique.");G[String(Ue)]=X.length}let ge=b.parse(oe,Q,z);if(!ge)return null;z=z||ge.type,X.push(ge)}let Z=b.parse(h[1],1,Jr);if(!Z)return null;let re=b.parse(h[h.length-1],h.length-1,z);return re?Z.type.kind!=="value"&&b.concat(1).checkSubtype(D,Z.type)?null:new Ca(D,z,Z,G,X,re):null}evaluate(h){let b=this.input.evaluate(h);return(la(b)===this.inputType&&this.outputs[this.cases[b]]||this.otherwise).evaluate(h)}eachChild(h){h(this.input),this.outputs.forEach(h),h(this.otherwise)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))&&this.otherwise.outputDefined()}}class Pl{constructor(h,b,D){this.type=h,this.branches=b,this.otherwise=D}static parse(h,b){if(h.length<4)return b.error(`Expected at least 3 arguments, but found only ${h.length-1}.`);if(h.length%2!=0)return b.error("Expected an odd number of arguments.");let D;b.expectedType&&b.expectedType.kind!=="value"&&(D=b.expectedType);let z=[];for(let X=1;Xb.outputDefined()))&&this.otherwise.outputDefined()}}class ll{constructor(h,b,D,z){this.type=h,this.input=b,this.beginIndex=D,this.endIndex=z}static parse(h,b){if(h.length<=2||h.length>=5)return b.error(`Expected 2 or 3 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,At);if(!D||!z)return null;if(!Ga(D.type,[va(Jr),Vt,Jr]))return b.error(`Expected first argument to be of type array or string, but found ${Xi(D.type)} instead`);if(h.length===4){let G=b.parse(h[3],3,At);return G?new ll(D.type,D,z,G):null}return new ll(D.type,D,z)}evaluate(h){let b=this.input.evaluate(h),D=this.beginIndex.evaluate(h),z;if(this.endIndex&&(z=this.endIndex.evaluate(h)),ss(b,["string"]))return[...b].slice(D,z).join("");if(ss(b,["array"]))return b.slice(D,z);throw new ka(`Expected first argument to be of type array or string, but found ${Xi(la(b))} instead.`)}eachChild(h){h(this.input),h(this.beginIndex),this.endIndex&&h(this.endIndex)}outputDefined(){return!1}}function Jc(M,h){let b=M.length-1,D,z,G=0,X=b,Z=0;for(;G<=X;)if(Z=Math.floor((G+X)/2),D=M[Z],z=M[Z+1],D<=h){if(Z===b||hh))throw new ka("Input is not a number.");X=Z-1}return 0}class lu{constructor(h,b,D){this.type=h,this.input=b,this.labels=[],this.outputs=[];for(let[z,G]of D)this.labels.push(z),this.outputs.push(G)}static parse(h,b){if(h.length-1<4)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if((h.length-1)%2!=0)return b.error("Expected an even number of arguments.");let D=b.parse(h[1],1,At);if(!D)return null;let z=[],G=null;b.expectedType&&b.expectedType.kind!=="value"&&(G=b.expectedType);for(let X=1;X=Z)return b.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Q);let oe=b.parse(re,he,G);if(!oe)return null;G=G||oe.type,z.push([Z,oe])}return new lu(G,D,z)}evaluate(h){let b=this.labels,D=this.outputs;if(b.length===1)return D[0].evaluate(h);let z=this.input.evaluate(h);if(z<=b[0])return D[0].evaluate(h);let G=b.length;return z>=b[G-1]?D[G-1].evaluate(h):D[Jc(b,z)].evaluate(h)}eachChild(h){h(this.input);for(let b of this.outputs)h(b)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))}}function Mf(M){return M&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M}var Bd,Hu,Sf=(function(){if(Hu)return Bd;function M(h,b,D,z){this.cx=3*h,this.bx=3*(D-h)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*b,this.by=3*(z-b)-this.cy,this.ay=1-this.cy-this.by,this.p1x=h,this.p1y=b,this.p2x=D,this.p2y=z}return Hu=1,Bd=M,M.prototype={sampleCurveX:function(h){return((this.ax*h+this.bx)*h+this.cx)*h},sampleCurveY:function(h){return((this.ay*h+this.by)*h+this.cy)*h},sampleCurveDerivativeX:function(h){return(3*this.ax*h+2*this.bx)*h+this.cx},solveCurveX:function(h,b){if(b===void 0&&(b=1e-6),h<0)return 0;if(h>1)return 1;for(var D=h,z=0;z<8;z++){var G=this.sampleCurveX(D)-h;if(Math.abs(G)G?Z=D:re=D,D=.5*(re-Z)+Z;return D},solve:function(h,b){return this.sampleCurveY(this.solveCurveX(h,b))}},Bd})(),kc=Mf(Sf);class Uo{constructor(h,b,D,z,G){this.type=h,this.operator=b,this.interpolation=D,this.input=z,this.labels=[],this.outputs=[];for(let[X,Z]of G)this.labels.push(X),this.outputs.push(Z)}static interpolationFactor(h,b,D,z){let G=0;if(h.name==="exponential")G=ns(b,h.base,D,z);else if(h.name==="linear")G=ns(b,1,D,z);else if(h.name==="cubic-bezier"){let X=h.controlPoints;G=new kc(X[0],X[1],X[2],X[3]).solve(ns(b,1,D,z))}return G}static parse(h,b){let[D,z,G,...X]=h;if(!Array.isArray(z)||z.length===0)return b.error("Expected an interpolation type expression.",1);if(z[0]==="linear")z={name:"linear"};else if(z[0]==="exponential"){let Q=z[1];if(typeof Q!="number")return b.error("Exponential interpolation requires a numeric base.",1,1);z={name:"exponential",base:Q}}else{if(z[0]!=="cubic-bezier")return b.error(`Unknown interpolation type ${String(z[0])}`,1,0);{let Q=z.slice(1);if(Q.length!==4||Q.some((he=>typeof he!="number"||he<0||he>1)))return b.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);z={name:"cubic-bezier",controlPoints:Q}}}if(h.length-1<4)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if((h.length-1)%2!=0)return b.error("Expected an even number of arguments.");if(G=b.parse(G,2,At),!G)return null;let Z=[],re=null;D!=="interpolate-hcl"&&D!=="interpolate-lab"||b.expectedType==Ii?b.expectedType&&b.expectedType.kind!=="value"&&(re=b.expectedType):re=Ut;for(let Q=0;Q=he)return b.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ke);let Ue=b.parse(oe,ge,re);if(!Ue)return null;re=re||Ue.type,Z.push([he,Ue])}return mo(re,At)||mo(re,_r)||mo(re,Ut)||mo(re,Jn)||mo(re,Vi)||mo(re,Ii)||mo(re,ha)||mo(re,va(At))?new Uo(re,D,z,G,Z):b.error(`Type ${Xi(re)} is not interpolatable.`)}evaluate(h){let b=this.labels,D=this.outputs;if(b.length===1)return D[0].evaluate(h);let z=this.input.evaluate(h);if(z<=b[0])return D[0].evaluate(h);let G=b.length;if(z>=b[G-1])return D[G-1].evaluate(h);let X=Jc(b,z),Z=Uo.interpolationFactor(this.interpolation,z,b[X],b[X+1]),re=D[X].evaluate(h),Q=D[X+1].evaluate(h);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Ji(re,Q,Z);case"color":return ii.interpolate(re,Q,Z);case"padding":return Ka.interpolate(re,Q,Z);case"colorArray":return Ni.interpolate(re,Q,Z);case"numberArray":return Oa.interpolate(re,Q,Z);case"variableAnchorOffsetCollection":return yo.interpolate(re,Q,Z);case"array":return Ra(re,Q,Z);case"projectionDefinition":return oo.interpolate(re,Q,Z)}case"interpolate-hcl":switch(this.type.kind){case"color":return ii.interpolate(re,Q,Z,"hcl");case"colorArray":return Ni.interpolate(re,Q,Z,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ii.interpolate(re,Q,Z,"lab");case"colorArray":return Ni.interpolate(re,Q,Z,"lab")}}}eachChild(h){h(this.input);for(let b of this.outputs)h(b)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))}}function ns(M,h,b,D){let z=D-b,G=M-b;return z===0?0:h===1?G/z:(Math.pow(h,G)-1)/(Math.pow(h,z)-1)}let Ks={color:ii.interpolate,number:Ji,padding:Ka.interpolate,numberArray:Oa.interpolate,colorArray:Ni.interpolate,variableAnchorOffsetCollection:yo.interpolate,array:Ra};class Ef{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=null,z=b.expectedType;z&&z.kind!=="value"&&(D=z);let G=[];for(let Z of h.slice(1)){let re=b.parse(Z,1+G.length,D,void 0,{typeAnnotation:"omit"});if(!re)return null;D=D||re.type,G.push(re)}if(!D)throw new Error("No output type");let X=z&&G.some((Z=>Ma(z,Z.type)));return new Ef(X?Jr:D,G)}evaluate(h){let b,D=null,z=0;for(let G of this.args)if(z++,D=G.evaluate(h),D&&D instanceof so&&!D.available&&(b||(b=D.name),D=null,z===this.args.length&&(D=b)),D!==null)break;return D}eachChild(h){this.args.forEach(h)}outputDefined(){return this.args.every((h=>h.outputDefined()))}}function ju(M,h){return M==="=="||M==="!="?h.kind==="boolean"||h.kind==="string"||h.kind==="number"||h.kind==="null"||h.kind==="value":h.kind==="string"||h.kind==="number"||h.kind==="value"}function gs(M,h,b,D){return D.compare(h,b)===0}function bu(M,h,b){let D=M!=="=="&&M!=="!=";return class qWe{constructor(G,X,Z){this.type=Qt,this.lhs=G,this.rhs=X,this.collator=Z,this.hasUntypedArgument=G.type.kind==="value"||X.type.kind==="value"}static parse(G,X){if(G.length!==3&&G.length!==4)return X.error("Expected two or three arguments.");let Z=G[0],re=X.parse(G[1],1,Jr);if(!re)return null;if(!ju(Z,re.type))return X.concat(1).error(`"${Z}" comparisons are not supported for type '${Xi(re.type)}'.`);let Q=X.parse(G[2],2,Jr);if(!Q)return null;if(!ju(Z,Q.type))return X.concat(2).error(`"${Z}" comparisons are not supported for type '${Xi(Q.type)}'.`);if(re.type.kind!==Q.type.kind&&re.type.kind!=="value"&&Q.type.kind!=="value")return X.error(`Cannot compare types '${Xi(re.type)}' and '${Xi(Q.type)}'.`);D&&(re.type.kind==="value"&&Q.type.kind!=="value"?re=new rs(Q.type,[re]):re.type.kind!=="value"&&Q.type.kind==="value"&&(Q=new rs(re.type,[Q])));let he=null;if(G.length===4){if(re.type.kind!=="string"&&Q.type.kind!=="string"&&re.type.kind!=="value"&&Q.type.kind!=="value")return X.error("Cannot use collator to compare non-string types.");if(he=X.parse(G[3],3,qn),!he)return null}return new qWe(re,Q,he)}evaluate(G){let X=this.lhs.evaluate(G),Z=this.rhs.evaluate(G);if(D&&this.hasUntypedArgument){let re=la(X),Q=la(Z);if(re.kind!==Q.kind||re.kind!=="string"&&re.kind!=="number")throw new ka(`Expected arguments for "${M}" to be (string, string) or (number, number), but found (${re.kind}, ${Q.kind}) instead.`)}if(this.collator&&!D&&this.hasUntypedArgument){let re=la(X),Q=la(Z);if(re.kind!=="string"||Q.kind!=="string")return h(G,X,Z)}return this.collator?b(G,X,Z,this.collator.evaluate(G)):h(G,X,Z)}eachChild(G){G(this.lhs),G(this.rhs),this.collator&&G(this.collator)}outputDefined(){return!0}}}let kf=bu("==",(function(M,h,b){return h===b}),gs),ah=bu("!=",(function(M,h,b){return h!==b}),(function(M,h,b,D){return!gs(0,h,b,D)})),Od=bu("<",(function(M,h,b){return h",(function(M,h,b){return h>b}),(function(M,h,b,D){return D.compare(h,b)>0})),uu=bu("<=",(function(M,h,b){return h<=b}),(function(M,h,b,D){return D.compare(h,b)<=0})),oh=bu(">=",(function(M,h,b){return h>=b}),(function(M,h,b,D){return D.compare(h,b)>=0}));class hc{constructor(h,b,D){this.type=qn,this.locale=D,this.caseSensitive=h,this.diacriticSensitive=b}static parse(h,b){if(h.length!==2)return b.error("Expected one argument.");let D=h[1];if(typeof D!="object"||Array.isArray(D))return b.error("Collator options argument must be an object.");let z=b.parse(D["case-sensitive"]!==void 0&&D["case-sensitive"],1,Qt);if(!z)return null;let G=b.parse(D["diacritic-sensitive"]!==void 0&&D["diacritic-sensitive"],1,Qt);if(!G)return null;let X=null;return D.locale&&(X=b.parse(D.locale,1,Vt),!X)?null:new hc(z,G,X)}evaluate(h){return new Za(this.caseSensitive.evaluate(h),this.diacriticSensitive.evaluate(h),this.locale?this.locale.evaluate(h):null)}eachChild(h){h(this.caseSensitive),h(this.diacriticSensitive),this.locale&&h(this.locale)}outputDefined(){return!1}}class Fl{constructor(h,b,D,z,G,X){this.type=Vt,this.number=h,this.locale=b,this.currency=D,this.unit=z,this.minFractionDigits=G,this.maxFractionDigits=X}static parse(h,b){if(h.length!==3)return b.error("Expected two arguments.");let D=b.parse(h[1],1,At);if(!D)return null;let z=h[2];if(typeof z!="object"||Array.isArray(z))return b.error("NumberFormat options argument must be an object.");let G=null;if(z.locale&&(G=b.parse(z.locale,1,Vt),!G))return null;let X=null;if(z.currency&&(X=b.parse(z.currency,1,Vt),!X))return null;let Z=null;if(z.unit&&(Z=b.parse(z.unit,1,Vt),!Z))return null;if(X&&Z)return b.error("NumberFormat options `currency` and `unit` are mutually exclusive");let re=null;if(z["min-fraction-digits"]&&(re=b.parse(z["min-fraction-digits"],1,At),!re))return null;let Q=null;return z["max-fraction-digits"]&&(Q=b.parse(z["max-fraction-digits"],1,At),!Q)?null:new Fl(D,G,X,Z,re,Q)}evaluate(h){return new Intl.NumberFormat(this.locale?this.locale.evaluate(h):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(h):void 0,unit:this.unit?this.unit.evaluate(h):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(h):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(h):void 0}).format(this.number.evaluate(h))}eachChild(h){h(this.number),this.locale&&h(this.locale),this.currency&&h(this.currency),this.unit&&h(this.unit),this.minFractionDigits&&h(this.minFractionDigits),this.maxFractionDigits&&h(this.maxFractionDigits)}outputDefined(){return!1}}class Yo{constructor(h){this.type=ri,this.sections=h}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=h[1];if(!Array.isArray(D)&&typeof D=="object")return b.error("First argument must be an image or text section.");let z=[],G=!1;for(let X=1;X<=h.length-1;++X){let Z=h[X];if(G&&typeof Z=="object"&&!Array.isArray(Z)){G=!1;let re=null;if(Z["font-scale"]&&(re=b.parse(Z["font-scale"],1,At),!re))return null;let Q=null;if(Z["text-font"]&&(Q=b.parse(Z["text-font"],1,va(Vt)),!Q))return null;let he=null;if(Z["text-color"]&&(he=b.parse(Z["text-color"],1,Ut),!he))return null;let oe=null;if(Z["vertical-align"]){if(typeof Z["vertical-align"]=="string"&&!ja.includes(Z["vertical-align"]))return b.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${Z["vertical-align"]}' instead.`);if(oe=b.parse(Z["vertical-align"],1,Vt),!oe)return null}let ke=z[z.length-1];ke.scale=re,ke.font=Q,ke.textColor=he,ke.verticalAlign=oe}else{let re=b.parse(h[X],1,Jr);if(!re)return null;let Q=re.type.kind;if(Q!=="string"&&Q!=="value"&&Q!=="null"&&Q!=="resolvedImage")return b.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");G=!0,z.push({content:re,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Yo(z)}evaluate(h){return new $a(this.sections.map((b=>{let D=b.content.evaluate(h);return la(D)===ra?new qo("",D,null,null,null,b.verticalAlign?b.verticalAlign.evaluate(h):null):new qo(As(D),null,b.scale?b.scale.evaluate(h):null,b.font?b.font.evaluate(h).join(","):null,b.textColor?b.textColor.evaluate(h):null,b.verticalAlign?b.verticalAlign.evaluate(h):null)})))}eachChild(h){for(let b of this.sections)h(b.content),b.scale&&h(b.scale),b.font&&h(b.font),b.textColor&&h(b.textColor),b.verticalAlign&&h(b.verticalAlign)}outputDefined(){return!1}}class Ro{constructor(h){this.type=ra,this.input=h}static parse(h,b){if(h.length!==2)return b.error("Expected two arguments.");let D=b.parse(h[1],1,Vt);return D?new Ro(D):b.error("No image name provided.")}evaluate(h){let b=this.input.evaluate(h),D=so.fromString(b);return D&&h.availableImages&&(D.available=h.availableImages.indexOf(b)>-1),D}eachChild(h){h(this.input)}outputDefined(){return!1}}class is{constructor(h){this.type=At,this.input=h}static parse(h,b){if(h.length!==2)return b.error(`Expected 1 argument, but found ${h.length-1} instead.`);let D=b.parse(h[1],1);return D?D.type.kind!=="array"&&D.type.kind!=="string"&&D.type.kind!=="value"?b.error(`Expected argument of type string or array, but found ${Xi(D.type)} instead.`):new is(D):null}evaluate(h){let b=this.input.evaluate(h);if(typeof b=="string")return[...b].length;if(Array.isArray(b))return b.length;throw new ka(`Expected value to be of type string or array, but found ${Xi(la(b))} instead.`)}eachChild(h){h(this.input)}outputDefined(){return!1}}let Dl=8192;function dc(M,h){let b=(180+M[0])/360,D=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M[1]*Math.PI/360)))/360,z=Math.pow(2,h.z);return[Math.round(b*z*Dl),Math.round(D*z*Dl)]}function ef(M,h){let b=Math.pow(2,h.z);return[(z=(M[0]/Dl+h.x)/b,360*z-180),(D=(M[1]/Dl+h.y)/b,360/Math.PI*Math.atan(Math.exp((180-360*D)*Math.PI/180))-90)];var D,z}function Cc(M,h){M[0]=Math.min(M[0],h[0]),M[1]=Math.min(M[1],h[1]),M[2]=Math.max(M[2],h[0]),M[3]=Math.max(M[3],h[1])}function sh(M,h){return!(M[0]<=h[0]||M[2]>=h[2]||M[1]<=h[1]||M[3]>=h[3])}function Y0(M,h,b){let D=M[0]-h[0],z=M[1]-h[1],G=M[0]-b[0],X=M[1]-b[1];return D*X-G*z==0&&D*G<=0&&z*X<=0}function Nd(M,h,b,D){return(z=[D[0]-b[0],D[1]-b[1]])[0]*(G=[h[0]-M[0],h[1]-M[1]])[1]-z[1]*G[0]!=0&&!(!Vd(M,h,b,D)||!Vd(b,D,M,h));var z,G}function Cf(M,h,b){for(let D of b)for(let z=0;z(z=M)[1]!=(X=Z[re+1])[1]>z[1]&&z[0]<(X[0]-G[0])*(z[1]-G[1])/(X[1]-G[1])+G[0]&&(D=!D)}var z,G,X;return D}function Ud(M,h){for(let b of h)if(Vo(M,b))return!0;return!1}function zh(M,h){for(let b of M)if(!Vo(b,h))return!1;for(let b=0;b0&&Z<0||X<0&&Z>0}function rf(M,h,b){let D=[];for(let z=0;zb[2]){let z=.5*D,G=M[0]-b[0]>z?-D:b[0]-M[0]>z?D:0;G===0&&(G=M[0]-b[2]>z?-D:b[2]-M[0]>z?D:0),M[0]+=G}Cc(h,M)}function dd(M,h,b,D){let z=Math.pow(2,D.z)*Dl,G=[D.x*Dl,D.y*Dl],X=[];for(let Z of M)for(let re of Z){let Q=[re.x+G[0],re.y+G[1]];vc(Q,h,b,z),X.push(Q)}return X}function Bh(M,h,b,D){let z=Math.pow(2,D.z)*Dl,G=[D.x*Dl,D.y*Dl],X=[];for(let re of M){let Q=[];for(let he of re){let oe=[he.x+G[0],he.y+G[1]];Cc(h,oe),Q.push(oe)}X.push(Q)}if(h[2]-h[0]<=z/2){(Z=h)[0]=Z[1]=1/0,Z[2]=Z[3]=-1/0;for(let re of X)for(let Q of re)vc(Q,h,b,z)}var Z;return X}class Wu{constructor(h,b){this.type=Qt,this.geojson=h,this.geometries=b}static parse(h,b){if(h.length!==2)return b.error(`'within' expression requires exactly one argument, but found ${h.length-1} instead.`);if(pa(h[1])){let D=h[1];if(D.type==="FeatureCollection"){let z=[];for(let G of D.features){let{type:X,coordinates:Z}=G.geometry;X==="Polygon"&&z.push(Z),X==="MultiPolygon"&&z.push(...Z)}if(z.length)return new Wu(D,{type:"MultiPolygon",coordinates:z})}else if(D.type==="Feature"){let z=D.geometry.type;if(z==="Polygon"||z==="MultiPolygon")return new Wu(D,D.geometry)}else if(D.type==="Polygon"||D.type==="MultiPolygon")return new Wu(D,D)}return b.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(h){if(h.geometry()!=null&&h.canonicalID()!=null){if(h.geometryType()==="Point")return(function(b,D){let z=[1/0,1/0,-1/0,-1/0],G=[1/0,1/0,-1/0,-1/0],X=b.canonicalID();if(D.type==="Polygon"){let Z=rf(D.coordinates,G,X),re=dd(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!Vo(Q,Z))return!1}if(D.type==="MultiPolygon"){let Z=qh(D.coordinates,G,X),re=dd(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!Ud(Q,Z))return!1}return!0})(h,this.geometries);if(h.geometryType()==="LineString")return(function(b,D){let z=[1/0,1/0,-1/0,-1/0],G=[1/0,1/0,-1/0,-1/0],X=b.canonicalID();if(D.type==="Polygon"){let Z=rf(D.coordinates,G,X),re=Bh(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!zh(Q,Z))return!1}if(D.type==="MultiPolygon"){let Z=qh(D.coordinates,G,X),re=Bh(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!tf(Q,Z))return!1}return!0})(h,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let vd=class{constructor(M=[],h=(b,D)=>bD?1:0){if(this.data=M,this.length=this.data.length,this.compare=h,this.length>0)for(let b=(this.length>>1)-1;b>=0;b--)this._down(b)}push(M){this.data.push(M),this._up(this.length++)}pop(){if(this.length===0)return;let M=this.data[0],h=this.data.pop();return--this.length>0&&(this.data[0]=h,this._down(0)),M}peek(){return this.data[0]}_up(M){let{data:h,compare:b}=this,D=h[M];for(;M>0;){let z=M-1>>1,G=h[z];if(b(D,G)>=0)break;h[M]=G,M=z}h[M]=D}_down(M){let{data:h,compare:b}=this,D=this.length>>1,z=h[M];for(;M=0)break;h[M]=h[G],M=G}h[M]=z}};function pd(M,h,b=0,D=M.length-1,z=nf){for(;D>b;){if(D-b>600){let re=D-b+1,Q=h-b+1,he=Math.log(re),oe=.5*Math.exp(2*he/3),ke=.5*Math.sqrt(he*oe*(re-oe)/re)*(Q-re/2<0?-1:1);pd(M,h,Math.max(b,Math.floor(h-Q*oe/re+ke)),Math.min(D,Math.floor(h+(re-Q)*oe/re+ke)),z)}let G=M[h],X=b,Z=D;for(lh(M,b,h),z(M[D],G)>0&&lh(M,b,D);X0;)Z--}z(M[b],G)===0?lh(M,b,Z):(Z++,lh(M,Z,D)),Z<=h&&(b=Z+1),h<=Z&&(D=Z-1)}}function lh(M,h,b){let D=M[h];M[h]=M[b],M[b]=D}function nf(M,h){return Mh?1:0}function uh(M,h){if(M.length<=1)return[M];let b=[],D,z;for(let G of M){let X=gd(G);X!==0&&(G.area=Math.abs(X),z===void 0&&(z=X<0),z===X<0?(D&&b.push(D),D=[G]):D.push(G))}if(D&&b.push(D),h>1)for(let G=0;G1?(Q=h[re+1][0],he=h[re+1][1]):ge>0&&(Q+=oe/this.kx*ge,he+=ke/this.ky*ge)),oe=this.wrap(b[0]-Q)*this.kx,ke=(b[1]-he)*this.ky;let Ue=oe*oe+ke*ke;Ue180;)h-=360;return h}}function yd(M,h){return h[0]-M[0]}function Lf(M){return M[1]-M[0]+1}function wu(M,h){return M[1]>=M[0]&&M[1]M[1])return[null,null];let b=Lf(M);if(h){if(b===2)return[M,null];let z=Math.floor(b/2);return[[M[0],M[0]+z],[M[0]+z,M[1]]]}if(b===1)return[M,null];let D=Math.floor(b/2)-1;return[[M[0],M[0]+D],[M[0]+D+1,M[1]]]}function Oh(M,h){if(!wu(h,M.length))return[1/0,1/0,-1/0,-1/0];let b=[1/0,1/0,-1/0,-1/0];for(let D=h[0];D<=h[1];++D)Cc(b,M[D]);return b}function hh(M){let h=[1/0,1/0,-1/0,-1/0];for(let b of M)for(let D of b)Cc(h,D);return h}function Gd(M){return M[0]!==-1/0&&M[1]!==-1/0&&M[2]!==1/0&&M[3]!==1/0}function Gl(M,h,b){if(!Gd(M)||!Gd(h))return NaN;let D=0,z=0;return M[2]h[2]&&(D=M[0]-h[2]),M[1]>h[3]&&(z=M[1]-h[3]),M[3]=D)return D;if(sh(z,G)){if(Hd(M,h))return 0}else if(Hd(h,M))return 0;let X=1/0;for(let Z of M)for(let re=0,Q=Z.length,he=Q-1;re0;){let re=X.pop();if(re[0]>=G)continue;let Q=re[1],he=h?50:100;if(Lf(Q)<=he){if(!wu(Q,M.length))return NaN;if(h){let oe=Pf(M,Q,b,D);if(isNaN(oe)||oe===0)return oe;G=Math.min(G,oe)}else for(let oe=Q[0];oe<=Q[1];++oe){let ke=dh(M[oe],b,D);if(G=Math.min(G,ke),G===0)return 0}}else{let oe=fh(Q,h);p0(X,G,D,M,Z,oe[0]),p0(X,G,D,M,Z,oe[1])}}return G}function Il(M,h,b,D,z,G=1/0){let X=Math.min(G,z.distance(M[0],b[0]));if(X===0)return X;let Z=new vd([[0,[0,M.length-1],[0,b.length-1]]],yd);for(;Z.length>0;){let re=Z.pop();if(re[0]>=X)continue;let Q=re[1],he=re[2],oe=h?50:100,ke=D?50:100;if(Lf(Q)<=oe&&Lf(he)<=ke){if(!wu(Q,M.length)&&wu(he,b.length))return NaN;let ge;if(h&&D)ge=Hl(M,Q,b,he,z),X=Math.min(X,ge);else if(h&&!D){let Ue=M.slice(Q[0],Q[1]+1);for(let je=he[0];je<=he[1];++je)if(ge=wl(b[je],Ue,z),X=Math.min(X,ge),X===0)return X}else if(!h&&D){let Ue=b.slice(he[0],he[1]+1);for(let je=Q[0];je<=Q[1];++je)if(ge=wl(M[je],Ue,z),X=Math.min(X,ge),X===0)return X}else ge=_d(M,Q,b,he,z),X=Math.min(X,ge)}else{let ge=fh(Q,h),Ue=fh(he,D);Tu(Z,X,z,M,b,ge[0],Ue[0]),Tu(Z,X,z,M,b,ge[0],Ue[1]),Tu(Z,X,z,M,b,ge[1],Ue[0]),Tu(Z,X,z,M,b,ge[1],Ue[1])}}return X}function g0(M){return M.type==="MultiPolygon"?M.coordinates.map((h=>({type:"Polygon",coordinates:h}))):M.type==="MultiLineString"?M.coordinates.map((h=>({type:"LineString",coordinates:h}))):M.type==="MultiPoint"?M.coordinates.map((h=>({type:"Point",coordinates:h}))):[M]}class Yu{constructor(h,b){this.type=At,this.geojson=h,this.geometries=b}static parse(h,b){if(h.length!==2)return b.error(`'distance' expression requires exactly one argument, but found ${h.length-1} instead.`);if(pa(h[1])){let D=h[1];if(D.type==="FeatureCollection")return new Yu(D,D.features.map((z=>g0(z.geometry))).flat());if(D.type==="Feature")return new Yu(D,g0(D.geometry));if("type"in D&&"coordinates"in D)return new Yu(D,g0(D))}return b.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(h){if(h.geometry()!=null&&h.canonicalID()!=null){if(h.geometryType()==="Point")return(function(b,D){let z=b.geometry(),G=z.flat().map((re=>ef([re.x,re.y],b.canonical)));if(z.length===0)return NaN;let X=new md(G[0][1]),Z=1/0;for(let re of D){switch(re.type){case"Point":Z=Math.min(Z,Il(G,!1,[re.coordinates],!1,X,Z));break;case"LineString":Z=Math.min(Z,Il(G,!1,re.coordinates,!0,X,Z));break;case"Polygon":Z=Math.min(Z,Au(G,!1,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries);if(h.geometryType()==="LineString")return(function(b,D){let z=b.geometry(),G=z.flat().map((re=>ef([re.x,re.y],b.canonical)));if(z.length===0)return NaN;let X=new md(G[0][1]),Z=1/0;for(let re of D){switch(re.type){case"Point":Z=Math.min(Z,Il(G,!0,[re.coordinates],!1,X,Z));break;case"LineString":Z=Math.min(Z,Il(G,!0,re.coordinates,!0,X,Z));break;case"Polygon":Z=Math.min(Z,Au(G,!0,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries);if(h.geometryType()==="Polygon")return(function(b,D){let z=b.geometry();if(z.length===0||z[0].length===0)return NaN;let G=uh(z,0).map((re=>re.map((Q=>Q.map((he=>ef([he.x,he.y],b.canonical))))))),X=new md(G[0][0][0][1]),Z=1/0;for(let re of D)for(let Q of G){switch(re.type){case"Point":Z=Math.min(Z,Au([re.coordinates],!1,Q,X,Z));break;case"LineString":Z=Math.min(Z,Au(re.coordinates,!0,Q,X,Z));break;case"Polygon":Z=Math.min(Z,xo(Q,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Nh{constructor(h){this.type=Jr,this.key=h}static parse(h,b){if(h.length!==2)return b.error(`Expected 1 argument, but found ${h.length-1} instead.`);let D=h[1];return D==null?b.error("Global state property must be defined."):typeof D!="string"?b.error(`Global state property must be string, but found ${typeof h[1]} instead.`):new Nh(D)}evaluate(h){var b;let D=(b=h.globals)===null||b===void 0?void 0:b.globalState;return D&&Object.keys(D).length!==0?bn(D,this.key):null}eachChild(){}outputDefined(){return!1}}let Tl={"==":kf,"!=":ah,">":Qc,"<":Od,">=":oh,"<=":uu,array:rs,at:Sa,boolean:rs,case:Pl,coalesce:Ef,collator:hc,format:Yo,image:Ro,in:ma,"index-of":Ps,interpolate:Uo,"interpolate-hcl":Uo,"interpolate-lab":Uo,length:is,let:Ja,literal:Ms,match:Ca,number:rs,"number-format":Fl,object:rs,slice:ll,step:lu,string:rs,"to-boolean":$s,"to-color":$s,"to-number":$s,"to-string":$s,var:ps,within:Wu,distance:Yu,"global-state":Nh};class jl{constructor(h,b,D,z){this.name=h,this.type=b,this._evaluate=D,this.args=z}evaluate(h){return this._evaluate(h,this.args)}eachChild(h){this.args.forEach(h)}outputDefined(){return!1}static parse(h,b){let D=h[0],z=jl.definitions[D];if(!z)return b.error(`Unknown expression "${D}". If you wanted a literal array, use ["literal", [...]].`,0);let G=Array.isArray(z)?z[0]:z.type,X=Array.isArray(z)?[[z[1],z[2]]]:z.overloads,Z=X.filter((([Q])=>!Array.isArray(Q)||Q.length===h.length-1)),re=null;for(let[Q,he]of Z){re=new Gu(b.registry,gc,b.path,null,b.scope);let oe=[],ke=!1;for(let ge=1;ge{return ke=oe,Array.isArray(ke)?`(${ke.map(Xi).join(", ")})`:`(${Xi(ke.type)}...)`;var ke})).join(" | "),he=[];for(let oe=1;oe{b=h?b&&gc(D):b&&D instanceof Ms})),!!b&&of(M)&&bd(M,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function of(M){if(M instanceof jl&&(M.name==="get"&&M.args.length===1||M.name==="feature-state"||M.name==="has"&&M.args.length===1||M.name==="properties"||M.name==="geometry-type"||M.name==="id"||/^filter-/.test(M.name))||M instanceof Wu||M instanceof Yu)return!1;let h=!0;return M.eachChild((b=>{h&&!of(b)&&(h=!1)})),h}function sf(M){if(M instanceof jl&&M.name==="feature-state")return!1;let h=!0;return M.eachChild((b=>{h&&!sf(b)&&(h=!1)})),h}function bd(M,h){if(M instanceof jl&&h.indexOf(M.name)>=0)return!1;let b=!0;return M.eachChild((D=>{b&&!bd(D,h)&&(b=!1)})),b}function Gh(M){return{result:"success",value:M}}function Xu(M){return{result:"error",value:M}}function Pc(M){return M["property-type"]==="data-driven"||M["property-type"]==="cross-faded-data-driven"}function Ff(M){return!!M.expression&&M.expression.parameters.indexOf("zoom")>-1}function Df(M){return!!M.expression&&M.expression.interpolated}function La(M){return M instanceof Number?"number":M instanceof String?"string":M instanceof Boolean?"boolean":Array.isArray(M)?"array":M===null?"null":typeof M}function Rf(M){return typeof M=="object"&&M!==null&&!Array.isArray(M)&&la(M)===rn}function m0(M){return M}function wd(M,h){let b=M.stops&&typeof M.stops[0][0]=="object",D=b||!(b||M.property!==void 0),z=M.type||(Df(h)?"exponential":"interval"),G=(function(he){switch(he.type){case"color":return ii.parse;case"padding":return Ka.parse;case"numberArray":return Oa.parse;case"colorArray":return Ni.parse;default:return null}})(h);if(G&&((M=Fr({},M)).stops&&(M.stops=M.stops.map((he=>[he[0],G(he[1])]))),M.default=G(M.default?M.default:h.default)),M.colorSpace&&(X=M.colorSpace)!=="rgb"&&X!=="hcl"&&X!=="lab")throw new Error(`Unknown color space: "${M.colorSpace}"`);var X;let Z=(function(he){switch(he){case"exponential":return Td;case"interval":return y0;case"categorical":return X0;case"identity":return ul;default:throw new Error(`Unknown function type "${he}"`)}})(z),re,Q;if(z==="categorical"){re=Object.create(null);for(let he of M.stops)re[he[0]]=he[1];Q=typeof M.stops[0][0]}if(b){let he={},oe=[];for(let Ue=0;UeUe[0])),evaluate:({zoom:Ue},je)=>Td({stops:ke,base:M.base},h,Ue).evaluate(Ue,je)}}if(D){let he=z==="exponential"?{name:"exponential",base:M.base!==void 0?M.base:1}:null;return{kind:"camera",interpolationType:he,interpolationFactor:Uo.interpolationFactor.bind(void 0,he),zoomStops:M.stops.map((oe=>oe[0])),evaluate:({zoom:oe})=>Z(M,h,oe,re,Q)}}return{kind:"source",evaluate(he,oe){let ke=oe&&oe.properties?oe.properties[M.property]:void 0;return ke===void 0?Hh(M.default,h.default):Z(M,h,ke,re,Q)}}}function Hh(M,h,b){return M!==void 0?M:h!==void 0?h:b!==void 0?b:void 0}function X0(M,h,b,D,z){return Hh(typeof b===z?D[b]:void 0,M.default,h.default)}function y0(M,h,b){if(La(b)!=="number")return Hh(M.default,h.default);let D=M.stops.length;if(D===1||b<=M.stops[0][0])return M.stops[0][1];if(b>=M.stops[D-1][0])return M.stops[D-1][1];let z=Jc(M.stops.map((G=>G[0])),b);return M.stops[z][1]}function Td(M,h,b){let D=M.base!==void 0?M.base:1;if(La(b)!=="number")return Hh(M.default,h.default);let z=M.stops.length;if(z===1||b<=M.stops[0][0])return M.stops[0][1];if(b>=M.stops[z-1][0])return M.stops[z-1][1];let G=Jc(M.stops.map((he=>he[0])),b),X=(function(he,oe,ke,ge){let Ue=ge-ke,je=he-ke;return Ue===0?0:oe===1?je/Ue:(Math.pow(oe,je)-1)/(Math.pow(oe,Ue)-1)})(b,D,M.stops[G][0],M.stops[G+1][0]),Z=M.stops[G][1],re=M.stops[G+1][1],Q=Ks[h.type]||m0;return typeof Z.evaluate=="function"?{evaluate(...he){let oe=Z.evaluate.apply(void 0,he),ke=re.evaluate.apply(void 0,he);if(oe!==void 0&&ke!==void 0)return Q(oe,ke,X,M.colorSpace)}}:Q(Z,re,X,M.colorSpace)}function ul(M,h,b){switch(h.type){case"color":b=ii.parse(b);break;case"formatted":b=$a.fromString(b.toString());break;case"resolvedImage":b=so.fromString(b.toString());break;case"padding":b=Ka.parse(b);break;case"colorArray":b=Ni.parse(b);break;case"numberArray":b=Oa.parse(b);break;default:La(b)===h.type||h.type==="enum"&&h.values[b]||(b=void 0)}return Hh(b,M.default,h.default)}jl.register(Tl,{error:[{kind:"error"},[Vt],(M,[h])=>{throw new ka(h.evaluate(M))}],typeof:[Vt,[Jr],(M,[h])=>Xi(la(h.evaluate(M)))],"to-rgba":[va(At,4),[Ut],(M,[h])=>{let[b,D,z,G]=h.evaluate(M).rgb;return[255*b,255*D,255*z,G]}],rgb:[Ut,[At,At,At],Uh],rgba:[Ut,[At,At,At,At],Uh],has:{type:Qt,overloads:[[[Vt],(M,[h])=>Vh(h.evaluate(M),M.properties())],[[Vt,rn],(M,[h,b])=>Vh(h.evaluate(M),b.evaluate(M))]]},get:{type:Jr,overloads:[[[Vt],(M,[h])=>jd(h.evaluate(M),M.properties())],[[Vt,rn],(M,[h,b])=>jd(h.evaluate(M),b.evaluate(M))]]},"feature-state":[Jr,[Vt],(M,[h])=>jd(h.evaluate(M),M.featureState||{})],properties:[rn,[],M=>M.properties()],"geometry-type":[Vt,[],M=>M.geometryType()],id:[Jr,[],M=>M.id()],zoom:[At,[],M=>M.globals.zoom],"heatmap-density":[At,[],M=>M.globals.heatmapDensity||0],elevation:[At,[],M=>M.globals.elevation||0],"line-progress":[At,[],M=>M.globals.lineProgress||0],accumulated:[Jr,[],M=>M.globals.accumulated===void 0?null:M.globals.accumulated],"+":[At,pc(At),(M,h)=>{let b=0;for(let D of h)b+=D.evaluate(M);return b}],"*":[At,pc(At),(M,h)=>{let b=1;for(let D of h)b*=D.evaluate(M);return b}],"-":{type:At,overloads:[[[At,At],(M,[h,b])=>h.evaluate(M)-b.evaluate(M)],[[At],(M,[h])=>-h.evaluate(M)]]},"/":[At,[At,At],(M,[h,b])=>h.evaluate(M)/b.evaluate(M)],"%":[At,[At,At],(M,[h,b])=>h.evaluate(M)%b.evaluate(M)],ln2:[At,[],()=>Math.LN2],pi:[At,[],()=>Math.PI],e:[At,[],()=>Math.E],"^":[At,[At,At],(M,[h,b])=>Math.pow(h.evaluate(M),b.evaluate(M))],sqrt:[At,[At],(M,[h])=>Math.sqrt(h.evaluate(M))],log10:[At,[At],(M,[h])=>Math.log(h.evaluate(M))/Math.LN10],ln:[At,[At],(M,[h])=>Math.log(h.evaluate(M))],log2:[At,[At],(M,[h])=>Math.log(h.evaluate(M))/Math.LN2],sin:[At,[At],(M,[h])=>Math.sin(h.evaluate(M))],cos:[At,[At],(M,[h])=>Math.cos(h.evaluate(M))],tan:[At,[At],(M,[h])=>Math.tan(h.evaluate(M))],asin:[At,[At],(M,[h])=>Math.asin(h.evaluate(M))],acos:[At,[At],(M,[h])=>Math.acos(h.evaluate(M))],atan:[At,[At],(M,[h])=>Math.atan(h.evaluate(M))],min:[At,pc(At),(M,h)=>Math.min(...h.map((b=>b.evaluate(M))))],max:[At,pc(At),(M,h)=>Math.max(...h.map((b=>b.evaluate(M))))],abs:[At,[At],(M,[h])=>Math.abs(h.evaluate(M))],round:[At,[At],(M,[h])=>{let b=h.evaluate(M);return b<0?-Math.round(-b):Math.round(b)}],floor:[At,[At],(M,[h])=>Math.floor(h.evaluate(M))],ceil:[At,[At],(M,[h])=>Math.ceil(h.evaluate(M))],"filter-==":[Qt,[Vt,Jr],(M,[h,b])=>M.properties()[h.value]===b.value],"filter-id-==":[Qt,[Jr],(M,[h])=>M.id()===h.value],"filter-type-==":[Qt,[Vt],(M,[h])=>M.geometryType()===h.value],"filter-<":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D{let b=M.id(),D=h.value;return typeof b==typeof D&&b":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D>z}],"filter-id->":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b>D}],"filter-<=":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D<=z}],"filter-id-<=":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b<=D}],"filter->=":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D>=z}],"filter-id->=":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b>=D}],"filter-has":[Qt,[Jr],(M,[h])=>h.value in M.properties()],"filter-has-id":[Qt,[],M=>M.id()!==null&&M.id()!==void 0],"filter-type-in":[Qt,[va(Vt)],(M,[h])=>h.value.indexOf(M.geometryType())>=0],"filter-id-in":[Qt,[va(Jr)],(M,[h])=>h.value.indexOf(M.id())>=0],"filter-in-small":[Qt,[Vt,va(Jr)],(M,[h,b])=>b.value.indexOf(M.properties()[h.value])>=0],"filter-in-large":[Qt,[Vt,va(Jr)],(M,[h,b])=>(function(D,z,G,X){for(;G<=X;){let Z=G+X>>1;if(z[Z]===D)return!0;z[Z]>D?X=Z-1:G=Z+1}return!1})(M.properties()[h.value],b.value,0,b.value.length-1)],all:{type:Qt,overloads:[[[Qt,Qt],(M,[h,b])=>h.evaluate(M)&&b.evaluate(M)],[pc(Qt),(M,h)=>{for(let b of h)if(!b.evaluate(M))return!1;return!0}]]},any:{type:Qt,overloads:[[[Qt,Qt],(M,[h,b])=>h.evaluate(M)||b.evaluate(M)],[pc(Qt),(M,h)=>{for(let b of h)if(b.evaluate(M))return!0;return!1}]]},"!":[Qt,[Qt],(M,[h])=>!h.evaluate(M)],"is-supported-script":[Qt,[Vt],(M,[h])=>{let b=M.globals&&M.globals.isSupportedScript;return!b||b(h.evaluate(M))}],upcase:[Vt,[Vt],(M,[h])=>h.evaluate(M).toUpperCase()],downcase:[Vt,[Vt],(M,[h])=>h.evaluate(M).toLowerCase()],concat:[Vt,pc(Jr),(M,h)=>h.map((b=>As(b.evaluate(M)))).join("")],split:[va(Vt),[Vt,Vt],(M,[h,b])=>h.evaluate(M).split(b.evaluate(M))],join:[Vt,[va(Vt),Vt],(M,[h,b])=>h.evaluate(M).join(b.evaluate(M))],"resolved-locale":[Vt,[qn],(M,[h])=>h.evaluate(M).resolvedLocale()]});class Wl{constructor(h,b,D){this.expression=h,this._warningHistory={},this._evaluator=new _u,this._defaultValue=b?(function(z){if(z.type==="color"&&Rf(z.default))return new ii(0,0,0,0);switch(z.type){case"color":return ii.parse(z.default)||null;case"padding":return Ka.parse(z.default)||null;case"numberArray":return Oa.parse(z.default)||null;case"colorArray":return Ni.parse(z.default)||null;case"variableAnchorOffsetCollection":return yo.parse(z.default)||null;case"projectionDefinition":return oo.parse(z.default)||null;default:return z.default===void 0?null:z.default}})(b):null,this._enumValues=b&&b.type==="enum"?b.values:null,this._globalState=D}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._evaluator.globals=h,this._evaluator.feature=b,this._evaluator.featureState=D,this._evaluator.canonical=z,this._evaluator.availableImages=G||null,this._evaluator.formattedSection=X,this.expression.evaluate(this._evaluator)}evaluate(h,b,D,z,G,X){this._globalState&&(h=hr(h,this._globalState)),this._evaluator.globals=h,this._evaluator.feature=b||null,this._evaluator.featureState=D||null,this._evaluator.canonical=z,this._evaluator.availableImages=G||null,this._evaluator.formattedSection=X||null;try{let Z=this.expression.evaluate(this._evaluator);if(Z==null||typeof Z=="number"&&Z!=Z)return this._defaultValue;if(this._enumValues&&!(Z in this._enumValues))throw new ka(`Expected value to be one of ${Object.keys(this._enumValues).map((re=>JSON.stringify(re))).join(", ")}, but found ${JSON.stringify(Z)} instead.`);return Z}catch(Z){return this._warningHistory[Z.message]||(this._warningHistory[Z.message]=!0,typeof console!="undefined"&&console.warn(Z.message)),this._defaultValue}}}function If(M){return Array.isArray(M)&&M.length>0&&typeof M[0]=="string"&&M[0]in Tl}function vh(M,h,b){let D=new Gu(Tl,gc,[],h?(function(G){let X={color:Ut,string:Vt,number:At,enum:Vt,boolean:Qt,formatted:ri,padding:Jn,numberArray:Vi,colorArray:Ii,projectionDefinition:_r,resolvedImage:ra,variableAnchorOffsetCollection:ha};return G.type==="array"?va(X[G.value]||Jr,G.length):X[G.type]})(h):void 0),z=D.parse(M,void 0,void 0,void 0,h&&h.type==="string"?{typeAnnotation:"coerce"}:void 0);return z?Gh(new Wl(z,h,b)):Xu(D.errors)}class zf{constructor(h,b,D){this.kind=h,this._styleExpression=b,this.isStateDependent=h!=="constant"&&!sf(b.expression),this.globalStateRefs=zt(b.expression),this._globalState=D}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(h,b,D,z,G,X)}evaluate(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluate(h,b,D,z,G,X)}}class qf{constructor(h,b,D,z,G){this.kind=h,this.zoomStops=D,this._styleExpression=b,this.isStateDependent=h!=="camera"&&!sf(b.expression),this.globalStateRefs=zt(b.expression),this.interpolationType=z,this._globalState=G}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(h,b,D,z,G,X)}evaluate(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluate(h,b,D,z,G,X)}interpolationFactor(h,b,D){return this.interpolationType?Uo.interpolationFactor(this.interpolationType,h,b,D):0}}function Ze(M,h,b){let D=vh(M,h,b);if(D.result==="error")return D;let z=D.value.expression,G=of(z);if(!G&&!Pc(h))return Xu([new Zr("","data expressions not supported")]);let X=bd(z,["zoom"]);if(!X&&!Ff(h))return Xu([new Zr("","zoom expressions not supported")]);let Z=Wt(z);return Z||X?Z instanceof Zr?Xu([Z]):Z instanceof Uo&&!Df(h)?Xu([new Zr("",'"interpolate" expressions cannot be used with this property')]):Gh(Z?new qf(G?"camera":"composite",D.value,Z.labels,Z instanceof Uo?Z.interpolation:void 0,b):new zf(G?"constant":"source",D.value,b)):Xu([new Zr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class yt{constructor(h,b){this._parameters=h,this._specification=b,Fr(this,wd(this._parameters,this._specification))}static deserialize(h){return new yt(h._parameters,h._specification)}static serialize(h){return{_parameters:h._parameters,_specification:h._specification}}}function Wt(M){let h=null;if(M instanceof Ja)h=Wt(M.result);else if(M instanceof Ef){for(let b of M.args)if(h=Wt(b),h)break}else(M instanceof lu||M instanceof Uo)&&M.input instanceof jl&&M.input.name==="zoom"&&(h=M);return h instanceof Zr||M.eachChild((b=>{let D=Wt(b);D instanceof Zr?h=D:!h&&D?h=new Zr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):h&&D&&h!==D&&(h=new Zr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),h}function zt(M,h=new Set){return M instanceof Nh&&h.add(M.key),M.eachChild((b=>{zt(b,h)})),h}function hr(M,h){let{zoom:b,heatmapDensity:D,elevation:z,lineProgress:G,isSupportedScript:X,accumulated:Z}=M!=null?M:{};return{zoom:b,heatmapDensity:D,elevation:z,lineProgress:G,isSupportedScript:X,accumulated:Z,globalState:h}}function Ur(M){if(M===!0||M===!1)return!0;if(!Array.isArray(M)||M.length===0)return!1;switch(M[0]){case"has":return M.length>=2&&M[1]!=="$id"&&M[1]!=="$type";case"in":return M.length>=3&&(typeof M[1]!="string"||Array.isArray(M[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return M.length!==3||Array.isArray(M[1])||Array.isArray(M[2]);case"any":case"all":for(let h of M.slice(1))if(!Ur(h)&&typeof h!="boolean")return!1;return!0;default:return!0}}let Qr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function cn(M,h){if(M==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ur(M)||(M=en(M));let b=vh(M,Qr,h);if(b.result==="error")throw new Error(b.value.map((D=>`${D.key}: ${D.message}`)).join(", "));return{filter:(D,z,G)=>b.value.evaluate(D,z,{},G),needGeometry:Fn(M),getGlobalStateRefs:()=>zt(b.value.expression)}}function yn(M,h){return Mh?1:0}function Fn(M){if(!Array.isArray(M))return!1;if(M[0]==="within"||M[0]==="distance")return!0;for(let h=1;h"||h==="<="||h===">="?vn(M[1],M[2],h):h==="any"?(b=M.slice(1),["any"].concat(b.map(en))):h==="all"?["all"].concat(M.slice(1).map(en)):h==="none"?["all"].concat(M.slice(1).map(en).map(On)):h==="in"?mn(M[1],M.slice(2)):h==="!in"?On(mn(M[1],M.slice(2))):h==="has"?Pn(M[1]):h!=="!has"||On(Pn(M[1]));var b}function vn(M,h,b){switch(M){case"$type":return[`filter-type-${b}`,h];case"$id":return[`filter-id-${b}`,h];default:return[`filter-${b}`,M,h]}}function mn(M,h){if(h.length===0)return!1;switch(M){case"$type":return["filter-type-in",["literal",h]];case"$id":return["filter-id-in",["literal",h]];default:return h.length>200&&!h.some((b=>typeof b!=typeof h[0]))?["filter-in-large",M,["literal",h.sort(yn)]]:["filter-in-small",M,["literal",h]]}}function Pn(M){switch(M){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",M]}}function On(M){return["!",M]}function ki(M){let h=typeof M;if(h==="number"||h==="boolean"||h==="string"||M==null)return JSON.stringify(M);if(Array.isArray(M)){let z="[";for(let G of M)z+=`${ki(G)},`;return`${z}]`}let b=Object.keys(M).sort(),D="{";for(let z=0;zD.maximum?[new xr(h,b,`${b} is greater than the maximum value ${D.maximum}`)]:[]}function Ha(M){let h=M.valueSpec,b=pi(M.value.type),D,z,G,X={},Z=b!=="categorical"&&M.value.property===void 0,re=!Z,Q=La(M.value.stops)==="array"&&La(M.value.stops[0])==="array"&&La(M.value.stops[0][0])==="object",he=Gn({key:M.key,value:M.value,valueSpec:M.styleSpec.function,validateSpec:M.validateSpec,style:M.style,styleSpec:M.styleSpec,objectElementValidators:{stops:function(ge){if(b==="identity")return[new xr(ge.key,ge.value,'identity function may not have a "stops" property')];let Ue=[],je=ge.value;return Ue=Ue.concat(Zi({key:ge.key,value:je,valueSpec:ge.valueSpec,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec,arrayElementValidator:oe})),La(je)==="array"&&je.length===0&&Ue.push(new xr(ge.key,je,"array must have at least one stop")),Ue},default:function(ge){return ge.validateSpec({key:ge.key,value:ge.value,valueSpec:h,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec})}}});return b==="identity"&&Z&&he.push(new xr(M.key,M.value,'missing required property "property"')),b==="identity"||M.value.stops||he.push(new xr(M.key,M.value,'missing required property "stops"')),b==="exponential"&&M.valueSpec.expression&&!Df(M.valueSpec)&&he.push(new xr(M.key,M.value,"exponential functions not supported")),M.styleSpec.$version>=8&&(re&&!Pc(M.valueSpec)?he.push(new xr(M.key,M.value,"property functions not supported")):Z&&!Ff(M.valueSpec)&&he.push(new xr(M.key,M.value,"zoom functions not supported"))),b!=="categorical"&&!Q||M.value.property!==void 0||he.push(new xr(M.key,M.value,'"property" property is required')),he;function oe(ge){let Ue=[],je=ge.value,vt=ge.key;if(La(je)!=="array")return[new xr(vt,je,`array expected, ${La(je)} found`)];if(je.length!==2)return[new xr(vt,je,`array length 2 expected, length ${je.length} found`)];if(Q){if(La(je[0])!=="object")return[new xr(vt,je,`object expected, ${La(je[0])} found`)];if(je[0].zoom===void 0)return[new xr(vt,je,"object stop key must have zoom")];if(je[0].value===void 0)return[new xr(vt,je,"object stop key must have value")];if(G&&G>pi(je[0].zoom))return[new xr(vt,je[0].zoom,"stop zoom values must appear in ascending order")];pi(je[0].zoom)!==G&&(G=pi(je[0].zoom),z=void 0,X={}),Ue=Ue.concat(Gn({key:`${vt}[0]`,value:je[0],valueSpec:{zoom:{}},validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec,objectElementValidators:{zoom:na,value:ke}}))}else Ue=Ue.concat(ke({key:`${vt}[0]`,value:je[0],validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec},je));return If(Un(je[1]))?Ue.concat([new xr(`${vt}[1]`,je[1],"expressions are not allowed in function stops.")]):Ue.concat(ge.validateSpec({key:`${vt}[1]`,value:je[1],valueSpec:h,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec}))}function ke(ge,Ue){let je=La(ge.value),vt=pi(ge.value),gt=ge.value!==null?ge.value:Ue;if(D){if(je!==D)return[new xr(ge.key,gt,`${je} stop domain type must match previous stop domain type ${D}`)]}else D=je;if(je!=="number"&&je!=="string"&&je!=="boolean")return[new xr(ge.key,gt,"stop domain value must be a number, string, or boolean")];if(je!=="number"&&b!=="categorical"){let It=`number expected, ${je} found`;return Pc(h)&&b===void 0&&(It+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new xr(ge.key,gt,It)]}return b!=="categorical"||je!=="number"||isFinite(vt)&&Math.floor(vt)===vt?b!=="categorical"&&je==="number"&&z!==void 0&&vtnew xr(`${M.key}${D.key}`,M.value,D.message)));let b=h.value.expression||h.value._styleExpression.expression;if(M.expressionContext==="property"&&M.propertyKey==="text-font"&&!b.outputDefined())return[new xr(M.key,M.value,`Invalid data expression for "${M.propertyKey}". Output values must be contained as literals within the expression.`)];if(M.expressionContext==="property"&&M.propertyType==="layout"&&!sf(b))return[new xr(M.key,M.value,'"feature-state" data expressions are not supported with layout properties.')];if(M.expressionContext==="filter"&&!sf(b))return[new xr(M.key,M.value,'"feature-state" data expressions are not supported with filters.')];if(M.expressionContext&&M.expressionContext.indexOf("cluster")===0){if(!bd(b,["zoom","feature-state"]))return[new xr(M.key,M.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(M.expressionContext==="cluster-initial"&&!of(b))return[new xr(M.key,M.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ya(M){let h=M.key,b=M.value,D=La(b);return D!=="string"?[new xr(h,b,`color expected, ${D} found`)]:ii.parse(String(b))?[]:[new xr(h,b,`color expected, "${b}" found`)]}function ho(M){let h=M.key,b=M.value,D=M.valueSpec,z=[];return Array.isArray(D.values)?D.values.indexOf(pi(b))===-1&&z.push(new xr(h,b,`expected one of [${D.values.join(", ")}], ${JSON.stringify(b)} found`)):Object.keys(D.values).indexOf(pi(b))===-1&&z.push(new xr(h,b,`expected one of [${Object.keys(D.values).join(", ")}], ${JSON.stringify(b)} found`)),z}function Pa(M){return Ur(Un(M.value))?Qa(Fr({},M,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Js(M)}function Js(M){let h=M.value,b=M.key;if(La(h)!=="array")return[new xr(b,h,`array expected, ${La(h)} found`)];let D=M.styleSpec,z,G=[];if(h.length<1)return[new xr(b,h,"filter array must have at least 1 element")];switch(G=G.concat(ho({key:`${b}[0]`,value:h[0],valueSpec:D.filter_operator,style:M.style,styleSpec:M.styleSpec})),pi(h[0])){case"<":case"<=":case">":case">=":h.length>=2&&pi(h[1])==="$type"&&G.push(new xr(b,h,`"$type" cannot be use with operator "${h[0]}"`));case"==":case"!=":h.length!==3&&G.push(new xr(b,h,`filter array for operator "${h[0]}" must have 3 elements`));case"in":case"!in":h.length>=2&&(z=La(h[1]),z!=="string"&&G.push(new xr(`${b}[1]`,h[1],`string expected, ${z} found`)));for(let X=2;X{oe in z&&D.push(new xr(G,z[oe],`"${oe}" is prohibited for ref layers`))})),X.layers.forEach((oe=>{pi(oe.id)===Q&&(he=oe)})),he?he.ref?D.push(new xr(G,z.ref,"ref cannot reference another ref layer")):re=pi(he.type):D.push(new xr(G,z.ref,`ref layer "${Q}" not found`))}else if(re!=="background")if(z.source){let he=X.sources&&X.sources[z.source],oe=he&&pi(he.type);he?oe==="vector"&&re==="raster"?D.push(new xr(G,z.source,`layer "${z.id}" requires a raster source`)):oe!=="raster-dem"&&re==="hillshade"||oe!=="raster-dem"&&re==="color-relief"?D.push(new xr(G,z.source,`layer "${z.id}" requires a raster-dem source`)):oe==="raster"&&re!=="raster"?D.push(new xr(G,z.source,`layer "${z.id}" requires a vector source`)):oe!=="vector"||z["source-layer"]?oe==="raster-dem"&&re!=="hillshade"&&re!=="color-relief"?D.push(new xr(G,z.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):re!=="line"||!z.paint||!z.paint["line-gradient"]||oe==="geojson"&&he.lineMetrics||D.push(new xr(G,z,`layer "${z.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new xr(G,z,`layer "${z.id}" must specify a "source-layer"`)):D.push(new xr(G,z.source,`source "${z.source}" not found`))}else D.push(new xr(G,z,'missing required property "source"'));return re==="raster"&&(!((h=z.paint)===null||h===void 0)&&h.resampling)&&(!((b=z.paint)===null||b===void 0)&&b["raster-resampling"])&&D.push(new xr(G,z.paint,`layer "${z.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),D=D.concat(Gn({key:G,value:z,valueSpec:Z.layer,style:M.style,styleSpec:M.styleSpec,validateSpec:M.validateSpec,objectElementValidators:{"*":()=>[],type:()=>M.validateSpec({key:`${G}.type`,value:z.type,valueSpec:Z.layer.type,style:M.style,styleSpec:M.styleSpec,validateSpec:M.validateSpec,object:z,objectKey:"type"}),filter:Pa,layout:he=>Gn({layer:z,key:he.key,value:he.value,style:he.style,styleSpec:he.styleSpec,validateSpec:he.validateSpec,objectElementValidators:{"*":oe=>oi(Fr({layerType:re},oe))}}),paint:he=>Gn({layer:z,key:he.key,value:he.value,style:he.style,styleSpec:he.styleSpec,validateSpec:he.validateSpec,objectElementValidators:{"*":oe=>Io(Fr({layerType:re},oe))}})}})),D}function Go(M){let h=M.value,b=M.key,D=La(h);return D!=="string"?[new xr(b,h,`string expected, ${D} found`)]:[]}let Qs={promoteId:function({key:M,value:h}){if(La(h)==="string")return Go({key:M,value:h});{let b=[];for(let D in h)b.push(...Go({key:`${M}.${D}`,value:h[D]}));return b}}};function zl(M){let h=M.value,b=M.key,D=M.styleSpec,z=M.style,G=M.validateSpec;if(!h.type)return[new xr(b,h,'"type" is required')];let X=pi(h.type),Z;switch(X){case"vector":case"raster":return Z=Gn({key:b,value:h,valueSpec:D[`source_${X.replace("-","_")}`],style:M.style,styleSpec:D,objectElementValidators:Qs,validateSpec:G}),Z;case"raster-dem":return Z=(function(re){var Q;let he=(Q=re.sourceName)!==null&&Q!==void 0?Q:"",oe=re.value,ke=re.styleSpec,ge=ke.source_raster_dem,Ue=re.style,je=[],vt=La(oe);if(oe===void 0)return je;if(vt!=="object")return je.push(new xr("source_raster_dem",oe,`object expected, ${vt} found`)),je;let gt=pi(oe.encoding)==="custom",It=["redFactor","greenFactor","blueFactor","baseShift"],_t=re.value.encoding?`"${re.value.encoding}"`:"Default";for(let qt in oe)!gt&&It.includes(qt)?je.push(new xr(qt,oe[qt],`In "${he}": "${qt}" is only valid when "encoding" is set to "custom". ${_t} encoding found`)):ge[qt]?je=je.concat(re.validateSpec({key:qt,value:oe[qt],valueSpec:ge[qt],validateSpec:re.validateSpec,style:Ue,styleSpec:ke})):je.push(new xr(qt,oe[qt],`unknown property "${qt}"`));return je})({sourceName:b,value:h,style:M.style,styleSpec:D,validateSpec:G}),Z;case"geojson":if(Z=Gn({key:b,value:h,valueSpec:D.source_geojson,style:z,styleSpec:D,validateSpec:G,objectElementValidators:Qs}),h.cluster)for(let re in h.clusterProperties){let[Q,he]=h.clusterProperties[re],oe=typeof Q=="string"?[Q,["accumulated"],["get",re]]:Q;Z.push(...Qa({key:`${b}.${re}.map`,value:he,expressionContext:"cluster-map"})),Z.push(...Qa({key:`${b}.${re}.reduce`,value:oe,expressionContext:"cluster-reduce"}))}return Z;case"video":return Gn({key:b,value:h,valueSpec:D.source_video,style:z,validateSpec:G,styleSpec:D});case"image":return Gn({key:b,value:h,valueSpec:D.source_image,style:z,validateSpec:G,styleSpec:D});case"canvas":return[new xr(b,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ho({key:`${b}.type`,value:h.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function cu(M){let h=M.value,b=M.styleSpec,D=b.light,z=M.style,G=[],X=La(h);if(h===void 0)return G;if(X!=="object")return G=G.concat([new xr("light",h,`object expected, ${X} found`)]),G;for(let Z in h){let re=Z.match(/^(.*)-transition$/);G=G.concat(re&&D[re[1]]&&D[re[1]].transition?M.validateSpec({key:Z,value:h[Z],valueSpec:b.transition,validateSpec:M.validateSpec,style:z,styleSpec:b}):D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],validateSpec:M.validateSpec,style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)])}return G}function Zu(M){let h=M.value,b=M.styleSpec,D=b.sky,z=M.style,G=La(h);if(h===void 0)return[];if(G!=="object")return[new xr("sky",h,`object expected, ${G} found`)];let X=[];for(let Z in h)X=X.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return X}function mc(M){let h=M.value,b=M.styleSpec,D=b.terrain,z=M.style,G=[],X=La(h);if(h===void 0)return G;if(X!=="object")return G=G.concat([new xr("terrain",h,`object expected, ${X} found`)]),G;for(let Z in h)G=G.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],validateSpec:M.validateSpec,style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return G}function Yl(M){let h=[],b=M.value,D=M.key;if(Array.isArray(b)){let z=[],G=[];for(let X in b)b[X].id&&z.includes(b[X].id)&&h.push(new xr(D,b,`all the sprites' ids must be unique, but ${b[X].id} is duplicated`)),z.push(b[X].id),b[X].url&&G.includes(b[X].url)&&h.push(new xr(D,b,`all the sprites' URLs must be unique, but ${b[X].url} is duplicated`)),G.push(b[X].url),h=h.concat(Gn({key:`${D}[${X}]`,value:b[X],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:M.validateSpec}));return h}return Go({key:D,value:b})}function lf(M){return!!M&&M.constructor===Object}function $u(M){return lf(M.value)?[]:[new xr(M.key,M.value,`object expected, ${La(M.value)} found`)]}let ph={"*":()=>[],array:Zi,boolean:function(M){let h=M.value,b=M.key,D=La(h);return D!=="boolean"?[new xr(b,h,`boolean expected, ${D} found`)]:[]},number:na,color:Ya,constants:qi,enum:ho,filter:Pa,function:Ha,layer:ro,object:Gn,source:zl,light:cu,sky:Zu,terrain:mc,projection:function(M){let h=M.value,b=M.styleSpec,D=b.projection,z=M.style,G=La(h);if(h===void 0)return[];if(G!=="object")return[new xr("projection",h,`object expected, ${G} found`)];let X=[];for(let Z in h)X=X.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return X},projectionDefinition:function(M){let h=M.key,b=M.value;b=b instanceof String?b.valueOf():b;let D=La(b);return D!=="array"||(function(z){return Array.isArray(z)&&z.length===3&&typeof z[0]=="string"&&typeof z[1]=="string"&&typeof z[2]=="number"})(b)||(function(z){return!!["interpolate","step","literal"].includes(z[0])})(b)?["array","string"].includes(D)?[]:[new xr(h,b,`projection expected, invalid type "${D}" found`)]:[new xr(h,b,`projection expected, invalid array ${JSON.stringify(b)} found`)]},string:Go,formatted:function(M){return Go(M).length===0?[]:Qa(M)},resolvedImage:function(M){return Go(M).length===0?[]:Qa(M)},padding:function(M){let h=M.key,b=M.value;if(La(b)==="array"){if(b.length<1||b.length>4)return[new xr(h,b,`padding requires 1 to 4 values; ${b.length} values found`)];let D={type:"number"},z=[];for(let G=0;G[]}})),M.constants&&(b=b.concat(qi({key:"constants",value:M.constants}))),Ju(b)}function fu(M){return function(h){return M(Object.assign({},h,{validateSpec:gh}))}}function Ju(M){return[].concat(M).sort(((h,b)=>h.line-b.line))}function Qu(M){return function(...h){return Ju(M.apply(this,h))}}Ku.source=Qu(fu(zl)),Ku.sprite=Qu(fu(Yl)),Ku.glyphs=Qu(fu(uf)),Ku.light=Qu(fu(cu)),Ku.sky=Qu(fu(Zu)),Ku.terrain=Qu(fu(mc)),Ku.state=Qu(fu($u)),Ku.layer=Qu(fu(ro)),Ku.filter=Qu(fu(Pa)),Ku.paintProperty=Qu(fu(Io)),Ku.layoutProperty=Qu(fu(oi));let Wd={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class x0{constructor(h,b){this._globalState=b,this.setValue(h)}evaluate(){var h;return(h=this._literalValue)!==null&&h!==void 0?h:this._compiledValue.evaluate({})}setValue(h){if(h==null||h==="visible"||h==="none")return this._literalValue=h==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let b=vh(h,Wd,this._globalState);if(b.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(b.value.map((D=>`${D.key}: ${D.message}`)).join(", "));this._literalValue=void 0,this._compiledValue=b.value,this._globalStateRefs=zt(b.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Bf=Ct,Al=Ku,Xl=Al.light,cf=Al.sky,jh=Al.paintProperty,Wh=Al.layoutProperty;function Yh(M,h){let b=!1;if(h!=null&&h.length)for(let D of h)M.fire(new Ot(new Error(D.message))),b=!0;return b}class hu{constructor(h,b,D){let z=this.cells=[];if(h instanceof ArrayBuffer){this.arrayBuffer=h;let X=new Int32Array(this.arrayBuffer);h=X[0],this.d=(b=X[1])+2*(D=X[2]);for(let re=0;re=oe[ge+0]&&z>=oe[ge+1])?(Z[ke]=!0,X.push(he[ke])):Z[ke]=!1}}}_forEachCell(h,b,D,z,G,X,Z,re){let Q=this._convertToCellCoord(h),he=this._convertToCellCoord(b),oe=this._convertToCellCoord(D),ke=this._convertToCellCoord(z);for(let ge=Q;ge<=oe;ge++)for(let Ue=he;Ue<=ke;Ue++){let je=this.d*Ue+ge;if((!re||re(this._convertFromCellCoord(ge),this._convertFromCellCoord(Ue),this._convertFromCellCoord(ge+1),this._convertFromCellCoord(Ue+1)))&&G.call(this,h,b,D,z,je,X,Z,re))return}}_convertFromCellCoord(h){return(h-this.padding)/this.scale}_convertToCellCoord(h){return Math.max(0,Math.min(this.d-1,Math.floor(h*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let h=this.cells,b=3+this.cells.length+1+1,D=0;for(let X of this.cells)D+=X.length;let z=new Int32Array(b+D+this.keys.length+this.bboxes.length);z[0]=this.extent,z[1]=this.n,z[2]=this.padding;let G=b;for(let X=0;XD?(this.lastIntegerZoom=D+1,this.lastIntegerZoomTime=b):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${b}}`,"u").source}catch(D){return null}})).filter((b=>b));return new RegExp(h.join("|"),"u")}let ur=Kt(["Arab","Dupl","Mong","Ougr","Syrc"]);function Sr(M){return!ur.test(String.fromCodePoint(M))}function Br(M){return!(lt(M)||(h=M,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(h))));var h}let ln=Kt(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function wn(M){return ln.test(String.fromCodePoint(M))}function In(M,h){return!(!h&&wn(M)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(M)))}function gi(M){for(let h of M)if(wn(h.codePointAt(0)))return!0;return!1}let Bi=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(M){this.pluginStatus=M.pluginStatus,this.pluginURL=M.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(M){if(Bi.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=M.applyArabicShaping,this.processBidirectionalText=M.processBidirectionalText,this.processStyledBidirectionalText=M.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(M,h){return i(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if(M.pluginStatus!=="loading")return this.setState(M),M;let b=M.pluginURL,D=new Promise((G=>{this.loadScriptResolve=G}));h(b);let z=new Promise((G=>setTimeout((()=>G()),this.TIMEOUT)));if(yield Promise.race([D,z]),this.isParsed()){let G={pluginStatus:"loaded",pluginURL:b};return this.setState(G),G}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${b}`)}))}};class mi{constructor(h,b){this.isSupportedScript=ia,this.zoom=h,b?(this.now=b.now||0,this.fadeDuration=b.fadeDuration||0,this.zoomHistory=b.zoomHistory||new Qe,this.transition=b.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Qe,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let h=this.zoom,b=h-Math.floor(h),D=this.crossFadingFactor();return h>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:b+(1-b)*D}:{fromScale:.5,toScale:1,t:1-(1-D)*b}}}function ia(M){return(function(h,b){for(let D of h)if(!In(D.codePointAt(0),b))return!1;return!0})(M,Bi.getRTLTextPluginStatus()==="loaded")}let ua="-transition";class lo{constructor(h,b,D){this.property=h,this.value=b,this.expression=(function(z,G,X){if(Rf(z))return new yt(z,G);if(If(z)){let Z=Ze(z,G,X);if(Z.result==="error")throw new Error(Z.value.map((re=>`${re.key}: ${re.message}`)).join(", "));return Z.value}{let Z=z;return G.type==="color"&&typeof z=="string"?Z=ii.parse(z):G.type!=="padding"||typeof z!="number"&&!Array.isArray(z)?G.type!=="numberArray"||typeof z!="number"&&!Array.isArray(z)?G.type!=="colorArray"||typeof z!="string"&&!Array.isArray(z)?G.type==="variableAnchorOffsetCollection"&&Array.isArray(z)?Z=yo.parse(z):G.type==="projectionDefinition"&&typeof z=="string"&&(Z=oo.parse(z)):Z=Ni.parse(z):Z=Oa.parse(z):Z=Ka.parse(z),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>Z}}})(b===void 0?h.specification.default:b,h.specification,D)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(h,b,D){return this.property.possiblyEvaluate(this,h,b,D)}}class Bo{constructor(h,b){this.property=h,this.value=new lo(h,void 0,b)}transitioned(h,b){return new ls(this.property,this.value,b,_e({},h.transition,this.transition),h.now)}untransitioned(){return new ls(this.property,this.value,null,{},0)}}class Ua{constructor(h,b){this._properties=h,this._values=Object.create(h.defaultTransitionablePropertyValues),this._globalState=b}hasProperty(h){return h in this._properties.defaultTransitionablePropertyValues}getValue(h){return ie(this._values[h].value.value)}setValue(h,b){Object.hasOwn(this._values,h)||(this._values[h]=new Bo(this._values[h].property,this._globalState)),this._values[h].value=new lo(this._values[h].property,b===null?void 0:ie(b),this._globalState)}getTransition(h){return ie(this._values[h].transition)}setTransition(h,b){Object.hasOwn(this._values,h)||(this._values[h]=new Bo(this._values[h].property,this._globalState)),this._values[h].transition=ie(b)||void 0}serialize(){let h={};for(let b of Object.keys(this._values)){let D=this.getValue(b);D!==void 0&&(h[b]=D);let z=this.getTransition(b);z!==void 0&&(h[`${b}${ua}`]=z)}return h}transitioned(h,b){let D=new cl(this._properties);for(let z of Object.keys(this._values))D._values[z]=this._values[z].transitioned(h,b._values[z]);return D}untransitioned(){let h=new cl(this._properties);for(let b of Object.keys(this._values))h._values[b]=this._values[b].untransitioned();return h}}class ls{constructor(h,b,D,z,G){this.property=h,this.value=b,this.begin=G+z.delay||0,this.end=this.begin+z.duration||0,h.specification.transition&&(z.delay||z.duration)&&(this.prior=D)}possiblyEvaluate(h,b,D){let z=h.now||0,G=this.value.possiblyEvaluate(h,b,D),X=this.prior;if(X){if(z>this.end)return this.prior=null,G;if(this.value.isDataDriven())return this.prior=null,G;if(zz.zoomHistory.lastIntegerZoom?{from:h,to:b}:{from:D,to:b}}interpolate(h){return h}}class Fc{constructor(h){this.specification=h}possiblyEvaluate(h,b,D,z){if(h.value!==void 0){if(h.expression.kind==="constant"){let G=h.expression.evaluate(b,null,{},D,z);return this._calculate(G,G,G,b)}return this._calculate(h.expression.evaluate(new mi(Math.floor(b.zoom-1),b)),h.expression.evaluate(new mi(Math.floor(b.zoom),b)),h.expression.evaluate(new mi(Math.floor(b.zoom+1),b)),b)}}_calculate(h,b,D,z){return z.zoom>z.zoomHistory.lastIntegerZoom?{from:h,to:b}:{from:D,to:b}}interpolate(h){return h}}class du{constructor(h){this.specification=h}possiblyEvaluate(h,b,D,z){return!!h.expression.evaluate(b,null,{},D,z)}interpolate(){return!1}}class ms{constructor(h){this.properties=h,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let b in h){let D=h[b];D.specification.overridable&&this.overridableProperties.push(b);let z=this.defaultPropertyValues[b]=new lo(D,void 0,void 0),G=this.defaultTransitionablePropertyValues[b]=new Bo(D,void 0);this.defaultTransitioningPropertyValues[b]=G.untransitioned(),this.defaultPossiblyEvaluatedValues[b]=z.possiblyEvaluate({})}}}_i("DataDrivenProperty",Di),_i("DataConstantProperty",wi),_i("CrossFadedDataDrivenProperty",fl),_i("CrossFadedProperty",Fc),_i("ColorRampProperty",du);let ff=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",ku=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class hl extends cr{constructor(h,b,D){if(super(),this.id=h.id,this.type=h.type,this._globalState=D,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=(function(z,G){return new x0(z,G)})(this.visibility,D),h.type!=="custom"&&(this.metadata=h.metadata,this.minzoom=h.minzoom,this.maxzoom=h.maxzoom,h.type!=="background"&&(this.source=h.source,this.sourceLayer=h["source-layer"],this.filter=h.filter,this._featureFilter=cn(h.filter,D)),b.layout&&(this._unevaluatedLayout=new Eu(b.layout,D)),b.paint)){this._transitionablePaint=new Ua(b.paint,D);for(let z in h.paint)this.setPaintProperty(z,h.paint[z],{validate:!1});for(let z in h.layout)this.setLayoutProperty(z,h.layout[z],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(b.paint)}}setFilter(h){this.filter=h,this._featureFilter=cn(h,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(h){var b;if(h==="visibility")return this.visibility;if(!((b=this._transitionablePaint)===null||b===void 0)&&b.hasProperty(h))throw new Error(h+ff);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${h}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(h)}getLayoutAffectingGlobalStateRefs(){let h=new Set;for(let b of this._visibilityExpression.getGlobalStateRefs())h.add(b);if(this._unevaluatedLayout)for(let b in this._unevaluatedLayout._values){let D=this._unevaluatedLayout._values[b];for(let z of D.getGlobalStateRefs())h.add(z)}for(let b of this._featureFilter.getGlobalStateRefs())h.add(b);return h}getPaintAffectingGlobalStateRefs(){var h;let b=new globalThis.Map;if(this._transitionablePaint)for(let D in this._transitionablePaint._values){let z=this._transitionablePaint._values[D].value;for(let G of z.getGlobalStateRefs()){let X=(h=b.get(G))!==null&&h!==void 0?h:[];X.push({name:D,value:z.value}),b.set(G,X)}}return b}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(h,b,D={}){var z;if(h==="visibility")return this.visibility=b,this._visibilityExpression.setValue(b),void this.recalculateVisibility();!((z=this._transitionablePaint)===null||z===void 0)&&z.hasProperty(h)?this.fire(new Ot(new Error(h+ff))):b!=null&&this._validate(Wh,`layers.${this.id}.layout.${h}`,h,b,D)||this._unevaluatedLayout.setValue(h,b)}getPaintProperty(h){var b,D;if(h.endsWith(ua)){let z=h.slice(0,-11);if(z==="visibility"||!((b=this._unevaluatedLayout)===null||b===void 0)&&b.hasProperty(z))throw new Error(h+ku);return this._transitionablePaint.getTransition(z)}if(h==="visibility"||!((D=this._unevaluatedLayout)===null||D===void 0)&&D.hasProperty(h))throw new Error(h+ku);return this._transitionablePaint.getValue(h)}setPaintProperty(h,b,D={}){var z;if(h==="visibility"||!((z=this._unevaluatedLayout)===null||z===void 0)&&z.hasProperty(h))return this.fire(new Ot(new Error(h+ku))),!1;if(b!=null&&this._validate(jh,`layers.${this.id}.paint.${h}`,h,b,D))return!1;if(h.endsWith(ua))return this._transitionablePaint.setTransition(h.slice(0,-11),b||void 0),!1;{let G=this._transitionablePaint._values[h],X=G.property.specification["property-type"]==="cross-faded-data-driven",Z=G.value.isDataDriven(),re=G.value;this._transitionablePaint.setValue(h,b),this._handleSpecialPaintPropertyUpdate(h);let Q=this._transitionablePaint._values[h].value;return Q.isDataDriven()||Z||X||this._handleOverridablePaintPropertyUpdate(h,re,Q)}}_handleSpecialPaintPropertyUpdate(h){}_handleOverridablePaintPropertyUpdate(h,b,D){return!1}isHidden(h=this.minzoom,b=!1){return!!(this.minzoom&&h<(b?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&h>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(h){this._transitioningPaint=this._transitionablePaint.transitioned(h,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(h,b){h.getCrossfadeParameters&&(this._crossfadeParameters=h.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(h,void 0,b)),this.paint=this._transitioningPaint.possiblyEvaluate(h,void 0,b)}serialize(){var h,b;let D={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:(h=this._unevaluatedLayout)===null||h===void 0?void 0:h.serialize(),paint:(b=this._transitionablePaint)===null||b===void 0?void 0:b.serialize()};return this.visibility&&(D.layout||(D.layout={}),D.layout.visibility=this.visibility),pe(D,((z,G)=>!(z===void 0||G==="layout"&&!Object.keys(z).length||G==="paint"&&!Object.keys(z).length)))}_validate(h,b,D,z,G={}){return(G==null?void 0:G.validate)!==!1&&Yh(this,h.call(Al,{key:b,layerType:this.type,objectKey:D,value:z,styleSpec:Ct,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let h in this.paint._values){let b=this.paint.get(h);if(b instanceof el&&Pc(b.property.specification)&&(b.value.kind==="source"||b.value.kind==="composite")&&b.value.isStateDependent)return!0}return!1}}let mh;var W={get paint(){return mh=mh||new ms({"raster-opacity":new wi(Ct.paint_raster["raster-opacity"]),"raster-hue-rotate":new wi(Ct.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new wi(Ct.paint_raster["raster-brightness-min"]),"raster-brightness-max":new wi(Ct.paint_raster["raster-brightness-max"]),"raster-saturation":new wi(Ct.paint_raster["raster-saturation"]),"raster-contrast":new wi(Ct.paint_raster["raster-contrast"]),resampling:new wi(Ct.paint_raster.resampling),"raster-resampling":new wi(Ct.paint_raster["raster-resampling"]),"raster-fade-duration":new wi(Ct.paint_raster["raster-fade-duration"])})}};class te extends hl{constructor(h,b){super(h,W,b)}}let ve={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Se{constructor(h,b){this._structArray=h,this._pos1=b*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Ee{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(h,b){return h._trim(),b&&(h.isTransferred=!0,b.push(h.arrayBuffer)),{length:h.length,arrayBuffer:h.arrayBuffer}}static deserialize(h){let b=Object.create(this.prototype);return b.arrayBuffer=h.arrayBuffer,b.length=h.length,b.capacity=h.arrayBuffer.byteLength/b.bytesPerElement,b._refreshViews(),b}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(h){this.reserve(h),this.length=h}reserve(h){if(h>this.capacity){this.capacity=Math.max(h,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let b=this.uint8;this._refreshViews(),b&&this.uint8.set(b)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function Re(M,h=1){let b=0,D=0;return{members:M.map((z=>{let G=ve[z.type].BYTES_PER_ELEMENT,X=b=rt(b,Math.max(h,G)),Z=z.components||1;return D=Math.max(D,G),b+=G*Z,{name:z.name,type:z.type,components:Z,offset:X}})),size:rt(b,Math.max(D,h)),alignment:h}}function rt(M,h){return Math.ceil(M/h)*h}class He extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.int16[z+0]=b,this.int16[z+1]=D,h}}He.prototype.bytesPerElement=4,_i("StructArrayLayout2i4",He);class pt extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.int16[G+0]=b,this.int16[G+1]=D,this.int16[G+2]=z,h}}pt.prototype.bytesPerElement=6,_i("StructArrayLayout3i6",pt);class Ft extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z){let G=this.length;return this.resize(G+1),this.emplace(G,h,b,D,z)}emplace(h,b,D,z,G){let X=4*h;return this.int16[X+0]=b,this.int16[X+1]=D,this.int16[X+2]=z,this.int16[X+3]=G,h}}Ft.prototype.bytesPerElement=8,_i("StructArrayLayout4i8",Ft);class Rt extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=6*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.int16[re+2]=z,this.int16[re+3]=G,this.int16[re+4]=X,this.int16[re+5]=Z,h}}Rt.prototype.bytesPerElement=12,_i("StructArrayLayout2i4i12",Rt);class ir extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=4*h,Q=8*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.uint8[Q+4]=z,this.uint8[Q+5]=G,this.uint8[Q+6]=X,this.uint8[Q+7]=Z,h}}ir.prototype.bytesPerElement=8,_i("StructArrayLayout2i4ub8",ir);class nr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.float32[z+0]=b,this.float32[z+1]=D,h}}nr.prototype.bytesPerElement=8,_i("StructArrayLayout2f8",nr);class Cr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he){let oe=this.length;return this.resize(oe+1),this.emplace(oe,h,b,D,z,G,X,Z,re,Q,he)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe){let ke=10*h;return this.uint16[ke+0]=b,this.uint16[ke+1]=D,this.uint16[ke+2]=z,this.uint16[ke+3]=G,this.uint16[ke+4]=X,this.uint16[ke+5]=Z,this.uint16[ke+6]=re,this.uint16[ke+7]=Q,this.uint16[ke+8]=he,this.uint16[ke+9]=oe,h}}Cr.prototype.bytesPerElement=20,_i("StructArrayLayout10ui20",Cr);class Vr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re){let Q=this.length;return this.resize(Q+1),this.emplace(Q,h,b,D,z,G,X,Z,re)}emplace(h,b,D,z,G,X,Z,re,Q){let he=8*h;return this.uint16[he+0]=b,this.uint16[he+1]=D,this.uint16[he+2]=z,this.uint16[he+3]=G,this.uint16[he+4]=X,this.uint16[he+5]=Z,this.uint16[he+6]=re,this.uint16[he+7]=Q,h}}Vr.prototype.bytesPerElement=16,_i("StructArrayLayout8ui16",Vr);class sr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he,oe,ke){let ge=this.length;return this.resize(ge+1),this.emplace(ge,h,b,D,z,G,X,Z,re,Q,he,oe,ke)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge){let Ue=12*h;return this.int16[Ue+0]=b,this.int16[Ue+1]=D,this.int16[Ue+2]=z,this.int16[Ue+3]=G,this.uint16[Ue+4]=X,this.uint16[Ue+5]=Z,this.uint16[Ue+6]=re,this.uint16[Ue+7]=Q,this.int16[Ue+8]=he,this.int16[Ue+9]=oe,this.int16[Ue+10]=ke,this.int16[Ue+11]=ge,h}}sr.prototype.bytesPerElement=24,_i("StructArrayLayout4i4ui4i24",sr);class br extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.float32[G+0]=b,this.float32[G+1]=D,this.float32[G+2]=z,h}}br.prototype.bytesPerElement=12,_i("StructArrayLayout3f12",br);class kr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.uint32[1*h+0]=b,h}}kr.prototype.bytesPerElement=4,_i("StructArrayLayout1ul4",kr);class Gr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re,Q){let he=this.length;return this.resize(he+1),this.emplace(he,h,b,D,z,G,X,Z,re,Q)}emplace(h,b,D,z,G,X,Z,re,Q,he){let oe=10*h,ke=5*h;return this.int16[oe+0]=b,this.int16[oe+1]=D,this.int16[oe+2]=z,this.int16[oe+3]=G,this.int16[oe+4]=X,this.int16[oe+5]=Z,this.uint32[ke+3]=re,this.uint16[oe+8]=Q,this.uint16[oe+9]=he,h}}Gr.prototype.bytesPerElement=20,_i("StructArrayLayout6i1ul2ui20",Gr);class Wr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=6*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.int16[re+2]=z,this.int16[re+3]=G,this.int16[re+4]=X,this.int16[re+5]=Z,h}}Wr.prototype.bytesPerElement=12,_i("StructArrayLayout2i2i2i12",Wr);class Ar extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G){let X=this.length;return this.resize(X+1),this.emplace(X,h,b,D,z,G)}emplace(h,b,D,z,G,X){let Z=4*h,re=8*h;return this.float32[Z+0]=b,this.float32[Z+1]=D,this.float32[Z+2]=z,this.int16[re+6]=G,this.int16[re+7]=X,h}}Ar.prototype.bytesPerElement=16,_i("StructArrayLayout2f1f2i16",Ar);class En extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=16*h,Q=4*h,he=8*h;return this.uint8[re+0]=b,this.uint8[re+1]=D,this.float32[Q+1]=z,this.float32[Q+2]=G,this.int16[he+6]=X,this.int16[he+7]=Z,h}}En.prototype.bytesPerElement=16,_i("StructArrayLayout2ub2f2i16",En);class zn extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.uint16[G+0]=b,this.uint16[G+1]=D,this.uint16[G+2]=z,h}}zn.prototype.bytesPerElement=6,_i("StructArrayLayout3ui6",zn);class Zn extends Ee{_refreshViews(){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)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt){let It=this.length;return this.resize(It+1),this.emplace(It,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It){let _t=24*h,qt=12*h,tr=48*h;return this.int16[_t+0]=b,this.int16[_t+1]=D,this.uint16[_t+2]=z,this.uint16[_t+3]=G,this.uint32[qt+2]=X,this.uint32[qt+3]=Z,this.uint32[qt+4]=re,this.uint16[_t+10]=Q,this.uint16[_t+11]=he,this.uint16[_t+12]=oe,this.float32[qt+7]=ke,this.float32[qt+8]=ge,this.uint8[tr+36]=Ue,this.uint8[tr+37]=je,this.uint8[tr+38]=vt,this.uint32[qt+10]=gt,this.int16[_t+22]=It,h}}Zn.prototype.bytesPerElement=48,_i("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Zn);class ai extends Ee{_refreshViews(){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)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn){let Ln=this.length;return this.resize(Ln+1),this.emplace(Ln,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn,Ln){let un=32*h,ei=16*h;return this.int16[un+0]=b,this.int16[un+1]=D,this.int16[un+2]=z,this.int16[un+3]=G,this.int16[un+4]=X,this.int16[un+5]=Z,this.int16[un+6]=re,this.int16[un+7]=Q,this.uint16[un+8]=he,this.uint16[un+9]=oe,this.uint16[un+10]=ke,this.uint16[un+11]=ge,this.uint16[un+12]=Ue,this.uint16[un+13]=je,this.uint16[un+14]=vt,this.uint16[un+15]=gt,this.uint16[un+16]=It,this.uint16[un+17]=_t,this.uint16[un+18]=qt,this.uint16[un+19]=tr,this.uint16[un+20]=lr,this.uint16[un+21]=qr,this.uint16[un+22]=jr,this.uint32[ei+12]=_n,this.float32[ei+13]=fn,this.float32[ei+14]=Dn,this.uint16[un+30]=Hn,this.uint16[un+31]=Ln,h}}ai.prototype.bytesPerElement=64,_i("StructArrayLayout8i15ui1ul2f2ui64",ai);class Mi extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.float32[1*h+0]=b,h}}Mi.prototype.bytesPerElement=4,_i("StructArrayLayout1f4",Mi);class Si extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.uint16[6*h+0]=b,this.float32[G+1]=D,this.float32[G+2]=z,h}}Si.prototype.bytesPerElement=12,_i("StructArrayLayout1ui2f12",Si);class ya extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=4*h;return this.uint32[2*h+0]=b,this.uint16[G+2]=D,this.uint16[G+3]=z,h}}ya.prototype.bytesPerElement=8,_i("StructArrayLayout1ul2ui8",ya);class Y extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.uint16[z+0]=b,this.uint16[z+1]=D,h}}Y.prototype.bytesPerElement=4,_i("StructArrayLayout2ui4",Y);class d extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.uint16[1*h+0]=b,h}}d.prototype.bytesPerElement=2,_i("StructArrayLayout1ui2",d);class P extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D,z){let G=this.length;return this.resize(G+1),this.emplace(G,h,b,D,z)}emplace(h,b,D,z,G){let X=4*h;return this.float32[X+0]=b,this.float32[X+1]=D,this.float32[X+2]=z,this.float32[X+3]=G,h}}P.prototype.bytesPerElement=16,_i("StructArrayLayout4f16",P);class N extends Se{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new o(this.anchorPointX,this.anchorPointY)}}N.prototype.size=20;class H extends Gr{get(h){return new N(this,h)}}_i("CollisionBoxArray",H);class $ extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(h){this._structArray.uint8[this._pos1+37]=h}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(h){this._structArray.uint8[this._pos1+38]=h}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(h){this._structArray.uint32[this._pos4+10]=h}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}$.prototype.size=48;class se extends Zn{get(h){return new $(this,h)}}_i("PlacedSymbolArray",se);class de extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(h){this._structArray.uint32[this._pos4+12]=h}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}de.prototype.size=64;class Ae extends ai{get(h){return new de(this,h)}}_i("SymbolInstanceArray",Ae);class Fe extends Mi{getoffsetX(h){return this.float32[1*h+0]}}_i("GlyphOffsetArray",Fe);class Ie extends pt{getx(h){return this.int16[3*h+0]}gety(h){return this.int16[3*h+1]}gettileUnitDistanceFromAnchor(h){return this.int16[3*h+2]}}_i("SymbolLineVertexArray",Ie);class Ye extends Se{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Ye.prototype.size=12;class st extends Si{get(h){return new Ye(this,h)}}_i("TextAnchorOffsetArray",st);class dt extends Se{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}dt.prototype.size=8;class Pe extends ya{get(h){return new dt(this,h)}}_i("FeatureIndexArray",Pe);class Xe extends He{}class at extends He{}class xt extends He{}class Et extends Rt{}class Bt extends ir{}class St extends nr{}class Pt extends Cr{}class $t extends Vr{}class Ht extends sr{}class dr extends br{}class Xr extends kr{}class Or extends Wr{}class $r extends En{}class Er extends zn{}class Tr extends Y{}let Rr=Re([{name:"a_pos",components:2,type:"Int16"}],4),{members:Lr}=Rr;class an{constructor(h=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=h}prepareSegment(h,b,D,z){let G=this.segments[this.segments.length-1];return h>an.MAX_VERTEX_ARRAY_LENGTH&&me(`Max vertices per segment is ${an.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${h}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${an.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!G||G.vertexLength+h>an.MAX_VERTEX_ARRAY_LENGTH||G.sortKey!==z?this.createNewSegment(b,D,z):G}createNewSegment(h,b,D){let z={vertexOffset:h.length,primitiveOffset:b.length,vertexLength:0,primitiveLength:0,vaos:{}};return D!==void 0&&(z.sortKey=D),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(z),z}getOrCreateLatestSegment(h,b,D){return this.prepareSegment(0,h,b,D)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let h of this.segments)for(let b in h.vaos)h.vaos[b].destroy()}static simpleSegment(h,b,D,z){return new an([{vertexOffset:h,primitiveOffset:b,vertexLength:D,primitiveLength:z,vaos:{},sortKey:0}])}}function on(M,h){return 256*(M=ue(Math.floor(M),0,255))+ue(Math.floor(h),0,255)}an.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,_i("SegmentVector",an);let Nn=Re([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),Yn=Re([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var yi,Sn,An,li={exports:{}},Vn={exports:{}},jn={exports:{}},Wn=(function(){if(An)return li.exports;An=1;var M=(yi||(yi=1,Vn.exports=function(b,D){var z,G,X,Z,re,Q,he,oe;for(G=b.length-(z=3&b.length),X=D,re=3432918353,Q=461845907,oe=0;oe>>16)*re&65535)<<16)&4294967295)<<15|he>>>17))*Q+(((he>>>16)*Q&65535)<<16)&4294967295)<<13|X>>>19))+((5*(X>>>16)&65535)<<16)&4294967295))+((58964+(Z>>>16)&65535)<<16);switch(he=0,z){case 3:he^=(255&b.charCodeAt(oe+2))<<16;case 2:he^=(255&b.charCodeAt(oe+1))<<8;case 1:X^=he=(65535&(he=(he=(65535&(he^=255&b.charCodeAt(oe)))*re+(((he>>>16)*re&65535)<<16)&4294967295)<<15|he>>>17))*Q+(((he>>>16)*Q&65535)<<16)&4294967295}return X^=b.length,X=2246822507*(65535&(X^=X>>>16))+((2246822507*(X>>>16)&65535)<<16)&4294967295,X=3266489909*(65535&(X^=X>>>13))+((3266489909*(X>>>16)&65535)<<16)&4294967295,(X^=X>>>16)>>>0}),Vn.exports),h=(Sn||(Sn=1,jn.exports=function(b,D){for(var z,G=b.length,X=D^G,Z=0;G>=4;)z=1540483477*(65535&(z=255&b.charCodeAt(Z)|(255&b.charCodeAt(++Z))<<8|(255&b.charCodeAt(++Z))<<16|(255&b.charCodeAt(++Z))<<24))+((1540483477*(z>>>16)&65535)<<16),X=1540483477*(65535&X)+((1540483477*(X>>>16)&65535)<<16)^(z=1540483477*(65535&(z^=z>>>24))+((1540483477*(z>>>16)&65535)<<16)),G-=4,++Z;switch(G){case 3:X^=(255&b.charCodeAt(Z+2))<<16;case 2:X^=(255&b.charCodeAt(Z+1))<<8;case 1:X=1540483477*(65535&(X^=255&b.charCodeAt(Z)))+((1540483477*(X>>>16)&65535)<<16)}return X=1540483477*(65535&(X^=X>>>13))+((1540483477*(X>>>16)&65535)<<16),(X^=X>>>15)>>>0}),jn.exports);return li.exports=M,li.exports.murmur3=M,li.exports.murmur2=h,li.exports})(),si=s(Wn);class zi{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(h,b,D,z){this.ids.push(da(h)),this.positions.push(b,D,z)}getPositions(h){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let b=da(h),D=0,z=this.ids.length-1;for(;D>1;this.ids[X]>=b?z=X:D=X+1}let G=[];for(;this.ids[D]===b;)G.push({index:this.positions[3*D],start:this.positions[3*D+1],end:this.positions[3*D+2]}),D++;return G}static serialize(h,b){let D=new Float64Array(h.ids),z=new Uint32Array(h.positions);return ui(D,z,0,D.length-1),b&&b.push(D.buffer,z.buffer),{ids:D,positions:z}}static deserialize(h){let b=new zi;return b.ids=h.ids,b.positions=h.positions,b.indexed=!0,b}}function da(M){let h=+M;return!isNaN(h)&&h<=Number.MAX_SAFE_INTEGER?h:si(String(M))}function ui(M,h,b,D){for(;b>1],G=b-1,X=D+1;for(;;){do G++;while(M[G]z);if(G>=X)break;Li(M,G,X),Li(h,3*G,3*X),Li(h,3*G+1,3*X+1),Li(h,3*G+2,3*X+2)}X-b`u_${z}`)),this.type=D}setUniform(h,b,D){h.set(D.constantOr(this.value))}getBinding(h,b,D){return this.type==="color"?new Os(h,b):new ca(h,b)}}class vo{constructor(h,b){this.uniformNames=b.map((D=>`u_${D}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(h,b){this.pixelRatioFrom=b.pixelRatio,this.pixelRatioTo=h.pixelRatio,this.patternFrom=b.tlbr,this.patternTo=h.tlbr}setConstantDashPositions(h,b){this.dashTo=[0,h.y,h.height,h.width],this.dashFrom=[0,b.y,b.height,b.width]}setUniform(h,b,D,z){let G=null;z==="u_pattern_to"?G=this.patternTo:z==="u_pattern_from"?G=this.patternFrom:z==="u_dasharray_to"?G=this.dashTo:z==="u_dasharray_from"?G=this.dashFrom:z==="u_pixel_ratio_to"?G=this.pixelRatioTo:z==="u_pixel_ratio_from"&&(G=this.pixelRatioFrom),G!==null&&h.set(G)}getBinding(h,b,D){return D.startsWith("u_pattern")||D.startsWith("u_dasharray_")?new Ia(h,b):new ca(h,b)}}class _o{constructor(h,b,D,z){this.expression=h,this.type=D,this.maxValue=0,this.paintVertexAttributes=b.map((G=>({name:`a_${G}`,type:"Float32",components:D==="color"?2:1,offset:0}))),this.paintVertexArray=new z}populatePaintArray(h,b,D){let z=this.paintVertexArray.length,G=this.expression.evaluate(new mi(0,D),b,{},D.canonical,[],D.formattedSection);this.paintVertexArray.resize(h),this._setPaintValue(z,h,G)}updatePaintArray(h,b,D,z,G){let X=this.expression.evaluate(new mi(0,G),D,z);this._setPaintValue(h,b,X)}_setPaintValue(h,b,D){if(this.type==="color"){let z=Na(D);for(let G=h;G`u_${Z}_t`)),this.type=D,this.useIntegerZoom=z,this.zoom=G,this.maxValue=0,this.paintVertexAttributes=b.map((Z=>({name:`a_${Z}`,type:"Float32",components:D==="color"?4:2,offset:0}))),this.paintVertexArray=new X}populatePaintArray(h,b,D){let z=this.expression.evaluate(new mi(this.zoom,D),b,{},D.canonical,[],D.formattedSection),G=this.expression.evaluate(new mi(this.zoom+1,D),b,{},D.canonical,[],D.formattedSection),X=this.paintVertexArray.length;this.paintVertexArray.resize(h),this._setPaintValue(X,h,z,G)}updatePaintArray(h,b,D,z,G){let X=this.expression.evaluate(new mi(this.zoom,G),D,z),Z=this.expression.evaluate(new mi(this.zoom+1,G),D,z);this._setPaintValue(h,b,X,Z)}_setPaintValue(h,b,D,z){if(this.type==="color"){let G=Na(D),X=Na(z);for(let Z=h;Z`#define HAS_UNIFORM_${z}`)))}return h}getBinderAttributes(){let h=[];for(let b in this.binders){let D=this.binders[b];if(D instanceof _o||D instanceof po)for(let z of D.paintVertexAttributes)h.push(z.name);else if(D instanceof Xo){let z=D.getVertexAttributes();for(let G of z)h.push(G.name)}}return h}getBinderUniforms(){let h=[];for(let b in this.binders){let D=this.binders[b];if(D instanceof Ns||D instanceof vo||D instanceof po)for(let z of D.uniformNames)h.push(z)}return h}getPaintVertexBuffers(){return this._buffers}getUniforms(h,b){let D=[];for(let z in this.binders){let G=this.binders[z];if(G instanceof Ns||G instanceof vo||G instanceof po){for(let X of G.uniformNames)if(b[X]){let Z=G.getBinding(h,b[X],X);D.push({name:X,property:z,binding:Z})}}}return D}setUniforms(h,b,D,z){for(let{name:G,property:X,binding:Z}of b)this.binders[X].setUniform(Z,z,D.get(X),G)}updatePaintBuffers(h){this._buffers=[];for(let b in this.binders){let D=this.binders[b];if(h&&D instanceof Xo){let z=h.fromScale===2?D.zoomInPaintVertexBuffer:D.zoomOutPaintVertexBuffer;z&&this._buffers.push(z)}else(D instanceof _o||D instanceof po)&&D.paintVertexBuffer&&this._buffers.push(D.paintVertexBuffer)}}upload(h){for(let b in this.binders){let D=this.binders[b];(D instanceof _o||D instanceof po||D instanceof Xo)&&D.upload(h)}this.updatePaintBuffers()}destroy(){for(let h in this.binders){let b=this.binders[h];(b instanceof _o||b instanceof po||b instanceof Xo)&&b.destroy()}}}class Ta{constructor(h,b,D=()=>!0){this.programConfigurations={};for(let z of h)this.programConfigurations[z.id]=new ql(z,b,D);this.needsUpload=!1,this._featureMap=new zi,this._bufferOffset=0}populatePaintArrays(h,b,D,z){for(let G in this.programConfigurations)this.programConfigurations[G].populatePaintArrays(h,b,z);b.id!==void 0&&this._featureMap.add(b.id,D,this._bufferOffset,h),this._bufferOffset=h,this.needsUpload=!0}updatePaintArrays(h,b,D,z){for(let G of D)this.needsUpload=this.programConfigurations[G.id].updatePaintArrays(h,this._featureMap,b,G,z)||this.needsUpload}get(h){return this.programConfigurations[h]}upload(h){if(this.needsUpload){for(let b in this.programConfigurations)this.programConfigurations[b].upload(h);this.needsUpload=!1}}destroy(){for(let h in this.programConfigurations)this.programConfigurations[h].destroy()}}function vu(M,h){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[M]||[M.replace(`${h}-`,"").replace(/-/g,"_")]}function ys(M,h,b){let D={color:{source:nr,composite:P},number:{source:Mi,composite:nr}},z=(function(G){return{"line-pattern":{source:Pt,composite:Pt},"fill-pattern":{source:Pt,composite:Pt},"fill-extrusion-pattern":{source:Pt,composite:Pt},"line-dasharray":{source:$t,composite:$t}}[G]})(M);return(z==null?void 0:z[b])||D[h][b]}_i("ConstantBinder",Ns),_i("CrossFadedConstantBinder",vo),_i("SourceExpressionBinder",_o),_i("CrossFadedPatternBinder",no),_i("CrossFadedDasharrayBinder",Us),_i("CompositeExpressionBinder",po),_i("ProgramConfiguration",ql,{omit:["_buffers"]}),_i("ProgramConfigurationSet",Ta);let xc=Math.pow(2,14)-1,Zl=-xc-1;function $l(M){let h=j/M.extent,b=M.loadGeometry();for(let D of b)for(let z of D){let G=Math.round(z.x*h),X=Math.round(z.y*h);z.x=ue(G,Zl,xc),z.y=ue(X,Zl,xc),(Gz.x+1||Xz.y+1)&&me("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return b}function xa(M,h){return{type:M.type,id:M.id,properties:M.properties,geometry:h?$l(M):[]}}let uo=-32768;function Es(M,h,b,D,z){M.emplaceBack(uo+8*h+D,uo+8*b+z)}class vr{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.layoutVertexArray=new at,this.indexArray=new Er,this.segments=new an,this.programConfigurations=new Ta(h.layers,h.zoom),this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){let z=this.layers[0],G=[],X=null,Z=!1,re=z.type==="heatmap";if(z.type==="circle"){let he=z;X=he.layout.get("circle-sort-key"),Z=!X.isConstant(),re||(re=he.paint.get("circle-pitch-alignment")==="map")}let Q=re?b.subdivisionGranularity.circle:1;for(let{feature:he,id:oe,index:ke,sourceLayerIndex:ge}of h){let Ue=this.layers[0]._featureFilter.needGeometry,je=xa(he,Ue);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),je,D))continue;let vt=Z?X.evaluate(je,{},D):void 0,gt={id:oe,properties:he.properties,type:he.type,sourceLayerIndex:ge,index:ke,geometry:Ue?je.geometry:$l(he),patterns:{},sortKey:vt};G.push(gt)}Z&&G.sort(((he,oe)=>he.sortKey-oe.sortKey));for(let he of G){let{geometry:oe,index:ke,sourceLayerIndex:ge}=he,Ue=h[ke].feature;this.addFeature(he,oe,ke,D,Q),b.featureIndex.insert(Ue,oe,ke,ge,this.index)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,Lr),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(h,b,D,z,G=1){let X;switch(G){case 1:X=[0,7];break;case 3:X=[0,2,5,7];break;case 5:X=[0,1,3,4,6,7];break;case 7:X=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${G}; valid values are 1, 3, 5, 7.`)}let Z=X.length;for(let re of b)for(let Q of re){let he=Q.x,oe=Q.y;if(he<0||he>=j||oe<0||oe>=j)continue;let ke=this.segments.prepareSegment(Z*Z,this.layoutVertexArray,this.indexArray,h.sortKey),ge=ke.vertexLength;for(let Ue=0;Ue1){if(xs(M,h))return!0;for(let D of h)if(ar(D,M,b))return!0}for(let D of M)if(ar(D,h,b))return!0;return!1}function xs(M,h){if(M.length===0||h.length===0)return!1;for(let b=0;b1?b:b.sub(h)._mult(z)._add(h))}function Pr(M,h){let b,D,z,G=!1;for(let X of M){b=X;for(let Z=0,re=b.length-1;Zh.y!=z.y>h.y&&h.x<(z.x-D.x)*(h.y-D.y)/(z.y-D.y)+D.x&&(G=!G)}return G}function pn(M,h){let b=!1;for(let D=0,z=M.length-1;Dh.y!=X.y>h.y&&h.x<(X.x-G.x)*(h.y-G.y)/(X.y-G.y)+G.x&&(b=!b)}return b}function Mn(M,h,b){let D=b[0],z=b[2];if(M.xz.x&&h.x>z.x||M.yz.y&&h.y>z.y)return!1;let G=be(M,h,b[0]);return G!==be(M,h,b[1])||G!==be(M,h,b[2])||G!==be(M,h,b[3])}function sn(M,h,b){let D=h.paint.get(M).value;return D.kind==="constant"?D.value:b.programConfigurations.get(h.id).getMaxValue(M)}function tn(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1])}function Hr(M,h,b,D,z){if(!h[0]&&!h[1])return M;let G=o.convert(h)._mult(z);b==="viewport"&&G._rotate(-D);let X=[];for(let Z of M)X.push(Z.sub(G));return X}function Mr(M){let h=[];for(let b=0;bsa(_t,vt,gt,It)))})(Q,G,Z,re),Ue=he),Xn({queryGeometry:ge,size:Ue,transform:G,unwrappedTileID:Z,getElevation:re,pitchAlignment:ke,pitchScale:oe},z)}}class $i extends vr{}let Fi;_i("HeatmapBucket",$i,{omit:["layers"]});var ji={get paint(){return Fi=Fi||new ms({"heatmap-radius":new Di(Ct.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Di(Ct.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new wi(Ct.paint_heatmap["heatmap-intensity"]),"heatmap-color":new du(Ct.paint_heatmap["heatmap-color"]),"heatmap-opacity":new wi(Ct.paint_heatmap["heatmap-opacity"])})}};function Wi(M,{width:h,height:b},D,z){if(z){if(z instanceof Uint8ClampedArray)z=new Uint8Array(z.buffer);else if(z.length!==h*b*D)throw new RangeError(`mismatched image size. expected: ${z.length} but got: ${h*b*D}`)}else z=new Uint8Array(h*b*D);return M.width=h,M.height=b,M.data=z,M}function Fa(M,{width:h,height:b},D){if(h===M.width&&b===M.height)return;let z=Wi({},{width:h,height:b},D);Vs(M,z,{x:0,y:0},{x:0,y:0},{width:Math.min(M.width,h),height:Math.min(M.height,b)},D),M.width=h,M.height=b,M.data=z.data}function Vs(M,h,b,D,z,G){if(z.width===0||z.height===0)return h;if(z.width>M.width||z.height>M.height||b.x>M.width-z.width||b.y>M.height-z.height)throw new RangeError("out of range source coordinates for image copy");if(z.width>h.width||z.height>h.height||D.x>h.width-z.width||D.y>h.height-z.height)throw new RangeError("out of range destination coordinates for image copy");let X=M.data,Z=h.data;if(X===Z)throw new Error("srcData equals dstData, so image is already copied");for(let re=0;re{h[M.evaluationKey]=re;let Q=M.expression.evaluate(h);z.setPixel(X/4/b,Z/4,Q)};if(M.clips)for(let X=0,Z=0;Xthis.max&&(this.max=oe),oe=this.dim+1||b<-1||b>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${h}, y: ${b}, dim: ${this.dim}`);return(b+1)*this.stride+(h+1)}unpack(h,b,D){return h*this.redFactor+b*this.greenFactor+D*this.blueFactor-this.baseShift}pack(h){return yQ(h,this.getUnpackVector())}getPixels(){return new Kl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(h,b,D){if(this.dim!==h.dim)throw new Error("dem dimension mismatch");let z=b*this.dim,G=b*this.dim+this.dim,X=D*this.dim,Z=D*this.dim+this.dim;switch(b){case-1:z=G-1;break;case 1:G=z+1}switch(D){case-1:X=Z-1;break;case 1:Z=X+1}let re=-b*this.dim,Q=-D*this.dim;for(let he=X;he0)for(let X=h;X=h;X-=D)G=TQ(X/D|0,M[X],M[X+1],G);return G&&N_(G,G.next)&&(u4(G),G=G.next),G}function rx(M,h){if(!M)return M;h||(h=M);let b,D=M;do if(b=!1,D.steiner||!N_(D,D.next)&&Cu(D.prev,D,D.next)!==0)D=D.next;else{if(u4(D),D=h=D.prev,D===D.next)break;b=!0}while(b||D!==h);return h}function o4(M,h,b,D,z,G,X){if(!M)return;!X&&G&&(function(re,Q,he,oe){let ke=re;do ke.z===0&&(ke.z=VR(ke.x,ke.y,Q,he,oe)),ke.prevZ=ke.prev,ke.nextZ=ke.next,ke=ke.next;while(ke!==re);ke.prevZ.nextZ=null,ke.prevZ=null,(function(ge){let Ue,je=1;do{let vt,gt=ge;ge=null;let It=null;for(Ue=0;gt;){Ue++;let _t=gt,qt=0;for(let lr=0;lr0||tr>0&&_t;)qt!==0&&(tr===0||!_t||gt.z<=_t.z)?(vt=gt,gt=gt.nextZ,qt--):(vt=_t,_t=_t.nextZ,tr--),It?It.nextZ=vt:ge=vt,vt.prevZ=It,It=vt;gt=_t}It.nextZ=null,je*=2}while(Ue>1)})(ke)})(M,D,z,G);let Z=M;for(;M.prev!==M.next;){let re=M.prev,Q=M.next;if(G?Wrt(M,D,z,G):jrt(M))h.push(re.i,M.i,Q.i),u4(M),M=Q.next,Z=Q.next;else if((M=Q)===Z){X?X===1?o4(M=Yrt(rx(M),h),h,b,D,z,G,2):X===2&&Xrt(M,h,b,D,z,G):o4(rx(M),h,b,D,z,G,1);break}}}function jrt(M){let h=M.prev,b=M,D=M.next;if(Cu(h,b,D)>=0)return!1;let z=h.x,G=b.x,X=D.x,Z=h.y,re=b.y,Q=D.y,he=Math.min(z,G,X),oe=Math.min(Z,re,Q),ke=Math.max(z,G,X),ge=Math.max(Z,re,Q),Ue=D.next;for(;Ue!==h;){if(Ue.x>=he&&Ue.x<=ke&&Ue.y>=oe&&Ue.y<=ge&&s4(z,Z,G,re,X,Q,Ue.x,Ue.y)&&Cu(Ue.prev,Ue,Ue.next)>=0)return!1;Ue=Ue.next}return!0}function Wrt(M,h,b,D){let z=M.prev,G=M,X=M.next;if(Cu(z,G,X)>=0)return!1;let Z=z.x,re=G.x,Q=X.x,he=z.y,oe=G.y,ke=X.y,ge=Math.min(Z,re,Q),Ue=Math.min(he,oe,ke),je=Math.max(Z,re,Q),vt=Math.max(he,oe,ke),gt=VR(ge,Ue,h,b,D),It=VR(je,vt,h,b,D),_t=M.prevZ,qt=M.nextZ;for(;_t&&_t.z>=gt&&qt&&qt.z<=It;){if(_t.x>=ge&&_t.x<=je&&_t.y>=Ue&&_t.y<=vt&&_t!==z&&_t!==X&&s4(Z,he,re,oe,Q,ke,_t.x,_t.y)&&Cu(_t.prev,_t,_t.next)>=0||(_t=_t.prevZ,qt.x>=ge&&qt.x<=je&&qt.y>=Ue&&qt.y<=vt&&qt!==z&&qt!==X&&s4(Z,he,re,oe,Q,ke,qt.x,qt.y)&&Cu(qt.prev,qt,qt.next)>=0))return!1;qt=qt.nextZ}for(;_t&&_t.z>=gt;){if(_t.x>=ge&&_t.x<=je&&_t.y>=Ue&&_t.y<=vt&&_t!==z&&_t!==X&&s4(Z,he,re,oe,Q,ke,_t.x,_t.y)&&Cu(_t.prev,_t,_t.next)>=0)return!1;_t=_t.prevZ}for(;qt&&qt.z<=It;){if(qt.x>=ge&&qt.x<=je&&qt.y>=Ue&&qt.y<=vt&&qt!==z&&qt!==X&&s4(Z,he,re,oe,Q,ke,qt.x,qt.y)&&Cu(qt.prev,qt,qt.next)>=0)return!1;qt=qt.nextZ}return!0}function Yrt(M,h){let b=M;do{let D=b.prev,z=b.next.next;!N_(D,z)&&bQ(D,b,b.next,z)&&l4(D,z)&&l4(z,D)&&(h.push(D.i,b.i,z.i),u4(b),u4(b.next),b=M=z),b=b.next}while(b!==M);return rx(b)}function Xrt(M,h,b,D,z,G){let X=M;do{let Z=X.next.next;for(;Z!==X.prev;){if(X.i!==Z.i&&Qrt(X,Z)){let re=wQ(X,Z);return X=rx(X,X.next),re=rx(re,re.next),o4(X,h,b,D,z,G,0),void o4(re,h,b,D,z,G,0)}Z=Z.next}X=X.next}while(X!==M)}function Zrt(M,h){let b=M.x-h.x;return b===0&&(b=M.y-h.y,b===0)&&(b=(M.next.y-M.y)/(M.next.x-M.x)-(h.next.y-h.y)/(h.next.x-h.x)),b}function $rt(M,h){let b=(function(z,G){let X=G,Z=z.x,re=z.y,Q,he=-1/0;if(N_(z,X))return X;do{if(N_(z,X.next))return X.next;if(re<=X.y&&re>=X.next.y&&X.next.y!==X.y){let je=X.x+(re-X.y)*(X.next.x-X.x)/(X.next.y-X.y);if(je<=Z&&je>he&&(he=je,Q=X.x=X.x&&X.x>=ke&&Z!==X.x&&_Q(reQ.x||X.x===Q.x&&Krt(Q,X)))&&(Q=X,Ue=je)}X=X.next}while(X!==oe);return Q})(M,h);if(!b)return h;let D=wQ(b,M);return rx(D,D.next),rx(b,b.next)}function Krt(M,h){return Cu(M.prev,M,h.prev)<0&&Cu(h.next,M,M.next)<0}function VR(M,h,b,D,z){return(M=1431655765&((M=858993459&((M=252645135&((M=16711935&((M=(M-b)*z|0)|M<<8))|M<<4))|M<<2))|M<<1))|(h=1431655765&((h=858993459&((h=252645135&((h=16711935&((h=(h-D)*z|0)|h<<8))|h<<4))|h<<2))|h<<1))<<1}function Jrt(M){let h=M,b=M;do(h.x=(M-X)*(G-Z)&&(M-X)*(D-Z)>=(b-X)*(h-Z)&&(b-X)*(G-Z)>=(z-X)*(D-Z)}function s4(M,h,b,D,z,G,X,Z){return!(M===X&&h===Z)&&_Q(M,h,b,D,z,G,X,Z)}function Qrt(M,h){return M.next.i!==h.i&&M.prev.i!==h.i&&!(function(b,D){let z=b;do{if(z.i!==b.i&&z.next.i!==b.i&&z.i!==D.i&&z.next.i!==D.i&&bQ(z,z.next,b,D))return!0;z=z.next}while(z!==b);return!1})(M,h)&&(l4(M,h)&&l4(h,M)&&(function(b,D){let z=b,G=!1,X=(b.x+D.x)/2,Z=(b.y+D.y)/2;do z.y>Z!=z.next.y>Z&&z.next.y!==z.y&&X<(z.next.x-z.x)*(Z-z.y)/(z.next.y-z.y)+z.x&&(G=!G),z=z.next;while(z!==b);return G})(M,h)&&(Cu(M.prev,M,h.prev)||Cu(M,h.prev,h))||N_(M,h)&&Cu(M.prev,M,M.next)>0&&Cu(h.prev,h,h.next)>0)}function Cu(M,h,b){return(h.y-M.y)*(b.x-h.x)-(h.x-M.x)*(b.y-h.y)}function N_(M,h){return M.x===h.x&&M.y===h.y}function bQ(M,h,b,D){let z=ES(Cu(M,h,b)),G=ES(Cu(M,h,D)),X=ES(Cu(b,D,M)),Z=ES(Cu(b,D,h));return z!==G&&X!==Z||!(z!==0||!SS(M,b,h))||!(G!==0||!SS(M,D,h))||!(X!==0||!SS(b,M,D))||!(Z!==0||!SS(b,h,D))}function SS(M,h,b){return h.x<=Math.max(M.x,b.x)&&h.x>=Math.min(M.x,b.x)&&h.y<=Math.max(M.y,b.y)&&h.y>=Math.min(M.y,b.y)}function ES(M){return M>0?1:M<0?-1:0}function l4(M,h){return Cu(M.prev,M,M.next)<0?Cu(M,h,M.next)>=0&&Cu(M,M.prev,h)>=0:Cu(M,h,M.prev)<0||Cu(M,M.next,h)<0}function wQ(M,h){let b=GR(M.i,M.x,M.y),D=GR(h.i,h.x,h.y),z=M.next,G=h.prev;return M.next=h,h.prev=M,b.next=z,z.prev=b,D.next=b,b.prev=D,G.next=D,D.prev=G,D}function TQ(M,h,b,D){let z=GR(M,h,b);return D?(z.next=D.next,z.prev=D,D.next.prev=z,D.next=z):(z.prev=z,z.next=z),z}function u4(M){M.next.prev=M.prev,M.prev.next=M.next,M.prevZ&&(M.prevZ.nextZ=M.nextZ),M.nextZ&&(M.nextZ.prevZ=M.prevZ)}function GR(M,h,b){return{i:M,x:h,y:b,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class U_{constructor(h,b){if(b>h)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=h,this._minGranularity=b}getGranularityForZoomLevel(h){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||b>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let D=0|Math.round(h),z=0|Math.round(b),G=this._getKey(D,z);if(this._vertexDictionary.has(G))return this._vertexDictionary.get(G);let X=this._vertexBuffer.length/2;return this._vertexDictionary.set(G,X),this._vertexBuffer.push(D,z),X}_subdivideTrianglesScanline(h){if(this._granularity<2)return(function(z,G){let X=[];for(let Z=0;Z0?(X.push(re),X.push(he),X.push(Q)):(X.push(re),X.push(Q),X.push(he))}return X})(this._vertexBuffer,h);let b=[],D=h.length;for(let z=0;z=1||tr<=0)||gt&&(QG)){oe>=z&&oe<=G&&X.push(D[(Z+1)%3]);continue}!gt&&qt>0&&X.push(this._vertexToIndex(re+Ue*qt,Q+je*qt));let lr=re+Ue*Math.max(qt,0),qr=re+Ue*Math.min(tr,1);vt||this._generateIntraEdgeVertices(X,re,Q,he,oe,lr,qr),!gt&&tr<1&&X.push(this._vertexToIndex(re+Ue*tr,Q+je*tr)),(gt||oe>=z&&oe<=G)&&X.push(D[(Z+1)%3]),!gt&&(oe<=z||oe>=G)&&this._generateInterEdgeVertices(X,re,Q,he,oe,ke,ge,qr,z,G)}return X}_generateIntraEdgeVertices(h,b,D,z,G,X,Z){let re=z-b,Q=G-D,he=Q===0,oe=he?Math.min(b,z):Math.min(X,Z),ke=he?Math.max(b,z):Math.max(X,Z),ge=Math.floor(oe/this._granularityCellSize)+1,Ue=Math.ceil(ke/this._granularityCellSize)-1;if(he?b=ge;je--){let vt=je*this._granularityCellSize;h.push(this._vertexToIndex(vt,D+Q*(vt-b)/re))}}_generateInterEdgeVertices(h,b,D,z,G,X,Z,re,Q,he){let oe=G-D,ke=X-z,ge=Z-G,Ue=(Q-G)/ge,je=(he-G)/ge,vt=Math.min(Ue,je),gt=Math.max(Ue,je),It=z+ke*vt,_t=Math.floor(Math.min(It,re)/this._granularityCellSize)+1,qt=Math.ceil(Math.max(It,re)/this._granularityCellSize)-1,tr=re=1||gt<=0){let jr=D-Z,_n=X+(b-X)*Math.min((Q-Z)/jr,(he-Z)/jr);_t=Math.floor(Math.min(_n,re)/this._granularityCellSize)+1,qt=Math.ceil(Math.max(_n,re)/this._granularityCellSize)-1,tr=re<_n}let qr=oe>0?he:Q;if(tr)for(let jr=_t;jr<=qt;jr++)h.push(this._vertexToIndex(jr*this._granularityCellSize,qr));else for(let jr=qt;jr>=_t;jr--)h.push(this._vertexToIndex(jr*this._granularityCellSize,qr))}_generateOutline(h){let b=[];for(let D of h){let z=nx(D,this._granularity,!0),G=this._pointArrayToIndices(z),X=[];for(let Z=1;ZG!=(X===V_)?(h.push(b),h.push(D),h.push(this._vertexToIndex(z,X)),h.push(D),h.push(this._vertexToIndex(G,X)),h.push(this._vertexToIndex(z,X))):(h.push(D),h.push(b),h.push(this._vertexToIndex(z,X)),h.push(this._vertexToIndex(G,X)),h.push(D),h.push(this._vertexToIndex(z,X)))}_fillPoles(h,b,D){let z=this._vertexBuffer,G=j,X=h.length;for(let Z=2;Z80*oe){vt=Q[0],gt=Q[1];let _t=vt,qt=gt;for(let tr=oe;tr_t&&(_t=lr),qr>qt&&(qt=qr)}It=Math.max(_t-vt,qt-gt),It=It!==0?32767/It:0}return o4(Ue,je,oe,vt,gt,It,0),je})(D,z),re=this._convertIndices(D,Z);G=this._subdivideTrianglesScanline(re)}catch(Z){console.error(Z)}let X=[];return b&&(X=this._generateOutline(h)),this._ensureNoPoleVertices(),this._handlePoles(G),{verticesFlattened:this._vertexBuffer,indicesTriangles:G,indicesLineList:X}}_convertIndices(h,b){let D=[];for(let z of b)D.push(this._vertexToIndex(h[2*z],h[2*z+1]));return D}_pointArrayToIndices(h){let b=[];for(let D of h)b.push(this._vertexToIndex(D.x,D.y));return b}}function AQ(M,h,b,D=!0){return new ent(b,h).subdividePolygonInternal(M,D)}function nx(M,h,b=!1){if(!M||M.length<1)return[];if(M.length<2)return[];let D=M[0],z=M[M.length-1],G=b&&(D.x!==z.x||D.y!==z.y);if(h<2)return G?[...M,M[0]]:[...M];let X=Math.floor(j/h),Z=[];Z.push(new o(M[0].x,M[0].y));let re=M.length,Q=G?re:re-1;for(let he=0;he0?(Math.floor(qr/X)+1)*X:(Math.ceil(qr/X)-1)*X,Dn=qt>0?(Math.floor(jr/X)+1)*X:(Math.ceil(jr/X)-1)*X,Hn=Math.abs(qr-fn),Ln=Math.abs(jr-Dn),un=Math.abs(qr-je),ei=Math.abs(jr-vt),ci=gt?Hn/tr:Number.POSITIVE_INFINITY,ti=It?Ln/lr:Number.POSITIVE_INFINITY;if((un<=Hn||!gt)&&(ei<=Ln||!It))break;if(ci=0?X-1:G-1,Q=(Z+1)%G,he=M[2*h[re]],oe=M[2*h[Q]],ke=M[2*h[X]],ge=M[2*h[X]+1],Ue=M[2*h[Z]+1],je=!1;if(heoe)je=!1;else{let vt=Ue-ge,gt=-(M[2*h[Z]]-ke),It=ge((oe-ke)*vt+(M[2*h[Q]+1]-ge)*gt)*It&&(je=!0)}if(je){let vt=h[re],gt=h[X],It=h[Z];vt!==gt&&vt!==It&>!==It&&b.push(It,gt,vt),X--,X<0&&(X=G-1)}else{let vt=h[Q],gt=h[X],It=h[Z];vt!==gt&&vt!==It&>!==It&&b.push(It,gt,vt),Z++,Z>=G&&(Z=0)}if(re===Q)break}}function MQ(M,h,b,D,z,G,X,Z,re){let Q=z.length/2,he=X&&Z&&re;if(Qan.MAX_VERTEX_ARRAY_LENGTH&&(qt=oe.createNewSegment(ke,ge),_t=It.count,fn=!0,Dn=!0,Hn=!0,tr=0);let Ln=f4(gt,Ue,vt,It,qr,fn,qt),un=f4(gt,Ue,vt,It,jr,Dn,qt),ei=f4(gt,Ue,vt,It,_n,Hn,qt);ge.emplaceBack(tr+Ln-_t,tr+un-_t,tr+ei-_t),qt.primitiveLength++}})(h,b,D,z,G,M),he&&(function(oe,ke,ge,Ue,je,vt){let gt=[];for(let lr=0;lran.MAX_VERTEX_ARRAY_LENGTH&&(qt=oe.createNewSegment(ke,ge),_t=It.count,fn=!0,Dn=!0,tr=0);let Hn=f4(gt,Ue,vt,It,jr,fn,qt),Ln=f4(gt,Ue,vt,It,_n,Dn,qt);ge.emplaceBack(tr+Hn-_t,tr+Ln-_t),qt.primitiveLength++}})(X,b,Z,z,re,M),h.forceNewSegmentOnNextPrepare(),X==null||X.forceNewSegmentOnNextPrepare()}function f4(M,h,b,D,z,G,X){if(G){let Z=D.count;return b(h[2*z],h[2*z+1]),M[z]=D.count,D.count++,X.vertexLength++,Z}return M[z]}class HR{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new xt,this.indexArray=new Er,this.indexArray2=new Tr,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.segments2=new an,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.hasDependencies=MS("fill",this.layers,b);let z=this.layers[0].layout.get("fill-sort-key"),G=!z.isConstant(),X=[];for(let{feature:Z,id:re,index:Q,sourceLayerIndex:he}of h){let oe=this.layers[0]._featureFilter.needGeometry,ke=xa(Z,oe);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),ke,D))continue;let ge=G?z.evaluate(ke,{},D,b.availableImages):void 0,Ue={id:re,properties:Z.properties,type:Z.type,sourceLayerIndex:he,index:Q,geometry:oe?ke.geometry:$l(Z),patterns:{},sortKey:ge};X.push(Ue)}G&&X.sort(((Z,re)=>Z.sortKey-re.sortKey));for(let Z of X){let{geometry:re,index:Q,sourceLayerIndex:he}=Z;if(this.hasDependencies){let oe=UR("fill",this.layers,Z,{zoom:this.zoom},b);this.patternFeatures.push(oe)}else this.addFeature(Z,re,Q,D,{},b.subdivisionGranularity);b.featureIndex.insert(h[Q].feature,re,Q,he,this.index)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}addFeatures(h,b,D){for(let z of this.patternFeatures)this.addFeature(z,z.geometry,z.index,b,D,h.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,Hrt),this.indexBuffer=h.createIndexBuffer(this.indexArray),this.indexBuffer2=h.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(h,b,D,z,G,X){for(let Z of uh(b,500)){let re=AQ(Z,z,X.fill.getGranularityForZoomLevel(z.z)),Q=this.layoutVertexArray;MQ(((he,oe)=>{Q.emplaceBack(he,oe)}),this.segments,this.layoutVertexArray,this.indexArray,re.verticesFlattened,re.indicesTriangles,this.segments2,this.indexArray2,re.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,h,D,{imagePositions:G,canonical:z})}}let SQ,EQ;_i("FillBucket",HR,{omit:["layers","patternFeatures"]});var rnt={get paint(){return EQ=EQ||new ms({"fill-antialias":new wi(Ct.paint_fill["fill-antialias"]),"fill-opacity":new Di(Ct.paint_fill["fill-opacity"]),"fill-color":new Di(Ct.paint_fill["fill-color"]),"fill-outline-color":new Di(Ct.paint_fill["fill-outline-color"]),"fill-translate":new wi(Ct.paint_fill["fill-translate"]),"fill-translate-anchor":new wi(Ct.paint_fill["fill-translate-anchor"]),"fill-pattern":new fl(Ct.paint_fill["fill-pattern"])})},get layout(){return SQ=SQ||new ms({"fill-sort-key":new Di(Ct.layout_fill["fill-sort-key"])})}};class nnt extends hl{constructor(h,b){super(h,rnt,b)}recalculate(h,b){super.recalculate(h,b);let D=this.paint._values["fill-outline-color"];D.value.kind==="constant"&&D.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(h){return new HR(h)}queryRadius(){return tn(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:h,geometry:b,transform:D,pixelsToTileUnits:z}){return Gi(Hr(h,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-D.bearingInRadians,z),b)}isTileClipped(){return!0}}let int=Re([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),ant=Re([{name:"a_centroid",components:2,type:"Int16"}],4),{members:ont}=int;class h4{constructor(h,b,D,z,G){this.properties={},this.extent=D,this.type=0,this.id=void 0,this._pbf=h,this._geometry=-1,this._keys=z,this._values=G,h.readFields(snt,this,b)}loadGeometry(){let h=this._pbf;h.pos=this._geometry;let b=h.readVarint()+h.pos,D=[],z,G=1,X=0,Z=0,re=0;for(;h.pos>3}if(X--,G===1||G===2)Z+=h.readSVarint(),re+=h.readSVarint(),G===1&&(z&&D.push(z),z=[]),z&&z.push(new o(Z,re));else{if(G!==7)throw new Error(`unknown command ${G}`);z&&z.push(z[0].clone())}}return z&&D.push(z),D}bbox(){let h=this._pbf;h.pos=this._geometry;let b=h.readVarint()+h.pos,D=1,z=0,G=0,X=0,Z=1/0,re=-1/0,Q=1/0,he=-1/0;for(;h.pos>3}if(z--,D===1||D===2)G+=h.readSVarint(),X+=h.readSVarint(),Gre&&(re=G),Xhe&&(he=X);else if(D!==7)throw new Error(`unknown command ${D}`)}return[Z,Q,re,he]}toGeoJSON(h,b,D){let z=this.extent*Math.pow(2,D),G=this.extent*h,X=this.extent*b,Z=this.loadGeometry();function re(ke){return[360*(ke.x+G)/z-180,360/Math.PI*Math.atan(Math.exp((1-2*(ke.y+X)/z)*Math.PI))-90]}function Q(ke){return ke.map(re)}let he;if(this.type===1){let ke=[];for(let Ue of Z)ke.push(Ue[0]);let ge=Q(ke);he=ke.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge}}else if(this.type===2){let ke=Z.map(Q);he=ke.length===1?{type:"LineString",coordinates:ke[0]}:{type:"MultiLineString",coordinates:ke}}else{if(this.type!==3)throw new Error("unknown feature type");{let ke=kQ(Z),ge=[];for(let Ue of ke)ge.push(Ue.map(Q));he=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge}}}let oe={type:"Feature",geometry:he,properties:this.properties};return this.id!=null&&(oe.id=this.id),oe}}function snt(M,h,b){M===1?h.id=b.readVarint():M===2?(function(D,z){let G=D.readVarint()+D.pos;for(;D.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[h];let b=this._pbf.readVarint()+this._pbf.pos;return new h4(this._pbf,b,this.extent,this._keys,this._values)}}function cnt(M,h,b){M===15?h.version=b.readVarint():M===1?h.name=b.readString():M===5?h.extent=b.readVarint():M===2?h._features.push(b.pos):M===3?h._keys.push(b.readString()):M===4&&h._values.push((function(D){let z=null,G=D.readVarint()+D.pos;for(;D.pos>3;z=X===1?D.readString():X===2?D.readFloat():X===3?D.readDouble():X===4?D.readVarint64():X===5?D.readVarint():X===6?D.readSVarint():X===7?D.readBoolean():null}if(z==null)throw new Error("unknown feature value");return z})(b))}class CQ{constructor(h,b){this.layers=h.readFields(fnt,{},b)}}function fnt(M,h,b){if(M===3){let D=new unt(b,b.readVarint()+b.pos);D.length&&(h[D.name]=D)}}let jR=Math.pow(2,13);function d4(M,h,b,D,z,G,X,Z){M.emplaceBack(h,b,2*Math.floor(D*jR)+X,z*jR*2,G*jR*2,Math.round(Z))}class WR{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.layoutVertexArray=new Et,this.centroidVertexArray=new Xe,this.indexArray=new Er,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.features=[],this.hasDependencies=MS("fill-extrusion",this.layers,b);for(let{feature:z,id:G,index:X,sourceLayerIndex:Z}of h){let re=this.layers[0]._featureFilter.needGeometry,Q=xa(z,re);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),Q,D))continue;let he={id:G,sourceLayerIndex:Z,index:X,geometry:re?Q.geometry:$l(z),properties:z.properties,type:z.type,patterns:{}};this.hasDependencies?this.features.push(UR("fill-extrusion",this.layers,he,{zoom:this.zoom},b)):this.addFeature(he,he.geometry,X,D,{},b.subdivisionGranularity),b.featureIndex.insert(z,he.geometry,X,Z,this.index,!0)}}addFeatures(h,b,D){for(let z of this.features){let{geometry:G}=z;this.addFeature(z,G,z.index,b,D,h.subdivisionGranularity)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,ont),this.centroidVertexBuffer=h.createVertexBuffer(this.centroidVertexArray,ant.members,!0),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(h,b,D,z,G,X){for(let Z of uh(b,500)){let re={x:0,y:0,sampleCount:0},Q=this.layoutVertexArray.length;this.processPolygon(re,z,h,Z,X);let he=this.layoutVertexArray.length-Q,oe=Math.floor(re.x/re.sampleCount),ke=Math.floor(re.y/re.sampleCount);for(let ge=0;ge{d4(he,oe,ke,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,Q.verticesFlattened,Q.indicesTriangles)}_generateSideFaces(h,b){let D=0;for(let z=1;zan.MAX_VERTEX_ARRAY_LENGTH&&(b.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let Z=G.sub(X)._perp()._unit(),re=X.dist(G);D+re>32768&&(D=0),d4(this.layoutVertexArray,G.x,G.y,Z.x,Z.y,0,0,D),d4(this.layoutVertexArray,G.x,G.y,Z.x,Z.y,0,1,D),D+=re,d4(this.layoutVertexArray,X.x,X.y,Z.x,Z.y,0,0,D),d4(this.layoutVertexArray,X.x,X.y,Z.x,Z.y,0,1,D);let Q=b.segment.vertexLength;this.indexArray.emplaceBack(Q,Q+2,Q+1),this.indexArray.emplaceBack(Q+1,Q+2,Q+3),b.segment.vertexLength+=4,b.segment.primitiveLength+=2}}}function hnt(M,h){for(let b=0;bj)||M.y===h.y&&(M.y<0||M.y>j)}function LQ(M){return M.every((h=>h.x<0))||M.every((h=>h.x>j))||M.every((h=>h.y<0))||M.every((h=>h.y>j))}let PQ;_i("FillExtrusionBucket",WR,{omit:["layers","features"]});var vnt={get paint(){return PQ=PQ||new ms({"fill-extrusion-opacity":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fl(Ct["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class pnt extends hl{constructor(h,b){super(h,vnt,b)}createBucket(h){return new WR(h)}queryRadius(){return tn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:h,feature:b,featureState:D,geometry:z,transform:G,pixelsToTileUnits:X,pixelPosMatrix:Z}){let re=Hr(h,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-G.bearingInRadians,X),Q=this.paint.get("fill-extrusion-height").evaluate(b,D),he=this.paint.get("fill-extrusion-base").evaluate(b,D),oe=(function(ge,Ue){let je=[];for(let vt of ge){let gt=[vt.x,vt.y,0,1];I(gt,gt,Ue),je.push(new o(gt[0]/gt[3],gt[1]/gt[3]))}return je})(re,Z),ke=(function(ge,Ue,je,vt){let gt=[],It=[],_t=vt[8]*Ue,qt=vt[9]*Ue,tr=vt[10]*Ue,lr=vt[11]*Ue,qr=vt[8]*je,jr=vt[9]*je,_n=vt[10]*je,fn=vt[11]*je;for(let Dn of ge){let Hn=[],Ln=[];for(let un of Dn){let ei=un.x,ci=un.y,ti=vt[0]*ei+vt[4]*ci+vt[12],di=vt[1]*ei+vt[5]*ci+vt[13],_a=vt[2]*ei+vt[6]*ci+vt[14],Ao=vt[3]*ei+vt[7]*ci+vt[15],us=_a+tr,ks=Ao+lr,Uf=ti+qr,Jl=di+jr,_c=_a+_n,zc=Ao+fn,Sl=new o((ti+_t)/ks,(di+qt)/ks);Sl.z=us/ks,Hn.push(Sl);let df=new o(Uf/zc,Jl/zc);df.z=_c/zc,Ln.push(df)}gt.push(Hn),It.push(Ln)}return[gt,It]})(z,he,Q,Z);return(function(ge,Ue,je){let vt=1/0;Gi(je,Ue)&&(vt=FQ(je,Ue[0]));for(let gt=0;gt>4;if(z!==1)throw new Error(`Got v${z} data when expected v1.`);let G=DQ[15&D];if(!G)throw new Error("Unrecognized array type.");let[X]=new Uint16Array(h,2,1),[Z]=new Uint32Array(h,4,1);return new CS(Z,X,G,h)}constructor(h,b=64,D=Float64Array,z){if(isNaN(h)||h<0)throw new Error(`Unpexpected numItems value: ${h}.`);this.numItems=+h,this.nodeSize=Math.min(Math.max(+b,2),65535),this.ArrayType=D,this.IndexArrayType=h<65536?Uint16Array:Uint32Array;let G=DQ.indexOf(this.ArrayType),X=2*h*this.ArrayType.BYTES_PER_ELEMENT,Z=h*this.IndexArrayType.BYTES_PER_ELEMENT,re=(8-Z%8)%8;if(G<0)throw new Error(`Unexpected typed array class: ${D}.`);z&&z instanceof ArrayBuffer?(this.data=z,this.ids=new this.IndexArrayType(this.data,8,h),this.coords=new this.ArrayType(this.data,8+Z+re,2*h),this._pos=2*h,this._finished=!0):(this.data=new ArrayBuffer(8+X+Z+re),this.ids=new this.IndexArrayType(this.data,8,h),this.coords=new this.ArrayType(this.data,8+Z+re,2*h),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+G]),new Uint16Array(this.data,2,1)[0]=b,new Uint32Array(this.data,4,1)[0]=h)}add(h,b){let D=this._pos>>1;return this.ids[D]=D,this.coords[this._pos++]=h,this.coords[this._pos++]=b,D}finish(){let h=this._pos>>1;if(h!==this.numItems)throw new Error(`Added ${h} items when expected ${this.numItems}.`);return YR(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(h,b,D,z){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:G,coords:X,nodeSize:Z}=this,re=[0,G.length-1,0],Q=[];for(;re.length;){let he=re.pop()||0,oe=re.pop()||0,ke=re.pop()||0;if(oe-ke<=Z){for(let vt=ke;vt<=oe;vt++){let gt=X[2*vt],It=X[2*vt+1];gt>=h&><=D&&It>=b&&It<=z&&Q.push(G[vt])}continue}let ge=ke+oe>>1,Ue=X[2*ge],je=X[2*ge+1];Ue>=h&&Ue<=D&&je>=b&&je<=z&&Q.push(G[ge]),(he===0?h<=Ue:b<=je)&&(re.push(ke),re.push(ge-1),re.push(1-he)),(he===0?D>=Ue:z>=je)&&(re.push(ge+1),re.push(oe),re.push(1-he))}return Q}within(h,b,D){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:z,coords:G,nodeSize:X}=this,Z=[0,z.length-1,0],re=[],Q=D*D;for(;Z.length;){let he=Z.pop()||0,oe=Z.pop()||0,ke=Z.pop()||0;if(oe-ke<=X){for(let vt=ke;vt<=oe;vt++)IQ(G[2*vt],G[2*vt+1],h,b)<=Q&&re.push(z[vt]);continue}let ge=ke+oe>>1,Ue=G[2*ge],je=G[2*ge+1];IQ(Ue,je,h,b)<=Q&&re.push(z[ge]),(he===0?h-D<=Ue:b-D<=je)&&(Z.push(ke),Z.push(ge-1),Z.push(1-he)),(he===0?h+D>=Ue:b+D>=je)&&(Z.push(ge+1),Z.push(oe),Z.push(1-he))}return re}}function YR(M,h,b,D,z,G){if(z-D<=b)return;let X=D+z>>1;RQ(M,h,X,D,z,G),YR(M,h,b,D,X-1,1-G),YR(M,h,b,X+1,z,1-G)}function RQ(M,h,b,D,z,G){for(;z>D;){if(z-D>600){let Q=z-D+1,he=b-D+1,oe=Math.log(Q),ke=.5*Math.exp(2*oe/3),ge=.5*Math.sqrt(oe*ke*(Q-ke)/Q)*(he-Q/2<0?-1:1);RQ(M,h,b,Math.max(D,Math.floor(b-he*ke/Q+ge)),Math.min(z,Math.floor(b+(Q-he)*ke/Q+ge)),G)}let X=h[2*b+G],Z=D,re=z;for(p4(M,h,D,b),h[2*z+G]>X&&p4(M,h,D,z);ZX;)re--}h[2*D+G]===X?p4(M,h,D,re):(re++,p4(M,h,re,z)),re<=b&&(D=re+1),b<=re&&(z=re-1)}}function p4(M,h,b,D){XR(M,b,D),XR(h,2*b,2*D),XR(h,2*b+1,2*D+1)}function XR(M,h,b){let D=M[h];M[h]=M[b],M[b]=D}function IQ(M,h,b,D){let z=M-b,G=h-D;return z*z+G*G}function ZR(M,h,b,D){let z=D,G=h+(b-h>>1),X,Z=b-h,re=M[h],Q=M[h+1],he=M[b],oe=M[b+1];for(let ke=h+3;kez)X=ke,z=ge;else if(ge===z){let Ue=Math.abs(ke-G);UeD&&(X-h>3&&ZR(M,h,X,D),M[X+2]=z,b-X>3&&ZR(M,X,b,D))}function gnt(M,h,b,D,z,G){let X=z-b,Z=G-D;if(X!==0||Z!==0){let re=((M-b)*X+(h-D)*Z)/(X*X+Z*Z);re>1?(b=z,D=G):re>0&&(b+=X*re,D+=Z*re)}return X=M-b,Z=h-D,X*X+Z*Z}function hf(M,h,b,D){let z={type:h,geom:b},G={id:M==null?null:M,type:z.type,geometry:z.geom,tags:D,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(z.type){case"Point":case"MultiPoint":g4(G,z.geom);break;case"LineString":g4(G,z.geom.points);break;case"Polygon":g4(G,z.geom[0].points);break;case"MultiLineString":for(let X of z.geom)g4(G,X.points);break;case"MultiPolygon":for(let X of z.geom)g4(G,X[0].points)}return G}function $R(M){M.points.length>64&&(M.points=new Float64Array(M.points))}function g4(M,h){for(let b=0;b0&&(X+=D?(z*he-Q*G)/2:Math.sqrt(Math.pow(Q-z,2)+Math.pow(he-G,2))),z=Q,G=he}let Z=h.points.length-3;h.points[2]=1,b>0&&ZR(h.points,0,Z,b),h.points[Z+2]=1,$R(h),h.size=Math.abs(X),h.start=0,h.end=h.size}function QR(M,h,b,D){for(let z=0;z1?1:b}function PS(M){let h={type:"Feature",geometry:mnt(M),properties:M.tags};return M.id!=null&&(h.id=M.id),h}function mnt(M){let{type:h,geometry:b}=M;switch(h){case"Point":return{type:h,coordinates:zQ(b[0],b[1])};case"MultiPoint":return{type:h,coordinates:FS(b)};case"LineString":return{type:h,coordinates:FS(b.points)};case"MultiLineString":case"Polygon":return{type:h,coordinates:b.map((D=>FS(D.points)))};case"MultiPolygon":return{type:h,coordinates:b.map((D=>D.map((z=>FS(z.points)))))}}}function FS(M){let h=[];for(let b=0;b=(b/=h)&&X=D)return null;let re=[];for(let Q of M){let he=z===yh.X?Q.minX:Q.minY,oe=z===yh.X?Q.maxX:Q.maxY;if(he>=b&&oe=D))switch(Q.type){case"Point":case"MultiPoint":ynt(Q,re,b,D,z);continue;case"LineString":xnt(Q,re,b,D,z,Z);continue;case"MultiLineString":_nt(Q,re,b,D,z);continue;case"Polygon":bnt(Q,re,b,D,z);continue;case"MultiPolygon":wnt(Q,re,b,D,z);continue}}return re.length?re:null}function ynt(M,h,b,D,z){let G=[];(function(X,Z,re,Q,he){for(let oe=0;oe=re&&ke<=Q&&j_(Z,X[oe],X[oe+1],X[oe+2])}})(M.geometry,G,b,D,z),G.length&&h.push(hf(M.id,G.length===3?"Point":"MultiPoint",G,M.tags))}function xnt(M,h,b,D,z,G){let X=[];if(OQ(M.geometry,X,b,D,z,!1,G.lineMetrics),X.length)if(G.lineMetrics)for(let Z of X)h.push(hf(M.id,"LineString",Z,M.tags));else h.push(X.length>1?hf(M.id,"MultiLineString",X,M.tags):hf(M.id,"LineString",X[0],M.tags))}function _nt(M,h,b,D,z){let G=[];eI(M.geometry,G,b,D,z,!1),G.length&&h.push(G.length!==1?hf(M.id,"MultiLineString",G,M.tags):hf(M.id,"LineString",G[0],M.tags))}function bnt(M,h,b,D,z){let G=[];eI(M.geometry,G,b,D,z,!0),G.length&&h.push(hf(M.id,"Polygon",G,M.tags))}function wnt(M,h,b,D,z){let G=[];for(let X of M.geometry){let Z=[];eI(X,Z,b,D,z,!0),Z.length&&G.push(Z)}G.length&&h.push(hf(M.id,"MultiPolygon",G,M.tags))}function OQ(M,h,b,D,z,G,X){let Z=NQ(M),re=z===yh.X?Tnt:Ant,Q,he,oe=M.start;for(let vt=0;vtb&&(he=re(Z,gt,It,qt,tr,b),X&&(Z.start=oe+Q*he)):lr>D?qr=b&&(he=re(Z,gt,It,qt,tr,b),jr=!0),qr>D&&lr<=D&&(he=re(Z,gt,It,qt,tr,D),jr=!0),!G&&jr&&(X&&(Z.end=oe+Q*he),h.push(Z),Z=NQ(M)),X&&(oe+=Q)}let ke=M.points.length-3,ge=M.points[ke],Ue=M.points[ke+1],je=z===yh.X?ge:Ue;je>=b&&je<=D&&j_(Z.points,ge,Ue,M.points[ke+2]),ke=Z.points.length-3,G&&ke>=3&&(Z.points[ke]!==Z.points[0]||Z.points[ke+1]!==Z.points[1])&&j_(Z.points,Z.points[0],Z.points[1],Z.points[2]),Z.points.length&&($R(Z),h.push(Z))}function NQ(M){return{points:[],size:M.size,start:M.start,end:M.end}}function eI(M,h,b,D,z,G){for(let X of M)OQ(X,h,b,D,z,G,!1)}function j_(M,h,b,D){M.push(h,b,D)}function Tnt(M,h,b,D,z,G){let X=(G-h)/(D-h);return j_(M.points,G,b+(z-b)*X,1),X}function Ant(M,h,b,D,z,G){let X=(G-b)/(z-b);return j_(M.points,h+(D-h)*X,G,1),X}function tI(M,h){let b=h.buffer/h.extent,D=M,z=O1(M,1,-1-b,b,yh.X,-1,2,h),G=O1(M,1,1-b,2+b,yh.X,-1,2,h);return(z||G)&&(D=O1(M,1,-b,1+b,yh.X,-1,2,h)||[],z&&(D=UQ(z,1).concat(D)),G&&(D=D.concat(UQ(G,-1)))),D}function UQ(M,h){let b=[];for(let D of M)switch(D.type){case"Point":case"MultiPoint":{let z=Mnt(D.geometry,h);b.push(hf(D.id,D.type,z,D.tags));continue}case"LineString":{let z=rI(D.geometry,h);b.push(hf(D.id,D.type,z,D.tags));continue}case"MultiLineString":case"Polygon":{let z=[];for(let G of D.geometry)z.push(rI(G,h));b.push(hf(D.id,D.type,z,D.tags));continue}case"MultiPolygon":{let z=[];for(let G of D.geometry){let X=[];for(let Z of G)X.push(rI(Z,h));z.push(X)}b.push(hf(D.id,D.type,z,D.tags));continue}}return b}function Mnt(M,h){let b=[];for(let D=0;D0||((X=h.addOrUpdateProperties)==null?void 0:X.length)>0;if(D){let Z=M[0],re=KR({type:"FeatureCollection",features:[{type:"Feature",id:Z.id,geometry:h.newGeometry,properties:z?VQ(Z.tags,h):Z.tags}]},b);return re=tI(re,b),re}if(z){let Z=[];for(let re of M){let Q=zo({},re);Q.tags=VQ(Q.tags,h),Z.push(Q)}return Z}return M}function VQ(M,h){if(h.removeAllProperties)return{};let b=zo({},M||{});if(h.removeProperties)for(let D of h.removeProperties)delete b[D];if(h.addOrUpdateProperties)for(let{key:D,value:z}of h.addOrUpdateProperties)b[D]=z;return b}(function(M){M[M.X=0]="X",M[M.Y=1]="Y"})(yh||(yh={}));let nI={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:M=>M};class Ent{constructor(h){this.options=Object.assign(Object.create(nI),h),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(h){let b=[];for(let D of h){if(!D.geometry)continue;let[z,G]=D.geometry.coordinates,[X,Z]=[G_(z),H_(G)];b.push({id:D.id,type:"Point",geometry:[X,Z],tags:D.properties})}this.createIndex(b)}initialize(h){let b=[];for(let D of h)D.type==="Point"&&b.push(D);this.createIndex(b)}updateIndex(h,b,D){this.options=Object.assign(Object.create(nI),D.clusterOptions),this.initialize(h)}createIndex(h){let{log:b,minZoom:D,maxZoom:z}=this.options;b&&console.time("total time");let G=`prepare ${h.length} points`;b&&console.time(G),this.points=h;let X=[];for(let re=0;re=D;re--){let Q=Date.now();Z=this.trees[re]=this.createTree(this.cluster(Z,re)),b&&console.log("z%d: %d clusters in %dms",re,Z.numItems,Date.now()-Q)}b&&console.timeEnd("total time")}getClusters(h,b){return this.getClustersInternal(h,b).map((D=>PS(D)))}getClustersInternal(h,b){let D=((h[0]+180)%360+360)%360-180,z=Math.max(-90,Math.min(90,h[1])),G=h[2]===180?180:((h[2]+180)%360+360)%360-180,X=Math.max(-90,Math.min(90,h[3]));if(h[2]-h[0]>=360)D=-180,G=180;else if(D>G){let oe=this.getClustersInternal([D,z,180,X],b),ke=this.getClustersInternal([-180,z,G,X],b);return oe.concat(ke)}let Z=this.trees[this.limitZoom(b)],re=Z.range(G_(D),H_(X),G_(G),H_(z)),Q=Z.flatData,he=[];for(let oe of re){let ke=this.stride*oe;he.push(Q[ke+5]>1?knt(Q,ke,this.clusterProps):this.points[Q[ke+3]])}return he}getChildren(h){let b=this.getOriginId(h),D=this.getOriginZoom(h),z=new Error("No cluster with the specified id: "+h),G=this.trees[D];if(!G)throw z;let X=G.flatData;if(b*this.stride>=X.length)throw z;let Z=this.options.radius/(this.options.extent*Math.pow(2,D-1)),re=G.within(X[b*this.stride],X[b*this.stride+1],Z),Q=[];for(let he of re){let oe=he*this.stride;X[oe+4]===h&&Q.push(X[oe+5]>1?Cnt(X,oe,this.clusterProps):PS(this.points[X[oe+3]]))}if(Q.length===0)throw z;return Q}getLeaves(h,b,D){let z=[];return this.appendLeaves(z,h,b=b||10,D=D||0,0),z}getTile(h,b,D){let z=this.trees[this.limitZoom(h)];if(!z)return null;let G=Math.pow(2,h),{extent:X,radius:Z}=this.options,re=Z/X,Q=(D-re)/G,he=(D+1+re)/G,oe={transformed:!0,features:[],source:null,x:b,y:D,z:h};return this.addTileFeatures(z.range((b-re)/G,Q,(b+1+re)/G,he),z.flatData,b,D,G,oe),b===0&&this.addTileFeatures(z.range(1-re/G,Q,1,he),z.flatData,G,D,G,oe),b===G-1&&this.addTileFeatures(z.range(0,Q,re/G,he),z.flatData,-1,D,G,oe),oe}getClusterExpansionZoom(h){return this.getOriginZoom(h)}appendLeaves(h,b,D,z,G){let X=this.getChildren(b);for(let Z of X){let re=Z.properties;if(re!=null&&re.cluster?G+re.point_count<=z?G+=re.point_count:G=this.appendLeaves(h,re.cluster_id,D,z,G):G1,he,oe,ke;if(Q)he=iI(b,re,this.clusterProps),oe=b[re],ke=b[re+1];else{let je=this.points[b[re+3]];he=je.tags,[oe,ke]=je.geometry}let ge={type:1,geometry:[[Math.round(this.options.extent*(oe*G-D)),Math.round(this.options.extent*(ke*G-z))]],tags:he},Ue;Ue=Q||this.options.generateId?b[re+3]:this.points[b[re+3]].id,Ue!==void 0&&(ge.id=Ue),X.features.push(ge)}}limitZoom(h){return Math.max(this.options.minZoom,Math.min(Math.floor(+h),this.options.maxZoom+1))}cluster(h,b){let{radius:D,extent:z,reduce:G,minPoints:X}=this.options,Z=D/(z*Math.pow(2,b)),re=h.flatData,Q=[],he=this.stride;for(let oe=0;oeb&&(vt+=re[It+5])}if(vt>je&&vt>=X){let gt,It=ke*je,_t=ge*je,qt=-1,tr=(oe/he<<5)+(b+1)+this.points.length;for(let lr of Ue){let qr=lr*he;if(re[qr+2]<=b)continue;re[qr+2]=b;let jr=re[qr+5];It+=re[qr]*jr,_t+=re[qr+1]*jr,re[qr+4]=tr,G&&(gt||(gt=this.map(re,oe,!0),qt=this.clusterProps.length,this.clusterProps.push(gt)),G(gt,this.map(re,qr)))}re[oe+4]=tr,Q.push(It/vt,_t/vt,1/0,tr,-1,vt),G&&Q.push(qt)}else{for(let gt=0;gt1)for(let gt of Ue){let It=gt*he;if(!(re[It+2]<=b)){re[It+2]=b;for(let _t=0;_t>5}getOriginZoom(h){return(h-this.points.length)%32}map(h,b,D){if(h[b+5]>1){let X=this.clusterProps[h[b+6]];return D?Object.assign({},X):X}let z=this.points[h[b+3]].tags,G=this.options.map(z);return D&&G===z?Object.assign({},G):G}}function knt(M,h,b){return{id:M[h+3],type:"Point",tags:iI(M,h,b),geometry:[M[h],M[h+1]]}}function Cnt(M,h,b){return{type:"Feature",id:M[h+3],properties:iI(M,h,b),geometry:{type:"Point",coordinates:[qQ(M[h]),BQ(M[h+1])]}}}function iI(M,h,b){let D=M[h+5],z=D>=1e4?`${Math.round(D/1e3)}k`:D>=1e3?Math.round(D/100)/10+"k":D,G=M[h+6],X=G===-1?{}:Object.assign({},b[G]);return Object.assign(X,{cluster:!0,cluster_id:M[h+3],point_count:D,point_count_abbreviated:z})}let aI="geojsonvt_clip_start",oI="geojsonvt_clip_end";function GQ(M,h,b,D,z){let G=h===z.maxZoom?0:z.tolerance/((1<0&&h.size<(z?X:D))return void(b.numPoints+=h.points.length/3);let Z=[];for(let re=0;reX)&&(b.numSimplified++,Z.push(h.points[re],h.points[re+1])),b.numPoints++;z&&(function(re,Q){let he=0;for(let oe=0,ke=re.length,ge=ke-2;oe0===Q)for(let oe=0,ke=re.length;oe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(b),D.debug>1&&console.timeEnd("invalidating");let[z,G,X]=[0,0,0],Z=GQ(h,z,G,X,D);Z.source=h;let re=DS(z,G,X);if(this.tiles[re]=Z,this.tileCoords.push({z,x:G,y:X,id:re}),D.debug){let Q=`z${z}`;this.stats[Q]=(this.stats[Q]||0)+1,this.total++}}getClusterExpansionZoom(h){return null}getChildren(h){return null}getLeaves(h,b,D){return null}getTile(h,b,D){let{extent:z,debug:G}=this.options,X=1<1&&console.log("drilling down to z%d-%d-%d",h,b,D);let re,Q=h,he=b,oe=D;for(;!re&&Q>0;)Q--,he>>=1,oe>>=1,re=this.tiles[DS(Q,he,oe)];return re!=null&&re.source?(G>1&&(console.log("found parent tile z%d-%d-%d",Q,he,oe),console.time("drilling down")),this.splitTile(re.source,Q,he,oe,h,b,D),G>1&&console.timeEnd("drilling down"),this.tiles[Z]?HQ(this.tiles[Z],z):null):null}splitTile(h,b,D,z,G,X,Z){let re=[h,b,D,z],Q=this.options,he=Q.debug;for(;re.length;){z=re.pop(),D=re.pop(),b=re.pop(),h=re.pop();let oe=1<1&&console.time("creation"),ge=this.tiles[ke]=GQ(h,b,D,z,Q),this.tileCoords.push({z:b,x:D,y:z,id:ke}),he)){he>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",b,D,z,ge.numFeatures,ge.numPoints,ge.numSimplified),console.timeEnd("creation"));let jr=`z${b}`;this.stats[jr]=(this.stats[jr]||0)+1,this.total++}if(ge.source=h,G==null){if(b===Q.indexMaxZoom||ge.numPoints<=Q.indexMaxPoints)continue}else{if(b===Q.maxZoom||b===G)continue;if(G!=null){let jr=G-b;if(D!==X>>jr||z!==Z>>jr)continue}}if(ge.source=null,!h.length)continue;he>1&&console.time("clipping");let Ue=.5*Q.buffer/Q.extent,je=.5-Ue,vt=.5+Ue,gt=1+Ue,It=null,_t=null,qt=null,tr=null,lr=O1(h,oe,D-Ue,D+vt,yh.X,ge.minX,ge.maxX,Q),qr=O1(h,oe,D+je,D+gt,yh.X,ge.minX,ge.maxX,Q);lr&&(It=O1(lr,oe,z-Ue,z+vt,yh.Y,ge.minY,ge.maxY,Q),_t=O1(lr,oe,z+je,z+gt,yh.Y,ge.minY,ge.maxY,Q)),qr&&(qt=O1(qr,oe,z-Ue,z+vt,yh.Y,ge.minY,ge.maxY,Q),tr=O1(qr,oe,z+je,z+gt,yh.Y,ge.minY,ge.maxY,Q)),he>1&&console.timeEnd("clipping"),re.push(It||[],b+1,2*D,2*z),re.push(_t||[],b+1,2*D,2*z+1),re.push(qt||[],b+1,2*D+1,2*z),re.push(tr||[],b+1,2*D+1,2*z+1)}}invalidateTiles(h){if(!h.length)return;let b=this.options,{debug:D}=b,z=1/0,G=-1/0,X=1/0,Z=-1/0;for(let he of h)z=Math.min(z,he.minX),G=Math.max(G,he.maxX),X=Math.min(X,he.minY),Z=Math.max(Z,he.maxY);let re=b.buffer/b.extent,Q=new Set;for(let he in this.tiles){let oe=this.tiles[he],ke=1<=Ue||Z=vt)continue;let gt=!1;for(let It of h)if(It.maxX>=ge&&It.minX=je&&It.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",oe.z,oe.x,oe.y,oe.numFeatures,oe.numPoints,oe.numSimplified);let It=`z${oe.z}`;this.stats[It]=(this.stats[It]||0)-1,this.total--}delete this.tiles[he],Q.add(he)}}Q.size&&(this.tileCoords=this.tileCoords.filter((he=>!Q.has(he.id))))}}function DS(M,h,b){return 32*((1<b.id)),this.index=h.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let b of this.layers)this.gradients[b.id]={};this.layoutVertexArray=new Bt,this.layoutVertexArray2=new St,this.indexArray=new Er,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.hasDependencies=MS("line",this.layers,b)||this.hasLineDasharray(this.layers);let z=this.layers[0].layout.get("line-sort-key"),G=!z.isConstant(),X=[];for(let{feature:Z,id:re,index:Q,sourceLayerIndex:he}of h){let oe=this.layers[0]._featureFilter.needGeometry,ke=xa(Z,oe);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),ke,D))continue;let ge=G?z.evaluate(ke,{},D):void 0,Ue={id:re,properties:Z.properties,type:Z.type,sourceLayerIndex:he,index:Q,geometry:oe?ke.geometry:$l(Z),patterns:{},dashes:{},sortKey:ge};X.push(Ue)}G&&X.sort(((Z,re)=>Z.sortKey-re.sortKey));for(let Z of X){let{geometry:re,index:Q,sourceLayerIndex:he}=Z;this.hasDependencies?(MS("line",this.layers,b)?UR("line",this.layers,Z,{zoom:this.zoom},b):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,Z,this.zoom,b),this.patternFeatures.push(Z)):this.addFeature(Z,re,Q,D,{},{},b.subdivisionGranularity),b.featureIndex.insert(h[Q].feature,re,Q,he,this.index)}}update(h,b,D,z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D,dashPositions:z})}addFeatures(h,b,D,z){for(let G of this.patternFeatures)this.addFeature(G,G.geometry,G.index,b,D,z,h.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=h.createVertexBuffer(this.layoutVertexArray2,Bnt)),this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,znt),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(h){if(h.properties&&Object.hasOwn(h.properties,aI)&&Object.hasOwn(h.properties,oI))return{start:+h.properties[aI],end:+h.properties[oI]}}addFeature(h,b,D,z,G,X,Z){let re=this.layers[0].layout,Q=re.get("line-join").evaluate(h,{}),he=re.get("line-cap").evaluate(h,{}),oe=re.get("line-miter-limit").evaluate(h,{}),ke=re.get("line-round-limit").evaluate(h,{});this.lineClips=this.lineFeatureClips(h);for(let ge of b)this.addLine(ge,h,Q,he,oe,ke,z,Z);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,h,D,{imagePositions:G,dashPositions:X,canonical:z})}addLine(h,b,D,z,G,X,Z,re){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,h=nx(h,Z?re.line.getGranularityForZoomLevel(Z.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let _t=0;_t=2&&h[he-1].equals(h[he-2]);)he--;let oe=0;for(;oe0;if(_n&&_t>oe){let Ln=Ue.dist(je);if(Ln>2*ke){let un=Ue.sub(Ue.sub(je)._mult(ke/Ln)._round());this.updateDistance(je,un),this.addCurrentVertex(un,gt,0,0,ge),je=un}}let Dn=je&&vt,Hn=Dn?D:Q?"butt":z;if(Dn&&Hn==="round"&&(qrG&&(Hn="bevel"),Hn==="bevel"&&(qr>2&&(Hn="flipbevel"),qr100)qt=It.mult(-1);else{let Ln=qr*gt.add(It).mag()/gt.sub(It).mag();qt._perp()._mult(Ln*(fn?-1:1))}this.addCurrentVertex(Ue,qt,0,0,ge),this.addCurrentVertex(Ue,qt.mult(-1),0,0,ge)}else if(Hn==="bevel"||Hn==="fakeround"){let Ln=-Math.sqrt(qr*qr-1),un=fn?Ln:0,ei=fn?0:Ln;if(je&&this.addCurrentVertex(Ue,gt,un,ei,ge),Hn==="fakeround"){let ci=Math.round(180*jr/Math.PI/20);for(let ti=1;ti2*ke){let un=Ue.add(vt.sub(Ue)._mult(ke/Ln)._round());this.updateDistance(Ue,un),this.addCurrentVertex(un,It,0,0,ge),Ue=un}}}}addCurrentVertex(h,b,D,z,G,X=!1){let Z=b.y*z-b.x,re=-b.y-b.x*z;this.addHalfVertex(h,b.x+b.y*D,b.y-b.x*D,X,!1,D,G),this.addHalfVertex(h,Z,re,X,!0,-z,G),this.distance>WQ/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(h,b,D,z,G,X))}addHalfVertex({x:h,y:b},D,z,G,X,Z,re){let Q=.5*(this.lineClips?this.scaledDistance*(WQ-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((h<<1)+(G?1:0),(b<<1)+(X?1:0),Math.round(63*D)+128,Math.round(63*z)+128,1+(Z===0?0:Z<0?-1:1)|(63&Q)<<2,Q>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let he=re.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,he,this.e2),re.primitiveLength++),X?this.e2=he:this.e1=he}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(h,b){this.distance+=h.dist(b),this.updateScaledDistance()}hasLineDasharray(h){for(let b of h){let D=b.paint.get("line-dasharray");if(D&&!D.isConstant())return!0}return!1}addLineDashDependencies(h,b,D,z){for(let G of h){let X=G.paint.get("line-dasharray");if(!X||X.value.kind==="constant")continue;let Z=G.layout.get("line-cap").evaluate(b,{})==="round",re={dasharray:X.value.evaluate({zoom:D-1},b,{}),round:Z},Q={dasharray:X.value.evaluate({zoom:D},b,{}),round:Z},he={dasharray:X.value.evaluate({zoom:D+1},b,{}),round:Z},oe=`${re.dasharray.join(",")},${re.round}`,ke=`${Q.dasharray.join(",")},${Q.round}`,ge=`${he.dasharray.join(",")},${he.round}`;z.dashDependencies[oe]=re,z.dashDependencies[ke]=Q,z.dashDependencies[ge]=he,b.dashes[G.id]={min:oe,mid:ke,max:ge}}}}let YQ,XQ;_i("LineBucket",lI,{omit:["layers","patternFeatures"]});var ZQ={get paint(){return XQ=XQ||new ms({"line-opacity":new Di(Ct.paint_line["line-opacity"]),"line-color":new Di(Ct.paint_line["line-color"]),"line-translate":new wi(Ct.paint_line["line-translate"]),"line-translate-anchor":new wi(Ct.paint_line["line-translate-anchor"]),"line-width":new Di(Ct.paint_line["line-width"]),"line-gap-width":new Di(Ct.paint_line["line-gap-width"]),"line-offset":new Di(Ct.paint_line["line-offset"]),"line-blur":new Di(Ct.paint_line["line-blur"]),"line-dasharray":new fl(Ct.paint_line["line-dasharray"]),"line-pattern":new fl(Ct.paint_line["line-pattern"]),"line-gradient":new du(Ct.paint_line["line-gradient"])})},get layout(){return YQ=YQ||new ms({"line-cap":new Di(Ct.layout_line["line-cap"]),"line-join":new Di(Ct.layout_line["line-join"]),"line-miter-limit":new Di(Ct.layout_line["line-miter-limit"]),"line-round-limit":new Di(Ct.layout_line["line-round-limit"]),"line-sort-key":new Di(Ct.layout_line["line-sort-key"])})}};class Nnt extends Di{possiblyEvaluate(h,b){return b=new mi(Math.floor(b.zoom),{now:b.now,fadeDuration:b.fadeDuration,zoomHistory:b.zoomHistory,transition:b.transition}),super.possiblyEvaluate(h,b)}evaluate(h,b,D,z){return b=_e({},b,{zoom:Math.floor(b.zoom)}),super.evaluate(h,b,D,z)}}let RS;class Unt extends hl{constructor(h,b){super(h,ZQ,b),this.gradientVersion=0,RS||(RS=new Nnt(ZQ.paint.properties["line-width"].specification),RS.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(h){if(h==="line-gradient"){let b=this.gradientExpression();this.stepInterpolant=!!(function(D){return D._styleExpression!==void 0})(b)&&b._styleExpression.expression instanceof lu,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(h,b){super.recalculate(h,b),this.paint._values["line-floorwidth"]=RS.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,h)}createBucket(h){return new lI(h)}queryRadius(h){let b=h,D=$Q(sn("line-width",this,b),sn("line-gap-width",this,b)),z=sn("line-offset",this,b);return D/2+Math.abs(z)+tn(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:h,feature:b,featureState:D,geometry:z,transform:G,pixelsToTileUnits:X}){let Z=Hr(h,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-G.bearingInRadians,X),re=X/2*$Q(this.paint.get("line-width").evaluate(b,D),this.paint.get("line-gap-width").evaluate(b,D)),Q=this.paint.get("line-offset").evaluate(b,D);return Q&&(z=(function(he,oe){let ke=[];for(let ge of he){let Ue=Mr(ge),je=[];for(let vt=0;vt=3){for(let Ue of ge)if(pn(he,Ue))return!0}if(wo(he,ge,ke))return!0}return!1})(Z,z,re)}isTileClipped(){return!0}}function $Q(M,h){return h>0?h+2*M:M}let Vnt=Re([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Gnt=Re([{name:"a_projected_pos",components:3,type:"Float32"}],4);Re([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let Hnt=Re([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Re([{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"}]);let KQ=Re([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),jnt=Re([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Wnt(M,h,b){let D=h.layout.get("text-transform").evaluate(b,{});return D==="uppercase"?M=M.toLocaleUpperCase():D==="lowercase"&&(M=M.toLocaleLowerCase()),Bi.applyArabicShaping&&(M=Bi.applyArabicShaping(M)),M}function Ynt(M,h,b){for(let D of M.sections)D.text=Wnt(D.text,h,b);return M}Re([{name:"triangle",components:3,type:"Uint16"}]),Re([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Re([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Re([{type:"Float32",name:"offsetX"}]),Re([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Re([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let m4={"!":"\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","\u22EF":"\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"},Xnt={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Znt={40:!0};function JQ(M,h,b,D,z,G){if("fontStack"in h){let X=b[h.fontStack],Z=X==null?void 0:X[M];return Z?Z.metrics.advance*h.scale+z:0}{let X=D[h.imageName];return X?X.displaySize[0]*h.scale*Rc/G+z:0}}function QQ(M,h,b,D){let z=Math.pow(M-h,2);return D?MMath.max(h,this.sections[b].scale)),0)}getMaxImageSize(h){let b=0,D=0;for(let z=0;zD)))}addImageSection(h){let b=h.image?h.image.name:"";if(b.length===0)return void me("Can't add FormattedSection with an empty image.");let D=this.getNextImageSectionCharCode();D?(this.text+=String.fromCharCode(D),this.sections.push({scale:1,verticalAlign:h.verticalAlign||"bottom",imageName:b}),this.sectionIndex.push(this.sections.length-1)):me("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(h,b,D,z,G){let X=[],Z=this.determineAverageLineWidth(h,b,D,z,G),re=this.hasZeroWidthSpaces(),Q=0,he=0,oe=this.text[Symbol.iterator](),ke=oe.next(),ge=this.text[Symbol.iterator]();ge.next();let Ue=ge.next(),je=this.text[Symbol.iterator]();je.next(),je.next();let vt=je.next();for(;!ke.done;){let gt=this.getSection(he),It=ke.value.codePointAt(0);if(Gt(It)||(Q+=JQ(It,gt,D,z,h,G)),!Ue.done){let _t=Je(It),qt=Ue.value.codePointAt(0);(Xnt[It]||_t||"imageName"in gt||!vt.done&&Znt[qt])&&X.push(eee(he+1,Q,Z,X,$nt(It,qt,_t&&re),!1))}he++,ke=oe.next(),Ue=ge.next(),vt=je.next()}return tee(eee(this.length(),Q,Z,X,0,!0))}determineAverageLineWidth(h,b,D,z,G){let X=0,Z=0;for(let re of this.text){let Q=this.getSection(Z);X+=JQ(re.codePointAt(0),Q,D,z,h,G),Z++}return X/Math.max(1,Math.ceil(X/b))}}let uI=4294967296,ree=1/uI,nee=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");class IS{constructor(h=new Uint8Array(16)){this.buf=ArrayBuffer.isView(h)?h:new Uint8Array(h),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(h,b,D=this.length){for(;this.pos>3,X=this.pos;this.type=7&z,h(G,b,this),this.pos===X&&this.skip(z)}return b}readMessage(h,b){return this.readFields(h,b,this.readVarint()+this.pos)}readFixed32(){let h=this.dataView.getUint32(this.pos,!0);return this.pos+=4,h}readSFixed32(){let h=this.dataView.getInt32(this.pos,!0);return this.pos+=4,h}readFixed64(){let h=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*uI;return this.pos+=8,h}readSFixed64(){let h=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*uI;return this.pos+=8,h}readFloat(){let h=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,h}readDouble(){let h=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,h}readVarint(h){let b=this.buf,D,z;return z=b[this.pos++],D=127&z,z<128?D:(z=b[this.pos++],D|=(127&z)<<7,z<128?D:(z=b[this.pos++],D|=(127&z)<<14,z<128?D:(z=b[this.pos++],D|=(127&z)<<21,z<128?D:(z=b[this.pos],D|=(15&z)<<28,(function(G,X,Z){let re=Z.buf,Q,he;if(he=re[Z.pos++],Q=(112&he)>>4,he<128||(he=re[Z.pos++],Q|=(127&he)<<3,he<128)||(he=re[Z.pos++],Q|=(127&he)<<10,he<128)||(he=re[Z.pos++],Q|=(127&he)<<17,he<128)||(he=re[Z.pos++],Q|=(127&he)<<24,he<128)||(he=re[Z.pos++],Q|=(1&he)<<31,he<128))return Y_(G,Q,X);throw new Error("Expected varint not more than 10 bytes")})(D,h,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let h=this.readVarint();return h%2==1?(h+1)/-2:h/2}readBoolean(){return!!this.readVarint()}readString(){let h=this.readVarint()+this.pos,b=this.pos;return this.pos=h,h-b>=12&&nee?nee.decode(this.buf.subarray(b,h)):(function(D,z,G){let X="",Z=z;for(;Z239?4:re>223?3:re>191?2:1;if(Z+ge>G)break;ge===1?re<128&&(ke=re):ge===2?(Q=D[Z+1],(192&Q)==128&&(ke=(31&re)<<6|63&Q,ke<=127&&(ke=null))):ge===3?(Q=D[Z+1],he=D[Z+2],(192&Q)==128&&(192&he)==128&&(ke=(15&re)<<12|(63&Q)<<6|63&he,(ke<=2047||ke>=55296&&ke<=57343)&&(ke=null))):ge===4&&(Q=D[Z+1],he=D[Z+2],oe=D[Z+3],(192&Q)==128&&(192&he)==128&&(192&oe)==128&&(ke=(15&re)<<18|(63&Q)<<12|(63&he)<<6|63&oe,(ke<=65535||ke>=1114112)&&(ke=null))),ke===null?(ke=65533,ge=1):ke>65535&&(ke-=65536,X+=String.fromCharCode(ke>>>10&1023|55296),ke=56320|1023&ke),X+=String.fromCharCode(ke),Z+=ge}return X})(this.buf,b,h)}readBytes(){let h=this.readVarint()+this.pos,b=this.buf.subarray(this.pos,h);return this.pos=h,b}readPackedVarint(h=[],b){let D=this.readPackedEnd();for(;this.pos127;);else if(b===2)this.pos=this.readVarint()+this.pos;else if(b===5)this.pos+=4;else{if(b!==1)throw new Error(`Unimplemented type: ${b}`);this.pos+=8}}writeTag(h,b){this.writeVarint(h<<3|b)}realloc(h){let b=this.length||16;for(;b268435455||h<0?(function(b,D){let z,G;if(b>=0?(z=b%4294967296|0,G=b/4294967296|0):(z=~(-b%4294967296),G=~(-b/4294967296),4294967295^z?z=z+1|0:(z=0,G=G+1|0)),b>=18446744073709552e3||b<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");D.realloc(10),(function(X,Z,re){re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,re.buf[re.pos]=127&(X>>>=7)})(z,0,D),(function(X,Z){let re=(7&X)<<4;Z.buf[Z.pos++]|=re|((X>>>=3)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X)))))})(G,D)})(h,this):(this.realloc(4),this.buf[this.pos++]=127&h|(h>127?128:0),h<=127||(this.buf[this.pos++]=127&(h>>>=7)|(h>127?128:0),h<=127||(this.buf[this.pos++]=127&(h>>>=7)|(h>127?128:0),h<=127||(this.buf[this.pos++]=h>>>7&127))))}writeSVarint(h){this.writeVarint(h<0?2*-h-1:2*h)}writeBoolean(h){this.writeVarint(+h)}writeString(h){h=String(h),this.realloc(4*h.length),this.pos++;let b=this.pos;this.pos=(function(z,G,X){for(let Z,re,Q=0;Q55295&&Z<57344){if(!re){Z>56319||Q+1===G.length?(z[X++]=239,z[X++]=191,z[X++]=189):re=Z;continue}if(Z<56320){z[X++]=239,z[X++]=191,z[X++]=189,re=Z;continue}Z=re-55296<<10|Z-56320|65536,re=null}else re&&(z[X++]=239,z[X++]=191,z[X++]=189,re=null);Z<128?z[X++]=Z:(Z<2048?z[X++]=Z>>6|192:(Z<65536?z[X++]=Z>>12|224:(z[X++]=Z>>18|240,z[X++]=Z>>12&63|128),z[X++]=Z>>6&63|128),z[X++]=63&Z|128)}return X})(this.buf,h,this.pos);let D=this.pos-b;D>=128&&iee(b,D,this),this.pos=b-1,this.writeVarint(D),this.pos+=D}writeFloat(h){this.realloc(4),this.dataView.setFloat32(this.pos,h,!0),this.pos+=4}writeDouble(h){this.realloc(8),this.dataView.setFloat64(this.pos,h,!0),this.pos+=8}writeBytes(h){let b=h.length;this.writeVarint(b),this.realloc(b);for(let D=0;D=128&&iee(D,z,this),this.pos=D-1,this.writeVarint(z),this.pos+=z}writeMessage(h,b,D){this.writeTag(h,2),this.writeRawMessage(b,D)}writePackedVarint(h,b){b.length&&this.writeMessage(h,Knt,b)}writePackedSVarint(h,b){b.length&&this.writeMessage(h,Jnt,b)}writePackedBoolean(h,b){b.length&&this.writeMessage(h,tit,b)}writePackedFloat(h,b){b.length&&this.writeMessage(h,Qnt,b)}writePackedDouble(h,b){b.length&&this.writeMessage(h,eit,b)}writePackedFixed32(h,b){b.length&&this.writeMessage(h,rit,b)}writePackedSFixed32(h,b){b.length&&this.writeMessage(h,nit,b)}writePackedFixed64(h,b){b.length&&this.writeMessage(h,iit,b)}writePackedSFixed64(h,b){b.length&&this.writeMessage(h,ait,b)}writeBytesField(h,b){this.writeTag(h,2),this.writeBytes(b)}writeFixed32Field(h,b){this.writeTag(h,5),this.writeFixed32(b)}writeSFixed32Field(h,b){this.writeTag(h,5),this.writeSFixed32(b)}writeFixed64Field(h,b){this.writeTag(h,1),this.writeFixed64(b)}writeSFixed64Field(h,b){this.writeTag(h,1),this.writeSFixed64(b)}writeVarintField(h,b){this.writeTag(h,0),this.writeVarint(b)}writeSVarintField(h,b){this.writeTag(h,0),this.writeSVarint(b)}writeStringField(h,b){this.writeTag(h,2),this.writeString(b)}writeFloatField(h,b){this.writeTag(h,5),this.writeFloat(b)}writeDoubleField(h,b){this.writeTag(h,1),this.writeDouble(b)}writeBooleanField(h,b){this.writeVarintField(h,+b)}}function Y_(M,h,b){return b?4294967296*h+(M>>>0):4294967296*(h>>>0)+(M>>>0)}function iee(M,h,b){let D=h<=16383?1:h<=2097151?2:h<=268435455?3:Math.floor(Math.log(h)/(7*Math.LN2));b.realloc(D);for(let z=b.pos-1;z>=M;z--)b.buf[z+D]=b.buf[z]}function Knt(M,h){for(let b=0;bZ.h-X.h));let D=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(h/.95)),b),h:1/0}],z=0,G=0;for(let X of M)for(let Z=D.length-1;Z>=0;Z--){let re=D[Z];if(!(X.w>re.w||X.h>re.h)){if(X.x=re.x,X.y=re.y,G=Math.max(G,X.y+X.h),z=Math.max(z,X.x+X.w),X.w===re.w&&X.h===re.h){let Q=D.pop();Q&&Zje.toCodeUnitIndex(qr)));let lr=It(je.toString(),gt);for(let qr of lr){let jr=[...qr].map((()=>0));vt.push(new W_(qr,je.sections,jr))}}else if(_t){vt=[],gt=gt.map((_n=>je.toCodeUnitIndex(_n)));let lr=0,qr=[];for(let _n of je.text)qr.push(...Array(_n.length).fill(je.sectionIndex[lr])),lr++;let jr=_t(je.text,qr,gt);for(let _n of jr){let fn=[],Dn="";for(let Hn of _n[0])fn.push(_n[1][Dn.length]),Dn+=Hn;vt.push(new W_(_n[0],je.sections,fn))}}else vt=(function(lr,qr){let jr=[],_n=0;for(let fn of qr)jr.push(lr.substring(_n,fn)),_n=fn;return _nQ){let he=Math.ceil(G/Q);z*=he/X,X=he}return{x1:D,y1:z,x2:D+G,y2:z+X}}function uee(M,h,b,D,z,G){let X=M.image,Z;if(X.content){let vt=X.content,gt=X.pixelRatio||1;Z=[vt[0]/gt,vt[1]/gt,X.displaySize[0]-vt[2]/gt,X.displaySize[1]-vt[3]/gt]}let re=h.left*G,Q=h.right*G,he,oe,ke,ge;b==="width"||b==="both"?(ge=z[0]+re-D[3],oe=z[0]+Q+D[1]):(ge=z[0]+(re+Q-X.displaySize[0])/2,oe=ge+X.displaySize[0]);let Ue=h.top*G,je=h.bottom*G;return b==="height"||b==="both"?(he=z[1]+Ue-D[0],ke=z[1]+je+D[2]):(he=z[1]+(Ue+je-X.displaySize[1])/2,ke=he+X.displaySize[1]),{image:X,top:he,right:oe,bottom:ke,left:ge,collisionPadding:Z}}_i("ImagePosition",cI),_i("ImageAtlas",oee),a.ax=void 0,(Wg=a.ax||(a.ax={}))[Wg.none=0]="none",Wg[Wg.horizontal=1]="horizontal",Wg[Wg.vertical=2]="vertical",Wg[Wg.horizontalOnly=3]="horizontalOnly";let N1=128,Yg=32640;function cee(M,h){let{expression:b}=h;if(b.kind==="constant")return{kind:"constant",layoutSize:b.evaluate(new mi(M+1))};if(b.kind==="source")return{kind:"source"};{let{zoomStops:D,interpolationType:z}=b,G=0;for(;GX.id)),this.index=h.index,this.pixelRatio=h.pixelRatio,this.sourceLayerIndex=h.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let b=this.layers[0]._unevaluatedLayout._values;this.textSizeData=cee(this.zoom,b["text-size"]),this.iconSizeData=cee(this.zoom,b["icon-size"]);let D=this.layers[0].layout,z=D.get("symbol-sort-key"),G=D.get("symbol-z-order");this.canOverlap=hI(D,"text-overlap","text-allow-overlap")!=="never"||hI(D,"icon-overlap","icon-allow-overlap")!=="never"||D.get("text-ignore-placement")||D.get("icon-ignore-placement"),this.sortFeaturesByKey=G!=="viewport-y"&&!z.isConstant(),this.sortFeaturesByY=(G==="viewport-y"||G==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,D.get("symbol-placement")==="point"&&(this.writingModes=D.get("text-writing-mode").map((X=>a.ax[X]))),this.stateDependentLayerIds=this.layers.filter((X=>X.isStateDependent())).map((X=>X.id)),this.sourceID=h.sourceID}createArrays(){this.text=new vI(new Ta(this.layers,this.zoom,(h=>h.startsWith("text")))),this.icon=new vI(new Ta(this.layers,this.zoom,(h=>h.startsWith("icon")))),this.glyphOffsetArray=new Fe,this.lineVertexArray=new Ie,this.symbolInstances=new Ae,this.textAnchorOffsets=new st}calculateGlyphDependencies(h,b,D,z,G){for(let X of h)if(b[X.codePointAt(0)]=!0,(D||z)&&G){let Z=m4[X];Z&&(b[Z.codePointAt(0)]=!0)}}populate(h,b,D){var z;let G=this.layers[0],X=G.layout,Z=X.get("text-font"),re=X.get("text-field"),Q=X.get("icon-image"),he=(re.value.kind!=="constant"||re.value.value instanceof $a&&!re.value.value.isEmpty()||re.value.value.toString().length>0)&&(Z.value.kind!=="constant"||Z.value.value.length>0),oe=Q.value.kind!=="constant"||!!Q.value.value||Object.keys(Q.parameters).length>0,ke=X.get("symbol-sort-key");if(this.features=[],!he&&!oe)return;let ge=b.iconDependencies,Ue=b.glyphDependencies,je=b.availableImages,vt=new mi(this.zoom);for(let{feature:gt,id:It,index:_t,sourceLayerIndex:qt}of h){let tr=G._featureFilter.needGeometry,lr=xa(gt,tr);if(!G._featureFilter.filter(vt,lr,D))continue;let qr,jr;if(tr||(lr.geometry=$l(gt)),he){let fn=G.getValueAndResolveTokens("text-field",lr,D,je),Dn=$a.factory(fn);this.hasRTLText||(this.hasRTLText=git(Dn)),(!this.hasRTLText||Bi.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Bi.isParsed())&&(qr=Ynt(Dn,G,lr))}if(oe){let fn=G.getValueAndResolveTokens("icon-image",lr,D,je);jr=fn instanceof so?fn:so.fromString(fn)}if(!qr&&!jr)continue;let _n=this.sortFeaturesByKey?ke.evaluate(lr,{},D):void 0;if(this.features.push({id:It,text:qr,icon:jr,index:_t,sourceLayerIndex:qt,geometry:lr.geometry,properties:gt.properties,type:h4.types[gt.type],sortKey:_n}),jr&&(ge[jr.name]=!0),qr){let fn=Z.evaluate(lr,{},D).join(","),Dn=X.get("text-rotation-alignment")!=="viewport"&&X.get("symbol-placement")!=="point";this.allowVerticalPlacement=(z=this.writingModes)===null||z===void 0?void 0:z.includes(a.ax.vertical);for(let Hn of qr.sections)if(Hn.image)ge[Hn.image.name]=!0;else{let Ln=Zt(qr.toString()),un=Hn.fontStack||fn;Ue[un]||(Ue[un]={}),this.calculateGlyphDependencies(Hn.text,Ue[un],Dn,this.allowVerticalPlacement,Ln)}}}X.get("symbol-placement")==="line"&&(this.features=(function(gt){let It={},_t={},qt=[],tr=0;function lr(fn){qt.push(gt[fn]),tr++}function qr(fn,Dn,Hn){let Ln=_t[fn];return delete _t[fn],_t[Dn]=Ln,qt[Ln].geometry[0].pop(),qt[Ln].geometry[0]=qt[Ln].geometry[0].concat(Hn[0]),Ln}function jr(fn,Dn,Hn){let Ln=It[Dn];return delete It[Dn],It[fn]=Ln,qt[Ln].geometry[0].shift(),qt[Ln].geometry[0]=Hn[0].concat(qt[Ln].geometry[0]),Ln}function _n(fn,Dn,Hn){let Ln=Hn?Dn[0][Dn[0].length-1]:Dn[0][0];return`${fn}:${Ln.x}:${Ln.y}`}for(let fn=0;fnfn.geometry))})(this.features)),this.sortFeaturesByKey&&this.features.sort(((gt,It)=>gt.sortKey-It.sortKey))}update(h,b,D){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(h,b,this.layers,{imagePositions:D}),this.icon.programConfigurations.updatePaintArrays(h,b,this.layers,{imagePositions:D}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(h){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(h),this.iconCollisionBox.upload(h)),this.text.upload(h,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(h,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(h,b){let D=this.lineVertexArray.length;if(h.segment!==void 0){let z=h.dist(b[h.segment+1]),G=h.dist(b[h.segment]),X={};for(let Z=h.segment+1;Z=0;Z--)X[Z]={x:b[Z].x,y:b[Z].y,tileUnitDistanceFromAnchor:G},Z>0&&(G+=b[Z-1].dist(b[Z]));for(let Z=0;Z0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(h,b){let D=h.placedSymbolArray.get(b),z=D.vertexStartIndex+4*D.numGlyphs;for(let G=D.vertexStartIndex;Gz[Z]-z[re]||G[re]-G[Z])),X}addToSortKeyRanges(h,b){let D=this.sortKeyRanges[this.sortKeyRanges.length-1];(D==null?void 0:D.sortKey)===b?D.symbolInstanceEnd=h+1:this.sortKeyRanges.push({sortKey:b,symbolInstanceStart:h,symbolInstanceEnd:h+1})}sortFeatures(h){if(this.sortFeaturesByY&&this.sortedAngle!==h&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(h),this.sortedAngle=h,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let b of this.symbolInstanceIndexes){let D=this.symbolInstances.get(b);this.featureSortOrder.push(D.featureIndex);let z=[D.rightJustifiedTextSymbolIndex,D.centerJustifiedTextSymbolIndex,D.leftJustifiedTextSymbolIndex];for(let G=0;G=0&&z.indexOf(X)===G&&this.addIndicesForPlacedSymbol(this.text,X)}D.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,D.verticalPlacedTextSymbolIndex),D.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,D.placedIconSymbolIndex),D.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,D.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let fee,hee;_i("SymbolBucket",X_,{omit:["layers","collisionBoxArray","features","compareText"]}),X_.MAX_GLYPHS=65535,X_.addDynamicAttributes=dI;var gI={get paint(){return hee=hee||new ms({"icon-opacity":new Di(Ct.paint_symbol["icon-opacity"]),"icon-color":new Di(Ct.paint_symbol["icon-color"]),"icon-halo-color":new Di(Ct.paint_symbol["icon-halo-color"]),"icon-halo-width":new Di(Ct.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Di(Ct.paint_symbol["icon-halo-blur"]),"icon-translate":new wi(Ct.paint_symbol["icon-translate"]),"icon-translate-anchor":new wi(Ct.paint_symbol["icon-translate-anchor"]),"text-opacity":new Di(Ct.paint_symbol["text-opacity"]),"text-color":new Di(Ct.paint_symbol["text-color"],{runtimeType:Ut,getOverride:M=>M.textColor,hasOverride:M=>!!M.textColor}),"text-halo-color":new Di(Ct.paint_symbol["text-halo-color"]),"text-halo-width":new Di(Ct.paint_symbol["text-halo-width"]),"text-halo-blur":new Di(Ct.paint_symbol["text-halo-blur"]),"text-translate":new wi(Ct.paint_symbol["text-translate"]),"text-translate-anchor":new wi(Ct.paint_symbol["text-translate-anchor"])})},get layout(){return fee=fee||new ms({"symbol-placement":new wi(Ct.layout_symbol["symbol-placement"]),"symbol-spacing":new wi(Ct.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wi(Ct.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Di(Ct.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wi(Ct.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wi(Ct.layout_symbol["icon-allow-overlap"]),"icon-overlap":new wi(Ct.layout_symbol["icon-overlap"]),"icon-ignore-placement":new wi(Ct.layout_symbol["icon-ignore-placement"]),"icon-optional":new wi(Ct.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wi(Ct.layout_symbol["icon-rotation-alignment"]),"icon-size":new Di(Ct.layout_symbol["icon-size"]),"icon-text-fit":new wi(Ct.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wi(Ct.layout_symbol["icon-text-fit-padding"]),"icon-image":new Di(Ct.layout_symbol["icon-image"]),"icon-rotate":new Di(Ct.layout_symbol["icon-rotate"]),"icon-padding":new Di(Ct.layout_symbol["icon-padding"]),"icon-keep-upright":new wi(Ct.layout_symbol["icon-keep-upright"]),"icon-offset":new Di(Ct.layout_symbol["icon-offset"]),"icon-anchor":new Di(Ct.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wi(Ct.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wi(Ct.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wi(Ct.layout_symbol["text-rotation-alignment"]),"text-field":new Di(Ct.layout_symbol["text-field"]),"text-font":new Di(Ct.layout_symbol["text-font"]),"text-size":new Di(Ct.layout_symbol["text-size"]),"text-max-width":new Di(Ct.layout_symbol["text-max-width"]),"text-line-height":new wi(Ct.layout_symbol["text-line-height"]),"text-letter-spacing":new Di(Ct.layout_symbol["text-letter-spacing"]),"text-justify":new Di(Ct.layout_symbol["text-justify"]),"text-radial-offset":new Di(Ct.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wi(Ct.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Di(Ct.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Di(Ct.layout_symbol["text-anchor"]),"text-max-angle":new wi(Ct.layout_symbol["text-max-angle"]),"text-writing-mode":new wi(Ct.layout_symbol["text-writing-mode"]),"text-rotate":new Di(Ct.layout_symbol["text-rotate"]),"text-padding":new wi(Ct.layout_symbol["text-padding"]),"text-keep-upright":new wi(Ct.layout_symbol["text-keep-upright"]),"text-transform":new Di(Ct.layout_symbol["text-transform"]),"text-offset":new Di(Ct.layout_symbol["text-offset"]),"text-allow-overlap":new wi(Ct.layout_symbol["text-allow-overlap"]),"text-overlap":new wi(Ct.layout_symbol["text-overlap"]),"text-ignore-placement":new wi(Ct.layout_symbol["text-ignore-placement"]),"text-optional":new wi(Ct.layout_symbol["text-optional"])})}};class dee{constructor(h){if(h.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=h.property.overrides?h.property.overrides.runtimeType:Dt,this.defaultValue=h}evaluate(h){if(h.formattedSection){let b=this.defaultValue.property.overrides;if(b!=null&&b.hasOverride(h.formattedSection))return b.getOverride(h.formattedSection)}return h.feature&&h.featureState?this.defaultValue.evaluate(h.feature,h.featureState):this.defaultValue.property.specification.default}eachChild(h){this.defaultValue.isConstant()||h(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}_i("FormatSectionOverride",dee,{omit:["defaultValue"]});class BS extends hl{constructor(h,b){super(h,gI,b)}recalculate(h,b){if(super.recalculate(h,b),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let D=this.layout.get("text-writing-mode");if(D){let z=[];for(let G of D)z.includes(G)||z.push(G);this.layout._values["text-writing-mode"]=z}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(h,b,D,z){let G=this.layout.get(h).evaluate(b,{},D,z),X=this._unevaluatedLayout._values[h];return X.isDataDriven()||If(X.value)||!G?G:(function(Z,re){return re.replace(/{([^{}]+)}/g,((Q,he)=>Z&&he in Z?String(Z[he]):""))})(b.properties,G)}createBucket(h){return new X_(h)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let h of gI.paint.overridableProperties){if(!BS.hasPaintOverride(this.layout,h))continue;let b=this.paint.get(h),D=new dee(b),z=new Wl(D,b.property.specification),G=null;G=b.value.kind==="constant"||b.value.kind==="source"?new zf("source",z):new qf("composite",z,b.value.zoomStops),this.paint._values[h]=new el(b.property,G,b.parameters)}}_handleOverridablePaintPropertyUpdate(h,b,D){return!(!this.layout||b.isDataDriven()||D.isDataDriven())&&BS.hasPaintOverride(this.layout,h)}static hasPaintOverride(h,b){let D=h.get("text-field"),z=gI.paint.properties[b],G=!1,X=Z=>{var re;for(let Q of Z)if(!((re=z.overrides)===null||re===void 0)&&re.hasOverride(Q))return void(G=!0)};if(D.value.kind==="constant"&&D.value.value instanceof $a)X(D.value.value.sections);else if(D.value.kind==="source"||D.value.kind==="composite"){let Z=Q=>{G||(Q instanceof Ms&&la(Q.value)===ri?X(Q.value.sections):Q instanceof Yo?X(Q.sections):Q.eachChild(Z))},re=D.value;re._styleExpression&&Z(re._styleExpression.expression)}return G}}let vee;var mit={get paint(){return vee=vee||new ms({"background-color":new wi(Ct.paint_background["background-color"]),"background-pattern":new Fc(Ct.paint_background["background-pattern"]),"background-opacity":new wi(Ct.paint_background["background-opacity"])})}};class yit extends hl{constructor(h,b){super(h,mit,b)}}class xit extends hl{constructor(h,b){super(h,{},b),this.onAdd=D=>{this.implementation.onAdd&&this.implementation.onAdd(D,D.painter.context.gl)},this.onRemove=D=>{this.implementation.onRemove&&this.implementation.onRemove(D,D.painter.context.gl)},this.implementation=h}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class _it{constructor(h){this._methodToThrottle=h,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var h;this._triggered||(this._triggered=!0,(h=this._channel)===null||h===void 0||h.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let bit={once:!0},mI=63710088e-1;class Xg{constructor(h,b){if(isNaN(h)||isNaN(b))throw new Error(`Invalid LngLat object: (${h}, ${b})`);if(this.lng=+h,this.lat=+b,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Xg(K(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(h){let b=Math.PI/180,D=this.lat*b,z=h.lat*b,G=Math.sin(D)*Math.sin(z)+Math.cos(D)*Math.cos(z)*Math.cos((h.lng-this.lng)*b);return mI*Math.acos(Math.min(G,1))}static convert(h){if(h instanceof Xg)return h;if(Array.isArray(h)&&(h.length===2||h.length===3))return new Xg(Number(h[0]),Number(h[1]));if(!Array.isArray(h)&&typeof h=="object"&&h!==null)return new Xg(Number("lng"in h?h.lng:h.lon),Number(h.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 [, ]")}}let pee=2*Math.PI*mI;function gee(M){return pee*Math.cos(M*Math.PI/180)}function mee(M){return(180+M)/360}function yee(M){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M*Math.PI/360)))/360}function xee(M,h){return M/gee(h)}function _ee(M){return 360*M-180}function OS(M){return 360/Math.PI*Math.atan(Math.exp((180-360*M)*Math.PI/180))-90}function bee(M,h){return M*gee(OS(h))}class y4{constructor(h,b,D=0){this.x=+h,this.y=+b,this.z=+D}static fromLngLat(h,b=0){let D=Xg.convert(h);return new y4(mee(D.lng),yee(D.lat),xee(b,D.lat))}toLngLat(){return new Xg(_ee(this.x),OS(this.y))}toAltitude(){return bee(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/pee*(h=OS(this.y),1/Math.cos(h*Math.PI/180));var h}}function wee(M,h,b){var D=2*Math.PI*6378137/256/Math.pow(2,b);return[M*D-2*Math.PI*6378137/2,h*D-2*Math.PI*6378137/2]}class yI{constructor(h,b,D){if(!(function(z,G,X){return!(z<0||z>25||X<0||X>=Math.pow(2,z)||G<0||G>=Math.pow(2,z))})(h,b,D))throw new Error(`x=${b}, y=${D}, z=${h} outside of bounds. 0<=x<${Math.pow(2,h)}, 0<=y<${Math.pow(2,h)} 0<=z<=25 `);this.z=h,this.x=b,this.y=D,this.key=Z_(0,h,h,b,D)}equals(h){return this.z===h.z&&this.x===h.x&&this.y===h.y}url(h,b,D){let z=(X=this.y,Z=this.z,re=wee(256*(G=this.x),256*(X=Math.pow(2,Z)-X-1),Z),Q=wee(256*(G+1),256*(X+1),Z),re[0]+","+re[1]+","+Q[0]+","+Q[1]);var G,X,Z,re,Q;let he=(function(oe,ke,ge){let Ue="";for(let je=oe;je>0;je--){let vt=1<1?"@2x":"").replace(/{quadkey}/g,he).replace(/{bbox-epsg-3857}/g,z)}isChildOf(h){let b=this.z-h.z;return b>0&&h.x===this.x>>b&&h.y===this.y>>b}getTilePoint(h){let b=Math.pow(2,this.z);return new o((h.x*b-this.x)*j,(h.y*b-this.y)*j)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Tee{constructor(h,b){this.wrap=h,this.canonical=b,this.key=Z_(h,b.z,b.z,b.x,b.y)}}class Yd{constructor(h,b,D,z,G){if(this.terrainRttPosMatrix32f=null,h= z; overscaledZ = ${h}; z = ${D}`);this.overscaledZ=h,this.wrap=b,this.canonical=new yI(D,+z,+G),this.key=Z_(b,h,D,z,G)}clone(){return new Yd(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(h){return this.overscaledZ===h.overscaledZ&&this.wrap===h.wrap&&this.canonical.equals(h.canonical)}scaledTo(h){if(h>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${h}; overscaledZ = ${this.overscaledZ}`);let b=this.canonical.z-h;return h>this.canonical.z?new Yd(h,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Yd(h,this.wrap,h,this.canonical.x>>b,this.canonical.y>>b)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(h,b){if(h>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${h}; overscaledZ = ${this.overscaledZ}`);let D=this.canonical.z-h;return h>this.canonical.z?Z_(this.wrap*+b,h,this.canonical.z,this.canonical.x,this.canonical.y):Z_(this.wrap*+b,h,h,this.canonical.x>>D,this.canonical.y>>D)}isChildOf(h){if(h.wrap!==this.wrap||this.overscaledZ-h.overscaledZ<=0)return!1;if(h.overscaledZ===0)return this.overscaledZ>0;let b=this.canonical.z-h.canonical.z;return!(b<0)&&h.canonical.x===this.canonical.x>>b&&h.canonical.y===this.canonical.y>>b}children(h){if(this.overscaledZ>=h)return[new Yd(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let b=this.canonical.z+1,D=2*this.canonical.x,z=2*this.canonical.y;return[new Yd(b,this.wrap,b,D,z),new Yd(b,this.wrap,b,D+1,z),new Yd(b,this.wrap,b,D,z+1),new Yd(b,this.wrap,b,D+1,z+1)]}isLessThan(h){return this.wraph.wrap)&&(this.overscaledZh.overscaledZ)&&(this.canonical.xh.canonical.x)&&this.canonical.y=0&&h=0&&b=Q)return null;let oe=this.canonical.x+z,ke=this.wrap;return oe<0?(ke-=Math.ceil(-oe/Q),oe=(oe%Q+Q)%Q):oe>=Q&&(ke+=Math.floor(oe/Q),oe%=Q),{tileID:new Yd(this.overscaledZ,ke,re,oe,he),x:X,y:Z}}}function Z_(M,h,b,D,z){(M*=2)<0&&(M=-1*M-1);let G=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(h){return this.expandBy(-h)}map(h){let b=new ix;return b.extend(h(new o(this.minX,this.minY))),b.extend(h(new o(this.maxX,this.minY))),b.extend(h(new o(this.minX,this.maxY))),b.extend(h(new o(this.maxX,this.maxY))),b}static fromPoints(h){let b=new ix;for(let D of h)b.extend(D);return b}contains(h){return h.x>=this.minX&&h.x<=this.maxX&&h.y>=this.minY&&h.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(h){return!this.empty()&&!h.empty()&&h.minX>=this.minX&&h.maxX<=this.maxX&&h.minY>=this.minY&&h.maxY<=this.maxY}intersects(h){return!this.empty()&&!h.empty()&&h.minX<=this.maxX&&h.maxX>=this.minX&&h.minY<=this.maxY&&h.maxY>=this.minY}}class Aee{constructor(h){this._stringToNumber={},this._numberToString=[];for(let b=0;b=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${h} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[h]}}class Mee{constructor(h,b,D,z,G){this.type="Feature",this._vectorTileFeature=h,this._x=D,this._y=z,this._z=b,this.properties=h.properties,this.id=G}projectPoint(h,b,D,z){return[360*(h.x+b)/z-180,360/Math.PI*Math.atan(Math.exp((1-2*(h.y+D)/z)*Math.PI))-90]}projectLine(h,b,D,z){return h.map((G=>this.projectPoint(G,b,D,z)))}get geometry(){if(this._geometry)return this._geometry;let h=this._vectorTileFeature,b=h.extent*Math.pow(2,this._z),D=h.extent*this._x,z=h.extent*this._y,G=h.loadGeometry();switch(h.type){case 1:{let X=[];for(let re of G)X.push(re[0]);let Z=this.projectLine(X,D,z,b);this._geometry=X.length===1?{type:"Point",coordinates:Z[0]}:{type:"MultiPoint",coordinates:Z};break}case 2:{let X=G.map((Z=>this.projectLine(Z,D,z,b)));this._geometry=X.length===1?{type:"LineString",coordinates:X[0]}:{type:"MultiLineString",coordinates:X};break}case 3:{let X=kQ(G),Z=[];for(let re of X)Z.push(re.map((Q=>this.projectLine(Q,D,z,b))));this._geometry=Z.length===1?{type:"Polygon",coordinates:Z[0]}:{type:"MultiPolygon",coordinates:Z};break}default:throw new Error(`unknown feature type: ${h.type}`)}return this._geometry}set geometry(h){this._geometry=h}toJSON(){let h={geometry:this.geometry};for(let b in this)b!=="_geometry"&&b!=="_vectorTileFeature"&&b!=="_x"&&b!=="_y"&&b!=="_z"&&(h[b]=this[b]);return h}}class $_{constructor(h,b,D){this._name=h,this.dataBuffer=b,typeof D=="number"?this._size=D:(this.nullabilityBuffer=D,this._size=D.size())}getValue(h){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(h)?null:this.getValueFromBuffer(h)}has(h){var b;return((b=this.nullabilityBuffer)==null?void 0:b.get(h))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class NS extends $_{}class xI extends NS{getValueFromBuffer(h){return this.dataBuffer[h]}}class _I extends NS{getValueFromBuffer(h){return this.dataBuffer[h]}}class See extends $_{constructor(h,b,D,z){super(h,b,z),this.delta=D}}class bI extends See{constructor(h,b,D,z){super(h,Int32Array.of(b),D,z)}getValueFromBuffer(h){return this.dataBuffer[0]+h*this.delta}}class wI extends $_{constructor(h,b,D,z){super(h,z?Int32Array.of(b):Uint32Array.of(b),D)}getValueFromBuffer(h){return this.dataBuffer[0]}}class wit{constructor(h,b,D,z,G=4096){this._name=h,this._geometryVector=b,this._idVector=D,this._propertyVectors=z,this._extent=G}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(h){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map((b=>[b.name,b])))),this.propertyVectorsMap.get(h)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let h=[],b=this.geometryVector.getGeometries();for(let D=0;D>>32-M;let AI=TI,U1=256;function MI(M,h){return M-M%h}function Tit(M){let h=M>>>0;return((255&h)<<24|(65280&h)<<8|h>>>8&65280|h>>>24&255)>>>0}let SI=(function(){if(!Number.isFinite(65536))return 65536;let M=MI(Math.floor(65536),U1);return M===0?U1:M})(),Ait=3*SI/U1+SI|0;function kee(){let M=new Uint8Array(Ait);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:M,byteContainerI32:new Int32Array(M.buffer,M.byteOffset,M.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function Mit(M,h,b,D,z){switch(z){case 1:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0;Z[Q++]=ke>>>0&1,Z[Q++]=ke>>>1&1,Z[Q++]=ke>>>2&1,Z[Q++]=ke>>>3&1,Z[Q++]=ke>>>4&1,Z[Q++]=ke>>>5&1,Z[Q++]=ke>>>6&1,Z[Q++]=ke>>>7&1,Z[Q++]=ke>>>8&1,Z[Q++]=ke>>>9&1,Z[Q++]=ke>>>10&1,Z[Q++]=ke>>>11&1,Z[Q++]=ke>>>12&1,Z[Q++]=ke>>>13&1,Z[Q++]=ke>>>14&1,Z[Q++]=ke>>>15&1,Z[Q++]=ke>>>16&1,Z[Q++]=ke>>>17&1,Z[Q++]=ke>>>18&1,Z[Q++]=ke>>>19&1,Z[Q++]=ke>>>20&1,Z[Q++]=ke>>>21&1,Z[Q++]=ke>>>22&1,Z[Q++]=ke>>>23&1,Z[Q++]=ke>>>24&1,Z[Q++]=ke>>>25&1,Z[Q++]=ke>>>26&1,Z[Q++]=ke>>>27&1,Z[Q++]=ke>>>28&1,Z[Q++]=ke>>>29&1,Z[Q++]=ke>>>30&1,Z[Q++]=ke>>>31&1}})(M,h,b,D);break;case 2:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0;Z[Q++]=ke>>>0&3,Z[Q++]=ke>>>2&3,Z[Q++]=ke>>>4&3,Z[Q++]=ke>>>6&3,Z[Q++]=ke>>>8&3,Z[Q++]=ke>>>10&3,Z[Q++]=ke>>>12&3,Z[Q++]=ke>>>14&3,Z[Q++]=ke>>>16&3,Z[Q++]=ke>>>18&3,Z[Q++]=ke>>>20&3,Z[Q++]=ke>>>22&3,Z[Q++]=ke>>>24&3,Z[Q++]=ke>>>26&3,Z[Q++]=ke>>>28&3,Z[Q++]=ke>>>30&3,Z[Q++]=ge>>>0&3,Z[Q++]=ge>>>2&3,Z[Q++]=ge>>>4&3,Z[Q++]=ge>>>6&3,Z[Q++]=ge>>>8&3,Z[Q++]=ge>>>10&3,Z[Q++]=ge>>>12&3,Z[Q++]=ge>>>14&3,Z[Q++]=ge>>>16&3,Z[Q++]=ge>>>18&3,Z[Q++]=ge>>>20&3,Z[Q++]=ge>>>22&3,Z[Q++]=ge>>>24&3,Z[Q++]=ge>>>26&3,Z[Q++]=ge>>>28&3,Z[Q++]=ge>>>30&3}})(M,h,b,D);break;case 3:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0;Z[Q++]=ke>>>0&7,Z[Q++]=ke>>>3&7,Z[Q++]=ke>>>6&7,Z[Q++]=ke>>>9&7,Z[Q++]=ke>>>12&7,Z[Q++]=ke>>>15&7,Z[Q++]=ke>>>18&7,Z[Q++]=ke>>>21&7,Z[Q++]=ke>>>24&7,Z[Q++]=ke>>>27&7,Z[Q++]=7&(ke>>>30|(1&ge)<<2),Z[Q++]=ge>>>1&7,Z[Q++]=ge>>>4&7,Z[Q++]=ge>>>7&7,Z[Q++]=ge>>>10&7,Z[Q++]=ge>>>13&7,Z[Q++]=ge>>>16&7,Z[Q++]=ge>>>19&7,Z[Q++]=ge>>>22&7,Z[Q++]=ge>>>25&7,Z[Q++]=ge>>>28&7,Z[Q++]=7&(ge>>>31|(3&Ue)<<1),Z[Q++]=Ue>>>2&7,Z[Q++]=Ue>>>5&7,Z[Q++]=Ue>>>8&7,Z[Q++]=Ue>>>11&7,Z[Q++]=Ue>>>14&7,Z[Q++]=Ue>>>17&7,Z[Q++]=Ue>>>20&7,Z[Q++]=Ue>>>23&7,Z[Q++]=Ue>>>26&7,Z[Q++]=Ue>>>29&7}})(M,h,b,D);break;case 4:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0;Z[Q++]=ke>>>0&15,Z[Q++]=ke>>>4&15,Z[Q++]=ke>>>8&15,Z[Q++]=ke>>>12&15,Z[Q++]=ke>>>16&15,Z[Q++]=ke>>>20&15,Z[Q++]=ke>>>24&15,Z[Q++]=ke>>>28&15,Z[Q++]=ge>>>0&15,Z[Q++]=ge>>>4&15,Z[Q++]=ge>>>8&15,Z[Q++]=ge>>>12&15,Z[Q++]=ge>>>16&15,Z[Q++]=ge>>>20&15,Z[Q++]=ge>>>24&15,Z[Q++]=ge>>>28&15,Z[Q++]=Ue>>>0&15,Z[Q++]=Ue>>>4&15,Z[Q++]=Ue>>>8&15,Z[Q++]=Ue>>>12&15,Z[Q++]=Ue>>>16&15,Z[Q++]=Ue>>>20&15,Z[Q++]=Ue>>>24&15,Z[Q++]=Ue>>>28&15,Z[Q++]=je>>>0&15,Z[Q++]=je>>>4&15,Z[Q++]=je>>>8&15,Z[Q++]=je>>>12&15,Z[Q++]=je>>>16&15,Z[Q++]=je>>>20&15,Z[Q++]=je>>>24&15,Z[Q++]=je>>>28&15}})(M,h,b,D);break;case 5:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0;Z[Q++]=ke>>>0&31,Z[Q++]=ke>>>5&31,Z[Q++]=ke>>>10&31,Z[Q++]=ke>>>15&31,Z[Q++]=ke>>>20&31,Z[Q++]=ke>>>25&31,Z[Q++]=31&(ke>>>30|(7&ge)<<2),Z[Q++]=ge>>>3&31,Z[Q++]=ge>>>8&31,Z[Q++]=ge>>>13&31,Z[Q++]=ge>>>18&31,Z[Q++]=ge>>>23&31,Z[Q++]=31&(ge>>>28|(1&Ue)<<4),Z[Q++]=Ue>>>1&31,Z[Q++]=Ue>>>6&31,Z[Q++]=Ue>>>11&31,Z[Q++]=Ue>>>16&31,Z[Q++]=Ue>>>21&31,Z[Q++]=Ue>>>26&31,Z[Q++]=31&(Ue>>>31|(15&je)<<1),Z[Q++]=je>>>4&31,Z[Q++]=je>>>9&31,Z[Q++]=je>>>14&31,Z[Q++]=je>>>19&31,Z[Q++]=je>>>24&31,Z[Q++]=31&(je>>>29|(3&vt)<<3),Z[Q++]=vt>>>2&31,Z[Q++]=vt>>>7&31,Z[Q++]=vt>>>12&31,Z[Q++]=vt>>>17&31,Z[Q++]=vt>>>22&31,Z[Q++]=vt>>>27&31}})(M,h,b,D);break;case 6:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0,gt=G[he++]>>>0;Z[Q++]=ke>>>0&63,Z[Q++]=ke>>>6&63,Z[Q++]=ke>>>12&63,Z[Q++]=ke>>>18&63,Z[Q++]=ke>>>24&63,Z[Q++]=63&(ke>>>30|(15&ge)<<2),Z[Q++]=ge>>>4&63,Z[Q++]=ge>>>10&63,Z[Q++]=ge>>>16&63,Z[Q++]=ge>>>22&63,Z[Q++]=63&(ge>>>28|(3&Ue)<<4),Z[Q++]=Ue>>>2&63,Z[Q++]=Ue>>>8&63,Z[Q++]=Ue>>>14&63,Z[Q++]=Ue>>>20&63,Z[Q++]=Ue>>>26&63,Z[Q++]=je>>>0&63,Z[Q++]=je>>>6&63,Z[Q++]=je>>>12&63,Z[Q++]=je>>>18&63,Z[Q++]=je>>>24&63,Z[Q++]=63&(je>>>30|(15&vt)<<2),Z[Q++]=vt>>>4&63,Z[Q++]=vt>>>10&63,Z[Q++]=vt>>>16&63,Z[Q++]=vt>>>22&63,Z[Q++]=63&(vt>>>28|(3>)<<4),Z[Q++]=gt>>>2&63,Z[Q++]=gt>>>8&63,Z[Q++]=gt>>>14&63,Z[Q++]=gt>>>20&63,Z[Q++]=gt>>>26&63}})(M,h,b,D);break;case 7:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0,gt=G[he++]>>>0,It=G[he++]>>>0;Z[Q++]=ke>>>0&127,Z[Q++]=ke>>>7&127,Z[Q++]=ke>>>14&127,Z[Q++]=ke>>>21&127,Z[Q++]=127&(ke>>>28|(7&ge)<<4),Z[Q++]=ge>>>3&127,Z[Q++]=ge>>>10&127,Z[Q++]=ge>>>17&127,Z[Q++]=ge>>>24&127,Z[Q++]=127&(ge>>>31|(63&Ue)<<1),Z[Q++]=Ue>>>6&127,Z[Q++]=Ue>>>13&127,Z[Q++]=Ue>>>20&127,Z[Q++]=127&(Ue>>>27|(3&je)<<5),Z[Q++]=je>>>2&127,Z[Q++]=je>>>9&127,Z[Q++]=je>>>16&127,Z[Q++]=je>>>23&127,Z[Q++]=127&(je>>>30|(31&vt)<<2),Z[Q++]=vt>>>5&127,Z[Q++]=vt>>>12&127,Z[Q++]=vt>>>19&127,Z[Q++]=127&(vt>>>26|(1>)<<6),Z[Q++]=gt>>>1&127,Z[Q++]=gt>>>8&127,Z[Q++]=gt>>>15&127,Z[Q++]=gt>>>22&127,Z[Q++]=127&(gt>>>29|(15&It)<<3),Z[Q++]=It>>>4&127,Z[Q++]=It>>>11&127,Z[Q++]=It>>>18&127,Z[Q++]=It>>>25&127}})(M,h,b,D);break;case 8:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0,gt=G[he++]>>>0,It=G[he++]>>>0,_t=G[he++]>>>0;Z[Q++]=ke>>>0&255,Z[Q++]=ke>>>8&255,Z[Q++]=ke>>>16&255,Z[Q++]=ke>>>24&255,Z[Q++]=ge>>>0&255,Z[Q++]=ge>>>8&255,Z[Q++]=ge>>>16&255,Z[Q++]=ge>>>24&255,Z[Q++]=Ue>>>0&255,Z[Q++]=Ue>>>8&255,Z[Q++]=Ue>>>16&255,Z[Q++]=Ue>>>24&255,Z[Q++]=je>>>0&255,Z[Q++]=je>>>8&255,Z[Q++]=je>>>16&255,Z[Q++]=je>>>24&255,Z[Q++]=vt>>>0&255,Z[Q++]=vt>>>8&255,Z[Q++]=vt>>>16&255,Z[Q++]=vt>>>24&255,Z[Q++]=gt>>>0&255,Z[Q++]=gt>>>8&255,Z[Q++]=gt>>>16&255,Z[Q++]=gt>>>24&255,Z[Q++]=It>>>0&255,Z[Q++]=It>>>8&255,Z[Q++]=It>>>16&255,Z[Q++]=It>>>24&255,Z[Q++]=_t>>>0&255,Z[Q++]=_t>>>8&255,Z[Q++]=_t>>>16&255,Z[Q++]=_t>>>24&255}})(M,h,b,D);break;case 16:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<128;oe++){let ke=G[he++]>>>0;Z[Q++]=65535&ke,Z[Q++]=ke>>>16&65535}})(M,h,b,D);break;default:(function(G,X,Z,re,Q){let he=AI[Q]>>>0,oe=X,ke=0,ge=G[oe]>>>0,Ue=re;for(let je=0;je<8;je++){for(let vt=0;vt<32;vt++)if(ke+Q<=32)Z[Ue+vt]=ge>>>ke&he,ke+=Q,ke===32&&(ke=0,oe++,vt!==31&&(ge=G[oe]>>>0));else{let gt=32-ke,It=ge>>>ke;oe++,ge=G[oe]>>>0;let _t=Q-gt;Z[Ue+vt]=(It|(ge&-1>>>32-_t>>>0)<>>0)}})(M,h,b,D,z)}return h+(z<<3)|0}function Sit(M,h,b,D){if(b+2>h)throw new Error(`FastPFOR decode: byteContainer underflow at block=${D} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${b}, byteSize=${h})`);let z=M[b++],G=M[b++];if(z>32)throw new Error(`FastPFOR decode: invalid bitWidth=${z} at block=${D} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:z,exceptionCount:G,bytePosIn:b}}function Eit(M,h,b,D,z,G,X,Z,re){let{maxBits:Q,exceptionBitWidth:he,bytePosIn:oe}=(function(vt,gt,It,_t,qt,tr){if(It+1>gt)throw new Error(`FastPFOR decode: exception header underflow at block=${tr} (need 1 byte for maxBits, bytePos=${It}, byteSize=${gt})`);let lr=vt[It++];if(lr<_t||lr>32)throw new Error(`FastPFOR decode: invalid maxBits=${lr} at block=${tr} (bitWidth=${_t}, expected ${_t}..32)`);let qr=lr-_t|0;if(qr<1||qr>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${qr} at block=${tr} (bitWidth=${_t}, maxBits=${lr})`);if(It+qt>gt)throw new Error(`FastPFOR decode: exception positions underflow at block=${tr} (need=${qt}, have=${gt-It})`);return{maxBits:lr,exceptionBitWidth:qr,bytePosIn:It}})(z,G,X,b,D,re);if(X=oe,he===1){let vt=1<je)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${he} (ptr=${Ue}, need ${D}, size=${je}) at block ${re}`);for(let vt=0;vtM.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${Z} at pageStart=${X} (expected > 0 and pageStart+whereMeta < encoded.length=${M.length})`);let re=X+1|0,Q=X+Z|0,he=M[Q]>>>0,oe=he+3>>>2,ke=Q+1,ge=ke+oe;if(ge>=M.length)throw new Error(`FastPFOR decode: invalid byteSize=${he} (metaInts=${oe}, pageStart=${X}, packedEnd=${Q}, byteContainerStart=${ke}) causes bitmapPos=${ge} out of bounds (encoded.length=${M.length})`);let Ue=(function(gt,It,_t,qt){qt.byteContainer.length<_t&&(qt.byteContainer=new Uint8Array(2*_t),qt.byteContainerI32=void 0);let tr=qt.byteContainer,lr=_t>>>2;if(3&tr.byteOffset)for(let jr=0;jr>>8&255,tr[fn+2|0]=_n>>>16&255,tr[fn+3|0]=_n>>>24&255}else{let jr=qt.byteContainerI32;(!jr||jr.buffer!==tr.buffer||jr.byteOffset!==tr.byteOffset||jr.length>>2)),jr.set(gt.subarray(It,It+lr))}let qr=3&_t;if(qr>0){let jr=0|gt[It+lr|0],_n=lr<<2;for(let fn=0;fn>>(fn<<3)&255}return tr})(M,ke,he,G),je=he,vt=(function(gt,It,_t){let qt=0|gt[It++],tr=_t.dataToBePacked;for(let lr=2;lr<=32;lr=lr+1|0){if(!(qt>>>lr-1&1))continue;if(It>=gt.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${lr}, streamWordIndex=${It}, needWords=1, availableWords=${gt.length-It}, encodedWords=${gt.length})`);let qr=gt[It++]>>>0,jr=MI(qr+31,32),_n=qr*lr+31>>>5;if(It+_n>gt.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${lr}, size=${qr}, streamWordIndex=${It}, needWords=${_n}, availableWords=${gt.length-It}, encodedWords=${gt.length})`);let fn=tr[lr];(!fn||fn.length>>5)|0,_t.exceptionSizes[lr]=qr}return It})(M,ge,G);return G.dataPointers.fill(0),(function(gt,It,_t,qt,tr,lr,qr,jr,_n,fn){let Dn=0|_t,Hn=0;for(let Ln=0;Ln0&&(Hn=Eit(tr,ti,ei,ci,jr,_n,Hn,fn,Ln))}if(Dn!==qt)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${It}, packedStart=${_t}, consumedPackedEnd=${Dn}, expectedPackedEnd=${qt}, packedWords=${qt-_t}, encoded.length=${gt.length})`)})(M,X,re,Q,h,0|D,z/U1|0,Ue,je,G),vt}function Cit(M,h,b,D,z){switch(z){case 2:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0;oe[ge++]=Ue>>>0&3,oe[ge++]=Ue>>>2&3,oe[ge++]=Ue>>>4&3,oe[ge++]=Ue>>>6&3,oe[ge++]=Ue>>>8&3,oe[ge++]=Ue>>>10&3,oe[ge++]=Ue>>>12&3,oe[ge++]=Ue>>>14&3,oe[ge++]=Ue>>>16&3,oe[ge++]=Ue>>>18&3,oe[ge++]=Ue>>>20&3,oe[ge++]=Ue>>>22&3,oe[ge++]=Ue>>>24&3,oe[ge++]=Ue>>>26&3,oe[ge++]=Ue>>>28&3,oe[ge++]=Ue>>>30&3,oe[ge++]=je>>>0&3,oe[ge++]=je>>>2&3,oe[ge++]=je>>>4&3,oe[ge++]=je>>>6&3,oe[ge++]=je>>>8&3,oe[ge++]=je>>>10&3,oe[ge++]=je>>>12&3,oe[ge++]=je>>>14&3,oe[ge++]=je>>>16&3,oe[ge++]=je>>>18&3,oe[ge++]=je>>>20&3,oe[ge++]=je>>>22&3,oe[ge++]=je>>>24&3,oe[ge++]=je>>>26&3,oe[ge++]=je>>>28&3,oe[ge]=je>>>30&3})(M,h,b,D);case 3:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0;oe[ge++]=Ue>>>0&7,oe[ge++]=Ue>>>3&7,oe[ge++]=Ue>>>6&7,oe[ge++]=Ue>>>9&7,oe[ge++]=Ue>>>12&7,oe[ge++]=Ue>>>15&7,oe[ge++]=Ue>>>18&7,oe[ge++]=Ue>>>21&7,oe[ge++]=Ue>>>24&7,oe[ge++]=Ue>>>27&7,oe[ge++]=7&(Ue>>>30|(1&je)<<2),oe[ge++]=je>>>1&7,oe[ge++]=je>>>4&7,oe[ge++]=je>>>7&7,oe[ge++]=je>>>10&7,oe[ge++]=je>>>13&7,oe[ge++]=je>>>16&7,oe[ge++]=je>>>19&7,oe[ge++]=je>>>22&7,oe[ge++]=je>>>25&7,oe[ge++]=je>>>28&7,oe[ge++]=7&(je>>>31|(3&vt)<<1),oe[ge++]=vt>>>2&7,oe[ge++]=vt>>>5&7,oe[ge++]=vt>>>8&7,oe[ge++]=vt>>>11&7,oe[ge++]=vt>>>14&7,oe[ge++]=vt>>>17&7,oe[ge++]=vt>>>20&7,oe[ge++]=vt>>>23&7,oe[ge++]=vt>>>26&7,oe[ge]=vt>>>29&7})(M,h,b,D);case 4:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0;oe[ge++]=Ue>>>0&15,oe[ge++]=Ue>>>4&15,oe[ge++]=Ue>>>8&15,oe[ge++]=Ue>>>12&15,oe[ge++]=Ue>>>16&15,oe[ge++]=Ue>>>20&15,oe[ge++]=Ue>>>24&15,oe[ge++]=Ue>>>28&15,oe[ge++]=je>>>0&15,oe[ge++]=je>>>4&15,oe[ge++]=je>>>8&15,oe[ge++]=je>>>12&15,oe[ge++]=je>>>16&15,oe[ge++]=je>>>20&15,oe[ge++]=je>>>24&15,oe[ge++]=je>>>28&15,oe[ge++]=vt>>>0&15,oe[ge++]=vt>>>4&15,oe[ge++]=vt>>>8&15,oe[ge++]=vt>>>12&15,oe[ge++]=vt>>>16&15,oe[ge++]=vt>>>20&15,oe[ge++]=vt>>>24&15,oe[ge++]=vt>>>28&15,oe[ge++]=gt>>>0&15,oe[ge++]=gt>>>4&15,oe[ge++]=gt>>>8&15,oe[ge++]=gt>>>12&15,oe[ge++]=gt>>>16&15,oe[ge++]=gt>>>20&15,oe[ge++]=gt>>>24&15,oe[ge]=gt>>>28&15})(M,h,b,D);case 5:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0;oe[ge++]=Ue>>>0&31,oe[ge++]=Ue>>>5&31,oe[ge++]=Ue>>>10&31,oe[ge++]=Ue>>>15&31,oe[ge++]=Ue>>>20&31,oe[ge++]=Ue>>>25&31,oe[ge++]=31&(Ue>>>30|(7&je)<<2),oe[ge++]=je>>>3&31,oe[ge++]=je>>>8&31,oe[ge++]=je>>>13&31,oe[ge++]=je>>>18&31,oe[ge++]=je>>>23&31,oe[ge++]=31&(je>>>28|(1&vt)<<4),oe[ge++]=vt>>>1&31,oe[ge++]=vt>>>6&31,oe[ge++]=vt>>>11&31,oe[ge++]=vt>>>16&31,oe[ge++]=vt>>>21&31,oe[ge++]=vt>>>26&31,oe[ge++]=31&(vt>>>31|(15>)<<1),oe[ge++]=gt>>>4&31,oe[ge++]=gt>>>9&31,oe[ge++]=gt>>>14&31,oe[ge++]=gt>>>19&31,oe[ge++]=gt>>>24&31,oe[ge++]=31&(gt>>>29|(3&It)<<3),oe[ge++]=It>>>2&31,oe[ge++]=It>>>7&31,oe[ge++]=It>>>12&31,oe[ge++]=It>>>17&31,oe[ge++]=It>>>22&31,oe[ge]=It>>>27&31})(M,h,b,D);case 6:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0;oe[ge++]=Ue>>>0&63,oe[ge++]=Ue>>>6&63,oe[ge++]=Ue>>>12&63,oe[ge++]=Ue>>>18&63,oe[ge++]=Ue>>>24&63,oe[ge++]=63&(Ue>>>30|(15&je)<<2),oe[ge++]=je>>>4&63,oe[ge++]=je>>>10&63,oe[ge++]=je>>>16&63,oe[ge++]=je>>>22&63,oe[ge++]=63&(je>>>28|(3&vt)<<4),oe[ge++]=vt>>>2&63,oe[ge++]=vt>>>8&63,oe[ge++]=vt>>>14&63,oe[ge++]=vt>>>20&63,oe[ge++]=vt>>>26&63,oe[ge++]=gt>>>0&63,oe[ge++]=gt>>>6&63,oe[ge++]=gt>>>12&63,oe[ge++]=gt>>>18&63,oe[ge++]=gt>>>24&63,oe[ge++]=63&(gt>>>30|(15&It)<<2),oe[ge++]=It>>>4&63,oe[ge++]=It>>>10&63,oe[ge++]=It>>>16&63,oe[ge++]=It>>>22&63,oe[ge++]=63&(It>>>28|(3&_t)<<4),oe[ge++]=_t>>>2&63,oe[ge++]=_t>>>8&63,oe[ge++]=_t>>>14&63,oe[ge++]=_t>>>20&63,oe[ge]=_t>>>26&63})(M,h,b,D);case 7:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0;oe[ge++]=Ue>>>0&127,oe[ge++]=Ue>>>7&127,oe[ge++]=Ue>>>14&127,oe[ge++]=Ue>>>21&127,oe[ge++]=127&(Ue>>>28|(7&je)<<4),oe[ge++]=je>>>3&127,oe[ge++]=je>>>10&127,oe[ge++]=je>>>17&127,oe[ge++]=je>>>24&127,oe[ge++]=127&(je>>>31|(63&vt)<<1),oe[ge++]=vt>>>6&127,oe[ge++]=vt>>>13&127,oe[ge++]=vt>>>20&127,oe[ge++]=127&(vt>>>27|(3>)<<5),oe[ge++]=gt>>>2&127,oe[ge++]=gt>>>9&127,oe[ge++]=gt>>>16&127,oe[ge++]=gt>>>23&127,oe[ge++]=127&(gt>>>30|(31&It)<<2),oe[ge++]=It>>>5&127,oe[ge++]=It>>>12&127,oe[ge++]=It>>>19&127,oe[ge++]=127&(It>>>26|(1&_t)<<6),oe[ge++]=_t>>>1&127,oe[ge++]=_t>>>8&127,oe[ge++]=_t>>>15&127,oe[ge++]=_t>>>22&127,oe[ge++]=127&(_t>>>29|(15&qt)<<3),oe[ge++]=qt>>>4&127,oe[ge++]=qt>>>11&127,oe[ge++]=qt>>>18&127,oe[ge]=qt>>>25&127})(M,h,b,D);case 8:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0;oe[ge++]=Ue>>>0&255,oe[ge++]=Ue>>>8&255,oe[ge++]=Ue>>>16&255,oe[ge++]=Ue>>>24&255,oe[ge++]=je>>>0&255,oe[ge++]=je>>>8&255,oe[ge++]=je>>>16&255,oe[ge++]=je>>>24&255,oe[ge++]=vt>>>0&255,oe[ge++]=vt>>>8&255,oe[ge++]=vt>>>16&255,oe[ge++]=vt>>>24&255,oe[ge++]=gt>>>0&255,oe[ge++]=gt>>>8&255,oe[ge++]=gt>>>16&255,oe[ge++]=gt>>>24&255,oe[ge++]=It>>>0&255,oe[ge++]=It>>>8&255,oe[ge++]=It>>>16&255,oe[ge++]=It>>>24&255,oe[ge++]=_t>>>0&255,oe[ge++]=_t>>>8&255,oe[ge++]=_t>>>16&255,oe[ge++]=_t>>>24&255,oe[ge++]=qt>>>0&255,oe[ge++]=qt>>>8&255,oe[ge++]=qt>>>16&255,oe[ge++]=qt>>>24&255,oe[ge++]=tr>>>0&255,oe[ge++]=tr>>>8&255,oe[ge++]=tr>>>16&255,oe[ge]=tr>>>24&255})(M,h,b,D);case 9:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0;oe[ge++]=Ue>>>0&511,oe[ge++]=Ue>>>9&511,oe[ge++]=Ue>>>18&511,oe[ge++]=511&(Ue>>>27|(15&je)<<5),oe[ge++]=je>>>4&511,oe[ge++]=je>>>13&511,oe[ge++]=je>>>22&511,oe[ge++]=511&(je>>>31|(255&vt)<<1),oe[ge++]=vt>>>8&511,oe[ge++]=vt>>>17&511,oe[ge++]=511&(vt>>>26|(7>)<<6),oe[ge++]=gt>>>3&511,oe[ge++]=gt>>>12&511,oe[ge++]=gt>>>21&511,oe[ge++]=511&(gt>>>30|(127&It)<<2),oe[ge++]=It>>>7&511,oe[ge++]=It>>>16&511,oe[ge++]=511&(It>>>25|(3&_t)<<7),oe[ge++]=_t>>>2&511,oe[ge++]=_t>>>11&511,oe[ge++]=_t>>>20&511,oe[ge++]=511&(_t>>>29|(63&qt)<<3),oe[ge++]=qt>>>6&511,oe[ge++]=qt>>>15&511,oe[ge++]=511&(qt>>>24|(1&tr)<<8),oe[ge++]=tr>>>1&511,oe[ge++]=tr>>>10&511,oe[ge++]=tr>>>19&511,oe[ge++]=511&(tr>>>28|(31&lr)<<4),oe[ge++]=lr>>>5&511,oe[ge++]=lr>>>14&511,oe[ge]=lr>>>23&511})(M,h,b,D);case 10:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0;oe[ge++]=Ue>>>0&1023,oe[ge++]=Ue>>>10&1023,oe[ge++]=Ue>>>20&1023,oe[ge++]=1023&(Ue>>>30|(255&je)<<2),oe[ge++]=je>>>8&1023,oe[ge++]=je>>>18&1023,oe[ge++]=1023&(je>>>28|(63&vt)<<4),oe[ge++]=vt>>>6&1023,oe[ge++]=vt>>>16&1023,oe[ge++]=1023&(vt>>>26|(15>)<<6),oe[ge++]=gt>>>4&1023,oe[ge++]=gt>>>14&1023,oe[ge++]=1023&(gt>>>24|(3&It)<<8),oe[ge++]=It>>>2&1023,oe[ge++]=It>>>12&1023,oe[ge++]=It>>>22&1023,oe[ge++]=_t>>>0&1023,oe[ge++]=_t>>>10&1023,oe[ge++]=_t>>>20&1023,oe[ge++]=1023&(_t>>>30|(255&qt)<<2),oe[ge++]=qt>>>8&1023,oe[ge++]=qt>>>18&1023,oe[ge++]=1023&(qt>>>28|(63&tr)<<4),oe[ge++]=tr>>>6&1023,oe[ge++]=tr>>>16&1023,oe[ge++]=1023&(tr>>>26|(15&lr)<<6),oe[ge++]=lr>>>4&1023,oe[ge++]=lr>>>14&1023,oe[ge++]=1023&(lr>>>24|(3&qr)<<8),oe[ge++]=qr>>>2&1023,oe[ge++]=qr>>>12&1023,oe[ge]=qr>>>22&1023})(M,h,b,D);case 11:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0;oe[ge++]=Ue>>>0&2047,oe[ge++]=Ue>>>11&2047,oe[ge++]=2047&(Ue>>>22|(1&je)<<10),oe[ge++]=je>>>1&2047,oe[ge++]=je>>>12&2047,oe[ge++]=2047&(je>>>23|(3&vt)<<9),oe[ge++]=vt>>>2&2047,oe[ge++]=vt>>>13&2047,oe[ge++]=2047&(vt>>>24|(7>)<<8),oe[ge++]=gt>>>3&2047,oe[ge++]=gt>>>14&2047,oe[ge++]=2047&(gt>>>25|(15&It)<<7),oe[ge++]=It>>>4&2047,oe[ge++]=It>>>15&2047,oe[ge++]=2047&(It>>>26|(31&_t)<<6),oe[ge++]=_t>>>5&2047,oe[ge++]=_t>>>16&2047,oe[ge++]=2047&(_t>>>27|(63&qt)<<5),oe[ge++]=qt>>>6&2047,oe[ge++]=qt>>>17&2047,oe[ge++]=2047&(qt>>>28|(127&tr)<<4),oe[ge++]=tr>>>7&2047,oe[ge++]=tr>>>18&2047,oe[ge++]=2047&(tr>>>29|(255&lr)<<3),oe[ge++]=lr>>>8&2047,oe[ge++]=lr>>>19&2047,oe[ge++]=2047&(lr>>>30|(511&qr)<<2),oe[ge++]=qr>>>9&2047,oe[ge++]=qr>>>20&2047,oe[ge++]=2047&(qr>>>31|(1023&jr)<<1),oe[ge++]=jr>>>10&2047,oe[ge]=jr>>>21&2047})(M,h,b,D);case 12:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0,_n=Q[he+11]>>>0;oe[ge++]=Ue>>>0&4095,oe[ge++]=Ue>>>12&4095,oe[ge++]=4095&(Ue>>>24|(15&je)<<8),oe[ge++]=je>>>4&4095,oe[ge++]=je>>>16&4095,oe[ge++]=4095&(je>>>28|(255&vt)<<4),oe[ge++]=vt>>>8&4095,oe[ge++]=vt>>>20&4095,oe[ge++]=gt>>>0&4095,oe[ge++]=gt>>>12&4095,oe[ge++]=4095&(gt>>>24|(15&It)<<8),oe[ge++]=It>>>4&4095,oe[ge++]=It>>>16&4095,oe[ge++]=4095&(It>>>28|(255&_t)<<4),oe[ge++]=_t>>>8&4095,oe[ge++]=_t>>>20&4095,oe[ge++]=qt>>>0&4095,oe[ge++]=qt>>>12&4095,oe[ge++]=4095&(qt>>>24|(15&tr)<<8),oe[ge++]=tr>>>4&4095,oe[ge++]=tr>>>16&4095,oe[ge++]=4095&(tr>>>28|(255&lr)<<4),oe[ge++]=lr>>>8&4095,oe[ge++]=lr>>>20&4095,oe[ge++]=qr>>>0&4095,oe[ge++]=qr>>>12&4095,oe[ge++]=4095&(qr>>>24|(15&jr)<<8),oe[ge++]=jr>>>4&4095,oe[ge++]=jr>>>16&4095,oe[ge++]=4095&(jr>>>28|(255&_n)<<4),oe[ge++]=_n>>>8&4095,oe[ge]=_n>>>20&4095})(M,h,b,D);case 16:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0,_n=Q[he+11]>>>0,fn=Q[he+12]>>>0,Dn=Q[he+13]>>>0,Hn=Q[he+14]>>>0,Ln=Q[he+15]>>>0;oe[ge++]=Ue>>>0&65535,oe[ge++]=Ue>>>16&65535,oe[ge++]=je>>>0&65535,oe[ge++]=je>>>16&65535,oe[ge++]=vt>>>0&65535,oe[ge++]=vt>>>16&65535,oe[ge++]=gt>>>0&65535,oe[ge++]=gt>>>16&65535,oe[ge++]=It>>>0&65535,oe[ge++]=It>>>16&65535,oe[ge++]=_t>>>0&65535,oe[ge++]=_t>>>16&65535,oe[ge++]=qt>>>0&65535,oe[ge++]=qt>>>16&65535,oe[ge++]=tr>>>0&65535,oe[ge++]=tr>>>16&65535,oe[ge++]=lr>>>0&65535,oe[ge++]=lr>>>16&65535,oe[ge++]=qr>>>0&65535,oe[ge++]=qr>>>16&65535,oe[ge++]=jr>>>0&65535,oe[ge++]=jr>>>16&65535,oe[ge++]=_n>>>0&65535,oe[ge++]=_n>>>16&65535,oe[ge++]=fn>>>0&65535,oe[ge++]=fn>>>16&65535,oe[ge++]=Dn>>>0&65535,oe[ge++]=Dn>>>16&65535,oe[ge++]=Hn>>>0&65535,oe[ge++]=Hn>>>16&65535,oe[ge++]=Ln>>>0&65535,oe[ge]=Ln>>>16&65535})(M,h,b,D);case 32:for(let Q=0;Q<32;Q=Q+1|0)b[D+Q|0]=0|M[h+Q|0];return}let G=AI[z]>>>0,X=h,Z=0,re=M[X]>>>0;for(let Q=0;Q<32;Q++)if(Z+z<=32)b[D+Q]=re>>>Z&G,Z+=z,Z===32&&(Z=0,X++,Q!==31&&(re=M[X]>>>0));else{let he=32-Z,oe=re>>>Z;X++,re=M[X]>>>0,b[D+Q]=(oe|(re&AI[z-he]>>>0)<=64)throw new Error("Varint too long")}return h.set(z),b}function Pit(M,h){let b,D;return D=M[h.get()],h.increment(),b=127&D,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<7,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<14,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<21,D<128?b:(D=M[h.get()],b|=(15&D)<<28,(function(z,G,X){let Z,re;if(re=G[X.get()],X.increment(),Z=(112&re)>>4,re<128||(re=G[X.get()],X.increment(),Z|=(127&re)<<3,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<10,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<17,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<24,re<128)||(re=G[X.get()],X.increment(),Z|=(1&re)<<31,re<128))return 4294967296*Z+(z>>>0);throw new Error("Expected varint not more than 10 bytes")})(b,M,h)))))}function Fs(M){return M>>>1^-(1&M)}function Zh(M){return M>>BigInt(1)^-(BigInt(1)&M)}function J_(M){return M%2==1?(M+1)/-2:M/2}function EI(M,h,b){if(b===void 0){b=0;for(let G=0;G=4)for(;D=4)for(;D=4)for(let D=M[0];b>4],Z=null;switch(X){case Of.DATA:Z={dictionaryType:Object.values(Hv)[15&G]};break;case Of.OFFSET:Z={offsetType:Object.values(ax)[15&G]};break;case Of.LENGTH:Z={lengthType:Object.values(Xd)[15&G]}}z.increment();let re=D[z.get()],Q=Object.values(To)[re>>5],he=Object.values(To)[re>>2&7],oe=Object.values(Zg)[3&re];z.increment();let ke=xh(D,z,2),ge=ke[0];return{physicalStreamType:X,logicalStreamType:Z,logicalLevelTechnique1:Q,logicalLevelTechnique2:he,physicalLevelTechnique:oe,numValues:ge,byteLength:ke[1],decompressedCount:ge}})(M,h);return b.logicalLevelTechnique1===To.MORTON?(function(D,z,G){let X=xh(z,G,2);return{physicalStreamType:D.physicalStreamType,logicalStreamType:D.logicalStreamType,logicalLevelTechnique1:D.logicalLevelTechnique1,logicalLevelTechnique2:D.logicalLevelTechnique2,physicalLevelTechnique:D.physicalLevelTechnique,numValues:D.numValues,byteLength:D.byteLength,decompressedCount:D.decompressedCount,numBits:X[0],coordinateShift:X[1]}})(b,M,h):To.RLE!==b.logicalLevelTechnique1&&To.RLE!==b.logicalLevelTechnique2||Zg.NONE===b.physicalLevelTechnique?b:(function(D,z,G){let X=xh(z,G,2);return{physicalStreamType:D.physicalStreamType,logicalStreamType:D.logicalStreamType,logicalLevelTechnique1:D.logicalLevelTechnique1,logicalLevelTechnique2:D.logicalLevelTechnique2,physicalLevelTechnique:D.physicalLevelTechnique,numValues:D.numValues,byteLength:D.byteLength,decompressedCount:X[1],runs:X[0],numRleValues:X[1]}})(b,M,h)}(function(M){M.PRESENT="PRESENT",M.DATA="DATA",M.OFFSET="OFFSET",M.LENGTH="LENGTH"})(Of||(Of={})),(function(M){M.NONE="NONE",M.SINGLE="SINGLE",M.SHARED="SHARED",M.VERTEX="VERTEX",M.MORTON="MORTON",M.FSST="FSST"})(Hv||(Hv={})),(function(M){M.VERTEX="VERTEX",M.INDEX="INDEX",M.STRING="STRING",M.KEY="KEY"})(ax||(ax={})),(function(M){M.VAR_BINARY="VAR_BINARY",M.GEOMETRIES="GEOMETRIES",M.PARTS="PARTS",M.RINGS="RINGS",M.TRIANGLES="TRIANGLES",M.SYMBOL="SYMBOL",M.DICTIONARY="DICTIONARY"})(Xd||(Xd={})),(function(M){M[M.FLAT=0]="FLAT",M[M.CONST=1]="CONST",M[M.SEQUENCE=2]="SEQUENCE",M[M.DICTIONARY=3]="DICTIONARY",M[M.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(Ml||(Ml={}));class jv{constructor(h,b){this.values=h,this._size=b}get(h){let b=Math.floor(h/8);return(this.values[b]>>h%8&1)==1}set(h,b){let D=Math.floor(h/8);this.values[D]=this.values[D]|(b?1:0)<>h%8&1}size(){return this._size}getBuffer(){return this.values}}function Q_(M,h,b){if(!h)return M;let D=h.size(),z=new M.constructor(D),G=0;for(let X=0;X=4)for(;ge>>0;for(let ke=1;ke>>0;return oe})(X.logicalLevelTechnique2===To.RLE?EI(G,X.runs,X.numRleValues):G);break;case To.RLE:Q=EI(G,X.runs,X.numRleValues);break;case To.MORTON:CI(G),Q=G;break;case To.COMPONENTWISE_DELTA:Q=(function(he){if(he.length<2)return new Uint32Array(he);let oe=new Uint32Array(he.length);oe[0]=Fs(he[0])>>>0,oe[1]=Fs(he[1])>>>0;for(let ke=2;ke>>0,oe[ke+1]=oe[ke-1]+Fs(he[ke+1])>>>0;return oe})(G);break;case To.NONE:Q=G;break;default:throw new Error(`The specified Logical level technique is not supported: ${X.logicalLevelTechnique1}`)}return re?Q_(Q,re,0):Q})(eb(M,h,b),b,0,z)}function Kg(M,h,b){return(function(D,z){if(z.logicalLevelTechnique1===To.DELTA&&z.logicalLevelTechnique2===To.NONE)return(function(G){let X=new Int32Array(G.length+1);X[0]=0,X[1]=Fs(G[0]);let Z=X[1];for(let re=2;re!==X.length;++re)Z+=Fs(G[re-1]),X[re]=X[re-1]+Z;return new Uint32Array(X)})(D);if(z.logicalLevelTechnique1===To.RLE&&z.logicalLevelTechnique2===To.NONE)return(function(G,X,Z){let re=new Uint32Array(Z+1);re[0]=0;let Q=1,he=re[0];for(let oe=0;oe>>2,je=(function(gt,It){if(It<=gt.encodedWords.length)return gt.encodedWords;let _t=new Uint32Array(Math.max(16,2*It));return gt.encodedWords=_t,_t})(ke,Ue);(function(gt,It,_t,qt){if(It<0||_t<0||It+_t>gt.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${It}, byteLength=${_t}, bytes.length=${gt.length})`);let tr=Math.floor(_t/4),lr=_t%4!=0,qr=lr?tr+1:tr;if(qt.length0){let jr=gt.byteOffset+It;if(3&jr)for(let _n=0;_n0){let jr=0|gt[qt];if(qt=qt+1|0,255&jr)throw new Error(`FastPFOR decode: invalid alignedLength=${jr} (expected multiple of 256)`);if(tr+jr>lr.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${tr}, alignedLength=${jr}, out.length=${lr.length})`);qt=(function(_n,fn,Dn,Hn,Ln,un){let ei=Hn+MI(Ln,U1),ci=Hn,ti=Dn;for(;ci!==ei;){let di=Math.min(SI,ei-ci);ti=kit(_n,fn,ti,ci,di,un),ci=ci+di|0}return ti})(gt,lr,qt,tr,jr,qr),tr=tr+jr|0}return(function(jr,_n,fn,Dn,Hn,Ln){if(Ln===0)return _n;let un=0,ei=_n,ci=_n+fn,ti=Hn,di=Hn,_a=Hn+Ln,Ao=0,us=0;for(;ei>>un&255;if(un+=8,ei+=un>>>5,un&=31,Ao|=(127&ks)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${us}, partial=${Ao}, decoded=${di-ti}/${Ln}, inPos=${ei}, inEnd=${ci})`)}if(di!==_a)throw new Error(`FastPFOR VByte: truncated stream (decoded=${di-ti}, expected=${Ln}, consumedWords=${ei-_n}/${fn}, vbyteStart=${_n}, vbyteEnd=${ci})`)})(gt,qt,gt.length-qt|0,lr,tr,It-tr|0),lr})(je.subarray(0,Ue),Q,ke.decoderWorkspace);return oe.add(he),vt})(z,G,X,Z,(function(re=16){if(re<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${re}`);let Q=Math.max(16,0|re);return{encodedWords:new Uint32Array(Q),decoderWorkspace:kee()}})(X>>>2))})(M,b.numValues,b.byteLength,h);case Zg.VARINT:return xh(M,h,b.numValues);case Zg.NONE:{let z=h.get();h.add(b.byteLength);let G=M.subarray(z,h.get());return new Uint32Array(G)}default:throw new Error(`Specified physicalLevelTechnique ${D} is not supported (yet).`)}}function PI(M,h,b){let D=eb(M,h,b);return D.length===1?D[0]:(function(z){return z[1]})(D)}function Dee(M,h,b){return(function(D){if(D.length===2){let z=Fs(D[1]);return[z,z]}return[Fs(D[2]),Fs(D[3])]})(eb(M,h,b))}function Ree(M,h,b){return(function(D){if(D.length===2){let z=Zh(D[1]);return[z,z]}return[Zh(D[2]),Zh(D[3])]})(K_(M,h,b.numValues))}function Iee(M,h,b,D){return(function(z,G,X){let Z;switch(G.logicalLevelTechnique1){case To.DELTA:Z=(function(re){let Q=new BigUint64Array(re.length);Q[0]=BigInt.asUintN(64,Zh(re[0]));for(let he=1;he>1,h)-b}}function Oee(M,h){let b=0;for(let D=0;D>D;return b}function tb(M,h,b,D,z,G,X){return M===$g.MORTON?(function(Z,re,Q,he,oe,ke){let ge=new Array(oe?he+1:he);for(let Ue=0;Ue[tr])),D+=_t,z+=_t}break;case Ic.LINESTRING:{let _t,qt;vt?(_t=ge[z]-ge[z-1],z++):_t=ke[D]-ke[D-1],D++,je?(qt=rb(gt,Z,_t,!1),Z+=2*_t):(qt=tb(h.vertexBufferType,gt,Ue,re,_t,!1,Q),re+=_t),b[X++]=[qt],oe&&G++}break;case Ic.POLYGON:{let _t=ke[D]-ke[D-1];D++;let qt=new Array(_t-1),tr,lr=ge[z]-ge[z-1];if(z++,je){tr=rb(gt,Z,lr,!0),Z+=2*lr;for(let qr=0;qr0&&je.push(je[0]),ke.push(je)}h[he]=ke,G&&Q++}break;case Ic.MULTIPOLYGON:{let oe=G[Q]-G[Q-1];Q++;let ke=[];for(let ge=0;ge0&>.push(gt[0]),ke.push(gt)}}h[he]=ke}}return h}[Symbol.iterator](){return null}}function Hee(M,h,b,D,z,G){return new Fit(M,h,b,D,z,G)}class Fit extends Gee{constructor(h,b,D,z,G,X){super(D,z,G,X),this._numGeometries=h,this._geometryType=b}geometryType(h){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function jee(M,h,b,D,z){return new Dit(M,h,b,D,z)}class Dit extends Gee{constructor(h,b,D,z,G){super(b,D,z,G),this._geometryTypes=h}geometryType(h){return this._geometryTypes[h]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function Rit(M,h,b,D,z){let G=$h(M,b),X,Z,re,Q;if(US(G,D,M,b)===Ml.CONST){let It=PI(M,b,G),_t,qt,tr,lr;for(let qr=0;qrb?h[G++]:1);return D}function Wee(M,h,b,D){let z=new Uint32Array(h[h.length-1]+1),G=0;z[0]=G;let X=1,Z=0;for(let re=0;re=ke);){let ge=X[Q.increment()];if(ge<=127){let Ue=ge+3,je=X[Q.increment()],vt=Math.min(oe+Ue,Z);he.fill(je,oe,vt),oe=vt}else{let Ue=256-ge;for(let je=0;je=12?qit.decode(M.subarray(h,b)):(function(D,z,G){let X="",Z=z;for(;Z239?4:re>223?3:re>191?2:1;if(Z+ge>G)break;ge===1?re<128&&(ke=re):ge===2?(Q=D[Z+1],(192&Q)==128&&(ke=(31&re)<<6|63&Q,ke<=127&&(ke=null))):ge===3?(Q=D[Z+1],he=D[Z+2],(192&Q)==128&&(192&he)==128&&(ke=(15&re)<<12|(63&Q)<<6|63&he,(ke<=2047||ke>=55296&&ke<=57343)&&(ke=null))):ge===4&&(Q=D[Z+1],he=D[Z+2],oe=D[Z+3],(192&Q)==128&&(192&he)==128&&(192&oe)==128&&(ke=(15&re)<<18|(63&Q)<<12|(63&he)<<6|63&oe,(ke<=65535||ke>=1114112)&&(ke=null))),ke===null?(ke=65533,ge=1):ke>65535&&(ke-=65536,X+=String.fromCharCode(ke>>>10&1023|55296),ke=56320|1023&ke),X+=String.fromCharCode(ke),Z+=ge}return X})(M,h,b)}class II extends $_{constructor(h,b,D,z){super(h,D,z),this.offsetBuffer=b}}class Xee extends II{constructor(h,b,D,z){super(h,b,D,z!=null?z:b.length-1)}getValueFromBuffer(h){return RI(this.dataBuffer,this.offsetBuffer[h],this.offsetBuffer[h+1])}}class nb extends II{constructor(h,b,D,z,G){super(h,D,z,G!=null?G:b.length),this.indexBuffer=b,this.indexBuffer=b}getValueFromBuffer(h){let b=this.indexBuffer[h];return RI(this.dataBuffer,this.offsetBuffer[b],this.offsetBuffer[b+1])}}class Zee extends II{constructor(h,b,D,z,G,X,Z){super(h,D,z,Z),this.indexBuffer=b,this.symbolOffsetBuffer=G,this.symbolTableBuffer=X}getValueFromBuffer(h){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=(function(D,z,G){let X=[],Z=new Array(z.length).fill(0);for(let re=1;re=10}function Jee(M){return M===30}function Oit(M){if(M.type==="scalarType"){let h=M.scalarType;if(h.type==="physicalType")switch(h.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(h.type==="logicalType")return!1}else if(M.type==="complexType"){let h=M.complexType;if(h.type==="physicalType")switch(h.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",M),!1}function Nit(M){var h;return M.type==="complexType"&&((h=M.complexType)==null?void 0:h.type)==="physicalType"&&M.complexType.physicalType===0}let Uit=new TextDecoder;function zI(M,h){let b=xh(M,h,1)[0];if(b===0)return"";let D=h.get(),z=M.subarray(D,D+b);return h.add(b),Uit.decode(z)}function Qee(M,h){let b=xh(M,h,1)[0]>>>0;if(b<10||b>30)throw new Error(`Unsupported field type code ${b}. Supported: 10-29(scalars), 30(STRUCT)`);let D=$ee(b);if(Kee(b)&&(D.name=zI(M,h)),Jee(b)){let z=xh(M,h,1)[0]>>>0;D.complexType.children=new Array(z);for(let G=0;G>>0,D=$ee(b);if(!D)throw new Error(`Unsupported column type code ${b}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(Kee(b)?D.name=zI(M,h):b>=0&&b<=3?D.name="id":b===4&&(D.name="geometry"),Jee(b)){let z=xh(M,h,1)[0]>>>0,G=D.complexType;G.children=new Array(z);for(let X=0;X>>0,G=xh(M,h,1)[0]>>>0;D.columns=new Array(G);for(let X=0;X=4)for(;tr>>0,oe=X.get()+he;if(oe>D.length)throw new Error(`Block overruns tile: ${oe} > ${D.length}`);if(xh(D,X,1)[0]>>>0!=1){X.set(oe);continue}let[ke,ge]=Git(D,X),Ue=ke.featureTables[0],je=null,vt=null,gt=[],It=0;for(let qt of Ue.columns){let tr=qt.name;if((re=qt).type==="scalarType"&&((Q=re.scalarType)==null?void 0:Q.type)==="logicalType"&&re.scalarType.logicalType===0){let lr=null;if(qt.nullable){let jr=$h(D,X),_n=X.get(),fn=x4(D,jr.numValues,jr.byteLength,X);X.set(_n+jr.byteLength),lr=new jv(fn,jr.numValues)}let qr=$h(D,X);It=lr?lr.size():qr.decompressedCount,je=Hit(D,qt,X,tr,qr,lr!=null?lr:It,G)}else if(Nit(qt)){let lr=xh(D,X,1)[0];if(It===0){let qr=X.get();It=$h(D,X).decompressedCount,X.set(qr)}vt=Rit(D,lr,X,It)}else{let lr=Oit(qt)?xh(D,X,1)[0]:1;if(lr===0)continue;let qr=Bit(D,X,qt,lr,It);if(qr)if(Array.isArray(qr))for(let jr of qr)gt.push(jr);else gt.push(qr)}}let _t=new wit(Ue.name,vt,je,gt,ge);Z.push(_t),X.set(oe)}var re;return Z})(new Uint8Array(h));this.layers=b.reduce(((D,z)=>Object.assign(Object.assign({},D),{[z.name]:new Wit(z)})),{})}}class Yit{constructor(h,b){this.feature=h,this.type=h.type,this.properties=h.tags?h.tags:{},this.extent=b,"id"in h&&(typeof h.id=="string"?this.id=parseInt(h.id,10):typeof h.id!="number"||isNaN(h.id)||(this.id=h.id))}loadGeometry(){let h=[],b=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let D of b){let z=[];for(let G of D)z.push(new o(G[0],G[1]));h.push(z)}return h}}let b4="_geojsonTileLayer";function Xit(M,h,b=""){h.writeVarintField(15,M.version||1),h.writeStringField(1,M.name||""),h.writeVarintField(5,M.extent||4096);let D={jsonPrefix:b,keys:[],values:[],keycache:{},valuecache:{}};for(let X=0;X>31}function Kit(M,h){let b=M.loadGeometry(),D=M.type,z=0,G=0;for(let X of b){let Z=1;D===1&&(Z=X.length),h.writeVarint(qI(1,Z));let re=D===3?X.length-1:X.length;for(let Q=0;Q=0&&he[3]>=0&&re.insert(Z,he[0],he[1],he[2],he[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new CQ(new IS(this.rawTileData)).layers:new ete(this.rawTileData).layers,this.sourceLayerCoder=new Aee(this.vtLayers?Object.keys(this.vtLayers).sort():[b4])),this.vtLayers}query(h,b,D,z){this.loadVTLayers();let G=h.params,X=j/h.tileSize/h.scale,Z=cn(G.filter,G.globalState),re=h.queryGeometry,Q=h.queryPadding*X,he=ix.fromPoints(re),oe=this.grid.query(he.minX-Q,he.minY-Q,he.maxX+Q,he.maxY+Q),ke=ix.fromPoints(h.cameraQueryGeometry).expandBy(Q),ge=this.grid3D.query(ke.minX,ke.minY,ke.maxX,ke.maxY,((vt,gt,It,_t)=>(function(qt,tr,lr,qr,jr){for(let fn of qt)if(tr<=fn.x&&lr<=fn.y&&qr>=fn.x&&jr>=fn.y)return!0;let _n=[new o(tr,lr),new o(tr,jr),new o(qr,jr),new o(qr,lr)];if(qt.length>2){for(let fn of _n)if(pn(qt,fn))return!0}for(let fn=0;fn(It||(It=$l(_t)),qt.queryIntersectsFeature({queryGeometry:re,feature:_t,featureState:tr,geometry:It,zoom:this.z,transform:h.transform,pixelsToTileUnits:X,pixelPosMatrix:h.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:h.getElevation}))))}return Ue}loadMatchingFeature(h,b,D,z,G,X,Z,re,Q,he,oe){let ke=this.bucketLayerIDs[b];if(X&&!ke.some((vt=>X.has(vt))))return;let ge=this.sourceLayerCoder.decode(D),Ue=this.vtLayers[ge].feature(z);if(G.needGeometry){let vt=xa(Ue,!0);if(!G.filter(new mi(this.tileID.overscaledZ),vt,this.tileID.canonical))return}else if(!G.filter(new mi(this.tileID.overscaledZ),Ue))return;let je=this.getId(Ue,ge);for(let vt of ke){if(X&&!X.has(vt))continue;let gt=re[vt];if(!gt)continue;let It={};je&&he&&(It=he.getState(gt.sourceLayer||b4,je));let _t=_e({},Q[vt]);_t.paint=nte(_t.paint,gt.paint,Ue,It,Z),_t.layout=nte(_t.layout,gt.layout,Ue,It,Z);let qt=!oe||oe(Ue,gt,It);if(!qt)continue;let tr=new Mee(Ue,this.z,this.x,this.y,je);tr.layer=_t;let lr=h[vt];lr===void 0&&(lr=h[vt]=[]),lr.push({featureIndex:z,feature:tr,intersectionZ:qt})}}lookupSymbolFeatures(h,b,D,z,G,X,Z,re){let Q={};this.loadVTLayers();let he=cn(G.filterSpec,G.globalState);for(let oe of h)this.loadMatchingFeature(Q,D,z,oe,he,X,Z,re,b);return Q}hasLayer(h){for(let b of this.bucketLayerIDs)for(let D of b)if(h===D)return!0;return!1}getId(h,b){var D;let z=h.id;return this.promoteId&&(z=h.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[b]],typeof z=="boolean"&&(z=Number(z)),z===void 0&&(!((D=h.properties)===null||D===void 0)&&D.cluster)&&this.promoteId&&(z=Number(h.properties.cluster_id))),z}}function nte(M,h,b,D,z){return ae(M,((G,X)=>{let Z=h instanceof yc?h.get(X):null;return Z!=null&&Z.evaluate?Z.evaluate(b,D,z):Z}))}function Qit(M,h){return h-M}function ite(M,h,b,D,z){let G=[];for(let X of M){let Z;for(let re=0;re=D&&he.x>=D||(Q.x>=D?Q=new o(D,Q.y+(D-Q.x)/(he.x-Q.x)*(he.y-Q.y))._round():he.x>=D&&(he=new o(D,Q.y+(D-Q.x)/(he.x-Q.x)*(he.y-Q.y))._round()),Q.y>=z&&he.y>=z||(Q.y>=z?Q=new o(Q.x+(z-Q.y)/(he.y-Q.y)*(he.x-Q.x),z)._round():he.y>=z&&(he=new o(Q.x+(z-Q.y)/(he.y-Q.y)*(he.x-Q.x),z)._round()),Z&&Q.equals(Z[Z.length-1])||(Z=[Q],G.push(Z)),Z.push(he)))))}}return G}function ate(M,h,b,D,z){switch(h){case 1:return(function(G,X,Z,re){let Q=[];for(let he of G)for(let oe of he){let ke=re===0?oe.x:oe.y;ke>=X&&ke<=Z&&Q.push([oe])}return Q})(M,b,D,z);case 2:return ote(M,b,D,z,!1);case 3:return ote(M,b,D,z,!0)}return[]}function eat(M,h,b,D,z){let G=D===0?tat:rat,X=[],Z=[];for(let he=0;heh&&X.push(G(oe,ke,h)):ge>b?Ue=h&&(X.push(G(oe,ke,h)),je=!0),Ue>b&&ge<=b&&(X.push(G(oe,ke,b)),je=!0),!z&&je&&(Z.push(X),X=[])}let re=M.length-1,Q=D===0?M[re].x:M[re].y;return Q>=h&&Q<=b&&X.push(M[re]),z&&X.length>0&&!X[0].equals(X[X.length-1])&&X.push(new o(X[0].x,X[0].y)),X.length>0&&Z.push(X),Z}function ote(M,h,b,D,z){let G=[];for(let X of M){let Z=eat(X,h,b,D,z);Z.length>0&&G.push(...Z)}return G}function tat(M,h,b){return new o(b,M.y+(b-M.x)/(h.x-M.x)*(h.y-M.y))}function rat(M,h,b){return new o(M.x+(b-M.y)/(h.y-M.y)*(h.x-M.x),b)}_i("FeatureIndex",rte,{omit:["rawTileData","sourceLayerCoder"]});class Jg extends o{constructor(h,b,D,z){super(h,b),this.angle=D,z!==void 0&&(this.segment=z)}clone(){return new Jg(this.x,this.y,this.angle,this.segment)}}function ste(M,h,b,D,z){if(h.segment===void 0||b===0)return!0;let G=h,X=h.segment+1,Z=0;for(;Z>-b/2;){if(X--,X<0)return!1;Z-=M[X].dist(G),G=M[X]}Z+=M[X].dist(M[X+1]),X++;let re=[],Q=0;for(;ZD;)Q-=re.shift().angleDelta;if(Q>z)return!1;X++,Z+=he.dist(oe)}return!0}function lte(M){let h=0;for(let b=0;bQ){let Ue=(Q-re)/ge,je=Ks.number(oe.x,ke.x,Ue),vt=Ks.number(oe.y,ke.y,Ue),gt=new Jg(je,vt,ke.angleTo(oe),he);return gt._round(),!X||ste(M,gt,Z,X,h)?gt:void 0}re+=ge}}function iat(M,h,b,D,z,G,X,Z,re){let Q=ute(D,G,X),he=cte(D,z),oe=he*X,ke=M[0].x===0||M[0].x===re||M[0].y===0||M[0].y===re;return h-oe=0&&qt=0&&tr=0&&ke+Q<=he){let lr=new Jg(qt,tr,It,Ue);lr._round(),D&&!ste(M,lr,G,D,z)||ge.push(lr)}}oe+=gt}return Z||ge.length||X||(ge=fte(M,oe/2,b,D,z,G,X,!0,re)),ge}function hte(M,h,b,D){let z=[],G=M.image,X=G.pixelRatio,Z=G.paddedRect.w-2,re=G.paddedRect.h-2,Q={x1:M.left,y1:M.top,x2:M.right,y2:M.bottom},he=G.stretchX||[[0,Z]],oe=G.stretchY||[[0,re]],ke=(un,ei)=>un+ei[1]-ei[0],ge=he.reduce(ke,0),Ue=oe.reduce(ke,0),je=Z-ge,vt=re-Ue,gt=0,It=ge,_t=0,qt=Ue,tr=0,lr=je,qr=0,jr=vt;if(G.content&&D){let un=G.content,ei=un[2]-un[0],ci=un[3]-un[1];(G.textFitWidth||G.textFitHeight)&&(Q=lee(M)),gt=VS(he,0,un[0]),_t=VS(oe,0,un[1]),It=VS(he,un[0],un[2]),qt=VS(oe,un[1],un[3]),tr=un[0]-gt,qr=un[1]-_t,lr=ei-It,jr=ci-qt}let _n=Q.x1,fn=Q.y1,Dn=Q.x2-_n,Hn=Q.y2-fn,Ln=(un,ei,ci,ti)=>{let di=GS(un.stretch-gt,It,Dn,_n),_a=HS(un.fixed-tr,lr,un.stretch,ge),Ao=GS(ei.stretch-_t,qt,Hn,fn),us=HS(ei.fixed-qr,jr,ei.stretch,Ue),ks=GS(ci.stretch-gt,It,Dn,_n),Uf=HS(ci.fixed-tr,lr,ci.stretch,ge),Jl=GS(ti.stretch-_t,qt,Hn,fn),_c=HS(ti.fixed-qr,jr,ti.stretch,Ue),zc=new o(di,Ao),Sl=new o(ks,Ao),df=new o(ks,Jl),_h=new o(di,Jl),bh=new o(_a/X,us/X),Ad=new o(Uf/X,_c/X),Vf=h*Math.PI/180;if(Vf){let qc=Math.sin(Vf),Bl=Math.cos(Vf),ec=[Bl,-qc,qc,Bl];zc._matMult(ec),Sl._matMult(ec),_h._matMult(ec),df._matMult(ec)}let Md=un.stretch+un.fixed,Z0=ei.stretch+ei.fixed;return{tl:zc,tr:Sl,bl:_h,br:df,tex:{x:G.paddedRect.x+1+Md,y:G.paddedRect.y+1+Z0,w:ci.stretch+ci.fixed-Md,h:ti.stretch+ti.fixed-Z0},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:bh,pixelOffsetBR:Ad,minFontScaleX:lr/X/Dn,minFontScaleY:jr/X/Hn,isSDF:b}};if(D&&(G.stretchX||G.stretchY)){let un=dte(he,je,ge),ei=dte(oe,vt,Ue);for(let ci=0;ci0&&(je=Math.max(10,je),this.circleDiameter=je)}else{let ke=!((oe=X.image)===null||oe===void 0)&&oe.content&&(X.image.textFitWidth||X.image.textFitHeight)?lee(X):{x1:X.left,y1:X.top,x2:X.right,y2:X.bottom};ke.y1=ke.y1*Z-re[0],ke.y2=ke.y2*Z+re[2],ke.x1=ke.x1*Z-re[3],ke.x2=ke.x2*Z+re[1];let ge=X.collisionPadding;if(ge&&(ke.x1-=ge[0]*Z,ke.y1-=ge[1]*Z,ke.x2+=ge[2]*Z,ke.y2+=ge[3]*Z),he){let Ue=new o(ke.x1,ke.y1),je=new o(ke.x2,ke.y1),vt=new o(ke.x1,ke.y2),gt=new o(ke.x2,ke.y2),It=he*Math.PI/180;Ue._rotate(It),je._rotate(It),vt._rotate(It),gt._rotate(It),ke.x1=Math.min(Ue.x,je.x,vt.x,gt.x),ke.x2=Math.max(Ue.x,je.x,vt.x,gt.x),ke.y1=Math.min(Ue.y,je.y,vt.y,gt.y),ke.y2=Math.max(Ue.y,je.y,vt.y,gt.y)}h.emplaceBack(b.x,b.y,ke.x1,ke.y1,ke.x2,ke.y2,D,z,G)}this.boxEndIndex=h.length}}class aat{constructor(h=[],b=(D,z)=>Dz?1:0){if(this.data=h,this.length=this.data.length,this.compare=b,this.length>0)for(let D=(this.length>>1)-1;D>=0;D--)this._down(D)}push(h){this.data.push(h),this._up(this.length++)}pop(){if(this.length===0)return;let h=this.data[0],b=this.data.pop();return--this.length>0&&(this.data[0]=b,this._down(0)),h}peek(){return this.data[0]}_up(h){let{data:b,compare:D}=this,z=b[h];for(;h>0;){let G=h-1>>1,X=b[G];if(D(z,X)>=0)break;b[h]=X,h=G}b[h]=z}_down(h){let{data:b,compare:D}=this,z=this.length>>1,G=b[h];for(;h=0)break;b[h]=b[X],h=X}b[h]=G}}function oat(M,h=1){let b=ix.fromPoints(M[0]),D=Math.min(b.width(),b.height()),z=D/2,G=new aat([],sat),{minX:X,minY:Z,maxX:re,maxY:Q}=b;if(D===0)return new o(X,Z);for(let ke=X;keoe.d||!oe.d)&&(oe=ke),ke.max-oe.d<=h||(z=ke.h/2,G.push(new ib(ke.p.x-z,ke.p.y-z,z,M)),G.push(new ib(ke.p.x+z,ke.p.y-z,z,M)),G.push(new ib(ke.p.x-z,ke.p.y+z,z,M)),G.push(new ib(ke.p.x+z,ke.p.y+z,z,M)))}return he.d>0&&oe.d-he.d<=h?he.p:oe.p}function sat(M,h){return h.max-M.max}class ib{constructor(h,b,D,z){this.p=new o(h,b),this.h=D,this.d=(function(G,X){let Z=!1,re=1/0;for(let Q of X)for(let he=0,oe=Q.length,ke=oe-1;heG.y!=Ue.y>G.y&&G.x<(Ue.x-ge.x)*(G.y-ge.y)/(Ue.y-ge.y)+ge.x&&(Z=!Z),re=Math.min(re,gr(G,ge,Ue))}return(Z?1:-1)*Math.sqrt(re)})(this.p,z),this.max=this.d+this.h*Math.SQRT2}}var Nf;a.aM=void 0,(Nf=a.aM||(a.aM={}))[Nf.center=1]="center",Nf[Nf.left=2]="left",Nf[Nf.right=3]="right",Nf[Nf.top=4]="top",Nf[Nf.bottom=5]="bottom",Nf[Nf["top-left"]=6]="top-left",Nf[Nf["top-right"]=7]="top-right",Nf[Nf["bottom-left"]=8]="bottom-left",Nf[Nf["bottom-right"]=9]="bottom-right";let BI=Number.POSITIVE_INFINITY;function vte(M,h){return h[1]!==BI?(function(b,D,z){let G=0,X=0;switch(D=Math.abs(D),z=Math.abs(z),b){case"top-right":case"top-left":case"top":X=z-7;break;case"bottom-right":case"bottom-left":case"bottom":X=7-z}switch(b){case"top-right":case"bottom-right":case"right":G=-D;break;case"top-left":case"bottom-left":case"left":G=D}return[G,X]})(M,h[0],h[1]):(function(b,D){let z=0,G=0;D<0&&(D=0);let X=D/Math.SQRT2;switch(b){case"top-right":case"top-left":G=X-7;break;case"bottom-right":case"bottom-left":G=7-X;break;case"bottom":G=7-D;break;case"top":G=D-7}switch(b){case"top-right":case"bottom-right":z=-X;break;case"top-left":case"bottom-left":z=X;break;case"left":z=D;break;case"right":z=-D}return[z,G]})(M,h[0])}function pte(M,h,b){var D;let z=M.layout,G=(D=z.get("text-variable-anchor-offset"))===null||D===void 0?void 0:D.evaluate(h,{},b);if(G){let Z=G.values,re=[];for(let Q=0;Qke*Rc));he.startsWith("top")?oe[1]-=7:he.startsWith("bottom")&&(oe[1]+=7),re[Q+1]=oe}return new yo(re)}let X=z.get("text-variable-anchor");if(X){let Z;Z=M._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[z.get("text-radial-offset").evaluate(h,{},b)*Rc,BI]:z.get("text-offset").evaluate(h,{},b).map((Q=>Q*Rc));let re=[];for(let Q of X)re.push(Q,vte(Q,Z));return new yo(re)}return null}function OI(M){switch(M){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function lat(M,h,b,D,z,G,X,Z,re,Q,he,oe){let ke=G.textMaxSize.evaluate(h,{});ke===void 0&&(ke=X);let ge=M.layers[0].layout,Ue=ge.get("icon-offset").evaluate(h,{},he),je=mte(b.horizontal),vt=X/24,gt=M.tilePixelRatio*vt,It=M.tilePixelRatio*ke/24,_t=M.tilePixelRatio*Z,qt=M.tilePixelRatio*ge.get("symbol-spacing"),tr=ge.get("text-padding")*M.tilePixelRatio,lr=(function(ci,ti,di,_a=1){let Ao=ci.get("icon-padding").evaluate(ti,{},di),us=Ao==null?void 0:Ao.values;return[us[0]*_a,us[1]*_a,us[2]*_a,us[3]*_a]})(ge,h,he,M.tilePixelRatio),qr=ge.get("text-max-angle")/180*Math.PI,jr=ge.get("text-rotation-alignment")!=="viewport"&&ge.get("symbol-placement")!=="point",_n=ge.get("icon-rotation-alignment")==="map"&&ge.get("symbol-placement")!=="point",fn=ge.get("symbol-placement"),Dn=qt/2,Hn=ge.get("icon-text-fit"),Ln;D&&Hn!=="none"&&(M.allowVerticalPlacement&&b.vertical&&(Ln=uee(D,b.vertical,Hn,ge.get("icon-text-fit-padding"),Ue,vt)),je&&(D=uee(D,je,Hn,ge.get("icon-text-fit-padding"),Ue,vt)));let un=he?oe.line.getGranularityForZoomLevel(he.z):1,ei=(ci,ti)=>{ti.x<0||ti.x>=j||ti.y<0||ti.y>=j||(function(di,_a,Ao,us,ks,Uf,Jl,_c,zc,Sl,df,_h,bh,Ad,Vf,Md,Z0,qc,Bl,ec,Ql,Bc,V1,Wv,w4){let Qg=di.addToLineVertexArray(_a,Ao),ox,ab,ob,sb,yte=0,xte=0,_te=0,bte=0,NI=-1,UI=-1,G1={},wte=si("");if(di.allowVerticalPlacement&&us.vertical){let wh=_c.layout.get("text-rotate").evaluate(Ql,{},Wv)+90;ob=new jS(zc,_a,Sl,df,_h,us.vertical,bh,Ad,Vf,wh),Jl&&(sb=new jS(zc,_a,Sl,df,_h,Jl,Z0,qc,Vf,wh))}if(ks){let wh=_c.layout.get("icon-rotate").evaluate(Ql,{}),_0=_c.layout.get("icon-text-fit")!=="none",sx=hte(ks,wh,V1,_0),Xv=Jl?hte(Jl,wh,V1,_0):void 0;ab=new jS(zc,_a,Sl,df,_h,ks,Z0,qc,!1,wh),yte=4*sx.length;let lx=di.iconSizeData,Ip=null;lx.kind==="source"?(Ip=[N1*_c.layout.get("icon-size").evaluate(Ql,{})],Ip[0]>Yg&&me(`${di.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):lx.kind==="composite"&&(Ip=[N1*Bc.compositeIconSizes[0].evaluate(Ql,{},Wv),N1*Bc.compositeIconSizes[1].evaluate(Ql,{},Wv)],(Ip[0]>Yg||Ip[1]>Yg)&&me(`${di.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),di.addSymbols(di.icon,sx,Ip,ec,Bl,Ql,a.ax.none,_a,Qg.lineStartIndex,Qg.lineLength,-1,Wv),NI=di.icon.placedSymbolArray.length-1,Xv&&(xte=4*Xv.length,di.addSymbols(di.icon,Xv,Ip,ec,Bl,Ql,a.ax.vertical,_a,Qg.lineStartIndex,Qg.lineLength,-1,Wv),UI=di.icon.placedSymbolArray.length-1)}let Tte=Object.keys(us.horizontal);for(let wh of Tte){let _0=us.horizontal[wh];if(!ox){wte=si(_0.text);let Xv=_c.layout.get("text-rotate").evaluate(Ql,{},Wv);ox=new jS(zc,_a,Sl,df,_h,_0,bh,Ad,Vf,Xv)}let sx=_0.positionedLines.length===1;if(_te+=gte(di,_a,_0,Uf,_c,Vf,Ql,Md,Qg,us.vertical?a.ax.horizontal:a.ax.horizontalOnly,sx?Tte:[wh],G1,NI,Bc,Wv),sx)break}us.vertical&&(bte+=gte(di,_a,us.vertical,Uf,_c,Vf,Ql,Md,Qg,a.ax.vertical,["vertical"],G1,UI,Bc,Wv));let cat=ox?ox.boxStartIndex:di.collisionBoxArray.length,fat=ox?ox.boxEndIndex:di.collisionBoxArray.length,hat=ob?ob.boxStartIndex:di.collisionBoxArray.length,dat=ob?ob.boxEndIndex:di.collisionBoxArray.length,vat=ab?ab.boxStartIndex:di.collisionBoxArray.length,pat=ab?ab.boxEndIndex:di.collisionBoxArray.length,gat=sb?sb.boxStartIndex:di.collisionBoxArray.length,mat=sb?sb.boxEndIndex:di.collisionBoxArray.length,Yv=-1,WS=(wh,_0)=>wh!=null&&wh.circleDiameter?Math.max(wh.circleDiameter,_0):_0;Yv=WS(ox,Yv),Yv=WS(ob,Yv),Yv=WS(ab,Yv),Yv=WS(sb,Yv);let Ate=Yv>-1?1:0;Ate&&(Yv*=w4/Rc),di.glyphOffsetArray.length>=X_.MAX_GLYPHS&&me("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ql.sortKey!==void 0&&di.addToSortKeyRanges(di.symbolInstances.length,Ql.sortKey);let yat=pte(_c,Ql,Wv),[xat,_at]=(function(wh,_0){let sx=wh.length,Xv=_0==null?void 0:_0.values;if((Xv==null?void 0:Xv.length)>0)for(let lx=0;lx=0?G1.right:-1,G1.center>=0?G1.center:-1,G1.left>=0?G1.left:-1,G1.vertical||-1,NI,UI,wte,cat,fat,hat,dat,vat,pat,gat,mat,Sl,_te,bte,yte,xte,Ate,0,bh,Yv,xat,_at)})(M,ti,ci,b,D,z,Ln,M.layers[0],M.collisionBoxArray,h.index,h.sourceLayerIndex,M.index,gt,[tr,tr,tr,tr],jr,re,_t,lr,_n,Ue,h,G,Q,he,X)};if(fn==="line")for(let ci of ite(h.geometry,0,0,j,j)){let ti=nx(ci,un),di=iat(ti,qt,qr,b.vertical||je,D,24,It,M.overscaling,j);for(let _a of di)je&&uat(M,je.text,Dn,_a)||ei(ti,_a)}else if(fn==="line-center"){for(let ci of h.geometry)if(ci.length>1){let ti=nx(ci,un),di=nat(ti,qr,b.vertical||je,D,24,It);di&&ei(ti,di)}}else if(h.type==="Polygon")for(let ci of uh(h.geometry,0)){let ti=oat(ci,16);ei(nx(ci[0],un,!0),new Jg(ti.x,ti.y,0))}else if(h.type==="LineString")for(let ci of h.geometry){let ti=nx(ci,un);ei(ti,new Jg(ti[0].x,ti[0].y,0))}else if(h.type==="Point")for(let ci of h.geometry)for(let ti of ci)ei([ti],new Jg(ti.x,ti.y,0))}function gte(M,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue){let je=(function(It,_t,qt,tr,lr,qr,jr,_n){let fn=tr.layout.get("text-rotate").evaluate(qr,{})*Math.PI/180,Dn=[];for(let Hn of _t.positionedLines)for(let Ln of Hn.positionedGlyphs){if(!Ln.rect)continue;let un=Ln.rect||{},ei=4,ci=!0,ti=1,di=0,_a=(lr||_n)&&Ln.vertical,Ao=Ln.metrics.advance*Ln.scale/2;if(_n&&_t.verticalizable&&(di=Hn.lineOffset/2-(Ln.imageName?-(Rc-Ln.metrics.width*Ln.scale)/2:(Ln.scale-1)*Rc)),Ln.imageName){let qc=jr[Ln.imageName];ci=qc.sdf,ti=qc.pixelRatio,ei=1/ti}let us=lr?[Ln.x+Ao,Ln.y]:[0,0],ks=lr?[0,0]:[Ln.x+Ao+qt[0],Ln.y+qt[1]-di],Uf=[0,0];_a&&(Uf=ks,ks=[0,0]);let Jl=Ln.metrics.isDoubleResolution?2:1,_c=(Ln.metrics.left-ei)*Ln.scale-Ao+ks[0],zc=(-Ln.metrics.top-ei)*Ln.scale+ks[1],Sl=_c+un.w/Jl*Ln.scale/ti,df=zc+un.h/Jl*Ln.scale/ti,_h=new o(_c,zc),bh=new o(Sl,zc),Ad=new o(_c,df),Vf=new o(Sl,df);if(_a){let qc=new o(-Ao,Ao- -17),Bl=-Math.PI/2,ec=12-Ao,Ql=new o(22-ec,-(Ln.imageName?ec:0)),Bc=new o(...Uf);_h._rotateAround(Bl,qc)._add(Ql)._add(Bc),bh._rotateAround(Bl,qc)._add(Ql)._add(Bc),Ad._rotateAround(Bl,qc)._add(Ql)._add(Bc),Vf._rotateAround(Bl,qc)._add(Ql)._add(Bc)}if(fn){let qc=Math.sin(fn),Bl=Math.cos(fn),ec=[Bl,-qc,qc,Bl];_h._matMult(ec),bh._matMult(ec),Ad._matMult(ec),Vf._matMult(ec)}let Md=new o(0,0),Z0=new o(0,0);Dn.push({tl:_h,tr:bh,bl:Ad,br:Vf,tex:un,writingMode:_t.writingMode,glyphOffset:us,sectionIndex:Ln.sectionIndex,isSDF:ci,pixelOffsetTL:Md,pixelOffsetBR:Z0,minFontScaleX:0,minFontScaleY:0})}return Dn})(0,b,Z,z,G,X,D,M.allowVerticalPlacement),vt=M.textSizeData,gt=null;vt.kind==="source"?(gt=[N1*z.layout.get("text-size").evaluate(X,{})],gt[0]>Yg&&me(`${M.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):vt.kind==="composite"&&(gt=[N1*ge.compositeTextSizes[0].evaluate(X,{},Ue),N1*ge.compositeTextSizes[1].evaluate(X,{},Ue)],(gt[0]>Yg||gt[1]>Yg)&&me(`${M.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),M.addSymbols(M.text,je,gt,Z,G,X,Q,h,re.lineStartIndex,re.lineLength,ke,Ue);for(let It of he)oe[It]=M.text.placedSymbolArray.length-1;return 4*je.length}function mte(M){for(let h in M)return M[h];return null}function uat(M,h,b,D){let z=M.compareText;if(h in z){let G=z[h];for(let X=G.length-1;X>=0;X--)if(D.dist(G[X])this.process())),this.subscription=et(this.target,"message",(b=>this.receive(b)),!1),this.globalScope=De(self)?M:window}registerMessageHandler(M,h){this.messageHandlers[M]=h}unregisterMessageHandler(M){delete this.messageHandlers[M]}sendAsync(M,h){return new Promise(((b,D)=>{let z=Math.round(1e18*Math.random()).toString(36).substring(0,10),G=h?et(h.signal,"abort",(()=>{G==null||G.unsubscribe(),delete this.resolveRejects[z];let re={id:z,type:"",origin:location.origin,targetMapId:M.targetMapId,sourceMapId:this.mapId};this.target.postMessage(re)}),bit):null;this.resolveRejects[z]={resolve:re=>{G==null||G.unsubscribe(),b(re)},reject:re=>{G==null||G.unsubscribe(),D(re)}};let X=[],Z=Object.assign(Object.assign({},M),{id:z,sourceMapId:this.mapId,origin:location.origin,data:Be(M.data,X)});this.target.postMessage(Z,{transfer:X})}))}receive(M){let h=M.data,b=h.id,D=["file://","resource://android","null"],z=[h.origin,location.origin],G=h.origin===location.origin,X=z.some((Z=>D.includes(Z)));if((G||X)&&(!h.targetMapId||this.mapId===h.targetMapId)){if(h.type===""){delete this.tasks[b];let Z=this.abortControllers[b];return delete this.abortControllers[b],void(Z&&Z.abort())}if(De(self)||h.mustQueue)return this.tasks[b]=h,this.taskQueue.push(b),void this.invoker.trigger();this.processTask(b,h)}}process(){if(this.taskQueue.length===0)return;let M=this.taskQueue.shift(),h=this.tasks[M];delete this.tasks[M],this.taskQueue.length>0&&this.invoker.trigger(),h&&this.processTask(M,h)}processTask(M,h){return i(this,void 0,void 0,(function*(){if(h.type===""){let z=this.resolveRejects[M];return delete this.resolveRejects[M],z?void(h.error?z.reject(U(Ne(h.error))):z.resolve(Ne(h.data))):void 0}if(!this.messageHandlers[h.type])return void this.completeTask(M,new Error(`Could not find a registered handler for ${h.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let b=Ne(h.data),D=new AbortController;this.abortControllers[M]=D;try{let z=yield this.messageHandlers[h.type](h.sourceMapId,b,D);this.completeTask(M,null,z)}catch(z){this.completeTask(M,U(z))}}))}completeTask(M,h,b){let D=[];delete this.abortControllers[M];let z={id:M,type:"",sourceMapId:this.mapId,origin:location.origin,error:h?Be(h):null,data:Be(b,D)};this.target.postMessage(z,{transfer:D})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},a.O=function(){var M=new y(16);return y!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=0,M[12]=0,M[13]=0,M[14]=0),M[0]=1,M[5]=1,M[10]=1,M[15]=1,M},a.P=o,a.Q=function(M,h,b){var D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je=b[0],vt=b[1],gt=b[2];return h===M?(M[12]=h[0]*je+h[4]*vt+h[8]*gt+h[12],M[13]=h[1]*je+h[5]*vt+h[9]*gt+h[13],M[14]=h[2]*je+h[6]*vt+h[10]*gt+h[14],M[15]=h[3]*je+h[7]*vt+h[11]*gt+h[15]):(z=h[1],G=h[2],X=h[3],Z=h[4],re=h[5],Q=h[6],he=h[7],oe=h[8],ke=h[9],ge=h[10],Ue=h[11],M[0]=D=h[0],M[1]=z,M[2]=G,M[3]=X,M[4]=Z,M[5]=re,M[6]=Q,M[7]=he,M[8]=oe,M[9]=ke,M[10]=ge,M[11]=Ue,M[12]=D*je+Z*vt+oe*gt+h[12],M[13]=z*je+re*vt+ke*gt+h[13],M[14]=G*je+Q*vt+ge*gt+h[14],M[15]=X*je+he*vt+Ue*gt+h[15]),M},a.R=Kl,a.S=function(M,h,b){var D=b[0],z=b[1],G=b[2];return M[0]=h[0]*D,M[1]=h[1]*D,M[2]=h[2]*D,M[3]=h[3]*D,M[4]=h[4]*z,M[5]=h[5]*z,M[6]=h[6]*z,M[7]=h[7]*z,M[8]=h[8]*G,M[9]=h[9]*G,M[10]=h[10]*G,M[11]=h[11]*G,M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15],M},a.T=NR,a.U=function(M,h,b){var D=h[0],z=h[1],G=h[2],X=h[3],Z=h[4],re=h[5],Q=h[6],he=h[7],oe=h[8],ke=h[9],ge=h[10],Ue=h[11],je=h[12],vt=h[13],gt=h[14],It=h[15],_t=b[0],qt=b[1],tr=b[2],lr=b[3];return M[0]=_t*D+qt*Z+tr*oe+lr*je,M[1]=_t*z+qt*re+tr*ke+lr*vt,M[2]=_t*G+qt*Q+tr*ge+lr*gt,M[3]=_t*X+qt*he+tr*Ue+lr*It,M[4]=(_t=b[4])*D+(qt=b[5])*Z+(tr=b[6])*oe+(lr=b[7])*je,M[5]=_t*z+qt*re+tr*ke+lr*vt,M[6]=_t*G+qt*Q+tr*ge+lr*gt,M[7]=_t*X+qt*he+tr*Ue+lr*It,M[8]=(_t=b[8])*D+(qt=b[9])*Z+(tr=b[10])*oe+(lr=b[11])*je,M[9]=_t*z+qt*re+tr*ke+lr*vt,M[10]=_t*G+qt*Q+tr*ge+lr*gt,M[11]=_t*X+qt*he+tr*Ue+lr*It,M[12]=(_t=b[12])*D+(qt=b[13])*Z+(tr=b[14])*oe+(lr=b[15])*je,M[13]=_t*z+qt*re+tr*ke+lr*vt,M[14]=_t*G+qt*Q+tr*ge+lr*gt,M[15]=_t*X+qt*he+tr*Ue+lr*It,M},a.V=function(M,h){let b={};for(let D of h)D in M&&(b[D]=M[D]);return b},a.W=Xg,a.X=K,a.Y=yee,a.Z=mee,a._=i,a.a=Ve,a.a$=function(M){var h=new y(3);return h[0]=M[0],h[1]=M[1],h[2]=M[2],h},a.a0=p,a.a1=x,a.a2=Oe,a.a3=Yd,a.a4=_ee,a.a5=OS,a.a6=j,a.a7=y4,a.a8=ix,a.a9=25,a.aA=function(M){var h=M[0],b=M[1];return Math.sqrt(h*h+b*b)},a.aB=function(M){return M[0]=0,M[1]=0,M},a.aC=function(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M},a.aD=dI,a.aE=I,a.aF=function(M,h,b,D){let z=h.y-M.y,G=h.x-M.x,X=D.y-b.y,Z=D.x-b.x,re=X*G-Z*z;if(re===0)return null;let Q=(Z*(M.y-b.y)-X*(M.x-b.x))/re;return new o(M.x+Q*G,M.y+Q*z)},a.aG=ite,a.aH=gn,a.aI=function(M){let h=1/0,b=1/0,D=-1/0,z=-1/0;for(let G of M)h=Math.min(h,G.x),b=Math.min(b,G.y),D=Math.max(D,G.x),z=Math.max(z,G.y);return[h,b,D,z]},a.aJ=Rc,a.aK=q,a.aL=function(M,h,b,D,z=!1){if(!b[0]&&!b[1])return[0,0];let G=z?D==="map"?-M.bearingInRadians:0:D==="viewport"?M.bearingInRadians:0;if(G){let X=Math.sin(G),Z=Math.cos(G);b=[b[0]*Z-b[1]*X,b[0]*X+b[1]*Z]}return[z?b[0]:q(h,b[0],M.zoom),z?b[1]:q(h,b[1],M.zoom)]},a.aN=hI,a.aO=OI,a.aP=fI,a.aQ=M=>M.type==="symbol",a.aR=CS,a.aS=Re,a.aT=kS,a.aU=Xe,a.aV=an,a.aW=Er,a.aX=we,a.aY=bee,a.aZ=T,a.a_=A,a.aa=yI,a.ab=M=>{let h=window.document.createElement("video");return h.muted=!0,new Promise((b=>{h.onloadstart=()=>{b(h)};for(let D of M){let z=window.document.createElement("source");jt(D)||(h.crossOrigin="Anonymous"),z.src=D,h.appendChild(z)}}))},a.ac=xr,a.ad=function(){return ne++},a.ae=H,a.af=X_,a.ag=b4,a.ah=cn,a.ai=xa,a.aj=Mee,a.ak=function(M){let h={};if(M.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((b,D,z,G)=>{let X=z||G;return h[D]=!X||X.toLowerCase(),""})),h["max-age"]){let b=parseInt(h["max-age"],10);isNaN(b)?delete h["max-age"]:h["max-age"]=b}return h},a.al=ue,a.am=85.051129,a.an=qe,a.ao=function(M){return Math.pow(2,M)},a.ap=k,a.aq=xee,a.ar=function(M){return Math.log(M)/Math.LN2},a.as=function(M){var h=M[0],b=M[1];return h*h+b*b},a.at=function(M){if(!M.length)return new Set;let h=Math.max(...M.map((re=>re.canonical.z))),b=1/0,D=-1/0,z=1/0,G=-1/0,X=[];for(let re of M){let{x:Q,y:he,z:oe}=re.canonical,ke=Math.pow(2,h-oe),ge=Q*ke,Ue=he*ke;X.push({id:re,x:ge,y:Ue}),geD&&(D=ge),UeG&&(G=Ue)}let Z=new Set;for(let re of X)re.x!==b&&re.x!==D&&re.y!==z&&re.y!==G||Z.add(re.id);return Z},a.au=function(M,h){let b=Math.abs(2*M.wrap)-+(M.wrap<0),D=Math.abs(2*h.wrap)-+(h.wrap<0);return M.overscaledZ-h.overscaledZ||D-b||h.canonical.y-M.canonical.y||h.canonical.x-M.canonical.x},a.av=class{constructor(M,h){this.max=M,this.onRemove=h,this.reset()}reset(){for(let M in this.data)for(let h of this.data[M])h.timeout&&clearTimeout(h.timeout),this.onRemove(h.value);return this.data={},this.order=[],this}add(M,h,b){let D=M.wrapped().key;this.data[D]===void 0&&(this.data[D]=[]);let z={value:h,timeout:void 0};if(b!==void 0&&(z.timeout=setTimeout((()=>{this.remove(M,z)}),b)),this.data[D].push(z),this.order.push(D),this.order.length>this.max){let G=this._getAndRemoveByKey(this.order[0]);G&&this.onRemove(G)}return this}has(M){return M.wrapped().key in this.data}getAndRemove(M){return this.has(M)?this._getAndRemoveByKey(M.wrapped().key):null}_getAndRemoveByKey(M){let h=this.data[M].shift();return h.timeout&&clearTimeout(h.timeout),this.data[M].length===0&&delete this.data[M],this.order.splice(this.order.indexOf(M),1),h.value}getByKey(M){let h=this.data[M];return h?h[0].value:null}get(M){return this.has(M)?this.data[M.wrapped().key][0].value:null}remove(M,h){if(!this.has(M))return this;let b=M.wrapped().key,D=h===void 0?0:this.data[b].indexOf(h),z=this.data[b][D];return this.data[b].splice(D,1),z.timeout&&clearTimeout(z.timeout),this.data[b].length===0&&delete this.data[b],this.onRemove(z.value),this.order.splice(this.order.indexOf(b),1),this}setMaxSize(M){for(this.max=M;this.order.length>this.max;){let h=this._getAndRemoveByKey(this.order[0]);h&&this.onRemove(h)}return this}filter(M){let h=[];for(let b in this.data)for(let D of this.data[b])M(D.value)||h.push(D);for(let b of h)this.remove(b.value.tileID,b)}},a.aw=function(M,h){let b=0,D=0;if(M.kind==="constant")D=M.layoutSize;else if(M.kind!=="source"){let{interpolationType:z,minZoom:G,maxZoom:X}=M,Z=z?ue(Uo.interpolationFactor(z,h,G,X),0,1):0;M.kind==="camera"?D=Ks.number(M.minSize,M.maxSize,Z):b=Z}return{uSizeT:b,uSize:D}},a.ay=function(M,{uSize:h,uSizeT:b},{lowerSize:D,upperSize:z}){return M.kind==="source"?D/N1:M.kind==="composite"?Ks.number(D/N1,z/N1,b):h},a.az=O,a.b=ht,a.b$=Os,a.b0=function(M,h,b){return M[0]=h[0]-b[0],M[1]=h[1]-b[1],M[2]=h[2]-b[2],M},a.b1=function(M,h){var b=h[0],D=h[1],z=h[2],G=b*b+D*D+z*z;return G>0&&(G=1/Math.sqrt(G)),M[0]=h[0]*G,M[1]=h[1]*G,M[2]=h[2]*G,M},a.b2=m,a.b3=function(M,h){return M[0]*h[0]+M[1]*h[1]+M[2]*h[2]},a.b4=function(M,h,b){return M[0]=h[0]*b[0],M[1]=h[1]*b[1],M[2]=h[2]*b[2],M[3]=h[3]*b[3],M},a.b5=L,a.b6=function(M,h,b){let D=h[0]*b[0]+h[1]*b[1]+h[2]*b[2];return D===0?null:(-(M[0]*b[0]+M[1]*b[1]+M[2]*b[2])-b[3])/D},a.b7=E,a.b8=function(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M[2]=h[2]*b,M[3]=h[3]*b,M},a.b9=function(M,h){return M[0]*h[0]+M[1]*h[1]+M[2]*h[2]+M[3]},a.bA=B,a.bB=function(M,h,b){var D=b[0],z=b[1],G=b[2],X=b[3],Z=h[0],re=h[1],Q=h[2],he=z*Q-G*re,oe=G*Z-D*Q,ke=D*re-z*Z;return M[0]=Z+X*(he+=he)+z*(ke+=ke)-G*(oe+=oe),M[1]=re+X*oe+G*he-D*ke,M[2]=Q+X*ke+D*oe-z*he,M},a.bC=function(M,h,b){let D=(z=[M[0],M[1],M[2],h[0],h[1],h[2],b[0],b[1],b[2]])[0]*((he=z[8])*(X=z[4])-(Z=z[5])*(Q=z[7]))+z[1]*(-he*(G=z[3])+Z*(re=z[6]))+z[2]*(Q*G-X*re);var z,G,X,Z,re,Q,he;if(D===0)return null;let oe=m([],[h[0],h[1],h[2]],[b[0],b[1],b[2]]),ke=m([],[b[0],b[1],b[2]],[M[0],M[1],M[2]]),ge=m([],[M[0],M[1],M[2]],[h[0],h[1],h[2]]),Ue=T([],oe,-M[3]);return A(Ue,Ue,T([],ke,-h[3])),A(Ue,Ue,T([],ge,-b[3])),T(Ue,Ue,1/D),Ue},a.bD=mI,a.bE=function(){return new Float64Array(4)},a.bF=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[0]*Math.cos(D)-z[1]*Math.sin(D),G[1]=z[0]*Math.sin(D)+z[1]*Math.cos(D),G[2]=z[2],M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bG=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[0],G[1]=z[1]*Math.cos(D)-z[2]*Math.sin(D),G[2]=z[1]*Math.sin(D)+z[2]*Math.cos(D),M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bH=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[2]*Math.sin(D)+z[0]*Math.cos(D),G[1]=z[1],G[2]=z[2]*Math.cos(D)-z[0]*Math.sin(D),M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bI=function(M,h,b){var D=Math.sin(b),z=Math.cos(b),G=h[0],X=h[1],Z=h[2],re=h[3],Q=h[8],he=h[9],oe=h[10],ke=h[11];return h!==M&&(M[4]=h[4],M[5]=h[5],M[6]=h[6],M[7]=h[7],M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15]),M[0]=G*z-Q*D,M[1]=X*z-he*D,M[2]=Z*z-oe*D,M[3]=re*z-ke*D,M[8]=G*D+Q*z,M[9]=X*D+he*z,M[10]=Z*D+oe*z,M[11]=re*D+ke*z,M},a.bJ=function(M,h){let b=J(M,360),D=J(h,360),z=D-b,G=D>b?z-360:z+360;return Math.abs(z)0?X:-X},a.bM=function(M,h){let b=J(M,2*Math.PI),D=J(h,2*Math.PI);return Math.min(Math.abs(b-D),Math.abs(b-D+2*Math.PI),Math.abs(b-D-2*Math.PI))},a.bN=function(){let M={},h=Ct.$version;for(let b in Ct.$root){let D=Ct.$root[b];if(D.required){let z=null;z=b==="version"?h:D.type==="array"?[]:{},z!=null&&(M[b]=z)}}return M},a.bO=bt,a.bP=Qe,a.bQ=function M(h,b){if(Array.isArray(h)){if(!Array.isArray(b)||h.length!==b.length)return!1;for(let D=0;DM.type==="raster",a.bV=ie,a.bW=function(M,h){if(!M)return[{command:"setStyle",args:[h]}];let b=[];try{if(!Mt(M.version,h.version))return[{command:"setStyle",args:[h]}];Mt(M.center,h.center)||b.push({command:"setCenter",args:[h.center]}),Mt(M.state,h.state)||b.push({command:"setGlobalState",args:[h.state]}),Mt(M.centerAltitude,h.centerAltitude)||b.push({command:"setCenterAltitude",args:[h.centerAltitude]}),Mt(M.zoom,h.zoom)||b.push({command:"setZoom",args:[h.zoom]}),Mt(M.bearing,h.bearing)||b.push({command:"setBearing",args:[h.bearing]}),Mt(M.pitch,h.pitch)||b.push({command:"setPitch",args:[h.pitch]}),Mt(M.roll,h.roll)||b.push({command:"setRoll",args:[h.roll]}),Mt(M.sprite,h.sprite)||b.push({command:"setSprite",args:[h.sprite]}),Mt(M.glyphs,h.glyphs)||b.push({command:"setGlyphs",args:[h.glyphs]}),Mt(M.transition,h.transition)||b.push({command:"setTransition",args:[h.transition]}),Mt(M.light,h.light)||b.push({command:"setLight",args:[h.light]}),Mt(M.terrain,h.terrain)||b.push({command:"setTerrain",args:[h.terrain]}),Mt(M.sky,h.sky)||b.push({command:"setSky",args:[h.sky]}),Mt(M.projection,h.projection)||b.push({command:"setProjection",args:[h.projection]});let D={},z=[];(function(X,Z,re,Q){let he;for(he in Z=Z||{},X=X||{})Object.prototype.hasOwnProperty.call(X,he)&&(Object.prototype.hasOwnProperty.call(Z,he)||kt(he,re,Q));for(he in Z)Object.prototype.hasOwnProperty.call(Z,he)&&(Object.prototype.hasOwnProperty.call(X,he)?Mt(X[he],Z[he])||(X[he].type==="geojson"&&Z[he].type==="geojson"&&pr(X,Z,he)?Lt(re,{command:"setGeoJSONSourceData",args:[he,Z[he].data]}):rr(he,Z,re,Q)):ft(he,Z,re))})(M.sources,h.sources,z,D);let G=[];M.layers&&M.layers.forEach((X=>{"source"in X&&D[X.source]?b.push({command:"removeLayer",args:[X.id]}):G.push(X)})),b=b.concat(z),(function(X,Z,re){Z=Z||[];let Q=(X=X||[]).map(Nr),he=Z.map(Nr),oe=X.reduce(dn,{}),ke=Z.reduce(dn,{}),ge=Q.slice(),Ue=Object.create(null),je,vt,gt,It,_t;for(let qt=0,tr=0;qt_?(z=Math.acos(G),X=Math.sin(z),Z=Math.sin((1-D)*z)/X,re=Math.sin(D*z)/X):(Z=1-D,re=D),M[0]=Z*Q+re*ge,M[1]=Z*he+re*Ue,M[2]=Z*oe+re*je,M[3]=Z*ke+re*vt,M},a.bm=function(M){let h=new Float64Array(9);var b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t;oe=(z=(D=M)[0])*(re=z+z),ke=(G=D[1])*re,Ue=(X=D[2])*re,je=X*(Q=G+G),gt=(Z=D[3])*re,It=Z*Q,_t=Z*(he=X+X),(b=h)[0]=1-(ge=G*Q)-(vt=X*he),b[3]=ke-_t,b[6]=Ue+It,b[1]=ke+_t,b[4]=1-oe-vt,b[7]=je-gt,b[2]=Ue-It,b[5]=je+gt,b[8]=1-oe-ge;let qt=we(-Math.asin(ue(h[2],-1,1))),tr,lr;return Math.hypot(h[5],h[8])<.001?(tr=0,lr=-we(Math.atan2(h[3],h[4]))):(tr=we(h[5]===0&&h[8]===0?0:Math.atan2(h[5],h[8])),lr=we(h[1]===0&&h[0]===0?0:Math.atan2(h[1],h[0]))),{roll:tr,pitch:qt+90,bearing:lr}},a.bn=function(M,h){return M.roll==h.roll&&M.pitch==h.pitch&&M.bearing==h.bearing},a.bo=ii,a.bp=ca,a.bq=V_,a.br=c4,a.bs=U_,a.bt=ee,a.bu=ce,a.bv=oo,a.bw=function(M,h,b,D,z){return ee(D,z,ue((M-h)/(b-h),0,1))},a.bx=function(M,h,b,D){return M[0]=h[0]+b[0]*D,M[1]=h[1]+b[1]*D,M[2]=h[2]+b[2]*D,M},a.by=J,a.bz=function(){return new Float64Array(3)},a.c=tt,a.c$=vh,a.c0=class extends Ki{constructor(M,h){super(M,h),this.current=Ss}set(M){if(M[12]!==this.current[12]||M[0]!==this.current[0])return this.current=M,void this.gl.uniformMatrix4fv(this.location,!1,M);for(let h=1;h<16;h++)if(M[h]!==this.current[h]){this.current=M,this.gl.uniformMatrix4fv(this.location,!1,M);break}}},a.c1=Ia,a.c2=class extends Ki{constructor(M,h){super(M,h),this.current=[0,0,0]}set(M){M[0]===this.current[0]&&M[1]===this.current[1]&&M[2]===this.current[2]||(this.current=M,this.gl.uniform3f(this.location,M[0],M[1],M[2]))}},a.c3=class extends Ki{constructor(M,h){super(M,h),this.current=[0,0]}set(M){M[0]===this.current[0]&&M[1]===this.current[1]||(this.current=M,this.gl.uniform2f(this.location,M[0],M[1]))}},a.c4=C,a.c5=function(M,h){var b=Math.sin(h),D=Math.cos(h);return M[0]=D,M[1]=b,M[2]=0,M[3]=-b,M[4]=D,M[5]=0,M[6]=0,M[7]=0,M[8]=1,M},a.c6=function(M,h,b){var D=h[0],z=h[1],G=h[2];return M[0]=D*b[0]+z*b[3]+G*b[6],M[1]=D*b[1]+z*b[4]+G*b[7],M[2]=D*b[2]+z*b[5]+G*b[8],M},a.c7=function(M,h,b,D,z,G,X){var Z=1/(h-b),re=1/(D-z),Q=1/(G-X);return M[0]=-2*Z,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=-2*re,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=2*Q,M[11]=0,M[12]=(h+b)*Z,M[13]=(z+D)*re,M[14]=(X+G)*Q,M[15]=1,M},a.c8=class extends Ki{constructor(M,h){super(M,h),this.current=new Array}set(M){if(M!=this.current){this.current=M;let h=new Float32Array(4*M.length);for(let b=0;b25||D<0||D>=1||b<0||b>=1)},a.cE=function(M,h){return M[0]=h[0],M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=h[1],M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=h[2],M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M},a.cF=class extends pt{},a.cG=mt,a.cH=function(M,h){tt.REGISTERED_PROTOCOLS[M]=h},a.cI=function(M){delete tt.REGISTERED_PROTOCOLS[M]},a.cJ=function(M,h){let b={};for(let z=0;zei*Rc))}let Dn=re?"center":z.get("text-justify").evaluate(oe,{},M.canonical),Hn=z.get("symbol-placement")==="point"?z.get("text-max-width").evaluate(oe,{},M.canonical)*Rc:1/0,Ln=()=>{M.bucket.allowVerticalPlacement&&Zt(lr)&&(vt.vertical=zS(gt,M.glyphMap,M.glyphPositions,M.imagePositions,ke,Hn,Z,_n,"left",jr,_t,a.ax.vertical,!0,Ue,ge))};if(!re&&fn){let un=new Set;if(Dn==="auto")for(let ci=0;ciXit(Z,re,G)),D.layers[X])})(M,b,h),b.finish()},a.cT=function(M,h,b,D,z,G){let X=ate(M,h,b,z,0);return X=ate(X,h,D,G,1),X},a.cU=class{constructor(M){this.maxEntries=M,this.map=new Map}get(M){let h=this.map.get(M);return h!==void 0&&(this.map.delete(M),this.map.set(M,h)),h}set(M,h){if(this.map.has(M))this.map.delete(M);else if(this.map.size>=this.maxEntries){let b=this.map.keys().next().value;this.map.delete(b)}this.map.set(M,h)}clear(){this.map.clear()}},a.cV=CQ,a.cW=IS,a.cX=ete,a.cY=function(M,h,b,D,z){return i(this,void 0,void 0,(function*(){if(x())try{return yield Oe(M,h,b,D,z)}catch(G){}return(function(G,X,Z,re,Q){let he=G.width,oe=G.height;ze&&ct||(ze=new OffscreenCanvas(he,oe),ct=ze.getContext("2d",{willReadFrequently:!0})),ze.width=he,ze.height=oe,ct.drawImage(G,0,0,he,oe);let ke=ct.getImageData(X,Z,re,Q);return ct.clearRect(0,0,he,oe),ke.data})(M,h,b,D,z)}))},a.cZ=mQ,a.c_=class{constructor(M,h){this.layers={[b4]:this},this.name=b4,this.version=h?h.version:1,this.extent=h?h.extent:4096,this.length=M.length,this.features=M}feature(M){return new Yit(this.features[M],this.extent)}},a.ca=class extends Ar{},a.cb=jnt,a.cc=class extends zn{},a.cd=Xh,a.ce=function(M){return M<=1?1:Math.pow(2,Math.ceil(Math.log(M)/Math.LN2))},a.cf=Gv,a.cg=function(M,h,b){var D=h[0],z=h[1],G=h[2],X=b[3]*D+b[7]*z+b[11]*G+b[15];return M[0]=(b[0]*D+b[4]*z+b[8]*G+b[12])/(X=X||1),M[1]=(b[1]*D+b[5]*z+b[9]*G+b[13])/X,M[2]=(b[2]*D+b[6]*z+b[10]*G+b[14])/X,M},a.ch=class extends Ft{},a.ci=class extends d{},a.cj=function(M,h){return M[0]===h[0]&&M[1]===h[1]&&M[2]===h[2]&&M[3]===h[3]&&M[4]===h[4]&&M[5]===h[5]&&M[6]===h[6]&&M[7]===h[7]&&M[8]===h[8]&&M[9]===h[9]&&M[10]===h[10]&&M[11]===h[11]&&M[12]===h[12]&&M[13]===h[13]&&M[14]===h[14]&&M[15]===h[15]},a.ck=function(M,h){var b=M[0],D=M[1],z=M[2],G=M[3],X=M[4],Z=M[5],re=M[6],Q=M[7],he=M[8],oe=M[9],ke=M[10],ge=M[11],Ue=M[12],je=M[13],vt=M[14],gt=M[15],It=h[0],_t=h[1],qt=h[2],tr=h[3],lr=h[4],qr=h[5],jr=h[6],_n=h[7],fn=h[8],Dn=h[9],Hn=h[10],Ln=h[11],un=h[12],ei=h[13],ci=h[14],ti=h[15];return Math.abs(b-It)<=_*Math.max(1,Math.abs(b),Math.abs(It))&&Math.abs(D-_t)<=_*Math.max(1,Math.abs(D),Math.abs(_t))&&Math.abs(z-qt)<=_*Math.max(1,Math.abs(z),Math.abs(qt))&&Math.abs(G-tr)<=_*Math.max(1,Math.abs(G),Math.abs(tr))&&Math.abs(X-lr)<=_*Math.max(1,Math.abs(X),Math.abs(lr))&&Math.abs(Z-qr)<=_*Math.max(1,Math.abs(Z),Math.abs(qr))&&Math.abs(re-jr)<=_*Math.max(1,Math.abs(re),Math.abs(jr))&&Math.abs(Q-_n)<=_*Math.max(1,Math.abs(Q),Math.abs(_n))&&Math.abs(he-fn)<=_*Math.max(1,Math.abs(he),Math.abs(fn))&&Math.abs(oe-Dn)<=_*Math.max(1,Math.abs(oe),Math.abs(Dn))&&Math.abs(ke-Hn)<=_*Math.max(1,Math.abs(ke),Math.abs(Hn))&&Math.abs(ge-Ln)<=_*Math.max(1,Math.abs(ge),Math.abs(Ln))&&Math.abs(Ue-un)<=_*Math.max(1,Math.abs(Ue),Math.abs(un))&&Math.abs(je-ei)<=_*Math.max(1,Math.abs(je),Math.abs(ei))&&Math.abs(vt-ci)<=_*Math.max(1,Math.abs(vt),Math.abs(ci))&&Math.abs(gt-ti)<=_*Math.max(1,Math.abs(gt),Math.abs(ti))},a.cl=function(M,h){return M[0]=h[0],M[1]=h[1],M[2]=h[2],M[3]=h[3],M[4]=h[4],M[5]=h[5],M[6]=h[6],M[7]=h[7],M[8]=h[8],M[9]=h[9],M[10]=h[10],M[11]=h[11],M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15],M},a.cm=M=>M.type==="circle",a.cn=M=>M.type==="heatmap",a.co=M=>M.type==="line",a.cp=M=>M.type==="fill",a.cq=M=>M.type==="fill-extrusion",a.cr=M=>M.type==="hillshade",a.cs=M=>M.type==="color-relief",a.ct=M=>M.type==="background",a.cu=M=>M.type==="custom",a.cv=ye,a.cw=function(M,h,b){if(h<=0)return M;let D=1/h;return b===void 0||Math.abs(b)<1e-10?Math.round(M*D)/D:(b>0?Math.ceil(M*D-1e-9):Math.floor(M*D+1e-10))/D},a.cx=function(M,h,b){let D=V(h.x-b.x,h.y-b.y),z=V(M.x-b.x,M.y-b.y);var G,X;return we(Math.atan2(D[0]*z[1]-D[1]*z[0],(G=D)[0]*(X=z)[0]+G[1]*X[1]))},a.cy=xe,a.cz=function(M,h){var b;if(!Ke[h])return!1;let D=M==null?void 0:M.target,z=((b=D==null?void 0:D.ownerDocument)===null||b===void 0?void 0:b.defaultView)||window;return M instanceof z.MouseEvent||M instanceof z.WheelEvent},a.d=U,a.d0=class{constructor(M,h){let b=(h=this.options=Object.assign({},Rnt,h)).debug;if(b&&console.time("preprocess data"),h.maxZoom<0||h.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(h.promoteId&&h.generateId)throw new Error("promoteId and generateId cannot be used together.");let D=KR(M,h);b&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",h.indexMaxZoom,h.indexMaxPoints),console.time("generate tiles")),D=tI(D,h),h.updateable&&(this.source=D),this.initializeIndex(D,h)}initializeIndex(M,h){this.tileIndex=h.cluster?new Ent(h.clusterOptions):new Dnt(h),M.length&&this.tileIndex.initialize(M)}getTile(M,h,b){return h=+h,b=+b,(M=+M)<0||M>24?null:this.tileIndex.getTile(M,h,b)}updateData(M,h){let b=this.options;if(!b.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:D,source:z}=(function(G,X,Z){let re=(function(he,oe){var ke,ge;return he?{removeAll:he.removeAll,remove:new Set(he.remove||[]),add:new Map((ke=he.add)==null?void 0:ke.map((Ue=>[oe.promoteId?Ue.properties[oe.promoteId]:Ue.id,Ue]))),update:new Map((ge=he.update)==null?void 0:ge.map((Ue=>[Ue.id,Ue])))}:{remove:new Set,add:new Map,update:new Map}})(X,Z),Q=[];if(re.removeAll&&(Q=G,G=[]),re.remove.size||re.add.size){let he=[];for(let oe of G)(re.remove.has(oe.id)||re.add.has(oe.id))&&he.push(oe);if(he.length){Q.push(...he);let oe=new Set(he.map((ke=>ke.id)));G=G.filter((ke=>!oe.has(ke.id)))}if(re.add.size){let oe=KR({type:"FeatureCollection",features:Array.from(re.add.values())},Z);oe=tI(oe,Z),Q.push(...oe),G.push(...oe)}}if(re.update.size){let he=new Map,oe=[];for(let ke of G)re.update.has(ke.id)?he.set(ke.id,[...he.get(ke.id)||[],ke]):oe.push(ke);for(let[ke,ge]of re.update){let Ue=he.get(ke);if(!Ue||Ue.length===0)continue;let je=Snt(Ue,ge,Z);Q.push(...Ue,...je),oe.push(...je)}G=oe}return{affected:Q,source:G}})(this.source,M,b);h&&({affected:D,source:z}=this.filterUpdate(z,D,h)),D.length&&(this.source=z,this.tileIndex.updateIndex(z,D,b))}filterUpdate(M,h,b){let D=new Set;for(let z of M)z.id!=null&&(b(PS(z))||(h.push(z),D.add(z.id)));return{affected:h,source:M=M.filter((z=>!D.has(z.id)))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map((M=>PS(M)))}}updateClusterOptions(M,h){let b=this.options.cluster;this.options.cluster=M,this.options.clusterOptions=h,b!=M?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(M){return this.tileIndex.getClusterExpansionZoom(M)}getClusterChildren(M){return this.tileIndex.getChildren(M)}getClusterLeaves(M,h,b){return this.tileIndex.getLeaves(M,h,b)}},a.d1=Bi,a.e=_e,a.f=jt,a.g=nt,a.h=M=>i(void 0,void 0,void 0,(function*(){if(M.byteLength===0)return createImageBitmap(new ImageData(1,1));let h=new Blob([new Uint8Array(M)],{type:"image/png"});try{return createImageBitmap(h)}catch(b){throw new Error(`Could not load image because of ${U(b).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),a.i=De,a.j=M=>new Promise(((h,b)=>{let D=new Image;D.onload=()=>{h(D),URL.revokeObjectURL(D.src),D.onload=null,window.requestAnimationFrame((()=>D.src=it))},D.onerror=()=>b(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let z=new Blob([new Uint8Array(M)],{type:"image/png"});D.src=M.byteLength?URL.createObjectURL(z):it})),a.k=(M,h)=>Yt(_e(M,{type:"json"}),h),a.l=Ot,a.m=Yt,a.n=fr,a.o=(M,h)=>Yt(_e(M,{type:"arrayBuffer"}),h),a.p=aee,a.q=function(M){return new IS(M).readFields(oit,[])},a.r=function(M){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(M))},a.s=et,a.t=Dc,a.u=ms,a.v=Bf,a.w=me,a.x=Ct,a.y=Ua,a.z=Xl})),r("worker",["./shared"],(function(a){"use strict";class i{constructor(A,T){this.keyCache={},A&&this.replace(A,T)}replace(A,T){this._layerConfigs={},this._layers={},this.update(A,[],T)}update(A,T,m){for(let E of A){this._layerConfigs[E.id]=E;let I=this._layers[E.id]=a.bT(E,m);I._featureFilter=a.ah(I.filter,m),this.keyCache[E.id]&&delete this.keyCache[E.id]}for(let E of T)delete this.keyCache[E],delete this._layerConfigs[E],delete this._layers[E];this.familiesBySource={};let F=a.cJ(Object.values(this._layerConfigs),this.keyCache);for(let E of F){let I=E.map((q=>this._layers[q.id])),R=I[0];if(R.isHidden())continue;let B=R.source||"",O=this.familiesBySource[B];O||(O=this.familiesBySource[B]={});let V=R.sourceLayer||a.ag,j=O[V];j||(j=O[V]=[]),j.push(I)}}}class o{constructor(A){let T={},m=[];for(let R in A){let B=A[R],O=T[R]={};for(let V in B){let j=B[+V];if(!j||j.bitmap.width===0||j.bitmap.height===0)continue;let q={x:0,y:0,w:j.bitmap.width+2,h:j.bitmap.height+2};m.push(q),O[V]={rect:q,metrics:j.metrics}}}let{w:F,h:E}=a.p(m),I=new a.t({width:F||1,height:E||1});for(let R in A){let B=A[R];for(let O in B){let V=B[+O];if(!V||V.bitmap.width===0||V.bitmap.height===0)continue;let j=T[R][O].rect;a.t.copy(V.bitmap,I,{x:0,y:0},{x:j.x+1,y:j.y+1},V.bitmap)}}this.image=I,this.positions=T}}a.cK("GlyphAtlas",o);class s{constructor(A){this.tileID=new a.a3(A.tileID.overscaledZ,A.tileID.wrap,A.tileID.canonical.z,A.tileID.canonical.x,A.tileID.canonical.y),this.uid=A.uid,this.zoom=A.zoom,this.pixelRatio=A.pixelRatio,this.tileSize=A.tileSize,this.source=A.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=A.showCollisionBoxes,this.collectResourceTiming=!!A.collectResourceTiming,this.returnDependencies=!!A.returnDependencies,this.promoteId=A.promoteId,this.inFlightDependencies=[]}parse(A,T,m,F,E){return a._(this,void 0,void 0,(function*(){this.status="parsing",this.data=A,this.collisionBoxArray=new a.ae;let I=new a.cL(Object.keys(A.layers).sort()),R=new a.cM(this.tileID,this.promoteId);R.bucketLayerIDs=[];let B={},O={featureIndex:R,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:m,subdivisionGranularity:E},V=T.familiesBySource[this.source];for(let ie in V){let le=A.layers[ie];if(!le)continue;le.version===1&&a.w(`Vector tile source "${this.source}" layer "${ie}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let me=I.encode(ie),be=[];for(let De=0;Deht.id))))}}let j=a.bY(O.glyphDependencies,(ie=>Object.keys(ie).map(Number)));for(let ie of this.inFlightDependencies)ie==null||ie.abort();this.inFlightDependencies=[];let q=Promise.resolve({});if(Object.keys(j).length){let ie=new AbortController;this.inFlightDependencies.push(ie),q=F.sendAsync({type:"GG",data:{stacks:j,source:this.source,tileID:this.tileID,type:"glyphs"}},ie)}let U=Object.keys(O.iconDependencies),J=Promise.resolve({});if(U.length){let ie=new AbortController;this.inFlightDependencies.push(ie),J=F.sendAsync({type:"GI",data:{icons:U,source:this.source,tileID:this.tileID,type:"icons"}},ie)}let ee=Object.keys(O.patternDependencies),ce=Promise.resolve({});if(ee.length){let ie=new AbortController;this.inFlightDependencies.push(ie),ce=F.sendAsync({type:"GI",data:{icons:ee,source:this.source,tileID:this.tileID,type:"patterns"}},ie)}let ye=O.dashDependencies,xe=Promise.resolve({});if(Object.keys(ye).length){let ie=new AbortController;this.inFlightDependencies.push(ie),xe=F.sendAsync({type:"GDA",data:{dashes:ye}},ie)}let[ue,K,_e,ne]=yield Promise.all([q,J,ce,xe]),ae=new o(ue),pe=new a.cN(K,_e);for(let ie in B){let le=B[ie];le instanceof a.af?(l(le.layers,this.zoom,m),a.cO({bucket:le,glyphMap:ue,glyphPositions:ae.positions,imageMap:K,imagePositions:pe.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:O.subdivisionGranularity})):le.hasDependencies&&(le instanceof a.cP||le instanceof a.cQ||le instanceof a.cR)&&(l(le.layers,this.zoom,m),le.addFeatures(O,this.tileID.canonical,pe.patternPositions,ne))}return this.status="done",{buckets:Object.values(B).filter((ie=>!ie.isEmpty())),featureIndex:R,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ae.image,imageAtlas:pe,dashPositions:ne,glyphMap:this.returnDependencies?ue:null,iconMap:this.returnDependencies?K:null,glyphPositions:this.returnDependencies?ae.positions:null}}))}}function l(w,A,T){let m=new a.J(A);for(let F of w)F.recalculate(m,T)}class u{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(A,T){this.loading[A]=T}finishLoading(A){delete this.loading[A]}abort(A){let T=this.loading[A];T!=null&&T.abort&&(T.abort.abort(),delete this.loading[A])}setParsing(A,T){this.parsing[A]=T}consumeParsing(A){let T=this.parsing[A];if(T)return delete this.parsing[A],T}clearParsing(A){delete this.parsing[A]}markLoaded(A,T){this.loaded[A]=T}getLoaded(A){let T=this.loaded[A];if(T)return T}removeLoaded(A){delete this.loaded[A]}clearLoaded(){this.loaded={}}}class c{constructor(A){this.start=`${A}#start`,this.end=`${A}#end`,this.measure=A,performance.mark(this.start)}finish(){performance.mark(this.end);let A=performance.getEntriesByName(this.measure);return A.length===0&&(performance.measure(this.measure,this.start,this.end),A=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),A}}class f{constructor(A,T,m,F,E){this.type=A,this.properties=m||{},this.extent=E,this.pointsArray=T,this.id=F}loadGeometry(){return this.pointsArray.map((A=>A.map((T=>new a.P(T.x,T.y)))))}}class v{constructor(A,T,m){this.version=2,this._myFeatures=A,this.name=T,this.length=A.length,this.extent=m}feature(A){return this._myFeatures[A]}}class g{constructor(){this.layers={}}addLayer(A){this.layers[A.name]=A}}function p(w){let A=a.cS(w);return A.byteOffset===0&&A.byteLength===A.buffer.byteLength||(A=new Uint8Array(A)),{vectorTile:w,rawData:A.buffer}}function x(w,A,T){let{extent:m}=w,F=Math.pow(2,T.z-A.z),E=(T.x-A.x*F)*m,I=(T.y-A.y*F)*m,R=[];for(let B=0;B0&&V.addLayer(ee)}let q=p(V);return this.overzoomedTileResultCache.set(B,q),q}reloadTile(A){return a._(this,void 0,void 0,(function*(){let T=A.uid,m=this.tileState.getLoaded(T);if(!m)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(m.showCollisionBoxes=A.showCollisionBoxes,m.status==="parsing"){let F=this.tileState.consumeParsing(T);return yield this._parseWorkerTile(m,A,F)}if(m.status==="done"&&m.vectorTile)return yield this._parseWorkerTile(m,A)}))}abortTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.abort(A.uid)}))}removeTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.removeLoaded(A.uid)}))}}class y{constructor(){this.loaded={}}loadTile(A){return a._(this,void 0,void 0,(function*(){let{uid:T,encoding:m,rawImageData:F,redFactor:E,greenFactor:I,blueFactor:R,baseShift:B}=A,O=F.width+2,V=F.height+2,j=a.b(F)?new a.R({width:O,height:V},yield a.cY(F,-1,-1,O,V)):F,q=new a.cZ(T,j,m,E,I,R,B);return this.loaded||(this.loaded={}),this.loaded[T]=q,q}))}removeTile(A){let T=this.loaded,m=A.uid;T!=null&&T[m]&&delete T[m]}}class C{constructor(A,T,m,F=k){this.actor=A,this.layerIndex=T,this.availableImages=m,this.tileState=new u,this._createGeoJSONIndex=F}loadVectorTile(A){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:T,x:m,y:F}=A.tileID.canonical,E=this._geoJSONIndex.getTile(T,m,F);return E?p(new a.c_(E.features,{version:2,extent:a.a6})):null}loadTile(A){return a._(this,void 0,void 0,(function*(){let{uid:T}=A,m=new s(A);m.abort=new AbortController;try{let F=this.loadVectorTile(A);if(!F)return null;let{vectorTile:E,rawData:I}=F;m.vectorTile=E,this.tileState.markLoaded(T,m);let R={rawData:I};this.tileState.setParsing(T,R);try{return yield this._parseWorkerTile(m,A,R)}finally{this.tileState.clearParsing(T)}}catch(F){throw m.status="done",this.tileState.markLoaded(T,m),F}}))}_reloadLoadedTile(A){return a._(this,void 0,void 0,(function*(){let T=A.uid,m=this.tileState.getLoaded(T);if(!m)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(m.showCollisionBoxes=A.showCollisionBoxes,m.status==="parsing"){let F=this.tileState.consumeParsing(T);return yield this._parseWorkerTile(m,A,F)}if(m.status==="done"&&m.vectorTile)return yield this._parseWorkerTile(m,A)}))}_parseWorkerTile(A,T,m){return a._(this,void 0,void 0,(function*(){let F=yield A.parse(A.vectorTile,this.layerIndex,this.availableImages,this.actor,T.subdivisionGranularity);if(m){let{rawData:E}=m;F=a.e({rawTileData:E.slice(0),encoding:"mvt"},F)}return F}))}abortTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.abort(A.uid)}))}removeTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.removeLoaded(A.uid)}))}loadData(A){return a._(this,void 0,void 0,(function*(){var T;(T=this._pendingRequest)===null||T===void 0||T.abort();let m=this._startRequestTiming(A);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(A,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let F={};return A.request&&(F.data=A.data),this._finishRequestTiming(m,A,F),F}catch(F){if(delete this._pendingRequest,!a.$(F))throw F;return{abandoned:!0}}}))}_startRequestTiming(A){var T;if(!((T=A.request)===null||T===void 0)&&T.collectResourceTiming)return new c(A.request.url)}_finishRequestTiming(A,T,m){let F=A==null?void 0:A.finish();F&&(m.resourceTiming={[T.source]:JSON.parse(JSON.stringify(F))})}reloadTile(A){return this.tileState.getLoaded(A.uid)?this._reloadLoadedTile(A):this.loadTile(A)}loadAndProcessGeoJSON(A,T){return a._(this,void 0,void 0,(function*(){var m;if(A.request&&(A.data=(yield a.k(A.request,T)).data),A.data)return A.data=this._filterGeoJSON(A.data,A.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(A.data,A));if(A.dataDiff)return(m=this._geoJSONIndex)!==null&&m!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},A)),void this._geoJSONIndex.updateData(A.dataDiff,this._getFilterPredicate(A.filter));if(A.updateCluster&&this._geoJSONIndex.updateClusterOptions(A.geojsonVtOptions.cluster,S(A)),this._geoJSONIndex==null)throw new Error(`Input data given to '${A.source}' is not a valid GeoJSON object.`)}))}_filterGeoJSON(A,T){if(A.type!=="FeatureCollection")return A;let m=this._getFilterPredicate(T);return m?{type:"FeatureCollection",features:A.features.filter((F=>m(F)))}:A}_getFilterPredicate(A){if(typeof A!="boolean"&&!(A!=null&&A.length))return;let T=a.c$(A,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(T.result==="error")throw new Error(T.value.map((m=>`${m.key}: ${m.message}`)).join(", "));return m=>T.value.evaluate({zoom:0},m)}removeSource(A){return a._(this,void 0,void 0,(function*(){var T;(T=this._pendingRequest)===null||T===void 0||T.abort()}))}getClusterExpansionZoom(A){return this._geoJSONIndex.getClusterExpansionZoom(A.clusterId)}getClusterChildren(A){return this._geoJSONIndex.getClusterChildren(A.clusterId)}getClusterLeaves(A){return this._geoJSONIndex.getClusterLeaves(A.clusterId,A.limit,A.offset)}}function k(w,A){let T=a.e(A.geojsonVtOptions||{},{updateable:!0,clusterOptions:S(A)});return new a.d0(w,T)}function S({geojsonVtOptions:w,clusterProperties:A}){if(!A||!w.clusterOptions)return w.clusterOptions;let T={},m={},F={accumulated:null,zoom:0},E={properties:null},I=Object.keys(A);for(let R of I){let[B,O]=A[R],V=a.c$(O),j=a.c$(typeof B=="string"?[B,["accumulated"],["get",R]]:B);T[R]=V.value,m[R]=j.value}return w.clusterOptions.map=R=>{E.properties=R;let B={};for(let O of I)B[O]=T[O].evaluate(F,E);return B},w.clusterOptions.reduce=(R,B)=>{E.properties=B;for(let O of I)F.accumulated=R[O],R[O]=m[O].evaluate(F,E)},w.clusterOptions}class L{constructor(A){this.self=A,this.actor=new a.N(A),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(T,m)=>{if(this.externalWorkerSourceTypes[T])throw new Error(`Worker source with name "${T}" already registered.`);this.externalWorkerSourceTypes[T]=m},this.self.addProtocol=a.cH,this.self.removeProtocol=a.cI,this.self.registerRTLTextPlugin=T=>{a.d1.setMethods(T)},this.self.makeRequest=a.m,this.actor.registerMessageHandler("LDT",((T,m)=>this._getDEMWorkerSource(T,m.source).loadTile(m))),this.actor.registerMessageHandler("RDT",((T,m)=>a._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(T,m.source).removeTile(m)})))),this.actor.registerMessageHandler("GCEZ",((T,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(T,m.type,m.source).getClusterExpansionZoom(m)})))),this.actor.registerMessageHandler("GCC",((T,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(T,m.type,m.source).getClusterChildren(m)})))),this.actor.registerMessageHandler("GCL",((T,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(T,m.type,m.source).getClusterLeaves(m)})))),this.actor.registerMessageHandler("LD",((T,m)=>this._getWorkerSource(T,m.type,m.source).loadData(m))),this.actor.registerMessageHandler("LT",((T,m)=>this._getWorkerSource(T,m.type,m.source).loadTile(m))),this.actor.registerMessageHandler("RT",((T,m)=>this._getWorkerSource(T,m.type,m.source).reloadTile(m))),this.actor.registerMessageHandler("AT",((T,m)=>this._getWorkerSource(T,m.type,m.source).abortTile(m))),this.actor.registerMessageHandler("RMT",((T,m)=>this._getWorkerSource(T,m.type,m.source).removeTile(m))),this.actor.registerMessageHandler("RS",((T,m)=>a._(this,void 0,void 0,(function*(){var F,E;if(!(!((E=(F=this.workerSources[T])===null||F===void 0?void 0:F[m.type])===null||E===void 0)&&E[m.source]))return;let I=this.workerSources[T][m.type][m.source];delete this.workerSources[T][m.type][m.source],I.removeSource!==void 0&&I.removeSource(m)})))),this.actor.registerMessageHandler("RM",(T=>a._(this,void 0,void 0,(function*(){delete this.layerIndexes[T],delete this.availableImages[T],delete this.workerSources[T],delete this.demWorkerSources[T],this.globalStates.delete(T)})))),this.actor.registerMessageHandler("SR",((T,m)=>a._(this,void 0,void 0,(function*(){this.referrer=m})))),this.actor.registerMessageHandler("SRPS",((T,m)=>this._syncRTLPluginState(T,m))),this.actor.registerMessageHandler("IS",((T,m)=>a._(this,void 0,void 0,(function*(){this.self.importScripts(m)})))),this.actor.registerMessageHandler("SI",((T,m)=>this._setImages(T,m))),this.actor.registerMessageHandler("UL",((T,m)=>a._(this,void 0,void 0,(function*(){this._getLayerIndex(T).update(m.layers,m.removedIds,this._getGlobalState(T))})))),this.actor.registerMessageHandler("UGS",((T,m)=>a._(this,void 0,void 0,(function*(){let F=this._getGlobalState(T);for(let E in m)F[E]=m[E]})))),this.actor.registerMessageHandler("SL",((T,m)=>a._(this,void 0,void 0,(function*(){this._getLayerIndex(T).replace(m,this._getGlobalState(T))}))))}_getGlobalState(A){let T=this.globalStates.get(A);return T||(T={},this.globalStates.set(A,T)),T}_setImages(A,T){return a._(this,void 0,void 0,(function*(){this.availableImages[A]=T;for(let m in this.workerSources[A]){let F=this.workerSources[A][m];for(let E in F)F[E].availableImages=T}}))}_syncRTLPluginState(A,T){return a._(this,void 0,void 0,(function*(){return yield a.d1.syncState(T,this.self.importScripts)}))}_getAvailableImages(A){let T=this.availableImages[A];return T||(T=[]),T}_getLayerIndex(A){let T=this.layerIndexes[A];return T||(T=this.layerIndexes[A]=new i),T}_getWorkerSource(A,T,m){var F,E;if((F=this.workerSources)[A]||(F[A]={}),(E=this.workerSources[A])[T]||(E[T]={}),!this.workerSources[A][T][m]){let I={sendAsync:(R,B)=>(R.targetMapId=A,this.actor.sendAsync(R,B))};switch(T){case"vector":this.workerSources[A][T][m]=new _(I,this._getLayerIndex(A),this._getAvailableImages(A));break;case"geojson":this.workerSources[A][T][m]=new C(I,this._getLayerIndex(A),this._getAvailableImages(A));break;default:this.workerSources[A][T][m]=new this.externalWorkerSourceTypes[T](I,this._getLayerIndex(A),this._getAvailableImages(A))}}return this.workerSources[A][T][m]}_getDEMWorkerSource(A,T){var m,F;return(m=this.demWorkerSources)[A]||(m[A]={}),(F=this.demWorkerSources[A])[T]||(F[T]=new y),this.demWorkerSources[A][T]}}return a.i(self)&&(self.worker=new L(self)),L})),r("index",["exports","./shared"],(function(a,i){"use strict";var o="5.24.0";function s(){var Y=new i.A(4);return i.A!=Float32Array&&(Y[1]=0,Y[2]=0),Y[0]=1,Y[3]=1,Y}let l,u,c,f={frame(Y,d,P,N){let H=N||window,$=H.requestAnimationFrame((de=>{se(),d(de)})),{unsubscribe:se}=i.s(Y.signal,"abort",(()=>{se(),H.cancelAnimationFrame($),P(new i.a(Y.signal.reason))}),!1)},frameAsync(Y,d){return new Promise(((P,N)=>{this.frame(Y,P,N,d)}))},getImageData(Y,d=0){return this.getImageCanvasContext(Y).getImageData(-d,-d,Y.width+2*d,Y.height+2*d)},getImageCanvasContext(Y){let d=window.document.createElement("canvas"),P=d.getContext("2d",{willReadFrequently:!0});if(!P)throw new Error("failed to create canvas 2d context");return d.width=Y.width,d.height=Y.height,P.drawImage(Y,0,0,Y.width,Y.height),P},resolveURL:Y=>(l||(l=document.createElement("a")),l.href=Y,l.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return c!==void 0?c:!!matchMedia&&(u!=null||(u=matchMedia("(prefers-reduced-motion: reduce)")),u.matches)},set prefersReducedMotion(Y){c=Y}},v=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(Y){this._frozenAt=Y}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function g(){return v.getCurrentTime()}var p,x;class _{static create(d,P,N){let H=window.document.createElement(d);return P!==void 0&&(H.className=P),N&&N.appendChild(H),H}static createNS(d,P){return window.document.createElementNS(d,P)}static disableDrag(){_.docStyle&&_.selectProp&&(_.userSelect=_.docStyle[_.selectProp],_.docStyle[_.selectProp]="none")}static enableDrag(){_.docStyle&&_.selectProp&&(_.docStyle[_.selectProp]=_.userSelect)}static suppressClickInternal(d){d.preventDefault(),d.stopPropagation(),window.removeEventListener("click",_.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",_.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",_.suppressClickInternal,!0)}),0)}static getScale(d){let P=d.getBoundingClientRect();return{x:P.width/d.offsetWidth||1,y:P.height/d.offsetHeight||1,boundingClientRect:P}}static getPoint(d,P,N){let H=P.boundingClientRect;return new i.P((N.clientX-H.left)/P.x-d.clientLeft,(N.clientY-H.top)/P.y-d.clientTop)}static mousePos(d,P){let N=_.getScale(d);return _.getPoint(d,N,P)}static touchPos(d,P){let N=[],H=_.getScale(d);for(let $ of P)N.push(_.getPoint(d,H,$));return N}static sanitize(d){let P=new DOMParser().parseFromString(d,"text/html").body||document.createElement("body"),N=P.querySelectorAll("script");for(let H of N)H.remove();return _.clean(P),P.innerHTML}static isPossiblyDangerous(d,P){let N=P.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(d)||!N.includes("javascript:")&&!N.includes("data:"))||!!d.startsWith("on")||void 0}static clean(d){let P=d.children;for(let N of P)_.removeAttributes(N),_.clean(N)}static removeAttributes(d){for(let{name:P,value:N}of d.attributes)_.isPossiblyDangerous(P,N)&&d.removeAttribute(P)}}_.docStyle=typeof window!="undefined"&&((p=window.document)===null||p===void 0?void 0:p.documentElement.style),_.selectProp=!_.docStyle||"userSelect"in _.docStyle?"userSelect":"webkitUserSelect",(function(Y){let d,P,N,H;Y.resetRequestQueue=()=>{d=[],P=0,N=0,H={}},Y.addThrottleControl=Ae=>{let Fe=N++;return H[Fe]=Ae,Fe},Y.removeThrottleControl=Ae=>{delete H[Ae],se()},Y.getImage=(Ae,Fe,Ie=!0)=>new Promise(((Ye,st)=>{Ae.headers||(Ae.headers={}),Ae.headers.accept="image/webp,*/*",i.e(Ae,{type:"image"}),d.push({abortController:Fe,requestParameters:Ae,supportImageRefresh:Ie,state:"queued",onError:dt=>{st(dt)},onSuccess:dt=>{Ye(dt)}}),se()}));let $=Ae=>i._(this,void 0,void 0,(function*(){Ae.state="running";let{requestParameters:Fe,supportImageRefresh:Ie,onError:Ye,onSuccess:st,abortController:dt}=Ae,Pe=Ie===!1&&!i.i(self)&&!i.g(Fe.url)&&(!Fe.headers||Object.keys(Fe.headers).reduce(((xt,Et)=>xt&&Et==="accept"),!0));P++;let Xe=Pe?de(Fe,dt):i.m(Fe,dt);try{let xt=yield Xe;delete Ae.abortController,Ae.state="completed",xt.data instanceof HTMLImageElement||i.b(xt.data)?st(xt):xt.data&&st({data:yield(at=xt.data,typeof createImageBitmap=="function"?i.h(at):i.j(at)),cacheControl:xt.cacheControl,expires:xt.expires})}catch(xt){delete Ae.abortController,Ye(i.d(xt))}finally{P--,se()}var at})),se=()=>{let Ae=(()=>{for(let Fe of Object.keys(H))if(H[Fe]())return!0;return!1})()?i.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:i.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let Fe=P;Fe0;Fe++){let Ie=d.shift();Ie.abortController.signal.aborted?Fe--:$(Ie)}},de=(Ae,Fe)=>new Promise(((Ie,Ye)=>{let st=new Image,dt=Ae.url,Pe=Ae.credentials;Pe&&Pe==="include"?st.crossOrigin="use-credentials":(Pe&&Pe==="same-origin"||!i.f(dt))&&(st.crossOrigin="anonymous"),Fe.signal.addEventListener("abort",(()=>{st.src="",Ye(new i.a(Fe.signal.reason))})),st.fetchPriority="high",st.onload=()=>{st.onerror=st.onload=null,Ie({data:st})},st.onerror=()=>{st.onerror=st.onload=null,Fe.signal.aborted||Ye(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},st.src=dt}))})(x||(x={})),x.resetRequestQueue();class y{constructor(d){this._transformRequestFn=d!=null?d:null}transformRequest(d,P){return this._transformRequestFn&&this._transformRequestFn(d,P)||{url:d}}setTransformRequest(d){this._transformRequestFn=d}}function C(Y){let d=[];if(typeof Y=="string")d.push({id:"default",url:Y});else if(Y&&Y.length>0){let P=[];for(let{id:N,url:H}of Y){let $=`${N}${H}`;P.includes($)||(P.push($),d.push({id:N,url:H}))}}return d}function k(Y,d,P){try{let N=new URL(Y);return N.pathname+=`${d}${P}`,N.toString()}catch(N){throw new Error(`Invalid sprite URL "${Y}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function S(Y){let{userImage:d}=Y;return!(!(d!=null&&d.render)||!d.render()||(Y.data.replace(new Uint8Array(d.data.buffer)),0))}class L extends i.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let d of Object.keys(this.images))this.removeImage(d);this.patterns={},this.atlasImage=new i.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(d){if(this.loaded!==d&&(this.loaded=d,d)){for(let{ids:P,promiseResolve:N}of this.requestors)N(this._getImagesForIds(P));this.requestors=[]}}getImage(d){let P=this.images[d];if(P&&!P.data&&P.spriteData){let N=P.spriteData;P.data=new i.R({width:N.width,height:N.height},N.context.getImageData(N.x,N.y,N.width,N.height).data),P.spriteData=null}return P}addImage(d,P){if(this.images[d])throw new Error(`Image id ${d} already exist, use updateImage instead`);this._validate(d,P)&&(this.images[d]=P)}_validate(d,P){let N=!0,H=P.data||P.spriteData;return this._validateStretch(P.stretchX,H==null?void 0:H.width)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "stretchX" value`))),N=!1),this._validateStretch(P.stretchY,H==null?void 0:H.height)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "stretchY" value`))),N=!1),this._validateContent(P.content,P)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "content" value`))),N=!1),N}_validateStretch(d,P){if(!d)return!0;let N=0;for(let H of d){if(H[0]=d[1]))}updateImage(d,P,N=!0){let H=this.getImage(d);if(N&&(H.data.width!==P.data.width||H.data.height!==P.data.height))throw new Error(`size mismatch between old image (${H.data.width}x${H.data.height}) and new image (${P.data.width}x${P.data.height}).`);P.version=H.version+1,this.images[d]=P,this.updatedImages[d]=!0}removeImage(d){var P;let N=this.images[d];delete this.images[d],delete this.patterns[d],!((P=N.userImage)===null||P===void 0)&&P.onRemove&&N.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(d){return new Promise(((P,N)=>{let H=!0;if(!this.isLoaded())for(let $ of d)this.images[$]||(H=!1);this.isLoaded()||H?P(this._getImagesForIds(d)):this.requestors.push({ids:d,promiseResolve:P})}))}_getImagesForIds(d){var P;let N={};for(let H of d){let $=this.getImage(H);$||(this.fire(new i.n("styleimagemissing",{id:H})),$=this.getImage(H)),$?N[H]={data:$.data.clone(),pixelRatio:$.pixelRatio,sdf:$.sdf,version:$.version,stretchX:$.stretchX,stretchY:$.stretchY,content:$.content,textFitWidth:$.textFitWidth,textFitHeight:$.textFitHeight,hasRenderCallback:!!(!((P=$.userImage)===null||P===void 0)&&P.render)}:i.w(`Image "${H}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return N}getPixelSize(){let{width:d,height:P}=this.atlasImage;return{width:d,height:P}}getPattern(d){let P=this.patterns[d],N=this.getImage(d);if(!N)return null;if(P&&P.position.version===N.version)return P.position;if(P)P.position.version=N.version;else{let H={w:N.data.width+2,h:N.data.height+2,x:0,y:0},$=new i.I(H,N);this.patterns[d]={bin:H,position:$}}return this._updatePatternAtlas(),this.patterns[d].position}bind(d){let P=d.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new i.T(d,this.atlasImage,P.RGBA),this.atlasTexture.bind(P.LINEAR,P.CLAMP_TO_EDGE)}_updatePatternAtlas(){let d=[];for(let $ in this.patterns)d.push(this.patterns[$].bin);let{w:P,h:N}=i.p(d),H=this.atlasImage;H.resize({width:P||1,height:N||1});for(let $ in this.patterns){let{bin:se}=this.patterns[$],de=se.x+1,Ae=se.y+1,Fe=this.getImage($).data,Ie=Fe.width,Ye=Fe.height;i.R.copy(Fe,H,{x:0,y:0},{x:de,y:Ae},{width:Ie,height:Ye}),i.R.copy(Fe,H,{x:0,y:Ye-1},{x:de,y:Ae-1},{width:Ie,height:1}),i.R.copy(Fe,H,{x:0,y:0},{x:de,y:Ae+Ye},{width:Ie,height:1}),i.R.copy(Fe,H,{x:Ie-1,y:0},{x:de-1,y:Ae},{width:1,height:Ye}),i.R.copy(Fe,H,{x:0,y:0},{x:de+Ie,y:Ae},{width:1,height:Ye})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(d){for(let P of d){if(this.callbackDispatchedThisFrame[P])continue;this.callbackDispatchedThisFrame[P]=!0;let N=this.getImage(P);N||i.w(`Image with ID: "${P}" was not found`),S(N)&&this.updateImage(P,N)}}cloneImages(){let d={};for(let P in this.images){let N=this.images[P];d[P]=Object.assign(Object.assign({},N),{data:N.data?N.data.clone():null})}return d}}let w=1e20,A=new Float64Array(256);for(let Y=0;Y<256;Y++){let d=.5-Math.pow(Y/255,.45454545454545453);A[Y]=d*Math.abs(d)}function T(Y,d,P,N,H,$,se,de,Ae){for(let Fe=d;Fe-1);Ae++,$[Ae]=de,se[Ae]=Fe,se[Ae+1]=w}for(let de=0,Ae=0;de/[-\w]+/.test(H)?H:`'${CSS.escape(H)}'`)).join(",");return new E.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:N,fontWeight:this._fontWeight(P[0]),fontStyle:this._fontStyle(P[0]),lang:this.lang})}_fontStyle(d){return/italic/i.test(d)?"italic":/oblique/i.test(d)?"oblique":"normal"}_fontWeight(d){let P={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},N;for(let[H,$]of Object.entries(P))new RegExp(`\\b${H}\\b`,"i").test(d)&&(N=`${$}`);return N}destroy(){for(let d in this.entries){let P=this.entries[d];P.tinySDF=null,P.ideographTinySDF=null,P.glyphs={},P.requests={},P.ranges={}}this.entries={}}}E.loadGlyphRange=function(Y,d,P,N){return i._(this,void 0,void 0,(function*(){let H=256*d,$=H+255,se=yield N.transformRequest(P.replace("{fontstack}",Y).replace("{range}",`${H}-${$}`),"Glyphs"),de=yield i.o(se,new AbortController);if(!(de!=null&&de.data))throw new Error(`Could not load glyph range. range: ${d}, ${H}-${$}`);let Ae={};for(let Fe of i.q(de.data))Ae[Fe.id]=Fe;return Ae}))},E.TinySDF=class{constructor({fontSize:Y=24,buffer:d=3,radius:P=8,cutoff:N=.25,fontFamily:H="sans-serif",fontWeight:$="normal",fontStyle:se="normal",lang:de=null}={}){this.buffer=d,this.radius=P,this.cutoff=N,this.lang=de;let Ae=this.size=Y+4*d,Fe=this._createCanvas(Ae),Ie=this.ctx=Fe.getContext("2d",{willReadFrequently:!0});Ie.font=`${se} ${$} ${Y}px ${H}`,Ie.textBaseline="alphabetic",Ie.textAlign="left",Ie.fillStyle="black",this.gridOuter=new Float64Array(Ae*Ae),this.gridInner=new Float64Array(Ae*Ae),this.f=new Float64Array(Ae),this.z=new Float64Array(Ae+1),this.v=new Uint16Array(Ae)}_createCanvas(Y){if(typeof OffscreenCanvas!="undefined")return new OffscreenCanvas(Y,Y);let d=document.createElement("canvas");return d.width=d.height=Y,d}draw(Y){let{width:d,actualBoundingBoxAscent:P,actualBoundingBoxDescent:N,actualBoundingBoxLeft:H,actualBoundingBoxRight:$}=this.ctx.measureText(Y),se=Math.ceil(P),de=Math.floor(H),Ae=Math.max(0,Math.min(this.size-this.buffer,Math.ceil($)-de)),Fe=Math.max(0,Math.min(this.size-this.buffer,se+Math.ceil(N))),Ie=Ae+2*this.buffer,Ye=Fe+2*this.buffer,st=Math.max(Ie*Ye,0),dt=new Uint8ClampedArray(st),Pe={data:dt,width:Ie,height:Ye,glyphWidth:Ae,glyphHeight:Fe,glyphTop:se,glyphLeft:de,glyphAdvance:d};if(Ae===0||Fe===0)return Pe;let{ctx:Xe,buffer:at,gridInner:xt,gridOuter:Et}=this;this.lang&&(Xe.lang=this.lang),Xe.clearRect(at,at,Ae,Fe),Xe.fillText(Y,at-de,at+se);let Bt=Xe.getImageData(at,at,Ae,Fe);Et.fill(w,0,st),xt.fill(0,0,st);let St=3;for(let Ht=0;Ht1&&(Ae=d[++de]);let Ie=Math.abs(Fe-Ae.left),Ye=Math.abs(Fe-Ae.right),st=Math.min(Ie,Ye),dt,Pe=$/N*(H+1);if(Ae.isDash){let Xe=H-Math.abs(Pe);dt=Math.sqrt(st*st+Xe*Xe)}else dt=H-Math.sqrt(st*st+Pe*Pe);this.data[se+Fe]=Math.max(0,Math.min(255,dt+128))}}}addRegularDash(d){for(let de=d.length-1;de>=0;--de){let Ae=d[de],Fe=d[de+1];Ae.zeroLength?d.splice(de,1):Fe&&Fe.isDash===Ae.isDash&&(Fe.left=Ae.left,d.splice(de,1))}let P=d[0],N=d[d.length-1];P.isDash===N.isDash&&(P.left=N.left-this.width,N.right=P.right+this.width);let H=this.width*this.nextRow,$=0,se=d[$];for(let de=0;de1&&(se=d[++$]);let Ae=Math.abs(de-se.left),Fe=Math.abs(de-se.right),Ie=Math.min(Ae,Fe);this.data[H+de]=Math.max(0,Math.min(255,(se.isDash?Ie:-Ie)+128))}}addDash(d,P){let N=P?7:0,H=2*N+1;if(this.nextRow+H>this.height)return i.w("LineAtlas out of space"),null;let $=0;for(let de of d)$+=de;if($!==0){let de=this.width/$,Ae=this.getDashRanges(d,this.width,de);P?this.addRoundDash(Ae,de,N):this.addRegularDash(Ae)}let se={y:this.nextRow+N,height:2*N,width:$};return this.nextRow+=H,this.dirty=!0,se}bind(d){let P=d.gl;this.texture?(P.bindTexture(P.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,P.texSubImage2D(P.TEXTURE_2D,0,0,0,this.width,this.height,P.ALPHA,P.UNSIGNED_BYTE,this.data))):(this.texture=P.createTexture(),P.bindTexture(P.TEXTURE_2D,this.texture),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.REPEAT),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.REPEAT),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.LINEAR),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.LINEAR),P.texImage2D(P.TEXTURE_2D,0,P.ALPHA,this.width,this.height,0,P.ALPHA,P.UNSIGNED_BYTE,this.data))}}let q="maplibre_preloaded_worker_pool";class U{constructor(){this.active={}}acquire(d){if(!this.workers)for(this.workers=[];this.workers.lengthi.m(d,P)))),ce}function K(Y,d){let P=i.O();return i.Q(P,P,[1,1,0]),i.S(P,P,[.5*Y.width,.5*Y.height,1]),Y.calculatePosMatrix?i.U(P,P,Y.calculatePosMatrix(d.toUnwrapped())):P}function _e(Y,d,P,N,H,$,se){var de;let Ae=(function(st,dt,Pe){if(st)for(let Xe of st){let at=dt[Xe];if((at==null?void 0:at.source)===Pe&&at.type==="fill-extrusion")return!0}else for(let Xe in dt){let at=dt[Xe];if(at.source===Pe&&at.type==="fill-extrusion")return!0}return!1})((de=H==null?void 0:H.layers)!==null&&de!==void 0?de:null,d,Y.id),Fe=$.maxPitchScaleFactor(),Ie=Y.tilesIn(N,Fe,Ae);Ie.sort(ne);let Ye=[];for(let st of Ie)Ye.push({wrappedTileID:st.tileID.wrapped().key,queryResults:st.tile.queryRenderedFeatures(d,P,Y.getState(),st.queryGeometry,st.cameraQueryGeometry,st.scale,H,$,Fe,K($,st.tileID),se?(dt,Pe)=>se(st.tileID,dt,Pe):void 0)});return(function(st,dt){for(let Pe in st)for(let Xe of st[Pe])ae(Xe,dt);return st})((function(st){let dt={},Pe={};for(let{queryResults:Xe,wrappedTileID:at}of st){Pe[at]||(Pe[at]={});let xt=Pe[at];for(let Et in Xe){let Bt=Xe[Et];xt[Et]||(xt[Et]={});let St=xt[Et];dt[Et]||(dt[Et]=[]);for(let Pt of Bt)St[Pt.featureIndex]||(St[Pt.featureIndex]=!0,dt[Et].push(Pt))}}return dt})(Ye),Y)}function ne(Y,d){let P=Y.tileID,N=d.tileID;return P.overscaledZ-N.overscaledZ||P.canonical.y-N.canonical.y||P.wrap-N.wrap||P.canonical.x-N.canonical.x}function ae(Y,d){let P=Y.feature,N=d.getFeatureState(P.layer["source-layer"],P.id);P.source=P.layer.source,P.layer["source-layer"]&&(P.sourceLayer=P.layer["source-layer"]),P.state=N}function pe(Y,d,P,N){return i._(this,void 0,void 0,(function*(){let H=Y;if(Y.url?H=(yield i.k(yield d.transformRequest(Y.url,"Source"),P)).data:yield f.frameAsync(P,N),!H)return null;let $=i.V(i.e(H,Y),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in H&&H.vector_layers&&($.vectorLayerIds=H.vector_layers.map((se=>se.id))),$}))}class ie{constructor(d,P){d&&(P?this.setSouthWest(d).setNorthEast(P):Array.isArray(d)&&(d.length===4?this.setSouthWest([d[0],d[1]]).setNorthEast([d[2],d[3]]):this.setSouthWest(d[0]).setNorthEast(d[1])))}setNorthEast(d){return this._ne=d instanceof i.W?new i.W(d.lng,d.lat):i.W.convert(d),this}setSouthWest(d){return this._sw=d instanceof i.W?new i.W(d.lng,d.lat):i.W.convert(d),this}extend(d){let P=this._sw,N=this._ne,H,$;if(d instanceof i.W)H=d,$=d;else{if(!(d instanceof ie))return Array.isArray(d)?d.length===4||d.every(Array.isArray)?this.extend(ie.convert(d)):this.extend(i.W.convert(d)):d&&("lng"in d||"lon"in d)&&"lat"in d?this.extend(i.W.convert(d)):this;if(H=d._sw,$=d._ne,!H||!$)return this}return P||N?(P.lng=Math.min(H.lng,P.lng),P.lat=Math.min(H.lat,P.lat),N.lng=Math.max($.lng,N.lng),N.lat=Math.max($.lat,N.lat)):(this._sw=new i.W(H.lng,H.lat),this._ne=new i.W($.lng,$.lat)),this}getCenter(){return new i.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new i.W(this.getWest(),this.getNorth())}getSouthEast(){return new i.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(d){let{lng:P,lat:N}=i.W.convert(d),H=this._sw.lng<=P&&P<=this._ne.lng;return this._sw.lng>this._ne.lng&&(H=this._sw.lng>=P&&P>=this._ne.lng),this._sw.lat<=N&&N<=this._ne.lat&&H}intersects(d){if(!((d=ie.convert(d)).getNorth()>=this.getSouth()&&d.getSouth()<=this.getNorth()))return!1;let P=Math.abs(this.getEast()-this.getWest()),N=Math.abs(d.getEast()-d.getWest());if(P>=360||N>=360)return!0;let H=i.X(this.getWest(),-180,180),$=i.X(this.getEast(),-180,180),se=i.X(d.getWest(),-180,180),de=i.X(d.getEast(),-180,180),Ae=H>$,Fe=se>de;return!(!Ae||!Fe)||(Ae?de>=H||se<=$:Fe?$>=se||H<=de:se<=$&&de>=H)}static convert(d){return d instanceof ie?d:d&&new ie(d)}static fromLngLat(d,P=0){let N=360*P/40075017,H=N/Math.cos(Math.PI/180*d.lat);return new ie(new i.W(d.lng-H,d.lat-N),new i.W(d.lng+H,d.lat+N))}adjustAntiMeridian(){let d=new i.W(this._sw.lng,this._sw.lat),P=new i.W(this._ne.lng,this._ne.lat);return new ie(d,d.lng>P.lng?new i.W(P.lng+360,P.lat):P)}}class le{constructor(d,P,N){this.bounds=ie.convert(this.validateBounds(d)),this.minzoom=P||0,this.maxzoom=N||24}validateBounds(d){return Array.isArray(d)&&d.length===4?[Math.max(-180,d[0]),Math.max(-90,d[1]),Math.min(180,d[2]),Math.min(90,d[3])]:[-180,-90,180,90]}contains(d){let P=Math.pow(2,d.z),N=Math.floor(i.Z(this.bounds.getWest())*P),H=Math.floor(i.Y(this.bounds.getNorth())*P),$=Math.ceil(i.Z(this.bounds.getEast())*P),se=Math.ceil(i.Y(this.bounds.getSouth())*P);return d.x>=N&&d.x<$&&d.y>=H&&d.y{this._options.tiles=d})),this}setUrl(d){return this.setSourceProperty((()=>{this.url=d,this._options.url=d})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return i.e({},this._options)}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),N={request:yield this.map._requestManager.transformRequest(P,"Tile"),uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,tileSize:this.tileSize*d.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(d),etag:d.etag};N.request.collectResourceTiming=this._collectResourceTiming;let H="RT";if(d.actor&&d.state!=="expired"){if(d.state==="loading")return new Promise((($,se)=>{d.reloadPromise={resolve:$,reject:se}}))}else d.actor=this.dispatcher.getActor(),H="LT";d.abortController=new AbortController;try{let $=yield d.actor.sendAsync({type:H,data:N},d.abortController);if(delete d.abortController,d.aborted)return;this._afterTileLoadWorkerResponse(d,$);let se={};return $!=null&&$.etagUnmodified&&(se.unmodified=!0),se}catch($){if(delete d.abortController,d.aborted)return;if($&&$.status!==404)throw $;this._afterTileLoadWorkerResponse(d,null)}}))}_getOverzoomParameters(d){return i._(this,void 0,void 0,(function*(){if(d.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let P=d.tileID.scaledTo(this.maxzoom).canonical,N=P.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:P,overzoomRequest:yield this.map._requestManager.transformRequest(N,"Tile")}}))}_afterTileLoadWorkerResponse(d,P){if(P!=null&&P.resourceTiming&&(d.resourceTiming=P.resourceTiming),P&&this.map._refreshExpiredTiles&&d.setExpiryData(P),d.etag=P==null?void 0:P.etag,d.loadVectorData(P,this.map.painter),d.reloadPromise){let N=d.reloadPromise;d.reloadPromise=null,this.loadTile(d).then(N.resolve).catch(N.reject)}}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController),d.actor&&(yield d.actor.sendAsync({type:"AT",data:{uid:d.uid,type:this.type,source:this.id}}))}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.unloadVectorData(),d.actor&&(yield d.actor.sendAsync({type:"RMT",data:{uid:d.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class be extends i.E{constructor(d,P,N,H){super(),this.id=d,this.dispatcher=N,this.setEventedParent(H),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=i.e({type:"raster"},P),i.e(this,i.V(P,["url","scheme","tileSize"]))}load(){return i._(this,arguments,void 0,(function*(d=!1){this._loaded=!1,this.fire(new i.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let P=yield pe(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,P&&(i.e(this,P),P.bounds&&(this.tileBounds=new le(P.bounds,this.minzoom,this.maxzoom)),this.fire(new i.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new i.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:d})))}catch(P){this._tileJSONRequest=null,this._loaded=!0,i.$(P)||this.fire(new i.l(i.d(P)))}}))}loaded(){return this._loaded}onAdd(d){this.map=d,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(d){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),d(),this.load(!0)}setTiles(d){return this.setSourceProperty((()=>{this._options.tiles=d})),this}setUrl(d){return this.setSourceProperty((()=>{this.url=d,this._options.url=d})),this}serialize(){return i.e({},this._options)}hasTile(d){return!this.tileBounds||this.tileBounds.contains(d.canonical)}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);d.abortController=new AbortController;try{let N=yield x.getImage(yield this.map._requestManager.transformRequest(P,"Tile"),d.abortController,this.map._refreshExpiredTiles);if(delete d.abortController,d.aborted)return void(d.state="unloaded");if(N!=null&&N.data){this.map._refreshExpiredTiles&&(N.cacheControl||N.expires)&&d.setExpiryData({cacheControl:N.cacheControl,expires:N.expires});let H=this.map.painter.context,$=H.gl,se=N.data;d.texture=this.map.painter.getTileTexture(se.width),d.texture?d.texture.update(se,{useMipmap:!0}):(d.texture=new i.T(H,se,$.RGBA,{useMipmap:!0}),d.texture.bind($.LINEAR,$.CLAMP_TO_EDGE,$.LINEAR_MIPMAP_NEAREST)),d.state="loaded"}}catch(N){if(delete d.abortController,d.aborted)d.state="unloaded";else if(N)throw d.state="errored",N}}))}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController)}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.texture&&this.map.painter.saveTileTexture(d.texture)}))}hasTransition(){return!1}}class De extends be{constructor(d,P,N,H){super(d,P,N,H),this.type="raster-dem",this.maxzoom=22,this._options=i.e({type:"raster-dem"},P),this.encoding=P.encoding||"mapbox",this.redFactor=P.redFactor,this.greenFactor=P.greenFactor,this.blueFactor=P.blueFactor,this.baseShift=P.baseShift}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),N=yield this.map._requestManager.transformRequest(P,"Tile");d.neighboringTiles=this._getNeighboringTiles(d.tileID),d.abortController=new AbortController;try{let H=yield x.getImage(N,d.abortController,this.map._refreshExpiredTiles);if(delete d.abortController,d.aborted)return void(d.state="unloaded");if(H!=null&&H.data){let $=H.data;this.map._refreshExpiredTiles&&(H.cacheControl||H.expires)&&d.setExpiryData({cacheControl:H.cacheControl,expires:H.expires});let se=i.b($)&&i.a0()?$:yield this.readImageNow($),de={type:this.type,uid:d.uid,source:this.id,rawImageData:se,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(d.actor&&d.state!=="expired"&&d.state!=="reloading")return;d.actor&&d.state!=="expired"||(d.actor=this.dispatcher.getActor()),d.dem=yield d.actor.sendAsync({type:"LDT",data:de}),d.needsHillshadePrepare=!0,d.needsTerrainPrepare=!0,d.state="loaded"}}catch(H){if(delete d.abortController,d.aborted)d.state="unloaded";else if(H)throw d.state="errored",H}}))}readImageNow(d){return i._(this,void 0,void 0,(function*(){if(typeof VideoFrame!="undefined"&&i.a1()){let P=d.width+2,N=d.height+2;try{return new i.R({width:P,height:N},yield i.a2(d,-1,-1,P,N))}catch(H){}}return f.getImageData(d,1)}))}_getNeighboringTiles(d){let P=d.canonical,N=Math.pow(2,P.z),H=(P.x-1+N)%N,$=P.x===0?d.wrap-1:d.wrap,se=(P.x+1+N)%N,de=P.x+1===N?d.wrap+1:d.wrap,Ae={};return Ae[new i.a3(d.overscaledZ,$,P.z,H,P.y).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,de,P.z,se,P.y).key]={backfilled:!1},P.y>0&&(Ae[new i.a3(d.overscaledZ,$,P.z,H,P.y-1).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,d.wrap,P.z,P.x,P.y-1).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,de,P.z,se,P.y-1).key]={backfilled:!1}),P.y+1$.key===N));H>-1&&Y.addOrUpdateProperties.splice(H,1)}return(Y.removeAllProperties||d.removeAllProperties)&&(P.removeAllProperties=!0),(Y.removeProperties||d.removeProperties)&&(P.removeProperties=[...Y.removeProperties||[],...d.removeProperties||[]]),(Y.addOrUpdateProperties||d.addOrUpdateProperties)&&(P.addOrUpdateProperties=[...Y.addOrUpdateProperties||[],...d.addOrUpdateProperties||[]]),(Y.newGeometry||d.newGeometry)&&(P.newGeometry=d.newGeometry||Y.newGeometry),P}function it(Y){var d,P;if(!Y)return{};let N={};return N.removeAll=Y.removeAll,N.remove=new Set(Y.remove||[]),N.add=new Map((d=Y.add)===null||d===void 0?void 0:d.map((H=>[H.id,H]))),N.update=new Map((P=Y.update)===null||P===void 0?void 0:P.map((H=>[H.id,H]))),N}function Oe(Y){return Y&&Y.length!==0?typeof Y[0]=="number"?[Y]:Y.flatMap((d=>Oe(d))):[]}function ze(Y){return Y.type==="GeometryCollection"?Y.geometries.flatMap((d=>ze(d))):Oe(Y.coordinates)}function ct(Y){let d=new ie,P;switch(Y.type){case"FeatureCollection":P=Y.features.flatMap((N=>ze(N.geometry)));break;case"Feature":P=ze(Y.geometry);break;default:P=ze(Y)}if(P.length===0)return d;for(let N of P){let[H,$]=N;d.extend([H,$])}return d}class et extends i.E{constructor(d,P,N,H){super(),this.id=d,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:P.data},this.actor=N.getActor(),this.setEventedParent(H),this._data=typeof P.data=="string"?{url:P.data}:{geojson:P.data},this._options=i.e({},P),this._collectResourceTiming=P.collectResourceTiming,P.maxzoom!==void 0&&(this.maxzoom=P.maxzoom),P.type&&(this.type=P.type),P.attribution&&(this.attribution=P.attribution),this.promoteId=P.promoteId,P.clusterMaxZoom!==void 0&&this.maxzoom<=P.clusterMaxZoom&&i.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${P.clusterMaxZoom}".`),this.workerOptions=i.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(P.buffer!==void 0?P.buffer:128),tolerance:this._pixelsToTileUnits(P.tolerance!==void 0?P.tolerance:.375),extent:i.a6,maxZoom:this.maxzoom,lineMetrics:P.lineMetrics||!1,generateId:P.generateId||!1,promoteId:typeof P.promoteId=="string"?P.promoteId:void 0,cluster:P.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(P.clusterMaxZoom),minPoints:Math.max(2,P.clusterMinPoints||2),extent:i.a6,radius:this._pixelsToTileUnits(P.clusterRadius||50),log:!1,generateId:P.generateId||!1}},clusterProperties:P.clusterProperties,filter:P.filter},P.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(d){return d*(i.a6/this.tileSize)}_getClusterMaxZoom(d){let P=d?Math.round(d):this.maxzoom-1;return Number.isInteger(d)||d===void 0||i.w(`Integer expected for option 'clusterMaxZoom': provided value "${d}" rounded to "${P}"`),P}load(){return i._(this,void 0,void 0,(function*(){yield this._updateWorkerData()}))}onAdd(d){this.map=d,this.load()}setData(d,P){this._data=typeof d=="string"?{url:d}:{geojson:d},this._pendingWorkerUpdate={data:d};let N=this._updateWorkerData();return P?N:this}updateData(d,P){this._pendingWorkerUpdate.diff=(function(H,$){if(!H)return $||{};if(!$)return H||{};let se=it(H),de=it($);(function(Fe,Ie){Ie.removeAll&&(Fe.add.clear(),Fe.update.clear(),Fe.remove.clear(),Ie.remove.clear());for(let Ye of Ie.remove)Fe.add.delete(Ye),Fe.update.delete(Ye);for(let[Ye,st]of Ie.update){let dt=Fe.update.get(Ye);dt&&(Ie.update.set(Ye,ht(dt,st)),Fe.update.delete(Ye))}})(se,de);let Ae={};if((se.removeAll||de.removeAll)&&(Ae.removeAll=!0),Ae.remove=new Set([...se.remove,...de.remove]),Ae.add=new Map([...se.add,...de.add]),Ae.update=new Map([...se.update,...de.update]),Ae.remove.size&&Ae.add.size)for(let Fe of Ae.add.keys())Ae.remove.delete(Fe);return(function(Fe){let Ie={};return Fe.removeAll&&(Ie.removeAll=Fe.removeAll),Fe.remove&&(Ie.remove=Array.from(Fe.remove)),Fe.add&&(Ie.add=Array.from(Fe.add.values())),Fe.update&&(Ie.update=Array.from(Fe.update.values())),Ie})(Ae)})(this._pendingWorkerUpdate.diff,d);let N=this._updateWorkerData();return P?N:this}getData(){return i._(this,void 0,void 0,(function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}}))}getBounds(){return i._(this,void 0,void 0,(function*(){return ct(yield this.getData())}))}setClusterOptions(d){return this.workerOptions.geojsonVtOptions.cluster=d.cluster,d.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(d.clusterRadius)),d.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(d.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(d){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:d,source:this.id}})}getClusterChildren(d){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:d,source:this.id}})}getClusterLeaves(d,P,N){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:d,limit:P,offset:N}})}_updateWorkerData(){return i._(this,void 0,void 0,(function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void i.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:d,diff:P,updateCluster:N}=this._pendingWorkerUpdate,H=this._getLoadGeoJSONParameters(d,P,N);d!==void 0?this._pendingWorkerUpdate.data=void 0:P?this._pendingWorkerUpdate.diff=void 0:N&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(H)}))}_getLoadGeoJSONParameters(d,P,N){return i._(this,void 0,void 0,(function*(){let H=i.e({type:this.type},this.workerOptions);return typeof d=="string"?(H.request=yield this.map._requestManager.transformRequest(f.resolveURL(d),"Source"),H.request.collectResourceTiming=this._collectResourceTiming,H):d!==void 0?(H.data=d,H):P?(H.dataDiff=P,H):N?(H.updateCluster=!0,H):void 0}))}_dispatchWorkerUpdate(d){return i._(this,void 0,void 0,(function*(){this._isUpdatingWorker=!0,this.fire(new i.n("dataloading",{dataType:"source"}));try{let P=yield d,N=yield this.actor.sendAsync({type:"LD",data:P});if(this._isUpdatingWorker=!1,this._removed||N.abandoned)return void this.fire(new i.n("dataabort",{dataType:"source"}));N.data&&(this._data={geojson:N.data});let H=this._applyDiffToSource(P.dataDiff),$=this._getShouldReloadTileOptions(H),se={dataType:"source"};this._applyResourceTiming(se,N),this.fire(new i.n("data",Object.assign(Object.assign({},se),{sourceDataType:"metadata"}))),this.fire(new i.n("data",Object.assign(Object.assign({},se),{sourceDataType:"content",shouldReloadTileOptions:$})))}catch(P){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new i.n("dataabort",{dataType:"source"}));this.fire(new i.l(i.d(P)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}}))}_applyResourceTiming(d,P){var N;if(!this._collectResourceTiming)return;let H=(N=P.resourceTiming)===null||N===void 0?void 0:N[this.id];if(!H)return;let $=H.slice(0);$!=null&&$.length&&i.e(d,{resourceTiming:$})}_applyDiffToSource(d){if(!d)return;let P=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let H=(function($,se){let de=new Map;if($==null||$.type==null)return de;if($.type==="Feature"){let Ae=Ge($,se);return Ae==null?void 0:(de.set(Ae,$),de)}if($.type==="FeatureCollection"){let Ae=new Set;for(let Fe of $.features){let Ie=Ge(Fe,se);if(Ie==null||Ae.has(Ie))return;Ae.add(Ie),de.set(Ie,Fe)}return de}})(this._data.geojson,P);if(!H)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:H}}if(!this._data.updateable)return;let N=(function(H,$,se){var de,Ae;let Fe=[];if($.removeAll)H.clear();else if($.remove)for(let Ie of $.remove){let Ye=H.get(Ie);Ye&&(Fe.push(Ye.geometry),H.delete(Ie))}if($.add)for(let Ie of $.add){let Ye=Ge(Ie,se);if(Ye==null)continue;let st=H.get(Ye);st&&Fe.push(st.geometry),Fe.push(Ie.geometry),H.set(Ye,Ie)}if($.update)for(let Ie of $.update){let Ye=H.get(Ie.id);if(!Ye)continue;let st=!!Ie.newGeometry,dt=Ie.removeAllProperties||((de=Ie.removeProperties)===null||de===void 0?void 0:de.length)>0||((Ae=Ie.addOrUpdateProperties)===null||Ae===void 0?void 0:Ae.length)>0;if(!st&&!dt)continue;Fe.push(Ye.geometry);let Pe=Object.assign({},Ye);if(H.set(Ie.id,Pe),st&&(Fe.push(Ie.newGeometry),Pe.geometry=Ie.newGeometry),dt){if(Pe.properties=Ie.removeAllProperties?{}:Object.assign({},Pe.properties||{}),Ie.removeProperties)for(let Xe of Ie.removeProperties)delete Pe.properties[Xe];if(Ie.addOrUpdateProperties)for(let{key:Xe,value:at}of Ie.addOrUpdateProperties)Pe.properties[Xe]=at}}return Fe})(this._data.updateable,d,P);return d.removeAll||this._options.cluster?void 0:N}_getShouldReloadTileOptions(d){if(d)return{affectedBounds:d.filter(Boolean).map((P=>ct(P)))}}shouldReloadTile(d,{affectedBounds:P}){if(d.state==="loading")return!0;if(d.state==="unloaded")return!1;let{buffer:N,extent:H}=this.workerOptions.geojsonVtOptions,$=(function({x:se,y:de,z:Ae},Fe=0){let Ie=i.a4((se-Fe)/Math.pow(2,Ae)),Ye=i.a5((de+1+Fe)/Math.pow(2,Ae)),st=i.a4((se+1+Fe)/Math.pow(2,Ae)),dt=i.a5((de-Fe)/Math.pow(2,Ae));return new ie([Ie,Ye],[st,dt])})(d.tileID.canonical,N/H);for(let se of P)if($.intersects(se))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.actor?"RT":"LT";d.actor=this.actor;let N={type:this.type,uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};d.abortController=new AbortController;let H=yield this.actor.sendAsync({type:P,data:N},d.abortController);delete d.abortController,d.unloadVectorData(),d.aborted||d.loadVectorData(H,this.map.painter,P==="RT")}))}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController),d.aborted=!0}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:d.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return i.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class qe extends i.E{constructor(d,P,N,H){super(),this.flippedWindingOrder=!1,this.id=d,this.dispatcher=N,this.coordinates=P.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(H),this.options=P}load(d){return i._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new i.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let P=yield x.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,P!=null&&P.data&&(this.image=P.data,d&&(this.coordinates=d),this._finishLoading())}catch(P){this._request=null,this._loaded=!0,i.$(P)||this.fire(new i.l(i.d(P)))}}))}loaded(){return this._loaded}updateImage(d){return d.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=d.url,this.load(d.coordinates).finally((()=>this.texture=null)),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(d){this.map=d,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(d){this.coordinates=d;let P=d.map(i.a7.fromLngLat);var N;return this.tileID=(function(H){let $=i.a8.fromPoints(H),se=$.width(),de=$.height(),Ae=Math.max(se,de),Fe=Math.max(0,Math.floor(-Math.log(Ae)/Math.LN2)),Ie=Math.pow(2,Fe);return new i.aa(Fe,Math.floor(($.minX+$.maxX)/2*Ie),Math.floor(($.minY+$.maxY)/2*Ie))})(P),this.terrainTileRanges=this._getOverlappingTileRanges(P),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=P.map((H=>this.tileID.getTilePoint(H)._round())),this.flippedWindingOrder=((N=this.tileCoords)[1].x-N[0].x)*(N[2].y-N[0].y)-(N[1].y-N[0].y)*(N[2].x-N[0].x)<0,this.fire(new i.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let d=this.map.painter.context,P=d.gl;this.texture||(this.texture=new i.T(d,this.image,P.RGBA),this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE));let N=!1;for(let H in this.tiles){let $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture,N=!0)}N&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(d){return i._(this,void 0,void 0,(function*(){var P;!((P=this.tileID)===null||P===void 0)&&P.equals(d.tileID.canonical)?(this.tiles[String(d.tileID.wrap)]=d,d.buckets={}):d.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(d){let{minX:P,minY:N,maxX:H,maxY:$}=i.a8.fromPoints(d),se={};for(let de=0;de<=i.a9;de++){let Ae=Math.pow(2,de),Fe=Math.floor(P*Ae),Ie=Math.floor(N*Ae),Ye=Math.floor(H*Ae),st=Math.floor($*Ae),dt=(Fe%Ae+Ae)%Ae,Pe=Ye%Ae,Xe=Math.floor(Fe/Ae),at=Math.floor(Ye/Ae);se[de]={minWrap:Xe,maxWrap:at,minTileXWrapped:dt,maxTileXWrapped:Pe,minTileY:Ie,maxTileY:st}}return se}}class we extends qe{constructor(d,P,N,H){super(d,P,N,H),this._onPlayingHandler=()=>{var $;($=this.map)===null||$===void 0||$.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=P}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!1;let d=this.options;this.urls=[];for(let P of d.urls)this.urls.push((yield this.map._requestManager.transformRequest(P,"Source")).url);try{let P=yield i.ab(this.urls);if(this._loaded=!0,!P)return;this.video=P,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(P){this.fire(new i.l(i.d(P)))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(d){if(this.video){let P=this.video.seekable;dP.end(0)?this.fire(new i.l(new i.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${P.start(0)} and ${P.end(0)}-second mark.`))):this.video.currentTime=d}}getVideo(){return this.video}onAdd(d){this.map||(this.map=d,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let d=this.map.painter.context,P=d.gl;this.texture?this.video.paused||(this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE),P.texSubImage2D(P.TEXTURE_2D,0,0,0,P.RGBA,P.UNSIGNED_BYTE,this.video)):(this.texture=new i.T(d,this.video,P.RGBA),this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE));let N=!1;for(let H in this.tiles){let $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture,N=!0)}N&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Le extends qe{constructor(d,P,N,H){super(d,P,N,H),P.coordinates?Array.isArray(P.coordinates)&&P.coordinates.length===4&&!P.coordinates.some(($=>!Array.isArray($)||$.length!==2||$.some((se=>typeof se!="number"))))||this.fire(new i.l(new i.ac(`sources.${d}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.l(new i.ac(`sources.${d}`,null,'missing required property "coordinates"'))),P.animate&&typeof P.animate!="boolean"&&this.fire(new i.l(new i.ac(`sources.${d}`,null,'optional "animate" property must be a boolean value'))),P.canvas?typeof P.canvas=="string"||P.canvas instanceof HTMLCanvasElement||this.fire(new i.l(new i.ac(`sources.${d}`,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 i.l(new i.ac(`sources.${d}`,null,'missing required property "canvas"'))),this.options=P,this.animate=P.animate===void 0||P.animate}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new i.l(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())}))}getCanvas(){return this.canvas}onAdd(d){this.map=d,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let d=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,d=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,d=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let P=this.map.painter.context,N=P.gl;this.texture?(d||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new i.T(P,this.canvas,N.RGBA,{premultiply:!0}),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let H=!1;for(let $ in this.tiles){let se=this.tiles[$];se.state!=="loaded"&&(se.state="loaded",se.texture=this.texture,H=!0)}H&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let d of[this.canvas.width,this.canvas.height])if(isNaN(d)||d<=0)return!0;return!1}}let Ke={},Te=Y=>{switch(Y){case"geojson":return et;case"image":return qe;case"raster":return be;case"raster-dem":return De;case"vector":return me;case"video":return we;case"canvas":return Le}return Ke[Y]},Ve="RTLPluginLoaded";class $e extends i.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=ue()}_syncState(d){return this.status=d,this.dispatcher.broadcast("SRPS",{pluginStatus:d,pluginURL:this.url}).catch((P=>{throw this.status="error",P}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(d){return i._(this,arguments,void 0,(function*(P,N=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=f.resolveURL(P),!this.url)throw new Error(`requested url ${P} is invalid`);if(this.status==="unavailable"){if(!N)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()}))}_requestImport(){return i._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new i.n(Ve))}))}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let ot=null;function tt(){return ot||(ot=new $e),ot}var nt,We;(function(Y){Y[Y.Base=0]="Base",Y[Y.Parent=1]="Parent"})(nt||(nt={})),(function(Y){Y[Y.Departing=0]="Departing",Y[Y.Incoming=1]="Incoming"})(We||(We={}));class mt{constructor(d,P){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=d,this.uid=i.ad(),this.uses=0,this.tileSize=P,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(d){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(d||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:d,fadingDirection:P,fadingParentID:N,fadeEndTime:H}){this.resetFadeLogic(),this.fadingRole=d,this.fadingDirection=P,this.fadingParentID=N,this.fadeEndTime=H}setSelfFadeLogic(d){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=d}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=g(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(d){this.demTexture&&d.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(d,P,N){if((d==null?void 0:d.etagUnmodified)!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",d){d.featureIndex&&(this.latestFeatureIndex=d.featureIndex,d.rawTileData?(this.latestRawTileData=d.rawTileData,this.latestEncoding=d.encoding,this.latestFeatureIndex.rawTileData=d.rawTileData,this.latestFeatureIndex.encoding=d.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=d.collisionBoxArray,this.buckets=(function(H,$){let se={};if(!$)return se;for(let de of H){let Ae=de.layerIds.map((Fe=>$.getLayer(Fe))).filter(Boolean);if(Ae.length!==0){de.layers=Ae,de.stateDependentLayerIds&&(de.stateDependentLayers=de.stateDependentLayerIds.map((Fe=>Ae.filter((Ie=>Ie.id===Fe))[0])));for(let Fe of Ae)se[Fe.id]=de}}return se})(d.buckets,P==null?void 0:P.style),this.hasSymbolBuckets=!1;for(let H in this.buckets){let $=this.buckets[H];if($ instanceof i.af){if(this.hasSymbolBuckets=!0,!N)break;$.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let H in this.buckets){let $=this.buckets[H];if($ instanceof i.af&&$.hasRTLText){this.hasRTLText=!0,tt().lazyLoad();break}}this.queryPadding=0;for(let H in this.buckets){let $=this.buckets[H];this.queryPadding=Math.max(this.queryPadding,P.style.getLayer(H).queryRadius($))}d.imageAtlas&&(this.imageAtlas=d.imageAtlas),d.glyphAtlasImage&&(this.glyphAtlasImage=d.glyphAtlasImage),this.dashPositions=d.dashPositions}else this.collisionBoxArray=new i.ae;else this.state="loaded"}unloadVectorData(){for(let d in this.buckets)this.buckets[d].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(d){return this.buckets[d.id]}upload(d){for(let N in this.buckets){let H=this.buckets[N];H.uploadPending()&&H.upload(d)}let P=d.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new i.T(d,this.imageAtlas.image,P.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new i.T(d,this.glyphAtlasImage,P.ALPHA),this.glyphAtlasImage=null)}prepare(d){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(d,this.imageAtlasTexture)}queryRenderedFeatures(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye){var st;return!((st=this.latestFeatureIndex)===null||st===void 0)&&st.rawTileData?this.latestFeatureIndex.query({queryGeometry:H,cameraQueryGeometry:$,scale:se,tileSize:this.tileSize,pixelPosMatrix:Ie,transform:Ae,params:de,queryPadding:this.queryPadding*Fe,getElevation:Ye},d,P,N):{}}querySourceFeatures(d,P){let N=this.latestFeatureIndex;if(!(N!=null&&N.rawTileData))return;let H=N.loadVTLayers(),$=P!=null&&P.sourceLayer?P.sourceLayer:"",se=H[i.ag]||H[$];if(!se)return;let de=i.ah(P==null?void 0:P.filter,P==null?void 0:P.globalState),{z:Ae,x:Fe,y:Ie}=this.tileID.canonical,Ye={z:Ae,x:Fe,y:Ie};for(let st=0;stN)H=!1;else if(P)if(this.expirationTime({zoom:0,x:0,y:0,wrap:Pt,fullyVisible:!1}),Bt=[],St=[];if(Y.renderWorldCopies&&se.allowWorldCopies())for(let Pt=1;Pt<=3;Pt++)Bt.push(Et(-Pt)),Bt.push(Et(Pt));for(Bt.push(Et(0));Bt.length>0;){let Pt=Bt.pop(),$t=Pt.x,Ht=Pt.y,dr=Pt.fullyVisible,Xr={x:$t,y:Ht,z:Pt.zoom},Or=se.getTileBoundingVolume(Xr,Pt.wrap,Y.elevation,d);if(!dr){let Rr=Ct(P,Or,N);if(Rr===0)continue;dr=Rr===2}let $r=se.distanceToTile2d(H.x,H.y,Xr,Or),Er=Ae;de&&(Er=(d.calculateTileZoom||Mt)(Y.zoom+i.ar(Y.tileSize/d.tileSize),$r,at,xt,Y.fov)),Er=(d.roundZoom?Math.round:Math.floor)(Er),Er=Math.max(0,Er);let Tr=Math.min(Er,Ie);if(Pt.wrap=se.getWrap($,Xr,Pt.wrap),Pt.zoom>=Tr){if(Pt.zoom>1),wrap:Pt.wrap,fullyVisible:dr})}return St.sort(((Pt,$t)=>Pt.distanceSq-$t.distanceSq)).map((Pt=>Pt.tileID))}let kt=i.a8.fromPoints([new i.P(0,0),new i.P(i.a6,i.a6)]);function rr(Y){return Y==="raster"||Y==="image"||Y==="video"}function pr(Y,d,P,N,H,$,se){if(!d.hasData())return!1;let{tileID:de,fadingRole:Ae,fadingDirection:Fe,fadingParentID:Ie}=d;if(Ae===nt.Base&&Fe===We.Incoming&&Ie)return P[Ie.key]=Ie,!0;let Ye=Math.max(de.overscaledZ-H,$);for(let st=de.overscaledZ-1;st>=Ye;st--){let dt=de.scaledTo(st),Pe=Y.getLoadedTile(dt);if(Pe)return d.setCrossFadeLogic({fadingRole:nt.Base,fadingDirection:We.Incoming,fadingParentID:Pe.tileID,fadeEndTime:N+se}),Pe.setCrossFadeLogic({fadingRole:nt.Parent,fadingDirection:We.Departing,fadeEndTime:N+se}),P[dt.key]=dt,!0}return!1}function Kr(Y,d,P,N,H,$){if(!d.hasData())return!1;let se=d.tileID.children(H),de=Nr(Y,d,se,P,N,H,$);if(de)return!0;for(let Ae of se)Nr(Y,d,Ae.children(H),P,N,H,$)&&(de=!0);return de}function Nr(Y,d,P,N,H,$,se){if(P[0].overscaledZ>=$)return!1;let de=!1;for(let Ae of P){let Fe=Y.getLoadedTile(Ae);if(!Fe)continue;let{fadingRole:Ie,fadingDirection:Ye,fadingParentID:st}=Fe;Ie===nt.Base&&Ye===We.Departing&&st||(Fe.setCrossFadeLogic({fadingRole:nt.Base,fadingDirection:We.Departing,fadingParentID:d.tileID,fadeEndTime:H+se}),d.setCrossFadeLogic({fadingRole:nt.Parent,fadingDirection:We.Incoming,fadeEndTime:H+se})),N[Ae.key]=Ae,de=!0}return de}function dn(Y,d,P,N){let H=Y.tileID;return!!Y.selfFading||!Y.hasData()&&!!d.has(H)&&(Y.setSelfFadeLogic(P+N),!0)}function xr(Y,d){var P;Y.needsHillshadePrepare=!0,Y.needsTerrainPrepare=!0;let N=d.tileID.canonical.x-Y.tileID.canonical.x,H=d.tileID.canonical.y-Y.tileID.canonical.y,$=Math.pow(2,Y.tileID.canonical.z),se=d.tileID.key;N===0&&H===0||Math.abs(H)>1||(Math.abs(N)>1&&(Math.abs(N+$)===1?N+=$:Math.abs(N-$)===1&&(N-=$)),d.dem&&Y.dem&&(Y.dem.backfillBorder(d.dem,N,H),!((P=Y.neighboringTiles)===null||P===void 0)&&P[se]&&(Y.neighboringTiles[se].backfilled=!0)))}class Fr{constructor(){this._tiles={}}handleWrapJump(d){let P={};for(let N in this._tiles){let H=this._tiles[N];H.tileID=H.tileID.unwrapTo(H.tileID.wrap+d),P[H.tileID.key]=H}this._tiles=P}setFeatureState(d,P){for(let N in this._tiles)this._tiles[N].setFeatureState(d,P)}getAllTiles(){return Object.values(this._tiles)}getAllIds(d=!1){return d?Object.values(this._tiles).map((P=>P.tileID)).sort(i.au).map((P=>P.key)):Object.keys(this._tiles)}getTileById(d){return this._tiles[d]}setTile(d,P){this._tiles[d]=P}deleteTileById(d){delete this._tiles[d]}getLoadedTile(d){let P=this.getTileById(d.key);return P!=null&&P.hasData()?P:null}isIdRenderable(d,P=!1){var N;return(N=this.getTileById(d))===null||N===void 0?void 0:N.isRenderable(P)}getRenderableIds(d=0,P){let N=[];for(let H of this.getAllIds())this.isIdRenderable(H,P)&&N.push(this.getTileById(H));return P?N.sort(((H,$)=>{let se=H.tileID,de=$.tileID,Ae=new i.P(se.canonical.x,se.canonical.y)._rotate(-d),Fe=new i.P(de.canonical.x,de.canonical.y)._rotate(-d);return se.overscaledZ-de.overscaledZ||Fe.y-Ae.y||Fe.x-Ae.x})).map((H=>H.tileID.key)):N.map((H=>H.tileID)).sort(i.au).map((H=>H.key))}}class Zr extends i.E{constructor(d,P,N){super(),this.id=d,this.dispatcher=N,this.on("data",(H=>{this._dataHandler(H)})),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((H,$,se,de)=>{let Ae=new(Te($.type))(H,$,se,de);if(Ae.id!==H)throw new Error(`Expected Source id to be ${H} instead of ${Ae.id}`);return Ae})(d,P,N,this),this._inViewTiles=new Fr,this._outOfViewCache=new i.av(0,(H=>this._unloadTile(H))),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new bt,this._didEmitContent=!1,this._updated=!1}onAdd(d){var P;this.map=d,this._maxTileCacheSize=d?d._maxTileCacheSize:null,this._maxTileCacheZoomLevels=d?d._maxTileCacheZoomLevels:null,!((P=this._source)===null||P===void 0)&&P.onAdd&&this._source.onAdd(d)}onRemove(d){var P;for(let N of this._inViewTiles.getAllTiles())N.unloadVectorData();this.clearTiles(),!((P=this._source)===null||P===void 0)&&P.onRemove&&this._source.onRemove(d),this._inViewTiles=new Fr}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let d of this._inViewTiles.getAllTiles())if(d.state!=="loaded"&&d.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let d=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,d&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(d,P,N){return i._(this,void 0,void 0,(function*(){try{let H=yield this._source.loadTile(d);this._tileLoaded(d,P,N,H)}catch(H){d.state="errored",H.status!==404?this._source.fire(new i.l(i.d(H),{tile:d})):this.update(this.transform,this.terrain)}}))}_unloadTile(d){this._source.unloadTile&&this._source.unloadTile(d)}_abortTile(d){this._source.abortTile&&this._source.abortTile(d),this._source.fire(new i.n("dataabort",{tile:d,coord:d.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(d){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let P of this._inViewTiles.getAllTiles())P.upload(d),P.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(d){var P;return this._inViewTiles.getRenderableIds((P=this.transform)===null||P===void 0?void 0:P.bearingInRadians,d)}hasRenderableParent(d){let P=d.overscaledZ-1;if(P>=this._source.minzoom){let N=this.getLoadedTile(d.scaledTo(P));if(N)return this._inViewTiles.isIdRenderable(N.tileID.key)}return!1}reload(d,P=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let N of this._inViewTiles.getAllIds()){let H=this._inViewTiles.getTileById(N);P&&!this._source.shouldReloadTile(H,P)||(d?this._reloadTile(N,"expired"):H.state!=="errored"&&this._reloadTile(N,"reloading"))}}}_reloadTile(d,P){return i._(this,void 0,void 0,(function*(){let N=this._inViewTiles.getTileById(d);N&&(N.state!=="loading"&&(N.state=P),yield this._loadTile(N,d,P))}))}_tileLoaded(d,P,N,H){d.timeAdded=g(),d.selfFading&&(d.fadeEndTime=d.timeAdded+this._rasterFadeDuration),N==="expired"&&(d.refreshedUponExpiration=!0),this._setTileReloadTimer(P,d),H!=null&&H.unmodified||(this.getSource().type==="raster-dem"&&d.dem&&(function($,se){var de,Ae,Fe;let Ie=se.getRenderableIds();for(let Ye of Ie){if(!(!((de=$.neighboringTiles)===null||de===void 0)&&de[Ye]))continue;let st=se.getTileById(Ye);$.neighboringTiles[Ye].backfilled||xr($,st),!((Fe=(Ae=st.neighboringTiles)===null||Ae===void 0?void 0:Ae[$.tileID.key])===null||Fe===void 0)&&Fe.backfilled||xr(st,$)}})(d,this._inViewTiles),this._state.initializeTileState(d,this.map?this.map.painter:null),d.aborted||this._source.fire(new i.n("data",{dataType:"source",tile:d,coord:d.tileID})))}getTile(d){return this.getTileByID(d.key)}getTileByID(d){return this._inViewTiles.getTileById(d)}_retainLoadedChildren(d,P){let N=this._getLoadedDescendents(P),H=new Set;for(let $ of P){let se=N[$.key];if(!(se!=null&&se.length)){H.add($);continue}let de=$.overscaledZ+Zr.maxOverzooming,Ae=se.filter((Ye=>Ye.tileID.overscaledZ<=de));if(!Ae.length){H.add($);continue}let Fe=Math.min(...Ae.map((Ye=>Ye.tileID.overscaledZ))),Ie=Ae.filter((Ye=>Ye.tileID.overscaledZ===Fe)).map((Ye=>Ye.tileID));for(let Ye of Ie)d[Ye.key]=Ye;this._areDescendentsComplete(Ie,Fe,$.overscaledZ)||H.add($)}return H}_getLoadedDescendents(d){var P;let N={};for(let H of this._inViewTiles.getAllTiles().filter(($=>$.hasData())))for(let $ of d)H.tileID.isChildOf($)&&(N[P=$.key]||(N[P]=[]),N[$.key].push(H));return N}_areDescendentsComplete(d,P,N){return d.length===1&&d[0].isOverscaled()?d[0].overscaledZ===P:Math.pow(4,P-N)===d.length}getLoadedTile(d){return this._inViewTiles.getLoadedTile(d)}updateCacheSize(d){let P=Math.ceil(d.width/this._source.tileSize)+1,N=Math.ceil(d.height/this._source.tileSize)+1,H=Math.floor(P*N*(this._maxTileCacheZoomLevels===null?i.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),$=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,H):H;this._outOfViewCache.setMaxSize($)}handleWrapJump(d){let P=Math.round((d-(this._prevLng===void 0?d:this._prevLng))/360);this._prevLng=d,P&&(this._inViewTiles.handleWrapJump(P),this._resetTileReloadTimers())}update(d,P){if(!this._sourceLoaded||this._paused)return;let N;this.transform=d,this.terrain=P,this.updateCacheSize(d),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?N=d.getVisibleUnwrappedCoordinates(this._source.tileID).map((Ae=>new i.a3(Ae.canonical.z,Ae.wrap,Ae.canonical.z,Ae.canonical.x,Ae.canonical.y))):(N=ft(d,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?d.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:P,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(N=N.filter((Ae=>this._source.hasTile(Ae))))):N=[],this.usedForTerrain&&(N=this._addTerrainIdealTiles(N));let H=N.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,H&&this.fire(new i.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let $=Lt(d,this._source),se=this._updateRetainedTiles(N,$),de=rr(this._source.type);de&&this._rasterFadeDuration>0&&!P&&(function(Ae,Fe,Ie,Ye,st,dt,Pe){let Xe=g(),at=i.at(Fe);for(let xt of Fe){let Et=Ae.getTileById(xt.key);Et.fadingDirection!==We.Departing&&Et.fadeOpacity!==0||Et.resetFadeLogic(),pr(Ae,Et,Ie,Xe,Ye,st,Pe)||Kr(Ae,Et,Ie,Xe,dt,Pe)||dn(Et,at,Xe,Pe)||Et.resetFadeLogic()}})(this._inViewTiles,N,se,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),de?this._cleanUpRasterTiles(se):this._cleanUpVectorTiles(se)}_cleanUpRasterTiles(d){for(let P of this._inViewTiles.getAllIds())d[P]||this._removeTile(P)}_cleanUpVectorTiles(d){for(let P of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(P);d[P]?N.clearSymbolFadeHold():N.hasSymbolBuckets?N.holdingForSymbolFade()?N.symbolFadeFinished()&&this._removeTile(P):N.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(P)}}_addTerrainIdealTiles(d){let P=[];for(let N of d)if(N.canonical.z>this._source.minzoom){let H=N.scaledTo(N.canonical.z-1);P.push(H);let $=N.scaledTo(Math.max(this._source.minzoom,Math.min(N.canonical.z,5)));P.push($)}return d.concat(P)}releaseSymbolFadeTiles(){for(let d of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(d).holdingForSymbolFade()&&this._removeTile(d)}_updateRetainedTiles(d,P){var N;let H=new Set;for(let Fe of d)this._addTile(Fe).hasData()||H.add(Fe);let $=d.reduce(((Fe,Ie)=>(Fe[Ie.key]=Ie,Fe)),{}),se=this._retainLoadedChildren($,H),de={},Ae=Math.max(P-Zr.maxUnderzooming,this._source.minzoom);for(let Fe of se){let Ie=this._inViewTiles.getTileById(Fe.key),Ye=Ie==null?void 0:Ie.wasRequested();for(let st=Fe.overscaledZ-1;st>=Ae;--st){let dt=Fe.scaledTo(st);if(de[dt.key])break;if(de[dt.key]=!0,Ie=this.getTile(dt),!Ie&&Ye&&(Ie=this._addTile(dt)),Ie){let Pe=Ie.hasData();if((Pe||!(!((N=this.map)===null||N===void 0)&&N.cancelPendingTileRequestsWhileZooming)||Ye)&&($[dt.key]=dt),Ye=Ie.wasRequested(),Pe)break}}}return $}_addTile(d){let P=this._inViewTiles.getTileById(d.key);if(P)return P;P=this._outOfViewCache.getAndRemove(d),P&&(P.resetFadeLogic(),this._setTileReloadTimer(d.key,P),P.tileID=d,this._state.initializeTileState(P,this.map?this.map.painter:null));let N=P;return P||(P=new mt(d,this._source.tileSize*d.overscaleFactor()),this._loadTile(P,d.key,P.state)),P.uses++,this._inViewTiles.setTile(d.key,P),N||this._source.fire(new i.n("dataloading",{tile:P,coord:P.tileID,dataType:"source"})),P}_setTileReloadTimer(d,P){this._clearTileReloadTimer(d);let N=P.getExpiryTimeout();N&&(this._timers[d]=setTimeout((()=>{this._reloadTile(d,"expired"),delete this._timers[d]}),N))}_clearTileReloadTimer(d){let P=this._timers[d];P&&(clearTimeout(P),delete this._timers[d])}_resetTileReloadTimers(){for(let d in this._timers)clearTimeout(this._timers[d]),delete this._timers[d];for(let d of this._inViewTiles.getAllIds()){let P=this._inViewTiles.getTileById(d);this._setTileReloadTimer(d,P)}}refreshTiles(d){for(let P of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(P);(this._inViewTiles.isIdRenderable(P)||N.state=="errored")&&d.some((H=>H.equals(N.tileID.canonical)))&&this._reloadTile(P,"expired")}}_removeTile(d){let P=this._inViewTiles.getTileById(d);P&&(P.uses--,this._inViewTiles.deleteTileById(d),this._clearTileReloadTimer(d),P.uses>0||(P.hasData()&&P.state!=="reloading"?this._outOfViewCache.add(P.tileID,P,P.getExpiryTimeout()):(P.aborted=!0,this._abortTile(P),this._unloadTile(P))))}_dataHandler(d){d.dataType==="source"&&(d.sourceDataType!=="metadata"?d.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(d.sourceDataChanged,d.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let d of this._inViewTiles.getAllIds())this._removeTile(d);this._outOfViewCache.reset()}tilesIn(d,P,N){let H=[],$=this.transform;if(!$)return H;let se=$.getCoveringTilesDetailsProvider().allowWorldCopies(),de=N?$.getCameraQueryGeometry(d):d,Ae=dt=>$.screenPointToMercatorCoordinate(dt,this.terrain),Fe=this.transformBbox(d,Ae,!se),Ie=this.transformBbox(de,Ae,!se),Ye=this.getIds(),st=i.a8.fromPoints(Ie);for(let dt of Ye){let Pe=this._inViewTiles.getTileById(dt);if(Pe.holdingForSymbolFade())continue;let Xe=se?[Pe.tileID]:[Pe.tileID.unwrapTo(-1),Pe.tileID.unwrapTo(0)],at=Math.pow(2,$.zoom-Pe.tileID.overscaledZ),xt=P*Pe.queryPadding*i.a6/Pe.tileSize/at;for(let Et of Xe){let Bt=st.map((St=>Et.getTilePoint(new i.a7(St.x,St.y))));if(Bt.expandBy(xt),Bt.intersects(kt)){let St=Fe.map(($t=>Et.getTilePoint($t))),Pt=Ie.map(($t=>Et.getTilePoint($t)));H.push({tile:Pe,tileID:se?Et:Et.unwrapTo(0),queryGeometry:St,cameraQueryGeometry:Pt,scale:at})}}}return H}transformBbox(d,P,N){let H=d.map(P);if(N){let $=i.a8.fromPoints(d);$.shrinkBy(.001*Math.min($.width(),$.height()));let se=$.map(P);i.a8.fromPoints(H).covers(se)||(H=H.map((de=>de.x>.5?new i.a7(de.x-1,de.y,de.z):de)))}return H}getVisibleCoordinates(d){let P=this.getRenderableIds(d).map((N=>this._inViewTiles.getTileById(N).tileID));return this.transform&&this.transform.populateCache(P),P}hasTransition(){return!!this._source.hasTransition()||rr(this._source.type)&&(function(d,P){if(P<=0)return!1;let N=g();for(let H of d.getAllTiles())if(H.fadeEndTime>=N)return!0;return!1})(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(d){this._rasterFadeDuration=d}setFeatureState(d,P,N){d||(d=i.ag),this._state.updateState(d,P,N)}removeFeatureState(d,P,N){d||(d=i.ag),this._state.removeFeatureState(d,P,N)}getFeatureState(d,P){return d||(d=i.ag),this._state.getState(d,P)}setDependencies(d,P,N){let H=this._inViewTiles.getTileById(d);H&&H.setDependencies(P,N)}reloadTilesForDependencies(d,P){for(let N of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(N).hasDependency(d,P)&&this._reloadTile(N,"reloading");this._outOfViewCache.filter((N=>!N.hasDependency(d,P)))}areTilesLoaded(){for(let d of this._inViewTiles.getAllTiles())if(d.state!=="loaded"&&d.state!=="errored")return!1;return!0}}Zr.maxUnderzooming=10,Zr.maxOverzooming=3;class Cn{constructor(d,P){this.reset(d,P)}reset(d,P){this.points=d||[],this._distances=[0];for(let N=1;N0?(H-se)/de:0;return this.points[$].mult(1-Ae).add(this.points[P].mult(Ae))}}function Dt(Y,d){let P=!0;return Y==="always"||Y!=="never"&&d!=="never"||(P=!1),P}class At{constructor(d,P,N){let H=this.boxCells=[],$=this.circleCells=[];this.xCellCount=Math.ceil(d/N),this.yCellCount=Math.ceil(P/N);for(let se=0;sethis.width||H<0||P>this.height)return[];let Ae=[];if(d<=0&&P<=0&&this.width<=N&&this.height<=H){if($)return[{key:null,x1:d,y1:P,x2:N,y2:H}];for(let Fe=0;Fe0}hitTestCircle(d,P,N,H,$){let se=d-N,de=d+N,Ae=P-N,Fe=P+N;if(de<0||se>this.width||Fe<0||Ae>this.height)return!1;let Ie=[];return this._forEachCell(se,Ae,de,Fe,this._queryCellCircle,Ie,{hitTest:!0,overlapMode:H,circle:{x:d,y:P,radius:N},seenUids:{box:{},circle:{}}},$),Ie.length>0}_queryCell(d,P,N,H,$,se,de,Ae){let{seenUids:Fe,hitTest:Ie,overlapMode:Ye}=de,st=this.boxCells[$],dt=1e-6;if(st!==null){let Xe=this.bboxes;for(let at of st)if(!Fe.box[at]){Fe.box[at]=!0;let xt=4*at,Et=this.boxKeys[at];if(d<=Xe[xt+2]+dt&&P<=Xe[xt+3]+dt&&N>=Xe[xt+0]-dt&&H>=Xe[xt+1]-dt&&(!Ae||Ae(Et))&&(!Ie||!Dt(Ye,Et.overlapMode))&&(se.push({key:Et,x1:Xe[xt],y1:Xe[xt+1],x2:Xe[xt+2],y2:Xe[xt+3]}),Ie))return!0}}let Pe=this.circleCells[$];if(Pe!==null){let Xe=this.circles;for(let at of Pe)if(!Fe.circle[at]){Fe.circle[at]=!0;let xt=3*at,Et=this.circleKeys[at];if(this._circleAndRectCollide(Xe[xt],Xe[xt+1],Xe[xt+2],d,P,N,H)&&(!Ae||Ae(Et))&&(!Ie||!Dt(Ye,Et.overlapMode))){let Bt=Xe[xt],St=Xe[xt+1],Pt=Xe[xt+2];if(se.push({key:Et,x1:Bt-Pt,y1:St-Pt,x2:Bt+Pt,y2:St+Pt}),Ie)return!0}}}return!1}_queryCellCircle(d,P,N,H,$,se,de,Ae){let{circle:Fe,seenUids:Ie,overlapMode:Ye}=de,st=this.boxCells[$];if(st!==null){let Pe=this.bboxes;for(let Xe of st)if(!Ie.box[Xe]){Ie.box[Xe]=!0;let at=4*Xe,xt=this.boxKeys[Xe];if(this._circleAndRectCollide(Fe.x,Fe.y,Fe.radius,Pe[at+0],Pe[at+1],Pe[at+2],Pe[at+3])&&(!Ae||Ae(xt))&&!Dt(Ye,xt.overlapMode))return se.push(!0),!0}}let dt=this.circleCells[$];if(dt!==null){let Pe=this.circles;for(let Xe of dt)if(!Ie.circle[Xe]){Ie.circle[Xe]=!0;let at=3*Xe,xt=this.circleKeys[Xe];if(this._circlesCollide(Pe[at],Pe[at+1],Pe[at+2],Fe.x,Fe.y,Fe.radius)&&(!Ae||Ae(xt))&&!Dt(Ye,xt.overlapMode))return se.push(!0),!0}}}_forEachCell(d,P,N,H,$,se,de,Ae){let Fe=this._convertToXCellCoord(d),Ie=this._convertToYCellCoord(P),Ye=this._convertToXCellCoord(N),st=this._convertToYCellCoord(H);for(let dt=Fe;dt<=Ye;dt++)for(let Pe=Ie;Pe<=st;Pe++)if($.call(this,d,P,N,H,this.xCellCount*Pe+dt,se,de,Ae))return}_convertToXCellCoord(d){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(d*this.xScale)))}_convertToYCellCoord(d){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(d*this.yScale)))}_circlesCollide(d,P,N,H,$,se){let de=H-d,Ae=$-P,Fe=N+se;return Fe*Fe>de*de+Ae*Ae}_circleAndRectCollide(d,P,N,H,$,se,de){let Ae=(se-H)/2,Fe=Math.abs(d-(H+Ae));if(Fe>Ae+N)return!1;let Ie=(de-$)/2,Ye=Math.abs(P-($+Ie));if(Ye>Ie+N)return!1;if(Fe<=Ae||Ye<=Ie)return!0;let st=Fe-Ae,dt=Ye-Ie;return st*st+dt*dt<=N*N}}function Vt(Y,d){let P=1/(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]),N=1/(d[8]*d[8]+d[9]*d[9]+d[10]*d[10]),H=d[0]*P,$=d[4]*P,se=d[8]*N,de=d[1]*P,Ae=d[5]*P,Fe=d[9]*N,Ie=d[2]*P,Ye=d[6]*P,st=d[10]*N;Y[0]=H,Y[1]=$,Y[2]=se,Y[4]=de,Y[5]=Ae,Y[6]=Fe,Y[8]=Ie,Y[9]=Ye,Y[10]=st;let dt=d[12],Pe=d[13],Xe=d[14];return Y[12]=-H*dt-de*Pe-Ie*Xe,Y[13]=-$*dt-Ae*Pe-Ye*Xe,Y[14]=-se*dt-Fe*Pe-st*Xe,Y[3]=0,Y[7]=0,Y[11]=0,Y[15]=1,Y}let Qt=i.O();function Ut(Y,d,P){let N=i.O();if(!Y){let{vecSouth:Ye,vecEast:st}=rn(d),dt=s();dt[0]=st[0],dt[1]=st[1],dt[2]=Ye[0],dt[3]=Ye[1],H=dt,(Ie=(se=($=dt)[0])*(Fe=$[3])-(Ae=$[2])*(de=$[1]))&&(H[0]=Fe*(Ie=1/Ie),H[1]=-de*Ie,H[2]=-Ae*Ie,H[3]=se*Ie),N[0]=dt[0],N[1]=dt[1],N[4]=dt[2],N[5]=dt[3]}var H,$,se,de,Ae,Fe,Ie;return i.S(N,N,[1/P,1/P,1]),N}function _r(Y,d,P,N){if(Y){let H=i.O();if(!d){let{vecSouth:$,vecEast:se}=rn(P);H[0]=se[0],H[1]=se[1],H[4]=$[0],H[5]=$[1]}return i.S(H,H,[N,N,1]),H}return P.pixelsToClipSpaceMatrix}function rn(Y){let d=Math.cos(Y.rollInRadians),P=Math.sin(Y.rollInRadians),N=Math.cos(Y.pitchInRadians),H=Math.cos(Y.bearingInRadians),$=Math.sin(Y.bearingInRadians),se=i.az();se[0]=-H*N*P-$*d,se[1]=-$*N*P+H*d;let de=i.aA(se);de<1e-9?i.aB(se):i.aC(se,se,1/de);let Ae=i.az();Ae[0]=H*N*d-$*P,Ae[1]=$*N*d+H*P;let Fe=i.aA(Ae);return Fe<1e-9?i.aB(Ae):i.aC(Ae,Ae,1/Fe),{vecEast:Ae,vecSouth:se}}function Jr(Y,d,P,N){let H;N?(H=[Y,d,N(Y,d),1],i.aE(H,H,P)):(H=[Y,d,0,1],ao(H,H,P));let $=H[3];return{point:new i.P(H[0]/$,H[1]/$),signedDistanceFromCamera:$,isOccluded:!1}}function qn(Y,d){return .5+Y/d*.5}function ri(Y,d){return Y.x>=-d[0]&&Y.x<=d[0]&&Y.y>=-d[1]&&Y.y<=d[1]}function Jn(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st){let dt=P?Y.textSizeData:Y.iconSizeData,Pe=i.aw(dt,d.transform.zoom),Xe=[256/d.width*2+1,256/d.height*2+1],at=P?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;at.clear();let xt=Y.lineVertexArray,Et=P?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Bt=d.transform.width/d.transform.height,St=!1;for(let Pt=0;PtMath.abs(P.x-d.x)*N?{useVertical:!0}:(Y===i.ax.vertical?d.yP.x)?{needsFlipping:!0}:null}function ra(Y){let{projectionContext:d,pitchedLabelPlaneMatrixInverse:P,symbol:N,fontSize:H,flip:$,keepUpright:se,glyphOffsetArray:de,dynamicLayoutVertexArray:Ae,aspectRatio:Fe,rotateToLine:Ie}=Y,Ye=H/24,st=N.lineOffsetX*Ye,dt=N.lineOffsetY*Ye,Pe;if(N.numGlyphs>1){let Xe=N.glyphStartIndex+N.numGlyphs,at=N.lineStartIndex,xt=N.lineStartIndex+N.lineLength,Et=Ii(Ye,de,st,dt,$,N,Ie,d);if(!Et)return{notEnoughRoom:!0};let Bt=oa(Et.first.point.x,Et.first.point.y,d,P),St=oa(Et.last.point.x,Et.last.point.y,d,P);if(se&&!$){let Pt=Vi(N.writingMode,Bt,St,Fe);if(Pt)return Pt}Pe=[Et.first];for(let Pt=N.glyphStartIndex+1;Pt0?Bt.point:ha(d.tileAnchorPoint,Et,at,1,d),Pt=oa(at.x,at.y,d,P),$t=oa(St.x,St.y,d,P),Ht=Vi(N.writingMode,Pt,$t,Fe);if(Ht)return Ht}let Xe=mo(Ye*de.getoffsetX(N.glyphStartIndex),st,dt,$,N.segment,N.lineStartIndex,N.lineStartIndex+N.lineLength,d,Ie);if(!Xe||d.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Pe=[Xe]}for(let Xe of Pe)i.aD(Ae,Xe.point,Xe.angle);return{}}function ha(Y,d,P,N,H){let $=Y.add(Y.sub(d)._unit()),se=Xi($.x,$.y,H).point,de=P.sub(se);return P.add(de._mult(N/de.mag()))}function va(Y,d,P){let N=d.projectionCache;if(N.projections[Y])return N.projections[Y];let H=new i.P(d.lineVertexArray.getx(Y),d.lineVertexArray.gety(Y)),$=Xi(H.x,H.y,d);if($.signedDistanceFromCamera>0)return N.projections[Y]=$.point,N.anyProjectionOccluded||(N.anyProjectionOccluded=$.isOccluded),$.point;let se=Y-P.direction;return ha(P.distanceFromAnchor===0?d.tileAnchorPoint:new i.P(d.lineVertexArray.getx(se),d.lineVertexArray.gety(se)),H,P.previousVertex,P.absOffsetX-P.distanceFromAnchor+1,d)}function Xi(Y,d,P){let N=Y+P.translation[0],H=d+P.translation[1],$;return P.pitchWithMap?($=Jr(N,H,P.pitchedLabelPlaneMatrix,P.getElevation),$.isOccluded=!1):($=P.transform.projectTileCoordinates(N,H,P.unwrappedTileID,P.getElevation),$.point.x=(.5*$.point.x+.5)*P.width,$.point.y=(.5*-$.point.y+.5)*P.height),$}function oa(Y,d,P,N){if(P.pitchWithMap){let H=[Y,d,0,1];return i.aE(H,H,N),P.transform.projectTileCoordinates(H[0]/H[3],H[1]/H[3],P.unwrappedTileID,P.getElevation).point}return{x:Y/P.width*2-1,y:1-d/P.height*2}}function Ma(Y,d,P){return P.transform.projectTileCoordinates(Y,d,P.unwrappedTileID,P.getElevation)}function Ga(Y,d,P){return Y._unit()._perp()._mult(d*P)}function ss(Y,d,P,N,H,$,se,de,Ae){if(de.projectionCache.offsets[Y])return de.projectionCache.offsets[Y];let Fe=P.add(d);if(Y+Ae.direction=H)return de.projectionCache.offsets[Y]=Fe,Fe;let Ie=va(Y+Ae.direction,de,Ae),Ye=Ga(Ie.sub(P),se,Ae.direction),st=P.add(Ye),dt=Ie.add(Ye);return de.projectionCache.offsets[Y]=i.aF($,Fe,st,dt)||Fe,de.projectionCache.offsets[Y]}function mo(Y,d,P,N,H,$,se,de,Ae){let Fe=N?Y-d:Y+d,Ie=Fe>0?1:-1,Ye=0;N&&(Ie*=-1,Ye=Math.PI),Ie<0&&(Ye+=Math.PI);let st,dt=Ie>0?$+H:$+H+1;de.projectionCache.cachedAnchorPoint?st=de.projectionCache.cachedAnchorPoint:(st=Xi(de.tileAnchorPoint.x,de.tileAnchorPoint.y,de).point,de.projectionCache.cachedAnchorPoint=st);let Pe,Xe,at=st,xt=st,Et=0,Bt=0,St=Math.abs(Fe),Pt=[],$t;for(;Et+Bt<=St;){if(dt+=Ie,dt<$||dt>=se)return null;Et+=Bt,xt=at,Xe=Pe;let Xr={absOffsetX:St,direction:Ie,distanceFromAnchor:Et,previousVertex:xt};if(at=va(dt,de,Xr),P===0)Pt.push(xt),$t=at.sub(xt);else{let Or,$r=at.sub(xt);Or=$r.mag()===0?Ga(va(dt+Ie,de,Xr).sub(at),P,Ie):Ga($r,P,Ie),Xe||(Xe=xt.add(Or)),Pe=ss(dt,Or,at,$,se,Xe,P,de,Xr),Pt.push(Xe),$t=Pe.sub(Xe)}Bt=$t.mag()}let Ht=$t._mult((St-Et)/Bt)._add(Xe||xt),dr=Ye+Math.atan2(at.y-xt.y,at.x-xt.x);return Pt.push(Ht),{point:Ht,angle:Ae?dr:0,path:Pt}}let sl=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Eo(Y,d){for(let P=0;P=1;on--)Rr.push(Er.path[on]);for(let on=1;onNn.signedDistanceFromCamera<=0))?[]:on.map((Nn=>Nn.point))}let an=[];if(Rr.length>0){let on=Rr[0].clone(),Nn=Rr[0].clone();for(let Yn=1;Yn=Xr.x&&Nn.x<=Or.x&&on.y>=Xr.y&&Nn.y<=Or.y?[Rr]:Nn.xOr.x||Nn.yOr.y?[]:i.aG([Rr],Xr.x,Xr.y,Or.x,Or.y)}for(let on of an){$r.reset(on,.25*dr);let Nn=0;Nn=$r.length<=.5*dr?1:Math.ceil($r.paddedLength/Lr)+1;for(let Yn=0;Yn{let Ae=Jr(de.x,de.y,se,$.getElevation),Fe=$.transform.projectTileCoordinates(Ae.point.x,Ae.point.y,$.unwrappedTileID,$.getElevation);return Fe.point.x=(.5*Fe.point.x+.5)*$.width,Fe.point.y=(.5*-Fe.point.y+.5)*$.height,Fe}))})(d,P);return(function(H){let $=0,se=0,de=0,Ae=0;for(let Fe=0;Fese&&(se=Ae,$=de));return H.slice($,$+se)})(N)}queryRenderedSymbols(d){if(d.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let P=[],N=new i.a8;for(let Ye of d){let st=new i.P(Ye.x+Da,Ye.y+Da);N.extend(st),P.push(st)}let{minX:H,minY:$,maxX:se,maxY:de}=N,Ae=this.grid.query(H,$,se,de).concat(this.ignoredGrid.query(H,$,se,de)),Fe={},Ie={};for(let Ye of Ae){let st=Ye.key;if(Fe[st.bucketInstanceId]===void 0&&(Fe[st.bucketInstanceId]={}),Fe[st.bucketInstanceId][st.featureIndex])continue;let dt=[new i.P(Ye.x1,Ye.y1),new i.P(Ye.x2,Ye.y1),new i.P(Ye.x2,Ye.y2),new i.P(Ye.x1,Ye.y2)];i.aH(P,dt)&&(Fe[st.bucketInstanceId][st.featureIndex]=!0,Ie[st.bucketInstanceId]===void 0&&(Ie[st.bucketInstanceId]=[]),Ie[st.bucketInstanceId].push(st.featureIndex))}return Ie}insertCollisionBox(d,P,N,H,$,se){(N?this.ignoredGrid:this.grid).insert({bucketInstanceId:H,featureIndex:$,collisionGroupID:se,overlapMode:P},d[0],d[1],d[2],d[3])}insertCollisionCircles(d,P,N,H,$,se){let de=N?this.ignoredGrid:this.grid,Ae={bucketInstanceId:H,featureIndex:$,collisionGroupID:se,overlapMode:P};for(let Fe=0;Fe=this.screenRightBoundary||Hthis.screenBottomBoundary}isInsideGrid(d,P,N,H){return N>=0&&d=0&&Pthis.projectAndGetPerspectiveRatio(Lr.x,Lr.y,H,Fe,Ye)));Tr=Rr.some((Lr=>!Lr.isOccluded)),Er=Rr.map((Lr=>new i.P(Lr.x,Lr.y)))}else Tr=!0;return{box:i.aI(Er),allPointsOccluded:!Tr}}}class bo{constructor(d,P,N,H){this.opacity=d?Math.max(0,Math.min(1,d.opacity+(d.placed?P:-P))):H&&N?1:0,this.placed=N}isHidden(){return this.opacity===0&&!this.placed}}class Zs{constructor(d,P,N,H,$){this.text=new bo(d?d.text:null,P,N,$),this.icon=new bo(d?d.icon:null,P,H,$)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class su{constructor(d,P,N){this.text=d,this.icon=P,this.skipFade=N}}class fc{constructor(d,P,N,H,$){this.bucketInstanceId=d,this.featureIndex=P,this.sourceLayerIndex=N,this.bucketIndex=H,this.tileID=$}}class Af{constructor(d){this.crossSourceCollisions=d,this.maxGroupID=0,this.collisionGroups={}}get(d){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[d]){let P=++this.maxGroupID;this.collisionGroups[d]={ID:P,predicate:N=>N.collisionGroupID===P}}return this.collisionGroups[d]}}function ut(Y,d,P,N,H){let{horizontalAlign:$,verticalAlign:se}=i.aP(Y);return new i.P(-($-.5)*d+N[0]*H,-(se-.5)*P+N[1]*H)}class Jt{constructor(d,P,N,H,$){this.transform=d.clone(),this.terrain=P,this.collisionIndex=new bl(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=N,this.retainedQueryData={},this.collisionGroups=new Af(H),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=$,$&&($.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(d){let P=this.terrain;return P?(N,H)=>P.getElevation(d,N,H):null}getBucketParts(d,P,N,H){let $=N.getBucket(P),se=N.latestFeatureIndex;if(!$||!se||P.id!==$.layerIds[0])return;let de=N.collisionBoxArray,Ae=$.layers[0].layout,Fe=$.layers[0].paint,Ie=Math.pow(2,this.transform.zoom-N.tileID.overscaledZ),Ye=N.tileSize/i.a6,st=N.tileID.toUnwrapped(),dt=Ae.get("text-rotation-alignment")==="map",Pe=i.aK(N,1,this.transform.zoom),Xe=i.aL(this.collisionIndex.transform,N,Fe.get("text-translate"),Fe.get("text-translate-anchor")),at=i.aL(this.collisionIndex.transform,N,Fe.get("icon-translate"),Fe.get("icon-translate-anchor")),xt=Ut(dt,this.transform,Pe);this.retainedQueryData[$.bucketInstanceId]=new fc($.bucketInstanceId,se,$.sourceLayerIndex,$.index,N.tileID);let Et={bucket:$,layout:Ae,translationText:Xe,translationIcon:at,unwrappedTileID:st,pitchedLabelPlaneMatrix:xt,scale:Ie,textPixelRatio:Ye,holdingForFade:N.holdingForSymbolFade(),collisionBoxArray:de,partiallyEvaluatedTextSize:i.aw($.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get($.sourceID)};if(H)for(let Bt of $.sortKeyRanges){let{sortKey:St,symbolInstanceStart:Pt,symbolInstanceEnd:$t}=Bt;d.push({sortKey:St,symbolInstanceStart:Pt,symbolInstanceEnd:$t,parameters:Et})}else d.push({symbolInstanceStart:0,symbolInstanceEnd:$.symbolInstances.length,parameters:Et})}attemptAnchorPlacement(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,dt,Pe,Xe,at,xt,Et,Bt,St){var Pt,$t,Ht;let dr=i.aM[d.textAnchor],Xr=[d.textOffset0,d.textOffset1],Or=ut(dr,N,H,Xr,$),$r=this.collisionIndex.placeCollisionBox(P,st,Ae,Fe,Ie,de,se,at,Ye.predicate,Bt,Or,St);if((!Et||this.collisionIndex.placeCollisionBox(Et,st,Ae,Fe,Ie,de,se,xt,Ye.predicate,Bt,Or,St).placeable)&&$r.placeable){let Er;if(!((Pt=this.prevPlacement)===null||Pt===void 0)&&Pt.variableOffsets[dt.crossTileID]&&(!((Ht=($t=this.prevPlacement)===null||$t===void 0?void 0:$t.placements[dt.crossTileID])===null||Ht===void 0)&&Ht.text)&&(Er=this.prevPlacement.variableOffsets[dt.crossTileID].anchor),dt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[dt.crossTileID]={textOffset:Xr,width:N,height:H,anchor:dr,textBoxScale:$,prevAnchor:Er},this.markUsedJustification(Pe,dr,dt,Xe),Pe.allowVerticalPlacement&&(this.markUsedOrientation(Pe,Xe,dt),this.placedOrientations[dt.crossTileID]=Xe),{shift:Or,placedGlyphBoxes:$r}}}placeLayerBucketPart(d,P,N){let{bucket:H,layout:$,translationText:se,translationIcon:de,unwrappedTileID:Ae,pitchedLabelPlaneMatrix:Fe,textPixelRatio:Ie,holdingForFade:Ye,collisionBoxArray:st,partiallyEvaluatedTextSize:dt,collisionGroup:Pe}=d.parameters,Xe=$.get("text-optional"),at=$.get("icon-optional"),xt=i.aN($,"text-overlap","text-allow-overlap"),Et=xt==="always",Bt=i.aN($,"icon-overlap","icon-allow-overlap"),St=Bt==="always",Pt=$.get("text-rotation-alignment")==="map",$t=$.get("text-pitch-alignment")==="map",Ht=$.get("icon-text-fit")!=="none",dr=$.get("symbol-z-order")==="viewport-y",Xr=Et&&(St||!H.hasIconData()||at),Or=St&&(Et||!H.hasTextData()||Xe);!H.collisionArrays&&st&&H.deserializeCollisionBoxes(st);let $r=this.retainedQueryData[H.bucketInstanceId].tileID,Er=this._getTerrainElevationFunc($r),Tr=this.transform.getFastPathSimpleProjectionMatrix($r),Rr=(Lr,an,on)=>{var Nn,Yn;if(P[Lr.crossTileID])return;if(Ye)return void(this.placements[Lr.crossTileID]=new su(!1,!1,!1));let yi=!1,Sn=!1,An=!0,li=null,Vn={box:null,placeable:!1,offscreen:null,occluded:!1},jn={placeable:!1},Wn=null,si=null,zi=null,da=0,ui=0,Li=0;an.textFeatureIndex?da=an.textFeatureIndex:Lr.useRuntimeCollisionCircles&&(da=Lr.featureIndex),an.verticalTextFeatureIndex&&(ui=an.verticalTextFeatureIndex);let Ki=an.textBox;if(Ki){let Ss=_o=>{let po=i.ax.horizontal;if(H.allowVerticalPlacement&&!_o&&this.prevPlacement){let Xo=this.prevPlacement.placedOrientations[Lr.crossTileID];Xo&&(this.placedOrientations[Lr.crossTileID]=Xo,po=Xo,this.markUsedOrientation(H,po,Lr))}return po},Na=(_o,po)=>{if(H.allowVerticalPlacement&&Lr.numVerticalGlyphVertices>0&&an.verticalTextBox){for(let Xo of H.writingModes)if(Xo===i.ax.vertical?(Vn=po(),jn=Vn):Vn=_o(),Vn==null?void 0:Vn.placeable)break}else Vn=_o()},Ns=Lr.textAnchorOffsetStartIndex,vo=Lr.textAnchorOffsetEndIndex;if(vo===Ns){let _o=(po,Xo)=>{let no=this.collisionIndex.placeCollisionBox(po,xt,Ie,$r,Ae,$t,Pt,se,Pe.predicate,Er,void 0,Tr);return no!=null&&no.placeable&&(this.markUsedOrientation(H,Xo,Lr),this.placedOrientations[Lr.crossTileID]=Xo),no};Na((()=>_o(Ki,i.ax.horizontal)),(()=>{let po=an.verticalTextBox;return H.allowVerticalPlacement&&Lr.numVerticalGlyphVertices>0&&po?_o(po,i.ax.vertical):{box:null,offscreen:null}})),Ss(Vn==null?void 0:Vn.placeable)}else{let _o=i.aM[(Yn=(Nn=this.prevPlacement)===null||Nn===void 0?void 0:Nn.variableOffsets[Lr.crossTileID])===null||Yn===void 0?void 0:Yn.anchor],po=(no,Us,ql)=>{let Ta=no.x2-no.x1,vu=no.y2-no.y1,ys=Lr.textBoxScale,xc=Ht&&Bt==="never"?Us:null,Zl=null,$l=xt==="never"?1:2,xa="never";_o&&$l++;for(let uo=0;uo<$l;uo++){for(let Es=Ns;Espo(Ki,an.iconBox,i.ax.horizontal)),(()=>{let no=an.verticalTextBox;return H.allowVerticalPlacement&&!(Vn!=null&&Vn.placeable)&&Lr.numVerticalGlyphVertices>0&&no?po(no,an.verticalIconBox,i.ax.vertical):{box:null,occluded:!0,offscreen:null}})),Vn&&(yi=Vn.placeable,An=Vn.offscreen);let Xo=Ss(Vn==null?void 0:Vn.placeable);if(!yi&&this.prevPlacement){let no=this.prevPlacement.variableOffsets[Lr.crossTileID];no&&(this.variableOffsets[Lr.crossTileID]=no,this.markUsedJustification(H,no.anchor,Lr,Xo))}}}if(Wn=Vn,yi=Wn==null?void 0:Wn.placeable,An=Wn==null?void 0:Wn.offscreen,Lr.useRuntimeCollisionCircles&&Lr.centerJustifiedTextSymbolIndex>=0){let Ss=H.text.placedSymbolArray.get(Lr.centerJustifiedTextSymbolIndex),Na=i.ay(H.textSizeData,dt,Ss),Ns=$.get("text-padding");si=this.collisionIndex.placeCollisionCircles(xt,Ss,H.lineVertexArray,H.glyphOffsetArray,Na,Ae,Fe,N,$t,Pe.predicate,Lr.collisionCircleDiameter,Ns,se,Er),si.circles.length&&si.collisionDetected&&!N&&i.w("Collisions detected, but collision boxes are not shown"),yi=Et||si.circles.length>0&&!si.collisionDetected,An&&(An=si.offscreen)}if(an.iconFeatureIndex&&(Li=an.iconFeatureIndex),an.iconBox){let Ss=Na=>this.collisionIndex.placeCollisionBox(Na,Bt,Ie,$r,Ae,$t,Pt,de,Pe.predicate,Er,Ht&&li?li:void 0,Tr);jn&&jn.placeable&&an.verticalIconBox?(zi=Ss(an.verticalIconBox),Sn=zi.placeable):(zi=Ss(an.iconBox),Sn=zi.placeable),An&&(An=zi.offscreen)}let ca=Xe||Lr.numHorizontalGlyphVertices===0&&Lr.numVerticalGlyphVertices===0,Ia=at||Lr.numIconVertices===0;ca||Ia?Ia?ca||Sn&&(Sn=yi):yi=Sn&&yi:Sn=yi=Sn&&yi;let Os=Sn&&zi.placeable;if(yi&&Wn.placeable&&this.collisionIndex.insertCollisionBox(Wn.box,xt,$.get("text-ignore-placement"),H.bucketInstanceId,jn&&jn.placeable&&ui?ui:da,Pe.ID),Os&&this.collisionIndex.insertCollisionBox(zi.box,Bt,$.get("icon-ignore-placement"),H.bucketInstanceId,Li,Pe.ID),si&&yi&&this.collisionIndex.insertCollisionCircles(si.circles,xt,$.get("text-ignore-placement"),H.bucketInstanceId,da,Pe.ID),N&&this.storeCollisionData(H.bucketInstanceId,on,an,Wn,zi,si),Lr.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(H.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Lr.crossTileID]=new su((yi||Xr)&&!(Wn!=null&&Wn.occluded),(Sn||Or)&&!(zi!=null&&zi.occluded),An||H.justReloaded),P[Lr.crossTileID]=!0};if(dr){if(d.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Lr=H.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let an=Lr.length-1;an>=0;--an){let on=Lr[an];Rr(H.symbolInstances.get(on),H.collisionArrays[on],on)}}else for(let Lr=d.symbolInstanceStart;Lr=0&&(d.text.placedSymbolArray.get(de).crossTileID=$>=0&&de!==$?0:N.crossTileID)}markUsedOrientation(d,P,N){let H=P===i.ax.horizontal||P===i.ax.horizontalOnly?P:0,$=P===i.ax.vertical?P:0,se=[N.leftJustifiedTextSymbolIndex,N.centerJustifiedTextSymbolIndex,N.rightJustifiedTextSymbolIndex];for(let de of se)d.text.placedSymbolArray.get(de).placedOrientation=H;N.verticalPlacedTextSymbolIndex&&(d.text.placedSymbolArray.get(N.verticalPlacedTextSymbolIndex).placedOrientation=$)}commit(d){this.commitTime=d,this.zoomAtLastRecencyCheck=this.transform.zoom;let P=this.prevPlacement,N=!1;this.prevZoomAdjustment=P?P.zoomAdjustment(this.transform.zoom):0;let H=P?P.symbolFadeChange(d):1,$=P?P.opacities:{},se=P?P.variableOffsets:{},de=P?P.placedOrientations:{};for(let Ae in this.placements){let Fe=this.placements[Ae],Ie=$[Ae];Ie?(this.opacities[Ae]=new Zs(Ie,H,Fe.text,Fe.icon),N||(N=Fe.text!==Ie.text.placed),N||(N=Fe.icon!==Ie.icon.placed)):(this.opacities[Ae]=new Zs(null,H,Fe.text,Fe.icon,Fe.skipFade),N||(N=Fe.text||Fe.icon))}for(let Ae in $){let Fe=$[Ae];if(!this.opacities[Ae]){let Ie=new Zs(Fe,H,!1,!1);Ie.isHidden()||(this.opacities[Ae]=Ie,N||(N=Fe.text.placed),N||(N=Fe.icon.placed))}}for(let Ae in se)this.variableOffsets[Ae]||!this.opacities[Ae]||this.opacities[Ae].isHidden()||(this.variableOffsets[Ae]=se[Ae]);for(let Ae in de)this.placedOrientations[Ae]||!this.opacities[Ae]||this.opacities[Ae].isHidden()||(this.placedOrientations[Ae]=de[Ae]);if(P&&P.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");N?this.lastPlacementChangeTime=d:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=P?P.lastPlacementChangeTime:d)}updateLayerOpacities(d,P){let N={};for(let H of P){let $=H.getBucket(d);$&&H.latestFeatureIndex&&d.id===$.layerIds[0]&&this.updateBucketOpacities($,H.tileID,N,H.collisionBoxArray)}}updateBucketOpacities(d,P,N,H){d.hasTextData()&&(d.text.opacityVertexArray.clear(),d.text.hasVisibleVertices=!1),d.hasIconData()&&(d.icon.opacityVertexArray.clear(),d.icon.hasVisibleVertices=!1),d.hasIconCollisionBoxData()&&d.iconCollisionBox.collisionVertexArray.clear(),d.hasTextCollisionBoxData()&&d.textCollisionBox.collisionVertexArray.clear();let $=d.layers[0],se=$.layout,de=new Zs(null,0,!1,!1,!0),Ae=se.get("text-allow-overlap"),Fe=se.get("icon-allow-overlap"),Ie=$._unevaluatedLayout.hasValue("text-variable-anchor")||$._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ye=se.get("text-rotation-alignment")==="map",st=se.get("text-pitch-alignment")==="map",dt=se.get("icon-text-fit")!=="none",Pe=new Zs(null,0,Ae&&(Fe||!d.hasIconData()||se.get("icon-optional")),Fe&&(Ae||!d.hasTextData()||se.get("text-optional")),!0);!d.collisionArrays&&H&&(d.hasIconCollisionBoxData()||d.hasTextCollisionBoxData())&&d.deserializeCollisionBoxes(H);let Xe=(xt,Et,Bt)=>{for(let St=0;St0,dr=this.placedOrientations[Et.crossTileID],Xr=dr===i.ax.vertical,Or=dr===i.ax.horizontal||dr===i.ax.horizontalOnly;if(Bt>0||St>0){let Er=Qn($t.text);Xe(d.text,Bt,Xr?Ai:Er),Xe(d.text,St,Or?Ai:Er);let Tr=$t.text.isHidden(),Rr=[Et.rightJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.leftJustifiedTextSymbolIndex];for(let on of Rr)on>=0&&(d.text.placedSymbolArray.get(on).hidden=Tr||Xr?1:0);Et.verticalPlacedTextSymbolIndex>=0&&(d.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).hidden=Tr||Or?1:0);let Lr=this.variableOffsets[Et.crossTileID];Lr&&this.markUsedJustification(d,Lr.anchor,Et,dr);let an=this.placedOrientations[Et.crossTileID];an&&(this.markUsedJustification(d,"left",Et,an),this.markUsedOrientation(d,an,Et))}if(Ht){let Er=Qn($t.icon),Tr=!(dt&&Et.verticalPlacedIconSymbolIndex&&Xr);Et.placedIconSymbolIndex>=0&&(Xe(d.icon,Et.numIconVertices,Tr?Er:Ai),d.icon.placedSymbolArray.get(Et.placedIconSymbolIndex).hidden=$t.icon.isHidden()),Et.verticalPlacedIconSymbolIndex>=0&&(Xe(d.icon,Et.numVerticalIconVertices,Tr?Ai:Er),d.icon.placedSymbolArray.get(Et.verticalPlacedIconSymbolIndex).hidden=$t.icon.isHidden())}let $r=at!=null&&at.has(xt)?at.get(xt):{text:null,icon:null};if(d.hasIconCollisionBoxData()||d.hasTextCollisionBoxData()){let Er=d.collisionArrays[xt];if(Er){let Tr=new i.P(0,0);if(Er.textBox||Er.verticalTextBox){let Rr=!0;if(Ie){let Lr=this.variableOffsets[Pt];Lr?(Tr=ut(Lr.anchor,Lr.width,Lr.height,Lr.textOffset,Lr.textBoxScale),Ye&&Tr._rotate(st?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Rr=!1}if(Er.textBox||Er.verticalTextBox){let Lr;Er.textBox&&(Lr=Xr),Er.verticalTextBox&&(Lr=Or),er(d.textCollisionBox.collisionVertexArray,$t.text.placed,!Rr||Lr,$r.text,Tr.x,Tr.y)}}if(Er.iconBox||Er.verticalIconBox){let Rr=!!(!Or&&Er.verticalIconBox),Lr;Er.iconBox&&(Lr=Rr),Er.verticalIconBox&&(Lr=!Rr),er(d.iconCollisionBox.collisionVertexArray,$t.icon.placed,Lr,$r.icon,dt?Tr.x:0,dt?Tr.y:0)}}}}if(d.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[d.bucketInstanceId]&&(this.retainedQueryData[d.bucketInstanceId].featureSortOrder=d.featureSortOrder),d.hasTextData()&&d.text.opacityVertexBuffer&&d.text.opacityVertexBuffer.updateData(d.text.opacityVertexArray),d.hasIconData()&&d.icon.opacityVertexBuffer&&d.icon.opacityVertexBuffer.updateData(d.icon.opacityVertexArray),d.hasIconCollisionBoxData()&&d.iconCollisionBox.collisionVertexBuffer&&d.iconCollisionBox.collisionVertexBuffer.updateData(d.iconCollisionBox.collisionVertexArray),d.hasTextCollisionBoxData()&&d.textCollisionBox.collisionVertexBuffer&&d.textCollisionBox.collisionVertexBuffer.updateData(d.textCollisionBox.collisionVertexArray),d.text.opacityVertexArray.length!==d.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${d.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${d.text.layoutVertexArray.length}) / 4`);if(d.icon.opacityVertexArray.length!==d.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${d.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${d.icon.layoutVertexArray.length}) / 4`);d.bucketInstanceId in this.collisionCircleArrays&&(d.collisionCircleArray=this.collisionCircleArrays[d.bucketInstanceId],delete this.collisionCircleArrays[d.bucketInstanceId])}symbolFadeChange(d){return this.fadeDuration===0?1:(d-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(d){return Math.max(0,(this.transform.zoom-d)/1.5)}hasTransitions(d){return this.stale||d-this.lastPlacementChangeTimed}setStale(){this.stale=!0}}function er(Y,d,P,N,H,$){N&&N.length!==0||(N=[0,0,0,0]);let se=N[0]-Da,de=N[1]-Da,Ae=N[2]-Da,Fe=N[3]-Da;Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,se,de),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,Ae,de),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,Ae,Fe),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,se,Fe)}let wr=Math.pow(2,25),nn=Math.pow(2,24),Dr=Math.pow(2,17),bn=Math.pow(2,16),Yr=Math.pow(2,9),Tn=Math.pow(2,8),Kn=Math.pow(2,1);function Qn(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;let d=Y.placed?1:0,P=Math.floor(127*Y.opacity);return P*wr+d*nn+P*Dr+d*bn+P*Yr+d*Tn+P*Kn+d}let Ai=0;class Ji{constructor(d){this._sortAcrossTiles=d.layout.get("symbol-z-order")!=="viewport-y"&&!d.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(d,P,N,H,$){let se=this._bucketParts;for(;this._currentTileIndexde.sortKey-Ae.sortKey)));this._currentPartIndex!this._forceFullPlacement&&g()-H>2;for(;this._currentPlacementIndex>=0;){let se=P[d[this._currentPlacementIndex]],de=this.placement.collisionIndex.transform.zoom;if(i.aQ(se)&&se.layout&&(!se.minzoom||se.minzoom<=de)&&(!se.maxzoom||se.maxzoom>de)){if(this._inProgressLayer||(this._inProgressLayer=new Ji(se)),this._inProgressLayer.continuePlacement(N[se.source],this.placement,this._showCollisionBoxes,se,$))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(d){return this.placement.commit(d),this.placement}}let ii=512/i.a6/2;class Za{constructor(d,P,N){this.tileID=d,this.bucketInstanceId=N,this._symbolsByKey={};let H=new Map;for(let $=0;$({x:Math.floor(Ae.anchorX*ii),y:Math.floor(Ae.anchorY*ii)}))),crossTileIDs:se.map((Ae=>Ae.crossTileID))};if(de.positions.length>128){let Ae=new i.aR(de.positions.length,16,Uint16Array);for(let{x:Fe,y:Ie}of de.positions)Ae.add(Fe,Ie);Ae.finish(),delete de.positions,de.index=Ae}this._symbolsByKey[$]=de}}getScaledCoordinates(d,P){let{x:N,y:H,z:$}=this.tileID.canonical,{x:se,y:de,z:Ae}=P.canonical,Fe=ii/Math.pow(2,Ae-$),Ie=(de*i.a6+d.anchorY)*Fe,Ye=H*i.a6*ii;return{x:Math.floor((se*i.a6+d.anchorX)*Fe-N*i.a6*ii),y:Math.floor(Ie-Ye)}}findMatches(d,P,N){let H=this.tileID.canonical.zd))}}class ja{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class qo{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(d){let P=Math.round((d-this.lng)/360);if(P!==0)for(let N in this.indexes){let H=this.indexes[N],$={};for(let se in H){let de=H[se];de.tileID=de.tileID.unwrapTo(de.tileID.wrap+P),$[de.tileID.key]=de}this.indexes[N]=$}this.lng=d}addBucket(d,P,N){var H,$,se;if(!((H=this.indexes[d.overscaledZ])===null||H===void 0)&&H[d.key]){if(this.indexes[d.overscaledZ][d.key].bucketInstanceId===P.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(d.overscaledZ,this.indexes[d.overscaledZ][d.key])}for(let Ae=0;Aed.overscaledZ)for(let Ie in Fe){let Ye=Fe[Ie];Ye.tileID.isChildOf(d)&&Ye.findMatches(P.symbolInstances,d,de)}else{let Ie=Fe[d.scaledTo(Number(Ae)).key];Ie&&Ie.findMatches(P.symbolInstances,d,de)}}for(let Ae=0;Ae 32766.5)) {return 0.0;} +#endif vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; #else return 0.0; #endif -}`),background:rt(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:Ni("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:Ni("",`#define GLOBE_RADIUS 6371008.8 +uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos +);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); +if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len +);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:Ni(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:rt(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; +}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:Ni(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:rt(`varying vec3 v_data;varying float v_visibility; +}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Ni(`in vec3 v_data;in float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur @@ -2803,11 +2809,11 @@ void main() { #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); +vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; +}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur @@ -2823,16 +2829,32 @@ void main(void) { #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:rt("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:rt(`uniform highp float u_intensity;varying vec2 v_extrude; +vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { +#ifdef GLOBE +vec3 center_vector=projectToSphere(circle_center); +#endif +float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else { +#ifdef GLOBE +vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); +#else +vec4 projected_center=projectTileWithElevation(circle_center,ele); +#endif +corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);} +#ifdef GLOBE +vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); +#else +gl_Position=projectTileWithElevation(corner_position,ele); +#endif +} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Ni(Ka,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:Ni(`uniform highp float u_intensity;in vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight -float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); +float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; +}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; @@ -2840,42 +2862,78 @@ const highp float ZERO=1.0/255.0/16.0; void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius -vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:rt(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; +vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0); +#ifdef GLOBE +vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); +#else +gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); +#endif +}`),heatmapTexture:Ni(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(0.0); +fragColor=vec4(0.0); +#endif +}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Ni("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Ni("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:Ni(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else +{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0)); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:Ni("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:Ni(Ka,`in vec2 a_pos;void main() { +#ifdef GLOBE +gl_Position=projectTileFor3D(a_pos,0.0); +#else +gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:rt("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 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_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:rt("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:rt("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:rt(`#pragma mapbox: define highp vec4 color +}`),fill:Ni(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity -gl_FragColor=color*opacity; +fragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +}`,`uniform vec2 u_fill_translate;in vec2 a_pos; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:rt(`varying vec2 v_pos; +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:Ni(`in vec2 v_pos; +#ifdef GLOBE +in float v_depth; +#endif #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity -float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; +#ifdef GLOBE +out float v_depth; #endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:rt(`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; +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}`),fillOutlinePattern:Ni(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; +#ifdef GLOBE +in float v_depth; +#endif #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2883,11 +2941,17 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; +vec2 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=texture(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=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; +#ifdef GLOBE +out float v_depth; #endif -}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2899,10 +2963,14 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:rt(`#ifdef GL_ES +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}`),fillPattern:Ni(`#ifdef GL_ES precision highp float; #endif -uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2910,11 +2978,11 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; +vec2 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2926,15 +2994,15 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:rt(`varying vec4 v_color;void main() {gl_FragColor=v_color; +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);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);}`),fillExtrusion:Ni(`in vec4 v_color;void main() {fragColor=v_color; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`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; +}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D -attribute vec2 a_centroid; +in vec2 a_centroid; #endif -varying vec4 v_color; +out vec4 v_color; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color @@ -2948,7 +3016,17 @@ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_off #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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;}`),fillExtrusionPattern:rt(`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; +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +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;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0); +#ifdef GLOBE +mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); +#endif +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;}`),fillExtrusionPattern:Ni(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from @@ -2962,15 +3040,18 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; +vec2 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=texture(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=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D -attribute vec2 a_centroid; +in vec2 a_centroid; +#endif +#ifdef GLOBE +out vec3 v_sphere_pos; #endif -varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from @@ -2990,22 +3071,38 @@ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_off #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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 +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos -: 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;}`),hillshadePrepare:rt(`#ifdef GL_ES +: vec2(edgedistance,elevation*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;}`),hillshadePrepare:Ni(`#ifdef GL_ES precision highp float; #endif -uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,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); +uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;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 exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,"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;}"),hillshade:rt(`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; +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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;}"),hillshade:Ni(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; #define PI 3.141592653589793 -void 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; +#define STANDARD 0 +#define COMBINED 1 +#define IGOR 2 +#define MULTIDIRECTIONAL 3 +#define BASIC 4 +float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;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_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else +{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else +{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:Ni(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; +#ifdef GLOBE +in float v_depth; #endif -}`,"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;}"),line:rt(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3013,13 +3110,19 @@ void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -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);gl_FragColor=color*(alpha*opacity); +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);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 -attribute 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; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3033,25 +3136,37 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float 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 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),lineGradient:Ni(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; +#ifdef GLOBE +in float v_depth; #endif -v_width2=vec2(outset,inset);}`),lineGradient:rt(`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 vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -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);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 -attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth @@ -3063,16 +3178,22 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),linePattern:rt(`#ifdef GL_ES +v_width2=vec2(outset,inset);}`),linePattern:Ni(`#ifdef GL_ES precision highp float; #endif -uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width; +#ifdef GLOBE +in float v_depth; +#endif #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from @@ -3086,14 +3207,20 @@ void main() { #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset @@ -3115,32 +3242,48 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -float 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 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Ni(`uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; +#ifdef GLOBE +in float v_depth; #endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:rt(`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; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth -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 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); +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +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 sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -attribute 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; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3148,6 +3291,8 @@ attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur @@ -3156,48 +3301,112 @@ void main() { #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth -float 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; +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +float 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:Ni(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +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);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} #endif -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);}`),raster:rt(`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); #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; +#ifdef GLOBE +out float v_depth; #endif -}`,"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;}"),symbolIcon:rt(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to void main() { +#pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +float 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;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),raster:Ni(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in 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=texture(u_image0,v_pos0);vec4 color1=texture(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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5; +#ifdef GLOBE +if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} +#endif +v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:Ni(`uniform sampler2D u_texture;in vec2 v_tex;in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_total_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;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;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:rt(`#define SDF_PX 8.0 -uniform 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; +u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}`),symbolSDF:Ni(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -float 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 inner_edge=(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);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); +float 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 total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -3209,32 +3418,34 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:rt(`#define SDF_PX 8.0 +u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:Ni(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 -uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +float total_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -3246,60 +3457,70 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:rt("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:rt("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:rt("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:rt("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function rt(K,b){let I=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,G=b.match(/attribute ([\w]+) ([\w]+)/g),H=K.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),$=b.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),xe=$?$.concat(H):H,ke={};return{fragmentSource:K=K.replace(I,((Ne,et,bt,Tt,zt)=>(ke[zt]=!0,et==="define"?` -#ifndef HAS_UNIFORM_u_${zt} -varying ${bt} ${Tt} ${zt}; +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,total_opacity,is_sdf);}`),terrain:Ni("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ni("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Ni("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:Ni("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:Ni(`#ifdef GL_ES +precision highp float; +#endif +in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 +);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:Ni("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Ni(Y,d){let P=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,N=d.match(/in ([\w]+) ([\w]+)/g),H=Y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),$=d.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),se=$?$.concat(H):H,de={};return{fragmentSource:Y=Y.replace(P,((Ae,Fe,Ie,Ye,st)=>(de[st]=!0,Fe==="define"?` +#ifndef HAS_UNIFORM_u_${st} +in ${Ie} ${Ye} ${st}; #else -uniform ${bt} ${Tt} u_${zt}; +uniform ${Ie} ${Ye} u_${st}; #endif `:` -#ifdef HAS_UNIFORM_u_${zt} - ${bt} ${Tt} ${zt} = u_${zt}; -#endif -`))),vertexSource:b=b.replace(I,((Ne,et,bt,Tt,zt)=>{let Yt=Tt==="float"?"vec2":"vec4",Q=zt.match(/color/)?"color":Yt;return ke[zt]?et==="define"?` -#ifndef HAS_UNIFORM_u_${zt} -uniform lowp float u_${zt}_t; -attribute ${bt} ${Yt} a_${zt}; -varying ${bt} ${Tt} ${zt}; +#ifdef HAS_UNIFORM_u_${st} + ${Ie} ${Ye} ${st} = u_${st}; +#endif +`))),vertexSource:d=d.replace(P,((Ae,Fe,Ie,Ye,st)=>{let dt=Ye==="float"?"vec2":"vec4",Pe=st.match(/color/)?"color":dt;return de[st]?Fe==="define"?` +#ifndef HAS_UNIFORM_u_${st} +uniform lowp float u_${st}_t; +in ${Ie} ${dt} a_${st}; +out ${Ie} ${Ye} ${st}; #else -uniform ${bt} ${Tt} u_${zt}; +uniform ${Ie} ${Ye} u_${st}; #endif -`:Q==="vec4"?` -#ifndef HAS_UNIFORM_u_${zt} - ${zt} = a_${zt}; +`:Pe==="vec4"?` +#ifndef HAS_UNIFORM_u_${st} + ${st} = a_${st}; #else - ${bt} ${Tt} ${zt} = u_${zt}; + ${Ie} ${Ye} ${st} = u_${st}; #endif `:` -#ifndef HAS_UNIFORM_u_${zt} - ${zt} = unpack_mix_${Q}(a_${zt}, u_${zt}_t); +#ifndef HAS_UNIFORM_u_${st} + ${st} = unpack_mix_${Pe}(a_${st}, u_${st}_t); #else - ${bt} ${Tt} ${zt} = u_${zt}; + ${Ie} ${Ye} ${st} = u_${st}; #endif -`:et==="define"?` -#ifndef HAS_UNIFORM_u_${zt} -uniform lowp float u_${zt}_t; -attribute ${bt} ${Yt} a_${zt}; +`:Fe==="define"?` +#ifndef HAS_UNIFORM_u_${st} +uniform lowp float u_${st}_t; +in ${Ie} ${dt} a_${st}; #else -uniform ${bt} ${Tt} u_${zt}; +uniform ${Ie} ${Ye} u_${st}; #endif -`:Q==="vec4"?` -#ifndef HAS_UNIFORM_u_${zt} - ${bt} ${Tt} ${zt} = a_${zt}; +`:Pe==="vec4"?` +#ifndef HAS_UNIFORM_u_${st} + ${Ie} ${Ye} ${st} = a_${st}; #else - ${bt} ${Tt} ${zt} = u_${zt}; + ${Ie} ${Ye} ${st} = u_${st}; #endif `:` -#ifndef HAS_UNIFORM_u_${zt} - ${bt} ${Tt} ${zt} = unpack_mix_${Q}(a_${zt}, u_${zt}_t); +#ifndef HAS_UNIFORM_u_${st} + ${Ie} ${Ye} ${st} = unpack_mix_${Pe}(a_${st}, u_${st}_t); #else - ${bt} ${Tt} ${zt} = u_${zt}; + ${Ie} ${Ye} ${st} = u_${st}; #endif -`})),staticAttributes:G,staticUniforms:xe}}class Xt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(b,I,G,H,$,xe,ke,Ne,et){this.context=b;let bt=this.boundPaintVertexBuffers.length!==H.length;for(let Tt=0;!bt&&Tt({u_matrix:K,u_texture:0,u_ele_delta:b,u_fog_matrix:I,u_fog_color:G?G.properties.get("fog-color"):i.aM.white,u_fog_ground_blend:G?G.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:G?G.calculateFogBlendOpacity(H):0,u_horizon_color:G?G.properties.get("horizon-color"):i.aM.white,u_horizon_fog_blend:G?G.properties.get("horizon-fog-blend"):1});function Fr(K){let b=[];for(let I=0;I({u_depth:new i.aH(gt,Mt.u_depth),u_terrain:new i.aH(gt,Mt.u_terrain),u_terrain_dim:new i.aI(gt,Mt.u_terrain_dim),u_terrain_matrix:new i.aJ(gt,Mt.u_terrain_matrix),u_terrain_unpack:new i.aK(gt,Mt.u_terrain_unpack),u_terrain_exaggeration:new i.aI(gt,Mt.u_terrain_exaggeration)}))(b,ut),this.binderUniforms=G?G.getUniforms(b,ut):[]}draw(b,I,G,H,$,xe,ke,Ne,et,bt,Tt,zt,Yt,Q,ae,ve,be,De){let Se=b.gl;if(this.failedToCreate)return;if(b.program.set(this.program),b.setDepthMode(G),b.setStencilMode(H),b.setColorMode($),b.setCullFace(xe),Ne){b.activeTexture.set(Se.TEXTURE2),Se.bindTexture(Se.TEXTURE_2D,Ne.depthTexture),b.activeTexture.set(Se.TEXTURE3),Se.bindTexture(Se.TEXTURE_2D,Ne.texture);for(let ut in this.terrainUniforms)this.terrainUniforms[ut].set(Ne[ut])}for(let ut in this.fixedUniforms)this.fixedUniforms[ut].set(ke[ut]);ae&&ae.setUniforms(b,this.binderUniforms,Yt,{zoom:Q});let Be=0;switch(I){case Se.LINES:Be=2;break;case Se.TRIANGLES:Be=3;break;case Se.LINE_STRIP:Be=1}for(let ut of zt.get()){let gt=ut.vaos||(ut.vaos={});(gt[et]||(gt[et]=new Xt)).bind(b,this,bt,ae?ae.getPaintVertexBuffers():[],Tt,ut.vertexOffset,ve,be,De),Se.drawElements(I,ut.primitiveLength*Be,Se.UNSIGNED_SHORT,ut.primitiveOffset*Be*2)}}}function Mn(K,b,I){let G=1/Nn(I,1,b.transform.tileZoom),H=Math.pow(2,I.tileID.overscaledZ),$=I.tileSize*Math.pow(2,b.transform.tileZoom)/H,xe=$*(I.tileID.canonical.x+I.tileID.wrap*H),ke=$*I.tileID.canonical.y;return{u_image:0,u_texsize:I.imageAtlasTexture.size,u_scale:[G,K.fromScale,K.toScale],u_fade:K.t,u_pixel_coord_upper:[xe>>16,ke>>16],u_pixel_coord_lower:[65535&xe,65535&ke]}}let Rn=(K,b,I,G)=>{let H=b.style.light,$=H.properties.get("position"),xe=[$.x,$.y,$.z],ke=(function(){var et=new i.A(9);return i.A!=Float32Array&&(et[1]=0,et[2]=0,et[3]=0,et[5]=0,et[6]=0,et[7]=0),et[0]=1,et[4]=1,et[8]=1,et})();H.properties.get("anchor")==="viewport"&&(function(et,bt){var Tt=Math.sin(bt),zt=Math.cos(bt);et[0]=zt,et[1]=Tt,et[2]=0,et[3]=-Tt,et[4]=zt,et[5]=0,et[6]=0,et[7]=0,et[8]=1})(ke,-b.transform.angle),(function(et,bt,Tt){var zt=bt[0],Yt=bt[1],Q=bt[2];et[0]=zt*Tt[0]+Yt*Tt[3]+Q*Tt[6],et[1]=zt*Tt[1]+Yt*Tt[4]+Q*Tt[7],et[2]=zt*Tt[2]+Yt*Tt[5]+Q*Tt[8]})(xe,xe,ke);let Ne=H.properties.get("color");return{u_matrix:K,u_lightpos:xe,u_lightintensity:H.properties.get("intensity"),u_lightcolor:[Ne.r,Ne.g,Ne.b],u_vertical_gradient:+I,u_opacity:G}},on=(K,b,I,G,H,$,xe)=>i.e(Rn(K,b,I,G),Mn($,b,xe),{u_height_factor:-Math.pow(2,H.overscaledZ)/xe.tileSize/8}),En=K=>({u_matrix:K}),Aa=(K,b,I,G)=>i.e(En(K),Mn(I,b,G)),ba=(K,b)=>({u_matrix:K,u_world:b}),Ia=(K,b,I,G,H)=>i.e(Aa(K,b,I,G),{u_world:H}),hi=(K,b,I,G)=>{let H=K.transform,$,xe;if(G.paint.get("circle-pitch-alignment")==="map"){let ke=Nn(I,1,H.zoom);$=!0,xe=[ke,ke]}else $=!1,xe=H.pixelsToGLUnits;return{u_camera_to_center_distance:H.cameraToCenterDistance,u_scale_with_map:+(G.paint.get("circle-pitch-scale")==="map"),u_matrix:K.translatePosMatrix(b.posMatrix,I,G.paint.get("circle-translate"),G.paint.get("circle-translate-anchor")),u_pitch_with_map:+$,u_device_pixel_ratio:K.pixelRatio,u_extrude_scale:xe}},ki=(K,b,I)=>({u_matrix:K,u_inv_matrix:b,u_camera_to_center_distance:I.cameraToCenterDistance,u_viewport_size:[I.width,I.height]}),ui=(K,b,I=1)=>({u_matrix:K,u_color:b,u_overlay:0,u_overlay_scale:I}),Mi=K=>({u_matrix:K}),_i=(K,b,I,G)=>({u_matrix:K,u_extrude_scale:Nn(b,1,I),u_intensity:G}),ko=(K,b,I,G)=>{let H=i.H();i.aP(H,0,K.width,K.height,0,0,1);let $=K.context.gl;return{u_matrix:H,u_world:[$.drawingBufferWidth,$.drawingBufferHeight],u_image:I,u_color_ramp:G,u_opacity:b.paint.get("heatmap-opacity")}};function Io(K,b){let I=Math.pow(2,b.canonical.z),G=b.canonical.y;return[new i.Z(0,G/I).toLngLat().lat,new i.Z(0,(G+1)/I).toLngLat().lat]}let $o=(K,b,I,G)=>{let H=K.transform;return{u_matrix:ks(K,b,I,G),u_ratio:1/Nn(b,1,H.zoom),u_device_pixel_ratio:K.pixelRatio,u_units_to_pixels:[1/H.pixelsToGLUnits[0],1/H.pixelsToGLUnits[1]]}},Is=(K,b,I,G,H)=>i.e($o(K,b,I,H),{u_image:0,u_image_height:G}),Es=(K,b,I,G,H)=>{let $=K.transform,xe=nl(b,$);return{u_matrix:ks(K,b,I,H),u_texsize:b.imageAtlasTexture.size,u_ratio:1/Nn(b,1,$.zoom),u_device_pixel_ratio:K.pixelRatio,u_image:0,u_scale:[xe,G.fromScale,G.toScale],u_fade:G.t,u_units_to_pixels:[1/$.pixelsToGLUnits[0],1/$.pixelsToGLUnits[1]]}},Ks=(K,b,I,G,H,$)=>{let xe=K.lineAtlas,ke=nl(b,K.transform),Ne=I.layout.get("line-cap")==="round",et=xe.getDash(G.from,Ne),bt=xe.getDash(G.to,Ne),Tt=et.width*H.fromScale,zt=bt.width*H.toScale;return i.e($o(K,b,I,$),{u_patternscale_a:[ke/Tt,-et.height/2],u_patternscale_b:[ke/zt,-bt.height/2],u_sdfgamma:xe.width/(256*Math.min(Tt,zt)*K.pixelRatio)/2,u_image:0,u_tex_y_a:et.y,u_tex_y_b:bt.y,u_mix:H.t})};function nl(K,b){return 1/Nn(K,1,b.tileZoom)}function ks(K,b,I,G){return K.translatePosMatrix(G?G.posMatrix:b.tileID.posMatrix,b,I.paint.get("line-translate"),I.paint.get("line-translate-anchor"))}let us=(K,b,I,G,H)=>{return{u_matrix:K,u_tl_parent:b,u_scale_parent:I,u_buffer_scale:1,u_fade_t:G.mix,u_opacity:G.opacity*H.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:H.paint.get("raster-brightness-min"),u_brightness_high:H.paint.get("raster-brightness-max"),u_saturation_factor:(xe=H.paint.get("raster-saturation"),xe>0?1-1/(1.001-xe):-xe),u_contrast_factor:($=H.paint.get("raster-contrast"),$>0?1/(1-$):1+$),u_spin_weights:xs(H.paint.get("raster-hue-rotate"))};var $,xe};function xs(K){K*=Math.PI/180;let b=Math.sin(K),I=Math.cos(K);return[(2*I+1)/3,(-Math.sqrt(3)*b-I+1)/3,(Math.sqrt(3)*b-I+1)/3]}let Co=(K,b,I,G,H,$,xe,ke,Ne,et,bt,Tt,zt,Yt)=>{let Q=xe.transform;return{u_is_size_zoom_constant:+(K==="constant"||K==="source"),u_is_size_feature_constant:+(K==="constant"||K==="camera"),u_size_t:b?b.uSizeT:0,u_size:b?b.uSize:0,u_camera_to_center_distance:Q.cameraToCenterDistance,u_pitch:Q.pitch/360*2*Math.PI,u_rotate_symbol:+I,u_aspect_ratio:Q.width/Q.height,u_fade_change:xe.options.fadeDuration?xe.symbolFadeChange:1,u_matrix:ke,u_label_plane_matrix:Ne,u_coord_matrix:et,u_is_text:+Tt,u_pitch_with_map:+G,u_is_along_line:H,u_is_variable_anchor:$,u_texsize:zt,u_texture:0,u_translation:bt,u_pitched_scale:Yt}},Si=(K,b,I,G,H,$,xe,ke,Ne,et,bt,Tt,zt,Yt,Q)=>{let ae=xe.transform;return i.e(Co(K,b,I,G,H,$,xe,ke,Ne,et,bt,Tt,zt,Q),{u_gamma_scale:G?Math.cos(ae._pitch)*ae.cameraToCenterDistance:1,u_device_pixel_ratio:xe.pixelRatio,u_is_halo:+Yt})},io=(K,b,I,G,H,$,xe,ke,Ne,et,bt,Tt,zt,Yt)=>i.e(Si(K,b,I,G,H,$,xe,ke,Ne,et,bt,!0,Tt,!0,Yt),{u_texsize_icon:zt,u_texture_icon:1}),Bs=(K,b,I)=>({u_matrix:K,u_opacity:b,u_color:I}),Fl=(K,b,I,G,H,$)=>i.e((function(xe,ke,Ne,et){let bt=Ne.imageManager.getPattern(xe.from.toString()),Tt=Ne.imageManager.getPattern(xe.to.toString()),{width:zt,height:Yt}=Ne.imageManager.getPixelSize(),Q=Math.pow(2,et.tileID.overscaledZ),ae=et.tileSize*Math.pow(2,Ne.transform.tileZoom)/Q,ve=ae*(et.tileID.canonical.x+et.tileID.wrap*Q),be=ae*et.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:bt.tl,u_pattern_br_a:bt.br,u_pattern_tl_b:Tt.tl,u_pattern_br_b:Tt.br,u_texsize:[zt,Yt],u_mix:ke.t,u_pattern_size_a:bt.displaySize,u_pattern_size_b:Tt.displaySize,u_scale_a:ke.fromScale,u_scale_b:ke.toScale,u_tile_units_to_pixels:1/Nn(et,1,Ne.transform.tileZoom),u_pixel_coord_upper:[ve>>16,be>>16],u_pixel_coord_lower:[65535&ve,65535&be]}})(G,$,I,H),{u_matrix:K,u_opacity:b}),Eu={fillExtrusion:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_lightpos:new i.aN(K,b.u_lightpos),u_lightintensity:new i.aI(K,b.u_lightintensity),u_lightcolor:new i.aN(K,b.u_lightcolor),u_vertical_gradient:new i.aI(K,b.u_vertical_gradient),u_opacity:new i.aI(K,b.u_opacity)}),fillExtrusionPattern:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_lightpos:new i.aN(K,b.u_lightpos),u_lightintensity:new i.aI(K,b.u_lightintensity),u_lightcolor:new i.aN(K,b.u_lightcolor),u_vertical_gradient:new i.aI(K,b.u_vertical_gradient),u_height_factor:new i.aI(K,b.u_height_factor),u_image:new i.aH(K,b.u_image),u_texsize:new i.aO(K,b.u_texsize),u_pixel_coord_upper:new i.aO(K,b.u_pixel_coord_upper),u_pixel_coord_lower:new i.aO(K,b.u_pixel_coord_lower),u_scale:new i.aN(K,b.u_scale),u_fade:new i.aI(K,b.u_fade),u_opacity:new i.aI(K,b.u_opacity)}),fill:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix)}),fillPattern:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_image:new i.aH(K,b.u_image),u_texsize:new i.aO(K,b.u_texsize),u_pixel_coord_upper:new i.aO(K,b.u_pixel_coord_upper),u_pixel_coord_lower:new i.aO(K,b.u_pixel_coord_lower),u_scale:new i.aN(K,b.u_scale),u_fade:new i.aI(K,b.u_fade)}),fillOutline:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_world:new i.aO(K,b.u_world)}),fillOutlinePattern:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_world:new i.aO(K,b.u_world),u_image:new i.aH(K,b.u_image),u_texsize:new i.aO(K,b.u_texsize),u_pixel_coord_upper:new i.aO(K,b.u_pixel_coord_upper),u_pixel_coord_lower:new i.aO(K,b.u_pixel_coord_lower),u_scale:new i.aN(K,b.u_scale),u_fade:new i.aI(K,b.u_fade)}),circle:(K,b)=>({u_camera_to_center_distance:new i.aI(K,b.u_camera_to_center_distance),u_scale_with_map:new i.aH(K,b.u_scale_with_map),u_pitch_with_map:new i.aH(K,b.u_pitch_with_map),u_extrude_scale:new i.aO(K,b.u_extrude_scale),u_device_pixel_ratio:new i.aI(K,b.u_device_pixel_ratio),u_matrix:new i.aJ(K,b.u_matrix)}),collisionBox:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_pixel_extrude_scale:new i.aO(K,b.u_pixel_extrude_scale)}),collisionCircle:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_inv_matrix:new i.aJ(K,b.u_inv_matrix),u_camera_to_center_distance:new i.aI(K,b.u_camera_to_center_distance),u_viewport_size:new i.aO(K,b.u_viewport_size)}),debug:(K,b)=>({u_color:new i.aL(K,b.u_color),u_matrix:new i.aJ(K,b.u_matrix),u_overlay:new i.aH(K,b.u_overlay),u_overlay_scale:new i.aI(K,b.u_overlay_scale)}),clippingMask:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix)}),heatmap:(K,b)=>({u_extrude_scale:new i.aI(K,b.u_extrude_scale),u_intensity:new i.aI(K,b.u_intensity),u_matrix:new i.aJ(K,b.u_matrix)}),heatmapTexture:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_world:new i.aO(K,b.u_world),u_image:new i.aH(K,b.u_image),u_color_ramp:new i.aH(K,b.u_color_ramp),u_opacity:new i.aI(K,b.u_opacity)}),hillshade:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_image:new i.aH(K,b.u_image),u_latrange:new i.aO(K,b.u_latrange),u_light:new i.aO(K,b.u_light),u_shadow:new i.aL(K,b.u_shadow),u_highlight:new i.aL(K,b.u_highlight),u_accent:new i.aL(K,b.u_accent)}),hillshadePrepare:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_image:new i.aH(K,b.u_image),u_dimension:new i.aO(K,b.u_dimension),u_zoom:new i.aI(K,b.u_zoom),u_unpack:new i.aK(K,b.u_unpack)}),line:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_ratio:new i.aI(K,b.u_ratio),u_device_pixel_ratio:new i.aI(K,b.u_device_pixel_ratio),u_units_to_pixels:new i.aO(K,b.u_units_to_pixels)}),lineGradient:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_ratio:new i.aI(K,b.u_ratio),u_device_pixel_ratio:new i.aI(K,b.u_device_pixel_ratio),u_units_to_pixels:new i.aO(K,b.u_units_to_pixels),u_image:new i.aH(K,b.u_image),u_image_height:new i.aI(K,b.u_image_height)}),linePattern:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_texsize:new i.aO(K,b.u_texsize),u_ratio:new i.aI(K,b.u_ratio),u_device_pixel_ratio:new i.aI(K,b.u_device_pixel_ratio),u_image:new i.aH(K,b.u_image),u_units_to_pixels:new i.aO(K,b.u_units_to_pixels),u_scale:new i.aN(K,b.u_scale),u_fade:new i.aI(K,b.u_fade)}),lineSDF:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_ratio:new i.aI(K,b.u_ratio),u_device_pixel_ratio:new i.aI(K,b.u_device_pixel_ratio),u_units_to_pixels:new i.aO(K,b.u_units_to_pixels),u_patternscale_a:new i.aO(K,b.u_patternscale_a),u_patternscale_b:new i.aO(K,b.u_patternscale_b),u_sdfgamma:new i.aI(K,b.u_sdfgamma),u_image:new i.aH(K,b.u_image),u_tex_y_a:new i.aI(K,b.u_tex_y_a),u_tex_y_b:new i.aI(K,b.u_tex_y_b),u_mix:new i.aI(K,b.u_mix)}),raster:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_tl_parent:new i.aO(K,b.u_tl_parent),u_scale_parent:new i.aI(K,b.u_scale_parent),u_buffer_scale:new i.aI(K,b.u_buffer_scale),u_fade_t:new i.aI(K,b.u_fade_t),u_opacity:new i.aI(K,b.u_opacity),u_image0:new i.aH(K,b.u_image0),u_image1:new i.aH(K,b.u_image1),u_brightness_low:new i.aI(K,b.u_brightness_low),u_brightness_high:new i.aI(K,b.u_brightness_high),u_saturation_factor:new i.aI(K,b.u_saturation_factor),u_contrast_factor:new i.aI(K,b.u_contrast_factor),u_spin_weights:new i.aN(K,b.u_spin_weights)}),symbolIcon:(K,b)=>({u_is_size_zoom_constant:new i.aH(K,b.u_is_size_zoom_constant),u_is_size_feature_constant:new i.aH(K,b.u_is_size_feature_constant),u_size_t:new i.aI(K,b.u_size_t),u_size:new i.aI(K,b.u_size),u_camera_to_center_distance:new i.aI(K,b.u_camera_to_center_distance),u_pitch:new i.aI(K,b.u_pitch),u_rotate_symbol:new i.aH(K,b.u_rotate_symbol),u_aspect_ratio:new i.aI(K,b.u_aspect_ratio),u_fade_change:new i.aI(K,b.u_fade_change),u_matrix:new i.aJ(K,b.u_matrix),u_label_plane_matrix:new i.aJ(K,b.u_label_plane_matrix),u_coord_matrix:new i.aJ(K,b.u_coord_matrix),u_is_text:new i.aH(K,b.u_is_text),u_pitch_with_map:new i.aH(K,b.u_pitch_with_map),u_is_along_line:new i.aH(K,b.u_is_along_line),u_is_variable_anchor:new i.aH(K,b.u_is_variable_anchor),u_texsize:new i.aO(K,b.u_texsize),u_texture:new i.aH(K,b.u_texture),u_translation:new i.aO(K,b.u_translation),u_pitched_scale:new i.aI(K,b.u_pitched_scale)}),symbolSDF:(K,b)=>({u_is_size_zoom_constant:new i.aH(K,b.u_is_size_zoom_constant),u_is_size_feature_constant:new i.aH(K,b.u_is_size_feature_constant),u_size_t:new i.aI(K,b.u_size_t),u_size:new i.aI(K,b.u_size),u_camera_to_center_distance:new i.aI(K,b.u_camera_to_center_distance),u_pitch:new i.aI(K,b.u_pitch),u_rotate_symbol:new i.aH(K,b.u_rotate_symbol),u_aspect_ratio:new i.aI(K,b.u_aspect_ratio),u_fade_change:new i.aI(K,b.u_fade_change),u_matrix:new i.aJ(K,b.u_matrix),u_label_plane_matrix:new i.aJ(K,b.u_label_plane_matrix),u_coord_matrix:new i.aJ(K,b.u_coord_matrix),u_is_text:new i.aH(K,b.u_is_text),u_pitch_with_map:new i.aH(K,b.u_pitch_with_map),u_is_along_line:new i.aH(K,b.u_is_along_line),u_is_variable_anchor:new i.aH(K,b.u_is_variable_anchor),u_texsize:new i.aO(K,b.u_texsize),u_texture:new i.aH(K,b.u_texture),u_gamma_scale:new i.aI(K,b.u_gamma_scale),u_device_pixel_ratio:new i.aI(K,b.u_device_pixel_ratio),u_is_halo:new i.aH(K,b.u_is_halo),u_translation:new i.aO(K,b.u_translation),u_pitched_scale:new i.aI(K,b.u_pitched_scale)}),symbolTextAndIcon:(K,b)=>({u_is_size_zoom_constant:new i.aH(K,b.u_is_size_zoom_constant),u_is_size_feature_constant:new i.aH(K,b.u_is_size_feature_constant),u_size_t:new i.aI(K,b.u_size_t),u_size:new i.aI(K,b.u_size),u_camera_to_center_distance:new i.aI(K,b.u_camera_to_center_distance),u_pitch:new i.aI(K,b.u_pitch),u_rotate_symbol:new i.aH(K,b.u_rotate_symbol),u_aspect_ratio:new i.aI(K,b.u_aspect_ratio),u_fade_change:new i.aI(K,b.u_fade_change),u_matrix:new i.aJ(K,b.u_matrix),u_label_plane_matrix:new i.aJ(K,b.u_label_plane_matrix),u_coord_matrix:new i.aJ(K,b.u_coord_matrix),u_is_text:new i.aH(K,b.u_is_text),u_pitch_with_map:new i.aH(K,b.u_pitch_with_map),u_is_along_line:new i.aH(K,b.u_is_along_line),u_is_variable_anchor:new i.aH(K,b.u_is_variable_anchor),u_texsize:new i.aO(K,b.u_texsize),u_texsize_icon:new i.aO(K,b.u_texsize_icon),u_texture:new i.aH(K,b.u_texture),u_texture_icon:new i.aH(K,b.u_texture_icon),u_gamma_scale:new i.aI(K,b.u_gamma_scale),u_device_pixel_ratio:new i.aI(K,b.u_device_pixel_ratio),u_is_halo:new i.aH(K,b.u_is_halo),u_translation:new i.aO(K,b.u_translation),u_pitched_scale:new i.aI(K,b.u_pitched_scale)}),background:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_opacity:new i.aI(K,b.u_opacity),u_color:new i.aL(K,b.u_color)}),backgroundPattern:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_opacity:new i.aI(K,b.u_opacity),u_image:new i.aH(K,b.u_image),u_pattern_tl_a:new i.aO(K,b.u_pattern_tl_a),u_pattern_br_a:new i.aO(K,b.u_pattern_br_a),u_pattern_tl_b:new i.aO(K,b.u_pattern_tl_b),u_pattern_br_b:new i.aO(K,b.u_pattern_br_b),u_texsize:new i.aO(K,b.u_texsize),u_mix:new i.aI(K,b.u_mix),u_pattern_size_a:new i.aO(K,b.u_pattern_size_a),u_pattern_size_b:new i.aO(K,b.u_pattern_size_b),u_scale_a:new i.aI(K,b.u_scale_a),u_scale_b:new i.aI(K,b.u_scale_b),u_pixel_coord_upper:new i.aO(K,b.u_pixel_coord_upper),u_pixel_coord_lower:new i.aO(K,b.u_pixel_coord_lower),u_tile_units_to_pixels:new i.aI(K,b.u_tile_units_to_pixels)}),terrain:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_texture:new i.aH(K,b.u_texture),u_ele_delta:new i.aI(K,b.u_ele_delta),u_fog_matrix:new i.aJ(K,b.u_fog_matrix),u_fog_color:new i.aL(K,b.u_fog_color),u_fog_ground_blend:new i.aI(K,b.u_fog_ground_blend),u_fog_ground_blend_opacity:new i.aI(K,b.u_fog_ground_blend_opacity),u_horizon_color:new i.aL(K,b.u_horizon_color),u_horizon_fog_blend:new i.aI(K,b.u_horizon_fog_blend)}),terrainDepth:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_ele_delta:new i.aI(K,b.u_ele_delta)}),terrainCoords:(K,b)=>({u_matrix:new i.aJ(K,b.u_matrix),u_texture:new i.aH(K,b.u_texture),u_terrain_coords_id:new i.aI(K,b.u_terrain_coords_id),u_ele_delta:new i.aI(K,b.u_ele_delta)}),sky:(K,b)=>({u_sky_color:new i.aL(K,b.u_sky_color),u_horizon_color:new i.aL(K,b.u_horizon_color),u_horizon:new i.aI(K,b.u_horizon),u_sky_horizon_blend:new i.aI(K,b.u_sky_horizon_blend)})};class Cs{constructor(b,I,G){this.context=b;let H=b.gl;this.buffer=H.createBuffer(),this.dynamicDraw=!!G,this.context.unbindVAO(),b.bindElementBuffer.set(this.buffer),H.bufferData(H.ELEMENT_ARRAY_BUFFER,I.arrayBuffer,this.dynamicDraw?H.DYNAMIC_DRAW:H.STATIC_DRAW),this.dynamicDraw||delete I.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(b){let I=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),I.bufferSubData(I.ELEMENT_ARRAY_BUFFER,0,b.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Nl={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class du{constructor(b,I,G,H){this.length=I.length,this.attributes=G,this.itemSize=I.bytesPerElement,this.dynamicDraw=H,this.context=b;let $=b.gl;this.buffer=$.createBuffer(),b.bindVertexBuffer.set(this.buffer),$.bufferData($.ARRAY_BUFFER,I.arrayBuffer,this.dynamicDraw?$.DYNAMIC_DRAW:$.STATIC_DRAW),this.dynamicDraw||delete I.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(b){if(b.length!==this.length)throw new Error(`Length of new data is ${b.length}, which doesn't match current length of ${this.length}`);let I=this.context.gl;this.bind(),I.bufferSubData(I.ARRAY_BUFFER,0,b.arrayBuffer)}enableAttributes(b,I){for(let G=0;G0){let gt=i.H();i.aQ(gt,Se.placementInvProjMatrix,K.transform.glCoordMatrix),i.aQ(gt,gt,Se.placementViewportMatrix),Ne.push({circleArray:ut,circleOffset:bt,transform:De.posMatrix,invTransform:gt,coord:De}),et+=ut.length/4,bt=et}Be&&ke.draw($,xe.LINES,Wi.disabled,so.disabled,K.colorModeForRenderPass(),ei.disabled,{u_matrix:De.posMatrix,u_pixel_extrude_scale:[1/(Tt=K.transform).width,1/Tt.height]},K.style.map.terrain&&K.style.map.terrain.getTerrainData(De),I.id,Be.layoutVertexBuffer,Be.indexBuffer,Be.segments,null,K.transform.zoom,null,null,Be.collisionVertexBuffer)}var Tt;if(!H||!Ne.length)return;let zt=K.useProgram("collisionCircle"),Yt=new i.aR;Yt.resize(4*et),Yt._trim();let Q=0;for(let be of Ne)for(let De=0;De=0&&(be[Se.associatedIconIndex]={shiftedAnchor:ta,angle:ka})}else Nr(Se.numGlyphs,ae)}if(et){ve.clear();let De=K.icon.placedSymbolArray;for(let Se=0;SeK.style.map.terrain.getElevation(sr,je,xt):null,at=I.layout.get("text-rotation-alignment")==="map";Ae(Gr,sr.posMatrix,K,H,Tl,Gl,be,et,at,ae,sr.toUnwrapped(),Q.width,Q.height,zs,Le)}let Qs=sr.posMatrix,Al=H&&Ft||_u,V=De||Al?_l:Tl,Z=bu,ie=kn&&I.paint.get(H?"text-halo-width":"icon-halo-width").constantOr(1)!==0,_e;_e=kn?Gr.iconsInText?io(ta.kind,Xa,Se,be,De,Al,K,Qs,V,Z,zs,di,fs,er):Si(ta.kind,Xa,Se,be,De,Al,K,Qs,V,Z,zs,H,di,!0,er):Co(ta.kind,Xa,Se,be,De,Al,K,Qs,V,Z,zs,H,di,er);let Me={program:va,buffers:pn,uniformValues:_e,atlasTexture:xo,atlasTextureIcon:ws,atlasInterpolation:Xi,atlasInterpolationIcon:Wo,isSDF:kn,hasHalo:ie};if(ut&&Gr.canOverlap){gt=!0;let Le=pn.segments.get();for(let at of Le)Ot.push({segments:new i.a0([at]),sortKey:at.sortKey,state:Me,terrainData:Ai})}else Ot.push({segments:pn.segments,sortKey:0,state:Me,terrainData:Ai})}gt&&Ot.sort(((sr,wr)=>sr.sortKey-wr.sortKey));for(let sr of Ot){let wr=sr.state;if(zt.activeTexture.set(Yt.TEXTURE0),wr.atlasTexture.bind(wr.atlasInterpolation,Yt.CLAMP_TO_EDGE),wr.atlasTextureIcon&&(zt.activeTexture.set(Yt.TEXTURE1),wr.atlasTextureIcon&&wr.atlasTextureIcon.bind(wr.atlasInterpolationIcon,Yt.CLAMP_TO_EDGE)),wr.isSDF){let Gr=wr.uniformValues;wr.hasHalo&&(Gr.u_is_halo=1,Df(wr.buffers,sr.segments,I,K,wr.program,Mt,bt,Tt,Gr,sr.terrainData)),Gr.u_is_halo=0}Df(wr.buffers,sr.segments,I,K,wr.program,Mt,bt,Tt,wr.uniformValues,sr.terrainData)}}function Df(K,b,I,G,H,$,xe,ke,Ne,et){let bt=G.context;H.draw(bt,bt.gl.TRIANGLES,$,xe,ke,ei.disabled,Ne,et,I.id,K.layoutVertexBuffer,K.indexBuffer,b,I.paint,G.transform.zoom,K.programConfigurations.get(I.id),K.dynamicLayoutVertexBuffer,K.opacityVertexBuffer)}function Mc(K,b,I,G){let H=K.context,$=H.gl,xe=so.disabled,ke=new is([$.ONE,$.ONE],i.aM.transparent,[!0,!0,!0,!0]),Ne=b.getBucket(I);if(!Ne)return;let et=G.key,bt=I.heatmapFbos.get(et);bt||(bt=Rf(H,b.tileSize,b.tileSize),I.heatmapFbos.set(et,bt)),H.bindFramebuffer.set(bt.framebuffer),H.viewport.set([0,0,b.tileSize,b.tileSize]),H.clear({color:i.aM.transparent});let Tt=Ne.programConfigurations.get(I.id),zt=K.useProgram("heatmap",Tt),Yt=K.style.map.terrain.getTerrainData(G);zt.draw(H,$.TRIANGLES,Wi.disabled,xe,ke,ei.disabled,_i(G.posMatrix,b,K.transform.zoom,I.paint.get("heatmap-intensity")),Yt,I.id,Ne.layoutVertexBuffer,Ne.indexBuffer,Ne.segments,I.paint,K.transform.zoom,Tt)}function Sc(K,b,I){let G=K.context,H=G.gl;G.setColorMode(K.colorModeForRenderPass());let $=If(G,b),xe=I.key,ke=b.heatmapFbos.get(xe);ke&&(G.activeTexture.set(H.TEXTURE0),H.bindTexture(H.TEXTURE_2D,ke.colorAttachment.get()),G.activeTexture.set(H.TEXTURE1),$.bind(H.LINEAR,H.CLAMP_TO_EDGE),K.useProgram("heatmapTexture").draw(G,H.TRIANGLES,Wi.disabled,so.disabled,K.colorModeForRenderPass(),ei.disabled,ko(K,b,0,1),null,b.id,K.rasterBoundsBuffer,K.quadTriangleIndexBuffer,K.rasterBoundsSegments,b.paint,K.transform.zoom),ke.destroy(),b.heatmapFbos.delete(xe))}function Rf(K,b,I){var G,H;let $=K.gl,xe=$.createTexture();$.bindTexture($.TEXTURE_2D,xe),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_S,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_T,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MIN_FILTER,$.LINEAR),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MAG_FILTER,$.LINEAR);let ke=(G=K.HALF_FLOAT)!==null&&G!==void 0?G:$.UNSIGNED_BYTE,Ne=(H=K.RGBA16F)!==null&&H!==void 0?H:$.RGBA;$.texImage2D($.TEXTURE_2D,0,Ne,b,I,0,$.RGBA,ke,null);let et=K.createFramebuffer(b,I,!1,!1);return et.colorAttachment.set(xe),et}function If(K,b){return b.colorRampTexture||(b.colorRampTexture=new p(K,b.colorRamp,K.gl.RGBA)),b.colorRampTexture}function eu(K,b,I,G,H){if(!I||!G||!G.imageAtlas)return;let $=G.imageAtlas.patternPositions,xe=$[I.to.toString()],ke=$[I.from.toString()];if(!xe&&ke&&(xe=ke),!ke&&xe&&(ke=xe),!xe||!ke){let Ne=H.getPaintProperty(b);xe=$[Ne],ke=$[Ne]}xe&&ke&&K.setConstantPatternPositions(xe,ke)}function lf(K,b,I,G,H,$,xe){let ke=K.context.gl,Ne="fill-pattern",et=I.paint.get(Ne),bt=et&&et.constantOr(1),Tt=I.getCrossfadeParameters(),zt,Yt,Q,ae,ve;xe?(Yt=bt&&!I.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",zt=ke.LINES):(Yt=bt?"fillPattern":"fill",zt=ke.TRIANGLES);let be=et.constantOr(null);for(let De of G){let Se=b.getTile(De);if(bt&&!Se.patternsLoaded())continue;let Be=Se.getBucket(I);if(!Be)continue;let ut=Be.programConfigurations.get(I.id),gt=K.useProgram(Yt,ut),Mt=K.style.map.terrain&&K.style.map.terrain.getTerrainData(De);bt&&(K.context.activeTexture.set(ke.TEXTURE0),Se.imageAtlasTexture.bind(ke.LINEAR,ke.CLAMP_TO_EDGE),ut.updatePaintBuffers(Tt)),eu(ut,Ne,be,Se,I);let Ft=Mt?De:null,Ot=K.translatePosMatrix(Ft?Ft.posMatrix:De.posMatrix,Se,I.paint.get("fill-translate"),I.paint.get("fill-translate-anchor"));if(xe){ae=Be.indexBuffer2,ve=Be.segments2;let er=[ke.drawingBufferWidth,ke.drawingBufferHeight];Q=Yt==="fillOutlinePattern"&&bt?Ia(Ot,K,Tt,Se,er):ba(Ot,er)}else ae=Be.indexBuffer,ve=Be.segments,Q=bt?Aa(Ot,K,Tt,Se):En(Ot);gt.draw(K.context,zt,H,K.stencilModeForClipping(De),$,ei.disabled,Q,Mt,I.id,Be.layoutVertexBuffer,ae,ve,I.paint,K.transform.zoom,ut)}}function tu(K,b,I,G,H,$,xe){let ke=K.context,Ne=ke.gl,et="fill-extrusion-pattern",bt=I.paint.get(et),Tt=bt.constantOr(1),zt=I.getCrossfadeParameters(),Yt=I.paint.get("fill-extrusion-opacity"),Q=bt.constantOr(null);for(let ae of G){let ve=b.getTile(ae),be=ve.getBucket(I);if(!be)continue;let De=K.style.map.terrain&&K.style.map.terrain.getTerrainData(ae),Se=be.programConfigurations.get(I.id),Be=K.useProgram(Tt?"fillExtrusionPattern":"fillExtrusion",Se);Tt&&(K.context.activeTexture.set(Ne.TEXTURE0),ve.imageAtlasTexture.bind(Ne.LINEAR,Ne.CLAMP_TO_EDGE),Se.updatePaintBuffers(zt)),eu(Se,et,Q,ve,I);let ut=K.translatePosMatrix(ae.posMatrix,ve,I.paint.get("fill-extrusion-translate"),I.paint.get("fill-extrusion-translate-anchor")),gt=I.paint.get("fill-extrusion-vertical-gradient"),Mt=Tt?on(ut,K,gt,Yt,ae,zt,ve):Rn(ut,K,gt,Yt);Be.draw(ke,ke.gl.TRIANGLES,H,$,xe,ei.backCCW,Mt,De,I.id,be.layoutVertexBuffer,be.indexBuffer,be.segments,I.paint,K.transform.zoom,Se,K.style.map.terrain&&be.centroidVertexBuffer)}}function Ec(K,b,I,G,H,$,xe){let ke=K.context,Ne=ke.gl,et=I.fbo;if(!et)return;let bt=K.useProgram("hillshade"),Tt=K.style.map.terrain&&K.style.map.terrain.getTerrainData(b);ke.activeTexture.set(Ne.TEXTURE0),Ne.bindTexture(Ne.TEXTURE_2D,et.colorAttachment.get()),bt.draw(ke,Ne.TRIANGLES,H,$,xe,ei.disabled,((zt,Yt,Q,ae)=>{let ve=Q.paint.get("hillshade-shadow-color"),be=Q.paint.get("hillshade-highlight-color"),De=Q.paint.get("hillshade-accent-color"),Se=Q.paint.get("hillshade-illumination-direction")*(Math.PI/180);Q.paint.get("hillshade-illumination-anchor")==="viewport"&&(Se-=zt.transform.angle);let Be=!zt.options.moving;return{u_matrix:ae?ae.posMatrix:zt.transform.calculatePosMatrix(Yt.tileID.toUnwrapped(),Be),u_image:0,u_latrange:Io(0,Yt.tileID),u_light:[Q.paint.get("hillshade-exaggeration"),Se],u_shadow:ve,u_highlight:be,u_accent:De}})(K,I,G,Tt?b:null),Tt,G.id,K.rasterBoundsBuffer,K.quadTriangleIndexBuffer,K.rasterBoundsSegments)}function bs(K,b,I,G,H,$){let xe=K.context,ke=xe.gl,Ne=b.dem;if(Ne&&Ne.data){let et=Ne.dim,bt=Ne.stride,Tt=Ne.getPixels();if(xe.activeTexture.set(ke.TEXTURE1),xe.pixelStoreUnpackPremultiplyAlpha.set(!1),b.demTexture=b.demTexture||K.getTileTexture(bt),b.demTexture){let Yt=b.demTexture;Yt.update(Tt,{premultiply:!1}),Yt.bind(ke.NEAREST,ke.CLAMP_TO_EDGE)}else b.demTexture=new p(xe,Tt,ke.RGBA,{premultiply:!1}),b.demTexture.bind(ke.NEAREST,ke.CLAMP_TO_EDGE);xe.activeTexture.set(ke.TEXTURE0);let zt=b.fbo;if(!zt){let Yt=new p(xe,{width:et,height:et,data:null},ke.RGBA);Yt.bind(ke.LINEAR,ke.CLAMP_TO_EDGE),zt=b.fbo=xe.createFramebuffer(et,et,!0,!1),zt.colorAttachment.set(Yt.texture)}xe.bindFramebuffer.set(zt.framebuffer),xe.viewport.set([0,0,et,et]),K.useProgram("hillshadePrepare").draw(xe,ke.TRIANGLES,G,H,$,ei.disabled,((Yt,Q)=>{let ae=Q.stride,ve=i.H();return i.aP(ve,0,i.X,-i.X,0,0,1),i.J(ve,ve,[0,-i.X,0]),{u_matrix:ve,u_image:1,u_dimension:[ae,ae],u_zoom:Yt.overscaledZ,u_unpack:Q.getUnpackVector()}})(b.tileID,Ne),null,I.id,K.rasterBoundsBuffer,K.quadTriangleIndexBuffer,K.rasterBoundsSegments),b.needsHillshadePrepare=!1}}function kc(K,b,I,G,H,$){let xe=G.paint.get("raster-fade-duration");if(!$&&xe>0){let ke=u.now(),Ne=(ke-K.timeAdded)/xe,et=b?(ke-b.timeAdded)/xe:-1,bt=I.getSource(),Tt=H.coveringZoomLevel({tileSize:bt.tileSize,roundZoom:bt.roundZoom}),zt=!b||Math.abs(b.tileID.overscaledZ-Tt)>Math.abs(K.tileID.overscaledZ-Tt),Yt=zt&&K.refreshedUponExpiration?1:i.ac(zt?Ne:1-et,0,1);return K.refreshedUponExpiration&&Ne>=1&&(K.refreshedUponExpiration=!1),b?{opacity:1,mix:1-Yt}:{opacity:Yt,mix:0}}return{opacity:1,mix:0}}let Gu=new i.aM(1,0,0,1),po=new i.aM(0,1,0,1),uf=new i.aM(0,0,1,1),$h=new i.aM(1,0,1,1),ih=new i.aM(0,1,1,1);function ac(K,b,I,G){cf(K,0,b+I/2,K.transform.width,I,G)}function oh(K,b,I,G){cf(K,b-I/2,0,I,K.transform.height,G)}function cf(K,b,I,G,H,$){let xe=K.context,ke=xe.gl;ke.enable(ke.SCISSOR_TEST),ke.scissor(b*K.pixelRatio,I*K.pixelRatio,G*K.pixelRatio,H*K.pixelRatio),xe.clear({color:$}),ke.disable(ke.SCISSOR_TEST)}function Kh(K,b,I){let G=K.context,H=G.gl,$=I.posMatrix,xe=K.useProgram("debug"),ke=Wi.disabled,Ne=so.disabled,et=K.colorModeForRenderPass(),bt="$debug",Tt=K.style.map.terrain&&K.style.map.terrain.getTerrainData(I);G.activeTexture.set(H.TEXTURE0);let zt=b.getTileByID(I.key).latestRawTileData,Yt=Math.floor((zt&&zt.byteLength||0)/1024),Q=b.getTile(I).tileSize,ae=512/Math.min(Q,512)*(I.overscaledZ/K.transform.zoom)*.5,ve=I.canonical.toString();I.overscaledZ!==I.canonical.z&&(ve+=` => ${I.overscaledZ}`),(function(be,De){be.initDebugOverlayCanvas();let Se=be.debugOverlayCanvas,Be=be.context.gl,ut=be.debugOverlayCanvas.getContext("2d");ut.clearRect(0,0,Se.width,Se.height),ut.shadowColor="white",ut.shadowBlur=2,ut.lineWidth=1.5,ut.strokeStyle="white",ut.textBaseline="top",ut.font="bold 36px Open Sans, sans-serif",ut.fillText(De,5,5),ut.strokeText(De,5,5),be.debugOverlayTexture.update(Se),be.debugOverlayTexture.bind(Be.LINEAR,Be.CLAMP_TO_EDGE)})(K,`${ve} ${Yt}kB`),xe.draw(G,H.TRIANGLES,ke,Ne,is.alphaBlended,ei.disabled,ui($,i.aM.transparent,ae),null,bt,K.debugBuffer,K.quadTriangleIndexBuffer,K.debugSegments),xe.draw(G,H.LINE_STRIP,ke,Ne,et,ei.disabled,ui($,i.aM.red),Tt,bt,K.debugBuffer,K.tileBorderIndexBuffer,K.debugSegments)}function _s(K,b,I){let G=K.context,H=G.gl,$=K.colorModeForRenderPass(),xe=new Wi(H.LEQUAL,Wi.ReadWrite,K.depthRangeFor3D),ke=K.useProgram("terrain"),Ne=b.getTerrainMesh();G.bindFramebuffer.set(null),G.viewport.set([0,0,K.width,K.height]);for(let et of I){let bt=K.renderToTexture.getTexture(et),Tt=b.getTerrainData(et.tileID);G.activeTexture.set(H.TEXTURE0),H.bindTexture(H.TEXTURE_2D,bt.texture);let zt=K.transform.calculatePosMatrix(et.tileID.toUnwrapped()),Yt=b.getMeshFrameDelta(K.transform.zoom),Q=K.transform.calculateFogMatrix(et.tileID.toUnwrapped()),ae=xr(zt,Yt,Q,K.style.sky,K.transform.pitch);ke.draw(G,H.TRIANGLES,xe,so.disabled,$,ei.backCCW,ae,Tt,"terrain",Ne.vertexBuffer,Ne.indexBuffer,Ne.segments)}}class ru{constructor(b,I,G){this.vertexBuffer=b,this.indexBuffer=I,this.segments=G}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class sh{constructor(b,I){this.context=new Xh(b),this.transform=I,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:i.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=We.maxUnderzooming+We.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new rl}resize(b,I,G){if(this.width=Math.floor(b*G),this.height=Math.floor(I*G),this.pixelRatio=G,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let H of this.style._order)this.style._layers[H].resize()}setup(){let b=this.context,I=new i.aX;I.emplaceBack(0,0),I.emplaceBack(i.X,0),I.emplaceBack(0,i.X),I.emplaceBack(i.X,i.X),this.tileExtentBuffer=b.createVertexBuffer(I,Pi.members),this.tileExtentSegments=i.a0.simpleSegment(0,0,4,2);let G=new i.aX;G.emplaceBack(0,0),G.emplaceBack(i.X,0),G.emplaceBack(0,i.X),G.emplaceBack(i.X,i.X),this.debugBuffer=b.createVertexBuffer(G,Pi.members),this.debugSegments=i.a0.simpleSegment(0,0,4,5);let H=new i.$;H.emplaceBack(0,0,0,0),H.emplaceBack(i.X,0,i.X,0),H.emplaceBack(0,i.X,0,i.X),H.emplaceBack(i.X,i.X,i.X,i.X),this.rasterBoundsBuffer=b.createVertexBuffer(H,qe.members),this.rasterBoundsSegments=i.a0.simpleSegment(0,0,4,2);let $=new i.aX;$.emplaceBack(0,0),$.emplaceBack(1,0),$.emplaceBack(0,1),$.emplaceBack(1,1),this.viewportBuffer=b.createVertexBuffer($,Pi.members),this.viewportSegments=i.a0.simpleSegment(0,0,4,2);let xe=new i.aZ;xe.emplaceBack(0),xe.emplaceBack(1),xe.emplaceBack(3),xe.emplaceBack(2),xe.emplaceBack(0),this.tileBorderIndexBuffer=b.createIndexBuffer(xe);let ke=new i.aY;ke.emplaceBack(0,1,2),ke.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=b.createIndexBuffer(ke);let Ne=this.context.gl;this.stencilClearMode=new so({func:Ne.ALWAYS,mask:0},0,255,Ne.ZERO,Ne.ZERO,Ne.ZERO)}clearStencil(){let b=this.context,I=b.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let G=i.H();i.aP(G,0,this.width,this.height,0,0,1),i.K(G,G,[I.drawingBufferWidth,I.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(b,I.TRIANGLES,Wi.disabled,this.stencilClearMode,is.disabled,ei.disabled,Mi(G),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(b,I){if(this.currentStencilSource===b.source||!b.isTileClipped()||!I||!I.length)return;this.currentStencilSource=b.source;let G=this.context,H=G.gl;this.nextStencilID+I.length>256&&this.clearStencil(),G.setColorMode(is.disabled),G.setDepthMode(Wi.disabled);let $=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let xe of I){let ke=this._tileClippingMaskIDs[xe.key]=this.nextStencilID++,Ne=this.style.map.terrain&&this.style.map.terrain.getTerrainData(xe);$.draw(G,H.TRIANGLES,Wi.disabled,new so({func:H.ALWAYS,mask:0},ke,255,H.KEEP,H.KEEP,H.REPLACE),is.disabled,ei.disabled,Mi(xe.posMatrix),Ne,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let b=this.nextStencilID++,I=this.context.gl;return new so({func:I.NOTEQUAL,mask:255},b,255,I.KEEP,I.KEEP,I.REPLACE)}stencilModeForClipping(b){let I=this.context.gl;return new so({func:I.EQUAL,mask:255},this._tileClippingMaskIDs[b.key],0,I.KEEP,I.KEEP,I.REPLACE)}stencilConfigForOverlap(b){let I=this.context.gl,G=b.sort(((xe,ke)=>ke.overscaledZ-xe.overscaledZ)),H=G[G.length-1].overscaledZ,$=G[0].overscaledZ-H+1;if($>1){this.currentStencilSource=void 0,this.nextStencilID+$>256&&this.clearStencil();let xe={};for(let ke=0;ke<$;ke++)xe[ke+H]=new so({func:I.GEQUAL,mask:255},ke+this.nextStencilID,255,I.KEEP,I.KEEP,I.REPLACE);return this.nextStencilID+=$,[xe,G]}return[{[H]:so.disabled},G]}colorModeForRenderPass(){let b=this.context.gl;return this._showOverdrawInspector?new is([b.CONSTANT_COLOR,b.ONE],new i.aM(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?is.unblended:is.alphaBlended}depthModeForSublayer(b,I,G){if(!this.opaquePassEnabledForLayer())return Wi.disabled;let H=1-((1+this.currentLayer)*this.numSublayers+b)*this.depthEpsilon;return new Wi(G||this.context.gl.LEQUAL,I,[H,H])}opaquePassEnabledForLayer(){return this.currentLayer({u_sky_color:be.properties.get("sky-color"),u_horizon_color:be.properties.get("horizon-color"),u_horizon:(De.height/2+De.getHorizon())*Se,u_sky_horizon_blend:be.properties.get("sky-horizon-blend")*De.height/2*Se}))(et,Ne.style.map.transform,Ne.pixelRatio),Yt=new Wi(Tt.LEQUAL,Wi.ReadWrite,[0,1]),Q=so.disabled,ae=Ne.colorModeForRenderPass(),ve=Ne.useProgram("sky");if(!et.mesh){let be=new i.aX;be.emplaceBack(-1,-1),be.emplaceBack(1,-1),be.emplaceBack(1,1),be.emplaceBack(-1,1);let De=new i.aY;De.emplaceBack(0,1,2),De.emplaceBack(0,2,3),et.mesh=new ru(bt.createVertexBuffer(be,Pi.members),bt.createIndexBuffer(De),i.a0.simpleSegment(0,0,be.length,De.length))}ve.draw(bt,Tt.TRIANGLES,Yt,Q,ae,ei.disabled,zt,void 0,"sky",et.mesh.vertexBuffer,et.mesh.indexBuffer,et.mesh.segments)})(this,this.style.sky),this._showOverdrawInspector=I.showOverdrawInspector,this.depthRangeFor3D=[0,1-(b._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=G.length-1;this.currentLayer>=0;this.currentLayer--){let Ne=this.style._layers[G[this.currentLayer]],et=H[Ne.source],bt=$[Ne.source];this._renderTileClippingMasks(Ne,bt),this.renderLayer(this,et,Ne,bt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerve.source&&!ve.isHidden(bt)?[et.sourceCaches[ve.source]]:[])),Yt=zt.filter((ve=>ve.getSource().type==="vector")),Q=zt.filter((ve=>ve.getSource().type!=="vector")),ae=ve=>{(!Tt||Tt.getSource().maxzoomae(ve))),Tt||Q.forEach((ve=>ae(ve))),Tt})(this.style,this.transform.zoom);Ne&&(function(et,bt,Tt){for(let zt=0;zt0),H&&(i.b0(I,G),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,(function($,xe){let ke=$.context,Ne=ke.gl,et=is.unblended,bt=new Wi(Ne.LEQUAL,Wi.ReadWrite,[0,1]),Tt=xe.getTerrainMesh(),zt=xe.sourceCache.getRenderableTiles(),Yt=$.useProgram("terrainDepth");ke.bindFramebuffer.set(xe.getFramebuffer("depth").framebuffer),ke.viewport.set([0,0,$.width/devicePixelRatio,$.height/devicePixelRatio]),ke.clear({color:i.aM.transparent,depth:1});for(let Q of zt){let ae=xe.getTerrainData(Q.tileID),ve={u_matrix:$.transform.calculatePosMatrix(Q.tileID.toUnwrapped()),u_ele_delta:xe.getMeshFrameDelta($.transform.zoom)};Yt.draw(ke,Ne.TRIANGLES,bt,so.disabled,et,ei.backCCW,ve,ae,"terrain",Tt.vertexBuffer,Tt.indexBuffer,Tt.segments)}ke.bindFramebuffer.set(null),ke.viewport.set([0,0,$.width,$.height])})(this,this.style.map.terrain),(function($,xe){let ke=$.context,Ne=ke.gl,et=is.unblended,bt=new Wi(Ne.LEQUAL,Wi.ReadWrite,[0,1]),Tt=xe.getTerrainMesh(),zt=xe.getCoordsTexture(),Yt=xe.sourceCache.getRenderableTiles(),Q=$.useProgram("terrainCoords");ke.bindFramebuffer.set(xe.getFramebuffer("coords").framebuffer),ke.viewport.set([0,0,$.width/devicePixelRatio,$.height/devicePixelRatio]),ke.clear({color:i.aM.transparent,depth:1}),xe.coordsIndex=[];for(let ae of Yt){let ve=xe.getTerrainData(ae.tileID);ke.activeTexture.set(Ne.TEXTURE0),Ne.bindTexture(Ne.TEXTURE_2D,zt.texture);let be={u_matrix:$.transform.calculatePosMatrix(ae.tileID.toUnwrapped()),u_terrain_coords_id:(255-xe.coordsIndex.length)/255,u_texture:0,u_ele_delta:xe.getMeshFrameDelta($.transform.zoom)};Q.draw(ke,Ne.TRIANGLES,bt,so.disabled,et,ei.backCCW,be,ve,"terrain",Tt.vertexBuffer,Tt.indexBuffer,Tt.segments),xe.coordsIndex.push(ae.tileID.key)}ke.bindFramebuffer.set(null),ke.viewport.set([0,0,$.width,$.height])})(this,this.style.map.terrain))}renderLayer(b,I,G,H){if(!G.isHidden(this.transform.zoom)&&(G.type==="background"||G.type==="custom"||(H||[]).length))switch(this.id=G.id,G.type){case"symbol":(function($,xe,ke,Ne,et){if($.renderPass!=="translucent")return;let bt=so.disabled,Tt=$.colorModeForRenderPass();(ke._unevaluatedLayout.hasValue("text-variable-anchor")||ke._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(zt,Yt,Q,ae,ve,be,De,Se,Be){let ut=Yt.transform,gt=Hi(),Mt=ve==="map",Ft=be==="map";for(let Ot of zt){let er=ae.getTile(Ot),sr=er.getBucket(Q);if(!sr||!sr.text||!sr.text.segments.get().length)continue;let wr=i.ag(sr.textSizeData,ut.zoom),Gr=Nn(er,1,Yt.transform.zoom),pn=tr(Ot.posMatrix,Ft,Mt,Yt.transform,Gr),cn=Q.layout.get("icon-text-fit")!=="none"&&sr.hasIconData();if(wr){let kn=Math.pow(2,ut.zoom-er.tileID.overscaledZ),ta=Yt.style.map.terrain?(va,Xa)=>Yt.style.map.terrain.getElevation(Ot,va,Xa):null,ka=gt.translatePosition(ut,er,De,Se);Ac(sr,Mt,Ft,Be,ut,pn,Ot.posMatrix,kn,wr,cn,gt,ka,Ot.toUnwrapped(),ta)}}})(Ne,$,ke,xe,ke.layout.get("text-rotation-alignment"),ke.layout.get("text-pitch-alignment"),ke.paint.get("text-translate"),ke.paint.get("text-translate-anchor"),et),ke.paint.get("icon-opacity").constantOr(1)!==0&&ah($,xe,ke,Ne,!1,ke.paint.get("icon-translate"),ke.paint.get("icon-translate-anchor"),ke.layout.get("icon-rotation-alignment"),ke.layout.get("icon-pitch-alignment"),ke.layout.get("icon-keep-upright"),bt,Tt),ke.paint.get("text-opacity").constantOr(1)!==0&&ah($,xe,ke,Ne,!0,ke.paint.get("text-translate"),ke.paint.get("text-translate-anchor"),ke.layout.get("text-rotation-alignment"),ke.layout.get("text-pitch-alignment"),ke.layout.get("text-keep-upright"),bt,Tt),xe.map.showCollisionBoxes&&(Wc($,xe,ke,Ne,!0),Wc($,xe,ke,Ne,!1))})(b,I,G,H,this.style.placement.variableOffsets);break;case"circle":(function($,xe,ke,Ne){if($.renderPass!=="translucent")return;let et=ke.paint.get("circle-opacity"),bt=ke.paint.get("circle-stroke-width"),Tt=ke.paint.get("circle-stroke-opacity"),zt=!ke.layout.get("circle-sort-key").isConstant();if(et.constantOr(1)===0&&(bt.constantOr(1)===0||Tt.constantOr(1)===0))return;let Yt=$.context,Q=Yt.gl,ae=$.depthModeForSublayer(0,Wi.ReadOnly),ve=so.disabled,be=$.colorModeForRenderPass(),De=[];for(let Se=0;SeSe.sortKey-Be.sortKey));for(let Se of De){let{programConfiguration:Be,program:ut,layoutVertexBuffer:gt,indexBuffer:Mt,uniformValues:Ft,terrainData:Ot}=Se.state;ut.draw(Yt,Q.TRIANGLES,ae,ve,be,ei.disabled,Ft,Ot,ke.id,gt,Mt,Se.segments,ke.paint,$.transform.zoom,Be)}})(b,I,G,H);break;case"heatmap":(function($,xe,ke,Ne){if(ke.paint.get("heatmap-opacity")===0)return;let et=$.context;if($.style.map.terrain){for(let bt of Ne){let Tt=xe.getTile(bt);xe.hasRenderableParent(bt)||($.renderPass==="offscreen"?Mc($,Tt,ke,bt):$.renderPass==="translucent"&&Sc($,ke,bt))}et.viewport.set([0,0,$.width,$.height])}else $.renderPass==="offscreen"?(function(bt,Tt,zt,Yt){let Q=bt.context,ae=Q.gl,ve=so.disabled,be=new is([ae.ONE,ae.ONE],i.aM.transparent,[!0,!0,!0,!0]);(function(De,Se,Be){let ut=De.gl;De.activeTexture.set(ut.TEXTURE1),De.viewport.set([0,0,Se.width/4,Se.height/4]);let gt=Be.heatmapFbos.get(i.aU);gt?(ut.bindTexture(ut.TEXTURE_2D,gt.colorAttachment.get()),De.bindFramebuffer.set(gt.framebuffer)):(gt=Rf(De,Se.width/4,Se.height/4),Be.heatmapFbos.set(i.aU,gt))})(Q,bt,zt),Q.clear({color:i.aM.transparent});for(let De=0;De20&&bt.texParameterf(bt.TEXTURE_2D,et.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,et.extTextureFilterAnisotropicMax);let sr=$.style.map.terrain&&$.style.map.terrain.getTerrainData(De),wr=sr?De:null,Gr=wr?wr.posMatrix:$.transform.calculatePosMatrix(De.toUnwrapped(),be),pn=us(Gr,Ot||[0,0],Ft||1,Mt,ke);Tt instanceof mt?zt.draw(et,bt.TRIANGLES,Se,so.disabled,Yt,ei.disabled,pn,sr,ke.id,Tt.boundsBuffer,$.quadTriangleIndexBuffer,Tt.boundsSegments):zt.draw(et,bt.TRIANGLES,Se,Q[De.overscaledZ],Yt,ei.disabled,pn,sr,ke.id,$.rasterBoundsBuffer,$.quadTriangleIndexBuffer,$.rasterBoundsSegments)}})(b,I,G,H);break;case"background":(function($,xe,ke,Ne){let et=ke.paint.get("background-color"),bt=ke.paint.get("background-opacity");if(bt===0)return;let Tt=$.context,zt=Tt.gl,Yt=$.transform,Q=Yt.tileSize,ae=ke.paint.get("background-pattern");if($.isPatternMissing(ae))return;let ve=!ae&&et.a===1&&bt===1&&$.opaquePassEnabledForLayer()?"opaque":"translucent";if($.renderPass!==ve)return;let be=so.disabled,De=$.depthModeForSublayer(0,ve==="opaque"?Wi.ReadWrite:Wi.ReadOnly),Se=$.colorModeForRenderPass(),Be=$.useProgram(ae?"backgroundPattern":"background"),ut=Ne||Yt.coveringTiles({tileSize:Q,terrain:$.style.map.terrain});ae&&(Tt.activeTexture.set(zt.TEXTURE0),$.imageManager.bind($.context));let gt=ke.getCrossfadeParameters();for(let Mt of ut){let Ft=Ne?Mt.posMatrix:$.transform.calculatePosMatrix(Mt.toUnwrapped()),Ot=ae?Fl(Ft,bt,$,ae,{tileID:Mt,tileSize:Q},gt):Bs(Ft,bt,et),er=$.style.map.terrain&&$.style.map.terrain.getTerrainData(Mt);Be.draw(Tt,zt.TRIANGLES,De,be,Se,ei.disabled,Ot,er,ke.id,$.tileExtentBuffer,$.quadTriangleIndexBuffer,$.tileExtentSegments)}})(b,0,G,H);break;case"custom":(function($,xe,ke){let Ne=$.context,et=ke.implementation;if($.renderPass==="offscreen"){let bt=et.prerender;bt&&($.setCustomLayerDefaults(),Ne.setColorMode($.colorModeForRenderPass()),bt.call(et,Ne.gl,$.transform.customLayerMatrix()),Ne.setDirty(),$.setBaseState())}else if($.renderPass==="translucent"){$.setCustomLayerDefaults(),Ne.setColorMode($.colorModeForRenderPass()),Ne.setStencilMode(so.disabled);let bt=et.renderingMode==="3d"?new Wi($.context.gl.LEQUAL,Wi.ReadWrite,$.depthRangeFor3D):$.depthModeForSublayer(0,Wi.ReadOnly);Ne.setDepthMode(bt),et.render(Ne.gl,$.transform.customLayerMatrix(),{farZ:$.transform.farZ,nearZ:$.transform.nearZ,fov:$.transform._fov,modelViewProjectionMatrix:$.transform.modelViewProjectionMatrix,projectionMatrix:$.transform.projectionMatrix}),Ne.setDirty(),$.setBaseState(),Ne.bindFramebuffer.set(null)}})(b,0,G)}}translatePosMatrix(b,I,G,H,$){if(!G[0]&&!G[1])return b;let xe=$?H==="map"?this.transform.angle:0:H==="viewport"?-this.transform.angle:0;if(xe){let et=Math.sin(xe),bt=Math.cos(xe);G=[G[0]*bt-G[1]*et,G[0]*et+G[1]*bt]}let ke=[$?G[0]:Nn(I,G[0],this.transform.zoom),$?G[1]:Nn(I,G[1],this.transform.zoom),0],Ne=new Float32Array(16);return i.J(Ne,b,ke),Ne}saveTileTexture(b){let I=this._tileTextures[b.size[0]];I?I.push(b):this._tileTextures[b.size[0]]=[b]}getTileTexture(b){let I=this._tileTextures[b];return I&&I.length>0?I.pop():null}isPatternMissing(b){if(!b)return!1;if(!b.from||!b.to)return!0;let I=this.imageManager.getPattern(b.from.toString()),G=this.imageManager.getPattern(b.to.toString());return!I||!G}useProgram(b,I){this.cache=this.cache||{};let G=b+(I?I.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[G]||(this.cache[G]=new xn(this.context,ia[b],I,Eu[b],this._showOverdrawInspector,this.style.map.terrain)),this.cache[G]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let b=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(b.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new p(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:b,drawingBufferHeight:I}=this.context.gl;return this.width!==b||this.height!==I}}class Ko{constructor(b,I){this.points=b,this.planes=I}static fromInvProjectionMatrix(b,I,G){let H=Math.pow(2,G),$=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((ke=>{let Ne=1/(ke=i.af([],ke,b))[3]/I*H;return i.b1(ke,ke,[Ne,Ne,1/ke[3],Ne])})),xe=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map((ke=>{let Ne=(function(zt,Yt){var Q=Yt[0],ae=Yt[1],ve=Yt[2],be=Q*Q+ae*ae+ve*ve;return be>0&&(be=1/Math.sqrt(be)),zt[0]=Yt[0]*be,zt[1]=Yt[1]*be,zt[2]=Yt[2]*be,zt})([],(function(zt,Yt,Q){var ae=Yt[0],ve=Yt[1],be=Yt[2],De=Q[0],Se=Q[1],Be=Q[2];return zt[0]=ve*Be-be*Se,zt[1]=be*De-ae*Be,zt[2]=ae*Se-ve*De,zt})([],k([],$[ke[0]],$[ke[1]]),k([],$[ke[2]],$[ke[1]]))),et=-((bt=Ne)[0]*(Tt=$[ke[1]])[0]+bt[1]*Tt[1]+bt[2]*Tt[2]);var bt,Tt;return Ne.concat(et)}));return new Ko($,xe)}}class Hu{constructor(b,I){this.min=b,this.max=I,this.center=(function(G,H,$){return G[0]=.5*H[0],G[1]=.5*H[1],G[2]=.5*H[2],G})([],(function(G,H,$){return G[0]=H[0]+$[0],G[1]=H[1]+$[1],G[2]=H[2]+$[2],G})([],this.min,this.max))}quadrant(b){let I=[b%2==0,b<2],G=M(this.min),H=M(this.max);for(let $=0;$=0&&xe++;if(xe===0)return 0;xe!==I.length&&(G=!1)}if(G)return 2;for(let H=0;H<3;H++){let $=Number.MAX_VALUE,xe=-Number.MAX_VALUE;for(let ke=0;kethis.max[H]-this.min[H])return 0}return 1}}class Pl{constructor(b=0,I=0,G=0,H=0){if(isNaN(b)||b<0||isNaN(I)||I<0||isNaN(G)||G<0||isNaN(H)||H<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=b,this.bottom=I,this.left=G,this.right=H}interpolate(b,I,G){return I.top!=null&&b.top!=null&&(this.top=i.y.number(b.top,I.top,G)),I.bottom!=null&&b.bottom!=null&&(this.bottom=i.y.number(b.bottom,I.bottom,G)),I.left!=null&&b.left!=null&&(this.left=i.y.number(b.left,I.left,G)),I.right!=null&&b.right!=null&&(this.right=i.y.number(b.right,I.right,G)),this}getCenter(b,I){let G=i.ac((this.left+b-this.right)/2,0,b),H=i.ac((this.top+I-this.bottom)/2,0,I);return new i.P(G,H)}equals(b){return this.top===b.top&&this.bottom===b.bottom&&this.left===b.left&&this.right===b.right}clone(){return new Pl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let ic=85.051129;class Yc{constructor(b,I,G,H,$){this.tileSize=512,this._renderWorldCopies=$===void 0||!!$,this._minZoom=b||0,this._maxZoom=I||22,this._minPitch=G==null?0:G,this._maxPitch=H==null?60:H,this.setMaxBounds(),this.width=0,this.height=0,this._center=new i.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Pl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let b=new Yc(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return b.apply(this),b}apply(b){this.tileSize=b.tileSize,this.latRange=b.latRange,this.lngRange=b.lngRange,this.width=b.width,this.height=b.height,this._center=b._center,this._elevation=b._elevation,this.minElevationForCurrentTile=b.minElevationForCurrentTile,this.zoom=b.zoom,this.angle=b.angle,this._fov=b._fov,this._pitch=b._pitch,this._unmodified=b._unmodified,this._edgeInsets=b._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(b){this._minZoom!==b&&(this._minZoom=b,this.zoom=Math.max(this.zoom,b))}get maxZoom(){return this._maxZoom}set maxZoom(b){this._maxZoom!==b&&(this._maxZoom=b,this.zoom=Math.min(this.zoom,b))}get minPitch(){return this._minPitch}set minPitch(b){this._minPitch!==b&&(this._minPitch=b,this.pitch=Math.max(this.pitch,b))}get maxPitch(){return this._maxPitch}set maxPitch(b){this._maxPitch!==b&&(this._maxPitch=b,this.pitch=Math.min(this.pitch,b))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(b){b===void 0?b=!0:b===null&&(b=!1),this._renderWorldCopies=b}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new i.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(b){let I=-i.b3(b,-180,180)*Math.PI/180;this.angle!==I&&(this._unmodified=!1,this.angle=I,this._calcMatrices(),this.rotationMatrix=(function(){var G=new i.A(4);return i.A!=Float32Array&&(G[1]=0,G[2]=0),G[0]=1,G[3]=1,G})(),(function(G,H,$){var xe=H[0],ke=H[1],Ne=H[2],et=H[3],bt=Math.sin($),Tt=Math.cos($);G[0]=xe*Tt+Ne*bt,G[1]=ke*Tt+et*bt,G[2]=xe*-bt+Ne*Tt,G[3]=ke*-bt+et*Tt})(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(b){let I=i.ac(b,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==I&&(this._unmodified=!1,this._pitch=I,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(b){b=Math.max(.01,Math.min(60,b)),this._fov!==b&&(this._unmodified=!1,this._fov=b/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(b){let I=Math.min(Math.max(b,this.minZoom),this.maxZoom);this._zoom!==I&&(this._unmodified=!1,this._zoom=I,this.tileZoom=Math.max(0,Math.floor(I)),this.scale=this.zoomScale(I),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(b){b.lat===this._center.lat&&b.lng===this._center.lng||(this._unmodified=!1,this._center=b,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(b){b!==this._elevation&&(this._elevation=b,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(b){this._edgeInsets.equals(b)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,b,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(b){return this._edgeInsets.equals(b)}interpolatePadding(b,I,G){this._unmodified=!1,this._edgeInsets.interpolate(b,I,G),this._constrain(),this._calcMatrices()}coveringZoomLevel(b){let I=(b.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/b.tileSize));return Math.max(0,I)}getVisibleUnwrappedCoordinates(b){let I=[new i.b4(0,b)];if(this._renderWorldCopies){let G=this.pointCoordinate(new i.P(0,0)),H=this.pointCoordinate(new i.P(this.width,0)),$=this.pointCoordinate(new i.P(this.width,this.height)),xe=this.pointCoordinate(new i.P(0,this.height)),ke=Math.floor(Math.min(G.x,H.x,$.x,xe.x)),Ne=Math.floor(Math.max(G.x,H.x,$.x,xe.x)),et=1;for(let bt=ke-et;bt<=Ne+et;bt++)bt!==0&&I.push(new i.b4(bt,b))}return I}coveringTiles(b){var I,G;let H=this.coveringZoomLevel(b),$=H;if(b.minzoom!==void 0&&Hb.maxzoom&&(H=b.maxzoom);let xe=this.pointCoordinate(this.getCameraPoint()),ke=i.Z.fromLngLat(this.center),Ne=Math.pow(2,H),et=[Ne*xe.x,Ne*xe.y,0],bt=[Ne*ke.x,Ne*ke.y,0],Tt=Ko.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,H),zt=b.minzoom||0;!b.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(zt=H);let Yt=b.terrain?2/Math.min(this.tileSize,b.tileSize)*this.tileSize:3,Q=Se=>({aabb:new Hu([Se*Ne,0,0],[(Se+1)*Ne,Ne,0]),zoom:0,x:0,y:0,wrap:Se,fullyVisible:!1}),ae=[],ve=[],be=H,De=b.reparseOverscaled?$:H;if(this._renderWorldCopies)for(let Se=1;Se<=3;Se++)ae.push(Q(-Se)),ae.push(Q(Se));for(ae.push(Q(0));ae.length>0;){let Se=ae.pop(),Be=Se.x,ut=Se.y,gt=Se.fullyVisible;if(!gt){let sr=Se.aabb.intersects(Tt);if(sr===0)continue;gt=sr===2}let Mt=b.terrain?et:bt,Ft=Se.aabb.distanceX(Mt),Ot=Se.aabb.distanceY(Mt),er=Math.max(Math.abs(Ft),Math.abs(Ot));if(Se.zoom===be||er>Yt+(1<=zt){let sr=be-Se.zoom,wr=et[0]-.5-(Be<>1),pn=Se.zoom+1,cn=Se.aabb.quadrant(sr);if(b.terrain){let kn=new i.S(pn,Se.wrap,pn,wr,Gr),ta=b.terrain.getMinMaxElevation(kn),ka=(I=ta.minElevation)!==null&&I!==void 0?I:this.elevation,va=(G=ta.maxElevation)!==null&&G!==void 0?G:this.elevation;cn=new Hu([cn.min[0],cn.min[1],ka],[cn.max[0],cn.max[1],va])}ae.push({aabb:cn,zoom:pn,x:wr,y:Gr,wrap:Se.wrap,fullyVisible:gt})}}return ve.sort(((Se,Be)=>Se.distanceSq-Be.distanceSq)).map((Se=>Se.tileID))}resize(b,I){this.width=b,this.height=I,this.pixelsToGLUnits=[2/b,-2/I],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(b){return Math.pow(2,b)}scaleZoom(b){return Math.log(b)/Math.LN2}project(b){let I=i.ac(b.lat,-85.051129,ic);return new i.P(i.O(b.lng)*this.worldSize,i.Q(I)*this.worldSize)}unproject(b){return new i.Z(b.x/this.worldSize,b.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(b){let I=this.elevation,G=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,H=this.pointLocation(this.centerPoint,b),$=b.getElevationForLngLatZoom(H,this.tileZoom);if(!(this.elevation-$))return;let xe=G+I-$,ke=Math.cos(this._pitch)*this.cameraToCenterDistance/xe/i.b5(1,H.lat),Ne=this.scaleZoom(ke/this.tileSize);this._elevation=$,this._center=H,this.zoom=Ne}setLocationAtPoint(b,I){let G=this.pointCoordinate(I),H=this.pointCoordinate(this.centerPoint),$=this.locationCoordinate(b),xe=new i.Z($.x-(G.x-H.x),$.y-(G.y-H.y));this.center=this.coordinateLocation(xe),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(b,I){return I?this.coordinatePoint(this.locationCoordinate(b),I.getElevationForLngLatZoom(b,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(b))}pointLocation(b,I){return this.coordinateLocation(this.pointCoordinate(b,I))}locationCoordinate(b){return i.Z.fromLngLat(b)}coordinateLocation(b){return b&&b.toLngLat()}pointCoordinate(b,I){if(I){let zt=I.pointCoordinate(b);if(zt!=null)return zt}let G=[b.x,b.y,0,1],H=[b.x,b.y,1,1];i.af(G,G,this.pixelMatrixInverse),i.af(H,H,this.pixelMatrixInverse);let $=G[3],xe=H[3],ke=G[1]/$,Ne=H[1]/xe,et=G[2]/$,bt=H[2]/xe,Tt=et===bt?0:(0-et)/(bt-et);return new i.Z(i.y.number(G[0]/$,H[0]/xe,Tt)/this.worldSize,i.y.number(ke,Ne,Tt)/this.worldSize)}coordinatePoint(b,I=0,G=this.pixelMatrix){let H=[b.x*this.worldSize,b.y*this.worldSize,I,1];return i.af(H,H,G),new i.P(H[0]/H[3],H[1]/H[3])}getBounds(){let b=Math.max(0,this.height/2-this.getHorizon());return new le().extend(this.pointLocation(new i.P(0,b))).extend(this.pointLocation(new i.P(this.width,b))).extend(this.pointLocation(new i.P(this.width,this.height))).extend(this.pointLocation(new i.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new le([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(b){b?(this.lngRange=[b.getWest(),b.getEast()],this.latRange=[b.getSouth(),b.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,ic])}calculateTileMatrix(b){let I=b.canonical,G=this.worldSize/this.zoomScale(I.z),H=I.x+Math.pow(2,I.z)*b.wrap,$=i.an(new Float64Array(16));return i.J($,$,[H*G,I.y*G,0]),i.K($,$,[G/i.X,G/i.X,1]),$}calculatePosMatrix(b,I=!1){let G=b.key,H=I?this._alignedPosMatrixCache:this._posMatrixCache;if(H[G])return H[G];let $=this.calculateTileMatrix(b);return i.L($,I?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,$),H[G]=new Float32Array($),H[G]}calculateFogMatrix(b){let I=b.key,G=this._fogMatrixCache;if(G[I])return G[I];let H=this.calculateTileMatrix(b);return i.L(H,this.fogMatrix,H),G[I]=new Float32Array(H),G[I]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(b,I){I=i.ac(+I,this.minZoom,this.maxZoom);let G={center:new i.N(b.lng,b.lat),zoom:I},H=this.lngRange;if(!this._renderWorldCopies&&H===null){let Se=179.9999999999;H=[-Se,Se]}let $=this.tileSize*this.zoomScale(G.zoom),xe=0,ke=$,Ne=0,et=$,bt=0,Tt=0,{x:zt,y:Yt}=this.size;if(this.latRange){let Se=this.latRange;xe=i.Q(Se[1])*$,ke=i.Q(Se[0])*$,ke-xeke&&(be=ke-Se)}if(H){let Se=(Ne+et)/2,Be=Q;this._renderWorldCopies&&(Be=i.b3(Q,Se-$/2,Se+$/2));let ut=zt/2;Be-utet&&(ve=et-ut)}if(ve!==void 0||be!==void 0){let Se=new i.P(ve!=null?ve:Q,be!=null?be:ae);G.center=this.unproject.call({worldSize:$},Se).wrap()}return G}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let b=this._unmodified,{center:I,zoom:G}=this.getConstrained(this.center,this.zoom);this.center=I,this.zoom=G,this._unmodified=b,this._constraining=!1}_calcMatrices(){if(!this.height)return;let b=this.centerOffset,I=this.point.x,G=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=i.b5(1,this.center.lat)*this.worldSize;let H=i.an(new Float64Array(16));i.K(H,H,[this.width/2,-this.height/2,1]),i.J(H,H,[1,-1,0]),this.labelPlaneMatrix=H,H=i.an(new Float64Array(16)),i.K(H,H,[1,-1,1]),i.J(H,H,[-1,-1,0]),i.K(H,H,[2/this.width,2/this.height,1]),this.glCoordMatrix=H;let $=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),xe=Math.min(this.elevation,this.minElevationForCurrentTile),ke=$-xe*this._pixelPerMeter/Math.cos(this._pitch),Ne=xe<0?ke:$,et=Math.PI/2+this._pitch,bt=this._fov*(.5+b.y/this.height),Tt=Math.sin(bt)*Ne/Math.sin(i.ac(Math.PI-et-bt,.01,Math.PI-.01)),zt=this.getHorizon(),Yt=2*Math.atan(zt/this.cameraToCenterDistance)*(.5+b.y/(2*zt)),Q=Math.sin(Yt)*Ne/Math.sin(i.ac(Math.PI-et-Yt,.01,Math.PI-.01)),ae=Math.min(Tt,Q);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*ae+Ne),this.nearZ=this.height/50,H=new Float64Array(16),i.b6(H,this._fov,this.width/this.height,this.nearZ,this.farZ),H[8]=2*-b.x/this.width,H[9]=2*b.y/this.height,this.projectionMatrix=i.ae(H),i.K(H,H,[1,-1,1]),i.J(H,H,[0,0,-this.cameraToCenterDistance]),i.b7(H,H,this._pitch),i.ad(H,H,this.angle),i.J(H,H,[-I,-G,0]),this.mercatorMatrix=i.K([],H,[this.worldSize,this.worldSize,this.worldSize]),i.K(H,H,[1,1,this._pixelPerMeter]),this.pixelMatrix=i.L(new Float64Array(16),this.labelPlaneMatrix,H),i.J(H,H,[0,0,-this.elevation]),this.modelViewProjectionMatrix=H,this.invModelViewProjectionMatrix=i.as([],H),this.fogMatrix=new Float64Array(16),i.b6(this.fogMatrix,this._fov,this.width/this.height,$,this.farZ),this.fogMatrix[8]=2*-b.x/this.width,this.fogMatrix[9]=2*b.y/this.height,i.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),i.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),i.b7(this.fogMatrix,this.fogMatrix,this._pitch),i.ad(this.fogMatrix,this.fogMatrix,this.angle),i.J(this.fogMatrix,this.fogMatrix,[-I,-G,0]),i.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),i.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=i.L(new Float64Array(16),this.labelPlaneMatrix,H);let ve=this.width%2/2,be=this.height%2/2,De=Math.cos(this.angle),Se=Math.sin(this.angle),Be=I-Math.round(I)+De*ve+Se*be,ut=G-Math.round(G)+De*be+Se*ve,gt=new Float64Array(H);if(i.J(gt,gt,[Be>.5?Be-1:Be,ut>.5?ut-1:ut,0]),this.alignedModelViewProjectionMatrix=gt,H=i.as(new Float64Array(16),this.pixelMatrix),!H)throw new Error("failed to invert matrix");this.pixelMatrixInverse=H,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let b=this.pointCoordinate(new i.P(0,0)),I=[b.x*this.worldSize,b.y*this.worldSize,0,1];return i.af(I,I,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let b=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.P(0,b))}getCameraQueryGeometry(b){let I=this.getCameraPoint();if(b.length===1)return[b[0],I];{let G=I.x,H=I.y,$=I.x,xe=I.y;for(let ke of b)G=Math.min(G,ke.x),H=Math.min(H,ke.y),$=Math.max($,ke.x),xe=Math.max(xe,ke.y);return[new i.P(G,H),new i.P($,H),new i.P($,xe),new i.P(G,xe),new i.P(G,H)]}}lngLatToCameraDepth(b,I){let G=this.locationCoordinate(b),H=[G.x*this.worldSize,G.y*this.worldSize,I,1];return i.af(H,H,this.modelViewProjectionMatrix),H[2]/H[3]}}function zf(K,b){let I,G=!1,H=null,$=null,xe=()=>{H=null,G&&(K.apply($,I),H=setTimeout(xe,b),G=!1)};return(...ke)=>(G=!0,$=this,I=ke,H||xe(),H)}class lh{constructor(b){this._getCurrentHash=()=>{let I=window.location.hash.replace("#","");if(this._hashName){let G;return I.split("&").map((H=>H.split("="))).forEach((H=>{H[0]===this._hashName&&(G=H)})),(G&&G[1]||"").split("/")}return I.split("/")},this._onHashChange=()=>{let I=this._getCurrentHash();if(I.length>=3&&!I.some((G=>isNaN(G)))){let G=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(I[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+I[2],+I[1]],zoom:+I[0],bearing:G,pitch:+(I[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let I=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,I)},this._removeHash=()=>{let I=this._getCurrentHash();if(I.length===0)return;let G=I.join("/"),H=G;H.split("&").length>0&&(H=H.split("&")[0]),this._hashName&&(H=`${this._hashName}=${G}`);let $=window.location.hash.replace(H,"");$.startsWith("#&")?$=$.slice(0,1)+$.slice(2):$==="#"&&($="");let xe=window.location.href.replace(/(#.+)?$/,$);xe=xe.replace("&&","&"),window.history.replaceState(window.history.state,null,xe)},this._updateHash=zf(this._updateHashUnthrottled,300),this._hashName=b&&encodeURIComponent(b)}addTo(b){return this._map=b,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(b){let I=this._map.getCenter(),G=Math.round(100*this._map.getZoom())/100,H=Math.ceil((G*Math.LN2+Math.log(512/360/.5))/Math.LN10),$=Math.pow(10,H),xe=Math.round(I.lng*$)/$,ke=Math.round(I.lat*$)/$,Ne=this._map.getBearing(),et=this._map.getPitch(),bt="";if(bt+=b?`/${xe}/${ke}/${G}`:`${G}/${ke}/${xe}`,(Ne||et)&&(bt+="/"+Math.round(10*Ne)/10),et&&(bt+=`/${Math.round(et)}`),this._hashName){let Tt=this._hashName,zt=!1,Yt=window.location.hash.slice(1).split("&").map((Q=>{let ae=Q.split("=")[0];return ae===Tt?(zt=!0,`${ae}=${bt}`):Q})).filter((Q=>Q));return zt||Yt.push(`${Tt}=${bt}`),`#${Yt.join("&")}`}return`#${bt}`}}let yu={linearity:.3,easing:i.b8(0,0,.3,1)},ju=i.e({deceleration:2500,maxSpeed:1400},yu),Lu=i.e({deceleration:20,maxSpeed:1400},yu),Id=i.e({deceleration:1e3,maxSpeed:360},yu),Xc=i.e({deceleration:1e3,maxSpeed:90},yu);class Jh{constructor(b){this._map=b,this.clear()}clear(){this._inertiaBuffer=[]}record(b){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:u.now(),settings:b})}_drainInertiaBuffer(){let b=this._inertiaBuffer,I=u.now();for(;b.length>0&&I-b[0].time>160;)b.shift()}_onMoveEnd(b){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let I={zoom:0,bearing:0,pitch:0,pan:new i.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:$}of this._inertiaBuffer)I.zoom+=$.zoomDelta||0,I.bearing+=$.bearingDelta||0,I.pitch+=$.pitchDelta||0,$.panDelta&&I.pan._add($.panDelta),$.around&&(I.around=$.around),$.pinchAround&&(I.pinchAround=$.pinchAround);let G=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,H={};if(I.pan.mag()){let $=Cc(I.pan.mag(),G,i.e({},ju,b||{}));H.offset=I.pan.mult($.amount/I.pan.mag()),H.center=this._map.transform.center,Vl(H,$)}if(I.zoom){let $=Cc(I.zoom,G,Lu);H.zoom=this._map.transform.zoom+$.amount,Vl(H,$)}if(I.bearing){let $=Cc(I.bearing,G,Id);H.bearing=this._map.transform.bearing+i.ac($.amount,-179,179),Vl(H,$)}if(I.pitch){let $=Cc(I.pitch,G,Xc);H.pitch=this._map.transform.pitch+$.amount,Vl(H,$)}if(H.zoom||H.bearing){let $=I.pinchAround===void 0?I.around:I.pinchAround;H.around=$?this._map.unproject($):this._map.getCenter()}return this.clear(),i.e(H,{noMoveStart:!0})}}function Vl(K,b){(!K.duration||K.durationI.unproject(Ne))),ke=$.reduce(((Ne,et,bt,Tt)=>Ne.add(et.div(Tt.length))),new i.P(0,0));super(b,{points:$,point:ke,lngLats:xe,lngLat:I.unproject(ke),originalEvent:G}),this._defaultPrevented=!1}}class xd extends i.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(b,I,G){super(b,{originalEvent:G}),this._defaultPrevented=!1}}class qf{constructor(b,I){this._map=b,this._clickTolerance=I.clickTolerance}reset(){delete this._mousedownPos}wheel(b){return this._firePreventable(new xd(b.type,this._map,b))}mousedown(b,I){return this._mousedownPos=I,this._firePreventable(new Fs(b.type,this._map,b))}mouseup(b){this._map.fire(new Fs(b.type,this._map,b))}click(b,I){this._mousedownPos&&this._mousedownPos.dist(I)>=this._clickTolerance||this._map.fire(new Fs(b.type,this._map,b))}dblclick(b){return this._firePreventable(new Fs(b.type,this._map,b))}mouseover(b){this._map.fire(new Fs(b.type,this._map,b))}mouseout(b){this._map.fire(new Fs(b.type,this._map,b))}touchstart(b){return this._firePreventable(new oc(b.type,this._map,b))}touchmove(b){this._map.fire(new oc(b.type,this._map,b))}touchend(b){this._map.fire(new oc(b.type,this._map,b))}touchcancel(b){this._map.fire(new oc(b.type,this._map,b))}_firePreventable(b){if(this._map.fire(b),b.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Lo{constructor(b){this._map=b}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(b){this._map.fire(new Fs(b.type,this._map,b))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Fs("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(b){this._delayContextMenu?this._contextMenuEvent=b:this._ignoreContextMenu||this._map.fire(new Fs(b.type,this._map,b)),this._map.listens("contextmenu")&&b.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class wl{constructor(b){this._map=b}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(b){return this.transform.pointLocation(i.P.convert(b),this._map.terrain)}}class Dl{constructor(b,I){this._map=b,this._tr=new wl(b),this._el=b.getCanvasContainer(),this._container=b.getContainer(),this._clickTolerance=I.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(b,I){this.isEnabled()&&b.shiftKey&&b.button===0&&(c.disableDrag(),this._startPos=this._lastPos=I,this._active=!0)}mousemoveWindow(b,I){if(!this._active)return;let G=I;if(this._lastPos.equals(G)||!this._box&&G.dist(this._startPos)$.fitScreenCoordinates(G,H,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",b)}keydown(b){this._active&&b.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",b))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(c.remove(this._box),this._box=null),c.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(b,I){return this._map.fire(new i.k(b,{originalEvent:I}))}}function Bf(K,b){if(K.length!==b.length)throw new Error(`The number of touches and points are not equal - touches ${K.length}, points ${b.length}`);let I={};for(let G=0;Gthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=b.timeStamp),G.length===this.numTouches&&(this.centroid=(function(H){let $=new i.P(0,0);for(let xe of H)$._add(xe);return $.div(H.length)})(I),this.touches=Bf(G,I)))}touchmove(b,I,G){if(this.aborted||!this.centroid)return;let H=Bf(G,I);for(let $ in this.touches){let xe=H[$];(!xe||xe.dist(this.touches[$])>30)&&(this.aborted=!0)}}touchend(b,I,G){if((!this.centroid||b.timeStamp-this.startTime>500)&&(this.aborted=!0),G.length===0){let H=!this.aborted&&this.centroid;if(this.reset(),H)return H}}}class Lc{constructor(b){this.singleTap=new Of(b),this.numTaps=b.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(b,I,G){this.singleTap.touchstart(b,I,G)}touchmove(b,I,G){this.singleTap.touchmove(b,I,G)}touchend(b,I,G){let H=this.singleTap.touchend(b,I,G);if(H){let $=b.timeStamp-this.lastTime<500,xe=!this.lastTap||this.lastTap.dist(H)<30;if($&&xe||this.reset(),this.count++,this.lastTime=b.timeStamp,this.lastTap=H,this.count===this.numTaps)return this.reset(),H}}}class Fc{constructor(b){this._tr=new wl(b),this._zoomIn=new Lc({numTouches:1,numTaps:2}),this._zoomOut=new Lc({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(b,I,G){this._zoomIn.touchstart(b,I,G),this._zoomOut.touchstart(b,I,G)}touchmove(b,I,G){this._zoomIn.touchmove(b,I,G),this._zoomOut.touchmove(b,I,G)}touchend(b,I,G){let H=this._zoomIn.touchend(b,I,G),$=this._zoomOut.touchend(b,I,G),xe=this._tr;return H?(this._active=!0,b.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:ke=>ke.easeTo({duration:300,zoom:xe.zoom+1,around:xe.unproject(H)},{originalEvent:b})}):$?(this._active=!0,b.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:ke=>ke.easeTo({duration:300,zoom:xe.zoom-1,around:xe.unproject($)},{originalEvent:b})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nu{constructor(b){this._enabled=!!b.enable,this._moveStateManager=b.moveStateManager,this._clickTolerance=b.clickTolerance||1,this._moveFunction=b.move,this._activateOnStart=!!b.activateOnStart,b.assignEvents(this),this.reset()}reset(b){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(b)}_move(...b){let I=this._moveFunction(...b);if(I.bearingDelta||I.pitchDelta||I.around||I.panDelta)return this._active=!0,I}dragStart(b,I){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(b)&&(this._moveStateManager.startMove(b),this._lastPoint=I.length?I[0]:I,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(b,I){if(!this.isEnabled())return;let G=this._lastPoint;if(!G)return;if(b.preventDefault(),!this._moveStateManager.isValidMoveEvent(b))return void this.reset(b);let H=I.length?I[0]:I;return!this._moved&&H.dist(G){K.mousedown=K.dragStart,K.mousemoveWindow=K.dragMove,K.mouseup=K.dragEnd,K.contextmenu=b=>{b.preventDefault()}},uh=({enable:K,clickTolerance:b,bearingDegreesPerPixelMoved:I=.8})=>{let G=new sc({checkCorrectEvent:H=>c.mouseButton(H)===0&&H.ctrlKey||c.mouseButton(H)===2});return new nu({clickTolerance:b,move:(H,$)=>({bearingDelta:($.x-H.x)*I}),moveStateManager:G,enable:K,assignEvents:Uf})},Qh=({enable:K,clickTolerance:b,pitchDegreesPerPixelMoved:I=-.5})=>{let G=new sc({checkCorrectEvent:H=>c.mouseButton(H)===0&&H.ctrlKey||c.mouseButton(H)===2});return new nu({clickTolerance:b,move:(H,$)=>({pitchDelta:($.y-H.y)*I}),moveStateManager:G,enable:K,assignEvents:Uf})};class hf{constructor(b,I){this._clickTolerance=b.clickTolerance||1,this._map=I,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new i.P(0,0)}_shouldBePrevented(b){return b<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(b,I,G){return this._calculateTransform(b,I,G)}touchmove(b,I,G){if(this._active){if(!this._shouldBePrevented(G.length))return b.preventDefault(),this._calculateTransform(b,I,G);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",b)}}touchend(b,I,G){this._calculateTransform(b,I,G),this._active&&this._shouldBePrevented(G.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(b,I,G){G.length>0&&(this._active=!0);let H=Bf(G,I),$=new i.P(0,0),xe=new i.P(0,0),ke=0;for(let et in H){let bt=H[et],Tt=this._touches[et];Tt&&($._add(bt),xe._add(bt.sub(Tt)),ke++,H[et]=bt)}if(this._touches=H,this._shouldBePrevented(ke)||!xe.mag())return;let Ne=xe.div(ke);return this._sum._add(Ne),this._sum.mag()Math.abs(K.x)}class Wu extends ch{constructor(b){super(),this._currentTouchCount=0,this._map=b}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(b,I,G){super.touchstart(b,I,G),this._currentTouchCount=G.length}_start(b){this._lastPoints=b,vf(b[0].sub(b[1]))&&(this._valid=!1)}_move(b,I,G){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let H=b[0].sub(this._lastPoints[0]),$=b[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(H,$,G.timeStamp),this._valid?(this._lastPoints=b,this._active=!0,{pitchDelta:(H.y+$.y)/2*-.5}):void 0}gestureBeginsVertically(b,I,G){if(this._valid!==void 0)return this._valid;let H=b.mag()>=2,$=I.mag()>=2;if(!H&&!$)return;if(!H||!$)return this._firstMove===void 0&&(this._firstMove=G),G-this._firstMove<100&&void 0;let xe=b.y>0==I.y>0;return vf(b)&&vf(I)&&xe}}let Je={panStep:100,bearingStep:15,pitchStep:10};class yt{constructor(b){this._tr=new wl(b);let I=Je;this._panStep=I.panStep,this._bearingStep=I.bearingStep,this._pitchStep=I.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(b){if(b.altKey||b.ctrlKey||b.metaKey)return;let I=0,G=0,H=0,$=0,xe=0;switch(b.keyCode){case 61:case 107:case 171:case 187:I=1;break;case 189:case 109:case 173:I=-1;break;case 37:b.shiftKey?G=-1:(b.preventDefault(),$=-1);break;case 39:b.shiftKey?G=1:(b.preventDefault(),$=1);break;case 38:b.shiftKey?H=1:(b.preventDefault(),xe=-1);break;case 40:b.shiftKey?H=-1:(b.preventDefault(),xe=1);break;default:return}return this._rotationDisabled&&(G=0,H=0),{cameraAnimation:ke=>{let Ne=this._tr;ke.easeTo({duration:300,easeId:"keyboardHandler",easing:Gt,zoom:I?Math.round(Ne.zoom)+I*(b.shiftKey?2:1):Ne.zoom,bearing:Ne.bearing+G*this._bearingStep,pitch:Ne.pitch+H*this._pitchStep,offset:[-$*this._panStep,-xe*this._panStep],center:Ne.center},{originalEvent:b})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Gt(K){return K*(2-K)}let Bt=4.000244140625;class mr{constructor(b,I){this._onTimeout=G=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(G)},this._map=b,this._tr=new wl(b),this._triggerRenderFrame=I,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(b){this._defaultZoomRate=b}setWheelZoomRate(b){this._wheelZoomRate=b}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(b){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!b&&b.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(b){return!!this._map.cooperativeGestures.isEnabled()&&!(b.ctrlKey||this._map.cooperativeGestures.isBypassed(b))}wheel(b){if(!this.isEnabled())return;if(this._shouldBePrevented(b))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",b);let I=b.deltaMode===WheelEvent.DOM_DELTA_LINE?40*b.deltaY:b.deltaY,G=u.now(),H=G-(this._lastWheelEventTime||0);this._lastWheelEventTime=G,I!==0&&I%Bt==0?this._type="wheel":I!==0&&Math.abs(I)<4?this._type="trackpad":H>400?(this._type=null,this._lastValue=I,this._timeout=setTimeout(this._onTimeout,40,b)):this._type||(this._type=Math.abs(H*I)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,I+=this._lastValue)),b.shiftKey&&I&&(I/=4),this._type&&(this._lastWheelEvent=b,this._delta-=I,this._active||this._start(b)),b.preventDefault()}_start(b){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let I=c.mousePos(this._map.getCanvas(),b),G=this._tr;this._around=I.y>G.transform.height/2-G.transform.getHorizon()?i.N.convert(this._aroundCenter?G.center:G.unproject(I)):i.N.convert(G.center),this._aroundPoint=G.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let b=this._tr.transform;if(this._delta!==0){let Ne=this._type==="wheel"&&Math.abs(this._delta)>Bt?this._wheelZoomRate:this._defaultZoomRate,et=2/(1+Math.exp(-Math.abs(this._delta*Ne)));this._delta<0&&et!==0&&(et=1/et);let bt=typeof this._targetZoom=="number"?b.zoomScale(this._targetZoom):b.scale;this._targetZoom=Math.min(b.maxZoom,Math.max(b.minZoom,b.scaleZoom(bt*et))),this._type==="wheel"&&(this._startZoom=b.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let I=typeof this._targetZoom=="number"?this._targetZoom:b.zoom,G=this._startZoom,H=this._easing,$,xe=!1,ke=u.now()-this._lastWheelEventTime;if(this._type==="wheel"&&G&&H&&ke){let Ne=Math.min(ke/200,1),et=H(Ne);$=i.y.number(G,I,et),Ne<1?this._frameId||(this._frameId=!0):xe=!0}else $=I,xe=!0;return this._active=!0,xe&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout}),200)),{noInertia:!0,needsRenderFrame:!xe,zoomDelta:$-b.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(b){let I=i.b9;if(this._prevEase){let G=this._prevEase,H=(u.now()-G.start)/G.duration,$=G.easing(H+.01)-G.easing(H),xe=.27/Math.sqrt($*$+1e-4)*.01,ke=Math.sqrt(.0729-xe*xe);I=i.b8(xe,ke,.25,1)}return this._prevEase={start:u.now(),duration:b,easing:I},I}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class Ur{constructor(b,I){this._clickZoom=b,this._tapZoom=I}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class en{constructor(b){this._tr=new wl(b),this.reset()}reset(){this._active=!1}dblclick(b,I){return b.preventDefault(),{cameraAnimation:G=>{G.easeTo({duration:300,zoom:this._tr.zoom+(b.shiftKey?-1:1),around:this._tr.unproject(I)},{originalEvent:b})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mn{constructor(){this._tap=new Lc({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(b,I,G){if(!this._swipePoint)if(this._tapTime){let H=I[0],$=b.timeStamp-this._tapTime<500,xe=this._tapPoint.dist(H)<30;$&&xe?G.length>0&&(this._swipePoint=H,this._swipeTouch=G[0].identifier):this.reset()}else this._tap.touchstart(b,I,G)}touchmove(b,I,G){if(this._tapTime){if(this._swipePoint){if(G[0].identifier!==this._swipeTouch)return;let H=I[0],$=H.y-this._swipePoint.y;return this._swipePoint=H,b.preventDefault(),this._active=!0,{zoomDelta:$/128}}}else this._tap.touchmove(b,I,G)}touchend(b,I,G){if(this._tapTime)this._swipePoint&&G.length===0&&this.reset();else{let H=this._tap.touchend(b,I,G);H&&(this._tapTime=b.timeStamp,this._tapPoint=H)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class An{constructor(b,I,G){this._el=b,this._mousePan=I,this._touchPan=G}enable(b){this._inertiaOptions=b||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Vn{constructor(b,I,G){this._pitchWithRotate=b.pitchWithRotate,this._mouseRotate=I,this._mousePitch=G}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class tn{constructor(b,I,G,H){this._el=b,this._touchZoom=I,this._touchRotate=G,this._tapDragZoom=H,this._rotationDisabled=!1,this._enabled=!0}enable(b){this._touchZoom.enable(b),this._rotationDisabled||this._touchRotate.enable(b),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class nn{constructor(b,I){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=b,this._options=I,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let b=this._map.getCanvasContainer();b.classList.add("maplibregl-cooperative-gestures"),this._container=c.create("div","maplibregl-cooperative-gesture-screen",b);let I=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(I=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let G=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),H=document.createElement("div");H.className="maplibregl-desktop-message",H.textContent=I,this._container.appendChild(H);let $=document.createElement("div");$.className="maplibregl-mobile-message",$.textContent=G,this._container.appendChild($),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(c.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(b){return b[this._bypassKey]}notifyGestureBlocked(b,I){this._enabled&&(this._map.fire(new i.k("cooperativegestureprevented",{gestureType:b,originalEvent:I})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}let dn=K=>K.zoom||K.drag||K.pitch||K.rotate;class Wr extends i.k{}function ea(K){return K.panDelta&&K.panDelta.mag()||K.zoomDelta||K.bearingDelta||K.pitchDelta}class Ca{constructor(b,I){this.handleWindowEvent=H=>{this.handleEvent(H,`${H.type}Window`)},this.handleEvent=(H,$)=>{if(H.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let xe=H.type==="renderFrame"?void 0:H,ke={needsRenderFrame:!1},Ne={},et={},bt=H.touches,Tt=bt?this._getMapTouches(bt):void 0,zt=Tt?c.touchPos(this._map.getCanvas(),Tt):c.mousePos(this._map.getCanvas(),H);for(let{handlerName:ae,handler:ve,allowed:be}of this._handlers){if(!ve.isEnabled())continue;let De;this._blockedByActive(et,be,ae)?ve.reset():ve[$||H.type]&&(De=ve[$||H.type](H,zt,Tt),this.mergeHandlerResult(ke,Ne,De,ae,xe),De&&De.needsRenderFrame&&this._triggerRenderFrame()),(De||ve.isActive())&&(et[ae]=ve)}let Yt={};for(let ae in this._previousActiveHandlers)et[ae]||(Yt[ae]=xe);this._previousActiveHandlers=et,(Object.keys(Yt).length||ea(ke))&&(this._changes.push([ke,Ne,Yt]),this._triggerRenderFrame()),(Object.keys(et).length||ea(ke))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Q}=ke;Q&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Q(this._map))},this._map=b,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Jh(b),this._bearingSnap=I.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(I);let G=this._el;this._listeners=[[G,"touchstart",{passive:!0}],[G,"touchmove",{passive:!1}],[G,"touchend",void 0],[G,"touchcancel",void 0],[G,"mousedown",void 0],[G,"mousemove",void 0],[G,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[G,"mouseover",void 0],[G,"mouseout",void 0],[G,"dblclick",void 0],[G,"click",void 0],[G,"keydown",{capture:!1}],[G,"keyup",void 0],[G,"wheel",{passive:!1}],[G,"contextmenu",void 0],[window,"blur",void 0]];for(let[H,$,xe]of this._listeners)c.addEventListener(H,$,H===document?this.handleWindowEvent:this.handleEvent,xe)}destroy(){for(let[b,I,G]of this._listeners)c.removeEventListener(b,I,b===document?this.handleWindowEvent:this.handleEvent,G)}_addDefaultHandlers(b){let I=this._map,G=I.getCanvasContainer();this._add("mapEvent",new qf(I,b));let H=I.boxZoom=new Dl(I,b);this._add("boxZoom",H),b.interactive&&b.boxZoom&&H.enable();let $=I.cooperativeGestures=new nn(I,b.cooperativeGestures);this._add("cooperativeGestures",$),b.cooperativeGestures&&$.enable();let xe=new Fc(I),ke=new en(I);I.doubleClickZoom=new Ur(ke,xe),this._add("tapZoom",xe),this._add("clickZoom",ke),b.interactive&&b.doubleClickZoom&&I.doubleClickZoom.enable();let Ne=new mn;this._add("tapDragZoom",Ne);let et=I.touchPitch=new Wu(I);this._add("touchPitch",et),b.interactive&&b.touchPitch&&I.touchPitch.enable(b.touchPitch);let bt=uh(b),Tt=Qh(b);I.dragRotate=new Vn(b,bt,Tt),this._add("mouseRotate",bt,["mousePitch"]),this._add("mousePitch",Tt,["mouseRotate"]),b.interactive&&b.dragRotate&&I.dragRotate.enable();let zt=(({enable:De,clickTolerance:Se})=>{let Be=new sc({checkCorrectEvent:ut=>c.mouseButton(ut)===0&&!ut.ctrlKey});return new nu({clickTolerance:Se,move:(ut,gt)=>({around:gt,panDelta:gt.sub(ut)}),activateOnStart:!0,moveStateManager:Be,enable:De,assignEvents:Uf})})(b),Yt=new hf(b,I);I.dragPan=new An(G,zt,Yt),this._add("mousePan",zt),this._add("touchPan",Yt,["touchZoom","touchRotate"]),b.interactive&&b.dragPan&&I.dragPan.enable(b.dragPan);let Q=new ed,ae=new Fu;I.touchZoomRotate=new tn(G,ae,Q,Ne),this._add("touchRotate",Q,["touchPan","touchZoom"]),this._add("touchZoom",ae,["touchPan","touchRotate"]),b.interactive&&b.touchZoomRotate&&I.touchZoomRotate.enable(b.touchZoomRotate);let ve=I.scrollZoom=new mr(I,(()=>this._triggerRenderFrame()));this._add("scrollZoom",ve,["mousePan"]),b.interactive&&b.scrollZoom&&I.scrollZoom.enable(b.scrollZoom);let be=I.keyboard=new yt(I);this._add("keyboard",be),b.interactive&&b.keyboard&&I.keyboard.enable(),this._add("blockableMapEvent",new Lo(I))}_add(b,I,G){this._handlers.push({handlerName:b,handler:I,allowed:G}),this._handlersById[b]=I}stop(b){if(!this._updatingCamera){for(let{handler:I}of this._handlers)I.reset();this._inertia.clear(),this._fireEvents({},{},b),this._changes=[]}}isActive(){for(let{handler:b}of this._handlers)if(b.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!dn(this._eventsInProgress)||this.isZooming()}_blockedByActive(b,I,G){for(let H in b)if(H!==G&&(!I||I.indexOf(H)<0))return!0;return!1}_getMapTouches(b){let I=[];for(let G of b)this._el.contains(G.target)&&I.push(G);return I}mergeHandlerResult(b,I,G,H,$){if(!G)return;i.e(b,G);let xe={handlerName:H,originalEvent:G.originalEvent||$};G.zoomDelta!==void 0&&(I.zoom=xe),G.panDelta!==void 0&&(I.drag=xe),G.pitchDelta!==void 0&&(I.pitch=xe),G.bearingDelta!==void 0&&(I.rotate=xe)}_applyChanges(){let b={},I={},G={};for(let[H,$,xe]of this._changes)H.panDelta&&(b.panDelta=(b.panDelta||new i.P(0,0))._add(H.panDelta)),H.zoomDelta&&(b.zoomDelta=(b.zoomDelta||0)+H.zoomDelta),H.bearingDelta&&(b.bearingDelta=(b.bearingDelta||0)+H.bearingDelta),H.pitchDelta&&(b.pitchDelta=(b.pitchDelta||0)+H.pitchDelta),H.around!==void 0&&(b.around=H.around),H.pinchAround!==void 0&&(b.pinchAround=H.pinchAround),H.noInertia&&(b.noInertia=H.noInertia),i.e(I,$),i.e(G,xe);this._updateMapTransform(b,I,G),this._changes=[]}_updateMapTransform(b,I,G){let H=this._map,$=H._getTransformForUpdate(),xe=H.terrain;if(!(ea(b)||xe&&this._terrainMovement))return this._fireEvents(I,G,!0);let{panDelta:ke,zoomDelta:Ne,bearingDelta:et,pitchDelta:bt,around:Tt,pinchAround:zt}=b;zt!==void 0&&(Tt=zt),H._stop(!0),Tt=Tt||H.transform.centerPoint;let Yt=$.pointLocation(ke?Tt.sub(ke):Tt);et&&($.bearing+=et),bt&&($.pitch+=bt),Ne&&($.zoom+=Ne),xe?this._terrainMovement||!I.drag&&!I.zoom?I.drag&&this._terrainMovement?$.center=$.pointLocation($.centerPoint.sub(ke)):$.setLocationAtPoint(Yt,Tt):(this._terrainMovement=!0,this._map._elevationFreeze=!0,$.setLocationAtPoint(Yt,Tt)):$.setLocationAtPoint(Yt,Tt),H._applyUpdatedTransform($),this._map._update(),b.noInertia||this._inertia.record(b),this._fireEvents(I,G,!0)}_fireEvents(b,I,G){let H=dn(this._eventsInProgress),$=dn(b),xe={};for(let Tt in b){let{originalEvent:zt}=b[Tt];this._eventsInProgress[Tt]||(xe[`${Tt}start`]=zt),this._eventsInProgress[Tt]=b[Tt]}!H&&$&&this._fireEvent("movestart",$.originalEvent);for(let Tt in xe)this._fireEvent(Tt,xe[Tt]);$&&this._fireEvent("move",$.originalEvent);for(let Tt in b){let{originalEvent:zt}=b[Tt];this._fireEvent(Tt,zt)}let ke={},Ne;for(let Tt in this._eventsInProgress){let{handlerName:zt,originalEvent:Yt}=this._eventsInProgress[Tt];this._handlersById[zt].isActive()||(delete this._eventsInProgress[Tt],Ne=I[zt]||Yt,ke[`${Tt}end`]=Ne)}for(let Tt in ke)this._fireEvent(Tt,ke[Tt]);let et=dn(this._eventsInProgress),bt=(H||$)&&!et;if(bt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Tt=this._map._getTransformForUpdate();Tt.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Tt)}if(G&&bt){this._updatingCamera=!0;let Tt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),zt=Yt=>Yt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Wr("renderFrame",{timeStamp:b})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class Pa extends i.E{constructor(b,I){super(),this._renderFrameCallback=()=>{let G=Math.min((u.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(G)),G<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=b,this._bearingSnap=I.bearingSnap,this.on("moveend",(()=>{delete this._requestedCameraState}))}getCenter(){return new i.N(this.transform.center.lng,this.transform.center.lat)}setCenter(b,I){return this.jumpTo({center:b},I)}panBy(b,I,G){return b=i.P.convert(b).mult(-1),this.panTo(this.transform.center,i.e({offset:b},I),G)}panTo(b,I,G){return this.easeTo(i.e({center:b},I),G)}getZoom(){return this.transform.zoom}setZoom(b,I){return this.jumpTo({zoom:b},I),this}zoomTo(b,I,G){return this.easeTo(i.e({zoom:b},I),G)}zoomIn(b,I){return this.zoomTo(this.getZoom()+1,b,I),this}zoomOut(b,I){return this.zoomTo(this.getZoom()-1,b,I),this}getBearing(){return this.transform.bearing}setBearing(b,I){return this.jumpTo({bearing:b},I),this}getPadding(){return this.transform.padding}setPadding(b,I){return this.jumpTo({padding:b},I),this}rotateTo(b,I,G){return this.easeTo(i.e({bearing:b},I),G)}resetNorth(b,I){return this.rotateTo(0,i.e({duration:1e3},b),I),this}resetNorthPitch(b,I){return this.easeTo(i.e({bearing:0,pitch:0,duration:1e3},b),I),this}snapToNorth(b,I){return Math.abs(this.getBearing()){if(this._zooming&&(H.zoom=i.y.number($,ve,Mt)),this._rotating&&(H.bearing=i.y.number(xe,et,Mt)),this._pitching&&(H.pitch=i.y.number(ke,bt,Mt)),this._padding&&(H.interpolatePadding(Ne,Tt,Mt),Yt=H.centerPoint.add(zt)),this.terrain&&!b.freezeElevation&&this._updateElevation(Mt),Be)H.setLocationAtPoint(Be,ut);else{let Ft=H.zoomScale(H.zoom-$),Ot=ve>$?Math.min(2,Se):Math.max(.5,Se),er=Math.pow(Ot,1-Mt),sr=H.unproject(be.add(De.mult(Mt*er)).mult(Ft));H.setLocationAtPoint(H.renderWorldCopies?sr.wrap():sr,Yt)}this._applyUpdatedTransform(H),this._fireMoveEvents(I)}),(Mt=>{this.terrain&&b.freezeElevation&&this._finalizeElevation(),this._afterEase(I,Mt)}),b),this}_prepareEase(b,I,G={}){this._moving=!0,I||G.moving||this.fire(new i.k("movestart",b)),this._zooming&&!G.zooming&&this.fire(new i.k("zoomstart",b)),this._rotating&&!G.rotating&&this.fire(new i.k("rotatestart",b)),this._pitching&&!G.pitching&&this.fire(new i.k("pitchstart",b))}_prepareElevation(b){this._elevationCenter=b,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(b,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(b){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let I=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(b<1&&I!==this._elevationTarget){let G=this._elevationTarget-this._elevationStart;this._elevationStart+=b*(G-(I-(G*b+this._elevationStart))/(1-b)),this._elevationTarget=I}this.transform.elevation=i.y.number(this._elevationStart,this._elevationTarget,b)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(b){let I=b.getCameraPosition(),G=this.terrain.getElevationForLngLatZoom(I.lngLat,b.zoom);if(I.altitudethis._elevateCameraIfInsideTerrain(H))),this.transformCameraUpdate&&I.push((H=>this.transformCameraUpdate(H))),!I.length)return;let G=b.clone();for(let H of I){let $=G.clone(),{center:xe,zoom:ke,pitch:Ne,bearing:et,elevation:bt}=H($);xe&&($.center=xe),ke!==void 0&&($.zoom=ke),Ne!==void 0&&($.pitch=Ne),et!==void 0&&($.bearing=et),bt!==void 0&&($.elevation=bt),G.apply($)}this.transform.apply(G)}_fireMoveEvents(b){this.fire(new i.k("move",b)),this._zooming&&this.fire(new i.k("zoom",b)),this._rotating&&this.fire(new i.k("rotate",b)),this._pitching&&this.fire(new i.k("pitch",b))}_afterEase(b,I){if(this._easeId&&I&&this._easeId===I)return;delete this._easeId;let G=this._zooming,H=this._rotating,$=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,G&&this.fire(new i.k("zoomend",b)),H&&this.fire(new i.k("rotateend",b)),$&&this.fire(new i.k("pitchend",b)),this.fire(new i.k("moveend",b))}flyTo(b,I){var G;if(!b.essential&&u.prefersReducedMotion){let kn=i.M(b,["center","zoom","bearing","pitch","around"]);return this.jumpTo(kn,I)}this.stop(),b=i.e({offset:[0,0],speed:1.2,curve:1.42,easing:i.b9},b);let H=this._getTransformForUpdate(),$=H.zoom,xe=H.bearing,ke=H.pitch,Ne=H.padding,et="bearing"in b?this._normalizeBearing(b.bearing,xe):xe,bt="pitch"in b?+b.pitch:ke,Tt="padding"in b?b.padding:H.padding,zt=i.P.convert(b.offset),Yt=H.centerPoint.add(zt),Q=H.pointLocation(Yt),{center:ae,zoom:ve}=H.getConstrained(i.N.convert(b.center||Q),(G=b.zoom)!==null&&G!==void 0?G:$);this._normalizeCenter(ae,H);let be=H.zoomScale(ve-$),De=H.project(Q),Se=H.project(ae).sub(De),Be=b.curve,ut=Math.max(H.width,H.height),gt=ut/be,Mt=Se.mag();if("minZoom"in b){let kn=i.ac(Math.min(b.minZoom,$,ve),H.minZoom,H.maxZoom),ta=ut/H.zoomScale(kn-$);Be=Math.sqrt(ta/Mt*2)}let Ft=Be*Be;function Ot(kn){let ta=(gt*gt-ut*ut+(kn?-1:1)*Ft*Ft*Mt*Mt)/(2*(kn?gt:ut)*Ft*Mt);return Math.log(Math.sqrt(ta*ta+1)-ta)}function er(kn){return(Math.exp(kn)-Math.exp(-kn))/2}function sr(kn){return(Math.exp(kn)+Math.exp(-kn))/2}let wr=Ot(!1),Gr=function(kn){return sr(wr)/sr(wr+Be*kn)},pn=function(kn){return ut*((sr(wr)*(er(ta=wr+Be*kn)/sr(ta))-er(wr))/Ft)/Mt;var ta},cn=(Ot(!0)-wr)/Be;if(Math.abs(Mt)<1e-6||!isFinite(cn)){if(Math.abs(ut-gt)<1e-6)return this.easeTo(b,I);let kn=gt0,Gr=ta=>Math.exp(kn*Be*ta)}return b.duration="duration"in b?+b.duration:1e3*cn/("screenSpeed"in b?+b.screenSpeed/Be:+b.speed),b.maxDuration&&b.duration>b.maxDuration&&(b.duration=0),this._zooming=!0,this._rotating=xe!==et,this._pitching=bt!==ke,this._padding=!H.isPaddingEqual(Tt),this._prepareEase(I,!1),this.terrain&&this._prepareElevation(ae),this._ease((kn=>{let ta=kn*cn,ka=1/Gr(ta);H.zoom=kn===1?ve:$+H.scaleZoom(ka),this._rotating&&(H.bearing=i.y.number(xe,et,kn)),this._pitching&&(H.pitch=i.y.number(ke,bt,kn)),this._padding&&(H.interpolatePadding(Ne,Tt,kn),Yt=H.centerPoint.add(zt)),this.terrain&&!b.freezeElevation&&this._updateElevation(kn);let va=kn===1?ae:H.unproject(De.add(Se.mult(pn(ta))).mult(ka));H.setLocationAtPoint(H.renderWorldCopies?va.wrap():va,Yt),this._applyUpdatedTransform(H),this._fireMoveEvents(I)}),(()=>{this.terrain&&b.freezeElevation&&this._finalizeElevation(),this._afterEase(I)}),b),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(b,I){var G;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let H=this._onEaseEnd;delete this._onEaseEnd,H.call(this,I)}return b||(G=this.handlers)===null||G===void 0||G.stop(!1),this}_ease(b,I,G){G.animate===!1||G.duration===0?(b(1),I()):(this._easeStart=u.now(),this._easeOptions=G,this._onEaseFrame=b,this._onEaseEnd=I,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(b,I){b=i.b3(b,-180,180);let G=Math.abs(b-I);return Math.abs(b-360-I)180?-360:G<-180?360:0}queryTerrainElevation(b){return this.terrain?this.terrain.getElevationForLngLatZoom(i.N.convert(b),this.transform.tileZoom)-this.transform.elevation:null}}let La={compact:!0,customAttribution:'MapLibre'};class Va{constructor(b=La){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=I=>{!I||I.sourceDataType!=="metadata"&&I.sourceDataType!=="visibility"&&I.dataType!=="style"&&I.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=b}getDefaultPosition(){return"bottom-right"}onAdd(b){return this._map=b,this._compact=this.options.compact,this._container=c.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=c.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=c.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){c.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(b,I){let G=this._map._getUIString(`AttributionControl.${I}`);b.title=G,b.setAttribute("aria-label",G)}_updateAttributions(){if(!this._map.style)return;let b=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?b=b.concat(this.options.customAttribution.map((H=>typeof H!="string"?"":H))):typeof this.options.customAttribution=="string"&&b.push(this.options.customAttribution)),this._map.style.stylesheet){let H=this._map.style.stylesheet;this.styleOwner=H.owner,this.styleId=H.id}let I=this._map.style.sourceCaches;for(let H in I){let $=I[H];if($.used||$.usedForTerrain){let xe=$.getSource();xe.attribution&&b.indexOf(xe.attribution)<0&&b.push(xe.attribution)}}b=b.filter((H=>String(H).trim())),b.sort(((H,$)=>H.length-$.length)),b=b.filter(((H,$)=>{for(let xe=$+1;xe=0)return!1;return!0}));let G=b.join(" | ");G!==this._attribHTML&&(this._attribHTML=G,b.length?(this._innerContainer.innerHTML=G,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class na{constructor(b={}){this._updateCompact=()=>{let I=this._container.children;if(I.length){let G=I[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&G.classList.add("maplibregl-compact"):G.classList.remove("maplibregl-compact")}},this.options=b}getDefaultPosition(){return"bottom-left"}onAdd(b){this._map=b,this._compact=this.options&&this.options.compact,this._container=c.create("div","maplibregl-ctrl");let I=c.create("a","maplibregl-ctrl-logo");return I.target="_blank",I.rel="noopener nofollow",I.href="https://maplibre.org/",I.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),I.setAttribute("rel","noopener nofollow"),this._container.appendChild(I),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){c.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class zn{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(b){let I=++this._id;return this._queue.push({callback:b,id:I,cancelled:!1}),I}remove(b){let I=this._currentlyRunning,G=I?this._queue.concat(I):this._queue;for(let H of G)if(H.id===b)return void(H.cancelled=!0)}run(b=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let I=this._currentlyRunning=this._queue;this._queue=[];for(let G of I)if(!G.cancelled&&(G.callback(b),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ja=i.Y([{name:"a_pos3d",type:"Int16",components:3}]);class pi extends i.E{constructor(b){super(),this.sourceCache=b,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,b.usedForTerrain=!0,b.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(b,I){this.sourceCache.update(b,I),this._renderableTilesKeys=[];let G={};for(let H of b.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:I}))G[H.key]=!0,this._renderableTilesKeys.push(H.key),this._tiles[H.key]||(H.posMatrix=new Float64Array(16),i.aP(H.posMatrix,0,i.X,0,i.X,0,1),this._tiles[H.key]=new ft(H,this.tileSize));for(let H in this._tiles)G[H]||delete this._tiles[H]}freeRtt(b){for(let I in this._tiles){let G=this._tiles[I];(!b||G.tileID.equals(b)||G.tileID.isChildOf(b)||b.isChildOf(G.tileID))&&(G.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((b=>this.getTileByID(b)))}getTileByID(b){return this._tiles[b]}getTerrainCoords(b){let I={};for(let G of this._renderableTilesKeys){let H=this._tiles[G].tileID;if(H.canonical.equals(b.canonical)){let $=b.clone();$.posMatrix=new Float64Array(16),i.aP($.posMatrix,0,i.X,0,i.X,0,1),I[G]=$}else if(H.canonical.isChildOf(b.canonical)){let $=b.clone();$.posMatrix=new Float64Array(16);let xe=H.canonical.z-b.canonical.z,ke=H.canonical.x-(H.canonical.x>>xe<>xe<>xe;i.aP($.posMatrix,0,et,0,et,0,1),i.J($.posMatrix,$.posMatrix,[-ke*et,-Ne*et,0]),I[G]=$}else if(b.canonical.isChildOf(H.canonical)){let $=b.clone();$.posMatrix=new Float64Array(16);let xe=b.canonical.z-H.canonical.z,ke=b.canonical.x-(b.canonical.x>>xe<>xe<>xe;i.aP($.posMatrix,0,i.X,0,i.X,0,1),i.J($.posMatrix,$.posMatrix,[ke*et,Ne*et,0]),i.K($.posMatrix,$.posMatrix,[1/2**xe,1/2**xe,0]),I[G]=$}}return I}getSourceTile(b,I){let G=this.sourceCache._source,H=b.overscaledZ-this.deltaZoom;if(H>G.maxzoom&&(H=G.maxzoom),H=G.minzoom&&(!$||!$.dem);)$=this.sourceCache.getTileByID(b.scaledTo(H--).key);return $}tilesAfterTime(b=Date.now()){return Object.values(this._tiles).filter((I=>I.timeAdded>=b))}}class ji{constructor(b,I,G){this.painter=b,this.sourceCache=new pi(I),this.options=G,this.exaggeration=typeof G.exaggeration=="number"?G.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(b,I,G,H=i.X){var $;if(!(I>=0&&I=0&&Gb.canonical.z&&(b.canonical.z>=H?$=b.canonical.z-H:i.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let xe=b.canonical.x-(b.canonical.x>>$<<$),ke=b.canonical.y-(b.canonical.y>>$<<$),Ne=i.bc(new Float64Array(16),[1/(i.X<<$),1/(i.X<<$),0]);i.J(Ne,Ne,[xe*i.X,ke*i.X,0]),this._demMatrixCache[b.key]={matrix:Ne,coord:b}}return{u_depth:2,u_terrain:3,u_terrain_dim:I&&I.dem&&I.dem.dim||1,u_terrain_matrix:G?this._demMatrixCache[b.key].matrix:this._emptyDemMatrix,u_terrain_unpack:I&&I.dem&&I.dem.getUnpackVector()||this._emptyDemUnpack,u_terrain_exaggeration:this.exaggeration,texture:(I&&I.demTexture||this._emptyDemTexture).texture,depthTexture:(this._fboDepthTexture||this._emptyDepthTexture).texture,tile:I}}getFramebuffer(b){let I=this.painter,G=I.width/devicePixelRatio,H=I.height/devicePixelRatio;return!this._fbo||this._fbo.width===G&&this._fbo.height===H||(this._fbo.destroy(),this._fboCoordsTexture.destroy(),this._fboDepthTexture.destroy(),delete this._fbo,delete this._fboDepthTexture,delete this._fboCoordsTexture),this._fboCoordsTexture||(this._fboCoordsTexture=new p(I.context,{width:G,height:H,data:null},I.context.gl.RGBA,{premultiply:!1}),this._fboCoordsTexture.bind(I.context.gl.NEAREST,I.context.gl.CLAMP_TO_EDGE)),this._fboDepthTexture||(this._fboDepthTexture=new p(I.context,{width:G,height:H,data:null},I.context.gl.RGBA,{premultiply:!1}),this._fboDepthTexture.bind(I.context.gl.NEAREST,I.context.gl.CLAMP_TO_EDGE)),this._fbo||(this._fbo=I.context.createFramebuffer(G,H,!0,!1),this._fbo.depthAttachment.set(I.context.createRenderbuffer(I.context.gl.DEPTH_COMPONENT16,G,H))),this._fbo.colorAttachment.set(b==="coords"?this._fboCoordsTexture.texture:this._fboDepthTexture.texture),this._fbo}getCoordsTexture(){let b=this.painter.context;if(this._coordsTexture)return this._coordsTexture;let I=new Uint8Array(this._coordsTextureSize*this._coordsTextureSize*4);for(let $=0,xe=0;$>8<<4|$>>8,I[xe+3]=0;let G=new i.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(I.buffer)),H=new p(b,G,b.gl.RGBA,{premultiply:!1});return H.bind(b.gl.NEAREST,b.gl.CLAMP_TO_EDGE),this._coordsTexture=H,H}pointCoordinate(b){this.painter.maybeDrawDepthAndCoords(!0);let I=new Uint8Array(4),G=this.painter.context,H=G.gl,$=Math.round(b.x*this.painter.pixelRatio/devicePixelRatio),xe=Math.round(b.y*this.painter.pixelRatio/devicePixelRatio),ke=Math.round(this.painter.height/devicePixelRatio);G.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),H.readPixels($,ke-xe-1,1,1,H.RGBA,H.UNSIGNED_BYTE,I),G.bindFramebuffer.set(null);let Ne=I[0]+(I[2]>>4<<8),et=I[1]+((15&I[2])<<8),bt=this.coordsIndex[255-I[3]],Tt=bt&&this.sourceCache.getTileByID(bt);if(!Tt)return null;let zt=this._coordsTextureSize,Yt=(1<b.id!==I)),this._recentlyUsed.push(b.id)}stampObject(b){b.stamp=++this._stamp}getOrCreateFreeObject(){for(let I of this._recentlyUsed)if(!this._objects[I].inUse)return this._objects[I];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let b=this._createObject(this._objects.length);return this._objects.push(b),b}freeObject(b){b.inUse=!1}freeAllObjects(){for(let b of this._objects)this.freeObject(b)}isFull(){return!(this._objects.length!b.inUse))===!1}}let Qi={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class zo{constructor(b,I){this.painter=b,this.terrain=I,this.pool=new Ao(b.context,30,I.sourceCache.tileSize*I.qualityFactor)}destruct(){this.pool.destruct()}getTexture(b){return this.pool.getObjectForId(b.rtt[this._stacks.length-1].id).texture}prepareForRender(b,I){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=b._order.filter((G=>!b._layers[G].isHidden(I))),this._coordsDescendingInv={};for(let G in b.sourceCaches){this._coordsDescendingInv[G]={};let H=b.sourceCaches[G].getVisibleCoordinates();for(let $ of H){let xe=this.terrain.sourceCache.getTerrainCoords($);for(let ke in xe)this._coordsDescendingInv[G][ke]||(this._coordsDescendingInv[G][ke]=[]),this._coordsDescendingInv[G][ke].push(xe[ke])}}this._coordsDescendingInvStr={};for(let G of b._order){let H=b._layers[G],$=H.source;if(Qi[H.type]&&!this._coordsDescendingInvStr[$]){this._coordsDescendingInvStr[$]={};for(let xe in this._coordsDescendingInv[$])this._coordsDescendingInvStr[$][xe]=this._coordsDescendingInv[$][xe].map((ke=>ke.key)).sort().join()}}for(let G of this._renderableTiles)for(let H in this._coordsDescendingInvStr){let $=this._coordsDescendingInvStr[H][G.tileID.key];$&&$!==G.rttCoords[H]&&(G.rtt=[])}}renderLayer(b){if(b.isHidden(this.painter.transform.zoom))return!1;let I=b.type,G=this.painter,H=this._renderableLayerIds[this._renderableLayerIds.length-1]===b.id;if(Qi[I]&&(this._prevType&&Qi[this._prevType]||this._stacks.push([]),this._prevType=I,this._stacks[this._stacks.length-1].push(b.id),!H))return!0;if(Qi[this._prevType]||Qi[I]&&H){this._prevType=I;let $=this._stacks.length-1,xe=this._stacks[$]||[];for(let ke of this._renderableTiles){if(this.pool.isFull()&&(_s(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(ke),ke.rtt[$]){let et=this.pool.getObjectForId(ke.rtt[$].id);if(et.stamp===ke.rtt[$].stamp){this.pool.useObject(et);continue}}let Ne=this.pool.getOrCreateFreeObject();this.pool.useObject(Ne),this.pool.stampObject(Ne),ke.rtt[$]={id:Ne.id,stamp:Ne.stamp},G.context.bindFramebuffer.set(Ne.fbo.framebuffer),G.context.clear({color:i.aM.transparent,stencil:0}),G.currentStencilSource=void 0;for(let et=0;et{K.touchstart=K.dragStart,K.touchmoveWindow=K.dragMove,K.touchend=K.dragEnd},ya={showCompass:!0,showZoom:!0,visualizePitch:!1};class ho{constructor(b,I,G=!1){this.mousedown=xe=>{this.startMouse(i.e({},xe,{ctrlKey:!0,preventDefault:()=>xe.preventDefault()}),c.mousePos(this.element,xe)),c.addEventListener(window,"mousemove",this.mousemove),c.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=xe=>{this.moveMouse(xe,c.mousePos(this.element,xe))},this.mouseup=xe=>{this.mouseRotate.dragEnd(xe),this.mousePitch&&this.mousePitch.dragEnd(xe),this.offTemp()},this.touchstart=xe=>{xe.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=c.touchPos(this.element,xe.targetTouches)[0],this.startTouch(xe,this._startPos),c.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.addEventListener(window,"touchend",this.touchend))},this.touchmove=xe=>{xe.targetTouches.length!==1?this.reset():(this._lastPos=c.touchPos(this.element,xe.targetTouches)[0],this.moveTouch(xe,this._lastPos))},this.touchend=xe=>{xe.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let H=b.dragRotate._mouseRotate.getClickTolerance(),$=b.dragRotate._mousePitch.getClickTolerance();this.element=I,this.mouseRotate=uh({clickTolerance:H,enable:!0}),this.touchRotate=(({enable:xe,clickTolerance:ke,bearingDegreesPerPixelMoved:Ne=.8})=>{let et=new Nf;return new nu({clickTolerance:ke,move:(bt,Tt)=>({bearingDelta:(Tt.x-bt.x)*Ne}),moveStateManager:et,enable:xe,assignEvents:Mo})})({clickTolerance:H,enable:!0}),this.map=b,G&&(this.mousePitch=Qh({clickTolerance:$,enable:!0}),this.touchPitch=(({enable:xe,clickTolerance:ke,pitchDegreesPerPixelMoved:Ne=-.5})=>{let et=new Nf;return new nu({clickTolerance:ke,move:(bt,Tt)=>({pitchDelta:(Tt.y-bt.y)*Ne}),moveStateManager:et,enable:xe,assignEvents:Mo})})({clickTolerance:$,enable:!0})),c.addEventListener(I,"mousedown",this.mousedown),c.addEventListener(I,"touchstart",this.touchstart,{passive:!1}),c.addEventListener(I,"touchcancel",this.reset)}startMouse(b,I){this.mouseRotate.dragStart(b,I),this.mousePitch&&this.mousePitch.dragStart(b,I),c.disableDrag()}startTouch(b,I){this.touchRotate.dragStart(b,I),this.touchPitch&&this.touchPitch.dragStart(b,I),c.disableDrag()}moveMouse(b,I){let G=this.map,{bearingDelta:H}=this.mouseRotate.dragMove(b,I)||{};if(H&&G.setBearing(G.getBearing()+H),this.mousePitch){let{pitchDelta:$}=this.mousePitch.dragMove(b,I)||{};$&&G.setPitch(G.getPitch()+$)}}moveTouch(b,I){let G=this.map,{bearingDelta:H}=this.touchRotate.dragMove(b,I)||{};if(H&&G.setBearing(G.getBearing()+H),this.touchPitch){let{pitchDelta:$}=this.touchPitch.dragMove(b,I)||{};$&&G.setPitch(G.getPitch()+$)}}off(){let b=this.element;c.removeEventListener(b,"mousedown",this.mousedown),c.removeEventListener(b,"touchstart",this.touchstart,{passive:!1}),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend),c.removeEventListener(b,"touchcancel",this.reset),this.offTemp()}offTemp(){c.enableDrag(),c.removeEventListener(window,"mousemove",this.mousemove),c.removeEventListener(window,"mouseup",this.mouseup),c.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),c.removeEventListener(window,"touchend",this.touchend)}}let wo;function Yi(K,b,I){let G=new i.N(K.lng,K.lat);if(K=new i.N(K.lng,K.lat),b){let H=new i.N(K.lng-360,K.lat),$=new i.N(K.lng+360,K.lat),xe=I.locationPoint(K).distSqr(b);I.locationPoint(H).distSqr(b)180;){let H=I.locationPoint(K);if(H.x>=0&&H.y>=0&&H.x<=I.width&&H.y<=I.height)break;K.lng>I.center.lng?K.lng-=360:K.lng+=360}return K.lng!==G.lng&&I.locationPoint(K).y>I.height/2-I.getHorizon()?K:G}let Vs={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 xu(K,b,I){let G=K.classList;for(let H in Vs)G.remove(`maplibregl-${I}-anchor-${H}`);G.add(`maplibregl-${I}-anchor-${b}`)}class au extends i.E{constructor(b){if(super(),this._onKeyPress=I=>{let G=I.code,H=I.charCode||I.keyCode;G!=="Space"&&G!=="Enter"&&H!==32&&H!==13||this.togglePopup()},this._onMapClick=I=>{let G=I.originalEvent.target,H=this._element;this._popup&&(G===H||H.contains(G))&&this.togglePopup()},this._update=I=>{var G;if(!this._map)return;let H=this._map.loaded()&&!this._map.isMoving();((I==null?void 0:I.type)==="terrain"||(I==null?void 0:I.type)==="render"&&!H)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Yi(this._lngLat,this._flatPos,this._map.transform):(G=this._lngLat)===null||G===void 0?void 0:G.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let $="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?$=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&($=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let xe="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?xe="rotateX(0deg)":this._pitchAlignment==="map"&&(xe=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||I&&I.type!=="moveend"||(this._pos=this._pos.round()),c.setTransform(this._element,`${Vs[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${xe} ${$}`),u.frameAsync(new AbortController).then((()=>{this._updateOpacity(I&&I.type==="moveend")})).catch((()=>{}))},this._onMove=I=>{if(!this._isDragging){let G=this._clickTolerance||this._map._clickTolerance;this._isDragging=I.point.dist(this._pointerdownPos)>=G}this._isDragging&&(this._pos=I.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.k("dragstart"))),this.fire(new i.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.k("dragend")),this._state="inactive"},this._addDragHandler=I=>{this._element.contains(I.originalEvent.target)&&(I.preventDefault(),this._positionDelta=I.point.sub(this._pos).add(this._offset),this._pointerdownPos=I.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=b&&b.anchor||"center",this._color=b&&b.color||"#3FB1CE",this._scale=b&&b.scale||1,this._draggable=b&&b.draggable||!1,this._clickTolerance=b&&b.clickTolerance||0,this._subpixelPositioning=b&&b.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=b&&b.rotation||0,this._rotationAlignment=b&&b.rotationAlignment||"auto",this._pitchAlignment=b&&b.pitchAlignment&&b.pitchAlignment!=="auto"?b.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(b==null?void 0:b.opacity,b==null?void 0:b.opacityWhenCovered),b&&b.element)this._element=b.element,this._offset=i.P.convert(b&&b.offset||[0,0]);else{this._defaultMarker=!0,this._element=c.create("div");let I=c.createNS("http://www.w3.org/2000/svg","svg"),G=41,H=27;I.setAttributeNS(null,"display","block"),I.setAttributeNS(null,"height",`${G}px`),I.setAttributeNS(null,"width",`${H}px`),I.setAttributeNS(null,"viewBox",`0 0 ${H} ${G}`);let $=c.createNS("http://www.w3.org/2000/svg","g");$.setAttributeNS(null,"stroke","none"),$.setAttributeNS(null,"stroke-width","1"),$.setAttributeNS(null,"fill","none"),$.setAttributeNS(null,"fill-rule","evenodd");let xe=c.createNS("http://www.w3.org/2000/svg","g");xe.setAttributeNS(null,"fill-rule","nonzero");let ke=c.createNS("http://www.w3.org/2000/svg","g");ke.setAttributeNS(null,"transform","translate(3.0, 29.0)"),ke.setAttributeNS(null,"fill","#000000");let Ne=[{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"}];for(let be of Ne){let De=c.createNS("http://www.w3.org/2000/svg","ellipse");De.setAttributeNS(null,"opacity","0.04"),De.setAttributeNS(null,"cx","10.5"),De.setAttributeNS(null,"cy","5.80029008"),De.setAttributeNS(null,"rx",be.rx),De.setAttributeNS(null,"ry",be.ry),ke.appendChild(De)}let et=c.createNS("http://www.w3.org/2000/svg","g");et.setAttributeNS(null,"fill",this._color);let bt=c.createNS("http://www.w3.org/2000/svg","path");bt.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),et.appendChild(bt);let Tt=c.createNS("http://www.w3.org/2000/svg","g");Tt.setAttributeNS(null,"opacity","0.25"),Tt.setAttributeNS(null,"fill","#000000");let zt=c.createNS("http://www.w3.org/2000/svg","path");zt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Tt.appendChild(zt);let Yt=c.createNS("http://www.w3.org/2000/svg","g");Yt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Yt.setAttributeNS(null,"fill","#FFFFFF");let Q=c.createNS("http://www.w3.org/2000/svg","g");Q.setAttributeNS(null,"transform","translate(8.0, 8.0)");let ae=c.createNS("http://www.w3.org/2000/svg","circle");ae.setAttributeNS(null,"fill","#000000"),ae.setAttributeNS(null,"opacity","0.25"),ae.setAttributeNS(null,"cx","5.5"),ae.setAttributeNS(null,"cy","5.5"),ae.setAttributeNS(null,"r","5.4999962");let ve=c.createNS("http://www.w3.org/2000/svg","circle");ve.setAttributeNS(null,"fill","#FFFFFF"),ve.setAttributeNS(null,"cx","5.5"),ve.setAttributeNS(null,"cy","5.5"),ve.setAttributeNS(null,"r","5.4999962"),Q.appendChild(ae),Q.appendChild(ve),xe.appendChild(ke),xe.appendChild(et),xe.appendChild(Tt),xe.appendChild(Yt),xe.appendChild(Q),I.appendChild(xe),I.setAttributeNS(null,"height",G*this._scale+"px"),I.setAttributeNS(null,"width",H*this._scale+"px"),this._element.appendChild(I),this._offset=i.P.convert(b&&b.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(I=>{I.preventDefault()})),this._element.addEventListener("mousedown",(I=>{I.preventDefault()})),xu(this._element,this._anchor,"marker"),b&&b.className)for(let I of b.className.split(" "))this._element.classList.add(I);this._popup=null}addTo(b){return this.remove(),this._map=b,this._element.setAttribute("aria-label",b._getUIString("Marker.Title")),b.getCanvasContainer().appendChild(this._element),b.on("move",this._update),b.on("moveend",this._update),b.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),c.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(b){return this._lngLat=i.N.convert(b),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(b){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),b){if(!("offset"in b.options)){let H=Math.abs(13.5)/Math.SQRT2;b.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[H,-1*(38.1-13.5+H)],"bottom-right":[-H,-1*(38.1-13.5+H)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=b,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(b){return this._subpixelPositioning=b,this}getPopup(){return this._popup}togglePopup(){let b=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:b?(b.isOpen()?b.remove():(b.setLngLat(this._lngLat),b.addTo(this._map)),this):this}_updateOpacity(b=!1){var I,G;if(!(!((I=this._map)===null||I===void 0)&&I.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(b)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}let H=this._map,$=H.terrain.depthAtPoint(this._pos),xe=H.terrain.getElevationForLngLatZoom(this._lngLat,H.transform.tileZoom);if(H.transform.lngLatToCameraDepth(this._lngLat,xe)-$<.006)return void(this._element.style.opacity=this._opacity);let ke=-this._offset.y/H.transform._pixelPerMeter,Ne=Math.sin(H.getPitch()*Math.PI/180)*ke,et=H.terrain.depthAtPoint(new i.P(this._pos.x,this._pos.y-this._offset.y)),bt=H.transform.lngLatToCameraDepth(this._lngLat,xe+Ne)-et>.006;!((G=this._popup)===null||G===void 0)&&G.isOpen()&&bt&&this._popup.remove(),this._element.style.opacity=bt?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(b){return this._offset=i.P.convert(b),this._update(),this}addClassName(b){this._element.classList.add(b)}removeClassName(b){this._element.classList.remove(b)}toggleClassName(b){return this._element.classList.toggle(b)}setDraggable(b){return this._draggable=!!b,this._map&&(b?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(b){return this._rotation=b||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(b){return this._rotationAlignment=b||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(b){return this._pitchAlignment=b&&b!=="auto"?b:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(b,I){return b===void 0&&I===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),b!==void 0&&(this._opacity=b),I!==void 0&&(this._opacityWhenCovered=I),this._map&&this._updateOpacity(!0),this}}let Yu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},ll=0,Pu=!1,ul={maxWidth:100,unit:"metric"};function Pc(K,b,I){let G=I&&I.maxWidth||100,H=K._container.clientHeight/2,$=K.unproject([0,H]),xe=K.unproject([G,H]),ke=$.distanceTo(xe);if(I&&I.unit==="imperial"){let Ne=3.2808*ke;Ne>5280?Wa(b,G,Ne/5280,K._getUIString("ScaleControl.Miles")):Wa(b,G,Ne,K._getUIString("ScaleControl.Feet"))}else I&&I.unit==="nautical"?Wa(b,G,ke/1852,K._getUIString("ScaleControl.NauticalMiles")):ke>=1e3?Wa(b,G,ke/1e3,K._getUIString("ScaleControl.Kilometers")):Wa(b,G,ke,K._getUIString("ScaleControl.Meters"))}function Wa(K,b,I,G){let H=(function($){let xe=Math.pow(10,`${Math.floor($)}`.length-1),ke=$/xe;return ke=ke>=10?10:ke>=5?5:ke>=3?3:ke>=2?2:ke>=1?1:(function(Ne){let et=Math.pow(10,Math.ceil(-Math.log(Ne)/Math.LN10));return Math.round(Ne*et)/et})(ke),xe*ke})(I);K.style.width=b*(H/I)+"px",K.innerHTML=`${H} ${G}`}let oi={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},Ph=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function pf(K){if(K){if(typeof K=="number"){let b=Math.round(Math.abs(K)/Math.SQRT2);return{center:new i.P(0,0),top:new i.P(0,K),"top-left":new i.P(b,b),"top-right":new i.P(-b,b),bottom:new i.P(0,-K),"bottom-left":new i.P(b,-b),"bottom-right":new i.P(-b,-b),left:new i.P(K,0),right:new i.P(-K,0)}}if(K instanceof i.P||Array.isArray(K)){let b=i.P.convert(K);return{center:b,top:b,"top-left":b,"top-right":b,bottom:b,"bottom-left":b,"bottom-right":b,left:b,right:b}}return{center:i.P.convert(K.center||[0,0]),top:i.P.convert(K.top||[0,0]),"top-left":i.P.convert(K["top-left"]||[0,0]),"top-right":i.P.convert(K["top-right"]||[0,0]),bottom:i.P.convert(K.bottom||[0,0]),"bottom-left":i.P.convert(K["bottom-left"]||[0,0]),"bottom-right":i.P.convert(K["bottom-right"]||[0,0]),left:i.P.convert(K.left||[0,0]),right:i.P.convert(K.right||[0,0])}}return pf(new i.P(0,0))}let iu=o;a.AJAXError=i.bh,a.Evented=i.E,a.LngLat=i.N,a.MercatorCoordinate=i.Z,a.Point=i.P,a.addProtocol=i.bi,a.config=i.a,a.removeProtocol=i.bj,a.AttributionControl=Va,a.BoxZoomHandler=Dl,a.CanvasSource=Ie,a.CooperativeGesturesHandler=nn,a.DoubleClickZoomHandler=Ur,a.DragPanHandler=An,a.DragRotateHandler=Vn,a.EdgeInsets=Pl,a.FullscreenControl=class extends i.E{constructor(K={}){super(),this._onFullscreenChange=()=>{var b;let I=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((b=I==null?void 0:I.shadowRoot)===null||b===void 0)&&b.fullscreenElement;)I=I.shadowRoot.fullscreenElement;I===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,K&&K.container&&(K.container instanceof HTMLElement?this._container=K.container:i.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(K){return this._map=K,this._container||(this._container=this._map.getContainer()),this._controlContainer=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){c.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let K=this._fullscreenButton=c.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);c.create("span","maplibregl-ctrl-icon",K).setAttribute("aria-hidden","true"),K.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let K=this._getTitle();this._fullscreenButton.setAttribute("aria-label",K),this._fullscreenButton.title=K}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new i.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new i.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},a.GeoJSONSource=Oe,a.GeolocateControl=class extends i.E{constructor(K){super(),this._onSuccess=b=>{if(this._map){if(this._isOutOfMapMaxBounds(b))return this._setErrorState(),this.fire(new i.k("outofmaxbounds",b)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=b,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(b),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(b),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new i.k("geolocate",b)),this._finish()}},this._updateCamera=b=>{let I=new i.N(b.coords.longitude,b.coords.latitude),G=b.coords.accuracy,H=this._map.getBearing(),$=i.e({bearing:H},this.options.fitBoundsOptions),xe=le.fromLngLat(I,G);this._map.fitBounds(xe,$,{geolocateSource:!0})},this._updateMarker=b=>{if(b){let I=new i.N(b.coords.longitude,b.coords.latitude);this._accuracyCircleMarker.setLngLat(I).addTo(this._map),this._userLocationDotMarker.setLngLat(I).addTo(this._map),this._accuracy=b.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=b=>{if(this._map){if(this.options.trackUserLocation)if(b.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let I=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=I,this._geolocateButton.setAttribute("aria-label",I),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(b.code===3&&Pu)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new i.k("error",b)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(b=>b.preventDefault())),this._geolocateButton=c.create("button","maplibregl-ctrl-geolocate",this._container),c.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=b=>{if(this._map){if(b===!1){i.w("Geolocation support is not available so the GeolocateControl will be disabled.");let I=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=I,this._geolocateButton.setAttribute("aria-label",I)}else{let I=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=I,this._geolocateButton.setAttribute("aria-label",I)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=c.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new au({element:this._dotElement}),this._circleElement=c.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new au({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(I=>{I.geolocateSource||this._watchState!=="ACTIVE_LOCK"||I.originalEvent&&I.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new i.k("trackuserlocationend")),this.fire(new i.k("userlocationlostfocus")))}))}},this.options=i.e({},Yu,K)}onAdd(K){return this._map=K,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return i._(this,arguments,void 0,(function*(b=!1){if(wo!==void 0&&!b)return wo;if(window.navigator.permissions===void 0)return wo=!!window.navigator.geolocation,wo;try{wo=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(I){wo=!!window.navigator.geolocation}return wo}))})().then((b=>this._finishSetupUI(b))),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),c.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,ll=0,Pu=!1}_isOutOfMapMaxBounds(K){let b=this._map.getMaxBounds(),I=K.coords;return b&&(I.longitudeb.getEast()||I.latitudeb.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let K=this._map.getBounds(),b=K.getSouthEast(),I=K.getNorthEast(),G=b.distanceTo(I),H=Math.ceil(this._accuracy/(G/this._map._container.clientHeight)*2);this._circleElement.style.width=`${H}px`,this._circleElement.style.height=`${H}px`}trigger(){if(!this._setup)return i.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":ll--,Pu=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new i.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.k("trackuserlocationstart")),this.fire(new i.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let K;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),ll++,ll>1?(K={maximumAge:6e5,timeout:0},Pu=!0):(K=this.options.positionOptions,Pu=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,K)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},a.Hash=lh,a.ImageSource=mt,a.KeyboardHandler=yt,a.LngLatBounds=le,a.LogoControl=na,a.Map=class extends Pa{constructor(K){i.bf.mark(i.bg.create);let b=Object.assign(Object.assign({},cs),K);if(b.minZoom!=null&&b.maxZoom!=null&&b.minZoom>b.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(b.minPitch!=null&&b.maxPitch!=null&&b.minPitch>b.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(b.minPitch!=null&&b.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(b.maxPitch!=null&&b.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new Yc(b.minZoom,b.maxZoom,b.minPitch,b.maxPitch,b.renderWorldCopies),{bearingSnap:b.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new zn,this._controls=[],this._mapId=i.a4(),this._contextLost=I=>{I.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new i.k("webglcontextlost",{originalEvent:I}))},this._contextRestored=I=>{this._setupPainter(),this.resize(),this._update(),this.fire(new i.k("webglcontextrestored",{originalEvent:I}))},this._onMapScroll=I=>{if(I.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=b.interactive,this._maxTileCacheSize=b.maxTileCacheSize,this._maxTileCacheZoomLevels=b.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=b.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=b.preserveDrawingBuffer===!0,this._antialias=b.antialias===!0,this._trackResize=b.trackResize===!0,this._bearingSnap=b.bearingSnap,this._refreshExpiredTiles=b.refreshExpiredTiles===!0,this._fadeDuration=b.fadeDuration,this._crossSourceCollisions=b.crossSourceCollisions===!0,this._collectResourceTiming=b.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},Vi),b.locale),this._clickTolerance=b.clickTolerance,this._overridePixelRatio=b.pixelRatio,this._maxCanvasSize=b.maxCanvasSize,this.transformCameraUpdate=b.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=b.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=g.addThrottleControl((()=>this.isMoving())),this._requestManager=new E(b.transformRequest),typeof b.container=="string"){if(this._container=document.getElementById(b.container),!this._container)throw new Error(`Container '${b.container}' not found.`)}else{if(!(b.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=b.container}if(b.maxBounds&&this.setMaxBounds(b.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))).on("moveend",(()=>this._update(!1))).on("zoom",(()=>this._update(!0))).on("terrain",(()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)})).once("idle",(()=>{this._idleTriggered=!0})),typeof window!="undefined"){addEventListener("online",this._onWindowOnline,!1);let I=!1,G=zf((H=>{this._trackResize&&!this._removed&&(this.resize(H),this.redraw())}),50);this._resizeObserver=new ResizeObserver((H=>{I?G(H):I=!0})),this._resizeObserver.observe(this._container)}this.handlers=new Ca(this,b),this._hash=b.hash&&new lh(typeof b.hash=="string"&&b.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:b.center,zoom:b.zoom,bearing:b.bearing,pitch:b.pitch}),b.bounds&&(this.resize(),this.fitBounds(b.bounds,i.e({},b.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=b.localIdeographFontFamily,this._validateStyle=b.validateStyle,b.style&&this.setStyle(b.style,{localIdeographFontFamily:b.localIdeographFontFamily}),b.attributionControl&&this.addControl(new Va(typeof b.attributionControl=="boolean"?void 0:b.attributionControl)),b.maplibreLogo&&this.addControl(new na,b.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)})),this.on("data",(I=>{this._update(I.dataType==="style"),this.fire(new i.k(`${I.dataType}data`,I))})),this.on("dataloading",(I=>{this.fire(new i.k(`${I.dataType}dataloading`,I))})),this.on("dataabort",(I=>{this.fire(new i.k("sourcedataabort",I))}))}_getMapId(){return this._mapId}addControl(K,b){if(b===void 0&&(b=K.getDefaultPosition?K.getDefaultPosition():"top-right"),!K||!K.onAdd)return this.fire(new i.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let I=K.onAdd(this);this._controls.push(K);let G=this._controlPositions[b];return b.indexOf("bottom")!==-1?G.insertBefore(I,G.firstChild):G.appendChild(I),this}removeControl(K){if(!K||!K.onRemove)return this.fire(new i.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let b=this._controls.indexOf(K);return b>-1&&this._controls.splice(b,1),K.onRemove(this),this}hasControl(K){return this._controls.indexOf(K)>-1}calculateCameraOptionsFromTo(K,b,I,G){return G==null&&this.terrain&&(G=this.terrain.getElevationForLngLatZoom(I,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(K,b,I,G)}resize(K){var b;let I=this._containerDimensions(),G=I[0],H=I[1],$=this._getClampedPixelRatio(G,H);if(this._resizeCanvas(G,H,$),this.painter.resize(G,H,$),this.painter.overLimit()){let ke=this.painter.context.gl;this._maxCanvasSize=[ke.drawingBufferWidth,ke.drawingBufferHeight];let Ne=this._getClampedPixelRatio(G,H);this._resizeCanvas(G,H,Ne),this.painter.resize(G,H,Ne)}this.transform.resize(G,H),(b=this._requestedCameraState)===null||b===void 0||b.resize(G,H);let xe=!this._moving;return xe&&(this.stop(),this.fire(new i.k("movestart",K)).fire(new i.k("move",K))),this.fire(new i.k("resize",K)),xe&&this.fire(new i.k("moveend",K)),this}_getClampedPixelRatio(K,b){let{0:I,1:G}=this._maxCanvasSize,H=this.getPixelRatio(),$=K*H,xe=b*H;return Math.min($>I?I/$:1,xe>G?G/xe:1)*H}getPixelRatio(){var K;return(K=this._overridePixelRatio)!==null&&K!==void 0?K:devicePixelRatio}setPixelRatio(K){this._overridePixelRatio=K,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(K){return this.transform.setMaxBounds(le.convert(K)),this._update()}setMinZoom(K){if((K=K==null?-2:K)>=-2&&K<=this.transform.maxZoom)return this.transform.minZoom=K,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=K,this._update(),this.getZoom()>K&&this.setZoom(K),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(K){if((K=K==null?0:K)<0)throw new Error("minPitch must be greater than or equal to 0");if(K>=0&&K<=this.transform.maxPitch)return this.transform.minPitch=K,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(K>=this.transform.minPitch)return this.transform.maxPitch=K,this._update(),this.getPitch()>K&&this.setPitch(K),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(K){return this.transform.renderWorldCopies=K,this._update()}project(K){return this.transform.locationPoint(i.N.convert(K),this.style&&this.terrain)}unproject(K){return this.transform.pointLocation(i.P.convert(K),this.terrain)}isMoving(){var K;return this._moving||((K=this.handlers)===null||K===void 0?void 0:K.isMoving())}isZooming(){var K;return this._zooming||((K=this.handlers)===null||K===void 0?void 0:K.isZooming())}isRotating(){var K;return this._rotating||((K=this.handlers)===null||K===void 0?void 0:K.isRotating())}_createDelegatedListener(K,b,I){if(K==="mouseenter"||K==="mouseover"){let G=!1;return{layers:b,listener:I,delegates:{mousemove:$=>{let xe=b.filter((Ne=>this.getLayer(Ne))),ke=xe.length!==0?this.queryRenderedFeatures($.point,{layers:xe}):[];ke.length?G||(G=!0,I.call(this,new Fs(K,this,$.originalEvent,{features:ke}))):G=!1},mouseout:()=>{G=!1}}}}if(K==="mouseleave"||K==="mouseout"){let G=!1;return{layers:b,listener:I,delegates:{mousemove:xe=>{let ke=b.filter((Ne=>this.getLayer(Ne)));(ke.length!==0?this.queryRenderedFeatures(xe.point,{layers:ke}):[]).length?G=!0:G&&(G=!1,I.call(this,new Fs(K,this,xe.originalEvent)))},mouseout:xe=>{G&&(G=!1,I.call(this,new Fs(K,this,xe.originalEvent)))}}}}{let G=H=>{let $=b.filter((ke=>this.getLayer(ke))),xe=$.length!==0?this.queryRenderedFeatures(H.point,{layers:$}):[];xe.length&&(H.features=xe,I.call(this,H),delete H.features)};return{layers:b,listener:I,delegates:{[K]:G}}}}_saveDelegatedListener(K,b){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[K]=this._delegatedListeners[K]||[],this._delegatedListeners[K].push(b)}_removeDelegatedListener(K,b,I){if(!this._delegatedListeners||!this._delegatedListeners[K])return;let G=this._delegatedListeners[K];for(let H=0;Hb.includes(xe)))){for(let xe in $.delegates)this.off(xe,$.delegates[xe]);return void G.splice(H,1)}}}on(K,b,I){if(I===void 0)return super.on(K,b);let G=this._createDelegatedListener(K,typeof b=="string"?[b]:b,I);this._saveDelegatedListener(K,G);for(let H in G.delegates)this.on(H,G.delegates[H]);return this}once(K,b,I){if(I===void 0)return super.once(K,b);let G=typeof b=="string"?[b]:b,H=this._createDelegatedListener(K,G,I);for(let $ in H.delegates){let xe=H.delegates[$];H.delegates[$]=(...ke)=>{this._removeDelegatedListener(K,G,I),xe(...ke)}}this._saveDelegatedListener(K,H);for(let $ in H.delegates)this.once($,H.delegates[$]);return this}off(K,b,I){return I===void 0?super.off(K,b):(this._removeDelegatedListener(K,typeof b=="string"?[b]:b,I),this)}queryRenderedFeatures(K,b){if(!this.style)return[];let I,G=K instanceof i.P||Array.isArray(K),H=G?K:[[0,0],[this.transform.width,this.transform.height]];if(b=b||(G?{}:K)||{},H instanceof i.P||typeof H[0]=="number")I=[i.P.convert(H)];else{let $=i.P.convert(H[0]),xe=i.P.convert(H[1]);I=[$,new i.P(xe.x,$.y),xe,new i.P($.x,xe.y),$]}return this.style.queryRenderedFeatures(I,b,this.transform)}querySourceFeatures(K,b){return this.style.querySourceFeatures(K,b)}setStyle(K,b){return(b=i.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},b)).diff!==!1&&b.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&K?(this._diffStyle(K,b),this):(this._localIdeographFontFamily=b.localIdeographFontFamily,this._updateStyle(K,b))}setTransformRequest(K){return this._requestManager.setTransformRequest(K),this}_getUIString(K){let b=this._locale[K];if(b==null)throw new Error(`Missing UI string '${K}'`);return b}_updateStyle(K,b){if(b.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(K,b)));let I=this.style&&b.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!K)),K?(this.style=new xi(this,b||{}),this.style.setEventedParent(this,{style:this.style}),typeof K=="string"?this.style.loadURL(K,b,I):this.style.loadJSON(K,b,I),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new xi(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(K,b){if(typeof K=="string"){let I=this._requestManager.transformRequest(K,"Style");i.h(I,new AbortController).then((G=>{this._updateDiff(G.data,b)})).catch((G=>{G&&this.fire(new i.j(G))}))}else typeof K=="object"&&this._updateDiff(K,b)}_updateDiff(K,b){try{this.style.setState(K,b)&&this._update(!0)}catch(I){i.w(`Unable to perform style diff: ${I.message||I.error||I}. Rebuilding the style from scratch.`),this._updateStyle(K,b)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():i.w("There is no style added to the map.")}addSource(K,b){return this._lazyInitEmptyStyle(),this.style.addSource(K,b),this._update(!0)}isSourceLoaded(K){let b=this.style&&this.style.sourceCaches[K];if(b!==void 0)return b.loaded();this.fire(new i.j(new Error(`There is no source with ID '${K}'`)))}setTerrain(K){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),K){let b=this.style.sourceCaches[K.source];if(!b)throw new Error(`cannot load terrain, because there exists no source with ID: ${K.source}`);this.terrain===null&&b.reload();for(let I in this.style._layers){let G=this.style._layers[I];G.type==="hillshade"&&G.source===K.source&&i.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new ji(this.painter,b,K),this.painter.renderToTexture=new zo(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=I=>{I.dataType==="style"?this.terrain.sourceCache.freeRtt():I.dataType==="source"&&I.tile&&(I.sourceId!==K.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(I.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new i.k("terrain",{terrain:K})),this}getTerrain(){var K,b;return(b=(K=this.terrain)===null||K===void 0?void 0:K.options)!==null&&b!==void 0?b:null}areTilesLoaded(){let K=this.style&&this.style.sourceCaches;for(let b in K){let I=K[b]._tiles;for(let G in I){let H=I[G];if(H.state!=="loaded"&&H.state!=="errored")return!1}}return!0}removeSource(K){return this.style.removeSource(K),this._update(!0)}getSource(K){return this.style.getSource(K)}addImage(K,b,I={}){let{pixelRatio:G=1,sdf:H=!1,stretchX:$,stretchY:xe,content:ke,textFitWidth:Ne,textFitHeight:et}=I;if(this._lazyInitEmptyStyle(),!(b instanceof HTMLImageElement||i.b(b))){if(b.width===void 0||b.height===void 0)return this.fire(new i.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:bt,height:Tt,data:zt}=b,Yt=b;return this.style.addImage(K,{data:new i.R({width:bt,height:Tt},new Uint8Array(zt)),pixelRatio:G,stretchX:$,stretchY:xe,content:ke,textFitWidth:Ne,textFitHeight:et,sdf:H,version:0,userImage:Yt}),Yt.onAdd&&Yt.onAdd(this,K),this}}{let{width:bt,height:Tt,data:zt}=u.getImageData(b);this.style.addImage(K,{data:new i.R({width:bt,height:Tt},zt),pixelRatio:G,stretchX:$,stretchY:xe,content:ke,textFitWidth:Ne,textFitHeight:et,sdf:H,version:0})}}updateImage(K,b){let I=this.style.getImage(K);if(!I)return this.fire(new i.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let G=b instanceof HTMLImageElement||i.b(b)?u.getImageData(b):b,{width:H,height:$,data:xe}=G;if(H===void 0||$===void 0)return this.fire(new i.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(H!==I.data.width||$!==I.data.height)return this.fire(new i.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let ke=!(b instanceof HTMLImageElement||i.b(b));return I.data.replace(xe,ke),this.style.updateImage(K,I),this}getImage(K){return this.style.getImage(K)}hasImage(K){return K?!!this.style.getImage(K):(this.fire(new i.j(new Error("Missing required image id"))),!1)}removeImage(K){this.style.removeImage(K)}loadImage(K){return g.getImage(this._requestManager.transformRequest(K,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(K,b){return this._lazyInitEmptyStyle(),this.style.addLayer(K,b),this._update(!0)}moveLayer(K,b){return this.style.moveLayer(K,b),this._update(!0)}removeLayer(K){return this.style.removeLayer(K),this._update(!0)}getLayer(K){return this.style.getLayer(K)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(K,b,I){return this.style.setLayerZoomRange(K,b,I),this._update(!0)}setFilter(K,b,I={}){return this.style.setFilter(K,b,I),this._update(!0)}getFilter(K){return this.style.getFilter(K)}setPaintProperty(K,b,I,G={}){return this.style.setPaintProperty(K,b,I,G),this._update(!0)}getPaintProperty(K,b){return this.style.getPaintProperty(K,b)}setLayoutProperty(K,b,I,G={}){return this.style.setLayoutProperty(K,b,I,G),this._update(!0)}getLayoutProperty(K,b){return this.style.getLayoutProperty(K,b)}setGlyphs(K,b={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(K,b),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(K,b,I={}){return this._lazyInitEmptyStyle(),this.style.addSprite(K,b,I,(G=>{G||this._update(!0)})),this}removeSprite(K){return this._lazyInitEmptyStyle(),this.style.removeSprite(K),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(K,b={}){return this._lazyInitEmptyStyle(),this.style.setSprite(K,b,(I=>{I||this._update(!0)})),this}setLight(K,b={}){return this._lazyInitEmptyStyle(),this.style.setLight(K,b),this._update(!0)}getLight(){return this.style.getLight()}setSky(K){return this._lazyInitEmptyStyle(),this.style.setSky(K),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(K,b){return this.style.setFeatureState(K,b),this._update()}removeFeatureState(K,b){return this.style.removeFeatureState(K,b),this._update()}getFeatureState(K){return this.style.getFeatureState(K)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let K=0,b=0;return this._container&&(K=this._container.clientWidth||400,b=this._container.clientHeight||300),[K,b]}_setupContainer(){let K=this._container;K.classList.add("maplibregl-map");let b=this._canvasContainer=c.create("div","maplibregl-canvas-container",K);this._interactive&&b.classList.add("maplibregl-interactive"),this._canvas=c.create("canvas","maplibregl-canvas",b),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let I=this._containerDimensions(),G=this._getClampedPixelRatio(I[0],I[1]);this._resizeCanvas(I[0],I[1],G);let H=this._controlContainer=c.create("div","maplibregl-control-container",K),$=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach((xe=>{$[xe]=c.create("div",`maplibregl-ctrl-${xe} `,H)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(K,b,I){this._canvas.width=Math.floor(I*K),this._canvas.height=Math.floor(I*b),this._canvas.style.width=`${K}px`,this._canvas.style.height=`${b}px`}_setupPainter(){let K={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},b=null;this._canvas.addEventListener("webglcontextcreationerror",(G=>{b={requestedAttributes:K},G&&(b.statusMessage=G.statusMessage,b.type=G.type)}),{once:!0});let I=this._canvas.getContext("webgl2",K)||this._canvas.getContext("webgl",K);if(!I){let G="Failed to initialize WebGL";throw b?(b.message=G,new Error(JSON.stringify(b))):new Error(G)}this.painter=new sh(I,this.transform),f.testSupport(I)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(K){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||K,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(K){return this._update(),this._renderTaskQueue.add(K)}_cancelRenderFrame(K){this._renderTaskQueue.remove(K)}_render(K){let b=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(K),this._removed)return;let I=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let H=this.transform.zoom,$=u.now();this.style.zoomHistory.update(H,$);let xe=new i.z(H,{now:$,fadeDuration:b,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),ke=xe.crossFadingFactor();ke===1&&ke===this._crossFadingFactor||(I=!0,this._crossFadingFactor=ke),this.style.update(xe)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,b,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:b,showPadding:this.showPadding}),this.fire(new i.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,i.bf.mark(i.bg.load),this.fire(new i.k("load"))),this.style&&(this.style.hasTransitions()||I)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let G=this._sourcesDirty||this._styleDirty||this._placementDirty;return G||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new i.k("idle")),!this._loaded||this._fullyLoaded||G||(this._fullyLoaded=!0,i.bf.mark(i.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var K;this._hash&&this._hash.remove();for(let I of this._controls)I.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&removeEventListener("online",this._onWindowOnline,!1),g.removeThrottleControl(this._imageQueueHandle),(K=this._resizeObserver)===null||K===void 0||K.disconnect();let b=this.painter.context.gl.getExtension("WEBGL_lose_context");b!=null&&b.loseContext&&b.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),c.remove(this._canvasContainer),c.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),i.bf.clearMetrics(),this._removed=!0,this.fire(new i.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,u.frameAsync(this._frameRequest).then((K=>{i.bf.frame(K),this._frameRequest=null,this._render(K)})).catch((()=>{})))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(K){this._showTileBoundaries!==K&&(this._showTileBoundaries=K,this._update())}get showPadding(){return!!this._showPadding}set showPadding(K){this._showPadding!==K&&(this._showPadding=K,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(K){this._showCollisionBoxes!==K&&(this._showCollisionBoxes=K,K?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(K){this._showOverdrawInspector!==K&&(this._showOverdrawInspector=K,this._update())}get repaint(){return!!this._repaint}set repaint(K){this._repaint!==K&&(this._repaint=K,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(K){this._vertices=K,this._update()}get version(){return Js}getCameraTargetElevation(){return this.transform.elevation}},a.MapMouseEvent=Fs,a.MapTouchEvent=oc,a.MapWheelEvent=xd,a.Marker=au,a.NavigationControl=class{constructor(K){this._updateZoomButtons=()=>{let b=this._map.getZoom(),I=b===this._map.getMaxZoom(),G=b===this._map.getMinZoom();this._zoomInButton.disabled=I,this._zoomOutButton.disabled=G,this._zoomInButton.setAttribute("aria-disabled",I.toString()),this._zoomOutButton.setAttribute("aria-disabled",G.toString())},this._rotateCompassArrow=()=>{let b=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._compassIcon.style.transform=b},this._setButtonTitle=(b,I)=>{let G=this._map._getUIString(`NavigationControl.${I}`);b.title=G,b.setAttribute("aria-label",G)},this.options=i.e({},ya,K),this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(b=>b.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(b=>this._map.zoomIn({},{originalEvent:b}))),c.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(b=>this._map.zoomOut({},{originalEvent:b}))),c.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(b=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:b}):this._map.resetNorth({},{originalEvent:b})})),this._compassIcon=c.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(K){return this._map=K,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new ho(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){c.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),this._handler.off(),delete this._handler),delete this._map}_createButton(K,b){let I=c.create("button",K,this._container);return I.type="button",I.addEventListener("click",b),I}},a.Popup=class extends i.E{constructor(K){super(),this.remove=()=>(this._content&&c.remove(this._content),this._container&&(c.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new i.k("close"))),this),this._onMouseUp=b=>{this._update(b.point)},this._onMouseMove=b=>{this._update(b.point)},this._onDrag=b=>{this._update(b.point)},this._update=b=>{var I;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=c.create("div","maplibregl-popup",this._map.getContainer()),this._tip=c.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let ke of this.options.className.split(" "))this._container.classList.add(ke);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Yi(this._lngLat,this._flatPos,this._map.transform):(I=this._lngLat)===null||I===void 0?void 0:I.wrap(),this._trackPointer&&!b)return;let G=this._flatPos=this._pos=this._trackPointer&&b?b:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&b?b:this._map.transform.locationPoint(this._lngLat));let H=this.options.anchor,$=pf(this.options.offset);if(!H){let ke=this._container.offsetWidth,Ne=this._container.offsetHeight,et;et=G.y+$.bottom.ythis._map.transform.height-Ne?["bottom"]:[],G.xthis._map.transform.width-ke/2&&et.push("right"),H=et.length===0?"bottom":et.join("-")}let xe=G.add($[H]);this.options.subpixelPositioning||(xe=xe.round()),c.setTransform(this._container,`${Vs[H]} translate(${xe.x}px,${xe.y}px)`),xu(this._container,H,"popup")},this._onClose=()=>{this.remove()},this.options=i.e(Object.create(oi),K)}addTo(K){return this._map&&this.remove(),this._map=K,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new i.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(K){return this._lngLat=i.N.convert(K),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(K){return this.setDOMContent(document.createTextNode(K))}setHTML(K){let b=document.createDocumentFragment(),I=document.createElement("body"),G;for(I.innerHTML=K;G=I.firstChild,G;)b.appendChild(G);return this.setDOMContent(b)}getMaxWidth(){var K;return(K=this._container)===null||K===void 0?void 0:K.style.maxWidth}setMaxWidth(K){return this.options.maxWidth=K,this._update(),this}setDOMContent(K){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=c.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(K),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(K){return this._container&&this._container.classList.add(K),this}removeClassName(K){return this._container&&this._container.classList.remove(K),this}setOffset(K){return this.options.offset=K,this._update(),this}toggleClassName(K){if(this._container)return this._container.classList.toggle(K)}setSubpixelPositioning(K){this.options.subpixelPositioning=K}_createCloseButton(){this.options.closeButton&&(this._closeButton=c.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let K=this._container.querySelector(Ph);K&&K.focus()}},a.RasterDEMTileSource=st,a.RasterTileSource=vt,a.ScaleControl=class{constructor(K){this._onMove=()=>{Pc(this._map,this._container,this.options)},this.setUnit=b=>{this.options.unit=b,Pc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},ul),K)}getDefaultPosition(){return"bottom-left"}onAdd(K){return this._map=K,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-scale",K.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){c.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},a.ScrollZoomHandler=mr,a.Style=xi,a.TerrainControl=class{constructor(K){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=K}onAdd(K){return this._map=K,this._container=c.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=c.create("button","maplibregl-ctrl-terrain",this._container),c.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){c.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},a.TwoFingersTouchPitchHandler=Wu,a.TwoFingersTouchRotateHandler=ed,a.TwoFingersTouchZoomHandler=Fu,a.TwoFingersTouchZoomRotateHandler=tn,a.VectorTileSource=Xe,a.VideoSource=lt,a.addSourceType=(K,b)=>i._(void 0,void 0,void 0,(function*(){if(Ee(K))throw new Error(`A source type called "${K}" already exists.`);((I,G)=>{de[I]=G})(K,b)})),a.clearPrewarmedResources=function(){let K=re;K&&(K.isPreloaded()&&K.numActive()===1?(K.release(te),re=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},a.getMaxParallelImageRequests=function(){return i.a.MAX_PARALLEL_IMAGE_REQUESTS},a.getRTLTextPluginStatus=function(){return tt().getRTLTextPluginStatus()},a.getVersion=function(){return iu},a.getWorkerCount=function(){return se.workerCount},a.getWorkerUrl=function(){return i.a.WORKER_URL},a.importScriptInWorkers=function(K){return oe().broadcast("IS",K)},a.prewarm=function(){fe().acquire(te)},a.setMaxParallelImageRequests=function(K){i.a.MAX_PARALLEL_IMAGE_REQUESTS=K},a.setRTLTextPlugin=function(K,b){return tt().setRTLTextPlugin(K,b)},a.setWorkerCount=function(K){se.workerCount=K},a.setWorkerUrl=function(K){i.a.WORKER_URL=K}}));var n=e;return n}))});var tNe=ne((Pgr,eNe)=>{"use strict";var R2=Zt(),RVt=Ms().sanitizeHTML,IVt=cY(),KOe=cy();function JOe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=KOe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var b0=JOe.prototype;b0.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=sF(t)};b0.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};b0.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};b0.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};b0.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};b0.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};b0.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!sF(e)){var r=zVt(e);t.addSource(this.idSource,r)}};b0.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function QOe(e){var t={},r={};switch(e.type){case"circle":R2.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":R2.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":R2.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,a=IVt(n.textposition,n.iconsize);R2.extendFlat(t,{"icon-image":n.icon,"icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":n.placement}),R2.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":R2.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function zVt(e){var t=e.sourcetype,r=e.source,n={type:t},a;return t==="geojson"?a="data":t==="vector"?a=typeof r=="string"?"url":"tiles":t==="raster"?(a="tiles",n.tileSize=256):t==="image"&&(a="url",n.coordinates=e.coordinates),n[a]=r,e.sourceattribution&&(n.attribution=RVt(e.sourceattribution)),n}eNe.exports=function(t,r,n){var a=new JOe(t,r);return a.update(n),a}});var fNe=ne((Dgr,cNe)=>{"use strict";var gY=$Oe(),uF=Zt(),aNe=sg(),rNe=Fa(),qVt=ri(),BVt=od(),lF=cu(),iNe=Cp(),OVt=iNe.drawMode,NVt=iNe.selectMode,UVt=ef().prepSelect,VVt=ef().clearOutline,GVt=ef().clearSelectionsCache,HVt=ef().selectOnClick,fy=cy(),jVt=tNe();function oNe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var Hc=oNe.prototype;Hc.plot=function(e,t,r){var n=this,a;n.map?a=new Promise(function(i,o){n.updateMap(e,t,i,o)}):a=new Promise(function(i,o){n.createMap(e,t,i,o)}),r.push(a)};Hc.createMap=function(e,t,r,n){var a=this,i=t[a.id],o=a.styleObj=uNe(i.style),s=i.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null;let u={container:a.div,style:o.style,center:mY(i.center),zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,maxBounds:l,interactive:!a.isStatic,preserveDrawingBuffer:a.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},c=i._fitBounds;c&&(u.bounds=[[c.west,c.south],[c.east,c.north]],u.fitBoundsOptions={padding:fy.fitBoundsPadding});let f=a.map=new gY.Map(u).addControl(new gY.AttributionControl({compact:!0}));var h={};f.on("styleimagemissing",function(d){var m=d.id;if(!h[m]&&/^[a-zA-Z0-9-]+$/.test(m)){h[m]=!0;var x=new Image(15,15);x.onload=function(){f.addImage(m,x,{sdf:!0})},x.crossOrigin="Anonymous",x.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+m+".svg"}}),f.setTransformRequest(function(d){return d=d.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),d=d.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),d=d.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:d}}),f._canvas.style.left="0px",f._canvas.style.top="0px",a.rejectOnError(n),a.isStatic||a.initFx(e,t);var v=[];v.push(new Promise(function(d){f.once("load",d)})),v=v.concat(aNe.fetchTraceGeoData(e)),Promise.all(v).then(function(){c&&sNe(a,i),lNe(a,i),a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)}).catch(n)};Hc.updateMap=function(e,t,r,n){var a=this,i=a.map,o=t[this.id];a.rejectOnError(n);var s=[],l=uNe(o.style);JSON.stringify(a.styleObj)!==JSON.stringify(l)&&(a.styleObj=l,i.setStyle(l.style),a.traceHash={},s.push(new Promise(function(u){i.once("styledata",u)}))),s=s.concat(aNe.fetchTraceGeoData(e)),Promise.all(s).then(function(){a.fillBelowLookup(e,t),a.updateData(e);let u=o._fitBounds;u&&(i.fitBounds([[u.west,u.south],[u.east,u.north]],{padding:fy.fitBoundsPadding,animate:!1}),sNe(a,o),lNe(a,o)),a.updateLayout(t),a.resolveOnRender(r)}).catch(n)};function sNe(e,t){let{center:r,zoom:n}=e.getView();t._input.center=t.center=r,t._input.zoom=t.zoom=n,t._input._fitView={center:uv({},r),zoom:n}}function lNe(e,t){let r=e.getView();e.viewInitial={center:uF.extendFlat({},r.center),bearing:t.bearing,pitch:t.pitch,zoom:r.zoom}}Hc.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,a,i,o=this.belowLookup={},s=!1;for(a=0;a1)for(a=0;a-1&&HVt(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&lF.click(n,l.originalEvent)}}};Hc.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function a(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var i=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[a([u.xmin,u.ymin]),a([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(a)}};var s=t.dragOptions;t.dragOptions=uF.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),NVt(i)||OVt(i)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){UVt(l,u,c,t.dragOptions,i)},BVt.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};Hc.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};Hc.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,a;if(r.length!==n.length){for(a=0;aWVt});function WVt(e,t){let r=[];for(let l of e){if(l.subplot!==t||l.visible!==!0)continue;if(l.type==="choroplethmap")return null;let{lat:u,lon:c}=l;if(!c||!u)continue;let f=Math.min(c.length,u.length);for(let h=0;h{"use strict";hNe=yp(sg())});var mNe=ne((Igr,gNe)=>{"use strict";var yY=Zt(),YVt=qx(),XVt=zh(),pNe=F6(),{getMapFitBounds:ZVt}=(vNe(),vl(dNe));gNe.exports=function(t,r,n){YVt(t,r,n,{type:"map",attributes:pNe,handleDefaults:$Vt,partition:"y",fullData:n})};function $Vt(e,t,r,n){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let a=r("fitbounds");var i=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),l=r("bounds.north");(i===void 0||o===void 0||s===void 0||l===void 0)&&delete t.bounds,XVt(e,t,{name:"layers",handleItemDefaults:KVt}),t._fitBounds=null;let{_fitView:{center:u,zoom:c}={},center:f,zoom:h}=e,v=(f==null?void 0:f.lon)===(u==null?void 0:u.lon)&&(f==null?void 0:f.lat)===(u==null?void 0:u.lat)&&h===c;if(a&&v){let d=ZVt(n.fullData,n.id);d&&(t._fitBounds=d)}t._input=e}function KVt(e,t){function r(l,u){return yY.coerce(e,t,pNe.layers,l,u)}var n=r("visible");if(n){var a=r("sourcetype"),i=a==="raster"||a==="image";r("source"),r("sourceattribution"),a==="vector"&&r("sourcelayer"),a==="image"&&r("coordinates");var o;i&&(o="raster");var s=r("type",o);i&&s!=="raster"&&(s=t.type="raster",yY.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),yY.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var cF=ne(kv=>{"use strict";var xY=Zt(),yNe=xY.strTranslate,JVt=xY.strScale,QVt=mh().getSubplotCalcData,eGt=qv(),tGt=Ea(),xNe=li(),rGt=Ms(),nGt=fNe(),hy="map";kv.name=hy;kv.attr="subplot";kv.idRoot=hy;kv.idRegex=kv.attrRegex=xY.counterRegex(hy);kv.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};kv.layoutAttributes=F6();kv.supplyLayoutDefaults=mNe();kv.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,a=r._subplots[hy],i=0;im/2){var x=f.split("|").join("
");v.text(x).attr("data-unformatted",x).call(rGt.convertToTspans,e),d=xNe.bBox(v.node())}v.attr("transform",yNe(-3,-d.height+8)),h.insert("rect",".static-attribution").attr({x:-d.width-6,y:-d.height-3,width:d.width+6,height:d.height+3,fill:"rgba(255, 255, 255, 0.75)"});var g=1;d.width+6>m&&(g=m/(d.width+6));var E=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];h.attr("transform",yNe(E[0],E[1])+JVt(g))}};kv.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[hy],n=0;n{"use strict";bNe.exports={attributes:tF(),supplyDefaults:kOe(),colorbar:bh(),formatLabels:uY(),calc:bH(),plot:VOe(),hoverPoints:oF().hoverPoints,eventData:WOe(),selectPoints:XOe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:cF(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var TNe=ne((Bgr,wNe)=>{"use strict";wNe.exports=_Ne()});var bY=ne((Ogr,ANe)=>{"use strict";var gg=JA(),aGt=Ys(),{hovertemplateAttrs:iGt,templatefallbackAttrs:oGt}=rs(),sGt=os(),dy=ci().extendFlat;ANe.exports=dy({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:dy({},gg.featureidkey,{}),below:{valType:"string",editType:"plot"},text:gg.text,hovertext:gg.hovertext,marker:{line:{color:dy({},gg.marker.line.color,{editType:"plot"}),width:dy({},gg.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:dy({},gg.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:dy({},gg.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:dy({},gg.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:gg.hoverinfo,hovertemplate:iGt({},{keys:["properties"]}),hovertemplatefallback:oGt(),showlegend:dy({},sGt.showlegend,{dflt:!1})},aGt("",{cLetter:"z",editTypeOverride:"calc"}))});var SNe=ne((Ngr,MNe)=>{"use strict";var I6=Zt(),lGt=bf(),uGt=bY();MNe.exports=function(t,r,n,a){function i(c,f){return I6.coerce(t,r,uGt,c,f)}var o=i("locations"),s=i("z"),l=i("geojson");if(!I6.isArrayOrTypedArray(o)||!o.length||!I6.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||I6.isPlainObject(l))){r.visible=!1;return}i("featureidkey"),r._length=Math.min(o.length,s.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var u=i("marker.line.width");u&&i("marker.line.color"),i("marker.opacity"),lGt(t,r,a,i,{prefix:"",cLetter:"z"}),I6.coerceSelectionMarkerOpacity(r,i)}});var _Y=ne((Ugr,CNe)=>{"use strict";var cGt=mi(),mg=Zt(),fGt=El(),hGt=li(),dGt=jA().makeBlank,ENe=sg();function vGt(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},a={layout:{visibility:"none"},paint:{}},i=t._opts={fill:n,line:a,geojson:dGt()};if(!r)return i;var o=ENe.extractTraceFeature(e);if(!o)return i;var s=fGt.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;mg.isArrayOrTypedArray(l.opacity)&&(c=function(E){var M=E.mo;return cGt(M)?+mg.constrain(M,0,1):0});var f;mg.isArrayOrTypedArray(u.color)&&(f=function(E){return E.mlc});var h;mg.isArrayOrTypedArray(u.width)&&(h=function(E){return E.mlw});for(var v=0;v{"use strict";var FNe=_Y().convert,pGt=_Y().convertOnSelect,LNe=cy().traceLayerPrefix;function PNe(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",LNe+t+"-fill"],["line",LNe+t+"-line"]],this.below=null}var Lw=PNe.prototype;Lw.update=function(e){this._update(FNe(e)),e[0].trace._glTrace=this};Lw.updateOnSelect=function(e){this._update(pGt(e))};Lw._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};Lw.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};DNe.exports=function(t,r){var n=r[0].trace,a=new PNe(t,n.uid),i=a.sourceId,o=FNe(r),s=a.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(i,{type:"geojson",data:o.geojson}),a._addLayers(o,s),r[0].trace._glTrace=a,a}});var zNe=ne((Ggr,INe)=>{"use strict";INe.exports={attributes:bY(),supplyDefaults:SNe(),colorbar:V_(),calc:$H(),plot:RNe(),hoverPoints:QH(),eventData:ej(),selectPoints:tj(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var a=r[n].id;if(typeof a=="string"&&a.indexOf("water")===0){for(var i=n+1;i{"use strict";qNe.exports=zNe()});var TY=ne((jgr,NNe)=>{"use strict";var gGt=Ys(),{hovertemplateAttrs:mGt,templatefallbackAttrs:yGt}=rs(),ONe=os(),fF=tF(),wY=ci().extendFlat;NNe.exports=wY({lon:fF.lon,lat:fF.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:fF.text,hovertext:fF.hovertext,hoverinfo:wY({},ONe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:mGt(),hovertemplatefallback:yGt(),showlegend:wY({},ONe.showlegend,{dflt:!1})},gGt("",{cLetter:"z",editTypeOverride:"calc"}))});var VNe=ne((Wgr,UNe)=>{"use strict";var xGt=Zt(),bGt=bf(),_Gt=TY();UNe.exports=function(t,r,n,a){function i(u,c){return xGt.coerce(t,r,_Gt,u,c)}var o=i("lon")||[],s=i("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),bGt(t,r,a,i,{prefix:"",cLetter:"z"})}});var jNe=ne((Ygr,HNe)=>{"use strict";var AY=mi(),wGt=Zt().isArrayOrTypedArray,MY=uo().BADNUM,TGt=qh(),GNe=Zt()._;HNe.exports=function(t,r){for(var n=r._length,a=new Array(n),i=r.z,o=wGt(i)&&i.length,s=0;s{"use strict";var AGt=mi(),SY=Zt(),WNe=_a(),YNe=El(),XNe=uo().BADNUM,MGt=jA().makeBlank;ZNe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,a={layout:{visibility:"none"},paint:{}},i=r._opts={heatmap:a,geojson:MGt()};if(!n)return i;var o=[],s,l=r.z,u=r.radius,c=SY.isArrayOrTypedArray(l)&&l.length,f=SY.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:d})}}var x=YNe.extractOpts(r),g=x.reversescale?YNe.flipScale(x.colorscale):x.colorscale,E=g[0][1],M=WNe.opacity(E)<1?E:WNe.addOpacity(E,0),w=["interpolate",["linear"],["heatmap-density"],0,M];for(s=1;s{"use strict";var KNe=$Ne(),SGt=cy().traceLayerPrefix;function JNe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",SGt+t+"-heatmap"]],this.below=null}var hF=JNe.prototype;hF.update=function(e){var t=this.subplot,r=this.layerList,n=KNe(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(n,a),this.below=a);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};hF.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};QNe.exports=function(t,r){var n=r[0].trace,a=new JNe(t,n.uid),i=a.sourceId,o=KNe(r),s=a.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(i,{type:"geojson",data:o.geojson}),a._addLayers(o,s),a}});var rUe=ne(($gr,tUe)=>{"use strict";var EGt=ri(),kGt=oF().hoverPoints,CGt=oF().getExtraText;tUe.exports=function(t,r,n){var a=kGt(t,r,n);if(a){var i=a[0],o=i.cd,s=o[0].trace,l=o[i.index];if(delete i.color,"z"in l){var u=i.subplot.mockAxis;i.z=l.z,i.zLabel=EGt.tickText(u,u.c2l(l.z),"hover").text}return i.extraText=CGt(s,l,o[0].t.labels),[i]}}});var aUe=ne((Kgr,nUe)=>{"use strict";nUe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var oUe=ne((Jgr,iUe)=>{"use strict";iUe.exports={attributes:TY(),supplyDefaults:VNe(),colorbar:V_(),formatLabels:uY(),calc:jNe(),plot:eUe(),hoverPoints:rUe(),eventData:aUe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";sUe.exports=oUe()});var kY=ne((tmr,dUe)=>{"use strict";var LGt=pl(),FGt=os(),uUe=Ic(),EY=db(),PGt=zl().attributes,{hovertemplateAttrs:cUe,templatefallbackAttrs:fUe}=rs(),DGt=Ys(),RGt=Bo().templatedArray,IGt=Wl().descriptionOnlyNumbers,hUe=ci().extendFlat,zGt=Il().overrideAll,emr=dUe.exports=zGt({hoverinfo:hUe({},FGt.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:EY.hoverlabel,domain:PGt({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:IGt("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:LGt({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:uUe.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:EY.hoverlabel,hovertemplate:cUe({},{keys:["value","label"]}),hovertemplatefallback:fUe(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"},sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:uUe.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:EY.hoverlabel,hovertemplate:cUe({},{keys:["value","label"]}),hovertemplatefallback:fUe(),colorscales:RGt("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:hUe(DGt().colorscale,{dflt:[[0,"white"],[1,"black"]]})}),sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}}},"calc","nested")});var mUe=ne((rmr,gUe)=>{"use strict";var Pw=Zt(),dF=kY(),Fw=_a(),qGt=zl().defaults,vUe=n4(),pUe=Bo(),BGt=zh();gUe.exports=function(t,r,n,a){function i(w,k){return Pw.coerce(t,r,dF,w,k)}var o=Pw.extendDeep(a.hoverlabel,t.hoverlabel),s=t.node,l=pUe.newContainer(r,"node");function u(w,k){return Pw.coerce(s,l,dF.node,w,k)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),vUe(s,l,u,o),u("hovertemplate"),u("align"),u("sort");var c=a.colorway;let f=w=>c[w%c.length];u("color",l.label.map((w,k)=>Fw.addOpacity(f(k),.8))),u("customdata");var h=t.link||{},v=pUe.newContainer(r,"link");function d(w,k){return Pw.coerce(h,v,dF.link,w,k)}d("label"),d("arrowlen"),d("source"),d("target"),d("value"),d("line.color"),d("line.width"),d("hoverinfo",t.hoverinfo),vUe(h,v,d,o),d("hovertemplate"),d("sort");var m=Fw.color(a.paper_bgcolor).luminosity()<.333,x=m?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",g=d("color",x);function E(w){if(!Fw.isValid(w))return w;let k=Fw.color(w),y=k.alpha();return y<=.8?k.alpha(y+.2).rgb().string():m?Fw.brighten(k,10):Fw.adjustLightness(k,-10).rgb().string()}d("hovercolor",Array.isArray(g)?g.map(E):E(g)),d("customdata"),BGt(h,v,{name:"colorscales",handleItemDefaults:OGt}),qGt(r,a,i),i("orientation"),i("valueformat"),i("valuesuffix");let M=l.x.length&&l.y.length?"freeform":void 0;i("arrangement",M),Pw.coerceFont(i,"textfont",a.font,{autoShadowDflt:!0}),r._length=null};function OGt(e,t){function r(n,a){return Pw.coerce(e,t,dF.link.colorscales,n,a)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var CY=ne((nmr,yUe)=>{"use strict";yUe.exports=NGt;function NGt(e){for(var t=e.length,r=new Array(t),n=new Array(t),a=new Array(t),i=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){x=E[E.length-1];var M=e[x];if(i[x]=0&&s[x].push(o[k])}i[x]=w}else{if(n[x]===r[x]){for(var y=[],S=[],T=0,w=g.length-1;w>=0;--w){var p=g[w];if(a[p]=!1,y.push(p),S.push(s[p]),T+=s[p].length,o[p]=c.length,p===x){g.length=w;break}}c.push(y);for(var C=new Array(T),w=0;w{"use strict";var UGt=CY(),Dw=Zt(),VGt=c1().wrap,z6=Dw.isArrayOrTypedArray,xUe=Dw.isIndex,bUe=El();function GGt(e){var t=e.node,r=e.link,n=[],a=z6(r.color),i=z6(r.hovercolor),o=z6(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;cd&&(d=r.source[c]),r.target[c]>d&&(d=r.target[c]);var m=d+1;e.node._count=m;var x,g=e.node.groups,E={};for(c=0;c0&&xUe(T,m)&&xUe(p,m)&&!(E.hasOwnProperty(T)&&E.hasOwnProperty(p)&&E[T]===E[p])){E.hasOwnProperty(p)&&(p=E[p]),E.hasOwnProperty(T)&&(T=E[T]),T=+T,p=+p,s[T]=s[p]=!0;var C="";r.label&&r.label[c]&&(C=r.label[c]);var A=null;C&&l.hasOwnProperty(C)&&(A=l[C]),n.push({pointNumber:c,label:C,color:a?r.color[c]:r.color,hovercolor:i?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:A,source:T,target:p,value:+S}),y.source.push(T),y.target.push(p)}}var P=m+g.length,D=z6(t.color),z=z6(t.customdata),q=[];for(c=0;cm-1,childrenNodes:[],pointNumber:c,label:U,color:D?t.color[c]:t.color,customdata:z?t.customdata[c]:t.customdata})}var O=!1;return HGt(P,y.source,y.target)&&(O=!0),{circular:O,links:n,nodes:q,groups:g,groupLookup:E}}function HGt(e,t,r){for(var n=Dw.init2dArray(e,0),a=0;a1})}_Ue.exports=function(t,r){var n=GGt(r);return VGt({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var AUe=ne((vF,TUe)=>{(function(e,t){typeof vF=="object"&&typeof TUe!="undefined"?t(vF):(e=e||self,t(e.d3=e.d3||{}))})(vF,function(e){"use strict";function t(S){var T=+this._x.call(null,S),p=+this._y.call(null,S);return r(this.cover(T,p),T,p,S)}function r(S,T,p,C){if(isNaN(T)||isNaN(p))return S;var A,P=S._root,D={data:C},z=S._x0,q=S._y0,U=S._x1,O=S._y1,R,B,Y,X,te,se,ue,re;if(!P)return S._root=D,S;for(;P.length;)if((te=T>=(R=(z+U)/2))?z=R:U=R,(se=p>=(B=(q+O)/2))?q=B:O=B,A=P,!(P=P[ue=se<<1|te]))return A[ue]=D,S;if(Y=+S._x.call(null,P.data),X=+S._y.call(null,P.data),T===Y&&p===X)return D.next=P,A?A[ue]=D:S._root=D,S;do A=A?A[ue]=new Array(4):S._root=new Array(4),(te=T>=(R=(z+U)/2))?z=R:U=R,(se=p>=(B=(q+O)/2))?q=B:O=B;while((ue=se<<1|te)===(re=(X>=B)<<1|Y>=R));return A[re]=P,A[ue]=D,S}function n(S){var T,p,C=S.length,A,P,D=new Array(C),z=new Array(C),q=1/0,U=1/0,O=-1/0,R=-1/0;for(p=0;pO&&(O=A),PR&&(R=P));if(q>O||U>R)return this;for(this.cover(q,U).cover(O,R),p=0;pS||S>=A||C>T||T>=P;)switch(U=(TO||(z=X.y0)>R||(q=X.x1)=ue)<<1|S>=se)&&(X=B[B.length-1],B[B.length-1]=B[B.length-1-te],B[B.length-1-te]=X)}else{var re=S-+this._x.call(null,Y.data),j=T-+this._y.call(null,Y.data),fe=re*re+j*j;if(fe=(B=(D+q)/2))?D=B:q=B,(te=R>=(Y=(z+U)/2))?z=Y:U=Y,T=p,!(p=p[se=te<<1|X]))return this;if(!p.length)break;(T[se+1&3]||T[se+2&3]||T[se+3&3])&&(C=T,ue=se)}for(;p.data!==S;)if(A=p,!(p=p.next))return this;return(P=p.next)&&delete p.next,A?(P?A.next=P:delete A.next,this):T?(P?T[se]=P:delete T[se],(p=T[0]||T[1]||T[2]||T[3])&&p===(T[3]||T[2]||T[1]||T[0])&&!p.length&&(C?C[ue]=p:this._root=p),this):(this._root=P,this)}function c(S){for(var T=0,p=S.length;T{(function(e,t){t(typeof pF=="object"&&typeof MUe!="undefined"?pF:e.d3=e.d3||{})})(pF,(function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(m){return t+m in this},get:function(m){return this[t+m]},set:function(m,x){return this[t+m]=x,this},remove:function(m){var x=t+m;return x in this&&delete this[x]},clear:function(){for(var m in this)m[0]===t&&delete this[m]},keys:function(){var m=[];for(var x in this)x[0]===t&&m.push(x.slice(1));return m},values:function(){var m=[];for(var x in this)x[0]===t&&m.push(this[x]);return m},entries:function(){var m=[];for(var x in this)x[0]===t&&m.push({key:x.slice(1),value:this[x]});return m},size:function(){var m=0;for(var x in this)x[0]===t&&++m;return m},empty:function(){for(var m in this)if(m[0]===t)return!1;return!0},each:function(m){for(var x in this)x[0]===t&&m(this[x],x.slice(1),this)}};function n(m,x){var g=new r;if(m instanceof r)m.each(function(y,S){g.set(S,y)});else if(Array.isArray(m)){var E=-1,M=m.length,w;if(x==null)for(;++E=m.length)return g!=null&&y.sort(g),E!=null?E(y):y;for(var C=-1,A=y.length,P=m[S++],D,z,q=n(),U,O=T();++Cm.length)return y;var T,p=x[S-1];return E!=null&&S>=m.length?T=y.entries():(T=[],y.each(function(C,A){T.push({key:A,values:k(C,S)})})),p!=null?T.sort(function(C,A){return p(C.key,A.key)}):T}return M={object:function(y){return w(y,0,i,o)},map:function(y){return w(y,0,s,l)},entries:function(y){return k(w(y,0,s,l),0)},key:function(y){return m.push(y),M},sortKeys:function(y){return x[m.length-1]=y,M},sortValues:function(y){return g=y,M},rollup:function(y){return E=y,M}}}function i(){return{}}function o(m,x,g){m[x]=g}function s(){return n()}function l(m,x,g){m.set(x,g)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(m){return m+="",this[t+m]=m,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(m,x){var g=new u;if(m instanceof u)m.each(function(w){g.add(w)});else if(m){var E=-1,M=m.length;if(x==null)for(;++E{(function(e,t){typeof gF=="object"&&typeof SUe!="undefined"?t(gF):(e=e||self,t(e.d3=e.d3||{}))})(gF,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=a(s+"",u),f,h=-1,v=c.length;if(arguments.length<2){for(;++h0)for(var u=new Array(f),c=0,f,h;c{(function(e,t){typeof mF=="object"&&typeof kUe!="undefined"?t(mF):(e=e||self,t(e.d3=e.d3||{}))})(mF,function(e){"use strict";var t=0,r=0,n=0,a=1e3,i,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(S){setTimeout(S,17)};function h(){return l||(f(v),l=c.now()+u)}function v(){l=0}function d(){this._call=this._time=this._next=null}d.prototype=m.prototype={constructor:d,restart:function(S,T,p){if(typeof S!="function")throw new TypeError("callback is not a function");p=(p==null?h():+p)+(T==null?0:+T),!this._next&&o!==this&&(o?o._next=this:i=this,o=this),this._call=S,this._time=p,w()},stop:function(){this._call&&(this._call=null,this._time=1/0,w())}};function m(S,T,p){var C=new d;return C.restart(S,T,p),C}function x(){h(),++t;for(var S=i,T;S;)(T=l-S._time)>=0&&S._call.call(null,T),S=S._next;--t}function g(){l=(s=c.now())+u,t=r=0;try{x()}finally{t=0,M(),l=0}}function E(){var S=c.now(),T=S-s;T>a&&(u-=T,s=S)}function M(){for(var S,T=i,p,C=1/0;T;)T._call?(C>T._time&&(C=T._time),S=T,T=T._next):(p=T._next,T._next=null,T=S?S._next=p:i=p);o=S,w(C)}function w(S){if(!t){r&&(r=clearTimeout(r));var T=S-l;T>24?(S<1/0&&(r=setTimeout(g,S-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(E,a)),t=1,f(g))}}function k(S,T,p){var C=new d;return T=T==null?0:+T,C.restart(function(A){C.stop(),S(A+T)},T,p),C}function y(S,T,p){var C=new d,A=T;return T==null?(C.restart(S,T,p),C):(T=+T,p=p==null?h():+p,C.restart(function P(D){D+=A,C.restart(P,A+=T,p),S(D)},T,p),C)}e.interval=y,e.now=h,e.timeout=k,e.timer=m,e.timerFlush=x,Object.defineProperty(e,"__esModule",{value:!0})})});var FUe=ne((yF,LUe)=>{(function(e,t){typeof yF=="object"&&typeof LUe!="undefined"?t(yF,AUe(),LY(),EUe(),CUe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(yF,(function(e,t,r,n,a){"use strict";function i(S,T){var p;S==null&&(S=0),T==null&&(T=0);function C(){var A,P=p.length,D,z=0,q=0;for(A=0;AR.index){var Pe=B-we.x-we.vx,le=Y-we.y-we.vy,ze=Pe*Pe+le*le;zeB+ye||ceY+ye||oeq.r&&(q.r=q[U].r)}function z(){if(T){var q,U=T.length,O;for(p=new Array(U),q=0;q1?(te==null?z.remove(X):z.set(X,Y(te)),T):z.get(X)},find:function(X,te,se){var ue=0,re=S.length,j,fe,ce,oe,we;for(se==null?se=1/0:se*=se,ue=0;ue1?(U.on(X,te),T):U.on(X)}}}function M(){var S,T,p,C=o(-30),A,P=1,D=1/0,z=.81;function q(B){var Y,X=S.length,te=t.quadtree(S,d,m).visitAfter(O);for(p=B,Y=0;Y=D)return;(B.data!==T||B.next)&&(se===0&&(se=s(),j+=se*se),ue===0&&(ue=s(),j+=ue*ue),j{(function(e,t){typeof xF=="object"&&typeof PUe!="undefined"?t(xF):(e=e||self,t(e.d3=e.d3||{}))})(xF,function(e){"use strict";var t=Math.PI,r=2*t,n=1e-6,a=r-n;function i(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new i}i.prototype=o.prototype={constructor:i,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,h){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+h)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var h=this._x1,v=this._y1,d=u-s,m=c-l,x=h-s,g=v-l,E=x*x+g*g;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(E>n)if(!(Math.abs(g*d-m*x)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var M=u-h,w=c-v,k=d*d+m*m,y=M*M+w*w,S=Math.sqrt(k),T=Math.sqrt(E),p=f*Math.tan((t-Math.acos((k+E-y)/(2*S*T)))/2),C=p/T,A=p/S;Math.abs(C-1)>n&&(this._+="L"+(s+C*x)+","+(l+C*g)),this._+="A"+f+","+f+",0,0,"+ +(g*M>x*w)+","+(this._x1=s+A*d)+","+(this._y1=l+A*m)}},arc:function(s,l,u,c,f,h){s=+s,l=+l,u=+u,h=!!h;var v=u*Math.cos(c),d=u*Math.sin(c),m=s+v,x=l+d,g=1^h,E=h?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+m+","+x:(Math.abs(this._x1-m)>n||Math.abs(this._y1-x)>n)&&(this._+="L"+m+","+x),u&&(E<0&&(E=E%r+r),E>a?this._+="A"+u+","+u+",0,1,"+g+","+(s-v)+","+(l-d)+"A"+u+","+u+",0,1,"+g+","+(this._x1=m)+","+(this._y1=x):E>n&&(this._+="A"+u+","+u+",0,"+ +(E>=t)+","+g+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var FY=ne((bF,RUe)=>{(function(e,t){typeof bF=="object"&&typeof RUe!="undefined"?t(bF,DUe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(bF,function(e,t){"use strict";function r(rt){return function(){return rt}}var n=Math.abs,a=Math.atan2,i=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,h=f/2,v=2*f;function d(rt){return rt>1?0:rt<-1?f:Math.acos(rt)}function m(rt){return rt>=1?h:rt<=-1?-h:Math.asin(rt)}function x(rt){return rt.innerRadius}function g(rt){return rt.outerRadius}function E(rt){return rt.startAngle}function M(rt){return rt.endAngle}function w(rt){return rt&&rt.padAngle}function k(rt,Xt,xr,Fr,xn,Mn,Rn,on){var En=xr-rt,Aa=Fr-Xt,ba=Rn-xn,Ia=on-Mn,hi=Ia*En-ba*Aa;if(!(hi*hiBs*Bs+Fl*Fl&&(ks=xs,us=Co),{cx:ks,cy:us,x01:-ba,y01:-Ia,x11:ks*(xn/Es-1),y11:us*(xn/Es-1)}}function S(){var rt=x,Xt=g,xr=r(0),Fr=null,xn=E,Mn=M,Rn=w,on=null;function En(){var Aa,ba,Ia=+rt.apply(this,arguments),hi=+Xt.apply(this,arguments),ki=xn.apply(this,arguments)-h,ui=Mn.apply(this,arguments)-h,Mi=n(ui-ki),_i=ui>ki;if(on||(on=Aa=t.path()),hic))on.moveTo(0,0);else if(Mi>v-c)on.moveTo(hi*i(ki),hi*l(ki)),on.arc(0,0,hi,ki,ui,!_i),Ia>c&&(on.moveTo(Ia*i(ui),Ia*l(ui)),on.arc(0,0,Ia,ui,ki,_i));else{var ko=ki,Io=ui,$o=ki,Is=ui,Es=Mi,Ks=Mi,nl=Rn.apply(this,arguments)/2,ks=nl>c&&(Fr?+Fr.apply(this,arguments):u(Ia*Ia+hi*hi)),us=s(n(hi-Ia)/2,+xr.apply(this,arguments)),xs=us,Co=us,Si,io;if(ks>c){var Bs=m(ks/Ia*l(nl)),Fl=m(ks/hi*l(nl));(Es-=Bs*2)>c?(Bs*=_i?1:-1,$o+=Bs,Is-=Bs):(Es=0,$o=Is=(ki+ui)/2),(Ks-=Fl*2)>c?(Fl*=_i?1:-1,ko+=Fl,Io-=Fl):(Ks=0,ko=Io=(ki+ui)/2)}var Eu=hi*i(ko),Cs=hi*l(ko),Nl=Ia*i(Is),du=Ia*l(Is);if(us>c){var Kl=hi*i(Io),al=hi*l(Io),co=Ia*i($o),Ul=Ia*l($o),Ls;if(Mic?Co>c?(Si=y(co,Ul,Eu,Cs,hi,Co,_i),io=y(Kl,al,Nl,du,hi,Co,_i),on.moveTo(Si.cx+Si.x01,Si.cy+Si.y01),Coc)||!(Es>c)?on.lineTo(Nl,du):xs>c?(Si=y(Nl,du,Kl,al,Ia,-xs,_i),io=y(Eu,Cs,co,Ul,Ia,-xs,_i),on.lineTo(Si.cx+Si.x01,Si.cy+Si.y01),xs=hi;--ki)on.point(Io[ki],$o[ki]);on.lineEnd(),on.areaEnd()}_i&&(Io[Ia]=+rt(Mi,Ia,ba),$o[Ia]=+xr(Mi,Ia,ba),on.point(Xt?+Xt(Mi,Ia,ba):Io[Ia],Fr?+Fr(Mi,Ia,ba):$o[Ia]))}if(ko)return on=null,ko+""||null}function Aa(){return P().defined(xn).curve(Rn).context(Mn)}return En.x=function(ba){return arguments.length?(rt=typeof ba=="function"?ba:r(+ba),Xt=null,En):rt},En.x0=function(ba){return arguments.length?(rt=typeof ba=="function"?ba:r(+ba),En):rt},En.x1=function(ba){return arguments.length?(Xt=ba==null?null:typeof ba=="function"?ba:r(+ba),En):Xt},En.y=function(ba){return arguments.length?(xr=typeof ba=="function"?ba:r(+ba),Fr=null,En):xr},En.y0=function(ba){return arguments.length?(xr=typeof ba=="function"?ba:r(+ba),En):xr},En.y1=function(ba){return arguments.length?(Fr=ba==null?null:typeof ba=="function"?ba:r(+ba),En):Fr},En.lineX0=En.lineY0=function(){return Aa().x(rt).y(xr)},En.lineY1=function(){return Aa().x(rt).y(Fr)},En.lineX1=function(){return Aa().x(Xt).y(xr)},En.defined=function(ba){return arguments.length?(xn=typeof ba=="function"?ba:r(!!ba),En):xn},En.curve=function(ba){return arguments.length?(Rn=ba,Mn!=null&&(on=Rn(Mn)),En):Rn},En.context=function(ba){return arguments.length?(ba==null?Mn=on=null:on=Rn(Mn=ba),En):Mn},En}function z(rt,Xt){return Xtrt?1:Xt>=rt?0:NaN}function q(rt){return rt}function U(){var rt=q,Xt=z,xr=null,Fr=r(0),xn=r(v),Mn=r(0);function Rn(on){var En,Aa=on.length,ba,Ia,hi=0,ki=new Array(Aa),ui=new Array(Aa),Mi=+Fr.apply(this,arguments),_i=Math.min(v,Math.max(-v,xn.apply(this,arguments)-Mi)),ko,Io=Math.min(Math.abs(_i)/Aa,Mn.apply(this,arguments)),$o=Io*(_i<0?-1:1),Is;for(En=0;En0&&(hi+=Is);for(Xt!=null?ki.sort(function(Es,Ks){return Xt(ui[Es],ui[Ks])}):xr!=null&&ki.sort(function(Es,Ks){return xr(on[Es],on[Ks])}),En=0,Ia=hi?(_i-Aa*$o)/hi:0;En0?Is*Ia:0)+$o,ui[ba]={data:on[ba],index:En,value:Is,startAngle:Mi,endAngle:ko,padAngle:Io};return ui}return Rn.value=function(on){return arguments.length?(rt=typeof on=="function"?on:r(+on),Rn):rt},Rn.sortValues=function(on){return arguments.length?(Xt=on,xr=null,Rn):Xt},Rn.sort=function(on){return arguments.length?(xr=on,Xt=null,Rn):xr},Rn.startAngle=function(on){return arguments.length?(Fr=typeof on=="function"?on:r(+on),Rn):Fr},Rn.endAngle=function(on){return arguments.length?(xn=typeof on=="function"?on:r(+on),Rn):xn},Rn.padAngle=function(on){return arguments.length?(Mn=typeof on=="function"?on:r(+on),Rn):Mn},Rn}var O=B(p);function R(rt){this._curve=rt}R.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(rt,Xt){this._curve.point(Xt*Math.sin(rt),Xt*-Math.cos(rt))}};function B(rt){function Xt(xr){return new R(rt(xr))}return Xt._curve=rt,Xt}function Y(rt){var Xt=rt.curve;return rt.angle=rt.x,delete rt.x,rt.radius=rt.y,delete rt.y,rt.curve=function(xr){return arguments.length?Xt(B(xr)):Xt()._curve},rt}function X(){return Y(P().curve(O))}function te(){var rt=D().curve(O),Xt=rt.curve,xr=rt.lineX0,Fr=rt.lineX1,xn=rt.lineY0,Mn=rt.lineY1;return rt.angle=rt.x,delete rt.x,rt.startAngle=rt.x0,delete rt.x0,rt.endAngle=rt.x1,delete rt.x1,rt.radius=rt.y,delete rt.y,rt.innerRadius=rt.y0,delete rt.y0,rt.outerRadius=rt.y1,delete rt.y1,rt.lineStartAngle=function(){return Y(xr())},delete rt.lineX0,rt.lineEndAngle=function(){return Y(Fr())},delete rt.lineX1,rt.lineInnerRadius=function(){return Y(xn())},delete rt.lineY0,rt.lineOuterRadius=function(){return Y(Mn())},delete rt.lineY1,rt.curve=function(Rn){return arguments.length?Xt(B(Rn)):Xt()._curve},rt}function se(rt,Xt){return[(Xt=+Xt)*Math.cos(rt-=Math.PI/2),Xt*Math.sin(rt)]}var ue=Array.prototype.slice;function re(rt){return rt.source}function j(rt){return rt.target}function fe(rt){var Xt=re,xr=j,Fr=C,xn=A,Mn=null;function Rn(){var on,En=ue.call(arguments),Aa=Xt.apply(this,En),ba=xr.apply(this,En);if(Mn||(Mn=on=t.path()),rt(Mn,+Fr.apply(this,(En[0]=Aa,En)),+xn.apply(this,En),+Fr.apply(this,(En[0]=ba,En)),+xn.apply(this,En)),on)return Mn=null,on+""||null}return Rn.source=function(on){return arguments.length?(Xt=on,Rn):Xt},Rn.target=function(on){return arguments.length?(xr=on,Rn):xr},Rn.x=function(on){return arguments.length?(Fr=typeof on=="function"?on:r(+on),Rn):Fr},Rn.y=function(on){return arguments.length?(xn=typeof on=="function"?on:r(+on),Rn):xn},Rn.context=function(on){return arguments.length?(Mn=on==null?null:on,Rn):Mn},Rn}function ce(rt,Xt,xr,Fr,xn){rt.moveTo(Xt,xr),rt.bezierCurveTo(Xt=(Xt+Fr)/2,xr,Xt,xn,Fr,xn)}function oe(rt,Xt,xr,Fr,xn){rt.moveTo(Xt,xr),rt.bezierCurveTo(Xt,xr=(xr+xn)/2,Fr,xr,Fr,xn)}function we(rt,Xt,xr,Fr,xn){var Mn=se(Xt,xr),Rn=se(Xt,xr=(xr+xn)/2),on=se(Fr,xr),En=se(Fr,xn);rt.moveTo(Mn[0],Mn[1]),rt.bezierCurveTo(Rn[0],Rn[1],on[0],on[1],En[0],En[1])}function he(){return fe(ce)}function ye(){return fe(oe)}function Pe(){var rt=fe(we);return rt.angle=rt.x,delete rt.x,rt.radius=rt.y,delete rt.y,rt}var le={draw:function(rt,Xt){var xr=Math.sqrt(Xt/f);rt.moveTo(xr,0),rt.arc(0,0,xr,0,v)}},ze={draw:function(rt,Xt){var xr=Math.sqrt(Xt/5)/2;rt.moveTo(-3*xr,-xr),rt.lineTo(-xr,-xr),rt.lineTo(-xr,-3*xr),rt.lineTo(xr,-3*xr),rt.lineTo(xr,-xr),rt.lineTo(3*xr,-xr),rt.lineTo(3*xr,xr),rt.lineTo(xr,xr),rt.lineTo(xr,3*xr),rt.lineTo(-xr,3*xr),rt.lineTo(-xr,xr),rt.lineTo(-3*xr,xr),rt.closePath()}},Xe=Math.sqrt(1/3),vt=Xe*2,st={draw:function(rt,Xt){var xr=Math.sqrt(Xt/vt),Fr=xr*Xe;rt.moveTo(0,-xr),rt.lineTo(Fr,0),rt.lineTo(0,xr),rt.lineTo(-Fr,0),rt.closePath()}},Oe=.8908130915292852,qe=Math.sin(f/10)/Math.sin(7*f/10),mt=Math.sin(v/10)*qe,lt=-Math.cos(v/10)*qe,Ie={draw:function(rt,Xt){var xr=Math.sqrt(Xt*Oe),Fr=mt*xr,xn=lt*xr;rt.moveTo(0,-xr),rt.lineTo(Fr,xn);for(var Mn=1;Mn<5;++Mn){var Rn=v*Mn/5,on=Math.cos(Rn),En=Math.sin(Rn);rt.lineTo(En*xr,-on*xr),rt.lineTo(on*Fr-En*xn,En*Fr+on*xn)}rt.closePath()}},de={draw:function(rt,Xt){var xr=Math.sqrt(Xt),Fr=-xr/2;rt.rect(Fr,Fr,xr,xr)}},Ee=Math.sqrt(3),Ue={draw:function(rt,Xt){var xr=-Math.sqrt(Xt/(Ee*3));rt.moveTo(0,xr*2),rt.lineTo(-Ee*xr,-xr),rt.lineTo(Ee*xr,-xr),rt.closePath()}},ge=-.5,Ge=Math.sqrt(3)/2,tt=1/Math.sqrt(12),ft=(tt/2+1)*3,He={draw:function(rt,Xt){var xr=Math.sqrt(Xt/ft),Fr=xr/2,xn=xr*tt,Mn=Fr,Rn=xr*tt+xr,on=-Mn,En=Rn;rt.moveTo(Fr,xn),rt.lineTo(Mn,Rn),rt.lineTo(on,En),rt.lineTo(ge*Fr-Ge*xn,Ge*Fr+ge*xn),rt.lineTo(ge*Mn-Ge*Rn,Ge*Mn+ge*Rn),rt.lineTo(ge*on-Ge*En,Ge*on+ge*En),rt.lineTo(ge*Fr+Ge*xn,ge*xn-Ge*Fr),rt.lineTo(ge*Mn+Ge*Rn,ge*Rn-Ge*Mn),rt.lineTo(ge*on+Ge*En,ge*En-Ge*on),rt.closePath()}},Qe=[le,ze,st,de,Ie,Ue,He];function We(){var rt=r(le),Xt=r(64),xr=null;function Fr(){var xn;if(xr||(xr=xn=t.path()),rt.apply(this,arguments).draw(xr,+Xt.apply(this,arguments)),xn)return xr=null,xn+""||null}return Fr.type=function(xn){return arguments.length?(rt=typeof xn=="function"?xn:r(xn),Fr):rt},Fr.size=function(xn){return arguments.length?(Xt=typeof xn=="function"?xn:r(+xn),Fr):Xt},Fr.context=function(xn){return arguments.length?(xr=xn==null?null:xn,Fr):xr},Fr}function pt(){}function kt(rt,Xt,xr){rt._context.bezierCurveTo((2*rt._x0+rt._x1)/3,(2*rt._y0+rt._y1)/3,(rt._x0+2*rt._x1)/3,(rt._y0+2*rt._y1)/3,(rt._x0+4*rt._x1+Xt)/6,(rt._y0+4*rt._y1+xr)/6)}function qt(rt){this._context=rt}qt.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:kt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(rt,Xt){switch(rt=+rt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(rt,Xt):this._context.moveTo(rt,Xt);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:kt(this,rt,Xt);break}this._x0=this._x1,this._x1=rt,this._y0=this._y1,this._y1=Xt}};function Wt(rt){return new qt(rt)}function _r(rt){this._context=rt}_r.prototype={areaStart:pt,areaEnd:pt,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);break}}},point:function(rt,Xt){switch(rt=+rt,Xt=+Xt,this._point){case 0:this._point=1,this._x2=rt,this._y2=Xt;break;case 1:this._point=2,this._x3=rt,this._y3=Xt;break;case 2:this._point=3,this._x4=rt,this._y4=Xt,this._context.moveTo((this._x0+4*this._x1+rt)/6,(this._y0+4*this._y1+Xt)/6);break;default:kt(this,rt,Xt);break}this._x0=this._x1,this._x1=rt,this._y0=this._y1,this._y1=Xt}};function tr(rt){return new _r(rt)}function lr(rt){this._context=rt}lr.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(rt,Xt){switch(rt=+rt,Xt=+Xt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var xr=(this._x0+4*this._x1+rt)/6,Fr=(this._y0+4*this._y1+Xt)/6;this._line?this._context.lineTo(xr,Fr):this._context.moveTo(xr,Fr);break;case 3:this._point=4;default:kt(this,rt,Xt);break}this._x0=this._x1,this._x1=rt,this._y0=this._y1,this._y1=Xt}};function Ye(rt){return new lr(rt)}function Te(rt,Xt){this._basis=new qt(rt),this._beta=Xt}Te.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var rt=this._x,Xt=this._y,xr=rt.length-1;if(xr>0)for(var Fr=rt[0],xn=Xt[0],Mn=rt[xr]-Fr,Rn=Xt[xr]-xn,on=-1,En;++on<=xr;)En=on/xr,this._basis.point(this._beta*rt[on]+(1-this._beta)*(Fr+En*Mn),this._beta*Xt[on]+(1-this._beta)*(xn+En*Rn));this._x=this._y=null,this._basis.lineEnd()},point:function(rt,Xt){this._x.push(+rt),this._y.push(+Xt)}};var Fe=(function rt(Xt){function xr(Fr){return Xt===1?new qt(Fr):new Te(Fr,Xt)}return xr.beta=function(Fr){return rt(+Fr)},xr})(.85);function Ae(rt,Xt,xr){rt._context.bezierCurveTo(rt._x1+rt._k*(rt._x2-rt._x0),rt._y1+rt._k*(rt._y2-rt._y0),rt._x2+rt._k*(rt._x1-Xt),rt._y2+rt._k*(rt._y1-xr),rt._x2,rt._y2)}function Re(rt,Xt){this._context=rt,this._k=(1-Xt)/6}Re.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:Ae(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(rt,Xt){switch(rt=+rt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(rt,Xt):this._context.moveTo(rt,Xt);break;case 1:this._point=2,this._x1=rt,this._y1=Xt;break;case 2:this._point=3;default:Ae(this,rt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=rt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Ze=(function rt(Xt){function xr(Fr){return new Re(Fr,Xt)}return xr.tension=function(Fr){return rt(+Fr)},xr})(0);function Ke(rt,Xt){this._context=rt,this._k=(1-Xt)/6}Ke.prototype={areaStart:pt,areaEnd:pt,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);break}}},point:function(rt,Xt){switch(rt=+rt,Xt=+Xt,this._point){case 0:this._point=1,this._x3=rt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=rt,this._y4=Xt);break;case 2:this._point=3,this._x5=rt,this._y5=Xt;break;default:Ae(this,rt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=rt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var _t=(function rt(Xt){function xr(Fr){return new Ke(Fr,Xt)}return xr.tension=function(Fr){return rt(+Fr)},xr})(0);function St(rt,Xt){this._context=rt,this._k=(1-Xt)/6}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(rt,Xt){switch(rt=+rt,Xt=+Xt,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:Ae(this,rt,Xt);break}this._x0=this._x1,this._x1=this._x2,this._x2=rt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Vt=(function rt(Xt){function xr(Fr){return new St(Fr,Xt)}return xr.tension=function(Fr){return rt(+Fr)},xr})(0);function fr(rt,Xt,xr){var Fr=rt._x1,xn=rt._y1,Mn=rt._x2,Rn=rt._y2;if(rt._l01_a>c){var on=2*rt._l01_2a+3*rt._l01_a*rt._l12_a+rt._l12_2a,En=3*rt._l01_a*(rt._l01_a+rt._l12_a);Fr=(Fr*on-rt._x0*rt._l12_2a+rt._x2*rt._l01_2a)/En,xn=(xn*on-rt._y0*rt._l12_2a+rt._y2*rt._l01_2a)/En}if(rt._l23_a>c){var Aa=2*rt._l23_2a+3*rt._l23_a*rt._l12_a+rt._l12_2a,ba=3*rt._l23_a*(rt._l23_a+rt._l12_a);Mn=(Mn*Aa+rt._x1*rt._l23_2a-Xt*rt._l12_2a)/ba,Rn=(Rn*Aa+rt._y1*rt._l23_2a-xr*rt._l12_2a)/ba}rt._context.bezierCurveTo(Fr,xn,Mn,Rn,rt._x2,rt._y2)}function $t(rt,Xt){this._context=rt,this._alpha=Xt}$t.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(rt,Xt){if(rt=+rt,Xt=+Xt,this._point){var xr=this._x2-rt,Fr=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(xr*xr+Fr*Fr,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(rt,Xt):this._context.moveTo(rt,Xt);break;case 1:this._point=2;break;case 2:this._point=3;default:fr(this,rt,Xt);break}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=rt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var gr=(function rt(Xt){function xr(Fr){return Xt?new $t(Fr,Xt):new Re(Fr,0)}return xr.alpha=function(Fr){return rt(+Fr)},xr})(.5);function Br(rt,Xt){this._context=rt,this._alpha=Xt}Br.prototype={areaStart:pt,areaEnd:pt,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);break}}},point:function(rt,Xt){if(rt=+rt,Xt=+Xt,this._point){var xr=this._x2-rt,Fr=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(xr*xr+Fr*Fr,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=rt,this._y3=Xt;break;case 1:this._point=2,this._context.moveTo(this._x4=rt,this._y4=Xt);break;case 2:this._point=3,this._x5=rt,this._y5=Xt;break;default:fr(this,rt,Xt);break}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=rt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var Nr=(function rt(Xt){function xr(Fr){return Xt?new Br(Fr,Xt):new Ke(Fr,0)}return xr.alpha=function(Fr){return rt(+Fr)},xr})(.5);function Er(rt,Xt){this._context=rt,this._alpha=Xt}Er.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(rt,Xt){if(rt=+rt,Xt=+Xt,this._point){var xr=this._x2-rt,Fr=this._y2-Xt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(xr*xr+Fr*Fr,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:fr(this,rt,Xt);break}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=rt,this._y0=this._y1,this._y1=this._y2,this._y2=Xt}};var zr=(function rt(Xt){function xr(Fr){return Xt?new Er(Fr,Xt):new St(Fr,0)}return xr.alpha=function(Fr){return rt(+Fr)},xr})(.5);function vn(rt){this._context=rt}vn.prototype={areaStart:pt,areaEnd:pt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(rt,Xt){rt=+rt,Xt=+Xt,this._point?this._context.lineTo(rt,Xt):(this._point=1,this._context.moveTo(rt,Xt))}};function Nn(rt){return new vn(rt)}function Xn(rt){return rt<0?-1:1}function Kn(rt,Xt,xr){var Fr=rt._x1-rt._x0,xn=Xt-rt._x1,Mn=(rt._y1-rt._y0)/(Fr||xn<0&&-0),Rn=(xr-rt._y1)/(xn||Fr<0&&-0),on=(Mn*xn+Rn*Fr)/(Fr+xn);return(Xn(Mn)+Xn(Rn))*Math.min(Math.abs(Mn),Math.abs(Rn),.5*Math.abs(on))||0}function Qn(rt,Xt){var xr=rt._x1-rt._x0;return xr?(3*(rt._y1-rt._y0)/xr-Xt)/2:Xt}function un(rt,Xt,xr){var Fr=rt._x0,xn=rt._y0,Mn=rt._x1,Rn=rt._y1,on=(Mn-Fr)/3;rt._context.bezierCurveTo(Fr+on,xn+on*Xt,Mn-on,Rn-on*xr,Mn,Rn)}function aa(rt){this._context=rt}aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:un(this,this._t0,Qn(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(rt,Xt){var xr=NaN;if(rt=+rt,Xt=+Xt,!(rt===this._x1&&Xt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(rt,Xt):this._context.moveTo(rt,Xt);break;case 1:this._point=2;break;case 2:this._point=3,un(this,Qn(this,xr=Kn(this,rt,Xt)),xr);break;default:un(this,this._t0,xr=Kn(this,rt,Xt));break}this._x0=this._x1,this._x1=rt,this._y0=this._y1,this._y1=Xt,this._t0=xr}}};function da(rt){this._context=new ua(rt)}(da.prototype=Object.create(aa.prototype)).point=function(rt,Xt){aa.prototype.point.call(this,Xt,rt)};function ua(rt){this._context=rt}ua.prototype={moveTo:function(rt,Xt){this._context.moveTo(Xt,rt)},closePath:function(){this._context.closePath()},lineTo:function(rt,Xt){this._context.lineTo(Xt,rt)},bezierCurveTo:function(rt,Xt,xr,Fr,xn,Mn){this._context.bezierCurveTo(Xt,rt,Fr,xr,Mn,xn)}};function qa(rt){return new aa(rt)}function ii(rt){return new da(rt)}function pa(rt){this._context=rt}pa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var rt=this._x,Xt=this._y,xr=rt.length;if(xr)if(this._line?this._context.lineTo(rt[0],Xt[0]):this._context.moveTo(rt[0],Xt[0]),xr===2)this._context.lineTo(rt[1],Xt[1]);else for(var Fr=no(rt),xn=no(Xt),Mn=0,Rn=1;Rn=0;--Xt)xn[Xt]=(Rn[Xt]-xn[Xt+1])/Mn[Xt];for(Mn[xr-1]=(rt[xr]+xn[xr-1])/2,Xt=0;Xt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(rt,Xt){switch(rt=+rt,Xt=+Xt,this._point){case 0:this._point=1,this._line?this._context.lineTo(rt,Xt):this._context.moveTo(rt,Xt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Xt),this._context.lineTo(rt,Xt);else{var xr=this._x*(1-this._t)+rt*this._t;this._context.lineTo(xr,this._y),this._context.lineTo(xr,Xt)}break}}this._x=rt,this._y=Xt}};function fi(rt){return new Ti(rt,.5)}function _o(rt){return new Ti(rt,0)}function Oi(rt){return new Ti(rt,1)}function ni(rt,Xt){if((Rn=rt.length)>1)for(var xr=1,Fr,xn,Mn=rt[Xt[0]],Rn,on=Mn.length;xr=0;)xr[Xt]=Xt;return xr}function Hi(rt,Xt){return rt[Xt]}function to(){var rt=r([]),Xt=ao,xr=ni,Fr=Hi;function xn(Mn){var Rn=rt.apply(this,arguments),on,En=Mn.length,Aa=Rn.length,ba=new Array(Aa),Ia;for(on=0;on0){for(var xr,Fr,xn=0,Mn=rt[0].length,Rn;xn0)for(var xr,Fr=0,xn,Mn,Rn,on,En,Aa=rt[Xt[0]].length;Fr0?(xn[0]=Rn,xn[1]=Rn+=Mn):Mn<0?(xn[1]=on,xn[0]=on+=Mn):(xn[0]=0,xn[1]=Mn)}function Fi(rt,Xt){if((xn=rt.length)>0){for(var xr=0,Fr=rt[Xt[0]],xn,Mn=Fr.length;xr0)||!((Mn=(xn=rt[Xt[0]]).length)>0))){for(var xr=0,Fr=1,xn,Mn,Rn;FrMn&&(Mn=xn,xr=Xt);return xr}function Ni(rt){var Xt=rt.map(Oa);return ao(rt).sort(function(xr,Fr){return Xt[xr]-Xt[Fr]})}function Oa(rt){for(var Xt=0,xr=-1,Fr=rt.length,xn;++xr{(function(e,t){typeof _F=="object"&&typeof IUe!="undefined"?t(_F,XA(),FY()):(e=e||self,t(e.d3=e.d3||{},e.d3,e.d3))})(_F,function(e,t,r){"use strict";function n(y){return y.target.depth}function a(y){return y.depth}function i(y,S){return S-1-y.height}function o(y,S){return y.sourceLinks.length?y.depth:S-1}function s(y){return y.targetLinks.length?y.depth:y.sourceLinks.length?t.min(y.sourceLinks,n)-1:0}function l(y){return function(){return y}}function u(y,S){return f(y.source,S.source)||y.index-S.index}function c(y,S){return f(y.target,S.target)||y.index-S.index}function f(y,S){return y.y0-S.y0}function h(y){return y.value}function v(y){return y.index}function d(y){return y.nodes}function m(y){return y.links}function x(y,S){let T=y.get(S);if(!T)throw new Error("missing: "+S);return T}function g({nodes:y}){for(let S of y){let T=S.y0,p=T;for(let C of S.sourceLinks)C.y0=T+C.width/2,T+=C.width;for(let C of S.targetLinks)C.y1=p+C.width/2,p+=C.width}}function E(){let y=0,S=0,T=1,p=1,C=24,A=8,P,D=v,z=o,q,U,O=d,R=m,B=6,Y=2/3;function X(){let st={nodes:O.apply(null,arguments),links:R.apply(null,arguments)};return te(st),se(st),ue(st),re(st),ce(st),g(st),st}X.update=function(st){return g(st),st},X.nodeId=function(st){return arguments.length?(D=typeof st=="function"?st:l(st),X):D},X.nodeAlign=function(st){return arguments.length?(z=typeof st=="function"?st:l(st),X):z},X.nodeSort=function(st){return arguments.length?(q=st,X):q},X.nodeWidth=function(st){return arguments.length?(C=+st,X):C},X.nodePadding=function(st){return arguments.length?(A=P=+st,X):A},X.nodes=function(st){return arguments.length?(O=typeof st=="function"?st:l(st),X):O},X.links=function(st){return arguments.length?(R=typeof st=="function"?st:l(st),X):R},X.linkSort=function(st){return arguments.length?(U=st,X):U},X.size=function(st){return arguments.length?(y=S=0,T=+st[0],p=+st[1],X):[T-y,p-S]},X.extent=function(st){return arguments.length?(y=+st[0][0],T=+st[1][0],S=+st[0][1],p=+st[1][1],X):[[y,S],[T,p]]},X.iterations=function(st){return arguments.length?(B=+st,X):B};function te({nodes:st,links:Oe}){for(let[mt,lt]of st.entries())lt.index=mt,lt.sourceLinks=[],lt.targetLinks=[];let qe=new Map(st.map((mt,lt)=>[D(mt,lt,st),mt]));for(let[mt,lt]of Oe.entries()){lt.index=mt;let{source:Ie,target:de}=lt;typeof Ie!="object"&&(Ie=lt.source=x(qe,Ie)),typeof de!="object"&&(de=lt.target=x(qe,de)),Ie.sourceLinks.push(lt),de.targetLinks.push(lt)}if(U!=null)for(let{sourceLinks:mt,targetLinks:lt}of st)mt.sort(U),lt.sort(U)}function se({nodes:st}){for(let Oe of st)Oe.value=Oe.fixedValue===void 0?Math.max(t.sum(Oe.sourceLinks,h),t.sum(Oe.targetLinks,h)):Oe.fixedValue}function ue({nodes:st}){let Oe=st.length,qe=new Set(st),mt=new Set,lt=0;for(;qe.size;){for(let Ie of qe){Ie.depth=lt;for(let{target:de}of Ie.sourceLinks)mt.add(de)}if(++lt>Oe)throw new Error("circular link");qe=mt,mt=new Set}}function re({nodes:st}){let Oe=st.length,qe=new Set(st),mt=new Set,lt=0;for(;qe.size;){for(let Ie of qe){Ie.height=lt;for(let{source:de}of Ie.targetLinks)mt.add(de)}if(++lt>Oe)throw new Error("circular link");qe=mt,mt=new Set}}function j({nodes:st}){let Oe=t.max(st,lt=>lt.depth)+1,qe=(T-y-C)/(Oe-1),mt=new Array(Oe);for(let lt of st){let Ie=Math.max(0,Math.min(Oe-1,Math.floor(z.call(null,lt,Oe))));lt.layer=Ie,lt.x0=y+Ie*qe,lt.x1=lt.x0+C,mt[Ie]?mt[Ie].push(lt):mt[Ie]=[lt]}if(q)for(let lt of mt)lt.sort(q);return mt}function fe(st){let Oe=t.min(st,qe=>(p-S-(qe.length-1)*P)/t.sum(qe,h));for(let qe of st){let mt=S;for(let lt of qe){lt.y0=mt,lt.y1=mt+lt.value*Oe,mt=lt.y1+P;for(let Ie of lt.sourceLinks)Ie.width=Ie.value*Oe}mt=(p-mt+P)/(qe.length+1);for(let lt=0;ltqe.length)-1)),fe(Oe);for(let qe=0;qe0))continue;let ge=(Ee/Ue-de.y0)*Oe;de.y0+=ge,de.y1+=ge,le(de)}q===void 0&&Ie.sort(f),he(Ie,qe)}}function we(st,Oe,qe){for(let mt=st.length,lt=mt-2;lt>=0;--lt){let Ie=st[lt];for(let de of Ie){let Ee=0,Ue=0;for(let{target:Ge,value:tt}of de.sourceLinks){let ft=tt*(Ge.layer-de.layer);Ee+=vt(de,Ge)*ft,Ue+=ft}if(!(Ue>0))continue;let ge=(Ee/Ue-de.y0)*Oe;de.y0+=ge,de.y1+=ge,le(de)}q===void 0&&Ie.sort(f),he(Ie,qe)}}function he(st,Oe){let qe=st.length>>1,mt=st[qe];Pe(st,mt.y0-P,qe-1,Oe),ye(st,mt.y1+P,qe+1,Oe),Pe(st,p,st.length-1,Oe),ye(st,S,0,Oe)}function ye(st,Oe,qe,mt){for(;qe1e-6&&(lt.y0+=Ie,lt.y1+=Ie),Oe=lt.y1+P}}function Pe(st,Oe,qe,mt){for(;qe>=0;--qe){let lt=st[qe],Ie=(lt.y1-Oe)*mt;Ie>1e-6&&(lt.y0-=Ie,lt.y1-=Ie),Oe=lt.y0-P}}function le({sourceLinks:st,targetLinks:Oe}){if(U===void 0){for(let{source:{sourceLinks:qe}}of Oe)qe.sort(c);for(let{target:{targetLinks:qe}}of st)qe.sort(u)}}function ze(st){if(U===void 0)for(let{sourceLinks:Oe,targetLinks:qe}of st)Oe.sort(c),qe.sort(u)}function Xe(st,Oe){let qe=st.y0-(st.sourceLinks.length-1)*P/2;for(let{target:mt,width:lt}of st.sourceLinks){if(mt===Oe)break;qe+=lt+P}for(let{source:mt,width:lt}of Oe.targetLinks){if(mt===st)break;qe-=lt}return qe}function vt(st,Oe){let qe=Oe.y0-(Oe.targetLinks.length-1)*P/2;for(let{source:mt,width:lt}of Oe.targetLinks){if(mt===st)break;qe+=lt+P}for(let{target:mt,width:lt}of st.sourceLinks){if(mt===Oe)break;qe-=lt}return qe}return X}function M(y){return[y.source.x1,y.y0]}function w(y){return[y.target.x0,y.y1]}function k(){return r.linkHorizontal().source(M).target(w)}e.sankey=E,e.sankeyCenter=s,e.sankeyJustify=o,e.sankeyLeft=a,e.sankeyLinkHorizontal=k,e.sankeyRight=i,Object.defineProperty(e,"__esModule",{value:!0})})});var BUe=ne((imr,qUe)=>{var jGt=CY();qUe.exports=function(t,r){var n=[],a=[],i=[],o={},s=[],l;function u(M){i[M]=!1,o.hasOwnProperty(M)&&Object.keys(o[M]).forEach(function(w){delete o[M][w],i[w]&&u(w)})}function c(M){var w=!1;a.push(M),i[M]=!0;var k,y;for(k=0;k=M})}function v(M){h(M);for(var w=t,k=jGt(w),y=k.components.filter(function(D){return D.length>1}),S=1/0,T,p=0;p{(function(e,t){typeof wF=="object"&&typeof OUe!="undefined"?t(wF,XA(),LY(),FY(),BUe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(wF,(function(e,t,r,n,a){"use strict";a=a&&a.hasOwnProperty("default")?a.default:a;function i(Oe){return Oe.target.depth}function o(Oe){return Oe.depth}function s(Oe,qe){return qe-1-Oe.height}function l(Oe,qe){return Oe.sourceLinks.length?Oe.depth:qe-1}function u(Oe){return Oe.targetLinks.length?Oe.depth:Oe.sourceLinks.length?t.min(Oe.sourceLinks,i)-1:0}function c(Oe){return function(){return Oe}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Oe){return typeof Oe}:function(Oe){return Oe&&typeof Symbol=="function"&&Oe.constructor===Symbol&&Oe!==Symbol.prototype?"symbol":typeof Oe};function h(Oe,qe){return d(Oe.source,qe.source)||Oe.index-qe.index}function v(Oe,qe){return d(Oe.target,qe.target)||Oe.index-qe.index}function d(Oe,qe){return Oe.partOfCycle===qe.partOfCycle?Oe.y0-qe.y0:Oe.circularLinkType==="top"||qe.circularLinkType==="bottom"?-1:1}function m(Oe){return Oe.value}function x(Oe){return(Oe.y0+Oe.y1)/2}function g(Oe){return x(Oe.source)}function E(Oe){return x(Oe.target)}function M(Oe){return Oe.index}function w(Oe){return Oe.nodes}function k(Oe){return Oe.links}function y(Oe,qe){var mt=Oe.get(qe);if(!mt)throw new Error("missing: "+qe);return mt}function S(Oe,qe){return qe(Oe)}var T=25,p=10,C=.3;function A(){var Oe=0,qe=0,mt=1,lt=1,Ie=24,de,Ee=M,Ue=l,ge=w,Ge=k,tt=32,ft=2,He,Qe=null;function We(){var Ye={nodes:ge.apply(null,arguments),links:Ge.apply(null,arguments)};pt(Ye),P(Ye,Ee,Qe),kt(Ye),_r(Ye),D(Ye,Ee),tr(Ye,tt,Ee),lr(Ye);for(var Te=4,Fe=0;Fe0?Te+T+p:Te,Fe=Fe>0?Fe+T+p:Fe,Ae=Ae>0?Ae+T+p:Ae,Re=Re>0?Re+T+p:Re,{top:Te,bottom:Fe,left:Re,right:Ae}}function Wt(Ye,Te){var Fe=t.max(Ye.nodes,function(Vt){return Vt.column}),Ae=mt-Oe,Re=lt-qe,Ze=Ae+Te.right+Te.left,Ke=Re+Te.top+Te.bottom,_t=Ae/Ze,St=Re/Ke;return Oe=Oe*_t+Te.left,mt=Te.right==0?mt:mt*_t,qe=qe*St+Te.top,lt=lt*St,Ye.nodes.forEach(function(Vt){Vt.x0=Oe+Vt.column*((mt-Oe-Ie)/Fe),Vt.x1=Vt.x0+Ie}),St}function _r(Ye){var Te,Fe,Ae;for(Te=Ye.nodes,Fe=[],Ae=0;Te.length;++Ae,Te=Fe,Fe=[])Te.forEach(function(Re){Re.depth=Ae,Re.sourceLinks.forEach(function(Ze){Fe.indexOf(Ze.target)<0&&!Ze.circular&&Fe.push(Ze.target)})});for(Te=Ye.nodes,Fe=[],Ae=0;Te.length;++Ae,Te=Fe,Fe=[])Te.forEach(function(Re){Re.height=Ae,Re.targetLinks.forEach(function(Ze){Fe.indexOf(Ze.source)<0&&!Ze.circular&&Fe.push(Ze.source)})});Ye.nodes.forEach(function(Re){Re.column=Math.floor(Ue.call(null,Re,Ae))})}function tr(Ye,Te,Fe){var Ae=r.nest().key(function(Vt){return Vt.column}).sortKeys(t.ascending).entries(Ye.nodes).map(function(Vt){return Vt.values});Ke(Fe),St();for(var Re=1,Ze=Te;Ze>0;--Ze)_t(Re*=.99,Fe),St();function Ke(Vt){if(He){var fr=1/0;Ae.forEach(function(Nr){var Er=lt*He/(Nr.length+1);fr=Er0))if(Nr==0&&Br==1)zr=Er.y1-Er.y0,Er.y0=lt/2-zr/2,Er.y1=lt/2+zr/2;else if(Nr==$t-1&&Br==1)zr=Er.y1-Er.y0,Er.y0=lt/2-zr/2,Er.y1=lt/2+zr/2;else{var vn=0,Nn=t.mean(Er.sourceLinks,E),Xn=t.mean(Er.targetLinks,g);Nn&&Xn?vn=(Nn+Xn)/2:vn=Nn||Xn;var Kn=(vn-x(Er))*Vt;Er.y0+=Kn,Er.y1+=Kn}})})}function St(){Ae.forEach(function(Vt){var fr,$t,gr=qe,Br=Vt.length,Nr;for(Vt.sort(d),Nr=0;Nr0&&(fr.y0+=$t,fr.y1+=$t),gr=fr.y1+de;if($t=gr-de-lt,$t>0)for(gr=fr.y0-=$t,fr.y1-=$t,Nr=Br-2;Nr>=0;--Nr)fr=Vt[Nr],$t=fr.y1+de-gr,$t>0&&(fr.y0-=$t,fr.y1-=$t),gr=fr.y0})}}function lr(Ye){Ye.nodes.forEach(function(Te){Te.sourceLinks.sort(v),Te.targetLinks.sort(h)}),Ye.nodes.forEach(function(Te){var Fe=Te.y0,Ae=Fe,Re=Te.y1,Ze=Re;Te.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Re-Ke.width/2,Re=Re-Ke.width):(Ke.y0=Fe+Ke.width/2,Fe+=Ke.width)}),Te.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=Ze-Ke.width/2,Ze=Ze-Ke.width):(Ke.y1=Ae+Ke.width/2,Ae+=Ke.width)})})}return We}function P(Oe,qe,mt){var lt=0;if(mt===null){for(var Ie=[],de=0;deqe.source.column)}function U(Oe,qe){var mt=0;Oe.sourceLinks.forEach(function(Ie){mt=Ie.circular&&!vt(Ie,qe)?mt+1:mt});var lt=0;return Oe.targetLinks.forEach(function(Ie){lt=Ie.circular&&!vt(Ie,qe)?lt+1:lt}),mt+lt}function O(Oe){var qe=Oe.source.sourceLinks,mt=0;qe.forEach(function(de){mt=de.circular?mt+1:mt});var lt=Oe.target.targetLinks,Ie=0;return lt.forEach(function(de){Ie=de.circular?Ie+1:Ie}),!(mt>1||Ie>1)}function R(Oe,qe,mt){return Oe.sort(X),Oe.forEach(function(lt,Ie){var de=0;if(vt(lt,mt)&&O(lt))lt.circularPathData.verticalBuffer=de+lt.width/2;else{var Ee=0;for(Ee;Eede?Ue:de}lt.circularPathData.verticalBuffer=de+lt.width/2}}),Oe}function B(Oe,qe,mt,lt){var Ie=5,de=t.min(Oe.links,function(ge){return ge.source.y0});Oe.links.forEach(function(ge){ge.circular&&(ge.circularPathData={})});var Ee=Oe.links.filter(function(ge){return ge.circularLinkType=="top"});R(Ee,qe,lt);var Ue=Oe.links.filter(function(ge){return ge.circularLinkType=="bottom"});R(Ue,qe,lt),Oe.links.forEach(function(ge){if(ge.circular){if(ge.circularPathData.arcRadius=ge.width+p,ge.circularPathData.leftNodeBuffer=Ie,ge.circularPathData.rightNodeBuffer=Ie,ge.circularPathData.sourceWidth=ge.source.x1-ge.source.x0,ge.circularPathData.sourceX=ge.source.x0+ge.circularPathData.sourceWidth,ge.circularPathData.targetX=ge.target.x0,ge.circularPathData.sourceY=ge.y0,ge.circularPathData.targetY=ge.y1,vt(ge,lt)&&O(ge))ge.circularPathData.leftSmallArcRadius=p+ge.width/2,ge.circularPathData.leftLargeArcRadius=p+ge.width/2,ge.circularPathData.rightSmallArcRadius=p+ge.width/2,ge.circularPathData.rightLargeArcRadius=p+ge.width/2,ge.circularLinkType=="bottom"?(ge.circularPathData.verticalFullExtent=ge.source.y1+T+ge.circularPathData.verticalBuffer,ge.circularPathData.verticalLeftInnerExtent=ge.circularPathData.verticalFullExtent-ge.circularPathData.leftLargeArcRadius,ge.circularPathData.verticalRightInnerExtent=ge.circularPathData.verticalFullExtent-ge.circularPathData.rightLargeArcRadius):(ge.circularPathData.verticalFullExtent=ge.source.y0-T-ge.circularPathData.verticalBuffer,ge.circularPathData.verticalLeftInnerExtent=ge.circularPathData.verticalFullExtent+ge.circularPathData.leftLargeArcRadius,ge.circularPathData.verticalRightInnerExtent=ge.circularPathData.verticalFullExtent+ge.circularPathData.rightLargeArcRadius);else{var Ge=ge.source.column,tt=ge.circularLinkType,ft=Oe.links.filter(function(We){return We.source.column==Ge&&We.circularLinkType==tt});ge.circularLinkType=="bottom"?ft.sort(se):ft.sort(te);var He=0;ft.forEach(function(We,pt){We.circularLinkID==ge.circularLinkID&&(ge.circularPathData.leftSmallArcRadius=p+ge.width/2+He,ge.circularPathData.leftLargeArcRadius=p+ge.width/2+pt*qe+He),He=He+We.width}),Ge=ge.target.column,ft=Oe.links.filter(function(We){return We.target.column==Ge&&We.circularLinkType==tt}),ge.circularLinkType=="bottom"?ft.sort(re):ft.sort(ue),He=0,ft.forEach(function(We,pt){We.circularLinkID==ge.circularLinkID&&(ge.circularPathData.rightSmallArcRadius=p+ge.width/2+He,ge.circularPathData.rightLargeArcRadius=p+ge.width/2+pt*qe+He),He=He+We.width}),ge.circularLinkType=="bottom"?(ge.circularPathData.verticalFullExtent=Math.max(mt,ge.source.y1,ge.target.y1)+T+ge.circularPathData.verticalBuffer,ge.circularPathData.verticalLeftInnerExtent=ge.circularPathData.verticalFullExtent-ge.circularPathData.leftLargeArcRadius,ge.circularPathData.verticalRightInnerExtent=ge.circularPathData.verticalFullExtent-ge.circularPathData.rightLargeArcRadius):(ge.circularPathData.verticalFullExtent=de-T-ge.circularPathData.verticalBuffer,ge.circularPathData.verticalLeftInnerExtent=ge.circularPathData.verticalFullExtent+ge.circularPathData.leftLargeArcRadius,ge.circularPathData.verticalRightInnerExtent=ge.circularPathData.verticalFullExtent+ge.circularPathData.rightLargeArcRadius)}ge.circularPathData.leftInnerExtent=ge.circularPathData.sourceX+ge.circularPathData.leftNodeBuffer,ge.circularPathData.rightInnerExtent=ge.circularPathData.targetX-ge.circularPathData.rightNodeBuffer,ge.circularPathData.leftFullExtent=ge.circularPathData.sourceX+ge.circularPathData.leftLargeArcRadius+ge.circularPathData.leftNodeBuffer,ge.circularPathData.rightFullExtent=ge.circularPathData.targetX-ge.circularPathData.rightLargeArcRadius-ge.circularPathData.rightNodeBuffer}if(ge.circular)ge.path=Y(ge);else{var Qe=n.linkHorizontal().source(function(We){var pt=We.source.x0+(We.source.x1-We.source.x0),kt=We.y0;return[pt,kt]}).target(function(We){var pt=We.target.x0,kt=We.y1;return[pt,kt]});ge.path=Qe(ge)}})}function Y(Oe){var qe="";return Oe.circularLinkType=="top"?qe="M"+Oe.circularPathData.sourceX+" "+Oe.circularPathData.sourceY+" L"+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.sourceY+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Oe.circularPathData.leftFullExtent+" "+(Oe.circularPathData.sourceY-Oe.circularPathData.leftSmallArcRadius)+" L"+Oe.circularPathData.leftFullExtent+" "+Oe.circularPathData.verticalLeftInnerExtent+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" L"+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Oe.circularPathData.rightFullExtent+" "+Oe.circularPathData.verticalRightInnerExtent+" L"+Oe.circularPathData.rightFullExtent+" "+(Oe.circularPathData.targetY-Oe.circularPathData.rightSmallArcRadius)+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.targetY+" L"+Oe.circularPathData.targetX+" "+Oe.circularPathData.targetY:qe="M"+Oe.circularPathData.sourceX+" "+Oe.circularPathData.sourceY+" L"+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.sourceY+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Oe.circularPathData.leftFullExtent+" "+(Oe.circularPathData.sourceY+Oe.circularPathData.leftSmallArcRadius)+" L"+Oe.circularPathData.leftFullExtent+" "+Oe.circularPathData.verticalLeftInnerExtent+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" L"+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Oe.circularPathData.rightFullExtent+" "+Oe.circularPathData.verticalRightInnerExtent+" L"+Oe.circularPathData.rightFullExtent+" "+(Oe.circularPathData.targetY+Oe.circularPathData.rightSmallArcRadius)+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.targetY+" L"+Oe.circularPathData.targetX+" "+Oe.circularPathData.targetY,qe}function X(Oe,qe){return j(Oe)==j(qe)?Oe.circularLinkType=="bottom"?se(Oe,qe):te(Oe,qe):j(qe)-j(Oe)}function te(Oe,qe){return Oe.y0-qe.y0}function se(Oe,qe){return qe.y0-Oe.y0}function ue(Oe,qe){return Oe.y1-qe.y1}function re(Oe,qe){return qe.y1-Oe.y1}function j(Oe){return Oe.target.column-Oe.source.column}function fe(Oe){return Oe.target.x0-Oe.source.x1}function ce(Oe,qe){var mt=z(Oe),lt=fe(qe)/Math.tan(mt),Ie=Xe(Oe)=="up"?Oe.y1+lt:Oe.y1-lt;return Ie}function oe(Oe,qe){var mt=z(Oe),lt=fe(qe)/Math.tan(mt),Ie=Xe(Oe)=="up"?Oe.y1-lt:Oe.y1+lt;return Ie}function we(Oe,qe,mt,lt){Oe.links.forEach(function(Ie){if(!Ie.circular&&Ie.target.column-Ie.source.column>1){var de=Ie.source.column+1,Ee=Ie.target.column-1,Ue=1,ge=Ee-de+1;for(Ue=1;de<=Ee;de++,Ue++)Oe.nodes.forEach(function(Ge){if(Ge.column==de){var tt=Ue/(ge+1),ft=Math.pow(1-tt,3),He=3*tt*Math.pow(1-tt,2),Qe=3*Math.pow(tt,2)*(1-tt),We=Math.pow(tt,3),pt=ft*Ie.y0+He*Ie.y0+Qe*Ie.y1+We*Ie.y1,kt=pt-Ie.width/2,qt=pt+Ie.width/2,Wt;kt>Ge.y0&&ktGe.y0&&qtGe.y1&&ye(_r,Wt,qe,mt)})):ktGe.y1&&(Wt=qt-Ge.y0+10,Ge=ye(Ge,Wt,qe,mt),Oe.nodes.forEach(function(_r){S(_r,lt)==S(Ge,lt)||_r.column!=Ge.column||_r.y0Ge.y1&&ye(_r,Wt,qe,mt)}))}})}})}function he(Oe,qe){return Oe.y0>qe.y0&&Oe.y0qe.y0&&Oe.y1qe.y1}function ye(Oe,qe,mt,lt){return Oe.y0+qe>=mt&&Oe.y1+qe<=lt&&(Oe.y0=Oe.y0+qe,Oe.y1=Oe.y1+qe,Oe.targetLinks.forEach(function(Ie){Ie.y1=Ie.y1+qe}),Oe.sourceLinks.forEach(function(Ie){Ie.y0=Ie.y0+qe})),Oe}function Pe(Oe,qe,mt,lt){Oe.nodes.forEach(function(Ie){lt&&Ie.y+(Ie.y1-Ie.y0)>qe&&(Ie.y=Ie.y-(Ie.y+(Ie.y1-Ie.y0)-qe));var de=Oe.links.filter(function(ge){return S(ge.source,mt)==S(Ie,mt)}),Ee=de.length;Ee>1&&de.sort(function(ge,Ge){if(!ge.circular&&!Ge.circular){if(ge.target.column==Ge.target.column)return ge.y1-Ge.y1;if(ze(ge,Ge)){if(ge.target.column>Ge.target.column){var tt=oe(Ge,ge);return ge.y1-tt}if(Ge.target.column>ge.target.column){var ft=oe(ge,Ge);return ft-Ge.y1}}else return ge.y1-Ge.y1}if(ge.circular&&!Ge.circular)return ge.circularLinkType=="top"?-1:1;if(Ge.circular&&!ge.circular)return Ge.circularLinkType=="top"?1:-1;if(ge.circular&&Ge.circular)return ge.circularLinkType===Ge.circularLinkType&&ge.circularLinkType=="top"?ge.target.column===Ge.target.column?ge.target.y1-Ge.target.y1:Ge.target.column-ge.target.column:ge.circularLinkType===Ge.circularLinkType&&ge.circularLinkType=="bottom"?ge.target.column===Ge.target.column?Ge.target.y1-ge.target.y1:ge.target.column-Ge.target.column:ge.circularLinkType=="top"?-1:1});var Ue=Ie.y0;de.forEach(function(ge){ge.y0=Ue+ge.width/2,Ue=Ue+ge.width}),de.forEach(function(ge,Ge){if(ge.circularLinkType=="bottom"){var tt=Ge+1,ft=0;for(tt;tt1&&Ie.sort(function(Ue,ge){if(!Ue.circular&&!ge.circular){if(Ue.source.column==ge.source.column)return Ue.y0-ge.y0;if(ze(Ue,ge)){if(ge.source.column0?"up":"down"}function vt(Oe,qe){return S(Oe.source,qe)==S(Oe.target,qe)}function st(Oe,qe,mt){var lt=Oe.nodes,Ie=Oe.links,de=!1,Ee=!1;if(Ie.forEach(function(He){He.circularLinkType=="top"?de=!0:He.circularLinkType=="bottom"&&(Ee=!0)}),de==!1||Ee==!1){var Ue=t.min(lt,function(He){return He.y0}),ge=t.max(lt,function(He){return He.y1}),Ge=ge-Ue,tt=mt-qe,ft=tt/Ge;lt.forEach(function(He){var Qe=(He.y1-He.y0)*ft;He.y0=(He.y0-Ue)*ft,He.y1=He.y0+Qe}),Ie.forEach(function(He){He.y0=(He.y0-Ue)*ft,He.y1=(He.y1-Ue)*ft,He.width=He.width*ft})}}e.sankeyCircular=A,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})}))});var PY=ne((omr,UUe)=>{"use strict";UUe.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}});var eVe=ne((smr,QUe)=>{"use strict";var VUe=FUe(),WGt=(f2(),vl(c2)).interpolateNumber,Rw=Ea(),q6=zUe(),YGt=NUe(),Zs=PY(),hp=_a(),XGt=li(),d1=Zt(),IY=d1.strTranslate,ZGt=d1.strRotate,zY=c1(),B6=zY.keyFun,TF=zY.repeat,XUe=zY.unwrap,GUe=Ms(),$Gt=Fa(),ZUe=qc(),KGt=ZUe.CAP_SHIFT,JGt=ZUe.LINE_SPACING,QGt=3;function eHt(e,t,r){var n=XUe(t),a=n.trace,i=a.domain,o=a.orientation==="h",s=a.node.pad,l=a.node.thickness,u={justify:q6.sankeyJustify,left:q6.sankeyLeft,right:q6.sankeyRight,center:q6.sankeyCenter}[a.node.align],c=e.width*(i.x[1]-i.x[0]),f=e.height*(i.y[1]-i.y[0]),h=n._nodes,v=n._links,d=n.circular,m;d?m=YGt.sankeyCircular().circularLinkGap(0):m=q6.sankey(),m.iterations(Zs.sankeyIterations).size(o?[c,f]:[f,c]).nodeWidth(l).nodePadding(s).nodeId(function(q){return q.pointNumber}).nodeAlign(u).nodes(h).links(v);function x(q){a[q].sort==="input"&&(d?d1.warn(`Circular Sankey diagrams do not support the "input" ${q}.sort mode; falling back to the default sort.`):m[`${q}Sort`](null))}x("link"),x("node");var g=m();m.nodePadding()=B||(R=B-O.y0,R>1e-6&&(O.y0+=R,O.y1+=R)),B=O.y1+s})}function A(q){var U=q.map(function(se,ue){return{x0:se.x0,index:ue}}).sort(function(se,ue){return se.x0-ue.x0}),O=[],R=-1,B,Y=-1/0,X;for(E=0;EY+l&&(R+=1,B=te.x0),Y=te.x0,O[R]||(O[R]=[]),O[R].push(te),X=B-te.x0,te.x0+=X,te.x1+=X}return O}if(a.node.x.length&&a.node.y.length){for(E=0;E0?" L "+a.targetX+" "+a.targetY:"")+"Z"):(r="M "+(a.targetX-t)+" "+(a.targetY-n)+" L "+(a.rightInnerExtent-t)+" "+(a.targetY-n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 0 "+(a.rightFullExtent-n-t)+" "+(a.targetY+a.rightSmallArcRadius)+" L "+(a.rightFullExtent-n-t)+" "+a.verticalRightInnerExtent,i&&o?r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-n-t)+" "+(a.verticalFullExtent+n)+" L "+(a.rightFullExtent+n-t-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent+n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent:i?r+=" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightFullExtent-t-n-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" L "+(a.leftFullExtent+n+(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent:r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-t)+" "+(a.verticalFullExtent+n)+" L "+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+" A "+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent,r+=" 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,i&&o?r+=" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" L "+(a.rightFullExtent+n-t+(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent:i?r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+(a.verticalFullExtent+n)+" L "+(a.rightFullExtent-t-n)+" "+(a.verticalFullExtent+n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent:r+=" A "+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+" L "+(a.rightInnerExtent-t)+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent,r+=" L "+(a.rightFullExtent+n-t)+" "+(a.targetY+a.rightSmallArcRadius)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightInnerExtent-t)+" "+(a.targetY+n)+" L "+(a.targetX-t)+" "+(a.targetY+n)+(t>0?" L "+a.targetX+" "+a.targetY:"")+"Z"),r}function qY(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return rHt(r.link,n);var a=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>a&&(n=a);var i=r.link.source.x1,o=r.link.target.x0-n,s=WGt(i,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,h=r.link.y1-r.link.width/2,v=r.link.y1+r.link.width/2,d="M"+i+","+c,m="C"+l+","+c+" "+u+","+h+" "+o+","+h,x="C"+u+","+v+" "+l+","+f+" "+i+","+f,g=n>0?"L"+(o+n)+","+(h+r.link.width/2):"";return g+="L"+o+","+v,d+m+g+x+"Z"}return t}function nHt(e,t){var r=Zs.nodePadAcross,n=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,i=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=d1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:i,zoneX:-r,zoneY:-n,zoneWidth:a+2*r,zoneHeight:i+2*n,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,darkBackground:hp.color(t.color).isDark(),rgb:hp.rgb(t.color),alpha:hp.color(t.color).alpha(),valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function RY(e){e.attr("transform",function(t){return IY(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function aHt(e){e.call(RY)}function $Ue(e,t){e.call(aHt),t.attr("d",qY())}function HUe(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function DY(e){return e.link.width>1||e.linkLineWidth>0}function jUe(e){var t=IY(e.translateX,e.translateY);return t+(e.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function WUe(e,t,r){e.on(".basic",null).on("mouseover.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on("mousemove.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on("mouseout.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on("click.basic",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function iHt(e,t,r,n){var a=Rw.behavior.drag().origin(function(i){return{x:i.node.x0+i.visibleWidth/2,y:i.node.y0+i.visibleHeight/2}}).on("dragstart",function(i){if(i.arrangement!=="fixed"&&(d1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),d1.raiseToTop(this),i.interactionState.dragInProgress=i.node,YUe(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),i.arrangement==="snap")){var o=i.traceId+"|"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):oHt(e,o,i,n),sHt(e,t,i,o,n)}}).on("drag",function(i){if(i.arrangement!=="fixed"){var o=Rw.event.x,s=Rw.event.y;i.arrangement==="snap"?(i.node.x0=o-i.visibleWidth/2,i.node.x1=o+i.visibleWidth/2,i.node.y0=s-i.visibleHeight/2,i.node.y1=s+i.visibleHeight/2):(i.arrangement==="freeform"&&(i.node.x0=o-i.visibleWidth/2,i.node.x1=o+i.visibleWidth/2),s=Math.max(0,Math.min(i.size-i.visibleHeight/2,s)),i.node.y0=s-i.visibleHeight/2,i.node.y1=s+i.visibleHeight/2),YUe(i.node),i.arrangement!=="snap"&&(i.sankey.update(i.graph),$Ue(e.filter(JUe(i)),t))}}).on("dragend",function(i){if(i.arrangement!=="fixed"){i.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(i);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,KUe(r,a)}})}function lHt(e,t,r,n){return function(){for(var i=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function KUe(e,t){for(var r=[],n=[],a=0;aDY(x)?hp.rgb(x.linkLineColor):x.rgb).style("stroke-opacity",x=>DY(x)?hp.opacity(x.linkLineColor):x.alpha).style("fill",x=>x.rgb).style("fill-opacity",x=>x.alpha).style("stroke-width",x=>DY(x)?x.linkLineWidth:1).attr("d",qY()),f.style("opacity",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(Zs.ease).duration(Zs.duration).style("opacity",1),f.exit().transition().ease(Zs.ease).duration(Zs.duration).style("opacity",0).remove();var h=u.selectAll("."+Zs.cn.sankeyNodeSet).data(TF,B6);h.enter().append("g").classed(Zs.cn.sankeyNodeSet,!0),h.style("cursor",function(x){switch(x.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var v=h.selectAll("."+Zs.cn.sankeyNode).data(function(x){var g=x.graph.nodes;return uHt(g),g.map(nHt.bind(null,x))},B6);v.enter().append("g").classed(Zs.cn.sankeyNode,!0).call(RY).style("opacity",function(x){return(e._context.staticPlot||o)&&!x.partOfGroup?1:0}),v.call(WUe,u,a.nodeEvents).call(iHt,f,a,e),v.transition().ease(Zs.ease).duration(Zs.duration).call(RY).style("opacity",function(x){return x.partOfGroup?0:1}),v.exit().transition().ease(Zs.ease).duration(Zs.duration).style("opacity",0).remove();var d=v.selectAll("."+Zs.cn.nodeRect).data(TF);d.enter().append("rect").classed(Zs.cn.nodeRect,!0).call(HUe),d.style("stroke-width",function(x){return x.nodeLineWidth}).style("stroke",function(x){return hp.rgb(x.nodeLineColor)}).style("stroke-opacity",function(x){return hp.opacity(x.nodeLineColor)}).style("fill",x=>x.rgb).style("fill-opacity",x=>x.alpha),d.transition().ease(Zs.ease).duration(Zs.duration).call(HUe);var m=v.selectAll("."+Zs.cn.nodeLabel).data(TF);m.enter().append("text").classed(Zs.cn.nodeLabel,!0).style("cursor","default"),m.attr("data-notex",1).text(function(x){return x.node.label}).each(function(x){var g=Rw.select(this);XGt.font(g,x.textFont),GUe.convertToTspans(g,e)}).attr("text-anchor",function(x){return x.horizontal&&x.left?"end":"start"}).attr("transform",function(x){var g=Rw.select(this),E=GUe.lineCount(g),M=x.textFont.size*((E-1)*JGt-KGt),w=x.nodeLineWidth/2+QGt,k=((x.horizontal?x.visibleHeight:x.visibleWidth)-M)/2;x.horizontal&&(x.left?w=-w:w+=x.visibleWidth);var y=x.horizontal?"":"scale(-1,1)"+ZGt(90);return IY(x.horizontal?w:k,x.horizontal?k:w)+y}),m.transition().ease(Zs.ease).duration(Zs.duration)}});var NY=ne((lmr,uVe)=>{"use strict";var md=Ea(),OY=Zt(),AF=OY.numberFormat,hHt=eVe(),Iw=cu(),dHt=_a(),vy=PY().cn,O6=OY._;function tVe(e){return e!==""}function zw(e,t){return e.filter(function(r){return r.key===t.traceId})}function rVe(e,t){md.select(e).select("path").style("fill-opacity",t),md.select(e).select("rect").style("fill-opacity",t)}function nVe(e){md.select(e).select("text.name").style("fill","black")}function aVe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function iVe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function oVe(e,t,r){t&&r&&zw(r,t).selectAll("."+vy.sankeyLink).filter(aVe(t)).call(sVe.bind(0,t,r,!1))}function BY(e,t,r){t&&r&&zw(r,t).selectAll("."+vy.sankeyLink).filter(aVe(t)).call(lVe.bind(0,t,r,!1))}function sVe(e,t,r,n){n.style("fill",function(a){if(!a.link.concentrationscale)return a.hoverRgb}).style("fill-opacity",function(a){if(!a.link.concentrationscale)return a.hoverAlpha}),n.each(function(a){var i=a.link.label;i!==""&&zw(t,e).selectAll("."+vy.sankeyLink).filter(function(o){return o.link.label===i}).style("fill",function(o){if(!o.link.concentrationscale)return o.hoverRgb}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.hoverAlpha})}),r&&zw(t,e).selectAll("."+vy.sankeyNode).filter(iVe(e)).call(oVe)}function lVe(e,t,r,n){n.style("fill",function(a){return a.rgb}).style("fill-opacity",function(a){return a.alpha}),n.each(function(a){var i=a.link.label;i!==""&&zw(t,e).selectAll("."+vy.sankeyLink).filter(function(o){return o.link.label===i}).style("fill",o=>o.rgb).style("fill-opacity",o=>o.alpha)}),r&&zw(t,e).selectAll(vy.sankeyNode).filter(iVe(e)).call(BY)}function Su(e,t){var r=e.hoverlabel||{},n=OY.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}uVe.exports=function(t,r){for(var n=t._fullLayout,a=n._paper,i=n._size,o=0;o"),color:Su(S,"bgcolor")||dHt.addOpacity(P.color,1),borderColor:Su(S,"bordercolor"),fontFamily:Su(S,"font.family"),fontSize:Su(S,"font.size"),fontColor:Su(S,"font.color"),fontWeight:Su(S,"font.weight"),fontStyle:Su(S,"font.style"),fontVariant:Su(S,"font.variant"),fontTextcase:Su(S,"font.textcase"),fontLineposition:Su(S,"font.lineposition"),fontShadow:Su(S,"font.shadow"),nameLength:Su(S,"namelength"),textAlign:Su(S,"align"),idealAlign:md.event.x"),color:Su(S,"bgcolor")||y.rgb,borderColor:Su(S,"bordercolor"),fontFamily:Su(S,"font.family"),fontSize:Su(S,"font.size"),fontColor:Su(S,"font.color"),fontWeight:Su(S,"font.weight"),fontStyle:Su(S,"font.style"),fontVariant:Su(S,"font.variant"),fontTextcase:Su(S,"font.textcase"),fontLineposition:Su(S,"font.lineposition"),fontShadow:Su(S,"font.shadow"),nameLength:Su(S,"namelength"),textAlign:Su(S,"align"),idealAlign:"left",hovertemplate:S.hovertemplate,hovertemplateLabels:z,eventData:[y.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});rVe(O,.85),nVe(O)}}},w=function(k,y,S){t._fullLayout.hovermode!==!1&&(md.select(k).call(BY,y,S),y.node.trace.node.hoverinfo!=="skip"&&(y.node.fullData=y.node.trace,t.emit("plotly_unhover",{event:md.event,points:[y.node]})),Iw.loneUnhover(n._hoverlayer.node()))};hHt(t,a,r,{width:i.w,height:i.h,margin:{t:i.t,r:i.r,b:i.b,l:i.l}},{linkEvents:{hover:u,follow:m,unhover:x,select:l},nodeEvents:{hover:E,follow:M,unhover:w,select:g}})}});var cVe=ne(I2=>{"use strict";var vHt=Il().overrideAll,pHt=mh().getModuleCalcData,gHt=NY(),mHt=Fg(),yHt=z0(),xHt=od(),bHt=ef().prepSelect,UY=Zt(),_Ht=Fa(),MF="sankey";I2.name=MF;I2.baseLayoutAttrOverrides=vHt({hoverlabel:mHt.hoverlabel},"plot","nested");I2.plot=function(e){var t=pHt(e.calcdata,MF)[0];gHt(e,t),I2.updateFx(e)};I2.clean=function(e,t,r,n){var a=n._has&&n._has(MF),i=t._has&&t._has(MF);a&&!i&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};I2.updateFx=function(e){for(var t=0;t{"use strict";fVe.exports=function(t,r){for(var n=t.cd,a=[],i=n[0].trace,o=i._sankey.graph.nodes,s=0;s{"use strict";dVe.exports={attributes:kY(),supplyDefaults:mUe(),calc:wUe(),plot:NY(),moduleType:"trace",name:"sankey",basePlotModule:cVe(),selectPoints:hVe(),categories:["noOpacity"],meta:{}}});var gVe=ne((hmr,pVe)=>{"use strict";pVe.exports=vVe()});var yVe=ne(qw=>{"use strict";var mVe=Sl();qw.name="indicator";qw.plot=function(e,t,r,n){mVe.plotBasePlot(qw.name,e,t,r,n)};qw.clean=function(e,t,r,n){mVe.cleanBasePlot(qw.name,e,t,r,n)}});var GY=ne((vmr,AVe)=>{"use strict";var py=ci().extendFlat,bVe=ci().extendDeep,THt=Il().overrideAll,_Ve=pl(),wVe=Ic(),AHt=zl().attributes,Nu=Wf(),MHt=Bo().templatedArray,SF=Q_(),xVe=Wl().descriptionOnlyNumbers,VY=_Ve({editType:"plot",colorEditType:"plot"}),N6={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:wVe.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},TVe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},SHt=MHt("step",bVe({},N6,{range:TVe}));AVe.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:AHt({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:py({},VY,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:xVe("value")},font:py({},VY,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:xVe("value")},increasing:{symbol:{valType:"string",dflt:SF.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:SF.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:SF.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:SF.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:py({},VY,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:bVe({},N6,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:wVe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:THt({range:TVe,visible:py({},Nu.visible,{dflt:!0}),tickmode:Nu.minor.tickmode,nticks:Nu.nticks,tick0:Nu.tick0,dtick:Nu.dtick,tickvals:Nu.tickvals,ticktext:Nu.ticktext,ticks:py({},Nu.ticks,{dflt:"outside"}),ticklen:Nu.ticklen,tickwidth:Nu.tickwidth,tickcolor:Nu.tickcolor,ticklabelstep:Nu.ticklabelstep,showticklabels:Nu.showticklabels,labelalias:Nu.labelalias,tickfont:_Ve({}),tickangle:Nu.tickangle,tickformat:Nu.tickformat,tickformatstops:Nu.tickformatstops,tickprefix:Nu.tickprefix,showtickprefix:Nu.showtickprefix,ticksuffix:Nu.ticksuffix,showticksuffix:Nu.showticksuffix,separatethousands:Nu.separatethousands,exponentformat:Nu.exponentformat,minexponent:Nu.minexponent,showexponent:Nu.showexponent,editType:"plot"},"plot"),steps:SHt,threshold:{line:{color:py({},N6.line.color,{}),width:py({},N6.line.width,{dflt:1}),editType:"plot"},thickness:py({},N6.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var HY=ne((pmr,MVe)=>{"use strict";MVe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var kVe=ne((gmr,EVe)=>{"use strict";var v1=Zt(),kF=GY(),EHt=zl().defaults,SVe=Bo(),kHt=zh(),EF=HY(),CHt=Xy(),LHt=Nb(),FHt=Hg(),PHt=jg();function DHt(e,t,r,n){function a(y,S){return v1.coerce(e,t,kF,y,S)}EHt(t,n,a),a("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var i=a("value");t._range=[0,typeof i=="number"?1.5*i:1];var o=new Array(2),s;if(t._hasNumber){a("number.valueformat");var l=v1.extendFlat({},n.font);l.size=void 0,v1.coerceFont(a,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=EF.defaultNumberFontSize,o[0]=!0),a("number.prefix"),a("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=v1.extendFlat({},n.font);c.size=void 0,v1.coerceFont(a,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||EF.defaultNumberFontSize),o[1]=!0),a("delta.reference",t.value),a("delta.relative"),a("delta.valueformat",t.delta.relative?"2%":""),a("delta.increasing.symbol"),a("delta.increasing.color"),a("delta.decreasing.symbol"),a("delta.decreasing.color"),a("delta.position"),a("delta.prefix"),a("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=v1.extendFlat({},n.font);f.size=.25*(s||u||EF.defaultNumberFontSize),v1.coerceFont(a,"title.font",f),a("title.text");var h,v,d,m;function x(y,S){return v1.coerce(h,v,kF.gauge,y,S)}function g(y,S){return v1.coerce(d,m,kF.gauge.axis,y,S)}if(t._hasGauge){h=e.gauge,h||(h={}),v=SVe.newContainer(t,"gauge"),x("shape");var E=t._isBullet=t.gauge.shape==="bullet";E||a("title.align","center");var M=t._isAngular=t.gauge.shape==="angular";M||a("align","center"),x("bgcolor",n.paper_bgcolor),x("borderwidth"),x("bordercolor"),x("bar.color"),x("bar.line.color"),x("bar.line.width");var w=EF.valueThickness*(t.gauge.shape==="bullet"?.5:1);x("bar.thickness",w),kHt(h,v,{name:"steps",handleItemDefaults:RHt}),x("threshold.value"),x("threshold.thickness"),x("threshold.line.width"),x("threshold.line.color"),d={},h&&(d=h.axis||{}),m=SVe.newContainer(v,"axis"),g("visible"),t._range=g("range",t._range);var k={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};CHt(d,m,g,"linear"),PHt(d,m,g,"linear",k),FHt(d,m,g,"linear",k),LHt(d,m,g,k)}else a("title.align","center"),a("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function RHt(e,t){function r(n,a){return v1.coerce(e,t,kF.gauge.steps,n,a)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}EVe.exports={supplyDefaults:DHt}});var LVe=ne((mmr,CVe)=>{"use strict";function IHt(e,t){var r=[],n=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var a=t._lastValue,i=a;return t._hasDelta&&typeof t.delta.reference=="number"&&(i=t.delta.reference),r[0]={y:n,lastY:a,delta:n-i,relativeDelta:(n-i)/i},r}CVe.exports={calc:IHt}});var zVe=ne((ymr,IVe)=>{"use strict";var N2=Ea(),zHt=(f2(),vl(c2)).interpolate,FVe=(f2(),vl(c2)).interpolateNumber,gy=Zt(),qHt=gy.strScale,V6=gy.strTranslate,BHt=gy.rad2deg,OHt=qc().MID_SHIFT,O2=li(),z2=HY(),LF=Ms(),Ch=ri(),NHt=Y4(),UHt=bk(),VHt=Wf(),Bw=_a(),jY={left:"start",center:"middle",right:"end"},q2={left:0,center:.5,right:1},PVe=/[yzafpnµmkMGTPEZY]/;function G6(e){return e&&e.duration>0}IVe.exports=function(t,r,n,a){var i=t._fullLayout,o;G6(n)&&a&&(o=a()),gy.makeTraceGroups(i._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=N2.select(this),f=u._hasGauge,h=u._isAngular,v=u._isBullet,d=u.domain,m={w:i._size.w*(d.x[1]-d.x[0]),h:i._size.h*(d.y[1]-d.y[0]),l:i._size.l+i._size.w*d.x[0],r:i._size.r+i._size.w*(1-d.x[1]),t:i._size.t+i._size.h*(1-d.y[1]),b:i._size.b+i._size.h*d.y[0]},x=m.l+m.w/2,g=m.t+m.h/2,E=Math.min(m.w/2,m.h),M=z2.innerRadius*E,w,k,y,S=u.align||"center";if(k=g,!f)w=m.l+q2[S]*m.w,y=function(O){return DVe(O,m.w,m.h)};else if(h&&(w=x,k=g+E/2,y=function(O){return YHt(O,.9*M)}),v){var T=z2.bulletPadding,p=1-z2.bulletNumberDomainSize+T;w=m.l+(p+(1-p)*q2[S])*m.w,y=function(O){return DVe(O,(z2.bulletNumberDomainSize-T)*m.w,m.h)}}jHt(t,c,s,{numbersX:w,numbersY:k,numbersScaler:y,transitionOpts:n,onComplete:o});var C,A;f&&(C={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},A={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var P=c.selectAll("g.angular").data(h?s:[]);P.exit().remove();var D=c.selectAll("g.angularaxis").data(h?s:[]);D.exit().remove(),h&&HHt(t,c,s,{radius:E,innerRadius:M,gauge:P,layer:D,size:m,gaugeBg:C,gaugeOutline:A,transitionOpts:n,onComplete:o});var z=c.selectAll("g.bullet").data(v?s:[]);z.exit().remove();var q=c.selectAll("g.bulletaxis").data(v?s:[]);q.exit().remove(),v&&GHt(t,c,s,{gauge:z,layer:q,size:m,gaugeBg:C,gaugeOutline:A,transitionOpts:n,onComplete:o});var U=c.selectAll("text.title").data(s);U.exit().remove(),U.enter().append("text").classed("title",!0),U.attr("text-anchor",function(){return v?jY.right:jY[u.title.align]}).text(u.title.text).call(O2.font,u.title.font).call(LF.convertToTspans,t),U.attr("transform",function(){var O=m.l+m.w*q2[u.title.align],R,B=z2.titlePadding,Y=O2.bBox(U.node());if(f){if(h)if(u.gauge.axis.visible){var X=O2.bBox(D.node());R=X.top-B-Y.bottom}else R=m.t+m.h/2-E/2-Y.bottom-B;v&&(R=k-(Y.top+Y.bottom)/2,O=m.l-z2.bulletPadding*m.w)}else R=u._numbersTop-B-Y.bottom;return V6(O,R)})})};function GHt(e,t,r,n){var a=r[0].trace,i=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=a.domain,f=n.transitionOpts,h=n.onComplete,v,d,m,x,g;i.enter().append("g").classed("bullet",!0),i.attr("transform",V6(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var E=u.h,M=a.gauge.bar.thickness*E,w=c.x[0],k=c.x[0]+(c.x[1]-c.x[0])*(a._hasNumber||a._hasDelta?1-z2.bulletNumberDomainSize:1);v=U6(e,a.gauge.axis),v._id="xbulletaxis",v.domain=[w,k],v.setScale(),d=Ch.calcTicks(v),m=Ch.makeTransTickFn(v),x=Ch.getTickSigns(v)[2],g=u.t+u.h,v.visible&&(Ch.drawTicks(e,v,{vals:v.ticks==="inside"?Ch.clipEnds(v,d):d,layer:o,path:Ch.makeTickPath(v,g,x),transFn:m}),Ch.drawLabels(e,v,{vals:d,layer:o,transFn:m,labelFns:Ch.makeLabelFns(v,g)}));function y(D){D.attr("width",function(z){return Math.max(0,v.c2p(z.range[1])-v.c2p(z.range[0]))}).attr("x",function(z){return v.c2p(z.range[0])}).attr("y",function(z){return .5*(1-z.thickness)*E}).attr("height",function(z){return z.thickness*E})}var S=[s].concat(a.gauge.steps),T=i.selectAll("g.bg-bullet").data(S);T.enter().append("g").classed("bg-bullet",!0).append("rect"),T.select("rect").call(y).call(B2),T.exit().remove();var p=i.selectAll("g.value-bullet").data([a.gauge.bar]);p.enter().append("g").classed("value-bullet",!0).append("rect"),p.select("rect").attr("height",M).attr("y",(E-M)/2).call(B2),G6(f)?p.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){h&&h()}).each("interrupt",function(){h&&h()}).attr("width",Math.max(0,v.c2p(Math.min(a.gauge.axis.range[1],r[0].y)))):p.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,v.c2p(Math.min(a.gauge.axis.range[1],r[0].y))):0),p.exit().remove();var C=r.filter(function(){return a.gauge.threshold.value||a.gauge.threshold.value===0}),A=i.selectAll("g.threshold-bullet").data(C);A.enter().append("g").classed("threshold-bullet",!0).append("line"),A.select("line").attr("x1",v.c2p(a.gauge.threshold.value)).attr("x2",v.c2p(a.gauge.threshold.value)).attr("y1",(1-a.gauge.threshold.thickness)/2*E).attr("y2",(1-(1-a.gauge.threshold.thickness)/2)*E).call(Bw.stroke,a.gauge.threshold.line.color).style("stroke-width",a.gauge.threshold.line.width),A.exit().remove();var P=i.selectAll("g.gauge-outline").data([l]);P.enter().append("g").classed("gauge-outline",!0).append("rect"),P.select("rect").call(y).call(B2),P.exit().remove()}function HHt(e,t,r,n){var a=r[0].trace,i=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[i.l+i.w/2,i.t+i.h/2+o/2],f=n.gauge,h=n.layer,v=n.transitionOpts,d=n.onComplete,m=Math.PI/2;function x(te){var se=a.gauge.axis.range[0],ue=a.gauge.axis.range[1],re=(te-se)/(ue-se)*Math.PI-m;return re<-m?-m:re>m?m:re}function g(te){return N2.svg.arc().innerRadius((s+o)/2-te/2*(o-s)).outerRadius((s+o)/2+te/2*(o-s)).startAngle(-m)}function E(te){te.attr("d",function(se){return g(se.thickness).startAngle(x(se.range[0])).endAngle(x(se.range[1]))()})}var M,w,k,y;f.enter().append("g").classed("angular",!0),f.attr("transform",V6(c[0],c[1])),h.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),h.selectAll("g.xangularaxistick,path,text").remove(),M=U6(e,a.gauge.axis),M.type="linear",M.range=a.gauge.axis.range,M._id="xangularaxis",M.ticklabeloverflow="allow",M.setScale();var S=function(te){return(M.range[0]-te.x)/(M.range[1]-M.range[0])*Math.PI+Math.PI},T={},p=Ch.makeLabelFns(M,0),C=p.labelStandoff;T.xFn=function(te){var se=S(te);return Math.cos(se)*C},T.yFn=function(te){var se=S(te),ue=Math.sin(se)>0?.2:1;return-Math.sin(se)*(C+te.fontSize*ue)+Math.abs(Math.cos(se))*(te.fontSize*OHt)},T.anchorFn=function(te){var se=S(te),ue=Math.cos(se);return Math.abs(ue)<.1?"middle":ue>0?"start":"end"},T.heightFn=function(te,se,ue){var re=S(te);return-.5*(1+Math.sin(re))*ue};var A=function(te){return V6(c[0]+o*Math.cos(te),c[1]-o*Math.sin(te))};k=function(te){return A(S(te))};var P=function(te){var se=S(te);return A(se)+"rotate("+-BHt(se)+")"};if(w=Ch.calcTicks(M),y=Ch.getTickSigns(M)[2],M.visible){y=M.ticks==="inside"?-1:1;var D=(M.linewidth||1)/2;Ch.drawTicks(e,M,{vals:w,layer:h,path:"M"+y*D+",0h"+y*M.ticklen,transFn:P}),Ch.drawLabels(e,M,{vals:w,layer:h,transFn:k,labelFns:T})}var z=[l].concat(a.gauge.steps),q=f.selectAll("g.bg-arc").data(z);q.enter().append("g").classed("bg-arc",!0).append("path"),q.select("path").call(E).call(B2),q.exit().remove();var U=g(a.gauge.bar.thickness),O=f.selectAll("g.value-arc").data([a.gauge.bar]);O.enter().append("g").classed("value-arc",!0).append("path");var R=O.select("path");G6(v)?(R.transition().duration(v.duration).ease(v.easing).each("end",function(){d&&d()}).each("interrupt",function(){d&&d()}).attrTween("d",WHt(U,x(r[0].lastY),x(r[0].y))),a._lastValue=r[0].y):R.attr("d",typeof r[0].y=="number"?U.endAngle(x(r[0].y)):"M0,0Z"),R.call(B2),O.exit().remove(),z=[];var B=a.gauge.threshold.value;(B||B===0)&&z.push({range:[B,B],color:a.gauge.threshold.color,line:{color:a.gauge.threshold.line.color,width:a.gauge.threshold.line.width},thickness:a.gauge.threshold.thickness});var Y=f.selectAll("g.threshold-arc").data(z);Y.enter().append("g").classed("threshold-arc",!0).append("path"),Y.select("path").call(E).call(B2),Y.exit().remove();var X=f.selectAll("g.gauge-outline").data([u]);X.enter().append("g").classed("gauge-outline",!0).append("path"),X.select("path").call(E).call(B2),X.exit().remove()}function jHt(e,t,r,n){var a=r[0].trace,i=n.numbersX,o=n.numbersY,s=a.align||"center",l=jY[s],u=n.transitionOpts,c=n.onComplete,f=gy.ensureSingle(t,"g","numbers"),h,v,d,m=[];a._hasNumber&&m.push("number"),a._hasDelta&&(m.push("delta"),a.delta.position==="left"&&m.reverse());var x=f.selectAll("text").data(m);x.enter().append("text"),x.attr("text-anchor",function(){return l}).attr("class",function(A){return A}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),x.exit().remove();function g(A,P,D,z){if(A.match("s")&&D>=0!=z>=0&&!P(D).slice(-1).match(PVe)&&!P(z).slice(-1).match(PVe)){var q=A.slice().replace("s","f").replace(/\d+/,function(O){return parseInt(O)-1}),U=U6(e,{tickformat:q});return function(O){return Math.abs(O)<1?Ch.tickText(U,O).text:P(O)}}else return P}function E(){var A=U6(e,{tickformat:a.number.valueformat},a._range);A.setScale(),Ch.prepTicks(A);var P=function(O){return Ch.tickText(A,O).text},D=a.number.suffix,z=a.number.prefix,q=f.select("text.number");function U(){var O=typeof r[0].y=="number"?z+P(r[0].y)+D:"-";q.text(O).call(O2.font,a.number.font).call(LF.convertToTspans,e)}return G6(u)?q.transition().duration(u.duration).ease(u.easing).each("end",function(){U(),c&&c()}).each("interrupt",function(){U(),c&&c()}).attrTween("text",function(){var O=N2.select(this),R=FVe(r[0].lastY,r[0].y);a._lastValue=r[0].y;var B=g(a.number.valueformat,P,r[0].lastY,r[0].y);return function(Y){O.text(z+B(R(Y))+D)}}):U(),h=RVe(z+P(r[0].y)+D,a.number.font,l,e),q}function M(){var A=U6(e,{tickformat:a.delta.valueformat},a._range);A.setScale(),Ch.prepTicks(A);var P=function(Y){return Ch.tickText(A,Y).text},D=a.delta.suffix,z=a.delta.prefix,q=function(Y){var X=a.delta.relative?Y.relativeDelta:Y.delta;return X},U=function(Y,X){return Y===0||typeof Y!="number"||isNaN(Y)?"-":(Y>0?a.delta.increasing.symbol:a.delta.decreasing.symbol)+z+X(Y)+D},O=function(Y){return Y.delta>=0?a.delta.increasing.color:a.delta.decreasing.color};a._deltaLastValue===void 0&&(a._deltaLastValue=q(r[0]));var R=f.select("text.delta");R.call(O2.font,a.delta.font).call(Bw.fill,O({delta:a._deltaLastValue}));function B(){R.text(U(q(r[0]),P)).call(Bw.fill,O(r[0])).call(LF.convertToTspans,e)}return G6(u)?R.transition().duration(u.duration).ease(u.easing).tween("text",function(){var Y=N2.select(this),X=q(r[0]),te=a._deltaLastValue,se=g(a.delta.valueformat,P,te,X),ue=FVe(te,X);return a._deltaLastValue=X,function(re){Y.text(U(ue(re),se)),Y.call(Bw.fill,O({delta:ue(re)}))}}).each("end",function(){B(),c&&c()}).each("interrupt",function(){B(),c&&c()}):B(),v=RVe(U(q(r[0]),P),a.delta.font,l,e),R}var w=a.mode+a.align,k;if(a._hasDelta&&(k=M(),w+=a.delta.position+a.delta.font.size+a.delta.font.family+a.delta.valueformat,w+=a.delta.increasing.symbol+a.delta.decreasing.symbol,d=v),a._hasNumber&&(E(),w+=a.number.font.size+a.number.font.family+a.number.valueformat+a.number.suffix+a.number.prefix,d=h),a._hasDelta&&a._hasNumber){var y=[(h.left+h.right)/2,(h.top+h.bottom)/2],S=[(v.left+v.right)/2,(v.top+v.bottom)/2],T,p,C=.75*a.delta.font.size;a.delta.position==="left"&&(T=CF(a,"deltaPos",0,-1*(h.width*q2[a.align]+v.width*(1-q2[a.align])+C),w,Math.min),p=y[1]-S[1],d={width:h.width+v.width+C,height:Math.max(h.height,v.height),left:v.left+T,right:h.right,top:Math.min(h.top,v.top+p),bottom:Math.max(h.bottom,v.bottom+p)}),a.delta.position==="right"&&(T=CF(a,"deltaPos",0,h.width*(1-q2[a.align])+v.width*q2[a.align]+C,w,Math.max),p=y[1]-S[1],d={width:h.width+v.width+C,height:Math.max(h.height,v.height),left:h.left,right:v.right+T,top:Math.min(h.top,v.top+p),bottom:Math.max(h.bottom,v.bottom+p)}),a.delta.position==="bottom"&&(T=null,p=v.height,d={width:Math.max(h.width,v.width),height:h.height+v.height,left:Math.min(h.left,v.left),right:Math.max(h.right,v.right),top:h.bottom-h.height,bottom:h.bottom+v.height}),a.delta.position==="top"&&(T=null,p=h.top,d={width:Math.max(h.width,v.width),height:h.height+v.height,left:Math.min(h.left,v.left),right:Math.max(h.right,v.right),top:h.bottom-h.height-v.height,bottom:h.bottom}),k.attr({dx:T,dy:p})}(a._hasNumber||a._hasDelta)&&f.attr("transform",function(){var A=n.numbersScaler(d);w+=A[2];var P=CF(a,"numbersScale",1,A[0],w,Math.min),D;a._scaleNumbers||(P=1),a._isAngular?D=o-P*d.bottom:D=o-P*(d.top+d.bottom)/2,a._numbersTop=P*d.top+D;var z=d[s];s==="center"&&(z=(d.left+d.right)/2);var q=i-P*z;return q=CF(a,"numbersTranslate",0,q,w,Math.max),V6(q,D)+qHt(P)})}function B2(e){e.each(function(t){Bw.stroke(N2.select(this),t.line.color)}).each(function(t){Bw.fill(N2.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function WHt(e,t,r){return function(){var n=zHt(t,r);return function(a){return e.endAngle(n(a))()}}}function U6(e,t,r){var n=e._fullLayout,a=gy.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),i={type:"linear",_id:"x"+t._id},o={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return gy.coerce(a,i,VHt,l,u)}return NHt(a,i,s,o,n),UHt(a,i,s,o),i}function DVe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function YHt(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function RVe(e,t,r,n){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),i=N2.select(a);return i.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(LF.convertToTspans,n).call(O2.font,t),O2.bBox(i.node())}function CF(e,t,r,n,a,i){var o="_cache"+t;e[o]&&e[o].key===a||(e[o]={key:a,value:r});var s=gy.aggNums(i,null,[e[o].value,n],2);return e[o].value=s,s}});var BVe=ne((xmr,qVe)=>{"use strict";qVe.exports={moduleType:"trace",name:"indicator",basePlotModule:yVe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:GY(),supplyDefaults:kVe().supplyDefaults,calc:LVe().calc,plot:zVe(),meta:{}}});var NVe=ne((bmr,OVe)=>{"use strict";OVe.exports=BVe()});var WY=ne((wmr,HVe)=>{"use strict";var UVe=om(),FF=ci().extendFlat,XHt=Il().overrideAll,VVe=pl(),ZHt=zl().attributes,GVe=Wl().descriptionOnlyNumbers,_mr=HVe.exports=XHt({domain:ZHt({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:GVe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:FF({},UVe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:FF({},VVe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:GVe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:FF({},UVe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:FF({},VVe({arrayOk:!0}))}},"calc","from-root")});var WVe=ne((Tmr,jVe)=>{"use strict";var YY=Zt(),$Ht=WY(),KHt=zl().defaults;function JHt(e,t){for(var r=e.columnorder||[],n=e.header.values.length,a=r.slice(0,n),i=a.slice().sort(function(l,u){return l-u}),o=a.map(function(l){return i.indexOf(l)}),s=o.length;s{"use strict";var QHt=c1().wrap;YVe.exports=function(){return QHt({})}});var XY=ne((Mmr,ZVe)=>{"use strict";ZVe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",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"}}});var aGe=ne((Smr,nGe)=>{"use strict";var $Ve=XY(),$Y=ci().extendFlat,ejt=mi(),tjt=Ih().isTypedArray,PF=Ih().isArrayOrTypedArray;nGe.exports=function(t,r){var n=ZY(r.cells.values),a=function(p){return p.slice(r.header.values.length,p.length)},i=ZY(r.header.values);i.length&&!i[0].length&&(i[0]=[""],i=ZY(i));var o=i.concat(a(n).map(function(){return rGe((i[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[$Ve.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],h=c.reduce(KVe,0),v=u-h,d=v+$Ve.uplift,m=eGe(f,d),x=eGe(c,h),g=QVe(x,[]),E=QVe(m,g),M={},w=r.columnorder;PF(w)&&(w=Array.from(w)),w=w.concat(a(n.map(function(p,C){return C})));var k=o.map(function(p,C){var A=PF(r.columnwidth)?r.columnwidth[Math.min(C,r.columnwidth.length-1)]:r.columnwidth;return ejt(A)?Number(A):1}),y=k.reduce(KVe,0);k=k.map(function(p){return p/y*l});var S=Math.max(KY(r.header.line.width),KY(r.cells.line.width)),T={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:S,height:u,columnOrder:w,groupHeight:u,rowBlocks:E,headerRowBlocks:g,scrollY:0,cells:$Y({},r.cells,{values:n}),headerCells:$Y({},r.header,{values:o}),gdColumns:o.map(function(p){return p[0]}),gdColumnsOriginalOrder:o.map(function(p){return p[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(p,C){var A=M[p];M[p]=(A||0)+1;var P=p+"__"+M[p];return{key:P,label:p,specIndex:C,xIndex:w[C],xScale:JVe,x:void 0,calcdata:void 0,columnWidth:k[C]}})};return T.columns.forEach(function(p){p.calcdata=T,p.x=JVe(p)}),T};function KY(e){if(PF(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=tGe(),a+=i,s=u+1,i=0);return r}function tGe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var iGe=ne(JY=>{"use strict";var DF=ci().extendFlat;JY.splitToPanels=function(e){var t=[0,0],r=DF({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:DF({},e.calcdata,{cells:e.calcdata.headerCells})}),n=DF({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),a=DF({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,a,r]};JY.splitToCells=function(e){var t=rjt(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var a=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:n+a,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function rjt(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var lX=ne((kmr,gGe)=>{"use strict";var Na=XY(),$l=Ea(),QY=Zt(),njt=QY.numberFormat,$s=c1(),eX=li(),ajt=Ms(),ijt=Zt().raiseToTop,_0=Zt().strTranslate,ojt=Zt().cancelTransition,sjt=aGe(),hGe=iGe(),oGe=_a();gGe.exports=function(t,r){var n=!t._context.staticPlot,a=t._fullLayout._paper.selectAll("."+Na.cn.table).data(r.map(function(E){var M=$s.unwrap(E),w=M.trace;return sjt(t,w)}),$s.keyFun);a.exit().remove(),a.enter().append("g").classed(Na.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),a.attr("width",function(E){return E.width+E.size.l+E.size.r}).attr("height",function(E){return E.height+E.size.t+E.size.b}).attr("transform",function(E){return _0(E.translateX,E.translateY)});var i=a.selectAll("."+Na.cn.tableControlView).data($s.repeat,$s.keyFun),o=i.enter().append("g").classed(Na.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(E){i.filter(function(M){return E===M}).call(H6,t)}).on(s,function(E){if(!E.scrollbarState.wheeling){E.scrollbarState.wheeling=!0;var M=E.scrollY+$l.event.deltaY,w=IF(t,i,null,M)(E);w||($l.event.stopPropagation(),$l.event.preventDefault()),E.scrollbarState.wheeling=!1}}).call(H6,t,!0)}i.attr("transform",function(E){return _0(E.size.l,E.size.t)});var l=i.selectAll("."+Na.cn.scrollBackground).data($s.repeat,$s.keyFun);l.enter().append("rect").classed(Na.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(E){return E.width}).attr("height",function(E){return E.height}),i.each(function(E){eX.setClipUrl($l.select(this),sGe(t,E),t)});var u=i.selectAll("."+Na.cn.yColumn).data(function(E){return E.columns},$s.keyFun);u.enter().append("g").classed(Na.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(E){return _0(E.x,0)}),n&&u.call($l.behavior.drag().origin(function(E){var M=$l.select(this);return cGe(M,E,-Na.uplift),ijt(this),E.calcdata.columnDragInProgress=!0,H6(i.filter(function(w){return E.calcdata.key===w.key}),t),E}).on("drag",function(E){var M=$l.select(this),w=function(S){return(E===S?$l.event.x:S.x)+S.columnWidth/2};E.x=Math.max(-Na.overdrag,Math.min(E.calcdata.width+Na.overdrag-E.columnWidth,$l.event.x));var k=dGe(u).filter(function(S){return S.calcdata.key===E.calcdata.key}),y=k.sort(function(S,T){return w(S)-w(T)});y.forEach(function(S,T){S.xIndex=T,S.x=E===S?S.x:S.xScale(S)}),u.filter(function(S){return E!==S}).transition().ease(Na.transitionEase).duration(Na.transitionDuration).attr("transform",function(S){return _0(S.x,0)}),M.call(ojt).attr("transform",_0(E.x,-Na.uplift))}).on("dragend",function(E){var M=$l.select(this),w=E.calcdata;E.x=E.xScale(E),E.calcdata.columnDragInProgress=!1,cGe(M,E,0),mjt(t,w,w.columns.map(function(k){return k.xIndex}))})),u.each(function(E){eX.setClipUrl($l.select(this),lGe(t,E),t)});var c=u.selectAll("."+Na.cn.columnBlock).data(hGe.splitToPanels,$s.keyFun);c.enter().append("g").classed(Na.cn.columnBlock,!0).attr("id",function(E){return E.key}),c.style("cursor",function(E){return E.dragHandle?"ew-resize":E.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(yjt),h=c.filter(iX);n&&h.call($l.behavior.drag().origin(function(E){return $l.event.stopPropagation(),E}).on("drag",IF(t,i,-1)).on("dragend",function(){})),tX(t,i,f,c),tX(t,i,h,c);var v=i.selectAll("."+Na.cn.scrollAreaClip).data($s.repeat,$s.keyFun);v.enter().append("clipPath").classed(Na.cn.scrollAreaClip,!0).attr("id",function(E){return sGe(t,E)});var d=v.selectAll("."+Na.cn.scrollAreaClipRect).data($s.repeat,$s.keyFun);d.enter().append("rect").classed(Na.cn.scrollAreaClipRect,!0).attr("x",-Na.overdrag).attr("y",-Na.uplift).attr("fill","none"),d.attr("width",function(E){return E.width+2*Na.overdrag}).attr("height",function(E){return E.height+Na.uplift});var m=u.selectAll("."+Na.cn.columnBoundary).data($s.repeat,$s.keyFun);m.enter().append("g").classed(Na.cn.columnBoundary,!0);var x=u.selectAll("."+Na.cn.columnBoundaryClippath).data($s.repeat,$s.keyFun);x.enter().append("clipPath").classed(Na.cn.columnBoundaryClippath,!0),x.attr("id",function(E){return lGe(t,E)});var g=x.selectAll("."+Na.cn.columnBoundaryRect).data($s.repeat,$s.keyFun);g.enter().append("rect").classed(Na.cn.columnBoundaryRect,!0).attr("fill","none"),g.attr("width",function(E){return E.columnWidth+2*RF(E)}).attr("height",function(E){return E.calcdata.height+2*RF(E)+Na.uplift}).attr("x",function(E){return-RF(E)}).attr("y",function(E){return-RF(E)}),oX(null,h,i)};function RF(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function sGe(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function lGe(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function dGe(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function H6(e,t,r){function n(u){var c=u.rowBlocks;return nX(c,c.length-1)+(c.length?zF(c[c.length-1],1/0):1)}var a=e.selectAll("."+Na.cn.scrollbarKit).data($s.repeat,$s.keyFun);a.enter().append("g").classed(Na.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-rX(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Na.goldenRatio*Na.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Na.scrollbarWidth/2+Na.scrollbarOffset;return _0(c,rX(u))});var i=a.selectAll("."+Na.cn.scrollbar).data($s.repeat,$s.keyFun);i.enter().append("g").classed(Na.cn.scrollbar,!0);var o=i.selectAll("."+Na.cn.scrollbarSlider).data($s.repeat,$s.keyFun);o.enter().append("g").classed(Na.cn.scrollbarSlider,!0),o.attr("transform",function(u){return _0(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Na.cn.scrollbarGlyph).data($s.repeat,$s.keyFun);s.enter().append("line").classed(Na.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Na.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Na.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Na.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Na.scrollbarHideDelay).duration(Na.scrollbarHideDuration).attr("stroke-opacity",0);var l=i.selectAll("."+Na.cn.scrollbarCaptureZone).data($s.repeat,$s.keyFun);l.enter().append("line").classed(Na.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Na.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=$l.event.y,f=this.getBoundingClientRect(),h=u.scrollbarState,v=c-f.top,d=$l.scale.linear().domain([0,h.scrollableAreaHeight]).range([0,h.totalHeight]).clamp(!0);h.topY<=v&&v<=h.bottomY||IF(t,e,null,d(v-h.barLength/2))(u)}).call($l.behavior.drag().origin(function(u){return $l.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",IF(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function tX(e,t,r,n){var a=ljt(r),i=ujt(a);djt(i);var o=cjt(i);pjt(o);var s=hjt(i),l=fjt(s);vjt(l),vGe(l,t,n,e),sX(i)}function ljt(e){var t=e.selectAll("."+Na.cn.columnCells).data($s.repeat,$s.keyFun);return t.enter().append("g").classed(Na.cn.columnCells,!0),t.exit().remove(),t}function ujt(e){var t=e.selectAll("."+Na.cn.columnCell).data(hGe.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Na.cn.columnCell,!0),t.exit().remove(),t}function cjt(e){var t=e.selectAll("."+Na.cn.cellRect).data($s.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Na.cn.cellRect,!0),t}function fjt(e){var t=e.selectAll("."+Na.cn.cellText).data($s.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Na.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){$l.event.stopPropagation()}),t}function hjt(e){var t=e.selectAll("."+Na.cn.cellTextHolder).data($s.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Na.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function djt(e){e.each(function(t,r){var n=t.calcdata.cells.font,a=t.column.specIndex,i={size:yd(n.size,a,r),color:yd(n.color,a,r),family:yd(n.family,a,r),weight:yd(n.weight,a,r),style:yd(n.style,a,r),variant:yd(n.variant,a,r),textcase:yd(n.textcase,a,r),lineposition:yd(n.lineposition,a,r),shadow:yd(n.shadow,a,r)};t.rowNumber=t.key,t.align=yd(t.calcdata.cells.align,a,r),t.cellBorderWidth=yd(t.calcdata.cells.line.width,a,r),t.font=i})}function vjt(e){e.each(function(t){eX.font($l.select(this),t.font)})}function pjt(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=$l.select(this);oGe.stroke(r,yd(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),oGe.fill(r,yd(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function vGe(e,t,r,n){e.text(function(a){var i=a.column.specIndex,o=a.rowNumber,s=a.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;a.mayHaveMarkup=l&&s.match(/[<&>]/);var f=gjt(s);a.latex=f;var h=f?"":yd(a.calcdata.cells.prefix,i,o)||"",v=f?"":yd(a.calcdata.cells.suffix,i,o)||"",d=f?null:yd(a.calcdata.cells.format,i,o)||null,m=h+(d?njt(d)(a.value):a.value)+v,x;a.wrappingNeeded=!a.wrapped&&!c&&!f&&(x=uGe(m)),a.cellHeightMayIncrease=u||f||a.mayHaveMarkup||(x===void 0?uGe(m):x),a.needsConvertToTspans=a.mayHaveMarkup||a.wrappingNeeded||a.latex;var g;if(a.wrappingNeeded){var E=Na.wrapSplitCharacter===" "?m.replace(/a&&n.push(i),a+=l}return n}function oX(e,t,r){var n=dGe(t)[0];if(n!==void 0){var a=n.rowBlocks,i=n.calcdata,o=nX(a,a.length),s=n.calcdata.groupHeight-rX(n),l=i.scrollY=Math.max(0,Math.min(o-s,i.scrollY)),u=xjt(a,l,s);u.length===1&&(u[0]===a.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=nX(c.rowBlocks,c.page)-c.scrollY;return _0(0,f)}),e&&(fGe(e,r,t,u,n.prevPages,n,0),fGe(e,r,t,u,n.prevPages,n,1),H6(r,e))}}function IF(e,t,r,n){return function(i){var o=i.calcdata?i.calcdata:i,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*$l.event.dy:n;var c=s.selectAll("."+Na.cn.yColumn).selectAll("."+Na.cn.columnBlock).filter(iX);return oX(e,c,s),o.scrollY===u}}function fGe(e,t,r,n,a,i,o){var s=n[o]!==a[o];s&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==a[c]});tX(e,t,l,r),a[o]=n[o]}))}function bjt(e,t,r,n){return function(){var i=$l.select(t.parentNode);i.each(function(o){var s=o.fragments;i.selectAll("tspan.line").each(function(m,x){s[x].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,h,v=0,d=o.column.columnWidth-2*Na.cellPad;for(o.value="";u.length;)f=u.shift(),h=f.width+l,v+h>d&&(o.value+=c.join(Na.wrapSpacer)+Na.lineBreaker,c=[],v=0),c.push(f.text),v+=h;v&&(o.value+=c.join(Na.wrapSpacer)),o.wrapped=!0}),i.selectAll("tspan.line").remove(),vGe(i.select("."+Na.cn.cellText),r,e,n),$l.select(t.parentNode.parentNode).call(sX)}}function _jt(e,t,r,n,a){return function(){if(!a.settledY){var o=$l.select(t.parentNode),s=aX(a),l=a.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=a.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Na.cellPad:u,f=Math.max(c,u),h=f-s.rows[l].rowHeight;h&&(s.rows[l].rowHeight=f,e.selectAll("."+Na.cn.columnCell).call(sX),oX(null,e.filter(iX),0),H6(r,n,!0)),o.attr("transform",function(){var v=this,d=v.parentNode,m=d.getBoundingClientRect(),x=$l.select(v.parentNode).select("."+Na.cn.cellRect).node().getBoundingClientRect(),g=v.transform.baseVal.consolidate(),E=x.top-m.top+(g?g.matrix.f:Na.cellPad);return _0(pGe(a,$l.select(v.parentNode).select("."+Na.cn.cellTextHolder).node().getBoundingClientRect().width),E)}),a.settledY=!0}}}function pGe(e,t){switch(e.align){case"left":return Na.cellPad;case"right":return e.column.columnWidth-(t||0)-Na.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Na.cellPad}}function sX(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+zF(s,1/0)},0),n=aX(t),a=zF(n,t.key),i=a+r;return _0(0,i)}).selectAll("."+Na.cn.cellRect).attr("height",function(t){return Tjt(aX(t),t.key).rowHeight})}function nX(e,t){for(var r=0,n=t-1;n>=0;n--)r+=wjt(e[n]);return r}function zF(e,t){for(var r=0,n=0;n{"use strict";var Ajt=mh().getModuleCalcData,Mjt=lX(),qF="table";BF.name=qF;BF.plot=function(e){var t=Ajt(e.calcdata,qF)[0];t.length&&Mjt(e,t)};BF.clean=function(e,t,r,n){var a=n._has&&n._has(qF),i=t._has&&t._has(qF);a&&!i&&n._paperdiv.selectAll(".table").remove()}});var xGe=ne((Lmr,yGe)=>{"use strict";yGe.exports={attributes:WY(),supplyDefaults:WVe(),calc:XVe(),plot:lX(),moduleType:"trace",name:"table",basePlotModule:mGe(),categories:["noOpacity"],meta:{}}});var _Ge=ne((Fmr,bGe)=>{"use strict";bGe.exports=xGe()});var SGe=ne((Pmr,MGe)=>{"use strict";var wGe=pl(),TGe=Ic(),uX=Wf(),Sjt=Wl().descriptionWithDates,Ejt=Il().overrideAll,AGe=xf().dash,cX=ci().extendFlat;MGe.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:wGe({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:uX.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:cX({},uX.labelalias,{editType:"calc"}),tickfont:wGe({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:Sjt("tick label")},tickformatstops:Ejt(uX.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:TGe.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:cX({},AGe,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:cX({},AGe,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:TGe.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var NF=ne((Dmr,CGe)=>{"use strict";var kjt=pl(),EGe=SGe(),kGe=Ic(),OF=kjt({editType:"calc"}),Cjt=Tu().zorder;OF.family.dflt='"Open Sans", verdana, arial, sans-serif';OF.size.dflt=12;OF.color.dflt=kGe.defaultLine;CGe.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:EGe,baxis:EGe,font:OF,color:{valType:"color",dflt:kGe.defaultLine,editType:"plot"},zorder:Cjt}});var PGe=ne((Rmr,FGe)=>{"use strict";var LGe=Zt().isArray1D;FGe.exports=function(t,r,n){var a=n("x"),i=a&&a.length,o=n("y"),s=o&&o.length;if(!i&&!s)return!1;if(r._cheater=!a,(!i||LGe(a))&&(!s||LGe(o))){var l=i?a.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var IGe=ne((Imr,RGe)=>{"use strict";var Ljt=NF(),DGe=_a().addOpacity,Fjt=Fa(),j6=Zt(),Pjt=Xy(),Djt=Hg(),Rjt=jg(),Ijt=mk(),zjt=Tp(),qjt=Wb();RGe.exports=function(t,r,n){var a=n.letter,i=n.font||{},o=Ljt[a+"axis"];function s(p,C){return j6.coerce(t,r,o,p,C)}function l(p,C){return j6.coerce2(t,r,o,p,C)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&Bjt(r,n.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",a+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=a,u==="date"){var c=Fjt.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}zjt(r,n.fullLayout),r.c2p=j6.identity;var f=s("color",n.dfltColor),h=f===t.color?f:i.color,v=s("title.text");v&&(j6.coerceFont(s,"title.font",i,{overrideDflt:{size:j6.bigFont(i.size),color:h}}),s("title.offset")),s("tickangle");var d=s("autorange",!r.isValidRange(t.range));d&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),Pjt(t,r,s,u),Rjt(t,r,s,u,n),Djt(t,r,s,u,n),Ijt(t,r,s,{data:n.data,dataAttr:a});var m=s("gridcolor",DGe(f,.3)),x=l("gridwidth"),g=l("griddash"),E=s("showgrid");E||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var M=l("startlinecolor",f),w=l("startlinewidth",x),k=s("startline",r.showgrid||!!M||!!w);k||(delete r.startlinecolor,delete r.startlinewidth);var y=l("endlinecolor",f),S=l("endlinewidth",x),T=s("endline",r.showgrid||!!y||!!S);return T||(delete r.endlinecolor,delete r.endlinewidth),E?(s("minorgridcount"),s("minorgridwidth",x),s("minorgriddash",g),s("minorgridcolor",DGe(m,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels==="none"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s("tickmode"),r};function Bjt(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),a=n+"calendar",i=e[a];e.type=qjt(t,i,{autotypenumbers:e.autotypenumbers})}}});var qGe=ne((zmr,zGe)=>{"use strict";var Ojt=IGe(),Njt=Bo();zGe.exports=function(t,r,n,a,i){var o=a("a");o||(a("da"),a("a0"));var s=a("b");s||(a("db"),a("b0")),Ujt(t,r,n,i)};function Ujt(e,t,r,n){var a=["aaxis","baxis"];a.forEach(function(i){var o=i.charAt(0),s=e[i]||{},l=Njt.newContainer(t,i),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:i,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};Ojt(s,l,u),l._categories=l._categories||[],!e[i]&&s.type!=="-"&&(e[i]={type:s.type})})}});var NGe=ne((qmr,OGe)=>{"use strict";var BGe=Zt(),Vjt=PGe(),Gjt=qGe(),Hjt=NF(),jjt=Ic();OGe.exports=function(t,r,n,a){function i(l,u){return BGe.coerce(t,r,Hjt,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=i("color",jjt.defaultLine);if(BGe.coerceFont(i,"font",a.font),i("carpet"),Gjt(t,r,a,i,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=Vjt(t,r,i);s||(r.visible=!1),r._cheater&&i("cheaterslope"),i("zorder")}});var fX=ne((Bmr,UGe)=>{"use strict";var Wjt=Zt().isArrayOrTypedArray;UGe.exports=function(t,r,n){var a;for(Wjt(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],a=0;a{"use strict";VGe.exports=function(t,r,n){if(t.length===0)return"";var a,i=[],o=n?3:1;for(a=0;a{"use strict";GGe.exports=function(t,r,n,a,i,o){var s=i[0]*t.dpdx(r),l=i[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(i[0]*i[0]+i[1]*i[1]),h=Math.sqrt(o[0]*o[0]+o[1]*o[1]),v=(i[0]*o[0]+i[1]*o[1])/f/h;c=Math.max(0,v)}var d=Math.atan2(l,s)*180/Math.PI;return d<-90?(d+=180,u=-u):d>90&&(d-=180,u=-u),{angle:d,flip:u,p:t.c2p(a,r,n),offsetMultplier:c}}});var JGe=ne((Umr,KGe)=>{"use strict";var HF=Ea(),UF=li(),VF=fX(),YGe=hX(),W6=HGe(),dX=Ms(),av=Zt(),XGe=av.strRotate,GF=av.strTranslate,ZGe=qc();KGe.exports=function(t,r,n,a){var i=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;av.makeTraceGroups(a,n,"trace").each(function(c){var f=HF.select(this),h=c[0],v=h.trace,d=v.aaxis,m=v.baxis,x=av.ensureSingle(f,"g","minorlayer"),g=av.ensureSingle(f,"g","majorlayer"),E=av.ensureSingle(f,"g","boundarylayer"),M=av.ensureSingle(f,"g","labellayer");f.style("opacity",v.opacity),Ow(o,s,g,d,"a",d._gridlines,!0,i),Ow(o,s,g,m,"b",m._gridlines,!0,i),Ow(o,s,x,d,"a",d._minorgridlines,!0,i),Ow(o,s,x,m,"b",m._minorgridlines,!0,i),Ow(o,s,E,d,"a-boundary",d._boundarylines,i),Ow(o,s,E,m,"b-boundary",m._boundarylines,i);var w=jGe(t,o,s,v,h,M,d._labels,"a-label"),k=jGe(t,o,s,v,h,M,m._labels,"b-label");Xjt(t,M,v,h,o,s,w,k),Yjt(v,h,u,o,s)})};function Yjt(e,t,r,n,a){var i,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=av.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,h=[];for(l=0;l0?"start":"end","data-notex":1}).call(UF.font,f.font).text(f.text).call(dX.convertToTspans,e),g=UF.bBox(this);x.attr("transform",GF(v.p[0],v.p[1])+XGe(v.angle)+GF(f.axis.labelpadding*m,g.height*.3)),u=Math.max(u,g.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function Xjt(e,t,r,n,a,i,o,s){var l,u,c,f,h=av.aggNums(Math.min,null,r.a),v=av.aggNums(Math.max,null,r.a),d=av.aggNums(Math.min,null,r.b),m=av.aggNums(Math.max,null,r.b);l=.5*(h+v),u=d,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&av.extendFlat(o,W6(r,a,i,c,r.dxydb_rough(l,u))),WGe(e,t,r,n,c,f,r.aaxis,a,i,o,"a-title"),l=h,u=.5*(d+m),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&av.extendFlat(s,W6(r,a,i,c,r.dxyda_rough(l,u))),WGe(e,t,r,n,c,f,r.baxis,a,i,s,"b-title")}var $Ge=ZGe.LINE_SPACING,Zjt=(1-ZGe.MID_SHIFT)/$Ge+1;function WGe(e,t,r,n,a,i,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var h=t.selectAll("text."+c).data(f),v=u.maxExtent;h.enter().append("text").classed(c,!0),h.each(function(){var d=W6(r,s,l,a,i);["start","both"].indexOf(o.showticklabels)===-1&&(v=0);var m=o.title.font.size;v+=m+o.title.offset;var x=u.angle+(u.flip<0?180:0),g=(x-d.angle+450)%360,E=g>90&&g<270,M=HF.select(this);M.text(o.title.text).call(dX.convertToTspans,e),E&&(v=(-dX.lineCount(M)+Zjt)*$Ge*m-v),M.attr("transform",GF(d.p[0],d.p[1])+XGe(d.angle)+GF(0,v)).attr("text-anchor","middle").call(UF.font,o.title.font)}),h.exit().remove()}});var eHe=ne((Vmr,QGe)=>{"use strict";var jF=Zt().isArrayOrTypedArray;QGe.exports=function(e,t,r){var n,a,i,o,s,l,u=[],c=jF(e)?e.length:e,f=jF(t)?t.length:t,h=jF(e)?e:null,v=jF(t)?t:null;h&&(i=(h.length-1)/(h[h.length-1]-h[0])/(c-1)),v&&(o=(v.length-1)/(v[v.length-1]-v[0])/(f-1));var d,m=1/0,x=-1/0;for(a=0;a{"use strict";var tHe=Zt().isArrayOrTypedArray;nHe.exports=function(e){return rHe(e,0)};function rHe(e,t){if(!tHe(e)||t>=10)return null;for(var r=1/0,n=-1/0,a=e.length,i=0;i{"use strict";var $jt=ri(),my=ci().extendFlat;iHe.exports=function(t,r,n){var a,i,o,s,l,u,c,f,h,v,d,m,x,g,E=t["_"+r],M=t[r+"axis"],w=M._gridlines=[],k=M._minorgridlines=[],y=M._boundarylines=[],S=t["_"+n],T=t[n+"axis"];M.tickmode==="array"&&(M.tickvals=E.slice());var p=t._xctrl,C=t._yctrl,A=p[0].length,P=p.length,D=t._a.length,z=t._b.length;$jt.prepTicks(M),M.tickmode==="array"&&delete M.tickvals;var q=M.smoothing?3:1;function U(R){var B,Y,X,te,se,ue,re,j,fe,ce,oe,we,he=[],ye=[],Pe={};if(r==="b")for(Y=t.b2j(R),X=Math.floor(Math.max(0,Math.min(z-2,Y))),te=Y-X,Pe.length=z,Pe.crossLength=D,Pe.xy=function(le){return t.evalxy([],le,Y)},Pe.dxy=function(le,ze){return t.dxydi([],le,X,ze,te)},B=0;B0&&(fe=t.dxydi([],B-1,X,0,te),he.push(se[0]+fe[0]/3),ye.push(se[1]+fe[1]/3),ce=t.dxydi([],B-1,X,1,te),he.push(j[0]-ce[0]/3),ye.push(j[1]-ce[1]/3)),he.push(j[0]),ye.push(j[1]),se=j;else for(B=t.a2i(R),ue=Math.floor(Math.max(0,Math.min(D-2,B))),re=B-ue,Pe.length=D,Pe.crossLength=z,Pe.xy=function(le){return t.evalxy([],B,le)},Pe.dxy=function(le,ze){return t.dxydj([],ue,le,re,ze)},Y=0;Y0&&(oe=t.dxydj([],ue,Y-1,re,0),he.push(se[0]+oe[0]/3),ye.push(se[1]+oe[1]/3),we=t.dxydj([],ue,Y-1,re,1),he.push(j[0]-we[0]/3),ye.push(j[1]-we[1]/3)),he.push(j[0]),ye.push(j[1]),se=j;return Pe.axisLetter=r,Pe.axis=M,Pe.crossAxis=T,Pe.value=R,Pe.constvar=n,Pe.index=f,Pe.x=he,Pe.y=ye,Pe.smoothing=T.smoothing,Pe}function O(R){var B,Y,X,te,se,ue=[],re=[],j={};if(j.length=E.length,j.crossLength=S.length,r==="b")for(X=Math.max(0,Math.min(z-2,R)),se=Math.min(1,Math.max(0,R-X)),j.xy=function(fe){return t.evalxy([],fe,R)},j.dxy=function(fe,ce){return t.dxydi([],fe,X,ce,se)},B=0;BE.length-1)&&w.push(my(O(i),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=u;fE.length-1)&&!(d<0||d>E.length-1))for(m=E[o],x=E[d],a=0;aE[E.length-1])&&k.push(my(U(v),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash})));M.startline&&y.push(my(O(0),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&y.push(my(O(E.length-1),{color:M.endlinecolor,width:M.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((E[E.length-1]-M.tick0)/M.dtick*(1+s)),Math.ceil((E[0]-M.tick0)/M.dtick/(1+s))].sort(function(R,B){return R-B}),u=l[0],c=l[1],f=u;f<=c;f++)h=M.tick0+M.dtick*f,w.push(my(U(h),{color:M.gridcolor,width:M.gridwidth,dash:M.griddash}));for(f=u-1;fE[E.length-1])&&k.push(my(U(v),{color:M.minorgridcolor,width:M.minorgridwidth,dash:M.minorgriddash}));M.startline&&y.push(my(U(E[0]),{color:M.startlinecolor,width:M.startlinewidth})),M.endline&&y.push(my(U(E[E.length-1]),{color:M.endlinecolor,width:M.endlinewidth}))}}});var cHe=ne((jmr,uHe)=>{"use strict";var sHe=ri(),lHe=ci().extendFlat;uHe.exports=function(t,r){var n,a,i,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";fHe.exports=function(t,r,n,a){var i,o,s,l=[],u=!!n.smoothing,c=!!a.smoothing,f=t[0].length-1,h=t.length-1;for(i=0,o=[],s=[];i<=f;i++)o[i]=t[0][i],s[i]=r[0][i];for(l.push({x:o,y:s,bicubic:u}),i=0,o=[],s=[];i<=h;i++)o[i]=t[i][f],s[i]=r[i][f];for(l.push({x:o,y:s,bicubic:c}),i=f,o=[],s=[];i>=0;i--)o[f-i]=t[h][i],s[f-i]=r[h][i];for(l.push({x:o,y:s,bicubic:u}),i=h,o=[],s=[];i>=0;i--)o[h-i]=t[i][0],s[h-i]=r[i][0];return l.push({x:o,y:s,bicubic:c}),l}});var vHe=ne((Ymr,dHe)=>{"use strict";var Kjt=Zt();dHe.exports=function(t,r,n){var a,i,o,s=[],l=[],u=t[0].length,c=t.length;function f(X,te){var se=0,ue,re=0;return X>0&&(ue=t[te][X-1])!==void 0&&(re++,se+=ue),X0&&(ue=t[te-1][X])!==void 0&&(re++,se+=ue),te0&&i0&&aT);return Kjt.log("Smoother converged to",p,"after",A,"iterations"),t}});var gHe=ne((Xmr,pHe)=>{"use strict";pHe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var xHe=ne((Zmr,yHe)=>{"use strict";var mHe=.5;yHe.exports=function(t,r,n,a){var i=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(i*i+o*o,mHe/2),c=Math.pow(s*s+l*l,mHe/2),f=(c*c*i-u*u*s)*a,h=(c*c*o-u*u*l)*a,v=c*(u+c)*3,d=u*(u+c)*3;return[[r[0]+(v&&f/v),r[1]+(v&&h/v)],[r[0]-(d&&f/d),r[1]-(d&&h/d)]]}});var _He=ne(($mr,bHe)=>{"use strict";var vX=xHe(),WF=Zt().ensureArray;function Nw(e,t,r){var n=-.5*r[0]+1.5*t[0],a=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*a+e[1])/3]}bHe.exports=function(t,r,n,a,i,o){var s,l,u,c,f,h,v,d,m,x,g=n[0].length,E=n.length,M=i?3*g-2:g,w=o?3*E-2:E;for(t=WF(t,w),r=WF(r,w),u=0;u{"use strict";wHe.exports=function(e,t,r,n,a){var i=t-2,o=r-2;return n&&a?function(s,l,u){s||(s=[]);var c,f,h,v,d,m,x=Math.max(0,Math.min(Math.floor(l),i)),g=Math.max(0,Math.min(Math.floor(u),o)),E=Math.max(0,Math.min(1,l-x)),M=Math.max(0,Math.min(1,u-g));x*=3,g*=3;var w=E*E,k=w*E,y=1-E,S=y*y,T=S*y,p=M*M,C=p*M,A=1-M,P=A*A,D=P*A;for(m=0;m{"use strict";AHe.exports=function(e,t,r){return t&&r?function(n,a,i,o,s){n||(n=[]);var l,u,c,f,h,v;a*=3,i*=3;var d=o*o,m=1-o,x=m*m,g=m*o*2,E=-3*x,M=3*(x-g),w=3*(g-d),k=3*d,y=s*s,S=y*s,T=1-s,p=T*T,C=p*T;for(v=0;v{"use strict";SHe.exports=function(e,t,r){return t&&r?function(n,a,i,o,s){n||(n=[]);var l,u,c,f,h,v;a*=3,i*=3;var d=o*o,m=d*o,x=1-o,g=x*x,E=g*x,M=s*s,w=1-s,k=w*w,y=w*s*2,S=-3*k,T=3*(k-y),p=3*(y-M),C=3*M;for(v=0;v{"use strict";var kHe=gHe(),CHe=HM().findBin,Jjt=_He(),Qjt=THe(),eWt=MHe(),tWt=EHe();LHe.exports=function(t){var r=t._a,n=t._b,a=r.length,i=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[a-1],c=n[0],f=n[i-1],h=r[r.length-1]-r[0],v=n[n.length-1]-n[0],d=h*kHe.RELATIVE_CULL_TOLERANCE,m=v*kHe.RELATIVE_CULL_TOLERANCE;l-=d,u+=d,c-=m,f+=m,t.isVisible=function(x,g){return x>l&&xc&&gu||gf},t.setScale=function(){var x=t._x,g=t._y,E=Jjt(t._xctrl,t._yctrl,x,g,o.smoothing,s.smoothing);t._xctrl=E[0],t._yctrl=E[1],t.evalxy=Qjt([t._xctrl,t._yctrl],a,i,o.smoothing,s.smoothing),t.dxydi=eWt([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=tWt([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(x){var g=Math.max(0,Math.floor(x[0]),a-2),E=x[0]-g;return(1-E)*r[g]+E*r[g+1]},t.j2b=function(x){var g=Math.max(0,Math.floor(x[1]),a-2),E=x[1]-g;return(1-E)*n[g]+E*n[g+1]},t.ij2ab=function(x){return[t.i2a(x[0]),t.j2b(x[1])]},t.a2i=function(x){var g=Math.max(0,Math.min(CHe(x,r),a-2)),E=r[g],M=r[g+1];return Math.max(0,Math.min(a-1,g+(x-E)/(M-E)))},t.b2j=function(x){var g=Math.max(0,Math.min(CHe(x,n),i-2)),E=n[g],M=n[g+1];return Math.max(0,Math.min(i-1,g+(x-E)/(M-E)))},t.ab2ij=function(x){return[t.a2i(x[0]),t.b2j(x[1])]},t.i2c=function(x,g){return t.evalxy([],x,g)},t.ab2xy=function(x,g,E){if(!E&&(xr[a-1]|gn[i-1]))return[!1,!1];var M=t.a2i(x),w=t.b2j(g),k=t.evalxy([],M,w);if(E){var y=0,S=0,T=[],p,C,A,P;xr[a-1]?(p=a-2,C=1,y=(x-r[a-1])/(r[a-1]-r[a-2])):(p=Math.max(0,Math.min(a-2,Math.floor(M))),C=M-p),gn[i-1]?(A=i-2,P=1,S=(g-n[i-1])/(n[i-1]-n[i-2])):(A=Math.max(0,Math.min(i-2,Math.floor(w))),P=w-A),y&&(t.dxydi(T,p,A,C,P),k[0]+=T[0]*y,k[1]+=T[1]*y),S&&(t.dxydj(T,p,A,C,P),k[0]+=T[0]*S,k[1]+=T[1]*S)}return k},t.c2p=function(x,g,E){return[g.c2p(x[0]),E.c2p(x[1])]},t.p2x=function(x,g,E){return[g.p2c(x[0]),E.p2c(x[1])]},t.dadi=function(x){var g=Math.max(0,Math.min(r.length-2,x));return r[g+1]-r[g]},t.dbdj=function(x){var g=Math.max(0,Math.min(n.length-2,x));return n[g+1]-n[g]},t.dxyda=function(x,g,E,M){var w=t.dxydi(null,x,g,E,M),k=t.dadi(x,E);return[w[0]/k,w[1]/k]},t.dxydb=function(x,g,E,M){var w=t.dxydj(null,x,g,E,M),k=t.dbdj(g,M);return[w[0]/k,w[1]/k]},t.dxyda_rough=function(x,g,E){var M=h*(E||.1),w=t.ab2xy(x+M,g,!0),k=t.ab2xy(x-M,g,!0);return[(w[0]-k[0])*.5/M,(w[1]-k[1])*.5/M]},t.dxydb_rough=function(x,g,E){var M=v*(E||.1),w=t.ab2xy(x,g+M,!0),k=t.ab2xy(x,g-M,!0);return[(w[0]-k[0])*.5/M,(w[1]-k[1])*.5/M]},t.dpdx=function(x){return x._m},t.dpdy=function(x){return x._m}}});var OHe=ne((tyr,BHe)=>{"use strict";var YF=ri(),PHe=Zt().isArray1D,rWt=eHe(),DHe=aHe(),RHe=oHe(),IHe=cHe(),nWt=hHe(),zHe=gC(),qHe=vHe(),aWt=vC(),iWt=FHe();BHe.exports=function(t,r){var n=YF.getFromId(t,r.xaxis),a=YF.getFromId(t,r.yaxis),i=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&PHe(s)&&u.push("x"),l&&PHe(l)&&u.push("y"),u.length&&aWt(r,i,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var h={};if(r._cheater){var v=i.cheatertype==="index"?c.length:c,d=o.cheatertype==="index"?f.length:f;s=rWt(v,d,r.cheaterslope)}r._x=s=zHe(s),r._y=l=zHe(l),qHe(s,c,f),qHe(l,c,f),iWt(r),r.setScale();var m=DHe(s),x=DHe(l),g=.5*(m[1]-m[0]),E=.5*(m[1]+m[0]),M=.5*(x[1]-x[0]),w=.5*(x[1]+x[0]),k=1.3;return m=[E-g*k,E+g*k],x=[w-M*k,w+M*k],r._extremes[n._id]=YF.findExtremes(n,m,{padded:!0}),r._extremes[a._id]=YF.findExtremes(a,x,{padded:!0}),RHe(r,"a","b"),RHe(r,"b","a"),IHe(r,i),IHe(r,o),h.clipsegments=nWt(r._xctrl,r._yctrl,i,o),h.x=s,h.y=l,h.a=c,h.b=f,[h]}});var UHe=ne((ryr,NHe)=>{"use strict";NHe.exports={attributes:NF(),supplyDefaults:NGe(),plot:JGe(),calc:OHe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Ku(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var GHe=ne((nyr,VHe)=>{"use strict";VHe.exports=UHe()});var pX=ne((ayr,YHe)=>{"use strict";var oWt=zp(),Cv=Tu(),sWt=os(),{hovertemplateAttrs:lWt,texttemplateAttrs:uWt,templatefallbackAttrs:HHe}=rs(),jHe=Ys(),yy=ci().extendFlat,w0=Cv.marker,Uw=Cv.line,WHe=w0.line;YHe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:yy({},Cv.mode,{dflt:"markers"}),text:yy({},Cv.text,{}),texttemplate:uWt({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:HHe({editType:"plot"}),hovertext:yy({},Cv.hovertext,{}),line:{color:Uw.color,width:Uw.width,dash:Uw.dash,backoff:Uw.backoff,shape:yy({},Uw.shape,{values:["linear","spline"]}),smoothing:Uw.smoothing,editType:"calc"},connectgaps:Cv.connectgaps,fill:yy({},Cv.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:oWt(),marker:yy({symbol:w0.symbol,opacity:w0.opacity,maxdisplayed:w0.maxdisplayed,angle:w0.angle,angleref:w0.angleref,standoff:w0.standoff,size:w0.size,sizeref:w0.sizeref,sizemin:w0.sizemin,sizemode:w0.sizemode,line:yy({width:WHe.width,dash:WHe.dash,editType:"calc"},jHe("marker.line")),gradient:w0.gradient,editType:"calc"},jHe("marker")),textfont:Cv.textfont,textposition:Cv.textposition,selected:Cv.selected,unselected:Cv.unselected,hoverinfo:yy({},sWt.hoverinfo,{flags:["a","b","text","name"]}),hoveron:Cv.hoveron,hovertemplate:lWt(),hovertemplatefallback:HHe(),zorder:Cv.zorder}});var KHe=ne((iyr,$He)=>{"use strict";var XHe=Zt(),cWt=Ip(),Vw=ml(),fWt=Kv(),hWt=V0(),ZHe=u_(),dWt=G0(),vWt=Bp(),pWt=pX();$He.exports=function(t,r,n,a){function i(h,v){return XHe.coerce(t,r,pWt,h,v)}i("carpet"),r.xaxis="x",r.yaxis="y";var o=i("a"),s=i("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,i("text"),i("texttemplate"),i("texttemplatefallback"),i("hovertext");var u=l{"use strict";JHe.exports=function(t,r){var n={},a=r._carpet,i=a.ab2ij([t.a,t.b]),o=Math.floor(i[0]),s=i[0]-o,l=Math.floor(i[1]),u=i[1]-l,c=a.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var XF=ne((syr,eje)=>{"use strict";eje.exports=function(e,t){for(var r=e._fullData.length,n,a=0;a{"use strict";var tje=mi(),gWt=Jv(),mWt=Op(),yWt=mv(),xWt=Qv().calcMarkerSize,bWt=XF();rje.exports=function(t,r){var n=r._carpetTrace=bWt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){var a;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var i=r._length,o=new Array(i),s,l,u=!1;for(a=0;a{"use strict";var _Wt=p_(),aje=ri(),wWt=li();ije.exports=function(t,r,n,a){var i,o,s,l=n[0][0].carpet,u=aje.getFromId(t,l.xaxis||"x"),c=aje.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(i=0;i{"use strict";var TWt=x_(),AWt=Zt().fillText;sje.exports=function(t,r,n,a){var i=TWt(t,r,n,a);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),i}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var h=o.trace,v=h._carpet,d=h._module.formatLabels(f,h);o.yLabel=d.yLabel,delete o.text;var m=[];function x(M,w){var k;M.labelprefix&&M.labelprefix.length>0?k=M.labelprefix.replace(/ = $/,""):k=M._hovertitle,m.push(k+": "+w.toFixed(3)+M.labelsuffix)}if(!h.hovertemplate){var g=f.hi||h.hoverinfo,E=g.split("+");E.indexOf("all")!==-1&&(E=["a","b","text"]),E.indexOf("a")!==-1&&x(v.aaxis,f.a),E.indexOf("b")!==-1&&x(v.baxis,f.b),m.push("y: "+o.yLabel),E.indexOf("text")!==-1&&AWt(f,h,m),o.extraText=m.join("
")}return i}});var cje=ne((fyr,uje)=>{"use strict";uje.exports=function(t,r,n,a,i){var o=a[i];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var hje=ne((hyr,fje)=>{"use strict";fje.exports={attributes:pX(),supplyDefaults:KHe(),colorbar:bh(),formatLabels:QHe(),calc:nje(),plot:oje(),style:Md().style,styleOnSelect:Md().styleOnSelect,hoverPoints:lje(),selectPoints:_x(),eventData:cje(),moduleType:"trace",name:"scattercarpet",basePlotModule:Ku(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var vje=ne((dyr,dje)=>{"use strict";dje.exports=hje()});var gX=ne((vyr,pje)=>{"use strict";var T0=q_(),yg=xT(),MWt=Ys(),SWt=ci().extendFlat,p1=yg.contours;pje.exports=SWt({carpet:{valType:"string",editType:"calc"},z:T0.z,a:T0.x,a0:T0.x0,da:T0.dx,b:T0.y,b0:T0.y0,db:T0.dy,text:T0.text,hovertext:T0.hovertext,transpose:T0.transpose,atype:T0.xtype,btype:T0.ytype,fillcolor:yg.fillcolor,autocontour:yg.autocontour,ncontours:yg.ncontours,contours:{type:p1.type,start:p1.start,end:p1.end,size:p1.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:p1.showlines,showlabels:p1.showlabels,labelfont:p1.labelfont,labelformat:p1.labelformat,operation:p1.operation,value:p1.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:yg.line.color,width:yg.line.width,dash:yg.line.dash,smoothing:yg.line.smoothing,editType:"plot"},zorder:yg.zorder},MWt("",{cLetter:"z",autoColorDflt:!1}))});var mX=ne((pyr,yje)=>{"use strict";var gje=Zt(),EWt=fC(),mje=gX(),kWt=kO(),CWt=IC(),LWt=zC();yje.exports=function(t,r,n,a){function i(u,c){return gje.coerce(t,r,mje,u,c)}function o(u){return gje.coerce2(t,r,mje,u)}if(i("carpet"),t.a&&t.b){var s=EWt(t,r,i,a,"a","b");if(!s){r.visible=!1;return}i("text");var l=i("contours.type")==="constraint";l?kWt(t,r,i,a,n,{hasHover:!1}):(CWt(t,r,i,o),LWt(t,r,i,a,{hasHover:!1}))}else r._defaultColor=n,r._length=null;i("zorder")}});var wje=ne((gyr,_je)=>{"use strict";var FWt=qh(),xje=Zt(),PWt=vC(),DWt=gC(),RWt=mC(),IWt=yC(),bje=KB(),zWt=mX(),qWt=XF(),BWt=gO();_je.exports=function(t,r){var n=r._carpetTrace=qWt(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){if(!r.a||!r.b){var a=t.data[n.index],i=t.data[r.index];i.a||(i.a=a.a),i.b||(i.b=a.b),zWt(i,r,r._defaultColor,t._fullLayout)}var o=OWt(t,r);return BWt(r,r._z),o}};function OWt(e,t){var r=t._carpetTrace,n=r.aaxis,a=r.baxis,i,o,s,l,u,c,f;n._minDtick=0,a._minDtick=0,xje.isArray1D(t.z)&&PWt(t,n,a,"a","b",["z"]),i=t._a=t._a||t.a,l=t._b=t._b||t.b,i=i?n.makeCalcdata(t,"_a"):[],l=l?a.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=DWt(t._z||t.z,t.transpose),t._emptypoints=IWt(f),RWt(f,t._emptypoints);var h=xje.maxRowLength(f),v=t.xtype==="scaled"?"":i,d=bje(t,v,o,s,h,n),m=t.ytype==="scaled"?"":l,x=bje(t,m,u,c,f.length,a),g={a:d,b:x,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&FWt(e,t,{vals:f,containerStr:"",cLetter:"z"}),[g]}});var Aje=ne((myr,Tje)=>{"use strict";var NWt=Zt().isArrayOrTypedArray;Tje.exports=function(e,t,r,n){var a,i,o,s,l,u,c,f,h,v,d,m,x,g=NWt(r)?"a":"b",E=g==="a"?e.aaxis:e.baxis,M=E.smoothing,w=g==="a"?e.a2i:e.b2j,k=g==="a"?r:n,y=g==="a"?n:r,S=g==="a"?t.a.length:t.b.length,T=g==="a"?t.b.length:t.a.length,p=Math.floor(g==="a"?e.b2j(y):e.a2i(y)),C=g==="a"?function(te){return e.evalxy([],te,p)}:function(te){return e.evalxy([],p,te)};M&&(o=Math.max(0,Math.min(T-2,p)),s=p-o,i=g==="a"?function(te,se){return e.dxydi([],te,o,se,s)}:function(te,se){return e.dxydj([],o,te,s,se)});var A=w(k[0]),P=w(k[1]),D=A0?Math.floor:Math.ceil,U=D>0?Math.ceil:Math.floor,O=D>0?Math.min:Math.max,R=D>0?Math.max:Math.min,B=q(A+z),Y=U(P-z);c=C(A);var X=[[c]];for(a=B;a*D{"use strict";var $F=Ea(),KF=fX(),Cje=hX(),Y6=li(),xg=Zt(),UWt=yO(),VWt=xO(),U2=OC(),ZF=_T(),GWt=TO(),HWt=wO(),jWt=AO(),WWt=XF(),Mje=Aje();Lje.exports=function(t,r,n,a){var i=r.xaxis,o=r.yaxis;xg.makeTraceGroups(a,n,"contour").each(function(s){var l=$F.select(this),u=s[0],c=u.trace,f=c._carpetTrace=WWt(t,c),h=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var v=u.a,d=u.b,m=c.contours,x=HWt(m,r,u),g=m.type==="constraint",E=m._operation,M=g?E==="="?"lines":"fill":m.coloring;function w(q){var U=f.ab2xy(q[0],q[1],!0);return[i.c2p(U[0]),o.c2p(U[1])]}var k=[[v[0],d[d.length-1]],[v[v.length-1],d[d.length-1]],[v[v.length-1],d[0]],[v[0],d[0]]];UWt(x);var y=(v[v.length-1]-v[0])*1e-8,S=(d[d.length-1]-d[0])*1e-8;VWt(x,y,S);var T=x;m.type==="constraint"&&(T=GWt(x,E)),YWt(x,w);var p,C,A,P,D=[];for(P=h.clipsegments.length-1;P>=0;P--)p=h.clipsegments[P],C=KF([],p.x,i.c2p),A=KF([],p.y,o.c2p),C.reverse(),A.reverse(),D.push(Cje(C,A,p.bicubic));var z="M"+D.join("L")+"Z";$Wt(l,h.clipsegments,i,o,g,M),KWt(c,l,i,o,T,k,w,f,h,M,z),XWt(l,x,t,u,m,r,f),Y6.setClipUrl(l,f._clipPathId,t)})};function YWt(e,t){var r,n,a,i,o,s,l,u,c;for(r=0;rx&&(n.max=x),n.len=n.max-n.min}function Sje(e,t,r){var n=e.getPointAtLength(t),a=e.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 Eje(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function kje(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function $Wt(e,t,r,n,a,i){var o,s,l,u,c=xg.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(i==="fill"&&!a?[0]:[]);f.enter().append("path"),f.exit().remove();var h=[];for(u=0;u=0&&(v=C,m=x):Math.abs(h[1]-v[1])=0&&(v=C,m=x):xg.log("endpt to newendpt is not vert. or horz.",h,v,C)}if(m>=0)break;u+=T(h,v),h=v}if(m===t.edgepaths.length){xg.log("unclosed perimeter path");break}l=m,f=c.indexOf(l)===-1,f&&(l=c[0],u+=T(h,v)+"Z",h=null)}for(l=0;l{"use strict";Pje.exports={attributes:gX(),supplyDefaults:mX(),colorbar:VC(),calc:wje(),plot:Fje(),style:UC(),moduleType:"trace",name:"contourcarpet",basePlotModule:Ku(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var Ije=ne((byr,Rje)=>{"use strict";Rje.exports=Dje()});var QF=ne((_yr,Nje)=>{"use strict";var JF=Zt().extendFlat,X6=Tu(),zje=Wl().axisHoverFormat,{hovertemplateAttrs:QWt,templatefallbackAttrs:eYt}=rs(),Bje=xf().dash,tYt=db(),Oje=Q_(),rYt=Oje.INCREASING.COLOR,nYt=Oje.DECREASING.COLOR,yX=X6.line;function qje(e){return{line:{color:JF({},yX.color,{dflt:e}),width:yX.width,dash:Bje,editType:"style"},editType:"style"}}Nje.exports={xperiod:X6.xperiod,xperiod0:X6.xperiod0,xperiodalignment:X6.xperiodalignment,xhoverformat:zje("x"),yhoverformat:zje("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:JF({},yX.width,{}),dash:JF({},Bje,{}),editType:"style"},increasing:qje(rYt),decreasing:qje(nYt),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:QWt({},{keys:["open","high","low","close"]}),hovertemplatefallback:eYt(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:JF({},tYt.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:X6.zorder}});var xX=ne((wyr,Uje)=>{"use strict";var aYt=Fa(),iYt=Zt();Uje.exports=function(t,r,n,a){var i=n("x"),o=n("open"),s=n("high"),l=n("low"),u=n("close");n("hoverlabel.split");var c=aYt.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],a),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return i&&(f=Math.min(f,iYt.minRowLength(i))),r._length=f,f}}});var Hje=ne((Tyr,Gje)=>{"use strict";var oYt=Zt(),sYt=xX(),lYt=U0(),uYt=QF();Gje.exports=function(t,r,n,a){function i(s,l){return oYt.coerce(t,r,uYt,s,l)}var o=sYt(t,r,i,a);if(!o){r.visible=!1;return}lYt(t,r,a,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),i("line.dash"),Vje(t,r,i,"increasing"),Vje(t,r,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("tickwidth"),a._requestRangeslider[r.xaxis]=!0,i("zorder")};function Vje(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var bX=ne((Ayr,Wje)=>{"use strict";var Gw=Zt(),eP=Gw._,tP=ri(),cYt=H0(),Z6=uo().BADNUM;function fYt(e,t){var r=tP.getFromId(e,t.xaxis),n=tP.getFromId(e,t.yaxis),a=dYt(e,r,t),i=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=jje(e,t,o,s,n,hYt);return t._extremes[r._id]=tP.findExtremes(r,s,{vpad:i/2}),l.length?(Gw.extendFlat(l[0].t,{wHover:i/2,tickLen:a}),l):[{t:{empty:!0}}]}function hYt(e,t,r,n){return{o:e,h:t,l:r,c:n}}function jje(e,t,r,n,a,i){for(var o=a.makeCalcdata(t,"open"),s=a.makeCalcdata(t,"high"),l=a.makeCalcdata(t,"low"),u=a.makeCalcdata(t,"close"),c=Gw.isArrayOrTypedArray(t.text),f=Gw.isArrayOrTypedArray(t.hovertext),h=!0,v=null,d=!!t.xperiodalignment,m=[],x=0;xv):h=k>E,v=k;var y=i(E,M,w,k);y.pos=g,y.yc=(E+k)/2,y.i=x,y.dir=h?"increasing":"decreasing",y.x=y.pos,y.y=[w,M],d&&(y.orig_p=r[x]),c&&(y.tx=t.text[x]),f&&(y.htx=t.hovertext[x]),m.push(y)}else m.push({pos:g,empty:!0})}return t._extremes[a._id]=tP.findExtremes(a,Gw.concat(l,s),{padded:!0}),m.length&&(m[0].t={labels:{open:eP(e,"open:")+" ",high:eP(e,"high:")+" ",low:eP(e,"low:")+" ",close:eP(e,"close:")+" "}}),m}function dYt(e,t,r){var n=r._minDiff;if(!n){var a=e._fullData,i=[];n=1/0;var o;for(o=0;o{"use strict";var vYt=Ea(),Yje=Zt();Xje.exports=function(t,r,n,a){var i=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;Yje.makeTraceGroups(a,n,"trace ohlc").each(function(l){var u=vYt.select(this),c=l[0],f=c.t,h=c.trace;if(h.visible!==!0||f.empty){u.remove();return}var v=f.tickLen,d=u.selectAll("path").data(Yje.identity);d.enter().append("path"),d.exit().remove(),d.attr("d",function(m){if(m.empty)return"M0,0Z";var x=o.c2p(m.pos-v,!0),g=o.c2p(m.pos+v,!0),E=s?(x+g)/2:o.c2p(m.pos,!0),M=i.c2p(m.o,!0),w=i.c2p(m.h,!0),k=i.c2p(m.l,!0),y=i.c2p(m.c,!0);return"M"+x+","+M+"H"+E+"M"+E+","+w+"V"+k+"M"+g+","+y+"H"+E})})}});var Kje=ne((Syr,$je)=>{"use strict";var _X=Ea(),pYt=li(),gYt=_a();$je.exports=function(t,r,n){var a=n||_X.select(t).selectAll("g.ohlclayer").selectAll("g.trace");a.style("opacity",function(i){return i[0].trace.opacity}),a.each(function(i){var o=i[0].trace;_X.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;_X.select(this).style("fill","none").call(gYt.stroke,l.color).call(pYt.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var TX=ne((Eyr,rWe)=>{"use strict";var wX=ri(),mYt=Zt(),rP=cu(),yYt=_a(),xYt=Zt().fillText,Jje=Q_(),bYt={increasing:Jje.INCREASING.SYMBOL,decreasing:Jje.DECREASING.SYMBOL};function _Yt(e,t,r,n){var a=e.cd,i=a[0].trace;return i.hoverlabel.split?eWe(e,t,r,n):tWe(e,t,r,n)}function Qje(e,t,r,n){var a=e.cd,i=e.xa,o=a[0].trace,s=a[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,h,v=s.bPos||0,d=function(C){return C.pos+v-t},m=s.bdPos||s.tickLen,x=s.wHover,g=Math.min(1,m/Math.abs(i.r2c(i.range[1])-i.r2c(i.range[0])));f=e.maxHoverDistance-g,h=e.maxSpikeDistance-g;function E(C){var A=d(C);return rP.inbox(A-x,A+x,f)}function M(C){var A=C[u],P=C[c];return A===P||rP.inbox(A-r,P-r,f)}function w(C){return(E(C)+M(C))/2}var k=rP.getDistanceFunction(n,E,M,w);if(rP.getClosest(a,k,e),e.index===!1)return null;var y=a[e.index];if(y.empty)return null;var S=y.dir,T=o[S],p=T.line.color;return yYt.opacity(p)&&T.line.width?e.color=p:e.color=T.fillcolor,e.x0=i.c2p(y.pos+v-m,!0),e.x1=i.c2p(y.pos+v+m,!0),e.xLabelVal=y.orig_p!==void 0?y.orig_p:y.pos,e.spikeDistance=w(y)*h/f,e.xSpike=i.c2p(y.pos,!0),e}function eWe(e,t,r,n){var a=e.cd,i=e.ya,o=a[0].trace,s=a[0].t,l=[],u=Qje(e,t,r,n);if(!u)return[];var c=a[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var h=["high","open","close","low"],v={},d=0;d"+s.labels[m]+wX.hoverLabelText(i,x,o.yhoverformat)):(E=mYt.extendFlat({},u),E.y0=E.y1=g,E.yLabelVal=x,E.yLabel=s.labels[m]+wX.hoverLabelText(i,x,o.yhoverformat),E.name="",l.push(E),v[x]=E)}return l}function tWe(e,t,r,n){var a=e.cd,i=e.ya,o=a[0].trace,s=a[0].t,l=Qje(e,t,r,n);if(!l)return[];var u=l.index,c=a[u],f=l.index=c.i,h=c.dir;function v(w){return s.labels[w]+wX.hoverLabelText(i,o[w][f],o.yhoverformat)}var d=c.hi||o.hoverinfo||"",m=d.split("+"),x=d==="all",g=x||m.indexOf("y")!==-1,E=x||m.indexOf("text")!==-1,M=g?[v("open"),v("high"),v("low"),v("close")+" "+bYt[h]]:[];return E&&xYt(c,o,M),l.extraText=M.join("
"),l.y0=l.y1=i.c2p(c.yc,!0),[l]}rWe.exports={hoverPoints:_Yt,hoverSplit:eWe,hoverOnPoints:tWe}});var AX=ne((kyr,nWe)=>{"use strict";nWe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";aWe.exports={moduleType:"trace",name:"ohlc",basePlotModule:Ku(),categories:["cartesian","svg","showLegend"],meta:{},attributes:QF(),supplyDefaults:Hje(),calc:bX().calc,plot:Zje(),style:Kje(),hoverPoints:TX().hoverPoints,selectPoints:AX()}});var sWe=ne((Lyr,oWe)=>{"use strict";oWe.exports=iWe()});var SX=ne((Fyr,cWe)=>{"use strict";var MX=Zt().extendFlat,lWe=Wl().axisHoverFormat,Pd=QF(),Hw=cT();function uWe(e){return{line:{color:MX({},Hw.line.color,{dflt:e}),width:Hw.line.width,editType:"style"},fillcolor:Hw.fillcolor,editType:"style"}}cWe.exports={xperiod:Pd.xperiod,xperiod0:Pd.xperiod0,xperiodalignment:Pd.xperiodalignment,xhoverformat:lWe("x"),yhoverformat:lWe("y"),x:Pd.x,open:Pd.open,high:Pd.high,low:Pd.low,close:Pd.close,line:{width:MX({},Hw.line.width,{}),editType:"style"},increasing:uWe(Pd.increasing.line.color.dflt),decreasing:uWe(Pd.decreasing.line.color.dflt),text:Pd.text,hovertext:Pd.hovertext,hovertemplate:Pd.hovertemplate,hovertemplatefallback:Pd.hovertemplatefallback,whiskerwidth:MX({},Hw.whiskerwidth,{dflt:0}),hoverlabel:Pd.hoverlabel,zorder:Hw.zorder}});var dWe=ne((Pyr,hWe)=>{"use strict";var wYt=Zt(),TYt=_a(),AYt=xX(),MYt=U0(),SYt=SX();hWe.exports=function(t,r,n,a){function i(s,l){return wYt.coerce(t,r,SYt,s,l)}var o=AYt(t,r,i,a);if(!o){r.visible=!1;return}MYt(t,r,a,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),fWe(t,r,i,"increasing"),fWe(t,r,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("whiskerwidth"),a._requestRangeslider[r.xaxis]=!0,i("zorder")};function fWe(e,t,r,n){var a=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",TYt.addOpacity(a,.5))}});var mWe=ne((Dyr,gWe)=>{"use strict";var vWe=Zt(),pWe=ri(),EYt=H0(),kYt=bX().calcCommon;gWe.exports=function(e,t){var r=e._fullLayout,n=pWe.getFromId(e,t.xaxis),a=pWe.getFromId(e,t.yaxis),i=n.makeCalcdata(t,"x"),o=EYt(t,n,"x",i).vals,s=kYt(e,t,i,o,a,CYt);return s.length?(vWe.extendFlat(s[0].t,{num:r._numBoxes,dPos:vWe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function CYt(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var xWe=ne((Ryr,yWe)=>{"use strict";yWe.exports={moduleType:"trace",name:"candlestick",basePlotModule:Ku(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:SX(),layoutAttributes:fT(),supplyLayoutDefaults:iC().supplyLayoutDefaults,crossTraceCalc:sC().crossTraceCalc,supplyDefaults:dWe(),calc:mWe(),plot:lC().plot,layerName:"boxlayer",style:uC().style,hoverPoints:TX().hoverPoints,selectPoints:AX()}});var _We=ne((Iyr,bWe)=>{"use strict";bWe.exports=xWe()});var kX=ne((zyr,wWe)=>{"use strict";var aP=Zt(),LYt=Tp(),nP=aP.deg2rad,EX=aP.rad2deg;wWe.exports=function(t,r,n){switch(LYt(t,n),t._id){case"x":case"radialaxis":FYt(t,r);break;case"angularaxis":RYt(t,r);break}};function FYt(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],a=e._rl[1],i=r.innerRadius,o=(r.radius-i)/(a-n),s=i/o,l=n>a?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function PYt(e,t){return t==="degrees"?nP(e):e}function DYt(e,t){return t==="degrees"?EX(e):e}function RYt(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,a=e.c2d;e.d2c=function(i,o){return PYt(n(i),o)},e.c2d=function(i,o){return a(DYt(i,o))}}e.makeCalcdata=function(i,o){var s=i[o],l=i._length,u,c,f=function(x){return e.d2c(x,i.thetaunit)};if(s)for(u=new Array(l),c=0;c{"use strict";TWe.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var sP=ne((Byr,kWe)=>{"use strict";var V2=Zt(),AWe=x4().tester,CX=V2.findIndexOfMin,SWe=V2.isAngleInsideSector,IYt=V2.angleDelta,MWe=V2.angleDist;function zYt(e,t,r,n,a){if(!SWe(t,n))return!1;var i,o;r[0]0?o:1/0},n=CX(t,r),a=V2.mod(n+1,t.length);return[t[n],t[a]]}function oP(e){return Math.abs(e)>1e-10?e:0}function LX(e,t,r){t=t||0,r=r||0;for(var n=e.length,a=new Array(n),i=0;i{"use strict";function CWe(e){return e<0?-1:e>0?1:0}function Ww(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function Yw(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function LWe(e,t){return t*e.radius}function HYt(e,t,r,n){var a=Yw(e,Ww([r,t])),i=a[0],o=a[1],s=Yw(e,Ww([n,t])),l=s[0],u=s[1];if(t===0)return["M"+i+","+o,"L"+l+","+u].join(" ");var c=LWe(e,1/Math.abs(t));return["M"+i+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function jYt(e,t,r,n){var a=LWe(e,1/(t+1)),i=Yw(e,Ww([t,r])),o=i[0],s=i[1],l=Yw(e,Ww([t,n])),u=l[0],c=l[1];if(CWe(r)!==CWe(n)){var f=Yw(e,Ww([t,0])),h=f[0],v=f[1];return["M"+o+","+s,"A"+a+","+a+" 0 0,"+(0{"use strict";var G2=Ea(),j2=Fa(),Ol=Zt(),g1=Ol.strRotate,Ef=Ol.strTranslate,fP=_a(),$6=li(),WYt=Sl(),Dd=ri(),YYt=Tp(),XYt=kX(),ZYt=I0().doAutoRange,bg=Vz(),cP=od(),PWe=cu(),$Yt=Qy(),KYt=ef().prepSelect,JYt=ef().selectOnClick,PX=ef().clearOutline,DWe=z0(),RWe=i4(),IWe=d4().redrawReglTraces,QYt=qc().MID_SHIFT,xy=iP(),_g=sP(),hP=FX(),lP=hP.smith,eXt=hP.reactanceArc,tXt=hP.resistanceArc,uP=hP.smithTransform,rXt=Ol._,zWe=Ol.mod,by=Ol.deg2rad,H2=Ol.rad2deg;function qWe(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,a="clip"+n._uid+t;this.clipIds.forTraces=a+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(i){return this.isSmith?0:i.hole},this.getSector=function(i){return this.isSmith?[0,360]:i.sector},this.getRadial=function(i){return this.isSmith?i.realaxis:i.radialaxis},this.getAngular=function(i){return this.isSmith?i.imaginaryaxis:i.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var Qf=qWe.prototype;NWe.exports=function(t,r,n){return new qWe(t,r,n)};Qf.plot=function(e,t){for(var r=this,n=t[r.id],a=!1,i=0;ix?(g=u,E=u*x,k=(c-E)/a.h/2,M=[s[0],s[1]],w=[l[0]+k,l[1]-k]):(g=c/x,E=c,k=(u-g)/a.w/2,M=[s[0]+k,s[1]-k],w=[l[0],l[1]]),r.xLength2=g,r.yLength2=E,r.xDomain2=M,r.yDomain2=w;var y=r.xOffset2=a.l+a.w*M[0],S=r.yOffset2=a.t+a.h*(1-w[1]),T=r.radius=g/v,p=r.innerRadius=r.getHole(t)*T,C=r.cx=y-T*h[0],A=r.cy=S+T*h[3],P=r.cxx=C-y,D=r.cyy=A-S,z=i.side,q;z==="counterclockwise"?(q=z,z="top"):z==="clockwise"&&(q=z,z="bottom"),r.radialAxis=r.mockAxis(e,t,i,{_id:"x",side:z,_trueSide:q,domain:[p/a.w,T/a.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:M}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:w});var U=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",U).attr("transform",Ef(P,D)),n.frontplot.attr("transform",Ef(y,S)).call($6.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",U).attr("transform",Ef(C,A)).call(fP.fill,t.bgcolor)};Qf.mockAxis=function(e,t,r,n){var a=Ol.extendFlat({},r,n);return XYt(a,t,e),a};Qf.mockCartesianAxis=function(e,t,r){var n=this,a=n.isSmith,i=r._id,o=Ol.extendFlat({type:"linear"},r);YYt(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[i],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=i==="x"&&!a?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};Qf.doAutoRange=function(e,t){var r=this,n=r.gd,a=r.radialAxis,i=r.getRadial(t);ZYt(n,a);var o=a.range;if(i.range=o.slice(),i._input.range=o.slice(),a._rl=[a.r2l(o[0],null,"gregorian"),a.r2l(o[1],null,"gregorian")],a.minallowed!==void 0){var s=a.r2l(a.minallowed);a._rl[0]>a._rl[1]?a._rl[1]=Math.max(a._rl[1],s):a._rl[0]=Math.max(a._rl[0],s)}if(a.maxallowed!==void 0){var l=a.r2l(a.maxallowed);a._rl[0]90&&c<=270&&(f.tickangle=180);var d=v?function(T){var p=uP(r,lP([T.x,0]));return Ef(p[0]-s,p[1]-l)}:function(T){return Ef(f.l2p(T.x)+o,0)},m=v?function(T){return tXt(r,T.x,-1/0,1/0)}:function(T){return r.pathArc(f.r2p(T.x)+o)},x=BWe(u);if(r.radialTickLayout!==x&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=x),h){f.setScale();var g=0,E=v?(f.tickvals||[]).filter(function(T){return T>=0}).map(function(T){return Dd.tickText(f,T,!0,!1)}):Dd.calcTicks(f),M=v?E:Dd.clipEnds(f,E),w=Dd.getTickSigns(f)[2];v&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(w=-w),f.ticks==="top"&&f.side==="top"&&(g=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(g=f.ticklen)),Dd.drawTicks(n,f,{vals:E,layer:a["radial-axis"],path:Dd.makeTickPath(f,0,w),transFn:d,crisp:!1}),Dd.drawGrid(n,f,{vals:M,layer:a["radial-grid"],path:m,transFn:Ol.noop,crisp:!1}),Dd.drawLabels(n,f,{vals:E,layer:a["radial-axis"],transFn:d,labelFns:Dd.makeLabelFns(f,g)})}var k=r.radialAxisAngle=r.vangles?H2(OWe(by(u.angle),r.vangles)):u.angle,y=Ef(s,l),S=y+g1(-k);K6(a["radial-axis"],h&&(u.showticklabels||u.ticks),{transform:S}),K6(a["radial-grid"],h&&u.showgrid,{transform:v?"":y}),K6(a["radial-line"].select("line"),h&&u.showline,{x1:v?-i:o,y1:0,x2:i,y2:0,transform:S}).attr("stroke-width",u.linewidth).call(fP.stroke,u.linecolor)};Qf.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,a=n.gd,i=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",c=0;if(l.title){var f=$6.bBox(n.layers["radial-axis"].node()).height,h=l.title.font.size,v=l.side;c=v==="top"?h:v==="counterclockwise"?-(f+h*.4):f+h*.8}var d=r!==void 0?r:n.radialAxisAngle,m=by(d),x=Math.cos(m),g=Math.sin(m),E=o+i/2*x+c*g,M=s-i/2*g+c*x;n.layers["radial-axis-title"]=$Yt.draw(a,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:rXt(a,"Click to enter radial axis title"),attributes:{x:E,y:M,"text-anchor":"middle"},transform:{rotate:-d}})}};Qf.updateAngularAxis=function(e,t){var r=this,n=r.gd,a=r.layers,i=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var h=f?function(p){var C=uP(r,lP([0,p.x]));return Math.atan2(C[0]-s,C[1]-l)-Math.PI/2}:function(p){return c.t2g(p.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=H2(c.tick0),c.dtick=H2(c.dtick));var v=function(p){return Ef(s+i*Math.cos(p),l-i*Math.sin(p))},d=f?function(p){var C=uP(r,lP([0,p.x]));return Ef(C[0],C[1])}:function(p){return v(h(p))},m=f?function(p){var C=uP(r,lP([0,p.x])),A=Math.atan2(C[0]-s,C[1]-l)-Math.PI/2;return Ef(C[0],C[1])+g1(-H2(A))}:function(p){var C=h(p);return v(C)+g1(-H2(C))},x=f?function(p){return eXt(r,p.x,0,1/0)}:function(p){var C=h(p),A=Math.cos(C),P=Math.sin(C);return"M"+[s+o*A,l-o*P]+"L"+[s+i*A,l-i*P]},g=Dd.makeLabelFns(c,0),E=g.labelStandoff,M={};M.xFn=function(p){var C=h(p);return Math.cos(C)*E},M.yFn=function(p){var C=h(p),A=Math.sin(C)>0?.2:1;return-Math.sin(C)*(E+p.fontSize*A)+Math.abs(Math.cos(C))*(p.fontSize*QYt)},M.anchorFn=function(p){var C=h(p),A=Math.cos(C);return Math.abs(A)<.1?"middle":A>0?"start":"end"},M.heightFn=function(p,C,A){var P=h(p);return-.5*(1+Math.sin(P))*A};var w=BWe(u);r.angularTickLayout!==w&&(a["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=w);var k=f?[1/0].concat(c.tickvals||[]).map(function(p){return Dd.tickText(c,p,!0,!1)}):Dd.calcTicks(c);f&&(k[0].text="\u221E",k[0].fontSize*=1.75);var y;if(t.gridshape==="linear"?(y=k.map(h),Ol.angleDelta(y[0],y[1])<0&&(y=y.slice().reverse())):y=null,r.vangles=y,c.type==="category"&&(k=k.filter(function(p){return Ol.isAngleInsideSector(h(p),r.sectorInRad)})),c.visible){var S=c.ticks==="inside"?-1:1,T=(c.linewidth||1)/2;Dd.drawTicks(n,c,{vals:k,layer:a["angular-axis"],path:"M"+S*T+",0h"+S*c.ticklen,transFn:m,crisp:!1}),Dd.drawGrid(n,c,{vals:k,layer:a["angular-grid"],path:x,transFn:Ol.noop,crisp:!1}),Dd.drawLabels(n,c,{vals:k,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:d,labelFns:M})}K6(a["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:Ef(s,l)}).attr("stroke-width",u.linewidth).call(fP.stroke,u.linecolor)};Qf.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};Qf.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,a=t.layers,i=e._zoomlayer,o=xy.MINZOOM,s=xy.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,h=t.cxx,v=t.cyy,d=t.sectorInRad,m=t.vangles,x=t.radialAxis,g=_g.clampTiny,E=_g.findXYatLength,M=_g.findEnclosingVertexAngles,w=xy.cornerHalfWidth,k=xy.cornerLen/2,y,S,T=bg.makeDragger(a,"path","maindrag",e.dragmode===!1?"none":"crosshair");G2.select(T).attr("d",t.pathSubplot()).attr("transform",Ef(c,f)),T.onmousemove=function(le){PWe.hover(n,le,t.id),n._fullLayout._lasthover=T,n._fullLayout._hoversubplot=t.id},T.onmouseout=function(le){n._dragging||cP.unhover(n,le)};var p={element:T,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},C,A,P,D,z,q,U,O,R;function B(le,ze){return Math.sqrt(le*le+ze*ze)}function Y(le,ze){return B(le-h,ze-v)}function X(le,ze){return Math.atan2(v-ze,le-h)}function te(le,ze){return[le*Math.cos(ze),le*Math.sin(-ze)]}function se(le,ze){if(le===0)return t.pathSector(2*w);var Xe=k/le,vt=ze-Xe,st=ze+Xe,Oe=Math.max(0,Math.min(le,l)),qe=Oe-w,mt=Oe+w;return"M"+te(qe,vt)+"A"+[qe,qe]+" 0,0,0 "+te(qe,st)+"L"+te(mt,st)+"A"+[mt,mt]+" 0,0,1 "+te(mt,vt)+"Z"}function ue(le,ze,Xe){if(le===0)return t.pathSector(2*w);var vt=te(le,ze),st=te(le,Xe),Oe=g((vt[0]+st[0])/2),qe=g((vt[1]+st[1])/2),mt,lt;if(Oe&&qe){var Ie=qe/Oe,de=-1/Ie,Ee=E(w,Ie,Oe,qe);mt=E(k,de,Ee[0][0],Ee[0][1]),lt=E(k,de,Ee[1][0],Ee[1][1])}else{var Ue,ge;qe?(Ue=k,ge=w):(Ue=w,ge=k),mt=[[Oe-Ue,qe-ge],[Oe+Ue,qe-ge]],lt=[[Oe-Ue,qe+ge],[Oe+Ue,qe+ge]]}return"M"+mt.join("L")+"L"+lt.reverse().join("L")+"Z"}function re(){P=null,D=null,z=t.pathSubplot(),q=!1;var le=n._fullLayout[t.id];U=fP.color(le.bgcolor).luminosity(),O=bg.makeZoombox(i,U,c,f,z),O.attr("fill-rule","evenodd"),R=bg.makeCorners(i,c,f),PX(n)}function j(le,ze){return ze=Math.max(Math.min(ze,l),u),leo?(le-1&&le===1&&JYt(ze,n,[t.xaxis],[t.yaxis],t.id,p),Xe.indexOf("event")>-1&&PWe.click(n,ze,t.id)}p.prepFn=function(le,ze,Xe){var vt=n._fullLayout.dragmode,st=T.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var Oe=n._fullLayout._invTransform;y=n._fullLayout._invScaleX,S=n._fullLayout._invScaleY;var qe=Ol.apply3DTransform(Oe)(ze-st.left,Xe-st.top);if(C=qe[0],A=qe[1],m){var mt=_g.findPolygonOffset(l,d[0],d[1],m);C+=h+mt[0],A+=v+mt[1]}switch(vt){case"zoom":p.clickFn=Pe,r||(m?p.moveFn=we:p.moveFn=ce,p.doneFn=he,re(le,ze,Xe));break;case"select":case"lasso":KYt(le,ze,Xe,p,vt);break}},cP.init(p)};Qf.updateRadialDrag=function(e,t,r){var n=this,a=n.gd,i=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=xy.radialDragBoxSize,h=f/2;if(!c.visible)return;var v=by(n.radialAxisAngle),d=c._rl,m=d[0],x=d[1],g=d[r],E=.75*(d[1]-d[0])/(1-n.getHole(t))/o,M,w,k;r?(M=l+(o+h)*Math.cos(v),w=u-(o+h)*Math.sin(v),k="radialdrag"):(M=l+(s-h)*Math.cos(v),w=u-(s-h)*Math.sin(v),k="radialdrag-inner");var y=bg.makeRectDragger(i,k,"crosshair",-h,-h,f,f),S={element:y,gd:a};e.dragmode===!1&&(S.dragmode=!1),K6(G2.select(y),c.visible&&s0!=(r?C>m:C=90||a>90&&i>=450?v=1:s<=0&&u<=0?v=0:v=Math.max(s,u),a<=180&&i>=180||a>180&&i>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),a<=270&&i>=270||a>270&&i>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),i>=360?h=1:o<=0&&l<=0?h=0:h=Math.max(o,l),[c,f,h,v]}function OWe(e,t){var r=function(a){return Ol.angleDist(e,a)},n=Ol.findIndexOfMin(t,r);return t[n]}function K6(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var RX=ne((Uyr,WWe)=>{"use strict";var aXt=Ic(),Ui=Wf(),iXt=zl().attributes,Lv=Zt().extendFlat,UWe=Il().overrideAll,VWe=UWe({color:Ui.color,showline:Lv({},Ui.showline,{dflt:!0}),linecolor:Ui.linecolor,linewidth:Ui.linewidth,showgrid:Lv({},Ui.showgrid,{dflt:!0}),gridcolor:Ui.gridcolor,gridwidth:Ui.gridwidth,griddash:Ui.griddash},"plot","from-root"),GWe=UWe({tickmode:Ui.minor.tickmode,nticks:Ui.nticks,tick0:Ui.tick0,dtick:Ui.dtick,tickvals:Ui.tickvals,ticktext:Ui.ticktext,ticks:Ui.ticks,ticklen:Ui.ticklen,tickwidth:Ui.tickwidth,tickcolor:Ui.tickcolor,ticklabelstep:Ui.ticklabelstep,showticklabels:Ui.showticklabels,labelalias:Ui.labelalias,minorloglabels:Ui.minorloglabels,showtickprefix:Ui.showtickprefix,tickprefix:Ui.tickprefix,showticksuffix:Ui.showticksuffix,ticksuffix:Ui.ticksuffix,showexponent:Ui.showexponent,exponentformat:Ui.exponentformat,minexponent:Ui.minexponent,separatethousands:Ui.separatethousands,tickfont:Ui.tickfont,tickangle:Ui.tickangle,tickformat:Ui.tickformat,tickformatstops:Ui.tickformatstops,layer:Ui.layer},"plot","from-root"),HWe={visible:Lv({},Ui.visible,{dflt:!0}),type:Lv({},Ui.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Ui.autotypenumbers,autorangeoptions:{minallowed:Ui.autorangeoptions.minallowed,maxallowed:Ui.autorangeoptions.maxallowed,clipmin:Ui.autorangeoptions.clipmin,clipmax:Ui.autorangeoptions.clipmax,include:Ui.autorangeoptions.include,editType:"plot"},autorange:Lv({},Ui.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:Lv({},Ui.minallowed,{editType:"plot"}),maxallowed:Lv({},Ui.maxallowed,{editType:"plot"}),range:Lv({},Ui.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Ui.categoryorder,categoryarray:Ui.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Ui.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:Lv({},Ui.title.text,{editType:"plot",dflt:""}),font:Lv({},Ui.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Ui.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};Lv(HWe,VWe,GWe);var jWe={visible:Lv({},Ui.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Ui.autotypenumbers,categoryorder:Ui.categoryorder,categoryarray:Ui.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:Ui.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};Lv(jWe,VWe,GWe);WWe.exports={domain:iXt({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:aXt.background},radialaxis:HWe,angularaxis:jWe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var $We=ne((Vyr,ZWe)=>{"use strict";var dP=Zt(),oXt=_a(),sXt=Bo(),lXt=qx(),uXt=mh().getSubplotData,cXt=Xy(),fXt=Nb(),hXt=Hg(),dXt=jg(),vXt=mk(),pXt=j4(),gXt=mI(),mXt=Wb(),XWe=RX(),yXt=kX(),vP=iP(),YWe=vP.axisNames;function xXt(e,t,r,n){var a=r("bgcolor");n.bgColor=oXt.combine(a,n.paper_bgcolor);var i=r("sector");r("hole");var o=uXt(n.fullData,vP.name,n.id),s=n.layoutOut,l;function u(O,R){return r(l+"."+O,R)}for(var c=0;c{"use strict";var _Xt=mh().getSubplotCalcData,wXt=Zt().counterRegex,TXt=DX(),JWe=iP(),QWe=JWe.attr,W2=JWe.name,KWe=wXt(W2),eYe={};eYe[QWe]={valType:"subplotid",dflt:W2,editType:"calc"};function AXt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[W2],a=0;a{"use strict";var{hovertemplateAttrs:SXt,texttemplateAttrs:EXt,templatefallbackAttrs:rYe}=rs(),gP=ci().extendFlat,kXt=zp(),Fv=Tu(),CXt=os(),Xw=Fv.line;nYe.exports={mode:Fv.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:Fv.text,texttemplate:EXt({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:rYe({editType:"plot"}),hovertext:Fv.hovertext,line:{color:Xw.color,width:Xw.width,dash:Xw.dash,backoff:Xw.backoff,shape:gP({},Xw.shape,{values:["linear","spline"]}),smoothing:Xw.smoothing,editType:"calc"},connectgaps:Fv.connectgaps,marker:Fv.marker,cliponaxis:gP({},Fv.cliponaxis,{dflt:!1}),textposition:Fv.textposition,textfont:Fv.textfont,fill:gP({},Fv.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:kXt(),hoverinfo:gP({},CXt.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:Fv.hoveron,hovertemplate:SXt(),hovertemplatefallback:rYe(),selected:Fv.selected,unselected:Fv.unselected}});var yP=ne((jyr,oYe)=>{"use strict";var mP=Zt(),Zw=ml(),LXt=Kv(),FXt=V0(),aYe=u_(),PXt=G0(),DXt=Bp(),RXt=Ip().PTS_LINESONLY,IXt=J6();function zXt(e,t,r,n){function a(s,l){return mP.coerce(e,t,IXt,s,l)}var i=iYe(e,t,n,a);if(!i){t.visible=!1;return}a("thetaunit"),a("mode",i{"use strict";var qXt=Zt(),sYe=ri();lYe.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot,o,s;i?(o=i.radialAxis,s=i.angularAxis):(i=n[r.subplot],o=i.radialaxis,s=i.angularaxis);var l=o.c2l(t.r);a.rLabel=sYe.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?qXt.rad2deg(t.theta):t.theta;return a.thetaLabel=sYe.tickText(s,u,!0).text,a}});var fYe=ne((Yyr,cYe)=>{"use strict";var uYe=mi(),BXt=uo().BADNUM,OXt=ri(),NXt=Jv(),UXt=Op(),VXt=mv(),GXt=Qv().calcMarkerSize;cYe.exports=function(t,r){for(var n=t._fullLayout,a=r.subplot,i=n[a].radialaxis,o=n[a].angularaxis,s=i.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var HXt=p_(),hYe=uo().BADNUM;dYe.exports=function(t,r,n){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var jXt=x_();function WXt(e,t,r,n){var a=jXt(e,t,r,n);if(!(!a||a[0].index===!1)){var i=a[0];if(i.index===void 0)return a;var o=e.subplot,s=i.cd[i.index],l=i.trace;if(o.isPtInside(s))return i.xLabelVal=void 0,i.yLabelVal=void 0,pYe(s,l,o,i),i.hovertemplate=l.hovertemplate,a}}function pYe(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="r",i._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,v){u.push(h._hovertitle+": "+v)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(a,n.rLabel),f.indexOf("theta")!==-1&&c(i,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}gYe.exports={hoverPoints:WXt,makeHoverPointText:pYe}});var yYe=ne(($yr,mYe)=>{"use strict";mYe.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:pP(),categories:["polar","symbols","showLegend","scatter-like"],attributes:J6(),supplyDefaults:yP().supplyDefaults,colorbar:bh(),formatLabels:xP(),calc:fYe(),plot:vYe(),style:Md().style,styleOnSelect:Md().styleOnSelect,hoverPoints:bP().hoverPoints,selectPoints:_x(),meta:{}}});var bYe=ne((Kyr,xYe)=>{"use strict";xYe.exports=yYe()});var IX=ne((exr,wYe)=>{"use strict";var _Ye=J6(),{cliponaxis:Jyr,hoveron:Qyr}=_Ye,YXt=C$(_Ye,["cliponaxis","hoveron"]),{connectgaps:XXt,line:{color:ZXt,dash:$Xt,width:KXt},fill:JXt,fillcolor:QXt,marker:eZt,textfont:tZt,textposition:rZt}=QA();wYe.exports=Cg(uv({},YXt),{connectgaps:XXt,fill:JXt,fillcolor:QXt,line:{color:ZXt,dash:$Xt,editType:"calc",width:KXt},marker:eZt,textfont:tZt,textposition:rZt})});var MYe=ne((rxr,AYe)=>{"use strict";var TYe=Zt(),zX=ml(),nZt=yP().handleRThetaDefaults,aZt=Kv(),iZt=V0(),oZt=G0(),sZt=Bp(),lZt=Ip().PTS_LINESONLY,uZt=IX();AYe.exports=function(t,r,n,a){function i(s,l){return TYe.coerce(t,r,uZt,s,l)}var o=nZt(t,r,a,i);if(!o){r.visible=!1;return}i("thetaunit"),i("mode",o{"use strict";var cZt=xP();SYe.exports=function(t,r,n){var a=t.i;return"r"in t||(t.r=r._r[a]),"theta"in t||(t.theta=r._theta[a]),cZt(t,r,n)}});var CYe=ne((axr,kYe)=>{"use strict";var fZt=Jv(),hZt=Qv().calcMarkerSize,dZt=k2(),vZt=ri(),pZt=Km().TOO_MANY_POINTS;kYe.exports=function(t,r){var n=t._fullLayout,a=r.subplot,i=n[a].radialaxis,o=n[a].angularaxis,s=r._r=i.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var gZt=Z7(),mZt=bP().makeHoverPointText;function yZt(e,t,r,n){var a=e.cd,i=a[0].t,o=i.r,s=i.theta,l=gZt.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],h=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,mZt(f,h,c,u),l}}LYe.exports={hoverPoints:yZt}});var DYe=ne((oxr,PYe)=>{"use strict";PYe.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:pP(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:IX(),supplyDefaults:MYe(),colorbar:bh(),formatLabels:EYe(),calc:CYe(),hoverPoints:FYe().hoverPoints,selectPoints:yj(),meta:{}}});var RYe=ne((sxr,qX)=>{"use strict";var xZt=J7(),bZt=mi(),_Zt=_W(),wZt=pj(),_P=k2(),wP=Zt(),TZt=Km().TOO_MANY_POINTS,AZt={};qX.exports=function(t,r,n){if(n.length){var a=r.radialAxis,i=r.angularAxis,o=wZt(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,h=c.r,v=c.theta,d=c.opts,m,x=h.slice(),g=v.slice();for(m=0;m=TZt&&(d.marker.cluster=c.tree),d.marker&&(d.markerSel.positions=d.markerUnsel.positions=d.marker.positions=E),d.line&&E.length>1&&wP.extendFlat(d.line,_P.linePositions(t,u,E)),d.text&&(wP.extendFlat(d.text,{positions:E},_P.textPosition(t,u,d.text,d.marker)),wP.extendFlat(d.textSel,{positions:E},_P.textPosition(t,u,d.text,d.markerSel)),wP.extendFlat(d.textUnsel,{positions:E},_P.textPosition(t,u,d.text,d.markerUnsel))),d.fill&&!o.fill2d&&(o.fill2d=!0),d.marker&&!o.scatter2d&&(o.scatter2d=!0),d.line&&!o.line2d&&(o.line2d=!0),d.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(d.line),o.fillOptions.push(d.fill),o.markerOptions.push(d.marker),o.markerSelectedOptions.push(d.markerSel),o.markerUnselectedOptions.push(d.markerUnsel),o.textOptions.push(d.text),o.textSelectedOptions.push(d.textSel),o.textUnselectedOptions.push(d.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=M,c.y=w,c.rawx=M,c.rawy=w,c.r=h,c.theta=v,c.positions=E,c._scene=o,c.index=o.count,o.count++}}),_Zt(t,r,n)}};qX.exports.reglPrecompiled=AZt});var qYe=ne((lxr,zYe)=>{"use strict";var IYe=DYe();IYe.plot=RYe();zYe.exports=IYe});var OYe=ne((uxr,BYe)=>{"use strict";BYe.exports=qYe()});var BX=ne((cxr,NYe)=>{"use strict";var{hovertemplateAttrs:MZt,templatefallbackAttrs:SZt}=rs(),$w=ci().extendFlat,_y=J6(),wy=Vp();NYe.exports={r:_y.r,theta:_y.theta,r0:_y.r0,dr:_y.dr,theta0:_y.theta0,dtheta:_y.dtheta,thetaunit:_y.thetaunit,base:$w({},wy.base,{}),offset:$w({},wy.offset,{}),width:$w({},wy.width,{}),text:$w({},wy.text,{}),hovertext:$w({},wy.hovertext,{}),marker:EZt(),hoverinfo:_y.hoverinfo,hovertemplate:MZt(),hovertemplatefallback:SZt(),selected:wy.selected,unselected:wy.unselected};function EZt(){var e=$w({},wy.marker);return delete e.cornerradius,e}});var OX=ne((fxr,UYe)=>{"use strict";UYe.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var HYe=ne((hxr,GYe)=>{"use strict";var VYe=Zt(),kZt=yP().handleRThetaDefaults,CZt=Qk(),LZt=BX();GYe.exports=function(t,r,n,a){function i(s,l){return VYe.coerce(t,r,LZt,s,l)}var o=kZt(t,r,a,i);if(!o){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),CZt(t,r,i,n,a),VYe.coerceSelectionMarkerOpacity(r,i)}});var WYe=ne((dxr,jYe)=>{"use strict";var FZt=Zt(),PZt=OX();jYe.exports=function(e,t,r){var n={},a;function i(l,u){return FZt.coerce(e[a]||{},t[a],PZt,l,u)}for(var o=0;o{"use strict";var YYe=yh().hasColorscale,XYe=qh(),DZt=Zt().isArrayOrTypedArray,RZt=oT(),IZt=bx().setGroupPositions,zZt=mv(),qZt=Fa().traceIs,BZt=Zt().extendFlat;function OZt(e,t){for(var r=e._fullLayout,n=t.subplot,a=r[n].radialaxis,i=r[n].angularaxis,o=a.makeCalcdata(t,"r"),s=i.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,h=0;h{"use strict";var $Ye=Ea(),TP=mi(),Kw=Zt(),UZt=li(),UX=sP();KYe.exports=function(t,r,n){var a=t._context.staticPlot,i=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=VZt(r),c=r.layers.frontplot.select("g.barlayer");Kw.makeTraceGroups(c,n,"trace bars").each(function(){var f=$Ye.select(this),h=Kw.ensureSingle(f,"g","points"),v=h.selectAll("g.point").data(Kw.identity);v.enter().append("g").style("vector-effect",a?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),v.exit().remove(),v.each(function(d){var m=$Ye.select(this),x=d.rp0=s.c2p(d.s0),g=d.rp1=s.c2p(d.s1),E=d.thetag0=l.c2g(d.p0),M=d.thetag1=l.c2g(d.p1),w;if(!TP(x)||!TP(g)||!TP(E)||!TP(M)||x===g||E===M)w="M0,0Z";else{var k=s.c2g(d.s1),y=(E+M)/2;d.ct=[i.c2p(k*Math.cos(y)),o.c2p(k*Math.sin(y))],w=u(x,g,E,M)}Kw.ensureSingle(m,"path").attr("d",w)}),UZt.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function VZt(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,a,i,o){var s,l;Kw.angleDelta(i,o)>0?(s=i,l=o):(s=o,l=i);var u=UX.findEnclosingVertexAngles(s,e.vangles)[0],c=UX.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return UX.pathPolygonAnnulus(n,a,s,l,f,t,r)}:function(n,a,i,o){return Kw.pathAnnulus(n,a,i,o,t,r)}}});var eXe=ne((gxr,QYe)=>{"use strict";var GZt=cu(),VX=Zt(),HZt=D_().getTraceColor,jZt=VX.fillText,WZt=bP().makeHoverPointText,YZt=sP().isPtInsidePolygon;QYe.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?YZt:VX.isPtInsideSector,f=t.maxHoverDistance,h=l._period||2*Math.PI,v=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),d=Math.atan2(n,r);s.range[0]>s.range[1]&&(d+=Math.PI);var m=function(M){return c(v,d,[M.rp0,M.rp1],[M.thetag0,M.thetag1],u)?f+Math.min(1,Math.abs(M.thetag1-M.thetag0)/h)-1+(M.rp1-v)/(M.rp1-M.rp0)-1:1/0};if(GZt.getClosest(a,m,t),t.index!==!1){var x=t.index,g=a[x];t.x0=t.x1=g.ct[0],t.y0=t.y1=g.ct[1];var E=VX.extendFlat({},g,{r:g.s,theta:g.p});return jZt(g,i,t),WZt(E,i,o,t),t.hovertemplate=i.hovertemplate,t.color=HZt(i,g),t.xLabelVal=t.yLabelVal=void 0,g.s<0&&(t.idealAlign="left"),[t]}}});var rXe=ne((mxr,tXe)=>{"use strict";tXe.exports={moduleType:"trace",name:"barpolar",basePlotModule:pP(),categories:["polar","bar","showLegend"],attributes:BX(),layoutAttributes:OX(),supplyDefaults:HYe(),supplyLayoutDefaults:WYe(),calc:NX().calc,crossTraceCalc:NX().crossTraceCalc,plot:JYe(),colorbar:bh(),formatLabels:xP(),style:n0().style,styleOnSelect:n0().styleOnSelect,hoverPoints:eXe(),selectPoints:R_(),meta:{}}});var aXe=ne((yxr,nXe)=>{"use strict";nXe.exports=rXe()});var GX=ne((xxr,iXe)=>{"use strict";iXe.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var HX=ne((bxr,uXe)=>{"use strict";var XZt=Ic(),Uu=Wf(),ZZt=zl().attributes,Ty=Zt().extendFlat,oXe=Il().overrideAll,sXe=oXe({color:Uu.color,showline:Ty({},Uu.showline,{dflt:!0}),linecolor:Uu.linecolor,linewidth:Uu.linewidth,showgrid:Ty({},Uu.showgrid,{dflt:!0}),gridcolor:Uu.gridcolor,gridwidth:Uu.gridwidth,griddash:Uu.griddash},"plot","from-root"),lXe=oXe({ticklen:Uu.ticklen,tickwidth:Ty({},Uu.tickwidth,{dflt:2}),tickcolor:Uu.tickcolor,showticklabels:Uu.showticklabels,labelalias:Uu.labelalias,showtickprefix:Uu.showtickprefix,tickprefix:Uu.tickprefix,showticksuffix:Uu.showticksuffix,ticksuffix:Uu.ticksuffix,tickfont:Uu.tickfont,tickformat:Uu.tickformat,hoverformat:Uu.hoverformat,layer:Uu.layer},"plot","from-root"),$Zt=Ty({visible:Ty({},Uu.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Ty({},Uu.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},sXe,lXe),KZt=Ty({visible:Ty({},Uu.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:Uu.ticks,editType:"calc"},sXe,lXe);uXe.exports={domain:ZZt({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:XZt.background},realaxis:$Zt,imaginaryaxis:KZt,editType:"calc"}});var hXe=ne((_xr,fXe)=>{"use strict";var Jw=Zt(),JZt=_a(),QZt=Bo(),e$t=qx(),t$t=mh().getSubplotData,r$t=jg(),n$t=Hg(),a$t=j4(),i$t=Tp(),Qw=HX(),jX=GX(),cXe=jX.axisNames,o$t=l$t(function(e){return Jw.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function s$t(e,t,r,n){var a=r("bgcolor");n.bgColor=JZt.combine(a,n.paper_bgcolor);var i=t$t(n.fullData,jX.name,n.id),o=n.layoutOut,s;function l(k,y){return r(s+"."+k,y)}for(var u=0;u{"use strict";var u$t=mh().getSubplotCalcData,c$t=Zt().counterRegex,f$t=DX(),vXe=GX(),pXe=vXe.attr,Y2=vXe.name,dXe=c$t(Y2),gXe={};gXe[pXe]={valType:"subplotid",dflt:Y2,editType:"calc"};function h$t(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[Y2],a=0;a{"use strict";var{hovertemplateAttrs:v$t,texttemplateAttrs:p$t,templatefallbackAttrs:xXe}=rs(),AP=ci().extendFlat,g$t=zp(),Pv=Tu(),m$t=os(),e5=Pv.line;bXe.exports={mode:Pv.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:Pv.text,texttemplate:p$t({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:xXe({editType:"plot"}),hovertext:Pv.hovertext,line:{color:e5.color,width:e5.width,dash:e5.dash,backoff:e5.backoff,shape:AP({},e5.shape,{values:["linear","spline"]}),smoothing:e5.smoothing,editType:"calc"},connectgaps:Pv.connectgaps,marker:Pv.marker,cliponaxis:AP({},Pv.cliponaxis,{dflt:!1}),textposition:Pv.textposition,textfont:Pv.textfont,fill:AP({},Pv.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:g$t(),hoverinfo:AP({},m$t.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:Pv.hoveron,hovertemplate:v$t(),hovertemplatefallback:xXe(),selected:Pv.selected,unselected:Pv.unselected}});var TXe=ne((Axr,wXe)=>{"use strict";var MP=Zt(),t5=ml(),y$t=Kv(),x$t=V0(),_Xe=u_(),b$t=G0(),_$t=Bp(),w$t=Ip().PTS_LINESONLY,T$t=WX();wXe.exports=function(t,r,n,a){function i(l,u){return MP.coerce(t,r,T$t,l,u)}var o=A$t(t,r,a,i);if(!o){r.visible=!1;return}i("mode",o{"use strict";var AXe=ri();MXe.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot;return a.realLabel=AXe.tickText(i.radialAxis,t.real,!0).text,a.imagLabel=AXe.tickText(i.angularAxis,t.imag,!0).text,a}});var CXe=ne((Sxr,kXe)=>{"use strict";var EXe=mi(),M$t=uo().BADNUM,S$t=Jv(),E$t=Op(),k$t=mv(),C$t=Qv().calcMarkerSize;kXe.exports=function(t,r){for(var n=t._fullLayout,a=r.subplot,i=n[a].realaxis,o=n[a].imaginaryaxis,s=i.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var L$t=p_(),LXe=uo().BADNUM,F$t=FX(),P$t=F$t.smith;FXe.exports=function(t,r,n){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var D$t=x_();function R$t(e,t,r,n){var a=D$t(e,t,r,n);if(!(!a||a[0].index===!1)){var i=a[0];if(i.index===void 0)return a;var o=e.subplot,s=i.cd[i.index],l=i.trace;if(o.isPtInside(s))return i.xLabelVal=void 0,i.yLabelVal=void 0,DXe(s,l,o,i),i.hovertemplate=l.hovertemplate,a}}function DXe(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="real",i._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(h,v){u.push(h._hovertitle+": "+v)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(a,n.realLabel),f.indexOf("imag")!==-1&&c(i,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}RXe.exports={hoverPoints:R$t,makeHoverPointText:DXe}});var qXe=ne((Cxr,zXe)=>{"use strict";zXe.exports={moduleType:"trace",name:"scattersmith",basePlotModule:yXe(),categories:["smith","symbols","showLegend","scatter-like"],attributes:WX(),supplyDefaults:TXe(),colorbar:bh(),formatLabels:SXe(),calc:CXe(),plot:PXe(),style:Md().style,styleOnSelect:Md().styleOnSelect,hoverPoints:IXe().hoverPoints,selectPoints:_x(),meta:{}}});var OXe=ne((Lxr,BXe)=>{"use strict";BXe.exports=qXe()});var XX=ne((Fxr,NXe)=>{"use strict";var I$t=os(),z$t=rs().hovertemplateAttrs,SP=Wl().axisHoverFormat,YX=ci().extendFlat,q$t=Ys(),B$t=xf().dash,O$t=om(),X2=Tu(),N$t={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:X2.x0,dx:X2.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:X2.y0,dy:X2.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},anglemode:{valType:"enumerated",values:["paper","data"],dflt:"axis",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:SP("x"),yhoverformat:SP("y"),uhoverformat:SP("u","noDate"),vhoverformat:SP("v","noDate"),hoverinfo:YX({},I$t.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:z$t({},{keys:["x","y","u","v","text","name"]}),text:X2.text,textposition:X2.textposition,textfont:X2.textfont,marker:YX({arrowsize:YX({},O$t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:B$t,editType:"style"},editType:"calc"},q$t("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};NXe.exports=N$t});var VXe=ne((Pxr,UXe)=>{"use strict";var Q6=Zt(),U$t=XX(),V$t=yx(),G$t=yh().hasColorscale,H$t=bf();UXe.exports=function(t,r,n,a){function i(d,m){return Q6.coerce(t,r,U$t,d,m)}var o=V$t(t,r,a,i);if(!o){r.visible=!1;return}var s=i("u"),l=i("v");if(!Q6.isArrayOrTypedArray(s)||s.length===0){r.u=new Array(o);for(var u=0;u{"use strict";var wg=Zt(),r5=ri(),eM=mi(),GXe=uo().BADNUM,j$t=qh(),W$t=mv();HXe.exports=function(t,r){let n=r._xA=r5.getFromId(t,r.xaxis||"x","x"),a=r._yA=r5.getFromId(t,r.yaxis||"y","y"),i=n.makeCalcdata(r,"x"),o=a.makeCalcdata(r,"y"),s=Math.min(i.length,o.length);r._length=s;let l=new Array(s);var u=1/0,c=-1/0,f=1/0,h=-1/0;let v=r.marker.color,d=wg.isArrayOrTypedArray(v),m=r.u||[],x=r.v||[],g=r.anglemode,E=r.sizemode,M=r.anchor,w=M==="tip",k=M==="center";for(var y=1/0,S=-1/0,T=1/0,p=-1/0,C=1/0,A=-1/0,P=1/0,D=-1/0,z=0,q=0;qS&&(S=i[q]),o[q]p&&(p=o[q]),BA&&(A=B),YD&&(D=Y);var X=Math.sqrt(B*B+Y*Y);if(X>c&&(c=X),Xh&&(h=te))}}else U.x=GXe,U.y=GXe}if(r._maxNorm=c,E==="scaled"||g==="paper"){let he=(S-y)*(p-T)/s;he===0?r._scaleFactor=1/r._maxNorm:r._scaleFactor=Math.sqrt(he)/r._maxNorm}else r._scaleFactor=1;r._scaleFactor*=r.sizeref;let se=new Array(s),ue=new Array(s),re=new Array(s),j=new Array(s);for(var fe,ce,q=0;q{"use strict";WXe.exports=function(t,r){}});var EP=ne((Ixr,$Xe)=>{"use strict";var ZX=Ea(),XXe=Zt(),tM=li(),Y$t=El(),X$t=A1().DESELECTDIM;function $X(e,t){var r=t.marker||{},n=Y$t.makeColorScaleFuncFromTrace(r);e.style("stroke",function(a){var i=r.color,o;if(XXe.isArrayOrTypedArray(i)&&i.length>a.i&&isFinite(i[a.i]))o=i[a.i];else{var s=t.u&&t.u[a.i]||0,l=t.v&&t.v[a.i]||0;o=Math.sqrt(s*s+l*l)}return n(o)})}function Z$t(e){var t=ZX.select(e).selectAll("g.trace.quiver");t.each(function(r){ZXe(e,r,ZX.select(this))})}function $$t(e,t,r){ZXe(e,t,r)}function ZXe(e,t,r){var n=t[0].trace,a=n.marker||{},i=a.line||{},o=XXe.isArrayOrTypedArray(a.color)?void 0:a.color,s=n._hasColorscale;if(r)if(n.selectedpoints){var l=(n.selected||{}).marker||{},u=(n.unselected||{}).marker||{},c=l.line||{},f=u.line||{};r.selectAll("path.js-line").each(function(v){var d=ZX.select(this),m=!v.selected,x=m?u.color:l.color,g=m?f.width!==void 0?f.width:i.width:c.width!==void 0?c.width:i.width;x?(tM.lineGroupStyle(d,g,x,i.dash),d.style("stroke-opacity",1)):(tM.lineGroupStyle(d,g,o,i.dash),s&&$X(d,n),d.style("stroke-opacity",m?X$t:1))}),tM.selectedTextStyle(r.selectAll("text"),n)}else{var h=r.selectAll("path.js-line");h.call(tM.lineGroupStyle,i.width,o,i.dash),s&&$X(h,n),h.style("stroke-opacity",1),tM.textPointStyle(r.selectAll("text"),n,e)}}$Xe.exports={style:Z$t,styleOnSelect:$$t,colorscaleStroke:$X}});var QXe=ne((zxr,JXe)=>{"use strict";var dp=Ea(),K$t=Zt(),rM=li(),J$t=EP().colorscaleStroke,kP=Math.PI/12,Q$t=5.8,eKt=1.5,tKt=.7;JXe.exports=function(t,r,n,a,i,o){var s,l,u=!i,c=!!i&&i.duration>0;if(s=a.selectAll("g.trace").data(n,function(h){return h[0].trace.uid}),s.enter().append("g").attr("class",function(h){return"trace quiver trace"+h[0].trace.uid}).style("stroke-miterlimit",2),s.order(),c){o&&(l=o());var f=dp.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});f.each(function(){a.selectAll("g.trace").each(function(h,v){KXe(t,v,r,h,n,this,i)})})}else s.each(function(h,v){KXe(t,v,r,h,n,this,i)});u&&s.exit().remove()};function KXe(e,t,r,n,a,i,o){var s=n[0].trace,l=r.xaxis,u=r.yaxis;n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=dp.select(i);var c=dp.select(i).selectAll("g.lines").data([n]);c.enter().append("g").classed("lines",!0),rM.setClipUrl(c,r.layerClipId,e);var f=c.selectAll("path.js-line").data(n);f.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),f.exit().remove();let h=s._maxNorm||0,v=s.anglemode,d=s.sizemode,m=s.sizeref,x=s.anchor,g=v==="paper"?s._scaleFactor*Math.sqrt(Math.abs(l._m*u._m)):s._scaleFactor,E=s.marker.arrowsize;f.each(function(p){let C=dp.select(this);if(p.x===void 0||p.y===void 0){C.attr("d",null);return}let A=(v==="paper"?p._u*Math.sign(l._m):dp.round(l._m*p._u))*g,P=(v==="paper"?p._v*Math.sign(u._m):dp.round(u._m*p._v))*g,D=(s._input.marker||{}).arrowsize!==void 0;var z,q,U,O;x==="tip"?(z=l.c2p(p.x)-A,U=u.c2p(p.y)-P,q=l.c2p(p.x),O=u.c2p(p.y)):x==="center"?(z=l.c2p(p.x)-A/2,U=u.c2p(p.y)-P/2,q=l.c2p(p.x)+A/2,O=u.c2p(p.y)+P/2):(z=l.c2p(p.x),U=u.c2p(p.y),q=l.c2p(p.x)+A,O=u.c2p(p.y)+P),p._px0=z,p._py0=U,p._px1=q,p._py1=O;var R=s.marker.line.width;D||(R=Math.max(R,eKt));let B=Math.sqrt((q-z)*(q-z)+(O-U)*(O-U)),Y=tKt*B,X=Math.min(Q$t*E*R,Y),te=Math.atan2(O-U,q-z),se=q-X*Math.cos(te-kP),ue=O-X*Math.sin(te-kP),re=q-X*Math.cos(te+kP),j=O-X*Math.sin(te+kP),fe="M"+z+","+U+"L"+q+","+O+"L"+se+","+ue+"L"+q+","+O+"L"+re+","+j;C.attr("d",fe)});var M=s.marker||{},w=M.line||{},k=K$t.isArrayOrTypedArray(M.color)?void 0:M.color;rM.lineGroupStyle(f,w.width,k,w.dash),s._hasColorscale&&J$t(f,s);var y=dp.select(i).selectAll("g.text").data([n]);y.enter().append("g").classed("text",!0),rM.setClipUrl(y,r.layerClipId,e);var S=y.selectAll("g.textpoint").data(n);if(S.enter().append("g").classed("textpoint",!0).append("text"),S.exit().remove(),S.each(function(p){var C=dp.select(this),A=rM.translatePoint(p,C.select("text"),l,u);A||C.remove()}),S.selectAll("text").call(rM.textPointStyle,s,e).each(function(p){var C=l.c2p(p.x),A=u.c2p(p.y);dp.select(this).selectAll("tspan.line").each(function(){dp.select(this).attr({x:C,y:A})})}),o&&o.duration>0){var T=dp.transition().duration(o.duration).ease(o.easing);f.transition(T).style("opacity",1)}}});var rZe=ne((qxr,tZe)=>{"use strict";var eZe=Zt(),rKt=cu(),nKt=y_();function aKt(e,t,r,n,a,i){let o=a-r,s=i-n,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-n)*(t-n));var u=((e-r)*o+(t-n)*s)/l;u=Math.max(0,Math.min(1,u));let c=r+u*o,f=n+u*s;return Math.sqrt((e-c)*(e-c)+(t-f)*(t-f))}tZe.exports=function(t,r,n,a){var i=t.cd,o=i[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=function(M){return M._px0===void 0?1/0:aKt(u,c,M._px0,M._py0,M._px1,M._py1)};if(rKt.getClosest(i,f,t),t.index!==!1){var h=i[t.index],v=s.c2p(h.x,!0),d=l.c2p(h.y,!0),m=Math.sqrt((u-v)*(u-v)+(c-d)*(c-d));t.index=h.i;var x=o.u?o.u[h.i]:0,g=o.v?o.v[h.i]:0,E="u: "+x+", v: "+g;return eZe.extendFlat(t,{color:nKt(o,h),x0:v-3,x1:v+3,xLabelVal:h.x,y0:d-3,y1:d+3,yLabelVal:h.y,uLabelVal:x,vLabelVal:g,extraText:E,spikeDistance:m,hovertemplate:o.hovertemplate}),eZe.fillText(h,o,t),[t]}}});var iZe=ne((Bxr,aZe)=>{"use strict";var CP=ri(),nZe=Zt();aZe.exports=function(t,r,n){var a={},i={_fullLayout:n},o=CP.getFromTrace(i,r,"x"),s=CP.getFromTrace(i,r,"y"),l=t.x,u=t.y;a.xLabel=CP.tickText(o,o.c2l(l),!0).text,a.yLabel=CP.tickText(s,s.c2l(u),!0).text;var c=r.u?r.u[t.i]:0,f=r.v?r.v[t.i]:0,h=r.uhoverformat,v=r.vhoverformat;return a.uLabel=h?nZe.numberFormat(h)(c):String(c),a.vLabel=v?nZe.numberFormat(v)(f):String(f),a}});var sZe=ne((Oxr,oZe)=>{"use strict";oZe.exports=function(t,r,n,a,i){return t.x=r.x,t.y=r.y,t.u=n.u?n.u[i]:void 0,t.v=n.v?n.v[i]:void 0,t}});var uZe=ne((Nxr,lZe)=>{"use strict";lZe.exports={moduleType:"trace",name:"quiver",basePlotModule:Ku(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:XX(),supplyDefaults:VXe(),calc:jXe(),crossTraceCalc:YXe(),plot:QXe(),style:EP().style,styleOnSelect:EP().styleOnSelect,hoverPoints:rZe(),formatLabels:iZe(),eventData:sZe(),selectPoints:_x(),colorbar:bh(),animatable:!0,meta:{}}});var fZe=ne((Uxr,cZe)=>{"use strict";cZe.exports=uZe()});var Yh=ne((Vxr,dZe)=>{var FP=Uc();function hZe(){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={}}FP(hZe.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,a):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(i===0?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function KX(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(bo.local.invalidDate||bo.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function LP(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}FP(KX.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(bo.local.invalidDate||bo.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,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(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(bo.local.differentCalendars||bo.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+LP(Math.abs(this.year()),4)+"-"+LP(this.month(),2)+"-"+LP(this.day(),2)}});function JX(){this.shortYearCutoff="+10"}FP(JX.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,bo.local.invalidDate||bo.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new KX(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,bo.local.invalidYear||bo.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,bo.local.invalidYear||bo.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+LP(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,bo.local.invalidYear||bo.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,bo.local.invalidMonth||bo.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,bo.local.invalidMonth||bo.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,bo.local.invalidYear||bo.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,bo.local.invalidDate||bo.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(e,t,r){var n=this._validate(e,t,r,bo.local.invalidDate||bo.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,bo.local.invalidDate||bo.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,bo.local.invalidDate||bo.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var n=e.toJD()+t*(r==="w"?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),a=e.day(),s=function(c){for(;of-1+c.minMonth;)i++,o-=f,f=c.monthsInYear(i)};r==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):r==="m"&&(s(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||e.year()>0!=t[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;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,bo.local.invalidDate||bo.regionalOptions[""].invalidDate);var n=r==="y"?t:e.year(),a=r==="m"?t:e.month(),i=r==="d"?t:e.day();return(r==="y"||r==="m")&&(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=a-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,bo.local.invalidDate||bo.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(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var bo=dZe.exports=new hZe;bo.cdate=KX;bo.baseCalendar=JX;bo.calendars.gregorian=QX});var vZe=ne(()=>{var eZ=Uc(),eh=Yh();eZ(eh.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"});eh.local=eh.regionalOptions[""];eZ(eh.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});eZ(eh.baseCalendar.prototype,{UNIX_EPOCH:eh.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:eh.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,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(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw eh.local.invalidFormat||eh.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,i=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(w,k){for(var y=1;M+y1},c=function(w,k,y,S){var T=""+k;if(u(w,S))for(;T.length1},E=function(P,D){var z=g(P,D),q=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(P)+1],U=new RegExp("^-?\\d{1,"+q+"}"),O=t.substring(T).match(U);if(!O)throw(eh.local.missingNumberAt||eh.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=O[0].length,parseInt(O[0],10)},M=this,w=function(){if(typeof s=="function"){g("m");var P=s.call(M,t.substring(T));return T+=P.length,P}return E("m")},k=function(P,D,z,q){for(var U=g(P,q)?z:D,O=0;O-1){h=1,v=d;for(var A=this.daysInMonth(f,h);v>A;A=this.daysInMonth(f,h))h++,v-=A}return c>-1?this.fromJD(c):this.newDate(f,h,v)},determineDate:function(e,t,r,n,a){r&&typeof r!="object"&&(a=n,n=r,r=null),typeof n!="string"&&(a=n,n="");var i=this,o=function(s){try{return i.parseDate(n,s,a)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e),e}})});var pZe=ne(()=>{var Ay=Yh(),iKt=Uc(),tZ=Ay.instance();function PP(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}PP.prototype=new Ay.baseCalendar;iKt(PP.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(sKt);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var t=e.match(lKt);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=this.toChineseMonth(r,n),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"][a-1];return this.isIntercalaryMonth(r,n)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(uKt);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=this.toChineseMonth(r,n),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(r,n)&&(i="\u95F0"+i),i},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]==="\u95F0"&&(n=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var a=t[t.length-1];n=a==="i"||a==="I"}var i=this.toMonthIndex(e,r,n);return i},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(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),a=r&&t!==n;if(a||t<1||t>12)throw Ay.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return n?!r&&t<=n?i=t-1:i=t:i=t-1,i},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw Ay.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,Ay.local.invalidyear),a=Sy[n-Sy[0]],i=a>>9&4095,o=a>>5&15,s=a&31,l;l=tZ.newDate(i,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=My[e-My[0]],n=r>>13,a=n?12:11;if(t>a)throw Ay.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=r&1<<12-t?30:29;return i},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,i,r,Ay.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var a=this.isIntercalaryMonth(e,t),i=this.toChineseMonth(e,t),o=fKt(e,i,r,a);return tZ.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=tZ.fromJD(e),r=cKt(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(oKt),r=this._validateYear(+t[1]),n=+t[2],a=!!t[3],i=this.toMonthIndex(r,n,a),o=+t[4];return this.newDate(r,i,o)},add:function(e,t,r){var n=e.year(),a=e.month(),i=this.isIntercalaryMonth(n,a),o=this.toChineseMonth(n,a),s=Object.getPrototypeOf(PP.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=i&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var oKt=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,sKt=/^\d?\d[iI]?/m,lKt=/^闰?十?[一二三四五六七八九]?月/m,uKt=/^闰?十?[一二三四五六七八九]?/m;Ay.calendars.chinese=PP;var My=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],Sy=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function cKt(e,t,r,n){var a,i;if(typeof e=="object")a=e,i=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i=n||{}}var u=Sy[a.year-Sy[0]],c=a.year<<9|a.month<<5|a.day;i.year=c>=u?a.year:a.year-1,u=Sy[i.year-Sy[0]];var f=u>>9&4095,h=u>>5&15,v=u&31,d,m=new Date(f,h-1,v),x=new Date(a.year,a.month-1,a.day);d=Math.round((x-m)/(24*3600*1e3));var g=My[i.year-My[0]],E;for(E=0;E<13;E++){var M=g&1<<12-E?30:29;if(d>13;return!w||E=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,i=n):(c=!!n,i=a||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var h=My[o.year-My[0]],v=h>>13,d;v&&(o.month>v||o.isIntercalary)?d=o.month:d=o.month-1;for(var m=0;m>9&4095,M=g>>5&15,w=g&31,k=new Date(E,M-1,w+f);return i.year=k.getFullYear(),i.month=1+k.getMonth(),i.day=k.getDate(),i}});var gZe=ne(()=>{var Z2=Yh(),hKt=Uc();function rZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}rZ.prototype=new Z2.baseCalendar;hKt(rZ.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,Z2.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Z2.local.invalidYear||Z2.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Z2.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,Z2.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-(n-1)*30+1;return this.newDate(r,n,a)}});Z2.calendars.coptic=rZ});var mZe=ne(()=>{var Tg=Yh(),dKt=Uc();function nZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}nZ.prototype=new Tg.baseCalendar;dKt(nZ.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,Tg.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Tg.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Tg.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Tg.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Tg.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Tg.local.invalidDate);return{century:vKt[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,Tg.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var vKt={20:"Fruitbat",21:"Anchovy"};Tg.calendars.discworld=nZ});var yZe=ne(()=>{var $2=Yh(),pKt=Uc();function aZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}aZ.prototype=new $2.baseCalendar;pKt(aZ.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,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(r){var t=this._validate(r,this.minMonth,this.minDay,$2.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,$2.local.invalidYear||$2.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,$2.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,$2.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-(n-1)*30+1;return this.newDate(r,n,a)}});$2.calendars.ethiopian=aZ});var xZe=ne(()=>{var Ey=Yh(),gKt=Uc();function iZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}iZ.prototype=new Ey.baseCalendar;gKt(iZ.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(e){var t=this._validate(e,this.minMonth,this.minDay,Ey.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,DP(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Ey.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Ey.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Ey.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&DP(this.daysInYear(e),10)===5?30:t===9&&DP(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Ey.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Ey.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=e<=0?e+1:e,i=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function DP(e,t){return e-t*Math.floor(e/t)}Ey.calendars.hebrew=iZ});var bZe=ne(()=>{var nM=Yh(),mKt=Uc();function oZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}oZ.prototype=new nM.baseCalendar;mKt(oZ.prototype,{name:"Islamic",jdEpoch:19484395e-1,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(e){var t=this._validate(e,this.minMonth,this.minDay,nM.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,nM.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,nM.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});nM.calendars.islamic=oZ});var _Ze=ne(()=>{var aM=Yh(),yKt=Uc();function sZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}sZ.prototype=new aM.baseCalendar;yKt(sZ.prototype,{name:"Julian",jdEpoch:17214235e-1,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(r){var t=this._validate(r,this.minMonth,this.minDay,aM.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,aM.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,aM.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),a=Math.floor(365.25*n),i=Math.floor((r-a)/30.6001),o=i-Math.floor(i<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-a-Math.floor(30.6001*i);return s<=0&&s--,this.newDate(s,o,l)}});aM.calendars.julian=sZ});var TZe=ne(()=>{var A0=Yh(),xKt=Uc();function uZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}uZ.prototype=new A0.baseCalendar;xKt(uZ.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(e){return this._validate(e,this.minMonth,this.minDay,A0.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,A0.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,A0.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,A0.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,A0.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,A0.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,A0.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,A0.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,A0.local.invalidDate),a=n.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(e){e-=this.jdEpoch;var t=lZ(e+8+340,365);return[Math.floor(t/20)+1,lZ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[wZe(e+20,20),wZe(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,A0.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function lZ(e,t){return e-t*Math.floor(e/t)}function wZe(e,t){return lZ(e-1,t)+1}A0.calendars.mayan=uZ});var MZe=ne(()=>{var K2=Yh(),bKt=Uc();function cZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}cZ.prototype=new K2.baseCalendar;var AZe=K2.instance("gregorian");bKt(cZ.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,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(e){var t=this._validate(e,this.minMonth,this.minDay,K2.local.invalidYear||K2.regionalOptions[""].invalidYear);return AZe.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,K2.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,K2.local.invalidMonth),a=n.year();a<0&&a++;for(var i=n.day(),o=1;o=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});K2.calendars.nanakshahi=cZ});var SZe=ne(()=>{var J2=Yh(),_Kt=Uc();function fZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}fZ.prototype=new J2.baseCalendar;_Kt(fZ.prototype,{name:"Nepali",jdEpoch:17007095e-1,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(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,J2.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,J2.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,J2.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=J2.instance(),i=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(i=r,o--);o!==9;)o<=0&&(o=12,s--),i+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(i+=r-this.NEPALI_CALENDAR_DATA[s][0],i<0&&(i+=a.daysInYear(l))):i+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],a.newDate(l,1,1).add(i,"d").toJD()},fromJD:function(e){var t=J2.instance(),r=t.fromJD(e),n=r.year(),a=r.dayOfYear(),i=n+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++,o>12&&(o=1,i++),l+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var n5=Yh(),wKt=Uc();function IP(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function RP(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,a=r*(t+1),i=n-Math.floor(n),o=a-Math.floor(a);return i>o}IP.prototype=new n5.baseCalendar;wKt(IP.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,n5.local.invalidYear);return RP(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,n5.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,n5.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=0;if(e>0)for(var i=1;i0?e-1:e)*365+a+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,RP(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,a=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),i=e-this.toJD(r,a,1)+1;return this.newDate(r,a,i)}});n5.calendars.persian=IP;n5.calendars.jalali=IP});var kZe=ne(()=>{var Q2=Yh(),TKt=Uc(),zP=Q2.instance();function hZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}hZ.prototype=new Q2.baseCalendar;TKt(hZ.prototype,{name:"Taiwan",jdEpoch:24194025e-1,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(r){var t=this._validate(r,this.minMonth,this.minDay,Q2.local.invalidYear),r=this._t2gYear(t.year());return zP.leapYear(r)},weekOfYear:function(a,t,r){var n=this._validate(a,this.minMonth,this.minDay,Q2.local.invalidYear),a=this._t2gYear(n.year());return zP.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,Q2.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,Q2.local.invalidDate),a=this._t2gYear(n.year());return zP.toJD(a,n.month(),n.day())},fromJD:function(e){var t=zP.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});Q2.calendars.taiwan=hZ});var CZe=ne(()=>{var eb=Yh(),AKt=Uc(),qP=eb.instance();function dZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}dZ.prototype=new eb.baseCalendar;AKt(dZ.prototype,{name:"Thai",jdEpoch:15230985e-1,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(r){var t=this._validate(r,this.minMonth,this.minDay,eb.local.invalidYear),r=this._t2gYear(t.year());return qP.leapYear(r)},weekOfYear:function(a,t,r){var n=this._validate(a,this.minMonth,this.minDay,eb.local.invalidYear),a=this._t2gYear(n.year());return qP.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,eb.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,eb.local.invalidDate),a=this._t2gYear(n.year());return qP.toJD(a,n.month(),n.day())},fromJD:function(e){var t=qP.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});eb.calendars.thai=dZ});var LZe=ne(()=>{var tb=Yh(),MKt=Uc();function vZ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}vZ.prototype=new tb.baseCalendar;MKt(vZ.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(e){var t=this._validate(e,this.minMonth,this.minDay,tb.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,tb.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,i=0;in)return ky[a]-ky[a-1];a++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,tb.local.invalidDate),a=12*(n.year()-1)+n.month()-15292,i=n.day()+ky[a-1]-1;return i+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),o=i+1,s=a-12*i,l=t-ky[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=tb.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var a=tb.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}});tb.calendars.ummalqura=vZ;var ky=[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]});var PZe=ne((x2r,FZe)=>{"use strict";FZe.exports=Yh();vZe();pZe();gZe();mZe();yZe();xZe();bZe();_Ze();TZe();MZe();SZe();EZe();kZe();CZe();LZe()});var OZe=ne((b2r,BZe)=>{"use strict";var RZe=PZe(),iM=Zt(),IZe=uo(),SKt=IZe.EPOCHJD,EKt=IZe.ONEDAY,mZ={valType:"enumerated",values:iM.sortObjectKeys(RZe.calendars),editType:"calc",dflt:"gregorian"},zZe=function(e,t,r,n){var a={};return a[r]=mZ,iM.coerce(e,t,a,r,n)},kKt=function(e,t,r,n){for(var a=0;a{"use strict";NZe.exports=OZe()});var RKt=ne((w2r,GZe)=>{var VZe=C0e();VZe.register([Fpe(),y1e(),Dge(),eme(),vme(),cye(),Tye(),fxe(),Nxe(),w2e(),ube(),SAe(),p6e(),oSe(),XSe(),MEe(),ZEe(),bCe(),OCe(),n8e(),p8e(),C8e(),H8e(),oLe(),N7e(),o9e(),Aze(),Aqe(),RBe(),oOe(),TNe(),BNe(),lUe(),gVe(),NVe(),_Ge(),GHe(),vje(),Ije(),sWe(),_We(),bYe(),OYe(),aXe(),OXe(),fZe(),UZe()]);GZe.exports=VZe});return RKt();})(); +`})),staticAttributes:N,staticUniforms:se}}class ka{constructor(d,P,N){this.vertexBuffer=d,this.indexBuffer=P,this.segments=N}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var vs=i.aS([{name:"a_pos",type:"Int16",components:2}]);let yo="#define PROJECTION_MERCATOR",so="mercator";class oo{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return so}get shaderDefine(){return yo}get shaderPreludeCode(){return Oa.projectionMercator}get vertexShaderPreludeCode(){return Oa.projectionMercator.vertexSource}get subdivisionGranularity(){return i.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(d){}getMeshFromTileID(d,P,N,H,$){if(this._cachedMesh)return this._cachedMesh;let se=new i.aU;se.emplaceBack(0,0),se.emplaceBack(i.a6,0),se.emplaceBack(0,i.a6),se.emplaceBack(i.a6,i.a6);let de=d.createVertexBuffer(se,vs.members),Ae=i.aV.simpleSegment(0,0,4,2),Fe=new i.aW;Fe.emplaceBack(1,0,2),Fe.emplaceBack(1,2,3);let Ie=d.createIndexBuffer(Fe);return this._cachedMesh=new ka(de,Ie,Ae),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(d){}}class ko{constructor(d=0,P=0,N=0,H=0){if(isNaN(d)||d<0||isNaN(P)||P<0||isNaN(N)||N<0||isNaN(H)||H<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=d,this.bottom=P,this.left=N,this.right=H}interpolate(d,P,N){return P.top!=null&&d.top!=null&&(this.top=i.H.number(d.top,P.top,N)),P.bottom!=null&&d.bottom!=null&&(this.bottom=i.H.number(d.bottom,P.bottom,N)),P.left!=null&&d.left!=null&&(this.left=i.H.number(d.left,P.left,N)),P.right!=null&&d.right!=null&&(this.right=i.H.number(d.right,P.right,N)),this}getCenter(d,P){let N=i.al((this.left+d-this.right)/2,0,d),H=i.al((this.top+P-this.bottom)/2,0,P);return new i.P(N,H)}equals(d){return this.top===d.top&&this.bottom===d.bottom&&this.left===d.left&&this.right===d.right}clone(){return new ko(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function pa(Y,d){if(!Y.renderWorldCopies||Y.lngRange)return;let P=d.lng-Y.center.lng;d.lng+=P>180?-360:P<-180?360:0}function la(Y){return Math.max(0,Math.floor(Y))}class As{constructor(d,P){var N;this.applyConstrain=(H,$)=>this._constrainOverride!==null?this._constrainOverride(H,$):this._callbacks.defaultConstrain(H,$),this._callbacks=d,this._tileSize=512,this._renderWorldCopies=(P==null?void 0:P.renderWorldCopies)===void 0||!!(P!=null&&P.renderWorldCopies),this._minZoom=(P==null?void 0:P.minZoom)||0,this._maxZoom=(P==null?void 0:P.maxZoom)||22,this._minPitch=(P==null?void 0:P.minPitch)==null?0:P==null?void 0:P.minPitch,this._maxPitch=(P==null?void 0:P.maxPitch)==null?60:P==null?void 0:P.maxPitch,this._constrainOverride=(N=P==null?void 0:P.constrainOverride)!==null&&N!==void 0?N:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new i.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=la(this._zoom),this._scale=i.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new ko,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(d,P,N){this._constrainOverride=d.constrainOverride,this._latRange=d.latRange,this._lngRange=d.lngRange,this._width=d.width,this._height=d.height,this._center=d.center,this._elevation=d.elevation,this._minElevationForCurrentTile=d.minElevationForCurrentTile,this._zoom=d.zoom,this._tileZoom=la(this._zoom),this._scale=i.ao(this._zoom),this._bearingInRadians=d.bearingInRadians,this._fovInRadians=d.fovInRadians,this._pitchInRadians=d.pitchInRadians,this._rollInRadians=d.rollInRadians,this._unmodified=d.unmodified,this._edgeInsets=new ko(d.padding.top,d.padding.bottom,d.padding.left,d.padding.right),this._minZoom=d.minZoom,this._maxZoom=d.maxZoom,this._minPitch=d.minPitch,this._maxPitch=d.maxPitch,this._renderWorldCopies=d.renderWorldCopies,this._cameraToCenterDistance=d.cameraToCenterDistance,this._nearZ=d.nearZ,this._farZ=d.farZ,this._autoCalculateNearFarZ=!N&&d.autoCalculateNearFarZ,P&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(d){this._minElevationForCurrentTile=d}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(d){this._minZoom!==d&&(this._minZoom=d,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(d){this._maxZoom!==d&&(this._maxZoom=d,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(d){this._minPitch!==d&&(this._minPitch=d,this.setPitch(Math.max(this.pitch,d)))}get maxPitch(){return this._maxPitch}setMaxPitch(d){this._maxPitch!==d&&(this._maxPitch=d,this.setPitch(Math.min(this.pitch,d)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(d){d===void 0?d=!0:d===null&&(d=!1),this._renderWorldCopies=d}get constrainOverride(){return this._constrainOverride}setConstrainOverride(d){d===void 0&&(d=null),this._constrainOverride!==d&&(this._constrainOverride=d,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new i.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(d){let P=i.X(d,-180,180)*Math.PI/180;var N,H,$,se,de,Ae,Fe,Ie,Ye;this._bearingInRadians!==P&&(this._unmodified=!1,this._bearingInRadians=P,this._calcMatrices(),this._rotationMatrix=s(),N=this._rotationMatrix,$=-this._bearingInRadians,se=(H=this._rotationMatrix)[0],de=H[1],Ae=H[2],Fe=H[3],Ie=Math.sin($),Ye=Math.cos($),N[0]=se*Ye+Ae*Ie,N[1]=de*Ye+Fe*Ie,N[2]=se*-Ie+Ae*Ye,N[3]=de*-Ie+Fe*Ye)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(d){let P=i.al(d,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==P&&(this._unmodified=!1,this._pitchInRadians=P,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(d){let P=d/180*Math.PI;this._rollInRadians!==P&&(this._unmodified=!1,this._rollInRadians=P,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return i.aX(this._fovInRadians)}setFov(d){d=i.al(d,.1,150),this.fov!==d&&(this._unmodified=!1,this._fovInRadians=i.an(d),this._calcMatrices())}get zoom(){return this._zoom}setZoom(d){let P=this.applyConstrain(this._center,d).zoom;this._zoom!==P&&(this._unmodified=!1,this._zoom=P,this._tileZoom=Math.max(0,Math.floor(P)),this._scale=i.ao(P),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(d){d.lat===this._center.lat&&d.lng===this._center.lng||(this._unmodified=!1,this._center=d,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(d){d!==this._elevation&&(this._elevation=d,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(d){this._edgeInsets.equals(d)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,d,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(d,P){this._autoCalculateNearFarZ=!1,this._nearZ=d,this._farZ=P,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(d){return this._edgeInsets.equals(d)}interpolatePadding(d,P,N){this._unmodified=!1,this._edgeInsets.interpolate(d,P,N),this.constrainInternal(),this._calcMatrices()}resize(d,P,N=!0){this._width=d,this._height=P,N&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var d,P;return((d=this._latRange)===null||d===void 0?void 0:d.length)!==2||((P=this._lngRange)===null||P===void 0?void 0:P.length)!==2?null:new ie([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(d){d?(this._lngRange=[d.getWest(),d.getEast()],this._latRange=[d.getSouth(),d.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-i.am,i.am])}getCameraQueryGeometry(d,P){if(P.length===1)return[P[0],d];{let{minX:N,minY:H,maxX:$,maxY:se}=i.a8.fromPoints(P).extend(d);return[new i.P(N,H),new i.P($,H),new i.P($,se),new i.P(N,se),new i.P(N,H)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let d=this._unmodified,{center:P,zoom:N}=this.applyConstrain(this.center,this.zoom);this.setCenter(P),this.setZoom(N),this._unmodified=d,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let d=i.ap(new Float64Array(16));i.S(d,d,[this._width/2,-this._height/2,1]),i.Q(d,d,[1,-1,0]),this._clipSpaceToPixelsMatrix=d,d=i.ap(new Float64Array(16)),i.S(d,d,[1,-1,1]),i.Q(d,d,[-1,-1,0]),i.S(d,d,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=d,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(d,P,N,H){let $=N!==void 0?N:this.bearing,se=H=H!==void 0?H:this.pitch,{distanceToCenter:de,clampedElevation:Ae}=this._distanceToCenterFromAltElevationPitch(P,this.elevation,se),{x:Fe,y:Ie}=cr(se,$),Ye=i.a7.fromLngLat(d,P),st,dt,Pe=i.aY(1,Ye.y),Xe=0;do{if(Xe+=1,Xe>10)break;dt=de/Pe,st=new i.a7(Ye.x+Fe*dt,Ye.y+Ie*dt),Pe=1/st.meterInMercatorCoordinateUnits()}while(Math.abs(de-dt*Pe)>1e-12);return{center:st.toLngLat(),elevation:Ae,zoom:i.ar(this.height/2/Math.tan(this.fovInRadians/2)/dt/this.tileSize)}}recalculateZoomAndCenter(d){if(this.elevation-d==0)return;let P=1/this.worldSize,N=i.aq(1,this.center.lat)*this.worldSize,H=i.a7.fromLngLat(this.center,this.elevation),$=H.x/P,se=H.y/P,de=H.z/P,Ae=this.pitch,Fe=this.bearing,{x:Ie,y:Ye,z:st}=cr(Ae,Fe),dt=this.cameraToCenterDistance,Pe=$+dt*-Ie,Xe=se+dt*-Ye,at=de+dt*st,{distanceToCenter:xt,clampedElevation:Et}=this._distanceToCenterFromAltElevationPitch(at/N,d,Ae),Bt=xt*N,St=new i.a7((Pe+Ie*Bt)*P,(Xe+Ye*Bt)*P,0).toLngLat(),Pt=i.aq(1,St.lat),$t=i.ar(this.height/2/Math.tan(this.fovInRadians/2)/xt/Pt/this.tileSize);this._elevation=Et,this._center=St,this.setZoom($t)}_distanceToCenterFromAltElevationPitch(d,P,N){let H=-Math.cos(i.an(N)),$=d-P,se,de=P;return H*$>=0||Math.abs(H)<.1?(se=1e4,de=d+se*H):se=-$/H,{distanceToCenter:se,clampedElevation:de}}getCameraPoint(){let d=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.P(d*Math.sin(this.rollInRadians),d*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let d=i.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/d).toLngLat()}getMercatorTileCoordinates(d){if(!d)return[0,0,1,1];let P=d.canonical.z>=0?1<this.max[0]||d.aabb.min[1]>this.max[1]||d.aabb.min[2]>this.max[2]||d.aabb.max[0]0?(P+=d[H]*this.min[H],N+=d[H]*this.max[H]):(N+=d[H]*this.min[H],P+=d[H]*this.max[H]);return P>=0?2:N<0?0:1}}class xu{distanceToTile2d(d,P,N,H){let $=H,se=$.distanceX([d,P]),de=$.distanceY([d,P]);return Math.hypot(se,de)}getWrap(d,P,N){return N}getTileBoundingVolume(d,P,N,H){var $,se;let de=0,Ae=0;if(H!=null&&H.terrain){let Ie=new i.a3(d.z,P,d.z,d.x,d.y),Ye=H.terrain.getMinMaxElevation(Ie);de=($=Ye.minElevation)!==null&&$!==void 0?$:Math.min(0,N),Ae=(se=Ye.maxElevation)!==null&&se!==void 0?se:Math.max(0,N)}let Fe=1<H}allowWorldCopies(){return!0}prepareNextFrame(){}}class rs{constructor(d,P,N){this.points=d,this.planes=P,this.aabb=N}static fromInvProjectionMatrix(d,P=1,N=0,H,$){let se=$?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],de=Math.pow(2,N),Ae=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((st=>(function(dt,Pe,Xe,at){let xt=i.aE([],dt,Pe),Et=1/xt[3]/Xe*at;return i.b4(xt,xt,[Et,Et,1/xt[3],Et])})(st,d,P,de)));H&&(function(st,dt,Pe,Xe){let at=Xe?4:0,xt=Xe?0:4,Et=0,Bt=[],St=[];for(let Ht=0;Ht<4;Ht++){let dr=i.b0([],st[Ht+xt],st[Ht+at]),Xr=i.b5(dr);i.aZ(dr,dr,1/Xr),Bt.push(Xr),St.push(dr)}for(let Ht=0;Ht<4;Ht++){let dr=i.b6(st[Ht+at],St[Ht],Pe);Et=dr!==null&&dr>=0?Math.max(Et,dr):Math.max(Et,Bt[Ht])}let Pt=(function(Ht,dr){let Xr=i.b0([],Ht[dr[0]],Ht[dr[1]]),Or=i.b0([],Ht[dr[2]],Ht[dr[1]]),$r=[0,0,0,0];return i.b1($r,i.b2([],Xr,Or)),$r[3]=-i.b3($r,Ht[dr[0]]),$r})(st,dt),$t=(function(Ht,dr){let Xr=i.b7(Ht),Or=i.b8([],Ht,1/Xr),$r=i.b0([],dr,i.aZ([],Or,i.b3(dr,Or))),Er=i.b7($r);if(Er>0){let Tr=Math.sqrt(1-Or[3]*Or[3]),Rr=i.aZ([],Or,-Or[3]),Lr=i.a_([],Rr,i.aZ([],$r,Tr/Er));return i.b9(dr,Lr)}return null})(Pe,Pt);if($t!==null){let Ht=$t/i.b3(St[0],Pt);Et=Math.min(Et,Ht)}for(let Ht=0;Ht<4;Ht++){let dr=Math.min(Et,Bt[Ht]);st[Ht+xt]=[st[Ht+at][0]+St[Ht][0]*dr,st[Ht+at][1]+St[Ht][1]*dr,st[Ht+at][2]+St[Ht][2]*dr,1]}})(Ae,se[0],H,$);let Fe=se.map((st=>{let dt=i.b0([],Ae[st[0]],Ae[st[1]]),Pe=i.b0([],Ae[st[2]],Ae[st[1]]),Xe=i.b1([],i.b2([],dt,Pe)),at=-i.b3(Xe,Ae[st[1]]);return Xe.concat(at)})),Ie=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Ye=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let st of Ae)for(let dt=0;dt<3;dt++)Ie[dt]=Math.min(Ie[dt],st[dt]),Ye[dt]=Math.max(Ye[dt],st[dt]);return new rs(Ae,Fe,new Ms(Ie,Ye))}}class Ls{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(d){this._helper.setMinZoom(d)}setMaxZoom(d){this._helper.setMaxZoom(d)}setMinPitch(d){this._helper.setMinPitch(d)}setMaxPitch(d){this._helper.setMaxPitch(d)}setRenderWorldCopies(d){this._helper.setRenderWorldCopies(d)}setBearing(d){this._helper.setBearing(d)}setPitch(d){this._helper.setPitch(d)}setRoll(d){this._helper.setRoll(d)}setFov(d){this._helper.setFov(d)}setZoom(d){this._helper.setZoom(d)}setCenter(d){this._helper.setCenter(d)}setElevation(d){this._helper.setElevation(d)}setMinElevationForCurrentTile(d){this._helper.setMinElevationForCurrentTile(d)}setPadding(d){this._helper.setPadding(d)}interpolatePadding(d,P,N){this._helper.interpolatePadding(d,P,N)}isPaddingEqual(d){return this._helper.isPaddingEqual(d)}resize(d,P,N=!0){this._helper.resize(d,P,N)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(d){this._helper.setMaxBounds(d)}setConstrainOverride(d){this._helper.setConstrainOverride(d)}overrideNearFarZ(d,P){this._helper.overrideNearFarZ(d,P)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(d){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),d)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(d,P){}constructor(d){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(P,N)=>{N=i.al(+N,this.minZoom,this.maxZoom);let H={center:new i.W(P.lng,P.lat),zoom:N},$=this._helper._lngRange;if(!this._helper._renderWorldCopies&&$===null){let St=179.9999999999;$=[-St,St]}let se=this.tileSize*i.ao(H.zoom),de=0,Ae=se,Fe=0,Ie=se,Ye=0,st=0,{x:dt,y:Pe}=this.size;if(this._helper._latRange){let St=this._helper._latRange;de=i.Y(St[1])*se,Ae=i.Y(St[0])*se,Ae-deAe&&(Et=Ae-St)}if($){let St=(Fe+Ie)/2,Pt=Xe;this._helper._renderWorldCopies&&(Pt=i.X(Xe,St-se/2,St+se/2));let $t=dt/2;Pt-$tIe&&(xt=Ie-$t)}if(xt!==void 0||Et!==void 0){let St=new i.P(xt!=null?xt:Xe,Et!=null?Et:at);H.center=mr(se,St).wrap()}return H},this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._coveringTilesDetailsProvider=new xu}clone(){let d=new Ls;return d.apply(this,!1),d}apply(d,P,N){this._helper.apply(d,P,N)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(d){let P=[new i.ba(0,d)];if(this._helper._renderWorldCopies){let N=this.screenPointToMercatorCoordinate(new i.P(0,0)),H=this.screenPointToMercatorCoordinate(new i.P(this._helper._width,0)),$=this.screenPointToMercatorCoordinate(new i.P(this._helper._width,this._helper._height)),se=this.screenPointToMercatorCoordinate(new i.P(0,this._helper._height)),de=Math.floor(Math.min(N.x,H.x,$.x,se.x)),Ae=Math.floor(Math.max(N.x,H.x,$.x,se.x)),Fe=1;for(let Ie=de-Fe;Ie<=Ae+Fe;Ie++)Ie!==0&&P.push(new i.ba(Ie,d))}return P}getCameraFrustum(){return rs.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(d){let P=this.screenPointToLocation(this.centerPoint,d),N=d?d.getElevationForLngLatZoom(P,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(N)}setLocationAtPoint(d,P){let N=i.aq(this.elevation,this.center.lat),H=this.screenPointToMercatorCoordinateAtZ(P,N),$=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,N),se=i.a7.fromLngLat(d),de=new i.a7(se.x-(H.x-$.x),se.y-(H.y-$.y));this.setCenter(de==null?void 0:de.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(d,P){return P?this.coordinatePoint(i.a7.fromLngLat(d),P.getElevationForLngLat(d,this),this._pixelMatrix3D):this.coordinatePoint(i.a7.fromLngLat(d))}screenPointToLocation(d,P){var N;return(N=this.screenPointToMercatorCoordinate(d,P))===null||N===void 0?void 0:N.toLngLat()}screenPointToMercatorCoordinate(d,P){if(P){let N=P.pointCoordinate(d);if(N!=null)return N}return this.screenPointToMercatorCoordinateAtZ(d)}screenPointToMercatorCoordinateAtZ(d,P){let N=P||0,H=[d.x,d.y,0,1],$=[d.x,d.y,1,1];i.aE(H,H,this._pixelMatrixInverse),i.aE($,$,this._pixelMatrixInverse);let se=H[3],de=$[3],Ae=H[1]/se,Fe=$[1]/de,Ie=H[2]/se,Ye=$[2]/de,st=Ie===Ye?0:(N-Ie)/(Ye-Ie);return new i.a7(i.H.number(H[0]/se,$[0]/de,st)/this.worldSize,i.H.number(Ae,Fe,st)/this.worldSize,N)}coordinatePoint(d,P=0,N=this._pixelMatrix){let H=[d.x*this.worldSize,d.y*this.worldSize,P,1];return i.aE(H,H,N),new i.P(H[0]/H[3],H[1]/H[3])}getBounds(){let d=Math.max(0,this._helper._height/2-or(this));return new ie().extend(this.screenPointToLocation(new i.P(0,d))).extend(this.screenPointToLocation(new i.P(this._helper._width,d))).extend(this.screenPointToLocation(new i.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new i.P(0,this._helper._height)))}isPointOnMapSurface(d,P){return P?P.pointCoordinate(d)!=null:d.y>this.height/2-or(this)}calculatePosMatrix(d,P=!1,N){var H;let $=(H=d.key)!==null&&H!==void 0?H:i.bb(d.wrap,d.canonical.z,d.canonical.z,d.canonical.x,d.canonical.y),se=P?this._alignedPosMatrixCache:this._posMatrixCache;if(se.has($)){let Fe=se.get($);return N?Fe.f32:Fe.f64}let de=fr(d,this.worldSize);i.U(de,P?this._alignedProjMatrix:this._viewProjMatrix,de);let Ae={f64:de,f32:new Float32Array(de)};return se.set($,Ae),N?Ae.f32:Ae.f64}calculateFogMatrix(d){let P=d.key,N=this._fogMatrixCacheF32;if(N.has(P))return N.get(P);let H=fr(d,this.worldSize);return i.U(H,this._fogMatrix,H),N.set(P,new Float32Array(H)),N.get(P)}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}_calculateNearFarZIfNeeded(d,P,N){if(!this._helper.autoCalculateNearFarZ)return;let H=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),$=d-H*this._helper._pixelPerMeter/Math.cos(P),se=H<0?$:d,de=Math.PI/2+this.pitchInRadians,Ae=i.an(this.fov)*(Math.abs(Math.cos(i.an(this.roll)))*this.height+Math.abs(Math.sin(i.an(this.roll)))*this.width)/this.height*(.5+N.y/this.height),Fe=Math.sin(Ae)*se/Math.sin(i.al(Math.PI-de-Ae,.01,Math.PI-.01)),Ie=or(this),Ye=Math.atan(Ie/this._helper.cameraToCenterDistance),st=i.an(.75),dt=Ye>st?2*Ye*(.5+N.y/(2*Ie)):st,Pe=Math.sin(dt)*se/Math.sin(i.al(Math.PI-de-dt,.01,Math.PI-.01)),Xe=Math.min(Fe,Pe);this._helper._farZ=1.01*(Math.cos(Math.PI/2-P)*Xe+se),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let d=this.centerOffset,P=jt(this.worldSize,this.center),N=P.x,H=P.y;this._helper._pixelPerMeter=i.aq(1,this.center.lat)*this.worldSize;let $=i.an(Math.min(this.pitch,Yt)),se=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos($)),de;var Ae,Fe;this._calculateNearFarZIfNeeded(se,$,d),de=new Float64Array(16),i.bc(de,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ae=this._invProjMatrix)[0]=1/(Fe=de)[0],Ae[1]=0,Ae[2]=0,Ae[3]=0,Ae[4]=0,Ae[5]=1/Fe[5],Ae[6]=0,Ae[7]=0,Ae[8]=0,Ae[9]=0,Ae[10]=0,Ae[11]=1/Fe[14],Ae[12]=0,Ae[13]=0,Ae[14]=-1,Ae[15]=Fe[10]/Fe[14],de[8]=2*-d.x/this._helper._width,de[9]=2*d.y/this._helper._height,this._projectionMatrix=i.bd(de),i.S(de,de,[1,-1,1]),i.Q(de,de,[0,0,-this._helper.cameraToCenterDistance]),i.be(de,de,-this.rollInRadians),i.bf(de,de,this.pitchInRadians),i.be(de,de,-this.bearingInRadians),i.Q(de,de,[-N,-H,0]),this._mercatorMatrix=i.S([],de,[this.worldSize,this.worldSize,this.worldSize]),i.S(de,de,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=i.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,de),i.Q(de,de,[0,0,-this.elevation]),this._viewProjMatrix=de,this._invViewProjMatrix=i.bg([],de);let Ie=[0,0,-1,1];i.aE(Ie,Ie,this._invViewProjMatrix),this._cameraPosition=[Ie[0]/Ie[3],Ie[1]/Ie[3],Ie[2]/Ie[3]],this._fogMatrix=new Float64Array(16),i.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,se,this._helper._farZ),this._fogMatrix[8]=2*-d.x/this.width,this._fogMatrix[9]=2*d.y/this.height,i.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),i.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),i.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),i.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),i.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),i.Q(this._fogMatrix,this._fogMatrix,[-N,-H,0]),i.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),i.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=i.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,de);let Ye=this._helper._width%2/2,st=this._helper._height%2/2,dt=Math.cos(this.bearingInRadians),Pe=Math.sin(-this.bearingInRadians),Xe=N-Math.round(N)+dt*Ye+Pe*st,at=H-Math.round(H)+dt*st+Pe*Ye,xt=new Float64Array(de);if(i.Q(xt,xt,[Xe>.5?Xe-1:Xe,at>.5?at-1:at,0]),this._alignedProjMatrix=xt,de=i.bg(new Float64Array(16),this._pixelMatrix),!de)throw new Error("failed to invert matrix");this._pixelMatrixInverse=de,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let d=this.screenPointToMercatorCoordinate(new i.P(0,0)),P=[d.x*this.worldSize,d.y*this.worldSize,0,1];return i.aE(P,P,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let d=i.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/d).toLngLat()}lngLatToCameraDepth(d,P){let N=i.a7.fromLngLat(d),H=[N.x*this.worldSize,N.y*this.worldSize,P,1];return i.aE(H,H,this._viewProjMatrix),H[2]/H[3]}getProjectionData(d){let{overscaledTileID:P,aligned:N,applyTerrainMatrix:H}=d,$=this._helper.getMercatorTileCoordinates(P),se=P?this.calculatePosMatrix(P,N,!0):null,de;return de=P!=null&&P.terrainRttPosMatrix32f&&H?P.terrainRttPosMatrix32f:se||i.bh(),{mainMatrix:de,tileMercatorCoords:$,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:de}}isLocationOccluded(d){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(d,P,N){return 1}transformLightDirection(d){return i.a$(d)}getRayDirectionFromPixel(d){throw new Error("Not implemented.")}projectTileCoordinates(d,P,N,H){let $=this.calculatePosMatrix(N),se;H?(se=[d,P,H(d,P),1],i.aE(se,se,$)):(se=[d,P,0,1],ao(se,se,$));let de=se[3];return{point:new i.P(se[0]/de,se[1]/de),signedDistanceFromCamera:de,isOccluded:!1}}populateCache(d){for(let P of d)this.calculatePosMatrix(P)}getMatrixForModel(d,P){let N=i.a7.fromLngLat(d,P),H=N.meterInMercatorCoordinateUnits(),$=i.bi();return i.Q($,$,[N.x,N.y,N.z]),i.be($,$,Math.PI),i.bf($,$,Math.PI/2),i.S($,$,[-H,H,H]),$}getProjectionDataForCustomLayer(d=!0){let P=new i.a3(0,0,0,0,0),N=this.getProjectionData({overscaledTileID:P,applyGlobeMatrix:d}),H=fr(P,this.worldSize);i.U(H,this._viewProjMatrix,H),N.tileMercatorCoords=[0,0,1,1];let $=[i.a6,i.a6,this.worldSize/this._helper.pixelsPerMeter],se=i.bj();return i.S(se,H,$),N.fallbackMatrix=se,N.mainMatrix=se,N}getFastPathSimpleProjectionMatrix(d){return this.calculatePosMatrix(d)}}function $s(){i.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Kc(Y){if(Y.useSlerp)if(Y.k<1){let d=i.bk(Y.startEulerAngles.roll,Y.startEulerAngles.pitch,Y.startEulerAngles.bearing),P=i.bk(Y.endEulerAngles.roll,Y.endEulerAngles.pitch,Y.endEulerAngles.bearing),N=new Float64Array(4);i.bl(N,d,P,Y.k);let H=i.bm(N);Y.tr.setRoll(H.roll),Y.tr.setPitch(H.pitch),Y.tr.setBearing(H.bearing)}else Y.tr.setRoll(Y.endEulerAngles.roll),Y.tr.setPitch(Y.endEulerAngles.pitch),Y.tr.setBearing(Y.endEulerAngles.bearing);else Y.tr.setRoll(i.H.number(Y.startEulerAngles.roll,Y.endEulerAngles.roll,Y.k)),Y.tr.setPitch(i.H.number(Y.startEulerAngles.pitch,Y.endEulerAngles.pitch,Y.k)),Y.tr.setBearing(i.H.number(Y.startEulerAngles.bearing,Y.endEulerAngles.bearing,Y.k))}function _u(Y,d,P,N,H){let $=H.padding,se=jt(H.worldSize,P.getNorthWest()),de=jt(H.worldSize,P.getNorthEast()),Ae=jt(H.worldSize,P.getSouthEast()),Fe=jt(H.worldSize,P.getSouthWest()),Ie=i.an(-N),Ye=se.rotate(Ie),st=de.rotate(Ie),dt=Ae.rotate(Ie),Pe=Fe.rotate(Ie),Xe=new i.P(Math.max(Ye.x,st.x,Pe.x,dt.x),Math.max(Ye.y,st.y,Pe.y,dt.y)),at=new i.P(Math.min(Ye.x,st.x,Pe.x,dt.x),Math.min(Ye.y,st.y,Pe.y,dt.y)),xt=Xe.sub(at),Et=(H.width-($.left+$.right+d.left+d.right))/xt.x,Bt=(H.height-($.top+$.bottom+d.top+d.bottom))/xt.y;if(Bt<0||Et<0)return void $s();let St=Math.min(i.ar(H.scale*Math.min(Et,Bt)),Y.maxZoom),Pt=i.P.convert(Y.offset),$t=new i.P((d.left-d.right)/2,(d.top-d.bottom)/2).rotate(i.an(N)),Ht=Pt.add($t).mult(H.scale/i.ao(St));return{center:mr(H.worldSize,se.add(Ae).div(2).sub(Ht)),zoom:St,bearing:N}}class Gu{get useGlobeControls(){return!1}handlePanInertia(d,P){let N=d.mag(),H=Math.abs(or(P));return{easingOffset:d.mult(Math.min(.75*H/N,1)),easingCenter:P.center}}handleMapControlsRollPitchBearingZoom(d,P){d.bearingDelta&&P.setBearing(P.bearing+d.bearingDelta),d.pitchDelta&&P.setPitch(P.pitch+d.pitchDelta),d.rollDelta&&P.setRoll(P.roll+d.rollDelta),d.zoomDelta&&P.setZoom(P.zoom+d.zoomDelta)}handleMapControlsPan(d,P,N){d.around.distSqr(P.centerPoint)<.01||P.setLocationAtPoint(N,d.around)}cameraForBoxAndBearing(d,P,N,H,$){return _u(d,P,N,H,$)}handleJumpToCenterZoom(d,P){d.zoom!==(P.zoom!==void 0?+P.zoom:d.zoom)&&d.setZoom(+P.zoom),P.center!==void 0&&d.setCenter(i.W.convert(P.center))}handleEaseTo(d,P){let N=d.zoom,H=d.padding,$={roll:d.roll,pitch:d.pitch,bearing:d.bearing},se={roll:P.roll===void 0?d.roll:P.roll,pitch:P.pitch===void 0?d.pitch:P.pitch,bearing:P.bearing===void 0?d.bearing:P.bearing},de=P.zoom!==void 0,Ae=!d.isPaddingEqual(P.padding),Fe=!1,Ie=de?+P.zoom:d.zoom,Ye=d.centerPoint.add(P.offsetAsPoint),st=d.screenPointToLocation(Ye),{center:dt,zoom:Pe}=d.applyConstrain(i.W.convert(P.center||st),Ie!=null?Ie:N);pa(d,dt);let Xe=jt(d.worldSize,st),at=jt(d.worldSize,dt).sub(Xe),xt=i.ao(Pe-N);return Fe=Pe!==N,{easeFunc:Et=>{if(Fe&&d.setZoom(i.H.number(N,Pe,Et)),i.bn($,se)||Kc({startEulerAngles:$,endEulerAngles:se,tr:d,k:Et,useSlerp:$.roll!=se.roll}),Ae&&(d.interpolatePadding(H,P.padding,Et),Ye=d.centerPoint.add(P.offsetAsPoint)),P.around)d.setLocationAtPoint(P.around,P.aroundPoint);else{let Bt=i.ao(d.zoom-N),St=Pe>N?Math.min(2,xt):Math.max(.5,xt),Pt=Math.pow(St,1-Et),$t=mr(d.worldSize,Xe.add(at.mult(Et*Pt)).mult(Bt));d.setLocationAtPoint(d.renderWorldCopies?$t.wrap():$t,Ye)}},isZooming:Fe,elevationCenter:dt}}handleFlyTo(d,P){let N=P.zoom!==void 0,H=d.zoom,$=d.applyConstrain(i.W.convert(P.center||P.locationAtOffset),N?+P.zoom:H),se=$.center,de=$.zoom;pa(d,se);let Ae=jt(d.worldSize,P.locationAtOffset),Fe=jt(d.worldSize,se).sub(Ae),Ie=Fe.mag(),Ye=i.ao(de-H),st;if(P.minZoom!==void 0){let dt=Math.min(+P.minZoom,H,de),Pe=d.applyConstrain(se,dt).zoom;st=i.ao(Pe-H)}return{easeFunc:(dt,Pe,Xe,at)=>{d.setZoom(dt===1?de:H+i.ar(Pe));let xt=dt===1?se:mr(d.worldSize,Ae.add(Fe.mult(Xe)).mult(Pe));d.setLocationAtPoint(d.renderWorldCopies?xt.wrap():xt,at)},scaleOfZoom:Ye,targetCenter:se,scaleOfMinZoom:st,pixelPathLength:Ie}}}class Ja{constructor(d,P,N){this.blendFunction=d,this.blendColor=P,this.mask=N}}Ja.Replace=[1,0],Ja.disabled=new Ja(Ja.Replace,i.bo.transparent,[!1,!1,!1,!1]),Ja.unblended=new Ja(Ja.Replace,i.bo.transparent,[!0,!0,!0,!0]),Ja.alphaBlended=new Ja([1,771],i.bo.transparent,[!0,!0,!0,!0]);let ps=2305;class Sa{constructor(d,P,N){this.enable=d,this.mode=P,this.frontFace=N}}Sa.disabled=new Sa(!1,1029,ps),Sa.backCCW=new Sa(!0,1029,ps),Sa.frontCCW=new Sa(!0,1028,ps);class ma{constructor(d,P,N){this.func=d,this.mask=P,this.range=N}}ma.ReadOnly=!1,ma.ReadWrite=!0,ma.disabled=new ma(519,ma.ReadOnly,[0,1]);let Ps=7680;class Ca{constructor(d,P,N,H,$,se){this.test=d,this.ref=P,this.mask=N,this.fail=H,this.depthFail=$,this.pass=se}}function Pl(Y){return typeof WebGL2RenderingContext!="undefined"&&Y instanceof WebGL2RenderingContext}Ca.disabled=new Ca({func:519,mask:0},0,0,Ps,Ps,Ps);class ll{get awaitingQuery(){return!!this._readbackQueue}constructor(d){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=d;let P=d.context,N=P.gl;this._texFormat=N.RGBA,this._texType=N.UNSIGNED_BYTE;let H=new i.aU;H.emplaceBack(-1,-1),H.emplaceBack(2,-1),H.emplaceBack(-1,2);let $=new i.aW;$.emplaceBack(0,1,2),this._fullscreenTriangle=new ka(P.createVertexBuffer(H,vs.members),P.createIndexBuffer($),i.aV.simpleSegment(0,0,H.length,$.length)),this._resultBuffer=new Uint8Array(4),P.activeTexture.set(N.TEXTURE1);let se=N.createTexture();N.bindTexture(N.TEXTURE_2D,se),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.NEAREST),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.NEAREST),N.texImage2D(N.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=P.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(se),Pl(N)&&(this._pbo=N.createBuffer(),N.bindBuffer(N.PIXEL_PACK_BUFFER,this._pbo),N.bufferData(N.PIXEL_PACK_BUFFER,4,N.STREAM_READ),N.bindBuffer(N.PIXEL_PACK_BUFFER,null))}destroy(){let d=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),d.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(d,P){let N=this._updateCount;return this._readbackQueue?N>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():N>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(d,P),this._updateCount++,this._measuredError}_bindFramebuffer(){let d=this._cachedRenderContext.context,P=d.gl;d.activeTexture.set(P.TEXTURE1),P.bindTexture(P.TEXTURE_2D,this._fbo.colorAttachment.get()),d.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(d,P){let N=this._cachedRenderContext.context,H=N.gl;if(this._bindFramebuffer(),N.viewport.set([0,0,this._texWidth,this._texHeight]),N.clear({color:i.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(N,H.TRIANGLES,ma.disabled,Ca.disabled,Ja.unblended,Sa.disabled,(($,se)=>({u_input:$,u_output_expected:se}))(d,P),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Pl(H)){H.bindBuffer(H.PIXEL_PACK_BUFFER,this._pbo),H.readBuffer(H.COLOR_ATTACHMENT0),H.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),H.bindBuffer(H.PIXEL_PACK_BUFFER,null);let $=H.fenceSync(H.SYNC_GPU_COMMANDS_COMPLETE,0);H.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:$}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let d=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Pl(d)){let P=d.clientWaitSync(this._readbackQueue.sync,0,0);if(P===d.WAIT_FAILED)return i.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(P===d.TIMEOUT_EXPIRED)return;d.bindBuffer(d.PIXEL_PACK_BUFFER,this._pbo),d.getBufferSubData(d.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),d.bindBuffer(d.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),d.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=ll._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(d){let P=0;return P+=d[0]/256,P+=d[1]/65536,P+=d[2]/16777216,d[3]<127&&(P=-P),P/128}}let Jc=i.a6/128;function lu(Y,d){let P=Y.granularity!==void 0?Math.max(Y.granularity,1):1,N=P+(Y.generateBorders?2:0),H=P+(Y.extendToNorthPole||Y.generateBorders?1:0)+(Y.extendToSouthPole||Y.generateBorders?1:0),$=N+1,se=H+1,de=Y.generateBorders?-1:0,Ae=Y.generateBorders||Y.extendToNorthPole?-1:0,Fe=P+(Y.generateBorders?1:0),Ie=P+(Y.generateBorders||Y.extendToSouthPole?1:0),Ye=$*se,st=N*H*6,dt=$*se>65536;if(dt&&d==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let Pe=dt||d==="32bit",Xe=new Int16Array(2*Ye),at=0;for(let Bt=Ae;Bt<=Ie;Bt++)for(let St=de;St<=Fe;St++){let Pt=St/P*i.a6;St===-1&&(Pt=-Jc),St===P+1&&(Pt=i.a6+Jc);let $t=Bt/P*i.a6;Bt===-1&&($t=Y.extendToNorthPole?i.bq:-Jc),Bt===P+1&&($t=Y.extendToSouthPole?i.br:i.a6+Jc),Xe[at++]=Pt,Xe[at++]=$t}let xt=Pe?new Uint32Array(st):new Uint16Array(st),Et=0;for(let Bt=0;Bt0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(d){this._mercatorProjection.updateGPUdependent(d),this._verticalPerspectiveProjection.updateGPUdependent(d)}getMeshFromTileID(d,P,N,H,$){return this.currentProjection.getMeshFromTileID(d,P,N,H,$)}setProjection(d){this._transitionable.setValue("type",(d==null?void 0:d.type)||"mercator")}updateTransitions(d){this._transitioning=this._transitionable.transitioned(d,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(d){this.properties=this._transitioning.possiblyEvaluate(d)}setErrorQueryLatitudeDegrees(d){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(d),this._mercatorProjection.setErrorQueryLatitudeDegrees(d)}}function kc(Y){let d=Ks(Y.worldSize,Y.center.lat);return 2*Math.PI*d}function Uo(Y,d,P,N,H){let $=1/(1<1e-6){let N=Y[0]/P,H=Math.acos(Y[2]/P),$=(N>0?H:-H)/Math.PI*180;return new i.W(i.X($,-180,180),d)}return new i.W(0,d)}function ju(Y){return Math.cos(Y*Math.PI/180)}function gs(Y,d){let P=ju(Y),N=ju(d);return i.ar(N/P)}function bu(Y,d){let P=Y.rotate(d.bearingInRadians),N=d.zoom+gs(d.center.lat,0),H=i.bt(1/ju(d.center.lat),1/ju(Math.min(Math.abs(d.center.lat),60)),i.bw(N,7,3,0,1)),$=360/kc({worldSize:d.worldSize,center:{lat:d.center.lat}});return new i.W(d.center.lng-P.x*$*H,i.al(d.center.lat+P.y*$,-i.am,i.am))}function kf(Y){let d=.5*Y,P=Math.sin(d),N=Math.cos(d);return Math.log(P+N)-Math.log(N-P)}function ah(Y,d,P,N){let H=Y.lat+P*N;if(Math.abs(P)>1){let $=(Math.sign(Y.lat+P)!==Math.sign(Y.lat)?-Math.abs(Y.lat):Math.abs(Y.lat))*Math.PI/180,se=Math.abs(Y.lat+P)*Math.PI/180,de=kf($+N*(se-$)),Ae=kf($),Fe=kf(se);return new i.W(Y.lng+d*((de-Ae)/(Fe-Ae)),H)}return new i.W(Y.lng+d*N,H)}class Od{constructor(d){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=d}swapBuffers(){if(!this._hadAnyChanges)return;let d=this._cachePrevious;this._cachePrevious=this._cache,this._cache=d,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(d,P,N,H){let $=`${d.z}_${d.x}_${d.y}_${H!=null&&H.terrain?"t":""}`,se=this._cache.get($);if(se)return se;let de=this._cachePrevious.get($);if(de)return this._cache.set($,de),de;let Ae=this._boundingVolumeFactory(d,P,N,H);return this._cache.set($,Ae),this._hadAnyChanges=!0,Ae}}class Qc{constructor(d,P,N,H){this.min=N,this.max=H,this.points=d,this.planes=P}static fromAabb(d,P){let N=[];for(let H=0;H<8;H++)N.push([1&~H?d[0]:P[0],(H>>1&1)==1?P[1]:d[1],(H>>2&1)==1?P[2]:d[2]]);return new Qc(N,[[-1,0,0,P[0]],[1,0,0,-d[0]],[0,-1,0,P[1]],[0,1,0,-d[1]],[0,0,-1,P[2]],[0,0,1,-d[2]]],d,P)}static fromCenterSizeAngles(d,P,N){let H=i.bA([],N[0],N[1],N[2]),$=i.bB([],[P[0],0,0],H),se=i.bB([],[0,P[1],0],H),de=i.bB([],[0,0,P[2]],H),Ae=[...d],Fe=[...d];for(let Ye=0;Ye<8;Ye++)for(let st=0;st<3;st++){let dt=d[st]+$[st]*(1&~Ye?-1:1)+se[st]*((Ye>>1&1)==1?1:-1)+de[st]*((Ye>>2&1)==1?1:-1);Ae[st]=Math.min(Ae[st],dt),Fe[st]=Math.max(Fe[st],dt)}let Ie=[];for(let Ye=0;Ye<8;Ye++){let st=[...d];i.a_(st,st,i.aZ([],$,1&~Ye?-1:1)),i.a_(st,st,i.aZ([],se,(Ye>>1&1)==1?1:-1)),i.a_(st,st,i.aZ([],de,(Ye>>2&1)==1?1:-1)),Ie.push(st)}return new Qc(Ie,[[...$,-i.b3($,Ie[0])],[...se,-i.b3(se,Ie[0])],[...de,-i.b3(de,Ie[0])],[-$[0],-$[1],-$[2],-i.b3($,Ie[7])],[-se[0],-se[1],-se[2],-i.b3(se,Ie[7])],[-de[0],-de[1],-de[2],-i.b3(de,Ie[7])]],Ae,Fe)}intersectsFrustum(d){let P=!0,N=this.points.length,H=this.planes.length,$=d.planes.length,se=d.points.length;for(let de=0;de<$;de++){let Ae=d.planes[de],Fe=0;for(let Ie=0;Ie=0&&Fe++}if(Fe===0)return 0;Fe=0&&Fe++}if(Fe===0)return 0}return 1}intersectsPlane(d){let P=this.points.length,N=0;for(let H=0;H=0&&N++}return N===P?2:N===0?0:1}}function uu(Y,d,P){let N=Y-d;return N<0?-N:Math.max(0,N-P)}function oh(Y,d,P,N,H){let $=Y-P,se;return se=$<0?Math.min(-$,1+$-H):$>H?Math.min(Math.max($-H,0),1-$):0,Math.max(se,uu(d,N,H))}class hc{constructor(){this._boundingVolumeCache=new Od(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(d,P,N,H){let $=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(d,P,N,H){return this._boundingVolumeCache.getTileBoundingVolume(d,P,N,H)}_computeTileBoundingVolume(d,P,N,H){var $,se;let de=0,Ae=0;if(H!=null&&H.terrain){let Fe=new i.a3(d.z,P,d.z,d.x,d.y),Ie=H.terrain.getMinMaxElevation(Fe);de=($=Ie.minElevation)!==null&&$!==void 0?$:Math.min(0,N),Ae=(se=Ie.maxElevation)!==null&&se!==void 0?se:Math.max(0,N)}if(de/=i.bD,Ae/=i.bD,de+=1,Ae+=1,d.z<=0)return Qc.fromAabb([-Ae,-Ae,-Ae],[Ae,Ae,Ae]);if(d.z===1)return Qc.fromAabb([d.x===0?-Ae:0,d.y===0?0:-Ae,-Ae],[d.x===0?0:Ae,d.y===0?Ae:0,Ae]);{let Fe=[Uo(0,0,d.x,d.y,d.z),Uo(i.a6,0,d.x,d.y,d.z),Uo(i.a6,i.a6,d.x,d.y,d.z),Uo(0,i.a6,d.x,d.y,d.z)],Ie=[];for(let $r of Fe)Ie.push(i.aZ([],$r,Ae));if(Ae!==de)for(let $r of Fe)Ie.push(i.aZ([],$r,de));d.y===0&&Ie.push([0,1,0]),d.y===(1<=(1<{let H=i.al(P.lat,-i.am,i.am),$=i.al(+N,this.minZoom+gs(0,H),this.maxZoom);return{center:new i.W(P.lng,H),zoom:$}},this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._coveringTilesDetailsProvider=new hc}clone(){let d=new Yo;return d.apply(this,!1),d}apply(d,P,N){this._globeLatitudeErrorCorrectionRadians=N||0,this._helper.apply(d,P)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let d=i.bz();return d[0]=this._cameraPosition[0],d[1]=this._cameraPosition[1],d[2]=this._cameraPosition[2],d}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(d){let{overscaledTileID:P,applyGlobeMatrix:N}=d,H=this._helper.getMercatorTileCoordinates(P);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:H,clippingPlane:this._cachedClippingPlane,projectionTransition:N?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(d){let P=this.pitchInRadians,N=this.cameraToCenterDistance/d,H=Math.sin(P)*N,$=Math.cos(P)*N+1,se=1/Math.sqrt(H*H+$*$)*1,de=-H,Ae=$,Fe=Math.sqrt(de*de+Ae*Ae);de/=Fe,Ae/=Fe;let Ie=[0,de,Ae];i.bF(Ie,Ie,[0,0,0],-this.bearingInRadians),i.bG(Ie,Ie,[0,0,0],-1*this.center.lat*Math.PI/180),i.bH(Ie,Ie,[0,0,0],this.center.lng*Math.PI/180);let Ye=1/i.b5(Ie);return i.aZ(Ie,Ie,Ye),[...Ie,-se*Ye]}isLocationOccluded(d){return!this.isSurfacePointVisible(ns(d))}transformLightDirection(d){let P=this._helper._center.lng*Math.PI/180,N=this._helper._center.lat*Math.PI/180,H=Math.cos(N),$=[Math.sin(P)*H,Math.sin(N),Math.cos(P)*H],se=[$[2],0,-$[0]],de=[0,0,0];i.b2(de,se,$),i.b1(se,se),i.b1(de,de);let Ae=[0,0,0];return i.b1(Ae,[se[0]*d[0]+de[0]*d[1]+$[0]*d[2],se[1]*d[0]+de[1]*d[1]+$[1]*d[2],se[2]*d[0]+de[2]*d[1]+$[2]*d[2]]),Ae}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(d,P,N){let H=(function(de,Ae,Fe){let Ie=1/(1<$&&($=st),dtde&&(de=dt)}let Ie=[Fe.lng+se,Fe.lat+Ae,Fe.lng+$,Fe.lat+de];return this.isSurfacePointOnScreen([0,1,0])&&(Ie[3]=90,Ie[0]=-180,Ie[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(Ie[1]=-90,Ie[0]=-180,Ie[2]=180),new ie(Ie)}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}setLocationAtPoint(d,P){let N=ns(this.unprojectScreenPoint(P)),H=ns(d),$=i.bz();i.bK($);let se=i.bz();i.bH(se,N,$,-this.center.lng*Math.PI/180),i.bG(se,se,$,this.center.lat*Math.PI/180);let de=H[0]*H[0]+H[2]*H[2],Ae=se[0]*se[0];if(de=-xt&&Pe<=xt,Bt=at>=-xt&&at<=xt,St,Pt;if(Et&&Bt){let Xr=this.center.lng*Math.PI/180,Or=this.center.lat*Math.PI/180;i.bM(Ye,Xr)+i.bM(Pe,Or)=0}isSurfacePointOnScreen(d){if(!this.isSurfacePointVisible(d))return!1;let P=i.bE();return i.aE(P,[...d,1],this._globeViewProjMatrixNoCorrection),P[0]/=P[3],P[1]/=P[3],P[2]/=P[3],P[0]>-1&&P[0]<1&&P[1]>-1&&P[1]<1&&P[2]>-1&&P[2]<1}rayPlanetIntersection(d,P){let N=i.b3(d,P),H=i.bz(),$=i.bz();i.aZ($,P,N),i.b0(H,d,$);let se=1-i.b3(H,H);if(se<0)return null;let de=i.b3(d,d)-1,Ae=-N+(N<0?1:-1)*Math.sqrt(se),Fe=de/Ae,Ie=Ae;return{tMin:Math.min(Fe,Ie),tMax:Math.max(Fe,Ie)}}unprojectScreenPoint(d){let P=this._cameraPosition,N=this.getRayDirectionFromPixel(d),H=this.rayPlanetIntersection(P,N);if(H){let Ie=i.bz();i.a_(Ie,P,[N[0]*H.tMin,N[1]*H.tMin,N[2]*H.tMin]);let Ye=i.bz();return i.b1(Ye,Ie),Ef(Ye)}let $=this._cachedClippingPlane,se=$[0]*N[0]+$[1]*N[1]+$[2]*N[2],de=-i.b9($,P)/se,Ae=i.bz();if(de>0)i.a_(Ae,P,[N[0]*de,N[1]*de,N[2]*de]);else{let Ie=i.bz();i.a_(Ie,P,[2*N[0],2*N[1],2*N[2]]);let Ye=i.b9(this._cachedClippingPlane,Ie);i.b0(Ae,Ie,[this._cachedClippingPlane[0]*Ye,this._cachedClippingPlane[1]*Ye,this._cachedClippingPlane[2]*Ye])}let Fe=(function(Ie){let Ye=i.bz();return Ye[0]=Ie[0]*-Ie[3],Ye[1]=Ie[1]*-Ie[3],Ye[2]=Ie[2]*-Ie[3],{center:Ye,radius:Math.sqrt(1-Ie[3]*Ie[3])}})($);return Ef((function(Ie,Ye,st){let dt=i.bz();i.b0(dt,st,Ie);let Pe=i.bz();return i.bx(Pe,Ie,dt,Ye/i.b7(dt)),Pe})(Fe.center,Fe.radius,Ae))}getMatrixForModel(d,P){let N=i.W.convert(d),H=1/i.bD,$=i.bi();return i.bI($,$,N.lng/180*Math.PI),i.bf($,$,-N.lat/180*Math.PI),i.Q($,$,[0,0,1+P/i.bD]),i.bf($,$,.5*Math.PI),i.S($,$,[H,H,H]),$}getProjectionDataForCustomLayer(d=!0){let P=this.getProjectionData({overscaledTileID:new i.a3(0,0,0,0,0),applyGlobeMatrix:d});return P.tileMercatorCoords=[0,0,1,1],P}getFastPathSimpleProjectionMatrix(d){}}class Ro{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(d){this._helper.setMinZoom(d)}setMaxZoom(d){this._helper.setMaxZoom(d)}setMinPitch(d){this._helper.setMinPitch(d)}setMaxPitch(d){this._helper.setMaxPitch(d)}setRenderWorldCopies(d){this._helper.setRenderWorldCopies(d)}setBearing(d){this._helper.setBearing(d)}setPitch(d){this._helper.setPitch(d)}setRoll(d){this._helper.setRoll(d)}setFov(d){this._helper.setFov(d)}setZoom(d){this._helper.setZoom(d)}setCenter(d){this._helper.setCenter(d)}setElevation(d){this._helper.setElevation(d)}setMinElevationForCurrentTile(d){this._helper.setMinElevationForCurrentTile(d)}setPadding(d){this._helper.setPadding(d)}interpolatePadding(d,P,N){this._helper.interpolatePadding(d,P,N)}isPaddingEqual(d){return this._helper.isPaddingEqual(d)}resize(d,P,N=!0){this._helper.resize(d,P,N)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(d){this._helper.setMaxBounds(d)}setConstrainOverride(d){this._helper.setConstrainOverride(d)}overrideNearFarZ(d,P){this._helper.overrideNearFarZ(d,P)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(d){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),d)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(d,P){this._globeness=d,this._globeLatitudeErrorCorrectionRadians=P,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(d){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(P,N)=>this.currentTransform.defaultConstrain(P,N),this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._globeness=1,this._mercatorTransform=new Ls,this._verticalPerspectiveTransform=new Yo}clone(){let d=new Ro;return d._globeness=this._globeness,d._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,d.apply(this,!1),d}apply(d,P){this._helper.apply(d,P),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(d){let P=this._mercatorTransform.getProjectionData(d),N=this._verticalPerspectiveTransform.getProjectionData(d);return{mainMatrix:this.isGlobeRendering?N.mainMatrix:P.mainMatrix,clippingPlane:N.clippingPlane,tileMercatorCoords:N.tileMercatorCoords,projectionTransition:d.applyGlobeMatrix?this._globeness:0,fallbackMatrix:P.fallbackMatrix}}isLocationOccluded(d){return this.currentTransform.isLocationOccluded(d)}transformLightDirection(d){return this.currentTransform.transformLightDirection(d)}getPixelScale(){return i.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return i.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(d,P,N){let H=this._mercatorTransform.getPitchedTextCorrection(d,P,N),$=this._verticalPerspectiveTransform.getPitchedTextCorrection(d,P,N);return i.bt(H,$,this._globeness)}projectTileCoordinates(d,P,N,H){return this.currentTransform.projectTileCoordinates(d,P,N,H)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(d){return this.currentTransform.calculateFogMatrix(d)}getVisibleUnwrappedCoordinates(d){return this.currentTransform.getVisibleUnwrappedCoordinates(d)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(d){this._mercatorTransform.recalculateZoomAndCenter(d),this._verticalPerspectiveTransform.recalculateZoomAndCenter(d)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(d,P){return this.currentTransform.lngLatToCameraDepth(d,P)}populateCache(d){this._mercatorTransform.populateCache(d),this._verticalPerspectiveTransform.populateCache(d)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}setLocationAtPoint(d,P){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(d,P),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(d,P),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(d,P){return this.currentTransform.locationToScreenPoint(d,P)}screenPointToMercatorCoordinate(d,P){return this.currentTransform.screenPointToMercatorCoordinate(d,P)}screenPointToLocation(d,P){return this.currentTransform.screenPointToLocation(d,P)}isPointOnMapSurface(d,P){return this.currentTransform.isPointOnMapSurface(d,P)}getRayDirectionFromPixel(d){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(d)}getMatrixForModel(d,P){return this.currentTransform.getMatrixForModel(d,P)}getProjectionDataForCustomLayer(d=!0){let P=this._mercatorTransform.getProjectionDataForCustomLayer(d);if(!this.isGlobeRendering)return P;let N=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(d);return N.fallbackMatrix=P.mainMatrix,N}getFastPathSimpleProjectionMatrix(d){return this.currentTransform.getFastPathSimpleProjectionMatrix(d)}}class is{get useGlobeControls(){return!0}handlePanInertia(d,P){let N=bu(d,P);return Math.abs(N.lng-P.center.lng)>180&&(N.lng=P.center.lng+179.5*Math.sign(N.lng-P.center.lng)),{easingCenter:N,easingOffset:new i.P(0,0)}}handleMapControlsRollPitchBearingZoom(d,P){let N=d.around,H=P.screenPointToLocation(N);d.bearingDelta&&P.setBearing(P.bearing+d.bearingDelta),d.pitchDelta&&P.setPitch(P.pitch+d.pitchDelta),d.rollDelta&&P.setRoll(P.roll+d.rollDelta);let $=P.zoom;d.zoomDelta&&P.setZoom(P.zoom+d.zoomDelta);let se=P.zoom-$;if(se===0)return;let de=i.bJ(P.center.lng,H.lng),Ae=de/(Math.abs(de/180)+1),Fe=i.bJ(P.center.lat,H.lat),Ie=P.getRayDirectionFromPixel(N),Ye=P.cameraPosition,st=-1*i.b3(Ye,Ie),dt=i.bz();i.a_(dt,Ye,[Ie[0]*st,Ie[1]*st,Ie[2]*st]);let Pe=i.b5(dt)-1,Xe=Math.exp(.5*-Math.max(Pe-.3,0)),at=Ks(P.worldSize,P.center.lat)/Math.min(P.width,P.height),xt=i.bw(at,.9,.5,1,.25),Et=(1-i.ao(-se))*Math.min(Xe,xt),Bt=P.center.lat,St=P.zoom,Pt=new i.W(P.center.lng+Ae*Et,i.al(P.center.lat+Fe*Et,-i.am,i.am));P.setLocationAtPoint(H,N);let $t=P.center,Ht=i.bw(Math.abs(de),45,85,0,1),dr=i.bw(at,.75,.35,0,1),Xr=Math.pow(Math.max(Ht,dr),.25),Or=i.bJ($t.lng,Pt.lng),$r=i.bJ($t.lat,Pt.lat);P.setCenter(new i.W($t.lng+Or*Xr,$t.lat+$r*Xr).wrap()),P.setZoom(St+gs(Bt,P.center.lat))}handleMapControlsPan(d,P,N){if(!d.panDelta)return;let H=P.center.lat,$=P.zoom;P.setCenter(bu(d.panDelta,P).wrap()),P.setZoom($+gs(H,P.center.lat))}cameraForBoxAndBearing(d,P,N,H,$){let se=_u(d,P,N,H,$),de=P.left/$.width*2-1,Ae=($.width-P.right)/$.width*2-1,Fe=P.top/$.height*-2+1,Ie=($.height-P.bottom)/$.height*-2+1,Ye=i.bJ(N.getWest(),N.getEast())<0,st=Ye?N.getEast():N.getWest(),dt=Ye?N.getWest():N.getEast(),Pe=Math.max(N.getNorth(),N.getSouth()),Xe=Math.min(N.getNorth(),N.getSouth()),at=st+.5*i.bJ(st,dt),xt=Pe+.5*i.bJ(Pe,Xe),Et=$.clone();Et.setCenter(se.center),Et.setBearing(se.bearing),Et.setPitch(0),Et.setRoll(0),Et.setZoom(se.zoom);let Bt=Et.modelViewProjectionMatrix,St=[ns(N.getNorthWest()),ns(N.getNorthEast()),ns(N.getSouthWest()),ns(N.getSouthEast()),ns(new i.W(dt,xt)),ns(new i.W(st,xt)),ns(new i.W(at,Pe)),ns(new i.W(at,Xe))],Pt=ns(se.center),$t=Number.POSITIVE_INFINITY;for(let Ht of St)de<0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"x",de))),Ae>0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"x",Ae))),Fe>0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"y",Fe))),Ie<0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"y",Ie)));if(Number.isFinite($t)&&$t!==0)return se.zoom=Math.min(Et.zoom+i.ar($t),d.maxZoom),se;$s()}handleJumpToCenterZoom(d,P){let N=d.center.lat,H=d.applyConstrain(P.center?i.W.convert(P.center):d.center,d.zoom).center;d.setCenter(H.wrap());let $=P.zoom!==void 0?+P.zoom:d.zoom+gs(N,H.lat);d.zoom!==$&&d.setZoom($)}handleEaseTo(d,P){let N=d.zoom,H=d.center,$=d.padding,se={roll:d.roll,pitch:d.pitch,bearing:d.bearing},de={roll:P.roll===void 0?d.roll:P.roll,pitch:P.pitch===void 0?d.pitch:P.pitch,bearing:P.bearing===void 0?d.bearing:P.bearing},Ae=P.zoom!==void 0,Fe=!d.isPaddingEqual(P.padding),Ie=!1,Ye=P.center?i.W.convert(P.center):H,st=d.applyConstrain(Ye,N).center;pa(d,st);let dt=d.clone();dt.setCenter(st),dt.setZoom(Ae?+P.zoom:N+gs(H.lat,Ye.lat)),dt.setBearing(P.bearing);let Pe=new i.P(i.al(d.centerPoint.x+P.offsetAsPoint.x,0,d.width),i.al(d.centerPoint.y+P.offsetAsPoint.y,0,d.height));dt.setLocationAtPoint(st,Pe);let Xe=(P.offset&&P.offsetAsPoint.mag())>0?dt.center:st,at=Ae?+P.zoom:N+gs(H.lat,Xe.lat),xt=N+gs(H.lat,0),Et=at+gs(Xe.lat,0),Bt=i.bJ(H.lng,Xe.lng),St=i.bJ(H.lat,Xe.lat),Pt=i.ao(Et-xt);return Ie=at!==N,{easeFunc:$t=>{if(i.bn(se,de)||Kc({startEulerAngles:se,endEulerAngles:de,tr:d,k:$t,useSlerp:se.roll!=de.roll}),Fe&&d.interpolatePadding($,P.padding,$t),P.around)i.w("Easing around a point is not supported under globe projection."),d.setLocationAtPoint(P.around,P.aroundPoint);else{let Ht=Et>xt?Math.min(2,Pt):Math.max(.5,Pt),dr=Math.pow(Ht,1-$t),Xr=ah(H,Bt,St,$t*dr);d.setCenter(Xr.wrap())}if(Ie){let Ht=i.H.number(xt,Et,$t)+gs(0,d.center.lat);d.setZoom(Ht)}},isZooming:Ie,elevationCenter:Xe}}handleFlyTo(d,P){let N=P.zoom!==void 0,H=d.center,$=d.zoom,se=d.padding,de=!d.isPaddingEqual(P.padding),Ae=d.applyConstrain(i.W.convert(P.center||P.locationAtOffset),$).center,Fe=N?+P.zoom:d.zoom+gs(d.center.lat,Ae.lat),Ie=d.clone();Ie.setCenter(Ae),Ie.setZoom(Fe),Ie.setBearing(P.bearing);let Ye=new i.P(i.al(d.centerPoint.x+P.offsetAsPoint.x,0,d.width),i.al(d.centerPoint.y+P.offsetAsPoint.y,0,d.height));Ie.setLocationAtPoint(Ae,Ye);let st=Ie.center;pa(d,st);let dt=(function(St,Pt,$t){let Ht=ns(Pt),dr=ns($t),Xr=i.b3(Ht,dr),Or=Math.acos(Xr),$r=kc(St);return Or/(2*Math.PI)*$r})(d,H,st),Pe=$+gs(H.lat,0),Xe=Fe+gs(st.lat,0),at=i.ao(Xe-Pe),xt;if(typeof P.minZoom=="number"){let St=+P.minZoom+gs(st.lat,0),Pt=Math.min(St,Pe,Xe)+gs(0,st.lat),$t=d.applyConstrain(st,Pt).zoom+gs(st.lat,0);xt=i.ao($t-Pe)}let Et=i.bJ(H.lng,st.lng),Bt=i.bJ(H.lat,st.lat);return{easeFunc:(St,Pt,$t,Ht)=>{let dr=ah(H,Et,Bt,$t);de&&d.interpolatePadding(se,P.padding,St);let Xr=St===1?st:dr;d.setCenter(Xr.wrap());let Or=Pe+i.ar(Pt);d.setZoom(St===1?Fe:Or+gs(0,Xr.lat))},scaleOfZoom:at,targetCenter:st,scaleOfMinZoom:xt,pixelPathLength:dt}}static solveVectorScale(d,P,N,H,$){let se=H==="x"?[N[0],N[4],N[8],N[12]]:[N[1],N[5],N[9],N[13]],de=[N[3],N[7],N[11],N[15]],Ae=d[0]*se[0]+d[1]*se[1]+d[2]*se[2],Fe=d[0]*de[0]+d[1]*de[1]+d[2]*de[2],Ie=P[0]*se[0]+P[1]*se[1]+P[2]*se[2],Ye=P[0]*de[0]+P[1]*de[1]+P[2]*de[2];return Ie+$*Fe===Ae+$*Ye||de[3]*(Ae-Ie)+se[3]*(Ye-Fe)+Ae*Ye==Ie*Fe?null:(Ie+se[3]-$*Ye-$*de[3])/(Ie-Ae-$*Ye+$*Fe)}static getLesserNonNegativeNonNull(d,P){return P!==null&&P>=0&&Pi.C(Y,d==null?void 0:d.filter((P=>P.identifier!=="source.canvas"))),ef=i.bN();class Cc extends i.E{constructor(d,P={}){var N,H;super(),this._rtlPluginLoaded=()=>{for(let se in this.tileManagers){let de=this.tileManagers[se].getSource().type;de!=="vector"&&de!=="geojson"||this.tileManagers[se].reload()}},this.map=d,this.dispatcher=new xe(ye(),d._getMapId()),this.dispatcher.registerMessageHandler("GG",((se,de)=>this.getGlyphs(se,de))),this.dispatcher.registerMessageHandler("GI",((se,de)=>this.getImages(se,de))),this.dispatcher.registerMessageHandler("GDA",((se,de)=>this.getDashes(se,de))),this.imageManager=new L,this.imageManager.setEventedParent(this);let $=((N=d._container)===null||N===void 0?void 0:N.lang)||typeof document!="undefined"&&((H=document.documentElement)===null||H===void 0?void 0:H.lang)||void 0;this.glyphManager=new E(d._requestManager,P.localIdeographFontFamily,$),this.lineAtlas=new j(256,512),this.crossTileSymbolIndex=new $a,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",i.bO()),tt().on(Ve,this._rtlPluginLoaded),this.on("data",(se=>{if(se.dataType!=="source"||se.sourceDataType!=="metadata")return;let de=this.tileManagers[se.sourceId];if(!de)return;let Ae=de.getSource();if(Ae!=null&&Ae.vectorLayerIds)for(let Fe in this._layers){let Ie=this._layers[Fe];Ie.source===Ae.id&&this._validateLayer(Ie)}}))}_setInitialValues(){var d;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new i.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((d=this.crossTileSymbolIndex)===null||d===void 0?void 0:d.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(d,P){var N,H,$;this._checkLoaded();let se=P===null?($=(H=(N=this.stylesheet.state)===null||N===void 0?void 0:N[d])===null||H===void 0?void 0:H.default)!==null&&$!==void 0?$:null:P;if(i.bQ(se,this._globalState[d]))return this;this._globalState[d]=se,this._applyGlobalStateChanges([d])}getGlobalState(){return this._globalState}setGlobalState(d){this._checkLoaded();let P=[];for(let N in d)!i.bQ(this._globalState[N],d[N].default)&&(P.push(N),this._globalState[N]=d[N].default);this._applyGlobalStateChanges(P)}_applyGlobalStateChanges(d){if(d.length===0)return;let P=new Set,N={};for(let H of d){N[H]=this._globalState[H];for(let $ in this._layers){let se=this._layers[$],de=se.getLayoutAffectingGlobalStateRefs(),Ae=se.getPaintAffectingGlobalStateRefs(),Fe=se.getVisibilityAffectingGlobalStateRefs();if(de.has(H)&&P.add(se.source),Ae.has(H))for(let{name:Ie,value:Ye}of Ae.get(H))this._updatePaintProperty(se,Ie,Ye);Fe!=null&&Fe.has(H)&&(se.recalculateVisibility(),this._updateLayer(se))}}this.dispatcher.broadcast("UGS",N);for(let H in this.tileManagers)P.has(H)&&(this._reloadSource(H),this._changed=!0)}loadURL(d){return i._(this,arguments,void 0,(function*(P,N={},H){this.fire(new i.n("dataloading",{dataType:"style"})),N.validate=typeof N.validate!="boolean"||N.validate,this._loadStyleRequest=new AbortController;let $=this._loadStyleRequest;try{let se=yield this.map._requestManager.transformRequest(P,"Style");i.bR($.signal);let de=yield i.k(se,$);this._loadStyleRequest===$&&(this._loadStyleRequest=null),this._load(de.data,N,H)}catch(se){this._loadStyleRequest===$&&(this._loadStyleRequest=null),se&&!$.signal.aborted&&this.fire(new i.l(i.d(se)))}}))}loadJSON(d,P={},N){this.fire(new i.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,f.frameAsync(this._frameRequest,this.map._ownerWindow).then((()=>{this._frameRequest=null,P.validate=P.validate!==!1,this._load(d,P,N)})).catch((()=>{}))}loadEmpty(){this.fire(new i.n("dataloading",{dataType:"style"})),this._load(ef,{validate:!1})}_load(d,P,N){var H,$;let se=P.transformStyle?P.transformStyle(N,d):d;if(!P.validate||!dc(this,i.F(se))){se=Object.assign({},se),this._loaded=!0,this.stylesheet=se;for(let de in se.sources)this.addSource(de,se.sources[de],{validate:!1});se.sprite?this._loadSprite(se.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(se.glyphs),this._createLayers(),this.light=new B(this.stylesheet.light),this._setProjectionInternal(((H=this.stylesheet.projection)===null||H===void 0?void 0:H.type)||"mercator"),this.sky=new V(this.stylesheet.sky),this.map.setTerrain(($=this.stylesheet.terrain)!==null&&$!==void 0?$:null),this.fire(new i.n("data",{dataType:"style"})),this.fire(new i.n("style.load"))}}_createLayers(){var d,P,N;let H=i.bS(this.stylesheet.layers);this.setGlobalState((d=this.stylesheet.state)!==null&&d!==void 0?d:null),this.dispatcher.broadcast("SL",H),this._order=H.map(($=>$.id)),this._layers={},this._serializedLayers=null;for(let $ of H){let se=i.bT($,this._globalState);if(se.setEventedParent(this,{layer:{id:$.id}}),this._layers[$.id]=se,i.bU(se)&&this.tileManagers[se.source]){let de=(N=(P=$.paint)===null||P===void 0?void 0:P["raster-fade-duration"])!==null&&N!==void 0?N:se.paint.get("raster-fade-duration");this.tileManagers[se.source].setRasterFadeDuration(de)}}}_loadSprite(d,P=!1,N=void 0){this.imageManager.setLoaded(!1);let H=new AbortController,$;this._spriteRequest=H,(function(se,de,Ae,Fe){return i._(this,void 0,void 0,(function*(){let Ie=C(se),Ye=Ae>1?"@2x":"",st={},dt={};for(let{id:Pe,url:Xe}of Ie){let at=yield de.transformRequest(k(Xe,Ye,".json"),"SpriteJSON");st[Pe]=i.k(at,Fe);let xt=yield de.transformRequest(k(Xe,Ye,".png"),"SpriteImage");dt[Pe]=x.getImage(xt,Fe)}return yield Promise.all([...Object.values(st),...Object.values(dt)]),(function(Pe,Xe){return i._(this,void 0,void 0,(function*(){let at={};for(let xt in Pe){at[xt]={};let Et=f.getImageCanvasContext((yield Xe[xt]).data),Bt=(yield Pe[xt]).data;for(let St in Bt){let{width:Pt,height:$t,x:Ht,y:dr,sdf:Xr,pixelRatio:Or,stretchX:$r,stretchY:Er,content:Tr,textFitWidth:Rr,textFitHeight:Lr}=Bt[St];at[xt][St]={data:null,pixelRatio:Or,sdf:Xr,stretchX:$r,stretchY:Er,content:Tr,textFitWidth:Rr,textFitHeight:Lr,spriteData:{width:Pt,height:$t,x:Ht,y:dr,context:Et}}}}return at}))})(st,dt)}))})(d,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((se=>{if(this._spriteRequest=null,se)for(let de in se){this._spritesImagesIds[de]=[];let Ae=this._spritesImagesIds[de]?this._spritesImagesIds[de].filter((Fe=>!(Fe in se))):[];for(let Fe of Ae)this.imageManager.removeImage(Fe),this._changedImages[Fe]=!0;for(let Fe in se[de]){let Ie=de==="default"?Fe:`${de}:${Fe}`;this._spritesImagesIds[de].push(Ie),Ie in this.imageManager.images?this.imageManager.updateImage(Ie,se[de][Fe],!1):this.imageManager.addImage(Ie,se[de][Fe]),P&&(this._changedImages[Ie]=!0)}}})).catch((se=>{this._spriteRequest=null,$=se,H.signal.aborted||this.fire(new i.l($))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),P&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"})),N&&N($)}))}_unloadSprite(){for(let d of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(d),this._changedImages[d]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}_validateLayer(d){let P=this.tileManagers[d.source];if(!P)return;let N=d.sourceLayer;if(!N)return;let H=P.getSource();(H.type==="geojson"||H.vectorLayerIds&&!H.vectorLayerIds.includes(N))&&this.fire(new i.l(new Error(`Source layer "${N}" does not exist on source "${H.id}" as specified by style layer "${d.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let d in this.tileManagers)if(!this.tileManagers[d].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(d,P=!1){let N=this._serializedAllLayers();if(!d||d.length===0)return Object.values(P?i.bV(N):N);let H=[];for(let $ of d)if(N[$]){let se=P?i.bV(N[$]):N[$];H.push(se)}return H}_serializedAllLayers(){let d=this._serializedLayers;if(d)return d;d=this._serializedLayers={};let P=Object.keys(this._layers);for(let N of P){let H=this._layers[N];H.type!=="custom"&&(d[N]=H.serialize())}return d}hasTransitions(){var d,P,N;if(!((d=this.light)===null||d===void 0)&&d.hasTransition()||!((P=this.sky)===null||P===void 0)&&P.hasTransition()||!((N=this.projection)===null||N===void 0)&&N.hasTransition())return!0;for(let H in this.tileManagers)if(this.tileManagers[H].hasTransition())return!0;for(let H in this._layers)if(this._layers[H].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(d){if(!this._loaded)return;let P=this._changed;if(P){let H=Object.keys(this._updatedLayers),$=Object.keys(this._removedLayers);(H.length||$.length)&&this._updateWorkerLayers(H,$);for(let se in this._updatedSources){let de=this._updatedSources[se];if(de==="reload")this._reloadSource(se);else{if(de!=="clear")throw new Error(`Invalid action ${de}`);this._clearSource(se)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let se in this._updatedPaintProps)this._layers[se].updateTransitions(d);this.light.updateTransitions(d),this.sky.updateTransitions(d),this._resetUpdates()}let N={};for(let H in this.tileManagers){let $=this.tileManagers[H];N[H]=$.used,$.used=!1}for(let H of this._order){let $=this._layers[H];$.recalculate(d,this._availableImages),!$.isHidden(d.zoom)&&$.source&&(this.tileManagers[$.source].used=!0)}for(let H in N){let $=this.tileManagers[H];!!N[H]!=!!$.used&&$.fire(new i.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:H}))}this.light.recalculate(d),this.sky.recalculate(d),this.projection.recalculate(d),this.z=d.zoom,P&&this.fire(new i.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let d=Object.keys(this._changedImages);if(d.length){for(let P in this.tileManagers)this.tileManagers[P].reloadTilesForDependencies(["icons","patterns"],d);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let d in this.tileManagers)this.tileManagers[d].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(d,P){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(d,!1),removedIds:P})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(d,P={}){var N;this._checkLoaded();let H=this.serialize();if(d=P.transformStyle?P.transformStyle(H,d):d,((N=P.validate)===null||N===void 0||N)&&dc(this,i.F(d)))return!1;(d=i.bV(d)).layers=i.bS(d.layers);let $=i.bW(H,d),se=this._getOperationsToPerform($);if(se.unimplemented.length>0)throw new Error(`Unimplemented: ${se.unimplemented.join(", ")}.`);if(se.operations.length===0)return!1;for(let de of se.operations)de();return this.stylesheet=d,this._serializedLayers=null,this.fire(new i.n("style.load",{style:this})),!0}_getOperationsToPerform(d){let P=[],N=[];for(let H of d)switch(H.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":P.push((()=>this.addLayer.apply(this,H.args)));break;case"removeLayer":P.push((()=>this.removeLayer.apply(this,H.args)));break;case"setPaintProperty":P.push((()=>this.setPaintProperty.apply(this,H.args)));break;case"setLayoutProperty":P.push((()=>this.setLayoutProperty.apply(this,H.args)));break;case"setFilter":P.push((()=>this.setFilter.apply(this,H.args)));break;case"addSource":P.push((()=>this.addSource.apply(this,H.args)));break;case"removeSource":P.push((()=>this.removeSource.apply(this,H.args)));break;case"setLayerZoomRange":P.push((()=>this.setLayerZoomRange.apply(this,H.args)));break;case"setLight":P.push((()=>this.setLight.apply(this,H.args)));break;case"setGeoJSONSourceData":P.push((()=>this.setGeoJSONSourceData.apply(this,H.args)));break;case"setGlyphs":P.push((()=>this.setGlyphs.apply(this,H.args)));break;case"setSprite":P.push((()=>this.setSprite.apply(this,H.args)));break;case"setTerrain":P.push((()=>this.map.setTerrain.apply(this,H.args)));break;case"setSky":P.push((()=>this.setSky.apply(this,H.args)));break;case"setProjection":this.setProjection.apply(this,H.args);break;case"setGlobalState":P.push((()=>this.setGlobalState.apply(this,H.args)));break;case"setTransition":P.push((()=>{}));break;default:N.push(H.command)}return{operations:P,unimplemented:N}}addImage(d,P){if(this.getImage(d))return this.fire(new i.l(new Error(`An image named "${d}" already exists.`)));this.imageManager.addImage(d,P),this._afterImageUpdated(d)}updateImage(d,P){this.imageManager.updateImage(d,P)}getImage(d){return this.imageManager.getImage(d)}removeImage(d){if(!this.getImage(d))return this.fire(new i.l(new Error(`An image named "${d}" does not exist.`)));this.imageManager.removeImage(d),this._afterImageUpdated(d)}_afterImageUpdated(d){this._availableImages=this.imageManager.listImages(),this._changedImages[d]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(d,P,N={}){var H;if(this._checkLoaded(),this.tileManagers[d]!==void 0)throw new Error(`Source "${d}" already exists.`);if(!P.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(P).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(P.type)&&this._validate(i.F.source,`sources.${d}`,P,null,N))return;!((H=this.map)===null||H===void 0)&&H._collectResourceTiming&&(P.collectResourceTiming=!0);let $=this.tileManagers[d]=new Zr(d,P,this.dispatcher);$.style=this,$.setEventedParent(this,(()=>({isSourceLoaded:$.loaded(),source:$.serialize(),sourceId:d}))),$.onAdd(this.map),this._changed=!0}removeSource(d){if(this._checkLoaded(),this.tileManagers[d]===void 0)throw new Error(`There is no source with this ID=${d}`);for(let N in this._layers)if(this._layers[N].source===d)return this.fire(new i.l(new Error(`Source "${d}" cannot be removed while layer "${N}" is using it.`)));let P=this.tileManagers[d];delete this.tileManagers[d],delete this._updatedSources[d],P.fire(new i.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:d})),P.setEventedParent(null),P.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(d,P){if(this._checkLoaded(),this.tileManagers[d]===void 0)throw new Error(`There is no source with this ID=${d}`);let N=this.tileManagers[d].getSource();if(N.type!=="geojson")throw new Error(`geojsonSource.type is ${N.type}, which is !== 'geojson`);N.setData(P),this._changed=!0}getSource(d){var P;return(P=this.tileManagers[d])===null||P===void 0?void 0:P.getSource()}addLayer(d,P,N={}){this._checkLoaded();let H=d.id;if(this.getLayer(H))return void this.fire(new i.l(new Error(`Layer "${H}" already exists on this map.`)));let $;if(d.type==="custom"){if(dc(this,i.bX(d)))return;$=i.bT(d,this._globalState)}else{if("source"in d&&typeof d.source=="object"&&(this.addSource(H,d.source),d=i.bV(d),d=i.e(d,{source:H})),this._validate(i.F.layer,`layers.${H}`,d,{arrayIndex:-1},N))return;$=i.bT(d,this._globalState),this._validateLayer($),$.setEventedParent(this,{layer:{id:H}})}let se=P?this._order.indexOf(P):this._order.length;if(P&&se===-1)this.fire(new i.l(new Error(`Cannot add layer "${H}" before non-existing layer "${P}".`)));else{if(this._order.splice(se,0,H),this._layerOrderChanged=!0,this._layers[H]=$,this._removedLayers[H]&&$.source&&$.type!=="custom"){let de=this._removedLayers[H];delete this._removedLayers[H],de.type!==$.type?this._updatedSources[$.source]="clear":(this._updatedSources[$.source]="reload",this.tileManagers[$.source].pause())}this._updateLayer($),$.onAdd&&$.onAdd(this.map)}}moveLayer(d,P){if(this._checkLoaded(),this._changed=!0,!this._layers[d])return void this.fire(new i.l(new Error(`The layer '${d}' does not exist in the map's style and cannot be moved.`)));if(d===P)return;let N=this._order.indexOf(d);this._order.splice(N,1);let H=P?this._order.indexOf(P):this._order.length;P&&H===-1?this.fire(new i.l(new Error(`Cannot move layer "${d}" before non-existing layer "${P}".`))):(this._order.splice(H,0,d),this._layerOrderChanged=!0)}removeLayer(d){this._checkLoaded();let P=this._layers[d];if(!P)return void this.fire(new i.l(new Error(`Cannot remove non-existing layer "${d}".`)));P.setEventedParent(null);let N=this._order.indexOf(d);this._order.splice(N,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[d]=P,delete this._layers[d],this._serializedLayers&&delete this._serializedLayers[d],delete this._updatedLayers[d],delete this._updatedPaintProps[d],P.onRemove&&P.onRemove(this.map)}getLayer(d){return this._layers[d]}getLayersOrder(){return[...this._order]}hasLayer(d){return d in this._layers}setLayerZoomRange(d,P,N){this._checkLoaded();let H=this.getLayer(d);H?H.minzoom===P&&H.maxzoom===N||(P!=null&&(H.minzoom=P),N!=null&&(H.maxzoom=N),this._updateLayer(H)):this.fire(new i.l(new Error(`Cannot set the zoom range of non-existing layer "${d}".`)))}setFilter(d,P,N={}){this._checkLoaded();let H=this.getLayer(d);if(H){if(!i.bQ(H.filter,P))return P==null?(H.setFilter(void 0),void this._updateLayer(H)):void(this._validate(i.F.filter,`layers.${H.id}.filter`,P,null,N)||(H.setFilter(i.bV(P)),this._updateLayer(H)))}else this.fire(new i.l(new Error(`Cannot filter non-existing layer "${d}".`)))}getFilter(d){return i.bV(this.getLayer(d).filter)}setLayoutProperty(d,P,N,H={}){this._checkLoaded();let $=this.getLayer(d);$?i.bQ($.getLayoutProperty(P),N)||($.setLayoutProperty(P,N,H),this._updateLayer($)):this.fire(new i.l(new Error(`Cannot style non-existing layer "${d}".`)))}getLayoutProperty(d,P){let N=this.getLayer(d);if(N)return N.getLayoutProperty(P);this.fire(new i.l(new Error(`Cannot get style of non-existing layer "${d}".`)))}setPaintProperty(d,P,N,H={}){this._checkLoaded();let $=this.getLayer(d);$?i.bQ($.getPaintProperty(P),N)||this._updatePaintProperty($,P,N,H):this.fire(new i.l(new Error(`Cannot style non-existing layer "${d}".`)))}_updatePaintProperty(d,P,N,H={}){d.setPaintProperty(P,N,H)&&this._updateLayer(d),i.bU(d)&&P==="raster-fade-duration"&&this.tileManagers[d.source].setRasterFadeDuration(N),this._changed=!0,this._updatedPaintProps[d.id]=!0,this._serializedLayers=null}getPaintProperty(d,P){return this.getLayer(d).getPaintProperty(P)}setFeatureState(d,P){this._checkLoaded();let N=d.source,H=d.sourceLayer,$=this.tileManagers[N];if($===void 0)return void this.fire(new i.l(new Error(`The source '${N}' does not exist in the map's style.`)));let se=$.getSource().type;se==="geojson"&&H?this.fire(new i.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):se!=="vector"||H?(d.id===void 0&&this.fire(new i.l(new Error("The feature id parameter must be provided."))),$.setFeatureState(H,d.id,P)):this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(d,P){this._checkLoaded();let N=d.source,H=this.tileManagers[N];if(H===void 0)return void this.fire(new i.l(new Error(`The source '${N}' does not exist in the map's style.`)));let $=H.getSource().type,se=$==="vector"?d.sourceLayer:void 0;$!=="vector"||se?P&&typeof d.id!="string"&&typeof d.id!="number"?this.fire(new i.l(new Error("A feature id is required to remove its specific state property."))):H.removeFeatureState(se,d.id,P):this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(d){this._checkLoaded();let P=d.source,N=d.sourceLayer,H=this.tileManagers[P];if(H!==void 0)return H.getSource().type!=="vector"||N?(d.id===void 0&&this.fire(new i.l(new Error("The feature id parameter must be provided."))),H.getFeatureState(N,d.id)):void this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new i.l(new Error(`The source '${P}' does not exist in the map's style.`)))}getTransition(){var d;return i.e({duration:300,delay:0},(d=this.stylesheet)===null||d===void 0?void 0:d.transition)}serialize(){if(!this._loaded)return;let d=i.bY(this.tileManagers,($=>$.serialize())),P=this._serializeByIds(this._order,!0),N=this.map.getTerrain()||void 0,H=this.stylesheet;return i.bZ({version:H.version,name:H.name,metadata:H.metadata,light:H.light,sky:H.sky,center:H.center,zoom:H.zoom,bearing:H.bearing,pitch:H.pitch,sprite:H.sprite,glyphs:H.glyphs,transition:H.transition,projection:H.projection,sources:d,layers:P,terrain:N},($=>$!==void 0))}_updateLayer(d){this._updatedLayers[d.id]=!0,d.source&&!this._updatedSources[d.source]&&this.tileManagers[d.source].getSource().type!=="raster"&&(this._updatedSources[d.source]="reload",this.tileManagers[d.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(d){let P=se=>this._layers[se].type==="fill-extrusion",N={},H=[];for(let se=this._order.length-1;se>=0;se--){let de=this._order[se];if(P(de)){N[de]=se;for(let Ae of d){let Fe=Ae[de];if(Fe)for(let Ie of Fe)H.push(Ie)}}}H.sort(((se,de)=>de.intersectionZ-se.intersectionZ));let $=[];for(let se=this._order.length-1;se>=0;se--){let de=this._order[se];if(P(de))for(let Ae=H.length-1;Ae>=0;Ae--){let Fe=H[Ae].feature;if(N[Fe.layer.id]this.map.terrain.getElevation(Ie,Ye,st):void 0));return this.placement&&$.push((function(Fe,Ie,Ye,st,dt,Pe,Xe){let at={},xt=Pe.queryRenderedSymbols(st),Et=[];for(let Bt of Object.keys(xt).map(Number))Et.push(Xe[Bt]);Et.sort(ne);for(let Bt of Et){let St=Bt.featureIndex.lookupSymbolFeatures(xt[Bt.bucketInstanceId],Ie,Bt.bucketIndex,Bt.sourceLayerIndex,{filterSpec:dt.filter,globalState:dt.globalState},dt.layers,dt.availableImages,Fe);for(let Pt in St){at[Pt]||(at[Pt]=[]);let $t=St[Pt];$t.sort(((Ht,dr)=>{let Xr=Bt.featureSortOrder;if(Xr){let Or=Xr.indexOf(Ht.featureIndex);return Xr.indexOf(dr.featureIndex)-Or}return dr.featureIndex-Ht.featureIndex}));for(let Ht of $t)at[Pt].push(Ht)}}return(function(Bt,St,Pt){for(let $t in Bt)for(let Ht of Bt[$t])ae(Ht,Pt[St[$t].source]);return Bt})(at,Fe,Ye)})(this._layers,se,this.tileManagers,d,Ae,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures($)}querySourceFeatures(d,P){P!=null&&P.filter&&this._validate(i.F.filter,"querySourceFeatures.filter",P.filter,null,P);let N=this.tileManagers[d];return N?(function(H,$){let se=H.getRenderableIds().map((Fe=>H.getTileByID(Fe))),de=[],Ae={};for(let Fe of se){let Ie=Fe.tileID.canonical.key;Ae[Ie]||(Ae[Ie]=!0,Fe.querySourceFeatures(de,$))}return de})(N,P?Object.assign(Object.assign({},P),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(d,P={}){this._checkLoaded();let N=this.light.getLight(),H=!1;for(let se in d)if(!i.bQ(d[se],N[se])){H=!0;break}if(!H)return;let $={now:g(),transition:i.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(d,P),this.light.updateTransitions($)}getProjection(){var d;return(d=this.stylesheet)===null||d===void 0?void 0:d.projection}setProjection(d){this._checkLoaded();let P=d!=null?d:{type:"mercator"};if(this.stylesheet.projection=d,this.projection){if(this.projection.name===P.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(P.type)}getSky(){var d;return(d=this.stylesheet)===null||d===void 0?void 0:d.sky}setSky(d,P={}){this._checkLoaded();let N=this.getSky(),H=!1;if(!d&&!N)return;if(d&&!N)H=!0;else if(!d&&N)H=!0;else for(let se in d)if(!i.bQ(d[se],N[se])){H=!0;break}if(!H)return;let $={now:g(),transition:i.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=d,this.sky.setSky(d,P),this.sky.updateTransitions($)}_setProjectionInternal(d){let P=(function(N,H){let $={constrainOverride:H};if(Array.isArray(N)){let se=new Sf({type:N});return{projection:se,transform:new Ro($),cameraHelper:new Dl(se)}}switch(N){case"mercator":return{projection:new oo,transform:new Ls($),cameraHelper:new Gu};case"globe":{let se=new Sf({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:se,transform:new Ro($),cameraHelper:new Dl(se)}}case"vertical-perspective":return{projection:new Bd,transform:new Yo($),cameraHelper:new is};default:return i.w(`Unknown projection name: ${N}. Falling back to mercator projection.`),{projection:new oo,transform:new Ls($),cameraHelper:new Gu}}})(d,this.map.transformConstrain);this.projection=P.projection,this.map.migrateProjection(P.transform,P.cameraHelper);for(let N in this.tileManagers)this.tileManagers[N].reload()}_validate(d,P,N,H,$={}){return($==null?void 0:$.validate)!==!1&&dc(this,d.call(i.F,i.e({key:P,style:this.serialize(),value:N,styleSpec:i.x},H)))}_remove(d=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),tt().off(Ve,this._rtlPluginLoaded);for(let P in this._layers)this._layers[P].setEventedParent(null);for(let P in this.tileManagers){let N=this.tileManagers[P];N.setEventedParent(null),N.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),d&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(d)}_clearSource(d){this.tileManagers[d].clearTiles()}_reloadSource(d){this.tileManagers[d].resume(),this.tileManagers[d].reload()}_updateSources(d){for(let P in this.tileManagers)this.tileManagers[P].update(d,this.map.terrain)}_generateCollisionBoxes(){for(let d in this.tileManagers)this._reloadSource(d)}_updatePlacement(d,P,N,H,$=!1){let se=!1,de=!1,Ae={};for(let Fe of this._order){let Ie=this._layers[Fe];if(Ie.type!=="symbol")continue;if(!Ae[Ie.source]){let st=this.tileManagers[Ie.source];Ae[Ie.source]=st.getRenderableIds(!0).map((dt=>st.getTileByID(dt))).sort(((dt,Pe)=>Pe.tileID.overscaledZ-dt.tileID.overscaledZ||(dt.tileID.isLessThan(Pe.tileID)?-1:1)))}let Ye=this.crossTileSymbolIndex.addLayer(Ie,Ae[Ie.source],d.center.lng);se||(se=Ye)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),$||($=this._layerOrderChanged||N===0),($||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(g(),d.zoom))&&(this.pauseablePlacement=new Ra(d,this.map.terrain,this._order,$,P,N,H,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ae),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(g()),de=!0),se&&this.pauseablePlacement.placement.setStale()),de||se)for(let Fe of this._order){let Ie=this._layers[Fe];Ie.type==="symbol"&&this.placement.updateLayerOpacities(Ie,Ae[Ie.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(g())}_releaseSymbolFadeTiles(){for(let d in this.tileManagers)this.tileManagers[d].releaseSymbolFadeTiles()}getImages(d,P){return i._(this,void 0,void 0,(function*(){let N=yield this.imageManager.getImages(P.icons);this._updateTilesForChangedImages();let H=this.tileManagers[P.source];return H&&H.setDependencies(P.tileID.key,P.type,P.icons),N}))}getGlyphs(d,P){return i._(this,void 0,void 0,(function*(){let N=yield this.glyphManager.getGlyphs(P.stacks),H=this.tileManagers[P.source];return H&&H.setDependencies(P.tileID.key,P.type,[""]),N}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(d,P={}){this._checkLoaded(),d&&this._validate(i.F.glyphs,"glyphs",d,null,P)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=d,this.glyphManager.entries={},this.glyphManager.setURL(d))}getDashes(d,P){return i._(this,void 0,void 0,(function*(){let N={};for(let[H,$]of Object.entries(P.dashes))N[H]=this.lineAtlas.getDash($.dasharray,$.round);return N}))}addSprite(d,P,N={},H){this._checkLoaded();let $=[{id:d,url:P}],se=[...C(this.stylesheet.sprite),...$];this._validate(i.F.sprite,"sprite",se,null,N)||(this.stylesheet.sprite=se,this._loadSprite($,!0,H))}removeSprite(d){this._checkLoaded();let P=C(this.stylesheet.sprite);if(P.find((N=>N.id===d))){if(this._spritesImagesIds[d])for(let N of this._spritesImagesIds[d])this.imageManager.removeImage(N),this._changedImages[N]=!0;P.splice(P.findIndex((N=>N.id===d)),1),this.stylesheet.sprite=P.length>0?P:void 0,delete this._spritesImagesIds[d],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}else this.fire(new i.l(new Error(`Sprite "${d}" doesn't exists on this map.`)))}getSprite(){return C(this.stylesheet.sprite)}setSprite(d,P={},N){this._checkLoaded(),d&&this._validate(i.F.sprite,"sprite",d,null,P)||(this.stylesheet.sprite=d,d?this._loadSprite(d,!0,N):(this._unloadSprite(),N&&N(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let d in this.tileManagers){let P=this.tileManagers[d];P.setEventedParent(null),P.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let d in this._layers){let P=this._layers[d];P.setEventedParent(null),P.onRemove&&P.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var sh=i.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Y0{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(d,P,N,H,$,se,de,Ae,Fe){this.context=d;let Ie=this.boundPaintVertexBuffers.length!==H.length;for(let Ye=0;!Ie&&Ye({u_texture:0,u_ele_delta:Y,u_fog_matrix:d,u_fog_color:P?P.properties.get("fog-color"):i.bo.white,u_fog_ground_blend:P?P.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:H?0:P?P.calculateFogBlendOpacity(N):0,u_horizon_color:P?P.properties.get("horizon-color"):i.bo.white,u_horizon_fog_blend:P?P.properties.get("horizon-fog-blend"):1,u_is_globe_mode:H?1:0}),Cf={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function Vo(Y){let d=[];for(let P of Y){if(P===null)continue;let N=P.split(" ");d.push(N.pop())}return d}class Ud{constructor(d,P,N,H,$,se,de,Ae,Fe=[]){let Ie=d.gl;this.program=Ie.createProgram();let Ye=Vo(P.staticAttributes),st=N?N.getBinderAttributes():[],dt=Ye.concat(st),Pe=Oa.prelude.staticUniforms?Vo(Oa.prelude.staticUniforms):[],Xe=de.staticUniforms?Vo(de.staticUniforms):[],at=P.staticUniforms?Vo(P.staticUniforms):[],xt=N?N.getBinderUniforms():[],Et=Pe.concat(Xe).concat(at).concat(xt),Bt=[];for(let Or of Et)Bt.includes(Or)||Bt.push(Or);let St=N?N.defines():[];Pl(Ie)&&St.unshift("#version 300 es"),$&&St.push("#define OVERDRAW_INSPECTOR;"),se&&St.push("#define TERRAIN3D;"),Ae&&St.push(Ae),Fe&&St.push(...Fe);let Pt=St.concat(Oa.prelude.fragmentSource,de.fragmentSource,P.fragmentSource).join(` +`),$t=St.concat(Oa.prelude.vertexSource,de.vertexSource,P.vertexSource).join(` +`);Pl(Ie)||(Pt=(function(Or){return Or.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")})(Pt),$t=(function(Or){return Or.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")})($t));let Ht=Ie.createShader(Ie.FRAGMENT_SHADER);if(Ie.isContextLost())return void(this.failedToCreate=!0);if(Ie.shaderSource(Ht,Pt),Ie.compileShader(Ht),!Ie.getShaderParameter(Ht,Ie.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Ie.getShaderInfoLog(Ht)}`);Ie.attachShader(this.program,Ht);let dr=Ie.createShader(Ie.VERTEX_SHADER);if(Ie.isContextLost())return void(this.failedToCreate=!0);if(Ie.shaderSource(dr,$t),Ie.compileShader(dr),!Ie.getShaderParameter(dr,Ie.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Ie.getShaderInfoLog(dr)}`);Ie.attachShader(this.program,dr),this.attributes={};let Xr={};this.numAttributes=dt.length;for(let Or=0;Or({u_depth:new i.b_(Or,$r.u_depth),u_terrain:new i.b_(Or,$r.u_terrain),u_terrain_dim:new i.bp(Or,$r.u_terrain_dim),u_terrain_matrix:new i.c0(Or,$r.u_terrain_matrix),u_terrain_unpack:new i.c1(Or,$r.u_terrain_unpack),u_terrain_exaggeration:new i.bp(Or,$r.u_terrain_exaggeration)}))(d,Xr),this.projectionUniforms=((Or,$r)=>({u_projection_matrix:new i.c0(Or,$r.u_projection_matrix),u_projection_tile_mercator_coords:new i.c1(Or,$r.u_projection_tile_mercator_coords),u_projection_clipping_plane:new i.c1(Or,$r.u_projection_clipping_plane),u_projection_transition:new i.bp(Or,$r.u_projection_transition),u_projection_fallback_matrix:new i.c0(Or,$r.u_projection_fallback_matrix)}))(d,Xr),this.binderUniforms=N?N.getUniforms(d,Xr):[]}draw(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,dt,Pe,Xe,at,xt,Et,Bt){var St;let Pt=d.gl;if(this.failedToCreate)return;if(d.program.set(this.program),d.setDepthMode(N),d.setStencilMode(H),d.setColorMode($),d.setCullFace(se),Ae){d.activeTexture.set(Pt.TEXTURE2),Pt.bindTexture(Pt.TEXTURE_2D,Ae.depthTexture),d.activeTexture.set(Pt.TEXTURE3),Pt.bindTexture(Pt.TEXTURE_2D,Ae.texture);for(let Ht in this.terrainUniforms)this.terrainUniforms[Ht].set(Ae[Ht])}if(Fe)for(let Ht in Fe)this.projectionUniforms[Cf[Ht]].set(Fe[Ht]);if(de)for(let Ht in this.fixedUniforms)this.fixedUniforms[Ht].set(de[Ht]);at&&at.setUniforms(d,this.binderUniforms,Pe,{zoom:Xe});let $t=0;switch(P){case Pt.LINES:$t=2;break;case Pt.TRIANGLES:$t=3;break;case Pt.LINE_STRIP:$t=1}for(let Ht of dt.get())Ht.vaos||(Ht.vaos={}),(St=Ht.vaos)[Ie]||(St[Ie]=new Y0),Ht.vaos[Ie].bind(d,this,Ye,at?at.getPaintVertexBuffers():[],st,Ht.vertexOffset,xt,Et,Bt),Pt.drawElements(P,Ht.primitiveLength*$t,Pt.UNSIGNED_SHORT,Ht.primitiveOffset*$t*2)}}function zh(Y,d,P){let N=1/i.aK(P,1,d.transform.tileZoom),H=Math.pow(2,P.tileID.overscaledZ),$=P.tileSize*Math.pow(2,d.transform.tileZoom)/H,se=$*(P.tileID.canonical.x+P.tileID.wrap*H),de=$*P.tileID.canonical.y;return{u_image:0,u_texsize:P.imageAtlasTexture.size,u_scale:[N,Y.fromScale,Y.toScale],u_fade:Y.t,u_pixel_coord_upper:[se>>16,de>>16],u_pixel_coord_lower:[65535&se,65535&de]}}let tf=(Y,d,P,N)=>{let H=Y.style.light,$=H.properties.get("position"),se=[$.x,$.y,$.z],de=i.c4();H.properties.get("anchor")==="viewport"&&i.c5(de,Y.transform.bearingInRadians),i.c6(se,se,de);let Ae=Y.transform.transformLightDirection(se),Fe=H.properties.get("color");return{u_lightpos:se,u_lightpos_globe:Ae,u_lightintensity:H.properties.get("intensity"),u_lightcolor:[Fe.r,Fe.g,Fe.b],u_vertical_gradient:+d,u_opacity:P,u_fill_translate:N}},Vd=(Y,d,P,N,H,$,se)=>i.e(tf(Y,d,P,N),zh($,Y,se),{u_height_factor:-Math.pow(2,H.overscaledZ)/se.tileSize/8}),rf=(Y,d,P,N)=>i.e(zh(d,Y,P),{u_fill_translate:N}),qh=(Y,d)=>({u_world:Y,u_fill_translate:d}),vc=(Y,d,P,N,H)=>i.e(rf(Y,d,P,H),{u_world:N}),dd=(Y,d,P,N,H)=>{let $=Y.transform,se,de,Ae=0;if(P.paint.get("circle-pitch-alignment")==="map"){let Fe=i.aK(d,1,$.zoom);se=!0,de=[Fe,Fe],Ae=Fe/(i.a6*Math.pow(2,d.tileID.overscaledZ))*2*Math.PI*H}else se=!1,de=$.pixelsToGLUnits;return{u_camera_to_center_distance:$.cameraToCenterDistance,u_scale_with_map:+(P.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+se,u_device_pixel_ratio:Y.pixelRatio,u_extrude_scale:de,u_globe_extrude_scale:Ae,u_translate:N}},Bh=Y=>({u_pixel_extrude_scale:[1/Y.width,1/Y.height]}),Wu=Y=>({u_viewport_size:[Y.width,Y.height]}),vd=(Y,d=1)=>({u_color:Y,u_overlay:0,u_overlay_scale:d}),pd=(Y,d,P,N)=>{let H=i.aK(Y,1,d)/(i.a6*Math.pow(2,Y.tileID.overscaledZ))*2*Math.PI*N;return{u_extrude_scale:i.aK(Y,1,d),u_intensity:P,u_globe_extrude_scale:H}},lh=(Y,d,P,N)=>{let H=i.O();i.c7(H,0,Y.width,Y.height,0,0,1);let $=Y.context.gl;return{u_matrix:H,u_world:[$.drawingBufferWidth,$.drawingBufferHeight],u_image:P,u_color_ramp:N,u_opacity:d.paint.get("heatmap-opacity")}},nf=(Y,d,P)=>{let N=P.paint.get("hillshade-accent-color"),H;switch(P.paint.get("hillshade-method")){case"basic":H=4;break;case"combined":H=1;break;case"igor":H=2;break;case"multidirectional":H=3;break;default:H=0}let $=P.getIlluminationProperties();for(let se=0;se<$.directionRadians.length;se++)P.paint.get("hillshade-illumination-anchor")==="viewport"&&($.directionRadians[se]+=Y.transform.bearingInRadians);return{u_image:0,u_latrange:af(0,d.tileID),u_exaggeration:P.paint.get("hillshade-exaggeration"),u_altitudes:$.altitudeRadians,u_azimuths:$.directionRadians,u_accent:N,u_method:H,u_highlights:$.highlightColor,u_shadows:$.shadowColor}},uh=(Y,d)=>{let P=d.stride,N=i.O();return i.c7(N,0,i.a6,-i.a6,0,0,1),i.Q(N,N,[0,-i.a6,0]),{u_matrix:N,u_image:1,u_dimension:[P,P],u_zoom:Y.overscaledZ,u_unpack:d.getUnpackVector()}};function af(Y,d){let P=Math.pow(2,d.canonical.z),N=d.canonical.y;return[new i.a7(0,N/P).toLngLat().lat,new i.a7(0,(N+1)/P).toLngLat().lat]}let gd=(Y,d,P=0)=>({u_image:0,u_unpack:d.getUnpackVector(),u_dimension:[d.stride,d.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:P,u_opacity:Y.paint.get("color-relief-opacity")}),Rl=(Y,d,P,N)=>{let H=Y.transform;return{u_translation:wu(Y,d,P),u_ratio:N/i.aK(d,1,H.zoom),u_device_pixel_ratio:Y.pixelRatio,u_units_to_pixels:[1/H.pixelsToGLUnits[0],1/H.pixelsToGLUnits[1]]}},ch=(Y,d,P,N,H)=>i.e(Rl(Y,d,P,N),{u_image:0,u_image_height:H}),Lc=(Y,d,P,N,H)=>{let $=Y.transform,se=Lf(d,$);return{u_translation:wu(Y,d,P),u_texsize:d.imageAtlasTexture.size,u_ratio:N/i.aK(d,1,$.zoom),u_device_pixel_ratio:Y.pixelRatio,u_image:0,u_scale:[se,H.fromScale,H.toScale],u_fade:H.t,u_units_to_pixels:[1/$.pixelsToGLUnits[0],1/$.pixelsToGLUnits[1]]}},md=(Y,d,P,N,H)=>{let $=Lf(d,Y.transform);return i.e(Rl(Y,d,P,N),{u_tileratio:$,u_crossfade_from:H.fromScale,u_crossfade_to:H.toScale,u_image:0,u_mix:H.t,u_lineatlas_width:Y.lineAtlas.width,u_lineatlas_height:Y.lineAtlas.height})},yd=(Y,d,P,N,H,$)=>{let se=Lf(d,Y.transform);return i.e(Rl(Y,d,P,N),{u_image:0,u_image_height:$,u_tileratio:se,u_crossfade_from:H.fromScale,u_crossfade_to:H.toScale,u_image_dash:1,u_mix:H.t,u_lineatlas_width:Y.lineAtlas.width,u_lineatlas_height:Y.lineAtlas.height})};function Lf(Y,d){return 1/i.aK(Y,1,d.tileZoom)}function wu(Y,d,P){return i.aL(Y.transform,d,P.paint.get("line-translate"),P.paint.get("line-translate-anchor"))}let fh=(Y,d,P,N,H)=>{return{u_tl_parent:Y,u_scale_parent:d,u_buffer_scale:1,u_fade_t:P.mix,u_opacity:P.opacity*N.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:N.paint.get("raster-brightness-min"),u_brightness_high:N.paint.get("raster-brightness-max"),u_saturation_factor:(se=N.paint.get("raster-saturation"),se>0?1-1/(1.001-se):-se),u_contrast_factor:($=N.paint.get("raster-contrast"),$>0?1/(1-$):1+$),u_spin_weights:Oh(N.paint.get("raster-hue-rotate")),u_coords_top:[H[0].x,H[0].y,H[1].x,H[1].y],u_coords_bottom:[H[3].x,H[3].y,H[2].x,H[2].y]};var $,se};function Oh(Y){Y*=Math.PI/180;let d=Math.sin(Y),P=Math.cos(Y);return[(2*P+1)/3,(-Math.sqrt(3)*d-P+1)/3,(Math.sqrt(3)*d-P+1)/3]}let hh=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st)=>{let dt=se.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:d?d.uSizeT:0,u_size:d?d.uSize:0,u_camera_to_center_distance:dt.cameraToCenterDistance,u_pitch:dt.pitch/360*2*Math.PI,u_rotate_symbol:+P,u_aspect_ratio:dt.width/dt.height,u_fade_change:se.options.fadeDuration?se.symbolFadeChange:1,u_label_plane_matrix:de,u_coord_matrix:Ae,u_is_text:+Ie,u_pitch_with_map:+N,u_is_along_line:H,u_is_variable_anchor:$,u_texsize:Ye,u_texture:0,u_translation:Fe,u_pitched_scale:st}},Gd=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,dt)=>{let Pe=se.transform;return i.e(hh(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,dt),{u_gamma_scale:N?Math.cos(Pe.pitch*Math.PI/180)*Pe.cameraToCenterDistance:1,u_device_pixel_ratio:se.pixelRatio,u_is_halo:st?1:0,u_is_plain:1})},Gl=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st)=>i.e(Gd(Y,d,P,N,H,$,se,de,Ae,Fe,!0,Ie,!0,st),{u_texsize_icon:Ye,u_texture_icon:1}),wl=(Y,d)=>({u_opacity:Y,u_color:d}),xd=(Y,d,P,N,H)=>i.e((function($,se,de,Ae){let Fe=de.imageManager.getPattern($.from.toString()),Ie=de.imageManager.getPattern($.to.toString()),{width:Ye,height:st}=de.imageManager.getPixelSize(),dt=Math.pow(2,Ae.tileID.overscaledZ),Pe=Ae.tileSize*Math.pow(2,de.transform.tileZoom)/dt,Xe=Pe*(Ae.tileID.canonical.x+Ae.tileID.wrap*dt),at=Pe*Ae.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Ie.tl,u_pattern_br_b:Ie.br,u_texsize:[Ye,st],u_mix:se.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Ie.displaySize,u_scale_a:se.fromScale,u_scale_b:se.toScale,u_tile_units_to_pixels:1/i.aK(Ae,1,de.transform.tileZoom),u_pixel_coord_upper:[Xe>>16,at>>16],u_pixel_coord_lower:[65535&Xe,65535&at]}})(P,H,d,N),{u_opacity:Y}),Hl=(Y,d)=>{},_d={fillExtrusion:(Y,d)=>({u_lightpos:new i.c2(Y,d.u_lightpos),u_lightpos_globe:new i.c2(Y,d.u_lightpos_globe),u_lightintensity:new i.bp(Y,d.u_lightintensity),u_lightcolor:new i.c2(Y,d.u_lightcolor),u_vertical_gradient:new i.bp(Y,d.u_vertical_gradient),u_opacity:new i.bp(Y,d.u_opacity),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillExtrusionPattern:(Y,d)=>({u_lightpos:new i.c2(Y,d.u_lightpos),u_lightpos_globe:new i.c2(Y,d.u_lightpos_globe),u_lightintensity:new i.bp(Y,d.u_lightintensity),u_lightcolor:new i.c2(Y,d.u_lightcolor),u_vertical_gradient:new i.bp(Y,d.u_vertical_gradient),u_height_factor:new i.bp(Y,d.u_height_factor),u_opacity:new i.bp(Y,d.u_opacity),u_fill_translate:new i.c3(Y,d.u_fill_translate),u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade)}),fill:(Y,d)=>({u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillPattern:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillOutline:(Y,d)=>({u_world:new i.c3(Y,d.u_world),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillOutlinePattern:(Y,d)=>({u_world:new i.c3(Y,d.u_world),u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),circle:(Y,d)=>({u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_scale_with_map:new i.b_(Y,d.u_scale_with_map),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_extrude_scale:new i.c3(Y,d.u_extrude_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_globe_extrude_scale:new i.bp(Y,d.u_globe_extrude_scale),u_translate:new i.c3(Y,d.u_translate)}),collisionBox:(Y,d)=>({u_pixel_extrude_scale:new i.c3(Y,d.u_pixel_extrude_scale)}),collisionCircle:(Y,d)=>({u_viewport_size:new i.c3(Y,d.u_viewport_size)}),debug:(Y,d)=>({u_color:new i.b$(Y,d.u_color),u_overlay:new i.b_(Y,d.u_overlay),u_overlay_scale:new i.bp(Y,d.u_overlay_scale)}),depth:Hl,clippingMask:Hl,heatmap:(Y,d)=>({u_extrude_scale:new i.bp(Y,d.u_extrude_scale),u_intensity:new i.bp(Y,d.u_intensity),u_globe_extrude_scale:new i.bp(Y,d.u_globe_extrude_scale)}),heatmapTexture:(Y,d)=>({u_matrix:new i.c0(Y,d.u_matrix),u_world:new i.c3(Y,d.u_world),u_image:new i.b_(Y,d.u_image),u_color_ramp:new i.b_(Y,d.u_color_ramp),u_opacity:new i.bp(Y,d.u_opacity)}),hillshade:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_latrange:new i.c3(Y,d.u_latrange),u_exaggeration:new i.bp(Y,d.u_exaggeration),u_altitudes:new i.c9(Y,d.u_altitudes),u_azimuths:new i.c9(Y,d.u_azimuths),u_accent:new i.b$(Y,d.u_accent),u_method:new i.b_(Y,d.u_method),u_shadows:new i.c8(Y,d.u_shadows),u_highlights:new i.c8(Y,d.u_highlights)}),hillshadePrepare:(Y,d)=>({u_matrix:new i.c0(Y,d.u_matrix),u_image:new i.b_(Y,d.u_image),u_dimension:new i.c3(Y,d.u_dimension),u_zoom:new i.bp(Y,d.u_zoom),u_unpack:new i.c1(Y,d.u_unpack)}),colorRelief:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_unpack:new i.c1(Y,d.u_unpack),u_dimension:new i.c3(Y,d.u_dimension),u_elevation_stops:new i.b_(Y,d.u_elevation_stops),u_color_stops:new i.b_(Y,d.u_color_stops),u_color_ramp_size:new i.b_(Y,d.u_color_ramp_size),u_opacity:new i.bp(Y,d.u_opacity)}),line:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels)}),lineGradient:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_image_height:new i.bp(Y,d.u_image_height)}),linePattern:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_texsize:new i.c3(Y,d.u_texsize),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_image:new i.b_(Y,d.u_image),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade)}),lineSDF:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_mix:new i.bp(Y,d.u_mix),u_tileratio:new i.bp(Y,d.u_tileratio),u_crossfade_from:new i.bp(Y,d.u_crossfade_from),u_crossfade_to:new i.bp(Y,d.u_crossfade_to),u_lineatlas_width:new i.bp(Y,d.u_lineatlas_width),u_lineatlas_height:new i.bp(Y,d.u_lineatlas_height)}),lineGradientSDF:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_image_height:new i.bp(Y,d.u_image_height),u_tileratio:new i.bp(Y,d.u_tileratio),u_crossfade_from:new i.bp(Y,d.u_crossfade_from),u_crossfade_to:new i.bp(Y,d.u_crossfade_to),u_image_dash:new i.b_(Y,d.u_image_dash),u_mix:new i.bp(Y,d.u_mix),u_lineatlas_width:new i.bp(Y,d.u_lineatlas_width),u_lineatlas_height:new i.bp(Y,d.u_lineatlas_height)}),raster:(Y,d)=>({u_tl_parent:new i.c3(Y,d.u_tl_parent),u_scale_parent:new i.bp(Y,d.u_scale_parent),u_buffer_scale:new i.bp(Y,d.u_buffer_scale),u_fade_t:new i.bp(Y,d.u_fade_t),u_opacity:new i.bp(Y,d.u_opacity),u_image0:new i.b_(Y,d.u_image0),u_image1:new i.b_(Y,d.u_image1),u_brightness_low:new i.bp(Y,d.u_brightness_low),u_brightness_high:new i.bp(Y,d.u_brightness_high),u_saturation_factor:new i.bp(Y,d.u_saturation_factor),u_contrast_factor:new i.bp(Y,d.u_contrast_factor),u_spin_weights:new i.c2(Y,d.u_spin_weights),u_coords_top:new i.c1(Y,d.u_coords_top),u_coords_bottom:new i.c1(Y,d.u_coords_bottom)}),symbolIcon:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texture:new i.b_(Y,d.u_texture),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),symbolSDF:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texture:new i.b_(Y,d.u_texture),u_gamma_scale:new i.bp(Y,d.u_gamma_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_is_halo:new i.b_(Y,d.u_is_halo),u_is_plain:new i.b_(Y,d.u_is_plain),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),symbolTextAndIcon:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texsize_icon:new i.c3(Y,d.u_texsize_icon),u_texture:new i.b_(Y,d.u_texture),u_texture_icon:new i.b_(Y,d.u_texture_icon),u_gamma_scale:new i.bp(Y,d.u_gamma_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_is_halo:new i.b_(Y,d.u_is_halo),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),background:(Y,d)=>({u_opacity:new i.bp(Y,d.u_opacity),u_color:new i.b$(Y,d.u_color)}),backgroundPattern:(Y,d)=>({u_opacity:new i.bp(Y,d.u_opacity),u_image:new i.b_(Y,d.u_image),u_pattern_tl_a:new i.c3(Y,d.u_pattern_tl_a),u_pattern_br_a:new i.c3(Y,d.u_pattern_br_a),u_pattern_tl_b:new i.c3(Y,d.u_pattern_tl_b),u_pattern_br_b:new i.c3(Y,d.u_pattern_br_b),u_texsize:new i.c3(Y,d.u_texsize),u_mix:new i.bp(Y,d.u_mix),u_pattern_size_a:new i.c3(Y,d.u_pattern_size_a),u_pattern_size_b:new i.c3(Y,d.u_pattern_size_b),u_scale_a:new i.bp(Y,d.u_scale_a),u_scale_b:new i.bp(Y,d.u_scale_b),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_tile_units_to_pixels:new i.bp(Y,d.u_tile_units_to_pixels)}),terrain:(Y,d)=>({u_texture:new i.b_(Y,d.u_texture),u_ele_delta:new i.bp(Y,d.u_ele_delta),u_fog_matrix:new i.c0(Y,d.u_fog_matrix),u_fog_color:new i.b$(Y,d.u_fog_color),u_fog_ground_blend:new i.bp(Y,d.u_fog_ground_blend),u_fog_ground_blend_opacity:new i.bp(Y,d.u_fog_ground_blend_opacity),u_horizon_color:new i.b$(Y,d.u_horizon_color),u_horizon_fog_blend:new i.bp(Y,d.u_horizon_fog_blend),u_is_globe_mode:new i.bp(Y,d.u_is_globe_mode)}),terrainDepth:(Y,d)=>({u_ele_delta:new i.bp(Y,d.u_ele_delta)}),terrainCoords:(Y,d)=>({u_texture:new i.b_(Y,d.u_texture),u_terrain_coords_id:new i.bp(Y,d.u_terrain_coords_id),u_ele_delta:new i.bp(Y,d.u_ele_delta)}),projectionErrorMeasurement:(Y,d)=>({u_input:new i.bp(Y,d.u_input),u_output_expected:new i.bp(Y,d.u_output_expected)}),atmosphere:(Y,d)=>({u_sun_pos:new i.c2(Y,d.u_sun_pos),u_atmosphere_blend:new i.bp(Y,d.u_atmosphere_blend),u_globe_position:new i.c2(Y,d.u_globe_position),u_globe_radius:new i.bp(Y,d.u_globe_radius),u_inv_proj_matrix:new i.c0(Y,d.u_inv_proj_matrix)}),sky:(Y,d)=>({u_sky_color:new i.b$(Y,d.u_sky_color),u_horizon_color:new i.b$(Y,d.u_horizon_color),u_horizon:new i.c3(Y,d.u_horizon),u_horizon_normal:new i.c3(Y,d.u_horizon_normal),u_sky_horizon_blend:new i.bp(Y,d.u_sky_horizon_blend),u_sky_blend:new i.bp(Y,d.u_sky_blend)})};class dh{constructor(d,P,N){this.context=d;let H=d.gl;this.buffer=H.createBuffer(),this.dynamicDraw=!!N,this.context.unbindVAO(),d.bindElementBuffer.set(this.buffer),H.bufferData(H.ELEMENT_ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?H.DYNAMIC_DRAW:H.STATIC_DRAW),this.dynamicDraw||P.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(d){let P=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),P.bufferSubData(P.ELEMENT_ARRAY_BUFFER,0,d.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Pf={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Hd{constructor(d,P,N,H){this.length=P.length,this.attributes=N,this.itemSize=P.bytesPerElement,this.dynamicDraw=H,this.context=d;let $=d.gl;this.buffer=$.createBuffer(),d.bindVertexBuffer.set(this.buffer),$.bufferData($.ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?$.DYNAMIC_DRAW:$.STATIC_DRAW),this.dynamicDraw||P.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(d){if(d.length!==this.length)throw new Error(`Length of new data is ${d.length}, which doesn't match current length of ${this.length}`);let P=this.context.gl;this.bind(),P.bufferSubData(P.ARRAY_BUFFER,0,d.arrayBuffer)}enableAttributes(d,P){for(let N of this.attributes){let H=P.attributes[N.name];H!==void 0&&d.enableVertexAttribArray(H)}}setVertexAttribPointers(d,P,N){for(let H of this.attributes){let $=P.attributes[H.name];$!==void 0&&d.vertexAttribPointer($,H.components,d[Pf[H.type]],!1,this.itemSize,H.offset+this.itemSize*(N||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class xo{constructor(d){this.gl=d.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(d){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class p0 extends xo{getDefault(){return i.bo.transparent}set(d){let P=this.current;(d.r!==P.r||d.g!==P.g||d.b!==P.b||d.a!==P.a||this.dirty)&&(this.gl.clearColor(d.r,d.g,d.b,d.a),this.current=d,this.dirty=!1)}}class Tu extends xo{getDefault(){return 1}set(d){(d!==this.current||this.dirty)&&(this.gl.clearDepth(d),this.current=d,this.dirty=!1)}}class Au extends xo{getDefault(){return 0}set(d){(d!==this.current||this.dirty)&&(this.gl.clearStencil(d),this.current=d,this.dirty=!1)}}class Il extends xo{getDefault(){return[!0,!0,!0,!0]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||d[3]!==P[3]||this.dirty)&&(this.gl.colorMask(d[0],d[1],d[2],d[3]),this.current=d,this.dirty=!1)}}class g0 extends xo{getDefault(){return!0}set(d){(d!==this.current||this.dirty)&&(this.gl.depthMask(d),this.current=d,this.dirty=!1)}}class Yu extends xo{getDefault(){return 255}set(d){(d!==this.current||this.dirty)&&(this.gl.stencilMask(d),this.current=d,this.dirty=!1)}}class Nh extends xo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(d){let P=this.current;(d.func!==P.func||d.ref!==P.ref||d.mask!==P.mask||this.dirty)&&(this.gl.stencilFunc(d.func,d.ref,d.mask),this.current=d,this.dirty=!1)}}class Tl extends xo{getDefault(){let d=this.gl;return[d.KEEP,d.KEEP,d.KEEP]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||this.dirty)&&(this.gl.stencilOp(d[0],d[1],d[2]),this.current=d,this.dirty=!1)}}class jl extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.STENCIL_TEST):P.disable(P.STENCIL_TEST),this.current=d,this.dirty=!1}}class Uh extends xo{getDefault(){return[0,1]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||this.dirty)&&(this.gl.depthRange(d[0],d[1]),this.current=d,this.dirty=!1)}}class Vh extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.DEPTH_TEST):P.disable(P.DEPTH_TEST),this.current=d,this.dirty=!1}}class jd extends xo{getDefault(){return this.gl.LESS}set(d){(d!==this.current||this.dirty)&&(this.gl.depthFunc(d),this.current=d,this.dirty=!1)}}class pc extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.BLEND):P.disable(P.BLEND),this.current=d,this.dirty=!1}}class gc extends xo{getDefault(){let d=this.gl;return[d.ONE,d.ZERO]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||this.dirty)&&(this.gl.blendFunc(d[0],d[1]),this.current=d,this.dirty=!1)}}class of extends xo{getDefault(){return i.bo.transparent}set(d){let P=this.current;(d.r!==P.r||d.g!==P.g||d.b!==P.b||d.a!==P.a||this.dirty)&&(this.gl.blendColor(d.r,d.g,d.b,d.a),this.current=d,this.dirty=!1)}}class sf extends xo{getDefault(){return this.gl.FUNC_ADD}set(d){(d!==this.current||this.dirty)&&(this.gl.blendEquation(d),this.current=d,this.dirty=!1)}}class bd extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.CULL_FACE):P.disable(P.CULL_FACE),this.current=d,this.dirty=!1}}class Gh extends xo{getDefault(){return this.gl.BACK}set(d){(d!==this.current||this.dirty)&&(this.gl.cullFace(d),this.current=d,this.dirty=!1)}}class Xu extends xo{getDefault(){return this.gl.CCW}set(d){(d!==this.current||this.dirty)&&(this.gl.frontFace(d),this.current=d,this.dirty=!1)}}class Pc extends xo{getDefault(){return null}set(d){(d!==this.current||this.dirty)&&(this.gl.useProgram(d),this.current=d,this.dirty=!1)}}class Ff extends xo{getDefault(){return this.gl.TEXTURE0}set(d){(d!==this.current||this.dirty)&&(this.gl.activeTexture(d),this.current=d,this.dirty=!1)}}class Df extends xo{getDefault(){let d=this.gl;return[0,0,d.drawingBufferWidth,d.drawingBufferHeight]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||d[3]!==P[3]||this.dirty)&&(this.gl.viewport(d[0],d[1],d[2],d[3]),this.current=d,this.dirty=!1)}}class La extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindFramebuffer(P.FRAMEBUFFER,d),this.current=d,this.dirty=!1}}class Rf extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindRenderbuffer(P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}class m0 extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindTexture(P.TEXTURE_2D,d),this.current=d,this.dirty=!1}}class wd extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindBuffer(P.ARRAY_BUFFER,d),this.current=d,this.dirty=!1}}class Hh extends xo{getDefault(){return null}set(d){let P=this.gl;P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,d),this.current=d,this.dirty=!1}}class X0 extends xo{getDefault(){return null}set(d){var P;if(d===this.current&&!this.dirty)return;let N=this.gl;Pl(N)?N.bindVertexArray(d):(P=N.getExtension("OES_vertex_array_object"))===null||P===void 0||P.bindVertexArrayOES(d),this.current=d,this.dirty=!1}}class y0 extends xo{getDefault(){return 4}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_ALIGNMENT,d),this.current=d,this.dirty=!1}}class Td extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d),this.current=d,this.dirty=!1}}class ul extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,d),this.current=d,this.dirty=!1}}class Wl extends xo{constructor(d,P){super(d),this.context=d,this.parent=P}getDefault(){return null}}class If extends Wl{setDirty(){this.dirty=!0}set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,d,0),this.current=d,this.dirty=!1}}class vh extends Wl{set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_ATTACHMENT,P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}class zf extends Wl{set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_STENCIL_ATTACHMENT,P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}let qf="Framebuffer is not complete";class Ze{constructor(d,P,N,H,$){this.context=d,this.width=P,this.height=N;let se=d.gl,de=this.framebuffer=se.createFramebuffer();if(this.colorAttachment=new If(d,de),H)this.depthAttachment=$?new zf(d,de):new vh(d,de);else if($)throw new Error("Stencil cannot be set without depth");if(se.checkFramebufferStatus(se.FRAMEBUFFER)!==se.FRAMEBUFFER_COMPLETE)throw new Error(qf)}destroy(){let d=this.context.gl,P=this.colorAttachment.get();if(P&&d.deleteTexture(P),this.depthAttachment){let N=this.depthAttachment.get();N&&d.deleteRenderbuffer(N)}d.deleteFramebuffer(this.framebuffer)}}class yt{constructor(d){var P,N;if(this.gl=d,this.clearColor=new p0(this),this.clearDepth=new Tu(this),this.clearStencil=new Au(this),this.colorMask=new Il(this),this.depthMask=new g0(this),this.stencilMask=new Yu(this),this.stencilFunc=new Nh(this),this.stencilOp=new Tl(this),this.stencilTest=new jl(this),this.depthRange=new Uh(this),this.depthTest=new Vh(this),this.depthFunc=new jd(this),this.blend=new pc(this),this.blendFunc=new gc(this),this.blendColor=new of(this),this.blendEquation=new sf(this),this.cullFace=new bd(this),this.cullFaceSide=new Gh(this),this.frontFace=new Xu(this),this.program=new Pc(this),this.activeTexture=new Ff(this),this.viewport=new Df(this),this.bindFramebuffer=new La(this),this.bindRenderbuffer=new Rf(this),this.bindTexture=new m0(this),this.bindVertexBuffer=new wd(this),this.bindElementBuffer=new Hh(this),this.bindVertexArray=new X0(this),this.pixelStoreUnpack=new y0(this),this.pixelStoreUnpackPremultiplyAlpha=new Td(this),this.pixelStoreUnpackFlipY=new ul(this),this.extTextureFilterAnisotropic=d.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=d.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=d.getParameter(d.MAX_TEXTURE_SIZE),Pl(d)){this.HALF_FLOAT=d.HALF_FLOAT;let H=d.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(P=d.RGBA16F)!==null&&P!==void 0?P:H==null?void 0:H.RGBA16F_EXT,this.RGB16F=(N=d.RGB16F)!==null&&N!==void 0?N:H==null?void 0:H.RGB16F_EXT,d.getExtension("EXT_color_buffer_float")}else{d.getExtension("EXT_color_buffer_half_float"),d.getExtension("OES_texture_half_float_linear");let H=d.getExtension("OES_texture_half_float");this.HALF_FLOAT=H==null?void 0:H.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(d,P){return new dh(this,d,P)}createVertexBuffer(d,P,N){return new Hd(this,d,P,N)}createRenderbuffer(d,P,N){let H=this.gl,$=H.createRenderbuffer();return this.bindRenderbuffer.set($),H.renderbufferStorage(H.RENDERBUFFER,d,P,N),this.bindRenderbuffer.set(null),$}createFramebuffer(d,P,N,H){return new Ze(this,d,P,N,H)}clear({color:d,depth:P,stencil:N}){let H=this.gl,$=0;d&&($|=H.COLOR_BUFFER_BIT,this.clearColor.set(d),this.colorMask.set([!0,!0,!0,!0])),P!==void 0&&($|=H.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(P),this.depthMask.set(!0)),N!==void 0&&($|=H.STENCIL_BUFFER_BIT,this.clearStencil.set(N),this.stencilMask.set(255)),H.clear($)}setCullFace(d){d.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(d.mode),this.frontFace.set(d.frontFace))}setDepthMode(d){d.func!==this.gl.ALWAYS||d.mask?(this.depthTest.set(!0),this.depthFunc.set(d.func),this.depthMask.set(d.mask),this.depthRange.set(d.range)):this.depthTest.set(!1)}setStencilMode(d){d.test.func!==this.gl.ALWAYS||d.mask?(this.stencilTest.set(!0),this.stencilMask.set(d.mask),this.stencilOp.set([d.fail,d.depthFail,d.pass]),this.stencilFunc.set({func:d.test.func,ref:d.ref,mask:d.test.mask})):this.stencilTest.set(!1)}setColorMode(d){i.bQ(d.blendFunction,Ja.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(d.blendFunction),this.blendColor.set(d.blendColor)),this.colorMask.set(d.mask)}createVertexArray(){var d;return Pl(this.gl)?this.gl.createVertexArray():(d=this.gl.getExtension("OES_vertex_array_object"))===null||d===void 0?void 0:d.createVertexArrayOES()}deleteVertexArray(d){var P;Pl(this.gl)?this.gl.deleteVertexArray(d):(P=this.gl.getExtension("OES_vertex_array_object"))===null||P===void 0||P.deleteVertexArrayOES(d)}unbindVAO(){this.bindVertexArray.set(null)}}let Wt;function zt(Y,d,P,N,H){var $,se;let de=Y.context,Ae=Y.transform,Fe=de.gl,Ie=Y.useProgram("collisionBox"),Ye=[],st=0,dt=0;for(let Bt of N){let St=d.getTile(Bt).getBucket(P);if(!St)continue;let Pt=H?St.textCollisionBox:St.iconCollisionBox,$t=St.collisionCircleArray;$t.length>0&&(Ye.push({circleArray:$t,circleOffset:dt,coord:Bt}),st+=$t.length/4,dt=st),Pt&&Ie.draw(de,Fe.LINES,ma.disabled,Ca.disabled,Y.colorModeForRenderPass(),Sa.disabled,Bh(Y.transform),($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Bt),Ae.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),P.id,Pt.layoutVertexBuffer,Pt.indexBuffer,Pt.segments,null,Y.transform.zoom,null,null,Pt.collisionVertexBuffer)}if(!H||!Ye.length)return;let Pe=Y.useProgram("collisionCircle"),Xe=new i.ca;Xe.resize(4*st),Xe._trim();let at=0;for(let Bt of Ye)for(let St=0;St=0&&(Xe[xt.associatedIconIndex]={shiftedAnchor:Lr,angle:an})}else Eo(xt.numGlyphs,dt)}if(Ae){Pe.clear();let at=Y.icon.placedSymbolArray;for(let xt=0;xtY.style.map.terrain.getElevation(Rr,Ta,vu):null,ql=P.layout.get("text-rotation-alignment")==="map";Jn(an,Y,H,Ki,no,Bt,Fe,ql,Rr.toUnwrapped(),xt.width,xt.height,Ia,Us)}let Ns=H&&Xr||Na,vo=St||Ns?hr:Bt?Ki:Y.transform.clipSpaceToPixelsMatrix,_o=Yn&&P.paint.get(H?"text-halo-width":"icon-halo-width").constantOr(1)!==0,po;po=Yn?an.iconsInText?Gl(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,jn,da,$r):Gd(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,H,jn,_o,$r):hh(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,H,jn,$r);let Xo={program:An,buffers:on,uniformValues:po,projectionData:Os,atlasTexture:Wn,atlasTextureIcon:ui,atlasInterpolation:si,atlasInterpolationIcon:zi,isSDF:Yn,hasHalo:_o};if($t&&an.canOverlap){Ht=!0;let no=on.segments.get();for(let Us of no)Or.push({segments:new i.aV([Us]),sortKey:Us.sortKey,state:Xo,terrainData:Vn})}else Or.push({segments:on.segments,sortKey:0,state:Xo,terrainData:Vn})}Ht&&Or.sort(((Rr,Lr)=>Rr.sortKey-Lr.sortKey));let Er=(Pe=P.paint.get(H?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&Pe!==void 0?Pe:1/0,Tr=P.layout.get("text-letter-spacing").constantOr(0)*i.aJ<0||Er>1;for(let Rr of Or){let Lr=Rr.state;Xe.activeTexture.set(at.TEXTURE0),Lr.atlasTexture.bind(Lr.atlasInterpolation,at.CLAMP_TO_EDGE),Lr.atlasTextureIcon&&(Xe.activeTexture.set(at.TEXTURE1),Lr.atlasTextureIcon&&Lr.atlasTextureIcon.bind(Lr.atlasInterpolationIcon,at.CLAMP_TO_EDGE));let an=Lr.isSDF&&Lr.hasHalo;if(an){let on=Lr.uniformValues;on.u_is_halo=1,Tr&&(on.u_is_plain=0,en(Lr.buffers,Rr.segments,P,Y,Lr.program,dr,Ie,Ye,on,Lr.projectionData,Rr.terrainData),on.u_is_halo=0,on.u_is_plain=1)}en(Lr.buffers,Rr.segments,P,Y,Lr.program,dr,Ie,Ye,Lr.uniformValues,Lr.projectionData,Rr.terrainData),an&&!Tr&&(Lr.uniformValues.u_is_halo=0)}}function en(Y,d,P,N,H,$,se,de,Ae,Fe,Ie){let Ye=N.context;H.draw(Ye,Ye.gl.TRIANGLES,$,se,de,Sa.backCCW,Ae,Ie,Fe,P.id,Y.layoutVertexBuffer,Y.indexBuffer,d,P.paint,N.transform.zoom,Y.programConfigurations.get(P.id),Y.dynamicLayoutVertexBuffer,Y.opacityVertexBuffer)}function vn(Y,d,P,N,H){let $=Y.context,se=$.gl,de=Ca.disabled,Ae=new Ja([se.ONE,se.ONE],i.bo.transparent,[!0,!0,!0,!0]),Fe=d.getBucket(P);if(!Fe)return;let Ie=N.key,Ye=P.heatmapFbos.get(Ie);Ye||(Ye=Pn($,d.tileSize,d.tileSize),P.heatmapFbos.set(Ie,Ye)),$.bindFramebuffer.set(Ye.framebuffer),$.viewport.set([0,0,d.tileSize,d.tileSize]),$.clear({color:i.bo.transparent});let st=Fe.programConfigurations.get(P.id),dt=Y.useProgram("heatmap",st,!H),Pe=Y.transform.getProjectionData({overscaledTileID:d.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Xe=Y.style.map.terrain.getTerrainData(N);dt.draw($,se.TRIANGLES,ma.disabled,de,Ae,Sa.disabled,pd(d,Y.transform.zoom,P.paint.get("heatmap-intensity"),1),Xe,Pe,P.id,Fe.layoutVertexBuffer,Fe.indexBuffer,Fe.segments,P.paint,Y.transform.zoom,st)}function mn(Y,d,P,N,H){let $=Y.context,se=$.gl,de=Y.transform;$.setColorMode(Y.colorModeForRenderPass());let Ae=On($,d),Fe=P.key,Ie=d.heatmapFbos.get(Fe);if(!Ie)return;$.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,Ie.colorAttachment.get()),$.activeTexture.set(se.TEXTURE1),Ae.bind(se.LINEAR,se.CLAMP_TO_EDGE);let Ye=de.getProjectionData({overscaledTileID:P,applyTerrainMatrix:H,applyGlobeMatrix:!N});Y.useProgram("heatmapTexture").draw($,se.TRIANGLES,ma.disabled,Ca.disabled,Y.colorModeForRenderPass(),Sa.disabled,lh(Y,d,0,1),null,Ye,d.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments,d.paint,de.zoom),Ie.destroy(),d.heatmapFbos.delete(Fe)}function Pn(Y,d,P){var N,H;let $=Y.gl,se=$.createTexture();$.bindTexture($.TEXTURE_2D,se),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_S,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_T,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MIN_FILTER,$.LINEAR),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MAG_FILTER,$.LINEAR);let de=(N=Y.HALF_FLOAT)!==null&&N!==void 0?N:$.UNSIGNED_BYTE,Ae=(H=Y.RGBA16F)!==null&&H!==void 0?H:$.RGBA;$.texImage2D($.TEXTURE_2D,0,Ae,d,P,0,$.RGBA,de,null);let Fe=Y.createFramebuffer(d,P,!1,!1);return Fe.colorAttachment.set(se),Fe}function On(Y,d){return d.colorRampTexture||(d.colorRampTexture=new i.T(Y,d.colorRamp,Y.gl.RGBA)),d.colorRampTexture}function ki(Y,d,P,N,H,$,se,de){let Ae=256;if(H.stepInterpolant){let Fe=d.getSource().maxzoom,Ie=se.canonical.z===Fe?Math.ceil(1<Y.options.anisotropicFilterPitch&&dt.texParameterf(dt.TEXTURE_2D,st.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,st.extTextureFilterAnisotropicMax);let Rr=(Ie=Y.style.map.terrain)===null||Ie===void 0?void 0:Ie.getTerrainData(Ht),Lr=Xe.getProjectionData({overscaledTileID:Ht,aligned:Et,applyGlobeMatrix:!Fe,applyTerrainMatrix:!0}),an=fh(Er,$r,Tr.fadeMix,P,de),on=at.getMeshFromTileID(st,Ht.canonical,$,se,"raster");Pe.draw(st,dt.TRIANGLES,dr,H?H[Ht.overscaledZ]:Ca.disabled,xt,Ae?Sa.frontCCW:Sa.backCCW,an,Rr,Lr,P.id,on.vertexBuffer,on.indexBuffer,on.segments)}}function Js(Y,d,P,N){let H={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(P===0||N)return H;if(Y.fadingParentID){let $=d.getLoadedTile(Y.fadingParentID);if(!$)return H;let se=Math.pow(2,$.tileID.overscaledZ-Y.tileID.overscaledZ),de=[Y.tileID.canonical.x*se%1,Y.tileID.canonical.y*se%1],Ae=(function(Fe,Ie,Ye){let st=g(),dt=(st-Ie.timeAdded)/Ye,Pe=Fe.fadingDirection===We.Incoming,Xe=i.al((st-Fe.timeAdded)/Ye,0,1),at=i.al(1-dt,0,1),xt=Pe?Xe:at;return{tileOpacity:xt,parentTileOpacity:Pe?at:Xe,fadeMix:{opacity:1,mix:1-xt}}})(Y,$,P);return{parentTile:$,parentScaleBy:se,parentTopLeft:de,fadeValues:Ae}}if(Y.selfFading){let $=(function(se,de){let Ae=(g()-se.timeAdded)/de,Fe=i.al(Ae,0,1);return{tileOpacity:Fe,fadeMix:{opacity:Fe,mix:0}}})(Y,P);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:$}}return H}let fs=new i.bo(1,0,0,1),Io=new i.bo(0,1,0,1),oi=new i.bo(0,0,1,1),ro=new i.bo(1,0,1,1),Go=new i.bo(0,1,1,1);function Qs(Y,d,P,N){cu(Y,0,d+P/2,Y.transform.width,P,N)}function zl(Y,d,P,N){cu(Y,d-P/2,0,P,Y.transform.height,N)}function cu(Y,d,P,N,H,$){let se=Y.context,de=se.gl;de.enable(de.SCISSOR_TEST),de.scissor(d*Y.pixelRatio,P*Y.pixelRatio,N*Y.pixelRatio,H*Y.pixelRatio),se.clear({color:$}),de.disable(de.SCISSOR_TEST)}function Zu(Y,d,P){var N;let H=Y.context,$=H.gl,se=Y.useProgram("debug"),de=ma.disabled,Ae=Ca.disabled,Fe=Y.colorModeForRenderPass(),Ie="$debug",Ye=(N=Y.style.map.terrain)===null||N===void 0?void 0:N.getTerrainData(P);H.activeTexture.set($.TEXTURE0);let st=d.getTileByID(P.key).latestRawTileData,dt=Math.floor(((st==null?void 0:st.byteLength)||0)/1024),Pe=d.getTile(P).tileSize,Xe=512/Math.min(Pe,512)*(P.overscaledZ/Y.transform.zoom)*.5,at=P.canonical.toString();P.overscaledZ!==P.canonical.z&&(at+=` => ${P.overscaledZ}`),(function(Et,Bt){Et.initDebugOverlayCanvas();let St=Et.debugOverlayCanvas,Pt=Et.context.gl,$t=Et.debugOverlayCanvas.getContext("2d");$t.clearRect(0,0,St.width,St.height),$t.shadowColor="white",$t.shadowBlur=2,$t.lineWidth=1.5,$t.strokeStyle="white",$t.textBaseline="top",$t.font="bold 36px Open Sans, sans-serif",$t.fillText(Bt,5,5),$t.strokeText(Bt,5,5),Et.debugOverlayTexture.update(St),Et.debugOverlayTexture.bind(Pt.LINEAR,Pt.CLAMP_TO_EDGE)})(Y,`${at} ${dt}kB`);let xt=Y.transform.getProjectionData({overscaledTileID:P,applyGlobeMatrix:!0,applyTerrainMatrix:!0});se.draw(H,$.TRIANGLES,de,Ae,Ja.alphaBlended,Sa.disabled,vd(i.bo.transparent,Xe),null,xt,Ie,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments),se.draw(H,$.LINE_STRIP,de,Ae,Fe,Sa.disabled,vd(i.bo.red),Ye,xt,Ie,Y.debugBuffer,Y.tileBorderIndexBuffer,Y.debugSegments)}function mc(Y,d,P,N){let{isRenderingGlobe:H}=N,$=Y.context,se=$.gl,de=Y.transform,Ae=Y.colorModeForRenderPass(),Fe=Y.getDepthModeFor3D(),Ie=Y.useProgram("terrain");$.bindFramebuffer.set(null),$.viewport.set([0,0,Y.width,Y.height]);for(let Ye of P){let st=d.getTerrainMesh(Ye.tileID),dt=Y.renderToTexture.getTexture(Ye),Pe=d.getTerrainData(Ye.tileID);$.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,dt.texture);let Xe=d.getMeshFrameDelta(de.zoom),at=de.calculateFogMatrix(Ye.tileID.toUnwrapped()),xt=Nd(Xe,at,Y.style.sky,de.pitch,H),Et=de.getProjectionData({overscaledTileID:Ye.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Ie.draw($,se.TRIANGLES,Fe,Ca.disabled,Ae,Sa.backCCW,xt,Pe,Et,"terrain",st.vertexBuffer,st.indexBuffer,st.segments)}}function Yl(Y,d){if(!d.mesh){let P=new i.aU;P.emplaceBack(-1,-1),P.emplaceBack(1,-1),P.emplaceBack(1,1),P.emplaceBack(-1,1);let N=new i.aW;N.emplaceBack(0,1,2),N.emplaceBack(0,2,3),d.mesh=new ka(Y.createVertexBuffer(P,vs.members),Y.createIndexBuffer(N),i.aV.simpleSegment(0,0,P.length,N.length))}return d.mesh}let lf={symbol:function(Y,d,P,N,H,$){if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=$,de=Ca.disabled,Ae=Y.colorModeForRenderPass();(P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(Fe,Ie,Ye,st,dt,Pe,Xe,at,xt){var Et;let Bt=Ie.transform,St=Ie.style.map.terrain,Pt=dt==="map",$t=Pe==="map";for(let Ht of Fe){let dr=st.getTile(Ht),Xr=dr.getBucket(Ye);if(!(!((Et=Xr==null?void 0:Xr.text)===null||Et===void 0)&&Et.segments.get().length))continue;let Or=i.aw(Xr.textSizeData,Bt.zoom),$r=i.aK(dr,1,Ie.transform.zoom),Er=Ut(Pt,Ie.transform,$r),Tr=Ye.layout.get("icon-text-fit")!=="none"&&Xr.hasIconData();if(Or){let Rr=Math.pow(2,Bt.zoom-dr.tileID.overscaledZ),Lr=St?(an,on)=>St.getElevation(Ht,an,on):null;cn(Xr,Pt,$t,xt,Bt,Er,Rr,Or,Tr,i.aL(Bt,dr,Xe,at),Ht.toUnwrapped(),Lr)}}})(N,Y,P,d,P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),H),P.paint.get("icon-opacity").constantOr(1)!==0&&Fn(Y,d,P,N,!1,P.paint.get("icon-translate"),P.paint.get("icon-translate-anchor"),P.layout.get("icon-rotation-alignment"),P.layout.get("icon-pitch-alignment"),P.layout.get("icon-keep-upright"),de,Ae,se),P.paint.get("text-opacity").constantOr(1)!==0&&Fn(Y,d,P,N,!0,P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.layout.get("text-keep-upright"),de,Ae,se),d.map.showCollisionBoxes&&(zt(Y,d,P,N,!0),zt(Y,d,P,N,!1))},circle:function(Y,d,P,N,H){var $;if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=H,de=P.paint.get("circle-opacity"),Ae=P.paint.get("circle-stroke-width"),Fe=P.paint.get("circle-stroke-opacity"),Ie=!P.layout.get("circle-sort-key").isConstant();if(de.constantOr(1)===0&&(Ae.constantOr(1)===0||Fe.constantOr(1)===0))return;let Ye=Y.context,st=Ye.gl,dt=Y.transform,Pe=Y.getDepthModeForSublayer(0,ma.ReadOnly),Xe=Ca.disabled,at=Y.colorModeForRenderPass(),xt=[],Et=dt.getCircleRadiusCorrection();for(let Bt of N){let St=d.getTile(Bt),Pt=St.getBucket(P);if(!Pt)continue;let $t=P.paint.get("circle-translate"),Ht=P.paint.get("circle-translate-anchor"),dr=i.aL(dt,St,$t,Ht),Xr=Pt.programConfigurations.get(P.id),Or=Y.useProgram("circle",Xr),$r=Pt.layoutVertexBuffer,Er=Pt.indexBuffer,Tr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Bt),Rr={programConfiguration:Xr,program:Or,layoutVertexBuffer:$r,indexBuffer:Er,uniformValues:dd(Y,St,P,dr,Et),terrainData:Tr,projectionData:dt.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!se,applyTerrainMatrix:!0})};if(Ie){let Lr=Pt.segments.get();for(let an of Lr)xt.push({segments:new i.aV([an]),sortKey:an.sortKey,state:Rr})}else xt.push({segments:Pt.segments,sortKey:0,state:Rr})}Ie&&xt.sort(((Bt,St)=>Bt.sortKey-St.sortKey));for(let Bt of xt){let{programConfiguration:St,program:Pt,layoutVertexBuffer:$t,indexBuffer:Ht,uniformValues:dr,terrainData:Xr,projectionData:Or}=Bt.state;Pt.draw(Ye,st.TRIANGLES,Pe,Xe,at,Sa.backCCW,dr,Xr,Or,P.id,$t,Ht,Bt.segments,P.paint,Y.transform.zoom,St)}},heatmap:function(Y,d,P,N,H){if(P.paint.get("heatmap-opacity")===0)return;let $=Y.context,{isRenderingToTexture:se,isRenderingGlobe:de}=H;if(Y.style.map.terrain){for(let Ae of N){let Fe=d.getTile(Ae);d.hasRenderableParent(Ae)||(Y.renderPass==="offscreen"?vn(Y,Fe,P,Ae,de):Y.renderPass==="translucent"&&mn(Y,P,Ae,se,de))}$.viewport.set([0,0,Y.width,Y.height])}else Y.renderPass==="offscreen"?(function(Ae,Fe,Ie,Ye){let st=Ae.context,dt=st.gl,Pe=Ae.transform,Xe=Ca.disabled,at=new Ja([dt.ONE,dt.ONE],i.bo.transparent,[!0,!0,!0,!0]);(function(xt,Et,Bt){let St=xt.gl;xt.activeTexture.set(St.TEXTURE1),xt.viewport.set([0,0,Et.width/4,Et.height/4]);let Pt=Bt.heatmapFbos.get(i.cd);Pt?(St.bindTexture(St.TEXTURE_2D,Pt.colorAttachment.get()),xt.bindFramebuffer.set(Pt.framebuffer)):(Pt=Pn(xt,Et.width/4,Et.height/4),Bt.heatmapFbos.set(i.cd,Pt))})(st,Ae,Ie),st.clear({color:i.bo.transparent});for(let xt of Ye){if(Fe.hasRenderableParent(xt))continue;let Et=Fe.getTile(xt),Bt=Et.getBucket(Ie);if(!Bt)continue;let St=Bt.programConfigurations.get(Ie.id),Pt=Ae.useProgram("heatmap",St),$t=Pe.getProjectionData({overscaledTileID:xt,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Ht=Pe.getCircleRadiusCorrection();Pt.draw(st,dt.TRIANGLES,ma.disabled,Xe,at,Sa.backCCW,pd(Et,Pe.zoom,Ie.paint.get("heatmap-intensity"),Ht),null,$t,Ie.id,Bt.layoutVertexBuffer,Bt.indexBuffer,Bt.segments,Ie.paint,Pe.zoom,St)}st.viewport.set([0,0,Ae.width,Ae.height])})(Y,d,P,N):Y.renderPass==="translucent"&&(function(Ae,Fe){let Ie=Ae.context,Ye=Ie.gl;Ie.setColorMode(Ae.colorModeForRenderPass());let st=Fe.heatmapFbos.get(i.cd);st&&(Ie.activeTexture.set(Ye.TEXTURE0),Ye.bindTexture(Ye.TEXTURE_2D,st.colorAttachment.get()),Ie.activeTexture.set(Ye.TEXTURE1),On(Ie,Fe).bind(Ye.LINEAR,Ye.CLAMP_TO_EDGE),Ae.useProgram("heatmapTexture").draw(Ie,Ye.TRIANGLES,ma.disabled,Ca.disabled,Ae.colorModeForRenderPass(),Sa.disabled,lh(Ae,Fe,0,1),null,null,Fe.id,Ae.viewportBuffer,Ae.quadTriangleIndexBuffer,Ae.viewportSegments,Fe.paint,Ae.transform.zoom))})(Y,P)},line:function(Y,d,P,N,H){var $;if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=H,de=P.paint.get("line-opacity"),Ae=P.paint.get("line-width");if(de.constantOr(1)===0||Ae.constantOr(1)===0)return;let Fe=Y.getDepthModeForSublayer(0,ma.ReadOnly),Ie=Y.colorModeForRenderPass(),Ye=P.paint.get("line-dasharray"),st=Ye.constantOr(1),dt=P.paint.get("line-pattern"),Pe=dt.constantOr(1),Xe=P.paint.get("line-gradient"),at=P.getCrossfadeParameters(),xt;xt=Pe?"linePattern":st&&Xe?"lineGradientSDF":st?"lineSDF":Xe?"lineGradient":"line";let Et=Y.context,Bt=Et.gl,St=Y.transform,Pt=!0;for(let $t of N){let Ht=d.getTile($t);if(Pe&&!Ht.patternsLoaded())continue;let dr=Ht.getBucket(P);if(!dr)continue;let Xr=dr.programConfigurations.get(P.id),Or=Y.context.program.get(),$r=Y.useProgram(xt,Xr),Er=Pt||$r.program!==Or,Tr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData($t),Rr=dt.constantOr(null),Lr=Ye==null?void 0:Ye.constantOr(null);if(Rr&&Ht.imageAtlas){let yi=Ht.imageAtlas,Sn=yi.patternPositions[Rr.to.toString()],An=yi.patternPositions[Rr.from.toString()];Sn&&An&&Xr.setConstantPatternPositions(Sn,An)}else if(Lr){let yi=P.layout.get("line-cap").constantOr(null)==="round",Sn=Y.lineAtlas.getDash(Lr.to,yi),An=Y.lineAtlas.getDash(Lr.from,yi);Xr.setConstantDashPositions(Sn,An)}let an=St.getProjectionData({overscaledTileID:$t,applyGlobeMatrix:!se,applyTerrainMatrix:!0}),on=St.getPixelScale(),Nn;Pe?(Nn=Lc(Y,Ht,P,on,at),Ci(Et,Bt,Ht,Xr,at)):st&&Xe?(Nn=yd(Y,Ht,P,on,at,dr.lineClipsArray.length),Un(Y,d,Et,Bt,P,dr,$t,Xr,at)):st?(Nn=md(Y,Ht,P,on,at),qi(Y,Et,Bt,Xr,Er,at)):Xe?(Nn=ch(Y,Ht,P,on,dr.lineClipsArray.length),pi(Y,d,Et,Bt,P,dr,$t)):Nn=Rl(Y,Ht,P,on);let Yn=Y.stencilModeForClipping($t);$r.draw(Et,Bt.TRIANGLES,Fe,Yn,Ie,Sa.disabled,Nn,Tr,an,P.id,dr.layoutVertexBuffer,dr.indexBuffer,dr.segments,P.paint,Y.transform.zoom,Xr,dr.layoutVertexBuffer2),Pt=!1}},fill:function(Y,d,P,N,H){let $=P.paint.get("fill-color"),se=P.paint.get("fill-opacity");if(se.constantOr(1)===0)return;let{isRenderingToTexture:de}=H,Ae=Y.colorModeForRenderPass(),Fe=P.paint.get("fill-pattern"),Ie=Y.opaquePassEnabledForLayer()&&!Fe.constantOr(1)&&$.constantOr(i.bo.transparent).a===1&&se.constantOr(0)===1?"opaque":"translucent";if(Y.renderPass===Ie){let Ye=Y.getDepthModeForSublayer(1,Y.renderPass==="opaque"?ma.ReadWrite:ma.ReadOnly);Zi(Y,d,P,N,Ye,Ae,!1,de)}if(Y.renderPass==="translucent"&&P.paint.get("fill-antialias")){let Ye=Y.getDepthModeForSublayer(P.getPaintProperty("fill-outline-color")?2:0,ma.ReadOnly);Zi(Y,d,P,N,Ye,Ae,!0,de)}},fillExtrusion:function(Y,d,P,N,H){let $=P.paint.get("fill-extrusion-opacity");if($===0)return;let{isRenderingToTexture:se}=H;if(Y.renderPass==="translucent"){let de=new ma(Y.context.gl.LEQUAL,ma.ReadWrite,Y.depthRangeFor3D);if($!==1||P.paint.get("fill-extrusion-pattern").constantOr(1))na(Y,d,P,N,de,Ca.disabled,Ja.disabled,se),na(Y,d,P,N,de,Y.stencilModeFor3D(),Y.colorModeForRenderPass(),se);else{let Ae=Y.colorModeForRenderPass();na(Y,d,P,N,de,Ca.disabled,Ae,se)}}},hillshade:function(Y,d,P,N,H){if(Y.renderPass!=="offscreen"&&Y.renderPass!=="translucent")return;let{isRenderingToTexture:$}=H,se=Y.context,de=Y.style.projection.useSubdivision,Ae=Y.getDepthModeForSublayer(0,ma.ReadOnly),Fe=Y.colorModeForRenderPass();if(Y.renderPass==="offscreen")(function(Ie,Ye,st,dt,Pe,Xe,at){let xt=Ie.context,Et=xt.gl,Bt=dt.paint.get("resampling")==="nearest"?Et.NEAREST:Et.LINEAR;for(let St of st){let Pt=Ye.getTile(St),$t=Pt.dem;if(!($t!=null&&$t.data)||!Pt.needsHillshadePrepare)continue;let Ht=$t.dim,dr=$t.stride,Xr=$t.getPixels();if(xt.activeTexture.set(Et.TEXTURE1),xt.pixelStoreUnpackPremultiplyAlpha.set(!1),Pt.demTexture||(Pt.demTexture=Ie.getTileTexture(dr)),Pt.demTexture){let $r=Pt.demTexture;$r.update(Xr,{premultiply:!1}),$r.bind(Et.NEAREST,Et.CLAMP_TO_EDGE)}else Pt.demTexture=new i.T(xt,Xr,Et.RGBA,{premultiply:!1}),Pt.demTexture.bind(Et.NEAREST,Et.CLAMP_TO_EDGE);xt.activeTexture.set(Et.TEXTURE0);let Or=Pt.fbo;if(!Or){let $r=new i.T(xt,{width:Ht,height:Ht,data:null},Et.RGBA);$r.bind(Bt,Et.CLAMP_TO_EDGE),Or=Pt.fbo=xt.createFramebuffer(Ht,Ht,!0,!1),Or.colorAttachment.set($r.texture)}xt.bindFramebuffer.set(Or.framebuffer),xt.viewport.set([0,0,Ht,Ht]),Ie.useProgram("hillshadePrepare").draw(xt,Et.TRIANGLES,Pe,Xe,at,Sa.disabled,uh(Pt.tileID,$t),null,null,dt.id,Ie.rasterBoundsBuffer,Ie.quadTriangleIndexBuffer,Ie.rasterBoundsSegments),Pt.needsHillshadePrepare=!1}})(Y,d,N,P,Ae,Ca.disabled,Fe),se.viewport.set([0,0,Y.width,Y.height]);else if(Y.renderPass==="translucent")if(de){let[Ie,Ye,st]=Y.stencilConfigForOverlapTwoPass(N);Ha(Y,d,P,st,Ie,Ae,Fe,!1,$),Ha(Y,d,P,st,Ye,Ae,Fe,!0,$)}else{let[Ie,Ye]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Ha(Y,d,P,Ye,Ie,Ae,Fe,!1,$)}},colorRelief:function(Y,d,P,N,H){if(Y.renderPass!=="translucent"||!N.length)return;let{isRenderingToTexture:$}=H,se=Y.style.projection.useSubdivision,de=Y.getDepthModeForSublayer(0,ma.ReadOnly),Ae=Y.colorModeForRenderPass();if(se){let[Fe,Ie,Ye]=Y.stencilConfigForOverlapTwoPass(N);Ya(Y,d,P,Ye,Fe,de,Ae,!1,$),Ya(Y,d,P,Ye,Ie,de,Ae,!0,$)}else{let[Fe,Ie]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Ya(Y,d,P,Ie,Fe,de,Ae,!1,$)}},raster:function(Y,d,P,N,H){if(Y.renderPass!=="translucent"||P.paint.get("raster-opacity")===0||!N.length)return;let{isRenderingToTexture:$}=H,se=d.getSource(),de=Y.style.projection.useSubdivision;if(se instanceof qe)Pa(Y,d,P,N,null,!1,!1,se.tileCoords,se.flippedWindingOrder,$);else if(de){let[Ae,Fe,Ie]=Y.stencilConfigForOverlapTwoPass(N);Pa(Y,d,P,Ie,Ae,!1,!0,ho,!1,$),Pa(Y,d,P,Ie,Fe,!0,!0,ho,!1,$)}else{let[Ae,Fe]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Pa(Y,d,P,Fe,Ae,!1,!0,ho,!1,$)}},background:function(Y,d,P,N,H){var $;let se=P.paint.get("background-color"),de=P.paint.get("background-opacity");if(de===0)return;let{isRenderingToTexture:Ae}=H,Fe=Y.context,Ie=Fe.gl,Ye=Y.style.projection,st=Y.transform,dt=st.tileSize,Pe=P.paint.get("background-pattern");if(Y.isPatternMissing(Pe))return;let Xe=!Pe&&se.a===1&&de===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass!==Xe)return;let at=Ca.disabled,xt=Y.getDepthModeForSublayer(0,Xe==="opaque"?ma.ReadWrite:ma.ReadOnly),Et=Y.colorModeForRenderPass(),Bt=Y.useProgram(Pe?"backgroundPattern":"background"),St=N||ft(st,{tileSize:dt,terrain:Y.style.map.terrain});Pe&&(Fe.activeTexture.set(Ie.TEXTURE0),Y.imageManager.bind(Y.context));let Pt=P.getCrossfadeParameters();for(let $t of St){let Ht=st.getProjectionData({overscaledTileID:$t,applyGlobeMatrix:!Ae,applyTerrainMatrix:!0}),dr=Pe?xd(de,Y,Pe,{tileID:$t,tileSize:dt},Pt):wl(de,se),Xr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData($t),Or=Ye.getMeshFromTileID(Fe,$t.canonical,!1,!0,"raster");Bt.draw(Fe,Ie.TRIANGLES,xt,at,Et,Sa.backCCW,dr,Xr,Ht,P.id,Or.vertexBuffer,Or.indexBuffer,Or.segments)}},sky:function(Y,d){let P=Y.context,N=P.gl,H=((Ie,Ye,st)=>{let dt=Math.cos(Ye.rollInRadians),Pe=Math.sin(Ye.rollInRadians),Xe=or(Ye),at=Ye.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:Ie.properties.get("sky-color"),u_horizon_color:Ie.properties.get("horizon-color"),u_horizon:[(Ye.width/2-Xe*Pe)*st,(Ye.height/2+Xe*dt)*st],u_horizon_normal:[-Pe,dt],u_sky_horizon_blend:Ie.properties.get("sky-horizon-blend")*Ye.height/2*st,u_sky_blend:at}})(d,Y.style.map.transform,Y.pixelRatio),$=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),se=Ca.disabled,de=Y.colorModeForRenderPass(),Ae=Y.useProgram("sky"),Fe=Yl(P,d);Ae.draw(P,N.TRIANGLES,$,se,de,Sa.disabled,H,null,void 0,"sky",Fe.vertexBuffer,Fe.indexBuffer,Fe.segments)},atmosphere:function(Y,d,P){let N=Y.context,H=N.gl,$=Y.useProgram("atmosphere"),se=new ma(H.LEQUAL,ma.ReadOnly,[0,1]),de=Y.transform,Ae=(function(at,xt){let Et=at.properties.get("position"),Bt=[-Et.x,-Et.y,-Et.z],St=i.ap(new Float64Array(16));return at.properties.get("anchor")==="map"&&(i.be(St,St,xt.rollInRadians),i.bf(St,St,-xt.pitchInRadians),i.be(St,St,xt.bearingInRadians),i.bf(St,St,xt.center.lat*Math.PI/180),i.bI(St,St,-xt.center.lng*Math.PI/180)),i.cg(Bt,Bt,St),Bt})(P,Y.transform),Fe=de.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Ie=d.properties.get("atmosphere-blend")*Fe.projectionTransition;if(Ie===0)return;let Ye=Ks(de.worldSize,de.center.lat),st=de.inverseProjectionMatrix,dt=new Float64Array(4);dt[3]=1,i.aE(dt,dt,de.modelViewProjectionMatrix),dt[0]/=dt[3],dt[1]/=dt[3],dt[2]/=dt[3],dt[3]=1,i.aE(dt,dt,st),dt[0]/=dt[3],dt[1]/=dt[3],dt[2]/=dt[3],dt[3]=1;let Pe=((at,xt,Et,Bt,St)=>({u_sun_pos:at,u_atmosphere_blend:xt,u_globe_position:Et,u_globe_radius:Bt,u_inv_proj_matrix:St}))(Ae,Ie,[dt[0],dt[1],dt[2]],Ye,st),Xe=Yl(N,d);$.draw(N,H.TRIANGLES,se,Ca.disabled,Ja.alphaBlended,Sa.disabled,Pe,null,null,"atmosphere",Xe.vertexBuffer,Xe.indexBuffer,Xe.segments)},custom:function(Y,d,P,N){let{isRenderingGlobe:H}=N,$=Y.context,se=P.implementation,de=Y.style.projection,Ae=Y.transform,Fe=Ae.getProjectionDataForCustomLayer(H),Ie={farZ:Ae.farZ,nearZ:Ae.nearZ,fov:Ae.fov*Math.PI/180,modelViewProjectionMatrix:Ae.modelViewProjectionMatrix,projectionMatrix:Ae.projectionMatrix,shaderData:{variantName:de.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; +uniform mat4 u_projection_matrix; +${de.shaderPreludeCode.vertexSource}`,define:de.shaderDefine},defaultProjectionData:Fe},Ye=se.renderingMode?se.renderingMode:"2d";if(Y.renderPass==="offscreen"){let st=se.prerender;st&&(Y.setCustomLayerDefaults(),$.setColorMode(Y.colorModeForRenderPass()),st.call(se,$.gl,Ie),$.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),$.setColorMode(Y.colorModeForRenderPass()),$.setStencilMode(Ca.disabled);let st=Ye==="3d"?Y.getDepthModeFor3D():Y.getDepthModeForSublayer(0,ma.ReadOnly);$.setDepthMode(st),se.render($.gl,Ie),$.setDirty(),Y.setBaseState(),$.bindFramebuffer.set(null)}},debug:function(Y,d,P){for(let N of P)Zu(Y,d,N)},debugPadding:function(Y){let d=Y.transform.padding;Qs(Y,Y.transform.height-(d.top||0),3,fs),Qs(Y,d.bottom||0,3,Io),zl(Y,d.left||0,3,oi),zl(Y,Y.transform.width-(d.right||0),3,ro);let P=Y.transform.centerPoint;(function(N,H,$,se){cu(N,H-1,$-10,2,20,se),cu(N,H-10,$-1,20,2,se)})(Y,P.x,Y.transform.height-P.y,Go)},terrainDepth:function(Y,d){let P=Y.context,N=P.gl,H=Y.transform,$=Ja.unblended,se=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),de=d.tileManager.getRenderableTiles(),Ae=Y.useProgram("terrainDepth");P.bindFramebuffer.set(d.getFramebuffer("depth").framebuffer),P.viewport.set([0,0,Y.width/devicePixelRatio,Y.height/devicePixelRatio]),P.clear({color:i.bo.transparent,depth:1});for(let Fe of de){let Ie=d.getTerrainMesh(Fe.tileID),Ye=d.getTerrainData(Fe.tileID),st=H.getProjectionData({overscaledTileID:Fe.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),dt={u_ele_delta:d.getMeshFrameDelta(H.zoom)};Ae.draw(P,N.TRIANGLES,se,Ca.disabled,$,Sa.backCCW,dt,Ye,st,"terrain",Ie.vertexBuffer,Ie.indexBuffer,Ie.segments)}P.bindFramebuffer.set(null),P.viewport.set([0,0,Y.width,Y.height])},terrainCoords:function(Y,d){let P=Y.context,N=P.gl,H=Y.transform,$=Ja.unblended,se=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),de=d.getCoordsTexture(),Ae=d.tileManager.getRenderableTiles(),Fe=Y.useProgram("terrainCoords");P.bindFramebuffer.set(d.getFramebuffer("coords").framebuffer),P.viewport.set([0,0,Y.width/devicePixelRatio,Y.height/devicePixelRatio]),P.clear({color:i.bo.transparent,depth:1}),d.coordsIndex=[];for(let Ie of Ae){let Ye=d.getTerrainMesh(Ie.tileID),st=d.getTerrainData(Ie.tileID);P.activeTexture.set(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,de.texture);let dt={u_terrain_coords_id:(255-d.coordsIndex.length)/255,u_texture:0,u_ele_delta:d.getMeshFrameDelta(H.zoom)},Pe=H.getProjectionData({overscaledTileID:Ie.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Fe.draw(P,N.TRIANGLES,se,Ca.disabled,$,Sa.backCCW,dt,st,Pe,"terrain",Ye.vertexBuffer,Ye.indexBuffer,Ye.segments),d.coordsIndex.push(Ie.tileID.key)}P.bindFramebuffer.set(null),P.viewport.set([0,0,Y.width,Y.height])}};class $u{constructor(d,P){this.drawFunctions=lf,this.context=new yt(d),this.transform=P,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:i.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Zr.maxOverzooming+Zr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new $a}resize(d,P,N){if(this.width=Math.floor(d*N),this.height=Math.floor(P*N),this.pixelRatio=N,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let H of this.style._order)this.style._layers[H].resize()}setup(){let d=this.context,P=new i.aU;P.emplaceBack(0,0),P.emplaceBack(i.a6,0),P.emplaceBack(0,i.a6),P.emplaceBack(i.a6,i.a6),this.tileExtentBuffer=d.createVertexBuffer(P,vs.members),this.tileExtentSegments=i.aV.simpleSegment(0,0,4,2);let N=new i.aU;N.emplaceBack(0,0),N.emplaceBack(i.a6,0),N.emplaceBack(0,i.a6),N.emplaceBack(i.a6,i.a6),this.debugBuffer=d.createVertexBuffer(N,vs.members),this.debugSegments=i.aV.simpleSegment(0,0,4,5);let H=new i.ch;H.emplaceBack(0,0,0,0),H.emplaceBack(i.a6,0,i.a6,0),H.emplaceBack(0,i.a6,0,i.a6),H.emplaceBack(i.a6,i.a6,i.a6,i.a6),this.rasterBoundsBuffer=d.createVertexBuffer(H,sh.members),this.rasterBoundsSegments=i.aV.simpleSegment(0,0,4,2);let $=new i.aU;$.emplaceBack(0,0),$.emplaceBack(i.a6,0),$.emplaceBack(0,i.a6),$.emplaceBack(i.a6,i.a6),this.rasterBoundsBufferPosOnly=d.createVertexBuffer($,vs.members),this.rasterBoundsSegmentsPosOnly=i.aV.simpleSegment(0,0,4,5);let se=new i.aU;se.emplaceBack(0,0),se.emplaceBack(1,0),se.emplaceBack(0,1),se.emplaceBack(1,1),this.viewportBuffer=d.createVertexBuffer(se,vs.members),this.viewportSegments=i.aV.simpleSegment(0,0,4,2);let de=new i.ci;de.emplaceBack(0),de.emplaceBack(1),de.emplaceBack(3),de.emplaceBack(2),de.emplaceBack(0),this.tileBorderIndexBuffer=d.createIndexBuffer(de);let Ae=new i.aW;Ae.emplaceBack(1,0,2),Ae.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=d.createIndexBuffer(Ae);let Fe=this.context.gl;this.stencilClearMode=new Ca({func:Fe.ALWAYS,mask:0},0,255,Fe.ZERO,Fe.ZERO,Fe.ZERO),this.tileExtentMesh=new ka(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let d=this.context,P=d.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let N=i.O();i.c7(N,0,this.width,this.height,0,0,1),i.S(N,N,[P.drawingBufferWidth,P.drawingBufferHeight,0]);let H={mainMatrix:N,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:N};this.useProgram("clippingMask",null,!0).draw(d,P.TRIANGLES,ma.disabled,this.stencilClearMode,Ja.disabled,Sa.disabled,null,null,H,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(d,P,N){if(this.currentStencilSource===d.source||!d.isTileClipped()||!(P!=null&&P.length))return;this.currentStencilSource=d.source,this.nextStencilID+P.length>256&&this.clearStencil();let H=this.context;H.setColorMode(Ja.disabled),H.setDepthMode(ma.disabled);let $={};for(let se of P)$[se.key]=this.nextStencilID++;this._renderTileMasks($,P,N,!0),this._renderTileMasks($,P,N,!1),this._tileClippingMaskIDs=$}_renderTileMasks(d,P,N,H){var $;let se=this.context,de=se.gl,Ae=this.style.projection,Fe=this.transform,Ie=this.useProgram("clippingMask");for(let Ye of P){let st=d[Ye.key],dt=($=this.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Ye),Pe=Ae.getMeshFromTileID(this.context,Ye.canonical,H,!0,"stencil"),Xe=Fe.getProjectionData({overscaledTileID:Ye,applyGlobeMatrix:!N,applyTerrainMatrix:!0});Ie.draw(se,de.TRIANGLES,ma.disabled,new Ca({func:de.ALWAYS,mask:0},st,255,de.KEEP,de.KEEP,de.REPLACE),Ja.disabled,N?Sa.disabled:Sa.backCCW,null,dt,Xe,"$clipping",Pe.vertexBuffer,Pe.indexBuffer,Pe.segments)}}_renderTilesDepthBuffer(){var d;let P=this.context,N=P.gl,H=this.style.projection,$=this.transform,se=this.useProgram("depth"),de=this.getDepthModeFor3D(),Ae=ft($,{tileSize:$.tileSize});for(let Fe of Ae){let Ie=(d=this.style.map.terrain)===null||d===void 0?void 0:d.getTerrainData(Fe),Ye=H.getMeshFromTileID(this.context,Fe.canonical,!0,!0,"raster"),st=$.getProjectionData({overscaledTileID:Fe,applyGlobeMatrix:!0,applyTerrainMatrix:!0});se.draw(P,N.TRIANGLES,de,Ca.disabled,Ja.disabled,Sa.backCCW,null,Ie,st,"$clipping",Ye.vertexBuffer,Ye.indexBuffer,Ye.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let d=this.nextStencilID++,P=this.context.gl;return new Ca({func:P.NOTEQUAL,mask:255},d,255,P.KEEP,P.KEEP,P.REPLACE)}stencilModeForClipping(d){let P=this.context.gl;return new Ca({func:P.EQUAL,mask:255},this._tileClippingMaskIDs[d.key],0,P.KEEP,P.KEEP,P.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(d){let P=this.context.gl,N=d.sort(((se,de)=>de.overscaledZ-se.overscaledZ)),H=N[N.length-1].overscaledZ,$=N[0].overscaledZ-H+1;if($>1){this.currentStencilSource=void 0,this.nextStencilID+$>256&&this.clearStencil();let se={};for(let de=0;de<$;de++)se[de+H]=new Ca({func:P.GEQUAL,mask:255},de+this.nextStencilID,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID+=$,[se,N]}return[{[H]:Ca.disabled},N]}stencilConfigForOverlapTwoPass(d){let P=this.context.gl,N=d.sort(((se,de)=>de.overscaledZ-se.overscaledZ)),H=N[N.length-1].overscaledZ,$=N[0].overscaledZ-H+1;if(this.clearStencil(),$>1){let se={},de={};for(let Ae=0;Ae<$;Ae++)se[Ae+H]=new Ca({func:P.GREATER,mask:255},$+1+Ae,255,P.KEEP,P.KEEP,P.REPLACE),de[Ae+H]=new Ca({func:P.GREATER,mask:255},1+Ae,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID=2*$+1,[se,de,N]}return this.nextStencilID=3,[{[H]:new Ca({func:P.GREATER,mask:255},2,255,P.KEEP,P.KEEP,P.REPLACE)},{[H]:new Ca({func:P.GREATER,mask:255},1,255,P.KEEP,P.KEEP,P.REPLACE)},N]}colorModeForRenderPass(){let d=this.context.gl;return this._showOverdrawInspector?new Ja([d.CONSTANT_COLOR,d.ONE],new i.bo(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Ja.unblended:Ja.alphaBlended}getDepthModeForSublayer(d,P,N){if(!this.opaquePassEnabledForLayer())return ma.disabled;let H=1-((1+this.currentLayer)*this.numSublayers+d)*this.depthEpsilon;return new ma(N||this.context.gl.LEQUAL,P,[H,H])}getDepthModeFor3D(){return new ma(this.context.gl.LEQUAL,ma.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer0};for(let dt in de){let Pe=de[dt];Pe.used&&Pe.prepare(this.context),Ae[dt]=Pe.getVisibleCoordinates(!1),Fe[dt]=Ae[dt].slice().reverse(),Ie[dt]=Pe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let dt=0;dtthis.useProgram(dt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:P.showOverdrawInspector?i.bo.black:i.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=P.showOverdrawInspector,this.depthRangeFor3D=[0,1-(d._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=se.length-1;this.currentLayer>=0;this.currentLayer--){let dt=this.style._layers[se[this.currentLayer]],Pe=de[dt.source],Xe=Ae[dt.source];this._renderTileClippingMasks(dt,Xe,!1),this.renderLayer(this,Pe,dt,Xe,Ye)}this.renderPass="translucent";let st=!1;for(this.currentLayer=0;this.currentLayerPt.source&&!Pt.isHidden(Xe)?[Pe.tileManagers[Pt.source]]:[])),Et=xt.filter((Pt=>Pt.getSource().type==="vector")),Bt=xt.filter((Pt=>Pt.getSource().type!=="vector")),St=Pt=>{(!at||at.getSource().maxzoom0?P.pop():null}isPatternMissing(d){if(!d)return!1;if(!d.from||!d.to)return!0;let P=this.imageManager.getPattern(d.from.toString()),N=this.imageManager.getPattern(d.to.toString());return!P||!N}useProgram(d,P,N=!1,H=[]){var $;this.cache||(this.cache={});let se=!!this.style.map.terrain,de=this.style.projection,Ae=N?Oa.projectionMercator:de.shaderPreludeCode,Fe=N?yo:de.shaderDefine,Ie=d+(P?P.cacheKey:"")+`/${N?so:de.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(se?"/terrain":"")+(H?`/${H.join("/")}`:"");return($=this.cache)[Ie]||($[Ie]=new Ud(this.context,Oa[d],P,_d[d],this._showOverdrawInspector,se,Ae,Fe,H)),this.cache[Ie]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let d=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(d.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new i.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var d,P;if(this._tileTextures){for(let N in this._tileTextures){let H=this._tileTextures[N];if(H)for(let $ of H)$.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((d=this.tileExtentMesh.vertexBuffer)===null||d===void 0||d.destroy()),this.tileExtentMesh&&((P=this.tileExtentMesh.indexBuffer)===null||P===void 0||P.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let N in this.cache){let H=this.cache[N];H!=null&&H.program&&this.context.gl.deleteProgram(H.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:d,drawingBufferHeight:P}=this.context.gl;return this.width!==d||this.height!==P}}function ph(Y,d){let P,N=!1,H=null,$=()=>{H=null,N&&(Y(...P),H=setTimeout($,d),N=!1)};return(...se)=>(N=!0,P=se,H||$(),H)}$u.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class gh{constructor(d){this._getCurrentHash=()=>{let P=window.location.hash.replace("#","");if(this._hashName){let N,H=P.split("&").map(($=>$.split("=")));for(let $ of H)$[0]===this._hashName&&(N=$);return(N&&N[1]||"").split("/")}return P.split("/")},this._onHashChange=()=>{let P=this._getCurrentHash();if(!this._isValidHash(P))return!1;let N=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(P[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+P[2],+P[1]],zoom:+P[0],bearing:N,pitch:+(P[4]||0)}),!0},this._updateHashUnthrottled=()=>{let P=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,P)},this._removeHash=()=>{let P=this._getCurrentHash();if(P.length===0)return;let N=P.join("/"),H=N;H.split("&").length>0&&(H=H.split("&")[0]),this._hashName&&(H=`${this._hashName}=${N}`);let $=window.location.hash.replace(H,"");$.startsWith("#&")?$=$.slice(0,1)+$.slice(2):$==="#"&&($="");let se=window.location.href.replace(/(#.+)?$/,$);se=se.replace("&&","&"),window.history.replaceState(window.history.state,null,se)},this._updateHash=ph(this._updateHashUnthrottled,300),this._hashName=d&&encodeURIComponent(d)}addTo(d){return this._map=d,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(d){let P=this._map.getCenter(),N=Math.round(100*this._map.getZoom())/100,H=Math.ceil((N*Math.LN2+Math.log(512/360/.5))/Math.LN10),$=Math.pow(10,H),se=Math.round(P.lng*$)/$,de=Math.round(P.lat*$)/$,Ae=this._map.getBearing(),Fe=this._map.getPitch(),Ie="";if(Ie+=d?`/${se}/${de}/${N}`:`${N}/${de}/${se}`,(Ae||Fe)&&(Ie+="/"+Math.round(10*Ae)/10),Fe&&(Ie+=`/${Math.round(Fe)}`),this._hashName){let Ye=this._hashName,st=!1,dt=window.location.hash.slice(1).split("&").map((Pe=>{let Xe=Pe.split("=")[0];return Xe===Ye?(st=!0,`${Xe}=${Ie}`):Pe})).filter((Pe=>Pe));return st||dt.push(`${Ye}=${Ie}`),`#${dt.join("&")}`}return`#${Ie}`}_isValidHash(d){if(d.length<3||d.some(isNaN))return!1;try{new i.W(+d[2],+d[1])}catch($){return!1}let P=+d[0],N=+(d[3]||0),H=+(d[4]||0);return P>=this._map.getMinZoom()&&P<=this._map.getMaxZoom()&&N>=-180&&N<=180&&H>=this._map.getMinPitch()&&H<=this._map.getMaxPitch()}}let uf={linearity:.3,easing:i.cv(0,0,.3,1)},Ku=i.e({deceleration:2500,maxSpeed:1400},uf),fu=i.e({deceleration:20,maxSpeed:1400},uf),Ju=i.e({deceleration:1e3,maxSpeed:360},uf),Qu=i.e({deceleration:1e3,maxSpeed:90},uf),Wd=i.e({deceleration:1e3,maxSpeed:360},uf);class x0{constructor(d){this._map=d,this.clear()}clear(){this._inertiaBuffer=[]}record(d){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:g(),settings:d})}_drainInertiaBuffer(){let d=this._inertiaBuffer,P=g();for(;d.length>0&&P-d[0].time>160;)d.shift()}_onMoveEnd(d){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let P={zoom:0,bearing:0,pitch:0,roll:0,pan:new i.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:$}of this._inertiaBuffer)P.zoom+=$.zoomDelta||0,P.bearing+=$.bearingDelta||0,P.pitch+=$.pitchDelta||0,P.roll+=$.rollDelta||0,$.panDelta&&P.pan._add($.panDelta),$.around&&(P.around=$.around),$.pinchAround&&(P.pinchAround=$.pinchAround);let N=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,H={};if(P.pan.mag()){let $=Al(P.pan.mag(),N,i.e({},Ku,d||{})),se=P.pan.mult($.amount/P.pan.mag()),de=this._map.cameraHelper.handlePanInertia(se,this._map.transform);H.center=de.easingCenter,H.offset=de.easingOffset,Bf(H,$)}if(P.zoom){let $=Al(P.zoom,N,fu);H.zoom=i.cw(this._map.transform.zoom+$.amount,this._map.getZoomSnap(),$.amount),Bf(H,$)}if(P.bearing){let $=Al(P.bearing,N,Ju);H.bearing=this._map.transform.bearing+i.al($.amount,-179,179),Bf(H,$)}if(P.pitch){let $=Al(P.pitch,N,Qu);H.pitch=this._map.transform.pitch+$.amount,Bf(H,$)}if(P.roll){let $=Al(P.roll,N,Wd);H.roll=this._map.transform.roll+i.al($.amount,-179,179),Bf(H,$)}if(H.zoom||H.bearing){let $=P.pinchAround===void 0?P.around:P.pinchAround;H.around=$?this._map.unproject($):this._map.getCenter()}return this.clear(),i.e(H,{noMoveStart:!0})}}function Bf(Y,d){(!Y.duration||Y.durationP.unproject(Ae))),de=$.reduce(((Ae,Fe,Ie,Ye)=>Ae.add(Fe.div(Ye.length))),new i.P(0,0));super(d,{points:$,point:de,lngLats:se,lngLat:P.unproject(de),originalEvent:N}),this._defaultPrevented=!1}}class jh extends i.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(d,P,N){super(d,{originalEvent:N}),this._defaultPrevented=!1}}class Wh{constructor(d,P){this._map=d,this._clickTolerance=P.clickTolerance}reset(){delete this._mousedownPos}wheel(d){return this._firePreventable(new jh(d.type,this._map,d))}mousedown(d,P){return this._mousedownPos=P,this._firePreventable(new Xl(d.type,this._map,d))}mouseup(d){this._map.fire(new Xl(d.type,this._map,d))}click(d,P){this._mousedownPos&&this._mousedownPos.dist(P)>=this._clickTolerance||this._map.fire(new Xl(d.type,this._map,d))}dblclick(d){return this._firePreventable(new Xl(d.type,this._map,d))}mouseover(d){this._map.fire(new Xl(d.type,this._map,d))}mouseout(d){this._map.fire(new Xl(d.type,this._map,d))}touchstart(d){return this._firePreventable(new cf(d.type,this._map,d))}touchmove(d){this._map.fire(new cf(d.type,this._map,d))}touchend(d){this._map.fire(new cf(d.type,this._map,d))}touchcancel(d){this._map.fire(new cf(d.type,this._map,d))}_firePreventable(d){if(this._map.fire(d),d.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Yh{constructor(d){this._map=d}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(d){this._map.fire(new Xl(d.type,this._map,d))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Xl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(d){this._delayContextMenu?this._contextMenuEvent=d:this._ignoreContextMenu||this._map.fire(new Xl(d.type,this._map,d)),this._map.listens("contextmenu")&&d.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class hu{constructor(d){this._map=d}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(d){return this.transform.screenPointToLocation(i.P.convert(d),this._map.terrain)}}class Mu{constructor(d,P){this._map=d,this._tr=new hu(d),this._el=d.getCanvasContainer(),this._container=d.getContainer(),this._clickTolerance=P.clickTolerance||1,P.boxZoom&&typeof P.boxZoom=="object"&&(this._boxZoomEnd=P.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(d,P){this.isEnabled()&&d.shiftKey&&d.button===0&&(_.disableDrag(),this._startPos=this._lastPos=P,this._active=!0)}mousemoveWindow(d,P){if(!this._active)return;let N=P;if(this._lastPos.equals(N)||!this._box&&N.dist(this._startPos)$.fitScreenCoordinates(N,H,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",d)}keydown(d){this._active&&d.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",d))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),_.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(d,P){return this._map.fire(new i.n(d,{originalEvent:P}))}}function _i(Y,d){if(Y.length!==d.length)throw new Error(`The number of touches and points are not equal - touches ${Y.length}, points ${d.length}`);let P={};for(let N=0;Nthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=d.timeStamp),N.length===this.numTouches&&(this.centroid=(function(H){let $=new i.P(0,0);for(let se of H)$._add(se);return $.div(H.length)})(P),this.touches=_i(N,P)))}touchmove(d,P,N){if(this.aborted||!this.centroid)return;let H=_i(N,P);for(let $ in this.touches){let se=H[$];(!se||se.dist(this.touches[$])>30)&&(this.aborted=!0)}}touchend(d,P,N){if((!this.centroid||d.timeStamp-this.startTime>500)&&(this.aborted=!0),N.length===0){let H=!this.aborted&&this.centroid;if(this.reset(),H)return H}}}class Me{constructor(d){this.singleTap=new Su(d),this.numTaps=d.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(d,P,N){this.singleTap.touchstart(d,P,N)}touchmove(d,P,N){this.singleTap.touchmove(d,P,N)}touchend(d,P,N){let H=this.singleTap.touchend(d,P,N);if(H){let $=d.timeStamp-this.lastTime<500,se=!this.lastTap||this.lastTap.dist(H)<30;if($&&se||this.reset(),this.count++,this.lastTime=d.timeStamp,this.lastTap=H,this.count===this.numTaps)return this.reset(),H}}}class Ce{constructor(d){this._tr=new hu(d),this._zoomIn=new Me({numTouches:1,numTaps:2}),this._zoomOut=new Me({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(d,P,N){this._zoomIn.touchstart(d,P,N),this._zoomOut.touchstart(d,P,N)}touchmove(d,P,N){this._zoomIn.touchmove(d,P,N),this._zoomOut.touchmove(d,P,N)}touchend(d,P,N){let H=this._zoomIn.touchend(d,P,N),$=this._zoomOut.touchend(d,P,N),se=this._tr;return H?(this._active=!0,d.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:de=>de.easeTo({duration:300,zoom:i.cw(se.zoom+1,de.getZoomSnap()),around:se.unproject(H)},{originalEvent:d})}):$?(this._active=!0,d.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:de=>de.easeTo({duration:300,zoom:i.cw(se.zoom-1,de.getZoomSnap()),around:se.unproject($)},{originalEvent:d})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Be{constructor(d){this._enabled=!!d.enable,this._moveStateManager=d.moveStateManager,this._clickTolerance=d.clickTolerance||1,this._moveFunction=d.move,this._activateOnStart=!!d.activateOnStart,d.assignEvents(this),this.reset()}reset(d){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(d)}_move(...d){let P=this._moveFunction(...d);if(P.bearingDelta||P.pitchDelta||P.rollDelta||P.around||P.panDelta)return this._active=!0,P}dragStart(d,P){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(d)&&(this._moveStateManager.startMove(d),this._lastPoint=Array.isArray(P)?P[0]:P,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(d,P){if(!this.isEnabled())return;let N=this._lastPoint;if(!N)return;if(d.preventDefault(),!this._moveStateManager.isValidMoveEvent(d))return void this.reset(d);let H=Array.isArray(P)?P[0]:P;return!this._moved&&H.dist(N)!0}),P=new Gt){this.mouseMoveStateManager=d,this.oneFingerTouchMoveStateManager=P}_executeRelevantHandler(d,P,N){return d instanceof MouseEvent?P(d):typeof TouchEvent!="undefined"&&d instanceof TouchEvent?N(d):void 0}startMove(d){this._executeRelevantHandler(d,(P=>{this.mouseMoveStateManager.startMove(P)}),(P=>{this.oneFingerTouchMoveStateManager.startMove(P)}))}endMove(d){this._executeRelevantHandler(d,(P=>{this.mouseMoveStateManager.endMove(P)}),(P=>{this.oneFingerTouchMoveStateManager.endMove(P)}))}isValidStartEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidStartEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidStartEvent(P)))}isValidMoveEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidMoveEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(P)))}isValidEndEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidEndEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidEndEvent(P)))}}let Nt=Y=>{Y.mousedown=Y.dragStart,Y.mousemoveWindow=Y.dragMove,Y.mouseup=Y.dragEnd,Y.contextmenu=d=>{d.preventDefault()}};class Kt{constructor(d,P){this._clickTolerance=d.clickTolerance||1,this._map=P,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new i.P(0,0)}_shouldBePrevented(d){return d<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(d,P,N){return this._calculateTransform(d,P,N)}touchmove(d,P,N){if(this._active){if(!this._shouldBePrevented(N.length))return d.preventDefault(),this._calculateTransform(d,P,N);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",d)}}touchend(d,P,N){this._calculateTransform(d,P,N),this._active&&this._shouldBePrevented(N.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(d,P,N){N.length>0&&(this._active=!0);let H=_i(N,P),$=new i.P(0,0),se=new i.P(0,0),de=0;for(let Fe in H){let Ie=H[Fe],Ye=this._touches[Fe];Ye&&($._add(Ie),se._add(Ie.sub(Ye)),de++,H[Fe]=Ie)}if(this._touches=H,this._shouldBePrevented(de)||!se.mag())return;let Ae=se.div(de);return this._sum._add(Ae),this._sum.mag()Math.abs(Y.x)}class Bi extends ur{constructor(d){super(),this._currentTouchCount=0,this._map=d}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(d,P,N){super.touchstart(d,P,N),this._currentTouchCount=N.length}_start(d){this._lastPoints=d,gi(d[0].sub(d[1]))&&(this._valid=!1)}_move(d,P,N){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let H=d[0].sub(this._lastPoints[0]),$=d[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(H,$,N.timeStamp),this._valid?(this._lastPoints=d,this._active=!0,{pitchDelta:(H.y+$.y)/2*-.5}):void 0}gestureBeginsVertically(d,P,N){if(this._valid!==void 0)return this._valid;let H=d.mag()>=2,$=P.mag()>=2;if(!H&&!$)return;if(!H||!$)return this._firstMove===void 0&&(this._firstMove=N),N-this._firstMove<100&&void 0;let se=d.y>0==P.y>0;return gi(d)&&gi(P)&&se}}let mi={panStep:100,bearingStep:15,pitchStep:10};class ia{constructor(d){this._tr=new hu(d);let P=mi;this._panStep=P.panStep,this._bearingStep=P.bearingStep,this._pitchStep=P.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(d){if(d.altKey||d.ctrlKey||d.metaKey)return;let P=0,N=0,H=0,$=0,se=0;switch(d.keyCode){case 61:case 107:case 171:case 187:P=1;break;case 189:case 109:case 173:P=-1;break;case 37:d.shiftKey?N=-1:(d.preventDefault(),$=-1);break;case 39:d.shiftKey?N=1:(d.preventDefault(),$=1);break;case 38:d.shiftKey?H=1:(d.preventDefault(),se=-1);break;case 40:d.shiftKey?H=-1:(d.preventDefault(),se=1);break;default:return}return this._rotationDisabled&&(N=0,H=0),{cameraAnimation:de=>{let Ae=this._tr;de.easeTo({duration:300,easeId:"keyboardHandler",easing:ua,zoom:P?i.cw(Ae.zoom+P*(d.shiftKey?2:1),de.getZoomSnap()):Ae.zoom,bearing:Ae.bearing+N*this._bearingStep,pitch:Ae.pitch+H*this._pitchStep,offset:[-$*this._panStep,-se*this._panStep],center:Ae.center},{originalEvent:d})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function ua(Y){return Y*(2-Y)}let lo=4.000244140625,Bo=1/450;class Ua{constructor(d,P){this._onTimeout=N=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(N)},this._map=d,this._tr=new hu(d),this._triggerRenderFrame=P,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Bo}setZoomRate(d){this._defaultZoomRate=d}setWheelZoomRate(d){this._wheelZoomRate=d}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(d){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!d&&d.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(d){return!!this._map.cooperativeGestures.isEnabled()&&!(d.ctrlKey||this._map.cooperativeGestures.isBypassed(d))}wheel(d){if(!this.isEnabled())return;if(this._shouldBePrevented(d))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",d);let P=d.deltaMode===WheelEvent.DOM_DELTA_LINE?40*d.deltaY:d.deltaY,N=g(),H=N-(this._lastWheelEventTime||0);this._lastWheelEventTime=N,P!==0&&P%lo==0?this._type="wheel":P!==0&&Math.abs(P)<4?this._type="trackpad":H>400?(this._type=null,this._lastValue=P,this._timeout=setTimeout(this._onTimeout,40,d)):this._type||(this._type=Math.abs(H*P)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,P+=this._lastValue)),d.shiftKey&&P&&(P/=4),this._type&&(this._lastWheelEvent=d,this._delta-=P,this._active||this._start(d)),d.preventDefault()}_start(d){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let P=_.mousePos(this._map.getCanvas(),d),N=this._tr;this._aroundPoint=this._aroundCenter?N.transform.locationToScreenPoint(i.W.convert(N.center)):P,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let d=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let de=d.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=de),typeof this._targetZoom=="number"&&(this._targetZoom+=de)}if(this._delta!==0){let de=this._type==="wheel"&&Math.abs(this._delta)>lo?this._wheelZoomRate:this._defaultZoomRate,Ae=2/(1+Math.exp(-Math.abs(this._delta*de)));this._delta<0&&Ae!==0&&(Ae=1/Ae);let Fe=typeof this._targetZoom!="number"?d.scale:i.ao(this._targetZoom),Ie=d.applyConstrain(d.getCameraLngLat(),i.ar(Fe*Ae)).zoom,Ye=this._map.getZoomSnap();if(this._type==="wheel"&&Ye>0){let st=i.cw(d.zoom,Ye);this._targetZoom=i.cw(Ie,Ye,Ie-st)}else this._targetZoom=Ie;this._type==="wheel"&&(this._startZoom=d.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let P=typeof this._targetZoom!="number"?d.zoom:this._targetZoom,N=this._startZoom,H=this._easing,$,se=!1;if(this._type==="wheel"&&N&&H){let de=g()-this._lastWheelEventTime,Ae=Math.min((de+5)/200,1),Fe=H(Ae);$=i.H.number(N,P,Fe),Ae<1?this._needsRerender=!0:se=!0}else $=P,se=!0;return this._active=!0,se&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=$,{noInertia:!0,needsRenderFrame:!se,zoomDelta:$-d.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(d){let P=i.cy;if(this._prevEase){let N=this._prevEase,H=(g()-N.start)/N.duration,$=N.easing(H+.01)-N.easing(H),se=.27/Math.sqrt($*$+1e-4)*.01,de=Math.sqrt(.0729-se*se);P=i.cv(se,de,.25,1)}return this._prevEase={start:g(),duration:d,easing:P},P}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ls{constructor(d,P){this._clickZoom=d,this._tapZoom=P}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class cl{constructor(d){this._tr=new hu(d),this.reset()}reset(){this._active=!1}dblclick(d,P){return d.preventDefault(),{cameraAnimation:N=>{N.easeTo({duration:300,zoom:i.cw(this._tr.zoom+(d.shiftKey?-1:1),N.getZoomSnap()),around:this._tr.unproject(P)},{originalEvent:d})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Eu{constructor(){this._tap=new Me({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(d){this._zoomRate=d!=null?d:1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(d,P,N){if(!this._swipePoint)if(this._tapTime){let H=P[0],$=d.timeStamp-this._tapTime<500,se=this._tapPoint.dist(H)<30;$&&se?N.length>0&&(this._swipePoint=H,this._swipeTouch=N[0].identifier):this.reset()}else this._tap.touchstart(d,P,N)}touchmove(d,P,N){if(this._tapTime){if(this._swipePoint){if(N[0].identifier!==this._swipeTouch)return;let H=P[0],$=H.y-this._swipePoint.y;return this._swipePoint=H,d.preventDefault(),this._active=!0,{zoomDelta:$/128*this._zoomRate}}}else this._tap.touchmove(d,P,N)}touchend(d,P,N){if(this._tapTime)this._swipePoint&&N.length===0&&this.reset();else{let H=this._tap.touchend(d,P,N);H&&(this._tapTime=d.timeStamp,this._tapPoint=H)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class el{constructor(d,P,N){this._el=d,this._mousePan=P,this._touchPan=N}enable(d){this._inertiaOptions=d||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class yc{constructor(d,P,N,H){this._pitchWithRotate=d.pitchWithRotate,this._rollEnabled=d.rollEnabled,this._mouseRotate=P,this._mousePitch=N,this._mouseRoll=H}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class wi{constructor(d,P,N,H){this._el=d,this._touchZoom=P,this._touchRotate=N,this._tapDragZoom=H,this._rotationDisabled=!1,this._enabled=!0}enable(d){this._touchZoom.enable(d),this._rotationDisabled||this._touchRotate.enable(d),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(d){this._touchZoom.setZoomRate(d),this._tapDragZoom.setZoomRate(d)}setZoomThreshold(d){this._touchZoom.setZoomThreshold(d)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Di{constructor(d,P){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=d,this._options=P,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let d=this._map.getCanvasContainer();d.classList.add("maplibregl-cooperative-gestures"),this._container=_.create("div","maplibregl-cooperative-gesture-screen",d);let P=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(P=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let N=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),H=document.createElement("div");H.className="maplibregl-desktop-message",H.textContent=P,this._container.appendChild(H);let $=document.createElement("div");$.className="maplibregl-mobile-message",$.textContent=N,this._container.appendChild($),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(d){return d[this._bypassKey]}notifyGestureBlocked(d,P){this._enabled&&(this._map.fire(new i.n("cooperativegestureprevented",{gestureType:d,originalEvent:P})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}let fl=Y=>Y.zoom||Y.drag||Y.roll||Y.pitch||Y.rotate;class Fc extends i.n{}function du(Y){var d;return((d=Y.panDelta)===null||d===void 0?void 0:d.mag())||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta||Y.rollDelta}class ms{get _ownerDocument(){var d;return((d=this._el)===null||d===void 0?void 0:d.ownerDocument)||document}get _ownerWindow(){var d,P;return((P=(d=this._el)===null||d===void 0?void 0:d.ownerDocument)===null||P===void 0?void 0:P.defaultView)||window}constructor(d,P){this.handleWindowEvent=H=>{this.handleEvent(H,`${H.type}Window`)},this.handleEvent=(H,$)=>{if(H.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let se=H.type==="renderFrame"?void 0:H,de={needsRenderFrame:!1},Ae={},Fe={};for(let{handlerName:st,handler:dt,allowed:Pe}of this._handlers){if(!dt.isEnabled())continue;let Xe;if(this._blockedByActive(Fe,Pe,st))dt.reset();else if(dt[$||H.type]){if(i.cz(H,$||H.type)){let at=_.mousePos(this._map.getCanvas(),H);Xe=dt[$||H.type](H,at)}else if(i.cA(H,$||H.type)){let at=this._getMapTouches(H.touches),xt=_.touchPos(this._map.getCanvas(),at);Xe=dt[$||H.type](H,xt,at)}else i.cB($||H.type)||(Xe=dt[$||H.type](H));this.mergeHandlerResult(de,Ae,Xe,st,se),Xe!=null&&Xe.needsRenderFrame&&this._triggerRenderFrame()}(Xe||dt.isActive())&&(Fe[st]=dt)}let Ie={};for(let st in this._previousActiveHandlers)Fe[st]||(Ie[st]=se);this._previousActiveHandlers=Fe,(Object.keys(Ie).length||du(de))&&(this._changes.push([de,Ae,Ie]),this._triggerRenderFrame()),(Object.keys(Fe).length||du(de))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Ye}=de;Ye&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ye(this._map))},this._map=d,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new x0(d),this._bearingSnap=P.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(P);let N=this._el;this._listeners=[[N,"touchstart",{passive:!0}],[N,"touchmove",{passive:!1}],[N,"touchend",void 0],[N,"touchcancel",void 0],[N,"mousedown",void 0],[N,"mousemove",void 0],[N,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[N,"mouseover",void 0],[N,"mouseout",void 0],[N,"dblclick",void 0],[N,"click",void 0],[N,"keydown",{capture:!1}],[N,"keyup",void 0],[N,"wheel",{passive:!1}],[N,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[H,$,se]of this._listeners)H.addEventListener($,H===this._ownerDocument?this.handleWindowEvent:this.handleEvent,se)}destroy(){for(let[d,P,N]of this._listeners)d.removeEventListener(P,d===this._ownerDocument?this.handleWindowEvent:this.handleEvent,N)}_addDefaultHandlers(d){let P=this._map,N=P.getCanvasContainer();this._add("mapEvent",new Wh(P,d));let H=P.boxZoom=new Mu(P,d);this._add("boxZoom",H),d.interactive&&d.boxZoom&&H.enable();let $=P.cooperativeGestures=new Di(P,d.cooperativeGestures);this._add("cooperativeGestures",$),d.cooperativeGestures&&$.enable();let se=new Ce(P),de=new cl(P);P.doubleClickZoom=new ls(de,se),this._add("tapZoom",se),this._add("clickZoom",de),d.interactive&&d.doubleClickZoom&&P.doubleClickZoom.enable();let Ae=new Eu;this._add("tapDragZoom",Ae);let Fe=P.touchPitch=new Bi(P);this._add("touchPitch",Fe),d.interactive&&d.touchPitch&&P.touchPitch.enable(d.touchPitch);let Ie=()=>P.project(P.getCenter()),Ye=(function({enable:St,clickTolerance:Pt,aroundCenter:$t=!0,minPixelCenterThreshold:Ht=100,rotateDegreesPerPixelMoved:dr=.8},Xr){let Or=new lt({checkCorrectEvent:$r=>$r.button===0&&$r.ctrlKey||$r.button===2&&!$r.ctrlKey});return new Be({clickTolerance:Pt,move:($r,Er)=>{let Tr=Xr();if($t&&Math.abs(Tr.y-$r.y)>Ht)return{bearingDelta:i.cx(new i.P($r.x,Er.y),Er,Tr)};let Rr=(Er.x-$r.x)*dr;return $t&&Er.ydr.button===0&&dr.ctrlKey||dr.button===2});return new Be({clickTolerance:Pt,move:(dr,Xr)=>({pitchDelta:(Xr.y-dr.y)*$t}),moveStateManager:Ht,enable:St,assignEvents:Nt})})(d),dt=(function({enable:St,clickTolerance:Pt,rollDegreesPerPixelMoved:$t=.3},Ht){let dr=new lt({checkCorrectEvent:Xr=>Xr.button===2&&Xr.ctrlKey});return new Be({clickTolerance:Pt,move:(Xr,Or)=>{let $r=Ht(),Er=(Or.x-Xr.x)*$t;return Or.y<$r.y&&(Er=-Er),{rollDelta:Er}},moveStateManager:dr,enable:St,assignEvents:Nt})})(d,Ie);P.dragRotate=new yc(d,Ye,st,dt),this._add("mouseRotate",Ye,["mousePitch"]),this._add("mousePitch",st,["mouseRotate","mouseRoll"]),this._add("mouseRoll",dt,["mousePitch"]),d.interactive&&d.dragRotate&&P.dragRotate.enable();let Pe=(function({enable:St,clickTolerance:Pt}){let $t=new lt({checkCorrectEvent:Ht=>Ht.button===0&&!Ht.ctrlKey});return new Be({clickTolerance:Pt,move:(Ht,dr)=>({around:dr,panDelta:dr.sub(Ht)}),activateOnStart:!0,moveStateManager:$t,enable:St,assignEvents:Nt})})(d),Xe=new Kt(d,P);P.dragPan=new el(N,Pe,Xe),this._add("mousePan",Pe),this._add("touchPan",Xe,["touchZoom","touchRotate"]),d.interactive&&d.dragPan&&P.dragPan.enable(d.dragPan);let at=new In,xt=new ln;P.touchZoomRotate=new wi(N,xt,at,Ae),this._add("touchRotate",at,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),d.interactive&&d.touchZoomRotate&&P.touchZoomRotate.enable(d.touchZoomRotate),this._add("blockableMapEvent",new Yh(P));let Et=P.scrollZoom=new Ua(P,(()=>this._triggerRenderFrame()));this._add("scrollZoom",Et,["mousePan"]),d.interactive&&d.scrollZoom&&P.scrollZoom.enable(d.scrollZoom);let Bt=P.keyboard=new ia(P);this._add("keyboard",Bt),d.interactive&&d.keyboard&&P.keyboard.enable()}_add(d,P,N){this._handlers.push({handlerName:d,handler:P,allowed:N}),this._handlersById[d]=P}stop(d){if(!this._updatingCamera){for(let{handler:P}of this._handlers)P.reset();this._inertia.clear(),this._fireEvents({},{},d),this._changes=[]}}isActive(){for(let{handler:d}of this._handlers)if(d.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!fl(this._eventsInProgress)||this.isZooming()}_blockedByActive(d,P,N){for(let H in d)if(H!==N&&!(P!=null&&P.includes(H)))return!0;return!1}_getMapTouches(d){let P=[];for(let N of d)this._el.contains(N.target)&&P.push(N);return P}mergeHandlerResult(d,P,N,H,$){if(!N)return;i.e(d,N);let se={handlerName:H,originalEvent:N.originalEvent||$};N.zoomDelta!==void 0&&(P.zoom=se),N.panDelta!==void 0&&(P.drag=se),N.rollDelta!==void 0&&(P.roll=se),N.pitchDelta!==void 0&&(P.pitch=se),N.bearingDelta!==void 0&&(P.rotate=se)}_applyChanges(){let d={},P={},N={};for(let[H,$,se]of this._changes)H.panDelta&&(d.panDelta=(d.panDelta||new i.P(0,0))._add(H.panDelta)),H.zoomDelta&&(d.zoomDelta=(d.zoomDelta||0)+H.zoomDelta),H.bearingDelta&&(d.bearingDelta=(d.bearingDelta||0)+H.bearingDelta),H.pitchDelta&&(d.pitchDelta=(d.pitchDelta||0)+H.pitchDelta),H.rollDelta&&(d.rollDelta=(d.rollDelta||0)+H.rollDelta),H.around!==void 0&&(d.around=H.around),H.pinchAround!==void 0&&(d.pinchAround=H.pinchAround),H.noInertia&&(d.noInertia=H.noInertia),i.e(P,$),i.e(N,se);this._updateMapTransform(d,P,N),this._changes=[]}_updateMapTransform(d,P,N){let H=this._map,$=H._getTransformForUpdate(),se=H.terrain;if(!(du(d)||se&&this._terrainMovement))return void this._fireEvents(P,N,!0);H._stop(!0);let{panDelta:de,zoomDelta:Ae,bearingDelta:Fe,pitchDelta:Ie,rollDelta:Ye,around:st,pinchAround:dt}=d;dt!==void 0&&(st=dt),st||(st=H.transform.centerPoint),se&&!$.isPointOnMapSurface(st)&&(st=$.centerPoint);let Pe={panDelta:de,zoomDelta:Ae,rollDelta:Ye,pitchDelta:Ie,bearingDelta:Fe,around:st};this._map.cameraHelper.useGlobeControls&&!$.isPointOnMapSurface(st)&&(st=$.centerPoint);let Xe=st.distSqr($.centerPoint)<.01?$.center:$.screenPointToLocation(de?st.sub(de):st);this._handleMapControls({terrain:se,tr:$,deltasForHelper:Pe,preZoomAroundLoc:Xe,combinedEventsInProgress:P,panDelta:de}),H._applyUpdatedTransform($),this._map._update(),d.noInertia||this._inertia.record(d),this._fireEvents(P,N,!0)}_handleMapControls({terrain:d,tr:P,deltasForHelper:N,preZoomAroundLoc:H,combinedEventsInProgress:$,panDelta:se}){let de=this._map.cameraHelper;if(de.handleMapControlsRollPitchBearingZoom(N,P),d)return de.useGlobeControls?(this._terrainMovement||!$.drag&&!$.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void de.handleMapControlsPan(N,P,H)):this._terrainMovement||!$.drag&&!$.zoom?void($.drag&&this._terrainMovement&&se?P.setCenter(P.screenPointToLocation(P.centerPoint.sub(se))):de.handleMapControlsPan(N,P,H)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void de.handleMapControlsPan(N,P,H));de.handleMapControlsPan(N,P,H)}_fireEvents(d,P,N){let H=fl(this._eventsInProgress),$=fl(d),se={};for(let Ye in d){let{originalEvent:st}=d[Ye];this._eventsInProgress[Ye]||(se[`${Ye}start`]=st),this._eventsInProgress[Ye]=d[Ye]}!H&&$&&this._fireEvent("movestart",$.originalEvent);for(let Ye in se)this._fireEvent(Ye,se[Ye]);$&&this._fireEvent("move",$.originalEvent);for(let Ye in d){let{originalEvent:st}=d[Ye];this._fireEvent(Ye,st)}let de={},Ae;for(let Ye in this._eventsInProgress){let{handlerName:st,originalEvent:dt}=this._eventsInProgress[Ye];this._handlersById[st].isActive()||(delete this._eventsInProgress[Ye],Ae=P[st]||dt,de[`${Ye}end`]=Ae)}for(let Ye in de)this._fireEvent(Ye,de[Ye]);let Fe=fl(this._eventsInProgress),Ie=(H||$)&&!Fe;if(Ie&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ye=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Ye.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Ye)}if(N&&Ie){this._updatingCamera=!0;let Ye=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),st=dt=>dt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Fc("renderFrame",{timeStamp:d})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ff extends i.E{constructor(d,P,N){super(),this._renderFrameCallback=()=>{let H=Math.min((g()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(H)),H<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=d,this._bearingSnap=N.bearingSnap,this._zoomSnap=N.zoomSnap,this.cameraHelper=P,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(d,P){d.apply(this.transform,!0),this.transform=d,this.cameraHelper=P}getCenter(){return new i.W(this.transform.center.lng,this.transform.center.lat)}setCenter(d,P){return this.jumpTo({center:d},P)}getCenterElevation(){return this.transform.elevation}setCenterElevation(d,P){return this.jumpTo({elevation:d},P),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(d){this._centerClampedToGround=d}panBy(d,P,N){return d=i.P.convert(d).mult(-1),this.panTo(this.transform.center,i.e({offset:d},P),N)}panTo(d,P,N){return this.easeTo(i.e({center:d},P),N)}getZoom(){return this.transform.zoom}setZoom(d,P){return this.jumpTo({zoom:d},P),this}zoomTo(d,P,N){return this.easeTo(i.e({zoom:d},P),N)}zoomIn(d,P){return this.zoomTo(i.cw(this.getZoom()+1,this._zoomSnap),d,P),this}zoomOut(d,P){return this.zoomTo(i.cw(this.getZoom()-1,this._zoomSnap),d,P),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(d,P){return d!=this.transform.fov&&(this.transform.setFov(d),this.fire(new i.n("movestart",P)).fire(new i.n("move",P)).fire(new i.n("moveend",P))),this}getBearing(){return this.transform.bearing}setZoomSnap(d){return this._zoomSnap=d,this}getZoomSnap(){return this._zoomSnap}setBearing(d,P){return this.jumpTo({bearing:d},P),this}getPadding(){return this.transform.padding}setPadding(d,P){return this.jumpTo({padding:d},P),this}rotateTo(d,P,N){return this.easeTo(i.e({bearing:d},P),N)}resetNorth(d,P){return this.rotateTo(0,i.e({duration:1e3},d),P),this}resetNorthPitch(d,P){return this.easeTo(i.e({bearing:0,pitch:0,roll:0,duration:1e3},d),P),this}snapToNorth(d,P){return Math.abs(this.getBearing()){Xe.easeFunc(at),this.terrain&&!d.freezeElevation&&this._updateElevation(at),this._applyUpdatedTransform(N),this._fireMoveEvents(P)}),(at=>{this.terrain&&d.freezeElevation&&this._finalizeElevation(),this._afterEase(P,at)}),d),this}_prepareEase(d,P,N={}){this._moving=!0,P||N.moving||this.fire(new i.n("movestart",d)),this._zooming&&!N.zooming&&this.fire(new i.n("zoomstart",d)),this._rotating&&!N.rotating&&this.fire(new i.n("rotatestart",d)),this._pitching&&!N.pitching&&this.fire(new i.n("pitchstart",d)),this._rolling&&!N.rolling&&this.fire(new i.n("rollstart",d))}_prepareElevation(d){this._elevationCenter=d,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(d,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(d){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let P=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(d<1&&P!==this._elevationTarget){let N=this._elevationTarget-this._elevationStart;this._elevationStart+=d*(N-(P-(N*d+this._elevationStart))/(1-d)),this._elevationTarget=P}this.transform.setElevation(i.H.number(this._elevationStart,this._elevationTarget,d))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(d){if(!this.terrain&&d.elevation>=0&&d.pitch<=90)return{};let P=d.getCameraLngLat(),N=d.getCameraAltitude(),H=this.terrain?this.terrain.getElevationForLngLatZoom(P,d.zoom):0;if(Nthis._elevateCameraIfInsideTerrain(H))),this.transformCameraUpdate&&P.push((H=>this.transformCameraUpdate(H))),!P.length)return;let N=d.clone();for(let H of P){let $=N.clone(),{center:se,zoom:de,roll:Ae,pitch:Fe,bearing:Ie,elevation:Ye}=H($);se&&$.setCenter(se),Ye!==void 0&&$.setElevation(Ye),de!==void 0&&$.setZoom(de),Ae!==void 0&&$.setRoll(Ae),Fe!==void 0&&$.setPitch(Fe),Ie!==void 0&&$.setBearing(Ie),N.apply($,!1)}this.transform.apply(N,!1)}_fireMoveEvents(d){this.fire(new i.n("move",d)),this._zooming&&this.fire(new i.n("zoom",d)),this._rotating&&this.fire(new i.n("rotate",d)),this._pitching&&this.fire(new i.n("pitch",d)),this._rolling&&this.fire(new i.n("roll",d))}_afterEase(d,P){if(this._easeId&&P&&this._easeId===P)return;delete this._easeId;let N=this._zooming,H=this._rotating,$=this._pitching,se=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,N&&this.fire(new i.n("zoomend",d)),H&&this.fire(new i.n("rotateend",d)),$&&this.fire(new i.n("pitchend",d)),se&&this.fire(new i.n("rollend",d)),this.fire(new i.n("moveend",d))}flyTo(d,P){if(!d.essential&&f.prefersReducedMotion){let Er=i.V(d,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(Er,P)}this.stop(),"zoom"in(d=i.e({offset:[0,0],speed:1.2,curve:1.42,easing:i.cy},d))&&this._zoomSnap&&(d.zoom=i.cw(d.zoom,this._zoomSnap));let N=this._getTransformForUpdate(),H=N.bearing,$=N.pitch,se=N.roll,de=N.padding,Ae="bearing"in d?this._normalizeBearing(d.bearing,H):H,Fe="pitch"in d?+d.pitch:$,Ie="roll"in d?this._normalizeBearing(d.roll,se):se,Ye="padding"in d?d.padding:N.padding,st=i.P.convert(d.offset),dt=N.centerPoint.add(st),Pe=N.screenPointToLocation(dt),Xe=this.cameraHelper.handleFlyTo(N,{bearing:Ae,pitch:Fe,roll:Ie,padding:Ye,locationAtOffset:Pe,offsetAsPoint:st,center:d.center,minZoom:d.minZoom,zoom:d.zoom}),at=d.curve,xt=Math.max(N.width,N.height),Et=xt/Xe.scaleOfZoom,Bt=Xe.pixelPathLength;typeof Xe.scaleOfMinZoom=="number"&&(at=Math.sqrt(xt/Xe.scaleOfMinZoom/Bt*2));let St=at*at;function Pt(Er){let Tr=(Et*Et-xt*xt+(Er?-1:1)*St*St*Bt*Bt)/(2*(Er?Et:xt)*St*Bt);return Math.log(Math.sqrt(Tr*Tr+1)-Tr)}function $t(Er){return(Math.exp(Er)-Math.exp(-Er))/2}function Ht(Er){return(Math.exp(Er)+Math.exp(-Er))/2}let dr=Pt(!1),Xr=function(Er){return Ht(dr)/Ht(dr+at*Er)},Or=function(Er){return xt*((Ht(dr)*($t(Tr=dr+at*Er)/Ht(Tr))-$t(dr))/St)/Bt;var Tr},$r=(Pt(!0)-dr)/at;if(Math.abs(Bt)<2e-6||!isFinite($r)){if(Math.abs(xt-Et)<1e-6)return this.easeTo(d,P);let Er=Et0,Xr=Tr=>Math.exp(Er*at*Tr)}return d.duration="duration"in d?+d.duration:1e3*$r/("screenSpeed"in d?+d.screenSpeed/at:+d.speed),d.maxDuration&&d.duration>d.maxDuration&&(d.duration=0),this._zooming=!0,this._rotating=H!==Ae,this._pitching=Fe!==$,this._rolling=Ie!==se,this._padding=!N.isPaddingEqual(Ye),this._prepareEase(P,!1),this.terrain&&this._prepareElevation(Xe.targetCenter),this._ease((Er=>{let Tr=Er*$r,Rr=1/Xr(Tr),Lr=Or(Tr);this._rotating&&N.setBearing(i.H.number(H,Ae,Er)),this._pitching&&N.setPitch(i.H.number($,Fe,Er)),this._rolling&&N.setRoll(i.H.number(se,Ie,Er)),this._padding&&(N.interpolatePadding(de,Ye,Er),dt=N.centerPoint.add(st)),Xe.easeFunc(Er,Rr,Lr,dt),this.terrain&&!d.freezeElevation&&this._updateElevation(Er),this._applyUpdatedTransform(N),this._fireMoveEvents(P)}),(()=>{this.terrain&&d.freezeElevation&&this._finalizeElevation(),this._afterEase(P)}),d),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(d,P){var N;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let H=this._onEaseEnd;delete this._onEaseEnd,H.call(this,P)}return d||(N=this.handlers)===null||N===void 0||N.stop(!1),this}_ease(d,P,N){N.animate===!1||N.duration===0?(d(1),P()):(this._easeStart=g(),this._easeOptions=N,this._onEaseFrame=d,this._onEaseEnd=P,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(d,P){d=i.X(d,-180,180);let N=Math.abs(d-P);return Math.abs(d-360-P)MapLibre
'};class hl{constructor(d=ku){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=P=>{!P||P.sourceDataType!=="metadata"&&P.sourceDataType!=="visibility"&&P.dataType!=="style"&&P.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=d}getDefaultPosition(){return"bottom-right"}onAdd(d){return this._map=d,this._compact=this.options.compact,this._container=_.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=_.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=_.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(d,P){let N=this._map._getUIString(`AttributionControl.${P}`);d.title=N,d.setAttribute("aria-label",N)}_updateAttributions(){if(!this._map.style)return;let d=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?d=d.concat(this.options.customAttribution.map((H=>typeof H!="string"?"":H))):typeof this.options.customAttribution=="string"&&d.push(this.options.customAttribution)),this._map.style.stylesheet){let H=this._map.style.stylesheet;this.styleOwner=H.owner,this.styleId=H.id}let P=this._map.style.tileManagers;for(let H in P){let $=P[H];if($.used||$.usedForTerrain){let se=$.getSource();se.attribution&&!d.includes(se.attribution)&&d.push(se.attribution)}}d=d.filter((H=>String(H).trim())),d.sort(((H,$)=>H.length-$.length)),d=d.filter(((H,$)=>{for(let se=$+1;se{let P=this._container.children;if(P.length){let N=P[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&N.classList.add("maplibregl-compact"):N.classList.remove("maplibregl-compact")}},this.options=d}getDefaultPosition(){return"bottom-left"}onAdd(d){var P;this._map=d,this._compact=(P=this.options)===null||P===void 0?void 0:P.compact,this._container=_.create("div","maplibregl-ctrl");let N=_.create("a","maplibregl-ctrl-logo");return N.target="_blank",N.rel="noopener nofollow",N.href="https://maplibre.org/",N.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),N.setAttribute("rel","noopener nofollow"),this._container.appendChild(N),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class W{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(d){let P=++this._id;return this._queue.push({callback:d,id:P,cancelled:!1}),P}remove(d){let P=this._currentlyRunning,N=P?this._queue.concat(P):this._queue;for(let H of N)if(H.id===d)return void(H.cancelled=!0)}run(d=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let P=this._currentlyRunning=this._queue;this._queue=[];for(let N of P)if(!N.cancelled&&(N.callback(d),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var te=i.aS([{name:"a_pos3d",type:"Int16",components:3}]);class ve extends i.E{constructor(d){super(),this._lastTilesetChange=g(),this.tileManager=d,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=d._source.tileSize*2**this.deltaZoom,d.usedForTerrain=!0,d.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(d,P){this.tileManager.update(d,P),this._renderableTilesKeys=[];let N={};for(let H of ft(d,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:P,calculateTileZoom:this.tileManager._source.calculateTileZoom}))N[H.key]=!0,this._renderableTilesKeys.push(H.key),this._tiles[H.key]||(H.terrainRttPosMatrix32f=new Float64Array(16),i.c7(H.terrainRttPosMatrix32f,0,i.a6,i.a6,0,0,1),this._tiles[H.key]=new mt(H,this.tileSize),this._lastTilesetChange=g());for(let H in this._tiles)N[H]||delete this._tiles[H]}freeRtt(d){for(let P in this._tiles){let N=this._tiles[P];(!d||N.tileID.equals(d)||N.tileID.isChildOf(d)||d.isChildOf(N.tileID))&&(N.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((d=>this.getTileByID(d)))}getTileByID(d){return this._tiles[d]}getTerrainCoords(d,P){return P?this._getTerrainCoordsForTileRanges(d,P):this._getTerrainCoordsForRegularTile(d)}_getTerrainCoordsForRegularTile(d){let P={};for(let N of this._renderableTilesKeys){let H=this._tiles[N].tileID,$=d.clone(),se=i.bj();if(H.canonical.equals(d.canonical))i.c7(se,0,i.a6,i.a6,0,0,1);else if(H.canonical.isChildOf(d.canonical)){let de=H.canonical.z-d.canonical.z,Ae=H.canonical.x-(H.canonical.x>>de<>de<>de;i.c7(se,0,Ie,Ie,0,0,1),i.Q(se,se,[-Ae*Ie,-Fe*Ie,0])}else{if(!d.canonical.isChildOf(H.canonical))continue;{let de=d.canonical.z-H.canonical.z,Ae=d.canonical.x-(d.canonical.x>>de<>de<>de;i.c7(se,0,i.a6,i.a6,0,0,1),i.Q(se,se,[Ae*Ie,Fe*Ie,0]),i.S(se,se,[1/2**de,1/2**de,0])}}$.terrainRttPosMatrix32f=new Float32Array(se),P[N]=$}return P}_getTerrainCoordsForTileRanges(d,P){let N={};for(let H of this._renderableTilesKeys){let $=this._tiles[H].tileID;if(!this._isWithinTileRanges($,P))continue;let se=d.clone(),de=i.bj();if($.canonical.z===d.canonical.z){let Ae=d.canonical.x-$.canonical.x+d.wrap*(1<d.canonical.z){let Ae=$.canonical.z-d.canonical.z,Fe=$.canonical.x-($.canonical.x>>Ae<>Ae<>Ae),st=d.canonical.y-($.canonical.y>>Ae),dt=i.a6>>Ae;i.c7(de,0,dt,dt,0,0,1),i.Q(de,de,[-Fe*dt+Ye*i.a6,-Ie*dt+st*i.a6,0])}else{let Ae=d.canonical.z-$.canonical.z,Fe=d.canonical.x-(d.canonical.x>>Ae<>Ae<>Ae)-$.canonical.x,st=(d.canonical.y>>Ae)-$.canonical.y,dt=i.a6<$.maxzoom&&(se=$.maxzoom),se<$.minzoom)return;(N=this._sourceTileCache)[H=d.key]||(N[H]=d.scaledTo(se).key);let de=this.findTileInCaches(this._sourceTileCache[d.key]);if(!(de!=null&&de.dem)&&P)for(;se>=$.minzoom&&!(de!=null&&de.dem);)de=this.findTileInCaches(d.scaledTo(se--).key);return de}findTileInCaches(d){let P=this.tileManager.getTileByID(d);return P||(P=this.tileManager._outOfViewCache.getByKey(d),P)}anyTilesAfterTime(d=Date.now()){return this._lastTilesetChange>=d}_isWithinTileRanges(d,P){let N=P[d.canonical.z];return!!N&&(d.wrap>N.minWrap||d.wrap=N.minTileXWrapped&&d.canonical.x<=N.maxTileXWrapped&&d.canonical.y>=N.minTileY&&d.canonical.y<=N.maxTileY)}}class Se{constructor(d,P,N){this._meshCache={},this.painter=d,this.tileManager=new ve(P),this.options=N,this.exaggeration=typeof N.exaggeration=="number"?N.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let d in this._meshCache)this._meshCache[d].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(d,P,N,H=i.a6){var $;let se=d.normalizeCoordinates(P,N,H);if(!se)return 0;let de=this.getTerrainData(se.tileID),Ae=($=de.tile)===null||$===void 0?void 0:$.dem;if(!Ae)return 0;let Fe=i.cC([],[se.x/H*i.a6,se.y/H*i.a6],de.u_terrain_matrix),Ie=[Fe[0]*Ae.dim,Fe[1]*Ae.dim],Ye=Math.floor(Ie[0]),st=Math.floor(Ie[1]),dt=Ie[0]-Ye,Pe=Ie[1]-st;return Ae.get(Ye,st)*(1-dt)*(1-Pe)+Ae.get(Ye+1,st)*dt*(1-Pe)+Ae.get(Ye,st+1)*(1-dt)*Pe+Ae.get(Ye+1,st+1)*dt*Pe}getElevationForLngLatZoom(d,P){if(!i.cD(P,d.wrap()))return 0;let{tileID:N,mercatorX:H,mercatorY:$}=this._getOverscaledTileIDFromLngLatZoom(d,P);return this.getElevation(N,H%i.a6,$%i.a6,i.a6)}getElevationForLngLat(d,P){let N=ft(P,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),H=0;for(let $ of N)$.canonical.z>H&&(H=Math.min($.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(d,H)}getElevation(d,P,N,H=i.a6){return this.getDEMElevation(d,P,N,H)*this.exaggeration}getTerrainData(d){var P,N;if(!this._emptyDemTexture){let se=this.painter.context,de=new i.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new i.T(se,de,se.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new i.T(se,new i.R({width:1,height:1}),se.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(se.gl.NEAREST,se.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=i.ap([])}let H=this.tileManager.getSourceTile(d,!0);if(H!=null&&H.dem&&(!H.demTexture||H.needsTerrainPrepare)){let se=this.painter.context;H.demTexture=this.painter.getTileTexture(H.dem.stride),H.demTexture?H.demTexture.update(H.dem.getPixels(),{premultiply:!1}):H.demTexture=new i.T(se,H.dem.getPixels(),se.gl.RGBA,{premultiply:!1}),H.demTexture.bind(se.gl.NEAREST,se.gl.CLAMP_TO_EDGE),H.needsTerrainPrepare=!1}let $=H&&H.toString()+H.tileID.key+d.key;if($&&!this._demMatrixCache[$]){let se=this.tileManager.getSource().maxzoom,de=d.canonical.z-H.tileID.canonical.z;d.overscaledZ>d.canonical.z&&(d.canonical.z>=se?de=d.canonical.z-se:i.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ae=d.canonical.x-(d.canonical.x>>de<>de<>8<<4|$>>8,P[se+3]=0;let N=new i.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(P.buffer)),H=new i.T(d,N,d.gl.RGBA,{premultiply:!1});return H.bind(d.gl.NEAREST,d.gl.CLAMP_TO_EDGE),this._coordsTexture=H,H}pointCoordinate(d){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let P=new Uint8Array(4),N=this.painter.context,H=N.gl,$=Math.round(d.x*this.painter.pixelRatio/devicePixelRatio),se=Math.round(d.y*this.painter.pixelRatio/devicePixelRatio),de=Math.round(this.painter.height/devicePixelRatio);N.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),H.readPixels($,de-se-1,1,1,H.RGBA,H.UNSIGNED_BYTE,P),N.bindFramebuffer.set(null);let Ae=P[0]+(P[2]>>4<<8),Fe=P[1]+((15&P[2])<<8),Ie=this.coordsIndex[255-P[3]],Ye=Ie&&this.tileManager.getTileByID(Ie);if(!Ye)return null;let st=this._coordsTextureSize,dt=(1<0,H=N&&d.canonical.y===0,$=N&&d.canonical.y===(1<d.id!==P)),this._recentlyUsed.push(d.id)}stampObject(d){d.stamp=++this._stamp}getOrCreateFreeObject(){for(let P of this._recentlyUsed)if(!this._objects[P].inUse)return this._objects[P];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let d=this._createObject(this._objects.length);return this._objects.push(d),d}freeObject(d){d.inUse=!1}freeAllObjects(){for(let d of this._objects)this.freeObject(d)}isFull(){return!(this._objects.length!d.inUse))===!1}}let Re={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class rt{constructor(d,P){this.painter=d,this.terrain=P,this.pool=new Ee(d.context,30,P.tileManager.tileSize*P.qualityFactor)}destruct(){this.pool.destruct()}getTexture(d){return this.pool.getObjectForId(d.rtt[this._stacks.length-1].id).texture}prepareForRender(d,P){var N,H,$;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=d._order.filter((se=>!d._layers[se].isHidden(P))),this._coordsAscending={};for(let se in d.tileManagers){this._coordsAscending[se]={};let de=d.tileManagers[se].getVisibleCoordinates(),Ae=d.tileManagers[se].getSource(),Fe=Ae instanceof qe?Ae.terrainTileRanges:null;for(let Ie of de){let Ye=this.terrain.tileManager.getTerrainCoords(Ie,Fe);for(let st in Ye)($=this._coordsAscending[se])[st]||($[st]=[]),this._coordsAscending[se][st].push(Ye[st])}}this._rttFingerprints={};for(let se of d._order){let de=d._layers[se],Ae=de.source;if(Re[de.type]&&!this._rttFingerprints[Ae]){this._rttFingerprints[Ae]={};let Fe=(H=(N=d.tileManagers[Ae])===null||N===void 0?void 0:N.getState().revision)!==null&&H!==void 0?H:0;for(let Ie in this._coordsAscending[Ae])this._rttFingerprints[Ae][Ie]=`${this._coordsAscending[Ae][Ie].map((Ye=>Ye.key)).sort().join()}#${Fe}`}}for(let se of this._renderableTiles)for(let de in this._rttFingerprints){let Ae=this._rttFingerprints[de][se.tileID.key];Ae&&Ae!==se.rttFingerprint[de]&&(se.rtt=[])}}renderLayer(d,P){if(d.isHidden(this.painter.transform.zoom))return!1;let N=Object.assign(Object.assign({},P),{isRenderingToTexture:!0}),H=d.type,$=this.painter,se=this._renderableLayerIds[this._renderableLayerIds.length-1]===d.id;if(Re[H]&&(this._prevType&&Re[this._prevType]||this._stacks.push([]),this._prevType=H,this._stacks[this._stacks.length-1].push(d.id),!se))return!0;if(Re[this._prevType]||Re[H]&&se){this._prevType=H;let de=this._stacks.length-1,Ae=this._stacks[de]||[];for(let Fe of this._renderableTiles){if(this.pool.isFull()&&(mc(this.painter,this.terrain,this._rttTiles,N),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Fe),Fe.rtt[de]){let Ye=this.pool.getObjectForId(Fe.rtt[de].id);if(Ye.stamp===Fe.rtt[de].stamp){this.pool.useObject(Ye);continue}}let Ie=this.pool.getOrCreateFreeObject();this.pool.useObject(Ie),this.pool.stampObject(Ie),Fe.rtt[de]={id:Ie.id,stamp:Ie.stamp},$.context.bindFramebuffer.set(Ie.fbo.framebuffer),$.context.clear({color:i.bo.transparent,stencil:0}),$.currentStencilSource=void 0;for(let Ye of Ae){let st=$.style._layers[Ye],dt=st.source?this._coordsAscending[st.source][Fe.tileID.key]:[Fe.tileID];$.context.viewport.set([0,0,Ie.fbo.width,Ie.fbo.height]),$._renderTileClippingMasks(st,dt,!0),$.renderLayer($,$.style.tileManagers[st.source],st,dt,N),st.source&&(Fe.rttFingerprint[st.source]=this._rttFingerprints[st.source][Fe.tileID.key])}}return mc(this.painter,this.terrain,this._rttTiles,N),this._rttTiles=[],this.pool.freeAllObjects(),Re[H]}return!1}}let He={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},pt=o,Ft={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:ku,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:i.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},Rt=class extends ff{get _ownerWindow(){var Y,d;return((d=(Y=this._container)===null||Y===void 0?void 0:Y.ownerDocument)===null||d===void 0?void 0:d.defaultView)||window}constructor(Y){var d,P,N;let H=Object.assign(Object.assign(Object.assign({},Ft),Y),{canvasContextAttributes:Object.assign(Object.assign({},Ft.canvasContextAttributes),Y.canvasContextAttributes)});if(H.minZoom!=null&&H.maxZoom!=null&&H.minZoom>H.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(H.minPitch!=null&&H.maxPitch!=null&&H.minPitch>H.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(H.minPitch!=null&&H.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(H.maxPitch!=null&&H.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let $=new Ls,se=new Gu;H.minZoom!==void 0&&$.setMinZoom(H.minZoom),H.maxZoom!==void 0&&$.setMaxZoom(H.maxZoom),H.minPitch!==void 0&&$.setMinPitch(H.minPitch),H.maxPitch!==void 0&&$.setMaxPitch(H.maxPitch),H.renderWorldCopies!==void 0&&$.setRenderWorldCopies(H.renderWorldCopies),H.transformConstrain!==null&&$.setConstrainOverride(H.transformConstrain),super($,se,{bearingSnap:H.bearingSnap,zoomSnap:H.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new W,this._controls=[],this._mapId=i.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ae=>{if(Ae.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let Fe of Object.values(this.style._layers))if(Fe.type==="custom"&&console.warn(`Custom layer with id '${Fe.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),Fe._listeners)for(let[Ie]of Object.entries(Fe._listeners))console.warn(`Custom layer with id '${Fe.id}' had event listeners for event '${Ie}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new i.n("webglcontextlost",{originalEvent:Ae}))}else this.fire(new i.n("webglcontextlost",{originalEvent:Ae}))},this._contextRestored=Ae=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new i.n("webglcontextrestored",{originalEvent:Ae}))},this._onMapScroll=Ae=>{if(Ae.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=H.interactive,this._maxTileCacheSize=H.maxTileCacheSize,this._maxTileCacheZoomLevels=H.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},H.canvasContextAttributes),this._trackResize=H.trackResize===!0,this._bearingSnap=H.bearingSnap,this._zoomSnap=H.zoomSnap,this._centerClampedToGround=H.centerClampedToGround,this._refreshExpiredTiles=H.refreshExpiredTiles===!0,this._fadeDuration=H.fadeDuration,this._crossSourceCollisions=H.crossSourceCollisions===!0,this._collectResourceTiming=H.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},He),H.locale),this._clickTolerance=H.clickTolerance,this._overridePixelRatio=H.pixelRatio,this._maxCanvasSize=H.maxCanvasSize,this._zoomLevelsToOverscale=H.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=H.transformCameraUpdate,this.transformConstrain=H.transformConstrain,this.cancelPendingTileRequestsWhileZooming=H.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(H.anisotropicFilterPitch),H.reduceMotion!==void 0&&(f.prefersReducedMotion=H.reduceMotion),this._imageQueueHandle=x.addThrottleControl((()=>this.isMoving())),this._requestManager=new y(H.transformRequest),this._container=this._resolveContainer(H.container),H.maxBounds&&this.setMaxBounds(H.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this.on("terrain",(()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)})),this.once("idle",(()=>this._idleTriggered=!0)),typeof window!="undefined"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new ms(this,H),this._hash=H.hash?new gh(typeof H.hash=="string"&&H.hash||void 0).addTo(this):void 0,!((d=this._hash)===null||d===void 0)&&d._onHashChange()||(this.jumpTo({center:H.center,elevation:H.elevation,zoom:H.zoom,bearing:H.bearing,pitch:H.pitch,roll:H.roll}),H.bounds&&(this.resize(),this.fitBounds(H.bounds,i.e({},H.fitBoundsOptions,{duration:0}))));let de=typeof H.style=="string"||((N=(P=H.style)===null||P===void 0?void 0:P.projection)===null||N===void 0?void 0:N.type)!=="globe";this.resize(null,de),this._localIdeographFontFamily=H.localIdeographFontFamily,this._validateStyle=H.validateStyle,H.style&&this.setStyle(H.style,{localIdeographFontFamily:H.localIdeographFontFamily}),H.attributionControl&&this.addControl(new hl(typeof H.attributionControl=="boolean"?void 0:H.attributionControl)),H.maplibreLogo&&this.addControl(new mh,H.logoPosition),this.on("style.load",(()=>{if(de||this._resizeTransform(),this.transform.unmodified){let Ae=i.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ae)}})),this.on("data",(Ae=>{this._update(Ae.dataType==="style"),this.fire(new i.n(`${Ae.dataType}data`,Ae))})),this.on("dataloading",(Ae=>{this.fire(new i.n(`${Ae.dataType}dataloading`,Ae))})),this.on("dataabort",(Ae=>{this.fire(new i.n("sourcedataabort",Ae))}))}_getMapId(){return this._mapId}setGlobalStateProperty(Y,d){return this.style.setGlobalStateProperty(Y,d),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(Y,d){if(d===void 0&&(d=Y.getDefaultPosition?Y.getDefaultPosition():"top-right"),!(Y!=null&&Y.onAdd))return this.fire(new i.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let P=Y.onAdd(this);this._controls.push(Y);let N=this._controlPositions[d];return d.includes("bottom")?N.insertBefore(P,N.firstChild):N.appendChild(P),this}removeControl(Y){if(!(Y!=null&&Y.onRemove))return this.fire(new i.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let d=this._controls.indexOf(Y);return d>-1&&this._controls.splice(d,1),Y.onRemove(this),this}hasControl(Y){return this._controls.includes(Y)}coveringTiles(Y){return ft(this.transform,Y)}calculateCameraOptionsFromTo(Y,d,P,N){return N==null&&this.terrain&&(N=this.terrain.getElevationForLngLat(P,this.transform)),super.calculateCameraOptionsFromTo(Y,d,P,N)}resize(Y,d=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(d);let P=!this._moving;return P&&(this.stop(),this.fire(new i.n("movestart",Y)).fire(new i.n("move",Y))),this.fire(new i.n("resize",Y)),P&&this.fire(new i.n("moveend",Y)),this}_resizeInternal(Y=!0){let[d,P]=this._containerDimensions(),N=this._getClampedPixelRatio(d,P);if(this._resizeCanvas(d,P,N),this.painter.resize(d,P,N),this.painter.overLimit()){let H=this.painter.context.gl;this._maxCanvasSize=[H.drawingBufferWidth,H.drawingBufferHeight];let $=this._getClampedPixelRatio(d,P);this._resizeCanvas(d,P,$),this.painter.resize(d,P,$)}this._resizeTransform(Y)}_resizeTransform(Y=!0){var d;let[P,N]=this._containerDimensions();this.transform.resize(P,N,Y),(d=this._requestedCameraState)===null||d===void 0||d.resize(P,N,Y)}_getClampedPixelRatio(Y,d){let{0:P,1:N}=this._maxCanvasSize,H=this.getPixelRatio(),$=Y*H,se=d*H;return Math.min($>P?P/$:1,se>N?N/se:1)*H}getPixelRatio(){var Y;return(Y=this._overridePixelRatio)!==null&&Y!==void 0?Y:devicePixelRatio}setPixelRatio(Y){this._overridePixelRatio=Y,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Y){return this.transform.setMaxBounds(ie.convert(Y)),this._update()}setMinZoom(Y){if((Y=Y==null?-2:Y)>=-2&&Y<=this.transform.maxZoom){let d=this.transform.zoom,P=this._getTransformForUpdate();return P.setMinZoom(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.zoom&&this.fire(new i.n("zoomstart")).fire(new i.n("zoom")).fire(new i.n("zoomend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(Y){if((Y=Y==null?22:Y)>=this.transform.minZoom){let d=this.transform.zoom,P=this._getTransformForUpdate();return P.setMaxZoom(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.zoom&&this.fire(new i.n("zoomstart")).fire(new i.n("zoom")).fire(new i.n("zoomend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Y){if((Y=Y==null?0:Y)<0)throw new Error("minPitch must be greater than or equal to 0");if(Y>=0&&Y<=this.transform.maxPitch){let d=this.transform.pitch,P=this._getTransformForUpdate();return P.setMinPitch(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.pitch&&this.fire(new i.n("pitchstart")).fire(new i.n("pitch")).fire(new i.n("pitchend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(Y){if((Y=Y==null?60:Y)>180)throw new Error("maxPitch must be less than or equal to 180");if(Y>=this.transform.minPitch){let d=this.transform.pitch,P=this._getTransformForUpdate();return P.setMaxPitch(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.pitch&&this.fire(new i.n("pitchstart")).fire(new i.n("pitch")).fire(new i.n("pitchend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(Y){if((Y=Y==null?20:Y)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(Y<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=Y,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Y){return this.transform.setRenderWorldCopies(Y),this._update()}setTransformConstrain(Y){return this.transform.setConstrainOverride(Y),this._update()}project(Y){return this.transform.locationToScreenPoint(i.W.convert(Y),this.style&&this.terrain)}unproject(Y){return this.transform.screenPointToLocation(i.P.convert(Y),this.terrain)}isMoving(){var Y;return this._moving||((Y=this.handlers)===null||Y===void 0?void 0:Y.isMoving())}isZooming(){var Y;return this._zooming||((Y=this.handlers)===null||Y===void 0?void 0:Y.isZooming())}isRotating(){var Y;return this._rotating||((Y=this.handlers)===null||Y===void 0?void 0:Y.isRotating())}_createDelegatedListener(Y,d,P){if(Y==="mouseenter"||Y==="mouseover"){let N=!1;return{layers:d,listener:P,delegates:{mousemove:$=>{let se=d.filter((Ae=>this.getLayer(Ae))),de=se.length!==0?this.queryRenderedFeatures($.point,{layers:se}):[];de.length?N||(N=!0,P.call(this,new Xl(Y,this,$.originalEvent,{features:de}))):N=!1},mouseout:()=>{N=!1}}}}if(Y==="mouseleave"||Y==="mouseout"){let N=!1;return{layers:d,listener:P,delegates:{mousemove:se=>{let de=d.filter((Ae=>this.getLayer(Ae)));(de.length!==0?this.queryRenderedFeatures(se.point,{layers:de}):[]).length?N=!0:N&&(N=!1,P.call(this,new Xl(Y,this,se.originalEvent)))},mouseout:se=>{N&&(N=!1,P.call(this,new Xl(Y,this,se.originalEvent)))}}}}{let N=H=>{let $=d.filter((de=>this.getLayer(de))),se=$.length!==0?this.queryRenderedFeatures(H.point,{layers:$}):[];se.length&&(H.features=se,P.call(this,H),delete H.features)};return{layers:d,listener:P,delegates:{[Y]:N}}}}_saveDelegatedListener(Y,d){var P;this._delegatedListeners||(this._delegatedListeners={}),(P=this._delegatedListeners)[Y]||(P[Y]=[]),this._delegatedListeners[Y].push(d)}_removeDelegatedListener(Y,d,P){var N;if(!(!((N=this._delegatedListeners)===null||N===void 0)&&N[Y]))return;let H=this._delegatedListeners[Y];for(let $=0;$d.includes(de)))){for(let de in se.delegates)this.off(de,se.delegates[de]);return void H.splice($,1)}}}on(Y,d,P){if(P===void 0)return super.on(Y,d);let N=typeof d=="string"?[d]:d,H=this._createDelegatedListener(Y,N,P);this._saveDelegatedListener(Y,H);for(let $ in H.delegates)this.on($,H.delegates[$]);return{unsubscribe:()=>{this._removeDelegatedListener(Y,N,P)}}}once(Y,d,P){if(P===void 0)return super.once(Y,d);let N=typeof d=="string"?[d]:d,H=this._createDelegatedListener(Y,N,P);for(let $ in H.delegates){let se=H.delegates[$];H.delegates[$]=(...de)=>{this._removeDelegatedListener(Y,N,P),se(...de)}}this._saveDelegatedListener(Y,H);for(let $ in H.delegates)this.once($,H.delegates[$]);return this}off(Y,d,P){return P===void 0?super.off(Y,d):(this._removeDelegatedListener(Y,typeof d=="string"?[d]:d,P),this)}queryRenderedFeatures(Y,d){if(!this.style)return[];let P,N=Y instanceof i.P||Array.isArray(Y),H=N?Y:[[0,0],[this.transform.width,this.transform.height]];if(d||(d=(N?{}:Y)||{}),H instanceof i.P||typeof H[0]=="number")P=[i.P.convert(H)];else{let $=i.P.convert(H[0]),se=i.P.convert(H[1]);P=[$,new i.P(se.x,$.y),se,new i.P($.x,se.y),$]}return this.style.queryRenderedFeatures(P,d,this.transform)}querySourceFeatures(Y,d){return this.style.querySourceFeatures(Y,d)}setStyle(Y,d){return(d=i.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},d)).diff!==!1&&d.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Y?(this._diffStyle(Y,d),this):(this._localIdeographFontFamily=d.localIdeographFontFamily,this._updateStyle(Y,d))}setTransformRequest(Y){return this._requestManager.setTransformRequest(Y),this}_getUIString(Y){let d=this._locale[Y];if(d==null)throw new Error(`Missing UI string '${Y}'`);return d}_updateStyle(Y,d){var P,N,H;if((P=this._diffStyleRequest)===null||P===void 0||P.abort(),this._diffStyleRequest=null,d.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(Y,d)));let $=this.style&&d.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Y)),Y?(this.style=new Cc(this,d||{}),this.style.setEventedParent(this,{style:this.style}),typeof Y=="string"?this.style.loadURL(Y,d,$):this.style.loadJSON(Y,d,$),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(H=(N=this.style)===null||N===void 0?void 0:N.projection)===null||H===void 0||H.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Cc(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Y,d){return i._(this,void 0,void 0,(function*(){var P;if((P=this._diffStyleRequest)===null||P===void 0||P.abort(),typeof Y=="string"){let N=Y;this._diffStyleRequest=new AbortController;let H=this._diffStyleRequest;try{let $=yield this._requestManager.transformRequest(N,"Style");if(H.signal.aborted)return void(this._diffStyleRequest=null);let se=yield i.k($,H);this._diffStyleRequest=null,this._updateDiff(se.data,d)}catch($){this._diffStyleRequest=null,i.$($)||this.fire(new i.l(i.d($)))}}else typeof Y=="object"&&(this._diffStyleRequest=null,this._updateDiff(Y,d))}))}_updateDiff(Y,d){try{this.style.setState(Y,d)&&this._update(!0)}catch(P){i.w(`Unable to perform style diff: ${i.d(P).message}. Rebuilding the style from scratch.`),this._updateStyle(Y,d)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();i.w("There is no style added to the map.")}addSource(Y,d){return this._lazyInitEmptyStyle(),this.style.addSource(Y,d),this._update(!0)}isSourceLoaded(Y){var d;let P=(d=this.style)===null||d===void 0?void 0:d.tileManagers[Y];if(P!==void 0)return P.loaded();this.fire(new i.l(new Error(`There is no tile manager with ID '${Y}'`)))}setTerrain(Y){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Y){let d=this.style.tileManagers[Y.source];if(!d)throw new Error(`cannot load terrain, because there exists no source with ID: ${Y.source}`);this.terrain===null&&d.reload();for(let P in this.style._layers){let N=this.style._layers[P];N.type==="hillshade"&&N.source===Y.source&&i.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),N.type==="color-relief"&&N.source===Y.source&&i.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Se(this.painter,d,Y),this.painter.renderToTexture=new rt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=P=>{var N;P.dataType==="style"?this.terrain.tileManager.freeRtt():P.dataType==="source"&&P.tile&&(P.sourceId!==Y.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((N=P.source)===null||N===void 0?void 0:N.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(P.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new i.n("terrain",{terrain:Y})),this}getTerrain(){var Y,d;return(d=(Y=this.terrain)===null||Y===void 0?void 0:Y.options)!==null&&d!==void 0?d:null}areTilesLoaded(){var Y;let d=(Y=this.style)===null||Y===void 0?void 0:Y.tileManagers;for(let P of Object.values(d))if(!P.areTilesLoaded())return!1;return!0}removeSource(Y){return this.style.removeSource(Y),this._update(!0)}getSource(Y){return this.style.getSource(Y)}setSourceTileLodParams(Y,d,P){if(P){let N=this.getSource(P);if(!N)throw new Error(`There is no source with ID "${P}", cannot set LOD parameters`);N.calculateTileZoom=Tt(Math.max(1,Y),Math.max(1,d))}else for(let N in this.style.tileManagers)this.style.tileManagers[N].getSource().calculateTileZoom=Tt(Math.max(1,Y),Math.max(1,d));return this._update(!0),this}refreshTiles(Y,d){let P=this.style.tileManagers[Y];if(!P)throw new Error(`There is no tile manager with ID "${Y}", cannot refresh tile`);d===void 0?P.reload(!0):P.refreshTiles(d.map((N=>new i.aa(N.z,N.x,N.y))))}addImage(Y,d,P={}){let{pixelRatio:N=1,sdf:H=!1,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe}=P;if(this._lazyInitEmptyStyle(),!(d instanceof HTMLImageElement||i.b(d))){if(d.width===void 0||d.height===void 0)return this.fire(new i.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Ie,height:Ye,data:st}=d,dt=d;return this.style.addImage(Y,{data:new i.R({width:Ie,height:Ye},new Uint8Array(st)),pixelRatio:N,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe,sdf:H,version:0,userImage:dt}),dt.onAdd&&dt.onAdd(this,Y),this}}{let{width:Ie,height:Ye,data:st}=f.getImageData(d);this.style.addImage(Y,{data:new i.R({width:Ie,height:Ye},st),pixelRatio:N,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe,sdf:H,version:0})}}updateImage(Y,d){let P=this.style.getImage(Y);if(!P)return this.fire(new i.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let N=d instanceof HTMLImageElement||i.b(d)?f.getImageData(d):d,{width:H,height:$,data:se}=N;if(H===void 0||$===void 0)return this.fire(new i.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(H!==P.data.width||$!==P.data.height)return this.fire(new i.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let de=!(d instanceof HTMLImageElement||i.b(d));return P.data.replace(se,de),this.style.updateImage(Y,P),this}getImage(Y){return this.style.getImage(Y)}hasImage(Y){return Y?!!this.style.getImage(Y):(this.fire(new i.l(new Error("Missing required image id"))),!1)}removeImage(Y){this.style.removeImage(Y)}loadImage(Y){return i._(this,void 0,void 0,(function*(){return x.getImage(yield this._requestManager.transformRequest(Y,"Image"),new AbortController)}))}listImages(){return this.style.listImages()}addLayer(Y,d){return this._lazyInitEmptyStyle(),this.style.addLayer(Y,d),this._update(!0)}moveLayer(Y,d){return this.style.moveLayer(Y,d),this._update(!0)}removeLayer(Y){return this.style.removeLayer(Y),this._update(!0)}getLayer(Y){return this.style.getLayer(Y)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Y,d,P){return this.style.setLayerZoomRange(Y,d,P),this._update(!0)}setFilter(Y,d,P={}){return this.style.setFilter(Y,d,P),this._update(!0)}getFilter(Y){return this.style.getFilter(Y)}setPaintProperty(Y,d,P,N={}){return this.style.setPaintProperty(Y,d,P,N),this._update(!0)}getPaintProperty(Y,d){return this.style.getPaintProperty(Y,d)}setLayoutProperty(Y,d,P,N={}){return this.style.setLayoutProperty(Y,d,P,N),this._update(!0)}getLayoutProperty(Y,d){return this.style.getLayoutProperty(Y,d)}setGlyphs(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Y,d),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Y,d,P={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Y,d,P,(N=>{N||this._update(!0)})),this}removeSprite(Y){return this._lazyInitEmptyStyle(),this.style.removeSprite(Y),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Y,d,(P=>{P||this._update(!0)})),this}setLight(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setLight(Y,d),this._update(!0)}getLight(){return this.style.getLight()}setSky(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setSky(Y,d),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Y,d){return this.style.setFeatureState(Y,d),this._update()}removeFeatureState(Y,d){return this.style.removeFeatureState(Y,d),this._update()}getFeatureState(Y){return this.style.getFeatureState(Y)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Y=0,d=0;return this._container&&(Y=this._container.clientWidth||400,d=this._container.clientHeight||300),[Y,d]}_setupResizeObserver(){var Y;let d=!1,P=ph((H=>{this._trackResize&&!this._removed&&(this.resize(H),this.redraw())}),50),N=(Y=this._ownerWindow.ResizeObserver)!==null&&Y!==void 0?Y:ResizeObserver;this._resizeObserver=new N((H=>{d?P(H):d=!0})),this._resizeObserver.observe(this._container)}_resolveContainer(Y){if(typeof Y=="string"){let d=document.getElementById(Y);if(!d)throw new Error(`Container '${Y}' not found.`);return d}if(Y instanceof HTMLElement||Y&&typeof Y=="object"&&Y.nodeType===1)return Y;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let Y=this._container;Y.classList.add("maplibregl-map");let d=this._canvasContainer=_.create("div","maplibregl-canvas-container",Y);this._interactive&&d.classList.add("maplibregl-interactive"),this._canvas=_.create("canvas","maplibregl-canvas",d),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let P=this._containerDimensions(),N=this._getClampedPixelRatio(P[0],P[1]);this._resizeCanvas(P[0],P[1],N);let H=this._controlContainer=_.create("div","maplibregl-control-container",Y),$=this._controlPositions={};for(let se of["top-left","top-right","bottom-left","bottom-right"])$[se]=_.create("div",`maplibregl-ctrl-${se} `,H);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Y,d,P){this._canvas.width=Math.floor(P*Y),this._canvas.height=Math.floor(P*d),this._canvas.style.width=`${Y}px`,this._canvas.style.height=`${d}px`}_setupPainter(){let Y=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),d=null;this._canvas.addEventListener("webglcontextcreationerror",(N=>{d={requestedAttributes:Y},N&&(d.statusMessage=N.statusMessage,d.type=N.type)}),{once:!0});let P=null;if(P=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,Y):this._canvas.getContext("webgl2",Y)||this._canvas.getContext("webgl",Y),!P){let N="Failed to initialize WebGL";throw d?(d.message=N,new Error(JSON.stringify(d))):new Error(N)}this.painter=new $u(P,this.transform)}migrateProjection(Y,d){super.migrateProjection(Y,d),this.painter.transform=Y,this.fire(new i.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Y){var d;return!((d=this.style)===null||d===void 0)&&d._loaded?(this._styleDirty||(this._styleDirty=Y),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Y){return this._update(),this._renderTaskQueue.add(Y)}_cancelRenderFrame(Y){this._renderTaskQueue.remove(Y)}_render(Y){var d,P,N,H,$,se;let de=this._idleTriggered?this._fadeDuration:0,Ae=((d=this.style.projection)===null||d===void 0?void 0:d.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Y),this._removed)return;let Fe=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let st=this.transform.zoom,dt=g();this.style.zoomHistory.update(st,dt);let Pe=new i.J(st,{now:dt,fadeDuration:de,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Xe=Pe.crossFadingFactor();Xe===1&&Xe===this._crossFadingFactor||(Fe=!0,this._crossFadingFactor=Xe),this.style.update(Pe)}let Ie=((P=this.style.projection)===null||P===void 0?void 0:P.transitionState)>0!==Ae;(N=this.style.projection)===null||N===void 0||N.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((H=this.style.projection)===null||H===void 0?void 0:H.transitionState,($=this.style.projection)===null||$===void 0?void 0:$.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||Ie)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(se=this.style)===null||se===void 0?void 0:se._updatePlacement(this.transform,this.showCollisionBoxes,de,this._crossSourceCollisions,Ie),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:de,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new i.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new i.n("load"))),this.style&&(this.style.hasTransitions()||Fe)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Ye=this._sourcesDirty||this._styleDirty||this._placementDirty;return Ye||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new i.n("idle")),!this._loaded||this._fullyLoaded||Ye||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Y,d;this._hash&&this._hash.remove();for(let N of this._controls)N.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(Y=this._diffStyleRequest)===null||Y===void 0||Y.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),x.removeThrottleControl(this._imageQueueHandle),(d=this._resizeObserver)===null||d===void 0||d.disconnect();let P=this.painter.context.gl.getExtension("WEBGL_lose_context");P!=null&&P.loseContext&&P.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new i.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,f.frame(this._frameRequest,(Y=>{this._frameRequest=null;try{this._render(Y)}catch(d){if(!i.$(d)&&!(function(P){return P.message===qf})(d))throw d}}),(()=>{}),this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Y){this._showTileBoundaries!==Y&&(this._showTileBoundaries=Y,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Y){this._showPadding!==Y&&(this._showPadding=Y,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Y){this._showCollisionBoxes!==Y&&(this._showCollisionBoxes=Y,Y?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Y){this._showOverdrawInspector!==Y&&(this._showOverdrawInspector=Y,this._update())}get repaint(){return!!this._repaint}set repaint(Y){this._repaint!==Y&&(this._repaint=Y,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Y){this._vertices=Y,this._update()}get version(){return pt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(Y){return this._lazyInitEmptyStyle(),this.style.setProjection(Y),this._update(!0)}},ir={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class nr{constructor(d,P,N=!1){this.mousedown=$=>{this.startMove($,_.mousePos(this.element,$)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=$=>{this.move($,_.mousePos(this.element,$))},this.mouseup=$=>{this._rotatePitchHandler.dragEnd($),this.offTemp()},this.touchstart=$=>{$.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=_.touchPos(this.element,$.targetTouches)[0],this.startMove($,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=$=>{$.targetTouches.length!==1?this.reset():(this._lastPos=_.touchPos(this.element,$.targetTouches)[0],this.move($,this._lastPos))},this.touchend=$=>{$.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=P;let H=new Zt;this._rotatePitchHandler=new Be({clickTolerance:3,move:($,se)=>{let de=P.getBoundingClientRect(),Ae=new i.P((de.bottom-de.top)/2,(de.right-de.left)/2);return{bearingDelta:i.cx(new i.P($.x,se.y),se,Ae),pitchDelta:N?-.5*(se.y-$.y):void 0}},moveStateManager:H,enable:!0,assignEvents:()=>{}}),this.map=d,P.addEventListener("mousedown",this.mousedown),P.addEventListener("touchstart",this.touchstart,{passive:!1}),P.addEventListener("touchcancel",this.reset)}startMove(d,P){this._rotatePitchHandler.dragStart(d,P),_.disableDrag()}move(d,P){let N=this.map,{bearingDelta:H,pitchDelta:$}=this._rotatePitchHandler.dragMove(d,P)||{};H&&N.setBearing(N.getBearing()+H),$&&N.setPitch(N.getPitch()+$)}off(){let d=this.element;d.removeEventListener("mousedown",this.mousedown),d.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),d.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){_.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let Cr;function Vr(Y,d,P,N=!1){if(N||!P.getCoveringTilesDetailsProvider().allowWorldCopies())return Y==null?void 0:Y.wrap();let H=new i.W(Y.lng,Y.lat);if(Y=new i.W(Y.lng,Y.lat),d){let $=new i.W(Y.lng-360,Y.lat),se=new i.W(Y.lng+360,Y.lat),de=P.locationToScreenPoint(Y).distSqr(d);P.locationToScreenPoint($).distSqr(d)180;){let $=P.locationToScreenPoint(Y);if($.x>=0&&$.y>=0&&$.x<=P.width&&$.y<=P.height)break;Y.lng>P.center.lng?Y.lng-=360:Y.lng+=360}return Y.lng!==H.lng&&P.isPointOnMapSurface(P.locationToScreenPoint(Y))?Y:H}let sr={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 br(Y,d,P){let N=Y.classList;for(let H in sr)N.remove(`maplibregl-${P}-anchor-${H}`);N.add(`maplibregl-${P}-anchor-${d}`)}class kr extends i.E{constructor(d){if(super(),this._onClick=P=>{this.fire(new i.n("click",{originalEvent:P}))},this._onKeyPress=P=>{P.code!=="Space"&&P.code!=="Enter"||this.togglePopup()},this._onMapClick=P=>{let N=P.originalEvent.target,H=this._element;this._popup&&(N===H||H.contains(N))&&this.togglePopup()},this._update=P=>{if(!this._map)return;let N=this._map.loaded()&&!this._map.isMoving();((P==null?void 0:P.type)==="terrain"||(P==null?void 0:P.type)==="render"&&!N)&&this._map.once("render",this._update),this._lngLat=Vr(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let H="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?H=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(H=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let $="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?$="rotateX(0deg)":this._pitchAlignment==="map"&&($=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||P&&P.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${sr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${$} ${H}`,f.frameAsync(new AbortController,this._map._ownerWindow).then((()=>{this._updateOpacity((P==null?void 0:P.type)==="moveend")})).catch((()=>{}))},this._onMove=P=>{if(!this._isDragging){let N=this._clickTolerance||this._map._clickTolerance;this._isDragging=P.point.dist(this._pointerdownPos)>=N}this._isDragging&&(this._pos=P.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.n("dragstart"))),this.fire(new i.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new i.n("dragend")),this._state="inactive"},this._addDragHandler=P=>{this._element.contains(P.originalEvent.target)&&(P.preventDefault(),this._positionDelta=P.point.sub(this._pos).add(this._offset),this._pointerdownPos=P.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=(d==null?void 0:d.anchor)||"center",this._color=(d==null?void 0:d.color)||"#3FB1CE",this._scale=(d==null?void 0:d.scale)||1,this._draggable=(d==null?void 0:d.draggable)||!1,this._clickTolerance=(d==null?void 0:d.clickTolerance)||0,this._subpixelPositioning=(d==null?void 0:d.subpixelPositioning)||!1,this._isDragging=!1,this._state="inactive",this._rotation=(d==null?void 0:d.rotation)||0,this._rotationAlignment=(d==null?void 0:d.rotationAlignment)||"auto",this._pitchAlignment=d!=null&&d.pitchAlignment&&d.pitchAlignment!=="auto"?d.pitchAlignment:this._rotationAlignment,this.setOpacity(d==null?void 0:d.opacity,d==null?void 0:d.opacityWhenCovered),d==null?void 0:d.element)this._element=d.element,this._offset=i.P.convert((d==null?void 0:d.offset)||[0,0]);else{this._defaultMarker=!0,this._element=_.create("div");let P=_.createNS("http://www.w3.org/2000/svg","svg"),N=41,H=27;P.setAttributeNS(null,"display","block"),P.setAttributeNS(null,"height",`${N}px`),P.setAttributeNS(null,"width",`${H}px`),P.setAttributeNS(null,"viewBox",`0 0 ${H} ${N}`);let $=_.createNS("http://www.w3.org/2000/svg","g");$.setAttributeNS(null,"stroke","none"),$.setAttributeNS(null,"stroke-width","1"),$.setAttributeNS(null,"fill","none"),$.setAttributeNS(null,"fill-rule","evenodd");let se=_.createNS("http://www.w3.org/2000/svg","g");se.setAttributeNS(null,"fill-rule","nonzero");let de=_.createNS("http://www.w3.org/2000/svg","g");de.setAttributeNS(null,"transform","translate(3.0, 29.0)"),de.setAttributeNS(null,"fill","#000000");let Ae=[{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"}];for(let xt of Ae){let Et=_.createNS("http://www.w3.org/2000/svg","ellipse");Et.setAttributeNS(null,"opacity","0.04"),Et.setAttributeNS(null,"cx","10.5"),Et.setAttributeNS(null,"cy","5.80029008"),Et.setAttributeNS(null,"rx",xt.rx),Et.setAttributeNS(null,"ry",xt.ry),de.appendChild(Et)}let Fe=_.createNS("http://www.w3.org/2000/svg","g");Fe.setAttributeNS(null,"fill",this._color);let Ie=_.createNS("http://www.w3.org/2000/svg","path");Ie.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Fe.appendChild(Ie);let Ye=_.createNS("http://www.w3.org/2000/svg","g");Ye.setAttributeNS(null,"opacity","0.25"),Ye.setAttributeNS(null,"fill","#000000");let st=_.createNS("http://www.w3.org/2000/svg","path");st.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ye.appendChild(st);let dt=_.createNS("http://www.w3.org/2000/svg","g");dt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),dt.setAttributeNS(null,"fill","#FFFFFF");let Pe=_.createNS("http://www.w3.org/2000/svg","g");Pe.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Xe=_.createNS("http://www.w3.org/2000/svg","circle");Xe.setAttributeNS(null,"fill","#000000"),Xe.setAttributeNS(null,"opacity","0.25"),Xe.setAttributeNS(null,"cx","5.5"),Xe.setAttributeNS(null,"cy","5.5"),Xe.setAttributeNS(null,"r","5.4999962");let at=_.createNS("http://www.w3.org/2000/svg","circle");at.setAttributeNS(null,"fill","#FFFFFF"),at.setAttributeNS(null,"cx","5.5"),at.setAttributeNS(null,"cy","5.5"),at.setAttributeNS(null,"r","5.4999962"),Pe.appendChild(Xe),Pe.appendChild(at),se.appendChild(de),se.appendChild(Fe),se.appendChild(Ye),se.appendChild(dt),se.appendChild(Pe),P.appendChild(se),P.setAttributeNS(null,"height",N*this._scale+"px"),P.setAttributeNS(null,"width",H*this._scale+"px"),this._element.appendChild(P),this._offset=i.P.convert((d==null?void 0:d.offset)||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(P=>{P.preventDefault()})),this._element.addEventListener("mousedown",(P=>{P.preventDefault()})),br(this._element,this._anchor,"marker"),d==null?void 0:d.className)for(let P of d.className.split(" "))this._element.classList.add(P);this._popup=null}addTo(d){return this.remove(),this._map=d,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",d._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),d.getCanvasContainer().appendChild(this._element),d.on("move",this._update),d.on("moveend",this._update),d.on("terrain",this._update),d.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(d){return this._lngLat=i.W.convert(d),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(d){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),d){if(!("offset"in d.options)){let H=Math.abs(13.5)/Math.SQRT2;d.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[H,-1*(38.1-13.5+H)],"bottom-right":[-H,-1*(38.1-13.5+H)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=d,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(d){return this._subpixelPositioning=d,this}getPopup(){return this._popup}togglePopup(){let d=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:d?(d.isOpen()?d.remove():(d.setLngLat(this._lngLat),d.addTo(this._map)),this):this}_updateOpacity(d=!1){var P,N;let H=(P=this._map)===null||P===void 0?void 0:P.terrain,$=this._map.transform.isLocationOccluded(this._lngLat);if(!H||$){let dt=$?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==dt&&(this._element.style.opacity=dt,this._element.classList.toggle("maplibregl-marker-covered",$)))}if(d)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}let se=this._map,de=se.terrain.depthAtPoint(this._pos),Ae=se.terrain.getElevationForLngLat(this._lngLat,se.transform);if(se.transform.lngLatToCameraDepth(this._lngLat,Ae)-de<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let Fe=-this._offset.y/se.transform.pixelsPerMeter,Ie=Math.sin(se.getPitch()*Math.PI/180)*Fe,Ye=se.terrain.depthAtPoint(new i.P(this._pos.x,this._pos.y-this._offset.y)),st=se.transform.lngLatToCameraDepth(this._lngLat,Ae+Ie)-Ye>.006;!((N=this._popup)===null||N===void 0)&&N.isOpen()&&st&&this._popup.remove(),this._element.style.opacity=st?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",st)}getOffset(){return this._offset}setOffset(d){return this._offset=i.P.convert(d),this._update(),this}addClassName(d){this._element.classList.add(d)}removeClassName(d){this._element.classList.remove(d)}toggleClassName(d){return this._element.classList.toggle(d)}setDraggable(d){return this._draggable=!!d,this._map&&(d?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(d){return this._rotation=d||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(d){return this._rotationAlignment=d||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(d){return this._pitchAlignment=d&&d!=="auto"?d:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(d,P){return(this._opacity===void 0||d===void 0&&P===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),d!==void 0&&(this._opacity=String(d)),P!==void 0&&(this._opacityWhenCovered=String(P)),this._map&&this._updateOpacity(!0),this}}let Gr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wr=0,Ar=!1,En={maxWidth:100,unit:"metric"};function zn(Y,d,P){let N=(P==null?void 0:P.maxWidth)||100,H=Y._container.clientHeight/2,$=Y._container.clientWidth/2,se=Y.unproject([$-N/2,H]),de=Y.unproject([$+N/2,H]),Ae=Math.round(Y.project(de).x-Y.project(se).x),Fe=Math.min(N,Ae,Y._container.clientWidth),Ie=se.distanceTo(de);if((P==null?void 0:P.unit)==="imperial"){let Ye=3.2808*Ie;Ye>5280?Zn(d,Fe,Ye/5280,Y._getUIString("ScaleControl.Miles")):Zn(d,Fe,Ye,Y._getUIString("ScaleControl.Feet"))}else(P==null?void 0:P.unit)==="nautical"?Zn(d,Fe,Ie/1852,Y._getUIString("ScaleControl.NauticalMiles")):Ie>=1e3?Zn(d,Fe,Ie/1e3,Y._getUIString("ScaleControl.Kilometers")):Zn(d,Fe,Ie,Y._getUIString("ScaleControl.Meters"))}function Zn(Y,d,P,N){let H=(function($){let se=Math.pow(10,`${Math.floor($)}`.length-1),de=$/se;return de=de>=10?10:de>=5?5:de>=3?3:de>=2?2:de>=1?1:(function(Ae){let Fe=Math.pow(10,Math.ceil(-Math.log(Ae)/Math.LN10));return Math.round(Ae*Fe)/Fe})(de),se*de})(P);Y.style.width=d*(H/P)+"px",Y.innerHTML=`${H} ${N}`}let ai={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},Mi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Si(Y){if(Y){if(typeof Y=="number"){let d=Math.round(Math.abs(Y)/Math.SQRT2);return{center:new i.P(0,0),top:new i.P(0,Y),"top-left":new i.P(d,d),"top-right":new i.P(-d,d),bottom:new i.P(0,-Y),"bottom-left":new i.P(d,-d),"bottom-right":new i.P(-d,-d),left:new i.P(Y,0),right:new i.P(-Y,0)}}if(Y instanceof i.P||Array.isArray(Y)){let d=i.P.convert(Y);return{center:d,top:d,"top-left":d,"top-right":d,bottom:d,"bottom-left":d,"bottom-right":d,left:d,right:d}}return{center:i.P.convert(Y.center||[0,0]),top:i.P.convert(Y.top||[0,0]),"top-left":i.P.convert(Y["top-left"]||[0,0]),"top-right":i.P.convert(Y["top-right"]||[0,0]),bottom:i.P.convert(Y.bottom||[0,0]),"bottom-left":i.P.convert(Y["bottom-left"]||[0,0]),"bottom-right":i.P.convert(Y["bottom-right"]||[0,0]),left:i.P.convert(Y.left||[0,0]),right:i.P.convert(Y.right||[0,0])}}return Si(new i.P(0,0))}let ya=o;a.AJAXError=i.cG,a.EXTENT=i.a6,a.Event=i.n,a.Evented=i.E,a.LngLat=i.W,a.MercatorCoordinate=i.a7,a.Point=i.P,a.addProtocol=i.cH,a.config=i.c,a.removeProtocol=i.cI,a.AttributionControl=hl,a.BoxZoomHandler=Mu,a.CanvasSource=Le,a.CooperativeGesturesHandler=Di,a.DoubleClickZoomHandler=ls,a.DragPanHandler=el,a.DragRotateHandler=yc,a.EdgeInsets=ko,a.FullscreenControl=class extends i.E{constructor(Y={}){var d;super(),this._onFullscreenChange=()=>{var P;let N=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((P=N==null?void 0:N.shadowRoot)===null||P===void 0)&&P.fullscreenElement;)N=N.shadowRoot.fullscreenElement;N===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(d=Y.pseudo)!==null&&d!==void 0&&d,Y!=null&&Y.container&&(Y.container instanceof HTMLElement?this._container=Y.container:i.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(Y){return this._map=Y,this._container||(this._container=this._map.getContainer()),this._controlContainer=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Y=this._fullscreenButton=_.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);_.create("span","maplibregl-ctrl-icon",Y).setAttribute("aria-hidden","true"),Y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Y),this._fullscreenButton.title=Y}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new i.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new i.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},a.GeoJSONSource=et,a.GeolocateControl=class extends i.E{constructor(Y){super(),this._onSuccess=d=>{if(this._map){if(this._isOutOfMapMaxBounds(d))return this._setErrorState(),this.fire(new i.n("outofmaxbounds",d)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=d,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(d),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(d),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new i.n("geolocate",d)),this._finish()}},this._updateCamera=d=>{let P=new i.W(d.coords.longitude,d.coords.latitude),N=d.coords.accuracy,H=this._map.getBearing(),$=i.e({bearing:H},this.options.fitBoundsOptions),se=ie.fromLngLat(P,N);this._map.fitBounds(se,$,{geolocateSource:!0})},this._updateMarker=d=>{if(d){let P=new i.W(d.coords.longitude,d.coords.latitude);this._accuracyCircleMarker.setLngLat(P).addTo(this._map),this._userLocationDotMarker.setLngLat(P).addTo(this._map),this._accuracy=d.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=d=>{if(this._map){if(d.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let P=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(d.code===3&&Ar)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new i.n("error",d)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=d=>{if(!this._map)return;let P=(d==null?void 0:d[0])instanceof ResizeObserverEntry;d.geolocateSource||this._watchState!=="ACTIVE_LOCK"||P||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new i.n("trackuserlocationend")),this.fire(new i.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(d=>{d.preventDefault()})),this._geolocateButton=_.create("button","maplibregl-ctrl-geolocate",this._container),_.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=d=>{if(this._map){if(d===!1){i.w("Geolocation support is not available so the GeolocateControl will be disabled.");let P=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P)}else{let P=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=_.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new kr({element:this._dotElement}),this._circleElement=_.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new kr({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=i.e({},Gr,Y)}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return i._(this,arguments,void 0,(function*(d=!1){if(Cr!==void 0&&!d)return Cr;if(window.navigator.permissions===void 0)return Cr=!!window.navigator.geolocation,Cr;try{Cr=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(P){Cr=!!window.navigator.geolocation}return Cr}))})().then((d=>this._finishSetupUI(d))),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Wr=0,Ar=!1}_isOutOfMapMaxBounds(Y){let d=this._map.getMaxBounds(),P=Y.coords;return d&&(P.longituded.getEast()||P.latituded.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let Y=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&Y))return;let d=this._map.project(Y),P=this._map.unproject([d.x+100,d.y]),N=Y.distanceTo(P)/100,H=2*this._accuracy/N;this._circleElement.style.width=`${H.toFixed(2)}px`,this._circleElement.style.height=`${H.toFixed(2)}px`}trigger(){if(!this._setup)return i.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wr--,Ar=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new i.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.n("trackuserlocationstart")),this.fire(new i.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let Y;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Wr++,Wr>1?(Y={maximumAge:6e5,timeout:0},Ar=!0):(Y=this.options.positionOptions,Ar=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Y)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},a.GlobeControl=class{constructor(){this._toggleProjection=()=>{var Y;let d=(Y=this._map.getProjection())===null||Y===void 0?void 0:Y.type;this._map.setProjection(d!=="mercator"&&d?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var Y;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((Y=this._map.getProjection())===null||Y===void 0?void 0:Y.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=_.create("button","maplibregl-ctrl-globe",this._container),_.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},a.Hash=gh,a.ImageSource=qe,a.KeyboardHandler=ia,a.LngLatBounds=ie,a.LogoControl=mh,a.Map=Rt,a.MapLibreMap=Rt,a.MapMouseEvent=Xl,a.MapTouchEvent=cf,a.MapWheelEvent=jh,a.Marker=kr,a.NavigationControl=class{constructor(Y){this._updateZoomButtons=()=>{let d=this._map.getZoom(),P=d===this._map.getMaxZoom(),N=d===this._map.getMinZoom();this._zoomInButton.disabled=P,this._zoomOutButton.disabled=N,this._zoomInButton.setAttribute("aria-disabled",P.toString()),this._zoomOutButton.setAttribute("aria-disabled",N.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(d,P)=>{let N=this._map._getUIString(`NavigationControl.${P}`);d.title=N,d.setAttribute("aria-label",N)},this.options=i.e({},ir,Y),this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(d=>d.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(d=>this._map.zoomIn({},{originalEvent:d}))),_.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(d=>this._map.zoomOut({},{originalEvent:d}))),_.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(d=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:d}):this._map.resetNorth({},{originalEvent:d})})),this._compassIcon=_.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Y){return this._map=Y,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new nr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(Y,d){let P=_.create("button",Y,this._container);return P.type="button",P.addEventListener("click",d),P}},a.Popup=class extends i.E{constructor(Y){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new i.n("close"))),this),this._update=d=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=_.create("div","maplibregl-popup",this._map.getContainer()),this._tip=_.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let de of this.options.className.split(" "))this._container.classList.add(de);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let P;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Vr(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),d&&"point"in d&&d.point&&(P=d.point),this._trackPointer&&!P)return;let N=this._flatPos=this._pos=this._trackPointer&&P?P:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&P?P:this._map.transform.locationToScreenPoint(this._lngLat));let H=this.options.anchor,$=Si(this.options.offset);if(!H){let de=this._container.offsetWidth,Ae=this._container.offsetHeight,Fe=(function(Ye){var st,dt,Pe,Xe;return Ye?{top:(st=Ye.top)!==null&&st!==void 0?st:0,right:(dt=Ye.right)!==null&&dt!==void 0?dt:0,bottom:(Pe=Ye.bottom)!==null&&Pe!==void 0?Pe:0,left:(Xe=Ye.left)!==null&&Xe!==void 0?Xe:0}:{top:0,right:0,bottom:0,left:0}})(this.options.padding),Ie;Ie=N.y+$.bottom.ythis._map.transform.height-Ae-Fe.bottom?["bottom"]:[],N.xthis._map.transform.width-de/2-Fe.right&&Ie.push("right"),H=Ie.length===0?"bottom":Ie.join("-")}let se=N.add($[H]);this.options.subpixelPositioning||(se=se.round()),this._container.style.transform=`${sr[H]} translate(${se.x}px,${se.y}px)`,br(this._container,H,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=i.e(Object.create(ai),Y)}addTo(Y){return this._map&&this.remove(),this._map=Y,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new i.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Y){return this._lngLat=i.W.convert(Y),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Y){return this.setDOMContent(document.createTextNode(Y))}setHTML(Y){let d=document.createDocumentFragment(),P=document.createElement("body"),N;for(P.innerHTML=Y;N=P.firstChild,N;)d.appendChild(N);return this.setDOMContent(d)}getMaxWidth(){var Y;return(Y=this._container)===null||Y===void 0?void 0:Y.style.maxWidth}setMaxWidth(Y){return this.options.maxWidth=Y,this._update(),this}setDOMContent(Y){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=_.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Y),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Y){return this._container&&this._container.classList.add(Y),this}removeClassName(Y){return this._container&&this._container.classList.remove(Y),this}setOffset(Y){return this.options.offset=Y,this._update(),this}toggleClassName(Y){if(this._container)return this._container.classList.toggle(Y)}setSubpixelPositioning(Y){this.options.subpixelPositioning=Y}setPadding(Y){this.options.padding=Y,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=_.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Y=this._container.querySelector(Mi);Y&&Y.focus()}},a.RasterDEMTileSource=De,a.RasterTileSource=be,a.ScaleControl=class{constructor(Y){this._onMove=()=>{zn(this._map,this._container,this.options)},this.setUnit=d=>{this.options.unit=d,zn(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},En),Y)}getDefaultPosition(){return"bottom-left"}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Y.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},a.ScrollZoomHandler=Ua,a.Style=Cc,a.TerrainControl=class{constructor(Y){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=Y}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=_.create("button","maplibregl-ctrl-terrain",this._container),_.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},a.TwoFingersTouchPitchHandler=Bi,a.TwoFingersTouchRotateHandler=In,a.TwoFingersTouchZoomHandler=ln,a.TwoFingersTouchZoomRotateHandler=wi,a.VectorTileSource=me,a.VideoSource=we,a.addSourceType=(Y,d)=>i._(void 0,void 0,void 0,(function*(){if(Te(Y))throw new Error(`A source type called "${Y}" already exists.`);((P,N)=>{Ke[P]=N})(Y,d)})),a.clearPrewarmedResources=function(){let Y=ee;Y&&(Y.isPreloaded()&&Y.numActive()===1?(Y.release(q),ee=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},a.createTileMesh=lu,a.getGlobalDispatcher=ue,a.getMaxParallelImageRequests=function(){return i.c.MAX_PARALLEL_IMAGE_REQUESTS},a.getRTLTextPluginStatus=function(){return tt().getRTLTextPluginStatus()},a.getVersion=function(){return ya},a.getWorkerCount=function(){return U.workerCount},a.getWorkerUrl=function(){return i.c.WORKER_URL},a.importScriptInWorkers=function(Y){return ue().broadcast("IS",Y)},a.isTimeFrozen=function(){return v.isFrozen()},a.now=g,a.prewarm=function(){ye().acquire(q)},a.restoreNow=function(){v.restoreNow()},a.setMaxParallelImageRequests=function(Y){i.c.MAX_PARALLEL_IMAGE_REQUESTS=Y},a.setNow=function(Y){v.setNow(Y)},a.setRTLTextPlugin=function(Y,d){return tt().setRTLTextPlugin(Y,d)},a.setWorkerCount=function(Y){U.workerCount=Y},a.setWorkerUrl=function(Y){i.c.WORKER_URL=Y}}));var n=e;return n}))});var GWe=fe((I6r,VWe)=>{"use strict";var g_=Xt(),Btr=as().sanitizeHTML,Otr=oK(),OWe=zy();function NWe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=OWe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var qv=NWe.prototype;qv.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=oD(t)};qv.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};qv.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};qv.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};qv.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};qv.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};qv.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!oD(e)){var r=Ntr(e);t.addSource(this.idSource,r)}};qv.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function UWe(e){var t={},r={};switch(e.type){case"circle":g_.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":g_.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":g_.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,a=Otr(n.textposition,n.iconsize);g_.extendFlat(t,{"icon-image":n.icon,"icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":n.placement}),g_.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":g_.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function Ntr(e){var t=e.sourcetype,r=e.source,n={type:t},a;return t==="geojson"?a="data":t==="vector"?a=typeof r=="string"?"url":"tiles":t==="raster"?(a="tiles",n.tileSize=256):t==="image"&&(a="url",n.coordinates=e.coordinates),n[a]=r,e.sourceattribution&&(n.attribution=Btr(e.sourceattribution)),n}VWe.exports=function(t,r,n){var a=new NWe(t,r);return a.update(n),a}});var QWe=fe((z6r,JWe)=>{"use strict";var hK=BWe(),lD=Xt(),WWe=Cg(),HWe=bi(),Utr=Yi(),Vtr=ed(),sD=kl(),YWe=$p(),Gtr=YWe.drawMode,Htr=YWe.selectMode,jtr=Ac().prepSelect,Wtr=Ac().clearOutline,Ytr=Ac().clearSelectionsCache,Xtr=Ac().selectOnClick,qy=zy(),Ztr=GWe();function XWe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var cc=XWe.prototype;cc.plot=function(e,t,r){var n=this,a;n.map?a=new Promise(function(i,o){n.updateMap(e,t,i,o)}):a=new Promise(function(i,o){n.createMap(e,t,i,o)}),r.push(a)};cc.createMap=function(e,t,r,n){var a=this,i=t[a.id],o=a.styleObj=KWe(i.style),s=i.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null;let u={container:a.div,style:o.style,center:dK(i.center),zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,maxBounds:l,interactive:!a.isStatic,canvasContextAttributes:{preserveDrawingBuffer:a.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},c=i._fitBounds;c&&(u.bounds=[[c.west,c.south],[c.east,c.north]],u.fitBoundsOptions={padding:qy.fitBoundsPadding});let f=a.map=new hK.Map(u).addControl(new hK.AttributionControl({compact:!0}));var v={};f.on("styleimagemissing",function(p){var x=p.id;if(!v[x]&&/^[a-zA-Z0-9-]+$/.test(x)){v[x]=!0;var _=new Image(15,15);_.onload=function(){f.addImage(x,_,{sdf:!0})},_.crossOrigin="Anonymous",_.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+x+".svg"}}),f.setTransformRequest(function(p){return p=p.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),p=p.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),p=p.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:p}}),f._canvas.style.left="0px",f._canvas.style.top="0px",a.rejectOnError(n),a.isStatic||a.initFx(e,t);var g=[];g.push(new Promise(function(p){f.once("load",p)})),g=g.concat(WWe.fetchTraceGeoData(e)),Promise.all(g).then(function(){c&&ZWe(a,i),$We(a,i),a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)}).catch(n)};cc.updateMap=function(e,t,r,n){var a=this,i=a.map,o=t[this.id];a.rejectOnError(n);var s=[],l=KWe(o.style);JSON.stringify(a.styleObj)!==JSON.stringify(l)&&(a.styleObj=l,i.setStyle(l.style),a.traceHash={},s.push(new Promise(function(u){i.once("styledata",u)}))),s=s.concat(WWe.fetchTraceGeoData(e)),Promise.all(s).then(function(){a.fillBelowLookup(e,t),a.updateData(e);let u=o._fitBounds;u&&(i.fitBounds([[u.west,u.south],[u.east,u.north]],{padding:qy.fitBoundsPadding,animate:!1}),ZWe(a,o),$We(a,o)),a.updateLayout(t),a.resolveOnRender(r)}).catch(n)};function ZWe(e,t){let{center:r,zoom:n}=e.getView();t._input.center=t.center=r,t._input.zoom=t.zoom=n,t._input._fitView={center:zo({},r),zoom:n}}function $We(e,t){let r=e.getView();e.viewInitial={center:lD.extendFlat({},r.center),bearing:t.bearing,pitch:t.pitch,zoom:r.zoom}}cc.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,a,i,o=this.belowLookup={},s=!1;for(a=0;a1)for(a=0;at.project(n).x,_subplot:t},t.yaxis={_id:"y",c2p:n=>t.project(n).y,_subplot:t},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},Utr.setConvert(t.mockAxis,e)};cc.initFx=function(e,t){var r=this,n=r.gd,a=r.map;a.on("moveend",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];HWe.call("_storeDirectGUIEdit",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l&&l._rehover&&l._rehover()}}),a.on("wheel",function(){r.wheeling=!0}),a.on("mousemove",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return a.unproject(u).lng},r.yaxis.p2c=function(){return a.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&sD.hover(n,s,r.id)},sD.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function i(){sD.loneUnhover(t._hoverlayer)}a.on("dragstart",function(){r.dragging=!0,i()}),a.on("zoomstart",i),a.on("mouseout",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(s))}a.on("drag",o),a.on("zoom",o),a.on("dblclick",function(){var s=n._fullLayout[r.id];HWe.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;a.setCenter(dK(l.center)),a.setZoom(l.zoom),a.setBearing(l.bearing),a.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){Ytr(r.dragOptions),Wtr(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf("select")>-1&&Xtr(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&sD.click(n,l.originalEvent)}}};cc.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function a(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var i=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[a([u.xmin,u.ymin]),a([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(a)}};var s=t.dragOptions;t.dragOptions=lD.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),Htr(i)||Gtr(i)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){jtr(l,u,c,t.dragOptions,i)},Vtr.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};cc.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};cc.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,a;if(r.length!==n.length){for(a=0;a$tr});function $tr(e,t){let r=[];for(let l of e){if(l.subplot!==t||l.visible!==!0)continue;if(l.type==="choroplethmap")return null;let{lat:u,lon:c}=l;if(!c||!u)continue;let f=Math.min(c.length,u.length);for(let v=0;v{"use strict";eYe=$0(Cg())});var aYe=fe((B6r,iYe)=>{"use strict";var vK=Xt(),Ktr=b2(),Jtr=Ah(),nYe=ZM(),{getMapFitBounds:Qtr}=(rYe(),Gs(tYe));iYe.exports=function(t,r,n){Ktr(t,r,n,{type:"map",attributes:nYe,handleDefaults:err,partition:"y",fullData:n})};function err(e,t,r,n){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let a=r("fitbounds");var i=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),l=r("bounds.north");(i===void 0||o===void 0||s===void 0||l===void 0)&&delete t.bounds,Jtr(e,t,{name:"layers",handleItemDefaults:trr}),t._fitBounds=null;let{_fitView:{center:u,zoom:c}={},center:f,zoom:v}=e,g=(f==null?void 0:f.lon)===(u==null?void 0:u.lon)&&(f==null?void 0:f.lat)===(u==null?void 0:u.lat)&&v===c;if(a&&g){let p=Qtr(n.fullData,n.id);p&&(t._fitBounds=p)}t._input=e}function trr(e,t){function r(l,u){return vK.coerce(e,t,nYe.layers,l,u)}var n=r("visible");if(n){var a=r("sourcetype"),i=a==="raster"||a==="image";r("source"),r("sourceattribution"),a==="vector"&&r("sourcelayer"),a==="image"&&r("coordinates");var o;i&&(o="raster");var s=r("type",o);i&&s!=="raster"&&(s=t.type="raster",vK.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),vK.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var uD=fe(V0=>{"use strict";var pK=Xt(),oYe=pK.strTranslate,rrr=pK.strScale,nrr=jf().getSubplotCalcData,irr=Q0(),arr=xi(),sYe=ea(),orr=as(),srr=QWe(),By="map";V0.name=By;V0.attr="subplot";V0.idRoot=By;V0.idRegex=V0.attrRegex=pK.counterRegex(By);V0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};V0.layoutAttributes=ZM();V0.supplyLayoutDefaults=aYe();V0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,a=r._subplots[By],i=0;ix/2){var _=f.split("|").join("
");g.text(_).attr("data-unformatted",_).call(orr.convertToTspans,e),p=sYe.bBox(g.node())}g.attr("transform",oYe(-3,-p.height+8)),v.insert("rect",".static-attribution").attr({x:-p.width-6,y:-p.height-3,width:p.width+6,height:p.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;p.width+6>x&&(y=x/(p.width+6));var C=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",oYe(C[0],C[1])+rrr(y))}};V0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[By],n=0;n{"use strict";lYe.exports={attributes:eD(),supplyDefaults:gWe(),colorbar:Zf(),formatLabels:aK(),calc:mX(),plot:LWe(),hoverPoints:aD().hoverPoints,eventData:RWe(),selectPoints:zWe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:uD(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var fYe=fe((U6r,cYe)=>{"use strict";cYe.exports=uYe()});var gK=fe((V6r,hYe)=>{"use strict";var Bg=gM(),lrr=_s(),{hovertemplateAttrs:urr,templatefallbackAttrs:crr}=Oo(),frr=Ho(),Oy=ta().extendFlat;hYe.exports=Oy({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Oy({},Bg.featureidkey,{}),below:{valType:"string",editType:"plot"},text:Bg.text,hovertext:Bg.hovertext,marker:{line:{color:Oy({},Bg.marker.line.color,{editType:"plot"}),width:Oy({},Bg.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Oy({},Bg.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Oy({},Bg.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Oy({},Bg.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:Bg.hoverinfo,hovertemplate:urr({},{keys:["properties"]}),hovertemplatefallback:crr(),showlegend:Oy({},frr.showlegend,{dflt:!1})},lrr("",{cLetter:"z",editTypeOverride:"calc"}))});var vYe=fe((G6r,dYe)=>{"use strict";var QM=Xt(),hrr=Vc(),drr=gK();dYe.exports=function(t,r,n,a){function i(c,f){return QM.coerce(t,r,drr,c,f)}var o=i("locations"),s=i("z"),l=i("geojson");if(!QM.isArrayOrTypedArray(o)||!o.length||!QM.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||QM.isPlainObject(l))){r.visible=!1;return}i("featureidkey"),r._length=Math.min(o.length,s.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var u=i("marker.line.width");u&&i("marker.line.color"),i("marker.opacity"),hrr(t,r,a,i,{prefix:"",cLetter:"z"}),QM.coerceSelectionMarkerOpacity(r,i)}});var mK=fe((H6r,mYe)=>{"use strict";var vrr=aa(),Og=Xt(),prr=js(),grr=ea(),mrr=cM().makeBlank,pYe=Cg();function yrr(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},a={layout:{visibility:"none"},paint:{}},i=t._opts={fill:n,line:a,geojson:mrr()};if(!r)return i;var o=pYe.extractTraceFeature(e);if(!o)return i;var s=prr.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;Og.isArrayOrTypedArray(l.opacity)&&(c=function(C){var k=C.mo;return vrr(k)?+Og.constrain(k,0,1):0});var f;Og.isArrayOrTypedArray(u.color)&&(f=function(C){return C.mlc});var v;Og.isArrayOrTypedArray(u.width)&&(v=function(C){return C.mlw});for(var g=0;g{"use strict";var xYe=mK().convert,xrr=mK().convertOnSelect,yYe=zy().traceLayerPrefix;function _Ye(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",yYe+t+"-fill"],["line",yYe+t+"-line"]],this.below=null}var F5=_Ye.prototype;F5.update=function(e){this._update(xYe(e)),e[0].trace._glTrace=this};F5.updateOnSelect=function(e){this._update(xrr(e))};F5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};F5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};bYe.exports=function(t,r){var n=r[0].trace,a=new _Ye(t,n.uid),i=a.sourceId,o=xYe(r),s=a.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(i,{type:"geojson",data:o.geojson}),a._addLayers(o,s),r[0].trace._glTrace=a,a}});var AYe=fe((W6r,TYe)=>{"use strict";TYe.exports={attributes:gK(),supplyDefaults:vYe(),colorbar:H3(),calc:$X(),plot:wYe(),hoverPoints:JX(),eventData:QX(),selectPoints:eZ(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var a=r[n].id;if(typeof a=="string"&&a.indexOf("water")===0){for(var i=n+1;i{"use strict";MYe.exports=AYe()});var xK=fe((X6r,kYe)=>{"use strict";var _rr=_s(),{hovertemplateAttrs:brr,templatefallbackAttrs:wrr}=Oo(),EYe=Ho(),cD=eD(),yK=ta().extendFlat;kYe.exports=yK({lon:cD.lon,lat:cD.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:cD.text,hovertext:cD.hovertext,hoverinfo:yK({},EYe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:brr(),hovertemplatefallback:wrr(),showlegend:yK({},EYe.showlegend,{dflt:!1})},_rr("",{cLetter:"z",editTypeOverride:"calc"}))});var LYe=fe((Z6r,CYe)=>{"use strict";var Trr=Xt(),Arr=Vc(),Mrr=xK();CYe.exports=function(t,r,n,a){function i(u,c){return Trr.coerce(t,r,Mrr,u,c)}var o=i("lon")||[],s=i("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),Arr(t,r,a,i,{prefix:"",cLetter:"z"})}});var DYe=fe(($6r,FYe)=>{"use strict";var _K=aa(),Srr=Xt().isArrayOrTypedArray,bK=Wa().BADNUM,Err=Mh(),PYe=Xt()._;FYe.exports=function(t,r){for(var n=r._length,a=new Array(n),i=r.z,o=Srr(i)&&i.length,s=0;s{"use strict";var krr=aa(),wK=Xt(),RYe=ni(),IYe=js(),zYe=Wa().BADNUM,Crr=cM().makeBlank;qYe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,a={layout:{visibility:"none"},paint:{}},i=r._opts={heatmap:a,geojson:Crr()};if(!n)return i;var o=[],s,l=r.z,u=r.radius,c=wK.isArrayOrTypedArray(l)&&l.length,f=wK.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:g},properties:p})}}var _=IYe.extractOpts(r),y=_.reversescale?IYe.flipScale(_.colorscale):_.colorscale,C=y[0][1],k=RYe.opacity(C)<1?C:RYe.addOpacity(C,0),S=["interpolate",["linear"],["heatmap-density"],0,k];for(s=1;s{"use strict";var OYe=BYe(),Lrr=zy().traceLayerPrefix;function NYe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",Lrr+t+"-heatmap"]],this.below=null}var fD=NYe.prototype;fD.update=function(e){var t=this.subplot,r=this.layerList,n=OYe(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(n,a),this.below=a);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};fD.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};UYe.exports=function(t,r){var n=r[0].trace,a=new NYe(t,n.uid),i=a.sourceId,o=OYe(r),s=a.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(i,{type:"geojson",data:o.geojson}),a._addLayers(o,s),a}});var HYe=fe((Q6r,GYe)=>{"use strict";var Prr=Yi(),Frr=aD().hoverPoints,Drr=aD().getExtraText;GYe.exports=function(t,r,n){var a=Frr(t,r,n);if(a){var i=a[0],o=i.cd,s=o[0].trace,l=o[i.index];if(delete i.color,"z"in l){var u=i.subplot.mockAxis;i.z=l.z,i.zLabel=Prr.tickText(u,u.c2l(l.z),"hover").text}return i.extraText=Drr(s,l,o[0].t.labels),[i]}}});var WYe=fe((eMr,jYe)=>{"use strict";jYe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var XYe=fe((tMr,YYe)=>{"use strict";YYe.exports={attributes:xK(),supplyDefaults:LYe(),colorbar:H3(),formatLabels:aK(),calc:DYe(),plot:VYe(),hoverPoints:HYe(),eventData:WYe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";ZYe.exports=XYe()});var AK=fe((iMr,tXe)=>{"use strict";var Rrr=Ds(),Irr=Ho(),KYe=tc(),TK=hb(),zrr=nl().attributes,{hovertemplateAttrs:JYe,templatefallbackAttrs:QYe}=Oo(),qrr=_s(),Brr=Mo().templatedArray,Orr=pl().descriptionOnlyNumbers,eXe=ta().extendFlat,Nrr=rl().overrideAll,nMr=tXe.exports=Nrr({hoverinfo:eXe({},Irr.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:TK.hoverlabel,domain:zrr({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},direction:{valType:"enumerated",values:["forward","reversed"],dflt:"forward"},valueformat:{valType:"string",dflt:".3s",description:Orr("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:Rrr({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:KYe.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:TK.hoverlabel,hovertemplate:JYe({},{keys:["value","label"]}),hovertemplatefallback:QYe(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"},sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:KYe.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:TK.hoverlabel,hovertemplate:JYe({},{keys:["value","label"]}),hovertemplatefallback:QYe(),colorscales:Brr("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:eXe(qrr().colorscale,{dflt:[[0,"white"],[1,"black"]]})}),sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}}},"calc","nested")});var aXe=fe((aMr,iXe)=>{"use strict";var D5=Xt(),hD=AK(),m_=ni(),Urr=nl().defaults,rXe=AT(),nXe=Mo(),Vrr=Ah();iXe.exports=function(t,r,n,a){function i(S,L){return D5.coerce(t,r,hD,S,L)}var o=D5.extendDeep(a.hoverlabel,t.hoverlabel),s=t.node,l=nXe.newContainer(r,"node");function u(S,L){return D5.coerce(s,l,hD.node,S,L)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),rXe(s,l,u,o),u("hovertemplate"),u("align"),u("sort");var c=a.colorway;let f=S=>c[S%c.length];u("color",l.label.map((S,L)=>m_.addOpacity(f(L),.8))),u("customdata");var v=t.link||{},g=nXe.newContainer(r,"link");function p(S,L){return D5.coerce(v,g,hD.link,S,L)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",t.hoverinfo),rXe(v,g,p,o),p("hovertemplate"),p("sort");var x=m_.luminosity(a.paper_bgcolor)<.333,_=x?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",y=p("color",_);function C(S){if(!m_.isValid(S))return S;let L=m_.opacity(S);return L<=.8?m_.addOpacity(S,L+.2):x?m_.brighten(S,10):m_.adjustLightness(S,-10)}p("hovercolor",Array.isArray(y)?y.map(C):C(y)),p("customdata"),Vrr(v,g,{name:"colorscales",handleItemDefaults:Grr}),Urr(r,a,i),i("orientation"),i("direction"),i("valueformat"),i("valuesuffix");let k=l.x.length&&l.y.length?"freeform":void 0;i("arrangement",k),D5.coerceFont(i,"textfont",a.font,{autoShadowDflt:!0}),r._length=null};function Grr(e,t){function r(n,a){return D5.coerce(e,t,hD.link.colorscales,n,a)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var MK=fe((oMr,oXe)=>{"use strict";oXe.exports=Hrr;function Hrr(e){for(var t=e.length,r=new Array(t),n=new Array(t),a=new Array(t),i=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){_=C[C.length-1];var k=e[_];if(i[_]=0&&s[_].push(o[L])}i[_]=S}else{if(n[_]===r[_]){for(var w=[],A=[],T=0,S=y.length-1;S>=0;--S){var m=y[S];if(a[m]=!1,w.push(m),A.push(s[m]),T+=s[m].length,o[m]=c.length,m===_){y.length=S;break}}c.push(w);for(var F=new Array(T),S=0;S{"use strict";var jrr=MK(),R5=Xt(),Wrr=L1().wrap,eS=R5.isArrayOrTypedArray,sXe=R5.isIndex,lXe=js();function Yrr(e){var t=e.node,r=e.link,n=[],a=eS(r.color),i=eS(r.hovercolor),o=eS(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;cp&&(p=r.source[c]),r.target[c]>p&&(p=r.target[c]);var x=p+1;e.node._count=x;var _,y=e.node.groups,C={};for(c=0;c0&&sXe(T,x)&&sXe(m,x)&&!(C.hasOwnProperty(T)&&C.hasOwnProperty(m)&&C[T]===C[m])){C.hasOwnProperty(m)&&(m=C[m]),C.hasOwnProperty(T)&&(T=C[T]),T=+T,m=+m,s[T]=s[m]=!0;var F="";r.label&&r.label[c]&&(F=r.label[c]);var E=null;F&&l.hasOwnProperty(F)&&(E=l[F]),n.push({pointNumber:c,label:F,color:a?r.color[c]:r.color,hovercolor:i?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:E,source:T,target:m,value:+A}),w.source.push(T),w.target.push(m)}}var I=x+y.length,R=eS(t.color),B=eS(t.customdata),O=[];for(c=0;cx-1,childrenNodes:[],pointNumber:c,label:V,color:R?t.color[c]:t.color,customdata:B?t.customdata[c]:t.customdata})}var j=!1;return Xrr(I,w.source,w.target)&&(j=!0),{circular:j,links:n,nodes:O,groups:y,groupLookup:C}}function Xrr(e,t,r){for(var n=R5.init2dArray(e,0),a=0;a1})}uXe.exports=function(t,r){var n=Yrr(r);return Wrr({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var hXe=fe((dD,fXe)=>{(function(e,t){typeof dD=="object"&&typeof fXe!="undefined"?t(dD):(e=e||self,t(e.d3=e.d3||{}))})(dD,function(e){"use strict";function t(A){var T=+this._x.call(null,A),m=+this._y.call(null,A);return r(this.cover(T,m),T,m,A)}function r(A,T,m,F){if(isNaN(T)||isNaN(m))return A;var E,I=A._root,R={data:F},B=A._x0,O=A._y0,V=A._x1,j=A._y1,q,U,J,ee,ce,ye,xe,ue;if(!I)return A._root=R,A;for(;I.length;)if((ce=T>=(q=(B+V)/2))?B=q:V=q,(ye=m>=(U=(O+j)/2))?O=U:j=U,E=I,!(I=I[xe=ye<<1|ce]))return E[xe]=R,A;if(J=+A._x.call(null,I.data),ee=+A._y.call(null,I.data),T===J&&m===ee)return R.next=I,E?E[xe]=R:A._root=R,A;do E=E?E[xe]=new Array(4):A._root=new Array(4),(ce=T>=(q=(B+V)/2))?B=q:V=q,(ye=m>=(U=(O+j)/2))?O=U:j=U;while((xe=ye<<1|ce)===(ue=(ee>=U)<<1|J>=q));return E[ue]=I,E[xe]=R,A}function n(A){var T,m,F=A.length,E,I,R=new Array(F),B=new Array(F),O=1/0,V=1/0,j=-1/0,q=-1/0;for(m=0;mj&&(j=E),Iq&&(q=I));if(O>j||V>q)return this;for(this.cover(O,V).cover(j,q),m=0;mA||A>=E||F>T||T>=I;)switch(V=(Tj||(B=ee.y0)>q||(O=ee.x1)=xe)<<1|A>=ye)&&(ee=U[U.length-1],U[U.length-1]=U[U.length-1-ce],U[U.length-1-ce]=ee)}else{var ue=A-+this._x.call(null,J.data),K=T-+this._y.call(null,J.data),_e=ue*ue+K*K;if(_e=(U=(R+O)/2))?R=U:O=U,(ce=q>=(J=(B+V)/2))?B=J:V=J,T=m,!(m=m[ye=ce<<1|ee]))return this;if(!m.length)break;(T[ye+1&3]||T[ye+2&3]||T[ye+3&3])&&(F=T,xe=ye)}for(;m.data!==A;)if(E=m,!(m=m.next))return this;return(I=m.next)&&delete m.next,E?(I?E.next=I:delete E.next,this):T?(I?T[ye]=I:delete T[ye],(m=T[0]||T[1]||T[2]||T[3])&&m===(T[3]||T[2]||T[1]||T[0])&&!m.length&&(F?F[xe]=m:this._root=m),this):(this._root=I,this)}function c(A){for(var T=0,m=A.length;T{(function(e,t){t(typeof vD=="object"&&typeof dXe!="undefined"?vD:e.d3=e.d3||{})})(vD,(function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(x){return t+x in this},get:function(x){return this[t+x]},set:function(x,_){return this[t+x]=_,this},remove:function(x){var _=t+x;return _ in this&&delete this[_]},clear:function(){for(var x in this)x[0]===t&&delete this[x]},keys:function(){var x=[];for(var _ in this)_[0]===t&&x.push(_.slice(1));return x},values:function(){var x=[];for(var _ in this)_[0]===t&&x.push(this[_]);return x},entries:function(){var x=[];for(var _ in this)_[0]===t&&x.push({key:_.slice(1),value:this[_]});return x},size:function(){var x=0;for(var _ in this)_[0]===t&&++x;return x},empty:function(){for(var x in this)if(x[0]===t)return!1;return!0},each:function(x){for(var _ in this)_[0]===t&&x(this[_],_.slice(1),this)}};function n(x,_){var y=new r;if(x instanceof r)x.each(function(w,A){y.set(A,w)});else if(Array.isArray(x)){var C=-1,k=x.length,S;if(_==null)for(;++C=x.length)return y!=null&&w.sort(y),C!=null?C(w):w;for(var F=-1,E=w.length,I=x[A++],R,B,O=n(),V,j=T();++Fx.length)return w;var T,m=_[A-1];return C!=null&&A>=x.length?T=w.entries():(T=[],w.each(function(F,E){T.push({key:E,values:L(F,A)})})),m!=null?T.sort(function(F,E){return m(F.key,E.key)}):T}return k={object:function(w){return S(w,0,i,o)},map:function(w){return S(w,0,s,l)},entries:function(w){return L(S(w,0,s,l),0)},key:function(w){return x.push(w),k},sortKeys:function(w){return _[x.length-1]=w,k},sortValues:function(w){return y=w,k},rollup:function(w){return C=w,k}}}function i(){return{}}function o(x,_,y){x[_]=y}function s(){return n()}function l(x,_,y){x.set(_,y)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(x){return x+="",this[t+x]=x,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(x,_){var y=new u;if(x instanceof u)x.each(function(S){y.add(S)});else if(x){var C=-1,k=x.length;if(_==null)for(;++C{(function(e,t){typeof pD=="object"&&typeof vXe!="undefined"?t(pD):(e=e||self,t(e.d3=e.d3||{}))})(pD,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=a(s+"",u),f,v=-1,g=c.length;if(arguments.length<2){for(;++v0)for(var u=new Array(f),c=0,f,v;c{(function(e,t){typeof gD=="object"&&typeof gXe!="undefined"?t(gD):(e=e||self,t(e.d3=e.d3||{}))})(gD,function(e){"use strict";var t=0,r=0,n=0,a=1e3,i,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function v(){return l||(f(g),l=c.now()+u)}function g(){l=0}function p(){this._call=this._time=this._next=null}p.prototype=x.prototype={constructor:p,restart:function(A,T,m){if(typeof A!="function")throw new TypeError("callback is not a function");m=(m==null?v():+m)+(T==null?0:+T),!this._next&&o!==this&&(o?o._next=this:i=this,o=this),this._call=A,this._time=m,S()},stop:function(){this._call&&(this._call=null,this._time=1/0,S())}};function x(A,T,m){var F=new p;return F.restart(A,T,m),F}function _(){v(),++t;for(var A=i,T;A;)(T=l-A._time)>=0&&A._call.call(null,T),A=A._next;--t}function y(){l=(s=c.now())+u,t=r=0;try{_()}finally{t=0,k(),l=0}}function C(){var A=c.now(),T=A-s;T>a&&(u-=T,s=A)}function k(){for(var A,T=i,m,F=1/0;T;)T._call?(F>T._time&&(F=T._time),A=T,T=T._next):(m=T._next,T._next=null,T=A?A._next=m:i=m);o=A,S(F)}function S(A){if(!t){r&&(r=clearTimeout(r));var T=A-l;T>24?(A<1/0&&(r=setTimeout(y,A-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(C,a)),t=1,f(y))}}function L(A,T,m){var F=new p;return T=T==null?0:+T,F.restart(function(E){F.stop(),A(E+T)},T,m),F}function w(A,T,m){var F=new p,E=T;return T==null?(F.restart(A,T,m),F):(T=+T,m=m==null?v():+m,F.restart(function I(R){R+=E,F.restart(I,E+=T,m),A(R)},T,m),F)}e.interval=w,e.now=v,e.timeout=L,e.timer=x,e.timerFlush=_,Object.defineProperty(e,"__esModule",{value:!0})})});var xXe=fe((mD,yXe)=>{(function(e,t){typeof mD=="object"&&typeof yXe!="undefined"?t(mD,hXe(),SK(),pXe(),mXe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(mD,(function(e,t,r,n,a){"use strict";function i(A,T){var m;A==null&&(A=0),T==null&&(T=0);function F(){var E,I=m.length,R,B=0,O=0;for(E=0;Eq.index){var me=U-pe.x-pe.vx,be=J-pe.y-pe.vy,De=me*me+be*be;DeU+le||neJ+le||aeO.r&&(O.r=O[V].r)}function B(){if(T){var O,V=T.length,j;for(m=new Array(V),O=0;O1?(ce==null?B.remove(ee):B.set(ee,J(ce)),T):B.get(ee)},find:function(ee,ce,ye){var xe=0,ue=A.length,K,_e,ne,ae,pe;for(ye==null?ye=1/0:ye*=ye,xe=0;xe1?(V.on(ee,ce),T):V.on(ee)}}}function k(){var A,T,m,F=o(-30),E,I=1,R=1/0,B=.81;function O(U){var J,ee=A.length,ce=t.quadtree(A,p,x).visitAfter(j);for(m=U,J=0;J=R)return;(U.data!==T||U.next)&&(ye===0&&(ye=s(),K+=ye*ye),xe===0&&(xe=s(),K+=xe*xe),K{(function(e,t){typeof yD=="object"&&typeof _Xe!="undefined"?t(yD):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(yD,(function(e){"use strict";function t(Dt,At){return DtAt?1:Dt>=At?0:NaN}function r(Dt){let At=Dt,Vt=Dt;Dt.length===1&&(At=(rn,Jr)=>Dt(rn)-Jr,Vt=n(Dt));function Qt(rn,Jr,qn,ri){for(qn==null&&(qn=0),ri==null&&(ri=rn.length);qn>>1;Vt(rn[Jn],Jr)<0?qn=Jn+1:ri=Jn}return qn}function Ut(rn,Jr,qn,ri){for(qn==null&&(qn=0),ri==null&&(ri=rn.length);qn>>1;Vt(rn[Jn],Jr)>0?ri=Jn:qn=Jn+1}return qn}function _r(rn,Jr,qn,ri){qn==null&&(qn=0),ri==null&&(ri=rn.length);let Jn=Qt(rn,Jr,qn,ri-1);return Jn>qn&&At(rn[Jn-1],Jr)>-At(rn[Jn],Jr)?Jn-1:Jn}return{left:Qt,center:_r,right:Ut}}function n(Dt){return(At,Vt)=>t(Dt(At),Vt)}function a(Dt){return Dt===null?NaN:+Dt}function*i(Dt,At){if(At===void 0)for(let Vt of Dt)Vt!=null&&(Vt=+Vt)>=Vt&&(yield Vt);else{let Vt=-1;for(let Qt of Dt)(Qt=At(Qt,++Vt,Dt))!=null&&(Qt=+Qt)>=Qt&&(yield Qt)}}let o=r(t),s=o.right,l=o.left,u=r(a).center;function c(Dt,At){let Vt=0;if(At===void 0)for(let Qt of Dt)Qt!=null&&(Qt=+Qt)>=Qt&&++Vt;else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Ut=+Ut)>=Ut&&++Vt}return Vt}function f(Dt){return Dt.length|0}function v(Dt){return!(Dt>0)}function g(Dt){return typeof Dt!="object"||"length"in Dt?Dt:Array.from(Dt)}function p(Dt){return At=>Dt(...At)}function x(...Dt){let At=typeof Dt[Dt.length-1]=="function"&&p(Dt.pop());Dt=Dt.map(g);let Vt=Dt.map(f),Qt=Dt.length-1,Ut=new Array(Qt+1).fill(0),_r=[];if(Qt<0||Vt.some(v))return _r;for(;;){_r.push(Ut.map((Jr,qn)=>Dt[qn][Jr]));let rn=Qt;for(;++Ut[rn]===Vt[rn];){if(rn===0)return At?_r.map(At):_r;Ut[rn--]=0}}}function _(Dt,At){var Vt=0,Qt=0;return Float64Array.from(Dt,At===void 0?Ut=>Vt+=+Ut||0:Ut=>Vt+=+At(Ut,Qt++,Dt)||0)}function y(Dt,At){return AtDt?1:At>=Dt?0:NaN}function C(Dt,At){let Vt=0,Qt,Ut=0,_r=0;if(At===void 0)for(let rn of Dt)rn!=null&&(rn=+rn)>=rn&&(Qt=rn-Ut,Ut+=Qt/++Vt,_r+=Qt*(rn-Ut));else{let rn=-1;for(let Jr of Dt)(Jr=At(Jr,++rn,Dt))!=null&&(Jr=+Jr)>=Jr&&(Qt=Jr-Ut,Ut+=Qt/++Vt,_r+=Qt*(Jr-Ut))}if(Vt>1)return _r/(Vt-1)}function k(Dt,At){let Vt=C(Dt,At);return Vt&&Math.sqrt(Vt)}function S(Dt,At){let Vt,Qt;if(At===void 0)for(let Ut of Dt)Ut!=null&&(Vt===void 0?Ut>=Ut&&(Vt=Qt=Ut):(Vt>Ut&&(Vt=Ut),Qt=_r&&(Vt=Qt=_r):(Vt>_r&&(Vt=_r),Qt<_r&&(Qt=_r)))}return[Vt,Qt]}class L{constructor(){this._partials=new Float64Array(32),this._n=0}add(At){let Vt=this._partials,Qt=0;for(let Ut=0;Ut0){for(rn=At[--Vt];Vt>0&&(Qt=rn,Ut=At[--Vt],rn=Qt+Ut,_r=Ut-(rn-Qt),!_r););Vt>0&&(_r<0&&At[Vt-1]<0||_r>0&&At[Vt-1]>0)&&(Ut=_r*2,Qt=rn+Ut,Ut==Qt-rn&&(rn=Qt))}return rn}}function w(Dt,At){let Vt=new L;if(At===void 0)for(let Qt of Dt)(Qt=+Qt)&&Vt.add(Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=+At(Ut,++Qt,Dt))&&Vt.add(Ut)}return+Vt}function A(Dt,At){let Vt=new L,Qt=-1;return Float64Array.from(Dt,At===void 0?Ut=>Vt.add(+Ut||0):Ut=>Vt.add(+At(Ut,++Qt,Dt)||0))}class T extends Map{constructor(At,Vt=R){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:Vt}}),At!=null)for(let[Qt,Ut]of At)this.set(Qt,Ut)}get(At){return super.get(F(this,At))}has(At){return super.has(F(this,At))}set(At,Vt){return super.set(E(this,At),Vt)}delete(At){return super.delete(I(this,At))}}class m extends Set{constructor(At,Vt=R){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:Vt}}),At!=null)for(let Qt of At)this.add(Qt)}has(At){return super.has(F(this,At))}add(At){return super.add(E(this,At))}delete(At){return super.delete(I(this,At))}}function F({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)?Dt.get(Qt):Vt}function E({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)?Dt.get(Qt):(Dt.set(Qt,Vt),Vt)}function I({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)&&(Vt=Dt.get(Vt),Dt.delete(Qt)),Vt}function R(Dt){return Dt!==null&&typeof Dt=="object"?Dt.valueOf():Dt}function B(Dt){return Dt}function O(Dt,...At){return ce(Dt,B,B,At)}function V(Dt,...At){return ce(Dt,Array.from,B,At)}function j(Dt,At,...Vt){return ce(Dt,B,At,Vt)}function q(Dt,At,...Vt){return ce(Dt,Array.from,At,Vt)}function U(Dt,...At){return ce(Dt,B,ee,At)}function J(Dt,...At){return ce(Dt,Array.from,ee,At)}function ee(Dt){if(Dt.length!==1)throw new Error("duplicate key");return Dt[0]}function ce(Dt,At,Vt,Qt){return(function Ut(_r,rn){if(rn>=Qt.length)return Vt(_r);let Jr=new T,qn=Qt[rn++],ri=-1;for(let Jn of _r){let Ii=qn(Jn,++ri,_r),Vi=Jr.get(Ii);Vi?Vi.push(Jn):Jr.set(Ii,[Jn])}for(let[Jn,Ii]of Jr)Jr.set(Jn,Ut(Ii,rn));return At(Jr)})(Dt,0)}function ye(Dt,At){return Array.from(At,Vt=>Dt[Vt])}function xe(Dt,...At){if(typeof Dt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Dt=Array.from(Dt);let[Vt=t]=At;if(Vt.length===1||At.length>1){let Qt=Uint32Array.from(Dt,(Ut,_r)=>_r);return At.length>1?(At=At.map(Ut=>Dt.map(Ut)),Qt.sort((Ut,_r)=>{for(let rn of At){let Jr=t(rn[Ut],rn[_r]);if(Jr)return Jr}})):(Vt=Dt.map(Vt),Qt.sort((Ut,_r)=>t(Vt[Ut],Vt[_r]))),ye(Dt,Qt)}return Dt.sort(Vt)}function ue(Dt,At,Vt){return(At.length===1?xe(j(Dt,At,Vt),(([Qt,Ut],[_r,rn])=>t(Ut,rn)||t(Qt,_r))):xe(O(Dt,Vt),(([Qt,Ut],[_r,rn])=>At(Ut,rn)||t(Qt,_r)))).map(([Qt])=>Qt)}var K=Array.prototype,_e=K.slice;function ne(Dt){return function(){return Dt}}var ae=Math.sqrt(50),pe=Math.sqrt(10),ie=Math.sqrt(2);function le(Dt,At,Vt){var Qt,Ut=-1,_r,rn,Jr;if(At=+At,Dt=+Dt,Vt=+Vt,Dt===At&&Vt>0)return[Dt];if((Qt=At0){let qn=Math.round(Dt/Jr),ri=Math.round(At/Jr);for(qn*JrAt&&--ri,rn=new Array(_r=ri-qn+1);++Ut<_r;)rn[Ut]=(qn+Ut)*Jr}else{Jr=-Jr;let qn=Math.round(Dt*Jr),ri=Math.round(At*Jr);for(qn/JrAt&&--ri,rn=new Array(_r=ri-qn+1);++Ut<_r;)rn[Ut]=(qn+Ut)/Jr}return Qt&&rn.reverse(),rn}function me(Dt,At,Vt){var Qt=(At-Dt)/Math.max(0,Vt),Ut=Math.floor(Math.log(Qt)/Math.LN10),_r=Qt/Math.pow(10,Ut);return Ut>=0?(_r>=ae?10:_r>=pe?5:_r>=ie?2:1)*Math.pow(10,Ut):-Math.pow(10,-Ut)/(_r>=ae?10:_r>=pe?5:_r>=ie?2:1)}function be(Dt,At,Vt){var Qt=Math.abs(At-Dt)/Math.max(0,Vt),Ut=Math.pow(10,Math.floor(Math.log(Qt)/Math.LN10)),_r=Qt/Ut;return _r>=ae?Ut*=10:_r>=pe?Ut*=5:_r>=ie&&(Ut*=2),At0?(Dt=Math.floor(Dt/Ut)*Ut,At=Math.ceil(At/Ut)*Ut):Ut<0&&(Dt=Math.ceil(Dt*Ut)/Ut,At=Math.floor(At*Ut)/Ut),Qt=Ut}}function Ge(Dt){return Math.ceil(Math.log(c(Dt))/Math.LN2)+1}function ht(){var Dt=B,At=S,Vt=Ge;function Qt(Ut){Array.isArray(Ut)||(Ut=Array.from(Ut));var _r,rn=Ut.length,Jr,qn=new Array(rn);for(_r=0;_r=Ii)if(Xi>=Ii&&At===S){let Ma=me(Jn,Ii,oa);isFinite(Ma)&&(Ma>0?Ii=(Math.floor(Ii/Ma)+1)*Ma:Ma<0&&(Ii=(Math.ceil(Ii*-Ma)+1)/-Ma))}else Vi.pop()}for(var ra=Vi.length;Vi[0]<=Jn;)Vi.shift(),--ra;for(;Vi[ra-1]>Ii;)Vi.pop(),--ra;var ha=new Array(ra+1),va;for(_r=0;_r<=ra;++_r)va=ha[_r]=[],va.x0=_r>0?Vi[_r-1]:Jn,va.x1=_r=Qt)&&(Vt=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Vt=Ut)&&(Vt=Ut)}return Vt}function Oe(Dt,At){let Vt;if(At===void 0)for(let Qt of Dt)Qt!=null&&(Vt>Qt||Vt===void 0&&Qt>=Qt)&&(Vt=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Vt>Ut||Vt===void 0&&Ut>=Ut)&&(Vt=Ut)}return Vt}function ze(Dt,At,Vt=0,Qt=Dt.length-1,Ut=t){for(;Qt>Vt;){if(Qt-Vt>600){let qn=Qt-Vt+1,ri=At-Vt+1,Jn=Math.log(qn),Ii=.5*Math.exp(2*Jn/3),Vi=.5*Math.sqrt(Jn*Ii*(qn-Ii)/qn)*(ri-qn/2<0?-1:1),ra=Math.max(Vt,Math.floor(At-ri*Ii/qn+Vi)),ha=Math.min(Qt,Math.floor(At+(qn-ri)*Ii/qn+Vi));ze(Dt,At,ra,ha,Ut)}let _r=Dt[At],rn=Vt,Jr=Qt;for(ct(Dt,Vt,At),Ut(Dt[Qt],_r)>0&&ct(Dt,Vt,Qt);rn0;)--Jr}Ut(Dt[Vt],_r)===0?ct(Dt,Vt,Jr):(++Jr,ct(Dt,Jr,Qt)),Jr<=At&&(Vt=Jr+1),At<=Jr&&(Qt=Jr-1)}return Dt}function ct(Dt,At,Vt){let Qt=Dt[At];Dt[At]=Dt[Vt],Dt[Vt]=Qt}function et(Dt,At,Vt){if(Dt=Float64Array.from(i(Dt,Vt)),!!(Qt=Dt.length)){if((At=+At)<=0||Qt<2)return Oe(Dt);if(At>=1)return it(Dt);var Qt,Ut=(Qt-1)*At,_r=Math.floor(Ut),rn=it(ze(Dt,_r).subarray(0,_r+1)),Jr=Oe(Dt.subarray(_r+1));return rn+(Jr-rn)*(Ut-_r)}}function qe(Dt,At,Vt=a){if(Qt=Dt.length){if((At=+At)<=0||Qt<2)return+Vt(Dt[0],0,Dt);if(At>=1)return+Vt(Dt[Qt-1],Qt-1,Dt);var Qt,Ut=(Qt-1)*At,_r=Math.floor(Ut),rn=+Vt(Dt[_r],_r,Dt),Jr=+Vt(Dt[_r+1],_r+1,Dt);return rn+(Jr-rn)*(Ut-_r)}}function we(Dt,At,Vt){return Math.ceil((Vt-At)/(2*(et(Dt,.75)-et(Dt,.25))*Math.pow(c(Dt),-1/3)))}function Le(Dt,At,Vt){return Math.ceil((Vt-At)/(3.5*k(Dt)*Math.pow(c(Dt),-1/3)))}function Ke(Dt,At){let Vt,Qt=-1,Ut=-1;if(At===void 0)for(let _r of Dt)++Ut,_r!=null&&(Vt<_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);else for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(Vt<_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);return Qt}function Te(Dt,At){let Vt=0,Qt=0;if(At===void 0)for(let Ut of Dt)Ut!=null&&(Ut=+Ut)>=Ut&&(++Vt,Qt+=Ut);else{let Ut=-1;for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(_r=+_r)>=_r&&(++Vt,Qt+=_r)}if(Vt)return Qt/Vt}function Ve(Dt,At){return et(Dt,.5,At)}function*$e(Dt){for(let At of Dt)yield*Cte(At)}function ot(Dt){return Array.from($e(Dt))}function tt(Dt,At){let Vt,Qt=-1,Ut=-1;if(At===void 0)for(let _r of Dt)++Ut,_r!=null&&(Vt>_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);else for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(Vt>_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);return Qt}function nt(Dt,At=We){let Vt=[],Qt,Ut=!1;for(let _r of Dt)Ut&&Vt.push(At(Qt,_r)),Qt=_r,Ut=!0;return Vt}function We(Dt,At){return[Dt,At]}function mt(Dt,At,Vt){Dt=+Dt,At=+At,Vt=(Ut=arguments.length)<2?(At=Dt,Dt=0,1):Ut<3?1:+Vt;for(var Qt=-1,Ut=Math.max(0,Math.ceil((At-Dt)/Vt))|0,_r=new Array(Ut);++Qt0:t(rn,rn)===0)&&(Vt=_r,Ut=rn,Qt=!0)}}else for(let Ut of Dt)(Qt?At(Ut,Vt)>0:At(Ut,Ut)===0)&&(Vt=Ut,Qt=!0);return Vt}function mr(Dt,At=t){if(At.length===1)return Ke(Dt,At);let Vt,Qt=-1,Ut=-1;for(let _r of Dt)++Ut,(Qt<0?At(_r,_r)===0:At(_r,Vt)>0)&&(Vt=_r,Qt=Ut);return Qt}function or(Dt,At){let Vt=Yt(Dt,At);return Vt<0?void 0:Vt}var fr=Ot(Math.random);function Ot(Dt){return function(Vt,Qt=0,Ut=Vt.length){let _r=Ut-(Qt=+Qt);for(;_r;){let rn=Dt()*_r--|0,Jr=Vt[_r+Qt];Vt[_r+Qt]=Vt[rn+Qt],Vt[rn+Qt]=Jr}return Vt}}function cr(Dt,At){let Vt=0;if(At===void 0)for(let Qt of Dt)(Qt=+Qt)&&(Vt+=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=+At(Ut,++Qt,Dt))&&(Vt+=Ut)}return Vt}function Ct(Dt){if(!(_r=Dt.length))return[];for(var At=-1,Vt=Oe(Dt,wt),Qt=new Array(Vt);++AtAt(Vt,Qt,Dt))}function rr(Dt,At,Vt){if(typeof At!="function")throw new TypeError("reducer is not a function");let Qt=Dt[Symbol.iterator](),Ut,_r,rn=-1;if(arguments.length<3){if({done:Ut,value:Vt}=Qt.next(),Ut)return;++rn}for(;{done:Ut,value:_r}=Qt.next(),!Ut;)Vt=At(Vt,_r,++rn,Dt);return Vt}function pr(Dt){if(typeof Dt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Dt).reverse()}function Kr(Dt,...At){Dt=new Set(Dt);for(let Vt of At)for(let Qt of Vt)Dt.delete(Qt);return Dt}function Nr(Dt,At){let Vt=At[Symbol.iterator](),Qt=new Set;for(let Ut of Dt){if(Qt.has(Ut))return!1;let _r,rn;for(;({value:_r,done:rn}=Vt.next())&&!rn;){if(Object.is(Ut,_r))return!1;Qt.add(_r)}}return!0}function dn(Dt){return Dt instanceof Set?Dt:new Set(Dt)}function xr(Dt,...At){Dt=new Set(Dt),At=At.map(dn);e:for(let Vt of Dt)for(let Qt of At)if(!Qt.has(Vt)){Dt.delete(Vt);continue e}return Dt}function Fr(Dt,At){let Vt=Dt[Symbol.iterator](),Qt=new Set;for(let Ut of At){if(Qt.has(Ut))continue;let _r,rn;for(;{value:_r,done:rn}=Vt.next();){if(rn)return!1;if(Qt.add(_r),Object.is(Ut,_r))break}}return!0}function Zr(Dt,At){return Fr(At,Dt)}function Cn(...Dt){let At=new Set;for(let Vt of Dt)for(let Qt of Vt)At.add(Qt);return At}e.Adder=L,e.InternMap=T,e.InternSet=m,e.ascending=t,e.bin=ht,e.bisect=s,e.bisectCenter=u,e.bisectLeft=l,e.bisectRight=s,e.bisector=r,e.count=c,e.cross=x,e.cumsum=_,e.descending=y,e.deviation=k,e.difference=Kr,e.disjoint=Nr,e.every=Mt,e.extent=S,e.fcumsum=A,e.filter=ft,e.fsum=w,e.greatest=jt,e.greatestIndex=mr,e.group=O,e.groupSort=ue,e.groups=V,e.histogram=ht,e.index=U,e.indexes=J,e.intersection=xr,e.least=bt,e.leastIndex=Yt,e.map=kt,e.max=it,e.maxIndex=Ke,e.mean=Te,e.median=Ve,e.merge=ot,e.min=Oe,e.minIndex=tt,e.nice=De,e.pairs=nt,e.permute=ye,e.quantile=et,e.quantileSorted=qe,e.quickselect=ze,e.range=mt,e.reduce=rr,e.reverse=pr,e.rollup=j,e.rollups=q,e.scan=or,e.shuffle=fr,e.shuffler=Ot,e.some=Lt,e.sort=xe,e.subset=Zr,e.sum=cr,e.superset=Fr,e.thresholdFreedmanDiaconis=we,e.thresholdScott=Le,e.thresholdSturges=Ge,e.tickIncrement=me,e.tickStep=be,e.ticks=le,e.transpose=Ct,e.union=Cn,e.variance=C,e.zip=Tt,Object.defineProperty(e,"__esModule",{value:!0})}))});var TXe=fe((xD,wXe)=>{(function(e,t){typeof xD=="object"&&typeof wXe!="undefined"?t(xD):(e=e||self,t(e.d3=e.d3||{}))})(xD,function(e){"use strict";var t=Math.PI,r=2*t,n=1e-6,a=r-n;function i(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new i}i.prototype=o.prototype={constructor:i,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,v){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+v)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var v=this._x1,g=this._y1,p=u-s,x=c-l,_=v-s,y=g-l,C=_*_+y*y;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(C>n)if(!(Math.abs(y*p-x*_)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var k=u-v,S=c-g,L=p*p+x*x,w=k*k+S*S,A=Math.sqrt(L),T=Math.sqrt(C),m=f*Math.tan((t-Math.acos((L+C-w)/(2*A*T)))/2),F=m/T,E=m/A;Math.abs(F-1)>n&&(this._+="L"+(s+F*_)+","+(l+F*y)),this._+="A"+f+","+f+",0,0,"+ +(y*k>_*S)+","+(this._x1=s+E*p)+","+(this._y1=l+E*x)}},arc:function(s,l,u,c,f,v){s=+s,l=+l,u=+u,v=!!v;var g=u*Math.cos(c),p=u*Math.sin(c),x=s+g,_=l+p,y=1^v,C=v?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+x+","+_:(Math.abs(this._x1-x)>n||Math.abs(this._y1-_)>n)&&(this._+="L"+x+","+_),u&&(C<0&&(C=C%r+r),C>a?this._+="A"+u+","+u+",0,1,"+y+","+(s-g)+","+(l-p)+"A"+u+","+u+",0,1,"+y+","+(this._x1=x)+","+(this._y1=_):C>n&&(this._+="A"+u+","+u+",0,"+ +(C>=t)+","+y+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var EK=fe((_D,AXe)=>{(function(e,t){typeof _D=="object"&&typeof AXe!="undefined"?t(_D,TXe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(_D,function(e,t){"use strict";function r(ut){return function(){return ut}}var n=Math.abs,a=Math.atan2,i=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,v=f/2,g=2*f;function p(ut){return ut>1?0:ut<-1?f:Math.acos(ut)}function x(ut){return ut>=1?v:ut<=-1?-v:Math.asin(ut)}function _(ut){return ut.innerRadius}function y(ut){return ut.outerRadius}function C(ut){return ut.startAngle}function k(ut){return ut.endAngle}function S(ut){return ut&&ut.padAngle}function L(ut,Jt,er,wr,nn,Dr,bn,Yr){var Tn=er-ut,Kn=wr-Jt,Qn=bn-nn,Ai=Yr-Dr,Ji=Ai*Tn-Qn*Kn;if(!(Ji*JiAs*As+Ms*Ms&&(yo=oo,so=ko),{cx:yo,cy:so,x01:-Qn,y01:-Ai,x11:yo*(nn/Ni-1),y11:so*(nn/Ni-1)}}function A(){var ut=_,Jt=y,er=r(0),wr=null,nn=C,Dr=k,bn=S,Yr=null;function Tn(){var Kn,Qn,Ai=+ut.apply(this,arguments),Ji=+Jt.apply(this,arguments),Ra=nn.apply(this,arguments)-v,ii=Dr.apply(this,arguments)-v,Za=n(ii-Ra),ja=ii>Ra;if(Yr||(Yr=Kn=t.path()),Jic))Yr.moveTo(0,0);else if(Za>g-c)Yr.moveTo(Ji*i(Ra),Ji*l(Ra)),Yr.arc(0,0,Ji,Ra,ii,!ja),Ai>c&&(Yr.moveTo(Ai*i(ii),Ai*l(ii)),Yr.arc(0,0,Ai,ii,Ra,ja));else{var qo=Ra,$a=ii,Ka=Ra,Oa=ii,Ni=Za,ka=Za,vs=bn.apply(this,arguments)/2,yo=vs>c&&(wr?+wr.apply(this,arguments):u(Ai*Ai+Ji*Ji)),so=s(n(Ji-Ai)/2,+er.apply(this,arguments)),oo=so,ko=so,pa,la;if(yo>c){var As=x(yo/Ai*l(vs)),Ms=x(yo/Ji*l(vs));(Ni-=As*2)>c?(As*=ja?1:-1,Ka+=As,Oa-=As):(Ni=0,Ka=Oa=(Ra+ii)/2),(ka-=Ms*2)>c?(Ms*=ja?1:-1,qo+=Ms,$a-=Ms):(ka=0,qo=$a=(Ra+ii)/2)}var xu=Ji*i(qo),rs=Ji*l(qo),Ls=Ai*i(Oa),$s=Ai*l(Oa);if(so>c){var Kc=Ji*i($a),_u=Ji*l($a),Gu=Ai*i(Ka),Ja=Ai*l(Ka),ps;if(Zac?ko>c?(pa=w(Gu,Ja,xu,rs,Ji,ko,ja),la=w(Kc,_u,Ls,$s,Ji,ko,ja),Yr.moveTo(pa.cx+pa.x01,pa.cy+pa.y01),koc)||!(Ni>c)?Yr.lineTo(Ls,$s):oo>c?(pa=w(Ls,$s,Kc,_u,Ai,-oo,ja),la=w(xu,rs,Gu,Ja,Ai,-oo,ja),Yr.lineTo(pa.cx+pa.x01,pa.cy+pa.y01),oo=Ji;--Ra)Yr.point($a[Ra],Ka[Ra]);Yr.lineEnd(),Yr.areaEnd()}ja&&($a[Ai]=+ut(Za,Ai,Qn),Ka[Ai]=+er(Za,Ai,Qn),Yr.point(Jt?+Jt(Za,Ai,Qn):$a[Ai],wr?+wr(Za,Ai,Qn):Ka[Ai]))}if(qo)return Yr=null,qo+""||null}function Kn(){return I().defined(nn).curve(bn).context(Dr)}return Tn.x=function(Qn){return arguments.length?(ut=typeof Qn=="function"?Qn:r(+Qn),Jt=null,Tn):ut},Tn.x0=function(Qn){return arguments.length?(ut=typeof Qn=="function"?Qn:r(+Qn),Tn):ut},Tn.x1=function(Qn){return arguments.length?(Jt=Qn==null?null:typeof Qn=="function"?Qn:r(+Qn),Tn):Jt},Tn.y=function(Qn){return arguments.length?(er=typeof Qn=="function"?Qn:r(+Qn),wr=null,Tn):er},Tn.y0=function(Qn){return arguments.length?(er=typeof Qn=="function"?Qn:r(+Qn),Tn):er},Tn.y1=function(Qn){return arguments.length?(wr=Qn==null?null:typeof Qn=="function"?Qn:r(+Qn),Tn):wr},Tn.lineX0=Tn.lineY0=function(){return Kn().x(ut).y(er)},Tn.lineY1=function(){return Kn().x(ut).y(wr)},Tn.lineX1=function(){return Kn().x(Jt).y(er)},Tn.defined=function(Qn){return arguments.length?(nn=typeof Qn=="function"?Qn:r(!!Qn),Tn):nn},Tn.curve=function(Qn){return arguments.length?(bn=Qn,Dr!=null&&(Yr=bn(Dr)),Tn):bn},Tn.context=function(Qn){return arguments.length?(Qn==null?Dr=Yr=null:Yr=bn(Dr=Qn),Tn):Dr},Tn}function B(ut,Jt){return Jtut?1:Jt>=ut?0:NaN}function O(ut){return ut}function V(){var ut=O,Jt=B,er=null,wr=r(0),nn=r(g),Dr=r(0);function bn(Yr){var Tn,Kn=Yr.length,Qn,Ai,Ji=0,Ra=new Array(Kn),ii=new Array(Kn),Za=+wr.apply(this,arguments),ja=Math.min(g,Math.max(-g,nn.apply(this,arguments)-Za)),qo,$a=Math.min(Math.abs(ja)/Kn,Dr.apply(this,arguments)),Ka=$a*(ja<0?-1:1),Oa;for(Tn=0;Tn0&&(Ji+=Oa);for(Jt!=null?Ra.sort(function(Ni,ka){return Jt(ii[Ni],ii[ka])}):er!=null&&Ra.sort(function(Ni,ka){return er(Yr[Ni],Yr[ka])}),Tn=0,Ai=Ji?(ja-Kn*Ka)/Ji:0;Tn0?Oa*Ai:0)+Ka,ii[Qn]={data:Yr[Qn],index:Tn,value:Oa,startAngle:Za,endAngle:qo,padAngle:$a};return ii}return bn.value=function(Yr){return arguments.length?(ut=typeof Yr=="function"?Yr:r(+Yr),bn):ut},bn.sortValues=function(Yr){return arguments.length?(Jt=Yr,er=null,bn):Jt},bn.sort=function(Yr){return arguments.length?(er=Yr,Jt=null,bn):er},bn.startAngle=function(Yr){return arguments.length?(wr=typeof Yr=="function"?Yr:r(+Yr),bn):wr},bn.endAngle=function(Yr){return arguments.length?(nn=typeof Yr=="function"?Yr:r(+Yr),bn):nn},bn.padAngle=function(Yr){return arguments.length?(Dr=typeof Yr=="function"?Yr:r(+Yr),bn):Dr},bn}var j=U(m);function q(ut){this._curve=ut}q.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ut,Jt){this._curve.point(Jt*Math.sin(ut),Jt*-Math.cos(ut))}};function U(ut){function Jt(er){return new q(ut(er))}return Jt._curve=ut,Jt}function J(ut){var Jt=ut.curve;return ut.angle=ut.x,delete ut.x,ut.radius=ut.y,delete ut.y,ut.curve=function(er){return arguments.length?Jt(U(er)):Jt()._curve},ut}function ee(){return J(I().curve(j))}function ce(){var ut=R().curve(j),Jt=ut.curve,er=ut.lineX0,wr=ut.lineX1,nn=ut.lineY0,Dr=ut.lineY1;return ut.angle=ut.x,delete ut.x,ut.startAngle=ut.x0,delete ut.x0,ut.endAngle=ut.x1,delete ut.x1,ut.radius=ut.y,delete ut.y,ut.innerRadius=ut.y0,delete ut.y0,ut.outerRadius=ut.y1,delete ut.y1,ut.lineStartAngle=function(){return J(er())},delete ut.lineX0,ut.lineEndAngle=function(){return J(wr())},delete ut.lineX1,ut.lineInnerRadius=function(){return J(nn())},delete ut.lineY0,ut.lineOuterRadius=function(){return J(Dr())},delete ut.lineY1,ut.curve=function(bn){return arguments.length?Jt(U(bn)):Jt()._curve},ut}function ye(ut,Jt){return[(Jt=+Jt)*Math.cos(ut-=Math.PI/2),Jt*Math.sin(ut)]}var xe=Array.prototype.slice;function ue(ut){return ut.source}function K(ut){return ut.target}function _e(ut){var Jt=ue,er=K,wr=F,nn=E,Dr=null;function bn(){var Yr,Tn=xe.call(arguments),Kn=Jt.apply(this,Tn),Qn=er.apply(this,Tn);if(Dr||(Dr=Yr=t.path()),ut(Dr,+wr.apply(this,(Tn[0]=Kn,Tn)),+nn.apply(this,Tn),+wr.apply(this,(Tn[0]=Qn,Tn)),+nn.apply(this,Tn)),Yr)return Dr=null,Yr+""||null}return bn.source=function(Yr){return arguments.length?(Jt=Yr,bn):Jt},bn.target=function(Yr){return arguments.length?(er=Yr,bn):er},bn.x=function(Yr){return arguments.length?(wr=typeof Yr=="function"?Yr:r(+Yr),bn):wr},bn.y=function(Yr){return arguments.length?(nn=typeof Yr=="function"?Yr:r(+Yr),bn):nn},bn.context=function(Yr){return arguments.length?(Dr=Yr==null?null:Yr,bn):Dr},bn}function ne(ut,Jt,er,wr,nn){ut.moveTo(Jt,er),ut.bezierCurveTo(Jt=(Jt+wr)/2,er,Jt,nn,wr,nn)}function ae(ut,Jt,er,wr,nn){ut.moveTo(Jt,er),ut.bezierCurveTo(Jt,er=(er+nn)/2,wr,er,wr,nn)}function pe(ut,Jt,er,wr,nn){var Dr=ye(Jt,er),bn=ye(Jt,er=(er+nn)/2),Yr=ye(wr,er),Tn=ye(wr,nn);ut.moveTo(Dr[0],Dr[1]),ut.bezierCurveTo(bn[0],bn[1],Yr[0],Yr[1],Tn[0],Tn[1])}function ie(){return _e(ne)}function le(){return _e(ae)}function me(){var ut=_e(pe);return ut.angle=ut.x,delete ut.x,ut.radius=ut.y,delete ut.y,ut}var be={draw:function(ut,Jt){var er=Math.sqrt(Jt/f);ut.moveTo(er,0),ut.arc(0,0,er,0,g)}},De={draw:function(ut,Jt){var er=Math.sqrt(Jt/5)/2;ut.moveTo(-3*er,-er),ut.lineTo(-er,-er),ut.lineTo(-er,-3*er),ut.lineTo(er,-3*er),ut.lineTo(er,-er),ut.lineTo(3*er,-er),ut.lineTo(3*er,er),ut.lineTo(er,er),ut.lineTo(er,3*er),ut.lineTo(-er,3*er),ut.lineTo(-er,er),ut.lineTo(-3*er,er),ut.closePath()}},Ge=Math.sqrt(1/3),ht=Ge*2,it={draw:function(ut,Jt){var er=Math.sqrt(Jt/ht),wr=er*Ge;ut.moveTo(0,-er),ut.lineTo(wr,0),ut.lineTo(0,er),ut.lineTo(-wr,0),ut.closePath()}},Oe=.8908130915292852,ze=Math.sin(f/10)/Math.sin(7*f/10),ct=Math.sin(g/10)*ze,et=-Math.cos(g/10)*ze,qe={draw:function(ut,Jt){var er=Math.sqrt(Jt*Oe),wr=ct*er,nn=et*er;ut.moveTo(0,-er),ut.lineTo(wr,nn);for(var Dr=1;Dr<5;++Dr){var bn=g*Dr/5,Yr=Math.cos(bn),Tn=Math.sin(bn);ut.lineTo(Tn*er,-Yr*er),ut.lineTo(Yr*wr-Tn*nn,Tn*wr+Yr*nn)}ut.closePath()}},we={draw:function(ut,Jt){var er=Math.sqrt(Jt),wr=-er/2;ut.rect(wr,wr,er,er)}},Le=Math.sqrt(3),Ke={draw:function(ut,Jt){var er=-Math.sqrt(Jt/(Le*3));ut.moveTo(0,er*2),ut.lineTo(-Le*er,-er),ut.lineTo(Le*er,-er),ut.closePath()}},Te=-.5,Ve=Math.sqrt(3)/2,$e=1/Math.sqrt(12),ot=($e/2+1)*3,tt={draw:function(ut,Jt){var er=Math.sqrt(Jt/ot),wr=er/2,nn=er*$e,Dr=wr,bn=er*$e+er,Yr=-Dr,Tn=bn;ut.moveTo(wr,nn),ut.lineTo(Dr,bn),ut.lineTo(Yr,Tn),ut.lineTo(Te*wr-Ve*nn,Ve*wr+Te*nn),ut.lineTo(Te*Dr-Ve*bn,Ve*Dr+Te*bn),ut.lineTo(Te*Yr-Ve*Tn,Ve*Yr+Te*Tn),ut.lineTo(Te*wr+Ve*nn,Te*nn-Ve*wr),ut.lineTo(Te*Dr+Ve*bn,Te*bn-Ve*Dr),ut.lineTo(Te*Yr+Ve*Tn,Te*Tn-Ve*Yr),ut.closePath()}},nt=[be,De,it,we,qe,Ke,tt];function We(){var ut=r(be),Jt=r(64),er=null;function wr(){var nn;if(er||(er=nn=t.path()),ut.apply(this,arguments).draw(er,+Jt.apply(this,arguments)),nn)return er=null,nn+""||null}return wr.type=function(nn){return arguments.length?(ut=typeof nn=="function"?nn:r(nn),wr):ut},wr.size=function(nn){return arguments.length?(Jt=typeof nn=="function"?nn:r(+nn),wr):Jt},wr.context=function(nn){return arguments.length?(er=nn==null?null:nn,wr):er},wr}function mt(){}function bt(ut,Jt,er){ut._context.bezierCurveTo((2*ut._x0+ut._x1)/3,(2*ut._y0+ut._y1)/3,(ut._x0+2*ut._x1)/3,(ut._y0+2*ut._y1)/3,(ut._x0+4*ut._x1+Jt)/6,(ut._y0+4*ut._y1+er)/6)}function Yt(ut){this._context=ut}Yt.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:bt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);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:bt(this,ut,Jt);break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt}};function jt(ut){return new Yt(ut)}function mr(ut){this._context=ut}mr.prototype={areaStart:mt,areaEnd:mt,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);break}}},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._x2=ut,this._y2=Jt;break;case 1:this._point=2,this._x3=ut,this._y3=Jt;break;case 2:this._point=3,this._x4=ut,this._y4=Jt,this._context.moveTo((this._x0+4*this._x1+ut)/6,(this._y0+4*this._y1+Jt)/6);break;default:bt(this,ut,Jt);break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt}};function or(ut){return new mr(ut)}function fr(ut){this._context=ut}fr.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var er=(this._x0+4*this._x1+ut)/6,wr=(this._y0+4*this._y1+Jt)/6;this._line?this._context.lineTo(er,wr):this._context.moveTo(er,wr);break;case 3:this._point=4;default:bt(this,ut,Jt);break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt}};function Ot(ut){return new fr(ut)}function cr(ut,Jt){this._basis=new Yt(ut),this._beta=Jt}cr.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ut=this._x,Jt=this._y,er=ut.length-1;if(er>0)for(var wr=ut[0],nn=Jt[0],Dr=ut[er]-wr,bn=Jt[er]-nn,Yr=-1,Tn;++Yr<=er;)Tn=Yr/er,this._basis.point(this._beta*ut[Yr]+(1-this._beta)*(wr+Tn*Dr),this._beta*Jt[Yr]+(1-this._beta)*(nn+Tn*bn));this._x=this._y=null,this._basis.lineEnd()},point:function(ut,Jt){this._x.push(+ut),this._y.push(+Jt)}};var Ct=(function ut(Jt){function er(wr){return Jt===1?new Yt(wr):new cr(wr,Jt)}return er.beta=function(wr){return ut(+wr)},er})(.85);function wt(ut,Jt,er){ut._context.bezierCurveTo(ut._x1+ut._k*(ut._x2-ut._x0),ut._y1+ut._k*(ut._y2-ut._y0),ut._x2+ut._k*(ut._x1-Jt),ut._y2+ut._k*(ut._y1-er),ut._x2,ut._y2)}function Tt(ut,Jt){this._context=ut,this._k=(1-Jt)/6}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:wt(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2,this._x1=ut,this._y1=Jt;break;case 2:this._point=3;default:wt(this,ut,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Mt=(function ut(Jt){function er(wr){return new Tt(wr,Jt)}return er.tension=function(wr){return ut(+wr)},er})(0);function Lt(ut,Jt){this._context=ut,this._k=(1-Jt)/6}Lt.prototype={areaStart:mt,areaEnd:mt,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);break}}},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._x3=ut,this._y3=Jt;break;case 1:this._point=2,this._context.moveTo(this._x4=ut,this._y4=Jt);break;case 2:this._point=3,this._x5=ut,this._y5=Jt;break;default:wt(this,ut,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var ft=(function ut(Jt){function er(wr){return new Lt(wr,Jt)}return er.tension=function(wr){return ut(+wr)},er})(0);function kt(ut,Jt){this._context=ut,this._k=(1-Jt)/6}kt.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wt(this,ut,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var rr=(function ut(Jt){function er(wr){return new kt(wr,Jt)}return er.tension=function(wr){return ut(+wr)},er})(0);function pr(ut,Jt,er){var wr=ut._x1,nn=ut._y1,Dr=ut._x2,bn=ut._y2;if(ut._l01_a>c){var Yr=2*ut._l01_2a+3*ut._l01_a*ut._l12_a+ut._l12_2a,Tn=3*ut._l01_a*(ut._l01_a+ut._l12_a);wr=(wr*Yr-ut._x0*ut._l12_2a+ut._x2*ut._l01_2a)/Tn,nn=(nn*Yr-ut._y0*ut._l12_2a+ut._y2*ut._l01_2a)/Tn}if(ut._l23_a>c){var Kn=2*ut._l23_2a+3*ut._l23_a*ut._l12_a+ut._l12_2a,Qn=3*ut._l23_a*(ut._l23_a+ut._l12_a);Dr=(Dr*Kn+ut._x1*ut._l23_2a-Jt*ut._l12_2a)/Qn,bn=(bn*Kn+ut._y1*ut._l23_2a-er*ut._l12_2a)/Qn}ut._context.bezierCurveTo(wr,nn,Dr,bn,ut._x2,ut._y2)}function Kr(ut,Jt){this._context=ut,this._alpha=Jt}Kr.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){if(ut=+ut,Jt=+Jt,this._point){var er=this._x2-ut,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2;break;case 2:this._point=3;default:pr(this,ut,Jt);break}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=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Nr=(function ut(Jt){function er(wr){return Jt?new Kr(wr,Jt):new Tt(wr,0)}return er.alpha=function(wr){return ut(+wr)},er})(.5);function dn(ut,Jt){this._context=ut,this._alpha=Jt}dn.prototype={areaStart:mt,areaEnd:mt,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);break}}},point:function(ut,Jt){if(ut=+ut,Jt=+Jt,this._point){var er=this._x2-ut,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ut,this._y3=Jt;break;case 1:this._point=2,this._context.moveTo(this._x4=ut,this._y4=Jt);break;case 2:this._point=3,this._x5=ut,this._y5=Jt;break;default:pr(this,ut,Jt);break}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=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var xr=(function ut(Jt){function er(wr){return Jt?new dn(wr,Jt):new Lt(wr,0)}return er.alpha=function(wr){return ut(+wr)},er})(.5);function Fr(ut,Jt){this._context=ut,this._alpha=Jt}Fr.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){if(ut=+ut,Jt=+Jt,this._point){var er=this._x2-ut,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,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:pr(this,ut,Jt);break}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=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Zr=(function ut(Jt){function er(wr){return Jt?new Fr(wr,Jt):new kt(wr,0)}return er.alpha=function(wr){return ut(+wr)},er})(.5);function Cn(ut){this._context=ut}Cn.prototype={areaStart:mt,areaEnd:mt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ut,Jt){ut=+ut,Jt=+Jt,this._point?this._context.lineTo(ut,Jt):(this._point=1,this._context.moveTo(ut,Jt))}};function Dt(ut){return new Cn(ut)}function At(ut){return ut<0?-1:1}function Vt(ut,Jt,er){var wr=ut._x1-ut._x0,nn=Jt-ut._x1,Dr=(ut._y1-ut._y0)/(wr||nn<0&&-0),bn=(er-ut._y1)/(nn||wr<0&&-0),Yr=(Dr*nn+bn*wr)/(wr+nn);return(At(Dr)+At(bn))*Math.min(Math.abs(Dr),Math.abs(bn),.5*Math.abs(Yr))||0}function Qt(ut,Jt){var er=ut._x1-ut._x0;return er?(3*(ut._y1-ut._y0)/er-Jt)/2:Jt}function Ut(ut,Jt,er){var wr=ut._x0,nn=ut._y0,Dr=ut._x1,bn=ut._y1,Yr=(Dr-wr)/3;ut._context.bezierCurveTo(wr+Yr,nn+Yr*Jt,Dr-Yr,bn-Yr*er,Dr,bn)}function _r(ut){this._context=ut}_r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ut(this,this._t0,Qt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){var er=NaN;if(ut=+ut,Jt=+Jt,!(ut===this._x1&&Jt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2;break;case 2:this._point=3,Ut(this,Qt(this,er=Vt(this,ut,Jt)),er);break;default:Ut(this,this._t0,er=Vt(this,ut,Jt));break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt,this._t0=er}}};function rn(ut){this._context=new Jr(ut)}(rn.prototype=Object.create(_r.prototype)).point=function(ut,Jt){_r.prototype.point.call(this,Jt,ut)};function Jr(ut){this._context=ut}Jr.prototype={moveTo:function(ut,Jt){this._context.moveTo(Jt,ut)},closePath:function(){this._context.closePath()},lineTo:function(ut,Jt){this._context.lineTo(Jt,ut)},bezierCurveTo:function(ut,Jt,er,wr,nn,Dr){this._context.bezierCurveTo(Jt,ut,wr,er,Dr,nn)}};function qn(ut){return new _r(ut)}function ri(ut){return new rn(ut)}function Jn(ut){this._context=ut}Jn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ut=this._x,Jt=this._y,er=ut.length;if(er)if(this._line?this._context.lineTo(ut[0],Jt[0]):this._context.moveTo(ut[0],Jt[0]),er===2)this._context.lineTo(ut[1],Jt[1]);else for(var wr=Ii(ut),nn=Ii(Jt),Dr=0,bn=1;bn=0;--Jt)nn[Jt]=(bn[Jt]-nn[Jt+1])/Dr[Jt];for(Dr[er-1]=(ut[er]+nn[er-1])/2,Jt=0;Jt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Jt),this._context.lineTo(ut,Jt);else{var er=this._x*(1-this._t)+ut*this._t;this._context.lineTo(er,this._y),this._context.lineTo(er,Jt)}break}}this._x=ut,this._y=Jt}};function ha(ut){return new ra(ut,.5)}function va(ut){return new ra(ut,0)}function Xi(ut){return new ra(ut,1)}function oa(ut,Jt){if((bn=ut.length)>1)for(var er=1,wr,nn,Dr=ut[Jt[0]],bn,Yr=Dr.length;er=0;)er[Jt]=Jt;return er}function Ga(ut,Jt){return ut[Jt]}function ss(){var ut=r([]),Jt=Ma,er=oa,wr=Ga;function nn(Dr){var bn=ut.apply(this,arguments),Yr,Tn=Dr.length,Kn=bn.length,Qn=new Array(Kn),Ai;for(Yr=0;Yr0){for(var er,wr,nn=0,Dr=ut[0].length,bn;nn0)for(var er,wr=0,nn,Dr,bn,Yr,Tn,Kn=ut[Jt[0]].length;wr0?(nn[0]=bn,nn[1]=bn+=Dr):Dr<0?(nn[1]=Yr,nn[0]=Yr+=Dr):(nn[0]=0,nn[1]=Dr)}function Eo(ut,Jt){if((nn=ut.length)>0){for(var er=0,wr=ut[Jt[0]],nn,Dr=wr.length;er0)||!((Dr=(nn=ut[Jt[0]]).length)>0))){for(var er=0,wr=1,nn,Dr,bn;wrDr&&(Dr=nn,er=Jt);return er}function bo(ut){var Jt=ut.map(Zs);return Ma(ut).sort(function(er,wr){return Jt[er]-Jt[wr]})}function Zs(ut){for(var Jt=0,er=-1,wr=ut.length,nn;++er{(function(e,t){typeof bD=="object"&&typeof MXe!="undefined"?t(bD,bXe(),EK()):(e=e||self,t(e.d3=e.d3||{},e.d3,e.d3))})(bD,function(e,t,r){"use strict";function n(w){return w.target.depth}function a(w){return w.depth}function i(w,A){return A-1-w.height}function o(w,A){return w.sourceLinks.length?w.depth:A-1}function s(w){return w.targetLinks.length?w.depth:w.sourceLinks.length?t.min(w.sourceLinks,n)-1:0}function l(w){return function(){return w}}function u(w,A){return f(w.source,A.source)||w.index-A.index}function c(w,A){return f(w.target,A.target)||w.index-A.index}function f(w,A){return w.y0-A.y0}function v(w){return w.value}function g(w){return w.index}function p(w){return w.nodes}function x(w){return w.links}function _(w,A){let T=w.get(A);if(!T)throw new Error("missing: "+A);return T}function y({nodes:w}){for(let A of w){let T=A.y0,m=T;for(let F of A.sourceLinks)F.y0=T+F.width/2,T+=F.width;for(let F of A.targetLinks)F.y1=m+F.width/2,m+=F.width}}function C(){let w=0,A=0,T=1,m=1,F=24,E=8,I,R=g,B=o,O,V,j=p,q=x,U=6,J=2/3;function ee(){let it={nodes:j.apply(null,arguments),links:q.apply(null,arguments)};return ce(it),ye(it),xe(it),ue(it),ne(it),y(it),it}ee.update=function(it){return y(it),it},ee.nodeId=function(it){return arguments.length?(R=typeof it=="function"?it:l(it),ee):R},ee.nodeAlign=function(it){return arguments.length?(B=typeof it=="function"?it:l(it),ee):B},ee.nodeSort=function(it){return arguments.length?(O=it,ee):O},ee.nodeWidth=function(it){return arguments.length?(F=+it,ee):F},ee.nodePadding=function(it){return arguments.length?(E=I=+it,ee):E},ee.nodes=function(it){return arguments.length?(j=typeof it=="function"?it:l(it),ee):j},ee.links=function(it){return arguments.length?(q=typeof it=="function"?it:l(it),ee):q},ee.linkSort=function(it){return arguments.length?(V=it,ee):V},ee.size=function(it){return arguments.length?(w=A=0,T=+it[0],m=+it[1],ee):[T-w,m-A]},ee.extent=function(it){return arguments.length?(w=+it[0][0],T=+it[1][0],A=+it[0][1],m=+it[1][1],ee):[[w,A],[T,m]]},ee.iterations=function(it){return arguments.length?(U=+it,ee):U};function ce({nodes:it,links:Oe}){for(let[ct,et]of it.entries())et.index=ct,et.sourceLinks=[],et.targetLinks=[];let ze=new Map(it.map((ct,et)=>[R(ct,et,it),ct]));for(let[ct,et]of Oe.entries()){et.index=ct;let{source:qe,target:we}=et;typeof qe!="object"&&(qe=et.source=_(ze,qe)),typeof we!="object"&&(we=et.target=_(ze,we)),qe.sourceLinks.push(et),we.targetLinks.push(et)}if(V!=null)for(let{sourceLinks:ct,targetLinks:et}of it)ct.sort(V),et.sort(V)}function ye({nodes:it}){for(let Oe of it)Oe.value=Oe.fixedValue===void 0?Math.max(t.sum(Oe.sourceLinks,v),t.sum(Oe.targetLinks,v)):Oe.fixedValue}function xe({nodes:it}){let Oe=it.length,ze=new Set(it),ct=new Set,et=0;for(;ze.size;){for(let qe of ze){qe.depth=et;for(let{target:we}of qe.sourceLinks)ct.add(we)}if(++et>Oe)throw new Error("circular link");ze=ct,ct=new Set}}function ue({nodes:it}){let Oe=it.length,ze=new Set(it),ct=new Set,et=0;for(;ze.size;){for(let qe of ze){qe.height=et;for(let{source:we}of qe.targetLinks)ct.add(we)}if(++et>Oe)throw new Error("circular link");ze=ct,ct=new Set}}function K({nodes:it}){let Oe=t.max(it,et=>et.depth)+1,ze=(T-w-F)/(Oe-1),ct=new Array(Oe);for(let et of it){let qe=Math.max(0,Math.min(Oe-1,Math.floor(B.call(null,et,Oe))));et.layer=qe,et.x0=w+qe*ze,et.x1=et.x0+F,ct[qe]?ct[qe].push(et):ct[qe]=[et]}if(O)for(let et of ct)et.sort(O);return ct}function _e(it){let Oe=t.min(it,ze=>(m-A-(ze.length-1)*I)/t.sum(ze,v));for(let ze of it){let ct=A;for(let et of ze){et.y0=ct,et.y1=ct+et.value*Oe,ct=et.y1+I;for(let qe of et.sourceLinks)qe.width=qe.value*Oe}ct=(m-ct+I)/(ze.length+1);for(let et=0;etze.length)-1)),_e(Oe);for(let ze=0;ze0))continue;let Te=(Le/Ke-we.y0)*Oe;we.y0+=Te,we.y1+=Te,be(we)}O===void 0&&qe.sort(f),ie(qe,ze)}}function pe(it,Oe,ze){for(let ct=it.length,et=ct-2;et>=0;--et){let qe=it[et];for(let we of qe){let Le=0,Ke=0;for(let{target:Ve,value:$e}of we.sourceLinks){let ot=$e*(Ve.layer-we.layer);Le+=ht(we,Ve)*ot,Ke+=ot}if(!(Ke>0))continue;let Te=(Le/Ke-we.y0)*Oe;we.y0+=Te,we.y1+=Te,be(we)}O===void 0&&qe.sort(f),ie(qe,ze)}}function ie(it,Oe){let ze=it.length>>1,ct=it[ze];me(it,ct.y0-I,ze-1,Oe),le(it,ct.y1+I,ze+1,Oe),me(it,m,it.length-1,Oe),le(it,A,0,Oe)}function le(it,Oe,ze,ct){for(;ze1e-6&&(et.y0+=qe,et.y1+=qe),Oe=et.y1+I}}function me(it,Oe,ze,ct){for(;ze>=0;--ze){let et=it[ze],qe=(et.y1-Oe)*ct;qe>1e-6&&(et.y0-=qe,et.y1-=qe),Oe=et.y0-I}}function be({sourceLinks:it,targetLinks:Oe}){if(V===void 0){for(let{source:{sourceLinks:ze}}of Oe)ze.sort(c);for(let{target:{targetLinks:ze}}of it)ze.sort(u)}}function De(it){if(V===void 0)for(let{sourceLinks:Oe,targetLinks:ze}of it)Oe.sort(c),ze.sort(u)}function Ge(it,Oe){let ze=it.y0-(it.sourceLinks.length-1)*I/2;for(let{target:ct,width:et}of it.sourceLinks){if(ct===Oe)break;ze+=et+I}for(let{source:ct,width:et}of Oe.targetLinks){if(ct===it)break;ze-=et}return ze}function ht(it,Oe){let ze=Oe.y0-(Oe.targetLinks.length-1)*I/2;for(let{source:ct,width:et}of Oe.targetLinks){if(ct===it)break;ze+=et+I}for(let{target:ct,width:et}of it.sourceLinks){if(ct===Oe)break;ze-=et}return ze}return ee}function k(w){return[w.source.x1,w.y0]}function S(w){return[w.target.x0,w.y1]}function L(){return r.linkHorizontal().source(k).target(S)}e.sankey=C,e.sankeyCenter=s,e.sankeyJustify=o,e.sankeyLeft=a,e.sankeyLinkHorizontal=L,e.sankeyRight=i,Object.defineProperty(e,"__esModule",{value:!0})})});var kXe=fe((wD,EXe)=>{(function(e,t){t(typeof wD=="object"&&typeof EXe!="undefined"?wD:e.d3=e.d3||{})})(wD,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)<0?ie=me+1:le=me}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)>0?le=me:ie=me+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],me=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,me=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,me,be;if(ae==null){for(;++ie=le)for(me=be=le;++iele&&(me=le),be=le)for(me=be=le;++iele&&(me=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(me=Math.ceil(ae-ne+1));++le=0?(me>=L?10:me>=w?5:me>=A?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(me>=L?10:me>=w?5:me>=A?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),me=ie/le;return me>=L?le*=10:me>=w?le*=5:me>=A&&(le*=2),aeOe;)ze.pop(),--ct;var et=new Array(ct+1),qe;for(me=0;me<=ct;++me)qe=et[me]=[],qe.x0=me>0?ze[me-1]:it,qe.x1=me=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,me=Math.floor(le),be=+pe(ne[me],me,ne),De=+pe(ne[me+1],me+1,ne);return be+(De-be)*(le-me)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function V(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++ieme&&(me=le)}else for(;++ie=le)for(me=le;++ieme&&(me=le);return me}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,me,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)me[--le]=be[pe];return me}function J(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++iele&&(me=le)}else for(;++ie=le)for(me=le;++iele&&(me=le);return me}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,me,be=ne[le];for(ae==null&&(ae=t);++ie{var Zrr=MK();CXe.exports=function(t,r){var n=[],a=[],i=[],o={},s=[],l;function u(k){i[k]=!1,o.hasOwnProperty(k)&&Object.keys(o[k]).forEach(function(S){delete o[k][S],i[S]&&u(S)})}function c(k){var S=!1;a.push(k),i[k]=!0;var L,w;for(L=0;L=k})}function g(k){v(k);for(var S=t,L=Zrr(S),w=L.components.filter(function(R){return R.length>1}),A=1/0,T,m=0;m{(function(e,t){typeof TD=="object"&&typeof PXe!="undefined"?t(TD,kXe(),SK(),EK(),LXe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(TD,(function(e,t,r,n,a){"use strict";a=a&&a.hasOwnProperty("default")?a.default:a;function i(Oe){return Oe.target.depth}function o(Oe){return Oe.depth}function s(Oe,ze){return ze-1-Oe.height}function l(Oe,ze){return Oe.sourceLinks.length?Oe.depth:ze-1}function u(Oe){return Oe.targetLinks.length?Oe.depth:Oe.sourceLinks.length?t.min(Oe.sourceLinks,i)-1:0}function c(Oe){return function(){return Oe}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Oe){return typeof Oe}:function(Oe){return Oe&&typeof Symbol=="function"&&Oe.constructor===Symbol&&Oe!==Symbol.prototype?"symbol":typeof Oe};function v(Oe,ze){return p(Oe.source,ze.source)||Oe.index-ze.index}function g(Oe,ze){return p(Oe.target,ze.target)||Oe.index-ze.index}function p(Oe,ze){return Oe.partOfCycle===ze.partOfCycle?Oe.y0-ze.y0:Oe.circularLinkType==="top"||ze.circularLinkType==="bottom"?-1:1}function x(Oe){return Oe.value}function _(Oe){return(Oe.y0+Oe.y1)/2}function y(Oe){return _(Oe.source)}function C(Oe){return _(Oe.target)}function k(Oe){return Oe.index}function S(Oe){return Oe.nodes}function L(Oe){return Oe.links}function w(Oe,ze){var ct=Oe.get(ze);if(!ct)throw new Error("missing: "+ze);return ct}function A(Oe,ze){return ze(Oe)}var T=25,m=10,F=.3;function E(){var Oe=0,ze=0,ct=1,et=1,qe=24,we,Le=k,Ke=l,Te=S,Ve=L,$e=32,ot=2,tt,nt=null;function We(){var Ot={nodes:Te.apply(null,arguments),links:Ve.apply(null,arguments)};mt(Ot),I(Ot,Le,nt),bt(Ot),mr(Ot),R(Ot,Le),or(Ot,$e,Le),fr(Ot);for(var cr=4,Ct=0;Ct0?cr+T+m:cr,Ct=Ct>0?Ct+T+m:Ct,wt=wt>0?wt+T+m:wt,Tt=Tt>0?Tt+T+m:Tt,{top:cr,bottom:Ct,left:Tt,right:wt}}function jt(Ot,cr){var Ct=t.max(Ot.nodes,function(rr){return rr.column}),wt=ct-Oe,Tt=et-ze,Mt=wt+cr.right+cr.left,Lt=Tt+cr.top+cr.bottom,ft=wt/Mt,kt=Tt/Lt;return Oe=Oe*ft+cr.left,ct=cr.right==0?ct:ct*ft,ze=ze*kt+cr.top,et=et*kt,Ot.nodes.forEach(function(rr){rr.x0=Oe+rr.column*((ct-Oe-qe)/Ct),rr.x1=rr.x0+qe}),kt}function mr(Ot){var cr,Ct,wt;for(cr=Ot.nodes,Ct=[],wt=0;cr.length;++wt,cr=Ct,Ct=[])cr.forEach(function(Tt){Tt.depth=wt,Tt.sourceLinks.forEach(function(Mt){Ct.indexOf(Mt.target)<0&&!Mt.circular&&Ct.push(Mt.target)})});for(cr=Ot.nodes,Ct=[],wt=0;cr.length;++wt,cr=Ct,Ct=[])cr.forEach(function(Tt){Tt.height=wt,Tt.targetLinks.forEach(function(Mt){Ct.indexOf(Mt.source)<0&&!Mt.circular&&Ct.push(Mt.source)})});Ot.nodes.forEach(function(Tt){Tt.column=Math.floor(Ke.call(null,Tt,wt))})}function or(Ot,cr,Ct){var wt=r.nest().key(function(rr){return rr.column}).sortKeys(t.ascending).entries(Ot.nodes).map(function(rr){return rr.values});Lt(Ct),kt();for(var Tt=1,Mt=cr;Mt>0;--Mt)ft(Tt*=.99,Ct),kt();function Lt(rr){if(tt){var pr=1/0;wt.forEach(function(xr){var Fr=et*tt/(xr.length+1);pr=Fr0))if(xr==0&&dn==1)Zr=Fr.y1-Fr.y0,Fr.y0=et/2-Zr/2,Fr.y1=et/2+Zr/2;else if(xr==Kr-1&&dn==1)Zr=Fr.y1-Fr.y0,Fr.y0=et/2-Zr/2,Fr.y1=et/2+Zr/2;else{var Cn=0,Dt=t.mean(Fr.sourceLinks,C),At=t.mean(Fr.targetLinks,y);Dt&&At?Cn=(Dt+At)/2:Cn=Dt||At;var Vt=(Cn-_(Fr))*rr;Fr.y0+=Vt,Fr.y1+=Vt}})})}function kt(){wt.forEach(function(rr){var pr,Kr,Nr=ze,dn=rr.length,xr;for(rr.sort(p),xr=0;xr0&&(pr.y0+=Kr,pr.y1+=Kr),Nr=pr.y1+we;if(Kr=Nr-we-et,Kr>0)for(Nr=pr.y0-=Kr,pr.y1-=Kr,xr=dn-2;xr>=0;--xr)pr=rr[xr],Kr=pr.y1+we-Nr,Kr>0&&(pr.y0-=Kr,pr.y1-=Kr),Nr=pr.y0})}}function fr(Ot){Ot.nodes.forEach(function(cr){cr.sourceLinks.sort(g),cr.targetLinks.sort(v)}),Ot.nodes.forEach(function(cr){var Ct=cr.y0,wt=Ct,Tt=cr.y1,Mt=Tt;cr.sourceLinks.forEach(function(Lt){Lt.circular?(Lt.y0=Tt-Lt.width/2,Tt=Tt-Lt.width):(Lt.y0=Ct+Lt.width/2,Ct+=Lt.width)}),cr.targetLinks.forEach(function(Lt){Lt.circular?(Lt.y1=Mt-Lt.width/2,Mt=Mt-Lt.width):(Lt.y1=wt+Lt.width/2,wt+=Lt.width)})})}return We}function I(Oe,ze,ct){var et=0;if(ct===null){for(var qe=[],we=0;weze.source.column)}function V(Oe,ze){var ct=0;Oe.sourceLinks.forEach(function(qe){ct=qe.circular&&!ht(qe,ze)?ct+1:ct});var et=0;return Oe.targetLinks.forEach(function(qe){et=qe.circular&&!ht(qe,ze)?et+1:et}),ct+et}function j(Oe){var ze=Oe.source.sourceLinks,ct=0;ze.forEach(function(we){ct=we.circular?ct+1:ct});var et=Oe.target.targetLinks,qe=0;return et.forEach(function(we){qe=we.circular?qe+1:qe}),!(ct>1||qe>1)}function q(Oe,ze,ct){return Oe.sort(ee),Oe.forEach(function(et,qe){var we=0;if(ht(et,ct)&&j(et))et.circularPathData.verticalBuffer=we+et.width/2;else{var Le=0;for(Le;Lewe?Ke:we}et.circularPathData.verticalBuffer=we+et.width/2}}),Oe}function U(Oe,ze,ct,et){var qe=5,we=t.min(Oe.links,function(Te){return Te.source.y0});Oe.links.forEach(function(Te){Te.circular&&(Te.circularPathData={})});var Le=Oe.links.filter(function(Te){return Te.circularLinkType=="top"});q(Le,ze,et);var Ke=Oe.links.filter(function(Te){return Te.circularLinkType=="bottom"});q(Ke,ze,et),Oe.links.forEach(function(Te){if(Te.circular){if(Te.circularPathData.arcRadius=Te.width+m,Te.circularPathData.leftNodeBuffer=qe,Te.circularPathData.rightNodeBuffer=qe,Te.circularPathData.sourceWidth=Te.source.x1-Te.source.x0,Te.circularPathData.sourceX=Te.source.x0+Te.circularPathData.sourceWidth,Te.circularPathData.targetX=Te.target.x0,Te.circularPathData.sourceY=Te.y0,Te.circularPathData.targetY=Te.y1,ht(Te,et)&&j(Te))Te.circularPathData.leftSmallArcRadius=m+Te.width/2,Te.circularPathData.leftLargeArcRadius=m+Te.width/2,Te.circularPathData.rightSmallArcRadius=m+Te.width/2,Te.circularPathData.rightLargeArcRadius=m+Te.width/2,Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Te.source.y1+T+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=Te.source.y0-T-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius);else{var Ve=Te.source.column,$e=Te.circularLinkType,ot=Oe.links.filter(function(We){return We.source.column==Ve&&We.circularLinkType==$e});Te.circularLinkType=="bottom"?ot.sort(ye):ot.sort(ce);var tt=0;ot.forEach(function(We,mt){We.circularLinkID==Te.circularLinkID&&(Te.circularPathData.leftSmallArcRadius=m+Te.width/2+tt,Te.circularPathData.leftLargeArcRadius=m+Te.width/2+mt*ze+tt),tt=tt+We.width}),Ve=Te.target.column,ot=Oe.links.filter(function(We){return We.target.column==Ve&&We.circularLinkType==$e}),Te.circularLinkType=="bottom"?ot.sort(ue):ot.sort(xe),tt=0,ot.forEach(function(We,mt){We.circularLinkID==Te.circularLinkID&&(Te.circularPathData.rightSmallArcRadius=m+Te.width/2+tt,Te.circularPathData.rightLargeArcRadius=m+Te.width/2+mt*ze+tt),tt=tt+We.width}),Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Math.max(ct,Te.source.y1,Te.target.y1)+T+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=we-T-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius)}Te.circularPathData.leftInnerExtent=Te.circularPathData.sourceX+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightInnerExtent=Te.circularPathData.targetX-Te.circularPathData.rightNodeBuffer,Te.circularPathData.leftFullExtent=Te.circularPathData.sourceX+Te.circularPathData.leftLargeArcRadius+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightFullExtent=Te.circularPathData.targetX-Te.circularPathData.rightLargeArcRadius-Te.circularPathData.rightNodeBuffer}if(Te.circular)Te.path=J(Te);else{var nt=n.linkHorizontal().source(function(We){var mt=We.source.x0+(We.source.x1-We.source.x0),bt=We.y0;return[mt,bt]}).target(function(We){var mt=We.target.x0,bt=We.y1;return[mt,bt]});Te.path=nt(Te)}})}function J(Oe){var ze="";return Oe.circularLinkType=="top"?ze="M"+Oe.circularPathData.sourceX+" "+Oe.circularPathData.sourceY+" L"+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.sourceY+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Oe.circularPathData.leftFullExtent+" "+(Oe.circularPathData.sourceY-Oe.circularPathData.leftSmallArcRadius)+" L"+Oe.circularPathData.leftFullExtent+" "+Oe.circularPathData.verticalLeftInnerExtent+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" L"+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Oe.circularPathData.rightFullExtent+" "+Oe.circularPathData.verticalRightInnerExtent+" L"+Oe.circularPathData.rightFullExtent+" "+(Oe.circularPathData.targetY-Oe.circularPathData.rightSmallArcRadius)+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.targetY+" L"+Oe.circularPathData.targetX+" "+Oe.circularPathData.targetY:ze="M"+Oe.circularPathData.sourceX+" "+Oe.circularPathData.sourceY+" L"+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.sourceY+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Oe.circularPathData.leftFullExtent+" "+(Oe.circularPathData.sourceY+Oe.circularPathData.leftSmallArcRadius)+" L"+Oe.circularPathData.leftFullExtent+" "+Oe.circularPathData.verticalLeftInnerExtent+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" L"+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Oe.circularPathData.rightFullExtent+" "+Oe.circularPathData.verticalRightInnerExtent+" L"+Oe.circularPathData.rightFullExtent+" "+(Oe.circularPathData.targetY+Oe.circularPathData.rightSmallArcRadius)+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.targetY+" L"+Oe.circularPathData.targetX+" "+Oe.circularPathData.targetY,ze}function ee(Oe,ze){return K(Oe)==K(ze)?Oe.circularLinkType=="bottom"?ye(Oe,ze):ce(Oe,ze):K(ze)-K(Oe)}function ce(Oe,ze){return Oe.y0-ze.y0}function ye(Oe,ze){return ze.y0-Oe.y0}function xe(Oe,ze){return Oe.y1-ze.y1}function ue(Oe,ze){return ze.y1-Oe.y1}function K(Oe){return Oe.target.column-Oe.source.column}function _e(Oe){return Oe.target.x0-Oe.source.x1}function ne(Oe,ze){var ct=B(Oe),et=_e(ze)/Math.tan(ct),qe=Ge(Oe)=="up"?Oe.y1+et:Oe.y1-et;return qe}function ae(Oe,ze){var ct=B(Oe),et=_e(ze)/Math.tan(ct),qe=Ge(Oe)=="up"?Oe.y1-et:Oe.y1+et;return qe}function pe(Oe,ze,ct,et){Oe.links.forEach(function(qe){if(!qe.circular&&qe.target.column-qe.source.column>1){var we=qe.source.column+1,Le=qe.target.column-1,Ke=1,Te=Le-we+1;for(Ke=1;we<=Le;we++,Ke++)Oe.nodes.forEach(function(Ve){if(Ve.column==we){var $e=Ke/(Te+1),ot=Math.pow(1-$e,3),tt=3*$e*Math.pow(1-$e,2),nt=3*Math.pow($e,2)*(1-$e),We=Math.pow($e,3),mt=ot*qe.y0+tt*qe.y0+nt*qe.y1+We*qe.y1,bt=mt-qe.width/2,Yt=mt+qe.width/2,jt;bt>Ve.y0&&btVe.y0&&YtVe.y1&&le(mr,jt,ze,ct)})):btVe.y1&&(jt=Yt-Ve.y0+10,Ve=le(Ve,jt,ze,ct),Oe.nodes.forEach(function(mr){A(mr,et)==A(Ve,et)||mr.column!=Ve.column||mr.y0Ve.y1&&le(mr,jt,ze,ct)}))}})}})}function ie(Oe,ze){return Oe.y0>ze.y0&&Oe.y0ze.y0&&Oe.y1ze.y1}function le(Oe,ze,ct,et){return Oe.y0+ze>=ct&&Oe.y1+ze<=et&&(Oe.y0=Oe.y0+ze,Oe.y1=Oe.y1+ze,Oe.targetLinks.forEach(function(qe){qe.y1=qe.y1+ze}),Oe.sourceLinks.forEach(function(qe){qe.y0=qe.y0+ze})),Oe}function me(Oe,ze,ct,et){Oe.nodes.forEach(function(qe){et&&qe.y+(qe.y1-qe.y0)>ze&&(qe.y=qe.y-(qe.y+(qe.y1-qe.y0)-ze));var we=Oe.links.filter(function(Te){return A(Te.source,ct)==A(qe,ct)}),Le=we.length;Le>1&&we.sort(function(Te,Ve){if(!Te.circular&&!Ve.circular){if(Te.target.column==Ve.target.column)return Te.y1-Ve.y1;if(De(Te,Ve)){if(Te.target.column>Ve.target.column){var $e=ae(Ve,Te);return Te.y1-$e}if(Ve.target.column>Te.target.column){var ot=ae(Te,Ve);return ot-Ve.y1}}else return Te.y1-Ve.y1}if(Te.circular&&!Ve.circular)return Te.circularLinkType=="top"?-1:1;if(Ve.circular&&!Te.circular)return Ve.circularLinkType=="top"?1:-1;if(Te.circular&&Ve.circular)return Te.circularLinkType===Ve.circularLinkType&&Te.circularLinkType=="top"?Te.target.column===Ve.target.column?Te.target.y1-Ve.target.y1:Ve.target.column-Te.target.column:Te.circularLinkType===Ve.circularLinkType&&Te.circularLinkType=="bottom"?Te.target.column===Ve.target.column?Ve.target.y1-Te.target.y1:Te.target.column-Ve.target.column:Te.circularLinkType=="top"?-1:1});var Ke=qe.y0;we.forEach(function(Te){Te.y0=Ke+Te.width/2,Ke=Ke+Te.width}),we.forEach(function(Te,Ve){if(Te.circularLinkType=="bottom"){var $e=Ve+1,ot=0;for($e;$e1&&qe.sort(function(Ke,Te){if(!Ke.circular&&!Te.circular){if(Ke.source.column==Te.source.column)return Ke.y0-Te.y0;if(De(Ke,Te)){if(Te.source.column0?"up":"down"}function ht(Oe,ze){return A(Oe.source,ze)==A(Oe.target,ze)}function it(Oe,ze,ct){var et=Oe.nodes,qe=Oe.links,we=!1,Le=!1;if(qe.forEach(function(tt){tt.circularLinkType=="top"?we=!0:tt.circularLinkType=="bottom"&&(Le=!0)}),we==!1||Le==!1){var Ke=t.min(et,function(tt){return tt.y0}),Te=t.max(et,function(tt){return tt.y1}),Ve=Te-Ke,$e=ct-ze,ot=$e/Ve;et.forEach(function(tt){var nt=(tt.y1-tt.y0)*ot;tt.y0=(tt.y0-Ke)*ot,tt.y1=tt.y0+nt}),qe.forEach(function(tt){tt.y0=(tt.y0-Ke)*ot,tt.y1=(tt.y1-Ke)*ot,tt.width=tt.width*ot})}}e.sankeyCircular=E,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})}))});var kK=fe((cMr,DXe)=>{"use strict";DXe.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}});var YXe=fe((fMr,WXe)=>{"use strict";var RXe=xXe(),$rr=($2(),Gs(Z2)).interpolateNumber,I5=xi(),tS=SXe(),Krr=FXe(),ws=kK(),D1=ni(),Jrr=ea(),R1=Xt(),y_=R1.strTranslate,IXe=R1.strRotate,PK=L1(),rS=PK.keyFun,AD=PK.repeat,UXe=PK.unwrap,zXe=as(),Qrr=bi(),VXe=nc(),enr=VXe.CAP_SHIFT,tnr=VXe.LINE_SPACING,rnr=3;function nnr(e,t,r){var n=UXe(t),a=n.trace,i=a.domain,o=a.orientation==="h",s=a.direction==="reversed",l=a.node.pad,u=a.node.thickness,c={justify:tS.sankeyJustify,left:tS.sankeyLeft,right:tS.sankeyRight,center:tS.sankeyCenter}[a.node.align],f=e.width*(i.x[1]-i.x[0]),v=e.height*(i.y[1]-i.y[0]),g=n._nodes,p=n._links,x=n.circular,_;x?_=Krr.sankeyCircular().circularLinkGap(0):_=tS.sankey(),_.iterations(ws.sankeyIterations).size(o?[f,v]:[v,f]).nodeWidth(u).nodePadding(l).nodeId(function(V){return V.pointNumber}).nodeAlign(c).nodes(g).links(p);function y(V){a[V].sort==="input"&&(x?R1.warn(`Circular Sankey diagrams do not support the "input" ${V}.sort mode; falling back to the default sort.`):_[`${V}Sort`](null))}y("link"),y("node");var C=_();_.nodePadding()=J||(U=J-q.y0,U>1e-6&&(q.y0+=U,q.y1+=U)),J=q.y1+l})}function I(V){var j=V.map(function(xe,ue){return{x0:xe.x0,index:ue}}).sort(function(xe,ue){return xe.x0-ue.x0}),q=[],U=-1,J,ee=-1/0,ce;for(k=0;kee+u&&(U+=1,J=ye.x0),ee=ye.x0,q[U]||(q[U]=[]),q[U].push(ye),ce=J-ye.x0,ye.x0+=ce,ye.x1+=ce}return q}if(a.node.x.length&&a.node.y.length){for(k=0;k0?" L "+a.targetX+" "+a.targetY:"")+"Z"):(r="M "+(a.targetX-t)+" "+(a.targetY-n)+" L "+(a.rightInnerExtent-t)+" "+(a.targetY-n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 0 "+(a.rightFullExtent-n-t)+" "+(a.targetY+a.rightSmallArcRadius)+" L "+(a.rightFullExtent-n-t)+" "+a.verticalRightInnerExtent,i&&o?r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-n-t)+" "+(a.verticalFullExtent+n)+" L "+(a.rightFullExtent+n-t-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent+n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent:i?r+=" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightFullExtent-t-n-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" L "+(a.leftFullExtent+n+(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent:r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-t)+" "+(a.verticalFullExtent+n)+" L "+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+" A "+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent,r+=" 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,i&&o?r+=" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" L "+(a.rightFullExtent+n-t+(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent:i?r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+(a.verticalFullExtent+n)+" L "+(a.rightFullExtent-t-n)+" "+(a.verticalFullExtent+n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent:r+=" A "+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+" L "+(a.rightInnerExtent-t)+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent,r+=" L "+(a.rightFullExtent+n-t)+" "+(a.targetY+a.rightSmallArcRadius)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightInnerExtent-t)+" "+(a.targetY+n)+" L "+(a.targetX-t)+" "+(a.targetY+n)+(t>0?" L "+a.targetX+" "+a.targetY:"")+"Z"),r}function FK(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return anr(r.link,n);var a=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>a&&(n=a);var i=r.link.source.x1,o=r.link.target.x0-n,s=$rr(i,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,v=r.link.y1-r.link.width/2,g=r.link.y1+r.link.width/2,p="M"+i+","+c,x="C"+l+","+c+" "+u+","+v+" "+o+","+v,_="C"+u+","+g+" "+l+","+f+" "+i+","+f,y=n>0?"L"+(o+n)+","+(v+r.link.width/2):"";return y+="L"+o+","+g,p+x+y+_+"Z"}return t}function onr(e,t){var r=ws.nodePadAcross,n=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,i=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=R1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:i,zoneX:-r,zoneY:-n,zoneWidth:a+2*r,zoneHeight:i+2*n,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,reversed:e.reversed,rgb:D1.rgb(t.color),alpha:D1.parse(t.color).alpha,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function LK(e){e.attr("transform",function(t){return y_(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function snr(e){e.call(LK)}function GXe(e,t){e.call(snr),t.attr("d",FK())}function qXe(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function CK(e){return e.link.width>1||e.linkLineWidth>0}function BXe(e){return e.horizontal?e.reversed?y_(e.translateX+e.width,e.translateY)+"matrix(-1 0 0 1 0 0)":y_(e.translateX,e.translateY)+"matrix(1 0 0 1 0 0)":e.reversed?y_(e.translateX,e.translateY+e.height)+"matrix(0 -1 1 0 0 0)":y_(e.translateX,e.translateY)+"matrix(0 1 1 0 0 0)"}function OXe(e,t,r){e.on(".basic",null).on("mouseover.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on("mousemove.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on("mouseout.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on("click.basic",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function lnr(e,t,r,n){var a=I5.behavior.drag().origin(function(i){return{x:i.node.x0+i.visibleWidth/2,y:i.node.y0+i.visibleHeight/2}}).on("dragstart",function(i){if(i.arrangement!=="fixed"&&(R1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),R1.raiseToTop(this),i.interactionState.dragInProgress=i.node,NXe(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),i.arrangement==="snap")){var o=i.traceId+"|"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):unr(e,o,i,n),cnr(e,t,i,o,n)}}).on("drag",function(i){if(i.arrangement!=="fixed"){var o=I5.event.x,s=I5.event.y;i.arrangement==="snap"?(i.node.x0=o-i.visibleWidth/2,i.node.x1=o+i.visibleWidth/2,i.node.y0=s-i.visibleHeight/2,i.node.y1=s+i.visibleHeight/2):(i.arrangement==="freeform"&&(i.node.x0=o-i.visibleWidth/2,i.node.x1=o+i.visibleWidth/2),s=Math.max(0,Math.min(i.size-i.visibleHeight/2,s)),i.node.y0=s-i.visibleHeight/2,i.node.y1=s+i.visibleHeight/2),NXe(i.node),i.arrangement!=="snap"&&(i.sankey.update(i.graph),GXe(e.filter(jXe(i)),t))}}).on("dragend",function(i){if(i.arrangement!=="fixed"){i.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(i);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,HXe(r,a)}})}function fnr(e,t,r,n){return function(){for(var i=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function HXe(e,t){for(var r=[],n=[],a=0;aCK(_)?D1.rgb(_.linkLineColor):_.rgb).style("stroke-opacity",_=>CK(_)?D1.opacity(_.linkLineColor):_.alpha).style("fill",_=>_.rgb).style("fill-opacity",_=>_.alpha).style("stroke-width",_=>CK(_)?_.linkLineWidth:1).attr("d",FK()),f.style("opacity",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(ws.ease).duration(ws.duration).style("opacity",1),f.exit().transition().ease(ws.ease).duration(ws.duration).style("opacity",0).remove();var v=u.selectAll("."+ws.cn.sankeyNodeSet).data(AD,rS);v.enter().append("g").classed(ws.cn.sankeyNodeSet,!0),v.style("cursor",function(_){switch(_.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var g=v.selectAll("."+ws.cn.sankeyNode).data(function(_){var y=_.graph.nodes;return hnr(y),y.map(onr.bind(null,_))},rS);g.enter().append("g").classed(ws.cn.sankeyNode,!0).call(LK).style("opacity",function(_){return(e._context.staticPlot||o)&&!_.partOfGroup?1:0}),g.call(OXe,u,a.nodeEvents).call(lnr,f,a,e),g.transition().ease(ws.ease).duration(ws.duration).call(LK).style("opacity",function(_){return _.partOfGroup?0:1}),g.exit().transition().ease(ws.ease).duration(ws.duration).style("opacity",0).remove();var p=g.selectAll("."+ws.cn.nodeRect).data(AD);p.enter().append("rect").classed(ws.cn.nodeRect,!0).call(qXe),p.style("stroke-width",function(_){return _.nodeLineWidth}).style("stroke",function(_){return D1.rgb(_.nodeLineColor)}).style("stroke-opacity",function(_){return D1.opacity(_.nodeLineColor)}).style("fill",_=>_.rgb).style("fill-opacity",_=>_.alpha),p.transition().ease(ws.ease).duration(ws.duration).call(qXe);var x=g.selectAll("."+ws.cn.nodeLabel).data(AD);x.enter().append("text").classed(ws.cn.nodeLabel,!0).style("cursor","default"),x.attr("data-notex",1).text(function(_){return _.node.label}).each(function(_){var y=I5.select(this);Jrr.font(y,_.textFont),zXe.convertToTspans(y,e)}).attr("text-anchor",function(_){return _.horizontal&&_.left!==_.reversed?"end":"start"}).attr("transform",function(_){var y=I5.select(this),C=zXe.lineCount(y),k=_.textFont.size*((C-1)*tnr-enr),S=_.nodeLineWidth/2+rnr;if(!_.horizontal){var A=_.reversed?(_.visibleWidth+k)/2:(_.visibleWidth-k)/2,L=_.reversed?IXe(90):"scale(-1,1)"+IXe(90);return y_(A,S)+L}var w=S,A=(_.visibleHeight-k)/2;return _.left?w=-w:w+=_.visibleWidth,y_(w,A)+(_.reversed?"scale(-1,1)":"")}),x.transition().ease(ws.ease).duration(ws.duration)}});var IK=fe((hMr,rZe)=>{"use strict";var fd=xi(),RK=Xt(),MD=RK.numberFormat,pnr=YXe(),z5=kl(),gnr=ni(),Ny=kK().cn,nS=RK._;function XXe(e){return e!==""}function q5(e,t){return e.filter(function(r){return r.key===t.traceId})}function ZXe(e,t){fd.select(e).select("path").style("fill-opacity",t),fd.select(e).select("rect").style("fill-opacity",t)}function $Xe(e){fd.select(e).select("text.name").style("fill","black")}function KXe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function JXe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function QXe(e,t,r){t&&r&&q5(r,t).selectAll("."+Ny.sankeyLink).filter(KXe(t)).call(eZe.bind(0,t,r,!1))}function DK(e,t,r){t&&r&&q5(r,t).selectAll("."+Ny.sankeyLink).filter(KXe(t)).call(tZe.bind(0,t,r,!1))}function eZe(e,t,r,n){n.style("fill",function(a){if(!a.link.concentrationscale)return a.hoverRgb}).style("fill-opacity",function(a){if(!a.link.concentrationscale)return a.hoverAlpha}),n.each(function(a){var i=a.link.label;i!==""&&q5(t,e).selectAll("."+Ny.sankeyLink).filter(function(o){return o.link.label===i}).style("fill",function(o){if(!o.link.concentrationscale)return o.hoverRgb}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.hoverAlpha})}),r&&q5(t,e).selectAll("."+Ny.sankeyNode).filter(JXe(e)).call(QXe)}function tZe(e,t,r,n){n.style("fill",function(a){return a.rgb}).style("fill-opacity",function(a){return a.alpha}),n.each(function(a){var i=a.link.label;i!==""&&q5(t,e).selectAll("."+Ny.sankeyLink).filter(function(o){return o.link.label===i}).style("fill",o=>o.rgb).style("fill-opacity",o=>o.alpha)}),r&&q5(t,e).selectAll(Ny.sankeyNode).filter(JXe(e)).call(DK)}function Vl(e,t){var r=e.hoverlabel||{},n=RK.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}rZe.exports=function(t,r){for(var n=t._fullLayout,a=n._paper,i=n._size,o=0;o"),color:Vl(A,"bgcolor")||gnr.addOpacity(I.color,1),borderColor:Vl(A,"bordercolor"),fontFamily:Vl(A,"font.family"),fontSize:Vl(A,"font.size"),fontColor:Vl(A,"font.color"),fontWeight:Vl(A,"font.weight"),fontStyle:Vl(A,"font.style"),fontVariant:Vl(A,"font.variant"),fontTextcase:Vl(A,"font.textcase"),fontLineposition:Vl(A,"font.lineposition"),fontShadow:Vl(A,"font.shadow"),nameLength:Vl(A,"namelength"),textAlign:Vl(A,"align"),idealAlign:fd.event.x"),color:Vl(A,"bgcolor")||w.rgb,borderColor:Vl(A,"bordercolor"),fontFamily:Vl(A,"font.family"),fontSize:Vl(A,"font.size"),fontColor:Vl(A,"font.color"),fontWeight:Vl(A,"font.weight"),fontStyle:Vl(A,"font.style"),fontVariant:Vl(A,"font.variant"),fontTextcase:Vl(A,"font.textcase"),fontLineposition:Vl(A,"font.lineposition"),fontShadow:Vl(A,"font.shadow"),nameLength:Vl(A,"namelength"),textAlign:Vl(A,"align"),idealAlign:"left",hovertemplate:A.hovertemplate,hovertemplateLabels:B,eventData:[w.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});ZXe(j,.85),$Xe(j)}}},S=function(L,w,A){t._fullLayout.hovermode!==!1&&(fd.select(L).call(DK,w,A),w.node.trace.node.hoverinfo!=="skip"&&(w.node.fullData=w.node.trace,t.emit("plotly_unhover",{event:fd.event,points:[w.node]})),z5.loneUnhover(n._hoverlayer.node()))};pnr(t,a,r,{width:i.w,height:i.h,margin:{t:i.t,r:i.r,b:i.b,l:i.l}},{linkEvents:{hover:u,follow:x,unhover:_,select:l},nodeEvents:{hover:C,follow:k,unhover:S,select:y}})}});var nZe=fe(x_=>{"use strict";var mnr=rl().overrideAll,ynr=jf().getModuleCalcData,xnr=IK(),_nr=tm(),bnr=np(),wnr=ed(),Tnr=Ac().prepSelect,zK=Xt(),Anr=bi(),SD="sankey";x_.name=SD;x_.baseLayoutAttrOverrides=mnr({hoverlabel:_nr.hoverlabel},"plot","nested");x_.plot=function(e){var t=ynr(e.calcdata,SD)[0];xnr(e,t),x_.updateFx(e)};x_.clean=function(e,t,r,n){var a=n._has&&n._has(SD),i=t._has&&t._has(SD);a&&!i&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};x_.updateFx=function(e){for(var t=0;t{"use strict";iZe.exports=function(t,r){for(var n=t.cd,a=[],i=n[0].trace,o=i._sankey,s=o.graph.nodes,l=i.orientation==="v",u=i.direction==="reversed",c=0;c{"use strict";oZe.exports={attributes:AK(),supplyDefaults:aXe(),calc:cXe(),plot:IK(),moduleType:"trace",name:"sankey",basePlotModule:nZe(),selectPoints:aZe(),categories:["noOpacity"],meta:{}}});var uZe=fe((gMr,lZe)=>{"use strict";lZe.exports=sZe()});var fZe=fe(B5=>{"use strict";var cZe=Hs();B5.name="indicator";B5.plot=function(e,t,r,n){cZe.plotBasePlot(B5.name,e,t,r,n)};B5.clean=function(e,t,r,n){cZe.cleanBasePlot(B5.name,e,t,r,n)}});var BK=fe((yMr,mZe)=>{"use strict";var Uy=ta().extendFlat,dZe=ta().extendDeep,Snr=rl().overrideAll,vZe=Ds(),pZe=tc(),Enr=nl().attributes,au=pf(),knr=Mo().templatedArray,ED=tw(),hZe=pl().descriptionOnlyNumbers,qK=vZe({editType:"plot",colorEditType:"plot"}),iS={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:pZe.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},gZe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},Cnr=knr("step",dZe({},iS,{range:gZe}));mZe.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:Enr({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Uy({},qK,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:hZe("value")},font:Uy({},qK,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:hZe("value")},increasing:{symbol:{valType:"string",dflt:ED.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:ED.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:ED.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:ED.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Uy({},qK,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:dZe({},iS,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:pZe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:Snr({range:gZe,visible:Uy({},au.visible,{dflt:!0}),tickmode:au.minor.tickmode,nticks:au.nticks,tick0:au.tick0,dtick:au.dtick,tickvals:au.tickvals,ticktext:au.ticktext,ticks:Uy({},au.ticks,{dflt:"outside"}),ticklen:au.ticklen,tickwidth:au.tickwidth,tickcolor:au.tickcolor,ticklabelstep:au.ticklabelstep,showticklabels:au.showticklabels,labelalias:au.labelalias,tickfont:vZe({}),tickangle:au.tickangle,tickformat:au.tickformat,tickformatstops:au.tickformatstops,tickprefix:au.tickprefix,showtickprefix:au.showtickprefix,ticksuffix:au.ticksuffix,showticksuffix:au.showticksuffix,separatethousands:au.separatethousands,exponentformat:au.exponentformat,minexponent:au.minexponent,showexponent:au.showexponent,editType:"plot"},"plot"),steps:Cnr,threshold:{line:{color:Uy({},iS.line.color,{}),width:Uy({},iS.line.width,{dflt:1}),editType:"plot"},thickness:Uy({},iS.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var OK=fe((xMr,yZe)=>{"use strict";yZe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var bZe=fe((_Mr,_Ze)=>{"use strict";var I1=Xt(),CD=BK(),Lnr=nl().defaults,xZe=Mo(),Pnr=Ah(),kD=OK(),Fnr=Fx(),Dnr=Ub(),Rnr=gm(),Inr=mm();function znr(e,t,r,n){function a(w,A){return I1.coerce(e,t,CD,w,A)}Lnr(t,n,a),a("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var i=a("value");t._range=[0,typeof i=="number"?1.5*i:1];var o=new Array(2),s;if(t._hasNumber){a("number.valueformat");var l=I1.extendFlat({},n.font);l.size=void 0,I1.coerceFont(a,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=kD.defaultNumberFontSize,o[0]=!0),a("number.prefix"),a("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=I1.extendFlat({},n.font);c.size=void 0,I1.coerceFont(a,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||kD.defaultNumberFontSize),o[1]=!0),a("delta.reference",t.value),a("delta.relative"),a("delta.valueformat",t.delta.relative?"2%":""),a("delta.increasing.symbol"),a("delta.increasing.color"),a("delta.decreasing.symbol"),a("delta.decreasing.color"),a("delta.position"),a("delta.prefix"),a("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=I1.extendFlat({},n.font);f.size=.25*(s||u||kD.defaultNumberFontSize),I1.coerceFont(a,"title.font",f),a("title.text");var v,g,p,x;function _(w,A){return I1.coerce(v,g,CD.gauge,w,A)}function y(w,A){return I1.coerce(p,x,CD.gauge.axis,w,A)}if(t._hasGauge){v=e.gauge,v||(v={}),g=xZe.newContainer(t,"gauge"),_("shape");var C=t._isBullet=t.gauge.shape==="bullet";C||a("title.align","center");var k=t._isAngular=t.gauge.shape==="angular";k||a("align","center"),_("bgcolor",n.paper_bgcolor),_("borderwidth"),_("bordercolor"),_("bar.color"),_("bar.line.color"),_("bar.line.width");var S=kD.valueThickness*(t.gauge.shape==="bullet"?.5:1);_("bar.thickness",S),Pnr(v,g,{name:"steps",handleItemDefaults:qnr}),_("threshold.value"),_("threshold.thickness"),_("threshold.line.width"),_("threshold.line.color"),p={},v&&(p=v.axis||{}),x=xZe.newContainer(g,"axis"),y("visible"),t._range=y("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};Fnr(p,x,y,"linear"),Inr(p,x,y,"linear",L),Rnr(p,x,y,"linear",L),Dnr(p,x,y,L)}else a("title.align","center"),a("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function qnr(e,t){function r(n,a){return I1.coerce(e,t,CD.gauge.steps,n,a)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}_Ze.exports={supplyDefaults:znr}});var TZe=fe((bMr,wZe)=>{"use strict";function Bnr(e,t){var r=[],n=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var a=t._lastValue,i=a;return t._hasDelta&&typeof t.delta.reference=="number"&&(i=t.delta.reference),r[0]={y:n,lastY:a,delta:n-i,relativeDelta:(n-i)/i},r}wZe.exports={calc:Bnr}});var CZe=fe((wMr,kZe)=>{"use strict";var A_=xi(),Onr=($2(),Gs(Z2)).interpolate,AZe=($2(),Gs(Z2)).interpolateNumber,Vy=Xt(),Nnr=Vy.strScale,oS=Vy.strTranslate,Unr=Vy.rad2deg,Vnr=nc().MID_SHIFT,T_=ea(),__=OK(),PD=as(),ih=Yi(),Gnr=vA(),Hnr=gC(),jnr=pf(),O5=ni(),NK={left:"start",center:"middle",right:"end"},b_={left:0,center:.5,right:1},MZe=/[yzafpnµmkMGTPEZY]/;function sS(e){return e&&e.duration>0}kZe.exports=function(t,r,n,a){var i=t._fullLayout,o;sS(n)&&a&&(o=a()),Vy.makeTraceGroups(i._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=A_.select(this),f=u._hasGauge,v=u._isAngular,g=u._isBullet,p=u.domain,x={w:i._size.w*(p.x[1]-p.x[0]),h:i._size.h*(p.y[1]-p.y[0]),l:i._size.l+i._size.w*p.x[0],r:i._size.r+i._size.w*(1-p.x[1]),t:i._size.t+i._size.h*(1-p.y[1]),b:i._size.b+i._size.h*p.y[0]},_=x.l+x.w/2,y=x.t+x.h/2,C=Math.min(x.w/2,x.h),k=__.innerRadius*C,S,L,w,A=u.align||"center";if(L=y,!f)S=x.l+b_[A]*x.w,w=function(j){return SZe(j,x.w,x.h)};else if(v&&(S=_,L=y+C/2,w=function(j){return $nr(j,.9*k)}),g){var T=__.bulletPadding,m=1-__.bulletNumberDomainSize+T;S=x.l+(m+(1-m)*b_[A])*x.w,w=function(j){return SZe(j,(__.bulletNumberDomainSize-T)*x.w,x.h)}}Xnr(t,c,s,{numbersX:S,numbersY:L,numbersScaler:w,transitionOpts:n,onComplete:o});var F,E;f&&(F={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},E={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var I=c.selectAll("g.angular").data(v?s:[]);I.exit().remove();var R=c.selectAll("g.angularaxis").data(v?s:[]);R.exit().remove(),v&&Ynr(t,c,s,{radius:C,innerRadius:k,gauge:I,layer:R,size:x,gaugeBg:F,gaugeOutline:E,transitionOpts:n,onComplete:o});var B=c.selectAll("g.bullet").data(g?s:[]);B.exit().remove();var O=c.selectAll("g.bulletaxis").data(g?s:[]);O.exit().remove(),g&&Wnr(t,c,s,{gauge:B,layer:O,size:x,gaugeBg:F,gaugeOutline:E,transitionOpts:n,onComplete:o});var V=c.selectAll("text.title").data(s);V.exit().remove(),V.enter().append("text").classed("title",!0),V.attr("text-anchor",function(){return g?NK.right:NK[u.title.align]}).text(u.title.text).call(T_.font,u.title.font).call(PD.convertToTspans,t),V.attr("transform",function(){var j=x.l+x.w*b_[u.title.align],q,U=__.titlePadding,J=T_.bBox(V.node());if(f){if(v)if(u.gauge.axis.visible){var ee=T_.bBox(R.node());q=ee.top-U-J.bottom}else q=x.t+x.h/2-C/2-J.bottom-U;g&&(q=L-(J.top+J.bottom)/2,j=x.l-__.bulletPadding*x.w)}else q=u._numbersTop-U-J.bottom;return oS(j,q)})})};function Wnr(e,t,r,n){var a=r[0].trace,i=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=a.domain,f=n.transitionOpts,v=n.onComplete,g,p,x,_,y;i.enter().append("g").classed("bullet",!0),i.attr("transform",oS(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var C=u.h,k=a.gauge.bar.thickness*C,S=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(a._hasNumber||a._hasDelta?1-__.bulletNumberDomainSize:1);g=aS(e,a.gauge.axis),g._id="xbulletaxis",g.domain=[S,L],g.setScale(),p=ih.calcTicks(g),x=ih.makeTransTickFn(g),_=ih.getTickSigns(g)[2],y=u.t+u.h,g.visible&&(ih.drawTicks(e,g,{vals:g.ticks==="inside"?ih.clipEnds(g,p):p,layer:o,path:ih.makeTickPath(g,y,_),transFn:x}),ih.drawLabels(e,g,{vals:p,layer:o,transFn:x,labelFns:ih.makeLabelFns(g,y)}));function w(R){R.attr("width",function(B){return Math.max(0,g.c2p(B.range[1])-g.c2p(B.range[0]))}).attr("x",function(B){return g.c2p(B.range[0])}).attr("y",function(B){return .5*(1-B.thickness)*C}).attr("height",function(B){return B.thickness*C})}var A=[s].concat(a.gauge.steps),T=i.selectAll("g.bg-bullet").data(A);T.enter().append("g").classed("bg-bullet",!0).append("rect"),T.select("rect").call(w).call(w_),T.exit().remove();var m=i.selectAll("g.value-bullet").data([a.gauge.bar]);m.enter().append("g").classed("value-bullet",!0).append("rect"),m.select("rect").attr("height",k).attr("y",(C-k)/2).call(w_),sS(f)?m.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attr("width",Math.max(0,g.c2p(Math.min(a.gauge.axis.range[1],r[0].y)))):m.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,g.c2p(Math.min(a.gauge.axis.range[1],r[0].y))):0),m.exit().remove();var F=r.filter(function(){return a.gauge.threshold.value||a.gauge.threshold.value===0}),E=i.selectAll("g.threshold-bullet").data(F);E.enter().append("g").classed("threshold-bullet",!0).append("line"),E.select("line").attr("x1",g.c2p(a.gauge.threshold.value)).attr("x2",g.c2p(a.gauge.threshold.value)).attr("y1",(1-a.gauge.threshold.thickness)/2*C).attr("y2",(1-(1-a.gauge.threshold.thickness)/2)*C).call(O5.stroke,a.gauge.threshold.line.color).style("stroke-width",a.gauge.threshold.line.width),E.exit().remove();var I=i.selectAll("g.gauge-outline").data([l]);I.enter().append("g").classed("gauge-outline",!0).append("rect"),I.select("rect").call(w).call(w_),I.exit().remove()}function Ynr(e,t,r,n){var a=r[0].trace,i=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[i.l+i.w/2,i.t+i.h/2+o/2],f=n.gauge,v=n.layer,g=n.transitionOpts,p=n.onComplete,x=Math.PI/2;function _(ce){var ye=a.gauge.axis.range[0],xe=a.gauge.axis.range[1],ue=(ce-ye)/(xe-ye)*Math.PI-x;return ue<-x?-x:ue>x?x:ue}function y(ce){return A_.svg.arc().innerRadius((s+o)/2-ce/2*(o-s)).outerRadius((s+o)/2+ce/2*(o-s)).startAngle(-x)}function C(ce){ce.attr("d",function(ye){return y(ye.thickness).startAngle(_(ye.range[0])).endAngle(_(ye.range[1]))()})}var k,S,L,w;f.enter().append("g").classed("angular",!0),f.attr("transform",oS(c[0],c[1])),v.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),v.selectAll("g.xangularaxistick,path,text").remove(),k=aS(e,a.gauge.axis),k.type="linear",k.range=a.gauge.axis.range,k._id="xangularaxis",k.ticklabeloverflow="allow",k.setScale();var A=function(ce){return(k.range[0]-ce.x)/(k.range[1]-k.range[0])*Math.PI+Math.PI},T={},m=ih.makeLabelFns(k,0),F=m.labelStandoff;T.xFn=function(ce){var ye=A(ce);return Math.cos(ye)*F},T.yFn=function(ce){var ye=A(ce),xe=Math.sin(ye)>0?.2:1;return-Math.sin(ye)*(F+ce.fontSize*xe)+Math.abs(Math.cos(ye))*(ce.fontSize*Vnr)},T.anchorFn=function(ce){var ye=A(ce),xe=Math.cos(ye);return Math.abs(xe)<.1?"middle":xe>0?"start":"end"},T.heightFn=function(ce,ye,xe){var ue=A(ce);return-.5*(1+Math.sin(ue))*xe};var E=function(ce){return oS(c[0]+o*Math.cos(ce),c[1]-o*Math.sin(ce))};L=function(ce){return E(A(ce))};var I=function(ce){var ye=A(ce);return E(ye)+"rotate("+-Unr(ye)+")"};if(S=ih.calcTicks(k),w=ih.getTickSigns(k)[2],k.visible){w=k.ticks==="inside"?-1:1;var R=(k.linewidth||1)/2;ih.drawTicks(e,k,{vals:S,layer:v,path:"M"+w*R+",0h"+w*k.ticklen,transFn:I}),ih.drawLabels(e,k,{vals:S,layer:v,transFn:L,labelFns:T})}var B=[l].concat(a.gauge.steps),O=f.selectAll("g.bg-arc").data(B);O.enter().append("g").classed("bg-arc",!0).append("path"),O.select("path").call(C).call(w_),O.exit().remove();var V=y(a.gauge.bar.thickness),j=f.selectAll("g.value-arc").data([a.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var q=j.select("path");sS(g)?(q.transition().duration(g.duration).ease(g.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",Znr(V,_(r[0].lastY),_(r[0].y))),a._lastValue=r[0].y):q.attr("d",typeof r[0].y=="number"?V.endAngle(_(r[0].y)):"M0,0Z"),q.call(w_),j.exit().remove(),B=[];var U=a.gauge.threshold.value;(U||U===0)&&B.push({range:[U,U],color:a.gauge.threshold.color,line:{color:a.gauge.threshold.line.color,width:a.gauge.threshold.line.width},thickness:a.gauge.threshold.thickness});var J=f.selectAll("g.threshold-arc").data(B);J.enter().append("g").classed("threshold-arc",!0).append("path"),J.select("path").call(C).call(w_),J.exit().remove();var ee=f.selectAll("g.gauge-outline").data([u]);ee.enter().append("g").classed("gauge-outline",!0).append("path"),ee.select("path").call(C).call(w_),ee.exit().remove()}function Xnr(e,t,r,n){var a=r[0].trace,i=n.numbersX,o=n.numbersY,s=a.align||"center",l=NK[s],u=n.transitionOpts,c=n.onComplete,f=Vy.ensureSingle(t,"g","numbers"),v,g,p,x=[];a._hasNumber&&x.push("number"),a._hasDelta&&(x.push("delta"),a.delta.position==="left"&&x.reverse());var _=f.selectAll("text").data(x);_.enter().append("text"),_.attr("text-anchor",function(){return l}).attr("class",function(E){return E}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),_.exit().remove();function y(E,I,R,B){if(E.match("s")&&R>=0!=B>=0&&!I(R).slice(-1).match(MZe)&&!I(B).slice(-1).match(MZe)){var O=E.slice().replace("s","f").replace(/\d+/,function(j){return parseInt(j)-1}),V=aS(e,{tickformat:O});return function(j){return Math.abs(j)<1?ih.tickText(V,j).text:I(j)}}else return I}function C(){var E=aS(e,{tickformat:a.number.valueformat},a._range);E.setScale(),ih.prepTicks(E);var I=function(j){return ih.tickText(E,j).text},R=a.number.suffix,B=a.number.prefix,O=f.select("text.number");function V(){var j=typeof r[0].y=="number"?B+I(r[0].y)+R:"-";O.text(j).call(T_.font,a.number.font).call(PD.convertToTspans,e)}return sS(u)?O.transition().duration(u.duration).ease(u.easing).each("end",function(){V(),c&&c()}).each("interrupt",function(){V(),c&&c()}).attrTween("text",function(){var j=A_.select(this),q=AZe(r[0].lastY,r[0].y);a._lastValue=r[0].y;var U=y(a.number.valueformat,I,r[0].lastY,r[0].y);return function(J){j.text(B+U(q(J))+R)}}):V(),v=EZe(B+I(r[0].y)+R,a.number.font,l,e),O}function k(){var E=aS(e,{tickformat:a.delta.valueformat},a._range);E.setScale(),ih.prepTicks(E);var I=function(J){return ih.tickText(E,J).text},R=a.delta.suffix,B=a.delta.prefix,O=function(J){var ee=a.delta.relative?J.relativeDelta:J.delta;return ee},V=function(J,ee){return J===0||typeof J!="number"||isNaN(J)?"-":(J>0?a.delta.increasing.symbol:a.delta.decreasing.symbol)+B+ee(J)+R},j=function(J){return J.delta>=0?a.delta.increasing.color:a.delta.decreasing.color};a._deltaLastValue===void 0&&(a._deltaLastValue=O(r[0]));var q=f.select("text.delta");q.call(T_.font,a.delta.font).call(O5.fill,j({delta:a._deltaLastValue}));function U(){q.text(V(O(r[0]),I)).call(O5.fill,j(r[0])).call(PD.convertToTspans,e)}return sS(u)?q.transition().duration(u.duration).ease(u.easing).tween("text",function(){var J=A_.select(this),ee=O(r[0]),ce=a._deltaLastValue,ye=y(a.delta.valueformat,I,ce,ee),xe=AZe(ce,ee);return a._deltaLastValue=ee,function(ue){J.text(V(xe(ue),ye)),J.call(O5.fill,j({delta:xe(ue)}))}}).each("end",function(){U(),c&&c()}).each("interrupt",function(){U(),c&&c()}):U(),g=EZe(V(O(r[0]),I),a.delta.font,l,e),q}var S=a.mode+a.align,L;if(a._hasDelta&&(L=k(),S+=a.delta.position+a.delta.font.size+a.delta.font.family+a.delta.valueformat,S+=a.delta.increasing.symbol+a.delta.decreasing.symbol,p=g),a._hasNumber&&(C(),S+=a.number.font.size+a.number.font.family+a.number.valueformat+a.number.suffix+a.number.prefix,p=v),a._hasDelta&&a._hasNumber){var w=[(v.left+v.right)/2,(v.top+v.bottom)/2],A=[(g.left+g.right)/2,(g.top+g.bottom)/2],T,m,F=.75*a.delta.font.size;a.delta.position==="left"&&(T=LD(a,"deltaPos",0,-1*(v.width*b_[a.align]+g.width*(1-b_[a.align])+F),S,Math.min),m=w[1]-A[1],p={width:v.width+g.width+F,height:Math.max(v.height,g.height),left:g.left+T,right:v.right,top:Math.min(v.top,g.top+m),bottom:Math.max(v.bottom,g.bottom+m)}),a.delta.position==="right"&&(T=LD(a,"deltaPos",0,v.width*(1-b_[a.align])+g.width*b_[a.align]+F,S,Math.max),m=w[1]-A[1],p={width:v.width+g.width+F,height:Math.max(v.height,g.height),left:v.left,right:g.right+T,top:Math.min(v.top,g.top+m),bottom:Math.max(v.bottom,g.bottom+m)}),a.delta.position==="bottom"&&(T=null,m=g.height,p={width:Math.max(v.width,g.width),height:v.height+g.height,left:Math.min(v.left,g.left),right:Math.max(v.right,g.right),top:v.bottom-v.height,bottom:v.bottom+g.height}),a.delta.position==="top"&&(T=null,m=v.top,p={width:Math.max(v.width,g.width),height:v.height+g.height,left:Math.min(v.left,g.left),right:Math.max(v.right,g.right),top:v.bottom-v.height-g.height,bottom:v.bottom}),L.attr({dx:T,dy:m})}(a._hasNumber||a._hasDelta)&&f.attr("transform",function(){var E=n.numbersScaler(p);S+=E[2];var I=LD(a,"numbersScale",1,E[0],S,Math.min),R;a._scaleNumbers||(I=1),a._isAngular?R=o-I*p.bottom:R=o-I*(p.top+p.bottom)/2,a._numbersTop=I*p.top+R;var B=p[s];s==="center"&&(B=(p.left+p.right)/2);var O=i-I*B;return O=LD(a,"numbersTranslate",0,O,S,Math.max),oS(O,R)+Nnr(I)})}function w_(e){e.each(function(t){O5.stroke(A_.select(this),t.line.color)}).each(function(t){O5.fill(A_.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function Znr(e,t,r){return function(){var n=Onr(t,r);return function(a){return e.endAngle(n(a))()}}}function aS(e,t,r){var n=e._fullLayout,a=Vy.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),i={type:"linear",_id:"x"+t._id},o={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return Vy.coerce(a,i,jnr,l,u)}return Gnr(a,i,s,o,n),Hnr(a,i,s,o),i}function SZe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function $nr(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function EZe(e,t,r,n){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),i=A_.select(a);return i.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(PD.convertToTspans,n).call(T_.font,t),T_.bBox(i.node())}function LD(e,t,r,n,a,i){var o="_cache"+t;e[o]&&e[o].key===a||(e[o]={key:a,value:r});var s=Vy.aggNums(i,null,[e[o].value,n],2);return e[o].value=s,s}});var PZe=fe((TMr,LZe)=>{"use strict";LZe.exports={moduleType:"trace",name:"indicator",basePlotModule:fZe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:BK(),supplyDefaults:bZe().supplyDefaults,calc:TZe().calc,plot:CZe(),meta:{}}});var DZe=fe((AMr,FZe)=>{"use strict";FZe.exports=PZe()});var UK=fe((SMr,qZe)=>{"use strict";var RZe=Fm(),FD=ta().extendFlat,Knr=rl().overrideAll,IZe=Ds(),Jnr=nl().attributes,zZe=pl().descriptionOnlyNumbers,MMr=qZe.exports=Knr({domain:Jnr({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:zZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:FD({},RZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:FD({},IZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:zZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:FD({},RZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:FD({},IZe({arrayOk:!0}))}},"calc","from-root")});var OZe=fe((EMr,BZe)=>{"use strict";var VK=Xt(),Qnr=UK(),eir=nl().defaults;function tir(e,t){for(var r=e.columnorder||[],n=e.header.values.length,a=r.slice(0,n),i=a.slice().sort(function(l,u){return l-u}),o=a.map(function(l){return i.indexOf(l)}),s=o.length;s{"use strict";var rir=L1().wrap;NZe.exports=function(){return rir({})}});var GK=fe((CMr,VZe)=>{"use strict";VZe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",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"}}});var KZe=fe((LMr,$Ze)=>{"use strict";var GZe=GK(),jK=ta().extendFlat,nir=aa(),iir=Gf().isTypedArray,DD=Gf().isArrayOrTypedArray;$Ze.exports=function(t,r){var n=HK(r.cells.values),a=function(m){return m.slice(r.header.values.length,m.length)},i=HK(r.header.values);i.length&&!i[0].length&&(i[0]=[""],i=HK(i));var o=i.concat(a(n).map(function(){return ZZe((i[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[GZe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],v=c.reduce(HZe,0),g=u-v,p=g+GZe.uplift,x=YZe(f,p),_=YZe(c,v),y=WZe(_,[]),C=WZe(x,y),k={},S=r.columnorder;DD(S)&&(S=Array.from(S)),S=S.concat(a(n.map(function(m,F){return F})));var L=o.map(function(m,F){var E=DD(r.columnwidth)?r.columnwidth[Math.min(F,r.columnwidth.length-1)]:r.columnwidth;return nir(E)?Number(E):1}),w=L.reduce(HZe,0);L=L.map(function(m){return m/w*l});var A=Math.max(WK(r.header.line.width),WK(r.cells.line.width)),T={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:A,height:u,columnOrder:S,groupHeight:u,rowBlocks:C,headerRowBlocks:y,scrollY:0,cells:jK({},r.cells,{values:n}),headerCells:jK({},r.header,{values:o}),gdColumns:o.map(function(m){return m[0]}),gdColumnsOriginalOrder:o.map(function(m){return m[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(m,F){var E=k[m];k[m]=(E||0)+1;var I=m+"__"+k[m];return{key:I,label:m,specIndex:F,xIndex:S[F],xScale:jZe,x:void 0,calcdata:void 0,columnWidth:L[F]}})};return T.columns.forEach(function(m){m.calcdata=T,m.x=jZe(m)}),T};function WK(e){if(DD(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=XZe(),a+=i,s=u+1,i=0);return r}function XZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var JZe=fe(YK=>{"use strict";var RD=ta().extendFlat;YK.splitToPanels=function(e){var t=[0,0],r=RD({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:RD({},e.calcdata,{cells:e.calcdata.headerCells})}),n=RD({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),a=RD({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,a,r]};YK.splitToCells=function(e){var t=air(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var a=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:n+a,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function air(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var nJ=fe((FMr,u$e)=>{"use strict";var Ei=GK(),_l=xi(),XK=Xt(),oir=XK.numberFormat,Ts=L1(),ZK=ea(),sir=as(),lir=Xt().raiseToTop,Bv=Xt().strTranslate,uir=Xt().cancelTransition,cir=KZe(),a$e=JZe(),QZe=ni();u$e.exports=function(t,r){var n=!t._context.staticPlot,a=t._fullLayout._paper.selectAll("."+Ei.cn.table).data(r.map(function(C){var k=Ts.unwrap(C),S=k.trace;return cir(t,S)}),Ts.keyFun);a.exit().remove(),a.enter().append("g").classed(Ei.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),a.attr("width",function(C){return C.width+C.size.l+C.size.r}).attr("height",function(C){return C.height+C.size.t+C.size.b}).attr("transform",function(C){return Bv(C.translateX,C.translateY)});var i=a.selectAll("."+Ei.cn.tableControlView).data(Ts.repeat,Ts.keyFun),o=i.enter().append("g").classed(Ei.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(C){i.filter(function(k){return C===k}).call(lS,t)}).on(s,function(C){if(!C.scrollbarState.wheeling){C.scrollbarState.wheeling=!0;var k=C.scrollY+_l.event.deltaY,S=zD(t,i,null,k)(C);S||(_l.event.stopPropagation(),_l.event.preventDefault()),C.scrollbarState.wheeling=!1}}).call(lS,t,!0)}i.attr("transform",function(C){return Bv(C.size.l,C.size.t)});var l=i.selectAll("."+Ei.cn.scrollBackground).data(Ts.repeat,Ts.keyFun);l.enter().append("rect").classed(Ei.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(C){return C.width}).attr("height",function(C){return C.height}),i.each(function(C){ZK.setClipUrl(_l.select(this),e$e(t,C),t)});var u=i.selectAll("."+Ei.cn.yColumn).data(function(C){return C.columns},Ts.keyFun);u.enter().append("g").classed(Ei.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(C){return Bv(C.x,0)}),n&&u.call(_l.behavior.drag().origin(function(C){var k=_l.select(this);return n$e(k,C,-Ei.uplift),lir(this),C.calcdata.columnDragInProgress=!0,lS(i.filter(function(S){return C.calcdata.key===S.key}),t),C}).on("drag",function(C){var k=_l.select(this),S=function(A){return(C===A?_l.event.x:A.x)+A.columnWidth/2};C.x=Math.max(-Ei.overdrag,Math.min(C.calcdata.width+Ei.overdrag-C.columnWidth,_l.event.x));var L=o$e(u).filter(function(A){return A.calcdata.key===C.calcdata.key}),w=L.sort(function(A,T){return S(A)-S(T)});w.forEach(function(A,T){A.xIndex=T,A.x=C===A?A.x:A.xScale(A)}),u.filter(function(A){return C!==A}).transition().ease(Ei.transitionEase).duration(Ei.transitionDuration).attr("transform",function(A){return Bv(A.x,0)}),k.call(uir).attr("transform",Bv(C.x,-Ei.uplift))}).on("dragend",function(C){var k=_l.select(this),S=C.calcdata;C.x=C.xScale(C),C.calcdata.columnDragInProgress=!1,n$e(k,C,0),_ir(t,S,S.columns.map(function(L){return L.xIndex}))})),u.each(function(C){ZK.setClipUrl(_l.select(this),t$e(t,C),t)});var c=u.selectAll("."+Ei.cn.columnBlock).data(a$e.splitToPanels,Ts.keyFun);c.enter().append("g").classed(Ei.cn.columnBlock,!0).attr("id",function(C){return C.key}),c.style("cursor",function(C){return C.dragHandle?"ew-resize":C.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(bir),v=c.filter(eJ);n&&v.call(_l.behavior.drag().origin(function(C){return _l.event.stopPropagation(),C}).on("drag",zD(t,i,-1)).on("dragend",function(){})),$K(t,i,f,c),$K(t,i,v,c);var g=i.selectAll("."+Ei.cn.scrollAreaClip).data(Ts.repeat,Ts.keyFun);g.enter().append("clipPath").classed(Ei.cn.scrollAreaClip,!0).attr("id",function(C){return e$e(t,C)});var p=g.selectAll("."+Ei.cn.scrollAreaClipRect).data(Ts.repeat,Ts.keyFun);p.enter().append("rect").classed(Ei.cn.scrollAreaClipRect,!0).attr("x",-Ei.overdrag).attr("y",-Ei.uplift).attr("fill","none"),p.attr("width",function(C){return C.width+2*Ei.overdrag}).attr("height",function(C){return C.height+Ei.uplift});var x=u.selectAll("."+Ei.cn.columnBoundary).data(Ts.repeat,Ts.keyFun);x.enter().append("g").classed(Ei.cn.columnBoundary,!0);var _=u.selectAll("."+Ei.cn.columnBoundaryClippath).data(Ts.repeat,Ts.keyFun);_.enter().append("clipPath").classed(Ei.cn.columnBoundaryClippath,!0),_.attr("id",function(C){return t$e(t,C)});var y=_.selectAll("."+Ei.cn.columnBoundaryRect).data(Ts.repeat,Ts.keyFun);y.enter().append("rect").classed(Ei.cn.columnBoundaryRect,!0).attr("fill","none"),y.attr("width",function(C){return C.columnWidth+2*ID(C)}).attr("height",function(C){return C.calcdata.height+2*ID(C)+Ei.uplift}).attr("x",function(C){return-ID(C)}).attr("y",function(C){return-ID(C)}),tJ(null,v,i)};function ID(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function e$e(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function t$e(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function o$e(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function lS(e,t,r){function n(u){var c=u.rowBlocks;return JK(c,c.length-1)+(c.length?qD(c[c.length-1],1/0):1)}var a=e.selectAll("."+Ei.cn.scrollbarKit).data(Ts.repeat,Ts.keyFun);a.enter().append("g").classed(Ei.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-KK(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ei.goldenRatio*Ei.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ei.scrollbarWidth/2+Ei.scrollbarOffset;return Bv(c,KK(u))});var i=a.selectAll("."+Ei.cn.scrollbar).data(Ts.repeat,Ts.keyFun);i.enter().append("g").classed(Ei.cn.scrollbar,!0);var o=i.selectAll("."+Ei.cn.scrollbarSlider).data(Ts.repeat,Ts.keyFun);o.enter().append("g").classed(Ei.cn.scrollbarSlider,!0),o.attr("transform",function(u){return Bv(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ei.cn.scrollbarGlyph).data(Ts.repeat,Ts.keyFun);s.enter().append("line").classed(Ei.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ei.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ei.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ei.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ei.scrollbarHideDelay).duration(Ei.scrollbarHideDuration).attr("stroke-opacity",0);var l=i.selectAll("."+Ei.cn.scrollbarCaptureZone).data(Ts.repeat,Ts.keyFun);l.enter().append("line").classed(Ei.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ei.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=_l.event.y,f=this.getBoundingClientRect(),v=u.scrollbarState,g=c-f.top,p=_l.scale.linear().domain([0,v.scrollableAreaHeight]).range([0,v.totalHeight]).clamp(!0);v.topY<=g&&g<=v.bottomY||zD(t,e,null,p(g-v.barLength/2))(u)}).call(_l.behavior.drag().origin(function(u){return _l.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",zD(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function $K(e,t,r,n){var a=fir(r),i=hir(a);gir(i);var o=dir(i);yir(o);var s=pir(i),l=vir(s);mir(l),s$e(l,t,n,e),rJ(i)}function fir(e){var t=e.selectAll("."+Ei.cn.columnCells).data(Ts.repeat,Ts.keyFun);return t.enter().append("g").classed(Ei.cn.columnCells,!0),t.exit().remove(),t}function hir(e){var t=e.selectAll("."+Ei.cn.columnCell).data(a$e.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ei.cn.columnCell,!0),t.exit().remove(),t}function dir(e){var t=e.selectAll("."+Ei.cn.cellRect).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ei.cn.cellRect,!0),t}function vir(e){var t=e.selectAll("."+Ei.cn.cellText).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ei.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){_l.event.stopPropagation()}),t}function pir(e){var t=e.selectAll("."+Ei.cn.cellTextHolder).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ei.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function gir(e){e.each(function(t,r){var n=t.calcdata.cells.font,a=t.column.specIndex,i={size:hd(n.size,a,r),color:hd(n.color,a,r),family:hd(n.family,a,r),weight:hd(n.weight,a,r),style:hd(n.style,a,r),variant:hd(n.variant,a,r),textcase:hd(n.textcase,a,r),lineposition:hd(n.lineposition,a,r),shadow:hd(n.shadow,a,r)};t.rowNumber=t.key,t.align=hd(t.calcdata.cells.align,a,r),t.cellBorderWidth=hd(t.calcdata.cells.line.width,a,r),t.font=i})}function mir(e){e.each(function(t){ZK.font(_l.select(this),t.font)})}function yir(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=_l.select(this);QZe.stroke(r,hd(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),QZe.fill(r,hd(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function s$e(e,t,r,n){e.text(function(a){var i=a.column.specIndex,o=a.rowNumber,s=a.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;a.mayHaveMarkup=l&&s.match(/[<&>]/);var f=xir(s);a.latex=f;var v=f?"":hd(a.calcdata.cells.prefix,i,o)||"",g=f?"":hd(a.calcdata.cells.suffix,i,o)||"",p=f?null:hd(a.calcdata.cells.format,i,o)||null,x=v+(p?oir(p)(a.value):a.value)+g,_;a.wrappingNeeded=!a.wrapped&&!c&&!f&&(_=r$e(x)),a.cellHeightMayIncrease=u||f||a.mayHaveMarkup||(_===void 0?r$e(x):_),a.needsConvertToTspans=a.mayHaveMarkup||a.wrappingNeeded||a.latex;var y;if(a.wrappingNeeded){var C=Ei.wrapSplitCharacter===" "?x.replace(/a&&n.push(i),a+=l}return n}function tJ(e,t,r){var n=o$e(t)[0];if(n!==void 0){var a=n.rowBlocks,i=n.calcdata,o=JK(a,a.length),s=n.calcdata.groupHeight-KK(n),l=i.scrollY=Math.max(0,Math.min(o-s,i.scrollY)),u=wir(a,l,s);u.length===1&&(u[0]===a.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=JK(c.rowBlocks,c.page)-c.scrollY;return Bv(0,f)}),e&&(i$e(e,r,t,u,n.prevPages,n,0),i$e(e,r,t,u,n.prevPages,n,1),lS(r,e))}}function zD(e,t,r,n){return function(i){var o=i.calcdata?i.calcdata:i,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*_l.event.dy:n;var c=s.selectAll("."+Ei.cn.yColumn).selectAll("."+Ei.cn.columnBlock).filter(eJ);return tJ(e,c,s),o.scrollY===u}}function i$e(e,t,r,n,a,i,o){var s=n[o]!==a[o];s&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==a[c]});$K(e,t,l,r),a[o]=n[o]}))}function Tir(e,t,r,n){return function(){var i=_l.select(t.parentNode);i.each(function(o){var s=o.fragments;i.selectAll("tspan.line").each(function(x,_){s[_].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,v,g=0,p=o.column.columnWidth-2*Ei.cellPad;for(o.value="";u.length;)f=u.shift(),v=f.width+l,g+v>p&&(o.value+=c.join(Ei.wrapSpacer)+Ei.lineBreaker,c=[],g=0),c.push(f.text),g+=v;g&&(o.value+=c.join(Ei.wrapSpacer)),o.wrapped=!0}),i.selectAll("tspan.line").remove(),s$e(i.select("."+Ei.cn.cellText),r,e,n),_l.select(t.parentNode.parentNode).call(rJ)}}function Air(e,t,r,n,a){return function(){if(!a.settledY){var o=_l.select(t.parentNode),s=QK(a),l=a.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=a.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ei.cellPad:u,f=Math.max(c,u),v=f-s.rows[l].rowHeight;v&&(s.rows[l].rowHeight=f,e.selectAll("."+Ei.cn.columnCell).call(rJ),tJ(null,e.filter(eJ),0),lS(r,n,!0)),o.attr("transform",function(){var g=this,p=g.parentNode,x=p.getBoundingClientRect(),_=_l.select(g.parentNode).select("."+Ei.cn.cellRect).node().getBoundingClientRect(),y=g.transform.baseVal.consolidate(),C=_.top-x.top+(y?y.matrix.f:Ei.cellPad);return Bv(l$e(a,_l.select(g.parentNode).select("."+Ei.cn.cellTextHolder).node().getBoundingClientRect().width),C)}),a.settledY=!0}}}function l$e(e,t){switch(e.align){case"left":return Ei.cellPad;case"right":return e.column.columnWidth-(t||0)-Ei.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ei.cellPad}}function rJ(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+qD(s,1/0)},0),n=QK(t),a=qD(n,t.key),i=a+r;return Bv(0,i)}).selectAll("."+Ei.cn.cellRect).attr("height",function(t){return Sir(QK(t),t.key).rowHeight})}function JK(e,t){for(var r=0,n=t-1;n>=0;n--)r+=Mir(e[n]);return r}function qD(e,t){for(var r=0,n=0;n{"use strict";var Eir=jf().getModuleCalcData,kir=nJ(),BD="table";OD.name=BD;OD.plot=function(e){var t=Eir(e.calcdata,BD)[0];t.length&&kir(e,t)};OD.clean=function(e,t,r,n){var a=n._has&&n._has(BD),i=t._has&&t._has(BD);a&&!i&&n._paperdiv.selectAll(".table").remove()}});var h$e=fe((RMr,f$e)=>{"use strict";f$e.exports={attributes:UK(),supplyDefaults:OZe(),calc:UZe(),plot:nJ(),moduleType:"trace",name:"table",basePlotModule:c$e(),categories:["noOpacity"],meta:{}}});var v$e=fe((IMr,d$e)=>{"use strict";d$e.exports=h$e()});var x$e=fe((zMr,y$e)=>{"use strict";var p$e=Ds(),g$e=tc(),iJ=pf(),Cir=pl().descriptionWithDates,Lir=rl().overrideAll,m$e=Uc().dash,aJ=ta().extendFlat;y$e.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:p$e({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:iJ.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:aJ({},iJ.labelalias,{editType:"calc"}),tickfont:p$e({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:Cir("tick label")},tickformatstops:Lir(iJ.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:g$e.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:aJ({},m$e,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:aJ({},m$e,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:g$e.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var UD=fe((qMr,w$e)=>{"use strict";var Pir=Ds(),_$e=x$e(),b$e=tc(),ND=Pir({editType:"calc"}),Fir=Ol().zorder;ND.family.dflt='"Open Sans", verdana, arial, sans-serif';ND.size.dflt=12;ND.color.dflt=b$e.defaultLine;w$e.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:_$e,baxis:_$e,font:ND,color:{valType:"color",dflt:b$e.defaultLine,editType:"plot"},zorder:Fir}});var M$e=fe((BMr,A$e)=>{"use strict";var T$e=Xt().isArray1D;A$e.exports=function(t,r,n){var a=n("x"),i=a&&a.length,o=n("y"),s=o&&o.length;if(!i&&!s)return!1;if(r._cheater=!a,(!i||T$e(a))&&(!s||T$e(o))){var l=i?a.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var k$e=fe((OMr,E$e)=>{"use strict";var Dir=UD(),S$e=ni().addOpacity,Rir=bi(),uS=Xt(),Iir=Fx(),zir=gm(),qir=mm(),Bir=dC(),Oir=Hp(),Nir=Yb();E$e.exports=function(t,r,n){var a=n.letter,i=n.font||{},o=Dir[a+"axis"];function s(m,F){return uS.coerce(t,r,o,m,F)}function l(m,F){return uS.coerce2(t,r,o,m,F)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&Uir(r,n.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",a+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=a,u==="date"){var c=Rir.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}Oir(r,n.fullLayout),r.c2p=uS.identity;var f=s("color",n.dfltColor),v=f===t.color?f:i.color,g=s("title.text");g&&(uS.coerceFont(s,"title.font",i,{overrideDflt:{size:uS.bigFont(i.size),color:v}}),s("title.offset")),s("tickangle");var p=s("autorange",!r.isValidRange(t.range));p&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),Iir(t,r,s,u),qir(t,r,s,u,n),zir(t,r,s,u,n),Bir(t,r,s,{data:n.data,dataAttr:a});var x=s("gridcolor",S$e(f,.3)),_=l("gridwidth"),y=l("griddash"),C=s("showgrid");C||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var k=l("startlinecolor",f),S=l("startlinewidth",_),L=s("startline",r.showgrid||!!k||!!S);L||(delete r.startlinecolor,delete r.startlinewidth);var w=l("endlinecolor",f),A=l("endlinewidth",_),T=s("endline",r.showgrid||!!w||!!A);return T||(delete r.endlinecolor,delete r.endlinewidth),C?(s("minorgridcount"),s("minorgridwidth",_),s("minorgriddash",y),s("minorgridcolor",S$e(x,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels==="none"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s("tickmode"),r};function Uir(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),a=n+"calendar",i=e[a];e.type=Nir(t,i,{autotypenumbers:e.autotypenumbers})}}});var L$e=fe((NMr,C$e)=>{"use strict";var Vir=k$e(),Gir=Mo();C$e.exports=function(t,r,n,a,i){var o=a("a");o||(a("da"),a("a0"));var s=a("b");s||(a("db"),a("b0")),Hir(t,r,n,i)};function Hir(e,t,r,n){var a=["aaxis","baxis"];a.forEach(function(i){var o=i.charAt(0),s=e[i]||{},l=Gir.newContainer(t,i),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:i,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};Vir(s,l,u),l._categories=l._categories||[],!e[i]&&s.type!=="-"&&(e[i]={type:s.type})})}});var D$e=fe((UMr,F$e)=>{"use strict";var P$e=Xt(),jir=M$e(),Wir=L$e(),Yir=UD(),Xir=tc();F$e.exports=function(t,r,n,a){function i(l,u){return P$e.coerce(t,r,Yir,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=i("color",Xir.defaultLine);if(P$e.coerceFont(i,"font",a.font),i("carpet"),Wir(t,r,a,i,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=jir(t,r,i);s||(r.visible=!1),r._cheater&&i("cheaterslope"),i("zorder")}});var oJ=fe((VMr,R$e)=>{"use strict";var Zir=Xt().isArrayOrTypedArray;R$e.exports=function(t,r,n){var a;for(Zir(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],a=0;a{"use strict";I$e.exports=function(t,r,n){if(t.length===0)return"";var a,i=[],o=n?3:1;for(a=0;a{"use strict";z$e.exports=function(t,r,n,a,i,o){var s=i[0]*t.dpdx(r),l=i[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(i[0]*i[0]+i[1]*i[1]),v=Math.sqrt(o[0]*o[0]+o[1]*o[1]),g=(i[0]*o[0]+i[1]*o[1])/f/v;c=Math.max(0,g)}var p=Math.atan2(l,s)*180/Math.PI;return p<-90?(p+=180,u=-u):p>90&&(p-=180,u=-u),{angle:p,flip:u,p:t.c2p(a,r,n),offsetMultplier:c}}});var j$e=fe((jMr,H$e)=>{"use strict";var jD=xi(),VD=ea(),GD=oJ(),N$e=sJ(),cS=q$e(),lJ=as(),v0=Xt(),U$e=v0.strRotate,HD=v0.strTranslate,V$e=nc();H$e.exports=function(t,r,n,a){var i=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;v0.makeTraceGroups(a,n,"trace").each(function(c){var f=jD.select(this),v=c[0],g=v.trace,p=g.aaxis,x=g.baxis,_=v0.ensureSingle(f,"g","minorlayer"),y=v0.ensureSingle(f,"g","majorlayer"),C=v0.ensureSingle(f,"g","boundarylayer"),k=v0.ensureSingle(f,"g","labellayer");f.style("opacity",g.opacity),N5(o,s,y,p,"a",p._gridlines,!0,i),N5(o,s,y,x,"b",x._gridlines,!0,i),N5(o,s,_,p,"a",p._minorgridlines,!0,i),N5(o,s,_,x,"b",x._minorgridlines,!0,i),N5(o,s,C,p,"a-boundary",p._boundarylines,i),N5(o,s,C,x,"b-boundary",x._boundarylines,i);var S=B$e(t,o,s,g,v,k,p._labels,"a-label"),L=B$e(t,o,s,g,v,k,x._labels,"b-label");Kir(t,k,g,v,o,s,S,L),$ir(g,v,u,o,s)})};function $ir(e,t,r,n,a){var i,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=v0.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,v=[];for(l=0;l0?"start":"end","data-notex":1}).call(VD.font,f.font).text(f.text).call(lJ.convertToTspans,e),y=VD.bBox(this);_.attr("transform",HD(g.p[0],g.p[1])+U$e(g.angle)+HD(f.axis.labelpadding*x,y.height*.3)),u=Math.max(u,y.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function Kir(e,t,r,n,a,i,o,s){var l,u,c,f,v=v0.aggNums(Math.min,null,r.a),g=v0.aggNums(Math.max,null,r.a),p=v0.aggNums(Math.min,null,r.b),x=v0.aggNums(Math.max,null,r.b);l=.5*(v+g),u=p,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&v0.extendFlat(o,cS(r,a,i,c,r.dxydb_rough(l,u))),O$e(e,t,r,n,c,f,r.aaxis,a,i,o,"a-title"),l=v,u=.5*(p+x),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&v0.extendFlat(s,cS(r,a,i,c,r.dxyda_rough(l,u))),O$e(e,t,r,n,c,f,r.baxis,a,i,s,"b-title")}var G$e=V$e.LINE_SPACING,Jir=(1-V$e.MID_SHIFT)/G$e+1;function O$e(e,t,r,n,a,i,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var v=t.selectAll("text."+c).data(f),g=u.maxExtent;v.enter().append("text").classed(c,!0),v.each(function(){var p=cS(r,s,l,a,i);["start","both"].indexOf(o.showticklabels)===-1&&(g=0);var x=o.title.font.size;g+=x+o.title.offset;var _=u.angle+(u.flip<0?180:0),y=(_-p.angle+450)%360,C=y>90&&y<270,k=jD.select(this);k.text(o.title.text).call(lJ.convertToTspans,e),C&&(g=(-lJ.lineCount(k)+Jir)*G$e*x-g),k.attr("transform",HD(p.p[0],p.p[1])+U$e(p.angle)+HD(0,g)).attr("text-anchor","middle").call(VD.font,o.title.font)}),v.exit().remove()}});var Y$e=fe((WMr,W$e)=>{"use strict";var WD=Xt().isArrayOrTypedArray;W$e.exports=function(e,t,r){var n,a,i,o,s,l,u=[],c=WD(e)?e.length:e,f=WD(t)?t.length:t,v=WD(e)?e:null,g=WD(t)?t:null;v&&(i=(v.length-1)/(v[v.length-1]-v[0])/(c-1)),g&&(o=(g.length-1)/(g[g.length-1]-g[0])/(f-1));var p,x=1/0,_=-1/0;for(a=0;a{"use strict";var X$e=Xt().isArrayOrTypedArray;$$e.exports=function(e){return Z$e(e,0)};function Z$e(e,t){if(!X$e(e)||t>=10)return null;for(var r=1/0,n=-1/0,a=e.length,i=0;i{"use strict";var Qir=Yi(),Gy=ta().extendFlat;J$e.exports=function(t,r,n){var a,i,o,s,l,u,c,f,v,g,p,x,_,y,C=t["_"+r],k=t[r+"axis"],S=k._gridlines=[],L=k._minorgridlines=[],w=k._boundarylines=[],A=t["_"+n],T=t[n+"axis"];k.tickmode==="array"&&(k.tickvals=C.slice());var m=t._xctrl,F=t._yctrl,E=m[0].length,I=m.length,R=t._a.length,B=t._b.length;Qir.prepTicks(k),k.tickmode==="array"&&delete k.tickvals;var O=k.smoothing?3:1;function V(q){var U,J,ee,ce,ye,xe,ue,K,_e,ne,ae,pe,ie=[],le=[],me={};if(r==="b")for(J=t.b2j(q),ee=Math.floor(Math.max(0,Math.min(B-2,J))),ce=J-ee,me.length=B,me.crossLength=R,me.xy=function(be){return t.evalxy([],be,J)},me.dxy=function(be,De){return t.dxydi([],be,ee,De,ce)},U=0;U0&&(_e=t.dxydi([],U-1,ee,0,ce),ie.push(ye[0]+_e[0]/3),le.push(ye[1]+_e[1]/3),ne=t.dxydi([],U-1,ee,1,ce),ie.push(K[0]-ne[0]/3),le.push(K[1]-ne[1]/3)),ie.push(K[0]),le.push(K[1]),ye=K;else for(U=t.a2i(q),xe=Math.floor(Math.max(0,Math.min(R-2,U))),ue=U-xe,me.length=R,me.crossLength=B,me.xy=function(be){return t.evalxy([],U,be)},me.dxy=function(be,De){return t.dxydj([],xe,be,ue,De)},J=0;J0&&(ae=t.dxydj([],xe,J-1,ue,0),ie.push(ye[0]+ae[0]/3),le.push(ye[1]+ae[1]/3),pe=t.dxydj([],xe,J-1,ue,1),ie.push(K[0]-pe[0]/3),le.push(K[1]-pe[1]/3)),ie.push(K[0]),le.push(K[1]),ye=K;return me.axisLetter=r,me.axis=k,me.crossAxis=T,me.value=q,me.constvar=n,me.index=f,me.x=ie,me.y=le,me.smoothing=T.smoothing,me}function j(q){var U,J,ee,ce,ye,xe=[],ue=[],K={};if(K.length=C.length,K.crossLength=A.length,r==="b")for(ee=Math.max(0,Math.min(B-2,q)),ye=Math.min(1,Math.max(0,q-ee)),K.xy=function(_e){return t.evalxy([],_e,q)},K.dxy=function(_e,ne){return t.dxydi([],_e,ee,ne,ye)},U=0;UC.length-1)&&S.push(Gy(j(i),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u;fC.length-1)&&!(p<0||p>C.length-1))for(x=C[o],_=C[p],a=0;aC[C.length-1])&&L.push(Gy(V(g),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash})));k.startline&&w.push(Gy(j(0),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&w.push(Gy(j(C.length-1),{color:k.endlinecolor,width:k.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((C[C.length-1]-k.tick0)/k.dtick*(1+s)),Math.ceil((C[0]-k.tick0)/k.dtick/(1+s))].sort(function(q,U){return q-U}),u=l[0],c=l[1],f=u;f<=c;f++)v=k.tick0+k.dtick*f,S.push(Gy(V(v),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u-1;fC[C.length-1])&&L.push(Gy(V(g),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash}));k.startline&&w.push(Gy(V(C[0]),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&w.push(Gy(V(C[C.length-1]),{color:k.endlinecolor,width:k.endlinewidth}))}}});var nKe=fe((ZMr,rKe)=>{"use strict";var eKe=Yi(),tKe=ta().extendFlat;rKe.exports=function(t,r){var n,a,i,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";iKe.exports=function(t,r,n,a){var i,o,s,l=[],u=!!n.smoothing,c=!!a.smoothing,f=t[0].length-1,v=t.length-1;for(i=0,o=[],s=[];i<=f;i++)o[i]=t[0][i],s[i]=r[0][i];for(l.push({x:o,y:s,bicubic:u}),i=0,o=[],s=[];i<=v;i++)o[i]=t[i][f],s[i]=r[i][f];for(l.push({x:o,y:s,bicubic:c}),i=f,o=[],s=[];i>=0;i--)o[f-i]=t[v][i],s[f-i]=r[v][i];for(l.push({x:o,y:s,bicubic:u}),i=v,o=[],s=[];i>=0;i--)o[v-i]=t[i][0],s[v-i]=r[i][0];return l.push({x:o,y:s,bicubic:c}),l}});var sKe=fe((KMr,oKe)=>{"use strict";var ear=Xt();oKe.exports=function(t,r,n){var a,i,o,s=[],l=[],u=t[0].length,c=t.length;function f(ee,ce){var ye=0,xe,ue=0;return ee>0&&(xe=t[ce][ee-1])!==void 0&&(ue++,ye+=xe),ee0&&(xe=t[ce-1][ee])!==void 0&&(ue++,ye+=xe),ce0&&i0&&aT);return ear.log("Smoother converged to",m,"after",E,"iterations"),t}});var uKe=fe((JMr,lKe)=>{"use strict";lKe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var hKe=fe((QMr,fKe)=>{"use strict";var cKe=.5;fKe.exports=function(t,r,n,a){var i=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(i*i+o*o,cKe/2),c=Math.pow(s*s+l*l,cKe/2),f=(c*c*i-u*u*s)*a,v=(c*c*o-u*u*l)*a,g=c*(u+c)*3,p=u*(u+c)*3;return[[r[0]+(g&&f/g),r[1]+(g&&v/g)],[r[0]-(p&&f/p),r[1]-(p&&v/p)]]}});var vKe=fe((eSr,dKe)=>{"use strict";var uJ=hKe(),YD=Xt().ensureArray;function U5(e,t,r){var n=-.5*r[0]+1.5*t[0],a=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*a+e[1])/3]}dKe.exports=function(t,r,n,a,i,o){var s,l,u,c,f,v,g,p,x,_,y=n[0].length,C=n.length,k=i?3*y-2:y,S=o?3*C-2:C;for(t=YD(t,S),r=YD(r,S),u=0;u{"use strict";pKe.exports=function(e,t,r,n,a){var i=t-2,o=r-2;return n&&a?function(s,l,u){s||(s=[]);var c,f,v,g,p,x,_=Math.max(0,Math.min(Math.floor(l),i)),y=Math.max(0,Math.min(Math.floor(u),o)),C=Math.max(0,Math.min(1,l-_)),k=Math.max(0,Math.min(1,u-y));_*=3,y*=3;var S=C*C,L=S*C,w=1-C,A=w*w,T=A*w,m=k*k,F=m*k,E=1-k,I=E*E,R=I*E;for(x=0;x{"use strict";mKe.exports=function(e,t,r){return t&&r?function(n,a,i,o,s){n||(n=[]);var l,u,c,f,v,g;a*=3,i*=3;var p=o*o,x=1-o,_=x*x,y=x*o*2,C=-3*_,k=3*(_-y),S=3*(y-p),L=3*p,w=s*s,A=w*s,T=1-s,m=T*T,F=m*T;for(g=0;g{"use strict";xKe.exports=function(e,t,r){return t&&r?function(n,a,i,o,s){n||(n=[]);var l,u,c,f,v,g;a*=3,i*=3;var p=o*o,x=p*o,_=1-o,y=_*_,C=y*_,k=s*s,S=1-s,L=S*S,w=S*s*2,A=-3*L,T=3*(L-w),m=3*(w-k),F=3*k;for(g=0;g{"use strict";var bKe=uKe(),wKe=VE().findBin,tar=vKe(),rar=gKe(),nar=yKe(),iar=_Ke();TKe.exports=function(t){var r=t._a,n=t._b,a=r.length,i=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[a-1],c=n[0],f=n[i-1],v=r[r.length-1]-r[0],g=n[n.length-1]-n[0],p=v*bKe.RELATIVE_CULL_TOLERANCE,x=g*bKe.RELATIVE_CULL_TOLERANCE;l-=p,u+=p,c-=x,f+=x,t.isVisible=function(_,y){return _>l&&_c&&yu||yf},t.setScale=function(){var _=t._x,y=t._y,C=tar(t._xctrl,t._yctrl,_,y,o.smoothing,s.smoothing);t._xctrl=C[0],t._yctrl=C[1],t.evalxy=rar([t._xctrl,t._yctrl],a,i,o.smoothing,s.smoothing),t.dxydi=nar([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=iar([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(_){var y=Math.max(0,Math.floor(_[0]),a-2),C=_[0]-y;return(1-C)*r[y]+C*r[y+1]},t.j2b=function(_){var y=Math.max(0,Math.floor(_[1]),a-2),C=_[1]-y;return(1-C)*n[y]+C*n[y+1]},t.ij2ab=function(_){return[t.i2a(_[0]),t.j2b(_[1])]},t.a2i=function(_){var y=Math.max(0,Math.min(wKe(_,r),a-2)),C=r[y],k=r[y+1];return Math.max(0,Math.min(a-1,y+(_-C)/(k-C)))},t.b2j=function(_){var y=Math.max(0,Math.min(wKe(_,n),i-2)),C=n[y],k=n[y+1];return Math.max(0,Math.min(i-1,y+(_-C)/(k-C)))},t.ab2ij=function(_){return[t.a2i(_[0]),t.b2j(_[1])]},t.i2c=function(_,y){return t.evalxy([],_,y)},t.ab2xy=function(_,y,C){if(!C&&(_r[a-1]|yn[i-1]))return[!1,!1];var k=t.a2i(_),S=t.b2j(y),L=t.evalxy([],k,S);if(C){var w=0,A=0,T=[],m,F,E,I;_r[a-1]?(m=a-2,F=1,w=(_-r[a-1])/(r[a-1]-r[a-2])):(m=Math.max(0,Math.min(a-2,Math.floor(k))),F=k-m),yn[i-1]?(E=i-2,I=1,A=(y-n[i-1])/(n[i-1]-n[i-2])):(E=Math.max(0,Math.min(i-2,Math.floor(S))),I=S-E),w&&(t.dxydi(T,m,E,F,I),L[0]+=T[0]*w,L[1]+=T[1]*w),A&&(t.dxydj(T,m,E,F,I),L[0]+=T[0]*A,L[1]+=T[1]*A)}return L},t.c2p=function(_,y,C){return[y.c2p(_[0]),C.c2p(_[1])]},t.p2x=function(_,y,C){return[y.p2c(_[0]),C.p2c(_[1])]},t.dadi=function(_){var y=Math.max(0,Math.min(r.length-2,_));return r[y+1]-r[y]},t.dbdj=function(_){var y=Math.max(0,Math.min(n.length-2,_));return n[y+1]-n[y]},t.dxyda=function(_,y,C,k){var S=t.dxydi(null,_,y,C,k),L=t.dadi(_,C);return[S[0]/L,S[1]/L]},t.dxydb=function(_,y,C,k){var S=t.dxydj(null,_,y,C,k),L=t.dbdj(y,k);return[S[0]/L,S[1]/L]},t.dxyda_rough=function(_,y,C){var k=v*(C||.1),S=t.ab2xy(_+k,y,!0),L=t.ab2xy(_-k,y,!0);return[(S[0]-L[0])*.5/k,(S[1]-L[1])*.5/k]},t.dxydb_rough=function(_,y,C){var k=g*(C||.1),S=t.ab2xy(_,y+k,!0),L=t.ab2xy(_,y-k,!0);return[(S[0]-L[0])*.5/k,(S[1]-L[1])*.5/k]},t.dpdx=function(_){return _._m},t.dpdy=function(_){return _._m}}});var FKe=fe((aSr,PKe)=>{"use strict";var XD=Yi(),MKe=Xt().isArray1D,aar=Y$e(),SKe=K$e(),EKe=Q$e(),kKe=nKe(),oar=aKe(),CKe=h7(),LKe=sKe(),sar=c7(),lar=AKe();PKe.exports=function(t,r){var n=XD.getFromId(t,r.xaxis),a=XD.getFromId(t,r.yaxis),i=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&MKe(s)&&u.push("x"),l&&MKe(l)&&u.push("y"),u.length&&sar(r,i,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var v={};if(r._cheater){var g=i.cheatertype==="index"?c.length:c,p=o.cheatertype==="index"?f.length:f;s=aar(g,p,r.cheaterslope)}r._x=s=CKe(s),r._y=l=CKe(l),LKe(s,c,f),LKe(l,c,f),lar(r),r.setScale();var x=SKe(s),_=SKe(l),y=.5*(x[1]-x[0]),C=.5*(x[1]+x[0]),k=.5*(_[1]-_[0]),S=.5*(_[1]+_[0]),L=1.3;return x=[C-y*L,C+y*L],_=[S-k*L,S+k*L],r._extremes[n._id]=XD.findExtremes(n,x,{padded:!0}),r._extremes[a._id]=XD.findExtremes(a,_,{padded:!0}),EKe(r,"a","b"),EKe(r,"b","a"),kKe(r,i),kKe(r,o),v.clipsegments=oar(r._xctrl,r._yctrl,i,o),v.x=s,v.y=l,v.a=c,v.b=f,[v]}});var RKe=fe((oSr,DKe)=>{"use strict";DKe.exports={attributes:UD(),supplyDefaults:D$e(),plot:j$e(),calc:FKe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:gu(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var zKe=fe((sSr,IKe)=>{"use strict";IKe.exports=RKe()});var cJ=fe((lSr,NKe)=>{"use strict";var uar=n1(),G0=Ol(),car=Ho(),{hovertemplateAttrs:far,texttemplateAttrs:har,templatefallbackAttrs:qKe}=Oo(),BKe=_s(),Hy=ta().extendFlat,Ov=G0.marker,V5=G0.line,OKe=Ov.line;NKe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:Hy({},G0.mode,{dflt:"markers"}),text:Hy({},G0.text,{}),texttemplate:har({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:qKe({editType:"plot"}),hovertext:Hy({},G0.hovertext,{}),line:{color:V5.color,width:V5.width,dash:V5.dash,backoff:V5.backoff,shape:Hy({},V5.shape,{values:["linear","spline"]}),smoothing:V5.smoothing,editType:"calc"},connectgaps:G0.connectgaps,fill:Hy({},G0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:uar(),marker:Hy({symbol:Ov.symbol,opacity:Ov.opacity,maxdisplayed:Ov.maxdisplayed,angle:Ov.angle,angleref:Ov.angleref,standoff:Ov.standoff,size:Ov.size,sizeref:Ov.sizeref,sizemin:Ov.sizemin,sizemode:Ov.sizemode,line:Hy({width:OKe.width,dash:OKe.dash,editType:"calc"},BKe("marker.line")),gradient:Ov.gradient,editType:"calc"},BKe("marker")),textfont:G0.textfont,textposition:G0.textposition,selected:G0.selected,unselected:G0.unselected,hoverinfo:Hy({},car.hoverinfo,{flags:["a","b","text","name"]}),hoveron:G0.hoveron,hovertemplate:far(),hovertemplatefallback:qKe(),zorder:G0.zorder}});var HKe=fe((uSr,GKe)=>{"use strict";var UKe=Xt(),dar=r1(),G5=Is(),par=vv(),gar=lp(),VKe=f3(),mar=up(),yar=a1(),xar=cJ();GKe.exports=function(t,r,n,a){function i(v,g){return UKe.coerce(t,r,xar,v,g)}i("carpet"),r.xaxis="x",r.yaxis="y";var o=i("a"),s=i("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,i("text"),i("texttemplate"),i("texttemplatefallback"),i("hovertext");var u=l{"use strict";jKe.exports=function(t,r){var n={},a=r._carpet,i=a.ab2ij([t.a,t.b]),o=Math.floor(i[0]),s=i[0]-o,l=Math.floor(i[1]),u=i[1]-l,c=a.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var ZD=fe((fSr,YKe)=>{"use strict";YKe.exports=function(e,t){for(var r=e._fullData.length,n,a=0;a{"use strict";var XKe=aa(),_ar=pv(),bar=o1(),war=P0(),Tar=gv().calcMarkerSize,Aar=ZD();ZKe.exports=function(t,r){var n=r._carpetTrace=Aar(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){var a;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var i=r._length,o=new Array(i),s,l,u=!1;for(a=0;a{"use strict";var Mar=m3(),KKe=Yi(),Sar=ea();JKe.exports=function(t,r,n,a){var i,o,s,l=n[0][0].carpet,u=KKe.getFromId(t,l.xaxis||"x"),c=KKe.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(i=0;i{"use strict";var Ear=b3(),kar=Xt().fillText;eJe.exports=function(t,r,n,a){var i=Ear(t,r,n,a);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),i}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var v=o.trace,g=v._carpet,p=v._module.formatLabels(f,v);o.yLabel=p.yLabel,delete o.text;var x=[];function _(k,S){var L;k.labelprefix&&k.labelprefix.length>0?L=k.labelprefix.replace(/ = $/,""):L=k._hovertitle,x.push(L+": "+S.toFixed(3)+k.labelsuffix)}if(!v.hovertemplate){var y=f.hi||v.hoverinfo,C=y.split("+");C.indexOf("all")!==-1&&(C=["a","b","text"]),C.indexOf("a")!==-1&&_(g.aaxis,f.a),C.indexOf("b")!==-1&&_(g.baxis,f.b),x.push("y: "+o.yLabel),C.indexOf("text")!==-1&&kar(f,v,x),o.extraText=x.join("
")}return i}});var nJe=fe((pSr,rJe)=>{"use strict";rJe.exports=function(t,r,n,a,i){var o=a[i];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var aJe=fe((gSr,iJe)=>{"use strict";iJe.exports={attributes:cJ(),supplyDefaults:HKe(),colorbar:Zf(),formatLabels:WKe(),calc:$Ke(),plot:QKe(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:tJe(),selectPoints:a2(),eventData:nJe(),moduleType:"trace",name:"scattercarpet",basePlotModule:gu(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var sJe=fe((mSr,oJe)=>{"use strict";oJe.exports=aJe()});var fJ=fe((ySr,lJe)=>{"use strict";var Nv=O3(),Ng=NA(),Car=_s(),Lar=ta().extendFlat,z1=Ng.contours;lJe.exports=Lar({carpet:{valType:"string",editType:"calc"},z:Nv.z,a:Nv.x,a0:Nv.x0,da:Nv.dx,b:Nv.y,b0:Nv.y0,db:Nv.dy,text:Nv.text,hovertext:Nv.hovertext,transpose:Nv.transpose,atype:Nv.xtype,btype:Nv.ytype,fillcolor:Ng.fillcolor,autocontour:Ng.autocontour,ncontours:Ng.ncontours,contours:{type:z1.type,start:z1.start,end:z1.end,size:z1.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:z1.showlines,showlabels:z1.showlabels,labelfont:z1.labelfont,labelformat:z1.labelformat,operation:z1.operation,value:z1.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:Ng.line.color,width:Ng.line.width,dash:Ng.line.dash,smoothing:Ng.line.smoothing,editType:"plot"},zorder:Ng.zorder},Car("",{cLetter:"z",autoColorDflt:!1}))});var hJ=fe((xSr,fJe)=>{"use strict";var uJe=Xt(),Par=s7(),cJe=fJ(),Far=EG(),Dar=P7(),Rar=F7();fJe.exports=function(t,r,n,a){function i(u,c){return uJe.coerce(t,r,cJe,u,c)}function o(u){return uJe.coerce2(t,r,cJe,u)}if(i("carpet"),t.a&&t.b){var s=Par(t,r,i,a,"a","b");if(!s){r.visible=!1;return}i("text");var l=i("contours.type")==="constraint";l?Far(t,r,i,a,n,{hasHover:!1}):(Dar(t,r,i,o),Rar(t,r,i,a,{hasHover:!1}))}else r._defaultColor=n,r._length=null;i("zorder")}});var pJe=fe((_Sr,vJe)=>{"use strict";var Iar=Mh(),hJe=Xt(),zar=c7(),qar=h7(),Bar=d7(),Oar=v7(),dJe=$V(),Nar=hJ(),Uar=ZD(),Var=pG();vJe.exports=function(t,r){var n=r._carpetTrace=Uar(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){if(!r.a||!r.b){var a=t.data[n.index],i=t.data[r.index];i.a||(i.a=a.a),i.b||(i.b=a.b),Nar(i,r,r._defaultColor,t._fullLayout)}var o=Gar(t,r);return Var(r,r._z),o}};function Gar(e,t){var r=t._carpetTrace,n=r.aaxis,a=r.baxis,i,o,s,l,u,c,f;n._minDtick=0,a._minDtick=0,hJe.isArray1D(t.z)&&zar(t,n,a,"a","b",["z"]),i=t._a=t._a||t.a,l=t._b=t._b||t.b,i=i?n.makeCalcdata(t,"_a"):[],l=l?a.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=qar(t._z||t.z,t.transpose),t._emptypoints=Oar(f),Bar(f,t._emptypoints);var v=hJe.maxRowLength(f),g=t.xtype==="scaled"?"":i,p=dJe(t,g,o,s,v,n),x=t.ytype==="scaled"?"":l,_=dJe(t,x,u,c,f.length,a),y={a:p,b:_,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&Iar(e,t,{vals:f,containerStr:"",cLetter:"z"}),[y]}});var mJe=fe((bSr,gJe)=>{"use strict";var Har=Xt().isArrayOrTypedArray;gJe.exports=function(e,t,r,n){var a,i,o,s,l,u,c,f,v,g,p,x,_,y=Har(r)?"a":"b",C=y==="a"?e.aaxis:e.baxis,k=C.smoothing,S=y==="a"?e.a2i:e.b2j,L=y==="a"?r:n,w=y==="a"?n:r,A=y==="a"?t.a.length:t.b.length,T=y==="a"?t.b.length:t.a.length,m=Math.floor(y==="a"?e.b2j(w):e.a2i(w)),F=y==="a"?function(ce){return e.evalxy([],ce,m)}:function(ce){return e.evalxy([],m,ce)};k&&(o=Math.max(0,Math.min(T-2,m)),s=m-o,i=y==="a"?function(ce,ye){return e.dxydi([],ce,o,ye,s)}:function(ce,ye){return e.dxydj([],o,ce,s,ye)});var E=S(L[0]),I=S(L[1]),R=E0?Math.floor:Math.ceil,V=R>0?Math.ceil:Math.floor,j=R>0?Math.min:Math.max,q=R>0?Math.max:Math.min,U=O(E+B),J=V(I-B);c=F(E);var ee=[[c]];for(a=U;a*R{"use strict";var KD=xi(),JD=oJ(),wJe=sJ(),fS=ea(),Ug=Xt(),jar=mG(),War=yG(),M_=I7(),$D=VA(),Yar=wG(),Xar=bG(),Zar=TG(),$ar=ZD(),yJe=mJe();TJe.exports=function(t,r,n,a){var i=r.xaxis,o=r.yaxis;Ug.makeTraceGroups(a,n,"contour").each(function(s){var l=KD.select(this),u=s[0],c=u.trace,f=c._carpetTrace=$ar(t,c),v=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var g=u.a,p=u.b,x=c.contours,_=Xar(x,r,u),y=x.type==="constraint",C=x._operation,k=y?C==="="?"lines":"fill":x.coloring;function S(O){var V=f.ab2xy(O[0],O[1],!0);return[i.c2p(V[0]),o.c2p(V[1])]}var L=[[g[0],p[p.length-1]],[g[g.length-1],p[p.length-1]],[g[g.length-1],p[0]],[g[0],p[0]]];jar(_);var w=(g[g.length-1]-g[0])*1e-8,A=(p[p.length-1]-p[0])*1e-8;War(_,w,A);var T=_;x.type==="constraint"&&(T=Yar(_,C)),Kar(_,S);var m,F,E,I,R=[];for(I=v.clipsegments.length-1;I>=0;I--)m=v.clipsegments[I],F=JD([],m.x,i.c2p),E=JD([],m.y,o.c2p),F.reverse(),E.reverse(),R.push(wJe(F,E,m.bicubic));var B="M"+R.join("L")+"Z";eor(l,v.clipsegments,i,o,y,k),tor(c,l,i,o,T,L,S,f,v,k,B),Jar(l,_,t,u,x,r,f),fS.setClipUrl(l,f._clipPathId,t)})};function Kar(e,t){var r,n,a,i,o,s,l,u,c;for(r=0;r_&&(n.max=_),n.len=n.max-n.min}function xJe(e,t,r){var n=e.getPointAtLength(t),a=e.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 _Je(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function bJe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function eor(e,t,r,n,a,i){var o,s,l,u,c=Ug.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(i==="fill"&&!a?[0]:[]);f.enter().append("path"),f.exit().remove();var v=[];for(u=0;u=0&&(g=F,x=_):Math.abs(v[1]-g[1])=0&&(g=F,x=_):Ug.log("endpt to newendpt is not vert. or horz.",v,g,F)}if(x>=0)break;u+=T(v,g),v=g}if(x===t.edgepaths.length){Ug.log("unclosed perimeter path");break}l=x,f=c.indexOf(l)===-1,f&&(l=c[0],u+=T(v,g)+"Z",v=null)}for(l=0;l{"use strict";MJe.exports={attributes:fJ(),supplyDefaults:hJ(),colorbar:B7(),calc:pJe(),plot:AJe(),style:q7(),moduleType:"trace",name:"contourcarpet",basePlotModule:gu(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var kJe=fe((ASr,EJe)=>{"use strict";EJe.exports=SJe()});var eR=fe((MSr,DJe)=>{"use strict";var QD=Xt().extendFlat,hS=Ol(),CJe=pl().axisHoverFormat,{hovertemplateAttrs:nor,templatefallbackAttrs:ior}=Oo(),PJe=Uc().dash,aor=hb(),FJe=tw(),oor=FJe.INCREASING.COLOR,sor=FJe.DECREASING.COLOR,dJ=hS.line;function LJe(e){return{line:{color:QD({},dJ.color,{dflt:e}),width:dJ.width,dash:PJe,editType:"style"},editType:"style"}}DJe.exports={xperiod:hS.xperiod,xperiod0:hS.xperiod0,xperiodalignment:hS.xperiodalignment,xhoverformat:CJe("x"),yhoverformat:CJe("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:QD({},dJ.width,{}),dash:QD({},PJe,{}),editType:"style"},increasing:LJe(oor),decreasing:LJe(sor),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:nor({},{keys:["open","high","low","close"]}),hovertemplatefallback:ior(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:QD({},aor.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:hS.zorder}});var vJ=fe((SSr,RJe)=>{"use strict";var lor=bi(),uor=Xt();RJe.exports=function(t,r,n,a){var i=n("x"),o=n("open"),s=n("high"),l=n("low"),u=n("close");n("hoverlabel.split");var c=lor.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],a),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return i&&(f=Math.min(f,uor.minRowLength(i))),r._length=f,f}}});var qJe=fe((ESr,zJe)=>{"use strict";var cor=Xt(),hor=vJ(),dor=sp(),vor=eR();zJe.exports=function(t,r,n,a){function i(s,l){return cor.coerce(t,r,vor,s,l)}var o=hor(t,r,i,a);if(!o){r.visible=!1;return}dor(t,r,a,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),i("line.dash"),IJe(t,r,i,"increasing"),IJe(t,r,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("tickwidth"),a._requestRangeslider[r.xaxis]=!0,i("zorder")};function IJe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var pJ=fe((kSr,OJe)=>{"use strict";var H5=Xt(),tR=H5._,rR=Yi(),por=cp(),dS=Wa().BADNUM;function gor(e,t){var r=rR.getFromId(e,t.xaxis),n=rR.getFromId(e,t.yaxis),a=yor(e,r,t),i=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=BJe(e,t,o,s,n,mor);return t._extremes[r._id]=rR.findExtremes(r,s,{vpad:i/2}),l.length?(H5.extendFlat(l[0].t,{wHover:i/2,tickLen:a}),l):[{t:{empty:!0}}]}function mor(e,t,r,n){return{o:e,h:t,l:r,c:n}}function BJe(e,t,r,n,a,i){for(var o=a.makeCalcdata(t,"open"),s=a.makeCalcdata(t,"high"),l=a.makeCalcdata(t,"low"),u=a.makeCalcdata(t,"close"),c=H5.isArrayOrTypedArray(t.text),f=H5.isArrayOrTypedArray(t.hovertext),v=!0,g=null,p=!!t.xperiodalignment,x=[],_=0;_g):v=L>C,g=L;var w=i(C,k,S,L);w.pos=y,w.yc=(C+L)/2,w.i=_,w.dir=v?"increasing":"decreasing",w.x=w.pos,w.y=[S,k],p&&(w.orig_p=r[_]),c&&(w.tx=t.text[_]),f&&(w.htx=t.hovertext[_]),x.push(w)}else x.push({pos:y,empty:!0})}return t._extremes[a._id]=rR.findExtremes(a,H5.concat(l,s),{padded:!0}),x.length&&(x[0].t={labels:{open:tR(e,"open:")+" ",high:tR(e,"high:")+" ",low:tR(e,"low:")+" ",close:tR(e,"close:")+" "}}),x}function yor(e,t,r){var n=r._minDiff;if(!n){var a=e._fullData,i=[];n=1/0;var o;for(o=0;o{"use strict";var xor=xi(),NJe=Xt();UJe.exports=function(t,r,n,a){var i=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;NJe.makeTraceGroups(a,n,"trace ohlc").each(function(l){var u=xor.select(this),c=l[0],f=c.t,v=c.trace;if(v.visible!==!0||f.empty){u.remove();return}var g=f.tickLen,p=u.selectAll("path").data(NJe.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(x){if(x.empty)return"M0,0Z";var _=o.c2p(x.pos-g,!0),y=o.c2p(x.pos+g,!0),C=s?(_+y)/2:o.c2p(x.pos,!0),k=i.c2p(x.o,!0),S=i.c2p(x.h,!0),L=i.c2p(x.l,!0),w=i.c2p(x.c,!0);return"M"+_+","+k+"H"+C+"M"+C+","+S+"V"+L+"M"+y+","+w+"H"+C})})}});var HJe=fe((LSr,GJe)=>{"use strict";var gJ=xi(),_or=ea(),bor=ni();GJe.exports=function(t,r,n){var a=n||gJ.select(t).selectAll("g.ohlclayer").selectAll("g.trace");a.style("opacity",function(i){return i[0].trace.opacity}),a.each(function(i){var o=i[0].trace;gJ.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;gJ.select(this).style("fill","none").call(bor.stroke,l.color).call(_or.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var yJ=fe((PSr,ZJe)=>{"use strict";var mJ=Yi(),wor=Xt(),nR=kl(),Tor=ni(),Aor=Xt().fillText,jJe=tw(),Mor={increasing:jJe.INCREASING.SYMBOL,decreasing:jJe.DECREASING.SYMBOL};function Sor(e,t,r,n){var a=e.cd,i=a[0].trace;return i.hoverlabel.split?YJe(e,t,r,n):XJe(e,t,r,n)}function WJe(e,t,r,n){var a=e.cd,i=e.xa,o=a[0].trace,s=a[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,v,g=s.bPos||0,p=function(F){return F.pos+g-t},x=s.bdPos||s.tickLen,_=s.wHover,y=Math.min(1,x/Math.abs(i.r2c(i.range[1])-i.r2c(i.range[0])));f=e.maxHoverDistance-y,v=e.maxSpikeDistance-y;function C(F){var E=p(F);return nR.inbox(E-_,E+_,f)}function k(F){var E=F[u],I=F[c];return E===I||nR.inbox(E-r,I-r,f)}function S(F){return(C(F)+k(F))/2}var L=nR.getDistanceFunction(n,C,k,S);if(nR.getClosest(a,L,e),e.index===!1)return null;var w=a[e.index];if(w.empty)return null;var A=w.dir,T=o[A],m=T.line.color;return Tor.opacity(m)&&T.line.width?e.color=m:e.color=T.fillcolor,e.x0=i.c2p(w.pos+g-x,!0),e.x1=i.c2p(w.pos+g+x,!0),e.xLabelVal=w.orig_p!==void 0?w.orig_p:w.pos,e.spikeDistance=S(w)*v/f,e.xSpike=i.c2p(w.pos,!0),e}function YJe(e,t,r,n){var a=e.cd,i=e.ya,o=a[0].trace,s=a[0].t,l=[],u=WJe(e,t,r,n);if(!u)return[];var c=a[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var v=["high","open","close","low"],g={},p=0;p"+s.labels[x]+mJ.hoverLabelText(i,_,o.yhoverformat)):(C=wor.extendFlat({},u),C.y0=C.y1=y,C.yLabelVal=_,C.yLabel=s.labels[x]+mJ.hoverLabelText(i,_,o.yhoverformat),C.name="",l.push(C),g[_]=C)}return l}function XJe(e,t,r,n){var a=e.cd,i=e.ya,o=a[0].trace,s=a[0].t,l=WJe(e,t,r,n);if(!l)return[];var u=l.index,c=a[u],f=l.index=c.i,v=c.dir;function g(S){return s.labels[S]+mJ.hoverLabelText(i,o[S][f],o.yhoverformat)}var p=c.hi||o.hoverinfo||"",x=p.split("+"),_=p==="all",y=_||x.indexOf("y")!==-1,C=_||x.indexOf("text")!==-1,k=y?[g("open"),g("high"),g("low"),g("close")+" "+Mor[v]]:[];return C&&Aor(c,o,k),l.extraText=k.join("
"),l.y0=l.y1=i.c2p(c.yc,!0),[l]}ZJe.exports={hoverPoints:Sor,hoverSplit:YJe,hoverOnPoints:XJe}});var xJ=fe((FSr,$Je)=>{"use strict";$Je.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";KJe.exports={moduleType:"trace",name:"ohlc",basePlotModule:gu(),categories:["cartesian","svg","showLegend"],meta:{},attributes:eR(),supplyDefaults:qJe(),calc:pJ().calc,plot:VJe(),style:HJe(),hoverPoints:yJ().hoverPoints,selectPoints:xJ()}});var eQe=fe((RSr,QJe)=>{"use strict";QJe.exports=JJe()});var bJ=fe((ISr,nQe)=>{"use strict";var _J=Xt().extendFlat,tQe=pl().axisHoverFormat,zd=eR(),j5=PA();function rQe(e){return{line:{color:_J({},j5.line.color,{dflt:e}),width:j5.line.width,editType:"style"},fillcolor:j5.fillcolor,editType:"style"}}nQe.exports={xperiod:zd.xperiod,xperiod0:zd.xperiod0,xperiodalignment:zd.xperiodalignment,xhoverformat:tQe("x"),yhoverformat:tQe("y"),x:zd.x,open:zd.open,high:zd.high,low:zd.low,close:zd.close,line:{width:_J({},j5.line.width,{}),editType:"style"},increasing:rQe(zd.increasing.line.color.dflt),decreasing:rQe(zd.decreasing.line.color.dflt),text:zd.text,hovertext:zd.hovertext,hovertemplate:zd.hovertemplate,hovertemplatefallback:zd.hovertemplatefallback,whiskerwidth:_J({},j5.whiskerwidth,{dflt:0}),hoverlabel:zd.hoverlabel,zorder:j5.zorder}});var oQe=fe((zSr,aQe)=>{"use strict";var Eor=Xt(),kor=ni(),Cor=vJ(),Lor=sp(),Por=bJ();aQe.exports=function(t,r,n,a){function i(s,l){return Eor.coerce(t,r,Por,s,l)}var o=Cor(t,r,i,a);if(!o){r.visible=!1;return}Lor(t,r,a,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),iQe(t,r,i,"increasing"),iQe(t,r,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("whiskerwidth"),a._requestRangeslider[r.xaxis]=!0,i("zorder")};function iQe(e,t,r,n){var a=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",kor.addOpacity(a,.5))}});var cQe=fe((qSr,uQe)=>{"use strict";var sQe=Xt(),lQe=Yi(),For=cp(),Dor=pJ().calcCommon;uQe.exports=function(e,t){var r=e._fullLayout,n=lQe.getFromId(e,t.xaxis),a=lQe.getFromId(e,t.yaxis),i=n.makeCalcdata(t,"x"),o=For(t,n,"x",i).vals,s=Dor(e,t,i,o,a,Ror);return s.length?(sQe.extendFlat(s[0].t,{num:r._numBoxes,dPos:sQe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function Ror(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var hQe=fe((BSr,fQe)=>{"use strict";fQe.exports={moduleType:"trace",name:"candlestick",basePlotModule:gu(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:bJ(),layoutAttributes:FA(),supplyLayoutDefaults:t7().supplyLayoutDefaults,crossTraceCalc:n7().crossTraceCalc,supplyDefaults:oQe(),calc:cQe(),plot:i7().plot,layerName:"boxlayer",style:a7().style,hoverPoints:yJ().hoverPoints,selectPoints:xJ()}});var vQe=fe((OSr,dQe)=>{"use strict";dQe.exports=hQe()});var TJ=fe((NSr,pQe)=>{"use strict";var aR=Xt(),Ior=Hp(),iR=aR.deg2rad,wJ=aR.rad2deg;pQe.exports=function(t,r,n){switch(Ior(t,n),t._id){case"x":case"radialaxis":zor(t,r);break;case"angularaxis":Oor(t,r);break}};function zor(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],a=e._rl[1],i=r.innerRadius,o=(r.radius-i)/(a-n),s=i/o,l=n>a?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function qor(e,t){return t==="degrees"?iR(e):e}function Bor(e,t){return t==="degrees"?wJ(e):e}function Oor(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,a=e.c2d;e.d2c=function(i,o){return qor(n(i),o)},e.c2d=function(i,o){return a(Bor(i,o))}}e.makeCalcdata=function(i,o){var s=i[o],l=i._length,u,c,f=function(_){return e.d2c(_,i.thetaunit)};if(s)for(u=new Array(l),c=0;c{"use strict";gQe.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var lR=fe((VSr,bQe)=>{"use strict";var S_=Xt(),mQe=NT().tester,AJ=S_.findIndexOfMin,xQe=S_.isAngleInsideSector,Nor=S_.angleDelta,yQe=S_.angleDist;function Uor(e,t,r,n,a){if(!xQe(t,n))return!1;var i,o;r[0]0?o:1/0},n=AJ(t,r),a=S_.mod(n+1,t.length);return[t[n],t[a]]}function sR(e){return Math.abs(e)>1e-10?e:0}function MJ(e,t,r){t=t||0,r=r||0;for(var n=e.length,a=new Array(n),i=0;i{"use strict";function wQe(e){return e<0?-1:e>0?1:0}function Y5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function X5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function TQe(e,t){return t*e.radius}function Zor(e,t,r,n){var a=X5(e,Y5([r,t])),i=a[0],o=a[1],s=X5(e,Y5([n,t])),l=s[0],u=s[1];if(t===0)return["M"+i+","+o,"L"+l+","+u].join(" ");var c=TQe(e,1/Math.abs(t));return["M"+i+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function $or(e,t,r,n){var a=TQe(e,1/(t+1)),i=X5(e,Y5([t,r])),o=i[0],s=i[1],l=X5(e,Y5([t,n])),u=l[0],c=l[1];if(wQe(r)!==wQe(n)){var f=X5(e,Y5([t,0])),v=f[0],g=f[1];return["M"+o+","+s,"A"+a+","+a+" 0 0,"+(0{"use strict";var E_=xi(),C_=bi(),ol=Xt(),q1=ol.strRotate,$c=ol.strTranslate,hR=ni(),vS=ea(),Kor=Hs(),qd=Yi(),Jor=Hp(),Qor=TJ(),esr=rp().doAutoRange,Vg=NN(),fR=ed(),MQe=kl(),tsr=qx(),rsr=Ac().prepSelect,nsr=Ac().selectOnClick,EJ=Ac().clearOutline,SQe=np(),EQe=ST(),kQe=RT().redrawReglTraces,isr=nc().MID_SHIFT,jy=oR(),Gg=lR(),dR=SJ(),uR=dR.smith,asr=dR.reactanceArc,osr=dR.resistanceArc,cR=dR.smithTransform,ssr=ol._,CQe=ol.mod,Wy=ol.deg2rad,k_=ol.rad2deg;function LQe(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,a="clip"+n._uid+t;this.clipIds.forTraces=a+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(i){return this.isSmith?0:i.hole},this.getSector=function(i){return this.isSmith?[0,360]:i.sector},this.getRadial=function(i){return this.isSmith?i.realaxis:i.radialaxis},this.getAngular=function(i){return this.isSmith?i.imaginaryaxis:i.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var wf=LQe.prototype;DQe.exports=function(t,r,n){return new LQe(t,r,n)};wf.plot=function(e,t){for(var r=this,n=t[r.id],a=!1,i=0;i_?(y=u,C=u*_,L=(c-C)/a.h/2,k=[s[0],s[1]],S=[l[0]+L,l[1]-L]):(y=c/_,C=c,L=(u-y)/a.w/2,k=[s[0]+L,s[1]-L],S=[l[0],l[1]]),r.xLength2=y,r.yLength2=C,r.xDomain2=k,r.yDomain2=S;var w=r.xOffset2=a.l+a.w*k[0],A=r.yOffset2=a.t+a.h*(1-S[1]),T=r.radius=y/g,m=r.innerRadius=r.getHole(t)*T,F=r.cx=w-T*v[0],E=r.cy=A+T*v[3],I=r.cxx=F-w,R=r.cyy=E-A,B=i.side,O;B==="counterclockwise"?(O=B,B="top"):B==="clockwise"&&(O=B,B="bottom"),r.radialAxis=r.mockAxis(e,t,i,{_id:"x",side:B,_trueSide:O,domain:[m/a.w,T/a.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:k}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:S});var V=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",V).attr("transform",$c(I,R)),n.frontplot.attr("transform",$c(w,A)).call(vS.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",V).attr("transform",$c(F,E)).call(hR.fill,t.bgcolor)};wf.mockAxis=function(e,t,r,n){var a=ol.extendFlat({},r,n);return Qor(a,t,e),a};wf.mockCartesianAxis=function(e,t,r){var n=this,a=n.isSmith,i=r._id,o=ol.extendFlat({type:"linear"},r);Jor(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[i],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=i==="x"&&!a?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};wf.doAutoRange=function(e,t){var r=this,n=r.gd,a=r.radialAxis,i=r.getRadial(t);esr(n,a);var o=a.range;if(i.range=o.slice(),i._input.range=o.slice(),a._rl=[a.r2l(o[0],null,"gregorian"),a.r2l(o[1],null,"gregorian")],a.minallowed!==void 0){var s=a.r2l(a.minallowed);a._rl[0]>a._rl[1]?a._rl[1]=Math.max(a._rl[1],s):a._rl[0]=Math.max(a._rl[0],s)}if(a.maxallowed!==void 0){var l=a.r2l(a.maxallowed);a._rl[0]90&&c<=270&&(f.tickangle=180);var p=g?function(T){var m=cR(r,uR([T.x,0]));return $c(m[0]-s,m[1]-l)}:function(T){return $c(f.l2p(T.x)+o,0)},x=g?function(T){return osr(r,T.x,-1/0,1/0)}:function(T){return r.pathArc(f.r2p(T.x)+o)},_=PQe(u);if(r.radialTickLayout!==_&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),v){f.setScale();var y=0,C=g?(f.tickvals||[]).filter(function(T){return T>=0}).map(function(T){return qd.tickText(f,T,!0,!1)}):qd.calcTicks(f),k=g?C:qd.clipEnds(f,C),S=qd.getTickSigns(f)[2];g&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(S=-S),f.ticks==="top"&&f.side==="top"&&(y=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(y=f.ticklen)),qd.drawTicks(n,f,{vals:C,layer:a["radial-axis"],path:qd.makeTickPath(f,0,S),transFn:p,crisp:!1}),qd.drawGrid(n,f,{vals:k,layer:a["radial-grid"],path:x,transFn:ol.noop,crisp:!1}),qd.drawLabels(n,f,{vals:C,layer:a["radial-axis"],transFn:p,labelFns:qd.makeLabelFns(f,y)})}var L=r.radialAxisAngle=r.vangles?k_(FQe(Wy(u.angle),r.vangles)):u.angle,w=$c(s,l),A=w+q1(-L);pS(a["radial-axis"],v&&(u.showticklabels||u.ticks),{transform:A}),pS(a["radial-grid"],v&&u.showgrid,{transform:g?"":w}),pS(a["radial-line"].select("line"),v&&u.showline,{x1:g?-i:o,y1:0,x2:i,y2:0,transform:A}).attr("stroke-width",u.linewidth).call(hR.stroke,u.linecolor)};wf.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,a=n.gd,i=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",c=0;if(l.title){var f=vS.bBox(n.layers["radial-axis"].node()).height,v=l.title.font.size,g=l.side;c=g==="top"?v:g==="counterclockwise"?-(f+v*.4):f+v*.8}var p=r!==void 0?r:n.radialAxisAngle,x=Wy(p),_=Math.cos(x),y=Math.sin(x),C=o+i/2*_+c*y,k=s-i/2*y+c*_;n.layers["radial-axis-title"]=tsr.draw(a,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:ssr(a,"Click to enter radial axis title"),attributes:{x:C,y:k,"text-anchor":"middle"},transform:{rotate:-p}})}};wf.updateAngularAxis=function(e,t){var r=this,n=r.gd,a=r.layers,i=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var v=f?function(m){var F=cR(r,uR([0,m.x]));return Math.atan2(F[0]-s,F[1]-l)-Math.PI/2}:function(m){return c.t2g(m.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=k_(c.tick0),c.dtick=k_(c.dtick));var g=function(m){return $c(s+i*Math.cos(m),l-i*Math.sin(m))},p=f?function(m){var F=cR(r,uR([0,m.x]));return $c(F[0],F[1])}:function(m){return g(v(m))},x=f?function(m){var F=cR(r,uR([0,m.x])),E=Math.atan2(F[0]-s,F[1]-l)-Math.PI/2;return $c(F[0],F[1])+q1(-k_(E))}:function(m){var F=v(m);return g(F)+q1(-k_(F))},_=f?function(m){return asr(r,m.x,0,1/0)}:function(m){var F=v(m),E=Math.cos(F),I=Math.sin(F);return"M"+[s+o*E,l-o*I]+"L"+[s+i*E,l-i*I]},y=qd.makeLabelFns(c,0),C=y.labelStandoff,k={};k.xFn=function(m){var F=v(m);return Math.cos(F)*C},k.yFn=function(m){var F=v(m),E=Math.sin(F)>0?.2:1;return-Math.sin(F)*(C+m.fontSize*E)+Math.abs(Math.cos(F))*(m.fontSize*isr)},k.anchorFn=function(m){var F=v(m),E=Math.cos(F);return Math.abs(E)<.1?"middle":E>0?"start":"end"},k.heightFn=function(m,F,E){var I=v(m);return-.5*(1+Math.sin(I))*E};var S=PQe(u);r.angularTickLayout!==S&&(a["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=S);var L=f?[1/0].concat(c.tickvals||[]).map(function(m){return qd.tickText(c,m,!0,!1)}):qd.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var w;if(t.gridshape==="linear"?(w=L.map(v),ol.angleDelta(w[0],w[1])<0&&(w=w.slice().reverse())):w=null,r.vangles=w,c.type==="category"&&(L=L.filter(function(m){return ol.isAngleInsideSector(v(m),r.sectorInRad)})),c.visible){var A=c.ticks==="inside"?-1:1,T=(c.linewidth||1)/2;qd.drawTicks(n,c,{vals:L,layer:a["angular-axis"],path:"M"+A*T+",0h"+A*c.ticklen,transFn:x,crisp:!1}),qd.drawGrid(n,c,{vals:L,layer:a["angular-grid"],path:_,transFn:ol.noop,crisp:!1}),qd.drawLabels(n,c,{vals:L,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:p,labelFns:k})}pS(a["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:$c(s,l)}).attr("stroke-width",u.linewidth).call(hR.stroke,u.linecolor)};wf.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};wf.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,a=t.layers,i=e._zoomlayer,o=jy.MINZOOM,s=jy.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,v=t.cxx,g=t.cyy,p=t.sectorInRad,x=t.vangles,_=t.radialAxis,y=Gg.clampTiny,C=Gg.findXYatLength,k=Gg.findEnclosingVertexAngles,S=jy.cornerHalfWidth,L=jy.cornerLen/2,w,A,T=Vg.makeDragger(a,"path","maindrag",e.dragmode===!1?"none":"crosshair");E_.select(T).attr("d",t.pathSubplot()).attr("transform",$c(c,f)),T.onmousemove=function(be){MQe.hover(n,be,t.id),n._fullLayout._lasthover=T,n._fullLayout._hoversubplot=t.id},T.onmouseout=function(be){n._dragging||fR.unhover(n,be)};var m={element:T,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},F,E,I,R,B,O,V,j,q;function U(be,De){return Math.sqrt(be*be+De*De)}function J(be,De){return U(be-v,De-g)}function ee(be,De){return Math.atan2(g-De,be-v)}function ce(be,De){return[be*Math.cos(De),be*Math.sin(-De)]}function ye(be,De){if(be===0)return t.pathSector(2*S);var Ge=L/be,ht=De-Ge,it=De+Ge,Oe=Math.max(0,Math.min(be,l)),ze=Oe-S,ct=Oe+S;return"M"+ce(ze,ht)+"A"+[ze,ze]+" 0,0,0 "+ce(ze,it)+"L"+ce(ct,it)+"A"+[ct,ct]+" 0,0,1 "+ce(ct,ht)+"Z"}function xe(be,De,Ge){if(be===0)return t.pathSector(2*S);var ht=ce(be,De),it=ce(be,Ge),Oe=y((ht[0]+it[0])/2),ze=y((ht[1]+it[1])/2),ct,et;if(Oe&&ze){var qe=ze/Oe,we=-1/qe,Le=C(S,qe,Oe,ze);ct=C(L,we,Le[0][0],Le[0][1]),et=C(L,we,Le[1][0],Le[1][1])}else{var Ke,Te;ze?(Ke=L,Te=S):(Ke=S,Te=L),ct=[[Oe-Ke,ze-Te],[Oe+Ke,ze-Te]],et=[[Oe-Ke,ze+Te],[Oe+Ke,ze+Te]]}return"M"+ct.join("L")+"L"+et.reverse().join("L")+"Z"}function ue(){I=null,R=null,B=t.pathSubplot(),O=!1;var be=n._fullLayout[t.id];V=hR.luminosity(be.bgcolor),j=Vg.makeZoombox(i,V,c,f,B),j.attr("fill-rule","evenodd"),q=Vg.makeCorners(i,c,f),EJ(n)}function K(be,De){return De=Math.max(Math.min(De,l),u),beo?(be-1&&be===1&&nsr(De,n,[t.xaxis],[t.yaxis],t.id,m),Ge.indexOf("event")>-1&&MQe.click(n,De,t.id)}m.prepFn=function(be,De,Ge){var ht=n._fullLayout.dragmode,it=T.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var Oe=n._fullLayout._invTransform;w=n._fullLayout._invScaleX,A=n._fullLayout._invScaleY;var ze=ol.apply3DTransform(Oe)(De-it.left,Ge-it.top);if(F=ze[0],E=ze[1],x){var ct=Gg.findPolygonOffset(l,p[0],p[1],x);F+=v+ct[0],E+=g+ct[1]}switch(ht){case"zoom":m.clickFn=me,r||(x?m.moveFn=pe:m.moveFn=ne,m.doneFn=ie,ue(be,De,Ge));break;case"select":case"lasso":rsr(be,De,Ge,m,ht);break}},fR.init(m)};wf.updateRadialDrag=function(e,t,r){var n=this,a=n.gd,i=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=jy.radialDragBoxSize,v=f/2;if(!c.visible)return;var g=Wy(n.radialAxisAngle),p=c._rl,x=p[0],_=p[1],y=p[r],C=.75*(p[1]-p[0])/(1-n.getHole(t))/o,k,S,L;r?(k=l+(o+v)*Math.cos(g),S=u-(o+v)*Math.sin(g),L="radialdrag"):(k=l+(s-v)*Math.cos(g),S=u-(s-v)*Math.sin(g),L="radialdrag-inner");var w=Vg.makeRectDragger(i,L,"crosshair",-v,-v,f,f),A={element:w,gd:a};e.dragmode===!1&&(A.dragmode=!1),pS(E_.select(w),c.visible&&s0!=(r?F>x:F<_)){F=null;return}var U=a._fullLayout,J=U[n.id];c.range[r]=F,c._rl[r]=F,n.updateRadialAxis(U,J),n.xaxis.setRange(),n.xaxis.setScale(),n.yaxis.setRange(),n.yaxis.setScale();var ee=!1;for(var ce in n.traceHash){var ye=n.traceHash[ce],xe=ol.filterVisible(ye),ue=ye[0][0].trace._module;ue.plot(a,n,xe,J),C_.traceIs(ce,"gl")&&xe.length&&(ee=!0)}ee&&(EQe(a),kQe(a))}A.prepFn=function(){T=null,m=null,F=null,A.moveFn=E,A.doneFn=R,EJ(a)},A.clampFn=function(V,j){return Math.sqrt(V*V+j*j)=90||a>90&&i>=450?g=1:s<=0&&u<=0?g=0:g=Math.max(s,u),a<=180&&i>=180||a>180&&i>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),a<=270&&i>=270||a>270&&i>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),i>=360?v=1:o<=0&&l<=0?v=0:v=Math.max(o,l),[c,f,v,g]}function FQe(e,t){var r=function(a){return ol.angleDist(e,a)},n=ol.findIndexOfMin(t,r);return t[n]}function pS(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var CJ=fe((jSr,OQe)=>{"use strict";var usr=tc(),Ea=pf(),csr=nl().attributes,H0=Xt().extendFlat,RQe=rl().overrideAll,IQe=RQe({color:Ea.color,showline:H0({},Ea.showline,{dflt:!0}),linecolor:Ea.linecolor,linewidth:Ea.linewidth,showgrid:H0({},Ea.showgrid,{dflt:!0}),gridcolor:Ea.gridcolor,gridwidth:Ea.gridwidth,griddash:Ea.griddash},"plot","from-root"),zQe=RQe({tickmode:Ea.minor.tickmode,nticks:Ea.nticks,tick0:Ea.tick0,dtick:Ea.dtick,tickvals:Ea.tickvals,ticktext:Ea.ticktext,ticks:Ea.ticks,ticklen:Ea.ticklen,tickwidth:Ea.tickwidth,tickcolor:Ea.tickcolor,ticklabelstep:Ea.ticklabelstep,showticklabels:Ea.showticklabels,labelalias:Ea.labelalias,minorloglabels:Ea.minorloglabels,showtickprefix:Ea.showtickprefix,tickprefix:Ea.tickprefix,showticksuffix:Ea.showticksuffix,ticksuffix:Ea.ticksuffix,showexponent:Ea.showexponent,exponentformat:Ea.exponentformat,minexponent:Ea.minexponent,separatethousands:Ea.separatethousands,tickfont:Ea.tickfont,tickangle:Ea.tickangle,tickformat:Ea.tickformat,tickformatstops:Ea.tickformatstops,layer:Ea.layer},"plot","from-root"),qQe={visible:H0({},Ea.visible,{dflt:!0}),type:H0({},Ea.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Ea.autotypenumbers,autorangeoptions:{minallowed:Ea.autorangeoptions.minallowed,maxallowed:Ea.autorangeoptions.maxallowed,clipmin:Ea.autorangeoptions.clipmin,clipmax:Ea.autorangeoptions.clipmax,include:Ea.autorangeoptions.include,editType:"plot"},autorange:H0({},Ea.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:H0({},Ea.minallowed,{editType:"plot"}),maxallowed:H0({},Ea.maxallowed,{editType:"plot"}),range:H0({},Ea.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Ea.categoryorder,categoryarray:Ea.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Ea.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:H0({},Ea.title.text,{editType:"plot",dflt:""}),font:H0({},Ea.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Ea.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};H0(qQe,IQe,zQe);var BQe={visible:H0({},Ea.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Ea.autotypenumbers,categoryorder:Ea.categoryorder,categoryarray:Ea.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:Ea.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};H0(BQe,IQe,zQe);OQe.exports={domain:csr({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:usr.background},radialaxis:qQe,angularaxis:BQe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var GQe=fe((WSr,VQe)=>{"use strict";var vR=Xt(),fsr=ni(),hsr=Mo(),dsr=b2(),vsr=jf().getSubplotData,psr=Fx(),gsr=Ub(),msr=gm(),ysr=mm(),xsr=dC(),_sr=hA(),bsr=pO(),wsr=Yb(),UQe=CJ(),Tsr=TJ(),pR=oR(),NQe=pR.axisNames;function Asr(e,t,r,n){var a=r("bgcolor");n.bgColor=fsr.combine(a,n.paper_bgcolor);var i=r("sector");r("hole");var o=vsr(n.fullData,pR.name,n.id),s=n.layoutOut,l;function u(j,q){return r(l+"."+j,q)}for(var c=0;c{"use strict";var Ssr=jf().getSubplotCalcData,Esr=Xt().counterRegex,ksr=kJ(),jQe=oR(),WQe=jQe.attr,L_=jQe.name,HQe=Esr(L_),YQe={};YQe[WQe]={valType:"subplotid",dflt:L_,editType:"calc"};function Csr(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[L_],a=0;a{"use strict";var{hovertemplateAttrs:Psr,texttemplateAttrs:Fsr,templatefallbackAttrs:ZQe}=Oo(),mR=ta().extendFlat,Dsr=n1(),j0=Ol(),Rsr=Ho(),Z5=j0.line;$Qe.exports={mode:j0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:j0.text,texttemplate:Fsr({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:ZQe({editType:"plot"}),hovertext:j0.hovertext,line:{color:Z5.color,width:Z5.width,dash:Z5.dash,backoff:Z5.backoff,shape:mR({},Z5.shape,{values:["linear","spline"]}),smoothing:Z5.smoothing,editType:"calc"},connectgaps:j0.connectgaps,marker:j0.marker,cliponaxis:mR({},j0.cliponaxis,{dflt:!1}),textposition:j0.textposition,textfont:j0.textfont,fill:mR({},j0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:Dsr(),hoverinfo:mR({},Rsr.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:j0.hoveron,hovertemplate:Psr(),hovertemplatefallback:ZQe(),selected:j0.selected,unselected:j0.unselected}});var xR=fe((ZSr,QQe)=>{"use strict";var yR=Xt(),$5=Is(),Isr=vv(),zsr=lp(),KQe=f3(),qsr=up(),Bsr=a1(),Osr=r1().PTS_LINESONLY,Nsr=gS();function Usr(e,t,r,n){function a(s,l){return yR.coerce(e,t,Nsr,s,l)}var i=JQe(e,t,n,a);if(!i){t.visible=!1;return}a("thetaunit"),a("mode",i{"use strict";var Vsr=Xt(),eet=Yi();tet.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot,o,s;i?(o=i.radialAxis,s=i.angularAxis):(i=n[r.subplot],o=i.radialaxis,s=i.angularaxis);var l=o.c2l(t.r);a.rLabel=eet.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?Vsr.rad2deg(t.theta):t.theta;return a.thetaLabel=eet.tickText(s,u,!0).text,a}});var iet=fe((KSr,net)=>{"use strict";var ret=aa(),Gsr=Wa().BADNUM,Hsr=Yi(),jsr=pv(),Wsr=o1(),Ysr=P0(),Xsr=gv().calcMarkerSize;net.exports=function(t,r){for(var n=t._fullLayout,a=r.subplot,i=n[a].radialaxis,o=n[a].angularaxis,s=i.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var Zsr=m3(),aet=Wa().BADNUM;oet.exports=function(t,r,n){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var $sr=b3();function Ksr(e,t,r,n){var a=$sr(e,t,r,n);if(!(!a||a[0].index===!1)){var i=a[0];if(i.index===void 0)return a;var o=e.subplot,s=i.cd[i.index],l=i.trace;if(o.isPtInside(s))return i.xLabelVal=void 0,i.yLabelVal=void 0,uet(s,l,o,i),i.hovertemplate=l.hovertemplate,a}}function uet(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="r",i._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(v,g){u.push(v._hovertitle+": "+g)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(a,n.rLabel),f.indexOf("theta")!==-1&&c(i,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}cet.exports={hoverPoints:Ksr,makeHoverPointText:uet}});var het=fe((eEr,fet)=>{"use strict";fet.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:gR(),categories:["polar","symbols","showLegend","scatter-like"],attributes:gS(),supplyDefaults:xR().supplyDefaults,colorbar:Zf(),formatLabels:_R(),calc:iet(),plot:set(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:bR().hoverPoints,selectPoints:a2(),meta:{}}});var vet=fe((tEr,det)=>{"use strict";det.exports=het()});var LJ=fe((iEr,get)=>{"use strict";var pet=gS(),{cliponaxis:rEr,hoveron:nEr}=pet,Jsr=Ete(pet,["cliponaxis","hoveron"]),{connectgaps:Qsr,line:{color:elr,dash:tlr,width:rlr},fill:nlr,fillcolor:ilr,marker:alr,textfont:olr,textposition:slr}=mM();get.exports=tl(zo({},Jsr),{connectgaps:Qsr,fill:nlr,fillcolor:ilr,line:{color:elr,dash:tlr,editType:"calc",width:rlr},marker:alr,textfont:olr,textposition:slr})});var xet=fe((oEr,yet)=>{"use strict";var met=Xt(),PJ=Is(),llr=xR().handleRThetaDefaults,ulr=vv(),clr=lp(),flr=up(),hlr=a1(),dlr=r1().PTS_LINESONLY,vlr=LJ();yet.exports=function(t,r,n,a){function i(s,l){return met.coerce(t,r,vlr,s,l)}var o=llr(t,r,a,i);if(!o){r.visible=!1;return}i("thetaunit"),i("mode",o{"use strict";var plr=_R();_et.exports=function(t,r,n){var a=t.i;return"r"in t||(t.r=r._r[a]),"theta"in t||(t.theta=r._theta[a]),plr(t,r,n)}});var Tet=fe((lEr,wet)=>{"use strict";var glr=pv(),mlr=gv().calcMarkerSize,ylr=f_(),xlr=Yi(),_lr=Ty().TOO_MANY_POINTS;wet.exports=function(t,r){var n=t._fullLayout,a=r.subplot,i=n[a].radialaxis,o=n[a].angularaxis,s=r._r=i.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var blr=KP(),wlr=bR().makeHoverPointText;function Tlr(e,t,r,n){var a=e.cd,i=a[0].t,o=i.r,s=i.theta,l=blr.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],v=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,wlr(f,v,c,u),l}}Aet.exports={hoverPoints:Tlr}});var ket=fe((cEr,Eet)=>{"use strict";Eet.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:gR(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:LJ(),supplyDefaults:xet(),colorbar:Zf(),formatLabels:bet(),calc:Tet(),hoverPoints:Met().hoverPoints,selectPoints:mZ(),meta:{}}});var Cet=fe((fEr,FJ)=>{"use strict";var Alr=tF(),Mlr=aa(),Slr=x$(),Elr=vZ(),wR=f_(),TR=Xt(),klr=Ty().TOO_MANY_POINTS,Clr={};FJ.exports=function(t,r,n){if(n.length){var a=r.radialAxis,i=r.angularAxis,o=Elr(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,v=c.r,g=c.theta,p=c.opts,x,_=v.slice(),y=g.slice();for(x=0;x=klr&&(p.marker.cluster=c.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=C),p.line&&C.length>1&&TR.extendFlat(p.line,wR.linePositions(t,u,C)),p.text&&(TR.extendFlat(p.text,{positions:C},wR.textPosition(t,u,p.text,p.marker)),TR.extendFlat(p.textSel,{positions:C},wR.textPosition(t,u,p.text,p.markerSel)),TR.extendFlat(p.textUnsel,{positions:C},wR.textPosition(t,u,p.text,p.markerUnsel))),p.fill&&!o.fill2d&&(o.fill2d=!0),p.marker&&!o.scatter2d&&(o.scatter2d=!0),p.line&&!o.line2d&&(o.line2d=!0),p.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(p.line),o.fillOptions.push(p.fill),o.markerOptions.push(p.marker),o.markerSelectedOptions.push(p.markerSel),o.markerUnselectedOptions.push(p.markerUnsel),o.textOptions.push(p.text),o.textSelectedOptions.push(p.textSel),o.textUnselectedOptions.push(p.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=k,c.y=S,c.rawx=k,c.rawy=S,c.r=v,c.theta=g,c.positions=C,c._scene=o,c.index=o.count,o.count++}}),Slr(t,r,n)}};FJ.exports.reglPrecompiled=Clr});var Fet=fe((hEr,Pet)=>{"use strict";var Let=ket();Let.plot=Cet();Pet.exports=Let});var Ret=fe((dEr,Det)=>{"use strict";Det.exports=Fet()});var DJ=fe((vEr,Iet)=>{"use strict";var{hovertemplateAttrs:Llr,templatefallbackAttrs:Plr}=Oo(),K5=ta().extendFlat,Yy=gS(),Xy=u1();Iet.exports={r:Yy.r,theta:Yy.theta,r0:Yy.r0,dr:Yy.dr,theta0:Yy.theta0,dtheta:Yy.dtheta,thetaunit:Yy.thetaunit,base:K5({},Xy.base,{}),offset:K5({},Xy.offset,{}),width:K5({},Xy.width,{}),text:K5({},Xy.text,{}),hovertext:K5({},Xy.hovertext,{}),marker:Flr(),hoverinfo:Yy.hoverinfo,hovertemplate:Llr(),hovertemplatefallback:Plr(),selected:Xy.selected,unselected:Xy.unselected};function Flr(){var e=K5({},Xy.marker);return delete e.cornerradius,e}});var RJ=fe((pEr,zet)=>{"use strict";zet.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var Oet=fe((gEr,Bet)=>{"use strict";var qet=Xt(),Dlr=xR().handleRThetaDefaults,Rlr=ZC(),Ilr=DJ();Bet.exports=function(t,r,n,a){function i(s,l){return qet.coerce(t,r,Ilr,s,l)}var o=Dlr(t,r,a,i);if(!o){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),Rlr(t,r,i,n,a),qet.coerceSelectionMarkerOpacity(r,i)}});var Uet=fe((mEr,Net)=>{"use strict";var zlr=Xt(),qlr=RJ();Net.exports=function(e,t,r){var n={},a;function i(l,u){return zlr.coerce(e[a]||{},t[a],qlr,l,u)}for(var o=0;o{"use strict";var Vet=Wf().hasColorscale,Get=Mh(),Blr=Xt().isArrayOrTypedArray,Olr=EA(),Nlr=i2().setGroupPositions,Ulr=P0(),Vlr=bi().traceIs,Glr=Xt().extendFlat;function Hlr(e,t){for(var r=e._fullLayout,n=t.subplot,a=r[n].radialaxis,i=r[n].angularaxis,o=a.makeCalcdata(t,"r"),s=i.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,v=0;v{"use strict";var jet=xi(),AR=aa(),J5=Xt(),Wlr=ea(),zJ=lR();Wet.exports=function(t,r,n){var a=t._context.staticPlot,i=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=Ylr(r),c=r.layers.frontplot.select("g.barlayer");J5.makeTraceGroups(c,n,"trace bars").each(function(){var f=jet.select(this),v=J5.ensureSingle(f,"g","points"),g=v.selectAll("g.point").data(J5.identity);g.enter().append("g").style("vector-effect",a?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),g.exit().remove(),g.each(function(p){var x=jet.select(this),_=p.rp0=s.c2p(p.s0),y=p.rp1=s.c2p(p.s1),C=p.thetag0=l.c2g(p.p0),k=p.thetag1=l.c2g(p.p1),S;if(!AR(_)||!AR(y)||!AR(C)||!AR(k)||_===y||C===k)S="M0,0Z";else{var L=s.c2g(p.s1),w=(C+k)/2;p.ct=[i.c2p(L*Math.cos(w)),o.c2p(L*Math.sin(w))],S=u(_,y,C,k)}J5.ensureSingle(x,"path").attr("d",S)}),Wlr.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function Ylr(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,a,i,o){var s,l;J5.angleDelta(i,o)>0?(s=i,l=o):(s=o,l=i);var u=zJ.findEnclosingVertexAngles(s,e.vangles)[0],c=zJ.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return zJ.pathPolygonAnnulus(n,a,s,l,f,t,r)}:function(n,a,i,o){return J5.pathAnnulus(n,a,i,o,t,r)}}});var Zet=fe((_Er,Xet)=>{"use strict";var Xlr=kl(),qJ=Xt(),Zlr=I3().getTraceColor,$lr=qJ.fillText,Klr=bR().makeHoverPointText,Jlr=lR().isPtInsidePolygon;Xet.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?Jlr:qJ.isPtInsideSector,f=t.maxHoverDistance,v=l._period||2*Math.PI,g=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),p=Math.atan2(n,r);s.range[0]>s.range[1]&&(p+=Math.PI);var x=function(k){return c(g,p,[k.rp0,k.rp1],[k.thetag0,k.thetag1],u)?f+Math.min(1,Math.abs(k.thetag1-k.thetag0)/v)-1+(k.rp1-g)/(k.rp1-k.rp0)-1:1/0};if(Xlr.getClosest(a,x,t),t.index!==!1){var _=t.index,y=a[_];t.x0=t.x1=y.ct[0],t.y0=t.y1=y.ct[1];var C=qJ.extendFlat({},y,{r:y.s,theta:y.p});return $lr(y,i,t),Klr(C,i,o,t),t.hovertemplate=i.hovertemplate,t.color=Zlr(i,y),t.xLabelVal=t.yLabelVal=void 0,y.s<0&&(t.idealAlign="left"),[t]}}});var Ket=fe((bEr,$et)=>{"use strict";$et.exports={moduleType:"trace",name:"barpolar",basePlotModule:gR(),categories:["polar","bar","showLegend"],attributes:DJ(),layoutAttributes:RJ(),supplyDefaults:Oet(),supplyLayoutDefaults:Uet(),calc:IJ().calc,crossTraceCalc:IJ().crossTraceCalc,plot:Yet(),colorbar:Zf(),formatLabels:_R(),style:_v().style,styleOnSelect:_v().styleOnSelect,hoverPoints:Zet(),selectPoints:z3(),meta:{}}});var Qet=fe((wEr,Jet)=>{"use strict";Jet.exports=Ket()});var BJ=fe((TEr,ett)=>{"use strict";ett.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var OJ=fe((AEr,itt)=>{"use strict";var Qlr=tc(),ou=pf(),eur=nl().attributes,Zy=Xt().extendFlat,ttt=rl().overrideAll,rtt=ttt({color:ou.color,showline:Zy({},ou.showline,{dflt:!0}),linecolor:ou.linecolor,linewidth:ou.linewidth,showgrid:Zy({},ou.showgrid,{dflt:!0}),gridcolor:ou.gridcolor,gridwidth:ou.gridwidth,griddash:ou.griddash},"plot","from-root"),ntt=ttt({ticklen:ou.ticklen,tickwidth:Zy({},ou.tickwidth,{dflt:2}),tickcolor:ou.tickcolor,showticklabels:ou.showticklabels,labelalias:ou.labelalias,showtickprefix:ou.showtickprefix,tickprefix:ou.tickprefix,showticksuffix:ou.showticksuffix,ticksuffix:ou.ticksuffix,tickfont:ou.tickfont,tickformat:ou.tickformat,hoverformat:ou.hoverformat,layer:ou.layer},"plot","from-root"),tur=Zy({visible:Zy({},ou.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Zy({},ou.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},rtt,ntt),rur=Zy({visible:Zy({},ou.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:ou.ticks,editType:"calc"},rtt,ntt);itt.exports={domain:eur({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:Qlr.background},realaxis:tur,imaginaryaxis:rur,editType:"calc"}});var stt=fe((MEr,ott)=>{"use strict";var Q5=Xt(),nur=ni(),iur=Mo(),aur=b2(),our=jf().getSubplotData,sur=mm(),lur=gm(),uur=hA(),cur=Hp(),e4=OJ(),NJ=BJ(),att=NJ.axisNames,fur=dur(function(e){return Q5.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function hur(e,t,r,n){var a=r("bgcolor");n.bgColor=nur.combine(a,n.paper_bgcolor);var i=our(n.fullData,NJ.name,n.id),o=n.layoutOut,s;function l(L,w){return r(s+"."+L,w)}for(var u=0;u{"use strict";var vur=jf().getSubplotCalcData,pur=Xt().counterRegex,gur=kJ(),utt=BJ(),ctt=utt.attr,P_=utt.name,ltt=pur(P_),ftt={};ftt[ctt]={valType:"subplotid",dflt:P_,editType:"calc"};function mur(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[P_],a=0;a{"use strict";var{hovertemplateAttrs:xur,texttemplateAttrs:_ur,templatefallbackAttrs:vtt}=Oo(),MR=ta().extendFlat,bur=n1(),W0=Ol(),wur=Ho(),t4=W0.line;ptt.exports={mode:W0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:W0.text,texttemplate:_ur({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:vtt({editType:"plot"}),hovertext:W0.hovertext,line:{color:t4.color,width:t4.width,dash:t4.dash,backoff:t4.backoff,shape:MR({},t4.shape,{values:["linear","spline"]}),smoothing:t4.smoothing,editType:"calc"},connectgaps:W0.connectgaps,marker:W0.marker,cliponaxis:MR({},W0.cliponaxis,{dflt:!1}),textposition:W0.textposition,textfont:W0.textfont,fill:MR({},W0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:bur(),hoverinfo:MR({},wur.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:W0.hoveron,hovertemplate:xur(),hovertemplatefallback:vtt(),selected:W0.selected,unselected:W0.unselected}});var ytt=fe((kEr,mtt)=>{"use strict";var SR=Xt(),r4=Is(),Tur=vv(),Aur=lp(),gtt=f3(),Mur=up(),Sur=a1(),Eur=r1().PTS_LINESONLY,kur=UJ();mtt.exports=function(t,r,n,a){function i(l,u){return SR.coerce(t,r,kur,l,u)}var o=Cur(t,r,a,i);if(!o){r.visible=!1;return}i("mode",o{"use strict";var xtt=Yi();_tt.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot;return a.realLabel=xtt.tickText(i.radialAxis,t.real,!0).text,a.imagLabel=xtt.tickText(i.angularAxis,t.imag,!0).text,a}});var Att=fe((LEr,Ttt)=>{"use strict";var wtt=aa(),Lur=Wa().BADNUM,Pur=pv(),Fur=o1(),Dur=P0(),Rur=gv().calcMarkerSize;Ttt.exports=function(t,r){for(var n=t._fullLayout,a=r.subplot,i=n[a].realaxis,o=n[a].imaginaryaxis,s=i.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var Iur=m3(),Mtt=Wa().BADNUM,zur=SJ(),qur=zur.smith;Stt.exports=function(t,r,n){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var Bur=b3();function Our(e,t,r,n){var a=Bur(e,t,r,n);if(!(!a||a[0].index===!1)){var i=a[0];if(i.index===void 0)return a;var o=e.subplot,s=i.cd[i.index],l=i.trace;if(o.isPtInside(s))return i.xLabelVal=void 0,i.yLabelVal=void 0,ktt(s,l,o,i),i.hovertemplate=l.hovertemplate,a}}function ktt(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="real",i._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(v,g){u.push(v._hovertitle+": "+g)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(a,n.realLabel),f.indexOf("imag")!==-1&&c(i,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}Ctt.exports={hoverPoints:Our,makeHoverPointText:ktt}});var Ftt=fe((DEr,Ptt)=>{"use strict";Ptt.exports={moduleType:"trace",name:"scattersmith",basePlotModule:dtt(),categories:["smith","symbols","showLegend","scatter-like"],attributes:UJ(),supplyDefaults:ytt(),colorbar:Zf(),formatLabels:btt(),calc:Att(),plot:Ett(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:Ltt().hoverPoints,selectPoints:a2(),meta:{}}});var Rtt=fe((REr,Dtt)=>{"use strict";Dtt.exports=Ftt()});var GJ=fe((IEr,Itt)=>{"use strict";var Nur=Ho(),Uur=Oo().hovertemplateAttrs,ER=pl().axisHoverFormat,VJ=ta().extendFlat,Vur=_s(),Gur=Uc().dash,Hur=Fm(),F_=Ol(),jur={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:F_.x0,dx:F_.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:F_.y0,dy:F_.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:ER("x"),yhoverformat:ER("y"),uhoverformat:ER("u","noDate"),vhoverformat:ER("v","noDate"),hoverinfo:VJ({},Nur.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:Uur({},{keys:["x","y","u","v","text","name"]}),text:F_.text,textposition:F_.textposition,textfont:F_.textfont,marker:VJ({arrowsize:VJ({},Hur.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:Gur,editType:"style"},editType:"calc"},Vur("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};Itt.exports=jur});var qtt=fe((zEr,ztt)=>{"use strict";var mS=Xt(),Wur=GJ(),Yur=r2(),Xur=Wf().hasColorscale,Zur=Vc();ztt.exports=function(t,r,n,a){function i(p,x){return mS.coerce(t,r,Wur,p,x)}var o=Yur(t,r,a,i);if(!o){r.visible=!1;return}var s=i("u"),l=i("v");if(!mS.isArrayOrTypedArray(s)||s.length===0){r.u=new Array(o);for(var u=0;u{"use strict";var Hg=Xt(),n4=Yi(),yS=aa(),Btt=Wa().BADNUM,$ur=Mh(),Kur=P0(),Jur=.97;Ott.exports=function(t,r){let n=r._xA=n4.getFromId(t,r.xaxis||"x","x"),a=r._yA=n4.getFromId(t,r.yaxis||"y","y"),i=n.makeCalcdata(r,"x"),o=a.makeCalcdata(r,"y"),s=Math.min(i.length,o.length);r._length=s;let l=new Array(s);var u=1/0,c=-1/0,f=1/0,v=-1/0;let g=r.marker.color,p=Hg.isArrayOrTypedArray(g),x=r.u||[],_=r.v||[],{anchor:y,lengthmode:C,arrowref:k}=r,S=y==="tip",L=y==="center";for(var w=1/0,A=-1/0,T=1/0,m=-1/0,F=1/0,E=-1/0,I=1/0,R=-1/0,B=0,O=0;OA&&(A=i[O]),o[O]m&&(m=o[O]),UE&&(E=U),JR&&(R=J);var ee=Math.sqrt(U*U+J*J);if(ee>c&&(c=ee),eev&&(v=ce))}}else V.x=Btt,V.y=Btt}if(r._maxNorm=c,C==="scaled"||k==="paper"){let ie=A-w,le=m-T;var ye;ie===0&&le===0?ye=1:ye=(ie+le+Math.sqrt((ie-le)*(ie-le)+4*B*ie*le))/(2*(B-1)),ye*=Jur,r._scaleFactor=ye/r._maxNorm}else r._scaleFactor=1;r._scaleFactor*=r.lengthfactor;let xe=new Array(s),ue=new Array(s),K=new Array(s),_e=new Array(s);for(var ne,ae,O=0;O{"use strict";Utt.exports=function(t,r){}});var kR=fe((OEr,jtt)=>{"use strict";var HJ=xi(),Gtt=Xt(),xS=ea(),Qur=js(),ecr=Y1().DESELECTDIM;function jJ(e,t){var r=t.marker||{},n=Qur.makeColorScaleFuncFromTrace(r);e.style("stroke",function(a){var i=r.color,o;if(Gtt.isArrayOrTypedArray(i)&&i.length>a.i&&isFinite(i[a.i]))o=i[a.i];else{var s=t.u&&t.u[a.i]||0,l=t.v&&t.v[a.i]||0;o=Math.sqrt(s*s+l*l)}return n(o)})}function tcr(e){var t=HJ.select(e).selectAll("g.trace.quiver");t.each(function(r){Htt(e,r,HJ.select(this))})}function rcr(e,t,r){Htt(e,t,r)}function Htt(e,t,r){var n=t[0].trace,a=n.marker||{},i=a.line||{},o=Gtt.isArrayOrTypedArray(a.color)?void 0:a.color,s=n._hasColorscale;if(r)if(n.selectedpoints){var l=(n.selected||{}).marker||{},u=(n.unselected||{}).marker||{},c=l.line||{},f=u.line||{};r.selectAll("path.js-line").each(function(g){var p=HJ.select(this),x=!g.selected,_=x?u.color:l.color,y=x?f.width!==void 0?f.width:i.width:c.width!==void 0?c.width:i.width;_?(xS.lineGroupStyle(p,y,_,i.dash),p.style("stroke-opacity",1)):(xS.lineGroupStyle(p,y,o,i.dash),s&&jJ(p,n),p.style("stroke-opacity",x?ecr:1))}),xS.selectedTextStyle(r.selectAll("text"),n)}else{var v=r.selectAll("path.js-line");v.call(xS.lineGroupStyle,i.width,o,i.dash),s&&jJ(v,n),v.style("stroke-opacity",1),xS.textPointStyle(r.selectAll("text"),n,e)}}jtt.exports={style:tcr,styleOnSelect:rcr,colorscaleStroke:jJ}});var Xtt=fe((NEr,Ytt)=>{"use strict";var Rp=xi(),ncr=Xt(),_S=ea(),icr=kR().colorscaleStroke,CR=Math.PI/12,acr=5.8,ocr=1.5,scr=.7;Ytt.exports=function(t,r,n,a,i,o){var s,l,u=!i,c=!!i&&i.duration>0;if(s=a.selectAll("g.trace").data(n,function(v){return v[0].trace.uid}),s.enter().append("g").attr("class",function(v){return"trace quiver trace"+v[0].trace.uid}).style("stroke-miterlimit",2),s.order(),c){o&&(l=o());var f=Rp.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});f.each(function(){a.selectAll("g.trace").each(function(v,g){Wtt(t,g,r,v,n,this,i)})})}else s.each(function(v,g){Wtt(t,g,r,v,n,this,i)});u&&s.exit().remove()};function Wtt(e,t,r,n,a,i,o){var s=n[0].trace,l=r.xaxis,u=r.yaxis;n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=Rp.select(i);var c=Rp.select(i).selectAll("g.lines").data([n]);c.enter().append("g").classed("lines",!0),_S.setClipUrl(c,r.layerClipId,e);var f=c.selectAll("path.js-line").data(n);f.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),f.exit().remove();let{anchor:v,maxNorm:g=0,arrowref:p}=s,x=p==="paper"?s._scaleFactor*Math.sqrt(Math.abs(l._m*u._m)):s._scaleFactor,_=s.marker.arrowsize;f.each(function(A){let T=Rp.select(this);if(A.x===void 0||A.y===void 0){T.attr("d",null);return}let m=(p==="paper"?A._u*Math.sign(l._m):Rp.round(l._m*A._u))*x,F=(p==="paper"?A._v*Math.sign(u._m):Rp.round(u._m*A._v))*x,E=(s._input.marker||{}).arrowsize!==void 0;var I,R,B,O;v==="tip"?(I=l.c2p(A.x)-m,B=u.c2p(A.y)-F,R=l.c2p(A.x),O=u.c2p(A.y)):v==="center"?(I=l.c2p(A.x)-m/2,B=u.c2p(A.y)-F/2,R=l.c2p(A.x)+m/2,O=u.c2p(A.y)+F/2):(I=l.c2p(A.x),B=u.c2p(A.y),R=l.c2p(A.x)+m,O=u.c2p(A.y)+F),A._px0=I,A._py0=B,A._px1=R,A._py1=O;var V=s.marker.line.width;E||(V=Math.max(V,ocr));let j=Math.sqrt((R-I)*(R-I)+(O-B)*(O-B)),q=scr*j,U=Math.min(acr*_*V,q),J=Math.atan2(O-B,R-I),ee=R-U*Math.cos(J-CR),ce=O-U*Math.sin(J-CR),ye=R-U*Math.cos(J+CR),xe=O-U*Math.sin(J+CR),ue="M"+I+","+B+"L"+R+","+O+"L"+ee+","+ce+"L"+R+","+O+"L"+ye+","+xe;T.attr("d",ue)});var y=s.marker||{},C=y.line||{},k=ncr.isArrayOrTypedArray(y.color)?void 0:y.color;_S.lineGroupStyle(f,C.width,k,C.dash),s._hasColorscale&&icr(f,s);var S=Rp.select(i).selectAll("g.text").data([n]);S.enter().append("g").classed("text",!0),_S.setClipUrl(S,r.layerClipId,e);var L=S.selectAll("g.textpoint").data(n);if(L.enter().append("g").classed("textpoint",!0).append("text"),L.exit().remove(),L.each(function(A){var T=Rp.select(this),m=_S.translatePoint(A,T.select("text"),l,u);m||T.remove()}),L.selectAll("text").call(_S.textPointStyle,s,e).each(function(A){var T=l.c2p(A.x),m=u.c2p(A.y);Rp.select(this).selectAll("tspan.line").each(function(){Rp.select(this).attr({x:T,y:m})})}),o&&o.duration>0){var w=Rp.transition().duration(o.duration).ease(o.easing);f.transition(w).style("opacity",1)}}});var Ktt=fe((UEr,$tt)=>{"use strict";var Ztt=Xt(),lcr=kl(),ucr=_3();function ccr(e,t,r,n,a,i){let o=a-r,s=i-n,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-n)*(t-n));var u=((e-r)*o+(t-n)*s)/l;u=Math.max(0,Math.min(1,u));let c=r+u*o,f=n+u*s;return Math.sqrt((e-c)*(e-c)+(t-f)*(t-f))}$tt.exports=function(t,r,n,a){var i=t.cd,o=i[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=function(k){return k._px0===void 0?1/0:ccr(u,c,k._px0,k._py0,k._px1,k._py1)};if(lcr.getClosest(i,f,t),t.index!==!1){var v=i[t.index],g=s.c2p(v.x,!0),p=l.c2p(v.y,!0),x=Math.sqrt((u-g)*(u-g)+(c-p)*(c-p));t.index=v.i;var _=o.u?o.u[v.i]:0,y=o.v?o.v[v.i]:0,C="u: "+_+", v: "+y;return Ztt.extendFlat(t,{color:ucr(o,v),x0:g-3,x1:g+3,xLabelVal:v.x,y0:p-3,y1:p+3,yLabelVal:v.y,uLabelVal:_,vLabelVal:y,extraText:C,spikeDistance:x,hovertemplate:o.hovertemplate}),Ztt.fillText(v,o,t),[t]}}});var ert=fe((VEr,Qtt)=>{"use strict";var LR=Yi(),Jtt=Xt();Qtt.exports=function(t,r,n){var a={},i={_fullLayout:n},o=LR.getFromTrace(i,r,"x"),s=LR.getFromTrace(i,r,"y"),l=t.x,u=t.y;a.xLabel=LR.tickText(o,o.c2l(l),!0).text,a.yLabel=LR.tickText(s,s.c2l(u),!0).text;var c=r.u?r.u[t.i]:0,f=r.v?r.v[t.i]:0,v=r.uhoverformat,g=r.vhoverformat;return a.uLabel=v?Jtt.numberFormat(v)(c):String(c),a.vLabel=g?Jtt.numberFormat(g)(f):String(f),a}});var rrt=fe((GEr,trt)=>{"use strict";trt.exports=function(t,r,n,a,i){return t.x=r.x,t.y=r.y,t.u=n.u?n.u[i]:void 0,t.v=n.v?n.v[i]:void 0,t}});var irt=fe((HEr,nrt)=>{"use strict";nrt.exports={moduleType:"trace",name:"quiver",basePlotModule:gu(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:GJ(),supplyDefaults:qtt(),calc:Ntt(),crossTraceCalc:Vtt(),plot:Xtt(),style:kR().style,styleOnSelect:kR().styleOnSelect,hoverPoints:Ktt(),formatLabels:ert(),eventData:rrt(),selectPoints:a2(),colorbar:Zf(),animatable:!0,meta:{}}});var ort=fe((jEr,art)=>{"use strict";art.exports=irt()});var Ih=fe((WEr,lrt)=>{var FR=Zc();function srt(){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={}}FR(srt.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,a):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(i===0?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function WJ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(io.local.invalidDate||io.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function PR(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}FR(WJ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(io.local.invalidDate||io.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,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(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(io.local.differentCalendars||io.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+PR(Math.abs(this.year()),4)+"-"+PR(this.month(),2)+"-"+PR(this.day(),2)}});function YJ(){this.shortYearCutoff="+10"}FR(YJ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new WJ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+PR(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,io.local.invalidMonth||io.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,io.local.invalidMonth||io.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.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(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,io.local.invalidDate||io.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var n=e.toJD()+t*(r==="w"?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),a=e.day(),s=function(c){for(;of-1+c.minMonth;)i++,o-=f,f=c.monthsInYear(i)};r==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):r==="m"&&(s(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||e.year()>0!=t[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;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,io.local.invalidDate||io.regionalOptions[""].invalidDate);var n=r==="y"?t:e.year(),a=r==="m"?t:e.month(),i=r==="d"?t:e.day();return(r==="y"||r==="m")&&(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=a-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.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(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var io=lrt.exports=new srt;io.cdate=WJ;io.baseCalendar=YJ;io.calendars.gregorian=XJ});var urt=fe(()=>{var ZJ=Zc(),Tf=Ih();ZJ(Tf.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"});Tf.local=Tf.regionalOptions[""];ZJ(Tf.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});ZJ(Tf.baseCalendar.prototype,{UNIX_EPOCH:Tf.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:Tf.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,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(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw Tf.local.invalidFormat||Tf.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,i=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(S,L){for(var w=1;k+w1},c=function(S,L,w,A){var T=""+L;if(u(S,A))for(;T.length1},C=function(I,R){var B=y(I,R),O=[2,3,B?4:2,B?4:2,10,11,20]["oyYJ@!".indexOf(I)+1],V=new RegExp("^-?\\d{1,"+O+"}"),j=t.substring(T).match(V);if(!j)throw(Tf.local.missingNumberAt||Tf.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=j[0].length,parseInt(j[0],10)},k=this,S=function(){if(typeof s=="function"){y("m");var I=s.call(k,t.substring(T));return T+=I.length,I}return C("m")},L=function(I,R,B,O){for(var V=y(I,O)?B:R,j=0;j-1){v=1,g=p;for(var E=this.daysInMonth(f,v);g>E;E=this.daysInMonth(f,v))v++,g-=E}return c>-1?this.fromJD(c):this.newDate(f,v,g)},determineDate:function(e,t,r,n,a){r&&typeof r!="object"&&(a=n,n=r,r=null),typeof n!="string"&&(a=n,n="");var i=this,o=function(s){try{return i.parseDate(n,s,a)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e),e}})});var crt=fe(()=>{var $y=Ih(),fcr=Zc(),$J=$y.instance();function DR(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}DR.prototype=new $y.baseCalendar;fcr(DR.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(dcr);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var t=e.match(vcr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=this.toChineseMonth(r,n),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"][a-1];return this.isIntercalaryMonth(r,n)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(pcr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=this.toChineseMonth(r,n),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(r,n)&&(i="\u95F0"+i),i},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]==="\u95F0"&&(n=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var a=t[t.length-1];n=a==="i"||a==="I"}var i=this.toMonthIndex(e,r,n);return i},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(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),a=r&&t!==n;if(a||t<1||t>12)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return n?!r&&t<=n?i=t-1:i=t:i=t-1,i},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,$y.local.invalidyear),a=Jy[n-Jy[0]],i=a>>9&4095,o=a>>5&15,s=a&31,l;l=$J.newDate(i,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=Ky[e-Ky[0]],n=r>>13,a=n?12:11;if(t>a)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=r&1<<12-t?30:29;return i},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,i,r,$y.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var a=this.isIntercalaryMonth(e,t),i=this.toChineseMonth(e,t),o=mcr(e,i,r,a);return $J.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=$J.fromJD(e),r=gcr(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(hcr),r=this._validateYear(+t[1]),n=+t[2],a=!!t[3],i=this.toMonthIndex(r,n,a),o=+t[4];return this.newDate(r,i,o)},add:function(e,t,r){var n=e.year(),a=e.month(),i=this.isIntercalaryMonth(n,a),o=this.toChineseMonth(n,a),s=Object.getPrototypeOf(DR.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=i&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var hcr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,dcr=/^\d?\d[iI]?/m,vcr=/^闰?十?[一二三四五六七八九]?月/m,pcr=/^闰?十?[一二三四五六七八九]?/m;$y.calendars.chinese=DR;var Ky=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],Jy=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function gcr(e,t,r,n){var a,i;if(typeof e=="object")a=e,i=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i=n||{}}var u=Jy[a.year-Jy[0]],c=a.year<<9|a.month<<5|a.day;i.year=c>=u?a.year:a.year-1,u=Jy[i.year-Jy[0]];var f=u>>9&4095,v=u>>5&15,g=u&31,p,x=new Date(f,v-1,g),_=new Date(a.year,a.month-1,a.day);p=Math.round((_-x)/(24*3600*1e3));var y=Ky[i.year-Ky[0]],C;for(C=0;C<13;C++){var k=y&1<<12-C?30:29;if(p>13;return!S||C=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,i=n):(c=!!n,i=a||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var v=Ky[o.year-Ky[0]],g=v>>13,p;g&&(o.month>g||o.isIntercalary)?p=o.month:p=o.month-1;for(var x=0;x>9&4095,k=y>>5&15,S=y&31,L=new Date(C,k-1,S+f);return i.year=L.getFullYear(),i.month=1+L.getMonth(),i.day=L.getDate(),i}});var frt=fe(()=>{var D_=Ih(),ycr=Zc();function KJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}KJ.prototype=new D_.baseCalendar;ycr(KJ.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,D_.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,D_.local.invalidYear||D_.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,D_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,D_.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-(n-1)*30+1;return this.newDate(r,n,a)}});D_.calendars.coptic=KJ});var hrt=fe(()=>{var jg=Ih(),xcr=Zc();function JJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}JJ.prototype=new jg.baseCalendar;xcr(JJ.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,jg.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return{century:_cr[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var _cr={20:"Fruitbat",21:"Anchovy"};jg.calendars.discworld=JJ});var drt=fe(()=>{var R_=Ih(),bcr=Zc();function QJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}QJ.prototype=new R_.baseCalendar;bcr(QJ.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,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(r){var t=this._validate(r,this.minMonth,this.minDay,R_.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,R_.local.invalidYear||R_.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,R_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,R_.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-(n-1)*30+1;return this.newDate(r,n,a)}});R_.calendars.ethiopian=QJ});var vrt=fe(()=>{var Qy=Ih(),wcr=Zc();function eQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}eQ.prototype=new Qy.baseCalendar;wcr(eQ.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(e){var t=this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,RR(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Qy.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&RR(this.daysInYear(e),10)===5?30:t===9&&RR(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Qy.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Qy.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=e<=0?e+1:e,i=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function RR(e,t){return e-t*Math.floor(e/t)}Qy.calendars.hebrew=eQ});var prt=fe(()=>{var bS=Ih(),Tcr=Zc();function tQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}tQ.prototype=new bS.baseCalendar;Tcr(tQ.prototype,{name:"Islamic",jdEpoch:19484395e-1,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(e){var t=this._validate(e,this.minMonth,this.minDay,bS.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,bS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,bS.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});bS.calendars.islamic=tQ});var grt=fe(()=>{var wS=Ih(),Acr=Zc();function rQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}rQ.prototype=new wS.baseCalendar;Acr(rQ.prototype,{name:"Julian",jdEpoch:17214235e-1,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(r){var t=this._validate(r,this.minMonth,this.minDay,wS.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,wS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,wS.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),a=Math.floor(365.25*n),i=Math.floor((r-a)/30.6001),o=i-Math.floor(i<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-a-Math.floor(30.6001*i);return s<=0&&s--,this.newDate(s,o,l)}});wS.calendars.julian=rQ});var yrt=fe(()=>{var Uv=Ih(),Mcr=Zc();function iQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}iQ.prototype=new Uv.baseCalendar;Mcr(iQ.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(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,Uv.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,Uv.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,Uv.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate),a=n.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(e){e-=this.jdEpoch;var t=nQ(e+8+340,365);return[Math.floor(t/20)+1,nQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[mrt(e+20,20),mrt(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function nQ(e,t){return e-t*Math.floor(e/t)}function mrt(e,t){return nQ(e-1,t)+1}Uv.calendars.mayan=iQ});var _rt=fe(()=>{var I_=Ih(),Scr=Zc();function aQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}aQ.prototype=new I_.baseCalendar;var xrt=I_.instance("gregorian");Scr(aQ.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,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(e){var t=this._validate(e,this.minMonth,this.minDay,I_.local.invalidYear||I_.regionalOptions[""].invalidYear);return xrt.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,I_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,I_.local.invalidMonth),a=n.year();a<0&&a++;for(var i=n.day(),o=1;o=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});I_.calendars.nanakshahi=aQ});var brt=fe(()=>{var z_=Ih(),Ecr=Zc();function oQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}oQ.prototype=new z_.baseCalendar;Ecr(oQ.prototype,{name:"Nepali",jdEpoch:17007095e-1,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(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,z_.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,z_.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,z_.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=z_.instance(),i=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(i=r,o--);o!==9;)o<=0&&(o=12,s--),i+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(i+=r-this.NEPALI_CALENDAR_DATA[s][0],i<0&&(i+=a.daysInYear(l))):i+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],a.newDate(l,1,1).add(i,"d").toJD()},fromJD:function(e){var t=z_.instance(),r=t.fromJD(e),n=r.year(),a=r.dayOfYear(),i=n+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++,o>12&&(o=1,i++),l+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var i4=Ih(),kcr=Zc();function zR(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function IR(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,a=r*(t+1),i=n-Math.floor(n),o=a-Math.floor(a);return i>o}zR.prototype=new i4.baseCalendar;kcr(zR.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,i4.local.invalidYear);return IR(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,i4.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,i4.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=0;if(e>0)for(var i=1;i0?e-1:e)*365+a+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,IR(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,a=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),i=e-this.toJD(r,a,1)+1;return this.newDate(r,a,i)}});i4.calendars.persian=zR;i4.calendars.jalali=zR});var Trt=fe(()=>{var q_=Ih(),Ccr=Zc(),qR=q_.instance();function sQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}sQ.prototype=new q_.baseCalendar;Ccr(sQ.prototype,{name:"Taiwan",jdEpoch:24194025e-1,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(r){var t=this._validate(r,this.minMonth,this.minDay,q_.local.invalidYear),r=this._t2gYear(t.year());return qR.leapYear(r)},weekOfYear:function(a,t,r){var n=this._validate(a,this.minMonth,this.minDay,q_.local.invalidYear),a=this._t2gYear(n.year());return qR.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,q_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,q_.local.invalidDate),a=this._t2gYear(n.year());return qR.toJD(a,n.month(),n.day())},fromJD:function(e){var t=qR.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});q_.calendars.taiwan=sQ});var Art=fe(()=>{var B_=Ih(),Lcr=Zc(),BR=B_.instance();function lQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}lQ.prototype=new B_.baseCalendar;Lcr(lQ.prototype,{name:"Thai",jdEpoch:15230985e-1,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(r){var t=this._validate(r,this.minMonth,this.minDay,B_.local.invalidYear),r=this._t2gYear(t.year());return BR.leapYear(r)},weekOfYear:function(a,t,r){var n=this._validate(a,this.minMonth,this.minDay,B_.local.invalidYear),a=this._t2gYear(n.year());return BR.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,B_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,B_.local.invalidDate),a=this._t2gYear(n.year());return BR.toJD(a,n.month(),n.day())},fromJD:function(e){var t=BR.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});B_.calendars.thai=lQ});var Mrt=fe(()=>{var O_=Ih(),Pcr=Zc();function uQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}uQ.prototype=new O_.baseCalendar;Pcr(uQ.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(e){var t=this._validate(e,this.minMonth,this.minDay,O_.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,O_.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,i=0;in)return ex[a]-ex[a-1];a++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,O_.local.invalidDate),a=12*(n.year()-1)+n.month()-15292,i=n.day()+ex[a-1]-1;return i+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),o=i+1,s=a-12*i,l=t-ex[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=O_.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var a=O_.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}});O_.calendars.ummalqura=uQ;var ex=[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]});var Ert=fe((Tkr,Srt)=>{"use strict";Srt.exports=Ih();urt();crt();frt();hrt();drt();vrt();prt();grt();yrt();_rt();brt();wrt();Trt();Art();Mrt()});var Rrt=fe((Akr,Drt)=>{"use strict";var Crt=Ert(),TS=Xt(),Lrt=Wa(),Fcr=Lrt.EPOCHJD,Dcr=Lrt.ONEDAY,hQ={valType:"enumerated",values:TS.sortObjectKeys(Crt.calendars),editType:"calc",dflt:"gregorian"},Prt=function(e,t,r,n){var a={};return a[r]=hQ,TS.coerce(e,t,a,r,n)},Rcr=function(e,t,r,n){for(var a=0;a{"use strict";Irt.exports=Rrt()});var Ncr=fe((Skr,Brt)=>{var qrt=_2e();qrt.register([w_e(),ube(),A3e(),j3e(),awe(),t5e(),v5e(),r4e(),P4e(),dTe(),eAe(),SCe(),p7e(),o9e(),X9e(),MPe(),ZPe(),uDe(),kDe(),WDe(),iRe(),yRe(),DRe(),ZRe(),Fze(),Jze(),xGe(),xHe(),wje(),Xje(),fYe(),SYe(),$Ye(),uZe(),DZe(),v$e(),zKe(),sJe(),kJe(),eQe(),vQe(),vet(),Ret(),Qet(),Rtt(),ort(),zrt()]);Brt.exports=qrt});return Ncr();})(); /*! * The buffer module from node.js, for the browser. * @@ -3372,7 +3593,7 @@ object-assign/index.js: maplibre-gl/dist/maplibre-gl.js: (** * MapLibre GL JS - * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt + * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.24.0/LICENSE.txt *) */ diff --git a/plotly/package_data/widgetbundle.js b/plotly/package_data/widgetbundle.js index b051d1bd1c..72d8f8e2df 100644 --- a/plotly/package_data/widgetbundle.js +++ b/plotly/package_data/widgetbundle.js @@ -1,90 +1,93 @@ -var KV=Object.create;var iS=Object.defineProperty;var JV=Object.getOwnPropertyDescriptor;var QV=Object.getOwnPropertyNames;var eH=Object.getPrototypeOf,tH=Object.prototype.hasOwnProperty;var rH=(ie,fe)=>()=>(fe||ie((fe={exports:{}}).exports,fe),fe.exports);var aH=(ie,fe,Re,ct)=>{if(fe&&typeof fe=="object"||typeof fe=="function")for(let Bt of QV(fe))!tH.call(ie,Bt)&&Bt!==Re&&iS(ie,Bt,{get:()=>fe[Bt],enumerable:!(ct=JV(fe,Bt))||ct.enumerable});return ie};var nH=(ie,fe,Re)=>(Re=ie!=null?KV(eH(ie)):{},aH(fe||!ie||!ie.__esModule?iS(Re,"default",{value:ie,enumerable:!0}):Re,ie));var m9=rH((p9,L_)=>{(function(ie,fe){typeof L_=="object"&&L_.exports?L_.exports=fe():ie.moduleName=fe()})(typeof self<"u"?self:p9,()=>{"use strict";var ie=(()=>{var fe=Object.create,Re=Object.defineProperty,ct=Object.defineProperties,Bt=Object.getOwnPropertyDescriptor,ur=Object.getOwnPropertyDescriptors,Gr=Object.getOwnPropertyNames,ua=Object.getOwnPropertySymbols,da=Object.getPrototypeOf,zn=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable,qn=(j,N,u)=>N in j?Re(j,N,{enumerable:!0,configurable:!0,writable:!0,value:u}):j[N]=u,Si=(j,N)=>{for(var u in N||(N={}))zn.call(N,u)&&qn(j,u,N[u]);if(ua)for(var u of ua(N))Cn.call(N,u)&&qn(j,u,N[u]);return j},co=(j,N)=>ct(j,ur(N)),jo=(j,N)=>{var u={};for(var v in j)zn.call(j,v)&&N.indexOf(v)<0&&(u[v]=j[v]);if(j!=null&&ua)for(var v of ua(j))N.indexOf(v)<0&&Cn.call(j,v)&&(u[v]=j[v]);return u},di=(j,N,u)=>function(){if(u)throw u[0];try{return j&&(N=(0,j[Gr(j)[0]])(j=0)),N}catch(w){throw u=[w],w}},De=(j,N)=>function(){try{return N||(0,j[Gr(j)[0]])((N={exports:{}}).exports,N),N.exports}catch(v){throw N=0,v}},Zo=(j,N)=>{for(var u in N)Re(j,u,{get:N[u],enumerable:!0})},Rs=(j,N,u,v)=>{if(N&&typeof N=="object"||typeof N=="function")for(let w of Gr(N))!zn.call(j,w)&&w!==u&&Re(j,w,{get:()=>N[w],enumerable:!(v=Bt(N,w))||v.enumerable});return j},Du=(j,N,u)=>(u=j!=null?fe(da(j)):{},Rs(N||!j||!j.__esModule?Re(u,"default",{value:j,enumerable:!0}):u,j)),ts=j=>Rs(Re({},"__esModule",{value:!0}),j),cf=De({"src/version.js"(j){"use strict";j.version="4.0.0-rc.0"}}),Vu=De({"node_modules/native-promise-only/lib/npo.src.js"(j,N){(function(v,w,S){w[v]=w[v]||S(),typeof N<"u"&&N.exports&&(N.exports=w[v])})("Promise",typeof window<"u"?window:j,function(){"use strict";var v,w,S,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(x){return setImmediate(x)}:setTimeout;try{Object.defineProperty({},"x",{}),v=function(x,M,T,E){return Object.defineProperty(x,M,{value:T,writable:!0,configurable:E!==!1})}}catch{v=function(M,T,E){return M[T]=E,M}}S=function(){var x,M,T;function E(g,A){this.fn=g,this.self=A,this.next=void 0}return{add:function(A,m){T=new E(A,m),M?M.next=T:x=T,M=T,T=void 0},drain:function(){var A=x;for(x=M=w=void 0;A;)A.fn.call(A.self),A=A.next}}}();function t(o,x){S.add(o,x),w||(w=e(S.drain))}function a(o){var x,M=typeof o;return o!=null&&(M=="object"||M=="function")&&(x=o.then),typeof x=="function"?x:!1}function r(){for(var o=0;o0&&t(r,M))}catch(T){s.call(new p(M),T)}}}function s(o){var x=this;x.triggered||(x.triggered=!0,x.def&&(x=x.def),x.msg=o,x.state=2,x.chain.length>0&&t(r,x))}function c(o,x,M,T){for(var E=0;Ewe?1:ue>=we?0:NaN}u.descending=function(ue,we){return weue?1:we>=ue?0:NaN},u.min=function(ue,we){var Ne=-1,Ke=ue.length,et,ot;if(arguments.length===1){for(;++Ne=ot){et=ot;break}for(;++Neot&&(et=ot)}else{for(;++Ne=ot){et=ot;break}for(;++Neot&&(et=ot)}return et},u.max=function(ue,we){var Ne=-1,Ke=ue.length,et,ot;if(arguments.length===1){for(;++Ne=ot){et=ot;break}for(;++Neet&&(et=ot)}else{for(;++Ne=ot){et=ot;break}for(;++Neet&&(et=ot)}return et},u.extent=function(ue,we){var Ne=-1,Ke=ue.length,et,ot,kt;if(arguments.length===1){for(;++Ne=ot){et=kt=ot;break}for(;++Neot&&(et=ot),kt=ot){et=kt=ot;break}for(;++Neot&&(et=ot),kt1)return kt/(Ut-1)},u.deviation=function(){var ue=u.variance.apply(this,arguments);return ue&&Math.sqrt(ue)};function f(ue){return{left:function(we,Ne,Ke,et){for(arguments.length<3&&(Ke=0),arguments.length<4&&(et=we.length);Ke>>1;ue(we[ot],Ne)<0?Ke=ot+1:et=ot}return Ke},right:function(we,Ne,Ke,et){for(arguments.length<3&&(Ke=0),arguments.length<4&&(et=we.length);Ke>>1;ue(we[ot],Ne)>0?et=ot:Ke=ot+1}return Ke}}}var d=f(s);u.bisectLeft=d.left,u.bisect=u.bisectRight=d.right,u.bisector=function(ue){return f(ue.length===1?function(we,Ne){return s(ue(we),Ne)}:ue)},u.shuffle=function(ue,we,Ne){(Ke=arguments.length)<3&&(Ne=ue.length,Ke<2&&(we=0));for(var Ke=Ne-we,et,ot;Ke;)ot=Math.random()*Ke--|0,et=ue[Ke+we],ue[Ke+we]=ue[ot+we],ue[ot+we]=et;return ue},u.permute=function(ue,we){for(var Ne=we.length,Ke=new Array(Ne);Ne--;)Ke[Ne]=ue[we[Ne]];return Ke},u.pairs=function(ue){for(var we=0,Ne=ue.length-1,Ke,et=ue[0],ot=new Array(Ne<0?0:Ne);we=0;)for(kt=ue[we],Ne=kt.length;--Ne>=0;)ot[--et]=kt[Ne];return ot};var o=Math.abs;u.range=function(ue,we,Ne){if(arguments.length<3&&(Ne=1,arguments.length<2&&(we=ue,ue=0)),(we-ue)/Ne===1/0)throw new Error("infinite range");var Ke=[],et=x(o(Ne)),ot=-1,kt;if(ue*=et,we*=et,Ne*=et,Ne<0)for(;(kt=ue+Ne*++ot)>we;)Ke.push(kt/et);else for(;(kt=ue+Ne*++ot)=we.length)return et?et.call(ue,Ut):Ke?Ut.sort(Ke):Ut;for(var lr=-1,Dr=Ut.length,Pr=we[or++],ca,_a,Ur,Jr=new T,sa;++lr=we.length)return xt;var or=[],lr=Ne[Ut++];return xt.forEach(function(Dr,Pr){or.push({key:Dr,values:kt(Pr,Ut)})}),lr?or.sort(function(Dr,Pr){return lr(Dr.key,Pr.key)}):or}return ue.map=function(xt,Ut){return ot(Ut,xt,0)},ue.entries=function(xt){return kt(ot(u.map,xt,0),0)},ue.key=function(xt){return we.push(xt),ue},ue.sortKeys=function(xt){return Ne[we.length-1]=xt,ue},ue.sortValues=function(xt){return Ke=xt,ue},ue.rollup=function(xt){return et=xt,ue},ue},u.set=function(ue){var we=new F;if(ue)for(var Ne=0,Ke=ue.length;Ne=0&&(Ke=ue.slice(Ne+1),ue=ue.slice(0,Ne)),ue)return arguments.length<2?this[ue].on(Ke):this[ue].on(Ke,we);if(arguments.length===2){if(we==null)for(ue in this)this.hasOwnProperty(ue)&&this[ue].on(Ke,null);return this}};function q(ue){var we=[],Ne=new T;function Ke(){for(var et=we,ot=-1,kt=et.length,xt;++ot=0&&(Ne=ue.slice(0,we))!=="xmlns"&&(ue=ue.slice(we+1)),ce.hasOwnProperty(Ne)?{space:ce[Ne],local:ue}:ue}},X.attr=function(ue,we){if(arguments.length<2){if(typeof ue=="string"){var Ne=this.node();return ue=u.ns.qualify(ue),ue.local?Ne.getAttributeNS(ue.space,ue.local):Ne.getAttribute(ue)}for(we in ue)this.each(me(we,ue[we]));return this}return this.each(me(ue,we))};function me(ue,we){ue=u.ns.qualify(ue);function Ne(){this.removeAttribute(ue)}function Ke(){this.removeAttributeNS(ue.space,ue.local)}function et(){this.setAttribute(ue,we)}function ot(){this.setAttributeNS(ue.space,ue.local,we)}function kt(){var Ut=we.apply(this,arguments);Ut==null?this.removeAttribute(ue):this.setAttribute(ue,Ut)}function xt(){var Ut=we.apply(this,arguments);Ut==null?this.removeAttributeNS(ue.space,ue.local):this.setAttributeNS(ue.space,ue.local,Ut)}return we==null?ue.local?Ke:Ne:typeof we=="function"?ue.local?xt:kt:ue.local?ot:et}function ye(ue){return ue.trim().replace(/\s+/g," ")}X.classed=function(ue,we){if(arguments.length<2){if(typeof ue=="string"){var Ne=this.node(),Ke=(ue=Se(ue)).length,et=-1;if(we=Ne.classList){for(;++et=0;)(ot=Ne[Ke])&&(et&&et!==ot.nextSibling&&et.parentNode.insertBefore(ot,et),et=ot);return this},X.sort=function(ue){ue=be.apply(this,arguments);for(var we=-1,Ne=this.length;++we=we&&(we=et+1);!(Ut=kt[we])&&++we0&&(ue=ue.slice(0,et));var kt=yt.get(ue);kt&&(ue=kt,ot=Pt);function xt(){var lr=this[Ke];lr&&(this.removeEventListener(ue,lr,lr.$),delete this[Ke])}function Ut(){var lr=ot(we,w(arguments));xt.call(this),this.addEventListener(ue,this[Ke]=lr,lr.$=Ne),lr._=we}function or(){var lr=new RegExp("^__on([^.]+)"+u.requote(ue)+"$"),Dr;for(var Pr in this)if(Dr=Pr.match(lr)){var ca=this[Pr];this.removeEventListener(Dr[1],ca,ca.$),delete this[Pr]}}return et?we?Ut:xt:we?B:or}var yt=u.map({mouseenter:"mouseover",mouseleave:"mouseout"});S&&yt.forEach(function(ue){"on"+ue in S&&yt.remove(ue)});function At(ue,we){return function(Ne){var Ke=u.event;u.event=Ne,we[0]=this.__data__;try{ue.apply(this,we)}finally{u.event=Ke}}}function Pt(ue,we){var Ne=At(ue,we);return function(Ke){var et=this,ot=Ke.relatedTarget;(!ot||ot!==et&&!(ot.compareDocumentPosition(et)&8))&&Ne.call(et,Ke)}}var Zt,vr=0;function Nt(ue){var we=".dragsuppress-"+ ++vr,Ne="click"+we,Ke=u.select(e(ue)).on("touchmove"+we,Y).on("dragstart"+we,Y).on("selectstart"+we,Y);if(Zt==null&&(Zt="onselectstart"in ue?!1:D(ue.style,"userSelect")),Zt){var et=l(ue).style,ot=et[Zt];et[Zt]="none"}return function(kt){if(Ke.on(we,null),Zt&&(et[Zt]=ot),kt){var xt=function(){Ke.on(Ne,null)};Ke.on(Ne,function(){Y(),xt()},!0),setTimeout(xt,0)}}}u.mouse=function(ue){return nt(ue,ee())};var Kt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function nt(ue,we){we.changedTouches&&(we=we.changedTouches[0]);var Ne=ue.ownerSVGElement||ue;if(Ne.createSVGPoint){var Ke=Ne.createSVGPoint();if(Kt<0){var et=e(ue);if(et.scrollX||et.scrollY){Ne=u.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ot=Ne[0][0].getScreenCTM();Kt=!(ot.f||ot.e),Ne.remove()}}return Kt?(Ke.x=we.pageX,Ke.y=we.pageY):(Ke.x=we.clientX,Ke.y=we.clientY),Ke=Ke.matrixTransform(ue.getScreenCTM().inverse()),[Ke.x,Ke.y]}var kt=ue.getBoundingClientRect();return[we.clientX-kt.left-ue.clientLeft,we.clientY-kt.top-ue.clientTop]}u.touch=function(ue,we,Ne){if(arguments.length<3&&(Ne=we,we=ee().changedTouches),we){for(var Ke=0,et=we.length,ot;Ke0?1:ue<0?-1:0}function ht(ue,we,Ne){return(we[0]-ue[0])*(Ne[1]-ue[1])-(we[1]-ue[1])*(Ne[0]-ue[0])}function gt(ue){return ue>1?0:ue<-1?_e:Math.acos(ue)}function _t(ue){return ue>1?We:ue<-1?-We:Math.asin(ue)}function Ft(ue){return((ue=Math.exp(ue))-1/ue)/2}function St(ue){return((ue=Math.exp(ue))+1/ue)/2}function hr(ue){return((ue=Math.exp(2*ue))-1)/(ue+1)}function jr(ue){return(ue=Math.sin(ue/2))*ue}var ra=Math.SQRT2,$r=2,pa=4;u.interpolateZoom=function(ue,we){var Ne=ue[0],Ke=ue[1],et=ue[2],ot=we[0],kt=we[1],xt=we[2],Ut=ot-Ne,or=kt-Ke,lr=Ut*Ut+or*or,Dr,Pr;if(lr0&&(ti=ti.transition().duration(kt)),ti.call(ba.event)}function xi(){Jr&&Jr.domain(Ur.range().map(function(ti){return(ti-ue.x)/ue.k}).map(Ur.invert)),ga&&ga.domain(sa.range().map(function(ti){return(ti-ue.y)/ue.k}).map(sa.invert))}function _i(ti){xt++||ti({type:"zoomstart"})}function lo(ti){xi(),ti({type:"zoom",scale:ue.k,translate:[ue.x,ue.y]})}function mi(ti){--xt||(ti({type:"zoomend"}),Ne=null)}function $i(){var ti=this,Di=_a.of(ti,arguments),Ao=0,ss=u.select(e(ti)).on(or,iu).on(lr,yu),Cs=Zr(u.mouse(ti)),nl=Nt(ti);Jn.call(ti),_i(Di);function iu(){Ao=1,Nn(u.mouse(ti),Cs),lo(Di)}function yu(){ss.on(or,null).on(lr,null),nl(Ao),mi(Di)}}function ds(){var ti=this,Di=_a.of(ti,arguments),Ao={},ss=0,Cs,nl=".zoom-"+u.event.changedTouches[0].identifier,iu="touchmove"+nl,yu="touchend"+nl,dc=[],He=u.select(ti),Lt=Nt(ti);Tr(),_i(Di),He.on(Ut,null).on(Pr,Tr);function Dt(){var Or=u.touches(ti);return Cs=ue.k,Or.forEach(function(fa){fa.identifier in Ao&&(Ao[fa.identifier]=Zr(fa))}),Or}function Tr(){var Or=u.event.target;u.select(Or).on(iu,Nr).on(yu,qr),dc.push(Or);for(var fa=u.event.changedTouches,Sa=0,Ca=fa.length;Sa1){var cn=Pa[0],Wa=Pa[1],ta=cn[0]-Wa[0],gr=cn[1]-Wa[1];ss=ta*ta+gr*gr}}function Nr(){var Or=u.touches(ti),fa,Sa,Ca,Pa;Jn.call(ti);for(var En=0,cn=Or.length;En1?1:we,Ne=Ne<0?0:Ne>1?1:Ne,et=Ne<=.5?Ne*(1+we):Ne+we-Ne*we,Ke=2*Ne-et;function ot(xt){return xt>360?xt-=360:xt<0&&(xt+=360),xt<60?Ke+(et-Ke)*xt/60:xt<180?et:xt<240?Ke+(et-Ke)*(240-xt)/60:Ke}function kt(xt){return Math.round(ot(xt)*255)}return new Va(kt(ue+120),kt(ue),kt(ue-120))}u.hcl=xa;function xa(ue,we,Ne){return this instanceof xa?(this.h=+ue,this.c=+we,void(this.l=+Ne)):arguments.length<2?ue instanceof xa?new xa(ue.h,ue.c,ue.l):ue instanceof sn?mn(ue.l,ue.a,ue.b):mn((ue=tr((ue=u.rgb(ue)).r,ue.g,ue.b)).l,ue.a,ue.b):new xa(ue,we,Ne)}var Gn=xa.prototype=new Ta;Gn.brighter=function(ue){return new xa(this.h,this.c,Math.min(100,this.l+Yn*(arguments.length?ue:1)))},Gn.darker=function(ue){return new xa(this.h,this.c,Math.max(0,this.l-Yn*(arguments.length?ue:1)))},Gn.rgb=function(){return Pn(this.h,this.c,this.l).rgb()};function Pn(ue,we,Ne){return isNaN(ue)&&(ue=0),isNaN(we)&&(we=0),new sn(Ne,Math.cos(ue*=Xe)*we,Math.sin(ue)*we)}u.lab=sn;function sn(ue,we,Ne){return this instanceof sn?(this.l=+ue,this.a=+we,void(this.b=+Ne)):arguments.length<2?ue instanceof sn?new sn(ue.l,ue.a,ue.b):ue instanceof xa?Pn(ue.h,ue.c,ue.l):tr((ue=Va(ue)).r,ue.g,ue.b):new sn(ue,we,Ne)}var Yn=18,Zn=.95047,vi=1,Dn=1.08883,oi=sn.prototype=new Ta;oi.brighter=function(ue){return new sn(Math.min(100,this.l+Yn*(arguments.length?ue:1)),this.a,this.b)},oi.darker=function(ue){return new sn(Math.max(0,this.l-Yn*(arguments.length?ue:1)),this.a,this.b)},oi.rgb=function(){return on(this.l,this.a,this.b)};function on(ue,we,Ne){var Ke=(ue+16)/116,et=Ke+we/500,ot=Ke-Ne/200;return et=bi(et)*Zn,Ke=bi(Ke)*vi,ot=bi(ot)*Dn,new Va($a(3.2404542*et-1.5371385*Ke-.4985314*ot),$a(-.969266*et+1.8760108*Ke+.041556*ot),$a(.0556434*et-.2040259*Ke+1.0572252*ot))}function mn(ue,we,Ne){return ue>0?new xa(Math.atan2(Ne,we)*mt,Math.sqrt(we*we+Ne*Ne),ue):new xa(NaN,NaN,ue)}function bi(ue){return ue>.206893034?ue*ue*ue:(ue-4/29)/7.787037}function Li(ue){return ue>.008856?Math.pow(ue,1/3):7.787037*ue+4/29}function $a(ue){return Math.round(255*(ue<=.00304?12.92*ue:1.055*Math.pow(ue,1/2.4)-.055))}u.rgb=Va;function Va(ue,we,Ne){return this instanceof Va?(this.r=~~ue,this.g=~~we,void(this.b=~~Ne)):arguments.length<2?ue instanceof Va?new Va(ue.r,ue.g,ue.b):ar(""+ue,Va,Ga):new Va(ue,we,Ne)}function it(ue){return new Va(ue>>16,ue>>8&255,ue&255)}function Qe(ue){return it(ue)+""}var Jt=Va.prototype=new Ta;Jt.brighter=function(ue){ue=Math.pow(.7,arguments.length?ue:1);var we=this.r,Ne=this.g,Ke=this.b,et=30;return!we&&!Ne&&!Ke?new Va(et,et,et):(we&&we>4,Ke=Ke>>4|Ke,et=Ut&240,et=et>>4|et,ot=Ut&15,ot=ot<<4|ot):ue.length===7&&(Ke=(Ut&16711680)>>16,et=(Ut&65280)>>8,ot=Ut&255)),we(Ke,et,ot))}function cr(ue,we,Ne){var Ke=Math.min(ue/=255,we/=255,Ne/=255),et=Math.max(ue,we,Ne),ot=et-Ke,kt,xt,Ut=(et+Ke)/2;return ot?(xt=Ut<.5?ot/(et+Ke):ot/(2-et-Ke),ue==et?kt=(we-Ne)/ot+(we0&&Ut<1?0:kt),new Da(kt,xt,Ut)}function tr(ue,we,Ne){ue=Je(ue),we=Je(we),Ne=Je(Ne);var Ke=Li((.4124564*ue+.3575761*we+.1804375*Ne)/Zn),et=Li((.2126729*ue+.7151522*we+.072175*Ne)/vi),ot=Li((.0193339*ue+.119192*we+.9503041*Ne)/Dn);return sn(116*et-16,500*(Ke-et),200*(et-ot))}function Je(ue){return(ue/=255)<=.04045?ue/12.92:Math.pow((ue+.055)/1.055,2.4)}function bt(ue){var we=parseFloat(ue);return ue.charAt(ue.length-1)==="%"?Math.round(we*2.55):we}var qt=u.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});qt.forEach(function(ue,we){qt.set(ue,it(we))});function Qt(ue){return typeof ue=="function"?ue:function(){return ue}}u.functor=Qt,u.xhr=br(R);function br(ue){return function(we,Ne,Ke){return arguments.length===2&&typeof Ne=="function"&&(Ke=Ne,Ne=null),Ir(we,Ne,ue,Ke)}}function Ir(ue,we,Ne,Ke){var et={},ot=u.dispatch("beforesend","progress","load","error"),kt={},xt=new XMLHttpRequest,Ut=null;self.XDomainRequest&&!("withCredentials"in xt)&&/^(http(s)?:)?\/\//.test(ue)&&(xt=new XDomainRequest),"onload"in xt?xt.onload=xt.onerror=or:xt.onreadystatechange=function(){xt.readyState>3&&or()};function or(){var lr=xt.status,Dr;if(!lr&&Mr(xt)||lr>=200&&lr<300||lr===304){try{Dr=Ne.call(et,xt)}catch(Pr){ot.error.call(et,Pr);return}ot.load.call(et,Dr)}else ot.error.call(et,xt)}return xt.onprogress=function(lr){var Dr=u.event;u.event=lr;try{ot.progress.call(et,xt)}finally{u.event=Dr}},et.header=function(lr,Dr){return lr=(lr+"").toLowerCase(),arguments.length<2?kt[lr]:(Dr==null?delete kt[lr]:kt[lr]=Dr+"",et)},et.mimeType=function(lr){return arguments.length?(we=lr==null?null:lr+"",et):we},et.responseType=function(lr){return arguments.length?(Ut=lr,et):Ut},et.response=function(lr){return Ne=lr,et},["get","post"].forEach(function(lr){et[lr]=function(){return et.send.apply(et,[lr].concat(w(arguments)))}}),et.send=function(lr,Dr,Pr){if(arguments.length===2&&typeof Dr=="function"&&(Pr=Dr,Dr=null),xt.open(lr,ue,!0),we!=null&&!("accept"in kt)&&(kt.accept=we+",*/*"),xt.setRequestHeader)for(var ca in kt)xt.setRequestHeader(ca,kt[ca]);return we!=null&&xt.overrideMimeType&&xt.overrideMimeType(we),Ut!=null&&(xt.responseType=Ut),Pr!=null&&et.on("error",Pr).on("load",function(_a){Pr(null,_a)}),ot.beforesend.call(et,xt),xt.send(Dr??null),et},et.abort=function(){return xt.abort(),et},u.rebind(et,ot,"on"),Ke==null?et:et.get(Cr(Ke))}function Cr(ue){return ue.length===1?function(we,Ne){ue(we==null?Ne:null)}:ue}function Mr(ue){var we=ue.responseType;return we&&we!=="text"?ue.response:ue.responseText}u.dsv=function(ue,we){var Ne=new RegExp('["'+ue+` -]`),Ke=ue.charCodeAt(0);function et(or,lr,Dr){arguments.length<3&&(Dr=lr,lr=null);var Pr=Ir(or,we,lr==null?ot:kt(lr),Dr);return Pr.row=function(ca){return arguments.length?Pr.response((lr=ca)==null?ot:kt(ca)):lr},Pr}function ot(or){return et.parse(or.responseText)}function kt(or){return function(lr){return et.parse(lr.responseText,or)}}et.parse=function(or,lr){var Dr;return et.parseRows(or,function(Pr,ca){if(Dr)return Dr(Pr,ca-1);var _a=function(Ur){for(var Jr={},sa=Pr.length,ga=0;ga=_a)return Pr;if(ga)return ga=!1,Dr;var hn=Ur;if(or.charCodeAt(hn)===34){for(var wn=hn;wn++<_a;)if(or.charCodeAt(wn)===34){if(or.charCodeAt(wn+1)!==34)break;++wn}Ur=wn+2;var Nn=or.charCodeAt(wn+1);return Nn===13?(ga=!0,or.charCodeAt(wn+2)===10&&++Ur):Nn===10&&(ga=!0),or.slice(hn+1,wn).replace(/""/g,'"')}for(;Ur<_a;){var Nn=or.charCodeAt(Ur++),ni=1;if(Nn===10)ga=!0;else if(Nn===13)ga=!0,or.charCodeAt(Ur)===10&&(++Ur,++ni);else if(Nn!==Ke)continue;return or.slice(hn,Ur-ni)}return or.slice(hn)}for(;(sa=ba())!==Pr;){for(var Zr=[];sa!==Dr&&sa!==Pr;)Zr.push(sa),sa=ba();lr&&(Zr=lr(Zr,Jr++))==null||ca.push(Zr)}return ca},et.format=function(or){if(Array.isArray(or[0]))return et.formatRows(or);var lr=new F,Dr=[];return or.forEach(function(Pr){for(var ca in Pr)lr.has(ca)||Dr.push(lr.add(ca))}),[Dr.map(Ut).join(ue)].concat(or.map(function(Pr){return Dr.map(function(ca){return Ut(Pr[ca])}).join(ue)})).join(` -`)},et.formatRows=function(or){return or.map(xt).join(` -`)};function xt(or){return or.map(Ut).join(ue)}function Ut(or){return Ne.test(or)?'"'+or.replace(/\"/g,'""')+'"':or}return et},u.csv=u.dsv(",","text/csv"),u.tsv=u.dsv(" ","text/tab-separated-values");var Xr,Ra,wa,yn,fn=this[D(this,"requestAnimationFrame")]||function(ue){setTimeout(ue,17)};u.timer=function(){ri.apply(this,arguments)};function ri(ue,we,Ne){var Ke=arguments.length;Ke<2&&(we=0),Ke<3&&(Ne=Date.now());var et=Ne+we,ot={c:ue,t:et,n:null};return Ra?Ra.n=ot:Xr=ot,Ra=ot,wa||(yn=clearTimeout(yn),wa=1,fn(On)),ot}function On(){var ue=ui(),we=jn()-ue;we>24?(isFinite(we)&&(clearTimeout(yn),yn=setTimeout(On,we)),wa=0):(wa=1,fn(On))}u.timer.flush=function(){ui(),jn()};function ui(){for(var ue=Date.now(),we=Xr;we;)ue>=we.t&&we.c(ue-we.t)&&(we.c=null),we=we.n;return ue}function jn(){for(var ue,we=Xr,Ne=1/0;we;)we.c?(we.t=0;--xt)Ur.push(et[or[Dr[xt]][2]]);for(xt=+ca;xt1&&ht(ue[Ne[Ke-2]],ue[Ne[Ke-1]],ue[et])<=0;)--Ke;Ne[Ke++]=et}return Ne.slice(0,Ke)}function bo(ue,we){return ue[0]-we[0]||ue[1]-we[1]}u.geom.polygon=function(ue){return U(ue,so),ue};var so=u.geom.polygon.prototype=[];so.area=function(){for(var ue=-1,we=this.length,Ne,Ke=this[we-1],et=0;++ueze)xt=xt.L;else if(kt=we-Zi(xt,Ne),kt>ze){if(!xt.R){Ke=xt;break}xt=xt.R}else{ot>-ze?(Ke=xt.P,et=xt):kt>-ze?(Ke=xt,et=xt.N):Ke=et=xt;break}var Ut=Co(ue);if(po.insert(Ke,Ut),!(!Ke&&!et)){if(Ke===et){Ds(Ke),et=Co(Ke.site),po.insert(Ut,et),Ut.edge=et.edge=Qo(Ke.site,Ut.site),qo(Ke),qo(et);return}if(!et){Ut.edge=Qo(Ke.site,Ut.site);return}Ds(Ke),Ds(et);var or=Ke.site,lr=or.x,Dr=or.y,Pr=ue.x-lr,ca=ue.y-Dr,_a=et.site,Ur=_a.x-lr,Jr=_a.y-Dr,sa=2*(Pr*Jr-ca*Ur),ga=Pr*Pr+ca*ca,ba=Ur*Ur+Jr*Jr,Zr={x:(Jr*ga-ca*ba)/sa+lr,y:(Pr*ba-Ur*ga)/sa+Dr};ys(et.edge,or,_a,Zr),Ut.edge=Qo(or,ue,null,Zr),et.edge=Qo(ue,_a,null,Zr),qo(Ke),qo(et)}}function Ro(ue,we){var Ne=ue.site,Ke=Ne.x,et=Ne.y,ot=et-we;if(!ot)return Ke;var kt=ue.P;if(!kt)return-1/0;Ne=kt.site;var xt=Ne.x,Ut=Ne.y,or=Ut-we;if(!or)return xt;var lr=xt-Ke,Dr=1/ot-1/or,Pr=lr/or;return Dr?(-Pr+Math.sqrt(Pr*Pr-2*Dr*(lr*lr/(-2*or)-Ut+or/2+et-ot/2)))/Dr+Ke:(Ke+xt)/2}function Zi(ue,we){var Ne=ue.N;if(Ne)return Ro(Ne,we);var Ke=ue.site;return Ke.y===we?Ke.x:1/0}function ls(ue){this.site=ue,this.edges=[]}ls.prototype.prepare=function(){for(var ue=this.edges,we=ue.length,Ne;we--;)Ne=ue[we].edge,(!Ne.b||!Ne.a)&&ue.splice(we,1);return ue.sort(mo),ue.length};function Eo(ue){for(var we=ue[0][0],Ne=ue[1][0],Ke=ue[0][1],et=ue[1][1],ot,kt,xt,Ut,or=Po,lr=or.length,Dr,Pr,ca,_a,Ur,Jr;lr--;)if(Dr=or[lr],!(!Dr||!Dr.prepare()))for(ca=Dr.edges,_a=ca.length,Pr=0;Pr<_a;)Jr=ca[Pr].end(),xt=Jr.x,Ut=Jr.y,Ur=ca[++Pr%_a].start(),ot=Ur.x,kt=Ur.y,(o(xt-ot)>ze||o(Ut-kt)>ze)&&(ca.splice(Pr,0,new $o(Gl(Dr.site,Jr,o(xt-we)ze?{x:we,y:o(ot-we)ze?{x:o(kt-et)ze?{x:Ne,y:o(ot-Ne)ze?{x:o(kt-Ke)=-ve)){var Pr=Ut*Ut+or*or,ca=lr*lr+Jr*Jr,_a=(Jr*Pr-or*ca)/Dr,Ur=(Ut*ca-lr*Pr)/Dr,Jr=Ur+xt,sa=zi.pop()||new Zs;sa.arc=ue,sa.site=et,sa.x=_a+kt,sa.y=Jr+Math.sqrt(_a*_a+Ur*Ur),sa.cy=Jr,ue.circle=sa;for(var ga=null,ba=Yi._;ba;)if(sa.y0)){if(Ur/=ca,ca<0){if(Ur0){if(Ur>Pr)return;Ur>Dr&&(Dr=Ur)}if(Ur=Ne-xt,!(!ca&&Ur<0)){if(Ur/=ca,ca<0){if(Ur>Pr)return;Ur>Dr&&(Dr=Ur)}else if(ca>0){if(Ur0)){if(Ur/=_a,_a<0){if(Ur0){if(Ur>Pr)return;Ur>Dr&&(Dr=Ur)}if(Ur=Ke-Ut,!(!_a&&Ur<0)){if(Ur/=_a,_a<0){if(Ur>Pr)return;Ur>Dr&&(Dr=Ur)}else if(_a>0){if(Ur0&&(et.a={x:xt+Dr*ca,y:Ut+Dr*_a}),Pr<1&&(et.b={x:xt+Pr*ca,y:Ut+Pr*_a}),et}}}}}}function is(ue){for(var we=fo,Ne=Us(ue[0][0],ue[0][1],ue[1][0],ue[1][1]),Ke=we.length,et;Ke--;)et=we[Ke],(!cl(et,ue)||!Ne(et)||o(et.a.x-et.b.x)=ot)return;if(lr>Pr){if(!Ke)Ke={x:_a,y:kt};else if(Ke.y>=xt)return;Ne={x:_a,y:xt}}else{if(!Ke)Ke={x:_a,y:xt};else if(Ke.y1)if(lr>Pr){if(!Ke)Ke={x:(kt-sa)/Jr,y:kt};else if(Ke.y>=xt)return;Ne={x:(xt-sa)/Jr,y:xt}}else{if(!Ke)Ke={x:(xt-sa)/Jr,y:xt};else if(Ke.y=ot)return;Ne={x:ot,y:Jr*ot+sa}}else{if(!Ke)Ke={x:ot,y:Jr*ot+sa};else if(Ke.x=lr&&sa.x<=Pr&&sa.y>=Dr&&sa.y<=ca?[[lr,ca],[Pr,ca],[Pr,Dr],[lr,Dr]]:[];ga.point=Ut[Ur]}),or}function xt(Ut){return Ut.map(function(or,lr){return{x:Math.round(Ke(or,lr)/ze)*ze,y:Math.round(et(or,lr)/ze)*ze,i:lr}})}return kt.links=function(Ut){return Kl(xt(Ut)).edges.filter(function(or){return or.l&&or.r}).map(function(or){return{source:Ut[or.l.i],target:Ut[or.r.i]}})},kt.triangles=function(Ut){var or=[];return Kl(xt(Ut)).cells.forEach(function(lr,Dr){for(var Pr=lr.site,ca=lr.edges.sort(mo),_a=-1,Ur=ca.length,Jr,sa,ga=ca[Ur-1].edge,ba=ga.l===Pr?ga.r:ga.l;++_aba&&(ba=lr.x),lr.y>Zr&&(Zr=lr.y),ca.push(lr.x),_a.push(lr.y);else for(Ur=0;Urba&&(ba=hn),wn>Zr&&(Zr=wn),ca.push(hn),_a.push(wn)}var Nn=ba-sa,ni=Zr-ga;Nn>ni?Zr=ga+Nn:ba=sa+ni;function xi(mi,$i,ds,Ks,Ss,ti,Di,Ao){if(!(isNaN(ds)||isNaN(Ks)))if(mi.leaf){var ss=mi.x,Cs=mi.y;if(ss!=null)if(o(ss-ds)+o(Cs-Ks)<.01)_i(mi,$i,ds,Ks,Ss,ti,Di,Ao);else{var nl=mi.point;mi.x=mi.y=mi.point=null,_i(mi,nl,ss,Cs,Ss,ti,Di,Ao),_i(mi,$i,ds,Ks,Ss,ti,Di,Ao)}else mi.x=ds,mi.y=Ks,mi.point=$i}else _i(mi,$i,ds,Ks,Ss,ti,Di,Ao)}function _i(mi,$i,ds,Ks,Ss,ti,Di,Ao){var ss=(Ss+Di)*.5,Cs=(ti+Ao)*.5,nl=ds>=ss,iu=Ks>=Cs,yu=iu<<1|nl;mi.leaf=!1,mi=mi.nodes[yu]||(mi.nodes[yu]=Ec()),nl?Ss=ss:Di=ss,iu?ti=Cs:Ao=Cs,xi(mi,$i,ds,Ks,Ss,ti,Di,Ao)}var lo=Ec();if(lo.add=function(mi){xi(lo,mi,+Dr(mi,++Ur),+Pr(mi,Ur),sa,ga,ba,Zr)},lo.visit=function(mi){fu(mi,lo,sa,ga,ba,Zr)},lo.find=function(mi){return hu(lo,mi[0],mi[1],sa,ga,ba,Zr)},Ur=-1,we==null){for(;++Urot||Pr>kt||ca=hn,ni=Ne>=wn,xi=ni<<1|Nn,_i=xi+4;xi<_i;++xi)if(lr=Zr[xi&3])switch(xi&3){case 0:or(lr,Dr,Pr,hn,wn);break;case 1:or(lr,hn,Pr,ca,wn);break;case 2:or(lr,Dr,wn,hn,_a);break;case 3:or(lr,hn,wn,ca,_a);break}}}(ue,Ke,et,ot,kt),Ut}u.interpolateRgb=du;function du(ue,we){ue=u.rgb(ue),we=u.rgb(we);var Ne=ue.r,Ke=ue.g,et=ue.b,ot=we.r-Ne,kt=we.g-Ke,xt=we.b-et;return function(Ut){return"#"+Yt(Math.round(Ne+ot*Ut))+Yt(Math.round(Ke+kt*Ut))+Yt(Math.round(et+xt*Ut))}}u.interpolateObject=Jl;function Jl(ue,we){var Ne={},Ke={},et;for(et in ue)et in we?Ne[et]=Xu(ue[et],we[et]):Ke[et]=ue[et];for(et in we)et in ue||(Ke[et]=we[et]);return function(ot){for(et in Ne)Ke[et]=Ne[et](ot);return Ke}}u.interpolateNumber=Fs;function Fs(ue,we){return ue=+ue,we=+we,function(Ne){return ue*(1-Ne)+we*Ne}}u.interpolateString=Yo;function Yo(ue,we){var Ne=tl.lastIndex=wu.lastIndex=0,Ke,et,ot,kt=-1,xt=[],Ut=[];for(ue=ue+"",we=we+"";(Ke=tl.exec(ue))&&(et=wu.exec(we));)(ot=et.index)>Ne&&(ot=we.slice(Ne,ot),xt[kt]?xt[kt]+=ot:xt[++kt]=ot),(Ke=Ke[0])===(et=et[0])?xt[kt]?xt[kt]+=et:xt[++kt]=et:(xt[++kt]=null,Ut.push({i:kt,x:Fs(Ke,et)})),Ne=wu.lastIndex;return Ne=0&&!(Ke=u.interpolators[Ne](ue,we)););return Ke}u.interpolators=[function(ue,we){var Ne=typeof we;return(Ne==="string"?qt.has(we.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(we)?du:Yo:we instanceof Ta?du:Array.isArray(we)?kc:Ne==="object"&&isNaN(we)?Jl:Fs)(ue,we)}],u.interpolateArray=kc;function kc(ue,we){var Ne=[],Ke=[],et=ue.length,ot=we.length,kt=Math.min(ue.length,we.length),xt;for(xt=0;xt=0?ue.slice(0,we):ue,Ke=we>=0?ue.slice(we+1):"in";return Ne=Zf.get(Ne)||zs,Ke=Io.get(Ke)||R,$f(Ke(Ne.apply(null,v.call(arguments,1))))};function $f(ue){return function(we){return we<=0?0:we>=1?1:ue(we)}}function Vo(ue){return function(we){return 1-ue(1-we)}}function qi(ue){return function(we){return .5*(we<.5?ue(2*we):2-ue(2-2*we))}}function Zu(ue){return ue*ue}function bc(ue){return ue*ue*ue}function El(ue){if(ue<=0)return 0;if(ue>=1)return 1;var we=ue*ue,Ne=we*ue;return 4*(ue<.5?Ne:3*(ue-we)+Ne-.75)}function mf(ue){return function(we){return Math.pow(we,ue)}}function Au(ue){return 1-Math.cos(ue*We)}function nc(ue){return Math.pow(2,10*(ue-1))}function rl(ue){return 1-Math.sqrt(1-ue*ue)}function gf(ue,we){var Ne;return arguments.length<2&&(we=.45),arguments.length?Ne=we/Ie*Math.asin(1/ue):(ue=1,Ne=we/4),function(Ke){return 1+ue*Math.pow(2,-10*Ke)*Math.sin((Ke-Ne)*Ie/we)}}function Yc(ue){return ue||(ue=1.70158),function(we){return we*we*((ue+1)*we-ue)}}function ic(ue){return ue<1/2.75?7.5625*ue*ue:ue<2/2.75?7.5625*(ue-=1.5/2.75)*ue+.75:ue<2.5/2.75?7.5625*(ue-=2.25/2.75)*ue+.9375:7.5625*(ue-=2.625/2.75)*ue+.984375}u.interpolateHcl=oc;function oc(ue,we){ue=u.hcl(ue),we=u.hcl(we);var Ne=ue.h,Ke=ue.c,et=ue.l,ot=we.h-Ne,kt=we.c-Ke,xt=we.l-et;return isNaN(kt)&&(kt=0,Ke=isNaN(Ke)?we.c:Ke),isNaN(ot)?(ot=0,Ne=isNaN(Ne)?we.h:Ne):ot>180?ot-=360:ot<-180&&(ot+=360),function(Ut){return Pn(Ne+ot*Ut,Ke+kt*Ut,et+xt*Ut)+""}}u.interpolateHsl=Xc;function Xc(ue,we){ue=u.hsl(ue),we=u.hsl(we);var Ne=ue.h,Ke=ue.s,et=ue.l,ot=we.h-Ne,kt=we.s-Ke,xt=we.l-et;return isNaN(kt)&&(kt=0,Ke=isNaN(Ke)?we.s:Ke),isNaN(ot)?(ot=0,Ne=isNaN(Ne)?we.h:Ne):ot>180?ot-=360:ot<-180&&(ot+=360),function(Ut){return Ga(Ne+ot*Ut,Ke+kt*Ut,et+xt*Ut)+""}}u.interpolateLab=Zc;function Zc(ue,we){ue=u.lab(ue),we=u.lab(we);var Ne=ue.l,Ke=ue.a,et=ue.b,ot=we.l-Ne,kt=we.a-Ke,xt=we.b-et;return function(Ut){return on(Ne+ot*Ut,Ke+kt*Ut,et+xt*Ut)+""}}u.interpolateRound=Ql;function Ql(ue,we){return we-=ue,function(Ne){return Math.round(ue+we*Ne)}}u.transform=function(ue){var we=S.createElementNS(u.ns.prefix.svg,"g");return(u.transform=function(Ne){if(Ne!=null){we.setAttribute("transform",Ne);var Ke=we.transform.baseVal.consolidate()}return new Cc(Ke?Ke.matrix:lc)})(ue)};function Cc(ue){var we=[ue.a,ue.b],Ne=[ue.c,ue.d],Ke=sc(we),et=eu(we,Ne),ot=sc(qs(Ne,we,-et))||0;we[0]*Ne[1]180?we+=360:we-ue>180&&(ue+=360),Ke.push({i:Ne.push(Fu(Ne)+"rotate(",null,")")-2,x:Fs(ue,we)})):we&&Ne.push(Fu(Ne)+"rotate("+we+")")}function Kf(ue,we,Ne,Ke){ue!==we?Ke.push({i:Ne.push(Fu(Ne)+"skewX(",null,")")-2,x:Fs(ue,we)}):we&&Ne.push(Fu(Ne)+"skewX("+we+")")}function yf(ue,we,Ne,Ke){if(ue[0]!==we[0]||ue[1]!==we[1]){var et=Ne.push(Fu(Ne)+"scale(",null,",",null,")");Ke.push({i:et-4,x:Fs(ue[0],we[0])},{i:et-2,x:Fs(ue[1],we[1])})}else(we[0]!==1||we[1]!==1)&&Ne.push(Fu(Ne)+"scale("+we+")")}function $u(ue,we){var Ne=[],Ke=[];return ue=u.transform(ue),we=u.transform(we),Ko(ue.translate,we.translate,Ne,Ke),Lc(ue.rotate,we.rotate,Ne,Ke),Kf(ue.skew,we.skew,Ne,Ke),yf(ue.scale,we.scale,Ne,Ke),ue=we=null,function(et){for(var ot=-1,kt=Ke.length,xt;++ot0?ot=Zr:(Ne.c=null,Ne.t=NaN,Ne=null,we.end({type:"end",alpha:ot=0})):Zr>0&&(we.start({type:"start",alpha:ot=Zr}),Ne=ri(ue.tick)),ue):ot},ue.start=function(){var Zr,hn=ca.length,wn=_a.length,Nn=Ke[0],ni=Ke[1],xi,_i;for(Zr=0;Zr=0;)ot.push(lr=or[Ut]),lr.parent=xt,lr.depth=xt.depth+1;Ne&&(xt.value=0),xt.children=or}else Ne&&(xt.value=+Ne.call(Ke,xt,xt.depth)||0),delete xt.children;return Tu(et,function(Dr){var Pr,ca;ue&&(Pr=Dr.children)&&Pr.sort(ue),Ne&&(ca=Dr.parent)&&(ca.value+=Dr.value)}),kt}return Ke.sort=function(et){return arguments.length?(ue=et,Ke):ue},Ke.children=function(et){return arguments.length?(we=et,Ke):we},Ke.value=function(et){return arguments.length?(Ne=et,Ke):Ne},Ke.revalue=function(et){return Ne&&(Bu(et,function(ot){ot.children&&(ot.value=0)}),Tu(et,function(ot){var kt;ot.children||(ot.value=+Ne.call(Ke,ot,ot.depth)||0),(kt=ot.parent)&&(kt.value+=ot.value)})),et},Ke};function vu(ue,we){return u.rebind(ue,we,"sort","children","value"),ue.nodes=ue,ue.links=Vl,ue}function Bu(ue,we){for(var Ne=[ue];(ue=Ne.pop())!=null;)if(we(ue),(et=ue.children)&&(Ke=et.length))for(var Ke,et;--Ke>=0;)Ne.push(et[Ke])}function Tu(ue,we){for(var Ne=[ue],Ke=[];(ue=Ne.pop())!=null;)if(Ke.push(ue),(kt=ue.children)&&(ot=kt.length))for(var et=-1,ot,kt;++etet&&(et=xt),Ke.push(xt)}for(kt=0;ktKe&&(Ne=we,Ke=et);return Ne}function Qc(ue){return ue.reduce(cc,0)}function cc(ue,we){return ue+we[1]}u.layout.histogram=function(){var ue=!0,we=Number,Ne=Rc,Ke=fc;function et(ot,Pr){for(var xt=[],Ut=ot.map(we,this),or=Ne.call(this,Ut,Pr),lr=Ke.call(this,or,Ut,Pr),Dr,Pr=-1,ca=Ut.length,_a=lr.length-1,Ur=ue?1:1/ca,Jr;++Pr<_a;)Dr=xt[Pr]=[],Dr.dx=lr[Pr+1]-(Dr.x=lr[Pr]),Dr.y=0;if(_a>0)for(Pr=-1;++Pr=or[0]&&Jr<=or[1]&&(Dr=xt[u.bisect(lr,Jr,1,_a)-1],Dr.y+=Ur,Dr.push(ot[Pr]));return xt}return et.value=function(ot){return arguments.length?(we=ot,et):we},et.range=function(ot){return arguments.length?(Ne=Qt(ot),et):Ne},et.bins=function(ot){return arguments.length?(Ke=typeof ot=="number"?function(kt){return ru(kt,ot)}:Qt(ot),et):Ke},et.frequency=function(ot){return arguments.length?(ue=!!ot,et):ue},et};function fc(ue,we){return ru(ue,Math.ceil(Math.log(we.length)/Math.LN2+1))}function ru(ue,we){for(var Ne=-1,Ke=+ue[0],et=(ue[1]-Ke)/we,ot=[];++Ne<=we;)ot[Ne]=et*Ne+Ke;return ot}function Rc(ue){return[u.min(ue),u.max(ue)]}u.layout.pack=function(){var ue=u.layout.hierarchy().sort(Qu),we=0,Ne=[1,1],Ke;function et(ot,kt){var xt=ue.call(this,ot,kt),Ut=xt[0],or=Ne[0],lr=Ne[1],Dr=Ke==null?Math.sqrt:typeof Ke=="function"?Ke:function(){return Ke};if(Ut.x=Ut.y=0,Tu(Ut,function(ca){ca.r=+Dr(ca.value)}),Tu(Ut,eh),we){var Pr=we*(Ke?1:Math.max(2*Ut.r/or,2*Ut.r/lr))/2;Tu(Ut,function(ca){ca.r+=Pr}),Tu(Ut,eh),Tu(Ut,function(ca){ca.r-=Pr})}return Dc(Ut,or/2,lr/2,Ke?1:1/Math.max(2*Ut.r/or,2*Ut.r/lr)),xt}return et.size=function(ot){return arguments.length?(Ne=ot,et):Ne},et.radius=function(ot){return arguments.length?(Ke=ot==null||typeof ot=="function"?ot:+ot,et):Ke},et.padding=function(ot){return arguments.length?(we=+ot,et):we},vu(et,ue)};function Qu(ue,we){return ue.value-we.value}function ef(ue,we){var Ne=ue._pack_next;ue._pack_next=we,we._pack_prev=ue,we._pack_next=Ne,Ne._pack_prev=we}function tf(ue,we){ue._pack_next=we,we._pack_prev=ue}function wf(ue,we){var Ne=we.x-ue.x,Ke=we.y-ue.y,et=ue.r+we.r;return .999*et*et>Ne*Ne+Ke*Ke}function eh(ue){if(!(we=ue.children)||!(Pr=we.length))return;var we,Ne=1/0,Ke=-1/0,et=1/0,ot=-1/0,kt,xt,Ut,or,lr,Dr,Pr;function ca(Zr){Ne=Math.min(Zr.x-Zr.r,Ne),Ke=Math.max(Zr.x+Zr.r,Ke),et=Math.min(Zr.y-Zr.r,et),ot=Math.max(Zr.y+Zr.r,ot)}if(we.forEach(Ic),kt=we[0],kt.x=-kt.r,kt.y=0,ca(kt),Pr>1&&(xt=we[1],xt.x=xt.r,xt.y=0,ca(xt),Pr>2))for(Ut=we[2],yl(kt,xt,Ut),ca(Ut),ef(kt,Ut),kt._pack_prev=Ut,ef(Ut,xt),xt=kt._pack_next,or=3;orJr.x&&(Jr=hn),hn.depth>sa.depth&&(sa=hn)});var ga=we(Ur,Jr)/2-Ur.x,ba=Ne[0]/(Jr.x+we(Jr,Ur)/2+ga),Zr=Ne[1]/(sa.depth||1);Bu(ca,function(hn){hn.x=(hn.x+ga)*ba,hn.y=hn.depth*Zr})}return Pr}function ot(lr){for(var Dr={A:null,children:[lr]},Pr=[Dr],ca;(ca=Pr.pop())!=null;)for(var _a=ca.children,Ur,Jr=0,sa=_a.length;Jr0&&(Fc(Tt(Ur,lr,Pr),lr,hn),sa+=hn,ga+=hn),ba+=Ur.m,sa+=ca.m,Zr+=Jr.m,ga+=_a.m;Ur&&!th(_a)&&(_a.t=Ur,_a.m+=ba-ga),ca&&!Tf(Jr)&&(Jr.t=ca,Jr.m+=sa-Zr,Pr=lr)}return Pr}function or(lr){lr.x*=Ne[0],lr.y=lr.depth*Ne[1]}return et.separation=function(lr){return arguments.length?(we=lr,et):we},et.size=function(lr){return arguments.length?(Ke=(Ne=lr)==null?or:null,et):Ke?null:Ne},et.nodeSize=function(lr){return arguments.length?(Ke=(Ne=lr)==null?null:or,et):Ke?Ne:null},vu(et,ue)};function Mu(ue,we){return ue.parent==we.parent?1:2}function Tf(ue){var we=ue.children;return we.length?we[0]:ue.t}function th(ue){var we=ue.children,Ne;return(Ne=we.length)?we[Ne-1]:ue.t}function Fc(ue,we,Ne){var Ke=Ne/(we.i-ue.i);we.c-=Ke,we.s+=Ne,ue.c+=Ke,we.z+=Ne,we.m+=Ne}function Ou(ue){for(var we=0,Ne=0,Ke=ue.children,et=Ke.length,ot;--et>=0;)ot=Ke[et],ot.z+=we,ot.m+=we,we+=ot.s+(Ne+=ot.c)}function Tt(ue,we,Ne){return ue.a.parent===we.parent?ue.a:Ne}u.layout.cluster=function(){var ue=u.layout.hierarchy().sort(null).value(null),we=Mu,Ne=[1,1],Ke=!1;function et(ot,kt){var xt=ue.call(this,ot,kt),Ut=xt[0],or,lr=0;Tu(Ut,function(Ur){var Jr=Ur.children;Jr&&Jr.length?(Ur.x=yr(Jr),Ur.y=jt(Jr)):(Ur.x=or?lr+=we(Ur,or):0,Ur.y=0,or=Ur)});var Dr=dr(Ut),Pr=Wr(Ut),ca=Dr.x-we(Dr,Pr)/2,_a=Pr.x+we(Pr,Dr)/2;return Tu(Ut,Ke?function(Ur){Ur.x=(Ur.x-Ut.x)*Ne[0],Ur.y=(Ut.y-Ur.y)*Ne[1]}:function(Ur){Ur.x=(Ur.x-ca)/(_a-ca)*Ne[0],Ur.y=(1-(Ut.y?Ur.y/Ut.y:1))*Ne[1]}),xt}return et.separation=function(ot){return arguments.length?(we=ot,et):we},et.size=function(ot){return arguments.length?(Ke=(Ne=ot)==null,et):Ke?null:Ne},et.nodeSize=function(ot){return arguments.length?(Ke=(Ne=ot)!=null,et):Ke?Ne:null},vu(et,ue)};function jt(ue){return 1+u.max(ue,function(we){return we.y})}function yr(ue){return ue.reduce(function(we,Ne){return we+Ne.x},0)/ue.length}function dr(ue){var we=ue.children;return we&&we.length?dr(we[0]):ue}function Wr(ue){var we=ue.children,Ne;return we&&(Ne=we.length)?Wr(we[Ne-1]):ue}u.layout.treemap=function(){var ue=u.layout.hierarchy(),we=Math.round,Ne=[1,1],Ke=null,et=ma,ot=!1,kt,xt="squarify",Ut=.5*(1+Math.sqrt(5));function or(Ur,Jr){for(var sa=-1,ga=Ur.length,ba,Zr;++sa0;)ga.push(Zr=ba[ni-1]),ga.area+=Zr.area,xt!=="squarify"||(wn=Pr(ga,Nn))<=hn?(ba.pop(),hn=wn):(ga.area-=ga.pop().area,ca(ga,Nn,sa,!1),Nn=Math.min(sa.dx,sa.dy),ga.length=ga.area=0,hn=1/0);ga.length&&(ca(ga,Nn,sa,!0),ga.length=ga.area=0),Jr.forEach(lr)}}function Dr(Ur){var Jr=Ur.children;if(Jr&&Jr.length){var sa=et(Ur),ga=Jr.slice(),ba,Zr=[];for(or(ga,sa.dx*sa.dy/Ur.value),Zr.area=0;ba=ga.pop();)Zr.push(ba),Zr.area+=ba.area,ba.z!=null&&(ca(Zr,ba.z?sa.dx:sa.dy,sa,!ga.length),Zr.length=Zr.area=0);Jr.forEach(Dr)}}function Pr(Ur,Jr){for(var sa=Ur.area,ga,ba=0,Zr=1/0,hn=-1,wn=Ur.length;++hnba&&(ba=ga));return sa*=sa,Jr*=Jr,sa?Math.max(Jr*ba*Ut/sa,sa/(Jr*Zr*Ut)):1/0}function ca(Ur,Jr,sa,ga){var ba=-1,Zr=Ur.length,hn=sa.x,wn=sa.y,Nn=Jr?we(Ur.area/Jr):0,ni;if(Jr==sa.dx){for((ga||Nn>sa.dy)&&(Nn=sa.dy);++basa.dx)&&(Nn=sa.dx);++ba1);return ue+we*Ke*Math.sqrt(-2*Math.log(ot)/ot)}},logNormal:function(){var ue=u.random.normal.apply(u,arguments);return function(){return Math.exp(ue())}},bates:function(ue){var we=u.random.irwinHall(ue);return function(){return we()/ue}},irwinHall:function(ue){return function(){for(var we=0,Ne=0;Ne2?Aa:Tn,or=Ke?Pc:_f;return et=Ut(ue,we,or,Ne),ot=Ut(we,ue,or,Xu),xt}function xt(Ut){return et(Ut)}return xt.invert=function(Ut){return ot(Ut)},xt.domain=function(Ut){return arguments.length?(ue=Ut.map(Number),kt()):ue},xt.range=function(Ut){return arguments.length?(we=Ut,kt()):we},xt.rangeRound=function(Ut){return xt.range(Ut).interpolate(Ql)},xt.clamp=function(Ut){return arguments.length?(Ke=Ut,kt()):Ke},xt.interpolate=function(Ut){return arguments.length?(Ne=Ut,kt()):Ne},xt.ticks=function(Ut){return Ti(ue,Ut)},xt.tickFormat=function(Ut,or){return d3_scale_linearTickFormat(ue,Ut,or)},xt.nice=function(Ut){return pi(ue,Ut),kt()},xt.copy=function(){return Fn(ue,we,Ne,Ke)},kt()}function ci(ue,we){return u.rebind(ue,we,"range","rangeRound","interpolate","clamp")}function pi(ue,we){return Ba(ue,Na(fi(ue,we)[2])),Ba(ue,Na(fi(ue,we)[2])),ue}function fi(ue,we){we==null&&(we=10);var Ne=Ja(ue),Ke=Ne[1]-Ne[0],et=Math.pow(10,Math.floor(Math.log(Ke/we)/Math.LN10)),ot=we/Ke*et;return ot<=.15?et*=10:ot<=.35?et*=5:ot<=.75&&(et*=2),Ne[0]=Math.ceil(Ne[0]/et)*et,Ne[1]=Math.floor(Ne[1]/et)*et+et*.5,Ne[2]=et,Ne}function Ti(ue,we){return u.range.apply(u,fi(ue,we))}var Un={s:1,g:1,p:1,r:1,e:1};function _n(ue){return-Math.floor(Math.log(ue)/Math.LN10+.01)}function Oi(ue,we){var Ne=_n(we[2]);return ue in Un?Math.abs(Ne-_n(Math.max(o(we[0]),o(we[1]))))+ +(ue!=="e"):Ne-(ue==="%")*2}u.scale.log=function(){return ao(u.scale.linear().domain([0,1]),10,!0,[1,10])};function ao(ue,we,Ne,Ke){function et(xt){return(Ne?Math.log(xt<0?0:xt):-Math.log(xt>0?0:-xt))/Math.log(we)}function ot(xt){return Ne?Math.pow(we,xt):-Math.pow(we,-xt)}function kt(xt){return ue(et(xt))}return kt.invert=function(xt){return ot(ue.invert(xt))},kt.domain=function(xt){return arguments.length?(Ne=xt[0]>=0,ue.domain((Ke=xt.map(Number)).map(et)),kt):Ke},kt.base=function(xt){return arguments.length?(we=+xt,ue.domain(Ke.map(et)),kt):we},kt.nice=function(){var xt=Ba(Ke.map(et),Ne?Math:Lo);return ue.domain(xt),Ke=xt.map(ot),kt},kt.ticks=function(){var xt=Ja(Ke),Ut=[],or=xt[0],lr=xt[1],Dr=Math.floor(et(or)),Pr=Math.ceil(et(lr)),ca=we%1?2:we;if(isFinite(Pr-Dr)){if(Ne){for(;Dr0;_a--)Ut.push(ot(Dr)*_a);for(Dr=0;Ut[Dr]lr;Pr--);Ut=Ut.slice(Dr,Pr)}return Ut},kt.copy=function(){return ao(ue.copy(),we,Ne,Ke)},ci(kt,ue)}var Lo={floor:function(ue){return-Math.ceil(-ue)},ceil:function(ue){return-Math.floor(-ue)}};u.scale.pow=function(){return us(u.scale.linear(),1,[0,1])};function us(ue,we,Ne){var Ke=Oo(we),et=Oo(1/we);function ot(kt){return ue(Ke(kt))}return ot.invert=function(kt){return et(ue.invert(kt))},ot.domain=function(kt){return arguments.length?(ue.domain((Ne=kt.map(Number)).map(Ke)),ot):Ne},ot.ticks=function(kt){return Ti(Ne,kt)},ot.tickFormat=function(kt,xt){return d3_scale_linearTickFormat(Ne,kt,xt)},ot.nice=function(kt){return ot.domain(pi(Ne,kt))},ot.exponent=function(kt){return arguments.length?(Ke=Oo(we=kt),et=Oo(1/we),ue.domain(Ne.map(Ke)),ot):we},ot.copy=function(){return us(ue.copy(),we,Ne)},ci(ot,ue)}function Oo(ue){return function(we){return we<0?-Math.pow(-we,ue):Math.pow(we,ue)}}u.scale.sqrt=function(){return u.scale.pow().exponent(.5)},u.scale.ordinal=function(){return _s([],{t:"range",a:[[]]})};function _s(ue,we){var Ne,Ke,et;function ot(xt){return Ke[((Ne.get(xt)||(we.t==="range"?Ne.set(xt,ue.push(xt)):NaN))-1)%Ke.length]}function kt(xt,Ut){return u.range(ue.length).map(function(or){return xt+Ut*or})}return ot.domain=function(xt){if(!arguments.length)return ue;ue=[],Ne=new T;for(var Ut=-1,or=xt.length,lr;++Ut0?Ne[ot-1]:ue[0],otPr?0:1;if(lr=Be)return Ut(lr,_a)+(or?Ut(or,1-_a):"")+"Z";var Ur,Jr,sa,ga,ba=0,Zr=0,hn,wn,Nn,ni,xi,_i,lo,mi,$i=[];if((ga=(+kt.apply(this,arguments)||0)/2)&&(sa=Ke===pu?Math.sqrt(or*or+lr*lr):+Ke.apply(this,arguments),_a||(Zr*=-1),lr&&(Zr=_t(sa/lr*Math.sin(ga))),or&&(ba=_t(sa/or*Math.sin(ga)))),lr){hn=lr*Math.cos(Dr+Zr),wn=lr*Math.sin(Dr+Zr),Nn=lr*Math.cos(Pr-Zr),ni=lr*Math.sin(Pr-Zr);var ds=Math.abs(Pr-Dr-2*Zr)<=_e?0:1;if(Zr&&hc(hn,wn,Nn,ni)===_a^ds){var Ks=(Dr+Pr)/2;hn=lr*Math.cos(Ks),wn=lr*Math.sin(Ks),Nn=ni=null}}else hn=wn=0;if(or){xi=or*Math.cos(Pr-ba),_i=or*Math.sin(Pr-ba),lo=or*Math.cos(Dr+ba),mi=or*Math.sin(Dr+ba);var Ss=Math.abs(Dr-Pr+2*ba)<=_e?0:1;if(ba&&hc(xi,_i,lo,mi)===1-_a^Ss){var ti=(Dr+Pr)/2;xi=or*Math.cos(ti),_i=or*Math.sin(ti),lo=mi=null}}else xi=_i=0;if(ca>ze&&(Ur=Math.min(Math.abs(lr-or)/2,+Ne.apply(this,arguments)))>.001){Jr=or0?0:1}function ki(ue,we,Ne,Ke,et){var ot=ue[0]-we[0],kt=ue[1]-we[1],xt=(et?Ke:-Ke)/Math.sqrt(ot*ot+kt*kt),Ut=xt*kt,or=-xt*ot,lr=ue[0]+Ut,Dr=ue[1]+or,Pr=we[0]+Ut,ca=we[1]+or,_a=(lr+Pr)/2,Ur=(Dr+ca)/2,Jr=Pr-lr,sa=ca-Dr,ga=Jr*Jr+sa*sa,ba=Ne-Ke,Zr=lr*ca-Pr*Dr,hn=(sa<0?-1:1)*Math.sqrt(Math.max(0,ba*ba*ga-Zr*Zr)),wn=(Zr*sa-Jr*hn)/ga,Nn=(-Zr*Jr-sa*hn)/ga,ni=(Zr*sa+Jr*hn)/ga,xi=(-Zr*Jr+sa*hn)/ga,_i=wn-_a,lo=Nn-Ur,mi=ni-_a,$i=xi-Ur;return _i*_i+lo*lo>mi*mi+$i*$i&&(wn=ni,Nn=xi),[[wn-Ut,Nn-or],[wn*Ne/ba,Nn*Ne/ba]]}function Xi(){return!0}function jf(ue){var we=oo,Ne=Qi,Ke=Xi,et=nu,ot=et.key,kt=.7;function xt(Ut){var or=[],lr=[],Dr=-1,Pr=Ut.length,ca,_a=Qt(we),Ur=Qt(Ne);function Jr(){or.push("M",et(ue(lr),kt))}for(;++Dr1?ue.join("L"):ue+"Z"}function Me(ue){return ue.join("L")+"Z"}function L(ue){for(var we=0,Ne=ue.length,Ke=ue[0],et=[Ke[0],",",Ke[1]];++we1&&et.push("H",Ke[0]),et.join("")}function J(ue){for(var we=0,Ne=ue.length,Ke=ue[0],et=[Ke[0],",",Ke[1]];++we1){xt=we[1],ot=ue[Ut],Ut++,Ke+="C"+(et[0]+kt[0])+","+(et[1]+kt[1])+","+(ot[0]-xt[0])+","+(ot[1]-xt[1])+","+ot[0]+","+ot[1];for(var or=2;or9&&(ot=Ne*3/Math.sqrt(ot),kt[xt]=ot*Ke,kt[xt+1]=ot*et));for(xt=-1;++xt<=Ut;)ot=(ue[Math.min(Ut,xt+1)][0]-ue[Math.max(0,xt-1)][0])/(6*(1+kt[xt]*kt[xt])),we.push([ot||0,kt[xt]*ot||0]);return we}function Rt(ue){return ue.length<3?nu(ue):ue[0]+rt(ue,dt(ue))}u.svg.line.radial=function(){var ue=jf(Ot);return ue.radius=ue.x,delete ue.x,ue.angle=ue.y,delete ue.y,ue};function Ot(ue){for(var we,Ne=-1,Ke=ue.length,et,ot;++Ne_e)+",1 "+Dr}function or(lr,Dr,Pr,ca){return"Q 0,0 "+ca}return ot.radius=function(lr){return arguments.length?(Ne=Qt(lr),ot):Ne},ot.source=function(lr){return arguments.length?(ue=Qt(lr),ot):ue},ot.target=function(lr){return arguments.length?(we=Qt(lr),ot):we},ot.startAngle=function(lr){return arguments.length?(Ke=Qt(lr),ot):Ke},ot.endAngle=function(lr){return arguments.length?(et=Qt(lr),ot):et},ot};function Lr(ue){return ue.radius}u.svg.diagonal=function(){var ue=nr,we=pr,Ne=Br;function Ke(et,ot){var kt=ue.call(this,et,ot),xt=we.call(this,et,ot),Ut=(kt.y+xt.y)/2,or=[kt,{x:kt.x,y:Ut},{x:xt.x,y:Ut},xt];return or=or.map(Ne),"M"+or[0]+"C"+or[1]+" "+or[2]+" "+or[3]}return Ke.source=function(et){return arguments.length?(ue=Qt(et),Ke):ue},Ke.target=function(et){return arguments.length?(we=Qt(et),Ke):we},Ke.projection=function(et){return arguments.length?(Ne=et,Ke):Ne},Ke};function Br(ue){return[ue.x,ue.y]}u.svg.diagonal.radial=function(){var ue=u.svg.diagonal(),we=Br,Ne=ue.projection;return ue.projection=function(Ke){return arguments.length?Ne(Kr(we=Ke)):we},ue};function Kr(ue){return function(){var we=ue.apply(this,arguments),Ne=we[0],Ke=we[1]-We;return[Ne*Math.cos(Ke),Ne*Math.sin(Ke)]}}u.svg.symbol=function(){var ue=Za,we=ya;function Ne(Ke,et){return(un.get(ue.call(this,Ke,et))||Ha)(we.call(this,Ke,et))}return Ne.type=function(Ke){return arguments.length?(ue=Qt(Ke),Ne):ue},Ne.size=function(Ke){return arguments.length?(we=Qt(Ke),Ne):we},Ne};function ya(){return 64}function Za(){return"circle"}function Ha(ue){var we=Math.sqrt(ue/_e);return"M0,"+we+"A"+we+","+we+" 0 1,1 0,"+-we+"A"+we+","+we+" 0 1,1 0,"+we+"Z"}var un=u.map({circle:Ha,cross:function(ue){var we=Math.sqrt(ue/5)/2;return"M"+-3*we+","+-we+"H"+-we+"V"+-3*we+"H"+we+"V"+-we+"H"+3*we+"V"+we+"H"+we+"V"+3*we+"H"+-we+"V"+we+"H"+-3*we+"Z"},diamond:function(ue){var we=Math.sqrt(ue/(2*li)),Ne=we*li;return"M0,"+-we+"L"+Ne+",0 0,"+we+" "+-Ne+",0Z"},square:function(ue){var we=Math.sqrt(ue)/2;return"M"+-we+","+-we+"L"+we+","+-we+" "+we+","+we+" "+-we+","+we+"Z"},"triangle-down":function(ue){var we=Math.sqrt(ue/Bn),Ne=we*Bn/2;return"M0,"+Ne+"L"+we+","+-Ne+" "+-we+","+-Ne+"Z"},"triangle-up":function(ue){var we=Math.sqrt(ue/Bn),Ne=we*Bn/2;return"M0,"+-Ne+"L"+we+","+Ne+" "+-we+","+Ne+"Z"}});u.svg.symbolTypes=un.keys();var Bn=Math.sqrt(3),li=Math.tan(30*Xe);X.transition=function(ue){for(var we=Fo||++as,Ne=xs(ue),Ke=[],et,ot,kt=Ms||{time:Date.now(),ease:El,delay:0,duration:250},xt=-1,Ut=this.length;++xt0;)Dr[--ga].call(ue,sa);if(Jr>=1)return kt.event&&kt.event.end.call(ue,ue.__data__,we),--ot.count?delete ot[Ke]:delete ue[Ne],1}kt||(xt=et.time,Ut=ri(Pr,0,xt),kt=ot[Ke]={tween:new T,time:xt,timer:Ut,delay:et.delay,duration:et.duration,ease:et.ease,index:we},et=null,++ot.count)}u.svg.axis=function(){var ue=u.scale.linear(),we=Cl,Ne=6,Ke=6,et=3,ot=[10],kt=null,xt;function Ut(or){or.each(function(){var lr=u.select(this),Dr=this.__chart__||ue,Pr=this.__chart__=ue.copy(),ca=kt??(Pr.ticks?Pr.ticks.apply(Pr,ot):Pr.domain()),_a=xt??(Pr.tickFormat?Pr.tickFormat.apply(Pr,ot):R),Ur=lr.selectAll(".tick").data(ca,Pr),Jr=Ur.enter().insert("g",".domain").attr("class","tick").style("opacity",ze),sa=u.transition(Ur.exit()).style("opacity",ze).remove(),ga=u.transition(Ur.order()).style("opacity",1),ba=Math.max(Ne,0)+et,Zr,hn=nn(Pr),wn=lr.selectAll(".domain").data([0]),Nn=(wn.enter().append("path").attr("class","domain"),u.transition(wn));Jr.append("line"),Jr.append("text");var ni=Jr.select("line"),xi=ga.select("line"),_i=Ur.select("text").text(_a),lo=Jr.select("text"),mi=ga.select("text"),$i=we==="top"||we==="left"?-1:1,ds,Ks,Ss,ti;if(we==="bottom"||we==="top"?(Zr=Hl,ds="x",Ss="y",Ks="x2",ti="y2",_i.attr("dy",$i<0?"0em":".71em").style("text-anchor","middle"),Nn.attr("d","M"+hn[0]+","+$i*Ke+"V0H"+hn[1]+"V"+$i*Ke)):(Zr=el,ds="y",Ss="x",Ks="y2",ti="x2",_i.attr("dy",".32em").style("text-anchor",$i<0?"end":"start"),Nn.attr("d","M"+$i*Ke+","+hn[0]+"H0V"+hn[1]+"H"+$i*Ke)),ni.attr(ti,$i*Ne),lo.attr(Ss,$i*ba),xi.attr(Ks,0).attr(ti,$i*Ne),mi.attr(ds,0).attr(Ss,$i*ba),Pr.rangeBand){var Di=Pr,Ao=Di.rangeBand()/2;Dr=Pr=function(ss){return Di(ss)+Ao}}else Dr.rangeBand?Dr=Pr:sa.call(Zr,Pr,Dr);Jr.call(Zr,Dr,Pr),ga.call(Zr,Pr,Pr)})}return Ut.scale=function(or){return arguments.length?(ue=or,Ut):ue},Ut.orient=function(or){return arguments.length?(we=or in mu?or+"":Cl,Ut):we},Ut.ticks=function(){return arguments.length?(ot=w(arguments),Ut):ot},Ut.tickValues=function(or){return arguments.length?(kt=or,Ut):kt},Ut.tickFormat=function(or){return arguments.length?(xt=or,Ut):xt},Ut.tickSize=function(or){var lr=arguments.length;return lr?(Ne=+or,Ke=+arguments[lr-1],Ut):Ne},Ut.innerTickSize=function(or){return arguments.length?(Ne=+or,Ut):Ne},Ut.outerTickSize=function(or){return arguments.length?(Ke=+or,Ut):Ke},Ut.tickPadding=function(or){return arguments.length?(et=+or,Ut):et},Ut.tickSubdivide=function(){return arguments.length&&Ut},Ut};var Cl="bottom",mu={top:1,right:1,bottom:1,left:1};function Hl(ue,we,Ne){ue.attr("transform",function(Ke){var et=we(Ke);return"translate("+(isFinite(et)?et:Ne(Ke))+",0)"})}function el(ue,we,Ne){ue.attr("transform",function(Ke){var et=we(Ke);return"translate(0,"+(isFinite(et)?et:Ne(Ke))+")"})}u.svg.brush=function(){var ue=te(lr,"brushstart","brush","brushend"),we=null,Ne=null,Ke=[0,0],et=[0,0],ot,kt,xt=!0,Ut=!0,or=gu[0];function lr(Ur){Ur.each(function(){var Jr=u.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",_a).on("touchstart.brush",_a),sa=Jr.selectAll(".background").data([0]);sa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),Jr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var ga=Jr.selectAll(".resize").data(or,R);ga.exit().remove(),ga.enter().append("g").attr("class",function(wn){return"resize "+wn}).style("cursor",function(wn){return Eu[wn]}).append("rect").attr("x",function(wn){return/[ew]$/.test(wn)?-3:null}).attr("y",function(wn){return/^[ns]/.test(wn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),ga.style("display",lr.empty()?"none":null);var ba=u.transition(Jr),Zr=u.transition(sa),hn;we&&(hn=nn(we),Zr.attr("x",hn[0]).attr("width",hn[1]-hn[0]),Pr(ba)),Ne&&(hn=nn(Ne),Zr.attr("y",hn[0]).attr("height",hn[1]-hn[0]),ca(ba)),Dr(ba)})}lr.event=function(Ur){Ur.each(function(){var Jr=ue.of(this,arguments),sa={x:Ke,y:et,i:ot,j:kt},ga=this.__chart__||sa;this.__chart__=sa,Fo?u.select(this).transition().each("start.brush",function(){ot=ga.i,kt=ga.j,Ke=ga.x,et=ga.y,Jr({type:"brushstart"})}).tween("brush:brush",function(){var ba=kc(Ke,sa.x),Zr=kc(et,sa.y);return ot=kt=null,function(hn){Ke=sa.x=ba(hn),et=sa.y=Zr(hn),Jr({type:"brush",mode:"resize"})}}).each("end.brush",function(){ot=sa.i,kt=sa.j,Jr({type:"brush",mode:"resize"}),Jr({type:"brushend"})}):(Jr({type:"brushstart"}),Jr({type:"brush",mode:"resize"}),Jr({type:"brushend"}))})};function Dr(Ur){Ur.selectAll(".resize").attr("transform",function(Jr){return"translate("+Ke[+/e$/.test(Jr)]+","+et[+/^s/.test(Jr)]+")"})}function Pr(Ur){Ur.select(".extent").attr("x",Ke[0]),Ur.selectAll(".extent,.n>rect,.s>rect").attr("width",Ke[1]-Ke[0])}function ca(Ur){Ur.select(".extent").attr("y",et[0]),Ur.selectAll(".extent,.e>rect,.w>rect").attr("height",et[1]-et[0])}function _a(){var Ur=this,Jr=u.select(u.event.target),sa=ue.of(Ur,arguments),ga=u.select(Ur),ba=Jr.datum(),Zr=!/^(n|s)$/.test(ba)&&we,hn=!/^(e|w)$/.test(ba)&&Ne,wn=Jr.classed("extent"),Nn=Nt(Ur),ni,xi=u.mouse(Ur),_i,lo=u.select(e(Ur)).on("keydown.brush",ds).on("keyup.brush",Ks);if(u.event.changedTouches?lo.on("touchmove.brush",Ss).on("touchend.brush",Di):lo.on("mousemove.brush",Ss).on("mouseup.brush",Di),ga.interrupt().selectAll("*").interrupt(),wn)xi[0]=Ke[0]-xi[0],xi[1]=et[0]-xi[1];else if(ba){var mi=+/w$/.test(ba),$i=+/^n/.test(ba);_i=[Ke[1-mi]-xi[0],et[1-$i]-xi[1]],xi[0]=Ke[mi],xi[1]=et[$i]}else u.event.altKey&&(ni=xi.slice());ga.style("pointer-events","none").selectAll(".resize").style("display",null),u.select("body").style("cursor",Jr.style("cursor")),sa({type:"brushstart"}),Ss();function ds(){u.event.keyCode==32&&(wn||(ni=null,xi[0]-=Ke[1],xi[1]-=et[1],wn=2),Y())}function Ks(){u.event.keyCode==32&&wn==2&&(xi[0]+=Ke[1],xi[1]+=et[1],wn=0,Y())}function Ss(){var Ao=u.mouse(Ur),ss=!1;_i&&(Ao[0]+=_i[0],Ao[1]+=_i[1]),wn||(u.event.altKey?(ni||(ni=[(Ke[0]+Ke[1])/2,(et[0]+et[1])/2]),xi[0]=Ke[+(Ao[0]0))return At;do At.push(Pt=new Date(+ut)),be(ut,yt),ne(ut);while(Pt=st)for(;ne(st),!ut(st);)st.setTime(st-1)},function(st,yt){if(st>=st)if(yt<0)for(;++yt<=0;)for(;be(st,-1),!ut(st););else for(;--yt>=0;)for(;be(st,1),!ut(st););})},Fe&&(je.count=function(ut,st){return v.setTime(+ut),w.setTime(+st),ne(v),ne(w),Math.floor(Fe(v,w))},je.every=function(ut){return ut=Math.floor(ut),!isFinite(ut)||!(ut>0)?null:ut>1?je.filter(Ve?function(st){return Ve(st)%ut===0}:function(st){return je.count(0,st)%ut===0}):je}),je}var l=S(function(){},function(ne,be){ne.setTime(+ne+be)},function(ne,be){return be-ne});l.every=function(ne){return ne=Math.floor(ne),!isFinite(ne)||!(ne>0)?null:ne>1?S(function(be){be.setTime(Math.floor(be/ne)*ne)},function(be,Fe){be.setTime(+be+Fe*ne)},function(be,Fe){return(Fe-be)/ne}):l};var e=l.range,t=1e3,a=6e4,r=36e5,n=864e5,i=6048e5,s=S(function(ne){ne.setTime(ne-ne.getMilliseconds())},function(ne,be){ne.setTime(+ne+be*t)},function(ne,be){return(be-ne)/t},function(ne){return ne.getUTCSeconds()}),c=s.range,p=S(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*t)},function(ne,be){ne.setTime(+ne+be*a)},function(ne,be){return(be-ne)/a},function(ne){return ne.getMinutes()}),f=p.range,d=S(function(ne){ne.setTime(ne-ne.getMilliseconds()-ne.getSeconds()*t-ne.getMinutes()*a)},function(ne,be){ne.setTime(+ne+be*r)},function(ne,be){return(be-ne)/r},function(ne){return ne.getHours()}),y=d.range,o=S(function(ne){ne.setHours(0,0,0,0)},function(ne,be){ne.setDate(ne.getDate()+be)},function(ne,be){return(be-ne-(be.getTimezoneOffset()-ne.getTimezoneOffset())*a)/n},function(ne){return ne.getDate()-1}),x=o.range;function M(ne){return S(function(be){be.setDate(be.getDate()-(be.getDay()+7-ne)%7),be.setHours(0,0,0,0)},function(be,Fe){be.setDate(be.getDate()+Fe*7)},function(be,Fe){return(Fe-be-(Fe.getTimezoneOffset()-be.getTimezoneOffset())*a)/i})}var T=M(0),E=M(1),g=M(2),A=M(3),m=M(4),h=M(5),b=M(6),_=T.range,I=E.range,C=g.range,F=A.range,R=m.range,z=h.range,D=b.range,k=S(function(ne){ne.setDate(1),ne.setHours(0,0,0,0)},function(ne,be){ne.setMonth(ne.getMonth()+be)},function(ne,be){return be.getMonth()-ne.getMonth()+(be.getFullYear()-ne.getFullYear())*12},function(ne){return ne.getMonth()}),B=k.range,O=S(function(ne){ne.setMonth(0,1),ne.setHours(0,0,0,0)},function(ne,be){ne.setFullYear(ne.getFullYear()+be)},function(ne,be){return be.getFullYear()-ne.getFullYear()},function(ne){return ne.getFullYear()});O.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:S(function(be){be.setFullYear(Math.floor(be.getFullYear()/ne)*ne),be.setMonth(0,1),be.setHours(0,0,0,0)},function(be,Fe){be.setFullYear(be.getFullYear()+Fe*ne)})};var q=O.range,Y=S(function(ne){ne.setUTCSeconds(0,0)},function(ne,be){ne.setTime(+ne+be*a)},function(ne,be){return(be-ne)/a},function(ne){return ne.getUTCMinutes()}),ee=Y.range,te=S(function(ne){ne.setUTCMinutes(0,0,0)},function(ne,be){ne.setTime(+ne+be*r)},function(ne,be){return(be-ne)/r},function(ne){return ne.getUTCHours()}),ae=te.range,U=S(function(ne){ne.setUTCHours(0,0,0,0)},function(ne,be){ne.setUTCDate(ne.getUTCDate()+be)},function(ne,be){return(be-ne)/n},function(ne){return ne.getUTCDate()-1}),H=U.range;function K(ne){return S(function(be){be.setUTCDate(be.getUTCDate()-(be.getUTCDay()+7-ne)%7),be.setUTCHours(0,0,0,0)},function(be,Fe){be.setUTCDate(be.getUTCDate()+Fe*7)},function(be,Fe){return(Fe-be)/i})}var V=K(0),$=K(1),X=K(2),Z=K(3),Q=K(4),re=K(5),ce=K(6),me=V.range,ye=$.range,Ae=X.range,Se=Z.range,Ce=Q.range,qe=re.range,Ue=ce.range,xe=S(function(ne){ne.setUTCDate(1),ne.setUTCHours(0,0,0,0)},function(ne,be){ne.setUTCMonth(ne.getUTCMonth()+be)},function(ne,be){return be.getUTCMonth()-ne.getUTCMonth()+(be.getUTCFullYear()-ne.getUTCFullYear())*12},function(ne){return ne.getUTCMonth()}),he=xe.range,oe=S(function(ne){ne.setUTCMonth(0,1),ne.setUTCHours(0,0,0,0)},function(ne,be){ne.setUTCFullYear(ne.getUTCFullYear()+be)},function(ne,be){return be.getUTCFullYear()-ne.getUTCFullYear()},function(ne){return ne.getUTCFullYear()});oe.every=function(ne){return!isFinite(ne=Math.floor(ne))||!(ne>0)?null:S(function(be){be.setUTCFullYear(Math.floor(be.getUTCFullYear()/ne)*ne),be.setUTCMonth(0,1),be.setUTCHours(0,0,0,0)},function(be,Fe){be.setUTCFullYear(be.getUTCFullYear()+Fe*ne)})};var le=oe.range;u.timeDay=o,u.timeDays=x,u.timeFriday=h,u.timeFridays=z,u.timeHour=d,u.timeHours=y,u.timeInterval=S,u.timeMillisecond=l,u.timeMilliseconds=e,u.timeMinute=p,u.timeMinutes=f,u.timeMonday=E,u.timeMondays=I,u.timeMonth=k,u.timeMonths=B,u.timeSaturday=b,u.timeSaturdays=D,u.timeSecond=s,u.timeSeconds=c,u.timeSunday=T,u.timeSundays=_,u.timeThursday=m,u.timeThursdays=R,u.timeTuesday=g,u.timeTuesdays=C,u.timeWednesday=A,u.timeWednesdays=F,u.timeWeek=T,u.timeWeeks=_,u.timeYear=O,u.timeYears=q,u.utcDay=U,u.utcDays=H,u.utcFriday=re,u.utcFridays=qe,u.utcHour=te,u.utcHours=ae,u.utcMillisecond=l,u.utcMilliseconds=e,u.utcMinute=Y,u.utcMinutes=ee,u.utcMonday=$,u.utcMondays=ye,u.utcMonth=xe,u.utcMonths=he,u.utcSaturday=ce,u.utcSaturdays=Ue,u.utcSecond=s,u.utcSeconds=c,u.utcSunday=V,u.utcSundays=me,u.utcThursday=Q,u.utcThursdays=Ce,u.utcTuesday=X,u.utcTuesdays=Ae,u.utcWednesday=Z,u.utcWednesdays=Se,u.utcWeek=V,u.utcWeeks=me,u.utcYear=oe,u.utcYears=le,Object.defineProperty(u,"__esModule",{value:!0})})}}),Hd=De({"node_modules/d3-time-format/dist/d3-time-format.js"(j,N){(function(u,v){typeof j=="object"&&typeof N<"u"?v(j,Fh()):(u=u||self,v(u.d3=u.d3||{},u.d3))})(j,function(u,v){"use strict";function w(Ee){if(0<=Ee.y&&Ee.y<100){var ze=new Date(-1,Ee.m,Ee.d,Ee.H,Ee.M,Ee.S,Ee.L);return ze.setFullYear(Ee.y),ze}return new Date(Ee.y,Ee.m,Ee.d,Ee.H,Ee.M,Ee.S,Ee.L)}function S(Ee){if(0<=Ee.y&&Ee.y<100){var ze=new Date(Date.UTC(-1,Ee.m,Ee.d,Ee.H,Ee.M,Ee.S,Ee.L));return ze.setUTCFullYear(Ee.y),ze}return new Date(Date.UTC(Ee.y,Ee.m,Ee.d,Ee.H,Ee.M,Ee.S,Ee.L))}function l(Ee,ze,ve){return{y:Ee,m:ze,d:ve,H:0,M:0,S:0,L:0}}function e(Ee){var ze=Ee.dateTime,ve=Ee.date,_e=Ee.time,Ie=Ee.periods,Be=Ee.days,We=Ee.shortDays,Xe=Ee.months,mt=Ee.shortMonths,ft=c(Ie),ht=p(Ie),gt=c(Be),_t=p(Be),Ft=c(We),St=p(We),hr=c(Xe),jr=p(Xe),ra=c(mt),$r=p(mt),pa={a:vi,A:Dn,b:oi,B:on,c:null,d:k,e:k,f:ee,H:B,I:O,j:q,L:Y,m:te,M:ae,p:mn,q:bi,Q:st,s:yt,S:U,u:H,U:K,V,w:$,W:X,x:null,X:null,y:Z,Y:Q,Z:re,"%":ut},oa={a:Li,A:$a,b:Va,B:it,c:null,d:ce,e:ce,f:Ce,H:me,I:ye,j:Ae,L:Se,m:qe,M:Ue,p:Qe,q:Jt,Q:st,s:yt,S:xe,u:he,U:oe,V:le,w:ne,W:be,x:null,X:null,y:Fe,Y:Ve,Z:je,"%":ut},aa={a:Ga,A:xa,b:Gn,B:Pn,c:sn,d:m,e:m,f:F,H:b,I:b,j:h,L:C,m:A,M:_,p:La,q:g,Q:z,s:D,S:I,u:d,U:y,V:o,w:f,W:x,x:Yn,X:Zn,y:T,Y:M,Z:E,"%":R};pa.x=ka(ve,pa),pa.X=ka(_e,pa),pa.c=ka(ze,pa),oa.x=ka(ve,oa),oa.X=ka(_e,oa),oa.c=ka(ze,oa);function ka(Yt,ar){return function(cr){var tr=[],Je=-1,bt=0,qt=Yt.length,Qt,br,Ir;for(cr instanceof Date||(cr=new Date(+cr));++Je53)return null;"w"in tr||(tr.w=1),"Z"in tr?(bt=S(l(tr.y,0,1)),qt=bt.getUTCDay(),bt=qt>4||qt===0?v.utcMonday.ceil(bt):v.utcMonday(bt),bt=v.utcDay.offset(bt,(tr.V-1)*7),tr.y=bt.getUTCFullYear(),tr.m=bt.getUTCMonth(),tr.d=bt.getUTCDate()+(tr.w+6)%7):(bt=w(l(tr.y,0,1)),qt=bt.getDay(),bt=qt>4||qt===0?v.timeMonday.ceil(bt):v.timeMonday(bt),bt=v.timeDay.offset(bt,(tr.V-1)*7),tr.y=bt.getFullYear(),tr.m=bt.getMonth(),tr.d=bt.getDate()+(tr.w+6)%7)}else("W"in tr||"U"in tr)&&("w"in tr||(tr.w="u"in tr?tr.u%7:"W"in tr?1:0),qt="Z"in tr?S(l(tr.y,0,1)).getUTCDay():w(l(tr.y,0,1)).getDay(),tr.m=0,tr.d="W"in tr?(tr.w+6)%7+tr.W*7-(qt+5)%7:tr.w+tr.U*7-(qt+6)%7);return"Z"in tr?(tr.H+=tr.Z/100|0,tr.M+=tr.Z%100,S(tr)):w(tr)}}function Da(Yt,ar,cr,tr){for(var Je=0,bt=ar.length,qt=cr.length,Qt,br;Je=qt)return-1;if(Qt=ar.charCodeAt(Je++),Qt===37){if(Qt=ar.charAt(Je++),br=aa[Qt in t?ar.charAt(Je++):Qt],!br||(tr=br(Yt,cr,tr))<0)return-1}else if(Qt!=cr.charCodeAt(tr++))return-1}return tr}function La(Yt,ar,cr){var tr=ft.exec(ar.slice(cr));return tr?(Yt.p=ht[tr[0].toLowerCase()],cr+tr[0].length):-1}function Ga(Yt,ar,cr){var tr=Ft.exec(ar.slice(cr));return tr?(Yt.w=St[tr[0].toLowerCase()],cr+tr[0].length):-1}function xa(Yt,ar,cr){var tr=gt.exec(ar.slice(cr));return tr?(Yt.w=_t[tr[0].toLowerCase()],cr+tr[0].length):-1}function Gn(Yt,ar,cr){var tr=ra.exec(ar.slice(cr));return tr?(Yt.m=$r[tr[0].toLowerCase()],cr+tr[0].length):-1}function Pn(Yt,ar,cr){var tr=hr.exec(ar.slice(cr));return tr?(Yt.m=jr[tr[0].toLowerCase()],cr+tr[0].length):-1}function sn(Yt,ar,cr){return Da(Yt,ze,ar,cr)}function Yn(Yt,ar,cr){return Da(Yt,ve,ar,cr)}function Zn(Yt,ar,cr){return Da(Yt,_e,ar,cr)}function vi(Yt){return We[Yt.getDay()]}function Dn(Yt){return Be[Yt.getDay()]}function oi(Yt){return mt[Yt.getMonth()]}function on(Yt){return Xe[Yt.getMonth()]}function mn(Yt){return Ie[+(Yt.getHours()>=12)]}function bi(Yt){return 1+~~(Yt.getMonth()/3)}function Li(Yt){return We[Yt.getUTCDay()]}function $a(Yt){return Be[Yt.getUTCDay()]}function Va(Yt){return mt[Yt.getUTCMonth()]}function it(Yt){return Xe[Yt.getUTCMonth()]}function Qe(Yt){return Ie[+(Yt.getUTCHours()>=12)]}function Jt(Yt){return 1+~~(Yt.getUTCMonth()/3)}return{format:function(Yt){var ar=ka(Yt+="",pa);return ar.toString=function(){return Yt},ar},parse:function(Yt){var ar=Ta(Yt+="",!1);return ar.toString=function(){return Yt},ar},utcFormat:function(Yt){var ar=ka(Yt+="",oa);return ar.toString=function(){return Yt},ar},utcParse:function(Yt){var ar=Ta(Yt+="",!0);return ar.toString=function(){return Yt},ar}}}var t={"-":"",_:" ",0:"0"},a=/^\s*\d+/,r=/^%/,n=/[\\^$*+?|[\]().{}]/g;function i(Ee,ze,ve){var _e=Ee<0?"-":"",Ie=(_e?-Ee:Ee)+"",Be=Ie.length;return _e+(Be68?1900:2e3),ve+_e[0].length):-1}function E(Ee,ze,ve){var _e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ze.slice(ve,ve+6));return _e?(Ee.Z=_e[1]?0:-(_e[2]+(_e[3]||"00")),ve+_e[0].length):-1}function g(Ee,ze,ve){var _e=a.exec(ze.slice(ve,ve+1));return _e?(Ee.q=_e[0]*3-3,ve+_e[0].length):-1}function A(Ee,ze,ve){var _e=a.exec(ze.slice(ve,ve+2));return _e?(Ee.m=_e[0]-1,ve+_e[0].length):-1}function m(Ee,ze,ve){var _e=a.exec(ze.slice(ve,ve+2));return _e?(Ee.d=+_e[0],ve+_e[0].length):-1}function h(Ee,ze,ve){var _e=a.exec(ze.slice(ve,ve+3));return _e?(Ee.m=0,Ee.d=+_e[0],ve+_e[0].length):-1}function b(Ee,ze,ve){var _e=a.exec(ze.slice(ve,ve+2));return _e?(Ee.H=+_e[0],ve+_e[0].length):-1}function _(Ee,ze,ve){var _e=a.exec(ze.slice(ve,ve+2));return _e?(Ee.M=+_e[0],ve+_e[0].length):-1}function I(Ee,ze,ve){var _e=a.exec(ze.slice(ve,ve+2));return _e?(Ee.S=+_e[0],ve+_e[0].length):-1}function C(Ee,ze,ve){var _e=a.exec(ze.slice(ve,ve+3));return _e?(Ee.L=+_e[0],ve+_e[0].length):-1}function F(Ee,ze,ve){var _e=a.exec(ze.slice(ve,ve+6));return _e?(Ee.L=Math.floor(_e[0]/1e3),ve+_e[0].length):-1}function R(Ee,ze,ve){var _e=r.exec(ze.slice(ve,ve+1));return _e?ve+_e[0].length:-1}function z(Ee,ze,ve){var _e=a.exec(ze.slice(ve));return _e?(Ee.Q=+_e[0],ve+_e[0].length):-1}function D(Ee,ze,ve){var _e=a.exec(ze.slice(ve));return _e?(Ee.s=+_e[0],ve+_e[0].length):-1}function k(Ee,ze){return i(Ee.getDate(),ze,2)}function B(Ee,ze){return i(Ee.getHours(),ze,2)}function O(Ee,ze){return i(Ee.getHours()%12||12,ze,2)}function q(Ee,ze){return i(1+v.timeDay.count(v.timeYear(Ee),Ee),ze,3)}function Y(Ee,ze){return i(Ee.getMilliseconds(),ze,3)}function ee(Ee,ze){return Y(Ee,ze)+"000"}function te(Ee,ze){return i(Ee.getMonth()+1,ze,2)}function ae(Ee,ze){return i(Ee.getMinutes(),ze,2)}function U(Ee,ze){return i(Ee.getSeconds(),ze,2)}function H(Ee){var ze=Ee.getDay();return ze===0?7:ze}function K(Ee,ze){return i(v.timeSunday.count(v.timeYear(Ee)-1,Ee),ze,2)}function V(Ee,ze){var ve=Ee.getDay();return Ee=ve>=4||ve===0?v.timeThursday(Ee):v.timeThursday.ceil(Ee),i(v.timeThursday.count(v.timeYear(Ee),Ee)+(v.timeYear(Ee).getDay()===4),ze,2)}function $(Ee){return Ee.getDay()}function X(Ee,ze){return i(v.timeMonday.count(v.timeYear(Ee)-1,Ee),ze,2)}function Z(Ee,ze){return i(Ee.getFullYear()%100,ze,2)}function Q(Ee,ze){return i(Ee.getFullYear()%1e4,ze,4)}function re(Ee){var ze=Ee.getTimezoneOffset();return(ze>0?"-":(ze*=-1,"+"))+i(ze/60|0,"0",2)+i(ze%60,"0",2)}function ce(Ee,ze){return i(Ee.getUTCDate(),ze,2)}function me(Ee,ze){return i(Ee.getUTCHours(),ze,2)}function ye(Ee,ze){return i(Ee.getUTCHours()%12||12,ze,2)}function Ae(Ee,ze){return i(1+v.utcDay.count(v.utcYear(Ee),Ee),ze,3)}function Se(Ee,ze){return i(Ee.getUTCMilliseconds(),ze,3)}function Ce(Ee,ze){return Se(Ee,ze)+"000"}function qe(Ee,ze){return i(Ee.getUTCMonth()+1,ze,2)}function Ue(Ee,ze){return i(Ee.getUTCMinutes(),ze,2)}function xe(Ee,ze){return i(Ee.getUTCSeconds(),ze,2)}function he(Ee){var ze=Ee.getUTCDay();return ze===0?7:ze}function oe(Ee,ze){return i(v.utcSunday.count(v.utcYear(Ee)-1,Ee),ze,2)}function le(Ee,ze){var ve=Ee.getUTCDay();return Ee=ve>=4||ve===0?v.utcThursday(Ee):v.utcThursday.ceil(Ee),i(v.utcThursday.count(v.utcYear(Ee),Ee)+(v.utcYear(Ee).getUTCDay()===4),ze,2)}function ne(Ee){return Ee.getUTCDay()}function be(Ee,ze){return i(v.utcMonday.count(v.utcYear(Ee)-1,Ee),ze,2)}function Fe(Ee,ze){return i(Ee.getUTCFullYear()%100,ze,2)}function Ve(Ee,ze){return i(Ee.getUTCFullYear()%1e4,ze,4)}function je(){return"+0000"}function ut(){return"%"}function st(Ee){return+Ee}function yt(Ee){return Math.floor(+Ee/1e3)}var At;Pt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Pt(Ee){return At=e(Ee),u.timeFormat=At.format,u.timeParse=At.parse,u.utcFormat=At.utcFormat,u.utcParse=At.utcParse,At}var Zt="%Y-%m-%dT%H:%M:%S.%LZ";function vr(Ee){return Ee.toISOString()}var Nt=Date.prototype.toISOString?vr:u.utcFormat(Zt);function Kt(Ee){var ze=new Date(Ee);return isNaN(ze)?null:ze}var nt=+new Date("2000-01-01T00:00:00.000Z")?Kt:u.utcParse(Zt);u.isoFormat=Nt,u.isoParse=nt,u.timeFormatDefaultLocale=Pt,u.timeFormatLocale=e,Object.defineProperty(u,"__esModule",{value:!0})})}}),u3=De({"node_modules/d3-format/dist/d3-format.js"(j,N){(function(u,v){typeof j=="object"&&typeof N<"u"?v(j):(u=typeof globalThis<"u"?globalThis:u||self,v(u.d3=u.d3||{}))})(j,function(u){"use strict";function v(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function w(A,m){if((h=(A=m?A.toExponential(m-1):A.toExponential()).indexOf("e"))<0)return null;var h,b=A.slice(0,h);return[b.length>1?b[0]+b.slice(2):b,+A.slice(h+1)]}function S(A){return A=w(Math.abs(A)),A?A[1]:NaN}function l(A,m){return function(h,b){for(var _=h.length,I=[],C=0,F=A[0],R=0;_>0&&F>0&&(R+F+1>b&&(F=Math.max(1,b-R)),I.push(h.substring(_-=F,_+F)),!((R+=F+1)>b));)F=A[C=(C+1)%A.length];return I.reverse().join(m)}}function e(A){return function(m){return m.replace(/[0-9]/g,function(h){return A[+h]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function a(A){if(!(m=t.exec(A)))throw new Error("invalid format: "+A);var m;return new r({fill:m[1],align:m[2],sign:m[3],symbol:m[4],zero:m[5],width:m[6],comma:m[7],precision:m[8]&&m[8].slice(1),trim:m[9],type:m[10]})}a.prototype=r.prototype;function r(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function n(A){e:for(var m=A.length,h=1,b=-1,_;h0&&(b=0);break}return b>0?A.slice(0,b)+A.slice(_+1):A}var i;function s(A,m){var h=w(A,m);if(!h)return A+"";var b=h[0],_=h[1],I=_-(i=Math.max(-8,Math.min(8,Math.floor(_/3)))*3)+1,C=b.length;return I===C?b:I>C?b+new Array(I-C+1).join("0"):I>0?b.slice(0,I)+"."+b.slice(I):"0."+new Array(1-I).join("0")+w(A,Math.max(0,m+I-1))[0]}function c(A,m){var h=w(A,m);if(!h)return A+"";var b=h[0],_=h[1];return _<0?"0."+new Array(-_).join("0")+b:b.length>_+1?b.slice(0,_+1)+"."+b.slice(_+1):b+new Array(_-b.length+2).join("0")}var p={"%":function(A,m){return(A*100).toFixed(m)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:v,e:function(A,m){return A.toExponential(m)},f:function(A,m){return A.toFixed(m)},g:function(A,m){return A.toPrecision(m)},o:function(A){return Math.round(A).toString(8)},p:function(A,m){return c(A*100,m)},r:c,s,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function f(A){return A}var d=Array.prototype.map,y=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function o(A){var m=A.grouping===void 0||A.thousands===void 0?f:l(d.call(A.grouping,Number),A.thousands+""),h=A.currency===void 0?"":A.currency[0]+"",b=A.currency===void 0?"":A.currency[1]+"",_=A.decimal===void 0?".":A.decimal+"",I=A.numerals===void 0?f:e(d.call(A.numerals,String)),C=A.percent===void 0?"%":A.percent+"",F=A.minus===void 0?"-":A.minus+"",R=A.nan===void 0?"NaN":A.nan+"";function z(k){k=a(k);var B=k.fill,O=k.align,q=k.sign,Y=k.symbol,ee=k.zero,te=k.width,ae=k.comma,U=k.precision,H=k.trim,K=k.type;K==="n"?(ae=!0,K="g"):p[K]||(U===void 0&&(U=12),H=!0,K="g"),(ee||B==="0"&&O==="=")&&(ee=!0,B="0",O="=");var V=Y==="$"?h:Y==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",$=Y==="$"?b:/[%p]/.test(K)?C:"",X=p[K],Z=/[defgprs%]/.test(K);U=U===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,U)):Math.max(0,Math.min(20,U));function Q(re){var ce=V,me=$,ye,Ae,Se;if(K==="c")me=X(re)+me,re="";else{re=+re;var Ce=re<0||1/re<0;if(re=isNaN(re)?R:X(Math.abs(re),U),H&&(re=n(re)),Ce&&+re==0&&q!=="+"&&(Ce=!1),ce=(Ce?q==="("?q:F:q==="-"||q==="("?"":q)+ce,me=(K==="s"?y[8+i/3]:"")+me+(Ce&&q==="("?")":""),Z){for(ye=-1,Ae=re.length;++yeSe||Se>57){me=(Se===46?_+re.slice(ye+1):re.slice(ye))+me,re=re.slice(0,ye);break}}}ae&&!ee&&(re=m(re,1/0));var qe=ce.length+re.length+me.length,Ue=qe>1)+ce+re+me+Ue.slice(qe);break;default:re=Ue+ce+re+me;break}return I(re)}return Q.toString=function(){return k+""},Q}function D(k,B){var O=z((k=a(k),k.type="f",k)),q=Math.max(-8,Math.min(8,Math.floor(S(B)/3)))*3,Y=Math.pow(10,-q),ee=y[8+q/3];return function(te){return O(Y*te)+ee}}return{format:z,formatPrefix:D}}var x;M({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function M(A){return x=o(A),u.format=x.format,u.formatPrefix=x.formatPrefix,x}function T(A){return Math.max(0,-S(Math.abs(A)))}function E(A,m){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(S(m)/3)))*3-S(Math.abs(A)))}function g(A,m){return A=Math.abs(A),m=Math.abs(m)-A,Math.max(0,S(m)-S(A))+1}u.FormatSpecifier=r,u.formatDefaultLocale=M,u.formatLocale=o,u.formatSpecifier=a,u.precisionFixed=T,u.precisionPrefix=E,u.precisionRound=g,Object.defineProperty(u,"__esModule",{value:!0})})}}),b9=De({"node_modules/is-string-blank/index.js"(j,N){"use strict";N.exports=function(u){for(var v=u.length,w,S=0;S13)&&w!==32&&w!==133&&w!==160&&w!==5760&&w!==6158&&(w<8192||w>8205)&&w!==8232&&w!==8233&&w!==8239&&w!==8287&&w!==8288&&w!==12288&&w!==65279)return!1;return!0}}}),io=De({"node_modules/fast-isnumeric/index.js"(j,N){"use strict";var u=b9();N.exports=function(v){var w=typeof v;if(w==="string"){var S=v;if(v=+v,v===0&&u(S))return!1}else if(w!=="number")return!1;return v-v<1}}}),Ho=De({"src/constants/numerical.js"(j,N){"use strict";N.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}}}),c3=De({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(j,N){(function(u,v){typeof j=="object"&&typeof N<"u"?v(j):(u=typeof globalThis<"u"?globalThis:u||self,v(u["base64-arraybuffer"]={}))})(j,function(u){"use strict";for(var v="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",w=typeof Uint8Array>"u"?[]:new Uint8Array(256),S=0;S>2],i+=v[(a[r]&3)<<4|a[r+1]>>4],i+=v[(a[r+1]&15)<<2|a[r+2]>>6],i+=v[a[r+2]&63];return n%3===2?i=i.substring(0,i.length-1)+"=":n%3===1&&(i=i.substring(0,i.length-2)+"=="),i},e=function(t){var a=t.length*.75,r=t.length,n,i=0,s,c,p,f;t[t.length-1]==="="&&(a--,t[t.length-2]==="="&&a--);var d=new ArrayBuffer(a),y=new Uint8Array(d);for(n=0;n>4,y[i++]=(c&15)<<4|p>>2,y[i++]=(p&3)<<6|f&63;return d};u.decode=e,u.encode=l,Object.defineProperty(u,"__esModule",{value:!0})})}}),Bv=De({"src/lib/is_plain_object.js"(j,N){"use strict";N.exports=function(v){return window&&window.process&&window.process.versions?Object.prototype.toString.call(v)==="[object Object]":Object.prototype.toString.call(v)==="[object Object]"&&Object.getPrototypeOf(v).hasOwnProperty("hasOwnProperty")}}}),Vf=De({"src/lib/array.js"(j){"use strict";var N=c3().decode,u=Bv(),v=Array.isArray,w=ArrayBuffer,S=DataView;function l(s){return w.isView(s)&&!(s instanceof S)}j.isTypedArray=l;function e(s){return v(s)||l(s)}j.isArrayOrTypedArray=e;function t(s){return!e(s[0])}j.isArray1D=t,j.ensureArray=function(s,c){return v(s)||(s=[]),s.length=c,s};var a={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};a.uint8c=a.u1c,a.uint8=a.u1,a.int8=a.i1,a.uint16=a.u2,a.int16=a.i2,a.uint32=a.u4,a.int32=a.i4,a.float32=a.f4,a.float64=a.f8;function r(s){return s.constructor===ArrayBuffer}j.isArrayBuffer=r,j.decodeTypedArraySpec=function(s){var c=[],p=n(s),f=p.dtype,d=a[f];if(!d)throw new Error('Error in dtype: "'+f+'"');var y=d.BYTES_PER_ELEMENT,o=p.bdata;r(o)||(o=N(o));var x=p.shape===void 0?[o.byteLength/y]:(""+p.shape).split(",");x.reverse();var M=x.length,T,E,g=+x[0],A=y*g,m=0;if(M===1)c=new d(o);else if(M===2)for(T=+x[1],E=0;E2)return d[T]=d[T]|l,x.set(M,null);if(o){for(c=T;c0)return Math.log(w)/Math.LN10;var l=Math.log(Math.min(S[0],S[1]))/Math.LN10;return u(l)||(l=Math.log(Math.max(S[0],S[1]))/Math.LN10-6),l}}}),T9=De({"src/lib/relink_private.js"(j,N){"use strict";var u=Vf().isArrayOrTypedArray,v=Bv();N.exports=function w(S,l){for(var e in l){var t=l[e],a=S[e];if(a!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in S)continue;S[e]=t}else if(u(t)&&u(a)&&v(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,a.length),n=0;nM9,modHalf:()=>S9});function M9(j,N){let u=j%N;return u<0?u+N:u}function S9(j,N){return Math.abs(j)>N/2?j-Math.round(j/N)*N:j}var im=di({"src/lib/mod.ts"(){"use strict"}}),Ji=De({"src/lib/extend.js"(j){"use strict";var N=Bv(),u=Array.isArray;function v(S,l){var e,t;for(e=0;e=4&&j[3]!==1&&(N=", "+j[3]),"hwb("+j[0]+", "+j[1]+"%, "+j[2]+"%"+N+")"},hh.to.keyword=function(...j){return I_[j.slice(0,3)]},Nv=hh}}),gp,C9=di({"node_modules/color/node_modules/color-name/index.js"(){gp={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]}}});function yp(j){let N=j>.0031308?1.055*j**.4166666666666667-.055:j*12.92;return Math.min(Math.max(0,N),1)}function _p(j){return j>.04045?((j+.055)/1.055)**2.4:j/12.92}function L9(j,N){return(j[0]-N[0])**2+(j[1]-N[1])**2+(j[2]-N[2])**2}var D_,eo,Yd,od,f3=di({"node_modules/color/node_modules/color-convert/conversions.js"(){C9(),D_={};for(let j of Object.keys(gp))D_[gp[j]]=j;eo={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},Yd=eo,od=(6/29)**3;for(let j of Object.keys(eo)){if(!("channels"in eo[j]))throw new Error("missing channels property: "+j);if(!("labels"in eo[j]))throw new Error("missing channel labels property: "+j);if(eo[j].labels.length!==eo[j].channels)throw new Error("channel and label counts mismatch: "+j);let{channels:N,labels:u}=eo[j];delete eo[j].channels,delete eo[j].labels,Object.defineProperty(eo[j],"channels",{value:N}),Object.defineProperty(eo[j],"labels",{value:u})}eo.rgb.hsl=function(j){let N=j[0]/255,u=j[1]/255,v=j[2]/255,w=Math.min(N,u,v),S=Math.max(N,u,v),l=S-w,e,t;switch(S){case w:{e=0;break}case N:{e=(u-v)/l;break}case u:{e=2+(v-N)/l;break}case v:{e=4+(N-u)/l;break}}e=Math.min(e*60,360),e<0&&(e+=360);let a=(w+S)/2;return S===w?t=0:a<=.5?t=l/(S+w):t=l/(2-S-w),[e,t*100,a*100]},eo.rgb.hsv=function(j){let N,u,v,w,S,l=j[0]/255,e=j[1]/255,t=j[2]/255,a=Math.max(l,e,t),r=a-Math.min(l,e,t),n=function(i){return(a-i)/6/r+1/2};if(r===0)w=0,S=0;else{switch(S=r/a,N=n(l),u=n(e),v=n(t),a){case l:{w=v-u;break}case e:{w=1/3+N-v;break}case t:{w=2/3+u-N;break}}w<0?w+=1:w>1&&(w-=1)}return[w*360,S*100,a*100]},eo.rgb.hwb=function(j){let N=j[0],u=j[1],v=j[2],w=eo.rgb.hsl(j)[0],S=1/255*Math.min(N,Math.min(u,v));return v=1-1/255*Math.max(N,Math.max(u,v)),[w,S*100,v*100]},eo.rgb.oklab=function(j){let N=_p(j[0]/255),u=_p(j[1]/255),v=_p(j[2]/255),w=Math.cbrt(.4122214708*N+.5363325363*u+.0514459929*v),S=Math.cbrt(.2119034982*N+.6806995451*u+.1073969566*v),l=Math.cbrt(.0883024619*N+.2817188376*u+.6299787005*v),e=.2104542553*w+.793617785*S-.0040720468*l,t=1.9779984951*w-2.428592205*S+.4505937099*l,a=.0259040371*w+.7827717662*S-.808675766*l;return[e*100,t*100,a*100]},eo.rgb.cmyk=function(j){let N=j[0]/255,u=j[1]/255,v=j[2]/255,w=Math.min(1-N,1-u,1-v),S=(1-N-w)/(1-w)||0,l=(1-u-w)/(1-w)||0,e=(1-v-w)/(1-w)||0;return[S*100,l*100,e*100,w*100]},eo.rgb.keyword=function(j){let N=D_[j];if(N)return N;let u=Number.POSITIVE_INFINITY,v;for(let w of Object.keys(gp)){let S=gp[w],l=L9(j,S);lod?u**(1/3):7.787*u+16/116,v=v>od?v**(1/3):7.787*v+16/116,w=w>od?w**(1/3):7.787*w+16/116;let S=116*v-16,l=500*(u-v),e=200*(v-w);return[S,l,e]},eo.hsl.rgb=function(j){let N=j[0]/360,u=j[1]/100,v=j[2]/100,w,S;if(u===0)return S=v*255,[S,S,S];let l=v<.5?v*(1+u):v+u-v*u,e=2*v-l,t=[0,0,0];for(let a=0;a<3;a++)w=N+1/3*-(a-1),w<0&&w++,w>1&&w--,6*w<1?S=e+(l-e)*6*w:2*w<1?S=l:3*w<2?S=e+(l-e)*(2/3-w)*6:S=e,t[a]=S*255;return t},eo.hsl.hsv=function(j){let N=j[0],u=j[1]/100,v=j[2]/100,w=u,S=Math.max(v,.01);v*=2,u*=v<=1?v:2-v,w*=S<=1?S:2-S;let l=(v+u)/2,e=v===0?2*w/(S+w):2*u/(v+u);return[N,e*100,l*100]},eo.hsv.rgb=function(j){let N=j[0]/60,u=j[1]/100,v=j[2]/100,w=Math.floor(N)%6,S=N-Math.floor(N),l=255*v*(1-u),e=255*v*(1-u*S),t=255*v*(1-u*(1-S));switch(v*=255,w){case 0:return[v,t,l];case 1:return[e,v,l];case 2:return[l,v,t];case 3:return[l,e,v];case 4:return[t,l,v];case 5:return[v,l,e]}},eo.hsv.hsl=function(j){let N=j[0],u=j[1]/100,v=j[2]/100,w=Math.max(v,.01),S,l;l=(2-u)*v;let e=(2-u)*w;return S=u*w,S/=e<=1?e:2-e,S=S||0,l/=2,[N,S*100,l*100]},eo.hwb.rgb=function(j){let N=j[0]/360,u=j[1]/100,v=j[2]/100,w=u+v,S;w>1&&(u/=w,v/=w);let l=Math.floor(6*N),e=1-v;S=6*N-l,l&1&&(S=1-S);let t=u+S*(e-u),a,r,n;switch(l){default:case 6:case 0:{a=e,r=t,n=u;break}case 1:{a=t,r=e,n=u;break}case 2:{a=u,r=e,n=t;break}case 3:{a=u,r=t,n=e;break}case 4:{a=t,r=u,n=e;break}case 5:{a=e,r=u,n=t;break}}return[a*255,r*255,n*255]},eo.cmyk.rgb=function(j){let N=j[0]/100,u=j[1]/100,v=j[2]/100,w=j[3]/100,S=1-Math.min(1,N*(1-w)+w),l=1-Math.min(1,u*(1-w)+w),e=1-Math.min(1,v*(1-w)+w);return[S*255,l*255,e*255]},eo.xyz.rgb=function(j){let N=j[0]/100,u=j[1]/100,v=j[2]/100,w,S,l;return w=N*3.2404542+u*-1.5371385+v*-.4985314,S=N*-.969266+u*1.8760108+v*.041556,l=N*.0556434+u*-.2040259+v*1.0572252,w=yp(w),S=yp(S),l=yp(l),[w*255,S*255,l*255]},eo.xyz.lab=function(j){let N=j[0],u=j[1],v=j[2];N/=95.047,u/=100,v/=108.883,N=N>od?N**(1/3):7.787*N+16/116,u=u>od?u**(1/3):7.787*u+16/116,v=v>od?v**(1/3):7.787*v+16/116;let w=116*u-16,S=500*(N-u),l=200*(u-v);return[w,S,l]},eo.xyz.oklab=function(j){let N=j[0]/100,u=j[1]/100,v=j[2]/100,w=Math.cbrt(.8189330101*N+.3618667424*u-.1288597137*v),S=Math.cbrt(.0329845436*N+.9293118715*u+.0361456387*v),l=Math.cbrt(.0482003018*N+.2643662691*u+.633851707*v),e=.2104542553*w+.793617785*S-.0040720468*l,t=1.9779984951*w-2.428592205*S+.4505937099*l,a=.0259040371*w+.7827717662*S-.808675766*l;return[e*100,t*100,a*100]},eo.oklab.oklch=function(j){return eo.lab.lch(j)},eo.oklab.xyz=function(j){let N=j[0]/100,u=j[1]/100,v=j[2]/100,w=(.999999998*N+.396337792*u+.215803758*v)**3,S=(1.000000008*N-.105561342*u-.063854175*v)**3,l=(1.000000055*N-.089484182*u-1.291485538*v)**3,e=1.227013851*w-.55779998*S+.281256149*l,t=-.040580178*w+1.11225687*S-.071676679*l,a=-.076381285*w-.421481978*S+1.58616322*l;return[e*100,t*100,a*100]},eo.oklab.rgb=function(j){let N=j[0]/100,u=j[1]/100,v=j[2]/100,w=(N+.3963377774*u+.2158037573*v)**3,S=(N-.1055613458*u-.0638541728*v)**3,l=(N-.0894841775*u-1.291485548*v)**3,e=yp(4.0767416621*w-3.3077115913*S+.2309699292*l),t=yp(-1.2684380046*w+2.6097574011*S-.3413193965*l),a=yp(-.0041960863*w-.7034186147*S+1.707614701*l);return[e*255,t*255,a*255]},eo.oklch.oklab=function(j){return eo.lch.lab(j)},eo.lab.xyz=function(j){let N=j[0],u=j[1],v=j[2],w,S,l;S=(N+16)/116,w=u/500+S,l=S-v/200;let e=S**3,t=w**3,a=l**3;return S=e>od?e:(S-16/116)/7.787,w=t>od?t:(w-16/116)/7.787,l=a>od?a:(l-16/116)/7.787,w*=95.047,S*=100,l*=108.883,[w,S,l]},eo.lab.lch=function(j){let N=j[0],u=j[1],v=j[2],w;w=Math.atan2(v,u)*360/2/Math.PI,w<0&&(w+=360);let l=Math.sqrt(u*u+v*v);return[N,l,w]},eo.lch.lab=function(j){let N=j[0],u=j[1],w=j[2]/360*2*Math.PI,S=u*Math.cos(w),l=u*Math.sin(w);return[N,S,l]},eo.rgb.ansi16=function(j,N=null){let[u,v,w]=j,S=N===null?eo.rgb.hsv(j)[2]:N;if(S=Math.round(S/50),S===0)return 30;let l=30+(Math.round(w/255)<<2|Math.round(v/255)<<1|Math.round(u/255));return S===2&&(l+=60),l},eo.hsv.ansi16=function(j){return eo.rgb.ansi16(eo.hsv.rgb(j),j[2])},eo.rgb.ansi256=function(j){let N=j[0],u=j[1],v=j[2];return N>>4===u>>4&&u>>4===v>>4?N<8?16:N>248?231:Math.round((N-8)/247*24)+232:16+36*Math.round(N/255*5)+6*Math.round(u/255*5)+Math.round(v/255*5)},eo.ansi16.rgb=function(j){j=j[0];let N=j%10;if(N===0||N===7)return j>50&&(N+=3.5),N=N/10.5*255,[N,N,N];let u=(Math.trunc(j>50)+1)*.5,v=(N&1)*u*255,w=(N>>1&1)*u*255,S=(N>>2&1)*u*255;return[v,w,S]},eo.ansi256.rgb=function(j){if(j=j[0],j>=232){let S=(j-232)*10+8;return[S,S,S]}j-=16;let N,u=Math.floor(j/36)/5*255,v=Math.floor((N=j%36)/6)/5*255,w=N%6/5*255;return[u,v,w]},eo.rgb.hex=function(j){let u=(((Math.round(j[0])&255)<<16)+((Math.round(j[1])&255)<<8)+(Math.round(j[2])&255)).toString(16).toUpperCase();return"000000".slice(u.length)+u},eo.hex.rgb=function(j){let N=j.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!N)return[0,0,0];let u=N[0];N[0].length===3&&(u=[...u].map(e=>e+e).join(""));let v=Number.parseInt(u,16),w=v>>16&255,S=v>>8&255,l=v&255;return[w,S,l]},eo.rgb.hcg=function(j){let N=j[0]/255,u=j[1]/255,v=j[2]/255,w=Math.max(Math.max(N,u),v),S=Math.min(Math.min(N,u),v),l=w-S,e,t=l<1?S/(1-l):0;return l<=0?e=0:w===N?e=(u-v)/l%6:w===u?e=2+(v-N)/l:e=4+(N-u)/l,e/=6,e%=1,[e*360,l*100,t*100]},eo.hsl.hcg=function(j){let N=j[1]/100,u=j[2]/100,v=u<.5?2*N*u:2*N*(1-u),w=0;return v<1&&(w=(u-.5*v)/(1-v)),[j[0],v*100,w*100]},eo.hsv.hcg=function(j){let N=j[1]/100,u=j[2]/100,v=N*u,w=0;return v<1&&(w=(u-v)/(1-v)),[j[0],v*100,w*100]},eo.hcg.rgb=function(j){let N=j[0]/360,u=j[1]/100,v=j[2]/100;if(u===0)return[v*255,v*255,v*255];let w=[0,0,0],S=N%1*6,l=S%1,e=1-l,t=0;switch(Math.floor(S)){case 0:{w[0]=1,w[1]=l,w[2]=0;break}case 1:{w[0]=e,w[1]=1,w[2]=0;break}case 2:{w[0]=0,w[1]=1,w[2]=l;break}case 3:{w[0]=0,w[1]=e,w[2]=1;break}case 4:{w[0]=l,w[1]=0,w[2]=1;break}default:w[0]=1,w[1]=0,w[2]=e}return t=(1-u)*v,[(u*w[0]+t)*255,(u*w[1]+t)*255,(u*w[2]+t)*255]},eo.hcg.hsv=function(j){let N=j[1]/100,u=j[2]/100,v=N+u*(1-N),w=0;return v>0&&(w=N/v),[j[0],w*100,v*100]},eo.hcg.hsl=function(j){let N=j[1]/100,v=j[2]/100*(1-N)+.5*N,w=0;return v>0&&v<.5?w=N/(2*v):v>=.5&&v<1&&(w=N/(2*(1-v))),[j[0],w*100,v*100]},eo.hcg.hwb=function(j){let N=j[1]/100,u=j[2]/100,v=N+u*(1-N);return[j[0],(v-N)*100,(1-v)*100]},eo.hwb.hcg=function(j){let N=j[1]/100,v=1-j[2]/100,w=v-N,S=0;return w<1&&(S=(v-w)/(1-w)),[j[0],w*100,S*100]},eo.apple.rgb=function(j){return[j[0]/65535*255,j[1]/65535*255,j[2]/65535*255]},eo.rgb.apple=function(j){return[j[0]/255*65535,j[1]/255*65535,j[2]/255*65535]},eo.gray.rgb=function(j){return[j[0]/100*255,j[0]/100*255,j[0]/100*255]},eo.gray.hsl=function(j){return[0,0,j[0]]},eo.gray.hsv=eo.gray.hsl,eo.gray.hwb=function(j){return[0,100,j[0]]},eo.gray.cmyk=function(j){return[0,0,0,j[0]]},eo.gray.lab=function(j){return[j[0],0,0]},eo.gray.hex=function(j){let N=Math.round(j[0]/100*255)&255,v=((N<<16)+(N<<8)+N).toString(16).toUpperCase();return"000000".slice(v.length)+v},eo.rgb.gray=function(j){return[(j[0]+j[1]+j[2])/3/255*100]}}});function P9(){let j={},N=Object.keys(Yd);for(let{length:u}=N,v=0;v0;){let v=u.pop(),w=Object.keys(Yd[v]);for(let{length:S}=w,l=0;l1&&(u=v),j(u))};return"conversion"in j&&(N.conversion=j.conversion),N}function O9(j){let N=function(...u){let v=u[0];if(v==null)return v;v.length>1&&(u=v);let w=j(u);if(typeof w=="object")for(let{length:S}=w,l=0;lp3});function ff(j,N){if(!(this instanceof ff))return new ff(j,N);if(N&&N in z_&&(N=null),N&&!(N in xh))throw new Error("Unknown model: "+N);let u,v;if(j==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(j instanceof ff)this.model=j.model,this.color=[...j.color],this.valpha=j.valpha;else if(typeof j=="string"){let w=Nv.get(j);if(w===null)throw new Error("Unable to parse color from string: "+j);this.model=w.model,v=xh[this.model].channels,this.color=w.value.slice(0,v),this.valpha=typeof w.value[v]=="number"?w.value[v]:1}else if(j.length>0){this.model=N||"rgb",v=xh[this.model].channels;let w=Array.prototype.slice.call(j,0,v);this.color=F_(w,v),this.valpha=typeof j[v]=="number"?j[v]:1}else if(typeof j=="number")this.model="rgb",this.color=[j>>16&255,j>>8&255,j&255],this.valpha=1;else{this.valpha=1;let w=Object.keys(j);"alpha"in j&&(w.splice(w.indexOf("alpha"),1),this.valpha=typeof j.alpha=="number"?j.alpha:0);let S=w.sort().join("");if(!(S in g1))throw new Error("Unable to parse color from object: "+JSON.stringify(j));this.model=g1[S];let{labels:l}=xh[this.model],e=[];for(u=0;u(j%360+360)%360),saturationl:tc("hsl",1,Vc(100)),lightness:tc("hsl",2,Vc(100)),saturationv:tc("hsv",1,Vc(100)),value:tc("hsv",2,Vc(100)),chroma:tc("hcg",1,Vc(100)),gray:tc("hcg",2,Vc(100)),white:tc("hwb",1,Vc(100)),wblack:tc("hwb",2,Vc(100)),cyan:tc("cmyk",0,Vc(100)),magenta:tc("cmyk",1,Vc(100)),yellow:tc("cmyk",2,Vc(100)),black:tc("cmyk",3,Vc(100)),x:tc("xyz",0,Vc(95.047)),y:tc("xyz",1,Vc(100)),z:tc("xyz",2,Vc(108.833)),l:tc("lab",0,Vc(100)),a:tc("lab",1),b:tc("lab",2),keyword(j){return j!==void 0?new ff(j):xh[this.model].keyword(this.color)},hex(j){return j!==void 0?new ff(j):Nv.to.hex(...this.rgb().round().color)},hexa(j){if(j!==void 0)return new ff(j);let N=this.rgb().round().color,u=Math.round(this.valpha*255).toString(16).toUpperCase();return u.length===1&&(u="0"+u),Nv.to.hex(...N)+u},rgbNumber(){let j=this.rgb().color;return(j[0]&255)<<16|(j[1]&255)<<8|j[2]&255},luminosity(){let j=this.rgb().color,N=[];for(let[u,v]of j.entries()){let w=v/255;N[u]=w<=.04045?w/12.92:((w+.055)/1.055)**2.4}return .2126*N[0]+.7152*N[1]+.0722*N[2]},contrast(j){let N=this.luminosity(),u=j.luminosity();return N>u?(N+.05)/(u+.05):(u+.05)/(N+.05)},level(j){let N=this.contrast(j);return N>=7?"AAA":N>=4.5?"AA":""},isDark(){let j=this.rgb().color;return(j[0]*2126+j[1]*7152+j[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let j=this.rgb();for(let N=0;N<3;N++)j.color[N]=255-j.color[N];return j},lighten(j){let N=this.hsl();return N.color[2]+=N.color[2]*j,N},darken(j){let N=this.hsl();return N.color[2]-=N.color[2]*j,N},saturate(j){let N=this.hsl();return N.color[1]+=N.color[1]*j,N},desaturate(j){let N=this.hsl();return N.color[1]-=N.color[1]*j,N},whiten(j){let N=this.hwb();return N.color[1]+=N.color[1]*j,N},blacken(j){let N=this.hwb();return N.color[2]+=N.color[2]*j,N},grayscale(){let j=this.rgb().color,N=j[0]*.3+j[1]*.59+j[2]*.11;return ff.rgb(N,N,N)},fade(j){return this.alpha(this.valpha-this.valpha*j)},opaquer(j){return this.alpha(this.valpha+this.valpha*j)},rotate(j){let N=this.hsl(),u=N.color[0];return u=(u+j)%360,u=u<0?360+u:u,N.color[0]=u,N},mix(j,N){if(!j||!j.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof j);let u=j.rgb(),v=this.rgb(),w=N===void 0?.5:N,S=2*w-1,l=u.alpha()-v.alpha(),e=((S*l===-1?S:(S+l)/(1+S*l))+1)/2,t=1-e;return ff.rgb(e*u.red()+t*v.red(),e*u.green()+t*v.green(),e*u.blue()+t*v.blue(),u.alpha()*w+v.alpha()*(1-w))}};for(let j of Object.keys(xh)){if(z_.includes(j))continue;let{channels:N}=xh[j];ff.prototype[j]=function(...u){return this.model===j?new ff(this):u.length>0?new ff(u,j):new ff([...q9(xh[this.model][j].raw(this.color)),this.valpha],j)},ff[j]=function(...u){let v=u[0];return typeof v=="number"&&(v=F_(u,N)),new ff(v,j)}}p3=ff}}),xp=De({"src/plot_api/plot_config.js"(j,N){"use strict";var u={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},v={};function w(S,l){for(var e in S){var t=S[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),w(t,l[e]))}}w(u,v),N.exports={configAttributes:u,dfltConfig:v}}}),m3=De({"src/lib/notifier.js"(j,N){"use strict";var u=Qn(),v=io(),w=[];N.exports=function(S,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||w.indexOf(S)!==-1)return;w.push(S);var a=1e3;v(l)?a=l:l==="long"&&(a=3e3);var r=u.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var n=r.selectAll(".notifier-note").data(w);function i(s){s.duration(700).style("opacity",0).each("end",function(c){var p=w.indexOf(c);p!==-1&&w.splice(p,1),u.select(this).remove()})}n.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=u.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(i)});for(var p=c.append("p"),f=s.split(//g),d=0;d1){var l=["LOG:"];for(S=0;S1){var e=[];for(S=0;S"),"long")}},w.warn=function(){var S;if(u.logging>0){var l=["WARN:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}},w.error=function(){var S;if(u.logging>0){var l=["ERROR:"];for(S=0;S0){var e=[];for(S=0;S"),"stick")}}}}),mc=De({"src/components/color/attributes.js"(j){"use strict";j.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],j.defaultLine="#444",j.lightLine="#eee",j.background="#fff",j.borderLine="#BEC8D9",j.lightFraction=100*10/11}}),ii=De({"src/components/color/index.js"(j,N){"use strict";var u=(G9(),ts(v3)).default,{warn:v}=Xd(),{background:w,defaultLine:S,defaults:l,lightLine:e}=mc(),t=E=>{typeof E=="string"&&(E=E.trim());try{return u(E)}catch{return v(`Invalid color specifier: "${E}". Defaulting to "#000"`),u("#000")}},a=E=>{let{r:g,g:A,b:m}=t(E).rgb().object();return`rgb(${Math.round(g)}, ${Math.round(A)}, ${Math.round(m)})`},r=E=>E?t(E).alpha():0,n=(E,g)=>{let A=t(E).rgb().object();return`rgba(${Math.round(A.r)}, ${Math.round(A.g)}, ${Math.round(A.b)}, ${g})`},i=(E,g)=>{var A,m;g||(g=w);let h=t(E).rgb().object();if((A=h.alpha)!=null||(h.alpha=1),h.alpha===1)return t(E).rgb().string();let b=t(g).rgb().object();(m=b.alpha)!=null||(b.alpha=1);let _=b.alpha===1?b:{r:255*(1-b.alpha)+b.r*b.alpha,g:255*(1-b.alpha)+b.g*b.alpha,b:255*(1-b.alpha)+b.b*b.alpha},I={r:_.r*(1-h.alpha)+h.r*h.alpha,g:_.g*(1-h.alpha)+h.g*h.alpha,b:_.b*(1-h.alpha)+h.b*h.alpha};return t(I).rgb().string()},s=(E,g,A)=>{let m=t(E).rgb().object(),h=t(g).rgb().object(),b={r:A*m.r+(1-A)*h.r,g:A*m.g+(1-A)*h.g,b:A*m.b+(1-A)*h.b};return t(b).rgb().string()},c=(E,g)=>{let A=t(E);return A.lightness(A.lightness()+g)},p=(E,g,A)=>{let m=t(E);return m.alpha()!==1&&(m=t(i(E,w))),(m.isDark()?g?c(m,g):t(w):A?c(m,-A):t(S)).rgb().string()},f=(E,g)=>{let A=t(g);E.style({stroke:a(g),"stroke-opacity":A.alpha()})},d=(E,g)=>{let A=t(g);E.style({fill:a(g),"fill-opacity":A.alpha()})},y=(E,g)=>!!(E&&g&&t(E).rgb().string()===t(g).rgb().string()),o=E=>{if(typeof E!="string")return!1;try{return!!u(E.trim())}catch{return!1}},x=(E,g)=>{var A;g=g===0?0:g||10;let m=t(E).rgb().object(),h=Math.round(255*(g/100));return t({r:Math.max(0,Math.min(255,m.r+h)),g:Math.max(0,Math.min(255,m.g+h)),b:Math.max(0,Math.min(255,m.b+h))}).alpha((A=m.alpha)!=null?A:1).rgb().string()},M=(E,g,A)=>t(E).mix(t(g),A/100).rgb().string(),T=(E,g=["#000","#fff"])=>{let A,m=-1/0;for(let h of g){let b=t(E).contrast(t(h));b>m&&(m=b,A=t(h).rgb().string())}return A};N.exports={addOpacity:n,adjustLightness:c,background:w,brighten:x,color:t,combine:i,contrast:p,defaultLine:S,defaults:l,equals:y,fill:d,interpolate:s,isValid:o,lightLine:e,mix:M,mostReadable:T,opacity:r,rgb:a,stroke:f}}}),bp=De({"src/components/colorscale/scales.js"(j,N){"use strict";var u=ii(),v={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},w=v.RdBu;function S(t,a){if(a||(a=w),!t)return a;function r(){try{t=v[t]||JSON.parse(t)}catch{t=a}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:a}function l(t){var a=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rV9});function V9(j,N="",u,v){let w=N+(u?"":"$"),S=v===!1?"":"^";return j==="xy"?new RegExp(S+"x"+y1+"y"+y1+w):new RegExp(S+j+y1+w)}var y1,lm=di({"src/lib/regex.ts"(){"use strict";y1="([2-9]|[1-9][0-9]+)?"}}),H9=De({"src/lib/coerce.js"(j){"use strict";var N=io(),u=Ji().extendFlat,v=Bs(),w=bp(),S=ii(),l=Zd().DESELECTDIM,e=v1(),t=(lm(),ts(wp)).counter,a=(im(),ts(pp)).modHalf,r=Vf().isArrayOrTypedArray,n=Vf().isTypedArraySpec,i=Vf().decodeTypedArraySpec;j.valObjectMeta={data_array:{coerceFunction:function(c,p,f){p.set(r(c)?c:n(c)?i(c):f)}},enumerated:{coerceFunction:function(c,p,f,d){d.coerceNumber&&(c=+c),d.values.indexOf(c)===-1?p.set(f):p.set(c)},validateFunction:function(c,p){p.coerceNumber&&(c=+c);for(var f=p.values,d=0;do===!0||o===!1;y(c)||d.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(y)?p.set(c):p.set(f)}},number:{coerceFunction:function(c,p,f,d){n(c)&&(c=i(c)),!N(c)||d.min!==void 0&&cd.max?p.set(f):p.set(+c)}},integer:{coerceFunction:function(c,p,f,d){if((d.extras||[]).indexOf(c)!==-1){p.set(c);return}n(c)&&(c=i(c)),c%1||!N(c)||d.min!==void 0&&cd.max?p.set(f):p.set(+c)}},string:{coerceFunction:function(c,p,f,d){if(typeof c!="string"){var y=typeof c=="number";d.strict===!0||!y?p.set(f):p.set(String(c))}else d.noBlank&&!c?p.set(f):p.set(c)}},color:{coerceFunction:function(c,p,f){n(c)&&(c=i(c)),S.isValid(c)?p.set(c):p.set(f)}},colorlist:{coerceFunction:function(c,p,f){!Array.isArray(c)||!c.length?p.set(f):c.every(d=>S.isValid(d))?p.set(c):p.set(f)}},colorscale:{coerceFunction:function(c,p,f){p.set(w.get(c,f))}},angle:{coerceFunction:function(c,p,f){n(c)&&(c=i(c)),c==="auto"?p.set("auto"):N(c)?p.set(a(+c,360)):p.set(f)}},subplotid:{coerceFunction:function(c,p,f,d){var y=d.regex||t(f);let o=x=>typeof x=="string"&&y.test(x);o(c)||d.arrayOk&&r(c)&&c.length>0&&c.every(o)?p.set(c):p.set(f)},validateFunction:function(c,p){var f=p.dflt;return c===f?!0:typeof c!="string"?!1:!!t(f).test(c)}},flaglist:{coerceFunction:function(c,p,f,d){if((d.extras||[]).indexOf(c)!==-1){p.set(c);return}if(typeof c!="string"){p.set(f);return}for(var y=c.split("+"),o=0;oSi({valType:"string",dflt:"",editType:S},l!==!1?{arrayOk:!0}:{}),j.texttemplateAttrs=({editType:S="calc",arrayOk:l}={},e={})=>Si({valType:"string",dflt:"",editType:S},l!==!1?{arrayOk:!0}:{}),j.shapeTexttemplateAttrs=({editType:S="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:S}),j.templatefallbackAttrs=({editType:S="none"}={})=>({valType:"any",dflt:"-",editType:S})}}),N_=De({"src/components/shapes/label_texttemplate.js"(j,N){"use strict";function u(T,E){return E?E.d2l(T):T}function v(T,E){return E?E.l2d(T):T}function w(T){return T.x0}function S(T){return T.x1}function l(T){return T.y0}function e(T){return T.y1}function t(T){return T.x0shift||0}function a(T){return T.x1shift||0}function r(T){return T.y0shift||0}function n(T){return T.y1shift||0}function i(T,E){return u(T.x1,E)+a(T)-u(T.x0,E)-t(T)}function s(T,E,g){return u(T.y1,g)+n(T)-u(T.y0,g)-r(T)}function c(T,E){return Math.abs(i(T,E))}function p(T,E,g){return Math.abs(s(T,E,g))}function f(T,E,g){return T.type!=="line"?void 0:Math.sqrt(Math.pow(i(T,E),2)+Math.pow(s(T,E,g),2))}function d(T,E){return v((u(T.x1,E)+a(T)+u(T.x0,E)+t(T))/2,E)}function y(T,E,g){return v((u(T.y1,g)+n(T)+u(T.y0,g)+r(T))/2,g)}function o(T,E,g){return T.type!=="line"?void 0:s(T,E,g)/i(T,E)}var x=["x0","x1","y0","y1","dy","height","ycenter"],M=["x0","x1","y0","y1","dx","width","xcenter"];N.exports={x0:w,x1:S,y0:l,y1:e,slope:o,dx:i,dy:s,width:c,height:p,length:f,xcenter:d,ycenter:y,simpleXVariables:x,simpleYVariables:M}}}),xP=De({"src/components/shapes/draw_newshape/attributes.js"(j,N){"use strict";var u=Ul().overrideAll,v=Bs(),w=Ml(),S=Hc().dash,l=Ji().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=Is(),a=N_();N.exports=u({newshape:{visible:l({},v.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},v.legend,{}),legendgroup:l({},v.legendgroup,{}),legendgrouptitle:{text:l({},v.legendgrouptitle.text,{}),font:w({})},legendrank:l({},v.legendrank,{}),legendwidth:l({},v.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},S,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:l({},v.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(a)}),texttemplatefallback:t({editType:"arraydraw"}),font:w({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),bP=De({"src/components/selections/draw_newselection/attributes.js"(j,N){"use strict";var u=Hc().dash,v=Ji().extendFlat;N.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:v({},u,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),j_=De({"src/plots/pad_attributes.js"(j,N){"use strict";N.exports=function(u){var v=u.editType;return{t:{valType:"number",dflt:0,editType:v},r:{valType:"number",dflt:0,editType:v},b:{valType:"number",dflt:0,editType:v},l:{valType:"number",dflt:0,editType:v},editType:v}}}}),um=De({"src/plots/layout_attributes.js"(j,N){"use strict";var u=Ml(),v=x1(),w=mc(),S=xP(),l=bP(),e=j_(),t=Ji().extendFlat,a=u({editType:"calc"});a.family.dflt='"Open Sans", verdana, arial, sans-serif',a.size.dflt=12,a.color.dflt=w.defaultLine,N.exports={font:a,title:{text:{valType:"string",editType:"layoutstyle"},font:u({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:u({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:t(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:w.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:w.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:w.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:S.newshape,activeshape:S.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},v.transition,{editType:"none"})}}}),wP=De({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var j=document.createElement("style");j.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",j.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}.maplibregl-ctrl button:not(:disabled):hover{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgb(0 0 0/5%)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgb(0 0 0/5%)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(width <= 480px){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(j)}})()}}),hi=De({"src/registry.js"(j){"use strict";var N=Xd(),u=B_(),v=g3(),w=_1().addStyleRule,S=Ji(),l=Bs(),e=um(),t=S.extendFlat,a=S.extendDeepAll;j.modules={},j.allCategories={},j.allTypes=[],j.subplotsRegistry={},j.componentsRegistry={},j.layoutArrayContainers=[],j.layoutArrayRegexes=[],j.traceLayoutAttributes={},j.localeRegistry={},j.apiMethodRegistry={},j.collectableSubplotTypes=null,j.register=function(o){if(j.collectableSubplotTypes=null,o)o&&!Array.isArray(o)&&(o=[o]);else throw new Error("No argument passed to Plotly.register.");for(var x=0;x=o&&R<=x?R:l}if(typeof R!="string"&&typeof R!="number")return l;R=String(R);var O=d(z),q=R.charAt(0);O&&(q==="G"||q==="g")&&(R=R.slice(1),z="");var Y=O&&z.slice(0,7)==="chinese",ee=R.match(Y?p:c);if(!ee)return l;var te=ee[1],ae=ee[3]||"1",U=Number(ee[5]||1),H=Number(ee[7]||0),K=Number(ee[9]||0),V=Number(ee[11]||0);if(O){if(te.length===2)return l;te=Number(te);var $;try{var X=i.getComponentMethod("calendars","getCal")(z);if(Y){var Z=ae.charAt(ae.length-1)==="i";ae=parseInt(ae,10),$=X.newDate(te,X.toMonthIndex(te,ae,Z),U)}else $=X.newDate(te,Number(ae),U)}catch{return l}return $?($.toJD()-n)*e+H*t+K*a+V*r:l}te.length===2?te=(Number(te)+2e3-f)%100+f:te=Number(te),ae-=1;var Q=new Date(Date.UTC(2e3,ae,U,H,K));return Q.setUTCFullYear(te),Q.getUTCMonth()!==ae||Q.getUTCDate()!==U?l:Q.getTime()+V*r},o=j.MIN_MS=j.dateTime2ms("-9999"),x=j.MAX_MS=j.dateTime2ms("9999-12-31 23:59:59.9999"),j.isDateTime=function(R,z){return j.dateTime2ms(R,z)!==l};function M(R,z){return String(R+Math.pow(10,z)).slice(1)}var T=90*e,E=3*t,g=5*a;j.ms2DateTime=function(R,z,D){if(typeof R!="number"||!(R>=o&&R<=x))return l;z||(z=0);var k=Math.floor(w(R+.05,1)*10),B=Math.round(R-k/10),O,q,Y,ee,te,ae;if(d(D)){var U=Math.floor(B/e)+n,H=Math.floor(w(R,e));try{O=i.getComponentMethod("calendars","getCal")(D).fromJD(U).formatDate("yyyy-mm-dd")}catch{O=s("G%Y-%m-%d")(new Date(B))}if(O.charAt(0)==="-")for(;O.length<11;)O="-0"+O.slice(1);else for(;O.length<10;)O="0"+O;q=z=o+e&&R<=x-e))return l;var z=Math.floor(w(R+.05,1)*10),D=new Date(Math.round(R-z/10)),k=N("%Y-%m-%d")(D),B=D.getHours(),O=D.getMinutes(),q=D.getSeconds(),Y=D.getUTCMilliseconds()*10+z;return A(k,B,O,q,Y)};function A(R,z,D,k,B){if((z||D||k||B)&&(R+=" "+M(z,2)+":"+M(D,2),(k||B)&&(R+=":"+M(k,2),B))){for(var O=4;B%10===0;)O-=1,B/=10;R+="."+M(B,O)}return R}j.cleanDate=function(R,z,D){if(R===l)return z;if(j.isJSDate(R)||typeof R=="number"&&isFinite(R)){if(d(D))return v.error("JS Dates and milliseconds are incompatible with world calendars",R),z;if(R=j.ms2DateTimeLocal(+R),!R&&z!==void 0)return z}else if(!j.isDateTime(R,D))return v.error("unrecognized date",R),z;return R};var m=/%\d?f/g,h=/%h/g,b={1:"1",2:"1",3:"2",4:"2"};function _(R,z,D,k){R=R.replace(m,function(O){var q=Math.min(+O.charAt(1)||6,6),Y=(z/1e3%1+2).toFixed(q).slice(2).replace(/0+$/,"")||"0";return Y});var B=new Date(Math.floor(z+.05));if(R=R.replace(h,function(){return b[D("%q")(B)]}),d(k))try{R=i.getComponentMethod("calendars","worldCalFmt")(R,z,k)}catch{return"Invalid"}return D(R)(B)}var I=[59,59.9,59.99,59.999,59.9999];function C(R,z){var D=w(R+.05,e),k=M(Math.floor(D/t),2)+":"+M(w(Math.floor(D/a),60),2);if(z!=="M"){u(z)||(z=0);var B=Math.min(w(R/r,60),I[z]),O=(100+B).toFixed(z).slice(1);z>0&&(O=O.replace(/0+$/,"").replace(/[\.]$/,"")),k+=":"+O}return k}j.formatDate=function(R,z,D,k,B,O){if(B=d(B)&&B,!z)if(D==="y")z=O.year;else if(D==="m")z=O.month;else if(D==="d")z=O.dayMonth+` -`+O.year;else return C(R,D)+` -`+_(O.dayMonthYear,R,k,B);return _(z,R,k,B)};var F=3*e;j.incrementMonth=function(R,z,D){D=d(D)&&D;var k=w(R,e);if(R=Math.round(R-k),D)try{var B=Math.round(R/e)+n,O=i.getComponentMethod("calendars","getCal")(D),q=O.fromJD(B);return z%12?O.add(q,z,"m"):O.add(q,z/12,"y"),(q.toJD()-n)*e+k}catch{v.error("invalid ms "+R+" in calendar "+D)}var Y=new Date(R+F);return Y.setUTCMonth(Y.getUTCMonth()+z)+k-F},j.findExactDates=function(R,z){for(var D=0,k=0,B=0,O=0,q,Y,ee=d(z)&&i.getComponentMethod("calendars","getCal")(z),te=0;te1?(n[c-1]-n[0])/(c-1):1,d,y;for(f>=0?y=i?l:e:y=i?a:t,r+=f*S*(i?-1:1)*(f>=0?1:-1);s90&&u.log("Long binary search..."),s-1};function l(r,n){return rn}function a(r,n){return r>=n}j.sorterAsc=function(r,n){return r-n},j.sorterDes=function(r,n){return n-r},j.distinctVals=function(r){var n=r.slice();n.sort(j.sorterAsc);var i;for(i=n.length-1;i>-1&&n[i]===w;i--);for(var s=n[i]-n[0]||1,c=s/(i||1)/1e4,p=[],f,d=0;d<=i;d++){var y=n[d],o=y-f;f===void 0?(p.push(y),f=y):o>c&&(s=Math.min(s,o),p.push(y),f=y)}return{vals:p,minDiff:s}},j.roundUp=function(r,n,i){for(var s=0,c=n.length-1,p,f=0,d=i?0:1,y=i?1:0,o=i?Math.ceil:Math.floor;s0&&(s=1),i&&s)return r.sort(n)}return s?r:r.reverse()},j.findIndexOfMin=function(r,n){n=n||v;for(var i=1/0,s,c=0;cb3});function TP(j){return Object.keys(j).sort()}var b3,Ap=di({"src/lib/sort_object_keys.ts"(){"use strict";b3=TP}}),MP=De({"src/lib/stats.js"(j){"use strict";var N=io(),u=Vf().isArrayOrTypedArray;j.aggNums=function(v,w,S,l){var e,t;if((!l||l>S.length)&&(l=S.length),N(w)||(w=!1),u(S[0])){for(t=new Array(l),e=0;ev.length-1)return v[v.length-1];var S=w%1;return S*v[Math.ceil(w)]+(1-S)*v[Math.floor(w)]}}}),SP=De({"src/lib/angles.js"(j,N){"use strict";var u=(im(),ts(pp)),v=u.mod,w=u.modHalf,S=Math.PI,l=2*S;function e(y){return y/180*S}function t(y){return y/S*180}function a(y){return Math.abs(y[1]-y[0])>l-1e-14}function r(y,o){return w(o-y,l)}function n(y,o){return Math.abs(r(y,o))}function i(y,o){if(a(o))return!0;var x,M;o[0]M&&(M+=l);var T=v(y,l),E=T+l;return T>=x&&T<=M||E>=x&&E<=M}function s(y,o,x,M){if(!i(o,M))return!1;var T,E;return x[0]=T&&y<=E}function c(y,o,x,M,T,E,g){T=T||0,E=E||0;var A=a([x,M]),m,h,b,_,I;A?(m=0,h=S,b=l):x1/3&&u.x<2/3},j.isRightAnchor=function(u){return u.xanchor==="right"||u.xanchor==="auto"&&u.x>=2/3},j.isTopAnchor=function(u){return u.yanchor==="top"||u.yanchor==="auto"&&u.y>=2/3},j.isMiddleAnchor=function(u){return u.yanchor==="middle"||u.yanchor==="auto"&&u.y>1/3&&u.y<2/3},j.isBottomAnchor=function(u){return u.yanchor==="bottom"||u.yanchor==="auto"&&u.y<=1/3}}}),kP=De({"src/lib/geometry2d.js"(j){"use strict";var N=(im(),ts(pp)).mod;j.segmentsIntersect=u;function u(e,t,a,r,n,i,s,c){var p=a-e,f=n-e,d=s-n,y=r-t,o=i-t,x=c-i,M=p*x-d*y;if(M===0)return null;var T=(f*x-d*o)/M,E=(f*y-p*o)/M;return E<0||E>1||T<0||T>1?null:{x:e+p*T,y:t+y*T}}j.segmentDistance=function(t,a,r,n,i,s,c,p){if(u(t,a,r,n,i,s,c,p))return 0;var f=r-t,d=n-a,y=c-i,o=p-s,x=f*f+d*d,M=y*y+o*o,T=Math.min(v(f,d,x,i-t,s-a),v(f,d,x,c-t,p-a),v(y,o,M,t-i,a-s),v(y,o,M,r-i,n-s));return Math.sqrt(T)};function v(e,t,a,r,n){var i=r*e+n*t;if(i<0)return r*r+n*n;if(i>a){var s=r-e,c=n-t;return s*s+c*c}else{var p=r*t-n*e;return p*p/a}}var w,S,l;j.getTextLocation=function(t,a,r,n){if((t!==S||n!==l)&&(w={},S=t,l=n),w[r])return w[r];var i=t.getPointAtLength(N(r-n/2,a)),s=t.getPointAtLength(N(r+n/2,a)),c=Math.atan((s.y-i.y)/(s.x-i.x)),p=t.getPointAtLength(N(r,a)),f=(p.x*4+i.x+s.x)/6,d=(p.y*4+i.y+s.y)/6,y={x:f,y:d,theta:c};return w[r]=y,y},j.clearLocationCache=function(){S=null},j.getVisibleSegment=function(t,a,r){var n=a.left,i=a.right,s=a.top,c=a.bottom,p=0,f=t.getTotalLength(),d=f,y,o;function x(T){var E=t.getPointAtLength(T);T===0?y=E:T===f&&(o=E);var g=E.xi?E.x-i:0,A=E.yc?E.y-c:0;return Math.sqrt(g*g+A*A)}for(var M=x(p);M;){if(p+=M+r,p>d)return;M=x(p)}for(M=x(d);M;){if(d-=M+r,p>d)return;M=x(d)}return{min:p,max:d,len:d-p,total:f,isClosed:p===0&&d===f&&Math.abs(y.x-o.x)<.1&&Math.abs(y.y-o.y)<.1}},j.findPointOnPath=function(t,a,r,n){n=n||{};for(var i=n.pathLength||t.getTotalLength(),s=n.tolerance||.001,c=n.iterationLimit||30,p=t.getPointAtLength(0)[r]>t.getPointAtLength(i)[r]?-1:1,f=0,d=0,y=i,o,x,M;f0?y=o:d=o,f++}return x}}}),q_=De({"src/lib/throttle.js"(j){"use strict";var N={};j.throttle=function(w,S,l){var e=N[w],t=Date.now();if(!e){for(var a in N)N[a].tse.ts+S){r();return}e.timer=setTimeout(function(){r(),e.timer=null},S)},j.done=function(v){var w=N[v];return!w||!w.timer?Promise.resolve():new Promise(function(S){var l=w.onDone;w.onDone=function(){l&&l(),S(),w.onDone=null}})},j.clear=function(v){if(v)u(N[v]),delete N[v];else for(var w in N)j.clear(w)};function u(v){v&&v.timer!==null&&(clearTimeout(v.timer),v.timer=null)}}}),CP=De({"src/lib/clear_responsive.js"(j,N){"use strict";N.exports=function(v){v._responsiveChartHandler&&(window.removeEventListener("resize",v._responsiveChartHandler),delete v._responsiveChartHandler)}}}),LP=De({"node_modules/is-mobile/index.js"(j,N){"use strict";N.exports=S,N.exports.isMobile=S,N.exports.default=S;var u=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,v=/CrOS/,w=/android|ipad|playbook|silk/i;function S(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=u.test(e)&&!v.test(e)||!!l.tablet&&w.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),PP=De({"src/lib/preserve_drawing_buffer.js"(j,N){"use strict";var u=io(),v=LP();N.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=w(),typeof e!="string")return!0;var t=v({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var a=e.split(" "),r=1;r-1;i--){var s=a[i];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(u(c)&&(c=+c),c>=13)return!0}}}return t};function w(){var S;return typeof navigator<"u"&&(S=navigator.userAgent),S&&S.headers&&typeof S.headers["user-agent"]=="string"&&(S=S.headers["user-agent"]),S}}}),RP=De({"src/lib/make_trace_groups.js"(j,N){"use strict";var u=Qn();N.exports=function(w,S,l){var e=w.selectAll("g."+l.replace(/\s/g,".")).data(S,function(a){return a[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=w.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(a){a[0][t]=u.select(this)}),e}}}),IP=De({"src/lib/localize.js"(j,N){"use strict";var u=hi();N.exports=function(w,S){for(var l=w._context.locale,e=0;e<2;e++){for(var t=w._context.locales,a=0;a<2;a++){var r=(t[l]||{}).dictionary;if(r){var n=r[S];if(n)return n}t=u.localeRegistry}var i=l.split("-")[0];if(i===l)break;l=i}return S}}}),w3=De({"src/lib/filter_unique.js"(j,N){"use strict";N.exports=function(v){for(var w={},S=[],l=0,e=0;e1?(S*v+S*w)/S:v+w,e=String(l).length;if(e>16){var t=String(w).length,a=String(v).length;if(e>=a+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),A3={};Zo(A3,{default:()=>E3});function zP(j){return typeof j=="string"&&(j=j.replace(S3,"")),(0,T3.default)(j)?Number(j):M3.BADNUM}var T3,M3,S3,E3,BP=di({"src/lib/clean_number.ts"(){"use strict";T3=Du(io()),M3=Du(Ho()),S3=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,E3=zP}}),OP=De({"src/lib/slugify.js"(j,N){"use strict";var u=/<[^>]*>/g,v=/[\p{S}\p{P}]/gu,w=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,S=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),a=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),n=60;function i(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}N.exports=function(c,p=n){var f=i(c??"").replace(S,"").replace(u," ").replace(v,d=>d===e?d:"").toLowerCase().trim().replace(l,e).replace(w,"").replace(a,e);return f.length<=p?f:Array.from(f).slice(0,p).join("").replace(r,"")}}}),Ar=De({"src/lib/index.js"(j,N){"use strict";var u=Qn(),v=Hd().utcFormat,w=u3().format,S=io(),l=Ho(),e=l.FP_SAFE,t=-e,a=l.BADNUM,r=N.exports={};r.adjustFormat=function(X){return!X||/^\d[.]\df/.test(X)||/[.]\d%/.test(X)?X:X==="0.f"?"~f":/^\d%/.test(X)?"~%":/^\ds/.test(X)?"~s":!/^[~,.0$]/.test(X)&&/[&fps]/.test(X)?"~"+X:X};var n={};r.warnBadFormat=function($){var X=String($);n[X]||(n[X]=1,r.warn('encountered bad format: "'+X+'"'))},r.noFormat=function($){return String($)},r.numberFormat=function($){var X;try{X=w(r.adjustFormat($))}catch{return r.warnBadFormat($),r.noFormat}return X},r.nestedProperty=v1(),r.keyedContainer=w9(),r.relativeAttr=A9(),r.isPlainObject=Bv(),r.toLogRange=R_(),r.relinkPrivateKeys=T9();var i=Vf();r.isArrayBuffer=i.isArrayBuffer,r.isTypedArray=i.isTypedArray,r.isArrayOrTypedArray=i.isArrayOrTypedArray,r.isArray1D=i.isArray1D,r.ensureArray=i.ensureArray,r.concat=i.concat,r.maxRowLength=i.maxRowLength,r.minRowLength=i.minRowLength;var s=(im(),ts(pp));r.mod=s.mod,r.modHalf=s.modHalf;var c=H9();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var p=AP();r.dateTime2ms=p.dateTime2ms,r.isDateTime=p.isDateTime,r.ms2DateTime=p.ms2DateTime,r.ms2DateTimeLocal=p.ms2DateTimeLocal,r.cleanDate=p.cleanDate,r.isJSDate=p.isJSDate,r.formatDate=p.formatDate,r.incrementMonth=p.incrementMonth,r.dateTick0=p.dateTick0,r.dfltRange=p.dfltRange,r.findExactDates=p.findExactDates,r.MIN_MS=p.MIN_MS,r.MAX_MS=p.MAX_MS;var f=U_();r.findBin=f.findBin,r.sorterAsc=f.sorterAsc,r.sorterDes=f.sorterDes,r.distinctVals=f.distinctVals,r.roundUp=f.roundUp,r.sort=f.sort,r.findIndexOfMin=f.findIndexOfMin,r.sortObjectKeys=(Ap(),ts(Uv)).default;var d=MP();r.aggNums=d.aggNums,r.len=d.len,r.mean=d.mean,r.geometricMean=d.geometricMean,r.median=d.median,r.midRange=d.midRange,r.variance=d.variance,r.stdev=d.stdev,r.interp=d.interp;var y=O_();r.init2dArray=y.init2dArray,r.transposeRagged=y.transposeRagged,r.dot=y.dot,r.translationMatrix=y.translationMatrix,r.rotationMatrix=y.rotationMatrix,r.rotationXYMatrix=y.rotationXYMatrix,r.apply3DTransform=y.apply3DTransform,r.apply2DTransform=y.apply2DTransform,r.apply2DTransform2=y.apply2DTransform2,r.convertCssMatrix=y.convertCssMatrix,r.inverseTransformMatrix=y.inverseTransformMatrix;var o=SP();r.deg2rad=o.deg2rad,r.rad2deg=o.rad2deg,r.angleDelta=o.angleDelta,r.angleDist=o.angleDist,r.isFullCircle=o.isFullCircle,r.isAngleInsideSector=o.isAngleInsideSector,r.isPtInsideSector=o.isPtInsideSector,r.pathArc=o.pathArc,r.pathSector=o.pathSector,r.pathAnnulus=o.pathAnnulus;var x=EP();r.isLeftAnchor=x.isLeftAnchor,r.isCenterAnchor=x.isCenterAnchor,r.isRightAnchor=x.isRightAnchor,r.isTopAnchor=x.isTopAnchor,r.isMiddleAnchor=x.isMiddleAnchor,r.isBottomAnchor=x.isBottomAnchor;var M=kP();r.segmentsIntersect=M.segmentsIntersect,r.segmentDistance=M.segmentDistance,r.getTextLocation=M.getTextLocation,r.clearLocationCache=M.clearLocationCache,r.getVisibleSegment=M.getVisibleSegment,r.findPointOnPath=M.findPointOnPath;var T=Ji();r.extendFlat=T.extendFlat,r.extendDeep=T.extendDeep,r.extendDeepAll=T.extendDeepAll,r.extendDeepNoArrays=T.extendDeepNoArrays;var E=Xd();r.log=E.log,r.warn=E.warn,r.error=E.error;var g=(lm(),ts(wp));r.counterRegex=g.counter;var A=q_();r.throttle=A.throttle,r.throttleDone=A.done,r.clearThrottle=A.clear;var m=_1();r.getGraphDiv=m.getGraphDiv,r.isPlotDiv=m.isPlotDiv,r.removeElement=m.removeElement,r.addStyleRule=m.addStyleRule,r.addRelatedStyleRule=m.addRelatedStyleRule,r.deleteRelatedStyleRule=m.deleteRelatedStyleRule,r.setStyleOnHover=m.setStyleOnHover,r.getFullTransformMatrix=m.getFullTransformMatrix,r.getElementTransformMatrix=m.getElementTransformMatrix,r.getElementAndAncestors=m.getElementAndAncestors,r.equalDomRects=m.equalDomRects,r.clearResponsive=CP(),r.preserveDrawingBuffer=PP(),r.makeTraceGroups=RP(),r._=IP(),r.notifier=m3(),r.filterUnique=w3(),r.filterVisible=DP(),r.pushUnique=g3(),r.increment=FP(),r.cleanNumber=(BP(),ts(A3)).default,r.slugify=OP(),r.ensureNumber=function(X){return S(X)?(X=Number(X),X>e||X=X?!1:S($)&&$>=0&&$%1===0},r.noop=B_(),r.identity=b1(),r.repeat=function($,X){for(var Z=new Array(X),Q=0;QZ?Math.max(Z,Math.min(X,$)):Math.max(X,Math.min(Z,$))},r.bBoxIntersect=function($,X,Z){return Z=Z||0,$.left<=X.right+Z&&X.left<=$.right+Z&&$.top<=X.bottom+Z&&X.top<=$.bottom+Z},r.simpleMap=function($,X,Z,Q,re){for(var ce=$.length,me=new Array(ce),ye=0;ye=Math.pow(2,Z)?re>10?(r.warn("randstr failed uniqueness"),me):$(X,Z,Q,(re||0)+1):me},r.OptionControl=function($,X){$||($={}),X||(X="opt");var Z={};return Z.optionList=[],Z._newoption=function(Q){Q[X]=$,Z[Q.name]=Q,Z.optionList.push(Q)},Z["_"+X]=$,Z},r.smooth=function($,X){if(X=Math.round(X)||0,X<2)return $;var Z=$.length,Q=2*Z,re=2*X-1,ce=new Array(re),me=new Array(Z),ye,Ae,Se,Ce;for(ye=0;ye=Q&&(Se-=Q*Math.floor(Se/Q)),Se<0?Se=-1-Se:Se>=Z&&(Se=Q-1-Se),Ce+=$[Se]*ce[Ae];me[ye]=Ce}return me},r.syncOrAsync=function($,X,Z){var Q,re;function ce(){return r.syncOrAsync($,X,Z)}for(;$.length;)if(re=$.splice(0,1)[0],Q=re(X),Q&&Q.then)return Q.then(ce);return Z&&Z(X)},r.stripTrailingSlash=function($){return $.slice(-1)==="/"?$.slice(0,-1):$},r.noneOrAll=function($,X,Z){if($){var Q=!1,re=!0,ce,me;for(ce=0;ce0?re:0})},r.fillArray=function($,X,Z,Q){if(Q=Q||r.identity,r.isArrayOrTypedArray($))for(var re=0;reI.test(window.navigator.userAgent);var C=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var $=C.exec(window.navigator.userAgent);if($&&$.length===2){var X=parseInt($[1]);if(!isNaN(X))return X}return null},r.isD3Selection=function($){return $ instanceof u.selection},r.ensureSingle=function($,X,Z,Q){var re=$.select(X+(Z?"."+Z:""));if(re.size())return re;var ce=$.append(X);return Z&&ce.classed(Z,!0),Q&&ce.call(Q),ce},r.ensureSingleById=function($,X,Z,Q){var re=$.select(X+"#"+Z);if(re.size())return re;var ce=$.append(X).attr("id",Z);return Q&&ce.call(Q),ce},r.objectFromPath=function($,X){for(var Z=$.split("."),Q,re=Q={},ce=0;ce1?re+me[1]:"";if(ce&&(me.length>1||ye.length>4||Z))for(;Q.test(ye);)ye=ye.replace(Q,"$1"+ce+"$2");return ye+Ae},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var D=/^\w*$/;r.templateString=function($,X){var Z={};return $.replace(r.TEMPLATE_STRING_REGEX,function(Q,re){var ce;return D.test(re)?ce=X[re]:(Z[re]=Z[re]||r.nestedProperty(X,re).get,ce=Z[re](!0)),ce!==void 0?ce:""})};var k={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=$=>te(co(Si({},$),{opts:k}));var B={max:10,count:0,name:"texttemplate"};r.texttemplateString=$=>te(co(Si({},$),{opts:B}));var O=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function q($){var X=$.match(O);return X?{key:X[1],op:X[2],number:Number(X[3])}:{key:$,op:null,number:null}}var Y={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=$=>te(co(Si({},$),{opts:Y}));var ee=/^[:|\|]/;function te({data:$=[],locale:X,fallback:Z,labels:Q={},opts:re,template:ce}){return ce.replace(r.TEMPLATE_STRING_REGEX,(me,ye,Ae)=>{let Se=["xother","yother"].includes(ye),Ce=["_xother","_yother"].includes(ye),qe=["_xother_","_yother_"].includes(ye),Ue=["xother_","yother_"].includes(ye),xe=Se||Ce||Ue||qe;(Ce||qe)&&(ye=ye.substring(1)),(Ue||qe)&&(ye=ye.substring(0,ye.length-1));let he=null,oe=null;if(re.parseMultDiv){var le=q(ye);ye=le.key,he=le.op,oe=le.number}let ne;if(xe){if(Q[ye]===void 0)return"";ne=Q[ye]}else for(let je of $)if(je){if(je.hasOwnProperty(ye)){ne=je[ye];break}if(D.test(ye)||(ne=r.nestedProperty(je,ye).get(!0)),ne!==void 0)break}if(ne===void 0){let{count:je,max:ut,name:st}=re,yt=Z===!1?me:Z;return je=ae&&me<=U,Se=ye>=ae&&ye<=U;if(Ae&&(Q=10*Q+me-ae),Se&&(re=10*re+ye-ae),!Ae||!Se){if(Q!==re)return Q-re;if(me!==ye)return me-ye}}return re-Q};var H=2e9;r.seedPseudoRandom=function(){H=2e9},r.pseudoRandom=function(){var $=H;return H=(69069*H+1)%4294967296,Math.abs(H-$)<429496729?r.pseudoRandom():H/4294967296},r.fillText=function($,X,Z){var Q=Array.isArray(Z)?function(me){Z.push(me)}:function(me){Z.text=me},re=r.extractOption($,X,"htx","hovertext");if(r.isValidTextValue(re))return Q(re);var ce=r.extractOption($,X,"tx","text");if(r.isValidTextValue(ce))return Q(ce)},r.isValidTextValue=function($){return $||$===0},r.formatPercent=function($,X){X=X||0;for(var Z=(Math.round(100*$*Math.pow(10,X))*Math.pow(.1,X)).toFixed(X)+"%",Q=0;Q1&&(Se=1):Se=0,r.strTranslate(re-Se*(Z+me),ce-Se*(Q+ye))+r.strScale(Se)+(Ae?"rotate("+Ae+(X?"":" "+Z+" "+Q)+")":"")},r.setTransormAndDisplay=function($,X){$.attr("transform",r.getTextTransform(X)),$.style("display",X.scale?null:"none")},r.ensureUniformFontSize=function($,X){var Z=r.extendFlat({},X);return Z.size=Math.max(X.size,$._fullLayout.uniformtext.minsize||0),Z},r.join2=function($,X,Z){var Q=$.length;return Q>1?$.slice(0,-1).join(X)+Z+$[Q-1]:$.join(X)},r.bigFont=function($){return Math.round(1.2*$)};var K=r.getFirefoxVersion(),V=K!==null&&K<86;r.getPositionFromD3Event=function(){return V?[u.event.layerX,u.event.layerY]:[u.event.offsetX,u.event.offsetY]}}}),NP=De({"build/plotcss.js"(){"use strict";var j=Ar(),N={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.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(v in N)u=v.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),j.addStyleRule(u,N[v]);var u,v}}),k3=De({"node_modules/is-browser/client.js"(j,N){N.exports=!0}}),C3=De({"node_modules/has-hover/index.js"(j,N){"use strict";var u=k3(),v;typeof window.matchMedia=="function"?v=!window.matchMedia("(hover: none)").matches:v=u,N.exports=v}}),Tp=De({"node_modules/events/events.js"(j,N){"use strict";var u=typeof Reflect=="object"?Reflect:null,v=u&&typeof u.apply=="function"?u.apply:function(E,g,A){return Function.prototype.apply.call(E,g,A)},w;u&&typeof u.ownKeys=="function"?w=u.ownKeys:Object.getOwnPropertySymbols?w=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:w=function(E){return Object.getOwnPropertyNames(E)};function S(T){console&&console.warn&&console.warn(T)}var l=Number.isNaN||function(E){return E!==E};function e(){e.init.call(this)}N.exports=e,N.exports.once=o,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function a(T){if(typeof T!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof T)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(T){if(typeof T!="number"||T<0||l(T))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+T+".");t=T}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||l(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function r(T){return T._maxListeners===void 0?e.defaultMaxListeners:T._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(E){for(var g=[],A=1;A0&&(b=g[0]),b instanceof Error)throw b;var _=new Error("Unhandled error."+(b?" ("+b.message+")":""));throw _.context=b,_}var I=h[E];if(I===void 0)return!1;if(typeof I=="function")v(I,this,g);else for(var C=I.length,F=f(I,C),A=0;A0&&b.length>m&&!b.warned){b.warned=!0;var _=new Error("Possible EventEmitter memory leak detected. "+b.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");_.name="MaxListenersExceededWarning",_.emitter=T,_.type=E,_.count=b.length,S(_)}return T}e.prototype.addListener=function(E,g){return n(this,E,g,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(E,g){return n(this,E,g,!0)};function i(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(T,E,g){var A={fired:!1,wrapFn:void 0,target:T,type:E,listener:g},m=i.bind(A);return m.listener=g,A.wrapFn=m,m}e.prototype.once=function(E,g){return a(g),this.on(E,s(this,E,g)),this},e.prototype.prependOnceListener=function(E,g){return a(g),this.prependListener(E,s(this,E,g)),this},e.prototype.removeListener=function(E,g){var A,m,h,b,_;if(a(g),m=this._events,m===void 0)return this;if(A=m[E],A===void 0)return this;if(A===g||A.listener===g)--this._eventsCount===0?this._events=Object.create(null):(delete m[E],m.removeListener&&this.emit("removeListener",E,A.listener||g));else if(typeof A!="function"){for(h=-1,b=A.length-1;b>=0;b--)if(A[b]===g||A[b].listener===g){_=A[b].listener,h=b;break}if(h<0)return this;h===0?A.shift():d(A,h),A.length===1&&(m[E]=A[0]),m.removeListener!==void 0&&this.emit("removeListener",E,_||g)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(E){var g,A,m;if(A=this._events,A===void 0)return this;if(A.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):A[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete A[E]),this;if(arguments.length===0){var h=Object.keys(A),b;for(m=0;m=0;m--)this.removeListener(E,g[m]);return this};function c(T,E,g){var A=T._events;if(A===void 0)return[];var m=A[E];return m===void 0?[]:typeof m=="function"?g?[m.listener||m]:[m]:g?y(m):f(m,m.length)}e.prototype.listeners=function(E){return c(this,E,!0)},e.prototype.rawListeners=function(E){return c(this,E,!1)},e.listenerCount=function(T,E){return typeof T.listenerCount=="function"?T.listenerCount(E):p.call(T,E)},e.prototype.listenerCount=p;function p(T){var E=this._events;if(E!==void 0){var g=E[T];if(typeof g=="function")return 1;if(g!==void 0)return g.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?w(this._events):[]};function f(T,E){for(var g=new Array(E),A=0;A{},{passive:!0}),w},triggerHandler:function(w,S,l){var e,t=w._ev;if(!t)return;var a=t._events[S];if(!a)return;function r(i){if(i.listener){if(t.removeListener(S,i.listener),!i.fired)return i.fired=!0,i.listener.apply(t,[l])}else return i.apply(t,[l])}a=Array.isArray(a)?a:[a];var n;for(n=0;nv.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},S.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},S.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},S.undo=function(e){var t,a;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,a=0;a=k.length)return!1;if(C.dimensions===2){if(R++,F.length===R)return C;var B=F[R];if(!M(B))return!1;C=k[D][B]}else C=k[D]}else C=k}}return C}function M(C){return C===Math.round(C)&&C>=0}function T(C){var F,R;F=N.modules[C]._module,R=F.basePlotModule;var z={};z.type=null;var D=a({},v),k=a({},F.attributes);j.crawl(k,function(q,Y,ee,te,ae){i(D,ae).set(void 0),q===void 0&&i(k,ae).set(void 0)}),a(z,D),N.traceIs(C,"noOpacity")&&delete z.opacity,N.traceIs(C,"showLegend")||(delete z.showlegend,delete z.legendgroup),N.traceIs(C,"noHover")&&(delete z.hoverinfo,delete z.hoverlabel),F.selectPoints||delete z.selectedpoints,a(z,k),R.attributes&&a(z,R.attributes),z.type=C;var B={meta:F.meta||{},categories:F.categories||{},animatable:!!F.animatable,type:C,attributes:A(z)};if(F.layoutAttributes){var O={};a(O,F.layoutAttributes),B.layoutAttributes=A(O)}return F.animatable||j.crawl(B,function(q){j.isValObject(q)&&"anim"in q&&delete q.anim}),B}function E(){var C={},F,R;a(C,w);for(F in N.subplotsRegistry)if(R=N.subplotsRegistry[F],!!R.layoutAttributes)if(Array.isArray(R.attr))for(var z=0;z=r&&(a._input||{})._templateitemname;i&&(n=r);var s=t+"["+n+"]",c;function p(){c={},i&&(c[s]={},c[s][v]=i)}p();function f(x,M){c[x]=M}function d(x,M){i?N.nestedProperty(c[s],x).set(M):c[s+"."+x]=M}function y(){var x=c;return p(),x}function o(x,M){x&&d(x,M);var T=y();for(var E in T)N.nestedProperty(e,E).set(T[E])}return{modifyBase:f,modifyItem:d,getUpdateObj:y,applyUpdate:o}}}}),gc=De({"src/plots/cartesian/constants.js"(j,N){"use strict";var u=(lm(),ts(wp)).counter;N.exports={idRegex:{x:u("x","( domain)?"),y:u("y","( domain)?")},attrRegex:u("[xy]axis"),xAxisMatch:u("xaxis"),yAxisMatch:u("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),lu=De({"src/plots/cartesian/axis_ids.js"(j){"use strict";var N=hi(),u=gc();j.id2name=function(S){if(!(typeof S!="string"||!S.match(u.AX_ID_PATTERN))){var l=S.split(" ")[0].slice(1);return l==="1"&&(l=""),S.charAt(0)+"axis"+l}},j.name2id=function(S){if(S.match(u.AX_NAME_PATTERN)){var l=S.slice(5);return l==="1"&&(l=""),S.charAt(0)+l}},j.cleanId=function(S,l,e){var t=/( domain)$/.test(S);if(!(typeof S!="string"||!S.match(u.AX_ID_PATTERN))&&!(l&&S.charAt(0)!==l)&&!(t&&!e)){var a=S.split(" ")[0].slice(1).replace(/^0+/,"");return a==="1"&&(a=""),S.charAt(0)+a+(t&&e?" domain":"")}},j.list=function(w,S,l){var e=w._fullLayout;if(!e)return[];var t=j.listIds(w,S),a=new Array(t.length),r;for(r=0;re?1:-1:+(w.slice(1)||1)-+(S.slice(1)||1)},j.ref2id=function(w){return/^[xyz]/.test(w)?w.split(" ")[0]:!1};function v(w,S){if(S&&S.length){for(var l=0;l0?".":"")+i;u.isPlainObject(s)?e(s,a,c,n+1):a(c,i,s)}})}}}),Il=De({"src/plots/plots.js"(j,N){"use strict";var u=Qn(),v=Hd().timeFormatLocale,w=u3().formatLocale,S=io(),l=c3(),e=cf().version,t=hi(),a=fm(),r=ws(),n=Ar(),i=ii(),s=Ho().BADNUM,c=lu(),p=qv().clearOutline,f=G_(),d=x1(),y=L3(),o=Bf().getModuleCalcData,x=n.relinkPrivateKeys,M=n._,T=N.exports={};n.extendFlat(T,t),T.attributes=Bs(),T.attributes.type.values=T.allTypes,T.fontAttrs=Ml(),T.layoutAttributes=um();var E=UP();T.executeAPICommand=E.executeAPICommand,T.computeAPICommandBindings=E.computeAPICommandBindings,T.manageCommandObserver=E.manageCommandObserver,T.hasSimpleAPICommandBindings=E.hasSimpleAPICommandBindings,T.redrawText=function(U){return U=n.getGraphDiv(U),new Promise(function(H){setTimeout(function(){U._fullLayout&&(t.getComponentMethod("annotations","draw")(U),t.getComponentMethod("legend","draw")(U),t.getComponentMethod("colorbar","draw")(U),H(T.previousPromises(U)))},300)})},T.resize=function(U){U=n.getGraphDiv(U);var H,K=new Promise(function(V,$){(!U||n.isHidden(U))&&$(new Error("Resize must be passed a displayed plot div element.")),U._redrawTimer&&clearTimeout(U._redrawTimer),U._resolveResize&&(H=U._resolveResize),U._resolveResize=V,U._redrawTimer=setTimeout(function(){if(!U.layout||U.layout.width&&U.layout.height||n.isHidden(U)){V(U);return}delete U.layout.width,delete U.layout.height;var X=U.changed;U.autoplay=!0,t.call("relayout",U,{autosize:!0}).then(function(){U.changed=X,U._resolveResize===V&&(delete U._resolveResize,V(U))})},100)});return H&&H(K),K},T.previousPromises=function(U){if((U._promises||[]).length)return Promise.all(U._promises).then(function(){U._promises=[]})},T.sendDataToCloud=function(U,H){U.emit("plotly_beforeexport");let K=new URL(H).origin;var V=T.graphJson(U,!1,"object");V.version=e;var $=new URL(H);$.searchParams.set("origin",window.location.origin);var X=window.open($.href,"_blank");if(!X){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),U.emit("plotly_exportfail");return}var Z=function(Q){Q.origin===K&&Q.data&&Q.data.type==="CHART_AUTH_SUCCESS"&&(X.postMessage({type:"chart",chart:V},K),window.removeEventListener("message",Z),U.emit("plotly_afterexport"))};return window.addEventListener("message",Z),!1};var g=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],A=["year","month","dayMonth","dayMonthYear"];T.supplyDefaults=function(U,H){var K=H&&H.skipUpdateCalc,V=U._fullLayout||{};if(V._skipDefaults){delete V._skipDefaults;return}var $=U._fullLayout={},X=U.layout||{},Z=U._fullData||[],Q=U._fullData=[],re=U.data||[],ce=U.calcdata||[],me=U._context||{},ye;U._transitionData||T.createTransitionData(U),$._dfltTitle={plot:M(U,"Click to enter Plot title"),subtitle:M(U,"Click to enter Plot subtitle"),x:M(U,"Click to enter X axis title"),y:M(U,"Click to enter Y axis title"),colorbar:M(U,"Click to enter Colorscale title"),annotation:M(U,"new text")},$._traceWord=M(U,"trace");var Ae=b(U,g);if(V._initialAutoSizeIsDone){var Se=V.width,Ce=V.height;T.supplyLayoutGlobalDefaults(X,$,Ae),X.width||($.width=Se),X.height||($.height=Ce),T.sanitizeMargins($)}else{T.supplyLayoutGlobalDefaults(X,$,Ae);var qe=!X.width||!X.height,Ue=$.autosize,xe=me.autosizable,he=qe&&(Ue||xe);he?T.plotAutoSize(U,X,$):qe&&T.sanitizeMargins($),!Ue&&qe&&(X.width=$.width,X.height=$.height)}$._d3locale=_(Ae,$.separators),$._extraFormat=b(U,A),$._initialAutoSizeIsDone=!0,$._dataLength=re.length,$._modules=[],$._visibleModules=[],$._basePlotModules=[];var oe=$._subplots=h(),le=$._splomAxes={x:{},y:{}},ne=$._splomSubplots={};$._splomGridDflt={},$._scatterStackOpts={},$._firstScatter={},$._alignmentOpts={},$._colorAxes={},$._requestRangeslider={},$._traceUids=m(Z,re),T.supplyDataDefaults(re,Q,X,$);var be=Object.keys(le.x),Fe=Object.keys(le.y);if(be.length>1&&Fe.length>1){for(t.getComponentMethod("grid","sizeDefaults")(X,$),ye=0;ye15&&Fe.length>15&&$.shapes.length===0&&$.images.length===0,T.linkSubplots(Q,$,Z,V),T.cleanPlot(Q,$,Z,V);var yt=!!(V._has&&V._has("cartesian")),At=!!($._has&&$._has("cartesian")),Pt=yt,Zt=At;Pt&&!Zt?V._bgLayer.remove():Zt&&!Pt&&($._shouldCreateBgLayer=!0),V._zoomlayer&&!U._dragging&&p({_fullLayout:V}),I(Q,$),x($,V),t.getComponentMethod("colorscale","crossTraceDefaults")(Q,$),$._preGUI||($._preGUI={}),$._tracePreGUI||($._tracePreGUI={});var vr=$._tracePreGUI,Nt={},Kt;for(Kt in vr)Nt[Kt]="old";for(ye=0;ye0){var me=1-2*X;Z=Math.round(me*Z),Q=Math.round(me*Q)}}var ye=T.layoutAttributes.width.min,Ae=T.layoutAttributes.height.min;Z1,Ce=!K.height&&Math.abs(V.height-Q)>1;(Ce||Se)&&(Se&&(V.width=Z),Ce&&(V.height=Q)),H._initialAutoSize||(H._initialAutoSize={width:Z,height:Q}),T.sanitizeMargins(V)},T.supplyLayoutModuleDefaults=function(U,H,K,V){var $=t.componentsRegistry,X=H._basePlotModules,Z,Q,re,ce=t.subplotsRegistry.cartesian;for(Z in $)re=$[Z],re.includeBasePlot&&re.includeBasePlot(U,H);X.length||X.push(ce),H._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(U,H),ce.finalizeSubplots(U,H));for(var me in H._subplots)H._subplots[me].sort(n.subplotSort);for(Q=0;Q1&&(K.l/=Ue,K.r/=Ue)}if(Ae){var xe=(K.t+K.b)/Ae;xe>1&&(K.t/=xe,K.b/=xe)}var he=K.xl!==void 0?K.xl:K.x,oe=K.xr!==void 0?K.xr:K.x,le=K.yt!==void 0?K.yt:K.y,ne=K.yb!==void 0?K.yb:K.y;Se[H]={l:{val:he,size:K.l+qe},r:{val:oe,size:K.r+qe},b:{val:ne,size:K.b+qe},t:{val:le,size:K.t+qe}},Ce[H]=1}if(!V._replotting)return T.doAutoMargin(U)}};function k(U){if("_redrawFromAutoMarginCount"in U._fullLayout)return!1;var H=c.list(U,"",!0);for(var K in H)if(H[K].autoshift||H[K].shift)return!0;return!1}T.doAutoMargin=function(U){var H=U._fullLayout,K=H.width,V=H.height;H._size||(H._size={}),R(H);var $=H._size,X=H.margin,Z={t:0,b:0,l:0,r:0},Q=n.extendFlat({},$),re=X.l,ce=X.r,me=X.t,ye=X.b,Ae=H._pushmargin,Se=H._pushmarginIds,Ce=H.minreducedwidth,qe=H.minreducedheight;if(X.autoexpand!==!1){for(var Ue in Ae)Se[Ue]||delete Ae[Ue];var xe=U._fullLayout._reservedMargin;for(var he in xe)for(var oe in xe[he]){var le=xe[he][oe];Z[oe]=Math.max(Z[oe],le)}Ae.base={l:{val:0,size:re},r:{val:1,size:ce},t:{val:1,size:me},b:{val:0,size:ye}};for(var ne in Z){var be=0;for(var Fe in Ae)Fe!=="base"&&S(Ae[Fe][ne].size)&&(be=Ae[Fe][ne].size>be?Ae[Fe][ne].size:be);var Ve=Math.max(0,X[ne]-be);Z[ne]=Math.max(0,Z[ne]-Ve)}for(var je in Ae){var ut=Ae[je].l||{},st=Ae[je].b||{},yt=ut.val,At=ut.size,Pt=st.val,Zt=st.size,vr=K-Z.r-Z.l,Nt=V-Z.t-Z.b;for(var Kt in Ae){if(S(At)&&Ae[Kt].r){var nt=Ae[Kt].r.val,Ee=Ae[Kt].r.size;if(nt>yt){var ze=(At*nt+(Ee-vr)*yt)/(nt-yt),ve=(Ee*(1-yt)+(At-vr)*(1-nt))/(nt-yt);ze+ve>re+ce&&(re=ze,ce=ve)}}if(S(Zt)&&Ae[Kt].t){var _e=Ae[Kt].t.val,Ie=Ae[Kt].t.size;if(_e>Pt){var Be=(Zt*_e+(Ie-Nt)*Pt)/(_e-Pt),We=(Ie*(1-Pt)+(Zt-Nt)*(1-_e))/(_e-Pt);Be+We>ye+me&&(ye=Be,me=We)}}}}}var Xe=n.constrain(K-X.l-X.r,z,Ce),mt=n.constrain(V-X.t-X.b,D,qe),ft=Math.max(0,K-Xe),ht=Math.max(0,V-mt);if(ft){var gt=(re+ce)/ft;gt>1&&(re/=gt,ce/=gt)}if(ht){var _t=(ye+me)/ht;_t>1&&(ye/=_t,me/=_t)}if($.l=Math.round(re)+Z.l,$.r=Math.round(ce)+Z.r,$.t=Math.round(me)+Z.t,$.b=Math.round(ye)+Z.b,$.p=Math.round(X.pad),$.w=Math.round(K)-$.l-$.r,$.h=Math.round(V)-$.t-$.b,!H._replotting&&(T.didMarginChange(Q,$)||k(U))){"_redrawFromAutoMarginCount"in H?H._redrawFromAutoMarginCount++:H._redrawFromAutoMarginCount=1;var Ft=3*(1+Object.keys(Se).length);if(H._redrawFromAutoMarginCount1)return!0}return!1},T.graphJson=function(U,H=!1,K="json",V=!1,$=!1){(V&&H&&!U._fullData||V&&!H&&!U._fullLayout)&&T.supplyDefaults(U);var X=V?U._fullData:U.data,Z=V?U._fullLayout:U.layout,Q=(U._transitionData||{})._frames;function re(ye,Ae){if(typeof ye=="function")return Ae?"_function_":null;if(n.isPlainObject(ye)){var Se={};return Object.keys(ye).sort().forEach(function(xe){if(["_","["].indexOf(xe.charAt(0))===-1){if(typeof ye[xe]=="function"){Ae&&(Se[xe]="_function");return}Se[xe]=re(ye[xe],Ae)}}),Se}var Ce=Array.isArray(ye),qe=n.isTypedArray(ye);if((Ce||qe)&&ye.dtype&&ye.shape){var Ue=ye.bdata;return re({dtype:ye.dtype,shape:ye.shape,bdata:n.isArrayBuffer(Ue)?l.encode(Ue):Ue},Ae)}return Ce?ye.map(function(xe){return re(xe,Ae)}):qe?n.simpleMap(ye,n.identity):n.isJSDate(ye)?n.ms2DateTimeLocal(+ye):ye}var ce={data:(X||[]).map(function(ye){var Ae=re(ye);return H&&delete Ae.fit,Ae})};if(!H&&(ce.layout=re(Z),V)){var me=Z._size;ce.layout.computed={margin:{b:me.b,l:me.l,r:me.r,t:me.t}}}return Q&&(ce.frames=re(Q)),$&&(ce.config=re(U._context,!0)),K==="object"?ce:JSON.stringify(ce)},T.modifyFrames=function(U,H){var K,V,$,X=U._transitionData._frames,Z=U._transitionData._frameHash;for(K=0;K0&&(U._transitioningWithDuration=!0),U._transitionData._interruptCallbacks.push(function(){V=!0}),K.redraw&&U._transitionData._interruptCallbacks.push(function(){return t.call("redraw",U)}),U._transitionData._interruptCallbacks.push(function(){U.emit("plotly_transitioninterrupted",[])});var Ae=0,Se=0;function Ce(){return Ae++,function(){Se++,!V&&Se===Ae&&Q(ye)}}K.runFn(Ce),setTimeout(Ce())})}function Q(ye){if(U._transitionData)return X(U._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",U)}).then(function(){U._transitioning=!1,U._transitioningWithDuration=!1,U.emit("plotly_transitioned",[])}).then(ye)}function re(){if(U._transitionData)return U._transitioning=!1,$(U._transitionData._interruptCallbacks)}var ce=[T.previousPromises,re,K.prepareFn,T.rehover,T.reselect,Z],me=n.syncOrAsync(ce,U);return(!me||!me.then)&&(me=Promise.resolve()),me.then(function(){return U})}T.doCalcdata=function(U,H){var K=c.list(U),V=U._fullData,$=U._fullLayout,X,Z,Q,re=new Array(V.length),ce=(U.calcdata||[]).slice();for(U.calcdata=re,$._numBoxes=0,$._numViolins=0,$._violinScaleGroupStats={},U._hmpixcount=0,U._hmlumcount=0,$._piecolormap={},$._sunburstcolormap={},$._treemapcolormap={},$._iciclecolormap={},$._funnelareacolormap={},Q=0;Qk?k.match(l):null;j.matchTex=e,j.convertToTspans=function(k,B,O){var q=k.text(),Y=!k.attr("data-notex")&&B&&B._context.typesetMath&&typeof MathJax<"u"&&e(q),ee=N.select(k.node().parentNode);if(ee.empty())return;var te=k.attr("class")?k.attr("class").split(" ")[0]:"text";te+="-math",ee.selectAll("svg."+te).remove(),ee.selectAll("g."+te+"-group").remove(),k.style("display",null).attr({"data-unformatted":q,"data-math":"N"});function ae(){ee.empty()||(te=k.attr("class")+"-math",ee.select("svg."+te).remove()),k.text("").style("white-space","pre");var U=F(k.node(),q);U&&k.style("pointer-events","all"),j.positionText(k),O&&O.call(k)}return Y?(B&&B._promises||[]).push(new Promise(function(U){k.style("display","none");var H=parseInt(k.node().style.fontSize,10),K={fontSize:H},V=k.attr("text-anchor");i(Y[2],K,function($,X,Z){ee.selectAll("svg."+te).remove(),ee.selectAll("g."+te+"-group").remove();var Q=$&&$.select("svg");if(!Q||!Q.node()){ae(),U();return}k.style("display","none");var re=ee.append("g").classed(te+"-group",!0).attr({"pointer-events":"none","data-unformatted":q,"data-math":"Y"});re.node().appendChild(Q.node()),X&&X.node()&&Q.node().insertBefore(X.node().cloneNode(!0),Q.node().firstChild);var ce=Z.width,me=Z.height;Q.attr({class:te,height:me,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":K.fontSize+"px"});var ye=k.node().style.fill||"black",Ae=Q.select("g");Ae.attr({fill:ye,stroke:ye});var Se=Ae.node().getBoundingClientRect(),Ce=Se.width,qe=Se.height;(Ce>ce||qe>me)&&(Q.style("overflow","hidden"),Se=Q.node().getBoundingClientRect(),Ce=Se.width,qe=Se.height);var Ue=+k.attr("x"),xe=+k.attr("y"),he=H||k.node().getBoundingClientRect().height,oe=-he/4;te[0]==="y"?re.attr({transform:"rotate("+[-90,Ue,xe]+")"+v(-Ce/2,oe-qe/2)}):te[0]==="l"?xe=oe-qe/2:te[0]==="a"&&te.indexOf("atitle")!==0?(Ue=0,xe=oe):(Ue=Ue-Ce*(V==="middle"?.5:V==="end"?1:0),xe=xe+oe-qe/2),Q.attr({x:Ue,y:xe}),O&&O.call(k,re),U(re)})})):ae(),k};var t=/(<|<|<)/g,a=/(>|>|>)/g;function r(k){return k.replace(t,"\\lt ").replace(a,"\\gt ")}var n=null;function i(k,B,O){let q=parseInt((MathJax.version||"").split(".")[0]);if(q!==3&&q!==4){u.warn("Unsupported MathJax version:",MathJax.version);return}var Y;let ee=function(){if(!n){let H=MathJax._.output.svg_ts.SVG,K=u.extendFlat({},MathJax.config.svg,{fontCache:"local"});q===4&&(K.linebreaks=u.extendFlat({},K.linebreaks,{inline:!1})),n=MathJax._.mathjax.mathjax.document(document,u.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new H(K)}))}let ae="math-output-"+u.randstr({},64);Y=N.select("body").append("div").attr({id:ae}).style({visibility:"hidden",position:"absolute","font-size":B.fontSize+"px"});let U=r(k).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return n.convert(U,{display:!1})}).then(function(H){Y.node().appendChild(H)})},te=function(){let ae=Y.select(".MathJax"),U=!ae.empty()&&Y.select("svg").node();if(!U)u.log("There was an error in the tex syntax.",k),O();else{let H=U.getBoundingClientRect(),K=ae.select("defs");O(ae,K,H)}Y.remove()};Promise.resolve().then(ee).then(te).catch(ae=>{u.log("MathJax typesetting failed.",k,ae),Y&&Y.remove(),O()})}var s={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},c={sub:"0.3em",sup:"-0.6em"},p={sub:"-0.21em",sup:"0.42em"},f="\u200B",d=["http:","https:","mailto:","",void 0,":"],y=j.NEWLINES=/(\r\n?|\n)/g,o=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,M=//i;j.BR_TAG_ALL=//gi;var T=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,E=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,g=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,A=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function m(k,B){if(!k)return null;var O=k.match(B),q=O&&(O[3]||O[4]);return q&&I(q)}var h=/(^|;)\s*color:/;j.plainText=function(k,B){B=B||{};for(var O=B.len!==void 0&&B.len!==-1?B.len:1/0,q=B.allowedTags!==void 0?B.allowedTags:["br"],Y="...",ee=Y.length,te=k.split(o),ae=[],U="",H=0,K=0;Kee?ae.push(V.slice(0,Math.max(0,Q-ee))+Y):ae.push(V.slice(0,Q));break}U=""}}return ae.join("")};var b={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},_=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function I(k){return k.replace(_,function(B,O){var q;return O.charAt(0)==="#"?q=C(O.charAt(1)==="x"?parseInt(O.slice(2),16):parseInt(O.slice(1),10)):q=b[O],q||B})}j.convertEntities=I;function C(k){if(!(k>1114111)){var B=String.fromCodePoint;if(B)return B(k);var O=String.fromCharCode;return k<=65535?O(k):O((k>>10)+55232,k%1024+56320)}}function F(k,B){B=B.replace(y," ");var O=!1,q=[],Y,ee=-1;function te(){ee++;var Ce=document.createElementNS(w.svg,"tspan");N.select(Ce).attr({class:"line",dy:ee*S+"em"}),k.appendChild(Ce),Y=Ce;var qe=q;if(q=[{node:Ce}],qe.length>1)for(var Ue=1;Ue.",B);return}var qe=q.pop();Ce!==qe.type&&u.log("Start tag <"+qe.type+"> doesnt match end tag <"+Ce+">. Pretending it did match.",B),Y=q[q.length-1].node}var K=M.test(B);K?te():(Y=k,q=[{node:k}]);for(var V=B.split(o),$=0;$=0;o--,x++){var M=f[o];y[x]=[1-M[0],M[1]]}return y}function s(f,d){d=d||{};for(var y=f.domain,o=f.range,x=o.length,M=new Array(x),T=0;Td-p?p=d-(f-d):f-d=0?x=a.colorscale.sequential:x=a.colorscale.sequentialminus,s._sync("colorscale",x)}}}}),Dl=De({"src/components/colorscale/index.js"(j,N){"use strict";var u=bp(),v=Of();N.exports={moduleType:"component",name:"colorscale",attributes:ul(),layoutAttributes:P3(),supplyLayoutDefaults:qP(),handleDefaults:Wc(),crossTraceDefaults:GP(),calc:Wf(),scales:u.scales,defaultScale:u.defaultScale,getScale:u.get,isValidScale:u.isValid,hasColorscale:v.hasColorscale,extractOpts:v.extractOpts,extractScale:v.extractScale,flipScale:v.flipScale,makeColorScaleFunc:v.makeColorScaleFunc,makeColorScaleFuncFromTrace:v.makeColorScaleFuncFromTrace}}}),Sl=De({"src/traces/scatter/subtypes.js"(j,N){"use strict";var u=Ar(),v=Vf().isTypedArraySpec;N.exports={hasLines:function(w){return w.visible&&w.mode&&w.mode.indexOf("lines")!==-1},hasMarkers:function(w){return w.visible&&(w.mode&&w.mode.indexOf("markers")!==-1||w.type==="splom")},hasText:function(w){return w.visible&&w.mode&&w.mode.indexOf("text")!==-1},isBubble:function(w){var S=w.marker;return u.isPlainObject(S)&&(u.isArrayOrTypedArray(S.size)||v(S.size))}}}}),w1=De({"src/traces/scatter/make_bubble_size_func.js"(j,N){"use strict";var u=io();N.exports=function(w,S){S||(S=2);var l=w.marker,e=l.sizeref||1,t=l.sizemin||0,a=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var n=a(r/S);return u(n)&&n>0?Math.max(n,t):0}}}}),Ch=De({"src/components/fx/helpers.js"(j){"use strict";var N=Ar();j.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},j.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var a=e.xaxes||[],r=e.yaxes||[],n=0;n=0&&a.index2&&(t.push([r].concat(n.splice(0,2))),i="l",r=r=="m"?"l":"L");;){if(n.length==u[i])return n.unshift(r),t.push(n);if(n.length0&&(oe=100,he=he.replace("-open","")),he.indexOf("-dot")>0&&(oe+=200,he=he.replace("-dot","")),he=y.symbolNames.indexOf(he),he>=0&&(he+=oe)}return he%100>=A||he>=400?0:Math.floor(Math.max(he,0))};function h(he,oe,le,ne){var be=he%100;return y.symbolFuncs[be](oe,le,ne)+(he>=200?m:"")}var b=w("~f"),_={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};y.gradient=function(he,oe,le,ne,be,Fe){var Ve=_[ne];return I(he,oe,le,Ve.type,be,Fe,Ve.start,Ve.stop,!1,Ve.reversed)};function I(he,oe,le,ne,be,Fe,Ve,je,ut,st){var yt=be.length,At;ne==="linear"?At={node:"linearGradient",attrs:{x1:Ve.x,y1:Ve.y,x2:je.x,y2:je.y,gradientUnits:ut?"userSpaceOnUse":"objectBoundingBox"},reversed:st}:ne==="radial"&&(At={node:"radialGradient",reversed:st});for(var Pt=new Array(yt),Zt=0;Zt=0&&he.i===void 0&&(he.i=Fe.i),oe.style("opacity",ne.selectedOpacityFn?ne.selectedOpacityFn(he):he.mo===void 0?Ve.opacity:he.mo),ne.ms2mrc){var ut;he.ms==="various"||Ve.size==="various"?ut=3:ut=ne.ms2mrc(he.ms),he.mrc=ut,ne.selectedSizeFn&&(ut=he.mrc=ne.selectedSizeFn(he));var st=y.symbolNumber(he.mx||Ve.symbol)||0;he.om=st%200>=100;var yt=xe(he,le),At=Z(he,le);oe.attr("d",h(st,ut,yt,At))}var Pt=!1,Zt,vr,Nt;if(he.so)Nt=je.outlierwidth,vr=je.outliercolor,Zt=Ve.outliercolor;else{var Kt=(je||{}).width;Nt=(he.mlw+1||Kt+1||(he.trace?(he.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in he?vr=he.mlcc=ne.lineScale(he.mlc):v.isArrayOrTypedArray(je.color)?vr=e.defaultLine:vr=je.color,v.isArrayOrTypedArray(Ve.color)&&(Zt=e.defaultLine,Pt=!0),"mc"in he?Zt=he.mcc=ne.markerScale(he.mc):Zt=Ve.color||Ve.colors||"rgba(0,0,0,0)",ne.selectedColorFn&&(Zt=ne.selectedColorFn(he))}let nt=he.mld||(je||{}).dash;if(nt&&y.dashLine(oe,nt,Nt),he.om)oe.call(e.stroke,Zt).style({"stroke-width":(Nt||1)+"px",fill:"none"});else{oe.style("stroke-width",(he.isBlank?0:Nt)+"px");var Ee=Ve.gradient,ze=he.mgt;ze?Pt=!0:ze=Ee&&Ee.type,v.isArrayOrTypedArray(ze)&&(ze=ze[0],_[ze]||(ze=0));var ve=Ve.pattern,_e=y.getPatternAttr,Ie=ve&&(_e(ve.shape,he.i,"")||_e(ve.path,he.i,""));if(ze&&ze!=="none"){var Be=he.mgc;Be?Pt=!0:Be=Ee.color;var We=le.uid;Pt&&(We+="-"+he.i),y.gradient(oe,be,We,ze,[[0,Be],[1,Zt]],"fill")}else if(Ie){var Xe=!1,mt=ve.fgcolor;!mt&&Fe&&Fe.color&&(mt=Fe.color,Xe=!0);var ft=_e(mt,he.i,Fe&&Fe.color||null),ht=_e(ve.bgcolor,he.i,null),gt=ve.fgopacity,_t=_e(ve.size,he.i,8),Ft=_e(ve.solidity,he.i,.3);Xe=Xe||he.mcc||v.isArrayOrTypedArray(ve.shape)||v.isArrayOrTypedArray(ve.path)||v.isArrayOrTypedArray(ve.bgcolor)||v.isArrayOrTypedArray(ve.fgcolor)||v.isArrayOrTypedArray(ve.size)||v.isArrayOrTypedArray(ve.solidity);var St=le.uid;Xe&&(St+="-"+he.i),y.pattern(oe,"point",be,St,Ie,_t,Ft,he.mcc,ve.fillmode,ht,ft,gt)}else v.isArrayOrTypedArray(Zt)?e.fill(oe,Zt[he.i]):e.fill(oe,Zt);Nt&&e.stroke(oe,vr)}},y.makePointStyleFns=function(he){var oe={},le=he.marker;return oe.markerScale=y.tryColorscale(le,""),oe.lineScale=y.tryColorscale(le,"line"),l.traceIs(he,"symbols")&&(oe.ms2mrc=p.isBubble(he)?f(he):function(){return(le.size||6)/2}),he.selectedpoints&&v.extendFlat(oe,y.makeSelectedPointStyleFns(he)),oe},y.makeSelectedPointStyleFns=function(he){var oe={},le=he.selected||{},ne=he.unselected||{},be=he.marker||{},Fe=le.marker||{},Ve=ne.marker||{},je=be.opacity,ut=Fe.opacity,st=Ve.opacity,yt=ut!==void 0,At=st!==void 0;(v.isArrayOrTypedArray(je)||yt||At)&&(oe.selectedOpacityFn=function(ve){var _e=ve.mo===void 0?be.opacity:ve.mo;return ve.selected?yt?ut:_e:At?st:c*_e});var Pt=be.color,Zt=Fe.color,vr=Ve.color;(Zt||vr)&&(oe.selectedColorFn=function(ve){var _e=ve.mcc||Pt;return ve.selected?Zt||_e:vr||_e});var Nt=be.size,Kt=Fe.size,nt=Ve.size,Ee=Kt!==void 0,ze=nt!==void 0;return l.traceIs(he,"symbols")&&(Ee||ze)&&(oe.selectedSizeFn=function(ve){var _e=ve.mrc||Nt/2;return ve.selected?Ee?Kt/2:_e:ze?nt/2:_e}),oe},y.makeSelectedTextStyleFns=function(he){var oe={},le=he.selected||{},ne=he.unselected||{},be=he.textfont||{},Fe=le.textfont||{},Ve=ne.textfont||{},je=be.color,ut=Fe.color,st=Ve.color;return oe.selectedTextColorFn=function(yt){var At=yt.tc||je;return yt.selected?ut||At:st||(ut?At:e.addOpacity(At,c))},oe},y.selectedPointStyle=function(he,oe){if(!(!he.size()||!oe.selectedpoints)){var le=y.makeSelectedPointStyleFns(oe),ne=oe.marker||{},be=[];le.selectedOpacityFn&&be.push(function(Fe,Ve){Fe.style("opacity",le.selectedOpacityFn(Ve))}),le.selectedColorFn&&be.push(function(Fe,Ve){e.fill(Fe,le.selectedColorFn(Ve))}),le.selectedSizeFn&&be.push(function(Fe,Ve){var je=Ve.mx||ne.symbol||0,ut=le.selectedSizeFn(Ve);Fe.attr("d",h(y.symbolNumber(je),ut,xe(Ve,oe),Z(Ve,oe))),Ve.mrc2=ut}),be.length&&he.each(function(Fe){for(var Ve=u.select(this),je=0;je0?le:0}y.textPointStyle=function(he,oe,le){if(he.size()){var ne;if(oe.selectedpoints){var be=y.makeSelectedTextStyleFns(oe);ne=be.selectedTextColorFn}var Fe=oe.texttemplate,Ve=le._fullLayout;he.each(function(je){var ut=u.select(this),st=Fe?v.extractOption(je,oe,"txt","texttemplate"):v.extractOption(je,oe,"tx","text");if(!st&&st!==0){ut.remove();return}if(Fe){var yt=oe._module.formatLabels,At=yt?yt(je,oe,Ve):{},Pt={};d(Pt,oe,je.i),st=v.texttemplateString({data:[Pt,je,oe._meta],fallback:oe.texttemplatefallback,labels:At,locale:Ve._d3locale,template:st})}var Zt=je.tp||oe.textposition,vr=R(je,oe),Nt=ne?ne(je):je.tc||oe.textfont.color;ut.call(y.font,{family:je.tf||oe.textfont.family,weight:je.tw||oe.textfont.weight,style:je.ty||oe.textfont.style,variant:je.tv||oe.textfont.variant,textcase:je.tC||oe.textfont.textcase,lineposition:je.tE||oe.textfont.lineposition,shadow:je.tS||oe.textfont.shadow,size:vr,color:Nt}).text(st).call(r.convertToTspans,le).call(F,Zt,vr,je.mrc)})}},y.selectedTextStyle=function(he,oe){if(!(!he.size()||!oe.selectedpoints)){var le=y.makeSelectedTextStyleFns(oe);he.each(function(ne){var be=u.select(this),Fe=le.selectedTextColorFn(ne),Ve=ne.tp||oe.textposition,je=R(ne,oe);e.fill(be,Fe);var ut=l.traceIs(oe,"bar-like");F(be,Ve,je,ne.mrc2||ne.mrc,ut)})}};var z=.5;y.smoothopen=function(he,oe){if(he.length<3)return"M"+he.join("L");var le="M"+he[0],ne=[],be;for(be=1;be=ut||ve>=yt&&ve<=ut)&&(_e<=At&&_e>=st||_e>=At&&_e<=st)&&(he=[ve,_e])}return he}y.applyBackoff=ae,y.makeTester=function(){var he=v.ensureSingleById(u.select("body"),"svg","js-plotly-tester",function(le){le.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),oe=v.ensureSingle(he,"path","js-reference-point",function(le){le.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});y.tester=he,y.testref=oe},y.savedBBoxes={};var U=0,H=1e4;y.bBox=function(he,oe,le){le||(le=K(he));var ne;if(le){if(ne=y.savedBBoxes[le],ne)return v.extendFlat({},ne)}else if(he.childNodes.length===1){var be=he.childNodes[0];if(le=K(be),le){var Fe=+be.getAttribute("x")||0,Ve=+be.getAttribute("y")||0,je=be.getAttribute("transform");if(!je){var ut=y.bBox(be,!1,le);return Fe&&(ut.left+=Fe,ut.right+=Fe),Ve&&(ut.top+=Ve,ut.bottom+=Ve),ut}if(le+="~"+Fe+"~"+Ve+"~"+je,ne=y.savedBBoxes[le],ne)return v.extendFlat({},ne)}}var st,yt;oe?st=he:(yt=y.tester.node(),st=he.cloneNode(!0),yt.appendChild(st)),u.select(st).attr("transform",null).call(r.positionText,0,0);var At=st.getBoundingClientRect(),Pt=y.testref.node().getBoundingClientRect();oe||yt.removeChild(st);var Zt={height:At.height,width:At.width,left:At.left-Pt.left,top:At.top-Pt.top,right:At.right-Pt.left,bottom:At.bottom-Pt.top};return U>=H&&(y.savedBBoxes={},U=0),le&&(y.savedBBoxes[le]=Zt),U++,v.extendFlat({},Zt)};function K(he){var oe=he.getAttribute("data-unformatted");if(oe!==null)return oe+he.getAttribute("data-math")+he.getAttribute("text-anchor")+he.getAttribute("style")}y.setClipUrl=function(he,oe,le){he.attr("clip-path",V(oe,le))};function V(he,oe){if(!he)return null;var le=oe._context,ne=le._exportedPlot?"":le._baseUrl||"";return ne?"url('"+ne+"#"+he+"')":"url(#"+he+")"}y.getTranslate=function(he){var oe=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,le=he.attr?"attr":"getAttribute",ne=he[le]("transform")||"",be=ne.replace(oe,function(Fe,Ve,je){return[Ve,je].join(" ")}).split(" ");return{x:+be[0]||0,y:+be[1]||0}},y.setTranslate=function(he,oe,le){var ne=/(\btranslate\(.*?\);?)/,be=he.attr?"attr":"getAttribute",Fe=he.attr?"attr":"setAttribute",Ve=he[be]("transform")||"";return oe=oe||0,le=le||0,Ve=Ve.replace(ne,"").trim(),Ve+=a(oe,le),Ve=Ve.trim(),he[Fe]("transform",Ve),Ve},y.getScale=function(he){var oe=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,le=he.attr?"attr":"getAttribute",ne=he[le]("transform")||"",be=ne.replace(oe,function(Fe,Ve,je){return[Ve,je].join(" ")}).split(" ");return{x:+be[0]||1,y:+be[1]||1}},y.setScale=function(he,oe,le){var ne=/(\bscale\(.*?\);?)/,be=he.attr?"attr":"getAttribute",Fe=he.attr?"attr":"setAttribute",Ve=he[be]("transform")||"";return oe=oe||1,le=le||1,Ve=Ve.replace(ne,"").trim(),Ve+="scale("+oe+","+le+")",Ve=Ve.trim(),he[Fe]("transform",Ve),Ve};var $=/\s*sc.*/;y.setPointGroupScale=function(he,oe,le){if(oe=oe||1,le=le||1,!!he){var ne=oe===1&&le===1?"":"scale("+oe+","+le+")";he.each(function(){var be=(this.getAttribute("transform")||"").replace($,"");be+=ne,be=be.trim(),this.setAttribute("transform",be)})}};var X=/translate\([^)]*\)\s*$/;y.setTextPointsScale=function(he,oe,le){he&&he.each(function(){var ne,be=u.select(this),Fe=be.select("text");if(Fe.node()){var Ve=parseFloat(Fe.attr("x")||0),je=parseFloat(Fe.attr("y")||0),ut=(be.attr("transform")||"").match(X);oe===1&&le===1?ne=[]:ne=[a(Ve,je),"scale("+oe+","+le+")",a(-Ve,-je)],ut&&ne.push(ut),be.attr("transform",ne.join(""))}})};function Z(he,oe){var le;return he&&(le=he.mf),le===void 0&&(le=oe.marker&&oe.marker.standoff||0),!oe._geo&&!oe._xA?-le:le}y.getMarkerStandoff=Z;var Q=Math.atan2,re=Math.cos,ce=Math.sin;function me(he,oe){var le=oe[0],ne=oe[1];return[le*re(he)-ne*ce(he),le*ce(he)+ne*re(he)]}var ye,Ae,Se,Ce,qe,Ue;function xe(he,oe){var le=he.ma;le===void 0&&(le=oe.marker.angle,(!S(le)||v.isArrayOrTypedArray(le))&&(le=0));var ne,be,Fe=oe.marker.angleref;if(Fe==="previous"||Fe==="north"){if(oe._geo){var Ve=oe._geo.project(he.lonlat);ne=Ve[0],be=Ve[1]}else{var je=oe._xA,ut=oe._yA;if(je&&ut)ne=je.c2p(he.x),be=ut.c2p(he.y);else return 90}if(oe._geo){var st=he.lonlat[0],yt=he.lonlat[1],At=oe._geo.project([st,yt+1e-5]),Pt=oe._geo.project([st+1e-5,yt]),Zt=Q(Pt[1]-be,Pt[0]-ne),vr=Q(At[1]-be,At[0]-ne),Nt;if(Fe==="north")Nt=le/180*Math.PI;else if(Fe==="previous"){var Kt=st/180*Math.PI,nt=yt/180*Math.PI,Ee=ye/180*Math.PI,ze=Ae/180*Math.PI,ve=Ee-Kt,_e=re(ze)*ce(ve),Ie=ce(ze)*re(nt)-re(ze)*ce(nt)*re(ve);Nt=-Q(_e,Ie)-Math.PI,ye=st,Ae=yt}var Be=me(Zt,[re(Nt),0]),We=me(vr,[ce(Nt),0]);le=Q(Be[1]+We[1],Be[0]+We[0])/Math.PI*180,Fe==="previous"&&!(Ue===oe.uid&&he.i===qe+1)&&(le=null)}if(Fe==="previous"&&!oe._geo)if(Ue===oe.uid&&he.i===qe+1&&S(ne)&&S(be)){var Xe=ne-Se,mt=be-Ce,ft=oe.line&&oe.line.shape||"",ht=ft.slice(ft.length-1);ht==="h"&&(mt=0),ht==="v"&&(Xe=0),le+=Q(mt,Xe)/Math.PI*180+90}else le=null}return Se=ne,Ce=be,qe=he.i,Ue=oe.uid,le}y.getMarkerAngle=xe}}),Sp=De({"src/components/titles/index.js"(j,N){"use strict";var u=Qn(),v=io(),w=Il(),S=hi(),l=Ar(),e=l.strTranslate,t=Ki(),a=ii(),r=Xs(),n=Zd(),i=yc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,p=1.6;function f(d,y,o){var x=d._fullLayout,M=o.propContainer,T=o.propName,E=o.placeholder,g=o.traceIndex,A=o.avoid||{},m=o.attributes,h=o.transform,b=o.containerGroup,_=1,I=M.title,C=(I&&I.text?I.text:"").trim(),F=!1,R=I&&I.font?I.font:{},z=R.family,D=R.size,k=R.color,B=R.weight,O=R.style,q=R.variant,Y=R.textcase,ee=R.lineposition,te=R.shadow,ae=o.subtitlePropName,U=!!ae,H=o.subtitlePlaceholder,K=(M.title||{}).subtitle||{text:"",font:{}},V=(K.text||"").trim(),$=!1,X=1,Z=K.font,Q=Z.family,re=Z.size,ce=Z.color,me=Z.weight,ye=Z.style,Ae=Z.variant,Se=Z.textcase,Ce=Z.lineposition,qe=Z.shadow,Ue;T==="title.text"?Ue="titleText":T.indexOf("axis")!==-1?Ue="axisTitleText":T.indexOf("colorbar")!==-1&&(Ue="colorbarTitleText");var xe=d._context.edits[Ue];function he(Zt,vr){return Zt===void 0||vr===void 0?!1:Zt.replace(s," % ")===vr.replace(s," % ")}C===""?_=0:he(C,E)&&(xe||(C=""),_=.2,F=!0),U&&(V===""?X=0:he(V,H)&&(xe||(V=""),X=.2,$=!0)),o._meta?C=l.templateString(C,o._meta):x._meta&&(C=l.templateString(C,x._meta));var oe=C||V||xe,le;b||(b=l.ensureSingle(x._infolayer,"g","g-"+y),le=x._hColorbarMoveTitle);var ne=b.selectAll("text."+y).data(oe?[0]:[]);ne.enter().append("text"),ne.text(C).attr("class",y),ne.exit().remove();var be=null,Fe=y+"-subtitle",Ve=V||xe;if(U&&(be=b.selectAll("text."+Fe).data(Ve?[0]:[]),be.enter().append("text"),be.text(V).attr("class",Fe),be.exit().remove()),!oe)return b;function je(Zt,vr){l.syncOrAsync([ut,st],{title:Zt,subtitle:vr})}function ut(Zt){var vr=Zt.title,Nt=Zt.subtitle,Kt;!h&&le&&(h={}),h?(Kt="",h.rotate&&(Kt+="rotate("+[h.rotate,m.x,m.y]+")"),(h.offset||le)&&(Kt+=e(0,(h.offset||0)-(le||0)))):Kt=null,vr.attr("transform",Kt);function nt(Be){if(Be){var We=u.select(Be.node().parentNode).select("."+Fe);if(!We.empty()){var Xe=Be.node().getBBox();if(Xe.height){var mt=Xe.y+Xe.height+c*re;We.attr("y",mt)}}}}if(vr.style("opacity",_*a.opacity(k)).call(t.font,{color:a.rgb(k),size:u.round(D,2),family:z,weight:B,style:O,variant:q,textcase:Y,shadow:te,lineposition:ee}).attr(m).call(r.convertToTspans,d,nt),Nt&&!Nt.empty()){var Ee=b.select("."+y+"-math-group"),ze=vr.node().getBBox(),ve=Ee.node()?Ee.node().getBBox():void 0,_e=ve?ve.y+ve.height+c*re:ze.y+ze.height+p*re,Ie=l.extendFlat({},m,{y:_e});Nt.attr("transform",Kt),Nt.style("opacity",X*a.opacity(ce)).call(t.font,{color:a.rgb(ce),size:u.round(re,2),family:Q,weight:me,style:ye,variant:Ae,textcase:Se,shadow:qe,lineposition:Ce}).attr(Ie).call(r.convertToTspans,d)}return w.previousPromises(d)}function st(Zt){var vr=Zt.title,Nt=u.select(vr.node().parentNode);if(A&&A.selection&&A.side&&C){Nt.attr("transform",null);var Kt=i[A.side],nt=A.side==="left"||A.side==="top"?-1:1,Ee=v(A.pad)?A.pad:2,ze=t.bBox(Nt.node()),ve={t:0,b:0,l:0,r:0},_e=d._fullLayout._reservedMargin;for(var Ie in _e)for(var Be in _e[Ie]){var We=_e[Ie][Be];ve[Be]=Math.max(ve[Be],We)}var Xe={left:ve.l,top:ve.t,right:x.width-ve.r,bottom:x.height-ve.b},mt=A.maxShift||nt*(Xe[A.side]-ze[A.side]),ft=0;if(mt<0)ft=mt;else{var ht=A.offsetLeft||0,gt=A.offsetTop||0;ze.left-=ht,ze.right-=ht,ze.top-=gt,ze.bottom-=gt,A.selection.each(function(){var Ft=t.bBox(this);l.bBoxIntersect(ze,Ft,Ee)&&(ft=Math.max(ft,nt*(Ft[A.side]-ze[Kt])+Ee))}),ft=Math.min(mt,ft),M._titleScoot=Math.abs(ft)}if(ft>0||mt<0){var _t={left:[-ft,0],right:[ft,0],top:[0,-ft],bottom:[0,ft]}[A.side];Nt.attr("transform",e(_t[0],_t[1]))}}}ne.call(je,be);function yt(Zt,vr){Zt.text(vr).on("mouseover.opacity",function(){u.select(this).transition().duration(n.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){u.select(this).transition().duration(n.HIDE_PLACEHOLDER).style("opacity",0)})}if(xe&&(C?ne.on(".opacity",null):(yt(ne,E),F=!0),ne.call(r.makeEditable,{gd:d}).on("edit",function(Zt){g!==void 0?S.call("_guiRestyle",d,T,Zt,g):S.call("_guiRelayout",d,T,Zt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(je)}).on("input",function(Zt){this.text(Zt||" ").call(r.positionText,m.x,m.y)}),U)){if(U&&!C){var At=ne.node().getBBox(),Pt=At.y+At.height+p*re;be.attr("y",Pt)}V?be.on(".opacity",null):(yt(be,H),$=!0),be.call(r.makeEditable,{gd:d}).on("edit",function(Zt){S.call("_guiRelayout",d,"title.subtitle.text",Zt)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(je)}).on("input",function(Zt){this.text(Zt||" ").call(r.positionText,be.attr("x"),be.attr("y"))})}return ne.classed("js-placeholder",F),be&&!be.empty()&&be.classed("js-placeholder",$),b}N.exports={draw:f,SUBTITLE_PADDING_EM:p,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Sd=De({"src/plots/cartesian/set_convert.js"(j,N){"use strict";var u=Qn(),v=Hd().utcFormat,w=Ar(),S=w.numberFormat,l=io(),e=w.cleanNumber,t=w.ms2DateTime,a=w.dateTime2ms,r=w.ensureNumber,n=w.isArrayOrTypedArray,i=Ho(),s=i.FP_SAFE,c=i.BADNUM,p=i.LOG_CLIP,f=i.ONEWEEK,d=i.ONEDAY,y=i.ONEHOUR,o=i.ONEMIN,x=i.ONESEC,M=lu(),T=gc(),E=T.HOUR_PATTERN,g=T.WEEKDAY_PATTERN;function A(h){return Math.pow(10,h)}function m(h){return h!=null}N.exports=function(b,_){_=_||{};var I=b._id||"x",C=I.charAt(0);function F(V,$){if(V>0)return Math.log(V)/Math.LN10;if(V<=0&&$&&b.range&&b.range.length===2){var X=b.range[0],Z=b.range[1];return .5*(X+Z-2*p*Math.abs(X-Z))}else return c}function R(V,$,X,Z){if((Z||{}).msUTC&&l(V))return+V;var Q=a(V,X||b.calendar);if(Q===c)if(l(V)){V=+V;var re=Math.floor(w.mod(V+.05,1)*10),ce=Math.round(V-re/10);Q=a(new Date(ce))+re/10}else return c;return Q}function z(V,$,X){return t(V,$,X||b.calendar)}function D(V){return b._categories[Math.round(V)]}function k(V){if(m(V)){if(b._categoriesMap===void 0&&(b._categoriesMap={}),b._categoriesMap[V]!==void 0)return b._categoriesMap[V];b._categories.push(typeof V=="number"?String(V):V);var $=b._categories.length-1;return b._categoriesMap[V]=$,$}return c}function B(V,$){for(var X=new Array($),Z=0;Z<$;Z++){var Q=(V[0]||[])[Z],re=(V[1]||[])[Z];X[Z]=O([Q,re])}return X}function O(V){if(b._categoriesMap)return b._categoriesMap[V]}function q(V){var $=O(V);if($!==void 0)return $;if(l(V))return+V}function Y(V){return l(V)?+V:O(V)}function ee(V,$,X){return u.round(X+$*V,2)}function te(V,$,X){return(V-X)/$}var ae=function($){return l($)?ee($,b._m,b._b):c},U=function(V){return te(V,b._m,b._b)};if(b.rangebreaks){var H=C==="y";ae=function(V){if(!l(V))return c;var $=b._rangebreaks.length;if(!$)return ee(V,b._m,b._b);var X=H;b.range[0]>b.range[1]&&(X=!X);for(var Z=X?-1:1,Q=Z*V,re=0,ce=0;ce<$;ce++){var me=Z*b._rangebreaks[ce].min,ye=Z*b._rangebreaks[ce].max;if(Qye)re=ce+1;else{re=Q<(me+ye)/2?ce:ce+1;break}}var Ae=b._B[re]||0;return isFinite(Ae)?ee(V,b._m2,Ae):0},U=function(V){var $=b._rangebreaks.length;if(!$)return te(V,b._m,b._b);for(var X=0,Z=0;Z<$&&!(Vb._rangebreaks[Z].pmax&&(X=Z+1);return te(V,b._m2,b._B[X])}}b.c2l=b.type==="log"?F:r,b.l2c=b.type==="log"?A:r,b.l2p=ae,b.p2l=U,b.c2p=b.type==="log"?function(V,$){return ae(F(V,$))}:ae,b.p2c=b.type==="log"?function(V){return A(U(V))}:U,["linear","-"].indexOf(b.type)!==-1?(b.d2r=b.r2d=b.d2c=b.r2c=b.d2l=b.r2l=e,b.c2d=b.c2r=b.l2d=b.l2r=r,b.d2p=b.r2p=function(V){return b.l2p(e(V))},b.p2d=b.p2r=U,b.cleanPos=r):b.type==="log"?(b.d2r=b.d2l=function(V,$){return F(e(V),$)},b.r2d=b.r2c=function(V){return A(e(V))},b.d2c=b.r2l=e,b.c2d=b.l2r=r,b.c2r=F,b.l2d=A,b.d2p=function(V,$){return b.l2p(b.d2r(V,$))},b.p2d=function(V){return A(U(V))},b.r2p=function(V){return b.l2p(e(V))},b.p2r=U,b.cleanPos=r):b.type==="date"?(b.d2r=b.r2d=w.identity,b.d2c=b.r2c=b.d2l=b.r2l=R,b.c2d=b.c2r=b.l2d=b.l2r=z,b.d2p=b.r2p=function(V,$,X){return b.l2p(R(V,0,X))},b.p2d=b.p2r=function(V,$,X){return z(U(V),$,X)},b.cleanPos=function(V){return w.cleanDate(V,c,b.calendar)}):b.type==="category"?(b.d2c=b.d2l=k,b.r2d=b.c2d=b.l2d=D,b.d2r=b.d2l_noadd=q,b.r2c=function(V){var $=Y(V);return $!==void 0?$:b.fraction2r(.5)},b.l2r=b.c2r=r,b.r2l=Y,b.d2p=function(V){return b.l2p(b.r2c(V))},b.p2d=function(V){return D(U(V))},b.r2p=b.d2p,b.p2r=U,b.cleanPos=function(V){return typeof V=="string"&&V!==""?V:r(V)}):b.type==="multicategory"&&(b.r2d=b.c2d=b.l2d=D,b.d2r=b.d2l_noadd=q,b.r2c=function(V){var $=q(V);return $!==void 0?$:b.fraction2r(.5)},b.r2c_just_indices=O,b.l2r=b.c2r=r,b.r2l=q,b.d2p=function(V){return b.l2p(b.r2c(V))},b.p2d=function(V){return D(U(V))},b.r2p=b.d2p,b.p2r=U,b.cleanPos=function(V){return Array.isArray(V)||typeof V=="string"&&V!==""?V:r(V)},b.setupMultiCategory=function(V){var $=b._traceIndices,X,Z,Q=b._matchGroup;if(Q&&b._categories.length===0){for(var re in Q)if(re!==I){var ce=_[M.id2name(re)];$=$.concat(ce._traceIndices)}}var me=[[0,{}],[0,{}]],ye=[];for(X=0;X<$.length;X++){var Ae=V[$[X]];if(C in Ae){var Se=Ae[C],Ce=Ae._length||w.minRowLength(Se);if(n(Se[0])&&n(Se[1]))for(Z=0;Zce[1]&&(Z[re?0:1]=X,Q[1]=ce[1]),Q[0]>=Q[1])if($!==void 0){var me=ce[0]+1;X!==void 0&&(me=Math.min(me,ce[1])),Z[re?0:1]=b.l2r(me)}else X!==void 0&&(Z[re?1:0]=b.l2r(ce[1]-1))}},b.cleanRange=function(V,$){b._cleanRange(V,$),b.limitRange(V)},b._cleanRange=function(V,$){$||($={}),V||(V="range");var X=w.nestedProperty(b,V).get(),Z,Q;if(b.type==="date"?Q=w.dfltRange(b.calendar):C==="y"?Q=T.DFLTRANGEY:b._name==="realaxis"?Q=[0,1]:Q=$.dfltRange||T.DFLTRANGEX,Q=Q.slice(),(b.rangemode==="tozero"||b.rangemode==="nonnegative")&&(Q[0]=0),!X||X.length!==2){w.nestedProperty(b,V).set(Q);return}var re=X[0]===null,ce=X[1]===null;for(b.type==="date"&&!b.autorange&&(X[0]=w.cleanDate(X[0],c,b.calendar),X[1]=w.cleanDate(X[1],c,b.calendar)),Z=0;Z<2;Z++)if(b.type==="date"){if(!w.isDateTime(X[Z],b.calendar)){b[V]=Q;break}if(b.r2l(X[0])===b.r2l(X[1])){var me=w.constrain(b.r2l(X[0]),w.MIN_MS+1e3,w.MAX_MS-1e3);X[0]=b.l2r(me-1e3),X[1]=b.l2r(me+1e3);break}}else{if(!l(X[Z]))if(!(re||ce)&&l(X[1-Z]))X[Z]=X[1-Z]*(Z?10:.1);else{b[V]=Q;break}if(X[Z]<-s?X[Z]=-s:X[Z]>s&&(X[Z]=s),X[0]===X[1]){var ye=Math.max(1,Math.abs(X[0]*1e-6));X[0]-=ye,X[1]+=ye}}},b.setScale=function(V){var $=_._size;if(b.overlaying){var X=M.getFromId({_fullLayout:_},b.overlaying);b.domain=X.domain}var Z=V&&b._r?"_r":"range",Q=b.calendar;b.cleanRange(Z);var re=b.r2l(b[Z][0],Q),ce=b.r2l(b[Z][1],Q),me=C==="y";if(me?(b._offset=$.t+(1-b.domain[1])*$.h,b._length=$.h*(b.domain[1]-b.domain[0]),b._m=b._length/(re-ce),b._b=-b._m*ce):(b._offset=$.l+b.domain[0]*$.w,b._length=$.w*(b.domain[1]-b.domain[0]),b._m=b._length/(ce-re),b._b=-b._m*re),b._rangebreaks=[],b._lBreaks=0,b._m2=0,b._B=[],b.rangebreaks){var ye,Ae;if(b._rangebreaks=b.locateBreaks(Math.min(re,ce),Math.max(re,ce)),b._rangebreaks.length){for(ye=0;yece&&(Se=!Se),Se&&b._rangebreaks.reverse();var Ce=Se?-1:1;for(b._m2=Ce*b._length/(Math.abs(ce-re)-b._lBreaks),b._B.push(-b._m2*(me?ce:re)),ye=0;yeQ&&(Q+=7,reQ&&(Q+=24,re=Z&&re=Z&&V=je.min&&(neje.max&&(je.max=be),Fe=!1)}Fe&&ce.push({min:ne,max:be})}};for(X=0;Xx*2}function i(p){return Math.max(1,(p-1)/1e3)}function s(p,f){for(var d=p.length,y=i(d),o=0,x=0,M={},T=0;To*2}function c(p){return S(p[0])&&S(p[1])}}}),sd=De({"src/plots/cartesian/autorange.js"(j,N){"use strict";var u=Qn(),v=io(),w=Ar(),S=Ho().FP_SAFE,l=hi(),e=Ki(),t=lu(),a=t.getFromId,r=t.isLinked;N.exports={applyAutorangeOptions:b,getAutoRange:n,makePadFn:s,doAutoRange:d,findExtremes:y,concatExtremes:f};function n(_,I){var C,F,R=[],z=_._fullLayout,D=s(z,I,0),k=s(z,I,1),B=f(_,I),O=B.min,q=B.max;if(O.length===0||q.length===0)return w.simpleMap(I.range,I.r2l);var Y=O[0].val,ee=q[0].val;for(C=1;C0&&(ye=$-D(Q)-k(re),ye>X?Ae/ye>Z&&(ce=Q,me=re,Z=Ae/ye):Ae/$>Z&&(ce={val:Q.val,nopad:1},me={val:re.val,nopad:1},Z=Ae/$));function Se(he,oe){return Math.max(he,k(oe))}if(Y===ee){var Ce=Y-1,qe=Y+1;if(K)if(Y===0)R=[0,1];else{var Ue=(Y>0?q:O).reduce(Se,0),xe=Y/(1-Math.min(.5,Ue/$));R=Y>0?[0,xe]:[xe,0]}else V?R=[Math.max(0,Ce),Math.max(1,qe)]:R=[Ce,qe]}else K?(ce.val>=0&&(ce={val:0,nopad:1}),me.val<=0&&(me={val:0,nopad:1})):V&&(ce.val-Z*D(ce)<0&&(ce={val:0,nopad:1}),me.val<=0&&(me={val:1,nopad:1})),Z=(me.val-ce.val-i(I,Q.val,re.val))/($-D(ce)-k(me)),R=[ce.val-Z*D(ce),me.val+Z*k(me)];return R=b(R,I),I.limitRange&&I.limitRange(),ae&&R.reverse(),w.simpleMap(R,I.l2r||Number)}function i(_,I,C){var F=0;if(_.rangebreaks)for(var R=_.locateBreaks(I,C),z=0;z0?C.ppadplus:C.ppadminus)||C.ppad||0),Q=X((_._m>0?C.ppadminus:C.ppadplus)||C.ppad||0),re=X(C.vpadplus||C.vpad),ce=X(C.vpadminus||C.vpad);if(!O){if(V=1/0,$=-1/0,B)for(Y=0;Y0&&(V=ee),ee>$&&ee-S&&(V=ee),ee>$&&ee=Ae;Y--)ye(Y);return{min:F,max:R,opts:C}}function o(_,I,C,F){M(_,I,C,F,E)}function x(_,I,C,F){M(_,I,C,F,g)}function M(_,I,C,F,R){for(var z=F.tozero,D=F.extrapad,k=!0,B=0;B<_.length&&k;B++){var O=_[B];if(R(O.val,I)&&O.pad>=C&&(O.extrapad||!D)){k=!1;break}else R(I,O.val)&&O.pad<=C&&(D||!O.extrapad)&&(_.splice(B,1),B--)}if(k){var q=z&&I===0;_.push({val:I,pad:q?0:C,extrapad:q?!1:D})}}function T(_){return v(_)&&Math.abs(_)=I}function A(_,I){var C=I.autorangeoptions;return C&&C.minallowed!==void 0&&h(I,C.minallowed,C.maxallowed)?C.minallowed:C&&C.clipmin!==void 0&&h(I,C.clipmin,C.clipmax)?Math.max(_,I.d2l(C.clipmin)):_}function m(_,I){var C=I.autorangeoptions;return C&&C.maxallowed!==void 0&&h(I,C.minallowed,C.maxallowed)?C.maxallowed:C&&C.clipmax!==void 0&&h(I,C.clipmin,C.clipmax)?Math.min(_,I.d2l(C.clipmax)):_}function h(_,I,C){return I!==void 0&&C!==void 0?(I=_.d2l(I),C=_.d2l(C),I=B&&(z=B,C=B),D<=B&&(D=B,F=B)}}return C=A(C,I),F=m(F,I),[C,F]}}}),Vi=De({"src/plots/cartesian/axes.js"(j,N){"use strict";var u=Qn(),v=io(),w=Il(),S=hi(),l=Ar(),e=l.strTranslate,t=Xs(),a=Sp(),r=ii(),n=Ki(),i=hf(),s=I3(),c=gc(),p=Ho(),f=p.ONEMAXYEAR,d=p.ONEAVGYEAR,y=p.ONEMINYEAR,o=p.ONEMAXQUARTER,x=p.ONEAVGQUARTER,M=p.ONEMINQUARTER,T=p.ONEMAXMONTH,E=p.ONEAVGMONTH,g=p.ONEMINMONTH,A=p.ONEWEEK,m=p.ONEDAY,h=m/2,b=p.ONEHOUR,_=p.ONEMIN,I=p.ONESEC,C=p.ONEMILLI,F=p.ONEMICROSEC,R=p.MINUS_SIGN,z=p.BADNUM,D={K:"zeroline"},k={K:"gridline",L:"path"},B={K:"minor-gridline",L:"path"},O={K:"tick",L:"path"},q={K:"tick",L:"text"},Y={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},ee=yc(),te=ee.MID_SHIFT,ae=ee.CAP_SHIFT,U=ee.LINE_SPACING,H=ee.OPPOSITE_SIDE,K=3,V=N.exports={};V.setConvert=Sd();var $=dm(),X=lu(),Z=X.idSort,Q=X.isLinked;V.id2name=X.id2name,V.name2id=X.name2id,V.cleanId=X.cleanId,V.list=X.list,V.listIds=X.listIds,V.getFromId=X.getFromId,V.getFromTrace=X.getFromTrace;var re=sd();V.getAutoRange=re.getAutoRange,V.findExtremes=re.findExtremes;var ce=1e-4;function me(it){var Qe=(it[1]-it[0])*ce;return[it[0]-Qe,it[1]+Qe]}function ye(it,Qe,Jt){if(![Jt,it,Qe].every(v)||Jt===0)return it;let Yt=Math.round((it-Qe)/Jt),ar=Qe+Yt*Jt;return it!==ar&&Math.abs(it-ar)Ir+" domain")),bt=bt.concat(cr||[]),Qt.length>tr?(l.warn("Array attribute "+qt+" has more entries than expected, truncating to "+tr),Qt=Qt.slice(0,tr)):Qt.length2e-6||((Jt-it._forceTick0)/it._minDtick%1+1.000001)%1>2e-6)&&(it._minDtick=0))},V.saveRangeInitial=function(it,Qe){for(var Jt=V.list(it,"",!0),Yt=!1,ar=0;arbr*.3||qt(Yt)||qt(ar))){var Ir=Jt.dtick/2;it+=it+Irtr){var Je=Number(Jt.slice(1));cr.exactYears>tr&&Je%12===0?it=V.tickIncrement(it,"M6","reverse")+m*1.5:cr.exactMonths>tr?it=V.tickIncrement(it,"M1","reverse")+m*15.5:it-=h;var bt=V.tickIncrement(it,Jt);if(bt<=Yt)return bt}return it}V.prepMinorTicks=function(it,Qe,Jt){var Yt,ar;if(!((Yt=Qe.minor)!=null&&Yt.dtick)){delete it.dtick;var cr=Qe.dtick&&v(Qe._tmin),tr;if(cr){var Je=V.tickIncrement(Qe._tmin,Qe.dtick,!0);tr=[Qe._tmin,Je*.99+Qe._tmin*.01]}else{var bt=l.simpleMap(Qe.range,Qe.r2l);tr=[bt[0],.8*bt[0]+.2*bt[1]]}if(it.range=l.simpleMap(tr,Qe.l2r),it._isMinor=!0,V.prepTicks(it,Jt),cr){var qt=v(Qe.dtick),Qt=v(it.dtick),br=qt?Qe.dtick:+Qe.dtick.substring(1),Ir=Qt?it.dtick:+it.dtick.substring(1);qt&&Qt?xe(br,Ir)?br===2*A&&Ir===2*m&&(it.dtick=A):br===2*A&&Ir===3*m?it.dtick=A:br===A&&!(Qe._input.minor||{}).nticks?it.dtick=m:he(br/Ir,2.5)?it.dtick=br/2:it.dtick=br:String(Qe.dtick).charAt(0)==="M"?Qt?it.dtick="M1":xe(br,Ir)?br>=12&&Ir===2&&(it.dtick="M3"):it.dtick=Qe.dtick:String(it.dtick).charAt(0)==="L"?String(Qe.dtick).charAt(0)==="L"?xe(br,Ir)||(it.dtick=he(br/Ir,2.5)?Qe.dtick/2:Qe.dtick):it.dtick="D1":it.dtick==="D2"&&+Qe.dtick>1&&(it.dtick=1)}it.range=Qe.range}((ar=Qe.minor)==null?void 0:ar._tick0Init)===void 0&&(it.tick0=Qe.tick0)};function xe(it,Qe){return Math.abs((it/Qe+.5)%1-.5)<.001}function he(it,Qe){return Math.abs(it/Qe-1)<.001}V.prepTicks=function(it,Qe){var Jt=l.simpleMap(it.range,it.r2l,void 0,void 0,Qe);if(it.tickmode==="auto"||!it.dtick){var Yt=it.nticks,ar;Yt||(it.type==="category"||it.type==="multicategory"?(ar=it.tickfont?l.bigFont(it.tickfont.size||12):15,Yt=it._length/ar):(ar=it._id.charAt(0)==="y"?40:80,Yt=l.constrain(it._length/ar,4,9)+1),it._name==="radialaxis"&&(Yt*=2)),it.minor&&it.minor.tickmode!=="array"||it.tickmode==="array"&&(Yt*=100),it._roughDTick=Math.abs(Jt[1]-Jt[0])/Yt,V.autoTicks(it,it._roughDTick),it._minDtick>0&&it.dtick0?(cr=Yt-1,tr=Yt):(cr=Yt,tr=Yt);var Je=it[cr].value,bt=it[tr].value,qt=Math.abs(bt-Je),Qt=Jt||qt,br=0;Qt>=y?qt>=y&&qt<=f?br=qt:br=d:Jt===x&&Qt>=M?qt>=M&&qt<=o?br=qt:br=x:Qt>=g?qt>=g&&qt<=T?br=qt:br=E:Jt===A&&Qt>=A?br=A:Qt>=m?br=m:Jt===h&&Qt>=h?br=h:Jt===b&&Qt>=b&&(br=b);var Ir;br>=qt&&(br=qt,Ir=!0);var Cr=ar+br;if(Qe.rangebreaks&&br>0){for(var Mr=84,Xr=0,Ra=0;RaA&&(br=qt)}(br>0||Yt===0)&&(it[Yt].periodX=ar+br/2)}}V.calcTicks=function(Qe,Jt){for(var Yt=Qe.type,ar=Qe.calendar,cr=Qe.ticklabelstep,tr=Qe.ticklabelmode==="period",Je=Qe.range[0]>Qe.range[1],bt=!Qe.ticklabelindex||l.isArrayOrTypedArray(Qe.ticklabelindex)?Qe.ticklabelindex:[Qe.ticklabelindex],qt=l.simpleMap(Qe.range,Qe.r2l,void 0,void 0,Jt),Qt=qt[1]=(ri?0:1);On--){var ui=!On;On?(Qe._dtickInit=Qe.dtick,Qe._tick0Init=Qe.tick0):ri&&(Qe.minor._dtickInit=Qe.minor.dtick,Qe.minor._tick0Init=Qe.minor.tick0);var jn=On?Qe:l.extendFlat({},Qe,ri?Qe.minor:{minor:{}});if(ui?V.prepMinorTicks(jn,Qe,Jt):V.prepTicks(jn,Jt),jn.tickmode==="array"){On?(Ra=[],Mr=Ve(Qe,!ui)):(wa=[],Xr=Ve(Qe,!ui));continue}if(jn.tickmode==="sync"){Ra=[],Mr=Fe(Qe);continue}var oo=me(qt),Qi=oo[0],Mn=oo[1],bo=v(jn.dtick),so=Yt==="log"&&!(bo||jn.dtick.charAt(0)==="L"),Hi=V.tickFirst(jn,Jt);if(On){if(Qe._tmin=Hi,Hi=Mn:Bi<=Mn;Bi=V.tickIncrement(Bi,po,Qt,ar)){if(On&&fo++,jn.rangebreaks&&!Qt){if(Bi=Ir)break}if(Ra.length>Cr||Bi===yo)break;yo=Bi;var yi={value:ye(Bi,Kn,po)};On?(Bi===Hi&&(yi.first=!0),so&&Bi!==(Bi|0)&&(yi.simpleLabel=!0),cr>1&&fo%cr&&(yi.skipLabel=!0),Ra.push(yi)):(yi.minor=!0,wa.push(yi))}}if(!wa||wa.length<3)bt=!1;else{var Yi=(wa[2].value-wa[1].value)*(Je?-1:1);Va(Yi,Qe.tickformat)||(bt=!1,wa=wa.slice(1))}if(!bt)yn=Ra;else{var zi=Ra.concat(wa);tr&&Ra.length&&(zi=zi.slice(1)),zi=zi.sort(function($o,wo){return $o.value-wo.value}).filter(function($o,wo,go){return wo===0||$o.value!==go[wo-1].value});var Uo=zi.map(function($o,wo){return $o.minor===void 0&&!$o.skipLabel?wo:null}).filter(function($o){return $o!==null});Uo.forEach(function($o){bt.map(function(wo){var go=$o+wo;go>=0&&go-1;mo--){if(Ra[mo].drop){Ra.splice(mo,1);continue}Ra[mo].value=on(Ra[mo].value,Qe);var Us=Qe.c2p(Ra[mo].value);(Zs?Ds>Us-qo:DsIr||rsIr&&(go.periodX=Ir),rsar&&Mrar&&Rad)Qe/=d,Yt=ar(10),it.dtick="M"+12*vr(Qe,Yt,je);else if(cr>E)Qe/=E,it.dtick="M"+vr(Qe,1,ut);else if(cr>m){if(it.dtick=vr(Qe,m,it._hasDayOfWeekBreaks?[1,2,7,14]:yt),!Jt){var tr=V.getTickFormat(it),Je=it.ticklabelmode==="period";Je&&(it._rawTick0=it.tick0),/%[uVW]/.test(tr)?it.tick0=l.dateTick0(it.calendar,2):it.tick0=l.dateTick0(it.calendar,1),Je&&(it._dowTick0=it.tick0)}}else cr>b?it.dtick=vr(Qe,b,ut):cr>_?it.dtick=vr(Qe,_,st):cr>I?it.dtick=vr(Qe,I,st):(Yt=ar(10),it.dtick=vr(Qe,Yt,je))}else if(it.type==="log"){it.tick0=0;var bt=l.simpleMap(it.range,it.r2l);if(it._isMinor&&(Qe*=1.5),Qe>.7)it.dtick=Math.ceil(Qe);else if(Math.abs(bt[1]-bt[0])<1){var qt=1.5*Math.abs((bt[1]-bt[0])/Qe);Qe=Math.abs(Math.pow(10,bt[1])-Math.pow(10,bt[0]))/qt,Yt=ar(10),it.dtick="L"+vr(Qe,Yt,je)}else it.dtick=Qe>.3?"D2":"D1"}else it.type==="category"||it.type==="multicategory"?(it.tick0=0,it.dtick=Math.ceil(Math.max(Qe,1))):oi(it)?(it.tick0=0,Yt=1,it.dtick=vr(Qe,Yt,Zt)):(it.tick0=0,Yt=ar(10),it.dtick=vr(Qe,Yt,je));if(it.dtick===0&&(it.dtick=1),!v(it.dtick)&&typeof it.dtick!="string"){var Qt=it.dtick;throw it.dtick=1,"ax.dtick error: "+String(Qt)}};function Nt(it){var Qe=it.dtick;if(it._tickexponent=0,!v(Qe)&&typeof Qe!="string"&&(Qe=1),(it.type==="category"||it.type==="multicategory")&&(it._tickround=null),it.type==="date"){var Jt=it.r2l(it.tick0),Yt=it.l2r(Jt).replace(/(^-|i)/g,""),ar=Yt.length;if(String(Qe).charAt(0)==="M")ar>10||Yt.slice(5)!=="01-01"?it._tickround="d":it._tickround=+Qe.slice(1)%12===0?"y":"m";else if(Qe>=m&&ar<=10||Qe>=m*15)it._tickround="d";else if(Qe>=_&&ar<=16||Qe>=b)it._tickround="M";else if(Qe>=I&&ar<=19||Qe>=_)it._tickround="S";else{var cr=it.l2r(Jt+Qe).replace(/^-/,"").length;it._tickround=Math.max(ar,cr)-20,it._tickround<0&&(it._tickround=4)}}else if(v(Qe)||Qe.charAt(0)==="L"){var tr=it.range.map(it.r2d||Number);v(Qe)||(Qe=Number(Qe.slice(1))),it._tickround=2-Math.floor(Math.log(Qe)/Math.LN10+.01);var Je=Math.max(Math.abs(tr[0]),Math.abs(tr[1])),bt=Math.floor(Math.log(Je)/Math.LN10+.01),qt=it.minexponent===void 0?3:it.minexponent;Math.abs(bt)>qt&&(mt(it.exponentformat)&&it.exponentformat!=="SI extended"&&!ft(bt)||mt(it.exponentformat)&&it.exponentformat==="SI extended"&&!ht(bt)?it._tickexponent=3*Math.round((bt-1)/3):it._tickexponent=bt)}else it._tickround=null}V.tickIncrement=function(it,Qe,Jt,Yt){var ar=Jt?-1:1;if(v(Qe))return l.increment(it,ar*Qe);var cr=Qe.charAt(0),tr=ar*Number(Qe.slice(1));if(cr==="M")return l.incrementMonth(it,tr,Yt);if(cr==="L")return Math.log(Math.pow(10,it)+tr)/Math.LN10;if(cr==="D"){var Je=Qe==="D2"?Pt:At,bt=it+ar*.01,qt=l.roundUp(l.mod(bt,1),Je,Jt);return Math.floor(bt)+Math.log(u.round(Math.pow(10,qt),1))/Math.LN10}throw"unrecognized dtick "+String(Qe)},V.tickFirst=function(it,Qe){var Jt=it.r2l||Number,Yt=l.simpleMap(it.range,Jt,void 0,void 0,Qe),ar=Yt[1]=0&&ri<=it._length?fn:null};if(bt&&l.isArrayOrTypedArray(it.ticktext)){var Mr=l.simpleMap(it.range,it.r2l),Xr=(Math.abs(Mr[1]-Mr[0])-(it._lBreaks||0))/1e4;for(Ir=0;Ir"+Je;else{var qt=mn(it),Qt=it._trueSide||it.side;(!qt&&Qt==="top"||qt&&Qt==="bottom")&&(tr+="
")}Qe.text=tr}function Ee(it,Qe,Jt,Yt,ar){var cr=it.dtick,tr=Qe.x,Je=it.tickformat,bt=typeof cr=="string"&&cr.charAt(0);if(ar==="never"&&(ar=""),Yt&&bt!=="L"&&(cr="L3",bt="L"),Je||bt==="L")Qe.text=_t(Math.pow(10,tr),it,ar,Yt);else if(v(cr)||bt==="D"&&(it.minorloglabels==="complete"||l.mod(tr+.01,1)<.1)){var qt;it.minorloglabels==="complete"&&!(l.mod(tr+.01,1)<.1)&&(qt=!0,Qe.fontSize*=.75);var Qt=Math.pow(10,tr).toExponential(0),br=Qt.split("e"),Ir=+br[1],Cr=Math.abs(Ir),Mr=it.exponentformat;Mr==="power"||mt(Mr)&&Mr!=="SI extended"&&ft(Ir)||mt(Mr)&&Mr==="SI extended"&&ht(Ir)?(Qe.text=br[0],Cr>0&&(Qe.text+="x10"),Qe.text==="1x10"&&(Qe.text="10"),Ir!==0&&Ir!==1&&(Qe.text+=""+(Ir>0?"":R)+Cr+""),Qe.fontSize*=1.25):(Mr==="e"||Mr==="E")&&Cr>2?Qe.text=br[0]+Mr+(Ir>0?"+":R)+Cr:(Qe.text=_t(Math.pow(10,tr),it,"","fakehover"),cr==="D1"&&it._id.charAt(0)==="y"&&(Qe.dy-=Qe.fontSize/6))}else if(bt==="D")Qe.text=it.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(tr,1)))),Qe.fontSize*=.75;else throw"unrecognized dtick "+String(cr);if(it.dtick==="D1"){var Xr=String(Qe.text).charAt(0);(Xr==="0"||Xr==="1")&&(it._id.charAt(0)==="y"?Qe.dx-=Qe.fontSize/4:(Qe.dy+=Qe.fontSize/2,Qe.dx+=(it.range[1]>it.range[0]?1:-1)*Qe.fontSize*(tr<0?.5:.25)))}}function ze(it,Qe){var Jt=it._categories[Math.round(Qe.x)];Jt===void 0&&(Jt=""),Qe.text=String(Jt)}function ve(it,Qe,Jt){var Yt=Math.round(Qe.x),ar=it._categories[Yt]||[],cr=ar[1]===void 0?"":String(ar[1]),tr=ar[0]===void 0?"":String(ar[0]);Jt?Qe.text=tr+" - "+cr:(Qe.text=cr,Qe.text2=tr)}function _e(it,Qe,Jt,Yt,ar){ar==="never"?ar="":it.showexponent==="all"&&Math.abs(Qe.x/it.dtick)<1e-6&&(ar="hide"),Qe.text=_t(Qe.x,it,ar,Yt)}function Ie(it,Qe,Jt,Yt,ar){if(it.thetaunit==="radians"&&!Jt){var cr=Qe.x/180;if(cr===0)Qe.text="0";else{var tr=Be(cr);if(tr[1]>=100)Qe.text=_t(l.deg2rad(Qe.x),it,ar,Yt);else{var Je=Qe.x<0;tr[1]===1?tr[0]===1?Qe.text="\u03C0":Qe.text=tr[0]+"\u03C0":Qe.text=["",tr[0],"","\u2044","",tr[1],"","\u03C0"].join(""),Je&&(Qe.text=R+Qe.text)}}}else Qe.text=_t(Qe.x,it,ar,Yt)}function Be(it){function Qe(Je,bt){return Math.abs(Je-bt)<=1e-6}function Jt(Je,bt){return Qe(bt,0)?Je:Jt(bt,Je%bt)}function Yt(Je){for(var bt=1;!Qe(Math.round(Je*bt)/bt,Je);)bt*=10;return bt}var ar=Yt(it),cr=it*ar,tr=Math.abs(Jt(cr,ar));return[Math.round(cr/tr),Math.round(ar/tr)]}var We=["f","p","n","\u03BC","m","","k","M","G","T"],Xe=["q","r","y","z","a",...We,"P","E","Z","Y","R","Q"],mt=it=>["SI","SI extended","B"].includes(it);function ft(it){return it>14||it<-15}function ht(it){return it>32||it<-30}function gt(it,Qe){return mt(Qe)?!!(Qe==="SI extended"&&ht(it)||Qe!=="SI extended"&&ft(it)):!1}function _t(it,Qe,Jt,Yt){var ar=it<0,cr=Qe._tickround,tr=Jt||Qe.exponentformat||"B",Je=Qe._tickexponent,bt=V.getTickFormat(Qe),qt=Qe.separatethousands;if(Yt){var Qt={exponentformat:tr,minexponent:Qe.minexponent,dtick:Qe.showexponent==="none"?Qe.dtick:v(it)&&Math.abs(it)||1,range:Qe.showexponent==="none"?Qe.range.map(Qe.r2d):[0,it||1]};Nt(Qt),cr=(Number(Qt._tickround)||0)+4,Je=Qt._tickexponent,Qe.hoverformat&&(bt=Qe.hoverformat)}if(bt)return Qe._numFormat(bt)(it).replace(/-/g,R);tr==="none"&&(Je=0),it=Math.abs(it);let br=Math.pow(10,-cr)/2;if(it"+Ir+"":tr==="B"&&Je===9?it+="B":mt(tr)&&(it+=tr==="SI extended"?Xe[Je/3+10]:We[Je/3+5])}return ar?R+it:it}V.getTickFormat=function(it){var Qe;function Jt(bt){return typeof bt!="string"?bt:Number(bt.replace("M",""))*E}function Yt(bt,qt){var Qt=["L","D"];if(typeof bt==typeof qt){if(typeof bt=="number")return bt-qt;var br=Qt.indexOf(bt.charAt(0)),Ir=Qt.indexOf(qt.charAt(0));return br===Ir?Number(bt.replace(/(L|D)/g,""))-Number(qt.replace(/(L|D)/g,"")):br-Ir}else return typeof bt=="number"?1:-1}function ar(bt,qt,Qt){var br=Qt||function(Mr){return Mr},Ir=qt[0],Cr=qt[1];return(!Ir&&typeof Ir!="number"||br(Ir)<=br(bt))&&(!Cr&&typeof Cr!="number"||br(Cr)>=br(bt))}function cr(bt,qt){var Qt=qt[0]===null,br=qt[1]===null,Ir=Yt(bt,qt[0])>=0,Cr=Yt(bt,qt[1])<=0;return(Qt||Ir)&&(br||Cr)}var tr,Je;if(it.tickformatstops&&it.tickformatstops.length>0)switch(it.type){case"date":case"linear":{for(Qe=0;Qe=0&&ar.unshift(ar.splice(Qt,1).shift())}});var Je={false:{left:0,right:0}};return l.syncOrAsync(ar.map(function(bt){return function(){if(bt){var qt=V.getFromId(it,bt);Jt||(Jt={}),Jt.axShifts=Je,Jt.overlayingShiftedAx=tr;var Qt=V.drawOne(it,qt,Jt);return qt._shiftPusher&&Li(qt,qt._fullDepth||0,Je,!0),qt._r=qt.range.slice(),qt._rl=l.simpleMap(qt._r,qt.r2l),Qt}}}))},V.drawOne=function(it,Qe,Jt){Jt=Jt||{};var Yt=Jt.axShifts||{},ar=Jt.overlayingShiftedAx||[],cr,tr,Je;Qe.setScale();var bt=it._fullLayout,qt=Qe._id,Qt=qt.charAt(0),br=V.counterLetter(qt),Ir=bt._plots[Qe._mainSubplot],Cr=Qe.zerolinelayer==="above traces";if(!Ir)return;if(Qe._shiftPusher=Qe.autoshift||ar.indexOf(Qe._id)!==-1||ar.indexOf(Qe.overlaying)!==-1,Qe._shiftPusher&Qe.anchor==="free"){var Mr=Qe.linewidth/2||0;Qe.ticks==="inside"&&(Mr+=Qe.ticklen),Li(Qe,Mr,Yt,!0),Li(Qe,Qe.shift||0,Yt,!1)}(Jt.skipTitle!==!0||Qe._shift===void 0)&&(Qe._shift=$a(Qe,Yt));var Xr=Ir[Qt+"axislayer"],Ra=Qe._mainLinePosition,wa=Ra+=Qe._shift,yn=Qe._mainMirrorPosition,fn=Qe._vals=V.calcTicks(Qe),ri=[Qe.mirror,wa,yn].join("_");for(cr=0;cr0?wo.bottom-ys:0,$o))));var cu=0,Kl=0;if(Qe._shiftPusher&&(cu=Math.max($o,wo.height>0?Qo==="l"?ys-wo.left:wo.right-ys:0),Qe.title.text!==bt._dfltTitle[Qt]&&(Kl=(Qe._titleStandoff||0)+(Qe._titleScoot||0),Qo==="l"&&(Kl+=ka(Qe))),Qe._fullDepth=Math.max(cu,Kl)),Qe.automargin){go={x:0,y:0,r:0,l:0,t:0,b:0};var Wu=[0,1],Yu=typeof Qe._shift=="number"?Qe._shift:0;if(Qt==="x"){if(Qo==="b"?go[Qo]=Qe._depth:(go[Qo]=Qe._depth=Math.max(wo.width>0?ys-wo.top:0,$o),Wu.reverse()),wo.width>0){var rc=wo.right-(Qe._offset+Qe._length);rc>0&&(go.xr=1,go.r=rc);var ac=Qe._offset-wo.left;ac>0&&(go.xl=0,go.l=ac)}}else if(Qo==="l"?(Qe._depth=Math.max(wo.height>0?ys-wo.left:0,$o),go[Qo]=Qe._depth-Yu):(Qe._depth=Math.max(wo.height>0?wo.right-ys:0,$o),go[Qo]=Qe._depth+Yu,Wu.reverse()),wo.height>0){var xc=wo.bottom-(Qe._offset+Qe._length);xc>0&&(go.yb=0,go.b=xc);var Ec=Qe._offset-wo.top;Ec>0&&(go.yt=1,go.t=Ec)}go[br]=Qe.anchor==="free"?Qe.position:Qe._anchorAxis.domain[Wu[0]],Qe.title.text!==bt._dfltTitle[Qt]&&(go[Qo]+=ka(Qe)+(Qe.title.standoff||0)),Qe.mirror&&Qe.anchor!=="free"&&(rs={x:0,y:0,r:0,l:0,t:0,b:0},rs[Gl]=Qe.linewidth,Qe.mirror&&Qe.mirror!==!0&&(rs[Gl]+=$o),Qe.mirror===!0||Qe.mirror==="ticks"?rs[br]=Qe._anchorAxis.domain[Wu[1]]:(Qe.mirror==="all"||Qe.mirror==="allticks")&&(rs[br]=[Qe._counterDomainMin,Qe._counterDomainMax][Wu[1]]))}ml&&($l=S.getComponentMethod("rangeslider","autoMarginOpts")(it,Qe)),typeof Qe.automargin=="string"&&(Ft(go,Qe.automargin),Ft(rs,Qe.automargin)),w.autoMargin(it,Gn(Qe),go),w.autoMargin(it,Pn(Qe),rs),w.autoMargin(it,sn(Qe),$l)}),l.syncOrAsync(is)}};function Ft(it,Qe){if(it){var Jt=Object.keys(Y).reduce(function(Yt,ar){return Qe.indexOf(ar)!==-1&&Y[ar].forEach(function(cr){Yt[cr]=1}),Yt},{});Object.keys(it).forEach(function(Yt){Jt[Yt]||(Yt.length===1?it[Yt]=0:delete it[Yt])})}}function St(it,Qe){var Jt=[],Yt,ar=function(cr,tr){var Je=cr.xbnd[tr];Je!==null&&Jt.push(l.extendFlat({},cr,{x:Je}))};if(Qe.length){for(Yt=0;Ytit.range[1],Je=it.ticklabelposition&&it.ticklabelposition.indexOf("inside")!==-1,bt=!Je;if(Jt){var qt=tr?-1:1;Jt=Jt*qt}if(Yt){var Qt=it.side,br=Je&&(Qt==="top"||Qt==="left")||bt&&(Qt==="bottom"||Qt==="right")?1:-1;Yt=Yt*br}return it._id.charAt(0)==="x"?function(Ir){return e(ar+it._offset+it.l2p($r(Ir))+Jt,cr+Yt)}:function(Ir){return e(cr+Yt,ar+it._offset+it.l2p($r(Ir))+Jt)}};function $r(it){return it.periodX!==void 0?it.periodX:it.x}function pa(it){var Qe=it.ticklabelposition||"",Jt=it.tickson||"",Yt=function(Mr){return Qe.indexOf(Mr)!==-1},ar=Yt("top"),cr=Yt("left"),tr=Yt("right"),Je=Yt("bottom"),bt=Yt("inside"),qt=Jt!=="boundaries"&&(Je||cr||ar||tr);if(!qt&&!bt)return[0,0];var Qt=it.side,br=qt?(it.tickwidth||0)/2:0,Ir=K,Cr=it.tickfont?it.tickfont.size:12;return(Je||ar)&&(br+=Cr*ae,Ir+=(it.linewidth||0)/2),(cr||tr)&&(br+=(it.linewidth||0)/2,Ir+=K),bt&&Qt==="top"&&(Ir-=Cr*(1-ae)),(cr||ar)&&(br=-br),(Qt==="bottom"||Qt==="right")&&(Ir=-Ir),[qt?br:0,bt?Ir:0]}V.makeTickPath=function(it,Qe,Jt,Yt){Yt||(Yt={});var ar=Yt.minor;if(ar&&!it.minor)return"";var cr=Yt.len!==void 0?Yt.len:ar?it.minor.ticklen:it.ticklen,tr=it._id.charAt(0),Je=(it.linewidth||1)/2;return tr==="x"?"M0,"+(Qe+Je*Jt)+"v"+cr*Jt:"M"+(Qe+Je*Jt)+",0h"+cr*Jt},V.makeLabelFns=function(it,Qe,Jt){var Yt=it.ticklabelposition||"",ar=it.tickson||"",cr=function(Hi){return Yt.indexOf(Hi)!==-1},tr=cr("top"),Je=cr("left"),bt=cr("right"),qt=cr("bottom"),Qt=ar!=="boundaries"&&(qt||Je||tr||bt),br=cr("inside"),Ir=Yt==="inside"&&it.ticks==="inside"||!br&&it.ticks==="outside"&&ar!=="boundaries",Cr=0,Mr=0,Xr=Ir?it.ticklen:0;if(br?Xr*=-1:Qt&&(Xr=0),Ir&&(Cr+=Xr,Jt)){var Ra=l.deg2rad(Jt);Cr=Xr*Math.cos(Ra)+1,Mr=Xr*Math.sin(Ra)}it.showticklabels&&(Ir||it.showline)&&(Cr+=.2*it.tickfont.size),Cr+=(it.linewidth||1)/2*(br?-1:1);var wa={labelStandoff:Cr,labelShift:Mr},yn,fn,ri,On,ui=0,jn=it.side,oo=it._id.charAt(0),Qi=it.tickangle,Mn;if(oo==="x")Mn=!br&&jn==="bottom"||br&&jn==="top",On=Mn?1:-1,br&&(On*=-1),yn=Mr*On,fn=Qe+Cr*On,ri=Mn?1:-.2,Math.abs(Qi)===90&&(br?ri+=te:Qi===-90&&jn==="bottom"?ri=ae:Qi===90&&jn==="top"?ri=te:ri=.5,ui=te/2*(Qi/90)),wa.xFn=function(Hi){return Hi.dx+yn+ui*Hi.fontSize},wa.yFn=function(Hi){return Hi.dy+fn+Hi.fontSize*ri},wa.anchorFn=function(Hi,yo){if(Qt){if(Je)return"end";if(bt)return"start"}return!v(yo)||yo===0||yo===180?"middle":yo*On<0!==br?"end":"start"},wa.heightFn=function(Hi,yo,Bi){return yo<-60||yo>60?-.5*Bi:it.side==="top"!==br?-Bi:0};else if(oo==="y"){if(Mn=!br&&jn==="left"||br&&jn==="right",On=Mn?1:-1,br&&(On*=-1),yn=Cr,fn=Mr*On,ri=0,!br&&Math.abs(Qi)===90&&(Qi===-90&&jn==="left"||Qi===90&&jn==="right"?ri=ae:ri=.5),br){var bo=v(Qi)?+Qi:0;if(bo!==0){var so=l.deg2rad(bo);ui=Math.abs(Math.sin(so))*ae*On,ri=0}}wa.xFn=function(Hi){return Hi.dx+Qe-(yn+Hi.fontSize*ri)*On+ui*Hi.fontSize},wa.yFn=function(Hi){return Hi.dy+fn+Hi.fontSize*te},wa.anchorFn=function(Hi,yo){return v(yo)&&Math.abs(yo)===90?"middle":Mn?"end":"start"},wa.heightFn=function(Hi,yo,Bi){return it.side==="right"&&(yo*=-1),yo<-30?-Bi:yo<30?-.5*Bi:0}}return wa};function oa(it){return[it.text,it.x,it.axInfo,it.font,it.fontSize,it.fontColor].join("_")}V.drawTicks=function(it,Qe,Jt){Jt=Jt||{};var Yt=Qe._id+"tick",ar=[].concat(Qe.minor&&Qe.minor.ticks?Jt.vals.filter(function(tr){return tr.minor&&!tr.noTick}):[]).concat(Qe.ticks?Jt.vals.filter(function(tr){return!tr.minor&&!tr.noTick}):[]),cr=Jt.layer.selectAll("path."+Yt).data(ar,oa);cr.exit().remove(),cr.enter().append("path").classed(Yt,1).classed("ticks",1).classed("crisp",Jt.crisp!==!1).each(function(tr){return r.stroke(u.select(this),tr.minor?Qe.minor.tickcolor:Qe.tickcolor)}).style("stroke-width",function(tr){return n.crispRound(it,tr.minor?Qe.minor.tickwidth:Qe.tickwidth,1)+"px"}).attr("d",Jt.path).style("display",null),bi(Qe,[O]),cr.attr("transform",Jt.transFn)},V.drawGrid=function(it,Qe,Jt){if(Jt=Jt||{},Qe.tickmode!=="sync"){var Yt=Qe._id+"grid",ar=Qe.minor&&Qe.minor.showgrid,cr=ar?Jt.vals.filter(function(wa){return wa.minor}):[],tr=Qe.showgrid?Jt.vals.filter(function(wa){return!wa.minor}):[],Je=Jt.counterAxis;if(Je&&V.shouldShowZeroLine(it,Qe,Je))for(var bt=Qe.tickmode==="array",qt=0;qt=0;Mr--){var Xr=Mr?Ir:Cr;if(Xr){var Ra=Xr.selectAll("path."+Yt).data(Mr?tr:cr,oa);Ra.exit().remove(),Ra.enter().append("path").classed(Yt,1).classed("crisp",Jt.crisp!==!1),Ra.attr("transform",Jt.transFn).attr("d",Jt.path).each(function(wa){return r.stroke(u.select(this),wa.minor?Qe.minor.gridcolor:Qe.gridcolor||"#ddd")}).style("stroke-dasharray",function(wa){return n.dashStyle(wa.minor?Qe.minor.griddash:Qe.griddash,wa.minor?Qe.minor.gridwidth:Qe.gridwidth)}).style("stroke-width",function(wa){return(wa.minor?br:Qe._gw)+"px"}).style("display",null),typeof Jt.path=="function"&&Ra.attr("d",Jt.path)}}bi(Qe,[k,B])}},V.drawZeroLine=function(it,Qe,Jt){Jt=Jt||Jt;var Yt=Qe._id+"zl",ar=V.shouldShowZeroLine(it,Qe,Jt.counterAxis),cr=Jt.layer.selectAll("path."+Yt).data(ar?[{x:0,id:Qe._id}]:[]);cr.exit().remove(),cr.enter().append("path").classed(Yt,1).classed("zl",1).classed("crisp",Jt.crisp!==!1).each(function(){Jt.layer.selectAll("path").sort(function(tr,Je){return Z(tr.id,Je.id)})}),cr.attr("transform",Jt.transFn).attr("d",Jt.path).call(r.stroke,Qe.zerolinecolor||r.defaultLine).style("stroke-width",n.crispRound(it,Qe.zerolinewidth,Qe._gw||1)+"px").style("display",null),bi(Qe,[D])},V.drawLabels=function(it,Qe,Jt){Jt=Jt||{};var Yt=it._fullLayout,ar=Qe._id,cr=Qe.zerolinelayer==="above traces",tr=Jt.cls||ar+"tick",Je=Jt.vals.filter(function(Kn){return Kn.text}),bt=Jt.labelFns,qt=Jt.secondary?0:Qe.tickangle,Qt=(Qe._prevTickAngles||{})[tr],br=Jt.layer.selectAll("g."+tr).data(Qe.showticklabels?Je:[],oa),Ir=[];br.enter().append("g").classed(tr,1).append("text").attr("text-anchor","middle").each(function(Kn){var yi=u.select(this),Yi=it._promises.length;yi.call(t.positionText,bt.xFn(Kn),bt.yFn(Kn)).call(n.font,{family:Kn.font,size:Kn.fontSize,color:Kn.fontColor,weight:Kn.fontWeight,style:Kn.fontStyle,variant:Kn.fontVariant,textcase:Kn.fontTextcase,lineposition:Kn.fontLineposition,shadow:Kn.fontShadow}).text(Kn.text).call(t.convertToTspans,it),it._promises[Yi]?Ir.push(it._promises.pop().then(function(){Cr(yi,qt)})):Cr(yi,qt)}),bi(Qe,[q]),br.exit().remove(),Jt.repositionOnUpdate&&br.each(function(Kn){u.select(this).select("text").call(t.positionText,bt.xFn(Kn),bt.yFn(Kn))});function Cr(Kn,yi){Kn.each(function(Yi){var zi=u.select(this),Uo=zi.select(".text-math-group"),Co=bt.anchorFn(Yi,yi),Wo=Jt.transFn.call(zi.node(),Yi)+(v(yi)&&+yi!=0?" rotate("+yi+","+bt.xFn(Yi)+","+(bt.yFn(Yi)-Yi.fontSize/2)+")":""),Go=t.lineCount(zi),ns=U*Yi.fontSize,Ro=bt.heightFn(Yi,v(yi)?+yi:0,(Go-1)*ns);if(Ro&&(Wo+=e(0,Ro)),Uo.empty()){var Zi=zi.select("text");Zi.attr({transform:Wo,"text-anchor":Co}),Zi.style("display",null),Qe._adjustTickLabelsOverflow&&Qe._adjustTickLabelsOverflow()}else{var ls=n.bBox(Uo.node()).width,Eo=ls*{end:-.5,start:.5}[Co];Uo.attr("transform",Wo+e(Eo,0))}})}Qe._adjustTickLabelsOverflow=function(){var Kn=Qe.ticklabeloverflow;if(!(!Kn||Kn==="allow")){var yi=Kn.indexOf("hide")!==-1,Yi=Qe._id.charAt(0)==="x",zi=0,Uo=Yi?it._fullLayout.width:it._fullLayout.height;if(Kn.indexOf("domain")!==-1){var Co=l.simpleMap(Qe.range,Qe.r2l);zi=Qe.l2p(Co[0])+Qe._offset,Uo=Qe.l2p(Co[1])+Qe._offset}var Wo=Math.min(zi,Uo),Go=Math.max(zi,Uo),ns=Qe.side,Ro=1/0,Zi=-1/0;br.each(function(Zs){var qo=u.select(this),Ds=qo.select(".text-math-group");if(Ds.empty()){var Us=n.bBox(qo.node()),is=0;Yi?(Us.right>Go||Us.leftGo||Us.top+(Qe.tickangle?0:Zs.fontSize/4)Qe["_visibleLabelMin_"+Co._id]?qo.style("display","none"):Go.K==="tick"&&!Wo&&qo.node().style.display!=="none"&&qo.style("display",null)})})})})},Cr(br,Qt+1?Qt:qt);function Mr(){return Ir.length&&Promise.all(Ir)}var Xr=null;function Ra(){if(Cr(br,qt),Je.length&&Qe.autotickangles&&(Qe.type!=="log"||String(Qe.dtick).charAt(0)!=="D")){Xr=Qe.autotickangles[0];var Kn=0,yi=[],Yi,zi=1;br.each(function(go){Kn=Math.max(Kn,go.fontSize);var rs=Qe.l2p(go.x),$l=xa(this),cu=n.bBox($l.node());zi=Math.max(zi,t.lineCount($l)),yi.push({top:0,bottom:10,height:10,left:rs-cu.width/2,right:rs+cu.width/2+2,width:cu.width+2})});var Uo=(Qe.tickson==="boundaries"||Qe.showdividers)&&!Jt.secondary,Co=Je.length,Wo=Math.abs((Je[Co-1].x-Je[0].x)*Qe._m)/(Co-1),Go=Uo?Wo/2:Wo,ns=Uo?Qe.ticklen:Kn*1.25*zi,Ro=Math.sqrt(Math.pow(Go,2)+Math.pow(ns,2)),Zi=Go/Ro,ls=Qe.autotickangles.map(function(go){return go*Math.PI/180}),Eo=ls.find(function(go){return Math.abs(Math.cos(go))<=Zi});Eo===void 0&&(Eo=ls.reduce(function(go,rs){return Math.abs(Math.cos(go))fo*Bi&&(so=Bi,Qi[oo]=Mn[oo]=Hi[oo])}var Po=Math.abs(so-bo);Po-On>0?(Po-=On,On*=1+On/Po):On=0,Qe._id.charAt(0)!=="y"&&(On=-On),Qi[jn]=fn.p2r(fn.r2p(Mn[jn])+ui*On),fn.autorange==="min"||fn.autorange==="max reversed"?(Qi[0]=null,fn._rangeInitial0=void 0,fn._rangeInitial1=void 0):(fn.autorange==="max"||fn.autorange==="min reversed")&&(Qi[1]=null,fn._rangeInitial0=void 0,fn._rangeInitial1=void 0),Yt._insideTickLabelsUpdaterange[fn._name+".range"]=Qi}var po=l.syncOrAsync(wa);return po&&po.then&&it._promises.push(po),po};function aa(it,Qe,Jt){var Yt=Qe._id+"divider",ar=Jt.vals,cr=Jt.layer.selectAll("path."+Yt).data(ar,oa);cr.exit().remove(),cr.enter().insert("path",":first-child").classed(Yt,1).classed("crisp",1).call(r.stroke,Qe.dividercolor).style("stroke-width",n.crispRound(it,Qe.dividerwidth,1)+"px"),cr.attr("transform",Jt.transFn).attr("d",Jt.path)}V.getPxPosition=function(it,Qe){var Jt=it._fullLayout._size,Yt=Qe._id.charAt(0),ar=Qe.side,cr;if(Qe.anchor!=="free"?cr=Qe._anchorAxis:Yt==="x"?cr={_offset:Jt.t+(1-(Qe.position||0))*Jt.h,_length:0}:Yt==="y"&&(cr={_offset:Jt.l+(Qe.position||0)*Jt.w+Qe._shift,_length:0}),ar==="top"||ar==="left")return cr._offset;if(ar==="bottom"||ar==="right")return cr._offset+cr._length};function ka(it){var Qe=it.title.font.size,Jt=(it.title.text.match(t.BR_TAG_ALL)||[]).length;return it.title.hasOwnProperty("standoff")?Qe*(ae+Jt*U):Jt?Qe*(Jt+1)*U:Qe}function Ta(it,Qe){var Jt=it._fullLayout,Yt=Qe._id,ar=Yt.charAt(0),cr=Qe.title.font.size,tr,Je=(Qe.title.text.match(t.BR_TAG_ALL)||[]).length;if(Qe.title.hasOwnProperty("standoff"))Qe.side==="bottom"||Qe.side==="right"?tr=Qe._depth+Qe.title.standoff+cr*ae:(Qe.side==="top"||Qe.side==="left")&&(tr=Qe._depth+Qe.title.standoff+cr*(te+Je*U));else{var bt=mn(Qe);if(Qe.type==="multicategory")tr=Qe._depth;else{var qt=1.5*cr;bt&&(qt=.5*cr,Qe.ticks==="outside"&&(qt+=Qe.ticklen)),tr=10+qt+(Qe.linewidth?Qe.linewidth-1:0)}bt||(ar==="x"?tr+=Qe.side==="top"?cr*(Qe.showticklabels?1:0):cr*(Qe.showticklabels?1.5:.5):tr+=Qe.side==="right"?cr*(Qe.showticklabels?1:.5):cr*(Qe.showticklabels?.5:0))}var Qt=V.getPxPosition(it,Qe),br,Ir,Cr;ar==="x"?(Ir=Qe._offset+Qe._length/2,Cr=Qe.side==="top"?Qt-tr:Qt+tr):(Cr=Qe._offset+Qe._length/2,Ir=Qe.side==="right"?Qt+tr:Qt-tr,br={rotate:"-90",offset:0});var Mr;if(Qe.type!=="multicategory"){var Xr=Qe._selections[Qe._id+"tick"];if(Mr={selection:Xr,side:Qe.side},Xr&&Xr.node()&&Xr.node().parentNode){var Ra=n.getTranslate(Xr.node().parentNode);Mr.offsetLeft=Ra.x,Mr.offsetTop=Ra.y}Qe.title.hasOwnProperty("standoff")&&(Mr.pad=0)}return Qe._titleStandoff=tr,a.draw(it,Yt+"title",{propContainer:Qe,propName:Qe._name+".title.text",placeholder:Jt._dfltTitle[ar],avoid:Mr,transform:br,attributes:{x:Ir,y:Cr,"text-anchor":"middle"}})}V.shouldShowZeroLine=function(it,Qe,Jt){var Yt=l.simpleMap(Qe.range,Qe.r2l);return Yt[0]*Yt[1]<=0&&Qe.zeroline&&(Qe.type==="linear"||Qe.type==="-")&&!(Qe.rangebreaks&&Qe.maskBreaks(0)===z)&&(Da(Qe,0)||!La(it,Qe,Jt,Yt)||Ga(it,Qe))},V.clipEnds=function(it,Qe){return Qe.filter(function(Jt){return Da(it,Jt.x)})};function Da(it,Qe){var Jt=it.l2p(Qe);return Jt>1&&Jt1)for(ar=1;ar=ar.min&&it=F:/%L/.test(Qe)?it>=C:/%[SX]/.test(Qe)?it>=I:/%M/.test(Qe)?it>=_:/%[HI]/.test(Qe)?it>=b:/%p/.test(Qe)?it>=h:/%[Aadejuwx]/.test(Qe)?it>=m:/%[UVW]/.test(Qe)?it>=A:/%[Bbm]/.test(Qe)?it>=g:/%[q]/.test(Qe)?it>=M:/%[Yy]/.test(Qe)?it>=y:!0}}}),z3=De({"src/plots/cartesian/autorange_options_defaults.js"(j,N){"use strict";N.exports=function(v,w,S){var l,e;if(S){var t=w==="reversed"||w==="min reversed"||w==="max reversed";l=S[t?1:0],e=S[t?0:1]}var a=v("autorangeoptions.minallowed",e===null?l:void 0),r=v("autorangeoptions.maxallowed",l===null?e:void 0);a===void 0&&v("autorangeoptions.clipmin"),r===void 0&&v("autorangeoptions.clipmax"),v("autorangeoptions.include")}}}),B3=De({"src/plots/cartesian/range_defaults.js"(j,N){"use strict";var u=z3();N.exports=function(w,S,l,e){var t=S._template||{},a=S.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var n;!e.noInsiderange&&a!=="log"&&(n=l("insiderange"),n&&(n[0]===null||n[1]===null)&&(S.insiderange=!1,n=void 0),n&&(r=l("range",n)))}var i=S.getAutorangeDflt(r,e),s=l("autorange",i),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete S.range,S.autorange=!0,c=!0),c||(i=S.getAutorangeDflt(r,e),s=l("autorange",i)),s&&(u(l,s,r),(a==="linear"||a==="-")&&l("rangemode")),S.cleanRange()}}}),HP=De({"node_modules/mouse-event-offset/index.js"(j,N){var u={left:0,top:0};N.exports=v;function v(S,l,e){l=l||S.currentTarget||S.srcElement,Array.isArray(e)||(e=[0,0]);var t=S.clientX||0,a=S.clientY||0,r=w(l);return e[0]=t-r.left,e[1]=a-r.top,e}function w(S){return S===window||S===document||S===document.body?u:S.getBoundingClientRect()}}}),H_=De({"node_modules/has-passive-events/index.js"(j,N){"use strict";var u=k3();function v(){var w=!1;try{var S=Object.defineProperty({},"passive",{get:function(){w=!0}});window.addEventListener("test",null,S),window.removeEventListener("test",null,S)}catch{w=!1}return w}N.exports=u&&v()}}),WP=De({"src/components/dragelement/align.js"(j,N){"use strict";N.exports=function(v,w,S,l,e){var t=(v-S)/(l-S),a=t+w/(l-S),r=(t+a)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?a:t<2/3-r?t:a>4/3-r?a:r}}}),YP=De({"src/components/dragelement/cursor.js"(j,N){"use strict";var u=Ar(),v=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];N.exports=function(S,l,e,t){return e==="left"?S=0:e==="center"?S=1:e==="right"?S=2:S=u.constrain(Math.floor(S*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=u.constrain(Math.floor(l*3),0,2),v[l][S]}}}),XP=De({"src/components/dragelement/unhover.js"(j,N){"use strict";var u=cm(),v=q_(),w=_1().getGraphDiv,S=p1(),l=N.exports={};l.wrapped=function(e,t,a){e=w(e),e._fullLayout&&v.clear(e._fullLayout._uid+S.HOVERID),l.raw(e,t,a)},l.raw=function(t,a){var r=t._fullLayout,n=t._hoverdata;a||(a={}),!(a.target&&!t._dragged&&u.triggerHandler(t,"plotly_beforehover",a)===!1)&&(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,a.target&&n&&t.emit("plotly_unhover",{event:a,points:n}))}}}),dh=De({"src/components/dragelement/index.js"(j,N){"use strict";var u=HP(),v=C3(),w=H_(),S=Ar().removeElement,l=gc(),e=N.exports={};e.align=WP(),e.getCursor=YP();var t=XP();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(i){var s=i.gd,c=1,p=s._context.doubleClickDelay,f=i.element,d,y,o,x,M,T,E,g;s._mouseDownTime||(s._mouseDownTime=0),f.style.pointerEvents="all",f.onmousedown=h,w?(f._ontouchstart&&f.removeEventListener("touchstart",f._ontouchstart),f._ontouchstart=h,f.addEventListener("touchstart",h,{passive:!1})):f.ontouchstart=h;function A(I,C,F){return Math.abs(I)"u"&&typeof I.clientY>"u"&&(I.clientX=d,I.clientY=y),o=new Date().getTime(),o-s._mouseDownTimep&&(c=Math.max(c-1,1)),s._dragged)i.doneFn&&i.doneFn();else{var C;T.target===E?C=T:(C={target:E,srcElement:E,toElement:E},Object.keys(T).concat(Object.keys(T.__proto__)).forEach(F=>{var R=T[F];!C[F]&&typeof R!="function"&&(C[F]=R)})),i.clickFn&&i.clickFn(c,C),g||E.dispatchEvent(new MouseEvent("click",I))}s._dragging=!1,s._dragged=!1}};function a(){var n=document.createElement("div");n.className="dragcover";var i=n.style;return i.position="fixed",i.left=0,i.right=0,i.top=0,i.bottom=0,i.zIndex=999999999,i.background="none",document.body.appendChild(n),n}e.coverSlip=a;function r(n){return u(n.changedTouches?n.changedTouches[0]:n,document.body)}}}),ld=De({"src/lib/setcursor.js"(j,N){"use strict";N.exports=function(v,w){(v.attr("class")||"").split(" ").forEach(function(S){S.indexOf("cursor-")===0&&v.classed(S,!1)}),w&&v.classed("cursor-"+w,!0)}}}),ZP=De({"src/lib/override_cursor.js"(j,N){"use strict";var u=ld(),v="data-savedcursor",w="!!";N.exports=function(l,e){var t=l.attr(v);if(e){if(!t){for(var a=(l.attr("class")||"").split(" "),r=0;rH.legend.length)for(var $=H.legend.length;$(r==="legend"?1:0));if(F===!1&&(i[r]=void 0),!(F===!1&&!p.uirevision)&&(d("uirevision",i.uirevision),F!==!1)){d("borderwidth");var R=d("orientation"),z=d("yref"),D=d("xref"),k=R==="h",B=z==="paper",O=D==="paper",q,Y,ee,te="left";k?(q=0,u.getComponentMethod("rangeslider","isVisible")(n.xaxis)?B?(Y=1.1,ee="bottom"):(Y=1,ee="top"):B?(Y=-.1,ee="top"):(Y=0,ee="bottom")):(Y=1,ee="auto",O?q=1.02:(q=1,te="right")),v.coerce(p,f,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:q}},"x"),v.coerce(p,f,{y:{valType:"number",editType:"legend",min:B?-2:0,max:B?3:1,dflt:Y}},"y"),d("traceorder",m),t.isGrouped(i[r])&&d("tracegroupgap"),d("entrywidth"),d("entrywidthmode"),d("indentation"),d("itemsizing"),d("itemwidth"),d("itemclick"),d("itemdoubleclick"),d("groupclick"),d("xanchor",te),d("yanchor",ee),d("maxheight"),d("valign"),v.noneOrAll(p,f,["x","y"]);var ae=d("title.text");if(ae){d("title.side",k?"left":"top");var U=v.extendFlat({},y,{size:v.bigFont(y.size)});v.coerceFont(d,"title.font",U);let H=c>1;d("titleclick",H?"toggle":!1),d("titledoubleclick",H?"toggleothers":!1)}}}N.exports=function(n,i,s){var c,p=s.slice(),f=i.shapes;if(f)for(c=0;cqe.showlegend||qe.legendgroup);var y=f.concat(d),o=i.trace;o._isShape&&(o=n.shapes[o.index]);var x=o.legendgroup,M,T,E,g,A,m,h={},b=[],_=[],I=[];function C(qe,Ue){var xe=b.indexOf(qe),he=h.visible;return he||(he=h.visible=[]),b.indexOf(qe)===-1&&(b.push(qe),xe=b.length-1),he[xe]=Ue,xe}var F=(n.shapes||[]).map(function(qe){return qe._input}),R=!1;function z(qe,Ue){F[qe].visible=Ue,R=!0}function D(qe,Ue){if(!(i.groupTitle&&!c)){var xe=qe._isShape,he=qe.index;he===void 0&&(he=qe._index);var oe=qe.visible===!1?!1:Ue;xe?z(he,oe):C(he,oe)}}var k=o.legend;if(!o._isShape&&N.traceIs(o,"pie-like")){var B=i.label,O=p.indexOf(B);if(r==="toggle")O===-1?p.push(B):p.splice(O,1);else if(r==="toggleothers"){var q=O!==-1,Y=[];for(M=0;ME.showlegend||E.legendgroup),c=n.concat(s);function p(E){return(E.legend||"legend")===i}var f,d;if(a==="toggle")f=!c.some(function(g){return p(g)&&g.visible===!0}),d=!1;else{let E=c.some(function(g){return!p(g)&&g.visible===!0&&g.showlegend!==!1});f=!0,d=!E}let y={visible:[]},o=[],x=(r.shapes||[]).map(function(E){return E._input});for(var M=!1,T=0;Tz&&(F=z)}I[y][0]._groupMinRank=F,I[y][0]._preGroupSort=y}var D=function(ee,te){return ee[0]._groupMinRank-te[0]._groupMinRank||ee[0]._preGroupSort-te[0]._preGroupSort},k=function(ee,te){var ae=u(ee.trace.legendrank)?ee.trace.legendrank[ee.i]:ee.trace.legendrank,U=u(te.trace.legendrank)?te.trace.legendrank[te.i]:te.trace.legendrank;return ae-U||ee._preSort-te._preSort};for(I.forEach(function(ee,te){ee[0]._preGroupSort=te}),I.sort(D),y=0;y0)$=H.width;else return 0;return m?V:Math.min($,K)};T.each(function(U){var H=u.select(this),K=w.ensureSingle(H,"g","layers");K.style("opacity",U[0].trace.opacity);var V=g.indentation,$=g.valign,X=U[0].lineHeight,Z=U[0].height;if($==="middle"&&V===0||!X||!Z)K.attr("transform",null);else{var Q={top:1,bottom:-1}[$],re=Q*(.5*(X-Z+3))||0,ce=g.indentation;K.attr("transform",S(ce,re))}var me=K.selectAll("g.legendfill").data([U]);me.enter().append("g").classed("legendfill",!0);var ye=K.selectAll("g.legendlines").data([U]);ye.enter().append("g").classed("legendlines",!0);var Ae=K.selectAll("g.legendsymbols").data([U]);Ae.enter().append("g").classed("legendsymbols",!0),Ae.selectAll("g.legendpoints").data([U]).enter().append("g").classed("legendpoints",!0)}).each(ae).each(R).each(D).each(z).each(B).each(ee).each(Y).each(C).each(F).each(O).each(q);function C(U){var H=o(U),K=H.showFill,V=H.showLine,$=H.showGradientLine,X=H.showGradientFill,Z=H.anyFill,Q=H.anyLine,re=U[0],ce=re.trace,me,ye,Ae=t(ce),Se=Ae.colorscale,Ce=Ae.reversescale,qe=function(be){if(be.size())if(K)l.fillGroupStyle(be,E,!0);else{var Fe="legendfill-"+ce.uid;l.gradient(be,E,Fe,y(Ce),Se,"fill")}},Ue=function(be){if(be.size()){var Fe="legendline-"+ce.uid;l.lineGroupStyle(be),l.gradient(be,E,Fe,y(Ce),Se,"stroke")}},xe=a.hasMarkers(ce)||!Z?"M5,0":Q?"M5,-2":"M5,-3",he=u.select(this),oe=he.select(".legendfill").selectAll("path").data(K||X?[U]:[]);if(oe.enter().append("path").classed("js-fill",!0),oe.exit().remove(),oe.attr("d",xe+"h"+h+"v6h-"+h+"z").call(qe),V||$){var le=I(void 0,ce.line,f,c);ye=w.minExtend(ce,{line:{width:le}}),me=[w.minExtend(re,{trace:ye})]}var ne=he.select(".legendlines").selectAll("path").data(V||$?[me]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",xe+($?"l"+h+",0.0001":"h"+h)).call(V?l.lineGroupStyle:Ue)}function F(U){var H=o(U),K=H.anyFill,V=H.anyLine,$=H.showLine,X=H.showMarker,Z=U[0],Q=Z.trace,re=!X&&!V&&!K&&a.hasText(Q),ce,me;function ye(le,ne,be,Fe){var Ve=w.nestedProperty(Q,le).get(),je=w.isArrayOrTypedArray(Ve)&&ne?ne(Ve):Ve;if(m&&je&&Fe!==void 0&&(je=Fe),be){if(jebe[1])return be[1]}return je}function Ae(le){return Z._distinct&&Z.index&&le[Z.index]?le[Z.index]:le[0]}if(X||re||$){var Se={},Ce={};if(X){Se.mc=ye("marker.color",Ae);var qe=Q.type==="scattermap";Se.mx=qe?"circle":ye("marker.symbol",Ae),Se.mo=ye("marker.opacity",w.mean,[.2,1]),Se.mlc=ye("marker.line.color",Ae),Se.mlw=ye("marker.line.width",w.mean,[0,5],p),Se.mld=ye("marker.line.dash",Ae),Ce.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Ue=ye("marker.size",w.mean,[2,16],s);Se.ms=Ue,Ce.marker.size=Ue}$&&(Ce.line={width:ye("line.width",Ae,[0,10],c)}),re&&(Se.tx="Aa",Se.tp=ye("textposition",Ae),Se.ts=10,Se.tc=ye("textfont.color",Ae),Se.tf=ye("textfont.family",Ae),Se.tw=ye("textfont.weight",Ae),Se.ty=ye("textfont.style",Ae),Se.tv=ye("textfont.variant",Ae),Se.tC=ye("textfont.textcase",Ae),Se.tE=ye("textfont.lineposition",Ae),Se.tS=ye("textfont.shadow",Ae)),ce=[w.minExtend(Z,Se)],me=w.minExtend(Q,Ce),me.selectedpoints=null,me.texttemplate=null}var xe=u.select(this).select("g.legendpoints"),he=xe.selectAll("path.scatterpts").data(X?ce:[]);he.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",_),he.exit().remove(),he.call(l.pointStyle,me,E),X&&(ce[0].mrc=3);var oe=xe.selectAll("g.pointtext").data(re?ce:[]);oe.enter().append("g").classed("pointtext",!0).append("text").attr("transform",_),oe.exit().remove(),oe.selectAll("text").call(l.textPointStyle,me,E)}function R(U){var H=U[0].trace,K=H.type==="waterfall";if(U[0]._distinct&&K){var V=U[0].trace[U[0].dir].marker;return U[0].mc=V.color,U[0].mlw=V.line.width,U[0].mlc=V.line.color,k(U,this,"waterfall")}var $=[];H.visible&&K&&($=U[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 X=u.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data($);X.enter().append("path").classed("legendwaterfall",!0).attr("transform",_).style("stroke-miterlimit",1),X.exit().remove(),X.each(function(Z){var Q=u.select(this),re=H[Z[0]].marker,ce=I(void 0,re.line,d,p);Q.attr("d",Z[1]).style("stroke-width",ce+"px").call(e.fill,re.color),ce&&Q.call(e.stroke,re.line.color)})}function z(U){k(U,this)}function D(U){k(U,this,"funnel")}function k(U,H,K){var V=U[0].trace,$=V.marker||{},X=$.line||{},Z=$.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Q=K?V.visible&&V.type===K:v.traceIs(V,"bar"),re=u.select(H).select("g.legendpoints").selectAll("path.legend"+K).data(Q?[U]:[]);re.enter().append("path").classed("legend"+K,!0).attr("d",Z).attr("transform",_),re.exit().remove(),re.each(function(ce){var me=u.select(this),ye=ce[0],Ae=I(ye.mlw,$.line,d,p);me.style("stroke-width",Ae+"px");var Se=ye.mcc;if(!g._inHover&&"mc"in ye){var Ce=t($),qe=Ce.mid;qe===void 0&&(qe=(Ce.max+Ce.min)/2),Se=l.tryColorscale($,"")(qe)}var Ue=Se||ye.mc||$.color,xe=$.pattern,he=l.getPatternAttr,oe=xe&&(he(xe.shape,0,"")||he(xe.path,0,""));if(oe){var le=he(xe.bgcolor,0,null),ne=he(xe.fgcolor,0,null),be=xe.fgopacity,Fe=x(xe.size,8,10),Ve=x(xe.solidity,.5,1),je="legend-"+V.uid;me.call(l.pattern,"legend",E,je,oe,Fe,Ve,Se,xe.fillmode,le,ne,be)}else me.call(e.fill,Ue);Ae&&e.stroke(me,ye.mlc||X.color)})}function B(U){var H=U[0].trace,K=u.select(this).select("g.legendpoints").selectAll("path.legendbox").data(H.visible&&v.traceIs(H,"box-violin")?[U]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),K.exit().remove(),K.each(function(){var V=u.select(this);if((H.boxpoints==="all"||H.points==="all")&&e.opacity(H.fillcolor)===0&&e.opacity((H.line||{}).color)===0){var $=w.minExtend(H,{marker:{size:m?s:w.constrain(H.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,$,E)}else{var X=I(void 0,H.line,d,p);V.style("stroke-width",X+"px").call(e.fill,H.fillcolor),X&&e.stroke(V,H.line.color)}})}function O(U){var H=U[0].trace,K=u.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(H.visible&&H.type==="candlestick"?[U,U]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(V,$){return $?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",_).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(V,$){var X=u.select(this),Z=H[$?"increasing":"decreasing"],Q=I(void 0,Z.line,d,p);X.style("stroke-width",Q+"px").call(e.fill,Z.fillcolor),Q&&e.stroke(X,Z.line.color)})}function q(U){var H=U[0].trace,K=u.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(H.visible&&H.type==="ohlc"?[U,U]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(V,$){return $?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",_).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(V,$){var X=u.select(this),Z=H[$?"increasing":"decreasing"],Q=I(void 0,Z.line,d,p);X.style("fill","none").call(l.dashLine,Z.line.dash,Q),Q&&e.stroke(X,Z.line.color)})}function Y(U){te(U,this,"pie")}function ee(U){te(U,this,"funnelarea")}function te(U,H,K){var V=U[0],$=V.trace,X=K?$.visible&&$.type===K:v.traceIs($,K),Z=u.select(H).select("g.legendpoints").selectAll("path.legend"+K).data(X?[U]:[]);if(Z.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",_),Z.exit().remove(),Z.size()){var Q=$.marker||{},re=I(n(Q.line.width,V.pts),Q.line,d,p),ce="pieLike",me=w.minExtend($,{marker:{line:{width:re}}},ce),ye=w.minExtend(V,{trace:me},ce);r(Z,ye,me,E)}}function ae(U){var H=U[0].trace,K,V=[];if(H.visible)switch(H.type){case"histogram2d":case"heatmap":V=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":V=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":V=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":V=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],K=!1;break;case"streamtube":V=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],K=!1;break;case"surface":V=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],K=!0;break;case"mesh3d":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":V=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var $=u.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(V);$.enter().append("path").classed("legend3dandfriends",!0).attr("transform",_).style("stroke-miterlimit",1),$.exit().remove(),$.each(function(X,Z){var Q=u.select(this),re=t(H),ce=re.colorscale,me=re.reversescale,ye=function(qe){if(qe.size()){var Ue="legendfill-"+H.uid;l.gradient(qe,E,Ue,y(me,K==="radial"),ce,"fill")}},Ae;if(ce){if(!K){var Ce=ce.length;Ae=Z===0?ce[me?Ce-1:0][1]:Z===1?ce[me?0:Ce-1][1]:ce[Math.floor((Ce-1)/2)][1]}}else{var Se=H.vertexcolor||H.facecolor||H.color;Ae=w.isArrayOrTypedArray(Se)?Se[Z]||Se[0]:Se}Q.attr("d",X[0]),Ae?Q.call(e.fill,Ae):Q.call(ye)})}};function y(M,T){var E=T?"radial":"horizontal";return E+(M?"":"reversed")}function o(M){var T=M[0].trace,E=T.contours,g=a.hasLines(T)||T.visible&&T.type==="quiver",A=a.hasMarkers(T),m=T.visible&&T.fill&&T.fill!=="none",h=!1,b=!1;if(E){var _=E.coloring;_==="lines"?h=!0:g=_==="none"||_==="heatmap"||E.showlines,E.type==="constraint"?m=E._operation!=="=":(_==="fill"||_==="heatmap")&&(b=!0)}return{showMarker:A,showLine:g,showFill:m,showGradientLine:h,showGradientFill:b,anyLine:g||h,anyFill:m||b}}function x(M,T,E){return M&&w.isArrayOrTypedArray(M)?T:M>E?E:M}}}),G3=De({"src/components/legend/draw.js"(j,N){"use strict";var u=Qn(),v=Ar(),w=Il(),S=hi(),l=cm(),e=dh(),t=Ki(),a=ii(),r=Xs(),n=j3().handleItemClick,i=j3().handleTitleClick,s=U3(),c=yc(),p=c.LINE_SPACING,f=c.FROM_TL,d=c.FROM_BR,y=$P(),o=q3(),x=T1(),M=1,T=/^legend[0-9]*$/;N.exports=function(q,Y){if(Y)g(q,Y);else{var ee=q._fullLayout,te=ee._legends,ae=ee._infolayer.selectAll('[class^="legend"]');ae.each(function(){var V=u.select(this),$=V.attr("class"),X=$.split(" ")[0];X.match(T)&&te.indexOf(X)===-1&&V.remove()});for(var U=0;U1)}var re=ee.hiddenlabels||[];if(!H&&(!ee.showlegend||!K.length))return U.selectAll("."+te).remove(),ee._topdefs.select("#"+ae).remove(),w.autoMargin(O,te);var ce=v.ensureSingle(U,"g",te,function(he){H||he.attr("pointer-events","all")}),me=v.ensureSingleById(ee._topdefs,"clipPath",ae,function(he){he.append("rect")}),ye=v.ensureSingle(ce,"rect","bg",function(he){he.attr("shape-rendering","crispEdges")});ye.call(a.stroke,Y.bordercolor).call(a.fill,Y.bgcolor).style("stroke-width",Y.borderwidth+"px");var Ae=v.ensureSingle(ce,"g","scrollbox"),Se=Y.title;Y._titleWidth=0,Y._titleHeight=0;var Ce;Se.text?(Ce=v.ensureSingle(Ae,"text",te+"titletext"),Ce.attr("text-anchor","start").call(t.font,Se.font).text(Se.text),C(Ce,Ae,O,Y,M),!H&&(Y.titleclick||Y.titledoubleclick)&&I(Ae,O,Y,te)):(Ae.selectAll("."+te+"titletext").remove(),Ae.selectAll("."+te+"titletoggle").remove());var qe=v.ensureSingle(ce,"rect","scrollbar",function(he){he.attr(s.scrollBarEnterAttrs).call(a.fill,s.scrollBarColor)}),Ue=Ae.selectAll("g.groups").data(K);Ue.enter().append("g").attr("class","groups"),Ue.exit().remove();var xe=Ue.selectAll("g.traces").data(v.identity);xe.enter().append("g").attr("class","traces"),xe.exit().remove(),xe.style("opacity",function(he){let oe=he[0],le=oe.trace;if(oe.groupTitle){let ne=le.legendgroup,be=(ee.shapes||[]).filter(function(Ve){return Ve.showlegend});return O._fullData.concat(be).some(function(Ve){return Ve.legendgroup===ne&&(Ve.legend||"legend")===te&&Ve.visible===!0})?1:.5}return S.traceIs(le,"pie-like")?re.indexOf(he[0].label)!==-1?.5:1:le.visible==="legendonly"?.5:1}).each(function(){u.select(this).call(h,O,Y)}).call(o,O,Y).each(function(he){H||he[0].groupTitle&&Y.groupclick==="toggleitem"||u.select(this).call(_,O,te)}),v.syncOrAsync([w.previousPromises,function(){return z(O,Ue,xe,Y,Ae)},function(){var he=ee._size,oe=Y.borderwidth,le=Y.xref==="paper",ne=Y.yref==="paper";if(Se.text){let ft=(ee.shapes||[]).filter(function(gt){return gt.showlegend}),ht=O._fullData.concat(ft).some(function(gt){let _t=gt.legend||"legend";var Ft=Array.isArray(_t)?_t.includes(te):_t===te;return Ft&>.visible===!0});Ce.style("opacity",ht?1:.5)}if(!H){var be,Fe;le?be=he.l+he.w*Y.x-f[k(Y)]*Y._width:be=ee.width*Y.x-f[k(Y)]*Y._width,ne?Fe=he.t+he.h*(1-Y.y)-f[B(Y)]*Y._effHeight:Fe=ee.height*(1-Y.y)-f[B(Y)]*Y._effHeight;var Ve=D(O,te,be,Fe);if(Ve)return;if(ee.margin.autoexpand){var je=be,ut=Fe;be=le?v.constrain(be,0,ee.width-Y._width):je,Fe=ne?v.constrain(Fe,0,ee.height-Y._effHeight):ut,be!==je&&v.log("Constrain "+te+".x to make legend fit inside graph"),Fe!==ut&&v.log("Constrain "+te+".y to make legend fit inside graph")}t.setTranslate(ce,be,Fe)}if(qe.on(".drag",null),ce.on("wheel",null),H||Y._height<=Y._maxHeight||O._context.staticPlot){var st=Y._effHeight;H&&(st=Y._height),ye.attr({width:Y._width-oe,height:st-oe,x:oe/2,y:oe/2}),t.setTranslate(Ae,0,0),me.select("rect").attr({width:Y._width-2*oe,height:st-2*oe,x:oe,y:oe}),t.setClipUrl(Ae,ae,O),t.setRect(qe,0,0,0,0),delete Y._scrollY}else{var yt=Math.max(s.scrollBarMinHeight,Y._effHeight*Y._effHeight/Y._height),At=Y._effHeight-yt-2*s.scrollBarMargin,Pt=Y._height-Y._effHeight,Zt=At/Pt,vr=Math.min(Y._scrollY||0,Pt);ye.attr({width:Y._width-2*oe+s.scrollBarWidth+s.scrollBarMargin,height:Y._effHeight-oe,x:oe/2,y:oe/2}),me.select("rect").attr({width:Y._width-2*oe+s.scrollBarWidth+s.scrollBarMargin,height:Y._effHeight-2*oe,x:oe,y:oe+vr}),t.setClipUrl(Ae,ae,O),Ie(vr,yt,Zt),ce.on("wheel",function(){vr=v.constrain(Y._scrollY+u.event.deltaY/Pt*At,0,Pt),Ie(vr,yt,Zt),vr!==0&&vr!==Pt&&u.event.preventDefault()});var Nt,Kt,nt,Ee=function(ft,ht,gt){var _t=(gt-ht)/Zt+ft;return v.constrain(_t,0,Pt)},ze=function(ft,ht,gt){var _t=(ht-gt)/Zt+ft;return v.constrain(_t,0,Pt)},ve=u.behavior.drag().on("dragstart",function(){var ft=u.event.sourceEvent;ft.type==="touchstart"?Nt=ft.changedTouches[0].clientY:Nt=ft.clientY,nt=vr}).on("drag",function(){var ft=u.event.sourceEvent;ft.buttons===2||ft.ctrlKey||(ft.type==="touchmove"?Kt=ft.changedTouches[0].clientY:Kt=ft.clientY,vr=Ee(nt,Nt,Kt),Ie(vr,yt,Zt))});qe.call(ve);var _e=u.behavior.drag().on("dragstart",function(){var ft=u.event.sourceEvent;ft.type==="touchstart"&&(Nt=ft.changedTouches[0].clientY,nt=vr)}).on("drag",function(){var ft=u.event.sourceEvent;ft.type==="touchmove"&&(Kt=ft.changedTouches[0].clientY,vr=ze(nt,Nt,Kt),Ie(vr,yt,Zt))});Ae.call(_e)}function Ie(ft,ht,gt){Y._scrollY=O._fullLayout[te]._scrollY=ft,t.setTranslate(Ae,0,-ft),t.setRect(qe,Y._width,s.scrollBarMargin+ft*gt,s.scrollBarWidth,ht),me.select("rect").attr("y",oe+ft)}if(O._context.edits.legendPosition){var Be,We,Xe,mt;ce.classed("cursor-move",!0),e.init({element:ce.node(),gd:O,prepFn:function(ft){if(ft.target!==qe.node()){var ht=t.getTranslate(ce);Xe=ht.x,mt=ht.y}},moveFn:function(ft,ht){if(Xe!==void 0&&mt!==void 0){var gt=Xe+ft,_t=mt+ht;t.setTranslate(ce,gt,_t),Be=e.align(gt,Y._width,he.l,he.l+he.w,Y.xanchor),We=e.align(_t+Y._height,-Y._height,he.t+he.h,he.t,Y.yanchor)}},doneFn:function(){if(Be!==void 0&&We!==void 0){var ft={};ft[te+".x"]=Be,ft[te+".y"]=We,S.call("_guiRelayout",O,ft)}},clickFn:function(ft,ht){var gt=U.selectAll("g.traces").filter(function(){var _t=this.getBoundingClientRect();return ht.clientX>=_t.left&&ht.clientX<=_t.right&&ht.clientY>=_t.top&&ht.clientY<=_t.bottom});gt.size()>0&&m(O,Y,gt,ft,ht)}})}}],O)}}function A(O,q,Y){var ee=O[0],te=ee.width,ae=q.entrywidthmode,U=ee.trace.legendwidth||q.entrywidth;return ae==="fraction"?q._maxWidth*U:Y+(U||te)}function m(O,q,Y,ee,te){var ae=O._fullLayout,U=Y.data()[0][0].trace,H=q.itemclick,K=q.itemdoubleclick,V={event:te,node:Y.node(),curveNumber:U.index,expandedIndex:U.index,data:O.data,layout:O.layout,frames:O._transitionData._frames,config:O._context,fullData:O._fullData,fullLayout:ae};U._group&&(V.group=U._group),S.traceIs(U,"pie-like")&&(V.label=Y.datum()[0].label);var $=l.triggerHandler(O,"plotly_legendclick",V);if(ee===1){if($===!1)return;q._clickTimeout=setTimeout(function(){O._fullLayout&&H&&n(Y,O,q,H)},O._context.doubleClickDelay)}else if(ee===2){q._clickTimeout&&clearTimeout(q._clickTimeout),O._legendMouseDownTime=0;var X=l.triggerHandler(O,"plotly_legenddoubleclick",V);X!==!1&&$!==!1&&K&&n(Y,O,q,K)}}function h(O,q,Y){var ee=x.getId(Y),te=O.data()[0][0],ae=te.trace,U=S.traceIs(ae,"pie-like"),H=!Y._inHover&&q._context.edits.legendText&&!U,K=Y._maxNameLength,V,$;te.groupTitle?(V=te.groupTitle.text,$=te.groupTitle.font):($=Y.font,Y.entries?V=te.text:(V=U?te.label:ae.name,ae._meta&&(V=v.templateString(V,ae._meta))));var X=v.ensureSingle(O,"text",ee+"text");X.attr("text-anchor","start").call(t.font,$).text(H?b(V,K):V);var Z=Y.indentation+Y.itemwidth+s.itemGap*2;r.positionText(X,Z,0),H?X.call(r.makeEditable,{gd:q,text:V}).call(C,O,q,Y).on("edit",function(Q){this.text(b(Q,K)).call(C,O,q,Y);var re={};return re.name=Q,te.trace._isShape?S.call("_guiRelayout",q,"shapes["+ae.index+"].name",re.name):S.call("_guiRestyle",q,re,ae.index)}):C(X,O,q,Y)}function b(O,q){var Y=Math.max(4,q);if(O&&O.trim().length>=Y/2)return O;O=O||"";for(var ee=Y-O.length;ee>0;ee--)O+=" ";return O}function _(O,q,Y){var ee=q._context.doubleClickDelay,te,ae=1,U=v.ensureSingle(O,"rect",Y+"toggle",function(H){q._context.staticPlot||H.style("cursor","pointer").attr("pointer-events","all"),H.call(a.fill,"rgba(0,0,0,0)")});q._context.staticPlot||(U.on("mousedown",function(){te=new Date().getTime(),te-q._legendMouseDownTimeee&&(ae=Math.max(ae-1,1)),m(q,H,O,ae,u.event)}}))}function I(O,q,Y,ee){if(q._fullData.some(function(V){let $=V.legend||"legend";return(Array.isArray($)?$.includes(ee):$===ee)&&S.traceIs(V,"pie-like")}))return;let ae=q._context.doubleClickDelay;var U,H=1;let K=v.ensureSingle(O,"rect",ee+"titletoggle",function(V){q._context.staticPlot||V.style("cursor","pointer").attr("pointer-events","all"),V.call(a.fill,"rgba(0,0,0,0)")});q._context.staticPlot||(K.on("mousedown",function(){U=new Date().getTime(),U-q._legendMouseDownTimeae&&(H=Math.max(H-1,1));let V={event:u.event,legendId:ee,data:q.data,layout:q.layout,fullData:q._fullData,fullLayout:q._fullLayout};if(H===1&&Y.titleclick){if(l.triggerHandler(q,"plotly_legendtitleclick",V)===!1)return;Y._titleClickTimeout=setTimeout(function(){q._fullLayout&&i(q,Y,Y.titleclick)},ae)}else H===2&&(Y._titleClickTimeout&&clearTimeout(Y._titleClickTimeout),q._legendMouseDownTime=0,l.triggerHandler(q,"plotly_legendtitledoubleclick",V)!==!1&&Y.titledoubleclick&&i(q,Y,Y.titledoubleclick))}))}function C(O,q,Y,ee,te){ee._inHover&&O.attr("data-notex",!0),r.convertToTspans(O,Y,function(){F(q,Y,ee,te)})}function F(O,q,Y,ee){var te=O.data()[0][0],ae=te&&te.trace.showlegend;if(Array.isArray(ae)&&(ae=ae[te.i]!==!1),!Y._inHover&&te&&!ae){O.remove();return}var U=O.select("g[class*=math-group]"),H=U.node(),K=x.getId(Y);Y||(Y=q._fullLayout[K]);var V=Y.borderwidth,$;ee===M?$=Y.title.font:te.groupTitle?$=te.groupTitle.font:$=Y.font;var X=$.size*p,Z,Q;if(H){var re=t.bBox(H);Z=re.height,Q=re.width,ee===M?t.setTranslate(U,V,V+Z*.75):t.setTranslate(U,0,Z*.25)}else{var ce="."+K+(ee===M?"title":"")+"text",me=O.select(ce),ye=r.lineCount(me),Ae=me.node();if(Z=X*ye,Q=Ae?t.bBox(Ae).width:0,ee===M)Y.title.side==="left"&&(Q+=s.itemGap*2),r.positionText(me,V+s.titlePad,V+X);else{var Se=s.itemGap*2+Y.indentation+Y.itemwidth;te.groupTitle&&(Se=s.itemGap,Q-=Y.indentation+Y.itemwidth),r.positionText(me,Se,-X*((ye-1)/2-.3))}}ee===M?(Y._titleWidth=Q,Y._titleHeight=Z):(te.lineHeight=X,te.height=Math.max(Z,16)+3,te.width=Q)}function R(O){var q=0,Y=0,ee=O.title.side;return ee&&(ee.indexOf("left")!==-1&&(q=O._titleWidth),ee.indexOf("top")!==-1&&(Y=O._titleHeight)),[q,Y]}function z(O,q,Y,ee,te){var ae=O._fullLayout,U=x.getId(ee);ee||(ee=ae[U]);var H=ae._size,K=x.isVertical(ee),V=x.isGrouped(ee),$=ee.entrywidthmode==="fraction",X=ee.borderwidth,Z=2*X,Q=s.itemGap,re=ee.indentation+ee.itemwidth+Q*2,ce=2*(X+Q),me=B(ee),ye=ee.y<0||ee.y===0&&me==="top",Ae=ee.y>1||ee.y===1&&me==="bottom",Se=ee.tracegroupgap,Ce={};let{orientation:qe,yref:Ue}=ee,{maxheight:xe}=ee,he=ye||Ae||qe!=="v"||Ue!=="paper";xe||(xe=he?.5:1);let oe=he?ae.height:H.h;ee._maxHeight=Math.max(xe>1?xe:xe*oe,30);var le=0;ee._width=0,ee._height=0;var ne=R(ee);if(K)Y.each(function(ft){var ht=ft[0].height;t.setTranslate(this,X+ne[0],X+ne[1]+ee._height+ht/2+Q),ee._height+=ht,ee._width=Math.max(ee._width,ft[0].width)}),le=re+ee._width,ee._width+=Q+re+Z,ee._height+=ce,V&&(q.each(function(ft,ht){t.setTranslate(this,0,ht*ee.tracegroupgap)}),ee._height+=(ee._lgroupsLength-1)*ee.tracegroupgap);else{var be=k(ee),Fe=ee.x<0||ee.x===0&&be==="right",Ve=ee.x>1||ee.x===1&&be==="left",je=Ae||ye,ut=ae.width/2;ee._maxWidth=Math.max(Fe?je&&be==="left"?H.l+H.w:ut:Ve?je&&be==="right"?H.r+H.w:ut:H.w,2*re);var st=0,yt=0;Y.each(function(ft){var ht=A(ft,ee,re);st=Math.max(st,ht),yt+=ht}),le=null;var At=0;if(V){var Pt=0,Zt=0,vr=0;q.each(function(){var ft=0,ht=0;u.select(this).selectAll("g.traces").each(function(_t){var Ft=A(_t,ee,re),St=_t[0].height;t.setTranslate(this,ne[0],ne[1]+X+Q+St/2+ht),ht+=St,ft=Math.max(ft,Ft),Ce[_t[0].trace.legendgroup]=ft});var gt=ft+Q;Zt>0&>+X+Zt>ee._maxWidth?(At=Math.max(At,Zt),Zt=0,vr+=Pt+Se,Pt=ht):Pt=Math.max(Pt,ht),t.setTranslate(this,Zt,vr),Zt+=gt}),ee._width=Math.max(At,Zt)+X,ee._height=vr+Pt+ce}else{var Nt=Y.size(),Kt=yt+Z+(Nt-1)*Q=ee._maxWidth&&(At=Math.max(At,ve),Ee=0,ze+=nt,ee._height+=nt,nt=0),t.setTranslate(this,ne[0]+X+Ee,ne[1]+X+ze+ht/2+Q),ve=Ee+gt+Q,Ee+=_t,nt=Math.max(nt,ht)}),Kt?(ee._width=Ee+Z,ee._height=nt+ce):(ee._width=Math.max(At,ve)+Z,ee._height+=nt+ce)}}ee._width=Math.ceil(Math.max(ee._width+ne[0],ee._titleWidth+2*(X+s.titlePad))),ee._height=Math.ceil(Math.max(ee._height+ne[1],ee._titleHeight+2*(X+s.itemGap))),ee._effHeight=Math.min(ee._height,ee._maxHeight);var _e=O._context.edits,Ie=_e.legendText||_e.legendPosition;Y.each(function(ft){var ht=u.select(this).select("."+U+"toggle"),gt=ft[0].height,_t=ft[0].trace.legendgroup,Ft=A(ft,ee,re);V&&_t!==""&&(Ft=Ce[_t]);var St=Ie?re:le||Ft;!K&&!$&&(St+=Q/2),t.setRect(ht,0,-gt/2,St,gt)});var Be=te.select("."+U+"titletext");Be.node()&&E(Be,ee,X);var We=te.select("."+U+"titletoggle");if(We.size()&&Be.node()){var Xe=Be.attr("x")||0,mt=s.titlePad;t.setRect(We,Xe-mt,X,ee._titleWidth+2*mt,ee._titleHeight+2*mt)}}function D(O,q,Y,ee){var te=O._fullLayout,ae=te[q],U=k(ae),H=B(ae),K=ae.xref==="paper",V=ae.yref==="paper";O._fullLayout._reservedMargin[q]={};var $=ae.y<.5?"b":"t",X=ae.x<.5?"l":"r",Z={r:te.width-Y,l:Y+ae._width,b:te.height-ee,t:ee+ae._effHeight};if(K&&V)return w.autoMargin(O,q,{x:ae.x,y:ae.y,l:ae._width*f[U],r:ae._width*d[U],b:ae._effHeight*d[H],t:ae._effHeight*f[H]});K?O._fullLayout._reservedMargin[q][$]=Z[$]:V||ae.orientation==="v"?O._fullLayout._reservedMargin[q][X]=Z[X]:O._fullLayout._reservedMargin[q][$]=Z[$]}function k(O){return v.isRightAnchor(O)?"right":v.isCenterAnchor(O)?"center":"left"}function B(O){return v.isBottomAnchor(O)?"bottom":v.isMiddleAnchor(O)?"middle":"top"}}}),V3=De({"src/components/fx/hover.js"(j){"use strict";var N=Qn(),u=io(),v=Ar(),w=v.pushUnique,S=v.strTranslate,l=v.strRotate,e=cm(),t=Xs(),a=ZP(),r=Ki(),n=ii(),i=dh(),s=Vi(),c=gc().zindexSeparator,p=hi(),f=Ch(),d=p1(),y=N3(),o=G3(),x=d.YANGLE,M=Math.PI*x/180,T=1/Math.sin(M),E=Math.cos(M),g=Math.sin(M),A=d.HOVERARROWSIZE,m=d.HOVERTEXTPAD,h={box:!0,ohlc:!0,violin:!0,candlestick:!0},b={scatter:!0,scattergl:!0,splom:!0};function _(X,Z){return X.distance-Z.distance}j.hover=function(Z,Q,re,ce){Z=v.getGraphDiv(Z);var me=Q.target;v.throttle(Z._fullLayout._uid+d.HOVERID,d.HOVERMINTIME,function(){I(Z,Q,re,ce,me)})},j.loneHover=function(Z,Q){var re=!0;Array.isArray(Z)||(re=!1,Z=[Z]);var ce=Q.gd,me=K(ce),ye=V(ce),Ae=Z.map(function(ne){var be=ne._x0||ne.x0||ne.x||0,Fe=ne._x1||ne.x1||ne.x||0,Ve=ne._y0||ne.y0||ne.y||0,je=ne._y1||ne.y1||ne.y||0,ut=ne.eventData;if(ut){var st=Math.min(be,Fe),yt=Math.max(be,Fe),At=Math.min(Ve,je),Pt=Math.max(Ve,je),Zt=ne.trace;if(p.traceIs(Zt,"gl3d")){var vr=ce._fullLayout[Zt.scene]._scene.container,Nt=vr.offsetLeft,Kt=vr.offsetTop;st+=Nt,yt+=Nt,At+=Kt,Pt+=Kt}ut.bbox={x0:st+ye,x1:yt+ye,y0:At+me,y1:Pt+me},ut.xPixel=(be+Fe)/2,ut.yPixel=(Ve+je)/2,Q.inOut_bbox&&Q.inOut_bbox.push(ut.bbox)}else ut=!1;return{color:ne.color||n.defaultLine,x0:ne.x0||ne.x||0,x1:ne.x1||ne.x||0,y0:ne.y0||ne.y||0,y1:ne.y1||ne.y||0,xLabel:ne.xLabel,yLabel:ne.yLabel,zLabel:ne.zLabel,text:ne.text,name:ne.name,idealAlign:ne.idealAlign,borderColor:ne.borderColor,fontFamily:ne.fontFamily,fontSize:ne.fontSize,fontColor:ne.fontColor,fontWeight:ne.fontWeight,fontStyle:ne.fontStyle,fontVariant:ne.fontVariant,nameLength:ne.nameLength,textAlign:ne.textAlign,trace:ne.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:ne.hovertemplate||!1,hovertemplateLabels:ne.hovertemplateLabels||!1,eventData:ut}}),Se=!1,Ce=R(Ae,{gd:ce,hovermode:"closest",rotateLabels:Se,bgColor:Q.bgColor||n.background,container:N.select(Q.container),outerContainer:Q.outerContainer||Q.container}),qe=Ce.hoverLabels,Ue=5,xe=0,he=0;qe.sort(function(ne,be){return ne.y0-be.y0}).each(function(ne,be){var Fe=ne.y0-ne.by/2;Fe-Ueyt[0]._length||pa<0||pa>At[0]._length)return i.unhoverRaw(X,Z)}if(Z.pointerX=$r+yt[0]._offset,Z.pointerY=pa+At[0]._offset,"xval"in Z?ze=f.flat(me,Z.xval):ze=f.p2c(yt,$r),"yval"in Z?ve=f.flat(me,Z.yval):ve=f.p2c(At,pa),!u(ze[0])||!u(ve[0]))return v.warn("Fx.hover failed",Z,X),i.unhoverRaw(X,Z)}Ae.clickanywhere&&(X._hoverXVals=ze,X._hoverYVals=ve,X._hoverXAxes=yt,X._hoverYAxes=At);var ka=1/0;function Ta(Mn,bo){for(Ie=0;IeFt&&(nt.splice(0,Ft),ka=nt[0].distance),Ue&&Kt!==0&&nt.length===0){_t.distance=Kt,_t.index=!1;var fo=We._module.hoverPoints(_t,ht,gt,"closest",{hoverLayer:Ae._hoverlayer});if(fo&&(fo=fo.filter(function(zi){return zi.spikeDistance<=Kt})),fo&&fo.length){var Po,po=fo.filter(function(zi){return zi.xa.showspikes&&zi.xa.spikesnap!=="hovered data"});if(po.length){var Kn=po[0];u(Kn.x0)&&u(Kn.y0)&&(Po=La(Kn),(!St.vLinePoint||St.vLinePoint.spikeDistance>Po.spikeDistance)&&(St.vLinePoint=Po))}var yi=fo.filter(function(zi){return zi.ya.showspikes&&zi.ya.spikesnap!=="hovered data"});if(yi.length){var Yi=yi[0];u(Yi.x0)&&u(Yi.y0)&&(Po=La(Yi),(!St.hLinePoint||St.hLinePoint.spikeDistance>Po.spikeDistance)&&(St.hLinePoint=Po))}}}}}Ta();function Da(Mn,bo,so){for(var Hi=null,yo=1/0,Bi,fo=0;foMn.trace.index===bi.trace.index):nt=[bi];var Li=nt.length,$a=H("x",bi,Ae),Va=H("y",bi,Ae);Ta($a,Va);var it=[],Qe={},Jt=0,Yt=function(Mn){var bo=h[Mn.trace.type]?C(Mn):Mn.trace.index;if(!Qe[bo])Jt++,Qe[bo]=Jt,it.push(Mn);else{var so=Qe[bo]-1,Hi=it[so];so>0&&Math.abs(Mn.distance)Li-1;ar--)Yt(nt[ar]);nt=it,Pn()}var cr=X._hoverdata,tr=[],Je=K(X),bt=V(X);for(let Mn of nt){var qt=f.makeEventData(Mn,Mn.trace,Mn.cd);if(Mn.hovertemplate!==!1){var Qt=!1;Mn.cd[Mn.index]&&Mn.cd[Mn.index].ht&&(Qt=Mn.cd[Mn.index].ht),Mn.hovertemplate=Qt||Mn.trace.hovertemplate||!1}if(Mn.xa&&Mn.ya){var br=Mn.x0+Mn.xa._offset,Ir=Mn.x1+Mn.xa._offset,Cr=Mn.y0+Mn.ya._offset,Mr=Mn.y1+Mn.ya._offset,Xr=Math.min(br,Ir),Ra=Math.max(br,Ir),wa=Math.min(Cr,Mr),yn=Math.max(Cr,Mr);qt.bbox={x0:Xr+bt,x1:Ra+bt,y0:wa+Je,y1:yn+Je},qt.xPixel=(br+Ir)/2,qt.yPixel=(Cr+Mr)/2}Mn.eventData=[qt],tr.push(qt)}X._hoverdata=tr;var fn=xe==="y"&&(Ee.length>1||nt.length>1)||xe==="closest"&&hr&&nt.length>1,ri=n.combine(Ae.plot_bgcolor||n.background,Ae.paper_bgcolor),On=R(nt,{gd:X,hovermode:xe,rotateLabels:fn,bgColor:ri,container:Ae._hoverlayer,outerContainer:Ae._paper.node(),commonLabelOpts:Ae.hoverlabel,hoverdistance:Ae.hoverdistance}),ui=On.hoverLabels;if(f.isUnifiedHover(xe)||(D(ui,fn,Ae,On.commonLabelBoundingBox),O(ui,fn,Ae._invScaleX,Ae._invScaleY)),ce&&ce.tagName){var jn=p.getComponentMethod("annotations","hasClickToShow")(X,tr);a(N.select(ce),jn?"pointer":"")}var oo=ee(X,Z,cr);if(!ce||re||!oo&&!Ae.hoveranywhere)return;cr&&oo&&X.emit("plotly_unhover",{event:Z,points:cr}),Qi(X._hoverdata);function Qi(Mn){X.emit("plotly_hover",{event:Z,points:Mn,xaxes:yt,yaxes:At,xvals:ze,yvals:ve})}}function C(X){return[X.trace.index,X.index,X.x0,X.y0,X.name,X.attr,X.xa?X.xa._id:"",X.ya?X.ya._id:""].join(",")}var F=/([\s\S]*)<\/extra>/;function R(X,Z){var Q=Z.gd,re=Q._fullLayout,ce=Z.hovermode,me=Z.rotateLabels,ye=Z.bgColor,Ae=Z.container,Se=Z.outerContainer,Ce=Z.commonLabelOpts||{};if(X.length===0)return[[]];var qe=Z.fontFamily||d.HOVERFONT,Ue=Z.fontSize||d.HOVERFONTSIZE,xe=Z.fontWeight||re.font.weight,he=Z.fontStyle||re.font.style,oe=Z.fontVariant||re.font.variant,le=Z.fontTextcase||re.font.textcase,ne=Z.fontLineposition||re.font.lineposition,be=Z.fontShadow||re.font.shadow,Fe=X[0],Ve=Fe.xa,je=Fe.ya,ut=ce.charAt(0),st=ut+"Label",yt=Fe[st];if(yt===void 0&&Ve.type==="multicategory")for(var At=0;Atre.width-tr&&(Je=re.width-tr),mn.attr("d","M"+(Yt-Je)+",0L"+(Yt-Je+A)+","+cr+A+"H"+tr+"v"+cr+(m*2+Jt.height)+"H"+-tr+"V"+cr+A+"H"+(Yt-Je-A)+"Z"),Yt=Je,Ie.minX=Yt-tr,Ie.maxX=Yt+tr,Ve.side==="top"?(Ie.minY=ar-(m*2+Jt.height),Ie.maxY=ar-m):(Ie.minY=ar+m,Ie.maxY=ar+(m*2+Jt.height))}else{var bt,qt,Qt;je.side==="right"?(bt="start",qt=1,Qt="",Yt=Ve._offset+Ve._length):(bt="end",qt=-1,Qt="-",Yt=Ve._offset),ar=je._offset+(Fe.y0+Fe.y1)/2,bi.attr("text-anchor",bt),mn.attr("d","M0,0L"+Qt+A+","+A+"V"+(m+Jt.height/2)+"h"+Qt+(m*2+Jt.width)+"V-"+(m+Jt.height/2)+"H"+Qt+A+"V-"+A+"Z"),Ie.minY=ar-(m+Jt.height/2),Ie.maxY=ar+(m+Jt.height/2),je.side==="right"?(Ie.minX=Yt+A,Ie.maxX=Yt+A+(m*2+Jt.width)):(Ie.minX=Yt-A-(m*2+Jt.width),Ie.maxX=Yt-A);var br=Jt.height/2,Ir=Zt-Jt.top-br,Cr="clip"+re._uid+"commonlabel"+je._id,Mr;if(Ytmn.hoverinfo!=="none");if(on.length===0)return[];var Be=re.hoverlabel,We=Be.font,Xe=on[0],mt=((ce==="x unified"?Xe.xa:Xe.ya).unifiedhovertitle||{}).text,ft=mt?v.hovertemplateString({data:ce==="x unified"?[{xa:Xe.xa,x:Xe.xVal}]:[{ya:Xe.ya,y:Xe.yVal}],fallback:Xe.trace.hovertemplatefallback,locale:re._d3locale,template:mt}):yt,ht={showlegend:!0,legend:{title:{text:ft,font:We},font:We,bgcolor:Be.bgcolor,bordercolor:Be.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:re.legend?re.legend.traceorder:void 0,orientation:"v"}},gt={font:We};y(ht,gt,Q._fullData);var _t=gt.legend;_t.entries=[];for(var Ft=0;Ft=0?vi=Pn:sn+aa=0?vi=sn:Yn+aa=0?Dn=xa:Gn+ka=0?Dn=Gn:Zn+ka=0,(on.idealAlign==="top"||!wa)&&yn?(Qt-=Ir/2,on.anchor="end"):wa?(Qt+=Ir/2,on.anchor="start"):on.anchor="middle",on.crossPos=Qt;else{if(on.pos=Qt,wa=qt+br/2+Ra<=vr,yn=qt-br/2-Ra>=0,(on.idealAlign==="left"||!wa)&&yn)qt-=br/2,on.anchor="end";else if(wa)qt+=br/2,on.anchor="start";else{on.anchor="middle";var fn=Ra/2,ri=qt+fn-vr,On=qt-fn;ri>0&&(qt-=ri),On<0&&(qt+=-On)}on.crossPos=qt}ar.attr("text-anchor",on.anchor),tr&&cr.attr("text-anchor",on.anchor),mn.attr("transform",S(qt,Qt)+(me?l(x):""))}),{hoverLabels:oi,commonLabelBoundingBox:Ie}}function z(X,Z,Q,re,ce,me){var ye,Ae,Se="",Ce="";X.nameOverride!==void 0&&(X.name=X.nameOverride),X.name&&(X.trace._meta&&(X.name=v.templateString(X.name,X.trace._meta)),Se=ae(X.name,X.nameLength));var qe=Q.charAt(0),Ue=qe==="x"?"y":"x";X.zLabel!==void 0?(X.xLabel!==void 0&&(Ce+="x: "+X.xLabel+"
"),X.yLabel!==void 0&&(Ce+="y: "+X.yLabel+"
"),X.trace.type!=="choropleth"&&X.trace.type!=="choroplethmap"&&(Ce+=(Ce?"z: ":"")+X.zLabel)):Z&&X[qe+"Label"]===ce?Ce=X[Ue+"Label"]||"":X.xLabel===void 0?X.yLabel!==void 0&&X.trace.type!=="scattercarpet"&&(Ce=X.yLabel):X.yLabel===void 0?Ce=X.xLabel:Ce="("+X.xLabel+", "+X.yLabel+")",(X.text||X.text===0)&&!Array.isArray(X.text)&&(Ce+=(Ce?"
":"")+X.text),X.extraText!==void 0&&(Ce+=(Ce?"
":"")+X.extraText),me&&Ce===""&&!X.hovertemplate&&(Se===""&&me.remove(),Ce=Se),(Ae=(ye=X.trace)==null?void 0:ye.hoverlabel)!=null&&Ae.split&&(X.hovertemplate="");let{hovertemplate:xe=!1}=X;if(xe){let he=X.hovertemplateLabels||X;X[qe+"Label"]!==ce&&(he[qe+"other"]=he[qe+"Val"],he[qe+"otherLabel"]=he[qe+"Label"]),Ce=v.hovertemplateString({data:[X.eventData[0]||{},X.trace._meta],fallback:X.trace.hovertemplatefallback,labels:he,locale:re._d3locale,template:xe}),Ce=Ce.replace(F,(oe,le)=>(Se=ae(le,X.nameLength),""))}return[Ce,Se]}function D(X,Z,Q,re){var ce=Z?"xa":"ya",me=Z?"ya":"xa",ye=0,Ae=1,Se=X.size(),Ce=new Array(Se),qe=0,Ue=re.minX,xe=re.maxX,he=re.minY,oe=re.maxY,le=function(ze){return ze*Q._invScaleX},ne=function(ze){return ze*Q._invScaleY};X.each(function(ze){var ve=ze[ce],_e=ze[me],Ie=ve._id.charAt(0)==="x",Be=ve.range;qe===0&&Be&&Be[0]>Be[1]!==Ie&&(Ae=-1);var We=0,Xe=Ie?Q.width:Q.height;if(Q.hovermode==="x"||Q.hovermode==="y"){var mt=k(ze,Z),ft=ze.anchor,ht=ft==="end"?-1:1,gt,_t;if(ft==="middle")gt=ze.crossPos+(Ie?ne(mt.y-ze.by/2):le(ze.bx/2+ze.tx2width/2)),_t=gt+(Ie?ne(ze.by):le(ze.bx));else if(Ie)gt=ze.crossPos+ne(A+mt.y)-ne(ze.by/2-A),_t=gt+ne(ze.by);else{var Ft=le(ht*A+mt.x),St=Ft+le(ht*ze.bx);gt=ze.crossPos+Math.min(Ft,St),_t=ze.crossPos+Math.max(Ft,St)}Ie?he!==void 0&&oe!==void 0&&Math.min(_t,oe)-Math.max(gt,he)>1&&(_e.side==="left"?(We=_e._mainLinePosition,Xe=Q.width):Xe=_e._mainLinePosition):Ue!==void 0&&xe!==void 0&&Math.min(_t,xe)-Math.max(gt,Ue)>1&&(_e.side==="top"?(We=_e._mainLinePosition,Xe=Q.height):Xe=_e._mainLinePosition)}Ce[qe++]=[{datum:ze,traceIndex:ze.trace.index,dp:0,pos:ze.pos,posref:ze.posref,size:ze.by*(Ie?T:1)/2,pmin:We,pmax:Xe}]}),Ce.sort(function(ze,ve){return ze[0].posref-ve[0].posref||Ae*(ve[0].traceIndex-ze[0].traceIndex)});var be,Fe,Ve,je,ut,st,yt;function At(ze){var ve=ze[0],_e=ze[ze.length-1];if(Fe=ve.pmin-ve.pos-ve.dp+ve.size,Ve=_e.pos+_e.dp+_e.size-ve.pmax,Fe>.01){for(ut=ze.length-1;ut>=0;ut--)ze[ut].dp+=Fe;be=!1}if(!(Ve<.01)){if(Fe<-.01){for(ut=ze.length-1;ut>=0;ut--)ze[ut].dp-=Ve;be=!1}if(be){var Ie=0;for(je=0;jeve.pmax&&Ie++;for(je=ze.length-1;je>=0&&!(Ie<=0);je--)st=ze[je],st.pos>ve.pmax-1&&(st.del=!0,Ie--);for(je=0;je=0;ut--)ze[ut].dp-=Ve;for(je=ze.length-1;je>=0&&!(Ie<=0);je--)st=ze[je],st.pos+st.dp+st.size>ve.pmax&&(st.del=!0,Ie--)}}}for(;!be&&ye<=Se;){for(ye++,be=!0,je=0;je.01){for(ut=Zt.length-1;ut>=0;ut--)Zt[ut].dp+=Fe;for(Pt.push.apply(Pt,Zt),Ce.splice(je+1,1),yt=0,ut=Pt.length-1;ut>=0;ut--)yt+=Pt[ut].dp;for(Ve=yt/Pt.length,ut=Pt.length-1;ut>=0;ut--)Pt[ut].dp-=Ve;be=!1}else je++}Ce.forEach(At)}for(je=Ce.length-1;je>=0;je--){var Kt=Ce[je];for(ut=Kt.length-1;ut>=0;ut--){var nt=Kt[ut],Ee=nt.datum;Ee.offset=nt.dp,Ee.del=nt.del}}}function k(X,Z){var Q=0,re=X.offset;return Z&&(re*=-g,Q=X.offset*E),{x:Q,y:re}}function B(X){var Z={start:1,end:-1,middle:0}[X.anchor],Q=Z*(A+m),re=Q+Z*(X.txwidth+m),ce=X.anchor==="middle";return ce&&(Q-=X.tx2width/2,re+=X.txwidth/2+m),{alignShift:Z,textShiftX:Q,text2ShiftX:re}}function O(X,Z,Q,re){var ce=function(ye){return ye*Q},me=function(ye){return ye*re};X.each(function(ye){var Ae=N.select(this);if(ye.del)return Ae.remove();var Se=Ae.select("text.nums"),Ce=ye.anchor,qe=Ce==="end"?-1:1,Ue=B(ye),xe=k(ye,Z),he=xe.x,oe=xe.y,le=Ce==="middle",ne="hoverlabel"in ye.trace?ye.trace.hoverlabel.showarrow:!0,be;le?be="M-"+ce(ye.bx/2+ye.tx2width/2)+","+me(oe-ye.by/2)+"h"+ce(ye.bx)+"v"+me(ye.by)+"h-"+ce(ye.bx)+"Z":ne?be="M0,0L"+ce(qe*A+he)+","+me(A+oe)+"v"+me(ye.by/2-A)+"h"+ce(qe*ye.bx)+"v-"+me(ye.by)+"H"+ce(qe*A+he)+"V"+me(oe-A)+"Z":be="M"+ce(qe*A+he)+","+me(oe-ye.by/2)+"h"+ce(qe*ye.bx)+"v"+me(ye.by)+"h"+ce(-qe*ye.bx)+"Z",Ae.select("path").attr("d",be);var Fe=he+Ue.textShiftX,Ve=oe+ye.ty0-ye.by/2+m,je=ye.textAlign||"auto";je!=="auto"&&(je==="left"&&Ce!=="start"?(Se.attr("text-anchor","start"),Fe=le?-ye.bx/2-ye.tx2width/2+m:-ye.bx-m):je==="right"&&Ce!=="end"&&(Se.attr("text-anchor","end"),Fe=le?ye.bx/2-ye.tx2width/2-m:ye.bx+m)),Se.call(t.positionText,ce(Fe),me(Ve)),ye.tx2width&&(Ae.select("text.name").call(t.positionText,ce(Ue.text2ShiftX+Ue.alignShift*m+he),me(oe+ye.ty0-ye.by/2+m)),Ae.select("rect").call(r.setRect,ce(Ue.text2ShiftX+(Ue.alignShift-1)*ye.tx2width/2+he),me(oe-ye.by/2-1),ce(ye.tx2width),me(ye.by+2)))})}function q(X,Z){var Q=X.index,re=X.trace||{},ce=X.cd[0],me=X.cd[Q]||{};function ye(xe){return xe||u(xe)&&xe===0}var Ae=Array.isArray(Q)?function(xe,he){var oe=v.castOption(ce,Q,xe);return ye(oe)?oe:v.extractOption({},re,"",he)}:function(xe,he){return v.extractOption(me,re,xe,he)};function Se(xe,he,oe){var le=Ae(he,oe);ye(le)&&(X[xe]=le)}if(Se("hoverinfo","hi","hoverinfo"),Se("bgcolor","hbg","hoverlabel.bgcolor"),Se("borderColor","hbc","hoverlabel.bordercolor"),Se("fontFamily","htf","hoverlabel.font.family"),Se("fontSize","hts","hoverlabel.font.size"),Se("fontColor","htc","hoverlabel.font.color"),Se("fontWeight","htw","hoverlabel.font.weight"),Se("fontStyle","hty","hoverlabel.font.style"),Se("fontVariant","htv","hoverlabel.font.variant"),Se("nameLength","hnl","hoverlabel.namelength"),Se("textAlign","hta","hoverlabel.align"),X.posref=Z==="y"||Z==="closest"&&re.orientation==="h"?X.xa._offset+(X.x0+X.x1)/2:X.ya._offset+(X.y0+X.y1)/2,X.x0=v.constrain(X.x0,0,X.xa._length),X.x1=v.constrain(X.x1,0,X.xa._length),X.y0=v.constrain(X.y0,0,X.ya._length),X.y1=v.constrain(X.y1,0,X.ya._length),X.xLabelVal!==void 0&&(X.xLabel="xLabel"in X?X.xLabel:s.hoverLabelText(X.xa,X.xLabelVal,re.xhoverformat),X.xVal=X.xa.c2d(X.xLabelVal)),X.yLabelVal!==void 0&&(X.yLabel="yLabel"in X?X.yLabel:s.hoverLabelText(X.ya,X.yLabelVal,re.yhoverformat),X.yVal=X.ya.c2d(X.yLabelVal)),X.zLabelVal!==void 0&&X.zLabel===void 0&&(X.zLabel=String(X.zLabelVal)),!isNaN(X.xerr)&&!(X.xa.type==="log"&&X.xerr<=0)){var Ce=s.tickText(X.xa,X.xa.c2l(X.xerr),"hover").text;X.xerrneg!==void 0?X.xLabel+=" +"+Ce+" / -"+s.tickText(X.xa,X.xa.c2l(X.xerrneg),"hover").text:X.xLabel+=" \xB1 "+Ce,Z==="x"&&(X.distance+=1)}if(!isNaN(X.yerr)&&!(X.ya.type==="log"&&X.yerr<=0)){var qe=s.tickText(X.ya,X.ya.c2l(X.yerr),"hover").text;X.yerrneg!==void 0?X.yLabel+=" +"+qe+" / -"+s.tickText(X.ya,X.ya.c2l(X.yerrneg),"hover").text:X.yLabel+=" \xB1 "+qe,Z==="y"&&(X.distance+=1)}var Ue=X.hoverinfo||X.trace.hoverinfo;return Ue&&Ue!=="all"&&(Ue=Array.isArray(Ue)?Ue:Ue.split("+"),Ue.indexOf("x")===-1&&(X.xLabel=void 0),Ue.indexOf("y")===-1&&(X.yLabel=void 0),Ue.indexOf("z")===-1&&(X.zLabel=void 0),Ue.indexOf("text")===-1&&(X.text=void 0),Ue.indexOf("name")===-1&&(X.name=void 0)),X}function Y(X,Z,Q){var re=Q.container,ce=Q.fullLayout,me=ce._size,ye=Q.event,Ae=!!Z.hLinePoint,Se=!!Z.vLinePoint,Ce,qe;if(re.selectAll(".spikeline").remove(),!!(Se||Ae)){var Ue=n.combine(ce.plot_bgcolor,ce.paper_bgcolor);if(Ae){var xe=Z.hLinePoint,he,oe;Ce=xe&&xe.xa,qe=xe&&xe.ya;var le=qe.spikesnap;le==="cursor"?(he=ye.pointerX,oe=ye.pointerY):(he=Ce._offset+xe.x,oe=qe._offset+xe.y);var ne=n.color(xe.color).contrast(n.color(Ue))<1.5?n.contrast(Ue):xe.color,be=qe.spikemode,Fe=qe.spikethickness,Ve=qe.spikecolor||ne,je=s.getPxPosition(X,qe),ut,st;if(be.indexOf("toaxis")!==-1||be.indexOf("across")!==-1){if(be.indexOf("toaxis")!==-1&&(ut=je,st=he),be.indexOf("across")!==-1){var yt=qe._counterDomainMin,At=qe._counterDomainMax;qe.anchor==="free"&&(yt=Math.min(yt,qe.position),At=Math.max(At,qe.position)),ut=me.l+yt*me.w,st=me.l+At*me.w}re.insert("line",":first-child").attr({x1:ut,x2:st,y1:oe,y2:oe,"stroke-width":Fe,stroke:Ve,"stroke-dasharray":r.dashStyle(qe.spikedash,Fe)}).classed("spikeline",!0).classed("crisp",!0),re.insert("line",":first-child").attr({x1:ut,x2:st,y1:oe,y2:oe,"stroke-width":Fe+2,stroke:Ue}).classed("spikeline",!0).classed("crisp",!0)}be.indexOf("marker")!==-1&&re.insert("circle",":first-child").attr({cx:je+(qe.side!=="right"?Fe:-Fe),cy:oe,r:Fe,fill:Ve}).classed("spikeline",!0)}if(Se){var Pt=Z.vLinePoint,Zt,vr;Ce=Pt&&Pt.xa,qe=Pt&&Pt.ya;var Nt=Ce.spikesnap;Nt==="cursor"?(Zt=ye.pointerX,vr=ye.pointerY):(Zt=Ce._offset+Pt.x,vr=qe._offset+Pt.y);var Kt=n.color(Pt.color).contrast(n.color(Ue))<1.5?n.contrast(Ue):Pt.color,nt=Ce.spikemode,Ee=Ce.spikethickness,ze=Ce.spikecolor||Kt,ve=s.getPxPosition(X,Ce),_e,Ie;if(nt.indexOf("toaxis")!==-1||nt.indexOf("across")!==-1){if(nt.indexOf("toaxis")!==-1&&(_e=ve,Ie=vr),nt.indexOf("across")!==-1){var Be=Ce._counterDomainMin,We=Ce._counterDomainMax;Ce.anchor==="free"&&(Be=Math.min(Be,Ce.position),We=Math.max(We,Ce.position)),_e=me.t+(1-We)*me.h,Ie=me.t+(1-Be)*me.h}re.insert("line",":first-child").attr({x1:Zt,x2:Zt,y1:_e,y2:Ie,"stroke-width":Ee,stroke:ze,"stroke-dasharray":r.dashStyle(Ce.spikedash,Ee)}).classed("spikeline",!0).classed("crisp",!0),re.insert("line",":first-child").attr({x1:Zt,x2:Zt,y1:_e,y2:Ie,"stroke-width":Ee+2,stroke:Ue}).classed("spikeline",!0).classed("crisp",!0)}nt.indexOf("marker")!==-1&&re.insert("circle",":first-child").attr({cx:Zt,cy:ve-(Ce.side!=="top"?Ee:-Ee),r:Ee,fill:ze}).classed("spikeline",!0)}}}function ee(X,Z,Q){if(!Q||Q.length!==X._hoverdata.length)return!0;for(var re=Q.length-1;re>=0;re--){var ce=Q[re],me=X._hoverdata[re];if(ce.curveNumber!==me.curveNumber||String(ce.pointNumber)!==String(me.pointNumber)||String(ce.pointNumbers)!==String(me.pointNumbers)||ce.binNumber!==me.binNumber)return!0}return!1}function te(X,Z){return!Z||Z.vLinePoint!==X._spikepoints.vLinePoint||Z.hLinePoint!==X._spikepoints.hLinePoint}function ae(X,Z){return t.plainText(X||"",{len:Z,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function U(X,Z){for(var Q=Z.charAt(0),re=[],ce=[],me=[],ye=0;yeX.offsetTop+X.clientTop,V=X=>X.offsetLeft+X.clientLeft;function $(X,Z){var Q=X._fullLayout,re=Z.getBoundingClientRect(),ce=re.left,me=re.top,ye=ce+re.width,Ae=me+re.height,Se=v.apply3DTransform(Q._invTransform)(ce,me),Ce=v.apply3DTransform(Q._invTransform)(ye,Ae),qe=Se[0],Ue=Se[1],xe=Ce[0],he=Ce[1];return{x:qe,y:Ue,width:xe-qe,height:he-Ue,top:Math.min(Ue,he),left:Math.min(qe,xe),right:Math.max(qe,xe),bottom:Math.max(Ue,he)}}}}),M1=De({"src/components/fx/hoverlabel_defaults.js"(j,N){"use strict";var u=Ar(),v=ii(),w=Ch().isUnifiedHover;N.exports=function(l,e,t,a){a=a||{};var r=e.legend;function n(i){a.font[i]||(a.font[i]=r?e.legend.font[i]:e.font[i])}e&&w(e.hovermode)&&(a.font||(a.font={}),n("size"),n("family"),n("color"),n("weight"),n("style"),n("variant"),r?(a.bgcolor||(a.bgcolor=v.combine(e.legend.bgcolor,e.paper_bgcolor)),a.bordercolor||(a.bordercolor=e.legend.bordercolor)):a.bgcolor||(a.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",a.bgcolor),t("hoverlabel.bordercolor",a.bordercolor),t("hoverlabel.namelength",a.namelength),t("hoverlabel.showarrow",a.showarrow),u.coerceFont(t,"hoverlabel.font",a.font),t("hoverlabel.align",a.align)}}}),JP=De({"src/components/fx/layout_global_defaults.js"(j,N){"use strict";var u=Ar(),v=M1(),w=Ov();N.exports=function(l,e){function t(a,r){return u.coerce(l,e,w,a,r)}v(l,e,t)}}}),QP=De({"src/components/fx/defaults.js"(j,N){"use strict";var u=Ar(),v=om(),w=M1();N.exports=function(l,e,t,a){function r(i,s){return u.coerce(l,e,v,i,s)}var n=u.extendFlat({},a.hoverlabel);e.hovertemplate&&(n.namelength=-1),w(l,e,r,n)}}}),H3=De({"src/components/fx/hovermode_defaults.js"(j,N){"use strict";var u=Ar(),v=Ov();N.exports=function(S,l){function e(t,a){return l[t]!==void 0?l[t]:u.coerce(S,l,v,t,a)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),eR=De({"src/components/fx/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=Ov(),w=H3(),S=M1();N.exports=function(e,t){function a(p,f){return u.coerce(e,t,v,p,f)}var r=w(e,t);r&&(a("hoverdistance"),a("spikedistance"),r.indexOf("unified")!==-1&&a("hoversort"));var n=a("dragmode");n==="select"&&a("selectdirection");var i=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((i||s)&&c===1||i&&s&&c===2)&&(t.dragmode="pan"),S(e,t,a),u.coerceFont(a,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),tR=De({"src/components/fx/calc.js"(j,N){"use strict";var u=Ar(),v=hi();N.exports=function(l){var e=l.calcdata,t=l._fullLayout;function a(c){return function(p){return u.coerceHoverinfo({hoverinfo:p},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),Y_=De({"src/components/shapes/draw_newshape/constants.js"(j,N){"use strict";var u=32;N.exports={CIRCLE_SIDES:u,i000:0,i090:u/4,i180:u/2,i270:u/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),X_=De({"src/components/selections/helpers.js"(j,N){"use strict";var u=Ar().strTranslate;function v(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function w(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function S(e){var t=e._id.charAt(0)==="y"?1:0;return function(a){return v(e,a[t])}}function l(e){return u(e.xaxis._offset,e.yaxis._offset)}N.exports={p2r:v,r2p:w,axValue:S,getTransform:l}}}),Wv=De({"src/components/shapes/draw_newshape/helpers.js"(j){"use strict";var N=A1(),u=Y_(),v=u.CIRCLE_SIDES,w=u.SQRT2,S=X_(),l=S.p2r,e=S.r2p,t=[0,3,4,5,6,1,2],a=[0,3,4,1,2];j.writePaths=function(i){var s=i.length;if(!s)return"M0,0Z";for(var c="",p=0;p0&&x{let s=i.charAt(0),c=r[s].drawn!==void 0;return n+(c?1:0)},0)},j.getDataToPixel=function(l,e,t,a,r){var n=l._fullLayout._size,i;if(e)if(r==="domain")i=function(c){return e._length*(a?1-c:c)+e._offset};else{var s=j.shapePositionToRange(e);i=function(c){var p=S(e,t);return e._offset+e.r2p(s(c,!0))+p},e.type==="date"&&(i=j.decodeDate(i))}else a?i=function(c){return n.t+n.h*(1-c)}:i=function(c){return n.l+n.w*c};return i},j.getPixelToData=function(l,e,t,a){var r=l._fullLayout._size,n;if(e)if(a==="domain")n=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var i=j.rangeToShapePosition(e);n=function(s){return i(e.p2r(s-e._offset))}}else t?n=function(s){return 1-(s-r.t)/r.h}:n=function(s){return(s-r.l)/r.w};return n},j.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,a=Math.round(l);return t?a+.5:a},j.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},a=l._fullLayout._plots[t.xref+t.yref],r=!!a;return r?a._hadPlotinfo=!0:(a={},t.xref&&t.xref!=="paper"&&(a.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(a.yaxis=l._fullLayout[t.yref+"axis"])),a.xsizemode=t.xsizemode,a.ysizemode=t.ysizemode,a.xanchor=t.xanchor,a.yanchor=t.yanchor,{options:t,plotinfo:a}},j.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},a=l._fullLayout._plots[t.xref+t.yref],r=!!a;return r?a._hadPlotinfo=!0:(a={},t.xref&&(a.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(a.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:a}},j.getPathString=function(l,e){let t=e.type,a=v.getRefType(e.xref),r=v.getRefType(e.yref),n=l._fullLayout._size;var i,s,c,p,f,d,y,o,x,M,T,E;function g(F,R,z,D){var k;if(F)if(R==="domain")D?k=function(B){return F._offset+F._length*(1-B)}:k=function(B){return F._offset+F._length*B};else{let B=j.shapePositionToRange(F);k=function(O){return F._offset+F.r2p(B(O,!0))},z==="path"&&F.type==="date"&&(k=j.decodeDate(k))}else D?k=function(B){return n.t+n.h*(1-B)}:k=function(B){return n.l+n.w*B};return k}if(a==="array"?(y=[],i=e.xref.map(function(F){return v.getFromId(l,F)}),y=e.xref.map(function(F,R){return g(i[R],v.getRefType(F),t,!1)})):(i=v.getFromId(l,e.xref),y=g(i,a,t,!1)),r==="array"?(o=[],s=e.yref.map(function(F){return v.getFromId(l,F)}),o=e.yref.map(function(F,R){return g(s[R],v.getRefType(F),t,!0)})):(s=v.getFromId(l,e.yref),o=g(s,r,t,!0)),t==="path")return w(e,y,o);if(a==="array")c=S(i[0],e.x0shift),p=S(i[1],e.x1shift),x=y[0](e.x0)+c,M=y[1](e.x1)+p;else if(c=S(i,e.x0shift),p=S(i,e.x1shift),e.xsizemode==="pixel"){let F=y(e.xanchor);x=F+e.x0+c,M=F+e.x1+p}else x=y(e.x0)+c,M=y(e.x1)+p;if(r==="array")f=S(s[0],e.y0shift),d=S(s[1],e.y1shift),T=o[0](e.y0)+f,E=o[1](e.y1)+d;else if(f=S(s,e.y0shift),d=S(s,e.y1shift),e.ysizemode==="pixel"){let F=o(e.yanchor);T=F-e.y0+f,E=F-e.y1+d}else T=o(e.y0)+f,E=o(e.y1)+d;if(t==="line")return"M"+x+","+T+"L"+M+","+E;if(t==="rect")return"M"+x+","+T+"H"+M+"V"+E+"H"+x+"Z";var A=(x+M)/2,m=(T+E)/2,h=Math.abs(A-x),b=Math.abs(m-T),_="A"+h+","+b,I=A+h+","+m,C=A+","+(m-b);return"M"+I+_+" 0 1,1 "+C+_+" 0 0,1 "+I+"Z"};function w(l,e,t){let a=l.path,r=l.xsizemode,n=l.ysizemode,i=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),p=Array.isArray(l.yref);var f=0,d=0;return a.replace(N.segmentRE,function(y){var o=0,x=y.charAt(0),M=N.paramIsX[x],T=N.paramIsY[x],E=N.numParams[x];let g=M.drawn!==void 0,A=T.drawn!==void 0,m=c?e[f]:e,h=p?t[d]:t;var b=y.slice(1).replace(N.paramRE,function(_){return M[o]?r==="pixel"?_=m(i)+Number(_):_=m(_):T[o]&&(n==="pixel"?_=h(s)-Number(_):_=h(_)),o++,o>E&&(_="X"),_});return o>E&&(b=b.replace(/[\s,]*X.*/,""),u.log("Ignoring extra params in segment "+y)),g&&f++,A&&d++,x+b})}j.getPixelShift=S;function S(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),Y3=De({"src/components/shapes/display_labels.js"(j,N){"use strict";var u=Ar(),v=Vi(),w=Xs(),S=Ki(),l=Wv().readPaths,e=Yv(),t=e.getPathString,a=N_(),r=yc().FROM_TL;N.exports=function(c,p,f,d){if(d.selectAll(".shape-label").remove(),!!(f.label.text||f.label.texttemplate)){var y;if(f.label.texttemplate){var o={};if(f.type!=="path"){var x=v.getFromId(c,f.xref),M=v.getFromId(c,f.yref);let Z=Array.isArray(f.xref),Q=Array.isArray(f.yref);for(var T in a){var E=typeof a[T]=="function",g=!Z||a.simpleXVariables.includes(T),A=!Q||a.simpleYVariables.includes(T);if(E&&g&&A){var m=a[T](f,x,M);m!==void 0&&(o[T]=m)}}}y=u.texttemplateStringForShapes({data:[o],fallback:f.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:f.label.texttemplate})}else y=f.label.text;var h={"data-index":p},b=f.label.font,_={"data-notex":1},I=d.append("g").attr(h).classed("shape-label",!0),C=I.append("text").attr(_).classed("shape-label-text",!0).text(y),F,R,z,D;if(f.path){var k=t(c,f),B=l(k,c);F=1/0,z=1/0,R=-1/0,D=-1/0;for(var O=0;Oe.getDataToPixel(c,le,oe,!1,ne)(he),xe=(he,oe,le,ne)=>e.getDataToPixel(c,le,oe,!0,ne)(he);if(f.xsizemode==="pixel"){let he=Ue(f.xanchor,void 0,re,Ae),oe=e.getPixelShift(re,f.x0shift),le=e.getPixelShift(re,f.x1shift);F=he+f.x0+oe,R=he+f.x1+le}else F=Ue(f.x0,f.x0shift,re,Ae),R=Ue(f.x1,f.x1shift,ce,Se);if(f.ysizemode==="pixel"){let he=xe(f.yanchor,void 0,me,Ce),oe=e.getPixelShift(me,f.y0shift),le=e.getPixelShift(me,f.y1shift);z=he-f.y0+oe,D=he-f.y1+le}else z=xe(f.y0,f.y0shift,me,Ce),D=xe(f.y1,f.y1shift,ye,qe)}var U=f.label.textangle;U==="auto"&&(f.type==="line"?U=n(F,z,R,D):U=0),C.call(function(Z){return Z.call(S.font,b).attr({}),w.convertToTspans(Z,c),Z});var H=S.bBox(C.node()),K=i(F,z,R,D,f,U,H),V=K.textx,$=K.texty,X=K.xanchor;C.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[X],y:$,x:V,transform:"rotate("+U+","+V+","+$+")"}).call(w.positionText,V,$)}};function n(s,c,p,f){var d,y;return y=Math.abs(p-s),p>=s?d=c-f:d=f-c,-180/Math.PI*Math.atan2(d,y)}function i(s,c,p,f,d,y,o){var x=d.label.textposition,M=d.label.textangle,T=d.label.padding,E=d.type,g=Math.PI/180*y,A=Math.sin(g),m=Math.cos(g),h=d.label.xanchor,b=d.label.yanchor,_,I,C,F;if(E==="line"){x==="start"?(_=s,I=c):x==="end"?(_=p,I=f):(_=(s+p)/2,I=(c+f)/2),h==="auto"&&(x==="start"?M==="auto"?p>s?h="left":ps?h="right":ps?h="right":ps?h="left":p1&&!(xe.length===2&&xe[1][0]==="Z")&&(U===0&&(xe[0][0]="M"),_[ae]=xe,z(),D())}}function ce(xe,he){if(xe===2){ae=+he.srcElement.getAttribute("data-i"),U=+he.srcElement.getAttribute("data-j");var oe=_[ae];!y(oe)&&!o(oe)&&re()}}function me(xe){ee=[];for(var he=0;he<_.length;he++){var oe=_[he],le=y(oe),ne=!le&&o(oe);ee[he]=[];for(var be=oe.length,Fe=0;Fe{if(!C._dragging&&C._fullLayout.hoveranywhere){let B=D(k);B&&c.hover(C,B,R.id)}}),z.addEventListener("click",k=>{if(!C._dragged&&C._fullLayout.clickanywhere){let B=D(k);B&&c.click(C,B,R.id)}})}function g(C,F,R){let z=R.xref,D=R.yref;if(Array.isArray(z)||Array.isArray(D)){let k="clip"+F._fullLayout._uid+"shape"+R._index,B=A(F,z,D);w.ensureSingleById(F._fullLayout._clips,"clipPath",k,function(O){O.append("rect")}).select("rect").attr(B),n.setClipUrl(C,k,F)}else{let k=(z+D).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");n.setClipUrl(C,k?"clip"+F._fullLayout._uid+k:null,F)}}function A(C,F,R){let z=C._fullLayout._size;function D(O,q){let Y=(Array.isArray(O)?O:[O]).map(ae=>S.getFromId(C,ae)).filter(Boolean);if(!Y.length)return q?[z.t,z.t+z.h]:[z.l,z.l+z.w];let ee=Y.map(function(ae){return ae._offset}),te=Y.map(function(ae){return ae._offset+ae._length});return[Math.min(...ee),Math.max(...te)]}let k=D(F,!1),B=D(R,!0);return{x:k[0],y:B[0],width:k[1]-k[0],height:B[1]-B[0]}}function m(C,F,R,z,D,k){var B=10,O=10,q=R.xsizemode==="pixel",Y=R.ysizemode==="pixel",ee=R.type==="line",te=R.type==="path",ae=k.modifyItem,U,H,K,V,$,X,Z,Q,re,ce,me,ye,Ae,Se,Ce,qe=u.select(F.node().parentNode),Ue=S.getFromId(C,R.xref),xe=S.getRefType(R.xref),he=S.getFromId(C,R.yref),oe=S.getRefType(R.yref),le=R.x0shift,ne=R.x1shift,be=R.y0shift,Fe=R.y1shift,Ve=function(We,Xe){var mt=d.getDataToPixel(C,Ue,Xe,!1,xe);return mt(We)},je=function(We,Xe){var mt=d.getDataToPixel(C,he,Xe,!0,oe);return mt(We)},ut=d.getPixelToData(C,Ue,!1,xe),st=d.getPixelToData(C,he,!0,oe),yt=Zt(),At={element:yt.node(),gd:C,prepFn:Kt,doneFn:nt,clickFn:Ee},Pt;s.init(At),yt.node().onmousemove=Nt;function Zt(){return ee?vr():F}function vr(){var We=10,Xe=Math.max(R.line.width,We),mt=D.append("g").attr("data-index",z).attr("drag-helper",!0);mt.append("path").attr("d",F.attr("d")).style({cursor:"move","stroke-width":Xe,"stroke-opacity":"0"});var ft={"fill-opacity":"0"},ht=Math.max(Xe/2,We);return mt.append("circle").attr({"data-line-point":"start-point",cx:q?Ve(R.xanchor)+R.x0:Ve(R.x0,le),cy:Y?je(R.yanchor)-R.y0:je(R.y0,be),r:ht}).style(ft).classed("cursor-grab",!0),mt.append("circle").attr({"data-line-point":"end-point",cx:q?Ve(R.xanchor)+R.x1:Ve(R.x1,ne),cy:Y?je(R.yanchor)-R.y1:je(R.y1,Fe),r:ht}).style(ft).classed("cursor-grab",!0),mt}function Nt(We){if(x(C)){Pt=null;return}if(ee)We.target.tagName==="path"?Pt="move":Pt=We.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var Xe=At.element.getBoundingClientRect(),mt=Xe.right-Xe.left,ft=Xe.bottom-Xe.top,ht=We.clientX-Xe.left,gt=We.clientY-Xe.top,_t=!te&&mt>B&&ft>O&&!We.shiftKey?s.getCursor(ht/mt,1-gt/ft):"move";p(F,_t),Pt=_t.split("-")[0]}}function Kt(We){x(C)||(q&&($=Ve(R.xanchor)),Y&&(X=je(R.yanchor)),R.type==="path"?Ce=R.path:(U=q?R.x0:Ve(R.x0),H=Y?R.y0:je(R.y0),K=q?R.x1:Ve(R.x1),V=Y?R.y1:je(R.y1)),UV?(Z=H,me="y0",Q=V,ye="y1"):(Z=V,me="y1",Q=H,ye="y0"),Nt(We),_e(D,R),Be(F,R,C),At.moveFn=Pt==="move"?ze:ve,At.altKey=We.altKey)}function nt(){x(C)||(p(F),Ie(D),g(F,C,R),v.call("_guiRelayout",C,k.getUpdateObj()))}function Ee(){x(C)||Ie(D)}function ze(We,Xe){if(R.type==="path"){var mt=function(gt){return gt},ft=mt,ht=mt;q?ae("xanchor",R.xanchor=ut($+We)):(ft=function(_t){return ut(Ve(_t)+We)},Ue&&Ue.type==="date"&&(ft=d.encodeDate(ft))),Y?ae("yanchor",R.yanchor=st(X+Xe)):(ht=function(_t){return st(je(_t)+Xe)},he&&he.type==="date"&&(ht=d.encodeDate(ht))),ae("path",R.path=h(Ce,ft,ht))}else q?ae("xanchor",R.xanchor=ut($+We)):(ae("x0",R.x0=ut(U+We)),ae("x1",R.x1=ut(K+We))),Y?ae("yanchor",R.yanchor=st(X+Xe)):(ae("y0",R.y0=st(H+Xe)),ae("y1",R.y1=st(V+Xe)));F.attr("d",y(C,R)),_e(D,R),t(C,z,R,qe)}function ve(We,Xe){if(te){var mt=function(Da){return Da},ft=mt,ht=mt;q?ae("xanchor",R.xanchor=ut($+We)):(ft=function(La){return ut(Ve(La)+We)},Ue&&Ue.type==="date"&&(ft=d.encodeDate(ft))),Y?ae("yanchor",R.yanchor=st(X+Xe)):(ht=function(La){return st(je(La)+Xe)},he&&he.type==="date"&&(ht=d.encodeDate(ht))),ae("path",R.path=h(Ce,ft,ht))}else if(ee){if(Pt==="resize-over-start-point"){var gt=U+We,_t=Y?H-Xe:H+Xe;ae("x0",R.x0=q?gt:ut(gt)),ae("y0",R.y0=Y?_t:st(_t))}else if(Pt==="resize-over-end-point"){var Ft=K+We,St=Y?V-Xe:V+Xe;ae("x1",R.x1=q?Ft:ut(Ft)),ae("y1",R.y1=Y?St:st(St))}}else{var hr=function(Da){return Pt.indexOf(Da)!==-1},jr=hr("n"),ra=hr("s"),$r=hr("w"),pa=hr("e"),oa=jr?Z+Xe:Z,aa=ra?Q+Xe:Q,ka=$r?re+We:re,Ta=pa?ce+We:ce;Y&&(jr&&(oa=Z-Xe),ra&&(aa=Q-Xe)),(!Y&&aa-oa>O||Y&&oa-aa>O)&&(ae(me,R[me]=Y?oa:st(oa)),ae(ye,R[ye]=Y?aa:st(aa))),Ta-ka>B&&(ae(Ae,R[Ae]=q?ka:ut(ka)),ae(Se,R[Se]=q?Ta:ut(Ta)))}F.attr("d",y(C,R)),_e(D,R),t(C,z,R,qe)}function _e(We,Xe){(q||Y)&&mt();function mt(){var ft=Xe.type!=="path",ht=We.selectAll(".visual-cue").data([0]),gt=1;ht.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":gt}).classed("visual-cue",!0);var _t=Ve(q?Xe.xanchor:w.midRange(ft?[Xe.x0,Xe.x1]:d.extractPathCoords(Xe.path,f.paramIsX))),Ft=je(Y?Xe.yanchor:w.midRange(ft?[Xe.y0,Xe.y1]:d.extractPathCoords(Xe.path,f.paramIsY)));if(_t=d.roundPositionForSharpStrokeRendering(_t,gt),Ft=d.roundPositionForSharpStrokeRendering(Ft,gt),q&&Y){var St="M"+(_t-1-gt)+","+(Ft-1-gt)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";ht.attr("d",St)}else if(q){var hr="M"+(_t-1-gt)+","+(Ft-9-gt)+"v18 h2 v-18 Z";ht.attr("d",hr)}else{var jr="M"+(_t-9-gt)+","+(Ft-1-gt)+"h18 v2 h-18 Z";ht.attr("d",jr)}}}function Ie(We){We.selectAll(".visual-cue").remove()}function Be(We,Xe,mt){var ft=Xe.xref,ht=Xe.yref,gt=S.getFromId(mt,ft),_t=S.getFromId(mt,ht),Ft="";ft!=="paper"&&!gt.autorange&&(Ft+=ft),ht!=="paper"&&!_t.autorange&&(Ft+=ht),n.setClipUrl(We,Ft?"clip"+mt._fullLayout._uid+Ft:null,mt)}}function h(C,F,R){return C.replace(f.segmentRE,function(z){var D=0,k=z.charAt(0),B=f.paramIsX[k],O=f.paramIsY[k],q=f.numParams[k],Y=z.slice(1).replace(f.paramRE,function(ee){return D>=q||(B[D]?ee=F(ee):O[D]&&(ee=R(ee)),D++),ee});return k+Y})}function b(C,F){if(M(C)){var R=F.node(),z=+R.getAttribute("data-index");if(z>=0){if(z===C._fullLayout._activeShapeIndex){_(C);return}C._fullLayout._activeShapeIndex=z,C._fullLayout._deactivateShape=_,o(C)}}}function _(C){if(M(C)){var F=C._fullLayout._activeShapeIndex;F>=0&&(a(C),delete C._fullLayout._activeShapeIndex,o(C))}}function I(C){if(M(C)){a(C);var F=C._fullLayout._activeShapeIndex,R=(C.layout||{}).shapes||[];if(F-K),[q,Y]=D.invert(z.midPt),{minscale:ee}=R.projection,te=(m=R.projection.maxscale)!=null?m:1/0,ae=Math.min(ee,te),U=Math.max(ee,te),H=_==="in"?f*k:1/f*k;H>U?H=U:HK3});var Q_,$3,K3,J3=di({"src/components/modebar/attributes.ts"(){"use strict";Q_=Du(Z3()),$3={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["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`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${Q_.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${Q_.default.foreButtons.join("*, *")}*.`].join(" ")}},K3=$3}}),nR=De({"src/components/modebar/defaults.js"(j,N){"use strict";var u=Ar(),v=ii(),w=ws(),S=(J3(),ts(J_)).default;N.exports=function(e,t){var a=e.modebar||{},r=w.newContainer(t,"modebar");function n(s,c){return u.coerce(a,r,S,s,c)}n("orientation"),n("bgcolor",v.addOpacity(t.paper_bgcolor,.5));var i=v.contrast(v.rgb(t.modebar.bgcolor));n("color",v.addOpacity(i,.3)),n("activecolor",v.addOpacity(i,.7)),n("uirevision",t.uirevision),n("add"),n("remove")}}}),iR=De({"src/components/modebar/modebar.js"(j,N){"use strict";var u=Qn(),v=io(),w=Ar(),S=W_(),l=cf().version,e=new DOMParser;function t(i){this.container=i.container,this.element=document.createElement("div"),this.update(i.graphInfo,i.buttons),this.container.appendChild(this.element)}var a=t.prototype;a.update=function(i,s){this.graphInfo=i;var c=this.graphInfo._context,p=this.graphInfo._fullLayout,f="modebar-"+p._uid;this.element.setAttribute("id",f),this.element.setAttribute("role","toolbar"),this._uid=f,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),p.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var d=p.modebar,y="#"+f+" .modebar-group";document.querySelectorAll(y).forEach(function(E){E.style.backgroundColor=d.bgcolor});var o=!this.hasButtons(s),x=this.hasLogo!==c.displaylogo,M=this.locale!==c.locale;if(this.locale=c.locale,(o||x||M)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var T=this.getLogo();c.watermark&&(T.className=T.className+" watermark"),p.modebar.orientation==="v"?this.element.insertBefore(T,this.element.childNodes[0]):this.element.appendChild(T),this.hasLogo=!0}this.updateActiveButton(),w.setStyleOnHover("#"+f+" .modebar-btn",".active",".icon path","fill: "+d.activecolor,"fill: "+d.color,this.element)},a.updateButtons=function(i){var s=this;this.buttons=i,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var p=s.createGroup();c.forEach(function(f){var d=f.name;if(!d)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(d)!==-1)throw new Error("button name '"+d+"' is taken");s.buttonsNames.push(d);var y=s.createButton(f);s.buttonElements.push(y),p.appendChild(y)}),s.element.appendChild(p)})},a.createGroup=function(){var i=document.createElement("div");i.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return i.style.backgroundColor=s.bgcolor,i},a.createButton=function(i){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var p=i.title;p===void 0?p=i.name:typeof p=="function"&&(p=p(this.graphInfo)),(p||p===0)&&(c.setAttribute("data-title",p),c.setAttribute("aria-label",p)),i.attr!==void 0&&c.setAttribute("data-attr",i.attr);var f=i.val;f!==void 0&&(typeof f=="function"&&(f=f(this.graphInfo)),c.setAttribute("data-val",f));var d=i.click;if(typeof d!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(o){i.click(s.graphInfo,o),s.updateActiveButton(o.currentTarget)}),c.setAttribute("data-toggle",i.toggle||!1),i.toggle&&u.select(c).classed("active",!0);var y=i.icon;return typeof y=="function"?c.appendChild(y()):c.appendChild(this.createIcon(y||S.question)),c.setAttribute("data-gravity",i.gravity||"n"),c},a.createIcon=function(i){var s=v(i.height)?Number(i.height):i.ascent-i.descent,c="http://www.w3.org/2000/svg",p;if(i.path){p=document.createElementNS(c,"svg"),p.setAttribute("viewBox",[0,0,i.width,s].join(" ")),p.setAttribute("class","icon");var f=document.createElementNS(c,"path");f.setAttribute("d",i.path),i.transform?f.setAttribute("transform",i.transform):i.ascent!==void 0&&f.setAttribute("transform","matrix(1 0 0 -1 0 "+i.ascent+")"),p.appendChild(f)}if(i.svg){var d=e.parseFromString(i.svg,"application/xml");p=d.childNodes[0]}return p.setAttribute("height","1em"),p.setAttribute("width","1em"),p},a.updateActiveButton=function(i){var s=this.graphInfo._fullLayout,c=i!==void 0?i.getAttribute("data-attr"):null;this.buttonElements.forEach(function(p){var f=p.getAttribute("data-val")||!0,d=p.getAttribute("data-attr"),y=p.getAttribute("data-toggle")==="true",o=u.select(p),x=function(E,g){var A=s.modebar,m=E.querySelector(".icon path");m&&(g||E.matches(":hover")?m.style.fill=A.activecolor:m.style.fill=A.color)};if(y){if(d===c){var M=!o.classed("active");o.classed("active",M),x(p,M)}}else{var T=d===null?d:w.nestedProperty(s,d).get();o.classed("active",T===f),x(p,T===f)}})},a.hasButtons=function(i){var s=this.buttons;if(!s||i.length!==s.length)return!1;for(var c=0;c1?(ee=["toggleHover"],te=["resetViews"]):h?(Y=["zoomInGeo","zoomOutGeo"],ee=["hoverClosestGeo"],te=["resetGeo"]):m?(ee=["hoverClosest3d"],te=["resetCameraDefault3d","resetCameraLastSave3d"]):C?(Y=["zoomInMap","zoomOutMap"],ee=["toggleHover"],te=["resetViewMap"]):b?ee=["hoverClosestPie"]:z?(ee=["hoverClosestCartesian","hoverCompareCartesian"],te=["resetViewSankey"]):ee=["toggleHover"],A&&ee.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(y)||k)&&(ee=[]),A&&!D&&(Y=["zoomIn2d","zoomOut2d","autoScale2d"],te[0]!=="resetViews"&&(te=["resetScale2d"])),m?ae=["zoom3d","pan3d","orbitRotation","tableRotation"]:A&&!D||I?ae=["zoom2d","pan2d"]:C||h?ae=["pan2d"]:F&&(ae=["zoom2d"]),i(y)&&ae.push("select2d","lasso2d");var U=[],H=function(X){U.indexOf(X)===-1&&ee.indexOf(X)!==-1&&U.push(X)};if(Array.isArray(E)){for(var K=[],V=0;VM?y.slice(M):o.slice(x))+T}function c(f,d){for(var y=d._size,o=y.h/y.w,x={},M=Object.keys(f),T=0;Te*I&&!z)){for(M=0;MU&&rete&&(te=re);var me=(te-ee)/(2*ae);h/=me,ee=g.l2r(ee),te=g.l2r(te),g.range=g._input.range=O=D[1]||q[1]<=D[0])&&Y[0]k[0])return!0}return!1}function T(D){var k=D._fullLayout,B=k._size,O=B.p,q=n.list(D,"",!0),Y,ee,te,ae,U,H;if(k._paperdiv.style({width:D._context.responsive&&k.autosize&&!D._context._hasZeroWidth&&!D.layout.width?"100%":k.width+"px",height:D._context.responsive&&k.autosize&&!D._context._hasZeroHeight&&!D.layout.height?"100%":k.height+"px"}).selectAll(".main-svg").call(t.setSize,k.width,k.height),D._context.setBackground(D,k.paper_bgcolor),j.drawMainTitle(D),r.manage(D),!k._has("cartesian"))return v.previousPromises(D);function K(ve,_e,Ie){var Be=ve._lw/2;if(ve._id.charAt(0)==="x"){if(_e){if(Ie==="top")return _e._offset-O-Be}else return B.t+B.h*(1-(ve.position||0))+Be%1;return _e._offset+_e._length+O+Be}if(_e){if(Ie==="right")return _e._offset+_e._length+O+Be}else return B.l+B.w*(ve.position||0)+Be%1;return _e._offset-O-Be}for(Y=0;Y0){_(D,Y,U,ae),te.attr({x:ee,y:Y,"text-anchor":O,dy:F(k.yanchor)}).call(S.positionText,ee,Y);var H=(k.text.match(S.BR_TAG_ALL)||[]).length;if(H){var K=i.LINE_SPACING*H+i.MID_SHIFT;k.y===0&&(K=-K),te.selectAll(".line").each(function(){var Q=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",Q)})}var V=N.select(D).selectAll(".gtitle-subtitle");if(V.node()){var $=te.node().getBBox(),X=$.y+$.height,Z=X+a.SUBTITLE_PADDING_EM*k.subtitle.font.size;V.attr({x:ee,y:Z,"text-anchor":O,dy:F(k.yanchor)}).call(S.positionText,ee,Z)}}}};function m(D,k,B,O,q){var Y=k.yref==="paper"?D._fullLayout._size.h:D._fullLayout.height,ee=w.isTopAnchor(k)?O:O-q,te=B==="b"?Y-ee:ee;return w.isTopAnchor(k)&&B==="t"||w.isBottomAnchor(k)&&B==="b"?!1:te.5?"t":"b",ee=D._fullLayout.margin[Y],te=0;return k.yref==="paper"?te=B+k.pad.t+k.pad.b:k.yref==="container"&&(te=h(Y,O,q,D._fullLayout.height,B)+k.pad.t+k.pad.b),te>ee?te:0}function _(D,k,B,O){var q="title.automargin",Y=D._fullLayout.title,ee=Y.y>.5?"t":"b",te={x:Y.x,y:Y.y,t:0,b:0},ae={};Y.yref==="paper"&&m(D,Y,ee,k,O)?te[ee]=B:Y.yref==="container"&&(ae[ee]=B,D._fullLayout._reservedMargin[q]=ae),v.allowAutoMargin(D,q),v.autoMargin(D,q,te)}function I(D,k){var B=D.title,O=D._size,q=0;switch(k===d?q=B.pad.l:k===o&&(q=-B.pad.r),B.xref){case"paper":return O.l+O.w*B.x+q;case"container":default:return D.width*B.x+q}}function C(D,k){var B=D.title,O=D._size,q=0;if(k==="0em"||!k?q=-B.pad.b:k===i.CAP_SHIFT+"em"&&(q=B.pad.t),B.y==="auto")return O.t/2;switch(B.yref){case"paper":return O.t+O.h-O.h*B.y+q;case"container":default:return D.height-D.height*B.y+q}}function F(D){return D==="top"?i.CAP_SHIFT+.3+"em":D==="bottom"?"-0.3em":i.MID_SHIFT+"em"}function R(D){var k=D.title,B=y;return w.isRightAnchor(k)?B=o:w.isLeftAnchor(k)&&(B=d),B}function z(D){var k=D.title,B="0em";return w.isTopAnchor(k)?B=i.CAP_SHIFT+"em":w.isMiddleAnchor(k)&&(B=i.MID_SHIFT+"em"),B}j.doTraceStyle=function(D){var k=D.calcdata,B=[],O;for(O=0;O=0;R--){var z=E.append("path").attr(A).style("opacity",R?.1:m).call(S.stroke,b).call(S.fill,h).call(l.dashLine,R?"solid":I,R?4+_:_);if(s(z,d,x),C){var D=e(d.layout,"selections",x);z.style({cursor:"move"});var k={element:z.node(),plotinfo:M,gd:d,editHelpers:D,isActiveSelection:!0},B=u(g,d);v(B,z,k)}else z.style("pointer-events",R?"all":"none");F[R]=z}var O=F[0],q=F[1];q.node().addEventListener("click",function(){return c(d,O)})}}function s(d,y,o){var x=o.xref+o.yref;l.setClipUrl(d,"clip"+y._fullLayout._uid+x,y)}function c(d,y){if(n(d)){var o=y.node(),x=+o.getAttribute("data-index");if(x>=0){if(x===d._fullLayout._activeSelectionIndex){f(d);return}d._fullLayout._activeSelectionIndex=x,d._fullLayout._deactivateSelection=f,r(d)}}}function p(d){if(n(d)){var y=d._fullLayout.selections.length-1;d._fullLayout._activeSelectionIndex=y,d._fullLayout._deactivateSelection=f,r(d)}}function f(d){if(n(d)){var y=d._fullLayout._activeSelectionIndex;y>=0&&(w(d),delete d._fullLayout._activeSelectionIndex,r(d))}}}}),sR=De({"node_modules/polybooljs/lib/build-log.js"(j,N){function u(){var v,w=0,S=!1;function l(e,t){return v.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),v}return v={list:[],segmentId:function(){return w++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,a){return l("temp_status",{seg:e,above:t,below:a})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,a){return l("status",{seg:e,above:t,below:a})},vert:function(e){return e===S?v:(S=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},v}N.exports=u}}),lR=De({"node_modules/polybooljs/lib/epsilon.js"(j,N){function u(v){typeof v!="number"&&(v=1e-10);var w={epsilon:function(S){return typeof S=="number"&&(v=S),v},pointAboveOrOnLine:function(S,l,e){var t=l[0],a=l[1],r=e[0],n=e[1],i=S[0],s=S[1];return(r-t)*(s-a)-(n-a)*(i-t)>=-v},pointBetween:function(S,l,e){var t=S[1]-l[1],a=e[0]-l[0],r=S[0]-l[0],n=e[1]-l[1],i=r*a+t*n;if(i-v)},pointsSameX:function(S,l){return Math.abs(S[0]-l[0])v!=r-t>v&&(a-s)*(t-c)/(r-c)+s-e>v&&(n=!n),a=s,r=c}return n}};return w}N.exports=u}}),uR=De({"node_modules/polybooljs/lib/linked-list.js"(j,N){var u={create:function(){var v={root:{root:!0,next:null},exists:function(w){return!(w===null||w===v.root)},isEmpty:function(){return v.root.next===null},getHead:function(){return v.root.next},insertBefore:function(w,S){for(var l=v.root,e=v.root.next;e!==null;){if(S(e)){w.prev=e.prev,w.next=e,e.prev.next=w,e.prev=w;return}l=e,e=e.next}l.next=w,w.prev=l,w.next=null},findTransition:function(w){for(var S=v.root,l=v.root.next;l!==null&&!w(l);)S=l,l=l.next;return{before:S===v.root?null:S,after:l,insert:function(e){return e.prev=S,e.next=l,S.next=e,l!==null&&(l.prev=e),e}}}};return v},node:function(v){return v.prev=null,v.next=null,v.remove=function(){v.prev.next=v.next,v.next&&(v.next.prev=v.prev),v.prev=null,v.next=null},v}};N.exports=u}}),cR=De({"node_modules/polybooljs/lib/intersecter.js"(j,N){var u=uR();function v(w,S,l){function e(y,o){return{id:l?l.segmentId():-1,start:y,end:o,myFill:{above:null,below:null},otherFill:null}}function t(y,o,x){return{id:l?l.segmentId():-1,start:y,end:o,myFill:{above:x.myFill.above,below:x.myFill.below},otherFill:null}}var a=u.create();function r(y,o,x,M,T,E){var g=S.pointsCompare(o,T);return g!==0?g:S.pointsSame(x,E)?0:y!==M?y?1:-1:S.pointAboveOrOnLine(x,M?T:E,M?E:T)?1:-1}function n(y,o){a.insertBefore(y,function(x){var M=r(y.isStart,y.pt,o,x.isStart,x.pt,x.other.pt);return M<0})}function i(y,o){var x=u.node({isStart:!0,pt:y.start,seg:y,primary:o,other:null,status:null});return n(x,y.end),x}function s(y,o,x){var M=u.node({isStart:!1,pt:o.end,seg:o,primary:x,other:y,status:null});y.other=M,n(M,y.pt)}function c(y,o){var x=i(y,o);return s(x,y,o),x}function p(y,o){l&&l.segmentChop(y.seg,o),y.other.remove(),y.seg.end=o,y.other.pt=o,n(y.other,y.pt)}function f(y,o){var x=t(o,y.seg.end,y.seg);return p(y,o),c(x,y.primary)}function d(y,o){var x=u.create();function M(D,k){var B=D.seg.start,O=D.seg.end,q=k.seg.start,Y=k.seg.end;return S.pointsCollinear(B,q,Y)?S.pointsCollinear(O,q,Y)||S.pointAboveOrOnLine(O,q,Y)?1:-1:S.pointAboveOrOnLine(B,q,Y)?1:-1}function T(D){return x.findTransition(function(k){var B=M(D,k.ev);return B>0})}function E(D,k){var B=D.seg,O=k.seg,q=B.start,Y=B.end,ee=O.start,te=O.end;l&&l.checkIntersection(B,O);var ae=S.linesIntersect(q,Y,ee,te);if(ae===!1){if(!S.pointsCollinear(q,Y,ee)||S.pointsSame(q,te)||S.pointsSame(Y,ee))return!1;var U=S.pointsSame(q,ee),H=S.pointsSame(Y,te);if(U&&H)return k;var K=!U&&S.pointBetween(q,ee,te),V=!H&&S.pointBetween(Y,ee,te);if(U)return V?f(k,Y):f(D,te),k;K&&(H||(V?f(k,Y):f(D,te)),f(k,q))}else ae.alongA===0&&(ae.alongB===-1?f(D,ee):ae.alongB===0?f(D,ae.pt):ae.alongB===1&&f(D,te)),ae.alongB===0&&(ae.alongA===-1?f(k,q):ae.alongA===0?f(k,ae.pt):ae.alongA===1&&f(k,Y));return!1}for(var g=[];!a.isEmpty();){var A=a.getHead();if(l&&l.vert(A.pt[0]),A.isStart){let D=function(){if(b){var k=E(A,b);if(k)return k}return _?E(A,_):!1};var m=D;l&&l.segmentNew(A.seg,A.primary);var h=T(A),b=h.before?h.before.ev:null,_=h.after?h.after.ev:null;l&&l.tempStatus(A.seg,b?b.seg:!1,_?_.seg:!1);var I=D();if(I){if(w){var C;A.seg.myFill.below===null?C=!0:C=A.seg.myFill.above!==A.seg.myFill.below,C&&(I.seg.myFill.above=!I.seg.myFill.above)}else I.seg.otherFill=A.seg.myFill;l&&l.segmentUpdate(I.seg),A.other.remove(),A.remove()}if(a.getHead()!==A){l&&l.rewind(A.seg);continue}if(w){var C;A.seg.myFill.below===null?C=!0:C=A.seg.myFill.above!==A.seg.myFill.below,_?A.seg.myFill.below=_.seg.myFill.above:A.seg.myFill.below=y,C?A.seg.myFill.above=!A.seg.myFill.below:A.seg.myFill.above=A.seg.myFill.below}else if(A.seg.otherFill===null){var F;_?A.primary===_.primary?F=_.seg.otherFill.above:F=_.seg.myFill.above:F=A.primary?o:y,A.seg.otherFill={above:F,below:F}}l&&l.status(A.seg,b?b.seg:!1,_?_.seg:!1),A.other.status=h.insert(u.node({ev:A}))}else{var R=A.status;if(R===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(x.exists(R.prev)&&x.exists(R.next)&&E(R.prev.ev,R.next.ev),l&&l.statusRemove(R.ev.seg),R.remove(),!A.primary){var z=A.seg.myFill;A.seg.myFill=A.seg.otherFill,A.seg.otherFill=z}g.push(A.seg)}a.getHead().remove()}return l&&l.done(),g}return w?{addRegion:function(y){for(var o,x=y[y.length-1],M=0;Mt!=f>t&&e<(p-s)*(t-c)/(f-c)+s;d&&(a=!a)}return a}}}),C1=De({"src/lib/polygon.js"(j,N){"use strict";var u=O_().dot,v=Ho().BADNUM,w=N.exports={};w.tester=function(l){var e=l.slice(),t=e[0][0],a=t,r=e[0][1],n=r,i;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),i=1;ia||T===v||Tn||x&&c(o))}function f(o,x){var M=o[0],T=o[1];if(M===v||Ma||T===v||Tn)return!1;var E=e.length,g=e[0][0],A=e[0][1],m=0,h,b,_,I,C;for(h=1;hMath.max(b,g)||T>Math.max(_,A)))if(Ti||Math.abs(u(f,c))>a)return!0;return!1},w.filter=function(l,e){var t=[l[0]],a=0,r=0;function n(s){l.push(s);var c=t.length,p=a;t.splice(r+1);for(var f=p+1;f1){var i=l.pop();n(i)}return{addPt:n,raw:l,filtered:t}}}}),mR=De({"src/components/selections/constants.js"(j,N){"use strict";N.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),gR=De({"src/components/selections/select.js"(j,N){"use strict";var u=vR(),v=pR(),w=hi(),S=Ki().dashStyle,l=ii(),e=uu(),t=Ch().makeEventData,a=Ed(),r=a.freeMode,n=a.rectMode,i=a.drawMode,s=a.openMode,c=a.selectMode,p=Yv(),f=E1(),d=$_(),y=qv().clearOutline,o=Wv(),x=o.handleEllipse,M=o.readPaths,T=Z_().newShapes,E=W3(),g=tw().activateLastSelection,A=Ar(),m=A.sorterAsc,h=C1(),b=q_(),_=lu().getFromId,I=S1(),C=k1().redrawReglTraces,F=mR(),R=F.MINSELECT,z=h.filter,D=h.tester,k=X_(),B=k.p2r,O=k.axValue,q=k.getTransform;function Y(Ee){return Ee.subplot!==void 0}function ee(Ee,ze,ve,_e,Ie){var Be=!Y(_e),We=r(Ie),Xe=n(Ie),mt=s(Ie),ft=i(Ie),ht=c(Ie),gt=Ie==="drawline",_t=Ie==="drawcircle",Ft=gt||_t,St=_e.gd,hr=St._fullLayout,jr=ht&&hr.newselection.mode==="immediate"&&Be,ra=hr._zoomlayer,$r=_e.element.getBoundingClientRect(),pa=_e.plotinfo,oa=q(pa),aa=ze-$r.left,ka=ve-$r.top;hr._calcInverseTransform(St);var Ta=A.apply3DTransform(hr._invTransform)(aa,ka);aa=Ta[0],ka=Ta[1];var Da=hr._invScaleX,La=hr._invScaleY,Ga=aa,xa=ka,Gn="M"+aa+","+ka,Pn=_e.xaxes[0],sn=_e.yaxes[0],Yn=Pn._length,Zn=sn._length,vi=Ee.altKey&&!(i(Ie)&&mt),Dn,oi,on,mn,bi,Li,$a;V(Ee,St,_e),We&&(Dn=z([[aa,ka]],F.BENDPX));var Va=ra.selectAll("path.select-outline-"+pa.id).data([1]),it=ft?hr.newshape:hr.newselection;ft&&(_e.hasText=it.label.text||it.label.texttemplate);var Qe=ft&&!mt?it.fillcolor:"rgba(0,0,0,0)",Jt=it.line.color||(Be?l.contrast(St._fullLayout.plot_bgcolor):"#7f7f7f");Va.enter().append("path").attr("class","select-outline select-outline-"+pa.id).style({opacity:ft?it.opacity/2:1,"stroke-dasharray":S(it.line.dash,it.line.width),"stroke-width":it.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,Jt).call(l.fill,Qe).attr("fill-rule","evenodd").classed("cursor-move",!!ft).attr("transform",oa).attr("d",Gn+"Z");var Yt=ra.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",oa).attr("d","M0,0Z");if(ft&&_e.hasText){var ar=ra.select(".label-temp");ar.empty()&&(ar=ra.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var cr=hr._uid+F.SELECTID,tr=[],Je=re(St,_e.xaxes,_e.yaxes,_e.subplot);jr&&!Ee.shiftKey&&(_e._clearSubplotSelections=function(){if(Be){var qt=Pn._id,Qt=sn._id;Ve(St,qt,Qt,Je);for(var br=(St.layout||{}).selections||[],Ir=[],Cr=!1,Mr=0;Mr=0){St._fullLayout._deactivateShape(St);return}if(!ft){var br=hr.clickmode;b.done(cr).then(function(){if(b.clear(cr),qt===2){for(Va.remove(),bi=0;bi-1&&te(Qt,St,_e.xaxes,_e.yaxes,_e.subplot,_e,Va),br==="event"&&Kt(St,void 0);e.click(St,Qt,pa.id)}).catch(A.error)}},_e.doneFn=function(){Yt.remove(),b.done(cr).then(function(){b.clear(cr),!jr&&mn&&_e.selectionDefs&&(mn.subtract=vi,_e.selectionDefs.push(mn),_e.mergedPolygons.length=0,[].push.apply(_e.mergedPolygons,on)),(jr||ft)&&Z(_e,jr),_e.doneFnCompleted&&_e.doneFnCompleted(tr),ht&&Kt(St,$a)}).catch(A.error)}}function te(Ee,ze,ve,_e,Ie,Be,We){var Xe=ze._hoverdata,mt=ze._fullLayout,ft=mt.clickmode,ht=ft.indexOf("event")>-1,gt=[],_t,Ft,St,hr,jr,ra,$r,pa,oa,aa;if(me(Xe)){V(Ee,ze,Be),_t=re(ze,ve,_e,Ie);var ka=ye(Xe,_t),Ta=ka.pointNumbers.length>0;if(Ta?Se(_t,ka):Ce(_t)&&($r=Ae(ka))){for(We&&We.remove(),aa=0;aa<_t.length;aa++)Ft=_t[aa],Ft._module.selectPoints(Ft,!1);qe(ze,_t),Z(Be),ht&&nt(ze)}else{pa=Ee.shiftKey&&($r!==void 0?$r:Ae(ka)),St=ae(ka.pointNumber,ka.searchInfo,pa);var Da=Be.selectionDefs.concat([St]);for(hr=K(Da,hr),aa=0;aa<_t.length;aa++)if(jr=_t[aa]._module.selectPoints(_t[aa],hr),ra=he(jr,_t[aa]),gt.length)for(var La=0;La=0}function X(Ee){return Ee._fullLayout._activeSelectionIndex>=0}function Z(Ee,ze){var ve=Ee.dragmode,_e=Ee.plotinfo,Ie=Ee.gd;$(Ie)&&Ie._fullLayout._deactivateShape(Ie),X(Ie)&&Ie._fullLayout._deactivateSelection(Ie);var Be=Ie._fullLayout,We=Be._zoomlayer,Xe=i(ve),mt=c(ve);if(Xe||mt){var ft=We.selectAll(".select-outline-"+_e.id);if(ft&&Ie._fullLayout._outlining){var ht;Xe&&(ht=T(ft,Ee)),ht&&w.call("_guiRelayout",Ie,{shapes:ht});var gt;mt&&!Y(Ee)&&(gt=E(ft,Ee)),gt&&(Ie._fullLayout._noEmitSelectedAtStart=!0,w.call("_guiRelayout",Ie,{selections:gt}).then(function(){ze&&g(Ie)})),Ie._fullLayout._outlining=!1}}_e.selection={},_e.selection.selectionDefs=Ee.selectionDefs=[],_e.selection.mergedPolygons=Ee.mergedPolygons=[]}function Q(Ee){return Ee._id}function re(Ee,ze,ve,_e){if(!Ee.calcdata)return[];var Ie=[],Be=ze.map(Q),We=ve.map(Q),Xe,mt,ft;for(ft=0;ft0,Be=Ie?_e[0]:ve;return ze.selectedpoints?ze.selectedpoints.indexOf(Be)>-1:!1}function Se(Ee,ze){var ve=[],_e,Ie,Be,We;for(We=0;We0&&ve.push(_e);if(ve.length===1&&(Be=ve[0]===ze.searchInfo,Be&&(Ie=ze.searchInfo.cd[0].trace,Ie.selectedpoints.length===ze.pointNumbers.length))){for(We=0;We1||(ze+=_e.selectedpoints.length,ze>1)))return!1;return ze===1}function qe(Ee,ze,ve){var _e,Ie;for(_e=0;_e-1&&ze;if(!We&&ze){var qt=ut(Ee,!0);if(qt.length){var Qt=qt[0].xref,br=qt[0].yref;if(Qt&&br){var Ir=At(qt),Cr=Zt([_(Ee,Qt,"x"),_(Ee,br,"y")]);Cr(tr,Ir)}}Ee._fullLayout._noEmitSelectedAtStart?Ee._fullLayout._noEmitSelectedAtStart=!1:bt&&Kt(Ee,tr),_t._reselect=!1}if(!We&&_t._deselect){var Mr=_t._deselect;Xe=Mr.xref,mt=Mr.yref,Fe(Xe,mt,ht)||Ve(Ee,Xe,mt,_e),bt&&(tr.points.length?Kt(Ee,tr):nt(Ee)),_t._deselect=!1}return{eventData:tr,selectionTesters:ve}}function be(Ee){var ze=Ee.calcdata;if(ze)for(var ve=0;ve=0){it._fullLayout._deactivateShape(it);return}var Qe=it._fullLayout.clickmode;if(U(it),$a===2&&!he&&Dn(),xe)Qe.indexOf("select")>-1&&A(Va,it,Fe,Ve,ce.id,ft),Qe.indexOf("event")>-1&&n.click(it,Va,ce.id);else if($a===1&&he){var Jt=Ce?le:oe,Yt=Ce==="s"||qe==="w"?0:1,ar=Jt._name+".range["+Yt+"]",cr=D(Jt,Yt),tr="left",Je="middle";if(Jt.fixedrange)return;Ce?(Je=Ce==="n"?"top":"bottom",Jt.side==="right"&&(tr="right")):qe==="e"&&(tr="right"),it._context.showAxisRangeEntryBoxes&&u.select(mt).call(t.makeEditable,{gd:it,immediate:!0,background:it._fullLayout.paper_bgcolor,text:String(cr),fill:Jt.tickfont?Jt.tickfont.color:"#444",horizontalAlign:tr,verticalAlign:Je}).on("edit",function(bt){var qt=Jt.d2r(bt);qt!==void 0&&l.call("_guiRelayout",it,ar,qt)})}}c.init(ft);var _t,Ft,St,hr,jr,ra,$r,pa,oa,aa;function ka($a,Va,it){var Qe=mt.getBoundingClientRect();_t=Va-Qe.left,Ft=it-Qe.top,re._fullLayout._calcInverseTransform(re);var Jt=v.apply3DTransform(re._fullLayout._invTransform)(_t,Ft);_t=Jt[0],Ft=Jt[1],St={l:_t,r:_t,w:0,t:Ft,b:Ft,h:0},hr=re._hmpixcount?re._hmlumcount/re._hmpixcount:a.color(re._fullLayout.plot_bgcolor).luminosity(),jr="M0,0H"+st+"V"+yt+"H0V0",ra=!1,$r="xy",aa=!1,pa=Y(Ue,hr,je,ut,jr),oa=ee(Ue,je,ut)}function Ta($a,Va){if(re._transitioningWithDuration)return!1;var it=Math.max(0,Math.min(st,Ie*$a+_t)),Qe=Math.max(0,Math.min(yt,Be*Va+Ft)),Jt=Math.abs(it-_t),Yt=Math.abs(Qe-Ft);St.l=Math.min(_t,it),St.r=Math.max(_t,it),St.t=Math.min(Ft,Qe),St.b=Math.max(Ft,Qe);function ar(){$r="",St.r=St.l,St.t=St.b,oa.attr("d","M0,0Z")}if(At.isSubplotConstrained)Jt>_||Yt>_?($r="xy",Jt/st>Yt/yt?(Yt=Jt*yt/st,Ft>Qe?St.t=Ft-Yt:St.b=Ft+Yt):(Jt=Yt*st/yt,_t>it?St.l=_t-Jt:St.r=_t+Jt),oa.attr("d",$(St))):ar();else if(Pt.isSubplotConstrained)if(Jt>_||Yt>_){$r="xy";var cr=Math.min(St.l/st,(yt-St.b)/yt),tr=Math.max(St.r/st,(yt-St.t)/yt);St.l=cr*st,St.r=tr*st,St.b=(1-cr)*yt,St.t=(1-tr)*yt,oa.attr("d",$(St))}else ar();else!vr||Yt0){var bt;if(Pt.isSubplotConstrained||!Zt&&vr.length===1){for(bt=0;bt1&&(ar.maxallowed!==void 0&&Kt===(ar.range[0]1&&(cr.maxallowed!==void 0&&nt===(cr.range[0]=0?Math.min(re,.9):1/(1/Math.max(re,-.3)+3.222))}function q(re,ce,me){return re?re==="nsew"?me?"":ce==="pan"?"move":"crosshair":re.toLowerCase()+"-resize":"pointer"}function Y(re,ce,me,ye,Ae){return re.append("path").attr("class","zoombox").style({fill:ce>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(me,ye)).attr("d",Ae+"Z")}function ee(re,ce,me){return re.append("path").attr("class","zoombox-corners").style({fill:a.background,stroke:a.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(ce,me)).attr("d","M0,0Z")}function te(re,ce,me,ye,Ae,Se){re.attr("d",ye+"M"+me.l+","+me.t+"v"+me.h+"h"+me.w+"v-"+me.h+"h-"+me.w+"Z"),ae(re,ce,Ae,Se)}function ae(re,ce,me,ye){me||(re.transition().style("fill",ye>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),ce.transition().style("opacity",1).duration(200))}function U(re){u.select(re).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function H(re){I&&re.data&&re._context.showTips&&(v.notifier(v._(re,"Double-click to zoom back out"),"long",re),I=!1)}function K(re,ce){return"M"+(re.l-.5)+","+(ce-_-.5)+"h-3v"+(2*_+1)+"h3ZM"+(re.r+.5)+","+(ce-_-.5)+"h3v"+(2*_+1)+"h-3Z"}function V(re,ce){return"M"+(ce-_-.5)+","+(re.t-.5)+"v-3h"+(2*_+1)+"v3ZM"+(ce-_-.5)+","+(re.b+.5)+"v3h"+(2*_+1)+"v-3Z"}function $(re){var ce=Math.floor(Math.min(re.b-re.t,re.r-re.l,_)/2);return"M"+(re.l-3.5)+","+(re.t-.5+ce)+"h3v"+-ce+"h"+ce+"v-3h-"+(ce+3)+"ZM"+(re.r+3.5)+","+(re.t-.5+ce)+"h-3v"+-ce+"h"+-ce+"v-3h"+(ce+3)+"ZM"+(re.r+3.5)+","+(re.b+.5-ce)+"h-3v"+ce+"h"+-ce+"v3h"+(ce+3)+"ZM"+(re.l-3.5)+","+(re.b+.5-ce)+"h3v"+ce+"h"+ce+"v3h-"+(ce+3)+"Z"}function X(re,ce,me,ye,Ae){for(var Se=!1,Ce={},qe={},Ue,xe,he,oe,le=(Ae||{}).xaHash,ne=(Ae||{}).yaHash,be=0;be1&&v.warn("Full array edits are incompatible with other edits",c);var M=n[""][""];if(e(M))r.set(null);else if(Array.isArray(M))r.set(M);else return v.warn("Unrecognized full array edit value",c,M),!0;return y?!1:(p(o,x),f(a),!0)}var T=Object.keys(n).map(Number).sort(w),E=r.get(),g=E||[],A=s(x,c).get(),m=[],h=-1,b=g.length,_,I,C,F,R,z,D,k;for(_=0;_g.length-(D?0:1)){v.warn("index out of range",c,C);continue}if(z!==void 0)R.length>1&&v.warn("Insertion & removal are incompatible with edits to the same index.",c,C),e(z)?m.push(C):D?(z==="add"&&(z={}),g.splice(C,0,z),A&&A.splice(C,0,{})):v.warn("Unrecognized full object edit value",c,C,z),h===-1&&(h=C);else for(I=0;I=0;_--)g.splice(m[_],1),A&&A.splice(m[_],1);if(g.length?E||r.set(g):r.set(null),y)return!1;if(p(o,x),d!==u){var B;if(h===-1)B=T;else{for(b=Math.max(g.length,b),B=[],_=0;_=h));_++)B.push(C);for(_=h;_0&&v.log("Clearing previous rejected promises from queue."),y._promises=[]},j.cleanLayout=function(y){var o,x;y||(y={}),y.xaxis1&&(y.xaxis||(y.xaxis=y.xaxis1),delete y.xaxis1),y.yaxis1&&(y.yaxis||(y.yaxis=y.yaxis1),delete y.yaxis1),y.scene1&&(y.scene||(y.scene=y.scene1),delete y.scene1);var M=(w.subplotsRegistry.cartesian||{}).attrRegex,T=(w.subplotsRegistry.polar||{}).attrRegex,E=(w.subplotsRegistry.ternary||{}).attrRegex,g=(w.subplotsRegistry.gl3d||{}).attrRegex,A=Object.keys(y);for(o=0;o3?(z.x=1.02,z.xanchor="left"):z.x<-2&&(z.x=-.02,z.xanchor="right"),z.y>3?(z.y=1.02,z.yanchor="bottom"):z.y<-2&&(z.y=-.02,z.yanchor="top")),y.dragmode==="rotate"&&(y.dragmode="orbit"),y.template&&y.template.layout&&j.cleanLayout(y.template.layout),y};function r(y,o,x=!1){var M=y[o],T=o.charAt(0);x&&Array.isArray(M)||M&&M!=="paper"&&(y[o]=l(M,T,!0))}j.cleanData=function(y){for(var o=0;o0)return y.slice(0,o)}j.hasParent=function(y,o){for(var x=f(o);x;){if(x in y)return!0;x=f(x)}return!1},j.clearAxisTypes=function(y,o,x){for(var M=0;M{let x=(...M)=>M.every(T=>v.isPlainObject(T))||M.every(T=>Array.isArray(T));if([y,o].every(M=>Array.isArray(M))){if(y.length!==o.length)return!1;for(let M=0;Mv.isPlainObject(M))){if(Object.keys(y).length!==Object.keys(o).length)return!1;for(let M in y){if(M.startsWith("_"))continue;let T=y[M],E=o[M];if(T!==E&&!(x(T,E)?d(T,E):!1))return!1}return!0}return!1};j.collectionsAreEqual=d}}),ex=De({"src/plot_api/plot_api.js"(j){"use strict";var N=Qn(),u=io(),v=C3(),w=Ar(),S=w.nestedProperty,l=cm(),e=jP(),t=hi(),a=fm(),r=Il(),n=Vi(),i=B3(),s=hf(),c=Ki(),p=ii(),f=iw().initInteractions,d=Kh(),y=Sc().clearOutline,o=xp().dfltConfig,x=bR(),M=wR(),T=k1(),E=Ul(),g=gc().AX_NAME_PATTERN,A=0,m=5;function h(ve,_e,Ie,Be){var We;if(ve=w.getGraphDiv(ve),l.init(ve),w.isPlainObject(_e)){var Xe=_e;_e=Xe.data,Ie=Xe.layout,Be=Xe.config,We=Xe.frames}var mt=l.triggerHandler(ve,"plotly_beforeplot",[_e,Ie,Be]);if(mt===!1)return Promise.reject();!_e&&!Ie&&!w.isPlotDiv(ve)&&w.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",ve);function ft(){if(We)return j.addFrames(ve,We)}F(ve,Be),Ie||(Ie={}),N.select(ve).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(ve._promises)||(ve._promises=[]);var ht=(ve.data||[]).length===0&&Array.isArray(_e);Array.isArray(_e)&&(M.cleanData(_e),ht?ve.data=_e:ve.data.push.apply(ve.data,_e),ve.empty=!1),(!ve.layout||ht)&&(ve.layout=M.cleanLayout(Ie)),r.supplyDefaults(ve);var gt=ve._fullLayout,_t=gt._has("cartesian");gt._replotting=!0,(ht||gt._shouldCreateBgLayer)&&(ze(ve),gt._shouldCreateBgLayer&&delete gt._shouldCreateBgLayer),c.initGradients(ve),c.initPatterns(ve),ht&&n.saveShowSpikeInitial(ve);var Ft=!ve.calcdata||ve.calcdata.length!==(ve._fullData||[]).length;Ft&&r.doCalcdata(ve);for(var St=0;St=ve.data.length||We<-ve.data.length)throw new Error(Ie+" must be valid indices for gd.data.");if(_e.indexOf(We,Be+1)>-1||We>=0&&_e.indexOf(-ve.data.length+We)>-1||We<0&&_e.indexOf(ve.data.length+We)>-1)throw new Error("each index in "+Ie+" must be unique.")}}function B(ve,_e,Ie){if(!Array.isArray(ve.data))throw new Error("gd.data must be an array.");if(typeof _e>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(_e)||(_e=[_e]),k(ve,_e,"currentIndices"),typeof Ie<"u"&&!Array.isArray(Ie)&&(Ie=[Ie]),typeof Ie<"u"&&k(ve,Ie,"newIndices"),typeof Ie<"u"&&_e.length!==Ie.length)throw new Error("current and new indices must be of equal length.")}function O(ve,_e,Ie){var Be,We;if(!Array.isArray(ve.data))throw new Error("gd.data must be an array.");if(typeof _e>"u")throw new Error("traces must be defined.");for(Array.isArray(_e)||(_e=[_e]),Be=0;Be<_e.length;Be++)if(We=_e[Be],typeof We!="object"||Array.isArray(We)||We===null)throw new Error("all values in traces array must be non-array objects");if(typeof Ie<"u"&&!Array.isArray(Ie)&&(Ie=[Ie]),typeof Ie<"u"&&Ie.length!==_e.length)throw new Error("if indices is specified, traces.length must equal indices.length")}function q(ve,_e,Ie,Be){var We=w.isPlainObject(Be);if(!Array.isArray(ve.data))throw new Error("gd.data must be an array");if(!w.isPlainObject(_e))throw new Error("update must be a key:value object");if(typeof Ie>"u")throw new Error("indices must be an integer or array of integers");k(ve,Ie,"indices");for(var Xe in _e){if(!Array.isArray(_e[Xe])||_e[Xe].length!==Ie.length)throw new Error("attribute "+Xe+" must be an array of length equal to indices array length");if(We&&(!(Xe in Be)||!Array.isArray(Be[Xe])||Be[Xe].length!==_e[Xe].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function Y(ve,_e,Ie,Be){var We=w.isPlainObject(Be),Xe=[],mt,ft,ht,gt,_t;Array.isArray(Ie)||(Ie=[Ie]),Ie=D(Ie,ve.data.length-1);for(var Ft in _e)for(var St=0;St=0&&_t=0&&_t"u")return gt=j.redraw(ve),e.add(ve,We,mt,Xe,ft),gt;Array.isArray(Ie)||(Ie=[Ie]);try{B(ve,Be,Ie)}catch(_t){throw ve.data.splice(ve.data.length-_e.length,_e.length),_t}return e.startSequence(ve),e.add(ve,We,mt,Xe,ft),gt=j.moveTraces(ve,Be,Ie),e.stopSequence(ve),gt}function K(ve,_e){ve=w.getGraphDiv(ve);var Ie=[],Be=j.addTraces,We=K,Xe=[ve,Ie,_e],mt=[ve,_e],ft,ht;if(typeof _e>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(_e)||(_e=[_e]),k(ve,_e,"indices"),_e=D(_e,ve.data.length-1),_e.sort(w.sorterDes),ft=0;ft<_e.length;ft+=1)ht=ve.data.splice(_e[ft],1)[0],Ie.push(ht);var gt=j.redraw(ve);return e.add(ve,Be,Xe,We,mt),gt}function V(ve,_e,Ie){ve=w.getGraphDiv(ve);var Be=[],We=[],Xe=V,mt=V,ft=[ve,Ie,_e],ht=[ve,_e,Ie],gt;if(B(ve,_e,Ie),_e=Array.isArray(_e)?_e:[_e],typeof Ie>"u")for(Ie=[],gt=0;gt<_e.length;gt++)Ie.push(-_e.length+gt);for(Ie=Array.isArray(Ie)?Ie:[Ie],_e=D(_e,ve.data.length-1),Ie=D(Ie,ve.data.length-1),gt=0;gt0&&typeof Ga.parts[Pn]!="string";)Pn--;var sn=Ga.parts[Pn],Yn=Ga.parts[Pn-1]+"."+sn,Zn=Ga.parts.slice(0,Pn).join("."),vi=S(ve.layout,Zn).get(),Dn=S(Be,Zn).get(),oi=Ga.get();if(xa!==void 0){pa[La]=xa,oa[La]=sn==="reverse"?xa:X(oi);var on=a.getLayoutValObject(Be,Ga.parts);if(on&&on.impliedEdits&&xa!==null)for(var mn in on.impliedEdits)aa(w.relativeAttr(La,mn),on.impliedEdits[mn]);if(["width","height"].indexOf(La)!==-1)if(xa){aa("autosize",null);var bi=La==="height"?"width":"height";aa(bi,Be[bi])}else Be[La]=ve._initialAutoSize[La];else if(La==="autosize")aa("width",xa?null:Be.width),aa("height",xa?null:Be.height);else if(Yn.match(Se))Da(Yn),S(Be,Zn+"._inputRange").set(null);else if(Yn.match(Ce)){Da(Yn),S(Be,Zn+"._inputRange").set(null);var Li=S(Be,Zn).get();Li._inputDomain&&(Li._input.domain=Li._inputDomain.slice())}else Yn.match(qe)&&S(Be,Zn+"._inputDomain").set(null);if(sn==="type"){Ta=vi;var $a=Dn.type==="linear"&&xa==="log",Va=Dn.type==="log"&&xa==="linear";if($a||Va){if(!Ta||!Ta.range)aa(Zn+".autorange",!0);else if(Dn.autorange)$a&&(Ta.range=Ta.range[1]>Ta.range[0]?[1,2]:[2,1]);else{var it=Ta.range[0],Qe=Ta.range[1];$a?(it<=0&&Qe<=0&&aa(Zn+".autorange",!0),it<=0?it=Qe/1e6:Qe<=0&&(Qe=it/1e6),aa(Zn+".range[0]",Math.log(it)/Math.LN10),aa(Zn+".range[1]",Math.log(Qe)/Math.LN10)):(aa(Zn+".range[0]",Math.pow(10,it)),aa(Zn+".range[1]",Math.pow(10,Qe)))}Array.isArray(Be._subplots.polar)&&Be._subplots.polar.length&&Be[Ga.parts[0]]&&Ga.parts[1]==="radialaxis"&&delete Be[Ga.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(ve,Dn,xa,aa),t.getComponentMethod("images","convertCoords")(ve,Dn,xa,aa)}else aa(Zn+".autorange",!0),aa(Zn+".range",null);S(Be,Zn+"._inputRange").set(null)}else if(sn.match(g)){var Jt=S(Be,La).get(),Yt=(xa||{}).type;(!Yt||Yt==="-")&&(Yt="linear"),t.getComponentMethod("annotations","convertCoords")(ve,Jt,Yt,aa),t.getComponentMethod("images","convertCoords")(ve,Jt,Yt,aa)}var ar=x.containerArrayMatch(La);if(ar){_t=ar.array,Ft=ar.index;var cr=ar.property,tr=on||{editType:"calc"};Ft!==""&&cr===""&&(x.isAddVal(xa)?oa[La]=null:x.isRemoveVal(xa)?oa[La]=(S(Ie,_t).get()||[])[Ft]:w.warn("unrecognized full object value",_e)),E.update($r,tr),gt[_t]||(gt[_t]={});var Je=gt[_t][Ft];Je||(Je=gt[_t][Ft]={}),Je[cr]=xa,delete _e[La]}else sn==="reverse"?(vi.range?vi.range.reverse():(aa(Zn+".autorange",!0),vi.range=[1,0]),Dn.autorange?$r.calc=!0:$r.plot=!0):(La==="dragmode"&&(xa===!1&&oi!==!1||xa!==!1&&oi===!1)||Be._has("scatter-like")&&Be._has("regl")&&La==="dragmode"&&(xa==="lasso"||xa==="select")&&!(oi==="lasso"||oi==="select")?$r.plot=!0:on?E.update($r,on):$r.calc=!0,Ga.set(xa))}}for(_t in gt){var bt=x.applyContainerArrayChanges(ve,Xe(Ie,_t),gt[_t],$r,Xe);bt||($r.plot=!0)}for(var qt in ka){Ta=n.getFromId(ve,qt);var Qt=Ta&&Ta._constraintGroup;if(Qt){$r.calc=!0;for(var br in Qt)ka[br]||(n.getFromId(ve,br)._constraintShrinkable=!0)}}(xe(ve)||_e.height||_e.width)&&($r.plot=!0);var Ir=Be.shapes;for(Ft=0;Ft1;)if(Be.pop(),Ie=S(_e,Be.join(".")+".uirevision").get(),Ie!==void 0)return Ie;return _e.uirevision}function Ve(ve,_e){for(var Ie=0;Ie<_e.length;Ie++)if(_e[Ie].uid===ve)return Ie;return-1}function je(ve,_e,Ie){for(var Be=0;Be<_e.length;Be++)if(_e[Be].uid===ve)return Be;return!_e[Ie]||_e[Ie].uid?-1:Ie}function ut(ve,_e){var Ie=w.isPlainObject(ve),Be=Array.isArray(ve);return Ie||Be?(Ie&&w.isPlainObject(_e)||Be&&Array.isArray(_e))&&JSON.stringify(ve)===JSON.stringify(_e):ve===_e}function st(ve,_e,Ie,Be){var We=Be._preGUI,Xe,mt,ft,ht,gt,_t,Ft,St,hr,jr,ra=[],$r={},pa={};for(Xe in We){if(gt=be(Xe,le),gt){if(hr=gt.head,jr=gt.tail,mt=gt.attr||hr+".uirevision",ft=S(Be,mt).get(),ht=ft&&Fe(mt,_e),ht&&ht===ft){if(_t=We[Xe],_t===null&&(_t=void 0),Ft=S(_e,Xe),St=Ft.get(),ut(St,_t)){St===void 0&&jr==="autorange"&&ra.push(hr),Ft.set(X(S(Be,Xe).get()));continue}else if(jr==="autorange"||jr.slice(0,6)==="range["){var oa=We[hr+".range[0]"],aa=We[hr+".range[1]"],ka=We[hr+".autorange"];if(ka||ka===null&&oa===null&&aa===null){if(!(hr in $r)){var Ta=S(_e,hr).get();$r[hr]=Ta&&(Ta.autorange||Ta.autorange!==!1&&(!Ta.range||Ta.range.length!==2))}if($r[hr]){Ft.set(X(S(Be,Xe).get()));continue}}}}}else w.warn("unrecognized GUI edit: "+Xe);delete We[Xe],gt&>.tail.slice(0,6)==="range["&&(pa[gt.head]=1)}for(var Da=0;Da[Zn,ve._ev.listeners(Zn)]);Xe=j.newPlot(ve,_e,Ie,Be).then(()=>{for(let[Zn,vi]of Yn)vi.forEach(Dn=>ve.on(Zn,Dn));return j.react(ve,_e,Ie,Be)})}else{ve.data=_e||[],M.cleanData(ve.data),ve.layout=Ie||{},M.cleanLayout(ve.layout),st(ve.data,ve.layout,ft,ht),r.supplyDefaults(ve,{skipUpdateCalc:!0});var Ft=ve._fullData,St=ve._fullLayout,hr=St.datarevision===void 0,jr=St.transition,ra=Pt(ve,ht,St,hr,jr),$r=ra.newDataRevision,pa=At(ve,ft,Ft,hr,jr,$r);if(xe(ve)&&(ra.layoutReplot=!0),pa.calc||ra.calc){ve.calcdata=void 0;for(var oa=Object.getOwnPropertyNames(St),aa=0;aa(_t||ve.emit("plotly_react",{config:Be,data:_e,layout:Ie}),ve))}function At(ve,_e,Ie,Be,We,Xe){var mt=_e.length===Ie.length;if(!We&&!mt)return{fullReplot:!0,calc:!0};var ft=E.traceFlags();ft.arrays={},ft.nChanges=0,ft.nChangesAnim=0;var ht,gt;function _t(hr){var jr=a.getTraceValObject(gt,hr);return!gt._module.animatable&&jr.anim&&(jr.anim=!1),jr}var Ft={getValObject:_t,flags:ft,immutable:Be,transition:We,newDataRevision:Xe,gd:ve},St={};for(ht=0;ht<_e.length;ht++)if(Ie[ht]){if(gt=Ie[ht],St[gt.uid])continue;St[gt.uid]=1,Zt(_e[ht],gt,[],Ft)}return(ft.calc||ft.plot)&&(ft.fullReplot=!0),We&&ft.nChanges&&ft.nChangesAnim&&(ft.anim=ft.nChanges===ft.nChangesAnim&&mt?"all":"some"),ft}function Pt(ve,_e,Ie,Be,We){var Xe=E.layoutFlags();Xe.arrays={},Xe.rangesAltered={},Xe.nChanges=0,Xe.nChangesAnim=0;function mt(St){return a.getLayoutValObject(Ie,St)}for(var ft in Ie)if(!(!ft.startsWith("xaxis")&&!ft.startsWith("yaxis"))&&_e[ft]){var ht=Ie[ft].domain,gt=_e[ft].domain,_t=_e[ft]._inputDomain;_e[ft]._inputDomain&&(ht[0]===_t[0]&&ht[1]===_t[1]?Ie[ft].domain=_e[ft].domain:(ht[0]!==gt[0]||ht[1]!==gt[1])&&(Ie[ft]._inputDomain=null))}var Ft={getValObject:mt,flags:Xe,immutable:Be,transition:We,gd:ve};return Zt(_e,Ie,[],Ft),(Xe.plot||Xe.calc)&&(Xe.layoutReplot=!0),We&&Xe.nChanges&&Xe.nChangesAnim&&(Xe.anim=Xe.nChanges===Xe.nChangesAnim?"all":"some"),Xe}function Zt(ve,_e,Ie,Be){var We,Xe,mt,ft=Be.getValObject,ht=Be.flags,gt=Be.immutable,_t=Be.inArray,Ft=Be.arrayIndex;function St(){var Zn=We.editType;if(_t&&Zn.indexOf("arraydraw")!==-1){w.pushUnique(ht.arrays[_t],Ft);return}E.update(ht,We),Zn!=="none"&&ht.nChanges++,Be.transition&&We.anim&&ht.nChangesAnim++,(Se.test(mt)||Ce.test(mt))&&(ht.rangesAltered[Ie[0]]=1),Xe==="datarevision"&&(ht.newDataRevision=1)}function hr(Zn){return Zn.valType==="data_array"||Zn.arrayOk}for(Xe in ve){if(ht.calc&&!Be.transition)return;var jr=ve[Xe],ra=_e[Xe],$r=Ie.concat(Xe);if(mt=$r.join("."),!(Xe.charAt(0)==="_"||typeof jr=="function"||jr===ra)){if((Xe==="tick0"||Xe==="dtick")&&Ie[0]!=="geo"){var pa=_e.tickmode;if(pa==="auto"||pa==="array"||!pa)continue}if(!(Xe==="range"&&_e.autorange)&&!((Xe==="zmin"||Xe==="zmax")&&_e.type==="contourcarpet")&&(We=ft($r),!!We&&!(We._compareAsJSON&&JSON.stringify(jr)===JSON.stringify(ra)))){var oa=We.valType,aa,ka=hr(We),Ta=Array.isArray(jr),Da=Array.isArray(ra);if(Ta&&Da){var La="_input_"+Xe,Ga=ve[La],xa=_e[La];if(Array.isArray(Ga)&&Ga===xa)continue}if(ra===void 0)ka&&Ta?ht.calc=!0:St();else if(We._isLinkedToArray){var Gn=[],Pn=!1;_t||(ht.arrays[Xe]=Gn);var sn=Math.min(jr.length,ra.length),Yn=Math.max(jr.length,ra.length);if(sn!==Yn)if(We.editType==="arraydraw")Pn=!0;else{St();continue}for(aa=0;aa=We.length?We[0]:We[gt]:We}function ft(gt){return Array.isArray(Xe)?gt>=Xe.length?Xe[0]:Xe[gt]:Xe}function ht(gt,_t){var Ft=0;return function(){if(gt&&++Ft===_t)return gt()}}return new Promise(function(gt,_t){function Ft(){if(Be._frameQueue.length!==0){for(;Be._frameQueue.length;){var sn=Be._frameQueue.pop();sn.onInterrupt&&sn.onInterrupt()}ve.emit("plotly_animationinterrupted",[])}}function St(sn){if(sn.length!==0){for(var Yn=0;YnBe._timeToNext&&jr()};sn()}var $r=0;function pa(sn){return Array.isArray(We)?$r>=We.length?sn.transitionOpts=We[$r]:sn.transitionOpts=We[0]:sn.transitionOpts=We,$r++,sn}var oa,aa,ka=[],Ta=_e==null,Da=Array.isArray(_e),La=!Ta&&!Da&&w.isPlainObject(_e);if(La)ka.push({type:"object",data:pa(w.extendFlat({},_e))});else if(Ta||["string","number"].indexOf(typeof _e)!==-1)for(oa=0;oa0&&GnGn)&&Pn.push(aa);ka=Pn}}ka.length>0?St(ka):(ve.emit("plotly_animated"),gt())})}function Nt(ve,_e,Ie){if(ve=w.getGraphDiv(ve),_e==null)return Promise.resolve();if(!w.isPlotDiv(ve))throw new Error("This element is not a Plotly plot: "+ve+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Be,We,Xe,mt,ft=ve._transitionData._frames,ht=ve._transitionData._frameHash;if(!Array.isArray(_e))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+_e);var gt=ft.length+_e.length*2,_t=[],Ft={};for(Be=_e.length-1;Be>=0;Be--)if(w.isPlainObject(_e[Be])){var St=_e[Be].name,hr=(ht[St]||Ft[St]||{}).name,jr=_e[Be].name,ra=ht[hr]||Ft[hr];hr&&jr&&typeof jr=="number"&&ra&&AGa.index?-1:La.index=0;Be--){if(We=_t[Be].frame,typeof We.name=="number"&&w.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!We.name)for(;ht[We.name="frame "+ve._transitionData._counter++];);if(ht[We.name]){for(Xe=0;Xe=0;Ie--)Be=_e[Ie],Xe.push({type:"delete",index:Be}),mt.unshift({type:"insert",index:Be,value:We[Be]});var ft=r.modifyFrames,ht=r.modifyFrames,gt=[ve,mt],_t=[ve,Xe];return e&&e.add(ve,ft,gt,ht,_t),r.modifyFrames(ve,Xe)}function nt(ve){ve=w.getGraphDiv(ve);var _e=ve._fullLayout||{},Ie=ve._fullData||[];return r.cleanPlot([],{},Ie,_e),r.purge(ve),l.purge(ve),_e._container&&_e._container.remove(),delete ve._context,ve}function Ee(ve){var _e=ve._fullLayout,Ie=ve.getBoundingClientRect();if(!w.equalDomRects(Ie,_e._lastBBox)){var Be=_e._invTransform=w.inverseTransformMatrix(w.getFullTransformMatrix(ve));_e._invScaleX=Math.sqrt(Be[0][0]*Be[0][0]+Be[0][1]*Be[0][1]+Be[0][2]*Be[0][2]),_e._invScaleY=Math.sqrt(Be[1][0]*Be[1][0]+Be[1][1]*Be[1][1]+Be[1][2]*Be[1][2]),_e._lastBBox=Ie}}function ze(ve){var _e=N.select(ve),Ie=ve._fullLayout;if(Ie._calcInverseTransform=Ee,Ie._calcInverseTransform(ve),Ie._container=_e.selectAll(".plot-container").data([0]),Ie._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),Ie._paperdiv=Ie._container.selectAll(".svg-container").data([0]),Ie._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ie._glcontainer=Ie._paperdiv.selectAll(".gl-container").data([{}]),Ie._glcontainer.enter().append("div").classed("gl-container",!0),Ie._paperdiv.selectAll(".main-svg").remove(),Ie._paperdiv.select(".modebar-container").remove(),Ie._paper=Ie._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ie._toppaper=Ie._paperdiv.append("svg").classed("main-svg",!0),Ie._modebardiv=Ie._paperdiv.append("div"),delete Ie._modeBar,Ie._hoverpaper=Ie._paperdiv.append("svg").classed("main-svg",!0),!Ie._uid){var Be={};N.selectAll("defs").each(function(){this.id&&(Be[this.id.split("-")[1]]=1)}),Ie._uid=w.randstr(Be)}Ie._paperdiv.selectAll(".main-svg").attr(d.svgAttrs),Ie._defs=Ie._paper.append("defs").attr("id","defs-"+Ie._uid),Ie._clips=Ie._defs.append("g").classed("clips",!0),Ie._topdefs=Ie._toppaper.append("defs").attr("id","topdefs-"+Ie._uid),Ie._topclips=Ie._topdefs.append("g").classed("clips",!0),Ie._bgLayer=Ie._paper.append("g").classed("bglayer",!0),Ie._draggers=Ie._paper.append("g").classed("draglayer",!0);var We=Ie._paper.append("g").classed("layer-below",!0);Ie._imageLowerLayer=We.append("g").classed("imagelayer",!0),Ie._shapeLowerLayer=We.append("g").classed("shapelayer",!0),Ie._cartesianlayer=Ie._paper.append("g").classed("cartesianlayer",!0),Ie._polarlayer=Ie._paper.append("g").classed("polarlayer",!0),Ie._smithlayer=Ie._paper.append("g").classed("smithlayer",!0),Ie._ternarylayer=Ie._paper.append("g").classed("ternarylayer",!0),Ie._geolayer=Ie._paper.append("g").classed("geolayer",!0),Ie._funnelarealayer=Ie._paper.append("g").classed("funnelarealayer",!0),Ie._pielayer=Ie._paper.append("g").classed("pielayer",!0),Ie._iciclelayer=Ie._paper.append("g").classed("iciclelayer",!0),Ie._treemaplayer=Ie._paper.append("g").classed("treemaplayer",!0),Ie._sunburstlayer=Ie._paper.append("g").classed("sunburstlayer",!0),Ie._indicatorlayer=Ie._toppaper.append("g").classed("indicatorlayer",!0),Ie._glimages=Ie._paper.append("g").classed("glimages",!0);var Xe=Ie._toppaper.append("g").classed("layer-above",!0);Ie._imageUpperLayer=Xe.append("g").classed("imagelayer",!0),Ie._shapeUpperLayer=Xe.append("g").classed("shapelayer",!0),Ie._selectionLayer=Ie._toppaper.append("g").classed("selectionlayer",!0),Ie._infolayer=Ie._toppaper.append("g").classed("infolayer",!0),Ie._menulayer=Ie._toppaper.append("g").classed("menulayer",!0),Ie._zoomlayer=Ie._toppaper.append("g").classed("zoomlayer",!0),Ie._hoverlayer=Ie._hoverpaper.append("g").classed("hoverlayer",!0),Ie._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),ve.emit("plotly_framework")}j.animate=vr,j.addFrames=Nt,j.deleteFrames=Kt,j.addTraces=H,j.deleteTraces=K,j.extendTraces=ae,j.moveTraces=V,j.prependTraces=U,j.newPlot=z,j._doPlot=h,j.purge=nt,j.react=yt,j.redraw=R,j.relayout=me,j.restyle=$,j.setPlotConfig=_,j.update=he,j._guiRelayout=oe(me),j._guiRestyle=oe($),j._guiUpdate=oe(he),j._storeDirectGUIEdit=re}}),$d=De({"src/snapshot/helpers.js"(j){"use strict";var N=hi();j.getDelay=function(w){return w._has&&(w._has("gl3d")||w._has("map"))?500:0},j.getRedrawFunc=function(w){return function(){N.getComponentMethod("colorbar","draw")(w)}},j.encodeSVG=function(w){return"data:image/svg+xml,"+encodeURIComponent(w)},j.encodeJSON=function(w){return"data:application/json,"+encodeURIComponent(w)};var u=window.URL||window.webkitURL;j.createObjectURL=function(w){return u.createObjectURL(w)},j.revokeObjectURL=function(w){return u.revokeObjectURL(w)},j.createBlob=function(w,S){if(S==="svg")return new window.Blob([w],{type:"image/svg+xml;charset=utf-8"});if(S==="full-json")return new window.Blob([w],{type:"application/json;charset=utf-8"});var l=v(window.atob(w));return new window.Blob([l],{type:"image/"+S})},j.octetStream=function(w){document.location.href="data:application/octet-stream"+w},j.getPlotTitle=function(w){var S,l,e,t,a=w._fullLayout;if(a){var r=(S=a.title)==null?void 0:S.text;return r===((l=a._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=w.layout)==null?void 0:e.title)==null?void 0:t.text},j.getPlotSubtitle=function(w){var S,l,e,t,a,r,n=w._fullLayout;if(n){var i=(l=(S=n.title)==null?void 0:S.subtitle)==null?void 0:l.text;return i===((e=n._dfltTitle)==null?void 0:e.subtitle)?void 0:i}return(r=(a=(t=w.layout)==null?void 0:t.title)==null?void 0:a.subtitle)==null?void 0:r.text};function v(w){for(var S=w.length,l=new ArrayBuffer(S),e=new Uint8Array(l),t=0;t{let o=y.toLowerCase();return r.includes(o)?y:n.includes(o)?"<":i.includes(o)?">":y.includes("<")||y.includes(">")?"":f.html(y).text()});return f.remove(),d}function c(p){return p.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}N.exports=function(f,d,y){var o=f._fullLayout,x=o._paper,M=o._toppaper,T=o.width,E=o.height,g;x.insert("rect",":first-child").call(w.setRect,0,0,T,E).call(S.fill,o.paper_bgcolor);var A=o._basePlotModules||[];for(g=0;g1&&E.push(s("object","layout"))),v.supplyDefaults(g);for(var h=g._fullData,b=A.length,_=0;_I.length&&T.push(s("unused",E,b.concat(I.length)));var k=I.length,B=Array.isArray(D);B&&(k=Math.min(k,D.length));var O,q,Y,ee,te;if(C.dimensions===2)for(q=0;qI[q].length&&T.push(s("unused",E,b.concat(q,I[q].length)));var ae=I[q].length;for(O=0;O<(B?Math.min(ae,D[q].length):ae);O++)Y=B?D[q][O]:D,ee=_[q][O],te=I[q][O],u.validate(ee,Y)?te!==ee&&te!==+ee&&T.push(s("dynamic",E,b.concat(q,O),ee,te)):T.push(s("value",E,b.concat(q,O),ee))}else T.push(s("array",E,b.concat(q),_[q]));else for(q=0;qR?T.push({code:"unused",traceType:_,templateCount:F,dataCount:R}):R>F&&T.push({code:"reused",traceType:_,templateCount:F,dataCount:R})}}function z(D,k){for(var B in D)if(B.charAt(0)!=="_"){var O=D[B],q=s(D,B,k);u(O)?(Array.isArray(D)&&O._template===!1&&O.templateitemname&&T.push({code:"missing",path:q,templateitemname:O.templateitemname}),z(O,q)):Array.isArray(O)&&c(O)&&z(O,q)}}if(z({data:g,layout:E},""),T.length)return T.map(p)};function c(f){for(var d=0;d=0;p--){var f=l[p];if(f.type==="scatter"&&f.xaxis===s.xaxis&&f.yaxis===s.yaxis){f.opacity=void 0;break}}}}}}}),CR=De({"src/traces/scatter/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=G_();N.exports=function(w,S){function l(t,a){return u.coerce(w,S,v,t,a)}var e=S.barmode==="group";S.scattermode==="group"&&l("scattergap",e?S.bargap:.2)}}}),hd=De({"src/plots/cartesian/align_period.js"(j,N){"use strict";var u=io(),v=Ar(),w=v.dateTime2ms,S=v.incrementMonth,l=Ho(),e=l.ONEAVGMONTH;N.exports=function(a,r,n,i){if(r.type!=="date")return{vals:i};var s=a[n+"periodalignment"];if(!s)return{vals:i};var c=a[n+"period"],p;if(u(c)){if(c=+c,c<=0)return{vals:i}}else if(typeof c=="string"&&c.charAt(0)==="M"){var f=+c.substring(1);if(f>0&&Math.round(f)===f)p=f;else return{vals:i}}for(var d=r.calendar,y=s==="start",o=s==="end",x=a[n+"period0"],M=w(x,d)||0,T=[],E=[],g=[],A=i.length,m=0;mh;)I=S(I,-p,d);for(;I<=h;)I=S(I,p,d);_=S(I,-p,d)}else{for(b=Math.round((h-M)/c),I=M+b*c;I>h;)I-=c;for(;I<=h;)I+=c;_=I-c}T[m]=y?_:o?I:(_+I)/2,E[m]=_,g[m]=I}return{vals:T,starts:E,ends:g}}}}),Qh=De({"src/traces/scatter/colorscale_calc.js"(j,N){"use strict";var u=Of().hasColorscale,v=Wf(),w=Sl();N.exports=function(l,e){w.hasLines(e)&&u(e,"line")&&v(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),w.hasMarkers(e)&&(u(e,"marker")&&v(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),u(e,"marker.line")&&v(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Pd=De({"src/traces/scatter/arrays_to_calcdata.js"(j,N){"use strict";var u=Ar();N.exports=function(w,S){for(var l=0;lz&&_[k].gap;)k--;for(O=_[k].s,D=_.length-1;D>k;D--)_[D].s=O;for(;zee+q||!u(Y))}for(var ae=0;aek(O))):k(R.text);let B=R.outsidetextfont.size*r*D+a;return{ppadplus:z.some(O=>O.s<0)?B:0,ppadminus:z.some(O=>O.s>=0)?B:0}}return{ppadplus:void 0,ppadminus:void 0}}function I(R,z,D,k){for(var B=F(k),O=0;OF[d]&&d0?l:e)/(d._m*x*(d._m>0?l:e)))),gt*=1e3}if(_t===w){if(o&&(_t=d.c2p(ht.y,!0)),_t===w)return!1;_t*=1e3}return[gt,_t]}function Q(ft,ht,gt,_t){var Ft=gt-ft,St=_t-ht,hr=.5-ft,jr=.5-ht,ra=Ft*Ft+St*St,$r=Ft*hr+St*jr;if($r>0&&$r1||Math.abs(hr.y-gt[0][1])>1)&&(hr=[hr.x,hr.y],_t&&ye(hr,ft)Ce||ft[1]Ue)return[r(ft[0],Se,Ce),r(ft[1],qe,Ue)]}function ut(ft,ht){if(ft[0]===ht[0]&&(ft[0]===Se||ft[0]===Ce)||ft[1]===ht[1]&&(ft[1]===qe||ft[1]===Ue))return!0}function st(ft,ht){var gt=[],_t=je(ft),Ft=je(ht);return _t&&Ft&&ut(_t,Ft)||(_t&>.push(_t),Ft&>.push(Ft)),gt}function yt(ft,ht,gt){return function(_t,Ft){var St=je(_t),hr=je(Ft),jr=[];if(St&&hr&&ut(St,hr))return jr;St&&jr.push(St),hr&&jr.push(hr);var ra=2*t.constrain((_t[ft]+Ft[ft])/2,ht,gt)-((St||_t)[ft]+(hr||Ft)[ft]);if(ra){var $r;St&&hr?$r=ra>0==St[ft]>hr[ft]?St:hr:$r=St||hr,$r[ft]+=ra}return jr}}var At;m==="linear"||m==="spline"?At=Ve:m==="hv"||m==="vh"?At=st:m==="hvh"?At=yt(0,Se,Ce):m==="vhv"&&(At=yt(1,qe,Ue));function Pt(ft,ht){var gt=ht[0]-ft[0],_t=(ht[1]-ft[1])/gt,Ft=(ft[1]*ht[0]-ht[1]*ft[0])/gt;return Ft>0?[_t>0?Se:Ce,Ue]:[_t>0?Ce:Se,qe]}function Zt(ft){var ht=ft[0],gt=ft[1],_t=ht===F[R-1][0],Ft=gt===F[R-1][1];if(!(_t&&Ft))if(R>1){var St=ht===F[R-2][0],hr=gt===F[R-2][1];_t&&(ht===Se||ht===Ce)&&St?hr?R--:F[R-1]=ft:Ft&&(gt===qe||gt===Ue)&&hr?St?R--:F[R-1]=ft:F[R++]=ft}else F[R++]=ft}function vr(ft){F[R-1][0]!==ft[0]&&F[R-1][1]!==ft[1]&&Zt([le,ne]),Zt(ft),be=null,le=ne=0}var Nt=t.isArrayOrTypedArray(E);function Kt(ft){if(ft&&T&&(ft.i=z,ft.d=s,ft.trace=p,ft.marker=Nt?E[ft.i]:E,ft.backoff=T),re=ft[0]/x,ce=ft[1]/M,he=ft[0]Ce?Ce:0,oe=ft[1]Ue?Ue:0,he||oe){if(!R)F[R++]=[he||ft[0],oe||ft[1]];else if(be){var ht=At(be,ft);ht.length>1&&(vr(ht[0]),F[R++]=ht[1])}else Fe=At(F[R-1],ft)[0],F[R++]=Fe;var gt=F[R-1];he&&oe&&(gt[0]!==he||gt[1]!==oe)?(be&&(le!==he&&ne!==oe?Zt(le&&ne?Pt(be,ft):[le||he,ne||oe]):le&&ne&&Zt([le,ne])),Zt([he,oe])):le-he&&ne-oe&&Zt([he||le,oe||ne]),be=ft,le=he,ne=oe}else be&&vr(At(be,ft)[0]),F[R++]=ft}for(z=0;zme(q,nt))break;k=q,K=te[0]*ee[0]+te[1]*ee[1],K>U?(U=K,B=q,Y=!1):K=s.length||!q)break;Kt(q),D=q}}be&&Zt([le||be[0],ne||be[1]]),_.push(F.slice(0,R))}var Ee=m.slice(m.length-1);if(T&&Ee!=="h"&&Ee!=="v"){for(var ze=!1,ve=-1,_e=[],Ie=0;Ie<_.length;Ie++)for(var Be=0;Be<_[Ie].length-1;Be++){var We=_[Ie][Be],Xe=_[Ie][Be+1],mt=u.applyBackoff(Xe,We);(mt[0]!==Xe[0]||mt[1]!==Xe[1])&&(ze=!0),_e[ve+1]||(ve++,_e[ve]=[We,[mt[0],mt[1]]])}return ze?_e:_}return _}}}),cw=De({"src/traces/scatter/link_traces.js"(j,N){"use strict";var u={tonextx:1,tonexty:1,tonext:1};N.exports=function(w,S,l){var e,t,a,r,n,i={},s=!1,c=-1,p=0,f=-1;for(t=0;t=0?n=f:(n=f=p,p++),n0,m=r(f,d,y);if(T=o.selectAll("g.trace").data(m,function(b){return b[0].trace.uid}),T.enter().append("g").attr("class",function(b){return"trace scatter trace"+b[0].trace.uid}).style("stroke-miterlimit",2),T.order(),i(f,T,d),A){M&&(E=M());var h=u.transition().duration(x.duration).ease(x.easing).each("end",function(){E&&E()}).each("interrupt",function(){E&&E()});h.each(function(){o.selectAll("g.trace").each(function(b,_){s(f,_,d,b,m,this,x)})})}else T.each(function(b,_){s(f,_,d,b,m,this,x)});g&&T.exit().remove(),o.selectAll("path:not([d])").remove()};function i(p,f,d){f.each(function(y){var o=S(u.select(this),"g","fills");e.setClipUrl(o,d.layerClipId,p);var x=y[0].trace;x._ownFill=null,x._nextFill=null;var M=[];x._ownfill&&M.push("_ownFill"),x._nexttrace&&M.push("_nextFill");var T=o.selectAll("g").data(M,l);T.enter().append("g"),T.exit().remove(),T.order().each(function(E){x[E]=S(u.select(this),"path","js-fill")})})}function s(p,f,d,y,o,x,M){var T=p._context.staticPlot,E;c(p,f,d,y,o);var g=!!M&&M.duration>0;function A(Zt){return g?Zt.transition():Zt}var m=d.xaxis,h=d.yaxis,b=y[0].trace,_=b.line,I=u.select(x),C=S(I,"g","errorbars"),F=S(I,"g","lines"),R=S(I,"g","points"),z=S(I,"g","text");if(v.getComponentMethod("errorbars","plot")(p,C,d,M),b.visible!==!0)return;A(I).style("opacity",b.opacity);var D,k,B=b.fill.charAt(b.fill.length-1);B!=="x"&&B!=="y"&&(B="");var O,q;B==="y"?(O=1,q=h.c2p(0,!0)):B==="x"&&(O=0,q=m.c2p(0,!0)),y[0][d.isRangePlot?"nodeRangePlot3":"node3"]=I;var Y="",ee=[],te=b._prevtrace,ae=null,U=null;te&&(Y=te._prevRevpath||"",k=te._nextFill,ee=te._ownPolygons,ae=te._fillsegments,U=te._fillElement);var H,K,V="",$="",X,Z,Q,re,ce,me,ye=[];b._polygons=[];var Ae=[],Se=[],Ce=w.noop;if(D=b._ownFill,t.hasLines(b)||b.fill!=="none"){k&&k.datum(y),["hv","vh","hvh","vhv"].indexOf(_.shape)!==-1?(X=e.steps(_.shape),Z=e.steps(_.shape.split("").reverse().join(""))):_.shape==="spline"?X=Z=function(Zt){var vr=Zt[Zt.length-1];return Zt.length>1&&Zt[0][0]===vr[0]&&Zt[0][1]===vr[1]?e.smoothclosed(Zt.slice(1),_.smoothing):e.smoothopen(Zt,_.smoothing)}:X=Z=function(Zt){return"M"+Zt.join("L")},Q=function(Zt){return Z(Zt.reverse())},Se=a(y,{xaxis:m,yaxis:h,trace:b,connectGaps:b.connectgaps,baseTolerance:Math.max(_.width||1,3)/4,shape:_.shape,backoff:_.backoff,simplify:_.simplify,fill:b.fill}),Ae=new Array(Se.length);var qe=0;for(E=0;E=T[0]&&I.x<=T[1]&&I.y>=E[0]&&I.y<=E[1]}),h=Math.ceil(m.length/A),b=0;o.forEach(function(I,C){var F=I[0].trace;t.hasMarkers(F)&&F.marker.maxdisplayed>0&&C=Math.min(te,ae)&&d<=Math.max(te,ae)?0:1/0}var U=Math.max(3,ee.mrc||0),H=1-1/U,K=Math.abs(p.c2p(ee.x)-d);return K=Math.min(te,ae)&&y<=Math.max(te,ae)?0:1/0}var U=Math.max(3,ee.mrc||0),H=1-1/U,K=Math.abs(f.c2p(ee.y)-y);return K$!=Ae>=$&&(ce=Q[Z-1][0],me=Q[Z][0],Ae-ye&&(re=ce+(me-ce)*($-ye)/(Ae-ye),U=Math.min(U,re),H=Math.max(H,re)));return U=Math.max(U,0),H=Math.min(H,p._length),{x0:U,x1:H,y0:$,y1:$}}if(x.indexOf("fills")!==-1&&c._fillElement){var O=k(c._fillElement)&&!k(c._fillExclusionElement);if(O){var q=B(c._polygons);q===null&&(q={x0:o[0],x1:o[0],y0:o[1],y1:o[1]});var Y=l.defaultLine;return l.opacity(c.fillcolor)?Y=c.fillcolor:l.opacity((c.line||{}).color)&&(Y=c.line.color),u.extendFlat(a,{distance:a.maxHoverDistance,x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1,color:Y,hovertemplate:!1}),delete a.index,c.text&&!u.isArrayOrTypedArray(c.text)?a.text=String(c.text):a.text=c.name,[a]}}}}}),Pp=De({"src/traces/scatter/select.js"(j,N){"use strict";var u=Sl();N.exports=function(w,S){var l=w.cd,e=w.xaxis,t=w.yaxis,a=[],r=l[0].trace,n,i,s,c,p=r.mode&&!u.hasMarkers(r)&&!u.hasText(r);if(p)return[];if(S===!1)for(n=0;n0&&(i["_"+r+"axes"]||{})[a])return i;if((i[r+"axis"]||r)===a){if(e(i,r))return i;if((i[r]||[]).length||i[r+"0"])return i}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,a){var r=l(t),n=u(t,"box-violin");return n&&a===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),nx=De({"src/plots/cartesian/category_order_defaults.js"(j,N){"use strict";var u=Vf().isTypedArraySpec;function v(w,S){var l=S.dataAttr||w._id.charAt(0),e={},t,a,r;if(S.axData)t=S.axData;else for(t=[],a=0;a0||u(a),n;r&&(n="array");var i=e("categoryorder",n),s;i==="array"&&(s=e("categoryarray")),!r&&i==="array"&&(i=l.categoryorder="trace"),i==="trace"?l._initialCategories=[]:i==="array"?l._initialCategories=s.slice():(s=v(l,t).sort(),i==="category ascending"?l._initialCategories=s:i==="category descending"&&(l._initialCategories=s.reverse()))}}}}),R1=De({"src/plots/cartesian/line_grid_defaults.js"(j,N){"use strict";var u=ii(),v=mc(),w=Ar();N.exports=function(l,e,t,a){a=a||{};var r=a.dfltColor;function n(_,I){return w.coerce2(l,e,a.attributes,_,I)}var i=n("linecolor",r),s=n("linewidth"),c=t("showline",a.showLine||!!i||!!s);c||(delete e.linecolor,delete e.linewidth);var p=u.mix(r,a.bgColor,a.blend||v.lightFraction),f=n("gridcolor",p),d=n("gridwidth"),y=n("griddash"),o=t("showgrid",a.showGrid||!!f||!!d||!!y);if(o||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),a.hasMinor){var x=u.mix(e.gridcolor,a.bgColor,67),M=n("minor.gridcolor",x),T=n("minor.gridwidth",e.gridwidth||1),E=n("minor.griddash",e.griddash||"solid"),g=t("minor.showgrid",!!M||!!T||!!E);g||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!a.noZeroLine){var A=n("zerolinelayer"),m=n("zerolinecolor",r),h=n("zerolinewidth"),b=t("zeroline",a.showGrid||!!m||!!h);b||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),I1=De({"src/plots/cartesian/axis_defaults.js"(j,N){"use strict";var u=io(),v=hi(),w=Ar(),S=ws(),l=Hf(),e=hf(),t=Mp(),a=hm(),r=Gv(),n=Vv(),i=nx(),s=R1(),c=B3(),p=Sd(),f=gc().WEEKDAY_PATTERN,d=gc().HOUR_PATTERN;N.exports=function(T,E,g,A,m){var h=A.letter,b=A.font||{},_=A.splomStash||{},I=g("visible",!A.visibleDflt),C=E._template||{},F=E.type||C.type||"-",R;if(F==="date"){var z=v.getComponentMethod("calendars","handleDefaults");z(T,E,"calendar",A.calendar),A.noTicklabelmode||(R=g("ticklabelmode"))}!A.noTicklabelindex&&(F==="date"||F==="linear")&&g("ticklabelindex");var D="";(!A.noTicklabelposition||F==="multicategory")&&(D=w.coerce(T,E,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:R==="period"?["outside","inside"]:h==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),A.noTicklabeloverflow||g("ticklabeloverflow",D.indexOf("inside")!==-1?"hide past domain":F==="category"||F==="multicategory"?"allow":"hide past div"),p(E,m),c(T,E,g,A),i(T,E,g,A),A.noHover||(F!=="category"&&g("hoverformat"),A.noUnifiedhovertitle||g("unifiedhovertitle.text"));var k=g("color"),B=k!==e.color.dflt?k:b.color,O=_.label||m._dfltTitle[h];if(n(T,E,g,F,A),!I)return E;g("title.text",O),w.coerceFont(g,"title.font",b,{overrideDflt:{size:w.bigFont(b.size),color:B}}),t(T,E,g,F);var q=A.hasMinor;if(q&&(S.newContainer(E,"minor"),t(T,E,g,F,{isMinor:!0})),r(T,E,g,F,A),a(T,E,g,A),q){var Y=A.isMinor;A.isMinor=!0,a(T,E,g,A),A.isMinor=Y}s(T,E,g,{dfltColor:k,bgColor:A.bgColor,showGrid:A.showGrid,hasMinor:q,attributes:e}),q&&E.ticklabelindex==null&&!E.minor.ticks&&!E.minor.showgrid&&delete E.minor,(E.showline||E.ticks)&&g("mirror");var ee=F==="multicategory";if(!A.noTickson&&(F==="category"||ee)&&(E.ticks||E.showgrid)&&(ee?(g("tickson","boundaries"),delete E.ticklabelposition):g("tickson")),ee){var te=g("showdividers");te&&(g("dividercolor"),g("dividerwidth"))}if(F==="date")if(l(T,E,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:y}),!E.rangebreaks.length)delete E.rangebreaks;else{for(var ae=0;ae=2){var h="",b,_;if(m.length===2){for(b=0;b<2;b++)if(_=x(m[b]),_){h=f;break}}var I=g("pattern",h);if(I===f)for(b=0;b<2;b++)_=x(m[b]),_&&(T.bounds[b]=m[b]=_-1);if(I)for(b=0;b<2;b++)switch(_=m[b],I){case f:if(!u(_)){T.enabled=!1;return}if(_=+_,_!==Math.floor(_)||_<0||_>=7){T.enabled=!1;return}T.bounds[b]=m[b]=_;break;case d:if(!u(_)){T.enabled=!1;return}if(_=+_,_<0||_>24){T.enabled=!1;return}T.bounds[b]=m[b]=_;break}if(E.autorange===!1){var C=E.range;if(C[0]C[1]){T.enabled=!1;return}}else if(m[0]>C[0]&&m[1]g[1]-1/4096&&(l.domain=p),v.noneOrAll(S.domain,l.domain,p),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),IR=De({"src/plots/cartesian/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=ii(),w=Ch().isUnifiedHover,S=H3(),l=ws(),e=um(),t=hf(),a=fw(),r=I1(),n=Ep(),i=ix(),s=lu(),c=s.id2name,p=s.name2id,f=gc().AX_ID_PATTERN,d=hi(),y=d.traceIs,o=d.getComponentMethod;function x(M,T,E){Array.isArray(M[T])?M[T].push(E):M[T]=[E]}N.exports=function(T,E,g){var A=E.autotypenumbers,m={},h={},b={},_={},I={},C={},F={},R={},z={},D={},k,B;for(k=0;k rect").call(S.setTranslate,0,0).call(S.setScale,1,1),E.plot.call(S.setTranslate,g._offset,A._offset).call(S.setScale,1,1);var m=E.plot.selectAll(".scatterlayer .trace");m.selectAll(".point").call(S.setPointGroupScale,1,1),m.selectAll(".textpoint").call(S.setTextPointsScale,1,1),m.call(S.hideOutsideRangePoints,E)}function c(E,g){var A=E.plotinfo,m=A.xaxis,h=A.yaxis,b=m._length,_=h._length,I=!!E.xr1,C=!!E.yr1,F=[];if(I){var R=w.simpleMap(E.xr0,m.r2l),z=w.simpleMap(E.xr1,m.r2l),D=R[1]-R[0],k=z[1]-z[0];F[0]=(R[0]*(1-g)+g*z[0]-R[0])/(R[1]-R[0])*b,F[2]=b*(1-g+g*k/D),m.range[0]=m.l2r(R[0]*(1-g)+g*z[0]),m.range[1]=m.l2r(R[1]*(1-g)+g*z[1])}else F[0]=0,F[2]=b;if(C){var B=w.simpleMap(E.yr0,h.r2l),O=w.simpleMap(E.yr1,h.r2l),q=B[1]-B[0],Y=O[1]-O[0];F[1]=(B[1]*(1-g)+g*O[1]-B[1])/(B[0]-B[1])*_,F[3]=_*(1-g+g*Y/q),h.range[0]=m.l2r(B[0]*(1-g)+g*O[0]),h.range[1]=h.l2r(B[1]*(1-g)+g*O[1])}else F[1]=0,F[3]=_;l.drawOne(t,m,{skipTitle:!0}),l.drawOne(t,h,{skipTitle:!0}),l.redrawComponents(t,[m._id,h._id]);var ee=I?b/F[2]:1,te=C?_/F[3]:1,ae=I?F[0]:0,U=C?F[1]:0,H=I?F[0]/F[2]*b:0,K=C?F[1]/F[3]*_:0,V=m._offset-H,$=h._offset-K;A.clipRect.call(S.setTranslate,ae,U).call(S.setScale,1/ee,1/te),A.plot.call(S.setTranslate,V,$).call(S.setScale,ee,te),S.setPointGroupScale(A.zoomScalePts,1/ee,1/te),S.setTextPointsScale(A.zoomScaleTxt,1/ee,1/te)}var p;n&&(p=n());function f(){for(var E={},g=0;gr.duration?(f(),x=window.cancelAnimationFrame(T)):x=window.requestAnimationFrame(T)}return y=Date.now(),x=window.requestAnimationFrame(T),Promise.resolve()}}}),Hu=De({"src/plots/cartesian/index.js"(j){"use strict";var N=Qn(),u=hi(),v=Ar(),w=Il(),S=Ki(),l=Bf().getModuleCalcData,e=lu(),t=gc(),a=Kh(),r=v.ensureSingle;function n(y,o,x){return v.ensureSingle(y,o,x,function(M){M.datum(x)})}var i=t.zindexSeparator;j.name="cartesian",j.attr=["xaxis","yaxis"],j.idRoot=["x","y"],j.idRegex=t.idRegex,j.attrRegex=t.attrRegex,j.attributes=RR(),j.layoutAttributes=hf(),j.supplyLayoutDefaults=IR(),j.transitionAxes=DR(),j.finalizeSubplots=function(y,o){var x=o._subplots,M=x.xaxis,T=x.yaxis,E=x.cartesian,g=E,A={},m={},h,b,_;for(h=0;h0){var C=I.id;if(C.indexOf(i)!==-1)continue;C+=i+(h+1),I=v.extendFlat({},I,{id:C,plot:T._cartesianlayer.selectAll(".subplot").select("."+C)})}for(var F=[],R,z=0;z1&&(q+=i+O),B.push(A+q),g=0;g1,_=o.mainplotinfo;if(!o.mainplot||b)if(h)o.xlines=r(M,"path","xlines-above"),o.ylines=r(M,"path","ylines-above"),o.xaxislayer=r(M,"g","xaxislayer-above"),o.yaxislayer=r(M,"g","yaxislayer-above");else{if(!g){var I=r(M,"g","layer-subplot");o.shapelayer=r(I,"g","shapelayer"),o.imagelayer=r(I,"g","imagelayer"),_&&b?(o.minorGridlayer=_.minorGridlayer,o.gridlayer=_.gridlayer,o.zerolinelayer=_.zerolinelayer):(o.minorGridlayer=r(M,"g","minor-gridlayer"),o.gridlayer=r(M,"g","gridlayer"),o.zerolinelayer=r(M,"g","zerolinelayer"));var C=r(M,"g","layer-between");o.shapelayerBetween=r(C,"g","shapelayer"),o.imagelayerBetween=r(C,"g","imagelayer"),r(M,"path","xlines-below"),r(M,"path","ylines-below"),o.overlinesBelow=r(M,"g","overlines-below"),r(M,"g","xaxislayer-below"),r(M,"g","yaxislayer-below"),o.overaxesBelow=r(M,"g","overaxes-below")}o.overplot=r(M,"g","overplot"),o.plot=r(o.overplot,"g",T),_&&b?o.zerolinelayerAbove=_.zerolinelayerAbove:o.zerolinelayerAbove=r(M,"g","zerolinelayer-above"),g||(o.xlines=r(M,"path","xlines-above"),o.ylines=r(M,"path","ylines-above"),o.overlinesAbove=r(M,"g","overlines-above"),r(M,"g","xaxislayer-above"),r(M,"g","yaxislayer-above"),o.overaxesAbove=r(M,"g","overaxes-above"),o.xlines=M.select(".xlines-"+A),o.ylines=M.select(".ylines-"+m),o.xaxislayer=M.select(".xaxislayer-"+A),o.yaxislayer=M.select(".yaxislayer-"+m))}else{var F=_.plotgroup,R=T+"-x",z=T+"-y";o.minorGridlayer=_.minorGridlayer,o.gridlayer=_.gridlayer,o.zerolinelayer=_.zerolinelayer,o.zerolinelayerAbove=_.zerolinelayerAbove,r(_.overlinesBelow,"path",R),r(_.overlinesBelow,"path",z),r(_.overaxesBelow,"g",R),r(_.overaxesBelow,"g",z),o.plot=r(_.overplot,"g",T),r(_.overlinesAbove,"path",R),r(_.overlinesAbove,"path",z),r(_.overaxesAbove,"g",R),r(_.overaxesAbove,"g",z),o.xlines=F.select(".overlines-"+A).select("."+R),o.ylines=F.select(".overlines-"+m).select("."+z),o.xaxislayer=F.select(".overaxes-"+A).select("."+R),o.yaxislayer=F.select(".overaxes-"+m).select("."+z)}g||(h||(n(o.minorGridlayer,"g",o.xaxis._id),n(o.minorGridlayer,"g",o.yaxis._id),o.minorGridlayer.selectAll("g").map(function(D){return D[0]}).sort(e.idSort),n(o.gridlayer,"g",o.xaxis._id),n(o.gridlayer,"g",o.yaxis._id),o.gridlayer.selectAll("g").map(function(D){return D[0]}).sort(e.idSort)),o.xlines.style("fill","none").classed("crisp",!0),o.ylines.style("fill","none").classed("crisp",!0))}function f(y,o){if(y){var x={};y.each(function(m){var h=m[0],b=N.select(this);b.remove(),d(h,o),x[h]=!0});for(var M in o._plots)for(var T=o._plots[M],E=T.overlays||[],g=0;g=0,o=n.indexOf("end")>=0,x=c.backoff*f+i.standoff,M=p.backoff*d+i.startstandoff,T,E,g,A;if(s.nodeName==="line"){T={x:+r.attr("x1"),y:+r.attr("y1")},E={x:+r.attr("x2"),y:+r.attr("y2")};var m=T.x-E.x,h=T.y-E.y;if(g=Math.atan2(h,m),A=g+Math.PI,x&&M&&x+M>Math.sqrt(m*m+h*h)){q();return}if(x){if(x*x>m*m+h*h){q();return}var b=x*Math.cos(g),_=x*Math.sin(g);E.x+=b,E.y+=_,r.attr({x2:E.x,y2:E.y})}if(M){if(M*M>m*m+h*h){q();return}var I=M*Math.cos(g),C=M*Math.sin(g);T.x-=I,T.y-=C,r.attr({x1:T.x,y1:T.y})}}else if(s.nodeName==="path"){var F=s.getTotalLength(),R="";if(F2/3?aa="right":aa="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[aa]}for(var Fe=!1,Ve=["x","y"],je=0;je1)&&(yt===st?(Xe=At.r2fraction(M["a"+ut]),(Xe<0||Xe>1)&&(Fe=!0)):Fe=!0),ze=At._offset+At.r2p(M[ut]),Ie=.5}else{var mt=We==="domain";ut==="x"?(_e=M[ut],ze=mt?At._offset+At._length*_e:ze=h.l+h.w*_e):(_e=1-M[ut],ze=mt?At._offset+At._length*_e:ze=h.t+h.h*_e),Ie=M.showarrow?.5:_e}if(M.showarrow){Ee.head=ze;var ft=M["a"+ut];if(Be=Zt*be(.5,M.xanchor)-vr*be(.5,M.yanchor),yt===st){var ht=e.getRefType(yt);ht==="domain"?(ut==="y"&&(ft=1-ft),Ee.tail=At._offset+At._length*ft):ht==="paper"?ut==="y"?(ft=1-ft,Ee.tail=h.t+h.h*ft):Ee.tail=h.l+h.w*ft:Ee.tail=At._offset+At.r2p(ft),ve=Be}else Ee.tail=ze+ft,ve=Be+ft;Ee.text=Ee.tail+Be;var gt=m[ut==="x"?"width":"height"];if(st==="paper"&&(Ee.head=S.constrain(Ee.head,1,gt-1)),yt==="pixel"){var _t=-Math.max(Ee.tail-3,Ee.text),Ft=Math.min(Ee.tail+3,Ee.text)-gt;_t>0?(Ee.tail+=_t,Ee.text+=_t):Ft>0&&(Ee.tail-=Ft,Ee.text-=Ft)}Ee.tail+=nt,Ee.head+=nt}else Be=Nt*be(Ie,Kt),ve=Be,Ee.text=ze+Be;Ee.text+=nt,Be+=nt,ve+=nt,M["_"+ut+"padplus"]=Nt/2+ve,M["_"+ut+"padminus"]=Nt/2-ve,M["_"+ut+"size"]=Nt,M["_"+ut+"shift"]=Be}if(Fe){ae.remove();return}var St=0,hr=0;if(M.align!=="left"&&(St=(he-Ue)*(M.align==="center"?.5:1)),M.valign!=="top"&&(hr=(oe-xe)*(M.valign==="middle"?.5:1)),Ce)Se.select("svg").attr({x:K+St-1,y:K+hr}).call(a.setClipUrl,$?D:null,x);else{var jr=K+hr-qe.top,ra=K+St-qe.left;re.call(n.positionText,ra,jr).call(a.setClipUrl,$?D:null,x)}X.select("rect").call(a.setRect,K,K,he,oe),V.call(a.setRect,U/2,U/2,le-U,ne-U),ae.call(a.setTranslate,Math.round(k.x.text-le/2),Math.round(k.y.text-ne/2)),q.attr({transform:"rotate("+B+","+k.x.text+","+k.y.text+")"});var $r=function(oa,aa){O.selectAll(".annotation-arrow-g").remove();var ka=k.x.head,Ta=k.y.head,Da=k.x.tail+oa,La=k.y.tail+aa,Ga=k.x.text+oa,xa=k.y.text+aa,Gn=S.rotationXYMatrix(B,Ga,xa),Pn=S.apply2DTransform(Gn),sn=S.apply2DTransform2(Gn),Yn=+V.attr("width"),Zn=+V.attr("height"),vi=Ga-.5*Yn,Dn=vi+Yn,oi=xa-.5*Zn,on=oi+Zn,mn=[[vi,oi,vi,on],[vi,on,Dn,on],[Dn,on,Dn,oi],[Dn,oi,vi,oi]].map(sn);if(!mn.reduce(function(Je,bt){return Je^!!S.segmentsIntersect(ka,Ta,ka+1e6,Ta+1e6,bt[0],bt[1],bt[2],bt[3])},!1)){mn.forEach(function(Je){var bt=S.segmentsIntersect(Da,La,ka,Ta,Je[0],Je[1],Je[2],Je[3]);bt&&(Da=bt.x,La=bt.y)});var bi=M.arrowwidth,Li=M.arrowcolor,$a=M.arrowside,Va=O.append("g").style({opacity:t.opacity(Li)}).classed("annotation-arrow-g",!0),it=Va.append("path").attr("d","M"+Da+","+La+"L"+ka+","+Ta).style("stroke-width",bi+"px").call(t.stroke,t.rgb(Li));if(p(it,$a,M),b.annotationPosition&&it.node().parentNode&&!E){var Qe=ka,Jt=Ta;if(M.standoff){var Yt=Math.sqrt(Math.pow(ka-Da,2)+Math.pow(Ta-La,2));Qe+=M.standoff*(Da-ka)/Yt,Jt+=M.standoff*(La-Ta)/Yt}var ar=Va.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Da-Qe)+","+(La-Jt),transform:l(Qe,Jt)}).style("stroke-width",bi+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),cr,tr;s.init({element:ar.node(),gd:x,prepFn:function(){var Je=a.getTranslate(ae);cr=Je.x,tr=Je.y,g&&g.autorange&&F(g._name+".autorange",!0),A&&A.autorange&&F(A._name+".autorange",!0)},moveFn:function(Je,bt){var qt=Pn(cr,tr),Qt=qt[0]+Je,br=qt[1]+bt;ae.call(a.setTranslate,Qt,br),R("x",y(g,Je,"x",h,M)),R("y",y(A,bt,"y",h,M)),M.axref===M.xref&&R("ax",y(g,Je,"ax",h,M)),M.ayref===M.yref&&R("ay",y(A,bt,"ay",h,M)),Va.attr("transform",l(Je,bt)),q.attr({transform:"rotate("+B+","+Qt+","+br+")"})},doneFn:function(){v.call("_guiRelayout",x,z());var Je=document.querySelector(".js-notes-box-panel");Je&&Je.redraw(Je.selectedObj)}})}}};if(M.showarrow&&$r(0,0),Y){var pa;s.init({element:ae.node(),gd:x,prepFn:function(){pa=q.attr("transform")},moveFn:function(oa,aa){var ka="pointer";if(M.showarrow)M.axref===M.xref?R("ax",y(g,oa,"ax",h,M)):R("ax",M.ax+oa),M.ayref===M.yref?R("ay",y(A,aa,"ay",h.w,M)):R("ay",M.ay+aa),$r(oa,aa);else{if(E)return;var Ta,Da;if(g)Ta=y(g,oa,"x",h,M);else{var La=M._xsize/h.w,Ga=M.x+(M._xshift-M.xshift)/h.w-La/2;Ta=s.align(Ga+oa/h.w,La,0,1,M.xanchor)}if(A)Da=y(A,aa,"y",h,M);else{var xa=M._ysize/h.h,Gn=M.y-(M._yshift+M.yshift)/h.h-xa/2;Da=s.align(Gn-aa/h.h,xa,0,1,M.yanchor)}R("x",Ta),R("y",Da),(!g||!A)&&(ka=s.getCursor(g?.5:Ta,A?.5:Da,M.xanchor,M.yanchor))}q.attr({transform:l(oa,aa)+pa}),i(ae,ka)},clickFn:function(oa,aa){M.captureevents&&x.emit("plotly_clickannotation",te(aa))},doneFn:function(){i(ae),v.call("_guiRelayout",x,z());var oa=document.querySelector(".js-notes-box-panel");oa&&oa.redraw(oa.selectedObj)}})}}b.annotationText?re.call(n.makeEditable,{delegate:ae,gd:x}).call(ce).on("edit",function(ye){M.text=ye,this.call(ce),R("text",ye),g&&g.autorange&&F(g._name+".autorange",!0),A&&A.autorange&&F(A._name+".autorange",!0),v.call("_guiRelayout",x,z())}):re.call(ce)}}}),BR=De({"src/components/annotations/click.js"(j,N){"use strict";var u=Ar(),v=hi(),w=ws().arrayEditor;N.exports={hasClickToShow:S,onClick:l};function S(a,r){var n=e(a,r);return n.on.length>0||n.explicitOff.length>0}function l(a,r){var n=e(a,r),i=n.on,s=n.off.concat(n.explicitOff),c={},p=a._fullLayout.annotations,f,d;if(i.length||s.length){for(f=0;f1){i=!0;break}}i?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(n._pdata=v(l.glplot.cameraParams,[e.xaxis.r2l(n.x)*t[0],e.yaxis.r2l(n.y)*t[1],e.zaxis.r2l(n.z)*t[2]]),u(l.graphDiv,n,r,l.id,n._xa,n._ya))}}}}),HR=De({"src/components/annotations3d/index.js"(j,N){"use strict";var u=hi(),v=Ar();N.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:sx()}}},layoutAttributes:sx(),handleDefaults:qR(),includeBasePlot:w,convert:GR(),draw:VR()};function w(S,l){var e=u.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,a=Object.keys(S),r=0;r{var _=b+"anchor",I=b==="x"?x:M,C={_fullLayout:n},F,R,z,D;let k=b+"ref",B=a[k];if(Array.isArray(B)&&B.length>0){let O=l.countDefiningCoords(d,p,b);D=v.coerceRefArray(a,r,C,b,void 0,"paper",O),r["_"+b+"refArray"]=!0}else D=v.coerceRef(a,r,C,b,void 0,"paper");if(Array.isArray(D))D.forEach(function(O){v.getRefType(O)==="range"&&(F=v.getFromId(C,O),F&&F._shapeIndices.indexOf(r._index)===-1&&F._shapeIndices.push(r._index))}),y&&[0,1].forEach(function(O){let q=D[O];v.getRefType(q)==="range"?(F=v.getFromId(C,q),R=l.shapePositionToRange(F),z=l.rangeToShapePosition(F),(F.type==="category"||F.type==="multicategory")&&i(b+O+"shift")):R=z=u.identity;let ee=b+O,te=a[ee];if(a[ee]=R(a[ee],!0),I==="pixel"?i(ee,E[O]):v.coercePosition(r,C,i,q,ee,T[O]),r[ee]=z(r[ee]),a[ee]=te,O===0&&I==="pixel"){let ae=a[_];a[_]=R(a[_],!0),v.coercePosition(r,C,i,q,_,.25),r[_]=z(r[_]),a[_]=ae}});else{if(v.getRefType(D)==="range"?(F=v.getFromId(C,D),F._shapeIndices.push(r._index),z=l.rangeToShapePosition(F),R=l.shapePositionToRange(F),y&&(F.type==="category"||F.type==="multicategory")&&(i(b+"0shift"),i(b+"1shift"))):R=z=u.identity,y){let q=b+"0",Y=b+"1",ee=a[q],te=a[Y];a[q]=R(a[q],!0),a[Y]=R(a[Y],!0),I==="pixel"?(i(q,E[0]),i(Y,E[1])):(v.coercePosition(r,C,i,D,q,T[0]),v.coercePosition(r,C,i,D,Y,T[1])),r[q]=z(r[q]),r[Y]=z(r[Y]),a[q]=ee,a[Y]=te}if(I==="pixel"){let q=a[_];a[_]=R(a[_],!0),v.coercePosition(r,C,i,D,_,.25),r[_]=z(r[_]),a[_]=q}}}),y&&u.noneOrAll(a,r,["x0","x1","y0","y1"]);var g=d==="line",A,m;if(y&&(A=i("label.texttemplate"),i("label.texttemplatefallback")),A||(m=i("label.text")),m||A){i("label.textangle");var h=i("label.textposition",g?"middle":"middle center");i("label.xanchor"),i("label.yanchor",e(g,h)),i("label.padding"),u.coerceFont(i,"label.font",n.font)}}}}),YR=De({"src/components/shapes/draw_newshape/defaults.js"(j,N){"use strict";var u=ii(),v=Ar();function w(S,l){return S?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}N.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),v.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var a=t("newshape.line.width");if(a){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",u.contrast(r)),t("newshape.line.dash")}var n=l.dragmode==="drawline",i=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),i||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",n?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",w(n,c)),t("newshape.label.padding"),v.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),XR=De({"src/components/shapes/calc_autorange.js"(j,N){"use strict";var u=Ar(),v=Vi(),w=E1(),S=Yv();N.exports=function(i){var s=i._fullLayout,c=u.filterVisible(s.shapes);if(!(!c.length||!i._fullData.length))for(var p=0;p{d=v.getFromId(i,T),f._extremes[d._id]=v.findExtremes(d,E,e(f))})}else f.xref!=="paper"&&o!=="domain"&&(d=v.getFromId(i,f.xref),y=r(d,f,w.paramIsX),y&&(f._extremes[d._id]=v.findExtremes(d,y,e(f))));if(x==="array"){let M=l(i,f,"y");Object.entries(M).forEach(([T,E])=>{d=v.getFromId(i,T),f._extremes[d._id]=v.findExtremes(d,E,t(f))})}else f.yref!=="paper"&&x!=="domain"&&(d=v.getFromId(i,f.yref),y=r(d,f,w.paramIsY),y&&(f._extremes[d._id]=v.findExtremes(d,y,t(f))))}};function l(n,i,s){let c=i[s+"ref"],p=s==="x"?w.paramIsX:w.paramIsY;function f(T,E){T==="paper"||v.getRefType(T)==="domain"||(d[T]||(d[T]=[]),d[T].push(E))}let d={};if(i.type==="path"&&i.path){let T=i.path.match(w.segmentRE)||[];for(var y=0,o=0;oA&&(f(c[y],m[A]),y++)}}else f(c[0],i[s+"0"]),f(c[1],i[s+"1"]);let x={};for(let T in d){let E=v.getFromId(n,T);if(E){var M=E.type==="category"||E.type==="multicategory"?E.r2c:E.d2c;E.type==="date"&&(M=S.decodeDate(M)),x[E._id]=d[T].map(M)}}return x}function e(n){return a(n.line.width,n.xsizemode,n.x0,n.x1,n.path,!1)}function t(n){return a(n.line.width,n.ysizemode,n.y0,n.y1,n.path,!0)}function a(n,i,s,c,p,f){var d=n/2,y=f;if(i==="pixel"){var o=p?S.extractPathCoords(p,f?w.paramIsY:w.paramIsX):[s,c],x=u.aggNums(Math.max,null,o),M=u.aggNums(Math.min,null,o),T=M<0?Math.abs(M)+d:d,E=x>0?x+d:d;return{ppad:d,ppadplus:y?T:E,ppadminus:y?E:T}}else return{ppad:d}}function r(n,i,s){var c=n._id.charAt(0)==="x"?"x":"y",p=n.type==="category"||n.type==="multicategory",f,d,y=0,o=0,x=p?n.r2c:n.d2c,M=i[c+"sizemode"]==="scaled";if(M?(f=i[c+"0"],d=i[c+"1"],p&&(y=i[c+"0shift"],o=i[c+"1shift"])):(f=i[c+"anchor"],d=i[c+"anchor"]),f!==void 0)return[x(f)+y,x(d)+o];if(i.path){var T=1/0,E=-1/0,g=i.path.match(w.segmentRE),A,m,h,b,_;for(n.type==="date"&&(x=S.decodeDate(x)),A=0;AE&&(E=_)));if(E>=T)return[T,E]}}}}),ZR=De({"src/components/shapes/index.js"(j,N){"use strict";var u=K_();N.exports={moduleType:"component",name:"shapes",layoutAttributes:vw(),supplyLayoutDefaults:WR(),supplyDrawNewShapeDefaults:YR(),includeBasePlot:P1()("shapes"),calcAutorange:XR(),draw:u.draw,drawOne:u.drawOne}}}),pw=De({"src/components/images/attributes.js"(j,N){"use strict";var u=gc(),v=ws().templatedArray,w=L1();N.exports=v("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",u.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",u.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),$R=De({"src/components/images/defaults.js"(j,N){"use strict";var u=Ar(),v=Vi(),w=Hf(),S=pw(),l="images";N.exports=function(a,r){var n={name:l,handleItemDefaults:e};w(a,r,n)};function e(t,a,r){function n(x,M){return u.coerce(t,a,S,x,M)}var i=n("source"),s=n("visible",!!i);if(!s)return a;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var c={_fullLayout:r},p=["x","y"],f=0;f<2;f++){var d=p[f],y=v.coerceRef(t,a,c,d,"paper",void 0);if(y!=="paper"){var o=v.getFromId(c,y);o._imgIndices.push(a._index)}v.coercePosition(a,c,n,y,d,0)}return a}}}),KR=De({"src/components/images/draw.js"(j,N){"use strict";var u=Qn(),v=Ki(),w=Vi(),S=lu(),l=Kh();N.exports=function(t){var a=t._fullLayout,r=[],n={},i=[],s,c;for(c=0;c0);p&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),u.noneOrAll(r,n,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),u.coerceFont(s,"font",i.font),s("bgcolor",i.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function a(r,n){function i(c,p){return u.coerce(r,n,e,c,p)}var s=i("visible",r.method==="skip"||Array.isArray(r.args));s&&(i("method"),i("args"),i("args2"),i("label"),i("execute"))}}}),tI=De({"src/components/updatemenus/scrollbox.js"(j,N){"use strict";N.exports=l;var u=Qn(),v=ii(),w=Ki(),S=Ar();function l(e,t,a){this.gd=e,this.container=t,this.id=a,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,a,r){var n=this.gd._fullLayout,i=n.width,s=n.height;this.position=t;var c=this.position.l,p=this.position.w,f=this.position.t,d=this.position.h,y=this.position.direction,o=y==="down",x=y==="left",M=y==="right",T=y==="up",E=p,g=d,A,m,h,b;!o&&!x&&!M&&!T&&(this.position.direction="down",o=!0);var _=o||T;_?(A=c,m=A+E,o?(h=f,b=Math.min(h+g,s),g=b-h):(b=f+g,h=Math.max(b-g,0),g=b-h)):(h=f,b=h+g,x?(m=c+E,A=Math.max(m-E,0),E=m-A):(A=c,m=Math.min(A+E,i),E=m-A)),this._box={l:A,t:h,w:E,h:g};var I=p>E,C=l.barLength+2*l.barPad,F=l.barWidth+2*l.barPad,R=c,z=f+d;z+F>s&&(z=s-F);var D=this.container.selectAll("rect.scrollbar-horizontal").data(I?[0]:[]);D.exit().on(".drag",null).remove(),D.enter().append("rect").classed("scrollbar-horizontal",!0).call(v.fill,l.barColor),I?(this.hbar=D.attr({rx:l.barRadius,ry:l.barRadius,x:R,y:z,width:C,height:F}),this._hbarXMin=R+C/2,this._hbarTranslateMax=E-C):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var k=d>g,B=l.barWidth+2*l.barPad,O=l.barLength+2*l.barPad,q=c+p,Y=f;q+B>i&&(q=i-B);var ee=this.container.selectAll("rect.scrollbar-vertical").data(k?[0]:[]);ee.exit().on(".drag",null).remove(),ee.enter().append("rect").classed("scrollbar-vertical",!0).call(v.fill,l.barColor),k?(this.vbar=ee.attr({rx:l.barRadius,ry:l.barRadius,x:q,y:Y,width:B,height:O}),this._vbarYMin=Y+O/2,this._vbarTranslateMax=g-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var te=this.id,ae=A-.5,U=k?m+B+.5:m+.5,H=h-.5,K=I?b+F+.5:b+.5,V=n._topdefs.selectAll("#"+te).data(I||k?[0]:[]);if(V.exit().remove(),V.enter().append("clipPath").attr("id",te).append("rect"),I||k?(this._clipRect=V.select("rect").attr({x:Math.floor(ae),y:Math.floor(H),width:Math.ceil(U)-Math.floor(ae),height:Math.ceil(K)-Math.floor(H)}),this.container.call(w.setClipUrl,te,this.gd),this.bg.attr({x:c,y:f,width:p,height:d})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(w.setClipUrl,null),delete this._clipRect),I||k){var $=u.behavior.drag().on("dragstart",function(){u.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call($);var X=u.behavior.drag().on("dragstart",function(){u.event.sourceEvent.preventDefault(),u.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));I&&this.hbar.on(".drag",null).call(X),k&&this.vbar.on(".drag",null).call(X)}this.setTranslate(a,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(w.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)},l.prototype._onBoxDrag=function(){var t=this.translateX,a=this.translateY;this.hbar&&(t-=u.event.dx),this.vbar&&(a-=u.event.dy),this.setTranslate(t,a)},l.prototype._onBoxWheel=function(){var t=this.translateX,a=this.translateY;this.hbar&&(t+=u.event.deltaY),this.vbar&&(a+=u.event.deltaY),this.setTranslate(t,a)},l.prototype._onBarDrag=function(){var t=this.translateX,a=this.translateY;if(this.hbar){var r=t+this._hbarXMin,n=r+this._hbarTranslateMax,i=S.constrain(u.event.x,r,n),s=(i-r)/(n-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var p=a+this._vbarYMin,f=p+this._vbarTranslateMax,d=S.constrain(u.event.y,p,f),y=(d-p)/(f-p),o=this.position.h-this._box.h;a=y*o}this.setTranslate(t,a)},l.prototype.setTranslate=function(t,a){var r=this.position.w-this._box.w,n=this.position.h-this._box.h;if(t=S.constrain(t||0,0,r),a=S.constrain(a||0,0,n),this.translateX=t,this.translateY=a,this.container.call(w.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-a),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+a-.5)}),this.hbar){var i=t/r;this.hbar.call(w.setTranslate,t+i*this._hbarTranslateMax,a)}if(this.vbar){var s=a/n;this.vbar.call(w.setTranslate,t,a+s*this._vbarTranslateMax)}}}}),rI=De({"src/components/updatemenus/draw.js"(j,N){"use strict";var u=Qn(),v=Il(),w=ii(),S=Ki(),l=Ar(),e=Xs(),t=ws().arrayEditor,a=yc().LINE_SPACING,r=lx(),n=tI();N.exports=function(C){var F=C._fullLayout,R=l.filterVisible(F[r.name]);function z(te){v.autoMargin(C,h(te))}var D=F._menulayer.selectAll("g."+r.containerClassName).data(R.length>0?[0]:[]);if(D.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),D.exit().each(function(){u.select(this).selectAll("g."+r.headerGroupClassName).each(z)}).remove(),R.length!==0){var k=D.selectAll("g."+r.headerGroupClassName).data(R,i);k.enter().append("g").classed(r.headerGroupClassName,!0);for(var B=l.ensureSingle(D,"g",r.dropdownButtonGroupClassName,function(te){te.style("pointer-events","all")}),O=0;O0?[0]:[]);q.enter().append("g").classed(r.containerClassName,!0).style("cursor",k?null:"ew-resize");function Y(U){U._commandObserver&&(U._commandObserver.remove(),delete U._commandObserver),v.autoMargin(D,p(U))}if(q.exit().each(function(){u.select(this).selectAll("g."+r.groupClassName).each(Y)}).remove(),O.length!==0){var ee=q.selectAll("g."+r.groupClassName).data(O,d);ee.enter().append("g").classed(r.groupClassName,!0),ee.exit().each(Y).remove();for(var te=0;te0&&(ee=ee.transition().duration(D.transition.duration).ease(D.transition.easing)),ee.attr("transform",e(Y-r.gripWidth*.5,D._dims.currentValueTotalHeight))}}function I(z,D){var k=z._dims;return k.inputAreaStart+r.stepInset+(k.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,D))}function C(z,D){var k=z._dims;return Math.min(1,Math.max(0,(D-r.stepInset-k.inputAreaStart)/(k.inputAreaLength-2*r.stepInset-2*k.inputAreaStart)))}function F(z,D,k){var B=k._dims,O=l.ensureSingle(z,"rect",r.railTouchRectClass,function(q){q.call(m,D,z,k).style("pointer-events","all")});O.attr({width:B.inputAreaLength,height:Math.max(B.inputAreaWidth,r.tickOffset+k.ticklen+B.labelHeight)}).call(w.fill,k.bgcolor).attr("opacity",0),S.setTranslate(O,0,B.currentValueTotalHeight)}function R(z,D){var k=D._dims,B=k.inputAreaLength-r.railInset*2,O=l.ensureSingle(z,"rect",r.railRectClass);O.attr({width:B,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(w.stroke,D.bordercolor).call(w.fill,D.bgcolor).style("stroke-width",D.borderwidth+"px"),S.setTranslate(O,r.railInset,(k.inputAreaWidth-r.railWidth)*.5+k.currentValueTotalHeight)}}}),oI=De({"src/components/sliders/index.js"(j,N){"use strict";var u=D1();N.exports={moduleType:"component",name:u.name,layoutAttributes:gw(),supplyLayoutDefaults:nI(),draw:iI()}}}),ux=De({"src/components/rangeslider/attributes.js"(j,N){"use strict";var u=mc();N.exports={bgcolor:{valType:"color",dflt:u.background,editType:"plot"},bordercolor:{valType:"color",dflt:u.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}}),yw=De({"src/components/rangeslider/oppaxis_attributes.js"(j,N){"use strict";N.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}}),cx=De({"src/components/rangeslider/constants.js"(j,N){"use strict";N.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),sI=De({"src/components/rangeslider/helpers.js"(j){"use strict";var N=lu(),u=Xs(),v=cx(),w=yc().LINE_SPACING,S=v.name;function l(e){var t=e&&e[S];return t&&t.visible}j.isVisible=l,j.makeData=function(e){for(var t=N.list({_fullLayout:e},"x",!0),a=e.margin,r=[],n=0;n=Ue.max)Ce=ce[qe+1];else if(Se=Ue.pmax)Ce=ce[qe+1];else if(Se0?m.touches[0].clientX:0}function f(m,h,b,_){if(h._context.staticPlot)return;var I=m.select("rect."+c.slideBoxClassName).node(),C=m.select("rect."+c.grabAreaMinClassName).node(),F=m.select("rect."+c.grabAreaMaxClassName).node();function R(){var z=u.event,D=z.target,k=p(z),B=k-m.node().getBoundingClientRect().left,O=_.d2p(b._rl[0]),q=_.d2p(b._rl[1]),Y=i.coverSlip();this.addEventListener("touchmove",ee),this.addEventListener("touchend",te),Y.addEventListener("mousemove",ee),Y.addEventListener("mouseup",te);function ee(ae){var U=p(ae),H=+U-k,K,V,$;switch(D){case I:if($="ew-resize",O+H>b._length||q+H<0)return;K=O+H,V=q+H;break;case C:if($="col-resize",O+H>b._length)return;K=O+H,V=q;break;case F:if($="col-resize",q+H<0)return;K=O,V=q+H;break;default:$="ew-resize",K=B,V=B+H;break}if(V0);if(x){var M=a(i,s,c);y("x",M[0]),y("y",M[1]),u.noneOrAll(n,i,["x","y"]),y("xanchor"),y("yanchor"),u.coerceFont(y,"font",s.font);var T=y("bgcolor");y("activecolor",v.contrast(T,e.lightAmount,e.darkAmount)),y("bordercolor"),y("borderwidth")}};function t(r,n,i,s){var c=s.calendar;function p(y,o){return u.coerce(r,n,l.buttons,y,o)}var f=p("visible");if(f){var d=p("step");d!=="all"&&(c&&c!=="gregorian"&&(d==="month"||d==="year")?n.stepmode="backward":p("stepmode"),p("count")),p("label")}}function a(r,n,i){for(var s=i.filter(function(d){return n[d].anchor===r._id}),c=0,p=0;p1)){delete c.grid;return}if(!y&&!o&&!x){var b=A("pattern")==="independent";b&&(y=!0)}g._hasSubplotGrid=y;var _=A("roworder"),I=_==="top to bottom",C=y?.2:.1,F=y?.3:.1,R,z;M&&c._splomGridDflt&&(R=c._splomGridDflt.xside,z=c._splomGridDflt.yside),g._domains={x:r("x",A,C,R,h),y:r("y",A,F,z,m,I)}}function r(s,c,p,f,d,y){var o=c(s+"gap",p),x=c("domain."+s);c(s+"side",f);for(var M=new Array(d),T=x[0],E=(x[1]-T)/(d-o),g=E*(1-o),A=0;A0,f=t._context.staticPlot;a.each(function(d){var y=d[0].trace,o=y.error_x||{},x=y.error_y||{},M;y.ids&&(M=function(A){return A.id});var T=S.hasMarkers(y)&&y.marker.maxdisplayed>0;!x.visible&&!o.visible&&(d=[]);var E=u.select(this).selectAll("g.errorbar").data(d,M);if(E.exit().remove(),!!d.length){o.visible||E.selectAll("path.xerror").remove(),x.visible||E.selectAll("path.yerror").remove(),E.style("opacity",1);var g=E.enter().append("g").classed("errorbar",!0);p&&g.style("opacity",0).transition().duration(n.duration).style("opacity",1),w.setClipUrl(E,r.layerClipId,t),E.each(function(A){var m=u.select(this),h=l(A,s,c);if(!(T&&!A.vis)){var b,_=m.select("path.yerror");if(x.visible&&v(h.x)&&v(h.yh)&&v(h.ys)){var I=x.width;b="M"+(h.x-I)+","+h.yh+"h"+2*I+"m-"+I+",0V"+h.ys,h.noYS||(b+="m-"+I+",0h"+2*I),i=!_.size(),i?_=m.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("yerror",!0):p&&(_=_.transition().duration(n.duration).ease(n.easing)),_.attr("d",b)}else _.remove();var C=m.select("path.xerror");if(o.visible&&v(h.y)&&v(h.xh)&&v(h.xs)){var F=(o.copy_ystyle?x:o).width;b="M"+h.xh+","+(h.y-F)+"v"+2*F+"m0,-"+F+"H"+h.xs,h.noXS||(b+="m0,-"+F+"v"+2*F),i=!C.size(),i?C=m.append("path").style("vector-effect",f?"none":"non-scaling-stroke").classed("xerror",!0):p&&(C=C.transition().duration(n.duration).ease(n.easing)),C.attr("d",b)}else C.remove()}})}})};function l(e,t,a){var r={x:t.c2p(e.x),y:a.c2p(e.y)};return e.yh!==void 0&&(r.yh=a.c2p(e.yh),r.ys=a.c2p(e.ys),v(r.ys)||(r.noYS=!0,r.ys=a.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),v(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),_I=De({"src/components/errorbars/style.js"(j,N){"use strict";var u=Qn(),v=ii();N.exports=function(S){S.each(function(l){var e=l[0].trace,t=e.error_y||{},a=e.error_x||{},r=u.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(v.stroke,t.color),a.copy_ystyle&&(a=t),r.selectAll("path.xerror").style("stroke-width",a.thickness+"px").call(v.stroke,a.color)})}}}),xI=De({"src/components/errorbars/index.js"(j,N){"use strict";var u=Ar(),v=Ul().overrideAll,w=bw(),S={error_x:u.extendFlat({},w),error_y:u.extendFlat({},w)};delete S.error_x.copy_zstyle,delete S.error_y.copy_zstyle,delete S.error_y.copy_ystyle;var l={error_x:u.extendFlat({},w),error_y:u.extendFlat({},w),error_z:u.extendFlat({},w)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,N.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:S,bar:S,histogram:S,scatter3d:v(l,"calc","nested"),scattergl:v(S,"calc","nested")}},supplyDefaults:mI(),calc:gI(),makeComputeError:ww(),plot:yI(),style:_I(),hoverInfo:e};function e(t,a,r){(a.error_y||{}).visible&&(r.yerr=t.yh-t.y,a.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(a.error_x||{}).visible&&(r.xerr=t.xh-t.x,a.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),bI=De({"src/components/colorbar/constants.js"(j,N){"use strict";N.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),wI=De({"src/components/colorbar/draw.js"(j,N){"use strict";var u=Qn(),v=Il(),w=hi(),S=Vi(),l=dh(),e=Ar(),t=e.strTranslate,a=Ji().extendFlat,r=ld(),n=Ki(),i=ii(),s=Sp(),c=Xs(),p=Of().flipScale,f=I1(),d=ix(),y=hf(),o=yc(),x=o.LINE_SPACING,M=o.FROM_TL,T=o.FROM_BR,E=bI().cn;function g(I){var C=I._fullLayout,F=C._infolayer.selectAll("g."+E.colorbar).data(A(I),function(R){return R._id});F.enter().append("g").attr("class",function(R){return R._id}).classed(E.colorbar,!0),F.each(function(R){var z=u.select(this);e.ensureSingle(z,"rect",E.cbbg),e.ensureSingle(z,"g",E.cbfills),e.ensureSingle(z,"g",E.cblines),e.ensureSingle(z,"g",E.cbaxis,function(k){k.classed(E.crisp,!0)}),e.ensureSingle(z,"g",E.cbtitleunshift,function(k){k.append("g").classed(E.cbtitle,!0)}),e.ensureSingle(z,"rect",E.cboutline);var D=m(z,R,I);D&&D.then&&(I._promises||[]).push(D),I._context.edits.colorbarPosition&&h(z,R,I)}),F.exit().each(function(R){v.autoMargin(I,R._id)}).remove(),F.order()}function A(I){var C=I._fullLayout,F=I.calcdata,R=[],z,D,k,B;function O(X){return a(X,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function q(){typeof B.calc=="function"?B.calc(I,k,z):(z._fillgradient=D.reversescale?p(D.colorscale):D.colorscale,z._zrange=[D[B.min],D[B.max]])}for(var Y=0;Y1){var nt=Math.pow(10,Math.floor(Math.log(Kt)/Math.LN10));vr*=nt*e.roundUp(Kt/nt,[2,5,10]),(Math.abs(Ce.start)/Ce.size+1e-6)%1<2e-6&&(Pt.tick0=0)}Pt.dtick=vr}Pt.domain=R?[yt+U/Z.h,yt+ne-U/Z.h]:[yt+ae/Z.w,yt+ne-ae/Z.w],Pt.setScale(),I.attr("transform",t(Math.round(Z.l),Math.round(Z.t)));var Ee=I.select("."+E.cbtitleunshift).attr("transform",t(-Math.round(Z.l),-Math.round(Z.t))),ze=Pt.ticklabelposition,ve=Pt.title.font.size,_e=I.select("."+E.cbaxis),Ie,Be=0,We=0;function Xe(_t,Ft){var St={propContainer:Pt,propName:C._propPrefix+"title.text",traceIndex:C._traceIndex,_meta:C._meta,placeholder:X._dfltTitle.colorbar,containerGroup:I.select("."+E.cbtitle)},hr=_t.charAt(0)==="h"?_t.slice(1):"h"+_t;I.selectAll("."+hr+",."+hr+"-math-group").remove(),s.draw(F,_t,a(St,Ft||{}))}function mt(){if(R&&Zt||!R&&!Zt){var _t,Ft;me==="top"&&(_t=ae+Z.l+be*H,Ft=U+Z.t+Fe*(1-yt-ne)+3+ve*.75),me==="bottom"&&(_t=ae+Z.l+be*H,Ft=U+Z.t+Fe*(1-yt)-3-ve*.25),me==="right"&&(Ft=U+Z.t+Fe*K+3+ve*.75,_t=ae+Z.l+be*yt),Xe(Pt._id+"title",{attributes:{x:_t,y:Ft,"text-anchor":R?"start":"middle"}})}}function ft(){if(R&&!Zt||!R&&Zt){var _t=Pt.position||0,Ft=Pt._offset+Pt._length/2,St,hr;if(me==="right")hr=Ft,St=Z.l+be*_t+10+ve*(Pt.showticklabels?1:.5);else if(St=Ft,me==="bottom"&&(hr=Z.t+Fe*_t+10+(ze.indexOf("inside")===-1?Pt.tickfont.size:0)+(Pt.ticks!=="inside"&&C.ticklen||0)),me==="top"){var jr=ce.text.split("
").length;hr=Z.t+Fe*_t+10-he-x*ve*jr}Xe((R?"h":"v")+Pt._id+"title",{avoid:{selection:u.select(F).selectAll("g."+Pt._id+"tick"),side:me,offsetTop:R?0:Z.t,offsetLeft:R?Z.l:0,maxShift:R?X.width:X.height},attributes:{x:St,y:hr,"text-anchor":"middle"},transform:{rotate:R?-90:0,offset:0}})}}function ht(){if(!R&&!Zt||R&&Zt){var _t=I.select("."+E.cbtitle),Ft=_t.select("text"),St=[-O/2,O/2],hr=_t.select(".h"+Pt._id+"title-math-group").node(),jr=15.6;Ft.node()&&(jr=parseInt(Ft.node().style.fontSize,10)*x);var ra;if(hr?(ra=n.bBox(hr),We=ra.width,Be=ra.height,Be>jr&&(St[1]-=(Be-jr)/2)):Ft.node()&&!Ft.classed(E.jsPlaceholder)&&(ra=n.bBox(Ft.node()),We=ra.width,Be=ra.height),R){if(Be){if(Be+=5,me==="top")Pt.domain[1]-=Be/Z.h,St[1]*=-1;else{Pt.domain[0]+=Be/Z.h;var $r=c.lineCount(Ft);St[1]+=(1-$r)*jr}_t.attr("transform",t(St[0],St[1])),Pt.setScale()}}else We&&(me==="right"&&(Pt.domain[0]+=(We+ve/2)/Z.w),_t.attr("transform",t(St[0],St[1])),Pt.setScale())}I.selectAll("."+E.cbfills+",."+E.cblines).attr("transform",R?t(0,Math.round(Z.h*(1-Pt.domain[1]))):t(Math.round(Z.w*Pt.domain[0]),0)),_e.attr("transform",R?t(0,Math.round(-Z.t)):t(Math.round(-Z.l),0));var pa=I.select("."+E.cbfills).selectAll("rect."+E.cbfill).attr("style","").data(Ue);pa.enter().append("rect").classed(E.cbfill,!0).attr("style",""),pa.exit().remove();var oa=ye.map(Pt.c2p).map(Math.round).sort(function(La,Ga){return La-Ga});pa.each(function(La,Ga){var xa=[Ga===0?ye[0]:(Ue[Ga]+Ue[Ga-1])/2,Ga===Ue.length-1?ye[1]:(Ue[Ga]+Ue[Ga+1])/2].map(Pt.c2p).map(Math.round);R&&(xa[1]=e.constrain(xa[1]+(xa[1]>xa[0])?1:-1,oa[0],oa[1]));var Gn=u.select(this).attr(R?"x":"y",Ve).attr(R?"y":"x",u.min(xa)).attr(R?"width":"height",Math.max(he,2)).attr(R?"height":"width",Math.max(u.max(xa)-u.min(xa),2));if(C._fillgradient)n.gradient(Gn,F,C._id,R?"vertical":"horizontalreversed",C._fillgradient,"fill");else{var Pn=Se(La).replace("e-","");Gn.attr("fill",i.color(Pn).hex())}});var aa=I.select("."+E.cblines).selectAll("path."+E.cbline).data(re.color&&re.width?xe:[]);aa.enter().append("path").classed(E.cbline,!0),aa.exit().remove(),aa.each(function(La){var Ga=Ve,xa=Math.round(Pt.c2p(La))+re.width/2%1;u.select(this).attr("d","M"+(R?Ga+","+xa:xa+","+Ga)+(R?"h":"v")+he).call(n.lineGroupStyle,re.width,Ae(La),re.dash)}),_e.selectAll("g."+Pt._id+"tick,path").remove();var ka=Ve+he+(O||0)/2-(C.ticks==="outside"?1:0),Ta=S.calcTicks(Pt),Da=S.getTickSigns(Pt)[2];return S.drawTicks(F,Pt,{vals:Pt.ticks==="inside"?S.clipEnds(Pt,Ta):Ta,layer:_e,path:S.makeTickPath(Pt,ka,Da),transFn:S.makeTransTickFn(Pt)}),S.drawLabels(F,Pt,{vals:Ta,layer:_e,transFn:S.makeTransTickLabelFn(Pt),labelFns:S.makeLabelFns(Pt,ka)})}function gt(){var _t,Ft=he+O/2;ze.indexOf("inside")===-1&&(_t=n.bBox(_e.node()),Ft+=R?_t.width:_t.height),Ie=Ee.select("text");var St=0,hr=R&&me==="top",jr=!R&&me==="right",ra=0;if(Ie.node()&&!Ie.classed(E.jsPlaceholder)){var $r,pa=Ee.select(".h"+Pt._id+"title-math-group").node();pa&&(R&&Zt||!R&&!Zt)?(_t=n.bBox(pa),St=_t.width,$r=_t.height):(_t=n.bBox(Ee.node()),St=_t.right-Z.l-(R?Ve:At),$r=_t.bottom-Z.t-(R?At:Ve),!R&&me==="top"&&(Ft+=_t.height,ra=_t.height)),jr&&(Ie.attr("transform",t(St/2+ve/2,0)),St*=2),Ft=Math.max(Ft,R?St:$r)}var oa=(R?ae:U)*2+Ft+q+O/2,aa=0;!R&&ce.text&&te==="bottom"&&K<=0&&(aa=oa/2,oa+=aa,ra+=aa),X._hColorbarMoveTitle=aa,X._hColorbarMoveCBTitle=ra;var ka=q+O,Ta=(R?Ve:At)-ka/2-(R?ae:0),Da=(R?At:Ve)-(R?le:U+ra-aa);I.select("."+E.cbbg).attr("x",Ta).attr("y",Da).attr(R?"width":"height",Math.max(oa-aa,2)).attr(R?"height":"width",Math.max(le+ka,2)).call(i.fill,Y).call(i.stroke,C.bordercolor).style("stroke-width",q);var La=jr?Math.max(St-10,0):0;I.selectAll("."+E.cboutline).attr("x",(R?Ve:At+ae)+La).attr("y",(R?At+U-le:Ve)+(hr?Be:0)).attr(R?"width":"height",Math.max(he,2)).attr(R?"height":"width",Math.max(le-(R?2*U+Be:2*ae+La),2)).call(i.stroke,C.outlinecolor).style({fill:"none","stroke-width":O});var Ga=R?je*oa:0,xa=R?0:(1-ut)*oa-ra;if(Ga=$?Z.l-Ga:-Ga,xa=V?Z.t-xa:-xa,I.attr("transform",t(Ga,xa)),!R&&(q||i.opacity(Y)&&!i.equals(X.paper_bgcolor,Y))){var Gn=_e.selectAll("text"),Pn=Gn[0].length,sn=I.select("."+E.cbbg).node(),Yn=n.bBox(sn),Zn=n.getTranslate(I),vi=2;Gn.each(function(Qe,Jt){var Yt=0,ar=Pn-1;if(Jt===Yt||Jt===ar){var cr=n.bBox(this),tr=n.getTranslate(this),Je;if(Jt===ar){var bt=cr.right+tr.x,qt=Yn.right+Zn.x+At-q-vi+H;Je=qt-bt,Je>0&&(Je=0)}else if(Jt===Yt){var Qt=cr.left+tr.x,br=Yn.left+Zn.x+At+q+vi;Je=br-Qt,Je<0&&(Je=0)}Je&&(Pn<3?this.setAttribute("transform","translate("+Je+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Dn={},oi=M[ee],on=T[ee],mn=M[te],bi=T[te],Li=oa-he;R?(D==="pixels"?(Dn.y=K,Dn.t=le*mn,Dn.b=le*bi):(Dn.t=Dn.b=0,Dn.yt=K+z*mn,Dn.yb=K-z*bi),B==="pixels"?(Dn.x=H,Dn.l=oa*oi,Dn.r=oa*on):(Dn.l=Li*oi,Dn.r=Li*on,Dn.xl=H-k*oi,Dn.xr=H+k*on)):(D==="pixels"?(Dn.x=H,Dn.l=le*oi,Dn.r=le*on):(Dn.l=Dn.r=0,Dn.xl=H+z*oi,Dn.xr=H-z*on),B==="pixels"?(Dn.y=1-K,Dn.t=oa*mn,Dn.b=oa*bi):(Dn.t=Li*mn,Dn.b=Li*bi,Dn.yt=K-k*mn,Dn.yb=K+k*bi));var $a=C.y<.5?"b":"t",Va=C.x<.5?"l":"r";F._fullLayout._reservedMargin[C._id]={};var it={r:X.width-Ta-Ga,l:Ta+Dn.r,b:X.height-Da-xa,t:Da+Dn.b};$&&V?v.autoMargin(F,C._id,Dn):$?F._fullLayout._reservedMargin[C._id][$a]=it[$a]:V||R?F._fullLayout._reservedMargin[C._id][Va]=it[Va]:F._fullLayout._reservedMargin[C._id][$a]=it[$a]}return e.syncOrAsync([v.previousPromises,mt,ht,ft,v.previousPromises,gt],F)}function h(I,C,F){var R=C.orientation==="v",z=F._fullLayout,D=z._size,k,B,O;l.init({element:I.node(),gd:F,prepFn:function(){k=I.attr("transform"),r(I)},moveFn:function(q,Y){I.attr("transform",k+t(q,Y)),B=l.align((R?C._uFrac:C._vFrac)+q/D.w,R?C._thickFrac:C._lenFrac,0,1,C.xanchor),O=l.align((R?C._vFrac:1-C._uFrac)-Y/D.h,R?C._lenFrac:C._thickFrac,0,1,C.yanchor);var ee=l.getCursor(B,O,C.xanchor,C.yanchor);r(I,ee)},doneFn:function(){if(r(I),B!==void 0&&O!==void 0){var q={};q[C._propPrefix+"x"]=B,q[C._propPrefix+"y"]=O,C._traceIndex!==void 0?w.call("_guiRestyle",F,q,C._traceIndex):w.call("_guiRelayout",F,q)}}})}function b(I,C,F){var R=C._levels,z=[],D=[],k,B,O=R.end+R.size/100,q=R.size,Y=1.001*F[0]-.001*F[1],ee=1.001*F[1]-.001*F[0];for(B=0;B<1e5&&(k=R.start+B*q,!(q>0?k>=O:k<=O));B++)k>Y&&k0?k>=O:k<=O));B++)k>F[0]&&k-1}N.exports=function(a,r){var n,i=a.data,s=a.layout,c=S([],i),p=S({},s,l(r.tileClass)),f=a._context||{};if(r.width&&(p.width=r.width),r.height&&(p.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){p.annotations=[];var d=Object.keys(p);for(n=0;n=0)return f}else if(typeof f=="string"&&(f=f.trim(),f.slice(-1)==="%"&&u(f.slice(0,-1))&&(f=+f.slice(0,-1),f>=0)))return f+"%"}function p(f,d,y,o,x,M){M=M||{};var T=M.moduleHasSelected!==!1,E=M.moduleHasUnselected!==!1,g=M.moduleHasConstrain!==!1,A=M.moduleHasCliponaxis!==!1,m=M.moduleHasTextangle!==!1,h=M.moduleHasInsideanchor!==!1,b=!!M.hasPathbar,_=Array.isArray(x)||x==="auto",I=_||x==="inside",C=_||x==="outside";if(I||C){var F=n(o,"textfont",y.font),R=v.extendFlat({},F),z=f.textfont&&f.textfont.color,D=!z;if(D&&delete R.color,n(o,"insidetextfont",R),b){var k=v.extendFlat({},F);D&&delete k.color,n(o,"pathbar.textfont",k)}C&&n(o,"outsidetextfont",F),T&&o("selected.textfont.color"),E&&o("unselected.textfont.color"),g&&o("constraintext"),A&&o("cliponaxis"),m&&o("textangle"),o("texttemplate"),o("texttemplatefallback")}I&&h&&o("insidetextanchor")}N.exports={supplyDefaults:i,crossTraceDefaults:s,handleText:p,validateCornerradius:c}}}),Tw=De({"src/traces/bar/layout_defaults.js"(j,N){"use strict";var u=hi(),v=Vi(),w=Ar(),S=hx(),l=Bh().validateCornerradius;N.exports=function(e,t,a){function r(T,E){return w.coerce(e,t,S,T,E)}for(var n=!1,i=!1,s=!1,c={},p=r("barmode"),f=p==="group",d=0;d0&&!c[o]&&(s=!0),c[o]=!0),y.visible&&y.type==="histogram"){var x=v.getFromId({_fullLayout:t},y[y.orientation==="v"?"xaxis":"yaxis"]);x.type!=="category"&&(i=!0)}}if(!n){delete t.barmode;return}p!=="overlay"&&r("barnorm"),r("bargap",i&&!s?0:.2),r("bargroupgap");var M=r("barcornerradius");t.barcornerradius=l(M)}}}),F1=De({"src/traces/bar/arrays_to_calcdata.js"(j,N){"use strict";var u=Ar();N.exports=function(w,S){for(var l=0;lt;if(!a)return S}return l!==void 0?l:w.dflt},j.coerceColor=function(w,S,l){return N.isValid(S)?S:l!==void 0?l:w.dflt},j.coerceEnumerated=function(w,S,l){return w.coerceNumber&&(S=+S),w.values.indexOf(S)!==-1?S:l!==void 0?l:w.dflt},j.getValue=function(w,S){var l;return v(w)?S1||b.bargap===0&&b.bargroupgap===0&&!_[0].trace.marker.line.width)&&u.select(this).attr("shape-rendering","crispEdges")}),m.selectAll("g.points").each(function(_){var I=u.select(this),C=_[0].trace;c(I,C,A)}),l.getComponentMethod("errorbars","style")(m)}function c(A,m,h){w.pointStyle(A.selectAll("path"),m,h),p(A,m,h)}function p(A,m,h){A.selectAll("text").each(function(b){var _=u.select(this),I=S.ensureUniformFontSize(h,o(_,b,m,h));w.font(_,I)})}function f(A,m,h){var b=m[0].trace;b.selectedpoints?d(h,b,A):(c(h,b,A),l.getComponentMethod("errorbars","style")(h))}function d(A,m,h){w.selectedPointStyle(A.selectAll("path"),m),y(A.selectAll("text"),m,h)}function y(A,m,h){A.each(function(b){var _=u.select(this),I;if(b.selected){I=S.ensureUniformFontSize(h,o(_,b,m,h));var C=m.selected.textfont&&m.selected.textfont.color;C&&(I.color=C),w.font(_,I)}else w.selectedTextStyle(_,m)})}function o(A,m,h,b){var _=b._fullLayout.font,I=h.textfont;if(A.classed("bartext-inside")){var C=g(m,h);I=M(h,m.i,_,C)}else A.classed("bartext-outside")&&(I=T(h,m.i,_));return I}function x(A,m,h){return E(a,A.textfont,m,h)}function M(A,m,h,b){var _=x(A,m,h),I=A._input.textfont===void 0||A._input.textfont.color===void 0||Array.isArray(A.textfont.color)&&A.textfont.color[m]===void 0;return I&&(_={color:v.contrast(b),family:_.family,size:_.size,weight:_.weight,style:_.style,variant:_.variant,textcase:_.textcase,lineposition:_.lineposition,shadow:_.shadow}),E(r,A.insidetextfont,m,_)}function T(A,m,h){var b=x(A,m,h);return E(n,A.outsidetextfont,m,b)}function E(A,m,h,b){m=m||{};var _=i.getValue(m.family,h),I=i.getValue(m.size,h),C=i.getValue(m.color,h),F=i.getValue(m.weight,h),R=i.getValue(m.style,h),z=i.getValue(m.variant,h),D=i.getValue(m.textcase,h),k=i.getValue(m.lineposition,h),B=i.getValue(m.shadow,h);return{family:i.coerceString(A.family,_,b.family),size:i.coerceNumber(A.size,I,b.size),color:i.coerceColor(A.color,C,b.color),weight:i.coerceString(A.weight,F,b.weight),style:i.coerceString(A.style,R,b.style),variant:i.coerceString(A.variant,z,b.variant),textcase:i.coerceString(A.variant,D,b.textcase),lineposition:i.coerceString(A.variant,k,b.lineposition),shadow:i.coerceString(A.variant,B,b.shadow)}}function g(A,m){return m.type==="waterfall"?m[A.dir].marker.color:A.mcc||A.mc||m.marker.color}N.exports={style:s,styleTextPoints:p,styleOnSelect:f,getInsideTextFont:M,getOutsideTextFont:T,getBarColor:g,resizeText:e}}}),Rp=De({"src/traces/bar/plot.js"(j,N){"use strict";var u=Qn(),v=io(),w=Ar(),S=Xs(),l=ii(),e=Ki(),t=hi(),a=Vi().tickText,r=Yf(),n=r.recordMinTextSize,i=r.clearMinTextSize,s=td(),c=vx(),p=Zv(),f=Rd(),d=f.text,y=f.textposition,o=Ch().appendArrayPointValue,x=p.TEXTPAD;function M(Y){return Y.id}function T(Y){if(Y.ids)return M}function E(Y){return(Y>0)-(Y<0)}function g(Y,ee){return Y0}function b(Y,ee,te,ae,U,H){var K=ee.xaxis,V=ee.yaxis,$=Y._fullLayout,X=Y._context.staticPlot;U||(U={mode:$.barmode,norm:$.barmode,gap:$.bargap,groupgap:$.bargroupgap},i("bar",$));var Z=w.makeTraceGroups(ae,te,"trace bars").each(function(Q){var re=u.select(this),ce=Q[0].trace,me=Q[0].t,ye=ce.type==="waterfall",Ae=ce.type==="funnel",Se=ce.type==="histogram",Ce=ce.type==="bar",qe=Ce||Ae,Ue=0;ye&&ce.connector.visible&&ce.connector.mode==="between"&&(Ue=ce.connector.line.width/2);var xe=ce.orientation==="h",he=h(U),oe=w.ensureSingle(re,"g","points"),le=T(ce),ne=oe.selectAll("g.point").data(w.identity,le);ne.enter().append("g").classed("point",!0),ne.exit().remove(),ne.each(function(Fe,Ve){var je=u.select(this),ut=A(Fe,K,V,xe),st=ut[0][0],yt=ut[0][1],At=ut[1][0],Pt=ut[1][1],Zt=(xe?yt-st:Pt-At)===0;Zt&&qe&&c.getLineWidth(ce,Fe)&&(Zt=!1),Zt||(Zt=!v(st)||!v(yt)||!v(At)||!v(Pt)),Fe.isBlank=Zt,Zt&&(xe?yt=st:Pt=At),Ue&&!Zt&&(xe?(st-=g(st,yt)*Ue,yt+=g(st,yt)*Ue):(At-=g(At,Pt)*Ue,Pt+=g(At,Pt)*Ue));var vr,Nt;if(ce.type==="waterfall"){if(!Zt){var Kt=ce[Fe.dir].marker;vr=Kt.line.width,Nt=Kt.color}}else vr=c.getLineWidth(ce,Fe),Nt=Fe.mc||ce.marker.color;function nt(Ta){var Da=u.round(vr/2%1,2);return U.gap===0&&U.groupgap===0?u.round(Math.round(Ta)-Da,2):Ta}function Ee(Ta,Da,La){return La&&Ta===Da?Ta:Math.abs(Ta-Da)>=2?nt(Ta):Ta>Da?Math.ceil(Ta):Math.floor(Ta)}var ze=l.opacity(Nt),ve=ze<1||vr>.01?nt:Ee;Y._context.staticPlot||(st=ve(st,yt,xe),yt=ve(yt,st,xe),At=ve(At,Pt,!xe),Pt=ve(Pt,At,!xe));var _e=xe?K.c2p:V.c2p,Ie;Fe.s0>0?Ie=Fe._sMax:Fe.s0<0?Ie=Fe._sMin:Ie=Fe.s1>0?Fe._sMax:Fe._sMin;function Be(Ta,Da){if(!Ta)return 0;var La=Math.abs(xe?Pt-At:yt-st),Ga=Math.abs(xe?yt-st:Pt-At),xa=ve(Math.abs(_e(Ie,!0)-_e(0,!0))),Gn=Fe.hasB?Math.min(La/2,Ga/2):Math.min(La/2,xa),Pn;if(Da==="%"){var sn=Math.min(50,Ta);Pn=La*(sn/100)}else Pn=Ta;return ve(Math.max(Math.min(Pn,Gn),0))}var We=Ce||Se?Be(me.cornerradiusvalue,me.cornerradiusform):0,Xe,mt,ft="M"+st+","+At+"V"+Pt+"H"+yt+"V"+At+"Z",ht=0;if(We&&Fe.s){var gt=E(Fe.s0)===0||E(Fe.s)===E(Fe.s0)?Fe.s1:Fe.s0;if(ht=ve(Fe.hasB?0:Math.abs(_e(Ie,!0)-_e(gt,!0))),ht0?Math.sqrt(ht*(2*We-ht)):0,ra=_t>0?Math.max:Math.min;Xe="M"+st+","+At+"V"+(Pt-hr*Ft)+"H"+ra(yt-(We-ht)*_t,st)+"A "+We+","+We+" 0 0 "+St+" "+yt+","+(Pt-We*Ft-jr)+"V"+(At+We*Ft+jr)+"A "+We+","+We+" 0 0 "+St+" "+ra(yt-(We-ht)*_t,st)+","+(At+hr*Ft)+"Z"}else if(Fe.hasB)Xe="M"+(st+We*_t)+","+At+"A "+We+","+We+" 0 0 "+St+" "+st+","+(At+We*Ft)+"V"+(Pt-We*Ft)+"A "+We+","+We+" 0 0 "+St+" "+(st+We*_t)+","+Pt+"H"+(yt-We*_t)+"A "+We+","+We+" 0 0 "+St+" "+yt+","+(Pt-We*Ft)+"V"+(At+We*Ft)+"A "+We+","+We+" 0 0 "+St+" "+(yt-We*_t)+","+At+"Z";else{mt=Math.abs(Pt-At)+ht;var $r=mt0?Math.sqrt(ht*(2*We-ht)):0,oa=Ft>0?Math.max:Math.min;Xe="M"+(st+$r*_t)+","+At+"V"+oa(Pt-(We-ht)*Ft,At)+"A "+We+","+We+" 0 0 "+St+" "+(st+We*_t-pa)+","+Pt+"H"+(yt-We*_t+pa)+"A "+We+","+We+" 0 0 "+St+" "+(yt-$r*_t)+","+oa(Pt-(We-ht)*Ft,At)+"V"+At+"Z"}}else Xe=ft}else Xe=ft;var aa=m(w.ensureSingle(je,"path"),$,U,H);if(aa.style("vector-effect",X?"none":"non-scaling-stroke").attr("d",isNaN((yt-st)*(Pt-At))||Zt&&Y._context.staticPlot?"M0,0Z":Xe).call(e.setClipUrl,ee.layerClipId,Y),!$.uniformtext.mode&&he){var ka=e.makePointStyleFns(ce);e.singlePointStyle(Fe,aa,ce,ka,Y)}_(Y,ee,je,Q,Ve,st,yt,At,Pt,We,ht,U,H),ee.layerClipId&&e.hideOutsideRangePoint(Fe,je.select("text"),K,V,ce.xcalendar,ce.ycalendar)});var be=ce.cliponaxis===!1;e.setClipUrl(re,be?null:ee.layerClipId,Y)});t.getComponentMethod("errorbars","plot")(Y,Z,ee,U)}function _(Y,ee,te,ae,U,H,K,V,$,X,Z,Q,re){var ce=ee.xaxis,me=ee.yaxis,ye=Y._fullLayout,Ae;function Se(mt,ft,ht){var gt=w.ensureSingle(mt,"text").text(ft).attr({class:"bartext bartext-"+Ae,"text-anchor":"middle","data-notex":1}).call(e.font,ht).call(S.convertToTspans,Y);return gt}var Ce=ae[0].trace,qe=Ce.orientation==="h",Ue=k(ye,ae,U,ce,me);Ae=B(Ce,U);var xe=Q.mode==="stack"||Q.mode==="relative",he=ae[U],oe=!xe||he._outmost,le=he.hasB,ne=X&&X-Z>x;if(!Ue||Ae==="none"||(he.isBlank||H===K||V===$)&&(Ae==="auto"||Ae==="inside")){te.select("text").remove();return}var be=ye.font,Fe=s.getBarColor(ae[U],Ce),Ve=s.getInsideTextFont(Ce,U,be,Fe),je=s.getOutsideTextFont(Ce,U,be),ut=Ce.insidetextanchor||"end",st=te.datum();qe?ce.type==="log"&&st.s0<=0&&(ce.range[0]0&&nt>0,ve;ne?le?ve=I(Pt-2*X,Zt,Kt,nt,qe)||I(Pt,Zt-2*X,Kt,nt,qe):qe?ve=I(Pt-(X-Z),Zt,Kt,nt,qe)||I(Pt,Zt-2*(X-Z),Kt,nt,qe):ve=I(Pt,Zt-(X-Z),Kt,nt,qe)||I(Pt-2*(X-Z),Zt,Kt,nt,qe):ve=I(Pt,Zt,Kt,nt,qe),ze&&ve?Ae="inside":(Ae="outside",vr.remove(),vr=null)}else Ae="inside";if(!vr){Ee=w.ensureUniformFontSize(Y,Ae==="outside"?je:Ve),vr=Se(te,Ue,Ee);var _e=vr.attr("transform");if(vr.attr("transform",""),Nt=e.bBox(vr.node()),Kt=Nt.width,nt=Nt.height,vr.attr("transform",_e),Kt<=0||nt<=0){vr.remove();return}}var Ie=Ce.textangle,Be,We;Ae==="outside"?(We=Ce.constraintext==="both"||Ce.constraintext==="outside",Be=D(H,K,V,$,Nt,{isHorizontal:qe,constrained:We,angle:Ie})):(We=Ce.constraintext==="both"||Ce.constraintext==="inside",Be=R(H,K,V,$,Nt,{isHorizontal:qe,constrained:We,angle:Ie,anchor:ut,hasB:le,r:X,overhead:Z})),Be.fontSize=Ee.size,n(Ce.type==="histogram"?"bar":Ce.type,Be,ye),he.transform=Be;var Xe=m(vr,ye,Q,re);w.setTransormAndDisplay(Xe,Be)}function I(Y,ee,te,ae,U){if(Y<0||ee<0)return!1;var H=te<=Y&&ae<=ee,K=te<=ee&&ae<=Y,V=U?Y>=te*(ee/ae):ee>=ae*(Y/te);return H||K||V}function C(Y){return Y==="auto"?0:Y}function F(Y,ee){var te=Math.PI/180*ee,ae=Math.abs(Math.sin(te)),U=Math.abs(Math.cos(te));return{x:Y.width*U+Y.height*ae,y:Y.width*ae+Y.height*U}}function R(Y,ee,te,ae,U,H){var K=!!H.isHorizontal,V=!!H.constrained,$=H.angle||0,X=H.anchor,Z=X==="end",Q=X==="start",re=H.leftToRight||0,ce=(re+1)/2,me=1-ce,ye=H.hasB,Ae=H.r,Se=H.overhead,Ce=U.width,qe=U.height,Ue=Math.abs(ee-Y),xe=Math.abs(ae-te),he=Ue>2*x&&xe>2*x?x:0;Ue-=2*he,xe-=2*he;var oe=C($);$==="auto"&&!(Ce<=Ue&&qe<=xe)&&(Ce>Ue||qe>xe)&&(!(Ce>xe||qe>Ue)||Cex){var Fe=z(Y,ee,te,ae,le,Ae,Se,K,ye);ne=Fe.scale,be=Fe.pad}else ne=1,V&&(ne=Math.min(1,Ue/le.x,xe/le.y)),be=0;var Ve=U.left*me+U.right*ce,je=(U.top+U.bottom)/2,ut=(Y+x)*me+(ee-x)*ce,st=(te+ae)/2,yt=0,At=0;if(Q||Z){var Pt=(K?le.x:le.y)/2;Ae&&(Z||ye)&&(he+=be);var Zt=K?g(Y,ee):g(te,ae);K?Q?(ut=Y+Zt*he,yt=-Zt*Pt):(ut=ee-Zt*he,yt=Zt*Pt):Q?(st=te+Zt*he,At=-Zt*Pt):(st=ae-Zt*he,At=Zt*Pt)}return{textX:Ve,textY:je,targetX:ut,targetY:st,anchorX:yt,anchorY:At,scale:ne,rotate:oe}}function z(Y,ee,te,ae,U,H,K,V,$){var X=Math.max(0,Math.abs(ee-Y)-2*x),Z=Math.max(0,Math.abs(ae-te)-2*x),Q=H-x,re=K?Q-Math.sqrt(Q*Q-(Q-K)*(Q-K)):Q,ce=$?Q*2:V?Q-K:2*re,me=$?Q*2:V?2*re:Q-K,ye,Ae,Se,Ce,qe;return U.y/U.x>=Z/(X-ce)?Ce=Z/U.y:U.y/U.x<=(Z-me)/X?Ce=X/U.x:!$&&V?(ye=U.x*U.x+U.y*U.y/4,Ae=-2*U.x*(X-Q)-U.y*(Z/2-Q),Se=(X-Q)*(X-Q)+(Z/2-Q)*(Z/2-Q)-Q*Q,Ce=(-Ae+Math.sqrt(Ae*Ae-4*ye*Se))/(2*ye)):$?(ye=(U.x*U.x+U.y*U.y)/4,Ae=-U.x*(X/2-Q)-U.y*(Z/2-Q),Se=(X/2-Q)*(X/2-Q)+(Z/2-Q)*(Z/2-Q)-Q*Q,Ce=(-Ae+Math.sqrt(Ae*Ae-4*ye*Se))/(2*ye)):(ye=U.x*U.x/4+U.y*U.y,Ae=-U.x*(X/2-Q)-2*U.y*(Z-Q),Se=(X/2-Q)*(X/2-Q)+(Z-Q)*(Z-Q)-Q*Q,Ce=(-Ae+Math.sqrt(Ae*Ae-4*ye*Se))/(2*ye)),Ce=Math.min(1,Ce),V?qe=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(Z-U.y*Ce)/2)*(Q-(Z-U.y*Ce)/2)))-K):qe=Math.max(0,Q-Math.sqrt(Math.max(0,Q*Q-(Q-(X-U.x*Ce)/2)*(Q-(X-U.x*Ce)/2)))-K),{scale:Ce,pad:qe}}function D(Y,ee,te,ae,U,H){var K=!!H.isHorizontal,V=!!H.constrained,$=H.angle||0,X=U.width,Z=U.height,Q=Math.abs(ee-Y),re=Math.abs(ae-te),ce;K?ce=re>2*x?x:0:ce=Q>2*x?x:0;var me=1;V&&(me=K?Math.min(1,re/Z):Math.min(1,Q/X));var ye=C($),Ae=F(U,ye),Se=(K?Ae.x:Ae.y)/2,Ce=(U.left+U.right)/2,qe=(U.top+U.bottom)/2,Ue=(Y+ee)/2,xe=(te+ae)/2,he=0,oe=0,le=K?g(ee,Y):g(te,ae);return K?(Ue=ee-le*ce,he=le*Se):(xe=ae+le*ce,oe=-le*Se),{textX:Ce,textY:qe,targetX:Ue,targetY:xe,anchorX:he,anchorY:oe,scale:me,rotate:ye}}function k(Y,ee,te,ae,U){var H=ee[0].trace,K=H.texttemplate,V;return K?V=O(Y,ee,te,ae,U):H.textinfo?V=q(ee,te,ae,U):V=c.getValue(H.text,te),c.coerceString(d,V)}function B(Y,ee){var te=c.getValue(Y.textposition,ee);return c.coerceEnumerated(y,te)}function O(Y,ee,te,ae,U){var H=ee[0].trace,K=w.castOption(H,te,"texttemplate");if(!K)return"";var V=H.type==="histogram",$=H.type==="waterfall",X=H.type==="funnel",Z=H.orientation==="h",Q,re,ce,me;Z?(Q="y",re=U,ce="x",me=ae):(Q="x",re=ae,ce="y",me=U);function ye(he){return a(re,re.c2l(he),!0).text}function Ae(he){return a(me,me.c2l(he),!0).text}var Se=ee[te],Ce={};Ce.label=Se.p,Ce.labelLabel=Ce[Q+"Label"]=ye(Se.p);var qe=w.castOption(H,Se.i,"text");(qe===0||qe)&&(Ce.text=qe),Ce.value=Se.s,Ce.valueLabel=Ce[ce+"Label"]=Ae(Se.s);var Ue={};o(Ue,H,Se.i),(V||Ue.x===void 0)&&(Ue.x=Z?Ce.value:Ce.label),(V||Ue.y===void 0)&&(Ue.y=Z?Ce.label:Ce.value),(V||Ue.xLabel===void 0)&&(Ue.xLabel=Z?Ce.valueLabel:Ce.labelLabel),(V||Ue.yLabel===void 0)&&(Ue.yLabel=Z?Ce.labelLabel:Ce.valueLabel),$&&(Ce.delta=+Se.rawS||Se.s,Ce.deltaLabel=Ae(Ce.delta),Ce.final=Se.v,Ce.finalLabel=Ae(Ce.final),Ce.initial=Ce.final-Ce.delta,Ce.initialLabel=Ae(Ce.initial)),X&&(Ce.value=Se.s,Ce.valueLabel=Ae(Ce.value),Ce.percentInitial=Se.begR,Ce.percentInitialLabel=w.formatPercent(Se.begR),Ce.percentPrevious=Se.difR,Ce.percentPreviousLabel=w.formatPercent(Se.difR),Ce.percentTotal=Se.sumR,Ce.percenTotalLabel=w.formatPercent(Se.sumR));var xe=w.castOption(H,Se.i,"customdata");return xe&&(Ce.customdata=xe),w.texttemplateString({data:[Ue,Ce,H._meta],fallback:H.texttemplatefallback,labels:Ce,locale:Y._d3locale,template:K})}function q(Y,ee,te,ae){var U=Y[0].trace,H=U.orientation==="h",K=U.type==="waterfall",V=U.type==="funnel";function $(xe){var he=H?ae:te;return a(he,xe,!0).text}function X(xe){var he=H?te:ae;return a(he,+xe,!0).text}var Z=U.textinfo,Q=Y[ee],re=Z.split("+"),ce=[],me,ye=function(xe){return re.indexOf(xe)!==-1};if(ye("label")&&ce.push($(Y[ee].p)),ye("text")&&(me=w.castOption(U,Q.i,"text"),(me===0||me)&&ce.push(me)),K){var Ae=+Q.rawS||Q.s,Se=Q.v,Ce=Se-Ae;ye("initial")&&ce.push(X(Ce)),ye("delta")&&ce.push(X(Ae)),ye("final")&&ce.push(X(Se))}if(V){ye("value")&&ce.push(X(Q.s));var qe=0;ye("percent initial")&&qe++,ye("percent previous")&&qe++,ye("percent total")&&qe++;var Ue=qe>1;ye("percent initial")&&(me=w.formatPercent(Q.begR),Ue&&(me+=" of initial"),ce.push(me)),ye("percent previous")&&(me=w.formatPercent(Q.difR),Ue&&(me+=" of previous"),ce.push(me)),ye("percent total")&&(me=w.formatPercent(Q.sumR),Ue&&(me+=" of total"),ce.push(me))}return ce.join("
")}N.exports={plot:b,toMoveInsideBar:R}}}),_m=De({"src/traces/bar/hover.js"(j,N){"use strict";var u=uu(),v=hi(),w=ii(),S=Ar().fillText,l=vx().getLineWidth,e=Vi().hoverLabelText,t=Ho().BADNUM;function a(i,s,c,p,f){var d=r(i,s,c,p,f);if(d){var y=d.cd,o=y[0].trace,x=y[d.index];return d.color=n(o,x),v.getComponentMethod("errorbars","hoverInfo")(x,o,d),[d]}}function r(i,s,c,p,f){var d=i.cd,y=d[0].trace,o=d[0].t,x=p==="closest",M=y.type==="waterfall",T=i.maxHoverDistance,E=i.maxSpikeDistance,g,A,m,h,b,_,I;y.orientation==="h"?(g=c,A=s,m="y",h="x",b=ae,_=Y):(g=s,A=c,m="x",h="y",_=ae,b=Y);var C=y[m+"period"],F=x||C;function R(me){return D(me,-1)}function z(me){return D(me,1)}function D(me,ye){var Ae=me.w;return me[m]+ye*Ae/2}function k(me){return me[m+"End"]-me[m+"Start"]}var B=x?R:C?function(me){return me.p-k(me)/2}:function(me){return Math.min(R(me),me.p-o.bardelta/2)},O=x?z:C?function(me){return me.p+k(me)/2}:function(me){return Math.max(z(me),me.p+o.bardelta/2)};function q(me,ye,Ae){return f.finiteRange&&(Ae=0),u.inbox(me-g,ye-g,Ae+Math.min(1,Math.abs(ye-me)/I)-1)}function Y(me){return q(B(me),O(me),T)}function ee(me){return q(R(me),z(me),E)}function te(me){var ye=me[h];if(M){var Ae=Math.abs(me.rawS)||0;A>0?ye+=Ae:A<0&&(ye-=Ae)}return ye}function ae(me){var ye=A,Ae=me.b,Se=te(me);return u.inbox(Ae-ye,Se-ye,T+(Se-ye)/(Se-Ae)-1)}function U(me){var ye=A,Ae=me.b,Se=te(me);return u.inbox(Ae-ye,Se-ye,E+(Se-ye)/(Se-Ae)-1)}var H=i[m+"a"],K=i[h+"a"];I=Math.abs(H.r2c(H.range[1])-H.r2c(H.range[0]));function V(me){return(b(me)+_(me))/2}var $=u.getDistanceFunction(p,b,_,V);if(u.getClosest(d,$,i),i.index!==!1&&d[i.index].p!==t){F||(B=function(me){return Math.min(R(me),me.p-o.bargroupwidth/2)},O=function(me){return Math.max(z(me),me.p+o.bargroupwidth/2)});var X=i.index,Z=d[X],Q=y.base?Z.b+Z.s:Z.s;i[h+"0"]=i[h+"1"]=K.c2p(Z[h],!0),i[h+"LabelVal"]=Q;var re=o.extents[o.extents.round(Z.p)];i[m+"0"]=H.c2p(x?B(Z):re[0],!0),i[m+"1"]=H.c2p(x?O(Z):re[1],!0);var ce=Z.orig_p!==void 0;return i[m+"LabelVal"]=ce?Z.orig_p:Z.p,i.labelLabel=e(H,i[m+"LabelVal"],y[m+"hoverformat"]),i.valueLabel=e(K,i[h+"LabelVal"],y[h+"hoverformat"]),i.baseLabel=e(K,Z.b,y[h+"hoverformat"]),i.spikeDistance=(U(Z)+ee(Z))/2,i[m+"Spike"]=H.c2p(Z.p,!0),S(Z,y,i),i.hovertemplate=y.hovertemplate,i}}function n(i,s){var c=s.mcc||i.marker.color,p=s.mlcc||i.marker.line.color,f=l(i,s);if(w.opacity(c))return c;if(w.opacity(p)&&f)return p}N.exports={hoverPoints:a,hoverOnBars:r,getTraceColor:n}}}),RI=De({"src/traces/bar/event_data.js"(j,N){"use strict";N.exports=function(v,w,S){return v.x="xVal"in w?w.xVal:w.x,v.y="yVal"in w?w.yVal:w.y,w.xa&&(v.xaxis=w.xa),w.ya&&(v.yaxis=w.ya),S.orientation==="h"?(v.label=v.y,v.value=v.x):(v.label=v.x,v.value=v.y),v}}}),xm=De({"src/traces/bar/select.js"(j,N){"use strict";N.exports=function(w,S){var l=w.cd,e=w.xaxis,t=w.yaxis,a=l[0].trace,r=a.type==="funnel",n=a.orientation==="h",i=[],s;if(S===!1)for(s=0;s0?(C="v",m>0?F=Math.min(b,h):F=Math.min(h)):m>0?(C="h",F=Math.min(b)):F=0;if(!F){c.visible=!1;return}c._length=F;var B=p("orientation",C);c._hasPreCompStats?B==="v"&&m===0?(p("x0",0),p("dx",1)):B==="h"&&A===0&&(p("y0",0),p("dy",1)):B==="v"&&m===0?p("x0"):B==="h"&&A===0&&p("y0");var O=v.getComponentMethod("calendars","handleTraceDefaults");O(s,c,["x","y"],f)}function n(s,c,p,f){var d=f.prefix,y=u.coerce2(s,c,t,"marker.outliercolor"),o=p("marker.line.outliercolor"),x="outliers";c._hasPreCompStats?x="all":(y||o)&&(x="suspectedoutliers");var M=p(d+"points",x);M?(p("jitter",M==="all"?.3:0),p("pointpos",M==="all"?-1.5:0),p("marker.symbol"),p("marker.opacity"),p("marker.size"),p("marker.angle"),p("marker.color",c.line.color),p("marker.line.color"),p("marker.line.width"),M==="suspectedoutliers"&&(p("marker.line.outliercolor",c.marker.color),p("marker.line.outlierwidth")),p("selected.marker.color"),p("unselected.marker.color"),p("selected.marker.size"),p("unselected.marker.size"),p("text"),p("hovertext")):delete c.marker;var T=p("hoveron");(T==="all"||T.indexOf("points")!==-1)&&(p("hovertemplate"),p("hovertemplatefallback")),u.coerceSelectionMarkerOpacity(c,p)}function i(s,c){var p,f;function d(M){return u.coerce(f._input,f,t,M)}for(var y=0;yte.uf};if(E._hasPreCompStats){var X=E[F],Z=function(Zt){return C.d2c((E[Zt]||[])[_])},Q=1/0,re=-1/0;for(_=0;_=te.q1&&te.q3>=te.med){var me=Z("lowerfence");te.lf=me!==l&&me<=te.q1?me:f(te,U,H);var ye=Z("upperfence");te.uf=ye!==l&&ye>=te.q3?ye:d(te,U,H);var Ae=Z("mean");te.mean=Ae!==l?Ae:H?S.mean(U,H):(te.q1+te.q3)/2;var Se=Z("sd");te.sd=Ae!==l&&Se>=0?Se:H?S.stdev(U,H,te.mean):te.q3-te.q1,te.lo=y(te),te.uo=o(te);var Ce=Z("notchspan");Ce=Ce!==l&&Ce>0?Ce:x(te,H),te.ln=te.med-Ce,te.un=te.med+Ce;var qe=te.lf,Ue=te.uf;E.boxpoints&&U.length&&(qe=Math.min(qe,U[0]),Ue=Math.max(Ue,U[H-1])),E.notched&&(qe=Math.min(qe,te.ln),Ue=Math.max(Ue,te.un)),te.min=qe,te.max=Ue}else{S.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+te.q1,"median = "+te.med,"q3 = "+te.q3].join(` -`));var xe;te.med!==l?xe=te.med:te.q1!==l?te.q3!==l?xe=(te.q1+te.q3)/2:xe=te.q1:te.q3!==l?xe=te.q3:xe=0,te.med=xe,te.q1=te.q3=xe,te.lf=te.uf=xe,te.mean=te.sd=xe,te.ln=te.un=xe,te.min=te.max=xe}Q=Math.min(Q,te.min),re=Math.max(re,te.max),te.pts2=ae.filter($),h.push(te)}}E._extremes[C._id]=v.findExtremes(C,[Q,re],{padded:!0})}else{var he=C.makeCalcdata(E,F),oe=a(Y,ee),le=Y.length,ne=r(le);for(_=0;_=0&&be0){if(te={},te.pos=te[z]=Y[_],ae=te.pts=ne[_].sort(c),U=te[F]=ae.map(p),H=U.length,te.min=U[0],te.max=U[H-1],te.mean=S.mean(U,H),te.sd=S.stdev(U,H,te.mean)*E.sdmultiple,te.med=S.interp(U,.5),H%2&&(ut||st)){var yt,At;ut?(yt=U.slice(0,H/2),At=U.slice(H/2+1)):st&&(yt=U.slice(0,H/2+1),At=U.slice(H/2)),te.q1=S.interp(yt,.5),te.q3=S.interp(At,.5)}else te.q1=S.interp(U,.25),te.q3=S.interp(U,.75);te.lf=f(te,U,H),te.uf=d(te,U,H),te.lo=y(te),te.uo=o(te);var Pt=x(te,H);te.ln=te.med-Pt,te.un=te.med+Pt,Fe=Math.min(Fe,te.ln),Ve=Math.max(Ve,te.un),te.pts2=ae.filter($),h.push(te)}E.notched&&S.isTypedArray(he)&&(he=Array.from(he)),E._extremes[C._id]=v.findExtremes(C,E.notched?he.concat([Fe,Ve]):he,{padded:!0})}return s(h,E),h.length>0?(h[0].t={num:g[b],dPos:ee,posLetter:z,valLetter:F,labels:{med:e(T,"median:"),min:e(T,"min:"),q1:e(T,"q1:"),q3:e(T,"q3:"),max:e(T,"max:"),mean:E.boxmean==="sd"||E.sizemode==="sd"?e(T,"mean \xB1 \u03C3:").replace("\u03C3",E.sdmultiple===1?"\u03C3":E.sdmultiple+"\u03C3"):e(T,"mean:"),lf:e(T,"lower fence:"),uf:e(T,"upper fence:")}},g[b]++,h):[{t:{empty:!0}}]};function t(M,T,E,g){var A=T in M,m=T+"0"in M,h="d"+T in M;if(A||m&&h){var b=E.makeCalcdata(M,T),_=w(M,E,T,b).vals;return[_,b]}var I;m?I=M[T+"0"]:"name"in M&&(E.type==="category"||u(M.name)&&["linear","log"].indexOf(E.type)!==-1||S.isDateTime(M.name)&&E.type==="date")?I=M.name:I=g;for(var C=E.type==="multicategory"?E.r2c_just_indices(I):E.d2c(I,0,M[T+"calendar"]),F=M._length,R=new Array(F),z=0;z1,m=1-s[t+"gap"],h=1-s[t+"groupgap"];for(f=0;f0;if(C==="positive"?(te=F*(I?1:.5),H=U,ae=H=z):C==="negative"?(te=H=z,ae=F*(I?1:.5),K=U):(te=ae=F,H=K=U),re){var ce=b.pointpos,me=b.jitter,ye=b.marker.size/2,Ae=0;ce+me>=0&&(Ae=U*(ce+me),Ae>te?(Q=!0,X=ye,V=Ae):Ae>H&&(X=ye,V=te)),Ae<=te&&(V=te);var Se=0;ce-me<=0&&(Se=-U*(ce-me),Se>ae?(Q=!0,Z=ye,$=Se):Se>K&&(Z=ye,$=ae)),Se<=ae&&($=ae)}else V=te,$=ae;var Ce=new Array(y.length);for(d=0;dE.lo&&(B.so=!0)}return A});T.enter().append("path").classed("point",!0),T.exit().remove(),T.call(w.translatePoints,p,f)}function r(n,i,s,c){var p=i.val,f=i.pos,d=!!f.rangebreaks,y=c.bPos,o=c.bPosPxOffset||0,x=s.boxmean||(s.meanline||{}).visible,M,T;Array.isArray(c.bdPos)?(M=c.bdPos[0],T=c.bdPos[1]):(M=c.bdPos,T=c.bdPos);var E=n.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?v.identity:[]);E.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),E.exit().remove(),E.each(function(g){var A=f.c2l(g.pos+y,!0),m=f.l2p(A-M)+o,h=f.l2p(A+T)+o,b=d?(m+h)/2:f.l2p(A)+o,_=p.c2p(g.mean,!0),I=p.c2p(g.mean-g.sd,!0),C=p.c2p(g.mean+g.sd,!0);s.orientation==="h"?u.select(this).attr("d","M"+_+","+m+"V"+h+(x==="sd"?"m0,0L"+I+","+b+"L"+_+","+m+"L"+C+","+b+"Z":"")):u.select(this).attr("d","M"+m+","+_+"H"+h+(x==="sd"?"m0,0L"+b+","+I+"L"+m+","+_+"L"+b+","+C+"Z":""))})}N.exports={plot:e,plotBoxAndWhiskers:t,plotPoints:a,plotBoxMean:r}}}),yx=De({"src/traces/box/style.js"(j,N){"use strict";var u=Qn(),v=ii(),w=Ki();function S(e,t,a){var r=a||u.select(e).selectAll("g.trace.boxes");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var i=u.select(this),s=n[0].trace,c=s.line.width;function p(y,o,x,M){y.style("stroke-width",o+"px").call(v.stroke,x).call(v.fill,M)}var f=i.selectAll("path.box");if(s.type==="candlestick")f.each(function(y){if(!y.empty){var o=u.select(this),x=s[y.dir];p(o,x.line.width,x.line.color,x.fillcolor),o.style("opacity",s.selectedpoints&&!y.selected?.3:1)}});else{p(f,c,s.line.color,s.fillcolor),i.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(v.stroke,s.line.color);var d=i.selectAll("path.point");w.pointStyle(d,s,e)}})}function l(e,t,a){var r=t[0].trace,n=a.selectAll("path.point");r.selectedpoints?w.selectedPointStyle(n,r):w.pointStyle(n,r,e)}N.exports={style:S,styleOnSelect:l}}}),Sw=De({"src/traces/box/hover.js"(j,N){"use strict";var u=Vi(),v=Ar(),w=uu(),S=ii(),l=v.fillText;function e(r,n,i,s){var c=r.cd,p=c[0].trace,f=p.hoveron,d=[],y;return f.indexOf("boxes")!==-1&&(d=d.concat(t(r,n,i,s))),f.indexOf("points")!==-1&&(y=a(r,n,i)),s==="closest"?y?[y]:d:(y&&d.push(y),d)}function t(r,n,i,s){var c=r.cd,p=r.xa,f=r.ya,d=c[0].trace,y=c[0].t,o=d.type==="violin",x,M,T,E,g,A,m,h,b,_,I,C=y.bdPos,F,R,z=y.wHover,D=function(Se){return T.c2l(Se.pos)+y.bPos-T.c2l(A)};o&&d.side!=="both"?(d.side==="positive"&&(b=function(Se){var Ce=D(Se);return w.inbox(Ce,Ce+z,_)},F=C,R=0),d.side==="negative"&&(b=function(Se){var Ce=D(Se);return w.inbox(Ce-z,Ce,_)},F=0,R=C)):(b=function(Se){var Ce=D(Se);return w.inbox(Ce-z,Ce+z,_)},F=R=C);var k;o?k=function(Se){return w.inbox(Se.span[0]-g,Se.span[1]-g,_)}:k=function(Se){return w.inbox(Se.min-g,Se.max-g,_)},d.orientation==="h"?(g=n,A=i,m=k,h=b,x="y",T=f,M="x",E=p):(g=i,A=n,m=b,h=k,x="x",T=p,M="y",E=f);var B=Math.min(1,C/Math.abs(T.r2c(T.range[1])-T.r2c(T.range[0])));_=r.maxHoverDistance-B,I=r.maxSpikeDistance-B;function O(Se){return(m(Se)+h(Se))/2}var q=w.getDistanceFunction(s,m,h,O);if(w.getClosest(c,q,r),r.index===!1)return[];var Y=c[r.index],ee=d.line.color,te=(d.marker||{}).color;S.opacity(ee)&&d.line.width?r.color=ee:S.opacity(te)&&d.boxpoints?r.color=te:r.color=d.fillcolor,r[x+"0"]=T.c2p(Y.pos+y.bPos-R,!0),r[x+"1"]=T.c2p(Y.pos+y.bPos+F,!0),r[x+"LabelVal"]=Y.orig_p!==void 0?Y.orig_p:Y.pos;var ae=x+"Spike";r.spikeDistance=O(Y)*I/_,r[ae]=T.c2p(Y.pos,!0);var U=d.boxmean||d.sizemode==="sd"||(d.meanline||{}).visible,H=d.boxpoints||d.points,K=H&&U?["max","uf","q3","med","mean","q1","lf","min"]:H&&!U?["max","uf","q3","med","q1","lf","min"]:!H&&U?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],V=E.range[1]0&&(a=!0);for(var s=0;se){var t=e-S[v];return S[v]=e,t}}else return S[v]=e,e;return 0},max:function(v,w,S,l){var e=l[w];if(u(e))if(e=Number(e),u(S[v])){if(S[v]m&&mS){var _=h===v?1:6,I=h===v?"M12":"M1";return function(C,F){var R=y.c2d(C,v,o),z=R.indexOf("-",_);z>0&&(R=R.slice(0,z));var D=y.d2c(R,0,o);if(Dt?c>S?c>v*1.1?v:c>w*1.1?w:S:c>l?l:c>e?e:t:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function i(c,p,f,d,y,o){if(d&&c>S){var x=s(p,y,o),M=s(f,y,o),T=c===v?0:1;return x[T]!==M[T]}return Math.floor(f/c)-Math.floor(p/c)>.1}function s(c,p,f){var d=p.c2d(c,v,f).split("-");return d[0]===""&&(d.unshift(),d[0]="-"+d[0]),d}}}),Iw=De({"src/traces/histogram/calc.js"(j,N){"use strict";var u=io(),v=Ar(),w=hi(),S=Vi(),{hasColorscale:l}=Of(),e=Wf(),t=F1(),a=Cw(),r=Lw(),n=Pw(),i=Rw();function s(y,o){var x=[],M=[],T=o.orientation==="h",E=S.getFromId(y,T?o.yaxis:o.xaxis),g=T?"y":"x",A={x:"y",y:"x"}[g],m=o[g+"calendar"],h=o.cumulative,b,_=c(y,o,E,g),I=_[0],C=_[1],F=typeof I.size=="string",R=[],z=F?R:I,D=[],k=[],B=[],O=0,q=o.histnorm,Y=o.histfunc,ee=q.indexOf("density")!==-1,te,ae,U;h.enabled&&ee&&(q=q.replace(/ ?density$/,""),ee=!1);var H=Y==="max"||Y==="min",K=H?null:0,V=a.count,$=r[q],X=!1,Z=function(be){return E.r2c(be,0,m)},Q;for(v.isArrayOrTypedArray(o[A])&&Y!=="count"&&(Q=o[A],X=Y==="avg",V=a[Y]),b=Z(I.start),ae=Z(I.end)+(b-S.tickIncrement(b,I.size,!1,m))/1e6;b=0&&U=oe;b--)if(M[b]){le=b;break}for(b=oe;b<=le;b++)if(u(x[b])&&u(M[b])){var ne={p:x[b],s:M[b],b:0};h.enabled||(ne.pts=B[b],ye?ne.ph0=ne.ph1=B[b].length?C[B[b][0]]:x[b]:(o._computePh=!0,ne.ph0=Ue(R[b]),ne.ph1=Ue(R[b+1],!0))),he.push(ne)}return he.length===1&&(he[0].width1=S.tickIncrement(he[0].p,I.size,!1,m)-he[0].p),l(o,"marker")&&e(y,o,{vals:o.marker.color,containerStr:"marker",cLetter:"c"}),l(o,"marker.line")&&e(y,o,{vals:o.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(he,o),v.isArrayOrTypedArray(o.selectedpoints)&&v.tagSelected(he,o,Ce),he}function c(y,o,x,M,T){var E,g=M+"bins",A=y._fullLayout,m=o["_"+M+"bingroup"],h=A._histogramBinOpts[m],b=A.barmode==="overlay",_,I,C,F,R,z,D,k=function(Ue){return x.r2c(Ue,0,F)},B=function(Ue){return x.c2r(Ue,0,F)},O=x.type==="date"?function(Ue){return Ue||Ue===0?v.cleanDate(Ue,null,F):null}:function(Ue){return u(Ue)?Number(Ue):null};function q(Ue,xe,he){xe[Ue+"Found"]?(xe[Ue]=O(xe[Ue]),xe[Ue]===null&&(xe[Ue]=he[Ue])):(z[Ue]=xe[Ue]=he[Ue],v.nestedProperty(I[0],g+"."+Ue).set(he[Ue]))}if(o["_"+M+"autoBinFinished"])delete o["_"+M+"autoBinFinished"];else{I=h.traces;var Y=[],ee=!0,te=!1,ae=!1;for(_=0;_x.r2l(re)&&(me=S.tickIncrement(me,h.size,!0,F)),$.start=x.l2r(me),Q||v.nestedProperty(o,g+".start").set($.start)}var ye=h.end,Ae=x.r2l(V.end),Se=Ae!==void 0;if((h.endFound||Se)&&Ae!==x.r2l(ye)){var Ce=Se?Ae:v.aggNums(Math.max,null,R);$.end=x.l2r(Ce),Se||v.nestedProperty(o,g+".start").set($.end)}var qe="autobin"+M;return o._input[qe]===!1&&(o._input[g]=v.extendFlat({},o[g]||{}),delete o._input[qe],delete o[qe]),[$,R]}function p(y,o,x,M,T){var E=y._fullLayout,g=f(y,o),A=!1,m=1/0,h=[o],b,_,I;for(b=0;b=0;M--)A(M);else if(o==="increasing"){for(M=1;M=0;M--)y[M]+=y[M+1];x==="exclude"&&(y.push(0),y.shift())}}N.exports={calc:s,calcAllAutoBins:c}}}),NI=De({"src/traces/histogram2d/calc.js"(j,N){"use strict";var u=Ar(),v=Vi(),w=Cw(),S=Lw(),l=Pw(),e=Rw(),t=Iw().calcAllAutoBins;N.exports=function(s,c){var p=v.getFromId(s,c.xaxis),f=v.getFromId(s,c.yaxis),d=c.xcalendar,y=c.ycalendar,o=function(Ee){return p.r2c(Ee,0,d)},x=function(Ee){return f.r2c(Ee,0,y)},M=function(Ee){return p.c2r(Ee,0,d)},T=function(Ee){return f.c2r(Ee,0,y)},E,g,A,m,h=t(s,c,p,"x"),b=h[0],_=h[1],I=t(s,c,f,"y"),C=I[0],F=I[1],R=c._length;_.length>R&&_.splice(R,_.length-R),F.length>R&&F.splice(R,F.length-R);var z=[],D=[],k=[],B=typeof b.size=="string",O=typeof C.size=="string",q=[],Y=[],ee=B?q:b,te=O?Y:C,ae=0,U=[],H=[],K=c.histnorm,V=c.histfunc,$=K.indexOf("density")!==-1,X=V==="max"||V==="min",Z=X?null:0,Q=w.count,re=S[K],ce=!1,me=[],ye=[],Ae="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Ae&&V!=="count"&&(ce=V==="avg",Q=w[V]);var Se=b.size,Ce=o(b.start),qe=o(b.end)+(Ce-v.tickIncrement(Ce,Se,!1,d))/1e6;for(E=Ce;E=0&&A=0&&mv;n++)r=l(t,a,S(r));return r>v&&u.log("interp2d didn't converge quickly",r),t};function l(e,t,a){var r=0,n,i,s,c,p,f,d,y,o,x,M,T,E;for(c=0;cT&&(r=Math.max(r,Math.abs(e[i][s]-M)/(E-T))))}return r}}}),Ax=De({"src/traces/heatmap/find_empties.js"(j,N){"use strict";var u=Ar().maxRowLength;N.exports=function(w){var S=[],l={},e=[],t=w[0],a=[],r=[0,0,0],n=u(w),i,s,c,p,f,d,y,o;for(s=0;s=0;f--)p=e[f],s=p[0],c=p[1],d=((l[[s-1,c]]||r)[2]+(l[[s+1,c]]||r)[2]+(l[[s,c-1]]||r)[2]+(l[[s,c+1]]||r)[2])/20,d&&(y[p]=[s,c,d],e.splice(f,1),o=!0);if(!o)throw"findEmpties iterated with no new neighbors";for(p in y)l[p]=y[p],S.push(y[p])}return S.sort(function(x,M){return M[2]-x[2]})}}}),Dw=De({"src/traces/heatmap/make_bound_array.js"(j,N){"use strict";var u=hi(),v=Ar().isArrayOrTypedArray;N.exports=function(S,l,e,t,a,r){var n=[],i=u.traceIs(S,"contour"),s=u.traceIs(S,"histogram"),c,p,f,d=v(l)&&l.length>1;if(d&&!s&&r.type!=="category"){var y=l.length;if(y<=a){if(i)n=Array.from(l).slice(0,a);else if(a===1)r.type==="log"?n=[.5*l[0],2*l[0]]:n=[l[0]-.5,l[0]+.5];else if(r.type==="log"){for(n=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],f=1;f1){var K=(H[H.length-1]-H[0])/(H.length-1),V=Math.abs(K/100);for(R=0;RV)return!1}return!0}y._islinear=!1,o.type==="log"||x.type==="log"?E==="fast"&&k("log axis found"):B(g)?B(b)?y._islinear=!0:E==="fast"&&k("y scale is not linear"):E==="fast"&&k("x scale is not linear");var O=v.maxRowLength(F),q=y.xtype==="scaled"?"":g,Y=i(y,q,A,m,O,o),ee=y.ytype==="scaled"?"":b,te=i(y,ee,_,I,F.length,x);y._extremes[o._id]=w.findExtremes(o,Y),y._extremes[x._id]=w.findExtremes(x,te);var ae={x:Y,y:te,z:F,text:y._text||y.text,hovertext:y._hovertext||y.hovertext};if(y.xperiodalignment&&h&&(ae.orig_x=h),y.yperiodalignment&&C&&(ae.orig_y=C),q&&q.length===Y.length-1&&(ae.xCenter=q),ee&&ee.length===te.length-1&&(ae.yCenter=ee),T&&(ae.xRanges=z.xRanges,ae.yRanges=z.yRanges,ae.pts=z.pts),M||e(d,y,{vals:F,cLetter:"z"}),M&&y.contours&&y.contours.coloring==="heatmap"){var U={type:y.type==="contour"?"heatmap":"histogram2d",xcalendar:y.xcalendar,ycalendar:y.ycalendar};ae.xfill=i(U,q,A,m,O,o),ae.yfill=i(U,ee,_,I,F.length,x)}return[ae]};function c(f){for(var d=[],y=f.length,o=0;o0;)V=h.c2p(k[Q]),Q--;for(V0;)Z=b.c2p(B[Q]),Q--;Z=h._length||V<=0||X>=b._length||Z<=0;if(Ce){var qe=I.selectAll("image").data([]);qe.exit().remove(),o(I);return}var Ue,xe;me==="fast"?(Ue=ae,xe=te):(Ue=Ae,xe=Se);var he=document.createElement("canvas");he.width=Ue,he.height=xe;var oe=he.getContext("2d",{willReadFrequently:!0}),le=n(F,{noNumericCheck:!0,returnArray:!0}),ne,be;me==="fast"?(ne=U?function(Cr){return ae-1-Cr}:l.identity,be=H?function(Cr){return te-1-Cr}:l.identity):(ne=function(Cr){return l.constrain(Math.round(h.c2p(k[Cr])-K),0,Ae)},be=function(Cr){return l.constrain(Math.round(b.c2p(B[Cr])-X),0,Se)});var Fe=be(0),Ve=[Fe,Fe],je=U?0:1,ut=H?0:1,st=0,yt=0,At=0,Pt=0,Zt,vr,Nt,Kt,nt;function Ee(Cr,Mr=0){if(Cr===void 0)return[0,0,0,0];var Xr=le(Cr);return Xr[0]=Math.round(Xr[0]),Xr[1]=Math.round(Xr[1]),Xr[2]=Math.round(Xr[2]),st+=Mr,yt+=Xr[0]*Mr,At+=Xr[1]*Mr,Pt+=Xr[2]*Mr,Xr}function ze(Cr,Mr,Xr,Ra){var wa=Cr[Xr.bin0];if(wa===void 0)return Ee(void 0,1);var yn=Cr[Xr.bin1],fn=Mr[Xr.bin0],ri=Mr[Xr.bin1],On=yn-wa||0,ui=fn-wa||0,jn;return yn===void 0?ri===void 0?jn=0:fn===void 0?jn=2*(ri-wa):jn=(2*ri-fn-wa)*2/3:ri===void 0?fn===void 0?jn=0:jn=(2*wa-yn-fn)*2/3:fn===void 0?jn=(2*ri-yn-wa)*2/3:jn=ri+wa-yn-fn,Ee(wa+Xr.frac*On+Ra.frac*(ui+Xr.frac*jn))}if(me!=="default"){var ve=0,_e;try{_e=new Uint8Array(Ue*xe*4)}catch{_e=new Array(Ue*xe*4)}if(me==="smooth"){var Ie=O||k,Be=q||B,We=new Array(Ie.length),Xe=new Array(Be.length),mt=new Array(Ae),ft=O?M:x,ht=q?M:x,gt,_t,Ft;for(Q=0;QYn||Yn>b._length))for(re=xa;revi||vi>h._length)){var Dn=t({x:Zn,y:sn},F,E._fullLayout);Dn.x=Zn,Dn.y=sn;var oi=C.z[Q][re];oi===void 0?(Dn.z="",Dn.zLabel=""):(Dn.z=oi,Dn.zLabel=S.tickText(ka,oi,"hover").text);var on=C.text&&C.text[Q]&&C.text[Q][re];(on===void 0||on===!1)&&(on=""),Dn.text=on;var mn=l.texttemplateString({data:[Dn,F._meta],fallback:F.texttemplatefallback,labels:Dn,locale:E._fullLayout._d3locale,template:oa});if(mn){var bi=mn.split("
"),Li=bi.length,$a=0;for(ce=0;ce=x[0].length||I<0||I>x.length)return}else{if(u.inbox(a-y[0],a-y[y.length-1],0)>0||u.inbox(r-o[0],r-o[o.length-1],0)>0)return;if(s){var C;for(A=[2*y[0]-y[1]],C=1;C=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),j1=De({"src/traces/contour/attributes.js"(j,N){"use strict";var u=bm(),v=bu(),w=Zl(),S=w.axisHoverFormat,l=w.descriptionOnlyNumbers,e=ul(),t=Hc().dash,a=Ml(),r=Ji().extendFlat,n=Rx(),i=n.COMPARISON_OPS2,s=n.INTERVAL_OPS,c=v.line;N.exports=r({z:u.z,x:u.x,x0:u.x0,dx:u.dx,y:u.y,y0:u.y0,dy:u.dy,xperiod:u.xperiod,yperiod:u.yperiod,xperiod0:v.xperiod0,yperiod0:v.yperiod0,xperiodalignment:u.xperiodalignment,yperiodalignment:u.yperiodalignment,text:u.text,hovertext:u.hovertext,transpose:u.transpose,xtype:u.xtype,ytype:u.ytype,xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:u.hovertemplate,hovertemplatefallback:u.hovertemplatefallback,texttemplate:r({},u.texttemplate,{}),texttemplatefallback:u.texttemplatefallback,textfont:r({},u.textfont,{}),hoverongaps:u.hoverongaps,connectgaps:r({},u.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:a({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(i).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},c.smoothing,{}),editType:"plot"},zorder:v.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),Nw=De({"src/traces/histogram2dcontour/attributes.js"(j,N){"use strict";var u=Px(),v=j1(),w=ul(),S=Zl().axisHoverFormat,l=Ji().extendFlat;N.exports=l({x:u.x,y:u.y,z:u.z,marker:u.marker,histnorm:u.histnorm,histfunc:u.histfunc,nbinsx:u.nbinsx,xbins:u.xbins,nbinsy:u.nbinsy,ybins:u.ybins,autobinx:u.autobinx,autobiny:u.autobiny,bingroup:u.bingroup,xbingroup:u.xbingroup,ybingroup:u.ybingroup,autocontour:v.autocontour,ncontours:v.ncontours,contours:v.contours,line:{color:v.line.color,width:l({},v.line.width,{dflt:.5}),dash:v.line.dash,smoothing:v.line.smoothing,editType:"plot"},xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z",1),hovertemplate:u.hovertemplate,hovertemplatefallback:u.hovertemplatefallback,texttemplate:v.texttemplate,texttemplatefallback:v.texttemplatefallback,textfont:v.textfont},w("",{cLetter:"z",editTypeOverride:"calc"}))}}),Ix=De({"src/traces/contour/contours_defaults.js"(j,N){"use strict";N.exports=function(v,w,S,l){var e=l("contours.start"),t=l("contours.end"),a=e===!1||t===!1,r=S("contours.size"),n;a?n=w.autocontour=!0:n=S("autocontour",!1),(n||!r)&&S("ncontours")}}}),jw=De({"src/traces/contour/label_defaults.js"(j,N){"use strict";var u=Ar();N.exports=function(w,S,l,e){e||(e={});var t=w("contours.showlabels");if(t){var a=S.font;u.coerceFont(w,"contours.labelfont",a,{overrideDflt:{color:l}}),w("contours.labelformat")}e.hasHover!==!1&&w("zhoverformat")}}}),Dx=De({"src/traces/contour/style_defaults.js"(j,N){"use strict";var u=Wc(),v=jw();N.exports=function(S,l,e,t,a){var r=e("contours.coloring"),n,i="";r==="fill"&&(n=e("contours.showlines")),n!==!1&&(r!=="lines"&&(i=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(S.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,u(S,l,t,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),v(e,t,i,a)}}}),KI=De({"src/traces/histogram2dcontour/defaults.js"(j,N){"use strict";var u=Ar(),v=Ow(),w=Ix(),S=Dx(),l=N1(),e=Nw();N.exports=function(a,r,n,i){function s(p,f){return u.coerce(a,r,e,p,f)}function c(p){return u.coerce2(a,r,e,p)}v(a,r,s,i),r.visible!==!1&&(w(a,r,s,c),S(a,r,s,i),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&l(s,i))}}}),Uw=De({"src/traces/contour/set_contours.js"(j,N){"use strict";var u=Vi(),v=Ar();N.exports=function(l,e){var t=l.contours;if(l.autocontour){var a=l.zmin,r=l.zmax;(l.zauto||a===void 0)&&(a=v.aggNums(Math.min,null,e)),(l.zauto||r===void 0)&&(r=v.aggNums(Math.max,null,e));var n=w(a,r,l.ncontours);t.size=n.dtick,t.start=u.tickFirst(n),n.range.reverse(),t.end=u.tickFirst(n),t.start===a&&(t.start+=t.size),t.end===r&&(t.end-=t.size),t.start>t.end&&(t.start=t.end=(t.start+t.end)/2),l._input.contours||(l._input.contours={}),v.extendFlat(l._input.contours,{start:t.start,end:t.end,size:t.size}),l._input.autocontour=!0}else if(t.type!=="constraint"){var i=t.start,s=t.end,c=l._input.contours;if(i>s&&(t.start=c.start=s,s=t.end=c.end=i,i=t.start),!(t.size>0)){var p;i===s?p=1:p=w(i,s,l.ncontours).dtick,c.size=t.size=p}}};function w(S,l,e){var t={type:"linear",range:[S,l]};return u.autoTicks(t,(l-S)/(e||15)),t}}}),U1=De({"src/traces/contour/end_plus.js"(j,N){"use strict";N.exports=function(v){return v.end+v.size/1e6}}}),qw=De({"src/traces/contour/calc.js"(j,N){"use strict";var u=Dl(),v=Tx(),w=Uw(),S=U1();N.exports=function(e,t){var a=v(e,t),r=a[0].z;w(t,r);var n=t.contours,i=u.extractOpts(t),s;if(n.coloring==="heatmap"&&i.auto&&t.autocontour===!1){var c=n.start,p=S(n),f=n.size||1,d=Math.floor((p-c)/f)+1;isFinite(f)||(f=1,d=1);var y=c-f/2,o=y+d*f;s=[y,o]}else s=r;return u.calc(e,t,{vals:s,cLetter:"z"}),a}}}),q1=De({"src/traces/contour/constants.js"(j,N){"use strict";N.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}}}}),Gw=De({"src/traces/contour/make_crossings.js"(j,N){"use strict";var u=q1();N.exports=function(S){var l=S[0].z,e=l.length,t=l[0].length,a=e===2||t===2,r,n,i,s,c,p,f,d,y;for(n=0;nw?0:1)+(S[0][1]>w?0:2)+(S[1][1]>w?0:4)+(S[1][0]>w?0:8);if(l===5||l===10){var e=(S[0][0]+S[0][1]+S[1][0]+S[1][1])/4;return w>e?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),Vw=De({"src/traces/contour/find_all_paths.js"(j,N){"use strict";var u=Ar(),v=q1();N.exports=function(r,n,i){var s,c,p,f,d;for(n=n||.01,i=i||.01,p=0;p20?(p=v.CHOOSESADDLE[p][(f[0]||f[1])<0?0:1],a.crossings[c]=v.SADDLEREMAINDER[p]):delete a.crossings[c],f=v.NEWDELTA[p],!f){u.log("Found bad marching index:",p,r,a.level);break}d.push(t(a,r,f)),r[0]+=f[0],r[1]+=f[1],c=r.join(","),w(d[d.length-1],d[d.length-2],i,s)&&d.pop();var E=f[0]&&(r[0]<0||r[0]>o-2)||f[1]&&(r[1]<0||r[1]>y-2),g=r[0]===x[0]&&r[1]===x[1]&&f[0]===M[0]&&f[1]===M[1];if(g||n&&E)break;p=a.crossings[c]}T===1e4&&u.log("Infinite loop in contour?");var A=w(d[0],d[d.length-1],i,s),m=0,h=.2*a.smoothing,b=[],_=0,I,C,F,R,z,D,k,B,O,q,Y;for(T=1;T=_;T--)if(I=b[T],I=_&&I+b[C]B&&O--,a.edgepaths[O]=Y.concat(d,q));break}U||(a.edgepaths[B]=d.concat(q))}for(B=0;B20&&r?a===208||a===1114?i=n[0]===0?1:-1:s=n[1]===0?1:-1:v.BOTTOMSTART.indexOf(a)!==-1?s=1:v.LEFTSTART.indexOf(a)!==-1?i=1:v.TOPSTART.indexOf(a)!==-1?s=-1:i=-1,[i,s]}function t(a,r,n){var i=r[0]+Math.max(n[0],0),s=r[1]+Math.max(n[1],0),c=a.z[s][i],p=a.xaxis,f=a.yaxis;if(n[1]){var d=(a.level-c)/(a.z[s][i+1]-c),y=(d!==1?(1-d)*p.c2l(a.x[i]):0)+(d!==0?d*p.c2l(a.x[i+1]):0);return[p.c2p(p.l2c(y),!0),f.c2p(a.y[s],!0),i+d,s]}else{var o=(a.level-c)/(a.z[s+1][i]-c),x=(o!==1?(1-o)*f.c2l(a.y[s]):0)+(o!==0?o*f.c2l(a.y[s+1]):0);return[p.c2p(a.x[i],!0),f.c2p(f.l2c(x),!0),i,s+o]}}}}),JI=De({"src/traces/contour/constraint_mapping.js"(j,N){"use strict";var u=Rx(),v=io();N.exports={"[]":S("[]"),"][":S("]["),">":l(">"),"<":l("<"),"=":l("=")};function w(e,t){var a=Array.isArray(t),r;function n(i){return v(i)?+i:null}return u.COMPARISON_OPS2.indexOf(e)!==-1?r=n(a?t[0]:t):u.INTERVAL_OPS.indexOf(e)!==-1?r=a?[n(t[0]),n(t[1])]:[n(t),n(t)]:u.SET_OPS.indexOf(e)!==-1&&(r=a?t.map(n):[n(t)]),r}function S(e){return function(t){t=w(e,t);var a=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:a,end:r,size:r-a}}}function l(e){return function(t){return t=w(e,t),{start:t,end:1/0,size:1/0}}}}}),Hw=De({"src/traces/contour/empty_pathinfo.js"(j,N){"use strict";var u=Ar(),v=JI(),w=U1();N.exports=function(l,e,t){for(var a=l.type==="constraint"?v[l._operation](l.value):l,r=a.size,n=[],i=w(a),s=t.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:t.a,y:t.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:t.x,y:t.y},p=a.start;p1e3){u.warn("Too many contours, clipping at 1000",l);break}return n}}}),Ww=De({"src/traces/contour/convert_to_constraints.js"(j,N){"use strict";var u=Ar();N.exports=function(w,S){var l,e,t,a=function(i){return i.reverse()},r=function(i){return i};switch(S){case"=":case"<":return w;case">":for(w.length!==1&&u.warn("Contour data invalid for the specified inequality operation."),e=w[0],l=0;lt.level||t.starts.length&&e===t.level)}break;case"constraint":if(w.prefixBoundary=!1,w.edgepaths.length)return;var a=w.x.length,r=w.y.length,n=-1/0,i=1/0;for(l=0;l":s>n&&(w.prefixBoundary=!0);break;case"<":(sn||w.starts.length&&p===i)&&(w.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),p=Math.max(s[0],s[1]),cn&&(w.prefixBoundary=!0);break}break}}}}),Fx=De({"src/traces/contour/plot.js"(j){"use strict";var N=Qn(),u=Ar(),v=Ki(),w=Dl(),S=Xs(),l=Vi(),e=Sd(),t=Sx(),a=Gw(),r=Vw(),n=Hw(),i=Ww(),s=Yw(),c=q1(),p=c.LABELOPTIMIZER;j.plot=function(g,A,m,h){var b=A.xaxis,_=A.yaxis;u.makeTraceGroups(h,m,"contour").each(function(I){var C=N.select(this),F=I[0],R=F.trace,z=F.x,D=F.y,k=R.contours,B=n(k,A,F),O=u.ensureSingle(C,"g","heatmapcoloring"),q=[];k.coloring==="heatmap"&&(q=[I]),t(g,A,q,O),a(B),r(B);var Y=b.c2p(z[0],!0),ee=b.c2p(z[z.length-1],!0),te=_.c2p(D[0],!0),ae=_.c2p(D[D.length-1],!0),U=[[Y,ae],[ee,ae],[ee,te],[Y,te]],H=B;k.type==="constraint"&&(H=i(B,k._operation)),f(C,U,k),d(C,H,U,k),o(C,B,g,F,k),M(C,A,g,F,U)})};function f(E,g,A){var m=u.ensureSingle(E,"g","contourbg"),h=m.selectAll("path").data(A.coloring==="fill"?[0]:[]);h.enter().append("path"),h.exit().remove(),h.attr("d","M"+g.join("L")+"Z").style("stroke","none")}function d(E,g,A,m){var h=m.coloring==="fill"||m.type==="constraint"&&m._operation!=="=",b="M"+A.join("L")+"Z";h&&s(g,m);var _=u.ensureSingle(E,"g","contourfill"),I=_.selectAll("path").data(h?g:[]);I.enter().append("path"),I.exit().remove(),I.each(function(C){var F=(C.prefixBoundary?b:"")+y(C,A);F?N.select(this).attr("d",F).style("stroke","none"):N.select(this).remove()})}function y(E,g){var A="",m=0,h=E.edgepaths.map(function(Y,ee){return ee}),b=!0,_,I,C,F,R,z;function D(Y){return Math.abs(Y[1]-g[0][1])<.01}function k(Y){return Math.abs(Y[1]-g[2][1])<.01}function B(Y){return Math.abs(Y[0]-g[0][0])<.01}function O(Y){return Math.abs(Y[0]-g[2][0])<.01}for(;h.length;){for(z=v.smoothopen(E.edgepaths[m],E.smoothing),A+=b?z:z.replace(/^M/,"L"),h.splice(h.indexOf(m),1),_=E.edgepaths[m][E.edgepaths[m].length-1],F=-1,C=0;C<4;C++){if(!_){u.log("Missing end?",m,E);break}for(D(_)&&!O(_)?I=g[1]:B(_)?I=g[0]:k(_)?I=g[3]:O(_)&&(I=g[2]),R=0;R=0&&(I=q,F=R):Math.abs(_[1]-I[1])<.01?Math.abs(_[1]-q[1])<.01&&(q[0]-_[0])*(I[0]-q[0])>=0&&(I=q,F=R):u.log("endpt to newendpt is not vert. or horz.",_,I,q)}if(_=I,F>=0)break;A+="L"+I}if(F===E.edgepaths.length){u.log("unclosed perimeter path");break}m=F,b=h.indexOf(m)===-1,b&&(m=h[0],A+="Z")}for(m=0;mp.MAXCOST*2)break;D&&(I/=2),_=F-I/2,C=_+I*1.5}if(z<=p.MAXCOST)return R};function x(E,g,A,m){var h=g.width/2,b=g.height/2,_=E.x,I=E.y,C=E.theta,F=Math.cos(C)*h,R=Math.sin(C)*h,z=(_>m.center?m.right-_:_-m.left)/(F+Math.abs(Math.sin(C)*b)),D=(I>m.middle?m.bottom-I:I-m.top)/(Math.abs(R)+Math.cos(C)*b);if(z<1||D<1)return 1/0;var k=p.EDGECOST*(1/(z-1)+1/(D-1));k+=p.ANGLECOST*C*C;for(var B=_-F,O=I-R,q=_+F,Y=I+R,ee=0;ee=M)&&(t<=x&&(t=x),a>=M&&(a=M),n=Math.floor((a-t)/r)+1,i=0),o=0;ox&&(f.unshift(x),d.unshift(d[0])),f[f.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:u(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(i("contours.value",0),u(s.value)||(t(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),tD=De({"src/traces/contour/defaults.js"(j,N){"use strict";var u=Ar(),v=_x(),w=ud(),S=$w(),l=Ix(),e=Dx(),t=N1(),a=j1();N.exports=function(n,i,s,c){function p(o,x){return u.coerce(n,i,a,o,x)}function f(o){return u.coerce2(n,i,a,o)}var d=v(n,i,p,c);if(!d){i.visible=!1;return}w(n,i,c,p),p("xhoverformat"),p("yhoverformat"),p("text"),p("hovertext"),p("hoverongaps"),p("hovertemplate"),p("hovertemplatefallback");var y=p("contours.type")==="constraint";p("connectgaps",u.isArray1D(i.z)),y?S(n,i,p,c,s):(l(n,i,p,f),e(n,i,p,c)),i.contours&&i.contours.coloring==="heatmap"&&t(p,c),p("zorder")}}}),rD=De({"src/traces/contour/index.js"(j,N){"use strict";N.exports={attributes:j1(),supplyDefaults:tD(),calc:qw(),plot:Fx().plot,style:zx(),colorbar:Bx(),hoverPoints:Zw(),moduleType:"trace",name:"contour",basePlotModule:Hu(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),aD=De({"lib/contour.js"(j,N){"use strict";N.exports=rD()}}),Kw=De({"src/traces/scatterternary/attributes.js"(j,N){"use strict";var{hovertemplateAttrs:u,texttemplateAttrs:v,templatefallbackAttrs:w}=Is(),S=Cd(),l=bu(),e=Bs(),t=ul(),a=Hc().dash,r=Ji().extendFlat,n=l.marker,i=l.line,s=n.line;N.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:r({},l.mode,{dflt:"markers"}),text:r({},l.text,{}),texttemplate:v({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:w({editType:"plot"}),hovertext:r({},l.hovertext,{}),line:{color:i.color,width:i.width,dash:a,backoff:i.backoff,shape:r({},i.shape,{values:["linear","spline"]}),smoothing:i.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:r({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:S(),marker:r({symbol:n.symbol,opacity:n.opacity,angle:n.angle,angleref:n.angleref,standoff:n.standoff,maxdisplayed:n.maxdisplayed,size:n.size,sizeref:n.sizeref,sizemin:n.sizemin,sizemode:n.sizemode,line:r({width:s.width,dash:s.dash,editType:"calc"},t("marker.line")),gradient:n.gradient,editType:"calc"},t("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:r({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:u(),hovertemplatefallback:w()}}}),nD=De({"src/traces/scatterternary/defaults.js"(j,N){"use strict";var u=Ar(),v=kd(),w=Sl(),S=Jh(),l=cd(),e=pm(),t=fd(),a=Ld(),r=Kw();N.exports=function(i,s,c,p){function f(E,g){return u.coerce(i,s,r,E,g)}var d=f("a"),y=f("b"),o=f("c"),x;if(d?(x=d.length,y?(x=Math.min(x,y.length),o&&(x=Math.min(x,o.length))):o?x=Math.min(x,o.length):x=0):y&&o&&(x=Math.min(y.length,o.length)),!x){s.visible=!1;return}s._length=x,f("sum"),f("text"),f("hovertext"),s.hoveron!=="fills"&&(f("hovertemplate"),f("hovertemplatefallback"));var M=x"),a.hovertemplate=p.hovertemplate,t}}}),uD=De({"src/traces/scatterternary/event_data.js"(j,N){"use strict";N.exports=function(v,w,S,l,e){if(w.xa&&(v.xaxis=w.xa),w.ya&&(v.yaxis=w.ya),l[e]){var t=l[e];v.a=t.a,v.b=t.b,v.c=t.c}else v.a=w.a,v.b=w.b,v.c=w.c;return v}}}),cD=De({"src/plots/ternary/ternary.js"(j,N){"use strict";var u=Qn(),v=hi(),w=Ar(),S=w.strTranslate,l=w._,e=ii(),t=Ki(),a=Sd(),r=Ji().extendFlat,n=Il(),i=Vi(),s=dh(),c=uu(),p=Ed(),f=p.freeMode,d=p.rectMode,y=Sp(),o=Sc().prepSelect,x=Sc().selectOnClick,M=Sc().clearOutline,T=Sc().clearSelectionsCache,E=gc();function g(D,k){this.id=D.id,this.graphDiv=D.graphDiv,this.init(k),this.makeFramework(k),this.updateFx(k),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}N.exports=g;var A=g.prototype;A.init=function(D){this.container=D._ternarylayer,this.defs=D._defs,this.layoutId=D._uid,this.traceHash={},this.layers={}},A.plot=function(D,k){var B=this,O=k[B.id],q=k._size;B._hasClipOnAxisFalse=!1;for(var Y=0;Ym*U?(re=U,Q=re*m):(Q=ae,re=Q/m),ce=ee*Q/ae,me=te*re/U,X=k.l+k.w*q-Q/2,Z=k.t+k.h*(1-Y)-re/2,B.x0=X,B.y0=Z,B.w=Q,B.h=re,B.sum=H,B.xaxis={type:"linear",range:[K+2*$-H,H-K-2*V],domain:[q-ce/2,q+ce/2],_id:"x"},a(B.xaxis,B.graphDiv._fullLayout),B.xaxis.setScale(),B.xaxis.isPtWithinRange=function(ne){return ne.a>=B.aaxis.range[0]&&ne.a<=B.aaxis.range[1]&&ne.b>=B.baxis.range[1]&&ne.b<=B.baxis.range[0]&&ne.c>=B.caxis.range[1]&&ne.c<=B.caxis.range[0]},B.yaxis={type:"linear",range:[K,H-V-$],domain:[Y-me/2,Y+me/2],_id:"y"},a(B.yaxis,B.graphDiv._fullLayout),B.yaxis.setScale(),B.yaxis.isPtWithinRange=function(){return!0};var ye=B.yaxis.domain[0],Ae=B.aaxis=r({},D.aaxis,{range:[K,H-V-$],side:"left",tickangle:(+D.aaxis.tickangle||0)-30,domain:[ye,ye+me*m],anchor:"free",position:0,_id:"y",_length:Q});a(Ae,B.graphDiv._fullLayout),Ae.setScale();var Se=B.baxis=r({},D.baxis,{range:[H-K-$,V],side:"bottom",domain:B.xaxis.domain,anchor:"free",position:0,_id:"x",_length:Q});a(Se,B.graphDiv._fullLayout),Se.setScale();var Ce=B.caxis=r({},D.caxis,{range:[H-K-V,$],side:"right",tickangle:(+D.caxis.tickangle||0)+30,domain:[ye,ye+me*m],anchor:"free",position:0,_id:"y",_length:Q});a(Ce,B.graphDiv._fullLayout),Ce.setScale();var qe="M"+X+","+(Z+re)+"h"+Q+"l-"+Q/2+",-"+re+"Z";B.clipDef.select("path").attr("d",qe),B.layers.plotbg.select("path").attr("d",qe);var Ue="M0,"+re+"h"+Q+"l-"+Q/2+",-"+re+"Z";B.clipDefRelative.select("path").attr("d",Ue);var xe=S(X,Z);B.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",xe),B.clipDefRelative.select("path").attr("transform",null);var he=S(X-Se._offset,Z+re);B.layers.baxis.attr("transform",he),B.layers.bgrid.attr("transform",he);var oe=S(X+Q/2,Z)+"rotate(30)"+S(0,-Ae._offset);B.layers.aaxis.attr("transform",oe),B.layers.agrid.attr("transform",oe);var le=S(X+Q/2,Z)+"rotate(-30)"+S(0,-Ce._offset);B.layers.caxis.attr("transform",le),B.layers.cgrid.attr("transform",le),B.drawAxes(!0),B.layers.aline.select("path").attr("d",Ae.showline?"M"+X+","+(Z+re)+"l"+Q/2+",-"+re:"M0,0").call(e.stroke,Ae.linecolor||"#000").style("stroke-width",(Ae.linewidth||0)+"px"),B.layers.bline.select("path").attr("d",Se.showline?"M"+X+","+(Z+re)+"h"+Q:"M0,0").call(e.stroke,Se.linecolor||"#000").style("stroke-width",(Se.linewidth||0)+"px"),B.layers.cline.select("path").attr("d",Ce.showline?"M"+(X+Q/2)+","+Z+"l"+Q/2+","+re:"M0,0").call(e.stroke,Ce.linecolor||"#000").style("stroke-width",(Ce.linewidth||0)+"px"),B.graphDiv._context.staticPlot||B.initInteractions(),t.setClipUrl(B.layers.frontplot,B._hasClipOnAxisFalse?null:B.clipId,B.graphDiv)},A.drawAxes=function(D){var k=this,B=k.graphDiv,O=k.id.slice(7)+"title",q=k.layers,Y=k.aaxis,ee=k.baxis,te=k.caxis;if(k.drawAx(Y),k.drawAx(ee),k.drawAx(te),D){var ae=Math.max(Y.showticklabels?Y.tickfont.size/2:0,(te.showticklabels?te.tickfont.size*.75:0)+(te.ticks==="outside"?te.ticklen*.87:0)),U=(ee.showticklabels?ee.tickfont.size:0)+(ee.ticks==="outside"?ee.ticklen:0)+3;q["a-title"]=y.draw(B,"a"+O,{propContainer:Y,propName:k.id+".aaxis.title.text",placeholder:l(B,"Click to enter Component A title"),attributes:{x:k.x0+k.w/2,y:k.y0-Y.title.font.size/3-ae,"text-anchor":"middle"}}),q["b-title"]=y.draw(B,"b"+O,{propContainer:ee,propName:k.id+".baxis.title.text",placeholder:l(B,"Click to enter Component B title"),attributes:{x:k.x0-U,y:k.y0+k.h+ee.title.font.size*.83+U,"text-anchor":"middle"}}),q["c-title"]=y.draw(B,"c"+O,{propContainer:te,propName:k.id+".caxis.title.text",placeholder:l(B,"Click to enter Component C title"),attributes:{x:k.x0+k.w+U,y:k.y0+k.h+te.title.font.size*.83+U,"text-anchor":"middle"}})}},A.drawAx=function(D){var k=this,B=k.graphDiv,O=D._name,q=O.charAt(0),Y=D._id,ee=k.layers[O],te=30,ae=q+"tickLayout",U=h(D);k[ae]!==U&&(ee.selectAll("."+Y+"tick").remove(),k[ae]=U),D.setScale();var H=i.calcTicks(D),K=i.clipEnds(D,H),V=i.makeTransTickFn(D),$=i.getTickSigns(D)[2],X=w.deg2rad(te),Z=$*(D.linewidth||1)/2,Q=$*D.ticklen,re=k.w,ce=k.h,me=q==="b"?"M0,"+Z+"l"+Math.sin(X)*Q+","+Math.cos(X)*Q:"M"+Z+",0l"+Math.cos(X)*Q+","+-Math.sin(X)*Q,ye={a:"M0,0l"+ce+",-"+re/2,b:"M0,0l-"+re/2+",-"+ce,c:"M0,0l-"+ce+","+re/2}[q];i.drawTicks(B,D,{vals:D.ticks==="inside"?K:H,layer:ee,path:me,transFn:V,crisp:!1}),i.drawGrid(B,D,{vals:K,layer:k.layers[q+"grid"],path:ye,transFn:V,crisp:!1}),i.drawLabels(B,D,{vals:H,layer:ee,transFn:V,labelFns:i.makeLabelFns(D,0,te)})};function h(D){return D.ticks+String(D.ticklen)+String(D.showticklabels)}var b=E.MINZOOM/2+.87,_="m-0.87,.5h"+b+"v3h-"+(b+5.2)+"l"+(b/2+2.6)+",-"+(b*.87+4.5)+"l2.6,1.5l-"+b/2+","+b*.87+"Z",I="m0.87,.5h-"+b+"v3h"+(b+5.2)+"l-"+(b/2+2.6)+",-"+(b*.87+4.5)+"l-2.6,1.5l"+b/2+","+b*.87+"Z",C="m0,1l"+b/2+","+b*.87+"l2.6,-1.5l-"+(b/2+2.6)+",-"+(b*.87+4.5)+"l-"+(b/2+2.6)+","+(b*.87+4.5)+"l2.6,1.5l"+b/2+",-"+b*.87+"Z",F="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",R=!0;A.clearOutline=function(){T(this.dragOptions),M(this.dragOptions.gd)},A.initInteractions=function(){var D=this,k=D.layers.plotbg.select("path").node(),B=D.graphDiv,O=B._fullLayout._zoomlayer,q,Y;this.dragOptions={element:k,gd:B,plotinfo:{id:D.id,domain:B._fullLayout[D.id].domain,xaxis:D.xaxis,yaxis:D.yaxis},subplot:D.id,prepFn:function(he,oe,le){D.dragOptions.xaxes=[D.xaxis],D.dragOptions.yaxes=[D.yaxis],q=B._fullLayout._invScaleX,Y=B._fullLayout._invScaleY;var ne=D.dragOptions.dragmode=B._fullLayout.dragmode;f(ne)?D.dragOptions.minDrag=1:D.dragOptions.minDrag=void 0,ne==="zoom"?(D.dragOptions.moveFn=Se,D.dragOptions.clickFn=re,D.dragOptions.doneFn=Ce,ce(he,oe,le)):ne==="pan"?(D.dragOptions.moveFn=Ue,D.dragOptions.clickFn=re,D.dragOptions.doneFn=xe,qe(),D.clearOutline(B)):(d(ne)||f(ne))&&o(he,oe,le,D.dragOptions,ne)}};var ee,te,ae,U,H,K,V,$,X,Z;function Q(he){var oe={};return oe[D.id+".aaxis.min"]=he.a,oe[D.id+".baxis.min"]=he.b,oe[D.id+".caxis.min"]=he.c,oe}function re(he,oe){var le=B._fullLayout.clickmode;z(B),he===2&&(B.emit("plotly_doubleclick",null),v.call("_guiRelayout",B,Q({a:0,b:0,c:0}))),le.indexOf("select")>-1&&he===1&&x(oe,B,[D.xaxis],[D.yaxis],D.id,D.dragOptions),le.indexOf("event")>-1&&c.click(B,oe,D.id)}function ce(he,oe,le){var ne=k.getBoundingClientRect();ee=oe-ne.left,te=le-ne.top,B._fullLayout._calcInverseTransform(B);var be=B._fullLayout._invTransform,Fe=w.apply3DTransform(be)(ee,te);ee=Fe[0],te=Fe[1],ae={a:D.aaxis.range[0],b:D.baxis.range[1],c:D.caxis.range[1]},H=ae,U=D.aaxis.range[1]-ae.a,K=e.color(D.graphDiv._fullLayout[D.id].bgcolor).luminosity(),V="M0,"+D.h+"L"+D.w/2+", 0L"+D.w+","+D.h+"Z",$=!1,X=O.append("path").attr("class","zoombox").attr("transform",S(D.x0,D.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",V),Z=O.append("path").attr("class","zoombox-corners").attr("transform",S(D.x0,D.y0)).style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),D.clearOutline(B)}function me(he,oe){return 1-oe/D.h}function ye(he,oe){return 1-(he+(D.h-oe)/Math.sqrt(3))/D.w}function Ae(he,oe){return(he-(D.h-oe)/Math.sqrt(3))/D.w}function Se(he,oe){var le=ee+he*q,ne=te+oe*Y,be=Math.max(0,Math.min(1,me(ee,te),me(le,ne))),Fe=Math.max(0,Math.min(1,ye(ee,te),ye(le,ne))),Ve=Math.max(0,Math.min(1,Ae(ee,te),Ae(le,ne))),je=(be/2+Ve)*D.w,ut=(1-be/2-Fe)*D.w,st=(je+ut)/2,yt=ut-je,At=(1-be)*D.h,Pt=At-yt/m;yt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Z.transition().style("opacity",1).duration(200),$=!0),B.emit("plotly_relayouting",Q(H))}function Ce(){z(B),H!==ae&&(v.call("_guiRelayout",B,Q(H)),R&&B.data&&B._context.showTips&&(w.notifier(l(B,"Double-click to zoom back out"),"long",B),R=!1))}function qe(){ae={a:D.aaxis.range[0],b:D.baxis.range[1],c:D.caxis.range[1]},H=ae}function Ue(he,oe){var le=he/D.xaxis._m,ne=oe/D.yaxis._m;H={a:ae.a-ne,b:ae.b+(le+ne)/2,c:ae.c-(le-ne)/2};var be=[H.a,H.b,H.c].sort(w.sorterAsc),Fe={a:be.indexOf(H.a),b:be.indexOf(H.b),c:be.indexOf(H.c)};be[0]<0&&(be[1]+be[0]/2<0?(be[2]+=be[0]+be[1],be[0]=be[1]=0):(be[2]+=be[0]/2,be[1]+=be[0]/2,be[0]=0),H={a:be[Fe.a],b:be[Fe.b],c:be[Fe.c]},oe=(ae.a-H.a)*D.yaxis._m,he=(ae.c-H.c-ae.b+H.b)*D.xaxis._m);var Ve=S(D.x0+he,D.y0+oe);D.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ve);var je=S(-he,-oe);D.clipDefRelative.select("path").attr("transform",je),D.aaxis.range=[H.a,D.sum-H.b-H.c],D.baxis.range=[D.sum-H.a-H.c,H.b],D.caxis.range=[D.sum-H.a-H.b,H.c],D.drawAxes(!1),D._hasClipOnAxisFalse&&D.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,D),B.emit("plotly_relayouting",Q(H))}function xe(){v.call("_guiRelayout",B,Q(H))}k.onmousemove=function(he){c.hover(B,he,D.id),B._fullLayout._lasthover=k,B._fullLayout._hoversubplot=D.id},k.onmouseout=function(he){B._dragging||s.unhover(B,he)},s.init(this.dragOptions)};function z(D){u.select(D).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),Jw=De({"src/plots/ternary/layout_attributes.js"(j,N){"use strict";var u=mc(),v=ql().attributes,w=hf(),S=Ul().overrideAll,l=Ji().extendFlat,e={title:{text:w.title.text,font:w.title.font},color:w.color,tickmode:w.minor.tickmode,nticks:l({},w.nticks,{dflt:6,min:1}),tick0:w.tick0,dtick:w.dtick,tickvals:w.tickvals,ticktext:w.ticktext,ticks:w.ticks,ticklen:w.ticklen,tickwidth:w.tickwidth,tickcolor:w.tickcolor,ticklabelstep:w.ticklabelstep,showticklabels:w.showticklabels,labelalias:w.labelalias,showtickprefix:w.showtickprefix,tickprefix:w.tickprefix,showticksuffix:w.showticksuffix,ticksuffix:w.ticksuffix,showexponent:w.showexponent,exponentformat:w.exponentformat,minexponent:w.minexponent,separatethousands:w.separatethousands,tickfont:w.tickfont,tickangle:w.tickangle,tickformat:w.tickformat,tickformatstops:w.tickformatstops,hoverformat:w.hoverformat,showline:l({},w.showline,{dflt:!0}),linecolor:w.linecolor,linewidth:w.linewidth,showgrid:l({},w.showgrid,{dflt:!0}),gridcolor:w.gridcolor,gridwidth:w.gridwidth,griddash:w.griddash,layer:w.layer,min:{valType:"number",dflt:0,min:0}},t=N.exports=S({domain:v({name:"ternary"}),bgcolor:{valType:"color",dflt:u.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}}}),Ip=De({"src/plots/subplot_defaults.js"(j,N){"use strict";var u=Ar(),v=ws(),w=ql().defaults;N.exports=function(l,e,t,a){var r=a.type,n=a.attributes,i=a.handleDefaults,s=a.partition||"x",c=e._subplots[r],p=c.length,f=p&&c[0].replace(/\d+$/,""),d,y;function o(E,g){return u.coerce(d,y,n,E,g)}for(var x=0;x=x&&(A.min=0,m.min=0,h.min=0,p.aaxis&&delete p.aaxis.min,p.baxis&&delete p.baxis.min,p.caxis&&delete p.caxis.min)}function c(p,f,d,y){var o=n[f._name];function x(b,_){return w.coerce(p,f,o,b,_)}x("uirevision",y.uirevision),f.type="linear";var M=x("color"),T=M!==o.color.dflt?M:d.font.color,E=f._name,g=E.charAt(0).toUpperCase(),A="Component "+g,m=x("title.text",A);f._hovertitle=m===A?m:g,w.coerceFont(x,"title.font",d.font,{overrideDflt:{size:w.bigFont(d.font.size),color:T}}),x("min"),a(p,f,x,"linear"),e(p,f,x,"linear"),l(p,f,x,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),t(p,f,x,{outerTicks:!0});var h=x("showticklabels");h&&(w.coerceFont(x,"tickfont",d.font,{overrideDflt:{color:T}}),x("tickangle"),x("tickformat")),r(p,f,x,{dfltColor:M,bgColor:d.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:o}),x("hoverformat"),x("layer")}}}),hD=De({"src/plots/ternary/index.js"(j){"use strict";var N=cD(),u=Bf().getSubplotCalcData,v=Ar().counterRegex,w="ternary";j.name=w;var S=j.attr="subplot";j.idRoot=w,j.idRegex=j.attrRegex=v(w);var l=j.attributes={};l[S]={valType:"subplotid",dflt:"ternary",editType:"calc"},j.layoutAttributes=Jw(),j.supplyLayoutDefaults=fD(),j.plot=function(t){for(var a=t._fullLayout,r=t.calcdata,n=a._subplots[w],i=0;i0){var E=t.xa,g=t.ya,A,m,h,b,_;p.orientation==="h"?(_=a,A="y",h=g,m="x",b=E):(_=r,A="x",h=E,m="y",b=g);var I=c[t.index];if(_>=I.span[0]&&_<=I.span[1]){var C=v.extendFlat({},t),F=b.c2p(_,!0),R=l.getKdeValue(I,p,_),z=l.getPositionOnKdePath(I,p,F),D=h._offset,k=h._length;C[A+"0"]=z[0],C[A+"1"]=z[1],C[m+"0"]=C[m+"1"]=F,C[m+"Label"]=m+": "+w.hoverLabelText(b,_,p[m+"hoverformat"])+", "+c[0].t.labels.kde+" "+R.toFixed(3);for(var B=0,O=0;O path").each(function(d){if(!d.isBlank){var y=f.marker;u.select(this).call(w.fill,d.mc||y.color).call(w.stroke,d.mlc||y.line.color).call(v.dashLine,y.line.dash,d.mlw||y.line.width).style("opacity",f.selectedpoints&&!d.selected?S:1)}}),t(p,f,r),p.selectAll(".regions").each(function(){u.select(this).selectAll("path").style("stroke-width",0).call(w.fill,f.connector.fillcolor)}),p.selectAll(".lines").each(function(){var d=f.connector.line;v.lineGroupStyle(u.select(this).selectAll("path"),d.width,d.color,d.dash)})})}N.exports={style:a}}}),PD=De({"src/traces/funnel/hover.js"(j,N){"use strict";var u=ii().opacity,v=_m().hoverOnBars,w=Ar().formatPercent;N.exports=function(e,t,a,r,n){var i=v(e,t,a,r,n);if(i){var s=i.cd,c=s[0].trace,p=c.orientation==="h",f=i.index,d=s[f],y=p?"x":"y";i[y+"LabelVal"]=d.s,i.percentInitial=d.begR,i.percentInitialLabel=w(d.begR,1),i.percentPrevious=d.difR,i.percentPreviousLabel=w(d.difR,1),i.percentTotal=d.sumR,i.percentTotalLabel=w(d.sumR,1);var o=d.hi||c.hoverinfo,x=[];if(o&&o!=="none"&&o!=="skip"){var M=o==="all",T=o.split("+"),E=function(g){return M||T.indexOf(g)!==-1};E("percent initial")&&x.push(i.percentInitialLabel+" of initial"),E("percent previous")&&x.push(i.percentPreviousLabel+" of previous"),E("percent total")&&x.push(i.percentTotalLabel+" of total")}return i.extraText=x.join("
"),i.color=S(c,d),[i]}};function S(l,e){var t=l.marker,a=e.mc||t.color,r=e.mlc||t.line.color,n=e.mlw||t.line.width;if(u(a))return a;if(u(r)&&n)return r}}}),RD=De({"src/traces/funnel/event_data.js"(j,N){"use strict";N.exports=function(v,w){return v.x="xVal"in w?w.xVal:w.x,v.y="yVal"in w?w.yVal:w.y,"percentInitial"in w&&(v.percentInitial=w.percentInitial),"percentPrevious"in w&&(v.percentPrevious=w.percentPrevious),"percentTotal"in w&&(v.percentTotal=w.percentTotal),w.xa&&(v.xaxis=w.xa),w.ya&&(v.yaxis=w.ya),v}}}),ID=De({"src/traces/funnel/index.js"(j,N){"use strict";N.exports={attributes:t5(),layoutAttributes:r5(),supplyDefaults:a5().supplyDefaults,crossTraceDefaults:a5().crossTraceDefaults,supplyLayoutDefaults:MD(),calc:ED(),crossTraceCalc:kD(),plot:CD(),style:LD().style,hoverPoints:PD(),eventData:RD(),selectPoints:xm(),moduleType:"trace",name:"funnel",basePlotModule:Hu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),DD=De({"lib/funnel.js"(j,N){"use strict";N.exports=ID()}}),FD=De({"src/traces/waterfall/constants.js"(j,N){"use strict";N.exports={eventDataKeys:["initial","delta","final"]}}}),n5=De({"src/traces/waterfall/attributes.js"(j,N){"use strict";var u=Rd(),v=bu().line,w=Bs(),S=Zl().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Is(),a=FD(),r=Ji().extendFlat,n=ii();function i(s){return{marker:{color:r({},u.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},u.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},u.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}N.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:u.x,x0:u.x0,dx:u.dx,y:u.y,y0:u.y0,dy:u.dy,xperiod:u.xperiod,yperiod:u.yperiod,xperiod0:u.xperiod0,yperiod0:u.yperiod0,xperiodalignment:u.xperiodalignment,yperiodalignment:u.yperiodalignment,xhoverformat:S("x"),yhoverformat:S("y"),hovertext:u.hovertext,hovertemplate:l({},{keys:a.eventDataKeys}),hovertemplatefallback:t(),hoverinfo:r({},w.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:a.eventDataKeys.concat(["label"])}),texttemplatefallback:t({editType:"plot"}),text:u.text,textposition:u.textposition,insidetextanchor:u.insidetextanchor,textangle:u.textangle,textfont:u.textfont,insidetextfont:u.insidetextfont,outsidetextfont:u.outsidetextfont,constraintext:u.constraintext,cliponaxis:u.cliponaxis,orientation:u.orientation,offset:u.offset,width:u.width,increasing:i("increasing"),decreasing:i("decreasing"),totals:i("intermediate sums and total"),connector:{line:{color:r({},v.color,{dflt:n.defaultLine}),width:r({},v.width,{editType:"plot"}),dash:v.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:u.offsetgroup,alignmentgroup:u.alignmentgroup,zorder:u.zorder}}}),i5=De({"src/traces/waterfall/layout_attributes.js"(j,N){"use strict";N.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"}}}}),Am=De({"src/constants/delta.js"(j,N){"use strict";N.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),o5=De({"src/traces/waterfall/defaults.js"(j,N){"use strict";var u=Ar(),v=Cp(),w=Bh().handleText,S=kp(),l=ud(),e=n5(),t=ii(),a=Am(),r=a.INCREASING.COLOR,n=a.DECREASING.COLOR,i="#4499FF";function s(f,d,y){f(d+".marker.color",y),f(d+".marker.line.color",t.defaultLine),f(d+".marker.line.width")}function c(f,d,y,o){function x(A,m){return u.coerce(f,d,e,A,m)}var M=S(f,d,o,x);if(!M){d.visible=!1;return}l(f,d,o,x),x("xhoverformat"),x("yhoverformat"),x("measure"),x("orientation",d.x&&!d.y?"h":"v"),x("base"),x("offset"),x("width"),x("text"),x("hovertext"),x("hovertemplate"),x("hovertemplatefallback");var T=x("textposition");w(f,d,o,x,T,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),d.textposition!=="none"&&(x("texttemplate"),x("texttemplatefallback"),d.texttemplate||x("textinfo")),s(x,"increasing",r),s(x,"decreasing",n),s(x,"totals",i);var E=x("connector.visible");if(E){x("connector.mode");var g=x("connector.line.width");g&&(x("connector.line.color"),x("connector.line.dash"))}x("zorder")}function p(f,d){var y,o;function x(T){return u.coerce(o._input,o,e,T)}if(d.waterfallmode==="group")for(var M=0;M0&&(x?_+="M"+h[0]+","+b[1]+"V"+b[0]:_+="M"+h[1]+","+b[0]+"H"+h[0]),M!=="between"&&(g.isSum||A path").each(function(d){if(!d.isBlank){var y=f[d.dir].marker;u.select(this).call(w.fill,y.color).call(w.stroke,y.line.color).call(v.dashLine,y.line.dash,y.line.width).style("opacity",f.selectedpoints&&!d.selected?S:1)}}),t(p,f,r),p.selectAll(".lines").each(function(){var d=f.connector.line;v.lineGroupStyle(u.select(this).selectAll("path"),d.width,d.color,d.dash)})})}N.exports={style:a}}}),UD=De({"src/traces/waterfall/hover.js"(j,N){"use strict";var u=Vi().hoverLabelText,v=ii().opacity,w=_m().hoverOnBars,S=Am(),l={increasing:S.INCREASING.SYMBOL,decreasing:S.DECREASING.SYMBOL};N.exports=function(a,r,n,i,s){var c=w(a,r,n,i,s);if(!c)return;var p=c.cd,f=p[0].trace,d=f.orientation==="h",y=d?"x":"y",o=d?a.xa:a.ya;function x(I){return u(o,I,f[y+"hoverformat"])}var M=c.index,T=p[M],E=T.isSum?T.b+T.s:T.rawS;c.initial=T.b+T.s-E,c.delta=E,c.final=c.initial+c.delta;var g=x(Math.abs(c.delta));c.deltaLabel=E<0?"("+g+")":g,c.finalLabel=x(c.final),c.initialLabel=x(c.initial);var A=T.hi||f.hoverinfo,m=[];if(A&&A!=="none"&&A!=="skip"){var h=A==="all",b=A.split("+"),_=function(I){return h||b.indexOf(I)!==-1};T.isSum||(_("final")&&(d?!_("x"):!_("y"))&&m.push(c.finalLabel),_("delta")&&(E<0?m.push(c.deltaLabel+" "+l.decreasing):m.push(c.deltaLabel+" "+l.increasing)),_("initial")&&m.push("Initial: "+c.initialLabel))}return m.length&&(c.extraText=m.join("
")),c.color=e(f,T),[c]};function e(t,a){var r=t[a.dir].marker,n=r.color,i=r.line.color,s=r.line.width;if(v(n))return n;if(v(i)&&s)return i}}}),qD=De({"src/traces/waterfall/event_data.js"(j,N){"use strict";N.exports=function(v,w){return v.x="xVal"in w?w.xVal:w.x,v.y="yVal"in w?w.yVal:w.y,"initial"in w&&(v.initial=w.initial),"delta"in w&&(v.delta=w.delta),"final"in w&&(v.final=w.final),w.xa&&(v.xaxis=w.xa),w.ya&&(v.yaxis=w.ya),v}}}),GD=De({"src/traces/waterfall/index.js"(j,N){"use strict";N.exports={attributes:n5(),layoutAttributes:i5(),supplyDefaults:o5().supplyDefaults,crossTraceDefaults:o5().crossTraceDefaults,supplyLayoutDefaults:zD(),calc:BD(),crossTraceCalc:OD(),plot:ND(),style:jD().style,hoverPoints:UD(),eventData:qD(),selectPoints:xm(),moduleType:"trace",name:"waterfall",basePlotModule:Hu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),VD=De({"lib/waterfall.js"(j,N){"use strict";N.exports=GD()}}),Tm=De({"src/traces/image/constants.js"(j,N){"use strict";N.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(u){return u.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(u){return u.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(u){return u.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(u){var v=u.slice(0,3);return v[1]=v[1]+"%",v[2]=v[2]+"%",v},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(u){var v=u.slice(0,4);return v[1]=v[1]+"%",v[2]=v[2]+"%",v},suffix:["\xB0","%","%",""]}}}}}),Nx={};Zo(Nx,{default:()=>h5});var s5,l5,jx,u5,c5,Ux,qx,Gx,f5,h5,d5=di({"src/traces/image/attributes.ts"(){"use strict";s5=Du(Ji()),l5=Du(Bs()),jx=Du(Is()),u5=Du(bu()),c5=Du(Tm()),Ux=["rgb","rgba","rgba256","hsl","hsla"],qx=[],Gx=[];for(let j of Ux){let N=c5.colormodel[j];qx.push(`For the \`${j}\` colormodel, it is [${(N.zminDflt||N.min).join(", ")}].`),Gx.push(`For the \`${j}\` colormodel, it is [${(N.zmaxDflt||N.max).join(", ")}].`)}f5={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:Ux,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",qx.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",Gx.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,s5.extendFlat)({},l5.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,jx.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,jx.templatefallbackAttrs)(),zorder:u5.zorder},h5=f5}}),HD=De({"src/traces/image/defaults.js"(j,N){"use strict";var u=Ar(),v=(d5(),ts(Nx)).default,w=Tm(),S=$d().IMAGE_URL_PREFIX;N.exports=function(e,t){function a(i,s){return u.coerce(e,t,v,i,s)}a("source"),t.source&&!t.source.match(S)&&delete t.source,t._hasSource=!!t.source;var r=a("z");if(t._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}a("x0"),a("y0"),a("dx"),a("dy");var n;t._hasZ?(a("colormodel","rgb"),n=w.colormodel[t.colormodel],a("zmin",n.zminDflt||n.min),a("zmax",n.zmaxDflt||n.max)):t._hasSource&&(t.colormodel="rgba256",n=w.colormodel[t.colormodel],t.zmin=n.zminDflt,t.zmax=n.zmaxDflt),a("zsmooth"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),t._length=null,a("zorder")}}}),Kd=De({"node_modules/inherits/inherits_browser.js"(j,N){typeof Object.create=="function"?N.exports=function(v,w){w&&(v.super_=w,v.prototype=Object.create(w.prototype,{constructor:{value:v,enumerable:!1,writable:!0,configurable:!0}}))}:N.exports=function(v,w){if(w){v.super_=w;var S=function(){};S.prototype=w.prototype,v.prototype=new S,v.prototype.constructor=v}}}}),v5=De({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/stream-browser.js"(j,N){N.exports=Tp().EventEmitter}}),WD=De({"node_modules/base64-js/index.js"(j){"use strict";j.byteLength=t,j.toByteArray=r,j.fromByteArray=s;var N=[],u=[],v=typeof Uint8Array<"u"?Uint8Array:Array,w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(S=0,l=w.length;S0)throw new Error("Invalid string. Length must be a multiple of 4");var f=c.indexOf("=");f===-1&&(f=p);var d=f===p?0:4-f%4;return[f,d]}function t(c){var p=e(c),f=p[0],d=p[1];return(f+d)*3/4-d}function a(c,p,f){return(p+f)*3/4-f}function r(c){var p,f=e(c),d=f[0],y=f[1],o=new v(a(c,d,y)),x=0,M=y>0?d-4:d,T;for(T=0;T>16&255,o[x++]=p>>8&255,o[x++]=p&255;return y===2&&(p=u[c.charCodeAt(T)]<<2|u[c.charCodeAt(T+1)]>>4,o[x++]=p&255),y===1&&(p=u[c.charCodeAt(T)]<<10|u[c.charCodeAt(T+1)]<<4|u[c.charCodeAt(T+2)]>>2,o[x++]=p>>8&255,o[x++]=p&255),o}function n(c){return N[c>>18&63]+N[c>>12&63]+N[c>>6&63]+N[c&63]}function i(c,p,f){for(var d,y=[],o=p;oM?M:x+o));return d===1?(p=c[f-1],y.push(N[p>>2]+N[p<<4&63]+"==")):d===2&&(p=(c[f-2]<<8)+c[f-1],y.push(N[p>>10]+N[p>>4&63]+N[p<<2&63]+"=")),y.join("")}}}),YD=De({"node_modules/ieee754/index.js"(j){j.read=function(N,u,v,w,S){var l,e,t=S*8-w-1,a=(1<>1,n=-7,i=v?S-1:0,s=v?-1:1,c=N[u+i];for(i+=s,l=c&(1<<-n)-1,c>>=-n,n+=t;n>0;l=l*256+N[u+i],i+=s,n-=8);for(e=l&(1<<-n)-1,l>>=-n,n+=w;n>0;e=e*256+N[u+i],i+=s,n-=8);if(l===0)l=1-r;else{if(l===a)return e?NaN:(c?-1:1)*(1/0);e=e+Math.pow(2,w),l=l-r}return(c?-1:1)*e*Math.pow(2,l-w)},j.write=function(N,u,v,w,S,l){var e,t,a,r=l*8-S-1,n=(1<>1,s=S===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=w?0:l-1,p=w?1:-1,f=u<0||u===0&&1/u<0?1:0;for(u=Math.abs(u),isNaN(u)||u===1/0?(t=isNaN(u)?1:0,e=n):(e=Math.floor(Math.log(u)/Math.LN2),u*(a=Math.pow(2,-e))<1&&(e--,a*=2),e+i>=1?u+=s/a:u+=s*Math.pow(2,1-i),u*a>=2&&(e++,a/=2),e+i>=n?(t=0,e=n):e+i>=1?(t=(u*a-1)*Math.pow(2,S),e=e+i):(t=u*Math.pow(2,i-1)*Math.pow(2,S),e=0));S>=8;N[v+c]=t&255,c+=p,t/=256,S-=8);for(e=e<0;N[v+c]=e&255,c+=p,e/=256,r-=8);N[v+c-p]|=f*128}}}),Dp=De({"node_modules/buffer/index.js"(j){"use strict";var N=WD(),u=YD(),v=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;j.Buffer=e,j.SlowBuffer=y,j.INSPECT_MAX_BYTES=50;var w=2147483647;j.kMaxLength=w,e.TYPED_ARRAY_SUPPORT=S(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function S(){try{let oe=new Uint8Array(1),le={foo:function(){return 42}};return Object.setPrototypeOf(le,Uint8Array.prototype),Object.setPrototypeOf(oe,le),oe.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function l(oe){if(oe>w)throw new RangeError('The value "'+oe+'" is invalid for option "size"');let le=new Uint8Array(oe);return Object.setPrototypeOf(le,e.prototype),le}function e(oe,le,ne){if(typeof oe=="number"){if(typeof le=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return n(oe)}return t(oe,le,ne)}e.poolSize=8192;function t(oe,le,ne){if(typeof oe=="string")return i(oe,le);if(ArrayBuffer.isView(oe))return c(oe);if(oe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof oe);if(Ce(oe,ArrayBuffer)||oe&&Ce(oe.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ce(oe,SharedArrayBuffer)||oe&&Ce(oe.buffer,SharedArrayBuffer)))return p(oe,le,ne);if(typeof oe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let be=oe.valueOf&&oe.valueOf();if(be!=null&&be!==oe)return e.from(be,le,ne);let Fe=f(oe);if(Fe)return Fe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof oe[Symbol.toPrimitive]=="function")return e.from(oe[Symbol.toPrimitive]("string"),le,ne);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof oe)}e.from=function(oe,le,ne){return t(oe,le,ne)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function a(oe){if(typeof oe!="number")throw new TypeError('"size" argument must be of type number');if(oe<0)throw new RangeError('The value "'+oe+'" is invalid for option "size"')}function r(oe,le,ne){return a(oe),oe<=0?l(oe):le!==void 0?typeof ne=="string"?l(oe).fill(le,ne):l(oe).fill(le):l(oe)}e.alloc=function(oe,le,ne){return r(oe,le,ne)};function n(oe){return a(oe),l(oe<0?0:d(oe)|0)}e.allocUnsafe=function(oe){return n(oe)},e.allocUnsafeSlow=function(oe){return n(oe)};function i(oe,le){if((typeof le!="string"||le==="")&&(le="utf8"),!e.isEncoding(le))throw new TypeError("Unknown encoding: "+le);let ne=o(oe,le)|0,be=l(ne),Fe=be.write(oe,le);return Fe!==ne&&(be=be.slice(0,Fe)),be}function s(oe){let le=oe.length<0?0:d(oe.length)|0,ne=l(le);for(let be=0;be=w)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+w.toString(16)+" bytes");return oe|0}function y(oe){return+oe!=oe&&(oe=0),e.alloc(+oe)}e.isBuffer=function(le){return le!=null&&le._isBuffer===!0&&le!==e.prototype},e.compare=function(le,ne){if(Ce(le,Uint8Array)&&(le=e.from(le,le.offset,le.byteLength)),Ce(ne,Uint8Array)&&(ne=e.from(ne,ne.offset,ne.byteLength)),!e.isBuffer(le)||!e.isBuffer(ne))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(le===ne)return 0;let be=le.length,Fe=ne.length;for(let Ve=0,je=Math.min(be,Fe);VeFe.length?(e.isBuffer(je)||(je=e.from(je)),je.copy(Fe,Ve)):Uint8Array.prototype.set.call(Fe,je,Ve);else if(e.isBuffer(je))je.copy(Fe,Ve);else throw new TypeError('"list" argument must be an Array of Buffers');Ve+=je.length}return Fe};function o(oe,le){if(e.isBuffer(oe))return oe.length;if(ArrayBuffer.isView(oe)||Ce(oe,ArrayBuffer))return oe.byteLength;if(typeof oe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof oe);let ne=oe.length,be=arguments.length>2&&arguments[2]===!0;if(!be&&ne===0)return 0;let Fe=!1;for(;;)switch(le){case"ascii":case"latin1":case"binary":return ne;case"utf8":case"utf-8":return ce(oe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ne*2;case"hex":return ne>>>1;case"base64":return Ae(oe).length;default:if(Fe)return be?-1:ce(oe).length;le=(""+le).toLowerCase(),Fe=!0}}e.byteLength=o;function x(oe,le,ne){let be=!1;if((le===void 0||le<0)&&(le=0),le>this.length||((ne===void 0||ne>this.length)&&(ne=this.length),ne<=0)||(ne>>>=0,le>>>=0,ne<=le))return"";for(oe||(oe="utf8");;)switch(oe){case"hex":return D(this,le,ne);case"utf8":case"utf-8":return I(this,le,ne);case"ascii":return R(this,le,ne);case"latin1":case"binary":return z(this,le,ne);case"base64":return _(this,le,ne);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,le,ne);default:if(be)throw new TypeError("Unknown encoding: "+oe);oe=(oe+"").toLowerCase(),be=!0}}e.prototype._isBuffer=!0;function M(oe,le,ne){let be=oe[le];oe[le]=oe[ne],oe[ne]=be}e.prototype.swap16=function(){let le=this.length;if(le%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let ne=0;nene&&(le+=" ... "),""},v&&(e.prototype[v]=e.prototype.inspect),e.prototype.compare=function(le,ne,be,Fe,Ve){if(Ce(le,Uint8Array)&&(le=e.from(le,le.offset,le.byteLength)),!e.isBuffer(le))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof le);if(ne===void 0&&(ne=0),be===void 0&&(be=le?le.length:0),Fe===void 0&&(Fe=0),Ve===void 0&&(Ve=this.length),ne<0||be>le.length||Fe<0||Ve>this.length)throw new RangeError("out of range index");if(Fe>=Ve&&ne>=be)return 0;if(Fe>=Ve)return-1;if(ne>=be)return 1;if(ne>>>=0,be>>>=0,Fe>>>=0,Ve>>>=0,this===le)return 0;let je=Ve-Fe,ut=be-ne,st=Math.min(je,ut),yt=this.slice(Fe,Ve),At=le.slice(ne,be);for(let Pt=0;Pt2147483647?ne=2147483647:ne<-2147483648&&(ne=-2147483648),ne=+ne,qe(ne)&&(ne=Fe?0:oe.length-1),ne<0&&(ne=oe.length+ne),ne>=oe.length){if(Fe)return-1;ne=oe.length-1}else if(ne<0)if(Fe)ne=0;else return-1;if(typeof le=="string"&&(le=e.from(le,be)),e.isBuffer(le))return le.length===0?-1:E(oe,le,ne,be,Fe);if(typeof le=="number")return le=le&255,typeof Uint8Array.prototype.indexOf=="function"?Fe?Uint8Array.prototype.indexOf.call(oe,le,ne):Uint8Array.prototype.lastIndexOf.call(oe,le,ne):E(oe,[le],ne,be,Fe);throw new TypeError("val must be string, number or Buffer")}function E(oe,le,ne,be,Fe){let Ve=1,je=oe.length,ut=le.length;if(be!==void 0&&(be=String(be).toLowerCase(),be==="ucs2"||be==="ucs-2"||be==="utf16le"||be==="utf-16le")){if(oe.length<2||le.length<2)return-1;Ve=2,je/=2,ut/=2,ne/=2}function st(At,Pt){return Ve===1?At[Pt]:At.readUInt16BE(Pt*Ve)}let yt;if(Fe){let At=-1;for(yt=ne;ytje&&(ne=je-ut),yt=ne;yt>=0;yt--){let At=!0;for(let Pt=0;PtFe&&(be=Fe)):be=Fe;let Ve=le.length;be>Ve/2&&(be=Ve/2);let je;for(je=0;je>>0,isFinite(be)?(be=be>>>0,Fe===void 0&&(Fe="utf8")):(Fe=be,be=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Ve=this.length-ne;if((be===void 0||be>Ve)&&(be=Ve),le.length>0&&(be<0||ne<0)||ne>this.length)throw new RangeError("Attempt to write outside buffer bounds");Fe||(Fe="utf8");let je=!1;for(;;)switch(Fe){case"hex":return g(this,le,ne,be);case"utf8":case"utf-8":return A(this,le,ne,be);case"ascii":case"latin1":case"binary":return m(this,le,ne,be);case"base64":return h(this,le,ne,be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return b(this,le,ne,be);default:if(je)throw new TypeError("Unknown encoding: "+Fe);Fe=(""+Fe).toLowerCase(),je=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function _(oe,le,ne){return le===0&&ne===oe.length?N.fromByteArray(oe):N.fromByteArray(oe.slice(le,ne))}function I(oe,le,ne){ne=Math.min(oe.length,ne);let be=[],Fe=le;for(;Fe239?4:Ve>223?3:Ve>191?2:1;if(Fe+ut<=ne){let st,yt,At,Pt;switch(ut){case 1:Ve<128&&(je=Ve);break;case 2:st=oe[Fe+1],(st&192)===128&&(Pt=(Ve&31)<<6|st&63,Pt>127&&(je=Pt));break;case 3:st=oe[Fe+1],yt=oe[Fe+2],(st&192)===128&&(yt&192)===128&&(Pt=(Ve&15)<<12|(st&63)<<6|yt&63,Pt>2047&&(Pt<55296||Pt>57343)&&(je=Pt));break;case 4:st=oe[Fe+1],yt=oe[Fe+2],At=oe[Fe+3],(st&192)===128&&(yt&192)===128&&(At&192)===128&&(Pt=(Ve&15)<<18|(st&63)<<12|(yt&63)<<6|At&63,Pt>65535&&Pt<1114112&&(je=Pt))}}je===null?(je=65533,ut=1):je>65535&&(je-=65536,be.push(je>>>10&1023|55296),je=56320|je&1023),be.push(je),Fe+=ut}return F(be)}var C=4096;function F(oe){let le=oe.length;if(le<=C)return String.fromCharCode.apply(String,oe);let ne="",be=0;for(;bebe)&&(ne=be);let Fe="";for(let Ve=le;Vebe&&(le=be),ne<0?(ne+=be,ne<0&&(ne=0)):ne>be&&(ne=be),nene)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(le,ne,be){le=le>>>0,ne=ne>>>0,be||B(le,ne,this.length);let Fe=this[le],Ve=1,je=0;for(;++je>>0,ne=ne>>>0,be||B(le,ne,this.length);let Fe=this[le+--ne],Ve=1;for(;ne>0&&(Ve*=256);)Fe+=this[le+--ne]*Ve;return Fe},e.prototype.readUint8=e.prototype.readUInt8=function(le,ne){return le=le>>>0,ne||B(le,1,this.length),this[le]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(le,ne){return le=le>>>0,ne||B(le,2,this.length),this[le]|this[le+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(le,ne){return le=le>>>0,ne||B(le,2,this.length),this[le]<<8|this[le+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(le,ne){return le=le>>>0,ne||B(le,4,this.length),(this[le]|this[le+1]<<8|this[le+2]<<16)+this[le+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(le,ne){return le=le>>>0,ne||B(le,4,this.length),this[le]*16777216+(this[le+1]<<16|this[le+2]<<8|this[le+3])},e.prototype.readBigUInt64LE=xe(function(le){le=le>>>0,X(le,"offset");let ne=this[le],be=this[le+7];(ne===void 0||be===void 0)&&Z(le,this.length-8);let Fe=ne+this[++le]*2**8+this[++le]*2**16+this[++le]*2**24,Ve=this[++le]+this[++le]*2**8+this[++le]*2**16+be*2**24;return BigInt(Fe)+(BigInt(Ve)<>>0,X(le,"offset");let ne=this[le],be=this[le+7];(ne===void 0||be===void 0)&&Z(le,this.length-8);let Fe=ne*2**24+this[++le]*2**16+this[++le]*2**8+this[++le],Ve=this[++le]*2**24+this[++le]*2**16+this[++le]*2**8+be;return(BigInt(Fe)<>>0,ne=ne>>>0,be||B(le,ne,this.length);let Fe=this[le],Ve=1,je=0;for(;++je=Ve&&(Fe-=Math.pow(2,8*ne)),Fe},e.prototype.readIntBE=function(le,ne,be){le=le>>>0,ne=ne>>>0,be||B(le,ne,this.length);let Fe=ne,Ve=1,je=this[le+--Fe];for(;Fe>0&&(Ve*=256);)je+=this[le+--Fe]*Ve;return Ve*=128,je>=Ve&&(je-=Math.pow(2,8*ne)),je},e.prototype.readInt8=function(le,ne){return le=le>>>0,ne||B(le,1,this.length),this[le]&128?(255-this[le]+1)*-1:this[le]},e.prototype.readInt16LE=function(le,ne){le=le>>>0,ne||B(le,2,this.length);let be=this[le]|this[le+1]<<8;return be&32768?be|4294901760:be},e.prototype.readInt16BE=function(le,ne){le=le>>>0,ne||B(le,2,this.length);let be=this[le+1]|this[le]<<8;return be&32768?be|4294901760:be},e.prototype.readInt32LE=function(le,ne){return le=le>>>0,ne||B(le,4,this.length),this[le]|this[le+1]<<8|this[le+2]<<16|this[le+3]<<24},e.prototype.readInt32BE=function(le,ne){return le=le>>>0,ne||B(le,4,this.length),this[le]<<24|this[le+1]<<16|this[le+2]<<8|this[le+3]},e.prototype.readBigInt64LE=xe(function(le){le=le>>>0,X(le,"offset");let ne=this[le],be=this[le+7];(ne===void 0||be===void 0)&&Z(le,this.length-8);let Fe=this[le+4]+this[le+5]*2**8+this[le+6]*2**16+(be<<24);return(BigInt(Fe)<>>0,X(le,"offset");let ne=this[le],be=this[le+7];(ne===void 0||be===void 0)&&Z(le,this.length-8);let Fe=(ne<<24)+this[++le]*2**16+this[++le]*2**8+this[++le];return(BigInt(Fe)<>>0,ne||B(le,4,this.length),u.read(this,le,!0,23,4)},e.prototype.readFloatBE=function(le,ne){return le=le>>>0,ne||B(le,4,this.length),u.read(this,le,!1,23,4)},e.prototype.readDoubleLE=function(le,ne){return le=le>>>0,ne||B(le,8,this.length),u.read(this,le,!0,52,8)},e.prototype.readDoubleBE=function(le,ne){return le=le>>>0,ne||B(le,8,this.length),u.read(this,le,!1,52,8)};function O(oe,le,ne,be,Fe,Ve){if(!e.isBuffer(oe))throw new TypeError('"buffer" argument must be a Buffer instance');if(le>Fe||leoe.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(le,ne,be,Fe){if(le=+le,ne=ne>>>0,be=be>>>0,!Fe){let ut=Math.pow(2,8*be)-1;O(this,le,ne,be,ut,0)}let Ve=1,je=0;for(this[ne]=le&255;++je>>0,be=be>>>0,!Fe){let ut=Math.pow(2,8*be)-1;O(this,le,ne,be,ut,0)}let Ve=be-1,je=1;for(this[ne+Ve]=le&255;--Ve>=0&&(je*=256);)this[ne+Ve]=le/je&255;return ne+be},e.prototype.writeUint8=e.prototype.writeUInt8=function(le,ne,be){return le=+le,ne=ne>>>0,be||O(this,le,ne,1,255,0),this[ne]=le&255,ne+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(le,ne,be){return le=+le,ne=ne>>>0,be||O(this,le,ne,2,65535,0),this[ne]=le&255,this[ne+1]=le>>>8,ne+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(le,ne,be){return le=+le,ne=ne>>>0,be||O(this,le,ne,2,65535,0),this[ne]=le>>>8,this[ne+1]=le&255,ne+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(le,ne,be){return le=+le,ne=ne>>>0,be||O(this,le,ne,4,4294967295,0),this[ne+3]=le>>>24,this[ne+2]=le>>>16,this[ne+1]=le>>>8,this[ne]=le&255,ne+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(le,ne,be){return le=+le,ne=ne>>>0,be||O(this,le,ne,4,4294967295,0),this[ne]=le>>>24,this[ne+1]=le>>>16,this[ne+2]=le>>>8,this[ne+3]=le&255,ne+4};function q(oe,le,ne,be,Fe){$(le,be,Fe,oe,ne,7);let Ve=Number(le&BigInt(4294967295));oe[ne++]=Ve,Ve=Ve>>8,oe[ne++]=Ve,Ve=Ve>>8,oe[ne++]=Ve,Ve=Ve>>8,oe[ne++]=Ve;let je=Number(le>>BigInt(32)&BigInt(4294967295));return oe[ne++]=je,je=je>>8,oe[ne++]=je,je=je>>8,oe[ne++]=je,je=je>>8,oe[ne++]=je,ne}function Y(oe,le,ne,be,Fe){$(le,be,Fe,oe,ne,7);let Ve=Number(le&BigInt(4294967295));oe[ne+7]=Ve,Ve=Ve>>8,oe[ne+6]=Ve,Ve=Ve>>8,oe[ne+5]=Ve,Ve=Ve>>8,oe[ne+4]=Ve;let je=Number(le>>BigInt(32)&BigInt(4294967295));return oe[ne+3]=je,je=je>>8,oe[ne+2]=je,je=je>>8,oe[ne+1]=je,je=je>>8,oe[ne]=je,ne+8}e.prototype.writeBigUInt64LE=xe(function(le,ne=0){return q(this,le,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=xe(function(le,ne=0){return Y(this,le,ne,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(le,ne,be,Fe){if(le=+le,ne=ne>>>0,!Fe){let st=Math.pow(2,8*be-1);O(this,le,ne,be,st-1,-st)}let Ve=0,je=1,ut=0;for(this[ne]=le&255;++Ve>0)-ut&255;return ne+be},e.prototype.writeIntBE=function(le,ne,be,Fe){if(le=+le,ne=ne>>>0,!Fe){let st=Math.pow(2,8*be-1);O(this,le,ne,be,st-1,-st)}let Ve=be-1,je=1,ut=0;for(this[ne+Ve]=le&255;--Ve>=0&&(je*=256);)le<0&&ut===0&&this[ne+Ve+1]!==0&&(ut=1),this[ne+Ve]=(le/je>>0)-ut&255;return ne+be},e.prototype.writeInt8=function(le,ne,be){return le=+le,ne=ne>>>0,be||O(this,le,ne,1,127,-128),le<0&&(le=255+le+1),this[ne]=le&255,ne+1},e.prototype.writeInt16LE=function(le,ne,be){return le=+le,ne=ne>>>0,be||O(this,le,ne,2,32767,-32768),this[ne]=le&255,this[ne+1]=le>>>8,ne+2},e.prototype.writeInt16BE=function(le,ne,be){return le=+le,ne=ne>>>0,be||O(this,le,ne,2,32767,-32768),this[ne]=le>>>8,this[ne+1]=le&255,ne+2},e.prototype.writeInt32LE=function(le,ne,be){return le=+le,ne=ne>>>0,be||O(this,le,ne,4,2147483647,-2147483648),this[ne]=le&255,this[ne+1]=le>>>8,this[ne+2]=le>>>16,this[ne+3]=le>>>24,ne+4},e.prototype.writeInt32BE=function(le,ne,be){return le=+le,ne=ne>>>0,be||O(this,le,ne,4,2147483647,-2147483648),le<0&&(le=4294967295+le+1),this[ne]=le>>>24,this[ne+1]=le>>>16,this[ne+2]=le>>>8,this[ne+3]=le&255,ne+4},e.prototype.writeBigInt64LE=xe(function(le,ne=0){return q(this,le,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=xe(function(le,ne=0){return Y(this,le,ne,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function ee(oe,le,ne,be,Fe,Ve){if(ne+be>oe.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("Index out of range")}function te(oe,le,ne,be,Fe){return le=+le,ne=ne>>>0,Fe||ee(oe,le,ne,4,34028234663852886e22,-34028234663852886e22),u.write(oe,le,ne,be,23,4),ne+4}e.prototype.writeFloatLE=function(le,ne,be){return te(this,le,ne,!0,be)},e.prototype.writeFloatBE=function(le,ne,be){return te(this,le,ne,!1,be)};function ae(oe,le,ne,be,Fe){return le=+le,ne=ne>>>0,Fe||ee(oe,le,ne,8,17976931348623157e292,-17976931348623157e292),u.write(oe,le,ne,be,52,8),ne+8}e.prototype.writeDoubleLE=function(le,ne,be){return ae(this,le,ne,!0,be)},e.prototype.writeDoubleBE=function(le,ne,be){return ae(this,le,ne,!1,be)},e.prototype.copy=function(le,ne,be,Fe){if(!e.isBuffer(le))throw new TypeError("argument should be a Buffer");if(be||(be=0),!Fe&&Fe!==0&&(Fe=this.length),ne>=le.length&&(ne=le.length),ne||(ne=0),Fe>0&&Fe=this.length)throw new RangeError("Index out of range");if(Fe<0)throw new RangeError("sourceEnd out of bounds");Fe>this.length&&(Fe=this.length),le.length-ne>>0,be=be===void 0?this.length:be>>>0,le||(le=0);let Ve;if(typeof le=="number")for(Ve=ne;Ve2**32?Fe=K(String(ne)):typeof ne=="bigint"&&(Fe=String(ne),(ne>BigInt(2)**BigInt(32)||ne<-(BigInt(2)**BigInt(32)))&&(Fe=K(Fe)),Fe+="n"),be+=` It must be ${le}. Received ${Fe}`,be},RangeError);function K(oe){let le="",ne=oe.length,be=oe[0]==="-"?1:0;for(;ne>=be+4;ne-=3)le=`_${oe.slice(ne-3,ne)}${le}`;return`${oe.slice(0,ne)}${le}`}function V(oe,le,ne){X(le,"offset"),(oe[le]===void 0||oe[le+ne]===void 0)&&Z(le,oe.length-(ne+1))}function $(oe,le,ne,be,Fe,Ve){if(oe>ne||oe3?le===0||le===BigInt(0)?ut=`>= 0${je} and < 2${je} ** ${(Ve+1)*8}${je}`:ut=`>= -(2${je} ** ${(Ve+1)*8-1}${je}) and < 2 ** ${(Ve+1)*8-1}${je}`:ut=`>= ${le}${je} and <= ${ne}${je}`,new U.ERR_OUT_OF_RANGE("value",ut,oe)}V(be,Fe,Ve)}function X(oe,le){if(typeof oe!="number")throw new U.ERR_INVALID_ARG_TYPE(le,"number",oe)}function Z(oe,le,ne){throw Math.floor(oe)!==oe?(X(oe,ne),new U.ERR_OUT_OF_RANGE(ne||"offset","an integer",oe)):le<0?new U.ERR_BUFFER_OUT_OF_BOUNDS:new U.ERR_OUT_OF_RANGE(ne||"offset",`>= ${ne?1:0} and <= ${le}`,oe)}var Q=/[^+/0-9A-Za-z-_]/g;function re(oe){if(oe=oe.split("=")[0],oe=oe.trim().replace(Q,""),oe.length<2)return"";for(;oe.length%4!==0;)oe=oe+"=";return oe}function ce(oe,le){le=le||1/0;let ne,be=oe.length,Fe=null,Ve=[];for(let je=0;je55295&&ne<57344){if(!Fe){if(ne>56319){(le-=3)>-1&&Ve.push(239,191,189);continue}else if(je+1===be){(le-=3)>-1&&Ve.push(239,191,189);continue}Fe=ne;continue}if(ne<56320){(le-=3)>-1&&Ve.push(239,191,189),Fe=ne;continue}ne=(Fe-55296<<10|ne-56320)+65536}else Fe&&(le-=3)>-1&&Ve.push(239,191,189);if(Fe=null,ne<128){if((le-=1)<0)break;Ve.push(ne)}else if(ne<2048){if((le-=2)<0)break;Ve.push(ne>>6|192,ne&63|128)}else if(ne<65536){if((le-=3)<0)break;Ve.push(ne>>12|224,ne>>6&63|128,ne&63|128)}else if(ne<1114112){if((le-=4)<0)break;Ve.push(ne>>18|240,ne>>12&63|128,ne>>6&63|128,ne&63|128)}else throw new Error("Invalid code point")}return Ve}function me(oe){let le=[];for(let ne=0;ne>8,Fe=ne%256,Ve.push(Fe),Ve.push(be);return Ve}function Ae(oe){return N.toByteArray(re(oe))}function Se(oe,le,ne,be){let Fe;for(Fe=0;Fe=le.length||Fe>=oe.length);++Fe)le[Fe+ne]=oe[Fe];return Fe}function Ce(oe,le){return oe instanceof le||oe!=null&&oe.constructor!=null&&oe.constructor.name!=null&&oe.constructor.name===le.name}function qe(oe){return oe!==oe}var Ue=function(){let oe="0123456789abcdef",le=new Array(256);for(let ne=0;ne<16;++ne){let be=ne*16;for(let Fe=0;Fe<16;++Fe)le[be+Fe]=oe[ne]+oe[Fe]}return le}();function xe(oe){return typeof BigInt>"u"?he:oe}function he(){throw new Error("BigInt not supported")}}}),Vx=De({"node_modules/has-symbols/shams.js"(j,N){"use strict";N.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var v={},w=Symbol("test"),S=Object(w);if(typeof w=="string"||Object.prototype.toString.call(w)!=="[object Symbol]"||Object.prototype.toString.call(S)!=="[object Symbol]")return!1;var l=42;v[w]=l;for(var e in v)return!1;if(typeof Object.keys=="function"&&Object.keys(v).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(v).length!==0)return!1;var t=Object.getOwnPropertySymbols(v);if(t.length!==1||t[0]!==w||!Object.prototype.propertyIsEnumerable.call(v,w))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var a=Object.getOwnPropertyDescriptor(v,w);if(a.value!==l||a.enumerable!==!0)return!1}return!0}}}),G1=De({"node_modules/has-tostringtag/shams.js"(j,N){"use strict";var u=Vx();N.exports=function(){return u()&&!!Symbol.toStringTag}}}),p5=De({"node_modules/es-object-atoms/index.js"(j,N){"use strict";N.exports=Object}}),XD=De({"node_modules/es-errors/index.js"(j,N){"use strict";N.exports=Error}}),ZD=De({"node_modules/es-errors/eval.js"(j,N){"use strict";N.exports=EvalError}}),$D=De({"node_modules/es-errors/range.js"(j,N){"use strict";N.exports=RangeError}}),KD=De({"node_modules/es-errors/ref.js"(j,N){"use strict";N.exports=ReferenceError}}),m5=De({"node_modules/es-errors/syntax.js"(j,N){"use strict";N.exports=SyntaxError}}),Mm=De({"node_modules/es-errors/type.js"(j,N){"use strict";N.exports=TypeError}}),JD=De({"node_modules/es-errors/uri.js"(j,N){"use strict";N.exports=URIError}}),QD=De({"node_modules/math-intrinsics/abs.js"(j,N){"use strict";N.exports=Math.abs}}),eF=De({"node_modules/math-intrinsics/floor.js"(j,N){"use strict";N.exports=Math.floor}}),tF=De({"node_modules/math-intrinsics/max.js"(j,N){"use strict";N.exports=Math.max}}),rF=De({"node_modules/math-intrinsics/min.js"(j,N){"use strict";N.exports=Math.min}}),aF=De({"node_modules/math-intrinsics/pow.js"(j,N){"use strict";N.exports=Math.pow}}),nF=De({"node_modules/math-intrinsics/round.js"(j,N){"use strict";N.exports=Math.round}}),iF=De({"node_modules/math-intrinsics/isNaN.js"(j,N){"use strict";N.exports=Number.isNaN||function(v){return v!==v}}}),oF=De({"node_modules/math-intrinsics/sign.js"(j,N){"use strict";var u=iF();N.exports=function(w){return u(w)||w===0?w:w<0?-1:1}}}),sF=De({"node_modules/gopd/gOPD.js"(j,N){"use strict";N.exports=Object.getOwnPropertyDescriptor}}),Fp=De({"node_modules/gopd/index.js"(j,N){"use strict";var u=sF();if(u)try{u([],"length")}catch{u=null}N.exports=u}}),V1=De({"node_modules/es-define-property/index.js"(j,N){"use strict";var u=Object.defineProperty||!1;if(u)try{u({},"a",{value:1})}catch{u=!1}N.exports=u}}),lF=De({"node_modules/has-symbols/index.js"(j,N){"use strict";var u=typeof Symbol<"u"&&Symbol,v=Vx();N.exports=function(){return typeof u!="function"||typeof Symbol!="function"||typeof u("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:v()}}}),g5=De({"node_modules/get-proto/Reflect.getPrototypeOf.js"(j,N){"use strict";N.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),y5=De({"node_modules/get-proto/Object.getPrototypeOf.js"(j,N){"use strict";var u=p5();N.exports=u.getPrototypeOf||null}}),uF=De({"node_modules/function-bind/implementation.js"(j,N){"use strict";var u="Function.prototype.bind called on incompatible ",v=Object.prototype.toString,w=Math.max,S="[object Function]",l=function(r,n){for(var i=[],s=0;s"u"||!A?u:A(Uint8Array),F={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?u:ArrayBuffer,"%ArrayIteratorPrototype%":g&&A?A([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":typeof Atomics>"u"?u:Atomics,"%BigInt%":typeof BigInt>"u"?u:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?u:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?u:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?u:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":w,"%eval%":eval,"%EvalError%":S,"%Float16Array%":typeof Float16Array>"u"?u:Float16Array,"%Float32Array%":typeof Float32Array>"u"?u:Float32Array,"%Float64Array%":typeof Float64Array>"u"?u:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?u:FinalizationRegistry,"%Function%":y,"%GeneratorFunction%":I,"%Int8Array%":typeof Int8Array>"u"?u:Int8Array,"%Int16Array%":typeof Int16Array>"u"?u:Int16Array,"%Int32Array%":typeof Int32Array>"u"?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":g&&A?A(A([][Symbol.iterator]())):u,"%JSON%":typeof JSON=="object"?JSON:u,"%Map%":typeof Map>"u"?u:Map,"%MapIteratorPrototype%":typeof Map>"u"||!g||!A?u:A(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":v,"%Object.getOwnPropertyDescriptor%":x,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?u:Promise,"%Proxy%":typeof Proxy>"u"?u:Proxy,"%RangeError%":l,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?u:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?u:Set,"%SetIteratorPrototype%":typeof Set>"u"||!g||!A?u:A(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":g&&A?A(""[Symbol.iterator]()):u,"%Symbol%":g?Symbol:u,"%SyntaxError%":t,"%ThrowTypeError%":E,"%TypedArray%":C,"%TypeError%":a,"%Uint8Array%":typeof Uint8Array>"u"?u:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?u:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?u:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?u:Uint32Array,"%URIError%":r,"%WeakMap%":typeof WeakMap>"u"?u:WeakMap,"%WeakRef%":typeof WeakRef>"u"?u:WeakRef,"%WeakSet%":typeof WeakSet>"u"?u:WeakSet,"%Function.prototype.call%":_,"%Function.prototype.apply%":b,"%Object.defineProperty%":M,"%Object.getPrototypeOf%":m,"%Math.abs%":n,"%Math.floor%":i,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":p,"%Math.round%":f,"%Math.sign%":d,"%Reflect.getPrototypeOf%":h};if(A)try{null.error}catch(V){R=A(A(V)),F["%Error.prototype%"]=R}var R,z=function V($){var X;if($==="%AsyncFunction%")X=o("async function () {}");else if($==="%GeneratorFunction%")X=o("function* () {}");else if($==="%AsyncGeneratorFunction%")X=o("async function* () {}");else if($==="%AsyncGenerator%"){var Z=V("%AsyncGeneratorFunction%");Z&&(X=Z.prototype)}else if($==="%AsyncIteratorPrototype%"){var Q=V("%AsyncGenerator%");Q&&A&&(X=A(Q.prototype))}return F[$]=X,X},D={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},k=Sm(),B=pF(),O=k.call(_,Array.prototype.concat),q=k.call(b,Array.prototype.splice),Y=k.call(_,String.prototype.replace),ee=k.call(_,String.prototype.slice),te=k.call(_,RegExp.prototype.exec),ae=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,U=/\\(\\)?/g,H=function($){var X=ee($,0,1),Z=ee($,-1);if(X==="%"&&Z!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if(Z==="%"&&X!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var Q=[];return Y($,ae,function(re,ce,me,ye){Q[Q.length]=me?Y(ye,U,"$1"):ce||re}),Q},K=function($,X){var Z=$,Q;if(B(D,Z)&&(Q=D[Z],Z="%"+Q[0]+"%"),B(F,Z)){var re=F[Z];if(re===I&&(re=z(Z)),typeof re>"u"&&!X)throw new a("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:Q,name:Z,value:re}}throw new t("intrinsic "+$+" does not exist!")};N.exports=function($,X){if(typeof $!="string"||$.length===0)throw new a("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof X!="boolean")throw new a('"allowMissing" argument must be a boolean');if(te(/^%?[^%]*%?$/,$)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Z=H($),Q=Z.length>0?Z[0]:"",re=K("%"+Q+"%",X),ce=re.name,me=re.value,ye=!1,Ae=re.alias;Ae&&(Q=Ae[0],q(Z,O([0,1],Ae)));for(var Se=1,Ce=!0;Se=Z.length){var he=x(me,qe);Ce=!!he,Ce&&"get"in he&&!("originalValue"in he.get)?me=he.get:me=me[qe]}else Ce=B(me,qe),me=me[qe];Ce&&!ye&&(F[ce]=me)}}return me}}}),mF=De({"node_modules/define-data-property/index.js"(j,N){"use strict";var u=V1(),v=m5(),w=Mm(),S=Fp();N.exports=function(e,t,a){if(!e||typeof e!="object"&&typeof e!="function")throw new w("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new w("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new w("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new w("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new w("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new w("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,n=arguments.length>4?arguments[4]:null,i=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!S&&S(e,t);if(u)u(e,t,{configurable:i===null&&c?c.configurable:!i,enumerable:r===null&&c?c.enumerable:!r,value:a,writable:n===null&&c?c.writable:!n});else if(s||!r&&!n&&!i)e[t]=a;else throw new v("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),x5=De({"node_modules/has-property-descriptors/index.js"(j,N){"use strict";var u=V1(),v=function(){return!!u};v.hasArrayLengthDefineBug=function(){if(!u)return null;try{return u([],"length",{value:1}).length!==1}catch{return!0}},N.exports=v}}),gF=De({"node_modules/set-function-length/index.js"(j,N){"use strict";var u=Wx(),v=mF(),w=x5()(),S=Fp(),l=Mm(),e=u("%Math.floor%");N.exports=function(a,r){if(typeof a!="function")throw new l("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||e(r)!==r)throw new l("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],i=!0,s=!0;if("length"in a&&S){var c=S(a,"length");c&&!c.configurable&&(i=!1),c&&!c.writable&&(s=!1)}return(i||s||!n)&&(w?v(a,"length",r,!0,!0):v(a,"length",r)),a}}}),H1=De({"node_modules/call-bind/index.js"(j,N){"use strict";var u=Sm(),v=Wx(),w=gF(),S=Mm(),l=v("%Function.prototype.apply%"),e=v("%Function.prototype.call%"),t=v("%Reflect.apply%",!0)||u.call(e,l),a=V1(),r=v("%Math.max%");N.exports=function(s){if(typeof s!="function")throw new S("a function is required");var c=t(u,e,arguments);return w(c,1+r(0,s.length-(arguments.length-1)),!0)};var n=function(){return t(u,l,arguments)};a?a(N.exports,"apply",{value:n}):N.exports.apply=n}}),Em=De({"node_modules/call-bind/callBound.js"(j,N){"use strict";var u=Wx(),v=H1(),w=v(u("String.prototype.indexOf"));N.exports=function(l,e){var t=u(l,!!e);return typeof t=="function"&&w(l,".prototype.")>-1?v(t):t}}}),yF=De({"node_modules/is-arguments/index.js"(j,N){"use strict";var u=G1()(),v=Em(),w=v("Object.prototype.toString"),S=function(a){return u&&a&&typeof a=="object"&&Symbol.toStringTag in a?!1:w(a)==="[object Arguments]"},l=function(a){return S(a)?!0:a!==null&&typeof a=="object"&&typeof a.length=="number"&&a.length>=0&&w(a)!=="[object Array]"&&w(a.callee)==="[object Function]"},e=function(){return S(arguments)}();S.isLegacyArguments=l,N.exports=e?S:l}}),_F=De({"node_modules/is-generator-function/index.js"(j,N){"use strict";var u=Object.prototype.toString,v=Function.prototype.toString,w=/^\s*(?:function)?\*/,S=G1()(),l=Object.getPrototypeOf,e=function(){if(!S)return!1;try{return Function("return function*() {}")()}catch{}},t;N.exports=function(r){if(typeof r!="function")return!1;if(w.test(v.call(r)))return!0;if(!S){var n=u.call(r);return n==="[object GeneratorFunction]"}if(!l)return!1;if(typeof t>"u"){var i=e();t=i?l(i):!1}return l(r)===t}}}),xF=De({"node_modules/is-callable/index.js"(j,N){"use strict";var u=Function.prototype.toString,v=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,w,S;if(typeof v=="function"&&typeof Object.defineProperty=="function")try{w=Object.defineProperty({},"length",{get:function(){throw S}}),S={},v(function(){throw 42},null,w)}catch(x){x!==S&&(v=null)}else v=null;var l=/^\s*class\b/,e=function(M){try{var T=u.call(M);return l.test(T)}catch{return!1}},t=function(M){try{return e(M)?!1:(u.call(M),!0)}catch{return!1}},a=Object.prototype.toString,r="[object Object]",n="[object Function]",i="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",p="[object HTMLCollection]",f=typeof Symbol=="function"&&!!Symbol.toStringTag,d=!(0 in[,]),y=function(){return!1};typeof document=="object"&&(o=document.all,a.call(o)===a.call(document.all)&&(y=function(M){if((d||!M)&&(typeof M>"u"||typeof M=="object"))try{var T=a.call(M);return(T===s||T===c||T===p||T===r)&&M("")==null}catch{}return!1}));var o;N.exports=v?function(M){if(y(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;try{v(M,null,w)}catch(T){if(T!==S)return!1}return!e(M)&&t(M)}:function(M){if(y(M))return!0;if(!M||typeof M!="function"&&typeof M!="object")return!1;if(f)return t(M);if(e(M))return!1;var T=a.call(M);return T!==n&&T!==i&&!/^\[object HTML/.test(T)?!1:t(M)}}}),b5=De({"node_modules/for-each/index.js"(j,N){"use strict";var u=xF(),v=Object.prototype.toString,w=Object.prototype.hasOwnProperty,S=function(r,n,i){for(var s=0,c=r.length;s=3&&(s=i),v.call(r)==="[object Array]"?S(r,n,s):typeof r=="string"?l(r,n,s):e(r,n,s)};N.exports=t}}),w5=De({"node_modules/available-typed-arrays/index.js"(j,N){"use strict";var u=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],v=typeof globalThis>"u"?window:globalThis;N.exports=function(){for(var S=[],l=0;l"u"?window:globalThis,r=v(),n=S("String.prototype.slice"),i=Object.getPrototypeOf,s=S("Array.prototype.indexOf",!0)||function(y,o){for(var x=0;x-1?o:o!=="Object"?!1:f(y)}return l?p(y):null}}}),wF=De({"node_modules/is-typed-array/index.js"(j,N){"use strict";var u=b5(),v=w5(),w=Em(),S=w("Object.prototype.toString"),l=G1()(),e=Fp(),t=typeof globalThis>"u"?window:globalThis,a=v(),r=w("Array.prototype.indexOf",!0)||function(f,d){for(var y=0;y-1}return e?c(f):!1}}}),A5=De({"node_modules/util/support/types.js"(j){"use strict";var N=yF(),u=_F(),v=bF(),w=wF();function S(ye){return ye.call.bind(ye)}var l=typeof BigInt<"u",e=typeof Symbol<"u",t=S(Object.prototype.toString),a=S(Number.prototype.valueOf),r=S(String.prototype.valueOf),n=S(Boolean.prototype.valueOf);l&&(i=S(BigInt.prototype.valueOf));var i;e&&(s=S(Symbol.prototype.valueOf));var s;function c(ye,Ae){if(typeof ye!="object")return!1;try{return Ae(ye),!0}catch{return!1}}j.isArgumentsObject=N,j.isGeneratorFunction=u,j.isTypedArray=w;function p(ye){return typeof Promise<"u"&&ye instanceof Promise||ye!==null&&typeof ye=="object"&&typeof ye.then=="function"&&typeof ye.catch=="function"}j.isPromise=p;function f(ye){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(ye):w(ye)||q(ye)}j.isArrayBufferView=f;function d(ye){return v(ye)==="Uint8Array"}j.isUint8Array=d;function y(ye){return v(ye)==="Uint8ClampedArray"}j.isUint8ClampedArray=y;function o(ye){return v(ye)==="Uint16Array"}j.isUint16Array=o;function x(ye){return v(ye)==="Uint32Array"}j.isUint32Array=x;function M(ye){return v(ye)==="Int8Array"}j.isInt8Array=M;function T(ye){return v(ye)==="Int16Array"}j.isInt16Array=T;function E(ye){return v(ye)==="Int32Array"}j.isInt32Array=E;function g(ye){return v(ye)==="Float32Array"}j.isFloat32Array=g;function A(ye){return v(ye)==="Float64Array"}j.isFloat64Array=A;function m(ye){return v(ye)==="BigInt64Array"}j.isBigInt64Array=m;function h(ye){return v(ye)==="BigUint64Array"}j.isBigUint64Array=h;function b(ye){return t(ye)==="[object Map]"}b.working=typeof Map<"u"&&b(new Map);function _(ye){return typeof Map>"u"?!1:b.working?b(ye):ye instanceof Map}j.isMap=_;function I(ye){return t(ye)==="[object Set]"}I.working=typeof Set<"u"&&I(new Set);function C(ye){return typeof Set>"u"?!1:I.working?I(ye):ye instanceof Set}j.isSet=C;function F(ye){return t(ye)==="[object WeakMap]"}F.working=typeof WeakMap<"u"&&F(new WeakMap);function R(ye){return typeof WeakMap>"u"?!1:F.working?F(ye):ye instanceof WeakMap}j.isWeakMap=R;function z(ye){return t(ye)==="[object WeakSet]"}z.working=typeof WeakSet<"u"&&z(new WeakSet);function D(ye){return z(ye)}j.isWeakSet=D;function k(ye){return t(ye)==="[object ArrayBuffer]"}k.working=typeof ArrayBuffer<"u"&&k(new ArrayBuffer);function B(ye){return typeof ArrayBuffer>"u"?!1:k.working?k(ye):ye instanceof ArrayBuffer}j.isArrayBuffer=B;function O(ye){return t(ye)==="[object DataView]"}O.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&O(new DataView(new ArrayBuffer(1),0,1));function q(ye){return typeof DataView>"u"?!1:O.working?O(ye):ye instanceof DataView}j.isDataView=q;var Y=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function ee(ye){return t(ye)==="[object SharedArrayBuffer]"}function te(ye){return typeof Y>"u"?!1:(typeof ee.working>"u"&&(ee.working=ee(new Y)),ee.working?ee(ye):ye instanceof Y)}j.isSharedArrayBuffer=te;function ae(ye){return t(ye)==="[object AsyncFunction]"}j.isAsyncFunction=ae;function U(ye){return t(ye)==="[object Map Iterator]"}j.isMapIterator=U;function H(ye){return t(ye)==="[object Set Iterator]"}j.isSetIterator=H;function K(ye){return t(ye)==="[object Generator]"}j.isGeneratorObject=K;function V(ye){return t(ye)==="[object WebAssembly.Module]"}j.isWebAssemblyCompiledModule=V;function $(ye){return c(ye,a)}j.isNumberObject=$;function X(ye){return c(ye,r)}j.isStringObject=X;function Z(ye){return c(ye,n)}j.isBooleanObject=Z;function Q(ye){return l&&c(ye,i)}j.isBigIntObject=Q;function re(ye){return e&&c(ye,s)}j.isSymbolObject=re;function ce(ye){return $(ye)||X(ye)||Z(ye)||Q(ye)||re(ye)}j.isBoxedPrimitive=ce;function me(ye){return typeof Uint8Array<"u"&&(B(ye)||te(ye))}j.isAnyArrayBuffer=me,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(ye){Object.defineProperty(j,ye,{enumerable:!1,value:function(){throw new Error(ye+" is not supported in userland")}})})}}),T5=De({"node_modules/util/support/isBufferBrowser.js"(j,N){N.exports=function(v){return v&&typeof v=="object"&&typeof v.copy=="function"&&typeof v.fill=="function"&&typeof v.readUInt8=="function"}}}),M5=De({"(disabled):node_modules/util/util.js"(j){var N=Object.getOwnPropertyDescriptors||function(q){for(var Y=Object.keys(q),ee={},te=0;te=te)return H;switch(H){case"%s":return String(ee[Y++]);case"%d":return Number(ee[Y++]);case"%j":try{return JSON.stringify(ee[Y++])}catch{return"[Circular]"}default:return H}}),U=ee[Y];Y"u")return function(){return j.deprecate(O,q).apply(this,arguments)};var Y=!1;function ee(){if(!Y){if(process.throwDeprecation)throw new Error(q);process.traceDeprecation?console.trace(q):console.error(q),Y=!0}return O.apply(this,arguments)}return ee};var v={},w=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),w=new RegExp("^"+S+"$","i");var S;j.debuglog=function(O){if(O=O.toUpperCase(),!v[O])if(w.test(O)){var q=process.pid;v[O]=function(){var Y=j.format.apply(j,arguments);console.error("%s %d: %s",O,q,Y)}}else v[O]=function(){};return v[O]};function l(O,q){var Y={seen:[],stylize:t};return arguments.length>=3&&(Y.depth=arguments[2]),arguments.length>=4&&(Y.colors=arguments[3]),d(q)?Y.showHidden=q:q&&j._extend(Y,q),E(Y.showHidden)&&(Y.showHidden=!1),E(Y.depth)&&(Y.depth=2),E(Y.colors)&&(Y.colors=!1),E(Y.customInspect)&&(Y.customInspect=!0),Y.colors&&(Y.stylize=e),r(Y,O,Y.depth)}j.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(O,q){var Y=l.styles[q];return Y?"\x1B["+l.colors[Y][0]+"m"+O+"\x1B["+l.colors[Y][1]+"m":O}function t(O,q){return O}function a(O){var q={};return O.forEach(function(Y,ee){q[Y]=!0}),q}function r(O,q,Y){if(O.customInspect&&q&&b(q.inspect)&&q.inspect!==j.inspect&&!(q.constructor&&q.constructor.prototype===q)){var ee=q.inspect(Y,O);return M(ee)||(ee=r(O,ee,Y)),ee}var te=n(O,q);if(te)return te;var ae=Object.keys(q),U=a(ae);if(O.showHidden&&(ae=Object.getOwnPropertyNames(q)),h(q)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0))return i(q);if(ae.length===0){if(b(q)){var H=q.name?": "+q.name:"";return O.stylize("[Function"+H+"]","special")}if(g(q))return O.stylize(RegExp.prototype.toString.call(q),"regexp");if(m(q))return O.stylize(Date.prototype.toString.call(q),"date");if(h(q))return i(q)}var K="",V=!1,$=["{","}"];if(f(q)&&(V=!0,$=["[","]"]),b(q)){var X=q.name?": "+q.name:"";K=" [Function"+X+"]"}if(g(q)&&(K=" "+RegExp.prototype.toString.call(q)),m(q)&&(K=" "+Date.prototype.toUTCString.call(q)),h(q)&&(K=" "+i(q)),ae.length===0&&(!V||q.length==0))return $[0]+K+$[1];if(Y<0)return g(q)?O.stylize(RegExp.prototype.toString.call(q),"regexp"):O.stylize("[Object]","special");O.seen.push(q);var Z;return V?Z=s(O,q,Y,U,ae):Z=ae.map(function(Q){return c(O,q,Y,U,Q,V)}),O.seen.pop(),p(Z,K,$)}function n(O,q){if(E(q))return O.stylize("undefined","undefined");if(M(q)){var Y="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize(Y,"string")}if(x(q))return O.stylize(""+q,"number");if(d(q))return O.stylize(""+q,"boolean");if(y(q))return O.stylize("null","null")}function i(O){return"["+Error.prototype.toString.call(O)+"]"}function s(O,q,Y,ee,te){for(var ae=[],U=0,H=q.length;U-1&&(ae?H=H.split(` -`).map(function(V){return" "+V}).join(` -`).slice(2):H=` -`+H.split(` -`).map(function(V){return" "+V}).join(` -`))):H=O.stylize("[Circular]","special")),E(U)){if(ae&&te.match(/^\d+$/))return H;U=JSON.stringify(""+te),U.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(U=U.slice(1,-1),U=O.stylize(U,"name")):(U=U.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),U=O.stylize(U,"string"))}return U+": "+H}function p(O,q,Y){var ee=0,te=O.reduce(function(ae,U){return ee++,U.indexOf(` -`)>=0&&ee++,ae+U.replace(/\u001b\[\d\d?m/g,"").length+1},0);return te>60?Y[0]+(q===""?"":q+` - `)+" "+O.join(`, - `)+" "+Y[1]:Y[0]+q+" "+O.join(", ")+" "+Y[1]}j.types=A5();function f(O){return Array.isArray(O)}j.isArray=f;function d(O){return typeof O=="boolean"}j.isBoolean=d;function y(O){return O===null}j.isNull=y;function o(O){return O==null}j.isNullOrUndefined=o;function x(O){return typeof O=="number"}j.isNumber=x;function M(O){return typeof O=="string"}j.isString=M;function T(O){return typeof O=="symbol"}j.isSymbol=T;function E(O){return O===void 0}j.isUndefined=E;function g(O){return A(O)&&I(O)==="[object RegExp]"}j.isRegExp=g,j.types.isRegExp=g;function A(O){return typeof O=="object"&&O!==null}j.isObject=A;function m(O){return A(O)&&I(O)==="[object Date]"}j.isDate=m,j.types.isDate=m;function h(O){return A(O)&&(I(O)==="[object Error]"||O instanceof Error)}j.isError=h,j.types.isNativeError=h;function b(O){return typeof O=="function"}j.isFunction=b;function _(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O>"u"}j.isPrimitive=_,j.isBuffer=T5();function I(O){return Object.prototype.toString.call(O)}function C(O){return O<10?"0"+O.toString(10):O.toString(10)}var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var O=new Date,q=[C(O.getHours()),C(O.getMinutes()),C(O.getSeconds())].join(":");return[O.getDate(),F[O.getMonth()],q].join(" ")}j.log=function(){console.log("%s - %s",R(),j.format.apply(j,arguments))},j.inherits=Kd(),j._extend=function(O,q){if(!q||!A(q))return O;for(var Y=Object.keys(q),ee=Y.length;ee--;)O[Y[ee]]=q[Y[ee]];return O};function z(O,q){return Object.prototype.hasOwnProperty.call(O,q)}var D=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;j.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(D&&q[D]){var Y=q[D];if(typeof Y!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Y,D,{value:Y,enumerable:!1,writable:!1,configurable:!0}),Y}function Y(){for(var ee,te,ae=new Promise(function(K,V){ee=K,te=V}),U=[],H=0;H0?this.tail.next=d:this.head=d,this.tail=d,++this.length}},{key:"unshift",value:function(f){var d={data:f,next:this.head};this.length===0&&(this.tail=d),this.head=d,++this.length}},{key:"shift",value:function(){if(this.length!==0){var f=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,f}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(f){if(this.length===0)return"";for(var d=this.head,y=""+d.data;d=d.next;)y+=f+d.data;return y}},{key:"concat",value:function(f){if(this.length===0)return a.alloc(0);for(var d=a.allocUnsafe(f>>>0),y=this.head,o=0;y;)s(y.data,d,o),o+=y.data.length,y=y.next;return d}},{key:"consume",value:function(f,d){var y;return fx.length?x.length:f;if(M===x.length?o+=x:o+=x.slice(0,f),f-=M,f===0){M===x.length?(++y,d.next?this.head=d.next:this.head=this.tail=null):(this.head=d,d.data=x.slice(M));break}++y}return this.length-=y,o}},{key:"_getBuffer",value:function(f){var d=a.allocUnsafe(f),y=this.head,o=1;for(y.data.copy(d),f-=y.data.length;y=y.next;){var x=y.data,M=f>x.length?x.length:f;if(x.copy(d,d.length-f,0,M),f-=M,f===0){M===x.length?(++o,y.next?this.head=y.next:this.head=this.tail=null):(this.head=y,y.data=x.slice(M));break}++o}return this.length-=o,d}},{key:i,value:function(f,d){return n(this,v({},d,{depth:0,customInspect:!1}))}}]),c}()}}),S5=De({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/destroy.js"(j,N){"use strict";function u(t,a){var r=this,n=this._readableState&&this._readableState.destroyed,i=this._writableState&&this._writableState.destroyed;return n||i?(a?a(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,t)):process.nextTick(l,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!a&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(w,r):(r._writableState.errorEmitted=!0,process.nextTick(v,r,s)):process.nextTick(v,r,s):a?(process.nextTick(w,r),a(s)):process.nextTick(w,r)}),this)}function v(t,a){l(t,a),w(t)}function w(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function S(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(t,a){t.emit("error",a)}function e(t,a){var r=t._readableState,n=t._writableState;r&&r.autoDestroy||n&&n.autoDestroy?t.destroy(a):t.emit("error",a)}N.exports={destroy:u,undestroy:S,errorOrDestroy:e}}}),zp=De({"node_modules/stream-browserify/node_modules/readable-stream/errors-browser.js"(j,N){"use strict";function u(a,r){a.prototype=Object.create(r.prototype),a.prototype.constructor=a,a.__proto__=r}var v={};function w(a,r,n){n||(n=Error);function i(c,p,f){return typeof r=="string"?r:r(c,p,f)}var s=function(c){u(p,c);function p(f,d,y){return c.call(this,i(f,d,y))||this}return p}(n);s.prototype.name=n.name,s.prototype.code=a,v[a]=s}function S(a,r){if(Array.isArray(a)){var n=a.length;return a=a.map(function(i){return String(i)}),n>2?"one of ".concat(r," ").concat(a.slice(0,n-1).join(", "),", or ")+a[n-1]:n===2?"one of ".concat(r," ").concat(a[0]," or ").concat(a[1]):"of ".concat(r," ").concat(a[0])}else return"of ".concat(r," ").concat(String(a))}function l(a,r,n){return a.substr(!n||n<0?0:+n,r.length)===r}function e(a,r,n){return(n===void 0||n>a.length)&&(n=a.length),a.substring(n-r.length,n)===r}function t(a,r,n){return typeof n!="number"&&(n=0),n+r.length>a.length?!1:a.indexOf(r,n)!==-1}w("ERR_INVALID_OPT_VALUE",function(a,r){return'The value "'+r+'" is invalid for option "'+a+'"'},TypeError),w("ERR_INVALID_ARG_TYPE",function(a,r,n){var i;typeof r=="string"&&l(r,"not ")?(i="must not be",r=r.replace(/^not /,"")):i="must be";var s;if(e(a," argument"))s="The ".concat(a," ").concat(i," ").concat(S(r,"type"));else{var c=t(a,".")?"property":"argument";s='The "'.concat(a,'" ').concat(c," ").concat(i," ").concat(S(r,"type"))}return s+=". Received type ".concat(typeof n),s},TypeError),w("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),w("ERR_METHOD_NOT_IMPLEMENTED",function(a){return"The "+a+" method is not implemented"}),w("ERR_STREAM_PREMATURE_CLOSE","Premature close"),w("ERR_STREAM_DESTROYED",function(a){return"Cannot call "+a+" after a stream was destroyed"}),w("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),w("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),w("ERR_STREAM_WRITE_AFTER_END","write after end"),w("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),w("ERR_UNKNOWN_ENCODING",function(a){return"Unknown encoding: "+a},TypeError),w("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),N.exports.codes=v}}),E5=De({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/state.js"(j,N){"use strict";var u=zp().codes.ERR_INVALID_OPT_VALUE;function v(S,l,e){return S.highWaterMark!=null?S.highWaterMark:l?S[e]:null}function w(S,l,e,t){var a=v(l,t,e);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var r=t?e:"highWaterMark";throw new u(r,a)}return Math.floor(a)}return S.objectMode?16:16*1024}N.exports={getHighWaterMark:w}}}),TF=De({"node_modules/util-deprecate/browser.js"(j,N){N.exports=u;function u(w,S){if(v("noDeprecation"))return w;var l=!1;function e(){if(!l){if(v("throwDeprecation"))throw new Error(S);v("traceDeprecation")?console.trace(S):console.warn(S),l=!0}return w.apply(this,arguments)}return e}function v(w){try{if(!window.localStorage)return!1}catch{return!1}var S=window.localStorage[w];return S==null?!1:String(S).toLowerCase()==="true"}}}),k5=De({"node_modules/stream-browserify/node_modules/readable-stream/lib/_stream_writable.js"(j,N){"use strict";N.exports=m;function u(U){var H=this;this.next=null,this.entry=null,this.finish=function(){ae(H,U)}}var v;m.WritableState=g;var w={deprecate:TF()},S=v5(),l=Dp().Buffer,e=window.Uint8Array||function(){};function t(U){return l.from(U)}function a(U){return l.isBuffer(U)||U instanceof e}var r=S5(),n=E5(),i=n.getHighWaterMark,s=zp().codes,c=s.ERR_INVALID_ARG_TYPE,p=s.ERR_METHOD_NOT_IMPLEMENTED,f=s.ERR_MULTIPLE_CALLBACK,d=s.ERR_STREAM_CANNOT_PIPE,y=s.ERR_STREAM_DESTROYED,o=s.ERR_STREAM_NULL_VALUES,x=s.ERR_STREAM_WRITE_AFTER_END,M=s.ERR_UNKNOWN_ENCODING,T=r.errorOrDestroy;Kd()(m,S);function E(){}function g(U,H,K){v=v||Bp(),U=U||{},typeof K!="boolean"&&(K=H instanceof v),this.objectMode=!!U.objectMode,K&&(this.objectMode=this.objectMode||!!U.writableObjectMode),this.highWaterMark=i(this,U,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var V=U.decodeStrings===!1;this.decodeStrings=!V,this.defaultEncoding=U.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function($){z(H,$)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=U.emitClose!==!1,this.autoDestroy=!!U.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new u(this)}g.prototype.getBuffer=function(){for(var H=this.bufferedRequest,K=[];H;)K.push(H),H=H.next;return K},function(){try{Object.defineProperty(g.prototype,"buffer",{get:w.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var A;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(A=Function.prototype[Symbol.hasInstance],Object.defineProperty(m,Symbol.hasInstance,{value:function(H){return A.call(this,H)?!0:this!==m?!1:H&&H._writableState instanceof g}})):A=function(H){return H instanceof this};function m(U){v=v||Bp();var H=this instanceof v;if(!H&&!A.call(m,this))return new m(U);this._writableState=new g(U,this,H),this.writable=!0,U&&(typeof U.write=="function"&&(this._write=U.write),typeof U.writev=="function"&&(this._writev=U.writev),typeof U.destroy=="function"&&(this._destroy=U.destroy),typeof U.final=="function"&&(this._final=U.final)),S.call(this)}m.prototype.pipe=function(){T(this,new d)};function h(U,H){var K=new x;T(U,K),process.nextTick(H,K)}function b(U,H,K,V){var $;return K===null?$=new o:typeof K!="string"&&!H.objectMode&&($=new c("chunk",["string","Buffer"],K)),$?(T(U,$),process.nextTick(V,$),!1):!0}m.prototype.write=function(U,H,K){var V=this._writableState,$=!1,X=!V.objectMode&&a(U);return X&&!l.isBuffer(U)&&(U=t(U)),typeof H=="function"&&(K=H,H=null),X?H="buffer":H||(H=V.defaultEncoding),typeof K!="function"&&(K=E),V.ending?h(this,K):(X||b(this,V,U,K))&&(V.pendingcb++,$=I(this,V,X,U,H,K)),$},m.prototype.cork=function(){this._writableState.corked++},m.prototype.uncork=function(){var U=this._writableState;U.corked&&(U.corked--,!U.writing&&!U.corked&&!U.bufferProcessing&&U.bufferedRequest&&B(this,U))},m.prototype.setDefaultEncoding=function(H){if(typeof H=="string"&&(H=H.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((H+"").toLowerCase())>-1))throw new M(H);return this._writableState.defaultEncoding=H,this},Object.defineProperty(m.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function _(U,H,K){return!U.objectMode&&U.decodeStrings!==!1&&typeof H=="string"&&(H=l.from(H,K)),H}Object.defineProperty(m.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function I(U,H,K,V,$,X){if(!K){var Z=_(H,V,$);V!==Z&&(K=!0,$="buffer",V=Z)}var Q=H.objectMode?1:V.length;H.length+=Q;var re=H.length>5===6?2:y>>4===14?3:y>>3===30?4:y>>6===2?-1:-2}function e(y,o,x){var M=o.length-1;if(M=0?(T>0&&(y.lastNeed=T-1),T):--M=0?(T>0&&(y.lastNeed=T-2),T):--M=0?(T>0&&(T===2?T=0:y.lastNeed=T-3),T):0))}function t(y,o,x){if((o[0]&192)!==128)return y.lastNeed=0,"\uFFFD";if(y.lastNeed>1&&o.length>1){if((o[1]&192)!==128)return y.lastNeed=1,"\uFFFD";if(y.lastNeed>2&&o.length>2&&(o[2]&192)!==128)return y.lastNeed=2,"\uFFFD"}}function a(y){var o=this.lastTotal-this.lastNeed,x=t(this,y,o);if(x!==void 0)return x;if(this.lastNeed<=y.length)return y.copy(this.lastChar,o,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);y.copy(this.lastChar,o,0,y.length),this.lastNeed-=y.length}function r(y,o){var x=e(this,y,o);if(!this.lastNeed)return y.toString("utf8",o);this.lastTotal=x;var M=y.length-(x-this.lastNeed);return y.copy(this.lastChar,0,M),y.toString("utf8",o,M)}function n(y){var o=y&&y.length?this.write(y):"";return this.lastNeed?o+"\uFFFD":o}function i(y,o){if((y.length-o)%2===0){var x=y.toString("utf16le",o);if(x){var M=x.charCodeAt(x.length-1);if(M>=55296&&M<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1],x.slice(0,-1)}return x}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=y[y.length-1],y.toString("utf16le",o,y.length-1)}function s(y){var o=y&&y.length?this.write(y):"";if(this.lastNeed){var x=this.lastTotal-this.lastNeed;return o+this.lastChar.toString("utf16le",0,x)}return o}function c(y,o){var x=(y.length-o)%3;return x===0?y.toString("base64",o):(this.lastNeed=3-x,this.lastTotal=3,x===1?this.lastChar[0]=y[y.length-1]:(this.lastChar[0]=y[y.length-2],this.lastChar[1]=y[y.length-1]),y.toString("base64",o,y.length-x))}function p(y){var o=y&&y.length?this.write(y):"";return this.lastNeed?o+this.lastChar.toString("base64",0,3-this.lastNeed):o}function f(y){return y.toString(this.encoding)}function d(y){return y&&y.length?this.write(y):""}}}),Yx=De({"node_modules/stream-browserify/node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(j,N){"use strict";var u=zp().codes.ERR_STREAM_PREMATURE_CLOSE;function v(e){var t=!1;return function(){if(!t){t=!0;for(var a=arguments.length,r=new Array(a),n=0;n0)if(typeof Q!="string"&&!ye.objectMode&&Object.getPrototypeOf(Q)!==l.prototype&&(Q=t(Q)),ce)ye.endEmitted?g(Z,new x):I(Z,ye,Q,!0);else if(ye.ended)g(Z,new y);else{if(ye.destroyed)return!1;ye.reading=!1,ye.decoder&&!re?(Q=ye.decoder.write(Q),ye.objectMode||Q.length!==0?I(Z,ye,Q,!1):O(Z,ye)):I(Z,ye,Q,!1)}else ce||(ye.reading=!1,O(Z,ye))}return!ye.ended&&(ye.length=F?Z=F:(Z--,Z|=Z>>>1,Z|=Z>>>2,Z|=Z>>>4,Z|=Z>>>8,Z|=Z>>>16,Z++),Z}function z(Z,Q){return Z<=0||Q.length===0&&Q.ended?0:Q.objectMode?1:Z!==Z?Q.flowing&&Q.length?Q.buffer.head.data.length:Q.length:(Z>Q.highWaterMark&&(Q.highWaterMark=R(Z)),Z<=Q.length?Z:Q.ended?Q.length:(Q.needReadable=!0,0))}b.prototype.read=function(Z){n("read",Z),Z=parseInt(Z,10);var Q=this._readableState,re=Z;if(Z!==0&&(Q.emittedReadable=!1),Z===0&&Q.needReadable&&((Q.highWaterMark!==0?Q.length>=Q.highWaterMark:Q.length>0)||Q.ended))return n("read: emitReadable",Q.length,Q.ended),Q.length===0&&Q.ended?V(this):k(this),null;if(Z=z(Z,Q),Z===0&&Q.ended)return Q.length===0&&V(this),null;var ce=Q.needReadable;n("need readable",ce),(Q.length===0||Q.length-Z0?me=K(Z,Q):me=null,me===null?(Q.needReadable=Q.length<=Q.highWaterMark,Z=0):(Q.length-=Z,Q.awaitDrain=0),Q.length===0&&(Q.ended||(Q.needReadable=!0),re!==Z&&Q.ended&&V(this)),me!==null&&this.emit("data",me),me};function D(Z,Q){if(n("onEofChunk"),!Q.ended){if(Q.decoder){var re=Q.decoder.end();re&&re.length&&(Q.buffer.push(re),Q.length+=Q.objectMode?1:re.length)}Q.ended=!0,Q.sync?k(Z):(Q.needReadable=!1,Q.emittedReadable||(Q.emittedReadable=!0,B(Z)))}}function k(Z){var Q=Z._readableState;n("emitReadable",Q.needReadable,Q.emittedReadable),Q.needReadable=!1,Q.emittedReadable||(n("emitReadable",Q.flowing),Q.emittedReadable=!0,process.nextTick(B,Z))}function B(Z){var Q=Z._readableState;n("emitReadable_",Q.destroyed,Q.length,Q.ended),!Q.destroyed&&(Q.length||Q.ended)&&(Z.emit("readable"),Q.emittedReadable=!1),Q.needReadable=!Q.flowing&&!Q.ended&&Q.length<=Q.highWaterMark,H(Z)}function O(Z,Q){Q.readingMore||(Q.readingMore=!0,process.nextTick(q,Z,Q))}function q(Z,Q){for(;!Q.reading&&!Q.ended&&(Q.length1&&X(ce.pipes,Z)!==-1)&&!qe&&(n("false write response, pause",ce.awaitDrain),ce.awaitDrain++),re.pause())}function he(be){n("onerror",be),ne(),Z.removeListener("error",he),w(Z,"error")===0&&g(Z,be)}m(Z,"error",he);function oe(){Z.removeListener("finish",le),ne()}Z.once("close",oe);function le(){n("onfinish"),Z.removeListener("close",oe),ne()}Z.once("finish",le);function ne(){n("unpipe"),re.unpipe(Z)}return Z.emit("pipe",re),ce.flowing||(n("pipe resume"),re.resume()),Z};function Y(Z){return function(){var re=Z._readableState;n("pipeOnDrain",re.awaitDrain),re.awaitDrain&&re.awaitDrain--,re.awaitDrain===0&&w(Z,"data")&&(re.flowing=!0,H(Z))}}b.prototype.unpipe=function(Z){var Q=this._readableState,re={hasUnpiped:!1};if(Q.pipesCount===0)return this;if(Q.pipesCount===1)return Z&&Z!==Q.pipes?this:(Z||(Z=Q.pipes),Q.pipes=null,Q.pipesCount=0,Q.flowing=!1,Z&&Z.emit("unpipe",this,re),this);if(!Z){var ce=Q.pipes,me=Q.pipesCount;Q.pipes=null,Q.pipesCount=0,Q.flowing=!1;for(var ye=0;ye0,ce.flowing!==!1&&this.resume()):Z==="readable"&&!ce.endEmitted&&!ce.readableListening&&(ce.readableListening=ce.needReadable=!0,ce.flowing=!1,ce.emittedReadable=!1,n("on readable",ce.length,ce.reading),ce.length?k(this):ce.reading||process.nextTick(te,this)),re},b.prototype.addListener=b.prototype.on,b.prototype.removeListener=function(Z,Q){var re=S.prototype.removeListener.call(this,Z,Q);return Z==="readable"&&process.nextTick(ee,this),re},b.prototype.removeAllListeners=function(Z){var Q=S.prototype.removeAllListeners.apply(this,arguments);return(Z==="readable"||Z===void 0)&&process.nextTick(ee,this),Q};function ee(Z){var Q=Z._readableState;Q.readableListening=Z.listenerCount("readable")>0,Q.resumeScheduled&&!Q.paused?Q.flowing=!0:Z.listenerCount("data")>0&&Z.resume()}function te(Z){n("readable nexttick read 0"),Z.read(0)}b.prototype.resume=function(){var Z=this._readableState;return Z.flowing||(n("resume"),Z.flowing=!Z.readableListening,ae(this,Z)),Z.paused=!1,this};function ae(Z,Q){Q.resumeScheduled||(Q.resumeScheduled=!0,process.nextTick(U,Z,Q))}function U(Z,Q){n("resume",Q.reading),Q.reading||Z.read(0),Q.resumeScheduled=!1,Z.emit("resume"),H(Z),Q.flowing&&!Q.reading&&Z.read(0)}b.prototype.pause=function(){return n("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(n("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function H(Z){var Q=Z._readableState;for(n("flow",Q.flowing);Q.flowing&&Z.read()!==null;);}b.prototype.wrap=function(Z){var Q=this,re=this._readableState,ce=!1;Z.on("end",function(){if(n("wrapped end"),re.decoder&&!re.ended){var Ae=re.decoder.end();Ae&&Ae.length&&Q.push(Ae)}Q.push(null)}),Z.on("data",function(Ae){if(n("wrapped data"),re.decoder&&(Ae=re.decoder.write(Ae)),!(re.objectMode&&Ae==null)&&!(!re.objectMode&&(!Ae||!Ae.length))){var Se=Q.push(Ae);Se||(ce=!0,Z.pause())}});for(var me in Z)this[me]===void 0&&typeof Z[me]=="function"&&(this[me]=function(Se){return function(){return Z[Se].apply(Z,arguments)}}(me));for(var ye=0;ye=Q.length?(Q.decoder?re=Q.buffer.join(""):Q.buffer.length===1?re=Q.buffer.first():re=Q.buffer.concat(Q.length),Q.buffer.clear()):re=Q.buffer.consume(Z,Q.decoder),re}function V(Z){var Q=Z._readableState;n("endReadable",Q.endEmitted),Q.endEmitted||(Q.ended=!0,process.nextTick($,Q,Z))}function $(Z,Q){if(n("endReadableNT",Z.endEmitted,Z.length),!Z.endEmitted&&Z.length===0&&(Z.endEmitted=!0,Q.readable=!1,Q.emit("end"),Z.autoDestroy)){var re=Q._writableState;(!re||re.autoDestroy&&re.finished)&&Q.destroy()}}typeof Symbol=="function"&&(b.from=function(Z,Q){return E===void 0&&(E=EF()),E(b,Z,Q)});function X(Z,Q){for(var re=0,ce=Z.length;re0;return a(x,T,E,function(g){y||(y=g),g&&o.forEach(r),!T&&(o.forEach(r),d(y))})});return p.reduce(n)}N.exports=s}}),LF=De({"node_modules/stream-browserify/index.js"(j,N){N.exports=w;var u=Tp().EventEmitter,v=Kd();v(w,u),w.Readable=L5(),w.Writable=k5(),w.Duplex=Bp(),w.Transform=P5(),w.PassThrough=kF(),w.finished=Yx(),w.pipeline=CF(),w.Stream=w;function w(){u.call(this)}w.prototype.pipe=function(S,l){var e=this;function t(p){S.writable&&S.write(p)===!1&&e.pause&&e.pause()}e.on("data",t);function a(){e.readable&&e.resume&&e.resume()}S.on("drain",a),!S._isStdio&&(!l||l.end!==!1)&&(e.on("end",n),e.on("close",i));var r=!1;function n(){r||(r=!0,S.end())}function i(){r||(r=!0,typeof S.destroy=="function"&&S.destroy())}function s(p){if(c(),u.listenerCount(this,"error")===0)throw p}e.on("error",s),S.on("error",s);function c(){e.removeListener("data",t),S.removeListener("drain",a),e.removeListener("end",n),e.removeListener("close",i),e.removeListener("error",s),S.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),S.removeListener("close",c)}return e.on("end",c),e.on("close",c),S.on("close",c),S.emit("pipe",e),S}}}),km=De({"node_modules/util/util.js"(j){var N=Object.getOwnPropertyDescriptors||function(q){for(var Y=Object.keys(q),ee={},te=0;te=te)return H;switch(H){case"%s":return String(ee[Y++]);case"%d":return Number(ee[Y++]);case"%j":try{return JSON.stringify(ee[Y++])}catch{return"[Circular]"}default:return H}}),U=ee[Y];Y"u")return function(){return j.deprecate(O,q).apply(this,arguments)};var Y=!1;function ee(){if(!Y){if(process.throwDeprecation)throw new Error(q);process.traceDeprecation?console.trace(q):console.error(q),Y=!0}return O.apply(this,arguments)}return ee};var v={},w=/^$/;S="false",S=S.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),w=new RegExp("^"+S+"$","i");var S;j.debuglog=function(O){if(O=O.toUpperCase(),!v[O])if(w.test(O)){var q=process.pid;v[O]=function(){var Y=j.format.apply(j,arguments);console.error("%s %d: %s",O,q,Y)}}else v[O]=function(){};return v[O]};function l(O,q){var Y={seen:[],stylize:t};return arguments.length>=3&&(Y.depth=arguments[2]),arguments.length>=4&&(Y.colors=arguments[3]),d(q)?Y.showHidden=q:q&&j._extend(Y,q),E(Y.showHidden)&&(Y.showHidden=!1),E(Y.depth)&&(Y.depth=2),E(Y.colors)&&(Y.colors=!1),E(Y.customInspect)&&(Y.customInspect=!0),Y.colors&&(Y.stylize=e),r(Y,O,Y.depth)}j.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(O,q){var Y=l.styles[q];return Y?"\x1B["+l.colors[Y][0]+"m"+O+"\x1B["+l.colors[Y][1]+"m":O}function t(O,q){return O}function a(O){var q={};return O.forEach(function(Y,ee){q[Y]=!0}),q}function r(O,q,Y){if(O.customInspect&&q&&b(q.inspect)&&q.inspect!==j.inspect&&!(q.constructor&&q.constructor.prototype===q)){var ee=q.inspect(Y,O);return M(ee)||(ee=r(O,ee,Y)),ee}var te=n(O,q);if(te)return te;var ae=Object.keys(q),U=a(ae);if(O.showHidden&&(ae=Object.getOwnPropertyNames(q)),h(q)&&(ae.indexOf("message")>=0||ae.indexOf("description")>=0))return i(q);if(ae.length===0){if(b(q)){var H=q.name?": "+q.name:"";return O.stylize("[Function"+H+"]","special")}if(g(q))return O.stylize(RegExp.prototype.toString.call(q),"regexp");if(m(q))return O.stylize(Date.prototype.toString.call(q),"date");if(h(q))return i(q)}var K="",V=!1,$=["{","}"];if(f(q)&&(V=!0,$=["[","]"]),b(q)){var X=q.name?": "+q.name:"";K=" [Function"+X+"]"}if(g(q)&&(K=" "+RegExp.prototype.toString.call(q)),m(q)&&(K=" "+Date.prototype.toUTCString.call(q)),h(q)&&(K=" "+i(q)),ae.length===0&&(!V||q.length==0))return $[0]+K+$[1];if(Y<0)return g(q)?O.stylize(RegExp.prototype.toString.call(q),"regexp"):O.stylize("[Object]","special");O.seen.push(q);var Z;return V?Z=s(O,q,Y,U,ae):Z=ae.map(function(Q){return c(O,q,Y,U,Q,V)}),O.seen.pop(),p(Z,K,$)}function n(O,q){if(E(q))return O.stylize("undefined","undefined");if(M(q)){var Y="'"+JSON.stringify(q).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return O.stylize(Y,"string")}if(x(q))return O.stylize(""+q,"number");if(d(q))return O.stylize(""+q,"boolean");if(y(q))return O.stylize("null","null")}function i(O){return"["+Error.prototype.toString.call(O)+"]"}function s(O,q,Y,ee,te){for(var ae=[],U=0,H=q.length;U-1&&(ae?H=H.split(` -`).map(function(V){return" "+V}).join(` -`).slice(2):H=` -`+H.split(` -`).map(function(V){return" "+V}).join(` -`))):H=O.stylize("[Circular]","special")),E(U)){if(ae&&te.match(/^\d+$/))return H;U=JSON.stringify(""+te),U.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(U=U.slice(1,-1),U=O.stylize(U,"name")):(U=U.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),U=O.stylize(U,"string"))}return U+": "+H}function p(O,q,Y){var ee=0,te=O.reduce(function(ae,U){return ee++,U.indexOf(` -`)>=0&&ee++,ae+U.replace(/\u001b\[\d\d?m/g,"").length+1},0);return te>60?Y[0]+(q===""?"":q+` - `)+" "+O.join(`, - `)+" "+Y[1]:Y[0]+q+" "+O.join(", ")+" "+Y[1]}j.types=A5();function f(O){return Array.isArray(O)}j.isArray=f;function d(O){return typeof O=="boolean"}j.isBoolean=d;function y(O){return O===null}j.isNull=y;function o(O){return O==null}j.isNullOrUndefined=o;function x(O){return typeof O=="number"}j.isNumber=x;function M(O){return typeof O=="string"}j.isString=M;function T(O){return typeof O=="symbol"}j.isSymbol=T;function E(O){return O===void 0}j.isUndefined=E;function g(O){return A(O)&&I(O)==="[object RegExp]"}j.isRegExp=g,j.types.isRegExp=g;function A(O){return typeof O=="object"&&O!==null}j.isObject=A;function m(O){return A(O)&&I(O)==="[object Date]"}j.isDate=m,j.types.isDate=m;function h(O){return A(O)&&(I(O)==="[object Error]"||O instanceof Error)}j.isError=h,j.types.isNativeError=h;function b(O){return typeof O=="function"}j.isFunction=b;function _(O){return O===null||typeof O=="boolean"||typeof O=="number"||typeof O=="string"||typeof O=="symbol"||typeof O>"u"}j.isPrimitive=_,j.isBuffer=T5();function I(O){return Object.prototype.toString.call(O)}function C(O){return O<10?"0"+O.toString(10):O.toString(10)}var F=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(){var O=new Date,q=[C(O.getHours()),C(O.getMinutes()),C(O.getSeconds())].join(":");return[O.getDate(),F[O.getMonth()],q].join(" ")}j.log=function(){console.log("%s - %s",R(),j.format.apply(j,arguments))},j.inherits=Kd(),j._extend=function(O,q){if(!q||!A(q))return O;for(var Y=Object.keys(q),ee=Y.length;ee--;)O[Y[ee]]=q[Y[ee]];return O};function z(O,q){return Object.prototype.hasOwnProperty.call(O,q)}var D=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;j.promisify=function(q){if(typeof q!="function")throw new TypeError('The "original" argument must be of type Function');if(D&&q[D]){var Y=q[D];if(typeof Y!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Y,D,{value:Y,enumerable:!1,writable:!1,configurable:!0}),Y}function Y(){for(var ee,te,ae=new Promise(function(K,V){ee=K,te=V}),U=[],H=0;H"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(E){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(A){return A.__proto__||Object.getPrototypeOf(A)},c(E)}var p={},f,d;function y(E,g,A){A||(A=Error);function m(b,_,I){return typeof g=="string"?g:g(b,_,I)}var h=function(b){t(I,b);var _=r(I);function I(C,F,R){var z;return e(this,I),z=_.call(this,m(C,F,R)),z.code=E,z}return w(I)}(A);p[E]=h}function o(E,g){if(Array.isArray(E)){var A=E.length;return E=E.map(function(m){return String(m)}),A>2?"one of ".concat(g," ").concat(E.slice(0,A-1).join(", "),", or ")+E[A-1]:A===2?"one of ".concat(g," ").concat(E[0]," or ").concat(E[1]):"of ".concat(g," ").concat(E[0])}else return"of ".concat(g," ").concat(String(E))}function x(E,g,A){return E.substr(!A||A<0?0:+A,g.length)===g}function M(E,g,A){return(A===void 0||A>E.length)&&(A=E.length),E.substring(A-g.length,A)===g}function T(E,g,A){return typeof A!="number"&&(A=0),A+g.length>E.length?!1:E.indexOf(g,A)!==-1}y("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),y("ERR_INVALID_ARG_TYPE",function(E,g,A){f===void 0&&(f=Y1()),f(typeof E=="string","'name' must be a string");var m;typeof g=="string"&&x(g,"not ")?(m="must not be",g=g.replace(/^not /,"")):m="must be";var h;if(M(E," argument"))h="The ".concat(E," ").concat(m," ").concat(o(g,"type"));else{var b=T(E,".")?"property":"argument";h='The "'.concat(E,'" ').concat(b," ").concat(m," ").concat(o(g,"type"))}return h+=". Received type ".concat(u(A)),h},TypeError),y("ERR_INVALID_ARG_VALUE",function(E,g){var A=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";d===void 0&&(d=km());var m=d.inspect(g);return m.length>128&&(m="".concat(m.slice(0,128),"...")),"The argument '".concat(E,"' ").concat(A,". Received ").concat(m)},TypeError,RangeError),y("ERR_INVALID_RETURN_VALUE",function(E,g,A){var m;return A&&A.constructor&&A.constructor.name?m="instance of ".concat(A.constructor.name):m="type ".concat(u(A)),"Expected ".concat(E,' to be returned from the "').concat(g,'"')+" function but got ".concat(m,".")},TypeError),y("ERR_MISSING_ARGS",function(){for(var E=arguments.length,g=new Array(E),A=0;A0,"At least one arg needs to be specified");var m="The ",h=g.length;switch(g=g.map(function(b){return'"'.concat(b,'"')}),h){case 1:m+="".concat(g[0]," argument");break;case 2:m+="".concat(g[0]," and ").concat(g[1]," arguments");break;default:m+=g.slice(0,h-1).join(", "),m+=", and ".concat(g[h-1]," arguments");break}return"".concat(m," must be specified")},TypeError),N.exports.codes=p}}),PF=De({"node_modules/assert/build/internal/assert/assertion_error.js"(j,N){"use strict";function u(B,O){var q=Object.keys(B);if(Object.getOwnPropertySymbols){var Y=Object.getOwnPropertySymbols(B);O&&(Y=Y.filter(function(ee){return Object.getOwnPropertyDescriptor(B,ee).enumerable})),q.push.apply(q,Y)}return q}function v(B){for(var O=1;O"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function d(B){return Function.toString.call(B).indexOf("[native code]")!==-1}function y(B,O){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Y,ee){return Y.__proto__=ee,Y},y(B,O)}function o(B){return o=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(q){return q.__proto__||Object.getPrototypeOf(q)},o(B)}function x(B){"@babel/helpers - typeof";return x=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(O){return typeof O}:function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},x(B)}var M=km(),T=M.inspect,E=R5(),g=E.codes.ERR_INVALID_ARG_TYPE;function A(B,O,q){return(q===void 0||q>B.length)&&(q=B.length),B.substring(q-O.length,q)===O}function m(B,O){if(O=Math.floor(O),B.length==0||O==0)return"";var q=B.length*O;for(O=Math.floor(Math.log(O)/Math.log(2));O;)B+=B,O--;return B+=B.substring(0,q-B.length),B}var h="",b="",_="",I="",C={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},F=10;function R(B){var O=Object.keys(B),q=Object.create(Object.getPrototypeOf(B));return O.forEach(function(Y){q[Y]=B[Y]}),Object.defineProperty(q,"message",{value:B.message}),q}function z(B){return T(B,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function D(B,O,q){var Y="",ee="",te=0,ae="",U=!1,H=z(B),K=H.split(` -`),V=z(O).split(` -`),$=0,X="";if(q==="strictEqual"&&x(B)==="object"&&x(O)==="object"&&B!==null&&O!==null&&(q="strictEqualObject"),K.length===1&&V.length===1&&K[0]!==V[0]){var Z=K[0].length+V[0].length;if(Z<=F){if((x(B)!=="object"||B===null)&&(x(O)!=="object"||O===null)&&(B!==0||O!==0))return"".concat(C[q],` - -`)+"".concat(K[0]," !== ").concat(V[0],` -`)}else if(q!=="strictEqualObject"){var Q=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Z2&&(X=` - `.concat(m(" ",$),"^"),$=0)}}}for(var re=K[K.length-1],ce=V[V.length-1];re===ce&&($++<2?ae=` - `.concat(re).concat(ae):Y=re,K.pop(),V.pop(),!(K.length===0||V.length===0));)re=K[K.length-1],ce=V[V.length-1];var me=Math.max(K.length,V.length);if(me===0){var ye=H.split(` -`);if(ye.length>30)for(ye[26]="".concat(h,"...").concat(I);ye.length>27;)ye.pop();return"".concat(C.notIdentical,` - -`).concat(ye.join(` +var _X=Object.create;var yE=Object.defineProperty;var xX=Object.getOwnPropertyDescriptor;var bX=Object.getOwnPropertyNames;var wX=Object.getPrototypeOf,TX=Object.prototype.hasOwnProperty;var AX=(oe,ye)=>()=>(ye||oe((ye={exports:{}}).exports,ye),ye.exports);var MX=(oe,ye,Fe,dt)=>{if(ye&&typeof ye=="object"||typeof ye=="function")for(let Zt of bX(ye))!TX.call(oe,Zt)&&Zt!==Fe&&yE(oe,Zt,{get:()=>ye[Zt],enumerable:!(dt=xX(ye,Zt))||dt.enumerable});return oe};var SX=(oe,ye,Fe)=>(Fe=oe!=null?_X(wX(oe)):{},MX(ye||!oe||!oe.__esModule?yE(Fe,"default",{value:oe,enumerable:!0}):Fe,oe));var CR=AX((kR,bx)=>{(function(oe,ye){typeof bx=="object"&&bx.exports?bx.exports=ye():oe.moduleName=ye()})(typeof self<"u"?self:kR,()=>{"use strict";var oe=(()=>{var ye=Object.create,Fe=Object.defineProperty,dt=Object.defineProperties,Zt=Object.getOwnPropertyDescriptor,yr=Object.getOwnPropertyDescriptors,Xr=Object.getOwnPropertyNames,ga=Object.getOwnPropertySymbols,ya=Object.getPrototypeOf,Cn=Object.prototype.hasOwnProperty,xn=Object.prototype.propertyIsEnumerable,On=(J,V)=>(V=Symbol[J])?V:Symbol.for("Symbol."+J),Fi=J=>{throw TypeError(J)},ho=(J,V,p)=>V in J?Fe(J,V,{enumerable:!0,configurable:!0,writable:!0,value:p}):J[V]=p,Li=(J,V)=>{for(var p in V||(V={}))Cn.call(V,p)&&ho(J,p,V[p]);if(ga)for(var p of ga(V))xn.call(V,p)&&ho(J,p,V[p]);return J},lo=(J,V)=>dt(J,yr(V)),Lo=(J,V)=>{var p={};for(var b in J)Cn.call(J,b)&&V.indexOf(b)<0&&(p[b]=J[b]);if(J!=null&&ga)for(var b of ga(J))V.indexOf(b)<0&&xn.call(J,b)&&(p[b]=J[b]);return p},zi=(J,V,p)=>function(){if(p)throw p[0];try{return J&&(V=(0,J[Xr(J)[0]])(J=0)),V}catch(E){throw p=[E],E}},ze=(J,V)=>function(){try{return V||(0,J[Xr(J)[0]])((V={exports:{}}).exports,V),V.exports}catch(b){throw V=0,b}},bu=(J,V)=>{for(var p in V)Fe(J,p,{get:V[p],enumerable:!0})},uf=(J,V,p,b)=>{if(V&&typeof V=="object"||typeof V=="function")for(let E of Xr(V))!Cn.call(J,E)&&E!==p&&Fe(J,E,{get:()=>V[E],enumerable:!(b=Zt(V,E))||b.enumerable});return J},Yl=(J,V,p)=>(p=J!=null?ye(ya(J)):{},uf(V||!J||!J.__esModule?Fe(p,"default",{value:J,enumerable:!0}):p,J)),Po=J=>uf(Fe({},"__esModule",{value:!0}),J),Oh=function(J,V){this[0]=J,this[1]=V},ad=J=>{var V=J[On("asyncIterator")],p=!1,b,E={};return V==null?(V=J[On("iterator")](),b=k=>E[k]=l=>V[k](l)):(V=V.call(J),b=k=>E[k]=l=>{if(p){if(p=!1,k==="throw")throw l;return l}return p=!0,{done:!1,value:new Oh(new Promise(e=>{var t=V[k](l);t instanceof Object||Fi("Object expected"),e(t)}),1)}}),E[On("iterator")]=()=>E,b("next"),"throw"in V?b("throw"):E.throw=k=>{throw k},"return"in V&&b("return"),E},ev=ze({"src/version.js"(J){"use strict";J.version="4.0.0"}}),DR=ze({"node_modules/native-promise-only/lib/npo.src.js"(J,V){(function(b,E,k){E[b]=E[b]||k(),typeof V<"u"&&V.exports&&(V.exports=E[b])})("Promise",typeof window<"u"?window:J,function(){"use strict";var b,E,k,l=Object.prototype.toString,e=typeof setImmediate<"u"?function(w){return setImmediate(w)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(w,S,M,C){return Object.defineProperty(w,S,{value:M,writable:!0,configurable:C!==!1})}}catch{b=function(S,M,C){return S[M]=C,S}}k=function(){var w,S,M;function C(_,T){this.fn=_,this.self=T,this.next=void 0}return{add:function(T,f){M=new C(T,f),S?S.next=M:w=M,S=M,M=void 0},drain:function(){var T=w;for(w=S=E=void 0;T;)T.fn.call(T.self),T=T.next}}}();function t(i,w){k.add(i,w),E||(E=e(k.drain))}function n(i){var w,S=typeof i;return i!=null&&(S=="object"||S=="function")&&(w=i.then),typeof w=="function"?w:!1}function r(){for(var i=0;i0&&t(r,S))}catch(M){s.call(new m(S),M)}}}function s(i){var w=this;w.triggered||(w.triggered=!0,w.def&&(w=w.def),w.msg=i,w.state=2,w.chain.length>0&&t(r,w))}function c(i,w,S,M){for(var C=0;CEe?1:de>=Ee?0:NaN}p.descending=function(de,Ee){return Eede?1:Ee>=de?0:NaN},p.min=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qect&&(at=ct)}return at},p.max=function(de,Ee){var qe=-1,tt=de.length,at,ct;if(arguments.length===1){for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}else{for(;++qe=ct){at=ct;break}for(;++qeat&&(at=ct)}return at},p.extent=function(de,Ee){var qe=-1,tt=de.length,at,ct,Nt;if(arguments.length===1){for(;++qe=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt=ct){at=Nt=ct;break}for(;++qect&&(at=ct),Nt1)return Nt/(Jt-1)},p.deviation=function(){var de=p.variance.apply(this,arguments);return de&&Math.sqrt(de)};function h(de){return{left:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)<0?tt=ct+1:at=ct}return tt},right:function(Ee,qe,tt,at){for(arguments.length<3&&(tt=0),arguments.length<4&&(at=Ee.length);tt>>1;de(Ee[ct],qe)>0?at=ct:tt=ct+1}return tt}}}var v=h(s);p.bisectLeft=v.left,p.bisect=p.bisectRight=v.right,p.bisector=function(de){return h(de.length===1?function(Ee,qe){return s(de(Ee),qe)}:de)},p.shuffle=function(de,Ee,qe){(tt=arguments.length)<3&&(qe=de.length,tt<2&&(Ee=0));for(var tt=qe-Ee,at,ct;tt;)ct=Math.random()*tt--|0,at=de[tt+Ee],de[tt+Ee]=de[ct+Ee],de[ct+Ee]=at;return de},p.permute=function(de,Ee){for(var qe=Ee.length,tt=new Array(qe);qe--;)tt[qe]=de[Ee[qe]];return tt},p.pairs=function(de){for(var Ee=0,qe=de.length-1,tt,at=de[0],ct=new Array(qe<0?0:qe);Ee=0;)for(Nt=de[Ee],qe=Nt.length;--qe>=0;)ct[--at]=Nt[qe];return ct};var i=Math.abs;p.range=function(de,Ee,qe){if(arguments.length<3&&(qe=1,arguments.length<2&&(Ee=de,de=0)),(Ee-de)/qe===1/0)throw new Error("infinite range");var tt=[],at=w(i(qe)),ct=-1,Nt;if(de*=at,Ee*=at,qe*=at,qe<0)for(;(Nt=de+qe*++ct)>Ee;)tt.push(Nt/at);else for(;(Nt=de+qe*++ct)=Ee.length)return at?at.call(de,Jt):tt?Jt.sort(tt):Jt;for(var gr=-1,Hr=Jt.length,Vr=Ee[mr++],ca,Aa,Yr,oa=new M,fa;++gr=Ee.length)return St;var mr=[],gr=qe[Jt++];return St.forEach(function(Hr,Vr){mr.push({key:Hr,values:Nt(Vr,Jt)})}),gr?mr.sort(function(Hr,Vr){return gr(Hr.key,Vr.key)}):mr}return de.map=function(St,Jt){return ct(Jt,St,0)},de.entries=function(St){return Nt(ct(p.map,St,0),0)},de.key=function(St){return Ee.push(St),de},de.sortKeys=function(St){return qe[Ee.length-1]=St,de},de.sortValues=function(St){return tt=St,de},de.rollup=function(St){return at=St,de},de},p.set=function(de){var Ee=new O;if(de)for(var qe=0,tt=de.length;qe=0&&(tt=de.slice(qe+1),de=de.slice(0,qe)),de)return arguments.length<2?this[de].on(tt):this[de].on(tt,Ee);if(arguments.length===2){if(Ee==null)for(de in this)this.hasOwnProperty(de)&&this[de].on(tt,null);return this}};function $(de){var Ee=[],qe=new M;function tt(){for(var at=Ee,ct=-1,Nt=at.length,St;++ct=0&&(qe=de.slice(0,Ee))!=="xmlns"&&(de=de.slice(Ee+1)),he.hasOwnProperty(qe)?{space:he[qe],local:de}:de}},q.attr=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node();return de=p.ns.qualify(de),de.local?qe.getAttributeNS(de.space,de.local):qe.getAttribute(de)}for(Ee in de)this.each(xe(Ee,de[Ee]));return this}return this.each(xe(de,Ee))};function xe(de,Ee){de=p.ns.qualify(de);function qe(){this.removeAttribute(de)}function tt(){this.removeAttributeNS(de.space,de.local)}function at(){this.setAttribute(de,Ee)}function ct(){this.setAttributeNS(de.space,de.local,Ee)}function Nt(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttribute(de):this.setAttribute(de,Jt)}function St(){var Jt=Ee.apply(this,arguments);Jt==null?this.removeAttributeNS(de.space,de.local):this.setAttributeNS(de.space,de.local,Jt)}return Ee==null?de.local?tt:qe:typeof Ee=="function"?de.local?St:Nt:de.local?ct:at}function we(de){return de.trim().replace(/\s+/g," ")}q.classed=function(de,Ee){if(arguments.length<2){if(typeof de=="string"){var qe=this.node(),tt=(de=Se(de)).length,at=-1;if(Ee=qe.classList){for(;++at=0;)(ct=qe[tt])&&(at&&at!==ct.nextSibling&&at.parentNode.insertBefore(ct,at),at=ct);return this},q.sort=function(de){de=Ae.apply(this,arguments);for(var Ee=-1,qe=this.length;++Ee=Ee&&(Ee=at+1);!(Jt=Nt[Ee])&&++Ee0&&(de=de.slice(0,at));var Nt=Tt.get(de);Nt&&(de=Nt,ct=$t);function St(){var gr=this[tt];gr&&(this.removeEventListener(de,gr,gr.$),delete this[tt])}function Jt(){var gr=ct(Ee,E(arguments));St.call(this),this.addEventListener(de,this[tt]=gr,gr.$=qe),gr._=Ee}function mr(){var gr=new RegExp("^__on([^.]+)"+p.requote(de)+"$"),Hr;for(var Vr in this)if(Hr=Vr.match(gr)){var ca=this[Vr];this.removeEventListener(Hr[1],ca,ca.$),delete this[Vr]}}return at?Ee?Jt:St:Ee?j:mr}var Tt=p.map({mouseenter:"mouseover",mouseleave:"mouseout"});k&&Tt.forEach(function(de){"on"+de in k&&Tt.remove(de)});function At(de,Ee){return function(qe){var tt=p.event;p.event=qe,Ee[0]=this.__data__;try{de.apply(this,Ee)}finally{p.event=tt}}}function $t(de,Ee){var qe=At(de,Ee);return function(tt){var at=this,ct=tt.relatedTarget;(!ct||ct!==at&&!(ct.compareDocumentPosition(at)&8))&&qe.call(at,tt)}}var rr,_r=0;function Xt(de){var Ee=".dragsuppress-"+ ++_r,qe="click"+Ee,tt=p.select(e(de)).on("touchmove"+Ee,Q).on("dragstart"+Ee,Q).on("selectstart"+Ee,Q);if(rr==null&&(rr="onselectstart"in de?!1:F(de.style,"userSelect")),rr){var at=l(de).style,ct=at[rr];at[rr]="none"}return function(Nt){if(tt.on(Ee,null),rr&&(at[rr]=ct),Nt){var St=function(){tt.on(qe,null)};tt.on(qe,function(){Q(),St()},!0),setTimeout(St,0)}}}p.mouse=function(de){return Ot(de,re())};var or=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(de,Ee){Ee.changedTouches&&(Ee=Ee.changedTouches[0]);var qe=de.ownerSVGElement||de;if(qe.createSVGPoint){var tt=qe.createSVGPoint();if(or<0){var at=e(de);if(at.scrollX||at.scrollY){qe=p.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var ct=qe[0][0].getScreenCTM();or=!(ct.f||ct.e),qe.remove()}}return or?(tt.x=Ee.pageX,tt.y=Ee.pageY):(tt.x=Ee.clientX,tt.y=Ee.clientY),tt=tt.matrixTransform(de.getScreenCTM().inverse()),[tt.x,tt.y]}var Nt=de.getBoundingClientRect();return[Ee.clientX-Nt.left-de.clientLeft,Ee.clientY-Nt.top-de.clientTop]}p.touch=function(de,Ee,qe){if(arguments.length<3&&(qe=Ee,Ee=re().changedTouches),Ee){for(var tt=0,at=Ee.length,ct;tt0?1:de<0?-1:0}function Pt(de,Ee,qe){return(Ee[0]-de[0])*(qe[1]-de[1])-(Ee[1]-de[1])*(qe[0]-de[0])}function Ct(de){return de>1?0:de<-1?Ne:Math.acos(de)}function qt(de){return de>1?Je:de<-1?-Je:Math.asin(de)}function Vt(de){return((de=Math.exp(de))-1/de)/2}function Ht(de){return((de=Math.exp(de))+1/de)/2}function Sr(de){return((de=Math.exp(2*de))-1)/(de+1)}function Kr(de){return(de=Math.sin(de/2))*de}var Yt=Math.SQRT2,Rt=2,nr=4;p.interpolateZoom=function(de,Ee){var qe=de[0],tt=de[1],at=de[2],ct=Ee[0],Nt=Ee[1],St=Ee[2],Jt=ct-qe,mr=Nt-tt,gr=Jt*Jt+mr*mr,Hr,Vr;if(gr0&&(be=be.transition().duration(Nt)),be.call(Ma.event)}function xi(){oa&&oa.domain(Yr.range().map(function(be){return(be-de.x)/de.k}).map(Yr.invert)),Ea&&Ea.domain(fa.range().map(function(be){return(be-de.y)/de.k}).map(fa.invert))}function di(be){St++||be({type:"zoomstart"})}function uo(be){xi(),be({type:"zoom",scale:de.k,translate:[de.x,de.y]})}function pe(be){--St||(be({type:"zoomend"}),qe=null)}function y(){var be=this,Re=Aa.of(be,arguments),je=0,Ze=p.select(e(be)).on(mr,Dt).on(gr,Gt),ut=sa(p.mouse(be)),ft=Xt(be);Qi.call(be),di(Re);function Dt(){je=1,zn(p.mouse(be),ut),uo(Re)}function Gt(){Ze.on(mr,null).on(gr,null),ft(je),pe(Re)}}function N(){var be=this,Re=Aa.of(be,arguments),je={},Ze=0,ut,ft=".zoom-"+p.event.changedTouches[0].identifier,Dt="touchmove"+ft,Gt="touchend"+ft,Kt=[],st=p.select(be),It=Xt(be);ir(),di(Re),st.on(Jt,null).on(Vr,ir);function Ut(){var hr=p.touches(be);return ut=de.k,hr.forEach(function(vr){vr.identifier in je&&(je[vr.identifier]=sa(vr))}),hr}function ir(){var hr=p.event.target;p.select(hr).on(Dt,dr).on(Gt,Ar),Kt.push(hr);for(var vr=p.event.changedTouches,Or=0,Cr=vr.length;Or1){var Ta=ta[0],Ra=ta[1],ua=Ta[0]-Ra[0],ia=Ta[1]-Ra[1];Ze=ua*ua+ia*ia}}function dr(){var hr=p.touches(be),vr,Or,Cr,ta;Qi.call(be);for(var ka=0,Ta=hr.length;ka1?1:Ee,qe=qe<0?0:qe>1?1:qe,at=qe<=.5?qe*(1+Ee):qe+Ee-qe*Ee,tt=2*qe-at;function ct(St){return St>360?St-=360:St<0&&(St+=360),St<60?tt+(at-tt)*St/60:St<180?at:St<240?tt+(at-tt)*(240-St)/60:tt}function Nt(St){return Math.round(ct(St)*255)}return new Oa(Nt(de+120),Nt(de),Nt(de-120))}p.hcl=La;function La(de,Ee,qe){return this instanceof La?(this.h=+de,this.c=+Ee,void(this.l=+qe)):arguments.length<2?de instanceof La?new La(de.h,de.c,de.l):de instanceof ja?en(de.l,de.a,de.b):en((de=Dr((de=p.rgb(de)).r,de.g,de.b)).l,de.a,de.b):new La(de,Ee,qe)}var un=La.prototype=new Qr;un.brighter=function(de){return new La(this.h,this.c,Math.min(100,this.l+Nn*(arguments.length?de:1)))},un.darker=function(de){return new La(this.h,this.c,Math.max(0,this.l-Nn*(arguments.length?de:1)))},un.rgb=function(){return Xa(this.h,this.c,this.l).rgb()};function Xa(de,Ee,qe){return isNaN(de)&&(de=0),isNaN(Ee)&&(Ee=0),new ja(qe,Math.cos(de*=et)*Ee,Math.sin(de)*Ee)}p.lab=ja;function ja(de,Ee,qe){return this instanceof ja?(this.l=+de,this.a=+Ee,void(this.b=+qe)):arguments.length<2?de instanceof ja?new ja(de.l,de.a,de.b):de instanceof La?Xa(de.h,de.c,de.l):Dr((de=Oa(de)).r,de.g,de.b):new ja(de,Ee,qe)}var Nn=18,yn=.95047,Un=1,li=1.08883,Yn=ja.prototype=new Qr;Yn.brighter=function(de){return new ja(Math.min(100,this.l+Nn*(arguments.length?de:1)),this.a,this.b)},Yn.darker=function(de){return new ja(Math.max(0,this.l-Nn*(arguments.length?de:1)),this.a,this.b)},Yn.rgb=function(){return on(this.l,this.a,this.b)};function on(de,Ee,qe){var tt=(de+16)/116,at=tt+Ee/500,ct=tt-qe/200;return at=vi(at)*yn,tt=vi(tt)*Un,ct=vi(ct)*li,new Oa(Ja(3.2404542*at-1.5371385*tt-.4985314*ct),Ja(-.969266*at+1.8760108*tt+.041556*ct),Ja(.0556434*at-.2040259*tt+1.0572252*ct))}function en(de,Ee,qe){return de>0?new La(Math.atan2(qe,Ee)*Mt,Math.sqrt(Ee*Ee+qe*qe),de):new La(NaN,NaN,de)}function vi(de){return de>.206893034?de*de*de:(de-4/29)/7.787037}function Yi(de){return de>.008856?Math.pow(de,1/3):7.787037*de+4/29}function Ja(de){return Math.round(255*(de<=.00304?12.92*de:1.055*Math.pow(de,1/2.4)-.055))}p.rgb=Oa;function Oa(de,Ee,qe){return this instanceof Oa?(this.r=~~de,this.g=~~Ee,void(this.b=~~qe)):arguments.length<2?de instanceof Oa?new Oa(de.r,de.g,de.b):Tr(""+de,Oa,Pa):new Oa(de,Ee,qe)}function lt(de){return new Oa(de>>16,de>>8&255,de&255)}function rt(de){return lt(de)+""}var fr=Oa.prototype=new Qr;fr.brighter=function(de){de=Math.pow(.7,arguments.length?de:1);var Ee=this.r,qe=this.g,tt=this.b,at=30;return!Ee&&!qe&&!tt?new Oa(at,at,at):(Ee&&Ee>4,tt=tt>>4|tt,at=Jt&240,at=at>>4|at,ct=Jt&15,ct=ct<<4|ct):de.length===7&&(tt=(Jt&16711680)>>16,at=(Jt&65280)>>8,ct=Jt&255)),Ee(tt,at,ct))}function Ir(de,Ee,qe){var tt=Math.min(de/=255,Ee/=255,qe/=255),at=Math.max(de,Ee,qe),ct=at-tt,Nt,St,Jt=(at+tt)/2;return ct?(St=Jt<.5?ct/(at+tt):ct/(2-at-tt),de==at?Nt=(Ee-qe)/ct+(Ee0&&Jt<1?0:Nt),new Zr(Nt,St,Jt)}function Dr(de,Ee,qe){de=ot(de),Ee=ot(Ee),qe=ot(qe);var tt=Yi((.4124564*de+.3575761*Ee+.1804375*qe)/yn),at=Yi((.2126729*de+.7151522*Ee+.072175*qe)/Un),ct=Yi((.0193339*de+.119192*Ee+.9503041*qe)/li);return ja(116*at-16,500*(tt-at),200*(at-ct))}function ot(de){return(de/=255)<=.04045?de/12.92:Math.pow((de+.055)/1.055,2.4)}function kt(de){var Ee=parseFloat(de);return de.charAt(de.length-1)==="%"?Math.round(Ee*2.55):Ee}var jt=p.map({aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074});jt.forEach(function(de,Ee){jt.set(de,lt(Ee))});function ar(de){return typeof de=="function"?de:function(){return de}}p.functor=ar,p.xhr=Er(D);function Er(de){return function(Ee,qe,tt){return arguments.length===2&&typeof qe=="function"&&(tt=qe,qe=null),xr(Ee,qe,de,tt)}}function xr(de,Ee,qe,tt){var at={},ct=p.dispatch("beforesend","progress","load","error"),Nt={},St=new XMLHttpRequest,Jt=null;self.XDomainRequest&&!("withCredentials"in St)&&/^(http(s)?:)?\/\//.test(de)&&(St=new XDomainRequest),"onload"in St?St.onload=St.onerror=mr:St.onreadystatechange=function(){St.readyState>3&&mr()};function mr(){var gr=St.status,Hr;if(!gr&&Lr(St)||gr>=200&&gr<300||gr===304){try{Hr=qe.call(at,St)}catch(Vr){ct.error.call(at,Vr);return}ct.load.call(at,Hr)}else ct.error.call(at,St)}return St.onprogress=function(gr){var Hr=p.event;p.event=gr;try{ct.progress.call(at,St)}finally{p.event=Hr}},at.header=function(gr,Hr){return gr=(gr+"").toLowerCase(),arguments.length<2?Nt[gr]:(Hr==null?delete Nt[gr]:Nt[gr]=Hr+"",at)},at.mimeType=function(gr){return arguments.length?(Ee=gr==null?null:gr+"",at):Ee},at.responseType=function(gr){return arguments.length?(Jt=gr,at):Jt},at.response=function(gr){return qe=gr,at},["get","post"].forEach(function(gr){at[gr]=function(){return at.send.apply(at,[gr].concat(E(arguments)))}}),at.send=function(gr,Hr,Vr){if(arguments.length===2&&typeof Hr=="function"&&(Vr=Hr,Hr=null),St.open(gr,de,!0),Ee!=null&&!("accept"in Nt)&&(Nt.accept=Ee+",*/*"),St.setRequestHeader)for(var ca in Nt)St.setRequestHeader(ca,Nt[ca]);return Ee!=null&&St.overrideMimeType&&St.overrideMimeType(Ee),Jt!=null&&(St.responseType=Jt),Vr!=null&&at.on("error",Vr).on("load",function(Aa){Vr(null,Aa)}),ct.beforesend.call(at,St),St.send(Hr??null),at},at.abort=function(){return St.abort(),at},p.rebind(at,ct,"on"),tt==null?at:at.get(zr(tt))}function zr(de){return de.length===1?function(Ee,qe){de(Ee==null?qe:null)}:de}function Lr(de){var Ee=de.responseType;return Ee&&Ee!=="text"?de.response:de.responseText}p.dsv=function(de,Ee){var qe=new RegExp('["'+de+` +]`),tt=de.charCodeAt(0);function at(mr,gr,Hr){arguments.length<3&&(Hr=gr,gr=null);var Vr=xr(mr,Ee,gr==null?ct:Nt(gr),Hr);return Vr.row=function(ca){return arguments.length?Vr.response((gr=ca)==null?ct:Nt(ca)):gr},Vr}function ct(mr){return at.parse(mr.responseText)}function Nt(mr){return function(gr){return at.parse(gr.responseText,mr)}}at.parse=function(mr,gr){var Hr;return at.parseRows(mr,function(Vr,ca){if(Hr)return Hr(Vr,ca-1);var Aa=function(Yr){for(var oa={},fa=Vr.length,Ea=0;Ea=Aa)return Vr;if(Ea)return Ea=!1,Hr;var hn=Yr;if(mr.charCodeAt(hn)===34){for(var Tn=hn;Tn++24?(isFinite(Ee)&&(clearTimeout(pn),pn=setTimeout(rn,Ee)),wa=0):(wa=1,tn(rn))}p.timer.flush=function(){Ri(),Gn()};function Ri(){for(var de=Date.now(),Ee=aa;Ee;)de>=Ee.t&&Ee.c(de-Ee.t)&&(Ee.c=null),Ee=Ee.n;return de}function Gn(){for(var de,Ee=aa,qe=1/0;Ee;)Ee.c?(Ee.t=0;--St)Yr.push(at[mr[Hr[St]][2]]);for(St=+ca;St1&&Pt(de[qe[tt-2]],de[qe[tt-1]],de[at])<=0;)--tt;qe[tt++]=at}return qe.slice(0,tt)}function Ai(de,Ee){return de[0]-Ee[0]||de[1]-Ee[1]}p.geom.polygon=function(de){return G(de,jn),de};var jn=p.geom.polygon.prototype=[];jn.area=function(){for(var de=-1,Ee=this.length,qe,tt=this[Ee-1],at=0;++deht)St=St.L;else if(Nt=Ee-Wo(St,qe),Nt>ht){if(!St.R){tt=St;break}St=St.R}else{ct>-ht?(tt=St.P,at=St):Nt>-ht?(tt=St,at=St.N):tt=at=St;break}var Jt=go(de);if(oo.insert(tt,Jt),!(!tt&&!at)){if(tt===at){Xi(tt),at=go(tt.site),oo.insert(Jt,at),Jt.edge=at.edge=Vo(tt.site,Jt.site),Io(tt),Io(at);return}if(!at){Jt.edge=Vo(tt.site,Jt.site);return}Xi(tt),Xi(at);var mr=tt.site,gr=mr.x,Hr=mr.y,Vr=de.x-gr,ca=de.y-Hr,Aa=at.site,Yr=Aa.x-gr,oa=Aa.y-Hr,fa=2*(Vr*oa-ca*Yr),Ea=Vr*Vr+ca*ca,Ma=Yr*Yr+oa*oa,sa={x:(oa*Ea-ca*Ma)/fa+gr,y:(Vr*Ma-Yr*Ea)/fa+Hr};Ts(at.edge,mr,Aa,sa),Jt.edge=Vo(mr,de,null,sa),at.edge=Vo(de,Aa,null,sa),Io(tt),Io(at)}}function jo(de,Ee){var qe=de.site,tt=qe.x,at=qe.y,ct=at-Ee;if(!ct)return tt;var Nt=de.P;if(!Nt)return-1/0;qe=Nt.site;var St=qe.x,Jt=qe.y,mr=Jt-Ee;if(!mr)return St;var gr=St-tt,Hr=1/ct-1/mr,Vr=gr/mr;return Hr?(-Vr+Math.sqrt(Vr*Vr-2*Hr*(gr*gr/(-2*mr)-Jt+mr/2+at-ct/2)))/Hr+tt:(tt+St)/2}function Wo(de,Ee){var qe=de.N;if(qe)return jo(qe,Ee);var tt=de.site;return tt.y===Ee?tt.x:1/0}function to(de){this.site=de,this.edges=[]}to.prototype.prepare=function(){for(var de=this.edges,Ee=de.length,qe;Ee--;)qe=de[Ee].edge,(!qe.b||!qe.a)&&de.splice(Ee,1);return de.sort(pi),de.length};function wo(de){for(var Ee=de[0][0],qe=de[1][0],tt=de[0][1],at=de[1][1],ct,Nt,St,Jt,mr=io,gr=mr.length,Hr,Vr,ca,Aa,Yr,oa;gr--;)if(Hr=mr[gr],!(!Hr||!Hr.prepare()))for(ca=Hr.edges,Aa=ca.length,Vr=0;Vrht||i(Jt-Nt)>ht)&&(ca.splice(Vr,0,new Bo(Vs(Hr.site,oa,i(St-Ee)ht?{x:Ee,y:i(ct-Ee)ht?{x:i(Nt-at)ht?{x:qe,y:i(ct-qe)ht?{x:i(Nt-tt)=-De)){var Vr=Jt*Jt+mr*mr,ca=gr*gr+oa*oa,Aa=(oa*Vr-mr*ca)/Hr,Yr=(Jt*ca-gr*Vr)/Hr,oa=Yr+St,fa=Mi.pop()||new Vi;fa.arc=de,fa.site=at,fa.x=Aa+Nt,fa.y=oa+Math.sqrt(Aa*Aa+Yr*Yr),fa.cy=oa,de.circle=fa;for(var Ea=null,Ma=Hi._;Ma;)if(fa.y0)){if(Yr/=ca,ca<0){if(Yr0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}if(Yr=qe-St,!(!ca&&Yr<0)){if(Yr/=ca,ca<0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}else if(ca>0){if(Yr0)){if(Yr/=Aa,Aa<0){if(Yr0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}if(Yr=tt-Jt,!(!Aa&&Yr<0)){if(Yr/=Aa,Aa<0){if(Yr>Vr)return;Yr>Hr&&(Hr=Yr)}else if(Aa>0){if(Yr0&&(at.a={x:St+Hr*ca,y:Jt+Hr*Aa}),Vr<1&&(at.b={x:St+Vr*ca,y:Jt+Vr*Aa}),at}}}}}}function Uo(de){for(var Ee=qi,qe=Ko(de[0][0],de[0][1],de[1][0],de[1][1]),tt=Ee.length,at;tt--;)at=Ee[tt],(!Ls(at,de)||!qe(at)||i(at.a.x-at.b.x)=ct)return;if(gr>Vr){if(!tt)tt={x:Aa,y:Nt};else if(tt.y>=St)return;qe={x:Aa,y:St}}else{if(!tt)tt={x:Aa,y:St};else if(tt.y1)if(gr>Vr){if(!tt)tt={x:(Nt-fa)/oa,y:Nt};else if(tt.y>=St)return;qe={x:(St-fa)/oa,y:St}}else{if(!tt)tt={x:(St-fa)/oa,y:St};else if(tt.y=ct)return;qe={x:ct,y:oa*ct+fa}}else{if(!tt)tt={x:ct,y:oa*ct+fa};else if(tt.x=gr&&fa.x<=Vr&&fa.y>=Hr&&fa.y<=ca?[[gr,ca],[Vr,ca],[Vr,Hr],[gr,Hr]]:[];Ea.point=Jt[Yr]}),mr}function St(Jt){return Jt.map(function(mr,gr){return{x:Math.round(tt(mr,gr)/ht)*ht,y:Math.round(at(mr,gr)/ht)*ht,i:gr}})}return Nt.links=function(Jt){return hl(St(Jt)).edges.filter(function(mr){return mr.l&&mr.r}).map(function(mr){return{source:Jt[mr.l.i],target:Jt[mr.r.i]}})},Nt.triangles=function(Jt){var mr=[];return hl(St(Jt)).cells.forEach(function(gr,Hr){for(var Vr=gr.site,ca=gr.edges.sort(pi),Aa=-1,Yr=ca.length,oa,fa,Ea=ca[Yr-1].edge,Ma=Ea.l===Vr?Ea.r:Ea.l;++AaMa&&(Ma=gr.x),gr.y>sa&&(sa=gr.y),ca.push(gr.x),Aa.push(gr.y);else for(Yr=0;YrMa&&(Ma=hn),Tn>sa&&(sa=Tn),ca.push(hn),Aa.push(Tn)}var zn=Ma-fa,$n=sa-Ea;zn>$n?sa=Ea+zn:Ma=fa+$n;function xi(pe,y,N,ie,fe,be,Re,je){if(!(isNaN(N)||isNaN(ie)))if(pe.leaf){var Ze=pe.x,ut=pe.y;if(Ze!=null)if(i(Ze-N)+i(ut-ie)<.01)di(pe,y,N,ie,fe,be,Re,je);else{var ft=pe.point;pe.x=pe.y=pe.point=null,di(pe,ft,Ze,ut,fe,be,Re,je),di(pe,y,N,ie,fe,be,Re,je)}else pe.x=N,pe.y=ie,pe.point=y}else di(pe,y,N,ie,fe,be,Re,je)}function di(pe,y,N,ie,fe,be,Re,je){var Ze=(fe+Re)*.5,ut=(be+je)*.5,ft=N>=Ze,Dt=ie>=ut,Gt=Dt<<1|ft;pe.leaf=!1,pe=pe.nodes[Gt]||(pe.nodes[Gt]=Fl()),ft?fe=Ze:Re=Ze,Dt?be=ut:je=ut,xi(pe,y,N,ie,fe,be,Re,je)}var uo=Fl();if(uo.add=function(pe){xi(uo,pe,+Hr(pe,++Yr),+Vr(pe,Yr),fa,Ea,Ma,sa)},uo.visit=function(pe){pl(pe,uo,fa,Ea,Ma,sa)},uo.find=function(pe){return $u(uo,pe[0],pe[1],fa,Ea,Ma,sa)},Yr=-1,Ee==null){for(;++Yrct||Vr>Nt||ca=hn,$n=qe>=Tn,xi=$n<<1|zn,di=xi+4;xiqe&&(ct=Ee.slice(qe,ct),St[Nt]?St[Nt]+=ct:St[++Nt]=ct),(tt=tt[0])===(at=at[0])?St[Nt]?St[Nt]+=at:St[++Nt]=at:(St[++Nt]=null,Jt.push({i:Nt,x:vs(tt,at)})),qe=rl.lastIndex;return qe=0&&!(tt=p.interpolators[qe](de,Ee)););return tt}p.interpolators=[function(de,Ee){var qe=typeof Ee;return(qe==="string"?jt.has(Ee.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Ee)?uu:os:Ee instanceof Qr?uu:Array.isArray(Ee)?zu:qe==="object"&&isNaN(Ee)?tl:vs)(de,Ee)}],p.interpolateArray=zu;function zu(de,Ee){var qe=[],tt=[],at=de.length,ct=Ee.length,Nt=Math.min(de.length,Ee.length),St;for(St=0;St=0?de.slice(0,Ee):de,tt=Ee>=0?de.slice(Ee+1):"in";return qe=bc.get(qe)||Ku,tt=Lh.get(tt)||D,rh(tt(qe.apply(null,b.call(arguments,1))))};function rh(de){return function(Ee){return Ee<=0?0:Ee>=1?1:de(Ee)}}function Ju(de){return function(Ee){return 1-de(1-Ee)}}function ss(de){return function(Ee){return .5*(Ee<.5?de(2*Ee):2-de(2-2*Ee))}}function ah(de){return de*de}function wc(de){return de*de*de}function pc(de){if(de<=0)return 0;if(de>=1)return 1;var Ee=de*de,qe=Ee*de;return 4*(de<.5?qe:3*(de-Ee)+qe-.75)}function Nf(de){return function(Ee){return Math.pow(Ee,de)}}function Bu(de){return 1-Math.cos(de*Je)}function Tc(de){return Math.pow(2,10*(de-1))}function Ou(de){return 1-Math.sqrt(1-de*de)}function Gc(de,Ee){var qe;return arguments.length<2&&(Ee=.45),arguments.length?qe=Ee/We*Math.asin(1/de):(de=1,qe=Ee/4),function(tt){return 1+de*Math.pow(2,-10*tt)*Math.sin((tt-qe)*We/Ee)}}function pf(de){return de||(de=1.70158),function(Ee){return Ee*Ee*((de+1)*Ee-de)}}function $l(de){return de<1/2.75?7.5625*de*de:de<2/2.75?7.5625*(de-=1.5/2.75)*de+.75:de<2.5/2.75?7.5625*(de-=2.25/2.75)*de+.9375:7.5625*(de-=2.625/2.75)*de+.984375}p.interpolateHcl=jf;function jf(de,Ee){de=p.hcl(de),Ee=p.hcl(Ee);var qe=de.h,tt=de.c,at=de.l,ct=Ee.h-qe,Nt=Ee.c-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.c:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Xa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateHsl=Hc;function Hc(de,Ee){de=p.hsl(de),Ee=p.hsl(Ee);var qe=de.h,tt=de.s,at=de.l,ct=Ee.h-qe,Nt=Ee.s-tt,St=Ee.l-at;return isNaN(Nt)&&(Nt=0,tt=isNaN(tt)?Ee.s:tt),isNaN(ct)?(ct=0,qe=isNaN(qe)?Ee.h:qe):ct>180?ct-=360:ct<-180&&(ct+=360),function(Jt){return Pa(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateLab=Wc;function Wc(de,Ee){de=p.lab(de),Ee=p.lab(Ee);var qe=de.l,tt=de.a,at=de.b,ct=Ee.l-qe,Nt=Ee.a-tt,St=Ee.b-at;return function(Jt){return on(qe+ct*Jt,tt+Nt*Jt,at+St*Jt)+""}}p.interpolateRound=Qu;function Qu(de,Ee){return Ee-=de,function(qe){return Math.round(de+Ee*qe)}}p.transform=function(de){var Ee=k.createElementNS(p.ns.prefix.svg,"g");return(p.transform=function(qe){if(qe!=null){Ee.setAttribute("transform",qe);var tt=Ee.transform.baseVal.consolidate()}return new Yc(tt?tt.matrix:Xc)})(de)};function Yc(de){var Ee=[de.a,de.b],qe=[de.c,de.d],tt=Uf(Ee),at=Nu(Ee,qe),ct=Uf(al(qe,Ee,-at))||0;Ee[0]*qe[1]180?Ee+=360:Ee-de>180&&(de+=360),tt.push({i:qe.push(ju(qe)+"rotate(",null,")")-2,x:vs(de,Ee)})):Ee&&qe.push(ju(qe)+"rotate("+Ee+")")}function ec(de,Ee,qe,tt){de!==Ee?tt.push({i:qe.push(ju(qe)+"skewX(",null,")")-2,x:vs(de,Ee)}):Ee&&qe.push(ju(qe)+"skewX("+Ee+")")}function cu(de,Ee,qe,tt){if(de[0]!==Ee[0]||de[1]!==Ee[1]){var at=qe.push(ju(qe)+"scale(",null,",",null,")");tt.push({i:at-4,x:vs(de[0],Ee[0])},{i:at-2,x:vs(de[1],Ee[1])})}else(Ee[0]!==1||Ee[1]!==1)&&qe.push(ju(qe)+"scale("+Ee+")")}function tc(de,Ee){var qe=[],tt=[];return de=p.transform(de),Ee=p.transform(Ee),Ac(de.translate,Ee.translate,qe,tt),Zc(de.rotate,Ee.rotate,qe,tt),ec(de.skew,Ee.skew,qe,tt),cu(de.scale,Ee.scale,qe,tt),de=Ee=null,function(at){for(var ct=-1,Nt=tt.length,St;++ct0?ct=sa:(qe.c=null,qe.t=NaN,qe=null,Ee.end({type:"end",alpha:ct=0})):sa>0&&(Ee.start({type:"start",alpha:ct=sa}),qe=ai(de.tick)),de):ct},de.start=function(){var sa,hn=ca.length,Tn=Aa.length,zn=tt[0],$n=tt[1],xi,di;for(sa=0;sa=0;)ct.push(gr=mr[Jt]),gr.parent=St,gr.depth=St.depth+1;qe&&(St.value=0),St.children=mr}else qe&&(St.value=+qe.call(tt,St,St.depth)||0),delete St.children;return El(at,function(Hr){var Vr,ca;de&&(Vr=Hr.children)&&Vr.sort(de),qe&&(ca=Hr.parent)&&(ca.value+=Hr.value)}),Nt}return tt.sort=function(at){return arguments.length?(de=at,tt):de},tt.children=function(at){return arguments.length?(Ee=at,tt):Ee},tt.value=function(at){return arguments.length?(qe=at,tt):qe},tt.revalue=function(at){return qe&&(Sl(at,function(ct){ct.children&&(ct.value=0)}),El(at,function(ct){var Nt;ct.children||(ct.value=+qe.call(tt,ct,ct.depth)||0),(Nt=ct.parent)&&(Nt.value+=ct.value)})),at},tt};function fu(de,Ee){return p.rebind(de,Ee,"sort","children","value"),de.nodes=de,de.links=_l,de}function Sl(de,Ee){for(var qe=[de];(de=qe.pop())!=null;)if(Ee(de),(at=de.children)&&(tt=at.length))for(var tt,at;--tt>=0;)qe.push(at[tt])}function El(de,Ee){for(var qe=[de],tt=[];(de=qe.pop())!=null;)if(tt.push(de),(Nt=de.children)&&(ct=Nt.length))for(var at=-1,ct,Nt;++atat&&(at=St),tt.push(St)}for(Nt=0;Nttt&&(qe=Ee,tt=at);return qe}function _f(de){return de.reduce(Mu,0)}function Mu(de,Ee){return de+Ee[1]}p.layout.histogram=function(){var de=!0,Ee=Number,qe=Vu,tt=ic;function at(ct,Vr){for(var St=[],Jt=ct.map(Ee,this),mr=qe.call(this,Jt,Vr),gr=tt.call(this,mr,Jt,Vr),Hr,Vr=-1,ca=Jt.length,Aa=gr.length-1,Yr=de?1:1/ca,oa;++Vr0)for(Vr=-1;++Vr=mr[0]&&oa<=mr[1]&&(Hr=St[p.bisect(gr,oa,1,Aa)-1],Hr.y+=Yr,Hr.push(ct[Vr]));return St}return at.value=function(ct){return arguments.length?(Ee=ct,at):Ee},at.range=function(ct){return arguments.length?(qe=ar(ct),at):qe},at.bins=function(ct){return arguments.length?(tt=typeof ct=="number"?function(Nt){return Sc(Nt,ct)}:ar(ct),at):tt},at.frequency=function(ct){return arguments.length?(de=!!ct,at):de},at};function ic(de,Ee){return Sc(de,Math.ceil(Math.log(Ee.length)/Math.LN2+1))}function Sc(de,Ee){for(var qe=-1,tt=+de[0],at=(de[1]-tt)/Ee,ct=[];++qe<=Ee;)ct[qe]=at*qe+tt;return ct}function Vu(de){return[p.min(de),p.max(de)]}p.layout.pack=function(){var de=p.layout.hierarchy().sort(xo),Ee=0,qe=[1,1],tt;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr=qe[0],gr=qe[1],Hr=tt==null?Math.sqrt:typeof tt=="function"?tt:function(){return tt};if(Jt.x=Jt.y=0,El(Jt,function(ca){ca.r=+Hr(ca.value)}),El(Jt,xf),Ee){var Vr=Ee*(tt?1:Math.max(2*Jt.r/mr,2*Jt.r/gr))/2;El(Jt,function(ca){ca.r+=Vr}),El(Jt,xf),El(Jt,function(ca){ca.r-=Vr})}return Hf(Jt,mr/2,gr/2,tt?1:1/Math.max(2*Jt.r/mr,2*Jt.r/gr)),St}return at.size=function(ct){return arguments.length?(qe=ct,at):qe},at.radius=function(ct){return arguments.length?(tt=ct==null||typeof ct=="function"?ct:+ct,at):tt},at.padding=function(ct){return arguments.length?(Ee=+ct,at):Ee},fu(at,de)};function xo(de,Ee){return de.value-Ee.value}function Ec(de,Ee){var qe=de._pack_next;de._pack_next=Ee,Ee._pack_prev=de,Ee._pack_next=qe,qe._pack_prev=Ee}function xh(de,Ee){de._pack_next=Ee,Ee._pack_prev=de}function Vf(de,Ee){var qe=Ee.x-de.x,tt=Ee.y-de.y,at=de.r+Ee.r;return .999*at*at>qe*qe+tt*tt}function xf(de){if(!(Ee=de.children)||!(Vr=Ee.length))return;var Ee,qe=1/0,tt=-1/0,at=1/0,ct=-1/0,Nt,St,Jt,mr,gr,Hr,Vr;function ca(sa){qe=Math.min(sa.x-sa.r,qe),tt=Math.max(sa.x+sa.r,tt),at=Math.min(sa.y-sa.r,at),ct=Math.max(sa.y+sa.r,ct)}if(Ee.forEach(Gf),Nt=Ee[0],Nt.x=-Nt.r,Nt.y=0,ca(Nt),Vr>1&&(St=Ee[1],St.x=St.r,St.y=0,ca(St),Vr>2))for(Jt=Ee[2],il(Nt,St,Jt),ca(Jt),Ec(Nt,Jt),Nt._pack_prev=Jt,Ec(Jt,St),St=Nt._pack_next,mr=3;mroa.x&&(oa=hn),hn.depth>fa.depth&&(fa=hn)});var Ea=Ee(Yr,oa)/2-Yr.x,Ma=qe[0]/(oa.x+Ee(oa,Yr)/2+Ea),sa=qe[1]/(fa.depth||1);Sl(ca,function(hn){hn.x=(hn.x+Ea)*Ma,hn.y=hn.depth*sa})}return Vr}function ct(gr){for(var Hr={A:null,children:[gr]},Vr=[Hr],ca;(ca=Vr.pop())!=null;)for(var Aa=ca.children,Yr,oa=0,fa=Aa.length;oa0&&(Lc(Ft(Yr,gr,Vr),gr,hn),fa+=hn,Ea+=hn),Ma+=Yr.m,fa+=ca.m,sa+=oa.m,Ea+=Aa.m;Yr&&!Cc(Aa)&&(Aa.t=Yr,Aa.m+=Ma-Ea),ca&&!kc(oa)&&(oa.t=ca,oa.m+=fa-sa,Vr=gr)}return Vr}function mr(gr){gr.x*=qe[0],gr.y=gr.depth*qe[1]}return at.separation=function(gr){return arguments.length?(Ee=gr,at):Ee},at.size=function(gr){return arguments.length?(tt=(qe=gr)==null?mr:null,at):tt?null:qe},at.nodeSize=function(gr){return arguments.length?(tt=(qe=gr)==null?null:mr,at):tt?qe:null},fu(at,de)};function kl(de,Ee){return de.parent==Ee.parent?1:2}function kc(de){var Ee=de.children;return Ee.length?Ee[0]:de.t}function Cc(de){var Ee=de.children,qe;return(qe=Ee.length)?Ee[qe-1]:de.t}function Lc(de,Ee,qe){var tt=qe/(Ee.i-de.i);Ee.c-=tt,Ee.s+=qe,de.c+=tt,Ee.z+=qe,Ee.m+=qe}function vc(de){for(var Ee=0,qe=0,tt=de.children,at=tt.length,ct;--at>=0;)ct=tt[at],ct.z+=Ee,ct.m+=Ee,Ee+=ct.s+(qe+=ct.c)}function Ft(de,Ee,qe){return de.a.parent===Ee.parent?de.a:qe}p.layout.cluster=function(){var de=p.layout.hierarchy().sort(null).value(null),Ee=kl,qe=[1,1],tt=!1;function at(ct,Nt){var St=de.call(this,ct,Nt),Jt=St[0],mr,gr=0;El(Jt,function(Yr){var oa=Yr.children;oa&&oa.length?(Yr.x=Fr(oa),Yr.y=tr(oa)):(Yr.x=mr?gr+=Ee(Yr,mr):0,Yr.y=0,mr=Yr)});var Hr=wr(Jt),Vr=ea(Jt),ca=Hr.x-Ee(Hr,Vr)/2,Aa=Vr.x+Ee(Vr,Hr)/2;return El(Jt,tt?function(Yr){Yr.x=(Yr.x-Jt.x)*qe[0],Yr.y=(Jt.y-Yr.y)*qe[1]}:function(Yr){Yr.x=(Yr.x-ca)/(Aa-ca)*qe[0],Yr.y=(1-(Jt.y?Yr.y/Jt.y:1))*qe[1]}),St}return at.separation=function(ct){return arguments.length?(Ee=ct,at):Ee},at.size=function(ct){return arguments.length?(tt=(qe=ct)==null,at):tt?null:qe},at.nodeSize=function(ct){return arguments.length?(tt=(qe=ct)!=null,at):tt?qe:null},fu(at,de)};function tr(de){return 1+p.max(de,function(Ee){return Ee.y})}function Fr(de){return de.reduce(function(Ee,qe){return Ee+qe.x},0)/de.length}function wr(de){var Ee=de.children;return Ee&&Ee.length?wr(Ee[0]):de}function ea(de){var Ee=de.children,qe;return Ee&&(qe=Ee.length)?ea(Ee[qe-1]):de}p.layout.treemap=function(){var de=p.layout.hierarchy(),Ee=Math.round,qe=[1,1],tt=null,at=ba,ct=!1,Nt,St="squarify",Jt=.5*(1+Math.sqrt(5));function mr(Yr,oa){for(var fa=-1,Ea=Yr.length,Ma,sa;++fa0;)Ea.push(sa=Ma[$n-1]),Ea.area+=sa.area,St!=="squarify"||(Tn=Vr(Ea,zn))<=hn?(Ma.pop(),hn=Tn):(Ea.area-=Ea.pop().area,ca(Ea,zn,fa,!1),zn=Math.min(fa.dx,fa.dy),Ea.length=Ea.area=0,hn=1/0);Ea.length&&(ca(Ea,zn,fa,!0),Ea.length=Ea.area=0),oa.forEach(gr)}}function Hr(Yr){var oa=Yr.children;if(oa&&oa.length){var fa=at(Yr),Ea=oa.slice(),Ma,sa=[];for(mr(Ea,fa.dx*fa.dy/Yr.value),sa.area=0;Ma=Ea.pop();)sa.push(Ma),sa.area+=Ma.area,Ma.z!=null&&(ca(sa,Ma.z?fa.dx:fa.dy,fa,!Ea.length),sa.length=sa.area=0);oa.forEach(Hr)}}function Vr(Yr,oa){for(var fa=Yr.area,Ea,Ma=0,sa=1/0,hn=-1,Tn=Yr.length;++hnMa&&(Ma=Ea));return fa*=fa,oa*=oa,fa?Math.max(oa*Ma*Jt/fa,fa/(oa*sa*Jt)):1/0}function ca(Yr,oa,fa,Ea){var Ma=-1,sa=Yr.length,hn=fa.x,Tn=fa.y,zn=oa?Ee(Yr.area/oa):0,$n;if(oa==fa.dx){for((Ea||zn>fa.dy)&&(zn=fa.dy);++Mafa.dx)&&(zn=fa.dx);++Ma1);return de+Ee*tt*Math.sqrt(-2*Math.log(ct)/ct)}},logNormal:function(){var de=p.random.normal.apply(p,arguments);return function(){return Math.exp(de())}},bates:function(de){var Ee=p.random.irwinHall(de);return function(){return Ee()/de}},irwinHall:function(de){return function(){for(var Ee=0,qe=0;qe2?vn:mn,mr=tt?Tu:vf;return at=Jt(de,Ee,mr,qe),ct=Jt(Ee,de,mr,Fu),St}function St(Jt){return at(Jt)}return St.invert=function(Jt){return ct(Jt)},St.domain=function(Jt){return arguments.length?(de=Jt.map(Number),Nt()):de},St.range=function(Jt){return arguments.length?(Ee=Jt,Nt()):Ee},St.rangeRound=function(Jt){return St.range(Jt).interpolate(Qu)},St.clamp=function(Jt){return arguments.length?(tt=Jt,Nt()):tt},St.interpolate=function(Jt){return arguments.length?(qe=Jt,Nt()):qe},St.ticks=function(Jt){return ri(de,Jt)},St.tickFormat=function(Jt,mr){return d3_scale_linearTickFormat(de,Jt,mr)},St.nice=function(Jt){return _i(de,Jt),Nt()},St.copy=function(){return Sn(de,Ee,qe,tt)},Nt()}function yi(de,Ee){return p.rebind(de,Ee,"range","rangeRound","interpolate","clamp")}function _i(de,Ee){return Da(de,Ha(ki(de,Ee)[2])),Da(de,Ha(ki(de,Ee)[2])),de}function ki(de,Ee){Ee==null&&(Ee=10);var qe=Na(de),tt=qe[1]-qe[0],at=Math.pow(10,Math.floor(Math.log(tt/Ee)/Math.LN10)),ct=Ee/tt*at;return ct<=.15?at*=10:ct<=.35?at*=5:ct<=.75&&(at*=2),qe[0]=Math.ceil(qe[0]/at)*at,qe[1]=Math.floor(qe[1]/at)*at+at*.5,qe[2]=at,qe}function ri(de,Ee){return p.range.apply(p,ki(de,Ee))}var En={s:1,g:1,p:1,r:1,e:1};function Ln(de){return-Math.floor(Math.log(de)/Math.LN10+.01)}function Ni(de,Ee){var qe=Ln(Ee[2]);return de in En?Math.abs(qe-Ln(Math.max(i(Ee[0]),i(Ee[1]))))+ +(de!=="e"):qe-(de==="%")*2}p.scale.log=function(){return Zi(p.scale.linear().domain([0,1]),10,!0,[1,10])};function Zi(de,Ee,qe,tt){function at(St){return(qe?Math.log(St<0?0:St):-Math.log(St>0?0:-St))/Math.log(Ee)}function ct(St){return qe?Math.pow(Ee,St):-Math.pow(Ee,-St)}function Nt(St){return de(at(St))}return Nt.invert=function(St){return ct(de.invert(St))},Nt.domain=function(St){return arguments.length?(qe=St[0]>=0,de.domain((tt=St.map(Number)).map(at)),Nt):tt},Nt.base=function(St){return arguments.length?(Ee=+St,de.domain(tt.map(at)),Nt):Ee},Nt.nice=function(){var St=Da(tt.map(at),qe?Math:Co);return de.domain(St),tt=St.map(ct),Nt},Nt.ticks=function(){var St=Na(tt),Jt=[],mr=St[0],gr=St[1],Hr=Math.floor(at(mr)),Vr=Math.ceil(at(gr)),ca=Ee%1?2:Ee;if(isFinite(Vr-Hr)){if(qe){for(;Hr0;Aa--)Jt.push(ct(Hr)*Aa);for(Hr=0;Jt[Hr]gr;Vr--);Jt=Jt.slice(Hr,Vr)}return Jt},Nt.copy=function(){return Zi(de.copy(),Ee,qe,tt)},yi(Nt,de)}var Co={floor:function(de){return-Math.ceil(-de)},ceil:function(de){return-Math.floor(-de)}};p.scale.pow=function(){return Do(p.scale.linear(),1,[0,1])};function Do(de,Ee,qe){var tt=Fo(Ee),at=Fo(1/Ee);function ct(Nt){return de(tt(Nt))}return ct.invert=function(Nt){return at(de.invert(Nt))},ct.domain=function(Nt){return arguments.length?(de.domain((qe=Nt.map(Number)).map(tt)),ct):qe},ct.ticks=function(Nt){return ri(qe,Nt)},ct.tickFormat=function(Nt,St){return d3_scale_linearTickFormat(qe,Nt,St)},ct.nice=function(Nt){return ct.domain(_i(qe,Nt))},ct.exponent=function(Nt){return arguments.length?(tt=Fo(Ee=Nt),at=Fo(1/Ee),de.domain(qe.map(tt)),ct):Ee},ct.copy=function(){return Do(de.copy(),Ee,qe)},yi(ct,de)}function Fo(de){return function(Ee){return Ee<0?-Math.pow(-Ee,de):Math.pow(Ee,de)}}p.scale.sqrt=function(){return p.scale.pow().exponent(.5)},p.scale.ordinal=function(){return Yo([],{t:"range",a:[[]]})};function Yo(de,Ee){var qe,tt,at;function ct(St){return tt[((qe.get(St)||(Ee.t==="range"?qe.set(St,de.push(St)):NaN))-1)%tt.length]}function Nt(St,Jt){return p.range(de.length).map(function(mr){return St+Jt*mr})}return ct.domain=function(St){if(!arguments.length)return de;de=[],qe=new M;for(var Jt=-1,mr=St.length,gr;++Jt0?qe[ct-1]:de[0],ctVr?0:1;if(gr=Ke)return Jt(gr,Aa)+(mr?Jt(mr,1-Aa):"")+"Z";var Yr,oa,fa,Ea,Ma=0,sa=0,hn,Tn,zn,$n,xi,di,uo,pe,y=[];if((Ea=(+Nt.apply(this,arguments)||0)/2)&&(fa=tt===zl?Math.sqrt(mr*mr+gr*gr):+tt.apply(this,arguments),Aa||(sa*=-1),gr&&(sa=qt(fa/gr*Math.sin(Ea))),mr&&(Ma=qt(fa/mr*Math.sin(Ea)))),gr){hn=gr*Math.cos(Hr+sa),Tn=gr*Math.sin(Hr+sa),zn=gr*Math.cos(Vr-sa),$n=gr*Math.sin(Vr-sa);var N=Math.abs(Vr-Hr-2*sa)<=Ne?0:1;if(sa&&mc(hn,Tn,zn,$n)===Aa^N){var ie=(Hr+Vr)/2;hn=gr*Math.cos(ie),Tn=gr*Math.sin(ie),zn=$n=null}}else hn=Tn=0;if(mr){xi=mr*Math.cos(Vr-Ma),di=mr*Math.sin(Vr-Ma),uo=mr*Math.cos(Hr+Ma),pe=mr*Math.sin(Hr+Ma);var fe=Math.abs(Hr-Vr+2*Ma)<=Ne?0:1;if(Ma&&mc(xi,di,uo,pe)===1-Aa^fe){var be=(Hr+Vr)/2;xi=mr*Math.cos(be),di=mr*Math.sin(be),uo=pe=null}}else xi=di=0;if(ca>ht&&(Yr=Math.min(Math.abs(gr-mr)/2,+qe.apply(this,arguments)))>.001){oa=mr0?0:1}function Jc(de,Ee,qe,tt,at){var ct=de[0]-Ee[0],Nt=de[1]-Ee[1],St=(at?tt:-tt)/Math.sqrt(ct*ct+Nt*Nt),Jt=St*Nt,mr=-St*ct,gr=de[0]+Jt,Hr=de[1]+mr,Vr=Ee[0]+Jt,ca=Ee[1]+mr,Aa=(gr+Vr)/2,Yr=(Hr+ca)/2,oa=Vr-gr,fa=ca-Hr,Ea=oa*oa+fa*fa,Ma=qe-tt,sa=gr*ca-Vr*Hr,hn=(fa<0?-1:1)*Math.sqrt(Math.max(0,Ma*Ma*Ea-sa*sa)),Tn=(sa*fa-oa*hn)/Ea,zn=(-sa*oa-fa*hn)/Ea,$n=(sa*fa+oa*hn)/Ea,xi=(-sa*oa+fa*hn)/Ea,di=Tn-Aa,uo=zn-Yr,pe=$n-Aa,y=xi-Yr;return di*di+uo*uo>pe*pe+y*y&&(Tn=$n,zn=xi),[[Tn-Jt,zn-mr],[Tn*qe/Ma,zn*qe/Ma]]}function oc(){return!0}function du(de){var Ee=no,qe=Di,tt=oc,at=Ql,ct=at.key,Nt=.7;function St(Jt){var mr=[],gr=[],Hr=-1,Vr=Jt.length,ca,Aa=ar(Ee),Yr=ar(qe);function oa(){mr.push("M",at(de(gr),Nt))}for(;++Hr1?de.join("L"):de+"Z"}function Eu(de){return de.join("L")+"Z"}function bf(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1&&at.push("H",tt[0]),at.join("")}function lh(de){for(var Ee=0,qe=de.length,tt=de[0],at=[tt[0],",",tt[1]];++Ee1){St=Ee[1],ct=de[Jt],Jt++,tt+="C"+(at[0]+Nt[0])+","+(at[1]+Nt[1])+","+(ct[0]-St[0])+","+(ct[1]-St[1])+","+ct[0]+","+ct[1];for(var mr=2;mr9&&(ct=qe*3/Math.sqrt(ct),Nt[St]=ct*tt,Nt[St+1]=ct*at));for(St=-1;++St<=Jt;)ct=(de[Math.min(Jt,St+1)][0]-de[Math.max(0,St-1)][0])/(6*(1+Nt[St]*Nt[St])),Ee.push([ct||0,Nt[St]*ct||0]);return Ee}function Pr(de){return de.length<3?Ql(de):de[0]+wf(de,Wt(de))}p.svg.line.radial=function(){var de=du(Br);return de.radius=de.x,delete de.x,de.angle=de.y,delete de.y,de};function Br(de){for(var Ee,qe=-1,tt=de.length,at,ct;++qeNe)+",1 "+Hr}function mr(gr,Hr,Vr,ca){return"Q 0,0 "+ca}return ct.radius=function(gr){return arguments.length?(qe=ar(gr),ct):qe},ct.source=function(gr){return arguments.length?(de=ar(gr),ct):de},ct.target=function(gr){return arguments.length?(Ee=ar(gr),ct):Ee},ct.startAngle=function(gr){return arguments.length?(tt=ar(gr),ct):tt},ct.endAngle=function(gr){return arguments.length?(at=ar(gr),ct):at},ct};function la(de){return de.radius}p.svg.diagonal=function(){var de=jr,Ee=Jr,qe=xa;function tt(at,ct){var Nt=de.call(this,at,ct),St=Ee.call(this,at,ct),Jt=(Nt.y+St.y)/2,mr=[Nt,{x:Nt.x,y:Jt},{x:St.x,y:Jt},St];return mr=mr.map(qe),"M"+mr[0]+"C"+mr[1]+" "+mr[2]+" "+mr[3]}return tt.source=function(at){return arguments.length?(de=ar(at),tt):de},tt.target=function(at){return arguments.length?(Ee=ar(at),tt):Ee},tt.projection=function(at){return arguments.length?(qe=at,tt):qe},tt};function xa(de){return[de.x,de.y]}p.svg.diagonal.radial=function(){var de=p.svg.diagonal(),Ee=xa,qe=de.projection;return de.projection=function(tt){return arguments.length?qe(Ba(Ee=tt)):Ee},de};function Ba(de){return function(){var Ee=de.apply(this,arguments),qe=Ee[0],tt=Ee[1]-Je;return[qe*Math.cos(tt),qe*Math.sin(tt)]}}p.svg.symbol=function(){var de=wn,Ee=an;function qe(tt,at){return(Si.get(de.call(this,tt,at))||ii)(Ee.call(this,tt,at))}return qe.type=function(tt){return arguments.length?(de=ar(tt),qe):de},qe.size=function(tt){return arguments.length?(Ee=ar(tt),qe):Ee},qe};function an(){return 64}function wn(){return"circle"}function ii(de){var Ee=Math.sqrt(de/Ne);return"M0,"+Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+-Ee+"A"+Ee+","+Ee+" 0 1,1 0,"+Ee+"Z"}var Si=p.map({circle:ii,cross:function(de){var Ee=Math.sqrt(de/5)/2;return"M"+-3*Ee+","+-Ee+"H"+-Ee+"V"+-3*Ee+"H"+Ee+"V"+-Ee+"H"+3*Ee+"V"+Ee+"H"+Ee+"V"+3*Ee+"H"+-Ee+"V"+Ee+"H"+-3*Ee+"Z"},diamond:function(de){var Ee=Math.sqrt(de/(2*Ji)),qe=Ee*Ji;return"M0,"+-Ee+"L"+qe+",0 0,"+Ee+" "+-qe+",0Z"},square:function(de){var Ee=Math.sqrt(de)/2;return"M"+-Ee+","+-Ee+"L"+Ee+","+-Ee+" "+Ee+","+Ee+" "+-Ee+","+Ee+"Z"},"triangle-down":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+qe+"L"+Ee+","+-qe+" "+-Ee+","+-qe+"Z"},"triangle-up":function(de){var Ee=Math.sqrt(de/oi),qe=Ee*oi/2;return"M0,"+-qe+"L"+Ee+","+qe+" "+-Ee+","+qe+"Z"}});p.svg.symbolTypes=Si.keys();var oi=Math.sqrt(3),Ji=Math.tan(30*et);q.transition=function(de){for(var Ee=ol||++ys,qe=hi(de),tt=[],at,ct,Nt=jl||{time:Date.now(),ease:pc,delay:0,duration:250},St=-1,Jt=this.length;++St0;)Hr[--Ea].call(de,fa);if(oa>=1)return Nt.event&&Nt.event.end.call(de,de.__data__,Ee),--ct.count?delete ct[tt]:delete de[qe],1}Nt||(St=at.time,Jt=ai(Vr,0,St),Nt=ct[tt]={tween:new M,time:St,timer:Jt,delay:at.delay,duration:at.duration,ease:at.ease,index:Ee},at=null,++ct.count)}p.svg.axis=function(){var de=p.scale.linear(),Ee=sl,qe=6,tt=6,at=3,ct=[10],Nt=null,St;function Jt(mr){mr.each(function(){var gr=p.select(this),Hr=this.__chart__||de,Vr=this.__chart__=de.copy(),ca=Nt??(Vr.ticks?Vr.ticks.apply(Vr,ct):Vr.domain()),Aa=St??(Vr.tickFormat?Vr.tickFormat.apply(Vr,ct):D),Yr=gr.selectAll(".tick").data(ca,Vr),oa=Yr.enter().insert("g",".domain").attr("class","tick").style("opacity",ht),fa=p.transition(Yr.exit()).style("opacity",ht).remove(),Ea=p.transition(Yr.order()).style("opacity",1),Ma=Math.max(qe,0)+at,sa,hn=Za(Vr),Tn=gr.selectAll(".domain").data([0]),zn=(Tn.enter().append("path").attr("class","domain"),p.transition(Tn));oa.append("line"),oa.append("text");var $n=oa.select("line"),xi=Ea.select("line"),di=Yr.select("text").text(Aa),uo=oa.select("text"),pe=Ea.select("text"),y=Ee==="top"||Ee==="left"?-1:1,N,ie,fe,be;if(Ee==="bottom"||Ee==="top"?(sa=tu,N="x",fe="y",ie="x2",be="y2",di.attr("dy",y<0?"0em":".71em").style("text-anchor","middle"),zn.attr("d","M"+hn[0]+","+y*tt+"V0H"+hn[1]+"V"+y*tt)):(sa=Ps,N="y",fe="x",ie="y2",be="x2",di.attr("dy",".32em").style("text-anchor",y<0?"end":"start"),zn.attr("d","M"+y*tt+","+hn[0]+"H0V"+hn[1]+"H"+y*tt)),$n.attr(be,y*qe),uo.attr(fe,y*Ma),xi.attr(ie,0).attr(be,y*qe),pe.attr(N,0).attr(fe,y*Ma),Vr.rangeBand){var Re=Vr,je=Re.rangeBand()/2;Hr=Vr=function(Ze){return Re(Ze)+je}}else Hr.rangeBand?Hr=Vr:fa.call(sa,Vr,Hr);oa.call(sa,Hr,Vr),Ea.call(sa,Vr,Vr)})}return Jt.scale=function(mr){return arguments.length?(de=mr,Jt):de},Jt.orient=function(mr){return arguments.length?(Ee=mr in sc?mr+"":sl,Jt):Ee},Jt.ticks=function(){return arguments.length?(ct=E(arguments),Jt):ct},Jt.tickValues=function(mr){return arguments.length?(Nt=mr,Jt):Nt},Jt.tickFormat=function(mr){return arguments.length?(St=mr,Jt):St},Jt.tickSize=function(mr){var gr=arguments.length;return gr?(qe=+mr,tt=+arguments[gr-1],Jt):qe},Jt.innerTickSize=function(mr){return arguments.length?(qe=+mr,Jt):qe},Jt.outerTickSize=function(mr){return arguments.length?(tt=+mr,Jt):tt},Jt.tickPadding=function(mr){return arguments.length?(at=+mr,Jt):at},Jt.tickSubdivide=function(){return arguments.length&&Jt},Jt};var sl="bottom",sc={top:1,right:1,bottom:1,left:1};function tu(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate("+(isFinite(at)?at:qe(tt))+",0)"})}function Ps(de,Ee,qe){de.attr("transform",function(tt){var at=Ee(tt);return"translate(0,"+(isFinite(at)?at:qe(tt))+")"})}p.svg.brush=function(){var de=ne(gr,"brushstart","brush","brushend"),Ee=null,qe=null,tt=[0,0],at=[0,0],ct,Nt,St=!0,Jt=!0,mr=pu[0];function gr(Yr){Yr.each(function(){var oa=p.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Aa).on("touchstart.brush",Aa),fa=oa.selectAll(".background").data([0]);fa.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),oa.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Ea=oa.selectAll(".resize").data(mr,D);Ea.exit().remove(),Ea.enter().append("g").attr("class",function(Tn){return"resize "+Tn}).style("cursor",function(Tn){return gc[Tn]}).append("rect").attr("x",function(Tn){return/[ew]$/.test(Tn)?-3:null}).attr("y",function(Tn){return/^[ns]/.test(Tn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Ea.style("display",gr.empty()?"none":null);var Ma=p.transition(oa),sa=p.transition(fa),hn;Ee&&(hn=Za(Ee),sa.attr("x",hn[0]).attr("width",hn[1]-hn[0]),Vr(Ma)),qe&&(hn=Za(qe),sa.attr("y",hn[0]).attr("height",hn[1]-hn[0]),ca(Ma)),Hr(Ma)})}gr.event=function(Yr){Yr.each(function(){var oa=de.of(this,arguments),fa={x:tt,y:at,i:ct,j:Nt},Ea=this.__chart__||fa;this.__chart__=fa,ol?p.select(this).transition().each("start.brush",function(){ct=Ea.i,Nt=Ea.j,tt=Ea.x,at=Ea.y,oa({type:"brushstart"})}).tween("brush:brush",function(){var Ma=zu(tt,fa.x),sa=zu(at,fa.y);return ct=Nt=null,function(hn){tt=fa.x=Ma(hn),at=fa.y=sa(hn),oa({type:"brush",mode:"resize"})}}).each("end.brush",function(){ct=fa.i,Nt=fa.j,oa({type:"brush",mode:"resize"}),oa({type:"brushend"})}):(oa({type:"brushstart"}),oa({type:"brush",mode:"resize"}),oa({type:"brushend"}))})};function Hr(Yr){Yr.selectAll(".resize").attr("transform",function(oa){return"translate("+tt[+/e$/.test(oa)]+","+at[+/^s/.test(oa)]+")"})}function Vr(Yr){Yr.select(".extent").attr("x",tt[0]),Yr.selectAll(".extent,.n>rect,.s>rect").attr("width",tt[1]-tt[0])}function ca(Yr){Yr.select(".extent").attr("y",at[0]),Yr.selectAll(".extent,.e>rect,.w>rect").attr("height",at[1]-at[0])}function Aa(){var Yr=this,oa=p.select(p.event.target),fa=de.of(Yr,arguments),Ea=p.select(Yr),Ma=oa.datum(),sa=!/^(n|s)$/.test(Ma)&&Ee,hn=!/^(e|w)$/.test(Ma)&&qe,Tn=oa.classed("extent"),zn=Xt(Yr),$n,xi=p.mouse(Yr),di,uo=p.select(e(Yr)).on("keydown.brush",N).on("keyup.brush",ie);if(p.event.changedTouches?uo.on("touchmove.brush",fe).on("touchend.brush",Re):uo.on("mousemove.brush",fe).on("mouseup.brush",Re),Ea.interrupt().selectAll("*").interrupt(),Tn)xi[0]=tt[0]-xi[0],xi[1]=at[0]-xi[1];else if(Ma){var pe=+/w$/.test(Ma),y=+/^n/.test(Ma);di=[tt[1-pe]-xi[0],at[1-y]-xi[1]],xi[0]=tt[pe],xi[1]=at[y]}else p.event.altKey&&($n=xi.slice());Ea.style("pointer-events","none").selectAll(".resize").style("display",null),p.select("body").style("cursor",oa.style("cursor")),fa({type:"brushstart"}),fe();function N(){p.event.keyCode==32&&(Tn||($n=null,xi[0]-=tt[1],xi[1]-=at[1],Tn=2),Q())}function ie(){p.event.keyCode==32&&Tn==2&&(xi[0]+=tt[1],xi[1]+=at[1],Tn=0,Q())}function fe(){var je=p.mouse(Yr),Ze=!1;di&&(je[0]+=di[0],je[1]+=di[1]),Tn||(p.event.altKey?($n||($n=[(tt[0]+tt[1])/2,(at[0]+at[1])/2]),xi[0]=tt[+(je[0]<$n[0])],xi[1]=at[+(je[1]<$n[1])]):$n=null),sa&&be(je,Ee,0)&&(Vr(Ea),Ze=!0),hn&&be(je,qe,1)&&(ca(Ea),Ze=!0),Ze&&(Hr(Ea),fa({type:"brush",mode:Tn?"move":"resize"}))}function be(je,Ze,ut){var ft=Za(Ze),Dt=ft[0],Gt=ft[1],Kt=xi[ut],st=ut?at:tt,It=st[1]-st[0],Ut,ir;if(Tn&&(Dt-=Kt,Gt-=It+Kt),Ut=(ut?Jt:St)?Math.max(Dt,Math.min(Gt,je[ut])):je[ut],Tn?ir=(Ut+=Kt)+It:($n&&(Kt=Math.max(Dt,Math.min(Gt,2*$n[ut]-Ut))),Kt0))return At;do At.push($t=new Date(+yt)),Ae(yt,Tt),le(yt);while($t=gt)for(;le(gt),!yt(gt);)gt.setTime(gt-1)},function(gt,Tt){if(gt>=gt)if(Tt<0)for(;++Tt<=0;)for(;Ae(gt,-1),!yt(gt););else for(;--Tt>=0;)for(;Ae(gt,1),!yt(gt););})},Be&&(Ye.count=function(yt,gt){return b.setTime(+yt),E.setTime(+gt),le(b),le(E),Math.floor(Be(b,E))},Ye.every=function(yt){return yt=Math.floor(yt),!isFinite(yt)||!(yt>0)?null:yt>1?Ye.filter(Xe?function(gt){return Xe(gt)%yt===0}:function(gt){return Ye.count(0,gt)%yt===0}):Ye}),Ye}var l=k(function(){},function(le,Ae){le.setTime(+le+Ae)},function(le,Ae){return Ae-le});l.every=function(le){return le=Math.floor(le),!isFinite(le)||!(le>0)?null:le>1?k(function(Ae){Ae.setTime(Math.floor(Ae/le)*le)},function(Ae,Be){Ae.setTime(+Ae+Be*le)},function(Ae,Be){return(Be-Ae)/le}):l};var e=l.range,t=1e3,n=6e4,r=36e5,a=864e5,o=6048e5,s=k(function(le){le.setTime(le-le.getMilliseconds())},function(le,Ae){le.setTime(+le+Ae*t)},function(le,Ae){return(Ae-le)/t},function(le){return le.getUTCSeconds()}),c=s.range,m=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getMinutes()}),h=m.range,v=k(function(le){le.setTime(le-le.getMilliseconds()-le.getSeconds()*t-le.getMinutes()*n)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getHours()}),g=v.range,i=k(function(le){le.setHours(0,0,0,0)},function(le,Ae){le.setDate(le.getDate()+Ae)},function(le,Ae){return(Ae-le-(Ae.getTimezoneOffset()-le.getTimezoneOffset())*n)/a},function(le){return le.getDate()-1}),w=i.range;function S(le){return k(function(Ae){Ae.setDate(Ae.getDate()-(Ae.getDay()+7-le)%7),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setDate(Ae.getDate()+Be*7)},function(Ae,Be){return(Be-Ae-(Be.getTimezoneOffset()-Ae.getTimezoneOffset())*n)/o})}var M=S(0),C=S(1),_=S(2),T=S(3),f=S(4),u=S(5),A=S(6),x=M.range,z=C.range,I=_.range,O=T.range,D=f.range,B=u.range,F=A.range,P=k(function(le){le.setDate(1),le.setHours(0,0,0,0)},function(le,Ae){le.setMonth(le.getMonth()+Ae)},function(le,Ae){return Ae.getMonth()-le.getMonth()+(Ae.getFullYear()-le.getFullYear())*12},function(le){return le.getMonth()}),j=P.range,U=k(function(le){le.setMonth(0,1),le.setHours(0,0,0,0)},function(le,Ae){le.setFullYear(le.getFullYear()+Ae)},function(le,Ae){return Ae.getFullYear()-le.getFullYear()},function(le){return le.getFullYear()});U.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setFullYear(Math.floor(Ae.getFullYear()/le)*le),Ae.setMonth(0,1),Ae.setHours(0,0,0,0)},function(Ae,Be){Ae.setFullYear(Ae.getFullYear()+Be*le)})};var $=U.range,Q=k(function(le){le.setUTCSeconds(0,0)},function(le,Ae){le.setTime(+le+Ae*n)},function(le,Ae){return(Ae-le)/n},function(le){return le.getUTCMinutes()}),re=Q.range,ne=k(function(le){le.setUTCMinutes(0,0,0)},function(le,Ae){le.setTime(+le+Ae*r)},function(le,Ae){return(Ae-le)/r},function(le){return le.getUTCHours()}),se=ne.range,G=k(function(le){le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCDate(le.getUTCDate()+Ae)},function(le,Ae){return(Ae-le)/a},function(le){return le.getUTCDate()-1}),X=G.range;function K(le){return k(function(Ae){Ae.setUTCDate(Ae.getUTCDate()-(Ae.getUTCDay()+7-le)%7),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCDate(Ae.getUTCDate()+Be*7)},function(Ae,Be){return(Be-Ae)/o})}var H=K(0),Y=K(1),q=K(2),Z=K(3),ee=K(4),ae=K(5),he=K(6),xe=H.range,we=Y.range,Me=q.range,Se=Z.range,Ie=ee.range,Ve=ae.range,Ge=he.range,ke=k(function(le){le.setUTCDate(1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCMonth(le.getUTCMonth()+Ae)},function(le,Ae){return Ae.getUTCMonth()-le.getUTCMonth()+(Ae.getUTCFullYear()-le.getUTCFullYear())*12},function(le){return le.getUTCMonth()}),_e=ke.range,ce=k(function(le){le.setUTCMonth(0,1),le.setUTCHours(0,0,0,0)},function(le,Ae){le.setUTCFullYear(le.getUTCFullYear()+Ae)},function(le,Ae){return Ae.getUTCFullYear()-le.getUTCFullYear()},function(le){return le.getUTCFullYear()});ce.every=function(le){return!isFinite(le=Math.floor(le))||!(le>0)?null:k(function(Ae){Ae.setUTCFullYear(Math.floor(Ae.getUTCFullYear()/le)*le),Ae.setUTCMonth(0,1),Ae.setUTCHours(0,0,0,0)},function(Ae,Be){Ae.setUTCFullYear(Ae.getUTCFullYear()+Be*le)})};var ve=ce.range;p.timeDay=i,p.timeDays=w,p.timeFriday=u,p.timeFridays=B,p.timeHour=v,p.timeHours=g,p.timeInterval=k,p.timeMillisecond=l,p.timeMilliseconds=e,p.timeMinute=m,p.timeMinutes=h,p.timeMonday=C,p.timeMondays=z,p.timeMonth=P,p.timeMonths=j,p.timeSaturday=A,p.timeSaturdays=F,p.timeSecond=s,p.timeSeconds=c,p.timeSunday=M,p.timeSundays=x,p.timeThursday=f,p.timeThursdays=D,p.timeTuesday=_,p.timeTuesdays=I,p.timeWednesday=T,p.timeWednesdays=O,p.timeWeek=M,p.timeWeeks=x,p.timeYear=U,p.timeYears=$,p.utcDay=G,p.utcDays=X,p.utcFriday=ae,p.utcFridays=Ve,p.utcHour=ne,p.utcHours=se,p.utcMillisecond=l,p.utcMilliseconds=e,p.utcMinute=Q,p.utcMinutes=re,p.utcMonday=Y,p.utcMondays=we,p.utcMonth=ke,p.utcMonths=_e,p.utcSaturday=he,p.utcSaturdays=Ge,p.utcSecond=s,p.utcSeconds=c,p.utcSunday=H,p.utcSundays=xe,p.utcThursday=ee,p.utcThursdays=Ie,p.utcTuesday=q,p.utcTuesdays=Me,p.utcWednesday=Z,p.utcWednesdays=Se,p.utcWeek=H,p.utcWeeks=xe,p.utcYear=ce,p.utcYears=ve,Object.defineProperty(p,"__esModule",{value:!0})})}}),jm=ze({"node_modules/d3-time-format/dist/d3-time-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kw()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(Je){if(0<=Je.y&&Je.y<100){var et=new Date(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L);return et.setFullYear(Je.y),et}return new Date(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L)}function k(Je){if(0<=Je.y&&Je.y<100){var et=new Date(Date.UTC(-1,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L));return et.setUTCFullYear(Je.y),et}return new Date(Date.UTC(Je.y,Je.m,Je.d,Je.H,Je.M,Je.S,Je.L))}function l(Je,et,Mt){return{y:Je,m:et,d:Mt,H:0,M:0,S:0,L:0}}function e(Je){var et=Je.dateTime,Mt=Je.date,pt=Je.time,Pt=Je.periods,Ct=Je.days,qt=Je.shortDays,Vt=Je.months,Ht=Je.shortMonths,Sr=c(Pt),Kr=m(Pt),Yt=c(Ct),Rt=m(Ct),nr=c(qt),ur=m(qt),cr=c(Vt),Rr=m(Vt),Qr=c(Ht),Zr=m(Ht),ha={a:Yi,A:Ja,b:Oa,B:lt,c:null,d:P,e:P,f:re,g:ae,G:xe,H:j,I:U,j:$,L:Q,m:ne,M:se,p:rt,q:fr,Q:Xt,s:or,S:G,u:X,U:K,V:Y,w:q,W:Z,x:null,X:null,y:ee,Y:he,Z:we,"%":_r},Pa={a:lr,A:Tr,b:Ir,B:Dr,c:null,d:Me,e:Me,f:ke,g:Tt,G:$t,H:Se,I:Ie,j:Ve,L:Ge,m:_e,M:ce,p:ot,q:kt,Q:Xt,s:or,S:ve,u:le,U:Ae,V:Xe,w:Ye,W:yt,x:null,X:null,y:gt,Y:At,Z:rr,"%":_r},La={a:yn,A:Un,b:li,B:Yn,c:on,d:f,e:f,f:O,g:M,G:S,H:A,I:A,j:u,L:I,m:T,M:x,p:Nn,q:_,Q:B,s:F,S:z,u:v,U:g,V:i,w:h,W:w,x:en,X:vi,y:M,Y:S,Z:C,"%":D};ha.x=un(Mt,ha),ha.X=un(pt,ha),ha.c=un(et,ha),Pa.x=un(Mt,Pa),Pa.X=un(pt,Pa),Pa.c=un(et,Pa);function un(jt,ar){return function(Er){var xr=[],zr=-1,Lr=0,aa=jt.length,Sa,wa,pn;for(Er instanceof Date||(Er=new Date(+Er));++zr53)return null;"w"in xr||(xr.w=1),"Z"in xr?(Lr=k(l(xr.y,0,1)),aa=Lr.getUTCDay(),Lr=aa>4||aa===0?b.utcMonday.ceil(Lr):b.utcMonday(Lr),Lr=b.utcDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getUTCFullYear(),xr.m=Lr.getUTCMonth(),xr.d=Lr.getUTCDate()+(xr.w+6)%7):(Lr=E(l(xr.y,0,1)),aa=Lr.getDay(),Lr=aa>4||aa===0?b.timeMonday.ceil(Lr):b.timeMonday(Lr),Lr=b.timeDay.offset(Lr,(xr.V-1)*7),xr.y=Lr.getFullYear(),xr.m=Lr.getMonth(),xr.d=Lr.getDate()+(xr.w+6)%7)}else("W"in xr||"U"in xr)&&("w"in xr||(xr.w="u"in xr?xr.u%7:"W"in xr?1:0),aa="Z"in xr?k(l(xr.y,0,1)).getUTCDay():E(l(xr.y,0,1)).getDay(),xr.m=0,xr.d="W"in xr?(xr.w+6)%7+xr.W*7-(aa+5)%7:xr.w+xr.U*7-(aa+6)%7);return"Z"in xr?(xr.H+=xr.Z/100|0,xr.M+=xr.Z%100,k(xr)):E(xr)}}function ja(jt,ar,Er,xr){for(var zr=0,Lr=ar.length,aa=Er.length,Sa,wa;zr=aa)return-1;if(Sa=ar.charCodeAt(zr++),Sa===37){if(Sa=ar.charAt(zr++),wa=La[Sa in t?ar.charAt(zr++):Sa],!wa||(xr=wa(jt,Er,xr))<0)return-1}else if(Sa!=Er.charCodeAt(xr++))return-1}return xr}function Nn(jt,ar,Er){var xr=Sr.exec(ar.slice(Er));return xr?(jt.p=Kr[xr[0].toLowerCase()],Er+xr[0].length):-1}function yn(jt,ar,Er){var xr=nr.exec(ar.slice(Er));return xr?(jt.w=ur[xr[0].toLowerCase()],Er+xr[0].length):-1}function Un(jt,ar,Er){var xr=Yt.exec(ar.slice(Er));return xr?(jt.w=Rt[xr[0].toLowerCase()],Er+xr[0].length):-1}function li(jt,ar,Er){var xr=Qr.exec(ar.slice(Er));return xr?(jt.m=Zr[xr[0].toLowerCase()],Er+xr[0].length):-1}function Yn(jt,ar,Er){var xr=cr.exec(ar.slice(Er));return xr?(jt.m=Rr[xr[0].toLowerCase()],Er+xr[0].length):-1}function on(jt,ar,Er){return ja(jt,et,ar,Er)}function en(jt,ar,Er){return ja(jt,Mt,ar,Er)}function vi(jt,ar,Er){return ja(jt,pt,ar,Er)}function Yi(jt){return qt[jt.getDay()]}function Ja(jt){return Ct[jt.getDay()]}function Oa(jt){return Ht[jt.getMonth()]}function lt(jt){return Vt[jt.getMonth()]}function rt(jt){return Pt[+(jt.getHours()>=12)]}function fr(jt){return 1+~~(jt.getMonth()/3)}function lr(jt){return qt[jt.getUTCDay()]}function Tr(jt){return Ct[jt.getUTCDay()]}function Ir(jt){return Ht[jt.getUTCMonth()]}function Dr(jt){return Vt[jt.getUTCMonth()]}function ot(jt){return Pt[+(jt.getUTCHours()>=12)]}function kt(jt){return 1+~~(jt.getUTCMonth()/3)}return{format:function(jt){var ar=un(jt+="",ha);return ar.toString=function(){return jt},ar},parse:function(jt){var ar=Xa(jt+="",!1);return ar.toString=function(){return jt},ar},utcFormat:function(jt){var ar=un(jt+="",Pa);return ar.toString=function(){return jt},ar},utcParse:function(jt){var ar=Xa(jt+="",!0);return ar.toString=function(){return jt},ar}}}var t={"-":"",_:" ",0:"0"},n=/^\s*\d+/,r=/^%/,a=/[\\^$*+?|[\]().{}]/g;function o(Je,et,Mt){var pt=Je<0?"-":"",Pt=(pt?-Je:Je)+"",Ct=Pt.length;return pt+(Ct68?1900:2e3),Mt+pt[0].length):-1}function C(Je,et,Mt){var pt=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(et.slice(Mt,Mt+6));return pt?(Je.Z=pt[1]?0:-(pt[2]+(pt[3]||"00")),Mt+pt[0].length):-1}function _(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+1));return pt?(Je.q=pt[0]*3-3,Mt+pt[0].length):-1}function T(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.m=pt[0]-1,Mt+pt[0].length):-1}function f(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.d=+pt[0],Mt+pt[0].length):-1}function u(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.m=0,Je.d=+pt[0],Mt+pt[0].length):-1}function A(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.H=+pt[0],Mt+pt[0].length):-1}function x(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.M=+pt[0],Mt+pt[0].length):-1}function z(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+2));return pt?(Je.S=+pt[0],Mt+pt[0].length):-1}function I(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+3));return pt?(Je.L=+pt[0],Mt+pt[0].length):-1}function O(Je,et,Mt){var pt=n.exec(et.slice(Mt,Mt+6));return pt?(Je.L=Math.floor(pt[0]/1e3),Mt+pt[0].length):-1}function D(Je,et,Mt){var pt=r.exec(et.slice(Mt,Mt+1));return pt?Mt+pt[0].length:-1}function B(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.Q=+pt[0],Mt+pt[0].length):-1}function F(Je,et,Mt){var pt=n.exec(et.slice(Mt));return pt?(Je.s=+pt[0],Mt+pt[0].length):-1}function P(Je,et){return o(Je.getDate(),et,2)}function j(Je,et){return o(Je.getHours(),et,2)}function U(Je,et){return o(Je.getHours()%12||12,et,2)}function $(Je,et){return o(1+b.timeDay.count(b.timeYear(Je),Je),et,3)}function Q(Je,et){return o(Je.getMilliseconds(),et,3)}function re(Je,et){return Q(Je,et)+"000"}function ne(Je,et){return o(Je.getMonth()+1,et,2)}function se(Je,et){return o(Je.getMinutes(),et,2)}function G(Je,et){return o(Je.getSeconds(),et,2)}function X(Je){var et=Je.getDay();return et===0?7:et}function K(Je,et){return o(b.timeSunday.count(b.timeYear(Je)-1,Je),et,2)}function H(Je){var et=Je.getDay();return et>=4||et===0?b.timeThursday(Je):b.timeThursday.ceil(Je)}function Y(Je,et){return Je=H(Je),o(b.timeThursday.count(b.timeYear(Je),Je)+(b.timeYear(Je).getDay()===4),et,2)}function q(Je){return Je.getDay()}function Z(Je,et){return o(b.timeMonday.count(b.timeYear(Je)-1,Je),et,2)}function ee(Je,et){return o(Je.getFullYear()%100,et,2)}function ae(Je,et){return Je=H(Je),o(Je.getFullYear()%100,et,2)}function he(Je,et){return o(Je.getFullYear()%1e4,et,4)}function xe(Je,et){var Mt=Je.getDay();return Je=Mt>=4||Mt===0?b.timeThursday(Je):b.timeThursday.ceil(Je),o(Je.getFullYear()%1e4,et,4)}function we(Je){var et=Je.getTimezoneOffset();return(et>0?"-":(et*=-1,"+"))+o(et/60|0,"0",2)+o(et%60,"0",2)}function Me(Je,et){return o(Je.getUTCDate(),et,2)}function Se(Je,et){return o(Je.getUTCHours(),et,2)}function Ie(Je,et){return o(Je.getUTCHours()%12||12,et,2)}function Ve(Je,et){return o(1+b.utcDay.count(b.utcYear(Je),Je),et,3)}function Ge(Je,et){return o(Je.getUTCMilliseconds(),et,3)}function ke(Je,et){return Ge(Je,et)+"000"}function _e(Je,et){return o(Je.getUTCMonth()+1,et,2)}function ce(Je,et){return o(Je.getUTCMinutes(),et,2)}function ve(Je,et){return o(Je.getUTCSeconds(),et,2)}function le(Je){var et=Je.getUTCDay();return et===0?7:et}function Ae(Je,et){return o(b.utcSunday.count(b.utcYear(Je)-1,Je),et,2)}function Be(Je){var et=Je.getUTCDay();return et>=4||et===0?b.utcThursday(Je):b.utcThursday.ceil(Je)}function Xe(Je,et){return Je=Be(Je),o(b.utcThursday.count(b.utcYear(Je),Je)+(b.utcYear(Je).getUTCDay()===4),et,2)}function Ye(Je){return Je.getUTCDay()}function yt(Je,et){return o(b.utcMonday.count(b.utcYear(Je)-1,Je),et,2)}function gt(Je,et){return o(Je.getUTCFullYear()%100,et,2)}function Tt(Je,et){return Je=Be(Je),o(Je.getUTCFullYear()%100,et,2)}function At(Je,et){return o(Je.getUTCFullYear()%1e4,et,4)}function $t(Je,et){var Mt=Je.getUTCDay();return Je=Mt>=4||Mt===0?b.utcThursday(Je):b.utcThursday.ceil(Je),o(Je.getUTCFullYear()%1e4,et,4)}function rr(){return"+0000"}function _r(){return"%"}function Xt(Je){return+Je}function or(Je){return Math.floor(+Je/1e3)}var Ot;vt({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function vt(Je){return Ot=e(Je),p.timeFormat=Ot.format,p.timeParse=Ot.parse,p.utcFormat=Ot.utcFormat,p.utcParse=Ot.utcParse,Ot}var ht="%Y-%m-%dT%H:%M:%S.%LZ";function De(Je){return Je.toISOString()}var Ne=Date.prototype.toISOString?De:p.utcFormat(ht);function We(Je){var et=new Date(Je);return isNaN(et)?null:et}var Ke=+new Date("2000-01-01T00:00:00.000Z")?We:p.utcParse(ht);p.isoFormat=Ne,p.isoParse=Ke,p.timeFormatDefaultLocale=vt,p.timeFormatLocale=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),Cw=ze({"node_modules/d3-format/dist/d3-format.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){return Math.abs(T=Math.round(T))>=1e21?T.toLocaleString("en").replace(/,/g,""):T.toString(10)}function E(T,f){if((u=(T=f?T.toExponential(f-1):T.toExponential()).indexOf("e"))<0)return null;var u,A=T.slice(0,u);return[A.length>1?A[0]+A.slice(2):A,+T.slice(u+1)]}function k(T){return T=E(Math.abs(T)),T?T[1]:NaN}function l(T,f){return function(u,A){for(var x=u.length,z=[],I=0,O=T[0],D=0;x>0&&O>0&&(D+O+1>A&&(O=Math.max(1,A-D)),z.push(u.substring(x-=O,x+O)),!((D+=O+1)>A));)O=T[I=(I+1)%T.length];return z.reverse().join(f)}}function e(T){return function(f){return f.replace(/[0-9]/g,function(u){return T[+u]})}}var t=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function n(T){if(!(f=t.exec(T)))throw new Error("invalid format: "+T);var f;return new r({fill:f[1],align:f[2],sign:f[3],symbol:f[4],zero:f[5],width:f[6],comma:f[7],precision:f[8]&&f[8].slice(1),trim:f[9],type:f[10]})}n.prototype=r.prototype;function r(T){this.fill=T.fill===void 0?" ":T.fill+"",this.align=T.align===void 0?">":T.align+"",this.sign=T.sign===void 0?"-":T.sign+"",this.symbol=T.symbol===void 0?"":T.symbol+"",this.zero=!!T.zero,this.width=T.width===void 0?void 0:+T.width,this.comma=!!T.comma,this.precision=T.precision===void 0?void 0:+T.precision,this.trim=!!T.trim,this.type=T.type===void 0?"":T.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function a(T){e:for(var f=T.length,u=1,A=-1,x;u0&&(A=0);break}return A>0?T.slice(0,A)+T.slice(x+1):T}var o;function s(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1],z=x-(o=Math.max(-8,Math.min(8,Math.floor(x/3)))*3)+1,I=A.length;return z===I?A:z>I?A+new Array(z-I+1).join("0"):z>0?A.slice(0,z)+"."+A.slice(z):"0."+new Array(1-z).join("0")+E(T,Math.max(0,f+z-1))[0]}function c(T,f){var u=E(T,f);if(!u)return T+"";var A=u[0],x=u[1];return x<0?"0."+new Array(-x).join("0")+A:A.length>x+1?A.slice(0,x+1)+"."+A.slice(x+1):A+new Array(x-A.length+2).join("0")}var m={"%":function(T,f){return(T*100).toFixed(f)},b:function(T){return Math.round(T).toString(2)},c:function(T){return T+""},d:b,e:function(T,f){return T.toExponential(f)},f:function(T,f){return T.toFixed(f)},g:function(T,f){return T.toPrecision(f)},o:function(T){return Math.round(T).toString(8)},p:function(T,f){return c(T*100,f)},r:c,s,X:function(T){return Math.round(T).toString(16).toUpperCase()},x:function(T){return Math.round(T).toString(16)}};function h(T){return T}var v=Array.prototype.map,g=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function i(T){var f=T.grouping===void 0||T.thousands===void 0?h:l(v.call(T.grouping,Number),T.thousands+""),u=T.currency===void 0?"":T.currency[0]+"",A=T.currency===void 0?"":T.currency[1]+"",x=T.decimal===void 0?".":T.decimal+"",z=T.numerals===void 0?h:e(v.call(T.numerals,String)),I=T.percent===void 0?"%":T.percent+"",O=T.minus===void 0?"-":T.minus+"",D=T.nan===void 0?"NaN":T.nan+"";function B(P){P=n(P);var j=P.fill,U=P.align,$=P.sign,Q=P.symbol,re=P.zero,ne=P.width,se=P.comma,G=P.precision,X=P.trim,K=P.type;K==="n"?(se=!0,K="g"):m[K]||(G===void 0&&(G=12),X=!0,K="g"),(re||j==="0"&&U==="=")&&(re=!0,j="0",U="=");var H=Q==="$"?u:Q==="#"&&/[boxX]/.test(K)?"0"+K.toLowerCase():"",Y=Q==="$"?A:/[%p]/.test(K)?I:"",q=m[K],Z=/[defgprs%]/.test(K);G=G===void 0?6:/[gprs]/.test(K)?Math.max(1,Math.min(21,G)):Math.max(0,Math.min(20,G));function ee(ae){var he=H,xe=Y,we,Me,Se;if(K==="c")xe=q(ae)+xe,ae="";else{ae=+ae;var Ie=ae<0||1/ae<0;if(ae=isNaN(ae)?D:q(Math.abs(ae),G),X&&(ae=a(ae)),Ie&&+ae==0&&$!=="+"&&(Ie=!1),he=(Ie?$==="("?$:O:$==="-"||$==="("?"":$)+he,xe=(K==="s"?g[8+o/3]:"")+xe+(Ie&&$==="("?")":""),Z){for(we=-1,Me=ae.length;++weSe||Se>57){xe=(Se===46?x+ae.slice(we+1):ae.slice(we))+xe,ae=ae.slice(0,we);break}}}se&&!re&&(ae=f(ae,1/0));var Ve=he.length+ae.length+xe.length,Ge=Ve>1)+he+ae+xe+Ge.slice(Ve);break;default:ae=Ge+he+ae+xe;break}return z(ae)}return ee.toString=function(){return P+""},ee}function F(P,j){var U=B((P=n(P),P.type="f",P)),$=Math.max(-8,Math.min(8,Math.floor(k(j)/3)))*3,Q=Math.pow(10,-$),re=g[8+$/3];return function(ne){return U(Q*ne)+re}}return{format:B,formatPrefix:F}}var w;S({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function S(T){return w=i(T),p.format=w.format,p.formatPrefix=w.formatPrefix,w}function M(T){return Math.max(0,-k(Math.abs(T)))}function C(T,f){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(k(f)/3)))*3-k(Math.abs(T)))}function _(T,f){return T=Math.abs(T),f=Math.abs(f)-T,Math.max(0,k(f)-k(T))+1}p.FormatSpecifier=r,p.formatDefaultLocale=S,p.formatLocale=i,p.formatSpecifier=n,p.precisionFixed=M,p.precisionPrefix=C,p.precisionRound=_,Object.defineProperty(p,"__esModule",{value:!0})})}}),FR=ze({"node_modules/is-string-blank/index.js"(J,V){"use strict";V.exports=function(p){for(var b=p.length,E,k=0;k13)&&E!==32&&E!==133&&E!==160&&E!==5760&&E!==6158&&(E<8192||E>8205)&&E!==8232&&E!==8233&&E!==8239&&E!==8287&&E!==8288&&E!==12288&&E!==65279)return!1;return!0}}}),ao=ze({"node_modules/fast-isnumeric/index.js"(J,V){"use strict";var p=FR();V.exports=function(b){var E=typeof b;if(E==="string"){var k=b;if(b=+b,b===0&&p(k))return!1}else if(E!=="number")return!1;return b-b<1}}}),No=ze({"src/constants/numerical.js"(J,V){"use strict";V.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,ONEMAXYEAR:316224e5,ONEAVGYEAR:315576e5,ONEMINYEAR:31536e6,ONEMAXQUARTER:79488e5,ONEAVGQUARTER:78894e5,ONEMINQUARTER:76896e5,ONEMAXMONTH:26784e5,ONEAVGMONTH:26298e5,ONEMINMONTH:24192e5,ONEWEEK:6048e5,ONEDAY:864e5,ONEHOUR:36e5,ONEMIN:6e4,ONESEC:1e3,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}}}),Lw=ze({"node_modules/base64-arraybuffer/dist/base64-arraybuffer.umd.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=typeof globalThis<"u"?globalThis:p||self,b(p["base64-arraybuffer"]={}))})(J,function(p){"use strict";for(var b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=typeof Uint8Array>"u"?[]:new Uint8Array(256),k=0;k>2],o+=b[(n[r]&3)<<4|n[r+1]>>4],o+=b[(n[r+1]&15)<<2|n[r+2]>>6],o+=b[n[r+2]&63];return a%3===2?o=o.substring(0,o.length-1)+"=":a%3===1&&(o=o.substring(0,o.length-2)+"=="),o},e=function(t){var n=t.length*.75,r=t.length,a,o=0,s,c,m,h;t[t.length-1]==="="&&(n--,t[t.length-2]==="="&&n--);var v=new ArrayBuffer(n),g=new Uint8Array(v);for(a=0;a>4,g[o++]=(c&15)<<4|m>>2,g[o++]=(m&3)<<6|h&63;return v};p.decode=e,p.encode=l,Object.defineProperty(p,"__esModule",{value:!0})})}}),tv=ze({"src/lib/is_plain_object.js"(J,V){"use strict";V.exports=function(b){return window&&window.process&&window.process.versions?Object.prototype.toString.call(b)==="[object Object]":Object.prototype.toString.call(b)==="[object Object]"&&Object.getPrototypeOf(b).hasOwnProperty("hasOwnProperty")}}}),Ff=ze({"src/lib/array.js"(J){"use strict";var V=Lw().decode,p=tv(),b=Array.isArray,E=ArrayBuffer,k=DataView;function l(s){return E.isView(s)&&!(s instanceof k)}J.isTypedArray=l;function e(s){return b(s)||l(s)}J.isArrayOrTypedArray=e;function t(s){return!e(s[0])}J.isArray1D=t,J.ensureArray=function(s,c){return b(s)||(s=[]),s.length=c,s};var n={u1c:typeof Uint8ClampedArray>"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};n.uint8c=n.u1c,n.uint8=n.u1,n.int8=n.i1,n.uint16=n.u2,n.int16=n.i2,n.uint32=n.u4,n.int32=n.i4,n.float32=n.f4,n.float64=n.f8;function r(s){return s.constructor===ArrayBuffer}J.isArrayBuffer=r,J.decodeTypedArraySpec=function(s){var c=[],m=a(s),h=m.dtype,v=n[h];if(!v)throw new Error('Error in dtype: "'+h+'"');var g=v.BYTES_PER_ELEMENT,i=m.bdata;r(i)||(i=V(i));var w=m.shape===void 0?[i.byteLength/g]:(""+m.shape).split(",");w.reverse();var S=w.length,M,C,_=+w[0],T=g*_,f=0;if(S===1)c=new v(i);else if(S===2)for(M=+w[1],C=0;C2)return v[M]=v[M]|l,w.set(S,null);if(i){for(c=M;c0)return Math.log(E)/Math.LN10;var l=Math.log(Math.min(k[0],k[1]))/Math.LN10;return p(l)||(l=Math.log(Math.max(k[0],k[1]))/Math.LN10-6),l}}}),OR=ze({"src/lib/relink_private.js"(J,V){"use strict";var p=Ff().isArrayOrTypedArray,b=tv();V.exports=function E(k,l){for(var e in l){var t=l[e],n=k[e];if(n!==t)if(e.charAt(0)==="_"||typeof t=="function"){if(e in k)continue;k[e]=t}else if(p(t)&&p(n)&&b(t[0])){if(e==="customdata"||e==="ids")continue;for(var r=Math.min(t.length,n.length),a=0;aNR,modHalf:()=>jR});function NR(J,V){let p=J%V;return p<0?p+V:p}function jR(J,V){return Math.abs(J)>V/2?J-Math.round(J/V)*V:J}var Um=zi({"src/lib/mod.ts"(){"use strict"}}),Ki=ze({"src/lib/extend.js"(J){"use strict";var V=tv(),p=Array.isArray;function b(k,l){var e,t;for(e=0;e{for(var Qe in Ue)p(Le,Qe,{get:Ue[Qe],enumerable:!0})},e=(Le,Ue,Qe,_t)=>{if(Ue&&typeof Ue=="object"||typeof Ue=="function")for(let wt of E(Ue))!k.call(Le,wt)&&wt!==Qe&&p(Le,wt,{get:()=>Ue[wt],enumerable:!(_t=b(Ue,wt))||_t.enumerable});return Le},t=Le=>e(p({},"__esModule",{value:!0}),Le),n={};l(n,{a98:()=>So,average:()=>Tr,averageAngle:()=>rt,averageNumber:()=>fr,blend:()=>ll,blerp:()=>Ye,clampChroma:()=>dr,clampGamut:()=>ir,clampRgb:()=>Ut,colorsNamed:()=>s,convertA98ToXyz65:()=>Ot,convertCubehelixToRgb:()=>Nn,convertDlchToLab65:()=>oo,convertHsiToRgb:()=>ds,convertHslToRgb:()=>wo,convertHsvToRgb:()=>Ts,convertHwbToRgb:()=>yo,convertItpToXyz65:()=>ms,convertJabToJch:()=>Nu,convertJabToRgb:()=>Hc,convertJabToXyz65:()=>Gc,convertJchToJab:()=>al,convertLab65ToDlch:()=>qn,convertLab65ToRgb:()=>rn,convertLab65ToXyz65:()=>tn,convertLabToLch:()=>kt,convertLabToRgb:()=>vl,convertLabToXyz50:()=>tc,convertLchToLab:()=>ar,convertLchuvToLuv:()=>qu,convertLrgbToOklab:()=>tr,convertLrgbToRgb:()=>Pt,convertLuvToLchuv:()=>hu,convertLuvToXyz50:()=>Gf,convertOkhslToOklab:()=>_i,convertOkhsvToOklab:()=>Ln,convertOklabToLrgb:()=>ba,convertOklabToOkhsl:()=>yi,convertOklabToOkhsv:()=>En,convertOklabToRgb:()=>Na,convertP3ToXyz65:()=>zo,convertProphotoToXyz50:()=>mc,convertRec2020ToXyz65:()=>Wu,convertRgbToCubehelix:()=>Xa,convertRgbToHsi:()=>jo,convertRgbToHsl:()=>pi,convertRgbToHsv:()=>Bo,convertRgbToHwb:()=>bs,convertRgbToJab:()=>$l,convertRgbToLab:()=>mf,convertRgbToLab65:()=>fn,convertRgbToLrgb:()=>Ke,convertRgbToOklab:()=>wr,convertRgbToXyb:()=>eu,convertRgbToXyz50:()=>rc,convertRgbToXyz65:()=>et,convertRgbToYiq:()=>Ba,convertXybToRgb:()=>mt,convertXyz50ToLab:()=>ac,convertXyz50ToLuv:()=>Vu,convertXyz50ToProphoto:()=>xl,convertXyz50ToRgb:()=>Tu,convertXyz50ToXyz65:()=>jr,convertXyz65ToA98:()=>De,convertXyz65ToItp:()=>zu,convertXyz65ToJab:()=>wc,convertXyz65ToLab65:()=>no,convertXyz65ToP3:()=>js,convertXyz65ToRec2020:()=>bf,convertXyz65ToRgb:()=>qt,convertXyz65ToXyz50:()=>Br,convertYiqToRgb:()=>wn,converter:()=>P,cubehelix:()=>Ws,differenceCie76:()=>on,differenceCie94:()=>en,differenceCiede2000:()=>vi,differenceCmc:()=>Yi,differenceEuclidean:()=>Yn,differenceHueChroma:()=>li,differenceHueNaive:()=>Un,differenceHueSaturation:()=>yn,differenceHyab:()=>Ja,differenceItp:()=>lt,differenceKotsarenkoRamos:()=>Oa,displayable:()=>st,dlab:()=>Zo,dlch:()=>es,easingGamma:()=>je,easingInOutSine:()=>Mo,easingMidpoint:()=>Hr,easingSmootherstep:()=>Wi,easingSmoothstep:()=>so,easingSmoothstepInverse:()=>ti,filterBrightness:()=>ma,filterContrast:()=>da,filterDeficiencyDeuter:()=>Jn,filterDeficiencyProt:()=>In,filterDeficiencyTrit:()=>Ei,filterGrayscale:()=>kn,filterHueRotate:()=>ui,filterInvert:()=>Dn,filterSaturate:()=>za,filterSepia:()=>Fa,fixupAlpha:()=>$t,fixupHueDecreasing:()=>cr,fixupHueIncreasing:()=>ur,fixupHueLonger:()=>nr,fixupHueShorter:()=>Rt,formatCss:()=>wi,formatHex:()=>sl,formatHex8:()=>sc,formatHsl:()=>Ps,formatRgb:()=>tu,getMode:()=>se,hsi:()=>$o,hsl:()=>_s,hsv:()=>Go,hwb:()=>Ys,inGamut:()=>It,interpolate:()=>oa,interpolateWith:()=>fa,interpolateWithPremultipliedAlpha:()=>Ea,interpolatorLinear:()=>At,interpolatorPiecewise:()=>Tt,interpolatorSplineBasis:()=>hn,interpolatorSplineBasisClosed:()=>Tn,interpolatorSplineMonotone:()=>ie,interpolatorSplineMonotone2:()=>fe,interpolatorSplineMonotoneClosed:()=>be,interpolatorSplineNatural:()=>$n,interpolatorSplineNaturalClosed:()=>xi,itp:()=>Ll,jab:()=>mo,jch:()=>ru,lab:()=>Rs,lab65:()=>Yu,lch:()=>Ul,lch65:()=>ql,lchuv:()=>fo,lerp:()=>Be,lrgb:()=>Xo,luv:()=>Os,mapAlphaDivide:()=>ct,mapAlphaMultiply:()=>at,mapTransferGamma:()=>St,mapTransferLinear:()=>Nt,mapper:()=>tt,modeA98:()=>Ht,modeCubehelix:()=>Dr,modeDlab:()=>go,modeDlch:()=>Ao,modeHsi:()=>to,modeHsl:()=>Vs,modeHsv:()=>Pi,modeHwb:()=>dl,modeItp:()=>bc,modeJab:()=>Qu,modeJch:()=>ju,modeLab:()=>Sl,modeLab65:()=>oh,modeLch:()=>nl,modeLch65:()=>Kc,modeLchuv:()=>kl,modeLrgb:()=>Cc,modeLuv:()=>vc,modeOkhsl:()=>ri,modeOkhsv:()=>Zi,modeOklab:()=>Yo,modeOklch:()=>ns,modeP3:()=>zl,modeProphoto:()=>oc,modeRec2020:()=>Qc,modeRgb:()=>_r,modeXyb:()=>Bt,modeXyz50:()=>Wt,modeXyz65:()=>la,modeYiq:()=>Si,nearest:()=>vr,okhsl:()=>ra,okhsv:()=>Ya,oklab:()=>Ka,oklch:()=>Bi,p3:()=>rs,parse:()=>_e,parseHex:()=>g,parseHsl:()=>Ss,parseHslLegacy:()=>Uo,parseHwb:()=>hl,parseLab:()=>ih,parseLch:()=>$c,parseNamed:()=>m,parseOklab:()=>Do,parseOklch:()=>Gs,parseRgb:()=>ve,parseRgbLegacy:()=>O,parseTransparent:()=>Ae,prophoto:()=>Is,random:()=>qe,rec2020:()=>Oi,removeParser:()=>X,rgb:()=>Wr,round:()=>Qi,samples:()=>ut,serializeHex:()=>jl,serializeHex8:()=>Hs,serializeHsl:()=>hi,serializeRgb:()=>Cu,toGamut:()=>Ar,trilerp:()=>yt,unlerp:()=>Xe,useMode:()=>ne,useParser:()=>G,wcagContrast:()=>Bs,wcagLuminance:()=>zs,xyb:()=>na,xyz50:()=>pa,xyz65:()=>Wa,yiq:()=>ln}),V.exports=t(n);var r=(Le,Ue)=>{if(typeof Le=="number"){if(Ue===3)return{mode:"rgb",r:(Le>>8&15|Le>>4&240)/255,g:(Le>>4&15|Le&240)/255,b:(Le&15|Le<<4&240)/255};if(Ue===4)return{mode:"rgb",r:(Le>>12&15|Le>>8&240)/255,g:(Le>>8&15|Le>>4&240)/255,b:(Le>>4&15|Le&240)/255,alpha:(Le&15|Le<<4&240)/255};if(Ue===6)return{mode:"rgb",r:(Le>>16&255)/255,g:(Le>>8&255)/255,b:(Le&255)/255};if(Ue===8)return{mode:"rgb",r:(Le>>24&255)/255,g:(Le>>16&255)/255,b:(Le>>8&255)/255,alpha:(Le&255)/255}}},a=r,o={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},s=o,c=Le=>a(s[Le.toLowerCase()],6),m=c,h=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,v=Le=>{let Ue;return(Ue=Le.match(h))?a(parseInt(Ue[1],16),Ue[1].length):void 0},g=v,i="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",w=`(?:${i}|none)`,S=`${i}%`,M=`(?:${i}%|none)`,C=`(?:${i}%|${i})`,_=`(?:${i}%|${i}|none)`,T=`(?:${i}(deg|grad|rad|turn)|${i})`,f=`(?:${i}(deg|grad|rad|turn)|${i}|none)`,u="\\s*,\\s*",A=new RegExp("^"+_+"$"),x=new RegExp(`^rgba?\\(\\s*${i}${u}${i}${u}${i}\\s*(?:,\\s*${C}\\s*)?\\)$`),z=new RegExp(`^rgba?\\(\\s*${S}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),I=Le=>{let Ue={mode:"rgb"},Qe;if(Qe=Le.match(x))Qe[1]!==void 0&&(Ue.r=Qe[1]/255),Qe[2]!==void 0&&(Ue.g=Qe[2]/255),Qe[3]!==void 0&&(Ue.b=Qe[3]/255);else if(Qe=Le.match(z))Qe[1]!==void 0&&(Ue.r=Qe[1]/100),Qe[2]!==void 0&&(Ue.g=Qe[2]/100),Qe[3]!==void 0&&(Ue.b=Qe[3]/100);else return;return Qe[4]!==void 0?Ue.alpha=Math.max(0,Math.min(1,Qe[4]/100)):Qe[5]!==void 0&&(Ue.alpha=Math.max(0,Math.min(1,+Qe[5]))),Ue},O=I,D=(Le,Ue)=>Le===void 0?void 0:typeof Le!="object"?_e(Le):Le.mode!==void 0?Le:Ue?lo(Li({},Le),{mode:Ue}):void 0,B=D,F=(Le="rgb")=>Ue=>(Ue=B(Ue,Le))!==void 0?Ue.mode===Le?Ue:j[Ue.mode][Le]?j[Ue.mode][Le](Ue):Le==="rgb"?j[Ue.mode].rgb(Ue):j.rgb[Le](j[Ue.mode].rgb(Ue)):void 0,P=F,j={},U={},$=[],Q={},re=Le=>Le,ne=Le=>(j[Le.mode]=Li(Li({},j[Le.mode]),Le.toMode),Object.keys(Le.fromMode||{}).forEach(Ue=>{j[Ue]||(j[Ue]={}),j[Ue][Le.mode]=Le.fromMode[Ue]}),Le.ranges||(Le.ranges={}),Le.difference||(Le.difference={}),Le.channels.forEach(Ue=>{if(Le.ranges[Ue]===void 0&&(Le.ranges[Ue]=[0,1]),!Le.interpolate[Ue])throw new Error(`Missing interpolator for: ${Ue}`);typeof Le.interpolate[Ue]=="function"&&(Le.interpolate[Ue]={use:Le.interpolate[Ue]}),Le.interpolate[Ue].fixup||(Le.interpolate[Ue].fixup=re)}),U[Le.mode]=Le,(Le.parse||[]).forEach(Ue=>{G(Ue,Le.mode)}),P(Le.mode)),se=Le=>U[Le],G=(Le,Ue)=>{if(typeof Le=="string"){if(!Ue)throw new Error("'mode' required when 'parser' is a string");Q[Le]=Ue}else typeof Le=="function"&&$.indexOf(Le)<0&&$.push(Le)},X=Le=>{if(typeof Le=="string")delete Q[Le];else if(typeof Le=="function"){let Ue=$.indexOf(Le);Ue>0&&$.splice(Ue,1)}},K=/[^\x00-\x7F]|[a-zA-Z_]/,H=/[^\x00-\x7F]|[-\w]/,Y={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},q=0;function Z(Le){let Ue=Le[q],Qe=Le[q+1];return Ue==="-"||Ue==="+"?/\d/.test(Qe)||Qe==="."&&/\d/.test(Le[q+2]):Ue==="."?/\d/.test(Qe):/\d/.test(Ue)}function ee(Le){if(q>=Le.length)return!1;let Ue=Le[q];if(K.test(Ue))return!0;if(Ue==="-"){if(Le.length-q<2)return!1;let Qe=Le[q+1];return!!(Qe==="-"||K.test(Qe))}return!1}var ae={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function he(Le){let Ue="";if((Le[q]==="-"||Le[q]==="+")&&(Ue+=Le[q++]),Ue+=xe(Le),Le[q]==="."&&/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le)),(Le[q]==="e"||Le[q]==="E")&&((Le[q+1]==="-"||Le[q+1]==="+")&&/\d/.test(Le[q+2])?Ue+=Le[q++]+Le[q++]+xe(Le):/\d/.test(Le[q+1])&&(Ue+=Le[q++]+xe(Le))),ee(Le)){let Qe=we(Le);return Qe==="deg"||Qe==="rad"||Qe==="turn"||Qe==="grad"?{type:Y.Hue,value:Ue*ae[Qe]}:void 0}return Le[q]==="%"?(q++,{type:Y.Percentage,value:+Ue}):{type:Y.Number,value:+Ue}}function xe(Le){let Ue="";for(;/\d/.test(Le[q]);)Ue+=Le[q++];return Ue}function we(Le){let Ue="";for(;q4)){if(Qe.length===4){if(Qe[3].type!==Y.Alpha)return;Qe[3]=Qe[3].value}return Qe.length===3&&Qe.push({type:Y.None,value:void 0}),Qe.every(wt=>wt.type!==Y.Alpha)?Qe:void 0}}function Ge(Le,Ue){Le._i=0;let Qe=Le[Le._i++];if(!Qe||Qe.type!==Y.Function)return;let _t=Ve(Le,Ue);if(_t)return _t.unshift(Qe.value),_t}var ke=Le=>{if(typeof Le!="string")return;let Ue=Se(Le),Qe=Ue?Ge(Ue,!0):void 0,_t,wt=0,Lt=$.length;for(;wtLe==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Ae=le,Be=(Le,Ue,Qe)=>Le+Qe*(Ue-Le),Xe=(Le,Ue,Qe)=>(Qe-Le)/(Ue-Le),Ye=(Le,Ue,Qe,_t,wt,Lt)=>Be(Be(Le,Ue,wt),Be(Qe,_t,wt),Lt),yt=(Le,Ue,Qe,_t,wt,Lt,pr,Gr,va,Qa,Ga)=>Be(Ye(Le,Ue,Qe,_t,va,Qa),Ye(wt,Lt,pr,Gr,va,Qa),Ga),gt=Le=>{let Ue=[];for(let Qe=0;QeUe=>{let Qe=gt(Ue);return _t=>{let wt=_t*Qe.length,Lt=_t>=1?Qe.length-1:Math.max(Math.floor(wt),0),pr=Qe[Lt];return pr===void 0?void 0:Le(pr[0],pr[1],wt-Lt)}},At=Tt(Be),$t=Le=>{let Ue=!1,Qe=Le.map(_t=>_t!==void 0?(Ue=!0,_t):1);return Ue?Qe:Le},rr={mode:"rgb",channels:["r","g","b","alpha"],parse:[ve,g,O,m,Ae,"srgb"],serialize:"srgb",interpolate:{r:At,g:At,b:At,alpha:{use:At,fixup:$t}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},_r=rr,Xt=(Le=0)=>Math.pow(Math.abs(Le),563/256)*Math.sign(Le),or=Le=>{let Ue=Xt(Le.r),Qe=Xt(Le.g),_t=Xt(Le.b),wt={mode:"xyz65",x:.5766690429101305*Ue+.1855582379065463*Qe+.1882286462349947*_t,y:.297344975250536*Ue+.6273635662554661*Qe+.0752914584939979*_t,z:.0270313613864123*Ue+.0706888525358272*Qe+.9913375368376386*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Ot=or,vt=Le=>Math.pow(Math.abs(Le),256/563)*Math.sign(Le),ht=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"a98",r:vt(Le*2.0415879038107465-Ue*.5650069742788597-.3447313507783297*Qe),g:vt(Le*-.9692436362808798+Ue*1.8759675015077206+.0415550574071756*Qe),b:vt(Le*.0134442806320312-Ue*.1183623922310184+1.0151749943912058*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},De=ht,Ne=(Le=0)=>{let Ue=Math.abs(Le);return Ue<=.04045?Le/12.92:(Math.sign(Le)||1)*Math.pow((Ue+.055)/1.055,2.4)},We=({r:Le,g:Ue,b:Qe,alpha:_t})=>{let wt={mode:"lrgb",r:Ne(Le),g:Ne(Ue),b:Ne(Qe)};return _t!==void 0&&(wt.alpha=_t),wt},Ke=We,Je=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.4123907992659593*Ue+.357584339383878*Qe+.1804807884018343*_t,y:.2126390058715102*Ue+.715168678767756*Qe+.0721923153607337*_t,z:.0193308187155918*Ue+.119194779794626*Qe+.9505321522496607*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},et=Je,Mt=(Le=0)=>{let Ue=Math.abs(Le);return Ue>.0031308?(Math.sign(Le)||1)*(1.055*Math.pow(Ue,1/2.4)-.055):Le*12.92},pt=({r:Le,g:Ue,b:Qe,alpha:_t},wt="rgb")=>{let Lt={mode:wt,r:Mt(Le),g:Mt(Ue),b:Mt(Qe)};return _t!==void 0&&(Lt.alpha=_t),Lt},Pt=pt,Ct=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.2409699419045226-Ue*1.537383177570094-.4986107602930034*Qe,g:Le*-.9692436362808796+Ue*1.8759675015077204+.0415550574071756*Qe,b:Le*.0556300796969936-Ue*.2039769588889765+1.0569715142428784*Qe});return _t!==void 0&&(wt.alpha=_t),wt},qt=Ct,Vt=lo(Li({},_r),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:Le=>De(et(Le)),xyz65:De},toMode:{rgb:Le=>qt(Ot(Le)),xyz65:Ot}}),Ht=Vt,Sr=Le=>(Le=Le%360)<0?Le+360:Le,Kr=Sr,Yt=(Le,Ue)=>Le.map((Qe,_t,wt)=>{if(Qe===void 0)return Qe;let Lt=Kr(Qe);return _t===0||Le[_t-1]===void 0?Lt:Ue(Lt-Kr(wt[_t-1]))}).reduce((Qe,_t)=>!Qe.length||_t===void 0||Qe[Qe.length-1]===void 0?(Qe.push(_t),Qe):(Qe.push(_t+Qe[Qe.length-1]),Qe),[]),Rt=Le=>Yt(Le,Ue=>Math.abs(Ue)<=180?Ue:Ue-360*Math.sign(Ue)),nr=Le=>Yt(Le,Ue=>Math.abs(Ue)>=180||Ue===0?Ue:Ue-360*Math.sign(Ue)),ur=Le=>Yt(Le,Ue=>Ue>=0?Ue:Ue+360),cr=Le=>Yt(Le,Ue=>Ue<=0?Ue:Ue-360),Rr=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Qr=Math.PI/180,Zr=180/Math.PI,ha=Rr[3]*Rr[4],Pa=Rr[1]*Rr[4],La=Rr[1]*Rr[2]-Rr[0]*Rr[3],un=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(La*Qe+Le*ha-Ue*Pa)/(La+ha-Pa),Lt=Qe-wt,pr=(Rr[4]*(Ue-wt)-Rr[2]*Lt)/Rr[3],Gr={mode:"cubehelix",l:wt,s:wt===0||wt===1?void 0:Math.sqrt(Lt*Lt+pr*pr)/(Rr[4]*wt*(1-wt))};return Gr.s&&(Gr.h=Math.atan2(pr,Lt)*Zr-120),_t!==void 0&&(Gr.alpha=_t),Gr},Xa=un,ja=({h:Le,s:Ue,l:Qe,alpha:_t})=>{let wt={mode:"rgb"};Le=(Le===void 0?0:Le+120)*Qr,Qe===void 0&&(Qe=0);let Lt=Ue===void 0?0:Ue*Qe*(1-Qe),pr=Math.cos(Le),Gr=Math.sin(Le);return wt.r=Qe+Lt*(Rr[0]*pr+Rr[1]*Gr),wt.g=Qe+Lt*(Rr[2]*pr+Rr[3]*Gr),wt.b=Qe+Lt*(Rr[4]*pr+Rr[5]*Gr),_t!==void 0&&(wt.alpha=_t),wt},Nn=ja,yn=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.s||!Ue.s)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.s*Ue.s)*wt},Un=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h);return Math.abs(_t-Qe)>180?Qe-(_t-360*Math.sign(_t-Qe)):_t-Qe},li=(Le,Ue)=>{if(Le.h===void 0||Ue.h===void 0||!Le.c||!Ue.c)return 0;let Qe=Kr(Le.h),_t=Kr(Ue.h),wt=Math.sin((_t-Qe+360)/2*Math.PI/180);return 2*Math.sqrt(Le.c*Ue.c)*wt},Yn=(Le="rgb",Ue=[1,1,1,0])=>{let Qe=se(Le),_t=Qe.channels,wt=Qe.difference,Lt=P(Le);return(pr,Gr)=>{let va=Lt(pr),Qa=Lt(Gr);return Math.sqrt(_t.reduce((Ga,Ua,An)=>{let dn=wt[Ua]?wt[Ua](va,Qa):va[Ua]-Qa[Ua];return Ga+(Ue[An]||0)*Math.pow(isNaN(dn)?0:dn,2)},0))}},on=()=>Yn("lab65"),en=(Le=1,Ue=.045,Qe=.015)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),An=Gr.l,dn=Gr.a,_n=Gr.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(va-An,2),Zn=Math.pow(Ua-Mn,2),Ci=Math.pow(Qa-dn,2)+Math.pow(Ga-_n,2)-Zn;return Math.sqrt(Bn/Math.pow(Le,2)+Zn/Math.pow(1+Ue*Ua,2)+Ci/Math.pow(1+Qe*Ua,2))}},vi=(Le=1,Ue=1,Qe=1)=>{let _t=P("lab65");return(wt,Lt)=>{let pr=_t(wt),Gr=_t(Lt),va=pr.l,Qa=pr.a,Ga=pr.b,Ua=Math.sqrt(Qa*Qa+Ga*Ga),An=Gr.l,dn=Gr.a,_n=Gr.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=(Ua+Mn)/2,Zn=.5*(1-Math.sqrt(Math.pow(Bn,7)/(Math.pow(Bn,7)+Math.pow(25,7)))),Ci=Qa*(1+Zn),qo=dn*(1+Zn),As=Math.sqrt(Ci*Ci+Ga*Ga),ls=Math.sqrt(qo*qo+_n*_n),Vl=Math.abs(Ci)+Math.abs(Ga)===0?0:Math.atan2(Ga,Ci);Vl+=(Vl<0)*2*Math.PI;let au=Math.abs(qo)+Math.abs(_n)===0?0:Math.atan2(_n,qo);au+=(au<0)*2*Math.PI;let Lu=An-va,uh=ls-As,wh=As*ls===0?0:au-Vl;wh-=(wh>Math.PI)*2*Math.PI,wh+=(wh<-Math.PI)*2*Math.PI;let Gh=2*Math.sqrt(As*ls)*Math.sin(wh/2),Gd=(va+An)/2,Ad=(As+ls)/2,ch;As*ls===0?ch=Vl+au:(ch=(Vl+au)/2,ch-=(Math.abs(Vl-au)>Math.PI)*Math.PI,ch+=(ch<0)*2*Math.PI);let Mv=Math.pow(Gd-50,2),vp=1-.17*Math.cos(ch-Math.PI/6)+.24*Math.cos(2*ch)+.32*Math.cos(3*ch+Math.PI/30)-.2*Math.cos(4*ch-63*Math.PI/180),mp=1+.015*Mv/Math.sqrt(20+Mv),gp=1+.045*Ad,yp=1+.015*Ad*vp,xg=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*ch-275)/25,2)),p0=2*Math.sqrt(Math.pow(Ad,7)/(Math.pow(Ad,7)+Math.pow(25,7))),Md=-1*Math.sin(2*xg)*p0;return Math.sqrt(Math.pow(Lu/(Le*mp),2)+Math.pow(uh/(Ue*gp),2)+Math.pow(Gh/(Qe*yp),2)+Md*uh/(Ue*gp)*Gh/(Qe*yp))}},Yi=(Le=1,Ue=1)=>{let Qe=P("lab65");return(_t,wt)=>{let Lt=Qe(_t),pr=Lt.l,Gr=Lt.a,va=Lt.b,Qa=Math.sqrt(Gr*Gr+va*va),Ga=Math.atan2(va,Gr);Ga=Ga+2*Math.PI*(Ga<0);let Ua=Qe(wt),An=Ua.l,dn=Ua.a,_n=Ua.b,Mn=Math.sqrt(dn*dn+_n*_n),Bn=Math.pow(pr-An,2),Zn=Math.pow(Qa-Mn,2),Ci=Math.pow(Gr-dn,2)+Math.pow(va-_n,2)-Zn,qo=Math.sqrt(Math.pow(Qa,4)/(Math.pow(Qa,4)+1900)),As=Ga>=164/180*Math.PI&&Ga<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(Ga+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(Ga+35/180*Math.PI)),ls=pr<16?.511:.040975*pr/(1+.01765*pr),Vl=.0638*Qa/(1+.0131*Qa)+.638,au=Vl*(qo*As+1-qo);return Math.sqrt(Bn/Math.pow(Le*ls,2)+Zn/Math.pow(Ue*Vl,2)+Ci/Math.pow(au,2))}},Ja=()=>{let Le=P("lab65");return(Ue,Qe)=>{let _t=Le(Ue),wt=Le(Qe),Lt=_t.l-wt.l,pr=_t.a-wt.a,Gr=_t.b-wt.b;return Math.abs(Lt)+Math.sqrt(pr*pr+Gr*Gr)}},Oa=()=>Yn("yiq",[.5053,.299,.1957]),lt=()=>Yn("itp",[518400,129600,518400]),rt=Le=>{let Ue=Le.reduce((_t,wt)=>{if(wt!==void 0){let Lt=wt*Math.PI/180;_t.sin+=Math.sin(Lt),_t.cos+=Math.cos(Lt)}return _t},{sin:0,cos:0}),Qe=Math.atan2(Ue.sin,Ue.cos)*180/Math.PI;return Qe<0?360+Qe:Qe},fr=Le=>{let Ue=Le.filter(Qe=>Qe!==void 0);return Ue.length?Ue.reduce((Qe,_t)=>Qe+_t,0)/Ue.length:void 0},lr=Le=>typeof Le=="function";function Tr(Le,Ue="rgb",Qe){let _t=se(Ue),wt=Le.map(P(Ue));return _t.channels.reduce((Lt,pr)=>{let Gr=wt.map(va=>va[pr]).filter(va=>va!==void 0);if(Gr.length){let va;lr(Qe)?va=Qe:Qe&&lr(Qe[pr])?va=Qe[pr]:_t.average&&lr(_t.average[pr])?va=_t.average[pr]:va=fr,Lt[pr]=va(Gr,pr)}return Lt},{mode:Ue})}var Ir={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:Xa},toMode:{rgb:Nn},interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Dr=Ir,ot=({l:Le,a:Ue,b:Qe,alpha:_t},wt="lch")=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let Lt=Math.sqrt(Ue*Ue+Qe*Qe),pr={mode:wt,l:Le,c:Lt};return Lt&&(pr.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(pr.alpha=_t),pr},kt=ot,jt=({l:Le,c:Ue,h:Qe,alpha:_t},wt="lab")=>{Qe===void 0&&(Qe=0);let Lt={mode:wt,l:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(Lt.alpha=_t),Lt},ar=jt,Er=Math.pow(29,3)/Math.pow(3,3),xr=Math.pow(6,3)/Math.pow(29,3),zr={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},Lr={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},aa=Math.pow(29,3)/Math.pow(3,3),Sa=Math.pow(6,3)/Math.pow(29,3),wa=Le=>Math.pow(Le,3)>xr?Math.pow(Le,3):(116*Le-16)/Er,pn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz65",x:wa(Lt)*Lr.X,y:wa(wt)*Lr.Y,z:wa(pr)*Lr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tn=pn,ai=Le=>qt(tn(Le)),rn=ai,Ri=Le=>Le>xr?Math.cbrt(Le):(Er*Le+16)/116,Gn=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ri(Le/Lr.X),Lt=Ri(Ue/Lr.Y),pr=Ri(Qe/Lr.Z),Gr={mode:"lab65",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},no=Gn,Di=Le=>{let Ue=no(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},fn=Di,Ai=1,jn=1,Xn=26/180*Math.PI,eo=Math.cos(Xn),gi=Math.sin(Xn),qi=100/Math.log(139/100),io=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"lab65",l:(Math.exp(Le*Ai/qi)-1)/.0039},Lt=(Math.exp(.0435*Ue*jn*Ai)-1)/.075,pr=Lt*Math.cos(Qe/180*Math.PI-Xn),Gr=Lt*Math.sin(Qe/180*Math.PI-Xn);return wt.a=pr*eo-Gr/.83*gi,wt.b=pr*gi+Gr/.83*eo,_t!==void 0&&(wt.alpha=_t),wt},oo=io,Vn=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue*eo+Qe*gi,Lt=.83*(Qe*eo-Ue*gi),pr=Math.sqrt(wt*wt+Lt*Lt),Gr={mode:"dlch",l:qi/Ai*Math.log(1+.0039*Le),c:Math.log(1+.075*pr)/(.0435*jn*Ai)};return Gr.c&&(Gr.h=Kr((Math.atan2(Lt,wt)+Xn)/Math.PI*180)),_t!==void 0&&(Gr.alpha=_t),Gr},qn=Vn,Hi=Le=>oo(kt(Le,"dlch")),Mi=Le=>ar(qn(Le),"dlab"),Ro={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:Hi,rgb:Le=>rn(Hi(Le))},fromMode:{lab65:Mi,rgb:Le=>Mi(fn(Le))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},go=Ro,Eo={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:oo,dlab:Le=>ar(Le,"dlab"),rgb:Le=>rn(oo(Le))},fromMode:{lab65:qn,dlab:Le=>kt(Le,"dlch"),rgb:Le=>qn(fn(Le))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:At,c:At,h:{use:At,fixup:Rt},alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},Ao=Eo;function ds({h:Le,s:Ue,i:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3/(2-wt)-1)),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 4:Lt={r:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3/(2-wt)-1))};break;case 5:Lt={r:Qe*(1+Ue*(3/(2-wt)-1)),g:Qe*(1-Ue),b:Qe*(1+Ue*(3*(1-wt)/(2-wt)-1))};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function jo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsi",s:Le+Ue+Qe===0?0:1-3*Lt/(Le+Ue+Qe),i:(Le+Ue+Qe)/3};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue{switch(Ue){case"deg":return+Le;case"rad":return Le/Math.PI*180;case"grad":return Le/10*9;case"turn":return Le*360}},Io=Vi,Xi=new RegExp(`^hsla?\\(\\s*${T}${u}${S}${u}${S}\\s*(?:,\\s*${C}\\s*)?\\)$`),Ko=Le=>{let Ue=Le.match(Xi);if(!Ue)return;let Qe={mode:"hsl"};return Ue[3]!==void 0?Qe.h=+Ue[3]:Ue[1]!==void 0&&Ue[2]!==void 0&&(Qe.h=Io(Ue[1],Ue[2])),Ue[4]!==void 0&&(Qe.s=Math.min(Math.max(0,Ue[4]/100),1)),Ue[5]!==void 0&&(Qe.l=Math.min(Math.max(0,Ue[5]/100),1)),Ue[6]!==void 0?Qe.alpha=Math.max(0,Math.min(1,Ue[6]/100)):Ue[7]!==void 0&&(Qe.alpha=Math.max(0,Math.min(1,+Ue[7]))),Qe},Uo=Ko;function Ls(Le,Ue){if(!Ue||Ue[0]!=="hsl"&&Ue[0]!=="hsla")return;let Qe={mode:"hsl"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.s=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.l=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Ss=Ls,Vo={mode:"hsl",toMode:{rgb:wo},fromMode:{rgb:pi},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Ss,Uo],serialize:Le=>`hsl(${Le.h!==void 0?Le.h:"none"} ${Le.s!==void 0?Le.s*100+"%":"none"} ${Le.l!==void 0?Le.l*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},s:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:yn},average:{h:rt}},Vs=Vo;function Ts({h:Le,s:Ue,v:Qe,alpha:_t}){Le=Kr(Le!==void 0?Le:0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.abs(Le/60%2-1),Lt;switch(Math.floor(Le/60)){case 0:Lt={r:Qe,g:Qe*(1-Ue*wt),b:Qe*(1-Ue)};break;case 1:Lt={r:Qe*(1-Ue*wt),g:Qe,b:Qe*(1-Ue)};break;case 2:Lt={r:Qe*(1-Ue),g:Qe,b:Qe*(1-Ue*wt)};break;case 3:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue*wt),b:Qe};break;case 4:Lt={r:Qe*(1-Ue*wt),g:Qe*(1-Ue),b:Qe};break;case 5:Lt={r:Qe,g:Qe*(1-Ue),b:Qe*(1-Ue*wt)};break;default:Lt={r:Qe*(1-Ue),g:Qe*(1-Ue),b:Qe*(1-Ue)}}return Lt.mode="rgb",_t!==void 0&&(Lt.alpha=_t),Lt}function Bo({r:Le,g:Ue,b:Qe,alpha:_t}){Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.max(Le,Ue,Qe),Lt=Math.min(Le,Ue,Qe),pr={mode:"hsv",s:wt===0?0:1-Lt/wt,v:wt};return wt-Lt!==0&&(pr.h=(wt===Le?(Ue-Qe)/(wt-Lt)+(Ue1){let wt=Ue+Qe;Ue/=wt,Qe/=wt}return Ts({h:Le,s:Qe===1?1:1-Ue/(1-Qe),v:1-Qe,alpha:_t})}function bs(Le){let Ue=Bo(Le);if(Ue===void 0)return;let Qe=Ue.s!==void 0?Ue.s:0,_t=Ue.v!==void 0?Ue.v:0,wt={mode:"hwb",w:(1-Qe)*_t,b:1-_t};return Ue.h!==void 0&&(wt.h=Ue.h),Ue.alpha!==void 0&&(wt.alpha=Ue.alpha),wt}function Dl(Le,Ue){if(!Ue||Ue[0]!=="hwb")return;let Qe={mode:"hwb"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Percentage)return;Qe.h=_t.value}if(wt.type!==Y.None){if(wt.type===Y.Hue)return;Qe.w=wt.value/100}if(Lt.type!==Y.None){if(Lt.type===Y.Hue)return;Qe.b=Lt.value/100}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var hl=Dl,ps={mode:"hwb",toMode:{rgb:yo},fromMode:{rgb:bs},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[hl],serialize:Le=>`hwb(${Le.h!==void 0?Le.h:"none"} ${Le.w!==void 0?Le.w*100+"%":"none"} ${Le.b!==void 0?Le.b*100+"%":"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},w:At,b:At,alpha:{use:At,fixup:$t}},difference:{h:Un},average:{h:rt}},dl=ps,wu=203,lu=.1593017578125,xc=78.84375,Fl=.8359375,pl=18.8515625,$u=18.6875;function uu(Le){if(Le<0)return 0;let Ue=Math.pow(Le,1/xc);return 1e4*Math.pow(Math.max(0,Ue-Fl)/(pl-$u*Ue),1/lu)}function tl(Le){if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),xc)}var vs=Le=>Math.max(Le/wu,0),os=({i:Le,t:Ue,p:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=uu(Le+.008609037037932761*Ue+.11102962500302593*Qe),Lt=uu(Le-.00860903703793275*Ue-.11102962500302599*Qe),pr=uu(Le+.5600313357106791*Ue-.32062717498731885*Qe),Gr={mode:"xyz65",x:vs(2.070152218389422*wt-1.3263473389671556*Lt+.2066510476294051*pr),y:vs(.3647385209748074*wt+.680566024947227*Lt-.0453045459220346*pr),z:vs(-.049747207535812*wt-.0492609666966138*Lt+1.1880659249923042*pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ms=os,rl=(Le=0)=>Math.max(Le*wu,0),Fu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{let wt=rl(Le),Lt=rl(Ue),pr=rl(Qe),Gr=tl(.3592832590121217*wt+.6976051147779502*Lt-.0358915932320289*pr),va=tl(-.1920808463704995*wt+1.1004767970374323*Lt+.0753748658519118*pr),Qa=tl(.0070797844607477*wt+.0748396662186366*Lt+.8433265453898765*pr),Ga=.5*Gr+.5*va,Ua=1.61376953125*Gr-3.323486328125*va+1.709716796875*Qa,An=4.378173828125*Gr-4.24560546875*va-.132568359375*Qa,dn={mode:"itp",i:Ga,t:Ua,p:An};return _t!==void 0&&(dn.alpha=_t),dn},zu=Fu,Ku={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:ms,rgb:Le=>qt(ms(Le))},fromMode:{xyz65:zu,rgb:Le=>zu(et(Le))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:At,t:At,p:At,alpha:{use:At,fixup:$t}}},bc=Ku,Lh=134.03437499999998,rh=16295499532821565e-27,Ju=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le/1e4,lu);return Math.pow((Fl+pl*Ue)/(1+$u*Ue),Lh)},ss=(Le=0)=>Math.max(Le*203,0),ah=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le=ss(Le),Ue=ss(Ue),Qe=ss(Qe);let wt=1.15*Le-.15*Qe,Lt=.66*Ue+.34*Le,pr=Ju(.41478972*wt+.579999*Lt+.014648*Qe),Gr=Ju(-.20151*wt+1.120649*Lt+.0531008*Qe),va=Ju(-.0166008*wt+.2648*Lt+.6684799*Qe),Qa=(pr+Gr)/2,Ga={mode:"jab",j:.44*Qa/(1-.56*Qa)-rh,a:3.524*pr-4.066708*Gr+.542708*va,b:.199076*pr+1.096799*Gr-1.295875*va};return _t!==void 0&&(Ga.alpha=_t),Ga},wc=ah,pc=134.03437499999998,Nf=16295499532821565e-27,Bu=Le=>{if(Le<0)return 0;let Ue=Math.pow(Le,1/pc);return 1e4*Math.pow((Fl-Ue)/($u*Ue-pl),1/lu)},Tc=Le=>Le/203,Ou=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+Nf)/(.44+.56*(Le+Nf)),Lt=Bu(wt+.13860504*Ue+.058047316*Qe),pr=Bu(wt-.13860504*Ue-.058047316*Qe),Gr=Bu(wt-.096019242*Ue-.8118919*Qe),va={mode:"xyz65",x:Tc(1.661373024652174*Lt-.914523081304348*pr+.23136208173913045*Gr),y:Tc(-.3250758611844533*Lt+1.571847026732543*pr-.21825383453227928*Gr),z:Tc(-.090982811*Lt-.31272829*pr+1.5227666*Gr)};return _t!==void 0&&(va.alpha=_t),va},Gc=Ou,pf=Le=>{let Ue=wc(et(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},$l=pf,jf=Le=>qt(Gc(Le)),Hc=jf,Wc={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:$l,xyz65:wc},toMode:{rgb:Hc,xyz65:Gc},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Qu=Wc,Yc=({j:Le,a:Ue,b:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"jch",j:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},Nu=Yc,Uf=({j:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"jab",j:Le,a:Ue?Ue*Math.cos(Qe/180*Math.PI):0,b:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},al=Uf,Xc={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:al,rgb:Le=>Hc(al(Le))},fromMode:{rgb:Le=>Nu($l(Le)),jab:Nu},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,j:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},ju=Xc,Ac=Math.pow(29,3)/Math.pow(3,3),Zc=Math.pow(6,3)/Math.pow(29,3),ec=Le=>Math.pow(Le,3)>Zc?Math.pow(Le,3):(116*Le-16)/Ac,cu=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=(Le+16)/116,Lt=Ue/500+wt,pr=wt-Qe/200,Gr={mode:"xyz50",x:ec(Lt)*zr.X,y:ec(wt)*zr.Y,z:ec(pr)*zr.Z};return _t!==void 0&&(Gr.alpha=_t),Gr},tc=cu,vf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*3.1341359569958707-Ue*1.6173863321612538-.4906619460083532*Qe,g:Le*-.978795502912089+Ue*1.916254567259524+.03344273116131949*Qe,b:Le*.07195537988411677-Ue*.2289768264158322+1.405386058324125*Qe});return _t!==void 0&&(wt.alpha=_t),wt},Tu=vf,nh=Le=>Tu(tc(Le)),vl=nh,ml=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz50",x:.436065742824811*Ue+.3851514688337912*Qe+.14307845442264197*_t,y:.22249319175623702*Ue+.7168870538238823*Qe+.06061979053616537*_t,z:.013923904500943465*Ue+.09708128566574634*Qe+.7140993584005155*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},rc=ml,yl=Le=>Le>Zc?Math.cbrt(Le):(Ac*Le+16)/116,qf=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=yl(Le/zr.X),Lt=yl(Ue/zr.Y),pr=yl(Qe/zr.Z),Gr={mode:"lab",l:116*Lt-16,a:500*(wt-Lt),b:200*(Lt-pr)};return _t!==void 0&&(Gr.alpha=_t),Gr},ac=qf,Mc=Le=>{let Ue=ac(rc(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},mf=Mc;function Jo(Le,Ue){if(!Ue||Ue[0]!=="lab")return;let Qe={mode:"lab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.value),100)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*125/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*125/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var ih=Jo,fu={mode:"lab",toMode:{xyz50:tc,rgb:vl},fromMode:{xyz50:ac,rgb:mf},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[ih],serialize:Le=>`lab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{l:At,a:At,b:At,alpha:{use:At,fixup:$t}}},Sl=fu,El=lo(Li({},Sl),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:tn,rgb:rn},fromMode:{xyz65:no,rgb:fn},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),oh=El;function Au(Le,Ue){if(!Ue||Ue[0]!=="lch")return;let Qe={mode:"lch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.value),100)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*150/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var $c=Au,_l={mode:"lch",toMode:{lab:ar,rgb:Le=>vl(ar(Le))},fromMode:{rgb:Le=>kt(mf(Le)),lab:kt},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[$c],serialize:Le=>`lch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},nl=_l,gf=lo(Li({},nl),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:Le=>ar(Le,"lab65"),rgb:Le=>rn(ar(Le,"lab65"))},fromMode:{rgb:Le=>kt(fn(Le),"lch65"),lab65:Le=>kt(Le,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),Kc=gf,sh=({l:Le,u:Ue,v:Qe,alpha:_t})=>{Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.sqrt(Ue*Ue+Qe*Qe),Lt={mode:"lchuv",l:Le,c:wt};return wt&&(Lt.h=Kr(Math.atan2(Qe,Ue)*180/Math.PI)),_t!==void 0&&(Lt.alpha=_t),Lt},hu=sh,Uu=({l:Le,c:Ue,h:Qe,alpha:_t})=>{Qe===void 0&&(Qe=0);let wt={mode:"luv",l:Le,u:Ue?Ue*Math.cos(Qe/180*Math.PI):0,v:Ue?Ue*Math.sin(Qe/180*Math.PI):0};return _t!==void 0&&(wt.alpha=_t),wt},qu=Uu,nc=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),yf=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),_f=nc(zr.X,zr.Y,zr.Z),Mu=yf(zr.X,zr.Y,zr.Z),ic=Le=>Le<=Zc?Ac*Le:116*Math.cbrt(Le)-16,Sc=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=ic(Ue/zr.Y),Lt=nc(Le,Ue,Qe),pr=yf(Le,Ue,Qe);!isFinite(Lt)||!isFinite(pr)?wt=Lt=pr=0:(Lt=13*wt*(Lt-_f),pr=13*wt*(pr-Mu));let Gr={mode:"luv",l:wt,u:Lt,v:pr};return _t!==void 0&&(Gr.alpha=_t),Gr},Vu=Sc,xo=(Le,Ue,Qe)=>4*Le/(Le+15*Ue+3*Qe),Ec=(Le,Ue,Qe)=>9*Ue/(Le+15*Ue+3*Qe),xh=xo(zr.X,zr.Y,zr.Z),Vf=Ec(zr.X,zr.Y,zr.Z),xf=({l:Le,u:Ue,v:Qe,alpha:_t})=>{if(Le===void 0&&(Le=0),Le===0)return{mode:"xyz50",x:0,y:0,z:0};Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Ue/(13*Le)+xh,Lt=Qe/(13*Le)+Vf,pr=zr.Y*(Le<=8?Le/Ac:Math.pow((Le+16)/116,3)),Gr=pr*(9*wt)/(4*Lt),va=pr*(12-3*wt-20*Lt)/(4*Lt),Qa={mode:"xyz50",x:Gr,y:pr,z:va};return _t!==void 0&&(Qa.alpha=_t),Qa},Gf=xf,bh=Le=>hu(Vu(rc(Le))),Hf=Le=>Tu(Gf(qu(Le))),il={mode:"lchuv",toMode:{luv:qu,rgb:Hf},fromMode:{rgb:bh,luv:hu},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:At,fixup:Rt},c:At,l:At,alpha:{use:At,fixup:$t}},difference:{h:li},average:{h:rt}},kl=il,kc=lo(Li({},_r),{mode:"lrgb",toMode:{rgb:Pt},fromMode:{rgb:Ke},parse:["srgb-linear"],serialize:"srgb-linear"}),Cc=kc,Lc={mode:"luv",toMode:{xyz50:Gf,rgb:Le=>Tu(Gf(Le))},fromMode:{xyz50:Vu,rgb:Le=>Vu(rc(Le))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:At,u:At,v:At,alpha:{use:At,fixup:$t}}},vc=Lc,Ft=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.cbrt(.412221469470763*Le+.5363325372617348*Ue+.0514459932675022*Qe),Lt=Math.cbrt(.2119034958178252*Le+.6806995506452344*Ue+.1073969535369406*Qe),pr=Math.cbrt(.0883024591900564*Le+.2817188391361215*Ue+.6299787016738222*Qe),Gr={mode:"oklab",l:.210454268309314*wt+.7936177747023054*Lt-.0040720430116193*pr,a:1.9779985324311684*wt-2.42859224204858*Lt+.450593709617411*pr,b:.0259040424655478*wt+.7827717124575296*Lt-.8086757549230774*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},tr=Ft,Fr=Le=>{let Ue=tr(Ke(Le));return Le.r===Le.b&&Le.b===Le.g&&(Ue.a=Ue.b=0),Ue},wr=Fr,ea=({l:Le,a:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Math.pow(Le+.3963377773761749*Ue+.2158037573099136*Qe,3),Lt=Math.pow(Le-.1055613458156586*Ue-.0638541728258133*Qe,3),pr=Math.pow(Le-.0894841775298119*Ue-1.2914855480194092*Qe,3),Gr={mode:"lrgb",r:4.076741636075957*wt-3.3077115392580616*Lt+.2309699031821044*pr,g:-1.2684379732850317*wt+2.6097573492876887*Lt-.3413193760026573*pr,b:-.0041960761386756*wt-.7034186179359362*Lt+1.7076146940746117*pr};return _t!==void 0&&(Gr.alpha=_t),Gr},ba=ea,Ia=Le=>Pt(ba(Le)),Na=Ia;function Za(Le){let _t=1.170873786407767;return .5*(_t*Le-.206+Math.sqrt((_t*Le-.206)*(_t*Le-.206)+4*.03*_t*Le))}function mn(Le){return(Le*Le+.206*Le)/(1.170873786407767*(Le+.03))}function Da(Le,Ue){let Qe,_t,wt,Lt,pr,Gr,va,Qa;-1.88170328*Le-.80936493*Ue>1?(Qe=1.19086277,_t=1.76576728,wt=.59662641,Lt=.75515197,pr=.56771245,Gr=4.0767416621,va=-3.3077115913,Qa=.2309699292):1.81444104*Le-1.19445276*Ue>1?(Qe=.73956515,_t=-.45954404,wt=.08285427,Lt=.1254107,pr=.14503204,Gr=-1.2684380046,va=2.6097574011,Qa=-.3413193965):(Qe=1.35733652,_t=-.00915799,wt=-1.1513021,Lt=-.50559606,pr=.00692167,Gr=-.0041960863,va=-.7034186147,Qa=1.707614701);let Ga=Qe+_t*Le+wt*Ue+Lt*Le*Le+pr*Le*Ue,Ua=.3963377774*Le+.2158037573*Ue,An=-.1055613458*Le-.0638541728*Ue,dn=-.0894841775*Le-1.291485548*Ue;{let _n=1+Ga*Ua,Mn=1+Ga*An,Bn=1+Ga*dn,Zn=_n*_n*_n,Ci=Mn*Mn*Mn,qo=Bn*Bn*Bn,As=3*Ua*_n*_n,ls=3*An*Mn*Mn,Vl=3*dn*Bn*Bn,au=6*Ua*Ua*_n,Lu=6*An*An*Mn,uh=6*dn*dn*Bn,wh=Gr*Zn+va*Ci+Qa*qo,Gh=Gr*As+va*ls+Qa*Vl,Gd=Gr*au+va*Lu+Qa*uh;Ga=Ga-wh*Gh/(Gh*Gh-.5*wh*Gd)}return Ga}function Ha(Le,Ue){let Qe=Da(Le,Ue),_t=ba({l:1,a:Qe*Le,b:Qe*Ue}),wt=Math.cbrt(1/Math.max(_t.r,_t.g,_t.b)),Lt=wt*Qe;return[wt,Lt]}function $a(Le,Ue,Qe,_t,wt,Lt=null){Lt||(Lt=Ha(Le,Ue));let pr;if((Qe-wt)*Lt[1]-(Lt[0]-wt)*_t<=0)pr=Lt[1]*wt/(_t*Lt[0]+Lt[1]*(wt-Qe));else{pr=Lt[1]*(wt-1)/(_t*(Lt[0]-1)+Lt[1]*(wt-Qe));{let Gr=Qe-wt,va=_t,Qa=.3963377774*Le+.2158037573*Ue,Ga=-.1055613458*Le-.0638541728*Ue,Ua=-.0894841775*Le-1.291485548*Ue,An=Gr+va*Qa,dn=Gr+va*Ga,_n=Gr+va*Ua;{let Mn=wt*(1-pr)+pr*Qe,Bn=pr*_t,Zn=Mn+Bn*Qa,Ci=Mn+Bn*Ga,qo=Mn+Bn*Ua,As=Zn*Zn*Zn,ls=Ci*Ci*Ci,Vl=qo*qo*qo,au=3*An*Zn*Zn,Lu=3*dn*Ci*Ci,uh=3*_n*qo*qo,wh=6*An*An*Zn,Gh=6*dn*dn*Ci,Gd=6*_n*_n*qo,Ad=4.0767416621*As-3.3077115913*ls+.2309699292*Vl-1,ch=4.0767416621*au-3.3077115913*Lu+.2309699292*uh,Mv=4.0767416621*wh-3.3077115913*Gh+.2309699292*Gd,vp=ch/(ch*ch-.5*Ad*Mv),mp=-Ad*vp,gp=-1.2684380046*As+2.6097574011*ls-.3413193965*Vl-1,yp=-1.2684380046*au+2.6097574011*Lu-.3413193965*uh,xg=-1.2684380046*wh+2.6097574011*Gh-.3413193965*Gd,p0=yp/(yp*yp-.5*gp*xg),Md=-gp*p0,v0=-.0041960863*As-.7034186147*ls+1.707614701*Vl-1,m0=-.0041960863*au-.7034186147*Lu+1.707614701*uh,Hd=-.0041960863*wh-.7034186147*Gh+1.707614701*Gd,_p=m0/(m0*m0-.5*v0*Hd),bg=-v0*_p;mp=vp>=0?mp:1e6,Md=p0>=0?Md:1e6,bg=_p>=0?bg:1e6,pr+=Math.min(mp,Math.min(Md,bg))}}}return pr}function vn(Le,Ue,Qe=null){Qe||(Qe=Ha(Le,Ue));let _t=Qe[0],wt=Qe[1];return[wt/_t,wt/(1-_t)]}function Sn(Le,Ue,Qe){let _t=Ha(Ue,Qe),wt=$a(Ue,Qe,Le,1,Le,_t),Lt=vn(Ue,Qe,_t),pr=.11516993+1/(7.4477897+4.1590124*Qe+Ue*(-2.19557347+1.75198401*Qe+Ue*(-2.13704948-10.02301043*Qe+Ue*(-4.24894561+5.38770819*Qe+4.69891013*Ue)))),Gr=.11239642+1/(1.6132032-.68124379*Qe+Ue*(.40370612+.90148123*Qe+Ue*(-.27087943+.6122399*Qe+Ue*(.00299215-.45399568*Qe-.14661872*Ue)))),va=wt/Math.min(Le*Lt[0],(1-Le)*Lt[1]),Qa=Le*pr,Ga=(1-Le)*Gr,Ua=.9*va*Math.sqrt(Math.sqrt(1/(1/(Qa*Qa*Qa*Qa)+1/(Ga*Ga*Ga*Ga))));return Qa=Le*.4,Ga=(1-Le)*.8,[Math.sqrt(1/(1/(Qa*Qa)+1/(Ga*Ga))),Ua,wt]}function yi(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt={mode:"okhsl",l:Za(Ue)};Le.alpha!==void 0&&(wt.alpha=Le.alpha);let Lt=Math.sqrt(Qe*Qe+_t*_t);if(!Lt)return wt.s=0,wt;let[pr,Gr,va]=Sn(Ue,Qe/Lt,_t/Lt),Qa;if(Ltyi(wr(Le))},toMode:{oklab:_i,rgb:Le=>Na(_i(Le))}}),ri=ki;function En(Le){let Ue=Le.l!==void 0?Le.l:0,Qe=Le.a!==void 0?Le.a:0,_t=Le.b!==void 0?Le.b:0,wt=Math.sqrt(Qe*Qe+_t*_t),Lt=wt?Qe/wt:1,pr=wt?_t/wt:1,[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=va/(wt+Ue*va),An=Ua*Ue,dn=Ua*wt,_n=mn(An),Mn=dn*_n/An,Bn=ba({l:_n,a:Lt*Mn,b:pr*Mn}),Zn=Math.cbrt(1/Math.max(Bn.r,Bn.g,Bn.b,0));Ue=Ue/Zn,wt=wt/Zn*Za(Ue)/Ue,Ue=Za(Ue);let Ci={mode:"okhsv",s:wt?(Qa+va)*dn/(va*Qa+va*Ga*dn):0,v:Ue?Ue/An:0};return Ci.s&&(Ci.h=Kr(Math.atan2(_t,Qe)*180/Math.PI)),Le.alpha!==void 0&&(Ci.alpha=Le.alpha),Ci}function Ln(Le){let Ue={mode:"oklab"};Le.alpha!==void 0&&(Ue.alpha=Le.alpha);let Qe=Le.h!==void 0?Le.h:0,_t=Le.s!==void 0?Le.s:0,wt=Le.v!==void 0?Le.v:0,Lt=Math.cos(Qe/180*Math.PI),pr=Math.sin(Qe/180*Math.PI),[Gr,va]=vn(Lt,pr),Qa=.5,Ga=1-Qa/Gr,Ua=1-_t*Qa/(Qa+va-va*Ga*_t),An=_t*va*Qa/(Qa+va-va*Ga*_t),dn=mn(Ua),_n=An*dn/Ua,Mn=ba({l:dn,a:Lt*_n,b:pr*_n}),Bn=Math.cbrt(1/Math.max(Mn.r,Mn.g,Mn.b,0)),Zn=mn(wt*Ua),Ci=An*Zn/Ua;return Ue.l=Zn*Bn,Ue.a=Ci*Lt*Bn,Ue.b=Ci*pr*Bn,Ue}var Ni=lo(Li({},Pi),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:En,rgb:Le=>En(wr(Le))},toMode:{oklab:Ln,rgb:Le=>Na(Ln(Le))}}),Zi=Ni;function Co(Le,Ue){if(!Ue||Ue[0]!=="oklab")return;let Qe={mode:"oklab"},[,_t,wt,Lt,pr]=Ue;if(!(_t.type===Y.Hue||wt.type===Y.Hue||Lt.type===Y.Hue))return _t.type!==Y.None&&(Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)),wt.type!==Y.None&&(Qe.a=wt.type===Y.Number?wt.value:wt.value*.4/100),Lt.type!==Y.None&&(Qe.b=Lt.type===Y.Number?Lt.value:Lt.value*.4/100),pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Do=Co,Fo=lo(Li({},Sl),{mode:"oklab",toMode:{lrgb:ba,rgb:Na},fromMode:{lrgb:tr,rgb:wr},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[Do],serialize:Le=>`oklab(${Le.l!==void 0?Le.l:"none"} ${Le.a!==void 0?Le.a:"none"} ${Le.b!==void 0?Le.b:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`}),Yo=Fo;function bo(Le,Ue){if(!Ue||Ue[0]!=="oklch")return;let Qe={mode:"oklch"},[,_t,wt,Lt,pr]=Ue;if(_t.type!==Y.None){if(_t.type===Y.Hue)return;Qe.l=Math.min(Math.max(0,_t.type===Y.Number?_t.value:_t.value/100),1)}if(wt.type!==Y.None&&(Qe.c=Math.max(0,wt.type===Y.Number?wt.value:wt.value*.4/100)),Lt.type!==Y.None){if(Lt.type===Y.Percentage)return;Qe.h=Lt.value}return pr.type!==Y.None&&(Qe.alpha=Math.min(1,Math.max(0,pr.type===Y.Number?pr.value:pr.value/100))),Qe}var Gs=bo,Es=lo(Li({},nl),{mode:"oklch",toMode:{oklab:Le=>ar(Le,"oklab"),rgb:Le=>Na(ar(Le,"oklab"))},fromMode:{rgb:Le=>kt(wr(Le),"oklch"),oklab:Le=>kt(Le,"oklch")},parse:[Gs],serialize:Le=>`oklch(${Le.l!==void 0?Le.l:"none"} ${Le.c!==void 0?Le.c:"none"} ${Le.h!==void 0?Le.h:"none"}${Le.alpha<1?` / ${Le.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),ns=Es,Kn=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt={mode:"xyz65",x:.486570948648216*Ue+.265667693169093*Qe+.1982172852343625*_t,y:.2289745640697487*Ue+.6917385218365062*Qe+.079286914093745*_t,z:0*Ue+.0451133818589026*Qe+1.043944368900976*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},zo=Kn,gs=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=Pt({r:Le*2.4934969119414263-Ue*.9313836179191242-.402710784450717*Qe,g:Le*-.8294889695615749+Ue*1.7626640603183465+.0236246858419436*Qe,b:Le*.0358458302437845-Ue*.0761723892680418+.9568845240076871*Qe},"p3");return _t!==void 0&&(wt.alpha=_t),wt},js=gs,Cl=lo(Li({},_r),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:Le=>js(et(Le)),xyz65:js},toMode:{rgb:Le=>qt(zo(Le)),xyz65:zo}}),zl=Cl,Kl=Le=>{let Ue=Math.abs(Le);return Ue>=1/512?Math.sign(Le)*Math.pow(Ue,1/1.8):16*Le},Gu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"prophoto",r:Kl(Le*1.3457868816471585-Ue*.2555720873797946-.0511018649755453*Qe),g:Kl(Le*-.5446307051249019+Ue*1.5082477428451466+.0205274474364214*Qe),b:Kl(Le*0+Ue*0+1.2119675456389452*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},xl=Gu,Hu=(Le=0)=>{let Ue=Math.abs(Le);return Ue>=16/512?Math.sign(Le)*Math.pow(Ue,1.8):Le/16},Su=Le=>{let Ue=Hu(Le.r),Qe=Hu(Le.g),_t=Hu(Le.b),wt={mode:"xyz50",x:.7977666449006423*Ue+.1351812974005331*Qe+.0313477341283922*_t,y:.2880748288194013*Ue+.7118352342418731*Qe+899369387256e-16*_t,z:0*Ue+0*Qe+.8251046025104602*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},mc=Su,Jc=lo(Li({},_r),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:xl,rgb:Le=>xl(rc(Le))},toMode:{xyz50:mc,rgb:Le=>Tu(mc(Le))}}),oc=Jc,du=1.09929682680944,Jl=.018053968510807,Ql=Le=>{let Ue=Math.abs(Le);return Ue>Jl?(Math.sign(Le)||1)*(du*Math.pow(Ue,.45)-(du-1)):4.5*Le},Eu=({x:Le,y:Ue,z:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rec2020",r:Ql(Le*1.7166511879712683-Ue*.3556707837763925-.2533662813736599*Qe),g:Ql(Le*-.6666843518324893+Ue*1.6164812366349395+.0157685458139111*Qe),b:Ql(Le*.0176398574453108-Ue*.0427706132578085+.9421031212354739*Qe)};return _t!==void 0&&(wt.alpha=_t),wt},bf=Eu,lh=1.09929682680944,Pc=.018053968510807,Ks=(Le=0)=>{let Ue=Math.abs(Le);return Ue{let Ue=Ks(Le.r),Qe=Ks(Le.g),_t=Ks(Le.b),wt={mode:"xyz65",x:.6369580483012911*Ue+.1446169035862083*Qe+.1688809751641721*_t,y:.262700212011267*Ue+.6779980715188708*Qe+.059301716469862*_t,z:0*Ue+.0280726930490874*Qe+1.0609850577107909*_t};return Le.alpha!==void 0&&(wt.alpha=Le.alpha),wt},Wu=Bl,wf=lo(Li({},_r),{mode:"rec2020",fromMode:{xyz65:bf,rgb:Le=>bf(et(Le))},toMode:{xyz65:Wu,rgb:Le=>qt(Wu(Le))},parse:["rec2020"],serialize:"rec2020"}),Qc=wf,ku=.0037930732552754493,Ol=Math.cbrt(ku),Nl=Le=>Math.cbrt(Le)-Ol,fi=Le=>{let{r:Ue,g:Qe,b:_t,alpha:wt}=Ke(Le),Lt=Nl(.3*Ue+.622*Qe+.078*_t+ku),pr=Nl(.23*Ue+.692*Qe+.078*_t+ku),Gr=Nl(.2434226892454782*Ue+.2047674442449682*Qe+.5518098665095535*_t+ku),va={mode:"xyb",x:(Lt-pr)/2,y:(Lt+pr)/2,b:Gr-(Lt+pr)/2};return wt!==void 0&&(va.alpha=wt),va},eu=fi,$e=Le=>Math.pow(Le+Ol,3),nt=({x:Le,y:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt=$e(Le+Ue)-ku,Lt=$e(Ue-Le)-ku,pr=$e(Qe+Ue)-ku,Gr=Pt({r:11.031566904639861*wt-9.866943908131562*Lt-.16462299650829934*pr,g:-3.2541473810744237*wt+4.418770377582723*Lt-.16462299650829934*pr,b:-3.6588512867136815*wt+2.7129230459360922*Lt+1.9459282407775895*pr});return _t!==void 0&&(Gr.alpha=_t),Gr},mt=nt,xt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:mt},fromMode:{rgb:eu},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:At,y:At,b:At,alpha:{use:At,fixup:$t}}},Bt=xt,zt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:Tu,lab:ac},fromMode:{rgb:rc,lab:tc},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},Wt=zt,Pr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz50",x:1.0479298208405488*Ue+.0229467933410191*Qe-.0501922295431356*_t,y:.0296278156881593*Ue+.990434484573249*Qe-.0170738250293851*_t,z:-.0092430581525912*Ue+.0150551448965779*Qe+.7518742899580008*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},Br=Pr,kr=Le=>{let{x:Ue,y:Qe,z:_t,alpha:wt}=Le;Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0),_t===void 0&&(_t=0);let Lt={mode:"xyz65",x:.9554734527042182*Ue-.0230985368742614*Qe+.0632593086610217*_t,y:-.0283697069632081*Ue+1.0099954580058226*Qe+.021041398966943*_t,z:.0123140016883199*Ue-.0205076964334779*Qe+1.3303659366080753*_t};return wt!==void 0&&(Lt.alpha=wt),Lt},jr=kr,Jr={mode:"xyz65",toMode:{rgb:qt,xyz50:Br},fromMode:{rgb:et,xyz50:jr},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:At,y:At,z:At,alpha:{use:At,fixup:$t}}},la=Jr,xa=({r:Le,g:Ue,b:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"yiq",y:.29889531*Le+.58662247*Ue+.11448223*Qe,i:.59597799*Le-.2741761*Ue-.32180189*Qe,q:.21147017*Le-.52261711*Ue+.31114694*Qe};return _t!==void 0&&(wt.alpha=_t),wt},Ba=xa,an=({y:Le,i:Ue,q:Qe,alpha:_t})=>{Le===void 0&&(Le=0),Ue===void 0&&(Ue=0),Qe===void 0&&(Qe=0);let wt={mode:"rgb",r:Le+.95608445*Ue+.6208885*Qe,g:Le-.27137664*Ue-.6486059*Qe,b:Le-1.10561724*Ue+1.70250126*Qe};return _t!==void 0&&(wt.alpha=_t),wt},wn=an,ii={mode:"yiq",toMode:{rgb:wn},fromMode:{rgb:Ba},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:At,i:At,q:At,alpha:{use:At,fixup:$t}}},Si=ii,oi=(Le,Ue)=>Math.round(Le*(Ue=Math.pow(10,Ue)))/Ue,Ji=(Le=4)=>Ue=>typeof Ue=="number"?oi(Ue,Le):Ue,Qi=Ji,Oo=Qi(2),Qo=Le=>Math.max(0,Math.min(1,Le||0)),vo=Le=>Math.round(Qo(Le)*255),ys=P("rgb"),ol=P("hsl"),jl=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return"#"+(1<<24|Ue<<16|Qe<<8|_t).toString(16).slice(1)},Hs=Le=>{if(Le===void 0)return;let Ue=vo(Le.alpha!==void 0?Le.alpha:1);return jl(Le)+(256|Ue).toString(16).slice(1)},Cu=Le=>{if(Le===void 0)return;let Ue=vo(Le.r),Qe=vo(Le.g),_t=vo(Le.b);return Le.alpha===void 0||Le.alpha===1?`rgb(${Ue}, ${Qe}, ${_t})`:`rgba(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},hi=Le=>{if(Le===void 0)return;let Ue=Oo(Le.h||0),Qe=Oo(Qo(Le.s)*100)+"%",_t=Oo(Qo(Le.l)*100)+"%";return Le.alpha===void 0||Le.alpha===1?`hsl(${Ue}, ${Qe}, ${_t})`:`hsla(${Ue}, ${Qe}, ${_t}, ${Oo(Qo(Le.alpha))})`},wi=Le=>{let Ue=B(Le);if(!Ue)return;let Qe=se(Ue.mode);if(!Qe.serialize||typeof Qe.serialize=="string"){let _t=`color(${Qe.serialize||`--${Ue.mode}`} `;return Qe.channels.forEach((wt,Lt)=>{wt!=="alpha"&&(_t+=(Lt?" ":"")+(Ue[wt]!==void 0?Ue[wt]:"none"))}),Ue.alpha!==void 0&&Ue.alpha<1&&(_t+=` / ${Ue.alpha}`),_t+")"}if(typeof Qe.serialize=="function")return Qe.serialize(Ue)},sl=Le=>jl(ys(Le)),sc=Le=>Hs(ys(Le)),tu=Le=>Cu(ys(Le)),Ps=Le=>hi(ol(Le)),gc={normal:(Le,Ue)=>Ue,multiply:(Le,Ue)=>Le*Ue,screen:(Le,Ue)=>Le+Ue-Le*Ue,"hard-light":(Le,Ue)=>Ue<.5?Le*2*Ue:2*Ue*(1-Le)-1,overlay:(Le,Ue)=>Le<.5?Ue*2*Le:2*Le*(1-Ue)-1,darken:(Le,Ue)=>Math.min(Le,Ue),lighten:(Le,Ue)=>Math.max(Le,Ue),"color-dodge":(Le,Ue)=>Le===0?0:Ue===1?1:Math.min(1,Le/(1-Ue)),"color-burn":(Le,Ue)=>Le===1?1:Ue===0?0:1-Math.min(1,(1-Le)/Ue),"soft-light":(Le,Ue)=>Ue<.5?Le-(1-2*Ue)*Le*(1-Le):Le+(2*Ue-1)*((Le<.25?((16*Le-12)*Le+4)*Le:Math.sqrt(Le))-Le),difference:(Le,Ue)=>Math.abs(Le-Ue),exclusion:(Le,Ue)=>Le+Ue-2*Le*Ue},pu=(Le,Ue="normal",Qe="rgb")=>{let _t=typeof Ue=="function"?Ue:gc[Ue],wt=P(Qe),Lt=se(Qe).channels;return Le.map(Gr=>{let va=wt(Gr);return va.alpha===void 0&&(va.alpha=1),va}).reduce((Gr,va)=>{if(Gr===void 0)return va;let Qa=va.alpha+Gr.alpha*(1-va.alpha);return Lt.reduce((Ga,Ua)=>(Ua!=="alpha"&&(Qa===0?Ga[Ua]=0:(Ga[Ua]=va.alpha*(1-Gr.alpha)*va[Ua]+va.alpha*Gr.alpha*_t(Gr[Ua],va[Ua])+(1-va.alpha)*Gr.alpha*Gr[Ua],Ga[Ua]=Math.max(0,Math.min(1,Ga[Ua]/Qa)))),Ga),{mode:Qe,alpha:Qa})})},ll=pu,ef=([Le,Ue])=>Le+Math.random()*(Ue-Le),de=Le=>Object.keys(Le).reduce((Ue,Qe)=>{let _t=Le[Qe];return Ue[Qe]=Array.isArray(_t)?_t:[_t,_t],Ue},{}),Ee=(Le="rgb",Ue={})=>{let Qe=se(Le),_t=de(Ue);return Qe.channels.reduce((wt,Lt)=>((_t.alpha||Lt!=="alpha")&&(wt[Lt]=ef(_t[Lt]||Qe.ranges[Lt])),wt),{mode:Le})},qe=Ee,tt=(Le,Ue="rgb",Qe=!1)=>{let _t=Ue?se(Ue).channels:null,wt=Ue?P(Ue):B;return Lt=>{let pr=wt(Lt);if(!pr)return;let Gr=(_t||se(pr.mode).channels).reduce((Qa,Ga)=>{let Ua=Le(pr[Ga],Ga,pr,Ue);return Ua!==void 0&&!isNaN(Ua)&&(Qa[Ga]=Ua),Qa},{mode:pr.mode});if(!Qe)return Gr;let va=B(Lt);return va&&va.mode!==Gr.mode?P(va.mode)(Gr):Gr}},at=(Le,Ue,Qe)=>Ue!=="alpha"?(Le||0)*(Qe.alpha!==void 0?Qe.alpha:1):Le,ct=(Le,Ue,Qe)=>Ue!=="alpha"&&Qe.alpha!==0?(Le||0)/(Qe.alpha!==void 0?Qe.alpha:1):Le,Nt=(Le=1,Ue=0)=>(Qe,_t)=>_t!=="alpha"?Qe*Le+Ue:Qe,St=(Le=1,Ue=1,Qe=0)=>(_t,wt)=>wt!=="alpha"?Le*Math.pow(_t,Ue)+Qe:_t,Jt=Le=>{Le[0]===void 0&&(Le[0]=0),Le[Le.length-1]===void 0&&(Le[Le.length-1]=1);let Ue=1,Qe,_t,wt,Lt;for(;UeUe=>Le<=0?1:Le>=1?0:Math.pow(Ue,Math.log(.5)/Math.log(Le)),Hr=gr,Vr=Le=>typeof Le=="function",ca=Le=>Le&&typeof Le=="object",Aa=Le=>typeof Le=="number",Yr=(Le,Ue="rgb",Qe,_t)=>{let wt=se(Ue),Lt=P(Ue),pr=[],Gr=[],va={};Le.forEach(An=>{Array.isArray(An)?(pr.push(Lt(An[0])),Gr.push(An[1])):Aa(An)||Vr(An)?va[Gr.length]=An:(pr.push(Lt(An)),Gr.push(void 0))}),mr(Gr);let Qa=wt.channels.reduce((An,dn)=>{let _n;return ca(Qe)&&ca(Qe[dn])&&Qe[dn].fixup?_n=Qe[dn].fixup:ca(wt.interpolate[dn])&&wt.interpolate[dn].fixup?_n=wt.interpolate[dn].fixup:_n=Mn=>Mn,An[dn]=_n(pr.map(Mn=>Mn[dn])),An},{});if(_t){let An=pr.map((dn,_n)=>wt.channels.reduce((Mn,Bn)=>(Mn[Bn]=Qa[Bn][_n],Mn),{mode:Ue}));Qa=wt.channels.reduce((dn,_n)=>(dn[_n]=An.map(Mn=>{let Bn=_t(Mn[_n],_n,Mn,Ue);return isNaN(Bn)?void 0:Bn}),dn),{})}let Ga=wt.channels.reduce((An,dn)=>{let _n;return Vr(Qe)?_n=Qe:ca(Qe)&&Vr(Qe[dn])?_n=Qe[dn]:ca(Qe)&&ca(Qe[dn])&&Qe[dn].use?_n=Qe[dn].use:Vr(wt.interpolate[dn])?_n=wt.interpolate[dn]:ca(wt.interpolate[dn])&&(_n=wt.interpolate[dn].use),An[dn]=_n(Qa[dn]),An},{}),Ua=pr.length-1;return An=>{if(An=Math.min(Math.max(0,An),1),An<=Gr[0])return pr[0];if(An>Gr[Ua])return pr[Ua];let dn=0;for(;Gr[dn]{let ls=Ga[As](Ci);return ls!==void 0&&(qo[As]=ls),qo},{mode:Ue})}},oa=(Le,Ue="rgb",Qe)=>Yr(Le,Ue,Qe),fa=(Le,Ue)=>(Qe,_t="rgb",wt)=>{let Lt=Ue?tt(Ue,_t):void 0,pr=Yr(Qe,_t,wt,Le);return Lt?Gr=>Lt(pr(Gr)):pr},Ea=fa(at,ct),Ma=(Le,Ue)=>(Le+Ue)%Ue,sa=(Le,Ue,Qe,_t,wt)=>{let Lt=wt*wt,pr=Lt*wt;return((1-3*wt+3*Lt-pr)*Le+(4-6*Lt+3*pr)*Ue+(1+3*wt+3*Lt-3*pr)*Qe+pr*_t)/6},hn=Le=>Ue=>{let Qe=Le.length-1,_t=Ue>=1?Qe-1:Math.max(0,Math.floor(Ue*Qe));return sa(_t>0?Le[_t-1]:2*Le[_t]-Le[_t+1],Le[_t],Le[_t+1],_tUe=>{let Qe=Le.length-1,_t=Math.floor(Ue*Qe);return sa(Le[Ma(_t-1,Le.length)],Le[Ma(_t,Le.length)],Le[Ma(_t+1,Le.length)],Le[Ma(_t+2,Le.length)],(Ue-_t/Qe)*Qe)},zn=Le=>{let Ue,Qe=Le.length-1,_t=new Array(Qe),wt=new Array(Qe),Lt=new Array(Qe);for(_t[1]=1/4,wt[1]=(6*Le[1]-Le[0])/4,Ue=2;Ue0&&(Lt[Qe-1]=wt[Qe-1]),Ue=Qe-2;Ue>0;--Ue)Lt[Ue]=wt[Ue]-_t[Ue]*Lt[Ue+1];return Lt},$n=Le=>hn(zn(Le)),xi=Le=>Tn(zn(Le)),di=Math.sign,uo=Math.min,pe=Math.abs,y=Le=>{let Ue=Le.length-1,Qe=[],_t=[],wt=[];for(let Lt=0;Lt0?.5*(Le[Lt+1]-Le[Lt-1])*Ue:void 0),wt.push(Lt>0?(di(Qe[Lt-1])+di(Qe[Lt]))*uo(pe(Qe[Lt-1]),pe(Qe[Lt]),.5*pe(_t[Lt])):void 0);return[Qe,_t,wt]},N=(Le,Ue,Qe)=>{let _t=Le.length-1,wt=_t*_t;return Lt=>{let pr;Lt>=1?pr=_t-1:pr=Math.max(0,Math.floor(Lt*_t));let Gr=Lt-pr/_t,va=Gr*Gr,Qa=va*Gr;return(Ue[pr]+Ue[pr+1]-2*Qe[pr])*wt*Qa+(3*Qe[pr]-2*Ue[pr]-Ue[pr+1])*_t*va+Ue[pr]*Gr+Le[pr]}},ie=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,,_t]=y(Le);return _t[0]=Qe[0],_t[Ue]=Qe[Ue-1],N(Le,_t,Qe)},fe=Le=>{if(Le.length<3)return At(Le);let Ue=Le.length-1,[Qe,_t,wt]=y(Le);return _t[0]=(Le[1]*2-Le[0]*1.5-Le[2]*.5)*Ue,_t[Ue]=(Le[Ue]*1.5-Le[Ue-1]*2+Le[Ue-2]*.5)*Ue,wt[0]=_t[0]*Qe[0]<=0?0:pe(_t[0])>2*pe(Qe[0])?2*Qe[0]:_t[0],wt[Ue]=_t[Ue]*Qe[Ue-1]<=0?0:pe(_t[Ue])>2*pe(Qe[Ue-1])?2*Qe[Ue-1]:_t[Ue],N(Le,wt,Qe)},be=Le=>{let Ue=Le.length-1,[Qe,_t,wt]=y(Le);_t[0]=.5*(Le[1]-Le[Ue])*Ue,_t[Ue]=.5*(Le[0]-Le[Ue-1])*Ue;let Lt=(Le[0]-Le[Ue])*Ue,pr=Lt;return wt[0]=(di(Lt)+di(Qe[0]))*uo(pe(Lt),pe(Qe[0]),.5*pe(_t[0])),wt[Ue]=(di(Qe[Ue-1])+di(pr))*uo(pe(Qe[Ue-1]),pe(pr),.5*pe(_t[Ue])),N(Le,wt,Qe)},Re=(Le=1)=>Le===1?Ue=>Ue:Ue=>Math.pow(Ue,Le),je=Re,Ze=(Le=2,Ue=1)=>{let Qe=je(Ue);if(Le<2)return Le<1?[]:[Qe(.5)];let _t=[];for(let wt=0;wt{let Ue={mode:Le.mode,r:Math.max(0,Math.min(Le.r!==void 0?Le.r:0,1)),g:Math.max(0,Math.min(Le.g!==void 0?Le.g:0,1)),b:Math.max(0,Math.min(Le.b!==void 0?Le.b:0,1))};return Le.alpha!==void 0&&(Ue.alpha=Le.alpha),Ue},Gt=Le=>Dt(ft(Le)),Kt=Le=>Le!==void 0&&(Le.r===void 0||Le.r>=0&&Le.r<=1)&&(Le.g===void 0||Le.g>=0&&Le.g<=1)&&(Le.b===void 0||Le.b>=0&&Le.b<=1);function st(Le){return Kt(ft(Le))}function It(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return _t=>!0;let Qe=P(typeof Ue=="string"?Ue:Le);return _t=>Kt(Qe(_t))}function Ut(Le){return Le=B(Le),Le===void 0||st(Le)?Le:P(Le.mode)(Gt(Le))}function ir(Le="rgb"){let{gamut:Ue}=se(Le);if(!Ue)return Lt=>B(Lt);let Qe=typeof Ue=="string"?Ue:Le,_t=P(Qe),wt=It(Qe);return Lt=>{let pr=B(Lt);if(!pr)return;let Gr=_t(pr);if(wt(Gr))return pr;let va=Dt(Gr);return pr.mode===va.mode?va:P(pr.mode)(va)}}function dr(Le,Ue="lch",Qe="rgb"){Le=B(Le);let _t=Qe==="rgb"?st:It(Qe),wt=Qe==="rgb"?Gt:ir(Qe);if(Le===void 0||_t(Le))return Le;let Lt=P(Le.mode);Le=P(Ue)(Le);let pr=lo(Li({},Le),{c:0});if(!_t(pr))return Lt(wt(pr));let Gr=0,va=Le.c!==void 0?Le.c:0,Qa=se(Ue).ranges.c,Ga=(Qa[1]-Qa[0])/Math.pow(2,13),Ua=pr.c;for(;va-Gr>Ga;)pr.c=Gr+(va-Gr)*.5,_t(pr)?(Ua=pr.c,Gr=pr.c):va=pr.c;return Lt(_t(pr)?pr:lo(Li({},pr),{c:Ua}))}function Ar(Le="rgb",Ue="oklch",Qe=Yn("oklch"),_t=.02){let wt=P(Le),Lt=se(Le);if(!Lt.gamut)return Ga=>wt(Ga);let pr=It(Le),Gr=ir(Le),va=P(Ue),{ranges:Qa}=se(Ue);if(!Qa.l||!Qa.c)throw new Error("LCH-like space expected");return Ga=>{if(Ga=B(Ga),Ga===void 0)return;let Ua=Li({},va(Ga));if(Ua.l===void 0&&(Ua.l=0),Ua.c===void 0&&(Ua.c=0),Ua.l>=Qa.l[1]){let Bn=lo(Li({},Lt.white),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(Ua.l<=Qa.l[0]){let Bn=lo(Li({},Lt.black),{mode:Le});return Ga.alpha!==void 0&&(Bn.alpha=Ga.alpha),Bn}if(pr(Ua))return wt(Ua);let An=0,dn=Ua.c,_n=(Qa.c[1]-Qa.c[0])/4e3,Mn=Gr(Ua);for(;dn-An>_n;)Ua.c=(An+dn)*.5,Mn=Gr(Ua),pr(Ua)||Qe&&_t>0&&Qe(Ua,Mn)<=_t?An=Ua.c:dn=Ua.c;return wt(pr(Ua)?Ua:Mn)}}var hr=(Le,Ue=Yn(),Qe=_t=>_t)=>{let _t=Le.map((wt,Lt)=>({color:Qe(wt),i:Lt}));return(wt,Lt=1,pr=1/0)=>(isFinite(Lt)&&(Lt=Math.max(1,Math.min(Lt,_t.length-1))),_t.forEach(Gr=>{Gr.d=Ue(wt,Gr.color)}),_t.sort((Gr,va)=>Gr.d-va.d).slice(0,Lt).filter(Gr=>Gr.dLe[Gr.i]))},vr=hr,Or=Le=>Math.max(Le,0),Cr=Le=>Math.max(Math.min(Le,1),0),ta=(Le,Ue,Qe)=>Le===void 0||Ue===void 0?void 0:Le+Qe*(Ue-Le),ka=Le=>{let Ue=1-Cr(Le);return[.393+.607*Ue,.769-.769*Ue,.189-.189*Ue,0,.349-.349*Ue,.686+.314*Ue,.168-.168*Ue,0,.272-.272*Ue,.534-.534*Ue,.131+.869*Ue,0,0,0,0,1]},Ta=Le=>{let Ue=Or(Le);return[.213+.787*Ue,.715-.715*Ue,.072-.072*Ue,0,.213-.213*Ue,.715+.285*Ue,.072-.072*Ue,0,.213-.213*Ue,.715-.715*Ue,.072+.928*Ue,0,0,0,0,1]},Ra=Le=>{let Ue=1-Cr(Le);return[.2126+.7874*Ue,.7152-.7152*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152+.2848*Ue,.0722-.0722*Ue,0,.2126-.2126*Ue,.7152-.7152*Ue,.0722+.9278*Ue,0,0,0,0,1]},ua=Le=>{let Ue=Math.PI*Le/180,Qe=Math.cos(Ue),_t=Math.sin(Ue);return[.213+Qe*.787-_t*.213,.715-Qe*.715-_t*.715,.072-Qe*.072+_t*.928,0,.213-Qe*.213+_t*.143,.715+Qe*.285+_t*.14,.072-Qe*.072-_t*.283,0,.213-Qe*.213-_t*.787,.715-Qe*.715+_t*.715,.072+Qe*.928+_t*.072,0,0,0,0,1]},ia=(Le,Ue,Qe=!1)=>{let _t=P(Ue),wt=se(Ue).channels;return Lt=>{let pr=_t(Lt);if(!pr)return;let Gr={mode:Ue},va,Qa=wt.length;for(let Ua=0;Ua{let Qe=Or(Le);return tt(Nt(Qe),Ue,!0)},da=(Le=1,Ue="rgb")=>{let Qe=Or(Le);return tt(Nt(Qe,(1-Qe)/2),Ue,!0)},Fa=(Le=1,Ue="rgb")=>ia(ka(Le),Ue,!0),za=(Le=1,Ue="rgb")=>ia(Ta(Le),Ue,!0),kn=(Le=1,Ue="rgb")=>ia(Ra(Le),Ue,!0),Dn=(Le=1,Ue="rgb")=>{let Qe=Cr(Le);return tt((_t,wt)=>wt==="alpha"?_t:ta(Qe,1-Qe,_t),Ue,!0)},ui=(Le=0,Ue="rgb")=>ia(ua(Le),Ue,!0),cn=P("rgb"),sn=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],ei=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],Pn=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],Rn=(Le,Ue)=>{let Qe=Math.max(0,Math.min(1,Ue)),_t=Math.round(Qe/.1),wt=Math.round(Qe%.1),Lt=Le[_t];if(wt>0&&_tBe(Lt[va],pr[va],wt))}return pr=>{let Gr=B(pr);if(Gr===void 0)return;let{r:va,g:Qa,b:Ga}=cn(Gr),Ua={mode:"rgb",r:Lt[0]*va+Lt[1]*Qa+Lt[2]*Ga,g:Lt[3]*va+Lt[4]*Qa+Lt[5]*Ga,b:Lt[6]*va+Lt[7]*Qa+Lt[8]*Ga};return Gr.alpha!==void 0&&(Ua.alpha=Gr.alpha),P(Gr.mode)(Ua)}},In=(Le=1)=>Rn(sn,Le),Jn=(Le=1)=>Rn(ei,Le),Ei=(Le=1)=>Rn(Pn,Le),so=Le=>Le*Le*(3-2*Le),ti=Le=>.5-Math.sin(Math.asin(1-2*Le)/3),bi=Le=>Le*Le*Le*(Le*(Le*6-15)+10),Wi=bi,ro=Le=>(1-Math.cos(Le*Math.PI))/2,Mo=ro;function zs(Le){let Ue=P("lrgb")(Le);return .2126*Ue.r+.7152*Ue.g+.0722*Ue.b}function Bs(Le,Ue){let Qe=zs(Le),_t=zs(Ue);return(Math.max(Qe,_t)+.05)/(Math.min(Qe,_t)+.05)}var So=ne(Ht),Ws=ne(Dr),Zo=ne(go),es=ne(Ao),$o=ne(to),_s=ne(Vs),Go=ne(Pi),Ys=ne(dl),Ll=ne(bc),mo=ne(Qu),ru=ne(ju),Rs=ne(Sl),Yu=ne(oh),Ul=ne(nl),ql=ne(Kc),fo=ne(kl),Xo=ne(Cc),Os=ne(vc),ra=ne(ri),Ya=ne(Zi),Ka=ne(Yo),Bi=ne(ns),rs=ne(zl),Is=ne(oc),Oi=ne(Qc),Wr=ne(_r),na=ne(Bt),pa=ne(Wt),Wa=ne(la),ln=ne(Si)}}),av=ze({"src/plot_api/plot_config.js"(J,V){"use strict";var p={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},editable:{valType:"boolean",dflt:!1},edits:{annotationPosition:{valType:"boolean",dflt:!1},annotationTail:{valType:"boolean",dflt:!1},annotationText:{valType:"boolean",dflt:!1},axisTitleText:{valType:"boolean",dflt:!1},colorbarPosition:{valType:"boolean",dflt:!1},colorbarTitleText:{valType:"boolean",dflt:!1},legendPosition:{valType:"boolean",dflt:!1},legendText:{valType:"boolean",dflt:!1},shapePosition:{valType:"boolean",dflt:!1},titleText:{valType:"boolean",dflt:!1}},editSelection:{valType:"boolean",dflt:!0},autosizable:{valType:"boolean",dflt:!1},responsive:{valType:"boolean",dflt:!1},fillFrame:{valType:"boolean",dflt:!1},frameMargins:{valType:"number",dflt:0,min:0,max:.5},scrollZoom:{valType:"flaglist",flags:["cartesian","gl3d","geo","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},doubleClick:{valType:"enumerated",values:[!1,"reset","autosize","reset+autosize"],dflt:"reset+autosize"},doubleClickDelay:{valType:"number",dflt:300,min:0},showAxisDragHandles:{valType:"boolean",dflt:!0},showAxisRangeEntryBoxes:{valType:"boolean",dflt:!0},showTips:{valType:"boolean",dflt:!0},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},modeBarButtonsToRemove:{valType:"any",dflt:[]},modeBarButtonsToAdd:{valType:"any",dflt:[]},modeBarButtons:{valType:"any",dflt:!1},toImageButtonOptions:{valType:"any",dflt:{}},displaylogo:{valType:"boolean",dflt:!0},watermark:{valType:"boolean",dflt:!1},plotGlPixelRatio:{valType:"number",dflt:2,min:1,max:4},setBackground:{valType:"any",dflt:"transparent"},topojsonURL:{valType:"string",noBlank:!0,dflt:"https://cdn.plot.ly/un/"},logging:{valType:"integer",min:0,max:2,dflt:1},notifyOnLogging:{valType:"integer",min:0,max:2,dflt:0},queueLength:{valType:"integer",min:0,dflt:0},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},b={};function E(k,l){for(var e in k){var t=k[e];t.valType?l[e]=t.dflt:(l[e]||(l[e]={}),E(t,l[e]))}}E(p,b),V.exports={configAttributes:p,dfltConfig:b}}}),Pw=ze({"src/lib/notifier.js"(J,V){"use strict";var p=ci(),b=ao(),E=[];V.exports=function(k,l,e){var t;if(((t=e?._context)==null?void 0:t.displayNotifier)===!1||E.indexOf(k)!==-1)return;E.push(k);var n=1e3;b(l)?n=l:l==="long"&&(n=3e3);var r=p.select("body").selectAll(".plotly-notifier").data([0]);r.enter().append("div").classed("plotly-notifier",!0);var a=r.selectAll(".notifier-note").data(E);function o(s){s.duration(700).style("opacity",0).each("end",function(c){var m=E.indexOf(c);m!==-1&&E.splice(m,1),p.select(this).remove()})}a.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(s){var c=p.select(this);c.append("button").classed("notifier-close",!0).html("×").on("click",function(){c.transition().call(o)});for(var m=c.append("p"),h=s.split(//g),v=0;v1){var l=["LOG:"];for(k=0;k1){var e=[];for(k=0;k"),"long")}},E.warn=function(){var k;if(p.logging>0){var l=["WARN:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}},E.error=function(){var k;if(p.logging>0){var l=["ERROR:"];for(k=0;k0){var e=[];for(k=0;k"),"stick")}}}}),fc=ze({"src/components/color/attributes.js"(J){"use strict";J.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],J.defaultLine="#444",J.lightLine="#eee",J.background="#fff",J.borderLine="#BEC8D9",J.lightFraction=100*10/11}}),Qn=ze({"src/components/color/index.js"(J,V){"use strict";var{converter:p,formatHex:b,formatRgb:E,wcagContrast:k,wcagLuminance:l}=UR(),{isArrayOrTypedArray:e}=Ff(),{warn:t}=ap(),{background:n,defaultLine:r,defaults:a,lightLine:o}=fc(),s=p("rgb"),c=p("hsl"),m=q=>{if(typeof q!="string")return;let Z=q.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(Z))try{return s(Z)}catch{return}},h=q=>q>0?q>1?1:q:0,v={mode:"rgb",r:0,g:0,b:0,alpha:1},g=q=>Math.round(q*255e6)/255e6,i=q=>lo(Li({},q),{r:g(q.r),g:g(q.g),b:g(q.b)}),w=q=>E(i(q)),S=q=>b(i(q)),M=(q,Z)=>{var ee;let ae=m(q);return ae?((ee=ae.alpha)!=null||(ae.alpha=1),ae):(!Z&&q!=null&&t(`Invalid color specifier: "${q}". Defaulting to "#000"`),v)},C=q=>w(lo(Li({},M(q)),{alpha:1})),_=q=>q?M(q).alpha:0,T=q=>e(q)&&q.length>2&&Number.isFinite(q[0])&&Number.isFinite(q[1])&&Number.isFinite(q[2]),f=q=>{let[Z,ee,ae,he]=q,xe=Math.max(Z,ee,ae)>1?1/255:1,we=he??1;return{mode:"rgb",r:Z*xe,g:ee*xe,b:ae*xe,alpha:we>1?we/255:we}},u=(q,Z)=>{let ee=T(q)?f(q):M(q,!0),ae=[h(ee.r),h(ee.g),h(ee.b),h(ee.alpha)];return Z==="uint8"||Z==="uint8_clamped"?Uint8Array.from(ae,he=>Math.round(he*255)):Z==="float32"?Float32Array.from(ae):Z==="float64"?Float64Array.from(ae):ae},A=(q,Z)=>w(lo(Li({},M(q)),{alpha:h(Z)})),x=(q,Z)=>{let ee=M(q),ae=ee.alpha;if(ae===1)return w(ee);let he=M(Z||n),xe=he.alpha,we=(Me,Se)=>(xe===1?Se:1-xe+Se*xe)*(1-ae)+Me*ae;return w({mode:"rgb",r:we(ee.r,he.r),g:we(ee.g,he.g),b:we(ee.b,he.b)})},z=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=(we,Me)=>ee*we+(1-ee)*Me;return w({mode:"rgb",r:xe(ae.r,he.r),g:xe(ae.g,he.g),b:xe(ae.b,he.b)})},I=(q,Z)=>{let ee=M(q),ae=c(ee)||{mode:"hsl",h:0,s:0,l:0};return w(s(lo(Li({},ae),{l:h((ae.l*100+Z)/100),alpha:ee.alpha})))},O=(q,Z)=>k(M(q),M(Z)),D=q=>O(q,n)>O(q,r),B=w(M(n)),F=w(M(r)),P=(q,Z,ee)=>(M(q).alpha!==1&&(q=x(q,n)),D(q)?Z?I(q,Z):B:ee?I(q,-ee):F),j=(q,Z)=>{q.style({stroke:C(Z),"stroke-opacity":M(Z).alpha})},U=(q,Z)=>{q.style({fill:C(Z),"fill-opacity":M(Z).alpha})},$=(q,Z)=>!!(q&&Z&&C(q)===C(Z)),Q=q=>m(q)!==void 0,re=(q,Z)=>{Z=Z===0?0:Z||10;let ee=M(q),ae=Z/100;return w(lo(Li({},ee),{r:h(ee.r+ae),g:h(ee.g+ae),b:h(ee.b+ae)}))},ne=(q,Z,ee)=>{let ae=M(q),he=M(Z),xe=ee/100,we=he.alpha-ae.alpha,Me=2*xe-1,Se=((Me*we===-1?Me:(Me+we)/(1+Me*we))+1)/2,Ie=1-Se,Ve=(Ge,ke)=>Ie*Ge+Se*ke;return w({mode:"rgb",r:Ve(ae.r,he.r),g:Ve(ae.g,he.g),b:Ve(ae.b,he.b),alpha:ae.alpha*(1-xe)+he.alpha*xe})},se=(q,Z=["#000","#fff"])=>{let ee,ae=-1/0;for(let he of Z){let xe=O(q,he);xe>ae&&(ae=xe,ee=w(M(he)))}return ee},G=q=>w(M(q)),X=q=>S(M(q)).toUpperCase(),K=q=>{let Z=M(q);return[h(Z.r)*255,h(Z.g)*255,h(Z.b)*255,h(Z.alpha)]},H=([q,Z,ee,ae])=>w({mode:"rgb",r:q/255,g:Z/255,b:ee/255,alpha:ae}),Y=q=>{let Z=M(q);return l({mode:"rgb",r:h(Z.r),g:h(Z.g),b:h(Z.b)})};V.exports={addOpacity:A,adjustLightness:I,background:n,brighten:re,combine:x,contrast:P,defaultLine:r,defaults:a,equals:$,fill:U,hexString:X,interpolate:z,isChannelArray:T,isDark:D,isValid:Q,lightLine:o,luminosity:Y,mix:ne,mostReadable:se,normalize:u,opacity:_,parse:M,rgb:C,rgbaArray:K,rgbaArrayToString:H,rgbaString:G,stroke:j,wcagContrast:O}}}),Bv=ze({"src/components/colorscale/scales.js"(J,V){"use strict";var p=Qn(),b={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},E=b.RdBu;function k(t,n){if(n||(n=E),!t)return n;function r(){try{t=b[t]||JSON.parse(t)}catch{t=n}}return typeof t=="string"&&(r(),typeof t=="string"&&r()),l(t)?t:n}function l(t){var n=0;if(!Array.isArray(t)||t.length<2||!t[0]||!t[t.length-1]||+t[0][0]!=0||+t[t.length-1][0]!=1)return!1;for(var r=0;rqR});function qR(J,V="",p,b){let E=V+(p?"":"$"),k=b===!1?"":"^";return J==="xy"?new RegExp(k+"x"+n1+"y"+n1+E):new RegExp(k+J+n1+E)}var n1,Vm=zi({"src/lib/regex.ts"(){"use strict";n1="([2-9]|[1-9][0-9]+)?"}}),VR=ze({"src/lib/coerce.js"(J){"use strict";var V=ao(),p=Ki().extendFlat,b=ws(),E=Bv(),k=Qn(),l=np().DESELECTDIM,e=r1(),t=(Vm(),Po(Ov)).counter,n=(Um(),Po(zv)).modHalf,r=Ff().isArrayOrTypedArray,a=Ff().isTypedArraySpec,o=Ff().decodeTypedArraySpec;J.valObjectMeta={data_array:{coerceFunction:function(c,m,h){m.set(r(c)?c:a(c)?o(c):h)}},enumerated:{coerceFunction:function(c,m,h,v){v.coerceNumber&&(c=+c),v.values.indexOf(c)===-1?m.set(h):m.set(c)},validateFunction:function(c,m){m.coerceNumber&&(c=+c);for(var h=m.values,v=0;vi===!0||i===!1;g(c)||v.arrayOk&&Array.isArray(c)&&c.length>0&&c.every(g)?m.set(c):m.set(h)}},number:{coerceFunction:function(c,m,h,v){a(c)&&(c=o(c)),!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},integer:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}a(c)&&(c=o(c)),c%1||!V(c)||v.min!==void 0&&cv.max?m.set(h):m.set(+c)}},string:{coerceFunction:function(c,m,h,v){if(typeof c!="string"){var g=typeof c=="number";v.strict===!0||!g?m.set(h):m.set(String(c))}else v.noBlank&&!c?m.set(h):m.set(c)}},color:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),k.isValid(c)?m.set(c):m.set(h)}},colorlist:{coerceFunction:function(c,m,h){!Array.isArray(c)||!c.length?m.set(h):c.every(v=>k.isValid(v))?m.set(c):m.set(h)}},colorscale:{coerceFunction:function(c,m,h){m.set(E.get(c,h))}},angle:{coerceFunction:function(c,m,h){a(c)&&(c=o(c)),c==="auto"?m.set("auto"):V(c)?m.set(n(+c,360)):m.set(h)}},subplotid:{coerceFunction:function(c,m,h,v){var g=v.regex||t(h);let i=w=>typeof w=="string"&&g.test(w);i(c)||v.arrayOk&&r(c)&&c.length>0&&c.every(i)?m.set(c):m.set(h)},validateFunction:function(c,m){var h=m.dflt;return c===h?!0:typeof c!="string"?!1:!!t(h).test(c)}},flaglist:{coerceFunction:function(c,m,h,v){if((v.extras||[]).indexOf(c)!==-1){m.set(c);return}if(typeof c!="string"){m.set(h);return}for(var g=c.split("+"),i=0;iLi({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.texttemplateAttrs=({editType:k="calc",arrayOk:l}={},e={})=>Li({valType:"string",dflt:"",editType:k},l!==!1?{arrayOk:!0}:{}),J.shapeTexttemplateAttrs=({editType:k="arraydraw",newshape:l}={},e={})=>({valType:"string",dflt:"",editType:k}),J.templatefallbackAttrs=({editType:k="none"}={})=>({valType:"any",dflt:"-",editType:k})}}),Sx=ze({"src/components/shapes/label_texttemplate.js"(J,V){"use strict";function p(M,C){return C?C.d2l(M):M}function b(M,C){return C?C.l2d(M):M}function E(M){return M.x0}function k(M){return M.x1}function l(M){return M.y0}function e(M){return M.y1}function t(M){return M.x0shift||0}function n(M){return M.x1shift||0}function r(M){return M.y0shift||0}function a(M){return M.y1shift||0}function o(M,C){return p(M.x1,C)+n(M)-p(M.x0,C)-t(M)}function s(M,C,_){return p(M.y1,_)+a(M)-p(M.y0,_)-r(M)}function c(M,C){return Math.abs(o(M,C))}function m(M,C,_){return Math.abs(s(M,C,_))}function h(M,C,_){return M.type!=="line"?void 0:Math.sqrt(Math.pow(o(M,C),2)+Math.pow(s(M,C,_),2))}function v(M,C){return b((p(M.x1,C)+n(M)+p(M.x0,C)+t(M))/2,C)}function g(M,C,_){return b((p(M.y1,_)+a(M)+p(M.y0,_)+r(M))/2,_)}function i(M,C,_){return M.type!=="line"?void 0:s(M,C,_)/o(M,C)}var w=["x0","x1","y0","y1","dy","height","ycenter"],S=["x0","x1","y0","y1","dx","width","xcenter"];V.exports={x0:E,x1:k,y0:l,y1:e,slope:i,dx:o,dy:s,width:c,height:m,length:h,xcenter:v,ycenter:g,simpleXVariables:w,simpleYVariables:S}}}),yI=ze({"src/components/shapes/draw_newshape/attributes.js"(J,V){"use strict";var p=Al().overrideAll,b=ws(),E=Qs(),k=Uc().dash,l=Ki().extendFlat,{shapeTexttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Sx();V.exports=p({newshape:{visible:l({},b.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:l({},b.legend,{}),legendgroup:l({},b.legendgroup,{}),legendgrouptitle:{text:l({},b.legendgrouptitle.text,{}),font:E({})},legendrank:l({},b.legendrank,{}),legendwidth:l({},b.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:l({},k,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:l({},b.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:e({newshape:!0},{keys:Object.keys(n)}),texttemplatefallback:t({editType:"arraydraw"}),font:E({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")}}),_I=ze({"src/components/selections/draw_newselection/attributes.js"(J,V){"use strict";var p=Uc().dash,b=Ki().extendFlat;V.exports={newselection:{mode:{valType:"enumerated",values:["immediate","gradual"],dflt:"immediate",editType:"none"},line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:1,dflt:1,editType:"none"},dash:b({},p,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}}}),Ex=ze({"src/plots/pad_attributes.js"(J,V){"use strict";V.exports=function(p){var b=p.editType;return{t:{valType:"number",dflt:0,editType:b},r:{valType:"number",dflt:0,editType:b},b:{valType:"number",dflt:0,editType:b},l:{valType:"number",dflt:0,editType:b},editType:b}}}}),Gm=ze({"src/plots/layout_attributes.js"(J,V){"use strict";var p=Qs(),b=o1(),E=fc(),k=yI(),l=_I(),e=Ex(),t=Ki().extendFlat,n=p({editType:"calc"});n.family.dflt='"Open Sans", verdana, arial, sans-serif',n.size.dflt=12,n.color.dflt=E.defaultLine,V.exports={font:n,title:{text:{valType:"string",editType:"layoutstyle"},font:p({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:p({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:t(e({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:E.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:E.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:E.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:k.newshape,activeshape:k.activeshape,newselection:l.newselection,activeselection:l.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:t({},b.transition,{editType:"none"})}}}),xI=ze({"node_modules/maplibre-gl/dist/maplibre-gl.css"(){(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var J=document.createElement("style");J.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",J.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(J)}})()}}),mi=ze({"src/registry.js"(J){"use strict";var V=ap(),p=Ax(),b=Rw(),E=i1().addStyleRule,k=Ki(),l=ws(),e=Gm(),t=k.extendFlat,n=k.extendDeepAll;J.modules={},J.allCategories={},J.allTypes=[],J.subplotsRegistry={},J.componentsRegistry={},J.layoutArrayContainers=[],J.layoutArrayRegexes=[],J.traceLayoutAttributes={},J.localeRegistry={},J.apiMethodRegistry={},J.collectableSubplotTypes=null,J.register=function(i){if(J.collectableSubplotTypes=null,i)i&&!Array.isArray(i)&&(i=[i]);else throw new Error("No argument passed to Plotly.register.");for(var w=0;w=i&&D<=w?D:l}if(typeof D!="string"&&typeof D!="number")return l;D=String(D);var U=v(B),$=D.charAt(0);U&&($==="G"||$==="g")&&(D=D.slice(1),B="");var Q=U&&B.slice(0,7)==="chinese",re=D.match(Q?m:c);if(!re)return l;var ne=re[1],se=re[3]||"1",G=Number(re[5]||1),X=Number(re[7]||0),K=Number(re[9]||0),H=Number(re[11]||0);if(U){if(ne.length===2)return l;ne=Number(ne);var Y;try{var q=o.getComponentMethod("calendars","getCal")(B);if(Q){var Z=se.charAt(se.length-1)==="i";se=parseInt(se,10),Y=q.newDate(ne,q.toMonthIndex(ne,se,Z),G)}else Y=q.newDate(ne,Number(se),G)}catch{return l}return Y?(Y.toJD()-a)*e+X*t+K*n+H*r:l}ne.length===2?ne=(Number(ne)+2e3-h)%100+h:ne=Number(ne),se-=1;var ee=new Date(Date.UTC(2e3,se,G,X,K));return ee.setUTCFullYear(ne),ee.getUTCMonth()!==se||ee.getUTCDate()!==G?l:ee.getTime()+H*r},i=J.MIN_MS=J.dateTime2ms("-9999"),w=J.MAX_MS=J.dateTime2ms("9999-12-31 23:59:59.9999"),J.isDateTime=function(D,B){return J.dateTime2ms(D,B)!==l};function S(D,B){return String(D+Math.pow(10,B)).slice(1)}var M=90*e,C=3*t,_=5*n;J.ms2DateTime=function(D,B,F){if(typeof D!="number"||!(D>=i&&D<=w))return l;B||(B=0);var P=Math.floor(E(D+.05,1)*10),j=Math.round(D-P/10),U,$,Q,re,ne,se;if(v(F)){var G=Math.floor(j/e)+a,X=Math.floor(E(D,e));try{U=o.getComponentMethod("calendars","getCal")(F).fromJD(G).formatDate("yyyy-mm-dd")}catch{U=s("G%Y-%m-%d")(new Date(j))}if(U.charAt(0)==="-")for(;U.length<11;)U="-0"+U.slice(1);else for(;U.length<10;)U="0"+U;$=B=i+e&&D<=w-e))return l;var B=Math.floor(E(D+.05,1)*10),F=new Date(Math.round(D-B/10)),P=V("%Y-%m-%d")(F),j=F.getHours(),U=F.getMinutes(),$=F.getSeconds(),Q=F.getUTCMilliseconds()*10+B;return T(P,j,U,$,Q)};function T(D,B,F,P,j){if((B||F||P||j)&&(D+=" "+S(B,2)+":"+S(F,2),(P||j)&&(D+=":"+S(P,2),j))){for(var U=4;j%10===0;)U-=1,j/=10;D+="."+S(j,U)}return D}J.cleanDate=function(D,B,F){if(D===l)return B;if(J.isJSDate(D)||typeof D=="number"&&isFinite(D)){if(v(F))return b.error("JS Dates and milliseconds are incompatible with world calendars",D),B;if(D=J.ms2DateTimeLocal(+D),!D&&B!==void 0)return B}else if(!J.isDateTime(D,F))return b.error("unrecognized date",D),B;return D};var f=/%\d?f/g,u=/%h/g,A={1:"1",2:"1",3:"2",4:"2"};function x(D,B,F,P){D=D.replace(f,function(U){var $=Math.min(+U.charAt(1)||6,6),Q=(B/1e3%1+2).toFixed($).slice(2).replace(/0+$/,"")||"0";return Q});var j=new Date(Math.floor(B+.05));if(D=D.replace(u,function(){return A[F("%q")(j)]}),v(P))try{D=o.getComponentMethod("calendars","worldCalFmt")(D,B,P)}catch{return"Invalid"}return F(D)(j)}var z=[59,59.9,59.99,59.999,59.9999];function I(D,B){var F=E(D+.05,e),P=S(Math.floor(F/t),2)+":"+S(E(Math.floor(F/n),60),2);if(B!=="M"){p(B)||(B=0);var j=Math.min(E(D/r,60),z[B]),U=(100+j).toFixed(B).slice(1);B>0&&(U=U.replace(/0+$/,"").replace(/[\.]$/,"")),P+=":"+U}return P}J.formatDate=function(D,B,F,P,j,U){if(j=v(j)&&j,!B)if(F==="y")B=U.year;else if(F==="m")B=U.month;else if(F==="d")B=U.dayMonth+` +`+U.year;else return I(D,F)+` +`+x(U.dayMonthYear,D,P,j);return x(B,D,P,j)};var O=3*e;J.incrementMonth=function(D,B,F){F=v(F)&&F;var P=E(D,e);if(D=Math.round(D-P),F)try{var j=Math.round(D/e)+a,U=o.getComponentMethod("calendars","getCal")(F),$=U.fromJD(j);return B%12?U.add($,B,"m"):U.add($,B/12,"y"),($.toJD()-a)*e+P}catch{b.error("invalid ms "+D+" in calendar "+F)}var Q=new Date(D+O);return Q.setUTCMonth(Q.getUTCMonth()+B)+P-O},J.findExactDates=function(D,B){for(var F=0,P=0,j=0,U=0,$,Q,re=v(B)&&o.getComponentMethod("calendars","getCal")(B),ne=0;ne1?(a[c-1]-a[0])/(c-1):1,v,g;for(h>=0?g=o?l:e:g=o?n:t,r+=h*k*(o?-1:1)*(h>=0?1:-1);s90&&p.log("Long binary search..."),s-1};function l(r,a){return ra}function n(r,a){return r>=a}J.sorterAsc=function(r,a){return r-a},J.sorterDes=function(r,a){return a-r},J.distinctVals=function(r){var a=r.slice();a.sort(J.sorterAsc);var o;for(o=a.length-1;o>-1&&a[o]===E;o--);for(var s=a[o]-a[0]||1,c=s/(o||1)/1e4,m=[],h,v=0;v<=o;v++){var g=a[v],i=g-h;h===void 0?(m.push(g),h=g):i>c&&(s=Math.min(s,i),m.push(g),h=g)}return{vals:m,minDiff:s}},J.roundUp=function(r,a,o){for(var s=0,c=a.length-1,m,h=0,v=o?0:1,g=o?1:0,i=o?Math.ceil:Math.floor;s0&&(s=1),o&&s)return r.sort(a)}return s?r:r.reverse()},J.findIndexOfMin=function(r,a){a=a||b;for(var o=1/0,s,c=0;czw});function wI(J){return Object.keys(J).sort()}var zw,Nv=zi({"src/lib/sort_object_keys.ts"(){"use strict";zw=wI}}),TI=ze({"src/lib/stats.js"(J){"use strict";var V=ao(),p=Ff().isArrayOrTypedArray;J.aggNums=function(b,E,k,l){var e,t;if((!l||l>k.length)&&(l=k.length),V(E)||(E=!1),p(k[0])){for(t=new Array(l),e=0;eb.length-1)return b[b.length-1];var k=E%1;return k*b[Math.ceil(E)]+(1-k)*b[Math.floor(E)]}}}),AI=ze({"src/lib/angles.js"(J,V){"use strict";var p=(Um(),Po(zv)),b=p.mod,E=p.modHalf,k=Math.PI,l=2*k;function e(g){return g/180*k}function t(g){return g/k*180}function n(g){return Math.abs(g[1]-g[0])>l-1e-14}function r(g,i){return E(i-g,l)}function a(g,i){return Math.abs(r(g,i))}function o(g,i){if(n(i))return!0;var w,S;i[0]S&&(S+=l);var M=b(g,l),C=M+l;return M>=w&&M<=S||C>=w&&C<=S}function s(g,i,w,S){if(!o(i,S))return!1;var M,C;return w[0]=M&&g<=C}function c(g,i,w,S,M,C,_){M=M||0,C=C||0;var T=n([w,S]),f,u,A,x,z;T?(f=0,u=k,A=l):w1/3&&p.x<2/3},J.isRightAnchor=function(p){return p.xanchor==="right"||p.xanchor==="auto"&&p.x>=2/3},J.isTopAnchor=function(p){return p.yanchor==="top"||p.yanchor==="auto"&&p.y>=2/3},J.isMiddleAnchor=function(p){return p.yanchor==="middle"||p.yanchor==="auto"&&p.y>1/3&&p.y<2/3},J.isBottomAnchor=function(p){return p.yanchor==="bottom"||p.yanchor==="auto"&&p.y<=1/3}}}),SI=ze({"src/lib/geometry2d.js"(J){"use strict";var V=(Um(),Po(zv)).mod;J.segmentsIntersect=p;function p(e,t,n,r,a,o,s,c){var m=n-e,h=a-e,v=s-a,g=r-t,i=o-t,w=c-o,S=m*w-v*g;if(S===0)return null;var M=(h*w-v*i)/S,C=(h*g-m*i)/S;return C<0||C>1||M<0||M>1?null:{x:e+m*M,y:t+g*M}}J.segmentDistance=function(t,n,r,a,o,s,c,m){if(p(t,n,r,a,o,s,c,m))return 0;var h=r-t,v=a-n,g=c-o,i=m-s,w=h*h+v*v,S=g*g+i*i,M=Math.min(b(h,v,w,o-t,s-n),b(h,v,w,c-t,m-n),b(g,i,S,t-o,n-s),b(g,i,S,r-o,a-s));return Math.sqrt(M)};function b(e,t,n,r,a){var o=r*e+a*t;if(o<0)return r*r+a*a;if(o>n){var s=r-e,c=a-t;return s*s+c*c}else{var m=r*t-a*e;return m*m/n}}var E,k,l;J.getTextLocation=function(t,n,r,a){if((t!==k||a!==l)&&(E={},k=t,l=a),E[r])return E[r];var o=t.getPointAtLength(V(r-a/2,n)),s=t.getPointAtLength(V(r+a/2,n)),c=Math.atan((s.y-o.y)/(s.x-o.x)),m=t.getPointAtLength(V(r,n)),h=(m.x*4+o.x+s.x)/6,v=(m.y*4+o.y+s.y)/6,g={x:h,y:v,theta:c};return E[r]=g,g},J.clearLocationCache=function(){k=null},J.getVisibleSegment=function(t,n,r){var a=n.left,o=n.right,s=n.top,c=n.bottom,m=0,h=t.getTotalLength(),v=h,g,i;function w(M){var C=t.getPointAtLength(M);M===0?g=C:M===h&&(i=C);var _=C.xo?C.x-o:0,T=C.yc?C.y-c:0;return Math.sqrt(_*_+T*T)}for(var S=w(m);S;){if(m+=S+r,m>v)return;S=w(m)}for(S=w(v);S;){if(v-=S+r,m>v)return;S=w(v)}return{min:m,max:v,len:v-m,total:h,isClosed:m===0&&v===h&&Math.abs(g.x-i.x)<.1&&Math.abs(g.y-i.y)<.1}},J.findPointOnPath=function(t,n,r,a){a=a||{};for(var o=a.pathLength||t.getTotalLength(),s=a.tolerance||.001,c=a.iterationLimit||30,m=t.getPointAtLength(0)[r]>t.getPointAtLength(o)[r]?-1:1,h=0,v=0,g=o,i,w,S;h0?g=i:v=i,h++}return w}}}),Cx=ze({"src/lib/throttle.js"(J){"use strict";var V={};J.throttle=function(E,k,l){var e=V[E],t=Date.now();if(!e){for(var n in V)V[n].tse.ts+k){r();return}e.timer=setTimeout(function(){r(),e.timer=null},k)},J.done=function(b){var E=V[b];return!E||!E.timer?Promise.resolve():new Promise(function(k){var l=E.onDone;E.onDone=function(){l&&l(),k(),E.onDone=null}})},J.clear=function(b){if(b)p(V[b]),delete V[b];else for(var E in V)J.clear(E)};function p(b){b&&b.timer!==null&&(clearTimeout(b.timer),b.timer=null)}}}),EI=ze({"src/lib/clear_responsive.js"(J,V){"use strict";V.exports=function(b){b._responsiveChartHandler&&(window.removeEventListener("resize",b._responsiveChartHandler),delete b._responsiveChartHandler)}}}),kI=ze({"node_modules/is-mobile/index.js"(J,V){"use strict";V.exports=k,V.exports.isMobile=k,V.exports.default=k;var p=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,b=/CrOS/,E=/android|ipad|playbook|silk/i;function k(l){l||(l={});let e=l.ua;if(!e&&typeof navigator<"u"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),typeof e!="string")return!1;let t=p.test(e)&&!b.test(e)||!!l.tablet&&E.test(e);return!t&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&e.indexOf("Macintosh")!==-1&&e.indexOf("Safari")!==-1&&(t=!0),t}}}),CI=ze({"src/lib/preserve_drawing_buffer.js"(J,V){"use strict";var p=ao(),b=kI();V.exports=function(l){var e;if(l&&l.hasOwnProperty("userAgent")?e=l.userAgent:e=E(),typeof e!="string")return!0;var t=b({ua:{headers:{"user-agent":e}},tablet:!0,featureDetect:!1});if(!t)for(var n=e.split(" "),r=1;r-1;o--){var s=n[o];if(s.slice(0,8)==="Version/"){var c=s.slice(8).split(".")[0];if(p(c)&&(c=+c),c>=13)return!0}}}return t};function E(){var k;return typeof navigator<"u"&&(k=navigator.userAgent),k&&k.headers&&typeof k.headers["user-agent"]=="string"&&(k=k.headers["user-agent"]),k}}}),LI=ze({"src/lib/make_trace_groups.js"(J,V){"use strict";var p=ci();V.exports=function(E,k,l){var e=E.selectAll("g."+l.replace(/\s/g,".")).data(k,function(n){return n[0].trace.uid});e.exit().remove(),e.enter().append("g").attr("class",l),e.order();var t=E.classed("rangeplot")?"nodeRangePlot3":"node3";return e.each(function(n){n[0][t]=p.select(this)}),e}}}),PI=ze({"src/lib/localize.js"(J,V){"use strict";var p=mi();V.exports=function(E,k){for(var l=E._context.locale,e=0;e<2;e++){for(var t=E._context.locales,n=0;n<2;n++){var r=(t[l]||{}).dictionary;if(r){var a=r[k];if(a)return a}t=p.localeRegistry}var o=l.split("-")[0];if(o===l)break;l=o}return k}}}),Bw=ze({"src/lib/filter_unique.js"(J,V){"use strict";V.exports=function(b){for(var E={},k=[],l=0,e=0;e1?(k*b+k*E)/k:b+E,e=String(l).length;if(e>16){var t=String(E).length,n=String(b).length;if(e>=n+t){var r=parseFloat(l).toPrecision(12);r.indexOf("e+")===-1&&(l=+r)}}return l}}}),Ow={};bu(Ow,{default:()=>qw});function DI(J){return typeof J=="string"&&(J=J.replace(Uw,"")),(0,Nw.default)(J)?Number(J):jw.BADNUM}var Nw,jw,Uw,qw,FI=zi({"src/lib/clean_number.ts"(){"use strict";Nw=Yl(ao()),jw=Yl(No()),Uw=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g,qw=DI}}),zI=ze({"src/lib/slugify.js"(J,V){"use strict";var p=/<[^>]*>/g,b=/[\p{S}\p{P}]/gu,E=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,k=/�/g,l=/\s+/g,e="-",t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),n=new RegExp(t+"{3,}","g"),r=new RegExp(t+"$","g"),a=60;function o(s){return typeof s.toWellFormed=="function"?s.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(s))}V.exports=function(c,m=a){var h=o(c??"").replace(k,"").replace(p," ").replace(b,v=>v===e?v:"").toLowerCase().trim().replace(l,e).replace(E,"").replace(n,e);return h.length<=m?h:Array.from(h).slice(0,m).join("").replace(r,"")}}}),Nr=ze({"src/lib/index.js"(J,V){"use strict";var p=ci(),b=jm().utcFormat,E=Cw().format,k=ao(),l=No(),e=l.FP_SAFE,t=-e,n=l.BADNUM,r=V.exports={};r.adjustFormat=function(q){if(!q||/^\d[.]\df/.test(q)||/[.]\d%/.test(q))return q;if(q==="0.f")return"~f";if(/^\d%/.test(q))return"~%";if(/^\ds/.test(q))return"~s";var Z=(q.match(/^[+\-( ]?/)||[""])[0],ee=q.slice(Z.length);return!/^[~,.0$#]/.test(ee)&&/[&fps]/.test(ee)?Z+"~"+ee:q};var a={};r.warnBadFormat=function(Y){var q=String(Y);a[q]||(a[q]=1,r.warn('encountered bad format: "'+q+'"'))},r.noFormat=function(Y){return String(Y)},r.numberFormat=function(Y){var q;try{q=E(r.adjustFormat(Y))}catch{return r.warnBadFormat(Y),r.noFormat}return q},r.nestedProperty=r1(),r.keyedContainer=zR(),r.relativeAttr=BR(),r.isPlainObject=tv(),r.toLogRange=Tx(),r.relinkPrivateKeys=OR();var o=Ff();r.isArrayBuffer=o.isArrayBuffer,r.isTypedArray=o.isTypedArray,r.isArrayOrTypedArray=o.isArrayOrTypedArray,r.isArray1D=o.isArray1D,r.ensureArray=o.ensureArray,r.concat=o.concat,r.maxRowLength=o.maxRowLength,r.minRowLength=o.minRowLength;var s=(Um(),Po(zv));r.mod=s.mod,r.modHalf=s.modHalf;var c=VR();r.valObjectMeta=c.valObjectMeta,r.coerce=c.coerce,r.coerce2=c.coerce2,r.coerceFont=c.coerceFont,r.coercePattern=c.coercePattern,r.coerceHoverinfo=c.coerceHoverinfo,r.coerceSelectionMarkerOpacity=c.coerceSelectionMarkerOpacity,r.validate=c.validate;var m=bI();r.dateTime2ms=m.dateTime2ms,r.isDateTime=m.isDateTime,r.ms2DateTime=m.ms2DateTime,r.ms2DateTimeLocal=m.ms2DateTimeLocal,r.cleanDate=m.cleanDate,r.isJSDate=m.isJSDate,r.formatDate=m.formatDate,r.incrementMonth=m.incrementMonth,r.dateTick0=m.dateTick0,r.dfltRange=m.dfltRange,r.findExactDates=m.findExactDates,r.MIN_MS=m.MIN_MS,r.MAX_MS=m.MAX_MS;var h=kx();r.findBin=h.findBin,r.sorterAsc=h.sorterAsc,r.sorterDes=h.sorterDes,r.distinctVals=h.distinctVals,r.roundUp=h.roundUp,r.sort=h.sort,r.findIndexOfMin=h.findIndexOfMin,r.sortObjectKeys=(Nv(),Po(nv)).default;var v=TI();r.aggNums=v.aggNums,r.len=v.len,r.mean=v.mean,r.geometricMean=v.geometricMean,r.median=v.median,r.midRange=v.midRange,r.variance=v.variance,r.stdev=v.stdev,r.interp=v.interp;var g=Mx();r.init2dArray=g.init2dArray,r.transposeRagged=g.transposeRagged,r.dot=g.dot,r.translationMatrix=g.translationMatrix,r.rotationMatrix=g.rotationMatrix,r.rotationXYMatrix=g.rotationXYMatrix,r.apply3DTransform=g.apply3DTransform,r.apply2DTransform=g.apply2DTransform,r.apply2DTransform2=g.apply2DTransform2,r.convertCssMatrix=g.convertCssMatrix,r.inverseTransformMatrix=g.inverseTransformMatrix;var i=AI();r.deg2rad=i.deg2rad,r.rad2deg=i.rad2deg,r.angleDelta=i.angleDelta,r.angleDist=i.angleDist,r.isFullCircle=i.isFullCircle,r.isAngleInsideSector=i.isAngleInsideSector,r.isPtInsideSector=i.isPtInsideSector,r.pathArc=i.pathArc,r.pathSector=i.pathSector,r.pathAnnulus=i.pathAnnulus;var w=MI();r.isLeftAnchor=w.isLeftAnchor,r.isCenterAnchor=w.isCenterAnchor,r.isRightAnchor=w.isRightAnchor,r.isTopAnchor=w.isTopAnchor,r.isMiddleAnchor=w.isMiddleAnchor,r.isBottomAnchor=w.isBottomAnchor;var S=SI();r.segmentsIntersect=S.segmentsIntersect,r.segmentDistance=S.segmentDistance,r.getTextLocation=S.getTextLocation,r.clearLocationCache=S.clearLocationCache,r.getVisibleSegment=S.getVisibleSegment,r.findPointOnPath=S.findPointOnPath;var M=Ki();r.extendFlat=M.extendFlat,r.extendDeep=M.extendDeep,r.extendDeepAll=M.extendDeepAll,r.extendDeepNoArrays=M.extendDeepNoArrays;var C=ap();r.log=C.log,r.warn=C.warn,r.error=C.error;var _=(Vm(),Po(Ov));r.counterRegex=_.counter;var T=Cx();r.throttle=T.throttle,r.throttleDone=T.done,r.clearThrottle=T.clear;var f=i1();r.getGraphDiv=f.getGraphDiv,r.isPlotDiv=f.isPlotDiv,r.removeElement=f.removeElement,r.addStyleRule=f.addStyleRule,r.addRelatedStyleRule=f.addRelatedStyleRule,r.deleteRelatedStyleRule=f.deleteRelatedStyleRule,r.setStyleOnHover=f.setStyleOnHover,r.getFullTransformMatrix=f.getFullTransformMatrix,r.getElementTransformMatrix=f.getElementTransformMatrix,r.getElementAndAncestors=f.getElementAndAncestors,r.equalDomRects=f.equalDomRects,r.clearResponsive=EI(),r.preserveDrawingBuffer=CI(),r.makeTraceGroups=LI(),r._=PI(),r.notifier=Pw(),r.filterUnique=Bw(),r.filterVisible=RI(),r.pushUnique=Rw(),r.increment=II(),r.cleanNumber=(FI(),Po(Ow)).default,r.slugify=zI(),r.ensureNumber=function(q){return k(q)?(q=Number(q),q>e||q=q?!1:k(Y)&&Y>=0&&Y%1===0},r.noop=Ax(),r.identity=s1(),r.repeat=function(Y,q){for(var Z=new Array(q),ee=0;eeZ?Math.max(Z,Math.min(q,Y)):Math.max(q,Math.min(Z,Y))},r.bBoxIntersect=function(Y,q,Z){return Z=Z||0,Y.left<=q.right+Z&&q.left<=Y.right+Z&&Y.top<=q.bottom+Z&&q.top<=Y.bottom+Z},r.simpleMap=function(Y,q,Z,ee,ae){for(var he=Y.length,xe=new Array(he),we=0;we=Math.pow(2,Z)?ae>10?(r.warn("randstr failed uniqueness"),xe):Y(q,Z,ee,(ae||0)+1):xe},r.OptionControl=function(Y,q){Y||(Y={}),q||(q="opt");var Z={};return Z.optionList=[],Z._newoption=function(ee){ee[q]=Y,Z[ee.name]=ee,Z.optionList.push(ee)},Z["_"+q]=Y,Z},r.smooth=function(Y,q){if(q=Math.round(q)||0,q<2)return Y;var Z=Y.length,ee=2*Z,ae=2*q-1,he=new Array(ae),xe=new Array(Z),we,Me,Se,Ie;for(we=0;we=ee&&(Se-=ee*Math.floor(Se/ee)),Se<0?Se=-1-Se:Se>=Z&&(Se=ee-1-Se),Ie+=Y[Se]*he[Me];xe[we]=Ie}return xe},r.syncOrAsync=function(Y,q,Z){var ee,ae;function he(){return r.syncOrAsync(Y,q,Z)}for(;Y.length;)if(ae=Y.splice(0,1)[0],ee=ae(q),ee&&ee.then)return ee.then(he);return Z&&Z(q)},r.stripTrailingSlash=function(Y){return Y.slice(-1)==="/"?Y.slice(0,-1):Y},r.noneOrAll=function(Y,q,Z){if(Y){var ee=!1,ae=!0,he,xe;for(he=0;he0?ae:0})},r.fillArray=function(Y,q,Z,ee){if(ee=ee||r.identity,r.isArrayOrTypedArray(Y))for(var ae=0;aez.test(window.navigator.userAgent);var I=/Firefox\/(\d+)\.\d+/;r.getFirefoxVersion=function(){var Y=I.exec(window.navigator.userAgent);if(Y&&Y.length===2){var q=parseInt(Y[1]);if(!isNaN(q))return q}return null},r.isD3Selection=function(Y){return Y instanceof p.selection},r.ensureSingle=function(Y,q,Z,ee){var ae=Y.select(q+(Z?"."+Z:""));if(ae.size())return ae;var he=Y.append(q);return Z&&he.classed(Z,!0),ee&&he.call(ee),he},r.ensureSingleById=function(Y,q,Z,ee){var ae=Y.select(q+"#"+Z);if(ae.size())return ae;var he=Y.append(q).attr("id",Z);return ee&&he.call(ee),he},r.objectFromPath=function(Y,q){for(var Z=Y.split("."),ee,ae=ee={},he=0;he1?ae+xe[1]:"";if(he&&(xe.length>1||we.length>4||Z))for(;ee.test(we);)we=we.replace(ee,"$1"+he+"$2");return we+Me},r.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var F=/^\w*$/;r.templateString=function(Y,q){var Z={};return Y.replace(r.TEMPLATE_STRING_REGEX,function(ee,ae){var he;return F.test(ae)?he=q[ae]:(Z[ae]=Z[ae]||r.nestedProperty(q,ae).get,he=Z[ae](!0)),he!==void 0?he:""})};var P={max:10,count:0,name:"hovertemplate"};r.hovertemplateString=Y=>ne(lo(Li({},Y),{opts:P}));var j={max:10,count:0,name:"texttemplate"};r.texttemplateString=Y=>ne(lo(Li({},Y),{opts:j}));var U=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function $(Y){var q=Y.match(U);return q?{key:q[1],op:q[2],number:Number(q[3])}:{key:Y,op:null,number:null}}var Q={max:10,count:0,name:"texttemplate",parseMultDiv:!0};r.texttemplateStringForShapes=Y=>ne(lo(Li({},Y),{opts:Q}));var re=/^[:|\|]/;function ne({data:Y=[],locale:q,fallback:Z,labels:ee={},opts:ae,template:he}){return he.replace(r.TEMPLATE_STRING_REGEX,(xe,we,Me)=>{let Se=["xother","yother"].includes(we),Ie=["_xother","_yother"].includes(we),Ve=["_xother_","_yother_"].includes(we),Ge=["xother_","yother_"].includes(we),ke=Se||Ie||Ge||Ve;(Ie||Ve)&&(we=we.substring(1)),(Ge||Ve)&&(we=we.substring(0,we.length-1));let _e=null,ce=null;if(ae.parseMultDiv){var ve=$(we);we=ve.key,_e=ve.op,ce=ve.number}let le;if(ke){if(ee[we]===void 0)return"";le=ee[we]}else for(let Ye of Y)if(Ye){if(Ye.hasOwnProperty(we)){le=Ye[we];break}if(F.test(we)||(le=r.nestedProperty(Ye,we).get(!0)),le!==void 0)break}if(le===void 0){let{count:Ye,max:yt,name:gt}=ae,Tt=Z===!1?xe:Z;return Ye=se&&xe<=G,Se=we>=se&&we<=G;if(Me&&(ee=10*ee+xe-se),Se&&(ae=10*ae+we-se),!Me||!Se){if(ee!==ae)return ee-ae;if(xe!==we)return xe-we}}return ae-ee};var X=2e9;r.seedPseudoRandom=function(){X=2e9},r.pseudoRandom=function(){var Y=X;return X=(69069*X+1)%4294967296,Math.abs(X-Y)<429496729?r.pseudoRandom():X/4294967296},r.fillText=function(Y,q,Z){var ee=Array.isArray(Z)?function(xe){Z.push(xe)}:function(xe){Z.text=xe},ae=r.extractOption(Y,q,"htx","hovertext");if(r.isValidTextValue(ae))return ee(ae);var he=r.extractOption(Y,q,"tx","text");if(r.isValidTextValue(he))return ee(he)},r.isValidTextValue=function(Y){return Y||Y===0},r.formatPercent=function(Y,q){q=q||0;for(var Z=(Math.round(100*Y*Math.pow(10,q))*Math.pow(.1,q)).toFixed(q)+"%",ee=0;ee1&&(Se=1):Se=0,r.strTranslate(ae-Se*(Z+xe),he-Se*(ee+we))+r.strScale(Se)+(Me?"rotate("+Me+(q?"":" "+Z+" "+ee)+")":"")},r.setTransormAndDisplay=function(Y,q){Y.attr("transform",r.getTextTransform(q)),Y.style("display",q.scale?null:"none")},r.ensureUniformFontSize=function(Y,q){var Z=r.extendFlat({},q);return Z.size=Math.max(q.size,Y._fullLayout.uniformtext.minsize||0),Z},r.join2=function(Y,q,Z){var ee=Y.length;return ee>1?Y.slice(0,-1).join(q)+Z+Y[ee-1]:Y.join(q)},r.bigFont=function(Y){return Math.round(1.2*Y)};var K=r.getFirefoxVersion(),H=K!==null&&K<86;r.getPositionFromD3Event=function(){return H?[p.event.layerX,p.event.layerY]:[p.event.offsetX,p.event.offsetY]}}}),BI=ze({"build/plotcss.js"(){"use strict";var J=Nr(),V={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border:0;',"X input,X button":'font-family:"Open Sans",verdana,arial,sans-serif;',"X input:focus,X button:focus":"outline:none;","X a":"text-decoration:none;","X a:hover":"text-decoration:none;","X .crisp":"shape-rendering:crispEdges;","X .user-select-none":"-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;-o-user-select:none;user-select:none;","X svg a":"fill:#447adb;","X svg a:hover":"fill:#3c6dc5;","X .main-svg":"position:absolute;top:0;left:0;pointer-events:none;","X .main-svg .draglayer":"pointer-events:all;","X .cursor-default":"cursor:default;","X .cursor-pointer":"cursor:pointer;","X .cursor-crosshair":"cursor:crosshair;","X .cursor-move":"cursor:move;","X .cursor-col-resize":"cursor:col-resize;","X .cursor-row-resize":"cursor:row-resize;","X .cursor-ns-resize":"cursor:ns-resize;","X .cursor-ew-resize":"cursor:ew-resize;","X .cursor-sw-resize":"cursor:sw-resize;","X .cursor-s-resize":"cursor:s-resize;","X .cursor-se-resize":"cursor:se-resize;","X .cursor-w-resize":"cursor:w-resize;","X .cursor-e-resize":"cursor:e-resize;","X .cursor-nw-resize":"cursor:nw-resize;","X .cursor-n-resize":"cursor:n-resize;","X .cursor-ne-resize":"cursor:ne-resize;","X .cursor-grab":"cursor:-webkit-grab;cursor:grab;","X .modebar":"position:absolute;top:2px;right:2px;","X .ease-bg":"-webkit-transition:background-color .3s ease 0s;-moz-transition:background-color .3s ease 0s;-ms-transition:background-color .3s ease 0s;-o-transition:background-color .3s ease 0s;transition:background-color .3s ease 0s;","X .modebar--hover>:not(.watermark)":"opacity:0;-webkit-transition:opacity .3s ease 0s;-moz-transition:opacity .3s ease 0s;-ms-transition:opacity .3s ease 0s;-o-transition:opacity .3s ease 0s;transition:opacity .3s ease 0s;","X:hover .modebar--hover .modebar-group":"opacity:1;","X:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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:rgba(0,0,0,0);border:6px solid rgba(0,0,0,0);z-index:1002;margin-top:-12px;border-bottom-color:#69738a;margin-right:-6px;',"X [data-title]:after":"content:attr(data-title);background:#69738a;color:#fff;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 rgba(0,0,0,0);border-left-color:#69738a;margin-top:8px;margin-right:-30px;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",Y:'font-family:"Open Sans",verdana,arial,sans-serif;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,.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:.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(b in V)p=b.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),J.addStyleRule(p,V[b]);var p,b}}),Vw=ze({"node_modules/is-browser/client.js"(J,V){V.exports=!0}}),Gw=ze({"node_modules/has-hover/index.js"(J,V){"use strict";var p=Vw(),b;typeof window.matchMedia=="function"?b=!window.matchMedia("(hover: none)").matches:b=p,V.exports=b}}),jv=ze({"node_modules/events/events.js"(J,V){"use strict";var p=typeof Reflect=="object"?Reflect:null,b=p&&typeof p.apply=="function"?p.apply:function(C,_,T){return Function.prototype.apply.call(C,_,T)},E;p&&typeof p.ownKeys=="function"?E=p.ownKeys:Object.getOwnPropertySymbols?E=function(C){return Object.getOwnPropertyNames(C).concat(Object.getOwnPropertySymbols(C))}:E=function(C){return Object.getOwnPropertyNames(C)};function k(M){console&&console.warn&&console.warn(M)}var l=Number.isNaN||function(C){return C!==C};function e(){e.init.call(this)}V.exports=e,V.exports.once=i,e.EventEmitter=e,e.prototype._events=void 0,e.prototype._eventsCount=0,e.prototype._maxListeners=void 0;var t=10;function n(M){if(typeof M!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof M)}Object.defineProperty(e,"defaultMaxListeners",{enumerable:!0,get:function(){return t},set:function(M){if(typeof M!="number"||M<0||l(M))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+M+".");t=M}}),e.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},e.prototype.setMaxListeners=function(C){if(typeof C!="number"||C<0||l(C))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+C+".");return this._maxListeners=C,this};function r(M){return M._maxListeners===void 0?e.defaultMaxListeners:M._maxListeners}e.prototype.getMaxListeners=function(){return r(this)},e.prototype.emit=function(C){for(var _=[],T=1;T0&&(A=_[0]),A instanceof Error)throw A;var x=new Error("Unhandled error."+(A?" ("+A.message+")":""));throw x.context=A,x}var z=u[C];if(z===void 0)return!1;if(typeof z=="function")b(z,this,_);else for(var I=z.length,O=h(z,I),T=0;T0&&A.length>f&&!A.warned){A.warned=!0;var x=new Error("Possible EventEmitter memory leak detected. "+A.length+" "+String(C)+" listeners added. Use emitter.setMaxListeners() to increase limit");x.name="MaxListenersExceededWarning",x.emitter=M,x.type=C,x.count=A.length,k(x)}return M}e.prototype.addListener=function(C,_){return a(this,C,_,!1)},e.prototype.on=e.prototype.addListener,e.prototype.prependListener=function(C,_){return a(this,C,_,!0)};function o(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(M,C,_){var T={fired:!1,wrapFn:void 0,target:M,type:C,listener:_},f=o.bind(T);return f.listener=_,T.wrapFn=f,f}e.prototype.once=function(C,_){return n(_),this.on(C,s(this,C,_)),this},e.prototype.prependOnceListener=function(C,_){return n(_),this.prependListener(C,s(this,C,_)),this},e.prototype.removeListener=function(C,_){var T,f,u,A,x;if(n(_),f=this._events,f===void 0)return this;if(T=f[C],T===void 0)return this;if(T===_||T.listener===_)--this._eventsCount===0?this._events=Object.create(null):(delete f[C],f.removeListener&&this.emit("removeListener",C,T.listener||_));else if(typeof T!="function"){for(u=-1,A=T.length-1;A>=0;A--)if(T[A]===_||T[A].listener===_){x=T[A].listener,u=A;break}if(u<0)return this;u===0?T.shift():v(T,u),T.length===1&&(f[C]=T[0]),f.removeListener!==void 0&&this.emit("removeListener",C,x||_)}return this},e.prototype.off=e.prototype.removeListener,e.prototype.removeAllListeners=function(C){var _,T,f;if(T=this._events,T===void 0)return this;if(T.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):T[C]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete T[C]),this;if(arguments.length===0){var u=Object.keys(T),A;for(f=0;f=0;f--)this.removeListener(C,_[f]);return this};function c(M,C,_){var T=M._events;if(T===void 0)return[];var f=T[C];return f===void 0?[]:typeof f=="function"?_?[f.listener||f]:[f]:_?g(f):h(f,f.length)}e.prototype.listeners=function(C){return c(this,C,!0)},e.prototype.rawListeners=function(C){return c(this,C,!1)},e.listenerCount=function(M,C){return typeof M.listenerCount=="function"?M.listenerCount(C):m.call(M,C)},e.prototype.listenerCount=m;function m(M){var C=this._events;if(C!==void 0){var _=C[M];if(typeof _=="function")return 1;if(_!==void 0)return _.length}return 0}e.prototype.eventNames=function(){return this._eventsCount>0?E(this._events):[]};function h(M,C){for(var _=new Array(C),T=0;T{},{passive:!0}),E},triggerHandler:function(E,k,l){var e,t=E._ev;if(!t)return;var n=t._events[k];if(!n)return;function r(o){if(o.listener){if(t.removeListener(k,o.listener),!o.fired)return o.fired=!0,o.listener.apply(t,[l])}else return o.apply(t,[l])}n=Array.isArray(n)?n:[n];var a;for(a=0;ab.queueLength&&(l.undoQueue.queue.shift(),l.undoQueue.index--)},k.startSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!0,l.undoQueue.beginSequence=!0},k.stopSequence=function(l){l.undoQueue=l.undoQueue||{index:0,queue:[],sequence:!1},l.undoQueue.sequence=!1,l.undoQueue.beginSequence=!1},k.undo=function(e){var t,n;if(!(e.undoQueue===void 0||isNaN(e.undoQueue.index)||e.undoQueue.index<=0)){for(e.undoQueue.index--,t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=e.undoQueue.queue.length)){for(t=e.undoQueue.queue[e.undoQueue.index],e.undoQueue.inSequence=!0,n=0;n=P.length)return!1;if(I.dimensions===2){if(D++,O.length===D)return I;var j=O[D];if(!S(j))return!1;I=P[F][j]}else I=P[F]}else I=P}}return I}function S(I){return I===Math.round(I)&&I>=0}function M(I){var O,D;O=V.modules[I]._module,D=O.basePlotModule;var B={};B.type=null;var F=n({},b),P=n({},O.attributes);J.crawl(P,function($,Q,re,ne,se){o(F,se).set(void 0),$===void 0&&o(P,se).set(void 0)}),n(B,F),V.traceIs(I,"noOpacity")&&delete B.opacity,V.traceIs(I,"showLegend")||(delete B.showlegend,delete B.legendgroup),V.traceIs(I,"noHover")&&(delete B.hoverinfo,delete B.hoverlabel),O.selectPoints||delete B.selectedpoints,n(B,P),D.attributes&&n(B,D.attributes),B.type=I;var j={meta:O.meta||{},categories:O.categories||{},animatable:!!O.animatable,type:I,attributes:T(B)};if(O.layoutAttributes){var U={};n(U,O.layoutAttributes),j.layoutAttributes=T(U)}return O.animatable||J.crawl(j,function($){J.isValObject($)&&"anim"in $&&delete $.anim}),j}function C(){var I={},O,D;n(I,E);for(O in V.subplotsRegistry)if(D=V.subplotsRegistry[O],!!D.layoutAttributes)if(Array.isArray(D.attr))for(var B=0;B=r&&(n._input||{})._templateitemname;o&&(a=r);var s=t+"["+a+"]",c;function m(){c={},o&&(c[s]={},c[s][b]=o)}m();function h(w,S){c[w]=S}function v(w,S){o?V.nestedProperty(c[s],w).set(S):c[s+"."+w]=S}function g(){var w=c;return m(),w}function i(w,S){w&&v(w,S);var M=g();for(var C in M)V.nestedProperty(e,C).set(M[C])}return{modifyBase:h,modifyItem:v,getUpdateObj:g,applyUpdate:i}}}}),hc=ze({"src/plots/cartesian/constants.js"(J,V){"use strict";var p=(Vm(),Po(Ov)).counter;V.exports={idRegex:{x:p("x","( domain)?"),y:p("y","( domain)?")},attrRegex:p("[xy]axis"),xAxisMatch:p("xaxis"),yAxisMatch:p("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"},zindexSeparator:"z"}}}),Xl=ze({"src/plots/cartesian/axis_ids.js"(J){"use strict";var V=mi(),p=hc();J.id2name=function(k){if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))){var l=k.split(" ")[0].slice(1);return l==="1"&&(l=""),k.charAt(0)+"axis"+l}},J.name2id=function(k){if(k.match(p.AX_NAME_PATTERN)){var l=k.slice(5);return l==="1"&&(l=""),k.charAt(0)+l}},J.cleanId=function(k,l,e){var t=/( domain)$/.test(k);if(!(typeof k!="string"||!k.match(p.AX_ID_PATTERN))&&!(l&&k.charAt(0)!==l)&&!(t&&!e)){var n=k.split(" ")[0].slice(1).replace(/^0+/,"");return n==="1"&&(n=""),k.charAt(0)+n+(t&&e?" domain":"")}},J.list=function(E,k,l){var e=E._fullLayout;if(!e)return[];var t=J.listIds(E,k),n=new Array(t.length),r;for(r=0;re?1:-1:+(E.slice(1)||1)-+(k.slice(1)||1)},J.ref2id=function(E){return/^[xyz]/.test(E)?E.split(" ")[0]:!1};function b(E,k){if(k&&k.length){for(var l=0;l0?".":"")+o;p.isPlainObject(s)?e(s,n,c,a+1):n(c,o,s)}})}}}),cl=ze({"src/plots/plots.js"(J,V){"use strict";var p=ci(),b=jm().timeFormatLocale,E=Cw().formatLocale,k=ao(),l=Lw(),e=ev().version,t=mi(),n=Wm(),r=hs(),a=Nr(),o=Qn(),s=No().BADNUM,c=Xl(),m=iv().clearOutline,h=Lx(),v=o1(),g=Hw(),i=zf().getModuleCalcData,w=a.relinkPrivateKeys,S=a._,M=V.exports={};a.extendFlat(M,t),M.attributes=ws(),M.attributes.type.values=M.allTypes,M.fontAttrs=Qs(),M.layoutAttributes=Gm();var C=NI();M.executeAPICommand=C.executeAPICommand,M.computeAPICommandBindings=C.computeAPICommandBindings,M.manageCommandObserver=C.manageCommandObserver,M.hasSimpleAPICommandBindings=C.hasSimpleAPICommandBindings,M.redrawText=function(G){return G=a.getGraphDiv(G),new Promise(function(X){setTimeout(function(){G._fullLayout&&(t.getComponentMethod("annotations","draw")(G),t.getComponentMethod("legend","draw")(G),t.getComponentMethod("colorbar","draw")(G),X(M.previousPromises(G)))},300)})},M.resize=function(G){G=a.getGraphDiv(G);var X,K=new Promise(function(H,Y){(!G||a.isHidden(G))&&Y(new Error("Resize must be passed a displayed plot div element.")),G._redrawTimer&&clearTimeout(G._redrawTimer),G._resolveResize&&(X=G._resolveResize),G._resolveResize=H,G._redrawTimer=setTimeout(function(){if(!G.layout||G.layout.width&&G.layout.height||a.isHidden(G)){H(G);return}delete G.layout.width,delete G.layout.height;var q=G.changed;G.autoplay=!0,t.call("relayout",G,{autosize:!0}).then(function(){G.changed=q,G._resolveResize===H&&(delete G._resolveResize,H(G))})},100)});return X&&X(K),K},M.previousPromises=function(G){if((G._promises||[]).length)return Promise.all(G._promises).then(function(){G._promises=[]})},M.sendDataToCloud=function(G,X){G.emit("plotly_beforeexport");let K=new URL(X).origin;var H=M.graphJson(G,!1,"object");H.version=e;var Y=new URL(X);Y.searchParams.set("origin",window.location.origin);var q=window.open(Y.href,"_blank");if(!q){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),G.emit("plotly_exportfail");return}var Z=function(ee){ee.origin===K&&ee.data&&ee.data.type==="CHART_AUTH_SUCCESS"&&(q.postMessage({type:"chart",chart:H},K),window.removeEventListener("message",Z),G.emit("plotly_afterexport"))};return window.addEventListener("message",Z),!1};var _=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],T=["year","month","dayMonth","dayMonthYear"];M.supplyDefaults=function(G,X){var K=X&&X.skipUpdateCalc,H=G._fullLayout||{};if(H._skipDefaults){delete H._skipDefaults;return}var Y=G._fullLayout={},q=G.layout||{},Z=G._fullData||[],ee=G._fullData=[],ae=G.data||[],he=G.calcdata||[],xe=G._context||{},we;G._transitionData||M.createTransitionData(G),Y._dfltTitle={plot:S(G,"Click to enter Plot title"),subtitle:S(G,"Click to enter Plot subtitle"),x:S(G,"Click to enter X axis title"),y:S(G,"Click to enter Y axis title"),colorbar:S(G,"Click to enter Colorscale title"),annotation:S(G,"new text")},Y._traceWord=S(G,"trace");var Me=A(G,_);if(H._initialAutoSizeIsDone){var Se=H.width,Ie=H.height;M.supplyLayoutGlobalDefaults(q,Y,Me),q.width||(Y.width=Se),q.height||(Y.height=Ie),M.sanitizeMargins(Y)}else{M.supplyLayoutGlobalDefaults(q,Y,Me);var Ve=!q.width||!q.height,Ge=Y.autosize,ke=xe.autosizable,_e=Ve&&(Ge||ke);_e?M.plotAutoSize(G,q,Y):Ve&&M.sanitizeMargins(Y),!Ge&&Ve&&(q.width=Y.width,q.height=Y.height)}Y._d3locale=x(Me,Y.separators),Y._extraFormat=A(G,T),Y._initialAutoSizeIsDone=!0,Y._dataLength=ae.length,Y._modules=[],Y._visibleModules=[],Y._basePlotModules=[];var ce=Y._subplots=u(),ve=Y._splomAxes={x:{},y:{}},le=Y._splomSubplots={};Y._splomGridDflt={},Y._scatterStackOpts={},Y._firstScatter={},Y._alignmentOpts={},Y._colorAxes={},Y._requestRangeslider={},Y._traceUids=f(Z,ae),M.supplyDataDefaults(ae,ee,q,Y);var Ae=Object.keys(ve.x),Be=Object.keys(ve.y);if(Ae.length>1&&Be.length>1){for(t.getComponentMethod("grid","sizeDefaults")(q,Y),we=0;we15&&Be.length>15&&Y.shapes.length===0&&Y.images.length===0,M.linkSubplots(ee,Y,Z,H),M.cleanPlot(ee,Y,Z,H);var Tt=!!(H._has&&H._has("cartesian")),At=!!(Y._has&&Y._has("cartesian")),$t=Tt,rr=At;$t&&!rr?H._bgLayer.remove():rr&&!$t&&(Y._shouldCreateBgLayer=!0),H._zoomlayer&&!G._dragging&&m({_fullLayout:H}),z(ee,Y),w(Y,H),t.getComponentMethod("colorscale","crossTraceDefaults")(ee,Y),Y._preGUI||(Y._preGUI={}),Y._tracePreGUI||(Y._tracePreGUI={});var _r=Y._tracePreGUI,Xt={},or;for(or in _r)Xt[or]="old";for(we=0;we0){var xe=1-2*q;Z=Math.round(xe*Z),ee=Math.round(xe*ee)}}var we=M.layoutAttributes.width.min,Me=M.layoutAttributes.height.min;Z1,Ie=!K.height&&Math.abs(H.height-ee)>1;(Ie||Se)&&(Se&&(H.width=Z),Ie&&(H.height=ee)),X._initialAutoSize||(X._initialAutoSize={width:Z,height:ee}),M.sanitizeMargins(H)},M.supplyLayoutModuleDefaults=function(G,X,K,H){var Y=t.componentsRegistry,q=X._basePlotModules,Z,ee,ae,he=t.subplotsRegistry.cartesian;for(Z in Y)ae=Y[Z],ae.includeBasePlot&&ae.includeBasePlot(G,X);q.length||q.push(he),X._has("cartesian")&&(t.getComponentMethod("grid","contentDefaults")(G,X),he.finalizeSubplots(G,X));for(var xe in X._subplots)X._subplots[xe].sort(a.subplotSort);for(ee=0;ee1&&(K.l/=Ge,K.r/=Ge)}if(Me){var ke=(K.t+K.b)/Me;ke>1&&(K.t/=ke,K.b/=ke)}var _e=K.xl!==void 0?K.xl:K.x,ce=K.xr!==void 0?K.xr:K.x,ve=K.yt!==void 0?K.yt:K.y,le=K.yb!==void 0?K.yb:K.y;Se[X]={l:{val:_e,size:K.l+Ve},r:{val:ce,size:K.r+Ve},b:{val:le,size:K.b+Ve},t:{val:ve,size:K.t+Ve}},Ie[X]=1}if(!H._replotting)return M.doAutoMargin(G)}};function P(G){if("_redrawFromAutoMarginCount"in G._fullLayout)return!1;var X=c.list(G,"",!0);for(var K in X)if(X[K].autoshift||X[K].shift)return!0;return!1}M.doAutoMargin=function(G){var X=G._fullLayout,K=X.width,H=X.height;X._size||(X._size={}),D(X);var Y=X._size,q=X.margin,Z={t:0,b:0,l:0,r:0},ee=a.extendFlat({},Y),ae=q.l,he=q.r,xe=q.t,we=q.b,Me=X._pushmargin,Se=X._pushmarginIds,Ie=X.minreducedwidth,Ve=X.minreducedheight;if(q.autoexpand!==!1){for(var Ge in Me)Se[Ge]||delete Me[Ge];var ke=G._fullLayout._reservedMargin;for(var _e in ke)for(var ce in ke[_e]){var ve=ke[_e][ce];Z[ce]=Math.max(Z[ce],ve)}Me.base={l:{val:0,size:ae},r:{val:1,size:he},t:{val:1,size:xe},b:{val:0,size:we}};for(var le in Z){var Ae=0;for(var Be in Me)Be!=="base"&&k(Me[Be][le].size)&&(Ae=Me[Be][le].size>Ae?Me[Be][le].size:Ae);var Xe=Math.max(0,q[le]-Ae);Z[le]=Math.max(0,Z[le]-Xe)}for(var Ye in Me){var yt=Me[Ye].l||{},gt=Me[Ye].b||{},Tt=yt.val,At=yt.size,$t=gt.val,rr=gt.size,_r=K-Z.r-Z.l,Xt=H-Z.t-Z.b;for(var or in Me){if(k(At)&&Me[or].r){var Ot=Me[or].r.val,vt=Me[or].r.size;if(Ot>Tt){var ht=(At*Ot+(vt-_r)*Tt)/(Ot-Tt),De=(vt*(1-Tt)+(At-_r)*(1-Ot))/(Ot-Tt);ht+De>ae+he&&(ae=ht,he=De)}}if(k(rr)&&Me[or].t){var Ne=Me[or].t.val,We=Me[or].t.size;if(Ne>$t){var Ke=(rr*Ne+(We-Xt)*$t)/(Ne-$t),Je=(We*(1-$t)+(rr-Xt)*(1-Ne))/(Ne-$t);Ke+Je>we+xe&&(we=Ke,xe=Je)}}}}}var et=a.constrain(K-q.l-q.r,B,Ie),Mt=a.constrain(H-q.t-q.b,F,Ve),pt=Math.max(0,K-et),Pt=Math.max(0,H-Mt);if(pt){var Ct=(ae+he)/pt;Ct>1&&(ae/=Ct,he/=Ct)}if(Pt){var qt=(we+xe)/Pt;qt>1&&(we/=qt,xe/=qt)}if(Y.l=Math.round(ae)+Z.l,Y.r=Math.round(he)+Z.r,Y.t=Math.round(xe)+Z.t,Y.b=Math.round(we)+Z.b,Y.p=Math.round(q.pad),Y.w=Math.round(K)-Y.l-Y.r,Y.h=Math.round(H)-Y.t-Y.b,!X._replotting&&(M.didMarginChange(ee,Y)||P(G))){"_redrawFromAutoMarginCount"in X?X._redrawFromAutoMarginCount++:X._redrawFromAutoMarginCount=1;var Vt=3*(1+Object.keys(Se).length);if(X._redrawFromAutoMarginCount1)return!0}return!1},M.graphJson=function(G,X=!1,K="json",H=!1,Y=!1){(H&&X&&!G._fullData||H&&!X&&!G._fullLayout)&&M.supplyDefaults(G);var q=H?G._fullData:G.data,Z=H?G._fullLayout:G.layout,ee=(G._transitionData||{})._frames;function ae(we,Me){if(typeof we=="function")return Me?"_function_":null;if(a.isPlainObject(we)){var Se={};return Object.keys(we).sort().forEach(function(ke){if(["_","["].indexOf(ke.charAt(0))===-1){if(typeof we[ke]=="function"){Me&&(Se[ke]="_function");return}Se[ke]=ae(we[ke],Me)}}),Se}var Ie=Array.isArray(we),Ve=a.isTypedArray(we);if((Ie||Ve)&&we.dtype&&we.shape){var Ge=we.bdata;return ae({dtype:we.dtype,shape:we.shape,bdata:a.isArrayBuffer(Ge)?l.encode(Ge):Ge},Me)}return Ie?we.map(function(ke){return ae(ke,Me)}):Ve?a.simpleMap(we,a.identity):a.isJSDate(we)?a.ms2DateTimeLocal(+we):we}var he={data:(q||[]).map(function(we){var Me=ae(we);return X&&delete Me.fit,Me})};if(!X&&(he.layout=ae(Z),H)){var xe=Z._size;he.layout.computed={margin:{b:xe.b,l:xe.l,r:xe.r,t:xe.t}}}return ee&&(he.frames=ae(ee)),Y&&(he.config=ae(G._context,!0)),K==="object"?he:JSON.stringify(he)},M.modifyFrames=function(G,X){var K,H,Y,q=G._transitionData._frames,Z=G._transitionData._frameHash;for(K=0;K0&&(G._transitioningWithDuration=!0),G._transitionData._interruptCallbacks.push(function(){H=!0}),K.redraw&&G._transitionData._interruptCallbacks.push(function(){return t.call("redraw",G)}),G._transitionData._interruptCallbacks.push(function(){G.emit("plotly_transitioninterrupted",[])});var Me=0,Se=0;function Ie(){return Me++,function(){Se++,!H&&Se===Me&&ee(we)}}K.runFn(Ie),setTimeout(Ie())})}function ee(we){if(G._transitionData)return q(G._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(K.redraw)return t.call("redraw",G)}).then(function(){G._transitioning=!1,G._transitioningWithDuration=!1,G.emit("plotly_transitioned",[])}).then(we)}function ae(){if(G._transitionData)return G._transitioning=!1,Y(G._transitionData._interruptCallbacks)}var he=[M.previousPromises,ae,K.prepareFn,M.rehover,M.reselect,Z],xe=a.syncOrAsync(he,G);return(!xe||!xe.then)&&(xe=Promise.resolve()),xe.then(function(){return G})}M.doCalcdata=function(G,X){var K=c.list(G),H=G._fullData,Y=G._fullLayout,q,Z,ee,ae=new Array(H.length),he=(G.calcdata||[]).slice();for(G.calcdata=ae,Y._numBoxes=0,Y._numViolins=0,Y._violinScaleGroupStats={},G._hmpixcount=0,G._hmlumcount=0,Y._piecolormap={},Y._sunburstcolormap={},Y._treemapcolormap={},Y._iciclecolormap={},Y._funnelareacolormap={},ee=0;eeQ?Q.match(l):null;J.matchTex=e,J.convertToTspans=function(Q,re,ne){var se=Q.text(),G=!Q.attr("data-notex")&&re&&re._context.typesetMath&&e(se);G&&!m()&&(G=null);var X=V.select(Q.node().parentNode);if(X.empty())return;var K=Q.attr("class")?Q.attr("class").split(" ")[0]:"text";K+="-math",X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove(),Q.style("display",null).attr({"data-unformatted":se,"data-math":"N"});function H(){X.empty()||(K=Q.attr("class")+"-math",X.select("svg."+K).remove()),Q.text("").style("white-space","pre");var Y=P(Q.node(),se);Y&&Q.style("pointer-events","all"),J.positionText(Q),ne&&ne.call(Q)}return G?(re&&re._promises||[]).push(new Promise(function(Y){Q.style("display","none");var q=parseInt(Q.node().style.fontSize,10),Z={fontSize:q},ee=Q.attr("text-anchor");h(G[2],Z,function(ae,he,xe){X.selectAll("svg."+K).remove(),X.selectAll("g."+K+"-group").remove();var we=ae&&ae.select("svg");if(!we||!we.node()){H(),Y();return}Q.style("display","none");var Me=X.append("g").classed(K+"-group",!0).attr({"pointer-events":"none","data-unformatted":se,"data-math":"Y"});Me.node().appendChild(we.node()),he&&he.node()&&we.node().insertBefore(he.node().cloneNode(!0),we.node().firstChild);var Se=xe.width,Ie=xe.height;we.attr({class:K,height:Ie,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":Z.fontSize+"px"});var Ve=Q.node().style.fill||"black",Ge=we.select("g");Ge.attr({fill:Ve,stroke:Ve});var ke=Ge.node().getBoundingClientRect(),_e=ke.width,ce=ke.height;(_e>Se||ce>Ie)&&(we.style("overflow","hidden"),ke=we.node().getBoundingClientRect(),_e=ke.width,ce=ke.height);var ve=+Q.attr("x"),le=+Q.attr("y"),Ae=q||Q.node().getBoundingClientRect().height,Be=-Ae/4;K[0]==="y"?Me.attr({transform:"rotate("+[-90,ve,le]+")"+b(-_e/2,Be-ce/2)}):K[0]==="l"?le=Be-ce/2:K[0]==="a"&&K.indexOf("atitle")!==0?(ve=0,le=Be):(ve=ve-_e*(ee==="middle"?.5:ee==="end"?1:0),le=le+Be-ce/2),we.attr({x:ve,y:le}),ne&&ne.call(Q,Me),Y(Me)})})):H(),Q};var t=/(<|<|<)/g,n=/(>|>|>)/g;function r(Q){return Q.replace(t,"\\lt ").replace(n,"\\gt ")}var a=null,o=()=>typeof MathJax<"u"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,s=!1,c=!1;function m(){let Q=o();return Q===3||Q===4?!0:(Q===null?s||(s=!0,p.warn("MathJax is not loaded. Math equations will not be rendered.")):c||(c=!0,p.warn("Unsupported MathJax version:",MathJax.version)),!1)}function h(Q,re,ne){let se=o();var G;let X=function(){if(!a){let q=MathJax._.output.svg_ts.SVG,Z=p.extendFlat({},MathJax.config.svg,{fontCache:"local"});se===4&&(Z.linebreaks=p.extendFlat({},Z.linebreaks,{inline:!1})),a=MathJax._.mathjax.mathjax.document(document,p.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new q(Z)}))}let H="math-output-"+p.randstr({},64);G=V.select("body").append("div").attr({id:H}).style({visibility:"hidden",position:"absolute","font-size":re.fontSize+"px"});let Y=r(Q).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return a.convert(Y,{display:!1})}).then(function(q){G.node().appendChild(q)})},K=function(){let H=G.select(".MathJax"),Y=!H.empty()&&G.select("svg").node();if(!Y)p.log("There was an error in the tex syntax.",Q),ne();else{let q=Y.getBoundingClientRect(),Z=H.select("defs");ne(H,Z,q)}G.remove()};Promise.resolve().then(X).then(K).catch(H=>{p.log("MathJax typesetting failed.",Q,H),G&&G.remove(),ne()})}var v={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},g={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},w="\u200B",S=["http:","https:","mailto:","",void 0,":"],M=J.NEWLINES=/(\r\n?|\n)/g,C=/(<[^<>]*>)/,_=/<(\/?)([^ >]*)(\s+(.*))?>/i,T=//i;J.BR_TAG_ALL=//gi;var f=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,u=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,A=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,x=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function z(Q,re){if(!Q)return null;var ne=Q.match(re),se=ne&&(ne[3]||ne[4]);return se&&B(se)}var I=/(^|;)\s*color:/;J.plainText=function(Q,re){re=re||{};for(var ne=re.len!==void 0&&re.len!==-1?re.len:1/0,se=re.allowedTags!==void 0?re.allowedTags:["br"],G="...",X=G.length,K=Q.split(C),H=[],Y="",q=0,Z=0;ZX?H.push(ee.slice(0,Math.max(0,we-X))+G):H.push(ee.slice(0,we));break}Y=""}}return H.join("")};var O={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},D=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function B(Q){return Q.replace(D,function(re,ne){var se;return ne.charAt(0)==="#"?se=F(ne.charAt(1)==="x"?parseInt(ne.slice(2),16):parseInt(ne.slice(1),10)):se=O[ne],se||re})}J.convertEntities=B;function F(Q){if(!(Q>1114111)){var re=String.fromCodePoint;if(re)return re(Q);var ne=String.fromCharCode;return Q<=65535?ne(Q):ne((Q>>10)+55232,Q%1024+56320)}}function P(Q,re){re=re.replace(M," ");var ne=!1,se=[],G,X=-1;function K(){X++;var _e=document.createElementNS(E.svg,"tspan");V.select(_e).attr({class:"line",dy:X*k+"em"}),Q.appendChild(_e),G=_e;var ce=se;if(se=[{node:_e}],ce.length>1)for(var ve=1;ve.",re);return}var ce=se.pop();_e!==ce.type&&p.log("Start tag <"+ce.type+"> doesnt match end tag <"+_e+">. Pretending it did match.",re),G=se[se.length-1].node}var Z=T.test(re);Z?K():(G=Q,se=[{node:Q}]);for(var ee=re.split(C),ae=0;ae=0;g--,i++){var w=m[g];v[i]=[1-w[0],w[1]]}return v}function s(m,h){h=h||{};for(var v=m.domain,g=m.range,i=g.length,w=new Array(i),S=0;Sv-m?m=v-(h-v):h-v=0?w=n.colorscale.sequential:w=n.colorscale.sequentialminus,s._sync("colorscale",w)}}}}),fl=ze({"src/components/colorscale/index.js"(J,V){"use strict";var p=Bv(),b=Bf();V.exports={moduleType:"component",name:"colorscale",attributes:qs(),layoutAttributes:Ww(),supplyLayoutDefaults:jI(),handleDefaults:qc(),crossTraceDefaults:UI(),calc:Qf(),scales:p.scales,defaultScale:p.defaultScale,getScale:p.get,isValidScale:p.isValid,hasColorscale:b.hasColorscale,extractOpts:b.extractOpts,extractScale:b.extractScale,flipScale:b.flipScale,makeColorScaleFunc:b.makeColorScaleFunc,makeColorScaleFuncFromTrace:b.makeColorScaleFuncFromTrace}}}),el=ze({"src/traces/scatter/subtypes.js"(J,V){"use strict";var p=Nr(),b=Ff().isTypedArraySpec;V.exports={hasLines:function(E){return E.visible&&E.mode&&E.mode.indexOf("lines")!==-1},hasMarkers:function(E){return E.visible&&(E.mode&&E.mode.indexOf("markers")!==-1||E.type==="splom")},hasText:function(E){return E.visible&&E.mode&&E.mode.indexOf("text")!==-1},isBubble:function(E){var k=E.marker;return p.isPlainObject(k)&&(p.isArrayOrTypedArray(k.size)||b(k.size))}}}}),l1=ze({"src/traces/scatter/make_bubble_size_func.js"(J,V){"use strict";var p=ao();V.exports=function(E,k){k||(k=2);var l=E.marker,e=l.sizeref||1,t=l.sizemin||0,n=l.sizemode==="area"?function(r){return Math.sqrt(r/e)}:function(r){return r/e};return function(r){var a=n(r/k);return p(a)&&a>0?Math.max(a,t):0}}}}),kh=ze({"src/components/fx/helpers.js"(J){"use strict";var V=Nr();J.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo},J.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var n=e.xaxes||[],r=e.yaxes||[],a=0;a=0&&n.index{let o=r.toLowerCase(),s=r,c=l(a);for(o==="m"&&c.length>2&&(t.push([s,...c.splice(0,2)]),o="l",s=s==="m"?"l":"L");;){if(c.length===p[o])return t.push([s,...c]),"";if(c.length0&&(ce=100,_e=_e.replace("-open","")),_e.indexOf("-dot")>0&&(ce+=200,_e=_e.replace("-dot","")),_e=g.symbolNames.indexOf(_e),_e>=0&&(_e+=ce)}return _e%100>=T||_e>=400?0:Math.floor(Math.max(_e,0))};function u(_e,ce,ve,le){var Ae=_e%100;return g.symbolFuncs[Ae](ce,ve,le)+(_e>=200?f:"")}var A=E("~f"),x={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};g.gradient=function(_e,ce,ve,le,Ae,Be){var Xe=x[le];return z(_e,ce,ve,Xe.type,Ae,Be,Xe.start,Xe.stop,!1,Xe.reversed)};function z(_e,ce,ve,le,Ae,Be,Xe,Ye,yt,gt){var Tt=Ae.length,At;le==="linear"?At={node:"linearGradient",attrs:{x1:Xe.x,y1:Xe.y,x2:Ye.x,y2:Ye.y,gradientUnits:yt?"userSpaceOnUse":"objectBoundingBox"},reversed:gt}:le==="radial"&&(At={node:"radialGradient",reversed:gt});for(var $t=new Array(Tt),rr=0;rr=0&&_e.i===void 0&&(_e.i=Be.i),ce.style("opacity",le.selectedOpacityFn?le.selectedOpacityFn(_e):_e.mo===void 0?Xe.opacity:_e.mo),le.ms2mrc){var yt;_e.ms==="various"||Xe.size==="various"?yt=3:yt=le.ms2mrc(_e.ms),_e.mrc=yt,le.selectedSizeFn&&(yt=_e.mrc=le.selectedSizeFn(_e));var gt=g.symbolNumber(_e.mx||Xe.symbol)||0;_e.om=gt%200>=100;var Tt=ke(_e,ve),At=Z(_e,ve);ce.attr("d",u(gt,yt,Tt,At))}var $t=!1,rr,_r,Xt;if(_e.so)Xt=Ye.outlierwidth,_r=Ye.outliercolor,rr=Xe.outliercolor;else{var or=(Ye||{}).width;Xt=(_e.mlw+1||or+1||(_e.trace?(_e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in _e?_r=_e.mlcc=le.lineScale(_e.mlc):b.isArrayOrTypedArray(Ye.color)?_r=e.defaultLine:_r=Ye.color,b.isArrayOrTypedArray(Xe.color)&&(rr=e.defaultLine,$t=!0),"mc"in _e?rr=_e.mcc=le.markerScale(_e.mc):rr=Xe.color||Xe.colors||"rgba(0,0,0,0)",le.selectedColorFn&&(rr=le.selectedColorFn(_e))}let Ot=_e.mld||(Ye||{}).dash;if(Ot&&g.dashLine(ce,Ot,Xt),_e.om)ce.call(e.stroke,rr).style({"stroke-width":(Xt||1)+"px",fill:"none"});else{ce.style("stroke-width",(_e.isBlank?0:Xt)+"px");var vt=Xe.gradient,ht=_e.mgt;ht?$t=!0:ht=vt&&vt.type,b.isArrayOrTypedArray(ht)&&(ht=ht[0],x[ht]||(ht=0));var De=Xe.pattern,Ne=g.getPatternAttr,We=De&&(Ne(De.shape,_e.i,"")||Ne(De.path,_e.i,""));if(ht&&ht!=="none"){var Ke=_e.mgc;Ke?$t=!0:Ke=vt.color;var Je=ve.uid;$t&&(Je+="-"+_e.i),g.gradient(ce,Ae,Je,ht,[[0,Ke],[1,rr]],"fill")}else if(We){var et=!1,Mt=De.fgcolor;!Mt&&Be&&Be.color&&(Mt=Be.color,et=!0);var pt=Ne(Mt,_e.i,Be&&Be.color||null),Pt=Ne(De.bgcolor,_e.i,null),Ct=De.fgopacity,qt=Ne(De.size,_e.i,8),Vt=Ne(De.solidity,_e.i,.3);et=et||_e.mcc||b.isArrayOrTypedArray(De.shape)||b.isArrayOrTypedArray(De.path)||b.isArrayOrTypedArray(De.bgcolor)||b.isArrayOrTypedArray(De.fgcolor)||b.isArrayOrTypedArray(De.size)||b.isArrayOrTypedArray(De.solidity);var Ht=ve.uid;et&&(Ht+="-"+_e.i),g.pattern(ce,"point",Ae,Ht,We,qt,Vt,_e.mcc,De.fillmode,Pt,pt,Ct)}else b.isArrayOrTypedArray(rr)?e.fill(ce,rr[_e.i]):e.fill(ce,rr);Xt&&e.stroke(ce,_r)}},g.makePointStyleFns=function(_e){var ce={},ve=_e.marker;return ce.markerScale=g.tryColorscale(ve,""),ce.lineScale=g.tryColorscale(ve,"line"),l.traceIs(_e,"symbols")&&(ce.ms2mrc=m.isBubble(_e)?h(_e):function(){return(ve.size||6)/2}),_e.selectedpoints&&b.extendFlat(ce,g.makeSelectedPointStyleFns(_e)),ce},g.makeSelectedPointStyleFns=function(_e){var ce={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.marker||{},Be=ve.marker||{},Xe=le.marker||{},Ye=Ae.opacity,yt=Be.opacity,gt=Xe.opacity,Tt=yt!==void 0,At=gt!==void 0;(b.isArrayOrTypedArray(Ye)||Tt||At)&&(ce.selectedOpacityFn=function(De){var Ne=De.mo===void 0?Ae.opacity:De.mo;return De.selected?Tt?yt:Ne:At?gt:c*Ne});var $t=Ae.color,rr=Be.color,_r=Xe.color;(rr||_r)&&(ce.selectedColorFn=function(De){var Ne=De.mcc||$t;return De.selected?rr||Ne:_r||Ne});var Xt=Ae.size,or=Be.size,Ot=Xe.size,vt=or!==void 0,ht=Ot!==void 0;return l.traceIs(_e,"symbols")&&(vt||ht)&&(ce.selectedSizeFn=function(De){var Ne=De.mrc||Xt/2;return De.selected?vt?or/2:Ne:ht?Ot/2:Ne}),ce},g.makeSelectedTextStyleFns=function(_e){var ce={},ve=_e.selected||{},le=_e.unselected||{},Ae=_e.textfont||{},Be=ve.textfont||{},Xe=le.textfont||{},Ye=Ae.color,yt=Be.color,gt=Xe.color;return ce.selectedTextColorFn=function(Tt){var At=Tt.tc||Ye;return Tt.selected?yt||At:gt||(yt?At:e.addOpacity(At,c))},ce},g.selectedPointStyle=function(_e,ce){if(!(!_e.size()||!ce.selectedpoints)){var ve=g.makeSelectedPointStyleFns(ce),le=ce.marker||{},Ae=[];ve.selectedOpacityFn&&Ae.push(function(Be,Xe){Be.style("opacity",ve.selectedOpacityFn(Xe))}),ve.selectedColorFn&&Ae.push(function(Be,Xe){e.fill(Be,ve.selectedColorFn(Xe))}),ve.selectedSizeFn&&Ae.push(function(Be,Xe){var Ye=Xe.mx||le.symbol||0,yt=ve.selectedSizeFn(Xe);Be.attr("d",u(g.symbolNumber(Ye),yt,ke(Xe,ce),Z(Xe,ce))),Xe.mrc2=yt}),Ae.length&&_e.each(function(Be){for(var Xe=p.select(this),Ye=0;Ye0?ve:0}g.textPointStyle=function(_e,ce,ve){if(_e.size()){var le;if(ce.selectedpoints){var Ae=g.makeSelectedTextStyleFns(ce);le=Ae.selectedTextColorFn}var Be=ce.texttemplate,Xe=ve._fullLayout;_e.each(function(Ye){var yt=p.select(this),gt=Be?b.extractOption(Ye,ce,"txt","texttemplate"):b.extractOption(Ye,ce,"tx","text");if(!gt&>!==0){yt.remove();return}if(Be){var Tt=ce._module.formatLabels,At=Tt?Tt(Ye,ce,Xe):{},$t={};v($t,ce,Ye.i),gt=b.texttemplateString({data:[$t,Ye,ce._meta],fallback:ce.texttemplatefallback,labels:At,locale:Xe._d3locale,template:gt})}var rr=Ye.tp||ce.textposition,_r=D(Ye,ce),Xt=le?le(Ye):Ye.tc||ce.textfont.color;yt.call(g.font,{family:Ye.tf||ce.textfont.family,weight:Ye.tw||ce.textfont.weight,style:Ye.ty||ce.textfont.style,variant:Ye.tv||ce.textfont.variant,textcase:Ye.tC||ce.textfont.textcase,lineposition:Ye.tE||ce.textfont.lineposition,shadow:Ye.tS||ce.textfont.shadow,size:_r,color:Xt}).text(gt).call(r.convertToTspans,ve).call(O,rr,_r,Ye.mrc)})}},g.selectedTextStyle=function(_e,ce){if(!(!_e.size()||!ce.selectedpoints)){var ve=g.makeSelectedTextStyleFns(ce);_e.each(function(le){var Ae=p.select(this),Be=ve.selectedTextColorFn(le),Xe=le.tp||ce.textposition,Ye=D(le,ce);e.fill(Ae,Be);var yt=l.traceIs(ce,"bar-like");O(Ae,Xe,Ye,le.mrc2||le.mrc,yt)})}};var B=.5;g.smoothopen=function(_e,ce){if(_e.length<3)return"M"+_e.join("L");var ve="M"+_e[0],le=[],Ae;for(Ae=1;Ae<_e.length-1;Ae++)le.push(Q(_e[Ae-1],_e[Ae],_e[Ae+1],ce));for(ve+="Q"+le[0][0]+" "+_e[1],Ae=2;Ae<_e.length-1;Ae++)ve+="C"+le[Ae-2][1]+" "+le[Ae-1][0]+" "+_e[Ae];return ve+="Q"+le[_e.length-3][1]+" "+_e[_e.length-1],ve},g.smoothclosed=function(_e,ce){if(_e.length<3)return"M"+_e.join("L")+"Z";var ve="M"+_e[0],le=_e.length-1,Ae=[Q(_e[le],_e[0],_e[1],ce)],Be;for(Be=1;Be=yt||De>=Tt&&De<=yt)&&(Ne<=At&&Ne>=gt||Ne>=At&&Ne<=gt)&&(_e=[De,Ne])}return _e}g.applyBackoff=se,g.makeTester=function(){var _e=b.ensureSingleById(p.select("body"),"svg","js-plotly-tester",function(ve){ve.attr(a.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ce=b.ensureSingle(_e,"path","js-reference-point",function(ve){ve.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});g.tester=_e,g.testref=ce},g.savedBBoxes={};var G=0,X=1e4;g.bBox=function(_e,ce,ve){ve||(ve=K(_e));var le;if(ve){if(le=g.savedBBoxes[ve],le)return b.extendFlat({},le)}else if(_e.childNodes.length===1){var Ae=_e.childNodes[0];if(ve=K(Ae),ve){var Be=+Ae.getAttribute("x")||0,Xe=+Ae.getAttribute("y")||0,Ye=Ae.getAttribute("transform");if(!Ye){var yt=g.bBox(Ae,!1,ve);return Be&&(yt.left+=Be,yt.right+=Be),Xe&&(yt.top+=Xe,yt.bottom+=Xe),yt}if(ve+="~"+Be+"~"+Xe+"~"+Ye,le=g.savedBBoxes[ve],le)return b.extendFlat({},le)}}var gt,Tt;ce?gt=_e:(Tt=g.tester.node(),gt=_e.cloneNode(!0),Tt.appendChild(gt)),p.select(gt).attr("transform",null).call(r.positionText,0,0);var At=gt.getBoundingClientRect(),$t=g.testref.node().getBoundingClientRect();ce||Tt.removeChild(gt);var rr={height:At.height,width:At.width,left:At.left-$t.left,top:At.top-$t.top,right:At.right-$t.left,bottom:At.bottom-$t.top};return G>=X&&(g.savedBBoxes={},G=0),ve&&(g.savedBBoxes[ve]=rr),G++,b.extendFlat({},rr)};function K(_e){var ce=_e.getAttribute("data-unformatted");if(ce!==null)return ce+_e.getAttribute("data-math")+_e.getAttribute("text-anchor")+_e.getAttribute("style")}g.setClipUrl=function(_e,ce,ve){_e.attr("clip-path",H(ce,ve))};function H(_e,ce){if(!_e)return null;var ve=ce._context,le=ve._exportedPlot?"":ve._baseUrl||"";return le?"url('"+le+"#"+_e+"')":"url(#"+_e+")"}g.getTranslate=function(_e){var ce=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ce,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||0,y:+Ae[1]||0}},g.setTranslate=function(_e,ce,ve){var le=/(\btranslate\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ce=ce||0,ve=ve||0,Xe=Xe.replace(le,"").trim(),Xe+=n(ce,ve),Xe=Xe.trim(),_e[Be]("transform",Xe),Xe},g.getScale=function(_e){var ce=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ve=_e.attr?"attr":"getAttribute",le=_e[ve]("transform")||"",Ae=le.replace(ce,function(Be,Xe,Ye){return[Xe,Ye].join(" ")}).split(" ");return{x:+Ae[0]||1,y:+Ae[1]||1}},g.setScale=function(_e,ce,ve){var le=/(\bscale\(.*?\);?)/,Ae=_e.attr?"attr":"getAttribute",Be=_e.attr?"attr":"setAttribute",Xe=_e[Ae]("transform")||"";return ce=ce||1,ve=ve||1,Xe=Xe.replace(le,"").trim(),Xe+="scale("+ce+","+ve+")",Xe=Xe.trim(),_e[Be]("transform",Xe),Xe};var Y=/\s*sc.*/;g.setPointGroupScale=function(_e,ce,ve){if(ce=ce||1,ve=ve||1,!!_e){var le=ce===1&&ve===1?"":"scale("+ce+","+ve+")";_e.each(function(){var Ae=(this.getAttribute("transform")||"").replace(Y,"");Ae+=le,Ae=Ae.trim(),this.setAttribute("transform",Ae)})}};var q=/translate\([^)]*\)\s*$/;g.setTextPointsScale=function(_e,ce,ve){_e&&_e.each(function(){var le,Ae=p.select(this),Be=Ae.select("text");if(Be.node()){var Xe=parseFloat(Be.attr("x")||0),Ye=parseFloat(Be.attr("y")||0),yt=(Ae.attr("transform")||"").match(q);ce===1&&ve===1?le=[]:le=[n(Xe,Ye),"scale("+ce+","+ve+")",n(-Xe,-Ye)],yt&&le.push(yt),Ae.attr("transform",le.join(""))}})};function Z(_e,ce){var ve;return _e&&(ve=_e.mf),ve===void 0&&(ve=ce.marker&&ce.marker.standoff||0),!ce._geo&&!ce._xA?-ve:ve}g.getMarkerStandoff=Z;var ee=Math.atan2,ae=Math.cos,he=Math.sin;function xe(_e,ce){var ve=ce[0],le=ce[1];return[ve*ae(_e)-le*he(_e),ve*he(_e)+le*ae(_e)]}var we,Me,Se,Ie,Ve,Ge;function ke(_e,ce){var ve=_e.ma;ve===void 0&&(ve=ce.marker.angle,(!k(ve)||b.isArrayOrTypedArray(ve))&&(ve=0));var le,Ae,Be=ce.marker.angleref;if(Be==="previous"||Be==="north"){if(ce._geo){var Xe=ce._geo.project(_e.lonlat);le=Xe[0],Ae=Xe[1]}else{var Ye=ce._xA,yt=ce._yA;if(Ye&&yt)le=Ye.c2p(_e.x),Ae=yt.c2p(_e.y);else return 90}if(ce._geo){var gt=_e.lonlat[0],Tt=_e.lonlat[1],At=ce._geo.project([gt,Tt+1e-5]),$t=ce._geo.project([gt+1e-5,Tt]),rr=ee($t[1]-Ae,$t[0]-le),_r=ee(At[1]-Ae,At[0]-le),Xt;if(Be==="north")Xt=ve/180*Math.PI;else if(Be==="previous"){var or=gt/180*Math.PI,Ot=Tt/180*Math.PI,vt=we/180*Math.PI,ht=Me/180*Math.PI,De=vt-or,Ne=ae(ht)*he(De),We=he(ht)*ae(Ot)-ae(ht)*he(Ot)*ae(De);Xt=-ee(Ne,We)-Math.PI,we=gt,Me=Tt}var Ke=xe(rr,[ae(Xt),0]),Je=xe(_r,[he(Xt),0]);ve=ee(Ke[1]+Je[1],Ke[0]+Je[0])/Math.PI*180,Be==="previous"&&!(Ge===ce.uid&&_e.i===Ve+1)&&(ve=null)}if(Be==="previous"&&!ce._geo)if(Ge===ce.uid&&_e.i===Ve+1&&k(le)&&k(Ae)){var et=le-Se,Mt=Ae-Ie,pt=ce.line&&ce.line.shape||"",Pt=pt.slice(pt.length-1);Pt==="h"&&(Mt=0),Pt==="v"&&(et=0),ve+=ee(Mt,et)/Math.PI*180+90}else ve=null}return Se=le,Ie=Ae,Ve=_e.i,Ge=ce.uid,ve}g.getMarkerAngle=ke}}),qv=ze({"src/components/titles/index.js"(J,V){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=$i(),n=Qn(),r=Cs(),a=np(),o=dc().OPPOSITE_SIDE,s=/ [XY][0-9]* /,c=1.6,m=1.6;function h(v,g,i){var w=v._fullLayout,S=i.propContainer,M=i.propName,C=i.placeholder,_=i.traceIndex,T=i.avoid||{},f=i.attributes,u=i.transform,A=i.containerGroup,x=1,z=S.title,I=(z&&z.text?z.text:"").trim(),O=!1,D=z&&z.font?z.font:{},B=D.family,F=D.size,P=D.color,j=D.weight,U=D.style,$=D.variant,Q=D.textcase,re=D.lineposition,ne=D.shadow,se=i.subtitlePropName,G=!!se,X=i.subtitlePlaceholder,K=(S.title||{}).subtitle||{text:"",font:{}},H=(K.text||"").trim(),Y=!1,q=1,Z=K.font,ee=Z.family,ae=Z.size,he=Z.color,xe=Z.weight,we=Z.style,Me=Z.variant,Se=Z.textcase,Ie=Z.lineposition,Ve=Z.shadow,Ge;M==="title.text"?Ge="titleText":M.indexOf("axis")!==-1?Ge="axisTitleText":M.indexOf("colorbar")!==-1&&(Ge="colorbarTitleText");var ke=v._context.edits[Ge];function _e(rr,_r){return rr===void 0||_r===void 0?!1:rr.replace(s," % ")===_r.replace(s," % ")}I===""?x=0:_e(I,C)&&(ke||(I=""),x=.2,O=!0),G&&(H===""?q=0:_e(H,X)&&(ke||(H=""),q=.2,Y=!0)),i._meta?I=l.templateString(I,i._meta):w._meta&&(I=l.templateString(I,w._meta));var ce=I||H||ke,ve;A||(A=l.ensureSingle(w._infolayer,"g","g-"+g),ve=w._hColorbarMoveTitle);var le=A.selectAll("text."+g).data(ce?[0]:[]);le.enter().append("text"),le.text(I).attr("class",g),le.exit().remove();var Ae=null,Be=g+"-subtitle",Xe=H||ke;if(G&&(Ae=A.selectAll("text."+Be).data(Xe?[0]:[]),Ae.enter().append("text"),Ae.text(H).attr("class",Be),Ae.exit().remove()),!ce)return A;function Ye(rr,_r){l.syncOrAsync([yt,gt],{title:rr,subtitle:_r})}function yt(rr){var _r=rr.title,Xt=rr.subtitle,or;!u&&ve&&(u={}),u?(or="",u.rotate&&(or+="rotate("+[u.rotate,f.x,f.y]+")"),(u.offset||ve)&&(or+=e(0,(u.offset||0)-(ve||0)))):or=null,_r.attr("transform",or);function Ot(Ke){if(Ke){var Je=p.select(Ke.node().parentNode).select("."+Be);if(!Je.empty()){var et=Ke.node().getBBox();if(et.height){var Mt=et.y+et.height+c*ae;Je.attr("y",Mt)}}}}if(_r.style("opacity",x*n.opacity(P)).call(t.font,{color:n.rgb(P),size:p.round(F,2),family:B,weight:j,style:U,variant:$,textcase:Q,shadow:ne,lineposition:re}).attr(f).call(r.convertToTspans,v,Ot),Xt&&!Xt.empty()){var vt=A.select("."+g+"-math-group"),ht=_r.node().getBBox(),De=vt.node()?vt.node().getBBox():void 0,Ne=De?De.y+De.height+c*ae:ht.y+ht.height+m*ae,We=l.extendFlat({},f,{y:Ne});Xt.attr("transform",or),Xt.style("opacity",q*n.opacity(he)).call(t.font,{color:n.rgb(he),size:p.round(ae,2),family:ee,weight:xe,style:we,variant:Me,textcase:Se,shadow:Ve,lineposition:Ie}).attr(We).call(r.convertToTspans,v)}return E.previousPromises(v)}function gt(rr){var _r=rr.title,Xt=p.select(_r.node().parentNode);if(T&&T.selection&&T.side&&I){Xt.attr("transform",null);var or=o[T.side],Ot=T.side==="left"||T.side==="top"?-1:1,vt=b(T.pad)?T.pad:2,ht=t.bBox(Xt.node()),De={t:0,b:0,l:0,r:0},Ne=v._fullLayout._reservedMargin;for(var We in Ne)for(var Ke in Ne[We]){var Je=Ne[We][Ke];De[Ke]=Math.max(De[Ke],Je)}var et={left:De.l,top:De.t,right:w.width-De.r,bottom:w.height-De.b},Mt=T.maxShift||Ot*(et[T.side]-ht[T.side]),pt=0;if(Mt<0)pt=Mt;else{var Pt=T.offsetLeft||0,Ct=T.offsetTop||0;ht.left-=Pt,ht.right-=Pt,ht.top-=Ct,ht.bottom-=Ct,T.selection.each(function(){var Vt=t.bBox(this);l.bBoxIntersect(ht,Vt,vt)&&(pt=Math.max(pt,Ot*(Vt[T.side]-ht[or])+vt))}),pt=Math.min(Mt,pt),S._titleScoot=Math.abs(pt)}if(pt>0||Mt<0){var qt={left:[-pt,0],right:[pt,0],top:[0,-pt],bottom:[0,pt]}[T.side];Xt.attr("transform",e(qt[0],qt[1]))}}}le.call(Ye,Ae);function Tt(rr,_r){rr.text(_r).on("mouseover.opacity",function(){p.select(this).transition().duration(a.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){p.select(this).transition().duration(a.HIDE_PLACEHOLDER).style("opacity",0)})}if(ke&&(I?le.on(".opacity",null):(Tt(le,C),O=!0),le.call(r.makeEditable,{gd:v}).on("edit",function(rr){_!==void 0?k.call("_guiRestyle",v,M,rr,_):k.call("_guiRelayout",v,M,rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,f.x,f.y)}),G)){if(G&&!I){var At=le.node().getBBox(),$t=At.y+At.height+m*ae;Ae.attr("y",$t)}H?Ae.on(".opacity",null):(Tt(Ae,X),Y=!0),Ae.call(r.makeEditable,{gd:v}).on("edit",function(rr){k.call("_guiRelayout",v,"title.subtitle.text",rr)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ye)}).on("input",function(rr){this.text(rr||" ").call(r.positionText,Ae.attr("x"),Ae.attr("y"))})}return le.classed("js-placeholder",O),Ae&&!Ae.empty()&&Ae.classed("js-placeholder",Y),A}V.exports={draw:h,SUBTITLE_PADDING_EM:m,SUBTITLE_PADDING_MATHJAX_EM:c}}}),Dd=ze({"src/plots/cartesian/set_convert.js"(J,V){"use strict";var p=ci(),b=jm().utcFormat,E=Nr(),k=E.numberFormat,l=ao(),e=E.cleanNumber,t=E.ms2DateTime,n=E.dateTime2ms,r=E.ensureNumber,a=E.isArrayOrTypedArray,o=No(),s=o.FP_SAFE,c=o.BADNUM,m=o.LOG_CLIP,h=o.ONEWEEK,v=o.ONEDAY,g=o.ONEHOUR,i=o.ONEMIN,w=o.ONESEC,S=Xl(),M=hc(),C=M.HOUR_PATTERN,_=M.WEEKDAY_PATTERN;function T(u){return Math.pow(10,u)}function f(u){return u!=null}V.exports=function(A,x){x=x||{};var z=A._id||"x",I=z.charAt(0);function O(H,Y){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&Y&&A.range&&A.range.length===2){var q=A.range[0],Z=A.range[1];return .5*(q+Z-2*m*Math.abs(q-Z))}else return c}function D(H,Y,q,Z){if((Z||{}).msUTC&&l(H))return+H;var ee=n(H,q||A.calendar);if(ee===c)if(l(H)){H=+H;var ae=Math.floor(E.mod(H+.05,1)*10),he=Math.round(H-ae/10);ee=n(new Date(he))+ae/10}else return c;return ee}function B(H,Y,q){return t(H,Y,q||A.calendar)}function F(H){return A._categories[Math.round(H)]}function P(H){if(f(H)){if(A._categoriesMap===void 0&&(A._categoriesMap={}),A._categoriesMap[H]!==void 0)return A._categoriesMap[H];A._categories.push(typeof H=="number"?String(H):H);var Y=A._categories.length-1;return A._categoriesMap[H]=Y,Y}return c}function j(H,Y){for(var q=new Array(Y),Z=0;ZA.range[1]&&(q=!q);for(var Z=q?-1:1,ee=Z*H,ae=0,he=0;hewe)ae=he+1;else{ae=ee<(xe+we)/2?he:he+1;break}}var Me=A._B[ae]||0;return isFinite(Me)?re(H,A._m2,Me):0},G=function(H){var Y=A._rangebreaks.length;if(!Y)return ne(H,A._m,A._b);for(var q=0,Z=0;ZA._rangebreaks[Z].pmax&&(q=Z+1);return ne(H,A._m2,A._B[q])}}A.c2l=A.type==="log"?O:r,A.l2c=A.type==="log"?T:r,A.l2p=se,A.p2l=G,A.c2p=A.type==="log"?function(H,Y){return se(O(H,Y))}:se,A.p2c=A.type==="log"?function(H){return T(G(H))}:G,["linear","-"].indexOf(A.type)!==-1?(A.d2r=A.r2d=A.d2c=A.r2c=A.d2l=A.r2l=e,A.c2d=A.c2r=A.l2d=A.l2r=r,A.d2p=A.r2p=function(H){return A.l2p(e(H))},A.p2d=A.p2r=G,A.cleanPos=r):A.type==="log"?(A.d2r=A.d2l=function(H,Y){return O(e(H),Y)},A.r2d=A.r2c=function(H){return T(e(H))},A.d2c=A.r2l=e,A.c2d=A.l2r=r,A.c2r=O,A.l2d=T,A.d2p=function(H,Y){return A.l2p(A.d2r(H,Y))},A.p2d=function(H){return T(G(H))},A.r2p=function(H){return A.l2p(e(H))},A.p2r=G,A.cleanPos=r):A.type==="date"?(A.d2r=A.r2d=E.identity,A.d2c=A.r2c=A.d2l=A.r2l=D,A.c2d=A.c2r=A.l2d=A.l2r=B,A.d2p=A.r2p=function(H,Y,q){return A.l2p(D(H,0,q))},A.p2d=A.p2r=function(H,Y,q){return B(G(H),Y,q)},A.cleanPos=function(H){return E.cleanDate(H,c,A.calendar)}):A.type==="category"?(A.d2c=A.d2l=P,A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var Y=Q(H);return Y!==void 0?Y:A.fraction2r(.5)},A.l2r=A.c2r=r,A.r2l=Q,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(G(H))},A.r2p=A.d2p,A.p2r=G,A.cleanPos=function(H){return typeof H=="string"&&H!==""?H:r(H)}):A.type==="multicategory"&&(A.r2d=A.c2d=A.l2d=F,A.d2r=A.d2l_noadd=$,A.r2c=function(H){var Y=$(H);return Y!==void 0?Y:A.fraction2r(.5)},A.r2c_just_indices=U,A.l2r=A.c2r=r,A.r2l=$,A.d2p=function(H){return A.l2p(A.r2c(H))},A.p2d=function(H){return F(G(H))},A.r2p=A.d2p,A.p2r=G,A.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:r(H)},A.setupMultiCategory=function(H){var Y=A._traceIndices,q,Z,ee=A._matchGroup;if(ee&&A._categories.length===0){for(var ae in ee)if(ae!==z){var he=x[S.id2name(ae)];Y=Y.concat(he._traceIndices)}}var xe=[[0,{}],[0,{}]],we=[];for(q=0;qhe[1]&&(Z[ae?0:1]=q,ee[1]=he[1]),ee[0]>=ee[1])if(Y!==void 0){var xe=he[0]+1;q!==void 0&&(xe=Math.min(xe,he[1])),Z[ae?0:1]=A.l2r(xe)}else q!==void 0&&(Z[ae?1:0]=A.l2r(he[1]-1))}},A.cleanRange=function(H,Y){A._cleanRange(H,Y),A.limitRange(H)},A._cleanRange=function(H,Y){Y||(Y={}),H||(H="range");var q=E.nestedProperty(A,H).get(),Z,ee;if(A.type==="date"?ee=E.dfltRange(A.calendar):I==="y"?ee=M.DFLTRANGEY:A._name==="realaxis"?ee=[0,1]:ee=Y.dfltRange||M.DFLTRANGEX,ee=ee.slice(),(A.rangemode==="tozero"||A.rangemode==="nonnegative")&&(ee[0]=0),!q||q.length!==2){E.nestedProperty(A,H).set(ee);return}var ae=q[0]===null,he=q[1]===null;for(A.type==="date"&&!A.autorange&&(q[0]=E.cleanDate(q[0],c,A.calendar),q[1]=E.cleanDate(q[1],c,A.calendar)),Z=0;Z<2;Z++)if(A.type==="date"){if(!E.isDateTime(q[Z],A.calendar)){A[H]=ee;break}if(A.r2l(q[0])===A.r2l(q[1])){var xe=E.constrain(A.r2l(q[0]),E.MIN_MS+1e3,E.MAX_MS-1e3);q[0]=A.l2r(xe-1e3),q[1]=A.l2r(xe+1e3);break}}else{if(!l(q[Z]))if(!(ae||he)&&l(q[1-Z]))q[Z]=q[1-Z]*(Z?10:.1);else{A[H]=ee;break}if(q[Z]<-s?q[Z]=-s:q[Z]>s&&(q[Z]=s),q[0]===q[1]){var we=Math.max(1,Math.abs(q[0]*1e-6));q[0]-=we,q[1]+=we}}},A.setScale=function(H){var Y=x._size;if(A.overlaying){var q=S.getFromId({_fullLayout:x},A.overlaying);A.domain=q.domain}var Z=H&&A._r?"_r":"range",ee=A.calendar;A.cleanRange(Z);var ae=A.r2l(A[Z][0],ee),he=A.r2l(A[Z][1],ee),xe=I==="y";if(xe?(A._offset=Y.t+(1-A.domain[1])*Y.h,A._length=Y.h*(A.domain[1]-A.domain[0]),A._m=A._length/(ae-he),A._b=-A._m*he):(A._offset=Y.l+A.domain[0]*Y.w,A._length=Y.w*(A.domain[1]-A.domain[0]),A._m=A._length/(he-ae),A._b=-A._m*ae),A._rangebreaks=[],A._lBreaks=0,A._m2=0,A._B=[],A.rangebreaks){var we,Me;if(A._rangebreaks=A.locateBreaks(Math.min(ae,he),Math.max(ae,he)),A._rangebreaks.length){for(we=0;wehe&&(Se=!Se),Se&&A._rangebreaks.reverse();var Ie=Se?-1:1;for(A._m2=Ie*A._length/(Math.abs(he-ae)-A._lBreaks),A._B.push(-A._m2*(xe?he:ae)),we=0;weee&&(ee+=7,aeee&&(ee+=24,ae=Z&&ae=Z&&H=Ye.min&&(leYe.max&&(Ye.max=Ae),Be=!1)}Be&&he.push({min:le,max:Ae})}};for(q=0;qw*2}function o(m){return Math.max(1,(m-1)/1e3)}function s(m,h){for(var v=m.length,g=o(v),i=0,w=0,S={},M=0;Mi*2}function c(m){return k(m[0])&&k(m[1])}}}),md=ze({"src/plots/cartesian/autorange.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=No().FP_SAFE,l=mi(),e=$i(),t=Xl(),n=t.getFromId,r=t.isLinked;V.exports={applyAutorangeOptions:A,getAutoRange:a,makePadFn:s,doAutoRange:v,findExtremes:g,concatExtremes:h};function a(x,z){var I,O,D=[],B=x._fullLayout,F=s(B,z,0),P=s(B,z,1),j=h(x,z),U=j.min,$=j.max;if(U.length===0||$.length===0)return E.simpleMap(z.range,z.r2l);var Q=U[0].val,re=$[0].val;for(I=1;I0&&(we=Y-F(ee)-P(ae),we>q?Me/we>Z&&(he=ee,xe=ae,Z=Me/we):Me/Y>Z&&(he={val:ee.val,nopad:1},xe={val:ae.val,nopad:1},Z=Me/Y));function Se(_e,ce){return Math.max(_e,P(ce))}if(Q===re){var Ie=Q-1,Ve=Q+1;if(K)if(Q===0)D=[0,1];else{var Ge=(Q>0?$:U).reduce(Se,0),ke=Q/(1-Math.min(.5,Ge/Y));D=Q>0?[0,ke]:[ke,0]}else H?D=[Math.max(0,Ie),Math.max(1,Ve)]:D=[Ie,Ve]}else K?(he.val>=0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:0,nopad:1})):H&&(he.val-Z*F(he)<0&&(he={val:0,nopad:1}),xe.val<=0&&(xe={val:1,nopad:1})),Z=(xe.val-he.val-o(z,ee.val,ae.val))/(Y-F(he)-P(xe)),D=[he.val-Z*F(he),xe.val+Z*P(xe)];return D=A(D,z),z.limitRange&&z.limitRange(),se&&D.reverse(),E.simpleMap(D,z.l2r||Number)}function o(x,z,I){var O=0;if(x.rangebreaks)for(var D=x.locateBreaks(z,I),B=0;B0?I.ppadplus:I.ppadminus)||I.ppad||0),ee=q((x._m>0?I.ppadminus:I.ppadplus)||I.ppad||0),ae=q(I.vpadplus||I.vpad),he=q(I.vpadminus||I.vpad);if(!U){if(H=1/0,Y=-1/0,j)for(Q=0;Q0&&(H=re),re>Y&&re-k&&(H=re),re>Y&&re=Me;Q--)we(Q);return{min:O,max:D,opts:I}}function i(x,z,I,O){S(x,z,I,O,C)}function w(x,z,I,O){S(x,z,I,O,_)}function S(x,z,I,O,D){for(var B=O.tozero,F=O.extrapad,P=!0,j=0;j=I&&(U.extrapad||!F)){P=!1;break}else D(z,U.val)&&U.pad<=I&&(F||!U.extrapad)&&(x.splice(j,1),j--)}if(P){var $=B&&z===0;x.push({val:z,pad:$?0:I,extrapad:$?!1:F})}}function M(x){return b(x)&&Math.abs(x)=z}function T(x,z){var I=z.autorangeoptions;return I&&I.minallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.minallowed:I&&I.clipmin!==void 0&&u(z,I.clipmin,I.clipmax)?Math.max(x,z.d2l(I.clipmin)):x}function f(x,z){var I=z.autorangeoptions;return I&&I.maxallowed!==void 0&&u(z,I.minallowed,I.maxallowed)?I.maxallowed:I&&I.clipmax!==void 0&&u(z,I.clipmin,I.clipmax)?Math.min(x,z.d2l(I.clipmax)):x}function u(x,z,I){return z!==void 0&&I!==void 0?(z=x.d2l(z),I=x.d2l(I),z=j&&(B=j,I=j),F<=j&&(F=j,O=j)}}return I=T(I,z),O=f(O,z),[I,O]}}}),Gi=ze({"src/plots/cartesian/axes.js"(J,V){"use strict";var p=ci(),b=ao(),E=cl(),k=mi(),l=Nr(),e=l.strTranslate,t=Cs(),n=qv(),r=Qn(),a=$i(),o=cf(),s=Xw(),c=hc(),m=No(),h=m.ONEMAXYEAR,v=m.ONEAVGYEAR,g=m.ONEMINYEAR,i=m.ONEMAXQUARTER,w=m.ONEAVGQUARTER,S=m.ONEMINQUARTER,M=m.ONEMAXMONTH,C=m.ONEAVGMONTH,_=m.ONEMINMONTH,T=m.ONEWEEK,f=m.ONEDAY,u=f/2,A=m.ONEHOUR,x=m.ONEMIN,z=m.ONESEC,I=m.ONEMILLI,O=m.ONEMICROSEC,D=m.MINUS_SIGN,B=m.BADNUM,F={K:"zeroline"},P={K:"gridline",L:"path"},j={K:"minor-gridline",L:"path"},U={K:"tick",L:"path"},$={K:"tick",L:"text"},Q={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},re=dc(),ne=re.MID_SHIFT,se=re.CAP_SHIFT,G=re.LINE_SPACING,X=re.OPPOSITE_SIDE,K=3,H=V.exports={};H.setConvert=Dd();var Y=Xm(),q=Xl(),Z=q.idSort,ee=q.isLinked;H.id2name=q.id2name,H.name2id=q.name2id,H.cleanId=q.cleanId,H.list=q.list,H.listIds=q.listIds,H.getFromId=q.getFromId,H.getFromTrace=q.getFromTrace;var ae=md();H.getAutoRange=ae.getAutoRange,H.findExtremes=ae.findExtremes;var he=1e-4;function xe(lt){var rt=(lt[1]-lt[0])*he;return[lt[0]-rt,lt[1]+rt]}function we(lt,rt,fr){if(![fr,lt,rt].every(b)||fr===0)return lt;let lr=Math.round((lt-rt)/fr),Tr=rt+lr*fr;return lt!==Tr&&Math.abs(lt-Tr)xr+" domain")),kt=kt.concat(Ir||[]),ar.length>Dr?(l.warn("Array attribute "+jt+" has more entries than expected, truncating to "+Dr),ar=ar.slice(0,Dr)):ar.length2e-6||((fr-lt._forceTick0)/lt._minDtick%1+1.000001)%1>2e-6)&&(lt._minDtick=0))},H.saveRangeInitial=function(lt,rt){for(var fr=H.list(lt,"",!0),lr=!1,Tr=0;TrEr*.3||jt(lr)||jt(Tr))){var xr=fr.dtick/2;lt+=lt+xrDr){var ot=Number(fr.slice(1));Ir.exactYears>Dr&&ot%12===0?lt=H.tickIncrement(lt,"M6","reverse")+f*1.5:Ir.exactMonths>Dr?lt=H.tickIncrement(lt,"M1","reverse")+f*15.5:lt-=u;var kt=H.tickIncrement(lt,fr);if(kt<=lr)return kt}return lt}H.prepMinorTicks=function(lt,rt,fr){var lr,Tr;if(!((lr=rt.minor)!=null&&lr.dtick)){delete lt.dtick;var Ir=rt.dtick&&b(rt._tmin),Dr;if(Ir){var ot=H.tickIncrement(rt._tmin,rt.dtick,!0);Dr=[rt._tmin,ot*.99+rt._tmin*.01]}else{var kt=l.simpleMap(rt.range,rt.r2l);Dr=[kt[0],.8*kt[0]+.2*kt[1]]}if(lt.range=l.simpleMap(Dr,rt.l2r),lt._isMinor=!0,H.prepTicks(lt,fr),Ir){var jt=b(rt.dtick),ar=b(lt.dtick),Er=jt?rt.dtick:+rt.dtick.substring(1),xr=ar?lt.dtick:+lt.dtick.substring(1);jt&&ar?ke(Er,xr)?Er===2*T&&xr===2*f&&(lt.dtick=T):Er===2*T&&xr===3*f?lt.dtick=T:Er===T&&!(rt._input.minor||{}).nticks?lt.dtick=f:_e(Er/xr,2.5)?lt.dtick=Er/2:lt.dtick=Er:String(rt.dtick).charAt(0)==="M"?ar?lt.dtick="M1":ke(Er,xr)?Er>=12&&xr===2&&(lt.dtick="M3"):lt.dtick=rt.dtick:String(lt.dtick).charAt(0)==="L"?String(rt.dtick).charAt(0)==="L"?ke(Er,xr)||(lt.dtick=_e(Er/xr,2.5)?rt.dtick/2:rt.dtick):lt.dtick="D1":lt.dtick==="D2"&&+rt.dtick>1&&(lt.dtick=1)}lt.range=rt.range}((Tr=rt.minor)==null?void 0:Tr._tick0Init)===void 0&&(lt.tick0=rt.tick0)};function ke(lt,rt){return Math.abs((lt/rt+.5)%1-.5)<.001}function _e(lt,rt){return Math.abs(lt/rt-1)<.001}H.prepTicks=function(lt,rt){var fr=l.simpleMap(lt.range,lt.r2l,void 0,void 0,rt);if(lt.tickmode==="auto"||!lt.dtick){var lr=lt.nticks,Tr;lr||(lt.type==="category"||lt.type==="multicategory"?(Tr=lt.tickfont?l.bigFont(lt.tickfont.size||12):15,lr=lt._length/Tr):(Tr=lt._id.charAt(0)==="y"?40:80,lr=l.constrain(lt._length/Tr,4,9)+1),lt._name==="radialaxis"&&(lr*=2)),lt.minor&<.minor.tickmode!=="array"||lt.tickmode==="array"&&(lr*=100),lt._roughDTick=Math.abs(fr[1]-fr[0])/lr,H.autoTicks(lt,lt._roughDTick),lt._minDtick>0&<.dtick0?(Ir=lr-1,Dr=lr):(Ir=lr,Dr=lr);var ot=lt[Ir].value,kt=lt[Dr].value,jt=Math.abs(kt-ot),ar=fr||jt,Er=0;ar>=g?jt>=g&&jt<=h?Er=jt:Er=v:fr===w&&ar>=S?jt>=S&&jt<=i?Er=jt:Er=w:ar>=_?jt>=_&&jt<=M?Er=jt:Er=C:fr===T&&ar>=T?Er=T:ar>=f?Er=f:fr===u&&ar>=u?Er=u:fr===A&&ar>=A&&(Er=A);var xr;Er>=jt&&(Er=jt,xr=!0);var zr=Tr+Er;if(rt.rangebreaks&&Er>0){for(var Lr=84,aa=0,Sa=0;SaT&&(Er=jt)}(Er>0||lr===0)&&(lt[lr].periodX=Tr+Er/2)}}H.calcTicks=function(rt,fr){for(var lr=rt.type,Tr=rt.calendar,Ir=rt.ticklabelstep,Dr=rt.ticklabelmode==="period",ot=rt.range[0]>rt.range[1],kt=!rt.ticklabelindex||l.isArrayOrTypedArray(rt.ticklabelindex)?rt.ticklabelindex:[rt.ticklabelindex],jt=l.simpleMap(rt.range,rt.r2l,void 0,void 0,fr),ar=jt[1]=(ai?0:1);rn--){var Ri=!rn;rn?(rt._dtickInit=rt.dtick,rt._tick0Init=rt.tick0):ai&&(rt.minor._dtickInit=rt.minor.dtick,rt.minor._tick0Init=rt.minor.tick0);var Gn=rn?rt:l.extendFlat({},rt,ai?rt.minor:{minor:{}});if(Ri?H.prepMinorTicks(Gn,rt,fr):H.prepTicks(Gn,fr),Gn.tickmode==="array"){rn?(Sa=[],Lr=Xe(rt,!Ri)):(wa=[],aa=Xe(rt,!Ri));continue}if(Gn.tickmode==="sync"){Sa=[],Lr=Be(rt);continue}var no=xe(jt),Di=no[0],fn=no[1],Ai=b(Gn.dtick),jn=lr==="log"&&!(Ai||Gn.dtick.charAt(0)==="L"),Xn=H.tickFirst(Gn,fr);if(rn){if(rt._tmin=Xn,Xn=fn:gi<=fn;gi=H.tickIncrement(gi,oo,ar,Tr)){if(rn&&qi++,Gn.rangebreaks&&!ar){if(gi=xr)break}if(Sa.length>zr||gi===eo)break;eo=gi;var qn={value:we(gi,Vn,oo)};rn?(gi===Xn&&(qn.first=!0),jn&&gi!==(gi|0)&&(qn.simpleLabel=!0),Ir>1&&qi%Ir&&(qn.skipLabel=!0),Sa.push(qn)):(qn.minor=!0,wa.push(qn))}}if(!wa||wa.length<3)kt=!1;else{var Hi=(wa[2].value-wa[1].value)*(ot?-1:1);Oa(Hi,rt.tickformat)||(kt=!1,wa=wa.slice(1))}if(!kt)pn=Sa;else{var Mi=Sa.concat(wa);Dr&&Sa.length&&(Mi=Mi.slice(1)),Mi=Mi.sort(function(Bo,_o){return Bo.value-_o.value}).filter(function(Bo,_o,Pi){return _o===0||Bo.value!==Pi[_o-1].value});var Ro=Mi.map(function(Bo,_o){return Bo.minor===void 0&&!Bo.skipLabel?_o:null}).filter(function(Bo){return Bo!==null});Ro.forEach(function(Bo){kt.map(function(_o){var Pi=Bo+_o;Pi>=0&&Pi-1;pi--){if(Sa[pi].drop){Sa.splice(pi,1);continue}Sa[pi].value=on(Sa[pi].value,rt);var Ko=rt.c2p(Sa[pi].value);(Vi?Xi>Ko-Io:Xixr||yoxr&&(Pi.periodX=xr),yoTr&&LrTr&&Sav)rt/=v,lr=Tr(10),lt.dtick="M"+12*_r(rt,lr,Ye);else if(Ir>C)rt/=C,lt.dtick="M"+_r(rt,1,yt);else if(Ir>f){if(lt.dtick=_r(rt,f,lt._hasDayOfWeekBreaks?[1,2,7,14]:Tt),!fr){var Dr=H.getTickFormat(lt),ot=lt.ticklabelmode==="period";ot&&(lt._rawTick0=lt.tick0),/%[uVW]/.test(Dr)?lt.tick0=l.dateTick0(lt.calendar,2):lt.tick0=l.dateTick0(lt.calendar,1),ot&&(lt._dowTick0=lt.tick0)}}else Ir>A?lt.dtick=_r(rt,A,yt):Ir>x?lt.dtick=_r(rt,x,gt):Ir>z?lt.dtick=_r(rt,z,gt):(lr=Tr(10),lt.dtick=_r(rt,lr,Ye))}else if(lt.type==="log"){lt.tick0=0;var kt=l.simpleMap(lt.range,lt.r2l);if(lt._isMinor&&(rt*=1.5),rt>.7)lt.dtick=Math.ceil(rt);else if(Math.abs(kt[1]-kt[0])<1){var jt=1.5*Math.abs((kt[1]-kt[0])/rt);rt=Math.abs(Math.pow(10,kt[1])-Math.pow(10,kt[0]))/jt,lr=Tr(10),lt.dtick="L"+_r(rt,lr,Ye)}else lt.dtick=rt>.3?"D2":"D1"}else lt.type==="category"||lt.type==="multicategory"?(lt.tick0=0,lt.dtick=Math.ceil(Math.max(rt,1))):Yn(lt)?(lt.tick0=0,lr=1,lt.dtick=_r(rt,lr,rr)):(lt.tick0=0,lr=Tr(10),lt.dtick=_r(rt,lr,Ye));if(lt.dtick===0&&(lt.dtick=1),!b(lt.dtick)&&typeof lt.dtick!="string"){var ar=lt.dtick;throw lt.dtick=1,"ax.dtick error: "+String(ar)}};function Xt(lt){var rt=lt.dtick;if(lt._tickexponent=0,!b(rt)&&typeof rt!="string"&&(rt=1),(lt.type==="category"||lt.type==="multicategory")&&(lt._tickround=null),lt.type==="date"){var fr=lt.r2l(lt.tick0),lr=lt.l2r(fr).replace(/(^-|i)/g,""),Tr=lr.length;if(String(rt).charAt(0)==="M")Tr>10||lr.slice(5)!=="01-01"?lt._tickround="d":lt._tickround=+rt.slice(1)%12===0?"y":"m";else if(rt>=f&&Tr<=10||rt>=f*15)lt._tickround="d";else if(rt>=x&&Tr<=16||rt>=A)lt._tickround="M";else if(rt>=z&&Tr<=19||rt>=x)lt._tickround="S";else{var Ir=lt.l2r(fr+rt).replace(/^-/,"").length;lt._tickround=Math.max(Tr,Ir)-20,lt._tickround<0&&(lt._tickround=4)}}else if(b(rt)||rt.charAt(0)==="L"){var Dr=lt.range.map(lt.r2d||Number);b(rt)||(rt=Number(rt.slice(1))),lt._tickround=2-Math.floor(Math.log(rt)/Math.LN10+.01);var ot=Math.max(Math.abs(Dr[0]),Math.abs(Dr[1])),kt=Math.floor(Math.log(ot)/Math.LN10+.01),jt=lt.minexponent===void 0?3:lt.minexponent;Math.abs(kt)>jt&&(Mt(lt.exponentformat)&<.exponentformat!=="SI extended"&&!pt(kt)||Mt(lt.exponentformat)&<.exponentformat==="SI extended"&&!Pt(kt)?lt._tickexponent=3*Math.round((kt-1)/3):lt._tickexponent=kt)}else lt._tickround=null}H.tickIncrement=function(lt,rt,fr,lr){var Tr=fr?-1:1;if(b(rt))return l.increment(lt,Tr*rt);var Ir=rt.charAt(0),Dr=Tr*Number(rt.slice(1));if(Ir==="M")return l.incrementMonth(lt,Dr,lr);if(Ir==="L")return Math.log(Math.pow(10,lt)+Dr)/Math.LN10;if(Ir==="D"){var ot=rt==="D2"?$t:At,kt=lt+Tr*.01,jt=l.roundUp(l.mod(kt,1),ot,fr);return Math.floor(kt)+Math.log(p.round(Math.pow(10,jt),1))/Math.LN10}throw"unrecognized dtick "+String(rt)},H.tickFirst=function(lt,rt){var fr=lt.r2l||Number,lr=l.simpleMap(lt.range,fr,void 0,void 0,rt),Tr=lr[1]=0&&ai<=lt._length?tn:null};if(kt&&l.isArrayOrTypedArray(lt.ticktext)){var Lr=l.simpleMap(lt.range,lt.r2l),aa=(Math.abs(Lr[1]-Lr[0])-(lt._lBreaks||0))/1e4;for(xr=0;xr"+ot;else{var jt=en(lt),ar=lt._trueSide||lt.side;(!jt&&ar==="top"||jt&&ar==="bottom")&&(Dr+="
")}rt.text=Dr}function vt(lt,rt,fr,lr,Tr){var Ir=lt.dtick,Dr=rt.x,ot=lt.tickformat,kt=typeof Ir=="string"&&Ir.charAt(0);if(Tr==="never"&&(Tr=""),lr&&kt!=="L"&&(Ir="L3",kt="L"),ot||kt==="L")rt.text=qt(Math.pow(10,Dr),lt,Tr,lr);else if(b(Ir)||kt==="D"&&(lt.minorloglabels==="complete"||l.mod(Dr+.01,1)<.1)){var jt;lt.minorloglabels==="complete"&&!(l.mod(Dr+.01,1)<.1)&&(jt=!0,rt.fontSize*=.75);var ar=Math.pow(10,Dr).toExponential(0),Er=ar.split("e"),xr=+Er[1],zr=Math.abs(xr),Lr=lt.exponentformat;Lr==="power"||Mt(Lr)&&Lr!=="SI extended"&&pt(xr)||Mt(Lr)&&Lr==="SI extended"&&Pt(xr)?(rt.text=Er[0],zr>0&&(rt.text+="x10"),rt.text==="1x10"&&(rt.text="10"),xr!==0&&xr!==1&&(rt.text+=""+(xr>0?"":D)+zr+""),rt.fontSize*=1.25):(Lr==="e"||Lr==="E")&&zr>2?rt.text=Er[0]+Lr+(xr>0?"+":D)+zr:(rt.text=qt(Math.pow(10,Dr),lt,"","fakehover"),Ir==="D1"&<._id.charAt(0)==="y"&&(rt.dy-=rt.fontSize/6))}else if(kt==="D")rt.text=lt.minorloglabels==="none"?"":String(Math.round(Math.pow(10,l.mod(Dr,1)))),rt.fontSize*=.75;else throw"unrecognized dtick "+String(Ir);if(lt.dtick==="D1"){var aa=String(rt.text).charAt(0);(aa==="0"||aa==="1")&&(lt._id.charAt(0)==="y"?rt.dx-=rt.fontSize/4:(rt.dy+=rt.fontSize/2,rt.dx+=(lt.range[1]>lt.range[0]?1:-1)*rt.fontSize*(Dr<0?.5:.25)))}}function ht(lt,rt){var fr=lt._categories[Math.round(rt.x)];fr===void 0&&(fr=""),rt.text=String(fr)}function De(lt,rt,fr){var lr=Math.round(rt.x),Tr=lt._categories[lr]||[],Ir=Tr[1]===void 0?"":String(Tr[1]),Dr=Tr[0]===void 0?"":String(Tr[0]);fr?rt.text=Dr+" - "+Ir:(rt.text=Ir,rt.text2=Dr)}function Ne(lt,rt,fr,lr,Tr){Tr==="never"?Tr="":lt.showexponent==="all"&&Math.abs(rt.x/lt.dtick)<1e-6&&(Tr="hide"),rt.text=qt(rt.x,lt,Tr,lr)}function We(lt,rt,fr,lr,Tr){if(lt.thetaunit==="radians"&&!fr){var Ir=rt.x/180;if(Ir===0)rt.text="0";else{var Dr=Ke(Ir);if(Dr[1]>=100)rt.text=qt(l.deg2rad(rt.x),lt,Tr,lr);else{var ot=rt.x<0;Dr[1]===1?Dr[0]===1?rt.text="\u03C0":rt.text=Dr[0]+"\u03C0":rt.text=["",Dr[0],"","\u2044","",Dr[1],"","\u03C0"].join(""),ot&&(rt.text=D+rt.text)}}}else rt.text=qt(rt.x,lt,Tr,lr)}function Ke(lt){function rt(ot,kt){return Math.abs(ot-kt)<=1e-6}function fr(ot,kt){return rt(kt,0)?ot:fr(kt,ot%kt)}function lr(ot){for(var kt=1;!rt(Math.round(ot*kt)/kt,ot);)kt*=10;return kt}var Tr=lr(lt),Ir=lt*Tr,Dr=Math.abs(fr(Ir,Tr));return[Math.round(Ir/Dr),Math.round(Tr/Dr)]}var Je=["f","p","n","\u03BC","m","","k","M","G","T"],et=["q","r","y","z","a",...Je,"P","E","Z","Y","R","Q"],Mt=lt=>["SI","SI extended","B"].includes(lt);function pt(lt){return lt>14||lt<-15}function Pt(lt){return lt>32||lt<-30}function Ct(lt,rt){return Mt(rt)?!!(rt==="SI extended"&&Pt(lt)||rt!=="SI extended"&&pt(lt)):!1}function qt(lt,rt,fr,lr){var Tr=lt<0,Ir=rt._tickround,Dr=fr||rt.exponentformat||"B",ot=rt._tickexponent,kt=H.getTickFormat(rt),jt=rt.separatethousands;if(lr){var ar={exponentformat:Dr,minexponent:rt.minexponent,dtick:rt.showexponent==="none"?rt.dtick:b(lt)&&Math.abs(lt)||1,range:rt.showexponent==="none"?rt.range.map(rt.r2d):[0,lt||1]};Xt(ar),Ir=(Number(ar._tickround)||0)+4,ot=ar._tickexponent,rt.hoverformat&&(kt=rt.hoverformat)}if(kt)return rt._numFormat(kt)(lt).replace(/-/g,D);Dr==="none"&&(ot=0),lt=Math.abs(lt);let Er=Math.pow(10,-Ir)/2;if(lt"+xr+"":Dr==="B"&&ot===9?lt+="B":Mt(Dr)&&(lt+=Dr==="SI extended"?et[ot/3+10]:Je[ot/3+5])}return Tr?D+lt:lt}H.getTickFormat=function(lt){var rt;function fr(kt){return typeof kt!="string"?kt:Number(kt.replace("M",""))*C}function lr(kt,jt){var ar=["L","D"];if(typeof kt==typeof jt){if(typeof kt=="number")return kt-jt;var Er=ar.indexOf(kt.charAt(0)),xr=ar.indexOf(jt.charAt(0));return Er===xr?Number(kt.replace(/(L|D)/g,""))-Number(jt.replace(/(L|D)/g,"")):Er-xr}else return typeof kt=="number"?1:-1}function Tr(kt,jt,ar){var Er=ar||function(Lr){return Lr},xr=jt[0],zr=jt[1];return(!xr&&typeof xr!="number"||Er(xr)<=Er(kt))&&(!zr&&typeof zr!="number"||Er(zr)>=Er(kt))}function Ir(kt,jt){var ar=jt[0]===null,Er=jt[1]===null,xr=lr(kt,jt[0])>=0,zr=lr(kt,jt[1])<=0;return(ar||xr)&&(Er||zr)}var Dr,ot;if(lt.tickformatstops&<.tickformatstops.length>0)switch(lt.type){case"date":case"linear":{for(rt=0;rt=0&&Tr.unshift(Tr.splice(ar,1).shift())}});var ot={false:{left:0,right:0}};return l.syncOrAsync(Tr.map(function(kt){return function(){if(kt){var jt=H.getFromId(lt,kt);fr||(fr={}),fr.axShifts=ot,fr.overlayingShiftedAx=Dr;var ar=H.drawOne(lt,jt,fr);return jt._shiftPusher&&Yi(jt,jt._fullDepth||0,ot,!0),jt._r=jt.range.slice(),jt._rl=l.simpleMap(jt._r,jt.r2l),ar}}}))},H.drawOne=function(lt,rt,fr){fr=fr||{};var lr=fr.axShifts||{},Tr=fr.overlayingShiftedAx||[],Ir,Dr,ot;rt.setScale();var kt=lt._fullLayout,jt=rt._id,ar=jt.charAt(0),Er=H.counterLetter(jt),xr=kt._plots[rt._mainSubplot],zr=rt.zerolinelayer==="above traces";if(!xr)return;if(rt._shiftPusher=rt.autoshift||Tr.indexOf(rt._id)!==-1||Tr.indexOf(rt.overlaying)!==-1,rt._shiftPusher&rt.anchor==="free"){var Lr=rt.linewidth/2||0;rt.ticks==="inside"&&(Lr+=rt.ticklen),Yi(rt,Lr,lr,!0),Yi(rt,rt.shift||0,lr,!1)}(fr.skipTitle!==!0||rt._shift===void 0)&&(rt._shift=Ja(rt,lr));var aa=xr[ar+"axislayer"],Sa=rt._mainLinePosition,wa=Sa+=rt._shift,pn=rt._mainMirrorPosition,tn=rt._vals=H.calcTicks(rt),ai=[rt.mirror,wa,pn].join("_");for(Ir=0;Ir0?_o.bottom-Ts:0,Bo))));var Dl=0,hl=0;if(rt._shiftPusher&&(Dl=Math.max(Bo,_o.height>0?Vo==="l"?Ts-_o.left:_o.right-Ts:0),rt.title.text!==kt._dfltTitle[ar]&&(hl=(rt._titleStandoff||0)+(rt._titleScoot||0),Vo==="l"&&(hl+=Rr(rt))),rt._fullDepth=Math.max(Dl,hl)),rt.automargin){Pi={x:0,y:0,r:0,l:0,t:0,b:0};var ps=[0,1],dl=typeof rt._shift=="number"?rt._shift:0;if(ar==="x"){if(Vo==="b"?Pi[Vo]=rt._depth:(Pi[Vo]=rt._depth=Math.max(_o.width>0?Ts-_o.top:0,Bo),ps.reverse()),_o.width>0){var wu=_o.right-(rt._offset+rt._length);wu>0&&(Pi.xr=1,Pi.r=wu);var lu=rt._offset-_o.left;lu>0&&(Pi.xl=0,Pi.l=lu)}}else if(Vo==="l"?(rt._depth=Math.max(_o.height>0?Ts-_o.left:0,Bo),Pi[Vo]=rt._depth-dl):(rt._depth=Math.max(_o.height>0?_o.right-Ts:0,Bo),Pi[Vo]=rt._depth+dl,ps.reverse()),_o.height>0){var xc=_o.bottom-(rt._offset+rt._length);xc>0&&(Pi.yb=0,Pi.b=xc);var Fl=rt._offset-_o.top;Fl>0&&(Pi.yt=1,Pi.t=Fl)}Pi[Er]=rt.anchor==="free"?rt.position:rt._anchorAxis.domain[ps[0]],rt.title.text!==kt._dfltTitle[ar]&&(Pi[Vo]+=Rr(rt)+(rt.title.standoff||0)),rt.mirror&&rt.anchor!=="free"&&(yo={x:0,y:0,r:0,l:0,t:0,b:0},yo[Vs]=rt.linewidth,rt.mirror&&rt.mirror!==!0&&(yo[Vs]+=Bo),rt.mirror===!0||rt.mirror==="ticks"?yo[Er]=rt._anchorAxis.domain[ps[1]]:(rt.mirror==="all"||rt.mirror==="allticks")&&(yo[Er]=[rt._counterDomainMin,rt._counterDomainMax][ps[1]]))}Ss&&(bs=k.getComponentMethod("rangeslider","autoMarginOpts")(lt,rt)),typeof rt.automargin=="string"&&(Vt(Pi,rt.automargin),Vt(yo,rt.automargin)),E.autoMargin(lt,un(rt),Pi),E.autoMargin(lt,Xa(rt),yo),E.autoMargin(lt,ja(rt),bs)}),l.syncOrAsync(Uo)}};function Vt(lt,rt){if(lt){var fr=Object.keys(Q).reduce(function(lr,Tr){return rt.indexOf(Tr)!==-1&&Q[Tr].forEach(function(Ir){lr[Ir]=1}),lr},{});Object.keys(lt).forEach(function(lr){fr[lr]||(lr.length===1?lt[lr]=0:delete lt[lr])})}}function Ht(lt,rt){var fr=[],lr,Tr=function(Ir,Dr){var ot=Ir.xbnd[Dr];ot!==null&&fr.push(l.extendFlat({},Ir,{x:ot}))};if(rt.length){for(lr=0;lrlt.range[1],ot=lt.ticklabelposition&<.ticklabelposition.indexOf("inside")!==-1,kt=!ot;if(fr){var jt=Dr?-1:1;fr=fr*jt}if(lr){var ar=lt.side,Er=ot&&(ar==="top"||ar==="left")||kt&&(ar==="bottom"||ar==="right")?1:-1;lr=lr*Er}return lt._id.charAt(0)==="x"?function(xr){return e(Tr+lt._offset+lt.l2p(Rt(xr))+fr,Ir+lr)}:function(xr){return e(Ir+lr,Tr+lt._offset+lt.l2p(Rt(xr))+fr)}};function Rt(lt){return lt.periodX!==void 0?lt.periodX:lt.x}function nr(lt){var rt=lt.ticklabelposition||"",fr=lt.tickson||"",lr=function(Lr){return rt.indexOf(Lr)!==-1},Tr=lr("top"),Ir=lr("left"),Dr=lr("right"),ot=lr("bottom"),kt=lr("inside"),jt=fr!=="boundaries"&&(ot||Ir||Tr||Dr);if(!jt&&!kt)return[0,0];var ar=lt.side,Er=jt?(lt.tickwidth||0)/2:0,xr=K,zr=lt.tickfont?lt.tickfont.size:12;return(ot||Tr)&&(Er+=zr*se,xr+=(lt.linewidth||0)/2),(Ir||Dr)&&(Er+=(lt.linewidth||0)/2,xr+=K),kt&&ar==="top"&&(xr-=zr*(1-se)),(Ir||Tr)&&(Er=-Er),(ar==="bottom"||ar==="right")&&(xr=-xr),[jt?Er:0,kt?xr:0]}H.makeTickPath=function(lt,rt,fr,lr){lr||(lr={});var Tr=lr.minor;if(Tr&&!lt.minor)return"";var Ir=lr.len!==void 0?lr.len:Tr?lt.minor.ticklen:lt.ticklen,Dr=lt._id.charAt(0),ot=(lt.linewidth||1)/2;return Dr==="x"?"M0,"+(rt+ot*fr)+"v"+Ir*fr:"M"+(rt+ot*fr)+",0h"+Ir*fr},H.makeLabelFns=function(lt,rt,fr){var lr=lt.ticklabelposition||"",Tr=lt.tickson||"",Ir=function(Xn){return lr.indexOf(Xn)!==-1},Dr=Ir("top"),ot=Ir("left"),kt=Ir("right"),jt=Ir("bottom"),ar=Tr!=="boundaries"&&(jt||ot||Dr||kt),Er=Ir("inside"),xr=lr==="inside"&<.ticks==="inside"||!Er&<.ticks==="outside"&&Tr!=="boundaries",zr=0,Lr=0,aa=xr?lt.ticklen:0;if(Er?aa*=-1:ar&&(aa=0),xr&&(zr+=aa,fr)){var Sa=l.deg2rad(fr);zr=aa*Math.cos(Sa)+1,Lr=aa*Math.sin(Sa)}lt.showticklabels&&(xr||lt.showline)&&(zr+=.2*lt.tickfont.size),zr+=(lt.linewidth||1)/2*(Er?-1:1);var wa={labelStandoff:zr,labelShift:Lr},pn,tn,ai,rn,Ri=0,Gn=lt.side,no=lt._id.charAt(0),Di=lt.tickangle,fn;if(no==="x")fn=!Er&&Gn==="bottom"||Er&&Gn==="top",rn=fn?1:-1,Er&&(rn*=-1),pn=Lr*rn,tn=rt+zr*rn,ai=fn?1:-.2,Math.abs(Di)===90&&(Er?ai+=ne:Di===-90&&Gn==="bottom"?ai=se:Di===90&&Gn==="top"?ai=ne:ai=.5,Ri=ne/2*(Di/90)),wa.xFn=function(Xn){return Xn.dx+pn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ai},wa.anchorFn=function(Xn,eo){if(ar){if(ot)return"end";if(kt)return"start"}return!b(eo)||eo===0||eo===180?"middle":eo*rn<0!==Er?"end":"start"},wa.heightFn=function(Xn,eo,gi){return eo<-60||eo>60?-.5*gi:lt.side==="top"!==Er?-gi:0};else if(no==="y"){if(fn=!Er&&Gn==="left"||Er&&Gn==="right",rn=fn?1:-1,Er&&(rn*=-1),pn=zr,tn=Lr*rn,ai=0,!Er&&Math.abs(Di)===90&&(Di===-90&&Gn==="left"||Di===90&&Gn==="right"?ai=se:ai=.5),Er){var Ai=b(Di)?+Di:0;if(Ai!==0){var jn=l.deg2rad(Ai);Ri=Math.abs(Math.sin(jn))*se*rn,ai=0}}wa.xFn=function(Xn){return Xn.dx+rt-(pn+Xn.fontSize*ai)*rn+Ri*Xn.fontSize},wa.yFn=function(Xn){return Xn.dy+tn+Xn.fontSize*ne},wa.anchorFn=function(Xn,eo){return b(eo)&&Math.abs(eo)===90?"middle":fn?"end":"start"},wa.heightFn=function(Xn,eo,gi){return lt.side==="right"&&(eo*=-1),eo<-30?-gi:eo<30?-.5*gi:0}}return wa};function ur(lt){return[lt.text,lt.x,lt.axInfo,lt.font,lt.fontSize,lt.fontColor].join("_")}H.drawTicks=function(lt,rt,fr){fr=fr||{};var lr=rt._id+"tick",Tr=[].concat(rt.minor&&rt.minor.ticks?fr.vals.filter(function(Dr){return Dr.minor&&!Dr.noTick}):[]).concat(rt.ticks?fr.vals.filter(function(Dr){return!Dr.minor&&!Dr.noTick}):[]),Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("ticks",1).classed("crisp",fr.crisp!==!1).each(function(Dr){return r.stroke(p.select(this),Dr.minor?rt.minor.tickcolor:rt.tickcolor)}).style("stroke-width",function(Dr){return a.crispRound(lt,Dr.minor?rt.minor.tickwidth:rt.tickwidth,1)+"px"}).attr("d",fr.path).style("display",null),vi(rt,[U]),Ir.attr("transform",fr.transFn)},H.drawGrid=function(lt,rt,fr){if(fr=fr||{},rt.tickmode!=="sync"){var lr=rt._id+"grid",Tr=rt.minor&&rt.minor.showgrid,Ir=Tr?fr.vals.filter(function(wa){return wa.minor}):[],Dr=rt.showgrid?fr.vals.filter(function(wa){return!wa.minor}):[],ot=fr.counterAxis;if(ot&&H.shouldShowZeroLine(lt,rt,ot))for(var kt=rt.tickmode==="array",jt=0;jt=0;Lr--){var aa=Lr?xr:zr;if(aa){var Sa=aa.selectAll("path."+lr).data(Lr?Dr:Ir,ur);Sa.exit().remove(),Sa.enter().append("path").classed(lr,1).classed("crisp",fr.crisp!==!1),Sa.attr("transform",fr.transFn).attr("d",fr.path).each(function(wa){return r.stroke(p.select(this),wa.minor?rt.minor.gridcolor:rt.gridcolor||"#ddd")}).style("stroke-dasharray",function(wa){return a.dashStyle(wa.minor?rt.minor.griddash:rt.griddash,wa.minor?rt.minor.gridwidth:rt.gridwidth)}).style("stroke-width",function(wa){return(wa.minor?Er:rt._gw)+"px"}).style("display",null),typeof fr.path=="function"&&Sa.attr("d",fr.path)}}vi(rt,[P,j])}},H.drawZeroLine=function(lt,rt,fr){fr=fr||fr;var lr=rt._id+"zl",Tr=H.shouldShowZeroLine(lt,rt,fr.counterAxis),Ir=fr.layer.selectAll("path."+lr).data(Tr?[{x:0,id:rt._id}]:[]);Ir.exit().remove(),Ir.enter().append("path").classed(lr,1).classed("zl",1).classed("crisp",fr.crisp!==!1).each(function(){fr.layer.selectAll("path").sort(function(Dr,ot){return Z(Dr.id,ot.id)})}),Ir.attr("transform",fr.transFn).attr("d",fr.path).call(r.stroke,rt.zerolinecolor||r.defaultLine).style("stroke-width",a.crispRound(lt,rt.zerolinewidth,rt._gw||1)+"px").style("display",null),vi(rt,[F])},H.drawLabels=function(lt,rt,fr){fr=fr||{};var lr=lt._fullLayout,Tr=rt._id,Ir=rt.zerolinelayer==="above traces",Dr=fr.cls||Tr+"tick",ot=fr.vals.filter(function(Vn){return Vn.text}),kt=fr.labelFns,jt=fr.secondary?0:rt.tickangle,ar=(rt._prevTickAngles||{})[Dr],Er=fr.layer.selectAll("g."+Dr).data(rt.showticklabels?ot:[],ur),xr=[];Er.enter().append("g").classed(Dr,1).append("text").attr("text-anchor","middle").each(function(Vn){var qn=p.select(this),Hi=lt._promises.length;qn.call(t.positionText,kt.xFn(Vn),kt.yFn(Vn)).call(a.font,{family:Vn.font,size:Vn.fontSize,color:Vn.fontColor,weight:Vn.fontWeight,style:Vn.fontStyle,variant:Vn.fontVariant,textcase:Vn.fontTextcase,lineposition:Vn.fontLineposition,shadow:Vn.fontShadow}).text(Vn.text).call(t.convertToTspans,lt),lt._promises[Hi]?xr.push(lt._promises.pop().then(function(){zr(qn,jt)})):zr(qn,jt)}),vi(rt,[$]),Er.exit().remove(),fr.repositionOnUpdate&&Er.each(function(Vn){p.select(this).select("text").call(t.positionText,kt.xFn(Vn),kt.yFn(Vn))});function zr(Vn,qn){Vn.each(function(Hi){var Mi=p.select(this),Ro=Mi.select(".text-math-group"),go=kt.anchorFn(Hi,qn),Eo=fr.transFn.call(Mi.node(),Hi)+(b(qn)&&+qn!=0?" rotate("+qn+","+kt.xFn(Hi)+","+(kt.yFn(Hi)-Hi.fontSize/2)+")":""),Ao=t.lineCount(Mi),ds=G*Hi.fontSize,jo=kt.heightFn(Hi,b(qn)?+qn:0,(Ao-1)*ds);if(jo&&(Eo+=e(0,jo)),Ro.empty()){var Wo=Mi.select("text");Wo.attr({transform:Eo,"text-anchor":go}),Wo.style("display",null),rt._adjustTickLabelsOverflow&&rt._adjustTickLabelsOverflow()}else{var to=a.bBox(Ro.node()).width,wo=to*{end:-.5,start:.5}[go];Ro.attr("transform",Eo+e(wo,0))}})}rt._adjustTickLabelsOverflow=function(){var Vn=rt.ticklabeloverflow;if(!(!Vn||Vn==="allow")){var qn=Vn.indexOf("hide")!==-1,Hi=rt._id.charAt(0)==="x",Mi=0,Ro=Hi?lt._fullLayout.width:lt._fullLayout.height;if(Vn.indexOf("domain")!==-1){var go=l.simpleMap(rt.range,rt.r2l);Mi=rt.l2p(go[0])+rt._offset,Ro=rt.l2p(go[1])+rt._offset}var Eo=Math.min(Mi,Ro),Ao=Math.max(Mi,Ro),ds=rt.side,jo=1/0,Wo=-1/0;Er.each(function(Vi){var Io=p.select(this),Xi=Io.select(".text-math-group");if(Xi.empty()){var Ko=a.bBox(Io.node()),Uo=0;Hi?(Ko.right>Ao||Ko.leftAo||Ko.top+(rt.tickangle?0:Vi.fontSize/4)rt["_visibleLabelMin_"+go._id]?Io.style("display","none"):Ao.K==="tick"&&!Eo&&Io.node().style.display!=="none"&&Io.style("display",null)})})})})},zr(Er,ar+1?ar:jt);function Lr(){return xr.length&&Promise.all(xr)}var aa=null;function Sa(){if(zr(Er,jt),ot.length&&rt.autotickangles&&(rt.type!=="log"||String(rt.dtick).charAt(0)!=="D")){aa=rt.autotickangles[0];var Vn=0,qn=[],Hi,Mi=1;Er.each(function(Pi){Vn=Math.max(Vn,Pi.fontSize);var yo=rt.l2p(Pi.x),bs=La(this),Dl=a.bBox(bs.node());Mi=Math.max(Mi,t.lineCount(bs)),qn.push({top:0,bottom:10,height:10,left:yo-Dl.width/2,right:yo+Dl.width/2+2,width:Dl.width+2})});var Ro=(rt.tickson==="boundaries"||rt.showdividers)&&!fr.secondary,go=ot.length,Eo=Math.abs((ot[go-1].x-ot[0].x)*rt._m)/(go-1),Ao=Ro?Eo/2:Eo,ds=Ro?rt.ticklen:Vn*1.25*Mi,jo=Math.sqrt(Math.pow(Ao,2)+Math.pow(ds,2)),Wo=Ao/jo,to=rt.autotickangles.map(function(Pi){return Pi*Math.PI/180}),wo=to.find(function(Pi){return Math.abs(Math.cos(Pi))<=Wo});wo===void 0&&(wo=to.reduce(function(Pi,yo){return Math.abs(Math.cos(Pi))qi*gi&&(jn=gi,Di[no]=fn[no]=Xn[no])}var io=Math.abs(jn-Ai);io-rn>0?(io-=rn,rn*=1+rn/io):rn=0,rt._id.charAt(0)!=="y"&&(rn=-rn),Di[Gn]=tn.p2r(tn.r2p(fn[Gn])+Ri*rn),tn.autorange==="min"||tn.autorange==="max reversed"?(Di[0]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0):(tn.autorange==="max"||tn.autorange==="min reversed")&&(Di[1]=null,tn._rangeInitial0=void 0,tn._rangeInitial1=void 0),lr._insideTickLabelsUpdaterange[tn._name+".range"]=Di}var oo=l.syncOrAsync(wa);return oo&&oo.then&<._promises.push(oo),oo};function cr(lt,rt,fr){var lr=rt._id+"divider",Tr=fr.vals,Ir=fr.layer.selectAll("path."+lr).data(Tr,ur);Ir.exit().remove(),Ir.enter().insert("path",":first-child").classed(lr,1).classed("crisp",1).call(r.stroke,rt.dividercolor).style("stroke-width",a.crispRound(lt,rt.dividerwidth,1)+"px"),Ir.attr("transform",fr.transFn).attr("d",fr.path)}H.getPxPosition=function(lt,rt){var fr=lt._fullLayout._size,lr=rt._id.charAt(0),Tr=rt.side,Ir;if(rt.anchor!=="free"?Ir=rt._anchorAxis:lr==="x"?Ir={_offset:fr.t+(1-(rt.position||0))*fr.h,_length:0}:lr==="y"&&(Ir={_offset:fr.l+(rt.position||0)*fr.w+rt._shift,_length:0}),Tr==="top"||Tr==="left")return Ir._offset;if(Tr==="bottom"||Tr==="right")return Ir._offset+Ir._length};function Rr(lt){var rt=lt.title.font.size,fr=(lt.title.text.match(t.BR_TAG_ALL)||[]).length;return lt.title.hasOwnProperty("standoff")?rt*(se+fr*G):fr?rt*(fr+1)*G:rt}function Qr(lt,rt){var fr=lt._fullLayout,lr=rt._id,Tr=lr.charAt(0),Ir=rt.title.font.size,Dr,ot=(rt.title.text.match(t.BR_TAG_ALL)||[]).length;if(rt.title.hasOwnProperty("standoff"))rt.side==="bottom"||rt.side==="right"?Dr=rt._depth+rt.title.standoff+Ir*se:(rt.side==="top"||rt.side==="left")&&(Dr=rt._depth+rt.title.standoff+Ir*(ne+ot*G));else{var kt=en(rt);if(rt.type==="multicategory")Dr=rt._depth;else{var jt=1.5*Ir;kt&&(jt=.5*Ir,rt.ticks==="outside"&&(jt+=rt.ticklen)),Dr=10+jt+(rt.linewidth?rt.linewidth-1:0)}kt||(Tr==="x"?Dr+=rt.side==="top"?Ir*(rt.showticklabels?1:0):Ir*(rt.showticklabels?1.5:.5):Dr+=rt.side==="right"?Ir*(rt.showticklabels?1:.5):Ir*(rt.showticklabels?.5:0))}var ar=H.getPxPosition(lt,rt),Er,xr,zr;Tr==="x"?(xr=rt._offset+rt._length/2,zr=rt.side==="top"?ar-Dr:ar+Dr):(zr=rt._offset+rt._length/2,xr=rt.side==="right"?ar+Dr:ar-Dr,Er={rotate:"-90",offset:0});var Lr;if(rt.type!=="multicategory"){var aa=rt._selections[rt._id+"tick"];if(Lr={selection:aa,side:rt.side},aa&&aa.node()&&aa.node().parentNode){var Sa=a.getTranslate(aa.node().parentNode);Lr.offsetLeft=Sa.x,Lr.offsetTop=Sa.y}rt.title.hasOwnProperty("standoff")&&(Lr.pad=0)}return rt._titleStandoff=Dr,n.draw(lt,lr+"title",{propContainer:rt,propName:rt._name+".title.text",placeholder:fr._dfltTitle[Tr],avoid:Lr,transform:Er,attributes:{x:xr,y:zr,"text-anchor":"middle"}})}H.shouldShowZeroLine=function(lt,rt,fr){var lr=l.simpleMap(rt.range,rt.r2l);return lr[0]*lr[1]<=0&&rt.zeroline&&(rt.type==="linear"||rt.type==="-")&&!(rt.rangebreaks&&rt.maskBreaks(0)===B)&&(Zr(rt,0)||!ha(lt,rt,fr,lr)||Pa(lt,rt))},H.clipEnds=function(lt,rt){return rt.filter(function(fr){return Zr(lt,fr.x)})};function Zr(lt,rt){var fr=lt.l2p(rt);return fr>1&&fr1)for(Tr=1;Tr=Tr.min&<=O:/%L/.test(rt)?lt>=I:/%[SX]/.test(rt)?lt>=z:/%M/.test(rt)?lt>=x:/%[HI]/.test(rt)?lt>=A:/%p/.test(rt)?lt>=u:/%[Aadejuwx]/.test(rt)?lt>=f:/%[UVW]/.test(rt)?lt>=T:/%[Bbm]/.test(rt)?lt>=_:/%[q]/.test(rt)?lt>=S:/%[Yy]/.test(rt)?lt>=g:!0}}}),Jw=ze({"src/plots/cartesian/autorange_options_defaults.js"(J,V){"use strict";V.exports=function(b,E,k){var l,e;if(k){var t=E==="reversed"||E==="min reversed"||E==="max reversed";l=k[t?1:0],e=k[t?0:1]}var n=b("autorangeoptions.minallowed",e===null?l:void 0),r=b("autorangeoptions.maxallowed",l===null?e:void 0);n===void 0&&b("autorangeoptions.clipmin"),r===void 0&&b("autorangeoptions.clipmax"),b("autorangeoptions.include")}}}),Qw=ze({"src/plots/cartesian/range_defaults.js"(J,V){"use strict";var p=Jw();V.exports=function(E,k,l,e){var t=k._template||{},n=k.type||t.type||"-";l("minallowed"),l("maxallowed");var r=l("range");if(!r){var a;!e.noInsiderange&&n!=="log"&&(a=l("insiderange"),a&&(a[0]===null||a[1]===null)&&(k.insiderange=!1,a=void 0),a&&(r=l("range",a)))}var o=k.getAutorangeDflt(r,e),s=l("autorange",o),c;r&&(r[0]===null&&r[1]===null||(r[0]===null||r[1]===null)&&(s==="reversed"||s===!0)||r[0]!==null&&(s==="min"||s==="max reversed")||r[1]!==null&&(s==="max"||s==="min reversed"))&&(r=void 0,delete k.range,k.autorange=!0,c=!0),c||(o=k.getAutorangeDflt(r,e),s=l("autorange",o)),s&&(p(l,s,r),(n==="linear"||n==="-")&&l("rangemode")),k.cleanRange()}}}),VI=ze({"node_modules/mouse-event-offset/index.js"(J,V){var p={left:0,top:0};V.exports=b;function b(k,l,e){l=l||k.currentTarget||k.srcElement,Array.isArray(e)||(e=[0,0]);var t=k.clientX||0,n=k.clientY||0,r=E(l);return e[0]=t-r.left,e[1]=n-r.top,e}function E(k){return k===window||k===document||k===document.body?p:k.getBoundingClientRect()}}}),Rx=ze({"node_modules/has-passive-events/index.js"(J,V){"use strict";var p=Vw();function b(){var E=!1;try{var k=Object.defineProperty({},"passive",{get:function(){E=!0}});window.addEventListener("test",null,k),window.removeEventListener("test",null,k)}catch{E=!1}return E}V.exports=p&&b()}}),GI=ze({"src/components/dragelement/align.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=(b-k)/(l-k),n=t+E/(l-k),r=(t+n)/2;return e==="left"||e==="bottom"?t:e==="center"||e==="middle"?r:e==="right"||e==="top"?n:t<2/3-r?t:n>4/3-r?n:r}}}),HI=ze({"src/components/dragelement/cursor.js"(J,V){"use strict";var p=Nr(),b=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];V.exports=function(k,l,e,t){return e==="left"?k=0:e==="center"?k=1:e==="right"?k=2:k=p.constrain(Math.floor(k*3),0,2),t==="bottom"?l=0:t==="middle"?l=1:t==="top"?l=2:l=p.constrain(Math.floor(l*3),0,2),b[l][k]}}}),WI=ze({"src/components/dragelement/unhover.js"(J,V){"use strict";var p=Hm(),b=Cx(),E=i1().getGraphDiv,k=a1(),l=V.exports={};l.wrapped=function(e,t,n){var r;e=E(e),e._fullLayout&&b.clear(e._fullLayout._uid+k.HOVERID);let a=e._hoverdata;l.raw(e,t,n)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(r=e._fullLayout)!=null&&r.hoveranywhere&&t?.target&&!a&&e.emit("plotly_unhover",{event:t,points:[]}))},l.raw=function(t,n){var r=t._fullLayout,a=t._hoverdata;return n||(n={}),n.target&&!t._dragged&&p.triggerHandler(t,"plotly_beforehover",n)===!1?!1:(r._hoverlayer.selectAll("g").remove(),r._hoverlayer.selectAll("line").remove(),r._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,n.target&&a&&t.emit("plotly_unhover",{event:n,points:a}),!0)}}}),_h=ze({"src/components/dragelement/index.js"(J,V){"use strict";var p=VI(),b=Gw(),E=Rx(),k=Nr().removeElement,l=hc(),e=V.exports={};e.align=GI(),e.getCursor=HI();var t=WI();e.unhover=t.wrapped,e.unhoverRaw=t.raw,e.init=function(o){var s=o.gd,c=1,m=s._context.doubleClickDelay,h=o.element,v,g,i,w,S,M,C,_;s._mouseDownTime||(s._mouseDownTime=0),h.style.pointerEvents="all",h.onmousedown=u,E?(h._ontouchstart&&h.removeEventListener("touchstart",h._ontouchstart),h._ontouchstart=u,h.addEventListener("touchstart",u,{passive:!1})):h.ontouchstart=u;function T(z,I,O){return Math.abs(z)"u"&&typeof z.clientY>"u"&&(z.clientX=v,z.clientY=g),i=new Date().getTime(),i-s._mouseDownTimem&&(c=Math.max(c-1,1)),s._dragged)o.doneFn&&o.doneFn();else{var I;M.target===C?I=M:(I={target:C,srcElement:C,toElement:C},Object.keys(M).concat(Object.keys(M.__proto__)).forEach(O=>{var D=M[O];!I[O]&&typeof D!="function"&&(I[O]=D)})),o.clickFn&&o.clickFn(c,I),_||C.dispatchEvent(new MouseEvent("click",z))}s._dragging=!1,s._dragged=!1}};function n(){var a=document.createElement("div");a.className="dragcover";var o=a.style;return o.position="fixed",o.left=0,o.right=0,o.top=0,o.bottom=0,o.zIndex=999999999,o.background="none",document.body.appendChild(a),a}e.coverSlip=n;function r(a){return p(a.changedTouches?a.changedTouches[0]:a,document.body)}}}),gd=ze({"src/lib/setcursor.js"(J,V){"use strict";V.exports=function(b,E){(b.attr("class")||"").split(" ").forEach(function(k){k.indexOf("cursor-")===0&&b.classed(k,!1)}),E&&b.classed("cursor-"+E,!0)}}}),YI=ze({"src/lib/override_cursor.js"(J,V){"use strict";var p=gd(),b="data-savedcursor",E="!!";V.exports=function(l,e){var t=l.attr(b);if(e){if(!t){for(var n=(l.attr("class")||"").split(" "),r=0;rX.legend.length)for(var Y=X.legend.length;Y(r==="legend"?1:0));if(O===!1&&(o[r]=void 0),!(O===!1&&!m.uirevision)&&(v("uirevision",o.uirevision),O!==!1)){v("borderwidth");var D=v("orientation"),B=v("yref"),F=v("xref"),P=D==="h",j=B==="paper",U=F==="paper",$,Q,re,ne="left";P?($=0,p.getComponentMethod("rangeslider","isVisible")(a.xaxis)?j?(Q=1.1,re="bottom"):(Q=1,re="top"):j?(Q=-.1,re="top"):(Q=0,re="bottom")):(Q=1,re="auto",U?$=1.02:($=1,ne="right")),b.coerce(m,h,{x:{valType:"number",editType:"legend",min:U?-2:0,max:U?3:1,dflt:$}},"x"),b.coerce(m,h,{y:{valType:"number",editType:"legend",min:j?-2:0,max:j?3:1,dflt:Q}},"y"),v("traceorder",f),t.isGrouped(o[r])&&v("tracegroupgap"),v("entrywidth"),v("entrywidthmode"),v("indentation"),v("itemsizing"),v("itemwidth"),v("itemclick"),v("itemdoubleclick"),v("groupclick"),v("xanchor",ne),v("yanchor",re),v("maxheight"),v("valign"),b.noneOrAll(m,h,["x","y"]);var se=v("title.text");if(se){v("title.side",P?"left":"top");var G=b.extendFlat({},g,{size:b.bigFont(g.size)});b.coerceFont(v,"title.font",G);let X=c>1;v("titleclick",X?"toggle":!1),v("titledoubleclick",X?"toggleothers":!1)}}}V.exports=function(a,o,s){var c,m=s.slice(),h=o.shapes;if(h)for(c=0;cVe.showlegend||Ve.legendgroup);var g=h.concat(v),i=o.trace;i._isShape&&(i=a.shapes[i.index]);var w=i.legendgroup,S,M,C,_,T,f,u={},A=[],x=[],z=[];function I(Ve,Ge){var ke=A.indexOf(Ve),_e=u.visible;return _e||(_e=u.visible=[]),A.indexOf(Ve)===-1&&(A.push(Ve),ke=A.length-1),_e[ke]=Ge,ke}var O=(a.shapes||[]).map(function(Ve){return Ve._input}),D=!1;function B(Ve,Ge){O[Ve].visible=Ge,D=!0}function F(Ve,Ge){if(!(o.groupTitle&&!c)){var ke=Ve._isShape,_e=Ve.index;_e===void 0&&(_e=Ve._index);var ce=Ve.visible===!1?!1:Ge;ke?B(_e,ce):I(_e,ce)}}var P=i.legend;if(!i._isShape&&V.traceIs(i,"pie-like")){var j=o.label,U=m.indexOf(j);if(r==="toggle")U===-1?m.push(j):m.splice(U,1);else if(r==="toggleothers"){var $=U!==-1,Q=[];for(S=0;SC.showlegend||C.legendgroup),c=a.concat(s);function m(C){return(C.legend||"legend")===o}var h,v;if(n==="toggle")h=!c.some(function(_){return m(_)&&_.visible===!0}),v=!1;else{let C=c.some(function(_){return!m(_)&&_.visible===!0&&_.showlegend!==!1});h=!0,v=!C}let g={visible:[]},i=[],w=(r.shapes||[]).map(function(C){return C._input});for(var S=!1,M=0;MB&&(O=B)}z[g][0]._groupMinRank=O,z[g][0]._preGroupSort=g}var F=function(re,ne){return re[0]._groupMinRank-ne[0]._groupMinRank||re[0]._preGroupSort-ne[0]._preGroupSort},P=function(re,ne){var se=p(re.trace.legendrank)?re.trace.legendrank[re.i]:re.trace.legendrank,G=p(ne.trace.legendrank)?ne.trace.legendrank[ne.i]:ne.trace.legendrank;return se-G||re._preSort-ne._preSort};for(z.forEach(function(re,ne){re[0]._preGroupSort=ne}),z.sort(F),g=0;g0)Y=X.width;else return 0;return f?H:Math.min(Y,K)};M.each(function(G){var X=p.select(this),K=E.ensureSingle(X,"g","layers");K.style("opacity",G[0].trace.opacity);var H=_.indentation,Y=_.valign,q=G[0].lineHeight,Z=G[0].height;if(Y==="middle"&&H===0||!q||!Z)K.attr("transform",null);else{var ee={top:1,bottom:-1}[Y],ae=ee*(.5*(q-Z+3))||0,he=_.indentation;K.attr("transform",k(he,ae))}var xe=K.selectAll("g.legendfill").data([G]);xe.enter().append("g").classed("legendfill",!0);var we=K.selectAll("g.legendlines").data([G]);we.enter().append("g").classed("legendlines",!0);var Me=K.selectAll("g.legendsymbols").data([G]);Me.enter().append("g").classed("legendsymbols",!0),Me.selectAll("g.legendpoints").data([G]).enter().append("g").classed("legendpoints",!0)}).each(se).each(D).each(F).each(B).each(j).each(re).each(Q).each(I).each(O).each(U).each($);function I(G){var X=i(G),K=X.showFill,H=X.showLine,Y=X.showGradientLine,q=X.showGradientFill,Z=X.anyFill,ee=X.anyLine,ae=G[0],he=ae.trace,xe,we,Me=t(he),Se=Me.colorscale,Ie=Me.reversescale,Ve=function(Ae){if(Ae.size())if(K)l.fillGroupStyle(Ae,C,!0);else{var Be="legendfill-"+he.uid;l.gradient(Ae,C,Be,g(Ie),Se,"fill")}},Ge=function(Ae){if(Ae.size()){var Be="legendline-"+he.uid;l.lineGroupStyle(Ae),l.gradient(Ae,C,Be,g(Ie),Se,"stroke")}},ke=n.hasMarkers(he)||!Z?"M5,0":ee?"M5,-2":"M5,-3",_e=p.select(this),ce=_e.select(".legendfill").selectAll("path").data(K||q?[G]:[]);if(ce.enter().append("path").classed("js-fill",!0),ce.exit().remove(),ce.attr("d",ke+"h"+u+"v6h-"+u+"z").call(Ve),H||Y){var ve=z(void 0,he.line,h,c);we=E.minExtend(he,{line:{width:ve}}),xe=[E.minExtend(ae,{trace:we})]}var le=_e.select(".legendlines").selectAll("path").data(H||Y?[xe]:[]);le.enter().append("path").classed("js-line",!0),le.exit().remove(),le.attr("d",ke+(Y?"l"+u+",0.0001":"h"+u)).call(H?l.lineGroupStyle:Ge)}function O(G){var X=i(G),K=X.anyFill,H=X.anyLine,Y=X.showLine,q=X.showMarker,Z=G[0],ee=Z.trace,ae=!q&&!H&&!K&&n.hasText(ee),he,xe;function we(ve,le,Ae,Be){var Xe=E.nestedProperty(ee,ve).get(),Ye=E.isArrayOrTypedArray(Xe)&&le?le(Xe):Xe;if(f&&Ye&&Be!==void 0&&(Ye=Be),Ae){if(YeAe[1])return Ae[1]}return Ye}function Me(ve){return Z._distinct&&Z.index&&ve[Z.index]?ve[Z.index]:ve[0]}if(q||ae||Y){var Se={},Ie={};if(q){Se.mc=we("marker.color",Me);var Ve=ee.type==="scattermap";Se.mx=Ve?"circle":we("marker.symbol",Me),Se.mo=we("marker.opacity",E.mean,[.2,1]),Se.mlc=we("marker.line.color",Me),Se.mlw=we("marker.line.width",E.mean,[0,5],m),Se.mld=we("marker.line.dash",Me),Ie.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var Ge=we("marker.size",E.mean,[2,16],s);Se.ms=Ge,Ie.marker.size=Ge}Y&&(Ie.line={width:we("line.width",Me,[0,10],c)}),ae&&(Se.tx="Aa",Se.tp=we("textposition",Me),Se.ts=10,Se.tc=we("textfont.color",Me),Se.tf=we("textfont.family",Me),Se.tw=we("textfont.weight",Me),Se.ty=we("textfont.style",Me),Se.tv=we("textfont.variant",Me),Se.tC=we("textfont.textcase",Me),Se.tE=we("textfont.lineposition",Me),Se.tS=we("textfont.shadow",Me)),he=[E.minExtend(Z,Se)],xe=E.minExtend(ee,Ie),xe.selectedpoints=null,xe.texttemplate=null}var ke=p.select(this).select("g.legendpoints"),_e=ke.selectAll("path.scatterpts").data(q?he:[]);_e.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",x),_e.exit().remove(),_e.call(l.pointStyle,xe,C),q&&(he[0].mrc=3);var ce=ke.selectAll("g.pointtext").data(ae?he:[]);ce.enter().append("g").classed("pointtext",!0).append("text").attr("transform",x),ce.exit().remove(),ce.selectAll("text").call(l.textPointStyle,xe,C)}function D(G){var X=G[0].trace,K=X.type==="waterfall";if(G[0]._distinct&&K){var H=G[0].trace[G[0].dir].marker;return G[0].mc=H.color,G[0].mlw=H.line.width,G[0].mlc=H.line.color,P(G,this,"waterfall")}var Y=[];X.visible&&K&&(Y=G[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 q=p.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(Y);q.enter().append("path").classed("legendwaterfall",!0).attr("transform",x).style("stroke-miterlimit",1),q.exit().remove(),q.each(function(Z){var ee=p.select(this),ae=X[Z[0]].marker,he=z(void 0,ae.line,v,m);ee.attr("d",Z[1]).style("stroke-width",he+"px").call(e.fill,ae.color),he&&ee.call(e.stroke,ae.line.color)})}function B(G){P(G,this)}function F(G){P(G,this,"funnel")}function P(G,X,K){var H=G[0].trace,Y=H.marker||{},q=Y.line||{},Z=Y.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",ee=K?H.visible&&H.type===K:b.traceIs(H,"bar"),ae=p.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(ee?[G]:[]);ae.enter().append("path").classed("legend"+K,!0).attr("d",Z).attr("transform",x),ae.exit().remove(),ae.each(function(he){var xe=p.select(this),we=he[0],Me=z(we.mlw,Y.line,v,m);xe.style("stroke-width",Me+"px");var Se=we.mcc;if(!_._inHover&&"mc"in we){var Ie=t(Y),Ve=Ie.mid;Ve===void 0&&(Ve=(Ie.max+Ie.min)/2),Se=l.tryColorscale(Y,"")(Ve)}var Ge=Se||we.mc||Y.color,ke=Y.pattern,_e=l.getPatternAttr,ce=ke&&(_e(ke.shape,0,"")||_e(ke.path,0,""));if(ce){var ve=_e(ke.bgcolor,0,null),le=_e(ke.fgcolor,0,null),Ae=ke.fgopacity,Be=w(ke.size,8,10),Xe=w(ke.solidity,.5,1),Ye="legend-"+H.uid;xe.call(l.pattern,"legend",C,Ye,ce,Be,Xe,Se,ke.fillmode,ve,le,Ae)}else xe.call(e.fill,Ge);Me&&e.stroke(xe,we.mlc||q.color)})}function j(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendbox").data(X.visible&&b.traceIs(X,"box-violin")?[G]:[]);K.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),K.exit().remove(),K.each(function(){var H=p.select(this);if((X.boxpoints==="all"||X.points==="all")&&e.opacity(X.fillcolor)===0&&e.opacity((X.line||{}).color)===0){var Y=E.minExtend(X,{marker:{size:f?s:E.constrain(X.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});K.call(l.pointStyle,Y,C)}else{var q=z(void 0,X.line,v,m);H.style("stroke-width",q+"px").call(e.fill,X.fillcolor),q&&e.stroke(H,X.line.color)}})}function U(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(X.visible&&X.type==="candlestick"?[G,G]:[]);K.enter().append("path").classed("legendcandle",!0).attr("d",function(H,Y){return Y?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Y){var q=p.select(this),Z=X[Y?"increasing":"decreasing"],ee=z(void 0,Z.line,v,m);q.style("stroke-width",ee+"px").call(e.fill,Z.fillcolor),ee&&e.stroke(q,Z.line.color)})}function $(G){var X=G[0].trace,K=p.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(X.visible&&X.type==="ohlc"?[G,G]:[]);K.enter().append("path").classed("legendohlc",!0).attr("d",function(H,Y){return Y?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",x).style("stroke-miterlimit",1),K.exit().remove(),K.each(function(H,Y){var q=p.select(this),Z=X[Y?"increasing":"decreasing"],ee=z(void 0,Z.line,v,m);q.style("fill","none").call(l.dashLine,Z.line.dash,ee),ee&&e.stroke(q,Z.line.color)})}function Q(G){ne(G,this,"pie")}function re(G){ne(G,this,"funnelarea")}function ne(G,X,K){var H=G[0],Y=H.trace,q=K?Y.visible&&Y.type===K:b.traceIs(Y,K),Z=p.select(X).select("g.legendpoints").selectAll("path.legend"+K).data(q?[G]:[]);if(Z.enter().append("path").classed("legend"+K,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",x),Z.exit().remove(),Z.size()){var ee=Y.marker||{},ae=z(a(ee.line.width,H.pts),ee.line,v,m),he="pieLike",xe=E.minExtend(Y,{marker:{line:{width:ae}}},he),we=E.minExtend(H,{trace:xe},he);r(Z,we,xe,C)}}function se(G){var X=G[0].trace,K,H=[];if(X.visible)switch(X.type){case"histogram2d":case"heatmap":H=[["M-15,-2V4H15V-2Z"]],K=!0;break;case"choropleth":case"choroplethmap":H=[["M-6,-6V6H6V-6Z"]],K=!0;break;case"densitymap":H=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],K="radial";break;case"cone":H=[["M-6,2 A2,2 0 0,0 -6,6 V6L6,4Z"],["M-6,-6 A2,2 0 0,0 -6,-2 L6,-4Z"],["M-6,-2 A2,2 0 0,0 -6,2 L6,0Z"]],K=!1;break;case"streamtube":H=[["M-6,2 A2,2 0 0,0 -6,6 H6 A2,2 0 0,1 6,2 Z"],["M-6,-6 A2,2 0 0,0 -6,-2 H6 A2,2 0 0,1 6,-6 Z"],["M-6,-2 A2,2 0 0,0 -6,2 H6 A2,2 0 0,1 6,-2 Z"]],K=!1;break;case"surface":H=[["M-6,-6 A2,3 0 0,0 -6,0 H6 A2,3 0 0,1 6,-6 Z"],["M-6,1 A2,3 0 0,1 -6,6 H6 A2,3 0 0,0 6,0 Z"]],K=!0;break;case"mesh3d":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!1;break;case"volume":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],K=!0;break;case"isosurface":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],K=!1;break}var Y=p.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(H);Y.enter().append("path").classed("legend3dandfriends",!0).attr("transform",x).style("stroke-miterlimit",1),Y.exit().remove(),Y.each(function(q,Z){var ee=p.select(this),ae=t(X),he=ae.colorscale,xe=ae.reversescale,we=function(Ve){if(Ve.size()){var Ge="legendfill-"+X.uid;l.gradient(Ve,C,Ge,g(xe,K==="radial"),he,"fill")}},Me;if(he){if(!K){var Ie=he.length;Me=Z===0?he[xe?Ie-1:0][1]:Z===1?he[xe?0:Ie-1][1]:he[Math.floor((Ie-1)/2)][1]}}else{var Se=X.vertexcolor||X.facecolor||X.color;Me=E.isArrayOrTypedArray(Se)?Se[Z]||Se[0]:Se}ee.attr("d",q[0]),Me?ee.call(e.fill,Me):ee.call(we)})}};function g(S,M){var C=M?"radial":"horizontal";return C+(S?"":"reversed")}function i(S){var M=S[0].trace,C=M.contours,_=n.hasLines(M)||M.visible&&M.type==="quiver",T=n.hasMarkers(M),f=M.visible&&M.fill&&M.fill!=="none",u=!1,A=!1;if(C){var x=C.coloring;x==="lines"?u=!0:_=x==="none"||x==="heatmap"||C.showlines,C.type==="constraint"?f=C._operation!=="=":(x==="fill"||x==="heatmap")&&(A=!0)}return{showMarker:T,showLine:_,showFill:f,showGradientLine:u,showGradientFill:A,anyLine:_||u,anyFill:f||A}}function w(S,M,C){return S&&E.isArrayOrTypedArray(S)?M:S>C?C:S}}}),i5=ze({"src/components/legend/draw.js"(J,V){"use strict";var p=ci(),b=Nr(),E=cl(),k=mi(),l=Hm(),e=_h(),t=$i(),n=Qn(),r=Cs(),a=r5().handleItemClick,o=r5().handleTitleClick,s=a5(),c=dc(),m=c.LINE_SPACING,h=c.FROM_TL,v=c.FROM_BR,g=XI(),i=n5(),w=u1(),S=1,M=/^legend[0-9]*$/;V.exports=function($,Q){if(Q)_($,Q);else{var re=$._fullLayout,ne=re._legends,se=re._infolayer.selectAll('[class^="legend"]');se.each(function(){var H=p.select(this),Y=H.attr("class"),q=Y.split(" ")[0];q.match(M)&&ne.indexOf(q)===-1&&H.remove()});for(var G=0;G1)}var ae=re.hiddenlabels||[];if(!X&&(!re.showlegend||!K.length))return G.selectAll("."+ne).remove(),re._topdefs.select("#"+se).remove(),E.autoMargin(U,ne);var he=b.ensureSingle(G,"g",ne,function(_e){X||_e.attr("pointer-events","all")}),xe=b.ensureSingleById(re._topdefs,"clipPath",se,function(_e){_e.append("rect")}),we=b.ensureSingle(he,"rect","bg",function(_e){_e.attr("shape-rendering","crispEdges")});we.call(n.stroke,Q.bordercolor).call(n.fill,Q.bgcolor).style("stroke-width",Q.borderwidth+"px");var Me=b.ensureSingle(he,"g","scrollbox"),Se=Q.title;Q._titleWidth=0,Q._titleHeight=0;var Ie;Se.text?(Ie=b.ensureSingle(Me,"text",ne+"titletext"),Ie.attr("text-anchor","start").call(t.font,Se.font).text(Se.text),I(Ie,Me,U,Q,S),!X&&(Q.titleclick||Q.titledoubleclick)&&z(Me,U,Q,ne)):(Me.selectAll("."+ne+"titletext").remove(),Me.selectAll("."+ne+"titletoggle").remove());var Ve=b.ensureSingle(he,"rect","scrollbar",function(_e){_e.attr(s.scrollBarEnterAttrs).call(n.fill,s.scrollBarColor)}),Ge=Me.selectAll("g.groups").data(K);Ge.enter().append("g").attr("class","groups"),Ge.exit().remove();var ke=Ge.selectAll("g.traces").data(b.identity);ke.enter().append("g").attr("class","traces"),ke.exit().remove(),ke.style("opacity",function(_e){let ce=_e[0],ve=ce.trace;if(ce.groupTitle){let le=ve.legendgroup,Ae=(re.shapes||[]).filter(function(Xe){return Xe.showlegend});return U._fullData.concat(Ae).some(function(Xe){return Xe.legendgroup===le&&(Xe.legend||"legend")===ne&&Xe.visible===!0})?1:.5}return k.traceIs(ve,"pie-like")?ae.indexOf(_e[0].label)!==-1?.5:1:ve.visible==="legendonly"?.5:1}).each(function(){p.select(this).call(u,U,Q)}).call(i,U,Q).each(function(_e){X||_e[0].groupTitle&&Q.groupclick==="toggleitem"||p.select(this).call(x,U,ne)}),b.syncOrAsync([E.previousPromises,function(){return B(U,Ge,ke,Q,Me)},function(){var _e=re._size,ce=Q.borderwidth,ve=Q.xref==="paper",le=Q.yref==="paper";if(Se.text){let pt=(re.shapes||[]).filter(function(Ct){return Ct.showlegend}),Pt=U._fullData.concat(pt).some(function(Ct){let qt=Ct.legend||"legend";var Vt=Array.isArray(qt)?qt.includes(ne):qt===ne;return Vt&&Ct.visible===!0});Ie.style("opacity",Pt?1:.5)}if(!X){var Ae,Be;ve?Ae=_e.l+_e.w*Q.x-h[P(Q)]*Q._width:Ae=re.width*Q.x-h[P(Q)]*Q._width,le?Be=_e.t+_e.h*(1-Q.y)-h[j(Q)]*Q._effHeight:Be=re.height*(1-Q.y)-h[j(Q)]*Q._effHeight;var Xe=F(U,ne,Ae,Be);if(Xe)return;if(re.margin.autoexpand){var Ye=Ae,yt=Be;Ae=ve?b.constrain(Ae,0,re.width-Q._width):Ye,Be=le?b.constrain(Be,0,re.height-Q._effHeight):yt,Ae!==Ye&&b.log("Constrain "+ne+".x to make legend fit inside graph"),Be!==yt&&b.log("Constrain "+ne+".y to make legend fit inside graph")}t.setTranslate(he,Ae,Be)}if(Ve.on(".drag",null),he.on("wheel",null),X||Q._height<=Q._maxHeight||U._context.staticPlot){var gt=Q._effHeight;X&&(gt=Q._height),we.attr({width:Q._width-ce,height:gt-ce,x:ce/2,y:ce/2}),t.setTranslate(Me,0,0),xe.select("rect").attr({width:Q._width-2*ce,height:gt-2*ce,x:ce,y:ce}),t.setClipUrl(Me,se,U),t.setRect(Ve,0,0,0,0),delete Q._scrollY}else{var Tt=Math.max(s.scrollBarMinHeight,Q._effHeight*Q._effHeight/Q._height),At=Q._effHeight-Tt-2*s.scrollBarMargin,$t=Q._height-Q._effHeight,rr=At/$t,_r=Math.min(Q._scrollY||0,$t);we.attr({width:Q._width-2*ce+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-ce,x:ce/2,y:ce/2}),xe.select("rect").attr({width:Q._width-2*ce+s.scrollBarWidth+s.scrollBarMargin,height:Q._effHeight-2*ce,x:ce,y:ce+_r}),t.setClipUrl(Me,se,U),We(_r,Tt,rr),he.on("wheel",function(){_r=b.constrain(Q._scrollY+p.event.deltaY/$t*At,0,$t),We(_r,Tt,rr),_r!==0&&_r!==$t&&p.event.preventDefault()});var Xt,or,Ot,vt=function(pt,Pt,Ct){var qt=(Ct-Pt)/rr+pt;return b.constrain(qt,0,$t)},ht=function(pt,Pt,Ct){var qt=(Pt-Ct)/rr+pt;return b.constrain(qt,0,$t)},De=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"?Xt=pt.changedTouches[0].clientY:Xt=pt.clientY,Ot=_r}).on("drag",function(){var pt=p.event.sourceEvent;pt.buttons===2||pt.ctrlKey||(pt.type==="touchmove"?or=pt.changedTouches[0].clientY:or=pt.clientY,_r=vt(Ot,Xt,or),We(_r,Tt,rr))});Ve.call(De);var Ne=p.behavior.drag().on("dragstart",function(){var pt=p.event.sourceEvent;pt.type==="touchstart"&&(Xt=pt.changedTouches[0].clientY,Ot=_r)}).on("drag",function(){var pt=p.event.sourceEvent;pt.type==="touchmove"&&(or=pt.changedTouches[0].clientY,_r=ht(Ot,Xt,or),We(_r,Tt,rr))});Me.call(Ne)}function We(pt,Pt,Ct){Q._scrollY=U._fullLayout[ne]._scrollY=pt,t.setTranslate(Me,0,-pt),t.setRect(Ve,Q._width,s.scrollBarMargin+pt*Ct,s.scrollBarWidth,Pt),xe.select("rect").attr("y",ce+pt)}if(U._context.edits.legendPosition){var Ke,Je,et,Mt;he.classed("cursor-move",!0),e.init({element:he.node(),gd:U,prepFn:function(pt){if(pt.target!==Ve.node()){var Pt=t.getTranslate(he);et=Pt.x,Mt=Pt.y}},moveFn:function(pt,Pt){if(et!==void 0&&Mt!==void 0){var Ct=et+pt,qt=Mt+Pt;t.setTranslate(he,Ct,qt),Ke=e.align(Ct,Q._width,_e.l,_e.l+_e.w,Q.xanchor),Je=e.align(qt+Q._height,-Q._height,_e.t+_e.h,_e.t,Q.yanchor)}},doneFn:function(){if(Ke!==void 0&&Je!==void 0){var pt={};pt[ne+".x"]=Ke,pt[ne+".y"]=Je,k.call("_guiRelayout",U,pt)}},clickFn:function(pt,Pt){var Ct=G.selectAll("g.traces").filter(function(){var qt=this.getBoundingClientRect();return Pt.clientX>=qt.left&&Pt.clientX<=qt.right&&Pt.clientY>=qt.top&&Pt.clientY<=qt.bottom});Ct.size()>0&&f(U,Q,Ct,pt,Pt)}})}}],U)}}function T(U,$,Q){var re=U[0],ne=re.width,se=$.entrywidthmode,G=re.trace.legendwidth||$.entrywidth;return se==="fraction"?$._maxWidth*G:Q+(G||ne)}function f(U,$,Q,re,ne){var se=U._fullLayout,G=Q.data()[0][0].trace,X=$.itemclick,K=$.itemdoubleclick,H={event:ne,node:Q.node(),curveNumber:G.index,expandedIndex:G.index,data:U.data,layout:U.layout,frames:U._transitionData._frames,config:U._context,fullData:U._fullData,fullLayout:se};G._group&&(H.group=G._group),k.traceIs(G,"pie-like")&&(H.label=Q.datum()[0].label);var Y=l.triggerHandler(U,"plotly_legendclick",H);if(re===1){if(Y===!1)return;$._clickTimeout=setTimeout(function(){U._fullLayout&&X&&a(Q,U,$,X)},U._context.doubleClickDelay)}else if(re===2){$._clickTimeout&&clearTimeout($._clickTimeout),U._legendMouseDownTime=0;var q=l.triggerHandler(U,"plotly_legenddoubleclick",H);q!==!1&&Y!==!1&&K&&a(Q,U,$,K)}}function u(U,$,Q){var re=w.getId(Q),ne=U.data()[0][0],se=ne.trace,G=k.traceIs(se,"pie-like"),X=!Q._inHover&&$._context.edits.legendText&&!G,K=Q._maxNameLength,H,Y;ne.groupTitle?(H=ne.groupTitle.text,Y=ne.groupTitle.font):(Y=Q.font,Q.entries?H=ne.text:(H=G?ne.label:se.name,se._meta&&(H=b.templateString(H,se._meta))));var q=b.ensureSingle(U,"text",re+"text");q.attr("text-anchor","start").call(t.font,Y).text(X?A(H,K):H);var Z=Q.indentation+Q.itemwidth+s.itemGap*2;r.positionText(q,Z,0),X?q.call(r.makeEditable,{gd:$,text:H}).call(I,U,$,Q).on("edit",function(ee){this.text(A(ee,K)).call(I,U,$,Q);var ae={};return ae.name=ee,ne.trace._isShape?k.call("_guiRelayout",$,"shapes["+se.index+"].name",ae.name):k.call("_guiRestyle",$,ae,se.index)}):I(q,U,$,Q)}function A(U,$){var Q=Math.max(4,$);if(U&&U.trim().length>=Q/2)return U;U=U||"";for(var re=Q-U.length;re>0;re--)U+=" ";return U}function x(U,$,Q){var re=$._context.doubleClickDelay,ne,se=1,G=b.ensureSingle(U,"rect",Q+"toggle",function(X){$._context.staticPlot||X.style("cursor","pointer").attr("pointer-events","all"),X.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(G.on("mousedown",function(){ne=new Date().getTime(),ne-$._legendMouseDownTimere&&(se=Math.max(se-1,1)),f($,X,U,se,p.event)}}))}function z(U,$,Q,re){if($._fullData.some(function(H){let Y=H.legend||"legend";return(Array.isArray(Y)?Y.includes(re):Y===re)&&k.traceIs(H,"pie-like")}))return;let se=$._context.doubleClickDelay;var G,X=1;let K=b.ensureSingle(U,"rect",re+"titletoggle",function(H){$._context.staticPlot||H.style("cursor","pointer").attr("pointer-events","all"),H.call(n.fill,"rgba(0,0,0,0)")});$._context.staticPlot||(K.on("mousedown",function(){G=new Date().getTime(),G-$._legendMouseDownTimese&&(X=Math.max(X-1,1));let H={event:p.event,legendId:re,data:$.data,layout:$.layout,fullData:$._fullData,fullLayout:$._fullLayout};if(X===1&&Q.titleclick){if(l.triggerHandler($,"plotly_legendtitleclick",H)===!1)return;Q._titleClickTimeout=setTimeout(function(){$._fullLayout&&o($,Q,Q.titleclick)},se)}else X===2&&(Q._titleClickTimeout&&clearTimeout(Q._titleClickTimeout),$._legendMouseDownTime=0,l.triggerHandler($,"plotly_legendtitledoubleclick",H)!==!1&&Q.titledoubleclick&&o($,Q,Q.titledoubleclick))}))}function I(U,$,Q,re,ne){re._inHover&&U.attr("data-notex",!0),r.convertToTspans(U,Q,function(){O($,Q,re,ne)})}function O(U,$,Q,re){var ne=U.data()[0][0],se=ne&&ne.trace.showlegend;if(Array.isArray(se)&&(se=se[ne.i]!==!1),!Q._inHover&&ne&&!se){U.remove();return}var G=U.select("g[class*=math-group]"),X=G.node(),K=w.getId(Q);Q||(Q=$._fullLayout[K]);var H=Q.borderwidth,Y;re===S?Y=Q.title.font:ne.groupTitle?Y=ne.groupTitle.font:Y=Q.font;var q=Y.size*m,Z,ee;if(X){var ae=t.bBox(X);Z=ae.height,ee=ae.width,re===S?t.setTranslate(G,H,H+Z*.75):t.setTranslate(G,0,Z*.25)}else{var he="."+K+(re===S?"title":"")+"text",xe=U.select(he),we=r.lineCount(xe),Me=xe.node();if(Z=q*we,ee=Me?t.bBox(Me).width:0,re===S)Q.title.side==="left"&&(ee+=s.itemGap*2),r.positionText(xe,H+s.titlePad,H+q);else{var Se=s.itemGap*2+Q.indentation+Q.itemwidth;ne.groupTitle&&(Se=s.itemGap,ee-=Q.indentation+Q.itemwidth),r.positionText(xe,Se,-q*((we-1)/2-.3))}}re===S?(Q._titleWidth=ee,Q._titleHeight=Z):(ne.lineHeight=q,ne.height=Math.max(Z,16)+3,ne.width=ee)}function D(U){var $=0,Q=0,re=U.title.side;return re&&(re.indexOf("left")!==-1&&($=U._titleWidth),re.indexOf("top")!==-1&&(Q=U._titleHeight)),[$,Q]}function B(U,$,Q,re,ne){var se=U._fullLayout,G=w.getId(re);re||(re=se[G]);var X=se._size,K=w.isVertical(re),H=w.isGrouped(re),Y=re.entrywidthmode==="fraction",q=re.borderwidth,Z=2*q,ee=s.itemGap,ae=re.indentation+re.itemwidth+ee*2,he=2*(q+ee),xe=j(re),we=re.y<0||re.y===0&&xe==="top",Me=re.y>1||re.y===1&&xe==="bottom",Se=re.tracegroupgap,Ie={};let{orientation:Ve,yref:Ge}=re,{maxheight:ke}=re,_e=we||Me||Ve!=="v"||Ge!=="paper";ke||(ke=_e?.5:1);let ce=_e?se.height:X.h;re._maxHeight=Math.max(ke>1?ke:ke*ce,30);var ve=0;re._width=0,re._height=0;var le=D(re);if(K)Q.each(function(pt){var Pt=pt[0].height;t.setTranslate(this,q+le[0],q+le[1]+re._height+Pt/2+ee),re._height+=Pt,re._width=Math.max(re._width,pt[0].width)}),ve=ae+re._width,re._width+=ee+ae+Z,re._height+=he,H&&($.each(function(pt,Pt){t.setTranslate(this,0,Pt*re.tracegroupgap)}),re._height+=(re._lgroupsLength-1)*re.tracegroupgap);else{var Ae=P(re),Be=re.x<0||re.x===0&&Ae==="right",Xe=re.x>1||re.x===1&&Ae==="left",Ye=Me||we,yt=se.width/2;re._maxWidth=Math.max(Be?Ye&&Ae==="left"?X.l+X.w:yt:Xe?Ye&&Ae==="right"?X.r+X.w:yt:X.w,2*ae);var gt=0,Tt=0;Q.each(function(pt){var Pt=T(pt,re,ae);gt=Math.max(gt,Pt),Tt+=Pt}),ve=null;var At=0;if(H){var $t=0,rr=0,_r=0;$.each(function(){var pt=0,Pt=0;p.select(this).selectAll("g.traces").each(function(qt){var Vt=T(qt,re,ae),Ht=qt[0].height;t.setTranslate(this,le[0],le[1]+q+ee+Ht/2+Pt),Pt+=Ht,pt=Math.max(pt,Vt),Ie[qt[0].trace.legendgroup]=pt});var Ct=pt+ee;rr>0&&Ct+q+rr>re._maxWidth?(At=Math.max(At,rr),rr=0,_r+=$t+Se,$t=Pt):$t=Math.max($t,Pt),t.setTranslate(this,rr,_r),rr+=Ct}),re._width=Math.max(At,rr)+q,re._height=_r+$t+he}else{var Xt=Q.size(),or=Tt+Z+(Xt-1)*ee=re._maxWidth&&(At=Math.max(At,De),vt=0,ht+=Ot,re._height+=Ot,Ot=0),t.setTranslate(this,le[0]+q+vt,le[1]+q+ht+Pt/2+ee),De=vt+Ct+ee,vt+=qt,Ot=Math.max(Ot,Pt)}),or?(re._width=vt+Z,re._height=Ot+he):(re._width=Math.max(At,De)+Z,re._height+=Ot+he)}}re._width=Math.ceil(Math.max(re._width+le[0],re._titleWidth+2*(q+s.titlePad))),re._height=Math.ceil(Math.max(re._height+le[1],re._titleHeight+2*(q+s.itemGap))),re._effHeight=Math.min(re._height,re._maxHeight);var Ne=U._context.edits,We=Ne.legendText||Ne.legendPosition;Q.each(function(pt){var Pt=p.select(this).select("."+G+"toggle"),Ct=pt[0].height,qt=pt[0].trace.legendgroup,Vt=T(pt,re,ae);H&&qt!==""&&(Vt=Ie[qt]);var Ht=We?ae:ve||Vt;!K&&!Y&&(Ht+=ee/2),t.setRect(Pt,0,-Ct/2,Ht,Ct)});var Ke=ne.select("."+G+"titletext");Ke.node()&&C(Ke,re,q);var Je=ne.select("."+G+"titletoggle");if(Je.size()&&Ke.node()){var et=Ke.attr("x")||0,Mt=s.titlePad;t.setRect(Je,et-Mt,q,re._titleWidth+2*Mt,re._titleHeight+2*Mt)}}function F(U,$,Q,re){var ne=U._fullLayout,se=ne[$],G=P(se),X=j(se),K=se.xref==="paper",H=se.yref==="paper";U._fullLayout._reservedMargin[$]={};var Y=se.y<.5?"b":"t",q=se.x<.5?"l":"r",Z={r:ne.width-Q,l:Q+se._width,b:ne.height-re,t:re+se._effHeight};if(K&&H)return E.autoMargin(U,$,{x:se.x,y:se.y,l:se._width*h[G],r:se._width*v[G],b:se._effHeight*v[X],t:se._effHeight*h[X]});K?U._fullLayout._reservedMargin[$][Y]=Z[Y]:H||se.orientation==="v"?U._fullLayout._reservedMargin[$][q]=Z[q]:U._fullLayout._reservedMargin[$][Y]=Z[Y]}function P(U){return b.isRightAnchor(U)?"right":b.isCenterAnchor(U)?"center":"left"}function j(U){return b.isBottomAnchor(U)?"bottom":b.isMiddleAnchor(U)?"middle":"top"}}}),o5=ze({"src/components/fx/hover.js"(J){"use strict";var V=ci(),p=ao(),b=Nr(),E=b.pushUnique,k=b.strTranslate,l=b.strRotate,e=Hm(),t=Cs(),n=YI(),r=$i(),a=Qn(),o=_h(),s=Gi(),c=hc().zindexSeparator,m=mi(),h=kh(),v=a1(),g=t5(),i=i5(),w=v.YANGLE,S=Math.PI*w/180,M=1/Math.sin(S),C=Math.cos(S),_=Math.sin(S),T=v.HOVERARROWSIZE,f=v.HOVERTEXTPAD,u={box:!0,ohlc:!0,violin:!0,candlestick:!0},A={scatter:!0,scattergl:!0,splom:!0};function x(q,Z){return q.distance-Z.distance}J.hover=function(Z,ee,ae,he){Z=b.getGraphDiv(Z);var xe=ee.target;b.throttle(Z._fullLayout._uid+v.HOVERID,v.HOVERMINTIME,function(){z(Z,ee,ae,he,xe)})},J.loneHover=function(Z,ee){var ae=!0;Array.isArray(Z)||(ae=!1,Z=[Z]);var he=ee.gd,xe=K(he),we=H(he),Me=Z.map(function(le){var Ae=le._x0||le.x0||le.x||0,Be=le._x1||le.x1||le.x||0,Xe=le._y0||le.y0||le.y||0,Ye=le._y1||le.y1||le.y||0,yt=le.eventData;if(yt){var gt=Math.min(Ae,Be),Tt=Math.max(Ae,Be),At=Math.min(Xe,Ye),$t=Math.max(Xe,Ye),rr=le.trace;if(m.traceIs(rr,"gl3d")){var _r=he._fullLayout[rr.scene]._scene.container,Xt=_r.offsetLeft,or=_r.offsetTop;gt+=Xt,Tt+=Xt,At+=or,$t+=or}yt.bbox={x0:gt+we,x1:Tt+we,y0:At+xe,y1:$t+xe},yt.xPixel=(Ae+Be)/2,yt.yPixel=(Xe+Ye)/2,ee.inOut_bbox&&ee.inOut_bbox.push(yt.bbox)}else yt=!1;return{color:le.color||a.defaultLine,x0:le.x0||le.x||0,x1:le.x1||le.x||0,y0:le.y0||le.y||0,y1:le.y1||le.y||0,xLabel:le.xLabel,yLabel:le.yLabel,zLabel:le.zLabel,text:le.text,name:le.name,idealAlign:le.idealAlign,borderColor:le.borderColor,fontFamily:le.fontFamily,fontSize:le.fontSize,fontColor:le.fontColor,fontWeight:le.fontWeight,fontStyle:le.fontStyle,fontVariant:le.fontVariant,nameLength:le.nameLength,textAlign:le.textAlign,trace:le.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:le.hovertemplate||!1,hovertemplateLabels:le.hovertemplateLabels||!1,eventData:yt}}),Se=!1,Ie=D(Me,{gd:he,hovermode:"closest",rotateLabels:Se,bgColor:ee.bgColor||a.background,container:V.select(ee.container),outerContainer:ee.outerContainer||ee.container}),Ve=Ie.hoverLabels,Ge=5,ke=0,_e=0;Ve.sort(function(le,Ae){return le.y0-Ae.y0}).each(function(le,Ae){var Be=le.y0-le.by/2;Be-GeTt[0]._length||nr<0||nr>At[0]._length)return o.unhoverRaw(q,Z)}if(Z.pointerX=Rt+Tt[0]._offset,Z.pointerY=nr+At[0]._offset,"xval"in Z?ht=h.flat(xe,Z.xval):ht=h.p2c(Tt,Rt),"yval"in Z?De=h.flat(xe,Z.yval):De=h.p2c(At,nr),q._hoverPointerX=Z.pointerX,q._hoverPointerY=Z.pointerY,!p(ht[0])||!p(De[0]))return b.warn("Fx.hover failed",Z,q),o.unhoverRaw(q,Z)}Me.clickanywhere&&(q._hoverXVals=ht,q._hoverYVals=De,q._hoverXAxes=Tt,q._hoverYAxes=At);var Rr=1/0;function Qr(fn,Ai){for(We=0;WeVt&&(Ot.splice(0,Vt),Rr=Ot[0].distance),Ge&&or!==0&&Ot.length===0){qt.distance=or,qt.index=!1;var qi=Je._module.hoverPoints(qt,Pt,Ct,"closest",{hoverLayer:Me._hoverlayer});if(qi&&(qi=qi.filter(function(Mi){return Mi.spikeDistance<=or})),qi&&qi.length){var io,oo=qi.filter(function(Mi){return Mi.xa.showspikes&&Mi.xa.spikesnap!=="hovered data"});if(oo.length){var Vn=oo[0];p(Vn.x0)&&p(Vn.y0)&&(io=ha(Vn),(!Ht.vLinePoint||Ht.vLinePoint.spikeDistance>io.spikeDistance)&&(Ht.vLinePoint=io))}var qn=qi.filter(function(Mi){return Mi.ya.showspikes&&Mi.ya.spikesnap!=="hovered data"});if(qn.length){var Hi=qn[0];p(Hi.x0)&&p(Hi.y0)&&(io=ha(Hi),(!Ht.hLinePoint||Ht.hLinePoint.spikeDistance>io.spikeDistance)&&(Ht.hLinePoint=io))}}}}}Qr();function Zr(fn,Ai,jn){for(var Xn=null,eo=1/0,gi,qi=0;qifn.trace.index===vi.trace.index):Ot=[vi];var Yi=Ot.length,Ja=X("x",vi,Me),Oa=X("y",vi,Me);Qr(Ja,Oa);var lt=[],rt={},fr=0,lr=function(fn){var Ai=u[fn.trace.type]?I(fn):fn.trace.index;if(!rt[Ai])fr++,rt[Ai]=fr,lt.push(fn);else{var jn=rt[Ai]-1,Xn=lt[jn];jn>0&&Math.abs(fn.distance)Yi-1;Tr--)lr(Ot[Tr]);Ot=lt,Xa()}var Ir=q._hoverdata,Dr=[],ot=K(q),kt=H(q);for(let fn of Ot){var jt=h.makeEventData(fn,fn.trace,fn.cd);if(fn.hovertemplate!==!1){var ar=!1;fn.cd[fn.index]&&fn.cd[fn.index].ht&&(ar=fn.cd[fn.index].ht),fn.hovertemplate=ar||fn.trace.hovertemplate||!1}if(fn.xa&&fn.ya){var Er=fn.x0+fn.xa._offset,xr=fn.x1+fn.xa._offset,zr=fn.y0+fn.ya._offset,Lr=fn.y1+fn.ya._offset,aa=Math.min(Er,xr),Sa=Math.max(Er,xr),wa=Math.min(zr,Lr),pn=Math.max(zr,Lr);jt.bbox={x0:aa+kt,x1:Sa+kt,y0:wa+ot,y1:pn+ot},jt.xPixel=(Er+xr)/2,jt.yPixel=(zr+Lr)/2}fn.eventData=[jt],Dr.push(jt)}q._hoverdata=Dr;var tn=ke==="y"&&(vt.length>1||Ot.length>1)||ke==="closest"&&Sr&&Ot.length>1,ai=a.combine(Me.plot_bgcolor||a.background,Me.paper_bgcolor),rn=D(Ot,{gd:q,hovermode:ke,rotateLabels:tn,bgColor:ai,container:Me._hoverlayer,outerContainer:Me._paper.node(),commonLabelOpts:Me.hoverlabel,hoverdistance:Me.hoverdistance}),Ri=rn.hoverLabels;if(h.isUnifiedHover(ke)||(F(Ri,tn,Me,rn.commonLabelBoundingBox),U(Ri,tn,Me._invScaleX,Me._invScaleY)),he&&he.tagName){var Gn=m.getComponentMethod("annotations","hasClickToShow")(q,Dr);n(V.select(he),Gn?"pointer":"")}var no=re(q,Z,Ir);if(!he||ae||!no&&!Me.hoveranywhere)return;Ir&&no&&q.emit("plotly_unhover",{event:Z,points:Ir}),Di(q._hoverdata);function Di(fn){q.emit("plotly_hover",{event:Z,points:fn,xaxes:Tt,yaxes:At,xvals:h.c2dApply(Tt,ht),yvals:h.c2dApply(At,De),xPixel:Z.pointerX,yPixel:Z.pointerY})}}function I(q){return[q.trace.index,q.index,q.x0,q.y0,q.name,q.attr,q.xa?q.xa._id:"",q.ya?q.ya._id:""].join(",")}var O=/([\s\S]*)<\/extra>/;function D(q,Z){var ee=Z.gd,ae=ee._fullLayout,he=Z.hovermode,xe=Z.rotateLabels,we=Z.bgColor,Me=Z.container,Se=Z.outerContainer,Ie=Z.commonLabelOpts||{};if(q.length===0)return[[]];var Ve=Z.fontFamily||v.HOVERFONT,Ge=Z.fontSize||v.HOVERFONTSIZE,ke=Z.fontWeight||ae.font.weight,_e=Z.fontStyle||ae.font.style,ce=Z.fontVariant||ae.font.variant,ve=Z.fontTextcase||ae.font.textcase,le=Z.fontLineposition||ae.font.lineposition,Ae=Z.fontShadow||ae.font.shadow,Be=q[0],Xe=Be.xa,Ye=Be.ya,yt=he.charAt(0),gt=yt+"Label",Tt=Be[gt];if(Tt===void 0&&Xe.type==="multicategory")for(var At=0;Atae.width-Dr&&(ot=ae.width-Dr),en.attr("d","M"+(lr-ot)+",0L"+(lr-ot+T)+","+Ir+T+"H"+Dr+"v"+Ir+(f*2+fr.height)+"H"+-Dr+"V"+Ir+T+"H"+(lr-ot-T)+"Z"),lr=ot,We.minX=lr-Dr,We.maxX=lr+Dr,Xe.side==="top"?(We.minY=Tr-(f*2+fr.height),We.maxY=Tr-f):(We.minY=Tr+f,We.maxY=Tr+(f*2+fr.height))}else{var kt,jt,ar;Ye.side==="right"?(kt="start",jt=1,ar="",lr=Xe._offset+Xe._length):(kt="end",jt=-1,ar="-",lr=Xe._offset),Tr=Ye._offset+(Be.y0+Be.y1)/2,vi.attr("text-anchor",kt),en.attr("d","M0,0L"+ar+T+","+T+"V"+(f+fr.height/2)+"h"+ar+(f*2+fr.width)+"V-"+(f+fr.height/2)+"H"+ar+T+"V-"+T+"Z"),We.minY=Tr-(f+fr.height/2),We.maxY=Tr+(f+fr.height/2),Ye.side==="right"?(We.minX=lr+T,We.maxX=lr+T+(f*2+fr.width)):(We.minX=lr-T-(f*2+fr.width),We.maxX=lr-T);var Er=fr.height/2,xr=rr-fr.top-Er,zr="clip"+ae._uid+"commonlabel"+Ye._id,Lr;if(lren.hoverinfo!=="none");if(on.length===0)return[];var Ke=ae.hoverlabel,Je=Ke.font,et=on[0],Mt=((he==="x unified"?et.xa:et.ya).unifiedhovertitle||{}).text,pt=Mt?b.hovertemplateString({data:he==="x unified"?[{xa:et.xa,x:et.xVal}]:[{ya:et.ya,y:et.yVal}],fallback:et.trace.hovertemplatefallback,locale:ae._d3locale,template:Mt}):Tt,Pt={showlegend:!0,legend:{title:{text:pt,font:Je},font:Je,bgcolor:Ke.bgcolor,bordercolor:Ke.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:ae.legend?ae.legend.traceorder:void 0,orientation:"v"}},Ct={font:Je};g(Pt,Ct,ee._fullData);var qt=Ct.legend;qt.entries=[];for(var Vt=0;Vt=0?Un=Xa:ja+cr<_r&&ja>=0?Un=ja:Nn+cr<_r?Un=Nn:Xa-Zr=0?li=La:un+Rr=0?li=un:yn+Rr=0,(on.idealAlign==="top"||!wa)&&pn?(ar-=xr/2,on.anchor="end"):wa?(ar+=xr/2,on.anchor="start"):on.anchor="middle",on.crossPos=ar;else{if(on.pos=ar,wa=jt+Er/2+Sa<=_r,pn=jt-Er/2-Sa>=0,(on.idealAlign==="left"||!wa)&&pn)jt-=Er/2,on.anchor="end";else if(wa)jt+=Er/2,on.anchor="start";else{on.anchor="middle";var tn=Sa/2,ai=jt+tn-_r,rn=jt-tn;ai>0&&(jt-=ai),rn<0&&(jt+=-rn)}on.crossPos=jt}Tr.attr("text-anchor",on.anchor),Dr&&Ir.attr("text-anchor",on.anchor),en.attr("transform",k(jt,ar)+(xe?l(w):""))}),{hoverLabels:Yn,commonLabelBoundingBox:We}}function B(q,Z,ee,ae,he,xe){var we,Me,Se="",Ie="";q.nameOverride!==void 0&&(q.name=q.nameOverride),q.name&&(q.trace._meta&&(q.name=b.templateString(q.name,q.trace._meta)),Se=se(q.name,q.nameLength));var Ve=ee.charAt(0),Ge=Ve==="x"?"y":"x";q.zLabel!==void 0?(q.xLabel!==void 0&&(Ie+="x: "+q.xLabel+"
"),q.yLabel!==void 0&&(Ie+="y: "+q.yLabel+"
"),q.trace.type!=="choropleth"&&q.trace.type!=="choroplethmap"&&(Ie+=(Ie?"z: ":"")+q.zLabel)):Z&&q[Ve+"Label"]===he?Ie=q[Ge+"Label"]||"":q.xLabel===void 0?q.yLabel!==void 0&&q.trace.type!=="scattercarpet"&&(Ie=q.yLabel):q.yLabel===void 0?Ie=q.xLabel:Ie="("+q.xLabel+", "+q.yLabel+")",(q.text||q.text===0)&&!Array.isArray(q.text)&&(Ie+=(Ie?"
":"")+q.text),q.extraText!==void 0&&(Ie+=(Ie?"
":"")+q.extraText),xe&&Ie===""&&!q.hovertemplate&&(Se===""&&xe.remove(),Ie=Se),(Me=(we=q.trace)==null?void 0:we.hoverlabel)!=null&&Me.split&&(q.hovertemplate="");let{hovertemplate:ke=!1}=q;if(ke){let _e=q.hovertemplateLabels||q;q[Ve+"Label"]!==he&&(_e[Ve+"other"]=_e[Ve+"Val"],_e[Ve+"otherLabel"]=_e[Ve+"Label"]),Ie=b.hovertemplateString({data:[q.eventData[0]||{},q.trace._meta],fallback:q.trace.hovertemplatefallback,labels:_e,locale:ae._d3locale,template:ke}),Ie=Ie.replace(O,(ce,ve)=>(Se=se(ve,q.nameLength),""))}return[Ie,Se]}function F(q,Z,ee,ae){var he=Z?"xa":"ya",xe=Z?"ya":"xa",we=0,Me=1,Se=q.size(),Ie=new Array(Se),Ve=0,Ge=ae.minX,ke=ae.maxX,_e=ae.minY,ce=ae.maxY,ve=function(ht){return ht*ee._invScaleX},le=function(ht){return ht*ee._invScaleY};q.each(function(ht){var De=ht[he],Ne=ht[xe],We=De._id.charAt(0)==="x",Ke=De.range;Ve===0&&Ke&&Ke[0]>Ke[1]!==We&&(Me=-1);var Je=0,et=We?ee.width:ee.height;if(ee.hovermode==="x"||ee.hovermode==="y"){var Mt=P(ht,Z),pt=ht.anchor,Pt=pt==="end"?-1:1,Ct,qt;if(pt==="middle")Ct=ht.crossPos+(We?le(Mt.y-ht.by/2):ve(ht.bx/2+ht.tx2width/2)),qt=Ct+(We?le(ht.by):ve(ht.bx));else if(We)Ct=ht.crossPos+le(T+Mt.y)-le(ht.by/2-T),qt=Ct+le(ht.by);else{var Vt=ve(Pt*T+Mt.x),Ht=Vt+ve(Pt*ht.bx);Ct=ht.crossPos+Math.min(Vt,Ht),qt=ht.crossPos+Math.max(Vt,Ht)}We?_e!==void 0&&ce!==void 0&&Math.min(qt,ce)-Math.max(Ct,_e)>1&&(Ne.side==="left"?(Je=Ne._mainLinePosition,et=ee.width):et=Ne._mainLinePosition):Ge!==void 0&&ke!==void 0&&Math.min(qt,ke)-Math.max(Ct,Ge)>1&&(Ne.side==="top"?(Je=Ne._mainLinePosition,et=ee.height):et=Ne._mainLinePosition)}Ie[Ve++]=[{datum:ht,traceIndex:ht.trace.index,dp:0,pos:ht.pos,posref:ht.posref,size:ht.by*(We?M:1)/2,pmin:Je,pmax:et}]}),Ie.sort(function(ht,De){return ht[0].posref-De[0].posref||Me*(De[0].traceIndex-ht[0].traceIndex)});var Ae,Be,Xe,Ye,yt,gt,Tt;function At(ht){var De=ht[0],Ne=ht[ht.length-1];if(Be=De.pmin-De.pos-De.dp+De.size,Xe=Ne.pos+Ne.dp+Ne.size-De.pmax,Be>.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp+=Be;Ae=!1}if(!(Xe<.01)){if(Be<-.01){for(yt=ht.length-1;yt>=0;yt--)ht[yt].dp-=Xe;Ae=!1}if(Ae){var We=0;for(Ye=0;YeDe.pmax&&We++;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos>De.pmax-1&&(gt.del=!0,We--);for(Ye=0;Ye=0;yt--)ht[yt].dp-=Xe;for(Ye=ht.length-1;Ye>=0&&!(We<=0);Ye--)gt=ht[Ye],gt.pos+gt.dp+gt.size>De.pmax&&(gt.del=!0,We--)}}}for(;!Ae&&we<=Se;){for(we++,Ae=!0,Ye=0;Ye.01){for(yt=rr.length-1;yt>=0;yt--)rr[yt].dp+=Be;for($t.push.apply($t,rr),Ie.splice(Ye+1,1),Tt=0,yt=$t.length-1;yt>=0;yt--)Tt+=$t[yt].dp;for(Xe=Tt/$t.length,yt=$t.length-1;yt>=0;yt--)$t[yt].dp-=Xe;Ae=!1}else Ye++}Ie.forEach(At)}for(Ye=Ie.length-1;Ye>=0;Ye--){var or=Ie[Ye];for(yt=or.length-1;yt>=0;yt--){var Ot=or[yt],vt=Ot.datum;vt.offset=Ot.dp,vt.del=Ot.del}}}function P(q,Z){var ee=0,ae=q.offset;return Z&&(ae*=-_,ee=q.offset*C),{x:ee,y:ae}}function j(q){var Z={start:1,end:-1,middle:0}[q.anchor],ee=Z*(T+f),ae=ee+Z*(q.txwidth+f),he=q.anchor==="middle";return he&&(ee-=q.tx2width/2,ae+=q.txwidth/2+f),{alignShift:Z,textShiftX:ee,text2ShiftX:ae}}function U(q,Z,ee,ae){var he=function(we){return we*ee},xe=function(we){return we*ae};q.each(function(we){var Me=V.select(this);if(we.del)return Me.remove();var Se=Me.select("text.nums"),Ie=we.anchor,Ve=Ie==="end"?-1:1,Ge=j(we),ke=P(we,Z),_e=ke.x,ce=ke.y,ve=Ie==="middle",le="hoverlabel"in we.trace?we.trace.hoverlabel.showarrow:!0,Ae;ve?Ae="M-"+he(we.bx/2+we.tx2width/2)+","+xe(ce-we.by/2)+"h"+he(we.bx)+"v"+xe(we.by)+"h-"+he(we.bx)+"Z":le?Ae="M0,0L"+he(Ve*T+_e)+","+xe(T+ce)+"v"+xe(we.by/2-T)+"h"+he(Ve*we.bx)+"v-"+xe(we.by)+"H"+he(Ve*T+_e)+"V"+xe(ce-T)+"Z":Ae="M"+he(Ve*T+_e)+","+xe(ce-we.by/2)+"h"+he(Ve*we.bx)+"v"+xe(we.by)+"h"+he(-Ve*we.bx)+"Z",Me.select("path").attr("d",Ae);var Be=_e+Ge.textShiftX,Xe=ce+we.ty0-we.by/2+f,Ye=we.textAlign||"auto";Ye!=="auto"&&(Ye==="left"&&Ie!=="start"?(Se.attr("text-anchor","start"),Be=ve?-we.bx/2-we.tx2width/2+f:-we.bx-f):Ye==="right"&&Ie!=="end"&&(Se.attr("text-anchor","end"),Be=ve?we.bx/2-we.tx2width/2-f:we.bx+f)),Se.call(t.positionText,he(Be),xe(Xe)),we.tx2width&&(Me.select("text.name").call(t.positionText,he(Ge.text2ShiftX+Ge.alignShift*f+_e),xe(ce+we.ty0-we.by/2+f)),Me.select("rect").call(r.setRect,he(Ge.text2ShiftX+(Ge.alignShift-1)*we.tx2width/2+_e),xe(ce-we.by/2-1),he(we.tx2width),xe(we.by+2)))})}function $(q,Z){var ee=q.index,ae=q.trace||{},he=q.cd[0],xe=q.cd[ee]||{};function we(ke){return ke||p(ke)&&ke===0}var Me=Array.isArray(ee)?function(ke,_e){var ce=b.castOption(he,ee,ke);return we(ce)?ce:b.extractOption({},ae,"",_e)}:function(ke,_e){return b.extractOption(xe,ae,ke,_e)};function Se(ke,_e,ce){var ve=Me(_e,ce);we(ve)&&(q[ke]=ve)}if(Se("hoverinfo","hi","hoverinfo"),Se("bgcolor","hbg","hoverlabel.bgcolor"),Se("borderColor","hbc","hoverlabel.bordercolor"),Se("fontFamily","htf","hoverlabel.font.family"),Se("fontSize","hts","hoverlabel.font.size"),Se("fontColor","htc","hoverlabel.font.color"),Se("fontWeight","htw","hoverlabel.font.weight"),Se("fontStyle","hty","hoverlabel.font.style"),Se("fontVariant","htv","hoverlabel.font.variant"),Se("nameLength","hnl","hoverlabel.namelength"),Se("textAlign","hta","hoverlabel.align"),q.posref=Z==="y"||Z==="closest"&&ae.orientation==="h"?q.xa._offset+(q.x0+q.x1)/2:q.ya._offset+(q.y0+q.y1)/2,q.x0=b.constrain(q.x0,0,q.xa._length),q.x1=b.constrain(q.x1,0,q.xa._length),q.y0=b.constrain(q.y0,0,q.ya._length),q.y1=b.constrain(q.y1,0,q.ya._length),q.xLabelVal!==void 0&&(q.xLabel="xLabel"in q?q.xLabel:s.hoverLabelText(q.xa,q.xLabelVal,ae.xhoverformat),q.xVal=q.xa.c2d(q.xLabelVal)),q.yLabelVal!==void 0&&(q.yLabel="yLabel"in q?q.yLabel:s.hoverLabelText(q.ya,q.yLabelVal,ae.yhoverformat),q.yVal=q.ya.c2d(q.yLabelVal)),q.zLabelVal!==void 0&&q.zLabel===void 0&&(q.zLabel=String(q.zLabelVal)),!isNaN(q.xerr)&&!(q.xa.type==="log"&&q.xerr<=0)){var Ie=s.tickText(q.xa,q.xa.c2l(q.xerr),"hover").text;q.xerrneg!==void 0?q.xLabel+=" +"+Ie+" / -"+s.tickText(q.xa,q.xa.c2l(q.xerrneg),"hover").text:q.xLabel+=" \xB1 "+Ie,Z==="x"&&(q.distance+=1)}if(!isNaN(q.yerr)&&!(q.ya.type==="log"&&q.yerr<=0)){var Ve=s.tickText(q.ya,q.ya.c2l(q.yerr),"hover").text;q.yerrneg!==void 0?q.yLabel+=" +"+Ve+" / -"+s.tickText(q.ya,q.ya.c2l(q.yerrneg),"hover").text:q.yLabel+=" \xB1 "+Ve,Z==="y"&&(q.distance+=1)}var Ge=q.hoverinfo||q.trace.hoverinfo;return Ge&&Ge!=="all"&&(Ge=Array.isArray(Ge)?Ge:Ge.split("+"),Ge.indexOf("x")===-1&&(q.xLabel=void 0),Ge.indexOf("y")===-1&&(q.yLabel=void 0),Ge.indexOf("z")===-1&&(q.zLabel=void 0),Ge.indexOf("text")===-1&&(q.text=void 0),Ge.indexOf("name")===-1&&(q.name=void 0)),q}function Q(q,Z,ee){var ae=ee.container,he=ee.fullLayout,xe=he._size,we=ee.event,Me=!!Z.hLinePoint,Se=!!Z.vLinePoint,Ie,Ve;if(ae.selectAll(".spikeline").remove(),!!(Se||Me)){var Ge=a.combine(he.plot_bgcolor,he.paper_bgcolor);if(Me){var ke=Z.hLinePoint,_e,ce;Ie=ke&&ke.xa,Ve=ke&&ke.ya;var ve=Ve.spikesnap;ve==="cursor"?(_e=we.pointerX,ce=we.pointerY):(_e=Ie._offset+ke.x,ce=Ve._offset+ke.y);var le=a.wcagContrast(ke.color,Ge)<1.5?a.contrast(Ge):ke.color,Ae=Ve.spikemode,Be=Ve.spikethickness,Xe=Ve.spikecolor||le,Ye=s.getPxPosition(q,Ve),yt,gt;if(Ae.indexOf("toaxis")!==-1||Ae.indexOf("across")!==-1){if(Ae.indexOf("toaxis")!==-1&&(yt=Ye,gt=_e),Ae.indexOf("across")!==-1){var Tt=Ve._counterDomainMin,At=Ve._counterDomainMax;Ve.anchor==="free"&&(Tt=Math.min(Tt,Ve.position),At=Math.max(At,Ve.position)),yt=xe.l+Tt*xe.w,gt=xe.l+At*xe.w}ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ce,y2:ce,"stroke-width":Be,stroke:Xe,"stroke-dasharray":r.dashStyle(Ve.spikedash,Be)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:yt,x2:gt,y1:ce,y2:ce,"stroke-width":Be+2,stroke:Ge}).classed("spikeline",!0).classed("crisp",!0)}Ae.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:Ye+(Ve.side!=="right"?Be:-Be),cy:ce,r:Be,fill:Xe}).classed("spikeline",!0)}if(Se){var $t=Z.vLinePoint,rr,_r;Ie=$t&&$t.xa,Ve=$t&&$t.ya;var Xt=Ie.spikesnap;Xt==="cursor"?(rr=we.pointerX,_r=we.pointerY):(rr=Ie._offset+$t.x,_r=Ve._offset+$t.y);var or=a.wcagContrast($t.color,Ge)<1.5?a.contrast(Ge):$t.color,Ot=Ie.spikemode,vt=Ie.spikethickness,ht=Ie.spikecolor||or,De=s.getPxPosition(q,Ie),Ne,We;if(Ot.indexOf("toaxis")!==-1||Ot.indexOf("across")!==-1){if(Ot.indexOf("toaxis")!==-1&&(Ne=De,We=_r),Ot.indexOf("across")!==-1){var Ke=Ie._counterDomainMin,Je=Ie._counterDomainMax;Ie.anchor==="free"&&(Ke=Math.min(Ke,Ie.position),Je=Math.max(Je,Ie.position)),Ne=xe.t+(1-Je)*xe.h,We=xe.t+(1-Ke)*xe.h}ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt,stroke:ht,"stroke-dasharray":r.dashStyle(Ie.spikedash,vt)}).classed("spikeline",!0).classed("crisp",!0),ae.insert("line",":first-child").attr({x1:rr,x2:rr,y1:Ne,y2:We,"stroke-width":vt+2,stroke:Ge}).classed("spikeline",!0).classed("crisp",!0)}Ot.indexOf("marker")!==-1&&ae.insert("circle",":first-child").attr({cx:rr,cy:De-(Ie.side!=="top"?vt:-vt),r:vt,fill:ht}).classed("spikeline",!0)}}}function re(q,Z,ee){if(!ee||ee.length!==q._hoverdata.length)return!0;for(var ae=ee.length-1;ae>=0;ae--){var he=ee[ae],xe=q._hoverdata[ae];if(he.curveNumber!==xe.curveNumber||String(he.pointNumber)!==String(xe.pointNumber)||String(he.pointNumbers)!==String(xe.pointNumbers)||he.binNumber!==xe.binNumber)return!0}return!1}function ne(q,Z){return!Z||Z.vLinePoint!==q._spikepoints.vLinePoint||Z.hLinePoint!==q._spikepoints.hLinePoint}function se(q,Z){return t.plainText(q||"",{len:Z,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function G(q,Z){for(var ee=Z.charAt(0),ae=[],he=[],xe=[],we=0;weq.offsetTop+q.clientTop,H=q=>q.offsetLeft+q.clientLeft;function Y(q,Z){var ee=q._fullLayout,ae=Z.getBoundingClientRect(),he=ae.left,xe=ae.top,we=he+ae.width,Me=xe+ae.height,Se=b.apply3DTransform(ee._invTransform)(he,xe),Ie=b.apply3DTransform(ee._invTransform)(we,Me),Ve=Se[0],Ge=Se[1],ke=Ie[0],_e=Ie[1];return{x:Ve,y:Ge,width:ke-Ve,height:_e-Ge,top:Math.min(Ge,_e),left:Math.min(Ve,ke),right:Math.max(Ve,ke),bottom:Math.max(Ge,_e)}}}}),c1=ze({"src/components/fx/hoverlabel_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover;V.exports=function(l,e,t,n){n=n||{};var r=e.legend;function a(o){n.font[o]||(n.font[o]=r?e.legend.font[o]:e.font[o])}e&&E(e.hovermode)&&(n.font||(n.font={}),a("size"),a("family"),a("color"),a("weight"),a("style"),a("variant"),r?(n.bgcolor||(n.bgcolor=b.combine(e.legend.bgcolor,e.paper_bgcolor)),n.bordercolor||(n.bordercolor=e.legend.bordercolor)):n.bgcolor||(n.bgcolor=e.paper_bgcolor)),t("hoverlabel.bgcolor",n.bgcolor),t("hoverlabel.bordercolor",n.bordercolor),t("hoverlabel.namelength",n.namelength),t("hoverlabel.showarrow",n.showarrow),p.coerceFont(t,"hoverlabel.font",n.font),t("hoverlabel.align",n.align)}}}),$I=ze({"src/components/fx/layout_global_defaults.js"(J,V){"use strict";var p=Nr(),b=c1(),E=rv();V.exports=function(l,e){function t(n,r){return p.coerce(l,e,E,n,r)}b(l,e,t)}}}),KI=ze({"src/components/fx/defaults.js"(J,V){"use strict";var p=Nr(),b=qm(),E=c1();V.exports=function(l,e,t,n){function r(o,s){return p.coerce(l,e,b,o,s)}var a=p.extendFlat({},n.hoverlabel);e.hovertemplate&&(a.namelength=-1),E(l,e,r,a)}}}),s5=ze({"src/components/fx/hovermode_defaults.js"(J,V){"use strict";var p=Nr(),b=rv();V.exports=function(k,l){function e(t,n){return l[t]!==void 0?l[t]:p.coerce(k,l,b,t,n)}return e("clickmode"),e("hoversubplots"),e("hoveranywhere"),e("clickanywhere"),e("hovermode")}}}),JI=ze({"src/components/fx/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=rv(),E=s5(),k=c1();V.exports=function(e,t){function n(m,h){return p.coerce(e,t,b,m,h)}var r=E(e,t);r&&(n("hoverdistance"),n("spikedistance"),r.indexOf("unified")!==-1&&n("hoversort"));var a=n("dragmode");a==="select"&&n("selectdirection");var o=t._has("map"),s=t._has("geo"),c=t._basePlotModules.length;t.dragmode==="zoom"&&((o||s)&&c===1||o&&s&&c===2)&&(t.dragmode="pan"),k(e,t,n),p.coerceFont(n,"hoverlabel.grouptitlefont",t.hoverlabel.font)}}}),QI=ze({"src/components/fx/calc.js"(J,V){"use strict";var p=Nr(),b=mi();V.exports=function(l){var e=l.calcdata,t=l._fullLayout;function n(c){return function(m){return p.coerceHoverinfo({hoverinfo:m},{_module:c._module},t)}}for(var r=0;r"," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}}}),Dx=ze({"src/components/shapes/draw_newshape/constants.js"(J,V){"use strict";var p=32;V.exports={CIRCLE_SIDES:p,i000:0,i090:p/4,i180:p/2,i270:p/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}}}),Fx=ze({"src/components/selections/helpers.js"(J,V){"use strict";var p=Nr().strTranslate;function b(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function E(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function k(e){var t=e._id.charAt(0)==="y"?1:0;return function(n){return b(e,n[t])}}function l(e){return p(e.xaxis._offset,e.yaxis._offset)}V.exports={p2r:b,r2p:E,axValue:k,getTransform:l}}}),uv=ze({"src/components/shapes/draw_newshape/helpers.js"(J){"use strict";var V=Kw(),p=Dx(),b=p.CIRCLE_SIDES,E=p.SQRT2,k=Fx(),l=k.p2r,e=k.r2p,t=[0,3,4,5,6,1,2],n=[0,3,4,1,2];J.writePaths=function(o){var s=o.length;if(!s)return"M0,0Z";for(var c="",m=0;m0&&w{let s=o.charAt(0),c=r[s].drawn!==void 0;return a+(c?1:0)},0)},J.getDataToPixel=function(l,e,t,n,r){var a=l._fullLayout._size,o;if(e)if(r==="domain")o=function(c){return e._length*(n?1-c:c)+e._offset};else{var s=J.shapePositionToRange(e);o=function(c){var m=k(e,t);return e._offset+e.r2p(s(c,!0))+m},e.type==="date"&&(o=J.decodeDate(o))}else n?o=function(c){return a.t+a.h*(1-c)}:o=function(c){return a.l+a.w*c};return o},J.getPixelToData=function(l,e,t,n){var r=l._fullLayout._size,a;if(e)if(n==="domain")a=function(s){var c=(s-e._offset)/e._length;return t?1-c:c};else{var o=J.rangeToShapePosition(e);a=function(s){return o(e.p2r(s-e._offset))}}else t?a=function(s){return 1-(s-r.t)/r.h}:a=function(s){return(s-r.l)/r.w};return a},J.roundPositionForSharpStrokeRendering=function(l,e){var t=Math.round(e%2)===1,n=Math.round(l);return t?n+.5:n},J.makeShapesOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.shapes[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&t.xref!=="paper"&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&t.yref!=="paper"&&(n.yaxis=l._fullLayout[t.yref+"axis"])),n.xsizemode=t.xsizemode,n.ysizemode=t.ysizemode,n.xanchor=t.xanchor,n.yanchor=t.yanchor,{options:t,plotinfo:n}},J.makeSelectionsOptionsAndPlotinfo=function(l,e){var t=l._fullLayout.selections[e]||{},n=l._fullLayout._plots[t.xref+t.yref],r=!!n;return r?n._hadPlotinfo=!0:(n={},t.xref&&(n.xaxis=l._fullLayout[t.xref+"axis"]),t.yref&&(n.yaxis=l._fullLayout[t.yref+"axis"])),{options:t,plotinfo:n}},J.getPathString=function(l,e){let t=e.type,n=b.getRefType(e.xref),r=b.getRefType(e.yref),a=l._fullLayout._size;var o,s,c,m,h,v,g,i,w,S,M,C;function _(O,D,B,F){var P;if(O)if(D==="domain")F?P=function(j){return O._offset+O._length*(1-j)}:P=function(j){return O._offset+O._length*j};else{let j=J.shapePositionToRange(O);P=function(U){return O._offset+O.r2p(j(U,!0))},B==="path"&&O.type==="date"&&(P=J.decodeDate(P))}else F?P=function(j){return a.t+a.h*(1-j)}:P=function(j){return a.l+a.w*j};return P}if(n==="array"?(g=[],o=e.xref.map(function(O){return b.getFromId(l,O)}),g=e.xref.map(function(O,D){return _(o[D],b.getRefType(O),t,!1)})):(o=b.getFromId(l,e.xref),g=_(o,n,t,!1)),r==="array"?(i=[],s=e.yref.map(function(O){return b.getFromId(l,O)}),i=e.yref.map(function(O,D){return _(s[D],b.getRefType(O),t,!0)})):(s=b.getFromId(l,e.yref),i=_(s,r,t,!0)),t==="path")return E(e,g,i);if(n==="array")c=k(o[0],e.x0shift),m=k(o[1],e.x1shift),w=g[0](e.x0)+c,S=g[1](e.x1)+m;else if(c=k(o,e.x0shift),m=k(o,e.x1shift),e.xsizemode==="pixel"){let O=g(e.xanchor);w=O+e.x0+c,S=O+e.x1+m}else w=g(e.x0)+c,S=g(e.x1)+m;if(r==="array")h=k(s[0],e.y0shift),v=k(s[1],e.y1shift),M=i[0](e.y0)+h,C=i[1](e.y1)+v;else if(h=k(s,e.y0shift),v=k(s,e.y1shift),e.ysizemode==="pixel"){let O=i(e.yanchor);M=O-e.y0+h,C=O-e.y1+v}else M=i(e.y0)+h,C=i(e.y1)+v;if(t==="line")return"M"+w+","+M+"L"+S+","+C;if(t==="rect")return"M"+w+","+M+"H"+S+"V"+C+"H"+w+"Z";var T=(w+S)/2,f=(M+C)/2,u=Math.abs(T-w),A=Math.abs(f-M),x="A"+u+","+A,z=T+u+","+f,I=T+","+(f-A);return"M"+z+x+" 0 1,1 "+I+x+" 0 0,1 "+z+"Z"};function E(l,e,t){let n=l.path,r=l.xsizemode,a=l.ysizemode,o=l.xanchor,s=l.yanchor,c=Array.isArray(l.xref),m=Array.isArray(l.yref);var h=0,v=0;return n.replace(V.segmentRE,function(g){var i=0,w=g.charAt(0),S=V.paramIsX[w],M=V.paramIsY[w],C=V.numParams[w];let _=S.drawn!==void 0,T=M.drawn!==void 0,f=c?e[h]:e,u=m?t[v]:t;var A=g.slice(1).replace(V.paramRE,function(x){return S[i]?r==="pixel"?x=f(o)+Number(x):x=f(x):M[i]&&(a==="pixel"?x=u(s)-Number(x):x=u(x)),i++,i>C&&(x="X"),x});return i>C&&(A=A.replace(/[\s,]*X.*/,""),p.log("Ignoring extra params in segment "+g)),_&&h++,T&&v++,w+A})}J.getPixelShift=k;function k(l,e){e=e||0;var t=0;return e&&l&&(l.type==="category"||l.type==="multicategory")&&(t=(l.r2p(1)-l.r2p(0))*e),t}}}),u5=ze({"src/components/shapes/display_labels.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=Cs(),k=$i(),l=uv().readPaths,e=cv(),t=e.getPathString,n=Sx(),r=dc().FROM_TL;V.exports=function(c,m,h,v){if(v.selectAll(".shape-label").remove(),!!(h.label.text||h.label.texttemplate)){var g;if(h.label.texttemplate){var i={};if(h.type!=="path"){var w=b.getFromId(c,h.xref),S=b.getFromId(c,h.yref);let Z=Array.isArray(h.xref),ee=Array.isArray(h.yref);for(var M in n){var C=typeof n[M]=="function",_=!Z||n.simpleXVariables.includes(M),T=!ee||n.simpleYVariables.includes(M);if(C&&_&&T){var f=n[M](h,w,S);f!==void 0&&(i[M]=f)}}}g=p.texttemplateStringForShapes({data:[i],fallback:h.label.texttemplatefallback,locale:c._fullLayout._d3locale,template:h.label.texttemplate})}else g=h.label.text;var u={"data-index":m},A=h.label.font,x={"data-notex":1},z=v.append("g").attr(u).classed("shape-label",!0),I=z.append("text").attr(x).classed("shape-label-text",!0).text(g),O,D,B,F;if(h.path){var P=t(c,h),j=l(P,c);O=1/0,B=1/0,D=-1/0,F=-1/0;for(var U=0;Ue.getDataToPixel(c,ve,ce,!1,le)(_e),ke=(_e,ce,ve,le)=>e.getDataToPixel(c,ve,ce,!0,le)(_e);if(h.xsizemode==="pixel"){let _e=Ge(h.xanchor,void 0,ae,Me),ce=e.getPixelShift(ae,h.x0shift),ve=e.getPixelShift(ae,h.x1shift);O=_e+h.x0+ce,D=_e+h.x1+ve}else O=Ge(h.x0,h.x0shift,ae,Me),D=Ge(h.x1,h.x1shift,he,Se);if(h.ysizemode==="pixel"){let _e=ke(h.yanchor,void 0,xe,Ie),ce=e.getPixelShift(xe,h.y0shift),ve=e.getPixelShift(xe,h.y1shift);B=_e-h.y0+ce,F=_e-h.y1+ve}else B=ke(h.y0,h.y0shift,xe,Ie),F=ke(h.y1,h.y1shift,we,Ve)}var G=h.label.textangle;G==="auto"&&(h.type==="line"?G=a(O,B,D,F):G=0),I.call(function(Z){return Z.call(k.font,A).attr({}),E.convertToTspans(Z,c),Z});var X=k.bBox(I.node()),K=o(O,B,D,F,h,G,X),H=K.textx,Y=K.texty,q=K.xanchor;I.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[q],y:Y,x:H,transform:"rotate("+G+","+H+","+Y+")"}).call(E.positionText,H,Y)}};function a(s,c,m,h){var v,g;return g=Math.abs(m-s),m>=s?v=c-h:v=h-c,-180/Math.PI*Math.atan2(v,g)}function o(s,c,m,h,v,g,i){var w=v.label.textposition,S=v.label.textangle,M=v.label.padding,C=v.type,_=Math.PI/180*g,T=Math.sin(_),f=Math.cos(_),u=v.label.xanchor,A=v.label.yanchor,x,z,I,O;if(C==="line"){w==="start"?(x=s,z=c):w==="end"?(x=m,z=h):(x=(s+m)/2,z=(c+h)/2),u==="auto"&&(w==="start"?S==="auto"?m>s?u="left":ms?u="right":ms?u="right":ms?u="left":m1&&!(ke.length===2&&ke[1][0]==="Z")&&(G===0&&(ke[0][0]="M"),x[se]=ke,B(),F())}}function he(ke,_e){if(ke===2){se=+_e.srcElement.getAttribute("data-i"),G=+_e.srcElement.getAttribute("data-j");var ce=x[se];!g(ce)&&!i(ce)&&ae()}}function xe(ke){re=[];for(var _e=0;_e{if(!I._dragging&&I._fullLayout.hoveranywhere){let j=F(P);j&&c.hover(I,j,D.id)}}),B.addEventListener("click",P=>{if(!I._dragged&&I._fullLayout.clickanywhere){let j=F(P);j&&c.click(I,j,D.id)}})}function _(I,O,D){let B=D.xref,F=D.yref;if(Array.isArray(B)||Array.isArray(F)){let P="clip"+O._fullLayout._uid+"shape"+D._index,j=T(O,B,F);E.ensureSingleById(O._fullLayout._clips,"clipPath",P,function(U){U.append("rect")}).select("rect").attr(j),a.setClipUrl(I,P,O)}else{let P=(B+F).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");a.setClipUrl(I,P?"clip"+O._fullLayout._uid+P:null,O)}}function T(I,O,D){let B=I._fullLayout._size;function F(U,$){let Q=(Array.isArray(U)?U:[U]).map(se=>k.getFromId(I,se)).filter(Boolean);if(!Q.length)return $?[B.t,B.t+B.h]:[B.l,B.l+B.w];let re=Q.map(function(se){return se._offset}),ne=Q.map(function(se){return se._offset+se._length});return[Math.min(...re),Math.max(...ne)]}let P=F(O,!1),j=F(D,!0);return{x:P[0],y:j[0],width:P[1]-P[0],height:j[1]-j[0]}}function f(I,O,D,B,F,P){var j=10,U=10,$=D.xsizemode==="pixel",Q=D.ysizemode==="pixel",re=D.type==="line",ne=D.type==="path",se=P.modifyItem,G,X,K,H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve=p.select(O.node().parentNode),Ge=k.getFromId(I,D.xref),ke=k.getRefType(D.xref),_e=k.getFromId(I,D.yref),ce=k.getRefType(D.yref),ve=D.x0shift,le=D.x1shift,Ae=D.y0shift,Be=D.y1shift,Xe=function(Je,et){var Mt=v.getDataToPixel(I,Ge,et,!1,ke);return Mt(Je)},Ye=function(Je,et){var Mt=v.getDataToPixel(I,_e,et,!0,ce);return Mt(Je)},yt=v.getPixelToData(I,Ge,!1,ke),gt=v.getPixelToData(I,_e,!0,ce),Tt=rr(),At={element:Tt.node(),gd:I,prepFn:or,doneFn:Ot,clickFn:vt},$t;s.init(At),Tt.node().onmousemove=Xt;function rr(){return re?_r():O}function _r(){var Je=10,et=Math.max(D.line.width,Je),Mt=F.append("g").attr("data-index",B).attr("drag-helper",!0);Mt.append("path").attr("d",O.attr("d")).style({cursor:"move","stroke-width":et,"stroke-opacity":"0"});var pt={"fill-opacity":"0"},Pt=Math.max(et/2,Je);return Mt.append("circle").attr({"data-line-point":"start-point",cx:$?Xe(D.xanchor)+D.x0:Xe(D.x0,ve),cy:Q?Ye(D.yanchor)-D.y0:Ye(D.y0,Ae),r:Pt}).style(pt).classed("cursor-grab",!0),Mt.append("circle").attr({"data-line-point":"end-point",cx:$?Xe(D.xanchor)+D.x1:Xe(D.x1,le),cy:Q?Ye(D.yanchor)-D.y1:Ye(D.y1,Be),r:Pt}).style(pt).classed("cursor-grab",!0),Mt}function Xt(Je){if(w(I)){$t=null;return}if(re)Je.target.tagName==="path"?$t="move":$t=Je.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var et=At.element.getBoundingClientRect(),Mt=et.right-et.left,pt=et.bottom-et.top,Pt=Je.clientX-et.left,Ct=Je.clientY-et.top,qt=!ne&&Mt>j&&pt>U&&!Je.shiftKey?s.getCursor(Pt/Mt,1-Ct/pt):"move";m(O,qt),$t=qt.split("-")[0]}}function or(Je){w(I)||($&&(Y=Xe(D.xanchor)),Q&&(q=Ye(D.yanchor)),D.type==="path"?Ie=D.path:(G=$?D.x0:Xe(D.x0),X=Q?D.y0:Ye(D.y0),K=$?D.x1:Xe(D.x1),H=Q?D.y1:Ye(D.y1)),GH?(Z=X,xe="y0",ee=H,we="y1"):(Z=H,xe="y1",ee=X,we="y0"),Xt(Je),Ne(F,D),Ke(O,D,I),At.moveFn=$t==="move"?ht:De,At.altKey=Je.altKey)}function Ot(){w(I)||(m(O),We(F),_(O,I,D),b.call("_guiRelayout",I,P.getUpdateObj()))}function vt(){w(I)||We(F)}function ht(Je,et){if(D.type==="path"){var Mt=function(Ct){return Ct},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(Y+Je)):(pt=function(qt){return yt(Xe(qt)+Je)},Ge&&Ge.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(qt){return gt(Ye(qt)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else $?se("xanchor",D.xanchor=yt(Y+Je)):(se("x0",D.x0=yt(G+Je)),se("x1",D.x1=yt(K+Je))),Q?se("yanchor",D.yanchor=gt(q+et)):(se("y0",D.y0=gt(X+et)),se("y1",D.y1=gt(H+et)));O.attr("d",g(I,D)),Ne(F,D),t(I,B,D,Ve)}function De(Je,et){if(ne){var Mt=function(Zr){return Zr},pt=Mt,Pt=Mt;$?se("xanchor",D.xanchor=yt(Y+Je)):(pt=function(ha){return yt(Xe(ha)+Je)},Ge&&Ge.type==="date"&&(pt=v.encodeDate(pt))),Q?se("yanchor",D.yanchor=gt(q+et)):(Pt=function(ha){return gt(Ye(ha)+et)},_e&&_e.type==="date"&&(Pt=v.encodeDate(Pt))),se("path",D.path=u(Ie,pt,Pt))}else if(re){if($t==="resize-over-start-point"){var Ct=G+Je,qt=Q?X-et:X+et;se("x0",D.x0=$?Ct:yt(Ct)),se("y0",D.y0=Q?qt:gt(qt))}else if($t==="resize-over-end-point"){var Vt=K+Je,Ht=Q?H-et:H+et;se("x1",D.x1=$?Vt:yt(Vt)),se("y1",D.y1=Q?Ht:gt(Ht))}}else{var Sr=function(Zr){return $t.indexOf(Zr)!==-1},Kr=Sr("n"),Yt=Sr("s"),Rt=Sr("w"),nr=Sr("e"),ur=Kr?Z+et:Z,cr=Yt?ee+et:ee,Rr=Rt?ae+Je:ae,Qr=nr?he+Je:he;Q&&(Kr&&(ur=Z-et),Yt&&(cr=ee-et)),(!Q&&cr-ur>U||Q&&ur-cr>U)&&(se(xe,D[xe]=Q?ur:gt(ur)),se(we,D[we]=Q?cr:gt(cr))),Qr-Rr>j&&(se(Me,D[Me]=$?Rr:yt(Rr)),se(Se,D[Se]=$?Qr:yt(Qr)))}O.attr("d",g(I,D)),Ne(F,D),t(I,B,D,Ve)}function Ne(Je,et){($||Q)&&Mt();function Mt(){var pt=et.type!=="path",Pt=Je.selectAll(".visual-cue").data([0]),Ct=1;Pt.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Ct}).classed("visual-cue",!0);var qt=Xe($?et.xanchor:E.midRange(pt?[et.x0,et.x1]:v.extractPathCoords(et.path,h.paramIsX))),Vt=Ye(Q?et.yanchor:E.midRange(pt?[et.y0,et.y1]:v.extractPathCoords(et.path,h.paramIsY)));if(qt=v.roundPositionForSharpStrokeRendering(qt,Ct),Vt=v.roundPositionForSharpStrokeRendering(Vt,Ct),$&&Q){var Ht="M"+(qt-1-Ct)+","+(Vt-1-Ct)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";Pt.attr("d",Ht)}else if($){var Sr="M"+(qt-1-Ct)+","+(Vt-9-Ct)+"v18 h2 v-18 Z";Pt.attr("d",Sr)}else{var Kr="M"+(qt-9-Ct)+","+(Vt-1-Ct)+"h18 v2 h-18 Z";Pt.attr("d",Kr)}}}function We(Je){Je.selectAll(".visual-cue").remove()}function Ke(Je,et,Mt){var pt=et.xref,Pt=et.yref,Ct=k.getFromId(Mt,pt),qt=k.getFromId(Mt,Pt),Vt="";pt!=="paper"&&!Ct.autorange&&(Vt+=pt),Pt!=="paper"&&!qt.autorange&&(Vt+=Pt),a.setClipUrl(Je,Vt?"clip"+Mt._fullLayout._uid+Vt:null,Mt)}}function u(I,O,D){return I.replace(h.segmentRE,function(B){var F=0,P=B.charAt(0),j=h.paramIsX[P],U=h.paramIsY[P],$=h.numParams[P],Q=B.slice(1).replace(h.paramRE,function(re){return F>=$||(j[F]?re=O(re):U[F]&&(re=D(re)),F++),re});return P+Q})}function A(I,O){if(S(I)){var D=O.node(),B=+D.getAttribute("data-index");if(B>=0){if(B===I._fullLayout._activeShapeIndex){x(I);return}I._fullLayout._activeShapeIndex=B,I._fullLayout._deactivateShape=x,i(I)}}}function x(I){if(S(I)){var O=I._fullLayout._activeShapeIndex;O>=0&&(n(I),delete I._fullLayout._activeShapeIndex,i(I))}}function z(I){if(S(I)){n(I);var O=I._fullLayout._activeShapeIndex,D=(I.layout||{}).shapes||[];if(O{let o=E(e),s=t.append("div").classed("plotly-cloud-dialog-box",!0);if(s.append("div").classed("plotly-cloud-dialog-title",!0).text(o.DIALOG_TITLE),n===b.plotlyServerURL){let m=s.append("div").classed("plotly-cloud-dialog-message",!0),h=new URL(n).origin,v=o.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),g=v[0],i=v[2],w=v[4];m.append("span").text(g),m.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",h).attr("target","_blank").text(i),m.append("span").text(w),m.append("div").classed("plotly-cloud-dialog-message--account",!0).text(o.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let m=new URL(n),h=m.hostname,v=m.origin,g=o.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),i=g[0],w=g[4],S=s.append("div").classed("plotly-cloud-dialog-message",!0);S.append("span").text(i),S.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",v).attr("target","_blank").text(h),S.append("span").text(w)}let c=s.append("div").classed("plotly-cloud-dialog-buttons",!0);c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(o.DIALOG_CANCEL).on("click",a),c.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(o.DIALOG_CONFIRM).on("click",r)},l=(e,t,n)=>{let r=p.select(e._fullLayout._paperdiv.node());r.selectAll(".plotly-cloud-dialog").remove();let a=r.append("div").classed("plotly-cloud-dialog",!0),o=()=>{a.remove(),document.removeEventListener("keydown",s)},s=c=>{(c.key==="Escape"||c.keyCode===27)&&o()};document.addEventListener("keydown",s),a.on("click",()=>{p.event.target===a.node()&&o()}),k(e,a,t,()=>{o(),n()},o)};V.exports=l}}),c5=ze({"src/components/modebar/buttons.js"(J,V){"use strict";var p=mi(),b=cl(),E=Xl(),k=Ix(),l=Ox().eraseActiveShape,e=rD(),t=Nr(),n=t._,r=V.exports={};r.toImage={name:"toImage",title:function(_){var T=_._context.toImageButtonOptions||{},f=T.format||"png";return f==="png"?n(_,"Download plot as a PNG"):n(_,"Download plot")},icon:k.camera,click:function(_){var T=_._context.toImageButtonOptions,f={format:T.format||"png"};t.notifier(n(_,"Preparing image - this may take a few seconds"),"long",_),["filename","width","height","scale"].forEach(function(u){u in T&&(f[u]=T[u])}),p.call("downloadImage",_,f).then(function(u){t.notifier(n(_,"Image download succeeded")+" - "+u,"long",_)}).catch(function(){t.notifier(n(_,"Sorry, there was a problem downloading your image!"),"long",_)})}},r.sendChartToCloud={name:"sendChartToCloud",title:function(_){return n(_,"Share chart...")},icon:k.cloudupload,click:function(_){var T=(window.PLOTLYENV||{}).BASE_URL||_._context.plotlyServerURL;if(!T){console.error("No destination URL provided (plotlyServerURL is empty)");return}var f;try{f=new URL(T)}catch{console.error("Invalid plotlyServerURL: "+T);return}let u=["http:","https:"];if(!u.includes(f.protocol)){console.error(`Invalid protocol '${f.protocol}' in plotlyServerURL '${T}'. Must be one of: ${u.join(", ")}`);return}e(_,T,function(){b.sendDataToCloud(_,T)})}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(_){return n(_,"Zoom")},attr:"dragmode",val:"zoom",icon:k.zoombox,click:a},r.pan2d={name:"pan2d",_cat:"pan",title:function(_){return n(_,"Pan")},attr:"dragmode",val:"pan",icon:k.pan,click:a},r.select2d={name:"select2d",_cat:"select",title:function(_){return n(_,"Box Select")},attr:"dragmode",val:"select",icon:k.selectbox,click:a},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(_){return n(_,"Lasso Select")},attr:"dragmode",val:"lasso",icon:k.lasso,click:a},r.drawclosedpath={name:"drawclosedpath",title:function(_){return n(_,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:k.drawclosedpath,click:a},r.drawopenpath={name:"drawopenpath",title:function(_){return n(_,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:k.drawopenpath,click:a},r.drawline={name:"drawline",title:function(_){return n(_,"Draw line")},attr:"dragmode",val:"drawline",icon:k.drawline,click:a},r.drawrect={name:"drawrect",title:function(_){return n(_,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:k.drawrect,click:a},r.drawcircle={name:"drawcircle",title:function(_){return n(_,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:k.drawcircle,click:a},r.eraseshape={name:"eraseshape",title:function(_){return n(_,"Erase active shape")},icon:k.eraseshape,click:l},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(_){return n(_,"Zoom in")},attr:"zoom",val:"in",icon:k.zoom_plus,click:a},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(_){return n(_,"Zoom out")},attr:"zoom",val:"out",icon:k.zoom_minus,click:a},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(_){return n(_,"Autoscale")},attr:"zoom",val:"auto",icon:k.autoscale,click:a},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(_){return n(_,"Reset axes")},attr:"zoom",val:"reset",icon:k.home,click:a},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(_){return n(_,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:k.tooltip_basic,gravity:"ne",click:a},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(_){return n(_,"Compare data on hover")},attr:"hovermode",val:function(_){return _._fullLayout._isHoriz?"y":"x"},icon:k.tooltip_compare,gravity:"ne",click:a};function a(_,T){var f=T.currentTarget,u=f.getAttribute("data-attr"),A=f.getAttribute("data-val")||!0,x=_._fullLayout,z={},I=E.list(_,null,!0),O=x._cartesianSpikesEnabled,D,B;if(u==="zoom"){var F=A==="in"?.5:2,P=(1+F)/2,j=(1-F)/2,U,$;for(B=0;B-K),[$,Q]=F.invert(B.midPt),{minscale:re}=D.projection,ne=(f=D.projection.maxscale)!=null?f:1/0,se=Math.min(re,ne),G=Math.max(re,ne),X=x==="in"?h*P:1/h*P;X>G?X=G:Xd5});var jx,h5,d5,p5=zi({"src/components/modebar/attributes.ts"(){"use strict";jx=Yl(f5()),h5={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["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`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${jx.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${jx.default.foreButtons.join("*, *")}*.`].join(" ")}},d5=h5}}),aD=ze({"src/components/modebar/defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=(p5(),Po(Nx)).default;V.exports=function(e,t){var n=e.modebar||{},r=E.newContainer(t,"modebar");function a(s,c){return p.coerce(n,r,k,s,c)}a("orientation"),a("bgcolor",b.addOpacity(t.paper_bgcolor,.5));var o=b.contrast(b.rgb(t.modebar.bgcolor));a("color",b.addOpacity(o,.3)),a("activecolor",b.addOpacity(o,.7)),a("uirevision",t.uirevision),a("add"),a("remove")}}}),nD=ze({"src/components/modebar/modebar.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=Ix(),l=ev().version,e=new DOMParser;function t(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var n=t.prototype;n.update=function(o,s){this.graphInfo=o;var c=this.graphInfo._context,m=this.graphInfo._fullLayout,h="modebar-"+m._uid;this.element.setAttribute("id",h),this.element.setAttribute("role","toolbar"),this._uid=h,this.element.className="modebar modebar--custom",c.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),m.modebar.orientation==="v"&&(this.element.className+=" vertical",s=s.reverse());var v=m.modebar,g="#"+h+" .modebar-group";document.querySelectorAll(g).forEach(function(C){C.style.backgroundColor=v.bgcolor});var i=!this.hasButtons(s),w=this.hasLogo!==c.displaylogo,S=this.locale!==c.locale;if(this.locale=c.locale,(i||w||S)&&(this.removeAllButtons(),this.updateButtons(s),c.watermark||c.displaylogo)){var M=this.getLogo();c.watermark&&(M.className=M.className+" watermark"),m.modebar.orientation==="v"?this.element.insertBefore(M,this.element.childNodes[0]):this.element.appendChild(M),this.hasLogo=!0}this.updateActiveButton(),E.setStyleOnHover("#"+h+" .modebar-btn",".active",".icon path","fill: "+v.activecolor,"fill: "+v.color,this.element)},n.updateButtons=function(o){var s=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(c){var m=s.createGroup();c.forEach(function(h){var v=h.name;if(!v)throw new Error("must provide button 'name' in button config");if(s.buttonsNames.indexOf(v)!==-1)throw new Error("button name '"+v+"' is taken");s.buttonsNames.push(v);var g=s.createButton(h);s.buttonElements.push(g),m.appendChild(g)}),s.element.appendChild(m)})},n.createGroup=function(){var o=document.createElement("div");o.className="modebar-group";var s=this.graphInfo._fullLayout.modebar;return o.style.backgroundColor=s.bgcolor,o},n.createButton=function(o){var s=this,c=document.createElement("button");c.setAttribute("type","button"),c.setAttribute("rel","tooltip"),c.className="modebar-btn";var m=o.title;m===void 0?m=o.name:typeof m=="function"&&(m=m(this.graphInfo)),(m||m===0)&&(c.setAttribute("data-title",m),c.setAttribute("aria-label",m)),o.attr!==void 0&&c.setAttribute("data-attr",o.attr);var h=o.val;h!==void 0&&(typeof h=="function"&&(h=h(this.graphInfo)),c.setAttribute("data-val",h));var v=o.click;if(typeof v!="function")throw new Error("must provide button 'click' function in button config");c.addEventListener("click",function(i){o.click(s.graphInfo,i),s.updateActiveButton(i.currentTarget)}),c.setAttribute("data-toggle",o.toggle||!1),o.toggle&&p.select(c).classed("active",!0);var g=o.icon;return typeof g=="function"?c.appendChild(g()):c.appendChild(this.createIcon(g||k.question)),c.setAttribute("data-gravity",o.gravity||"n"),c},n.createIcon=function(o){var s=b(o.height)?Number(o.height):o.ascent-o.descent,c="http://www.w3.org/2000/svg",m;if(o.path){m=document.createElementNS(c,"svg"),m.setAttribute("viewBox",[0,0,o.width,s].join(" ")),m.setAttribute("class","icon");var h=document.createElementNS(c,"path");h.setAttribute("d",o.path),o.transform?h.setAttribute("transform",o.transform):o.ascent!==void 0&&h.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),m.appendChild(h)}if(o.svg){var v=e.parseFromString(o.svg,"application/xml");m=v.childNodes[0]}return m.setAttribute("height","1em"),m.setAttribute("width","1em"),m},n.updateActiveButton=function(o){var s=this.graphInfo._fullLayout,c=o!==void 0?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(m){var h=m.getAttribute("data-val")||!0,v=m.getAttribute("data-attr"),g=m.getAttribute("data-toggle")==="true",i=p.select(m),w=function(C,_){var T=s.modebar,f=C.querySelector(".icon path");f&&(_||C.matches(":hover")?f.style.fill=T.activecolor:f.style.fill=T.color)};if(g){if(v===c){var S=!i.classed("active");i.classed("active",S),w(m,S)}}else{var M=v===null?v:E.nestedProperty(s,v).get();i.classed("active",M===h),w(m,M===h)}})},n.hasButtons=function(o){var s=this.buttons;if(!s||o.length!==s.length)return!1;for(var c=0;c1?(re=["toggleHover"],ne=["resetViews"]):u?(Q=["zoomInGeo","zoomOutGeo"],re=["hoverClosestGeo"],ne=["resetGeo"]):f?(re=["hoverClosest3d"],ne=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(Q=["zoomInMap","zoomOutMap"],re=["toggleHover"],ne=["resetViewMap"]):A?re=["hoverClosestPie"]:B?(re=["hoverClosestCartesian","hoverCompareCartesian"],ne=["resetViewSankey"]):re=["toggleHover"],T&&re.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),(s(g)||P)&&(re=[]),T&&!F&&(Q=["zoomIn2d","zoomOut2d","autoScale2d"],ne[0]!=="resetViews"&&(ne=["resetScale2d"])),f?se=["zoom3d","pan3d","orbitRotation","tableRotation"]:T&&!F||z?se=["zoom2d","pan2d"]:I||u?se=["pan2d"]:O&&(se=["zoom2d"]),o(g)&&se.push("select2d","lasso2d");var G=[],X=function(q){G.indexOf(q)===-1&&re.indexOf(q)!==-1&&G.push(q)};if(Array.isArray(C)){for(var K=[],H=0;HS?g.slice(S):i.slice(w))+M}function c(h,v){for(var g=v._size,i=g.h/g.w,w={},S=Object.keys(h),M=0;Me*z&&!B)){for(S=0;SG&&aene&&(ne=ae);var xe=(ne-re)/(2*se);u/=xe,re=_.l2r(re),ne=_.l2r(ne),_.range=_._input.range=U<$?[re,ne]:[ne,re]}m(_,u)}}}},J.getAxisGroup=function(v,g){for(var i=v._axisMatchGroups,w=0;w=F[1]||$[1]<=F[0])&&Q[0]P[0])return!0}return!1}function M(F){var P=F._fullLayout,j=P._size,U=j.p,$=a.list(F,"",!0),Q,re,ne,se,G,X;if(P._paperdiv.style({width:F._context.responsive&&P.autosize&&!F._context._hasZeroWidth&&!F.layout.width?"100%":P.width+"px",height:F._context.responsive&&P.autosize&&!F._context._hasZeroHeight&&!F.layout.height?"100%":P.height+"px"}).selectAll(".main-svg").call(t.setSize,P.width,P.height),F._context.setBackground(F,P.paper_bgcolor),J.drawMainTitle(F),r.manage(F),!P._has("cartesian"))return b.previousPromises(F);function K(De,Ne,We){var Ke=De._lw/2;if(De._id.charAt(0)==="x"){if(Ne){if(We==="top")return Ne._offset-U-Ke}else return j.t+j.h*(1-(De.position||0))+Ke%1;return Ne._offset+Ne._length+U+Ke}if(Ne){if(We==="right")return Ne._offset+Ne._length+U+Ke}else return j.l+j.w*(De.position||0)+Ke%1;return Ne._offset-U-Ke}for(Q=0;Q<$.length;Q++){se=$[Q];var H=se._anchorAxis;se._linepositions={},se._lw=t.crispRound(F,se.linewidth,1),se._mainLinePosition=K(se,H,se.side),se._mainMirrorPosition=se.mirror&&H?K(se,H,o.OPPOSITE_SIDE[se.side]):null}var Y=[],q=[],Z=[],ee=e.opacity(P.paper_bgcolor)===1&&e.opacity(P.plot_bgcolor)===1&&P.paper_bgcolor===P.plot_bgcolor;for(re in P._plots)if(ne=P._plots[re],ne.mainplot)ne.bg&&ne.bg.remove(),ne.bg=void 0;else{var ae=ne.xaxis.domain,he=ne.yaxis.domain,xe=ne.plotgroup;if(S(ae,he,Z)&&re.indexOf(w)===-1){var we=xe.node(),Me=ne.bg=E.ensureSingle(xe,"rect","bg");we.insertBefore(Me.node(),we.childNodes[0]),q.push(re)}else xe.select("rect.bg").remove(),Z.push([ae,he]),ee||(Y.push(re),q.push(re))}var Se=P._bgLayer.selectAll(".bg").data(Y);for(Se.enter().append("rect").classed("bg",!0),Se.exit().remove(),Se.each(function(De){P._plots[De].bg=V.select(this)}),Q=0;Q0){x(F,Q,G,se),ne.attr({x:re,y:Q,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Q);var X=(P.text.match(k.BR_TAG_ALL)||[]).length;if(X){var K=o.LINE_SPACING*X+o.MID_SHIFT;P.y===0&&(K=-K),ne.selectAll(".line").each(function(){var ee=+this.getAttribute("dy").slice(0,-2)-K+"em";this.setAttribute("dy",ee)})}var H=V.select(F).selectAll(".gtitle-subtitle");if(H.node()){var Y=ne.node().getBBox(),q=Y.y+Y.height,Z=q+n.SUBTITLE_PADDING_EM*P.subtitle.font.size;H.attr({x:re,y:Z,"text-anchor":U,dy:O(P.yanchor)}).call(k.positionText,re,Z)}}}};function f(F,P,j,U,$){var Q=P.yref==="paper"?F._fullLayout._size.h:F._fullLayout.height,re=E.isTopAnchor(P)?U:U-$,ne=j==="b"?Q-re:re;return E.isTopAnchor(P)&&j==="t"||E.isBottomAnchor(P)&&j==="b"?!1:ne<$}function u(F,P,j,U,$){var Q=0;return j==="middle"&&(Q+=$/2),F==="t"?(j==="top"&&(Q+=$),Q+=U-P*U):(j==="bottom"&&(Q+=$),Q+=P*U),Q}function A(F,P,j){var U=P.y,$=P.yanchor,Q=U>.5?"t":"b",re=F._fullLayout.margin[Q],ne=0;return P.yref==="paper"?ne=j+P.pad.t+P.pad.b:P.yref==="container"&&(ne=u(Q,U,$,F._fullLayout.height,j)+P.pad.t+P.pad.b),ne>re?ne:0}function x(F,P,j,U){var $="title.automargin",Q=F._fullLayout.title,re=Q.y>.5?"t":"b",ne={x:Q.x,y:Q.y,t:0,b:0},se={};Q.yref==="paper"&&f(F,Q,re,P,U)?ne[re]=j:Q.yref==="container"&&(se[re]=j,F._fullLayout._reservedMargin[$]=se),b.allowAutoMargin(F,$),b.autoMargin(F,$,ne)}function z(F,P){var j=F.title,U=F._size,$=0;switch(P===v?$=j.pad.l:P===i&&($=-j.pad.r),j.xref){case"paper":return U.l+U.w*j.x+$;case"container":default:return F.width*j.x+$}}function I(F,P){var j=F.title,U=F._size,$=0;if(P==="0em"||!P?$=-j.pad.b:P===o.CAP_SHIFT+"em"&&($=j.pad.t),j.y==="auto")return U.t/2;switch(j.yref){case"paper":return U.t+U.h-U.h*j.y+$;case"container":default:return F.height-F.height*j.y+$}}function O(F){return F==="top"?o.CAP_SHIFT+.3+"em":F==="bottom"?"-0.3em":o.MID_SHIFT+"em"}function D(F){var P=F.title,j=g;return E.isRightAnchor(P)?j=i:E.isLeftAnchor(P)&&(j=v),j}function B(F){var P=F.title,j="0em";return E.isTopAnchor(P)?j=o.CAP_SHIFT+"em":E.isMiddleAnchor(P)&&(j=o.MID_SHIFT+"em"),j}J.doTraceStyle=function(F){var P=F.calcdata,j=[],U;for(U=0;U=0;D--){var B=C.append("path").attr(T).style("opacity",D?.1:f).call(k.stroke,A).call(k.fill,u).call(l.dashLine,D?"solid":z,D?4+x:x);if(s(B,v,w),I){var F=e(v.layout,"selections",w);B.style({cursor:"move"});var P={element:B.node(),plotinfo:S,gd:v,editHelpers:F,isActiveSelection:!0},j=p(_,v);b(j,B,P)}else B.style("pointer-events",D?"all":"none");O[D]=B}var U=O[0],$=O[1];$.node().addEventListener("click",function(){return c(v,U)})}}function s(v,g,i){var w=i.xref+i.yref;l.setClipUrl(v,"clip"+g._fullLayout._uid+w,g)}function c(v,g){if(a(v)){var i=g.node(),w=+i.getAttribute("data-index");if(w>=0){if(w===v._fullLayout._activeSelectionIndex){h(v);return}v._fullLayout._activeSelectionIndex=w,v._fullLayout._deactivateSelection=h,r(v)}}}function m(v){if(a(v)){var g=v._fullLayout.selections.length-1;v._fullLayout._activeSelectionIndex=g,v._fullLayout._deactivateSelection=h,r(v)}}function h(v){if(a(v)){var g=v._fullLayout._activeSelectionIndex;g>=0&&(E(v),delete v._fullLayout._activeSelectionIndex,r(v))}}}}),oD=ze({"node_modules/polybooljs/lib/build-log.js"(J,V){function p(){var b,E=0,k=!1;function l(e,t){return b.list.push({type:e,data:t?JSON.parse(JSON.stringify(t)):void 0}),b}return b={list:[],segmentId:function(){return E++},checkIntersection:function(e,t){return l("check",{seg1:e,seg2:t})},segmentChop:function(e,t){return l("div_seg",{seg:e,pt:t}),l("chop",{seg:e,pt:t})},statusRemove:function(e){return l("pop_seg",{seg:e})},segmentUpdate:function(e){return l("seg_update",{seg:e})},segmentNew:function(e,t){return l("new_seg",{seg:e,primary:t})},segmentRemove:function(e){return l("rem_seg",{seg:e})},tempStatus:function(e,t,n){return l("temp_status",{seg:e,above:t,below:n})},rewind:function(e){return l("rewind",{seg:e})},status:function(e,t,n){return l("status",{seg:e,above:t,below:n})},vert:function(e){return e===k?b:(k=e,l("vert",{x:e}))},log:function(e){return typeof e!="string"&&(e=JSON.stringify(e,!1," ")),l("log",{txt:e})},reset:function(){return l("reset")},selected:function(e){return l("selected",{segs:e})},chainStart:function(e){return l("chain_start",{seg:e})},chainRemoveHead:function(e,t){return l("chain_rem_head",{index:e,pt:t})},chainRemoveTail:function(e,t){return l("chain_rem_tail",{index:e,pt:t})},chainNew:function(e,t){return l("chain_new",{pt1:e,pt2:t})},chainMatch:function(e){return l("chain_match",{index:e})},chainClose:function(e){return l("chain_close",{index:e})},chainAddHead:function(e,t){return l("chain_add_head",{index:e,pt:t})},chainAddTail:function(e,t){return l("chain_add_tail",{index:e,pt:t})},chainConnect:function(e,t){return l("chain_con",{index1:e,index2:t})},chainReverse:function(e){return l("chain_rev",{index:e})},chainJoin:function(e,t){return l("chain_join",{index1:e,index2:t})},done:function(){return l("done")}},b}V.exports=p}}),sD=ze({"node_modules/polybooljs/lib/epsilon.js"(J,V){function p(b){typeof b!="number"&&(b=1e-10);var E={epsilon:function(k){return typeof k=="number"&&(b=k),b},pointAboveOrOnLine:function(k,l,e){var t=l[0],n=l[1],r=e[0],a=e[1],o=k[0],s=k[1];return(r-t)*(s-n)-(a-n)*(o-t)>=-b},pointBetween:function(k,l,e){var t=k[1]-l[1],n=e[0]-l[0],r=k[0]-l[0],a=e[1]-l[1],o=r*n+t*a;if(o-b)},pointsSameX:function(k,l){return Math.abs(k[0]-l[0])b!=r-t>b&&(n-s)*(t-c)/(r-c)+s-e>b&&(a=!a),n=s,r=c}return a}};return E}V.exports=p}}),lD=ze({"node_modules/polybooljs/lib/linked-list.js"(J,V){var p={create:function(){var b={root:{root:!0,next:null},exists:function(E){return!(E===null||E===b.root)},isEmpty:function(){return b.root.next===null},getHead:function(){return b.root.next},insertBefore:function(E,k){for(var l=b.root,e=b.root.next;e!==null;){if(k(e)){E.prev=e.prev,E.next=e,e.prev.next=E,e.prev=E;return}l=e,e=e.next}l.next=E,E.prev=l,E.next=null},findTransition:function(E){for(var k=b.root,l=b.root.next;l!==null&&!E(l);)k=l,l=l.next;return{before:k===b.root?null:k,after:l,insert:function(e){return e.prev=k,e.next=l,k.next=e,l!==null&&(l.prev=e),e}}}};return b},node:function(b){return b.prev=null,b.next=null,b.remove=function(){b.prev.next=b.next,b.next&&(b.next.prev=b.prev),b.prev=null,b.next=null},b}};V.exports=p}}),uD=ze({"node_modules/polybooljs/lib/intersecter.js"(J,V){var p=lD();function b(E,k,l){function e(g,i){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:null,below:null},otherFill:null}}function t(g,i,w){return{id:l?l.segmentId():-1,start:g,end:i,myFill:{above:w.myFill.above,below:w.myFill.below},otherFill:null}}var n=p.create();function r(g,i,w,S,M,C){var _=k.pointsCompare(i,M);return _!==0?_:k.pointsSame(w,C)?0:g!==S?g?1:-1:k.pointAboveOrOnLine(w,S?M:C,S?C:M)?1:-1}function a(g,i){n.insertBefore(g,function(w){var S=r(g.isStart,g.pt,i,w.isStart,w.pt,w.other.pt);return S<0})}function o(g,i){var w=p.node({isStart:!0,pt:g.start,seg:g,primary:i,other:null,status:null});return a(w,g.end),w}function s(g,i,w){var S=p.node({isStart:!1,pt:i.end,seg:i,primary:w,other:g,status:null});g.other=S,a(S,g.pt)}function c(g,i){var w=o(g,i);return s(w,g,i),w}function m(g,i){l&&l.segmentChop(g.seg,i),g.other.remove(),g.seg.end=i,g.other.pt=i,a(g.other,g.pt)}function h(g,i){var w=t(i,g.seg.end,g.seg);return m(g,i),c(w,g.primary)}function v(g,i){var w=p.create();function S(F,P){var j=F.seg.start,U=F.seg.end,$=P.seg.start,Q=P.seg.end;return k.pointsCollinear(j,$,Q)?k.pointsCollinear(U,$,Q)||k.pointAboveOrOnLine(U,$,Q)?1:-1:k.pointAboveOrOnLine(j,$,Q)?1:-1}function M(F){return w.findTransition(function(P){var j=S(F,P.ev);return j>0})}function C(F,P){var j=F.seg,U=P.seg,$=j.start,Q=j.end,re=U.start,ne=U.end;l&&l.checkIntersection(j,U);var se=k.linesIntersect($,Q,re,ne);if(se===!1){if(!k.pointsCollinear($,Q,re)||k.pointsSame($,ne)||k.pointsSame(Q,re))return!1;var G=k.pointsSame($,re),X=k.pointsSame(Q,ne);if(G&&X)return P;var K=!G&&k.pointBetween($,re,ne),H=!X&&k.pointBetween(Q,re,ne);if(G)return H?h(P,Q):h(F,ne),P;K&&(X||(H?h(P,Q):h(F,ne)),h(P,$))}else se.alongA===0&&(se.alongB===-1?h(F,re):se.alongB===0?h(F,se.pt):se.alongB===1&&h(F,ne)),se.alongB===0&&(se.alongA===-1?h(P,$):se.alongA===0?h(P,se.pt):se.alongA===1&&h(P,Q));return!1}for(var _=[];!n.isEmpty();){var T=n.getHead();if(l&&l.vert(T.pt[0]),T.isStart){let F=function(){if(A){var P=C(T,A);if(P)return P}return x?C(T,x):!1};var f=F;l&&l.segmentNew(T.seg,T.primary);var u=M(T),A=u.before?u.before.ev:null,x=u.after?u.after.ev:null;l&&l.tempStatus(T.seg,A?A.seg:!1,x?x.seg:!1);var z=F();if(z){if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,I&&(z.seg.myFill.above=!z.seg.myFill.above)}else z.seg.otherFill=T.seg.myFill;l&&l.segmentUpdate(z.seg),T.other.remove(),T.remove()}if(n.getHead()!==T){l&&l.rewind(T.seg);continue}if(E){var I;T.seg.myFill.below===null?I=!0:I=T.seg.myFill.above!==T.seg.myFill.below,x?T.seg.myFill.below=x.seg.myFill.above:T.seg.myFill.below=g,I?T.seg.myFill.above=!T.seg.myFill.below:T.seg.myFill.above=T.seg.myFill.below}else if(T.seg.otherFill===null){var O;x?T.primary===x.primary?O=x.seg.otherFill.above:O=x.seg.myFill.above:O=T.primary?i:g,T.seg.otherFill={above:O,below:O}}l&&l.status(T.seg,A?A.seg:!1,x?x.seg:!1),T.other.status=u.insert(p.node({ev:T}))}else{var D=T.status;if(D===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(w.exists(D.prev)&&w.exists(D.next)&&C(D.prev.ev,D.next.ev),l&&l.statusRemove(D.ev.seg),D.remove(),!T.primary){var B=T.seg.myFill;T.seg.myFill=T.seg.otherFill,T.seg.otherFill=B}_.push(T.seg)}n.getHead().remove()}return l&&l.done(),_}return E?{addRegion:function(g){for(var i,w=g[g.length-1],S=0;St!=h>t&&e<(m-s)*(t-c)/(h-c)+s;v&&(n=!n)}return n}}}),p1=ze({"src/lib/polygon.js"(J,V){"use strict";var p=Mx().dot,b=No().BADNUM,E=V.exports={};E.tester=function(l){var e=l.slice(),t=e[0][0],n=t,r=e[0][1],a=r,o;for((e[e.length-1][0]!==e[0][0]||e[e.length-1][1]!==e[0][1])&&e.push(e[0]),o=1;on||M===b||Ma||w&&c(i))}function h(i,w){var S=i[0],M=i[1];if(S===b||Sn||M===b||Ma)return!1;var C=e.length,_=e[0][0],T=e[0][1],f=0,u,A,x,z,I;for(u=1;uMath.max(A,_)||M>Math.max(x,T)))if(Mo||Math.abs(p(h,c))>n)return!0;return!1},E.filter=function(l,e){var t=[l[0]],n=0,r=0;function a(s){l.push(s);var c=t.length,m=n;t.splice(r+1);for(var h=m+1;h1){var o=l.pop();a(o)}return{addPt:a,raw:l,filtered:t}}}}),vD=ze({"src/components/selections/constants.js"(J,V){"use strict";V.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}}}),mD=ze({"src/components/selections/select.js"(J,V){"use strict";var p=dD(),b=pD(),E=mi(),k=$i().dashStyle,l=Qn(),e=Zl(),t=kh().makeEventData,n=Fd(),r=n.freeMode,a=n.rectMode,o=n.drawMode,s=n.openMode,c=n.selectMode,m=cv(),h=h1(),v=Bx(),g=iv().clearOutline,i=uv(),w=i.handleEllipse,S=i.readPaths,M=zx().newShapes,C=l5(),_=g5().activateLastSelection,T=Nr(),f=T.sorterAsc,u=p1(),A=Cx(),x=Xl().getFromId,z=f1(),I=d1().redrawReglTraces,O=vD(),D=O.MINSELECT,B=u.filter,F=u.tester,P=Fx(),j=P.p2r,U=P.axValue,$=P.getTransform;function Q(vt){return vt.subplot!==void 0}function re(vt,ht,De,Ne,We){var Ke=!Q(Ne),Je=r(We),et=a(We),Mt=s(We),pt=o(We),Pt=c(We),Ct=We==="drawline",qt=We==="drawcircle",Vt=Ct||qt,Ht=Ne.gd,Sr=Ht._fullLayout,Kr=Pt&&Sr.newselection.mode==="immediate"&&Ke,Yt=Sr._zoomlayer,Rt=Ne.element.getBoundingClientRect(),nr=Ne.plotinfo,ur=$(nr),cr=ht-Rt.left,Rr=De-Rt.top;Sr._calcInverseTransform(Ht);var Qr=T.apply3DTransform(Sr._invTransform)(cr,Rr);cr=Qr[0],Rr=Qr[1];var Zr=Sr._invScaleX,ha=Sr._invScaleY,Pa=cr,La=Rr,un="M"+cr+","+Rr,Xa=Ne.xaxes[0],ja=Ne.yaxes[0],Nn=Xa._length,yn=ja._length,Un=vt.altKey&&!(o(We)&&Mt),li,Yn,on,en,vi,Yi,Ja;H(vt,Ht,Ne),Je&&(li=B([[cr,Rr]],O.BENDPX));var Oa=Yt.selectAll("path.select-outline-"+nr.id).data([1]),lt=pt?Sr.newshape:Sr.newselection;pt&&(Ne.hasText=lt.label.text||lt.label.texttemplate);var rt=pt&&!Mt?lt.fillcolor:"rgba(0,0,0,0)",fr=lt.line.color||(Ke?l.contrast(Ht._fullLayout.plot_bgcolor):"#7f7f7f");Oa.enter().append("path").attr("class","select-outline select-outline-"+nr.id).style({opacity:pt?lt.opacity/2:1,"stroke-dasharray":k(lt.line.dash,lt.line.width),"stroke-width":lt.line.width+"px","shape-rendering":"crispEdges"}).call(l.stroke,fr).call(l.fill,rt).attr("fill-rule","evenodd").classed("cursor-move",!!pt).attr("transform",ur).attr("d",un+"Z");var lr=Yt.append("path").attr("class","zoombox-corners").style({fill:l.background,stroke:l.defaultLine,"stroke-width":1}).attr("transform",ur).attr("d","M0,0Z");if(pt&&Ne.hasText){var Tr=Yt.select(".label-temp");Tr.empty()&&(Tr=Yt.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var Ir=Sr._uid+O.SELECTID,Dr=[],ot=ae(Ht,Ne.xaxes,Ne.yaxes,Ne.subplot);Kr&&!vt.shiftKey&&(Ne._clearSubplotSelections=function(){if(Ke){var jt=Xa._id,ar=ja._id;Xe(Ht,jt,ar,ot);for(var Er=(Ht.layout||{}).selections||[],xr=[],zr=!1,Lr=0;Lr=0){Ht._fullLayout._deactivateShape(Ht);return}if(!pt){var Er=Sr.clickmode;A.done(Ir).then(function(){if(A.clear(Ir),jt===2){for(Oa.remove(),vi=0;vi-1&&ne(ar,Ht,Ne.xaxes,Ne.yaxes,Ne.subplot,Ne,Oa),Er==="event"&&or(Ht,void 0);e.click(Ht,ar,nr.id)}).catch(T.error)}},Ne.doneFn=function(){lr.remove(),A.done(Ir).then(function(){A.clear(Ir),!Kr&&en&&Ne.selectionDefs&&(en.subtract=Un,Ne.selectionDefs.push(en),Ne.mergedPolygons.length=0,[].push.apply(Ne.mergedPolygons,on)),(Kr||pt)&&Z(Ne,Kr),Ne.doneFnCompleted&&Ne.doneFnCompleted(Dr),Pt&&or(Ht,Ja)}).catch(T.error)}}function ne(vt,ht,De,Ne,We,Ke,Je){var et=ht._hoverdata,Mt=ht._fullLayout,pt=Mt.clickmode,Pt=pt.indexOf("event")>-1,Ct=[],qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;if(xe(et)){H(vt,ht,Ke),qt=ae(ht,De,Ne,We);var Rr=we(et,qt),Qr=Rr.pointNumbers.length>0;if(Qr?Se(qt,Rr):Ie(qt)&&(Rt=Me(Rr))){for(Je&&Je.remove(),cr=0;cr=0}function q(vt){return vt._fullLayout._activeSelectionIndex>=0}function Z(vt,ht){var De=vt.dragmode,Ne=vt.plotinfo,We=vt.gd;Y(We)&&We._fullLayout._deactivateShape(We),q(We)&&We._fullLayout._deactivateSelection(We);var Ke=We._fullLayout,Je=Ke._zoomlayer,et=o(De),Mt=c(De);if(et||Mt){var pt=Je.selectAll(".select-outline-"+Ne.id);if(pt&&We._fullLayout._outlining){var Pt;et&&(Pt=M(pt,vt)),Pt&&E.call("_guiRelayout",We,{shapes:Pt});var Ct;Mt&&!Q(vt)&&(Ct=C(pt,vt)),Ct&&(We._fullLayout._noEmitSelectedAtStart=!0,E.call("_guiRelayout",We,{selections:Ct}).then(function(){ht&&_(We)})),We._fullLayout._outlining=!1}}Ne.selection={},Ne.selection.selectionDefs=vt.selectionDefs=[],Ne.selection.mergedPolygons=vt.mergedPolygons=[]}function ee(vt){return vt._id}function ae(vt,ht,De,Ne){if(!vt.calcdata)return[];var We=[],Ke=ht.map(ee),Je=De.map(ee),et,Mt,pt;for(pt=0;pt0,Ke=We?Ne[0]:De;return ht.selectedpoints?ht.selectedpoints.indexOf(Ke)>-1:!1}function Se(vt,ht){var De=[],Ne,We,Ke,Je;for(Je=0;Je0&&De.push(Ne);if(De.length===1&&(Ke=De[0]===ht.searchInfo,Ke&&(We=ht.searchInfo.cd[0].trace,We.selectedpoints.length===ht.pointNumbers.length))){for(Je=0;Je1||(ht+=Ne.selectedpoints.length,ht>1)))return!1;return ht===1}function Ve(vt,ht,De){var Ne,We;for(Ne=0;Ne-1&&ht;if(!Je&&ht){var jt=yt(vt,!0);if(jt.length){var ar=jt[0].xref,Er=jt[0].yref;if(ar&&Er){var xr=At(jt),zr=rr([x(vt,ar,"x"),x(vt,Er,"y")]);zr(Dr,xr)}}vt._fullLayout._noEmitSelectedAtStart?vt._fullLayout._noEmitSelectedAtStart=!1:kt&&or(vt,Dr),qt._reselect=!1}if(!Je&&qt._deselect){var Lr=qt._deselect;et=Lr.xref,Mt=Lr.yref,Be(et,Mt,Pt)||Xe(vt,et,Mt,Ne),kt&&(Dr.points.length?or(vt,Dr):Ot(vt)),qt._deselect=!1}return{eventData:Dr,selectionTesters:De}}function Ae(vt){var ht=vt.calcdata;if(ht)for(var De=0;De=0){lt._fullLayout._deactivateShape(lt);return}var rt=lt._fullLayout.clickmode;if(G(lt),Ja===2&&!_e&&li(),ke)rt.indexOf("select")>-1&&T(Oa,lt,Be,Xe,he.id,pt),rt.indexOf("event")>-1&&a.click(lt,Oa,he.id);else if(Ja===1&&_e){var fr=Ie?ve:ce,lr=Ie==="s"||Ve==="w"?0:1,Tr=fr._name+".range["+lr+"]",Ir=F(fr,lr),Dr="left",ot="middle";if(fr.fixedrange)return;Ie?(ot=Ie==="n"?"top":"bottom",fr.side==="right"&&(Dr="right")):Ve==="e"&&(Dr="right"),lt._context.showAxisRangeEntryBoxes&&p.select(Mt).call(t.makeEditable,{gd:lt,immediate:!0,background:lt._fullLayout.paper_bgcolor,text:String(Ir),fill:fr.tickfont?fr.tickfont.color:"#444",horizontalAlign:Dr,verticalAlign:ot}).on("edit",function(kt){var jt=fr.d2r(kt);jt!==void 0&&l.call("_guiRelayout",lt,Tr,jt)})}}c.init(pt);var qt,Vt,Ht,Sr,Kr,Yt,Rt,nr,ur,cr;function Rr(Ja,Oa,lt){var rt=Mt.getBoundingClientRect();qt=Oa-rt.left,Vt=lt-rt.top,ae._fullLayout._calcInverseTransform(ae);var fr=b.apply3DTransform(ae._fullLayout._invTransform)(qt,Vt);qt=fr[0],Vt=fr[1],Ht={l:qt,r:qt,w:0,t:Vt,b:Vt,h:0},Sr=ae._hmpixcount?ae._hmlumcount/ae._hmpixcount:n.luminosity(ae._fullLayout.plot_bgcolor),Kr="M0,0H"+gt+"V"+Tt+"H0V0",Yt=!1,Rt="xy",cr=!1,nr=Q(Ge,Sr,Ye,yt,Kr),ur=re(Ge,Ye,yt)}function Qr(Ja,Oa){if(ae._transitioningWithDuration)return!1;var lt=Math.max(0,Math.min(gt,We*Ja+qt)),rt=Math.max(0,Math.min(Tt,Ke*Oa+Vt)),fr=Math.abs(lt-qt),lr=Math.abs(rt-Vt);Ht.l=Math.min(qt,lt),Ht.r=Math.max(qt,lt),Ht.t=Math.min(Vt,rt),Ht.b=Math.max(Vt,rt);function Tr(){Rt="",Ht.r=Ht.l,Ht.t=Ht.b,ur.attr("d","M0,0Z")}if(At.isSubplotConstrained)fr>x||lr>x?(Rt="xy",fr/gt>lr/Tt?(lr=fr*Tt/gt,Vt>rt?Ht.t=Vt-lr:Ht.b=Vt+lr):(fr=lr*gt/Tt,qt>lt?Ht.l=qt-fr:Ht.r=qt+fr),ur.attr("d",Y(Ht))):Tr();else if($t.isSubplotConstrained)if(fr>x||lr>x){Rt="xy";var Ir=Math.min(Ht.l/gt,(Tt-Ht.b)/Tt),Dr=Math.max(Ht.r/gt,(Tt-Ht.t)/Tt);Ht.l=Ir*gt,Ht.r=Dr*gt,Ht.b=(1-Ir)*Tt,Ht.t=(1-Dr)*Tt,ur.attr("d",Y(Ht))}else Tr();else!_r||lr0){var kt;if($t.isSubplotConstrained||!rr&&_r.length===1){for(kt=0;kt1&&(Tr.maxallowed!==void 0&&or===(Tr.range[0]1&&(Ir.maxallowed!==void 0&&Ot===(Ir.range[0]=0?Math.min(ae,.9):1/(1/Math.max(ae,-.3)+3.222))}function $(ae,he,xe){return ae?ae==="nsew"?xe?"":he==="pan"?"move":"crosshair":ae.toLowerCase()+"-resize":"pointer"}function Q(ae,he,xe,we,Me){return ae.append("path").attr("class","zoombox").style({fill:he>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",e(xe,we)).attr("d",Me+"Z")}function re(ae,he,xe){return ae.append("path").attr("class","zoombox-corners").style({fill:n.background,stroke:n.defaultLine,"stroke-width":1,opacity:0}).attr("transform",e(he,xe)).attr("d","M0,0Z")}function ne(ae,he,xe,we,Me,Se){ae.attr("d",we+"M"+xe.l+","+xe.t+"v"+xe.h+"h"+xe.w+"v-"+xe.h+"h-"+xe.w+"Z"),se(ae,he,Me,Se)}function se(ae,he,xe,we){xe||(ae.transition().style("fill",we>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),he.transition().style("opacity",1).duration(200))}function G(ae){p.select(ae).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function X(ae){z&&ae.data&&ae._context.showTips&&(b.notifier(b._(ae,"Double-click to zoom back out"),"long",ae),z=!1)}function K(ae,he){return"M"+(ae.l-.5)+","+(he-x-.5)+"h-3v"+(2*x+1)+"h3ZM"+(ae.r+.5)+","+(he-x-.5)+"h3v"+(2*x+1)+"h-3Z"}function H(ae,he){return"M"+(he-x-.5)+","+(ae.t-.5)+"v-3h"+(2*x+1)+"v3ZM"+(he-x-.5)+","+(ae.b+.5)+"v3h"+(2*x+1)+"v-3Z"}function Y(ae){var he=Math.floor(Math.min(ae.b-ae.t,ae.r-ae.l,x)/2);return"M"+(ae.l-3.5)+","+(ae.t-.5+he)+"h3v"+-he+"h"+he+"v-3h-"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.t-.5+he)+"h-3v"+-he+"h"+-he+"v-3h"+(he+3)+"ZM"+(ae.r+3.5)+","+(ae.b+.5-he)+"h-3v"+he+"h"+-he+"v3h"+(he+3)+"ZM"+(ae.l-3.5)+","+(ae.b+.5-he)+"h3v"+he+"h"+he+"v3h-"+(he+3)+"Z"}function q(ae,he,xe,we,Me){for(var Se=!1,Ie={},Ve={},Ge,ke,_e,ce,ve=(Me||{}).xaHash,le=(Me||{}).yaHash,Ae=0;Ae1&&b.warn("Full array edits are incompatible with other edits",c);var S=a[""][""];if(e(S))r.set(null);else if(Array.isArray(S))r.set(S);else return b.warn("Unrecognized full array edit value",c,S),!0;return g?!1:(m(i,w),h(n),!0)}var M=Object.keys(a).map(Number).sort(E),C=r.get(),_=C||[],T=s(w,c).get(),f=[],u=-1,A=_.length,x,z,I,O,D,B,F,P;for(x=0;x_.length-(F?0:1)){b.warn("index out of range",c,I);continue}if(B!==void 0)D.length>1&&b.warn("Insertion & removal are incompatible with edits to the same index.",c,I),e(B)?f.push(I):F?(B==="add"&&(B={}),_.splice(I,0,B),T&&T.splice(I,0,{})):b.warn("Unrecognized full object edit value",c,I,B),u===-1&&(u=I);else for(z=0;z=0;x--)_.splice(f[x],1),T&&T.splice(f[x],1);if(_.length?C||r.set(_):r.set(null),g)return!1;if(m(i,w),v!==p){var j;if(u===-1)j=M;else{for(A=Math.max(_.length,A),j=[],x=0;x=u));x++)j.push(I);for(x=u;x0&&b.log("Clearing previous rejected promises from queue."),g._promises=[]},J.cleanLayout=function(g){var i,w;g||(g={}),g.xaxis1&&(g.xaxis||(g.xaxis=g.xaxis1),delete g.xaxis1),g.yaxis1&&(g.yaxis||(g.yaxis=g.yaxis1),delete g.yaxis1),g.scene1&&(g.scene||(g.scene=g.scene1),delete g.scene1);var S=(E.subplotsRegistry.cartesian||{}).attrRegex,M=(E.subplotsRegistry.polar||{}).attrRegex,C=(E.subplotsRegistry.ternary||{}).attrRegex,_=(E.subplotsRegistry.gl3d||{}).attrRegex,T=Object.keys(g);for(i=0;i3?(B.x=1.02,B.xanchor="left"):B.x<-2&&(B.x=-.02,B.xanchor="right"),B.y>3?(B.y=1.02,B.yanchor="bottom"):B.y<-2&&(B.y=-.02,B.yanchor="top")),g.dragmode==="rotate"&&(g.dragmode="orbit"),g.template&&g.template.layout&&J.cleanLayout(g.template.layout),g};function r(g,i,w=!1){var S=g[i],M=i.charAt(0);w&&Array.isArray(S)||S&&S!=="paper"&&(g[i]=l(S,M,!0))}J.cleanData=function(g){for(var i=0;i0)return g.slice(0,i)}J.hasParent=function(g,i){for(var w=h(i);w;){if(w in g)return!0;w=h(w)}return!1},J.clearAxisTypes=function(g,i,w){for(var S=0;S{let w=(...S)=>S.every(M=>b.isPlainObject(M))||S.every(M=>Array.isArray(M));if([g,i].every(S=>Array.isArray(S))){if(g.length!==i.length)return!1;for(let S=0;Sb.isPlainObject(S))){if(Object.keys(g).length!==Object.keys(i).length)return!1;for(let S in g){if(S.startsWith("_"))continue;let M=g[S],C=i[S];if(M!==C&&!(w(M,C)?v(M,C):!1))return!1}return!0}return!1};J.collectionsAreEqual=v}}),Ux=ze({"src/plot_api/plot_api.js"(J){"use strict";var V=ci(),p=ao(),b=Gw(),E=Nr(),k=E.nestedProperty,l=Hm(),e=OI(),t=mi(),n=Wm(),r=cl(),a=Gi(),o=Qw(),s=cf(),c=$i(),m=Qn(),h=b5().initInteractions,v=nd(),g=_c().clearOutline,i=av().dfltConfig,w=xD(),S=bD(),M=d1(),C=Al(),_=hc().AX_NAME_PATTERN,T=0,f=5;function u(De,Ne,We,Ke){var Je;if(De=E.getGraphDiv(De),l.init(De),E.isPlainObject(Ne)){var et=Ne;Ne=et.data,We=et.layout,Ke=et.config,Je=et.frames}var Mt=l.triggerHandler(De,"plotly_beforeplot",[Ne,We,Ke]);if(Mt===!1)return Promise.reject();!Ne&&!We&&!E.isPlotDiv(De)&&E.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",De);function pt(){if(Je)return J.addFrames(De,Je)}O(De,Ke),We||(We={}),V.select(De).classed("js-plotly-plot",!0),c.makeTester(),Array.isArray(De._promises)||(De._promises=[]);var Pt=(De.data||[]).length===0&&Array.isArray(Ne);Array.isArray(Ne)&&(S.cleanData(Ne),Pt?De.data=Ne:De.data.push.apply(De.data,Ne),De.empty=!1),(!De.layout||Pt)&&(De.layout=S.cleanLayout(We)),r.supplyDefaults(De);var Ct=De._fullLayout,qt=Ct._has("cartesian");Ct._replotting=!0,(Pt||Ct._shouldCreateBgLayer)&&(ht(De),Ct._shouldCreateBgLayer&&delete Ct._shouldCreateBgLayer),c.initGradients(De),c.initPatterns(De),Pt&&a.saveShowSpikeInitial(De);var Vt=!De.calcdata||De.calcdata.length!==(De._fullData||[]).length;Vt&&r.doCalcdata(De);for(var Ht=0;Ht=De.data.length||Je<-De.data.length)throw new Error(We+" must be valid indices for gd.data.");if(Ne.indexOf(Je,Ke+1)>-1||Je>=0&&Ne.indexOf(-De.data.length+Je)>-1||Je<0&&Ne.indexOf(De.data.length+Je)>-1)throw new Error("each index in "+We+" must be unique.")}}function j(De,Ne,We){if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"currentIndices"),typeof We<"u"&&!Array.isArray(We)&&(We=[We]),typeof We<"u"&&P(De,We,"newIndices"),typeof We<"u"&&Ne.length!==We.length)throw new Error("current and new indices must be of equal length.")}function U(De,Ne,We){var Ke,Je;if(!Array.isArray(De.data))throw new Error("gd.data must be an array.");if(typeof Ne>"u")throw new Error("traces must be defined.");for(Array.isArray(Ne)||(Ne=[Ne]),Ke=0;Ke"u")throw new Error("indices must be an integer or array of integers");P(De,We,"indices");for(var et in Ne){if(!Array.isArray(Ne[et])||Ne[et].length!==We.length)throw new Error("attribute "+et+" must be an array of length equal to indices array length");if(Je&&(!(et in Ke)||!Array.isArray(Ke[et])||Ke[et].length!==Ne[et].length))throw new Error("when maxPoints is set as a key:value object it must contain a 1:1 correspondence with the keys and number of traces in the update object")}}function Q(De,Ne,We,Ke){var Je=E.isPlainObject(Ke),et=[],Mt,pt,Pt,Ct,qt;Array.isArray(We)||(We=[We]),We=F(We,De.data.length-1);for(var Vt in Ne)for(var Ht=0;Ht=0&&qt=0&&qt"u")return Ct=J.redraw(De),e.add(De,Je,Mt,et,pt),Ct;Array.isArray(We)||(We=[We]);try{j(De,Ke,We)}catch(qt){throw De.data.splice(De.data.length-Ne.length,Ne.length),qt}return e.startSequence(De),e.add(De,Je,Mt,et,pt),Ct=J.moveTraces(De,Ke,We),e.stopSequence(De),Ct}function K(De,Ne){De=E.getGraphDiv(De);var We=[],Ke=J.addTraces,Je=K,et=[De,We,Ne],Mt=[De,Ne],pt,Pt;if(typeof Ne>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(Ne)||(Ne=[Ne]),P(De,Ne,"indices"),Ne=F(Ne,De.data.length-1),Ne.sort(E.sorterDes),pt=0;pt"u")for(We=[],Ct=0;Ct0&&typeof Pa.parts[Xa]!="string";)Xa--;var ja=Pa.parts[Xa],Nn=Pa.parts[Xa-1]+"."+ja,yn=Pa.parts.slice(0,Xa).join("."),Un=k(De.layout,yn).get(),li=k(Ke,yn).get(),Yn=Pa.get();if(La!==void 0){nr[ha]=La,ur[ha]=ja==="reverse"?La:q(Yn);var on=n.getLayoutValObject(Ke,Pa.parts);if(on&&on.impliedEdits&&La!==null)for(var en in on.impliedEdits)cr(E.relativeAttr(ha,en),on.impliedEdits[en]);if(["width","height"].indexOf(ha)!==-1)if(La){cr("autosize",null);var vi=ha==="height"?"width":"height";cr(vi,Ke[vi])}else Ke[ha]=De._initialAutoSize[ha];else if(ha==="autosize")cr("width",La?null:Ke.width),cr("height",La?null:Ke.height);else if(Nn.match(Se))Zr(Nn),k(Ke,yn+"._inputRange").set(null);else if(Nn.match(Ie)){Zr(Nn),k(Ke,yn+"._inputRange").set(null);var Yi=k(Ke,yn).get();Yi._inputDomain&&(Yi._input.domain=Yi._inputDomain.slice())}else Nn.match(Ve)&&k(Ke,yn+"._inputDomain").set(null);if(ja==="type"){Qr=Un;var Ja=li.type==="linear"&&La==="log",Oa=li.type==="log"&&La==="linear";if(Ja||Oa){if(!Qr||!Qr.range)cr(yn+".autorange",!0);else if(li.autorange)Ja&&(Qr.range=Qr.range[1]>Qr.range[0]?[1,2]:[2,1]);else{var lt=Qr.range[0],rt=Qr.range[1];Ja?(lt<=0&&rt<=0&&cr(yn+".autorange",!0),lt<=0?lt=rt/1e6:rt<=0&&(rt=lt/1e6),cr(yn+".range[0]",Math.log(lt)/Math.LN10),cr(yn+".range[1]",Math.log(rt)/Math.LN10)):(cr(yn+".range[0]",Math.pow(10,lt)),cr(yn+".range[1]",Math.pow(10,rt)))}Array.isArray(Ke._subplots.polar)&&Ke._subplots.polar.length&&Ke[Pa.parts[0]]&&Pa.parts[1]==="radialaxis"&&delete Ke[Pa.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(De,li,La,cr),t.getComponentMethod("images","convertCoords")(De,li,La,cr)}else cr(yn+".autorange",!0),cr(yn+".range",null);k(Ke,yn+"._inputRange").set(null)}else if(ja.match(_)){var fr=k(Ke,ha).get(),lr=(La||{}).type;(!lr||lr==="-")&&(lr="linear"),t.getComponentMethod("annotations","convertCoords")(De,fr,lr,cr),t.getComponentMethod("images","convertCoords")(De,fr,lr,cr)}var Tr=w.containerArrayMatch(ha);if(Tr){qt=Tr.array,Vt=Tr.index;var Ir=Tr.property,Dr=on||{editType:"calc"};Vt!==""&&Ir===""&&(w.isAddVal(La)?ur[ha]=null:w.isRemoveVal(La)?ur[ha]=(k(We,qt).get()||[])[Vt]:E.warn("unrecognized full object value",Ne)),C.update(Rt,Dr),Ct[qt]||(Ct[qt]={});var ot=Ct[qt][Vt];ot||(ot=Ct[qt][Vt]={}),ot[Ir]=La,delete Ne[ha]}else ja==="reverse"?(Un.range?Un.range.reverse():(cr(yn+".autorange",!0),Un.range=[1,0]),li.autorange?Rt.calc=!0:Rt.plot=!0):(ha==="dragmode"&&(La===!1&&Yn!==!1||La!==!1&&Yn===!1)||Ke._has("scatter-like")&&Ke._has("regl")&&ha==="dragmode"&&(La==="lasso"||La==="select")&&!(Yn==="lasso"||Yn==="select")?Rt.plot=!0:on?C.update(Rt,on):Rt.calc=!0,Pa.set(La))}}for(qt in Ct){var kt=w.applyContainerArrayChanges(De,et(We,qt),Ct[qt],Rt,et);kt||(Rt.plot=!0)}for(var jt in Rr){Qr=a.getFromId(De,jt);var ar=Qr&&Qr._constraintGroup;if(ar){Rt.calc=!0;for(var Er in ar)Rr[Er]||(a.getFromId(De,Er)._constraintShrinkable=!0)}}(ke(De)||Ne.height||Ne.width)&&(Rt.plot=!0);var xr=Ke.shapes;for(Vt=0;Vt1;)if(Ke.pop(),We=k(Ne,Ke.join(".")+".uirevision").get(),We!==void 0)return We;return Ne.uirevision}function Xe(De,Ne){for(var We=0;We[yn,De._ev.listeners(yn)]);et=J.newPlot(De,Ne,We,Ke).then(()=>{for(let[yn,Un]of Nn)Un.forEach(li=>De.on(yn,li));return J.react(De,Ne,We,Ke)})}else{De.data=Ne||[],S.cleanData(De.data),De.layout=We||{},S.cleanLayout(De.layout),gt(De.data,De.layout,pt,Pt),r.supplyDefaults(De,{skipUpdateCalc:!0});var Vt=De._fullData,Ht=De._fullLayout,Sr=Ht.datarevision===void 0,Kr=Ht.transition,Yt=$t(De,Pt,Ht,Sr,Kr),Rt=Yt.newDataRevision,nr=At(De,pt,Vt,Sr,Kr,Rt);if(ke(De)&&(Yt.layoutReplot=!0),nr.calc||Yt.calc){De.calcdata=void 0;for(var ur=Object.getOwnPropertyNames(Ht),cr=0;cr(qt||De.emit("plotly_react",{config:Ke,data:Ne,layout:We}),De))}function At(De,Ne,We,Ke,Je,et){var Mt=Ne.length===We.length;if(!Je&&!Mt)return{fullReplot:!0,calc:!0};var pt=C.traceFlags();pt.arrays={},pt.nChanges=0,pt.nChangesAnim=0;var Pt,Ct;function qt(Sr){var Kr=n.getTraceValObject(Ct,Sr);return!Ct._module.animatable&&Kr.anim&&(Kr.anim=!1),Kr}var Vt={getValObject:qt,flags:pt,immutable:Ke,transition:Je,newDataRevision:et,gd:De},Ht={};for(Pt=0;Pt=Je.length?Je[0]:Je[Ct]:Je}function pt(Ct){return Array.isArray(et)?Ct>=et.length?et[0]:et[Ct]:et}function Pt(Ct,qt){var Vt=0;return function(){if(Ct&&++Vt===qt)return Ct()}}return new Promise(function(Ct,qt){function Vt(){if(Ke._frameQueue.length!==0){for(;Ke._frameQueue.length;){var ja=Ke._frameQueue.pop();ja.onInterrupt&&ja.onInterrupt()}De.emit("plotly_animationinterrupted",[])}}function Ht(ja){if(ja.length!==0){for(var Nn=0;NnKe._timeToNext&&Kr()};ja()}var Rt=0;function nr(ja){return Array.isArray(Je)?Rt>=Je.length?ja.transitionOpts=Je[Rt]:ja.transitionOpts=Je[0]:ja.transitionOpts=Je,Rt++,ja}var ur,cr,Rr=[],Qr=Ne==null,Zr=Array.isArray(Ne),ha=!Qr&&!Zr&&E.isPlainObject(Ne);if(ha)Rr.push({type:"object",data:nr(E.extendFlat({},Ne))});else if(Qr||["string","number"].indexOf(typeof Ne)!==-1)for(ur=0;ur0&&unun)&&Xa.push(cr);Rr=Xa}}Rr.length>0?Ht(Rr):(De.emit("plotly_animated"),Ct())})}function Xt(De,Ne,We){if(De=E.getGraphDiv(De),Ne==null)return Promise.resolve();if(!E.isPlotDiv(De))throw new Error("This element is not a Plotly plot: "+De+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var Ke,Je,et,Mt,pt=De._transitionData._frames,Pt=De._transitionData._frameHash;if(!Array.isArray(Ne))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+Ne);var Ct=pt.length+Ne.length*2,qt=[],Vt={};for(Ke=Ne.length-1;Ke>=0;Ke--)if(E.isPlainObject(Ne[Ke])){var Ht=Ne[Ke].name,Sr=(Pt[Ht]||Vt[Ht]||{}).name,Kr=Ne[Ke].name,Yt=Pt[Sr]||Vt[Sr];Sr&&Kr&&typeof Kr=="number"&&Yt&&TPa.index?-1:ha.index=0;Ke--){if(Je=qt[Ke].frame,typeof Je.name=="number"&&E.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Je.name)for(;Pt[Je.name="frame "+De._transitionData._counter++];);if(Pt[Je.name]){for(et=0;et=0;We--)Ke=Ne[We],et.push({type:"delete",index:Ke}),Mt.unshift({type:"insert",index:Ke,value:Je[Ke]});var pt=r.modifyFrames,Pt=r.modifyFrames,Ct=[De,Mt],qt=[De,et];return e&&e.add(De,pt,Ct,Pt,qt),r.modifyFrames(De,et)}function Ot(De){De=E.getGraphDiv(De);var Ne=De._fullLayout||{},We=De._fullData||[];return r.cleanPlot([],{},We,Ne),r.purge(De),l.purge(De),Ne._container&&Ne._container.remove(),delete De._context,De}function vt(De){var Ne=De._fullLayout,We=De.getBoundingClientRect();if(!E.equalDomRects(We,Ne._lastBBox)){var Ke=Ne._invTransform=E.inverseTransformMatrix(E.getFullTransformMatrix(De));Ne._invScaleX=Math.sqrt(Ke[0][0]*Ke[0][0]+Ke[0][1]*Ke[0][1]+Ke[0][2]*Ke[0][2]),Ne._invScaleY=Math.sqrt(Ke[1][0]*Ke[1][0]+Ke[1][1]*Ke[1][1]+Ke[1][2]*Ke[1][2]),Ne._lastBBox=We}}function ht(De){var Ne=V.select(De),We=De._fullLayout;if(We._calcInverseTransform=vt,We._calcInverseTransform(De),We._container=Ne.selectAll(".plot-container").data([0]),We._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),We._paperdiv=We._container.selectAll(".svg-container").data([0]),We._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),We._glcontainer=We._paperdiv.selectAll(".gl-container").data([{}]),We._glcontainer.enter().append("div").classed("gl-container",!0),We._paperdiv.selectAll(".main-svg").remove(),We._paperdiv.select(".modebar-container").remove(),We._paper=We._paperdiv.insert("svg",":first-child").classed("main-svg",!0),We._toppaper=We._paperdiv.append("svg").classed("main-svg",!0),We._modebardiv=We._paperdiv.append("div"),delete We._modeBar,We._hoverpaper=We._paperdiv.append("svg").classed("main-svg",!0),!We._uid){var Ke={};V.selectAll("defs").each(function(){this.id&&(Ke[this.id.split("-")[1]]=1)}),We._uid=E.randstr(Ke)}We._paperdiv.selectAll(".main-svg").attr(v.svgAttrs),We._defs=We._paper.append("defs").attr("id","defs-"+We._uid),We._clips=We._defs.append("g").classed("clips",!0),We._topdefs=We._toppaper.append("defs").attr("id","topdefs-"+We._uid),We._topclips=We._topdefs.append("g").classed("clips",!0),We._bgLayer=We._paper.append("g").classed("bglayer",!0),We._draggers=We._paper.append("g").classed("draglayer",!0);var Je=We._paper.append("g").classed("layer-below",!0);We._imageLowerLayer=Je.append("g").classed("imagelayer",!0),We._shapeLowerLayer=Je.append("g").classed("shapelayer",!0),We._cartesianlayer=We._paper.append("g").classed("cartesianlayer",!0),We._polarlayer=We._paper.append("g").classed("polarlayer",!0),We._smithlayer=We._paper.append("g").classed("smithlayer",!0),We._ternarylayer=We._paper.append("g").classed("ternarylayer",!0),We._geolayer=We._paper.append("g").classed("geolayer",!0),We._funnelarealayer=We._paper.append("g").classed("funnelarealayer",!0),We._pielayer=We._paper.append("g").classed("pielayer",!0),We._iciclelayer=We._paper.append("g").classed("iciclelayer",!0),We._treemaplayer=We._paper.append("g").classed("treemaplayer",!0),We._sunburstlayer=We._paper.append("g").classed("sunburstlayer",!0),We._indicatorlayer=We._toppaper.append("g").classed("indicatorlayer",!0),We._glimages=We._paper.append("g").classed("glimages",!0);var et=We._toppaper.append("g").classed("layer-above",!0);We._imageUpperLayer=et.append("g").classed("imagelayer",!0),We._shapeUpperLayer=et.append("g").classed("shapelayer",!0),We._selectionLayer=We._toppaper.append("g").classed("selectionlayer",!0),We._infolayer=We._toppaper.append("g").classed("infolayer",!0),We._menulayer=We._toppaper.append("g").classed("menulayer",!0),We._zoomlayer=We._toppaper.append("g").classed("zoomlayer",!0),We._hoverlayer=We._hoverpaper.append("g").classed("hoverlayer",!0),We._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),De.emit("plotly_framework")}J.animate=_r,J.addFrames=Xt,J.deleteFrames=or,J.addTraces=X,J.deleteTraces=K,J.extendTraces=se,J.moveTraces=H,J.prependTraces=G,J.newPlot=B,J._doPlot=u,J.purge=Ot,J.react=Tt,J.redraw=D,J.relayout=xe,J.restyle=Y,J.setPlotConfig=x,J.update=_e,J._guiRelayout=ce(xe),J._guiRestyle=ce(Y),J._guiUpdate=ce(_e),J._storeDirectGUIEdit=ae}}),ip=ze({"src/snapshot/helpers.js"(J){"use strict";var V=mi();J.getDelay=function(E){return E._has&&(E._has("gl3d")||E._has("map"))?500:0},J.getRedrawFunc=function(E){return function(){V.getComponentMethod("colorbar","draw")(E)}},J.encodeSVG=function(E){return"data:image/svg+xml,"+encodeURIComponent(E)},J.encodeJSON=function(E){return"data:application/json,"+encodeURIComponent(E)};var p=window.URL||window.webkitURL;J.createObjectURL=function(E){return p.createObjectURL(E)},J.revokeObjectURL=function(E){return p.revokeObjectURL(E)},J.createBlob=function(E,k){if(k==="svg")return new window.Blob([E],{type:"image/svg+xml;charset=utf-8"});if(k==="full-json")return new window.Blob([E],{type:"application/json;charset=utf-8"});var l=b(window.atob(E));return new window.Blob([l],{type:"image/"+k})},J.octetStream=function(E){document.location.href="data:application/octet-stream"+E},J.getPlotTitle=function(E){var k,l,e,t,n=E._fullLayout;if(n){var r=(k=n.title)==null?void 0:k.text;return r===((l=n._dfltTitle)==null?void 0:l.plot)?void 0:r}return(t=(e=E.layout)==null?void 0:e.title)==null?void 0:t.text},J.getPlotSubtitle=function(E){var k,l,e,t,n,r,a=E._fullLayout;if(a){var o=(l=(k=a.title)==null?void 0:k.subtitle)==null?void 0:l.text;return o===((e=a._dfltTitle)==null?void 0:e.subtitle)?void 0:o}return(r=(n=(t=E.layout)==null?void 0:t.title)==null?void 0:n.subtitle)==null?void 0:r.text};function b(E){for(var k=E.length,l=new ArrayBuffer(k),e=new Uint8Array(l),t=0;t{let i=g.toLowerCase();return r.includes(i)?g:a.includes(i)?"<":o.includes(i)?">":g.includes("<")||g.includes(">")?"":h.html(g).text()});return h.remove(),v}function c(m){return m.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}V.exports=function(h,v,g){var i=h._fullLayout,w=i._paper,S=i._toppaper,M=i.width,C=i.height,_;w.insert("rect",":first-child").call(E.setRect,0,0,M,C).call(k.fill,i.paper_bgcolor);var T=i._basePlotModules||[];for(_=0;_1&&C.push(s("object","layout"))),b.supplyDefaults(_);for(var u=_._fullData,A=T.length,x=0;xz.length&&M.push(s("unused",C,A.concat(z.length)));var P=z.length,j=Array.isArray(F);j&&(P=Math.min(P,F.length));var U,$,Q,re,ne;if(I.dimensions===2)for($=0;$z[$].length&&M.push(s("unused",C,A.concat($,z[$].length)));var se=z[$].length;for(U=0;U<(j?Math.min(se,F[$].length):se);U++)Q=j?F[$][U]:F,re=x[$][U],ne=z[$][U],p.validate(re,Q)?ne!==re&&ne!==+re&&M.push(s("dynamic",C,A.concat($,U),re,ne)):M.push(s("value",C,A.concat($,U),re))}else M.push(s("array",C,A.concat($),x[$]));else for($=0;$D?M.push({code:"unused",traceType:x,templateCount:O,dataCount:D}):D>O&&M.push({code:"reused",traceType:x,templateCount:O,dataCount:D})}}function B(F,P){for(var j in F)if(j.charAt(0)!=="_"){var U=F[j],$=s(F,j,P);p(U)?(Array.isArray(F)&&U._template===!1&&U.templateitemname&&M.push({code:"missing",path:$,templateitemname:U.templateitemname}),B(U,$)):Array.isArray(U)&&c(U)&&B(U,$)}}if(B({data:_,layout:C},""),M.length)return M.map(m)};function c(h){for(var v=0;v=0;m--){var h=l[m];if(h.type==="scatter"&&h.xaxis===s.xaxis&&h.yaxis===s.yaxis){h.opacity=void 0;break}}}}}}}),kD=ze({"src/traces/scatter/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Lx();V.exports=function(E,k){function l(t,n){return p.coerce(E,k,b,t,n)}var e=k.barmode==="group";k.scattermode==="group"&&l("scattergap",e?k.bargap:.2)}}}),bd=ze({"src/plots/cartesian/align_period.js"(J,V){"use strict";var p=ao(),b=Nr(),E=b.dateTime2ms,k=b.incrementMonth,l=No(),e=l.ONEAVGMONTH;V.exports=function(n,r,a,o){if(r.type!=="date")return{vals:o};var s=n[a+"periodalignment"];if(!s)return{vals:o};var c=n[a+"period"],m;if(p(c)){if(c=+c,c<=0)return{vals:o}}else if(typeof c=="string"&&c.charAt(0)==="M"){var h=+c.substring(1);if(h>0&&Math.round(h)===h)m=h;else return{vals:o}}for(var v=r.calendar,g=s==="start",i=s==="end",w=n[a+"period0"],S=E(w,v)||0,M=[],C=[],_=[],T=o.length,f=0;fu;)z=k(z,-m,v);for(;z<=u;)z=k(z,m,v);x=k(z,-m,v)}else{for(A=Math.round((u-S)/c),z=S+A*c;z>u;)z-=c;for(;z<=u;)z+=c;x=z-c}M[f]=g?x:i?z:(x+z)/2,C[f]=x,_[f]=z}return{vals:M,starts:C,ends:_}}}}),od=ze({"src/traces/scatter/colorscale_calc.js"(J,V){"use strict";var p=Bf().hasColorscale,b=Qf(),E=el();V.exports=function(l,e){E.hasLines(e)&&p(e,"line")&&b(l,e,{vals:e.line.color,containerStr:"line",cLetter:"c"}),E.hasMarkers(e)&&(p(e,"marker")&&b(l,e,{vals:e.marker.color,containerStr:"marker",cLetter:"c"}),p(e,"marker.line")&&b(l,e,{vals:e.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}}}),Nd=ze({"src/traces/scatter/arrays_to_calcdata.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){for(var l=0;lB&&x[P].gap;)P--;for(U=x[P].s,F=x.length-1;F>P;F--)x[F].s=U;for(;Bre+$||!p(Q))}for(var se=0;seP(U))):P(D.text);let j=D.outsidetextfont.size*r*F+n;return{ppadplus:B.some(U=>U.s<0)?j:0,ppadminus:B.some(U=>U.s>=0)?j:0}}return{ppadplus:void 0,ppadminus:void 0}}function z(D,B,F,P){for(var j=O(P),U=0;UO[v]&&v0?l:e)/(v._m*w*(v._m>0?l:e)))),Ct*=1e3}if(qt===E){if(i&&(qt=v.c2p(Pt.y,!0)),qt===E)return!1;qt*=1e3}return[Ct,qt]}function ee(pt,Pt,Ct,qt){var Vt=Ct-pt,Ht=qt-Pt,Sr=.5-pt,Kr=.5-Pt,Yt=Vt*Vt+Ht*Ht,Rt=Vt*Sr+Ht*Kr;if(Rt>0&&Rt1||Math.abs(Sr.y-Ct[0][1])>1)&&(Sr=[Sr.x,Sr.y],qt&&we(Sr,pt)Ie||pt[1]Ge)return[r(pt[0],Se,Ie),r(pt[1],Ve,Ge)]}function yt(pt,Pt){if(pt[0]===Pt[0]&&(pt[0]===Se||pt[0]===Ie)||pt[1]===Pt[1]&&(pt[1]===Ve||pt[1]===Ge))return!0}function gt(pt,Pt){var Ct=[],qt=Ye(pt),Vt=Ye(Pt);return qt&&Vt&&yt(qt,Vt)||(qt&&Ct.push(qt),Vt&&Ct.push(Vt)),Ct}function Tt(pt,Pt,Ct){return function(qt,Vt){var Ht=Ye(qt),Sr=Ye(Vt),Kr=[];if(Ht&&Sr&&yt(Ht,Sr))return Kr;Ht&&Kr.push(Ht),Sr&&Kr.push(Sr);var Yt=2*t.constrain((qt[pt]+Vt[pt])/2,Pt,Ct)-((Ht||qt)[pt]+(Sr||Vt)[pt]);if(Yt){var Rt;Ht&&Sr?Rt=Yt>0==Ht[pt]>Sr[pt]?Ht:Sr:Rt=Ht||Sr,Rt[pt]+=Yt}return Kr}}var At;f==="linear"||f==="spline"?At=Xe:f==="hv"||f==="vh"?At=gt:f==="hvh"?At=Tt(0,Se,Ie):f==="vhv"&&(At=Tt(1,Ve,Ge));function $t(pt,Pt){var Ct=Pt[0]-pt[0],qt=(Pt[1]-pt[1])/Ct,Vt=(pt[1]*Pt[0]-Pt[1]*pt[0])/Ct;return Vt>0?[qt>0?Se:Ie,Ge]:[qt>0?Ie:Se,Ve]}function rr(pt){var Pt=pt[0],Ct=pt[1],qt=Pt===O[D-1][0],Vt=Ct===O[D-1][1];if(!(qt&&Vt))if(D>1){var Ht=Pt===O[D-2][0],Sr=Ct===O[D-2][1];qt&&(Pt===Se||Pt===Ie)&&Ht?Sr?D--:O[D-1]=pt:Vt&&(Ct===Ve||Ct===Ge)&&Sr?Ht?D--:O[D-1]=pt:O[D++]=pt}else O[D++]=pt}function _r(pt){O[D-1][0]!==pt[0]&&O[D-1][1]!==pt[1]&&rr([ve,le]),rr(pt),Ae=null,ve=le=0}var Xt=t.isArrayOrTypedArray(C);function or(pt){if(pt&&M&&(pt.i=B,pt.d=s,pt.trace=m,pt.marker=Xt?C[pt.i]:C,pt.backoff=M),ae=pt[0]/w,he=pt[1]/S,_e=pt[0]Ie?Ie:0,ce=pt[1]Ge?Ge:0,_e||ce){if(!D)O[D++]=[_e||pt[0],ce||pt[1]];else if(Ae){var Pt=At(Ae,pt);Pt.length>1&&(_r(Pt[0]),O[D++]=Pt[1])}else Be=At(O[D-1],pt)[0],O[D++]=Be;var Ct=O[D-1];_e&&ce&&(Ct[0]!==_e||Ct[1]!==ce)?(Ae&&(ve!==_e&&le!==ce?rr(ve&&le?$t(Ae,pt):[ve||_e,le||ce]):ve&&le&&rr([ve,le])),rr([_e,ce])):ve-_e&&le-ce&&rr([_e||ve,ce||le]),Ae=pt,ve=_e,le=ce}else Ae&&_r(At(Ae,pt)[0]),O[D++]=pt}for(B=0;Bxe($,Ot))break;P=$,K=ne[0]*re[0]+ne[1]*re[1],K>G?(G=K,j=$,Q=!1):K=s.length||!$)break;or($),F=$}}Ae&&rr([ve||Ae[0],le||Ae[1]]),x.push(O.slice(0,D))}var vt=f.slice(f.length-1);if(M&&vt!=="h"&&vt!=="v"){for(var ht=!1,De=-1,Ne=[],We=0;We=0?a=h:(a=h=m,m++),a0,f=r(h,v,g);if(M=i.selectAll("g.trace").data(f,function(A){return A[0].trace.uid}),M.enter().append("g").attr("class",function(A){return"trace scatter trace"+A[0].trace.uid}).style("stroke-miterlimit",2),M.order(),o(h,M,v),T){S&&(C=S());var u=p.transition().duration(w.duration).ease(w.easing).each("end",function(){C&&C()}).each("interrupt",function(){C&&C()});u.each(function(){i.selectAll("g.trace").each(function(A,x){s(h,x,v,A,f,this,w)})})}else M.each(function(A,x){s(h,x,v,A,f,this,w)});_&&M.exit().remove(),i.selectAll("path:not([d])").remove()};function o(m,h,v){h.each(function(g){var i=k(p.select(this),"g","fills");e.setClipUrl(i,v.layerClipId,m);var w=g[0].trace;w._ownFill=null,w._nextFill=null;var S=[];w._ownfill&&S.push("_ownFill"),w._nexttrace&&S.push("_nextFill");var M=i.selectAll("g").data(S,l);M.enter().append("g"),M.exit().remove(),M.order().each(function(C){w[C]=k(p.select(this),"path","js-fill")})})}function s(m,h,v,g,i,w,S){var M=m._context.staticPlot,C;c(m,h,v,g,i);var _=!!S&&S.duration>0;function T(rr){return _?rr.transition():rr}var f=v.xaxis,u=v.yaxis,A=g[0].trace,x=A.line,z=p.select(w),I=k(z,"g","errorbars"),O=k(z,"g","lines"),D=k(z,"g","points"),B=k(z,"g","text");if(b.getComponentMethod("errorbars","plot")(m,I,v,S),A.visible!==!0)return;T(z).style("opacity",A.opacity);var F,P,j=A.fill.charAt(A.fill.length-1);j!=="x"&&j!=="y"&&(j="");var U,$;j==="y"?(U=1,$=u.c2p(0,!0)):j==="x"&&(U=0,$=f.c2p(0,!0)),g[0][v.isRangePlot?"nodeRangePlot3":"node3"]=z;var Q="",re=[],ne=A._prevtrace,se=null,G=null;ne&&(Q=ne._prevRevpath||"",P=ne._nextFill,re=ne._ownPolygons,se=ne._fillsegments,G=ne._fillElement);var X,K,H="",Y="",q,Z,ee,ae,he,xe,we=[];A._polygons=[];var Me=[],Se=[],Ie=E.noop;if(F=A._ownFill,t.hasLines(A)||A.fill!=="none"){P&&P.datum(g),["hv","vh","hvh","vhv"].indexOf(x.shape)!==-1?(q=e.steps(x.shape),Z=e.steps(x.shape.split("").reverse().join(""))):x.shape==="spline"?q=Z=function(rr){var _r=rr[rr.length-1];return rr.length>1&&rr[0][0]===_r[0]&&rr[0][1]===_r[1]?e.smoothclosed(rr.slice(1),x.smoothing):e.smoothopen(rr,x.smoothing)}:q=Z=function(rr){return"M"+rr.join("L")},ee=function(rr){return Z(rr.reverse())},Se=n(g,{xaxis:f,yaxis:u,trace:A,connectGaps:A.connectgaps,baseTolerance:Math.max(x.width||1,3)/4,shape:x.shape,backoff:x.backoff,simplify:x.simplify,fill:A.fill}),Me=new Array(Se.length);var Ve=0;for(C=0;C=M[0]&&z.x<=M[1]&&z.y>=C[0]&&z.y<=C[1]}),u=Math.ceil(f.length/T),A=0;i.forEach(function(z,I){var O=z[0].trace;t.hasMarkers(O)&&O.marker.maxdisplayed>0&&I=Math.min(ne,se)&&v<=Math.max(ne,se)?0:1/0}var G=Math.max(3,re.mrc||0),X=1-1/G,K=Math.abs(m.c2p(re.x)-v);return K=Math.min(ne,se)&&g<=Math.max(ne,se)?0:1/0}var G=Math.max(3,re.mrc||0),X=1-1/G,K=Math.abs(h.c2p(re.y)-g);return KY!=Me>=Y&&(he=ee[Z-1][0],xe=ee[Z][0],Me-we&&(ae=he+(xe-he)*(Y-we)/(Me-we),G=Math.min(G,ae),X=Math.max(X,ae)));return G=Math.max(G,0),X=Math.min(X,m._length),{x0:G,x1:X,y0:Y,y1:Y}}if(w.indexOf("fills")!==-1&&c._fillElement){var U=P(c._fillElement)&&!P(c._fillExclusionElement);if(U){var $=j(c._polygons);$===null&&($={x0:i[0],x1:i[0],y0:i[1],y1:i[1]});var Q=l.defaultLine;return l.opacity(c.fillcolor)?Q=c.fillcolor:l.opacity((c.line||{}).color)&&(Q=c.line.color),p.extendFlat(n,{distance:n.maxHoverDistance,x0:$.x0,x1:$.x1,y0:$.y0,y1:$.y1,color:Q,hovertemplate:!1}),delete n.index,c.text&&!p.isArrayOrTypedArray(c.text)?n.text=String(c.text):n.text=c.name,[n]}}}}}),Yv=ze({"src/traces/scatter/select.js"(J,V){"use strict";var p=el();V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=[],r=l[0].trace,a,o,s,c,m=r.mode&&!p.hasMarkers(r)&&!p.hasText(r);if(m)return[];if(k===!1)for(a=0;a0&&(o["_"+r+"axes"]||{})[n])return o;if((o[r+"axis"]||r)===n){if(e(o,r))return o;if((o[r]||[]).length||o[r+"0"])return o}}}function l(t){return{v:"x",h:"y"}[t.orientation||"v"]}function e(t,n){var r=l(t),a=p(t,"box-violin");return a&&n===r&&t[r]===void 0&&t[r+"0"]===void 0}}}),Hx=ze({"src/plots/cartesian/category_order_defaults.js"(J,V){"use strict";var p=Ff().isTypedArraySpec;function b(E,k){var l=k.dataAttr||E._id.charAt(0),e={},t,n,r;if(k.axData)t=k.axData;else for(t=[],n=0;n0||p(n),a;r&&(a="array");var o=e("categoryorder",a),s;o==="array"&&(s=e("categoryarray")),!r&&o==="array"&&(o=l.categoryorder="trace"),o==="trace"?l._initialCategories=[]:o==="array"?l._initialCategories=s.slice():(s=b(l,t).sort(),o==="category ascending"?l._initialCategories=s:o==="category descending"&&(l._initialCategories=s.reverse()))}}}}),g1=ze({"src/plots/cartesian/line_grid_defaults.js"(J,V){"use strict";var p=Qn(),b=fc(),E=Nr();V.exports=function(l,e,t,n){n=n||{};var r=n.dfltColor;function a(x,z){return E.coerce2(l,e,n.attributes,x,z)}var o=a("linecolor",r),s=a("linewidth"),c=t("showline",n.showLine||!!o||!!s);c||(delete e.linecolor,delete e.linewidth);var m=p.mix(r,n.bgColor,n.blend||b.lightFraction),h=a("gridcolor",m),v=a("gridwidth"),g=a("griddash"),i=t("showgrid",n.showGrid||!!h||!!v||!!g);if(i||(delete e.gridcolor,delete e.gridwidth,delete e.griddash),n.hasMinor){var w=p.mix(e.gridcolor,n.bgColor,67),S=a("minor.gridcolor",w),M=a("minor.gridwidth",e.gridwidth||1),C=a("minor.griddash",e.griddash||"solid"),_=t("minor.showgrid",!!S||!!M||!!C);_||(delete e.minor.gridcolor,delete e.minor.gridwidth,delete e.minor.griddash)}if(!n.noZeroLine){var T=a("zerolinelayer"),f=a("zerolinecolor",r),u=a("zerolinewidth"),A=t("zeroline",n.showGrid||!!f||!!u);A||(delete e.zerolinelayer,delete e.zerolinecolor,delete e.zerolinewidth)}}}}),y1=ze({"src/plots/cartesian/axis_defaults.js"(J,V){"use strict";var p=ao(),b=mi(),E=Nr(),k=hs(),l=Jf(),e=cf(),t=Uv(),n=Ym(),r=ov(),a=sv(),o=Hx(),s=g1(),c=Qw(),m=Dd(),h=hc().WEEKDAY_PATTERN,v=hc().HOUR_PATTERN;V.exports=function(M,C,_,T,f){var u=T.letter,A=T.font||{},x=T.splomStash||{},z=_("visible",!T.visibleDflt),I=C._template||{},O=C.type||I.type||"-",D;if(O==="date"){var B=b.getComponentMethod("calendars","handleDefaults");B(M,C,"calendar",T.calendar),T.noTicklabelmode||(D=_("ticklabelmode"))}!T.noTicklabelindex&&(O==="date"||O==="linear")&&_("ticklabelindex");var F="";(!T.noTicklabelposition||O==="multicategory")&&(F=E.coerce(M,C,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:D==="period"?["outside","inside"]:u==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),T.noTicklabeloverflow||_("ticklabeloverflow",F.indexOf("inside")!==-1?"hide past domain":O==="category"||O==="multicategory"?"allow":"hide past div"),m(C,f),c(M,C,_,T),o(M,C,_,T),T.noHover||(O!=="category"&&_("hoverformat"),T.noUnifiedhovertitle||_("unifiedhovertitle.text"));var P=_("color"),j=P!==e.color.dflt?P:A.color,U=x.label||f._dfltTitle[u];if(a(M,C,_,O,T),!z)return C;_("title.text",U),E.coerceFont(_,"title.font",A,{overrideDflt:{size:E.bigFont(A.size),color:j}}),t(M,C,_,O);var $=T.hasMinor;if($&&(k.newContainer(C,"minor"),t(M,C,_,O,{isMinor:!0})),r(M,C,_,O,T),n(M,C,_,T),$){var Q=T.isMinor;T.isMinor=!0,n(M,C,_,T),T.isMinor=Q}s(M,C,_,{dfltColor:P,bgColor:T.bgColor,showGrid:T.showGrid,hasMinor:$,attributes:e}),$&&C.ticklabelindex==null&&!C.minor.ticks&&!C.minor.showgrid&&delete C.minor,(C.showline||C.ticks)&&_("mirror");var re=O==="multicategory";if(!T.noTickson&&(O==="category"||re)&&(C.ticks||C.showgrid)&&(re?(_("tickson","boundaries"),delete C.ticklabelposition):_("tickson")),re){var ne=_("showdividers");ne&&(_("dividercolor"),_("dividerwidth"))}if(O==="date")if(l(M,C,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:g}),!C.rangebreaks.length)delete C.rangebreaks;else{for(var se=0;se=2){var u="",A,x;if(f.length===2){for(A=0;A<2;A++)if(x=w(f[A]),x){u=h;break}}var z=_("pattern",u);if(z===h)for(A=0;A<2;A++)x=w(f[A]),x&&(M.bounds[A]=f[A]=x-1);if(z)for(A=0;A<2;A++)switch(x=f[A],z){case h:if(!p(x)){M.enabled=!1;return}if(x=+x,x!==Math.floor(x)||x<0||x>=7){M.enabled=!1;return}M.bounds[A]=f[A]=x;break;case v:if(!p(x)){M.enabled=!1;return}if(x=+x,x<0||x>24){M.enabled=!1;return}M.bounds[A]=f[A]=x;break}if(C.autorange===!1){var I=C.range;if(I[0]I[1]){M.enabled=!1;return}}else if(f[0]>I[0]&&f[1]_[1]-1/4096&&(l.domain=m),b.noneOrAll(k.domain,l.domain,m),l.tickmode==="sync"&&(l.tickmode="auto")}return e("layer"),l}}}),RD=ze({"src/plots/cartesian/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=kh().isUnifiedHover,k=s5(),l=hs(),e=Gm(),t=cf(),n=E5(),r=y1(),a=Vv(),o=Wx(),s=Xl(),c=s.id2name,m=s.name2id,h=hc().AX_ID_PATTERN,v=mi(),g=v.traceIs,i=v.getComponentMethod;function w(S,M,C){Array.isArray(S[M])?S[M].push(C):S[M]=[C]}V.exports=function(M,C,_){var T=C.autotypenumbers,f={},u={},A={},x={},z={},I={},O={},D={},B={},F={},P,j;for(P=0;P<_.length;P++){var U=_[P];if(g(U,"cartesian")){var $;if(U.xaxis)$=c(U.xaxis),w(f,$,U);else if(U.xaxes)for(j=0;j rect").call(k.setTranslate,0,0).call(k.setScale,1,1),C.plot.call(k.setTranslate,_._offset,T._offset).call(k.setScale,1,1);var f=C.plot.selectAll(".scatterlayer .trace");f.selectAll(".point").call(k.setPointGroupScale,1,1),f.selectAll(".textpoint").call(k.setTextPointsScale,1,1),f.call(k.hideOutsideRangePoints,C)}function c(C,_){var T=C.plotinfo,f=T.xaxis,u=T.yaxis,A=f._length,x=u._length,z=!!C.xr1,I=!!C.yr1,O=[];if(z){var D=E.simpleMap(C.xr0,f.r2l),B=E.simpleMap(C.xr1,f.r2l),F=D[1]-D[0],P=B[1]-B[0];O[0]=(D[0]*(1-_)+_*B[0]-D[0])/(D[1]-D[0])*A,O[2]=A*(1-_+_*P/F),f.range[0]=f.l2r(D[0]*(1-_)+_*B[0]),f.range[1]=f.l2r(D[1]*(1-_)+_*B[1])}else O[0]=0,O[2]=A;if(I){var j=E.simpleMap(C.yr0,u.r2l),U=E.simpleMap(C.yr1,u.r2l),$=j[1]-j[0],Q=U[1]-U[0];O[1]=(j[1]*(1-_)+_*U[1]-j[1])/(j[0]-j[1])*x,O[3]=x*(1-_+_*Q/$),u.range[0]=f.l2r(j[0]*(1-_)+_*U[0]),u.range[1]=u.l2r(j[1]*(1-_)+_*U[1])}else O[1]=0,O[3]=x;l.drawOne(t,f,{skipTitle:!0}),l.drawOne(t,u,{skipTitle:!0}),l.redrawComponents(t,[f._id,u._id]);var re=z?A/O[2]:1,ne=I?x/O[3]:1,se=z?O[0]:0,G=I?O[1]:0,X=z?O[0]/O[2]*A:0,K=I?O[1]/O[3]*x:0,H=f._offset-X,Y=u._offset-K;T.clipRect.call(k.setTranslate,se,G).call(k.setScale,1/re,1/ne),T.plot.call(k.setTranslate,H,Y).call(k.setScale,re,ne),k.setPointGroupScale(T.zoomScalePts,1/re,1/ne),k.setTextPointsScale(T.zoomScaleTxt,1/re,1/ne)}var m;a&&(m=a());function h(){for(var C={},_=0;_r.duration?(h(),w=window.cancelAnimationFrame(M)):w=window.requestAnimationFrame(M)}return g=Date.now(),w=window.requestAnimationFrame(M),Promise.resolve()}}}),Du=ze({"src/plots/cartesian/index.js"(J){"use strict";var V=ci(),p=mi(),b=Nr(),E=cl(),k=$i(),l=zf().getModuleCalcData,e=Xl(),t=hc(),n=nd(),r=b.ensureSingle;function a(g,i,w){return b.ensureSingle(g,i,w,function(S){S.datum(w)})}var o=t.zindexSeparator;J.name="cartesian",J.attr=["xaxis","yaxis"],J.idRoot=["x","y"],J.idRegex=t.idRegex,J.attrRegex=t.attrRegex,J.attributes=PD(),J.layoutAttributes=cf(),J.supplyLayoutDefaults=RD(),J.transitionAxes=ID(),J.finalizeSubplots=function(g,i){var w=i._subplots,S=w.xaxis,M=w.yaxis,C=w.cartesian,_=C,T={},f={},u,A,x;for(u=0;u<_.length;u++){var z=_[u].split("y");T[z[0]]=1,f["y"+z[1]]=1}for(u=0;u0){var I=z.id;if(I.indexOf(o)!==-1)continue;I+=o+(u+1),z=b.extendFlat({},z,{id:I,plot:M._cartesianlayer.selectAll(".subplot").select("."+I)})}for(var O=[],D,B=0;B<_.length;B++){var F=_[B],P=F[0].trace;A===(P.zorder||0)&&P.xaxis+P.yaxis===x&&((i.indexOf(P.index)!==-1||P.carpet)&&(D&&D[0].trace.xaxis+D[0].trace.yaxis===x&&["tonextx","tonexty","tonext"].indexOf(P.fill)!==-1&&O.indexOf(D)===-1&&O.push(D),O.push(F)),D=F)}s(g,z,O,w,S)}}};function s(g,i,w,S,M){for(var C=t.traceLayerClasses,_=g._fullLayout,T=_._zindices,f=_._modules,u,A,x,z=[],I=[],O=0;O1&&($+=o+U),j.push(T+$),_=0;_1,x=i.mainplotinfo;if(!i.mainplot||A)if(u)i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.xaxislayer=r(S,"g","xaxislayer-above"),i.yaxislayer=r(S,"g","yaxislayer-above");else{if(!_){var z=r(S,"g","layer-subplot");i.shapelayer=r(z,"g","shapelayer"),i.imagelayer=r(z,"g","imagelayer"),x&&A?(i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer):(i.minorGridlayer=r(S,"g","minor-gridlayer"),i.gridlayer=r(S,"g","gridlayer"),i.zerolinelayer=r(S,"g","zerolinelayer"));var I=r(S,"g","layer-between");i.shapelayerBetween=r(I,"g","shapelayer"),i.imagelayerBetween=r(I,"g","imagelayer"),r(S,"path","xlines-below"),r(S,"path","ylines-below"),i.overlinesBelow=r(S,"g","overlines-below"),r(S,"g","xaxislayer-below"),r(S,"g","yaxislayer-below"),i.overaxesBelow=r(S,"g","overaxes-below")}i.overplot=r(S,"g","overplot"),i.plot=r(i.overplot,"g",M),x&&A?i.zerolinelayerAbove=x.zerolinelayerAbove:i.zerolinelayerAbove=r(S,"g","zerolinelayer-above"),_||(i.xlines=r(S,"path","xlines-above"),i.ylines=r(S,"path","ylines-above"),i.overlinesAbove=r(S,"g","overlines-above"),r(S,"g","xaxislayer-above"),r(S,"g","yaxislayer-above"),i.overaxesAbove=r(S,"g","overaxes-above"),i.xlines=S.select(".xlines-"+T),i.ylines=S.select(".ylines-"+f),i.xaxislayer=S.select(".xaxislayer-"+T),i.yaxislayer=S.select(".yaxislayer-"+f))}else{var O=x.plotgroup,D=M+"-x",B=M+"-y";i.minorGridlayer=x.minorGridlayer,i.gridlayer=x.gridlayer,i.zerolinelayer=x.zerolinelayer,i.zerolinelayerAbove=x.zerolinelayerAbove,r(x.overlinesBelow,"path",D),r(x.overlinesBelow,"path",B),r(x.overaxesBelow,"g",D),r(x.overaxesBelow,"g",B),i.plot=r(x.overplot,"g",M),r(x.overlinesAbove,"path",D),r(x.overlinesAbove,"path",B),r(x.overaxesAbove,"g",D),r(x.overaxesAbove,"g",B),i.xlines=O.select(".overlines-"+T).select("."+D),i.ylines=O.select(".overlines-"+f).select("."+B),i.xaxislayer=O.select(".overaxes-"+T).select("."+D),i.yaxislayer=O.select(".overaxes-"+f).select("."+B)}_||(u||(a(i.minorGridlayer,"g",i.xaxis._id),a(i.minorGridlayer,"g",i.yaxis._id),i.minorGridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort),a(i.gridlayer,"g",i.xaxis._id),a(i.gridlayer,"g",i.yaxis._id),i.gridlayer.selectAll("g").map(function(F){return F[0]}).sort(e.idSort)),i.xlines.style("fill","none").classed("crisp",!0),i.ylines.style("fill","none").classed("crisp",!0))}function h(g,i){if(g){var w={};g.each(function(f){var u=f[0],A=V.select(this);A.remove(),v(u,i),w[u]=!0});for(var S in i._plots)for(var M=i._plots[S],C=M.overlays||[],_=0;_=0,i=a.indexOf("end")>=0,w=c.backoff*h+o.standoff,S=m.backoff*v+o.startstandoff,M,C,_,T;if(s.nodeName==="line"){M={x:+r.attr("x1"),y:+r.attr("y1")},C={x:+r.attr("x2"),y:+r.attr("y2")};var f=M.x-C.x,u=M.y-C.y;if(_=Math.atan2(u,f),T=_+Math.PI,w&&S&&w+S>Math.sqrt(f*f+u*u)){$();return}if(w){if(w*w>f*f+u*u){$();return}var A=w*Math.cos(_),x=w*Math.sin(_);C.x+=A,C.y+=x,r.attr({x2:C.x,y2:C.y})}if(S){if(S*S>f*f+u*u){$();return}var z=S*Math.cos(_),I=S*Math.sin(_);M.x-=z,M.y-=I,r.attr({x1:M.x,y1:M.y})}}else if(s.nodeName==="path"){var O=s.getTotalLength(),D="";if(O2/3?cr="right":cr="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[cr]}for(var Be=!1,Xe=["x","y"],Ye=0;Ye1)&&(Tt===gt?(et=At.r2fraction(S["a"+yt]),(et<0||et>1)&&(Be=!0)):Be=!0),ht=At._offset+At.r2p(S[yt]),We=.5}else{var Mt=Je==="domain";yt==="x"?(Ne=S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.l+u.w*Ne):(Ne=1-S[yt],ht=Mt?At._offset+At._length*Ne:ht=u.t+u.h*Ne),We=S.showarrow?.5:Ne}if(S.showarrow){vt.head=ht;var pt=S["a"+yt];if(Ke=rr*Ae(.5,S.xanchor)-_r*Ae(.5,S.yanchor),Tt===gt){var Pt=e.getRefType(Tt);Pt==="domain"?(yt==="y"&&(pt=1-pt),vt.tail=At._offset+At._length*pt):Pt==="paper"?yt==="y"?(pt=1-pt,vt.tail=u.t+u.h*pt):vt.tail=u.l+u.w*pt:vt.tail=At._offset+At.r2p(pt),De=Ke}else vt.tail=ht+pt,De=Ke+pt;vt.text=vt.tail+Ke;var Ct=f[yt==="x"?"width":"height"];if(gt==="paper"&&(vt.head=k.constrain(vt.head,1,Ct-1)),Tt==="pixel"){var qt=-Math.max(vt.tail-3,vt.text),Vt=Math.min(vt.tail+3,vt.text)-Ct;qt>0?(vt.tail+=qt,vt.text+=qt):Vt>0&&(vt.tail-=Vt,vt.text-=Vt)}vt.tail+=Ot,vt.head+=Ot}else Ke=Xt*Ae(We,or),De=Ke,vt.text=ht+Ke;vt.text+=Ot,Ke+=Ot,De+=Ot,S["_"+yt+"padplus"]=Xt/2+De,S["_"+yt+"padminus"]=Xt/2-De,S["_"+yt+"size"]=Xt,S["_"+yt+"shift"]=Ke}if(Be){se.remove();return}var Ht=0,Sr=0;if(S.align!=="left"&&(Ht=(_e-Ge)*(S.align==="center"?.5:1)),S.valign!=="top"&&(Sr=(ce-ke)*(S.valign==="middle"?.5:1)),Ie)Se.select("svg").attr({x:K+Ht-1,y:K+Sr}).call(n.setClipUrl,Y?F:null,w);else{var Kr=K+Sr-Ve.top,Yt=K+Ht-Ve.left;ae.call(a.positionText,Yt,Kr).call(n.setClipUrl,Y?F:null,w)}q.select("rect").call(n.setRect,K,K,_e,ce),H.call(n.setRect,G/2,G/2,ve-G,le-G),se.call(n.setTranslate,Math.round(P.x.text-ve/2),Math.round(P.y.text-le/2)),$.attr({transform:"rotate("+j+","+P.x.text+","+P.y.text+")"});var Rt=function(ur,cr){U.selectAll(".annotation-arrow-g").remove();var Rr=P.x.head,Qr=P.y.head,Zr=P.x.tail+ur,ha=P.y.tail+cr,Pa=P.x.text+ur,La=P.y.text+cr,un=k.rotationXYMatrix(j,Pa,La),Xa=k.apply2DTransform(un),ja=k.apply2DTransform2(un),Nn=+H.attr("width"),yn=+H.attr("height"),Un=Pa-.5*Nn,li=Un+Nn,Yn=La-.5*yn,on=Yn+yn,en=[[Un,Yn,Un,on],[Un,on,li,on],[li,on,li,Yn],[li,Yn,Un,Yn]].map(ja);if(!en.reduce(function(ot,kt){return ot^!!k.segmentsIntersect(Rr,Qr,Rr+1e6,Qr+1e6,kt[0],kt[1],kt[2],kt[3])},!1)){en.forEach(function(ot){var kt=k.segmentsIntersect(Zr,ha,Rr,Qr,ot[0],ot[1],ot[2],ot[3]);kt&&(Zr=kt.x,ha=kt.y)});var vi=S.arrowwidth,Yi=S.arrowcolor,Ja=S.arrowside,Oa=U.append("g").style({opacity:t.opacity(Yi)}).classed("annotation-arrow-g",!0),lt=Oa.append("path").attr("d","M"+Zr+","+ha+"L"+Rr+","+Qr).style("stroke-width",vi+"px").call(t.stroke,t.rgb(Yi));if(m(lt,Ja,S),A.annotationPosition&<.node().parentNode&&!C){var rt=Rr,fr=Qr;if(S.standoff){var lr=Math.sqrt(Math.pow(Rr-Zr,2)+Math.pow(Qr-ha,2));rt+=S.standoff*(Zr-Rr)/lr,fr+=S.standoff*(ha-Qr)/lr}var Tr=Oa.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Zr-rt)+","+(ha-fr),transform:l(rt,fr)}).style("stroke-width",vi+6+"px").call(t.stroke,"rgba(0,0,0,0)").call(t.fill,"rgba(0,0,0,0)"),Ir,Dr;s.init({element:Tr.node(),gd:w,prepFn:function(){var ot=n.getTranslate(se);Ir=ot.x,Dr=ot.y,_&&_.autorange&&O(_._name+".autorange",!0),T&&T.autorange&&O(T._name+".autorange",!0)},moveFn:function(ot,kt){var jt=Xa(Ir,Dr),ar=jt[0]+ot,Er=jt[1]+kt;se.call(n.setTranslate,ar,Er),D("x",g(_,ot,"x",u,S)),D("y",g(T,kt,"y",u,S)),S.axref===S.xref&&D("ax",g(_,ot,"ax",u,S)),S.ayref===S.yref&&D("ay",g(T,kt,"ay",u,S)),Oa.attr("transform",l(ot,kt)),$.attr({transform:"rotate("+j+","+ar+","+Er+")"})},doneFn:function(){b.call("_guiRelayout",w,B());var ot=document.querySelector(".js-notes-box-panel");ot&&ot.redraw(ot.selectedObj)}})}}};if(S.showarrow&&Rt(0,0),Q){var nr;s.init({element:se.node(),gd:w,prepFn:function(){nr=$.attr("transform")},moveFn:function(ur,cr){var Rr="pointer";if(S.showarrow)S.axref===S.xref?D("ax",g(_,ur,"ax",u,S)):D("ax",S.ax+ur),S.ayref===S.yref?D("ay",g(T,cr,"ay",u.w,S)):D("ay",S.ay+cr),Rt(ur,cr);else{if(C)return;var Qr,Zr;if(_)Qr=g(_,ur,"x",u,S);else{var ha=S._xsize/u.w,Pa=S.x+(S._xshift-S.xshift)/u.w-ha/2;Qr=s.align(Pa+ur/u.w,ha,0,1,S.xanchor)}if(T)Zr=g(T,cr,"y",u,S);else{var La=S._ysize/u.h,un=S.y-(S._yshift+S.yshift)/u.h-La/2;Zr=s.align(un-cr/u.h,La,0,1,S.yanchor)}D("x",Qr),D("y",Zr),(!_||!T)&&(Rr=s.getCursor(_?.5:Qr,T?.5:Zr,S.xanchor,S.yanchor))}$.attr({transform:l(ur,cr)+nr}),o(se,Rr)},clickFn:function(ur,cr){S.captureevents&&w.emit("plotly_clickannotation",ne(cr))},doneFn:function(){o(se),b.call("_guiRelayout",w,B());var ur=document.querySelector(".js-notes-box-panel");ur&&ur.redraw(ur.selectedObj)}})}}A.annotationText?ae.call(a.makeEditable,{delegate:se,gd:w}).call(he).on("edit",function(we){S.text=we,this.call(he),D("text",we),_&&_.autorange&&O(_._name+".autorange",!0),T&&T.autorange&&O(T._name+".autorange",!0),b.call("_guiRelayout",w,B())}):ae.call(he)}}}),zD=ze({"src/components/annotations/click.js"(J,V){"use strict";var p=Nr(),b=mi(),E=hs().arrayEditor;V.exports={hasClickToShow:k,onClick:l};function k(n,r){var a=e(n,r);return a.on.length>0||a.explicitOff.length>0}function l(n,r){var a=e(n,r),o=a.on,s=a.off.concat(a.explicitOff),c={},m=n._fullLayout.annotations,h,v;if(o.length||s.length){for(h=0;h1){o=!0;break}}o?l.fullLayout._infolayer.select(".annotation-"+l.id+'[data-index="'+r+'"]').remove():(a._pdata=b(l.glplot.cameraParams,[e.xaxis.r2l(a.x)*t[0],e.yaxis.r2l(a.y)*t[1],e.zaxis.r2l(a.z)*t[2]]),p(l.graphDiv,a,r,l.id,a._xa,a._ya))}}}}),GD=ze({"src/components/annotations3d/index.js"(J,V){"use strict";var p=mi(),b=Nr();V.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:Xx()}}},layoutAttributes:Xx(),handleDefaults:UD(),includeBasePlot:E,convert:qD(),draw:VD()};function E(k,l){var e=p.subplotsRegistry.gl3d;if(e)for(var t=e.attrRegex,n=Object.keys(k),r=0;r{var x=A+"anchor",z=A==="x"?w:S,I={_fullLayout:a},O,D,B,F;let P=A+"ref",j=n[P];if(Array.isArray(j)&&j.length>0){let U=l.countDefiningCoords(v,m,A);F=b.coerceRefArray(n,r,I,A,void 0,"paper",U),r["_"+A+"refArray"]=!0}else F=b.coerceRef(n,r,I,A,void 0,"paper");if(Array.isArray(F))F.forEach(function(U){b.getRefType(U)==="range"&&(O=b.getFromId(I,U),O&&O._shapeIndices.indexOf(r._index)===-1&&O._shapeIndices.push(r._index))}),g&&[0,1].forEach(function(U){let $=F[U];b.getRefType($)==="range"?(O=b.getFromId(I,$),D=l.shapePositionToRange(O),B=l.rangeToShapePosition(O),(O.type==="category"||O.type==="multicategory")&&o(A+U+"shift")):D=B=p.identity;let re=A+U,ne=n[re];if(n[re]=D(n[re],!0),z==="pixel"?o(re,C[U]):b.coercePosition(r,I,o,$,re,M[U]),r[re]=B(r[re]),n[re]=ne,U===0&&z==="pixel"){let se=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,$,x,.25),r[x]=B(r[x]),n[x]=se}});else{if(b.getRefType(F)==="range"?(O=b.getFromId(I,F),O._shapeIndices.push(r._index),B=l.rangeToShapePosition(O),D=l.shapePositionToRange(O),g&&(O.type==="category"||O.type==="multicategory")&&(o(A+"0shift"),o(A+"1shift"))):D=B=p.identity,g){let $=A+"0",Q=A+"1",re=n[$],ne=n[Q];n[$]=D(n[$],!0),n[Q]=D(n[Q],!0),z==="pixel"?(o($,C[0]),o(Q,C[1])):(b.coercePosition(r,I,o,F,$,M[0]),b.coercePosition(r,I,o,F,Q,M[1])),r[$]=B(r[$]),r[Q]=B(r[Q]),n[$]=re,n[Q]=ne}if(z==="pixel"){let $=n[x];n[x]=D(n[x],!0),b.coercePosition(r,I,o,F,x,.25),r[x]=B(r[x]),n[x]=$}}}),g&&p.noneOrAll(n,r,["x0","x1","y0","y1"]);var _=v==="line",T,f;if(g&&(T=o("label.texttemplate"),o("label.texttemplatefallback")),T||(f=o("label.text")),f||T){o("label.textangle");var u=o("label.textposition",_?"middle":"middle center");o("label.xanchor"),o("label.yanchor",e(_,u)),o("label.padding"),p.coerceFont(o,"label.font",a.font)}}}}),WD=ze({"src/components/shapes/draw_newshape/defaults.js"(J,V){"use strict";var p=Qn(),b=Nr();function E(k,l){return k?"bottom":l.indexOf("top")!==-1?"top":l.indexOf("bottom")!==-1?"bottom":"middle"}V.exports=function(l,e,t){t("newshape.visible"),t("newshape.name"),t("newshape.showlegend"),t("newshape.legend"),t("newshape.legendwidth"),t("newshape.legendgroup"),t("newshape.legendgrouptitle.text"),b.coerceFont(t,"newshape.legendgrouptitle.font"),t("newshape.legendrank"),t("newshape.drawdirection"),t("newshape.layer"),t("newshape.fillcolor"),t("newshape.fillrule"),t("newshape.opacity");var n=t("newshape.line.width");if(n){var r=(l||{}).plot_bgcolor||"#FFF";t("newshape.line.color",p.contrast(r)),t("newshape.line.dash")}var a=l.dragmode==="drawline",o=t("newshape.label.text"),s=t("newshape.label.texttemplate");if(t("newshape.label.texttemplatefallback"),o||s){t("newshape.label.textangle");var c=t("newshape.label.textposition",a?"middle":"middle center");t("newshape.label.xanchor"),t("newshape.label.yanchor",E(a,c)),t("newshape.label.padding"),b.coerceFont(t,"newshape.label.font",e.font)}t("activeshape.fillcolor"),t("activeshape.opacity")}}}),YD=ze({"src/components/shapes/calc_autorange.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=h1(),k=cv();V.exports=function(o){var s=o._fullLayout,c=p.filterVisible(s.shapes);if(!(!c.length||!o._fullData.length))for(var m=0;m{v=b.getFromId(o,M),h._extremes[v._id]=b.findExtremes(v,C,e(h))})}else h.xref!=="paper"&&i!=="domain"&&(v=b.getFromId(o,h.xref),g=r(v,h,E.paramIsX),g&&(h._extremes[v._id]=b.findExtremes(v,g,e(h))));if(w==="array"){let S=l(o,h,"y");Object.entries(S).forEach(([M,C])=>{v=b.getFromId(o,M),h._extremes[v._id]=b.findExtremes(v,C,t(h))})}else h.yref!=="paper"&&w!=="domain"&&(v=b.getFromId(o,h.yref),g=r(v,h,E.paramIsY),g&&(h._extremes[v._id]=b.findExtremes(v,g,t(h))))}};function l(a,o,s){let c=o[s+"ref"],m=s==="x"?E.paramIsX:E.paramIsY;function h(M,C){M==="paper"||b.getRefType(M)==="domain"||(v[M]||(v[M]=[]),v[M].push(C))}let v={};if(o.type==="path"&&o.path){let M=o.path.match(E.segmentRE)||[];for(var g=0,i=0;iT&&(h(c[g],f[T]),g++)}}else h(c[0],o[s+"0"]),h(c[1],o[s+"1"]);let w={};for(let M in v){let C=b.getFromId(a,M);if(C){var S=C.type==="category"||C.type==="multicategory"?C.r2c:C.d2c;C.type==="date"&&(S=k.decodeDate(S)),w[C._id]=v[M].map(S)}}return w}function e(a){return n(a.line.width,a.xsizemode,a.x0,a.x1,a.path,!1)}function t(a){return n(a.line.width,a.ysizemode,a.y0,a.y1,a.path,!0)}function n(a,o,s,c,m,h){var v=a/2,g=h;if(o==="pixel"){var i=m?k.extractPathCoords(m,h?E.paramIsY:E.paramIsX):[s,c],w=p.aggNums(Math.max,null,i),S=p.aggNums(Math.min,null,i),M=S<0?Math.abs(S)+v:v,C=w>0?w+v:v;return{ppad:v,ppadplus:g?M:C,ppadminus:g?C:M}}else return{ppad:v}}function r(a,o,s){var c=a._id.charAt(0)==="x"?"x":"y",m=a.type==="category"||a.type==="multicategory",h,v,g=0,i=0,w=m?a.r2c:a.d2c,S=o[c+"sizemode"]==="scaled";if(S?(h=o[c+"0"],v=o[c+"1"],m&&(g=o[c+"0shift"],i=o[c+"1shift"])):(h=o[c+"anchor"],v=o[c+"anchor"]),h!==void 0)return[w(h)+g,w(v)+i];if(o.path){var M=1/0,C=-1/0,_=o.path.match(E.segmentRE),T,f,u,A,x;for(a.type==="date"&&(w=k.decodeDate(w)),T=0;T<_.length;T++)f=_[T],u=s[f.charAt(0)].drawn,u!==void 0&&(A=_[T].slice(1).match(E.paramRE),!(!A||A.lengthC&&(C=x)));if(C>=M)return[M,C]}}}}),XD=ze({"src/components/shapes/index.js"(J,V){"use strict";var p=Ox();V.exports={moduleType:"component",name:"shapes",layoutAttributes:L5(),supplyLayoutDefaults:HD(),supplyDrawNewShapeDefaults:WD(),includeBasePlot:m1()("shapes"),calcAutorange:YD(),draw:p.draw,drawOne:p.drawOne}}}),P5=ze({"src/components/images/attributes.js"(J,V){"use strict";var p=hc(),b=hs().templatedArray,E=v1();V.exports=b("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",p.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",p.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})}}),ZD=ze({"src/components/images/defaults.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=Jf(),k=P5(),l="images";V.exports=function(n,r){var a={name:l,handleItemDefaults:e};E(n,r,a)};function e(t,n,r){function a(w,S){return p.coerce(t,n,k,w,S)}var o=a("source"),s=a("visible",!!o);if(!s)return n;a("layer"),a("xanchor"),a("yanchor"),a("sizex"),a("sizey"),a("sizing"),a("opacity");for(var c={_fullLayout:r},m=["x","y"],h=0;h<2;h++){var v=m[h],g=b.coerceRef(t,n,c,v,"paper",void 0);if(g!=="paper"){var i=b.getFromId(c,g);i._imgIndices.push(n._index)}b.coercePosition(n,c,a,g,v,0)}return n}}}),$D=ze({"src/components/images/draw.js"(J,V){"use strict";var p=ci(),b=$i(),E=Gi(),k=Xl(),l=nd();V.exports=function(t){var n=t._fullLayout,r=[],a={},o=[],s,c;for(c=0;c0);m&&(s("active"),s("direction"),s("type"),s("showactive"),s("x"),s("y"),p.noneOrAll(r,a,["x","y"]),s("xanchor"),s("yanchor"),s("pad.t"),s("pad.r"),s("pad.b"),s("pad.l"),p.coerceFont(s,"font",o.font),s("bgcolor",o.paper_bgcolor),s("bordercolor"),s("borderwidth"))}function n(r,a){function o(c,m){return p.coerce(r,a,e,c,m)}var s=o("visible",r.method==="skip"||Array.isArray(r.args));s&&(o("method"),o("args"),o("args2"),o("label"),o("execute"))}}}),eF=ze({"src/components/updatemenus/scrollbox.js"(J,V){"use strict";V.exports=l;var p=ci(),b=Qn(),E=$i(),k=Nr();function l(e,t,n){this.gd=e,this.container=t,this.id=n,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}l.barWidth=2,l.barLength=20,l.barRadius=2,l.barPad=1,l.barColor="#808BA4",l.prototype.enable=function(t,n,r){var a=this.gd._fullLayout,o=a.width,s=a.height;this.position=t;var c=this.position.l,m=this.position.w,h=this.position.t,v=this.position.h,g=this.position.direction,i=g==="down",w=g==="left",S=g==="right",M=g==="up",C=m,_=v,T,f,u,A;!i&&!w&&!S&&!M&&(this.position.direction="down",i=!0);var x=i||M;x?(T=c,f=T+C,i?(u=h,A=Math.min(u+_,s),_=A-u):(A=h+_,u=Math.max(A-_,0),_=A-u)):(u=h,A=u+_,w?(f=c+C,T=Math.max(f-C,0),C=f-T):(T=c,f=Math.min(T+C,o),C=f-T)),this._box={l:T,t:u,w:C,h:_};var z=m>C,I=l.barLength+2*l.barPad,O=l.barWidth+2*l.barPad,D=c,B=h+v;B+O>s&&(B=s-O);var F=this.container.selectAll("rect.scrollbar-horizontal").data(z?[0]:[]);F.exit().on(".drag",null).remove(),F.enter().append("rect").classed("scrollbar-horizontal",!0).call(b.fill,l.barColor),z?(this.hbar=F.attr({rx:l.barRadius,ry:l.barRadius,x:D,y:B,width:I,height:O}),this._hbarXMin=D+I/2,this._hbarTranslateMax=C-I):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var P=v>_,j=l.barWidth+2*l.barPad,U=l.barLength+2*l.barPad,$=c+m,Q=h;$+j>o&&($=o-j);var re=this.container.selectAll("rect.scrollbar-vertical").data(P?[0]:[]);re.exit().on(".drag",null).remove(),re.enter().append("rect").classed("scrollbar-vertical",!0).call(b.fill,l.barColor),P?(this.vbar=re.attr({rx:l.barRadius,ry:l.barRadius,x:$,y:Q,width:j,height:U}),this._vbarYMin=Q+U/2,this._vbarTranslateMax=_-U):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var ne=this.id,se=T-.5,G=P?f+j+.5:f+.5,X=u-.5,K=z?A+O+.5:A+.5,H=a._topdefs.selectAll("#"+ne).data(z||P?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",ne).append("rect"),z||P?(this._clipRect=H.select("rect").attr({x:Math.floor(se),y:Math.floor(X),width:Math.ceil(G)-Math.floor(se),height:Math.ceil(K)-Math.floor(X)}),this.container.call(E.setClipUrl,ne,this.gd),this.bg.attr({x:c,y:h,width:m,height:v})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.setClipUrl,null),delete this._clipRect),z||P){var Y=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(Y);var q=p.behavior.drag().on("dragstart",function(){p.event.sourceEvent.preventDefault(),p.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));z&&this.hbar.on(".drag",null).call(q),P&&this.vbar.on(".drag",null).call(q)}this.setTranslate(n,r)},l.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(E.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)},l.prototype._onBoxDrag=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t-=p.event.dx),this.vbar&&(n-=p.event.dy),this.setTranslate(t,n)},l.prototype._onBoxWheel=function(){var t=this.translateX,n=this.translateY;this.hbar&&(t+=p.event.deltaY),this.vbar&&(n+=p.event.deltaY),this.setTranslate(t,n)},l.prototype._onBarDrag=function(){var t=this.translateX,n=this.translateY;if(this.hbar){var r=t+this._hbarXMin,a=r+this._hbarTranslateMax,o=k.constrain(p.event.x,r,a),s=(o-r)/(a-r),c=this.position.w-this._box.w;t=s*c}if(this.vbar){var m=n+this._vbarYMin,h=m+this._vbarTranslateMax,v=k.constrain(p.event.y,m,h),g=(v-m)/(h-m),i=this.position.h-this._box.h;n=g*i}this.setTranslate(t,n)},l.prototype.setTranslate=function(t,n){var r=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=k.constrain(t||0,0,r),n=k.constrain(n||0,0,a),this.translateX=t,this.translateY=n,this.container.call(E.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-n),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+n-.5)}),this.hbar){var o=t/r;this.hbar.call(E.setTranslate,t+o*this._hbarTranslateMax,n)}if(this.vbar){var s=n/a;this.vbar.call(E.setTranslate,t,n+s*this._vbarTranslateMax)}}}}),tF=ze({"src/components/updatemenus/draw.js"(J,V){"use strict";var p=ci(),b=cl(),E=Qn(),k=$i(),l=Nr(),e=Cs(),t=hs().arrayEditor,n=dc().LINE_SPACING,r=Zx(),a=eF();V.exports=function(I){var O=I._fullLayout,D=l.filterVisible(O[r.name]);function B(ne){b.autoMargin(I,u(ne))}var F=O._menulayer.selectAll("g."+r.containerClassName).data(D.length>0?[0]:[]);if(F.enter().append("g").classed(r.containerClassName,!0).style("cursor","pointer"),F.exit().each(function(){p.select(this).selectAll("g."+r.headerGroupClassName).each(B)}).remove(),D.length!==0){var P=F.selectAll("g."+r.headerGroupClassName).data(D,o);P.enter().append("g").classed(r.headerGroupClassName,!0);for(var j=l.ensureSingle(F,"g",r.dropdownButtonGroupClassName,function(ne){ne.style("pointer-events","all")}),U=0;U0?[0]:[]);$.enter().append("g").classed(r.containerClassName,!0).style("cursor",P?null:"ew-resize");function Q(G){G._commandObserver&&(G._commandObserver.remove(),delete G._commandObserver),b.autoMargin(F,m(G))}if($.exit().each(function(){p.select(this).selectAll("g."+r.groupClassName).each(Q)}).remove(),U.length!==0){var re=$.selectAll("g."+r.groupClassName).data(U,v);re.enter().append("g").classed(r.groupClassName,!0),re.exit().each(Q).remove();for(var ne=0;ne0&&(re=re.transition().duration(F.transition.duration).ease(F.transition.easing)),re.attr("transform",e(Q-r.gripWidth*.5,F._dims.currentValueTotalHeight))}}function z(B,F){var P=B._dims;return P.inputAreaStart+r.stepInset+(P.inputAreaLength-2*r.stepInset)*Math.min(1,Math.max(0,F))}function I(B,F){var P=B._dims;return Math.min(1,Math.max(0,(F-r.stepInset-P.inputAreaStart)/(P.inputAreaLength-2*r.stepInset-2*P.inputAreaStart)))}function O(B,F,P){var j=P._dims,U=l.ensureSingle(B,"rect",r.railTouchRectClass,function($){$.call(f,F,B,P).style("pointer-events","all")});U.attr({width:j.inputAreaLength,height:Math.max(j.inputAreaWidth,r.tickOffset+P.ticklen+j.labelHeight)}).call(E.fill,P.bgcolor).attr("opacity",0),k.setTranslate(U,0,j.currentValueTotalHeight)}function D(B,F){var P=F._dims,j=P.inputAreaLength-r.railInset*2,U=l.ensureSingle(B,"rect",r.railRectClass);U.attr({width:j,height:r.railWidth,rx:r.railRadius,ry:r.railRadius,"shape-rendering":"crispEdges"}).call(E.stroke,F.bordercolor).call(E.fill,F.bgcolor).style("stroke-width",F.borderwidth+"px"),k.setTranslate(U,r.railInset,(P.inputAreaWidth-r.railWidth)*.5+P.currentValueTotalHeight)}}}),iF=ze({"src/components/sliders/index.js"(J,V){"use strict";var p=_1();V.exports={moduleType:"component",name:p.name,layoutAttributes:I5(),supplyLayoutDefaults:aF(),draw:nF()}}}),$x=ze({"src/components/rangeslider/attributes.js"(J,V){"use strict";var p=fc();V.exports={bgcolor:{valType:"color",dflt:p.background,editType:"plot"},bordercolor:{valType:"color",dflt:p.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}}}),D5=ze({"src/components/rangeslider/oppaxis_attributes.js"(J,V){"use strict";V.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}}}),Kx=ze({"src/components/rangeslider/constants.js"(J,V){"use strict";V.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}}}),oF=ze({"src/components/rangeslider/helpers.js"(J){"use strict";var V=Xl(),p=Cs(),b=Kx(),E=dc().LINE_SPACING,k=b.name;function l(e){var t=e&&e[k];return t&&t.visible}J.isVisible=l,J.makeData=function(e){for(var t=V.list({_fullLayout:e},"x",!0),n=e.margin,r=[],a=0;a=Ge.max)Ie=he[Ve+1];else if(Se=Ge.pmax)Ie=he[Ve+1];else if(Se0?f.touches[0].clientX:0}function h(f,u,A,x){if(u._context.staticPlot)return;var z=f.select("rect."+c.slideBoxClassName).node(),I=f.select("rect."+c.grabAreaMinClassName).node(),O=f.select("rect."+c.grabAreaMaxClassName).node();function D(){var B=p.event,F=B.target,P=m(B),j=P-f.node().getBoundingClientRect().left,U=x.d2p(A._rl[0]),$=x.d2p(A._rl[1]),Q=o.coverSlip();this.addEventListener("touchmove",re),this.addEventListener("touchend",ne),Q.addEventListener("mousemove",re),Q.addEventListener("mouseup",ne);function re(se){var G=m(se),X=+G-P,K,H,Y;switch(F){case z:if(Y="ew-resize",U+X>A._length||$+X<0)return;K=U+X,H=$+X;break;case I:if(Y="col-resize",U+X>A._length)return;K=U+X,H=$;break;case O:if(Y="col-resize",$+X<0)return;K=U,H=$+X;break;default:Y="ew-resize",K=j,H=j+X;break}if(H0);if(w){var S=n(o,s,c);g("x",S[0]),g("y",S[1]),p.noneOrAll(a,o,["x","y"]),g("xanchor"),g("yanchor"),p.coerceFont(g,"font",s.font);var M=g("bgcolor");g("activecolor",b.contrast(M,e.lightAmount,e.darkAmount)),g("bordercolor"),g("borderwidth")}};function t(r,a,o,s){var c=s.calendar;function m(g,i){return p.coerce(r,a,l.buttons,g,i)}var h=m("visible");if(h){var v=m("step");v!=="all"&&(c&&c!=="gregorian"&&(v==="month"||v==="year")?a.stepmode="backward":m("stepmode"),m("count")),m("label")}}function n(r,a,o){for(var s=o.filter(function(v){return a[v].anchor===r._id}),c=0,m=0;m1)){delete c.grid;return}if(!g&&!i&&!w){var A=T("pattern")==="independent";A&&(g=!0)}_._hasSubplotGrid=g;var x=T("roworder"),z=x==="top to bottom",I=g?.2:.1,O=g?.3:.1,D,B;S&&c._splomGridDflt&&(D=c._splomGridDflt.xside,B=c._splomGridDflt.yside),_._domains={x:r("x",T,I,D,u),y:r("y",T,O,B,f,z)}}function r(s,c,m,h,v,g){var i=c(s+"gap",m),w=c("domain."+s);c(s+"side",h);for(var S=new Array(v),M=w[0],C=(w[1]-M)/(v-i),_=C*(1-i),T=0;T0,h=t._context.staticPlot;n.each(function(v){var g=v[0].trace,i=g.error_x||{},w=g.error_y||{},S;g.ids&&(S=function(T){return T.id});var M=k.hasMarkers(g)&&g.marker.maxdisplayed>0;!w.visible&&!i.visible&&(v=[]);var C=p.select(this).selectAll("g.errorbar").data(v,S);if(C.exit().remove(),!!v.length){i.visible||C.selectAll("path.xerror").remove(),w.visible||C.selectAll("path.yerror").remove(),C.style("opacity",1);var _=C.enter().append("g").classed("errorbar",!0);m&&_.style("opacity",0).transition().duration(a.duration).style("opacity",1),E.setClipUrl(C,r.layerClipId,t),C.each(function(T){var f=p.select(this),u=l(T,s,c);if(!(M&&!T.vis)){var A,x=f.select("path.yerror");if(w.visible&&b(u.x)&&b(u.yh)&&b(u.ys)){var z=w.width;A="M"+(u.x-z)+","+u.yh+"h"+2*z+"m-"+z+",0V"+u.ys,u.noYS||(A+="m-"+z+",0h"+2*z),o=!x.size(),o?x=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("yerror",!0):m&&(x=x.transition().duration(a.duration).ease(a.easing)),x.attr("d",A)}else x.remove();var I=f.select("path.xerror");if(i.visible&&b(u.y)&&b(u.xh)&&b(u.xs)){var O=(i.copy_ystyle?w:i).width;A="M"+u.xh+","+(u.y-O)+"v"+2*O+"m0,-"+O+"H"+u.xs,u.noXS||(A+="m0,-"+O+"v"+2*O),o=!I.size(),o?I=f.append("path").style("vector-effect",h?"none":"non-scaling-stroke").classed("xerror",!0):m&&(I=I.transition().duration(a.duration).ease(a.easing)),I.attr("d",A)}else I.remove()}})}})};function l(e,t,n){var r={x:t.c2p(e.x),y:n.c2p(e.y)};return e.yh!==void 0&&(r.yh=n.c2p(e.yh),r.ys=n.c2p(e.ys),b(r.ys)||(r.noYS=!0,r.ys=n.c2p(e.ys,!0))),e.xh!==void 0&&(r.xh=t.c2p(e.xh),r.xs=t.c2p(e.xs),b(r.xs)||(r.noXS=!0,r.xs=t.c2p(e.xs,!0))),r}}}),yF=ze({"src/components/errorbars/style.js"(J,V){"use strict";var p=ci(),b=Qn();V.exports=function(k){k.each(function(l){var e=l[0].trace,t=e.error_y||{},n=e.error_x||{},r=p.select(this);r.selectAll("path.yerror").style("stroke-width",t.thickness+"px").call(b.stroke,t.color),n.copy_ystyle&&(n=t),r.selectAll("path.xerror").style("stroke-width",n.thickness+"px").call(b.stroke,n.color)})}}}),_F=ze({"src/components/errorbars/index.js"(J,V){"use strict";var p=Nr(),b=Al().overrideAll,E=B5(),k={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E)};delete k.error_x.copy_zstyle,delete k.error_y.copy_zstyle,delete k.error_y.copy_ystyle;var l={error_x:p.extendFlat({},E),error_y:p.extendFlat({},E),error_z:p.extendFlat({},E)};delete l.error_x.copy_ystyle,delete l.error_y.copy_ystyle,delete l.error_z.copy_ystyle,delete l.error_z.copy_zstyle,V.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:k,bar:k,histogram:k,scatter3d:b(l,"calc","nested"),scattergl:b(k,"calc","nested")}},supplyDefaults:vF(),calc:mF(),makeComputeError:O5(),plot:gF(),style:yF(),hoverInfo:e};function e(t,n,r){(n.error_y||{}).visible&&(r.yerr=t.yh-t.y,n.error_y.symmetric||(r.yerrneg=t.y-t.ys)),(n.error_x||{}).visible&&(r.xerr=t.xh-t.x,n.error_x.symmetric||(r.xerrneg=t.x-t.xs))}}}),xF=ze({"src/components/colorbar/constants.js"(J,V){"use strict";V.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}}}),bF=ze({"src/components/colorbar/draw.js"(J,V){"use strict";var p=ci(),b=cl(),E=mi(),k=Gi(),l=_h(),e=Nr(),t=e.strTranslate,n=Ki().extendFlat,r=gd(),a=$i(),o=Qn(),s=qv(),c=Cs(),m=Bf().flipScale,h=y1(),v=Wx(),g=cf(),i=dc(),w=i.LINE_SPACING,S=i.FROM_TL,M=i.FROM_BR,C=xF().cn;function _(O){var D=O._fullLayout,B=D._infolayer.selectAll("g."+C.colorbar).data(T(O),function(F){return F._id});B.enter().append("g").attr("class",function(F){return F._id}).classed(C.colorbar,!0),B.each(function(F){var P=p.select(this);e.ensureSingle(P,"rect",C.cbbg),e.ensureSingle(P,"g",C.cbfills),e.ensureSingle(P,"g",C.cblines),e.ensureSingle(P,"g",C.cbaxis,function(U){U.classed(C.crisp,!0)}),e.ensureSingle(P,"g",C.cbtitleunshift,function(U){U.append("g").classed(C.cbtitle,!0)}),e.ensureSingle(P,"rect",C.cboutline);var j=A(P,F,O);j&&j.then&&(O._promises||[]).push(j),O._context.edits.colorbarPosition&&x(P,F,O)}),B.exit().each(function(F){b.autoMargin(O,F._id)}).remove(),B.order()}function T(O){var D=O._fullLayout,B=O.calcdata,F=[],P,j,U,$;function Q(ee){return n(ee,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function re(){typeof $.calc=="function"?$.calc(O,U,P):(P._fillgradient=j.reversescale?m(j.colorscale):j.colorscale,P._zrange=[j[$.min],j[$.max]])}for(var ne=0;ne[Math.min(O[0]+D,O[1]),O[1]],u=(O,D)=>[O[0],Math.max(O[1]-D,O[0])];function A(O,D,B){var F=D.orientation==="v",P=D.len,j=D.lenmode,U=D.thickness,$=D.thicknessmode,Q=D.outlinewidth,re=D.borderwidth,ne=D.bgcolor,se=D.xanchor,G=D.yanchor,X=D.xpad,K=D.ypad,H=D.x,Y=F?D.y:1-D.y,q=D.yref==="paper",Z=D.xref==="paper",ee=B._fullLayout,ae=ee._size,he=D._fillcolor,xe=D._line,we=D.title,Me=we.side,Se=D._zrange||p.extent((typeof he=="function"?he:xe.color).domain()),Ie=typeof xe.color=="function"?xe.color:function(){return xe.color},Ve=typeof he=="function"?he:function(){return he},Ge=D._levels,ke=z(B,D,Se),_e=ke.fill,ce=ke.line,ve=Math.round(U*($==="fraction"?F?ae.w:ae.h:1)),le=ve/(F?ae.w:ae.h),Ae=Math.round(P*(j==="fraction"?F?ae.h:ae.w:1)),Be=Ae/(F?ae.h:ae.w),Xe=Z?ae.w:B._fullLayout.width,Ye=q?ae.h:B._fullLayout.height,yt=Math.round(F?H*Xe+X:Y*Ye+K),gt={center:.5,right:1}[se]||0,Tt={top:1,middle:.5}[G]||0,At=F?H-gt*le:Y-Tt*le,$t=F?Y-Tt*Be:H-gt*Be,rr=Math.round(F?Ye*(1-$t):Xe*$t);D._lenFrac=Be,D._thickFrac=le,D._uFrac=At,D._vFrac=$t;var _r=D._axis=I(B,D,Se);_r.position=le+(F?H+X/ae.w:Y+K/ae.h);var Xt=["top","bottom"].indexOf(Me)!==-1;if(F&&Xt&&(_r.title.side=Me,_r.titlex=H+X/ae.w,_r.titley=$t+(we.side==="top"?Be-K/ae.h:K/ae.h)),!F&&!Xt&&(_r.title.side=Me,_r.titley=Y+K/ae.h,_r.titlex=$t+X/ae.w),xe.color&&D.tickmode==="auto"){_r.tickmode="linear",_r.tick0=Ge.start;var or=Ge.size,Ot=e.constrain(Ae/50,4,15)+1,vt=(Se[1]-Se[0])/((D.nticks||Ot)*or);if(vt>1){var ht=Math.pow(10,Math.floor(Math.log(vt)/Math.LN10));or*=ht*e.roundUp(vt/ht,[2,5,10]),(Math.abs(Ge.start)/Ge.size+1e-6)%1<2e-6&&(_r.tick0=0)}_r.dtick=or}var De=F?K/ae.h:X/ae.w;_r.domain=u(f([$t,$t+Be],De),De),_r.setScale(),O.attr("transform",t(Math.round(ae.l),Math.round(ae.t)));var Ne=O.select("."+C.cbtitleunshift).attr("transform",t(-Math.round(ae.l),-Math.round(ae.t))),We=_r.ticklabelposition,Ke=_r.title.font.size,Je=O.select("."+C.cbaxis),et,Mt=0,pt=0;function Pt(Sr,Kr){var Yt={propContainer:_r,propName:D._propPrefix+"title.text",traceIndex:D._traceIndex,_meta:D._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:O.select("."+C.cbtitle)},Rt=Sr.charAt(0)==="h"?Sr.slice(1):"h"+Sr;O.selectAll("."+Rt+",."+Rt+"-math-group").remove(),s.draw(B,Sr,n(Yt,Kr||{}))}function Ct(){if(F&&Xt||!F&&!Xt){var Sr,Kr;Me==="top"&&(Sr=X+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t-Be)+3+Ke*.75),Me==="bottom"&&(Sr=X+ae.l+Xe*H,Kr=K+ae.t+Ye*(1-$t)-3-Ke*.25),Me==="right"&&(Kr=K+ae.t+Ye*Y+3+Ke*.75,Sr=X+ae.l+Xe*$t),Pt(_r._id+"title",{attributes:{x:Sr,y:Kr,"text-anchor":F?"start":"middle"}})}}function qt(){if(F&&!Xt||!F&&Xt){var Sr=_r.position||0,Kr=_r._offset+_r._length/2,Yt,Rt;if(Me==="right")Rt=Kr,Yt=ae.l+Xe*Sr+10+Ke*(_r.showticklabels?1:.5);else if(Yt=Kr,Me==="bottom"&&(Rt=ae.t+Ye*Sr+10+(We.indexOf("inside")===-1?_r.tickfont.size:0)+(_r.ticks!=="inside"&&D.ticklen||0)),Me==="top"){var nr=we.text.split("
").length;Rt=ae.t+Ye*Sr+10-ve-w*Ke*nr}Pt((F?"h":"v")+_r._id+"title",{avoid:{selection:p.select(B).selectAll("g."+_r._id+"tick"),side:Me,offsetTop:F?0:ae.t,offsetLeft:F?ae.l:0,maxShift:F?ee.width:ee.height},attributes:{x:Yt,y:Rt,"text-anchor":"middle"},transform:{rotate:F?-90:0,offset:0}})}}function Vt(){if(!F&&!Xt||F&&Xt){var Sr=O.select("."+C.cbtitle),Kr=Sr.select("text"),Yt=[-Q/2,Q/2],Rt=Sr.select(".h"+_r._id+"title-math-group").node(),nr=15.6;Kr.node()&&(nr=parseInt(Kr.node().style.fontSize,10)*w);var ur;if(Rt?(ur=a.bBox(Rt),pt=ur.width,Mt=ur.height,Mt>nr&&(Yt[1]-=(Mt-nr)/2)):Kr.node()&&!Kr.classed(C.jsPlaceholder)&&(ur=a.bBox(Kr.node()),pt=ur.width,Mt=ur.height),F){if(Mt){if(Mt+=5,Me==="top")_r.domain=u(_r.domain,Mt/ae.h),Yt[1]*=-1;else{_r.domain=f(_r.domain,Mt/ae.h);var cr=c.lineCount(Kr);Yt[1]+=(1-cr)*nr}Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale()}}else pt&&(Me==="right"&&(_r.domain=f(_r.domain,(pt+Ke/2)/ae.w)),Sr.attr("transform",t(Yt[0],Yt[1])),_r.setScale())}O.selectAll("."+C.cbfills+",."+C.cblines).attr("transform",F?t(0,Math.round(ae.h*(1-_r.domain[1]))):t(Math.round(ae.w*_r.domain[0]),0)),Je.attr("transform",F?t(0,Math.round(-ae.t)):t(Math.round(-ae.l),0));var Rr=O.select("."+C.cbfills).selectAll("rect."+C.cbfill).attr("style","").data(_e);Rr.enter().append("rect").classed(C.cbfill,!0).attr("style",""),Rr.exit().remove();var Qr=Se.map(_r.c2p).map(Math.round).sort(function(un,Xa){return un-Xa});Rr.each(function(un,Xa){var ja=[Xa===0?Se[0]:(_e[Xa]+_e[Xa-1])/2,Xa===_e.length-1?Se[1]:(_e[Xa]+_e[Xa+1])/2].map(_r.c2p).map(Math.round);F&&(ja[1]=e.constrain(ja[1]+(ja[1]>ja[0])?1:-1,Qr[0],Qr[1]));var Nn=p.select(this).attr(F?"x":"y",yt).attr(F?"y":"x",p.min(ja)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(p.max(ja)-p.min(ja),2));if(D._fillgradient)a.gradient(Nn,B,D._id,F?"vertical":"horizontalreversed",D._fillgradient,"fill");else{var yn=Ve(un).replace("e-","");Nn.attr("fill",o.hexString(yn))}});var Zr=O.select("."+C.cblines).selectAll("path."+C.cbline).data(xe.color&&xe.width?ce:[]);Zr.enter().append("path").classed(C.cbline,!0),Zr.exit().remove(),Zr.each(function(un){var Xa=yt,ja=Math.round(_r.c2p(un))+xe.width/2%1;p.select(this).attr("d","M"+(F?Xa+","+ja:ja+","+Xa)+(F?"h":"v")+ve).call(a.lineGroupStyle,xe.width,Ie(un),xe.dash)}),Je.selectAll("g."+_r._id+"tick,path").remove();var ha=yt+ve+(Q||0)/2-(D.ticks==="outside"?1:0),Pa=k.calcTicks(_r),La=k.getTickSigns(_r)[2];return k.drawTicks(B,_r,{vals:_r.ticks==="inside"?k.clipEnds(_r,Pa):Pa,layer:Je,path:k.makeTickPath(_r,ha,La),transFn:k.makeTransTickFn(_r)}),k.drawLabels(B,_r,{vals:Pa,layer:Je,transFn:k.makeTransTickLabelFn(_r),labelFns:k.makeLabelFns(_r,ha)})}function Ht(){var Sr,Kr=ve+Q/2;We.indexOf("inside")===-1&&(Sr=a.bBox(Je.node()),Kr+=F?Sr.width:Sr.height),et=Ne.select("text");var Yt=0,Rt=F&&Me==="top",nr=!F&&Me==="right",ur=0;if(et.node()&&!et.classed(C.jsPlaceholder)){var cr,Rr=Ne.select(".h"+_r._id+"title-math-group").node();Rr&&(F&&Xt||!F&&!Xt)?(Sr=a.bBox(Rr),Yt=Sr.width,cr=Sr.height):(Sr=a.bBox(Ne.node()),Yt=Sr.right-ae.l-(F?yt:rr),cr=Sr.bottom-ae.t-(F?rr:yt),!F&&Me==="top"&&(Kr+=Sr.height,ur=Sr.height)),nr&&(et.attr("transform",t(Yt/2+Ke/2,0)),Yt*=2),Kr=Math.max(Kr,F?Yt:cr)}var Qr=(F?X:K)*2+Kr+re+Q/2,Zr=0;!F&&we.text&&G==="bottom"&&Y<=0&&(Zr=Qr/2,Qr+=Zr,ur+=Zr),ee._hColorbarMoveTitle=Zr,ee._hColorbarMoveCBTitle=ur;var ha=re+Q,Pa=(F?yt:rr)-ha/2-(F?X:0),La=(F?rr:yt)-(F?Ae:K+ur-Zr);O.select("."+C.cbbg).attr("x",Pa).attr("y",La).attr(F?"width":"height",Math.max(Qr-Zr,2)).attr(F?"height":"width",Math.max(Ae+ha,2)).call(o.fill,ne).call(o.stroke,D.bordercolor).style("stroke-width",re);var un=nr?Math.max(Yt-10,0):0;O.selectAll("."+C.cboutline).attr("x",(F?yt:rr+X)+un).attr("y",(F?rr+K-Ae:yt)+(Rt?Mt:0)).attr(F?"width":"height",Math.max(ve,2)).attr(F?"height":"width",Math.max(Ae-(F?2*K+Mt:2*X+un),2)).call(o.stroke,D.outlinecolor).style({fill:"none","stroke-width":Q});var Xa=F?gt*Qr:0,ja=F?0:(1-Tt)*Qr-ur;if(Xa=Z?ae.l-Xa:-Xa,ja=q?ae.t-ja:-ja,O.attr("transform",t(Xa,ja)),!F&&(re||o.opacity(ne)&&!o.equals(ee.paper_bgcolor,ne))){var Nn=Je.selectAll("text"),yn=Nn[0].length,Un=O.select("."+C.cbbg).node(),li=a.bBox(Un),Yn=a.getTranslate(O),on=2;Nn.each(function(Tr,Ir){var Dr=0,ot=yn-1;if(Ir===Dr||Ir===ot){var kt=a.bBox(this),jt=a.getTranslate(this),ar;if(Ir===ot){var Er=kt.right+jt.x,xr=li.right+Yn.x+rr-re-on+H;ar=xr-Er,ar>0&&(ar=0)}else if(Ir===Dr){var zr=kt.left+jt.x,Lr=li.left+Yn.x+rr+re+on;ar=Lr-zr,ar<0&&(ar=0)}ar&&(yn<3?this.setAttribute("transform","translate("+ar+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var en={},vi=S[se],Yi=M[se],Ja=S[G],Oa=M[G],lt=Qr-ve;F?(j==="pixels"?(en.y=Y,en.t=Ae*Ja,en.b=Ae*Oa):(en.t=en.b=0,en.yt=Y+P*Ja,en.yb=Y-P*Oa),$==="pixels"?(en.x=H,en.l=Qr*vi,en.r=Qr*Yi):(en.l=lt*vi,en.r=lt*Yi,en.xl=H-U*vi,en.xr=H+U*Yi)):(j==="pixels"?(en.x=H,en.l=Ae*vi,en.r=Ae*Yi):(en.l=en.r=0,en.xl=H+P*vi,en.xr=H-P*Yi),$==="pixels"?(en.y=1-Y,en.t=Qr*Ja,en.b=Qr*Oa):(en.t=lt*Ja,en.b=lt*Oa,en.yt=Y-U*Ja,en.yb=Y+U*Oa));var rt=D.y<.5?"b":"t",fr=D.x<.5?"l":"r";B._fullLayout._reservedMargin[D._id]={};var lr={r:ee.width-Pa-Xa,l:Pa+en.r,b:ee.height-La-ja,t:La+en.b};Z&&q?b.autoMargin(B,D._id,en):Z?B._fullLayout._reservedMargin[D._id][rt]=lr[rt]:q||F?B._fullLayout._reservedMargin[D._id][fr]=lr[fr]:B._fullLayout._reservedMargin[D._id][rt]=lr[rt]}return e.syncOrAsync([b.previousPromises,Ct,Vt,qt,b.previousPromises,Ht],B)}function x(O,D,B){var F=D.orientation==="v",P=B._fullLayout,j=P._size,U,$,Q;l.init({element:O.node(),gd:B,prepFn:function(){U=O.attr("transform"),r(O)},moveFn:function(re,ne){O.attr("transform",U+t(re,ne)),$=l.align((F?D._uFrac:D._vFrac)+re/j.w,F?D._thickFrac:D._lenFrac,0,1,D.xanchor),Q=l.align((F?D._vFrac:1-D._uFrac)-ne/j.h,F?D._lenFrac:D._thickFrac,0,1,D.yanchor);var se=l.getCursor($,Q,D.xanchor,D.yanchor);r(O,se)},doneFn:function(){if(r(O),$!==void 0&&Q!==void 0){var re={};re[D._propPrefix+"x"]=$,re[D._propPrefix+"y"]=Q,D._traceIndex!==void 0?E.call("_guiRestyle",B,re,D._traceIndex):E.call("_guiRelayout",B,re)}}})}function z(O,D,B){var F=D._levels,P=[],j=[],U,$,Q=F.end+F.size/100,re=F.size,ne=1.001*B[0]-.001*B[1],se=1.001*B[1]-.001*B[0];for($=0;$<1e5&&(U=F.start+$*re,!(re>0?U>=Q:U<=Q));$++)U>ne&&U0?U>=Q:U<=Q));$++)U>B[0]&&U-1}V.exports=function(n,r){var a,o=n.data,s=n.layout,c=k([],o),m=k({},s,l(r.tileClass)),h=n._context||{};if(r.width&&(m.width=r.width),r.height&&(m.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){m.annotations=[];var v=Object.keys(m);for(a=0;a=0)return h}else if(typeof h=="string"&&(h=h.trim(),h.slice(-1)==="%"&&p(h.slice(0,-1))&&(h=+h.slice(0,-1),h>=0)))return h+"%"}function m(h,v,g,i,w,S){S=S||{};var M=S.moduleHasSelected!==!1,C=S.moduleHasUnselected!==!1,_=S.moduleHasConstrain!==!1,T=S.moduleHasCliponaxis!==!1,f=S.moduleHasTextangle!==!1,u=S.moduleHasInsideanchor!==!1,A=!!S.hasPathbar,x=Array.isArray(w)||w==="auto",z=x||w==="inside",I=x||w==="outside";if(z||I){var O=a(i,"textfont",g.font),D=b.extendFlat({},O),B=h.textfont&&h.textfont.color,F=!B;if(F&&delete D.color,a(i,"insidetextfont",D),A){var P=b.extendFlat({},O);F&&delete P.color,a(i,"pathbar.textfont",P)}I&&a(i,"outsidetextfont",O),M&&i("selected.textfont.color"),C&&i("unselected.textfont.color"),_&&i("constraintext"),T&&i("cliponaxis"),f&&i("textangle"),i("texttemplate"),i("texttemplatefallback")}z&&u&&i("insidetextanchor")}V.exports={supplyDefaults:o,crossTraceDefaults:s,handleText:m,validateCornerradius:c}}}),j5=ze({"src/traces/bar/layout_defaults.js"(J,V){"use strict";var p=mi(),b=Gi(),E=Nr(),k=Qx(),l=qh().validateCornerradius;V.exports=function(e,t,n){function r(M,C){return E.coerce(e,t,k,M,C)}for(var a=!1,o=!1,s=!1,c={},m=r("barmode"),h=m==="group",v=0;v0&&!c[i]&&(s=!0),c[i]=!0),g.visible&&g.type==="histogram"){var w=b.getFromId({_fullLayout:t},g[g.orientation==="v"?"xaxis":"yaxis"]);w.type!=="category"&&(o=!0)}}if(!a){delete t.barmode;return}m!=="overlay"&&r("barnorm"),r("bargap",o&&!s?0:.2),r("bargroupgap");var S=r("barcornerradius");t.barcornerradius=l(S)}}}),x1=ze({"src/traces/bar/arrays_to_calcdata.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){for(var l=0;lt;if(!n)return k}return l!==void 0?l:E.dflt},J.coerceColor=function(E,k,l){return V.isValid(k)?k:l!==void 0?l:E.dflt},J.coerceEnumerated=function(E,k,l){return E.coerceNumber&&(k=+k),E.values.indexOf(k)!==-1?k:l!==void 0?l:E.dflt},J.getValue=function(E,k){var l;return b(E)?k1||A.bargap===0&&A.bargroupgap===0&&!x[0].trace.marker.line.width)&&p.select(this).attr("shape-rendering","crispEdges")}),f.selectAll("g.points").each(function(x){var z=p.select(this),I=x[0].trace;c(z,I,T)}),l.getComponentMethod("errorbars","style")(f)}function c(T,f,u){E.pointStyle(T.selectAll("path"),f,u),m(T,f,u)}function m(T,f,u){T.selectAll("text").each(function(A){var x=p.select(this),z=k.ensureUniformFontSize(u,i(x,A,f,u));E.font(x,z)})}function h(T,f,u){var A=f[0].trace;A.selectedpoints?v(u,A,T):(c(u,A,T),l.getComponentMethod("errorbars","style")(u))}function v(T,f,u){E.selectedPointStyle(T.selectAll("path"),f),g(T.selectAll("text"),f,u)}function g(T,f,u){T.each(function(A){var x=p.select(this),z;if(A.selected){z=k.ensureUniformFontSize(u,i(x,A,f,u));var I=f.selected.textfont&&f.selected.textfont.color;I&&(z.color=I),E.font(x,z)}else E.selectedTextStyle(x,f)})}function i(T,f,u,A){var x=A._fullLayout.font,z=u.textfont;if(T.classed("bartext-inside")){var I=_(f,u);z=S(u,f.i,x,I)}else T.classed("bartext-outside")&&(z=M(u,f.i,x));return z}function w(T,f,u){return C(n,T.textfont,f,u)}function S(T,f,u,A){var x=w(T,f,u),z=T._input.textfont===void 0||T._input.textfont.color===void 0||Array.isArray(T.textfont.color)&&T.textfont.color[f]===void 0;return z&&(x={color:b.contrast(A),family:x.family,size:x.size,weight:x.weight,style:x.style,variant:x.variant,textcase:x.textcase,lineposition:x.lineposition,shadow:x.shadow}),C(r,T.insidetextfont,f,x)}function M(T,f,u){var A=w(T,f,u);return C(a,T.outsidetextfont,f,A)}function C(T,f,u,A){f=f||{};var x=o.getValue(f.family,u),z=o.getValue(f.size,u),I=o.getValue(f.color,u),O=o.getValue(f.weight,u),D=o.getValue(f.style,u),B=o.getValue(f.variant,u),F=o.getValue(f.textcase,u),P=o.getValue(f.lineposition,u),j=o.getValue(f.shadow,u);return{family:o.coerceString(T.family,x,A.family),size:o.coerceNumber(T.size,z,A.size),color:o.coerceColor(T.color,I,A.color),weight:o.coerceString(T.weight,O,A.weight),style:o.coerceString(T.style,D,A.style),variant:o.coerceString(T.variant,B,A.variant),textcase:o.coerceString(T.variant,F,A.textcase),lineposition:o.coerceString(T.variant,P,A.lineposition),shadow:o.coerceString(T.variant,j,A.shadow)}}function _(T,f){return f.type==="waterfall"?f[T.dir].marker.color:T.mcc||T.mc||f.marker.color}V.exports={style:s,styleTextPoints:m,styleOnSelect:h,getInsideTextFont:S,getOutsideTextFont:M,getBarColor:_,resizeText:e}}}),Xv=ze({"src/traces/bar/plot.js"(J,V){"use strict";var p=ci(),b=ao(),E=Nr(),k=Cs(),l=Qn(),e=$i(),t=mi(),n=Gi().tickText,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=ld(),c=tb(),m=hv(),h=jd(),v=h.text,g=h.textposition,i=kh().appendArrayPointValue,w=m.TEXTPAD;function S(re){return re.id}function M(re){if(re.ids)return S}function C(re){return(re>0)-(re<0)}function _(re,ne){return re0}function A(re,ne,se,G,X,K){var H=ne.xaxis,Y=ne.yaxis,q=re._fullLayout,Z=re._context.staticPlot;X||(X={mode:q.barmode,norm:q.barmode,gap:q.bargap,groupgap:q.bargroupgap},o("bar",q));var ee=E.makeTraceGroups(G,se,"trace bars").each(function(ae){var he=p.select(this),xe=ae[0].trace,we=ae[0].t,Me=xe.type==="waterfall",Se=xe.type==="funnel",Ie=xe.type==="histogram",Ve=xe.type==="bar",Ge=Ve||Se,ke=0;Me&&xe.connector.visible&&xe.connector.mode==="between"&&(ke=xe.connector.line.width/2);var _e=xe.orientation==="h",ce=u(X),ve=E.ensureSingle(he,"g","points"),le=M(xe),Ae=ve.selectAll("g.point").data(E.identity,le);Ae.enter().append("g").classed("point",!0),Ae.exit().remove(),Ae.each(function(Xe,Ye){var yt=p.select(this),gt=T(Xe,H,Y,_e),Tt=gt[0][0],At=gt[0][1],$t=gt[1][0],rr=gt[1][1],_r=(_e?At-Tt:rr-$t)===0;_r&&Ge&&c.getLineWidth(xe,Xe)&&(_r=!1),_r||(_r=!b(Tt)||!b(At)||!b($t)||!b(rr)),Xe.isBlank=_r,_r&&(_e?At=Tt:rr=$t),ke&&!_r&&(_e?(Tt-=_(Tt,At)*ke,At+=_(Tt,At)*ke):($t-=_($t,rr)*ke,rr+=_($t,rr)*ke));var Xt,or;if(xe.type==="waterfall"){if(!_r){var Ot=xe[Xe.dir].marker;Xt=Ot.line.width,or=Ot.color}}else Xt=c.getLineWidth(xe,Xe),or=Xe.mc||xe.marker.color;function vt(Zr){var ha=p.round(Xt/2%1,2);return X.gap===0&&X.groupgap===0?p.round(Math.round(Zr)-ha,2):Zr}function ht(Zr,ha,Pa){return Pa&&Zr===ha?Zr:Math.abs(Zr-ha)>=2?vt(Zr):Zr>ha?Math.ceil(Zr):Math.floor(Zr)}var De=l.opacity(or),Ne=De<1||Xt>.01?vt:ht;re._context.staticPlot||(Tt=Ne(Tt,At,_e),At=Ne(At,Tt,_e),$t=Ne($t,rr,!_e),rr=Ne(rr,$t,!_e));var We=_e?H.c2p:Y.c2p,Ke;Xe.s0>0?Ke=Xe._sMax:Xe.s0<0?Ke=Xe._sMin:Ke=Xe.s1>0?Xe._sMax:Xe._sMin;function Je(Zr,ha){if(!Zr)return 0;var Pa=Math.abs(_e?rr-$t:At-Tt),La=Math.abs(_e?At-Tt:rr-$t),un=Ne(Math.abs(We(Ke,!0)-We(0,!0))),Xa=Xe.hasB?Math.min(Pa/2,La/2):Math.min(Pa/2,un),ja;if(ha==="%"){var Nn=Math.min(50,Zr);ja=Pa*(Nn/100)}else ja=Zr;return Ne(Math.max(Math.min(ja,Xa),0))}var et=Ve||Ie?Je(we.cornerradiusvalue,we.cornerradiusform):0,Mt,pt,Pt="M"+Tt+","+$t+"V"+rr+"H"+At+"V"+$t+"Z",Ct=0;if(et&&Xe.s){var qt=C(Xe.s0)===0||C(Xe.s)===C(Xe.s0)?Xe.s1:Xe.s0;if(Ct=Ne(Xe.hasB?0:Math.abs(We(Ke,!0)-We(qt,!0))),Ct0?Math.sqrt(Ct*(2*et-Ct)):0,Rt=Vt>0?Math.max:Math.min;Mt="M"+Tt+","+$t+"V"+(rr-Kr*Ht)+"H"+Rt(At-(et-Ct)*Vt,Tt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht-Yt)+"V"+($t+et*Ht+Yt)+"A "+et+","+et+" 0 0 "+Sr+" "+Rt(At-(et-Ct)*Vt,Tt)+","+($t+Kr*Ht)+"Z"}else if(Xe.hasB)Mt="M"+(Tt+et*Vt)+","+$t+"A "+et+","+et+" 0 0 "+Sr+" "+Tt+","+($t+et*Ht)+"V"+(rr-et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt)+","+rr+"H"+(At-et*Vt)+"A "+et+","+et+" 0 0 "+Sr+" "+At+","+(rr-et*Ht)+"V"+($t+et*Ht)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-et*Vt)+","+$t+"Z";else{pt=Math.abs(rr-$t)+Ct;var nr=pt0?Math.sqrt(Ct*(2*et-Ct)):0,cr=Ht>0?Math.max:Math.min;Mt="M"+(Tt+nr*Vt)+","+$t+"V"+cr(rr-(et-Ct)*Ht,$t)+"A "+et+","+et+" 0 0 "+Sr+" "+(Tt+et*Vt-ur)+","+rr+"H"+(At-et*Vt+ur)+"A "+et+","+et+" 0 0 "+Sr+" "+(At-nr*Vt)+","+cr(rr-(et-Ct)*Ht,$t)+"V"+$t+"Z"}}else Mt=Pt}else Mt=Pt;var Rr=f(E.ensureSingle(yt,"path"),q,X,K);if(Rr.style("vector-effect",Z?"none":"non-scaling-stroke").attr("d",isNaN((At-Tt)*(rr-$t))||_r&&re._context.staticPlot?"M0,0Z":Mt).call(e.setClipUrl,ne.layerClipId,re),!q.uniformtext.mode&&ce){var Qr=e.makePointStyleFns(xe);e.singlePointStyle(Xe,Rr,xe,Qr,re)}x(re,ne,yt,ae,Ye,Tt,At,$t,rr,et,Ct,X,K),ne.layerClipId&&e.hideOutsideRangePoint(Xe,yt.select("text"),H,Y,xe.xcalendar,xe.ycalendar)});var Be=xe.cliponaxis===!1;e.setClipUrl(he,Be?null:ne.layerClipId,re)});t.getComponentMethod("errorbars","plot")(re,ee,ne,X)}function x(re,ne,se,G,X,K,H,Y,q,Z,ee,ae,he){var xe=ne.xaxis,we=ne.yaxis,Me=re._fullLayout,Se;function Ie(Pt,Ct,qt){var Vt=E.ensureSingle(Pt,"text").text(Ct).attr({class:"bartext bartext-"+Se,"text-anchor":"middle","data-notex":1}).call(e.font,qt).call(k.convertToTspans,re);return Vt}var Ve=G[0].trace,Ge=Ve.orientation==="h",ke=U(G,Ge,xe,we),_e=P(Me,G,X,xe,we);Se=j(Ve,X);var ce=ae.mode==="stack"||ae.mode==="relative",ve=G[X],le=!ce||ve._outmost,Ae=ve.hasB,Be=Z&&Z-ee>w;if(!_e||Se==="none"||(ve.isBlank||K===H||Y===q)&&(Se==="auto"||Se==="inside")){se.select("text").remove();return}var Xe=Me.font,Ye=s.getBarColor(G[X],Ve),yt=s.getInsideTextFont(Ve,X,Xe,Ye),gt=s.getOutsideTextFont(Ve,X,Xe),Tt=Ve.insidetextanchor||"end",At=se.datum();Ge?xe.type==="log"&&At.s0<=0&&(xe.range[0]0&&ht>0,We;Be?Ae?We=z(_r-2*Z,Xt,vt,ht,Ge)||z(_r,Xt-2*Z,vt,ht,Ge):Ge?We=z(_r-(Z-ee),Xt,vt,ht,Ge)||z(_r,Xt-2*(Z-ee),vt,ht,Ge):We=z(_r,Xt-(Z-ee),vt,ht,Ge)||z(_r-2*(Z-ee),Xt,vt,ht,Ge):We=z(_r,Xt,vt,ht,Ge),Ne&&We?Se="inside":(Se="outside",or.remove(),or=null)}else Se="inside";if(!or){De=E.ensureUniformFontSize(re,Se==="outside"?gt:yt),or=Ie(se,_e,De);var Ke=or.attr("transform");if(or.attr("transform",""),Ot=e.bBox(or.node()),vt=Ot.width,ht=Ot.height,or.attr("transform",Ke),vt<=0||ht<=0){or.remove();return}}var Je=Ve.textangle,et,Mt;Se==="outside"?(Mt=Ve.constraintext==="both"||Ve.constraintext==="outside",et=F(K,H,Y,q,Ot,{isHorizontal:Ge,constrained:Mt,angle:Je,zeroBarDir:ke})):(Mt=Ve.constraintext==="both"||Ve.constraintext==="inside",et=D(K,H,Y,q,Ot,{isHorizontal:Ge,constrained:Mt,angle:Je,anchor:Tt,hasB:Ae,r:Z,overhead:ee})),et.fontSize=De.size,a(Ve.type==="histogram"?"bar":Ve.type,et,Me),ve.transform=et;var pt=f(or,Me,ae,he);E.setTransormAndDisplay(pt,et)}function z(re,ne,se,G,X){if(re<0||ne<0)return!1;var K=se<=re&&G<=ne,H=se<=ne&&G<=re,Y=X?re>=se*(ne/G):ne>=G*(re/se);return K||H||Y}function I(re){return re==="auto"?0:re}function O(re,ne){var se=Math.PI/180*ne,G=Math.abs(Math.sin(se)),X=Math.abs(Math.cos(se));return{x:re.width*X+re.height*G,y:re.width*G+re.height*X}}function D(re,ne,se,G,X,K){var H=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,Z=K.anchor,ee=Z==="end",ae=Z==="start",he=K.leftToRight||0,xe=(he+1)/2,we=1-xe,Me=K.hasB,Se=K.r,Ie=K.overhead,Ve=X.width,Ge=X.height,ke=Math.abs(ne-re),_e=Math.abs(G-se),ce=ke>2*w&&_e>2*w?w:0;ke-=2*ce,_e-=2*ce;var ve=I(q);q==="auto"&&!(Ve<=ke&&Ge<=_e)&&(Ve>ke||Ge>_e)&&(!(Ve>_e||Ge>ke)||Vew){var Xe=B(re,ne,se,G,le,Se,Ie,H,Me);Ae=Xe.scale,Be=Xe.pad}else Ae=1,Y&&(Ae=Math.min(1,ke/le.x,_e/le.y)),Be=0;var Ye=X.left*we+X.right*xe,yt=(X.top+X.bottom)/2,gt=(re+w)*we+(ne-w)*xe,Tt=(se+G)/2,At=0,$t=0;if(ae||ee){var rr=(H?le.x:le.y)/2;Se&&(ee||Me)&&(ce+=Be);var _r=H?_(re,ne):_(se,G);H?ae?(gt=re+_r*ce,At=-_r*rr):(gt=ne-_r*ce,At=_r*rr):ae?(Tt=se+_r*ce,$t=-_r*rr):(Tt=G-_r*ce,$t=_r*rr)}return{textX:Ye,textY:yt,targetX:gt,targetY:Tt,anchorX:At,anchorY:$t,scale:Ae,rotate:ve}}function B(re,ne,se,G,X,K,H,Y,q){var Z=Math.max(0,Math.abs(ne-re)-2*w),ee=Math.max(0,Math.abs(G-se)-2*w),ae=K-w,he=H?ae-Math.sqrt(ae*ae-(ae-H)*(ae-H)):ae,xe=q?ae*2:Y?ae-H:2*he,we=q?ae*2:Y?2*he:ae-H,Me,Se,Ie,Ve,Ge;return X.y/X.x>=ee/(Z-xe)?Ve=ee/X.y:X.y/X.x<=(ee-we)/Z?Ve=Z/X.x:!q&&Y?(Me=X.x*X.x+X.y*X.y/4,Se=-2*X.x*(Z-ae)-X.y*(ee/2-ae),Ie=(Z-ae)*(Z-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):q?(Me=(X.x*X.x+X.y*X.y)/4,Se=-X.x*(Z/2-ae)-X.y*(ee/2-ae),Ie=(Z/2-ae)*(Z/2-ae)+(ee/2-ae)*(ee/2-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)):(Me=X.x*X.x/4+X.y*X.y,Se=-X.x*(Z/2-ae)-2*X.y*(ee-ae),Ie=(Z/2-ae)*(Z/2-ae)+(ee-ae)*(ee-ae)-ae*ae,Ve=(-Se+Math.sqrt(Se*Se-4*Me*Ie))/(2*Me)),Ve=Math.min(1,Ve),Y?Ge=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(ee-X.y*Ve)/2)*(ae-(ee-X.y*Ve)/2)))-H):Ge=Math.max(0,ae-Math.sqrt(Math.max(0,ae*ae-(ae-(Z-X.x*Ve)/2)*(ae-(Z-X.x*Ve)/2)))-H),{scale:Ve,pad:Ge}}function F(re,ne,se,G,X,K){var H=!!K.isHorizontal,Y=!!K.constrained,q=K.angle||0,Z=X.width,ee=X.height,ae=Math.abs(ne-re),he=Math.abs(G-se),xe;H?xe=he>2*w?w:0:xe=ae>2*w?w:0;var we=1;Y&&(we=H?Math.min(1,he/ee):Math.min(1,ae/Z));var Me=I(q),Se=O(X,Me),Ie=(H?Se.x:Se.y)/2,Ve=(X.left+X.right)/2,Ge=(X.top+X.bottom)/2,ke=(re+ne)/2,_e=(se+G)/2,ce=0,ve=0,le;return(H?re===ne:se===G)&&K.zeroBarDir?le=K.zeroBarDir:le=H?_(ne,re):_(se,G),H?(ke=ne-le*xe,ce=le*Ie):(_e=G+le*xe,ve=-le*Ie),{textX:Ve,textY:Ge,targetX:ke,targetY:_e,anchorX:ce,anchorY:ve,scale:we,rotate:Me}}function P(re,ne,se,G,X){var K=ne[0].trace,H=K.texttemplate,Y;return H?Y=$(re,ne,se,G,X):K.textinfo?Y=Q(ne,se,G,X):Y=c.getValue(K.text,se),c.coerceString(v,Y)}function j(re,ne){var se=c.getValue(re.textposition,ne);return c.coerceEnumerated(g,se)}function U(re,ne,se,G){for(var X=!1,K=!1,H=0;H0?X=!0:Y<0&&(K=!0),X&&K)return 0}var q=ne?se:G,Z=-_(q.range[0],q.range[1]);return K?X?0:-Z:Z}function $(re,ne,se,G,X){var K=ne[0].trace,H=E.castOption(K,se,"texttemplate");if(!H)return"";var Y=K.type==="histogram",q=K.type==="waterfall",Z=K.type==="funnel",ee=K.orientation==="h",ae,he,xe,we;ee?(ae="y",he=X,xe="x",we=G):(ae="x",he=G,xe="y",we=X);function Me(ce){return n(he,he.c2l(ce),!0).text}function Se(ce){return n(we,we.c2l(ce),!0).text}var Ie=ne[se],Ve={};Ve.label=Ie.p,Ve.labelLabel=Ve[ae+"Label"]=Me(Ie.p);var Ge=E.castOption(K,Ie.i,"text");(Ge===0||Ge)&&(Ve.text=Ge),Ve.value=Ie.s,Ve.valueLabel=Ve[xe+"Label"]=Se(Ie.s);var ke={};i(ke,K,Ie.i),(Y||ke.x===void 0)&&(ke.x=ee?Ve.value:Ve.label),(Y||ke.y===void 0)&&(ke.y=ee?Ve.label:Ve.value),(Y||ke.xLabel===void 0)&&(ke.xLabel=ee?Ve.valueLabel:Ve.labelLabel),(Y||ke.yLabel===void 0)&&(ke.yLabel=ee?Ve.labelLabel:Ve.valueLabel),q&&(Ve.delta=+Ie.rawS||Ie.s,Ve.deltaLabel=Se(Ve.delta),Ve.final=Ie.v,Ve.finalLabel=Se(Ve.final),Ve.initial=Ve.final-Ve.delta,Ve.initialLabel=Se(Ve.initial)),Z&&(Ve.value=Ie.s,Ve.valueLabel=Se(Ve.value),Ve.percentInitial=Ie.begR,Ve.percentInitialLabel=E.formatPercent(Ie.begR),Ve.percentPrevious=Ie.difR,Ve.percentPreviousLabel=E.formatPercent(Ie.difR),Ve.percentTotal=Ie.sumR,Ve.percenTotalLabel=E.formatPercent(Ie.sumR));var _e=E.castOption(K,Ie.i,"customdata");return _e&&(Ve.customdata=_e),E.texttemplateString({data:[ke,Ve,K._meta],fallback:K.texttemplatefallback,labels:Ve,locale:re._d3locale,template:H})}function Q(re,ne,se,G){var X=re[0].trace,K=X.orientation==="h",H=X.type==="waterfall",Y=X.type==="funnel";function q(_e){var ce=K?G:se;return n(ce,_e,!0).text}function Z(_e){var ce=K?se:G;return n(ce,+_e,!0).text}var ee=X.textinfo,ae=re[ne],he=ee.split("+"),xe=[],we,Me=function(_e){return he.indexOf(_e)!==-1};if(Me("label")&&xe.push(q(re[ne].p)),Me("text")&&(we=E.castOption(X,ae.i,"text"),(we===0||we)&&xe.push(we)),H){var Se=+ae.rawS||ae.s,Ie=ae.v,Ve=Ie-Se;Me("initial")&&xe.push(Z(Ve)),Me("delta")&&xe.push(Z(Se)),Me("final")&&xe.push(Z(Ie))}if(Y){Me("value")&&xe.push(Z(ae.s));var Ge=0;Me("percent initial")&&Ge++,Me("percent previous")&&Ge++,Me("percent total")&&Ge++;var ke=Ge>1;Me("percent initial")&&(we=E.formatPercent(ae.begR),ke&&(we+=" of initial"),xe.push(we)),Me("percent previous")&&(we=E.formatPercent(ae.difR),ke&&(we+=" of previous"),xe.push(we)),Me("percent total")&&(we=E.formatPercent(ae.sumR),ke&&(we+=" of total"),xe.push(we))}return xe.join("
")}V.exports={plot:A,toMoveInsideBar:D}}}),eg=ze({"src/traces/bar/hover.js"(J,V){"use strict";var p=Zl(),b=mi(),E=Qn(),k=Nr().fillText,l=tb().getLineWidth,e=Gi().hoverLabelText,t=No().BADNUM;function n(o,s,c,m,h){var v=r(o,s,c,m,h);if(v){var g=v.cd,i=g[0].trace,w=g[v.index];return v.color=a(i,w),b.getComponentMethod("errorbars","hoverInfo")(w,i,v),[v]}}function r(o,s,c,m,h){var v=o.cd,g=v[0].trace,i=v[0].t,w=m==="closest",S=g.type==="waterfall",M=o.maxHoverDistance,C=o.maxSpikeDistance,_,T,f,u,A,x,z;g.orientation==="h"?(_=c,T=s,f="y",u="x",A=se,x=Q):(_=s,T=c,f="x",u="y",x=se,A=Q);var I=g[f+"period"],O=w||I;function D(xe){return F(xe,-1)}function B(xe){return F(xe,1)}function F(xe,we){var Me=xe.w;return xe[f]+we*Me/2}function P(xe){return xe[f+"End"]-xe[f+"Start"]}var j=w?D:I?function(xe){return xe.p-P(xe)/2}:function(xe){return Math.min(D(xe),xe.p-i.bardelta/2)},U=w?B:I?function(xe){return xe.p+P(xe)/2}:function(xe){return Math.max(B(xe),xe.p+i.bardelta/2)};function $(xe,we,Me){return h.finiteRange&&(Me=0),p.inbox(xe-_,we-_,Me+Math.min(1,Math.abs(we-xe)/z)-1)}function Q(xe){return $(j(xe),U(xe),M)}function re(xe){return $(D(xe),B(xe),C)}function ne(xe){var we=xe[u];if(S){var Me=Math.abs(xe.rawS)||0;T>0?we+=Me:T<0&&(we-=Me)}return we}function se(xe){var we=T,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,M+(Se-we)/(Se-Me)-1)}function G(xe){var we=T,Me=xe.b,Se=ne(xe);return p.inbox(Me-we,Se-we,C+(Se-we)/(Se-Me)-1)}var X=o[f+"a"],K=o[u+"a"];z=Math.abs(X.r2c(X.range[1])-X.r2c(X.range[0]));function H(xe){return(A(xe)+x(xe))/2}var Y=p.getDistanceFunction(m,A,x,H);if(p.getClosest(v,Y,o),o.index!==!1&&v[o.index].p!==t){O||(j=function(xe){return Math.min(D(xe),xe.p-i.bargroupwidth/2)},U=function(xe){return Math.max(B(xe),xe.p+i.bargroupwidth/2)});var q=o.index,Z=v[q],ee=g.base?Z.b+Z.s:Z.s;o[u+"0"]=o[u+"1"]=K.c2p(Z[u],!0),o[u+"LabelVal"]=ee;var ae=i.extents[i.extents.round(Z.p)];o[f+"0"]=X.c2p(w?j(Z):ae[0],!0),o[f+"1"]=X.c2p(w?U(Z):ae[1],!0);var he=Z.orig_p!==void 0;return o[f+"LabelVal"]=he?Z.orig_p:Z.p,o.labelLabel=e(X,o[f+"LabelVal"],g[f+"hoverformat"]),o.valueLabel=e(K,o[u+"LabelVal"],g[u+"hoverformat"]),o.baseLabel=e(K,Z.b,g[u+"hoverformat"]),o.spikeDistance=(G(Z)+re(Z))/2,o[f+"Spike"]=X.c2p(Z.p,!0),k(Z,g,o),o.hovertemplate=g.hovertemplate,o}}function a(o,s){var c=s.mcc||o.marker.color,m=s.mlcc||o.marker.line.color,h=l(o,s);if(E.opacity(c))return c;if(E.opacity(m)&&h)return m}V.exports={hoverPoints:n,hoverOnBars:r,getTraceColor:a}}}),PF=ze({"src/traces/bar/event_data.js"(J,V){"use strict";V.exports=function(b,E,k){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),k.orientation==="h"?(b.label=b.y,b.value=b.x):(b.label=b.x,b.value=b.y),b}}}),tg=ze({"src/traces/bar/select.js"(J,V){"use strict";V.exports=function(E,k){var l=E.cd,e=E.xaxis,t=E.yaxis,n=l[0].trace,r=n.type==="funnel",a=n.orientation==="h",o=[],s;if(k===!1)for(s=0;s0?(I="v",f>0?O=Math.min(A,u):O=Math.min(u)):f>0?(I="h",O=Math.min(A)):O=0;if(!O){c.visible=!1;return}c._length=O;var j=m("orientation",I);c._hasPreCompStats?j==="v"&&f===0?(m("x0",0),m("dx",1)):j==="h"&&T===0&&(m("y0",0),m("dy",1)):j==="v"&&f===0?m("x0"):j==="h"&&T===0&&m("y0");var U=b.getComponentMethod("calendars","handleTraceDefaults");U(s,c,["x","y"],h)}function a(s,c,m,h){var v=h.prefix,g=p.coerce2(s,c,t,"marker.outliercolor"),i=m("marker.line.outliercolor"),w="outliers";c._hasPreCompStats?w="all":(g||i)&&(w="suspectedoutliers");var S=m(v+"points",w);S?(m("jitter",S==="all"?.3:0),m("pointpos",S==="all"?-1.5:0),m("marker.symbol"),m("marker.opacity"),m("marker.size"),m("marker.angle"),m("marker.color",c.line.color),m("marker.line.color"),m("marker.line.width"),S==="suspectedoutliers"&&(m("marker.line.outliercolor",c.marker.color),m("marker.line.outlierwidth")),m("selected.marker.color"),m("unselected.marker.color"),m("selected.marker.size"),m("unselected.marker.size"),m("text"),m("hovertext")):delete c.marker;var M=m("hoveron");(M==="all"||M.indexOf("points")!==-1)&&(m("hovertemplate"),m("hovertemplatefallback")),p.coerceSelectionMarkerOpacity(c,m)}function o(s,c){var m,h;function v(S){return p.coerce(h._input,h,t,S)}for(var g=0;gne.uf};if(C._hasPreCompStats){var q=C[O],Z=function(rr){return I.d2c((C[rr]||[])[x])},ee=1/0,ae=-1/0;for(x=0;x=ne.q1&&ne.q3>=ne.med){var xe=Z("lowerfence");ne.lf=xe!==l&&xe<=ne.q1?xe:h(ne,G,X);var we=Z("upperfence");ne.uf=we!==l&&we>=ne.q3?we:v(ne,G,X);var Me=Z("mean");ne.mean=Me!==l?Me:X?k.mean(G,X):(ne.q1+ne.q3)/2;var Se=Z("sd");ne.sd=Me!==l&&Se>=0?Se:X?k.stdev(G,X,ne.mean):ne.q3-ne.q1,ne.lo=g(ne),ne.uo=i(ne);var Ie=Z("notchspan");Ie=Ie!==l&&Ie>0?Ie:w(ne,X),ne.ln=ne.med-Ie,ne.un=ne.med+Ie;var Ve=ne.lf,Ge=ne.uf;C.boxpoints&&G.length&&(Ve=Math.min(Ve,G[0]),Ge=Math.max(Ge,G[X-1])),C.notched&&(Ve=Math.min(Ve,ne.ln),Ge=Math.max(Ge,ne.un)),ne.min=Ve,ne.max=Ge}else{k.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+ne.q1,"median = "+ne.med,"q3 = "+ne.q3].join(` +`));var ke;ne.med!==l?ke=ne.med:ne.q1!==l?ne.q3!==l?ke=(ne.q1+ne.q3)/2:ke=ne.q1:ne.q3!==l?ke=ne.q3:ke=0,ne.med=ke,ne.q1=ne.q3=ke,ne.lf=ne.uf=ke,ne.mean=ne.sd=ke,ne.ln=ne.un=ke,ne.min=ne.max=ke}ee=Math.min(ee,ne.min),ae=Math.max(ae,ne.max),ne.pts2=se.filter(Y),u.push(ne)}}C._extremes[I._id]=b.findExtremes(I,[ee,ae],{padded:!0})}else{var _e=I.makeCalcdata(C,O),ce=n(Q,re),ve=Q.length,le=r(ve);for(x=0;x=0&&Ae0){if(ne={},ne.pos=ne[B]=Q[x],se=ne.pts=le[x].sort(c),G=ne[O]=se.map(m),X=G.length,ne.min=G[0],ne.max=G[X-1],ne.mean=k.mean(G,X),ne.sd=k.stdev(G,X,ne.mean)*C.sdmultiple,ne.med=k.interp(G,.5),X%2&&(yt||gt)){var Tt,At;yt?(Tt=G.slice(0,X/2),At=G.slice(X/2+1)):gt&&(Tt=G.slice(0,X/2+1),At=G.slice(X/2)),ne.q1=k.interp(Tt,.5),ne.q3=k.interp(At,.5)}else ne.q1=k.interp(G,.25),ne.q3=k.interp(G,.75);ne.lf=h(ne,G,X),ne.uf=v(ne,G,X),ne.lo=g(ne),ne.uo=i(ne);var $t=w(ne,X);ne.ln=ne.med-$t,ne.un=ne.med+$t,Be=Math.min(Be,ne.ln),Xe=Math.max(Xe,ne.un),ne.pts2=se.filter(Y),u.push(ne)}C.notched&&k.isTypedArray(_e)&&(_e=Array.from(_e)),C._extremes[I._id]=b.findExtremes(I,C.notched?_e.concat([Be,Xe]):_e,{padded:!0})}return s(u,C),u.length>0?(u[0].t={num:_[A],dPos:re,posLetter:B,valLetter:O,labels:{med:e(M,"median:"),min:e(M,"min:"),q1:e(M,"q1:"),q3:e(M,"q3:"),max:e(M,"max:"),mean:C.boxmean==="sd"||C.sizemode==="sd"?e(M,"mean \xB1 \u03C3:").replace("\u03C3",C.sdmultiple===1?"\u03C3":C.sdmultiple+"\u03C3"):e(M,"mean:"),lf:e(M,"lower fence:"),uf:e(M,"upper fence:")}},_[A]++,u):[{t:{empty:!0}}]};function t(S,M,C,_){var T=M in S,f=M+"0"in S,u="d"+M in S;if(T||f&&u){var A=C.makeCalcdata(S,M),x=E(S,C,M,A).vals;return[x,A]}var z;f?z=S[M+"0"]:"name"in S&&(C.type==="category"||p(S.name)&&["linear","log"].indexOf(C.type)!==-1||k.isDateTime(S.name)&&C.type==="date")?z=S.name:z=_;for(var I=C.type==="multicategory"?C.r2c_just_indices(z):C.d2c(z,0,S[M+"calendar"]),O=S._length,D=new Array(O),B=0;B1,f=1-s[t+"gap"],u=1-s[t+"groupgap"];for(h=0;h0;if(I==="positive"?(ne=O*(z?1:.5),X=G,se=X=B):I==="negative"?(ne=X=B,se=O*(z?1:.5),K=G):(ne=se=O,X=K=G),ae){var he=A.pointpos,xe=A.jitter,we=A.marker.size/2,Me=0;he+xe>=0&&(Me=G*(he+xe),Me>ne?(ee=!0,q=we,H=Me):Me>X&&(q=we,H=ne)),Me<=ne&&(H=ne);var Se=0;he-xe<=0&&(Se=-G*(he-xe),Se>se?(ee=!0,Z=we,Y=Se):Se>K&&(Z=we,Y=se)),Se<=se&&(Y=se)}else H=ne,Y=se;var Ie=new Array(g.length);for(v=0;vC.lo&&(j.so=!0)}return T});M.enter().append("path").classed("point",!0),M.exit().remove(),M.call(E.translatePoints,m,h)}function r(a,o,s,c){var m=o.val,h=o.pos,v=!!h.rangebreaks,g=c.bPos,i=c.bPosPxOffset||0,w=s.boxmean||(s.meanline||{}).visible,S,M;Array.isArray(c.bdPos)?(S=c.bdPos[0],M=c.bdPos[1]):(S=c.bdPos,M=c.bdPos);var C=a.selectAll("path.mean").data(s.type==="box"&&s.boxmean||s.type==="violin"&&s.box.visible&&s.meanline.visible?b.identity:[]);C.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),C.exit().remove(),C.each(function(_){var T=h.c2l(_.pos+g,!0),f=h.l2p(T-S)+i,u=h.l2p(T+M)+i,A=v?(f+u)/2:h.l2p(T)+i,x=m.c2p(_.mean,!0),z=m.c2p(_.mean-_.sd,!0),I=m.c2p(_.mean+_.sd,!0);s.orientation==="h"?p.select(this).attr("d","M"+x+","+f+"V"+u+(w==="sd"?"m0,0L"+z+","+A+"L"+x+","+f+"L"+I+","+A+"Z":"")):p.select(this).attr("d","M"+f+","+x+"H"+u+(w==="sd"?"m0,0L"+A+","+z+"L"+f+","+x+"L"+A+","+I+"Z":""))})}V.exports={plot:e,plotBoxAndWhiskers:t,plotPoints:n,plotBoxMean:r}}}),ib=ze({"src/traces/box/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=$i();function k(e,t,n){var r=n||p.select(e).selectAll("g.trace.boxes");r.style("opacity",function(a){return a[0].trace.opacity}),r.each(function(a){var o=p.select(this),s=a[0].trace,c=s.line.width;function m(g,i,w,S){g.style("stroke-width",i+"px").call(b.stroke,w).call(b.fill,S)}var h=o.selectAll("path.box");if(s.type==="candlestick")h.each(function(g){if(!g.empty){var i=p.select(this),w=s[g.dir];m(i,w.line.width,w.line.color,w.fillcolor),i.style("opacity",s.selectedpoints&&!g.selected?.3:1)}});else{m(h,c,s.line.color,s.fillcolor),o.selectAll("path.mean").style({"stroke-width":c,"stroke-dasharray":2*c+"px,"+c+"px"}).call(b.stroke,s.line.color);var v=o.selectAll("path.point");E.pointStyle(v,s,e)}})}function l(e,t,n){var r=t[0].trace,a=n.selectAll("path.point");r.selectedpoints?E.selectedPointStyle(a,r):E.pointStyle(a,r,e)}V.exports={style:k,styleOnSelect:l}}}),q5=ze({"src/traces/box/hover.js"(J,V){"use strict";var p=Gi(),b=Nr(),E=Zl(),k=Qn(),l=b.fillText;function e(r,a,o,s){var c=r.cd,m=c[0].trace,h=m.hoveron,v=[],g;return h.indexOf("boxes")!==-1&&(v=v.concat(t(r,a,o,s))),h.indexOf("points")!==-1&&(g=n(r,a,o)),s==="closest"?g?[g]:v:(g&&v.push(g),v)}function t(r,a,o,s){var c=r.cd,m=r.xa,h=r.ya,v=c[0].trace,g=c[0].t,i=v.type==="violin",w,S,M,C,_,T,f,u,A,x,z,I=g.bdPos,O,D,B=g.wHover,F=function(Se){return M.c2l(Se.pos)+g.bPos-M.c2l(T)};i&&v.side!=="both"?(v.side==="positive"&&(A=function(Se){var Ie=F(Se);return E.inbox(Ie,Ie+B,x)},O=I,D=0),v.side==="negative"&&(A=function(Se){var Ie=F(Se);return E.inbox(Ie-B,Ie,x)},O=0,D=I)):(A=function(Se){var Ie=F(Se);return E.inbox(Ie-B,Ie+B,x)},O=D=I);var P;i?P=function(Se){return E.inbox(Se.span[0]-_,Se.span[1]-_,x)}:P=function(Se){return E.inbox(Se.min-_,Se.max-_,x)},v.orientation==="h"?(_=a,T=o,f=P,u=A,w="y",M=h,S="x",C=m):(_=o,T=a,f=A,u=P,w="x",M=m,S="y",C=h);var j=Math.min(1,I/Math.abs(M.r2c(M.range[1])-M.r2c(M.range[0])));x=r.maxHoverDistance-j,z=r.maxSpikeDistance-j;function U(Se){return(f(Se)+u(Se))/2}var $=E.getDistanceFunction(s,f,u,U);if(E.getClosest(c,$,r),r.index===!1)return[];var Q=c[r.index],re=v.line.color,ne=(v.marker||{}).color;k.opacity(re)&&v.line.width?r.color=re:k.opacity(ne)&&v.boxpoints?r.color=ne:r.color=v.fillcolor,r[w+"0"]=M.c2p(Q.pos+g.bPos-D,!0),r[w+"1"]=M.c2p(Q.pos+g.bPos+O,!0),r[w+"LabelVal"]=Q.orig_p!==void 0?Q.orig_p:Q.pos;var se=w+"Spike";r.spikeDistance=U(Q)*z/x,r[se]=M.c2p(Q.pos,!0);var G=v.boxmean||v.sizemode==="sd"||(v.meanline||{}).visible,X=v.boxpoints||v.points,K=X&&G?["max","uf","q3","med","mean","q1","lf","min"]:X&&!G?["max","uf","q3","med","q1","lf","min"]:!X&&G?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],H=C.range[1]0&&(n=!0);for(var s=0;se){var t=e-k[b];return k[b]=e,t}}else return k[b]=e,e;return 0},max:function(b,E,k,l){var e=l[E];if(p(e))if(e=Number(e),p(k[b])){if(k[b]f&&fk){var x=u===b?1:6,z=u===b?"M12":"M1";return function(I,O){var D=g.c2d(I,b,i),B=D.indexOf("-",x);B>0&&(D=D.slice(0,B));var F=g.d2c(D,0,i);if(Ft?c>k?c>b*1.1?b:c>E*1.1?E:k:c>l?l:c>e?e:t:Math.pow(10,Math.floor(Math.log(c)/Math.LN10))}function o(c,m,h,v,g,i){if(v&&c>k){var w=s(m,g,i),S=s(h,g,i),M=c===b?0:1;return w[M]!==S[M]}return Math.floor(h/c)-Math.floor(m/c)>.1}function s(c,m,h){var v=m.c2d(c,b,h).split("-");return v[0]===""&&(v.unshift(),v[0]="-"+v[0]),v}}}),Z5=ze({"src/traces/histogram/calc.js"(J,V){"use strict";var p=ao(),b=Nr(),E=mi(),k=Gi(),{hasColorscale:l}=Bf(),e=Qf(),t=x1(),n=H5(),r=W5(),a=Y5(),o=X5();function s(g,i){var w=[],S=[],M=i.orientation==="h",C=k.getFromId(g,M?i.yaxis:i.xaxis),_=M?"y":"x",T={x:"y",y:"x"}[_],f=i[_+"calendar"],u=i.cumulative,A,x=c(g,i,C,_),z=x[0],I=x[1],O=typeof z.size=="string",D=[],B=O?D:z,F=[],P=[],j=[],U=0,$=i.histnorm,Q=i.histfunc,re=$.indexOf("density")!==-1,ne,se,G;u.enabled&&re&&($=$.replace(/ ?density$/,""),re=!1);var X=Q==="max"||Q==="min",K=X?null:0,H=n.count,Y=r[$],q=!1,Z=function(Ae){return C.r2c(Ae,0,f)},ee;for(b.isArrayOrTypedArray(i[T])&&Q!=="count"&&(ee=i[T],q=Q==="avg",H=n[Q]),A=Z(z.start),se=Z(z.end)+(A-k.tickIncrement(A,z.size,!1,f))/1e6;A=0&&G=ce;A--)if(S[A]){ve=A;break}for(A=ce;A<=ve;A++)if(p(w[A])&&p(S[A])){var le={p:w[A],s:S[A],b:0};u.enabled||(le.pts=j[A],we?le.ph0=le.ph1=j[A].length?I[j[A][0]]:w[A]:(i._computePh=!0,le.ph0=Ge(D[A]),le.ph1=Ge(D[A+1],!0))),_e.push(le)}return _e.length===1&&(_e[0].width1=k.tickIncrement(_e[0].p,z.size,!1,f)-_e[0].p),l(i,"marker")&&e(g,i,{vals:i.marker.color,containerStr:"marker",cLetter:"c"}),l(i,"marker.line")&&e(g,i,{vals:i.marker.line.color,containerStr:"marker.line",cLetter:"c"}),t(_e,i),b.isArrayOrTypedArray(i.selectedpoints)&&b.tagSelected(_e,i,Ie),_e}function c(g,i,w,S,M){var C,_=S+"bins",T=g._fullLayout,f=i["_"+S+"bingroup"],u=T._histogramBinOpts[f],A=T.barmode==="overlay",x,z,I,O,D,B,F,P=function(Ge){return w.r2c(Ge,0,O)},j=function(Ge){return w.c2r(Ge,0,O)},U=w.type==="date"?function(Ge){return Ge||Ge===0?b.cleanDate(Ge,null,O):null}:function(Ge){return p(Ge)?Number(Ge):null};function $(Ge,ke,_e){ke[Ge+"Found"]?(ke[Ge]=U(ke[Ge]),ke[Ge]===null&&(ke[Ge]=_e[Ge])):(B[Ge]=ke[Ge]=_e[Ge],b.nestedProperty(z[0],_+"."+Ge).set(_e[Ge]))}if(i["_"+S+"autoBinFinished"])delete i["_"+S+"autoBinFinished"];else{z=u.traces;var Q=[],re=!0,ne=!1,se=!1;for(x=0;xw.r2l(ae)&&(xe=k.tickIncrement(xe,u.size,!0,O)),Y.start=w.l2r(xe),ee||b.nestedProperty(i,_+".start").set(Y.start)}var we=u.end,Me=w.r2l(H.end),Se=Me!==void 0;if((u.endFound||Se)&&Me!==w.r2l(we)){var Ie=Se?Me:b.aggNums(Math.max,null,D);Y.end=w.l2r(Ie),Se||b.nestedProperty(i,_+".start").set(Y.end)}var Ve="autobin"+S;return i._input[Ve]===!1&&(i._input[_]=b.extendFlat({},i[_]||{}),delete i._input[Ve],delete i[Ve]),[Y,D]}function m(g,i,w,S,M){var C=g._fullLayout,_=h(g,i),T=!1,f=1/0,u=[i],A,x,z;for(A=0;A<_.length;A++)if(x=_[A],x===i)T=!0;else if(!T)z=C._histogramBinOpts[x["_"+S+"bingroup"]],f=Math.min(f,z.size||x[M].size);else{var I=c(g,x,w,S,!0),O=I[0],D=I[2];x["_"+S+"autoBinFinished"]=1,x["_"+S+"pos0"]=I[1],D?u.push(x):f=Math.min(f,O.size)}var B=new Array(u.length);for(A=0;A=0;S--)T(S);else if(i==="increasing"){for(S=1;S=0;S--)g[S]+=g[S+1];w==="exclude"&&(g.push(0),g.shift())}}V.exports={calc:s,calcAllAutoBins:c}}}),OF=ze({"src/traces/histogram2d/calc.js"(J,V){"use strict";var p=Nr(),b=Gi(),E=H5(),k=W5(),l=Y5(),e=X5(),t=Z5().calcAllAutoBins;V.exports=function(s,c){var m=b.getFromId(s,c.xaxis),h=b.getFromId(s,c.yaxis),v=c.xcalendar,g=c.ycalendar,i=function(vt){return m.r2c(vt,0,v)},w=function(vt){return h.r2c(vt,0,g)},S=function(vt){return m.c2r(vt,0,v)},M=function(vt){return h.c2r(vt,0,g)},C,_,T,f,u=t(s,c,m,"x"),A=u[0],x=u[1],z=t(s,c,h,"y"),I=z[0],O=z[1],D=c._length;x.length>D&&x.splice(D,x.length-D),O.length>D&&O.splice(D,O.length-D);var B=[],F=[],P=[],j=typeof A.size=="string",U=typeof I.size=="string",$=[],Q=[],re=j?$:A,ne=U?Q:I,se=0,G=[],X=[],K=c.histnorm,H=c.histfunc,Y=K.indexOf("density")!==-1,q=H==="max"||H==="min",Z=q?null:0,ee=E.count,ae=k[K],he=!1,xe=[],we=[],Me="z"in c?c.z:"marker"in c&&Array.isArray(c.marker.color)?c.marker.color:"";Me&&H!=="count"&&(he=H==="avg",ee=E[H]);var Se=A.size,Ie=i(A.start),Ve=i(A.end)+(Ie-b.tickIncrement(Ie,Se,!1,v))/1e6;for(C=Ie;C=0&&T=0&&fb;a++)r=l(t,n,k(r));return r>b&&p.log("interp2d didn't converge quickly",r),t};function l(e,t,n){var r=0,a,o,s,c,m,h,v,g,i,w,S,M,C;for(c=0;cM&&(r=Math.max(r,Math.abs(e[o][s]-S)/(C-M))))}return r}}}),cb=ze({"src/traces/heatmap/find_empties.js"(J,V){"use strict";var p=Nr().maxRowLength;V.exports=function(E){var k=[],l={},e=[],t=E[0],n=[],r=[0,0,0],a=p(E),o,s,c,m,h,v,g,i;for(s=0;s=0;h--)m=e[h],s=m[0],c=m[1],v=((l[[s-1,c]]||r)[2]+(l[[s+1,c]]||r)[2]+(l[[s,c-1]]||r)[2]+(l[[s,c+1]]||r)[2])/20,v&&(g[m]=[s,c,v],e.splice(h,1),i=!0);if(!i)throw"findEmpties iterated with no new neighbors";for(m in g)l[m]=g[m],k.push(g[m])}return k.sort(function(w,S){return S[2]-w[2]})}}}),$5=ze({"src/traces/heatmap/make_bound_array.js"(J,V){"use strict";var p=mi(),b=Nr().isArrayOrTypedArray;V.exports=function(k,l,e,t,n,r){var a=[],o=p.traceIs(k,"contour"),s=p.traceIs(k,"histogram"),c,m,h,v=b(l)&&l.length>1;if(v&&!s&&r.type!=="category"){var g=l.length;if(g<=n){if(o)a=Array.from(l).slice(0,n);else if(n===1)r.type==="log"?a=[.5*l[0],2*l[0]]:a=[l[0]-.5,l[0]+.5];else if(r.type==="log"){for(a=[Math.pow(l[0],1.5)/Math.pow(l[1],.5)],h=1;h1){var K=(X[X.length-1]-X[0])/(X.length-1),H=Math.abs(K/100);for(D=0;DH)return!1}return!0}g._islinear=!1,i.type==="log"||w.type==="log"?C==="fast"&&P("log axis found"):j(_)?j(A)?g._islinear=!0:C==="fast"&&P("y scale is not linear"):C==="fast"&&P("x scale is not linear");var U=b.maxRowLength(O),$=g.xtype==="scaled"?"":_,Q=o(g,$,T,f,U,i),re=g.ytype==="scaled"?"":A,ne=o(g,re,x,z,O.length,w);g._extremes[i._id]=E.findExtremes(i,Q),g._extremes[w._id]=E.findExtremes(w,ne);var se={x:Q,y:ne,z:O,text:g._text||g.text,hovertext:g._hovertext||g.hovertext};if(g.xperiodalignment&&u&&(se.orig_x=u),g.yperiodalignment&&I&&(se.orig_y=I),$&&$.length===Q.length-1&&(se.xCenter=$),re&&re.length===ne.length-1&&(se.yCenter=re),M&&(se.xRanges=B.xRanges,se.yRanges=B.yRanges,se.pts=B.pts),S||e(v,g,{vals:O,cLetter:"z"}),S&&g.contours&&g.contours.coloring==="heatmap"){var G={type:g.type==="contour"?"heatmap":"histogram2d",xcalendar:g.xcalendar,ycalendar:g.ycalendar};se.xfill=o(G,$,T,f,U,i),se.yfill=o(G,re,x,z,O.length,w)}return[se]};function c(h){for(var v=[],g=h.length,i=0;i0;)H=u.c2p(P[ee]),ee--;for(H0;)Z=A.c2p(j[ee]),ee--;Z=u._length||H<=0||q>=A._length||Z<=0;if(Ie){var Ve=z.selectAll("image").data([]);Ve.exit().remove(),i(z);return}var Ge,ke;xe==="fast"?(Ge=se,ke=ne):(Ge=Me,ke=Se);var _e=document.createElement("canvas");_e.width=Ge,_e.height=ke;var ce=_e.getContext("2d",{willReadFrequently:!0}),ve=a(O,{noNumericCheck:!0,returnArray:!0}),le,Ae;xe==="fast"?(le=G?function(zr){return se-1-zr}:l.identity,Ae=X?function(zr){return ne-1-zr}:l.identity):(le=function(zr){return l.constrain(Math.round(u.c2p(P[zr])-K),0,Me)},Ae=function(zr){return l.constrain(Math.round(A.c2p(j[zr])-q),0,Se)});var Be=Ae(0),Xe=[Be,Be],Ye=G?0:1,yt=X?0:1,gt=0,Tt=0,At=0,$t=0,rr,_r,Xt,or,Ot;function vt(zr,Lr=0){if(zr===void 0)return[0,0,0,0];var aa=ve(zr);return aa[0]=Math.round(aa[0]),aa[1]=Math.round(aa[1]),aa[2]=Math.round(aa[2]),gt+=Lr,Tt+=aa[0]*Lr,At+=aa[1]*Lr,$t+=aa[2]*Lr,aa}function ht(zr,Lr,aa,Sa){var wa=zr[aa.bin0];if(wa===void 0)return vt(void 0,1);var pn=zr[aa.bin1],tn=Lr[aa.bin0],ai=Lr[aa.bin1],rn=pn-wa||0,Ri=tn-wa||0,Gn;return pn===void 0?ai===void 0?Gn=0:tn===void 0?Gn=2*(ai-wa):Gn=(2*ai-tn-wa)*2/3:ai===void 0?tn===void 0?Gn=0:Gn=(2*wa-pn-tn)*2/3:tn===void 0?Gn=(2*ai-pn-wa)*2/3:Gn=ai+wa-pn-tn,vt(wa+aa.frac*rn+Sa.frac*(Ri+aa.frac*Gn))}if(xe!=="default"){var De=0,Ne;try{Ne=new Uint8Array(Ge*ke*4)}catch{Ne=new Array(Ge*ke*4)}if(xe==="smooth"){var We=U||P,Ke=$||j,Je=new Array(We.length),et=new Array(Ke.length),Mt=new Array(Me),pt=U?S:w,Pt=$?S:w,Ct,qt,Vt;for(ee=0;eeNn||Nn>A._length))for(ae=La;aeUn||Un>u._length)){var li=t({x:yn,y:ja},O,C._fullLayout);li.x=yn,li.y=ja;var Yn=I.z[ee][ae];Yn===void 0?(li.z="",li.zLabel=""):(li.z=Yn,li.zLabel=k.tickText(Rr,Yn,"hover").text);var on=I.text&&I.text[ee]&&I.text[ee][ae];(on===void 0||on===!1)&&(on=""),li.text=on;var en=l.texttemplateString({data:[li,O._meta],fallback:O.texttemplatefallback,labels:li,locale:C._fullLayout._d3locale,template:ur});if(en){var vi=en.split("
"),Yi=vi.length,Ja=0;for(he=0;he=w[0].length||z<0||z>w.length)return}else{if(p.inbox(n-g[0],n-g[g.length-1],0)>0||p.inbox(r-i[0],r-i[i.length-1],0)>0)return;if(s){var I;for(T=[2*g[0]-g[1]],I=1;I=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}}}),M1=ze({"src/traces/contour/attributes.js"(J,V){"use strict";var p=rg(),b=su(),E=Il(),k=E.axisHoverFormat,l=E.descriptionOnlyNumbers,e=qs(),t=Uc().dash,n=Qs(),r=Ki().extendFlat,a=_b(),o=a.COMPARISON_OPS2,s=a.INTERVAL_OPS,c=b.line;V.exports=r({z:p.z,x:p.x,x0:p.x0,dx:p.dx,y:p.y,y0:p.y0,dy:p.dy,xperiod:p.xperiod,yperiod:p.yperiod,xperiod0:b.xperiod0,yperiod0:b.yperiod0,xperiodalignment:p.xperiodalignment,yperiodalignment:p.yperiodalignment,text:p.text,hovertext:p.hovertext,transpose:p.transpose,xtype:p.xtype,ytype:p.ytype,xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:p.hovertemplate,hovertemplatefallback:p.hovertemplatefallback,texttemplate:r({},p.texttemplate,{}),texttemplatefallback:p.texttemplatefallback,textfont:r({},p.textfont,{}),hoverongaps:p.hoverongaps,connectgaps:r({},p.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:n({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:l("contour label")},operation:{valType:"enumerated",values:[].concat(o).concat(s),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:r({},c.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:t,smoothing:r({},c.smoothing,{}),editType:"plot"},zorder:b.zorder},e("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))}}),tT=ze({"src/traces/histogram2dcontour/attributes.js"(J,V){"use strict";var p=yb(),b=M1(),E=qs(),k=Il().axisHoverFormat,l=Ki().extendFlat;V.exports=l({x:p.x,y:p.y,z:p.z,marker:p.marker,histnorm:p.histnorm,histfunc:p.histfunc,nbinsx:p.nbinsx,xbins:p.xbins,nbinsy:p.nbinsy,ybins:p.ybins,autobinx:p.autobinx,autobiny:p.autobiny,bingroup:p.bingroup,xbingroup:p.xbingroup,ybingroup:p.ybingroup,autocontour:b.autocontour,ncontours:b.ncontours,contours:b.contours,line:{color:b.line.color,width:l({},b.line.width,{dflt:.5}),dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z",1),hovertemplate:p.hovertemplate,hovertemplatefallback:p.hovertemplatefallback,texttemplate:b.texttemplate,texttemplatefallback:b.texttemplatefallback,textfont:b.textfont},E("",{cLetter:"z",editTypeOverride:"calc"}))}}),xb=ze({"src/traces/contour/contours_defaults.js"(J,V){"use strict";V.exports=function(b,E,k,l){var e=l("contours.start"),t=l("contours.end"),n=e===!1||t===!1,r=k("contours.size"),a;n?a=E.autocontour=!0:a=k("autocontour",!1),(a||!r)&&k("ncontours")}}}),rT=ze({"src/traces/contour/label_defaults.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k,l,e){e||(e={});var t=E("contours.showlabels");if(t){var n=k.font;p.coerceFont(E,"contours.labelfont",n,{overrideDflt:{color:l}}),E("contours.labelformat")}e.hasHover!==!1&&E("zhoverformat")}}}),bb=ze({"src/traces/contour/style_defaults.js"(J,V){"use strict";var p=qc(),b=rT();V.exports=function(k,l,e,t,n){var r=e("contours.coloring"),a,o="";r==="fill"&&(a=e("contours.showlines")),a!==!1&&(r!=="lines"&&(o=e("line.color","#000")),e("line.width",.5),e("line.dash")),r!=="none"&&(k.showlegend!==!0&&(l.showlegend=!1),l._dfltShowLegend=!1,p(k,l,t,e,{prefix:"",cLetter:"z"})),e("line.smoothing"),b(e,t,o,n)}}}),$F=ze({"src/traces/histogram2dcontour/defaults.js"(J,V){"use strict";var p=Nr(),b=eT(),E=xb(),k=bb(),l=A1(),e=tT();V.exports=function(n,r,a,o){function s(m,h){return p.coerce(n,r,e,m,h)}function c(m){return p.coerce2(n,r,e,m)}b(n,r,s,o),r.visible!==!1&&(E(n,r,s,c),k(n,r,s,o),s("xhoverformat"),s("yhoverformat"),s("hovertemplate"),s("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&l(s,o))}}}),aT=ze({"src/traces/contour/set_contours.js"(J,V){"use strict";var p=Gi(),b=Nr();V.exports=function(l,e){var t=l.contours;if(l.autocontour){var n=l.zmin,r=l.zmax;(l.zauto||n===void 0)&&(n=b.aggNums(Math.min,null,e)),(l.zauto||r===void 0)&&(r=b.aggNums(Math.max,null,e));var a=E(n,r,l.ncontours);t.size=a.dtick,t.start=p.tickFirst(a),a.range.reverse(),t.end=p.tickFirst(a),t.start===n&&(t.start+=t.size),t.end===r&&(t.end-=t.size),t.start>t.end&&(t.start=t.end=(t.start+t.end)/2),l._input.contours||(l._input.contours={}),b.extendFlat(l._input.contours,{start:t.start,end:t.end,size:t.size}),l._input.autocontour=!0}else if(t.type!=="constraint"){var o=t.start,s=t.end,c=l._input.contours;if(o>s&&(t.start=c.start=s,s=t.end=c.end=o,o=t.start),!(t.size>0)){var m;o===s?m=1:m=E(o,s,l.ncontours).dtick,c.size=t.size=m}}};function E(k,l,e){var t={type:"linear",range:[k,l]};return p.autoTicks(t,(l-k)/(e||15)),t}}}),S1=ze({"src/traces/contour/end_plus.js"(J,V){"use strict";V.exports=function(b){return b.end+b.size/1e6}}}),nT=ze({"src/traces/contour/calc.js"(J,V){"use strict";var p=fl(),b=fb(),E=aT(),k=S1();V.exports=function(e,t){var n=b(e,t),r=n[0].z;E(t,r);var a=t.contours,o=p.extractOpts(t),s;if(a.coloring==="heatmap"&&o.auto&&t.autocontour===!1){var c=a.start,m=k(a),h=a.size||1,v=Math.floor((m-c)/h)+1;isFinite(h)||(h=1,v=1);var g=c-h/2,i=g+v*h;s=[g,i]}else s=r;return p.calc(e,t,{vals:s,cLetter:"z"}),n}}}),E1=ze({"src/traces/contour/constants.js"(J,V){"use strict";V.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}}}}),iT=ze({"src/traces/contour/make_crossings.js"(J,V){"use strict";var p=E1();V.exports=function(k){var l=k[0].z,e=l.length,t=l[0].length,n=e===2||t===2,r,a,o,s,c,m,h,v,g;for(a=0;aE?0:1)+(k[0][1]>E?0:2)+(k[1][1]>E?0:4)+(k[1][0]>E?0:8);if(l===5||l===10){var e=(k[0][0]+k[0][1]+k[1][0]+k[1][1])/4;return E>e?l===5?713:1114:l===5?104:208}return l===15?0:l}}}),oT=ze({"src/traces/contour/find_all_paths.js"(J,V){"use strict";var p=Nr(),b=E1();V.exports=function(r,a,o){var s,c,m,h,v;for(a=a||.01,o=o||.01,m=0;m20?(m=b.CHOOSESADDLE[m][(h[0]||h[1])<0?0:1],n.crossings[c]=b.SADDLEREMAINDER[m]):delete n.crossings[c],h=b.NEWDELTA[m],!h){p.log("Found bad marching index:",m,r,n.level);break}v.push(t(n,r,h)),r[0]+=h[0],r[1]+=h[1],c=r.join(","),E(v[v.length-1],v[v.length-2],o,s)&&v.pop();var C=h[0]&&(r[0]<0||r[0]>i-2)||h[1]&&(r[1]<0||r[1]>g-2),_=r[0]===w[0]&&r[1]===w[1]&&h[0]===S[0]&&h[1]===S[1];if(_||a&&C)break;m=n.crossings[c]}M===1e4&&p.log("Infinite loop in contour?");var T=E(v[0],v[v.length-1],o,s),f=0,u=.2*n.smoothing,A=[],x=0,z,I,O,D,B,F,P,j,U,$,Q;for(M=1;M=x;M--)if(z=A[M],z=x&&z+A[I]j&&U--,n.edgepaths[U]=Q.concat(v,$));break}G||(n.edgepaths[j]=v.concat($))}for(j=0;j20&&r?n===208||n===1114?o=a[0]===0?1:-1:s=a[1]===0?1:-1:b.BOTTOMSTART.indexOf(n)!==-1?s=1:b.LEFTSTART.indexOf(n)!==-1?o=1:b.TOPSTART.indexOf(n)!==-1?s=-1:o=-1,[o,s]}function t(n,r,a){var o=r[0]+Math.max(a[0],0),s=r[1]+Math.max(a[1],0),c=n.z[s][o],m=n.xaxis,h=n.yaxis;if(a[1]){var v=(n.level-c)/(n.z[s][o+1]-c),g=(v!==1?(1-v)*m.c2l(n.x[o]):0)+(v!==0?v*m.c2l(n.x[o+1]):0);return[m.c2p(m.l2c(g),!0),h.c2p(n.y[s],!0),o+v,s]}else{var i=(n.level-c)/(n.z[s+1][o]-c),w=(i!==1?(1-i)*h.c2l(n.y[s]):0)+(i!==0?i*h.c2l(n.y[s+1]):0);return[m.c2p(n.x[o],!0),h.c2p(h.l2c(w),!0),o,s+i]}}}}),KF=ze({"src/traces/contour/constraint_mapping.js"(J,V){"use strict";var p=_b(),b=ao();V.exports={"[]":k("[]"),"][":k("]["),">":l(">"),"<":l("<"),"=":l("=")};function E(e,t){var n=Array.isArray(t),r;function a(o){return b(o)?+o:null}return p.COMPARISON_OPS2.indexOf(e)!==-1?r=a(n?t[0]:t):p.INTERVAL_OPS.indexOf(e)!==-1?r=n?[a(t[0]),a(t[1])]:[a(t),a(t)]:p.SET_OPS.indexOf(e)!==-1&&(r=n?t.map(a):[a(t)]),r}function k(e){return function(t){t=E(e,t);var n=Math.min(t[0],t[1]),r=Math.max(t[0],t[1]);return{start:n,end:r,size:r-n}}}function l(e){return function(t){return t=E(e,t),{start:t,end:1/0,size:1/0}}}}}),sT=ze({"src/traces/contour/empty_pathinfo.js"(J,V){"use strict";var p=Nr(),b=KF(),E=S1();V.exports=function(l,e,t){for(var n=l.type==="constraint"?b[l._operation](l.value):l,r=n.size,a=[],o=E(n),s=t.trace._carpetTrace,c=s?{xaxis:s.aaxis,yaxis:s.baxis,x:t.a,y:t.b}:{xaxis:e.xaxis,yaxis:e.yaxis,x:t.x,y:t.y},m=n.start;m1e3){p.warn("Too many contours, clipping at 1000",l);break}return a}}}),lT=ze({"src/traces/contour/convert_to_constraints.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l,e,t,n=function(o){return o.reverse()},r=function(o){return o};switch(k){case"=":case"<":return E;case">":for(E.length!==1&&p.warn("Contour data invalid for the specified inequality operation."),e=E[0],l=0;lt.level||t.starts.length&&e===t.level)}break;case"constraint":if(E.prefixBoundary=!1,E.edgepaths.length)return;var n=E.x.length,r=E.y.length,a=-1/0,o=1/0;for(l=0;l":s>a&&(E.prefixBoundary=!0);break;case"<":(sa||E.starts.length&&m===o)&&(E.prefixBoundary=!0);break;case"][":c=Math.min(s[0],s[1]),m=Math.max(s[0],s[1]),ca&&(E.prefixBoundary=!0);break}break}}}}),wb=ze({"src/traces/contour/plot.js"(J){"use strict";var V=ci(),p=Nr(),b=$i(),E=fl(),k=Cs(),l=Gi(),e=Dd(),t=db(),n=iT(),r=oT(),a=sT(),o=lT(),s=uT(),c=E1(),m=c.LABELOPTIMIZER;J.plot=function(_,T,f,u){var A=T.xaxis,x=T.yaxis;p.makeTraceGroups(u,f,"contour").each(function(z){var I=V.select(this),O=z[0],D=O.trace,B=O.x,F=O.y,P=D.contours,j=a(P,T,O),U=p.ensureSingle(I,"g","heatmapcoloring"),$=[];P.coloring==="heatmap"&&($=[z]),t(_,T,$,U),n(j),r(j);var Q=A.c2p(B[0],!0),re=A.c2p(B[B.length-1],!0),ne=x.c2p(F[0],!0),se=x.c2p(F[F.length-1],!0),G=[[Q,se],[re,se],[re,ne],[Q,ne]],X=j;P.type==="constraint"&&(X=o(j,P._operation)),h(I,G,P),v(I,X,G,P),i(I,j,_,O,P),S(I,T,_,O,G)})};function h(C,_,T){var f=p.ensureSingle(C,"g","contourbg"),u=f.selectAll("path").data(T.coloring==="fill"?[0]:[]);u.enter().append("path"),u.exit().remove(),u.attr("d","M"+_.join("L")+"Z").style("stroke","none")}function v(C,_,T,f){var u=f.coloring==="fill"||f.type==="constraint"&&f._operation!=="=",A="M"+T.join("L")+"Z";u&&s(_,f);var x=p.ensureSingle(C,"g","contourfill"),z=x.selectAll("path").data(u?_:[]);z.enter().append("path"),z.exit().remove(),z.each(function(I){var O=(I.prefixBoundary?A:"")+g(I,T);O?V.select(this).attr("d",O).style("stroke","none"):V.select(this).remove()})}function g(C,_){var T="",f=0,u=C.edgepaths.map(function(Q,re){return re}),A=!0,x,z,I,O,D,B;function F(Q){return Math.abs(Q[1]-_[0][1])<.01}function P(Q){return Math.abs(Q[1]-_[2][1])<.01}function j(Q){return Math.abs(Q[0]-_[0][0])<.01}function U(Q){return Math.abs(Q[0]-_[2][0])<.01}for(;u.length;){for(B=b.smoothopen(C.edgepaths[f],C.smoothing),T+=A?B:B.replace(/^M/,"L"),u.splice(u.indexOf(f),1),x=C.edgepaths[f][C.edgepaths[f].length-1],O=-1,I=0;I<4;I++){if(!x){p.log("Missing end?",f,C);break}for(F(x)&&!U(x)?z=_[1]:j(x)?z=_[0]:P(x)?z=_[3]:U(x)&&(z=_[2]),D=0;D=0&&(z=$,O=D):Math.abs(x[1]-z[1])<.01?Math.abs(x[1]-$[1])<.01&&($[0]-x[0])*(z[0]-$[0])>=0&&(z=$,O=D):p.log("endpt to newendpt is not vert. or horz.",x,z,$)}if(x=z,O>=0)break;T+="L"+z}if(O===C.edgepaths.length){p.log("unclosed perimeter path");break}f=O,A=u.indexOf(f)===-1,A&&(f=u[0],T+="Z")}for(f=0;fm.MAXCOST*2)break;F&&(z/=2),x=O-z/2,I=x+z*1.5}if(B<=m.MAXCOST)return D};function w(C,_,T,f){var u=_.width/2,A=_.height/2,x=C.x,z=C.y,I=C.theta,O=Math.cos(I)*u,D=Math.sin(I)*u,B=(x>f.center?f.right-x:x-f.left)/(O+Math.abs(Math.sin(I)*A)),F=(z>f.middle?f.bottom-z:z-f.top)/(Math.abs(D)+Math.cos(I)*A);if(B<1||F<1)return 1/0;var P=m.EDGECOST*(1/(B-1)+1/(F-1));P+=m.ANGLECOST*I*I;for(var j=x-O,U=z-D,$=x+O,Q=z+D,re=0;re=S)&&(t<=w&&(t=w),n>=S&&(n=S),a=Math.floor((n-t)/r)+1,o=0),i=0;iw&&(h.unshift(w),v.unshift(v[0])),h[h.length-1]2?s.value=s.value.slice(2):s.length===0?s.value=[0,1]:s.length<2?(c=parseFloat(s.value[0]),s.value=[c,c+1]):s.value=[parseFloat(s.value[0]),parseFloat(s.value[1])]:p(s.value)&&(c=parseFloat(s.value),s.value=[c,c+1])):(o("contours.value",0),p(s.value)||(t(s.value)?s.value=parseFloat(s.value[0]):s.value=0))}}}),ez=ze({"src/traces/contour/defaults.js"(J,V){"use strict";var p=Nr(),b=ob(),E=yd(),k=hT(),l=xb(),e=bb(),t=A1(),n=M1();V.exports=function(a,o,s,c){function m(i,w){return p.coerce(a,o,n,i,w)}function h(i){return p.coerce2(a,o,n,i)}var v=b(a,o,m,c);if(!v){o.visible=!1;return}E(a,o,c,m),m("xhoverformat"),m("yhoverformat"),m("text"),m("hovertext"),m("hoverongaps"),m("hovertemplate"),m("hovertemplatefallback");var g=m("contours.type")==="constraint";m("connectgaps",p.isArray1D(o.z)),g?k(a,o,m,c,s):(l(a,o,m,h),e(a,o,m,c)),o.contours&&o.contours.coloring==="heatmap"&&t(m,c),m("zorder")}}}),tz=ze({"src/traces/contour/index.js"(J,V){"use strict";V.exports={attributes:M1(),supplyDefaults:ez(),calc:nT(),plot:wb().plot,style:Tb(),colorbar:Ab(),hoverPoints:fT(),moduleType:"trace",name:"contour",basePlotModule:Du(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}}}),rz=ze({"lib/contour.js"(J,V){"use strict";V.exports=tz()}}),dT=ze({"src/traces/scatterternary/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=su(),e=ws(),t=qs(),n=Uc().dash,r=Ki().extendFlat,a=l.marker,o=l.line,s=a.line;V.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:r({},l.mode,{dflt:"markers"}),text:r({},l.text,{}),texttemplate:b({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:r({},l.hovertext,{}),line:{color:o.color,width:o.width,dash:n,backoff:o.backoff,shape:r({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:r({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:k(),marker:r({symbol:a.symbol,opacity:a.opacity,angle:a.angle,angleref:a.angleref,standoff:a.standoff,maxdisplayed:a.maxdisplayed,size:a.size,sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,line:r({width:s.width,dash:s.dash,editType:"calc"},t("marker.line")),gradient:a.gradient,editType:"calc"},t("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:r({},e.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:p(),hovertemplatefallback:E()}}}),az=ze({"src/traces/scatterternary/defaults.js"(J,V){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=dT();V.exports=function(o,s,c,m){function h(C,_){return p.coerce(o,s,r,C,_)}var v=h("a"),g=h("b"),i=h("c"),w;if(v?(w=v.length,g?(w=Math.min(w,g.length),i&&(w=Math.min(w,i.length))):i?w=Math.min(w,i.length):w=0):g&&i&&(w=Math.min(g.length,i.length)),!w){s.visible=!1;return}s._length=w,h("sum"),h("text"),h("hovertext"),s.hoveron!=="fills"&&(h("hovertemplate"),h("hovertemplatefallback"));var S=w"),n.hovertemplate=m.hovertemplate,t}}}),lz=ze({"src/traces/scatterternary/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){if(E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),l[e]){var t=l[e];b.a=t.a,b.b=t.b,b.c=t.c}else b.a=E.a,b.b=E.b,b.c=E.c;return b}}}),uz=ze({"src/plots/ternary/ternary.js"(J,V){"use strict";var p=ci(),b=mi(),E=Nr(),k=E.strTranslate,l=E._,e=Qn(),t=$i(),n=Dd(),r=Ki().extendFlat,a=cl(),o=Gi(),s=_h(),c=Zl(),m=Fd(),h=m.freeMode,v=m.rectMode,g=qv(),i=_c().prepSelect,w=_c().selectOnClick,S=_c().clearOutline,M=_c().clearSelectionsCache,C=hc();function _(F,P){this.id=F.id,this.graphDiv=F.graphDiv,this.init(P),this.makeFramework(P),this.updateFx(P),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}V.exports=_;var T=_.prototype;T.init=function(F){this.container=F._ternarylayer,this.defs=F._defs,this.layoutId=F._uid,this.traceHash={},this.layers={}},T.plot=function(F,P){var j=this,U=P[j.id],$=P._size;j._hasClipOnAxisFalse=!1;for(var Q=0;Qf*G?(ae=G,ee=ae*f):(ee=se,ae=ee/f),he=re*ee/se,xe=ne*ae/G,q=P.l+P.w*$-ee/2,Z=P.t+P.h*(1-Q)-ae/2,j.x0=q,j.y0=Z,j.w=ee,j.h=ae,j.sum=X,j.xaxis={type:"linear",range:[K+2*Y-X,X-K-2*H],domain:[$-he/2,$+he/2],_id:"x"},n(j.xaxis,j.graphDiv._fullLayout),j.xaxis.setScale(),j.xaxis.isPtWithinRange=function(le){return le.a>=j.aaxis.range[0]&&le.a<=j.aaxis.range[1]&&le.b>=j.baxis.range[1]&&le.b<=j.baxis.range[0]&&le.c>=j.caxis.range[1]&&le.c<=j.caxis.range[0]},j.yaxis={type:"linear",range:[K,X-H-Y],domain:[Q-xe/2,Q+xe/2],_id:"y"},n(j.yaxis,j.graphDiv._fullLayout),j.yaxis.setScale(),j.yaxis.isPtWithinRange=function(){return!0};var we=j.yaxis.domain[0],Me=j.aaxis=r({},F.aaxis,{range:[K,X-H-Y],side:"left",tickangle:(+F.aaxis.tickangle||0)-30,domain:[we,we+xe*f],anchor:"free",position:0,_id:"y",_length:ee});n(Me,j.graphDiv._fullLayout),Me.setScale();var Se=j.baxis=r({},F.baxis,{range:[X-K-Y,H],side:"bottom",domain:j.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ee});n(Se,j.graphDiv._fullLayout),Se.setScale();var Ie=j.caxis=r({},F.caxis,{range:[X-K-H,Y],side:"right",tickangle:(+F.caxis.tickangle||0)+30,domain:[we,we+xe*f],anchor:"free",position:0,_id:"y",_length:ee});n(Ie,j.graphDiv._fullLayout),Ie.setScale();var Ve="M"+q+","+(Z+ae)+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDef.select("path").attr("d",Ve),j.layers.plotbg.select("path").attr("d",Ve);var Ge="M0,"+ae+"h"+ee+"l-"+ee/2+",-"+ae+"Z";j.clipDefRelative.select("path").attr("d",Ge);var ke=k(q,Z);j.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",ke),j.clipDefRelative.select("path").attr("transform",null);var _e=k(q-Se._offset,Z+ae);j.layers.baxis.attr("transform",_e),j.layers.bgrid.attr("transform",_e);var ce=k(q+ee/2,Z)+"rotate(30)"+k(0,-Me._offset);j.layers.aaxis.attr("transform",ce),j.layers.agrid.attr("transform",ce);var ve=k(q+ee/2,Z)+"rotate(-30)"+k(0,-Ie._offset);j.layers.caxis.attr("transform",ve),j.layers.cgrid.attr("transform",ve),j.drawAxes(!0),j.layers.aline.select("path").attr("d",Me.showline?"M"+q+","+(Z+ae)+"l"+ee/2+",-"+ae:"M0,0").call(e.stroke,Me.linecolor||"#000").style("stroke-width",(Me.linewidth||0)+"px"),j.layers.bline.select("path").attr("d",Se.showline?"M"+q+","+(Z+ae)+"h"+ee:"M0,0").call(e.stroke,Se.linecolor||"#000").style("stroke-width",(Se.linewidth||0)+"px"),j.layers.cline.select("path").attr("d",Ie.showline?"M"+(q+ee/2)+","+Z+"l"+ee/2+","+ae:"M0,0").call(e.stroke,Ie.linecolor||"#000").style("stroke-width",(Ie.linewidth||0)+"px"),j.graphDiv._context.staticPlot||j.initInteractions(),t.setClipUrl(j.layers.frontplot,j._hasClipOnAxisFalse?null:j.clipId,j.graphDiv)},T.drawAxes=function(F){var P=this,j=P.graphDiv,U=P.id.slice(7)+"title",$=P.layers,Q=P.aaxis,re=P.baxis,ne=P.caxis;if(P.drawAx(Q),P.drawAx(re),P.drawAx(ne),F){var se=Math.max(Q.showticklabels?Q.tickfont.size/2:0,(ne.showticklabels?ne.tickfont.size*.75:0)+(ne.ticks==="outside"?ne.ticklen*.87:0)),G=(re.showticklabels?re.tickfont.size:0)+(re.ticks==="outside"?re.ticklen:0)+3;$["a-title"]=g.draw(j,"a"+U,{propContainer:Q,propName:P.id+".aaxis.title.text",placeholder:l(j,"Click to enter Component A title"),attributes:{x:P.x0+P.w/2,y:P.y0-Q.title.font.size/3-se,"text-anchor":"middle"}}),$["b-title"]=g.draw(j,"b"+U,{propContainer:re,propName:P.id+".baxis.title.text",placeholder:l(j,"Click to enter Component B title"),attributes:{x:P.x0-G,y:P.y0+P.h+re.title.font.size*.83+G,"text-anchor":"middle"}}),$["c-title"]=g.draw(j,"c"+U,{propContainer:ne,propName:P.id+".caxis.title.text",placeholder:l(j,"Click to enter Component C title"),attributes:{x:P.x0+P.w+G,y:P.y0+P.h+ne.title.font.size*.83+G,"text-anchor":"middle"}})}},T.drawAx=function(F){var P=this,j=P.graphDiv,U=F._name,$=U.charAt(0),Q=F._id,re=P.layers[U],ne=30,se=$+"tickLayout",G=u(F);P[se]!==G&&(re.selectAll("."+Q+"tick").remove(),P[se]=G),F.setScale();var X=o.calcTicks(F),K=o.clipEnds(F,X),H=o.makeTransTickFn(F),Y=o.getTickSigns(F)[2],q=E.deg2rad(ne),Z=Y*(F.linewidth||1)/2,ee=Y*F.ticklen,ae=P.w,he=P.h,xe=$==="b"?"M0,"+Z+"l"+Math.sin(q)*ee+","+Math.cos(q)*ee:"M"+Z+",0l"+Math.cos(q)*ee+","+-Math.sin(q)*ee,we={a:"M0,0l"+he+",-"+ae/2,b:"M0,0l-"+ae/2+",-"+he,c:"M0,0l-"+he+","+ae/2}[$];o.drawTicks(j,F,{vals:F.ticks==="inside"?K:X,layer:re,path:xe,transFn:H,crisp:!1}),o.drawGrid(j,F,{vals:K,layer:P.layers[$+"grid"],path:we,transFn:H,crisp:!1}),o.drawLabels(j,F,{vals:X,layer:re,transFn:H,labelFns:o.makeLabelFns(F,0,ne)})};function u(F){return F.ticks+String(F.ticklen)+String(F.showticklabels)}var A=C.MINZOOM/2+.87,x="m-0.87,.5h"+A+"v3h-"+(A+5.2)+"l"+(A/2+2.6)+",-"+(A*.87+4.5)+"l2.6,1.5l-"+A/2+","+A*.87+"Z",z="m0.87,.5h-"+A+"v3h"+(A+5.2)+"l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-2.6,1.5l"+A/2+","+A*.87+"Z",I="m0,1l"+A/2+","+A*.87+"l2.6,-1.5l-"+(A/2+2.6)+",-"+(A*.87+4.5)+"l-"+(A/2+2.6)+","+(A*.87+4.5)+"l2.6,1.5l"+A/2+",-"+A*.87+"Z",O="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",D=!0;T.clearOutline=function(){M(this.dragOptions),S(this.dragOptions.gd)},T.initInteractions=function(){var F=this,P=F.layers.plotbg.select("path").node(),j=F.graphDiv,U=j._fullLayout._zoomlayer,$,Q;this.dragOptions={element:P,gd:j,plotinfo:{id:F.id,domain:j._fullLayout[F.id].domain,xaxis:F.xaxis,yaxis:F.yaxis},subplot:F.id,prepFn:function(_e,ce,ve){F.dragOptions.xaxes=[F.xaxis],F.dragOptions.yaxes=[F.yaxis],$=j._fullLayout._invScaleX,Q=j._fullLayout._invScaleY;var le=F.dragOptions.dragmode=j._fullLayout.dragmode;h(le)?F.dragOptions.minDrag=1:F.dragOptions.minDrag=void 0,le==="zoom"?(F.dragOptions.moveFn=Se,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=Ie,he(_e,ce,ve)):le==="pan"?(F.dragOptions.moveFn=Ge,F.dragOptions.clickFn=ae,F.dragOptions.doneFn=ke,Ve(),F.clearOutline(j)):(v(le)||h(le))&&i(_e,ce,ve,F.dragOptions,le)}};var re,ne,se,G,X,K,H,Y,q,Z;function ee(_e){var ce={};return ce[F.id+".aaxis.min"]=_e.a,ce[F.id+".baxis.min"]=_e.b,ce[F.id+".caxis.min"]=_e.c,ce}function ae(_e,ce){var ve=j._fullLayout.clickmode;B(j),_e===2&&(j.emit("plotly_doubleclick",null),b.call("_guiRelayout",j,ee({a:0,b:0,c:0}))),ve.indexOf("select")>-1&&_e===1&&w(ce,j,[F.xaxis],[F.yaxis],F.id,F.dragOptions),ve.indexOf("event")>-1&&c.click(j,ce,F.id)}function he(_e,ce,ve){var le=P.getBoundingClientRect();re=ce-le.left,ne=ve-le.top,j._fullLayout._calcInverseTransform(j);var Ae=j._fullLayout._invTransform,Be=E.apply3DTransform(Ae)(re,ne);re=Be[0],ne=Be[1],se={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=se,G=F.aaxis.range[1]-se.a,K=e.luminosity(F.graphDiv._fullLayout[F.id].bgcolor),H="M0,"+F.h+"L"+F.w/2+", 0L"+F.w+","+F.h+"Z",Y=!1,q=U.append("path").attr("class","zoombox").attr("transform",k(F.x0,F.y0)).style({fill:K>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",H),Z=U.append("path").attr("class","zoombox-corners").attr("transform",k(F.x0,F.y0)).style({fill:e.background,stroke:e.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),F.clearOutline(j)}function xe(_e,ce){return 1-ce/F.h}function we(_e,ce){return 1-(_e+(F.h-ce)/Math.sqrt(3))/F.w}function Me(_e,ce){return(_e-(F.h-ce)/Math.sqrt(3))/F.w}function Se(_e,ce){var ve=re+_e*$,le=ne+ce*Q,Ae=Math.max(0,Math.min(1,xe(re,ne),xe(ve,le))),Be=Math.max(0,Math.min(1,we(re,ne),we(ve,le))),Xe=Math.max(0,Math.min(1,Me(re,ne),Me(ve,le))),Ye=(Ae/2+Xe)*F.w,yt=(1-Ae/2-Be)*F.w,gt=(Ye+yt)/2,Tt=yt-Ye,At=(1-Ae)*F.h,$t=At-Tt/f;Tt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Z.transition().style("opacity",1).duration(200),Y=!0),j.emit("plotly_relayouting",ee(X))}function Ie(){B(j),X!==se&&(b.call("_guiRelayout",j,ee(X)),D&&j.data&&j._context.showTips&&(E.notifier(l(j,"Double-click to zoom back out"),"long",j),D=!1))}function Ve(){se={a:F.aaxis.range[0],b:F.baxis.range[1],c:F.caxis.range[1]},X=se}function Ge(_e,ce){var ve=_e/F.xaxis._m,le=ce/F.yaxis._m;X={a:se.a-le,b:se.b+(ve+le)/2,c:se.c-(ve-le)/2};var Ae=[X.a,X.b,X.c].sort(E.sorterAsc),Be={a:Ae.indexOf(X.a),b:Ae.indexOf(X.b),c:Ae.indexOf(X.c)};Ae[0]<0&&(Ae[1]+Ae[0]/2<0?(Ae[2]+=Ae[0]+Ae[1],Ae[0]=Ae[1]=0):(Ae[2]+=Ae[0]/2,Ae[1]+=Ae[0]/2,Ae[0]=0),X={a:Ae[Be.a],b:Ae[Be.b],c:Ae[Be.c]},ce=(se.a-X.a)*F.yaxis._m,_e=(se.c-X.c-se.b+X.b)*F.xaxis._m);var Xe=k(F.x0+_e,F.y0+ce);F.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Xe);var Ye=k(-_e,-ce);F.clipDefRelative.select("path").attr("transform",Ye),F.aaxis.range=[X.a,F.sum-X.b-X.c],F.baxis.range=[F.sum-X.a-X.c,X.b],F.caxis.range=[F.sum-X.a-X.b,X.c],F.drawAxes(!1),F._hasClipOnAxisFalse&&F.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,F),j.emit("plotly_relayouting",ee(X))}function ke(){b.call("_guiRelayout",j,ee(X))}P.onmousemove=function(_e){c.hover(j,_e,F.id),j._fullLayout._lasthover=P,j._fullLayout._hoversubplot=F.id},P.onmouseout=function(_e){j._dragging||s.unhover(j,_e)},s.init(this.dragOptions)};function B(F){p.select(F).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}}}),pT=ze({"src/plots/ternary/layout_attributes.js"(J,V){"use strict";var p=fc(),b=Ml().attributes,E=cf(),k=Al().overrideAll,l=Ki().extendFlat,e={title:{text:E.title.text,font:E.title.font},color:E.color,tickmode:E.minor.tickmode,nticks:l({},E.nticks,{dflt:6,min:1}),tick0:E.tick0,dtick:E.dtick,tickvals:E.tickvals,ticktext:E.ticktext,ticks:E.ticks,ticklen:E.ticklen,tickwidth:E.tickwidth,tickcolor:E.tickcolor,ticklabelstep:E.ticklabelstep,showticklabels:E.showticklabels,labelalias:E.labelalias,showtickprefix:E.showtickprefix,tickprefix:E.tickprefix,showticksuffix:E.showticksuffix,ticksuffix:E.ticksuffix,showexponent:E.showexponent,exponentformat:E.exponentformat,minexponent:E.minexponent,separatethousands:E.separatethousands,tickfont:E.tickfont,tickangle:E.tickangle,tickformat:E.tickformat,tickformatstops:E.tickformatstops,hoverformat:E.hoverformat,showline:l({},E.showline,{dflt:!0}),linecolor:E.linecolor,linewidth:E.linewidth,showgrid:l({},E.showgrid,{dflt:!0}),gridcolor:E.gridcolor,gridwidth:E.gridwidth,griddash:E.griddash,layer:E.layer,min:{valType:"number",dflt:0,min:0}},t=V.exports=k({domain:b({name:"ternary"}),bgcolor:{valType:"color",dflt:p.background},sum:{valType:"number",dflt:1,min:0},aaxis:e,baxis:e,caxis:e},"plot","from-root");t.uirevision={valType:"any",editType:"none"},t.aaxis.uirevision=t.baxis.uirevision=t.caxis.uirevision={valType:"any",editType:"none"}}}),Zv=ze({"src/plots/subplot_defaults.js"(J,V){"use strict";var p=Nr(),b=hs(),E=Ml().defaults;V.exports=function(l,e,t,n){var r=n.type,a=n.attributes,o=n.handleDefaults,s=n.partition||"x",c=e._subplots[r],m=c.length,h=m&&c[0].replace(/\d+$/,""),v,g;function i(C,_){return p.coerce(v,g,a,C,_)}for(var w=0;w=w&&(T.min=0,f.min=0,u.min=0,m.aaxis&&delete m.aaxis.min,m.baxis&&delete m.baxis.min,m.caxis&&delete m.caxis.min)}function c(m,h,v,g){var i=a[h._name];function w(A,x){return E.coerce(m,h,i,A,x)}w("uirevision",g.uirevision),h.type="linear";var S=w("color"),M=S!==i.color.dflt?S:v.font.color,C=h._name,_=C.charAt(0).toUpperCase(),T="Component "+_,f=w("title.text",T);h._hovertitle=f===T?f:_,E.coerceFont(w,"title.font",v.font,{overrideDflt:{size:E.bigFont(v.font.size),color:M}}),w("min"),n(m,h,w,"linear"),e(m,h,w,"linear"),l(m,h,w,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),t(m,h,w,{outerTicks:!0});var u=w("showticklabels");u&&(E.coerceFont(w,"tickfont",v.font,{overrideDflt:{color:M}}),w("tickangle"),w("tickformat")),r(m,h,w,{dfltColor:S,bgColor:v.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:i}),w("hoverformat"),w("layer")}}}),fz=ze({"src/plots/ternary/index.js"(J){"use strict";var V=uz(),p=zf().getSubplotCalcData,b=Nr().counterRegex,E="ternary";J.name=E;var k=J.attr="subplot";J.idRoot=E,J.idRegex=J.attrRegex=b(E);var l=J.attributes={};l[k]={valType:"subplotid",dflt:"ternary",editType:"calc"},J.layoutAttributes=pT(),J.supplyLayoutDefaults=cz(),J.plot=function(t){for(var n=t._fullLayout,r=t.calcdata,a=n._subplots[E],o=0;o0){var C=t.xa,_=t.ya,T,f,u,A,x;m.orientation==="h"?(x=n,T="y",u=_,f="x",A=C):(x=r,T="x",u=C,f="y",A=_);var z=c[t.index];if(x>=z.span[0]&&x<=z.span[1]){var I=b.extendFlat({},t),O=A.c2p(x,!0),D=l.getKdeValue(z,m,x),B=l.getPositionOnKdePath(z,m,O),F=u._offset,P=u._length;I[T+"0"]=B[0],I[T+"1"]=B[1],I[f+"0"]=I[f+"1"]=O,I[f+"Label"]=f+": "+E.hoverLabelText(A,x,m[f+"hoverformat"])+", "+c[0].t.labels.kde+" "+D.toFixed(3);for(var j=0,U=0;U path").each(function(v){if(!v.isBlank){var g=h.marker;p.select(this).call(E.fill,v.mc||g.color).call(E.stroke,v.mlc||g.line.color).call(b.dashLine,g.line.dash,v.mlw||g.line.width).style("opacity",h.selectedpoints&&!v.selected?k:1)}}),t(m,h,r),m.selectAll(".regions").each(function(){p.select(this).selectAll("path").style("stroke-width",0).call(E.fill,h.connector.fillcolor)}),m.selectAll(".lines").each(function(){var v=h.connector.line;b.lineGroupStyle(p.select(this).selectAll("path"),v.width,v.color,v.dash)})})}V.exports={style:n}}}),Lz=ze({"src/traces/funnel/hover.js"(J,V){"use strict";var p=Qn().opacity,b=eg().hoverOnBars,E=Nr().formatPercent;V.exports=function(e,t,n,r,a){var o=b(e,t,n,r,a);if(o){var s=o.cd,c=s[0].trace,m=c.orientation==="h",h=o.index,v=s[h],g=m?"x":"y";o[g+"LabelVal"]=v.s,o.percentInitial=v.begR,o.percentInitialLabel=E(v.begR,1),o.percentPrevious=v.difR,o.percentPreviousLabel=E(v.difR,1),o.percentTotal=v.sumR,o.percentTotalLabel=E(v.sumR,1);var i=v.hi||c.hoverinfo,w=[];if(i&&i!=="none"&&i!=="skip"){var S=i==="all",M=i.split("+"),C=function(_){return S||M.indexOf(_)!==-1};C("percent initial")&&w.push(o.percentInitialLabel+" of initial"),C("percent previous")&&w.push(o.percentPreviousLabel+" of previous"),C("percent total")&&w.push(o.percentTotalLabel+" of total")}return o.extraText=w.join("
"),o.color=k(c,v),[o]}};function k(l,e){var t=l.marker,n=e.mc||t.color,r=e.mlc||t.line.color,a=e.mlw||t.line.width;if(p(n))return n;if(p(r)&&a)return r}}}),Pz=ze({"src/traces/funnel/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,"percentInitial"in E&&(b.percentInitial=E.percentInitial),"percentPrevious"in E&&(b.percentPrevious=E.percentPrevious),"percentTotal"in E&&(b.percentTotal=E.percentTotal),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b}}}),Rz=ze({"src/traces/funnel/index.js"(J,V){"use strict";V.exports={attributes:gT(),layoutAttributes:yT(),supplyDefaults:_T().supplyDefaults,crossTraceDefaults:_T().crossTraceDefaults,supplyLayoutDefaults:Az(),calc:Sz(),crossTraceCalc:Ez(),plot:kz(),style:Cz().style,hoverPoints:Lz(),eventData:Pz(),selectPoints:tg(),moduleType:"trace",name:"funnel",basePlotModule:Du(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Iz=ze({"lib/funnel.js"(J,V){"use strict";V.exports=Rz()}}),Dz=ze({"src/traces/waterfall/constants.js"(J,V){"use strict";V.exports={eventDataKeys:["initial","delta","final"]}}}),xT=ze({"src/traces/waterfall/attributes.js"(J,V){"use strict";var p=jd(),b=su().line,E=ws(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Dz(),r=Ki().extendFlat,a=Qn();function o(s){return{marker:{color:r({},p.marker.color,{arrayOk:!1,editType:"style"}),line:{color:r({},p.marker.line.color,{arrayOk:!1,editType:"style"}),width:r({},p.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}V.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:p.x,x0:p.x0,dx:p.dx,y:p.y,y0:p.y0,dy:p.dy,xperiod:p.xperiod,yperiod:p.yperiod,xperiod0:p.xperiod0,yperiod0:p.yperiod0,xperiodalignment:p.xperiodalignment,yperiodalignment:p.yperiodalignment,xhoverformat:k("x"),yhoverformat:k("y"),hovertext:p.hovertext,hovertemplate:l({},{keys:n.eventDataKeys}),hovertemplatefallback:t(),hoverinfo:r({},E.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:e({editType:"plot"},{keys:n.eventDataKeys.concat(["label"])}),texttemplatefallback:t({editType:"plot"}),text:p.text,textposition:p.textposition,insidetextanchor:p.insidetextanchor,textangle:p.textangle,textfont:p.textfont,insidetextfont:p.insidetextfont,outsidetextfont:p.outsidetextfont,constraintext:p.constraintext,cliponaxis:p.cliponaxis,orientation:p.orientation,offset:p.offset,width:p.width,increasing:o("increasing"),decreasing:o("decreasing"),totals:o("intermediate sums and total"),connector:{line:{color:r({},b.color,{dflt:a.defaultLine}),width:r({},b.width,{editType:"plot"}),dash:b.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:p.offsetgroup,alignmentgroup:p.alignmentgroup,zorder:p.zorder}}}),bT=ze({"src/traces/waterfall/layout_attributes.js"(J,V){"use strict";V.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"}}}}),ng=ze({"src/constants/delta.js"(J,V){"use strict";V.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}}}),wT=ze({"src/traces/waterfall/defaults.js"(J,V){"use strict";var p=Nr(),b=Hv(),E=qh().handleText,k=Gv(),l=yd(),e=xT(),t=Qn(),n=ng(),r=n.INCREASING.COLOR,a=n.DECREASING.COLOR,o="#4499FF";function s(h,v,g){h(v+".marker.color",g),h(v+".marker.line.color",t.defaultLine),h(v+".marker.line.width")}function c(h,v,g,i){function w(T,f){return p.coerce(h,v,e,T,f)}var S=k(h,v,i,w);if(!S){v.visible=!1;return}l(h,v,i,w),w("xhoverformat"),w("yhoverformat"),w("measure"),w("orientation",v.x&&!v.y?"h":"v"),w("base"),w("offset"),w("width"),w("text"),w("hovertext"),w("hovertemplate"),w("hovertemplatefallback");var M=w("textposition");E(h,v,i,w,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),v.textposition!=="none"&&(w("texttemplate"),w("texttemplatefallback"),v.texttemplate||w("textinfo")),s(w,"increasing",r),s(w,"decreasing",a),s(w,"totals",o);var C=w("connector.visible");if(C){w("connector.mode");var _=w("connector.line.width");_&&(w("connector.line.color"),w("connector.line.dash"))}w("zorder")}function m(h,v){var g,i;function w(M){return p.coerce(i._input,i,e,M)}if(v.waterfallmode==="group")for(var S=0;S0&&(w?x+="M"+u[0]+","+A[1]+"V"+A[0]:x+="M"+u[1]+","+A[0]+"H"+u[0]),S!=="between"&&(_.isSum||T path").each(function(v){if(!v.isBlank){var g=h[v.dir].marker;p.select(this).call(E.fill,g.color).call(E.stroke,g.line.color).call(b.dashLine,g.line.dash,g.line.width).style("opacity",h.selectedpoints&&!v.selected?k:1)}}),t(m,h,r),m.selectAll(".lines").each(function(){var v=h.connector.line;b.lineGroupStyle(p.select(this).selectAll("path"),v.width,v.color,v.dash)})})}V.exports={style:n}}}),jz=ze({"src/traces/waterfall/hover.js"(J,V){"use strict";var p=Gi().hoverLabelText,b=Qn().opacity,E=eg().hoverOnBars,k=ng(),l={increasing:k.INCREASING.SYMBOL,decreasing:k.DECREASING.SYMBOL};V.exports=function(n,r,a,o,s){var c=E(n,r,a,o,s);if(!c)return;var m=c.cd,h=m[0].trace,v=h.orientation==="h",g=v?"x":"y",i=v?n.xa:n.ya;function w(z){return p(i,z,h[g+"hoverformat"])}var S=c.index,M=m[S],C=M.isSum?M.b+M.s:M.rawS;c.initial=M.b+M.s-C,c.delta=C,c.final=c.initial+c.delta;var _=w(Math.abs(c.delta));c.deltaLabel=C<0?"("+_+")":_,c.finalLabel=w(c.final),c.initialLabel=w(c.initial);var T=M.hi||h.hoverinfo,f=[];if(T&&T!=="none"&&T!=="skip"){var u=T==="all",A=T.split("+"),x=function(z){return u||A.indexOf(z)!==-1};M.isSum||(x("final")&&(v?!x("x"):!x("y"))&&f.push(c.finalLabel),x("delta")&&(C<0?f.push(c.deltaLabel+" "+l.decreasing):f.push(c.deltaLabel+" "+l.increasing)),x("initial")&&f.push("Initial: "+c.initialLabel))}return f.length&&(c.extraText=f.join("
")),c.color=e(h,M),[c]};function e(t,n){var r=t[n.dir].marker,a=r.color,o=r.line.color,s=r.line.width;if(b(a))return a;if(b(o)&&s)return o}}}),Uz=ze({"src/traces/waterfall/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.x="xVal"in E?E.xVal:E.x,b.y="yVal"in E?E.yVal:E.y,"initial"in E&&(b.initial=E.initial),"delta"in E&&(b.delta=E.delta),"final"in E&&(b.final=E.final),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b}}}),qz=ze({"src/traces/waterfall/index.js"(J,V){"use strict";V.exports={attributes:xT(),layoutAttributes:bT(),supplyDefaults:wT().supplyDefaults,crossTraceDefaults:wT().crossTraceDefaults,supplyLayoutDefaults:Fz(),calc:zz(),crossTraceCalc:Bz(),plot:Oz(),style:Nz().style,hoverPoints:jz(),eventData:Uz(),selectPoints:tg(),moduleType:"trace",name:"waterfall",basePlotModule:Du(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}}}),Vz=ze({"lib/waterfall.js"(J,V){"use strict";V.exports=qz()}}),ig=ze({"src/traces/image/constants.js"(J,V){"use strict";V.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(p){return p.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(p){return p.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(p){return p.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(p){var b=p.slice(0,3);return b[1]=b[1]+"%",b[2]=b[2]+"%",b},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(p){var b=p.slice(0,4);return b[1]=b[1]+"%",b[2]=b[2]+"%",b},suffix:["\xB0","%","%",""]}}}}}),Sb={};bu(Sb,{default:()=>kT});var TT,AT,Eb,MT,ST,kb,Cb,Lb,ET,kT,CT=zi({"src/traces/image/attributes.ts"(){"use strict";TT=Yl(Ki()),AT=Yl(ws()),Eb=Yl(xs()),MT=Yl(su()),ST=Yl(ig()),kb=["rgb","rgba","rgba256","hsl","hsla"],Cb=[],Lb=[];for(let J of kb){let V=ST.colormodel[J];Cb.push(`For the \`${J}\` colormodel, it is [${(V.zminDflt||V.min).join(", ")}].`),Lb.push(`For the \`${J}\` colormodel, it is [${(V.zmaxDflt||V.max).join(", ")}].`)}ET={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:kb,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",Cb.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",Lb.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,TT.extendFlat)({},AT.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,Eb.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,Eb.templatefallbackAttrs)(),zorder:MT.zorder},kT=ET}}),Gz=ze({"src/traces/image/defaults.js"(J,V){"use strict";var p=Nr(),b=(CT(),Po(Sb)).default,E=ig(),k=ip().IMAGE_URL_PREFIX;V.exports=function(e,t){function n(o,s){return p.coerce(e,t,b,o,s)}n("source"),t.source&&!t.source.match(k)&&delete t.source,t._hasSource=!!t.source;var r=n("z");if(t._hasZ=!(r===void 0||!r.length||!r[0]||!r[0].length),!t._hasZ&&!t._hasSource){t.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var a;t._hasZ?(n("colormodel","rgb"),a=E.colormodel[t.colormodel],n("zmin",a.zminDflt||a.min),n("zmax",a.zmaxDflt||a.max)):t._hasSource&&(t.colormodel="rgba256",a=E.colormodel[t.colormodel],t.zmin=a.zminDflt,t.zmax=a.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),t._length=null,n("zorder")}}}),op=ze({"node_modules/inherits/inherits_browser.js"(J,V){typeof Object.create=="function"?V.exports=function(b,E){E&&(b.super_=E,b.prototype=Object.create(E.prototype,{constructor:{value:b,enumerable:!1,writable:!0,configurable:!0}}))}:V.exports=function(b,E){if(E){b.super_=E;var k=function(){};k.prototype=E.prototype,b.prototype=new k,b.prototype.constructor=b}}}}),LT=ze({"node_modules/readable-stream/lib/internal/streams/stream-browser.js"(J,V){V.exports=jv().EventEmitter}}),Hz=ze({"node_modules/base64-js/index.js"(J){"use strict";J.byteLength=t,J.toByteArray=r,J.fromByteArray=s;var V=[],p=[],b=typeof Uint8Array<"u"?Uint8Array:Array,E="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(k=0,l=E.length;k0)throw new Error("Invalid string. Length must be a multiple of 4");var h=c.indexOf("=");h===-1&&(h=m);var v=h===m?0:4-h%4;return[h,v]}function t(c){var m=e(c),h=m[0],v=m[1];return(h+v)*3/4-v}function n(c,m,h){return(m+h)*3/4-h}function r(c){var m,h=e(c),v=h[0],g=h[1],i=new b(n(c,v,g)),w=0,S=g>0?v-4:v,M;for(M=0;M>16&255,i[w++]=m>>8&255,i[w++]=m&255;return g===2&&(m=p[c.charCodeAt(M)]<<2|p[c.charCodeAt(M+1)]>>4,i[w++]=m&255),g===1&&(m=p[c.charCodeAt(M)]<<10|p[c.charCodeAt(M+1)]<<4|p[c.charCodeAt(M+2)]>>2,i[w++]=m>>8&255,i[w++]=m&255),i}function a(c){return V[c>>18&63]+V[c>>12&63]+V[c>>6&63]+V[c&63]}function o(c,m,h){for(var v,g=[],i=m;iS?S:w+i));return v===1?(m=c[h-1],g.push(V[m>>2]+V[m<<4&63]+"==")):v===2&&(m=(c[h-2]<<8)+c[h-1],g.push(V[m>>10]+V[m>>4&63]+V[m<<2&63]+"=")),g.join("")}}}),Wz=ze({"node_modules/ieee754/index.js"(J){J.read=function(V,p,b,E,k){var l,e,t=k*8-E-1,n=(1<>1,a=-7,o=b?k-1:0,s=b?-1:1,c=V[p+o];for(o+=s,l=c&(1<<-a)-1,c>>=-a,a+=t;a>0;l=l*256+V[p+o],o+=s,a-=8);for(e=l&(1<<-a)-1,l>>=-a,a+=E;a>0;e=e*256+V[p+o],o+=s,a-=8);if(l===0)l=1-r;else{if(l===n)return e?NaN:(c?-1:1)*(1/0);e=e+Math.pow(2,E),l=l-r}return(c?-1:1)*e*Math.pow(2,l-E)},J.write=function(V,p,b,E,k,l){var e,t,n,r=l*8-k-1,a=(1<>1,s=k===23?Math.pow(2,-24)-Math.pow(2,-77):0,c=E?0:l-1,m=E?1:-1,h=p<0||p===0&&1/p<0?1:0;for(p=Math.abs(p),isNaN(p)||p===1/0?(t=isNaN(p)?1:0,e=a):(e=Math.floor(Math.log(p)/Math.LN2),p*(n=Math.pow(2,-e))<1&&(e--,n*=2),e+o>=1?p+=s/n:p+=s*Math.pow(2,1-o),p*n>=2&&(e++,n/=2),e+o>=a?(t=0,e=a):e+o>=1?(t=(p*n-1)*Math.pow(2,k),e=e+o):(t=p*Math.pow(2,o-1)*Math.pow(2,k),e=0));k>=8;V[b+c]=t&255,c+=m,t/=256,k-=8);for(e=e<0;V[b+c]=e&255,c+=m,e/=256,r-=8);V[b+c-m]|=h*128}}}),$v=ze({"node_modules/buffer/index.js"(J){"use strict";var V=Hz(),p=Wz(),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;J.Buffer=e,J.SlowBuffer=g,J.INSPECT_MAX_BYTES=50;var E=2147483647;J.kMaxLength=E,e.TYPED_ARRAY_SUPPORT=k(),!e.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function k(){try{let ce=new Uint8Array(1),ve={foo:function(){return 42}};return Object.setPrototypeOf(ve,Uint8Array.prototype),Object.setPrototypeOf(ce,ve),ce.foo()===42}catch{return!1}}Object.defineProperty(e.prototype,"parent",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.buffer}}),Object.defineProperty(e.prototype,"offset",{enumerable:!0,get:function(){if(e.isBuffer(this))return this.byteOffset}});function l(ce){if(ce>E)throw new RangeError('The value "'+ce+'" is invalid for option "size"');let ve=new Uint8Array(ce);return Object.setPrototypeOf(ve,e.prototype),ve}function e(ce,ve,le){if(typeof ce=="number"){if(typeof ve=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return a(ce)}return t(ce,ve,le)}e.poolSize=8192;function t(ce,ve,le){if(typeof ce=="string")return o(ce,ve);if(ArrayBuffer.isView(ce))return c(ce);if(ce==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ce);if(Ie(ce,ArrayBuffer)||ce&&Ie(ce.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ce,SharedArrayBuffer)||ce&&Ie(ce.buffer,SharedArrayBuffer)))return m(ce,ve,le);if(typeof ce=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let Ae=ce.valueOf&&ce.valueOf();if(Ae!=null&&Ae!==ce)return e.from(Ae,ve,le);let Be=h(ce);if(Be)return Be;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ce[Symbol.toPrimitive]=="function")return e.from(ce[Symbol.toPrimitive]("string"),ve,le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ce)}e.from=function(ce,ve,le){return t(ce,ve,le)},Object.setPrototypeOf(e.prototype,Uint8Array.prototype),Object.setPrototypeOf(e,Uint8Array);function n(ce){if(typeof ce!="number")throw new TypeError('"size" argument must be of type number');if(ce<0)throw new RangeError('The value "'+ce+'" is invalid for option "size"')}function r(ce,ve,le){return n(ce),ce<=0?l(ce):ve!==void 0?typeof le=="string"?l(ce).fill(ve,le):l(ce).fill(ve):l(ce)}e.alloc=function(ce,ve,le){return r(ce,ve,le)};function a(ce){return n(ce),l(ce<0?0:v(ce)|0)}e.allocUnsafe=function(ce){return a(ce)},e.allocUnsafeSlow=function(ce){return a(ce)};function o(ce,ve){if((typeof ve!="string"||ve==="")&&(ve="utf8"),!e.isEncoding(ve))throw new TypeError("Unknown encoding: "+ve);let le=i(ce,ve)|0,Ae=l(le),Be=Ae.write(ce,ve);return Be!==le&&(Ae=Ae.slice(0,Be)),Ae}function s(ce){let ve=ce.length<0?0:v(ce.length)|0,le=l(ve);for(let Ae=0;Ae=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return ce|0}function g(ce){return+ce!=ce&&(ce=0),e.alloc(+ce)}e.isBuffer=function(ve){return ve!=null&&ve._isBuffer===!0&&ve!==e.prototype},e.compare=function(ve,le){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),Ie(le,Uint8Array)&&(le=e.from(le,le.offset,le.byteLength)),!e.isBuffer(ve)||!e.isBuffer(le))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(ve===le)return 0;let Ae=ve.length,Be=le.length;for(let Xe=0,Ye=Math.min(Ae,Be);XeBe.length?(e.isBuffer(Ye)||(Ye=e.from(Ye)),Ye.copy(Be,Xe)):Uint8Array.prototype.set.call(Be,Ye,Xe);else if(e.isBuffer(Ye))Ye.copy(Be,Xe);else throw new TypeError('"list" argument must be an Array of Buffers');Xe+=Ye.length}return Be};function i(ce,ve){if(e.isBuffer(ce))return ce.length;if(ArrayBuffer.isView(ce)||Ie(ce,ArrayBuffer))return ce.byteLength;if(typeof ce!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ce);let le=ce.length,Ae=arguments.length>2&&arguments[2]===!0;if(!Ae&&le===0)return 0;let Be=!1;for(;;)switch(ve){case"ascii":case"latin1":case"binary":return le;case"utf8":case"utf-8":return he(ce).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return le*2;case"hex":return le>>>1;case"base64":return Me(ce).length;default:if(Be)return Ae?-1:he(ce).length;ve=(""+ve).toLowerCase(),Be=!0}}e.byteLength=i;function w(ce,ve,le){let Ae=!1;if((ve===void 0||ve<0)&&(ve=0),ve>this.length||((le===void 0||le>this.length)&&(le=this.length),le<=0)||(le>>>=0,ve>>>=0,le<=ve))return"";for(ce||(ce="utf8");;)switch(ce){case"hex":return F(this,ve,le);case"utf8":case"utf-8":return z(this,ve,le);case"ascii":return D(this,ve,le);case"latin1":case"binary":return B(this,ve,le);case"base64":return x(this,ve,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,ve,le);default:if(Ae)throw new TypeError("Unknown encoding: "+ce);ce=(ce+"").toLowerCase(),Ae=!0}}e.prototype._isBuffer=!0;function S(ce,ve,le){let Ae=ce[ve];ce[ve]=ce[le],ce[le]=Ae}e.prototype.swap16=function(){let ve=this.length;if(ve%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let le=0;lele&&(ve+=" ... "),""},b&&(e.prototype[b]=e.prototype.inspect),e.prototype.compare=function(ve,le,Ae,Be,Xe){if(Ie(ve,Uint8Array)&&(ve=e.from(ve,ve.offset,ve.byteLength)),!e.isBuffer(ve))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof ve);if(le===void 0&&(le=0),Ae===void 0&&(Ae=ve?ve.length:0),Be===void 0&&(Be=0),Xe===void 0&&(Xe=this.length),le<0||Ae>ve.length||Be<0||Xe>this.length)throw new RangeError("out of range index");if(Be>=Xe&&le>=Ae)return 0;if(Be>=Xe)return-1;if(le>=Ae)return 1;if(le>>>=0,Ae>>>=0,Be>>>=0,Xe>>>=0,this===ve)return 0;let Ye=Xe-Be,yt=Ae-le,gt=Math.min(Ye,yt),Tt=this.slice(Be,Xe),At=ve.slice(le,Ae);for(let $t=0;$t2147483647?le=2147483647:le<-2147483648&&(le=-2147483648),le=+le,Ve(le)&&(le=Be?0:ce.length-1),le<0&&(le=ce.length+le),le>=ce.length){if(Be)return-1;le=ce.length-1}else if(le<0)if(Be)le=0;else return-1;if(typeof ve=="string"&&(ve=e.from(ve,Ae)),e.isBuffer(ve))return ve.length===0?-1:C(ce,ve,le,Ae,Be);if(typeof ve=="number")return ve=ve&255,typeof Uint8Array.prototype.indexOf=="function"?Be?Uint8Array.prototype.indexOf.call(ce,ve,le):Uint8Array.prototype.lastIndexOf.call(ce,ve,le):C(ce,[ve],le,Ae,Be);throw new TypeError("val must be string, number or Buffer")}function C(ce,ve,le,Ae,Be){let Xe=1,Ye=ce.length,yt=ve.length;if(Ae!==void 0&&(Ae=String(Ae).toLowerCase(),Ae==="ucs2"||Ae==="ucs-2"||Ae==="utf16le"||Ae==="utf-16le")){if(ce.length<2||ve.length<2)return-1;Xe=2,Ye/=2,yt/=2,le/=2}function gt(At,$t){return Xe===1?At[$t]:At.readUInt16BE($t*Xe)}let Tt;if(Be){let At=-1;for(Tt=le;TtYe&&(le=Ye-yt),Tt=le;Tt>=0;Tt--){let At=!0;for(let $t=0;$tBe&&(Ae=Be)):Ae=Be;let Xe=ve.length;Ae>Xe/2&&(Ae=Xe/2);let Ye;for(Ye=0;Ye>>0,isFinite(Ae)?(Ae=Ae>>>0,Be===void 0&&(Be="utf8")):(Be=Ae,Ae=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let Xe=this.length-le;if((Ae===void 0||Ae>Xe)&&(Ae=Xe),ve.length>0&&(Ae<0||le<0)||le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Be||(Be="utf8");let Ye=!1;for(;;)switch(Be){case"hex":return _(this,ve,le,Ae);case"utf8":case"utf-8":return T(this,ve,le,Ae);case"ascii":case"latin1":case"binary":return f(this,ve,le,Ae);case"base64":return u(this,ve,le,Ae);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,ve,le,Ae);default:if(Ye)throw new TypeError("Unknown encoding: "+Be);Be=(""+Be).toLowerCase(),Ye=!0}},e.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function x(ce,ve,le){return ve===0&&le===ce.length?V.fromByteArray(ce):V.fromByteArray(ce.slice(ve,le))}function z(ce,ve,le){le=Math.min(ce.length,le);let Ae=[],Be=ve;for(;Be239?4:Xe>223?3:Xe>191?2:1;if(Be+yt<=le){let gt,Tt,At,$t;switch(yt){case 1:Xe<128&&(Ye=Xe);break;case 2:gt=ce[Be+1],(gt&192)===128&&($t=(Xe&31)<<6|gt&63,$t>127&&(Ye=$t));break;case 3:gt=ce[Be+1],Tt=ce[Be+2],(gt&192)===128&&(Tt&192)===128&&($t=(Xe&15)<<12|(gt&63)<<6|Tt&63,$t>2047&&($t<55296||$t>57343)&&(Ye=$t));break;case 4:gt=ce[Be+1],Tt=ce[Be+2],At=ce[Be+3],(gt&192)===128&&(Tt&192)===128&&(At&192)===128&&($t=(Xe&15)<<18|(gt&63)<<12|(Tt&63)<<6|At&63,$t>65535&&$t<1114112&&(Ye=$t))}}Ye===null?(Ye=65533,yt=1):Ye>65535&&(Ye-=65536,Ae.push(Ye>>>10&1023|55296),Ye=56320|Ye&1023),Ae.push(Ye),Be+=yt}return O(Ae)}var I=4096;function O(ce){let ve=ce.length;if(ve<=I)return String.fromCharCode.apply(String,ce);let le="",Ae=0;for(;AeAe)&&(le=Ae);let Be="";for(let Xe=ve;XeAe&&(ve=Ae),le<0?(le+=Ae,le<0&&(le=0)):le>Ae&&(le=Ae),lele)throw new RangeError("Trying to access beyond buffer length")}e.prototype.readUintLE=e.prototype.readUIntLE=function(ve,le,Ae){ve=ve>>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve],Xe=1,Ye=0;for(;++Ye>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve+--le],Xe=1;for(;le>0&&(Xe*=256);)Be+=this[ve+--le]*Xe;return Be},e.prototype.readUint8=e.prototype.readUInt8=function(ve,le){return ve=ve>>>0,le||j(ve,1,this.length),this[ve]},e.prototype.readUint16LE=e.prototype.readUInt16LE=function(ve,le){return ve=ve>>>0,le||j(ve,2,this.length),this[ve]|this[ve+1]<<8},e.prototype.readUint16BE=e.prototype.readUInt16BE=function(ve,le){return ve=ve>>>0,le||j(ve,2,this.length),this[ve]<<8|this[ve+1]},e.prototype.readUint32LE=e.prototype.readUInt32LE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),(this[ve]|this[ve+1]<<8|this[ve+2]<<16)+this[ve+3]*16777216},e.prototype.readUint32BE=e.prototype.readUInt32BE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]*16777216+(this[ve+1]<<16|this[ve+2]<<8|this[ve+3])},e.prototype.readBigUInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=le+this[++ve]*2**8+this[++ve]*2**16+this[++ve]*2**24,Xe=this[++ve]+this[++ve]*2**8+this[++ve]*2**16+Ae*2**24;return BigInt(Be)+(BigInt(Xe)<>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=le*2**24+this[++ve]*2**16+this[++ve]*2**8+this[++ve],Xe=this[++ve]*2**24+this[++ve]*2**16+this[++ve]*2**8+Ae;return(BigInt(Be)<>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=this[ve],Xe=1,Ye=0;for(;++Ye=Xe&&(Be-=Math.pow(2,8*le)),Be},e.prototype.readIntBE=function(ve,le,Ae){ve=ve>>>0,le=le>>>0,Ae||j(ve,le,this.length);let Be=le,Xe=1,Ye=this[ve+--Be];for(;Be>0&&(Xe*=256);)Ye+=this[ve+--Be]*Xe;return Xe*=128,Ye>=Xe&&(Ye-=Math.pow(2,8*le)),Ye},e.prototype.readInt8=function(ve,le){return ve=ve>>>0,le||j(ve,1,this.length),this[ve]&128?(255-this[ve]+1)*-1:this[ve]},e.prototype.readInt16LE=function(ve,le){ve=ve>>>0,le||j(ve,2,this.length);let Ae=this[ve]|this[ve+1]<<8;return Ae&32768?Ae|4294901760:Ae},e.prototype.readInt16BE=function(ve,le){ve=ve>>>0,le||j(ve,2,this.length);let Ae=this[ve+1]|this[ve]<<8;return Ae&32768?Ae|4294901760:Ae},e.prototype.readInt32LE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]|this[ve+1]<<8|this[ve+2]<<16|this[ve+3]<<24},e.prototype.readInt32BE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),this[ve]<<24|this[ve+1]<<16|this[ve+2]<<8|this[ve+3]},e.prototype.readBigInt64LE=ke(function(ve){ve=ve>>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=this[ve+4]+this[ve+5]*2**8+this[ve+6]*2**16+(Ae<<24);return(BigInt(Be)<>>0,q(ve,"offset");let le=this[ve],Ae=this[ve+7];(le===void 0||Ae===void 0)&&Z(ve,this.length-8);let Be=(le<<24)+this[++ve]*2**16+this[++ve]*2**8+this[++ve];return(BigInt(Be)<>>0,le||j(ve,4,this.length),p.read(this,ve,!0,23,4)},e.prototype.readFloatBE=function(ve,le){return ve=ve>>>0,le||j(ve,4,this.length),p.read(this,ve,!1,23,4)},e.prototype.readDoubleLE=function(ve,le){return ve=ve>>>0,le||j(ve,8,this.length),p.read(this,ve,!0,52,8)},e.prototype.readDoubleBE=function(ve,le){return ve=ve>>>0,le||j(ve,8,this.length),p.read(this,ve,!1,52,8)};function U(ce,ve,le,Ae,Be,Xe){if(!e.isBuffer(ce))throw new TypeError('"buffer" argument must be a Buffer instance');if(ve>Be||vece.length)throw new RangeError("Index out of range")}e.prototype.writeUintLE=e.prototype.writeUIntLE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,Ae=Ae>>>0,!Be){let yt=Math.pow(2,8*Ae)-1;U(this,ve,le,Ae,yt,0)}let Xe=1,Ye=0;for(this[le]=ve&255;++Ye>>0,Ae=Ae>>>0,!Be){let yt=Math.pow(2,8*Ae)-1;U(this,ve,le,Ae,yt,0)}let Xe=Ae-1,Ye=1;for(this[le+Xe]=ve&255;--Xe>=0&&(Ye*=256);)this[le+Xe]=ve/Ye&255;return le+Ae},e.prototype.writeUint8=e.prototype.writeUInt8=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,1,255,0),this[le]=ve&255,le+1},e.prototype.writeUint16LE=e.prototype.writeUInt16LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,65535,0),this[le]=ve&255,this[le+1]=ve>>>8,le+2},e.prototype.writeUint16BE=e.prototype.writeUInt16BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,65535,0),this[le]=ve>>>8,this[le+1]=ve&255,le+2},e.prototype.writeUint32LE=e.prototype.writeUInt32LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,4294967295,0),this[le+3]=ve>>>24,this[le+2]=ve>>>16,this[le+1]=ve>>>8,this[le]=ve&255,le+4},e.prototype.writeUint32BE=e.prototype.writeUInt32BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,4294967295,0),this[le]=ve>>>24,this[le+1]=ve>>>16,this[le+2]=ve>>>8,this[le+3]=ve&255,le+4};function $(ce,ve,le,Ae,Be){Y(ve,Ae,Be,ce,le,7);let Xe=Number(ve&BigInt(4294967295));ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe,Xe=Xe>>8,ce[le++]=Xe;let Ye=Number(ve>>BigInt(32)&BigInt(4294967295));return ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,Ye=Ye>>8,ce[le++]=Ye,le}function Q(ce,ve,le,Ae,Be){Y(ve,Ae,Be,ce,le,7);let Xe=Number(ve&BigInt(4294967295));ce[le+7]=Xe,Xe=Xe>>8,ce[le+6]=Xe,Xe=Xe>>8,ce[le+5]=Xe,Xe=Xe>>8,ce[le+4]=Xe;let Ye=Number(ve>>BigInt(32)&BigInt(4294967295));return ce[le+3]=Ye,Ye=Ye>>8,ce[le+2]=Ye,Ye=Ye>>8,ce[le+1]=Ye,Ye=Ye>>8,ce[le]=Ye,le+8}e.prototype.writeBigUInt64LE=ke(function(ve,le=0){return $(this,ve,le,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeBigUInt64BE=ke(function(ve,le=0){return Q(this,ve,le,BigInt(0),BigInt("0xffffffffffffffff"))}),e.prototype.writeIntLE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,!Be){let gt=Math.pow(2,8*Ae-1);U(this,ve,le,Ae,gt-1,-gt)}let Xe=0,Ye=1,yt=0;for(this[le]=ve&255;++Xe>0)-yt&255;return le+Ae},e.prototype.writeIntBE=function(ve,le,Ae,Be){if(ve=+ve,le=le>>>0,!Be){let gt=Math.pow(2,8*Ae-1);U(this,ve,le,Ae,gt-1,-gt)}let Xe=Ae-1,Ye=1,yt=0;for(this[le+Xe]=ve&255;--Xe>=0&&(Ye*=256);)ve<0&&yt===0&&this[le+Xe+1]!==0&&(yt=1),this[le+Xe]=(ve/Ye>>0)-yt&255;return le+Ae},e.prototype.writeInt8=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,1,127,-128),ve<0&&(ve=255+ve+1),this[le]=ve&255,le+1},e.prototype.writeInt16LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,32767,-32768),this[le]=ve&255,this[le+1]=ve>>>8,le+2},e.prototype.writeInt16BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,2,32767,-32768),this[le]=ve>>>8,this[le+1]=ve&255,le+2},e.prototype.writeInt32LE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,2147483647,-2147483648),this[le]=ve&255,this[le+1]=ve>>>8,this[le+2]=ve>>>16,this[le+3]=ve>>>24,le+4},e.prototype.writeInt32BE=function(ve,le,Ae){return ve=+ve,le=le>>>0,Ae||U(this,ve,le,4,2147483647,-2147483648),ve<0&&(ve=4294967295+ve+1),this[le]=ve>>>24,this[le+1]=ve>>>16,this[le+2]=ve>>>8,this[le+3]=ve&255,le+4},e.prototype.writeBigInt64LE=ke(function(ve,le=0){return $(this,ve,le,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),e.prototype.writeBigInt64BE=ke(function(ve,le=0){return Q(this,ve,le,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function re(ce,ve,le,Ae,Be,Xe){if(le+Ae>ce.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("Index out of range")}function ne(ce,ve,le,Ae,Be){return ve=+ve,le=le>>>0,Be||re(ce,ve,le,4,34028234663852886e22,-34028234663852886e22),p.write(ce,ve,le,Ae,23,4),le+4}e.prototype.writeFloatLE=function(ve,le,Ae){return ne(this,ve,le,!0,Ae)},e.prototype.writeFloatBE=function(ve,le,Ae){return ne(this,ve,le,!1,Ae)};function se(ce,ve,le,Ae,Be){return ve=+ve,le=le>>>0,Be||re(ce,ve,le,8,17976931348623157e292,-17976931348623157e292),p.write(ce,ve,le,Ae,52,8),le+8}e.prototype.writeDoubleLE=function(ve,le,Ae){return se(this,ve,le,!0,Ae)},e.prototype.writeDoubleBE=function(ve,le,Ae){return se(this,ve,le,!1,Ae)},e.prototype.copy=function(ve,le,Ae,Be){if(!e.isBuffer(ve))throw new TypeError("argument should be a Buffer");if(Ae||(Ae=0),!Be&&Be!==0&&(Be=this.length),le>=ve.length&&(le=ve.length),le||(le=0),Be>0&&Be=this.length)throw new RangeError("Index out of range");if(Be<0)throw new RangeError("sourceEnd out of bounds");Be>this.length&&(Be=this.length),ve.length-le>>0,Ae=Ae===void 0?this.length:Ae>>>0,ve||(ve=0);let Xe;if(typeof ve=="number")for(Xe=le;Xe2**32?Be=K(String(le)):typeof le=="bigint"&&(Be=String(le),(le>BigInt(2)**BigInt(32)||le<-(BigInt(2)**BigInt(32)))&&(Be=K(Be)),Be+="n"),Ae+=` It must be ${ve}. Received ${Be}`,Ae},RangeError);function K(ce){let ve="",le=ce.length,Ae=ce[0]==="-"?1:0;for(;le>=Ae+4;le-=3)ve=`_${ce.slice(le-3,le)}${ve}`;return`${ce.slice(0,le)}${ve}`}function H(ce,ve,le){q(ve,"offset"),(ce[ve]===void 0||ce[ve+le]===void 0)&&Z(ve,ce.length-(le+1))}function Y(ce,ve,le,Ae,Be,Xe){if(ce>le||ce3?ve===0||ve===BigInt(0)?yt=`>= 0${Ye} and < 2${Ye} ** ${(Xe+1)*8}${Ye}`:yt=`>= -(2${Ye} ** ${(Xe+1)*8-1}${Ye}) and < 2 ** ${(Xe+1)*8-1}${Ye}`:yt=`>= ${ve}${Ye} and <= ${le}${Ye}`,new G.ERR_OUT_OF_RANGE("value",yt,ce)}H(Ae,Be,Xe)}function q(ce,ve){if(typeof ce!="number")throw new G.ERR_INVALID_ARG_TYPE(ve,"number",ce)}function Z(ce,ve,le){throw Math.floor(ce)!==ce?(q(ce,le),new G.ERR_OUT_OF_RANGE(le||"offset","an integer",ce)):ve<0?new G.ERR_BUFFER_OUT_OF_BOUNDS:new G.ERR_OUT_OF_RANGE(le||"offset",`>= ${le?1:0} and <= ${ve}`,ce)}var ee=/[^+/0-9A-Za-z-_]/g;function ae(ce){if(ce=ce.split("=")[0],ce=ce.trim().replace(ee,""),ce.length<2)return"";for(;ce.length%4!==0;)ce=ce+"=";return ce}function he(ce,ve){ve=ve||1/0;let le,Ae=ce.length,Be=null,Xe=[];for(let Ye=0;Ye55295&&le<57344){if(!Be){if(le>56319){(ve-=3)>-1&&Xe.push(239,191,189);continue}else if(Ye+1===Ae){(ve-=3)>-1&&Xe.push(239,191,189);continue}Be=le;continue}if(le<56320){(ve-=3)>-1&&Xe.push(239,191,189),Be=le;continue}le=(Be-55296<<10|le-56320)+65536}else Be&&(ve-=3)>-1&&Xe.push(239,191,189);if(Be=null,le<128){if((ve-=1)<0)break;Xe.push(le)}else if(le<2048){if((ve-=2)<0)break;Xe.push(le>>6|192,le&63|128)}else if(le<65536){if((ve-=3)<0)break;Xe.push(le>>12|224,le>>6&63|128,le&63|128)}else if(le<1114112){if((ve-=4)<0)break;Xe.push(le>>18|240,le>>12&63|128,le>>6&63|128,le&63|128)}else throw new Error("Invalid code point")}return Xe}function xe(ce){let ve=[];for(let le=0;le>8,Be=le%256,Xe.push(Be),Xe.push(Ae);return Xe}function Me(ce){return V.toByteArray(ae(ce))}function Se(ce,ve,le,Ae){let Be;for(Be=0;Be=ve.length||Be>=ce.length);++Be)ve[Be+le]=ce[Be];return Be}function Ie(ce,ve){return ce instanceof ve||ce!=null&&ce.constructor!=null&&ce.constructor.name!=null&&ce.constructor.name===ve.name}function Ve(ce){return ce!==ce}var Ge=function(){let ce="0123456789abcdef",ve=new Array(256);for(let le=0;le<16;++le){let Ae=le*16;for(let Be=0;Be<16;++Be)ve[Ae+Be]=ce[le]+ce[Be]}return ve}();function ke(ce){return typeof BigInt>"u"?_e:ce}function _e(){throw new Error("BigInt not supported")}}}),Pb=ze({"node_modules/has-symbols/shams.js"(J,V){"use strict";V.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var b={},E=Symbol("test"),k=Object(E);if(typeof E=="string"||Object.prototype.toString.call(E)!=="[object Symbol]"||Object.prototype.toString.call(k)!=="[object Symbol]")return!1;var l=42;b[E]=l;for(var e in b)return!1;if(typeof Object.keys=="function"&&Object.keys(b).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(b).length!==0)return!1;var t=Object.getOwnPropertySymbols(b);if(t.length!==1||t[0]!==E||!Object.prototype.propertyIsEnumerable.call(b,E))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(b,E);if(n.value!==l||n.enumerable!==!0)return!1}return!0}}}),k1=ze({"node_modules/has-tostringtag/shams.js"(J,V){"use strict";var p=Pb();V.exports=function(){return p()&&!!Symbol.toStringTag}}}),Rb=ze({"node_modules/es-object-atoms/index.js"(J,V){"use strict";V.exports=Object}}),Yz=ze({"node_modules/es-errors/index.js"(J,V){"use strict";V.exports=Error}}),Xz=ze({"node_modules/es-errors/eval.js"(J,V){"use strict";V.exports=EvalError}}),Zz=ze({"node_modules/es-errors/range.js"(J,V){"use strict";V.exports=RangeError}}),$z=ze({"node_modules/es-errors/ref.js"(J,V){"use strict";V.exports=ReferenceError}}),PT=ze({"node_modules/es-errors/syntax.js"(J,V){"use strict";V.exports=SyntaxError}}),og=ze({"node_modules/es-errors/type.js"(J,V){"use strict";V.exports=TypeError}}),Kz=ze({"node_modules/es-errors/uri.js"(J,V){"use strict";V.exports=URIError}}),Jz=ze({"node_modules/math-intrinsics/abs.js"(J,V){"use strict";V.exports=Math.abs}}),Qz=ze({"node_modules/math-intrinsics/floor.js"(J,V){"use strict";V.exports=Math.floor}}),eB=ze({"node_modules/math-intrinsics/max.js"(J,V){"use strict";V.exports=Math.max}}),tB=ze({"node_modules/math-intrinsics/min.js"(J,V){"use strict";V.exports=Math.min}}),rB=ze({"node_modules/math-intrinsics/pow.js"(J,V){"use strict";V.exports=Math.pow}}),aB=ze({"node_modules/math-intrinsics/round.js"(J,V){"use strict";V.exports=Math.round}}),nB=ze({"node_modules/math-intrinsics/isNaN.js"(J,V){"use strict";V.exports=Number.isNaN||function(b){return b!==b}}}),iB=ze({"node_modules/math-intrinsics/sign.js"(J,V){"use strict";var p=nB();V.exports=function(E){return p(E)||E===0?E:E<0?-1:1}}}),oB=ze({"node_modules/gopd/gOPD.js"(J,V){"use strict";V.exports=Object.getOwnPropertyDescriptor}}),Kv=ze({"node_modules/gopd/index.js"(J,V){"use strict";var p=oB();if(p)try{p([],"length")}catch{p=null}V.exports=p}}),C1=ze({"node_modules/es-define-property/index.js"(J,V){"use strict";var p=Object.defineProperty||!1;if(p)try{p({},"a",{value:1})}catch{p=!1}V.exports=p}}),sB=ze({"node_modules/has-symbols/index.js"(J,V){"use strict";var p=typeof Symbol<"u"&&Symbol,b=Pb();V.exports=function(){return typeof p!="function"||typeof Symbol!="function"||typeof p("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:b()}}}),RT=ze({"node_modules/get-proto/Reflect.getPrototypeOf.js"(J,V){"use strict";V.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null}}),IT=ze({"node_modules/get-proto/Object.getPrototypeOf.js"(J,V){"use strict";var p=Rb();V.exports=p.getPrototypeOf||null}}),lB=ze({"node_modules/function-bind/implementation.js"(J,V){"use strict";var p="Function.prototype.bind called on incompatible ",b=Object.prototype.toString,E=Math.max,k="[object Function]",l=function(r,a){for(var o=[],s=0;s"u"||!T?p:T(Uint8Array),O={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?p:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?p:ArrayBuffer,"%ArrayIteratorPrototype%":_&&T?T([][Symbol.iterator]()):p,"%AsyncFromSyncIteratorPrototype%":p,"%AsyncFunction%":z,"%AsyncGenerator%":z,"%AsyncGeneratorFunction%":z,"%AsyncIteratorPrototype%":z,"%Atomics%":typeof Atomics>"u"?p:Atomics,"%BigInt%":typeof BigInt>"u"?p:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?p:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?p:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?p:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":E,"%eval%":eval,"%EvalError%":k,"%Float16Array%":typeof Float16Array>"u"?p:Float16Array,"%Float32Array%":typeof Float32Array>"u"?p:Float32Array,"%Float64Array%":typeof Float64Array>"u"?p:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?p:FinalizationRegistry,"%Function%":g,"%GeneratorFunction%":z,"%Int8Array%":typeof Int8Array>"u"?p:Int8Array,"%Int16Array%":typeof Int16Array>"u"?p:Int16Array,"%Int32Array%":typeof Int32Array>"u"?p:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":_&&T?T(T([][Symbol.iterator]())):p,"%JSON%":typeof JSON=="object"?JSON:p,"%Map%":typeof Map>"u"?p:Map,"%MapIteratorPrototype%":typeof Map>"u"||!_||!T?p:T(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":b,"%Object.getOwnPropertyDescriptor%":w,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?p:Promise,"%Proxy%":typeof Proxy>"u"?p:Proxy,"%RangeError%":l,"%ReferenceError%":e,"%Reflect%":typeof Reflect>"u"?p:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?p:Set,"%SetIteratorPrototype%":typeof Set>"u"||!_||!T?p:T(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?p:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":_&&T?T(""[Symbol.iterator]()):p,"%Symbol%":_?Symbol:p,"%SyntaxError%":t,"%ThrowTypeError%":C,"%TypedArray%":I,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?p:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?p:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?p:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?p:Uint32Array,"%URIError%":r,"%WeakMap%":typeof WeakMap>"u"?p:WeakMap,"%WeakRef%":typeof WeakRef>"u"?p:WeakRef,"%WeakSet%":typeof WeakSet>"u"?p:WeakSet,"%Function.prototype.call%":x,"%Function.prototype.apply%":A,"%Object.defineProperty%":S,"%Object.getPrototypeOf%":f,"%Math.abs%":a,"%Math.floor%":o,"%Math.max%":s,"%Math.min%":c,"%Math.pow%":m,"%Math.round%":h,"%Math.sign%":v,"%Reflect.getPrototypeOf%":u};if(T)try{null.error}catch(H){D=T(T(H)),O["%Error.prototype%"]=D}var D,B=function H(Y){var q;if(Y==="%AsyncFunction%")q=i("async function () {}");else if(Y==="%GeneratorFunction%")q=i("function* () {}");else if(Y==="%AsyncGeneratorFunction%")q=i("async function* () {}");else if(Y==="%AsyncGenerator%"){var Z=H("%AsyncGeneratorFunction%");Z&&(q=Z.prototype)}else if(Y==="%AsyncIteratorPrototype%"){var ee=H("%AsyncGenerator%");ee&&T&&(q=T(ee.prototype))}return O[Y]=q,q},F={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},P=sg(),j=FT(),U=P.call(x,Array.prototype.concat),$=P.call(A,Array.prototype.splice),Q=P.call(x,String.prototype.replace),re=P.call(x,String.prototype.slice),ne=P.call(x,RegExp.prototype.exec),se=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,X=function(Y){var q=re(Y,0,1),Z=re(Y,-1);if(q==="%"&&Z!=="%")throw new t("invalid intrinsic syntax, expected closing `%`");if(Z==="%"&&q!=="%")throw new t("invalid intrinsic syntax, expected opening `%`");var ee=[];return Q(Y,se,function(ae,he,xe,we){ee[ee.length]=xe?Q(we,G,"$1"):he||ae}),ee},K=function(Y,q){var Z=Y,ee;if(j(F,Z)&&(ee=F[Z],Z="%"+ee[0]+"%"),j(O,Z)){var ae=O[Z];if(ae===z&&(ae=B(Z)),typeof ae>"u"&&!q)throw new n("intrinsic "+Y+" exists, but is not available. Please file an issue!");return{alias:ee,name:Z,value:ae}}throw new t("intrinsic "+Y+" does not exist!")};V.exports=function(Y,q){if(typeof Y!="string"||Y.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof q!="boolean")throw new n('"allowMissing" argument must be a boolean');if(ne(/^%?[^%]*%?$/,Y)===null)throw new t("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var Z=X(Y),ee=Z.length>0?Z[0]:"",ae=K("%"+ee+"%",q),he=ae.name,xe=ae.value,we=!1,Me=ae.alias;Me&&(ee=Me[0],$(Z,U([0,1],Me)));for(var Se=1,Ie=!0;Se=Z.length){var _e=w(xe,Ve);Ie=!!_e,Ie&&"get"in _e&&!("originalValue"in _e.get)?xe=_e.get:xe=xe[Ve]}else Ie=j(xe,Ve),xe=xe[Ve];Ie&&!we&&(O[he]=xe)}}return xe}}}),Jv=ze({"node_modules/call-bound/index.js"(J,V){"use strict";var p=Bb(),b=Fb(),E=b([p("%String.prototype.indexOf%")]);V.exports=function(l,e){var t=p(l,!!e);return typeof t=="function"&&E(l,".prototype.")>-1?b([t]):t}}}),fB=ze({"node_modules/is-arguments/index.js"(J,V){"use strict";var p=k1()(),b=Jv(),E=b("Object.prototype.toString"),k=function(n){return p&&n&&typeof n=="object"&&Symbol.toStringTag in n?!1:E(n)==="[object Arguments]"},l=function(n){return k(n)?!0:n!==null&&typeof n=="object"&&"length"in n&&typeof n.length=="number"&&n.length>=0&&E(n)!=="[object Array]"&&"callee"in n&&E(n.callee)==="[object Function]"},e=function(){return k(arguments)}();k.isLegacyArguments=l,V.exports=e?k:l}}),hB=ze({"node_modules/is-regex/index.js"(J,V){"use strict";var p=Jv(),b=k1()(),E=FT(),k=Kv(),l;b?(e=p("RegExp.prototype.exec"),t={},n=function(){throw t},r={toString:n,valueOf:n},typeof Symbol.toPrimitive=="symbol"&&(r[Symbol.toPrimitive]=n),l=function(c){if(!c||typeof c!="object")return!1;var m=k(c,"lastIndex"),h=m&&E(m,"value");if(!h)return!1;try{e(c,r)}catch(v){return v===t}}):(a=p("Object.prototype.toString"),o="[object RegExp]",l=function(c){return!c||typeof c!="object"&&typeof c!="function"?!1:a(c)===o});var e,t,n,r,a,o;V.exports=l}}),dB=ze({"node_modules/safe-regex-test/index.js"(J,V){"use strict";var p=Jv(),b=hB(),E=p("RegExp.prototype.exec"),k=og();V.exports=function(e){if(!b(e))throw new k("`regex` must be a RegExp");return function(n){return E(e,n)!==null}}}}),pB=ze({"node_modules/generator-function/index.js"(J,V){"use strict";var p=function*(){}.constructor;V.exports=()=>p}}),vB=ze({"node_modules/is-generator-function/index.js"(J,V){"use strict";var p=Jv(),b=dB(),E=b(/^\s*(?:function)?\*/),k=k1()(),l=zb(),e=p("Object.prototype.toString"),t=p("Function.prototype.toString"),n=pB();V.exports=function(a){if(typeof a!="function")return!1;if(E(t(a)))return!0;if(!k){var o=e(a);return o==="[object GeneratorFunction]"}if(!l)return!1;var s=n();return s&&l(a)===s.prototype}}}),mB=ze({"node_modules/is-callable/index.js"(J,V){"use strict";var p=Function.prototype.toString,b=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,E,k;if(typeof b=="function"&&typeof Object.defineProperty=="function")try{E=Object.defineProperty({},"length",{get:function(){throw k}}),k={},b(function(){throw 42},null,E)}catch(w){w!==k&&(b=null)}else b=null;var l=/^\s*class\b/,e=function(S){try{var M=p.call(S);return l.test(M)}catch{return!1}},t=function(S){try{return e(S)?!1:(p.call(S),!0)}catch{return!1}},n=Object.prototype.toString,r="[object Object]",a="[object Function]",o="[object GeneratorFunction]",s="[object HTMLAllCollection]",c="[object HTML document.all class]",m="[object HTMLCollection]",h=typeof Symbol=="function"&&!!Symbol.toStringTag,v=!(0 in[,]),g=function(){return!1};typeof document=="object"&&(i=document.all,n.call(i)===n.call(document.all)&&(g=function(S){if((v||!S)&&(typeof S>"u"||typeof S=="object"))try{var M=n.call(S);return(M===s||M===c||M===m||M===r)&&S("")==null}catch{}return!1}));var i;V.exports=b?function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;try{b(S,null,E)}catch(M){if(M!==k)return!1}return!e(S)&&t(S)}:function(S){if(g(S))return!0;if(!S||typeof S!="function"&&typeof S!="object")return!1;if(h)return t(S);if(e(S))return!1;var M=n.call(S);return M!==a&&M!==o&&!/^\[object HTML/.test(M)?!1:t(S)}}}),gB=ze({"node_modules/for-each/index.js"(J,V){"use strict";var p=mB(),b=Object.prototype.toString,E=Object.prototype.hasOwnProperty,k=function(r,a,o){for(var s=0,c=r.length;s=3&&(s=o),t(r)?k(r,a,s):typeof r=="string"?l(r,a,s):e(r,a,s)}}}),yB=ze({"node_modules/possible-typed-array-names/index.js"(J,V){"use strict";V.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]}}),_B=ze({"node_modules/available-typed-arrays/index.js"(J,V){"use strict";var p=yB(),b=typeof globalThis>"u"?window:globalThis;V.exports=function(){for(var k=[],l=0;l3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new E("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new E("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new E("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new E("`loose`, if provided, must be a boolean");var r=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,c=!!k&&k(e,t);if(p)p(e,t,{configurable:o===null&&c?c.configurable:!o,enumerable:r===null&&c?c.enumerable:!r,value:n,writable:a===null&&c?c.writable:!a});else if(s||!r&&!a&&!o)e[t]=n;else throw new b("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}}}),BT=ze({"node_modules/has-property-descriptors/index.js"(J,V){"use strict";var p=C1(),b=function(){return!!p};b.hasArrayLengthDefineBug=function(){if(!p)return null;try{return p([],"length",{value:1}).length!==1}catch{return!0}},V.exports=b}}),xB=ze({"node_modules/set-function-length/index.js"(J,V){"use strict";var p=Bb(),b=zT(),E=BT()(),k=Kv(),l=og(),e=p("%Math.floor%");V.exports=function(n,r){if(typeof n!="function")throw new l("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||e(r)!==r)throw new l("`length` must be a positive 32-bit integer");var a=arguments.length>2&&!!arguments[2],o=!0,s=!0;if("length"in n&&k){var c=k(n,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(s=!1)}return(o||s||!a)&&(E?b(n,"length",r,!0,!0):b(n,"length",r)),n}}}),bB=ze({"node_modules/call-bind-apply-helpers/applyBind.js"(J,V){"use strict";var p=sg(),b=Db(),E=DT();V.exports=function(){return E(p,b,arguments)}}}),L1=ze({"node_modules/call-bind/index.js"(J,V){"use strict";var p=xB(),b=C1(),E=Fb(),k=bB();V.exports=function(e){var t=E(arguments),n=1+e.length-(arguments.length-1);return p(t,n>0?n:0,!0)},b?b(V.exports,"apply",{value:k}):V.exports.apply=k}}),OT=ze({"node_modules/which-typed-array/index.js"(J,V){"use strict";var p=gB(),b=_B(),E=L1(),k=Jv(),l=Kv(),e=zb(),t=k("Object.prototype.toString"),n=k1()(),r=typeof globalThis>"u"?window:globalThis,a=b(),o=k("String.prototype.slice"),s=k("Array.prototype.indexOf",!0)||function(i,w){for(var S=0;S-1}V.exports=function(i){if(!i||typeof i!="object")return!1;if(!n){var w=o(t(i),8,-1);return v(w)?w:w!=="Object"?!1:h(i)}return l?m(i):null}}}),wB=ze({"node_modules/is-typed-array/index.js"(J,V){"use strict";var p=OT();V.exports=function(E){return!!p(E)}}}),NT=ze({"node_modules/util/support/types.js"(J){"use strict";var V=fB(),p=vB(),b=OT(),E=wB();function k(we){return we.call.bind(we)}var l=typeof BigInt<"u",e=typeof Symbol<"u",t=k(Object.prototype.toString),n=k(Number.prototype.valueOf),r=k(String.prototype.valueOf),a=k(Boolean.prototype.valueOf);l&&(o=k(BigInt.prototype.valueOf));var o;e&&(s=k(Symbol.prototype.valueOf));var s;function c(we,Me){if(typeof we!="object")return!1;try{return Me(we),!0}catch{return!1}}J.isArgumentsObject=V,J.isGeneratorFunction=p,J.isTypedArray=E;function m(we){return typeof Promise<"u"&&we instanceof Promise||we!==null&&typeof we=="object"&&typeof we.then=="function"&&typeof we.catch=="function"}J.isPromise=m;function h(we){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(we):E(we)||$(we)}J.isArrayBufferView=h;function v(we){return b(we)==="Uint8Array"}J.isUint8Array=v;function g(we){return b(we)==="Uint8ClampedArray"}J.isUint8ClampedArray=g;function i(we){return b(we)==="Uint16Array"}J.isUint16Array=i;function w(we){return b(we)==="Uint32Array"}J.isUint32Array=w;function S(we){return b(we)==="Int8Array"}J.isInt8Array=S;function M(we){return b(we)==="Int16Array"}J.isInt16Array=M;function C(we){return b(we)==="Int32Array"}J.isInt32Array=C;function _(we){return b(we)==="Float32Array"}J.isFloat32Array=_;function T(we){return b(we)==="Float64Array"}J.isFloat64Array=T;function f(we){return b(we)==="BigInt64Array"}J.isBigInt64Array=f;function u(we){return b(we)==="BigUint64Array"}J.isBigUint64Array=u;function A(we){return t(we)==="[object Map]"}A.working=typeof Map<"u"&&A(new Map);function x(we){return typeof Map>"u"?!1:A.working?A(we):we instanceof Map}J.isMap=x;function z(we){return t(we)==="[object Set]"}z.working=typeof Set<"u"&&z(new Set);function I(we){return typeof Set>"u"?!1:z.working?z(we):we instanceof Set}J.isSet=I;function O(we){return t(we)==="[object WeakMap]"}O.working=typeof WeakMap<"u"&&O(new WeakMap);function D(we){return typeof WeakMap>"u"?!1:O.working?O(we):we instanceof WeakMap}J.isWeakMap=D;function B(we){return t(we)==="[object WeakSet]"}B.working=typeof WeakSet<"u"&&B(new WeakSet);function F(we){return B(we)}J.isWeakSet=F;function P(we){return t(we)==="[object ArrayBuffer]"}P.working=typeof ArrayBuffer<"u"&&P(new ArrayBuffer);function j(we){return typeof ArrayBuffer>"u"?!1:P.working?P(we):we instanceof ArrayBuffer}J.isArrayBuffer=j;function U(we){return t(we)==="[object DataView]"}U.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&U(new DataView(new ArrayBuffer(1),0,1));function $(we){return typeof DataView>"u"?!1:U.working?U(we):we instanceof DataView}J.isDataView=$;var Q=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function re(we){return t(we)==="[object SharedArrayBuffer]"}function ne(we){return typeof Q>"u"?!1:(typeof re.working>"u"&&(re.working=re(new Q)),re.working?re(we):we instanceof Q)}J.isSharedArrayBuffer=ne;function se(we){return t(we)==="[object AsyncFunction]"}J.isAsyncFunction=se;function G(we){return t(we)==="[object Map Iterator]"}J.isMapIterator=G;function X(we){return t(we)==="[object Set Iterator]"}J.isSetIterator=X;function K(we){return t(we)==="[object Generator]"}J.isGeneratorObject=K;function H(we){return t(we)==="[object WebAssembly.Module]"}J.isWebAssemblyCompiledModule=H;function Y(we){return c(we,n)}J.isNumberObject=Y;function q(we){return c(we,r)}J.isStringObject=q;function Z(we){return c(we,a)}J.isBooleanObject=Z;function ee(we){return l&&c(we,o)}J.isBigIntObject=ee;function ae(we){return e&&c(we,s)}J.isSymbolObject=ae;function he(we){return Y(we)||q(we)||Z(we)||ee(we)||ae(we)}J.isBoxedPrimitive=he;function xe(we){return typeof Uint8Array<"u"&&(j(we)||ne(we))}J.isAnyArrayBuffer=xe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(we){Object.defineProperty(J,we,{enumerable:!1,value:function(){throw new Error(we+" is not supported in userland")}})})}}),jT=ze({"node_modules/util/support/isBufferBrowser.js"(J,V){V.exports=function(b){return b&&typeof b=="object"&&typeof b.copy=="function"&&typeof b.fill=="function"&&typeof b.readUInt8=="function"}}}),UT=ze({"(disabled):node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function($){for(var Q=Object.keys($),re={},ne=0;ne=ne)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),G=re[Q];Q"u")return function(){return J.deprecate(U,$).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error($);process.traceDeprecation?console.trace($):console.error($),Q=!0}return U.apply(this,arguments)}return re};var b={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!b[U])if(E.test(U)){var $=process.pid;b[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,$,Q)}}else b[U]=function(){};return b[U]};function l(U,$){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v($)?Q.showHidden=$:$&&J._extend(Q,$),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,$){var Q=l.styles[$];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,$){return U}function n(U){var $={};return U.forEach(function(Q,re){$[Q]=!0}),$}function r(U,$,Q){if(U.customInspect&&$&&A($.inspect)&&$.inspect!==J.inspect&&!($.constructor&&$.constructor.prototype===$)){var re=$.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,$);if(ne)return ne;var se=Object.keys($),G=n(se);if(U.showHidden&&(se=Object.getOwnPropertyNames($)),u($)&&(se.indexOf("message")>=0||se.indexOf("description")>=0))return o($);if(se.length===0){if(A($)){var X=$.name?": "+$.name:"";return U.stylize("[Function"+X+"]","special")}if(_($))return U.stylize(RegExp.prototype.toString.call($),"regexp");if(f($))return U.stylize(Date.prototype.toString.call($),"date");if(u($))return o($)}var K="",H=!1,Y=["{","}"];if(h($)&&(H=!0,Y=["[","]"]),A($)){var q=$.name?": "+$.name:"";K=" [Function"+q+"]"}if(_($)&&(K=" "+RegExp.prototype.toString.call($)),f($)&&(K=" "+Date.prototype.toUTCString.call($)),u($)&&(K=" "+o($)),se.length===0&&(!H||$.length==0))return Y[0]+K+Y[1];if(Q<0)return _($)?U.stylize(RegExp.prototype.toString.call($),"regexp"):U.stylize("[Object]","special");U.seen.push($);var Z;return H?Z=s(U,$,Q,G,se):Z=se.map(function(ee){return c(U,$,Q,G,ee,H)}),U.seen.pop(),m(Z,K,Y)}function a(U,$){if(C($))return U.stylize("undefined","undefined");if(S($)){var Q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w($))return U.stylize(""+$,"number");if(v($))return U.stylize(""+$,"boolean");if(g($))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,$,Q,re,ne){for(var se=[],G=0,X=$.length;G-1&&(se?X=X.split(` +`).map(function(H){return" "+H}).join(` +`).slice(2):X=` +`+X.split(` +`).map(function(H){return" "+H}).join(` +`))):X=U.stylize("[Circular]","special")),C(G)){if(se&&ne.match(/^\d+$/))return X;G=JSON.stringify(""+ne),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=U.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=U.stylize(G,"string"))}return G+": "+X}function m(U,$,Q){var re=0,ne=U.reduce(function(se,G){return re++,G.indexOf(` +`)>=0&&re++,se+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+($===""?"":$+` + `)+" "+U.join(`, + `)+" "+Q[1]:Q[0]+$+" "+U.join(", ")+" "+Q[1]}J.types=NT();function h(U){return Array.isArray(U)}J.isArray=h;function v(U){return typeof U=="boolean"}J.isBoolean=v;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function x(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=x,J.isBuffer=jT();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var U=new Date,$=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),O[U.getMonth()],$].join(" ")}J.log=function(){console.log("%s - %s",D(),J.format.apply(J,arguments))},J.inherits=op(),J._extend=function(U,$){if(!$||!T($))return U;for(var Q=Object.keys($),re=Q.length;re--;)U[Q[re]]=$[Q[re]];return U};function B(U,$){return Object.prototype.hasOwnProperty.call(U,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var Q=$[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,se=new Promise(function(K,H){re=K,ne=H}),G=[],X=0;X0?this.tail.next=i:this.head=i,this.tail=i,++this.length}},{key:"unshift",value:function(g){var i={data:g,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length}},{key:"shift",value:function(){if(this.length!==0){var g=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,g}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(g){if(this.length===0)return"";for(var i=this.head,w=""+i.data;i=i.next;)w+=g+i.data;return w}},{key:"concat",value:function(g){if(this.length===0)return a.alloc(0);for(var i=a.allocUnsafe(g>>>0),w=this.head,S=0;w;)m(w.data,i,S),S+=w.data.length,w=w.next;return i}},{key:"consume",value:function(g,i){var w;return gM.length?M.length:g;if(C===M.length?S+=M:S+=M.slice(0,g),g-=C,g===0){C===M.length?(++w,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=M.slice(C));break}++w}return this.length-=w,S}},{key:"_getBuffer",value:function(g){var i=a.allocUnsafe(g),w=this.head,S=1;for(w.data.copy(i),g-=w.data.length;w=w.next;){var M=w.data,C=g>M.length?M.length:g;if(M.copy(i,i.length-g,0,C),g-=C,g===0){C===M.length?(++S,w.next?this.head=w.next:this.head=this.tail=null):(this.head=w,w.data=M.slice(C));break}++S}return this.length-=S,i}},{key:c,value:function(g,i){return s(this,b(b({},i),{},{depth:0,customInspect:!1}))}}]),h}()}}),qT=ze({"node_modules/readable-stream/lib/internal/streams/destroy.js"(J,V){"use strict";function p(t,n){var r=this,a=this._readableState&&this._readableState.destroyed,o=this._writableState&&this._writableState.destroyed;return a||o?(n?n(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(l,this,t)):process.nextTick(l,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(s){!n&&s?r._writableState?r._writableState.errorEmitted?process.nextTick(E,r):(r._writableState.errorEmitted=!0,process.nextTick(b,r,s)):process.nextTick(b,r,s):n?(process.nextTick(E,r),n(s)):process.nextTick(E,r)}),this)}function b(t,n){l(t,n),E(t)}function E(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close")}function k(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function l(t,n){t.emit("error",n)}function e(t,n){var r=t._readableState,a=t._writableState;r&&r.autoDestroy||a&&a.autoDestroy?t.destroy(n):t.emit("error",n)}V.exports={destroy:p,undestroy:k,errorOrDestroy:e}}}),Qv=ze({"node_modules/readable-stream/errors-browser.js"(J,V){"use strict";function p(n,r){n.prototype=Object.create(r.prototype),n.prototype.constructor=n,n.__proto__=r}var b={};function E(n,r,a){a||(a=Error);function o(c,m,h){return typeof r=="string"?r:r(c,m,h)}var s=function(c){p(m,c);function m(h,v,g){return c.call(this,o(h,v,g))||this}return m}(a);s.prototype.name=a.name,s.prototype.code=n,b[n]=s}function k(n,r){if(Array.isArray(n)){var a=n.length;return n=n.map(function(o){return String(o)}),a>2?"one of ".concat(r," ").concat(n.slice(0,a-1).join(", "),", or ")+n[a-1]:a===2?"one of ".concat(r," ").concat(n[0]," or ").concat(n[1]):"of ".concat(r," ").concat(n[0])}else return"of ".concat(r," ").concat(String(n))}function l(n,r,a){return n.substr(!a||a<0?0:+a,r.length)===r}function e(n,r,a){return(a===void 0||a>n.length)&&(a=n.length),n.substring(a-r.length,a)===r}function t(n,r,a){return typeof a!="number"&&(a=0),a+r.length>n.length?!1:n.indexOf(r,a)!==-1}E("ERR_INVALID_OPT_VALUE",function(n,r){return'The value "'+r+'" is invalid for option "'+n+'"'},TypeError),E("ERR_INVALID_ARG_TYPE",function(n,r,a){var o;typeof r=="string"&&l(r,"not ")?(o="must not be",r=r.replace(/^not /,"")):o="must be";var s;if(e(n," argument"))s="The ".concat(n," ").concat(o," ").concat(k(r,"type"));else{var c=t(n,".")?"property":"argument";s='The "'.concat(n,'" ').concat(c," ").concat(o," ").concat(k(r,"type"))}return s+=". Received type ".concat(typeof a),s},TypeError),E("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),E("ERR_METHOD_NOT_IMPLEMENTED",function(n){return"The "+n+" method is not implemented"}),E("ERR_STREAM_PREMATURE_CLOSE","Premature close"),E("ERR_STREAM_DESTROYED",function(n){return"Cannot call "+n+" after a stream was destroyed"}),E("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),E("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),E("ERR_STREAM_WRITE_AFTER_END","write after end"),E("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),E("ERR_UNKNOWN_ENCODING",function(n){return"Unknown encoding: "+n},TypeError),E("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),V.exports.codes=b}}),VT=ze({"node_modules/readable-stream/lib/internal/streams/state.js"(J,V){"use strict";var p=Qv().codes.ERR_INVALID_OPT_VALUE;function b(k,l,e){return k.highWaterMark!=null?k.highWaterMark:l?k[e]:null}function E(k,l,e,t){var n=b(l,t,e);if(n!=null){if(!(isFinite(n)&&Math.floor(n)===n)||n<0){var r=t?e:"highWaterMark";throw new p(r,n)}return Math.floor(n)}return k.objectMode?16:16*1024}V.exports={getHighWaterMark:E}}}),AB=ze({"node_modules/util-deprecate/browser.js"(J,V){V.exports=p;function p(E,k){if(b("noDeprecation"))return E;var l=!1;function e(){if(!l){if(b("throwDeprecation"))throw new Error(k);b("traceDeprecation")?console.trace(k):console.warn(k),l=!0}return E.apply(this,arguments)}return e}function b(E){try{if(!window.localStorage)return!1}catch{return!1}var k=window.localStorage[E];return k==null?!1:String(k).toLowerCase()==="true"}}}),GT=ze({"node_modules/readable-stream/lib/_stream_writable.js"(J,V){"use strict";V.exports=f;function p(G){var X=this;this.next=null,this.entry=null,this.finish=function(){se(X,G)}}var b;f.WritableState=_;var E={deprecate:AB()},k=LT(),l=$v().Buffer,e=(typeof window<"u"||typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function t(G){return l.from(G)}function n(G){return l.isBuffer(G)||G instanceof e}var r=qT(),a=VT(),o=a.getHighWaterMark,s=Qv().codes,c=s.ERR_INVALID_ARG_TYPE,m=s.ERR_METHOD_NOT_IMPLEMENTED,h=s.ERR_MULTIPLE_CALLBACK,v=s.ERR_STREAM_CANNOT_PIPE,g=s.ERR_STREAM_DESTROYED,i=s.ERR_STREAM_NULL_VALUES,w=s.ERR_STREAM_WRITE_AFTER_END,S=s.ERR_UNKNOWN_ENCODING,M=r.errorOrDestroy;op()(f,k);function C(){}function _(G,X,K){b=b||e0(),G=G||{},typeof K!="boolean"&&(K=X instanceof b),this.objectMode=!!G.objectMode,K&&(this.objectMode=this.objectMode||!!G.writableObjectMode),this.highWaterMark=o(this,G,"writableHighWaterMark",K),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var H=G.decodeStrings===!1;this.decodeStrings=!H,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Y){B(X,Y)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new p(this)}_.prototype.getBuffer=function(){for(var X=this.bufferedRequest,K=[];X;)K.push(X),X=X.next;return K},function(){try{Object.defineProperty(_.prototype,"buffer",{get:E.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var T;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(f,Symbol.hasInstance,{value:function(X){return T.call(this,X)?!0:this!==f?!1:X&&X._writableState instanceof _}})):T=function(X){return X instanceof this};function f(G){b=b||e0();var X=this instanceof b;if(!X&&!T.call(f,this))return new f(G);this._writableState=new _(G,this,X),this.writable=!0,G&&(typeof G.write=="function"&&(this._write=G.write),typeof G.writev=="function"&&(this._writev=G.writev),typeof G.destroy=="function"&&(this._destroy=G.destroy),typeof G.final=="function"&&(this._final=G.final)),k.call(this)}f.prototype.pipe=function(){M(this,new v)};function u(G,X){var K=new w;M(G,K),process.nextTick(X,K)}function A(G,X,K,H){var Y;return K===null?Y=new i:typeof K!="string"&&!X.objectMode&&(Y=new c("chunk",["string","Buffer"],K)),Y?(M(G,Y),process.nextTick(H,Y),!1):!0}f.prototype.write=function(G,X,K){var H=this._writableState,Y=!1,q=!H.objectMode&&n(G);return q&&!l.isBuffer(G)&&(G=t(G)),typeof X=="function"&&(K=X,X=null),q?X="buffer":X||(X=H.defaultEncoding),typeof K!="function"&&(K=C),H.ending?u(this,K):(q||A(this,H,G,K))&&(H.pendingcb++,Y=z(this,H,q,G,X,K)),Y},f.prototype.cork=function(){this._writableState.corked++},f.prototype.uncork=function(){var G=this._writableState;G.corked&&(G.corked--,!G.writing&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&j(this,G))},f.prototype.setDefaultEncoding=function(X){if(typeof X=="string"&&(X=X.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((X+"").toLowerCase())>-1))throw new S(X);return this._writableState.defaultEncoding=X,this},Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(G,X,K){return!G.objectMode&&G.decodeStrings!==!1&&typeof X=="string"&&(X=l.from(X,K)),X}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function z(G,X,K,H,Y,q){if(!K){var Z=x(X,H,Y);H!==Z&&(K=!0,Y="buffer",H=Z)}var ee=X.objectMode?1:H.length;X.length+=ee;var ae=X.length>5===6?2:g>>4===14?3:g>>3===30?4:g>>6===2?-1:-2}function e(g,i,w){var S=i.length-1;if(S=0?(M>0&&(g.lastNeed=M-1),M):--S=0?(M>0&&(g.lastNeed=M-2),M):--S=0?(M>0&&(M===2?M=0:g.lastNeed=M-3),M):0))}function t(g,i,w){if((i[0]&192)!==128)return g.lastNeed=0,"\uFFFD";if(g.lastNeed>1&&i.length>1){if((i[1]&192)!==128)return g.lastNeed=1,"\uFFFD";if(g.lastNeed>2&&i.length>2&&(i[2]&192)!==128)return g.lastNeed=2,"\uFFFD"}}function n(g){var i=this.lastTotal-this.lastNeed,w=t(this,g,i);if(w!==void 0)return w;if(this.lastNeed<=g.length)return g.copy(this.lastChar,i,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);g.copy(this.lastChar,i,0,g.length),this.lastNeed-=g.length}function r(g,i){var w=e(this,g,i);if(!this.lastNeed)return g.toString("utf8",i);this.lastTotal=w;var S=g.length-(w-this.lastNeed);return g.copy(this.lastChar,0,S),g.toString("utf8",i,S)}function a(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+"\uFFFD":i}function o(g,i){if((g.length-i)%2===0){var w=g.toString("utf16le",i);if(w){var S=w.charCodeAt(w.length-1);if(S>=55296&&S<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1],w.slice(0,-1)}return w}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=g[g.length-1],g.toString("utf16le",i,g.length-1)}function s(g){var i=g&&g.length?this.write(g):"";if(this.lastNeed){var w=this.lastTotal-this.lastNeed;return i+this.lastChar.toString("utf16le",0,w)}return i}function c(g,i){var w=(g.length-i)%3;return w===0?g.toString("base64",i):(this.lastNeed=3-w,this.lastTotal=3,w===1?this.lastChar[0]=g[g.length-1]:(this.lastChar[0]=g[g.length-2],this.lastChar[1]=g[g.length-1]),g.toString("base64",i,g.length-w))}function m(g){var i=g&&g.length?this.write(g):"";return this.lastNeed?i+this.lastChar.toString("base64",0,3-this.lastNeed):i}function h(g){return g.toString(this.encoding)}function v(g){return g&&g.length?this.write(g):""}}}),Ob=ze({"node_modules/readable-stream/lib/internal/streams/end-of-stream.js"(J,V){"use strict";var p=Qv().codes.ERR_STREAM_PREMATURE_CLOSE;function b(e){var t=!1;return function(){if(!t){t=!0;for(var n=arguments.length,r=new Array(n),a=0;a0)if(typeof ee!="string"&&!we.objectMode&&Object.getPrototypeOf(ee)!==l.prototype&&(ee=t(ee)),he)we.endEmitted?_(Z,new w):z(Z,we,ee,!0);else if(we.ended)_(Z,new g);else{if(we.destroyed)return!1;we.reading=!1,we.decoder&&!ae?(ee=we.decoder.write(ee),we.objectMode||ee.length!==0?z(Z,we,ee,!1):U(Z,we)):z(Z,we,ee,!1)}else he||(we.reading=!1,U(Z,we))}return!we.ended&&(we.length=O?Z=O:(Z--,Z|=Z>>>1,Z|=Z>>>2,Z|=Z>>>4,Z|=Z>>>8,Z|=Z>>>16,Z++),Z}function B(Z,ee){return Z<=0||ee.length===0&&ee.ended?0:ee.objectMode?1:Z!==Z?ee.flowing&&ee.length?ee.buffer.head.data.length:ee.length:(Z>ee.highWaterMark&&(ee.highWaterMark=D(Z)),Z<=ee.length?Z:ee.ended?ee.length:(ee.needReadable=!0,0))}A.prototype.read=function(Z){a("read",Z),Z=parseInt(Z,10);var ee=this._readableState,ae=Z;if(Z!==0&&(ee.emittedReadable=!1),Z===0&&ee.needReadable&&((ee.highWaterMark!==0?ee.length>=ee.highWaterMark:ee.length>0)||ee.ended))return a("read: emitReadable",ee.length,ee.ended),ee.length===0&&ee.ended?H(this):P(this),null;if(Z=B(Z,ee),Z===0&&ee.ended)return ee.length===0&&H(this),null;var he=ee.needReadable;a("need readable",he),(ee.length===0||ee.length-Z0?xe=K(Z,ee):xe=null,xe===null?(ee.needReadable=ee.length<=ee.highWaterMark,Z=0):(ee.length-=Z,ee.awaitDrain=0),ee.length===0&&(ee.ended||(ee.needReadable=!0),ae!==Z&&ee.ended&&H(this)),xe!==null&&this.emit("data",xe),xe};function F(Z,ee){if(a("onEofChunk"),!ee.ended){if(ee.decoder){var ae=ee.decoder.end();ae&&ae.length&&(ee.buffer.push(ae),ee.length+=ee.objectMode?1:ae.length)}ee.ended=!0,ee.sync?P(Z):(ee.needReadable=!1,ee.emittedReadable||(ee.emittedReadable=!0,j(Z)))}}function P(Z){var ee=Z._readableState;a("emitReadable",ee.needReadable,ee.emittedReadable),ee.needReadable=!1,ee.emittedReadable||(a("emitReadable",ee.flowing),ee.emittedReadable=!0,process.nextTick(j,Z))}function j(Z){var ee=Z._readableState;a("emitReadable_",ee.destroyed,ee.length,ee.ended),!ee.destroyed&&(ee.length||ee.ended)&&(Z.emit("readable"),ee.emittedReadable=!1),ee.needReadable=!ee.flowing&&!ee.ended&&ee.length<=ee.highWaterMark,X(Z)}function U(Z,ee){ee.readingMore||(ee.readingMore=!0,process.nextTick($,Z,ee))}function $(Z,ee){for(;!ee.reading&&!ee.ended&&(ee.length1&&q(he.pipes,Z)!==-1)&&!Ve&&(a("false write response, pause",he.awaitDrain),he.awaitDrain++),ae.pause())}function _e(Ae){a("onerror",Ae),le(),Z.removeListener("error",_e),E(Z,"error")===0&&_(Z,Ae)}f(Z,"error",_e);function ce(){Z.removeListener("finish",ve),le()}Z.once("close",ce);function ve(){a("onfinish"),Z.removeListener("close",ce),le()}Z.once("finish",ve);function le(){a("unpipe"),ae.unpipe(Z)}return Z.emit("pipe",ae),he.flowing||(a("pipe resume"),ae.resume()),Z};function Q(Z){return function(){var ae=Z._readableState;a("pipeOnDrain",ae.awaitDrain),ae.awaitDrain&&ae.awaitDrain--,ae.awaitDrain===0&&E(Z,"data")&&(ae.flowing=!0,X(Z))}}A.prototype.unpipe=function(Z){var ee=this._readableState,ae={hasUnpiped:!1};if(ee.pipesCount===0)return this;if(ee.pipesCount===1)return Z&&Z!==ee.pipes?this:(Z||(Z=ee.pipes),ee.pipes=null,ee.pipesCount=0,ee.flowing=!1,Z&&Z.emit("unpipe",this,ae),this);if(!Z){var he=ee.pipes,xe=ee.pipesCount;ee.pipes=null,ee.pipesCount=0,ee.flowing=!1;for(var we=0;we0,he.flowing!==!1&&this.resume()):Z==="readable"&&!he.endEmitted&&!he.readableListening&&(he.readableListening=he.needReadable=!0,he.flowing=!1,he.emittedReadable=!1,a("on readable",he.length,he.reading),he.length?P(this):he.reading||process.nextTick(ne,this)),ae},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(Z,ee){var ae=k.prototype.removeListener.call(this,Z,ee);return Z==="readable"&&process.nextTick(re,this),ae},A.prototype.removeAllListeners=function(Z){var ee=k.prototype.removeAllListeners.apply(this,arguments);return(Z==="readable"||Z===void 0)&&process.nextTick(re,this),ee};function re(Z){var ee=Z._readableState;ee.readableListening=Z.listenerCount("readable")>0,ee.resumeScheduled&&!ee.paused?ee.flowing=!0:Z.listenerCount("data")>0&&Z.resume()}function ne(Z){a("readable nexttick read 0"),Z.read(0)}A.prototype.resume=function(){var Z=this._readableState;return Z.flowing||(a("resume"),Z.flowing=!Z.readableListening,se(this,Z)),Z.paused=!1,this};function se(Z,ee){ee.resumeScheduled||(ee.resumeScheduled=!0,process.nextTick(G,Z,ee))}function G(Z,ee){a("resume",ee.reading),ee.reading||Z.read(0),ee.resumeScheduled=!1,Z.emit("resume"),X(Z),ee.flowing&&!ee.reading&&Z.read(0)}A.prototype.pause=function(){return a("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(a("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function X(Z){var ee=Z._readableState;for(a("flow",ee.flowing);ee.flowing&&Z.read()!==null;);}A.prototype.wrap=function(Z){var ee=this,ae=this._readableState,he=!1;Z.on("end",function(){if(a("wrapped end"),ae.decoder&&!ae.ended){var Me=ae.decoder.end();Me&&Me.length&&ee.push(Me)}ee.push(null)}),Z.on("data",function(Me){if(a("wrapped data"),ae.decoder&&(Me=ae.decoder.write(Me)),!(ae.objectMode&&Me==null)&&!(!ae.objectMode&&(!Me||!Me.length))){var Se=ee.push(Me);Se||(he=!0,Z.pause())}});for(var xe in Z)this[xe]===void 0&&typeof Z[xe]=="function"&&(this[xe]=function(Se){return function(){return Z[Se].apply(Z,arguments)}}(xe));for(var we=0;we=ee.length?(ee.decoder?ae=ee.buffer.join(""):ee.buffer.length===1?ae=ee.buffer.first():ae=ee.buffer.concat(ee.length),ee.buffer.clear()):ae=ee.buffer.consume(Z,ee.decoder),ae}function H(Z){var ee=Z._readableState;a("endReadable",ee.endEmitted),ee.endEmitted||(ee.ended=!0,process.nextTick(Y,ee,Z))}function Y(Z,ee){if(a("endReadableNT",Z.endEmitted,Z.length),!Z.endEmitted&&Z.length===0&&(Z.endEmitted=!0,ee.readable=!1,ee.emit("end"),Z.autoDestroy)){var ae=ee._writableState;(!ae||ae.autoDestroy&&ae.finished)&&ee.destroy()}}typeof Symbol=="function"&&(A.from=function(Z,ee){return C===void 0&&(C=EB()),C(A,Z,ee)});function q(Z,ee){for(var ae=0,he=Z.length;ae0;return n(w,M,C,function(_){g||(g=_),_&&i.forEach(r),!M&&(i.forEach(r),v(g))})});return m.reduce(a)}V.exports=s}}),LB=ze({"node_modules/stream-browserify/index.js"(J,V){V.exports=E;var p=jv().EventEmitter,b=op();b(E,p),E.Readable=WT(),E.Writable=GT(),E.Duplex=e0(),E.Transform=YT(),E.PassThrough=kB(),E.finished=Ob(),E.pipeline=CB(),E.Stream=E;function E(){p.call(this)}E.prototype.pipe=function(k,l){var e=this;function t(m){k.writable&&k.write(m)===!1&&e.pause&&e.pause()}e.on("data",t);function n(){e.readable&&e.resume&&e.resume()}k.on("drain",n),!k._isStdio&&(!l||l.end!==!1)&&(e.on("end",a),e.on("close",o));var r=!1;function a(){r||(r=!0,k.end())}function o(){r||(r=!0,typeof k.destroy=="function"&&k.destroy())}function s(m){if(c(),p.listenerCount(this,"error")===0)throw m}e.on("error",s),k.on("error",s);function c(){e.removeListener("data",t),k.removeListener("drain",n),e.removeListener("end",a),e.removeListener("close",o),e.removeListener("error",s),k.removeListener("error",s),e.removeListener("end",c),e.removeListener("close",c),k.removeListener("close",c)}return e.on("end",c),e.on("close",c),k.on("close",c),k.emit("pipe",e),k}}}),lg=ze({"node_modules/util/util.js"(J){var V=Object.getOwnPropertyDescriptors||function($){for(var Q=Object.keys($),re={},ne=0;ne=ne)return X;switch(X){case"%s":return String(re[Q++]);case"%d":return Number(re[Q++]);case"%j":try{return JSON.stringify(re[Q++])}catch{return"[Circular]"}default:return X}}),G=re[Q];Q"u")return function(){return J.deprecate(U,$).apply(this,arguments)};var Q=!1;function re(){if(!Q){if(process.throwDeprecation)throw new Error($);process.traceDeprecation?console.trace($):console.error($),Q=!0}return U.apply(this,arguments)}return re};var b={},E=/^$/;k="false",k=k.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),E=new RegExp("^"+k+"$","i");var k;J.debuglog=function(U){if(U=U.toUpperCase(),!b[U])if(E.test(U)){var $=process.pid;b[U]=function(){var Q=J.format.apply(J,arguments);console.error("%s %d: %s",U,$,Q)}}else b[U]=function(){};return b[U]};function l(U,$){var Q={seen:[],stylize:t};return arguments.length>=3&&(Q.depth=arguments[2]),arguments.length>=4&&(Q.colors=arguments[3]),v($)?Q.showHidden=$:$&&J._extend(Q,$),C(Q.showHidden)&&(Q.showHidden=!1),C(Q.depth)&&(Q.depth=2),C(Q.colors)&&(Q.colors=!1),C(Q.customInspect)&&(Q.customInspect=!0),Q.colors&&(Q.stylize=e),r(Q,U,Q.depth)}J.inspect=l,l.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]},l.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function e(U,$){var Q=l.styles[$];return Q?"\x1B["+l.colors[Q][0]+"m"+U+"\x1B["+l.colors[Q][1]+"m":U}function t(U,$){return U}function n(U){var $={};return U.forEach(function(Q,re){$[Q]=!0}),$}function r(U,$,Q){if(U.customInspect&&$&&A($.inspect)&&$.inspect!==J.inspect&&!($.constructor&&$.constructor.prototype===$)){var re=$.inspect(Q,U);return S(re)||(re=r(U,re,Q)),re}var ne=a(U,$);if(ne)return ne;var se=Object.keys($),G=n(se);if(U.showHidden&&(se=Object.getOwnPropertyNames($)),u($)&&(se.indexOf("message")>=0||se.indexOf("description")>=0))return o($);if(se.length===0){if(A($)){var X=$.name?": "+$.name:"";return U.stylize("[Function"+X+"]","special")}if(_($))return U.stylize(RegExp.prototype.toString.call($),"regexp");if(f($))return U.stylize(Date.prototype.toString.call($),"date");if(u($))return o($)}var K="",H=!1,Y=["{","}"];if(h($)&&(H=!0,Y=["[","]"]),A($)){var q=$.name?": "+$.name:"";K=" [Function"+q+"]"}if(_($)&&(K=" "+RegExp.prototype.toString.call($)),f($)&&(K=" "+Date.prototype.toUTCString.call($)),u($)&&(K=" "+o($)),se.length===0&&(!H||$.length==0))return Y[0]+K+Y[1];if(Q<0)return _($)?U.stylize(RegExp.prototype.toString.call($),"regexp"):U.stylize("[Object]","special");U.seen.push($);var Z;return H?Z=s(U,$,Q,G,se):Z=se.map(function(ee){return c(U,$,Q,G,ee,H)}),U.seen.pop(),m(Z,K,Y)}function a(U,$){if(C($))return U.stylize("undefined","undefined");if(S($)){var Q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return U.stylize(Q,"string")}if(w($))return U.stylize(""+$,"number");if(v($))return U.stylize(""+$,"boolean");if(g($))return U.stylize("null","null")}function o(U){return"["+Error.prototype.toString.call(U)+"]"}function s(U,$,Q,re,ne){for(var se=[],G=0,X=$.length;G-1&&(se?X=X.split(` +`).map(function(H){return" "+H}).join(` +`).slice(2):X=` +`+X.split(` +`).map(function(H){return" "+H}).join(` +`))):X=U.stylize("[Circular]","special")),C(G)){if(se&&ne.match(/^\d+$/))return X;G=JSON.stringify(""+ne),G.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(G=G.slice(1,-1),G=U.stylize(G,"name")):(G=G.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),G=U.stylize(G,"string"))}return G+": "+X}function m(U,$,Q){var re=0,ne=U.reduce(function(se,G){return re++,G.indexOf(` +`)>=0&&re++,se+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return ne>60?Q[0]+($===""?"":$+` + `)+" "+U.join(`, + `)+" "+Q[1]:Q[0]+$+" "+U.join(", ")+" "+Q[1]}J.types=NT();function h(U){return Array.isArray(U)}J.isArray=h;function v(U){return typeof U=="boolean"}J.isBoolean=v;function g(U){return U===null}J.isNull=g;function i(U){return U==null}J.isNullOrUndefined=i;function w(U){return typeof U=="number"}J.isNumber=w;function S(U){return typeof U=="string"}J.isString=S;function M(U){return typeof U=="symbol"}J.isSymbol=M;function C(U){return U===void 0}J.isUndefined=C;function _(U){return T(U)&&z(U)==="[object RegExp]"}J.isRegExp=_,J.types.isRegExp=_;function T(U){return typeof U=="object"&&U!==null}J.isObject=T;function f(U){return T(U)&&z(U)==="[object Date]"}J.isDate=f,J.types.isDate=f;function u(U){return T(U)&&(z(U)==="[object Error]"||U instanceof Error)}J.isError=u,J.types.isNativeError=u;function A(U){return typeof U=="function"}J.isFunction=A;function x(U){return U===null||typeof U=="boolean"||typeof U=="number"||typeof U=="string"||typeof U=="symbol"||typeof U>"u"}J.isPrimitive=x,J.isBuffer=jT();function z(U){return Object.prototype.toString.call(U)}function I(U){return U<10?"0"+U.toString(10):U.toString(10)}var O=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function D(){var U=new Date,$=[I(U.getHours()),I(U.getMinutes()),I(U.getSeconds())].join(":");return[U.getDate(),O[U.getMonth()],$].join(" ")}J.log=function(){console.log("%s - %s",D(),J.format.apply(J,arguments))},J.inherits=op(),J._extend=function(U,$){if(!$||!T($))return U;for(var Q=Object.keys($),re=Q.length;re--;)U[Q[re]]=$[Q[re]];return U};function B(U,$){return Object.prototype.hasOwnProperty.call(U,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;J.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var Q=$[F];if(typeof Q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(Q,F,{value:Q,enumerable:!1,writable:!1,configurable:!0}),Q}function Q(){for(var re,ne,se=new Promise(function(K,H){re=K,ne=H}),G=[],X=0;X"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function c(C){return c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(T){return T.__proto__||Object.getPrototypeOf(T)},c(C)}var m={},h,v;function g(C,_,T){T||(T=Error);function f(A,x,z){return typeof _=="string"?_:_(A,x,z)}var u=function(A){t(z,A);var x=r(z);function z(I,O,D){var B;return e(this,z),B=x.call(this,f(I,O,D)),B.code=C,B}return E(z)}(T);m[C]=u}function i(C,_){if(Array.isArray(C)){var T=C.length;return C=C.map(function(f){return String(f)}),T>2?"one of ".concat(_," ").concat(C.slice(0,T-1).join(", "),", or ")+C[T-1]:T===2?"one of ".concat(_," ").concat(C[0]," or ").concat(C[1]):"of ".concat(_," ").concat(C[0])}else return"of ".concat(_," ").concat(String(C))}function w(C,_,T){return C.substr(!T||T<0?0:+T,_.length)===_}function S(C,_,T){return(T===void 0||T>C.length)&&(T=C.length),C.substring(T-_.length,T)===_}function M(C,_,T){return typeof T!="number"&&(T=0),T+_.length>C.length?!1:C.indexOf(_,T)!==-1}g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",function(C,_,T){h===void 0&&(h=jb()),h(typeof C=="string","'name' must be a string");var f;typeof _=="string"&&w(_,"not ")?(f="must not be",_=_.replace(/^not /,"")):f="must be";var u;if(S(C," argument"))u="The ".concat(C," ").concat(f," ").concat(i(_,"type"));else{var A=M(C,".")?"property":"argument";u='The "'.concat(C,'" ').concat(A," ").concat(f," ").concat(i(_,"type"))}return u+=". Received type ".concat(p(T)),u},TypeError),g("ERR_INVALID_ARG_VALUE",function(C,_){var T=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";v===void 0&&(v=lg());var f=v.inspect(_);return f.length>128&&(f="".concat(f.slice(0,128),"...")),"The argument '".concat(C,"' ").concat(T,". Received ").concat(f)},TypeError,RangeError),g("ERR_INVALID_RETURN_VALUE",function(C,_,T){var f;return T&&T.constructor&&T.constructor.name?f="instance of ".concat(T.constructor.name):f="type ".concat(p(T)),"Expected ".concat(C,' to be returned from the "').concat(_,'"')+" function but got ".concat(f,".")},TypeError),g("ERR_MISSING_ARGS",function(){for(var C=arguments.length,_=new Array(C),T=0;T0,"At least one arg needs to be specified");var f="The ",u=_.length;switch(_=_.map(function(A){return'"'.concat(A,'"')}),u){case 1:f+="".concat(_[0]," argument");break;case 2:f+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:f+=_.slice(0,u-1).join(", "),f+=", and ".concat(_[u-1]," arguments");break}return"".concat(f," must be specified")},TypeError),V.exports.codes=m}}),PB=ze({"node_modules/assert/build/internal/assert/assertion_error.js"(J,V){"use strict";function p(j,U){var $=Object.keys(j);if(Object.getOwnPropertySymbols){var Q=Object.getOwnPropertySymbols(j);U&&(Q=Q.filter(function(re){return Object.getOwnPropertyDescriptor(j,re).enumerable})),$.push.apply($,Q)}return $}function b(j){for(var U=1;U"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function v(j){return Function.toString.call(j).indexOf("[native code]")!==-1}function g(j,U){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(Q,re){return Q.__proto__=re,Q},g(j,U)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function($){return $.__proto__||Object.getPrototypeOf($)},i(j)}function w(j){"@babel/helpers - typeof";return w=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(U){return typeof U}:function(U){return U&&typeof Symbol=="function"&&U.constructor===Symbol&&U!==Symbol.prototype?"symbol":typeof U},w(j)}var S=lg(),M=S.inspect,C=XT(),_=C.codes.ERR_INVALID_ARG_TYPE;function T(j,U,$){return($===void 0||$>j.length)&&($=j.length),j.substring($-U.length,$)===U}function f(j,U){if(U=Math.floor(U),j.length==0||U==0)return"";var $=j.length*U;for(U=Math.floor(Math.log(U)/Math.log(2));U;)j+=j,U--;return j+=j.substring(0,$-j.length),j}var u="",A="",x="",z="",I={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},O=10;function D(j){var U=Object.keys(j),$=Object.create(Object.getPrototypeOf(j));return U.forEach(function(Q){$[Q]=j[Q]}),Object.defineProperty($,"message",{value:j.message}),$}function B(j){return M(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function F(j,U,$){var Q="",re="",ne=0,se="",G=!1,X=B(j),K=X.split(` +`),H=B(U).split(` +`),Y=0,q="";if($==="strictEqual"&&w(j)==="object"&&w(U)==="object"&&j!==null&&U!==null&&($="strictEqualObject"),K.length===1&&H.length===1&&K[0]!==H[0]){var Z=K[0].length+H[0].length;if(Z<=O){if((w(j)!=="object"||j===null)&&(w(U)!=="object"||U===null)&&(j!==0||U!==0))return"".concat(I[$],` + +`)+"".concat(K[0]," !== ").concat(H[0],` +`)}else if($!=="strictEqualObject"){var ee=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(Z2&&(q=` + `.concat(f(" ",Y),"^"),Y=0)}}}for(var ae=K[K.length-1],he=H[H.length-1];ae===he&&(Y++<2?se=` + `.concat(ae).concat(se):Q=ae,K.pop(),H.pop(),!(K.length===0||H.length===0));)ae=K[K.length-1],he=H[H.length-1];var xe=Math.max(K.length,H.length);if(xe===0){var we=X.split(` +`);if(we.length>30)for(we[26]="".concat(u,"...").concat(z);we.length>27;)we.pop();return"".concat(I.notIdentical,` + +`).concat(we.join(` `),` -`)}$>3&&(ae=` -`.concat(h,"...").concat(I).concat(ae),U=!0),Y!==""&&(ae=` - `.concat(Y).concat(ae),Y="");var Ae=0,Se=C[q]+` -`.concat(b,"+ actual").concat(I," ").concat(_,"- expected").concat(I),Ce=" ".concat(h,"...").concat(I," Lines skipped");for($=0;$1&&$>2&&(qe>4?(ee+=` -`.concat(h,"...").concat(I),U=!0):qe>3&&(ee+=` - `.concat(V[$-2]),Ae++),ee+=` - `.concat(V[$-1]),Ae++),te=$,Y+=` -`.concat(_,"-").concat(I," ").concat(V[$]),Ae++;else if(V.length<$+1)qe>1&&$>2&&(qe>4?(ee+=` -`.concat(h,"...").concat(I),U=!0):qe>3&&(ee+=` - `.concat(K[$-2]),Ae++),ee+=` - `.concat(K[$-1]),Ae++),te=$,ee+=` -`.concat(b,"+").concat(I," ").concat(K[$]),Ae++;else{var Ue=V[$],xe=K[$],he=xe!==Ue&&(!A(xe,",")||xe.slice(0,-1)!==Ue);he&&A(Ue,",")&&Ue.slice(0,-1)===xe&&(he=!1,xe+=","),he?(qe>1&&$>2&&(qe>4?(ee+=` -`.concat(h,"...").concat(I),U=!0):qe>3&&(ee+=` - `.concat(K[$-2]),Ae++),ee+=` - `.concat(K[$-1]),Ae++),te=$,ee+=` -`.concat(b,"+").concat(I," ").concat(xe),Y+=` -`.concat(_,"-").concat(I," ").concat(Ue),Ae+=2):(ee+=Y,Y="",(qe===1||$===0)&&(ee+=` - `.concat(xe),Ae++))}if(Ae>20&&$30)for(Z[26]="".concat(h,"...").concat(I);Z.length>27;)Z.pop();Z.length===1?te=q.call(this,"".concat(X," ").concat(Z[0])):te=q.call(this,"".concat(X,` +`)}Y>3&&(se=` +`.concat(u,"...").concat(z).concat(se),G=!0),Q!==""&&(se=` + `.concat(Q).concat(se),Q="");var Me=0,Se=I[$]+` +`.concat(A,"+ actual").concat(z," ").concat(x,"- expected").concat(z),Ie=" ".concat(u,"...").concat(z," Lines skipped");for(Y=0;Y1&&Y>2&&(Ve>4?(re+=` +`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` + `.concat(H[Y-2]),Me++),re+=` + `.concat(H[Y-1]),Me++),ne=Y,Q+=` +`.concat(x,"-").concat(z," ").concat(H[Y]),Me++;else if(H.length1&&Y>2&&(Ve>4?(re+=` +`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` + `.concat(K[Y-2]),Me++),re+=` + `.concat(K[Y-1]),Me++),ne=Y,re+=` +`.concat(A,"+").concat(z," ").concat(K[Y]),Me++;else{var Ge=H[Y],ke=K[Y],_e=ke!==Ge&&(!T(ke,",")||ke.slice(0,-1)!==Ge);_e&&T(Ge,",")&&Ge.slice(0,-1)===ke&&(_e=!1,ke+=","),_e?(Ve>1&&Y>2&&(Ve>4?(re+=` +`.concat(u,"...").concat(z),G=!0):Ve>3&&(re+=` + `.concat(K[Y-2]),Me++),re+=` + `.concat(K[Y-1]),Me++),ne=Y,re+=` +`.concat(A,"+").concat(z," ").concat(ke),Q+=` +`.concat(x,"-").concat(z," ").concat(Ge),Me+=2):(re+=Q,Q="",(Ve===1||Y===0)&&(re+=` + `.concat(ke),Me++))}if(Me>20&&Y30)for(Z[26]="".concat(u,"...").concat(z);Z.length>27;)Z.pop();Z.length===1?ne=$.call(this,"".concat(q," ").concat(Z[0])):ne=$.call(this,"".concat(q,` `).concat(Z.join(` `),` -`))}else{var Q=z(K),re="",ce=C[U];U==="notDeepEqual"||U==="notEqual"?(Q="".concat(C[U],` +`))}else{var ee=B(K),ae="",he=I[G];G==="notDeepEqual"||G==="notEqual"?(ee="".concat(I[G],` -`).concat(Q),Q.length>1024&&(Q="".concat(Q.slice(0,1021),"..."))):(re="".concat(z(V)),Q.length>512&&(Q="".concat(Q.slice(0,509),"...")),re.length>512&&(re="".concat(re.slice(0,509),"...")),U==="deepEqual"||U==="equal"?Q="".concat(ce,` +`).concat(ee),ee.length>1024&&(ee="".concat(ee.slice(0,1021),"..."))):(ae="".concat(B(H)),ee.length>512&&(ee="".concat(ee.slice(0,509),"...")),ae.length>512&&(ae="".concat(ae.slice(0,509),"...")),G==="deepEqual"||G==="equal"?ee="".concat(he,` -`).concat(Q,` +`).concat(ee,` should equal -`):re=" ".concat(U," ").concat(re)),te=q.call(this,"".concat(Q).concat(re))}return Error.stackTraceLimit=$,te.generatedMessage=!ae,Object.defineProperty(s(te),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),te.code="ERR_ASSERTION",te.actual=K,te.expected=V,te.operator=U,Error.captureStackTrace&&Error.captureStackTrace(s(te),H),te.stack,te.name="AssertionError",i(te)}return e(Y,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:O,value:function(te,ae){return T(this,v(v({},ae),{},{customInspect:!1,depth:0}))}}]),Y}(c(Error),T.custom);N.exports=k}}),I5=De({"node_modules/object-keys/isArguments.js"(j,N){"use strict";var u=Object.prototype.toString;N.exports=function(w){var S=u.call(w),l=S==="[object Arguments]";return l||(l=S!=="[object Array]"&&w!==null&&typeof w=="object"&&typeof w.length=="number"&&w.length>=0&&u.call(w.callee)==="[object Function]"),l}}}),RF=De({"node_modules/object-keys/implementation.js"(j,N){"use strict";var u;Object.keys||(v=Object.prototype.hasOwnProperty,w=Object.prototype.toString,S=I5(),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),a=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var p=c.constructor;return p&&p.prototype===c},n={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},i=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!n["$"+c]&&v.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!i)return r(c);try{return r(c)}catch{return!1}},u=function(p){var f=p!==null&&typeof p=="object",d=w.call(p)==="[object Function]",y=S(p),o=f&&w.call(p)==="[object String]",x=[];if(!f&&!d&&!y)throw new TypeError("Object.keys called on a non-object");var M=t&&d;if(o&&p.length>0&&!v.call(p,0))for(var T=0;T0)for(var E=0;E2?arguments[2]:{},p=u(s);v&&(p=S.call(p,Object.getOwnPropertySymbols(s)));for(var f=0;foe.length)&&(le=oe.length);for(var ne=0,be=new Array(le);ne10)return!0;for(var le=0;le57)return!0}return oe.length===10&&oe>=Math.pow(2,32)}function k(oe){return Object.keys(oe).filter(D).concat(s(oe).filter(Object.prototype.propertyIsEnumerable.bind(oe)))}function B(oe,le){if(oe===le)return 0;for(var ne=oe.length,be=le.length,Fe=0,Ve=Math.min(ne,be);Fe1?V-1:0),X=1;X1?V-1:0),X=1;X1?V-1:0),X=1;X1?V-1:0),X=1;X=0&&p.call(E.callee)==="[object Function]"),l}}}),RB=ze({"node_modules/object-keys/implementation.js"(J,V){"use strict";var p;Object.keys||(b=Object.prototype.hasOwnProperty,E=Object.prototype.toString,k=ZT(),l=Object.prototype.propertyIsEnumerable,e=!l.call({toString:null},"toString"),t=l.call(function(){},"prototype"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=function(c){var m=c.constructor;return m&&m.prototype===c},a={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},o=function(){if(typeof window>"u")return!1;for(var c in window)try{if(!a["$"+c]&&b.call(window,c)&&window[c]!==null&&typeof window[c]=="object")try{r(window[c])}catch{return!0}}catch{return!0}return!1}(),s=function(c){if(typeof window>"u"||!o)return r(c);try{return r(c)}catch{return!1}},p=function(m){var h=m!==null&&typeof m=="object",v=E.call(m)==="[object Function]",g=k(m),i=h&&E.call(m)==="[object String]",w=[];if(!h&&!v&&!g)throw new TypeError("Object.keys called on a non-object");var S=t&&v;if(i&&m.length>0&&!b.call(m,0))for(var M=0;M0)for(var C=0;C-1?b(t):t}}}),P1=ze({"node_modules/define-properties/index.js"(J,V){"use strict";var p=$T(),b=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",E=Object.prototype.toString,k=Array.prototype.concat,l=zT(),e=function(a){return typeof a=="function"&&E.call(a)==="[object Function]"},t=BT()(),n=function(a,o,s,c){if(o in a){if(c===!0){if(a[o]===s)return}else if(!e(c)||!c())return}t?l(a,o,s,!0):l(a,o,s)},r=function(a,o){var s=arguments.length>2?arguments[2]:{},c=p(o);b&&(c=k.call(c,Object.getOwnPropertySymbols(o)));for(var m=0;mce.length)&&(ve=ce.length);for(var le=0,Ae=new Array(ve);le10)return!0;for(var ve=0;ve57)return!0}return ce.length===10&&ce>=Math.pow(2,32)}function P(ce){return Object.keys(ce).filter(F).concat(s(ce).filter(Object.prototype.propertyIsEnumerable.bind(ce)))}function j(ce,ve){if(ce===ve)return 0;for(var le=ce.length,Ae=ve.length,Be=0,Xe=Math.min(le,Ae);Be1?H-1:0),q=1;q1?H-1:0),q=1;q1?H-1:0),q=1;q1?H-1:0),q=1;q0)return e(n);if(s==="number"&&isNaN(n)===!1)return i.long?a(n):t(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function e(n){if(n=String(n),!(n.length>100)){var i=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(n);if(i){var s=parseFloat(i[1]),c=(i[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*l;case"days":case"day":case"d":return s*S;case"hours":case"hour":case"hrs":case"hr":case"h":return s*w;case"minutes":case"minute":case"mins":case"min":case"m":return s*v;case"seconds":case"second":case"secs":case"sec":case"s":return s*u;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function t(n){return n>=S?Math.round(n/S)+"d":n>=w?Math.round(n/w)+"h":n>=v?Math.round(n/v)+"m":n>=u?Math.round(n/u)+"s":n+"ms"}function a(n){return r(n,S,"day")||r(n,w,"hour")||r(n,v,"minute")||r(n,u,"second")||n+" ms"}function r(n,i,s){if(!(n=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}j.formatters.j=function(t){try{return JSON.stringify(t)}catch(a){return"[UnexpectedJSONParseError]: "+a.message}};function v(t){var a=this.useColors;if(t[0]=(a?"%c":"")+this.namespace+(a?" %c":" ")+t[0]+(a?"%c ":" ")+"+"+j.humanize(this.diff),!!a){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,i=0;t[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(n++,s==="%c"&&(i=n))}),t.splice(i,0,r)}}function w(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function S(t){try{t==null?j.storage.removeItem("debug"):j.storage.debug=t}catch{}}function l(){var t;try{t=j.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}j.enable(l());function e(){try{return window.localStorage}catch{}}}}),GF=De({"node_modules/stream-parser/index.js"(j,N){var u=Y1(),v=qF()("stream-parser");N.exports=t;var w=-1,S=0,l=1,e=2;function t(o){var x=o&&typeof o._transform=="function",M=o&&typeof o._write=="function";if(!x&&!M)throw new Error("must pass a Writable or Transform stream in");v("extending Parser into stream"),o._bytes=r,o._skipBytes=n,x&&(o._passthrough=i),x?o._transform=c:o._write=s}function a(o){v("initializing parser stream"),o._parserBytesLeft=0,o._parserBuffers=[],o._parserBuffered=0,o._parserState=w,o._parserCallback=null,typeof o.push=="function"&&(o._parserOutput=o.push.bind(o)),o._parserInit=!0}function r(o,x){u(!this._parserCallback,'there is already a "callback" set!'),u(isFinite(o)&&o>0,'can only buffer a finite number of bytes > 0, got "'+o+'"'),this._parserInit||a(this),v("buffering %o bytes",o),this._parserBytesLeft=o,this._parserCallback=x,this._parserState=S}function n(o,x){u(!this._parserCallback,'there is already a "callback" set!'),u(o>0,'can only skip > 0 bytes, got "'+o+'"'),this._parserInit||a(this),v("skipping %o bytes",o),this._parserBytesLeft=o,this._parserCallback=x,this._parserState=l}function i(o,x){u(!this._parserCallback,'There is already a "callback" set!'),u(o>0,'can only pass through > 0 bytes, got "'+o+'"'),this._parserInit||a(this),v("passing through %o bytes",o),this._parserBytesLeft=o,this._parserCallback=x,this._parserState=e}function s(o,x,M){this._parserInit||a(this),v("write(%o bytes)",o.length),typeof x=="function"&&(M=x),d(this,o,null,M)}function c(o,x,M){this._parserInit||a(this),v("transform(%o bytes)",o.length),typeof x!="function"&&(x=this._parserOutput),d(this,o,x,M)}function p(o,x,M,T){return o._parserBytesLeft<=0?T(new Error("got data but not currently parsing anything")):x.length<=o._parserBytesLeft?function(){return f(o,x,M,T)}:function(){var E=x.slice(0,o._parserBytesLeft);return f(o,E,M,function(g){if(g)return T(g);if(x.length>E.length)return function(){return p(o,x.slice(E.length),M,T)}})}}function f(o,x,M,T){if(o._parserBytesLeft-=x.length,v("%o bytes left for stream piece",o._parserBytesLeft),o._parserState===S?(o._parserBuffers.push(x),o._parserBuffered+=x.length):o._parserState===e&&M(x),o._parserBytesLeft===0){var E=o._parserCallback;if(E&&o._parserState===S&&o._parserBuffers.length>1&&(x=Buffer.concat(o._parserBuffers,o._parserBuffered)),o._parserState!==S&&(x=null),o._parserCallback=null,o._parserBuffered=0,o._parserState=w,o._parserBuffers.splice(0),E){var g=[];x&&g.push(x),M&&g.push(M);var A=E.length>g.length;A&&g.push(y(T));var m=E.apply(o,g);if(!A||T===m)return T}}else return T}var d=y(p);function y(o){return function(){for(var x=o.apply(this,arguments);typeof x=="function";)x=x();return x}}}}),pl=De({"node_modules/probe-image-size/lib/common.js"(j){"use strict";var N=LF().Transform,u=GF();function v(){N.call(this,{readableObjectMode:!0})}v.prototype=Object.create(N.prototype),v.prototype.constructor=v,u(v.prototype),j.ParserStream=v,j.sliceEq=function(S,l,e){for(var t=l,a=0;a>4&15,p=i[4]&15,f=i[5]>>4&15,d=u(i,6),y=8,o=0;od.width||f.width===d.width&&f.height>d.height?f:d}),c=i.reduce(function(f,d){return f.height>d.height||f.height===d.height&&f.width>d.width?f:d}),p;return s.width>c.height||s.width===c.height&&s.height>c.width?p=s:p=c,p}N.exports.readSizeFromMeta=function(i){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(i,s),!!s.sizes.length){var c=n(s.sizes),p=1;s.transforms.forEach(function(d){var y={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},o={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(d.type==="imir"&&(d.value===0?p=o[p]:(p=o[p],p=y[p],p=y[p])),d.type==="irot")for(var x=0;x0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,S)}},w.prototype.read_uint16=function(S){var l=this.input;if(S+2>l.length)throw u("unexpected EOF","EBADDATA");return this.big_endian?l[S]*256+l[S+1]:l[S]+l[S+1]*256},w.prototype.read_uint32=function(S){var l=this.input;if(S+4>l.length)throw u("unexpected EOF","EBADDATA");return this.big_endian?l[S]*16777216+l[S+1]*65536+l[S+2]*256+l[S+3]:l[S]+l[S+1]*256+l[S+2]*65536+l[S+3]*16777216},w.prototype.is_subifd_link=function(S,l){return S===0&&l===34665||S===0&&l===34853||S===34665&&l===40965},w.prototype.exif_format_length=function(S){switch(S){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},w.prototype.exif_format_read=function(S,l){var e;switch(S){case 1:case 2:return e=this.input[l],e;case 6:return e=this.input[l],e|(e&128)*33554430;case 3:return e=this.read_uint16(l),e;case 8:return e=this.read_uint16(l),e|(e&32768)*131070;case 4:return e=this.read_uint32(l),e;case 9:return e=this.read_uint32(l),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},w.prototype.scan_ifd=function(S,l,e){var t=this.read_uint16(l);l+=2;for(var a=0;athis.input.length)throw u("unexpected EOF","EBADDATA");for(var d=[],y=p,o=0;o0&&(this.ifds_to_read.push({id:r,offset:d[0]}),f=!0);var M={is_big_endian:this.big_endian,ifd:S,tag:r,format:n,count:i,entry_offset:l+this.start,data_length:c,data_offset:p+this.start,value:d,is_subifd_link:f};if(e(M)===!1){this.aborted=!0;return}l+=12}S===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},N.exports.ExifParser=w,N.exports.get_orientation=function(S){var l=0;try{return new w(S,0,S.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return l=e.value[0],!1}),l}catch{return-1}}}}),HF=De({"node_modules/probe-image-size/lib/parse_sync/avif.js"(j,N){"use strict";var u=pl().str2arr,v=pl().sliceEq,w=pl().readUInt32BE,S=VF(),l=Zx(),e=u("ftyp");N.exports=function(t){if(v(t,4,e)){var a=S.unbox(t,0);if(a){var r=S.getMimeType(a.data);if(r){for(var n,i=a.end;;){var s=S.unbox(t,i);if(!s)break;if(i=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){n=s.data;break}}if(n){var c=S.readSizeFromMeta(n);if(c){var p={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(p.variants=c.variants),c.orientation&&(p.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=t.length){var f=w(t,c.exif_location.offset),d=t.slice(c.exif_location.offset+f+4,c.exif_location.offset+c.exif_location.length),y=l.get_orientation(d);y>0&&(p.orientation=y)}return p}}}}}}}}),WF=De({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(j,N){"use strict";var u=pl().str2arr,v=pl().sliceEq,w=pl().readUInt16LE,S=u("BM");N.exports=function(l){if(!(l.length<26)&&v(l,0,S))return{width:w(l,18),height:w(l,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}),YF=De({"node_modules/probe-image-size/lib/parse_sync/gif.js"(j,N){"use strict";var u=pl().str2arr,v=pl().sliceEq,w=pl().readUInt16LE,S=u("GIF87a"),l=u("GIF89a");N.exports=function(e){if(!(e.length<10)&&!(!v(e,0,S)&&!v(e,0,l)))return{width:w(e,6),height:w(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),XF=De({"node_modules/probe-image-size/lib/parse_sync/ico.js"(j,N){"use strict";var u=pl().readUInt16LE,v=0,w=1,S=16;N.exports=function(l){var e=u(l,0),t=u(l,2),a=u(l,4);if(!(e!==v||t!==w||!a)){for(var r=[],n={width:0,height:0},i=0;in.width||c>n.height)&&(n=p)}return{width:n.width,height:n.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),ZF=De({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(j,N){"use strict";var u=pl().readUInt16BE,v=pl().str2arr,w=pl().sliceEq,S=Zx(),l=v("Exif\0\0");N.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var a=e[t++],r;a===255;)a=e[t++];if(208<=a&&a<=217||a===1)r=0;else if(192<=a&&a<=254){if(e.length-t<2)return;r=u(e,t)-2,t+=2}else return;if(a===217||a===218)return;var n;if(a===225&&r>=10&&w(e,t,l)&&(n=S.get_orientation(e.slice(t+6,t+r))),r>=5&&192<=a&&a<=207&&a!==196&&a!==200&&a!==204){if(e.length-t0&&(i.orientation=n),i}t+=r}}}}),$F=De({"node_modules/probe-image-size/lib/parse_sync/png.js"(j,N){"use strict";var u=pl().str2arr,v=pl().sliceEq,w=pl().readUInt32BE,S=u(`\x89PNG\r +`).concat(v(X),` +`));var ae=new m({actual:X,expected:K,message:H,operator:q,stackStartFn:Y});throw ae.generatedMessage=ee,ae}}A.match=function X(K,H,Y){se(K,H,Y,X,"match")},A.doesNotMatch=function X(K,H,Y){se(K,H,Y,X,"doesNotMatch")};function G(){for(var X=arguments.length,K=new Array(X),H=0;H0)return e(a);if(s==="number"&&isNaN(a)===!1)return o.long?n(a):t(a);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(a))};function e(a){if(a=String(a),!(a.length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(a);if(o){var s=parseFloat(o[1]),c=(o[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return s*l;case"days":case"day":case"d":return s*k;case"hours":case"hour":case"hrs":case"hr":case"h":return s*E;case"minutes":case"minute":case"mins":case"min":case"m":return s*b;case"seconds":case"second":case"secs":case"sec":case"s":return s*p;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function t(a){return a>=k?Math.round(a/k)+"d":a>=E?Math.round(a/E)+"h":a>=b?Math.round(a/b)+"m":a>=p?Math.round(a/p)+"s":a+"ms"}function n(a){return r(a,k,"day")||r(a,E,"hour")||r(a,b,"minute")||r(a,p,"second")||a+" ms"}function r(a,o,s){if(!(a=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}J.formatters.j=function(t){try{return JSON.stringify(t)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}};function b(t){var n=this.useColors;if(t[0]=(n?"%c":"")+this.namespace+(n?" %c":" ")+t[0]+(n?"%c ":" ")+"+"+J.humanize(this.diff),!!n){var r="color: "+this.color;t.splice(1,0,r,"color: inherit");var a=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(s){s!=="%%"&&(a++,s==="%c"&&(o=a))}),t.splice(o,0,r)}}function E(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function k(t){try{t==null?J.storage.removeItem("debug"):J.storage.debug=t}catch{}}function l(){var t;try{t=J.storage.debug}catch{}return!t&&typeof process<"u"&&"env"in process&&(t=process.env.DEBUG),t}J.enable(l());function e(){try{return window.localStorage}catch{}}}}),GB=ze({"node_modules/stream-parser/index.js"(J,V){var p=jb(),b=VB()("stream-parser");V.exports=t;var E=-1,k=0,l=1,e=2;function t(i){var w=i&&typeof i._transform=="function",S=i&&typeof i._write=="function";if(!w&&!S)throw new Error("must pass a Writable or Transform stream in");b("extending Parser into stream"),i._bytes=r,i._skipBytes=a,w&&(i._passthrough=o),w?i._transform=c:i._write=s}function n(i){b("initializing parser stream"),i._parserBytesLeft=0,i._parserBuffers=[],i._parserBuffered=0,i._parserState=E,i._parserCallback=null,typeof i.push=="function"&&(i._parserOutput=i.push.bind(i)),i._parserInit=!0}function r(i,w){p(!this._parserCallback,'there is already a "callback" set!'),p(isFinite(i)&&i>0,'can only buffer a finite number of bytes > 0, got "'+i+'"'),this._parserInit||n(this),b("buffering %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=k}function a(i,w){p(!this._parserCallback,'there is already a "callback" set!'),p(i>0,'can only skip > 0 bytes, got "'+i+'"'),this._parserInit||n(this),b("skipping %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=l}function o(i,w){p(!this._parserCallback,'There is already a "callback" set!'),p(i>0,'can only pass through > 0 bytes, got "'+i+'"'),this._parserInit||n(this),b("passing through %o bytes",i),this._parserBytesLeft=i,this._parserCallback=w,this._parserState=e}function s(i,w,S){this._parserInit||n(this),b("write(%o bytes)",i.length),typeof w=="function"&&(S=w),v(this,i,null,S)}function c(i,w,S){this._parserInit||n(this),b("transform(%o bytes)",i.length),typeof w!="function"&&(w=this._parserOutput),v(this,i,w,S)}function m(i,w,S,M){return i._parserBytesLeft<=0?M(new Error("got data but not currently parsing anything")):w.length<=i._parserBytesLeft?function(){return h(i,w,S,M)}:function(){var C=w.slice(0,i._parserBytesLeft);return h(i,C,S,function(_){if(_)return M(_);if(w.length>C.length)return function(){return m(i,w.slice(C.length),S,M)}})}}function h(i,w,S,M){if(i._parserBytesLeft-=w.length,b("%o bytes left for stream piece",i._parserBytesLeft),i._parserState===k?(i._parserBuffers.push(w),i._parserBuffered+=w.length):i._parserState===e&&S(w),i._parserBytesLeft===0){var C=i._parserCallback;if(C&&i._parserState===k&&i._parserBuffers.length>1&&(w=Buffer.concat(i._parserBuffers,i._parserBuffered)),i._parserState!==k&&(w=null),i._parserCallback=null,i._parserBuffered=0,i._parserState=E,i._parserBuffers.splice(0),C){var _=[];w&&_.push(w),S&&_.push(S);var T=C.length>_.length;T&&_.push(g(M));var f=C.apply(i,_);if(!T||M===f)return M}}else return M}var v=g(m);function g(i){return function(){for(var w=i.apply(this,arguments);typeof w=="function";)w=w();return w}}}}),Ns=ze({"node_modules/probe-image-size/lib/common.js"(J){"use strict";var V=LB().Transform,p=GB();function b(){V.call(this,{readableObjectMode:!0})}b.prototype=Object.create(V.prototype),b.prototype.constructor=b,p(b.prototype),J.ParserStream=b,J.sliceEq=function(k,l,e){for(var t=l,n=0;n>16},J.readInt16BE=function(k,l){return J.readUInt16BE(k,l)<<16>>16},J.readUInt32LE=function(k,l){return(k[l]|k[l+1]<<8|k[l+2]<<16)+k[l+3]*16777216},J.readUInt32BE=function(k,l){return k[l]*16777216+(k[l+1]<<16|k[l+2]<<8|k[l+3])},J.readInt32LE=function(k,l){return J.readUInt32LE(k,l)|0},J.readInt32BE=function(k,l){return J.readUInt32BE(k,l)|0};function E(k,l,e){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=k,l&&(this.code=l),e&&(this.statusCode=e)}E.prototype=Object.create(Error.prototype),E.prototype.constructor=E,J.ProbeError=E}}),HB=ze({"node_modules/probe-image-size/lib/miaf_utils.js"(J,V){"use strict";var p=Ns().readUInt16BE,b=Ns().readUInt32BE;function E(o,s){if(o.length<4+s)return null;var c=b(o,s);return o.length>4&15,m=o[4]&15,h=o[5]>>4&15,v=p(o,6),g=8,i=0;iv.width||h.width===v.width&&h.height>v.height?h:v}),c=o.reduce(function(h,v){return h.height>v.height||h.height===v.height&&h.width>v.width?h:v}),m;return s.width>c.height||s.width===c.height&&s.height>c.width?m=s:m=c,m}V.exports.readSizeFromMeta=function(o){var s={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(r(o,s),!!s.sizes.length){var c=a(s.sizes),m=1;s.transforms.forEach(function(v){var g={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},i={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(v.type==="imir"&&(v.value===0?m=i[m]:(m=i[m],m=g[m],m=g[m])),v.type==="irot")for(var w=0;w0&&!this.aborted;){var e=this.ifds_to_read.shift();e.offset&&this.scan_ifd(e.id,e.offset,k)}},E.prototype.read_uint16=function(k){var l=this.input;if(k+2>l.length)throw p("unexpected EOF","EBADDATA");return this.big_endian?l[k]*256+l[k+1]:l[k]+l[k+1]*256},E.prototype.read_uint32=function(k){var l=this.input;if(k+4>l.length)throw p("unexpected EOF","EBADDATA");return this.big_endian?l[k]*16777216+l[k+1]*65536+l[k+2]*256+l[k+3]:l[k]+l[k+1]*256+l[k+2]*65536+l[k+3]*16777216},E.prototype.is_subifd_link=function(k,l){return k===0&&l===34665||k===0&&l===34853||k===34665&&l===40965},E.prototype.exif_format_length=function(k){switch(k){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},E.prototype.exif_format_read=function(k,l){var e;switch(k){case 1:case 2:return e=this.input[l],e;case 6:return e=this.input[l],e|(e&128)*33554430;case 3:return e=this.read_uint16(l),e;case 8:return e=this.read_uint16(l),e|(e&32768)*131070;case 4:return e=this.read_uint32(l),e;case 9:return e=this.read_uint32(l),e|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},E.prototype.scan_ifd=function(k,l,e){var t=this.read_uint16(l);l+=2;for(var n=0;nthis.input.length)throw p("unexpected EOF","EBADDATA");for(var v=[],g=m,i=0;i0&&(this.ifds_to_read.push({id:r,offset:v[0]}),h=!0);var S={is_big_endian:this.big_endian,ifd:k,tag:r,format:a,count:o,entry_offset:l+this.start,data_length:c,data_offset:m+this.start,value:v,is_subifd_link:h};if(e(S)===!1){this.aborted=!0;return}l+=12}k===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},V.exports.ExifParser=E,V.exports.get_orientation=function(k){var l=0;try{return new E(k,0,k.length).each(function(e){if(e.ifd===0&&e.tag===274&&Array.isArray(e.value))return l=e.value[0],!1}),l}catch{return-1}}}}),WB=ze({"node_modules/probe-image-size/lib/parse_sync/avif.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=HB(),l=Ub(),e=p("ftyp");V.exports=function(t){if(b(t,4,e)){var n=k.unbox(t,0);if(n){var r=k.getMimeType(n.data);if(r){for(var a,o=n.end;;){var s=k.unbox(t,o);if(!s)break;if(o=s.end,s.boxtype==="mdat")return;if(s.boxtype==="meta"){a=s.data;break}}if(a){var c=k.readSizeFromMeta(a);if(c){var m={width:c.width,height:c.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(c.variants.length>1&&(m.variants=c.variants),c.orientation&&(m.orientation=c.orientation),c.exif_location&&c.exif_location.offset+c.exif_location.length<=t.length){var h=E(t,c.exif_location.offset),v=t.slice(c.exif_location.offset+h+4,c.exif_location.offset+c.exif_location.length),g=l.get_orientation(v);g>0&&(m.orientation=g)}return m}}}}}}}}),YB=ze({"node_modules/probe-image-size/lib/parse_sync/bmp.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readInt16LE,k=Ns().readInt32LE,l=Ns().readUInt32LE,e=p("BM");V.exports=function(t){if(!(t.length<26)&&b(t,0,e)){var n,r,a=l(t,14);if(a===12)r=E(t,18),n=E(t,20);else if(a>12)r=k(t,18),n=k(t,22);else return;return{width:r,height:Math.abs(n),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}}}),XB=ze({"node_modules/probe-image-size/lib/parse_sync/gif.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt16LE,k=p("GIF87a"),l=p("GIF89a");V.exports=function(e){if(!(e.length<10)&&!(!b(e,0,k)&&!b(e,0,l)))return{width:E(e,6),height:E(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}}}),ZB=ze({"node_modules/probe-image-size/lib/parse_sync/ico.js"(J,V){"use strict";var p=Ns().readUInt16LE,b=0,E=1,k=16;V.exports=function(l){var e=p(l,0),t=p(l,2),n=p(l,4);if(!(e!==b||t!==E||!n)&&!(l.length<6+n*k)){for(var r=[],a={width:0,height:0},o=0;oa.width||c>a.height)&&(a=m)}return{width:a.width,height:a.height,variants:r,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}}}),$B=ze({"node_modules/probe-image-size/lib/parse_sync/jpeg.js"(J,V){"use strict";var p=Ns().readUInt16BE,b=Ns().str2arr,E=Ns().sliceEq,k=Ub(),l=b("Exif\0\0");V.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var n=e[t++],r;n===255;)n=e[t++];if(n>=208&&n<=217||n===1)r=0;else if(n>=192&&n<=254){if(e.length-t<2)return;r=p(e,t)-2,t+=2}else return;if(n===217||n===218)return;var a;if(n===225&&r>=10&&E(e,t,l)&&(a=k.get_orientation(e.slice(t+6,t+r))),r>=5&&n>=192&&n<=207&&n!==196&&n!==200&&n!==204){if(e.length-t0&&(o.orientation=a),o}t+=r}}}}),KB=ze({"node_modules/probe-image-size/lib/parse_sync/png.js"(J,V){"use strict";var p=Ns().str2arr,b=Ns().sliceEq,E=Ns().readUInt32BE,k=p(`\x89PNG\r  -`),l=u("IHDR");N.exports=function(e){if(!(e.length<24)&&v(e,0,S)&&v(e,12,l))return{width:w(e,16),height:w(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}}}),KF=De({"node_modules/probe-image-size/lib/parse_sync/psd.js"(j,N){"use strict";var u=pl().str2arr,v=pl().sliceEq,w=pl().readUInt32BE,S=u("8BPS\0");N.exports=function(l){if(!(l.length<22)&&v(l,0,S))return{width:w(l,18),height:w(l,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}}}),JF=De({"node_modules/probe-image-size/lib/parse_sync/svg.js"(j,N){"use strict";function u(s){return s===32||s===9||s===13||s===10}function v(s){return typeof s=="number"&&isFinite(s)&&s>0}function w(s){var c=0,p=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,a=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,r=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function n(s){var c=s.match(e),p=s.match(t),f=s.match(a);return{width:c&&(c[1]||c[2]),height:p&&(p[1]||p[2]),viewbox:f&&(f[1]||f[2])}}function i(s){return r.test(s)?s.match(r)[0]:"px"}N.exports=function(s){if(w(s)){for(var c="",p=0;p>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function n(i,s){return{width:(i[s+6]<<16|i[s+5]<<8|i[s+4])+1,height:(i[s+9]<i.length)){for(;s+8=10?c=c||a(i,s+8):d==="VP8L"&&y>=9?c=c||r(i,s+8):d==="VP8X"&&y>=10?c=c||n(i,s+8):d==="EXIF"&&(p=l.get_orientation(i.slice(s+8,s+8+y)),s=1/0),s+=8+y}if(c)return p>0&&(c.orientation=p),c}}}}}),tz=De({"node_modules/probe-image-size/lib/parsers_sync.js"(j,N){"use strict";N.exports={avif:HF(),bmp:WF(),gif:YF(),ico:XF(),jpeg:ZF(),png:$F(),psd:KF(),svg:JF(),tiff:QF(),webp:ez()}}}),rz=De({"node_modules/probe-image-size/sync.js"(j,N){"use strict";var u=tz();function v(w){for(var S=Object.keys(u),l=0;l0;)I=c.c2p(E+z*h),z--;for(z=0;F===void 0&&z0;)R=p.c2p(g+z*b),z--;if(I<_&&(C=I,I=_,_=C),RU[0];if(H||K){var V=_+k/2,$=F+B/2;te+="transform:"+w(V+"px",$+"px")+"scale("+(H?-1:1)+","+(K?-1:1)+")"+w(-V+"px",-$+"px")+";"}}ee.attr("style",te);var X=new Promise(function(Z){if(x._hasZ)Z();else if(x._hasSource)if(x._canvas&&x._canvas.el.width===A&&x._canvas.el.height===m&&x._canvas.source===x.source)Z();else{var Q=document.createElement("canvas");Q.width=A,Q.height=m;var re=Q.getContext("2d",{willReadFrequently:!0});x._image=x._image||new Image;var ce=x._image;ce.onload=function(){re.drawImage(ce,0,0),x._canvas={el:Q,source:x.source},Z()},ce.setAttribute("src",x.source)}}).then(function(){var Z,Q;if(x._hasZ)Q=Y(function(me,ye){var Ae=T[ye][me];return v.isTypedArray(Ae)&&(Ae=Array.from(Ae)),Ae}),Z=Q.toDataURL("image/png");else if(x._hasSource)if(M)Z=x.source;else{var re=x._canvas.el.getContext("2d",{willReadFrequently:!0}),ce=re.getImageData(0,0,A,m).data;Q=Y(function(me,ye){var Ae=4*(ye*A+me);return[ce[Ae],ce[Ae+1],ce[Ae+2],ce[Ae+3]]}),Z=Q.toDataURL("image/png")}ee.attr({"xlink:href":Z,height:B,width:k,x:_,y:F})});r._promises.push(X)})}}}),oz=De({"src/traces/image/style.js"(j,N){"use strict";var u=Qn();N.exports=function(w){u.select(w).selectAll(".im image").style("opacity",function(S){return S[0].trace.opacity})}}}),sz=De({"src/traces/image/hover.js"(j,N){"use strict";var u=uu(),v=Ar(),w=v.isArrayOrTypedArray,S=Tm();N.exports=function(e,t,a){var r=e.cd[0],n=r.trace,i=e.xa,s=e.ya;if(!(u.inbox(t-r.x0,t-(r.x0+r.w*n.dx),0)>0||u.inbox(a-r.y0,a-(r.y0+r.h*n.dy),0)>0)){var c=Math.floor((t-r.x0)/n.dx),p=Math.floor(Math.abs(a-r.y0)/n.dy),f;if(n._hasZ?f=r.z[p][c]:n._hasSource&&(f=n._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,p,1,1).data),!!f){var d=r.hi||n.hoverinfo,y;if(d){var o=d.split("+");o.indexOf("all")!==-1&&(o=["color"]),o.indexOf("color")!==-1&&(y=!0)}var x=S.colormodel[n.colormodel],M=x.colormodel||n.colormodel,T=M.length,E=n._scaler(f),g=x.suffix,A=[];(n.hovertemplate||y)&&(A.push("["+[E[0]+g[0],E[1]+g[1],E[2]+g[2]].join(", ")),T===4&&A.push(", "+E[3]+g[3]),A.push("]"),A=A.join(""),e.extraText=M.toUpperCase()+": "+A);var m;w(n.hovertext)&&w(n.hovertext[p])?m=n.hovertext[p][c]:w(n.text)&&w(n.text[p])&&(m=n.text[p][c]);var h=s.c2p(r.y0+(p+.5)*n.dy),b=r.x0+(c+.5)*n.dx,_=r.y0+(p+.5)*n.dy,I="["+f.slice(0,n.colormodel.length).join(", ")+"]";return[v.extendFlat(e,{index:[p,c],x0:i.c2p(r.x0+c*n.dx),x1:i.c2p(r.x0+(c+1)*n.dx),y0:h,y1:h,color:E,xVal:b,xLabelVal:b,yVal:_,yLabelVal:_,zLabelVal:I,text:m,hovertemplateLabels:{zLabel:I,colorLabel:A,"color[0]Label":E[0]+g[0],"color[1]Label":E[1]+g[1],"color[2]Label":E[2]+g[2],"color[3]Label":E[3]+g[3]}})]}}}}}),lz=De({"src/traces/image/event_data.js"(j,N){"use strict";N.exports=function(v,w){return"xVal"in w&&(v.x=w.xVal),"yVal"in w&&(v.y=w.yVal),w.xa&&(v.xaxis=w.xa),w.ya&&(v.yaxis=w.ya),v.color=w.color,v.colormodel=w.trace.colormodel,v.z||(v.z=w.color),v}}}),uz=De({"src/traces/image/index.js"(j,N){"use strict";N.exports={attributes:(d5(),ts(Nx)).default,supplyDefaults:HD(),calc:nz(),plot:iz(),style:oz(),hoverPoints:sz(),eventData:lz(),moduleType:"trace",name:"image",basePlotModule:Hu(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),cz=De({"lib/image.js"(j,N){"use strict";N.exports=uz()}}),Op=De({"src/traces/pie/attributes.js"(j,N){"use strict";var u=Bs(),v=ql().attributes,w=Ml(),S=mc(),{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Is(),a=Ji().extendFlat,r=Hc().pattern,n=w({editType:"plot",arrayOk:!0,colorEditType:"plot"});N.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:S.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,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:a({},u.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:t(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:t({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:a({},n,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:a({},n,{}),outsidetextfont:a({},n,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:a({},u.showlegend,{arrayOk:!0}),legend:a({},u.legend,{arrayOk:!0}),legendrank:a({},u.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:a({},n,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:v({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:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),Np=De({"src/traces/pie/defaults.js"(j,N){"use strict";var u=io(),v=Ar(),w=Op(),S=ql().defaults,l=Bh().handleText,e=Ar().coercePattern;function t(n,i){var s=v.isArrayOrTypedArray(n),c=v.isArrayOrTypedArray(i),p=Math.min(s?n.length:1/0,c?i.length:1/0);if(isFinite(p)||(p=0),p&&c){for(var f,d=0;d0){f=!0;break}}f||(p=0)}return{hasLabels:s,hasValues:c,len:p}}function a(n,i,s,c,p){var f=c("marker.line.width");f&&c("marker.line.color",p?void 0:s.paper_bgcolor);var d=c("marker.colors");e(c,"marker.pattern",d),n.marker&&!i.marker.pattern.fgcolor&&(i.marker.pattern.fgcolor=n.marker.colors),i.marker.pattern.bgcolor||(i.marker.pattern.bgcolor=s.paper_bgcolor)}function r(n,i,s,c){function p(_,I){return v.coerce(n,i,w,_,I)}var f=p("labels"),d=p("values"),y=t(f,d),o=y.len;if(i._hasLabels=y.hasLabels,i._hasValues=y.hasValues,!i._hasLabels&&i._hasValues&&(p("label0"),p("dlabel")),!o){i.visible=!1;return}i._length=o,a(n,i,c,p,!0),p("scalegroup");var x=p("text"),M=p("texttemplate");p("texttemplatefallback");var T;if(M||(T=p("textinfo",v.isArrayOrTypedArray(x)?"text+percent":"percent")),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback"),M||T&&T!=="none"){var E=p("textposition");l(n,i,c,p,E,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var g=Array.isArray(E)||E==="auto",A=g||E==="outside";A&&p("automargin"),(E==="inside"||E==="auto"||Array.isArray(E))&&p("insidetextorientation")}else T==="none"&&p("textposition","none");S(i,c,p);var m=p("hole"),h=p("title.text");if(h){var b=p("title.position",m?"middle center":"top center");!m&&b==="middle center"&&(i.title.position="top center"),v.coerceFont(p,"title.font",c.font)}p("sort"),p("direction"),p("rotation"),p("pull")}N.exports={handleLabelsAndValues:t,handleMarkerDefaults:a,supplyDefaults:r}}}),$x=De({"src/traces/pie/layout_attributes.js"(j,N){"use strict";N.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),fz=De({"src/traces/pie/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=$x();N.exports=function(S,l){function e(t,a){return u.coerce(S,l,v,t,a)}e("hiddenlabels"),e("piecolorway",l.colorway),e("extendpiecolors")}}}),Cm=De({"src/traces/pie/calc.js"(j,N){"use strict";var u=io(),v=ii(),w={};function S(a,r){var n=[],i=a._fullLayout,s=i.hiddenlabels||[],c=r.labels,p=r.marker.colors||[],f=r.values,d=r._length,y=r._hasValues&&d,o,x;if(r.dlabel)for(c=new Array(d),o=0;o=0});var _=r.type==="funnelarea"?g:r.sort;return _&&n.sort(function(I,C){return C.v-I.v}),n[0]&&(n[0].vTotal=E),n}function l(a){return function(n,i){if(!n||!v.isValid(n))return!1;let s=v.color(n).rgb().string();return a[i]||(a[i]=s),s}}function e(a,r){var n=(r||{}).type;n||(n="pie");var i=a._fullLayout,s=a.calcdata,c=i[n+"colorway"],p=i["_"+n+"colormap"];i["extend"+n+"colors"]&&(c=t(c,w));for(var f=0,d=0;d0&&(Fe+=st*ne.pxmid[0],Ve+=st*ne.pxmid[1])}ne.cxFinal=Fe,ne.cyFinal=Ve;function yt(nt,Ee,ze,ve){var _e=ve*(Ee[0]-nt[0]),Ie=ve*(Ee[1]-nt[1]);return"a"+ve*ce.r+","+ve*ce.r+" 0 "+ne.largeArc+(ze?" 1 ":" 0 ")+_e+","+Ie}var At=me.hole;if(ne.v===ce.vTotal){var Pt="M"+(Fe+ne.px0[0])+","+(Ve+ne.px0[1])+yt(ne.px0,ne.pxmid,!0,1)+yt(ne.pxmid,ne.px0,!0,1)+"Z";At?ut.attr("d","M"+(Fe+At*ne.px0[0])+","+(Ve+At*ne.px0[1])+yt(ne.px0,ne.pxmid,!1,At)+yt(ne.pxmid,ne.px0,!1,At)+"Z"+Pt):ut.attr("d",Pt)}else{var Zt=yt(ne.px0,ne.px1,!0,1);if(At){var vr=1-At;ut.attr("d","M"+(Fe+At*ne.px1[0])+","+(Ve+At*ne.px1[1])+yt(ne.px1,ne.px0,!1,At)+"l"+vr*ne.px0[0]+","+vr*ne.px0[1]+Zt+"Z")}else ut.attr("d","M"+Fe+","+Ve+"l"+ne.px0[0]+","+ne.px0[1]+Zt+"Z")}ae(H,ne,ce);var Nt=p.castOption(me.textposition,ne.pts),Kt=je.selectAll("g.slicetext").data(ne.text&&Nt!=="none"?[0]:[]);Kt.enter().append("g").classed("slicetext",!0),Kt.exit().remove(),Kt.each(function(){var nt=e.ensureSingle(u.select(this),"text","",function(Xe){Xe.attr("data-notex",1)}),Ee=e.ensureUniformFontSize(H,Nt==="outside"?M(me,ne,$.font):T(me,ne,$.font));nt.text(ne.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,Ee).call(r.convertToTspans,H);var ze=l.bBox(nt.node()),ve;if(Nt==="outside")ve=F(ze,ne);else if(ve=g(ze,ne,ce),Nt==="auto"&&ve.scale<1){var _e=e.ensureUniformFontSize(H,me.outsidetextfont);nt.call(l.font,_e),ze=l.bBox(nt.node()),ve=F(ze,ne)}var Ie=ve.textPosAngle,Be=Ie===void 0?ne.pxmid:te(ce.r,Ie);if(ve.targetX=Fe+Be[0]*ve.rCenter+(ve.x||0),ve.targetY=Ve+Be[1]*ve.rCenter+(ve.y||0),U(ve,ze),ve.outside){var We=ve.targetY;ne.yLabelMin=We-ze.height/2,ne.yLabelMid=We,ne.yLabelMax=We+ze.height/2,ne.labelExtraX=0,ne.labelExtraY=0,Se=!0}ve.fontSize=Ee.size,i(me.type,ve,$),Q[be].transform=ve,e.setTransormAndDisplay(nt,ve)})});var Ce=u.select(this).selectAll("g.titletext").data(me.title.text?[0]:[]);if(Ce.enter().append("g").classed("titletext",!0),Ce.exit().remove(),Ce.each(function(){var ne=e.ensureSingle(u.select(this),"text","",function(Ve){Ve.attr("data-notex",1)}),be=me.title.text;me._meta&&(be=e.templateString(be,me._meta)),ne.text(be).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,me.title.font).call(r.convertToTspans,H);var Fe;me.title.position==="middle center"?Fe=R(ce):Fe=z(ce,X),ne.attr("transform",a(Fe.x,Fe.y)+t(Math.min(1,Fe.scale))+a(Fe.tx,Fe.ty))}),Se&&O(Ae,me),o(ye,me),Se&&me.automargin){var qe=l.bBox(re.node()),Ue=me.domain,xe=X.w*(Ue.x[1]-Ue.x[0]),he=X.h*(Ue.y[1]-Ue.y[0]),oe=(.5*xe-ce.r)/X.w,le=(.5*he-ce.r)/X.h;v.autoMargin(H,"pie."+me.uid+".automargin",{xl:Ue.x[0]-oe,xr:Ue.x[1]+oe,yb:Ue.y[0]-le,yt:Ue.y[1]+le,l:Math.max(ce.cx-ce.r-qe.left,0),r:Math.max(qe.right-(ce.cx+ce.r),0),b:Math.max(qe.bottom-(ce.cy+ce.r),0),t:Math.max(ce.cy-ce.r-qe.top,0),pad:5})}})});setTimeout(function(){Z.selectAll("tspan").each(function(){var Q=u.select(this);Q.attr("dy")&&Q.attr("dy",Q.attr("dy"))})},0)}function o(H,K){H.each(function(V){var $=u.select(this);if(!V.labelExtraX&&!V.labelExtraY){$.select("path.textline").remove();return}var X=$.select("g.slicetext text");V.transform.targetX+=V.labelExtraX,V.transform.targetY+=V.labelExtraY,e.setTransormAndDisplay(X,V.transform);var Z=V.cxFinal+V.pxmid[0],Q=V.cyFinal+V.pxmid[1],re="M"+Z+","+Q,ce=(V.yLabelMax-V.yLabelMin)*(V.pxmid[0]<0?-1:1)/4;if(V.labelExtraX){var me=V.labelExtraX*V.pxmid[1]/V.pxmid[0],ye=V.yLabelMid+V.labelExtraY-(V.cyFinal+V.pxmid[1]);Math.abs(me)>Math.abs(ye)?re+="l"+ye*V.pxmid[0]/V.pxmid[1]+","+ye+"H"+(Z+V.labelExtraX+ce):re+="l"+V.labelExtraX+","+me+"v"+(ye-me)+"h"+ce}else re+="V"+(V.yLabelMid+V.labelExtraY)+"h"+ce;e.ensureSingle($,"path","textline").call(S.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:re,fill:"none"})})}function x(H,K,V){var $=V[0],X=$.cx,Z=$.cy,Q=$.trace,re=Q.type==="funnelarea";"_hasHoverLabel"in Q||(Q._hasHoverLabel=!1),"_hasHoverEvent"in Q||(Q._hasHoverEvent=!1),H.on("mouseover",function(ce){var me=K._fullLayout,ye=K._fullData[Q.index];if(!(K._dragging||me.hovermode===!1)){var Ae=ye.hoverinfo;if(Array.isArray(Ae)&&(Ae=w.castHoverinfo({hoverinfo:[p.castOption(Ae,ce.pts)],_module:Q._module},me,0)),Ae==="all"&&(Ae="label+text+value+percent+name"),ye.hovertemplate||Ae!=="none"&&Ae!=="skip"&&Ae){var Se=ce.rInscribed||0,Ce=X+ce.pxmid[0]*(1-Se),qe=Z+ce.pxmid[1]*(1-Se),Ue=me.separators,xe=[];if(Ae&&Ae.indexOf("label")!==-1&&xe.push(ce.label),ce.text=p.castOption(ye.hovertext||ye.text,ce.pts),Ae&&Ae.indexOf("text")!==-1){var he=ce.text;e.isValidTextValue(he)&&xe.push(he)}ce.value=ce.v,ce.valueLabel=p.formatPieValue(ce.v,Ue),Ae&&Ae.indexOf("value")!==-1&&xe.push(ce.valueLabel),ce.percent=ce.v/$.vTotal,ce.percentLabel=p.formatPiePercent(ce.percent,Ue),Ae&&Ae.indexOf("percent")!==-1&&xe.push(ce.percentLabel);var oe=ye.hoverlabel,le=oe.font,ne=[];w.loneHover({trace:Q,x0:Ce-Se*$.r,x1:Ce+Se*$.r,y:qe,_x0:re?X+ce.TL[0]:Ce-Se*$.r,_x1:re?X+ce.TR[0]:Ce+Se*$.r,_y0:re?Z+ce.TL[1]:qe-Se*$.r,_y1:re?Z+ce.BL[1]:qe+Se*$.r,text:xe.join("
"),name:ye.hovertemplate||Ae.indexOf("name")!==-1?ye.name:void 0,idealAlign:ce.pxmid[0]<0?"left":"right",color:p.castOption(oe.bgcolor,ce.pts)||ce.color,borderColor:p.castOption(oe.bordercolor,ce.pts),fontFamily:p.castOption(le.family,ce.pts),fontSize:p.castOption(le.size,ce.pts),fontColor:p.castOption(le.color,ce.pts),nameLength:p.castOption(oe.namelength,ce.pts),textAlign:p.castOption(oe.align,ce.pts),hovertemplate:p.castOption(ye.hovertemplate,ce.pts),hovertemplateLabels:ce,eventData:[f(ce,ye)]},{container:me._hoverlayer.node(),outerContainer:me._paper.node(),gd:K,inOut_bbox:ne}),ce.bbox=ne[0],Q._hasHoverLabel=!0}Q._hasHoverEvent=!0,K.emit("plotly_hover",{points:[f(ce,ye)],event:u.event})}}),H.on("mouseout",function(ce){var me=K._fullLayout,ye=K._fullData[Q.index],Ae=u.select(this).datum();Q._hasHoverEvent&&(ce.originalEvent=u.event,K.emit("plotly_unhover",{points:[f(Ae,ye)],event:u.event}),Q._hasHoverEvent=!1),Q._hasHoverLabel&&(w.loneUnhover(me._hoverlayer.node()),Q._hasHoverLabel=!1)}),H.on("click",function(ce){var me=K._fullLayout,ye=K._fullData[Q.index];K._dragging||me.hovermode===!1||(K._hoverdata=[f(ce,ye)],w.click(K,u.event))})}function M(H,K,V){var $=p.castOption(H.outsidetextfont.color,K.pts)||p.castOption(H.textfont.color,K.pts)||V.color,X=p.castOption(H.outsidetextfont.family,K.pts)||p.castOption(H.textfont.family,K.pts)||V.family,Z=p.castOption(H.outsidetextfont.size,K.pts)||p.castOption(H.textfont.size,K.pts)||V.size,Q=p.castOption(H.outsidetextfont.weight,K.pts)||p.castOption(H.textfont.weight,K.pts)||V.weight,re=p.castOption(H.outsidetextfont.style,K.pts)||p.castOption(H.textfont.style,K.pts)||V.style,ce=p.castOption(H.outsidetextfont.variant,K.pts)||p.castOption(H.textfont.variant,K.pts)||V.variant,me=p.castOption(H.outsidetextfont.textcase,K.pts)||p.castOption(H.textfont.textcase,K.pts)||V.textcase,ye=p.castOption(H.outsidetextfont.lineposition,K.pts)||p.castOption(H.textfont.lineposition,K.pts)||V.lineposition,Ae=p.castOption(H.outsidetextfont.shadow,K.pts)||p.castOption(H.textfont.shadow,K.pts)||V.shadow;return{color:$,family:X,size:Z,weight:Q,style:re,variant:ce,textcase:me,lineposition:ye,shadow:Ae}}function T(H,K,V){var $=p.castOption(H.insidetextfont.color,K.pts);!$&&H._input.textfont&&($=p.castOption(H._input.textfont.color,K.pts));var X=p.castOption(H.insidetextfont.family,K.pts)||p.castOption(H.textfont.family,K.pts)||V.family,Z=p.castOption(H.insidetextfont.size,K.pts)||p.castOption(H.textfont.size,K.pts)||V.size,Q=p.castOption(H.insidetextfont.weight,K.pts)||p.castOption(H.textfont.weight,K.pts)||V.weight,re=p.castOption(H.insidetextfont.style,K.pts)||p.castOption(H.textfont.style,K.pts)||V.style,ce=p.castOption(H.insidetextfont.variant,K.pts)||p.castOption(H.textfont.variant,K.pts)||V.variant,me=p.castOption(H.insidetextfont.textcase,K.pts)||p.castOption(H.textfont.textcase,K.pts)||V.textcase,ye=p.castOption(H.insidetextfont.lineposition,K.pts)||p.castOption(H.textfont.lineposition,K.pts)||V.lineposition,Ae=p.castOption(H.insidetextfont.shadow,K.pts)||p.castOption(H.textfont.shadow,K.pts)||V.shadow;return{color:$||S.contrast(K.color),family:X,size:Z,weight:Q,style:re,variant:ce,textcase:me,lineposition:ye,shadow:Ae}}function E(H,K){for(var V,$,X=0;X=-4;oe-=2)he(Math.PI*oe,"tan");for(oe=4;oe>=-4;oe-=2)he(Math.PI*(oe+1),"tan")}if(Ae||Ce){for(oe=4;oe>=-4;oe-=2)he(Math.PI*(oe+1.5),"rad");for(oe=4;oe>=-4;oe-=2)he(Math.PI*(oe+.5),"rad")}}if(re||qe||Ae){var le=Math.sqrt(H.width*H.width+H.height*H.height);if(xe={scale:X*$*2/le,rCenter:1-X,rotate:0},xe.textPosAngle=(K.startangle+K.stopangle)/2,xe.scale>=1)return xe;Ue.push(xe)}(qe||Ce)&&(xe=m(H,$,Q,ce,me),xe.textPosAngle=(K.startangle+K.stopangle)/2,Ue.push(xe)),(qe||Se)&&(xe=h(H,$,Q,ce,me),xe.textPosAngle=(K.startangle+K.stopangle)/2,Ue.push(xe));for(var ne=0,be=0,Fe=0;Fe=1)break}return Ue[ne]}function A(H,K){var V=H.startangle,$=H.stopangle;return V>K&&K>$||V0?1:-1)/2,y:Z/(1+V*V/($*$)),outside:!0}}function R(H){var K=Math.sqrt(H.titleBox.width*H.titleBox.width+H.titleBox.height*H.titleBox.height);return{x:H.cx,y:H.cy,scale:H.trace.hole*H.r*2/K,tx:0,ty:-H.titleBox.height/2+H.trace.title.font.size}}function z(H,K){var V=1,$=1,X,Z=H.trace,Q={x:H.cx,y:H.cy},re={tx:0,ty:0};re.ty+=Z.title.font.size,X=B(Z),Z.title.position.indexOf("top")!==-1?(Q.y-=(1+X)*H.r,re.ty-=H.titleBox.height):Z.title.position.indexOf("bottom")!==-1&&(Q.y+=(1+X)*H.r);var ce=D(H.r,H.trace.aspectratio),me=K.w*(Z.domain.x[1]-Z.domain.x[0])/2;return Z.title.position.indexOf("left")!==-1?(me=me+ce,Q.x-=(1+X)*ce,re.tx+=H.titleBox.width/2):Z.title.position.indexOf("center")!==-1?me*=2:Z.title.position.indexOf("right")!==-1&&(me=me+ce,Q.x+=(1+X)*ce,re.tx-=H.titleBox.width/2),V=me/H.titleBox.width,$=k(H,K)/H.titleBox.height,{x:Q.x,y:Q.y,scale:Math.min(V,$),tx:re.tx,ty:re.ty}}function D(H,K){return H/(K===void 0?1:K)}function k(H,K){var V=H.trace,$=K.h*(V.domain.y[1]-V.domain.y[0]);return Math.min(H.titleBox.height,$/2)}function B(H){var K=H.pull;if(!K)return 0;var V;if(e.isArrayOrTypedArray(K))for(K=0,V=0;VK&&(K=H.pull[V]);return K}function O(H,K){var V,$,X,Z,Q,re,ce,me,ye,Ae,Se,Ce,qe;function Ue(le,ne){return le.pxmid[1]-ne.pxmid[1]}function xe(le,ne){return ne.pxmid[1]-le.pxmid[1]}function he(le,ne){ne||(ne={});var be=ne.labelExtraY+($?ne.yLabelMax:ne.yLabelMin),Fe=$?le.yLabelMin:le.yLabelMax,Ve=$?le.yLabelMax:le.yLabelMin,je=le.cyFinal+Q(le.px0[1],le.px1[1]),ut=be-Fe,st,yt,At,Pt,Zt,vr;if(ut*ce>0&&(le.labelExtraY=ut),!!e.isArrayOrTypedArray(K.pull))for(yt=0;yt=(p.castOption(K.pull,At.pts)||0))&&((le.pxmid[1]-At.pxmid[1])*ce>0?(Pt=At.cyFinal+Q(At.px0[1],At.px1[1]),ut=Pt-Fe-le.labelExtraY,ut*ce>0&&(le.labelExtraY+=ut)):(Ve+le.labelExtraY-je)*ce>0&&(st=3*re*Math.abs(yt-Ae.indexOf(le)),Zt=At.cxFinal+Z(At.px0[0],At.px1[0]),vr=Zt+st-(le.cxFinal+le.pxmid[0])-le.labelExtraX,vr*re>0&&(le.labelExtraX+=vr)))}for($=0;$<2;$++)for(X=$?Ue:xe,Q=$?Math.max:Math.min,ce=$?1:-1,V=0;V<2;V++){for(Z=V?Math.max:Math.min,re=V?1:-1,me=H[$][V],me.sort(X),ye=H[1-$][V],Ae=ye.concat(me),Ce=[],Se=0;Se1?(me=V.r,ye=me/X.aspectratio):(ye=V.r,me=ye*X.aspectratio),me*=(1+X.baseratio)/2,ce=me*ye}Q=Math.min(Q,ce/V.vTotal)}for($=0;$K.vTotal/2?1:0,me.halfangle=Math.PI*Math.min(me.v/K.vTotal,.5),me.ring=1-$.hole,me.rInscribed=C(me,K))}function te(H,K){return[H*Math.sin(K),-H*Math.cos(K)]}function ae(H,K,V){var $=H._fullLayout,X=V.trace,Z=X.texttemplate,Q=X.textinfo;if(!Z&&Q&&Q!=="none"){var re=Q.split("+"),ce=function(ne){return re.indexOf(ne)!==-1},me=ce("label"),ye=ce("text"),Ae=ce("value"),Se=ce("percent"),Ce=$.separators,qe;if(qe=me?[K.label]:[],ye){var Ue=p.getFirstFilled(X.text,K.pts);d(Ue)&&qe.push(Ue)}Ae&&qe.push(p.formatPieValue(K.v,Ce)),Se&&qe.push(p.formatPiePercent(K.v/V.vTotal,Ce)),K.text=qe.join("
")}function xe(ne){return{label:ne.label,value:ne.v,valueLabel:p.formatPieValue(ne.v,$.separators),percent:ne.v/V.vTotal,percentLabel:p.formatPiePercent(ne.v/V.vTotal,$.separators),color:ne.color,text:ne.text,customdata:e.castOption(X,ne.i,"customdata")}}if(Z){var he=e.castOption(X,K.i,"texttemplate");if(!he)K.text="";else{var oe=xe(K),le=p.getFirstFilled(X.text,K.pts);(d(le)||le==="")&&(oe.text=le),K.text=e.texttemplateString({data:[oe,X._meta],fallback:X.texttemplatefallback,labels:oe,locale:H._fullLayout._d3locale,template:he})}}}function U(H,K){var V=H.rotate*Math.PI/180,$=Math.cos(V),X=Math.sin(V),Z=(K.left+K.right)/2,Q=(K.top+K.bottom)/2;H.textX=Z*$-Q*X,H.textY=Z*X+Q*$,H.noCenter=!0}N.exports={plot:y,formatSliceLabel:ae,transformInsideText:g,determineInsideTextFont:T,positionTitleOutside:z,prerenderTitles:E,layoutAreas:q,attachFxHandlers:x,computeTransform:U}}}),dz=De({"src/traces/pie/style.js"(j,N){"use strict";var u=Qn(),v=vm(),w=Yf().resizeText;N.exports=function(l){var e=l._fullLayout._pielayer.selectAll(".trace");w(l,e,"pie"),e.each(function(t){var a=t[0],r=a.trace,n=u.select(this);n.style({opacity:r.opacity}),n.selectAll("path.surface").each(function(i){u.select(this).call(v,i,r,l)})})}}}),vz=De({"src/traces/pie/base_plot.js"(j){"use strict";var N=Il();j.name="pie",j.plot=function(u,v,w,S){N.plotBasePlot(j.name,u,v,w,S)},j.clean=function(u,v,w,S){N.cleanBasePlot(j.name,u,v,w,S)}}}),pz=De({"src/traces/pie/index.js"(j,N){"use strict";N.exports={attributes:Op(),supplyDefaults:Np().supplyDefaults,supplyLayoutDefaults:fz(),layoutAttributes:$x(),calc:Cm().calc,crossTraceCalc:Cm().crossTraceCalc,plot:Kx().plot,style:dz(),styleOne:vm(),moduleType:"trace",name:"pie",basePlotModule:vz(),categories:["pie-like","pie","showLegend"],meta:{}}}}),mz=De({"lib/pie.js"(j,N){"use strict";N.exports=pz()}}),gz=De({"src/traces/sunburst/base_plot.js"(j){"use strict";var N=Il();j.name="sunburst",j.plot=function(u,v,w,S){N.plotBasePlot(j.name,u,v,w,S)},j.clean=function(u,v,w,S){N.cleanBasePlot(j.name,u,v,w,S)}}}),O5=De({"src/traces/sunburst/constants.js"(j,N){"use strict";N.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),X1=De({"src/traces/sunburst/attributes.js"(j,N){"use strict";var u=Bs(),{hovertemplateAttrs:v,texttemplateAttrs:w,templatefallbackAttrs:S}=Is(),l=ul(),e=ql().attributes,t=Op(),a=O5(),r=Ji().extendFlat,n=Hc().pattern;N.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},t.marker.line.color,{dflt:null}),width:r({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:n,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:w({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:S({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r({},u.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:v({},{keys:a.eventDataKeys}),hovertemplatefallback:S(),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:r({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),N5=De({"src/traces/sunburst/layout_attributes.js"(j,N){"use strict";N.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),yz=De({"src/traces/sunburst/defaults.js"(j,N){"use strict";var u=Ar(),v=X1(),w=ql().defaults,S=Bh().handleText,l=Np().handleMarkerDefaults,e=Dl(),t=e.hasColorscale,a=e.handleDefaults;N.exports=function(n,i,s,c){function p(T,E){return u.coerce(n,i,v,T,E)}var f=p("labels"),d=p("parents");if(!f||!f.length||!d||!d.length){i.visible=!1;return}var y=p("values");y&&y.length?p("branchvalues"):p("count"),p("level"),p("maxdepth"),l(n,i,c,p);var o=i._hasColorscale=t(n,"marker","colors")||(n.marker||{}).coloraxis;o&&a(n,i,c,p,{prefix:"marker.",cLetter:"c"}),p("leaf.opacity",o?1:.7);var x=p("text");p("texttemplate"),p("texttemplatefallback"),i.texttemplate||p("textinfo",u.isArrayOrTypedArray(x)?"text+label":"label"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback");var M="auto";S(n,i,c,p,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),p("insidetextorientation"),p("sort"),p("rotation"),p("root.color"),w(i,c,p),i._length=null}}}),_z=De({"src/traces/sunburst/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=N5();N.exports=function(S,l){function e(t,a){return u.coerce(S,l,v,t,a)}e("sunburstcolorway",l.colorway),e("extendsunburstcolors")}}}),Z1=De({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(j,N){(function(u,v){typeof j=="object"&&typeof N<"u"?v(j):(u=u||self,v(u.d3=u.d3||{}))})(j,function(u){"use strict";function v(ve,_e){return ve.parent===_e.parent?1:2}function w(ve){return ve.reduce(S,0)/ve.length}function S(ve,_e){return ve+_e.x}function l(ve){return 1+ve.reduce(e,0)}function e(ve,_e){return Math.max(ve,_e.y)}function t(ve){for(var _e;_e=ve.children;)ve=_e[0];return ve}function a(ve){for(var _e;_e=ve.children;)ve=_e[_e.length-1];return ve}function r(){var ve=v,_e=1,Ie=1,Be=!1;function We(Xe){var mt,ft=0;Xe.eachAfter(function(St){var hr=St.children;hr?(St.x=w(hr),St.y=l(hr)):(St.x=mt?ft+=ve(St,mt):0,St.y=0,mt=St)});var ht=t(Xe),gt=a(Xe),_t=ht.x-ve(ht,gt)/2,Ft=gt.x+ve(gt,ht)/2;return Xe.eachAfter(Be?function(St){St.x=(St.x-Xe.x)*_e,St.y=(Xe.y-St.y)*Ie}:function(St){St.x=(St.x-_t)/(Ft-_t)*_e,St.y=(1-(Xe.y?St.y/Xe.y:1))*Ie})}return We.separation=function(Xe){return arguments.length?(ve=Xe,We):ve},We.size=function(Xe){return arguments.length?(Be=!1,_e=+Xe[0],Ie=+Xe[1],We):Be?null:[_e,Ie]},We.nodeSize=function(Xe){return arguments.length?(Be=!0,_e=+Xe[0],Ie=+Xe[1],We):Be?[_e,Ie]:null},We}function n(ve){var _e=0,Ie=ve.children,Be=Ie&&Ie.length;if(!Be)_e=1;else for(;--Be>=0;)_e+=Ie[Be].value;ve.value=_e}function i(){return this.eachAfter(n)}function s(ve){var _e=this,Ie,Be=[_e],We,Xe,mt;do for(Ie=Be.reverse(),Be=[];_e=Ie.pop();)if(ve(_e),We=_e.children,We)for(Xe=0,mt=We.length;Xe=0;--We)Ie.push(Be[We]);return this}function p(ve){for(var _e=this,Ie=[_e],Be=[],We,Xe,mt;_e=Ie.pop();)if(Be.push(_e),We=_e.children,We)for(Xe=0,mt=We.length;Xe=0;)Ie+=Be[We].value;_e.value=Ie})}function d(ve){return this.eachBefore(function(_e){_e.children&&_e.children.sort(ve)})}function y(ve){for(var _e=this,Ie=o(_e,ve),Be=[_e];_e!==Ie;)_e=_e.parent,Be.push(_e);for(var We=Be.length;ve!==Ie;)Be.splice(We,0,ve),ve=ve.parent;return Be}function o(ve,_e){if(ve===_e)return ve;var Ie=ve.ancestors(),Be=_e.ancestors(),We=null;for(ve=Ie.pop(),_e=Be.pop();ve===_e;)We=ve,ve=Ie.pop(),_e=Be.pop();return We}function x(){for(var ve=this,_e=[ve];ve=ve.parent;)_e.push(ve);return _e}function M(){var ve=[];return this.each(function(_e){ve.push(_e)}),ve}function T(){var ve=[];return this.eachBefore(function(_e){_e.children||ve.push(_e)}),ve}function E(){var ve=this,_e=[];return ve.each(function(Ie){Ie!==ve&&_e.push({source:Ie.parent,target:Ie})}),_e}function g(ve,_e){var Ie=new _(ve),Be=+ve.value&&(Ie.value=ve.value),We,Xe=[Ie],mt,ft,ht,gt;for(_e==null&&(_e=m);We=Xe.pop();)if(Be&&(We.value=+We.data.value),(ft=_e(We.data))&&(gt=ft.length))for(We.children=new Array(gt),ht=gt-1;ht>=0;--ht)Xe.push(mt=We.children[ht]=new _(ft[ht])),mt.parent=We,mt.depth=We.depth+1;return Ie.eachBefore(b)}function A(){return g(this).eachBefore(h)}function m(ve){return ve.children}function h(ve){ve.data=ve.data.data}function b(ve){var _e=0;do ve.height=_e;while((ve=ve.parent)&&ve.height<++_e)}function _(ve){this.data=ve,this.depth=this.height=0,this.parent=null}_.prototype=g.prototype={constructor:_,count:i,each:s,eachAfter:p,eachBefore:c,sum:f,sort:d,path:y,ancestors:x,descendants:M,leaves:T,links:E,copy:A};var I=Array.prototype.slice;function C(ve){for(var _e=ve.length,Ie,Be;_e;)Be=Math.random()*_e--|0,Ie=ve[_e],ve[_e]=ve[Be],ve[Be]=Ie;return ve}function F(ve){for(var _e=0,Ie=(ve=C(I.call(ve))).length,Be=[],We,Xe;_e0&&Ie*Ie>Be*Be+We*We}function k(ve,_e){for(var Ie=0;Ie<_e.length;++Ie)if(!D(ve,_e[Ie]))return!1;return!0}function B(ve){switch(ve.length){case 1:return O(ve[0]);case 2:return q(ve[0],ve[1]);case 3:return Y(ve[0],ve[1],ve[2])}}function O(ve){return{x:ve.x,y:ve.y,r:ve.r}}function q(ve,_e){var Ie=ve.x,Be=ve.y,We=ve.r,Xe=_e.x,mt=_e.y,ft=_e.r,ht=Xe-Ie,gt=mt-Be,_t=ft-We,Ft=Math.sqrt(ht*ht+gt*gt);return{x:(Ie+Xe+ht/Ft*_t)/2,y:(Be+mt+gt/Ft*_t)/2,r:(Ft+We+ft)/2}}function Y(ve,_e,Ie){var Be=ve.x,We=ve.y,Xe=ve.r,mt=_e.x,ft=_e.y,ht=_e.r,gt=Ie.x,_t=Ie.y,Ft=Ie.r,St=Be-mt,hr=Be-gt,jr=We-ft,ra=We-_t,$r=ht-Xe,pa=Ft-Xe,oa=Be*Be+We*We-Xe*Xe,aa=oa-mt*mt-ft*ft+ht*ht,ka=oa-gt*gt-_t*_t+Ft*Ft,Ta=hr*jr-St*ra,Da=(jr*ka-ra*aa)/(Ta*2)-Be,La=(ra*$r-jr*pa)/Ta,Ga=(hr*aa-St*ka)/(Ta*2)-We,xa=(St*pa-hr*$r)/Ta,Gn=La*La+xa*xa-1,Pn=2*(Xe+Da*La+Ga*xa),sn=Da*Da+Ga*Ga-Xe*Xe,Yn=-(Gn?(Pn+Math.sqrt(Pn*Pn-4*Gn*sn))/(2*Gn):sn/Pn);return{x:Be+Da+La*Yn,y:We+Ga+xa*Yn,r:Yn}}function ee(ve,_e,Ie){var Be=ve.x-_e.x,We,Xe,mt=ve.y-_e.y,ft,ht,gt=Be*Be+mt*mt;gt?(Xe=_e.r+Ie.r,Xe*=Xe,ht=ve.r+Ie.r,ht*=ht,Xe>ht?(We=(gt+ht-Xe)/(2*gt),ft=Math.sqrt(Math.max(0,ht/gt-We*We)),Ie.x=ve.x-We*Be-ft*mt,Ie.y=ve.y-We*mt+ft*Be):(We=(gt+Xe-ht)/(2*gt),ft=Math.sqrt(Math.max(0,Xe/gt-We*We)),Ie.x=_e.x+We*Be-ft*mt,Ie.y=_e.y+We*mt+ft*Be)):(Ie.x=_e.x+Ie.r,Ie.y=_e.y)}function te(ve,_e){var Ie=ve.r+_e.r-1e-6,Be=_e.x-ve.x,We=_e.y-ve.y;return Ie>0&&Ie*Ie>Be*Be+We*We}function ae(ve){var _e=ve._,Ie=ve.next._,Be=_e.r+Ie.r,We=(_e.x*Ie.r+Ie.x*_e.r)/Be,Xe=(_e.y*Ie.r+Ie.y*_e.r)/Be;return We*We+Xe*Xe}function U(ve){this._=ve,this.next=null,this.previous=null}function H(ve){if(!(We=ve.length))return 0;var _e,Ie,Be,We,Xe,mt,ft,ht,gt,_t,Ft;if(_e=ve[0],_e.x=0,_e.y=0,!(We>1))return _e.r;if(Ie=ve[1],_e.x=-Ie.r,Ie.x=_e.r,Ie.y=0,!(We>2))return _e.r+Ie.r;ee(Ie,_e,Be=ve[2]),_e=new U(_e),Ie=new U(Ie),Be=new U(Be),_e.next=Be.previous=Ie,Ie.next=_e.previous=Be,Be.next=Ie.previous=_e;e:for(ft=3;ft0)throw new Error("cycle");return ft}return Ie.id=function(Be){return arguments.length?(ve=$(Be),Ie):ve},Ie.parentId=function(Be){return arguments.length?(_e=$(Be),Ie):_e},Ie}function ne(ve,_e){return ve.parent===_e.parent?1:2}function be(ve){var _e=ve.children;return _e?_e[0]:ve.t}function Fe(ve){var _e=ve.children;return _e?_e[_e.length-1]:ve.t}function Ve(ve,_e,Ie){var Be=Ie/(_e.i-ve.i);_e.c-=Be,_e.s+=Ie,ve.c+=Be,_e.z+=Ie,_e.m+=Ie}function je(ve){for(var _e=0,Ie=0,Be=ve.children,We=Be.length,Xe;--We>=0;)Xe=Be[We],Xe.z+=_e,Xe.m+=_e,_e+=Xe.s+(Ie+=Xe.c)}function ut(ve,_e,Ie){return ve.a.parent===_e.parent?ve.a:Ie}function st(ve,_e){this._=ve,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=_e}st.prototype=Object.create(_.prototype);function yt(ve){for(var _e=new st(ve,0),Ie,Be=[_e],We,Xe,mt,ft;Ie=Be.pop();)if(Xe=Ie._.children)for(Ie.children=new Array(ft=Xe.length),mt=ft-1;mt>=0;--mt)Be.push(We=Ie.children[mt]=new st(Xe[mt],mt)),We.parent=Ie;return(_e.parent=new st(null,0)).children=[_e],_e}function At(){var ve=ne,_e=1,Ie=1,Be=null;function We(gt){var _t=yt(gt);if(_t.eachAfter(Xe),_t.parent.m=-_t.z,_t.eachBefore(mt),Be)gt.eachBefore(ht);else{var Ft=gt,St=gt,hr=gt;gt.eachBefore(function(oa){oa.xSt.x&&(St=oa),oa.depth>hr.depth&&(hr=oa)});var jr=Ft===St?1:ve(Ft,St)/2,ra=jr-Ft.x,$r=_e/(St.x+jr+ra),pa=Ie/(hr.depth||1);gt.eachBefore(function(oa){oa.x=(oa.x+ra)*$r,oa.y=oa.depth*pa})}return gt}function Xe(gt){var _t=gt.children,Ft=gt.parent.children,St=gt.i?Ft[gt.i-1]:null;if(_t){je(gt);var hr=(_t[0].z+_t[_t.length-1].z)/2;St?(gt.z=St.z+ve(gt._,St._),gt.m=gt.z-hr):gt.z=hr}else St&&(gt.z=St.z+ve(gt._,St._));gt.parent.A=ft(gt,St,gt.parent.A||Ft[0])}function mt(gt){gt._.x=gt.z+gt.parent.m,gt.m+=gt.parent.m}function ft(gt,_t,Ft){if(_t){for(var St=gt,hr=gt,jr=_t,ra=St.parent.children[0],$r=St.m,pa=hr.m,oa=jr.m,aa=ra.m,ka;jr=Fe(jr),St=be(St),jr&&St;)ra=be(ra),hr=Fe(hr),hr.a=gt,ka=jr.z+oa-St.z-$r+ve(jr._,St._),ka>0&&(Ve(ut(jr,gt,Ft),gt,ka),$r+=ka,pa+=ka),oa+=jr.m,$r+=St.m,aa+=ra.m,pa+=hr.m;jr&&!Fe(hr)&&(hr.t=jr,hr.m+=oa-pa),St&&!be(ra)&&(ra.t=St,ra.m+=$r-aa,Ft=gt)}return Ft}function ht(gt){gt.x*=_e,gt.y=gt.depth*Ie}return We.separation=function(gt){return arguments.length?(ve=gt,We):ve},We.size=function(gt){return arguments.length?(Be=!1,_e=+gt[0],Ie=+gt[1],We):Be?null:[_e,Ie]},We.nodeSize=function(gt){return arguments.length?(Be=!0,_e=+gt[0],Ie=+gt[1],We):Be?[_e,Ie]:null},We}function Pt(ve,_e,Ie,Be,We){for(var Xe=ve.children,mt,ft=-1,ht=Xe.length,gt=ve.value&&(We-Ie)/ve.value;++ftoa&&(oa=gt),Da=$r*$r*Ta,aa=Math.max(oa/Da,Da/pa),aa>ka){$r-=gt;break}ka=aa}mt.push(ht={value:$r,dice:hr1?Be:1)},Ie}(Zt);function Kt(){var ve=Nt,_e=!1,Ie=1,Be=1,We=[0],Xe=X,mt=X,ft=X,ht=X,gt=X;function _t(St){return St.x0=St.y0=0,St.x1=Ie,St.y1=Be,St.eachBefore(Ft),We=[0],_e&&St.eachBefore(Ae),St}function Ft(St){var hr=We[St.depth],jr=St.x0+hr,ra=St.y0+hr,$r=St.x1-hr,pa=St.y1-hr;$r=St-1){var oa=Xe[Ft];oa.x0=jr,oa.y0=ra,oa.x1=$r,oa.y1=pa;return}for(var aa=gt[Ft],ka=hr/2+aa,Ta=Ft+1,Da=St-1;Ta>>1;gt[La]pa-ra){var Gn=(jr*xa+$r*Ga)/hr;_t(Ft,Ta,Ga,jr,ra,Gn,pa),_t(Ta,St,xa,Gn,ra,$r,pa)}else{var Pn=(ra*xa+pa*Ga)/hr;_t(Ft,Ta,Ga,jr,ra,$r,Pn),_t(Ta,St,xa,jr,Pn,$r,pa)}}}function Ee(ve,_e,Ie,Be,We){(ve.depth&1?Pt:Se)(ve,_e,Ie,Be,We)}var ze=function ve(_e){function Ie(Be,We,Xe,mt,ft){if((ht=Be._squarify)&&ht.ratio===_e)for(var ht,gt,_t,Ft,St=-1,hr,jr=ht.length,ra=Be.value;++St1?Be:1)},Ie}(Zt);u.cluster=r,u.hierarchy=g,u.pack=re,u.packEnclose=F,u.packSiblings=K,u.partition=Ce,u.stratify=le,u.tree=At,u.treemap=Kt,u.treemapBinary=nt,u.treemapDice=Se,u.treemapResquarify=ze,u.treemapSlice=Pt,u.treemapSliceDice=Ee,u.treemapSquarify=Nt,Object.defineProperty(u,"__esModule",{value:!0})})}}),$1=De({"src/traces/sunburst/calc.js"(j){"use strict";var N=Z1(),u=io(),v=Ar(),w=Dl().makeColorScaleFuncFromTrace,S=Cm().makePullColorFn,l=Cm().generateExtendedColors,e=Dl().calc,t=Ho().ALMOST_EQUAL,a={},r={},n={};j.calc=function(s,c){var p=s._fullLayout,f=c.ids,d=v.isArrayOrTypedArray(f),y=c.labels,o=c.parents,x=c.values,M=v.isArrayOrTypedArray(x),T=[],E={},g={},A=function(K,V){E[K]?E[K].push(V):E[K]=[V],g[V]=1},m=function(K){return K||typeof K=="number"},h=function(K){return!M||u(x[K])&&x[K]>=0},b,_,I;d?(b=Math.min(f.length,o.length),_=function(K){return m(f[K])&&h(K)},I=function(K){return String(f[K])}):(b=Math.min(y.length,o.length),_=function(K){return m(y[K])&&h(K)},I=function(K){return String(y[K])}),M&&(b=Math.min(b,x.length));for(var C=0;C1){for(var B=v.randstr(),O=0;O>8&15|N>>4&240,N>>4&15|N&240,(N&15)<<4|N&15,1):u===8?K1(N>>24&255,N>>16&255,N>>8&255,(N&255)/255):u===4?K1(N>>12&15|N>>8&240,N>>8&15|N>>4&240,N>>4&15|N&240,((N&15)<<4|N&15)/255):null):(N=Z5.exec(j))?new df(N[1],N[2],N[3],1):(N=$5.exec(j))?new df(N[1]*255/100,N[2]*255/100,N[3]*255/100,1):(N=K5.exec(j))?K1(N[1],N[2],N[3],N[4]):(N=J5.exec(j))?K1(N[1]*255/100,N[2]*255/100,N[3]*255/100,N[4]):(N=Q5.exec(j))?H5(N[1],N[2]/100,N[3]/100,1):(N=eA.exec(j))?H5(N[1],N[2]/100,N[3]/100,N[4]):rb.hasOwnProperty(j)?q5(rb[j]):j==="transparent"?new df(NaN,NaN,NaN,0):null}function q5(j){return new df(j>>16&255,j>>8&255,j&255,1)}function K1(j,N,u,v){return v<=0&&(j=N=u=NaN),new df(j,N,u,v)}function Qx(j){return j instanceof Jd||(j=Pm(j)),j?(j=j.rgb(),new df(j.r,j.g,j.b,j.opacity)):new df}function J1(j,N,u,v){return arguments.length===1?Qx(j):new df(j,N,u,v??1)}function df(j,N,u,v){this.r=+j,this.g=+N,this.b=+u,this.opacity=+v}function G5(){return`#${Kv(this.r)}${Kv(this.g)}${Kv(this.b)}`}function wz(){return`#${Kv(this.r)}${Kv(this.g)}${Kv(this.b)}${Kv((isNaN(this.opacity)?1:this.opacity)*255)}`}function V5(){let j=Q1(this.opacity);return`${j===1?"rgb(":"rgba("}${$v(this.r)}, ${$v(this.g)}, ${$v(this.b)}${j===1?")":`, ${j})`}`}function Q1(j){return isNaN(j)?1:Math.max(0,Math.min(1,j))}function $v(j){return Math.max(0,Math.min(255,Math.round(j)||0))}function Kv(j){return j=$v(j),(j<16?"0":"")+j.toString(16)}function H5(j,N,u,v){return v<=0?j=N=u=NaN:u<=0||u>=1?j=N=NaN:N<=0&&(j=NaN),new rd(j,N,u,v)}function W5(j){if(j instanceof rd)return new rd(j.h,j.s,j.l,j.opacity);if(j instanceof Jd||(j=Pm(j)),!j)return new rd;if(j instanceof rd)return j;j=j.rgb();var N=j.r/255,u=j.g/255,v=j.b/255,w=Math.min(N,u,v),S=Math.max(N,u,v),l=NaN,e=S-w,t=(S+w)/2;return e?(N===S?l=(u-v)/e+(u0&&t<1?0:l,new rd(l,e,t,j.opacity)}function eb(j,N,u,v){return arguments.length===1?W5(j):new rd(j,N,u,v??1)}function rd(j,N,u,v){this.h=+j,this.s=+N,this.l=+u,this.opacity=+v}function Y5(j){return j=(j||0)%360,j<0?j+360:j}function eg(j){return Math.max(0,Math.min(1,j||0))}function tb(j,N,u){return(j<60?N+(u-N)*j/60:j<180?u:j<240?N+(u-N)*(240-j)/60:N)*255}var Qd,Jv,Qv,Up,ad,X5,Z5,$5,K5,J5,Q5,eA,rb,ab=di({"node_modules/d3-color/src/color.js"(){Jx(),Qd=.7,Jv=1/Qd,Qv="\\s*([+-]?\\d+)\\s*",Up="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",ad="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",X5=/^#([0-9a-f]{3,8})$/,Z5=new RegExp(`^rgb\\(${Qv},${Qv},${Qv}\\)$`),$5=new RegExp(`^rgb\\(${ad},${ad},${ad}\\)$`),K5=new RegExp(`^rgba\\(${Qv},${Qv},${Qv},${Up}\\)$`),J5=new RegExp(`^rgba\\(${ad},${ad},${ad},${Up}\\)$`),Q5=new RegExp(`^hsl\\(${Up},${ad},${ad}\\)$`),eA=new RegExp(`^hsla\\(${Up},${ad},${ad},${Up}\\)$`),rb={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},jp(Jd,Pm,{copy(j){return Object.assign(new this.constructor,this,j)},displayable(){return this.rgb().displayable()},hex:j5,formatHex:j5,formatHex8:xz,formatHsl:bz,formatRgb:U5,toString:U5}),jp(df,J1,Lm(Jd,{brighter(j){return j=j==null?Jv:Math.pow(Jv,j),new df(this.r*j,this.g*j,this.b*j,this.opacity)},darker(j){return j=j==null?Qd:Math.pow(Qd,j),new df(this.r*j,this.g*j,this.b*j,this.opacity)},rgb(){return this},clamp(){return new df($v(this.r),$v(this.g),$v(this.b),Q1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:G5,formatHex:G5,formatHex8:wz,formatRgb:V5,toString:V5})),jp(rd,eb,Lm(Jd,{brighter(j){return j=j==null?Jv:Math.pow(Jv,j),new rd(this.h,this.s,this.l*j,this.opacity)},darker(j){return j=j==null?Qd:Math.pow(Qd,j),new rd(this.h,this.s,this.l*j,this.opacity)},rgb(){var j=this.h%360+(this.h<0)*360,N=isNaN(j)||isNaN(this.s)?0:this.s,u=this.l,v=u+(u<.5?u:1-u)*N,w=2*u-v;return new df(tb(j>=240?j-240:j+120,w,v),tb(j,w,v),tb(j<120?j+240:j-120,w,v),this.opacity)},clamp(){return new rd(Y5(this.h),eg(this.s),eg(this.l),Q1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let j=Q1(this.opacity);return`${j===1?"hsl(":"hsla("}${Y5(this.h)}, ${eg(this.s)*100}%, ${eg(this.l)*100}%${j===1?")":`, ${j})`}`}}))}}),nb,ib,tA=di({"node_modules/d3-color/src/math.js"(){nb=Math.PI/180,ib=180/Math.PI}});function rA(j){if(j instanceof dd)return new dd(j.l,j.a,j.b,j.opacity);if(j instanceof Id)return aA(j);j instanceof df||(j=Qx(j));var N=cb(j.r),u=cb(j.g),v=cb(j.b),w=sb((.2225045*N+.7168786*u+.0606169*v)/db),S,l;return N===u&&u===v?S=l=w:(S=sb((.4360747*N+.3850649*u+.1430804*v)/hb),l=sb((.0139322*N+.0971045*u+.7141733*v)/vb)),new dd(116*w-16,500*(S-w),200*(w-l),j.opacity)}function ob(j,N,u,v){return arguments.length===1?rA(j):new dd(j,N,u,v??1)}function dd(j,N,u,v){this.l=+j,this.a=+N,this.b=+u,this.opacity=+v}function sb(j){return j>nA?Math.pow(j,.3333333333333333):j/mb+pb}function lb(j){return j>ep?j*j*j:mb*(j-pb)}function ub(j){return 255*(j<=.0031308?12.92*j:1.055*Math.pow(j,.4166666666666667)-.055)}function cb(j){return(j/=255)<=.04045?j/12.92:Math.pow((j+.055)/1.055,2.4)}function Az(j){if(j instanceof Id)return new Id(j.h,j.c,j.l,j.opacity);if(j instanceof dd||(j=rA(j)),j.a===0&&j.b===0)return new Id(NaN,0=1?(u=1,N-1):Math.floor(u*N),w=j[v],S=j[v+1],l=v>0?j[v-1]:2*w-S,e=v()=>j}});function cA(j,N){return function(u){return j+u*N}}function Ez(j,N,u){return j=Math.pow(j,u),N=Math.pow(N,u)-j,u=1/u,function(v){return Math.pow(j+v*N,u)}}function ag(j,N){var u=N-j;return u?cA(j,u>180||u<-180?u-360*Math.round(u/360):u):Dm(isNaN(j)?N:j)}function kz(j){return(j=+j)==1?vf:function(N,u){return u-N?Ez(N,u,j):Dm(isNaN(N)?u:N)}}function vf(j,N){var u=N-j;return u?cA(j,u):Dm(isNaN(j)?N:j)}var Vp=di({"node_modules/d3-interpolate/src/color.js"(){uA()}});function fA(j){return function(N){var u=N.length,v=new Array(u),w=new Array(u),S=new Array(u),l,e;for(l=0;lu&&(S=N.slice(u,S),e[l]?e[l]+=S:e[++l]=S),(v=v[0])===(w=w[0])?e[l]?e[l]+=w:e[++l]=w:(e[++l]=null,t.push({i:l,x:vd(v,w)})),u=sg.lastIndex;return u180?r+=360:r-a>180&&(a+=360),i.push({i:n.push(w(n)+"rotate(",null,v)-2,x:vd(a,r)})):r&&n.push(w(n)+"rotate("+r+v)}function e(a,r,n,i){a!==r?i.push({i:n.push(w(n)+"skewX(",null,v)-2,x:vd(a,r)}):r&&n.push(w(n)+"skewX("+r+v)}function t(a,r,n,i,s,c){if(a!==n||r!==i){var p=s.push(w(s)+"scale(",null,",",null,")");c.push({i:p-4,x:vd(a,n)},{i:p-2,x:vd(r,i)})}else(n!==1||i!==1)&&s.push(w(s)+"scale("+n+","+i+")")}return function(a,r){var n=[],i=[];return a=j(a),r=j(r),S(a.translateX,a.translateY,r.translateX,r.translateY,n,i),l(a.rotate,r.rotate,n,i),e(a.skewX,r.skewX,n,i),t(a.scaleX,a.scaleY,r.scaleX,r.scaleY,n,i),a=r=null,function(s){for(var c=-1,p=i.length,f;++clg,interpolateArray:()=>Cz,interpolateBasis:()=>oA,interpolateBasisClosed:()=>sA,interpolateCubehelix:()=>OA,interpolateCubehelixLong:()=>NA,interpolateDate:()=>yA,interpolateDiscrete:()=>Rz,interpolateHcl:()=>FA,interpolateHclLong:()=>zA,interpolateHsl:()=>RA,interpolateHslLong:()=>IA,interpolateHue:()=>Dz,interpolateLab:()=>Yz,interpolateNumber:()=>vd,interpolateNumberArray:()=>Ab,interpolateObject:()=>xA,interpolateRgb:()=>ng,interpolateRgbBasis:()=>hA,interpolateRgbBasisClosed:()=>dA,interpolateRound:()=>zz,interpolateString:()=>wA,interpolateTransformCss:()=>SA,interpolateTransformSvg:()=>EA,interpolateZoom:()=>LA,piecewise:()=>Kz,quantize:()=>Qz});var Hp=di({"node_modules/d3-interpolate/src/index.js"(){ug(),gA(),wb(),lA(),_A(),Iz(),Fz(),ig(),Tb(),bA(),Bz(),AA(),qz(),Hz(),vA(),Wz(),Xz(),Zz(),$z(),Jz(),eB()}}),Sb=De({"src/traces/sunburst/fill_one.js"(j,N){"use strict";var u=Ki(),v=ii();N.exports=function(S,l,e,t,a){var r=l.data.data,n=r.i,i=a||r.color;if(n>=0){l.i=r.i;var s=e.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=i,l.color=i):(s.color=i,l.color=i),u.pointStyle(S,e,t,l)}else v.fill(S,i)}}}),jA=De({"src/traces/sunburst/style.js"(j,N){"use strict";var u=Qn(),v=ii(),w=Ar(),S=Yf().resizeText,l=Sb();function e(a){var r=a._fullLayout._sunburstlayer.selectAll(".trace");S(a,r,"sunburst"),r.each(function(n){var i=u.select(this),s=n[0],c=s.trace;i.style("opacity",c.opacity),i.selectAll("path.surface").each(function(p){u.select(this).call(t,p,c,a)})})}function t(a,r,n,i){var s=r.data.data,c=!r.children,p=s.i,f=w.castOption(n,p,"marker.line.color")||v.defaultLine,d=w.castOption(n,p,"marker.line.width")||0;a.call(l,r,n,i).style("stroke-width",d).call(v.stroke,f).style("opacity",c?n.leaf.opacity:null)}N.exports={style:e,styleOne:t}}}),ev=De({"src/traces/sunburst/helpers.js"(j){"use strict";var N=Ar(),u=ii(),v=ld(),w=Hv();j.findEntryWithLevel=function(t,a){var r;return a&&t.eachAfter(function(n){if(j.getPtId(n)===a)return r=n.copy()}),r||t},j.findEntryWithChild=function(t,a){var r;return t.eachAfter(function(n){for(var i=n.children||[],s=0;s0)},j.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},j.isHeader=function(t,a){return!(j.isLeaf(t)||t.depth===a._maxDepth-1)};function e(t){return t.data.data.pid}j.getParent=function(t,a){return j.findEntryWithLevel(t,e(a))},j.listPath=function(t,a){var r=t.parent;if(!r)return[];var n=a?[r.data[a]]:[r];return j.listPath(r,a).concat(n)},j.getPath=function(t){return j.listPath(t,"label").join("/")+"/"},j.formatValue=w.formatPieValue,j.formatPercent=function(t,a){var r=N.formatPercent(t,0);return r==="0%"&&(r=w.formatPiePercent(t,a)),r}}}),hg=De({"src/traces/sunburst/fx.js"(j,N){"use strict";var u=Qn(),v=hi(),w=Ch().appendArrayPointValue,S=uu(),l=Ar(),e=cm(),t=ev(),a=Hv(),r=a.formatPieValue;N.exports=function(s,c,p,f,d){var y=f[0],o=y.trace,x=y.hierarchy,M=o.type==="sunburst",T=o.type==="treemap"||o.type==="icicle";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1);var E=function(m){var h=p._fullLayout;if(!(p._dragging||h.hovermode===!1)){var b=p._fullData[o.index],_=m.data.data,I=_.i,C=t.isHierarchyRoot(m),F=t.getParent(x,m),R=t.getValue(m),z=function(Q){return l.castOption(b,I,Q)},D=z("hovertemplate"),k=S.castHoverinfo(b,h,I),B=h.separators,O;if(D||k&&k!=="none"&&k!=="skip"){var q,Y;M&&(q=y.cx+m.pxmid[0]*(1-m.rInscribed),Y=y.cy+m.pxmid[1]*(1-m.rInscribed)),T&&(q=m._hoverX,Y=m._hoverY);var ee={},te=[],ae=[],U=function(Q){return te.indexOf(Q)!==-1};k&&(te=k==="all"?b._module.attributes.hoverinfo.flags:k.split("+")),ee.label=_.label,U("label")&&ee.label&&ae.push(ee.label),_.hasOwnProperty("v")&&(ee.value=_.v,ee.valueLabel=r(ee.value,B),U("value")&&ae.push(ee.valueLabel)),ee.currentPath=m.currentPath=t.getPath(m.data),U("current path")&&!C&&ae.push(ee.currentPath);var H,K=[],V=function(){K.indexOf(H)===-1&&(ae.push(H),K.push(H))};ee.percentParent=m.percentParent=R/t.getValue(F),ee.parent=m.parentString=t.getPtLabel(F),U("percent parent")&&(H=t.formatPercent(ee.percentParent,B)+" of "+ee.parent,V()),ee.percentEntry=m.percentEntry=R/t.getValue(c),ee.entry=m.entry=t.getPtLabel(c),U("percent entry")&&!C&&!m.onPathbar&&(H=t.formatPercent(ee.percentEntry,B)+" of "+ee.entry,V()),ee.percentRoot=m.percentRoot=R/t.getValue(x),ee.root=m.root=t.getPtLabel(x),U("percent root")&&!C&&(H=t.formatPercent(ee.percentRoot,B)+" of "+ee.root,V()),ee.text=z("hovertext")||z("text"),U("text")&&(H=ee.text,l.isValidTextValue(H)&&ae.push(H)),O=[n(m,b,d.eventDataKeys)];var $={trace:b,y:Y,_x0:m._x0,_x1:m._x1,_y0:m._y0,_y1:m._y1,text:ae.join("
"),name:D||U("name")?b.name:void 0,color:z("hoverlabel.bgcolor")||_.color,borderColor:z("hoverlabel.bordercolor"),fontFamily:z("hoverlabel.font.family"),fontSize:z("hoverlabel.font.size"),fontColor:z("hoverlabel.font.color"),fontWeight:z("hoverlabel.font.weight"),fontStyle:z("hoverlabel.font.style"),fontVariant:z("hoverlabel.font.variant"),nameLength:z("hoverlabel.namelength"),textAlign:z("hoverlabel.align"),hovertemplate:D,hovertemplateLabels:ee,eventData:O};M&&($.x0=q-m.rInscribed*m.rpx1,$.x1=q+m.rInscribed*m.rpx1,$.idealAlign=m.pxmid[0]<0?"left":"right"),T&&($.x=q,$.idealAlign=q<0?"left":"right");var X=[];S.loneHover($,{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:p,inOut_bbox:X}),O[0].bbox=X[0],o._hasHoverLabel=!0}if(T){var Z=s.select("path.surface");d.styleOne(Z,m,b,p,{hovered:!0})}o._hasHoverEvent=!0,p.emit("plotly_hover",{points:O||[n(m,b,d.eventDataKeys)],event:u.event})}},g=function(m){var h=p._fullLayout,b=p._fullData[o.index],_=u.select(this).datum();if(o._hasHoverEvent&&(m.originalEvent=u.event,p.emit("plotly_unhover",{points:[n(_,b,d.eventDataKeys)],event:u.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(S.loneUnhover(h._hoverlayer.node()),o._hasHoverLabel=!1),T){var I=s.select("path.surface");d.styleOne(I,_,b,p,{hovered:!1})}},A=function(m){var h=p._fullLayout,b=p._fullData[o.index],_=M&&(t.isHierarchyRoot(m)||t.isLeaf(m)),I=t.getPtId(m),C=t.isEntry(m)?t.findEntryWithChild(x,I):t.findEntryWithLevel(x,I),F=t.getPtId(C),R={points:[n(m,b,d.eventDataKeys)],event:u.event};_||(R.nextLevel=F);var z=e.triggerHandler(p,"plotly_"+o.type+"click",R);if(z!==!1&&h.hovermode&&(p._hoverdata=[n(m,b,d.eventDataKeys)],S.click(p,u.event)),!_&&z!==!1&&!p._dragging&&!p._transitioning){v.call("_storeDirectGUIEdit",b,h._tracePreGUI[b.uid],{level:b.level});var D={data:[{level:F}],traces:[o.index]},k={frame:{redraw:!1,duration:d.transitionTime},transition:{duration:d.transitionTime,easing:d.transitionEasing},mode:"immediate",fromcurrent:!0};S.loneUnhover(h._hoverlayer.node()),v.call("animate",p,D,k)}};s.on("mouseover",E),s.on("mouseout",g),s.on("click",A)};function n(i,s,c){for(var p=i.data.data,f={curveNumber:s.index,pointNumber:p.i,data:s._input,fullData:s},d=0;dVe.x1?2*Math.PI:0)+Q;je=ne.rpx1Ce?2*Math.PI:0)+Q;Fe={x0:je,x1:je}}else Fe={rpx0:te,rpx1:te},S.extendFlat(Fe,le(ne));else Fe={rpx0:0,rpx1:0};else Fe={x0:Q,x1:Q};return v(Fe,Ve)}function oe(ne){var be=K[y.getPtId(ne)],Fe,Ve=ne.transform;if(be)Fe=be;else if(Fe={rpx1:ne.rpx1,transform:{textPosAngle:Ve.textPosAngle,scale:0,rotate:Ve.rotate,rCenter:Ve.rCenter,x:Ve.x,y:Ve.y}},H)if(ne.parent)if(Ce){var je=ne.x1>Ce?2*Math.PI:0;Fe.x0=Fe.x1=je}else S.extendFlat(Fe,le(ne));else Fe.x0=Fe.x1=Q;else Fe.x0=Fe.x1=Q;var ut=v(Fe.transform.textPosAngle,ne.transform.textPosAngle),st=v(Fe.rpx1,ne.rpx1),yt=v(Fe.x0,ne.x0),At=v(Fe.x1,ne.x1),Pt=v(Fe.transform.scale,Ve.scale),Zt=v(Fe.transform.rotate,Ve.rotate),vr=Ve.rCenter===0?3:Fe.transform.rCenter===0?1/3:1,Nt=v(Fe.transform.rCenter,Ve.rCenter),Kt=function(nt){return Nt(Math.pow(nt,vr))};return function(nt){var Ee=st(nt),ze=yt(nt),ve=At(nt),_e=Kt(nt),Ie=me(Ee,(ze+ve)/2),Be=ut(nt),We={pxmid:Ie,rpx1:Ee,transform:{textPosAngle:Be,rCenter:_e,x:Ve.x,y:Ve.y}};return t(z.type,Ve,_),{transform:{targetX:Ae(We),targetY:Se(We),scale:Pt(nt),rotate:Zt(nt),rCenter:_e}}}}function le(ne){var be=ne.parent,Fe=K[y.getPtId(be)],Ve={};if(Fe){var je=be.children,ut=je.indexOf(ne),st=je.length,yt=v(Fe.x0,Fe.x1);Ve.x0=yt(ut/st),Ve.x1=yt(ut/st)}else Ve.x0=Ve.x1=0;return Ve}}function x(g){return u.partition().size([2*Math.PI,g.height+1])(g)}j.formatSliceLabel=function(g,A,m,h,b){var _=m.texttemplate,I=m.textinfo;if(!_&&(!I||I==="none"))return"";var C=b.separators,F=h[0],R=g.data.data,z=F.hierarchy,D=y.isHierarchyRoot(g),k=y.getParent(z,g),B=y.getValue(g);if(!_){var O=I.split("+"),q=function(X){return O.indexOf(X)!==-1},Y=[],ee;if(q("label")&&R.label&&Y.push(R.label),R.hasOwnProperty("v")&&q("value")&&Y.push(y.formatValue(R.v,C)),!D){q("current path")&&Y.push(y.getPath(g.data));var te=0;q("percent parent")&&te++,q("percent entry")&&te++,q("percent root")&&te++;var ae=te>1;if(te){var U,H=function(X){ee=y.formatPercent(U,C),ae&&(ee+=" of "+X),Y.push(ee)};q("percent parent")&&!D&&(U=B/y.getValue(k),H("parent")),q("percent entry")&&(U=B/y.getValue(A),H("entry")),q("percent root")&&(U=B/y.getValue(z),H("root"))}}return q("text")&&(ee=S.castOption(m,R.i,"text"),S.isValidTextValue(ee)&&Y.push(ee)),Y.join("
")}var K=S.castOption(m,R.i,"texttemplate");if(!K)return"";var V={};R.label&&(V.label=R.label),R.hasOwnProperty("v")&&(V.value=R.v,V.valueLabel=y.formatValue(R.v,C)),V.currentPath=y.getPath(g.data),D||(V.percentParent=B/y.getValue(k),V.percentParentLabel=y.formatPercent(V.percentParent,C),V.parent=y.getPtLabel(k)),V.percentEntry=B/y.getValue(A),V.percentEntryLabel=y.formatPercent(V.percentEntry,C),V.entry=y.getPtLabel(A),V.percentRoot=B/y.getValue(z),V.percentRootLabel=y.formatPercent(V.percentRoot,C),V.root=y.getPtLabel(z),R.hasOwnProperty("color")&&(V.color=R.color);var $=S.castOption(m,R.i,"text");return(S.isValidTextValue($)||$==="")&&(V.text=$),V.customdata=S.castOption(m,R.i,"customdata"),S.texttemplateString({data:[V,m._meta],fallback:m.texttemplatefallback,labels:V,locale:b._d3locale,template:K})};function M(g){return g.rpx0===0&&S.isFullCircle([g.x0,g.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(g.halfangle)),g.ring/2))}function T(g){return E(g.rpx1,g.transform.textPosAngle)}function E(g,A){return[g*Math.sin(A),-g*Math.cos(A)]}}}),tB=De({"src/traces/sunburst/index.js"(j,N){"use strict";N.exports={moduleType:"trace",name:"sunburst",basePlotModule:gz(),categories:[],animatable:!0,attributes:X1(),layoutAttributes:N5(),supplyDefaults:yz(),supplyLayoutDefaults:_z(),calc:$1().calc,crossTraceCalc:$1().crossTraceCalc,plot:Eb().plot,style:jA().style,colorbar:Nf(),meta:{}}}}),rB=De({"lib/sunburst.js"(j,N){"use strict";N.exports=tB()}}),aB=De({"src/traces/treemap/base_plot.js"(j){"use strict";var N=Il();j.name="treemap",j.plot=function(u,v,w,S){N.plotBasePlot(j.name,u,v,w,S)},j.clean=function(u,v,w,S){N.cleanBasePlot(j.name,u,v,w,S)}}}),Wp=De({"src/traces/treemap/constants.js"(j,N){"use strict";N.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),kb=De({"src/traces/treemap/attributes.js"(j,N){"use strict";var{hovertemplateAttrs:u,texttemplateAttrs:v,templatefallbackAttrs:w}=Is(),S=ul(),l=ql().attributes,e=Op(),t=X1(),a=Wp(),r=Ji().extendFlat,n=Hc().pattern;N.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:r({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:t.marker.colors,pattern:n,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:v({editType:"plot"},{keys:a.eventDataKeys.concat(["label","value"])}),texttemplatefallback:w({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:u({},{keys:a.eventDataKeys}),hovertemplatefallback:w(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:t.root,domain:l({name:"treemap",trace:!0,editType:"calc"})}}}),UA=De({"src/traces/treemap/layout_attributes.js"(j,N){"use strict";N.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),nB=De({"src/traces/treemap/defaults.js"(j,N){"use strict";var u=Ar(),v=kb(),w=ii(),S=ql().defaults,l=Bh().handleText,e=Zv().TEXTPAD,t=Np().handleMarkerDefaults,a=Dl(),r=a.hasColorscale,n=a.handleDefaults;N.exports=function(s,c,p,f){function d(b,_){return u.coerce(s,c,v,b,_)}var y=d("labels"),o=d("parents");if(!y||!y.length||!o||!o.length){c.visible=!1;return}var x=d("values");x&&x.length?d("branchvalues"):d("count"),d("level"),d("maxdepth");var M=d("tiling.packing");M==="squarify"&&d("tiling.squarifyratio"),d("tiling.flip"),d("tiling.pad");var T=d("text");d("texttemplate"),d("texttemplatefallback"),c.texttemplate||d("textinfo",u.isArrayOrTypedArray(T)?"text+label":"label"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback");var E=d("pathbar.visible"),g="auto";l(s,c,f,d,g,{hasPathbar:E,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("textposition");var A=c.textposition.indexOf("bottom")!==-1;t(s,c,f,d);var m=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;m?n(s,c,f,d,{prefix:"marker.",cLetter:"c"}):d("marker.depthfade",!(c.marker.colors||[]).length);var h=c.textfont.size*2;d("marker.pad.t",A?h/4:h),d("marker.pad.l",h/4),d("marker.pad.r",h/4),d("marker.pad.b",A?h:h/4),d("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:w.contrast(f.paper_bgcolor)}}},E&&(d("pathbar.thickness",c.pathbar.textfont.size+2*e),d("pathbar.side"),d("pathbar.edgeshape")),d("sort"),d("root.color"),S(c,f,d),c._length=null}}}),iB=De({"src/traces/treemap/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=UA();N.exports=function(S,l){function e(t,a){return u.coerce(S,l,v,t,a)}e("treemapcolorway",l.colorway),e("extendtreemapcolors")}}}),qA=De({"src/traces/treemap/calc.js"(j){"use strict";var N=$1();j.calc=function(u,v){return N.calc(u,v)},j.crossTraceCalc=function(u){return N._runCrossTraceCalc("treemap",u)}}}),GA=De({"src/traces/treemap/flip_tree.js"(j,N){"use strict";N.exports=function u(v,w,S){var l;S.swapXY&&(l=v.x0,v.x0=v.y0,v.y0=l,l=v.x1,v.x1=v.y1,v.y1=l),S.flipX&&(l=v.x0,v.x0=w[0]-v.x1,v.x1=w[0]-l),S.flipY&&(l=v.y0,v.y0=w[1]-v.y1,v.y1=w[1]-l);var e=v.children;if(e)for(var t=0;t0)for(var h=0;h").join(" ")||"";var ae=v.ensureSingle(ee,"g","slicetext"),U=v.ensureSingle(ae,"text","",function(K){K.attr("data-notex",1)}),H=v.ensureUniformFontSize(s,a.determineTextFont(z,Y,F.font,{onPathbar:!0}));U.text(Y._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(w.font,H).call(S.convertToTspans,s),Y.textBB=w.bBox(U.node()),Y.transform=g(Y,{fontSize:H.size,onPathbar:!0}),Y.transform.fontSize=H.size,m?U.transition().attrTween("transform",function(K){var V=_(K,n,I,[o,x]);return function($){return A(V($))}}):U.attr("transform",A(Y))})}}}),sB=De({"src/traces/treemap/plot_one.js"(j,N){"use strict";var u=Qn(),v=(Hp(),ts(rp)).interpolate,w=ev(),S=Ar(),l=Zv().TEXTPAD,e=Rp(),t=e.toMoveInsideBar,a=Yf(),r=a.recordMinTextSize,n=Wp(),i=oB();function s(c){return w.isHierarchyRoot(c)?"":w.getPtId(c)}N.exports=function(p,f,d,y,o){var x=p._fullLayout,M=f[0],T=M.trace,E=T.type,g=E==="icicle",A=M.hierarchy,m=w.findEntryWithLevel(A,T.level),h=u.select(d),b=h.selectAll("g.pathbar"),_=h.selectAll("g.slice");if(!m){b.remove(),_.remove();return}var I=w.isHierarchyRoot(m),C=!x.uniformtext.mode&&w.hasTransition(y),F=w.getMaxDepth(T),R=function(Nt){return Nt.data.depth-m.data.depth-1?B+Y:-(q+Y):0,te={x0:O,x1:O,y0:ee,y1:ee+q},ae=function(Nt,Kt,nt){var Ee=T.tiling.pad,ze=function(Be){return Be-Ee<=Kt.x0},ve=function(Be){return Be+Ee>=Kt.x1},_e=function(Be){return Be-Ee<=Kt.y0},Ie=function(Be){return Be+Ee>=Kt.y1};return Nt.x0===Kt.x0&&Nt.x1===Kt.x1&&Nt.y0===Kt.y0&&Nt.y1===Kt.y1?{x0:Nt.x0,x1:Nt.x1,y0:Nt.y0,y1:Nt.y1}:{x0:ze(Nt.x0-Ee)?0:ve(Nt.x0-Ee)?nt[0]:Nt.x0,x1:ze(Nt.x1+Ee)?0:ve(Nt.x1+Ee)?nt[0]:Nt.x1,y0:_e(Nt.y0-Ee)?0:Ie(Nt.y0-Ee)?nt[1]:Nt.y0,y1:_e(Nt.y1+Ee)?0:Ie(Nt.y1+Ee)?nt[1]:Nt.y1}},U=null,H={},K={},V=null,$=function(Nt,Kt){return Kt?H[s(Nt)]:K[s(Nt)]},X=function(Nt,Kt,nt,Ee){if(Kt)return H[s(A)]||te;var ze=K[T.level]||nt;return R(Nt)?ae(Nt,ze,Ee):{}};M.hasMultipleRoots&&I&&F++,T._maxDepth=F,T._backgroundColor=x.paper_bgcolor,T._entryDepth=m.data.depth,T._atRootLevel=I;var Z=-k/2+z.l+z.w*(D.x[1]+D.x[0])/2,Q=-B/2+z.t+z.h*(1-(D.y[1]+D.y[0])/2),re=function(Nt){return Z+Nt},ce=function(Nt){return Q+Nt},me=ce(0),ye=re(0),Ae=function(Nt){return ye+Nt},Se=function(Nt){return me+Nt};function Ce(Nt,Kt){return Nt+","+Kt}var qe=Ae(0),Ue=function(Nt){Nt.x=Math.max(qe,Nt.x)},xe=T.pathbar.edgeshape,he=function(Nt){var Kt=Ae(Math.max(Math.min(Nt.x0,Nt.x0),0)),nt=Ae(Math.min(Math.max(Nt.x1,Nt.x1),O)),Ee=Se(Nt.y0),ze=Se(Nt.y1),ve=q/2,_e={},Ie={};_e.x=Kt,Ie.x=nt,_e.y=Ie.y=(Ee+ze)/2;var Be={x:Kt,y:Ee},We={x:nt,y:Ee},Xe={x:nt,y:ze},mt={x:Kt,y:ze};return xe===">"?(Be.x-=ve,We.x-=ve,Xe.x-=ve,mt.x-=ve):xe==="/"?(Xe.x-=ve,mt.x-=ve,_e.x-=ve/2,Ie.x-=ve/2):xe==="\\"?(Be.x-=ve,We.x-=ve,_e.x-=ve/2,Ie.x-=ve/2):xe==="<"&&(_e.x-=ve,Ie.x-=ve),Ue(Be),Ue(mt),Ue(_e),Ue(We),Ue(Xe),Ue(Ie),"M"+Ce(Be.x,Be.y)+"L"+Ce(We.x,We.y)+"L"+Ce(Ie.x,Ie.y)+"L"+Ce(Xe.x,Xe.y)+"L"+Ce(mt.x,mt.y)+"L"+Ce(_e.x,_e.y)+"Z"},oe=T[g?"tiling":"marker"].pad,le=function(Nt){return T.textposition.indexOf(Nt)!==-1},ne=le("top"),be=le("left"),Fe=le("right"),Ve=le("bottom"),je=function(Nt){var Kt=re(Nt.x0),nt=re(Nt.x1),Ee=ce(Nt.y0),ze=ce(Nt.y1),ve=nt-Kt,_e=ze-Ee;if(!ve||!_e)return"";var Ie=T.marker.cornerradius||0,Be=Math.min(Ie,ve/2,_e/2);Be&&Nt.data&&Nt.data.data&&Nt.data.data.label&&(ne&&(Be=Math.min(Be,oe.t)),be&&(Be=Math.min(Be,oe.l)),Fe&&(Be=Math.min(Be,oe.r)),Ve&&(Be=Math.min(Be,oe.b)));var We=function(Xe,mt){return Be?"a"+Ce(Be,Be)+" 0 0 1 "+Ce(Xe,mt):""};return"M"+Ce(Kt,Ee+Be)+We(Be,-Be)+"L"+Ce(nt-Be,Ee)+We(Be,Be)+"L"+Ce(nt,ze-Be)+We(-Be,Be)+"L"+Ce(Kt+Be,ze)+We(-Be,-Be)+"Z"},ut=function(Nt,Kt){var nt=Nt.x0,Ee=Nt.x1,ze=Nt.y0,ve=Nt.y1,_e=Nt.textBB,Ie=ne||Kt.isHeader&&!Ve,Be=Ie?"start":Ve?"end":"middle",We=le("right"),Xe=le("left")||Kt.onPathbar,mt=Xe?-1:We?1:0;if(Kt.isHeader){if(nt+=(g?oe:oe.l)-l,Ee-=(g?oe:oe.r)-l,nt>=Ee){var ft=(nt+Ee)/2;nt=ft,Ee=ft}var ht;Ve?(ht=ve-(g?oe:oe.b),ze-1,flipY:D.tiling.flip.indexOf("y")>-1,pad:{inner:D.tiling.pad,top:D.marker.pad.t,left:D.marker.pad.l,right:D.marker.pad.r,bottom:D.marker.pad.b}}),ee=Y.descendants(),te=1/0,ae=-1/0;ee.forEach(function($){var X=$.depth;X>=D._maxDepth?($.x0=$.x1=($.x0+$.x1)/2,$.y0=$.y1=($.y0+$.y1)/2):(te=Math.min(te,X),ae=Math.max(ae,X))}),d=d.data(ee,a.getPtId),D._maxVisibleLayers=isFinite(ae)?ae-te+1:0,d.enter().append("g").classed("slice",!0),h(d,i,C,[o,x],E),d.order();var U=null;if(m&&I){var H=a.getPtId(I);d.each(function($){U===null&&a.getPtId($)===H&&(U={x0:$.x0,x1:$.x1,y0:$.y0,y1:$.y1})})}var K=function(){return U||{x0:0,x1:o,y0:0,y1:x}},V=d;return m&&(V=V.transition().each("end",function(){var $=u.select(this);a.setSliceCursor($,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),V.each(function($){var X=a.isHeader($,D);$._x0=M($.x0),$._x1=M($.x1),$._y0=T($.y0),$._y1=T($.y1),$._hoverX=M($.x1-D.marker.pad.r),$._hoverY=T(O?$.y1-D.marker.pad.b/2:$.y0+D.marker.pad.t/2);var Z=u.select(this),Q=v.ensureSingle(Z,"path","surface",function(Se){Se.style("pointer-events",F?"none":"all")});m?Q.transition().attrTween("d",function(Se){var Ce=b(Se,i,K(),[o,x]);return function(qe){return E(Ce(qe))}}):Q.attr("d",E),Z.call(r,f,c,p,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,c,{isTransitioning:c._transitioning}),Q.call(e,$,D,c,{hovered:!1}),$.x0===$.x1||$.y0===$.y1?$._text="":X?$._text=q?"":a.getPtLabel($)||"":$._text=n($,f,D,p,R)||"";var re=v.ensureSingle(Z,"g","slicetext"),ce=v.ensureSingle(re,"text","",function(Se){Se.attr("data-notex",1)}),me=v.ensureUniformFontSize(c,a.determineTextFont(D,$,R.font)),ye=$._text||" ",Ae=X&&ye.indexOf("
")===-1;ce.text(ye).classed("slicetext",!0).attr("text-anchor",B?"end":k||Ae?"start":"middle").call(w.font,me).call(S.convertToTspans,c),$.textBB=w.bBox(ce.node()),$.transform=g($,{fontSize:me.size,isHeader:X}),$.transform.fontSize=me.size,m?ce.transition().attrTween("transform",function(Se){var Ce=_(Se,i,K(),[o,x]);return function(qe){return A(Ce(qe))}}):ce.attr("transform",A($))}),U}}}),uB=De({"src/traces/treemap/plot.js"(j,N){"use strict";var u=HA(),v=lB();N.exports=function(S,l,e,t){return u(S,l,e,t,{type:"treemap",drawDescendants:v})}}}),cB=De({"src/traces/treemap/index.js"(j,N){"use strict";N.exports={moduleType:"trace",name:"treemap",basePlotModule:aB(),categories:[],animatable:!0,attributes:kb(),layoutAttributes:UA(),supplyDefaults:nB(),supplyLayoutDefaults:iB(),calc:qA().calc,crossTraceCalc:qA().crossTraceCalc,plot:uB(),style:Cb().style,colorbar:Nf(),meta:{}}}}),fB=De({"lib/treemap.js"(j,N){"use strict";N.exports=cB()}}),hB=De({"src/traces/icicle/base_plot.js"(j){"use strict";var N=Il();j.name="icicle",j.plot=function(u,v,w,S){N.plotBasePlot(j.name,u,v,w,S)},j.clean=function(u,v,w,S){N.cleanBasePlot(j.name,u,v,w,S)}}}),WA=De({"src/traces/icicle/attributes.js"(j,N){"use strict";var{hovertemplateAttrs:u,texttemplateAttrs:v,templatefallbackAttrs:w}=Is(),S=ul(),l=ql().attributes,e=Op(),t=X1(),a=kb(),r=Wp(),n=Ji().extendFlat,i=Hc().pattern;N.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:a.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:n({colors:t.marker.colors,line:t.marker.line,pattern:i,editType:"calc"},S("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:a.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:v({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),texttemplatefallback:w({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:u({},{keys:r.eventDataKeys}),hovertemplatefallback:w(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:a.outsidetextfont,textposition:a.textposition,sort:e.sort,root:t.root,domain:l({name:"icicle",trace:!0,editType:"calc"})}}}),YA=De({"src/traces/icicle/layout_attributes.js"(j,N){"use strict";N.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),dB=De({"src/traces/icicle/defaults.js"(j,N){"use strict";var u=Ar(),v=WA(),w=ii(),S=ql().defaults,l=Bh().handleText,e=Zv().TEXTPAD,t=Np().handleMarkerDefaults,a=Dl(),r=a.hasColorscale,n=a.handleDefaults;N.exports=function(s,c,p,f){function d(A,m){return u.coerce(s,c,v,A,m)}var y=d("labels"),o=d("parents");if(!y||!y.length||!o||!o.length){c.visible=!1;return}var x=d("values");x&&x.length?d("branchvalues"):d("count"),d("level"),d("maxdepth"),d("tiling.orientation"),d("tiling.flip"),d("tiling.pad");var M=d("text");d("texttemplate"),d("texttemplatefallback"),c.texttemplate||d("textinfo",u.isArrayOrTypedArray(M)?"text+label":"label"),d("hovertext"),d("hovertemplate"),d("hovertemplatefallback");var T=d("pathbar.visible"),E="auto";l(s,c,f,d,E,{hasPathbar:T,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),d("textposition"),t(s,c,f,d);var g=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;g&&n(s,c,f,d,{prefix:"marker.",cLetter:"c"}),d("leaf.opacity",g?1:.7),c._hovered={marker:{line:{width:2,color:w.contrast(f.paper_bgcolor)}}},T&&(d("pathbar.thickness",c.pathbar.textfont.size+2*e),d("pathbar.side"),d("pathbar.edgeshape")),d("sort"),d("root.color"),S(c,f,d),c._length=null}}}),vB=De({"src/traces/icicle/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=YA();N.exports=function(S,l){function e(t,a){return u.coerce(S,l,v,t,a)}e("iciclecolorway",l.colorway),e("extendiciclecolors")}}}),XA=De({"src/traces/icicle/calc.js"(j){"use strict";var N=$1();j.calc=function(u,v){return N.calc(u,v)},j.crossTraceCalc=function(u){return N._runCrossTraceCalc("icicle",u)}}}),pB=De({"src/traces/icicle/partition.js"(j,N){"use strict";var u=Z1(),v=GA();N.exports=function(S,l,e){var t=e.flipX,a=e.flipY,r=e.orientation==="h",n=e.maxDepth,i=l[0],s=l[1];n&&(i=(S.height+1)*l[0]/Math.min(S.height+1,n),s=(S.height+1)*l[1]/Math.min(S.height+1,n));var c=u.partition().padding(e.pad.inner).size(r?[l[1],i]:[l[0],s])(S);return(r||t||a)&&v(c,l,{swapXY:r,flipX:t,flipY:a}),c}}}),ZA=De({"src/traces/icicle/style.js"(j,N){"use strict";var u=Qn(),v=ii(),w=Ar(),S=Yf().resizeText,l=Sb();function e(a){var r=a._fullLayout._iciclelayer.selectAll(".trace");S(a,r,"icicle"),r.each(function(n){var i=u.select(this),s=n[0],c=s.trace;i.style("opacity",c.opacity),i.selectAll("path.surface").each(function(p){u.select(this).call(t,p,c,a)})})}function t(a,r,n,i){var s=r.data.data,c=!r.children,p=s.i,f=w.castOption(n,p,"marker.line.color")||v.defaultLine,d=w.castOption(n,p,"marker.line.width")||0;a.call(l,r,n,i).style("stroke-width",d).call(v.stroke,f).style("opacity",c?n.leaf.opacity:null)}N.exports={style:e,styleOne:t}}}),mB=De({"src/traces/icicle/draw_descendants.js"(j,N){"use strict";var u=Qn(),v=Ar(),w=Ki(),S=Xs(),l=pB(),e=ZA().styleOne,t=Wp(),a=ev(),r=hg(),n=Eb().formatSliceLabel,i=!1;N.exports=function(c,p,f,d,y){var o=y.width,x=y.height,M=y.viewX,T=y.viewY,E=y.pathSlice,g=y.toMoveInsideSlice,A=y.strTransform,m=y.hasTransition,h=y.handleSlicesExit,b=y.makeUpdateSliceInterpolator,_=y.makeUpdateTextInterpolator,I=y.prevEntry,C={},F=c._context.staticPlot,R=c._fullLayout,z=p[0],D=z.trace,k=D.textposition.indexOf("left")!==-1,B=D.textposition.indexOf("right")!==-1,O=D.textposition.indexOf("bottom")!==-1,q=l(f,[o,x],{flipX:D.tiling.flip.indexOf("x")>-1,flipY:D.tiling.flip.indexOf("y")>-1,orientation:D.tiling.orientation,pad:{inner:D.tiling.pad},maxDepth:D._maxDepth}),Y=q.descendants(),ee=1/0,te=-1/0;Y.forEach(function(V){var $=V.depth;$>=D._maxDepth?(V.x0=V.x1=(V.x0+V.x1)/2,V.y0=V.y1=(V.y0+V.y1)/2):(ee=Math.min(ee,$),te=Math.max(te,$))}),d=d.data(Y,a.getPtId),D._maxVisibleLayers=isFinite(te)?te-ee+1:0,d.enter().append("g").classed("slice",!0),h(d,i,C,[o,x],E),d.order();var ae=null;if(m&&I){var U=a.getPtId(I);d.each(function(V){ae===null&&a.getPtId(V)===U&&(ae={x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1})})}var H=function(){return ae||{x0:0,x1:o,y0:0,y1:x}},K=d;return m&&(K=K.transition().each("end",function(){var V=u.select(this);a.setSliceCursor(V,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(V){V._x0=M(V.x0),V._x1=M(V.x1),V._y0=T(V.y0),V._y1=T(V.y1),V._hoverX=M(V.x1-D.tiling.pad),V._hoverY=T(O?V.y1-D.tiling.pad/2:V.y0+D.tiling.pad/2);var $=u.select(this),X=v.ensureSingle($,"path","surface",function(ce){ce.style("pointer-events",F?"none":"all")});m?X.transition().attrTween("d",function(ce){var me=b(ce,i,H(),[o,x],{orientation:D.tiling.orientation,flipX:D.tiling.flip.indexOf("x")>-1,flipY:D.tiling.flip.indexOf("y")>-1});return function(ye){return E(me(ye))}}):X.attr("d",E),$.call(r,f,c,p,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(a.setSliceCursor,c,{isTransitioning:c._transitioning}),X.call(e,V,D,c,{hovered:!1}),V.x0===V.x1||V.y0===V.y1?V._text="":V._text=n(V,f,D,p,R)||"";var Z=v.ensureSingle($,"g","slicetext"),Q=v.ensureSingle(Z,"text","",function(ce){ce.attr("data-notex",1)}),re=v.ensureUniformFontSize(c,a.determineTextFont(D,V,R.font));Q.text(V._text||" ").classed("slicetext",!0).attr("text-anchor",B?"end":k?"start":"middle").call(w.font,re).call(S.convertToTspans,c),V.textBB=w.bBox(Q.node()),V.transform=g(V,{fontSize:re.size}),V.transform.fontSize=re.size,m?Q.transition().attrTween("transform",function(ce){var me=_(ce,i,H(),[o,x]);return function(ye){return A(me(ye))}}):Q.attr("transform",A(V))}),ae}}}),gB=De({"src/traces/icicle/plot.js"(j,N){"use strict";var u=HA(),v=mB();N.exports=function(S,l,e,t){return u(S,l,e,t,{type:"icicle",drawDescendants:v})}}}),yB=De({"src/traces/icicle/index.js"(j,N){"use strict";N.exports={moduleType:"trace",name:"icicle",basePlotModule:hB(),categories:[],animatable:!0,attributes:WA(),layoutAttributes:YA(),supplyDefaults:dB(),supplyLayoutDefaults:vB(),calc:XA().calc,crossTraceCalc:XA().crossTraceCalc,plot:gB(),style:ZA().style,colorbar:Nf(),meta:{}}}}),_B=De({"lib/icicle.js"(j,N){"use strict";N.exports=yB()}}),xB=De({"src/traces/funnelarea/base_plot.js"(j){"use strict";var N=Il();j.name="funnelarea",j.plot=function(u,v,w,S){N.plotBasePlot(j.name,u,v,w,S)},j.clean=function(u,v,w,S){N.cleanBasePlot(j.name,u,v,w,S)}}}),$A=De({"src/traces/funnelarea/attributes.js"(j,N){"use strict";var u=Op(),v=Bs(),w=ql().attributes,{hovertemplateAttrs:S,texttemplateAttrs:l,templatefallbackAttrs:e}=Is(),t=Ji().extendFlat;N.exports={labels:u.labels,label0:u.label0,dlabel:u.dlabel,values:u.values,marker:{colors:u.marker.colors,line:{color:t({},u.marker.line.color,{dflt:null}),width:t({},u.marker.line.width,{dflt:1}),editType:"calc"},pattern:u.marker.pattern,editType:"calc"},text:u.text,hovertext:u.hovertext,scalegroup:t({},u.scalegroup,{}),textinfo:t({},u.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:t({},v.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:S({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:t({},u.textposition,{values:["inside","none"],dflt:"inside"}),textfont:u.textfont,insidetextfont:u.insidetextfont,title:{text:u.title.text,font:u.title.font,position:t({},u.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:w({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"}}}}),KA=De({"src/traces/funnelarea/layout_attributes.js"(j,N){"use strict";var u=$x().hiddenlabels;N.exports={hiddenlabels:u,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),bB=De({"src/traces/funnelarea/defaults.js"(j,N){"use strict";var u=Ar(),v=$A(),w=ql().defaults,S=Bh().handleText,l=Np().handleLabelsAndValues,e=Np().handleMarkerDefaults;N.exports=function(a,r,n,i){function s(E,g){return u.coerce(a,r,v,E,g)}var c=s("labels"),p=s("values"),f=l(c,p),d=f.len;if(r._hasLabels=f.hasLabels,r._hasValues=f.hasValues,!r._hasLabels&&r._hasValues&&(s("label0"),s("dlabel")),!d){r.visible=!1;return}r._length=d,e(a,r,i,s),s("scalegroup");var y=s("text"),o=s("texttemplate");s("texttemplatefallback");var x;if(o||(x=s("textinfo",Array.isArray(y)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),o||x&&x!=="none"){var M=s("textposition");S(a,r,i,s,M,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else x==="none"&&s("textposition","none");w(r,i,s);var T=s("title.text");T&&(s("title.position"),u.coerceFont(s,"title.font",i.font)),s("aspectratio"),s("baseratio")}}}),wB=De({"src/traces/funnelarea/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=KA();N.exports=function(S,l){function e(t,a){return u.coerce(S,l,v,t,a)}e("hiddenlabels"),e("funnelareacolorway",l.colorway),e("extendfunnelareacolors")}}}),JA=De({"src/traces/funnelarea/calc.js"(j,N){"use strict";var u=Cm();function v(S,l){return u.calc(S,l)}function w(S){u.crossTraceCalc(S,{type:"funnelarea"})}N.exports={calc:v,crossTraceCalc:w}}}),AB=De({"src/traces/funnelarea/plot.js"(j,N){"use strict";var u=Qn(),v=Ki(),w=Ar(),S=w.strScale,l=w.strTranslate,e=Xs(),t=Rp(),a=t.toMoveInsideBar,r=Yf(),n=r.recordMinTextSize,i=r.clearMinTextSize,s=Hv(),c=Kx(),p=c.attachFxHandlers,f=c.determineInsideTextFont,d=c.layoutAreas,y=c.prerenderTitles,o=c.positionTitleOutside,x=c.formatSliceLabel;N.exports=function(A,m){var h=A._context.staticPlot,b=A._fullLayout;i("funnelarea",b),y(m,A),d(m,b._size),w.makeTraceGroups(b._funnelarealayer,m,"trace").each(function(_){var I=u.select(this),C=_[0],F=C.trace;E(_),I.each(function(){var R=u.select(this).selectAll("g.slice").data(_);R.enter().append("g").classed("slice",!0),R.exit().remove(),R.each(function(D,k){if(D.hidden){u.select(this).selectAll("path,g").remove();return}D.pointNumber=D.i,D.curveNumber=F.index;var B=C.cx,O=C.cy,q=u.select(this),Y=q.selectAll("path.surface").data([D]);Y.enter().append("path").classed("surface",!0).style({"pointer-events":h?"none":"all"}),q.call(p,A,_);var ee="M"+(B+D.TR[0])+","+(O+D.TR[1])+M(D.TR,D.BR)+M(D.BR,D.BL)+M(D.BL,D.TL)+"Z";Y.attr("d",ee),x(A,D,C);var te=s.castOption(F.textposition,D.pts),ae=q.selectAll("g.slicetext").data(D.text&&te!=="none"?[0]:[]);ae.enter().append("g").classed("slicetext",!0),ae.exit().remove(),ae.each(function(){var U=w.ensureSingle(u.select(this),"text","",function(re){re.attr("data-notex",1)}),H=w.ensureUniformFontSize(A,f(F,D,b.font));U.text(D.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(v.font,H).call(e.convertToTspans,A);var K=v.bBox(U.node()),V,$,X,Z=Math.min(D.BL[1],D.BR[1])+O,Q=Math.max(D.TL[1],D.TR[1])+O;$=Math.max(D.TL[0],D.BL[0])+B,X=Math.min(D.TR[0],D.BR[0])+B,V=a($,X,Z,Q,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),V.fontSize=H.size,n(F.type,V,b),_[k].transform=V,w.setTransormAndDisplay(U,V)})});var z=u.select(this).selectAll("g.titletext").data(F.title.text?[0]:[]);z.enter().append("g").classed("titletext",!0),z.exit().remove(),z.each(function(){var D=w.ensureSingle(u.select(this),"text","",function(O){O.attr("data-notex",1)}),k=F.title.text;F._meta&&(k=w.templateString(k,F._meta)),D.text(k).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(v.font,F.title.font).call(e.convertToTspans,A);var B=o(C,b._size);D.attr("transform",l(B.x,B.y)+S(Math.min(1,B.scale))+l(B.tx,B.ty))})})})};function M(g,A){var m=A[0]-g[0],h=A[1]-g[1];return"l"+m+","+h}function T(g,A){return[.5*(g[0]+A[0]),.5*(g[1]+A[1])]}function E(g){if(!g.length)return;var A=g[0],m=A.trace,h=m.aspectratio,b=m.baseratio;b>.999&&(b=.999);var _=Math.pow(b,2),I=A.vTotal,C=I*_/(1-_),F=I,R=C/I;function z(){var ce=Math.sqrt(R);return{x:ce,y:-ce}}function D(){var ce=z();return[ce.x,ce.y]}var k,B=[];B.push(D());var O,q;for(O=g.length-1;O>-1;O--)if(q=g[O],!q.hidden){var Y=q.v/F;R+=Y,B.push(D())}var ee=1/0,te=-1/0;for(O=0;O-1;O--)if(q=g[O],!q.hidden){Z+=1;var Q=B[Z][0],re=B[Z][1];q.TL=[-Q,re],q.TR=[Q,re],q.BL=$,q.BR=X,q.pxmid=T(q.TR,q.BR),$=q.TL,X=q.TR}}}}),TB=De({"src/traces/funnelarea/style.js"(j,N){"use strict";var u=Qn(),v=vm(),w=Yf().resizeText;N.exports=function(l){var e=l._fullLayout._funnelarealayer.selectAll(".trace");w(l,e,"funnelarea"),e.each(function(t){var a=t[0],r=a.trace,n=u.select(this);n.style({opacity:r.opacity}),n.selectAll("path.surface").each(function(i){u.select(this).call(v,i,r,l)})})}}}),MB=De({"src/traces/funnelarea/index.js"(j,N){"use strict";N.exports={moduleType:"trace",name:"funnelarea",basePlotModule:xB(),categories:["pie-like","funnelarea","showLegend"],attributes:$A(),layoutAttributes:KA(),supplyDefaults:bB(),supplyLayoutDefaults:wB(),calc:JA().calc,crossTraceCalc:JA().crossTraceCalc,plot:AB(),style:TB(),styleOne:vm(),meta:{}}}}),SB=De({"lib/funnelarea.js"(j,N){"use strict";N.exports=MB()}}),pf=De({"stackgl_modules/index.js"(j,N){"use strict";(function(){var u={1964:function(l,e,t){l.exports={alpha_shape:t(3502),convex_hull:t(7352),delaunay_triangulate:t(7642),gl_cone3d:t(6405),gl_error3d:t(9165),gl_line3d:t(5714),gl_mesh3d:t(7201),gl_plot3d:t(4100),gl_scatter3d:t(8418),gl_streamtube3d:t(7815),gl_surface3d:t(9499),ndarray:t(9618),ndarray_linear_interpolate:t(4317)}},4793:function(l,e,t){"use strict";var a,r=t(7507),n=t(3778),i=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=f,a=h,e.IS=50;var s=2147483647;a=s,f.TYPED_ARRAY_SUPPORT=c(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{var xe=new Uint8Array(1),he={foo:function(){return 42}};return Object.setPrototypeOf(he,Uint8Array.prototype),Object.setPrototypeOf(xe,he),xe.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function p(xe){if(xe>s)throw new RangeError('The value "'+xe+'" is invalid for option "size"');var he=new Uint8Array(xe);return Object.setPrototypeOf(he,f.prototype),he}function f(xe,he,oe){if(typeof xe=="number"){if(typeof he=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return x(xe)}return d(xe,he,oe)}f.poolSize=8192;function d(xe,he,oe){if(typeof xe=="string")return M(xe,he);if(ArrayBuffer.isView(xe))return E(xe);if(xe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof xe);if(Ce(xe,ArrayBuffer)||xe&&Ce(xe.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ce(xe,SharedArrayBuffer)||xe&&Ce(xe.buffer,SharedArrayBuffer)))return g(xe,he,oe);if(typeof xe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var le=xe.valueOf&&xe.valueOf();if(le!=null&&le!==xe)return f.from(le,he,oe);var ne=A(xe);if(ne)return ne;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof xe[Symbol.toPrimitive]=="function")return f.from(xe[Symbol.toPrimitive]("string"),he,oe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof xe)}f.from=function(xe,he,oe){return d(xe,he,oe)},Object.setPrototypeOf(f.prototype,Uint8Array.prototype),Object.setPrototypeOf(f,Uint8Array);function y(xe){if(typeof xe!="number")throw new TypeError('"size" argument must be of type number');if(xe<0)throw new RangeError('The value "'+xe+'" is invalid for option "size"')}function o(xe,he,oe){return y(xe),xe<=0?p(xe):he!==void 0?typeof oe=="string"?p(xe).fill(he,oe):p(xe).fill(he):p(xe)}f.alloc=function(xe,he,oe){return o(xe,he,oe)};function x(xe){return y(xe),p(xe<0?0:m(xe)|0)}f.allocUnsafe=function(xe){return x(xe)},f.allocUnsafeSlow=function(xe){return x(xe)};function M(xe,he){if((typeof he!="string"||he==="")&&(he="utf8"),!f.isEncoding(he))throw new TypeError("Unknown encoding: "+he);var oe=b(xe,he)|0,le=p(oe),ne=le.write(xe,he);return ne!==oe&&(le=le.slice(0,ne)),le}function T(xe){for(var he=xe.length<0?0:m(xe.length)|0,oe=p(he),le=0;le=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return xe|0}function h(xe){return+xe!=xe&&(xe=0),f.alloc(+xe)}f.isBuffer=function(he){return he!=null&&he._isBuffer===!0&&he!==f.prototype},f.compare=function(he,oe){if(Ce(he,Uint8Array)&&(he=f.from(he,he.offset,he.byteLength)),Ce(oe,Uint8Array)&&(oe=f.from(oe,oe.offset,oe.byteLength)),!f.isBuffer(he)||!f.isBuffer(oe))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(he===oe)return 0;for(var le=he.length,ne=oe.length,be=0,Fe=Math.min(le,ne);bene.length?f.from(Fe).copy(ne,be):Uint8Array.prototype.set.call(ne,Fe,be);else if(f.isBuffer(Fe))Fe.copy(ne,be);else throw new TypeError('"list" argument must be an Array of Buffers');be+=Fe.length}return ne};function b(xe,he){if(f.isBuffer(xe))return xe.length;if(ArrayBuffer.isView(xe)||Ce(xe,ArrayBuffer))return xe.byteLength;if(typeof xe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof xe);var oe=xe.length,le=arguments.length>2&&arguments[2]===!0;if(!le&&oe===0)return 0;for(var ne=!1;;)switch(he){case"ascii":case"latin1":case"binary":return oe;case"utf8":case"utf-8":return ce(xe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return oe*2;case"hex":return oe>>>1;case"base64":return Ae(xe).length;default:if(ne)return le?-1:ce(xe).length;he=(""+he).toLowerCase(),ne=!0}}f.byteLength=b;function _(xe,he,oe){var le=!1;if((he===void 0||he<0)&&(he=0),he>this.length||((oe===void 0||oe>this.length)&&(oe=this.length),oe<=0)||(oe>>>=0,he>>>=0,oe<=he))return"";for(xe||(xe="utf8");;)switch(xe){case"hex":return U(this,he,oe);case"utf8":case"utf-8":return q(this,he,oe);case"ascii":return te(this,he,oe);case"latin1":case"binary":return ae(this,he,oe);case"base64":return O(this,he,oe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,he,oe);default:if(le)throw new TypeError("Unknown encoding: "+xe);xe=(xe+"").toLowerCase(),le=!0}}f.prototype._isBuffer=!0;function I(xe,he,oe){var le=xe[he];xe[he]=xe[oe],xe[oe]=le}f.prototype.swap16=function(){var he=this.length;if(he%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var oe=0;oeoe&&(he+=" ... "),""},i&&(f.prototype[i]=f.prototype.inspect),f.prototype.compare=function(he,oe,le,ne,be){if(Ce(he,Uint8Array)&&(he=f.from(he,he.offset,he.byteLength)),!f.isBuffer(he))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof he);if(oe===void 0&&(oe=0),le===void 0&&(le=he?he.length:0),ne===void 0&&(ne=0),be===void 0&&(be=this.length),oe<0||le>he.length||ne<0||be>this.length)throw new RangeError("out of range index");if(ne>=be&&oe>=le)return 0;if(ne>=be)return-1;if(oe>=le)return 1;if(oe>>>=0,le>>>=0,ne>>>=0,be>>>=0,this===he)return 0;for(var Fe=be-ne,Ve=le-oe,je=Math.min(Fe,Ve),ut=this.slice(ne,be),st=he.slice(oe,le),yt=0;yt2147483647?oe=2147483647:oe<-2147483648&&(oe=-2147483648),oe=+oe,qe(oe)&&(oe=ne?0:xe.length-1),oe<0&&(oe=xe.length+oe),oe>=xe.length){if(ne)return-1;oe=xe.length-1}else if(oe<0)if(ne)oe=0;else return-1;if(typeof he=="string"&&(he=f.from(he,le)),f.isBuffer(he))return he.length===0?-1:F(xe,he,oe,le,ne);if(typeof he=="number")return he=he&255,typeof Uint8Array.prototype.indexOf=="function"?ne?Uint8Array.prototype.indexOf.call(xe,he,oe):Uint8Array.prototype.lastIndexOf.call(xe,he,oe):F(xe,[he],oe,le,ne);throw new TypeError("val must be string, number or Buffer")}function F(xe,he,oe,le,ne){var be=1,Fe=xe.length,Ve=he.length;if(le!==void 0&&(le=String(le).toLowerCase(),le==="ucs2"||le==="ucs-2"||le==="utf16le"||le==="utf-16le")){if(xe.length<2||he.length<2)return-1;be=2,Fe/=2,Ve/=2,oe/=2}function je(Pt,Zt){return be===1?Pt[Zt]:Pt.readUInt16BE(Zt*be)}var ut;if(ne){var st=-1;for(ut=oe;utFe&&(oe=Fe-Ve),ut=oe;ut>=0;ut--){for(var yt=!0,At=0;Atne&&(le=ne)):le=ne;var be=he.length;le>be/2&&(le=be/2);for(var Fe=0;Fe>>0,isFinite(le)?(le=le>>>0,ne===void 0&&(ne="utf8")):(ne=le,le=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var be=this.length-oe;if((le===void 0||le>be)&&(le=be),he.length>0&&(le<0||oe<0)||oe>this.length)throw new RangeError("Attempt to write outside buffer bounds");ne||(ne="utf8");for(var Fe=!1;;)switch(ne){case"hex":return R(this,he,oe,le);case"utf8":case"utf-8":return z(this,he,oe,le);case"ascii":case"latin1":case"binary":return D(this,he,oe,le);case"base64":return k(this,he,oe,le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,he,oe,le);default:if(Fe)throw new TypeError("Unknown encoding: "+ne);ne=(""+ne).toLowerCase(),Fe=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function O(xe,he,oe){return he===0&&oe===xe.length?r.fromByteArray(xe):r.fromByteArray(xe.slice(he,oe))}function q(xe,he,oe){oe=Math.min(xe.length,oe);for(var le=[],ne=he;ne239?4:be>223?3:be>191?2:1;if(ne+Ve<=oe){var je,ut,st,yt;switch(Ve){case 1:be<128&&(Fe=be);break;case 2:je=xe[ne+1],(je&192)===128&&(yt=(be&31)<<6|je&63,yt>127&&(Fe=yt));break;case 3:je=xe[ne+1],ut=xe[ne+2],(je&192)===128&&(ut&192)===128&&(yt=(be&15)<<12|(je&63)<<6|ut&63,yt>2047&&(yt<55296||yt>57343)&&(Fe=yt));break;case 4:je=xe[ne+1],ut=xe[ne+2],st=xe[ne+3],(je&192)===128&&(ut&192)===128&&(st&192)===128&&(yt=(be&15)<<18|(je&63)<<12|(ut&63)<<6|st&63,yt>65535&&yt<1114112&&(Fe=yt))}}Fe===null?(Fe=65533,Ve=1):Fe>65535&&(Fe-=65536,le.push(Fe>>>10&1023|55296),Fe=56320|Fe&1023),le.push(Fe),ne+=Ve}return ee(le)}var Y=4096;function ee(xe){var he=xe.length;if(he<=Y)return String.fromCharCode.apply(String,xe);for(var oe="",le=0;lele)&&(oe=le);for(var ne="",be=he;bele&&(he=le),oe<0?(oe+=le,oe<0&&(oe=0)):oe>le&&(oe=le),oeoe)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(he,oe,le){he=he>>>0,oe=oe>>>0,le||K(he,oe,this.length);for(var ne=this[he],be=1,Fe=0;++Fe>>0,oe=oe>>>0,le||K(he,oe,this.length);for(var ne=this[he+--oe],be=1;oe>0&&(be*=256);)ne+=this[he+--oe]*be;return ne},f.prototype.readUint8=f.prototype.readUInt8=function(he,oe){return he=he>>>0,oe||K(he,1,this.length),this[he]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(he,oe){return he=he>>>0,oe||K(he,2,this.length),this[he]|this[he+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(he,oe){return he=he>>>0,oe||K(he,2,this.length),this[he]<<8|this[he+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(he,oe){return he=he>>>0,oe||K(he,4,this.length),(this[he]|this[he+1]<<8|this[he+2]<<16)+this[he+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(he,oe){return he=he>>>0,oe||K(he,4,this.length),this[he]*16777216+(this[he+1]<<16|this[he+2]<<8|this[he+3])},f.prototype.readIntLE=function(he,oe,le){he=he>>>0,oe=oe>>>0,le||K(he,oe,this.length);for(var ne=this[he],be=1,Fe=0;++Fe=be&&(ne-=Math.pow(2,8*oe)),ne},f.prototype.readIntBE=function(he,oe,le){he=he>>>0,oe=oe>>>0,le||K(he,oe,this.length);for(var ne=oe,be=1,Fe=this[he+--ne];ne>0&&(be*=256);)Fe+=this[he+--ne]*be;return be*=128,Fe>=be&&(Fe-=Math.pow(2,8*oe)),Fe},f.prototype.readInt8=function(he,oe){return he=he>>>0,oe||K(he,1,this.length),this[he]&128?(255-this[he]+1)*-1:this[he]},f.prototype.readInt16LE=function(he,oe){he=he>>>0,oe||K(he,2,this.length);var le=this[he]|this[he+1]<<8;return le&32768?le|4294901760:le},f.prototype.readInt16BE=function(he,oe){he=he>>>0,oe||K(he,2,this.length);var le=this[he+1]|this[he]<<8;return le&32768?le|4294901760:le},f.prototype.readInt32LE=function(he,oe){return he=he>>>0,oe||K(he,4,this.length),this[he]|this[he+1]<<8|this[he+2]<<16|this[he+3]<<24},f.prototype.readInt32BE=function(he,oe){return he=he>>>0,oe||K(he,4,this.length),this[he]<<24|this[he+1]<<16|this[he+2]<<8|this[he+3]},f.prototype.readFloatLE=function(he,oe){return he=he>>>0,oe||K(he,4,this.length),n.read(this,he,!0,23,4)},f.prototype.readFloatBE=function(he,oe){return he=he>>>0,oe||K(he,4,this.length),n.read(this,he,!1,23,4)},f.prototype.readDoubleLE=function(he,oe){return he=he>>>0,oe||K(he,8,this.length),n.read(this,he,!0,52,8)},f.prototype.readDoubleBE=function(he,oe){return he=he>>>0,oe||K(he,8,this.length),n.read(this,he,!1,52,8)};function V(xe,he,oe,le,ne,be){if(!f.isBuffer(xe))throw new TypeError('"buffer" argument must be a Buffer instance');if(he>ne||hexe.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(he,oe,le,ne){if(he=+he,oe=oe>>>0,le=le>>>0,!ne){var be=Math.pow(2,8*le)-1;V(this,he,oe,le,be,0)}var Fe=1,Ve=0;for(this[oe]=he&255;++Ve>>0,le=le>>>0,!ne){var be=Math.pow(2,8*le)-1;V(this,he,oe,le,be,0)}var Fe=le-1,Ve=1;for(this[oe+Fe]=he&255;--Fe>=0&&(Ve*=256);)this[oe+Fe]=he/Ve&255;return oe+le},f.prototype.writeUint8=f.prototype.writeUInt8=function(he,oe,le){return he=+he,oe=oe>>>0,le||V(this,he,oe,1,255,0),this[oe]=he&255,oe+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(he,oe,le){return he=+he,oe=oe>>>0,le||V(this,he,oe,2,65535,0),this[oe]=he&255,this[oe+1]=he>>>8,oe+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(he,oe,le){return he=+he,oe=oe>>>0,le||V(this,he,oe,2,65535,0),this[oe]=he>>>8,this[oe+1]=he&255,oe+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(he,oe,le){return he=+he,oe=oe>>>0,le||V(this,he,oe,4,4294967295,0),this[oe+3]=he>>>24,this[oe+2]=he>>>16,this[oe+1]=he>>>8,this[oe]=he&255,oe+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(he,oe,le){return he=+he,oe=oe>>>0,le||V(this,he,oe,4,4294967295,0),this[oe]=he>>>24,this[oe+1]=he>>>16,this[oe+2]=he>>>8,this[oe+3]=he&255,oe+4},f.prototype.writeIntLE=function(he,oe,le,ne){if(he=+he,oe=oe>>>0,!ne){var be=Math.pow(2,8*le-1);V(this,he,oe,le,be-1,-be)}var Fe=0,Ve=1,je=0;for(this[oe]=he&255;++Fe>0)-je&255;return oe+le},f.prototype.writeIntBE=function(he,oe,le,ne){if(he=+he,oe=oe>>>0,!ne){var be=Math.pow(2,8*le-1);V(this,he,oe,le,be-1,-be)}var Fe=le-1,Ve=1,je=0;for(this[oe+Fe]=he&255;--Fe>=0&&(Ve*=256);)he<0&&je===0&&this[oe+Fe+1]!==0&&(je=1),this[oe+Fe]=(he/Ve>>0)-je&255;return oe+le},f.prototype.writeInt8=function(he,oe,le){return he=+he,oe=oe>>>0,le||V(this,he,oe,1,127,-128),he<0&&(he=255+he+1),this[oe]=he&255,oe+1},f.prototype.writeInt16LE=function(he,oe,le){return he=+he,oe=oe>>>0,le||V(this,he,oe,2,32767,-32768),this[oe]=he&255,this[oe+1]=he>>>8,oe+2},f.prototype.writeInt16BE=function(he,oe,le){return he=+he,oe=oe>>>0,le||V(this,he,oe,2,32767,-32768),this[oe]=he>>>8,this[oe+1]=he&255,oe+2},f.prototype.writeInt32LE=function(he,oe,le){return he=+he,oe=oe>>>0,le||V(this,he,oe,4,2147483647,-2147483648),this[oe]=he&255,this[oe+1]=he>>>8,this[oe+2]=he>>>16,this[oe+3]=he>>>24,oe+4},f.prototype.writeInt32BE=function(he,oe,le){return he=+he,oe=oe>>>0,le||V(this,he,oe,4,2147483647,-2147483648),he<0&&(he=4294967295+he+1),this[oe]=he>>>24,this[oe+1]=he>>>16,this[oe+2]=he>>>8,this[oe+3]=he&255,oe+4};function $(xe,he,oe,le,ne,be){if(oe+le>xe.length)throw new RangeError("Index out of range");if(oe<0)throw new RangeError("Index out of range")}function X(xe,he,oe,le,ne){return he=+he,oe=oe>>>0,ne||$(xe,he,oe,4,34028234663852886e22,-34028234663852886e22),n.write(xe,he,oe,le,23,4),oe+4}f.prototype.writeFloatLE=function(he,oe,le){return X(this,he,oe,!0,le)},f.prototype.writeFloatBE=function(he,oe,le){return X(this,he,oe,!1,le)};function Z(xe,he,oe,le,ne){return he=+he,oe=oe>>>0,ne||$(xe,he,oe,8,17976931348623157e292,-17976931348623157e292),n.write(xe,he,oe,le,52,8),oe+8}f.prototype.writeDoubleLE=function(he,oe,le){return Z(this,he,oe,!0,le)},f.prototype.writeDoubleBE=function(he,oe,le){return Z(this,he,oe,!1,le)},f.prototype.copy=function(he,oe,le,ne){if(!f.isBuffer(he))throw new TypeError("argument should be a Buffer");if(le||(le=0),!ne&&ne!==0&&(ne=this.length),oe>=he.length&&(oe=he.length),oe||(oe=0),ne>0&&ne=this.length)throw new RangeError("Index out of range");if(ne<0)throw new RangeError("sourceEnd out of bounds");ne>this.length&&(ne=this.length),he.length-oe>>0,le=le===void 0?this.length:le>>>0,he||(he=0);var Fe;if(typeof he=="number")for(Fe=oe;Fe55295&&oe<57344){if(!ne){if(oe>56319){(he-=3)>-1&&be.push(239,191,189);continue}else if(Fe+1===le){(he-=3)>-1&&be.push(239,191,189);continue}ne=oe;continue}if(oe<56320){(he-=3)>-1&&be.push(239,191,189),ne=oe;continue}oe=(ne-55296<<10|oe-56320)+65536}else ne&&(he-=3)>-1&&be.push(239,191,189);if(ne=null,oe<128){if((he-=1)<0)break;be.push(oe)}else if(oe<2048){if((he-=2)<0)break;be.push(oe>>6|192,oe&63|128)}else if(oe<65536){if((he-=3)<0)break;be.push(oe>>12|224,oe>>6&63|128,oe&63|128)}else if(oe<1114112){if((he-=4)<0)break;be.push(oe>>18|240,oe>>12&63|128,oe>>6&63|128,oe&63|128)}else throw new Error("Invalid code point")}return be}function me(xe){for(var he=[],oe=0;oe>8,ne=oe%256,be.push(ne),be.push(le);return be}function Ae(xe){return r.toByteArray(re(xe))}function Se(xe,he,oe,le){for(var ne=0;ne=he.length||ne>=xe.length);++ne)he[ne+oe]=xe[ne];return ne}function Ce(xe,he){return xe instanceof he||xe!=null&&xe.constructor!=null&&xe.constructor.name!=null&&xe.constructor.name===he.name}function qe(xe){return xe!==xe}var Ue=function(){for(var xe="0123456789abcdef",he=new Array(256),oe=0;oe<16;++oe)for(var le=oe*16,ne=0;ne<16;++ne)he[le+ne]=xe[oe]+xe[ne];return he}()},9216:function(l){"use strict";l.exports=r,l.exports.isMobile=r,l.exports.default=r;let e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,a=/android|ipad|playbook|silk/i;function r(n){n||(n={});let i=n.ua;if(!i&&typeof navigator<"u"&&(i=navigator.userAgent),i&&i.headers&&typeof i.headers["user-agent"]=="string"&&(i=i.headers["user-agent"]),typeof i!="string")return!1;let s=e.test(i)&&!t.test(i)||!!n.tablet&&a.test(i);return!s&&n.tablet&&n.featureDetect&&navigator&&navigator.maxTouchPoints>1&&i.indexOf("Macintosh")!==-1&&i.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(l,e,t){"use strict";l.exports=c;var a=t(7261),r=t(9977),n=t(1811);function i(p,f){this._controllerNames=Object.keys(p),this._controllerList=this._controllerNames.map(function(d){return p[d]}),this._mode=f,this._active=p[f],this._active||(this._mode="turntable",this._active=p.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=i.prototype;s.flush=function(p){for(var f=this._controllerList,d=0;d"u"?t(1538):WeakMap,r=t(2762),n=t(8116),i=new a;function s(c){var p=i.get(c),f=p&&(p._triangleBuffer.handle||p._triangleBuffer.buffer);if(!f||!c.isBuffer(f)){var d=r(c,new Float32Array([-1,-1,-1,4,4,-1]));p=n(c,[{buffer:d,type:c.FLOAT,size:2}]),p._triangleBuffer=d,i.set(c,p)}p.bind(),c.drawArrays(c.TRIANGLES,0,3),p.unbind()}l.exports=s},1085:function(l,e,t){var a=t(1371);l.exports=r;function r(n,i,s){i=typeof i=="number"?i:1,s=s||": ";var c=n.split(/\r?\n/),p=String(c.length+i-1).length;return c.map(function(f,d){var y=d+i,o=String(y).length,x=a(y,p-o);return x+s+f}).join(` -`)}},3952:function(l,e,t){"use strict";l.exports=n;var a=t(3250);function r(i,s){for(var c=new Array(s+1),p=0;p0)throw new Error("Invalid string. Length must be a multiple of 4");var E=M.indexOf("=");E===-1&&(E=T);var g=E===T?0:4-E%4;return[E,g]}function p(M){var T=c(M),E=T[0],g=T[1];return(E+g)*3/4-g}function f(M,T,E){return(T+E)*3/4-E}function d(M){var T,E=c(M),g=E[0],A=E[1],m=new r(f(M,g,A)),h=0,b=A>0?g-4:g,_;for(_=0;_>16&255,m[h++]=T>>8&255,m[h++]=T&255;return A===2&&(T=a[M.charCodeAt(_)]<<2|a[M.charCodeAt(_+1)]>>4,m[h++]=T&255),A===1&&(T=a[M.charCodeAt(_)]<<10|a[M.charCodeAt(_+1)]<<4|a[M.charCodeAt(_+2)]>>2,m[h++]=T>>8&255,m[h++]=T&255),m}function y(M){return t[M>>18&63]+t[M>>12&63]+t[M>>6&63]+t[M&63]}function o(M,T,E){for(var g,A=[],m=T;mb?b:h+m));return g===1?(T=M[E-1],A.push(t[T>>2]+t[T<<4&63]+"==")):g===2&&(T=(M[E-2]<<8)+M[E-1],A.push(t[T>>10]+t[T>>4&63]+t[T<<2&63]+"=")),A.join("")}},3865:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,i){return a(n[0].mul(i[1]).add(i[0].mul(n[1])),n[1].mul(i[1]))}},1318:function(l){"use strict";l.exports=e;function e(t,a){return t[0].mul(a[1]).cmp(a[0].mul(t[1]))}},8697:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,i){return a(n[0].mul(i[1]),n[1].mul(i[0]))}},7842:function(l,e,t){"use strict";var a=t(6330),r=t(1533),n=t(2651),i=t(6768),s=t(869),c=t(8697);l.exports=p;function p(f,d){if(a(f))return d?c(f,p(d)):[f[0].clone(),f[1].clone()];var y=0,o,x;if(r(f))o=f.clone();else if(typeof f=="string")o=i(f);else{if(f===0)return[n(0),n(1)];if(f===Math.floor(f))o=n(f);else{for(;f!==Math.floor(f);)f=f*Math.pow(2,256),y-=256;o=n(f)}}if(a(d))o.mul(d[1]),x=d[0].clone();else if(r(d))x=d.clone();else if(typeof d=="string")x=i(d);else if(!d)x=n(1);else if(d===Math.floor(d))x=n(d);else{for(;d!==Math.floor(d);)d=d*Math.pow(2,256),y+=256;x=n(d)}return y>0?o=o.ushln(y):y<0&&(x=x.ushln(-y)),s(o,x)}},6330:function(l,e,t){"use strict";var a=t(1533);l.exports=r;function r(n){return Array.isArray(n)&&n.length===2&&a(n[0])&&a(n[1])}},5716:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return n.cmp(new a(0))}},1369:function(l,e,t){"use strict";var a=t(5716);l.exports=r;function r(n){var i=n.length,s=n.words,c=0;if(i===1)c=s[0];else if(i===2)c=s[0]+s[1]*67108864;else for(var p=0;p20?52:c+32}},1533:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return n&&typeof n=="object"&&!!n.words}},2651:function(l,e,t){"use strict";var a=t(6859),r=t(2361);l.exports=n;function n(i){var s=r.exponent(i);return s<52?new a(i):new a(i*Math.pow(2,52-s)).ushln(s-52)}},869:function(l,e,t){"use strict";var a=t(2651),r=t(5716);l.exports=n;function n(i,s){var c=r(i),p=r(s);if(c===0)return[a(0),a(1)];if(p===0)return[a(0),a(0)];p<0&&(i=i.neg(),s=s.neg());var f=i.gcd(s);return f.cmpn(1)?[i.div(f),s.div(f)]:[i,s]}},6768:function(l,e,t){"use strict";var a=t(6859);l.exports=r;function r(n){return new a(n)}},6504:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,i){return a(n[0].mul(i[0]),n[1].mul(i[1]))}},7721:function(l,e,t){"use strict";var a=t(5716);l.exports=r;function r(n){return a(n[0])*a(n[1])}},5572:function(l,e,t){"use strict";var a=t(869);l.exports=r;function r(n,i){return a(n[0].mul(i[1]).sub(n[1].mul(i[0])),n[1].mul(i[1]))}},946:function(l,e,t){"use strict";var a=t(1369),r=t(4025);l.exports=n;function n(i){var s=i[0],c=i[1];if(s.cmpn(0)===0)return 0;var p=s.abs().divmod(c.abs()),f=p.div,d=a(f),y=p.mod,o=s.negative!==c.negative?-1:1;if(y.cmpn(0)===0)return o*d;if(d){var x=r(d)+4,M=a(y.ushln(x).divRound(c));return o*(d+M*Math.pow(2,-x))}else{var T=c.bitLength()-y.bitLength()+53,M=a(y.ushln(T).divRound(c));return T<1023?o*M*Math.pow(2,-T):(M*=Math.pow(2,-1023),o*M*Math.pow(2,1023-T))}}},2478:function(l){"use strict";function e(s,c,p,f,d){for(var y=d+1;f<=d;){var o=f+d>>>1,x=s[o],M=p!==void 0?p(x,c):x-c;M>=0?(y=o,d=o-1):f=o+1}return y}function t(s,c,p,f,d){for(var y=d+1;f<=d;){var o=f+d>>>1,x=s[o],M=p!==void 0?p(x,c):x-c;M>0?(y=o,d=o-1):f=o+1}return y}function a(s,c,p,f,d){for(var y=f-1;f<=d;){var o=f+d>>>1,x=s[o],M=p!==void 0?p(x,c):x-c;M<0?(y=o,f=o+1):d=o-1}return y}function r(s,c,p,f,d){for(var y=f-1;f<=d;){var o=f+d>>>1,x=s[o],M=p!==void 0?p(x,c):x-c;M<=0?(y=o,f=o+1):d=o-1}return y}function n(s,c,p,f,d){for(;f<=d;){var y=f+d>>>1,o=s[y],x=p!==void 0?p(o,c):o-c;if(x===0)return y;x<=0?f=y+1:d=y-1}return-1}function i(s,c,p,f,d,y){return typeof p=="function"?y(s,c,p,f===void 0?0:f|0,d===void 0?s.length-1:d|0):y(s,c,void 0,p===void 0?0:p|0,f===void 0?s.length-1:f|0)}l.exports={ge:function(s,c,p,f,d){return i(s,c,p,f,d,e)},gt:function(s,c,p,f,d){return i(s,c,p,f,d,t)},lt:function(s,c,p,f,d){return i(s,c,p,f,d,a)},le:function(s,c,p,f,d){return i(s,c,p,f,d,r)},eq:function(s,c,p,f,d){return i(s,c,p,f,d,n)}}},8828:function(l,e){"use strict";"use restrict";var t=32;e.INT_BITS=t,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(n<0)},e.abs=function(n){var i=n>>t-1;return(n^i)-i},e.min=function(n,i){return i^(n^i)&-(n65535)<<4,n>>>=i,s=(n>255)<<3,n>>>=s,i|=s,s=(n>15)<<2,n>>>=s,i|=s,s=(n>3)<<1,n>>>=s,i|=s,i|n>>1},e.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},e.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function a(n){var i=32;return n&=-n,n&&i--,n&65535&&(i-=16),n&16711935&&(i-=8),n&252645135&&(i-=4),n&858993459&&(i-=2),n&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},e.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},e.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var r=new Array(256);(function(n){for(var i=0;i<256;++i){var s=i,c=i,p=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--p;n[i]=c<>>8&255]<<16|r[n>>>16&255]<<8|r[n>>>24&255]},e.interleave2=function(n,i){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n|i<<1},e.deinterleave2=function(n,i){return n=n>>>i&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},e.interleave3=function(n,i,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},e.deinterleave3=function(n,i){return n=n>>>i&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},e.nextCombination=function(n){var i=n|n-1;return i+1|(~i&-~i)-1>>>a(n)+1}},6859:function(l,e,t){l=t.nmd(l),function(a,r){"use strict";function n(D,k){if(!D)throw new Error(k||"Assertion failed")}function i(D,k){D.super_=k;var B=function(){};B.prototype=k.prototype,D.prototype=new B,D.prototype.constructor=D}function s(D,k,B){if(s.isBN(D))return D;this.negative=0,this.words=null,this.length=0,this.red=null,D!==null&&((k==="le"||k==="be")&&(B=k,k=10),this._init(D||0,k||10,B||"be"))}typeof a=="object"?a.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=t(7790).Buffer}catch{}s.isBN=function(k){return k instanceof s?!0:k!==null&&typeof k=="object"&&k.constructor.wordSize===s.wordSize&&Array.isArray(k.words)},s.max=function(k,B){return k.cmp(B)>0?k:B},s.min=function(k,B){return k.cmp(B)<0?k:B},s.prototype._init=function(k,B,O){if(typeof k=="number")return this._initNumber(k,B,O);if(typeof k=="object")return this._initArray(k,B,O);B==="hex"&&(B=16),n(B===(B|0)&&B>=2&&B<=36),k=k.toString().replace(/\s+/g,"");var q=0;k[0]==="-"&&(q++,this.negative=1),q=0;q-=3)ee=k[q]|k[q-1]<<8|k[q-2]<<16,this.words[Y]|=ee<>>26-te&67108863,te+=24,te>=26&&(te-=26,Y++);else if(O==="le")for(q=0,Y=0;q>>26-te&67108863,te+=24,te>=26&&(te-=26,Y++);return this.strip()};function p(D,k){var B=D.charCodeAt(k);return B>=65&&B<=70?B-55:B>=97&&B<=102?B-87:B-48&15}function f(D,k,B){var O=p(D,B);return B-1>=k&&(O|=p(D,B-1)<<4),O}s.prototype._parseHex=function(k,B,O){this.length=Math.ceil((k.length-B)/6),this.words=new Array(this.length);for(var q=0;q=B;q-=2)te=f(k,B,q)<=18?(Y-=18,ee+=1,this.words[ee]|=te>>>26):Y+=8;else{var ae=k.length-B;for(q=ae%2===0?B+1:B;q=18?(Y-=18,ee+=1,this.words[ee]|=te>>>26):Y+=8}this.strip()};function d(D,k,B,O){for(var q=0,Y=Math.min(D.length,B),ee=k;ee=49?q+=te-49+10:te>=17?q+=te-17+10:q+=te}return q}s.prototype._parseBase=function(k,B,O){this.words=[0],this.length=1;for(var q=0,Y=1;Y<=67108863;Y*=B)q++;q--,Y=Y/B|0;for(var ee=k.length-O,te=ee%q,ae=Math.min(ee,ee-te)+O,U=0,H=O;H1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var y=["","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"],o=[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],x=[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];s.prototype.toString=function(k,B){k=k||10,B=B|0||1;var O;if(k===16||k==="hex"){O="";for(var q=0,Y=0,ee=0;ee>>24-q&16777215,q+=2,q>=26&&(q-=26,ee--),Y!==0||ee!==this.length-1?O=y[6-ae.length]+ae+O:O=ae+O}for(Y!==0&&(O=Y.toString(16)+O);O.length%B!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}if(k===(k|0)&&k>=2&&k<=36){var U=o[k],H=x[k];O="";var K=this.clone();for(K.negative=0;!K.isZero();){var V=K.modn(H).toString(k);K=K.idivn(H),K.isZero()?O=V+O:O=y[U-V.length]+V+O}for(this.isZero()&&(O="0"+O);O.length%B!==0;)O="0"+O;return this.negative!==0&&(O="-"+O),O}n(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var k=this.words[0];return this.length===2?k+=this.words[1]*67108864:this.length===3&&this.words[2]===1?k+=4503599627370496+this.words[1]*67108864:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-k:k},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(k,B){return n(typeof c<"u"),this.toArrayLike(c,k,B)},s.prototype.toArray=function(k,B){return this.toArrayLike(Array,k,B)},s.prototype.toArrayLike=function(k,B,O){var q=this.byteLength(),Y=O||Math.max(1,q);n(q<=Y,"byte array longer than desired length"),n(Y>0,"Requested array length <= 0"),this.strip();var ee=B==="le",te=new k(Y),ae,U,H=this.clone();if(ee){for(U=0;!H.isZero();U++)ae=H.andln(255),H.iushrn(8),te[U]=ae;for(;U=4096&&(O+=13,B>>>=13),B>=64&&(O+=7,B>>>=7),B>=8&&(O+=4,B>>>=4),B>=2&&(O+=2,B>>>=2),O+B},s.prototype._zeroBits=function(k){if(k===0)return 26;var B=k,O=0;return B&8191||(O+=13,B>>>=13),B&127||(O+=7,B>>>=7),B&15||(O+=4,B>>>=4),B&3||(O+=2,B>>>=2),B&1||O++,O},s.prototype.bitLength=function(){var k=this.words[this.length-1],B=this._countBits(k);return(this.length-1)*26+B};function M(D){for(var k=new Array(D.bitLength()),B=0;B>>q}return k}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var k=0,B=0;Bk.length?this.clone().ior(k):k.clone().ior(this)},s.prototype.uor=function(k){return this.length>k.length?this.clone().iuor(k):k.clone().iuor(this)},s.prototype.iuand=function(k){var B;this.length>k.length?B=k:B=this;for(var O=0;Ok.length?this.clone().iand(k):k.clone().iand(this)},s.prototype.uand=function(k){return this.length>k.length?this.clone().iuand(k):k.clone().iuand(this)},s.prototype.iuxor=function(k){var B,O;this.length>k.length?(B=this,O=k):(B=k,O=this);for(var q=0;qk.length?this.clone().ixor(k):k.clone().ixor(this)},s.prototype.uxor=function(k){return this.length>k.length?this.clone().iuxor(k):k.clone().iuxor(this)},s.prototype.inotn=function(k){n(typeof k=="number"&&k>=0);var B=Math.ceil(k/26)|0,O=k%26;this._expand(B),O>0&&B--;for(var q=0;q0&&(this.words[q]=~this.words[q]&67108863>>26-O),this.strip()},s.prototype.notn=function(k){return this.clone().inotn(k)},s.prototype.setn=function(k,B){n(typeof k=="number"&&k>=0);var O=k/26|0,q=k%26;return this._expand(O+1),B?this.words[O]=this.words[O]|1<k.length?(O=this,q=k):(O=k,q=this);for(var Y=0,ee=0;ee>>26;for(;Y!==0&&ee>>26;if(this.length=O.length,Y!==0)this.words[this.length]=Y,this.length++;else if(O!==this)for(;eek.length?this.clone().iadd(k):k.clone().iadd(this)},s.prototype.isub=function(k){if(k.negative!==0){k.negative=0;var B=this.iadd(k);return k.negative=1,B._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(k),this.negative=1,this._normSign();var O=this.cmp(k);if(O===0)return this.negative=0,this.length=1,this.words[0]=0,this;var q,Y;O>0?(q=this,Y=k):(q=k,Y=this);for(var ee=0,te=0;te>26,this.words[te]=B&67108863;for(;ee!==0&&te>26,this.words[te]=B&67108863;if(ee===0&&te>>26,K=ae&67108863,V=Math.min(U,k.length-1),$=Math.max(0,U-D.length+1);$<=V;$++){var X=U-$|0;q=D.words[X]|0,Y=k.words[$]|0,ee=q*Y+K,H+=ee/67108864|0,K=ee&67108863}B.words[U]=K|0,ae=H|0}return ae!==0?B.words[U]=ae|0:B.length--,B.strip()}var E=function(k,B,O){var q=k.words,Y=B.words,ee=O.words,te=0,ae,U,H,K=q[0]|0,V=K&8191,$=K>>>13,X=q[1]|0,Z=X&8191,Q=X>>>13,re=q[2]|0,ce=re&8191,me=re>>>13,ye=q[3]|0,Ae=ye&8191,Se=ye>>>13,Ce=q[4]|0,qe=Ce&8191,Ue=Ce>>>13,xe=q[5]|0,he=xe&8191,oe=xe>>>13,le=q[6]|0,ne=le&8191,be=le>>>13,Fe=q[7]|0,Ve=Fe&8191,je=Fe>>>13,ut=q[8]|0,st=ut&8191,yt=ut>>>13,At=q[9]|0,Pt=At&8191,Zt=At>>>13,vr=Y[0]|0,Nt=vr&8191,Kt=vr>>>13,nt=Y[1]|0,Ee=nt&8191,ze=nt>>>13,ve=Y[2]|0,_e=ve&8191,Ie=ve>>>13,Be=Y[3]|0,We=Be&8191,Xe=Be>>>13,mt=Y[4]|0,ft=mt&8191,ht=mt>>>13,gt=Y[5]|0,_t=gt&8191,Ft=gt>>>13,St=Y[6]|0,hr=St&8191,jr=St>>>13,ra=Y[7]|0,$r=ra&8191,pa=ra>>>13,oa=Y[8]|0,aa=oa&8191,ka=oa>>>13,Ta=Y[9]|0,Da=Ta&8191,La=Ta>>>13;O.negative=k.negative^B.negative,O.length=19,ae=Math.imul(V,Nt),U=Math.imul(V,Kt),U=U+Math.imul($,Nt)|0,H=Math.imul($,Kt);var Ga=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,ae=Math.imul(Z,Nt),U=Math.imul(Z,Kt),U=U+Math.imul(Q,Nt)|0,H=Math.imul(Q,Kt),ae=ae+Math.imul(V,Ee)|0,U=U+Math.imul(V,ze)|0,U=U+Math.imul($,Ee)|0,H=H+Math.imul($,ze)|0;var xa=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(xa>>>26)|0,xa&=67108863,ae=Math.imul(ce,Nt),U=Math.imul(ce,Kt),U=U+Math.imul(me,Nt)|0,H=Math.imul(me,Kt),ae=ae+Math.imul(Z,Ee)|0,U=U+Math.imul(Z,ze)|0,U=U+Math.imul(Q,Ee)|0,H=H+Math.imul(Q,ze)|0,ae=ae+Math.imul(V,_e)|0,U=U+Math.imul(V,Ie)|0,U=U+Math.imul($,_e)|0,H=H+Math.imul($,Ie)|0;var Gn=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(Gn>>>26)|0,Gn&=67108863,ae=Math.imul(Ae,Nt),U=Math.imul(Ae,Kt),U=U+Math.imul(Se,Nt)|0,H=Math.imul(Se,Kt),ae=ae+Math.imul(ce,Ee)|0,U=U+Math.imul(ce,ze)|0,U=U+Math.imul(me,Ee)|0,H=H+Math.imul(me,ze)|0,ae=ae+Math.imul(Z,_e)|0,U=U+Math.imul(Z,Ie)|0,U=U+Math.imul(Q,_e)|0,H=H+Math.imul(Q,Ie)|0,ae=ae+Math.imul(V,We)|0,U=U+Math.imul(V,Xe)|0,U=U+Math.imul($,We)|0,H=H+Math.imul($,Xe)|0;var Pn=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(Pn>>>26)|0,Pn&=67108863,ae=Math.imul(qe,Nt),U=Math.imul(qe,Kt),U=U+Math.imul(Ue,Nt)|0,H=Math.imul(Ue,Kt),ae=ae+Math.imul(Ae,Ee)|0,U=U+Math.imul(Ae,ze)|0,U=U+Math.imul(Se,Ee)|0,H=H+Math.imul(Se,ze)|0,ae=ae+Math.imul(ce,_e)|0,U=U+Math.imul(ce,Ie)|0,U=U+Math.imul(me,_e)|0,H=H+Math.imul(me,Ie)|0,ae=ae+Math.imul(Z,We)|0,U=U+Math.imul(Z,Xe)|0,U=U+Math.imul(Q,We)|0,H=H+Math.imul(Q,Xe)|0,ae=ae+Math.imul(V,ft)|0,U=U+Math.imul(V,ht)|0,U=U+Math.imul($,ft)|0,H=H+Math.imul($,ht)|0;var sn=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(sn>>>26)|0,sn&=67108863,ae=Math.imul(he,Nt),U=Math.imul(he,Kt),U=U+Math.imul(oe,Nt)|0,H=Math.imul(oe,Kt),ae=ae+Math.imul(qe,Ee)|0,U=U+Math.imul(qe,ze)|0,U=U+Math.imul(Ue,Ee)|0,H=H+Math.imul(Ue,ze)|0,ae=ae+Math.imul(Ae,_e)|0,U=U+Math.imul(Ae,Ie)|0,U=U+Math.imul(Se,_e)|0,H=H+Math.imul(Se,Ie)|0,ae=ae+Math.imul(ce,We)|0,U=U+Math.imul(ce,Xe)|0,U=U+Math.imul(me,We)|0,H=H+Math.imul(me,Xe)|0,ae=ae+Math.imul(Z,ft)|0,U=U+Math.imul(Z,ht)|0,U=U+Math.imul(Q,ft)|0,H=H+Math.imul(Q,ht)|0,ae=ae+Math.imul(V,_t)|0,U=U+Math.imul(V,Ft)|0,U=U+Math.imul($,_t)|0,H=H+Math.imul($,Ft)|0;var Yn=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,ae=Math.imul(ne,Nt),U=Math.imul(ne,Kt),U=U+Math.imul(be,Nt)|0,H=Math.imul(be,Kt),ae=ae+Math.imul(he,Ee)|0,U=U+Math.imul(he,ze)|0,U=U+Math.imul(oe,Ee)|0,H=H+Math.imul(oe,ze)|0,ae=ae+Math.imul(qe,_e)|0,U=U+Math.imul(qe,Ie)|0,U=U+Math.imul(Ue,_e)|0,H=H+Math.imul(Ue,Ie)|0,ae=ae+Math.imul(Ae,We)|0,U=U+Math.imul(Ae,Xe)|0,U=U+Math.imul(Se,We)|0,H=H+Math.imul(Se,Xe)|0,ae=ae+Math.imul(ce,ft)|0,U=U+Math.imul(ce,ht)|0,U=U+Math.imul(me,ft)|0,H=H+Math.imul(me,ht)|0,ae=ae+Math.imul(Z,_t)|0,U=U+Math.imul(Z,Ft)|0,U=U+Math.imul(Q,_t)|0,H=H+Math.imul(Q,Ft)|0,ae=ae+Math.imul(V,hr)|0,U=U+Math.imul(V,jr)|0,U=U+Math.imul($,hr)|0,H=H+Math.imul($,jr)|0;var Zn=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(Zn>>>26)|0,Zn&=67108863,ae=Math.imul(Ve,Nt),U=Math.imul(Ve,Kt),U=U+Math.imul(je,Nt)|0,H=Math.imul(je,Kt),ae=ae+Math.imul(ne,Ee)|0,U=U+Math.imul(ne,ze)|0,U=U+Math.imul(be,Ee)|0,H=H+Math.imul(be,ze)|0,ae=ae+Math.imul(he,_e)|0,U=U+Math.imul(he,Ie)|0,U=U+Math.imul(oe,_e)|0,H=H+Math.imul(oe,Ie)|0,ae=ae+Math.imul(qe,We)|0,U=U+Math.imul(qe,Xe)|0,U=U+Math.imul(Ue,We)|0,H=H+Math.imul(Ue,Xe)|0,ae=ae+Math.imul(Ae,ft)|0,U=U+Math.imul(Ae,ht)|0,U=U+Math.imul(Se,ft)|0,H=H+Math.imul(Se,ht)|0,ae=ae+Math.imul(ce,_t)|0,U=U+Math.imul(ce,Ft)|0,U=U+Math.imul(me,_t)|0,H=H+Math.imul(me,Ft)|0,ae=ae+Math.imul(Z,hr)|0,U=U+Math.imul(Z,jr)|0,U=U+Math.imul(Q,hr)|0,H=H+Math.imul(Q,jr)|0,ae=ae+Math.imul(V,$r)|0,U=U+Math.imul(V,pa)|0,U=U+Math.imul($,$r)|0,H=H+Math.imul($,pa)|0;var vi=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(vi>>>26)|0,vi&=67108863,ae=Math.imul(st,Nt),U=Math.imul(st,Kt),U=U+Math.imul(yt,Nt)|0,H=Math.imul(yt,Kt),ae=ae+Math.imul(Ve,Ee)|0,U=U+Math.imul(Ve,ze)|0,U=U+Math.imul(je,Ee)|0,H=H+Math.imul(je,ze)|0,ae=ae+Math.imul(ne,_e)|0,U=U+Math.imul(ne,Ie)|0,U=U+Math.imul(be,_e)|0,H=H+Math.imul(be,Ie)|0,ae=ae+Math.imul(he,We)|0,U=U+Math.imul(he,Xe)|0,U=U+Math.imul(oe,We)|0,H=H+Math.imul(oe,Xe)|0,ae=ae+Math.imul(qe,ft)|0,U=U+Math.imul(qe,ht)|0,U=U+Math.imul(Ue,ft)|0,H=H+Math.imul(Ue,ht)|0,ae=ae+Math.imul(Ae,_t)|0,U=U+Math.imul(Ae,Ft)|0,U=U+Math.imul(Se,_t)|0,H=H+Math.imul(Se,Ft)|0,ae=ae+Math.imul(ce,hr)|0,U=U+Math.imul(ce,jr)|0,U=U+Math.imul(me,hr)|0,H=H+Math.imul(me,jr)|0,ae=ae+Math.imul(Z,$r)|0,U=U+Math.imul(Z,pa)|0,U=U+Math.imul(Q,$r)|0,H=H+Math.imul(Q,pa)|0,ae=ae+Math.imul(V,aa)|0,U=U+Math.imul(V,ka)|0,U=U+Math.imul($,aa)|0,H=H+Math.imul($,ka)|0;var Dn=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(Dn>>>26)|0,Dn&=67108863,ae=Math.imul(Pt,Nt),U=Math.imul(Pt,Kt),U=U+Math.imul(Zt,Nt)|0,H=Math.imul(Zt,Kt),ae=ae+Math.imul(st,Ee)|0,U=U+Math.imul(st,ze)|0,U=U+Math.imul(yt,Ee)|0,H=H+Math.imul(yt,ze)|0,ae=ae+Math.imul(Ve,_e)|0,U=U+Math.imul(Ve,Ie)|0,U=U+Math.imul(je,_e)|0,H=H+Math.imul(je,Ie)|0,ae=ae+Math.imul(ne,We)|0,U=U+Math.imul(ne,Xe)|0,U=U+Math.imul(be,We)|0,H=H+Math.imul(be,Xe)|0,ae=ae+Math.imul(he,ft)|0,U=U+Math.imul(he,ht)|0,U=U+Math.imul(oe,ft)|0,H=H+Math.imul(oe,ht)|0,ae=ae+Math.imul(qe,_t)|0,U=U+Math.imul(qe,Ft)|0,U=U+Math.imul(Ue,_t)|0,H=H+Math.imul(Ue,Ft)|0,ae=ae+Math.imul(Ae,hr)|0,U=U+Math.imul(Ae,jr)|0,U=U+Math.imul(Se,hr)|0,H=H+Math.imul(Se,jr)|0,ae=ae+Math.imul(ce,$r)|0,U=U+Math.imul(ce,pa)|0,U=U+Math.imul(me,$r)|0,H=H+Math.imul(me,pa)|0,ae=ae+Math.imul(Z,aa)|0,U=U+Math.imul(Z,ka)|0,U=U+Math.imul(Q,aa)|0,H=H+Math.imul(Q,ka)|0,ae=ae+Math.imul(V,Da)|0,U=U+Math.imul(V,La)|0,U=U+Math.imul($,Da)|0,H=H+Math.imul($,La)|0;var oi=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(oi>>>26)|0,oi&=67108863,ae=Math.imul(Pt,Ee),U=Math.imul(Pt,ze),U=U+Math.imul(Zt,Ee)|0,H=Math.imul(Zt,ze),ae=ae+Math.imul(st,_e)|0,U=U+Math.imul(st,Ie)|0,U=U+Math.imul(yt,_e)|0,H=H+Math.imul(yt,Ie)|0,ae=ae+Math.imul(Ve,We)|0,U=U+Math.imul(Ve,Xe)|0,U=U+Math.imul(je,We)|0,H=H+Math.imul(je,Xe)|0,ae=ae+Math.imul(ne,ft)|0,U=U+Math.imul(ne,ht)|0,U=U+Math.imul(be,ft)|0,H=H+Math.imul(be,ht)|0,ae=ae+Math.imul(he,_t)|0,U=U+Math.imul(he,Ft)|0,U=U+Math.imul(oe,_t)|0,H=H+Math.imul(oe,Ft)|0,ae=ae+Math.imul(qe,hr)|0,U=U+Math.imul(qe,jr)|0,U=U+Math.imul(Ue,hr)|0,H=H+Math.imul(Ue,jr)|0,ae=ae+Math.imul(Ae,$r)|0,U=U+Math.imul(Ae,pa)|0,U=U+Math.imul(Se,$r)|0,H=H+Math.imul(Se,pa)|0,ae=ae+Math.imul(ce,aa)|0,U=U+Math.imul(ce,ka)|0,U=U+Math.imul(me,aa)|0,H=H+Math.imul(me,ka)|0,ae=ae+Math.imul(Z,Da)|0,U=U+Math.imul(Z,La)|0,U=U+Math.imul(Q,Da)|0,H=H+Math.imul(Q,La)|0;var on=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(on>>>26)|0,on&=67108863,ae=Math.imul(Pt,_e),U=Math.imul(Pt,Ie),U=U+Math.imul(Zt,_e)|0,H=Math.imul(Zt,Ie),ae=ae+Math.imul(st,We)|0,U=U+Math.imul(st,Xe)|0,U=U+Math.imul(yt,We)|0,H=H+Math.imul(yt,Xe)|0,ae=ae+Math.imul(Ve,ft)|0,U=U+Math.imul(Ve,ht)|0,U=U+Math.imul(je,ft)|0,H=H+Math.imul(je,ht)|0,ae=ae+Math.imul(ne,_t)|0,U=U+Math.imul(ne,Ft)|0,U=U+Math.imul(be,_t)|0,H=H+Math.imul(be,Ft)|0,ae=ae+Math.imul(he,hr)|0,U=U+Math.imul(he,jr)|0,U=U+Math.imul(oe,hr)|0,H=H+Math.imul(oe,jr)|0,ae=ae+Math.imul(qe,$r)|0,U=U+Math.imul(qe,pa)|0,U=U+Math.imul(Ue,$r)|0,H=H+Math.imul(Ue,pa)|0,ae=ae+Math.imul(Ae,aa)|0,U=U+Math.imul(Ae,ka)|0,U=U+Math.imul(Se,aa)|0,H=H+Math.imul(Se,ka)|0,ae=ae+Math.imul(ce,Da)|0,U=U+Math.imul(ce,La)|0,U=U+Math.imul(me,Da)|0,H=H+Math.imul(me,La)|0;var mn=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(mn>>>26)|0,mn&=67108863,ae=Math.imul(Pt,We),U=Math.imul(Pt,Xe),U=U+Math.imul(Zt,We)|0,H=Math.imul(Zt,Xe),ae=ae+Math.imul(st,ft)|0,U=U+Math.imul(st,ht)|0,U=U+Math.imul(yt,ft)|0,H=H+Math.imul(yt,ht)|0,ae=ae+Math.imul(Ve,_t)|0,U=U+Math.imul(Ve,Ft)|0,U=U+Math.imul(je,_t)|0,H=H+Math.imul(je,Ft)|0,ae=ae+Math.imul(ne,hr)|0,U=U+Math.imul(ne,jr)|0,U=U+Math.imul(be,hr)|0,H=H+Math.imul(be,jr)|0,ae=ae+Math.imul(he,$r)|0,U=U+Math.imul(he,pa)|0,U=U+Math.imul(oe,$r)|0,H=H+Math.imul(oe,pa)|0,ae=ae+Math.imul(qe,aa)|0,U=U+Math.imul(qe,ka)|0,U=U+Math.imul(Ue,aa)|0,H=H+Math.imul(Ue,ka)|0,ae=ae+Math.imul(Ae,Da)|0,U=U+Math.imul(Ae,La)|0,U=U+Math.imul(Se,Da)|0,H=H+Math.imul(Se,La)|0;var bi=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(bi>>>26)|0,bi&=67108863,ae=Math.imul(Pt,ft),U=Math.imul(Pt,ht),U=U+Math.imul(Zt,ft)|0,H=Math.imul(Zt,ht),ae=ae+Math.imul(st,_t)|0,U=U+Math.imul(st,Ft)|0,U=U+Math.imul(yt,_t)|0,H=H+Math.imul(yt,Ft)|0,ae=ae+Math.imul(Ve,hr)|0,U=U+Math.imul(Ve,jr)|0,U=U+Math.imul(je,hr)|0,H=H+Math.imul(je,jr)|0,ae=ae+Math.imul(ne,$r)|0,U=U+Math.imul(ne,pa)|0,U=U+Math.imul(be,$r)|0,H=H+Math.imul(be,pa)|0,ae=ae+Math.imul(he,aa)|0,U=U+Math.imul(he,ka)|0,U=U+Math.imul(oe,aa)|0,H=H+Math.imul(oe,ka)|0,ae=ae+Math.imul(qe,Da)|0,U=U+Math.imul(qe,La)|0,U=U+Math.imul(Ue,Da)|0,H=H+Math.imul(Ue,La)|0;var Li=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(Li>>>26)|0,Li&=67108863,ae=Math.imul(Pt,_t),U=Math.imul(Pt,Ft),U=U+Math.imul(Zt,_t)|0,H=Math.imul(Zt,Ft),ae=ae+Math.imul(st,hr)|0,U=U+Math.imul(st,jr)|0,U=U+Math.imul(yt,hr)|0,H=H+Math.imul(yt,jr)|0,ae=ae+Math.imul(Ve,$r)|0,U=U+Math.imul(Ve,pa)|0,U=U+Math.imul(je,$r)|0,H=H+Math.imul(je,pa)|0,ae=ae+Math.imul(ne,aa)|0,U=U+Math.imul(ne,ka)|0,U=U+Math.imul(be,aa)|0,H=H+Math.imul(be,ka)|0,ae=ae+Math.imul(he,Da)|0,U=U+Math.imul(he,La)|0,U=U+Math.imul(oe,Da)|0,H=H+Math.imul(oe,La)|0;var $a=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+($a>>>26)|0,$a&=67108863,ae=Math.imul(Pt,hr),U=Math.imul(Pt,jr),U=U+Math.imul(Zt,hr)|0,H=Math.imul(Zt,jr),ae=ae+Math.imul(st,$r)|0,U=U+Math.imul(st,pa)|0,U=U+Math.imul(yt,$r)|0,H=H+Math.imul(yt,pa)|0,ae=ae+Math.imul(Ve,aa)|0,U=U+Math.imul(Ve,ka)|0,U=U+Math.imul(je,aa)|0,H=H+Math.imul(je,ka)|0,ae=ae+Math.imul(ne,Da)|0,U=U+Math.imul(ne,La)|0,U=U+Math.imul(be,Da)|0,H=H+Math.imul(be,La)|0;var Va=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(Va>>>26)|0,Va&=67108863,ae=Math.imul(Pt,$r),U=Math.imul(Pt,pa),U=U+Math.imul(Zt,$r)|0,H=Math.imul(Zt,pa),ae=ae+Math.imul(st,aa)|0,U=U+Math.imul(st,ka)|0,U=U+Math.imul(yt,aa)|0,H=H+Math.imul(yt,ka)|0,ae=ae+Math.imul(Ve,Da)|0,U=U+Math.imul(Ve,La)|0,U=U+Math.imul(je,Da)|0,H=H+Math.imul(je,La)|0;var it=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(it>>>26)|0,it&=67108863,ae=Math.imul(Pt,aa),U=Math.imul(Pt,ka),U=U+Math.imul(Zt,aa)|0,H=Math.imul(Zt,ka),ae=ae+Math.imul(st,Da)|0,U=U+Math.imul(st,La)|0,U=U+Math.imul(yt,Da)|0,H=H+Math.imul(yt,La)|0;var Qe=(te+ae|0)+((U&8191)<<13)|0;te=(H+(U>>>13)|0)+(Qe>>>26)|0,Qe&=67108863,ae=Math.imul(Pt,Da),U=Math.imul(Pt,La),U=U+Math.imul(Zt,Da)|0,H=Math.imul(Zt,La);var Jt=(te+ae|0)+((U&8191)<<13)|0;return te=(H+(U>>>13)|0)+(Jt>>>26)|0,Jt&=67108863,ee[0]=Ga,ee[1]=xa,ee[2]=Gn,ee[3]=Pn,ee[4]=sn,ee[5]=Yn,ee[6]=Zn,ee[7]=vi,ee[8]=Dn,ee[9]=oi,ee[10]=on,ee[11]=mn,ee[12]=bi,ee[13]=Li,ee[14]=$a,ee[15]=Va,ee[16]=it,ee[17]=Qe,ee[18]=Jt,te!==0&&(ee[19]=te,O.length++),O};Math.imul||(E=T);function g(D,k,B){B.negative=k.negative^D.negative,B.length=D.length+k.length;for(var O=0,q=0,Y=0;Y>>26)|0,q+=ee>>>26,ee&=67108863}B.words[Y]=te,O=ee,ee=q}return O!==0?B.words[Y]=O:B.length--,B.strip()}function A(D,k,B){var O=new m;return O.mulp(D,k,B)}s.prototype.mulTo=function(k,B){var O,q=this.length+k.length;return this.length===10&&k.length===10?O=E(this,k,B):q<63?O=T(this,k,B):q<1024?O=g(this,k,B):O=A(this,k,B),O};function m(D,k){this.x=D,this.y=k}m.prototype.makeRBT=function(k){for(var B=new Array(k),O=s.prototype._countBits(k)-1,q=0;q>=1;return q},m.prototype.permute=function(k,B,O,q,Y,ee){for(var te=0;te>>1)Y++;return 1<>>13,O[2*ee+1]=Y&8191,Y=Y>>>13;for(ee=2*B;ee>=26,B+=q/67108864|0,B+=Y>>>26,this.words[O]=Y&67108863}return B!==0&&(this.words[O]=B,this.length++),this.length=k===0?1:this.length,this},s.prototype.muln=function(k){return this.clone().imuln(k)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(k){var B=M(k);if(B.length===0)return new s(1);for(var O=this,q=0;q=0);var B=k%26,O=(k-B)/26,q=67108863>>>26-B<<26-B,Y;if(B!==0){var ee=0;for(Y=0;Y>>26-B}ee&&(this.words[Y]=ee,this.length++)}if(O!==0){for(Y=this.length-1;Y>=0;Y--)this.words[Y+O]=this.words[Y];for(Y=0;Y=0);var q;B?q=(B-B%26)/26:q=0;var Y=k%26,ee=Math.min((k-Y)/26,this.length),te=67108863^67108863>>>Y<ee)for(this.length-=ee,U=0;U=0&&(H!==0||U>=q);U--){var K=this.words[U]|0;this.words[U]=H<<26-Y|K>>>Y,H=K&te}return ae&&H!==0&&(ae.words[ae.length++]=H),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(k,B,O){return n(this.negative===0),this.iushrn(k,B,O)},s.prototype.shln=function(k){return this.clone().ishln(k)},s.prototype.ushln=function(k){return this.clone().iushln(k)},s.prototype.shrn=function(k){return this.clone().ishrn(k)},s.prototype.ushrn=function(k){return this.clone().iushrn(k)},s.prototype.testn=function(k){n(typeof k=="number"&&k>=0);var B=k%26,O=(k-B)/26,q=1<=0);var B=k%26,O=(k-B)/26;if(n(this.negative===0,"imaskn works only with positive numbers"),this.length<=O)return this;if(B!==0&&O++,this.length=Math.min(O,this.length),B!==0){var q=67108863^67108863>>>B<=67108864;B++)this.words[B]-=67108864,B===this.length-1?this.words[B+1]=1:this.words[B+1]++;return this.length=Math.max(this.length,B+1),this},s.prototype.isubn=function(k){if(n(typeof k=="number"),n(k<67108864),k<0)return this.iaddn(-k);if(this.negative!==0)return this.negative=0,this.iaddn(k),this.negative=1,this;if(this.words[0]-=k,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var B=0;B>26)-(ae/67108864|0),this.words[Y+O]=ee&67108863}for(;Y>26,this.words[Y+O]=ee&67108863;if(te===0)return this.strip();for(n(te===-1),te=0,Y=0;Y>26,this.words[Y]=ee&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(k,B){var O=this.length-k.length,q=this.clone(),Y=k,ee=Y.words[Y.length-1]|0,te=this._countBits(ee);O=26-te,O!==0&&(Y=Y.ushln(O),q.iushln(O),ee=Y.words[Y.length-1]|0);var ae=q.length-Y.length,U;if(B!=="mod"){U=new s(null),U.length=ae+1,U.words=new Array(U.length);for(var H=0;H=0;V--){var $=(q.words[Y.length+V]|0)*67108864+(q.words[Y.length+V-1]|0);for($=Math.min($/ee|0,67108863),q._ishlnsubmul(Y,$,V);q.negative!==0;)$--,q.negative=0,q._ishlnsubmul(Y,1,V),q.isZero()||(q.negative^=1);U&&(U.words[V]=$)}return U&&U.strip(),q.strip(),B!=="div"&&O!==0&&q.iushrn(O),{div:U||null,mod:q}},s.prototype.divmod=function(k,B,O){if(n(!k.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var q,Y,ee;return this.negative!==0&&k.negative===0?(ee=this.neg().divmod(k,B),B!=="mod"&&(q=ee.div.neg()),B!=="div"&&(Y=ee.mod.neg(),O&&Y.negative!==0&&Y.iadd(k)),{div:q,mod:Y}):this.negative===0&&k.negative!==0?(ee=this.divmod(k.neg(),B),B!=="mod"&&(q=ee.div.neg()),{div:q,mod:ee.mod}):this.negative&k.negative?(ee=this.neg().divmod(k.neg(),B),B!=="div"&&(Y=ee.mod.neg(),O&&Y.negative!==0&&Y.isub(k)),{div:ee.div,mod:Y}):k.length>this.length||this.cmp(k)<0?{div:new s(0),mod:this}:k.length===1?B==="div"?{div:this.divn(k.words[0]),mod:null}:B==="mod"?{div:null,mod:new s(this.modn(k.words[0]))}:{div:this.divn(k.words[0]),mod:new s(this.modn(k.words[0]))}:this._wordDiv(k,B)},s.prototype.div=function(k){return this.divmod(k,"div",!1).div},s.prototype.mod=function(k){return this.divmod(k,"mod",!1).mod},s.prototype.umod=function(k){return this.divmod(k,"mod",!0).mod},s.prototype.divRound=function(k){var B=this.divmod(k);if(B.mod.isZero())return B.div;var O=B.div.negative!==0?B.mod.isub(k):B.mod,q=k.ushrn(1),Y=k.andln(1),ee=O.cmp(q);return ee<0||Y===1&&ee===0?B.div:B.div.negative!==0?B.div.isubn(1):B.div.iaddn(1)},s.prototype.modn=function(k){n(k<=67108863);for(var B=(1<<26)%k,O=0,q=this.length-1;q>=0;q--)O=(B*O+(this.words[q]|0))%k;return O},s.prototype.idivn=function(k){n(k<=67108863);for(var B=0,O=this.length-1;O>=0;O--){var q=(this.words[O]|0)+B*67108864;this.words[O]=q/k|0,B=q%k}return this.strip()},s.prototype.divn=function(k){return this.clone().idivn(k)},s.prototype.egcd=function(k){n(k.negative===0),n(!k.isZero());var B=this,O=k.clone();B.negative!==0?B=B.umod(k):B=B.clone();for(var q=new s(1),Y=new s(0),ee=new s(0),te=new s(1),ae=0;B.isEven()&&O.isEven();)B.iushrn(1),O.iushrn(1),++ae;for(var U=O.clone(),H=B.clone();!B.isZero();){for(var K=0,V=1;!(B.words[0]&V)&&K<26;++K,V<<=1);if(K>0)for(B.iushrn(K);K-- >0;)(q.isOdd()||Y.isOdd())&&(q.iadd(U),Y.isub(H)),q.iushrn(1),Y.iushrn(1);for(var $=0,X=1;!(O.words[0]&X)&&$<26;++$,X<<=1);if($>0)for(O.iushrn($);$-- >0;)(ee.isOdd()||te.isOdd())&&(ee.iadd(U),te.isub(H)),ee.iushrn(1),te.iushrn(1);B.cmp(O)>=0?(B.isub(O),q.isub(ee),Y.isub(te)):(O.isub(B),ee.isub(q),te.isub(Y))}return{a:ee,b:te,gcd:O.iushln(ae)}},s.prototype._invmp=function(k){n(k.negative===0),n(!k.isZero());var B=this,O=k.clone();B.negative!==0?B=B.umod(k):B=B.clone();for(var q=new s(1),Y=new s(0),ee=O.clone();B.cmpn(1)>0&&O.cmpn(1)>0;){for(var te=0,ae=1;!(B.words[0]&ae)&&te<26;++te,ae<<=1);if(te>0)for(B.iushrn(te);te-- >0;)q.isOdd()&&q.iadd(ee),q.iushrn(1);for(var U=0,H=1;!(O.words[0]&H)&&U<26;++U,H<<=1);if(U>0)for(O.iushrn(U);U-- >0;)Y.isOdd()&&Y.iadd(ee),Y.iushrn(1);B.cmp(O)>=0?(B.isub(O),q.isub(Y)):(O.isub(B),Y.isub(q))}var K;return B.cmpn(1)===0?K=q:K=Y,K.cmpn(0)<0&&K.iadd(k),K},s.prototype.gcd=function(k){if(this.isZero())return k.abs();if(k.isZero())return this.abs();var B=this.clone(),O=k.clone();B.negative=0,O.negative=0;for(var q=0;B.isEven()&&O.isEven();q++)B.iushrn(1),O.iushrn(1);do{for(;B.isEven();)B.iushrn(1);for(;O.isEven();)O.iushrn(1);var Y=B.cmp(O);if(Y<0){var ee=B;B=O,O=ee}else if(Y===0||O.cmpn(1)===0)break;B.isub(O)}while(!0);return O.iushln(q)},s.prototype.invm=function(k){return this.egcd(k).a.umod(k)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(k){return this.words[0]&k},s.prototype.bincn=function(k){n(typeof k=="number");var B=k%26,O=(k-B)/26,q=1<>>26,te&=67108863,this.words[ee]=te}return Y!==0&&(this.words[ee]=Y,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(k){var B=k<0;if(this.negative!==0&&!B)return-1;if(this.negative===0&&B)return 1;this.strip();var O;if(this.length>1)O=1;else{B&&(k=-k),n(k<=67108863,"Number is too big");var q=this.words[0]|0;O=q===k?0:qk.length)return 1;if(this.length=0;O--){var q=this.words[O]|0,Y=k.words[O]|0;if(q!==Y){qY&&(B=1);break}}return B},s.prototype.gtn=function(k){return this.cmpn(k)===1},s.prototype.gt=function(k){return this.cmp(k)===1},s.prototype.gten=function(k){return this.cmpn(k)>=0},s.prototype.gte=function(k){return this.cmp(k)>=0},s.prototype.ltn=function(k){return this.cmpn(k)===-1},s.prototype.lt=function(k){return this.cmp(k)===-1},s.prototype.lten=function(k){return this.cmpn(k)<=0},s.prototype.lte=function(k){return this.cmp(k)<=0},s.prototype.eqn=function(k){return this.cmpn(k)===0},s.prototype.eq=function(k){return this.cmp(k)===0},s.red=function(k){return new R(k)},s.prototype.toRed=function(k){return n(!this.red,"Already a number in reduction context"),n(this.negative===0,"red works only with positives"),k.convertTo(this)._forceRed(k)},s.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(k){return this.red=k,this},s.prototype.forceRed=function(k){return n(!this.red,"Already a number in reduction context"),this._forceRed(k)},s.prototype.redAdd=function(k){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,k)},s.prototype.redIAdd=function(k){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,k)},s.prototype.redSub=function(k){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,k)},s.prototype.redISub=function(k){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,k)},s.prototype.redShl=function(k){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,k)},s.prototype.redMul=function(k){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,k),this.red.mul(this,k)},s.prototype.redIMul=function(k){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,k),this.red.imul(this,k)},s.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(k){return n(this.red&&!k.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,k)};var h={k256:null,p224:null,p192:null,p25519:null};function b(D,k){this.name=D,this.p=new s(k,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}b.prototype._tmp=function(){var k=new s(null);return k.words=new Array(Math.ceil(this.n/13)),k},b.prototype.ireduce=function(k){var B=k,O;do this.split(B,this.tmp),B=this.imulK(B),B=B.iadd(this.tmp),O=B.bitLength();while(O>this.n);var q=O0?B.isub(this.p):B.strip!==void 0?B.strip():B._strip(),B},b.prototype.split=function(k,B){k.iushrn(this.n,0,B)},b.prototype.imulK=function(k){return k.imul(this.k)};function _(){b.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}i(_,b),_.prototype.split=function(k,B){for(var O=4194303,q=Math.min(k.length,9),Y=0;Y>>22,ee=te}ee>>>=22,k.words[Y-10]=ee,ee===0&&k.length>10?k.length-=10:k.length-=9},_.prototype.imulK=function(k){k.words[k.length]=0,k.words[k.length+1]=0,k.length+=2;for(var B=0,O=0;O>>=26,k.words[O]=Y,B=q}return B!==0&&(k.words[k.length++]=B),k},s._prime=function(k){if(h[k])return h[k];var B;if(k==="k256")B=new _;else if(k==="p224")B=new I;else if(k==="p192")B=new C;else if(k==="p25519")B=new F;else throw new Error("Unknown prime "+k);return h[k]=B,B};function R(D){if(typeof D=="string"){var k=s._prime(D);this.m=k.p,this.prime=k}else n(D.gtn(1),"modulus must be greater than 1"),this.m=D,this.prime=null}R.prototype._verify1=function(k){n(k.negative===0,"red works only with positives"),n(k.red,"red works only with red numbers")},R.prototype._verify2=function(k,B){n((k.negative|B.negative)===0,"red works only with positives"),n(k.red&&k.red===B.red,"red works only with red numbers")},R.prototype.imod=function(k){return this.prime?this.prime.ireduce(k)._forceRed(this):k.umod(this.m)._forceRed(this)},R.prototype.neg=function(k){return k.isZero()?k.clone():this.m.sub(k)._forceRed(this)},R.prototype.add=function(k,B){this._verify2(k,B);var O=k.add(B);return O.cmp(this.m)>=0&&O.isub(this.m),O._forceRed(this)},R.prototype.iadd=function(k,B){this._verify2(k,B);var O=k.iadd(B);return O.cmp(this.m)>=0&&O.isub(this.m),O},R.prototype.sub=function(k,B){this._verify2(k,B);var O=k.sub(B);return O.cmpn(0)<0&&O.iadd(this.m),O._forceRed(this)},R.prototype.isub=function(k,B){this._verify2(k,B);var O=k.isub(B);return O.cmpn(0)<0&&O.iadd(this.m),O},R.prototype.shl=function(k,B){return this._verify1(k),this.imod(k.ushln(B))},R.prototype.imul=function(k,B){return this._verify2(k,B),this.imod(k.imul(B))},R.prototype.mul=function(k,B){return this._verify2(k,B),this.imod(k.mul(B))},R.prototype.isqr=function(k){return this.imul(k,k.clone())},R.prototype.sqr=function(k){return this.mul(k,k)},R.prototype.sqrt=function(k){if(k.isZero())return k.clone();var B=this.m.andln(3);if(n(B%2===1),B===3){var O=this.m.add(new s(1)).iushrn(2);return this.pow(k,O)}for(var q=this.m.subn(1),Y=0;!q.isZero()&&q.andln(1)===0;)Y++,q.iushrn(1);n(!q.isZero());var ee=new s(1).toRed(this),te=ee.redNeg(),ae=this.m.subn(1).iushrn(1),U=this.m.bitLength();for(U=new s(2*U*U).toRed(this);this.pow(U,ae).cmp(te)!==0;)U.redIAdd(te);for(var H=this.pow(U,q),K=this.pow(k,q.addn(1).iushrn(1)),V=this.pow(k,q),$=Y;V.cmp(ee)!==0;){for(var X=V,Z=0;X.cmp(ee)!==0;Z++)X=X.redSqr();n(Z<$);var Q=this.pow(H,new s(1).iushln($-Z-1));K=K.redMul(Q),H=Q.redSqr(),V=V.redMul(H),$=Z}return K},R.prototype.invm=function(k){var B=k._invmp(this.m);return B.negative!==0?(B.negative=0,this.imod(B).redNeg()):this.imod(B)},R.prototype.pow=function(k,B){if(B.isZero())return new s(1).toRed(this);if(B.cmpn(1)===0)return k.clone();var O=4,q=new Array(1<=0;Y--){for(var H=B.words[Y],K=U-1;K>=0;K--){var V=H>>K&1;if(ee!==q[0]&&(ee=this.sqr(ee)),V===0&&te===0){ae=0;continue}te<<=1,te|=V,ae++,!(ae!==O&&(Y!==0||K!==0))&&(ee=this.mul(ee,q[te]),ae=0,te=0)}U=26}return ee},R.prototype.convertTo=function(k){var B=k.umod(this.m);return B===k?B.clone():B},R.prototype.convertFrom=function(k){var B=k.clone();return B.red=null,B},s.mont=function(k){return new z(k)};function z(D){R.call(this,D),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}i(z,R),z.prototype.convertTo=function(k){return this.imod(k.ushln(this.shift))},z.prototype.convertFrom=function(k){var B=this.imod(k.mul(this.rinv));return B.red=null,B},z.prototype.imul=function(k,B){if(k.isZero()||B.isZero())return k.words[0]=0,k.length=1,k;var O=k.imul(B),q=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=O.isub(q).iushrn(this.shift),ee=Y;return Y.cmp(this.m)>=0?ee=Y.isub(this.m):Y.cmpn(0)<0&&(ee=Y.iadd(this.m)),ee._forceRed(this)},z.prototype.mul=function(k,B){if(k.isZero()||B.isZero())return new s(0)._forceRed(this);var O=k.mul(B),q=O.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Y=O.isub(q).iushrn(this.shift),ee=Y;return Y.cmp(this.m)>=0?ee=Y.isub(this.m):Y.cmpn(0)<0&&(ee=Y.iadd(this.m)),ee._forceRed(this)},z.prototype.invm=function(k){var B=this.imod(k._invmp(this.m).mul(this.r2));return B._forceRed(this)}}(l,this)},6204:function(l){"use strict";l.exports=e;function e(t){var a,r,n,i=t.length,s=0;for(a=0;a>>1;if(!(m<=0)){var h,b=a.mallocDouble(2*m*g),_=a.mallocInt32(g);if(g=s(x,m,b,_),g>0){if(m===1&&E)r.init(g),h=r.sweepComplete(m,T,0,g,b,_,0,g,b,_);else{var I=a.mallocDouble(2*m*A),C=a.mallocInt32(A);A=s(M,m,I,C),A>0&&(r.init(g+A),m===1?h=r.sweepBipartite(m,T,0,g,b,_,0,A,I,C):h=n(m,T,E,g,b,_,A,I,C),a.free(I),a.free(C))}a.free(b),a.free(_)}return h}}}var p;function f(x,M){p.push([x,M])}function d(x){return p=[],c(x,x,f,!0),p}function y(x,M){return p=[],c(x,M,f,!1),p}function o(x,M,T){switch(arguments.length){case 1:return d(x);case 2:return typeof M=="function"?c(x,x,M,!0):y(x,M);case 3:return c(x,M,T,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(l,e){"use strict";function t(){function n(c,p,f,d,y,o,x,M,T,E,g){for(var A=2*c,m=d,h=A*d;mT-M?n(c,p,f,d,y,o,x,M,T,E,g):i(c,p,f,d,y,o,x,M,T,E,g)}return s}function a(){function n(f,d,y,o,x,M,T,E,g,A,m){for(var h=2*f,b=o,_=h*o;bA-g?o?n(f,d,y,x,M,T,E,g,A,m,h):i(f,d,y,x,M,T,E,g,A,m,h):o?s(f,d,y,x,M,T,E,g,A,m,h):c(f,d,y,x,M,T,E,g,A,m,h)}return p}function r(n){return n?t():a()}e.partial=r(!1),e.full=r(!0)},7150:function(l,e,t){"use strict";l.exports=D;var a=t(1888),r=t(8828),n=t(2455),i=n.partial,s=n.full,c=t(855),p=t(3545),f=t(8105),d=128,y=1<<22,o=1<<22,x=f("!(lo>=p0)&&!(p1>=hi)"),M=f("lo===p0"),T=f("lo0;){H-=1;var $=H*m,X=_[$],Z=_[$+1],Q=_[$+2],re=_[$+3],ce=_[$+4],me=_[$+5],ye=H*h,Ae=I[ye],Se=I[ye+1],Ce=me&1,qe=!!(me&16),Ue=Y,xe=ee,he=ae,oe=U;if(Ce&&(Ue=ae,xe=U,he=Y,oe=ee),!(me&2&&(Q=T(k,X,Z,Q,Ue,xe,Se),Z>=Q))&&!(me&4&&(Z=E(k,X,Z,Q,Ue,xe,Ae),Z>=Q))){var le=Q-Z,ne=ce-re;if(qe){if(k*le*(le+ne)f&&y[A+p]>E;--g,A-=x){for(var m=A,h=A+x,b=0;b>>1,E=2*c,g=T,A=y[E*T+p];x=I?(g=_,A=I):b>=F?(g=h,A=b):(g=C,A=F):I>=F?(g=_,A=I):F>=b?(g=h,A=b):(g=C,A=F);for(var D=E*(M-1),k=E*g,R=0;R=p0)&&!(p1>=hi)":p};function t(f){return e[f]}function a(f,d,y,o,x,M,T){for(var E=2*f,g=E*y,A=g,m=y,h=d,b=f+d,_=y;o>_;++_,g+=E){var I=x[g+h];if(I===T)if(m===_)m+=1,A+=E;else{for(var C=0;E>C;++C){var F=x[g+C];x[g+C]=x[A],x[A++]=F}var R=M[_];M[_]=M[m],M[m++]=R}}return m}function r(f,d,y,o,x,M,T){for(var E=2*f,g=E*y,A=g,m=y,h=d,b=f+d,_=y;o>_;++_,g+=E){var I=x[g+h];if(IC;++C){var F=x[g+C];x[g+C]=x[A],x[A++]=F}var R=M[_];M[_]=M[m],M[m++]=R}}return m}function n(f,d,y,o,x,M,T){for(var E=2*f,g=E*y,A=g,m=y,h=d,b=f+d,_=y;o>_;++_,g+=E){var I=x[g+b];if(I<=T)if(m===_)m+=1,A+=E;else{for(var C=0;E>C;++C){var F=x[g+C];x[g+C]=x[A],x[A++]=F}var R=M[_];M[_]=M[m],M[m++]=R}}return m}function i(f,d,y,o,x,M,T){for(var E=2*f,g=E*y,A=g,m=y,h=d,b=f+d,_=y;o>_;++_,g+=E){var I=x[g+b];if(I<=T)if(m===_)m+=1,A+=E;else{for(var C=0;E>C;++C){var F=x[g+C];x[g+C]=x[A],x[A++]=F}var R=M[_];M[_]=M[m],M[m++]=R}}return m}function s(f,d,y,o,x,M,T){for(var E=2*f,g=E*y,A=g,m=y,h=d,b=f+d,_=y;o>_;++_,g+=E){var I=x[g+h],C=x[g+b];if(I<=T&&T<=C)if(m===_)m+=1,A+=E;else{for(var F=0;E>F;++F){var R=x[g+F];x[g+F]=x[A],x[A++]=R}var z=M[_];M[_]=M[m],M[m++]=z}}return m}function c(f,d,y,o,x,M,T){for(var E=2*f,g=E*y,A=g,m=y,h=d,b=f+d,_=y;o>_;++_,g+=E){var I=x[g+h],C=x[g+b];if(IF;++F){var R=x[g+F];x[g+F]=x[A],x[A++]=R}var z=M[_];M[_]=M[m],M[m++]=z}}return m}function p(f,d,y,o,x,M,T,E){for(var g=2*f,A=g*y,m=A,h=y,b=d,_=f+d,I=y;o>I;++I,A+=g){var C=x[A+b],F=x[A+_];if(!(C>=T)&&!(E>=F))if(h===I)h+=1,m+=g;else{for(var R=0;g>R;++R){var z=x[A+R];x[A+R]=x[m],x[m++]=z}var D=M[I];M[I]=M[h],M[h++]=D}}return h}},4192:function(l){"use strict";l.exports=t;var e=32;function t(d,y){y<=4*e?a(0,y-1,d):f(0,y-1,d)}function a(d,y,o){for(var x=2*(d+1),M=d+1;M<=y;++M){for(var T=o[x++],E=o[x++],g=M,A=x-2;g-- >d;){var m=o[A-2],h=o[A-1];if(mo[y+1]:!0}function p(d,y,o,x){d*=2;var M=x[d];return M>1,g=E-x,A=E+x,m=M,h=g,b=E,_=A,I=T,C=d+1,F=y-1,R=0;c(m,h,o)&&(R=m,m=h,h=R),c(_,I,o)&&(R=_,_=I,I=R),c(m,b,o)&&(R=m,m=b,b=R),c(h,b,o)&&(R=h,h=b,b=R),c(m,_,o)&&(R=m,m=_,_=R),c(b,_,o)&&(R=b,b=_,_=R),c(h,I,o)&&(R=h,h=I,I=R),c(h,b,o)&&(R=h,h=b,b=R),c(_,I,o)&&(R=_,_=I,I=R);for(var z=o[2*h],D=o[2*h+1],k=o[2*_],B=o[2*_+1],O=2*m,q=2*b,Y=2*I,ee=2*M,te=2*E,ae=2*T,U=0;U<2;++U){var H=o[O+U],K=o[q+U],V=o[Y+U];o[ee+U]=H,o[te+U]=K,o[ae+U]=V}n(g,d,o),n(A,y,o);for(var $=C;$<=F;++$)if(p($,z,D,o))$!==C&&r($,C,o),++C;else if(!p($,k,B,o))for(;;)if(p(F,k,B,o)){p(F,z,D,o)?(i($,C,F,o),++C,--F):(r($,F,o),--F);break}else{if(--F<$)break;continue}s(d,C-1,z,D,o),s(y,F+1,k,B,o),C-2-d<=e?a(d,C-2,o):f(d,C-2,o),y-(F+2)<=e?a(F+2,y,o):f(F+2,y,o),F-C<=e?a(C,F,o):f(C,F,o)}},855:function(l,e,t){"use strict";l.exports={init:M,sweepBipartite:g,sweepComplete:A,scanBipartite:m,scanComplete:h};var a=t(1888),r=t(8828),n=t(4192),i=1<<28,s=1024,c=a.mallocInt32(s),p=a.mallocInt32(s),f=a.mallocInt32(s),d=a.mallocInt32(s),y=a.mallocInt32(s),o=a.mallocInt32(s),x=a.mallocDouble(s*8);function M(b){var _=r.nextPow2(b);c.length<_&&(a.free(c),c=a.mallocInt32(_)),p.length<_&&(a.free(p),p=a.mallocInt32(_)),f.length<_&&(a.free(f),f=a.mallocInt32(_)),d.length<_&&(a.free(d),d=a.mallocInt32(_)),y.length<_&&(a.free(y),y=a.mallocInt32(_)),o.length<_&&(a.free(o),o=a.mallocInt32(_));var I=8*_;x.length>>1;n(x,K);for(var V=0,$=0,te=0;te=i)X=X-i|0,T(f,d,$--,X);else if(X>=0)T(c,p,V--,X);else if(X<=-i){X=-X-i|0;for(var Z=0;Z>>1;n(x,K);for(var V=0,$=0,X=0,te=0;te>1===x[2*te+3]>>1&&(Q=2,te+=1),Z<0){for(var re=-(Z>>1)-1,ce=0;ce>1)-1;Q===0?T(c,p,V--,re):Q===1?T(f,d,$--,re):Q===2&&T(y,o,X--,re)}}}function m(b,_,I,C,F,R,z,D,k,B,O,q){var Y=0,ee=2*b,te=_,ae=_+b,U=1,H=1;C?H=i:U=i;for(var K=F;K>>1;n(x,Z);for(var Q=0,K=0;K=i?(ce=!C,V-=i):(ce=!!C,V-=1),ce)E(c,p,Q++,V);else{var me=q[V],ye=ee*V,Ae=O[ye+_+1],Se=O[ye+_+1+b];e:for(var Ce=0;Ce>>1;n(x,V);for(var $=0,ae=0;ae=i)c[$++]=U-i;else{U-=1;var Z=O[U],Q=Y*U,re=B[Q+_+1],ce=B[Q+_+1+b];e:for(var me=0;me<$;++me){var ye=c[me],Ae=z[ye];if(Ae===Z)break;var Se=Y*ye;if(!(ce=0;--me)if(c[me]===U){for(var Ce=me+1;Ce<$;++Ce)c[Ce-1]=c[Ce];break}--$}}}},2538:function(l,e,t){"use strict";var a=t(8902),r=t(5542),n=t(2272),i=t(5023);l.exports=d;function s(y){return[Math.min(y[0],y[1]),Math.max(y[0],y[1])]}function c(y,o){return y[0]-o[0]||y[1]-o[1]}function p(y){return y.map(s).sort(c)}function f(y,o,x){return o in y?y[o]:x}function d(y,o,x){Array.isArray(o)?(x=x||{},o=o||[]):(x=o||{},o=[]);var M=!!f(x,"delaunay",!0),T=!!f(x,"interior",!0),E=!!f(x,"exterior",!0),g=!!f(x,"infinity",!1);if(!T&&!E||y.length===0)return[];var A=a(y,o);if(M||T!==E||g){for(var m=r(y.length,p(o)),h=0;h0;){for(var M=p.pop(),y=p.pop(),T=-1,E=-1,o=d[y],A=1;A=0||(c.flip(y,M),n(s,c,p,T,y,E),n(s,c,p,y,E,T),n(s,c,p,E,M,T),n(s,c,p,M,T,E))}}},5023:function(l,e,t){"use strict";var a=t(2478);l.exports=p;function r(f,d,y,o,x,M,T){this.cells=f,this.neighbor=d,this.flags=o,this.constraint=y,this.active=x,this.next=M,this.boundary=T}var n=r.prototype;function i(f,d){return f[0]-d[0]||f[1]-d[1]||f[2]-d[2]}n.locate=function(){var f=[0,0,0];return function(d,y,o){var x=d,M=y,T=o;return y0||T.length>0;){for(;M.length>0;){var h=M.pop();if(E[h]!==-x){E[h]=x;for(var b=g[h],_=0;_<3;++_){var I=m[3*h+_];I>=0&&E[I]===0&&(A[3*h+_]?T.push(I):(M.push(I),E[I]=x))}}}var C=T;T=M,M=C,T.length=0,x=-x}var F=c(g,E,d);return y?F.concat(o.boundary):F}},8902:function(l,e,t){"use strict";var a=t(2478),r=t(3250)[3],n=0,i=1,s=2;l.exports=T;function c(E,g,A,m,h){this.a=E,this.b=g,this.idx=A,this.lowerIds=m,this.upperIds=h}function p(E,g,A,m){this.a=E,this.b=g,this.type=A,this.idx=m}function f(E,g){var A=E.a[0]-g.a[0]||E.a[1]-g.a[1]||E.type-g.type;return A||E.type!==n&&(A=r(E.a,E.b,g.b),A)?A:E.idx-g.idx}function d(E,g){return r(E.a,E.b,g)}function y(E,g,A,m,h){for(var b=a.lt(g,m,d),_=a.gt(g,m,d),I=b;I<_;++I){for(var C=g[I],F=C.lowerIds,z=F.length;z>1&&r(A[F[z-2]],A[F[z-1]],m)>0;)E.push([F[z-1],F[z-2],h]),z-=1;F.length=z,F.push(h);for(var R=C.upperIds,z=R.length;z>1&&r(A[R[z-2]],A[R[z-1]],m)<0;)E.push([R[z-2],R[z-1],h]),z-=1;R.length=z,R.push(h)}}function o(E,g){var A;return E.a[0]C[0]&&h.push(new p(C,I,s,b),new p(I,C,i,b))}h.sort(f);for(var F=h[0].a[0]-(1+Math.abs(h[0].a[0]))*Math.pow(2,-52),R=[new c([F,1],[F,0],-1,[],[],[],[])],z=[],b=0,D=h.length;b=0}}(),n.removeTriangle=function(c,p,f){var d=this.stars;i(d[c],p,f),i(d[p],f,c),i(d[f],c,p)},n.addTriangle=function(c,p,f){var d=this.stars;d[c].push(p,f),d[p].push(f,c),d[f].push(c,p)},n.opposite=function(c,p){for(var f=this.stars[p],d=1,y=f.length;d=0;--k){var H=z[k];B=H[0];var K=F[B],V=K[0],$=K[1],X=C[V],Z=C[$];if((X[0]-Z[0]||X[1]-Z[1])<0){var Q=V;V=$,$=Q}K[0]=V;var re=K[1]=H[1],ce;for(D&&(ce=K[2]);k>0&&z[k-1][0]===B;){var H=z[--k],me=H[1];D?F.push([re,me,ce]):F.push([re,me]),re=me}D?F.push([re,$,ce]):F.push([re,$])}return O}function g(C,F,R){for(var z=F.length,D=new a(z),k=[],B=0;BF[2]?1:0)}function h(C,F,R){if(C.length!==0){if(F)for(var z=0;z0||B.length>0}function I(C,F,R){var z;if(R){z=F;for(var D=new Array(F.length),k=0;kE+1)throw new Error(M+" map requires nshades to be at least size "+x.length);Array.isArray(p.alpha)?p.alpha.length!==2?g=[1,1]:g=p.alpha.slice():typeof p.alpha=="number"?g=[p.alpha,p.alpha]:g=[1,1],f=x.map(function(I){return Math.round(I.index*E)}),g[0]=Math.min(Math.max(g[0],0),1),g[1]=Math.min(Math.max(g[1],0),1);var m=x.map(function(I,C){var F=x[C].index,R=x[C].rgb.slice();return R.length===4&&R[3]>=0&&R[3]<=1||(R[3]=g[0]+(g[1]-g[0])*F),R}),h=[];for(A=0;A=0}function p(f,d,y,o){var x=a(d,y,o);if(x===0){var M=r(a(f,d,y)),T=r(a(f,d,o));if(M===T){if(M===0){var E=c(f,d,y),g=c(f,d,o);return E===g?0:E?1:-1}return 0}else{if(T===0)return M>0||c(f,d,o)?-1:1;if(M===0)return T>0||c(f,d,y)?1:-1}return r(T-M)}var A=a(f,d,y);if(A>0)return x>0&&a(f,d,o)>0?1:-1;if(A<0)return x>0||a(f,d,o)>0?1:-1;var m=a(f,d,o);return m>0||c(f,d,y)?1:-1}},8572:function(l){"use strict";l.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(l){l.exports=a;var e=Math.min;function t(r,n){return r-n}function a(r,n){var i=r.length,s=r.length-n.length;if(s)return s;switch(i){case 0:return 0;case 1:return r[0]-n[0];case 2:return r[0]+r[1]-n[0]-n[1]||e(r[0],r[1])-e(n[0],n[1]);case 3:var c=r[0]+r[1],p=n[0]+n[1];if(s=c+r[2]-(p+n[2]),s)return s;var f=e(r[0],r[1]),d=e(n[0],n[1]);return e(f,r[2])-e(d,n[2])||e(f+r[2],c)-e(d+n[2],p);case 4:var y=r[0],o=r[1],x=r[2],M=r[3],T=n[0],E=n[1],g=n[2],A=n[3];return y+o+x+M-(T+E+g+A)||e(y,o,x,M)-e(T,E,g,A,T)||e(y+o,y+x,y+M,o+x,o+M,x+M)-e(T+E,T+g,T+A,E+g,E+A,g+A)||e(y+o+x,y+o+M,y+x+M,o+x+M)-e(T+E+g,T+E+A,T+g+A,E+g+A);default:for(var m=r.slice().sort(t),h=n.slice().sort(t),b=0;bt[r][0]&&(r=n);return ar?[[r],[a]]:[[a]]}},4750:function(l,e,t){"use strict";l.exports=r;var a=t(3090);function r(n){var i=a(n),s=i.length;if(s<=2)return[];for(var c=new Array(s),p=i[s-1],f=0;f=p[T]&&(M+=1);o[x]=M}}return c}function s(c,p){try{return a(c,!0)}catch{var f=r(c);if(f.length<=p)return[];var d=n(c,f),y=a(d,!0);return i(y,f)}}},4769:function(l){"use strict";function e(a,r,n,i,s,c){var p=6*s*s-6*s,f=3*s*s-4*s+1,d=-6*s*s+6*s,y=3*s*s-2*s;if(a.length){c||(c=new Array(a.length));for(var o=a.length-1;o>=0;--o)c[o]=p*a[o]+f*r[o]+d*n[o]+y*i[o];return c}return p*a+f*r+d*n[o]+y*i}function t(a,r,n,i,s,c){var p=s-1,f=s*s,d=p*p,y=(1+2*s)*d,o=s*d,x=f*(3-2*s),M=f*p;if(a.length){c||(c=new Array(a.length));for(var T=a.length-1;T>=0;--T)c[T]=y*a[T]+o*r[T]+x*n[T]+M*i[T];return c}return y*a+o*r+x*n+M*i}l.exports=t,l.exports.derivative=e},7642:function(l,e,t){"use strict";var a=t(8954),r=t(1682);l.exports=c;function n(p,f){this.point=p,this.index=f}function i(p,f){for(var d=p.point,y=f.point,o=d.length,x=0;x=2)return!1;R[D]=k}return!0}):F=F.filter(function(R){for(var z=0;z<=y;++z){var D=b[R[z]];if(D<0)return!1;R[z]=D}return!0}),y&1)for(var M=0;M>>31},l.exports.exponent=function(x){var M=l.exports.hi(x);return(M<<1>>>21)-1023},l.exports.fraction=function(x){var M=l.exports.lo(x),T=l.exports.hi(x),E=T&(1<<20)-1;return T&2146435072&&(E+=1048576),[M,E]},l.exports.denormalized=function(x){var M=l.exports.hi(x);return!(M&2146435072)}},1338:function(l){"use strict";function e(r,n,i){var s=r[i]|0;if(s<=0)return[];var c=new Array(s),p;if(i===r.length-1)for(p=0;p"u"&&(n=0),typeof r){case"number":if(r>0)return t(r|0,n);break;case"object":if(typeof r.length=="number")return e(r,n,0);break}return[]}l.exports=a},3134:function(l,e,t){"use strict";l.exports=r;var a=t(1682);function r(n,i){var s=n.length;if(typeof i!="number"){i=0;for(var c=0;c=y-1)for(var A=M.length-1,h=f-d[y-1],m=0;m=y-1)for(var g=M.length-1,A=f-d[y-1],m=0;m=0;--y)if(f[--d])return!1;return!0},s.jump=function(f){var d=this.lastT(),y=this.dimension;if(!(f0;--m)o.push(n(E[m-1],g[m-1],arguments[m])),x.push(0)}},s.push=function(f){var d=this.lastT(),y=this.dimension;if(!(f1e-6?1/T:0;this._time.push(f);for(var h=y;h>0;--h){var b=n(g[h-1],A[h-1],arguments[h]);o.push(b),x.push((b-o[M++])*m)}}},s.set=function(f){var d=this.dimension;if(!(f0;--E)y.push(n(M[E-1],T[E-1],arguments[E])),o.push(0)}},s.move=function(f){var d=this.lastT(),y=this.dimension;if(!(f<=d||arguments.length!==y+1)){var o=this._state,x=this._velocity,M=o.length-this.dimension,T=this.bounds,E=T[0],g=T[1],A=f-d,m=A>1e-6?1/A:0;this._time.push(f);for(var h=y;h>0;--h){var b=arguments[h];o.push(n(E[h-1],g[h-1],o[M++]+b)),x.push(b*m)}}},s.idle=function(f){var d=this.lastT();if(!(f=0;--m)o.push(n(E[m],g[m],o[M]+A*x[M])),x.push(0),M+=1}};function c(f){for(var d=new Array(f),y=0;y=0;--C){var h=b[C];_[C]<=0?b[C]=new a(h._color,h.key,h.value,b[C+1],h.right,h._count+1):b[C]=new a(h._color,h.key,h.value,h.left,b[C+1],h._count+1)}for(var C=b.length-1;C>1;--C){var F=b[C-1],h=b[C];if(F._color===t||h._color===t)break;var R=b[C-2];if(R.left===F)if(F.left===h){var z=R.right;if(z&&z._color===e)F._color=t,R.right=n(t,z),R._color=e,C-=1;else{if(R._color=e,R.left=F.right,F._color=t,F.right=R,b[C-2]=F,b[C-1]=h,i(R),i(F),C>=3){var D=b[C-3];D.left===R?D.left=F:D.right=F}break}}else{var z=R.right;if(z&&z._color===e)F._color=t,R.right=n(t,z),R._color=e,C-=1;else{if(F.right=h.left,R._color=e,R.left=h.right,h._color=t,h.left=F,h.right=R,b[C-2]=h,b[C-1]=F,i(R),i(F),i(h),C>=3){var D=b[C-3];D.left===R?D.left=h:D.right=h}break}}else if(F.right===h){var z=R.left;if(z&&z._color===e)F._color=t,R.left=n(t,z),R._color=e,C-=1;else{if(R._color=e,R.right=F.left,F._color=t,F.left=R,b[C-2]=F,b[C-1]=h,i(R),i(F),C>=3){var D=b[C-3];D.right===R?D.right=F:D.left=F}break}}else{var z=R.left;if(z&&z._color===e)F._color=t,R.left=n(t,z),R._color=e,C-=1;else{if(F.left=h.right,R._color=e,R.right=h.left,h._color=t,h.right=F,h.left=R,b[C-2]=h,b[C-1]=F,i(R),i(F),i(h),C>=3){var D=b[C-3];D.right===R?D.right=h:D.left=h}break}}}return b[0]._color=t,new s(m,b[0])};function p(g,A){if(A.left){var m=p(g,A.left);if(m)return m}var m=g(A.key,A.value);if(m)return m;if(A.right)return p(g,A.right)}function f(g,A,m,h){var b=A(g,h.key);if(b<=0){if(h.left){var _=f(g,A,m,h.left);if(_)return _}var _=m(h.key,h.value);if(_)return _}if(h.right)return f(g,A,m,h.right)}function d(g,A,m,h,b){var _=m(g,b.key),I=m(A,b.key),C;if(_<=0&&(b.left&&(C=d(g,A,m,h,b.left),C)||I>0&&(C=h(b.key,b.value),C)))return C;if(I>0&&b.right)return d(g,A,m,h,b.right)}c.forEach=function(A,m,h){if(this.root)switch(arguments.length){case 1:return p(A,this.root);case 2:return f(m,this._compare,A,this.root);case 3:return this._compare(m,h)>=0?void 0:d(m,h,this._compare,A,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var g=[],A=this.root;A;)g.push(A),A=A.left;return new y(this,g)}}),Object.defineProperty(c,"end",{get:function(){for(var g=[],A=this.root;A;)g.push(A),A=A.right;return new y(this,g)}}),c.at=function(g){if(g<0)return new y(this,[]);for(var A=this.root,m=[];;){if(m.push(A),A.left){if(g=A.right._count)break;A=A.right}else break}return new y(this,[])},c.ge=function(g){for(var A=this._compare,m=this.root,h=[],b=0;m;){var _=A(g,m.key);h.push(m),_<=0&&(b=h.length),_<=0?m=m.left:m=m.right}return h.length=b,new y(this,h)},c.gt=function(g){for(var A=this._compare,m=this.root,h=[],b=0;m;){var _=A(g,m.key);h.push(m),_<0&&(b=h.length),_<0?m=m.left:m=m.right}return h.length=b,new y(this,h)},c.lt=function(g){for(var A=this._compare,m=this.root,h=[],b=0;m;){var _=A(g,m.key);h.push(m),_>0&&(b=h.length),_<=0?m=m.left:m=m.right}return h.length=b,new y(this,h)},c.le=function(g){for(var A=this._compare,m=this.root,h=[],b=0;m;){var _=A(g,m.key);h.push(m),_>=0&&(b=h.length),_<0?m=m.left:m=m.right}return h.length=b,new y(this,h)},c.find=function(g){for(var A=this._compare,m=this.root,h=[];m;){var b=A(g,m.key);if(h.push(m),b===0)return new y(this,h);b<=0?m=m.left:m=m.right}return new y(this,[])},c.remove=function(g){var A=this.find(g);return A?A.remove():this},c.get=function(g){for(var A=this._compare,m=this.root;m;){var h=A(g,m.key);if(h===0)return m.value;h<=0?m=m.left:m=m.right}};function y(g,A){this.tree=g,this._stack=A}var o=y.prototype;Object.defineProperty(o,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(o,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),o.clone=function(){return new y(this.tree,this._stack.slice())};function x(g,A){g.key=A.key,g.value=A.value,g.left=A.left,g.right=A.right,g._color=A._color,g._count=A._count}function M(g){for(var A,m,h,b,_=g.length-1;_>=0;--_){if(A=g[_],_===0){A._color=t;return}if(m=g[_-1],m.left===A){if(h=m.right,h.right&&h.right._color===e){if(h=m.right=r(h),b=h.right=r(h.right),m.right=h.left,h.left=m,h.right=b,h._color=m._color,A._color=t,m._color=t,b._color=t,i(m),i(h),_>1){var I=g[_-2];I.left===m?I.left=h:I.right=h}g[_-1]=h;return}else if(h.left&&h.left._color===e){if(h=m.right=r(h),b=h.left=r(h.left),m.right=b.left,h.left=b.right,b.left=m,b.right=h,b._color=m._color,m._color=t,h._color=t,A._color=t,i(m),i(h),i(b),_>1){var I=g[_-2];I.left===m?I.left=b:I.right=b}g[_-1]=b;return}if(h._color===t)if(m._color===e){m._color=t,m.right=n(e,h);return}else{m.right=n(e,h);continue}else{if(h=r(h),m.right=h.left,h.left=m,h._color=m._color,m._color=e,i(m),i(h),_>1){var I=g[_-2];I.left===m?I.left=h:I.right=h}g[_-1]=h,g[_]=m,_+11){var I=g[_-2];I.right===m?I.right=h:I.left=h}g[_-1]=h;return}else if(h.right&&h.right._color===e){if(h=m.left=r(h),b=h.right=r(h.right),m.left=b.right,h.right=b.left,b.right=m,b.left=h,b._color=m._color,m._color=t,h._color=t,A._color=t,i(m),i(h),i(b),_>1){var I=g[_-2];I.right===m?I.right=b:I.left=b}g[_-1]=b;return}if(h._color===t)if(m._color===e){m._color=t,m.left=n(e,h);return}else{m.left=n(e,h);continue}else{if(h=r(h),m.left=h.right,h.right=m,h._color=m._color,m._color=e,i(m),i(h),_>1){var I=g[_-2];I.right===m?I.right=h:I.left=h}g[_-1]=h,g[_]=m,_+1=0;--h){var m=g[h];m.left===g[h+1]?A[h]=new a(m._color,m.key,m.value,A[h+1],m.right,m._count):A[h]=new a(m._color,m.key,m.value,m.left,A[h+1],m._count)}if(m=A[A.length-1],m.left&&m.right){var b=A.length;for(m=m.left;m.right;)A.push(m),m=m.right;var _=A[b-1];A.push(new a(m._color,_.key,_.value,m.left,m.right,m._count)),A[b-1].key=m.key,A[b-1].value=m.value;for(var h=A.length-2;h>=b;--h)m=A[h],A[h]=new a(m._color,m.key,m.value,m.left,A[h+1],m._count);A[b-1].left=A[b]}if(m=A[A.length-1],m._color===e){var I=A[A.length-2];I.left===m?I.left=null:I.right===m&&(I.right=null),A.pop();for(var h=0;h0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(o,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(o,"index",{get:function(){var g=0,A=this._stack;if(A.length===0){var m=this.tree.root;return m?m._count:0}else A[A.length-1].left&&(g=A[A.length-1].left._count);for(var h=A.length-2;h>=0;--h)A[h+1]===A[h].right&&(++g,A[h].left&&(g+=A[h].left._count));return g},enumerable:!0}),o.next=function(){var g=this._stack;if(g.length!==0){var A=g[g.length-1];if(A.right)for(A=A.right;A;)g.push(A),A=A.left;else for(g.pop();g.length>0&&g[g.length-1].right===A;)A=g[g.length-1],g.pop()}},Object.defineProperty(o,"hasNext",{get:function(){var g=this._stack;if(g.length===0)return!1;if(g[g.length-1].right)return!0;for(var A=g.length-1;A>0;--A)if(g[A-1].left===g[A])return!0;return!1}}),o.update=function(g){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var m=new Array(A.length),h=A[A.length-1];m[m.length-1]=new a(h._color,h.key,g,h.left,h.right,h._count);for(var b=A.length-2;b>=0;--b)h=A[b],h.left===A[b+1]?m[b]=new a(h._color,h.key,h.value,m[b+1],h.right,h._count):m[b]=new a(h._color,h.key,h.value,h.left,m[b+1],h._count);return new s(this.tree._compare,m[0])},o.prev=function(){var g=this._stack;if(g.length!==0){var A=g[g.length-1];if(A.left)for(A=A.left;A;)g.push(A),A=A.right;else for(g.pop();g.length>0&&g[g.length-1].left===A;)A=g[g.length-1],g.pop()}},Object.defineProperty(o,"hasPrev",{get:function(){var g=this._stack;if(g.length===0)return!1;if(g[g.length-1].left)return!0;for(var A=g.length-1;A>0;--A)if(g[A-1].right===g[A])return!0;return!1}});function T(g,A){return gA?1:0}function E(g){return new s(g||T,null)}},3837:function(l,e,t){"use strict";l.exports=C;var a=t(4935),r=t(501),n=t(5304),i=t(6429),s=t(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),p=ArrayBuffer,f=DataView;function d(F){return p.isView(F)&&!(F instanceof f)}function y(F){return Array.isArray(F)||d(F)}function o(F,R){return F[0]=R[0],F[1]=R[1],F[2]=R[2],F}function x(F){this.gl=F,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=n(F)}var M=x.prototype;M.update=function(F){F=F||{};function R(V,$,X){if(X in F){var Z=F[X],Q=this[X],re;(V?y(Z)&&y(Z[0]):y(Z))?this[X]=re=[$(Z[0]),$(Z[1]),$(Z[2])]:this[X]=re=[$(Z),$(Z),$(Z)];for(var ce=0;ce<3;++ce)if(re[ce]!==Q[ce])return!0}return!1}var z=R.bind(this,!1,Number),D=R.bind(this,!1,Boolean),k=R.bind(this,!1,String),B=R.bind(this,!0,function(V){if(y(V)){if(V.length===3)return[+V[0],+V[1],+V[2],1];if(V.length===4)return[+V[0],+V[1],+V[2],+V[3]]}return[0,0,0,1]}),O,q=!1,Y=!1;if("bounds"in F)for(var ee=F.bounds,te=0;te<2;++te)for(var ae=0;ae<3;++ae)ee[te][ae]!==this.bounds[te][ae]&&(Y=!0),this.bounds[te][ae]=ee[te][ae];if("ticks"in F){O=F.ticks,q=!0,this.autoTicks=!1;for(var te=0;te<3;++te)this.tickSpacing[te]=0}else z("tickSpacing")&&(this.autoTicks=!0,Y=!0);if(this._firstInit&&("ticks"in F||"tickSpacing"in F||(this.autoTicks=!0),Y=!0,q=!0,this._firstInit=!1),Y&&this.autoTicks&&(O=s.create(this.bounds,this.tickSpacing),q=!0),q){for(var te=0;te<3;++te)O[te].sort(function($,X){return $.x-X.x});s.equal(O,this.ticks)?q=!1:this.ticks=O}D("tickEnable"),k("tickFont")&&(q=!0),k("tickFontStyle")&&(q=!0),k("tickFontWeight")&&(q=!0),k("tickFontVariant")&&(q=!0),z("tickSize"),z("tickAngle"),z("tickPad"),B("tickColor");var U=k("labels");k("labelFont")&&(U=!0),k("labelFontStyle")&&(U=!0),k("labelFontWeight")&&(U=!0),k("labelFontVariant")&&(U=!0),D("labelEnable"),z("labelSize"),z("labelPad"),B("labelColor"),D("lineEnable"),D("lineMirror"),z("lineWidth"),B("lineColor"),D("lineTickEnable"),D("lineTickMirror"),z("lineTickLength"),z("lineTickWidth"),B("lineTickColor"),D("gridEnable"),z("gridWidth"),B("gridColor"),D("zeroEnable"),B("zeroLineColor"),z("zeroLineWidth"),D("backgroundEnable"),B("backgroundColor");var H=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],K=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(U||q)&&this._text.update(this.bounds,this.labels,H,this.ticks,K):this._text=a(this.gl,this.bounds,this.labels,H,this.ticks,K),this._lines&&q&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};function T(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var E=[new T,new T,new T];function g(F,R,z,D,k){for(var B=F.primalOffset,O=F.primalMinor,q=F.mirrorOffset,Y=F.mirrorMinor,ee=D[R],te=0;te<3;++te)if(R!==te){var ae=B,U=q,H=O,K=Y;ee&1<0?(H[te]=-1,K[te]=0):(H[te]=0,K[te]=1)}}var A=[0,0,0],m={model:c,view:c,projection:c,_ortho:!1};M.isOpaque=function(){return!0},M.isTransparent=function(){return!1},M.drawTransparent=function(F){};var h=0,b=[0,0,0],_=[0,0,0],I=[0,0,0];M.draw=function(F){F=F||m;for(var X=this.gl,R=F.model||c,z=F.view||c,D=F.projection||c,k=this.bounds,B=F._ortho||!1,O=i(R,z,D,k,B),q=O.cubeEdges,Y=O.axis,ee=z[12],te=z[13],ae=z[14],U=z[15],H=B?2:1,K=H*this.pixelRatio*(D[3]*ee+D[7]*te+D[11]*ae+D[15]*U)/X.drawingBufferHeight,V=0;V<3;++V)this.lastCubeProps.cubeEdges[V]=q[V],this.lastCubeProps.axis[V]=Y[V];for(var $=E,V=0;V<3;++V)g(E[V],V,this.bounds,q,Y);for(var X=this.gl,Z=A,V=0;V<3;++V)this.backgroundEnable[V]?Z[V]=Y[V]:Z[V]=0;this._background.draw(R,z,D,k,Z,this.backgroundColor),this._lines.bind(R,z,D,this);for(var V=0;V<3;++V){var Q=[0,0,0];Y[V]>0?Q[V]=k[1][V]:Q[V]=k[0][V];for(var re=0;re<2;++re){var ce=(V+1+re)%3,me=(V+1+(re^1))%3;this.gridEnable[ce]&&this._lines.drawGrid(ce,me,this.bounds,Q,this.gridColor[ce],this.gridWidth[ce]*this.pixelRatio)}for(var re=0;re<2;++re){var ce=(V+1+re)%3,me=(V+1+(re^1))%3;this.zeroEnable[me]&&Math.min(k[0][me],k[1][me])<=0&&Math.max(k[0][me],k[1][me])>=0&&this._lines.drawZero(ce,me,this.bounds,Q,this.zeroLineColor[me],this.zeroLineWidth[me]*this.pixelRatio)}}for(var V=0;V<3;++V){this.lineEnable[V]&&this._lines.drawAxisLine(V,this.bounds,$[V].primalOffset,this.lineColor[V],this.lineWidth[V]*this.pixelRatio),this.lineMirror[V]&&this._lines.drawAxisLine(V,this.bounds,$[V].mirrorOffset,this.lineColor[V],this.lineWidth[V]*this.pixelRatio);for(var ye=o(b,$[V].primalMinor),Ae=o(_,$[V].mirrorMinor),Se=this.lineTickLength,re=0;re<3;++re){var Ce=K/R[5*re];ye[re]*=Se[re]*Ce,Ae[re]*=Se[re]*Ce}this.lineTickEnable[V]&&this._lines.drawAxisTicks(V,$[V].primalOffset,ye,this.lineTickColor[V],this.lineTickWidth[V]*this.pixelRatio),this.lineTickMirror[V]&&this._lines.drawAxisTicks(V,$[V].mirrorOffset,Ae,this.lineTickColor[V],this.lineTickWidth[V]*this.pixelRatio)}this._lines.unbind(),this._text.bind(R,z,D,this.pixelRatio);var qe,Ue=.5,xe,he;function oe(je){he=[0,0,0],he[je]=1}function le(je,ut,st){var yt=(je+1)%3,At=(je+2)%3,Pt=ut[yt],Zt=ut[At],vr=st[yt],Nt=st[At];if(Pt>0&&Nt>0){oe(yt);return}else if(Pt>0&&Nt<0){oe(yt);return}else if(Pt<0&&Nt>0){oe(yt);return}else if(Pt<0&&Nt<0){oe(yt);return}else if(Zt>0&&vr>0){oe(At);return}else if(Zt>0&&vr<0){oe(At);return}else if(Zt<0&&vr>0){oe(At);return}else if(Zt<0&&vr<0){oe(At);return}}for(var V=0;V<3;++V){for(var ne=$[V].primalMinor,be=$[V].mirrorMinor,Fe=o(I,$[V].primalOffset),re=0;re<3;++re)this.lineTickEnable[V]&&(Fe[re]+=K*ne[re]*Math.max(this.lineTickLength[re],0)/R[5*re]);var Ve=[0,0,0];if(Ve[V]=1,this.tickEnable[V]){this.tickAngle[V]===-3600?(this.tickAngle[V]=0,this.tickAlign[V]="auto"):this.tickAlign[V]=-1,xe=1,qe=[this.tickAlign[V],Ue,xe],qe[0]==="auto"?qe[0]=h:qe[0]=parseInt(""+qe[0]),he=[0,0,0],le(V,ne,be);for(var re=0;re<3;++re)Fe[re]+=K*ne[re]*this.tickPad[re]/R[5*re];this._text.drawTicks(V,this.tickSize[V],this.tickAngle[V],Fe,this.tickColor[V],Ve,he,qe)}if(this.labelEnable[V]){xe=0,he=[0,0,0],this.labels[V].length>4&&(oe(V),xe=1),qe=[this.labelAlign[V],Ue,xe],qe[0]==="auto"?qe[0]=h:qe[0]=parseInt(""+qe[0]);for(var re=0;re<3;++re)Fe[re]+=K*ne[re]*this.labelPad[re]/R[5*re];Fe[V]+=.5*(k[0][V]+k[1][V]),this._text.drawLabel(V,this.labelSize[V],this.labelAngle[V],Fe,this.labelColor[V],[0,0,0],he,qe)}}this._text.unbind()},M.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function C(F,R){var z=new x(F);return z.update(R),z}},5304:function(l,e,t){"use strict";l.exports=c;var a=t(2762),r=t(8116),n=t(1879).bg;function i(p,f,d,y){this.gl=p,this.buffer=f,this.vao=d,this.shader=y}var s=i.prototype;s.draw=function(p,f,d,y,o,x){for(var M=!1,T=0;T<3;++T)M=M||o[T];if(M){var E=this.gl;E.enable(E.POLYGON_OFFSET_FILL),E.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:p,view:f,projection:d,bounds:y,enable:o,colors:x},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),E.disable(E.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(p){for(var f=[],d=[],y=0,o=0;o<3;++o)for(var x=(o+1)%3,M=(o+2)%3,T=[0,0,0],E=[0,0,0],g=-1;g<=1;g+=2){d.push(y,y+2,y+1,y+1,y+2,y+3),T[o]=g,E[o]=g;for(var A=-1;A<=1;A+=2){T[x]=A;for(var m=-1;m<=1;m+=2)T[M]=m,f.push(T[0],T[1],T[2],E[0],E[1],E[2]),y+=1}var h=x;x=M,M=h}var b=a(p,new Float32Array(f)),_=a(p,new Uint16Array(d),p.ELEMENT_ARRAY_BUFFER),I=r(p,[{buffer:b,type:p.FLOAT,size:3,offset:0,stride:24},{buffer:b,type:p.FLOAT,size:3,offset:12,stride:24}],_),C=n(p);return C.attributes.position.location=0,C.attributes.normal.location=1,new i(p,b,I,C)}},6429:function(l,e,t){"use strict";l.exports=g;var a=t(8828),r=t(6760),n=t(5202),i=t(3250),s=new Array(16),c=new Array(8),p=new Array(8),f=new Array(3),d=[0,0,0];(function(){for(var A=0;A<8;++A)c[A]=[1,1,1,1],p[A]=[1,1,1]})();function y(A,m,h){for(var b=0;b<4;++b){A[b]=h[12+b];for(var _=0;_<3;++_)A[b]+=m[_]*h[4*_+b]}}var o=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function x(A){for(var m=0;mY&&(z|=1<Y){z|=1<p[C][1])&&($=C);for(var X=-1,C=0;C<3;++C){var Z=$^1<p[Q][0]&&(Q=Z)}}var re=M;re[0]=re[1]=re[2]=0,re[a.log2(X^$)]=$&X,re[a.log2($^Q)]=$&Q;var ce=Q^7;ce===z||ce===V?(ce=X^7,re[a.log2(Q^ce)]=ce&Q):re[a.log2(X^ce)]=ce&X;for(var me=T,ye=z,B=0;B<3;++B)ye&1<0}function E(s){var c=0,m=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(c=3);c]*>/,l=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,e=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,t=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,n=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,r=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function a(s){var c=s.match(e),m=s.match(t),h=s.match(n);return{width:c&&(c[1]||c[2]),height:m&&(m[1]||m[2]),viewbox:h&&(h[1]||h[2])}}function o(s){return r.test(s)?s.match(r)[0]:"px"}V.exports=function(s){if(E(s)){for(var c="",m=0;m>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function a(o,s){return{width:(o[s+6]<<16|o[s+5]<<8|o[s+4])+1,height:(o[s+9]<<16|o[s+8]<<8|o[s+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}V.exports=function(o){if(!(o.length<16)&&!(!b(o,0,e)||!b(o,8,t))){var s=12,c=null,m=0,h=k(o,4)+8;if(!(h>o.length)){for(;s+8=10?c=c||n(o,s+8):v==="VP8L"&&g>=5?c=c||r(o,s+8):v==="VP8X"&&g>=10?c=c||a(o,s+8):v==="EXIF"&&(m=l.get_orientation(o.slice(s+8,s+8+g)),s=1/0),s+=8+g}if(c)return m>0&&(c.orientation=m),c}}}}}),rO=ze({"node_modules/probe-image-size/lib/parsers_sync.js"(J,V){"use strict";V.exports={avif:WB(),bmp:YB(),gif:XB(),ico:ZB(),jpeg:$B(),png:KB(),psd:JB(),svg:QB(),tiff:eO(),webp:tO()}}}),aO=ze({"node_modules/probe-image-size/sync.js"(J,V){"use strict";var p=rO();function b(E){for(var k=Object.keys(p),l=0;l0&&e.height>0?e:null}return null}V.exports=function(k){return b(k)},V.exports.parsers=p}}),nO=ze({"src/traces/image/helpers.js"(J){"use strict";var V=aO(),p=ip().IMAGE_URL_PREFIX,b=$v().Buffer;J.getImageSize=function(E){var k=E.replace(p,""),l=new b(k,"base64");return V(l)}}}),iO=ze({"src/traces/image/calc.js"(J,V){"use strict";var p=Nr(),b=ig(),E=ao(),k=Gi(),l=Nr().maxRowLength,e=nO().getImageSize;V.exports=function(o,s){var c,m;if(s._hasZ)c=s.z.length,m=l(s.z);else if(s._hasSource){var h=e(s.source);c=h.height,m=h.width}var v=k.getFromId(o,s.xaxis||"x"),g=k.getFromId(o,s.yaxis||"y"),i=v.d2c(s.x0)-s.dx/2,w=g.d2c(s.y0)-s.dy/2,S,M=[i,i+m*s.dx],C=[w,w+c*s.dy];if(v&&v.type==="log")for(S=0;S0;)z=c.c2p(C+B*u),B--;for(B=0;O===void 0&&B0;)D=m.c2p(_+B*A),B--;if(zG[0];if(X||K){var H=x+P/2,Y=O+j/2;ne+="transform:"+E(H+"px",Y+"px")+"scale("+(X?-1:1)+","+(K?-1:1)+")"+E(-H+"px",-Y+"px")+";"}}re.attr("style",ne);var q=new Promise(function(Z){if(w._hasZ)Z();else if(w._hasSource)if(w._canvas&&w._canvas.el.width===T&&w._canvas.el.height===f&&w._canvas.source===w.source)Z();else{var ee=document.createElement("canvas");ee.width=T,ee.height=f;var ae=ee.getContext("2d",{willReadFrequently:!0});w._image=w._image||new Image;var he=w._image;he.onload=function(){ae.drawImage(he,0,0),w._canvas={el:ee,source:w.source},Z()},he.setAttribute("src",w.source)}}).then(function(){var Z,ee;if(w._hasZ)ee=Q(function(xe,we){var Me=M[we][xe];return b.isTypedArray(Me)&&(Me=Array.from(Me)),Me}),Z=ee.toDataURL("image/png");else if(w._hasSource)if(S)Z=w.source;else{var ae=w._canvas.el.getContext("2d",{willReadFrequently:!0}),he=ae.getImageData(0,0,T,f).data;ee=Q(function(xe,we){var Me=4*(we*T+xe);return[he[Me],he[Me+1],he[Me+2],he[Me+3]]}),Z=ee.toDataURL("image/png")}re.attr({"xlink:href":Z,height:j,width:P,x,y:O})});r._promises.push(q)})}}}),sO=ze({"src/traces/image/style.js"(J,V){"use strict";var p=ci();V.exports=function(E){p.select(E).selectAll(".im image").style("opacity",function(k){return k[0].trace.opacity})}}}),lO=ze({"src/traces/image/hover.js"(J,V){"use strict";var p=Zl(),b=Nr(),E=b.isArrayOrTypedArray,k=ig();V.exports=function(e,t,n){var r=e.cd[0],a=r.trace,o=e.xa,s=e.ya;if(!(p.inbox(t-r.x0,t-(r.x0+r.w*a.dx),0)>0||p.inbox(n-r.y0,n-(r.y0+r.h*a.dy),0)>0)){var c=Math.floor((t-r.x0)/a.dx),m=Math.floor(Math.abs(n-r.y0)/a.dy),h;if(a._hasZ?h=r.z[m][c]:a._hasSource&&(h=a._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(c,m,1,1).data),!!h){var v=r.hi||a.hoverinfo,g;if(v){var i=v.split("+");i.indexOf("all")!==-1&&(i=["color"]),i.indexOf("color")!==-1&&(g=!0)}var w=k.colormodel[a.colormodel],S=w.colormodel||a.colormodel,M=S.length,C=a._scaler(h),_=w.suffix,T=[];(a.hovertemplate||g)&&(T.push("["+[C[0]+_[0],C[1]+_[1],C[2]+_[2]].join(", ")),M===4&&T.push(", "+C[3]+_[3]),T.push("]"),T=T.join(""),e.extraText=S.toUpperCase()+": "+T);var f;E(a.hovertext)&&E(a.hovertext[m])?f=a.hovertext[m][c]:E(a.text)&&E(a.text[m])&&(f=a.text[m][c]);var u=s.c2p(r.y0+(m+.5)*a.dy),A=r.x0+(c+.5)*a.dx,x=r.y0+(m+.5)*a.dy,z="["+h.slice(0,a.colormodel.length).join(", ")+"]";return[b.extendFlat(e,{index:[m,c],x0:o.c2p(r.x0+c*a.dx),x1:o.c2p(r.x0+(c+1)*a.dx),y0:u,y1:u,color:C,xVal:A,xLabelVal:A,yVal:x,yLabelVal:x,zLabelVal:z,text:f,hovertemplateLabels:{zLabel:z,colorLabel:T,"color[0]Label":C[0]+_[0],"color[1]Label":C[1]+_[1],"color[2]Label":C[2]+_[2],"color[3]Label":C[3]+_[3]}})]}}}}}),uO=ze({"src/traces/image/event_data.js"(J,V){"use strict";V.exports=function(b,E){return"xVal"in E&&(b.x=E.xVal),"yVal"in E&&(b.y=E.yVal),E.xa&&(b.xaxis=E.xa),E.ya&&(b.yaxis=E.ya),b.color=E.color,b.colormodel=E.trace.colormodel,b.z||(b.z=E.color),b}}}),cO=ze({"src/traces/image/index.js"(J,V){"use strict";V.exports={attributes:(CT(),Po(Sb)).default,supplyDefaults:Gz(),calc:iO(),plot:oO(),style:sO(),hoverPoints:lO(),eventData:uO(),moduleType:"trace",name:"image",basePlotModule:Du(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}}}),fO=ze({"lib/image.js"(J,V){"use strict";V.exports=cO()}}),t0=ze({"src/traces/pie/attributes.js"(J,V){"use strict";var p=ws(),b=Ml().attributes,E=Qs(),k=fc(),{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=Ki().extendFlat,r=Uc().pattern,a=E({editType:"plot",arrayOk:!0,colorEditType:"plot"});V.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:k.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,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:n({},p.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:l({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:t(),texttemplate:e({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:t({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:n({},a,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:n({},a,{}),outsidetextfont:n({},a,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:n({},p.showlegend,{arrayOk:!0}),legend:n({},p.legend,{arrayOk:!0}),legendrank:n({},p.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:n({},a,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:b({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:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"}}}}),r0=ze({"src/traces/pie/defaults.js"(J,V){"use strict";var p=ao(),b=Nr(),E=t0(),k=Ml().defaults,l=qh().handleText,e=Nr().coercePattern;function t(a,o){var s=b.isArrayOrTypedArray(a),c=b.isArrayOrTypedArray(o),m=Math.min(s?a.length:1/0,c?o.length:1/0);if(isFinite(m)||(m=0),m&&c){for(var h,v=0;v0){h=!0;break}}h||(m=0)}return{hasLabels:s,hasValues:c,len:m}}function n(a,o,s,c,m){var h=c("marker.line.width");h&&c("marker.line.color",m?void 0:s.paper_bgcolor);var v=c("marker.colors");e(c,"marker.pattern",v),a.marker&&!o.marker.pattern.fgcolor&&(o.marker.pattern.fgcolor=a.marker.colors),o.marker.pattern.bgcolor||(o.marker.pattern.bgcolor=s.paper_bgcolor)}function r(a,o,s,c){function m(x,z){return b.coerce(a,o,E,x,z)}var h=m("labels"),v=m("values"),g=t(h,v),i=g.len;if(o._hasLabels=g.hasLabels,o._hasValues=g.hasValues,!o._hasLabels&&o._hasValues&&(m("label0"),m("dlabel")),!i){o.visible=!1;return}o._length=i,n(a,o,c,m,!0),m("scalegroup");var w=m("text"),S=m("texttemplate");m("texttemplatefallback");var M;if(S||(M=m("textinfo",b.isArrayOrTypedArray(w)?"text+percent":"percent")),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),S||M&&M!=="none"){var C=m("textposition");l(a,o,c,m,C,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var _=Array.isArray(C)||C==="auto",T=_||C==="outside";T&&m("automargin"),(C==="inside"||C==="auto"||Array.isArray(C))&&m("insidetextorientation")}else M==="none"&&m("textposition","none");k(o,c,m);var f=m("hole"),u=m("title.text");if(u){var A=m("title.position",f?"middle center":"top center");!f&&A==="middle center"&&(o.title.position="top center"),b.coerceFont(m,"title.font",c.font)}m("sort"),m("direction"),m("rotation"),m("pull")}V.exports={handleLabelsAndValues:t,handleMarkerDefaults:n,supplyDefaults:r}}}),qb=ze({"src/traces/pie/layout_attributes.js"(J,V){"use strict";V.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),hO=ze({"src/traces/pie/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=qb();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("hiddenlabels"),e("piecolorway",l.colorway),e("extendpiecolors")}}}),ug=ze({"src/traces/pie/calc.js"(J,V){"use strict";var p=ao(),b=Qn(),E={};function k(n,r){var a=[],o=n._fullLayout,s=o.hiddenlabels||[],c=r.labels,m=r.marker.colors||[],h=r.values,v=r._length,g=r._hasValues&&v,i,w;if(r.dlabel)for(c=new Array(v),i=0;i=0});var x=r.type==="funnelarea"?_:r.sort;return x&&a.sort(function(z,I){return I.v-z.v}),a[0]&&(a[0].vTotal=C),a}function l(n){return function(a,o){if(!a||!b.isValid(a))return!1;let s=b.rgbaString(a);return n[o]||(n[o]=s),s}}function e(n,r){var a=(r||{}).type;a||(a="pie");var o=n._fullLayout,s=n.calcdata,c=o[a+"colorway"],m=o["_"+a+"colormap"];o["extend"+a+"colors"]&&(c=t(c,E));for(var h=0,v=0;v0&&(Be+=gt*le.pxmid[0],Xe+=gt*le.pxmid[1])}le.cxFinal=Be,le.cyFinal=Xe;function Tt(Ot,vt,ht,De){var Ne=De*(vt[0]-Ot[0]),We=De*(vt[1]-Ot[1]);return"a"+De*he.r+","+De*he.r+" 0 "+le.largeArc+(ht?" 1 ":" 0 ")+Ne+","+We}var At=xe.hole;if(le.v===he.vTotal){var $t="M"+(Be+le.px0[0])+","+(Xe+le.px0[1])+Tt(le.px0,le.pxmid,!0,1)+Tt(le.pxmid,le.px0,!0,1)+"Z";At?yt.attr("d","M"+(Be+At*le.px0[0])+","+(Xe+At*le.px0[1])+Tt(le.px0,le.pxmid,!1,At)+Tt(le.pxmid,le.px0,!1,At)+"Z"+$t):yt.attr("d",$t)}else{var rr=Tt(le.px0,le.px1,!0,1);if(At){var _r=1-At;yt.attr("d","M"+(Be+At*le.px1[0])+","+(Xe+At*le.px1[1])+Tt(le.px1,le.px0,!1,At)+"l"+_r*le.px0[0]+","+_r*le.px0[1]+rr+"Z")}else yt.attr("d","M"+Be+","+Xe+"l"+le.px0[0]+","+le.px0[1]+rr+"Z")}se(X,le,he);var Xt=m.castOption(xe.textposition,le.pts),or=Ye.selectAll("g.slicetext").data(le.text&&Xt!=="none"?[0]:[]);or.enter().append("g").classed("slicetext",!0),or.exit().remove(),or.each(function(){var Ot=e.ensureSingle(p.select(this),"text","",function(et){et.attr("data-notex",1)}),vt=e.ensureUniformFontSize(X,Xt==="outside"?S(xe,le,Y.font):M(xe,le,Y.font));Ot.text(le.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(l.font,vt).call(r.convertToTspans,X);var ht=l.bBox(Ot.node()),De;if(Xt==="outside")De=O(ht,le);else if(De=_(ht,le,he),Xt==="auto"&&De.scale<1){var Ne=e.ensureUniformFontSize(X,xe.outsidetextfont);Ot.call(l.font,Ne),ht=l.bBox(Ot.node()),De=O(ht,le)}var We=De.textPosAngle,Ke=We===void 0?le.pxmid:ne(he.r,We);if(De.targetX=Be+Ke[0]*De.rCenter+(De.x||0),De.targetY=Xe+Ke[1]*De.rCenter+(De.y||0),G(De,ht),De.outside){var Je=De.targetY;le.yLabelMin=Je-ht.height/2,le.yLabelMid=Je,le.yLabelMax=Je+ht.height/2,le.labelExtraX=0,le.labelExtraY=0,Se=!0}De.fontSize=vt.size,o(xe.type,De,Y),ee[Ae].transform=De,e.setTransormAndDisplay(Ot,De)})});var Ie=p.select(this).selectAll("g.titletext").data(xe.title.text?[0]:[]);if(Ie.enter().append("g").classed("titletext",!0),Ie.exit().remove(),Ie.each(function(){var le=e.ensureSingle(p.select(this),"text","",function(Xe){Xe.attr("data-notex",1)}),Ae=xe.title.text;xe._meta&&(Ae=e.templateString(Ae,xe._meta)),le.text(Ae).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(l.font,xe.title.font).call(r.convertToTspans,X);var Be;xe.title.position==="middle center"?Be=D(he):Be=B(he,q),le.attr("transform",n(Be.x,Be.y)+t(Math.min(1,Be.scale))+n(Be.tx,Be.ty))}),Se&&U(Me,xe),i(we,xe),Se&&xe.automargin){var Ve=l.bBox(ae.node()),Ge=xe.domain,ke=q.w*(Ge.x[1]-Ge.x[0]),_e=q.h*(Ge.y[1]-Ge.y[0]),ce=(.5*ke-he.r)/q.w,ve=(.5*_e-he.r)/q.h;b.autoMargin(X,"pie."+xe.uid+".automargin",{xl:Ge.x[0]-ce,xr:Ge.x[1]+ce,yb:Ge.y[0]-ve,yt:Ge.y[1]+ve,l:Math.max(he.cx-he.r-Ve.left,0),r:Math.max(Ve.right-(he.cx+he.r),0),b:Math.max(Ve.bottom-(he.cy+he.r),0),t:Math.max(he.cy-he.r-Ve.top,0),pad:5})}})});setTimeout(function(){Z.selectAll("tspan").each(function(){var ee=p.select(this);ee.attr("dy")&&ee.attr("dy",ee.attr("dy"))})},0)}function i(X,K){X.each(function(H){var Y=p.select(this);if(!H.labelExtraX&&!H.labelExtraY){Y.select("path.textline").remove();return}var q=Y.select("g.slicetext text");H.transform.targetX+=H.labelExtraX,H.transform.targetY+=H.labelExtraY,e.setTransormAndDisplay(q,H.transform);var Z=H.cxFinal+H.pxmid[0],ee=H.cyFinal+H.pxmid[1],ae="M"+Z+","+ee,he=(H.yLabelMax-H.yLabelMin)*(H.pxmid[0]<0?-1:1)/4;if(H.labelExtraX){var xe=H.labelExtraX*H.pxmid[1]/H.pxmid[0],we=H.yLabelMid+H.labelExtraY-(H.cyFinal+H.pxmid[1]);Math.abs(xe)>Math.abs(we)?ae+="l"+we*H.pxmid[0]/H.pxmid[1]+","+we+"H"+(Z+H.labelExtraX+he):ae+="l"+H.labelExtraX+","+xe+"v"+(we-xe)+"h"+he}else ae+="V"+(H.yLabelMid+H.labelExtraY)+"h"+he;e.ensureSingle(Y,"path","textline").call(k.stroke,K.outsidetextfont.color).attr({"stroke-width":Math.min(2,K.outsidetextfont.size/8),d:ae,fill:"none"})})}function w(X,K,H){var Y=H[0],q=Y.cx,Z=Y.cy,ee=Y.trace,ae=ee.type==="funnelarea";"_hasHoverLabel"in ee||(ee._hasHoverLabel=!1),"_hasHoverEvent"in ee||(ee._hasHoverEvent=!1),X.on("mouseover",function(he){var xe=K._fullLayout,we=K._fullData[ee.index];if(!(K._dragging||xe.hovermode===!1)){var Me=we.hoverinfo;if(Array.isArray(Me)&&(Me=E.castHoverinfo({hoverinfo:[m.castOption(Me,he.pts)],_module:ee._module},xe,0)),Me==="all"&&(Me="label+text+value+percent+name"),we.hovertemplate||Me!=="none"&&Me!=="skip"&&Me){var Se=he.rInscribed||0,Ie=q+he.pxmid[0]*(1-Se),Ve=Z+he.pxmid[1]*(1-Se),Ge=xe.separators,ke=[];if(Me&&Me.indexOf("label")!==-1&&ke.push(he.label),he.text=m.castOption(we.hovertext||we.text,he.pts),Me&&Me.indexOf("text")!==-1){var _e=he.text;e.isValidTextValue(_e)&&ke.push(_e)}he.value=he.v,he.valueLabel=m.formatPieValue(he.v,Ge),Me&&Me.indexOf("value")!==-1&&ke.push(he.valueLabel),he.percent=he.v/Y.vTotal,he.percentLabel=m.formatPiePercent(he.percent,Ge),Me&&Me.indexOf("percent")!==-1&&ke.push(he.percentLabel);var ce=we.hoverlabel,ve=ce.font,le=[];E.loneHover({trace:ee,x0:Ie-Se*Y.r,x1:Ie+Se*Y.r,y:Ve,_x0:ae?q+he.TL[0]:Ie-Se*Y.r,_x1:ae?q+he.TR[0]:Ie+Se*Y.r,_y0:ae?Z+he.TL[1]:Ve-Se*Y.r,_y1:ae?Z+he.BL[1]:Ve+Se*Y.r,text:ke.join("
"),name:we.hovertemplate||Me.indexOf("name")!==-1?we.name:void 0,idealAlign:he.pxmid[0]<0?"left":"right",color:m.castOption(ce.bgcolor,he.pts)||he.color,borderColor:m.castOption(ce.bordercolor,he.pts),fontFamily:m.castOption(ve.family,he.pts),fontSize:m.castOption(ve.size,he.pts),fontColor:m.castOption(ve.color,he.pts),nameLength:m.castOption(ce.namelength,he.pts),textAlign:m.castOption(ce.align,he.pts),hovertemplate:m.castOption(we.hovertemplate,he.pts),hovertemplateLabels:he,eventData:[h(he,we)]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:K,inOut_bbox:le}),he.bbox=le[0],ee._hasHoverLabel=!0}ee._hasHoverEvent=!0,K.emit("plotly_hover",{points:[h(he,we)],event:p.event})}}),X.on("mouseout",function(he){var xe=K._fullLayout,we=K._fullData[ee.index],Me=p.select(this).datum();ee._hasHoverEvent&&(he.originalEvent=p.event,K.emit("plotly_unhover",{points:[h(Me,we)],event:p.event}),ee._hasHoverEvent=!1),ee._hasHoverLabel&&(E.loneUnhover(xe._hoverlayer.node()),ee._hasHoverLabel=!1)}),X.on("click",function(he){var xe=K._fullLayout,we=K._fullData[ee.index];K._dragging||xe.hovermode===!1||(K._hoverdata=[h(he,we)],E.click(K,p.event))})}function S(X,K,H){var Y=m.castOption(X.outsidetextfont.color,K.pts)||m.castOption(X.textfont.color,K.pts)||H.color,q=m.castOption(X.outsidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||H.family,Z=m.castOption(X.outsidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||H.size,ee=m.castOption(X.outsidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||H.weight,ae=m.castOption(X.outsidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||H.style,he=m.castOption(X.outsidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||H.variant,xe=m.castOption(X.outsidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||H.textcase,we=m.castOption(X.outsidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||H.lineposition,Me=m.castOption(X.outsidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||H.shadow;return{color:Y,family:q,size:Z,weight:ee,style:ae,variant:he,textcase:xe,lineposition:we,shadow:Me}}function M(X,K,H){var Y=m.castOption(X.insidetextfont.color,K.pts);!Y&&X._input.textfont&&(Y=m.castOption(X._input.textfont.color,K.pts));var q=m.castOption(X.insidetextfont.family,K.pts)||m.castOption(X.textfont.family,K.pts)||H.family,Z=m.castOption(X.insidetextfont.size,K.pts)||m.castOption(X.textfont.size,K.pts)||H.size,ee=m.castOption(X.insidetextfont.weight,K.pts)||m.castOption(X.textfont.weight,K.pts)||H.weight,ae=m.castOption(X.insidetextfont.style,K.pts)||m.castOption(X.textfont.style,K.pts)||H.style,he=m.castOption(X.insidetextfont.variant,K.pts)||m.castOption(X.textfont.variant,K.pts)||H.variant,xe=m.castOption(X.insidetextfont.textcase,K.pts)||m.castOption(X.textfont.textcase,K.pts)||H.textcase,we=m.castOption(X.insidetextfont.lineposition,K.pts)||m.castOption(X.textfont.lineposition,K.pts)||H.lineposition,Me=m.castOption(X.insidetextfont.shadow,K.pts)||m.castOption(X.textfont.shadow,K.pts)||H.shadow;return{color:Y||k.contrast(K.color),family:q,size:Z,weight:ee,style:ae,variant:he,textcase:xe,lineposition:we,shadow:Me}}function C(X,K){for(var H,Y,q=0;q=-4;ce-=2)_e(Math.PI*ce,"tan");for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+1),"tan")}if(Me||Ie){for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+1.5),"rad");for(ce=4;ce>=-4;ce-=2)_e(Math.PI*(ce+.5),"rad")}}if(ae||Ve||Me){var ve=Math.sqrt(X.width*X.width+X.height*X.height);if(ke={scale:q*Y*2/ve,rCenter:1-q,rotate:0},ke.textPosAngle=(K.startangle+K.stopangle)/2,ke.scale>=1)return ke;Ge.push(ke)}(Ve||Ie)&&(ke=f(X,Y,ee,he,xe),ke.textPosAngle=(K.startangle+K.stopangle)/2,Ge.push(ke)),(Ve||Se)&&(ke=u(X,Y,ee,he,xe),ke.textPosAngle=(K.startangle+K.stopangle)/2,Ge.push(ke));for(var le=0,Ae=0,Be=0;Be=1)break}return Ge[le]}function T(X,K){var H=X.startangle,Y=X.stopangle;return H>K&&K>Y||H0?1:-1)/2,y:Z/(1+H*H/(Y*Y)),outside:!0}}function D(X){var K=Math.sqrt(X.titleBox.width*X.titleBox.width+X.titleBox.height*X.titleBox.height);return{x:X.cx,y:X.cy,scale:X.trace.hole*X.r*2/K,tx:0,ty:-X.titleBox.height/2+X.trace.title.font.size}}function B(X,K){var H=1,Y=1,q,Z=X.trace,ee={x:X.cx,y:X.cy},ae={tx:0,ty:0};ae.ty+=Z.title.font.size,q=j(Z),Z.title.position.indexOf("top")!==-1?(ee.y-=(1+q)*X.r,ae.ty-=X.titleBox.height):Z.title.position.indexOf("bottom")!==-1&&(ee.y+=(1+q)*X.r);var he=F(X.r,X.trace.aspectratio),xe=K.w*(Z.domain.x[1]-Z.domain.x[0])/2;return Z.title.position.indexOf("left")!==-1?(xe=xe+he,ee.x-=(1+q)*he,ae.tx+=X.titleBox.width/2):Z.title.position.indexOf("center")!==-1?xe*=2:Z.title.position.indexOf("right")!==-1&&(xe=xe+he,ee.x+=(1+q)*he,ae.tx-=X.titleBox.width/2),H=xe/X.titleBox.width,Y=P(X,K)/X.titleBox.height,{x:ee.x,y:ee.y,scale:Math.min(H,Y),tx:ae.tx,ty:ae.ty}}function F(X,K){return X/(K===void 0?1:K)}function P(X,K){var H=X.trace,Y=K.h*(H.domain.y[1]-H.domain.y[0]);return Math.min(X.titleBox.height,Y/2)}function j(X){var K=X.pull;if(!K)return 0;var H;if(e.isArrayOrTypedArray(K))for(K=0,H=0;HK&&(K=X.pull[H]);return K}function U(X,K){var H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve;function Ge(ve,le){return ve.pxmid[1]-le.pxmid[1]}function ke(ve,le){return le.pxmid[1]-ve.pxmid[1]}function _e(ve,le){le||(le={});var Ae=le.labelExtraY+(Y?le.yLabelMax:le.yLabelMin),Be=Y?ve.yLabelMin:ve.yLabelMax,Xe=Y?ve.yLabelMax:ve.yLabelMin,Ye=ve.cyFinal+ee(ve.px0[1],ve.px1[1]),yt=Ae-Be,gt,Tt,At,$t,rr,_r;if(yt*he>0&&(ve.labelExtraY=yt),!!e.isArrayOrTypedArray(K.pull))for(Tt=0;Tt=(m.castOption(K.pull,At.pts)||0))&&((ve.pxmid[1]-At.pxmid[1])*he>0?($t=At.cyFinal+ee(At.px0[1],At.px1[1]),yt=$t-Be-ve.labelExtraY,yt*he>0&&(ve.labelExtraY+=yt)):(Xe+ve.labelExtraY-Ye)*he>0&&(gt=3*ae*Math.abs(Tt-Me.indexOf(ve)),rr=At.cxFinal+Z(At.px0[0],At.px1[0]),_r=rr+gt-(ve.cxFinal+ve.pxmid[0])-ve.labelExtraX,_r*ae>0&&(ve.labelExtraX+=_r)))}for(Y=0;Y<2;Y++)for(q=Y?Ge:ke,ee=Y?Math.max:Math.min,he=Y?1:-1,H=0;H<2;H++){for(Z=H?Math.max:Math.min,ae=H?1:-1,xe=X[Y][H],xe.sort(q),we=X[1-Y][H],Me=we.concat(xe),Ie=[],Se=0;Se1?(xe=H.r,we=xe/q.aspectratio):(we=H.r,xe=we*q.aspectratio),xe*=(1+q.baseratio)/2,he=xe*we}ee=Math.min(ee,he/H.vTotal)}for(Y=0;YK.vTotal/2?1:0,xe.halfangle=Math.PI*Math.min(xe.v/K.vTotal,.5),xe.ring=1-Y.hole,xe.rInscribed=I(xe,K))}function ne(X,K){return[X*Math.sin(K),-X*Math.cos(K)]}function se(X,K,H){var Y=X._fullLayout,q=H.trace,Z=q.texttemplate,ee=q.textinfo;if(!Z&&ee&&ee!=="none"){var ae=ee.split("+"),he=function(le){return ae.indexOf(le)!==-1},xe=he("label"),we=he("text"),Me=he("value"),Se=he("percent"),Ie=Y.separators,Ve;if(Ve=xe?[K.label]:[],we){var Ge=m.getFirstFilled(q.text,K.pts);v(Ge)&&Ve.push(Ge)}Me&&Ve.push(m.formatPieValue(K.v,Ie)),Se&&Ve.push(m.formatPiePercent(K.v/H.vTotal,Ie)),K.text=Ve.join("
")}function ke(le){return{label:le.label,value:le.v,valueLabel:m.formatPieValue(le.v,Y.separators),percent:le.v/H.vTotal,percentLabel:m.formatPiePercent(le.v/H.vTotal,Y.separators),color:le.color,text:le.text,customdata:e.castOption(q,le.i,"customdata")}}if(Z){var _e=e.castOption(q,K.i,"texttemplate");if(!_e)K.text="";else{var ce=ke(K),ve=m.getFirstFilled(q.text,K.pts);(v(ve)||ve==="")&&(ce.text=ve),K.text=e.texttemplateString({data:[ce,q._meta],fallback:q.texttemplatefallback,labels:ce,locale:X._fullLayout._d3locale,template:_e})}}}function G(X,K){var H=X.rotate*Math.PI/180,Y=Math.cos(H),q=Math.sin(H),Z=(K.left+K.right)/2,ee=(K.top+K.bottom)/2;X.textX=Z*Y-ee*q,X.textY=Z*q+ee*Y,X.noCenter=!0}V.exports={plot:g,formatSliceLabel:se,transformInsideText:_,determineInsideTextFont:M,positionTitleOutside:B,prerenderTitles:C,layoutAreas:$,attachFxHandlers:w,computeTransform:G}}}),pO=ze({"src/traces/pie/style.js"(J,V){"use strict";var p=ci(),b=Zm(),E=eh().resizeText;V.exports=function(l){var e=l._fullLayout._pielayer.selectAll(".trace");E(l,e,"pie"),e.each(function(t){var n=t[0],r=n.trace,a=p.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){p.select(this).call(b,o,r,l)})})}}}),vO=ze({"src/traces/pie/base_plot.js"(J){"use strict";var V=cl();J.name="pie",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),mO=ze({"src/traces/pie/index.js"(J,V){"use strict";V.exports={attributes:t0(),supplyDefaults:r0().supplyDefaults,supplyLayoutDefaults:hO(),layoutAttributes:qb(),calc:ug().calc,crossTraceCalc:ug().crossTraceCalc,plot:Vb().plot,style:pO(),styleOne:Zm(),moduleType:"trace",name:"pie",basePlotModule:vO(),categories:["pie-like","pie","showLegend"],meta:{}}}}),gO=ze({"lib/pie.js"(J,V){"use strict";V.exports=mO()}}),yO=ze({"src/traces/sunburst/base_plot.js"(J){"use strict";var V=cl();J.name="sunburst",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),e6=ze({"src/traces/sunburst/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}}}),R1=ze({"src/traces/sunburst/attributes.js"(J,V){"use strict";var p=ws(),{hovertemplateAttrs:b,texttemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=qs(),e=Ml().attributes,t=t0(),n=e6(),r=Ki().extendFlat,a=Uc().pattern;V.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:r({colors:{valType:"data_array",editType:"calc"},line:{color:r({},t.marker.line.color,{dflt:null}),width:r({},t.marker.line.width,{dflt:1}),editType:"calc"},pattern:a,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:t.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:E({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:k({editType:"plot"}),hovertext:t.hovertext,hoverinfo:r({},p.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:b({},{keys:n.eventDataKeys}),hovertemplatefallback:k(),textfont:t.textfont,insidetextorientation:t.insidetextorientation,insidetextfont:t.insidetextfont,outsidetextfont:r({},t.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:t.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:e({name:"sunburst",trace:!0,editType:"calc"})}}}),t6=ze({"src/traces/sunburst/layout_attributes.js"(J,V){"use strict";V.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),_O=ze({"src/traces/sunburst/defaults.js"(J,V){"use strict";var p=Nr(),b=R1(),E=Ml().defaults,k=qh().handleText,l=r0().handleMarkerDefaults,e=fl(),t=e.hasColorscale,n=e.handleDefaults;V.exports=function(a,o,s,c){function m(M,C){return p.coerce(a,o,b,M,C)}var h=m("labels"),v=m("parents");if(!h||!h.length||!v||!v.length){o.visible=!1;return}var g=m("values");g&&g.length?m("branchvalues"):m("count"),m("level"),m("maxdepth"),l(a,o,c,m);var i=o._hasColorscale=t(a,"marker","colors")||(a.marker||{}).coloraxis;i&&n(a,o,c,m,{prefix:"marker.",cLetter:"c"}),m("leaf.opacity",i?1:.7);var w=m("text");m("texttemplate"),m("texttemplatefallback"),o.texttemplate||m("textinfo",p.isArrayOrTypedArray(w)?"text+label":"label"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback");var S="auto";k(a,o,c,m,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),m("insidetextorientation"),m("sort"),m("rotation"),m("root.color"),E(o,c,m),o._length=null}}}),xO=ze({"src/traces/sunburst/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=t6();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("sunburstcolorway",l.colorway),e("extendsunburstcolors")}}}),I1=ze({"node_modules/d3-hierarchy/dist/d3-hierarchy.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(De,Ne){return De.parent===Ne.parent?1:2}function E(De){return De.reduce(k,0)/De.length}function k(De,Ne){return De+Ne.x}function l(De){return 1+De.reduce(e,0)}function e(De,Ne){return Math.max(De,Ne.y)}function t(De){for(var Ne;Ne=De.children;)De=Ne[0];return De}function n(De){for(var Ne;Ne=De.children;)De=Ne[Ne.length-1];return De}function r(){var De=b,Ne=1,We=1,Ke=!1;function Je(et){var Mt,pt=0;et.eachAfter(function(Ht){var Sr=Ht.children;Sr?(Ht.x=E(Sr),Ht.y=l(Sr)):(Ht.x=Mt?pt+=De(Ht,Mt):0,Ht.y=0,Mt=Ht)});var Pt=t(et),Ct=n(et),qt=Pt.x-De(Pt,Ct)/2,Vt=Ct.x+De(Ct,Pt)/2;return et.eachAfter(Ke?function(Ht){Ht.x=(Ht.x-et.x)*Ne,Ht.y=(et.y-Ht.y)*We}:function(Ht){Ht.x=(Ht.x-qt)/(Vt-qt)*Ne,Ht.y=(1-(et.y?Ht.y/et.y:1))*We})}return Je.separation=function(et){return arguments.length?(De=et,Je):De},Je.size=function(et){return arguments.length?(Ke=!1,Ne=+et[0],We=+et[1],Je):Ke?null:[Ne,We]},Je.nodeSize=function(et){return arguments.length?(Ke=!0,Ne=+et[0],We=+et[1],Je):Ke?[Ne,We]:null},Je}function a(De){var Ne=0,We=De.children,Ke=We&&We.length;if(!Ke)Ne=1;else for(;--Ke>=0;)Ne+=We[Ke].value;De.value=Ne}function o(){return this.eachAfter(a)}function s(De){var Ne=this,We,Ke=[Ne],Je,et,Mt;do for(We=Ke.reverse(),Ke=[];Ne=We.pop();)if(De(Ne),Je=Ne.children,Je)for(et=0,Mt=Je.length;et=0;--Je)We.push(Ke[Je]);return this}function m(De){for(var Ne=this,We=[Ne],Ke=[],Je,et,Mt;Ne=We.pop();)if(Ke.push(Ne),Je=Ne.children,Je)for(et=0,Mt=Je.length;et=0;)We+=Ke[Je].value;Ne.value=We})}function v(De){return this.eachBefore(function(Ne){Ne.children&&Ne.children.sort(De)})}function g(De){for(var Ne=this,We=i(Ne,De),Ke=[Ne];Ne!==We;)Ne=Ne.parent,Ke.push(Ne);for(var Je=Ke.length;De!==We;)Ke.splice(Je,0,De),De=De.parent;return Ke}function i(De,Ne){if(De===Ne)return De;var We=De.ancestors(),Ke=Ne.ancestors(),Je=null;for(De=We.pop(),Ne=Ke.pop();De===Ne;)Je=De,De=We.pop(),Ne=Ke.pop();return Je}function w(){for(var De=this,Ne=[De];De=De.parent;)Ne.push(De);return Ne}function S(){var De=[];return this.each(function(Ne){De.push(Ne)}),De}function M(){var De=[];return this.eachBefore(function(Ne){Ne.children||De.push(Ne)}),De}function C(){var De=this,Ne=[];return De.each(function(We){We!==De&&Ne.push({source:We.parent,target:We})}),Ne}function _(De,Ne){var We=new x(De),Ke=+De.value&&(We.value=De.value),Je,et=[We],Mt,pt,Pt,Ct;for(Ne==null&&(Ne=f);Je=et.pop();)if(Ke&&(Je.value=+Je.data.value),(pt=Ne(Je.data))&&(Ct=pt.length))for(Je.children=new Array(Ct),Pt=Ct-1;Pt>=0;--Pt)et.push(Mt=Je.children[Pt]=new x(pt[Pt])),Mt.parent=Je,Mt.depth=Je.depth+1;return We.eachBefore(A)}function T(){return _(this).eachBefore(u)}function f(De){return De.children}function u(De){De.data=De.data.data}function A(De){var Ne=0;do De.height=Ne;while((De=De.parent)&&De.height<++Ne)}function x(De){this.data=De,this.depth=this.height=0,this.parent=null}x.prototype=_.prototype={constructor:x,count:o,each:s,eachAfter:m,eachBefore:c,sum:h,sort:v,path:g,ancestors:w,descendants:S,leaves:M,links:C,copy:T};var z=Array.prototype.slice;function I(De){for(var Ne=De.length,We,Ke;Ne;)Ke=Math.random()*Ne--|0,We=De[Ne],De[Ne]=De[Ke],De[Ke]=We;return De}function O(De){for(var Ne=0,We=(De=I(z.call(De))).length,Ke=[],Je,et;Ne0&&We*We>Ke*Ke+Je*Je}function P(De,Ne){for(var We=0;WePt?(Je=(Ct+Pt-et)/(2*Ct),pt=Math.sqrt(Math.max(0,Pt/Ct-Je*Je)),We.x=De.x-Je*Ke-pt*Mt,We.y=De.y-Je*Mt+pt*Ke):(Je=(Ct+et-Pt)/(2*Ct),pt=Math.sqrt(Math.max(0,et/Ct-Je*Je)),We.x=Ne.x+Je*Ke-pt*Mt,We.y=Ne.y+Je*Mt+pt*Ke)):(We.x=Ne.x+We.r,We.y=Ne.y)}function ne(De,Ne){var We=De.r+Ne.r-1e-6,Ke=Ne.x-De.x,Je=Ne.y-De.y;return We>0&&We*We>Ke*Ke+Je*Je}function se(De){var Ne=De._,We=De.next._,Ke=Ne.r+We.r,Je=(Ne.x*We.r+We.x*Ne.r)/Ke,et=(Ne.y*We.r+We.y*Ne.r)/Ke;return Je*Je+et*et}function G(De){this._=De,this.next=null,this.previous=null}function X(De){if(!(Je=De.length))return 0;var Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt;if(Ne=De[0],Ne.x=0,Ne.y=0,!(Je>1))return Ne.r;if(We=De[1],Ne.x=-We.r,We.x=Ne.r,We.y=0,!(Je>2))return Ne.r+We.r;re(We,Ne,Ke=De[2]),Ne=new G(Ne),We=new G(We),Ke=new G(Ke),Ne.next=Ke.previous=We,We.next=Ne.previous=Ke,Ke.next=We.previous=Ne;e:for(pt=3;pt0)throw new Error("cycle");return pt}return We.id=function(Ke){return arguments.length?(De=Y(Ke),We):De},We.parentId=function(Ke){return arguments.length?(Ne=Y(Ke),We):Ne},We}function le(De,Ne){return De.parent===Ne.parent?1:2}function Ae(De){var Ne=De.children;return Ne?Ne[0]:De.t}function Be(De){var Ne=De.children;return Ne?Ne[Ne.length-1]:De.t}function Xe(De,Ne,We){var Ke=We/(Ne.i-De.i);Ne.c-=Ke,Ne.s+=We,De.c+=Ke,Ne.z+=We,Ne.m+=We}function Ye(De){for(var Ne=0,We=0,Ke=De.children,Je=Ke.length,et;--Je>=0;)et=Ke[Je],et.z+=Ne,et.m+=Ne,Ne+=et.s+(We+=et.c)}function yt(De,Ne,We){return De.a.parent===Ne.parent?De.a:We}function gt(De,Ne){this._=De,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Ne}gt.prototype=Object.create(x.prototype);function Tt(De){for(var Ne=new gt(De,0),We,Ke=[Ne],Je,et,Mt,pt;We=Ke.pop();)if(et=We._.children)for(We.children=new Array(pt=et.length),Mt=pt-1;Mt>=0;--Mt)Ke.push(Je=We.children[Mt]=new gt(et[Mt],Mt)),Je.parent=We;return(Ne.parent=new gt(null,0)).children=[Ne],Ne}function At(){var De=le,Ne=1,We=1,Ke=null;function Je(Ct){var qt=Tt(Ct);if(qt.eachAfter(et),qt.parent.m=-qt.z,qt.eachBefore(Mt),Ke)Ct.eachBefore(Pt);else{var Vt=Ct,Ht=Ct,Sr=Ct;Ct.eachBefore(function(ur){ur.xHt.x&&(Ht=ur),ur.depth>Sr.depth&&(Sr=ur)});var Kr=Vt===Ht?1:De(Vt,Ht)/2,Yt=Kr-Vt.x,Rt=Ne/(Ht.x+Kr+Yt),nr=We/(Sr.depth||1);Ct.eachBefore(function(ur){ur.x=(ur.x+Yt)*Rt,ur.y=ur.depth*nr})}return Ct}function et(Ct){var qt=Ct.children,Vt=Ct.parent.children,Ht=Ct.i?Vt[Ct.i-1]:null;if(qt){Ye(Ct);var Sr=(qt[0].z+qt[qt.length-1].z)/2;Ht?(Ct.z=Ht.z+De(Ct._,Ht._),Ct.m=Ct.z-Sr):Ct.z=Sr}else Ht&&(Ct.z=Ht.z+De(Ct._,Ht._));Ct.parent.A=pt(Ct,Ht,Ct.parent.A||Vt[0])}function Mt(Ct){Ct._.x=Ct.z+Ct.parent.m,Ct.m+=Ct.parent.m}function pt(Ct,qt,Vt){if(qt){for(var Ht=Ct,Sr=Ct,Kr=qt,Yt=Ht.parent.children[0],Rt=Ht.m,nr=Sr.m,ur=Kr.m,cr=Yt.m,Rr;Kr=Be(Kr),Ht=Ae(Ht),Kr&&Ht;)Yt=Ae(Yt),Sr=Be(Sr),Sr.a=Ct,Rr=Kr.z+ur-Ht.z-Rt+De(Kr._,Ht._),Rr>0&&(Xe(yt(Kr,Ct,Vt),Ct,Rr),Rt+=Rr,nr+=Rr),ur+=Kr.m,Rt+=Ht.m,cr+=Yt.m,nr+=Sr.m;Kr&&!Be(Sr)&&(Sr.t=Kr,Sr.m+=ur-nr),Ht&&!Ae(Yt)&&(Yt.t=Ht,Yt.m+=Rt-cr,Vt=Ct)}return Vt}function Pt(Ct){Ct.x*=Ne,Ct.y=Ct.depth*We}return Je.separation=function(Ct){return arguments.length?(De=Ct,Je):De},Je.size=function(Ct){return arguments.length?(Ke=!1,Ne=+Ct[0],We=+Ct[1],Je):Ke?null:[Ne,We]},Je.nodeSize=function(Ct){return arguments.length?(Ke=!0,Ne=+Ct[0],We=+Ct[1],Je):Ke?[Ne,We]:null},Je}function $t(De,Ne,We,Ke,Je){for(var et=De.children,Mt,pt=-1,Pt=et.length,Ct=De.value&&(Je-We)/De.value;++ptur&&(ur=Ct),Zr=Rt*Rt*Qr,cr=Math.max(ur/Zr,Zr/nr),cr>Rr){Rt-=Ct;break}Rr=cr}Mt.push(Pt={value:Rt,dice:Sr1?Ke:1)},We}(rr);function or(){var De=Xt,Ne=!1,We=1,Ke=1,Je=[0],et=q,Mt=q,pt=q,Pt=q,Ct=q;function qt(Ht){return Ht.x0=Ht.y0=0,Ht.x1=We,Ht.y1=Ke,Ht.eachBefore(Vt),Je=[0],Ne&&Ht.eachBefore(Me),Ht}function Vt(Ht){var Sr=Je[Ht.depth],Kr=Ht.x0+Sr,Yt=Ht.y0+Sr,Rt=Ht.x1-Sr,nr=Ht.y1-Sr;Rt=Ht-1){var ur=et[Vt];ur.x0=Kr,ur.y0=Yt,ur.x1=Rt,ur.y1=nr;return}for(var cr=Ct[Vt],Rr=Sr/2+cr,Qr=Vt+1,Zr=Ht-1;Qr>>1;Ct[ha]nr-Yt){var un=(Kr*La+Rt*Pa)/Sr;qt(Vt,Qr,Pa,Kr,Yt,un,nr),qt(Qr,Ht,La,un,Yt,Rt,nr)}else{var Xa=(Yt*La+nr*Pa)/Sr;qt(Vt,Qr,Pa,Kr,Yt,Rt,Xa),qt(Qr,Ht,La,Kr,Xa,Rt,nr)}}}function vt(De,Ne,We,Ke,Je){(De.depth&1?$t:Se)(De,Ne,We,Ke,Je)}var ht=function De(Ne){function We(Ke,Je,et,Mt,pt){if((Pt=Ke._squarify)&&Pt.ratio===Ne)for(var Pt,Ct,qt,Vt,Ht=-1,Sr,Kr=Pt.length,Yt=Ke.value;++Ht1?Ke:1)},We}(rr);p.cluster=r,p.hierarchy=_,p.pack=ae,p.packEnclose=O,p.packSiblings=K,p.partition=Ie,p.stratify=ve,p.tree=At,p.treemap=or,p.treemapBinary=Ot,p.treemapDice=Se,p.treemapResquarify=ht,p.treemapSlice=$t,p.treemapSliceDice=vt,p.treemapSquarify=Xt,Object.defineProperty(p,"__esModule",{value:!0})})}}),D1=ze({"src/traces/sunburst/calc.js"(J){"use strict";var V=I1(),p=ao(),b=Nr(),E=fl().makeColorScaleFuncFromTrace,k=ug().makePullColorFn,l=ug().generateExtendedColors,e=fl().calc,t=No().ALMOST_EQUAL,n={},r={},a={};J.calc=function(s,c){var m=s._fullLayout,h=c.ids,v=b.isArrayOrTypedArray(h),g=c.labels,i=c.parents,w=c.values,S=b.isArrayOrTypedArray(w),M=[],C={},_={},T=function(K,H){C[K]?C[K].push(H):C[K]=[H],_[H]=1},f=function(K){return K||typeof K=="number"},u=function(K){return!S||p(w[K])&&w[K]>=0},A,x,z;v?(A=Math.min(h.length,i.length),x=function(K){return f(h[K])&&u(K)},z=function(K){return String(h[K])}):(A=Math.min(g.length,i.length),x=function(K){return f(g[K])&&u(K)},z=function(K){return String(g[K])}),S&&(A=Math.min(A,w.length));for(var I=0;I1){for(var j=b.randstr(),U=0;U>8&15|V>>4&240,V>>4&15|V&240,(V&15)<<4|V&15,1):p===8?F1(V>>24&255,V>>16&255,V>>8&255,(V&255)/255):p===4?F1(V>>12&15|V>>8&240,V>>8&15|V>>4&240,V>>4&15|V&240,((V&15)<<4|V&15)/255):null):(V=f6.exec(J))?new ff(V[1],V[2],V[3],1):(V=h6.exec(J))?new ff(V[1]*255/100,V[2]*255/100,V[3]*255/100,1):(V=d6.exec(J))?F1(V[1],V[2],V[3],V[4]):(V=p6.exec(J))?F1(V[1]*255/100,V[2]*255/100,V[3]*255/100,V[4]):(V=v6.exec(J))?s6(V[1],V[2]/100,V[3]/100,1):(V=m6.exec(J))?s6(V[1],V[2]/100,V[3]/100,V[4]):Xb.hasOwnProperty(J)?n6(Xb[J]):J==="transparent"?new ff(NaN,NaN,NaN,0):null}function n6(J){return new ff(J>>16&255,J>>8&255,J&255,1)}function F1(J,V,p,b){return b<=0&&(J=V=p=NaN),new ff(J,V,p,b)}function Hb(J){return J instanceof sp||(J=fg(J)),J?(J=J.rgb(),new ff(J.r,J.g,J.b,J.opacity)):new ff}function z1(J,V,p,b){return arguments.length===1?Hb(J):new ff(J,V,p,b??1)}function ff(J,V,p,b){this.r=+J,this.g=+V,this.b=+p,this.opacity=+b}function i6(){return`#${pv(this.r)}${pv(this.g)}${pv(this.b)}`}function TO(){return`#${pv(this.r)}${pv(this.g)}${pv(this.b)}${pv((isNaN(this.opacity)?1:this.opacity)*255)}`}function o6(){let J=B1(this.opacity);return`${J===1?"rgb(":"rgba("}${dv(this.r)}, ${dv(this.g)}, ${dv(this.b)}${J===1?")":`, ${J})`}`}function B1(J){return isNaN(J)?1:Math.max(0,Math.min(1,J))}function dv(J){return Math.max(0,Math.min(255,Math.round(J)||0))}function pv(J){return J=dv(J),(J<16?"0":"")+J.toString(16)}function s6(J,V,p,b){return b<=0?J=V=p=NaN:p<=0||p>=1?J=V=NaN:V<=0&&(J=NaN),new ud(J,V,p,b)}function l6(J){if(J instanceof ud)return new ud(J.h,J.s,J.l,J.opacity);if(J instanceof sp||(J=fg(J)),!J)return new ud;if(J instanceof ud)return J;J=J.rgb();var V=J.r/255,p=J.g/255,b=J.b/255,E=Math.min(V,p,b),k=Math.max(V,p,b),l=NaN,e=k-E,t=(k+E)/2;return e?(V===k?l=(p-b)/e+(p0&&t<1?0:l,new ud(l,e,t,J.opacity)}function Wb(J,V,p,b){return arguments.length===1?l6(J):new ud(J,V,p,b??1)}function ud(J,V,p,b){this.h=+J,this.s=+V,this.l=+p,this.opacity=+b}function u6(J){return J=(J||0)%360,J<0?J+360:J}function O1(J){return Math.max(0,Math.min(1,J||0))}function Yb(J,V,p){return(J<60?V+(p-V)*J/60:J<180?p:J<240?V+(p-V)*(240-J)/60:V)*255}var lp,vv,mv,n0,cd,c6,f6,h6,d6,p6,v6,m6,Xb,Zb=zi({"node_modules/d3-color/src/color.js"(){Gb(),lp=.7,vv=1/lp,mv="\\s*([+-]?\\d+)\\s*",n0="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cd="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",c6=/^#([0-9a-f]{3,8})$/,f6=new RegExp(`^rgb\\(${mv},${mv},${mv}\\)$`),h6=new RegExp(`^rgb\\(${cd},${cd},${cd}\\)$`),d6=new RegExp(`^rgba\\(${mv},${mv},${mv},${n0}\\)$`),p6=new RegExp(`^rgba\\(${cd},${cd},${cd},${n0}\\)$`),v6=new RegExp(`^hsl\\(${n0},${cd},${cd}\\)$`),m6=new RegExp(`^hsla\\(${n0},${cd},${cd},${n0}\\)$`),Xb={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},a0(sp,fg,{copy(J){return Object.assign(new this.constructor,this,J)},displayable(){return this.rgb().displayable()},hex:r6,formatHex:r6,formatHex8:bO,formatHsl:wO,formatRgb:a6,toString:a6}),a0(ff,z1,cg(sp,{brighter(J){return J=J==null?vv:Math.pow(vv,J),new ff(this.r*J,this.g*J,this.b*J,this.opacity)},darker(J){return J=J==null?lp:Math.pow(lp,J),new ff(this.r*J,this.g*J,this.b*J,this.opacity)},rgb(){return this},clamp(){return new ff(dv(this.r),dv(this.g),dv(this.b),B1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:i6,formatHex:i6,formatHex8:TO,formatRgb:o6,toString:o6})),a0(ud,Wb,cg(sp,{brighter(J){return J=J==null?vv:Math.pow(vv,J),new ud(this.h,this.s,this.l*J,this.opacity)},darker(J){return J=J==null?lp:Math.pow(lp,J),new ud(this.h,this.s,this.l*J,this.opacity)},rgb(){var J=this.h%360+(this.h<0)*360,V=isNaN(J)||isNaN(this.s)?0:this.s,p=this.l,b=p+(p<.5?p:1-p)*V,E=2*p-b;return new ff(Yb(J>=240?J-240:J+120,E,b),Yb(J,E,b),Yb(J<120?J+240:J-120,E,b),this.opacity)},clamp(){return new ud(u6(this.h),O1(this.s),O1(this.l),B1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let J=B1(this.opacity);return`${J===1?"hsl(":"hsla("}${u6(this.h)}, ${O1(this.s)*100}%, ${O1(this.l)*100}%${J===1?")":`, ${J})`}`}}))}}),$b,Kb,g6=zi({"node_modules/d3-color/src/math.js"(){$b=Math.PI/180,Kb=180/Math.PI}});function y6(J){if(J instanceof wd)return new wd(J.l,J.a,J.b,J.opacity);if(J instanceof Ud)return _6(J);J instanceof ff||(J=Hb(J));var V=r2(J.r),p=r2(J.g),b=r2(J.b),E=Qb((.2225045*V+.7168786*p+.0606169*b)/i2),k,l;return V===p&&p===b?k=l=E:(k=Qb((.4360747*V+.3850649*p+.1430804*b)/n2),l=Qb((.0139322*V+.0971045*p+.7141733*b)/o2)),new wd(116*E-16,500*(k-E),200*(E-l),J.opacity)}function Jb(J,V,p,b){return arguments.length===1?y6(J):new wd(J,V,p,b??1)}function wd(J,V,p,b){this.l=+J,this.a=+V,this.b=+p,this.opacity=+b}function Qb(J){return J>x6?Math.pow(J,.3333333333333333):J/l2+s2}function e2(J){return J>gv?J*J*J:l2*(J-s2)}function t2(J){return 255*(J<=.0031308?12.92*J:1.055*Math.pow(J,.4166666666666667)-.055)}function r2(J){return(J/=255)<=.04045?J/12.92:Math.pow((J+.055)/1.055,2.4)}function AO(J){if(J instanceof Ud)return new Ud(J.h,J.c,J.l,J.opacity);if(J instanceof wd||(J=y6(J)),J.a===0&&J.b===0)return new Ud(NaN,0=1?(p=1,V-1):Math.floor(p*V),E=J[b],k=J[b+1],l=b>0?J[b-1]:2*E-k,e=b()=>J}});function S6(J,V){return function(p){return J+p*V}}function kO(J,V,p){return J=Math.pow(J,p),V=Math.pow(V,p)-J,p=1/p,function(b){return Math.pow(J+b*V,p)}}function U1(J,V){var p=V-J;return p?S6(J,p>180||p<-180?p-360*Math.round(p/360):p):pg(isNaN(J)?V:J)}function CO(J){return(J=+J)==1?hf:function(V,p){return p-V?kO(V,p,J):pg(isNaN(V)?p:V)}}function hf(J,V){var p=V-J;return p?S6(J,p):pg(isNaN(J)?V:J)}var s0=zi({"node_modules/d3-interpolate/src/color.js"(){M6()}});function E6(J){return function(V){var p=V.length,b=new Array(p),E=new Array(p),k=new Array(p),l,e;for(l=0;lp&&(k=V.slice(p,k),e[l]?e[l]+=k:e[++l]=k),(b=b[0])===(E=E[0])?e[l]?e[l]+=E:e[++l]=E:(e[++l]=null,t.push({i:l,x:Td(b,E)})),p=H1.lastIndex;return p180?r+=360:r-n>180&&(n+=360),o.push({i:a.push(E(a)+"rotate(",null,b)-2,x:Td(n,r)})):r&&a.push(E(a)+"rotate("+r+b)}function e(n,r,a,o){n!==r?o.push({i:a.push(E(a)+"skewX(",null,b)-2,x:Td(n,r)}):r&&a.push(E(a)+"skewX("+r+b)}function t(n,r,a,o,s,c){if(n!==a||r!==o){var m=s.push(E(s)+"scale(",null,",",null,")");c.push({i:m-4,x:Td(n,a)},{i:m-2,x:Td(r,o)})}else(a!==1||o!==1)&&s.push(E(s)+"scale("+a+","+o+")")}return function(n,r){var a=[],o=[];return n=J(n),r=J(r),k(n.translateX,n.translateY,r.translateX,r.translateY,a,o),l(n.rotate,r.rotate,a,o),e(n.skewX,r.skewX,a,o),t(n.scaleX,n.scaleY,r.scaleX,r.scaleY,a,o),n=r=null,function(s){for(var c=-1,m=o.length,h;++cW1,interpolateArray:()=>LO,interpolateBasis:()=>w6,interpolateBasisClosed:()=>T6,interpolateCubehelix:()=>eA,interpolateCubehelixLong:()=>tA,interpolateDate:()=>D6,interpolateDiscrete:()=>IO,interpolateHcl:()=>K6,interpolateHclLong:()=>J6,interpolateHsl:()=>X6,interpolateHslLong:()=>Z6,interpolateHue:()=>FO,interpolateLab:()=>XO,interpolateNumber:()=>Td,interpolateNumberArray:()=>v2,interpolateObject:()=>z6,interpolateRgb:()=>q1,interpolateRgbBasis:()=>k6,interpolateRgbBasisClosed:()=>C6,interpolateRound:()=>BO,interpolateString:()=>O6,interpolateTransformCss:()=>q6,interpolateTransformSvg:()=>V6,interpolateZoom:()=>W6,piecewise:()=>JO,quantize:()=>eN});var l0=zi({"node_modules/d3-interpolate/src/index.js"(){Y1(),I6(),p2(),A6(),F6(),DO(),zO(),V1(),m2(),B6(),OO(),N6(),VO(),WO(),L6(),YO(),ZO(),$O(),KO(),QO(),tN()}}),y2=ze({"src/traces/sunburst/fill_one.js"(J,V){"use strict";var p=$i(),b=Qn();V.exports=function(k,l,e,t,n){var r=l.data.data,a=r.i,o=n||r.color;if(a>=0){l.i=r.i;var s=e.marker;s.pattern?(!s.colors||!s.pattern.shape)&&(s.color=o,l.color=o):(s.color=o,l.color=o),p.pointStyle(k,e,t,l)}else b.fill(k,o)}}}),rA=ze({"src/traces/sunburst/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=Nr(),k=eh().resizeText,l=y2();function e(n){var r=n._fullLayout._sunburstlayer.selectAll(".trace");k(n,r,"sunburst"),r.each(function(a){var o=p.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){p.select(this).call(t,m,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(a,m,"marker.line.color")||b.defaultLine,v=E.castOption(a,m,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",v).call(b.stroke,h).style("opacity",c?a.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),up=ze({"src/traces/sunburst/helpers.js"(J){"use strict";var V=Nr(),p=Qn(),b=gd(),E=lv();J.findEntryWithLevel=function(t,n){var r;return n&&t.eachAfter(function(a){if(J.getPtId(a)===n)return r=a.copy()}),r||t},J.findEntryWithChild=function(t,n){var r;return t.eachAfter(function(a){for(var o=a.children||[],s=0;s0)},J.getMaxDepth=function(t){return t.maxdepth>=0?t.maxdepth:1/0},J.isHeader=function(t,n){return!(J.isLeaf(t)||t.depth===n._maxDepth-1)};function e(t){return t.data.data.pid}J.getParent=function(t,n){return J.findEntryWithLevel(t,e(n))},J.listPath=function(t,n){var r=t.parent;if(!r)return[];var a=n?[r.data[n]]:[r];return J.listPath(r,n).concat(a)},J.getPath=function(t){return J.listPath(t,"label").join("/")+"/"},J.formatValue=E.formatPieValue,J.formatPercent=function(t,n){var r=V.formatPercent(t,0);return r==="0%"&&(r=E.formatPiePercent(t,n)),r}}}),$1=ze({"src/traces/sunburst/fx.js"(J,V){"use strict";var p=ci(),b=mi(),E=kh().appendArrayPointValue,k=Zl(),l=Nr(),e=Hm(),t=up(),n=lv(),r=n.formatPieValue;V.exports=function(s,c,m,h,v){var g=h[0],i=g.trace,w=g.hierarchy,S=i.type==="sunburst",M=i.type==="treemap"||i.type==="icicle";"_hasHoverLabel"in i||(i._hasHoverLabel=!1),"_hasHoverEvent"in i||(i._hasHoverEvent=!1);var C=function(f){var u=m._fullLayout;if(!(m._dragging||u.hovermode===!1)){var A=m._fullData[i.index],x=f.data.data,z=x.i,I=t.isHierarchyRoot(f),O=t.getParent(w,f),D=t.getValue(f),B=function(ee){return l.castOption(A,z,ee)},F=B("hovertemplate"),P=k.castHoverinfo(A,u,z),j=u.separators,U;if(F||P&&P!=="none"&&P!=="skip"){var $,Q;S&&($=g.cx+f.pxmid[0]*(1-f.rInscribed),Q=g.cy+f.pxmid[1]*(1-f.rInscribed)),M&&($=f._hoverX,Q=f._hoverY);var re={},ne=[],se=[],G=function(ee){return ne.indexOf(ee)!==-1};P&&(ne=P==="all"?A._module.attributes.hoverinfo.flags:P.split("+")),re.label=x.label,G("label")&&re.label&&se.push(re.label),x.hasOwnProperty("v")&&(re.value=x.v,re.valueLabel=r(re.value,j),G("value")&&se.push(re.valueLabel)),re.currentPath=f.currentPath=t.getPath(f.data),G("current path")&&!I&&se.push(re.currentPath);var X,K=[],H=function(){K.indexOf(X)===-1&&(se.push(X),K.push(X))};re.percentParent=f.percentParent=D/t.getValue(O),re.parent=f.parentString=t.getPtLabel(O),G("percent parent")&&(X=t.formatPercent(re.percentParent,j)+" of "+re.parent,H()),re.percentEntry=f.percentEntry=D/t.getValue(c),re.entry=f.entry=t.getPtLabel(c),G("percent entry")&&!I&&!f.onPathbar&&(X=t.formatPercent(re.percentEntry,j)+" of "+re.entry,H()),re.percentRoot=f.percentRoot=D/t.getValue(w),re.root=f.root=t.getPtLabel(w),G("percent root")&&!I&&(X=t.formatPercent(re.percentRoot,j)+" of "+re.root,H()),re.text=B("hovertext")||B("text"),G("text")&&(X=re.text,l.isValidTextValue(X)&&se.push(X)),U=[a(f,A,v.eventDataKeys)];var Y={trace:A,y:Q,_x0:f._x0,_x1:f._x1,_y0:f._y0,_y1:f._y1,text:se.join("
"),name:F||G("name")?A.name:void 0,color:B("hoverlabel.bgcolor")||x.color,borderColor:B("hoverlabel.bordercolor"),fontFamily:B("hoverlabel.font.family"),fontSize:B("hoverlabel.font.size"),fontColor:B("hoverlabel.font.color"),fontWeight:B("hoverlabel.font.weight"),fontStyle:B("hoverlabel.font.style"),fontVariant:B("hoverlabel.font.variant"),nameLength:B("hoverlabel.namelength"),textAlign:B("hoverlabel.align"),hovertemplate:F,hovertemplateLabels:re,eventData:U};S&&(Y.x0=$-f.rInscribed*f.rpx1,Y.x1=$+f.rInscribed*f.rpx1,Y.idealAlign=f.pxmid[0]<0?"left":"right"),M&&(Y.x=$,Y.idealAlign=$<0?"left":"right");var q=[];k.loneHover(Y,{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:m,inOut_bbox:q}),U[0].bbox=q[0],i._hasHoverLabel=!0}if(M){var Z=s.select("path.surface");v.styleOne(Z,f,A,m,{hovered:!0})}i._hasHoverEvent=!0,m.emit("plotly_hover",{points:U||[a(f,A,v.eventDataKeys)],event:p.event})}},_=function(f){var u=m._fullLayout,A=m._fullData[i.index],x=p.select(this).datum();if(i._hasHoverEvent&&(f.originalEvent=p.event,m.emit("plotly_unhover",{points:[a(x,A,v.eventDataKeys)],event:p.event}),i._hasHoverEvent=!1),i._hasHoverLabel&&(k.loneUnhover(u._hoverlayer.node()),i._hasHoverLabel=!1),M){var z=s.select("path.surface");v.styleOne(z,x,A,m,{hovered:!1})}},T=function(f){var u=m._fullLayout,A=m._fullData[i.index],x=S&&(t.isHierarchyRoot(f)||t.isLeaf(f)),z=t.getPtId(f),I=t.isEntry(f)?t.findEntryWithChild(w,z):t.findEntryWithLevel(w,z),O=t.getPtId(I),D={points:[a(f,A,v.eventDataKeys)],event:p.event};x||(D.nextLevel=O);var B=e.triggerHandler(m,"plotly_"+i.type+"click",D);if(B!==!1&&u.hovermode&&(m._hoverdata=[a(f,A,v.eventDataKeys)],k.click(m,p.event)),!x&&B!==!1&&!m._dragging&&!m._transitioning){b.call("_storeDirectGUIEdit",A,u._tracePreGUI[A.uid],{level:A.level});var F={data:[{level:O}],traces:[i.index]},P={frame:{redraw:!1,duration:v.transitionTime},transition:{duration:v.transitionTime,easing:v.transitionEasing},mode:"immediate",fromcurrent:!0};k.loneUnhover(u._hoverlayer.node()),b.call("animate",m,F,P)}};s.on("mouseover",C),s.on("mouseout",_),s.on("click",T)};function a(o,s,c){for(var m=o.data.data,h={curveNumber:s.index,pointNumber:m.i,data:s._input,fullData:s},v=0;vXe.x1?2*Math.PI:0)+ee;Ye=le.rpx1Ie?2*Math.PI:0)+ee;Be={x0:Ye,x1:Ye}}else Be={rpx0:ne,rpx1:ne},k.extendFlat(Be,ve(le));else Be={rpx0:0,rpx1:0};else Be={x0:ee,x1:ee};return b(Be,Xe)}function ce(le){var Ae=K[g.getPtId(le)],Be,Xe=le.transform;if(Ae)Be=Ae;else if(Be={rpx1:le.rpx1,transform:{textPosAngle:Xe.textPosAngle,scale:0,rotate:Xe.rotate,rCenter:Xe.rCenter,x:Xe.x,y:Xe.y}},X)if(le.parent)if(Ie){var Ye=le.x1>Ie?2*Math.PI:0;Be.x0=Be.x1=Ye}else k.extendFlat(Be,ve(le));else Be.x0=Be.x1=ee;else Be.x0=Be.x1=ee;var yt=b(Be.transform.textPosAngle,le.transform.textPosAngle),gt=b(Be.rpx1,le.rpx1),Tt=b(Be.x0,le.x0),At=b(Be.x1,le.x1),$t=b(Be.transform.scale,Xe.scale),rr=b(Be.transform.rotate,Xe.rotate),_r=Xe.rCenter===0?3:Be.transform.rCenter===0?1/3:1,Xt=b(Be.transform.rCenter,Xe.rCenter),or=function(Ot){return Xt(Math.pow(Ot,_r))};return function(Ot){var vt=gt(Ot),ht=Tt(Ot),De=At(Ot),Ne=or(Ot),We=xe(vt,(ht+De)/2),Ke=yt(Ot),Je={pxmid:We,rpx1:vt,transform:{textPosAngle:Ke,rCenter:Ne,x:Xe.x,y:Xe.y}};return t(B.type,Xe,x),{transform:{targetX:Me(Je),targetY:Se(Je),scale:$t(Ot),rotate:rr(Ot),rCenter:Ne}}}}function ve(le){var Ae=le.parent,Be=K[g.getPtId(Ae)],Xe={};if(Be){var Ye=Ae.children,yt=Ye.indexOf(le),gt=Ye.length,Tt=b(Be.x0,Be.x1);Xe.x0=Tt(yt/gt),Xe.x1=Tt(yt/gt)}else Xe.x0=Xe.x1=0;return Xe}}function w(_){return p.partition().size([2*Math.PI,_.height+1])(_)}J.formatSliceLabel=function(_,T,f,u,A){var x=f.texttemplate,z=f.textinfo;if(!x&&(!z||z==="none"))return"";var I=A.separators,O=u[0],D=_.data.data,B=O.hierarchy,F=g.isHierarchyRoot(_),P=g.getParent(B,_),j=g.getValue(_);if(!x){var U=z.split("+"),$=function(q){return U.indexOf(q)!==-1},Q=[],re;if($("label")&&D.label&&Q.push(D.label),D.hasOwnProperty("v")&&$("value")&&Q.push(g.formatValue(D.v,I)),!F){$("current path")&&Q.push(g.getPath(_.data));var ne=0;$("percent parent")&&ne++,$("percent entry")&&ne++,$("percent root")&&ne++;var se=ne>1;if(ne){var G,X=function(q){re=g.formatPercent(G,I),se&&(re+=" of "+q),Q.push(re)};$("percent parent")&&!F&&(G=j/g.getValue(P),X("parent")),$("percent entry")&&(G=j/g.getValue(T),X("entry")),$("percent root")&&(G=j/g.getValue(B),X("root"))}}return $("text")&&(re=k.castOption(f,D.i,"text"),k.isValidTextValue(re)&&Q.push(re)),Q.join("
")}var K=k.castOption(f,D.i,"texttemplate");if(!K)return"";var H={};D.label&&(H.label=D.label),D.hasOwnProperty("v")&&(H.value=D.v,H.valueLabel=g.formatValue(D.v,I)),H.currentPath=g.getPath(_.data),F||(H.percentParent=j/g.getValue(P),H.percentParentLabel=g.formatPercent(H.percentParent,I),H.parent=g.getPtLabel(P)),H.percentEntry=j/g.getValue(T),H.percentEntryLabel=g.formatPercent(H.percentEntry,I),H.entry=g.getPtLabel(T),H.percentRoot=j/g.getValue(B),H.percentRootLabel=g.formatPercent(H.percentRoot,I),H.root=g.getPtLabel(B),D.hasOwnProperty("color")&&(H.color=D.color);var Y=k.castOption(f,D.i,"text");return(k.isValidTextValue(Y)||Y==="")&&(H.text=Y),H.customdata=k.castOption(f,D.i,"customdata"),k.texttemplateString({data:[H,f._meta],fallback:f.texttemplatefallback,labels:H,locale:A._d3locale,template:K})};function S(_){return _.rpx0===0&&k.isFullCircle([_.x0,_.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(_.halfangle)),_.ring/2))}function M(_){return C(_.rpx1,_.transform.textPosAngle)}function C(_,T){return[_*Math.sin(T),-_*Math.cos(T)]}}}),rN=ze({"src/traces/sunburst/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"sunburst",basePlotModule:yO(),categories:[],animatable:!0,attributes:R1(),layoutAttributes:t6(),supplyDefaults:_O(),supplyLayoutDefaults:xO(),calc:D1().calc,crossTraceCalc:D1().crossTraceCalc,plot:_2().plot,style:rA().style,colorbar:Of(),meta:{}}}}),aN=ze({"lib/sunburst.js"(J,V){"use strict";V.exports=rN()}}),nN=ze({"src/traces/treemap/base_plot.js"(J){"use strict";var V=cl();J.name="treemap",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),u0=ze({"src/traces/treemap/constants.js"(J,V){"use strict";V.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}}}),x2=ze({"src/traces/treemap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=qs(),l=Ml().attributes,e=t0(),t=R1(),n=u0(),r=Ki().extendFlat,a=Uc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:r({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:t.marker.colors,pattern:a,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:t.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},e.textfont,{}),editType:"calc"},text:e.text,textinfo:t.textinfo,texttemplate:b({editType:"plot"},{keys:n.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:p({},{keys:n.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:r({},e.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:e.sort,root:t.root,domain:l({name:"treemap",trace:!0,editType:"calc"})}}}),aA=ze({"src/traces/treemap/layout_attributes.js"(J,V){"use strict";V.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),iN=ze({"src/traces/treemap/defaults.js"(J,V){"use strict";var p=Nr(),b=x2(),E=Qn(),k=Ml().defaults,l=qh().handleText,e=hv().TEXTPAD,t=r0().handleMarkerDefaults,n=fl(),r=n.hasColorscale,a=n.handleDefaults;V.exports=function(s,c,m,h){function v(A,x){return p.coerce(s,c,b,A,x)}var g=v("labels"),i=v("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=v("values");w&&w.length?v("branchvalues"):v("count"),v("level"),v("maxdepth");var S=v("tiling.packing");S==="squarify"&&v("tiling.squarifyratio"),v("tiling.flip"),v("tiling.pad");var M=v("text");v("texttemplate"),v("texttemplatefallback"),c.texttemplate||v("textinfo",p.isArrayOrTypedArray(M)?"text+label":"label"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var C=v("pathbar.visible"),_="auto";l(s,c,h,v,_,{hasPathbar:C,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition");var T=c.textposition.indexOf("bottom")!==-1;t(s,c,h,v);var f=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;f?a(s,c,h,v,{prefix:"marker.",cLetter:"c"}):v("marker.depthfade",!(c.marker.colors||[]).length);var u=c.textfont.size*2;v("marker.pad.t",T?u/4:u),v("marker.pad.l",u/4),v("marker.pad.r",u/4),v("marker.pad.b",T?u:u/4),v("marker.cornerradius"),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},C&&(v("pathbar.thickness",c.pathbar.textfont.size+2*e),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),k(c,h,v),c._length=null}}}),oN=ze({"src/traces/treemap/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=aA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("treemapcolorway",l.colorway),e("extendtreemapcolors")}}}),nA=ze({"src/traces/treemap/calc.js"(J){"use strict";var V=D1();J.calc=function(p,b){return V.calc(p,b)},J.crossTraceCalc=function(p){return V._runCrossTraceCalc("treemap",p)}}}),iA=ze({"src/traces/treemap/flip_tree.js"(J,V){"use strict";V.exports=function p(b,E,k){var l;k.swapXY&&(l=b.x0,b.x0=b.y0,b.y0=l,l=b.x1,b.x1=b.y1,b.y1=l),k.flipX&&(l=b.x0,b.x0=E[0]-b.x1,b.x1=E[0]-l),k.flipY&&(l=b.y0,b.y0=E[1]-b.y1,b.y1=E[1]-l);var e=b.children;if(e)for(var t=0;t0)for(var u=0;u").join(" ")||"";var se=b.ensureSingle(re,"g","slicetext"),G=b.ensureSingle(se,"text","",function(K){K.attr("data-notex",1)}),X=b.ensureUniformFontSize(s,n.determineTextFont(B,Q,O.font,{onPathbar:!0}));G.text(Q._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(E.font,X).call(k.convertToTspans,s),Q.textBB=E.bBox(G.node()),Q.transform=_(Q,{fontSize:X.size,onPathbar:!0}),Q.transform.fontSize=X.size,f?G.transition().attrTween("transform",function(K){var H=x(K,a,z,[i,w]);return function(Y){return T(H(Y))}}):G.attr("transform",T(Q))})}}}),lN=ze({"src/traces/treemap/plot_one.js"(J,V){"use strict";var p=ci(),b=(l0(),Po(_v)).interpolate,E=up(),k=Nr(),l=hv().TEXTPAD,e=Xv(),t=e.toMoveInsideBar,n=eh(),r=n.recordMinTextSize,a=u0(),o=sN();function s(c){return E.isHierarchyRoot(c)?"":E.getPtId(c)}V.exports=function(m,h,v,g,i){var w=m._fullLayout,S=h[0],M=S.trace,C=M.type,_=C==="icicle",T=S.hierarchy,f=E.findEntryWithLevel(T,M.level),u=p.select(v),A=u.selectAll("g.pathbar"),x=u.selectAll("g.slice");if(!f){A.remove(),x.remove();return}var z=E.isHierarchyRoot(f),I=!w.uniformtext.mode&&E.hasTransition(g),O=E.getMaxDepth(M),D=function(Xt){return Xt.data.depth-f.data.depth-1?j+Q:-($+Q):0,ne={x0:U,x1:U,y0:re,y1:re+$},se=function(Xt,or,Ot){var vt=M.tiling.pad,ht=function(Ke){return Ke-vt<=or.x0},De=function(Ke){return Ke+vt>=or.x1},Ne=function(Ke){return Ke-vt<=or.y0},We=function(Ke){return Ke+vt>=or.y1};return Xt.x0===or.x0&&Xt.x1===or.x1&&Xt.y0===or.y0&&Xt.y1===or.y1?{x0:Xt.x0,x1:Xt.x1,y0:Xt.y0,y1:Xt.y1}:{x0:ht(Xt.x0-vt)?0:De(Xt.x0-vt)?Ot[0]:Xt.x0,x1:ht(Xt.x1+vt)?0:De(Xt.x1+vt)?Ot[0]:Xt.x1,y0:Ne(Xt.y0-vt)?0:We(Xt.y0-vt)?Ot[1]:Xt.y0,y1:Ne(Xt.y1+vt)?0:We(Xt.y1+vt)?Ot[1]:Xt.y1}},G=null,X={},K={},H=null,Y=function(Xt,or){return or?X[s(Xt)]:K[s(Xt)]},q=function(Xt,or,Ot,vt){if(or)return X[s(T)]||ne;var ht=K[M.level]||Ot;return D(Xt)?se(Xt,ht,vt):{}};S.hasMultipleRoots&&z&&O++,M._maxDepth=O,M._backgroundColor=w.paper_bgcolor,M._entryDepth=f.data.depth,M._atRootLevel=z;var Z=-P/2+B.l+B.w*(F.x[1]+F.x[0])/2,ee=-j/2+B.t+B.h*(1-(F.y[1]+F.y[0])/2),ae=function(Xt){return Z+Xt},he=function(Xt){return ee+Xt},xe=he(0),we=ae(0),Me=function(Xt){return we+Xt},Se=function(Xt){return xe+Xt};function Ie(Xt,or){return Xt+","+or}var Ve=Me(0),Ge=function(Xt){Xt.x=Math.max(Ve,Xt.x)},ke=M.pathbar.edgeshape,_e=function(Xt){var or=Me(Math.max(Math.min(Xt.x0,Xt.x0),0)),Ot=Me(Math.min(Math.max(Xt.x1,Xt.x1),U)),vt=Se(Xt.y0),ht=Se(Xt.y1),De=$/2,Ne={},We={};Ne.x=or,We.x=Ot,Ne.y=We.y=(vt+ht)/2;var Ke={x:or,y:vt},Je={x:Ot,y:vt},et={x:Ot,y:ht},Mt={x:or,y:ht};return ke===">"?(Ke.x-=De,Je.x-=De,et.x-=De,Mt.x-=De):ke==="/"?(et.x-=De,Mt.x-=De,Ne.x-=De/2,We.x-=De/2):ke==="\\"?(Ke.x-=De,Je.x-=De,Ne.x-=De/2,We.x-=De/2):ke==="<"&&(Ne.x-=De,We.x-=De),Ge(Ke),Ge(Mt),Ge(Ne),Ge(Je),Ge(et),Ge(We),"M"+Ie(Ke.x,Ke.y)+"L"+Ie(Je.x,Je.y)+"L"+Ie(We.x,We.y)+"L"+Ie(et.x,et.y)+"L"+Ie(Mt.x,Mt.y)+"L"+Ie(Ne.x,Ne.y)+"Z"},ce=M[_?"tiling":"marker"].pad,ve=function(Xt){return M.textposition.indexOf(Xt)!==-1},le=ve("top"),Ae=ve("left"),Be=ve("right"),Xe=ve("bottom"),Ye=function(Xt){var or=ae(Xt.x0),Ot=ae(Xt.x1),vt=he(Xt.y0),ht=he(Xt.y1),De=Ot-or,Ne=ht-vt;if(!De||!Ne)return"";var We=M.marker.cornerradius||0,Ke=Math.min(We,De/2,Ne/2);Ke&&Xt.data&&Xt.data.data&&Xt.data.data.label&&(le&&(Ke=Math.min(Ke,ce.t)),Ae&&(Ke=Math.min(Ke,ce.l)),Be&&(Ke=Math.min(Ke,ce.r)),Xe&&(Ke=Math.min(Ke,ce.b)));var Je=function(et,Mt){return Ke?"a"+Ie(Ke,Ke)+" 0 0 1 "+Ie(et,Mt):""};return"M"+Ie(or,vt+Ke)+Je(Ke,-Ke)+"L"+Ie(Ot-Ke,vt)+Je(Ke,Ke)+"L"+Ie(Ot,ht-Ke)+Je(-Ke,Ke)+"L"+Ie(or+Ke,ht)+Je(-Ke,-Ke)+"Z"},yt=function(Xt,or){var Ot=Xt.x0,vt=Xt.x1,ht=Xt.y0,De=Xt.y1,Ne=Xt.textBB,We=le||or.isHeader&&!Xe,Ke=We?"start":Xe?"end":"middle",Je=ve("right"),et=ve("left")||or.onPathbar,Mt=et?-1:Je?1:0;if(or.isHeader){if(Ot+=(_?ce:ce.l)-l,vt-=(_?ce:ce.r)-l,Ot>=vt){var pt=(Ot+vt)/2;Ot=pt,vt=pt}var Pt;Xe?(Pt=De-(_?ce:ce.b),ht-1,flipY:F.tiling.flip.indexOf("y")>-1,pad:{inner:F.tiling.pad,top:F.marker.pad.t,left:F.marker.pad.l,right:F.marker.pad.r,bottom:F.marker.pad.b}}),re=Q.descendants(),ne=1/0,se=-1/0;re.forEach(function(Y){var q=Y.depth;q>=F._maxDepth?(Y.x0=Y.x1=(Y.x0+Y.x1)/2,Y.y0=Y.y1=(Y.y0+Y.y1)/2):(ne=Math.min(ne,q),se=Math.max(se,q))}),v=v.data(re,n.getPtId),F._maxVisibleLayers=isFinite(se)?se-ne+1:0,v.enter().append("g").classed("slice",!0),u(v,o,I,[i,w],C),v.order();var G=null;if(f&&z){var X=n.getPtId(z);v.each(function(Y){G===null&&n.getPtId(Y)===X&&(G={x0:Y.x0,x1:Y.x1,y0:Y.y0,y1:Y.y1})})}var K=function(){return G||{x0:0,x1:i,y0:0,y1:w}},H=v;return f&&(H=H.transition().each("end",function(){var Y=p.select(this);n.setSliceCursor(Y,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),H.each(function(Y){var q=n.isHeader(Y,F);Y._x0=S(Y.x0),Y._x1=S(Y.x1),Y._y0=M(Y.y0),Y._y1=M(Y.y1),Y._hoverX=S(Y.x1-F.marker.pad.r),Y._hoverY=M(U?Y.y1-F.marker.pad.b/2:Y.y0+F.marker.pad.t/2);var Z=p.select(this),ee=b.ensureSingle(Z,"path","surface",function(Se){Se.style("pointer-events",O?"none":"all")});f?ee.transition().attrTween("d",function(Se){var Ie=A(Se,o,K(),[i,w]);return function(Ve){return C(Ie(Ve))}}):ee.attr("d",C),Z.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),ee.call(e,Y,F,c,{hovered:!1}),Y.x0===Y.x1||Y.y0===Y.y1?Y._text="":q?Y._text=$?"":n.getPtLabel(Y)||"":Y._text=a(Y,h,F,m,D)||"";var ae=b.ensureSingle(Z,"g","slicetext"),he=b.ensureSingle(ae,"text","",function(Se){Se.attr("data-notex",1)}),xe=b.ensureUniformFontSize(c,n.determineTextFont(F,Y,D.font)),we=Y._text||" ",Me=q&&we.indexOf("
")===-1;he.text(we).classed("slicetext",!0).attr("text-anchor",j?"end":P||Me?"start":"middle").call(E.font,xe).call(k.convertToTspans,c),Y.textBB=E.bBox(he.node()),Y.transform=_(Y,{fontSize:xe.size,isHeader:q}),Y.transform.fontSize=xe.size,f?he.transition().attrTween("transform",function(Se){var Ie=x(Se,o,K(),[i,w]);return function(Ve){return T(Ie(Ve))}}):he.attr("transform",T(Y))}),G}}}),cN=ze({"src/traces/treemap/plot.js"(J,V){"use strict";var p=sA(),b=uN();V.exports=function(k,l,e,t){return p(k,l,e,t,{type:"treemap",drawDescendants:b})}}}),fN=ze({"src/traces/treemap/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"treemap",basePlotModule:nN(),categories:[],animatable:!0,attributes:x2(),layoutAttributes:aA(),supplyDefaults:iN(),supplyLayoutDefaults:oN(),calc:nA().calc,crossTraceCalc:nA().crossTraceCalc,plot:cN(),style:b2().style,colorbar:Of(),meta:{}}}}),hN=ze({"lib/treemap.js"(J,V){"use strict";V.exports=fN()}}),dN=ze({"src/traces/icicle/base_plot.js"(J){"use strict";var V=cl();J.name="icicle",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),lA=ze({"src/traces/icicle/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=qs(),l=Ml().attributes,e=t0(),t=R1(),n=x2(),r=u0(),a=Ki().extendFlat,o=Uc().pattern;V.exports={labels:t.labels,parents:t.parents,values:t.values,branchvalues:t.branchvalues,count:t.count,level:t.level,maxdepth:t.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:n.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:a({colors:t.marker.colors,line:t.marker.line,pattern:o,editType:"calc"},k("marker",{colorAttr:"colors",anim:!1})),leaf:t.leaf,pathbar:n.pathbar,text:e.text,textinfo:t.textinfo,texttemplate:b({editType:"plot"},{keys:r.eventDataKeys.concat(["label","value"])}),texttemplatefallback:E({editType:"plot"}),hovertext:e.hovertext,hoverinfo:t.hoverinfo,hovertemplate:p({},{keys:r.eventDataKeys}),hovertemplatefallback:E(),textfont:e.textfont,insidetextfont:e.insidetextfont,outsidetextfont:n.outsidetextfont,textposition:n.textposition,sort:e.sort,root:t.root,domain:l({name:"icicle",trace:!0,editType:"calc"})}}}),uA=ze({"src/traces/icicle/layout_attributes.js"(J,V){"use strict";V.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),pN=ze({"src/traces/icicle/defaults.js"(J,V){"use strict";var p=Nr(),b=lA(),E=Qn(),k=Ml().defaults,l=qh().handleText,e=hv().TEXTPAD,t=r0().handleMarkerDefaults,n=fl(),r=n.hasColorscale,a=n.handleDefaults;V.exports=function(s,c,m,h){function v(T,f){return p.coerce(s,c,b,T,f)}var g=v("labels"),i=v("parents");if(!g||!g.length||!i||!i.length){c.visible=!1;return}var w=v("values");w&&w.length?v("branchvalues"):v("count"),v("level"),v("maxdepth"),v("tiling.orientation"),v("tiling.flip"),v("tiling.pad");var S=v("text");v("texttemplate"),v("texttemplatefallback"),c.texttemplate||v("textinfo",p.isArrayOrTypedArray(S)?"text+label":"label"),v("hovertext"),v("hovertemplate"),v("hovertemplatefallback");var M=v("pathbar.visible"),C="auto";l(s,c,h,v,C,{hasPathbar:M,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),v("textposition"),t(s,c,h,v);var _=c._hasColorscale=r(s,"marker","colors")||(s.marker||{}).coloraxis;_&&a(s,c,h,v,{prefix:"marker.",cLetter:"c"}),v("leaf.opacity",_?1:.7),c._hovered={marker:{line:{width:2,color:E.contrast(h.paper_bgcolor)}}},M&&(v("pathbar.thickness",c.pathbar.textfont.size+2*e),v("pathbar.side"),v("pathbar.edgeshape")),v("sort"),v("root.color"),k(c,h,v),c._length=null}}}),vN=ze({"src/traces/icicle/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=uA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("iciclecolorway",l.colorway),e("extendiciclecolors")}}}),cA=ze({"src/traces/icicle/calc.js"(J){"use strict";var V=D1();J.calc=function(p,b){return V.calc(p,b)},J.crossTraceCalc=function(p){return V._runCrossTraceCalc("icicle",p)}}}),mN=ze({"src/traces/icicle/partition.js"(J,V){"use strict";var p=I1(),b=iA();V.exports=function(k,l,e){var t=e.flipX,n=e.flipY,r=e.orientation==="h",a=e.maxDepth,o=l[0],s=l[1];a&&(o=(k.height+1)*l[0]/Math.min(k.height+1,a),s=(k.height+1)*l[1]/Math.min(k.height+1,a));var c=p.partition().padding(e.pad.inner).size(r?[l[1],o]:[l[0],s])(k);return(r||t||n)&&b(c,l,{swapXY:r,flipX:t,flipY:n}),c}}}),fA=ze({"src/traces/icicle/style.js"(J,V){"use strict";var p=ci(),b=Qn(),E=Nr(),k=eh().resizeText,l=y2();function e(n){var r=n._fullLayout._iciclelayer.selectAll(".trace");k(n,r,"icicle"),r.each(function(a){var o=p.select(this),s=a[0],c=s.trace;o.style("opacity",c.opacity),o.selectAll("path.surface").each(function(m){p.select(this).call(t,m,c,n)})})}function t(n,r,a,o){var s=r.data.data,c=!r.children,m=s.i,h=E.castOption(a,m,"marker.line.color")||b.defaultLine,v=E.castOption(a,m,"marker.line.width")||0;n.call(l,r,a,o).style("stroke-width",v).call(b.stroke,h).style("opacity",c?a.leaf.opacity:null)}V.exports={style:e,styleOne:t}}}),gN=ze({"src/traces/icicle/draw_descendants.js"(J,V){"use strict";var p=ci(),b=Nr(),E=$i(),k=Cs(),l=mN(),e=fA().styleOne,t=u0(),n=up(),r=$1(),a=_2().formatSliceLabel,o=!1;V.exports=function(c,m,h,v,g){var i=g.width,w=g.height,S=g.viewX,M=g.viewY,C=g.pathSlice,_=g.toMoveInsideSlice,T=g.strTransform,f=g.hasTransition,u=g.handleSlicesExit,A=g.makeUpdateSliceInterpolator,x=g.makeUpdateTextInterpolator,z=g.prevEntry,I={},O=c._context.staticPlot,D=c._fullLayout,B=m[0],F=B.trace,P=F.textposition.indexOf("left")!==-1,j=F.textposition.indexOf("right")!==-1,U=F.textposition.indexOf("bottom")!==-1,$=l(h,[i,w],{flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1,orientation:F.tiling.orientation,pad:{inner:F.tiling.pad},maxDepth:F._maxDepth}),Q=$.descendants(),re=1/0,ne=-1/0;Q.forEach(function(H){var Y=H.depth;Y>=F._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):(re=Math.min(re,Y),ne=Math.max(ne,Y))}),v=v.data(Q,n.getPtId),F._maxVisibleLayers=isFinite(ne)?ne-re+1:0,v.enter().append("g").classed("slice",!0),u(v,o,I,[i,w],C),v.order();var se=null;if(f&&z){var G=n.getPtId(z);v.each(function(H){se===null&&n.getPtId(H)===G&&(se={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var X=function(){return se||{x0:0,x1:i,y0:0,y1:w}},K=v;return f&&(K=K.transition().each("end",function(){var H=p.select(this);n.setSliceCursor(H,c,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),K.each(function(H){H._x0=S(H.x0),H._x1=S(H.x1),H._y0=M(H.y0),H._y1=M(H.y1),H._hoverX=S(H.x1-F.tiling.pad),H._hoverY=M(U?H.y1-F.tiling.pad/2:H.y0+F.tiling.pad/2);var Y=p.select(this),q=b.ensureSingle(Y,"path","surface",function(he){he.style("pointer-events",O?"none":"all")});f?q.transition().attrTween("d",function(he){var xe=A(he,o,X(),[i,w],{orientation:F.tiling.orientation,flipX:F.tiling.flip.indexOf("x")>-1,flipY:F.tiling.flip.indexOf("y")>-1});return function(we){return C(xe(we))}}):q.attr("d",C),Y.call(r,h,c,m,{styleOne:e,eventDataKeys:t.eventDataKeys,transitionTime:t.CLICK_TRANSITION_TIME,transitionEasing:t.CLICK_TRANSITION_EASING}).call(n.setSliceCursor,c,{isTransitioning:c._transitioning}),q.call(e,H,F,c,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":H._text=a(H,h,F,m,D)||"";var Z=b.ensureSingle(Y,"g","slicetext"),ee=b.ensureSingle(Z,"text","",function(he){he.attr("data-notex",1)}),ae=b.ensureUniformFontSize(c,n.determineTextFont(F,H,D.font));ee.text(H._text||" ").classed("slicetext",!0).attr("text-anchor",j?"end":P?"start":"middle").call(E.font,ae).call(k.convertToTspans,c),H.textBB=E.bBox(ee.node()),H.transform=_(H,{fontSize:ae.size}),H.transform.fontSize=ae.size,f?ee.transition().attrTween("transform",function(he){var xe=x(he,o,X(),[i,w]);return function(we){return T(xe(we))}}):ee.attr("transform",T(H))}),se}}}),yN=ze({"src/traces/icicle/plot.js"(J,V){"use strict";var p=sA(),b=gN();V.exports=function(k,l,e,t){return p(k,l,e,t,{type:"icicle",drawDescendants:b})}}}),_N=ze({"src/traces/icicle/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"icicle",basePlotModule:dN(),categories:[],animatable:!0,attributes:lA(),layoutAttributes:uA(),supplyDefaults:pN(),supplyLayoutDefaults:vN(),calc:cA().calc,crossTraceCalc:cA().crossTraceCalc,plot:yN(),style:fA().style,colorbar:Of(),meta:{}}}}),xN=ze({"lib/icicle.js"(J,V){"use strict";V.exports=_N()}}),bN=ze({"src/traces/funnelarea/base_plot.js"(J){"use strict";var V=cl();J.name="funnelarea",J.plot=function(p,b,E,k){V.plotBasePlot(J.name,p,b,E,k)},J.clean=function(p,b,E,k){V.cleanBasePlot(J.name,p,b,E,k)}}}),hA=ze({"src/traces/funnelarea/attributes.js"(J,V){"use strict";var p=t0(),b=ws(),E=Ml().attributes,{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=Ki().extendFlat;V.exports={labels:p.labels,label0:p.label0,dlabel:p.dlabel,values:p.values,marker:{colors:p.marker.colors,line:{color:t({},p.marker.line.color,{dflt:null}),width:t({},p.marker.line.width,{dflt:1}),editType:"calc"},pattern:p.marker.pattern,editType:"calc"},text:p.text,hovertext:p.hovertext,scalegroup:t({},p.scalegroup,{}),textinfo:t({},p.textinfo,{flags:["label","text","value","percent"]}),texttemplate:l({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:e({editType:"plot"}),hoverinfo:t({},b.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:k({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:e(),textposition:t({},p.textposition,{values:["inside","none"],dflt:"inside"}),textfont:p.textfont,insidetextfont:p.insidetextfont,title:{text:p.title.text,font:p.title.font,position:t({},p.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:E({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"}}}}),dA=ze({"src/traces/funnelarea/layout_attributes.js"(J,V){"use strict";var p=qb().hiddenlabels;V.exports={hiddenlabels:p,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}}}),wN=ze({"src/traces/funnelarea/defaults.js"(J,V){"use strict";var p=Nr(),b=hA(),E=Ml().defaults,k=qh().handleText,l=r0().handleLabelsAndValues,e=r0().handleMarkerDefaults;V.exports=function(n,r,a,o){function s(C,_){return p.coerce(n,r,b,C,_)}var c=s("labels"),m=s("values"),h=l(c,m),v=h.len;if(r._hasLabels=h.hasLabels,r._hasValues=h.hasValues,!r._hasLabels&&r._hasValues&&(s("label0"),s("dlabel")),!v){r.visible=!1;return}r._length=v,e(n,r,o,s),s("scalegroup");var g=s("text"),i=s("texttemplate");s("texttemplatefallback");var w;if(i||(w=s("textinfo",Array.isArray(g)?"text+percent":"percent")),s("hovertext"),s("hovertemplate"),s("hovertemplatefallback"),i||w&&w!=="none"){var S=s("textposition");k(n,r,o,s,S,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else w==="none"&&s("textposition","none");E(r,o,s);var M=s("title.text");M&&(s("title.position"),p.coerceFont(s,"title.font",o.font)),s("aspectratio"),s("baseratio")}}}),TN=ze({"src/traces/funnelarea/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=dA();V.exports=function(k,l){function e(t,n){return p.coerce(k,l,b,t,n)}e("hiddenlabels"),e("funnelareacolorway",l.colorway),e("extendfunnelareacolors")}}}),pA=ze({"src/traces/funnelarea/calc.js"(J,V){"use strict";var p=ug();function b(k,l){return p.calc(k,l)}function E(k){p.crossTraceCalc(k,{type:"funnelarea"})}V.exports={calc:b,crossTraceCalc:E}}}),AN=ze({"src/traces/funnelarea/plot.js"(J,V){"use strict";var p=ci(),b=$i(),E=Nr(),k=E.strScale,l=E.strTranslate,e=Cs(),t=Xv(),n=t.toMoveInsideBar,r=eh(),a=r.recordMinTextSize,o=r.clearMinTextSize,s=lv(),c=Vb(),m=c.attachFxHandlers,h=c.determineInsideTextFont,v=c.layoutAreas,g=c.prerenderTitles,i=c.positionTitleOutside,w=c.formatSliceLabel;V.exports=function(T,f){var u=T._context.staticPlot,A=T._fullLayout;o("funnelarea",A),g(f,T),v(f,A._size),E.makeTraceGroups(A._funnelarealayer,f,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace;C(x),z.each(function(){var D=p.select(this).selectAll("g.slice").data(x);D.enter().append("g").classed("slice",!0),D.exit().remove(),D.each(function(F,P){if(F.hidden){p.select(this).selectAll("path,g").remove();return}F.pointNumber=F.i,F.curveNumber=O.index;var j=I.cx,U=I.cy,$=p.select(this),Q=$.selectAll("path.surface").data([F]);Q.enter().append("path").classed("surface",!0).style({"pointer-events":u?"none":"all"}),$.call(m,T,x);var re="M"+(j+F.TR[0])+","+(U+F.TR[1])+S(F.TR,F.BR)+S(F.BR,F.BL)+S(F.BL,F.TL)+"Z";Q.attr("d",re),w(T,F,I);var ne=s.castOption(O.textposition,F.pts),se=$.selectAll("g.slicetext").data(F.text&&ne!=="none"?[0]:[]);se.enter().append("g").classed("slicetext",!0),se.exit().remove(),se.each(function(){var G=E.ensureSingle(p.select(this),"text","",function(ae){ae.attr("data-notex",1)}),X=E.ensureUniformFontSize(T,h(O,F,A.font));G.text(F.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(b.font,X).call(e.convertToTspans,T);var K=b.bBox(G.node()),H,Y,q,Z=Math.min(F.BL[1],F.BR[1])+U,ee=Math.max(F.TL[1],F.TR[1])+U;Y=Math.max(F.TL[0],F.BL[0])+j,q=Math.min(F.TR[0],F.BR[0])+j,H=n(Y,q,Z,ee,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),H.fontSize=X.size,a(O.type,H,A),x[P].transform=H,E.setTransormAndDisplay(G,H)})});var B=p.select(this).selectAll("g.titletext").data(O.title.text?[0]:[]);B.enter().append("g").classed("titletext",!0),B.exit().remove(),B.each(function(){var F=E.ensureSingle(p.select(this),"text","",function(U){U.attr("data-notex",1)}),P=O.title.text;O._meta&&(P=E.templateString(P,O._meta)),F.text(P).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(b.font,O.title.font).call(e.convertToTspans,T);var j=i(I,A._size);F.attr("transform",l(j.x,j.y)+k(Math.min(1,j.scale))+l(j.tx,j.ty))})})})};function S(_,T){var f=T[0]-_[0],u=T[1]-_[1];return"l"+f+","+u}function M(_,T){return[.5*(_[0]+T[0]),.5*(_[1]+T[1])]}function C(_){if(!_.length)return;var T=_[0],f=T.trace,u=f.aspectratio,A=f.baseratio;A>.999&&(A=.999);var x=Math.pow(A,2),z=T.vTotal,I=z*x/(1-x),O=z,D=I/z;function B(){var he=Math.sqrt(D);return{x:he,y:-he}}function F(){var he=B();return[he.x,he.y]}var P,j=[];j.push(F());var U,$;for(U=_.length-1;U>-1;U--)if($=_[U],!$.hidden){var Q=$.v/O;D+=Q,j.push(F())}var re=1/0,ne=-1/0;for(U=0;U-1;U--)if($=_[U],!$.hidden){Z+=1;var ee=j[Z][0],ae=j[Z][1];$.TL=[-ee,ae],$.TR=[ee,ae],$.BL=Y,$.BR=q,$.pxmid=M($.TR,$.BR),Y=$.TL,q=$.TR}}}}),MN=ze({"src/traces/funnelarea/style.js"(J,V){"use strict";var p=ci(),b=Zm(),E=eh().resizeText;V.exports=function(l){var e=l._fullLayout._funnelarealayer.selectAll(".trace");E(l,e,"funnelarea"),e.each(function(t){var n=t[0],r=n.trace,a=p.select(this);a.style({opacity:r.opacity}),a.selectAll("path.surface").each(function(o){p.select(this).call(b,o,r,l)})})}}}),SN=ze({"src/traces/funnelarea/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"funnelarea",basePlotModule:bN(),categories:["pie-like","funnelarea","showLegend"],attributes:hA(),layoutAttributes:dA(),supplyDefaults:wN(),supplyLayoutDefaults:TN(),calc:pA().calc,crossTraceCalc:pA().crossTraceCalc,plot:AN(),style:MN(),styleOne:Zm(),meta:{}}}}),EN=ze({"lib/funnelarea.js"(J,V){"use strict";V.exports=SN()}}),df=ze({"stackgl_modules/index.js"(J,V){"use strict";(function(){var p={1964:function(l,e,t){l.exports={alpha_shape:t(3502),convex_hull:t(7352),delaunay_triangulate:t(7642),gl_cone3d:t(6405),gl_error3d:t(9165),gl_line3d:t(5714),gl_mesh3d:t(7201),gl_plot3d:t(4100),gl_scatter3d:t(8418),gl_streamtube3d:t(7815),gl_surface3d:t(9499),ndarray:t(9618),ndarray_linear_interpolate:t(4317)}},4793:function(l,e,t){"use strict";var n,r=t(7507),a=t(3778),o=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.hp=h,n=u,e.IS=50;var s=2147483647;n=s,h.TYPED_ARRAY_SUPPORT=c(),!h.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support.");function c(){try{var ke=new Uint8Array(1),_e={foo:function(){return 42}};return Object.setPrototypeOf(_e,Uint8Array.prototype),Object.setPrototypeOf(ke,_e),ke.foo()===42}catch{return!1}}Object.defineProperty(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}});function m(ke){if(ke>s)throw new RangeError('The value "'+ke+'" is invalid for option "size"');var _e=new Uint8Array(ke);return Object.setPrototypeOf(_e,h.prototype),_e}function h(ke,_e,ce){if(typeof ke=="number"){if(typeof _e=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return w(ke)}return v(ke,_e,ce)}h.poolSize=8192;function v(ke,_e,ce){if(typeof ke=="string")return S(ke,_e);if(ArrayBuffer.isView(ke))return C(ke);if(ke==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke);if(Ie(ke,ArrayBuffer)||ke&&Ie(ke.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Ie(ke,SharedArrayBuffer)||ke&&Ie(ke.buffer,SharedArrayBuffer)))return _(ke,_e,ce);if(typeof ke=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var ve=ke.valueOf&&ke.valueOf();if(ve!=null&&ve!==ke)return h.from(ve,_e,ce);var le=T(ke);if(le)return le;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ke[Symbol.toPrimitive]=="function")return h.from(ke[Symbol.toPrimitive]("string"),_e,ce);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof ke)}h.from=function(ke,_e,ce){return v(ke,_e,ce)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array);function g(ke){if(typeof ke!="number")throw new TypeError('"size" argument must be of type number');if(ke<0)throw new RangeError('The value "'+ke+'" is invalid for option "size"')}function i(ke,_e,ce){return g(ke),ke<=0?m(ke):_e!==void 0?typeof ce=="string"?m(ke).fill(_e,ce):m(ke).fill(_e):m(ke)}h.alloc=function(ke,_e,ce){return i(ke,_e,ce)};function w(ke){return g(ke),m(ke<0?0:f(ke)|0)}h.allocUnsafe=function(ke){return w(ke)},h.allocUnsafeSlow=function(ke){return w(ke)};function S(ke,_e){if((typeof _e!="string"||_e==="")&&(_e="utf8"),!h.isEncoding(_e))throw new TypeError("Unknown encoding: "+_e);var ce=A(ke,_e)|0,ve=m(ce),le=ve.write(ke,_e);return le!==ce&&(ve=ve.slice(0,le)),ve}function M(ke){for(var _e=ke.length<0?0:f(ke.length)|0,ce=m(_e),ve=0;ve<_e;ve+=1)ce[ve]=ke[ve]&255;return ce}function C(ke){if(Ie(ke,Uint8Array)){var _e=new Uint8Array(ke);return _(_e.buffer,_e.byteOffset,_e.byteLength)}return M(ke)}function _(ke,_e,ce){if(_e<0||ke.byteLength<_e)throw new RangeError('"offset" is outside of buffer bounds');if(ke.byteLength<_e+(ce||0))throw new RangeError('"length" is outside of buffer bounds');var ve;return _e===void 0&&ce===void 0?ve=new Uint8Array(ke):ce===void 0?ve=new Uint8Array(ke,_e):ve=new Uint8Array(ke,_e,ce),Object.setPrototypeOf(ve,h.prototype),ve}function T(ke){if(h.isBuffer(ke)){var _e=f(ke.length)|0,ce=m(_e);return ce.length===0||ke.copy(ce,0,0,_e),ce}if(ke.length!==void 0)return typeof ke.length!="number"||Ve(ke.length)?m(0):M(ke);if(ke.type==="Buffer"&&Array.isArray(ke.data))return M(ke.data)}function f(ke){if(ke>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return ke|0}function u(ke){return+ke!=ke&&(ke=0),h.alloc(+ke)}h.isBuffer=function(_e){return _e!=null&&_e._isBuffer===!0&&_e!==h.prototype},h.compare=function(_e,ce){if(Ie(_e,Uint8Array)&&(_e=h.from(_e,_e.offset,_e.byteLength)),Ie(ce,Uint8Array)&&(ce=h.from(ce,ce.offset,ce.byteLength)),!h.isBuffer(_e)||!h.isBuffer(ce))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(_e===ce)return 0;for(var ve=_e.length,le=ce.length,Ae=0,Be=Math.min(ve,le);Aele.length?h.from(Be).copy(le,Ae):Uint8Array.prototype.set.call(le,Be,Ae);else if(h.isBuffer(Be))Be.copy(le,Ae);else throw new TypeError('"list" argument must be an Array of Buffers');Ae+=Be.length}return le};function A(ke,_e){if(h.isBuffer(ke))return ke.length;if(ArrayBuffer.isView(ke)||Ie(ke,ArrayBuffer))return ke.byteLength;if(typeof ke!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof ke);var ce=ke.length,ve=arguments.length>2&&arguments[2]===!0;if(!ve&&ce===0)return 0;for(var le=!1;;)switch(_e){case"ascii":case"latin1":case"binary":return ce;case"utf8":case"utf-8":return he(ke).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ce*2;case"hex":return ce>>>1;case"base64":return Me(ke).length;default:if(le)return ve?-1:he(ke).length;_e=(""+_e).toLowerCase(),le=!0}}h.byteLength=A;function x(ke,_e,ce){var ve=!1;if((_e===void 0||_e<0)&&(_e=0),_e>this.length||((ce===void 0||ce>this.length)&&(ce=this.length),ce<=0)||(ce>>>=0,_e>>>=0,ce<=_e))return"";for(ke||(ke="utf8");;)switch(ke){case"hex":return G(this,_e,ce);case"utf8":case"utf-8":return $(this,_e,ce);case"ascii":return ne(this,_e,ce);case"latin1":case"binary":return se(this,_e,ce);case"base64":return U(this,_e,ce);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,_e,ce);default:if(ve)throw new TypeError("Unknown encoding: "+ke);ke=(ke+"").toLowerCase(),ve=!0}}h.prototype._isBuffer=!0;function z(ke,_e,ce){var ve=ke[_e];ke[_e]=ke[ce],ke[ce]=ve}h.prototype.swap16=function(){var _e=this.length;if(_e%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ce=0;ce<_e;ce+=2)z(this,ce,ce+1);return this},h.prototype.swap32=function(){var _e=this.length;if(_e%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ce=0;ce<_e;ce+=4)z(this,ce,ce+3),z(this,ce+1,ce+2);return this},h.prototype.swap64=function(){var _e=this.length;if(_e%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ce=0;ce<_e;ce+=8)z(this,ce,ce+7),z(this,ce+1,ce+6),z(this,ce+2,ce+5),z(this,ce+3,ce+4);return this},h.prototype.toString=function(){var _e=this.length;return _e===0?"":arguments.length===0?$(this,0,_e):x.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(_e){if(!h.isBuffer(_e))throw new TypeError("Argument must be a Buffer");return this===_e?!0:h.compare(this,_e)===0},h.prototype.inspect=function(){var _e="",ce=e.IS;return _e=this.toString("hex",0,ce).replace(/(.{2})/g,"$1 ").trim(),this.length>ce&&(_e+=" ... "),""},o&&(h.prototype[o]=h.prototype.inspect),h.prototype.compare=function(_e,ce,ve,le,Ae){if(Ie(_e,Uint8Array)&&(_e=h.from(_e,_e.offset,_e.byteLength)),!h.isBuffer(_e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof _e);if(ce===void 0&&(ce=0),ve===void 0&&(ve=_e?_e.length:0),le===void 0&&(le=0),Ae===void 0&&(Ae=this.length),ce<0||ve>_e.length||le<0||Ae>this.length)throw new RangeError("out of range index");if(le>=Ae&&ce>=ve)return 0;if(le>=Ae)return-1;if(ce>=ve)return 1;if(ce>>>=0,ve>>>=0,le>>>=0,Ae>>>=0,this===_e)return 0;for(var Be=Ae-le,Xe=ve-ce,Ye=Math.min(Be,Xe),yt=this.slice(le,Ae),gt=_e.slice(ce,ve),Tt=0;Tt2147483647?ce=2147483647:ce<-2147483648&&(ce=-2147483648),ce=+ce,Ve(ce)&&(ce=le?0:ke.length-1),ce<0&&(ce=ke.length+ce),ce>=ke.length){if(le)return-1;ce=ke.length-1}else if(ce<0)if(le)ce=0;else return-1;if(typeof _e=="string"&&(_e=h.from(_e,ve)),h.isBuffer(_e))return _e.length===0?-1:O(ke,_e,ce,ve,le);if(typeof _e=="number")return _e=_e&255,typeof Uint8Array.prototype.indexOf=="function"?le?Uint8Array.prototype.indexOf.call(ke,_e,ce):Uint8Array.prototype.lastIndexOf.call(ke,_e,ce):O(ke,[_e],ce,ve,le);throw new TypeError("val must be string, number or Buffer")}function O(ke,_e,ce,ve,le){var Ae=1,Be=ke.length,Xe=_e.length;if(ve!==void 0&&(ve=String(ve).toLowerCase(),ve==="ucs2"||ve==="ucs-2"||ve==="utf16le"||ve==="utf-16le")){if(ke.length<2||_e.length<2)return-1;Ae=2,Be/=2,Xe/=2,ce/=2}function Ye($t,rr){return Ae===1?$t[rr]:$t.readUInt16BE(rr*Ae)}var yt;if(le){var gt=-1;for(yt=ce;ytBe&&(ce=Be-Xe),yt=ce;yt>=0;yt--){for(var Tt=!0,At=0;Atle&&(ve=le)):ve=le;var Ae=_e.length;ve>Ae/2&&(ve=Ae/2);for(var Be=0;Be>>0,isFinite(ve)?(ve=ve>>>0,le===void 0&&(le="utf8")):(le=ve,ve=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ae=this.length-ce;if((ve===void 0||ve>Ae)&&(ve=Ae),_e.length>0&&(ve<0||ce<0)||ce>this.length)throw new RangeError("Attempt to write outside buffer bounds");le||(le="utf8");for(var Be=!1;;)switch(le){case"hex":return D(this,_e,ce,ve);case"utf8":case"utf-8":return B(this,_e,ce,ve);case"ascii":case"latin1":case"binary":return F(this,_e,ce,ve);case"base64":return P(this,_e,ce,ve);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return j(this,_e,ce,ve);default:if(Be)throw new TypeError("Unknown encoding: "+le);le=(""+le).toLowerCase(),Be=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function U(ke,_e,ce){return _e===0&&ce===ke.length?r.fromByteArray(ke):r.fromByteArray(ke.slice(_e,ce))}function $(ke,_e,ce){ce=Math.min(ke.length,ce);for(var ve=[],le=_e;le239?4:Ae>223?3:Ae>191?2:1;if(le+Xe<=ce){var Ye,yt,gt,Tt;switch(Xe){case 1:Ae<128&&(Be=Ae);break;case 2:Ye=ke[le+1],(Ye&192)===128&&(Tt=(Ae&31)<<6|Ye&63,Tt>127&&(Be=Tt));break;case 3:Ye=ke[le+1],yt=ke[le+2],(Ye&192)===128&&(yt&192)===128&&(Tt=(Ae&15)<<12|(Ye&63)<<6|yt&63,Tt>2047&&(Tt<55296||Tt>57343)&&(Be=Tt));break;case 4:Ye=ke[le+1],yt=ke[le+2],gt=ke[le+3],(Ye&192)===128&&(yt&192)===128&&(gt&192)===128&&(Tt=(Ae&15)<<18|(Ye&63)<<12|(yt&63)<<6|gt&63,Tt>65535&&Tt<1114112&&(Be=Tt))}}Be===null?(Be=65533,Xe=1):Be>65535&&(Be-=65536,ve.push(Be>>>10&1023|55296),Be=56320|Be&1023),ve.push(Be),le+=Xe}return re(ve)}var Q=4096;function re(ke){var _e=ke.length;if(_e<=Q)return String.fromCharCode.apply(String,ke);for(var ce="",ve=0;ve<_e;)ce+=String.fromCharCode.apply(String,ke.slice(ve,ve+=Q));return ce}function ne(ke,_e,ce){var ve="";ce=Math.min(ke.length,ce);for(var le=_e;leve)&&(ce=ve);for(var le="",Ae=_e;Aeve&&(_e=ve),ce<0?(ce+=ve,ce<0&&(ce=0)):ce>ve&&(ce=ve),ce<_e&&(ce=_e);var le=this.subarray(_e,ce);return Object.setPrototypeOf(le,h.prototype),le};function K(ke,_e,ce){if(ke%1!==0||ke<0)throw new RangeError("offset is not uint");if(ke+_e>ce)throw new RangeError("Trying to access beyond buffer length")}h.prototype.readUintLE=h.prototype.readUIntLE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e],Ae=1,Be=0;++Be>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e+--ce],Ae=1;ce>0&&(Ae*=256);)le+=this[_e+--ce]*Ae;return le},h.prototype.readUint8=h.prototype.readUInt8=function(_e,ce){return _e=_e>>>0,ce||K(_e,1,this.length),this[_e]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,2,this.length),this[_e]|this[_e+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,2,this.length),this[_e]<<8|this[_e+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),(this[_e]|this[_e+1]<<8|this[_e+2]<<16)+this[_e+3]*16777216},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]*16777216+(this[_e+1]<<16|this[_e+2]<<8|this[_e+3])},h.prototype.readIntLE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=this[_e],Ae=1,Be=0;++Be=Ae&&(le-=Math.pow(2,8*ce)),le},h.prototype.readIntBE=function(_e,ce,ve){_e=_e>>>0,ce=ce>>>0,ve||K(_e,ce,this.length);for(var le=ce,Ae=1,Be=this[_e+--le];le>0&&(Ae*=256);)Be+=this[_e+--le]*Ae;return Ae*=128,Be>=Ae&&(Be-=Math.pow(2,8*ce)),Be},h.prototype.readInt8=function(_e,ce){return _e=_e>>>0,ce||K(_e,1,this.length),this[_e]&128?(255-this[_e]+1)*-1:this[_e]},h.prototype.readInt16LE=function(_e,ce){_e=_e>>>0,ce||K(_e,2,this.length);var ve=this[_e]|this[_e+1]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt16BE=function(_e,ce){_e=_e>>>0,ce||K(_e,2,this.length);var ve=this[_e+1]|this[_e]<<8;return ve&32768?ve|4294901760:ve},h.prototype.readInt32LE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]|this[_e+1]<<8|this[_e+2]<<16|this[_e+3]<<24},h.prototype.readInt32BE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),this[_e]<<24|this[_e+1]<<16|this[_e+2]<<8|this[_e+3]},h.prototype.readFloatLE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),a.read(this,_e,!0,23,4)},h.prototype.readFloatBE=function(_e,ce){return _e=_e>>>0,ce||K(_e,4,this.length),a.read(this,_e,!1,23,4)},h.prototype.readDoubleLE=function(_e,ce){return _e=_e>>>0,ce||K(_e,8,this.length),a.read(this,_e,!0,52,8)},h.prototype.readDoubleBE=function(_e,ce){return _e=_e>>>0,ce||K(_e,8,this.length),a.read(this,_e,!1,52,8)};function H(ke,_e,ce,ve,le,Ae){if(!h.isBuffer(ke))throw new TypeError('"buffer" argument must be a Buffer instance');if(_e>le||_eke.length)throw new RangeError("Index out of range")}h.prototype.writeUintLE=h.prototype.writeUIntLE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,ve=ve>>>0,!le){var Ae=Math.pow(2,8*ve)-1;H(this,_e,ce,ve,Ae,0)}var Be=1,Xe=0;for(this[ce]=_e&255;++Xe>>0,ve=ve>>>0,!le){var Ae=Math.pow(2,8*ve)-1;H(this,_e,ce,ve,Ae,0)}var Be=ve-1,Xe=1;for(this[ce+Be]=_e&255;--Be>=0&&(Xe*=256);)this[ce+Be]=_e/Xe&255;return ce+ve},h.prototype.writeUint8=h.prototype.writeUInt8=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,1,255,0),this[ce]=_e&255,ce+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,65535,0),this[ce]=_e&255,this[ce+1]=_e>>>8,ce+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,65535,0),this[ce]=_e>>>8,this[ce+1]=_e&255,ce+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,4294967295,0),this[ce+3]=_e>>>24,this[ce+2]=_e>>>16,this[ce+1]=_e>>>8,this[ce]=_e&255,ce+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,4294967295,0),this[ce]=_e>>>24,this[ce+1]=_e>>>16,this[ce+2]=_e>>>8,this[ce+3]=_e&255,ce+4},h.prototype.writeIntLE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,!le){var Ae=Math.pow(2,8*ve-1);H(this,_e,ce,ve,Ae-1,-Ae)}var Be=0,Xe=1,Ye=0;for(this[ce]=_e&255;++Be>0)-Ye&255;return ce+ve},h.prototype.writeIntBE=function(_e,ce,ve,le){if(_e=+_e,ce=ce>>>0,!le){var Ae=Math.pow(2,8*ve-1);H(this,_e,ce,ve,Ae-1,-Ae)}var Be=ve-1,Xe=1,Ye=0;for(this[ce+Be]=_e&255;--Be>=0&&(Xe*=256);)_e<0&&Ye===0&&this[ce+Be+1]!==0&&(Ye=1),this[ce+Be]=(_e/Xe>>0)-Ye&255;return ce+ve},h.prototype.writeInt8=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,1,127,-128),_e<0&&(_e=255+_e+1),this[ce]=_e&255,ce+1},h.prototype.writeInt16LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,32767,-32768),this[ce]=_e&255,this[ce+1]=_e>>>8,ce+2},h.prototype.writeInt16BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,2,32767,-32768),this[ce]=_e>>>8,this[ce+1]=_e&255,ce+2},h.prototype.writeInt32LE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,2147483647,-2147483648),this[ce]=_e&255,this[ce+1]=_e>>>8,this[ce+2]=_e>>>16,this[ce+3]=_e>>>24,ce+4},h.prototype.writeInt32BE=function(_e,ce,ve){return _e=+_e,ce=ce>>>0,ve||H(this,_e,ce,4,2147483647,-2147483648),_e<0&&(_e=4294967295+_e+1),this[ce]=_e>>>24,this[ce+1]=_e>>>16,this[ce+2]=_e>>>8,this[ce+3]=_e&255,ce+4};function Y(ke,_e,ce,ve,le,Ae){if(ce+ve>ke.length)throw new RangeError("Index out of range");if(ce<0)throw new RangeError("Index out of range")}function q(ke,_e,ce,ve,le){return _e=+_e,ce=ce>>>0,le||Y(ke,_e,ce,4,34028234663852886e22,-34028234663852886e22),a.write(ke,_e,ce,ve,23,4),ce+4}h.prototype.writeFloatLE=function(_e,ce,ve){return q(this,_e,ce,!0,ve)},h.prototype.writeFloatBE=function(_e,ce,ve){return q(this,_e,ce,!1,ve)};function Z(ke,_e,ce,ve,le){return _e=+_e,ce=ce>>>0,le||Y(ke,_e,ce,8,17976931348623157e292,-17976931348623157e292),a.write(ke,_e,ce,ve,52,8),ce+8}h.prototype.writeDoubleLE=function(_e,ce,ve){return Z(this,_e,ce,!0,ve)},h.prototype.writeDoubleBE=function(_e,ce,ve){return Z(this,_e,ce,!1,ve)},h.prototype.copy=function(_e,ce,ve,le){if(!h.isBuffer(_e))throw new TypeError("argument should be a Buffer");if(ve||(ve=0),!le&&le!==0&&(le=this.length),ce>=_e.length&&(ce=_e.length),ce||(ce=0),le>0&&le=this.length)throw new RangeError("Index out of range");if(le<0)throw new RangeError("sourceEnd out of bounds");le>this.length&&(le=this.length),_e.length-ce>>0,ve=ve===void 0?this.length:ve>>>0,_e||(_e=0);var Be;if(typeof _e=="number")for(Be=ce;Be55295&&ce<57344){if(!le){if(ce>56319){(_e-=3)>-1&&Ae.push(239,191,189);continue}else if(Be+1===ve){(_e-=3)>-1&&Ae.push(239,191,189);continue}le=ce;continue}if(ce<56320){(_e-=3)>-1&&Ae.push(239,191,189),le=ce;continue}ce=(le-55296<<10|ce-56320)+65536}else le&&(_e-=3)>-1&&Ae.push(239,191,189);if(le=null,ce<128){if((_e-=1)<0)break;Ae.push(ce)}else if(ce<2048){if((_e-=2)<0)break;Ae.push(ce>>6|192,ce&63|128)}else if(ce<65536){if((_e-=3)<0)break;Ae.push(ce>>12|224,ce>>6&63|128,ce&63|128)}else if(ce<1114112){if((_e-=4)<0)break;Ae.push(ce>>18|240,ce>>12&63|128,ce>>6&63|128,ce&63|128)}else throw new Error("Invalid code point")}return Ae}function xe(ke){for(var _e=[],ce=0;ce>8,le=ce%256,Ae.push(le),Ae.push(ve);return Ae}function Me(ke){return r.toByteArray(ae(ke))}function Se(ke,_e,ce,ve){for(var le=0;le=_e.length||le>=ke.length);++le)_e[le+ce]=ke[le];return le}function Ie(ke,_e){return ke instanceof _e||ke!=null&&ke.constructor!=null&&ke.constructor.name!=null&&ke.constructor.name===_e.name}function Ve(ke){return ke!==ke}var Ge=function(){for(var ke="0123456789abcdef",_e=new Array(256),ce=0;ce<16;++ce)for(var ve=ce*16,le=0;le<16;++le)_e[ve+le]=ke[ce]+ke[le];return _e}()},9216:function(l){"use strict";l.exports=r,l.exports.isMobile=r,l.exports.default=r;let e=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/CrOS/,n=/android|ipad|playbook|silk/i;function r(a){a||(a={});let o=a.ua;if(!o&&typeof navigator<"u"&&(o=navigator.userAgent),o&&o.headers&&typeof o.headers["user-agent"]=="string"&&(o=o.headers["user-agent"]),typeof o!="string")return!1;let s=e.test(o)&&!t.test(o)||!!a.tablet&&n.test(o);return!s&&a.tablet&&a.featureDetect&&navigator&&navigator.maxTouchPoints>1&&o.indexOf("Macintosh")!==-1&&o.indexOf("Safari")!==-1&&(s=!0),s}},6296:function(l,e,t){"use strict";l.exports=c;var n=t(7261),r=t(9977),a=t(1811);function o(m,h){this._controllerNames=Object.keys(m),this._controllerList=this._controllerNames.map(function(v){return m[v]}),this._mode=h,this._active=m[h],this._active||(this._mode="turntable",this._active=m.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;s.flush=function(m){for(var h=this._controllerList,v=0;v"u"?t(1538):WeakMap,r=t(2762),a=t(8116),o=new n;function s(c){var m=o.get(c),h=m&&(m._triangleBuffer.handle||m._triangleBuffer.buffer);if(!h||!c.isBuffer(h)){var v=r(c,new Float32Array([-1,-1,-1,4,4,-1]));m=a(c,[{buffer:v,type:c.FLOAT,size:2}]),m._triangleBuffer=v,o.set(c,m)}m.bind(),c.drawArrays(c.TRIANGLES,0,3),m.unbind()}l.exports=s},1085:function(l,e,t){var n=t(1371);l.exports=r;function r(a,o,s){o=typeof o=="number"?o:1,s=s||": ";var c=a.split(/\r?\n/),m=String(c.length+o-1).length;return c.map(function(h,v){var g=v+o,i=String(g).length,w=n(g,m-i);return w+s+h}).join(` +`)}},3952:function(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){for(var c=new Array(s+1),m=0;m0)throw new Error("Invalid string. Length must be a multiple of 4");var C=S.indexOf("=");C===-1&&(C=M);var _=C===M?0:4-C%4;return[C,_]}function m(S){var M=c(S),C=M[0],_=M[1];return(C+_)*3/4-_}function h(S,M,C){return(M+C)*3/4-C}function v(S){var M,C=c(S),_=C[0],T=C[1],f=new r(h(S,_,T)),u=0,A=T>0?_-4:_,x;for(x=0;x>16&255,f[u++]=M>>8&255,f[u++]=M&255;return T===2&&(M=n[S.charCodeAt(x)]<<2|n[S.charCodeAt(x+1)]>>4,f[u++]=M&255),T===1&&(M=n[S.charCodeAt(x)]<<10|n[S.charCodeAt(x+1)]<<4|n[S.charCodeAt(x+2)]>>2,f[u++]=M>>8&255,f[u++]=M&255),f}function g(S){return t[S>>18&63]+t[S>>12&63]+t[S>>6&63]+t[S&63]}function i(S,M,C){for(var _,T=[],f=M;fA?A:u+f));return _===1?(M=S[C-1],T.push(t[M>>2]+t[M<<4&63]+"==")):_===2&&(M=(S[C-2]<<8)+S[C-1],T.push(t[M>>10]+t[M>>4&63]+t[M<<2&63]+"=")),T.join("")}},3865:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).add(o[0].mul(a[1])),a[1].mul(o[1]))}},1318:function(l){"use strict";l.exports=e;function e(t,n){return t[0].mul(n[1]).cmp(n[0].mul(t[1]))}},8697:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]),a[1].mul(o[0]))}},7842:function(l,e,t){"use strict";var n=t(6330),r=t(1533),a=t(2651),o=t(6768),s=t(869),c=t(8697);l.exports=m;function m(h,v){if(n(h))return v?c(h,m(v)):[h[0].clone(),h[1].clone()];var g=0,i,w;if(r(h))i=h.clone();else if(typeof h=="string")i=o(h);else{if(h===0)return[a(0),a(1)];if(h===Math.floor(h))i=a(h);else{for(;h!==Math.floor(h);)h=h*Math.pow(2,256),g-=256;i=a(h)}}if(n(v))i.mul(v[1]),w=v[0].clone();else if(r(v))w=v.clone();else if(typeof v=="string")w=o(v);else if(!v)w=a(1);else if(v===Math.floor(v))w=a(v);else{for(;v!==Math.floor(v);)v=v*Math.pow(2,256),g+=256;w=a(v)}return g>0?i=i.ushln(g):g<0&&(w=w.ushln(-g)),s(i,w)}},6330:function(l,e,t){"use strict";var n=t(1533);l.exports=r;function r(a){return Array.isArray(a)&&a.length===2&&n(a[0])&&n(a[1])}},5716:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a.cmp(new n(0))}},1369:function(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){var o=a.length,s=a.words,c=0;if(o===1)c=s[0];else if(o===2)c=s[0]+s[1]*67108864;else for(var m=0;m20?52:c+32}},1533:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return a&&typeof a=="object"&&!!a.words}},2651:function(l,e,t){"use strict";var n=t(6859),r=t(2361);l.exports=a;function a(o){var s=r.exponent(o);return s<52?new n(o):new n(o*Math.pow(2,52-s)).ushln(s-52)}},869:function(l,e,t){"use strict";var n=t(2651),r=t(5716);l.exports=a;function a(o,s){var c=r(o),m=r(s);if(c===0)return[n(0),n(1)];if(m===0)return[n(0),n(0)];m<0&&(o=o.neg(),s=s.neg());var h=o.gcd(s);return h.cmpn(1)?[o.div(h),s.div(h)]:[o,s]}},6768:function(l,e,t){"use strict";var n=t(6859);l.exports=r;function r(a){return new n(a)}},6504:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[0]),a[1].mul(o[1]))}},7721:function(l,e,t){"use strict";var n=t(5716);l.exports=r;function r(a){return n(a[0])*n(a[1])}},5572:function(l,e,t){"use strict";var n=t(869);l.exports=r;function r(a,o){return n(a[0].mul(o[1]).sub(a[1].mul(o[0])),a[1].mul(o[1]))}},946:function(l,e,t){"use strict";var n=t(1369),r=t(4025);l.exports=a;function a(o){var s=o[0],c=o[1];if(s.cmpn(0)===0)return 0;var m=s.abs().divmod(c.abs()),h=m.div,v=n(h),g=m.mod,i=s.negative!==c.negative?-1:1;if(g.cmpn(0)===0)return i*v;if(v){var w=r(v)+4,S=n(g.ushln(w).divRound(c));return i*(v+S*Math.pow(2,-w))}else{var M=c.bitLength()-g.bitLength()+53,S=n(g.ushln(M).divRound(c));return M<1023?i*S*Math.pow(2,-M):(S*=Math.pow(2,-1023),i*S*Math.pow(2,1023-M))}}},2478:function(l){"use strict";function e(s,c,m,h,v){for(var g=v+1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>=0?(g=i,v=i-1):h=i+1}return g}function t(s,c,m,h,v){for(var g=v+1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S>0?(g=i,v=i-1):h=i+1}return g}function n(s,c,m,h,v){for(var g=h-1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<0?(g=i,h=i+1):v=i-1}return g}function r(s,c,m,h,v){for(var g=h-1;h<=v;){var i=h+v>>>1,w=s[i],S=m!==void 0?m(w,c):w-c;S<=0?(g=i,h=i+1):v=i-1}return g}function a(s,c,m,h,v){for(;h<=v;){var g=h+v>>>1,i=s[g],w=m!==void 0?m(i,c):i-c;if(w===0)return g;w<=0?h=g+1:v=g-1}return-1}function o(s,c,m,h,v,g){return typeof m=="function"?g(s,c,m,h===void 0?0:h|0,v===void 0?s.length-1:v|0):g(s,c,void 0,m===void 0?0:m|0,h===void 0?s.length-1:h|0)}l.exports={ge:function(s,c,m,h,v){return o(s,c,m,h,v,e)},gt:function(s,c,m,h,v){return o(s,c,m,h,v,t)},lt:function(s,c,m,h,v){return o(s,c,m,h,v,n)},le:function(s,c,m,h,v){return o(s,c,m,h,v,r)},eq:function(s,c,m,h,v){return o(s,c,m,h,v,a)}}},8828:function(l,e){"use strict";"use restrict";var t=32;e.INT_BITS=t,e.INT_MAX=2147483647,e.INT_MIN=-1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},6859:function(l,e,t){l=t.nmd(l),function(n,r){"use strict";function a(F,P){if(!F)throw new Error(P||"Assertion failed")}function o(F,P){F.super_=P;var j=function(){};j.prototype=P.prototype,F.prototype=new j,F.prototype.constructor=F}function s(F,P,j){if(s.isBN(F))return F;this.negative=0,this.words=null,this.length=0,this.red=null,F!==null&&((P==="le"||P==="be")&&(j=P,P=10),this._init(F||0,P||10,j||"be"))}typeof n=="object"?n.exports=s:r.BN=s,s.BN=s,s.wordSize=26;var c;try{typeof window<"u"&&typeof window.Buffer<"u"?c=window.Buffer:c=t(7790).Buffer}catch{}s.isBN=function(P){return P instanceof s?!0:P!==null&&typeof P=="object"&&P.constructor.wordSize===s.wordSize&&Array.isArray(P.words)},s.max=function(P,j){return P.cmp(j)>0?P:j},s.min=function(P,j){return P.cmp(j)<0?P:j},s.prototype._init=function(P,j,U){if(typeof P=="number")return this._initNumber(P,j,U);if(typeof P=="object")return this._initArray(P,j,U);j==="hex"&&(j=16),a(j===(j|0)&&j>=2&&j<=36),P=P.toString().replace(/\s+/g,"");var $=0;P[0]==="-"&&($++,this.negative=1),$=0;$-=3)re=P[$]|P[$-1]<<8|P[$-2]<<16,this.words[Q]|=re<>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);else if(U==="le")for($=0,Q=0;$>>26-ne&67108863,ne+=24,ne>=26&&(ne-=26,Q++);return this.strip()};function m(F,P){var j=F.charCodeAt(P);return j>=65&&j<=70?j-55:j>=97&&j<=102?j-87:j-48&15}function h(F,P,j){var U=m(F,j);return j-1>=P&&(U|=m(F,j-1)<<4),U}s.prototype._parseHex=function(P,j,U){this.length=Math.ceil((P.length-j)/6),this.words=new Array(this.length);for(var $=0;$=j;$-=2)ne=h(P,j,$)<=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8;else{var se=P.length-j;for($=se%2===0?j+1:j;$=18?(Q-=18,re+=1,this.words[re]|=ne>>>26):Q+=8}this.strip()};function v(F,P,j,U){for(var $=0,Q=Math.min(F.length,j),re=P;re=49?$+=ne-49+10:ne>=17?$+=ne-17+10:$+=ne}return $}s.prototype._parseBase=function(P,j,U){this.words=[0],this.length=1;for(var $=0,Q=1;Q<=67108863;Q*=j)$++;$--,Q=Q/j|0;for(var re=P.length-U,ne=re%$,se=Math.min(re,re-ne)+U,G=0,X=U;X1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},s.prototype.inspect=function(){return(this.red?""};var g=["","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"],i=[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],w=[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];s.prototype.toString=function(P,j){P=P||10,j=j|0||1;var U;if(P===16||P==="hex"){U="";for(var $=0,Q=0,re=0;re>>24-$&16777215,$+=2,$>=26&&($-=26,re--),Q!==0||re!==this.length-1?U=g[6-se.length]+se+U:U=se+U}for(Q!==0&&(U=Q.toString(16)+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}if(P===(P|0)&&P>=2&&P<=36){var G=i[P],X=w[P];U="";var K=this.clone();for(K.negative=0;!K.isZero();){var H=K.modn(X).toString(P);K=K.idivn(X),K.isZero()?U=H+U:U=g[G-H.length]+H+U}for(this.isZero()&&(U="0"+U);U.length%j!==0;)U="0"+U;return this.negative!==0&&(U="-"+U),U}a(!1,"Base should be between 2 and 36")},s.prototype.toNumber=function(){var P=this.words[0];return this.length===2?P+=this.words[1]*67108864:this.length===3&&this.words[2]===1?P+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-P:P},s.prototype.toJSON=function(){return this.toString(16)},s.prototype.toBuffer=function(P,j){return a(typeof c<"u"),this.toArrayLike(c,P,j)},s.prototype.toArray=function(P,j){return this.toArrayLike(Array,P,j)},s.prototype.toArrayLike=function(P,j,U){var $=this.byteLength(),Q=U||Math.max(1,$);a($<=Q,"byte array longer than desired length"),a(Q>0,"Requested array length <= 0"),this.strip();var re=j==="le",ne=new P(Q),se,G,X=this.clone();if(re){for(G=0;!X.isZero();G++)se=X.andln(255),X.iushrn(8),ne[G]=se;for(;G=4096&&(U+=13,j>>>=13),j>=64&&(U+=7,j>>>=7),j>=8&&(U+=4,j>>>=4),j>=2&&(U+=2,j>>>=2),U+j},s.prototype._zeroBits=function(P){if(P===0)return 26;var j=P,U=0;return j&8191||(U+=13,j>>>=13),j&127||(U+=7,j>>>=7),j&15||(U+=4,j>>>=4),j&3||(U+=2,j>>>=2),j&1||U++,U},s.prototype.bitLength=function(){var P=this.words[this.length-1],j=this._countBits(P);return(this.length-1)*26+j};function S(F){for(var P=new Array(F.bitLength()),j=0;j>>$}return P}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var P=0,j=0;jP.length?this.clone().ior(P):P.clone().ior(this)},s.prototype.uor=function(P){return this.length>P.length?this.clone().iuor(P):P.clone().iuor(this)},s.prototype.iuand=function(P){var j;this.length>P.length?j=P:j=this;for(var U=0;UP.length?this.clone().iand(P):P.clone().iand(this)},s.prototype.uand=function(P){return this.length>P.length?this.clone().iuand(P):P.clone().iuand(this)},s.prototype.iuxor=function(P){var j,U;this.length>P.length?(j=this,U=P):(j=P,U=this);for(var $=0;$P.length?this.clone().ixor(P):P.clone().ixor(this)},s.prototype.uxor=function(P){return this.length>P.length?this.clone().iuxor(P):P.clone().iuxor(this)},s.prototype.inotn=function(P){a(typeof P=="number"&&P>=0);var j=Math.ceil(P/26)|0,U=P%26;this._expand(j),U>0&&j--;for(var $=0;$0&&(this.words[$]=~this.words[$]&67108863>>26-U),this.strip()},s.prototype.notn=function(P){return this.clone().inotn(P)},s.prototype.setn=function(P,j){a(typeof P=="number"&&P>=0);var U=P/26|0,$=P%26;return this._expand(U+1),j?this.words[U]=this.words[U]|1<<$:this.words[U]=this.words[U]&~(1<<$),this.strip()},s.prototype.iadd=function(P){var j;if(this.negative!==0&&P.negative===0)return this.negative=0,j=this.isub(P),this.negative^=1,this._normSign();if(this.negative===0&&P.negative!==0)return P.negative=0,j=this.isub(P),P.negative=1,j._normSign();var U,$;this.length>P.length?(U=this,$=P):(U=P,$=this);for(var Q=0,re=0;re<$.length;re++)j=(U.words[re]|0)+($.words[re]|0)+Q,this.words[re]=j&67108863,Q=j>>>26;for(;Q!==0&&re>>26;if(this.length=U.length,Q!==0)this.words[this.length]=Q,this.length++;else if(U!==this)for(;reP.length?this.clone().iadd(P):P.clone().iadd(this)},s.prototype.isub=function(P){if(P.negative!==0){P.negative=0;var j=this.iadd(P);return P.negative=1,j._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(P),this.negative=1,this._normSign();var U=this.cmp(P);if(U===0)return this.negative=0,this.length=1,this.words[0]=0,this;var $,Q;U>0?($=this,Q=P):($=P,Q=this);for(var re=0,ne=0;ne>26,this.words[ne]=j&67108863;for(;re!==0&&ne<$.length;ne++)j=($.words[ne]|0)+re,re=j>>26,this.words[ne]=j&67108863;if(re===0&&ne<$.length&&$!==this)for(;ne<$.length;ne++)this.words[ne]=$.words[ne];return this.length=Math.max(this.length,ne),$!==this&&(this.negative=1),this.strip()},s.prototype.sub=function(P){return this.clone().isub(P)};function M(F,P,j){j.negative=P.negative^F.negative;var U=F.length+P.length|0;j.length=U,U=U-1|0;var $=F.words[0]|0,Q=P.words[0]|0,re=$*Q,ne=re&67108863,se=re/67108864|0;j.words[0]=ne;for(var G=1;G>>26,K=se&67108863,H=Math.min(G,P.length-1),Y=Math.max(0,G-F.length+1);Y<=H;Y++){var q=G-Y|0;$=F.words[q]|0,Q=P.words[Y]|0,re=$*Q+K,X+=re/67108864|0,K=re&67108863}j.words[G]=K|0,se=X|0}return se!==0?j.words[G]=se|0:j.length--,j.strip()}var C=function(P,j,U){var $=P.words,Q=j.words,re=U.words,ne=0,se,G,X,K=$[0]|0,H=K&8191,Y=K>>>13,q=$[1]|0,Z=q&8191,ee=q>>>13,ae=$[2]|0,he=ae&8191,xe=ae>>>13,we=$[3]|0,Me=we&8191,Se=we>>>13,Ie=$[4]|0,Ve=Ie&8191,Ge=Ie>>>13,ke=$[5]|0,_e=ke&8191,ce=ke>>>13,ve=$[6]|0,le=ve&8191,Ae=ve>>>13,Be=$[7]|0,Xe=Be&8191,Ye=Be>>>13,yt=$[8]|0,gt=yt&8191,Tt=yt>>>13,At=$[9]|0,$t=At&8191,rr=At>>>13,_r=Q[0]|0,Xt=_r&8191,or=_r>>>13,Ot=Q[1]|0,vt=Ot&8191,ht=Ot>>>13,De=Q[2]|0,Ne=De&8191,We=De>>>13,Ke=Q[3]|0,Je=Ke&8191,et=Ke>>>13,Mt=Q[4]|0,pt=Mt&8191,Pt=Mt>>>13,Ct=Q[5]|0,qt=Ct&8191,Vt=Ct>>>13,Ht=Q[6]|0,Sr=Ht&8191,Kr=Ht>>>13,Yt=Q[7]|0,Rt=Yt&8191,nr=Yt>>>13,ur=Q[8]|0,cr=ur&8191,Rr=ur>>>13,Qr=Q[9]|0,Zr=Qr&8191,ha=Qr>>>13;U.negative=P.negative^j.negative,U.length=19,se=Math.imul(H,Xt),G=Math.imul(H,or),G=G+Math.imul(Y,Xt)|0,X=Math.imul(Y,or);var Pa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Pa>>>26)|0,Pa&=67108863,se=Math.imul(Z,Xt),G=Math.imul(Z,or),G=G+Math.imul(ee,Xt)|0,X=Math.imul(ee,or),se=se+Math.imul(H,vt)|0,G=G+Math.imul(H,ht)|0,G=G+Math.imul(Y,vt)|0,X=X+Math.imul(Y,ht)|0;var La=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(La>>>26)|0,La&=67108863,se=Math.imul(he,Xt),G=Math.imul(he,or),G=G+Math.imul(xe,Xt)|0,X=Math.imul(xe,or),se=se+Math.imul(Z,vt)|0,G=G+Math.imul(Z,ht)|0,G=G+Math.imul(ee,vt)|0,X=X+Math.imul(ee,ht)|0,se=se+Math.imul(H,Ne)|0,G=G+Math.imul(H,We)|0,G=G+Math.imul(Y,Ne)|0,X=X+Math.imul(Y,We)|0;var un=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(un>>>26)|0,un&=67108863,se=Math.imul(Me,Xt),G=Math.imul(Me,or),G=G+Math.imul(Se,Xt)|0,X=Math.imul(Se,or),se=se+Math.imul(he,vt)|0,G=G+Math.imul(he,ht)|0,G=G+Math.imul(xe,vt)|0,X=X+Math.imul(xe,ht)|0,se=se+Math.imul(Z,Ne)|0,G=G+Math.imul(Z,We)|0,G=G+Math.imul(ee,Ne)|0,X=X+Math.imul(ee,We)|0,se=se+Math.imul(H,Je)|0,G=G+Math.imul(H,et)|0,G=G+Math.imul(Y,Je)|0,X=X+Math.imul(Y,et)|0;var Xa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Xa>>>26)|0,Xa&=67108863,se=Math.imul(Ve,Xt),G=Math.imul(Ve,or),G=G+Math.imul(Ge,Xt)|0,X=Math.imul(Ge,or),se=se+Math.imul(Me,vt)|0,G=G+Math.imul(Me,ht)|0,G=G+Math.imul(Se,vt)|0,X=X+Math.imul(Se,ht)|0,se=se+Math.imul(he,Ne)|0,G=G+Math.imul(he,We)|0,G=G+Math.imul(xe,Ne)|0,X=X+Math.imul(xe,We)|0,se=se+Math.imul(Z,Je)|0,G=G+Math.imul(Z,et)|0,G=G+Math.imul(ee,Je)|0,X=X+Math.imul(ee,et)|0,se=se+Math.imul(H,pt)|0,G=G+Math.imul(H,Pt)|0,G=G+Math.imul(Y,pt)|0,X=X+Math.imul(Y,Pt)|0;var ja=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(ja>>>26)|0,ja&=67108863,se=Math.imul(_e,Xt),G=Math.imul(_e,or),G=G+Math.imul(ce,Xt)|0,X=Math.imul(ce,or),se=se+Math.imul(Ve,vt)|0,G=G+Math.imul(Ve,ht)|0,G=G+Math.imul(Ge,vt)|0,X=X+Math.imul(Ge,ht)|0,se=se+Math.imul(Me,Ne)|0,G=G+Math.imul(Me,We)|0,G=G+Math.imul(Se,Ne)|0,X=X+Math.imul(Se,We)|0,se=se+Math.imul(he,Je)|0,G=G+Math.imul(he,et)|0,G=G+Math.imul(xe,Je)|0,X=X+Math.imul(xe,et)|0,se=se+Math.imul(Z,pt)|0,G=G+Math.imul(Z,Pt)|0,G=G+Math.imul(ee,pt)|0,X=X+Math.imul(ee,Pt)|0,se=se+Math.imul(H,qt)|0,G=G+Math.imul(H,Vt)|0,G=G+Math.imul(Y,qt)|0,X=X+Math.imul(Y,Vt)|0;var Nn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Nn>>>26)|0,Nn&=67108863,se=Math.imul(le,Xt),G=Math.imul(le,or),G=G+Math.imul(Ae,Xt)|0,X=Math.imul(Ae,or),se=se+Math.imul(_e,vt)|0,G=G+Math.imul(_e,ht)|0,G=G+Math.imul(ce,vt)|0,X=X+Math.imul(ce,ht)|0,se=se+Math.imul(Ve,Ne)|0,G=G+Math.imul(Ve,We)|0,G=G+Math.imul(Ge,Ne)|0,X=X+Math.imul(Ge,We)|0,se=se+Math.imul(Me,Je)|0,G=G+Math.imul(Me,et)|0,G=G+Math.imul(Se,Je)|0,X=X+Math.imul(Se,et)|0,se=se+Math.imul(he,pt)|0,G=G+Math.imul(he,Pt)|0,G=G+Math.imul(xe,pt)|0,X=X+Math.imul(xe,Pt)|0,se=se+Math.imul(Z,qt)|0,G=G+Math.imul(Z,Vt)|0,G=G+Math.imul(ee,qt)|0,X=X+Math.imul(ee,Vt)|0,se=se+Math.imul(H,Sr)|0,G=G+Math.imul(H,Kr)|0,G=G+Math.imul(Y,Sr)|0,X=X+Math.imul(Y,Kr)|0;var yn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(yn>>>26)|0,yn&=67108863,se=Math.imul(Xe,Xt),G=Math.imul(Xe,or),G=G+Math.imul(Ye,Xt)|0,X=Math.imul(Ye,or),se=se+Math.imul(le,vt)|0,G=G+Math.imul(le,ht)|0,G=G+Math.imul(Ae,vt)|0,X=X+Math.imul(Ae,ht)|0,se=se+Math.imul(_e,Ne)|0,G=G+Math.imul(_e,We)|0,G=G+Math.imul(ce,Ne)|0,X=X+Math.imul(ce,We)|0,se=se+Math.imul(Ve,Je)|0,G=G+Math.imul(Ve,et)|0,G=G+Math.imul(Ge,Je)|0,X=X+Math.imul(Ge,et)|0,se=se+Math.imul(Me,pt)|0,G=G+Math.imul(Me,Pt)|0,G=G+Math.imul(Se,pt)|0,X=X+Math.imul(Se,Pt)|0,se=se+Math.imul(he,qt)|0,G=G+Math.imul(he,Vt)|0,G=G+Math.imul(xe,qt)|0,X=X+Math.imul(xe,Vt)|0,se=se+Math.imul(Z,Sr)|0,G=G+Math.imul(Z,Kr)|0,G=G+Math.imul(ee,Sr)|0,X=X+Math.imul(ee,Kr)|0,se=se+Math.imul(H,Rt)|0,G=G+Math.imul(H,nr)|0,G=G+Math.imul(Y,Rt)|0,X=X+Math.imul(Y,nr)|0;var Un=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Un>>>26)|0,Un&=67108863,se=Math.imul(gt,Xt),G=Math.imul(gt,or),G=G+Math.imul(Tt,Xt)|0,X=Math.imul(Tt,or),se=se+Math.imul(Xe,vt)|0,G=G+Math.imul(Xe,ht)|0,G=G+Math.imul(Ye,vt)|0,X=X+Math.imul(Ye,ht)|0,se=se+Math.imul(le,Ne)|0,G=G+Math.imul(le,We)|0,G=G+Math.imul(Ae,Ne)|0,X=X+Math.imul(Ae,We)|0,se=se+Math.imul(_e,Je)|0,G=G+Math.imul(_e,et)|0,G=G+Math.imul(ce,Je)|0,X=X+Math.imul(ce,et)|0,se=se+Math.imul(Ve,pt)|0,G=G+Math.imul(Ve,Pt)|0,G=G+Math.imul(Ge,pt)|0,X=X+Math.imul(Ge,Pt)|0,se=se+Math.imul(Me,qt)|0,G=G+Math.imul(Me,Vt)|0,G=G+Math.imul(Se,qt)|0,X=X+Math.imul(Se,Vt)|0,se=se+Math.imul(he,Sr)|0,G=G+Math.imul(he,Kr)|0,G=G+Math.imul(xe,Sr)|0,X=X+Math.imul(xe,Kr)|0,se=se+Math.imul(Z,Rt)|0,G=G+Math.imul(Z,nr)|0,G=G+Math.imul(ee,Rt)|0,X=X+Math.imul(ee,nr)|0,se=se+Math.imul(H,cr)|0,G=G+Math.imul(H,Rr)|0,G=G+Math.imul(Y,cr)|0,X=X+Math.imul(Y,Rr)|0;var li=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(li>>>26)|0,li&=67108863,se=Math.imul($t,Xt),G=Math.imul($t,or),G=G+Math.imul(rr,Xt)|0,X=Math.imul(rr,or),se=se+Math.imul(gt,vt)|0,G=G+Math.imul(gt,ht)|0,G=G+Math.imul(Tt,vt)|0,X=X+Math.imul(Tt,ht)|0,se=se+Math.imul(Xe,Ne)|0,G=G+Math.imul(Xe,We)|0,G=G+Math.imul(Ye,Ne)|0,X=X+Math.imul(Ye,We)|0,se=se+Math.imul(le,Je)|0,G=G+Math.imul(le,et)|0,G=G+Math.imul(Ae,Je)|0,X=X+Math.imul(Ae,et)|0,se=se+Math.imul(_e,pt)|0,G=G+Math.imul(_e,Pt)|0,G=G+Math.imul(ce,pt)|0,X=X+Math.imul(ce,Pt)|0,se=se+Math.imul(Ve,qt)|0,G=G+Math.imul(Ve,Vt)|0,G=G+Math.imul(Ge,qt)|0,X=X+Math.imul(Ge,Vt)|0,se=se+Math.imul(Me,Sr)|0,G=G+Math.imul(Me,Kr)|0,G=G+Math.imul(Se,Sr)|0,X=X+Math.imul(Se,Kr)|0,se=se+Math.imul(he,Rt)|0,G=G+Math.imul(he,nr)|0,G=G+Math.imul(xe,Rt)|0,X=X+Math.imul(xe,nr)|0,se=se+Math.imul(Z,cr)|0,G=G+Math.imul(Z,Rr)|0,G=G+Math.imul(ee,cr)|0,X=X+Math.imul(ee,Rr)|0,se=se+Math.imul(H,Zr)|0,G=G+Math.imul(H,ha)|0,G=G+Math.imul(Y,Zr)|0,X=X+Math.imul(Y,ha)|0;var Yn=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Yn>>>26)|0,Yn&=67108863,se=Math.imul($t,vt),G=Math.imul($t,ht),G=G+Math.imul(rr,vt)|0,X=Math.imul(rr,ht),se=se+Math.imul(gt,Ne)|0,G=G+Math.imul(gt,We)|0,G=G+Math.imul(Tt,Ne)|0,X=X+Math.imul(Tt,We)|0,se=se+Math.imul(Xe,Je)|0,G=G+Math.imul(Xe,et)|0,G=G+Math.imul(Ye,Je)|0,X=X+Math.imul(Ye,et)|0,se=se+Math.imul(le,pt)|0,G=G+Math.imul(le,Pt)|0,G=G+Math.imul(Ae,pt)|0,X=X+Math.imul(Ae,Pt)|0,se=se+Math.imul(_e,qt)|0,G=G+Math.imul(_e,Vt)|0,G=G+Math.imul(ce,qt)|0,X=X+Math.imul(ce,Vt)|0,se=se+Math.imul(Ve,Sr)|0,G=G+Math.imul(Ve,Kr)|0,G=G+Math.imul(Ge,Sr)|0,X=X+Math.imul(Ge,Kr)|0,se=se+Math.imul(Me,Rt)|0,G=G+Math.imul(Me,nr)|0,G=G+Math.imul(Se,Rt)|0,X=X+Math.imul(Se,nr)|0,se=se+Math.imul(he,cr)|0,G=G+Math.imul(he,Rr)|0,G=G+Math.imul(xe,cr)|0,X=X+Math.imul(xe,Rr)|0,se=se+Math.imul(Z,Zr)|0,G=G+Math.imul(Z,ha)|0,G=G+Math.imul(ee,Zr)|0,X=X+Math.imul(ee,ha)|0;var on=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(on>>>26)|0,on&=67108863,se=Math.imul($t,Ne),G=Math.imul($t,We),G=G+Math.imul(rr,Ne)|0,X=Math.imul(rr,We),se=se+Math.imul(gt,Je)|0,G=G+Math.imul(gt,et)|0,G=G+Math.imul(Tt,Je)|0,X=X+Math.imul(Tt,et)|0,se=se+Math.imul(Xe,pt)|0,G=G+Math.imul(Xe,Pt)|0,G=G+Math.imul(Ye,pt)|0,X=X+Math.imul(Ye,Pt)|0,se=se+Math.imul(le,qt)|0,G=G+Math.imul(le,Vt)|0,G=G+Math.imul(Ae,qt)|0,X=X+Math.imul(Ae,Vt)|0,se=se+Math.imul(_e,Sr)|0,G=G+Math.imul(_e,Kr)|0,G=G+Math.imul(ce,Sr)|0,X=X+Math.imul(ce,Kr)|0,se=se+Math.imul(Ve,Rt)|0,G=G+Math.imul(Ve,nr)|0,G=G+Math.imul(Ge,Rt)|0,X=X+Math.imul(Ge,nr)|0,se=se+Math.imul(Me,cr)|0,G=G+Math.imul(Me,Rr)|0,G=G+Math.imul(Se,cr)|0,X=X+Math.imul(Se,Rr)|0,se=se+Math.imul(he,Zr)|0,G=G+Math.imul(he,ha)|0,G=G+Math.imul(xe,Zr)|0,X=X+Math.imul(xe,ha)|0;var en=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(en>>>26)|0,en&=67108863,se=Math.imul($t,Je),G=Math.imul($t,et),G=G+Math.imul(rr,Je)|0,X=Math.imul(rr,et),se=se+Math.imul(gt,pt)|0,G=G+Math.imul(gt,Pt)|0,G=G+Math.imul(Tt,pt)|0,X=X+Math.imul(Tt,Pt)|0,se=se+Math.imul(Xe,qt)|0,G=G+Math.imul(Xe,Vt)|0,G=G+Math.imul(Ye,qt)|0,X=X+Math.imul(Ye,Vt)|0,se=se+Math.imul(le,Sr)|0,G=G+Math.imul(le,Kr)|0,G=G+Math.imul(Ae,Sr)|0,X=X+Math.imul(Ae,Kr)|0,se=se+Math.imul(_e,Rt)|0,G=G+Math.imul(_e,nr)|0,G=G+Math.imul(ce,Rt)|0,X=X+Math.imul(ce,nr)|0,se=se+Math.imul(Ve,cr)|0,G=G+Math.imul(Ve,Rr)|0,G=G+Math.imul(Ge,cr)|0,X=X+Math.imul(Ge,Rr)|0,se=se+Math.imul(Me,Zr)|0,G=G+Math.imul(Me,ha)|0,G=G+Math.imul(Se,Zr)|0,X=X+Math.imul(Se,ha)|0;var vi=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(vi>>>26)|0,vi&=67108863,se=Math.imul($t,pt),G=Math.imul($t,Pt),G=G+Math.imul(rr,pt)|0,X=Math.imul(rr,Pt),se=se+Math.imul(gt,qt)|0,G=G+Math.imul(gt,Vt)|0,G=G+Math.imul(Tt,qt)|0,X=X+Math.imul(Tt,Vt)|0,se=se+Math.imul(Xe,Sr)|0,G=G+Math.imul(Xe,Kr)|0,G=G+Math.imul(Ye,Sr)|0,X=X+Math.imul(Ye,Kr)|0,se=se+Math.imul(le,Rt)|0,G=G+Math.imul(le,nr)|0,G=G+Math.imul(Ae,Rt)|0,X=X+Math.imul(Ae,nr)|0,se=se+Math.imul(_e,cr)|0,G=G+Math.imul(_e,Rr)|0,G=G+Math.imul(ce,cr)|0,X=X+Math.imul(ce,Rr)|0,se=se+Math.imul(Ve,Zr)|0,G=G+Math.imul(Ve,ha)|0,G=G+Math.imul(Ge,Zr)|0,X=X+Math.imul(Ge,ha)|0;var Yi=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Yi>>>26)|0,Yi&=67108863,se=Math.imul($t,qt),G=Math.imul($t,Vt),G=G+Math.imul(rr,qt)|0,X=Math.imul(rr,Vt),se=se+Math.imul(gt,Sr)|0,G=G+Math.imul(gt,Kr)|0,G=G+Math.imul(Tt,Sr)|0,X=X+Math.imul(Tt,Kr)|0,se=se+Math.imul(Xe,Rt)|0,G=G+Math.imul(Xe,nr)|0,G=G+Math.imul(Ye,Rt)|0,X=X+Math.imul(Ye,nr)|0,se=se+Math.imul(le,cr)|0,G=G+Math.imul(le,Rr)|0,G=G+Math.imul(Ae,cr)|0,X=X+Math.imul(Ae,Rr)|0,se=se+Math.imul(_e,Zr)|0,G=G+Math.imul(_e,ha)|0,G=G+Math.imul(ce,Zr)|0,X=X+Math.imul(ce,ha)|0;var Ja=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Ja>>>26)|0,Ja&=67108863,se=Math.imul($t,Sr),G=Math.imul($t,Kr),G=G+Math.imul(rr,Sr)|0,X=Math.imul(rr,Kr),se=se+Math.imul(gt,Rt)|0,G=G+Math.imul(gt,nr)|0,G=G+Math.imul(Tt,Rt)|0,X=X+Math.imul(Tt,nr)|0,se=se+Math.imul(Xe,cr)|0,G=G+Math.imul(Xe,Rr)|0,G=G+Math.imul(Ye,cr)|0,X=X+Math.imul(Ye,Rr)|0,se=se+Math.imul(le,Zr)|0,G=G+Math.imul(le,ha)|0,G=G+Math.imul(Ae,Zr)|0,X=X+Math.imul(Ae,ha)|0;var Oa=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(Oa>>>26)|0,Oa&=67108863,se=Math.imul($t,Rt),G=Math.imul($t,nr),G=G+Math.imul(rr,Rt)|0,X=Math.imul(rr,nr),se=se+Math.imul(gt,cr)|0,G=G+Math.imul(gt,Rr)|0,G=G+Math.imul(Tt,cr)|0,X=X+Math.imul(Tt,Rr)|0,se=se+Math.imul(Xe,Zr)|0,G=G+Math.imul(Xe,ha)|0,G=G+Math.imul(Ye,Zr)|0,X=X+Math.imul(Ye,ha)|0;var lt=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(lt>>>26)|0,lt&=67108863,se=Math.imul($t,cr),G=Math.imul($t,Rr),G=G+Math.imul(rr,cr)|0,X=Math.imul(rr,Rr),se=se+Math.imul(gt,Zr)|0,G=G+Math.imul(gt,ha)|0,G=G+Math.imul(Tt,Zr)|0,X=X+Math.imul(Tt,ha)|0;var rt=(ne+se|0)+((G&8191)<<13)|0;ne=(X+(G>>>13)|0)+(rt>>>26)|0,rt&=67108863,se=Math.imul($t,Zr),G=Math.imul($t,ha),G=G+Math.imul(rr,Zr)|0,X=Math.imul(rr,ha);var fr=(ne+se|0)+((G&8191)<<13)|0;return ne=(X+(G>>>13)|0)+(fr>>>26)|0,fr&=67108863,re[0]=Pa,re[1]=La,re[2]=un,re[3]=Xa,re[4]=ja,re[5]=Nn,re[6]=yn,re[7]=Un,re[8]=li,re[9]=Yn,re[10]=on,re[11]=en,re[12]=vi,re[13]=Yi,re[14]=Ja,re[15]=Oa,re[16]=lt,re[17]=rt,re[18]=fr,ne!==0&&(re[19]=ne,U.length++),U};Math.imul||(C=M);function _(F,P,j){j.negative=P.negative^F.negative,j.length=F.length+P.length;for(var U=0,$=0,Q=0;Q>>26)|0,$+=re>>>26,re&=67108863}j.words[Q]=ne,U=re,re=$}return U!==0?j.words[Q]=U:j.length--,j.strip()}function T(F,P,j){var U=new f;return U.mulp(F,P,j)}s.prototype.mulTo=function(P,j){var U,$=this.length+P.length;return this.length===10&&P.length===10?U=C(this,P,j):$<63?U=M(this,P,j):$<1024?U=_(this,P,j):U=T(this,P,j),U};function f(F,P){this.x=F,this.y=P}f.prototype.makeRBT=function(P){for(var j=new Array(P),U=s.prototype._countBits(P)-1,$=0;$>=1;return $},f.prototype.permute=function(P,j,U,$,Q,re){for(var ne=0;ne>>1)Q++;return 1<>>13,U[2*re+1]=Q&8191,Q=Q>>>13;for(re=2*j;re<$;++re)U[re]=0;a(Q===0),a((Q&-8192)===0)},f.prototype.stub=function(P){for(var j=new Array(P),U=0;U>=26,j+=$/67108864|0,j+=Q>>>26,this.words[U]=Q&67108863}return j!==0&&(this.words[U]=j,this.length++),this.length=P===0?1:this.length,this},s.prototype.muln=function(P){return this.clone().imuln(P)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(P){var j=S(P);if(j.length===0)return new s(1);for(var U=this,$=0;$=0);var j=P%26,U=(P-j)/26,$=67108863>>>26-j<<26-j,Q;if(j!==0){var re=0;for(Q=0;Q>>26-j}re&&(this.words[Q]=re,this.length++)}if(U!==0){for(Q=this.length-1;Q>=0;Q--)this.words[Q+U]=this.words[Q];for(Q=0;Q=0);var $;j?$=(j-j%26)/26:$=0;var Q=P%26,re=Math.min((P-Q)/26,this.length),ne=67108863^67108863>>>Q<re)for(this.length-=re,G=0;G=0&&(X!==0||G>=$);G--){var K=this.words[G]|0;this.words[G]=X<<26-Q|K>>>Q,X=K&ne}return se&&X!==0&&(se.words[se.length++]=X),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},s.prototype.ishrn=function(P,j,U){return a(this.negative===0),this.iushrn(P,j,U)},s.prototype.shln=function(P){return this.clone().ishln(P)},s.prototype.ushln=function(P){return this.clone().iushln(P)},s.prototype.shrn=function(P){return this.clone().ishrn(P)},s.prototype.ushrn=function(P){return this.clone().iushrn(P)},s.prototype.testn=function(P){a(typeof P=="number"&&P>=0);var j=P%26,U=(P-j)/26,$=1<=0);var j=P%26,U=(P-j)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=U)return this;if(j!==0&&U++,this.length=Math.min(U,this.length),j!==0){var $=67108863^67108863>>>j<=67108864;j++)this.words[j]-=67108864,j===this.length-1?this.words[j+1]=1:this.words[j+1]++;return this.length=Math.max(this.length,j+1),this},s.prototype.isubn=function(P){if(a(typeof P=="number"),a(P<67108864),P<0)return this.iaddn(-P);if(this.negative!==0)return this.negative=0,this.iaddn(P),this.negative=1,this;if(this.words[0]-=P,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var j=0;j>26)-(se/67108864|0),this.words[Q+U]=re&67108863}for(;Q>26,this.words[Q+U]=re&67108863;if(ne===0)return this.strip();for(a(ne===-1),ne=0,Q=0;Q>26,this.words[Q]=re&67108863;return this.negative=1,this.strip()},s.prototype._wordDiv=function(P,j){var U=this.length-P.length,$=this.clone(),Q=P,re=Q.words[Q.length-1]|0,ne=this._countBits(re);U=26-ne,U!==0&&(Q=Q.ushln(U),$.iushln(U),re=Q.words[Q.length-1]|0);var se=$.length-Q.length,G;if(j!=="mod"){G=new s(null),G.length=se+1,G.words=new Array(G.length);for(var X=0;X=0;H--){var Y=($.words[Q.length+H]|0)*67108864+($.words[Q.length+H-1]|0);for(Y=Math.min(Y/re|0,67108863),$._ishlnsubmul(Q,Y,H);$.negative!==0;)Y--,$.negative=0,$._ishlnsubmul(Q,1,H),$.isZero()||($.negative^=1);G&&(G.words[H]=Y)}return G&&G.strip(),$.strip(),j!=="div"&&U!==0&&$.iushrn(U),{div:G||null,mod:$}},s.prototype.divmod=function(P,j,U){if(a(!P.isZero()),this.isZero())return{div:new s(0),mod:new s(0)};var $,Q,re;return this.negative!==0&&P.negative===0?(re=this.neg().divmod(P,j),j!=="mod"&&($=re.div.neg()),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.iadd(P)),{div:$,mod:Q}):this.negative===0&&P.negative!==0?(re=this.divmod(P.neg(),j),j!=="mod"&&($=re.div.neg()),{div:$,mod:re.mod}):this.negative&P.negative?(re=this.neg().divmod(P.neg(),j),j!=="div"&&(Q=re.mod.neg(),U&&Q.negative!==0&&Q.isub(P)),{div:re.div,mod:Q}):P.length>this.length||this.cmp(P)<0?{div:new s(0),mod:this}:P.length===1?j==="div"?{div:this.divn(P.words[0]),mod:null}:j==="mod"?{div:null,mod:new s(this.modn(P.words[0]))}:{div:this.divn(P.words[0]),mod:new s(this.modn(P.words[0]))}:this._wordDiv(P,j)},s.prototype.div=function(P){return this.divmod(P,"div",!1).div},s.prototype.mod=function(P){return this.divmod(P,"mod",!1).mod},s.prototype.umod=function(P){return this.divmod(P,"mod",!0).mod},s.prototype.divRound=function(P){var j=this.divmod(P);if(j.mod.isZero())return j.div;var U=j.div.negative!==0?j.mod.isub(P):j.mod,$=P.ushrn(1),Q=P.andln(1),re=U.cmp($);return re<0||Q===1&&re===0?j.div:j.div.negative!==0?j.div.isubn(1):j.div.iaddn(1)},s.prototype.modn=function(P){a(P<=67108863);for(var j=(1<<26)%P,U=0,$=this.length-1;$>=0;$--)U=(j*U+(this.words[$]|0))%P;return U},s.prototype.idivn=function(P){a(P<=67108863);for(var j=0,U=this.length-1;U>=0;U--){var $=(this.words[U]|0)+j*67108864;this.words[U]=$/P|0,j=$%P}return this.strip()},s.prototype.divn=function(P){return this.clone().idivn(P)},s.prototype.egcd=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var $=new s(1),Q=new s(0),re=new s(0),ne=new s(1),se=0;j.isEven()&&U.isEven();)j.iushrn(1),U.iushrn(1),++se;for(var G=U.clone(),X=j.clone();!j.isZero();){for(var K=0,H=1;!(j.words[0]&H)&&K<26;++K,H<<=1);if(K>0)for(j.iushrn(K);K-- >0;)($.isOdd()||Q.isOdd())&&($.iadd(G),Q.isub(X)),$.iushrn(1),Q.iushrn(1);for(var Y=0,q=1;!(U.words[0]&q)&&Y<26;++Y,q<<=1);if(Y>0)for(U.iushrn(Y);Y-- >0;)(re.isOdd()||ne.isOdd())&&(re.iadd(G),ne.isub(X)),re.iushrn(1),ne.iushrn(1);j.cmp(U)>=0?(j.isub(U),$.isub(re),Q.isub(ne)):(U.isub(j),re.isub($),ne.isub(Q))}return{a:re,b:ne,gcd:U.iushln(se)}},s.prototype._invmp=function(P){a(P.negative===0),a(!P.isZero());var j=this,U=P.clone();j.negative!==0?j=j.umod(P):j=j.clone();for(var $=new s(1),Q=new s(0),re=U.clone();j.cmpn(1)>0&&U.cmpn(1)>0;){for(var ne=0,se=1;!(j.words[0]&se)&&ne<26;++ne,se<<=1);if(ne>0)for(j.iushrn(ne);ne-- >0;)$.isOdd()&&$.iadd(re),$.iushrn(1);for(var G=0,X=1;!(U.words[0]&X)&&G<26;++G,X<<=1);if(G>0)for(U.iushrn(G);G-- >0;)Q.isOdd()&&Q.iadd(re),Q.iushrn(1);j.cmp(U)>=0?(j.isub(U),$.isub(Q)):(U.isub(j),Q.isub($))}var K;return j.cmpn(1)===0?K=$:K=Q,K.cmpn(0)<0&&K.iadd(P),K},s.prototype.gcd=function(P){if(this.isZero())return P.abs();if(P.isZero())return this.abs();var j=this.clone(),U=P.clone();j.negative=0,U.negative=0;for(var $=0;j.isEven()&&U.isEven();$++)j.iushrn(1),U.iushrn(1);do{for(;j.isEven();)j.iushrn(1);for(;U.isEven();)U.iushrn(1);var Q=j.cmp(U);if(Q<0){var re=j;j=U,U=re}else if(Q===0||U.cmpn(1)===0)break;j.isub(U)}while(!0);return U.iushln($)},s.prototype.invm=function(P){return this.egcd(P).a.umod(P)},s.prototype.isEven=function(){return(this.words[0]&1)===0},s.prototype.isOdd=function(){return(this.words[0]&1)===1},s.prototype.andln=function(P){return this.words[0]&P},s.prototype.bincn=function(P){a(typeof P=="number");var j=P%26,U=(P-j)/26,$=1<>>26,ne&=67108863,this.words[re]=ne}return Q!==0&&(this.words[re]=Q,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(P){var j=P<0;if(this.negative!==0&&!j)return-1;if(this.negative===0&&j)return 1;this.strip();var U;if(this.length>1)U=1;else{j&&(P=-P),a(P<=67108863,"Number is too big");var $=this.words[0]|0;U=$===P?0:$P.length)return 1;if(this.length=0;U--){var $=this.words[U]|0,Q=P.words[U]|0;if($!==Q){$Q&&(j=1);break}}return j},s.prototype.gtn=function(P){return this.cmpn(P)===1},s.prototype.gt=function(P){return this.cmp(P)===1},s.prototype.gten=function(P){return this.cmpn(P)>=0},s.prototype.gte=function(P){return this.cmp(P)>=0},s.prototype.ltn=function(P){return this.cmpn(P)===-1},s.prototype.lt=function(P){return this.cmp(P)===-1},s.prototype.lten=function(P){return this.cmpn(P)<=0},s.prototype.lte=function(P){return this.cmp(P)<=0},s.prototype.eqn=function(P){return this.cmpn(P)===0},s.prototype.eq=function(P){return this.cmp(P)===0},s.red=function(P){return new D(P)},s.prototype.toRed=function(P){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),P.convertTo(this)._forceRed(P)},s.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(P){return this.red=P,this},s.prototype.forceRed=function(P){return a(!this.red,"Already a number in reduction context"),this._forceRed(P)},s.prototype.redAdd=function(P){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,P)},s.prototype.redIAdd=function(P){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,P)},s.prototype.redSub=function(P){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,P)},s.prototype.redISub=function(P){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,P)},s.prototype.redShl=function(P){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,P)},s.prototype.redMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.mul(this,P)},s.prototype.redIMul=function(P){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,P),this.red.imul(this,P)},s.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(P){return a(this.red&&!P.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,P)};var u={k256:null,p224:null,p192:null,p25519:null};function A(F,P){this.name=F,this.p=new s(P,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}A.prototype._tmp=function(){var P=new s(null);return P.words=new Array(Math.ceil(this.n/13)),P},A.prototype.ireduce=function(P){var j=P,U;do this.split(j,this.tmp),j=this.imulK(j),j=j.iadd(this.tmp),U=j.bitLength();while(U>this.n);var $=U0?j.isub(this.p):j.strip!==void 0?j.strip():j._strip(),j},A.prototype.split=function(P,j){P.iushrn(this.n,0,j)},A.prototype.imulK=function(P){return P.imul(this.k)};function x(){A.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}o(x,A),x.prototype.split=function(P,j){for(var U=4194303,$=Math.min(P.length,9),Q=0;Q<$;Q++)j.words[Q]=P.words[Q];if(j.length=$,P.length<=9){P.words[0]=0,P.length=1;return}var re=P.words[9];for(j.words[j.length++]=re&U,Q=10;Q>>22,re=ne}re>>>=22,P.words[Q-10]=re,re===0&&P.length>10?P.length-=10:P.length-=9},x.prototype.imulK=function(P){P.words[P.length]=0,P.words[P.length+1]=0,P.length+=2;for(var j=0,U=0;U>>=26,P.words[U]=Q,j=$}return j!==0&&(P.words[P.length++]=j),P},s._prime=function(P){if(u[P])return u[P];var j;if(P==="k256")j=new x;else if(P==="p224")j=new z;else if(P==="p192")j=new I;else if(P==="p25519")j=new O;else throw new Error("Unknown prime "+P);return u[P]=j,j};function D(F){if(typeof F=="string"){var P=s._prime(F);this.m=P.p,this.prime=P}else a(F.gtn(1),"modulus must be greater than 1"),this.m=F,this.prime=null}D.prototype._verify1=function(P){a(P.negative===0,"red works only with positives"),a(P.red,"red works only with red numbers")},D.prototype._verify2=function(P,j){a((P.negative|j.negative)===0,"red works only with positives"),a(P.red&&P.red===j.red,"red works only with red numbers")},D.prototype.imod=function(P){return this.prime?this.prime.ireduce(P)._forceRed(this):P.umod(this.m)._forceRed(this)},D.prototype.neg=function(P){return P.isZero()?P.clone():this.m.sub(P)._forceRed(this)},D.prototype.add=function(P,j){this._verify2(P,j);var U=P.add(j);return U.cmp(this.m)>=0&&U.isub(this.m),U._forceRed(this)},D.prototype.iadd=function(P,j){this._verify2(P,j);var U=P.iadd(j);return U.cmp(this.m)>=0&&U.isub(this.m),U},D.prototype.sub=function(P,j){this._verify2(P,j);var U=P.sub(j);return U.cmpn(0)<0&&U.iadd(this.m),U._forceRed(this)},D.prototype.isub=function(P,j){this._verify2(P,j);var U=P.isub(j);return U.cmpn(0)<0&&U.iadd(this.m),U},D.prototype.shl=function(P,j){return this._verify1(P),this.imod(P.ushln(j))},D.prototype.imul=function(P,j){return this._verify2(P,j),this.imod(P.imul(j))},D.prototype.mul=function(P,j){return this._verify2(P,j),this.imod(P.mul(j))},D.prototype.isqr=function(P){return this.imul(P,P.clone())},D.prototype.sqr=function(P){return this.mul(P,P)},D.prototype.sqrt=function(P){if(P.isZero())return P.clone();var j=this.m.andln(3);if(a(j%2===1),j===3){var U=this.m.add(new s(1)).iushrn(2);return this.pow(P,U)}for(var $=this.m.subn(1),Q=0;!$.isZero()&&$.andln(1)===0;)Q++,$.iushrn(1);a(!$.isZero());var re=new s(1).toRed(this),ne=re.redNeg(),se=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new s(2*G*G).toRed(this);this.pow(G,se).cmp(ne)!==0;)G.redIAdd(ne);for(var X=this.pow(G,$),K=this.pow(P,$.addn(1).iushrn(1)),H=this.pow(P,$),Y=Q;H.cmp(re)!==0;){for(var q=H,Z=0;q.cmp(re)!==0;Z++)q=q.redSqr();a(Z=0;Q--){for(var X=j.words[Q],K=G-1;K>=0;K--){var H=X>>K&1;if(re!==$[0]&&(re=this.sqr(re)),H===0&&ne===0){se=0;continue}ne<<=1,ne|=H,se++,!(se!==U&&(Q!==0||K!==0))&&(re=this.mul(re,$[ne]),se=0,ne=0)}G=26}return re},D.prototype.convertTo=function(P){var j=P.umod(this.m);return j===P?j.clone():j},D.prototype.convertFrom=function(P){var j=P.clone();return j.red=null,j},s.mont=function(P){return new B(P)};function B(F){D.call(this,F),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(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)}o(B,D),B.prototype.convertTo=function(P){return this.imod(P.ushln(this.shift))},B.prototype.convertFrom=function(P){var j=this.imod(P.mul(this.rinv));return j.red=null,j},B.prototype.imul=function(P,j){if(P.isZero()||j.isZero())return P.words[0]=0,P.length=1,P;var U=P.imul(j),$=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub($).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.mul=function(P,j){if(P.isZero()||j.isZero())return new s(0)._forceRed(this);var U=P.mul(j),$=U.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),Q=U.isub($).iushrn(this.shift),re=Q;return Q.cmp(this.m)>=0?re=Q.isub(this.m):Q.cmpn(0)<0&&(re=Q.iadd(this.m)),re._forceRed(this)},B.prototype.invm=function(P){var j=this.imod(P._invmp(this.m).mul(this.r2));return j._forceRed(this)}}(l,this)},6204:function(l){"use strict";l.exports=e;function e(t){var n,r,a,o=t.length,s=0;for(n=0;n>>1;if(!(f<=0)){var u,A=n.mallocDouble(2*f*_),x=n.mallocInt32(_);if(_=s(w,f,A,x),_>0){if(f===1&&C)r.init(_),u=r.sweepComplete(f,M,0,_,A,x,0,_,A,x);else{var z=n.mallocDouble(2*f*T),I=n.mallocInt32(T);T=s(S,f,z,I),T>0&&(r.init(_+T),f===1?u=r.sweepBipartite(f,M,0,_,A,x,0,T,z,I):u=a(f,M,C,_,A,x,T,z,I),n.free(z),n.free(I))}n.free(A),n.free(x)}return u}}}var m;function h(w,S){m.push([w,S])}function v(w){return m=[],c(w,w,h,!0),m}function g(w,S){return m=[],c(w,S,h,!1),m}function i(w,S,M){switch(arguments.length){case 1:return v(w);case 2:return typeof S=="function"?c(w,w,S,!0):g(w,S);case 3:return c(w,S,M,!1);default:throw new Error("box-intersect: Invalid arguments")}}},2455:function(l,e){"use strict";function t(){function a(c,m,h,v,g,i,w,S,M,C,_){for(var T=2*c,f=v,u=T*v;fM-S?a(c,m,h,v,g,i,w,S,M,C,_):o(c,m,h,v,g,i,w,S,M,C,_)}return s}function n(){function a(h,v,g,i,w,S,M,C,_,T,f){for(var u=2*h,A=i,x=u*i;AT-_?i?a(h,v,g,w,S,M,C,_,T,f,u):o(h,v,g,w,S,M,C,_,T,f,u):i?s(h,v,g,w,S,M,C,_,T,f,u):c(h,v,g,w,S,M,C,_,T,f,u)}return m}function r(a){return a?t():n()}e.partial=r(!1),e.full=r(!0)},7150:function(l,e,t){"use strict";l.exports=F;var n=t(1888),r=t(8828),a=t(2455),o=a.partial,s=a.full,c=t(855),m=t(3545),h=t(8105),v=128,g=1<<22,i=1<<22,w=h("!(lo>=p0)&&!(p1>=hi)"),S=h("lo===p0"),M=h("lo0;){X-=1;var Y=X*f,q=x[Y],Z=x[Y+1],ee=x[Y+2],ae=x[Y+3],he=x[Y+4],xe=x[Y+5],we=X*u,Me=z[we],Se=z[we+1],Ie=xe&1,Ve=!!(xe&16),Ge=Q,ke=re,_e=se,ce=G;if(Ie&&(Ge=se,ke=G,_e=Q,ce=re),!(xe&2&&(ee=M(P,q,Z,ee,Ge,ke,Se),Z>=ee))&&!(xe&4&&(Z=C(P,q,Z,ee,Ge,ke,Me),Z>=ee))){var ve=ee-Z,le=he-ae;if(Ve){if(P*ve*(ve+le)h&&g[T+m]>C;--_,T-=w){for(var f=T,u=T+w,A=0;A>>1,C=2*c,_=M,T=g[C*M+m];w=z?(_=x,T=z):A>=O?(_=u,T=A):(_=I,T=O):z>=O?(_=x,T=z):O>=A?(_=u,T=A):(_=I,T=O);for(var F=C*(S-1),P=C*_,D=0;D=p0)&&!(p1>=hi)":m};function t(h){return e[h]}function n(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u];if(z===M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function r(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u];if(zI;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function a(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+A];if(z<=M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function o(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+A];if(z<=M)if(f===x)f+=1,T+=C;else{for(var I=0;C>I;++I){var O=w[_+I];w[_+I]=w[T],w[T++]=O}var D=S[x];S[x]=S[f],S[f++]=D}}return f}function s(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u],I=w[_+A];if(z<=M&&M<=I)if(f===x)f+=1,T+=C;else{for(var O=0;C>O;++O){var D=w[_+O];w[_+O]=w[T],w[T++]=D}var B=S[x];S[x]=S[f],S[f++]=B}}return f}function c(h,v,g,i,w,S,M){for(var C=2*h,_=C*g,T=_,f=g,u=v,A=h+v,x=g;i>x;++x,_+=C){var z=w[_+u],I=w[_+A];if(zO;++O){var D=w[_+O];w[_+O]=w[T],w[T++]=D}var B=S[x];S[x]=S[f],S[f++]=B}}return f}function m(h,v,g,i,w,S,M,C){for(var _=2*h,T=_*g,f=T,u=g,A=v,x=h+v,z=g;i>z;++z,T+=_){var I=w[T+A],O=w[T+x];if(!(I>=M)&&!(C>=O))if(u===z)u+=1,f+=_;else{for(var D=0;_>D;++D){var B=w[T+D];w[T+D]=w[f],w[f++]=B}var F=S[z];S[z]=S[u],S[u++]=F}}return u}},4192:function(l){"use strict";l.exports=t;var e=32;function t(v,g){g<=4*e?n(0,g-1,v):h(0,g-1,v)}function n(v,g,i){for(var w=2*(v+1),S=v+1;S<=g;++S){for(var M=i[w++],C=i[w++],_=S,T=w-2;_-- >v;){var f=i[T-2],u=i[T-1];if(fi[g+1]:!0}function m(v,g,i,w){v*=2;var S=w[v];return S>1,_=C-w,T=C+w,f=S,u=_,A=C,x=T,z=M,I=v+1,O=g-1,D=0;c(f,u,i)&&(D=f,f=u,u=D),c(x,z,i)&&(D=x,x=z,z=D),c(f,A,i)&&(D=f,f=A,A=D),c(u,A,i)&&(D=u,u=A,A=D),c(f,x,i)&&(D=f,f=x,x=D),c(A,x,i)&&(D=A,A=x,x=D),c(u,z,i)&&(D=u,u=z,z=D),c(u,A,i)&&(D=u,u=A,A=D),c(x,z,i)&&(D=x,x=z,z=D);for(var B=i[2*u],F=i[2*u+1],P=i[2*x],j=i[2*x+1],U=2*f,$=2*A,Q=2*z,re=2*S,ne=2*C,se=2*M,G=0;G<2;++G){var X=i[U+G],K=i[$+G],H=i[Q+G];i[re+G]=X,i[ne+G]=K,i[se+G]=H}a(_,v,i),a(T,g,i);for(var Y=I;Y<=O;++Y)if(m(Y,B,F,i))Y!==I&&r(Y,I,i),++I;else if(!m(Y,P,j,i))for(;;)if(m(O,P,j,i)){m(O,B,F,i)?(o(Y,I,O,i),++I,--O):(r(Y,O,i),--O);break}else{if(--O>>1;a(w,K);for(var H=0,Y=0,ne=0;ne=o)q=q-o|0,M(h,v,Y--,q);else if(q>=0)M(c,m,H--,q);else if(q<=-o){q=-q-o|0;for(var Z=0;Z>>1;a(w,K);for(var H=0,Y=0,q=0,ne=0;ne>1===w[2*ne+3]>>1&&(ee=2,ne+=1),Z<0){for(var ae=-(Z>>1)-1,he=0;he>1)-1;ee===0?M(c,m,H--,ae):ee===1?M(h,v,Y--,ae):ee===2&&M(g,i,q--,ae)}}}function f(A,x,z,I,O,D,B,F,P,j,U,$){var Q=0,re=2*A,ne=x,se=x+A,G=1,X=1;I?X=o:G=o;for(var K=O;K>>1;a(w,Z);for(var ee=0,K=0;K=o?(he=!I,H-=o):(he=!!I,H-=1),he)C(c,m,ee++,H);else{var xe=$[H],we=re*H,Me=U[we+x+1],Se=U[we+x+1+A];e:for(var Ie=0;Ie>>1;a(w,H);for(var Y=0,se=0;se=o)c[Y++]=G-o;else{G-=1;var Z=U[G],ee=Q*G,ae=j[ee+x+1],he=j[ee+x+1+A];e:for(var xe=0;xe=0;--xe)if(c[xe]===G){for(var Ie=xe+1;Ie0;){for(var S=m.pop(),g=m.pop(),M=-1,C=-1,i=v[g],T=1;T=0||(c.flip(g,S),a(s,c,m,M,g,C),a(s,c,m,g,C,M),a(s,c,m,C,S,M),a(s,c,m,S,M,C))}}},5023:function(l,e,t){"use strict";var n=t(2478);l.exports=m;function r(h,v,g,i,w,S,M){this.cells=h,this.neighbor=v,this.flags=i,this.constraint=g,this.active=w,this.next=S,this.boundary=M}var a=r.prototype;function o(h,v){return h[0]-v[0]||h[1]-v[1]||h[2]-v[2]}a.locate=function(){var h=[0,0,0];return function(v,g,i){var w=v,S=g,M=i;return g0||M.length>0;){for(;S.length>0;){var u=S.pop();if(C[u]!==-w){C[u]=w;for(var A=_[u],x=0;x<3;++x){var z=f[3*u+x];z>=0&&C[z]===0&&(T[3*u+x]?M.push(z):(S.push(z),C[z]=w))}}}var I=M;M=S,S=I,M.length=0,w=-w}var O=c(_,C,v);return g?O.concat(i.boundary):O}},8902:function(l,e,t){"use strict";var n=t(2478),r=t(3250)[3],a=0,o=1,s=2;l.exports=M;function c(C,_,T,f,u){this.a=C,this.b=_,this.idx=T,this.lowerIds=f,this.upperIds=u}function m(C,_,T,f){this.a=C,this.b=_,this.type=T,this.idx=f}function h(C,_){var T=C.a[0]-_.a[0]||C.a[1]-_.a[1]||C.type-_.type;return T||C.type!==a&&(T=r(C.a,C.b,_.b),T)?T:C.idx-_.idx}function v(C,_){return r(C.a,C.b,_)}function g(C,_,T,f,u){for(var A=n.lt(_,f,v),x=n.gt(_,f,v),z=A;z1&&r(T[O[B-2]],T[O[B-1]],f)>0;)C.push([O[B-1],O[B-2],u]),B-=1;O.length=B,O.push(u);for(var D=I.upperIds,B=D.length;B>1&&r(T[D[B-2]],T[D[B-1]],f)<0;)C.push([D[B-2],D[B-1],u]),B-=1;D.length=B,D.push(u)}}function i(C,_){var T;return C.a[0]<_.a[0]?T=r(C.a,C.b,_.a):T=r(_.b,_.a,C.a),T||(_.b[0]I[0]&&u.push(new m(I,z,s,A),new m(z,I,o,A))}u.sort(h);for(var O=u[0].a[0]-(1+Math.abs(u[0].a[0]))*Math.pow(2,-52),D=[new c([O,1],[O,0],-1,[],[],[],[])],B=[],A=0,F=u.length;A=0}}(),a.removeTriangle=function(c,m,h){var v=this.stars;o(v[c],m,h),o(v[m],h,c),o(v[h],c,m)},a.addTriangle=function(c,m,h){var v=this.stars;v[c].push(m,h),v[m].push(h,c),v[h].push(c,m)},a.opposite=function(c,m){for(var h=this.stars[m],v=1,g=h.length;v=0;--P){var X=B[P];j=X[0];var K=O[j],H=K[0],Y=K[1],q=I[H],Z=I[Y];if((q[0]-Z[0]||q[1]-Z[1])<0){var ee=H;H=Y,Y=ee}K[0]=H;var ae=K[1]=X[1],he;for(F&&(he=K[2]);P>0&&B[P-1][0]===j;){var X=B[--P],xe=X[1];F?O.push([ae,xe,he]):O.push([ae,xe]),ae=xe}F?O.push([ae,Y,he]):O.push([ae,Y])}return U}function _(I,O,D){for(var B=O.length,F=new n(B),P=[],j=0;jO[2]?1:0)}function u(I,O,D){if(I.length!==0){if(O)for(var B=0;B0||j.length>0}function z(I,O,D){var B;if(D){B=O;for(var F=new Array(O.length),P=0;PC+1)throw new Error(S+" map requires nshades to be at least size "+w.length);Array.isArray(m.alpha)?m.alpha.length!==2?_=[1,1]:_=m.alpha.slice():typeof m.alpha=="number"?_=[m.alpha,m.alpha]:_=[1,1],h=w.map(function(z){return Math.round(z.index*C)}),_[0]=Math.min(Math.max(_[0],0),1),_[1]=Math.min(Math.max(_[1],0),1);var f=w.map(function(z,I){var O=w[I].index,D=w[I].rgb.slice();return D.length===4&&D[3]>=0&&D[3]<=1||(D[3]=_[0]+(_[1]-_[0])*O),D}),u=[];for(T=0;T=0}function m(h,v,g,i){var w=n(v,g,i);if(w===0){var S=r(n(h,v,g)),M=r(n(h,v,i));if(S===M){if(S===0){var C=c(h,v,g),_=c(h,v,i);return C===_?0:C?1:-1}return 0}else{if(M===0)return S>0||c(h,v,i)?-1:1;if(S===0)return M>0||c(h,v,g)?1:-1}return r(M-S)}var T=n(h,v,g);if(T>0)return w>0&&n(h,v,i)>0?1:-1;if(T<0)return w>0||n(h,v,i)>0?1:-1;var f=n(h,v,i);return f>0||c(h,v,g)?1:-1}},8572:function(l){"use strict";l.exports=function(t){return t<0?-1:t>0?1:0}},8507:function(l){l.exports=n;var e=Math.min;function t(r,a){return r-a}function n(r,a){var o=r.length,s=r.length-a.length;if(s)return s;switch(o){case 0:return 0;case 1:return r[0]-a[0];case 2:return r[0]+r[1]-a[0]-a[1]||e(r[0],r[1])-e(a[0],a[1]);case 3:var c=r[0]+r[1],m=a[0]+a[1];if(s=c+r[2]-(m+a[2]),s)return s;var h=e(r[0],r[1]),v=e(a[0],a[1]);return e(h,r[2])-e(v,a[2])||e(h+r[2],c)-e(v+a[2],m);case 4:var g=r[0],i=r[1],w=r[2],S=r[3],M=a[0],C=a[1],_=a[2],T=a[3];return g+i+w+S-(M+C+_+T)||e(g,i,w,S)-e(M,C,_,T,M)||e(g+i,g+w,g+S,i+w,i+S,w+S)-e(M+C,M+_,M+T,C+_,C+T,_+T)||e(g+i+w,g+i+S,g+w+S,i+w+S)-e(M+C+_,M+C+T,M+_+T,C+_+T);default:for(var f=r.slice().sort(t),u=a.slice().sort(t),A=0;At[r][0]&&(r=a);return nr?[[r],[n]]:[[n]]}},4750:function(l,e,t){"use strict";l.exports=r;var n=t(3090);function r(a){var o=n(a),s=o.length;if(s<=2)return[];for(var c=new Array(s),m=o[s-1],h=0;h=m[M]&&(S+=1);i[w]=S}}return c}function s(c,m){try{return n(c,!0)}catch{var h=r(c);if(h.length<=m)return[];var v=a(c,h),g=n(v,!0);return o(g,h)}}},4769:function(l){"use strict";function e(n,r,a,o,s,c){var m=6*s*s-6*s,h=3*s*s-4*s+1,v=-6*s*s+6*s,g=3*s*s-2*s;if(n.length){c||(c=new Array(n.length));for(var i=n.length-1;i>=0;--i)c[i]=m*n[i]+h*r[i]+v*a[i]+g*o[i];return c}return m*n+h*r+v*a[i]+g*o}function t(n,r,a,o,s,c){var m=s-1,h=s*s,v=m*m,g=(1+2*s)*v,i=s*v,w=h*(3-2*s),S=h*m;if(n.length){c||(c=new Array(n.length));for(var M=n.length-1;M>=0;--M)c[M]=g*n[M]+i*r[M]+w*a[M]+S*o[M];return c}return g*n+i*r+w*a+S*o}l.exports=t,l.exports.derivative=e},7642:function(l,e,t){"use strict";var n=t(8954),r=t(1682);l.exports=c;function a(m,h){this.point=m,this.index=h}function o(m,h){for(var v=m.point,g=h.point,i=v.length,w=0;w=2)return!1;D[F]=P}return!0}):O=O.filter(function(D){for(var B=0;B<=g;++B){var F=A[D[B]];if(F<0)return!1;D[B]=F}return!0}),g&1)for(var S=0;S>>31},l.exports.exponent=function(w){var S=l.exports.hi(w);return(S<<1>>>21)-1023},l.exports.fraction=function(w){var S=l.exports.lo(w),M=l.exports.hi(w),C=M&(1<<20)-1;return M&2146435072&&(C+=1048576),[S,C]},l.exports.denormalized=function(w){var S=l.exports.hi(w);return!(S&2146435072)}},1338:function(l){"use strict";function e(r,a,o){var s=r[o]|0;if(s<=0)return[];var c=new Array(s),m;if(o===r.length-1)for(m=0;m"u"&&(a=0),typeof r){case"number":if(r>0)return t(r|0,a);break;case"object":if(typeof r.length=="number")return e(r,a,0);break}return[]}l.exports=n},3134:function(l,e,t){"use strict";l.exports=r;var n=t(1682);function r(a,o){var s=a.length;if(typeof o!="number"){o=0;for(var c=0;c=g-1)for(var T=S.length-1,u=h-v[g-1],f=0;f=g-1)for(var _=S.length-1,T=h-v[g-1],f=0;f=0;--g)if(h[--v])return!1;return!0},s.jump=function(h){var v=this.lastT(),g=this.dimension;if(!(h0;--f)i.push(a(C[f-1],_[f-1],arguments[f])),w.push(0)}},s.push=function(h){var v=this.lastT(),g=this.dimension;if(!(h1e-6?1/M:0;this._time.push(h);for(var u=g;u>0;--u){var A=a(_[u-1],T[u-1],arguments[u]);i.push(A),w.push((A-i[S++])*f)}}},s.set=function(h){var v=this.dimension;if(!(h0;--C)g.push(a(S[C-1],M[C-1],arguments[C])),i.push(0)}},s.move=function(h){var v=this.lastT(),g=this.dimension;if(!(h<=v||arguments.length!==g+1)){var i=this._state,w=this._velocity,S=i.length-this.dimension,M=this.bounds,C=M[0],_=M[1],T=h-v,f=T>1e-6?1/T:0;this._time.push(h);for(var u=g;u>0;--u){var A=arguments[u];i.push(a(C[u-1],_[u-1],i[S++]+A)),w.push(A*f)}}},s.idle=function(h){var v=this.lastT();if(!(h=0;--f)i.push(a(C[f],_[f],i[S]+T*w[S])),w.push(0),S+=1}};function c(h){for(var v=new Array(h),g=0;g=0;--I){var u=A[I];x[I]<=0?A[I]=new n(u._color,u.key,u.value,A[I+1],u.right,u._count+1):A[I]=new n(u._color,u.key,u.value,u.left,A[I+1],u._count+1)}for(var I=A.length-1;I>1;--I){var O=A[I-1],u=A[I];if(O._color===t||u._color===t)break;var D=A[I-2];if(D.left===O)if(O.left===u){var B=D.right;if(B&&B._color===e)O._color=t,D.right=a(t,B),D._color=e,I-=1;else{if(D._color=e,D.left=O.right,O._color=t,O.right=D,A[I-2]=O,A[I-1]=u,o(D),o(O),I>=3){var F=A[I-3];F.left===D?F.left=O:F.right=O}break}}else{var B=D.right;if(B&&B._color===e)O._color=t,D.right=a(t,B),D._color=e,I-=1;else{if(O.right=u.left,D._color=e,D.left=u.right,u._color=t,u.left=O,u.right=D,A[I-2]=u,A[I-1]=O,o(D),o(O),o(u),I>=3){var F=A[I-3];F.left===D?F.left=u:F.right=u}break}}else if(O.right===u){var B=D.left;if(B&&B._color===e)O._color=t,D.left=a(t,B),D._color=e,I-=1;else{if(D._color=e,D.right=O.left,O._color=t,O.left=D,A[I-2]=O,A[I-1]=u,o(D),o(O),I>=3){var F=A[I-3];F.right===D?F.right=O:F.left=O}break}}else{var B=D.left;if(B&&B._color===e)O._color=t,D.left=a(t,B),D._color=e,I-=1;else{if(O.left=u.right,D._color=e,D.right=u.left,u._color=t,u.right=O,u.left=D,A[I-2]=u,A[I-1]=O,o(D),o(O),o(u),I>=3){var F=A[I-3];F.right===D?F.right=u:F.left=u}break}}}return A[0]._color=t,new s(f,A[0])};function m(_,T){if(T.left){var f=m(_,T.left);if(f)return f}var f=_(T.key,T.value);if(f)return f;if(T.right)return m(_,T.right)}function h(_,T,f,u){var A=T(_,u.key);if(A<=0){if(u.left){var x=h(_,T,f,u.left);if(x)return x}var x=f(u.key,u.value);if(x)return x}if(u.right)return h(_,T,f,u.right)}function v(_,T,f,u,A){var x=f(_,A.key),z=f(T,A.key),I;if(x<=0&&(A.left&&(I=v(_,T,f,u,A.left),I)||z>0&&(I=u(A.key,A.value),I)))return I;if(z>0&&A.right)return v(_,T,f,u,A.right)}c.forEach=function(T,f,u){if(this.root)switch(arguments.length){case 1:return m(T,this.root);case 2:return h(f,this._compare,T,this.root);case 3:return this._compare(f,u)>=0?void 0:v(f,u,this._compare,T,this.root)}},Object.defineProperty(c,"begin",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.left;return new g(this,_)}}),Object.defineProperty(c,"end",{get:function(){for(var _=[],T=this.root;T;)_.push(T),T=T.right;return new g(this,_)}}),c.at=function(_){if(_<0)return new g(this,[]);for(var T=this.root,f=[];;){if(f.push(T),T.left){if(_=T.right._count)break;T=T.right}else break}return new g(this,[])},c.ge=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x<=0&&(A=u.length),x<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.gt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x<0&&(A=u.length),x<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.lt=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x>0&&(A=u.length),x<=0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.le=function(_){for(var T=this._compare,f=this.root,u=[],A=0;f;){var x=T(_,f.key);u.push(f),x>=0&&(A=u.length),x<0?f=f.left:f=f.right}return u.length=A,new g(this,u)},c.find=function(_){for(var T=this._compare,f=this.root,u=[];f;){var A=T(_,f.key);if(u.push(f),A===0)return new g(this,u);A<=0?f=f.left:f=f.right}return new g(this,[])},c.remove=function(_){var T=this.find(_);return T?T.remove():this},c.get=function(_){for(var T=this._compare,f=this.root;f;){var u=T(_,f.key);if(u===0)return f.value;u<=0?f=f.left:f=f.right}};function g(_,T){this.tree=_,this._stack=T}var i=g.prototype;Object.defineProperty(i,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(i,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),i.clone=function(){return new g(this.tree,this._stack.slice())};function w(_,T){_.key=T.key,_.value=T.value,_.left=T.left,_.right=T.right,_._color=T._color,_._count=T._count}function S(_){for(var T,f,u,A,x=_.length-1;x>=0;--x){if(T=_[x],x===0){T._color=t;return}if(f=_[x-1],f.left===T){if(u=f.right,u.right&&u.right._color===e){if(u=f.right=r(u),A=u.right=r(u.right),f.right=u.left,u.left=f,u.right=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),x>1){var z=_[x-2];z.left===f?z.left=u:z.right=u}_[x-1]=u;return}else if(u.left&&u.left._color===e){if(u=f.right=r(u),A=u.left=r(u.left),f.right=A.left,u.left=A.right,A.left=f,A.right=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),x>1){var z=_[x-2];z.left===f?z.left=A:z.right=A}_[x-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.right=a(e,u);return}else{f.right=a(e,u);continue}else{if(u=r(u),f.right=u.left,u.left=f,u._color=f._color,f._color=e,o(f),o(u),x>1){var z=_[x-2];z.left===f?z.left=u:z.right=u}_[x-1]=u,_[x]=f,x+1<_.length?_[x+1]=T:_.push(T),x=x+2}}else{if(u=f.left,u.left&&u.left._color===e){if(u=f.left=r(u),A=u.left=r(u.left),f.left=u.right,u.right=f,u.left=A,u._color=f._color,T._color=t,f._color=t,A._color=t,o(f),o(u),x>1){var z=_[x-2];z.right===f?z.right=u:z.left=u}_[x-1]=u;return}else if(u.right&&u.right._color===e){if(u=f.left=r(u),A=u.right=r(u.right),f.left=A.right,u.right=A.left,A.right=f,A.left=u,A._color=f._color,f._color=t,u._color=t,T._color=t,o(f),o(u),o(A),x>1){var z=_[x-2];z.right===f?z.right=A:z.left=A}_[x-1]=A;return}if(u._color===t)if(f._color===e){f._color=t,f.left=a(e,u);return}else{f.left=a(e,u);continue}else{if(u=r(u),f.left=u.right,u.right=f,u._color=f._color,f._color=e,o(f),o(u),x>1){var z=_[x-2];z.right===f?z.right=u:z.left=u}_[x-1]=u,_[x]=f,x+1<_.length?_[x+1]=T:_.push(T),x=x+2}}}}i.remove=function(){var _=this._stack;if(_.length===0)return this.tree;var T=new Array(_.length),f=_[_.length-1];T[T.length-1]=new n(f._color,f.key,f.value,f.left,f.right,f._count);for(var u=_.length-2;u>=0;--u){var f=_[u];f.left===_[u+1]?T[u]=new n(f._color,f.key,f.value,T[u+1],f.right,f._count):T[u]=new n(f._color,f.key,f.value,f.left,T[u+1],f._count)}if(f=T[T.length-1],f.left&&f.right){var A=T.length;for(f=f.left;f.right;)T.push(f),f=f.right;var x=T[A-1];T.push(new n(f._color,x.key,x.value,f.left,f.right,f._count)),T[A-1].key=f.key,T[A-1].value=f.value;for(var u=T.length-2;u>=A;--u)f=T[u],T[u]=new n(f._color,f.key,f.value,f.left,T[u+1],f._count);T[A-1].left=T[A]}if(f=T[T.length-1],f._color===e){var z=T[T.length-2];z.left===f?z.left=null:z.right===f&&(z.right=null),T.pop();for(var u=0;u0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(i,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(i,"index",{get:function(){var _=0,T=this._stack;if(T.length===0){var f=this.tree.root;return f?f._count:0}else T[T.length-1].left&&(_=T[T.length-1].left._count);for(var u=T.length-2;u>=0;--u)T[u+1]===T[u].right&&(++_,T[u].left&&(_+=T[u].left._count));return _},enumerable:!0}),i.next=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.right)for(T=T.right;T;)_.push(T),T=T.left;else for(_.pop();_.length>0&&_[_.length-1].right===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasNext",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].right)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].left===_[T])return!0;return!1}}),i.update=function(_){var T=this._stack;if(T.length===0)throw new Error("Can't update empty node!");var f=new Array(T.length),u=T[T.length-1];f[f.length-1]=new n(u._color,u.key,_,u.left,u.right,u._count);for(var A=T.length-2;A>=0;--A)u=T[A],u.left===T[A+1]?f[A]=new n(u._color,u.key,u.value,f[A+1],u.right,u._count):f[A]=new n(u._color,u.key,u.value,u.left,f[A+1],u._count);return new s(this.tree._compare,f[0])},i.prev=function(){var _=this._stack;if(_.length!==0){var T=_[_.length-1];if(T.left)for(T=T.left;T;)_.push(T),T=T.right;else for(_.pop();_.length>0&&_[_.length-1].left===T;)T=_[_.length-1],_.pop()}},Object.defineProperty(i,"hasPrev",{get:function(){var _=this._stack;if(_.length===0)return!1;if(_[_.length-1].left)return!0;for(var T=_.length-1;T>0;--T)if(_[T-1].right===_[T])return!0;return!1}});function M(_,T){return _T?1:0}function C(_){return new s(_||M,null)}},3837:function(l,e,t){"use strict";l.exports=I;var n=t(4935),r=t(501),a=t(5304),o=t(6429),s=t(6444),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),m=ArrayBuffer,h=DataView;function v(O){return m.isView(O)&&!(O instanceof h)}function g(O){return Array.isArray(O)||v(O)}function i(O,D){return O[0]=D[0],O[1]=D[1],O[2]=D[2],O}function w(O){this.gl=O,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["sans-serif","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(O)}var S=w.prototype;S.update=function(O){O=O||{};function D(H,Y,q){if(q in O){var Z=O[q],ee=this[q],ae;(H?g(Z)&&g(Z[0]):g(Z))?this[q]=ae=[Y(Z[0]),Y(Z[1]),Y(Z[2])]:this[q]=ae=[Y(Z),Y(Z),Y(Z)];for(var he=0;he<3;++he)if(ae[he]!==ee[he])return!0}return!1}var B=D.bind(this,!1,Number),F=D.bind(this,!1,Boolean),P=D.bind(this,!1,String),j=D.bind(this,!0,function(H){if(g(H)){if(H.length===3)return[+H[0],+H[1],+H[2],1];if(H.length===4)return[+H[0],+H[1],+H[2],+H[3]]}return[0,0,0,1]}),U,$=!1,Q=!1;if("bounds"in O)for(var re=O.bounds,ne=0;ne<2;++ne)for(var se=0;se<3;++se)re[ne][se]!==this.bounds[ne][se]&&(Q=!0),this.bounds[ne][se]=re[ne][se];if("ticks"in O){U=O.ticks,$=!0,this.autoTicks=!1;for(var ne=0;ne<3;++ne)this.tickSpacing[ne]=0}else B("tickSpacing")&&(this.autoTicks=!0,Q=!0);if(this._firstInit&&("ticks"in O||"tickSpacing"in O||(this.autoTicks=!0),Q=!0,$=!0,this._firstInit=!1),Q&&this.autoTicks&&(U=s.create(this.bounds,this.tickSpacing),$=!0),$){for(var ne=0;ne<3;++ne)U[ne].sort(function(Y,q){return Y.x-q.x});s.equal(U,this.ticks)?$=!1:this.ticks=U}F("tickEnable"),P("tickFont")&&($=!0),P("tickFontStyle")&&($=!0),P("tickFontWeight")&&($=!0),P("tickFontVariant")&&($=!0),B("tickSize"),B("tickAngle"),B("tickPad"),j("tickColor");var G=P("labels");P("labelFont")&&(G=!0),P("labelFontStyle")&&(G=!0),P("labelFontWeight")&&(G=!0),P("labelFontVariant")&&(G=!0),F("labelEnable"),B("labelSize"),B("labelPad"),j("labelColor"),F("lineEnable"),F("lineMirror"),B("lineWidth"),j("lineColor"),F("lineTickEnable"),F("lineTickMirror"),B("lineTickLength"),B("lineTickWidth"),j("lineTickColor"),F("gridEnable"),B("gridWidth"),j("gridColor"),F("zeroEnable"),j("zeroLineColor"),B("zeroLineWidth"),F("backgroundEnable"),j("backgroundColor");var X=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],K=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(G||$)&&this._text.update(this.bounds,this.labels,X,this.ticks,K):this._text=n(this.gl,this.bounds,this.labels,X,this.ticks,K),this._lines&&$&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};function M(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var C=[new M,new M,new M];function _(O,D,B,F,P){for(var j=O.primalOffset,U=O.primalMinor,$=O.mirrorOffset,Q=O.mirrorMinor,re=F[D],ne=0;ne<3;++ne)if(D!==ne){var se=j,G=$,X=U,K=Q;re&1<0?(X[ne]=-1,K[ne]=0):(X[ne]=0,K[ne]=1)}}var T=[0,0,0],f={model:c,view:c,projection:c,_ortho:!1};S.isOpaque=function(){return!0},S.isTransparent=function(){return!1},S.drawTransparent=function(O){};var u=0,A=[0,0,0],x=[0,0,0],z=[0,0,0];S.draw=function(O){O=O||f;for(var q=this.gl,D=O.model||c,B=O.view||c,F=O.projection||c,P=this.bounds,j=O._ortho||!1,U=o(D,B,F,P,j),$=U.cubeEdges,Q=U.axis,re=B[12],ne=B[13],se=B[14],G=B[15],X=j?2:1,K=X*this.pixelRatio*(F[3]*re+F[7]*ne+F[11]*se+F[15]*G)/q.drawingBufferHeight,H=0;H<3;++H)this.lastCubeProps.cubeEdges[H]=$[H],this.lastCubeProps.axis[H]=Q[H];for(var Y=C,H=0;H<3;++H)_(C[H],H,this.bounds,$,Q);for(var q=this.gl,Z=T,H=0;H<3;++H)this.backgroundEnable[H]?Z[H]=Q[H]:Z[H]=0;this._background.draw(D,B,F,P,Z,this.backgroundColor),this._lines.bind(D,B,F,this);for(var H=0;H<3;++H){var ee=[0,0,0];Q[H]>0?ee[H]=P[1][H]:ee[H]=P[0][H];for(var ae=0;ae<2;++ae){var he=(H+1+ae)%3,xe=(H+1+(ae^1))%3;this.gridEnable[he]&&this._lines.drawGrid(he,xe,this.bounds,ee,this.gridColor[he],this.gridWidth[he]*this.pixelRatio)}for(var ae=0;ae<2;++ae){var he=(H+1+ae)%3,xe=(H+1+(ae^1))%3;this.zeroEnable[xe]&&Math.min(P[0][xe],P[1][xe])<=0&&Math.max(P[0][xe],P[1][xe])>=0&&this._lines.drawZero(he,xe,this.bounds,ee,this.zeroLineColor[xe],this.zeroLineWidth[xe]*this.pixelRatio)}}for(var H=0;H<3;++H){this.lineEnable[H]&&this._lines.drawAxisLine(H,this.bounds,Y[H].primalOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio),this.lineMirror[H]&&this._lines.drawAxisLine(H,this.bounds,Y[H].mirrorOffset,this.lineColor[H],this.lineWidth[H]*this.pixelRatio);for(var we=i(A,Y[H].primalMinor),Me=i(x,Y[H].mirrorMinor),Se=this.lineTickLength,ae=0;ae<3;++ae){var Ie=K/D[5*ae];we[ae]*=Se[ae]*Ie,Me[ae]*=Se[ae]*Ie}this.lineTickEnable[H]&&this._lines.drawAxisTicks(H,Y[H].primalOffset,we,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio),this.lineTickMirror[H]&&this._lines.drawAxisTicks(H,Y[H].mirrorOffset,Me,this.lineTickColor[H],this.lineTickWidth[H]*this.pixelRatio)}this._lines.unbind(),this._text.bind(D,B,F,this.pixelRatio);var Ve,Ge=.5,ke,_e;function ce(Ye){_e=[0,0,0],_e[Ye]=1}function ve(Ye,yt,gt){var Tt=(Ye+1)%3,At=(Ye+2)%3,$t=yt[Tt],rr=yt[At],_r=gt[Tt],Xt=gt[At];if($t>0&&Xt>0){ce(Tt);return}else if($t>0&&Xt<0){ce(Tt);return}else if($t<0&&Xt>0){ce(Tt);return}else if($t<0&&Xt<0){ce(Tt);return}else if(rr>0&&_r>0){ce(At);return}else if(rr>0&&_r<0){ce(At);return}else if(rr<0&&_r>0){ce(At);return}else if(rr<0&&_r<0){ce(At);return}}for(var H=0;H<3;++H){for(var le=Y[H].primalMinor,Ae=Y[H].mirrorMinor,Be=i(z,Y[H].primalOffset),ae=0;ae<3;++ae)this.lineTickEnable[H]&&(Be[ae]+=K*le[ae]*Math.max(this.lineTickLength[ae],0)/D[5*ae]);var Xe=[0,0,0];if(Xe[H]=1,this.tickEnable[H]){this.tickAngle[H]===-3600?(this.tickAngle[H]=0,this.tickAlign[H]="auto"):this.tickAlign[H]=-1,ke=1,Ve=[this.tickAlign[H],Ge,ke],Ve[0]==="auto"?Ve[0]=u:Ve[0]=parseInt(""+Ve[0]),_e=[0,0,0],ve(H,le,Ae);for(var ae=0;ae<3;++ae)Be[ae]+=K*le[ae]*this.tickPad[ae]/D[5*ae];this._text.drawTicks(H,this.tickSize[H],this.tickAngle[H],Be,this.tickColor[H],Xe,_e,Ve)}if(this.labelEnable[H]){ke=0,_e=[0,0,0],this.labels[H].length>4&&(ce(H),ke=1),Ve=[this.labelAlign[H],Ge,ke],Ve[0]==="auto"?Ve[0]=u:Ve[0]=parseInt(""+Ve[0]);for(var ae=0;ae<3;++ae)Be[ae]+=K*le[ae]*this.labelPad[ae]/D[5*ae];Be[H]+=.5*(P[0][H]+P[1][H]),this._text.drawLabel(H,this.labelSize[H],this.labelAngle[H],Be,this.labelColor[H],[0,0,0],_e,Ve)}}this._text.unbind()},S.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function I(O,D){var B=new w(O);return B.update(D),B}},5304:function(l,e,t){"use strict";l.exports=c;var n=t(2762),r=t(8116),a=t(1879).bg;function o(m,h,v,g){this.gl=m,this.buffer=h,this.vao=v,this.shader=g}var s=o.prototype;s.draw=function(m,h,v,g,i,w){for(var S=!1,M=0;M<3;++M)S=S||i[M];if(S){var C=this.gl;C.enable(C.POLYGON_OFFSET_FILL),C.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:m,view:h,projection:v,bounds:g,enable:i,colors:w},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),C.disable(C.POLYGON_OFFSET_FILL)}},s.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function c(m){for(var h=[],v=[],g=0,i=0;i<3;++i)for(var w=(i+1)%3,S=(i+2)%3,M=[0,0,0],C=[0,0,0],_=-1;_<=1;_+=2){v.push(g,g+2,g+1,g+1,g+2,g+3),M[i]=_,C[i]=_;for(var T=-1;T<=1;T+=2){M[w]=T;for(var f=-1;f<=1;f+=2)M[S]=f,h.push(M[0],M[1],M[2],C[0],C[1],C[2]),g+=1}var u=w;w=S,S=u}var A=n(m,new Float32Array(h)),x=n(m,new Uint16Array(v),m.ELEMENT_ARRAY_BUFFER),z=r(m,[{buffer:A,type:m.FLOAT,size:3,offset:0,stride:24},{buffer:A,type:m.FLOAT,size:3,offset:12,stride:24}],x),I=a(m);return I.attributes.position.location=0,I.attributes.normal.location=1,new o(m,A,z,I)}},6429:function(l,e,t){"use strict";l.exports=_;var n=t(8828),r=t(6760),a=t(5202),o=t(3250),s=new Array(16),c=new Array(8),m=new Array(8),h=new Array(3),v=[0,0,0];(function(){for(var T=0;T<8;++T)c[T]=[1,1,1,1],m[T]=[1,1,1]})();function g(T,f,u){for(var A=0;A<4;++A){T[A]=u[12+A];for(var x=0;x<3;++x)T[A]+=f[x]*u[4*x+A]}}var i=[[0,0,1,0,0],[0,0,-1,1,0],[0,-1,0,1,0],[0,1,0,1,0],[-1,0,0,1,0],[1,0,0,1,0]];function w(T){for(var f=0;fQ&&(B|=1<Q){B|=1<m[I][1])&&(Y=I);for(var q=-1,I=0;I<3;++I){var Z=Y^1<m[ee][0]&&(ee=Z)}}var ae=S;ae[0]=ae[1]=ae[2]=0,ae[n.log2(q^Y)]=Y&q,ae[n.log2(Y^ee)]=Yⅇvar he=ee^7;he===B||he===H?(he=q^7,ae[n.log2(ee^he)]=he&ee):ae[n.log2(q^he)]=he&q;for(var xe=M,we=B,j=0;j<3;++j)we&1<=0;--re){var ce=V[Q[re]];m.push(K*ce[0],-K*ce[1],B)}}for(var b=[0,0,0],_=[0,0,0],I=[0,0,0],C=[0,0,0],F=1.25,R={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},z=0;z<3;++z){I[z]=m.length/p|0,h(.5*(M[0][z]+M[1][z]),T[z],E[z],12,F,R),C[z]=(m.length/p|0)-I[z],b[z]=m.length/p|0;for(var D=0;D=0&&(p=s.length-c-1);var f=Math.pow(10,p),d=Math.round(n*i*f),y=d+"";if(y.indexOf("e")>=0)return y;var o=d/f,x=d%f;d<0?(o=-Math.ceil(o)|0,x=-x|0):(o=Math.floor(o)|0,x=x|0);var M=""+o;if(d<0&&(M="-"+M),p){for(var T=""+x;T.length=n[0][c];--d)p.push({x:d*i[c],text:t(i[c],d)});s.push(p)}return s}function r(n,i){for(var s=0;s<3;++s){if(n[s].length!==i[s].length)return!1;for(var c=0;cM)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return o.bufferSubData(x,g,E),M}function f(o,x){for(var M=a.malloc(o.length,x),T=o.length,E=0;E=0;--T){if(x[T]!==M)return!1;M*=o[T]}return!0}c.update=function(o,x){if(typeof x!="number"&&(x=-1),this.bind(),typeof o=="object"&&typeof o.shape<"u"){var M=o.dtype;if(i.indexOf(M)<0&&(M="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var T=gl.getExtension("OES_element_index_uint");T&&M!=="uint16"?M="uint32":M="uint16"}if(M===o.dtype&&d(o.shape,o.stride))o.offset===0&&o.data.length===o.shape[0]?this.length=p(this.gl,this.type,this.length,this.usage,o.data,x):this.length=p(this.gl,this.type,this.length,this.usage,o.data.subarray(o.offset,o.shape[0]),x);else{var E=a.malloc(o.size,M),g=n(E,o.shape);r.assign(g,o),x<0?this.length=p(this.gl,this.type,this.length,this.usage,E,x):this.length=p(this.gl,this.type,this.length,this.usage,E.subarray(0,o.size),x),a.free(E)}}else if(Array.isArray(o)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=f(o,"uint16"):A=f(o,"float32"),x<0?this.length=p(this.gl,this.type,this.length,this.usage,A,x):this.length=p(this.gl,this.type,this.length,this.usage,A.subarray(0,o.length),x),a.free(A)}else if(typeof o=="object"&&typeof o.length=="number")this.length=p(this.gl,this.type,this.length,this.usage,o,x);else if(typeof o=="number"||o===void 0){if(x>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");o=o|0,o<=0&&(o=1),this.gl.bufferData(this.type,o|0,this.usage),this.length=o}else throw new Error("gl-buffer: Invalid data type")};function y(o,x,M,T){if(M=M||o.ARRAY_BUFFER,T=T||o.DYNAMIC_DRAW,M!==o.ARRAY_BUFFER&&M!==o.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(T!==o.DYNAMIC_DRAW&&T!==o.STATIC_DRAW&&T!==o.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 E=o.createBuffer(),g=new s(o,M,E,0,T);return g.update(x),g}l.exports=y},6405:function(l,e,t){"use strict";var a=t(2931);l.exports=function(n,i){var s=n.positions,c=n.vectors,p={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(n.positions.length===0)return i&&(i[0]=[0,0,0],i[1]=[0,0,0]),p;for(var f=0,d=1/0,y=-1/0,o=1/0,x=-1/0,M=1/0,T=-1/0,E=null,g=null,A=[],m=1/0,h=!1,b=n.coneSizemode==="raw",_=0;_f&&(f=a.length(C)),_&&!b){var F=2*a.distance(E,I)/(a.length(g)+a.length(C));F?(m=Math.min(m,F),h=!1):h=!0}h||(E=I,g=C),A.push(C)}var R=[d,o,M],z=[y,x,T];i&&(i[0]=R,i[1]=z),f===0&&(f=1);var D=1/f;isFinite(m)||(m=1),p.vectorScale=m;var k=n.coneSize||(b?1:.5);n.absoluteConeSize&&(k=n.absoluteConeSize*D),p.coneScale=k;for(var _=0,B=0;_=1},o.isTransparent=function(){return this.opacity<1},o.pickSlots=1,o.setPickBase=function(A){this.pickId=A};function x(A){for(var m=f({colormap:A,nshades:256,format:"rgba"}),h=new Uint8Array(256*4),b=0;b<256;++b){for(var _=m[b],I=0;I<3;++I)h[4*b+I]=_[I];h[4*b+3]=_[3]*255}return p(h,[256,256,4],[4,0,1])}function M(A){for(var m=A.length,h=new Array(m),b=0;b0){var B=this.triShader;B.bind(),B.uniforms=F,this.triangleVAO.bind(),m.drawArrays(m.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},o.drawPick=function(A){A=A||{};for(var m=this.gl,h=A.model||d,b=A.view||d,_=A.projection||d,I=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],C=0;C<3;++C)I[0][C]=Math.max(I[0][C],this.clipBounds[0][C]),I[1][C]=Math.min(I[1][C],this.clipBounds[1][C]);this._model=[].slice.call(h),this._view=[].slice.call(b),this._projection=[].slice.call(_),this._resolution=[m.drawingBufferWidth,m.drawingBufferHeight];var F={model:h,view:b,projection:_,clipBounds:I,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},R=this.pickShader;R.bind(),R.uniforms=F,this.triangleCount>0&&(this.triangleVAO.bind(),m.drawArrays(m.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},o.pick=function(A){if(!A||A.id!==this.pickId)return null;var m=A.value[0]+256*A.value[1]+65536*A.value[2],h=this.cells[m],b=this.positions[h[1]].slice(0,3),_={position:b,dataCoordinate:b,index:Math.floor(h[1]/48)};return this.traceType==="cone"?_.index=Math.floor(h[1]/48):this.traceType==="streamtube"&&(_.intensity=this.intensity[h[1]],_.velocity=this.vectors[h[1]].slice(0,3),_.divergence=this.vectors[h[1]][3],_.index=m),_},o.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.triangleIds.dispose()};function T(A,m){var h=a(A,m.meshShader.vertex,m.meshShader.fragment,null,m.meshShader.attributes);return h.attributes.position.location=0,h.attributes.color.location=2,h.attributes.uv.location=3,h.attributes.vector.location=4,h}function E(A,m){var h=a(A,m.pickShader.vertex,m.pickShader.fragment,null,m.pickShader.attributes);return h.attributes.position.location=0,h.attributes.id.location=1,h.attributes.vector.location=4,h}function g(A,m,h){var b=h.shaders;arguments.length===1&&(m=A,A=m.gl);var _=T(A,b),I=E(A,b),C=i(A,p(new Uint8Array([255,255,255,255]),[1,1,4]));C.generateMipmap(),C.minFilter=A.LINEAR_MIPMAP_LINEAR,C.magFilter=A.LINEAR;var F=r(A),R=r(A),z=r(A),D=r(A),k=r(A),B=n(A,[{buffer:F,type:A.FLOAT,size:4},{buffer:k,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:z,type:A.FLOAT,size:4},{buffer:D,type:A.FLOAT,size:2},{buffer:R,type:A.FLOAT,size:4}]),O=new y(A,C,_,I,F,R,k,z,D,B,h.traceType||"cone");return O.update(m),O}l.exports=g},614:function(l,e,t){var a=t(3236),r=a([`precision highp float; +}`]);e.bg=function(v){return r(v,m,h,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},4935:function(l,e,t){"use strict";l.exports=w;var n=t(2762),r=t(8116),a=t(4359),o=t(1879).Q,s=window||process.global||{},c=s.__TEXT_CACHE||{};s.__TEXT_CACHE={};var m=3;function h(S,M,C,_){this.gl=S,this.shader=M,this.buffer=C,this.vao=_,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var v=h.prototype,g=[0,0];v.bind=function(S,M,C,_){this.vao.bind(),this.shader.bind();var T=this.shader.uniforms;T.model=S,T.view=M,T.projection=C,T.pixelScale=_,g[0]=this.gl.drawingBufferWidth,g[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=g},v.unbind=function(){this.vao.unbind()},v.update=function(S,M,C,_,T){var f=[];function u(j,U,$,Q,re,ne){var se=[$.style,$.weight,$.variant,$.family].join("_"),G=c[se];G||(G=c[se]={});var X=G[U];X||(X=G[U]=i(U,{triangles:!0,font:$.family,fontStyle:$.style,fontWeight:$.weight,fontVariant:$.variant,textAlign:"center",textBaseline:"middle",lineSpacing:re,styletags:ne}));for(var K=(Q||12)/12,H=X.positions,Y=X.cells,q=0,Z=Y.length;q=0;--ae){var he=H[ee[ae]];f.push(K*he[0],-K*he[1],j)}}for(var A=[0,0,0],x=[0,0,0],z=[0,0,0],I=[0,0,0],O=1.25,D={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},B=0;B<3;++B){z[B]=f.length/m|0,u(.5*(S[0][B]+S[1][B]),M[B],C[B],12,O,D),I[B]=(f.length/m|0)-z[B],A[B]=f.length/m|0;for(var F=0;F<_[B].length;++F)if(_[B][F].text){var P={family:_[B][F].font||T[B].family,style:T[B].fontStyle||T[B].style,weight:T[B].fontWeight||T[B].weight,variant:T[B].fontVariant||T[B].variant};u(_[B][F].x,_[B][F].text,P,_[B][F].fontSize||12,O,D)}x[B]=(f.length/m|0)-A[B]}this.buffer.update(f),this.tickOffset=A,this.tickCount=x,this.labelOffset=z,this.labelCount=I},v.drawTicks=function(S,M,C,_,T,f,u,A){this.tickCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.tickCount[S],this.tickOffset[S]))},v.drawLabel=function(S,M,C,_,T,f,u,A){this.labelCount[S]&&(this.shader.uniforms.axis=f,this.shader.uniforms.color=T,this.shader.uniforms.angle=C,this.shader.uniforms.scale=M,this.shader.uniforms.offset=_,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=A,this.vao.draw(this.gl.TRIANGLES,this.labelCount[S],this.labelOffset[S]))},v.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()};function i(S,M){try{return a(S,M)}catch(C){return console.warn('error vectorizing text:"'+S+'" error:',C),{cells:[],positions:[]}}}function w(S,M,C,_,T,f){var u=n(S),A=r(S,[{buffer:u,size:3}]),x=o(S);x.attributes.position.location=0;var z=new h(S,x,u,A);return z.update(M,C,_,T,f),z}},6444:function(l,e){"use strict";e.create=n,e.equal=r;function t(a,o){var s=a+"",c=s.indexOf("."),m=0;c>=0&&(m=s.length-c-1);var h=Math.pow(10,m),v=Math.round(a*o*h),g=v+"";if(g.indexOf("e")>=0)return g;var i=v/h,w=v%h;v<0?(i=-Math.ceil(i)|0,w=-w|0):(i=Math.floor(i)|0,w=w|0);var S=""+i;if(v<0&&(S="-"+S),m){for(var M=""+w;M.length=a[0][c];--v)m.push({x:v*o[c],text:t(o[c],v)});s.push(m)}return s}function r(a,o){for(var s=0;s<3;++s){if(a[s].length!==o[s].length)return!1;for(var c=0;cS)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return i.bufferSubData(w,_,C),S}function h(i,w){for(var S=n.malloc(i.length,w),M=i.length,C=0;C=0;--M){if(w[M]!==S)return!1;S*=i[M]}return!0}c.update=function(i,w){if(typeof w!="number"&&(w=-1),this.bind(),typeof i=="object"&&typeof i.shape<"u"){var S=i.dtype;if(o.indexOf(S)<0&&(S="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var M=gl.getExtension("OES_element_index_uint");M&&S!=="uint16"?S="uint32":S="uint16"}if(S===i.dtype&&v(i.shape,i.stride))i.offset===0&&i.data.length===i.shape[0]?this.length=m(this.gl,this.type,this.length,this.usage,i.data,w):this.length=m(this.gl,this.type,this.length,this.usage,i.data.subarray(i.offset,i.shape[0]),w);else{var C=n.malloc(i.size,S),_=a(C,i.shape);r.assign(_,i),w<0?this.length=m(this.gl,this.type,this.length,this.usage,C,w):this.length=m(this.gl,this.type,this.length,this.usage,C.subarray(0,i.size),w),n.free(C)}}else if(Array.isArray(i)){var T;this.type===this.gl.ELEMENT_ARRAY_BUFFER?T=h(i,"uint16"):T=h(i,"float32"),w<0?this.length=m(this.gl,this.type,this.length,this.usage,T,w):this.length=m(this.gl,this.type,this.length,this.usage,T.subarray(0,i.length),w),n.free(T)}else if(typeof i=="object"&&typeof i.length=="number")this.length=m(this.gl,this.type,this.length,this.usage,i,w);else if(typeof i=="number"||i===void 0){if(w>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");i=i|0,i<=0&&(i=1),this.gl.bufferData(this.type,i|0,this.usage),this.length=i}else throw new Error("gl-buffer: Invalid data type")};function g(i,w,S,M){if(S=S||i.ARRAY_BUFFER,M=M||i.DYNAMIC_DRAW,S!==i.ARRAY_BUFFER&&S!==i.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(M!==i.DYNAMIC_DRAW&&M!==i.STATIC_DRAW&&M!==i.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 C=i.createBuffer(),_=new s(i,S,C,0,M);return _.update(w),_}l.exports=g},6405:function(l,e,t){"use strict";var n=t(2931);l.exports=function(a,o){var s=a.positions,c=a.vectors,m={positions:[],vertexIntensity:[],vertexIntensityBounds:a.vertexIntensityBounds,vectors:[],cells:[],coneOffset:a.coneOffset,colormap:a.colormap};if(a.positions.length===0)return o&&(o[0]=[0,0,0],o[1]=[0,0,0]),m;for(var h=0,v=1/0,g=-1/0,i=1/0,w=-1/0,S=1/0,M=-1/0,C=null,_=null,T=[],f=1/0,u=!1,A=a.coneSizemode==="raw",x=0;xh&&(h=n.length(I)),x&&!A){var O=2*n.distance(C,z)/(n.length(_)+n.length(I));O?(f=Math.min(f,O),u=!1):u=!0}u||(C=z,_=I),T.push(I)}var D=[v,i,S],B=[g,w,M];o&&(o[0]=D,o[1]=B),h===0&&(h=1);var F=1/h;isFinite(f)||(f=1),m.vectorScale=f;var P=a.coneSize||(A?1:.5);a.absoluteConeSize&&(P=a.absoluteConeSize*F),m.coneScale=P;for(var x=0,j=0;x=1},i.isTransparent=function(){return this.opacity<1},i.pickSlots=1,i.setPickBase=function(T){this.pickId=T};function w(T){for(var f=h({colormap:T,nshades:256,format:"rgba"}),u=new Uint8Array(256*4),A=0;A<256;++A){for(var x=f[A],z=0;z<3;++z)u[4*A+z]=x[z];u[4*A+3]=x[3]*255}return m(u,[256,256,4],[4,0,1])}function S(T){for(var f=T.length,u=new Array(f),A=0;A0){var j=this.triShader;j.bind(),j.uniforms=O,this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},i.drawPick=function(T){T=T||{};for(var f=this.gl,u=T.model||v,A=T.view||v,x=T.projection||v,z=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)z[0][I]=Math.max(z[0][I],this.clipBounds[0][I]),z[1][I]=Math.min(z[1][I],this.clipBounds[1][I]);this._model=[].slice.call(u),this._view=[].slice.call(A),this._projection=[].slice.call(x),this._resolution=[f.drawingBufferWidth,f.drawingBufferHeight];var O={model:u,view:A,projection:x,clipBounds:z,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},D=this.pickShader;D.bind(),D.uniforms=O,this.triangleCount>0&&(this.triangleVAO.bind(),f.drawArrays(f.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},i.pick=function(T){if(!T||T.id!==this.pickId)return null;var f=T.value[0]+256*T.value[1]+65536*T.value[2],u=this.cells[f],A=this.positions[u[1]].slice(0,3),x={position:A,dataCoordinate:A,index:Math.floor(u[1]/48)};return this.traceType==="cone"?x.index=Math.floor(u[1]/48):this.traceType==="streamtube"&&(x.intensity=this.intensity[u[1]],x.velocity=this.vectors[u[1]].slice(0,3),x.divergence=this.vectors[u[1]][3],x.index=f),x},i.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.triangleIds.dispose()};function M(T,f){var u=n(T,f.meshShader.vertex,f.meshShader.fragment,null,f.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}function C(T,f){var u=n(T,f.pickShader.vertex,f.pickShader.fragment,null,f.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}function _(T,f,u){var A=u.shaders;arguments.length===1&&(f=T,T=f.gl);var x=M(T,A),z=C(T,A),I=o(T,m(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=T.LINEAR_MIPMAP_LINEAR,I.magFilter=T.LINEAR;var O=r(T),D=r(T),B=r(T),F=r(T),P=r(T),j=a(T,[{buffer:O,type:T.FLOAT,size:4},{buffer:P,type:T.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:B,type:T.FLOAT,size:4},{buffer:F,type:T.FLOAT,size:2},{buffer:D,type:T.FLOAT,size:4}]),U=new g(T,I,x,z,O,D,P,B,F,j,u.traceType||"cone");return U.update(f),U}l.exports=_},614:function(l,e,t){var n=t(3236),r=n([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -416,7 +419,7 @@ void main() { f_position = position.xyz; f_uv = uv; } -`]),n=a([`#extension GL_OES_standard_derivatives : enable +`]),a=n([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 @@ -507,7 +510,7 @@ void main() { gl_FragColor = litColor * opacity; } -`]),i=a([`precision highp float; +`]),o=n([`precision highp float; precision highp float; #define GLSLIFY 1 @@ -606,7 +609,7 @@ void main() { f_id = id; f_position = position.xyz; } -`]),s=a([`precision highp float; +`]),s=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -639,7 +642,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]);e.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(l){l.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",34e3:"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"}},5171:function(l,e,t){var a=t(737);l.exports=function(n){return a[n]}},9165:function(l,e,t){"use strict";l.exports=y;var a=t(2762),r=t(8116),n=t(3436),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(o,x,M,T){this.gl=o,this.shader=T,this.buffer=x,this.vao=M,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 c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(o){var x=this.gl,M=this.shader.uniforms;this.shader.bind();var T=M.view=o.view||i,E=M.projection=o.projection||i;M.model=o.model||i,M.clipBounds=this.clipBounds,M.opacity=this.opacity;var g=T[12],A=T[13],m=T[14],h=T[15],b=o._ortho||!1,_=b?2:1,I=_*this.pixelRatio*(E[3]*g+E[7]*A+E[11]*m+E[15]*h)/x.drawingBufferHeight;this.vao.bind();for(var C=0;C<3;++C)x.lineWidth(this.lineWidth[C]*this.pixelRatio),M.capSize=this.capSize[C]*I,this.lineCount[C]&&x.drawArrays(x.LINES,this.lineOffset[C],this.lineCount[C]);this.vao.unbind()};function p(o,x){for(var M=0;M<3;++M)o[0][M]=Math.min(o[0][M],x[M]),o[1][M]=Math.max(o[1][M],x[M])}var f=function(){for(var o=new Array(3),x=0;x<3;++x){for(var M=[],T=1;T<=2;++T)for(var E=-1;E<=1;E+=2){var g=(T+x)%3,A=[0,0,0];A[g]=E,M.push(A)}o[x]=M}return o}();function d(o,x,M,T){for(var E=f[T],g=0;g0){var F=b.slice();F[m]+=I[1][m],E.push(b[0],b[1],b[2],C[0],C[1],C[2],C[3],0,0,0,F[0],F[1],F[2],C[0],C[1],C[2],C[3],0,0,0),p(this.bounds,F),A+=2+d(E,F,C,m)}}}this.lineCount[m]=A-this.lineOffset[m]}this.buffer.update(E)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function y(o){var x=o.gl,M=a(x),T=r(x,[{buffer:M,type:x.FLOAT,size:3,offset:0,stride:40},{buffer:M,type:x.FLOAT,size:4,offset:12,stride:40},{buffer:M,type:x.FLOAT,size:3,offset:28,stride:40}]),E=n(x);E.attributes.position.location=0,E.attributes.color.location=1,E.attributes.offset.location=2;var g=new s(x,M,T,E);return g.update(o),g}},3436:function(l,e,t){"use strict";var a=t(3236),r=t(9405),n=a([`precision highp float; +}`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},737:function(l){l.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",34e3:"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"}},5171:function(l,e,t){var n=t(737);l.exports=function(a){return n[a]}},9165:function(l,e,t){"use strict";l.exports=g;var n=t(2762),r=t(8116),a=t(3436),o=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function s(i,w,S,M){this.gl=i,this.shader=M,this.buffer=w,this.vao=S,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 c=s.prototype;c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(i){var w=this.gl,S=this.shader.uniforms;this.shader.bind();var M=S.view=i.view||o,C=S.projection=i.projection||o;S.model=i.model||o,S.clipBounds=this.clipBounds,S.opacity=this.opacity;var _=M[12],T=M[13],f=M[14],u=M[15],A=i._ortho||!1,x=A?2:1,z=x*this.pixelRatio*(C[3]*_+C[7]*T+C[11]*f+C[15]*u)/w.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)w.lineWidth(this.lineWidth[I]*this.pixelRatio),S.capSize=this.capSize[I]*z,this.lineCount[I]&&w.drawArrays(w.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function m(i,w){for(var S=0;S<3;++S)i[0][S]=Math.min(i[0][S],w[S]),i[1][S]=Math.max(i[1][S],w[S])}var h=function(){for(var i=new Array(3),w=0;w<3;++w){for(var S=[],M=1;M<=2;++M)for(var C=-1;C<=1;C+=2){var _=(M+w)%3,T=[0,0,0];T[_]=C,S.push(T)}i[w]=S}return i}();function v(i,w,S,M){for(var C=h[M],_=0;_0){var O=A.slice();O[f]+=z[1][f],C.push(A[0],A[1],A[2],I[0],I[1],I[2],I[3],0,0,0,O[0],O[1],O[2],I[0],I[1],I[2],I[3],0,0,0),m(this.bounds,O),T+=2+v(C,O,I,f)}}}this.lineCount[f]=T-this.lineOffset[f]}this.buffer.update(C)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function g(i){var w=i.gl,S=n(w),M=r(w,[{buffer:S,type:w.FLOAT,size:3,offset:0,stride:40},{buffer:S,type:w.FLOAT,size:4,offset:12,stride:40},{buffer:S,type:w.FLOAT,size:3,offset:28,stride:40}]),C=a(w);C.attributes.position.location=0,C.attributes.color.location=1,C.attributes.offset.location=2;var _=new s(w,S,M,C);return _.update(i),_}},3436:function(l,e,t){"use strict";var n=t(3236),r=t(9405),a=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; @@ -655,7 +658,7 @@ void main() { gl_Position = projection * (view * worldPosition); fragColor = color; fragPosition = position; -}`]),i=a([`precision highp float; +}`]),o=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -690,13 +693,13 @@ void main() { ) discard; gl_FragColor = opacity * fragColor; -}`]);l.exports=function(s){return r(s,n,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},2260:function(l,e,t){"use strict";var a=t(7766);l.exports=A;var r=null,n,i,s,c;function p(m){var h=m.getParameter(m.FRAMEBUFFER_BINDING),b=m.getParameter(m.RENDERBUFFER_BINDING),_=m.getParameter(m.TEXTURE_BINDING_2D);return[h,b,_]}function f(m,h){m.bindFramebuffer(m.FRAMEBUFFER,h[0]),m.bindRenderbuffer(m.RENDERBUFFER,h[1]),m.bindTexture(m.TEXTURE_2D,h[2])}function d(m,h){var b=m.getParameter(h.MAX_COLOR_ATTACHMENTS_WEBGL);r=new Array(b+1);for(var _=0;_<=b;++_){for(var I=new Array(b),C=0;C<_;++C)I[C]=m.COLOR_ATTACHMENT0+C;for(var C=_;C1&&R.drawBuffersWEBGL(r[F]);var O=b.getExtension("WEBGL_depth_texture");O?z?m.depth=o(b,I,C,O.UNSIGNED_INT_24_8_WEBGL,b.DEPTH_STENCIL,b.DEPTH_STENCIL_ATTACHMENT):D&&(m.depth=o(b,I,C,b.UNSIGNED_SHORT,b.DEPTH_COMPONENT,b.DEPTH_ATTACHMENT)):D&&z?m._depth_rb=x(b,I,C,b.DEPTH_STENCIL,b.DEPTH_STENCIL_ATTACHMENT):D?m._depth_rb=x(b,I,C,b.DEPTH_COMPONENT16,b.DEPTH_ATTACHMENT):z&&(m._depth_rb=x(b,I,C,b.STENCIL_INDEX,b.STENCIL_ATTACHMENT));var q=b.checkFramebufferStatus(b.FRAMEBUFFER);if(q!==b.FRAMEBUFFER_COMPLETE){m._destroyed=!0,b.bindFramebuffer(b.FRAMEBUFFER,null),b.deleteFramebuffer(m.handle),m.handle=null,m.depth&&(m.depth.dispose(),m.depth=null),m._depth_rb&&(b.deleteRenderbuffer(m._depth_rb),m._depth_rb=null);for(var B=0;BI||b<0||b>I)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");m._shape[0]=h,m._shape[1]=b;for(var C=p(_),F=0;FC||b<0||b>C)throw new Error("gl-fbo: Parameters are too large for FBO");_=_||{};var F=1;if("color"in _){if(F=Math.max(_.color|0,0),F<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(F>1)if(I){if(F>m.getParameter(I.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+F+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var R=m.UNSIGNED_BYTE,z=m.getExtension("OES_texture_float");if(_.float&&F>0){if(!z)throw new Error("gl-fbo: Context does not support floating point textures");R=m.FLOAT}else _.preferFloat&&F>0&&z&&(R=m.FLOAT);var D=!0;"depth"in _&&(D=!!_.depth);var k=!1;return"stencil"in _&&(k=!!_.stencil),new T(m,h,b,R,F,D,k,I)}},2992:function(l,e,t){var a=t(3387).sprintf,r=t(5171),n=t(1848),i=t(1085);l.exports=s;function s(c,p,f){"use strict";var d=n(p)||"of unknown name (see npm glsl-shader-name)",y="unknown type";f!==void 0&&(y=f===r.FRAGMENT_SHADER?"fragment":"vertex");for(var o=a(`Error compiling %s shader %s: -`,y,d),x=a("%s%s",o,c),M=c.split(` -`),T={},E=0;E1&&D.drawBuffersWEBGL(r[O]);var U=A.getExtension("WEBGL_depth_texture");U?B?f.depth=i(A,z,I,U.UNSIGNED_INT_24_8_WEBGL,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F&&(f.depth=i(A,z,I,A.UNSIGNED_SHORT,A.DEPTH_COMPONENT,A.DEPTH_ATTACHMENT)):F&&B?f._depth_rb=w(A,z,I,A.DEPTH_STENCIL,A.DEPTH_STENCIL_ATTACHMENT):F?f._depth_rb=w(A,z,I,A.DEPTH_COMPONENT16,A.DEPTH_ATTACHMENT):B&&(f._depth_rb=w(A,z,I,A.STENCIL_INDEX,A.STENCIL_ATTACHMENT));var $=A.checkFramebufferStatus(A.FRAMEBUFFER);if($!==A.FRAMEBUFFER_COMPLETE){f._destroyed=!0,A.bindFramebuffer(A.FRAMEBUFFER,null),A.deleteFramebuffer(f.handle),f.handle=null,f.depth&&(f.depth.dispose(),f.depth=null),f._depth_rb&&(A.deleteRenderbuffer(f._depth_rb),f._depth_rb=null);for(var j=0;jz||A<0||A>z)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");f._shape[0]=u,f._shape[1]=A;for(var I=m(x),O=0;OI||A<0||A>I)throw new Error("gl-fbo: Parameters are too large for FBO");x=x||{};var O=1;if("color"in x){if(O=Math.max(x.color|0,0),O<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(O>1)if(z){if(O>f.getParameter(z.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+O+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var D=f.UNSIGNED_BYTE,B=f.getExtension("OES_texture_float");if(x.float&&O>0){if(!B)throw new Error("gl-fbo: Context does not support floating point textures");D=f.FLOAT}else x.preferFloat&&O>0&&B&&(D=f.FLOAT);var F=!0;"depth"in x&&(F=!!x.depth);var P=!1;return"stencil"in x&&(P=!!x.stencil),new M(f,u,A,D,O,F,P,z)}},2992:function(l,e,t){var n=t(3387).sprintf,r=t(5171),a=t(1848),o=t(1085);l.exports=s;function s(c,m,h){"use strict";var v=a(m)||"of unknown name (see npm glsl-shader-name)",g="unknown type";h!==void 0&&(g=h===r.FRAGMENT_SHADER?"fragment":"vertex");for(var i=n(`Error compiling %s shader %s: +`,g,v),w=n("%s%s",i,c),S=c.split(` +`),M={},C=0;C0){for(var ae=0;ae<24;++ae)C.push(C[C.length-12]);D+=2,Y=!0}continue e}k[0][_]=Math.min(k[0][_],ee[_],te[_]),k[1][_]=Math.max(k[1][_],ee[_],te[_])}var U,H;Array.isArray(O[0])?(U=O.length>b-1?O[b-1]:O.length>0?O[O.length-1]:[0,0,0,1],H=O.length>b?O[b]:O.length>0?O[O.length-1]:[0,0,0,1]):U=H=O,U.length===3&&(U=[U[0],U[1],U[2],1]),H.length===3&&(H=[H[0],H[1],H[2],1]),!this.hasAlpha&&U[3]<1&&(this.hasAlpha=!0);var K;Array.isArray(q)?K=q.length>b-1?q[b-1]:q.length>0?q[q.length-1]:[0,0,0,1]:K=q;var V=z;if(z+=M(ee,te),Y){for(_=0;_<2;++_)C.push(ee[0],ee[1],ee[2],te[0],te[1],te[2],V,K,U[0],U[1],U[2],U[3]);D+=2,Y=!1}C.push(ee[0],ee[1],ee[2],te[0],te[1],te[2],V,K,U[0],U[1],U[2],U[3],ee[0],ee[1],ee[2],te[0],te[1],te[2],V,-K,U[0],U[1],U[2],U[3],te[0],te[1],te[2],ee[0],ee[1],ee[2],z,-K,H[0],H[1],H[2],H[3],te[0],te[1],te[2],ee[0],ee[1],ee[2],z,K,H[0],H[1],H[2],H[3]),D+=4}}if(this.buffer.update(C),F.push(z),R.push(B[B.length-1].slice()),this.bounds=k,this.vertexCount=D,this.points=R,this.arcLength=F,"dashes"in h){var $=h.dashes,X=$.slice();for(X.unshift(0),b=1;b1.0001)return null;_+=b[E]}return Math.abs(_-1)>.001?null:[g,c(f,b),b]}},840:function(l,e,t){var a=t(3236),r=a([`precision highp float; +}`]),c=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];e.createShader=function(m){return r(m,a,o,null,c)},e.createPickShader=function(m){return r(m,a,s,null,c)}},5714:function(l,e,t){"use strict";l.exports=f;var n=t(2762),r=t(8116),a=t(7766),o=new Uint8Array(4),s=new Float32Array(o.buffer);function c(u,A,x,z){return o[0]=z,o[1]=x,o[2]=A,o[3]=u,s[0]}var m=t(2478),h=t(9618),v=t(7319),g=v.createShader,i=v.createPickShader,w=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function S(u,A){for(var x=0,z=0;z<3;++z){var I=u[z]-A[z];x+=I*I}return Math.sqrt(x)}function M(u){for(var A=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],x=0;x<3;++x)A[0][x]=Math.max(u[0][x],A[0][x]),A[1][x]=Math.min(u[1][x],A[1][x]);return A}function C(u,A,x,z){this.arcLength=u,this.position=A,this.index=x,this.dataCoordinate=z}function _(u,A,x,z,I,O){this.gl=u,this.shader=A,this.pickShader=x,this.buffer=z,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=O,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var T=_.prototype;T.isTransparent=function(){return this.hasAlpha},T.isOpaque=function(){return!this.hasAlpha},T.pickSlots=1,T.setPickBase=function(u){this.pickId=u},T.drawTransparent=T.draw=function(u){if(this.vertexCount){var A=this.gl,x=this.shader,z=this.vao;x.bind(),x.uniforms={model:u.model||w,view:u.view||w,projection:u.projection||w,clipBounds:M(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(A.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},T.drawPick=function(u){if(this.vertexCount){var A=this.gl,x=this.pickShader,z=this.vao;x.bind(),x.uniforms={model:u.model||w,view:u.view||w,projection:u.projection||w,pickId:this.pickId,clipBounds:M(this.clipBounds),screenShape:[A.drawingBufferWidth,A.drawingBufferHeight],pixelRatio:this.pixelRatio},z.bind(),z.draw(A.TRIANGLE_STRIP,this.vertexCount),z.unbind()}},T.update=function(u){var A,x;this.dirty=!0;var z=!!u.connectGaps;"dashScale"in u&&(this.dashScale=u.dashScale),this.hasAlpha=!1,"opacity"in u&&(this.opacity=+u.opacity,this.opacity<1&&(this.hasAlpha=!0));var I=[],O=[],D=[],B=0,F=0,P=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],j=u.position||u.positions;if(j){var U=u.color||u.colors||[0,0,0,1],$=u.lineWidth||1,Q=!1;e:for(A=1;A0){for(var se=0;se<24;++se)I.push(I[I.length-12]);F+=2,Q=!0}continue e}P[0][x]=Math.min(P[0][x],re[x],ne[x]),P[1][x]=Math.max(P[1][x],re[x],ne[x])}var G,X;Array.isArray(U[0])?(G=U.length>A-1?U[A-1]:U.length>0?U[U.length-1]:[0,0,0,1],X=U.length>A?U[A]:U.length>0?U[U.length-1]:[0,0,0,1]):G=X=U,G.length===3&&(G=[G[0],G[1],G[2],1]),X.length===3&&(X=[X[0],X[1],X[2],1]),!this.hasAlpha&&G[3]<1&&(this.hasAlpha=!0);var K;Array.isArray($)?K=$.length>A-1?$[A-1]:$.length>0?$[$.length-1]:[0,0,0,1]:K=$;var H=B;if(B+=S(re,ne),Q){for(x=0;x<2;++x)I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],H,K,G[0],G[1],G[2],G[3]);F+=2,Q=!1}I.push(re[0],re[1],re[2],ne[0],ne[1],ne[2],H,K,G[0],G[1],G[2],G[3],re[0],re[1],re[2],ne[0],ne[1],ne[2],H,-K,G[0],G[1],G[2],G[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,-K,X[0],X[1],X[2],X[3],ne[0],ne[1],ne[2],re[0],re[1],re[2],B,K,X[0],X[1],X[2],X[3]),F+=4}}if(this.buffer.update(I),O.push(B),D.push(j[j.length-1].slice()),this.bounds=P,this.vertexCount=F,this.points=D,this.arcLength=O,"dashes"in u){var Y=u.dashes,q=Y.slice();for(q.unshift(0),A=1;A1.0001)return null;x+=A[C]}return Math.abs(x-1)>.001?null:[_,c(h,A),A]}},840:function(l,e,t){var n=t(3236),r=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; @@ -897,7 +900,7 @@ void main() { f_data = position; f_uv = uv; } -`]),n=a([`#extension GL_OES_standard_derivatives : enable +`]),a=n([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 @@ -1002,7 +1005,7 @@ void main() { gl_FragColor = litColor * f_color.a; } -`]),i=a([`precision highp float; +`]),o=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1020,7 +1023,7 @@ void main() { f_color = color; f_data = position; f_uv = uv; -}`]),s=a([`precision highp float; +}`]),s=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1055,7 +1058,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),c=a([`precision highp float; +}`]),c=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1099,7 +1102,7 @@ void main() { gl_PointSize = pointSize; f_color = color; f_uv = uv; -}`]),p=a([`precision highp float; +}`]),m=n([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; @@ -1114,7 +1117,7 @@ void main() { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; -}`]),f=a([`precision highp float; +}`]),h=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1129,7 +1132,7 @@ void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); f_id = id; f_position = position; -}`]),d=a([`precision highp float; +}`]),v=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1162,7 +1165,7 @@ void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); -}`]),y=a([`precision highp float; +}`]),g=n([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { @@ -1205,7 +1208,7 @@ void main() { } f_id = id; f_position = position; -}`]),o=a([`precision highp float; +}`]),i=n([`precision highp float; #define GLSLIFY 1 attribute vec3 position; @@ -1214,7 +1217,7 @@ uniform mat4 model, view, projection; void main() { gl_Position = projection * (view * (model * vec4(position, 1.0))); -}`]),x=a([`precision highp float; +}`]),w=n([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; @@ -1222,14 +1225,14 @@ uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } -`]);e.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:i,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:c,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:f,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:y,fragment:d,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:o,fragment:x,attributes:[{name:"position",type:"vec3"}]}},7201:function(l,e,t){"use strict";var a=1e-6,r=1e-6,n=t(9405),i=t(2762),s=t(8116),c=t(7766),p=t(8406),f=t(6760),d=t(7608),y=t(9618),o=t(6729),x=t(7765),M=t(1888),T=t(840),E=t(7626),g=T.meshShader,A=T.wireShader,m=T.pointShader,h=T.pickShader,b=T.pointPickShader,_=T.contourShader,I=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function C(ae,U,H,K,V,$,X,Z,Q,re,ce,me,ye,Ae,Se,Ce,qe,Ue,xe,he,oe,le,ne,be,Fe,Ve,je){this.gl=ae,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=U,this.dirty=!0,this.triShader=H,this.lineShader=K,this.pointShader=V,this.pickShader=$,this.pointPickShader=X,this.contourShader=Z,this.trianglePositions=Q,this.triangleColors=ce,this.triangleNormals=ye,this.triangleUVs=me,this.triangleIds=re,this.triangleVAO=Ae,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Se,this.edgeColors=qe,this.edgeUVs=Ue,this.edgeIds=Ce,this.edgeVAO=xe,this.edgeCount=0,this.pointPositions=he,this.pointColors=le,this.pointUVs=ne,this.pointSizes=be,this.pointIds=oe,this.pointVAO=Fe,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Ve,this.contourVAO=je,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!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=I,this._view=I,this._projection=I,this._resolution=[1,1]}var F=C.prototype;F.isOpaque=function(){return!this.hasAlpha},F.isTransparent=function(){return this.hasAlpha},F.pickSlots=1,F.setPickBase=function(ae){this.pickId=ae};function R(ae,U){if(!U||!U.length)return 1;for(var H=0;Hae&&H>0){var K=(U[H][0]-ae)/(U[H][0]-U[H-1][0]);return U[H][1]*(1-K)+K*U[H-1][1]}}return 1}function z(ae,U){for(var H=o({colormap:ae,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),V=0;V<256;++V){for(var $=H[V],X=0;X<3;++X)K[4*V+X]=$[X];U?K[4*V+3]=255*R(V/255,U):K[4*V+3]=255*$[3]}return y(K,[256,256,4],[4,0,1])}function D(ae){for(var U=ae.length,H=new Array(U),K=0;K0){var ye=this.triShader;ye.bind(),ye.uniforms=Z,this.triangleVAO.bind(),U.drawArrays(U.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var ye=this.lineShader;ye.bind(),ye.uniforms=Z,this.edgeVAO.bind(),U.lineWidth(this.lineWidth*this.pixelRatio),U.drawArrays(U.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var ye=this.pointShader;ye.bind(),ye.uniforms=Z,this.pointVAO.bind(),U.drawArrays(U.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var ye=this.contourShader;ye.bind(),ye.uniforms=Z,this.contourVAO.bind(),U.drawArrays(U.LINES,0,this.contourCount),this.contourVAO.unbind()}},F.drawPick=function(ae){ae=ae||{};for(var U=this.gl,H=ae.model||I,K=ae.view||I,V=ae.projection||I,$=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],X=0;X<3;++X)$[0][X]=Math.max($[0][X],this.clipBounds[0][X]),$[1][X]=Math.min($[1][X],this.clipBounds[1][X]);this._model=[].slice.call(H),this._view=[].slice.call(K),this._projection=[].slice.call(V),this._resolution=[U.drawingBufferWidth,U.drawingBufferHeight];var Z={model:H,view:K,projection:V,clipBounds:$,pickId:this.pickId/255},Q=this.pickShader;if(Q.bind(),Q.uniforms=Z,this.triangleCount>0&&(this.triangleVAO.bind(),U.drawArrays(U.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),U.lineWidth(this.lineWidth*this.pixelRatio),U.drawArrays(U.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var Q=this.pointPickShader;Q.bind(),Q.uniforms=Z,this.pointVAO.bind(),U.drawArrays(U.POINTS,0,this.pointCount),this.pointVAO.unbind()}},F.pick=function(ae){if(!ae||ae.id!==this.pickId)return null;for(var U=ae.value[0]+256*ae.value[1]+65536*ae.value[2],H=this.cells[U],K=this.positions,V=new Array(H.length),$=0;$Math.abs(h))o.rotate(I,0,0,-m*b*Math.PI*g.rotateSpeed/window.innerWidth);else if(!g._ortho){var C=-g.zoomSpeed*_*h/window.innerHeight*(I-o.lastT())/20;o.pan(I,0,0,M*(Math.exp(C)-1))}}},!0)},g.enableMouseListeners(),g}},799:function(l,e,t){var a=t(3236),r=t(9405),n=a([`precision mediump float; +`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.wireShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},e.pointShader={vertex:c,fragment:m,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},e.pickShader={vertex:h,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},e.pointPickShader={vertex:g,fragment:v,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},e.contourShader={vertex:i,fragment:w,attributes:[{name:"position",type:"vec3"}]}},7201:function(l,e,t){"use strict";var n=1e-6,r=1e-6,a=t(9405),o=t(2762),s=t(8116),c=t(7766),m=t(8406),h=t(6760),v=t(7608),g=t(9618),i=t(6729),w=t(7765),S=t(1888),M=t(840),C=t(7626),_=M.meshShader,T=M.wireShader,f=M.pointShader,u=M.pickShader,A=M.pointPickShader,x=M.contourShader,z=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(se,G,X,K,H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve,Ge,ke,_e,ce,ve,le,Ae,Be,Xe,Ye){this.gl=se,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=G,this.dirty=!0,this.triShader=X,this.lineShader=K,this.pointShader=H,this.pickShader=Y,this.pointPickShader=q,this.contourShader=Z,this.trianglePositions=ee,this.triangleColors=he,this.triangleNormals=we,this.triangleUVs=xe,this.triangleIds=ae,this.triangleVAO=Me,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Se,this.edgeColors=Ve,this.edgeUVs=Ge,this.edgeIds=Ie,this.edgeVAO=ke,this.edgeCount=0,this.pointPositions=_e,this.pointColors=ve,this.pointUVs=le,this.pointSizes=Ae,this.pointIds=ce,this.pointVAO=Be,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Xe,this.contourVAO=Ye,this.contourCount=0,this.contourColor=[0,0,0],this.contourEnable=!0,this.pickVertex=!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=z,this._view=z,this._projection=z,this._resolution=[1,1]}var O=I.prototype;O.isOpaque=function(){return!this.hasAlpha},O.isTransparent=function(){return this.hasAlpha},O.pickSlots=1,O.setPickBase=function(se){this.pickId=se};function D(se,G){if(!G||!G.length)return 1;for(var X=0;Xse&&X>0){var K=(G[X][0]-se)/(G[X][0]-G[X-1][0]);return G[X][1]*(1-K)+K*G[X-1][1]}}return 1}function B(se,G){for(var X=i({colormap:se,nshades:256,format:"rgba"}),K=new Uint8Array(256*4),H=0;H<256;++H){for(var Y=X[H],q=0;q<3;++q)K[4*H+q]=Y[q];G?K[4*H+3]=255*D(H/255,G):K[4*H+3]=255*Y[3]}return g(K,[256,256,4],[4,0,1])}function F(se){for(var G=se.length,X=new Array(G),K=0;K0){var we=this.triShader;we.bind(),we.uniforms=Z,this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var we=this.lineShader;we.bind(),we.uniforms=Z,this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var we=this.pointShader;we.bind(),we.uniforms=Z,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var we=this.contourShader;we.bind(),we.uniforms=Z,this.contourVAO.bind(),G.drawArrays(G.LINES,0,this.contourCount),this.contourVAO.unbind()}},O.drawPick=function(se){se=se||{};for(var G=this.gl,X=se.model||z,K=se.view||z,H=se.projection||z,Y=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],q=0;q<3;++q)Y[0][q]=Math.max(Y[0][q],this.clipBounds[0][q]),Y[1][q]=Math.min(Y[1][q],this.clipBounds[1][q]);this._model=[].slice.call(X),this._view=[].slice.call(K),this._projection=[].slice.call(H),this._resolution=[G.drawingBufferWidth,G.drawingBufferHeight];var Z={model:X,view:K,projection:H,clipBounds:Y,pickId:this.pickId/255},ee=this.pickShader;if(ee.bind(),ee.uniforms=Z,this.triangleCount>0&&(this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ee=this.pointPickShader;ee.bind(),ee.uniforms=Z,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}},O.pick=function(se){if(!se||se.id!==this.pickId)return null;for(var G=se.value[0]+256*se.value[1]+65536*se.value[2],X=this.cells[G],K=this.positions,H=new Array(X.length),Y=0;YMath.abs(u))i.rotate(z,0,0,-f*A*Math.PI*_.rotateSpeed/window.innerWidth);else if(!_._ortho){var I=-_.zoomSpeed*x*u/window.innerHeight*(z-i.lastT())/20;i.pan(z,0,0,S*(Math.exp(I)-1))}}},!0)},_.enableMouseListeners(),_}},799:function(l,e,t){var n=t(3236),r=t(9405),a=n([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); -}`]),i=a([`precision mediump float; +}`]),o=n([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; @@ -1238,7 +1241,7 @@ varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); -}`]);l.exports=function(s){return r(s,n,i,null,[{name:"position",type:"vec2"}])}},4100:function(l,e,t){"use strict";var a=t(4437),r=t(3837),n=t(5445),i=t(4449),s=t(3589),c=t(2260),p=t(7169),f=t(351),d=t(4772),y=t(4040),o=t(799),x=t(9216)({tablet:!0,featureDetect:!0});l.exports={createScene:A,createCamera:a};function M(){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 T(h,b){var _=null;try{_=h.getContext("webgl",b),_||(_=h.getContext("experimental-webgl",b))}catch{return null}return _}function E(h){var b=Math.round(Math.log(Math.abs(h))/Math.log(10));if(b<0){var _=Math.round(Math.pow(10,-b));return Math.ceil(h*_)/_}else if(b>0){var _=Math.round(Math.pow(10,b));return Math.ceil(h/_)*_}return Math.ceil(h)}function g(h){return typeof h=="boolean"?h:!0}function A(h){h=h||{},h.camera=h.camera||{};var b=h.canvas;if(!b)if(b=document.createElement("canvas"),h.container){var _=h.container;_.appendChild(b)}else document.body.appendChild(b);var I=h.gl;if(I||(h.glOptions&&(x=!!h.glOptions.preserveDrawingBuffer),I=T(b,h.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:x})),!I)throw new Error("webgl not supported");var C=h.bounds||[[-10,-10,-10],[10,10,10]],F=new M,R=c(I,I.drawingBufferWidth,I.drawingBufferHeight,{preferFloat:!x}),z=o(I),D=h.cameraObject&&h.cameraObject._ortho===!0||h.camera.projection&&h.camera.projection.type==="orthographic"||!1,k={eye:h.camera.eye||[2,0,0],center:h.camera.center||[0,0,0],up:h.camera.up||[0,1,0],zoomMin:h.camera.zoomMax||.1,zoomMax:h.camera.zoomMin||100,mode:h.camera.mode||"turntable",_ortho:D},B=h.axes||{},O=r(I,B);O.enable=!B.disable;var q=h.spikes||{},Y=i(I,q),ee=[],te=[],ae=[],U=[],H=!0,X=!0,K=new Array(16),V=new Array(16),$={view:null,projection:K,model:V,_ortho:!1},X=!0,Z=[I.drawingBufferWidth,I.drawingBufferHeight],Q=h.cameraObject||a(b,k),re={gl:I,contextLost:!1,pixelRatio:h.pixelRatio||1,canvas:b,selection:F,camera:Q,axes:O,axesPixels:null,spikes:Y,bounds:C,objects:ee,shape:Z,aspect:h.aspectRatio||[1,1,1],pickRadius:h.pickRadius||10,zNear:h.zNear||.01,zFar:h.zFar||1e3,fovy:h.fovy||Math.PI/4,clearColor:h.clearColor||[0,0,0,0],autoResize:g(h.autoResize),autoBounds:g(h.autoBounds),autoScale:!!h.autoScale,autoCenter:g(h.autoCenter),clipToBounds:g(h.clipToBounds),snapToData:!!h.snapToData,onselect:h.onselect||null,onrender:h.onrender||null,onclick:h.onclick||null,cameraParams:$,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(he){this.aspect[0]=he.x,this.aspect[1]=he.y,this.aspect[2]=he.z,X=!0},setBounds:function(he,oe){this.bounds[0][he]=oe.min,this.bounds[1][he]=oe.max},setClearColor:function(he){this.clearColor=he},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},ce=[I.drawingBufferWidth/re.pixelRatio|0,I.drawingBufferHeight/re.pixelRatio|0];function me(){if(!re._stopped&&re.autoResize){var he=b.parentNode,oe=1,le=1;he&&he!==document.body?(oe=he.clientWidth,le=he.clientHeight):(oe=window.innerWidth,le=window.innerHeight);var ne=Math.ceil(oe*re.pixelRatio)|0,be=Math.ceil(le*re.pixelRatio)|0;if(ne!==b.width||be!==b.height){b.width=ne,b.height=be;var Fe=b.style;Fe.position=Fe.position||"absolute",Fe.left="0px",Fe.top="0px",Fe.width=oe+"px",Fe.height=le+"px",H=!0}}}re.autoResize&&me(),window.addEventListener("resize",me);function ye(){for(var he=ee.length,oe=U.length,le=0;le0&&ae[oe-1]===0;)ae.pop(),U.pop().dispose()}re.update=function(he){re._stopped||(he=he||{},H=!0,X=!0)},re.add=function(he){re._stopped||(he.axes=O,ee.push(he),te.push(-1),H=!0,X=!0,ye())},re.remove=function(he){if(!re._stopped){var oe=ee.indexOf(he);oe<0||(ee.splice(oe,1),te.pop(),H=!0,X=!0,ye())}},re.dispose=function(){if(!re._stopped&&(re._stopped=!0,window.removeEventListener("resize",me),b.removeEventListener("webglcontextlost",Ae),re.mouseListener.enabled=!1,!re.contextLost)){O.dispose(),Y.dispose();for(var he=0;heF.distance)continue;for(var st=0;st1e-6?(x=Math.acos(M),T=Math.sin(x),E=Math.sin((1-n)*x)/T,g=Math.sin(n*x)/T):(E=1-n,g=n),t[0]=E*i+g*f,t[1]=E*s+g*d,t[2]=E*c+g*y,t[3]=E*p+g*o,t}},5964:function(l){"use strict";l.exports=function(e){return!e&&e!==0?"":e.toString()}},9366:function(l,e,t){"use strict";var a=t(4359);l.exports=n;var r={};function n(i,s,c){var p=[s.style,s.weight,s.variant,s.family].join("_"),f=r[p];if(f||(f=r[p]={}),i in f)return f[i];var d={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};d.triangles=!0;var y=a(i,d);d.triangles=!1;var o=a(i,d),x,M;if(c&&c!==1){for(x=0;x0){var x=Math.round(Math.pow(10,A));return Math.ceil(u/x)*x}return Math.ceil(u)}function _(u){return typeof u=="boolean"?u:!0}function T(u){u=u||{},u.camera=u.camera||{};var A=u.canvas;if(!A)if(A=document.createElement("canvas"),u.container){var x=u.container;x.appendChild(A)}else document.body.appendChild(A);var z=u.gl;if(z||(u.glOptions&&(w=!!u.glOptions.preserveDrawingBuffer),z=M(A,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:w})),!z)throw new Error("webgl not supported");var I=u.bounds||[[-10,-10,-10],[10,10,10]],O=new S,D=c(z,z.drawingBufferWidth,z.drawingBufferHeight,{preferFloat:!w}),B=i(z),F=u.cameraObject&&u.cameraObject._ortho===!0||u.camera.projection&&u.camera.projection.type==="orthographic"||!1,P={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:F},j=u.axes||{},U=r(z,j);U.enable=!j.disable;var $=u.spikes||{},Q=o(z,$),re=[],ne=[],se=[],G=[],X=!0,q=!0,K=new Array(16),H=new Array(16),Y={view:null,projection:K,model:H,_ortho:!1},q=!0,Z=[z.drawingBufferWidth,z.drawingBufferHeight],ee=u.cameraObject||n(A,P),ae={gl:z,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:A,selection:O,camera:ee,axes:U,axesPixels:null,spikes:Q,bounds:I,objects:re,shape:Z,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:_(u.autoResize),autoBounds:_(u.autoBounds),autoScale:!!u.autoScale,autoCenter:_(u.autoCenter),clipToBounds:_(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:Y,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(_e){this.aspect[0]=_e.x,this.aspect[1]=_e.y,this.aspect[2]=_e.z,q=!0},setBounds:function(_e,ce){this.bounds[0][_e]=ce.min,this.bounds[1][_e]=ce.max},setClearColor:function(_e){this.clearColor=_e},clearRGBA:function(){this.gl.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),this.gl.clear(this.gl.COLOR_BUFFER_BIT|this.gl.DEPTH_BUFFER_BIT)}},he=[z.drawingBufferWidth/ae.pixelRatio|0,z.drawingBufferHeight/ae.pixelRatio|0];function xe(){if(!ae._stopped&&ae.autoResize){var _e=A.parentNode,ce=1,ve=1;_e&&_e!==document.body?(ce=_e.clientWidth,ve=_e.clientHeight):(ce=window.innerWidth,ve=window.innerHeight);var le=Math.ceil(ce*ae.pixelRatio)|0,Ae=Math.ceil(ve*ae.pixelRatio)|0;if(le!==A.width||Ae!==A.height){A.width=le,A.height=Ae;var Be=A.style;Be.position=Be.position||"absolute",Be.left="0px",Be.top="0px",Be.width=ce+"px",Be.height=ve+"px",X=!0}}}ae.autoResize&&xe(),window.addEventListener("resize",xe);function we(){for(var _e=re.length,ce=G.length,ve=0;ve0&&se[ce-1]===0;)se.pop(),G.pop().dispose()}ae.update=function(_e){ae._stopped||(_e=_e||{},X=!0,q=!0)},ae.add=function(_e){ae._stopped||(_e.axes=U,re.push(_e),ne.push(-1),X=!0,q=!0,we())},ae.remove=function(_e){if(!ae._stopped){var ce=re.indexOf(_e);ce<0||(re.splice(ce,1),ne.pop(),X=!0,q=!0,we())}},ae.dispose=function(){if(!ae._stopped&&(ae._stopped=!0,window.removeEventListener("resize",xe),A.removeEventListener("webglcontextlost",Me),ae.mouseListener.enabled=!1,!ae.contextLost)){U.dispose(),Q.dispose();for(var _e=0;_eO.distance)continue;for(var gt=0;gt1e-6?(w=Math.acos(S),M=Math.sin(w),C=Math.sin((1-a)*w)/M,_=Math.sin(a*w)/M):(C=1-a,_=a),t[0]=C*o+_*h,t[1]=C*s+_*v,t[2]=C*c+_*g,t[3]=C*m+_*i,t}},5964:function(l){"use strict";l.exports=function(e){return!e&&e!==0?"":e.toString()}},9366:function(l,e,t){"use strict";var n=t(4359);l.exports=a;var r={};function a(o,s,c){var m=[s.style,s.weight,s.variant,s.family].join("_"),h=r[m];if(h||(h=r[m]={}),o in h)return h[o];var v={textAlign:"center",textBaseline:"middle",lineHeight:1,font:s.family,fontStyle:s.style,fontWeight:s.weight,fontVariant:s.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};v.triangles=!0;var g=n(o,v);v.triangles=!1;var i=n(o,v),w,S;if(c&&c!==1){for(w=0;w1?1:V}function m(V,$,X,Z,Q,re,ce,me,ye,Ae,Se,Ce){this.gl=V,this.pixelRatio=1,this.shader=$,this.orthoShader=X,this.projectShader=Z,this.pointBuffer=Q,this.colorBuffer=re,this.glyphBuffer=ce,this.idBuffer=me,this.vao=ye,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Ae,this.pickOrthoShader=Se,this.pickProjectShader=Ce,this.points=[],this._selectResult=new g(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}var h=m.prototype;h.pickSlots=1,h.setPickBase=function(V){this.pickId=V},h.isTransparent=function(){if(this.hasAlpha)return!0;for(var V=0;V<3;++V)if(this.axesProject[V]&&this.projectHasAlpha)return!0;return!1},h.isOpaque=function(){if(!this.hasAlpha)return!0;for(var V=0;V<3;++V)if(this.axesProject[V]&&!this.projectHasAlpha)return!0;return!1};var b=[0,0],_=[0,0,0],I=[0,0,0],C=[0,0,0,1],F=[0,0,0,1],R=d.slice(),z=[0,0,0],D=[[0,0,0],[0,0,0]];function k(V){return V[0]=V[1]=V[2]=0,V}function B(V,$){return V[0]=$[0],V[1]=$[1],V[2]=$[2],V[3]=1,V}function O(V,$,X,Z){return V[0]=$[0],V[1]=$[1],V[2]=$[2],V[X]=Z,V}function q(V){for(var $=D,X=0;X<2;++X)for(var Z=0;Z<3;++Z)$[X][Z]=Math.max(Math.min(V[X][Z],1e8),-1e8);return $}function Y(V,$,X,Z){var Q=$.axesProject,re=$.gl,ce=V.uniforms,me=X.model||d,ye=X.view||d,Ae=X.projection||d,Se=$.axesBounds,Ce=q($.clipBounds),qe;$.axes&&$.axes.lastCubeProps?qe=$.axes.lastCubeProps.axis:qe=[1,1,1],b[0]=2/re.drawingBufferWidth,b[1]=2/re.drawingBufferHeight,V.bind(),ce.view=ye,ce.projection=Ae,ce.screenSize=b,ce.highlightId=$.highlightId,ce.highlightScale=$.highlightScale,ce.clipBounds=Ce,ce.pickGroup=$.pickId/255,ce.pixelRatio=Z;for(var Ue=0;Ue<3;++Ue)if(Q[Ue]){ce.scale=$.projectScale[Ue],ce.opacity=$.projectOpacity[Ue];for(var xe=R,he=0;he<16;++he)xe[he]=0;for(var he=0;he<4;++he)xe[5*he]=1;xe[5*Ue]=0,qe[Ue]<0?xe[12+Ue]=Se[0][Ue]:xe[12+Ue]=Se[1][Ue],s(xe,me,xe),ce.model=xe;var oe=(Ue+1)%3,le=(Ue+2)%3,ne=k(_),be=k(I);ne[oe]=1,be[le]=1;var Fe=E(Ae,ye,me,B(C,ne)),Ve=E(Ae,ye,me,B(F,be));if(Math.abs(Fe[1])>Math.abs(Ve[1])){var je=Fe;Fe=Ve,Ve=je,je=ne,ne=be,be=je;var ut=oe;oe=le,le=ut}Fe[0]<0&&(ne[oe]=-1),Ve[1]>0&&(be[le]=-1);for(var st=0,yt=0,he=0;he<4;++he)st+=Math.pow(me[4*oe+he],2),yt+=Math.pow(me[4*le+he],2);ne[oe]/=Math.sqrt(st),be[le]/=Math.sqrt(yt),ce.axes[0]=ne,ce.axes[1]=be,ce.fragClipBounds[0]=O(z,Ce[0],Ue,-1e8),ce.fragClipBounds[1]=O(z,Ce[1],Ue,1e8),$.vao.bind(),$.vao.draw(re.TRIANGLES,$.vertexCount),$.lineWidth>0&&(re.lineWidth($.lineWidth*Z),$.vao.draw(re.LINES,$.lineVertexCount,$.vertexCount)),$.vao.unbind()}}var ee=[-1e8,-1e8,-1e8],te=[1e8,1e8,1e8],ae=[ee,te];function U(V,$,X,Z,Q,re,ce){var me=X.gl;if((re===X.projectHasAlpha||ce)&&Y($,X,Z,Q),re===X.hasAlpha||ce){V.bind();var ye=V.uniforms;ye.model=Z.model||d,ye.view=Z.view||d,ye.projection=Z.projection||d,b[0]=2/me.drawingBufferWidth,b[1]=2/me.drawingBufferHeight,ye.screenSize=b,ye.highlightId=X.highlightId,ye.highlightScale=X.highlightScale,ye.fragClipBounds=ae,ye.clipBounds=X.axes.bounds,ye.opacity=X.opacity,ye.pickGroup=X.pickId/255,ye.pixelRatio=Q,X.vao.bind(),X.vao.draw(me.TRIANGLES,X.vertexCount),X.lineWidth>0&&(me.lineWidth(X.lineWidth*Q),X.vao.draw(me.LINES,X.lineVertexCount,X.vertexCount)),X.vao.unbind()}}h.draw=function(V){var $=this.useOrtho?this.orthoShader:this.shader;U($,this.projectShader,this,V,this.pixelRatio,!1,!1)},h.drawTransparent=function(V){var $=this.useOrtho?this.orthoShader:this.shader;U($,this.projectShader,this,V,this.pixelRatio,!0,!1)},h.drawPick=function(V){var $=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;U($,this.pickProjectShader,this,V,1,!0,!0)},h.pick=function(V){if(!V||V.id!==this.pickId)return null;var $=V.value[2]+(V.value[1]<<8)+(V.value[0]<<16);if($>=this.pointCount||$<0)return null;var X=this.points[$],Z=this._selectResult;Z.index=$;for(var Q=0;Q<3;++Q)Z.position[Q]=Z.dataCoordinate[Q]=X[Q];return Z},h.highlight=function(V){if(!V)this.highlightId=[1,1,1,1];else{var $=V.index,X=$&255,Z=$>>8&255,Q=$>>16&255;this.highlightId=[X/255,Z/255,Q/255,0]}};function H(V,$,X,Z){var Q;M(V)?$0){var Kt=0,nt=le,Ee=[0,0,0,1],ze=[0,0,0,1],ve=M(qe)&&M(qe[0]),_e=M(he)&&M(he[0]);e:for(var Z=0;Z0?1-yt[0][0]:ht<0?1+yt[1][0]:1,gt*=gt>0?1-yt[0][1]:gt<0?1+yt[1][1]:1;for(var _t=[ht,gt],ra=ut.cells||[],$r=ut.positions||[],Ve=0;Vethis.buffer.length){r.free(this.buffer);for(var M=this.buffer=r.mallocUint8(i(x*o*4)),T=0;TM)for(o=M;ox)for(o=x;o=0){for(var D=z.type.charAt(z.type.length-1)|0,k=new Array(D),B=0;B=0;)O+=1;F[R]=O}var q=new Array(M.length);function Y(){g.program=i.program(A,g._vref,g._fref,C,F);for(var ee=0;ee=0){var h=A.charCodeAt(A.length-1)-48;if(h<2||h>4)throw new a("","Invalid data type for attribute "+g+": "+A);s(f,d,m[0],o,h,x,g)}else if(A.indexOf("mat")>=0){var h=A.charCodeAt(A.length-1)-48;if(h<2||h>4)throw new a("","Invalid data type for attribute "+g+": "+A);c(f,d,m,o,h,x,g)}else throw new a("","Unknown data type for attribute "+g+": "+A);break}}return x}},3327:function(l,e,t){"use strict";var a=t(216),r=t(8866);l.exports=s;function n(c){return function(){return c}}function i(c,p){for(var f=new Array(c),d=0;d4)throw new r("","Invalid data type");switch(O.charAt(0)){case"b":case"i":c["uniform"+q+"iv"](d[F],R);break;case"v":c["uniform"+q+"fv"](d[F],R);break;default:throw new r("","Unrecognized data type for vector "+name+": "+O)}}else if(O.indexOf("mat")===0&&O.length===4){if(q=O.charCodeAt(O.length-1)-48,q<2||q>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+O);c["uniformMatrix"+q+"fv"](d[F],!1,R);break}else throw new r("","Unknown uniform data type for "+name+": "+O)}}}}}function x(A,m){if(typeof m!="object")return[[A,m]];var h=[];for(var b in m){var _=m[b],I=A;parseInt(b)+""===b?I+="["+b+"]":I+="."+b,typeof _=="object"?h.push.apply(h,x(I,_)):h.push([I,_])}return h}function M(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var m=A.indexOf("vec");if(0<=m&&m<=1&&A.length===4+m){var h=A.charCodeAt(A.length-1)-48;if(h<2||h>4)throw new r("","Invalid data type");return A.charAt(0)==="b"?i(h,!1):i(h,0)}else if(A.indexOf("mat")===0&&A.length===4){var h=A.charCodeAt(A.length-1)-48;if(h<2||h>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+A);return i(h*h,0)}else throw new r("","Unknown uniform data type for "+name+": "+A)}}function T(A,m,h){if(typeof h=="object"){var b=E(h);Object.defineProperty(A,m,{get:n(b),set:o(h),enumerable:!0,configurable:!1})}else d[h]?Object.defineProperty(A,m,{get:y(h),set:o(h),enumerable:!0,configurable:!1}):A[m]=M(f[h].type)}function E(A){var m;if(Array.isArray(A)){m=new Array(A.length);for(var h=0;h1){f[0]in c||(c[f[0]]=[]),c=c[f[0]];for(var d=1;d1)for(var x=0;x"u"?t(606):WeakMap,i=new n,s=0;function c(T,E,g,A,m,h,b){this.id=T,this.src=E,this.type=g,this.shader=A,this.count=h,this.programs=[],this.cache=b}c.prototype.dispose=function(){if(--this.count===0){for(var T=this.cache,E=T.gl,g=this.programs,A=0,m=g.length;A1?1:H}function f(H,Y,q,Z,ee,ae,he,xe,we,Me,Se,Ie){this.gl=H,this.pixelRatio=1,this.shader=Y,this.orthoShader=q,this.projectShader=Z,this.pointBuffer=ee,this.colorBuffer=ae,this.glyphBuffer=he,this.idBuffer=xe,this.vao=we,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=Me,this.pickOrthoShader=Se,this.pickProjectShader=Ie,this.points=[],this._selectResult=new _(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}var u=f.prototype;u.pickSlots=1,u.setPickBase=function(H){this.pickId=H},u.isTransparent=function(){if(this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&this.projectHasAlpha)return!0;return!1},u.isOpaque=function(){if(!this.hasAlpha)return!0;for(var H=0;H<3;++H)if(this.axesProject[H]&&!this.projectHasAlpha)return!0;return!1};var A=[0,0],x=[0,0,0],z=[0,0,0],I=[0,0,0,1],O=[0,0,0,1],D=v.slice(),B=[0,0,0],F=[[0,0,0],[0,0,0]];function P(H){return H[0]=H[1]=H[2]=0,H}function j(H,Y){return H[0]=Y[0],H[1]=Y[1],H[2]=Y[2],H[3]=1,H}function U(H,Y,q,Z){return H[0]=Y[0],H[1]=Y[1],H[2]=Y[2],H[q]=Z,H}function $(H){for(var Y=F,q=0;q<2;++q)for(var Z=0;Z<3;++Z)Y[q][Z]=Math.max(Math.min(H[q][Z],1e8),-1e8);return Y}function Q(H,Y,q,Z){var ee=Y.axesProject,ae=Y.gl,he=H.uniforms,xe=q.model||v,we=q.view||v,Me=q.projection||v,Se=Y.axesBounds,Ie=$(Y.clipBounds),Ve;Y.axes&&Y.axes.lastCubeProps?Ve=Y.axes.lastCubeProps.axis:Ve=[1,1,1],A[0]=2/ae.drawingBufferWidth,A[1]=2/ae.drawingBufferHeight,H.bind(),he.view=we,he.projection=Me,he.screenSize=A,he.highlightId=Y.highlightId,he.highlightScale=Y.highlightScale,he.clipBounds=Ie,he.pickGroup=Y.pickId/255,he.pixelRatio=Z;for(var Ge=0;Ge<3;++Ge)if(ee[Ge]){he.scale=Y.projectScale[Ge],he.opacity=Y.projectOpacity[Ge];for(var ke=D,_e=0;_e<16;++_e)ke[_e]=0;for(var _e=0;_e<4;++_e)ke[5*_e]=1;ke[5*Ge]=0,Ve[Ge]<0?ke[12+Ge]=Se[0][Ge]:ke[12+Ge]=Se[1][Ge],s(ke,xe,ke),he.model=ke;var ce=(Ge+1)%3,ve=(Ge+2)%3,le=P(x),Ae=P(z);le[ce]=1,Ae[ve]=1;var Be=C(Me,we,xe,j(I,le)),Xe=C(Me,we,xe,j(O,Ae));if(Math.abs(Be[1])>Math.abs(Xe[1])){var Ye=Be;Be=Xe,Xe=Ye,Ye=le,le=Ae,Ae=Ye;var yt=ce;ce=ve,ve=yt}Be[0]<0&&(le[ce]=-1),Xe[1]>0&&(Ae[ve]=-1);for(var gt=0,Tt=0,_e=0;_e<4;++_e)gt+=Math.pow(xe[4*ce+_e],2),Tt+=Math.pow(xe[4*ve+_e],2);le[ce]/=Math.sqrt(gt),Ae[ve]/=Math.sqrt(Tt),he.axes[0]=le,he.axes[1]=Ae,he.fragClipBounds[0]=U(B,Ie[0],Ge,-1e8),he.fragClipBounds[1]=U(B,Ie[1],Ge,1e8),Y.vao.bind(),Y.vao.draw(ae.TRIANGLES,Y.vertexCount),Y.lineWidth>0&&(ae.lineWidth(Y.lineWidth*Z),Y.vao.draw(ae.LINES,Y.lineVertexCount,Y.vertexCount)),Y.vao.unbind()}}var re=[-1e8,-1e8,-1e8],ne=[1e8,1e8,1e8],se=[re,ne];function G(H,Y,q,Z,ee,ae,he){var xe=q.gl;if((ae===q.projectHasAlpha||he)&&Q(Y,q,Z,ee),ae===q.hasAlpha||he){H.bind();var we=H.uniforms;we.model=Z.model||v,we.view=Z.view||v,we.projection=Z.projection||v,A[0]=2/xe.drawingBufferWidth,A[1]=2/xe.drawingBufferHeight,we.screenSize=A,we.highlightId=q.highlightId,we.highlightScale=q.highlightScale,we.fragClipBounds=se,we.clipBounds=q.axes.bounds,we.opacity=q.opacity,we.pickGroup=q.pickId/255,we.pixelRatio=ee,q.vao.bind(),q.vao.draw(xe.TRIANGLES,q.vertexCount),q.lineWidth>0&&(xe.lineWidth(q.lineWidth*ee),q.vao.draw(xe.LINES,q.lineVertexCount,q.vertexCount)),q.vao.unbind()}}u.draw=function(H){var Y=this.useOrtho?this.orthoShader:this.shader;G(Y,this.projectShader,this,H,this.pixelRatio,!1,!1)},u.drawTransparent=function(H){var Y=this.useOrtho?this.orthoShader:this.shader;G(Y,this.projectShader,this,H,this.pixelRatio,!0,!1)},u.drawPick=function(H){var Y=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;G(Y,this.pickProjectShader,this,H,1,!0,!0)},u.pick=function(H){if(!H||H.id!==this.pickId)return null;var Y=H.value[2]+(H.value[1]<<8)+(H.value[0]<<16);if(Y>=this.pointCount||Y<0)return null;var q=this.points[Y],Z=this._selectResult;Z.index=Y;for(var ee=0;ee<3;++ee)Z.position[ee]=Z.dataCoordinate[ee]=q[ee];return Z},u.highlight=function(H){if(!H)this.highlightId=[1,1,1,1];else{var Y=H.index,q=Y&255,Z=Y>>8&255,ee=Y>>16&255;this.highlightId=[q/255,Z/255,ee/255,0]}};function X(H,Y,q,Z){var ee;S(H)?Y0){var or=0,Ot=ve,vt=[0,0,0,1],ht=[0,0,0,1],De=S(Ve)&&S(Ve[0]),Ne=S(_e)&&S(_e[0]);e:for(var Z=0;Z0?1-Tt[0][0]:Pt<0?1+Tt[1][0]:1,Ct*=Ct>0?1-Tt[0][1]:Ct<0?1+Tt[1][1]:1;for(var qt=[Pt,Ct],Yt=yt.cells||[],Rt=yt.positions||[],Xe=0;Xethis.buffer.length){r.free(this.buffer);for(var S=this.buffer=r.mallocUint8(o(w*i*4)),M=0;MS)for(i=S;iw)for(i=w;i=0){for(var F=B.type.charAt(B.type.length-1)|0,P=new Array(F),j=0;j=0;)U+=1;O[D]=U}var $=new Array(S.length);function Q(){_.program=o.program(T,_._vref,_._fref,I,O);for(var re=0;re=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+T);s(h,v,f[0],i,u,w,_)}else if(T.indexOf("mat")>=0){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new n("","Invalid data type for attribute "+_+": "+T);c(h,v,f,i,u,w,_)}else throw new n("","Unknown data type for attribute "+_+": "+T);break}}return w}},3327:function(l,e,t){"use strict";var n=t(216),r=t(8866);l.exports=s;function a(c){return function(){return c}}function o(c,m){for(var h=new Array(c),v=0;v4)throw new r("","Invalid data type");switch(U.charAt(0)){case"b":case"i":c["uniform"+$+"iv"](v[O],D);break;case"v":c["uniform"+$+"fv"](v[O],D);break;default:throw new r("","Unrecognized data type for vector "+name+": "+U)}}else if(U.indexOf("mat")===0&&U.length===4){if($=U.charCodeAt(U.length-1)-48,$<2||$>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+U);c["uniformMatrix"+$+"fv"](v[O],!1,D);break}else throw new r("","Unknown uniform data type for "+name+": "+U)}}}}}function w(T,f){if(typeof f!="object")return[[T,f]];var u=[];for(var A in f){var x=f[A],z=T;parseInt(A)+""===A?z+="["+A+"]":z+="."+A,typeof x=="object"?u.push.apply(u,w(z,x)):u.push([z,x])}return u}function S(T){switch(T){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var f=T.indexOf("vec");if(0<=f&&f<=1&&T.length===4+f){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid data type");return T.charAt(0)==="b"?o(u,!1):o(u,0)}else if(T.indexOf("mat")===0&&T.length===4){var u=T.charCodeAt(T.length-1)-48;if(u<2||u>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+T);return o(u*u,0)}else throw new r("","Unknown uniform data type for "+name+": "+T)}}function M(T,f,u){if(typeof u=="object"){var A=C(u);Object.defineProperty(T,f,{get:a(A),set:i(u),enumerable:!0,configurable:!1})}else v[u]?Object.defineProperty(T,f,{get:g(u),set:i(u),enumerable:!0,configurable:!1}):T[f]=S(h[u].type)}function C(T){var f;if(Array.isArray(T)){f=new Array(T.length);for(var u=0;u1){h[0]in c||(c[h[0]]=[]),c=c[h[0]];for(var v=1;v1)for(var w=0;w"u"?t(606):WeakMap,o=new a,s=0;function c(M,C,_,T,f,u,A){this.id=M,this.src=C,this.type=_,this.shader=T,this.count=u,this.programs=[],this.cache=A}c.prototype.dispose=function(){if(--this.count===0){for(var M=this.cache,C=M.gl,_=this.programs,T=0,f=_.length;T0)for(var U=0;UE)return A-1}return A},p=function(T,E,g){return Tg?g:T},f=function(T,E,g){var A=E.vectors,m=E.meshgrid,h=T[0],b=T[1],_=T[2],I=m[0].length,C=m[1].length,F=m[2].length,R=c(m[0],h),z=c(m[1],b),D=c(m[2],_),k=R+1,B=z+1,O=D+1;if(R=p(R,0,I-1),k=p(k,0,I-1),z=p(z,0,C-1),B=p(B,0,C-1),D=p(D,0,F-1),O=p(O,0,F-1),R<0||z<0||D<0||k>I-1||B>C-1||O>F-1)return a.create();var q=m[0][R],Y=m[0][k],ee=m[1][z],te=m[1][B],ae=m[2][D],U=m[2][O],H=(h-q)/(Y-q),K=(b-ee)/(te-ee),V=(_-ae)/(U-ae);isFinite(H)||(H=.5),isFinite(K)||(K=.5),isFinite(V)||(V=.5);var $,X,Z,Q,re,ce;switch(g.reversedX&&(R=I-1-R,k=I-1-k),g.reversedY&&(z=C-1-z,B=C-1-B),g.reversedZ&&(D=F-1-D,O=F-1-O),g.filled){case 5:re=D,ce=O,Z=z*F,Q=B*F,$=R*F*C,X=k*F*C;break;case 4:re=D,ce=O,$=R*F,X=k*F,Z=z*F*I,Q=B*F*I;break;case 3:Z=z,Q=B,re=D*C,ce=O*C,$=R*C*F,X=k*C*F;break;case 2:Z=z,Q=B,$=R*C,X=k*C,re=D*C*I,ce=O*C*I;break;case 1:$=R,X=k,re=D*I,ce=O*I,Z=z*I*F,Q=B*I*F;break;default:$=R,X=k,Z=z*I,Q=B*I,re=D*I*C,ce=O*I*C;break}var me=A[$+Z+re],ye=A[$+Z+ce],Ae=A[$+Q+re],Se=A[$+Q+ce],Ce=A[X+Z+re],qe=A[X+Z+ce],Ue=A[X+Q+re],xe=A[X+Q+ce],he=a.create(),oe=a.create(),le=a.create(),ne=a.create();a.lerp(he,me,Ce,H),a.lerp(oe,ye,qe,H),a.lerp(le,Ae,Ue,H),a.lerp(ne,Se,xe,H);var be=a.create(),Fe=a.create();a.lerp(be,he,le,K),a.lerp(Fe,oe,ne,K);var Ve=a.create();return a.lerp(Ve,be,Fe,V),Ve},d=function(T,E){var g=E[0],A=E[1],m=E[2];return T[0]=g<0?-g:g,T[1]=A<0?-A:A,T[2]=m<0?-m:m,T},y=function(T){var E=1/0;T.sort(function(h,b){return h-b});for(var g=T.length,A=1;Ak||xeB||heO)},Y=a.distance(E[0],E[1]),ee=10*Y/A,te=ee*ee,ae=1,U=0,H=g.length;H>1&&(ae=o(g));for(var K=0;KU&&(U=me),re.push(me),F.push({points:$,velocities:X,divergences:re});for(var ye=0;yete&&a.scale(Ae,Ae,ee/Math.sqrt(Se)),a.add(Ae,Ae,V),Z=I(Ae),a.squaredDistance(Q,Ae)-te>-1e-4*te){$.push(Ae),Q=Ae,X.push(Z);var ce=C(Ae,Z),me=a.length(ce);isFinite(me)&&me>U&&(U=me),re.push(me)}V=Ae}}var Ce=s(F,T.colormap,U,ae);return h?Ce.tubeScale=h:(U===0&&(U=1),Ce.tubeScale=m*.5*ae/U),Ce};var x=t(6740),M=t(6405).createMesh;l.exports.createTubeMesh=function(T,E){return M(T,E,{shaders:x,traceType:"streamtube"})}},990:function(l,e,t){var a=t(9405),r=t(3236),n=r([`precision highp float; +}`]);e.meshShader={vertex:r,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},e.pickShader={vertex:o,fragment:s,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7815:function(l,e,t){"use strict";var n=t(2931),r=t(9970),a=["xyz","xzy","yxz","yzx","zxy","zyx"],o=function(M,C,_,T){for(var f=M.points,u=M.velocities,A=M.divergences,x=[],z=[],I=[],O=[],D=[],B=[],F=0,P=0,j=r.create(),U=r.create(),$=8,Q=0;Q0)for(var G=0;G<$;G++){var X=(G+1)%$;x.push(O[G],D[G],D[X],D[X],O[X],O[G]),I.push(U,j,j,j,U,U),B.push(F,P,P,P,F,F);var K=x.length;z.push([K-6,K-5,K-4],[K-3,K-2,K-1])}var H=O;O=D,D=H;var Y=U;U=j,j=Y;var q=F;F=P,P=q}return{positions:x,cells:z,vectors:I,vertexIntensity:B}},s=function(M,C,_,T){for(var f=0,u=0;uC)return T-1}return T},m=function(M,C,_){return M_?_:M},h=function(M,C,_){var T=C.vectors,f=C.meshgrid,u=M[0],A=M[1],x=M[2],z=f[0].length,I=f[1].length,O=f[2].length,D=c(f[0],u),B=c(f[1],A),F=c(f[2],x),P=D+1,j=B+1,U=F+1;if(D=m(D,0,z-1),P=m(P,0,z-1),B=m(B,0,I-1),j=m(j,0,I-1),F=m(F,0,O-1),U=m(U,0,O-1),D<0||B<0||F<0||P>z-1||j>I-1||U>O-1)return n.create();var $=f[0][D],Q=f[0][P],re=f[1][B],ne=f[1][j],se=f[2][F],G=f[2][U],X=(u-$)/(Q-$),K=(A-re)/(ne-re),H=(x-se)/(G-se);isFinite(X)||(X=.5),isFinite(K)||(K=.5),isFinite(H)||(H=.5);var Y,q,Z,ee,ae,he;switch(_.reversedX&&(D=z-1-D,P=z-1-P),_.reversedY&&(B=I-1-B,j=I-1-j),_.reversedZ&&(F=O-1-F,U=O-1-U),_.filled){case 5:ae=F,he=U,Z=B*O,ee=j*O,Y=D*O*I,q=P*O*I;break;case 4:ae=F,he=U,Y=D*O,q=P*O,Z=B*O*z,ee=j*O*z;break;case 3:Z=B,ee=j,ae=F*I,he=U*I,Y=D*I*O,q=P*I*O;break;case 2:Z=B,ee=j,Y=D*I,q=P*I,ae=F*I*z,he=U*I*z;break;case 1:Y=D,q=P,ae=F*z,he=U*z,Z=B*z*O,ee=j*z*O;break;default:Y=D,q=P,Z=B*z,ee=j*z,ae=F*z*I,he=U*z*I;break}var xe=T[Y+Z+ae],we=T[Y+Z+he],Me=T[Y+ee+ae],Se=T[Y+ee+he],Ie=T[q+Z+ae],Ve=T[q+Z+he],Ge=T[q+ee+ae],ke=T[q+ee+he],_e=n.create(),ce=n.create(),ve=n.create(),le=n.create();n.lerp(_e,xe,Ie,X),n.lerp(ce,we,Ve,X),n.lerp(ve,Me,Ge,X),n.lerp(le,Se,ke,X);var Ae=n.create(),Be=n.create();n.lerp(Ae,_e,ve,K),n.lerp(Be,ce,le,K);var Xe=n.create();return n.lerp(Xe,Ae,Be,H),Xe},v=function(M,C){var _=C[0],T=C[1],f=C[2];return M[0]=_<0?-_:_,M[1]=T<0?-T:T,M[2]=f<0?-f:f,M},g=function(M){var C=1/0;M.sort(function(u,A){return u-A});for(var _=M.length,T=1;T<_;T++){var f=Math.abs(M[T]-M[T-1]);fP||kej||_eU)},Q=n.distance(C[0],C[1]),re=10*Q/T,ne=re*re,se=1,G=0,X=_.length;X>1&&(se=i(_));for(var K=0;KG&&(G=xe),ae.push(xe),O.push({points:Y,velocities:q,divergences:ae});for(var we=0;wene&&n.scale(Me,Me,re/Math.sqrt(Se)),n.add(Me,Me,H),Z=z(Me),n.squaredDistance(ee,Me)-ne>-1e-4*ne){Y.push(Me),ee=Me,q.push(Z);var he=I(Me,Z),xe=n.length(he);isFinite(xe)&&xe>G&&(G=xe),ae.push(xe)}H=Me}}var Ie=s(O,M.colormap,G,se);return u?Ie.tubeScale=u:(G===0&&(G=1),Ie.tubeScale=f*.5*se/G),Ie};var w=t(6740),S=t(6405).createMesh;l.exports.createTubeMesh=function(M,C){return S(M,C,{shaders:w,traceType:"streamtube"})}},990:function(l,e,t){var n=t(9405),r=t(3236),a=r([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; @@ -1819,7 +1822,7 @@ void main() { eyeDirection = eyePosition - cameraCoordinate.xyz; surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); } -`]),i=r([`precision highp float; +`]),o=r([`precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { @@ -1985,15 +1988,13 @@ void main() { vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } -`]);e.createShader=function(p){var f=a(p,n,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},e.createPickShader=function(p){var f=a(p,n,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},e.createContourShader=function(p){var f=a(p,s,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f},e.createPickContourShader=function(p){var f=a(p,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f}},9499:function(l,e,t){"use strict";l.exports=$;var a=t(8828),r=t(2762),n=t(8116),i=t(7766),s=t(1888),c=t(6729),p=t(5298),f=t(9994),d=t(9618),y=t(3711),o=t(6760),x=t(7608),M=t(2478),T=t(6199),E=t(990),g=E.createShader,A=E.createContourShader,m=E.createPickShader,h=E.createPickContourShader,b=4*10,_=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],I=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],C=[[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(){for(var X=0;X<3;++X){var Z=C[X],Q=(X+1)%3,re=(X+2)%3;Z[Q+0]=1,Z[re+3]=1,Z[X+6]=1}})();function F(X,Z,Q,re,ce){this.position=X,this.index=Z,this.uv=Q,this.level=re,this.dataCoordinate=ce}var R=256;function z(X,Z,Q,re,ce,me,ye,Ae,Se,Ce,qe,Ue,xe,he,oe){this.gl=X,this.shape=Z,this.bounds=Q,this.objectOffset=oe,this.intensityBounds=[],this._shader=re,this._pickShader=ce,this._coordinateBuffer=me,this._vao=ye,this._colorMap=Ae,this._contourShader=Se,this._contourPickShader=Ce,this._contourBuffer=qe,this._contourVAO=Ue,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new F([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=xe,this._dynamicVAO=he,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=[d(s.mallocFloat(1024),[0,0]),d(s.mallocFloat(1024),[0,0]),d(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 D=z.prototype;D.genColormap=function(X,Z){var Q=!1,re=f([c({colormap:X,nshades:R,format:"rgba"}).map(function(ce,me){var ye=Z?k(me/255,Z):ce[3];return ye<1&&(Q=!0),[ce[0],ce[1],ce[2],255*ye]})]);return p.divseq(re,255),this.hasAlphaScale=Q,re},D.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},D.isOpaque=function(){return!this.isTransparent()},D.pickSlots=1,D.setPickBase=function(X){this.pickId=X};function k(X,Z){if(!Z||!Z.length)return 1;for(var Q=0;QX&&Q>0){var re=(Z[Q][0]-X)/(Z[Q][0]-Z[Q-1][0]);return Z[Q][1]*(1-re)+re*Z[Q-1][1]}}return 1}var B=[0,0,0],O={showSurface:!1,showContour:!1,projections:[_.slice(),_.slice(),_.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function q(X,Z){var Q,re,ce,me=Z.axes&&Z.axes.lastCubeProps.axis||B,ye=Z.showSurface,Ae=Z.showContour;for(Q=0;Q<3;++Q)for(ye=ye||Z.surfaceProject[Q],re=0;re<3;++re)Ae=Ae||Z.contourProject[Q][re];for(Q=0;Q<3;++Q){var Se=O.projections[Q];for(re=0;re<16;++re)Se[re]=0;for(re=0;re<4;++re)Se[5*re]=1;Se[5*Q]=0,Se[12+Q]=Z.axesBounds[+(me[Q]>0)][Q],o(Se,X.model,Se);var Ce=O.clipBounds[Q];for(ce=0;ce<2;++ce)for(re=0;re<3;++re)Ce[ce][re]=X.clipBounds[ce][re];Ce[0][Q]=-1e8,Ce[1][Q]=1e8}return O.showSurface=ye,O.showContour=Ae,O}var Y={model:_,view:_,projection:_,inverseModel:_.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},ee=_.slice(),te=[1,0,0,0,1,0,0,0,1];function ae(X,Z){X=X||{};var Q=this.gl;Q.disable(Q.CULL_FACE),this._colorMap.bind(0);var re=Y;re.model=X.model||_,re.view=X.view||_,re.projection=X.projection||_,re.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],re.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],re.objectOffset=this.objectOffset,re.contourColor=this.contourColor[0],re.inverseModel=x(re.inverseModel,re.model);for(var ce=0;ce<2;++ce)for(var me=re.clipBounds[ce],ye=0;ye<3;++ye)me[ye]=Math.min(Math.max(this.clipBounds[ce][ye],-1e8),1e8);re.kambient=this.ambientLight,re.kdiffuse=this.diffuseLight,re.kspecular=this.specularLight,re.roughness=this.roughness,re.fresnel=this.fresnel,re.opacity=this.opacity,re.height=0,re.permutation=te,re.vertexColor=this.vertexColor;var Ae=ee;for(o(Ae,re.view,re.model),o(Ae,re.projection,Ae),x(Ae,Ae),ce=0;ce<3;++ce)re.eyePosition[ce]=Ae[12+ce]/Ae[15];var Se=Ae[15];for(ce=0;ce<3;++ce)Se+=this.lightPosition[ce]*Ae[4*ce+3];for(ce=0;ce<3;++ce){var Ce=Ae[12+ce];for(ye=0;ye<3;++ye)Ce+=Ae[4*ye+ce]*this.lightPosition[ye];re.lightPosition[ce]=Ce/Se}var qe=q(re,this);if(qe.showSurface){for(this._shader.bind(),this._shader.uniforms=re,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(Q.TRIANGLES,this._vertexCount),ce=0;ce<3;++ce)!this.surfaceProject[ce]||!this.vertexCount||(this._shader.uniforms.model=qe.projections[ce],this._shader.uniforms.clipBounds=qe.clipBounds[ce],this._vao.draw(Q.TRIANGLES,this._vertexCount));this._vao.unbind()}if(qe.showContour){var Ue=this._contourShader;re.kambient=1,re.kdiffuse=0,re.kspecular=0,re.opacity=1,Ue.bind(),Ue.uniforms=re;var xe=this._contourVAO;for(xe.bind(),ce=0;ce<3;++ce)for(Ue.uniforms.permutation=C[ce],Q.lineWidth(this.contourWidth[ce]*this.pixelRatio),ye=0;ye>4)/16)/255,ce=Math.floor(re),me=re-ce,ye=Z[1]*(X.value[1]+(X.value[2]&15)/16)/255,Ae=Math.floor(ye),Se=ye-Ae;ce+=1,Ae+=1;var Ce=Q.position;Ce[0]=Ce[1]=Ce[2]=0;for(var qe=0;qe<2;++qe)for(var Ue=qe?me:1-me,xe=0;xe<2;++xe)for(var he=xe?Se:1-Se,oe=ce+qe,le=Ae+xe,ne=Ue*he,be=0;be<3;++be)Ce[be]+=this._field[be].get(oe,le)*ne;for(var Fe=this._pickResult.level,Ve=0;Ve<3;++Ve)if(Fe[Ve]=M.le(this.contourLevels[Ve],Ce[Ve]),Fe[Ve]<0)this.contourLevels[Ve].length>0&&(Fe[Ve]=0);else if(Fe[Ve]Math.abs(ut-Ce[Ve])&&(Fe[Ve]+=1)}for(Q.index[0]=me<.5?ce:ce+1,Q.index[1]=Se<.5?Ae:Ae+1,Q.uv[0]=re/Z[0],Q.uv[1]=ye/Z[1],be=0;be<3;++be)Q.dataCoordinate[be]=this._field[be].get(Q.index[0],Q.index[1]);return Q},D.padField=function(X,Z){var Q=Z.shape.slice(),re=X.shape.slice();p.assign(X.lo(1,1).hi(Q[0],Q[1]),Z),p.assign(X.lo(1).hi(Q[0],1),Z.hi(Q[0],1)),p.assign(X.lo(1,re[1]-1).hi(Q[0],1),Z.lo(0,Q[1]-1).hi(Q[0],1)),p.assign(X.lo(0,1).hi(1,Q[1]),Z.hi(1)),p.assign(X.lo(re[0]-1,1).hi(1,Q[1]),Z.lo(Q[0]-1)),X.set(0,0,Z.get(0,0)),X.set(0,re[1]-1,Z.get(0,Q[1]-1)),X.set(re[0]-1,0,Z.get(Q[0]-1,0)),X.set(re[0]-1,re[1]-1,Z.get(Q[0]-1,Q[1]-1))};function H(X,Z){return Array.isArray(X)?[Z(X[0]),Z(X[1]),Z(X[2])]:[Z(X),Z(X),Z(X)]}function K(X){return Array.isArray(X)?X.length===3?[X[0],X[1],X[2],1]:[X[0],X[1],X[2],X[3]]:[0,0,0,1]}function V(X){if(Array.isArray(X)){if(Array.isArray(X))return[K(X[0]),K(X[1]),K(X[2])];var Z=K(X);return[Z.slice(),Z.slice(),Z.slice()]}}D.update=function(X){X=X||{},this.objectOffset=X.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in X&&(this.contourWidth=H(X.contourWidth,Number)),"showContour"in X&&(this.showContour=H(X.showContour,Boolean)),"showSurface"in X&&(this.showSurface=!!X.showSurface),"contourTint"in X&&(this.contourTint=H(X.contourTint,Boolean)),"contourColor"in X&&(this.contourColor=V(X.contourColor)),"contourProject"in X&&(this.contourProject=H(X.contourProject,function(on){return H(on,Boolean)})),"surfaceProject"in X&&(this.surfaceProject=X.surfaceProject),"dynamicColor"in X&&(this.dynamicColor=V(X.dynamicColor)),"dynamicTint"in X&&(this.dynamicTint=H(X.dynamicTint,Number)),"dynamicWidth"in X&&(this.dynamicWidth=H(X.dynamicWidth,Number)),"opacity"in X&&(this.opacity=X.opacity),"opacityscale"in X&&(this.opacityscale=X.opacityscale),"colorBounds"in X&&(this.colorBounds=X.colorBounds),"vertexColor"in X&&(this.vertexColor=X.vertexColor?1:0),"colormap"in X&&this._colorMap.setPixels(this.genColormap(X.colormap,this.opacityscale));var Z=X.field||X.coords&&X.coords[2]||null,Q=!1;if(Z||(this._field[2].shape[0]||this._field[2].shape[2]?Z=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Z=this._field[2].hi(0,0)),"field"in X||"coords"in X){var re=(Z.shape[0]+2)*(Z.shape[1]+2);re>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(a.nextPow2(re))),this._field[2]=d(this._field[2].data,[Z.shape[0]+2,Z.shape[1]+2]),this.padField(this._field[2],Z),this.shape=Z.shape.slice();for(var ce=this.shape,me=0;me<2;++me)this._field[2].size>this._field[me].data.length&&(s.freeFloat(this._field[me].data),this._field[me].data=s.mallocFloat(this._field[2].size)),this._field[me]=d(this._field[me].data,[ce[0]+2,ce[1]+2]);if(X.coords){var ye=X.coords;if(!Array.isArray(ye)||ye.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(me=0;me<2;++me){var Ae=ye[me];for(xe=0;xe<2;++xe)if(Ae.shape[xe]!==ce[xe])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[me],Ae)}}else if(X.ticks){var Se=X.ticks;if(!Array.isArray(Se)||Se.length!==2)throw new Error("gl-surface: invalid ticks");for(me=0;me<2;++me){var Ce=Se[me];if((Array.isArray(Ce)||Ce.length)&&(Ce=d(Ce)),Ce.shape[0]!==ce[me])throw new Error("gl-surface: invalid tick length");var qe=d(Ce.data,ce);qe.stride[me]=Ce.stride[0],qe.stride[me^1]=0,this.padField(this._field[me],qe)}}else{for(me=0;me<2;++me){var Ue=[0,0];Ue[me]=1,this._field[me]=d(this._field[me].data,[ce[0]+2,ce[1]+2],Ue,0)}this._field[0].set(0,0,0);for(var xe=0;xe0){for(var Dn=0;Dn<5;++Dn)Ft.pop();ve-=1}continue e}}}ra.push(ve)}this._contourOffsets[St]=jr,this._contourCounts[St]=ra}var oi=s.mallocFloat(Ft.length);for(me=0;meF||I<0||I>F)throw new Error("gl-texture2d: Invalid texture size");return b._shape=[_,I],b.bind(),C.texImage2D(C.TEXTURE_2D,0,b.format,_,I,0,b.format,b.type,null),b._mipLevels=[0],b}function o(b,_,I,C,F,R){this.gl=b,this.handle=_,this.format=F,this.type=R,this._shape=[I,C],this._mipLevels=[0],this._magFilter=b.NEAREST,this._minFilter=b.NEAREST,this._wrapS=b.CLAMP_TO_EDGE,this._wrapT=b.CLAMP_TO_EDGE,this._anisoSamples=1;var z=this,D=[this._wrapS,this._wrapT];Object.defineProperties(D,[{get:function(){return z._wrapS},set:function(B){return z.wrapS=B}},{get:function(){return z._wrapT},set:function(B){return z.wrapT=B}}]),this._wrapVector=D;var k=[this._shape[0],this._shape[1]];Object.defineProperties(k,[{get:function(){return z._shape[0]},set:function(B){return z.width=B}},{get:function(){return z._shape[1]},set:function(B){return z.height=B}}]),this._shapeVector=k}var x=o.prototype;Object.defineProperties(x,{minFilter:{get:function(){return this._minFilter},set:function(b){this.bind();var _=this.gl;if(this.type===_.FLOAT&&i.indexOf(b)>=0&&(_.getExtension("OES_texture_float_linear")||(b=_.NEAREST)),s.indexOf(b)<0)throw new Error("gl-texture2d: Unknown filter mode "+b);return _.texParameteri(_.TEXTURE_2D,_.TEXTURE_MIN_FILTER,b),this._minFilter=b}},magFilter:{get:function(){return this._magFilter},set:function(b){this.bind();var _=this.gl;if(this.type===_.FLOAT&&i.indexOf(b)>=0&&(_.getExtension("OES_texture_float_linear")||(b=_.NEAREST)),s.indexOf(b)<0)throw new Error("gl-texture2d: Unknown filter mode "+b);return _.texParameteri(_.TEXTURE_2D,_.TEXTURE_MAG_FILTER,b),this._magFilter=b}},mipSamples:{get:function(){return this._anisoSamples},set:function(b){var _=this._anisoSamples;if(this._anisoSamples=Math.max(b,1)|0,_!==this._anisoSamples){var I=this.gl.getExtension("EXT_texture_filter_anisotropic");I&&this.gl.texParameterf(this.gl.TEXTURE_2D,I.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(b){if(this.bind(),c.indexOf(b)<0)throw new Error("gl-texture2d: Unknown wrap mode "+b);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,b),this._wrapS=b}},wrapT:{get:function(){return this._wrapT},set:function(b){if(this.bind(),c.indexOf(b)<0)throw new Error("gl-texture2d: Unknown wrap mode "+b);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,b),this._wrapT=b}},wrap:{get:function(){return this._wrapVector},set:function(b){if(Array.isArray(b)||(b=[b,b]),b.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var _=0;_<2;++_)if(c.indexOf(b[_])<0)throw new Error("gl-texture2d: Unknown wrap mode "+b);this._wrapS=b[0],this._wrapT=b[1];var I=this.gl;return this.bind(),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_S,this._wrapS),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_T,this._wrapT),b}},shape:{get:function(){return this._shapeVector},set:function(b){if(!Array.isArray(b))b=[b|0,b|0];else if(b.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return y(this,b[0]|0,b[1]|0),[b[0]|0,b[1]|0]}},width:{get:function(){return this._shape[0]},set:function(b){return b=b|0,y(this,b,this._shape[1]),b}},height:{get:function(){return this._shape[1]},set:function(b){return b=b|0,y(this,this._shape[0],b),b}}}),x.bind=function(b){var _=this.gl;return b!==void 0&&_.activeTexture(_.TEXTURE0+(b|0)),_.bindTexture(_.TEXTURE_2D,this.handle),b!==void 0?b|0:_.getParameter(_.ACTIVE_TEXTURE)-_.TEXTURE0},x.dispose=function(){this.gl.deleteTexture(this.handle)},x.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var b=Math.min(this._shape[0],this._shape[1]),_=0;b>0;++_,b>>>=1)this._mipLevels.indexOf(_)<0&&this._mipLevels.push(_)},x.setPixels=function(b,_,I,C){var F=this.gl;this.bind(),Array.isArray(_)?(C=I,I=_[1]|0,_=_[0]|0):(_=_||0,I=I||0),C=C||0;var R=f(b)?b:b.raw;if(R){var z=this._mipLevels.indexOf(C)<0;z?(F.texImage2D(F.TEXTURE_2D,0,this.format,this.format,this.type,R),this._mipLevels.push(C)):F.texSubImage2D(F.TEXTURE_2D,C,_,I,this.format,this.type,R)}else if(b.shape&&b.stride&&b.data){if(b.shape.length<2||_+b.shape[1]>this._shape[1]>>>C||I+b.shape[0]>this._shape[0]>>>C||_<0||I<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");T(F,_,I,C,this.format,this.type,this._mipLevels,b)}else throw new Error("gl-texture2d: Unsupported data type")};function M(b,_){return b.length===3?_[2]===1&&_[1]===b[0]*b[2]&&_[0]===b[2]:_[0]===1&&_[1]===b[0]}function T(b,_,I,C,F,R,z,D){var k=D.dtype,B=D.shape.slice();if(B.length<2||B.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var O=0,q=0,Y=M(B,D.stride.slice());k==="float32"?O=b.FLOAT:k==="float64"?(O=b.FLOAT,Y=!1,k="float32"):k==="uint8"?O=b.UNSIGNED_BYTE:(O=b.UNSIGNED_BYTE,Y=!1,k="uint8");var ee=1;if(B.length===2)q=b.LUMINANCE,B=[B[0],B[1],1],D=a(D.data,B,[D.stride[0],D.stride[1],1],D.offset);else if(B.length===3){if(B[2]===1)q=b.ALPHA;else if(B[2]===2)q=b.LUMINANCE_ALPHA;else if(B[2]===3)q=b.RGB;else if(B[2]===4)q=b.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ee=B[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((q===b.LUMINANCE||q===b.ALPHA)&&(F===b.LUMINANCE||F===b.ALPHA)&&(q=F),q!==F)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var te=D.size,ae=z.indexOf(C)<0;if(ae&&z.push(C),O===R&&Y)D.offset===0&&D.data.length===te?ae?b.texImage2D(b.TEXTURE_2D,C,F,B[0],B[1],0,F,R,D.data):b.texSubImage2D(b.TEXTURE_2D,C,_,I,B[0],B[1],F,R,D.data):ae?b.texImage2D(b.TEXTURE_2D,C,F,B[0],B[1],0,F,R,D.data.subarray(D.offset,D.offset+te)):b.texSubImage2D(b.TEXTURE_2D,C,_,I,B[0],B[1],F,R,D.data.subarray(D.offset,D.offset+te));else{var U;R===b.FLOAT?U=n.mallocFloat32(te):U=n.mallocUint8(te);var H=a(U,B,[B[2],B[2]*B[0],1]);O===b.FLOAT&&R===b.UNSIGNED_BYTE?d(H,D):r.assign(H,D),ae?b.texImage2D(b.TEXTURE_2D,C,F,B[0],B[1],0,F,R,U.subarray(0,te)):b.texSubImage2D(b.TEXTURE_2D,C,_,I,B[0],B[1],F,R,U.subarray(0,te)),R===b.FLOAT?n.freeFloat32(U):n.freeUint8(U)}}function E(b){var _=b.createTexture();return b.bindTexture(b.TEXTURE_2D,_),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.NEAREST),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.NEAREST),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),_}function g(b,_,I,C,F){var R=b.getParameter(b.MAX_TEXTURE_SIZE);if(_<0||_>R||I<0||I>R)throw new Error("gl-texture2d: Invalid texture shape");if(F===b.FLOAT&&!b.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var z=E(b);return b.texImage2D(b.TEXTURE_2D,0,C,_,I,0,C,F,null),new o(b,z,_,I,C,F)}function A(b,_,I,C,F,R){var z=E(b);return b.texImage2D(b.TEXTURE_2D,0,F,F,R,_),new o(b,z,I,C,F,R)}function m(b,_){var I=_.dtype,C=_.shape.slice(),F=b.getParameter(b.MAX_TEXTURE_SIZE);if(C[0]<0||C[0]>F||C[1]<0||C[1]>F)throw new Error("gl-texture2d: Invalid texture size");var R=M(C,_.stride.slice()),z=0;I==="float32"?z=b.FLOAT:I==="float64"?(z=b.FLOAT,R=!1,I="float32"):I==="uint8"?z=b.UNSIGNED_BYTE:(z=b.UNSIGNED_BYTE,R=!1,I="uint8");var D=0;if(C.length===2)D=b.LUMINANCE,C=[C[0],C[1],1],_=a(_.data,C,[_.stride[0],_.stride[1],1],_.offset);else if(C.length===3)if(C[2]===1)D=b.ALPHA;else if(C[2]===2)D=b.LUMINANCE_ALPHA;else if(C[2]===3)D=b.RGB;else if(C[2]===4)D=b.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");z===b.FLOAT&&!b.getExtension("OES_texture_float")&&(z=b.UNSIGNED_BYTE,R=!1);var k,B,O=_.size;if(R)_.offset===0&&_.data.length===O?k=_.data:k=_.data.subarray(_.offset,_.offset+O);else{var q=[C[2],C[2]*C[0],1];B=n.malloc(O,I);var Y=a(B,C,q,0);(I==="float32"||I==="float64")&&z===b.UNSIGNED_BYTE?d(Y,_):r.assign(Y,_),k=B.subarray(0,O)}var ee=E(b);return b.texImage2D(b.TEXTURE_2D,0,D,C[0],C[1],0,D,z,k),R||n.free(B),new o(b,ee,C[0],C[1],D,z)}function h(b){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||p(b),typeof arguments[1]=="number")return g(b,arguments[1],arguments[2],arguments[3]||b.RGBA,arguments[4]||b.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return g(b,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||b.RGBA,arguments[3]||b.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var _=arguments[1],I=f(_)?_:_.raw;if(I)return A(b,I,_.width|0,_.height|0,arguments[2]||b.RGBA,arguments[3]||b.UNSIGNED_BYTE);if(_.shape&&_.data&&_.stride)return m(b,_)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(l){"use strict";function e(t,a,r){a?a.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var n=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(r){if(r.length>n)throw new Error("gl-vao: Too many vertex attributes");for(var i=0;i1?0:Math.acos(d)}},9226:function(l){l.exports=e;function e(t,a){return t[0]=Math.ceil(a[0]),t[1]=Math.ceil(a[1]),t[2]=Math.ceil(a[2]),t}},3126:function(l){l.exports=e;function e(t){var a=new Float32Array(3);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a}},3990:function(l){l.exports=e;function e(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t}},1091:function(l){l.exports=e;function e(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2],c=r[0],p=r[1],f=r[2];return t[0]=i*f-s*p,t[1]=s*c-n*f,t[2]=n*p-i*c,t}},5455:function(l,e,t){l.exports=t(7056)},7056:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],i=a[2]-t[2];return Math.sqrt(r*r+n*n+i*i)}},4008:function(l,e,t){l.exports=t(6690)},6690:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]/r[0],t[1]=a[1]/r[1],t[2]=a[2]/r[2],t}},244:function(l){l.exports=e;function e(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]}},2613:function(l){l.exports=1e-6},9922:function(l,e,t){l.exports=r;var a=t(2613);function r(n,i){var s=n[0],c=n[1],p=n[2],f=i[0],d=i[1],y=i[2];return Math.abs(s-f)<=a*Math.max(1,Math.abs(s),Math.abs(f))&&Math.abs(c-d)<=a*Math.max(1,Math.abs(c),Math.abs(d))&&Math.abs(p-y)<=a*Math.max(1,Math.abs(p),Math.abs(y))}},9265:function(l){l.exports=e;function e(t,a){return t[0]===a[0]&&t[1]===a[1]&&t[2]===a[2]}},2681:function(l){l.exports=e;function e(t,a){return t[0]=Math.floor(a[0]),t[1]=Math.floor(a[1]),t[2]=Math.floor(a[2]),t}},5137:function(l,e,t){l.exports=r;var a=t(1091)();function r(n,i,s,c,p,f){var d,y;for(i||(i=3),s||(s=0),c?y=Math.min(c*i+s,n.length):y=n.length,d=s;d0&&(s=1/Math.sqrt(s),t[0]=a[0]*s,t[1]=a[1]*s,t[2]=a[2]*s),t}},7636:function(l){l.exports=e;function e(t,a){a=a||1;var r=Math.random()*2*Math.PI,n=Math.random()*2-1,i=Math.sqrt(1-n*n)*a;return t[0]=Math.cos(r)*i,t[1]=Math.sin(r)*i,t[2]=n*a,t}},6894:function(l){l.exports=e;function e(t,a,r,n){var i=r[1],s=r[2],c=a[1]-i,p=a[2]-s,f=Math.sin(n),d=Math.cos(n);return t[0]=a[0],t[1]=i+c*d-p*f,t[2]=s+c*f+p*d,t}},109:function(l){l.exports=e;function e(t,a,r,n){var i=r[0],s=r[2],c=a[0]-i,p=a[2]-s,f=Math.sin(n),d=Math.cos(n);return t[0]=i+p*f+c*d,t[1]=a[1],t[2]=s+p*d-c*f,t}},8692:function(l){l.exports=e;function e(t,a,r,n){var i=r[0],s=r[1],c=a[0]-i,p=a[1]-s,f=Math.sin(n),d=Math.cos(n);return t[0]=i+c*d-p*f,t[1]=s+c*f+p*d,t[2]=a[2],t}},2447:function(l){l.exports=e;function e(t,a){return t[0]=Math.round(a[0]),t[1]=Math.round(a[1]),t[2]=Math.round(a[2]),t}},6621:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t}},8489:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a[0]+r[0]*n,t[1]=a[1]+r[1]*n,t[2]=a[2]+r[2]*n,t}},1463:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a,t[1]=r,t[2]=n,t}},6141:function(l,e,t){l.exports=t(2953)},5486:function(l,e,t){l.exports=t(3066)},2953:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],i=a[2]-t[2];return r*r+n*n+i*i}},3066:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2];return a*a+r*r+n*n}},2229:function(l,e,t){l.exports=t(6843)},6843:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]-r[0],t[1]=a[1]-r[1],t[2]=a[2]-r[2],t}},492:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2];return t[0]=n*r[0]+i*r[3]+s*r[6],t[1]=n*r[1]+i*r[4]+s*r[7],t[2]=n*r[2]+i*r[5]+s*r[8],t}},5673:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2],c=r[3]*n+r[7]*i+r[11]*s+r[15];return c=c||1,t[0]=(r[0]*n+r[4]*i+r[8]*s+r[12])/c,t[1]=(r[1]*n+r[5]*i+r[9]*s+r[13])/c,t[2]=(r[2]*n+r[6]*i+r[10]*s+r[14])/c,t}},264:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2],c=r[0],p=r[1],f=r[2],d=r[3],y=d*n+p*s-f*i,o=d*i+f*n-c*s,x=d*s+c*i-p*n,M=-c*n-p*i-f*s;return t[0]=y*d+M*-c+o*-f-x*-p,t[1]=o*d+M*-p+x*-c-y*-f,t[2]=x*d+M*-f+y*-p-o*-c,t}},4361:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]+r[0],t[1]=a[1]+r[1],t[2]=a[2]+r[2],t[3]=a[3]+r[3],t}},2335:function(l){l.exports=e;function e(t){var a=new Float32Array(4);return a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3],a}},2933:function(l){l.exports=e;function e(t,a){return t[0]=a[0],t[1]=a[1],t[2]=a[2],t[3]=a[3],t}},7536:function(l){l.exports=e;function e(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],i=a[2]-t[2],s=a[3]-t[3];return Math.sqrt(r*r+n*n+i*i+s*s)}},1373:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]/r[0],t[1]=a[1]/r[1],t[2]=a[2]/r[2],t[3]=a[3]/r[3],t}},3750:function(l){l.exports=e;function e(t,a){return t[0]*a[0]+t[1]*a[1]+t[2]*a[2]+t[3]*a[3]}},3390:function(l){l.exports=e;function e(t,a,r,n){var i=new Float32Array(4);return i[0]=t,i[1]=a,i[2]=r,i[3]=n,i}},9970:function(l,e,t){l.exports={create:t(7536),clone:t(2335),fromValues:t(3390),copy:t(2933),set:t(4578),add:t(4361),subtract:t(6860),multiply:t(3576),divide:t(1373),min:t(2334),max:t(160),scale:t(9288),scaleAndAdd:t(4844),distance:t(4691),squaredDistance:t(7960),length:t(6808),squaredLength:t(483),negate:t(1498),inverse:t(4494),normalize:t(5177),dot:t(3750),lerp:t(2573),random:t(9131),transformMat4:t(5352),transformQuat:t(4041)}},4494:function(l){l.exports=e;function e(t,a){return t[0]=1/a[0],t[1]=1/a[1],t[2]=1/a[2],t[3]=1/a[3],t}},6808:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2],i=t[3];return Math.sqrt(a*a+r*r+n*n+i*i)}},2573:function(l){l.exports=e;function e(t,a,r,n){var i=a[0],s=a[1],c=a[2],p=a[3];return t[0]=i+n*(r[0]-i),t[1]=s+n*(r[1]-s),t[2]=c+n*(r[2]-c),t[3]=p+n*(r[3]-p),t}},160:function(l){l.exports=e;function e(t,a,r){return t[0]=Math.max(a[0],r[0]),t[1]=Math.max(a[1],r[1]),t[2]=Math.max(a[2],r[2]),t[3]=Math.max(a[3],r[3]),t}},2334:function(l){l.exports=e;function e(t,a,r){return t[0]=Math.min(a[0],r[0]),t[1]=Math.min(a[1],r[1]),t[2]=Math.min(a[2],r[2]),t[3]=Math.min(a[3],r[3]),t}},3576:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r[0],t[1]=a[1]*r[1],t[2]=a[2]*r[2],t[3]=a[3]*r[3],t}},1498:function(l){l.exports=e;function e(t,a){return t[0]=-a[0],t[1]=-a[1],t[2]=-a[2],t[3]=-a[3],t}},5177:function(l){l.exports=e;function e(t,a){var r=a[0],n=a[1],i=a[2],s=a[3],c=r*r+n*n+i*i+s*s;return c>0&&(c=1/Math.sqrt(c),t[0]=r*c,t[1]=n*c,t[2]=i*c,t[3]=s*c),t}},9131:function(l,e,t){var a=t(5177),r=t(9288);l.exports=n;function n(i,s){return s=s||1,i[0]=Math.random(),i[1]=Math.random(),i[2]=Math.random(),i[3]=Math.random(),a(i,i),r(i,i,s),i}},9288:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]*r,t[1]=a[1]*r,t[2]=a[2]*r,t[3]=a[3]*r,t}},4844:function(l){l.exports=e;function e(t,a,r,n){return t[0]=a[0]+r[0]*n,t[1]=a[1]+r[1]*n,t[2]=a[2]+r[2]*n,t[3]=a[3]+r[3]*n,t}},4578:function(l){l.exports=e;function e(t,a,r,n,i){return t[0]=a,t[1]=r,t[2]=n,t[3]=i,t}},7960:function(l){l.exports=e;function e(t,a){var r=a[0]-t[0],n=a[1]-t[1],i=a[2]-t[2],s=a[3]-t[3];return r*r+n*n+i*i+s*s}},483:function(l){l.exports=e;function e(t){var a=t[0],r=t[1],n=t[2],i=t[3];return a*a+r*r+n*n+i*i}},6860:function(l){l.exports=e;function e(t,a,r){return t[0]=a[0]-r[0],t[1]=a[1]-r[1],t[2]=a[2]-r[2],t[3]=a[3]-r[3],t}},5352:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2],c=a[3];return t[0]=r[0]*n+r[4]*i+r[8]*s+r[12]*c,t[1]=r[1]*n+r[5]*i+r[9]*s+r[13]*c,t[2]=r[2]*n+r[6]*i+r[10]*s+r[14]*c,t[3]=r[3]*n+r[7]*i+r[11]*s+r[15]*c,t}},4041:function(l){l.exports=e;function e(t,a,r){var n=a[0],i=a[1],s=a[2],c=r[0],p=r[1],f=r[2],d=r[3],y=d*n+p*s-f*i,o=d*i+f*n-c*s,x=d*s+c*i-p*n,M=-c*n-p*i-f*s;return t[0]=y*d+M*-c+o*-f-x*-p,t[1]=o*d+M*-p+x*-c-y*-f,t[2]=x*d+M*-f+y*-p-o*-c,t[3]=a[3],t}},1848:function(l,e,t){var a=t(4905),r=t(6468);l.exports=n;function n(i){for(var s=Array.isArray(i)?i:a(i),c=0;c0)continue;Ve=ne.slice(0,1).join("")}return Q(Ve),te+=Ve.length,k=k.slice(Ve.length),k.length}while(!0)}function xe(){return/[^a-fA-F0-9]/.test(z)?(Q(k.join("")),R=c,C):(k.push(z),D=z,C+1)}function he(){return z==="."||/[eE]/.test(z)?(k.push(z),R=M,D=z,C+1):z==="x"&&k.length===1&&k[0]==="0"?(R=h,k.push(z),D=z,C+1):/[^\d]/.test(z)?(Q(k.join("")),R=c,C):(k.push(z),D=z,C+1)}function oe(){return z==="f"&&(k.push(z),D=z,C+=1),/[eE]/.test(z)||(z==="-"||z==="+")&&/[eE]/.test(D)?(k.push(z),D=z,C+1):/[^\d]/.test(z)?(Q(k.join("")),R=c,C):(k.push(z),D=z,C+1)}function le(){if(/[^\d\w_]/.test(z)){var ne=k.join("");return Z[ne]?R=g:X[ne]?R=E:R=T,Q(k.join("")),R=c,C}return k.push(z),D=z,C+1}}},3508:function(l,e,t){var a=t(6852);a=a.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.exports=a.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"])},6852:function(l){l.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"]},7932:function(l,e,t){var a=t(620);l.exports=a.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","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"])},620:function(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","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"]},7827:function(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(l,e,t){var a=t(5874);l.exports=r;function r(n,i){var s=a(i),c=[];return c=c.concat(s(n)),c=c.concat(s(null)),c}},3236:function(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),a=[],r=0;r>1,y=-7,o=r?i-1:0,x=r?-1:1,M=t[a+o];for(o+=x,s=M&(1<<-y)-1,M>>=-y,y+=p;y>0;s=s*256+t[a+o],o+=x,y-=8);for(c=s&(1<<-y)-1,s>>=-y,y+=n;y>0;c=c*256+t[a+o],o+=x,y-=8);if(s===0)s=1-d;else{if(s===f)return c?NaN:(M?-1:1)*(1/0);c=c+Math.pow(2,n),s=s-d}return(M?-1:1)*c*Math.pow(2,s-n)},e.write=function(t,a,r,n,i,s){var c,p,f,d=s*8-i-1,y=(1<>1,x=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,M=n?0:s-1,T=n?1:-1,E=a<0||a===0&&1/a<0?1:0;for(a=Math.abs(a),isNaN(a)||a===1/0?(p=isNaN(a)?1:0,c=y):(c=Math.floor(Math.log(a)/Math.LN2),a*(f=Math.pow(2,-c))<1&&(c--,f*=2),c+o>=1?a+=x/f:a+=x*Math.pow(2,1-o),a*f>=2&&(c++,f/=2),c+o>=y?(p=0,c=y):c+o>=1?(p=(a*f-1)*Math.pow(2,i),c=c+o):(p=a*Math.pow(2,o-1)*Math.pow(2,i),c=0));i>=8;t[r+M]=p&255,M+=T,p/=256,i-=8);for(c=c<0;t[r+M]=c&255,M+=T,c/=256,d-=8);t[r+M-T]|=E*128}},8954:function(l,e,t){"use strict";l.exports=o;var a=t(3250),r=t(6803).Fw;function n(x,M,T){this.vertices=x,this.adjacent=M,this.boundary=T,this.lastVisited=-1}n.prototype.flip=function(){var x=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=x;var M=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=M};function i(x,M,T){this.vertices=x,this.cell=M,this.index=T}function s(x,M){return r(x.vertices,M.vertices)}function c(x){return function(){var M=this.tuple;return x.apply(this,M)}}function p(x){var M=a[x+1];return M||(M=a),c(M)}var f=[];function d(x,M,T){this.dimension=x,this.vertices=M,this.simplices=T,this.interior=T.filter(function(A){return!A.boundary}),this.tuple=new Array(x+1);for(var E=0;E<=x;++E)this.tuple[E]=this.vertices[E];var g=f[x];g||(g=f[x]=p(x)),this.orient=g}var y=d.prototype;y.handleBoundaryDegeneracy=function(x,M){var T=this.dimension,E=this.vertices.length-1,g=this.tuple,A=this.vertices,m=[x];for(x.lastVisited=-E;m.length>0;){x=m.pop();for(var h=x.adjacent,b=0;b<=T;++b){var _=h[b];if(!(!_.boundary||_.lastVisited<=-E)){for(var I=_.vertices,C=0;C<=T;++C){var F=I[C];F<0?g[C]=M:g[C]=A[F]}var R=this.orient();if(R>0)return _;_.lastVisited=-E,R===0&&m.push(_)}}}return null},y.walk=function(x,M){var T=this.vertices.length-1,E=this.dimension,g=this.vertices,A=this.tuple,m=M?this.interior.length*Math.random()|0:this.interior.length-1,h=this.interior[m];e:for(;!h.boundary;){for(var b=h.vertices,_=h.adjacent,I=0;I<=E;++I)A[I]=g[b[I]];h.lastVisited=T;for(var I=0;I<=E;++I){var C=_[I];if(!(C.lastVisited>=T)){var F=A[I];A[I]=x;var R=this.orient();if(A[I]=F,R<0){h=C;continue e}else C.boundary?C.lastVisited=-T:C.lastVisited=T}}return}return h},y.addPeaks=function(x,M){var T=this.vertices.length-1,E=this.dimension,g=this.vertices,A=this.tuple,m=this.interior,h=this.simplices,b=[M];M.lastVisited=T,M.vertices[M.vertices.indexOf(-1)]=T,M.boundary=!1,m.push(M);for(var _=[];b.length>0;){var M=b.pop(),I=M.vertices,C=M.adjacent,F=I.indexOf(T);if(!(F<0)){for(var R=0;R<=E;++R)if(R!==F){var z=C[R];if(!(!z.boundary||z.lastVisited>=T)){var D=z.vertices;if(z.lastVisited!==-T){for(var k=0,B=0;B<=E;++B)D[B]<0?(k=B,A[B]=x):A[B]=g[D[B]];var O=this.orient();if(O>0){D[k]=T,z.boundary=!1,m.push(z),b.push(z),z.lastVisited=T;continue}else z.lastVisited=-T}var q=z.adjacent,Y=I.slice(),ee=C.slice(),te=new n(Y,ee,!0);h.push(te);var ae=q.indexOf(M);if(!(ae<0)){q[ae]=te,ee[F]=z,Y[R]=-1,ee[R]=M,C[R]=te,te.flip();for(var B=0;B<=E;++B){var U=Y[B];if(!(U<0||U===T)){for(var H=new Array(E-1),K=0,V=0;V<=E;++V){var $=Y[V];$<0||V===B||(H[K++]=$)}_.push(new i(H,te,B))}}}}}}}_.sort(s);for(var R=0;R+1<_.length;R+=2){var X=_[R],Z=_[R+1],Q=X.index,re=Z.index;Q<0||re<0||(X.cell.adjacent[X.index]=Z.cell,Z.cell.adjacent[Z.index]=X.cell)}},y.insert=function(x,M){var T=this.vertices;T.push(x);var E=this.walk(x,M);if(E){for(var g=this.dimension,A=this.tuple,m=0;m<=g;++m){var h=E.vertices[m];h<0?A[m]=x:A[m]=T[h]}var b=this.orient(A);b<0||b===0&&(E=this.handleBoundaryDegeneracy(E,x),!E)||this.addPeaks(x,E)}},y.boundary=function(){for(var x=this.dimension,M=[],T=this.simplices,E=T.length,g=0;g=0?m[b++]=h[I]:_=I&1;if(_===(x&1)){var C=m[0];m[0]=m[1],m[1]=C}M.push(m)}}return M};function o(x,M){var T=x.length;if(T===0)throw new Error("Must have at least d+1 points");var E=x[0].length;if(T<=E)throw new Error("Must input at least d+1 points");var g=x.slice(0,E+1),A=a.apply(void 0,g);if(A===0)throw new Error("Input not in general position");for(var m=new Array(E+1),h=0;h<=E;++h)m[h]=h;A<0&&(m[0]=1,m[1]=0);for(var b=new n(m,new Array(E+1),!1),_=b.adjacent,I=new Array(E+2),h=0;h<=E;++h){for(var C=m.slice(),F=0;F<=E;++F)F===h&&(C[F]=-1);var R=C[0];C[0]=C[1],C[1]=R;var z=new n(C,new Array(E+1),!0);_[h]=z,I[h]=z}I[E+1]=b;for(var h=0;h<=E;++h)for(var C=_[h].vertices,D=_[h].adjacent,F=0;F<=E;++F){var k=C[F];if(k<0){D[F]=b;continue}for(var B=0;B<=E;++B)_[B].vertices.indexOf(k)<0&&(D[F]=_[B])}for(var O=new d(E,g,I),q=!!M,h=E+1;h3*(I+1)?d(this,_):this.left.insert(_):this.left=A([_]);else if(_[0]>this.mid)this.right?4*(this.right.count+1)>3*(I+1)?d(this,_):this.right.insert(_):this.right=A([_]);else{var C=a.ge(this.leftPoints,_,E),F=a.ge(this.rightPoints,_,g);this.leftPoints.splice(C,0,_),this.rightPoints.splice(F,0,_)}},c.remove=function(_){var I=this.count-this.leftPoints;if(_[1]3*(I-1))return y(this,_);var F=this.left.remove(_);return F===i?(this.left=null,this.count-=1,n):(F===n&&(this.count-=1),F)}else if(_[0]>this.mid){if(!this.right)return r;var R=this.left?this.left.count:0;if(4*R>3*(I-1))return y(this,_);var F=this.right.remove(_);return F===i?(this.right=null,this.count-=1,n):(F===n&&(this.count-=1),F)}else{if(this.count===1)return this.leftPoints[0]===_?i:r;if(this.leftPoints.length===1&&this.leftPoints[0]===_){if(this.left&&this.right){for(var z=this,D=this.left;D.right;)z=D,D=D.right;if(z===this)D.right=this.right;else{var k=this.left,F=this.right;z.count-=D.count,z.right=D.left,D.left=k,D.right=F}p(this,D),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?p(this,this.left):p(this,this.right);return n}for(var k=a.ge(this.leftPoints,_,E);k=0&&_[F][1]>=I;--F){var R=C(_[F]);if(R)return R}}function M(_,I){for(var C=0;C<_.length;++C){var F=I(_[C]);if(F)return F}}c.queryPoint=function(_,I){if(_this.mid){if(this.right){var C=this.right.queryPoint(_,I);if(C)return C}return x(this.rightPoints,_,I)}else return M(this.leftPoints,I)},c.queryInterval=function(_,I,C){if(_this.mid&&this.right){var F=this.right.queryInterval(_,I,C);if(F)return F}return Ithis.mid?x(this.rightPoints,_,C):M(this.leftPoints,C)};function T(_,I){return _-I}function E(_,I){var C=_[0]-I[0];return C||_[1]-I[1]}function g(_,I){var C=_[1]-I[1];return C||_[0]-I[0]}function A(_){if(_.length===0)return null;for(var I=[],C=0;C<_.length;++C)I.push(_[C][0],_[C][1]);I.sort(T);for(var F=I[I.length>>1],R=[],z=[],D=[],C=0;C<_.length;++C){var k=_[C];k[1]13)&&a!==32&&a!==133&&a!==160&&a!==5760&&a!==6158&&(a<8192||a>8205)&&a!==8232&&a!==8233&&a!==8239&&a!==8287&&a!==8288&&a!==12288&&a!==65279)return!1;return!0}},395:function(l){function e(t,a,r){return t*(1-r)+a*r}l.exports=e},2652:function(l,e,t){var a=t(4335),r=t(6864),n=t(1903),i=t(9921),s=t(7608),c=t(5665),p={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},f=r(),d=r(),y=[0,0,0,0],o=[[0,0,0],[0,0,0],[0,0,0]],x=[0,0,0];l.exports=function(A,m,h,b,_,I){if(m||(m=[0,0,0]),h||(h=[0,0,0]),b||(b=[0,0,0]),_||(_=[0,0,0,1]),I||(I=[0,0,0,1]),!a(f,A)||(n(d,f),d[3]=0,d[7]=0,d[11]=0,d[15]=1,Math.abs(i(d)<1e-8)))return!1;var C=f[3],F=f[7],R=f[11],z=f[12],D=f[13],k=f[14],B=f[15];if(C!==0||F!==0||R!==0){y[0]=C,y[1]=F,y[2]=R,y[3]=B;var O=s(d,d);if(!O)return!1;c(d,d),M(_,y,d)}else _[0]=_[1]=_[2]=0,_[3]=1;if(m[0]=z,m[1]=D,m[2]=k,T(o,f),h[0]=p.length(o[0]),p.normalize(o[0],o[0]),b[0]=p.dot(o[0],o[1]),E(o[1],o[1],o[0],1,-b[0]),h[1]=p.length(o[1]),p.normalize(o[1],o[1]),b[0]/=h[1],b[1]=p.dot(o[0],o[2]),E(o[2],o[2],o[0],1,-b[1]),b[2]=p.dot(o[1],o[2]),E(o[2],o[2],o[1],1,-b[2]),h[2]=p.length(o[2]),p.normalize(o[2],o[2]),b[1]/=h[2],b[2]/=h[2],p.cross(x,o[1],o[2]),p.dot(o[0],x)<0)for(var q=0;q<3;q++)h[q]*=-1,o[q][0]*=-1,o[q][1]*=-1,o[q][2]*=-1;return I[0]=.5*Math.sqrt(Math.max(1+o[0][0]-o[1][1]-o[2][2],0)),I[1]=.5*Math.sqrt(Math.max(1-o[0][0]+o[1][1]-o[2][2],0)),I[2]=.5*Math.sqrt(Math.max(1-o[0][0]-o[1][1]+o[2][2],0)),I[3]=.5*Math.sqrt(Math.max(1+o[0][0]+o[1][1]+o[2][2],0)),o[2][1]>o[1][2]&&(I[0]=-I[0]),o[0][2]>o[2][0]&&(I[1]=-I[1]),o[1][0]>o[0][1]&&(I[2]=-I[2]),!0};function M(g,A,m){var h=A[0],b=A[1],_=A[2],I=A[3];return g[0]=m[0]*h+m[4]*b+m[8]*_+m[12]*I,g[1]=m[1]*h+m[5]*b+m[9]*_+m[13]*I,g[2]=m[2]*h+m[6]*b+m[10]*_+m[14]*I,g[3]=m[3]*h+m[7]*b+m[11]*_+m[15]*I,g}function T(g,A){g[0][0]=A[0],g[0][1]=A[1],g[0][2]=A[2],g[1][0]=A[4],g[1][1]=A[5],g[1][2]=A[6],g[2][0]=A[8],g[2][1]=A[9],g[2][2]=A[10]}function E(g,A,m,h,b){g[0]=A[0]*h+m[0]*b,g[1]=A[1]*h+m[1]*b,g[2]=A[2]*h+m[2]*b}},4335:function(l){l.exports=function(t,a){var r=a[15];if(r===0)return!1;for(var n=1/r,i=0;i<16;i++)t[i]=a[i]*n;return!0}},7442:function(l,e,t){var a=t(6658),r=t(7182),n=t(2652),i=t(9921),s=t(8648),c=y(),p=y(),f=y();l.exports=d;function d(M,T,E,g){if(i(T)===0||i(E)===0)return!1;var A=n(T,c.translate,c.scale,c.skew,c.perspective,c.quaternion),m=n(E,p.translate,p.scale,p.skew,p.perspective,p.quaternion);return!A||!m?!1:(a(f.translate,c.translate,p.translate,g),a(f.skew,c.skew,p.skew,g),a(f.scale,c.scale,p.scale,g),a(f.perspective,c.perspective,p.perspective,g),s(f.quaternion,c.quaternion,p.quaternion,g),r(M,f.translate,f.scale,f.skew,f.perspective,f.quaternion),!0)}function y(){return{translate:o(),scale:o(1),skew:o(),perspective:x(),quaternion:x()}}function o(M){return[M||0,M||0,M||0]}function x(){return[0,0,0,1]}},7182:function(l,e,t){var a={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=a.create(),n=a.create();l.exports=function(s,c,p,f,d,y){return a.identity(s),a.fromRotationTranslation(s,y,c),s[3]=d[0],s[7]=d[1],s[11]=d[2],s[15]=d[3],a.identity(n),f[2]!==0&&(n[9]=f[2],a.multiply(s,s,n)),f[1]!==0&&(n[9]=0,n[8]=f[1],a.multiply(s,s,n)),f[0]!==0&&(n[8]=0,n[4]=f[0],a.multiply(s,s,n)),a.scale(s,s,p),s}},1811:function(l,e,t){"use strict";var a=t(2478),r=t(7442),n=t(7608),i=t(5567),s=t(2408),c=t(7089),p=t(6582),f=t(7656),d=t(2504),y=t(3536),o=[0,0,0];l.exports=E;function x(g){this._components=g.slice(),this._time=[0],this.prevMatrix=g.slice(),this.nextMatrix=g.slice(),this.computedMatrix=g.slice(),this.computedInverse=g.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]}var M=x.prototype;M.recalcMatrix=function(g){var A=this._time,m=a.le(A,g),h=this.computedMatrix;if(!(m<0)){var b=this._components;if(m===A.length-1)for(var _=16*m,I=0;I<16;++I)h[I]=b[_++];else{for(var C=A[m+1]-A[m],_=16*m,F=this.prevMatrix,R=!0,I=0;I<16;++I)F[I]=b[_++];for(var z=this.nextMatrix,I=0;I<16;++I)z[I]=b[_++],R=R&&F[I]===z[I];if(C<1e-6||R)for(var I=0;I<16;++I)h[I]=F[I];else r(h,F,z,(g-A[m])/C)}var D=this.computedUp;D[0]=h[1],D[1]=h[5],D[2]=h[9],y(D,D);var k=this.computedInverse;n(k,h);var B=this.computedEye,O=k[15];B[0]=k[12]/O,B[1]=k[13]/O,B[2]=k[14]/O;for(var q=this.computedCenter,Y=Math.exp(this.computedRadius[0]),I=0;I<3;++I)q[I]=B[I]-h[2+4*I]*Y}},M.idle=function(g){if(!(g1&&a(n[p[o-2]],n[p[o-1]],y)<=0;)o-=1,p.pop();for(p.push(d),o=f.length;o>1&&a(n[f[o-2]],n[f[o-1]],y)>=0;)o-=1,f.pop();f.push(d)}for(var x=new Array(f.length+p.length-2),M=0,s=0,T=p.length;s0;--E)x[M++]=f[E];return x}},351:function(l,e,t){"use strict";l.exports=r;var a=t(4687);function r(n,i){i||(i=n,n=window);var s=0,c=0,p=0,f={shift:!1,alt:!1,control:!1,meta:!1},d=!1;function y(_){var I=!1;return"altKey"in _&&(I=I||_.altKey!==f.alt,f.alt=!!_.altKey),"shiftKey"in _&&(I=I||_.shiftKey!==f.shift,f.shift=!!_.shiftKey),"ctrlKey"in _&&(I=I||_.ctrlKey!==f.control,f.control=!!_.ctrlKey),"metaKey"in _&&(I=I||_.metaKey!==f.meta,f.meta=!!_.metaKey),I}function o(_,I){var C=a.x(I),F=a.y(I);"buttons"in I&&(_=I.buttons|0),(_!==s||C!==c||F!==p||y(I))&&(s=_|0,c=C||0,p=F||0,i&&i(s,c,p,f))}function x(_){o(0,_)}function M(){(s||c||p||f.shift||f.alt||f.meta||f.control)&&(c=p=0,s=0,f.shift=f.alt=f.control=f.meta=!1,i&&i(0,0,0,f))}function T(_){y(_)&&i&&i(s,c,p,f)}function E(_){a.buttons(_)===0?o(0,_):o(s,_)}function g(_){o(s|a.buttons(_),_)}function A(_){o(s&~a.buttons(_),_)}function m(){d||(d=!0,n.addEventListener("mousemove",E),n.addEventListener("mousedown",g),n.addEventListener("mouseup",A),n.addEventListener("mouseleave",x),n.addEventListener("mouseenter",x),n.addEventListener("mouseout",x),n.addEventListener("mouseover",x),n.addEventListener("blur",M),n.addEventListener("keyup",T),n.addEventListener("keydown",T),n.addEventListener("keypress",T),n!==window&&(window.addEventListener("blur",M),window.addEventListener("keyup",T),window.addEventListener("keydown",T),window.addEventListener("keypress",T)))}function h(){d&&(d=!1,n.removeEventListener("mousemove",E),n.removeEventListener("mousedown",g),n.removeEventListener("mouseup",A),n.removeEventListener("mouseleave",x),n.removeEventListener("mouseenter",x),n.removeEventListener("mouseout",x),n.removeEventListener("mouseover",x),n.removeEventListener("blur",M),n.removeEventListener("keyup",T),n.removeEventListener("keydown",T),n.removeEventListener("keypress",T),n!==window&&(window.removeEventListener("blur",M),window.removeEventListener("keyup",T),window.removeEventListener("keydown",T),window.removeEventListener("keypress",T)))}m();var b={element:n};return Object.defineProperties(b,{enabled:{get:function(){return d},set:function(_){_?m():h()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return p},enumerable:!0},mods:{get:function(){return f},enumerable:!0}}),b}},24:function(l){var e={left:0,top:0};l.exports=t;function t(r,n,i){n=n||r.currentTarget||r.srcElement,Array.isArray(i)||(i=[0,0]);var s=r.clientX||0,c=r.clientY||0,p=a(n);return i[0]=s-p.left,i[1]=c-p.top,i}function a(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687:function(l,e){"use strict";function t(i){if(typeof i=="object"){if("buttons"in i)return i.buttons;if("which"in i){var s=i.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(ee=1,U[K++]=f(m[I],M,T,E),I+=O,g>0)for(Y=1,C=m[I],V=U[K]=f(C,M,T,E),Z=U[K+$],ce=U[K+Q],Ae=U[K+me],(V!==Z||V!==ce||V!==Ae)&&(R=m[I+F],D=m[I+z],B=m[I+k],c(Y,ee,C,R,D,B,V,Z,ce,Ae,M,T,E),Se=H[K]=te++),K+=1,I+=O,Y=2;Y0)for(Y=1,C=m[I],V=U[K]=f(C,M,T,E),Z=U[K+$],ce=U[K+Q],Ae=U[K+me],(V!==Z||V!==ce||V!==Ae)&&(R=m[I+F],D=m[I+z],B=m[I+k],c(Y,ee,C,R,D,B,V,Z,ce,Ae,M,T,E),Se=H[K]=te++,Ae!==ce&&p(H[K+Q],Se,D,B,ce,Ae,M,T,E)),K+=1,I+=O,Y=2;Y0){if(Y=1,U[K++]=f(m[I],M,T,E),I+=O,A>0)for(ee=1,C=m[I],V=U[K]=f(C,M,T,E),ce=U[K+Q],Z=U[K+$],Ae=U[K+me],(V!==ce||V!==Z||V!==Ae)&&(R=m[I+F],D=m[I+z],B=m[I+k],c(Y,ee,C,R,D,B,V,ce,Z,Ae,M,T,E),Se=H[K]=te++),K+=1,I+=O,ee=2;ee0)for(ee=1,C=m[I],V=U[K]=f(C,M,T,E),ce=U[K+Q],Z=U[K+$],Ae=U[K+me],(V!==ce||V!==Z||V!==Ae)&&(R=m[I+F],D=m[I+z],B=m[I+k],c(Y,ee,C,R,D,B,V,ce,Z,Ae,M,T,E),Se=H[K]=te++,Ae!==ce&&p(H[K+Q],Se,B,R,Ae,ce,M,T,E)),K+=1,I+=O,ee=2;ee 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var y=s.getters||[],o=new Array(f),x=0;x=0?o[x]=!0:o[x]=!1;return n(s.vertex,s.cell,s.phase,d,p,o)}},6199:function(l,e,t){"use strict";var a=t(1338),r={zero:function(E,g,A,m){var h=E[0],b=A[0];m|=0;var _=0,I=b;for(_=0;_2&&_[1]>2&&m(b.pick(-1,-1).lo(1,1).hi(_[0]-2,_[1]-2),h.pick(-1,-1,0).lo(1,1).hi(_[0]-2,_[1]-2),h.pick(-1,-1,1).lo(1,1).hi(_[0]-2,_[1]-2)),_[1]>2&&(A(b.pick(0,-1).lo(1).hi(_[1]-2),h.pick(0,-1,1).lo(1).hi(_[1]-2)),g(h.pick(0,-1,0).lo(1).hi(_[1]-2))),_[1]>2&&(A(b.pick(_[0]-1,-1).lo(1).hi(_[1]-2),h.pick(_[0]-1,-1,1).lo(1).hi(_[1]-2)),g(h.pick(_[0]-1,-1,0).lo(1).hi(_[1]-2))),_[0]>2&&(A(b.pick(-1,0).lo(1).hi(_[0]-2),h.pick(-1,0,0).lo(1).hi(_[0]-2)),g(h.pick(-1,0,1).lo(1).hi(_[0]-2))),_[0]>2&&(A(b.pick(-1,_[1]-1).lo(1).hi(_[0]-2),h.pick(-1,_[1]-1,0).lo(1).hi(_[0]-2)),g(h.pick(-1,_[1]-1,1).lo(1).hi(_[0]-2))),h.set(0,0,0,0),h.set(0,0,1,0),h.set(_[0]-1,0,0,0),h.set(_[0]-1,0,1,0),h.set(0,_[1]-1,0,0),h.set(0,_[1]-1,1,0),h.set(_[0]-1,_[1]-1,0,0),h.set(_[0]-1,_[1]-1,1,0),h}}function T(E){var g=E.join(),_=f[g];if(_)return _;for(var A=E.length,m=[y,o],h=1;h<=A;++h)m.push(x(h));var b=M,_=b.apply(void 0,m);return f[g]=_,_}l.exports=function(g,A,m){if(Array.isArray(m)||(typeof m=="string"?m=a(A.dimension,m):m=a(A.dimension,"clamp")),A.size===0)return g;if(A.dimension===0)return g.set(0),g;var h=T(m);return h(g,A)}},4317:function(l){"use strict";function e(i,s){var c=Math.floor(s),p=s-c,f=0<=c&&c0;){D<64?(g=D,D=0):(g=64,D-=64);for(var k=f[1]|0;k>0;){k<64?(A=k,k=0):(A=64,k-=64),o=R+D*h+k*b,T=z+D*I+k*C;var B=0,O=0,q=0,Y=_,ee=h-m*_,te=b-g*h,ae=F,U=I-m*F,H=C-g*I;for(q=0;q0;){C<64?(g=C,C=0):(g=64,C-=64);for(var F=f[0]|0;F>0;){F<64?(E=F,F=0):(E=64,F-=64),o=_+C*m+F*A,T=I+C*b+F*h;var R=0,z=0,D=m,k=A-g*m,B=b,O=h-g*b;for(z=0;z0;){z<64?(A=z,z=0):(A=64,z-=64);for(var D=f[0]|0;D>0;){D<64?(E=D,D=0):(E=64,D-=64);for(var k=f[1]|0;k>0;){k<64?(g=k,k=0):(g=64,k-=64),o=F+z*b+D*m+k*h,T=R+z*C+D*_+k*I;var B=0,O=0,q=0,Y=b,ee=m-A*b,te=h-E*m,ae=C,U=_-A*C,H=I-E*_;for(q=0;qx;){B=0,O=R-g;t:for(D=0;DY)break t;O+=_,B+=I}for(B=R,O=R-g,D=0;D>1,k=D-F,B=D+F,O=R,q=k,Y=D,ee=B,te=z,ae=M+1,U=T-1,H=!0,K,V,$,X,Z,Q,re,ce,me,ye=0,Ae=0,Se=0,Ce,qe,Ue,xe,he,oe,le,ne,be,Fe,Ve,je,ut,st,yt,At,Pt=b,Zt=y(Pt),vr=y(Pt);qe=A*O,Ue=A*q,At=g;e:for(Ce=0;Ce0){V=O,O=q,q=V;break e}if(Se<0)break e;At+=I}qe=A*ee,Ue=A*te,At=g;e:for(Ce=0;Ce0){V=ee,ee=te,te=V;break e}if(Se<0)break e;At+=I}qe=A*O,Ue=A*Y,At=g;e:for(Ce=0;Ce0){V=O,O=Y,Y=V;break e}if(Se<0)break e;At+=I}qe=A*q,Ue=A*Y,At=g;e:for(Ce=0;Ce0){V=q,q=Y,Y=V;break e}if(Se<0)break e;At+=I}qe=A*O,Ue=A*ee,At=g;e:for(Ce=0;Ce0){V=O,O=ee,ee=V;break e}if(Se<0)break e;At+=I}qe=A*Y,Ue=A*ee,At=g;e:for(Ce=0;Ce0){V=Y,Y=ee,ee=V;break e}if(Se<0)break e;At+=I}qe=A*q,Ue=A*te,At=g;e:for(Ce=0;Ce0){V=q,q=te,te=V;break e}if(Se<0)break e;At+=I}qe=A*q,Ue=A*Y,At=g;e:for(Ce=0;Ce0){V=q,q=Y,Y=V;break e}if(Se<0)break e;At+=I}qe=A*ee,Ue=A*te,At=g;e:for(Ce=0;Ce0){V=ee,ee=te,te=V;break e}if(Se<0)break e;At+=I}for(qe=A*O,Ue=A*q,xe=A*Y,he=A*ee,oe=A*te,le=A*R,ne=A*D,be=A*z,yt=0,At=g,Ce=0;Ce0)U--;else if(Se<0){for(qe=A*Q,Ue=A*ae,xe=A*U,At=g,Ce=0;Ce0)for(;;){re=g+U*A,yt=0;e:for(Ce=0;Ce0){if(--Uz){e:for(;;){for(re=g+ae*A,yt=0,At=g,Ce=0;Ce1&&x?T(o,x[0],x[1]):T(o)}var p={"uint32,1,0":function(d,y){return function(o){var x=o.data,M=o.offset|0,T=o.shape,E=o.stride,g=E[0]|0,A=T[0]|0,m=E[1]|0,h=T[1]|0,b=m,_=m,I=1;A<=32?d(0,A-1,x,M,g,m,A,h,b,_,I):y(0,A-1,x,M,g,m,A,h,b,_,I)}}};function f(d,y){var o=[y,d].join(","),x=p[o],M=i(d,y),T=c(d,y,M);return x(M,T)}l.exports=f},446:function(l,e,t){"use strict";var a=t(7640),r={};function n(i){var s=i.order,c=i.dtype,p=[s,c],f=p.join(":"),d=r[f];return d||(r[f]=d=a(s,c)),d(i),i}l.exports=n},9618:function(l,e,t){var a=t(7163),r=typeof Float64Array<"u";function n(y,o){return y[0]-o[0]}function i(){var y=this.stride,o=new Array(y.length),x;for(x=0;x=0&&(m=g|0,A+=b*m,h-=m),new M(this.data,h,b,A)},T.step=function(g){var A=this.shape[0],m=this.stride[0],h=this.offset,b=0,_=Math.ceil;return typeof g=="number"&&(b=g|0,b<0?(h+=m*(A-1),A=_(-A/b)):A=_(A/b),m*=b),new M(this.data,A,m,h)},T.transpose=function(g){g=g===void 0?0:g|0;var A=this.shape,m=this.stride;return new M(this.data,A[g],m[g],this.offset)},T.pick=function(g){var A=[],m=[],h=this.offset;typeof g=="number"&&g>=0?h=h+this.stride[0]*g|0:(A.push(this.shape[0]),m.push(this.stride[0]));var b=o[A.length+1];return b(this.data,A,m,h)},function(g,A,m,h){return new M(g,A[0],m[0],h)}},2:function(y,o,x){function M(E,g,A,m,h,b){this.data=E,this.shape=[g,A],this.stride=[m,h],this.offset=b|0}var T=M.prototype;return T.dtype=y,T.dimension=2,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(T,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),T.set=function(g,A,m){return y==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*A,m):this.data[this.offset+this.stride[0]*g+this.stride[1]*A]=m},T.get=function(g,A){return y==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*A):this.data[this.offset+this.stride[0]*g+this.stride[1]*A]},T.index=function(g,A){return this.offset+this.stride[0]*g+this.stride[1]*A},T.hi=function(g,A){return new M(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof A!="number"||A<0?this.shape[1]:A|0,this.stride[0],this.stride[1],this.offset)},T.lo=function(g,A){var m=this.offset,h=0,b=this.shape[0],_=this.shape[1],I=this.stride[0],C=this.stride[1];return typeof g=="number"&&g>=0&&(h=g|0,m+=I*h,b-=h),typeof A=="number"&&A>=0&&(h=A|0,m+=C*h,_-=h),new M(this.data,b,_,I,C,m)},T.step=function(g,A){var m=this.shape[0],h=this.shape[1],b=this.stride[0],_=this.stride[1],I=this.offset,C=0,F=Math.ceil;return typeof g=="number"&&(C=g|0,C<0?(I+=b*(m-1),m=F(-m/C)):m=F(m/C),b*=C),typeof A=="number"&&(C=A|0,C<0?(I+=_*(h-1),h=F(-h/C)):h=F(h/C),_*=C),new M(this.data,m,h,b,_,I)},T.transpose=function(g,A){g=g===void 0?0:g|0,A=A===void 0?1:A|0;var m=this.shape,h=this.stride;return new M(this.data,m[g],m[A],h[g],h[A],this.offset)},T.pick=function(g,A){var m=[],h=[],b=this.offset;typeof g=="number"&&g>=0?b=b+this.stride[0]*g|0:(m.push(this.shape[0]),h.push(this.stride[0])),typeof A=="number"&&A>=0?b=b+this.stride[1]*A|0:(m.push(this.shape[1]),h.push(this.stride[1]));var _=o[m.length+1];return _(this.data,m,h,b)},function(g,A,m,h){return new M(g,A[0],A[1],m[0],m[1],h)}},3:function(y,o,x){function M(E,g,A,m,h,b,_,I){this.data=E,this.shape=[g,A,m],this.stride=[h,b,_],this.offset=I|0}var T=M.prototype;return T.dtype=y,T.dimension=3,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(T,"order",{get:function(){var g=Math.abs(this.stride[0]),A=Math.abs(this.stride[1]),m=Math.abs(this.stride[2]);return g>A?A>m?[2,1,0]:g>m?[1,2,0]:[1,0,2]:g>m?[2,0,1]:m>A?[0,1,2]:[0,2,1]}}),T.set=function(g,A,m,h){return y==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*A+this.stride[2]*m,h):this.data[this.offset+this.stride[0]*g+this.stride[1]*A+this.stride[2]*m]=h},T.get=function(g,A,m){return y==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*A+this.stride[2]*m):this.data[this.offset+this.stride[0]*g+this.stride[1]*A+this.stride[2]*m]},T.index=function(g,A,m){return this.offset+this.stride[0]*g+this.stride[1]*A+this.stride[2]*m},T.hi=function(g,A,m){return new M(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof m!="number"||m<0?this.shape[2]:m|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},T.lo=function(g,A,m){var h=this.offset,b=0,_=this.shape[0],I=this.shape[1],C=this.shape[2],F=this.stride[0],R=this.stride[1],z=this.stride[2];return typeof g=="number"&&g>=0&&(b=g|0,h+=F*b,_-=b),typeof A=="number"&&A>=0&&(b=A|0,h+=R*b,I-=b),typeof m=="number"&&m>=0&&(b=m|0,h+=z*b,C-=b),new M(this.data,_,I,C,F,R,z,h)},T.step=function(g,A,m){var h=this.shape[0],b=this.shape[1],_=this.shape[2],I=this.stride[0],C=this.stride[1],F=this.stride[2],R=this.offset,z=0,D=Math.ceil;return typeof g=="number"&&(z=g|0,z<0?(R+=I*(h-1),h=D(-h/z)):h=D(h/z),I*=z),typeof A=="number"&&(z=A|0,z<0?(R+=C*(b-1),b=D(-b/z)):b=D(b/z),C*=z),typeof m=="number"&&(z=m|0,z<0?(R+=F*(_-1),_=D(-_/z)):_=D(_/z),F*=z),new M(this.data,h,b,_,I,C,F,R)},T.transpose=function(g,A,m){g=g===void 0?0:g|0,A=A===void 0?1:A|0,m=m===void 0?2:m|0;var h=this.shape,b=this.stride;return new M(this.data,h[g],h[A],h[m],b[g],b[A],b[m],this.offset)},T.pick=function(g,A,m){var h=[],b=[],_=this.offset;typeof g=="number"&&g>=0?_=_+this.stride[0]*g|0:(h.push(this.shape[0]),b.push(this.stride[0])),typeof A=="number"&&A>=0?_=_+this.stride[1]*A|0:(h.push(this.shape[1]),b.push(this.stride[1])),typeof m=="number"&&m>=0?_=_+this.stride[2]*m|0:(h.push(this.shape[2]),b.push(this.stride[2]));var I=o[h.length+1];return I(this.data,h,b,_)},function(g,A,m,h){return new M(g,A[0],A[1],A[2],m[0],m[1],m[2],h)}},4:function(y,o,x){function M(E,g,A,m,h,b,_,I,C,F){this.data=E,this.shape=[g,A,m,h],this.stride=[b,_,I,C],this.offset=F|0}var T=M.prototype;return T.dtype=y,T.dimension=4,Object.defineProperty(T,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(T,"order",{get:x}),T.set=function(g,A,m,h,b){return y==="generic"?this.data.set(this.offset+this.stride[0]*g+this.stride[1]*A+this.stride[2]*m+this.stride[3]*h,b):this.data[this.offset+this.stride[0]*g+this.stride[1]*A+this.stride[2]*m+this.stride[3]*h]=b},T.get=function(g,A,m,h){return y==="generic"?this.data.get(this.offset+this.stride[0]*g+this.stride[1]*A+this.stride[2]*m+this.stride[3]*h):this.data[this.offset+this.stride[0]*g+this.stride[1]*A+this.stride[2]*m+this.stride[3]*h]},T.index=function(g,A,m,h){return this.offset+this.stride[0]*g+this.stride[1]*A+this.stride[2]*m+this.stride[3]*h},T.hi=function(g,A,m,h){return new M(this.data,typeof g!="number"||g<0?this.shape[0]:g|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof m!="number"||m<0?this.shape[2]:m|0,typeof h!="number"||h<0?this.shape[3]:h|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},T.lo=function(g,A,m,h){var b=this.offset,_=0,I=this.shape[0],C=this.shape[1],F=this.shape[2],R=this.shape[3],z=this.stride[0],D=this.stride[1],k=this.stride[2],B=this.stride[3];return typeof g=="number"&&g>=0&&(_=g|0,b+=z*_,I-=_),typeof A=="number"&&A>=0&&(_=A|0,b+=D*_,C-=_),typeof m=="number"&&m>=0&&(_=m|0,b+=k*_,F-=_),typeof h=="number"&&h>=0&&(_=h|0,b+=B*_,R-=_),new M(this.data,I,C,F,R,z,D,k,B,b)},T.step=function(g,A,m,h){var b=this.shape[0],_=this.shape[1],I=this.shape[2],C=this.shape[3],F=this.stride[0],R=this.stride[1],z=this.stride[2],D=this.stride[3],k=this.offset,B=0,O=Math.ceil;return typeof g=="number"&&(B=g|0,B<0?(k+=F*(b-1),b=O(-b/B)):b=O(b/B),F*=B),typeof A=="number"&&(B=A|0,B<0?(k+=R*(_-1),_=O(-_/B)):_=O(_/B),R*=B),typeof m=="number"&&(B=m|0,B<0?(k+=z*(I-1),I=O(-I/B)):I=O(I/B),z*=B),typeof h=="number"&&(B=h|0,B<0?(k+=D*(C-1),C=O(-C/B)):C=O(C/B),D*=B),new M(this.data,b,_,I,C,F,R,z,D,k)},T.transpose=function(g,A,m,h){g=g===void 0?0:g|0,A=A===void 0?1:A|0,m=m===void 0?2:m|0,h=h===void 0?3:h|0;var b=this.shape,_=this.stride;return new M(this.data,b[g],b[A],b[m],b[h],_[g],_[A],_[m],_[h],this.offset)},T.pick=function(g,A,m,h){var b=[],_=[],I=this.offset;typeof g=="number"&&g>=0?I=I+this.stride[0]*g|0:(b.push(this.shape[0]),_.push(this.stride[0])),typeof A=="number"&&A>=0?I=I+this.stride[1]*A|0:(b.push(this.shape[1]),_.push(this.stride[1])),typeof m=="number"&&m>=0?I=I+this.stride[2]*m|0:(b.push(this.shape[2]),_.push(this.stride[2])),typeof h=="number"&&h>=0?I=I+this.stride[3]*h|0:(b.push(this.shape[3]),_.push(this.stride[3]));var C=o[b.length+1];return C(this.data,b,_,I)},function(g,A,m,h){return new M(g,A[0],A[1],A[2],A[3],m[0],m[1],m[2],m[3],h)}},5:function(o,x,M){function T(g,A,m,h,b,_,I,C,F,R,z,D){this.data=g,this.shape=[A,m,h,b,_],this.stride=[I,C,F,R,z],this.offset=D|0}var E=T.prototype;return E.dtype=o,E.dimension=5,Object.defineProperty(E,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(E,"order",{get:M}),E.set=function(A,m,h,b,_,I){return o==="generic"?this.data.set(this.offset+this.stride[0]*A+this.stride[1]*m+this.stride[2]*h+this.stride[3]*b+this.stride[4]*_,I):this.data[this.offset+this.stride[0]*A+this.stride[1]*m+this.stride[2]*h+this.stride[3]*b+this.stride[4]*_]=I},E.get=function(A,m,h,b,_){return o==="generic"?this.data.get(this.offset+this.stride[0]*A+this.stride[1]*m+this.stride[2]*h+this.stride[3]*b+this.stride[4]*_):this.data[this.offset+this.stride[0]*A+this.stride[1]*m+this.stride[2]*h+this.stride[3]*b+this.stride[4]*_]},E.index=function(A,m,h,b,_){return this.offset+this.stride[0]*A+this.stride[1]*m+this.stride[2]*h+this.stride[3]*b+this.stride[4]*_},E.hi=function(A,m,h,b,_){return new T(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,typeof m!="number"||m<0?this.shape[1]:m|0,typeof h!="number"||h<0?this.shape[2]:h|0,typeof b!="number"||b<0?this.shape[3]:b|0,typeof _!="number"||_<0?this.shape[4]:_|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},E.lo=function(A,m,h,b,_){var I=this.offset,C=0,F=this.shape[0],R=this.shape[1],z=this.shape[2],D=this.shape[3],k=this.shape[4],B=this.stride[0],O=this.stride[1],q=this.stride[2],Y=this.stride[3],ee=this.stride[4];return typeof A=="number"&&A>=0&&(C=A|0,I+=B*C,F-=C),typeof m=="number"&&m>=0&&(C=m|0,I+=O*C,R-=C),typeof h=="number"&&h>=0&&(C=h|0,I+=q*C,z-=C),typeof b=="number"&&b>=0&&(C=b|0,I+=Y*C,D-=C),typeof _=="number"&&_>=0&&(C=_|0,I+=ee*C,k-=C),new T(this.data,F,R,z,D,k,B,O,q,Y,ee,I)},E.step=function(A,m,h,b,_){var I=this.shape[0],C=this.shape[1],F=this.shape[2],R=this.shape[3],z=this.shape[4],D=this.stride[0],k=this.stride[1],B=this.stride[2],O=this.stride[3],q=this.stride[4],Y=this.offset,ee=0,te=Math.ceil;return typeof A=="number"&&(ee=A|0,ee<0?(Y+=D*(I-1),I=te(-I/ee)):I=te(I/ee),D*=ee),typeof m=="number"&&(ee=m|0,ee<0?(Y+=k*(C-1),C=te(-C/ee)):C=te(C/ee),k*=ee),typeof h=="number"&&(ee=h|0,ee<0?(Y+=B*(F-1),F=te(-F/ee)):F=te(F/ee),B*=ee),typeof b=="number"&&(ee=b|0,ee<0?(Y+=O*(R-1),R=te(-R/ee)):R=te(R/ee),O*=ee),typeof _=="number"&&(ee=_|0,ee<0?(Y+=q*(z-1),z=te(-z/ee)):z=te(z/ee),q*=ee),new T(this.data,I,C,F,R,z,D,k,B,O,q,Y)},E.transpose=function(A,m,h,b,_){A=A===void 0?0:A|0,m=m===void 0?1:m|0,h=h===void 0?2:h|0,b=b===void 0?3:b|0,_=_===void 0?4:_|0;var I=this.shape,C=this.stride;return new T(this.data,I[A],I[m],I[h],I[b],I[_],C[A],C[m],C[h],C[b],C[_],this.offset)},E.pick=function(A,m,h,b,_){var I=[],C=[],F=this.offset;typeof A=="number"&&A>=0?F=F+this.stride[0]*A|0:(I.push(this.shape[0]),C.push(this.stride[0])),typeof m=="number"&&m>=0?F=F+this.stride[1]*m|0:(I.push(this.shape[1]),C.push(this.stride[1])),typeof h=="number"&&h>=0?F=F+this.stride[2]*h|0:(I.push(this.shape[2]),C.push(this.stride[2])),typeof b=="number"&&b>=0?F=F+this.stride[3]*b|0:(I.push(this.shape[3]),C.push(this.stride[3])),typeof _=="number"&&_>=0?F=F+this.stride[4]*_|0:(I.push(this.shape[4]),C.push(this.stride[4]));var R=x[I.length+1];return R(this.data,I,C,F)},function(A,m,h,b){return new T(A,m[0],m[1],m[2],m[3],m[4],h[0],h[1],h[2],h[3],h[4],b)}}};function c(y,o){var x=o===-1?"T":String(o),M=s[x];return o===-1?M(y):o===0?M(y,f[y][0]):M(y,f[y],i)}function p(y){if(a(y))return"buffer";if(r)switch(Object.prototype.toString.call(y)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(y)?"array":"generic"}var f={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function d(y,o,x,M){if(y===void 0){var h=f.array[0];return h([])}else typeof y=="number"&&(y=[y]);o===void 0&&(o=[y.length]);var T=o.length;if(x===void 0){x=new Array(T);for(var E=T-1,g=1;E>=0;--E)x[E]=g,g*=o[E]}if(M===void 0){M=0;for(var E=0;E>>0;l.exports=i;function i(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var p=a.hi(s),f=a.lo(s);return c>s==s>0?f===n?(p+=1,f=0):f+=1:f===0?(f=n,p-=1):f-=1,a.pack(f,p)}},8406:function(l,e){var t=1e-6,a=1e-6;e.vertexNormals=function(r,n,i){for(var s=n.length,c=new Array(s),p=i===void 0?t:i,f=0;fp)for(var I=c[o],C=1/Math.sqrt(m*b),_=0;_<3;++_){var F=(_+1)%3,R=(_+2)%3;I[_]+=C*(h[F]*A[R]-h[R]*A[F])}}for(var f=0;fp)for(var C=1/Math.sqrt(z),_=0;_<3;++_)I[_]*=C;else for(var _=0;_<3;++_)I[_]=0}return c},e.faceNormals=function(r,n,i){for(var s=r.length,c=new Array(s),p=i===void 0?a:i,f=0;fp?E=1/Math.sqrt(E):E=0;for(var o=0;o<3;++o)T[o]*=E;c[f]=T}return c}},4081:function(l){"use strict";l.exports=e;function e(t,a,r,n,i,s,c,p,f,d){var y=a+s+d;if(o>0){var o=Math.sqrt(y+1);t[0]=.5*(c-f)/o,t[1]=.5*(p-n)/o,t[2]=.5*(r-s)/o,t[3]=.5*o}else{var x=Math.max(a,s,d),o=Math.sqrt(2*x-y+1);a>=x?(t[0]=.5*o,t[1]=.5*(i+r)/o,t[2]=.5*(p+n)/o,t[3]=.5*(c-f)/o):s>=x?(t[0]=.5*(r+i)/o,t[1]=.5*o,t[2]=.5*(f+c)/o,t[3]=.5*(p-n)/o):(t[0]=.5*(n+p)/o,t[1]=.5*(c+f)/o,t[2]=.5*o,t[3]=.5*(r-i)/o)}return t}},9977:function(l,e,t){"use strict";l.exports=o;var a=t(9215),r=t(6582),n=t(7399),i=t(7608),s=t(4081);function c(x,M,T){return Math.sqrt(Math.pow(x,2)+Math.pow(M,2)+Math.pow(T,2))}function p(x,M,T,E){return Math.sqrt(Math.pow(x,2)+Math.pow(M,2)+Math.pow(T,2)+Math.pow(E,2))}function f(x,M){var T=M[0],E=M[1],g=M[2],A=M[3],m=p(T,E,g,A);m>1e-6?(x[0]=T/m,x[1]=E/m,x[2]=g/m,x[3]=A/m):(x[0]=x[1]=x[2]=0,x[3]=1)}function d(x,M,T){this.radius=a([T]),this.center=a(M),this.rotation=a(x),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 y=d.prototype;y.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},y.recalcMatrix=function(x){this.radius.curve(x),this.center.curve(x),this.rotation.curve(x);var M=this.computedRotation;f(M,M);var T=this.computedMatrix;n(T,M);var E=this.computedCenter,g=this.computedEye,A=this.computedUp,m=Math.exp(this.computedRadius[0]);g[0]=E[0]+m*T[2],g[1]=E[1]+m*T[6],g[2]=E[2]+m*T[10],A[0]=T[1],A[1]=T[5],A[2]=T[9];for(var h=0;h<3;++h){for(var b=0,_=0;_<3;++_)b+=T[h+4*_]*g[_];T[12+h]=-b}},y.getMatrix=function(x,M){this.recalcMatrix(x);var T=this.computedMatrix;if(M){for(var E=0;E<16;++E)M[E]=T[E];return M}return T},y.idle=function(x){this.center.idle(x),this.radius.idle(x),this.rotation.idle(x)},y.flush=function(x){this.center.flush(x),this.radius.flush(x),this.rotation.flush(x)},y.pan=function(x,M,T,E){M=M||0,T=T||0,E=E||0,this.recalcMatrix(x);var g=this.computedMatrix,A=g[1],m=g[5],h=g[9],b=c(A,m,h);A/=b,m/=b,h/=b;var _=g[0],I=g[4],C=g[8],F=_*A+I*m+C*h;_-=A*F,I-=m*F,C-=h*F;var R=c(_,I,C);_/=R,I/=R,C/=R;var z=g[2],D=g[6],k=g[10],B=z*A+D*m+k*h,O=z*_+D*I+k*C;z-=B*A+O*_,D-=B*m+O*I,k-=B*h+O*C;var q=c(z,D,k);z/=q,D/=q,k/=q;var Y=_*M+A*T,ee=I*M+m*T,te=C*M+h*T;this.center.move(x,Y,ee,te);var ae=Math.exp(this.computedRadius[0]);ae=Math.max(1e-4,ae+E),this.radius.set(x,Math.log(ae))},y.rotate=function(x,M,T,E){this.recalcMatrix(x),M=M||0,T=T||0;var g=this.computedMatrix,A=g[0],m=g[4],h=g[8],b=g[1],_=g[5],I=g[9],C=g[2],F=g[6],R=g[10],z=M*A+T*b,D=M*m+T*_,k=M*h+T*I,B=-(F*k-R*D),O=-(R*z-C*k),q=-(C*D-F*z),Y=Math.sqrt(Math.max(0,1-Math.pow(B,2)-Math.pow(O,2)-Math.pow(q,2))),ee=p(B,O,q,Y);ee>1e-6?(B/=ee,O/=ee,q/=ee,Y/=ee):(B=O=q=0,Y=1);var te=this.computedRotation,ae=te[0],U=te[1],H=te[2],K=te[3],V=ae*Y+K*B+U*q-H*O,$=U*Y+K*O+H*B-ae*q,X=H*Y+K*q+ae*O-U*B,Z=K*Y-ae*B-U*O-H*q;if(E){B=C,O=F,q=R;var Q=Math.sin(E)/c(B,O,q);B*=Q,O*=Q,q*=Q,Y=Math.cos(M),V=V*Y+Z*B+$*q-X*O,$=$*Y+Z*O+X*B-V*q,X=X*Y+Z*q+V*O-$*B,Z=Z*Y-V*B-$*O-X*q}var re=p(V,$,X,Z);re>1e-6?(V/=re,$/=re,X/=re,Z/=re):(V=$=X=0,Z=1),this.rotation.set(x,V,$,X,Z)},y.lookAt=function(x,M,T,E){this.recalcMatrix(x),T=T||this.computedCenter,M=M||this.computedEye,E=E||this.computedUp;var g=this.computedMatrix;r(g,M,T,E);var A=this.computedRotation;s(A,g[0],g[1],g[2],g[4],g[5],g[6],g[8],g[9],g[10]),f(A,A),this.rotation.set(x,A[0],A[1],A[2],A[3]);for(var m=0,h=0;h<3;++h)m+=Math.pow(T[h]-M[h],2);this.radius.set(x,.5*Math.log(Math.max(m,1e-6))),this.center.set(x,T[0],T[1],T[2])},y.translate=function(x,M,T,E){this.center.move(x,M||0,T||0,E||0)},y.setMatrix=function(x,M){var T=this.computedRotation;s(T,M[0],M[1],M[2],M[4],M[5],M[6],M[8],M[9],M[10]),f(T,T),this.rotation.set(x,T[0],T[1],T[2],T[3]);var E=this.computedMatrix;i(E,M);var g=E[15];if(Math.abs(g)>1e-6){var A=E[12]/g,m=E[13]/g,h=E[14]/g;this.recalcMatrix(x);var b=Math.exp(this.computedRadius[0]);this.center.set(x,A-E[2]*b,m-E[6]*b,h-E[10]*b),this.radius.idle(x)}else this.center.idle(x),this.radius.idle(x)},y.setDistance=function(x,M){M>0&&this.radius.set(x,Math.log(M))},y.setDistanceLimits=function(x,M){x>0?x=Math.log(x):x=-1/0,M>0?M=Math.log(M):M=1/0,M=Math.max(M,x),this.radius.bounds[0][0]=x,this.radius.bounds[1][0]=M},y.getDistanceLimits=function(x){var M=this.radius.bounds;return x?(x[0]=Math.exp(M[0][0]),x[1]=Math.exp(M[1][0]),x):[Math.exp(M[0][0]),Math.exp(M[1][0])]},y.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]}},y.fromJSON=function(x){var M=this.lastT(),T=x.center;T&&this.center.set(M,T[0],T[1],T[2]);var E=x.rotation;E&&this.rotation.set(M,E[0],E[1],E[2],E[3]);var g=x.distance;g&&g>0&&this.radius.set(M,Math.log(g)),this.setDistanceLimits(x.zoomMin,x.zoomMax)};function o(x){x=x||{};var M=x.center||[0,0,0],T=x.rotation||[0,0,0,1],E=x.radius||1;M=[].slice.call(M,0,3),T=[].slice.call(T,0,4),f(T,T);var g=new d(T,M,Math.log(E));return g.setDistanceLimits(x.zoomMin,x.zoomMax),("eye"in x||"up"in x)&&g.lookAt(0,x.eye,x.center,x.up),g}},1371:function(l,e,t){"use strict";var a=t(3233);l.exports=function(n,i,s){return s=typeof s<"u"?s+"":" ",a(s,i)+n}},3202:function(l){l.exports=function(t,a){a||(a=[0,""]),t=String(t);var r=parseFloat(t,10);return a[0]=r,a[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",a}},3088:function(l,e,t){"use strict";l.exports=r;var a=t(3140);function r(n,i){for(var s=i.length|0,c=n.length,p=[new Array(s),new Array(s)],f=0;f0){I=p[R][b][0],F=R;break}C=I[F^1];for(var z=0;z<2;++z)for(var D=p[z][b],k=0;k0&&(I=B,C=O,F=z)}return _||I&&o(I,F),C}function M(h,b){var _=p[b][h][0],I=[h];o(_,b);for(var C=_[b^1],F=b;;){for(;C!==h;)I.push(C),C=x(I[I.length-2],C,!1);if(p[0][h].length+p[1][h].length===0)break;var R=I[I.length-1],z=h,D=I[1],k=x(R,z,!0);if(a(i[R],i[z],i[D],i[k])<0)break;I.push(h),C=x(R,z)}return I}function T(h,b){return b[1]===b[b.length-1]}for(var f=0;f0;){var A=p[0][f].length,m=M(f,E);T(g,m)?g.push.apply(g,m):(g.length>0&&y.push(g),g=m)}g.length>0&&y.push(g)}return y}},5609:function(l,e,t){"use strict";l.exports=r;var a=t(3134);function r(n,i){for(var s=a(n,i.length),c=new Array(i.length),p=new Array(i.length),f=[],d=0;d0;){var o=f.pop();c[o]=!1;for(var x=s[o],d=0;d0}A=A.filter(m);for(var h=A.length,b=new Array(h),_=new Array(h),g=0;g0;){var re=X.pop(),ce=ee[re];c(ce,function(Ce,qe){return Ce-qe});var me=ce.length,ye=Z[re],Ae;if(ye===0){var D=A[re];Ae=[D]}for(var g=0;g=0)&&(Z[Se]=ye^1,X.push(Se),ye===0)){var D=A[Se];$(D)||(D.reverse(),Ae.push(D))}}ye===0&&Q.push(Ae)}return Q}},5085:function(l,e,t){l.exports=x;var a=t(3250)[3],r=t(4209),n=t(3352),i=t(2478);function s(){return!0}function c(M){return function(T,E){var g=M[T];return g?!!g.queryPoint(E,s):!1}}function p(M){for(var T={},E=0;E0&&T[g]===E[0])A=M[g-1];else return 1;for(var m=1;A;){var h=A.key,b=a(E,h[0],h[1]);if(h[0][0]0)m=-1,A=A.right;else return 0;else if(b>0)A=A.left;else if(b<0)m=1,A=A.right;else return 0}return m}}function d(M){return 1}function y(M){return function(E){return M(E[0],E[1])?0:1}}function o(M,T){return function(g){return M(g[0],g[1])?0:T(g)}}function x(M){for(var T=M.length,E=[],g=[],A=0,m=0;m=d?(h=1,_=d+2*x+T):(h=-x/d,_=x*h+T)):(h=0,M>=0?(b=0,_=T):-M>=o?(b=1,_=o+2*M+T):(b=-M/o,_=M*b+T));else if(b<0)b=0,x>=0?(h=0,_=T):-x>=d?(h=1,_=d+2*x+T):(h=-x/d,_=x*h+T);else{var I=1/m;h*=I,b*=I,_=h*(d*h+y*b+2*x)+b*(y*h+o*b+2*M)+T}else{var C,F,R,z;h<0?(C=y+x,F=o+M,F>C?(R=F-C,z=d-2*y+o,R>=z?(h=1,b=0,_=d+2*x+T):(h=R/z,b=1-h,_=h*(d*h+y*b+2*x)+b*(y*h+o*b+2*M)+T)):(h=0,F<=0?(b=1,_=o+2*M+T):M>=0?(b=0,_=T):(b=-M/o,_=M*b+T))):b<0?(C=y+M,F=d+x,F>C?(R=F-C,z=d-2*y+o,R>=z?(b=1,h=0,_=o+2*M+T):(b=R/z,h=1-b,_=h*(d*h+y*b+2*x)+b*(y*h+o*b+2*M)+T)):(b=0,F<=0?(h=1,_=d+2*x+T):x>=0?(h=0,_=T):(h=-x/d,_=x*h+T))):(R=o+M-y-x,R<=0?(h=0,b=1,_=o+2*M+T):(z=d-2*y+o,R>=z?(h=1,b=0,_=d+2*x+T):(h=R/z,b=1-h,_=h*(d*h+y*b+2*x)+b*(y*h+o*b+2*M)+T)))}for(var D=1-h-b,f=0;f0){var o=s[p-1];if(a(d,o)===0&&n(o)!==y){p-=1;continue}}s[p++]=d}}return s.length=p,s}},3233:function(l){"use strict";var e="",t;l.exports=a;function a(r,n){if(typeof r!="string")throw new TypeError("expected a string");if(n===1)return r;if(n===2)return r+r;var i=r.length*n;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=i)return e.substr(0,i);for(;i>e.length&&n>1;)n&1&&(e+=r),n>>=1,r+=r;return e+=r,e=e.substr(0,i),e}},3025:function(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(l){"use strict";l.exports=e;function e(t){for(var a=t.length,r=t[t.length-1],n=a,i=a-2;i>=0;--i){var s=r,c=t[i];r=s+c;var p=r-s,f=c-p;f&&(t[--n]=r,r=f)}for(var d=0,i=n;i0){if(F<=0)return R;z=C+F}else if(C<0){if(F>=0)return R;z=-(C+F)}else return R;var D=p*z;return R>=D||R<=-D?R:M(b,_,I)},function(b,_,I,C){var F=b[0]-C[0],R=_[0]-C[0],z=I[0]-C[0],D=b[1]-C[1],k=_[1]-C[1],B=I[1]-C[1],O=b[2]-C[2],q=_[2]-C[2],Y=I[2]-C[2],ee=R*B,te=z*k,ae=z*D,U=F*B,H=F*k,K=R*D,V=O*(ee-te)+q*(ae-U)+Y*(H-K),$=(Math.abs(ee)+Math.abs(te))*Math.abs(O)+(Math.abs(ae)+Math.abs(U))*Math.abs(q)+(Math.abs(H)+Math.abs(K))*Math.abs(Y),X=f*$;return V>X||-V>X?V:T(b,_,I,C)}];function g(h){var b=E[h.length];return b||(b=E[h.length]=x(h.length)),b.apply(void 0,h)}function A(h,b,_,I,C,F,R){return function(D,k,B,O,q){switch(arguments.length){case 0:case 1:return 0;case 2:return I(D,k);case 3:return C(D,k,B);case 4:return F(D,k,B,O);case 5:return R(D,k,B,O,q)}for(var Y=new Array(arguments.length),ee=0;ee0&&d>0||f<0&&d<0)return!1;var y=a(c,i,s),o=a(p,i,s);return y>0&&o>0||y<0&&o<0?!1:f===0&&d===0&&y===0&&o===0?r(i,s,c,p):!0}},8545:function(l){"use strict";l.exports=t;function e(a,r){var n=a+r,i=n-a,s=n-i,c=r-i,p=a-s,f=p+c;return f?[f,n]:[n]}function t(a,r){var n=a.length|0,i=r.length|0;if(n===1&&i===1)return e(a[0],-r[0]);var s=n+i,c=new Array(s),p=0,f=0,d=0,y=Math.abs,o=a[f],x=y(o),M=-r[d],T=y(M),E,g;x=i?(E=o,f+=1,f=i?(E=o,f+=1,f"u"&&(E=s(x));var g=x.length;if(g===0||E<1)return{cells:[],vertexIds:[],vertexWeights:[]};var A=c(M,+T),m=p(x,E),h=f(m,M,A,+T),b=d(m,M.length|0),_=i(E)(x,m.data,b,A),I=y(m),C=[].slice.call(h.data,0,h.shape[0]);return r.free(A),r.free(m.data),r.free(h.data),r.free(b),{cells:_,vertexIds:I,vertexWeights:C}}},1570:function(l){"use strict";l.exports=t;var e=[function(){function r(i,s,c,p){for(var f=Math.min(c,p)|0,d=Math.max(c,p)|0,y=i[2*f],o=i[2*f+1];y>1,M=s[2*x+1];if(M===d)return x;d>1,M=s[2*x+1];if(M===d)return x;d>1,M=s[2*x+1];if(M===d)return x;d>1,M=s[2*x+1];if(M===d)return x;d>1,z=p(b[R],_);z<=0?(z===0&&(F=R),I=R+1):z>0&&(C=R-1)}return F}a=o;function x(b,_){for(var I=new Array(b.length),C=0,F=I.length;C=b.length||p(b[ee],R)!==0););}return I}a=x;function M(b,_){if(!_)return x(y(E(b,0)),b,0);for(var I=new Array(_),C=0;C<_;++C)I[C]=[];for(var C=0,F=b.length;C>>B&1&&k.push(F[B]);_.push(k)}return d(_)}a=T;function E(b,_){if(_<0)return[];for(var I=[],C=(1<<_+1)-1,F=0;F0)-(n<0)},e.abs=function(n){var i=n>>t-1;return(n^i)-i},e.min=function(n,i){return i^(n^i)&-(n65535)<<4,n>>>=i,s=(n>255)<<3,n>>>=s,i|=s,s=(n>15)<<2,n>>>=s,i|=s,s=(n>3)<<1,n>>>=s,i|=s,i|n>>1},e.log10=function(n){return n>=1e9?9:n>=1e8?8:n>=1e7?7:n>=1e6?6:n>=1e5?5:n>=1e4?4:n>=1e3?3:n>=100?2:n>=10?1:0},e.popCount=function(n){return n=n-(n>>>1&1431655765),n=(n&858993459)+(n>>>2&858993459),(n+(n>>>4)&252645135)*16843009>>>24};function a(n){var i=32;return n&=-n,n&&i--,n&65535&&(i-=16),n&16711935&&(i-=8),n&252645135&&(i-=4),n&858993459&&(i-=2),n&1431655765&&(i-=1),i}e.countTrailingZeros=a,e.nextPow2=function(n){return n+=n===0,--n,n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n+1},e.prevPow2=function(n){return n|=n>>>1,n|=n>>>2,n|=n>>>4,n|=n>>>8,n|=n>>>16,n-(n>>>1)},e.parity=function(n){return n^=n>>>16,n^=n>>>8,n^=n>>>4,n&=15,27030>>>n&1};var r=new Array(256);(function(n){for(var i=0;i<256;++i){var s=i,c=i,p=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--p;n[i]=c<>>8&255]<<16|r[n>>>16&255]<<8|r[n>>>24&255]},e.interleave2=function(n,i){return n&=65535,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,i&=65535,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,n|i<<1},e.deinterleave2=function(n,i){return n=n>>>i&1431655765,n=(n|n>>>1)&858993459,n=(n|n>>>2)&252645135,n=(n|n>>>4)&16711935,n=(n|n>>>16)&65535,n<<16>>16},e.interleave3=function(n,i,s){return n&=1023,n=(n|n<<16)&4278190335,n=(n|n<<8)&251719695,n=(n|n<<4)&3272356035,n=(n|n<<2)&1227133513,i&=1023,i=(i|i<<16)&4278190335,i=(i|i<<8)&251719695,i=(i|i<<4)&3272356035,i=(i|i<<2)&1227133513,n|=i<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,n|s<<2},e.deinterleave3=function(n,i){return n=n>>>i&1227133513,n=(n|n>>>2)&3272356035,n=(n|n>>>4)&251719695,n=(n|n>>>8)&4278190335,n=(n|n>>>16)&1023,n<<22>>22},e.nextCombination=function(n){var i=n|n-1;return i+1|(~i&-~i)-1>>>a(n)+1}},2014:function(l,e,t){"use strict";"use restrict";var a=t(3105),r=t(4623);function n(h){for(var b=0,_=Math.max,I=0,C=h.length;I>1,R=c(h[F],b);R<=0?(R===0&&(C=F),_=F+1):R>0&&(I=F-1)}return C}e.findCell=y;function o(h,b){for(var _=new Array(h.length),I=0,C=_.length;I=h.length||c(h[Y],F)!==0););}return _}e.incidence=o;function x(h,b){if(!b)return o(d(T(h,0)),h,0);for(var _=new Array(b),I=0;I>>k&1&&D.push(C[k]);b.push(D)}return f(b)}e.explode=M;function T(h,b){if(b<0)return[];for(var _=[],I=(1<>1:(U>>1)-1}function I(U){for(var H=b(U);;){var K=H,V=2*U+1,$=2*(U+1),X=U;if(V0;){var K=_(U);if(K>=0){var V=b(K);if(H0){var U=D[0];return h(0,O-1),O-=1,I(0),U}return-1}function R(U,H){var K=D[U];return x[K]===H?U:(x[K]=-1/0,C(U),F(),x[K]=H,O+=1,C(O-1))}function z(U){if(!M[U]){M[U]=!0;var H=y[U],K=o[U];y[K]>=0&&(y[K]=H),o[H]>=0&&(o[H]=K),k[H]>=0&&R(k[H],m(H)),k[K]>=0&&R(k[K],m(K))}}for(var D=[],k=new Array(f),T=0;T>1;T>=0;--T)I(T);for(;;){var q=F();if(q<0||x[q]>p)break;z(q)}for(var Y=[],T=0;T=0&&K>=0&&H!==K){var V=k[H],$=k[K];V!==$&&ae.push([V,$])}}),r.unique(r.normalize(ae)),{positions:Y,edges:ae}}},1303:function(l,e,t){"use strict";l.exports=n;var a=t(3250);function r(i,s){var c,p;if(s[0][0]s[1][0])c=s[1],p=s[0];else{var f=Math.min(i[0][1],i[1][1]),d=Math.max(i[0][1],i[1][1]),y=Math.min(s[0][1],s[1][1]),o=Math.max(s[0][1],s[1][1]);return do?f-o:d-o}var x,M;i[0][1]s[1][0])c=s[1],p=s[0];else return r(s,i);var f,d;if(i[0][0]i[1][0])f=i[1],d=i[0];else return-r(i,s);var y=a(c,p,d),o=a(c,p,f);if(y<0){if(o<=0)return y}else if(y>0){if(o>=0)return y}else if(o)return o;if(y=a(d,f,p),o=a(d,f,c),y<0){if(o<=0)return y}else if(y>0){if(o>=0)return y}else if(o)return o;return p[0]-d[0]}},4209:function(l,e,t){"use strict";l.exports=o;var a=t(2478),r=t(3840),n=t(3250),i=t(1303);function s(x,M,T){this.slabs=x,this.coordinates=M,this.horizontal=T}var c=s.prototype;function p(x,M){return x.y-M}function f(x,M){for(var T=null;x;){var E=x.key,g,A;E[0][0]0)if(M[0]!==E[1][0])T=x,x=x.right;else{var h=f(x.right,M);if(h)return h;x=x.left}else{if(M[0]!==E[1][0])return x;var h=f(x.right,M);if(h)return h;x=x.left}}return T}c.castUp=function(x){var M=a.le(this.coordinates,x[0]);if(M<0)return-1;var T=this.slabs[M],E=f(this.slabs[M],x),g=-1;if(E&&(g=E.value),this.coordinates[M]===x[0]){var A=null;if(E&&(A=E.key),M>0){var m=f(this.slabs[M-1],x);m&&(A?i(m.key,A)>0&&(A=m.key,g=m.value):(g=m.value,A=m.key))}var h=this.horizontal[M];if(h.length>0){var b=a.ge(h,x[1],p);if(b=h.length)return g;_=h[b]}}if(_.start)if(A){var I=n(A[0],A[1],[x[0],_.y]);A[0][0]>A[1][0]&&(I=-I),I>0&&(g=_.index)}else g=_.index;else _.y!==x[1]&&(g=_.index)}}}return g};function d(x,M,T,E){this.y=x,this.index=M,this.start=T,this.closed=E}function y(x,M,T,E){this.x=x,this.segment=M,this.create=T,this.index=E}function o(x){for(var M=x.length,T=2*M,E=new Array(T),g=0;g1&&(M=1);for(var T=1-M,E=f.length,g=new Array(E),A=0;A0||x>0&&g<0){var A=i(M,g,T,x);y.push(A),o.push(A.slice())}g<0?o.push(T.slice()):g>0?y.push(T.slice()):(y.push(T.slice()),o.push(T.slice())),x=g}return{positive:y,negative:o}}function c(f,d){for(var y=[],o=n(f[f.length-1],d),x=f[f.length-1],M=f[0],T=0;T0||o>0&&E<0)&&y.push(i(x,E,M,o)),E>=0&&y.push(M.slice()),o=E}return y}function p(f,d){for(var y=[],o=n(f[f.length-1],d),x=f[f.length-1],M=f[0],T=0;T0||o>0&&E<0)&&y.push(i(x,E,M,o)),E<=0&&y.push(M.slice()),o=E}return y}},3387:function(l,e,t){var a;(function(){"use strict";var r={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 n(f){return s(p(f),arguments)}function i(f,d){return n.apply(null,[f].concat(d||[]))}function s(f,d){var y=1,o=f.length,x,M="",T,E,g,A,m,h,b,_;for(T=0;T=0),g.type){case"b":x=parseInt(x,10).toString(2);break;case"c":x=String.fromCharCode(parseInt(x,10));break;case"d":case"i":x=parseInt(x,10);break;case"j":x=JSON.stringify(x,null,g.width?parseInt(g.width):0);break;case"e":x=g.precision?parseFloat(x).toExponential(g.precision):parseFloat(x).toExponential();break;case"f":x=g.precision?parseFloat(x).toFixed(g.precision):parseFloat(x);break;case"g":x=g.precision?String(Number(x.toPrecision(g.precision))):parseFloat(x);break;case"o":x=(parseInt(x,10)>>>0).toString(8);break;case"s":x=String(x),x=g.precision?x.substring(0,g.precision):x;break;case"t":x=String(!!x),x=g.precision?x.substring(0,g.precision):x;break;case"T":x=Object.prototype.toString.call(x).slice(8,-1).toLowerCase(),x=g.precision?x.substring(0,g.precision):x;break;case"u":x=parseInt(x,10)>>>0;break;case"v":x=x.valueOf(),x=g.precision?x.substring(0,g.precision):x;break;case"x":x=(parseInt(x,10)>>>0).toString(16);break;case"X":x=(parseInt(x,10)>>>0).toString(16).toUpperCase();break}r.json.test(g.type)?M+=x:(r.number.test(g.type)&&(!b||g.sign)?(_=b?"+":"-",x=x.toString().replace(r.sign,"")):_="",m=g.pad_char?g.pad_char==="0"?"0":g.pad_char.charAt(1):" ",h=g.width-(_+x).length,A=g.width&&h>0?m.repeat(h):"",M+=g.align?_+x+A:m==="0"?_+A+x:A+_+x)}return M}var c=Object.create(null);function p(f){if(c[f])return c[f];for(var d=f,y,o=[],x=0;d;){if((y=r.text.exec(d))!==null)o.push(y[0]);else if((y=r.modulo.exec(d))!==null)o.push("%");else if((y=r.placeholder.exec(d))!==null){if(y[2]){x|=1;var M=[],T=y[2],E=[];if((E=r.key.exec(T))!==null)for(M.push(E[1]);(T=T.substring(E[0].length))!=="";)if((E=r.key_access.exec(T))!==null)M.push(E[1]);else if((E=r.index_access.exec(T))!==null)M.push(E[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");y[2]=M}else x|=2;if(x===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");o.push({placeholder:y[0],param_no:y[1],keys:y[2],sign:y[3],pad_char:y[4],align:y[5],width:y[6],precision:y[7],type:y[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");d=d.substring(y[0].length)}return c[f]=o}e.sprintf=n,e.vsprintf=i,typeof window<"u"&&(window.sprintf=n,window.vsprintf=i,a=function(){return{sprintf:n,vsprintf:i}}.call(e,t,e,l),a!==void 0&&(l.exports=a))})()},3711:function(l,e,t){"use strict";l.exports=p;var a=t(2640),r=t(781),n={"2d":function(f,d,y){var o=f({order:d,scalarArguments:3,getters:y==="generic"?[0]:void 0,phase:function(M,T,E,g){return M>g|0},vertex:function(M,T,E,g,A,m,h,b,_,I,C,F,R){var z=(h<<0)+(b<<1)+(_<<2)+(I<<3)|0;if(!(z===0||z===15))switch(z){case 0:C.push([M-.5,T-.5]);break;case 1:C.push([M-.25-.25*(g+E-2*R)/(E-g),T-.25-.25*(A+E-2*R)/(E-A)]);break;case 2:C.push([M-.75-.25*(-g-E+2*R)/(g-E),T-.25-.25*(m+g-2*R)/(g-m)]);break;case 3:C.push([M-.5,T-.5-.5*(A+E+m+g-4*R)/(E-A+g-m)]);break;case 4:C.push([M-.25-.25*(m+A-2*R)/(A-m),T-.75-.25*(-A-E+2*R)/(A-E)]);break;case 5:C.push([M-.5-.5*(g+E+m+A-4*R)/(E-g+A-m),T-.5]);break;case 6:C.push([M-.5-.25*(-g-E+m+A)/(g-E+A-m),T-.5-.25*(-A-E+m+g)/(A-E+g-m)]);break;case 7:C.push([M-.75-.25*(m+A-2*R)/(A-m),T-.75-.25*(m+g-2*R)/(g-m)]);break;case 8:C.push([M-.75-.25*(-m-A+2*R)/(m-A),T-.75-.25*(-m-g+2*R)/(m-g)]);break;case 9:C.push([M-.5-.25*(g+E+-m-A)/(E-g+m-A),T-.5-.25*(A+E+-m-g)/(E-A+m-g)]);break;case 10:C.push([M-.5-.5*(-g-E+-m-A+4*R)/(g-E+m-A),T-.5]);break;case 11:C.push([M-.25-.25*(-m-A+2*R)/(m-A),T-.75-.25*(A+E-2*R)/(E-A)]);break;case 12:C.push([M-.5,T-.5-.5*(-A-E+-m-g+4*R)/(A-E+m-g)]);break;case 13:C.push([M-.75-.25*(g+E-2*R)/(E-g),T-.25-.25*(-m-g+2*R)/(m-g)]);break;case 14:C.push([M-.25-.25*(-g-E+2*R)/(g-E),T-.25-.25*(-A-E+2*R)/(A-E)]);break;case 15:C.push([M-.5,T-.5]);break}},cell:function(M,T,E,g,A,m,h,b,_){A?b.push([M,T]):b.push([T,M])}});return function(x,M){var T=[],E=[];return o(x,T,E,M),{positions:T,cells:E}}}};function i(f,d){var y=f.length+"d",o=n[y];if(o)return o(a,f,d)}function s(f,d){for(var y=r(f,d),o=y.length,x=new Array(o),M=new Array(o),T=0;TMath.max(g,A)?m[2]=1:g>Math.max(E,A)?m[0]=1:m[1]=1;for(var h=0,b=0,_=0;_<3;++_)h+=T[_]*T[_],b+=m[_]*T[_];for(var _=0;_<3;++_)m[_]-=b/h*T[_];return s(m,m),m}function y(T,E,g,A,m,h,b,_){this.center=a(g),this.up=a(A),this.right=a(m),this.radius=a([h]),this.angle=a([b,_]),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 I=0;I<16;++I)this.computedMatrix[I]=.5;this.recalcMatrix(0)}var o=y.prototype;o.setDistanceLimits=function(T,E){T>0?T=Math.log(T):T=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,T),this.radius.bounds[0][0]=T,this.radius.bounds[1][0]=E},o.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])]},o.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,g=this.computedRight,A=0,m=0,h=0;h<3;++h)m+=E[h]*g[h],A+=E[h]*E[h];for(var b=Math.sqrt(A),_=0,h=0;h<3;++h)g[h]-=E[h]*m/A,_+=g[h]*g[h],E[h]/=b;for(var I=Math.sqrt(_),h=0;h<3;++h)g[h]/=I;var C=this.computedToward;i(C,E,g),s(C,C);for(var F=Math.exp(this.computedRadius[0]),R=this.computedAngle[0],z=this.computedAngle[1],D=Math.cos(R),k=Math.sin(R),B=Math.cos(z),O=Math.sin(z),q=this.computedCenter,Y=D*B,ee=k*B,te=O,ae=-D*O,U=-k*O,H=B,K=this.computedEye,V=this.computedMatrix,h=0;h<3;++h){var $=Y*g[h]+ee*C[h]+te*E[h];V[4*h+1]=ae*g[h]+U*C[h]+H*E[h],V[4*h+2]=$,V[4*h+3]=0}var X=V[1],Z=V[5],Q=V[9],re=V[2],ce=V[6],me=V[10],ye=Z*me-Q*ce,Ae=Q*re-X*me,Se=X*ce-Z*re,Ce=p(ye,Ae,Se);ye/=Ce,Ae/=Ce,Se/=Ce,V[0]=ye,V[4]=Ae,V[8]=Se;for(var h=0;h<3;++h)K[h]=q[h]+V[2+4*h]*F;for(var h=0;h<3;++h){for(var _=0,qe=0;qe<3;++qe)_+=V[h+4*qe]*K[qe];V[12+h]=-_}V[15]=1},o.getMatrix=function(T,E){this.recalcMatrix(T);var g=this.computedMatrix;if(E){for(var A=0;A<16;++A)E[A]=g[A];return E}return g};var x=[0,0,0];o.rotate=function(T,E,g,A){if(this.angle.move(T,E,g),A){this.recalcMatrix(T);var m=this.computedMatrix;x[0]=m[2],x[1]=m[6],x[2]=m[10];for(var h=this.computedUp,b=this.computedRight,_=this.computedToward,I=0;I<3;++I)m[4*I]=h[I],m[4*I+1]=b[I],m[4*I+2]=_[I];n(m,m,A,x);for(var I=0;I<3;++I)h[I]=m[4*I],b[I]=m[4*I+1];this.up.set(T,h[0],h[1],h[2]),this.right.set(T,b[0],b[1],b[2])}},o.pan=function(T,E,g,A){E=E||0,g=g||0,A=A||0,this.recalcMatrix(T);var m=this.computedMatrix,h=Math.exp(this.computedRadius[0]),b=m[1],_=m[5],I=m[9],C=p(b,_,I);b/=C,_/=C,I/=C;var F=m[0],R=m[4],z=m[8],D=F*b+R*_+z*I;F-=b*D,R-=_*D,z-=I*D;var k=p(F,R,z);F/=k,R/=k,z/=k;var B=F*E+b*g,O=R*E+_*g,q=z*E+I*g;this.center.move(T,B,O,q);var Y=Math.exp(this.computedRadius[0]);Y=Math.max(1e-4,Y+A),this.radius.set(T,Math.log(Y))},o.translate=function(T,E,g,A){this.center.move(T,E||0,g||0,A||0)},o.setMatrix=function(T,E,g,A){var m=1;typeof g=="number"&&(m=g|0),(m<0||m>3)&&(m=1);var h=(m+2)%3,b=(m+1)%3;E||(this.recalcMatrix(T),E=this.computedMatrix);var _=E[m],I=E[m+4],C=E[m+8];if(A){var R=Math.abs(_),z=Math.abs(I),D=Math.abs(C),k=Math.max(R,z,D);R===k?(_=_<0?-1:1,I=C=0):D===k?(C=C<0?-1:1,_=I=0):(I=I<0?-1:1,_=C=0)}else{var F=p(_,I,C);_/=F,I/=F,C/=F}var B=E[h],O=E[h+4],q=E[h+8],Y=B*_+O*I+q*C;B-=_*Y,O-=I*Y,q-=C*Y;var ee=p(B,O,q);B/=ee,O/=ee,q/=ee;var te=I*q-C*O,ae=C*B-_*q,U=_*O-I*B,H=p(te,ae,U);te/=H,ae/=H,U/=H,this.center.jump(T,le,ne,be),this.radius.idle(T),this.up.jump(T,_,I,C),this.right.jump(T,B,O,q);var K,V;if(m===2){var $=E[1],X=E[5],Z=E[9],Q=$*B+X*O+Z*q,re=$*te+X*ae+Z*U;Ae<0?K=-Math.PI/2:K=Math.PI/2,V=Math.atan2(re,Q)}else{var ce=E[2],me=E[6],ye=E[10],Ae=ce*_+me*I+ye*C,Se=ce*B+me*O+ye*q,Ce=ce*te+me*ae+ye*U;K=Math.asin(f(Ae)),V=Math.atan2(Ce,Se)}this.angle.jump(T,V,K),this.recalcMatrix(T);var qe=E[2],Ue=E[6],xe=E[10],he=this.computedMatrix;r(he,E);var oe=he[15],le=he[12]/oe,ne=he[13]/oe,be=he[14]/oe,Fe=Math.exp(this.computedRadius[0]);this.center.jump(T,le-qe*Fe,ne-Ue*Fe,be-xe*Fe)},o.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},o.idle=function(T){this.center.idle(T),this.up.idle(T),this.right.idle(T),this.radius.idle(T),this.angle.idle(T)},o.flush=function(T){this.center.flush(T),this.up.flush(T),this.right.flush(T),this.radius.flush(T),this.angle.flush(T)},o.setDistance=function(T,E){E>0&&this.radius.set(T,Math.log(E))},o.lookAt=function(T,E,g,A){this.recalcMatrix(T),E=E||this.computedEye,g=g||this.computedCenter,A=A||this.computedUp;var m=A[0],h=A[1],b=A[2],_=p(m,h,b);if(!(_<1e-6)){m/=_,h/=_,b/=_;var I=E[0]-g[0],C=E[1]-g[1],F=E[2]-g[2],R=p(I,C,F);if(!(R<1e-6)){I/=R,C/=R,F/=R;var z=this.computedRight,D=z[0],k=z[1],B=z[2],O=m*D+h*k+b*B;D-=O*m,k-=O*h,B-=O*b;var q=p(D,k,B);if(!(q<.01&&(D=h*F-b*C,k=b*I-m*F,B=m*C-h*I,q=p(D,k,B),q<1e-6))){D/=q,k/=q,B/=q,this.up.set(T,m,h,b),this.right.set(T,D,k,B),this.center.set(T,g[0],g[1],g[2]),this.radius.set(T,Math.log(R));var Y=h*B-b*k,ee=b*D-m*B,te=m*k-h*D,ae=p(Y,ee,te);Y/=ae,ee/=ae,te/=ae;var U=m*I+h*C+b*F,H=D*I+k*C+B*F,K=Y*I+ee*C+te*F,V=Math.asin(f(U)),$=Math.atan2(K,H),X=this.angle._state,Z=X[X.length-1],Q=X[X.length-2];Z=Z%(2*Math.PI);var re=Math.abs(Z+2*Math.PI-$),ce=Math.abs(Z-$),me=Math.abs(Z-2*Math.PI-$);re0?B.pop():new ArrayBuffer(D)}e.mallocArrayBuffer=x;function M(z){return new Uint8Array(x(z),0,z)}e.mallocUint8=M;function T(z){return new Uint16Array(x(2*z),0,z)}e.mallocUint16=T;function E(z){return new Uint32Array(x(4*z),0,z)}e.mallocUint32=E;function g(z){return new Int8Array(x(z),0,z)}e.mallocInt8=g;function A(z){return new Int16Array(x(2*z),0,z)}e.mallocInt16=A;function m(z){return new Int32Array(x(4*z),0,z)}e.mallocInt32=m;function h(z){return new Float32Array(x(4*z),0,z)}e.mallocFloat32=e.mallocFloat=h;function b(z){return new Float64Array(x(8*z),0,z)}e.mallocFloat64=e.mallocDouble=b;function _(z){return i?new Uint8ClampedArray(x(z),0,z):M(z)}e.mallocUint8Clamped=_;function I(z){return s?new BigUint64Array(x(8*z),0,z):null}e.mallocBigUint64=I;function C(z){return c?new BigInt64Array(x(8*z),0,z):null}e.mallocBigInt64=C;function F(z){return new DataView(x(z),0,z)}e.mallocDataView=F;function R(z){z=a.nextPow2(z);var D=a.log2(z),k=d[D];return k.length>0?k.pop():new n(z)}e.mallocBuffer=R,e.clearCache=function(){for(var D=0;D<32;++D)p.UINT8[D].length=0,p.UINT16[D].length=0,p.UINT32[D].length=0,p.INT8[D].length=0,p.INT16[D].length=0,p.INT32[D].length=0,p.FLOAT[D].length=0,p.DOUBLE[D].length=0,p.BIGUINT64[D].length=0,p.BIGINT64[D].length=0,p.UINT8C[D].length=0,f[D].length=0,d[D].length=0}},1755:function(l){"use strict";"use restrict";l.exports=e;function e(a){this.roots=new Array(a),this.ranks=new Array(a);for(var r=0;r",B="",O=k.length,q=B.length,Y=R[0]===x||R[0]===E,ee=0,te=-q;ee>-1&&(ee=z.indexOf(k,ee),!(ee===-1||(te=z.indexOf(B,ee+O),te===-1)||te<=ee));){for(var ae=ee;ae=te)D[ae]=null,z=z.substr(0,ae)+" "+z.substr(ae+1);else if(D[ae]!==null){var U=D[ae].indexOf(R[0]);U===-1?D[ae]+=R:Y&&(D[ae]=D[ae].substr(0,U+1)+(1+parseInt(D[ae][U+1]))+D[ae].substr(U+2))}var H=ee+O,K=z.substr(H,te-H),V=K.indexOf(k);V!==-1?ee=V:ee=te+q}return D}function m(F,R,z){for(var D=R.textAlign||"start",k=R.textBaseline||"alphabetic",B=[1<<30,1<<30],O=[0,0],q=F.length,Y=0;Y/g,` -`):z=z.replace(/\/g," ");var O="",q=[];for(Z=0;Z-1?parseInt(ne[1+Ve]):0,st=je>-1?parseInt(be[1+je]):0;ut!==st&&(Fe=Fe.replace(Se(),"?px "),ce*=Math.pow(.75,st-ut),Fe=Fe.replace("?px ",Se())),re+=.25*U*(st-ut)}if(B.superscripts===!0){var yt=ne.indexOf(x),At=be.indexOf(x),Pt=yt>-1?parseInt(ne[1+yt]):0,Zt=At>-1?parseInt(be[1+At]):0;Pt!==Zt&&(Fe=Fe.replace(Se(),"?px "),ce*=Math.pow(.75,Zt-Pt),Fe=Fe.replace("?px ",Se())),re-=.25*U*(Zt-Pt)}if(B.bolds===!0){var vr=ne.indexOf(f)>-1,Nt=be.indexOf(f)>-1;!vr&&Nt&&(Kt?Fe=Fe.replace("italic ","italic bold "):Fe="bold "+Fe),vr&&!Nt&&(Fe=Fe.replace("bold ",""))}if(B.italics===!0){var Kt=ne.indexOf(y)>-1,nt=be.indexOf(y)>-1;!Kt&&nt&&(Fe="italic "+Fe),Kt&&!nt&&(Fe=Fe.replace("italic ",""))}R.font=Fe}for(X=0;X0&&(k=D.size),D.lineSpacing&&D.lineSpacing>0&&(B=D.lineSpacing),D.styletags&&D.styletags.breaklines&&(O.breaklines=!!D.styletags.breaklines),D.styletags&&D.styletags.bolds&&(O.bolds=!!D.styletags.bolds),D.styletags&&D.styletags.italics&&(O.italics=!!D.styletags.italics),D.styletags&&D.styletags.subscripts&&(O.subscripts=!!D.styletags.subscripts),D.styletags&&D.styletags.superscripts&&(O.superscripts=!!D.styletags.superscripts)),z.font=[D.fontStyle,D.fontVariant,D.fontWeight,k+"px",D.font].filter(function(Y){return Y}).join(" "),z.textAlign="start",z.textBaseline="alphabetic",z.direction="ltr";var q=h(R,z,F,k,B,O);return I(q,D,k)}},1538:function(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(_){_.permitHostObjects___&&_.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var a=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var n=new r,i=Object.freeze({});if(n.set(i,1),n.get(i)!==1)a=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,p=Object.defineProperty,f=Object.isExtensible,d="weakmap:",y=d+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var o=new ArrayBuffer(25),x=new Uint8Array(o);crypto.getRandomValues(x),y=d+"rand:"+Array.prototype.map.call(x,function(_){return(_%36).toString(36)}).join("")+"___"}function M(_){return!(_.substr(0,d.length)==d&&_.substr(_.length-3)==="___")}if(p(Object,"getOwnPropertyNames",{value:function(I){return c(I).filter(M)}}),"getPropertyNames"in Object){var T=Object.getPropertyNames;p(Object,"getPropertyNames",{value:function(I){return T(I).filter(M)}})}function E(_){if(_!==Object(_))throw new TypeError("Not an object: "+_);var I=_[y];if(I&&I.key===_)return I;if(f(_)){I={key:_};try{return p(_,y,{value:I,writable:!1,enumerable:!1,configurable:!1}),I}catch{return}}}(function(){var _=Object.freeze;p(Object,"freeze",{value:function(R){return E(R),_(R)}});var I=Object.seal;p(Object,"seal",{value:function(R){return E(R),I(R)}});var C=Object.preventExtensions;p(Object,"preventExtensions",{value:function(R){return E(R),C(R)}})})();function g(_){return _.prototype=null,Object.freeze(_)}var A=!1;function m(){!A&&typeof console<"u"&&(A=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var h=0,b=function(){this instanceof b||m();var _=[],I=[],C=h++;function F(k,B){var O,q=E(k);return q?C in q?q[C]:B:(O=_.indexOf(k),O>=0?I[O]:B)}function R(k){var B=E(k);return B?C in B:_.indexOf(k)>=0}function z(k,B){var O,q=E(k);return q?q[C]=B:(O=_.indexOf(k),O>=0?I[O]=B:(O=_.length,I[O]=B,_[O]=k)),this}function D(k){var B=E(k),O,q;return B?C in B&&delete B[C]:(O=_.indexOf(k),O<0?!1:(q=_.length-1,_[O]=void 0,I[O]=I[q],_[O]=_[q],_.length=q,I.length=q,!0))}return Object.create(b.prototype,{get___:{value:g(F)},has___:{value:g(R)},set___:{value:g(z)},delete___:{value:g(D)}})};b.prototype=Object.create(Object.prototype,{get:{value:function(I,C){return this.get___(I,C)},writable:!0,configurable:!0},has:{value:function(I){return this.has___(I)},writable:!0,configurable:!0},set:{value:function(I,C){return this.set___(I,C)},writable:!0,configurable:!0},delete:{value:function(I){return this.delete___(I)},writable:!0,configurable:!0}}),typeof r=="function"?function(){a&&typeof Proxy<"u"&&(Proxy=void 0);function _(){this instanceof b||m();var I=new r,C=void 0,F=!1;function R(B,O){return C?I.has(B)?I.get(B):C.get___(B,O):I.get(B,O)}function z(B){return I.has(B)||(C?C.has___(B):!1)}var D;a?D=function(B,O){return I.set(B,O),I.has(B)||(C||(C=new b),C.set(B,O)),this}:D=function(B,O){if(F)try{I.set(B,O)}catch{C||(C=new b),C.set___(B,O)}else I.set(B,O);return this};function k(B){var O=!!I.delete(B);return C&&C.delete___(B)||O}return Object.create(b.prototype,{get___:{value:g(R)},has___:{value:g(z)},set___:{value:g(D)},delete___:{value:g(k)},permitHostObjects___:{value:g(function(B){if(B===t)F=!0;else throw new Error("bogus call to permitHostObjects___")})}})}_.prototype=b.prototype,l.exports=_,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=b)})()},236:function(l,e,t){var a=t(8284);l.exports=r;function r(){var n={};return function(i){if((typeof i!="object"||i===null)&&typeof i!="function")throw new Error("Weakmap-shim: Key must be object");var s=i.valueOf(n);return s&&s.identity===n?s:a(i,n)}}},8284:function(l){l.exports=e;function e(t,a){var r={identity:a},n=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(i){return i!==a?n.apply(this,arguments):r},writable:!0}),r}},606:function(l,e,t){var a=t(236);l.exports=r;function r(){var n=a();return{get:function(i,s){var c=n(i);return c.hasOwnProperty("value")?c.value:s},set:function(i,s){return n(i).value=s,this},has:function(i){return"value"in n(i)},delete:function(i){return delete n(i).value}}}},3349:function(l){"use strict";function e(){return function(s,c,p,f,d,y){var o=s[0],x=p[0],M=[0],T=x;f|=0;var E=0,g=x;for(E=0;E=0!=m>=0&&d.push(M[0]+.5+.5*(A+m)/(A-m))}f+=g,++M[0]}}}function t(){return e()}var a=t;function r(s){var c={};return function(f,d,y){var o=f.dtype,x=f.order,M=[o,x.join()].join(),T=c[M];return T||(c[M]=T=s([o,x])),T(f.shape.slice(0),f.data,f.stride,f.offset|0,d,y)}}function n(s){return r(a.bind(void 0,s))}function i(s){return n({funcName:s.funcName})}l.exports=i({funcName:"zeroCrossings"})},781:function(l,e,t){"use strict";l.exports=r;var a=t(3349);function r(n,i){var s=[];return i=+i||0,a(n.hi(n.shape[0]-1),s,i),s}},7790:function(){}},v={};function w(l){var e=v[l];if(e!==void 0)return e.exports;var t=v[l]={id:l,loaded:!1,exports:{}};return u[l].call(t.exports,t,t.exports,w),t.loaded=!0,t.exports}(function(){w.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){w.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var S=w(1964);N.exports=S})()}}),QA=De({"node_modules/color-name/index.js"(j,N){"use strict";N.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]}}}),EB=De({"node_modules/color-normalize/node_modules/color-parse/index.js"(j,N){"use strict";var u=QA();N.exports=w;var v={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function w(S){var l,e=[],t=1,a;if(typeof S=="string")if(S=S.toLowerCase(),u[S])e=u[S].slice(),a="rgb";else if(S==="transparent")t=0,a="rgb",e=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(S)){var r=S.slice(1),n=r.length,i=n<=4;t=1,i?(e=[parseInt(r[0]+r[0],16),parseInt(r[1]+r[1],16),parseInt(r[2]+r[2],16)],n===4&&(t=parseInt(r[3]+r[3],16)/255)):(e=[parseInt(r[0]+r[1],16),parseInt(r[2]+r[3],16),parseInt(r[4]+r[5],16)],n===8&&(t=parseInt(r[6]+r[7],16)/255)),e[0]||(e[0]=0),e[1]||(e[1]=0),e[2]||(e[2]=0),a="rgb"}else if(l=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(S)){var s=l[1],c=s==="rgb",r=s.replace(/a$/,"");a=r;var n=r==="cmyk"?4:r==="gray"?1:3;e=l[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(d,y){if(/%$/.test(d))return y===n?parseFloat(d)/100:r==="rgb"?parseFloat(d)*255/100:parseFloat(d);if(r[y]==="h"){if(/deg$/.test(d))return parseFloat(d);if(v[d]!==void 0)return v[d]}return parseFloat(d)}),s===r&&e.push(1),t=c||e[n]===void 0?1:e[n],e=e.slice(0,n)}else S.length>10&&/[0-9](?:\s|\/)/.test(S)&&(e=S.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),a=S.match(/([a-z])/ig).join("").toLowerCase());else isNaN(S)?Array.isArray(S)||S.length?(e=[S[0],S[1],S[2]],a="rgb",t=S.length===4?S[3]:1):S instanceof Object&&(S.r!=null||S.red!=null||S.R!=null?(a="rgb",e=[S.r||S.red||S.R||0,S.g||S.green||S.G||0,S.b||S.blue||S.B||0]):(a="hsl",e=[S.h||S.hue||S.H||0,S.s||S.saturation||S.S||0,S.l||S.lightness||S.L||S.b||S.brightness]),t=S.a||S.alpha||S.opacity||1,S.opacity!=null&&(t/=100)):(a="rgb",e=[S>>>16,(S&65280)>>>8,S&255]);return{space:a,values:e,alpha:t}}}}),kB=De({"node_modules/color-normalize/node_modules/color-rgba/index.js"(j,N){"use strict";var u=EB();N.exports=function(S){Array.isArray(S)&&S.raw&&(S=String.raw.apply(null,arguments));var l,e,t,a=u(S);if(!a.space)return[];var r=[0,0,0],n=a.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(a.values[0],r[0]),n[0]),l[1]=Math.min(Math.max(a.values[1],r[1]),n[1]),l[2]=Math.min(Math.max(a.values[2],r[2]),n[2]),a.space[0]==="h"&&(l=v(l)),l.push(Math.min(Math.max(a.alpha,0),1)),l};function v(w){var S=w[0]/360,l=w[1]/100,e=w[2]/100,t,a,r,n,i,s=0;if(l===0)return i=e*255,[i,i,i];for(a=e<.5?e*(1+l):e+l-e*l,t=2*e-a,n=[0,0,0];s<3;)r=S+1/3*-(s-1),r<0?r++:r>1&&r--,i=6*r<1?t+(a-t)*6*r:2*r<1?a:3*r<2?t+(a-t)*(2/3-r)*6:t,n[s++]=i*255;return n}}}),dg=De({"node_modules/clamp/index.js"(j,N){N.exports=u;function u(v,w,S){return wS?S:v:vw?w:v}}}),Lb=De({"node_modules/dtype/index.js"(j,N){N.exports=function(u){switch(u){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}}}}),ap=De({"node_modules/color-normalize/index.js"(j,N){"use strict";var u=kB(),v=dg(),w=Lb();N.exports=function(e,t){(t==="float"||!t)&&(t="array"),t==="uint"&&(t="uint8"),t==="uint_clamped"&&(t="uint8_clamped");var a=w(t),r=new a(4),n=t!=="uint8"&&t!=="uint8_clamped";return(!e.length||typeof e=="string")&&(e=u(e),e[0]/=255,e[1]/=255,e[2]/=255),S(e)?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3]!=null?e[3]:255,n&&(r[0]/=255,r[1]/=255,r[2]/=255,r[3]/=255),r):(n?(r[0]=e[0],r[1]=e[1],r[2]=e[2],r[3]=e[3]!=null?e[3]:1):(r[0]=v(Math.floor(e[0]*255),0,255),r[1]=v(Math.floor(e[1]*255),0,255),r[2]=v(Math.floor(e[2]*255),0,255),r[3]=e[3]==null?255:v(Math.floor(e[3]*255),0,255)),r)};function S(l){return!!(l instanceof Uint8Array||l instanceof Uint8ClampedArray||Array.isArray(l)&&(l[0]>1||l[0]===0)&&(l[1]>1||l[1]===0)&&(l[2]>1||l[2]===0)&&(!l[3]||l[3]>1))}}}),tv=De({"src/lib/str2rgbarray.js"(j,N){"use strict";var u=ap();function v(w){return w?u(w):[0,0,0,1]}N.exports=v}}),rv=De({"src/lib/gl_format_color.js"(j,N){"use strict";var u=io(),v=ap(),w=Dl(),S=ii(),l=mc().defaultLine,e=Vf().isArrayOrTypedArray,t=v(l),a=1;function r(p,f){var d=p;return d[3]*=f,d}function n(p){if(u(p))return t;var f=v(p);return f.length?f:t}function i(p){return u(p)?p:a}function s(p,f,d){var y=p.color;y&&y._inputArray&&(y=y._inputArray);var o=e(y),x=e(f),M=w.extractOpts(p),T=[],E,g,A,m,h;if(M.colorscale!==void 0?E=w.makeColorScaleFuncFromTrace(p):E=n,o?g=function(_,I){return _[I]===void 0?t:v(E(_[I]))}:g=n,x?A=function(_,I){return _[I]===void 0?a:i(_[I])}:A=i,o||x)for(var b=0;b0){var d=a.c2l(p);a._lowerLogErrorBound||(a._lowerLogErrorBound=d),a._lowerErrorBound=Math.min(a._lowerLogErrorBound,d)}}else n[i]=[-s[0]*t,s[1]*t]}return n}function w(l){for(var e=0;e-1?-1:I.indexOf("right")>-1?1:0}function M(I){return I==null?0:I.indexOf("top")>-1?-1:I.indexOf("bottom")>-1?1:0}function T(I){var C=0,F=0,R=[C,F];if(Array.isArray(I))for(var z=0;z=0){var q=y(B.position,B.delaunayColor,B.delaunayAxis);q.opacity=I.opacity,this.delaunayMesh?this.delaunayMesh.update(q):(q.gl=C,this.delaunayMesh=S(q),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},d.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function _(I,C){var F=new f(I,C.uid);return F.update(C),F}N.exports=_}}),tT=De({"src/traces/scatter3d/attributes.js"(j,N){"use strict";var u=bu(),v=Ml(),w=ul(),S=Zl().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=Is(),a=Bs(),r=eT(),n=Pb(),i=Ji().extendFlat,s=Ul().overrideAll,c=(Ap(),ts(Uv)).default,p=u.line,f=u.marker,d=f.line,y=i({width:p.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},w("line"));function o(M){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var x=N.exports=s({x:u.x,y:u.y,z:{valType:"data_array"},text:i({},u.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:i({},u.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:S("x"),yhoverformat:S("y"),zhoverformat:S("z"),mode:i({},u.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:o("x"),y:o("y"),z:o("z")},connectgaps:u.connectgaps,line:y,marker:i({symbol:{valType:"enumerated",values:c(n),dflt:"circle",arrayOk:!0},size:i({},f.size,{dflt:8}),sizeref:f.sizeref,sizemin:f.sizemin,sizemode:f.sizemode,opacity:i({},f.opacity,{arrayOk:!1}),colorbar:f.colorbar,line:i({width:i({},d.width,{arrayOk:!1})},w("marker.line"))},w("marker")),textposition:i({},u.textposition,{dflt:"top center"}),textfont:v({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:a.opacity,hoverinfo:i({},a.hoverinfo)},"calc","nested");x.x.editType=x.y.editType=x.z.editType="calc+clearAxisTypes"}}),PB=De({"src/traces/scatter3d/defaults.js"(j,N){"use strict";var u=hi(),v=Ar(),w=Sl(),S=Jh(),l=cd(),e=fd(),t=tT();N.exports=function(n,i,s,c){function p(E,g){return v.coerce(n,i,t,E,g)}var f=a(n,i,p,c);if(!f){i.visible=!1;return}p("text"),p("hovertext"),p("hovertemplate"),p("hovertemplatefallback"),p("xhoverformat"),p("yhoverformat"),p("zhoverformat"),p("mode"),w.hasMarkers(i)&&S(n,i,s,c,p,{noAngle:!0,noLineDash:!0,noSelect:!0}),w.hasLines(i)&&(p("connectgaps"),l(n,i,s,c,p)),w.hasText(i)&&(p("texttemplate"),p("texttemplatefallback"),e(n,i,c,p,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var d=(i.line||{}).color,y=(i.marker||{}).color;p("surfaceaxis")>=0&&p("surfacecolor",d||y);for(var o=["x","y","z"],x=0;x<3;++x){var M="projection."+o[x];p(M+".show")&&(p(M+".opacity"),p(M+".scale"))}var T=u.getComponentMethod("errorbars","supplyDefaults");T(n,i,d||y||s,{axis:"z"}),T(n,i,d||y||s,{axis:"y",inherit:"z"}),T(n,i,d||y||s,{axis:"x",inherit:"z"})};function a(r,n,i,s){var c=0,p=i("x"),f=i("y"),d=i("z"),y=u.getComponentMethod("calendars","handleTraceDefaults");return y(r,n,["x","y","z"],s),p&&f&&d&&(c=Math.min(p.length,f.length,d.length),n._length=n._xlength=n._ylength=n._zlength=c),c}}}),RB=De({"src/traces/scatter3d/calc.js"(j,N){"use strict";var u=Pd(),v=Qh();N.exports=function(S,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return u(e,l),v(S,l),e}}}),IB=De({"node_modules/get-canvas-context/index.js"(j,N){N.exports=u;function u(v,w){if(typeof v!="string")throw new TypeError("must specify type string");if(w=w||{},typeof document>"u"&&!w.canvas)return null;var S=w.canvas||document.createElement("canvas");typeof w.width=="number"&&(S.width=w.width),typeof w.height=="number"&&(S.height=w.height);var l=w,e;try{var t=[v];v.indexOf("webgl")===0&&t.push("experimental-"+v);for(var a=0;a/g," "));i[s]=d,c.tickmode=p}}a.ticks=i;for(var s=0;s<3;++s){S[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var y=0;y<2;++y)a.bounds[y][s]=t.glplot.bounds[y][s]}t.contourLevels=l(i)}}}),OB=De({"src/plots/gl3d/scene.js"(j,N){"use strict";var u=pf().gl_plot3d,v=u.createCamera,w=u.createScene,S=DB(),l=H_(),e=hi(),t=Ar(),a=t.preserveDrawingBuffer(),r=Vi(),n=uu(),i=tv(),s=rT(),c=dw(),p=FB(),f=zB(),d=BB(),y=sd().applyAutorangeOptions,o,x,M=!1;function T(F,R){var z=document.createElement("div"),D=F.container;this.graphDiv=F.graphDiv;var k=document.createElementNS("http://www.w3.org/2000/svg","svg");k.style.position="absolute",k.style.top=k.style.left="0px",k.style.width=k.style.height="100%",k.style["z-index"]=20,k.style["pointer-events"]="none",z.appendChild(k),this.svgContainer=k,z.id=F.id,z.style.position="absolute",z.style.top=z.style.left="0px",z.style.width=z.style.height="100%",D.appendChild(z),this.fullLayout=R,this.id=F.id||"scene",this.fullSceneLayout=R[this.id],this.plotArgs=[[],{},{}],this.axesOptions=p(R,R[this.id]),this.spikeOptions=f(R[this.id]),this.container=z,this.staticMode=!!F.staticPlot,this.pixelRatio=this.pixelRatio||F.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var E=T.prototype;E.prepareOptions=function(){var F=this,R={canvas:F.canvas,gl:F.gl,glOptions:{preserveDrawingBuffer:a,premultipliedAlpha:!0,antialias:!0},container:F.container,axes:F.axesOptions,spikes:F.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:F.camera,pixelRatio:F.pixelRatio};if(F.staticMode){if(!x&&(o=document.createElement("canvas"),x=S({canvas:o,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!x))throw new Error("error creating static canvas/context for image server");R.gl=x,R.canvas=o}return R};var g=!0;E.tryCreatePlot=function(){var F=this,R=F.prepareOptions(),z=!0;try{F.glplot=w(R)}catch{if(F.staticMode||!g||a)z=!1;else{t.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{a=R.glOptions.preserveDrawingBuffer=!0,F.glplot=w(R)}catch{a=R.glOptions.preserveDrawingBuffer=!1,z=!1}}}return g=!1,z},E.initializeGLCamera=function(){var F=this,R=F.fullSceneLayout.camera,z=R.projection.type==="orthographic";F.camera=v(F.container,{center:[R.center.x,R.center.y,R.center.z],eye:[R.eye.x,R.eye.y,R.eye.z],up:[R.up.x,R.up.y,R.up.z],_ortho:z,zoomMin:.01,zoomMax:100,mode:"orbit"})},E.initializeGLPlot=function(){var F=this;F.initializeGLCamera();var R=F.tryCreatePlot();if(!R)return s(F);F.traces={},F.make4thDimension();var z=F.graphDiv,D=z.layout,k=function(){var O={};return F.isCameraChanged(D)&&(O[F.id+".camera"]=F.getCamera()),F.isAspectChanged(D)&&(O[F.id+".aspectratio"]=F.glplot.getAspectratio(),D[F.id].aspectmode!=="manual"&&(F.fullSceneLayout.aspectmode=D[F.id].aspectmode=O[F.id+".aspectmode"]="manual")),O},B=function(O){if(O.fullSceneLayout.dragmode!==!1){var q=k();O.saveLayout(D),O.graphDiv.emit("plotly_relayout",q)}};return F.glplot.canvas&&(F.glplot.canvas.addEventListener("mouseup",function(){B(F)}),F.glplot.canvas.addEventListener("touchstart",function(){M=!0}),F.glplot.canvas.addEventListener("wheel",function(O){if(z._context._scrollZoom.gl3d){if(F.camera._ortho){var q=O.deltaX>O.deltaY?1.1:.9090909090909091,Y=F.glplot.getAspectratio();F.glplot.setAspectratio({x:q*Y.x,y:q*Y.y,z:q*Y.z})}B(F)}},l?{passive:!1}:!1),F.glplot.canvas.addEventListener("mousemove",function(){if(F.fullSceneLayout.dragmode!==!1&&F.camera.mouseListener.buttons!==0){var O=k();F.graphDiv.emit("plotly_relayouting",O)}}),F.staticMode||F.glplot.canvas.addEventListener("webglcontextlost",function(O){z&&z.emit&&z.emit("plotly_webglcontextlost",{event:O,layer:F.id})},!1)),F.glplot.oncontextloss=function(){F.recoverContext()},F.glplot.onrender=function(){F.render()},!0},E.render=function(){var F=this,R=F.graphDiv,z,D=F.svgContainer,k=F.container.getBoundingClientRect();R._fullLayout._calcInverseTransform(R);var B=R._fullLayout._invScaleX,O=R._fullLayout._invScaleY,q=k.width*B,Y=k.height*O;D.setAttributeNS(null,"viewBox","0 0 "+q+" "+Y),D.setAttributeNS(null,"width",q),D.setAttributeNS(null,"height",Y),d(F),F.glplot.axes.update(F.axesOptions);for(var ee=Object.keys(F.traces),te=null,ae=F.glplot.selection,U=0;U")):z.type==="isosurface"||z.type==="volume"?(X.valueLabel=r.hoverLabelText(F._mockAxis,F._mockAxis.d2l(ae.traceCoordinate[3]),z.valuehoverformat),me.push("value: "+X.valueLabel),ae.textLabel&&me.push(ae.textLabel),ce=me.join("
")):ce=ae.textLabel;var ye={x:ae.traceCoordinate[0],y:ae.traceCoordinate[1],z:ae.traceCoordinate[2],data:V._input,fullData:V,curveNumber:V.index,pointNumber:$};n.appendArrayPointValue(ye,V,$),z._module.eventData&&(ye=V._module.eventData(ye,ae,V,{},$));var Ae={points:[ye]};if(F.fullSceneLayout.hovermode){var Se=[];n.loneHover({trace:V,x:(.5+.5*K[0]/K[3])*q,y:(.5-.5*K[1]/K[3])*Y,xLabel:X.xLabel,yLabel:X.yLabel,zLabel:X.zLabel,text:ce,name:te.name,color:n.castHoverOption(V,$,"bgcolor")||te.color,borderColor:n.castHoverOption(V,$,"bordercolor"),fontFamily:n.castHoverOption(V,$,"font.family"),fontSize:n.castHoverOption(V,$,"font.size"),fontColor:n.castHoverOption(V,$,"font.color"),nameLength:n.castHoverOption(V,$,"namelength"),textAlign:n.castHoverOption(V,$,"align"),hovertemplate:t.castOption(V,$,"hovertemplate"),hovertemplateLabels:t.extendFlat({},ye,X),eventData:[ye]},{container:D,gd:R,inOut_bbox:Se}),ye.bbox=Se[0]}ae.distance<5&&(ae.buttons||M)?R.emit("plotly_click",Ae):R.emit("plotly_hover",Ae),this.oldEventData=Ae}else n.loneUnhover(D),this.oldEventData&&R.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;F.drawAnnotations(F)},E.recoverContext=function(){var F=this;F.glplot.dispose();var R=function(){if(F.glplot.gl.isContextLost()){requestAnimationFrame(R);return}if(!F.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}F.plot.apply(F,F.plotArgs)};requestAnimationFrame(R)};var A=["xaxis","yaxis","zaxis"];function m(F,R,z){for(var D=F.fullSceneLayout,k=0;k<3;k++){var B=A[k],O=B.charAt(0),q=D[B],Y=R[O],ee=R[O+"calendar"],te=R["_"+O+"length"];if(!t.isArrayOrTypedArray(Y))z[0][k]=Math.min(z[0][k],0),z[1][k]=Math.max(z[1][k],te-1);else for(var ae,U=0;U<(te||Y.length);U++)if(t.isArrayOrTypedArray(Y[U]))for(var H=0;HV[1][O])V[0][O]=-1,V[1][O]=1;else{var qe=V[1][O]-V[0][O];V[0][O]-=qe/32,V[1][O]+=qe/32}if(Z=[V[0][O],V[1][O]],Z=y(Z,Y),V[0][O]=Z[0],V[1][O]=Z[1],Y.isReversed()){var Ue=V[0][O];V[0][O]=V[1][O],V[1][O]=Ue}}else Z=Y.range,V[0][O]=Y.r2l(Z[0]),V[1][O]=Y.r2l(Z[1]);V[0][O]===V[1][O]&&(V[0][O]-=1,V[1][O]+=1),$[O]=V[1][O]-V[0][O],Y.range=[V[0][O],V[1][O]],Y.limitRange(),D.glplot.setBounds(O,{min:Y.range[0]*H[O],max:Y.range[1]*H[O]})}var xe,he=te.aspectmode;if(he==="cube")xe=[1,1,1];else if(he==="manual"){var oe=te.aspectratio;xe=[oe.x,oe.y,oe.z]}else if(he==="auto"||he==="data"){var le=[1,1,1];for(O=0;O<3;++O){Y=te[A[O]],ee=Y.type;var ne=X[ee];le[O]=Math.pow(ne.acc,1/ne.count)/H[O]}he==="data"||Math.max.apply(null,le)/Math.min.apply(null,le)<=4?xe=le:xe=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");te.aspectratio.x=ae.aspectratio.x=xe[0],te.aspectratio.y=ae.aspectratio.y=xe[1],te.aspectratio.z=ae.aspectratio.z=xe[2],D.glplot.setAspectratio(te.aspectratio),D.viewInitial.aspectratio||(D.viewInitial.aspectratio={x:te.aspectratio.x,y:te.aspectratio.y,z:te.aspectratio.z}),D.viewInitial.aspectmode||(D.viewInitial.aspectmode=te.aspectmode);var be=te.domain||null,Fe=R._size||null;if(be&&Fe){var Ve=D.container.style;Ve.position="absolute",Ve.left=Fe.l+be.x[0]*Fe.w+"px",Ve.top=Fe.t+(1-be.y[1])*Fe.h+"px",Ve.width=Fe.w*(be.x[1]-be.x[0])+"px",Ve.height=Fe.h*(be.y[1]-be.y[0])+"px"}D.glplot.redraw()}},E.destroy=function(){var F=this;F.glplot&&(F.camera.mouseListener.enabled=!1,F.container.removeEventListener("wheel",F.camera.wheelListener),F.camera=null,F.glplot.dispose(),F.container.parentNode.removeChild(F.container),F.glplot=null)};function b(F){return[[F.eye.x,F.eye.y,F.eye.z],[F.center.x,F.center.y,F.center.z],[F.up.x,F.up.y,F.up.z]]}function _(F){return{up:{x:F.up[0],y:F.up[1],z:F.up[2]},center:{x:F.center[0],y:F.center[1],z:F.center[2]},eye:{x:F.eye[0],y:F.eye[1],z:F.eye[2]},projection:{type:F._ortho===!0?"orthographic":"perspective"}}}E.getCamera=function(){var F=this;return F.camera.view.recalcMatrix(F.camera.view.lastT()),_(F.camera)},E.setViewport=function(F){var R=this,z=F.camera;R.camera.lookAt.apply(this,b(z)),R.glplot.setAspectratio(F.aspectratio);var D=z.projection.type==="orthographic",k=R.camera._ortho;D!==k&&(R.glplot.redraw(),R.glplot.clearRGBA(),R.glplot.dispose(),R.initializeGLPlot())},E.isCameraChanged=function(F){var R=this,z=R.getCamera(),D=t.nestedProperty(F,R.id+".camera"),k=D.get();function B(ee,te,ae,U){var H=["up","center","eye"],K=["x","y","z"];return te[H[ae]]&&ee[H[ae]][K[U]]===te[H[ae]][K[U]]}var O=!1;if(k===void 0)O=!0;else{for(var q=0;q<3;q++)for(var Y=0;Y<3;Y++)if(!B(z,k,q,Y)){O=!0;break}(!k.projection||z.projection&&z.projection.type!==k.projection.type)&&(O=!0)}return O},E.isAspectChanged=function(F){var R=this,z=R.glplot.getAspectratio(),D=t.nestedProperty(F,R.id+".aspectratio"),k=D.get();return k===void 0||k.x!==z.x||k.y!==z.y||k.z!==z.z},E.saveLayout=function(F){var R=this,z=R.fullLayout,D,k,B,O,q,Y,ee=R.isCameraChanged(F),te=R.isAspectChanged(F),ae=ee||te;if(ae){var U={};if(ee&&(D=R.getCamera(),k=t.nestedProperty(F,R.id+".camera"),B=k.get(),U[R.id+".camera"]=B),te&&(O=R.glplot.getAspectratio(),q=t.nestedProperty(F,R.id+".aspectratio"),Y=q.get(),U[R.id+".aspectratio"]=Y),e.call("_storeDirectGUIEdit",F,z._preGUI,U),ee){k.set(D);var H=t.nestedProperty(z,R.id+".camera");H.set(D)}if(te){q.set(O);var K=t.nestedProperty(z,R.id+".aspectratio");K.set(O),R.glplot.redraw()}}return ae},E.updateFx=function(F,R){var z=this,D=z.camera;if(D)if(F==="orbit")D.mode="orbit",D.keyBindingMode="rotate";else if(F==="turntable"){D.up=[0,0,1],D.mode="turntable",D.keyBindingMode="rotate";var k=z.graphDiv,B=k._fullLayout,O=z.fullSceneLayout.camera,q=O.up.x,Y=O.up.y,ee=O.up.z;if(ee/Math.sqrt(q*q+Y*Y+ee*ee)<.999){var te=z.id+".camera.up",ae={x:0,y:0,z:1},U={};U[te]=ae;var H=k.layout;e.call("_storeDirectGUIEdit",H,B._preGUI,U),O.up=ae,t.nestedProperty(H,te).set(ae)}}else D.keyBindingMode=F;z.fullSceneLayout.hovermode=R};function I(F,R,z){for(var D=0,k=z-1;D0)for(var q=255/O,Y=0;Y<3;++Y)F[B+Y]=Math.min(q*F[B+Y],255)}}E.toImage=function(F){var R=this;F||(F="png"),R.staticMode&&R.container.appendChild(o),R.glplot.redraw();var z=R.glplot.gl,D=z.drawingBufferWidth,k=z.drawingBufferHeight;z.bindFramebuffer(z.FRAMEBUFFER,null);var B=new Uint8Array(D*k*4);z.readPixels(0,0,D,k,z.RGBA,z.UNSIGNED_BYTE,B),I(B,D,k),C(B,D,k);var O=document.createElement("canvas");O.width=D,O.height=k;var q=O.getContext("2d",{willReadFrequently:!0}),Y=q.createImageData(D,k);Y.data.set(B),q.putImageData(Y,0,0);var ee;switch(F){case"jpeg":ee=O.toDataURL("image/jpeg");break;case"webp":ee=O.toDataURL("image/webp");break;default:ee=O.toDataURL("image/png")}return R.staticMode&&R.container.removeChild(o),ee},E.setConvert=function(){for(var F=this,R=0;R<3;R++){var z=F.fullSceneLayout[A[R]];r.setConvert(z,F.fullLayout),z.setScale=t.noop}},E.make4thDimension=function(){var F=this,R=F.graphDiv,z=R._fullLayout;F._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(F._mockAxis,z)},N.exports=T}}),NB=De({"src/plots/gl3d/layout/attributes.js"(j,N){"use strict";N.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),aT=De({"src/plots/gl3d/layout/axis_attributes.js"(j,N){"use strict";var u=ii(),v=hf(),w=Ji().extendFlat,S=Ul().overrideAll;N.exports=S({visible:v.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:u.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:v.color,categoryorder:v.categoryorder,categoryarray:v.categoryarray,title:{text:v.title.text,font:v.title.font},type:w({},v.type,{values:["-","linear","log","date","category"]}),autotypenumbers:v.autotypenumbers,autorange:v.autorange,autorangeoptions:{minallowed:v.autorangeoptions.minallowed,maxallowed:v.autorangeoptions.maxallowed,clipmin:v.autorangeoptions.clipmin,clipmax:v.autorangeoptions.clipmax,include:v.autorangeoptions.include,editType:"plot"},rangemode:v.rangemode,minallowed:v.minallowed,maxallowed:v.maxallowed,range:w({},v.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:v.minor.tickmode,nticks:v.nticks,tick0:v.tick0,dtick:v.dtick,tickvals:v.tickvals,ticktext:v.ticktext,ticks:v.ticks,mirror:v.mirror,ticklen:v.ticklen,tickwidth:v.tickwidth,tickcolor:v.tickcolor,showticklabels:v.showticklabels,labelalias:v.labelalias,tickfont:v.tickfont,tickangle:v.tickangle,tickprefix:v.tickprefix,showtickprefix:v.showtickprefix,ticksuffix:v.ticksuffix,showticksuffix:v.showticksuffix,showexponent:v.showexponent,exponentformat:v.exponentformat,minexponent:v.minexponent,separatethousands:v.separatethousands,tickformat:v.tickformat,tickformatstops:v.tickformatstops,hoverformat:v.hoverformat,showline:v.showline,linecolor:v.linecolor,linewidth:v.linewidth,showgrid:v.showgrid,gridcolor:w({},v.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:v.gridwidth,zeroline:v.zeroline,zerolinecolor:v.zerolinecolor,zerolinewidth:v.zerolinewidth},"plot","from-root")}}),nT=De({"src/plots/gl3d/layout/layout_attributes.js"(j,N){"use strict";var u=aT(),v=ql().attributes,w=Ji().extendFlat,S=Ar().counterRegex;function l(e,t,a){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:a,editType:"camera"},editType:"camera"}}N.exports={_arrayAttrRegexps:[S("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:w(l(0,0,1),{}),center:w(l(0,0,0),{}),eye:w(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:v({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:u,yaxis:u,zaxis:u,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"}}}),jB=De({"src/plots/gl3d/layout/axis_defaults.js"(j,N){"use strict";var u=ii(),v=Ar(),w=ws(),S=aT(),l=fw(),e=I1(),t=["xaxis","yaxis","zaxis"],a=100*136/187;N.exports=function(n,i,s){var c,p;function f(o,x){return v.coerce(c,p,S,o,x)}for(var d=0;d1;function f(d){if(!p){var y=u.validate(i[d],e[d]);if(y)return i[d]}}S(i,s,c,{type:a,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:f,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(n,i,s,c){for(var p=s("bgcolor"),f=v.combine(p,c.paper_bgcolor),d=["up","center","eye"],y=0;y.999)&&(E="turntable")}else E="turntable";s("dragmode",E),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),np=De({"src/plots/gl3d/index.js"(j){"use strict";var N=Ul().overrideAll,u=Ov(),v=OB(),w=Bf().getSubplotData,S=Ar(),l=Kh(),e="gl3d",t="scene";j.name=e,j.attr=t,j.idRoot=t,j.idRegex=j.attrRegex=S.counterRegex("scene"),j.attributes=NB(),j.layoutAttributes=nT(),j.baseLayoutAttrOverrides=N({hoverlabel:u.hoverlabel},"plot","nested"),j.supplyLayoutDefaults=UB(),j.plot=function(r){for(var n=r._fullLayout,i=r._fullData,s=n._subplots[e],c=0;c0){I=c[C];break}return I}function y(b,_){if(!(b<1||_<1)){for(var I=f(b),C=f(_),F=1,R=0;RT;)C--,C/=d(C),C++,C1?F:1};function E(b,_,I){var C=I[8]+I[2]*_[0]+I[5]*_[1];return b[0]=(I[6]+I[0]*_[0]+I[3]*_[1])/C,b[1]=(I[7]+I[1]*_[0]+I[4]*_[1])/C,b}function g(b,_,I){return A(b,_,E,I),b}function A(b,_,I,C){for(var F=[0,0],R=b.shape[0],z=b.shape[1],D=0;D0&&this.contourStart[C]!==null&&this.contourEnd[C]!==null&&this.contourEnd[C]>this.contourStart[C]))for(_[C]=!0,F=this.contourStart[C];FY&&(this.minValues[B]=Y),this.maxValues[B]c&&(a.isomin=null,a.isomax=null);var p=i("x"),f=i("y"),d=i("z"),y=i("value");if(!p||!p.length||!f||!f.length||!d||!d.length||!y||!y.length){a.visible=!1;return}var o=v.getComponentMethod("calendars","handleTraceDefaults");o(t,a,["x","y","z"],n),i("valuehoverformat"),["x","y","z"].forEach(function(E){i(E+"hoverformat");var g="caps."+E,A=i(g+".show");A&&i(g+".fill");var m="slices."+E,h=i(m+".show");h&&(i(m+".fill"),i(m+".locations"))});var x=i("spaceframe.show");x&&i("spaceframe.fill");var M=i("surface.show");M&&(i("surface.count"),i("surface.fill"),i("surface.pattern"));var T=i("contour.show");T&&(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(E){i(E)}),S(t,a,n,i,{prefix:"",cLetter:"c"}),a._length=null}N.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),Ib=De({"src/traces/streamtube/calc.js"(j,N){"use strict";var u=Ar(),v=Wf();function w(t,a){a._len=Math.min(a.u.length,a.v.length,a.w.length,a.x.length,a.y.length,a.z.length),a._u=e(a.u,a._len),a._v=e(a.v,a._len),a._w=e(a.w,a._len),a._x=e(a.x,a._len),a._y=e(a.y,a._len),a._z=e(a.z,a._len);var r=S(a);a._gridFill=r.fill,a._Xs=r.Xs,a._Ys=r.Ys,a._Zs=r.Zs,a._len=r.len;var n=0,i,s,c;a.starts&&(i=e(a.starts.x||[]),s=e(a.starts.y||[]),c=e(a.starts.z||[]),n=Math.min(i.length,s.length,c.length)),a._startsX=i||[],a._startsY=s||[],a._startsZ=c||[];var p=0,f=1/0,d;for(d=0;d1&&(h=a[i-1],_=r[i-1],C=n[i-1]),s=0;sh?"-":"+")+"x"),T=T.replace("y",(b>_?"-":"+")+"y"),T=T.replace("z",(I>C?"-":"+")+"z");var D=function(){i=0,F=[],R=[],z=[]};(!i||i0;f--){var d=Math.min(p[f],p[f-1]),y=Math.max(p[f],p[f-1]);if(y>d&&d-1}function Q(nt,Ee){return nt===null?Ee:nt}function re(nt,Ee,ze){ee();var ve=[Ee],_e=[ze];if(V>=1)ve=[Ee],_e=[ze];else if(V>0){var Ie=X(Ee,ze);ve=Ie.xyzv,_e=Ie.abc}for(var Be=0;Be-1?ze[Xe]:Y(mt,ft,ht);_t>-1?We[Xe]=_t:We[Xe]=ae(mt,ft,ht,Q(nt,gt))}U(We[0],We[1],We[2])}}function ce(nt,Ee,ze){var ve=function(_e,Ie,Be){re(nt,[Ee[_e],Ee[Ie],Ee[Be]],[ze[_e],ze[Ie],ze[Be]])};ve(0,1,2),ve(2,3,0)}function me(nt,Ee,ze){var ve=function(_e,Ie,Be){re(nt,[Ee[_e],Ee[Ie],Ee[Be]],[ze[_e],ze[Ie],ze[Be]])};ve(0,1,2),ve(3,0,1),ve(2,3,0),ve(1,2,3)}function ye(nt,Ee,ze,ve){var _e=nt[3];_eve&&(_e=ve);for(var Ie=(nt[3]-_e)/(nt[3]-Ee[3]+1e-9),Be=[],We=0;We<4;We++)Be[We]=(1-Ie)*nt[We]+Ie*Ee[We];return Be}function Ae(nt,Ee,ze){return nt>=Ee&&nt<=ze}function Se(nt){var Ee=.001*(D-z);return nt>=z-Ee&&nt<=D+Ee}function Ce(nt){for(var Ee=[],ze=0;ze<4;ze++){var ve=nt[ze];Ee.push([c._x[ve],c._y[ve],c._z[ve],c._value[ve]])}return Ee}var qe=3;function Ue(nt,Ee,ze,ve,_e,Ie){Ie||(Ie=1),ze=[-1,-1,-1];var Be=!1,We=[Ae(Ee[0][3],ve,_e),Ae(Ee[1][3],ve,_e),Ae(Ee[2][3],ve,_e)];if(!We[0]&&!We[1]&&!We[2])return!1;var Xe=function(ft,ht,gt){return Se(ht[0][3])&&Se(ht[1][3])&&Se(ht[2][3])?(re(ft,ht,gt),!0):IeWe?[F,Ie]:[Ie,R];yt(Ee,Xe[0],Xe[1])}}var mt=[[Math.min(z,R),Math.max(z,R)],[Math.min(F,D),Math.max(F,D)]];["x","y","z"].forEach(function(ft){for(var ht=[],gt=0;gt0&&(ra.push(oa.id),ft==="x"?$r.push([oa.distRatio,0,0]):ft==="y"?$r.push([0,oa.distRatio,0]):$r.push([0,0,oa.distRatio]))}else ft==="x"?jr=vr(1,h-1):ft==="y"?jr=vr(1,b-1):jr=vr(1,_-1);ra.length>0&&(ft==="x"?ht[_t]=At(nt,ra,Ft,St,$r,ht[_t]):ft==="y"?ht[_t]=Pt(nt,ra,Ft,St,$r,ht[_t]):ht[_t]=Zt(nt,ra,Ft,St,$r,ht[_t]),_t++),jr.length>0&&(ft==="x"?ht[_t]=Fe(nt,jr,Ft,St,ht[_t]):ft==="y"?ht[_t]=Ve(nt,jr,Ft,St,ht[_t]):ht[_t]=je(nt,jr,Ft,St,ht[_t]),_t++)}var aa=c.caps[ft];aa.show&&aa.fill&&($(aa.fill),ft==="x"?ht[_t]=Fe(nt,[0,h-1],Ft,St,ht[_t]):ft==="y"?ht[_t]=Ve(nt,[0,b-1],Ft,St,ht[_t]):ht[_t]=je(nt,[0,_-1],Ft,St,ht[_t]),_t++)}}),M===0&&te(),c._meshX=k,c._meshY=B,c._meshZ=O,c._meshIntensity=q,c._Xs=g,c._Ys=A,c._Zs=m}return Kt(),c}function s(c,p){var f=c.glplot.gl,d=u({gl:f}),y=new a(c,d,p.uid);return d._trace=y,y.update(p),c.glplot.add(d),y}N.exports={findNearestOnAxis:t,generateIsoMeshes:i,createIsosurfaceTrace:s}}}),XB=De({"src/traces/isosurface/index.js"(j,N){"use strict";N.exports={attributes:Rb(),supplyDefaults:oT().supplyDefaults,calc:sT(),colorbar:{min:"cmin",max:"cmax"},plot:Db().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:np(),categories:["gl3d","showLegend"],meta:{}}}}),ZB=De({"lib/isosurface.js"(j,N){"use strict";N.exports=XB()}}),lT=De({"src/traces/volume/attributes.js"(j,N){"use strict";var u=ul(),v=Rb(),w=vg(),S=Bs(),l=Ji().extendFlat,e=Ul().overrideAll,t=N.exports=e(l({x:v.x,y:v.y,z:v.z,value:v.value,isomin:v.isomin,isomax:v.isomax,surface:v.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:v.slices,caps:v.caps,text:v.text,hovertext:v.hovertext,xhoverformat:v.xhoverformat,yhoverformat:v.yhoverformat,zhoverformat:v.zhoverformat,valuehoverformat:v.valuehoverformat,hovertemplate:v.hovertemplate,hovertemplatefallback:v.hovertemplatefallback},u("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:v.colorbar,opacity:v.opacity,opacityscale:w.opacityscale,lightposition:v.lightposition,lighting:v.lighting,flatshading:v.flatshading,contour:v.contour,hoverinfo:l({},S.hoverinfo),showlegend:l({},S.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),$B=De({"src/traces/volume/defaults.js"(j,N){"use strict";var u=Ar(),v=lT(),w=oT().supplyIsoDefaults,S=iT().opacityscaleDefaults;N.exports=function(e,t,a,r){function n(i,s){return u.coerce(e,t,v,i,s)}w(e,t,a,r,n),S(e,t,r,n)}}}),KB=De({"src/traces/volume/convert.js"(j,N){"use strict";var u=pf().gl_mesh3d,v=rv().parseColorScale,w=Ar().isArrayOrTypedArray,S=tv(),l=Dl().extractOpts,e=zm(),t=Db().findNearestOnAxis,a=Db().generateIsoMeshes;function r(s,c,p){this.scene=s,this.uid=p,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var n=r.prototype;n.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,p=this.data._meshX[c],f=this.data._meshY[c],d=this.data._meshZ[c],y=this.data._Ys.length,o=this.data._Zs.length,x=t(p,this.data._Xs).id,M=t(f,this.data._Ys).id,T=t(d,this.data._Zs).id,E=s.index=T+o*M+o*y*x;s.traceCoordinate=[this.data._meshX[E],this.data._meshY[E],this.data._meshZ[E],this.data._value[E]];var g=this.data.hovertext||this.data.text;return w(g)&&g[E]!==void 0?s.textLabel=g[E]:g&&(s.textLabel=g),!0}},n.update=function(s){var c=this.scene,p=c.fullSceneLayout;this.data=a(s);function f(M,T,E,g){return T.map(function(A){return M.d2l(A,0,g)*E})}var d=e(f(p.xaxis,s._meshX,c.dataScale[0],s.xcalendar),f(p.yaxis,s._meshY,c.dataScale[1],s.ycalendar),f(p.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),y=e(s._meshI,s._meshJ,s._meshK),o={positions:d,cells:y,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:S(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},x=l(s);o.vertexIntensity=s._meshIntensity,o.vertexIntensityBounds=[x.min,x.max],o.colormap=v(s),this.mesh.update(o)},n.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function i(s,c){var p=s.glplot.gl,f=u({gl:p}),d=new r(s,f,c.uid);return f._trace=d,d.update(c),s.glplot.add(f),d}N.exports=i}}),JB=De({"src/traces/volume/index.js"(j,N){"use strict";N.exports={attributes:lT(),supplyDefaults:$B(),calc:sT(),colorbar:{min:"cmin",max:"cmax"},plot:KB(),moduleType:"trace",name:"volume",basePlotModule:np(),categories:["gl3d","showLegend"],meta:{}}}}),QB=De({"lib/volume.js"(j,N){"use strict";N.exports=JB()}}),eO=De({"src/traces/mesh3d/defaults.js"(j,N){"use strict";var u=hi(),v=Ar(),w=Wc(),S=Fm();N.exports=function(e,t,a,r){function n(f,d){return v.coerce(e,t,S,f,d)}function i(f){var d=f.map(function(y){var o=n(y);return o&&v.isArrayOrTypedArray(o)?o:null});return d.every(function(y){return y&&y.length===d[0].length})&&d}var s=i(["x","y","z"]);if(!s){t.visible=!1;return}if(i(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=u.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(f){n(f)});var p=n("contour.show");p&&(n("contour.color"),n("contour.width")),"intensity"in e?(n("intensity"),n("intensitymode"),w(e,t,r,n,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?n("facecolor"):"vertexcolor"in e?n("vertexcolor"):n("color",a)),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),n("xhoverformat"),n("yhoverformat"),n("zhoverformat"),t._length=null}}}),tO=De({"src/traces/mesh3d/calc.js"(j,N){"use strict";var u=Wf();N.exports=function(w,S){S.intensity&&u(w,S,{vals:S.intensity,containerStr:"",cLetter:"c"})}}}),rO=De({"src/traces/mesh3d/convert.js"(j,N){"use strict";var u=pf().gl_mesh3d,v=pf().delaunay_triangulate,w=pf().alpha_shape,S=pf().convex_hull,l=rv().parseColorScale,e=Ar().isArrayOrTypedArray,t=tv(),a=Dl().extractOpts,r=zm();function n(o,x,M){this.scene=o,this.uid=M,this.mesh=x,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var i=n.prototype;i.handlePick=function(o){if(o.object===this.mesh){var x=o.index=o.data.index;o.data._cellCenter?o.traceCoordinate=o.data.dataCoordinate:o.traceCoordinate=[this.data.x[x],this.data.y[x],this.data.z[x]];var M=this.data.hovertext||this.data.text;return e(M)&&M[x]!==void 0?o.textLabel=M[x]:M&&(o.textLabel=M),!0}};function s(o){for(var x=[],M=o.length,T=0;T=x-.5)return!1;return!0}i.update=function(o){var x=this.scene,M=x.fullSceneLayout;this.data=o;var T=o.x.length,E=r(c(M.xaxis,o.x,x.dataScale[0],o.xcalendar),c(M.yaxis,o.y,x.dataScale[1],o.ycalendar),c(M.zaxis,o.z,x.dataScale[2],o.zcalendar)),g;if(o.i&&o.j&&o.k){if(o.i.length!==o.j.length||o.j.length!==o.k.length||!d(o.i,T)||!d(o.j,T)||!d(o.k,T))return;g=r(p(o.i),p(o.j),p(o.k))}else o.alphahull===0?g=S(E):o.alphahull>0?g=w(o.alphahull,E):g=f(o.delaunayaxis,E);var A={positions:E,cells:g,lightPosition:[o.lightposition.x,o.lightposition.y,o.lightposition.z],ambient:o.lighting.ambient,diffuse:o.lighting.diffuse,specular:o.lighting.specular,roughness:o.lighting.roughness,fresnel:o.lighting.fresnel,vertexNormalsEpsilon:o.lighting.vertexnormalsepsilon,faceNormalsEpsilon:o.lighting.facenormalsepsilon,opacity:o.opacity,contourEnable:o.contour.show,contourColor:t(o.contour.color).slice(0,3),contourWidth:o.contour.width,useFacetNormals:o.flatshading};if(o.intensity){var m=a(o);this.color="#fff";var h=o.intensitymode;A[h+"Intensity"]=o.intensity,A[h+"IntensityBounds"]=[m.min,m.max],A.colormap=l(o)}else o.vertexcolor?(this.color=o.vertexcolor[0],A.vertexColors=s(o.vertexcolor)):o.facecolor?(this.color=o.facecolor[0],A.cellColors=s(o.facecolor)):(this.color=o.color,A.meshColor=t(o.color));this.mesh.update(A)},i.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function y(o,x){var M=o.glplot.gl,T=u({gl:M}),E=new n(o,T,x.uid);return T._trace=E,E.update(x),o.glplot.add(T),E}N.exports=y}}),aO=De({"src/traces/mesh3d/index.js"(j,N){"use strict";N.exports={attributes:Fm(),supplyDefaults:eO(),calc:tO(),colorbar:{min:"cmin",max:"cmax"},plot:rO(),moduleType:"trace",name:"mesh3d",basePlotModule:np(),categories:["gl3d","showLegend"],meta:{}}}}),nO=De({"lib/mesh3d.js"(j,N){"use strict";N.exports=aO()}}),uT=De({"src/traces/cone/attributes.js"(j,N){"use strict";var u=ul(),v=Zl().axisHoverFormat,{hovertemplateAttrs:w,templatefallbackAttrs:S}=Is(),l=Fm(),e=Bs(),t=Ji().extendFlat,a={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","raw"],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:w({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:S({editType:"calc"}),uhoverformat:v("u",1),vhoverformat:v("v",1),whoverformat:v("w",1),xhoverformat:v("x"),yhoverformat:v("y"),zhoverformat:v("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(a,u("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(n){a[n]=l[n]}),a.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),N.exports=a}}),iO=De({"src/traces/cone/defaults.js"(j,N){"use strict";var u=Ar(),v=Wc(),w=uT();N.exports=function(l,e,t,a){function r(y,o){return u.coerce(l,e,w,y,o)}var n=r("u"),i=r("v"),s=r("w"),c=r("x"),p=r("y"),f=r("z");if(!n||!n.length||!i||!i.length||!s||!s.length||!c||!c.length||!p||!p.length||!f||!f.length){e.visible=!1;return}var d=r("sizemode");r("sizeref",d==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),v(l,e,a,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),oO=De({"src/traces/cone/calc.js"(j,N){"use strict";var u=Wf();N.exports=function(w,S){for(var l=S.u,e=S.v,t=S.w,a=Math.min(S.x.length,S.y.length,S.z.length,l.length,e.length,t.length),r=-1/0,n=1/0,i=0;i2?d=p.slice(1,f-1):f===2?d=[(p[0]+p[1])/2]:d=p,d}function i(p){var f=p.length;return f===1?[.5,.5]:[p[1]-p[0],p[f-1]-p[f-2]]}function s(p,f){var d=p.fullSceneLayout,y=p.dataScale,o=f._len,x={};function M(ae,U){var H=d[U],K=y[t[U]];return w.simpleMap(ae,function(V){return H.d2l(V)*K})}if(x.vectors=e(M(f._u,"xaxis"),M(f._v,"yaxis"),M(f._w,"zaxis"),o),!o)return{positions:[],cells:[]};var T=M(f._Xs,"xaxis"),E=M(f._Ys,"yaxis"),g=M(f._Zs,"zaxis");x.meshgrid=[T,E,g],x.gridFill=f._gridFill;var A=f._slen;if(A)x.startingPositions=e(M(f._startsX,"xaxis"),M(f._startsY,"yaxis"),M(f._startsZ,"zaxis"));else{for(var m=E[0],h=n(T),b=n(g),_=new Array(h.length*b.length),I=0,C=0;Cm&&(m=I[0]),I[1]h&&(h=I[1])}function _(I){switch(I.type){case"GeometryCollection":I.geometries.forEach(_);break;case"Point":b(I.coordinates);break;case"MultiPoint":I.coordinates.forEach(b);break}}M.arcs.forEach(function(I){for(var C=-1,F=I.length,R;++Cm&&(m=R[0]),R[1]h&&(h=R[1])});for(E in M.objects)_(M.objects[E]);return[g,A,m,h]}function l(M,T){for(var E,g=M.length,A=g-T;A<--g;)E=M[A],M[A++]=M[g],M[g]=E}function e(M,T){return typeof T=="string"&&(T=M.objects[T]),T.type==="GeometryCollection"?{type:"FeatureCollection",features:T.geometries.map(function(E){return t(M,E)})}:t(M,T)}function t(M,T){var E=T.id,g=T.bbox,A=T.properties==null?{}:T.properties,m=a(M,T);return E==null&&g==null?{type:"Feature",properties:A,geometry:m}:g==null?{type:"Feature",id:E,properties:A,geometry:m}:{type:"Feature",id:E,bbox:g,properties:A,geometry:m}}function a(M,T){var E=w(M.transform),g=M.arcs;function A(C,F){F.length&&F.pop();for(var R=g[C<0?~C:C],z=0,D=R.length;z1)g=s(M,T,E);else for(A=0,g=new Array(m=M.arcs.length);A1)for(var F=1,R=b(I[0]),z,D;FR&&(D=I[0],I[0]=I[F],I[F]=D,R=z);return I}).filter(function(_){return _.length>0})}}function d(M,T){for(var E=0,g=M.length;E>>1;M[A]=2))throw new Error("n must be \u22652");_=M.bbox||S(M);var E=_[0],g=_[1],A=_[2],m=_[3],h;T={scale:[A-E?(A-E)/(h-1):1,m-g?(m-g)/(h-1):1],translate:[E,g]}}else _=M.bbox;var b=o(T),_,I,C=M.objects,F={};function R(k){return b(k)}function z(k){var B;switch(k.type){case"GeometryCollection":B={type:"GeometryCollection",geometries:k.geometries.map(z)};break;case"Point":B={type:"Point",coordinates:R(k.coordinates)};break;case"MultiPoint":B={type:"MultiPoint",coordinates:k.coordinates.map(R)};break;default:return k}return k.id!=null&&(B.id=k.id),k.bbox!=null&&(B.bbox=k.bbox),k.properties!=null&&(B.properties=k.properties),B}function D(k){var B=0,O=1,q=k.length,Y,ee=new Array(q);for(ee[0]=b(k[0],0);++B0&&(S.push(l),l=[])}return l.length>0&&S.push(l),S},j.makeLine=function(u){return u.length===1?{type:"LineString",coordinates:u[0]}:{type:"MultiLineString",coordinates:u}},j.makePolygon=function(u){if(u.length===1)return{type:"Polygon",coordinates:u};for(var v=new Array(u.length),w=0;w{for(var M in x)u(o,M,{get:x[M],enumerable:!0})},e=(o,x,M,T)=>{if(x&&typeof x=="object"||typeof x=="function")for(let E of w(x))!S.call(o,E)&&E!==M&&u(o,E,{get:()=>x[E],enumerable:!(T=v(x,E))||T.enumerable});return o},t=o=>e(u({},"__esModule",{value:!0}),o),a={};l(a,{COUNTRIES:()=>r,byAlpha2:()=>d,byAlpha3:()=>f,byM49:()=>y,createLookup:()=>i,lookup:()=>c,lookupAlpha3:()=>p,sanitize:()=>n}),N.exports=t(a);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function n(o){return o.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function i(o){let x=new Map,M=new Map,T=new Map;for(let m of o)x.set(m.iso3,m),m.iso2&&M.set(m.iso2,m),m.m49&&T.set(m.m49,m);let E=new Map;for(let m of o)for(let h of[m.name,...m.aliases]){let b=n(h),_=E.get(b);if(_!==void 0&&_!==m.iso3)throw new Error(`Duplicate name/alias "${b}": ${_} vs ${m.iso3}`);E.set(b,m.iso3)}function g(m){if(m==null)return;let h=String(m).trim();if(!h)return;if(/^\d+$/.test(h)){let _=T.get(String(parseInt(h,10)).padStart(3,"0"));if(_)return _}if(/^[A-Za-z]{2}$/.test(h)){let _=M.get(h.toUpperCase());if(_)return _}if(/^[A-Za-z]{3}$/.test(h)){let _=x.get(h.toUpperCase());if(_)return _}let b=E.get(n(h));return b===void 0?void 0:x.get(b)}function A(m){var h;return(h=g(m))==null?void 0:h.iso3}return{lookup:g,lookupAlpha3:A,byAlpha3:x,byAlpha2:M,byM49:T}}var s=i(r),c=s.lookup,p=s.lookupAlpha3,f=s.byAlpha3,d=s.byAlpha2,y=s.byM49}}),zb=De({"node_modules/@turf/helpers/dist/cjs/index.cjs"(j){"use strict";Object.defineProperty(j,"__esModule",{value:!0});var N=63710088e-1,u={centimeters:N*100,centimetres:N*100,degrees:360/(2*Math.PI),feet:N*3.28084,inches:N*39.37,kilometers:N/1e3,kilometres:N/1e3,meters:N,metres:N,miles:N/1609.344,millimeters:N*1e3,millimetres:N*1e3,nauticalmiles:N/1852,radians:1,yards:N*1.0936},v={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function w(C,F,R={}){let z={type:"Feature"};return(R.id===0||R.id)&&(z.id=R.id),R.bbox&&(z.bbox=R.bbox),z.properties=F||{},z.geometry=C,z}function S(C,F,R={}){switch(C){case"Point":return l(F).geometry;case"LineString":return r(F).geometry;case"Polygon":return t(F).geometry;case"MultiPoint":return c(F).geometry;case"MultiLineString":return s(F).geometry;case"MultiPolygon":return p(F).geometry;default:throw new Error(C+" is invalid")}}function l(C,F,R={}){if(!C)throw new Error("coordinates is required");if(!Array.isArray(C))throw new Error("coordinates must be an Array");if(C.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!h(C[0])||!h(C[1]))throw new Error("coordinates must contain numbers");return w({type:"Point",coordinates:C},F,R)}function e(C,F,R={}){return i(C.map(z=>l(z,F)),R)}function t(C,F,R={}){for(let D of C){if(D.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(D[D.length-1].length!==D[0].length)throw new Error("First and last Position are not equivalent.");for(let k=0;kt(z,F)),R)}function r(C,F,R={}){if(C.length<2)throw new Error("coordinates must be an array of two or more positions");return w({type:"LineString",coordinates:C},F,R)}function n(C,F,R={}){return i(C.map(z=>r(z,F)),R)}function i(C,F={}){let R={type:"FeatureCollection"};return F.id&&(R.id=F.id),F.bbox&&(R.bbox=F.bbox),R.features=C,R}function s(C,F,R={}){return w({type:"MultiLineString",coordinates:C},F,R)}function c(C,F,R={}){return w({type:"MultiPoint",coordinates:C},F,R)}function p(C,F,R={}){return w({type:"MultiPolygon",coordinates:C},F,R)}function f(C,F,R={}){return w({type:"GeometryCollection",geometries:C},F,R)}function d(C,F=0){if(F&&!(F>=0))throw new Error("precision must be a positive number");let R=Math.pow(10,F||0);return Math.round(C*R)/R}function y(C,F="kilometers"){let R=u[F];if(!R)throw new Error(F+" units is invalid");return C*R}function o(C,F="kilometers"){let R=u[F];if(!R)throw new Error(F+" units is invalid");return C/R}function x(C,F){return E(o(C,F))}function M(C){let F=C%360;return F<0&&(F+=360),F}function T(C){return C=C%360,C>180?C-360:C<-180?C+360:C}function E(C){return C%(2*Math.PI)*180/Math.PI}function g(C){return C%360*Math.PI/180}function A(C,F="kilometers",R="kilometers"){if(!(C>=0))throw new Error("length must be a positive number");return y(o(C,F),R)}function m(C,F="meters",R="kilometers"){if(!(C>=0))throw new Error("area must be a positive number");let z=v[F];if(!z)throw new Error("invalid original units");let D=v[R];if(!D)throw new Error("invalid final units");return C/z*D}function h(C){return!isNaN(C)&&C!==null&&!Array.isArray(C)}function b(C){return C!==null&&typeof C=="object"&&!Array.isArray(C)}function _(C){if(!C)throw new Error("bbox is required");if(!Array.isArray(C))throw new Error("bbox must be an Array");if(C.length!==4&&C.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");C.forEach(F=>{if(!h(F))throw new Error("bbox must only contain numbers")})}function I(C){if(!C)throw new Error("id is required");if(["string","number"].indexOf(typeof C)===-1)throw new Error("id must be a number or a string")}j.areaFactors=v,j.azimuthToBearing=T,j.bearingToAzimuth=M,j.convertArea=m,j.convertLength=A,j.degreesToRadians=g,j.earthRadius=N,j.factors=u,j.feature=w,j.featureCollection=i,j.geometry=S,j.geometryCollection=f,j.isNumber=h,j.isObject=b,j.lengthToDegrees=x,j.lengthToRadians=o,j.lineString=r,j.lineStrings=n,j.multiLineString=s,j.multiPoint=c,j.multiPolygon=p,j.point=l,j.points=e,j.polygon=t,j.polygons=a,j.radiansToDegrees=E,j.radiansToLength=y,j.round=d,j.validateBBox=_,j.validateId=I}}),Bb=De({"node_modules/@turf/meta/dist/cjs/index.cjs"(j){"use strict";Object.defineProperty(j,"__esModule",{value:!0});var N=zb();function u(o,x,M){if(o!==null)for(var T,E,g,A,m,h,b,_=0,I=0,C,F=o.type,R=F==="FeatureCollection",z=F==="Feature",D=R?o.features.length:1,k=0;kh||R>b||z>_){m=I,h=T,b=R,_=z,g=0;return}var D=N.lineString.call(void 0,[m,I],M.properties);if(x(D,T,E,z,g)===!1)return!1;g++,m=I})===!1)return!1}}})}function c(o,x,M){var T=M,E=!1;return s(o,function(g,A,m,h,b){E===!1&&M===void 0?T=g:T=x(T,g,A,m,h,b),E=!0}),T}function p(o,x){if(!o)throw new Error("geojson is required");n(o,function(M,T,E){if(M.geometry!==null){var g=M.geometry.type,A=M.geometry.coordinates;switch(g){case"LineString":if(x(M,T,E,0,0)===!1)return!1;break;case"Polygon":for(var m=0;mn+w(i),0)}function w(r){let n=0,i;switch(r.type){case"Polygon":return S(r.coordinates);case"MultiPolygon":for(i=0;i0){n+=Math.abs(t(r[0]));for(let i=1;i=n?(s+2)%n:s+2],d=c[0]*e,y=p[1]*e,o=f[0]*e;i+=(o-d)*Math.sin(y),s++}return i*l}var a=v;j.area=v,j.default=a}}),yO=De({"node_modules/@turf/centroid/dist/cjs/index.cjs"(j){"use strict";Object.defineProperty(j,"__esModule",{value:!0});var N=zb(),u=Bb();function v(S,l={}){let e=0,t=0,a=0;return u.coordEach.call(void 0,S,function(r){e+=r[0],t+=r[1],a++},!0),N.point.call(void 0,[e/a,t/a],l.properties)}var w=v;j.centroid=v,j.default=w}}),gg=De({"node_modules/d3-array/dist/d3-array.js"(j,N){(function(u,v){v(typeof j=="object"&&typeof N<"u"?j:u.d3=u.d3||{})})(j,function(u){"use strict";function v(K,V){return KV?1:K>=V?0:NaN}function w(K){return K.length===1&&(K=S(K)),{left:function(V,$,X,Z){for(X==null&&(X=0),Z==null&&(Z=V.length);X>>1;K(V[Q],$)<0?X=Q+1:Z=Q}return X},right:function(V,$,X,Z){for(X==null&&(X=0),Z==null&&(Z=V.length);X>>1;K(V[Q],$)>0?Z=Q:X=Q+1}return X}}}function S(K){return function(V,$){return v(K(V),$)}}var l=w(v),e=l.right,t=l.left;function a(K,V){V==null&&(V=r);for(var $=0,X=K.length-1,Z=K[0],Q=new Array(X<0?0:X);$K?1:V>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,V){var $=K.length,X=0,Z=-1,Q=0,re,ce,me=0;if(V==null)for(;++Z<$;)isNaN(re=s(K[Z]))||(ce=re-Q,Q+=ce/++X,me+=ce*(re-Q));else for(;++Z<$;)isNaN(re=s(V(K[Z],Z,K)))||(ce=re-Q,Q+=ce/++X,me+=ce*(re-Q));if(X>1)return me/(X-1)}function p(K,V){var $=c(K,V);return $&&Math.sqrt($)}function f(K,V){var $=K.length,X=-1,Z,Q,re;if(V==null){for(;++X<$;)if((Z=K[X])!=null&&Z>=Z)for(Q=re=Z;++X<$;)(Z=K[X])!=null&&(Q>Z&&(Q=Z),re=Z)for(Q=re=Z;++X<$;)(Z=V(K[X],X,K))!=null&&(Q>Z&&(Q=Z),re0)return[K];if((X=V0)for(K=Math.ceil(K/ce),V=Math.floor(V/ce),re=new Array(Q=Math.ceil(V-K+1));++Z=0?(Q>=E?10:Q>=g?5:Q>=A?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(Q>=E?10:Q>=g?5:Q>=A?2:1)}function b(K,V,$){var X=Math.abs(V-K)/Math.max(0,$),Z=Math.pow(10,Math.floor(Math.log(X)/Math.LN10)),Q=X/Z;return Q>=E?Z*=10:Q>=g?Z*=5:Q>=A&&(Z*=2),VSe;)Ce.pop(),--qe;var Ue=new Array(qe+1),xe;for(Q=0;Q<=qe;++Q)xe=Ue[Q]=[],xe.x0=Q>0?Ce[Q-1]:Ae,xe.x1=Q=1)return+$(K[X-1],X-1,K);var X,Z=(X-1)*V,Q=Math.floor(Z),re=+$(K[Q],Q,K),ce=+$(K[Q+1],Q+1,K);return re+(ce-re)*(Z-Q)}}function F(K,V,$){return K=o.call(K,s).sort(v),Math.ceil(($-V)/(2*(C(K,.75)-C(K,.25))*Math.pow(K.length,-1/3)))}function R(K,V,$){return Math.ceil(($-V)/(3.5*p(K)*Math.pow(K.length,-1/3)))}function z(K,V){var $=K.length,X=-1,Z,Q;if(V==null){for(;++X<$;)if((Z=K[X])!=null&&Z>=Z)for(Q=Z;++X<$;)(Z=K[X])!=null&&Z>Q&&(Q=Z)}else for(;++X<$;)if((Z=V(K[X],X,K))!=null&&Z>=Z)for(Q=Z;++X<$;)(Z=V(K[X],X,K))!=null&&Z>Q&&(Q=Z);return Q}function D(K,V){var $=K.length,X=$,Z=-1,Q,re=0;if(V==null)for(;++Z<$;)isNaN(Q=s(K[Z]))?--X:re+=Q;else for(;++Z<$;)isNaN(Q=s(V(K[Z],Z,K)))?--X:re+=Q;if(X)return re/X}function k(K,V){var $=K.length,X=-1,Z,Q=[];if(V==null)for(;++X<$;)isNaN(Z=s(K[X]))||Q.push(Z);else for(;++X<$;)isNaN(Z=s(V(K[X],X,K)))||Q.push(Z);return C(Q.sort(v),.5)}function B(K){for(var V=K.length,$,X=-1,Z=0,Q,re;++X=0;)for(re=K[V],$=re.length;--$>=0;)Q[--Z]=re[$];return Q}function O(K,V){var $=K.length,X=-1,Z,Q;if(V==null){for(;++X<$;)if((Z=K[X])!=null&&Z>=Z)for(Q=Z;++X<$;)(Z=K[X])!=null&&Q>Z&&(Q=Z)}else for(;++X<$;)if((Z=V(K[X],X,K))!=null&&Z>=Z)for(Q=Z;++X<$;)(Z=V(K[X],X,K))!=null&&Q>Z&&(Q=Z);return Q}function q(K,V){for(var $=V.length,X=new Array($);$--;)X[$]=K[V[$]];return X}function Y(K,V){if($=K.length){var $,X=0,Z=0,Q,re=K[Z];for(V==null&&(V=v);++X<$;)(V(Q=K[X],re)<0||V(re,re)!==0)&&(re=Q,Z=X);if(V(re,re)===0)return Z}}function ee(K,V,$){for(var X=($??K.length)-(V=V==null?0:+V),Z,Q;X;)Q=Math.random()*X--|0,Z=K[X+V],K[X+V]=K[Q+V],K[Q+V]=Z;return K}function te(K,V){var $=K.length,X=-1,Z,Q=0;if(V==null)for(;++X<$;)(Z=+K[X])&&(Q+=Z);else for(;++X<$;)(Z=+V(K[X],X,K))&&(Q+=Z);return Q}function ae(K){if(!(Q=K.length))return[];for(var V=-1,$=O(K,U),X=new Array($);++V<$;)for(var Z=-1,Q,re=X[V]=new Array(Q);++Z0?1:Tt<0?-1:0},m=Math.sqrt,h=Math.tan;function b(Tt){return Tt>1?0:Tt<-1?r:Math.acos(Tt)}function _(Tt){return Tt>1?n:Tt<-1?-n:Math.asin(Tt)}function I(Tt){return(Tt=g(Tt/2))*Tt}function C(){}function F(Tt,jt){Tt&&z.hasOwnProperty(Tt.type)&&z[Tt.type](Tt,jt)}var R={Feature:function(Tt,jt){F(Tt.geometry,jt)},FeatureCollection:function(Tt,jt){for(var yr=Tt.features,dr=-1,Wr=yr.length;++dr=0?1:-1,Wr=dr*yr,ma=o(jt),za=g(jt),Ja=U*za,nn=ae*ma+Ja*o(Wr),Tn=Ja*dr*g(Wr);O.add(y(Tn,nn)),te=Tt,ae=ma,U=za}function Z(Tt){return q.reset(),B(Tt,H),q*2}function Q(Tt){return[y(Tt[1],Tt[0]),_(Tt[2])]}function re(Tt){var jt=Tt[0],yr=Tt[1],dr=o(yr);return[dr*o(jt),dr*g(jt),g(yr)]}function ce(Tt,jt){return Tt[0]*jt[0]+Tt[1]*jt[1]+Tt[2]*jt[2]}function me(Tt,jt){return[Tt[1]*jt[2]-Tt[2]*jt[1],Tt[2]*jt[0]-Tt[0]*jt[2],Tt[0]*jt[1]-Tt[1]*jt[0]]}function ye(Tt,jt){Tt[0]+=jt[0],Tt[1]+=jt[1],Tt[2]+=jt[2]}function Ae(Tt,jt){return[Tt[0]*jt,Tt[1]*jt,Tt[2]*jt]}function Se(Tt){var jt=m(Tt[0]*Tt[0]+Tt[1]*Tt[1]+Tt[2]*Tt[2]);Tt[0]/=jt,Tt[1]/=jt,Tt[2]/=jt}var Ce,qe,Ue,xe,he,oe,le,ne,be=w(),Fe,Ve,je={point:ut,lineStart:yt,lineEnd:At,polygonStart:function(){je.point=Pt,je.lineStart=Zt,je.lineEnd=vr,be.reset(),H.polygonStart()},polygonEnd:function(){H.polygonEnd(),je.point=ut,je.lineStart=yt,je.lineEnd=At,O<0?(Ce=-(Ue=180),qe=-(xe=90)):be>t?xe=90:be<-t&&(qe=-90),Ve[0]=Ce,Ve[1]=Ue},sphere:function(){Ce=-(Ue=180),qe=-(xe=90)}};function ut(Tt,jt){Fe.push(Ve=[Ce=Tt,Ue=Tt]),jtxe&&(xe=jt)}function st(Tt,jt){var yr=re([Tt*p,jt*p]);if(ne){var dr=me(ne,yr),Wr=[dr[1],-dr[0],0],ma=me(Wr,dr);Se(ma),ma=Q(ma);var za=Tt-he,Ja=za>0?1:-1,nn=ma[0]*c*Ja,Tn,Ba=f(za)>180;Ba^(Ja*hexe&&(xe=Tn)):(nn=(nn+360)%360-180,Ba^(Ja*hexe&&(xe=jt))),Ba?TtNt(Ce,Ue)&&(Ue=Tt):Nt(Tt,Ue)>Nt(Ce,Ue)&&(Ce=Tt):Ue>=Ce?(TtUe&&(Ue=Tt)):Tt>he?Nt(Ce,Tt)>Nt(Ce,Ue)&&(Ue=Tt):Nt(Tt,Ue)>Nt(Ce,Ue)&&(Ce=Tt)}else Fe.push(Ve=[Ce=Tt,Ue=Tt]);jtxe&&(xe=jt),ne=yr,he=Tt}function yt(){je.point=st}function At(){Ve[0]=Ce,Ve[1]=Ue,je.point=ut,ne=null}function Pt(Tt,jt){if(ne){var yr=Tt-he;be.add(f(yr)>180?yr+(yr>0?360:-360):yr)}else oe=Tt,le=jt;H.point(Tt,jt),st(Tt,jt)}function Zt(){H.lineStart()}function vr(){Pt(oe,le),H.lineEnd(),f(be)>t&&(Ce=-(Ue=180)),Ve[0]=Ce,Ve[1]=Ue,ne=null}function Nt(Tt,jt){return(jt-=Tt)<0?jt+360:jt}function Kt(Tt,jt){return Tt[0]-jt[0]}function nt(Tt,jt){return Tt[0]<=Tt[1]?Tt[0]<=jt&&jt<=Tt[1]:jtNt(dr[0],dr[1])&&(dr[1]=Wr[1]),Nt(Wr[0],dr[1])>Nt(dr[0],dr[1])&&(dr[0]=Wr[0])):ma.push(dr=Wr);for(za=-1/0,yr=ma.length-1,jt=0,dr=ma[yr];jt<=yr;dr=Wr,++jt)Wr=ma[jt],(Ja=Nt(dr[1],Wr[0]))>za&&(za=Ja,Ce=Wr[0],Ue=dr[1])}return Fe=Ve=null,Ce===1/0||qe===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ce,qe],[Ue,xe]]}var ze,ve,_e,Ie,Be,We,Xe,mt,ft,ht,gt,_t,Ft,St,hr,jr,ra={sphere:C,point:$r,lineStart:oa,lineEnd:Ta,polygonStart:function(){ra.lineStart=Da,ra.lineEnd=La},polygonEnd:function(){ra.lineStart=oa,ra.lineEnd=Ta}};function $r(Tt,jt){Tt*=p,jt*=p;var yr=o(jt);pa(yr*o(Tt),yr*g(Tt),g(jt))}function pa(Tt,jt,yr){++ze,_e+=(Tt-_e)/ze,Ie+=(jt-Ie)/ze,Be+=(yr-Be)/ze}function oa(){ra.point=aa}function aa(Tt,jt){Tt*=p,jt*=p;var yr=o(jt);St=yr*o(Tt),hr=yr*g(Tt),jr=g(jt),ra.point=ka,pa(St,hr,jr)}function ka(Tt,jt){Tt*=p,jt*=p;var yr=o(jt),dr=yr*o(Tt),Wr=yr*g(Tt),ma=g(jt),za=y(m((za=hr*ma-jr*Wr)*za+(za=jr*dr-St*ma)*za+(za=St*Wr-hr*dr)*za),St*dr+hr*Wr+jr*ma);ve+=za,We+=za*(St+(St=dr)),Xe+=za*(hr+(hr=Wr)),mt+=za*(jr+(jr=ma)),pa(St,hr,jr)}function Ta(){ra.point=$r}function Da(){ra.point=Ga}function La(){xa(_t,Ft),ra.point=$r}function Ga(Tt,jt){_t=Tt,Ft=jt,Tt*=p,jt*=p,ra.point=xa;var yr=o(jt);St=yr*o(Tt),hr=yr*g(Tt),jr=g(jt),pa(St,hr,jr)}function xa(Tt,jt){Tt*=p,jt*=p;var yr=o(jt),dr=yr*o(Tt),Wr=yr*g(Tt),ma=g(jt),za=hr*ma-jr*Wr,Ja=jr*dr-St*ma,nn=St*Wr-hr*dr,Tn=m(za*za+Ja*Ja+nn*nn),Ba=_(Tn),Na=Tn&&-Ba/Tn;ft+=Na*za,ht+=Na*Ja,gt+=Na*nn,ve+=Ba,We+=Ba*(St+(St=dr)),Xe+=Ba*(hr+(hr=Wr)),mt+=Ba*(jr+(jr=ma)),pa(St,hr,jr)}function Gn(Tt){ze=ve=_e=Ie=Be=We=Xe=mt=ft=ht=gt=0,B(Tt,ra);var jt=ft,yr=ht,dr=gt,Wr=jt*jt+yr*yr+dr*dr;return Wrr?Tt+Math.round(-Tt/s)*s:Tt,jt]}Yn.invert=Yn;function Zn(Tt,jt,yr){return(Tt%=s)?jt||yr?sn(Dn(Tt),oi(jt,yr)):Dn(Tt):jt||yr?oi(jt,yr):Yn}function vi(Tt){return function(jt,yr){return jt+=Tt,[jt>r?jt-s:jt<-r?jt+s:jt,yr]}}function Dn(Tt){var jt=vi(Tt);return jt.invert=vi(-Tt),jt}function oi(Tt,jt){var yr=o(Tt),dr=g(Tt),Wr=o(jt),ma=g(jt);function za(Ja,nn){var Tn=o(nn),Ba=o(Ja)*Tn,Na=g(Ja)*Tn,Xa=g(nn),Aa=Xa*yr+Ba*dr;return[y(Na*Wr-Aa*ma,Ba*yr-Xa*dr),_(Aa*Wr+Na*ma)]}return za.invert=function(Ja,nn){var Tn=o(nn),Ba=o(Ja)*Tn,Na=g(Ja)*Tn,Xa=g(nn),Aa=Xa*Wr-Na*ma;return[y(Na*Wr+Xa*ma,Ba*yr+Aa*dr),_(Aa*yr-Ba*dr)]},za}function on(Tt){Tt=Zn(Tt[0]*p,Tt[1]*p,Tt.length>2?Tt[2]*p:0);function jt(yr){return yr=Tt(yr[0]*p,yr[1]*p),yr[0]*=c,yr[1]*=c,yr}return jt.invert=function(yr){return yr=Tt.invert(yr[0]*p,yr[1]*p),yr[0]*=c,yr[1]*=c,yr},jt}function mn(Tt,jt,yr,dr,Wr,ma){if(yr){var za=o(jt),Ja=g(jt),nn=dr*yr;Wr==null?(Wr=jt+dr*s,ma=jt-nn/2):(Wr=bi(za,Wr),ma=bi(za,ma),(dr>0?Wrma)&&(Wr+=dr*s));for(var Tn,Ba=Wr;dr>0?Ba>ma:Ba1&&Tt.push(Tt.pop().concat(Tt.shift()))},result:function(){var yr=Tt;return Tt=[],jt=null,yr}}}function Va(Tt,jt){return f(Tt[0]-jt[0])=0;--Ja)Wr.point((Na=Ba[Ja])[0],Na[1]);else dr(Xa.x,Xa.p.x,-1,Wr);Xa=Xa.p}Xa=Xa.o,Ba=Xa.z,Aa=!Aa}while(!Xa.v);Wr.lineEnd()}}}function Jt(Tt){if(jt=Tt.length){for(var jt,yr=0,dr=Tt[0],Wr;++yr=0?1:-1,Oo=us*Lo,_s=Oo>r,ko=ci*Oi;if(Yt.add(y(ko*us*g(Oo),pi*ao+ko*o(Oo))),za+=_s?Lo+us*s:Lo,_s^Aa>=yr^Un>=yr){var fl=me(re(Xa),re(Ti));Se(fl);var Os=me(ma,fl);Se(Os);var cs=(_s^Lo>=0?-1:1)*_(Os[2]);(dr>cs||dr===cs&&(fl[0]||fl[1]))&&(Ja+=_s^Lo>=0?1:-1)}}return(za<-t||za0){for(nn||(Wr.polygonStart(),nn=!0),Wr.lineStart(),ao=0;ao1&&_n&2&&Oi.push(Oi.pop().concat(Oi.shift())),Ba.push(Oi.filter(Je))}}return Xa}}function Je(Tt){return Tt.length>1}function bt(Tt,jt){return((Tt=Tt.x)[0]<0?Tt[1]-n-t:n-Tt[1])-((jt=jt.x)[0]<0?jt[1]-n-t:n-jt[1])}var qt=tr(function(){return!0},Qt,Ir,[-r,-n]);function Qt(Tt){var jt=NaN,yr=NaN,dr=NaN,Wr;return{lineStart:function(){Tt.lineStart(),Wr=1},point:function(ma,za){var Ja=ma>0?r:-r,nn=f(ma-jt);f(nn-r)0?n:-n),Tt.point(dr,yr),Tt.lineEnd(),Tt.lineStart(),Tt.point(Ja,yr),Tt.point(ma,yr),Wr=0):dr!==Ja&&nn>=r&&(f(jt-dr)t?d((g(jt)*(ma=o(dr))*g(yr)-g(dr)*(Wr=o(jt))*g(Tt))/(Wr*ma*za)):(jt+dr)/2}function Ir(Tt,jt,yr,dr){var Wr;if(Tt==null)Wr=yr*n,dr.point(-r,Wr),dr.point(0,Wr),dr.point(r,Wr),dr.point(r,0),dr.point(r,-Wr),dr.point(0,-Wr),dr.point(-r,-Wr),dr.point(-r,0),dr.point(-r,Wr);else if(f(Tt[0]-jt[0])>t){var ma=Tt[0]0,Wr=f(jt)>t;function ma(Ba,Na,Xa,Aa){mn(Aa,Tt,yr,Xa,Ba,Na)}function za(Ba,Na){return o(Ba)*o(Na)>jt}function Ja(Ba){var Na,Xa,Aa,Fn,ci;return{lineStart:function(){Fn=Aa=!1,ci=1},point:function(pi,fi){var Ti=[pi,fi],Un,_n=za(pi,fi),Oi=dr?_n?0:Tn(pi,fi):_n?Tn(pi+(pi<0?r:-r),fi):0;if(!Na&&(Fn=Aa=_n)&&Ba.lineStart(),_n!==Aa&&(Un=nn(Na,Ti),(!Un||Va(Na,Un)||Va(Ti,Un))&&(Ti[2]=1)),_n!==Aa)ci=0,_n?(Ba.lineStart(),Un=nn(Ti,Na),Ba.point(Un[0],Un[1])):(Un=nn(Na,Ti),Ba.point(Un[0],Un[1],2),Ba.lineEnd()),Na=Un;else if(Wr&&Na&&dr^_n){var ao;!(Oi&Xa)&&(ao=nn(Ti,Na,!0))&&(ci=0,dr?(Ba.lineStart(),Ba.point(ao[0][0],ao[0][1]),Ba.point(ao[1][0],ao[1][1]),Ba.lineEnd()):(Ba.point(ao[1][0],ao[1][1]),Ba.lineEnd(),Ba.lineStart(),Ba.point(ao[0][0],ao[0][1],3)))}_n&&(!Na||!Va(Na,Ti))&&Ba.point(Ti[0],Ti[1]),Na=Ti,Aa=_n,Xa=Oi},lineEnd:function(){Aa&&Ba.lineEnd(),Na=null},clean:function(){return ci|(Fn&&Aa)<<1}}}function nn(Ba,Na,Xa){var Aa=re(Ba),Fn=re(Na),ci=[1,0,0],pi=me(Aa,Fn),fi=ce(pi,pi),Ti=pi[0],Un=fi-Ti*Ti;if(!Un)return!Xa&&Ba;var _n=jt*fi/Un,Oi=-jt*Ti/Un,ao=me(ci,pi),Lo=Ae(ci,_n),us=Ae(pi,Oi);ye(Lo,us);var Oo=ao,_s=ce(Lo,Oo),ko=ce(Oo,Oo),fl=_s*_s-ko*(ce(Lo,Lo)-1);if(!(fl<0)){var Os=m(fl),cs=Ae(Oo,(-_s-Os)/ko);if(ye(cs,Lo),cs=Q(cs),!Xa)return cs;var ai=Ba[0],Xo=Na[0],os=Ba[1],Do=Na[1],al;Xo0^cs[1]<(f(cs[0]-ai)r^(ai<=cs[0]&&cs[0]<=Xo)){var _l=Ae(Oo,(-_s+Os)/ko);return ye(_l,Lo),[cs,Q(_l)]}}}function Tn(Ba,Na){var Xa=dr?Tt:r-Tt,Aa=0;return Ba<-Xa?Aa|=1:Ba>Xa&&(Aa|=2),Na<-Xa?Aa|=4:Na>Xa&&(Aa|=8),Aa}return tr(za,Ja,ma,dr?[0,-Tt]:[-r,Tt-r])}function Mr(Tt,jt,yr,dr,Wr,ma){var za=Tt[0],Ja=Tt[1],nn=jt[0],Tn=jt[1],Ba=0,Na=1,Xa=nn-za,Aa=Tn-Ja,Fn;if(Fn=yr-za,!(!Xa&&Fn>0)){if(Fn/=Xa,Xa<0){if(Fn0){if(Fn>Na)return;Fn>Ba&&(Ba=Fn)}if(Fn=Wr-za,!(!Xa&&Fn<0)){if(Fn/=Xa,Xa<0){if(Fn>Na)return;Fn>Ba&&(Ba=Fn)}else if(Xa>0){if(Fn0)){if(Fn/=Aa,Aa<0){if(Fn0){if(Fn>Na)return;Fn>Ba&&(Ba=Fn)}if(Fn=ma-Ja,!(!Aa&&Fn<0)){if(Fn/=Aa,Aa<0){if(Fn>Na)return;Fn>Ba&&(Ba=Fn)}else if(Aa>0){if(Fn0&&(Tt[0]=za+Ba*Xa,Tt[1]=Ja+Ba*Aa),Na<1&&(jt[0]=za+Na*Xa,jt[1]=Ja+Na*Aa),!0}}}}}var Xr=1e9,Ra=-Xr;function wa(Tt,jt,yr,dr){function Wr(Tn,Ba){return Tt<=Tn&&Tn<=yr&&jt<=Ba&&Ba<=dr}function ma(Tn,Ba,Na,Xa){var Aa=0,Fn=0;if(Tn==null||(Aa=za(Tn,Na))!==(Fn=za(Ba,Na))||nn(Tn,Ba)<0^Na>0)do Xa.point(Aa===0||Aa===3?Tt:yr,Aa>1?dr:jt);while((Aa=(Aa+Na+4)%4)!==Fn);else Xa.point(Ba[0],Ba[1])}function za(Tn,Ba){return f(Tn[0]-Tt)0?0:3:f(Tn[0]-yr)0?2:1:f(Tn[1]-jt)0?1:0:Ba>0?3:2}function Ja(Tn,Ba){return nn(Tn.x,Ba.x)}function nn(Tn,Ba){var Na=za(Tn,1),Xa=za(Ba,1);return Na!==Xa?Na-Xa:Na===0?Ba[1]-Tn[1]:Na===1?Tn[0]-Ba[0]:Na===2?Tn[1]-Ba[1]:Ba[0]-Tn[0]}return function(Tn){var Ba=Tn,Na=$a(),Xa,Aa,Fn,ci,pi,fi,Ti,Un,_n,Oi,ao,Lo={point:us,lineStart:fl,lineEnd:Os,polygonStart:_s,polygonEnd:ko};function us(ai,Xo){Wr(ai,Xo)&&Ba.point(ai,Xo)}function Oo(){for(var ai=0,Xo=0,os=Aa.length;Xodr&&(Su-Nu)*(dr-_l)>(xl-_l)*(Tt-Nu)&&++ai:xl<=dr&&(Su-Nu)*(dr-_l)<(xl-_l)*(Tt-Nu)&&--ai;return ai}function _s(){Ba=Na,Xa=[],Aa=[],ao=!0}function ko(){var ai=Oo(),Xo=ao&&ai,os=(Xa=v.merge(Xa)).length;(Xo||os)&&(Tn.polygonStart(),Xo&&(Tn.lineStart(),ma(null,null,1,Tn),Tn.lineEnd()),os&&Qe(Xa,Ja,ai,ma,Tn),Tn.polygonEnd()),Ba=Tn,Xa=Aa=Fn=null}function fl(){Lo.point=cs,Aa&&Aa.push(Fn=[]),Oi=!0,_n=!1,Ti=Un=NaN}function Os(){Xa&&(cs(ci,pi),fi&&_n&&Na.rejoin(),Xa.push(Na.result())),Lo.point=us,_n&&Ba.lineEnd()}function cs(ai,Xo){var os=Wr(ai,Xo);if(Aa&&Fn.push([ai,Xo]),Oi)ci=ai,pi=Xo,fi=os,Oi=!1,os&&(Ba.lineStart(),Ba.point(ai,Xo));else if(os&&_n)Ba.point(ai,Xo);else{var Do=[Ti=Math.max(Ra,Math.min(Xr,Ti)),Un=Math.max(Ra,Math.min(Xr,Un))],al=[ai=Math.max(Ra,Math.min(Xr,ai)),Xo=Math.max(Ra,Math.min(Xr,Xo))];Mr(Do,al,Tt,jt,yr,dr)?(_n||(Ba.lineStart(),Ba.point(Do[0],Do[1])),Ba.point(al[0],al[1]),os||Ba.lineEnd(),ao=!1):os&&(Ba.lineStart(),Ba.point(ai,Xo),ao=!1)}Ti=ai,Un=Xo,_n=os}return Lo}}function yn(){var Tt=0,jt=0,yr=960,dr=500,Wr,ma,za;return za={stream:function(Ja){return Wr&&ma===Ja?Wr:Wr=wa(Tt,jt,yr,dr)(ma=Ja)},extent:function(Ja){return arguments.length?(Tt=+Ja[0][0],jt=+Ja[0][1],yr=+Ja[1][0],dr=+Ja[1][1],Wr=ma=null,za):[[Tt,jt],[yr,dr]]}}}var fn=w(),ri,On,ui,jn={sphere:C,point:C,lineStart:oo,lineEnd:C,polygonStart:C,polygonEnd:C};function oo(){jn.point=Mn,jn.lineEnd=Qi}function Qi(){jn.point=jn.lineEnd=C}function Mn(Tt,jt){Tt*=p,jt*=p,ri=Tt,On=g(jt),ui=o(jt),jn.point=bo}function bo(Tt,jt){Tt*=p,jt*=p;var yr=g(jt),dr=o(jt),Wr=f(Tt-ri),ma=o(Wr),za=g(Wr),Ja=dr*za,nn=ui*yr-On*dr*ma,Tn=On*yr+ui*dr*ma;fn.add(y(m(Ja*Ja+nn*nn),Tn)),ri=Tt,On=yr,ui=dr}function so(Tt){return fn.reset(),B(Tt,jn),+fn}var Hi=[null,null],yo={type:"LineString",coordinates:Hi};function Bi(Tt,jt){return Hi[0]=Tt,Hi[1]=jt,so(yo)}var fo={Feature:function(Tt,jt){return po(Tt.geometry,jt)},FeatureCollection:function(Tt,jt){for(var yr=Tt.features,dr=-1,Wr=yr.length;++dr0&&(Wr=Bi(Tt[ma],Tt[ma-1]),Wr>0&&yr<=Wr&&dr<=Wr&&(yr+dr-Wr)*(1-Math.pow((yr-dr)/Wr,2))t}).map(Xa)).concat(v.range(x(ma/Tn)*Tn,Wr,Tn).filter(function(Un){return f(Un%Na)>t}).map(Aa))}return fi.lines=function(){return Ti().map(function(Un){return{type:"LineString",coordinates:Un}})},fi.outline=function(){return{type:"Polygon",coordinates:[Fn(dr).concat(ci(za).slice(1),Fn(yr).reverse().slice(1),ci(Ja).reverse().slice(1))]}},fi.extent=function(Un){return arguments.length?fi.extentMajor(Un).extentMinor(Un):fi.extentMinor()},fi.extentMajor=function(Un){return arguments.length?(dr=+Un[0][0],yr=+Un[1][0],Ja=+Un[0][1],za=+Un[1][1],dr>yr&&(Un=dr,dr=yr,yr=Un),Ja>za&&(Un=Ja,Ja=za,za=Un),fi.precision(pi)):[[dr,Ja],[yr,za]]},fi.extentMinor=function(Un){return arguments.length?(jt=+Un[0][0],Tt=+Un[1][0],ma=+Un[0][1],Wr=+Un[1][1],jt>Tt&&(Un=jt,jt=Tt,Tt=Un),ma>Wr&&(Un=ma,ma=Wr,Wr=Un),fi.precision(pi)):[[jt,ma],[Tt,Wr]]},fi.step=function(Un){return arguments.length?fi.stepMajor(Un).stepMinor(Un):fi.stepMinor()},fi.stepMajor=function(Un){return arguments.length?(Ba=+Un[0],Na=+Un[1],fi):[Ba,Na]},fi.stepMinor=function(Un){return arguments.length?(nn=+Un[0],Tn=+Un[1],fi):[nn,Tn]},fi.precision=function(Un){return arguments.length?(pi=+Un,Xa=Wo(ma,Wr,90),Aa=Go(jt,Tt,pi),Fn=Wo(Ja,za,90),ci=Go(dr,yr,pi),fi):pi},fi.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function Ro(){return ns()()}function Zi(Tt,jt){var yr=Tt[0]*p,dr=Tt[1]*p,Wr=jt[0]*p,ma=jt[1]*p,za=o(dr),Ja=g(dr),nn=o(ma),Tn=g(ma),Ba=za*o(yr),Na=za*g(yr),Xa=nn*o(Wr),Aa=nn*g(Wr),Fn=2*_(m(I(ma-dr)+za*nn*I(Wr-yr))),ci=g(Fn),pi=Fn?function(fi){var Ti=g(fi*=Fn)/ci,Un=g(Fn-fi)/ci,_n=Un*Ba+Ti*Xa,Oi=Un*Na+Ti*Aa,ao=Un*Ja+Ti*Tn;return[y(Oi,_n)*c,y(ao,m(_n*_n+Oi*Oi))*c]}:function(){return[yr*c,dr*c]};return pi.distance=Fn,pi}function ls(Tt){return Tt}var Eo=w(),mo=w(),Zs,qo,Ds,Us,is={point:C,lineStart:C,lineEnd:C,polygonStart:function(){is.lineStart=cl,is.lineEnd=Gl},polygonEnd:function(){is.lineStart=is.lineEnd=is.point=C,Eo.add(f(mo)),mo.reset()},result:function(){var Tt=Eo/2;return Eo.reset(),Tt}};function cl(){is.point=ml}function ml(Tt,jt){is.point=Qo,Zs=Ds=Tt,qo=Us=jt}function Qo(Tt,jt){mo.add(Us*Tt-Ds*jt),Ds=Tt,Us=jt}function Gl(){Qo(Zs,qo)}var ys=1/0,$o=ys,wo=-ys,go=wo,rs={point:$l,lineStart:C,lineEnd:C,polygonStart:C,polygonEnd:C,result:function(){var Tt=[[ys,$o],[wo,go]];return wo=go=-($o=ys=1/0),Tt}};function $l(Tt,jt){Ttwo&&(wo=Tt),jt<$o&&($o=jt),jt>go&&(go=jt)}var cu=0,Kl=0,Wu=0,Yu=0,rc=0,ac=0,xc=0,Ec=0,fu=0,hu,du,Jl,Fs,Yo={point:tl,lineStart:wu,lineEnd:zs,polygonStart:function(){Yo.lineStart=Zf,Yo.lineEnd=Io},polygonEnd:function(){Yo.point=tl,Yo.lineStart=wu,Yo.lineEnd=zs},result:function(){var Tt=fu?[xc/fu,Ec/fu]:ac?[Yu/ac,rc/ac]:Wu?[cu/Wu,Kl/Wu]:[NaN,NaN];return cu=Kl=Wu=Yu=rc=ac=xc=Ec=fu=0,Tt}};function tl(Tt,jt){cu+=Tt,Kl+=jt,++Wu}function wu(){Yo.point=Xu}function Xu(Tt,jt){Yo.point=kc,tl(Jl=Tt,Fs=jt)}function kc(Tt,jt){var yr=Tt-Jl,dr=jt-Fs,Wr=m(yr*yr+dr*dr);Yu+=Wr*(Jl+Tt)/2,rc+=Wr*(Fs+jt)/2,ac+=Wr,tl(Jl=Tt,Fs=jt)}function zs(){Yo.point=tl}function Zf(){Yo.point=$f}function Io(){Vo(hu,du)}function $f(Tt,jt){Yo.point=Vo,tl(hu=Jl=Tt,du=Fs=jt)}function Vo(Tt,jt){var yr=Tt-Jl,dr=jt-Fs,Wr=m(yr*yr+dr*dr);Yu+=Wr*(Jl+Tt)/2,rc+=Wr*(Fs+jt)/2,ac+=Wr,Wr=Fs*Tt-Jl*jt,xc+=Wr*(Jl+Tt),Ec+=Wr*(Fs+jt),fu+=Wr*3,tl(Jl=Tt,Fs=jt)}function qi(Tt){this._context=Tt}qi.prototype={_radius:4.5,pointRadius:function(Tt){return this._radius=Tt,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Tt,jt){switch(this._point){case 0:{this._context.moveTo(Tt,jt),this._point=1;break}case 1:{this._context.lineTo(Tt,jt);break}default:{this._context.moveTo(Tt+this._radius,jt),this._context.arc(Tt,jt,this._radius,0,s);break}}},result:C};var Zu=w(),bc,El,mf,Au,nc,rl={point:C,lineStart:function(){rl.point=gf},lineEnd:function(){bc&&Yc(El,mf),rl.point=C},polygonStart:function(){bc=!0},polygonEnd:function(){bc=null},result:function(){var Tt=+Zu;return Zu.reset(),Tt}};function gf(Tt,jt){rl.point=Yc,El=Au=Tt,mf=nc=jt}function Yc(Tt,jt){Au-=Tt,nc-=jt,Zu.add(m(Au*Au+nc*nc)),Au=Tt,nc=jt}function ic(){this._string=[]}ic.prototype={_radius:4.5,_circle:oc(4.5),pointRadius:function(Tt){return(Tt=+Tt)!==this._radius&&(this._radius=Tt,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Tt,jt){switch(this._point){case 0:{this._string.push("M",Tt,",",jt),this._point=1;break}case 1:{this._string.push("L",Tt,",",jt);break}default:{this._circle==null&&(this._circle=oc(this._radius)),this._string.push("M",Tt,",",jt,this._circle);break}}},result:function(){if(this._string.length){var Tt=this._string.join("");return this._string=[],Tt}else return null}};function oc(Tt){return"m0,"+Tt+"a"+Tt+","+Tt+" 0 1,1 0,"+-2*Tt+"a"+Tt+","+Tt+" 0 1,1 0,"+2*Tt+"z"}function Xc(Tt,jt){var yr=4.5,dr,Wr;function ma(za){return za&&(typeof yr=="function"&&Wr.pointRadius(+yr.apply(this,arguments)),B(za,dr(Wr))),Wr.result()}return ma.area=function(za){return B(za,dr(is)),is.result()},ma.measure=function(za){return B(za,dr(rl)),rl.result()},ma.bounds=function(za){return B(za,dr(rs)),rs.result()},ma.centroid=function(za){return B(za,dr(Yo)),Yo.result()},ma.projection=function(za){return arguments.length?(dr=za==null?(Tt=null,ls):(Tt=za).stream,ma):Tt},ma.context=function(za){return arguments.length?(Wr=za==null?(jt=null,new ic):new qi(jt=za),typeof yr!="function"&&Wr.pointRadius(yr),ma):jt},ma.pointRadius=function(za){return arguments.length?(yr=typeof za=="function"?za:(Wr.pointRadius(+za),+za),ma):yr},ma.projection(Tt).context(jt)}function Zc(Tt){return{stream:Ql(Tt)}}function Ql(Tt){return function(jt){var yr=new Cc;for(var dr in Tt)yr[dr]=Tt[dr];return yr.stream=jt,yr}}function Cc(){}Cc.prototype={constructor:Cc,point:function(Tt,jt){this.stream.point(Tt,jt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function eu(Tt,jt,yr){var dr=Tt.clipExtent&&Tt.clipExtent();return Tt.scale(150).translate([0,0]),dr!=null&&Tt.clipExtent(null),B(yr,Tt.stream(rs)),jt(rs.result()),dr!=null&&Tt.clipExtent(dr),Tt}function sc(Tt,jt,yr){return eu(Tt,function(dr){var Wr=jt[1][0]-jt[0][0],ma=jt[1][1]-jt[0][1],za=Math.min(Wr/(dr[1][0]-dr[0][0]),ma/(dr[1][1]-dr[0][1])),Ja=+jt[0][0]+(Wr-za*(dr[1][0]+dr[0][0]))/2,nn=+jt[0][1]+(ma-za*(dr[1][1]+dr[0][1]))/2;Tt.scale(150*za).translate([Ja,nn])},yr)}function qs(Tt,jt,yr){return sc(Tt,[[0,0],jt],yr)}function lc(Tt,jt,yr){return eu(Tt,function(dr){var Wr=+jt,ma=Wr/(dr[1][0]-dr[0][0]),za=(Wr-ma*(dr[1][0]+dr[0][0]))/2,Ja=-ma*dr[0][1];Tt.scale(150*ma).translate([za,Ja])},yr)}function Fu(Tt,jt,yr){return eu(Tt,function(dr){var Wr=+jt,ma=Wr/(dr[1][1]-dr[0][1]),za=-ma*dr[0][0],Ja=(Wr-ma*(dr[1][1]+dr[0][1]))/2;Tt.scale(150*ma).translate([za,Ja])},yr)}var Ko=16,Lc=o(30*p);function Kf(Tt,jt){return+jt?$u(Tt,jt):yf(Tt)}function yf(Tt){return Ql({point:function(jt,yr){jt=Tt(jt,yr),this.stream.point(jt[0],jt[1])}})}function $u(Tt,jt){function yr(dr,Wr,ma,za,Ja,nn,Tn,Ba,Na,Xa,Aa,Fn,ci,pi){var fi=Tn-dr,Ti=Ba-Wr,Un=fi*fi+Ti*Ti;if(Un>4*jt&&ci--){var _n=za+Xa,Oi=Ja+Aa,ao=nn+Fn,Lo=m(_n*_n+Oi*Oi+ao*ao),us=_(ao/=Lo),Oo=f(f(ao)-1)jt||f((fi*Os+Ti*cs)/Un-.5)>.3||za*Xa+Ja*Aa+nn*Fn2?ai[2]%360*p:0,Os()):[Ja*c,nn*c,Tn*c]},ko.angle=function(ai){return arguments.length?(Na=ai%360*p,Os()):Na*c},ko.reflectX=function(ai){return arguments.length?(Xa=ai?-1:1,Os()):Xa<0},ko.reflectY=function(ai){return arguments.length?(Aa=ai?-1:1,Os()):Aa<0},ko.precision=function(ai){return arguments.length?(ao=Kf(Lo,Oi=ai*ai),cs()):m(Oi)},ko.fitExtent=function(ai,Xo){return sc(ko,ai,Xo)},ko.fitSize=function(ai,Xo){return qs(ko,ai,Xo)},ko.fitWidth=function(ai,Xo){return lc(ko,ai,Xo)},ko.fitHeight=function(ai,Xo){return Fu(ko,ai,Xo)};function Os(){var ai=Gs(yr,0,0,Xa,Aa,Na).apply(null,jt(ma,za)),Xo=(Na?Gs:Jf)(yr,dr-ai[0],Wr-ai[1],Xa,Aa,Na);return Ba=Zn(Ja,nn,Tn),Lo=sn(jt,Xo),us=sn(Ba,Lo),ao=Kf(Lo,Oi),cs()}function cs(){return Oo=_s=null,ko}return function(){return jt=Tt.apply(this,arguments),ko.invert=jt.invert&&fl,Os()}}function Es(Tt){var jt=0,yr=r/3,dr=xf(Tt),Wr=dr(jt,yr);return Wr.parallels=function(ma){return arguments.length?dr(jt=ma[0]*p,yr=ma[1]*p):[jt*c,yr*c]},Wr}function zu(Tt){var jt=o(Tt);function yr(dr,Wr){return[dr*jt,g(Wr)/jt]}return yr.invert=function(dr,Wr){return[dr/jt,_(Wr*jt)]},yr}function Fl(Tt,jt){var yr=g(Tt),dr=(yr+g(jt))/2;if(f(dr)=.12&&pi<.234&&ci>=-.425&&ci<-.214?Wr:pi>=.166&&pi<.234&&ci>=-.214&&ci<-.115?za:yr).invert(Xa)},Ba.stream=function(Xa){return Tt&&jt===Xa?Tt:Tt=$c([yr.stream(jt=Xa),Wr.stream(Xa),za.stream(Xa)])},Ba.precision=function(Xa){return arguments.length?(yr.precision(Xa),Wr.precision(Xa),za.precision(Xa),Na()):yr.precision()},Ba.scale=function(Xa){return arguments.length?(yr.scale(Xa),Wr.scale(Xa*.35),za.scale(Xa),Ba.translate(yr.translate())):yr.scale()},Ba.translate=function(Xa){if(!arguments.length)return yr.translate();var Aa=yr.scale(),Fn=+Xa[0],ci=+Xa[1];return dr=yr.translate(Xa).clipExtent([[Fn-.455*Aa,ci-.238*Aa],[Fn+.455*Aa,ci+.238*Aa]]).stream(Tn),ma=Wr.translate([Fn-.307*Aa,ci+.201*Aa]).clipExtent([[Fn-.425*Aa+t,ci+.12*Aa+t],[Fn-.214*Aa-t,ci+.234*Aa-t]]).stream(Tn),Ja=za.translate([Fn-.205*Aa,ci+.212*Aa]).clipExtent([[Fn-.214*Aa+t,ci+.166*Aa+t],[Fn-.115*Aa-t,ci+.234*Aa-t]]).stream(Tn),Na()},Ba.fitExtent=function(Xa,Aa){return sc(Ba,Xa,Aa)},Ba.fitSize=function(Xa,Aa){return qs(Ba,Xa,Aa)},Ba.fitWidth=function(Xa,Aa){return lc(Ba,Xa,Aa)},Ba.fitHeight=function(Xa,Aa){return Fu(Ba,Xa,Aa)};function Na(){return Tt=jt=null,Ba}return Ba.scale(1070)}function vu(Tt){return function(jt,yr){var dr=o(jt),Wr=o(yr),ma=Tt(dr*Wr);return[ma*Wr*g(jt),ma*g(yr)]}}function Bu(Tt){return function(jt,yr){var dr=m(jt*jt+yr*yr),Wr=Tt(dr),ma=g(Wr),za=o(Wr);return[y(jt*ma,dr*za),_(dr&&yr*ma/dr)]}}var Tu=vu(function(Tt){return m(2/(1+Tt))});Tu.invert=Bu(function(Tt){return 2*_(Tt/2)});function wh(){return tu(Tu).scale(124.75).clipAngle(180-.001)}var Ac=vu(function(Tt){return(Tt=b(Tt))&&Tt/g(Tt)});Ac.invert=Bu(function(Tt){return Tt});function Qf(){return tu(Ac).scale(79.4188).clipAngle(180-.001)}function Vl(Tt,jt){return[Tt,T(h((n+jt)/2))]}Vl.invert=function(Tt,jt){return[Tt,2*d(M(jt))-n]};function uc(){return $s(Vl).scale(961/s)}function $s(Tt){var jt=tu(Tt),yr=jt.center,dr=jt.scale,Wr=jt.translate,ma=jt.clipExtent,za=null,Ja,nn,Tn;jt.scale=function(Na){return arguments.length?(dr(Na),Ba()):dr()},jt.translate=function(Na){return arguments.length?(Wr(Na),Ba()):Wr()},jt.center=function(Na){return arguments.length?(yr(Na),Ba()):yr()},jt.clipExtent=function(Na){return arguments.length?(Na==null?za=Ja=nn=Tn=null:(za=+Na[0][0],Ja=+Na[0][1],nn=+Na[1][0],Tn=+Na[1][1]),Ba()):za==null?null:[[za,Ja],[nn,Tn]]};function Ba(){var Na=r*dr(),Xa=jt(on(jt.rotate()).invert([0,0]));return ma(za==null?[[Xa[0]-Na,Xa[1]-Na],[Xa[0]+Na,Xa[1]+Na]]:Tt===Vl?[[Math.max(Xa[0]-Na,za),Ja],[Math.min(Xa[0]+Na,nn),Tn]]:[[za,Math.max(Xa[1]-Na,Ja)],[nn,Math.min(Xa[1]+Na,Tn)]])}return Ba()}function Ju(Tt){return h((n+Tt)/2)}function vh(Tt,jt){var yr=o(Tt),dr=Tt===jt?g(Tt):T(yr/o(jt))/T(Ju(jt)/Ju(Tt)),Wr=yr*E(Ju(Tt),dr)/dr;if(!dr)return Vl;function ma(za,Ja){Wr>0?Ja<-n+t&&(Ja=-n+t):Ja>n-t&&(Ja=n-t);var nn=Wr/E(Ju(Ja),dr);return[nn*g(dr*za),Wr-nn*o(dr*za)]}return ma.invert=function(za,Ja){var nn=Wr-Ja,Tn=A(dr)*m(za*za+nn*nn),Ba=y(za,f(nn))*A(nn);return nn*dr<0&&(Ba-=r*A(za)*A(nn)),[Ba/dr,2*d(E(Wr/Tn,1/dr))-n]},ma}function Kc(){return Es(vh).scale(109.5).parallels([30,30])}function hs(Tt,jt){return[Tt,jt]}hs.invert=hs;function kl(){return tu(hs).scale(152.63)}function zl(Tt,jt){var yr=o(Tt),dr=Tt===jt?g(Tt):(yr-o(jt))/(jt-Tt),Wr=yr/dr+Tt;if(f(dr)t&&--dr>0);return[Tt/(.8707+(ma=yr*yr)*(-.131979+ma*(-.013791+ma*ma*ma*(.003971-.001529*ma)))),yr]};function Dc(){return tu(Af).scale(175.295)}function yl(Tt,jt){return[o(jt)*g(Tt),g(jt)]}yl.invert=Bu(_);function Mu(){return tu(yl).scale(249.5).clipAngle(90+t)}function Tf(Tt,jt){var yr=o(jt),dr=1+o(Tt)*yr;return[yr*g(Tt)/dr,g(jt)/dr]}Tf.invert=Bu(function(Tt){return 2*d(Tt)});function th(){return tu(Tf).scale(250).clipAngle(142)}function Fc(Tt,jt){return[T(h((n+jt)/2)),-Tt]}Fc.invert=function(Tt,jt){return[-jt,2*d(M(Tt))-n]};function Ou(){var Tt=$s(Fc),jt=Tt.center,yr=Tt.rotate;return Tt.center=function(dr){return arguments.length?jt([-dr[1],dr[0]]):(dr=jt(),[dr[1],-dr[0]])},Tt.rotate=function(dr){return arguments.length?yr([dr[0],dr[1],dr.length>2?dr[2]+90:90]):(dr=yr(),[dr[0],dr[1],dr[2]-90])},yr([0,0,90]).scale(159.155)}u.geoAlbers=wc,u.geoAlbersUsa=bf,u.geoArea=Z,u.geoAzimuthalEqualArea=wh,u.geoAzimuthalEqualAreaRaw=Tu,u.geoAzimuthalEquidistant=Qf,u.geoAzimuthalEquidistantRaw=Ac,u.geoBounds=Ee,u.geoCentroid=Gn,u.geoCircle=Li,u.geoClipAntimeridian=qt,u.geoClipCircle=Cr,u.geoClipExtent=yn,u.geoClipRectangle=wa,u.geoConicConformal=Kc,u.geoConicConformalRaw=vh,u.geoConicEqualArea=Ku,u.geoConicEqualAreaRaw=Fl,u.geoConicEquidistant=Jc,u.geoConicEquidistantRaw=zl,u.geoContains=Co,u.geoDistance=Bi,u.geoEqualEarth=tf,u.geoEqualEarthRaw=ef,u.geoEquirectangular=kl,u.geoEquirectangularRaw=hs,u.geoGnomonic=eh,u.geoGnomonicRaw=wf,u.geoGraticule=ns,u.geoGraticule10=Ro,u.geoIdentity=Ic,u.geoInterpolate=Zi,u.geoLength=so,u.geoMercator=uc,u.geoMercatorRaw=Vl,u.geoNaturalEarth1=Dc,u.geoNaturalEarth1Raw=Af,u.geoOrthographic=Mu,u.geoOrthographicRaw=yl,u.geoPath=Xc,u.geoProjection=tu,u.geoProjectionMutator=xf,u.geoRotation=on,u.geoStereographic=th,u.geoStereographicRaw=Tf,u.geoStream=B,u.geoTransform=Zc,u.geoTransverseMercator=Ou,u.geoTransverseMercatorRaw=Fc,Object.defineProperty(u,"__esModule",{value:!0})})}}),_O=De({"src/lib/usa_location_names.js"(j,N){"use strict";var u={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},v=new Set(Object.values(u));N.exports={usaLocationAbbreviations:v,usaLocationList:u}}}),dT={};Zo(dT,{COUNTRIES_X:()=>vT});var vT,xO=di({"src/lib/custom_country_codes.ts"(){"use strict";vT=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),av=De({"src/lib/geo_location_utils.js"(j,N){"use strict";var u=Qn(),{COUNTRIES:v,createLookup:w}=mO(),{area:S}=gO(),{centroid:l}=yO(),{coordAll:e}=Bb(),{geoBounds:t}=Ob(),a=b1(),r=Xd(),n=Bv(),i=v1(),s=C1(),{usaLocationAbbreviations:c,usaLocationList:p}=_O(),{COUNTRIES_X:f}=(xO(),ts(dT)),{lookupAlpha3:d}=w([...v,...f]),y={"ISO-3":a,"USA-states":x,"country names":o};function o(F){let R=d(F);return R||(r.log("Unrecognized country name: "+F+"."),!1)}function x(F){F=F.trim();let R=c.has(F.toUpperCase())?F.toUpperCase():p[F.toLowerCase()];return R||(r.log("Unrecognized US location: "+F+"."),!1)}function M(F,R,z){var D;if(!R||typeof R!="string")return!1;let k=y[F](R);if(k){let B;if(F==="USA-states"){B=[];for(let O of z)((D=O?.properties)==null?void 0:D.gu)==="USA"&&B.push(O)}else B=z;for(let O of B)if(O.id===k)return O;r.log(`Location with id ${k} does not have a matching topojson feature at this resolution.`)}return!1}var T=360;function E(F){for(let R=0;R0&&F[R+1][0]<0)return R;return null}function g(F){var R=F.geometry,z=R.coordinates,D=F.id,k=[],B,O,q,Y;switch(D==="RUS"||D==="FJI"?B=function(ee){var te;if(E(ee)===null)te=ee;else for(te=new Array(ee.length),Y=0;Yte?ae[U++]=[ee[Y][0]+T,ee[Y][1]]:Y===te?(ae[U++]=ee[Y],ae[U++]=[ee[Y][0],-90]):ae[U++]=ee[Y];var H=s.tester(ae);H.pts.pop(),k.push(H)}:B=function(ee){k.push(s.tester(ee))},R.type){case"MultiPolygon":for(O=0;O0?K.properties.ct=h(K):K.properties.ct=[NaN,NaN],U.fIn=te,U.fOut=K,k.push(K)}else r.log(["Location",U.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete D[ae]}switch(z.type){case"FeatureCollection":var Y=z.features;for(B=0;Bk&&(k=q,z=O)}else z=R;return l(z).geometry.coordinates}function b(F){var R=window.PlotlyGeoAssets||{},z=[];function D(Y){return new Promise(function(ee,te){u.json(Y,function(ae,U){if(ae){delete R[Y];var H=ae.status===404?'GeoJSON at URL "'+Y+'" does not exist.':"Unexpected error while fetching from "+Y;return te(new Error(H))}return R[Y]=U,ee(U)})})}function k(Y){return new Promise(function(ee,te){var ae=0,U=setInterval(function(){if(R[Y]&&R[Y]!=="pending")return clearInterval(U),ee(R[Y]);if(ae>100)return clearInterval(U),te("Unexpected error while fetching from "+Y);ae++},50)})}for(var B=0;Bq-Y);if(R.length<2)return null;let z=R.length,D=R[z-1]-R[0];if(D>=360)return null;let k=-1/0,B=-1;for(let q=0;qk&&(k=Y,B=q)}let O=360-D;return k<=O?null:[R[B+1],R[B]+T]}function C([F,R]){return[F,F>R?R+T:R]}N.exports={locationToFeature:M,feature2polygons:g,getTraceGeojson:A,extractTraceFeature:m,fetchTraceGeoData:b,computeBbox:_,doesCrossAntiMeridian:E,getFitboundsLonRange:I,unwrapLonRange:C,ANTIMERIDIAN_LON_SHIFT:T}}}),pT=De({"src/traces/scattergeo/style.js"(j,N){"use strict";var u=Qn(),v=Ki(),w=ii(),S=bh(),l=S.stylePoints,e=S.styleText;N.exports=function(r,n){n&&t(r,n)};function t(a,r){var n=r[0].trace,i=r[0].node3;i.style("opacity",r[0].trace.opacity),l(i,n,a),e(i,n,a),i.selectAll("path.js-line").style("fill","none").each(function(s){var c=u.select(this),p=s.trace,f=p.line||{};c.call(w.stroke,f.color).call(v.dashLine,f.dash||"",f.width||0),p.fill!=="none"&&c.call(w.fill,p.fillcolor)})}}}),mT=De({"src/traces/scattergeo/plot.js"(j,N){"use strict";var u=Qn(),v=Ar(),w=Fb().getTopojsonFeatures,S=mg(),l=av(),e=sd().findExtremes,t=Ho().BADNUM,a=ed().calcMarkerSize,r=Sl(),n=pT();function i(c,p,f){var d=p.layers.frontplot.select(".scatterlayer"),y=v.makeTraceGroups(d,f,"trace scattergeo");function o(x,M){x.lonlat[0]===t&&u.select(M).remove()}y.selectAll("*").remove(),y.each(function(x){var M=u.select(this),T=x[0].trace;if(r.hasLines(T)||T.fill!=="none"){var E=S.calcTraceToLineCoords(x),g=T.fill!=="none"?S.makePolygon(E):S.makeLine(E);M.selectAll("path.js-line").data([{geojson:g,trace:T}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(T)&&M.selectAll("path.point").data(v.identity).enter().append("path").classed("point",!0).each(function(A){o(A,this)}),r.hasText(T)&&M.selectAll("g").data(v.identity).enter().append("g").append("text").each(function(A){o(A,this)}),n(c,x)})}function s(c,p){var f=c[0].trace,d=p[f.geo],y=d._subplot,o=f._length,x,M;if(v.isArrayOrTypedArray(f.locations)){var T=f.locationmode,E=T==="geojson-id"?l.extractTraceFeature(c):w(f,y.topojson);for(x=0;x")}}}),wO=De({"src/traces/scattergeo/event_data.js"(j,N){"use strict";N.exports=function(v,w,S,l,e){v.lon=w.lon,v.lat=w.lat,v.location=w.loc?w.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(v.properties=t.fIn.properties),v}}}),AO=De({"src/traces/scattergeo/select.js"(j,N){"use strict";var u=Sl(),v=Ho().BADNUM;N.exports=function(S,l){var e=S.cd,t=S.xaxis,a=S.yaxis,r=[],n=e[0].trace,i,s,c,p,f,d=!u.hasMarkers(n)&&!u.hasText(n);if(d)return[];if(l===!1)for(f=0;f0?1:Le<0?-1:0},d=Math.sin,y=Math.tan,o=1e-6,x=1e-12,M=Math.PI,T=M/2,E=M/4,g=Math.SQRT1_2,A=R(2),m=R(M),h=M*2,b=180/M,_=M/180;function I(Le){return Le?Le/Math.sin(Le):1}function C(Le){return Le>1?T:Le<-1?-T:Math.asin(Le)}function F(Le){return Le>1?0:Le<-1?M:Math.acos(Le)}function R(Le){return Le>0?Math.sqrt(Le):0}function z(Le){return Le=a(2*Le),(Le-1)/(Le+1)}function D(Le){return(a(Le)-a(-Le))/2}function k(Le){return(a(Le)+a(-Le))/2}function B(Le){return n(Le+R(Le*Le+1))}function O(Le){return n(Le+R(Le*Le-1))}function q(Le){var Oe=y(Le/2),Ge=2*n(t(Le/2))/(Oe*Oe);function $e(lt,tt){var dt=t(lt),Rt=t(tt),Ot=d(tt),Xt=Rt*dt,nr=-((1-Xt?n((1+Xt)/2)/(1-Xt):-.5)+Ge/(1+Xt));return[nr*Rt*d(lt),nr*Ot]}return $e.invert=function(lt,tt){var dt=R(lt*lt+tt*tt),Rt=-Le/2,Ot=50,Xt;if(!dt)return[0,0];do{var nr=Rt/2,pr=t(nr),Lr=d(nr),Br=Lr/pr,Kr=-n(S(pr));Rt-=Xt=(2/Br*Kr-Ge*Br-dt)/(-Kr/(Lr*Lr)+1-Ge/(2*pr*pr))*(pr<0?.7:1)}while(S(Xt)>o&&--Ot>0);var ya=d(Rt);return[e(lt*ya,dt*t(Rt)),C(tt*ya/dt)]},$e}function Y(){var Le=T,Oe=v.geoProjectionMutator(q),Ge=Oe(Le);return Ge.radius=function($e){return arguments.length?Oe(Le=$e*_):Le*b},Ge.scale(179.976).clipAngle(147)}function ee(Le,Oe){var Ge=t(Oe),$e=I(F(Ge*t(Le/=2)));return[2*Ge*d(Le)*$e,d(Oe)*$e]}ee.invert=function(Le,Oe){if(!(Le*Le+4*Oe*Oe>M*M+o)){var Ge=Le,$e=Oe,lt=25;do{var tt=d(Ge),dt=d(Ge/2),Rt=t(Ge/2),Ot=d($e),Xt=t($e),nr=d(2*$e),pr=Ot*Ot,Lr=Xt*Xt,Br=dt*dt,Kr=1-Lr*Rt*Rt,ya=Kr?F(Xt*Rt)*R(Za=1/Kr):Za=0,Za,Ha=2*ya*Xt*dt-Le,un=ya*Ot-Oe,Bn=Za*(Lr*Br+ya*Xt*Rt*pr),li=Za*(.5*tt*nr-ya*2*Ot*dt),Jn=Za*.25*(nr*dt-ya*Ot*Lr*tt),Pi=Za*(pr*Rt+ya*Br*Xt),ho=li*Jn-Pi*Bn;if(!ho)break;var to=(un*li-Ha*Pi)/ho,as=(Ha*Jn-un*Bn)/ho;Ge-=to,$e-=as}while((S(to)>o||S(as)>o)&&--lt>0);return[Ge,$e]}};function te(){return v.geoProjection(ee).scale(152.63)}function ae(Le){var Oe=d(Le),Ge=t(Le),$e=Le>=0?1:-1,lt=y($e*Le),tt=(1+Oe-Ge)/2;function dt(Rt,Ot){var Xt=t(Ot),nr=t(Rt/=2);return[(1+Xt)*d(Rt),($e*Ot>-e(nr,lt)-.001?0:-$e*10)+tt+d(Ot)*Ge-(1+Xt)*Oe*nr]}return dt.invert=function(Rt,Ot){var Xt=0,nr=0,pr=50;do{var Lr=t(Xt),Br=d(Xt),Kr=t(nr),ya=d(nr),Za=1+Kr,Ha=Za*Br-Rt,un=tt+ya*Ge-Za*Oe*Lr-Ot,Bn=Za*Lr/2,li=-Br*ya,Jn=Oe*Za*Br/2,Pi=Ge*Kr+Oe*Lr*ya,ho=li*Jn-Pi*Bn,to=(un*li-Ha*Pi)/ho/2,as=(Ha*Jn-un*Bn)/ho;S(as)>2&&(as/=2),Xt-=to,nr-=as}while((S(to)>o||S(as)>o)&&--pr>0);return $e*nr>-e(t(Xt),lt)-.001?[Xt*2,nr]:null},dt}function U(){var Le=20*_,Oe=Le>=0?1:-1,Ge=y(Oe*Le),$e=v.geoProjectionMutator(ae),lt=$e(Le),tt=lt.stream;return lt.parallel=function(dt){return arguments.length?(Ge=y((Oe=(Le=dt*_)>=0?1:-1)*Le),$e(Le)):Le*b},lt.stream=function(dt){var Rt=lt.rotate(),Ot=tt(dt),Xt=(lt.rotate([0,0]),tt(dt)),nr=lt.precision();return lt.rotate(Rt),Ot.sphere=function(){Xt.polygonStart(),Xt.lineStart();for(var pr=Oe*-180;Oe*pr<180;pr+=Oe*90)Xt.point(pr,Oe*90);if(Le)for(;Oe*(pr-=3*Oe*nr)>=-180;)Xt.point(pr,Oe*-e(t(pr*_/2),Ge)*b);Xt.lineEnd(),Xt.polygonEnd()},Ot},lt.scale(218.695).center([0,28.0974])}function H(Le,Oe){var Ge=y(Oe/2),$e=R(1-Ge*Ge),lt=1+$e*t(Le/=2),tt=d(Le)*$e/lt,dt=Ge/lt,Rt=tt*tt,Ot=dt*dt;return[4/3*tt*(3+Rt-3*Ot),4/3*dt*(3+3*Rt-Ot)]}H.invert=function(Le,Oe){if(Le*=3/8,Oe*=3/8,!Le&&S(Oe)>1)return null;var Ge=Le*Le,$e=Oe*Oe,lt=1+Ge+$e,tt=R((lt-R(lt*lt-4*Oe*Oe))/2),dt=C(tt)/3,Rt=tt?O(S(Oe/tt))/3:B(S(Le))/3,Ot=t(dt),Xt=k(Rt),nr=Xt*Xt-Ot*Ot;return[f(Le)*2*e(D(Rt)*Ot,.25-nr),f(Oe)*2*e(Xt*d(dt),.25+nr)]};function K(){return v.geoProjection(H).scale(66.1603)}var V=R(8),$=n(1+A);function X(Le,Oe){var Ge=S(Oe);return Gex&&--$e>0);return[Le/(t(Ge)*(V-1/d(Ge))),f(Oe)*Ge]};function Z(){return v.geoProjection(X).scale(112.314)}function Q(Le){var Oe=2*M/Le;function Ge($e,lt){var tt=v.geoAzimuthalEquidistantRaw($e,lt);if(S($e)>T){var dt=e(tt[1],tt[0]),Rt=R(tt[0]*tt[0]+tt[1]*tt[1]),Ot=Oe*p((dt-T)/Oe)+T,Xt=e(d(dt-=Ot),2-t(dt));dt=Ot+C(M/Rt*d(Xt))-Xt,tt[0]=Rt*t(dt),tt[1]=Rt*d(dt)}return tt}return Ge.invert=function($e,lt){var tt=R($e*$e+lt*lt);if(tt>T){var dt=e(lt,$e),Rt=Oe*p((dt-T)/Oe)+T,Ot=dt>Rt?-1:1,Xt=tt*t(Rt-dt),nr=1/y(Ot*F((Xt-M)/R(M*(M-2*Xt)+tt*tt)));dt=Rt+2*l((nr+Ot*R(nr*nr-3))/3),$e=tt*t(dt),lt=tt*d(dt)}return v.geoAzimuthalEquidistantRaw.invert($e,lt)},Ge}function re(){var Le=5,Oe=v.geoProjectionMutator(Q),Ge=Oe(Le),$e=Ge.stream,lt=.01,tt=-t(lt*_),dt=d(lt*_);return Ge.lobes=function(Rt){return arguments.length?Oe(Le=+Rt):Le},Ge.stream=function(Rt){var Ot=Ge.rotate(),Xt=$e(Rt),nr=(Ge.rotate([0,0]),$e(Rt));return Ge.rotate(Ot),Xt.sphere=function(){nr.polygonStart(),nr.lineStart();for(var pr=0,Lr=360/Le,Br=2*M/Le,Kr=90-180/Le,ya=T;pr0&&S(lt)>o);return $e<0?NaN:Ge}function Se(Le,Oe,Ge){return Oe===void 0&&(Oe=40),Ge===void 0&&(Ge=x),function($e,lt,tt,dt){var Rt,Ot,Xt;tt=tt===void 0?0:+tt,dt=dt===void 0?0:+dt;for(var nr=0;nrRt){tt-=Ot/=2,dt-=Xt/=2;continue}Rt=Kr;var ya=(tt>0?-1:1)*Ge,Za=(dt>0?-1:1)*Ge,Ha=Le(tt+ya,dt),un=Le(tt,dt+Za),Bn=(Ha[0]-pr[0])/ya,li=(Ha[1]-pr[1])/ya,Jn=(un[0]-pr[0])/Za,Pi=(un[1]-pr[1])/Za,ho=Pi*Bn-li*Jn,to=(S(ho)<.5?.5:1)/ho;if(Ot=(Br*Jn-Lr*Pi)*to,Xt=(Lr*li-Br*Bn)*to,tt+=Ot,dt+=Xt,S(Ot)0&&(Rt[1]*=1+Ot/1.5*Rt[0]*Rt[0]),Rt}return $e.invert=Se($e),$e}function qe(){return v.geoProjection(Ce()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ue(Le,Oe){var Ge=Le*d(Oe),$e=30,lt;do Oe-=lt=(Oe+d(Oe)-Ge)/(1+t(Oe));while(S(lt)>o&&--$e>0);return Oe/2}function xe(Le,Oe,Ge){function $e(lt,tt){return[Le*lt*t(tt=Ue(Ge,tt)),Oe*d(tt)]}return $e.invert=function(lt,tt){return tt=C(tt/Oe),[lt/(Le*t(tt)),C((2*tt+d(2*tt))/Ge)]},$e}var he=xe(A/T,A,M);function oe(){return v.geoProjection(he).scale(169.529)}var le=2.00276,ne=1.11072;function be(Le,Oe){var Ge=Ue(M,Oe);return[le*Le/(1/t(Oe)+ne/t(Ge)),(Oe+A*d(Ge))/le]}be.invert=function(Le,Oe){var Ge=le*Oe,$e=Oe<0?-E:E,lt=25,tt,dt;do dt=Ge-A*d($e),$e-=tt=(d(2*$e)+2*$e-M*d(dt))/(2*t(2*$e)+2+M*t(dt)*A*t($e));while(S(tt)>o&&--lt>0);return dt=Ge-A*d($e),[Le*(1/t(dt)+ne/t($e))/le,dt]};function Fe(){return v.geoProjection(be).scale(160.857)}function Ve(Le){var Oe=0,Ge=v.geoProjectionMutator(Le),$e=Ge(Oe);return $e.parallel=function(lt){return arguments.length?Ge(Oe=lt*_):Oe*b},$e}function je(Le,Oe){return[Le*t(Oe),Oe]}je.invert=function(Le,Oe){return[Le/t(Oe),Oe]};function ut(){return v.geoProjection(je).scale(152.63)}function st(Le){if(!Le)return je;var Oe=1/y(Le);function Ge($e,lt){var tt=Oe+Le-lt,dt=tt&&$e*t(lt)/tt;return[tt*d(dt),Oe-tt*t(dt)]}return Ge.invert=function($e,lt){var tt=R($e*$e+(lt=Oe-lt)*lt),dt=Oe+Le-tt;return[tt/t(dt)*e($e,lt),dt]},Ge}function yt(){return Ve(st).scale(123.082).center([0,26.1441]).parallel(45)}function At(Le){function Oe(Ge,$e){var lt=T-$e,tt=lt&&Ge*Le*d(lt)/lt;return[lt*d(tt)/Le,T-lt*t(tt)]}return Oe.invert=function(Ge,$e){var lt=Ge*Le,tt=T-$e,dt=R(lt*lt+tt*tt),Rt=e(lt,tt);return[(dt?dt/d(dt):1)*Rt/Le,T-dt]},Oe}function Pt(){var Le=.5,Oe=v.geoProjectionMutator(At),Ge=Oe(Le);return Ge.fraction=function($e){return arguments.length?Oe(Le=+$e):Le},Ge.scale(158.837)}var Zt=xe(1,4/M,M);function vr(){return v.geoProjection(Zt).scale(152.63)}function Nt(Le,Oe,Ge,$e,lt,tt){var dt=t(tt),Rt;if(S(Le)>1||S(tt)>1)Rt=F(Ge*lt+Oe*$e*dt);else{var Ot=d(Le/2),Xt=d(tt/2);Rt=2*C(R(Ot*Ot+Oe*$e*Xt*Xt))}return S(Rt)>o?[Rt,e($e*d(tt),Oe*lt-Ge*$e*dt)]:[0,0]}function Kt(Le,Oe,Ge){return F((Le*Le+Oe*Oe-Ge*Ge)/(2*Le*Oe))}function nt(Le){return Le-2*M*r((Le+M)/(2*M))}function Ee(Le,Oe,Ge){for(var $e=[[Le[0],Le[1],d(Le[1]),t(Le[1])],[Oe[0],Oe[1],d(Oe[1]),t(Oe[1])],[Ge[0],Ge[1],d(Ge[1]),t(Ge[1])]],lt=$e[2],tt,dt=0;dt<3;++dt,lt=tt)tt=$e[dt],lt.v=Nt(tt[1]-lt[1],lt[3],lt[2],tt[3],tt[2],tt[0]-lt[0]),lt.point=[0,0];var Rt=Kt($e[0].v[0],$e[2].v[0],$e[1].v[0]),Ot=Kt($e[0].v[0],$e[1].v[0],$e[2].v[0]),Xt=M-Rt;$e[2].point[1]=0,$e[0].point[0]=-($e[1].point[0]=$e[0].v[0]/2);var nr=[$e[2].point[0]=$e[0].point[0]+$e[2].v[0]*t(Rt),2*($e[0].point[1]=$e[1].point[1]=$e[2].v[0]*d(Rt))];function pr(Lr,Br){var Kr=d(Br),ya=t(Br),Za=new Array(3),Ha;for(Ha=0;Ha<3;++Ha){var un=$e[Ha];if(Za[Ha]=Nt(Br-un[1],un[3],un[2],ya,Kr,Lr-un[0]),!Za[Ha][0])return un.point;Za[Ha][1]=nt(Za[Ha][1]-un.v[1])}var Bn=nr.slice();for(Ha=0;Ha<3;++Ha){var li=Ha==2?0:Ha+1,Jn=Kt($e[Ha].v[0],Za[Ha][0],Za[li][0]);Za[Ha][1]<0&&(Jn=-Jn),Ha?Ha==1?(Jn=Ot-Jn,Bn[0]-=Za[Ha][0]*t(Jn),Bn[1]-=Za[Ha][0]*d(Jn)):(Jn=Xt-Jn,Bn[0]+=Za[Ha][0]*t(Jn),Bn[1]+=Za[Ha][0]*d(Jn)):(Bn[0]+=Za[Ha][0]*t(Jn),Bn[1]-=Za[Ha][0]*d(Jn))}return Bn[0]/=3,Bn[1]/=3,Bn}return pr}function ze(Le){return Le[0]*=_,Le[1]*=_,Le}function ve(){return _e([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function _e(Le,Oe,Ge){var $e=v.geoCentroid({type:"MultiPoint",coordinates:[Le,Oe,Ge]}),lt=[-$e[0],-$e[1]],tt=v.geoRotation(lt),dt=Ee(ze(tt(Le)),ze(tt(Oe)),ze(tt(Ge)));dt.invert=Se(dt);var Rt=v.geoProjection(dt).rotate(lt),Ot=Rt.center;return delete Rt.rotate,Rt.center=function(Xt){return arguments.length?Ot(tt(Xt)):tt.invert(Ot())},Rt.clipAngle(90)}function Ie(Le,Oe){var Ge=R(1-d(Oe));return[2/m*Le*Ge,m*(1-Ge)]}Ie.invert=function(Le,Oe){var Ge=(Ge=Oe/m-1)*Ge;return[Ge>0?Le*R(M/Ge)/2:0,C(1-Ge)]};function Be(){return v.geoProjection(Ie).scale(95.6464).center([0,30])}function We(Le){var Oe=y(Le);function Ge($e,lt){return[$e,($e?$e/d($e):1)*(d(lt)*t($e)-Oe*t(lt))]}return Ge.invert=Oe?function($e,lt){$e&&(lt*=d($e)/$e);var tt=t($e);return[$e,2*e(R(tt*tt+Oe*Oe-lt*lt)-tt,Oe-lt)]}:function($e,lt){return[$e,C($e?lt*y($e)/$e:lt)]},Ge}function Xe(){return Ve(We).scale(249.828).clipAngle(90)}var mt=R(3);function ft(Le,Oe){return[mt*Le*(2*t(2*Oe/3)-1)/m,mt*m*d(Oe/3)]}ft.invert=function(Le,Oe){var Ge=3*C(Oe/(mt*m));return[m*Le/(mt*(2*t(2*Ge/3)-1)),Ge]};function ht(){return v.geoProjection(ft).scale(156.19)}function gt(Le){var Oe=t(Le);function Ge($e,lt){return[$e*Oe,d(lt)/Oe]}return Ge.invert=function($e,lt){return[$e/Oe,C(lt*Oe)]},Ge}function _t(){return Ve(gt).parallel(38.58).scale(195.044)}function Ft(Le){var Oe=t(Le);function Ge($e,lt){return[$e*Oe,(1+Oe)*y(lt/2)]}return Ge.invert=function($e,lt){return[$e/Oe,l(lt/(1+Oe))*2]},Ge}function St(){return Ve(Ft).scale(124.75)}function hr(Le,Oe){var Ge=R(8/(3*M));return[Ge*Le*(1-S(Oe)/M),Ge*Oe]}hr.invert=function(Le,Oe){var Ge=R(8/(3*M)),$e=Oe/Ge;return[Le/(Ge*(1-S($e)/M)),$e]};function jr(){return v.geoProjection(hr).scale(165.664)}function ra(Le,Oe){var Ge=R(4-3*d(S(Oe)));return[2/R(6*M)*Le*Ge,f(Oe)*R(2*M/3)*(2-Ge)]}ra.invert=function(Le,Oe){var Ge=2-S(Oe)/R(2*M/3);return[Le*R(6*M)/(2*Ge),f(Oe)*C((4-Ge*Ge)/3)]};function $r(){return v.geoProjection(ra).scale(165.664)}function pa(Le,Oe){var Ge=R(M*(4+M));return[2/Ge*Le*(1+R(1-4*Oe*Oe/(M*M))),4/Ge*Oe]}pa.invert=function(Le,Oe){var Ge=R(M*(4+M))/2;return[Le*Ge/(1+R(1-Oe*Oe*(4+M)/(4*M))),Oe*Ge/2]};function oa(){return v.geoProjection(pa).scale(180.739)}function aa(Le,Oe){var Ge=(2+T)*d(Oe);Oe/=2;for(var $e=0,lt=1/0;$e<10&&S(lt)>o;$e++){var tt=t(Oe);Oe-=lt=(Oe+d(Oe)*(tt+2)-Ge)/(2*tt*(1+tt))}return[2/R(M*(4+M))*Le*(1+t(Oe)),2*R(M/(4+M))*d(Oe)]}aa.invert=function(Le,Oe){var Ge=Oe*R((4+M)/M)/2,$e=C(Ge),lt=t($e);return[Le/(2/R(M*(4+M))*(1+lt)),C(($e+Ge*(lt+2))/(2+T))]};function ka(){return v.geoProjection(aa).scale(180.739)}function Ta(Le,Oe){return[Le*(1+t(Oe))/R(2+M),2*Oe/R(2+M)]}Ta.invert=function(Le,Oe){var Ge=R(2+M),$e=Oe*Ge/2;return[Ge*Le/(1+t($e)),$e]};function Da(){return v.geoProjection(Ta).scale(173.044)}function La(Le,Oe){for(var Ge=(1+T)*d(Oe),$e=0,lt=1/0;$e<10&&S(lt)>o;$e++)Oe-=lt=(Oe+d(Oe)-Ge)/(1+t(Oe));return Ge=R(2+M),[Le*(1+t(Oe))/Ge,2*Oe/Ge]}La.invert=function(Le,Oe){var Ge=1+T,$e=R(Ge/2);return[Le*2*$e/(1+t(Oe*=$e)),C((Oe+d(Oe))/Ge)]};function Ga(){return v.geoProjection(La).scale(173.044)}var xa=3+2*A;function Gn(Le,Oe){var Ge=d(Le/=2),$e=t(Le),lt=R(t(Oe)),tt=t(Oe/=2),dt=d(Oe)/(tt+A*$e*lt),Rt=R(2/(1+dt*dt)),Ot=R((A*tt+($e+Ge)*lt)/(A*tt+($e-Ge)*lt));return[xa*(Rt*(Ot-1/Ot)-2*n(Ot)),xa*(Rt*dt*(Ot+1/Ot)-2*l(dt))]}Gn.invert=function(Le,Oe){if(!(tt=H.invert(Le/1.2,Oe*1.065)))return null;var Ge=tt[0],$e=tt[1],lt=20,tt;Le/=xa,Oe/=xa;do{var dt=Ge/2,Rt=$e/2,Ot=d(dt),Xt=t(dt),nr=d(Rt),pr=t(Rt),Lr=t($e),Br=R(Lr),Kr=nr/(pr+A*Xt*Br),ya=Kr*Kr,Za=R(2/(1+ya)),Ha=A*pr+(Xt+Ot)*Br,un=A*pr+(Xt-Ot)*Br,Bn=Ha/un,li=R(Bn),Jn=li-1/li,Pi=li+1/li,ho=Za*Jn-2*n(li)-Le,to=Za*Kr*Pi-2*l(Kr)-Oe,as=nr&&g*Br*Ot*ya/nr,Fo=(A*Xt*pr+Br)/(2*(pr+A*Xt*Br)*(pr+A*Xt*Br)*Br),Ms=-.5*Kr*Za*Za*Za,Ns=Ms*as,Vs=Ms*Fo,xs=(xs=2*pr+A*Br*(Xt-Ot))*xs*li,ks=(A*Xt*pr*Br+Lr)/xs,Cl=-(A*Ot*nr)/(Br*xs),mu=Jn*Ns-2*ks/li+Za*(ks+ks/Bn),Hl=Jn*Vs-2*Cl/li+Za*(Cl+Cl/Bn),el=Kr*Pi*Ns-2*as/(1+ya)+Za*Pi*as+Za*Kr*(ks-ks/Bn),Eu=Kr*Pi*Vs-2*Fo/(1+ya)+Za*Pi*Fo+Za*Kr*(Cl-Cl/Bn),gu=Hl*el-Eu*mu;if(!gu)break;var hl=(to*Hl-ho*Eu)/gu,Ll=(ho*el-to*mu)/gu;Ge-=hl,$e=i(-T,s(T,$e-Ll))}while((S(hl)>o||S(Ll)>o)&&--lt>0);return S(S($e)-T)$e){var pr=R(nr),Lr=e(Xt,Ot),Br=Ge*p(Lr/Ge),Kr=Lr-Br,ya=Le*t(Kr),Za=(Le*d(Kr)-Kr*d(ya))/(T-ya),Ha=Va(Kr,Za),un=(M-Le)/it(Ha,ya,M);Ot=pr;var Bn=50,li;do Ot-=li=(Le+it(Ha,ya,Ot)*un-pr)/(Ha(Ot)*un);while(S(li)>o&&--Bn>0);Xt=Kr*d(Ot),Ot$e){var Ot=R(Rt),Xt=e(dt,tt),nr=Ge*p(Xt/Ge),pr=Xt-nr;tt=Ot*t(pr),dt=Ot*d(pr);for(var Lr=tt-T,Br=d(tt),Kr=dt/Br,ya=tto||S(Kr)>o)&&--ya>0);return[pr,Lr]},Ot}var Yt=Jt(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function ar(){return v.geoProjection(Yt).scale(149.995)}var cr=Jt(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function tr(){return v.geoProjection(cr).scale(153.93)}var Je=Jt(5/6*M,-.62636,-.0344,0,1.3493,-.05524,0,.045);function bt(){return v.geoProjection(Je).scale(130.945)}function qt(Le,Oe){var Ge=Le*Le,$e=Oe*Oe;return[Le*(1-.162388*$e)*(.87-952426e-9*Ge*Ge),Oe*(1+$e/12)]}qt.invert=function(Le,Oe){var Ge=Le,$e=Oe,lt=50,tt;do{var dt=$e*$e;$e-=tt=($e*(1+dt/12)-Oe)/(1+dt/4)}while(S(tt)>o&&--lt>0);lt=50,Le/=1-.162388*dt;do{var Rt=(Rt=Ge*Ge)*Rt;Ge-=tt=(Ge*(.87-952426e-9*Rt)-Le)/(.87-.00476213*Rt)}while(S(tt)>o&&--lt>0);return[Ge,$e]};function Qt(){return v.geoProjection(qt).scale(131.747)}var br=Jt(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Ir(){return v.geoProjection(br).scale(131.087)}function Cr(Le){var Oe=Le(T,0)[0]-Le(-T,0)[0];function Ge($e,lt){var tt=$e>0?-.5:.5,dt=Le($e+tt*M,lt);return dt[0]-=tt*Oe,dt}return Le.invert&&(Ge.invert=function($e,lt){var tt=$e>0?-.5:.5,dt=Le.invert($e+tt*Oe,lt),Rt=dt[0]-tt*M;return Rt<-M?Rt+=2*M:Rt>M&&(Rt-=2*M),dt[0]=Rt,dt}),Ge}function Mr(Le,Oe){var Ge=f(Le),$e=f(Oe),lt=t(Oe),tt=t(Le)*lt,dt=d(Le)*lt,Rt=d($e*Oe);Le=S(e(dt,Rt)),Oe=C(tt),S(Le-T)>o&&(Le%=T);var Ot=Xr(Le>M/4?T-Le:Le,Oe);return Le>M/4&&(Rt=Ot[0],Ot[0]=-Ot[1],Ot[1]=-Rt),Ot[0]*=Ge,Ot[1]*=-$e,Ot}Mr.invert=function(Le,Oe){S(Le)>1&&(Le=f(Le)*2-Le),S(Oe)>1&&(Oe=f(Oe)*2-Oe);var Ge=f(Le),$e=f(Oe),lt=-Ge*Le,tt=-$e*Oe,dt=tt/lt<1,Rt=Ra(dt?tt:lt,dt?lt:tt),Ot=Rt[0],Xt=Rt[1],nr=t(Xt);return dt&&(Ot=-T-Ot),[Ge*(e(d(Ot)*nr,-d(Xt))+M),$e*C(t(Ot)*nr)]};function Xr(Le,Oe){if(Oe===T)return[0,0];var Ge=d(Oe),$e=Ge*Ge,lt=$e*$e,tt=1+lt,dt=1+3*lt,Rt=1-lt,Ot=C(1/R(tt)),Xt=Rt+$e*tt*Ot,nr=(1-Ge)/Xt,pr=R(nr),Lr=nr*tt,Br=R(Lr),Kr=pr*Rt,ya,Za;if(Le===0)return[0,-(Kr+$e*Br)];var Ha=t(Oe),un=1/Ha,Bn=2*Ge*Ha,li=(-3*$e+Ot*dt)*Bn,Jn=(-Xt*Ha-(1-Ge)*li)/(Xt*Xt),Pi=.5*Jn/pr,ho=Rt*Pi-2*$e*pr*Bn,to=$e*tt*Jn+nr*dt*Bn,as=-un*Bn,Fo=-un*to,Ms=-2*un*ho,Ns=4*Le/M,Vs;if(Le>.222*M||Oe.175*M){if(ya=(Kr+$e*R(Lr*(1+lt)-Kr*Kr))/(1+lt),Le>M/4)return[ya,ya];var xs=ya,ks=.5*ya;ya=.5*(ks+xs),Za=50;do{var Cl=R(Lr-ya*ya),mu=ya*(Ms+as*Cl)+Fo*C(ya/Br)-Ns;if(!mu)break;mu<0?ks=ya:xs=ya,ya=.5*(ks+xs)}while(S(xs-ks)>o&&--Za>0)}else{ya=o,Za=25;do{var Hl=ya*ya,el=R(Lr-Hl),Eu=Ms+as*el,gu=ya*Eu+Fo*C(ya/Br)-Ns,hl=Eu+(Fo-as*Hl)/el;ya-=Vs=el?gu/hl:0}while(S(Vs)>o&&--Za>0)}return[ya,-Kr-$e*R(Lr-ya*ya)]}function Ra(Le,Oe){for(var Ge=0,$e=1,lt=.5,tt=50;;){var dt=lt*lt,Rt=R(lt),Ot=C(1/R(1+dt)),Xt=1-dt+lt*(1+dt)*Ot,nr=(1-Rt)/Xt,pr=R(nr),Lr=nr*(1+dt),Br=pr*(1-dt),Kr=Lr-Le*Le,ya=R(Kr),Za=Oe+Br+lt*ya;if(S($e-Ge)0?Ge=lt:$e=lt,lt=.5*(Ge+$e)}if(!tt)return null;var Ha=C(Rt),un=t(Ha),Bn=1/un,li=2*Rt*un,Jn=(-3*lt+Ot*(1+3*dt))*li,Pi=(-Xt*un-(1-Rt)*Jn)/(Xt*Xt),ho=.5*Pi/pr,to=(1-dt)*ho-2*lt*pr*li,as=-2*Bn*to,Fo=-Bn*li,Ms=-Bn*(lt*(1+dt)*Pi+nr*(1+3*dt)*li);return[M/4*(Le*(as+Fo*ya)+Ms*C(Le/R(Lr))),Ha]}function wa(){return v.geoProjection(Cr(Mr)).scale(239.75)}function yn(Le,Oe,Ge){var $e,lt,tt;return Le?($e=fn(Le,Ge),Oe?(lt=fn(Oe,1-Ge),tt=lt[1]*lt[1]+Ge*$e[0]*$e[0]*lt[0]*lt[0],[[$e[0]*lt[2]/tt,$e[1]*$e[2]*lt[0]*lt[1]/tt],[$e[1]*lt[1]/tt,-$e[0]*$e[2]*lt[0]*lt[2]/tt],[$e[2]*lt[1]*lt[2]/tt,-Ge*$e[0]*$e[1]*lt[0]/tt]]):[[$e[0],0],[$e[1],0],[$e[2],0]]):(lt=fn(Oe,1-Ge),[[0,lt[0]/lt[1]],[1/lt[1],0],[lt[2]/lt[1],0]])}function fn(Le,Oe){var Ge,$e,lt,tt,dt;if(Oe=1-o)return Ge=(1-Oe)/4,$e=k(Le),tt=z(Le),lt=1/$e,dt=$e*D(Le),[tt+Ge*(dt-Le)/($e*$e),lt-Ge*tt*lt*(dt-Le),lt+Ge*tt*lt*(dt+Le),2*l(a(Le))-T+Ge*(dt-Le)/$e];var Rt=[1,0,0,0,0,0,0,0,0],Ot=[R(Oe),0,0,0,0,0,0,0,0],Xt=0;for($e=R(1-Oe),dt=1;S(Ot[Xt]/Rt[Xt])>o&&Xt<8;)Ge=Rt[Xt++],Ot[Xt]=(Ge-$e)/2,Rt[Xt]=(Ge+$e)/2,$e=R(Ge*$e),dt*=2;lt=dt*Rt[Xt]*Le;do tt=Ot[Xt]*d($e=lt)/Rt[Xt],lt=(C(tt)+lt)/2;while(--Xt);return[d(lt),tt=t(lt),tt/t(lt-$e),lt]}function ri(Le,Oe,Ge){var $e=S(Le),lt=S(Oe),tt=D(lt);if($e){var dt=1/d($e),Rt=1/(y($e)*y($e)),Ot=-(Rt+Ge*(tt*tt*dt*dt)-1+Ge),Xt=(Ge-1)*Rt,nr=(-Ot+R(Ot*Ot-4*Xt))/2;return[On(l(1/R(nr)),Ge)*f(Le),On(l(R((nr/Rt-1)/Ge)),1-Ge)*f(Oe)]}return[0,On(l(tt),1-Ge)*f(Oe)]}function On(Le,Oe){if(!Oe)return Le;if(Oe===1)return n(y(Le/2+E));for(var Ge=1,$e=R(1-Oe),lt=R(Oe),tt=0;S(lt)>o;tt++){if(Le%M){var dt=l($e*y(Le)/Ge);dt<0&&(dt+=M),Le+=dt+~~(Le/M)*M}else Le+=Le;lt=(Ge+$e)/2,$e=R(Ge*$e),lt=((Ge=lt)-$e)/2}return Le/(c(2,tt)*Ge)}function ui(Le,Oe){var Ge=(A-1)/(A+1),$e=R(1-Ge*Ge),lt=On(T,$e*$e),tt=-1,dt=n(y(M/4+S(Oe)/2)),Rt=a(tt*dt)/R(Ge),Ot=jn(Rt*t(tt*Le),Rt*d(tt*Le)),Xt=ri(Ot[0],Ot[1],$e*$e);return[-Xt[1],(Oe>=0?1:-1)*(.5*lt-Xt[0])]}function jn(Le,Oe){var Ge=Le*Le,$e=Oe+1,lt=1-Ge-Oe*Oe;return[.5*((Le>=0?T:-T)-e(lt,2*Le)),-.25*n(lt*lt+4*Ge)+.5*n($e*$e+Ge)]}function oo(Le,Oe){var Ge=Oe[0]*Oe[0]+Oe[1]*Oe[1];return[(Le[0]*Oe[0]+Le[1]*Oe[1])/Ge,(Le[1]*Oe[0]-Le[0]*Oe[1])/Ge]}ui.invert=function(Le,Oe){var Ge=(A-1)/(A+1),$e=R(1-Ge*Ge),lt=On(T,$e*$e),tt=-1,dt=yn(.5*lt-Oe,-Le,$e*$e),Rt=oo(dt[0],dt[1]),Ot=e(Rt[1],Rt[0])/tt;return[Ot,2*l(a(.5/tt*n(Ge*Rt[0]*Rt[0]+Ge*Rt[1]*Rt[1])))-T]};function Qi(){return v.geoProjection(Cr(ui)).scale(151.496)}function Mn(Le){var Oe=d(Le),Ge=t(Le),$e=bo(Le);$e.invert=bo(-Le);function lt(tt,dt){var Rt=$e(tt,dt);tt=Rt[0],dt=Rt[1];var Ot=d(dt),Xt=t(dt),nr=t(tt),pr=F(Oe*Ot+Ge*Xt*nr),Lr=d(pr),Br=S(Lr)>o?pr/Lr:1;return[Br*Ge*d(tt),(S(tt)>T?Br:-Br)*(Oe*Xt-Ge*Ot*nr)]}return lt.invert=function(tt,dt){var Rt=R(tt*tt+dt*dt),Ot=-d(Rt),Xt=t(Rt),nr=Rt*Xt,pr=-dt*Ot,Lr=Rt*Oe,Br=R(nr*nr+pr*pr-Lr*Lr),Kr=e(nr*Lr+pr*Br,pr*Lr-nr*Br),ya=(Rt>T?-1:1)*e(tt*Ot,Rt*t(Kr)*Xt+dt*d(Kr)*Ot);return $e.invert(ya,Kr)},lt}function bo(Le){var Oe=d(Le),Ge=t(Le);return function($e,lt){var tt=t(lt),dt=t($e)*tt,Rt=d($e)*tt,Ot=d(lt);return[e(Rt,dt*Ge-Ot*Oe),C(Ot*Ge+dt*Oe)]}}function so(){var Le=0,Oe=v.geoProjectionMutator(Mn),Ge=Oe(Le),$e=Ge.rotate,lt=Ge.stream,tt=v.geoCircle();return Ge.parallel=function(dt){if(!arguments.length)return Le*b;var Rt=Ge.rotate();return Oe(Le=dt*_).rotate(Rt)},Ge.rotate=function(dt){return arguments.length?($e.call(Ge,[dt[0],dt[1]-Le*b]),tt.center([-dt[0],-dt[1]]),Ge):(dt=$e.call(Ge),dt[1]+=Le*b,dt)},Ge.stream=function(dt){return dt=lt(dt),dt.sphere=function(){dt.polygonStart();var Rt=.01,Ot=tt.radius(90-Rt)().coordinates[0],Xt=Ot.length-1,nr=-1,pr;for(dt.lineStart();++nr=0;)dt.point((pr=Ot[nr])[0],pr[1]);dt.lineEnd(),dt.polygonEnd()},dt},Ge.scale(79.4187).parallel(45).clipAngle(180-.001)}var Hi=3,yo=C(1-1/Hi)*b,Bi=gt(0);function fo(Le){var Oe=yo*_,Ge=Ie(M,Oe)[0]-Ie(-M,Oe)[0],$e=Bi(0,Oe)[1],lt=Ie(0,Oe)[1],tt=m-lt,dt=h/Le,Rt=4/h,Ot=$e+tt*tt*4/h;function Xt(nr,pr){var Lr,Br=S(pr);if(Br>Oe){var Kr=s(Le-1,i(0,r((nr+M)/dt)));nr+=M*(Le-1)/Le-Kr*dt,Lr=Ie(nr,Br),Lr[0]=Lr[0]*h/Ge-h*(Le-1)/(2*Le)+Kr*h/Le,Lr[1]=$e+(Lr[1]-lt)*4*tt/h,pr<0&&(Lr[1]=-Lr[1])}else Lr=Bi(nr,pr);return Lr[0]*=Rt,Lr[1]/=Ot,Lr}return Xt.invert=function(nr,pr){nr/=Rt,pr*=Ot;var Lr=S(pr);if(Lr>$e){var Br=s(Le-1,i(0,r((nr+M)/dt)));nr=(nr+M*(Le-1)/Le-Br*dt)*Ge/h;var Kr=Ie.invert(nr,.25*(Lr-$e)*h/tt+lt);return Kr[0]-=M*(Le-1)/Le-Br*dt,pr<0&&(Kr[1]=-Kr[1]),Kr}return Bi.invert(nr,pr)},Xt}function Po(Le,Oe){return[Le,Oe&1?90-o:yo]}function po(Le,Oe){return[Le,Oe&1?-90+o:-yo]}function Kn(Le){return[Le[0]*(1-o),Le[1]]}function yi(Le){var Oe=[].concat(w.range(-180,180+Le/2,Le).map(Po),w.range(180,-180-Le/2,-Le).map(po));return{type:"Polygon",coordinates:[Le===180?Oe.map(Kn):Oe]}}function Yi(){var Le=4,Oe=v.geoProjectionMutator(fo),Ge=Oe(Le),$e=Ge.stream;return Ge.lobes=function(lt){return arguments.length?Oe(Le=+lt):Le},Ge.stream=function(lt){var tt=Ge.rotate(),dt=$e(lt),Rt=(Ge.rotate([0,0]),$e(lt));return Ge.rotate(tt),dt.sphere=function(){v.geoStream(yi(180/Le),Rt)},dt},Ge.scale(239.75)}function zi(Le){var Oe=1+Le,Ge=d(1/Oe),$e=C(Ge),lt=2*R(M/(tt=M+4*$e*Oe)),tt,dt=.5*lt*(Oe+R(Le*(2+Le))),Rt=Le*Le,Ot=Oe*Oe;function Xt(nr,pr){var Lr=1-d(pr),Br,Kr;if(Lr&&Lr<2){var ya=T-pr,Za=25,Ha;do{var un=d(ya),Bn=t(ya),li=$e+e(un,Oe-Bn),Jn=1+Ot-2*Oe*Bn;ya-=Ha=(ya-Rt*$e-Oe*un+Jn*li-.5*Lr*tt)/(2*Oe*un*li)}while(S(Ha)>x&&--Za>0);Br=lt*R(Jn),Kr=nr*li/M}else Br=lt*(Le+Lr),Kr=nr*$e/M;return[Br*d(Kr),dt-Br*t(Kr)]}return Xt.invert=function(nr,pr){var Lr=nr*nr+(pr-=dt)*pr,Br=(1+Ot-Lr/(lt*lt))/(2*Oe),Kr=F(Br),ya=d(Kr),Za=$e+e(ya,Oe-Br);return[C(nr/R(Lr))*M/Za,C(1-2*(Kr-Rt*$e-Oe*ya+(1+Ot-2*Oe*Br)*Za)/tt)]},Xt}function Uo(){var Le=1,Oe=v.geoProjectionMutator(zi),Ge=Oe(Le);return Ge.ratio=function($e){return arguments.length?Oe(Le=+$e):Le},Ge.scale(167.774).center([0,18.67])}var Co=.7109889596207567,Wo=.0528035274542;function Go(Le,Oe){return Oe>-Co?(Le=he(Le,Oe),Le[1]+=Wo,Le):je(Le,Oe)}Go.invert=function(Le,Oe){return Oe>-Co?he.invert(Le,Oe-Wo):je.invert(Le,Oe)};function ns(){return v.geoProjection(Go).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Ro(Le,Oe){return S(Oe)>Co?(Le=he(Le,Oe),Le[1]-=Oe>0?Wo:-Wo,Le):je(Le,Oe)}Ro.invert=function(Le,Oe){return S(Oe)>Co?he.invert(Le,Oe+(Oe>0?Wo:-Wo)):je.invert(Le,Oe)};function Zi(){return v.geoProjection(Ro).scale(152.63)}function ls(Le,Oe,Ge,$e){var lt=R(4*M/(2*Ge+(1+Le-Oe/2)*d(2*Ge)+(Le+Oe)/2*d(4*Ge)+Oe/2*d(6*Ge))),tt=R($e*d(Ge)*R((1+Le*t(2*Ge)+Oe*t(4*Ge))/(1+Le+Oe))),dt=Ge*Ot(1);function Rt(pr){return R(1+Le*t(2*pr)+Oe*t(4*pr))}function Ot(pr){var Lr=pr*Ge;return(2*Lr+(1+Le-Oe/2)*d(2*Lr)+(Le+Oe)/2*d(4*Lr)+Oe/2*d(6*Lr))/Ge}function Xt(pr){return Rt(pr)*d(pr)}var nr=function(pr,Lr){var Br=Ge*Ae(Ot,dt*d(Lr)/Ge,Lr/M);isNaN(Br)&&(Br=Ge*f(Lr));var Kr=lt*Rt(Br);return[Kr*tt*pr/M*t(Br),Kr/tt*d(Br)]};return nr.invert=function(pr,Lr){var Br=Ae(Xt,Lr*tt/lt);return[pr*M/(t(Br)*lt*tt*Rt(Br)),C(Ge*Ot(Br/Ge)/dt)]},Ge===0&&(lt=R($e/M),nr=function(pr,Lr){return[pr*lt,d(Lr)/lt]},nr.invert=function(pr,Lr){return[pr/lt,C(Lr*lt)]}),nr}function Eo(){var Le=1,Oe=0,Ge=45*_,$e=2,lt=v.geoProjectionMutator(ls),tt=lt(Le,Oe,Ge,$e);return tt.a=function(dt){return arguments.length?lt(Le=+dt,Oe,Ge,$e):Le},tt.b=function(dt){return arguments.length?lt(Le,Oe=+dt,Ge,$e):Oe},tt.psiMax=function(dt){return arguments.length?lt(Le,Oe,Ge=+dt*_,$e):Ge*b},tt.ratio=function(dt){return arguments.length?lt(Le,Oe,Ge,$e=+dt):$e},tt.scale(180.739)}function mo(Le,Oe,Ge,$e,lt,tt,dt,Rt,Ot,Xt,nr){if(nr.nanEncountered)return NaN;var pr,Lr,Br,Kr,ya,Za,Ha,un,Bn,li;if(pr=Ge-Oe,Lr=Le(Oe+pr*.25),Br=Le(Ge-pr*.25),isNaN(Lr)){nr.nanEncountered=!0;return}if(isNaN(Br)){nr.nanEncountered=!0;return}return Kr=pr*($e+4*Lr+lt)/12,ya=pr*(lt+4*Br+tt)/12,Za=Kr+ya,li=(Za-dt)/15,Xt>Ot?(nr.maxDepthCount++,Za+li):Math.abs(li)>1;do Ot[Za]>Br?ya=Za:Kr=Za,Za=Kr+ya>>1;while(Za>Kr);var Ha=Ot[Za+1]-Ot[Za];return Ha&&(Ha=(Br-Ot[Za+1])/Ha),(Za+1+Ha)/dt}var pr=2*nr(1)/M*tt/Ge,Lr=function(Br,Kr){var ya=nr(S(d(Kr))),Za=$e(ya)*Br;return ya/=pr,[Za,Kr>=0?ya:-ya]};return Lr.invert=function(Br,Kr){var ya;return Kr*=pr,S(Kr)<1&&(ya=f(Kr)*C(lt(S(Kr))*tt)),[Br/$e(S(Kr)),ya]},Lr}function Ds(){var Le=0,Oe=2.5,Ge=1.183136,$e=v.geoProjectionMutator(qo),lt=$e(Le,Oe,Ge);return lt.alpha=function(tt){return arguments.length?$e(Le=+tt,Oe,Ge):Le},lt.k=function(tt){return arguments.length?$e(Le,Oe=+tt,Ge):Oe},lt.gamma=function(tt){return arguments.length?$e(Le,Oe,Ge=+tt):Ge},lt.scale(152.63)}function Us(Le,Oe){return S(Le[0]-Oe[0])=0;--Ot)Ge=Le[1][Ot],$e=Ge[0][0],lt=Ge[0][1],tt=Ge[1][1],dt=Ge[2][0],Rt=Ge[2][1],Oe.push(is([[dt-o,Rt-o],[dt-o,tt+o],[$e+o,tt+o],[$e+o,lt-o]],30));return{type:"Polygon",coordinates:[w.merge(Oe)]}}function ml(Le,Oe,Ge){var $e,lt;function tt(Ot,Xt){for(var nr=Xt<0?-1:1,pr=Oe[+(Xt<0)],Lr=0,Br=pr.length-1;Lrpr[Lr][2][0];++Lr);var Kr=Le(Ot-pr[Lr][1][0],Xt);return Kr[0]+=Le(pr[Lr][1][0],nr*Xt>nr*pr[Lr][0][1]?pr[Lr][0][1]:Xt)[0],Kr}Ge?tt.invert=Ge(tt):Le.invert&&(tt.invert=function(Ot,Xt){for(var nr=lt[+(Xt<0)],pr=Oe[+(Xt<0)],Lr=0,Br=nr.length;LrKr&&(ya=Br,Br=Kr,Kr=ya),[[pr,Br],[Lr,Kr]]})}),dt):Oe.map(function(Xt){return Xt.map(function(nr){return[[nr[0][0]*b,nr[0][1]*b],[nr[1][0]*b,nr[1][1]*b],[nr[2][0]*b,nr[2][1]*b]]})})},Oe!=null&&dt.lobes(Oe),dt}var Qo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Gl(){return ml(be,Qo).scale(160.857)}var ys=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function $o(){return ml(Ro,ys).scale(152.63)}var wo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function go(){return ml(he,wo).scale(169.529)}var rs=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function $l(){return ml(he,rs).scale(169.529).rotate([20,0])}var cu=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function Kl(){return ml(Go,cu,Se).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var Wu=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function Yu(){return ml(je,Wu).scale(152.63).rotate([-20,0])}function rc(Le,Oe){return[3/h*Le*R(M*M/3-Oe*Oe),Oe]}rc.invert=function(Le,Oe){return[h/3*Le/R(M*M/3-Oe*Oe),Oe]};function ac(){return v.geoProjection(rc).scale(158.837)}function xc(Le){function Oe(Ge,$e){if(S(S($e)-T)2)return null;Ge/=2,$e/=2;var tt=Ge*Ge,dt=$e*$e,Rt=2*$e/(1+tt+dt);return Rt=c((1+Rt)/(1-Rt),1/Le),[e(2*Ge,1-tt-dt)/Le,C((Rt-1)/(Rt+1))]},Oe}function Ec(){var Le=.5,Oe=v.geoProjectionMutator(xc),Ge=Oe(Le);return Ge.spacing=function($e){return arguments.length?Oe(Le=+$e):Le},Ge.scale(124.75)}var fu=M/A;function hu(Le,Oe){return[Le*(1+R(t(Oe)))/2,Oe/(t(Oe/2)*t(Le/6))]}hu.invert=function(Le,Oe){var Ge=S(Le),$e=S(Oe),lt=o,tt=T;$eo||S(Za)>o)&&--lt>0);return lt&&[Ge,$e]};function Fs(){return v.geoProjection(Jl).scale(139.98)}function Yo(Le,Oe){return[d(Le)/t(Oe),y(Oe)*t(Le)]}Yo.invert=function(Le,Oe){var Ge=Le*Le,$e=Oe*Oe,lt=$e+1,tt=Ge+lt,dt=Le?g*R((tt-R(tt*tt-4*Ge))/Ge):1/R(lt);return[C(Le*dt),f(Oe)*F(dt)]};function tl(){return v.geoProjection(Yo).scale(144.049).clipAngle(90-.001)}function wu(Le){var Oe=t(Le),Ge=y(E+Le/2);function $e(lt,tt){var dt=tt-Le,Rt=S(dt)=0;)nr=Le[Xt],pr=nr[0]+Rt*(Br=pr)-Ot*Lr,Lr=nr[1]+Rt*Lr+Ot*Br;return pr=Rt*(Br=pr)-Ot*Lr,Lr=Rt*Lr+Ot*Br,[pr,Lr]}return Ge.invert=function($e,lt){var tt=20,dt=$e,Rt=lt;do{for(var Ot=Oe,Xt=Le[Ot],nr=Xt[0],pr=Xt[1],Lr=0,Br=0,Kr;--Ot>=0;)Xt=Le[Ot],Lr=nr+dt*(Kr=Lr)-Rt*Br,Br=pr+dt*Br+Rt*Kr,nr=Xt[0]+dt*(Kr=nr)-Rt*pr,pr=Xt[1]+dt*pr+Rt*Kr;Lr=nr+dt*(Kr=Lr)-Rt*Br,Br=pr+dt*Br+Rt*Kr,nr=dt*(Kr=nr)-Rt*pr-$e,pr=dt*pr+Rt*Kr-lt;var ya=Lr*Lr+Br*Br,Za,Ha;dt-=Za=(nr*Lr+pr*Br)/ya,Rt-=Ha=(pr*Lr-nr*Br)/ya}while(S(Za)+S(Ha)>o*o&&--tt>0);if(tt){var un=R(dt*dt+Rt*Rt),Bn=2*l(un*.5),li=d(Bn);return[e(dt*li,un*t(Bn)),un?C(Rt*li/un):0]}},Ge}var Io=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],$f=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Vo=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],qi=[[.9245,0],[0,0],[.01943,0]],Zu=[[.721316,0],[0,0],[-.00881625,-.00617325]];function bc(){return rl(Io,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function El(){return rl($f,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function mf(){return rl(Vo,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Au(){return rl(qi,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function nc(){return rl(Zu,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function rl(Le,Oe){var Ge=v.geoProjection(Zf(Le)).rotate(Oe).clipAngle(90),$e=v.geoRotation(Oe),lt=Ge.center;return delete Ge.rotate,Ge.center=function(tt){return arguments.length?lt($e(tt)):$e.invert(lt())},Ge}var gf=R(6),Yc=R(7);function ic(Le,Oe){var Ge=C(7*d(Oe)/(3*gf));return[gf*Le*(2*t(2*Ge/3)-1)/Yc,9*d(Ge/3)/Yc]}ic.invert=function(Le,Oe){var Ge=3*C(Oe*Yc/9);return[Le*Yc/(gf*(2*t(2*Ge/3)-1)),C(d(Ge)*3*gf/7)]};function oc(){return v.geoProjection(ic).scale(164.859)}function Xc(Le,Oe){for(var Ge=(1+g)*d(Oe),$e=Oe,lt=0,tt;lt<25&&($e-=tt=(d($e/2)+d($e)-Ge)/(.5*t($e/2)+t($e)),!(S(tt)x&&--$e>0);return tt=Ge*Ge,dt=tt*tt,Rt=tt*dt,[Le/(.84719-.13063*tt+Rt*Rt*(-.04515+.05494*tt-.02326*dt+.00331*Rt)),Ge]};function sc(){return v.geoProjection(eu).scale(175.295)}function qs(Le,Oe){return[Le*(1+t(Oe))/2,2*(Oe-y(Oe/2))]}qs.invert=function(Le,Oe){for(var Ge=Oe/2,$e=0,lt=1/0;$e<10&&S(lt)>o;++$e){var tt=t(Oe/2);Oe-=lt=(Oe-y(Oe/2)-Ge)/(1-.5/(tt*tt))}return[2*Le/(1+t(Oe)),Oe]};function lc(){return v.geoProjection(qs).scale(152.63)}var Fu=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ko(){return ml(ce(1/0),Fu).rotate([20,0]).scale(152.63)}function Lc(Le,Oe){var Ge=d(Oe),$e=t(Oe),lt=f(Le);if(Le===0||S(Oe)===T)return[0,Oe];if(Oe===0)return[Le,0];if(S(Le)===T)return[Le*$e,T*Ge];var tt=M/(2*Le)-2*Le/M,dt=2*Oe/M,Rt=(1-dt*dt)/(Ge-dt),Ot=tt*tt,Xt=Rt*Rt,nr=1+Ot/Xt,pr=1+Xt/Ot,Lr=(tt*Ge/Rt-tt/2)/nr,Br=(Xt*Ge/Ot+Rt/2)/pr,Kr=Lr*Lr+$e*$e/nr,ya=Br*Br-(Xt*Ge*Ge/Ot+Rt*Ge-1)/pr;return[T*(Lr+R(Kr)*lt),T*(Br+R(ya<0?0:ya)*f(-Oe*tt)*lt)]}Lc.invert=function(Le,Oe){Le/=T,Oe/=T;var Ge=Le*Le,$e=Oe*Oe,lt=Ge+$e,tt=M*M;return[Le?(lt-1+R((1-lt)*(1-lt)+4*Ge))/(2*Le)*T:0,Ae(function(dt){return lt*(M*d(dt)-2*dt)*M+4*dt*dt*(Oe-d(dt))+2*M*dt-tt*Oe},0)]};function Kf(){return v.geoProjection(Lc).scale(127.267)}var yf=1.0148,$u=.23185,_f=-.14499,Pc=.02406,Jf=yf,Gs=5*$u,tu=7*_f,xf=9*Pc,Es=1.790857183;function zu(Le,Oe){var Ge=Oe*Oe;return[Le,Oe*(yf+Ge*Ge*($u+Ge*(_f+Pc*Ge)))]}zu.invert=function(Le,Oe){Oe>Es?Oe=Es:Oe<-Es&&(Oe=-Es);var Ge=Oe,$e;do{var lt=Ge*Ge;Ge-=$e=(Ge*(yf+lt*lt*($u+lt*(_f+Pc*lt)))-Oe)/(Jf+lt*lt*(Gs+lt*(tu+xf*lt)))}while(S($e)>o);return[Le,Ge]};function Fl(){return v.geoProjection(zu).scale(139.319)}function Ku(Le,Oe){if(S(Oe)o&&--lt>0);return dt=y($e),[(S(Oe)=0;)if($e=Oe[Rt],Ge[0]===$e[0]&&Ge[1]===$e[1]){if(tt)return[tt,Ge];tt=Ge}}}function $s(Le){for(var Oe=Le.length,Ge=[],$e=Le[Oe-1],lt=0;lt0?[-$e[0],0]:[180-$e[0],180])};var Oe=Kc.map(function(Ge){return{face:Ge,project:Le(Ge)}});return[-1,0,0,1,0,1,4,5].forEach(function(Ge,$e){var lt=Oe[Ge];lt&&(lt.children||(lt.children=[])).push(Oe[$e])}),Ac(Oe[0],function(Ge,$e){return Oe[Ge<-M/2?$e<0?6:4:Ge<0?$e<0?2:0:Ge$e^Br>$e&&Ge<(Lr-Xt)*($e-nr)/(Br-nr)+Xt&&(lt=!lt)}return lt}function wf(Le,Oe){var Ge=Oe.stream,$e;if(!Ge)throw new Error("invalid projection");switch(Le&&Le.type){case"Feature":$e=Ic;break;case"FeatureCollection":$e=eh;break;default:$e=Dc;break}return $e(Le,Ge)}function eh(Le,Oe){return{type:"FeatureCollection",features:Le.features.map(function(Ge){return Ic(Ge,Oe)})}}function Ic(Le,Oe){return{type:"Feature",id:Le.id,properties:Le.properties,geometry:Dc(Le.geometry,Oe)}}function Af(Le,Oe){return{type:"GeometryCollection",geometries:Le.geometries.map(function(Ge){return Dc(Ge,Oe)})}}function Dc(Le,Oe){if(!Le)return null;if(Le.type==="GeometryCollection")return Af(Le,Oe);var Ge;switch(Le.type){case"Point":Ge=Tf;break;case"MultiPoint":Ge=Tf;break;case"LineString":Ge=th;break;case"MultiLineString":Ge=th;break;case"Polygon":Ge=Fc;break;case"MultiPolygon":Ge=Fc;break;case"Sphere":Ge=Fc;break;default:return null}return v.geoStream(Le,Oe(Ge)),Ge.result()}var yl=[],Mu=[],Tf={point:function(Le,Oe){yl.push([Le,Oe])},result:function(){var Le=yl.length?yl.length<2?{type:"Point",coordinates:yl[0]}:{type:"MultiPoint",coordinates:yl}:null;return yl=[],Le}},th={lineStart:Qu,point:function(Le,Oe){yl.push([Le,Oe])},lineEnd:function(){yl.length&&(Mu.push(yl),yl=[])},result:function(){var Le=Mu.length?Mu.length<2?{type:"LineString",coordinates:Mu[0]}:{type:"MultiLineString",coordinates:Mu}:null;return Mu=[],Le}},Fc={polygonStart:Qu,lineStart:Qu,point:function(Le,Oe){yl.push([Le,Oe])},lineEnd:function(){var Le=yl.length;if(Le){do yl.push(yl[0].slice());while(++Le<4);Mu.push(yl),yl=[]}},polygonEnd:Qu,result:function(){if(!Mu.length)return null;var Le=[],Oe=[];return Mu.forEach(function(Ge){ef(Ge)?Le.push([Ge]):Oe.push(Ge)}),Oe.forEach(function(Ge){var $e=Ge[0];Le.some(function(lt){if(tf(lt[0],$e))return lt.push(Ge),!0})||Le.push([Ge])}),Mu=[],Le.length?Le.length>1?{type:"MultiPolygon",coordinates:Le}:{type:"Polygon",coordinates:Le[0]}:null}};function Ou(Le){var Oe=Le(T,0)[0]-Le(-T,0)[0];function Ge($e,lt){var tt=S($e)0?$e-M:$e+M,lt),Rt=(dt[0]-dt[1])*g,Ot=(dt[0]+dt[1])*g;if(tt)return[Rt,Ot];var Xt=Oe*g,nr=Rt>0^Ot>0?-1:1;return[nr*Rt-f(Ot)*Xt,nr*Ot-f(Rt)*Xt]}return Le.invert&&(Ge.invert=function($e,lt){var tt=($e+lt)*g,dt=(lt-$e)*g,Rt=S(tt)<.5*Oe&&S(dt)<.5*Oe;if(!Rt){var Ot=Oe*g,Xt=tt>0^dt>0?-1:1,nr=-Xt*$e+(dt>0?1:-1)*Ot,pr=-Xt*lt+(tt>0?1:-1)*Ot;tt=(-nr-pr)*g,dt=(nr-pr)*g}var Lr=Le.invert(tt,dt);return Rt||(Lr[0]+=tt>0?M:-M),Lr}),v.geoProjection(Ge).rotate([-90,-90,45]).clipAngle(180-.001)}function Tt(){return Ou(Mr).scale(176.423)}function jt(){return Ou(ui).scale(111.48)}function yr(Le,Oe){if(!(0<=(Oe=+Oe)&&Oe<=20))throw new Error("invalid digits");function Ge(Xt){var nr=Xt.length,pr=2,Lr=new Array(nr);for(Lr[0]=+Xt[0].toFixed(Oe),Lr[1]=+Xt[1].toFixed(Oe);pr2||Br[0]!=nr[0]||Br[1]!=nr[1])&&(pr.push(Br),nr=Br)}return pr.length===1&&Xt.length>1&&pr.push(Ge(Xt[Xt.length-1])),pr}function tt(Xt){return Xt.map(lt)}function dt(Xt){if(Xt==null)return Xt;var nr;switch(Xt.type){case"GeometryCollection":nr={type:"GeometryCollection",geometries:Xt.geometries.map(dt)};break;case"Point":nr={type:"Point",coordinates:Ge(Xt.coordinates)};break;case"MultiPoint":nr={type:Xt.type,coordinates:$e(Xt.coordinates)};break;case"LineString":nr={type:Xt.type,coordinates:lt(Xt.coordinates)};break;case"MultiLineString":case"Polygon":nr={type:Xt.type,coordinates:tt(Xt.coordinates)};break;case"MultiPolygon":nr={type:"MultiPolygon",coordinates:Xt.coordinates.map(tt)};break;default:return Xt}return Xt.bbox!=null&&(nr.bbox=Xt.bbox),nr}function Rt(Xt){var nr={type:"Feature",properties:Xt.properties,geometry:dt(Xt.geometry)};return Xt.id!=null&&(nr.id=Xt.id),Xt.bbox!=null&&(nr.bbox=Xt.bbox),nr}if(Le!=null)switch(Le.type){case"Feature":return Rt(Le);case"FeatureCollection":{var Ot={type:"FeatureCollection",features:Le.features.map(Rt)};return Le.bbox!=null&&(Ot.bbox=Le.bbox),Ot}default:return dt(Le)}return Le}function dr(Le){var Oe=d(Le);function Ge($e,lt){var tt=Oe?y($e*Oe/2)/Oe:$e/2;if(!lt)return[2*tt,-Le];var dt=2*l(tt*d(lt)),Rt=1/y(lt);return[d(dt)*Rt,lt+(1-t(dt))*Rt-Le]}return Ge.invert=function($e,lt){if(S(lt+=Le)o&&--Rt>0);var Lr=$e*(Xt=y(dt)),Br=y(S(lt)0?T:-T)*(Ot+lt*(nr-dt)/2+lt*lt*(nr-2*Ot+dt)/2)]}za.invert=function(Le,Oe){var Ge=Oe/T,$e=Ge*90,lt=s(18,S($e/5)),tt=i(0,r(lt));do{var dt=ma[tt][1],Rt=ma[tt+1][1],Ot=ma[s(19,tt+2)][1],Xt=Ot-dt,nr=Ot-2*Rt+dt,pr=2*(S(Ge)-Rt)/Xt,Lr=nr/Xt,Br=pr*(1-Lr*pr*(1-2*Lr*pr));if(Br>=0||tt===1){$e=(Oe>=0?5:-5)*(Br+lt);var Kr=50,ya;do lt=s(18,S($e)/5),tt=r(lt),Br=lt-tt,dt=ma[tt][1],Rt=ma[tt+1][1],Ot=ma[s(19,tt+2)][1],$e-=(ya=(Oe>=0?T:-T)*(Rt+Br*(Ot-dt)/2+Br*Br*(Ot-2*Rt+dt)/2)-Oe)*b;while(S(ya)>x&&--Kr>0);break}}while(--tt>=0);var Za=ma[tt][0],Ha=ma[tt+1][0],un=ma[s(19,tt+2)][0];return[Le/(Ha+Br*(un-Za)/2+Br*Br*(un-2*Ha+Za)/2),$e*_]};function Ja(){return v.geoProjection(za).scale(152.63)}function nn(Le){function Oe(Ge,$e){var lt=t($e),tt=(Le-1)/(Le-lt*t(Ge));return[tt*lt*d(Ge),tt*d($e)]}return Oe.invert=function(Ge,$e){var lt=Ge*Ge+$e*$e,tt=R(lt),dt=(Le-R(1-lt*(Le+1)/(Le-1)))/((Le-1)/tt+tt/(Le-1));return[e(Ge*dt,tt*R(1-dt*dt)),tt?C($e*dt/tt):0]},Oe}function Tn(Le,Oe){var Ge=nn(Le);if(!Oe)return Ge;var $e=t(Oe),lt=d(Oe);function tt(dt,Rt){var Ot=Ge(dt,Rt),Xt=Ot[1],nr=Xt*lt/(Le-1)+$e;return[Ot[0]*$e/nr,Xt/nr]}return tt.invert=function(dt,Rt){var Ot=(Le-1)/(Le-1-Rt*lt);return Ge.invert(Ot*dt,Ot*Rt*$e)},tt}function Ba(){var Le=2,Oe=0,Ge=v.geoProjectionMutator(Tn),$e=Ge(Le,Oe);return $e.distance=function(lt){return arguments.length?Ge(Le=+lt,Oe):Le},$e.tilt=function(lt){return arguments.length?Ge(Le,Oe=lt*_):Oe*b},$e.scale(432.147).clipAngle(F(1/Le)*b-1e-6)}var Na=1e-4,Xa=1e4,Aa=-180,Fn=Aa+Na,ci=180,pi=ci-Na,fi=-90,Ti=fi+Na,Un=90,_n=Un-Na;function Oi(Le){return Le.length>0}function ao(Le){return Math.floor(Le*Xa)/Xa}function Lo(Le){return Le===fi||Le===Un?[0,Le]:[Aa,ao(Le)]}function us(Le){var Oe=Le[0],Ge=Le[1],$e=!1;return Oe<=Fn?(Oe=Aa,$e=!0):Oe>=pi&&(Oe=ci,$e=!0),Ge<=Ti?(Ge=fi,$e=!0):Ge>=_n&&(Ge=Un,$e=!0),$e?[Oe,Ge]:Le}function Oo(Le){return Le.map(us)}function _s(Le,Oe,Ge){for(var $e=0,lt=Le.length;$e=pi||nr<=Ti||nr>=_n){tt[dt]=us(Ot);for(var pr=dt+1;prFn&&BrTi&&Kr<_n)break}if(pr===dt+1)continue;if(dt){var ya={index:-1,polygon:Oe,ring:tt.slice(0,dt+1)};ya.ring[ya.ring.length-1]=Lo(nr),Ge[Ge.length-1]=ya}else Ge.pop();if(pr>=Rt)break;Ge.push({index:-1,polygon:Oe,ring:tt=tt.slice(pr-1)}),tt[0]=Lo(tt[0][1]),dt=-1,Rt=tt.length}}}}function ko(Le){var Oe,Ge=Le.length,$e={},lt={},tt,dt,Rt,Ot,Xt;for(Oe=0;Oe0?M-Rt:Rt)*b],Xt=v.geoProjection(Le(dt)).rotate(Ot),nr=v.geoRotation(Ot),pr=Xt.center;return delete Xt.rotate,Xt.center=function(Lr){return arguments.length?pr(nr(Lr)):nr.invert(pr())},Xt.clipAngle(90)}function Do(Le){var Oe=t(Le);function Ge($e,lt){var tt=v.geoGnomonicRaw($e,lt);return tt[0]*=Oe,tt}return Ge.invert=function($e,lt){return v.geoGnomonicRaw.invert($e/Oe,lt)},Ge}function al(){return pu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function pu(Le,Oe){return os(Do,Le,Oe)}function au(Le){if(!(Le*=2))return v.geoAzimuthalEquidistantRaw;var Oe=-Le/2,Ge=-Oe,$e=Le*Le,lt=y(Ge),tt=.5/d(Ge);function dt(Rt,Ot){var Xt=F(t(Ot)*t(Rt-Oe)),nr=F(t(Ot)*t(Rt-Ge)),pr=Ot<0?-1:1;return Xt*=Xt,nr*=nr,[(Xt-nr)/(2*Le),pr*R(4*$e*nr-($e-Xt+nr)*($e-Xt+nr))/(2*Le)]}return dt.invert=function(Rt,Ot){var Xt=Ot*Ot,nr=t(R(Xt+(Lr=Rt+Oe)*Lr)),pr=t(R(Xt+(Lr=Rt+Ge)*Lr)),Lr,Br;return[e(Br=nr-pr,Lr=(nr+pr)*lt),(Ot<0?-1:1)*F(R(Lr*Lr+Br*Br)*tt)]},dt}function Nu(){return _l([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function _l(Le,Oe){return os(au,Le,Oe)}function Su(Le,Oe){if(S(Oe)o&&--Rt>0);return[f(Le)*(R(lt*lt+4)+lt)*M/4,T*dt]};function nu(){return v.geoProjection(zc).scale(127.16)}function Me(Le,Oe,Ge,$e,lt){function tt(dt,Rt){var Ot=Ge*d($e*Rt),Xt=R(1-Ot*Ot),nr=R(2/(1+Xt*t(dt*=lt)));return[Le*Xt*nr*d(dt),Oe*Ot*nr]}return tt.invert=function(dt,Rt){var Ot=dt/Le,Xt=Rt/Oe,nr=R(Ot*Ot+Xt*Xt),pr=2*C(nr/2);return[e(dt*y(pr),Le*nr)/lt,nr&&C(Rt*d(pr)/(Oe*Ge*nr))/$e]},tt}function L(Le,Oe,Ge,$e){var lt=M/3;Le=i(Le,o),Oe=i(Oe,o),Le=s(Le,T),Oe=s(Oe,M-o),Ge=i(Ge,0),Ge=s(Ge,100-o),$e=i($e,o);var tt=Ge/100+1,dt=$e/100,Rt=F(tt*t(lt))/lt,Ot=d(Le)/d(Rt*T),Xt=Oe/M,nr=R(dt*d(Le/2)/d(Oe/2)),pr=nr/R(Xt*Ot*Rt),Lr=1/(nr*R(Xt*Ot*Rt));return Me(pr,Lr,Ot,Rt,Xt)}function J(){var Le=65*_,Oe=60*_,Ge=20,$e=200,lt=v.geoProjectionMutator(L),tt=lt(Le,Oe,Ge,$e);return tt.poleline=function(dt){return arguments.length?lt(Le=+dt*_,Oe,Ge,$e):Le*b},tt.parallels=function(dt){return arguments.length?lt(Le,Oe=+dt*_,Ge,$e):Oe*b},tt.inflation=function(dt){return arguments.length?lt(Le,Oe,Ge=+dt,$e):Ge},tt.ratio=function(dt){return arguments.length?lt(Le,Oe,Ge,$e=+dt):$e},tt.scale(163.775)}function de(){return J().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var pe=4*M+3*R(3),Te=2*R(2*M*R(3)/pe),Ze=xe(Te*R(3)/M,Te,pe/6);function rt(){return v.geoProjection(Ze).scale(176.84)}function vt(Le,Oe){return[Le*R(1-3*Oe*Oe/(M*M)),Oe]}vt.invert=function(Le,Oe){return[Le/R(1-3*Oe*Oe/(M*M)),Oe]};function Mt(){return v.geoProjection(vt).scale(152.63)}function Gt(Le,Oe){var Ge=t(Oe),$e=t(Le)*Ge,lt=1-$e,tt=t(Le=e(d(Le)*Ge,-d(Oe))),dt=d(Le);return Ge=R(1-$e*$e),[dt*Ge-tt*lt,-tt*Ge-dt*lt]}Gt.invert=function(Le,Oe){var Ge=(Le*Le+Oe*Oe)/-2,$e=R(-Ge*(2+Ge)),lt=Oe*Ge+Le*$e,tt=Le*Ge-Oe*$e,dt=R(tt*tt+lt*lt);return[e($e*lt,dt*(1+Ge)),dt?-C($e*tt/dt):0]};function Ht(){return v.geoProjection(Gt).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function fr(Le,Oe){var Ge=ee(Le,Oe);return[(Ge[0]+Le/T)/2,(Ge[1]+Oe)/2]}fr.invert=function(Le,Oe){var Ge=Le,$e=Oe,lt=25;do{var tt=t($e),dt=d($e),Rt=d(2*$e),Ot=dt*dt,Xt=tt*tt,nr=d(Ge),pr=t(Ge/2),Lr=d(Ge/2),Br=Lr*Lr,Kr=1-Xt*pr*pr,ya=Kr?F(tt*pr)*R(Za=1/Kr):Za=0,Za,Ha=.5*(2*ya*tt*Lr+Ge/T)-Le,un=.5*(ya*dt+$e)-Oe,Bn=.5*Za*(Xt*Br+ya*tt*pr*Ot)+.5/T,li=Za*(nr*Rt/4-ya*dt*Lr),Jn=.125*Za*(Rt*Lr-ya*dt*Xt*nr),Pi=.5*Za*(Ot*pr+ya*Br*tt)+.5,ho=li*Jn-Pi*Bn,to=(un*li-Ha*Pi)/ho,as=(Ha*Jn-un*Bn)/ho;Ge-=to,$e-=as}while((S(to)>o||S(as)>o)&&--lt>0);return[Ge,$e]};function wr(){return v.geoProjection(fr).scale(158.837)}u.geoNaturalEarth=v.geoNaturalEarth1,u.geoNaturalEarthRaw=v.geoNaturalEarth1Raw,u.geoAiry=Y,u.geoAiryRaw=q,u.geoAitoff=te,u.geoAitoffRaw=ee,u.geoArmadillo=U,u.geoArmadilloRaw=ae,u.geoAugust=K,u.geoAugustRaw=H,u.geoBaker=Z,u.geoBakerRaw=X,u.geoBerghaus=re,u.geoBerghausRaw=Q,u.geoBertin1953=qe,u.geoBertin1953Raw=Ce,u.geoBoggs=Fe,u.geoBoggsRaw=be,u.geoBonne=yt,u.geoBonneRaw=st,u.geoBottomley=Pt,u.geoBottomleyRaw=At,u.geoBromley=vr,u.geoBromleyRaw=Zt,u.geoChamberlin=_e,u.geoChamberlinRaw=Ee,u.geoChamberlinAfrica=ve,u.geoCollignon=Be,u.geoCollignonRaw=Ie,u.geoCraig=Xe,u.geoCraigRaw=We,u.geoCraster=ht,u.geoCrasterRaw=ft,u.geoCylindricalEqualArea=_t,u.geoCylindricalEqualAreaRaw=gt,u.geoCylindricalStereographic=St,u.geoCylindricalStereographicRaw=Ft,u.geoEckert1=jr,u.geoEckert1Raw=hr,u.geoEckert2=$r,u.geoEckert2Raw=ra,u.geoEckert3=oa,u.geoEckert3Raw=pa,u.geoEckert4=ka,u.geoEckert4Raw=aa,u.geoEckert5=Da,u.geoEckert5Raw=Ta,u.geoEckert6=Ga,u.geoEckert6Raw=La,u.geoEisenlohr=Pn,u.geoEisenlohrRaw=Gn,u.geoFahey=Zn,u.geoFaheyRaw=Yn,u.geoFoucaut=Dn,u.geoFoucautRaw=vi,u.geoFoucautSinusoidal=on,u.geoFoucautSinusoidalRaw=oi,u.geoGilbert=Li,u.geoGingery=Qe,u.geoGingeryRaw=$a,u.geoGinzburg4=ar,u.geoGinzburg4Raw=Yt,u.geoGinzburg5=tr,u.geoGinzburg5Raw=cr,u.geoGinzburg6=bt,u.geoGinzburg6Raw=Je,u.geoGinzburg8=Qt,u.geoGinzburg8Raw=qt,u.geoGinzburg9=Ir,u.geoGinzburg9Raw=br,u.geoGringorten=wa,u.geoGringortenRaw=Mr,u.geoGuyou=Qi,u.geoGuyouRaw=ui,u.geoHammer=ye,u.geoHammerRaw=ce,u.geoHammerRetroazimuthal=so,u.geoHammerRetroazimuthalRaw=Mn,u.geoHealpix=Yi,u.geoHealpixRaw=fo,u.geoHill=Uo,u.geoHillRaw=zi,u.geoHomolosine=Zi,u.geoHomolosineRaw=Ro,u.geoHufnagel=Eo,u.geoHufnagelRaw=ls,u.geoHyperelliptical=Ds,u.geoHyperellipticalRaw=qo,u.geoInterrupt=ml,u.geoInterruptedBoggs=Gl,u.geoInterruptedHomolosine=$o,u.geoInterruptedMollweide=go,u.geoInterruptedMollweideHemispheres=$l,u.geoInterruptedSinuMollweide=Kl,u.geoInterruptedSinusoidal=Yu,u.geoKavrayskiy7=ac,u.geoKavrayskiy7Raw=rc,u.geoLagrange=Ec,u.geoLagrangeRaw=xc,u.geoLarrivee=du,u.geoLarriveeRaw=hu,u.geoLaskowski=Fs,u.geoLaskowskiRaw=Jl,u.geoLittrow=tl,u.geoLittrowRaw=Yo,u.geoLoximuthal=Xu,u.geoLoximuthalRaw=wu,u.geoMiller=zs,u.geoMillerRaw=kc,u.geoModifiedStereographic=rl,u.geoModifiedStereographicRaw=Zf,u.geoModifiedStereographicAlaska=bc,u.geoModifiedStereographicGs48=El,u.geoModifiedStereographicGs50=mf,u.geoModifiedStereographicMiller=Au,u.geoModifiedStereographicLee=nc,u.geoMollweide=oe,u.geoMollweideRaw=he,u.geoMtFlatPolarParabolic=oc,u.geoMtFlatPolarParabolicRaw=ic,u.geoMtFlatPolarQuartic=Zc,u.geoMtFlatPolarQuarticRaw=Xc,u.geoMtFlatPolarSinusoidal=Cc,u.geoMtFlatPolarSinusoidalRaw=Ql,u.geoNaturalEarth2=sc,u.geoNaturalEarth2Raw=eu,u.geoNellHammer=lc,u.geoNellHammerRaw=qs,u.geoInterruptedQuarticAuthalic=Ko,u.geoNicolosi=Kf,u.geoNicolosiRaw=Lc,u.geoPatterson=Fl,u.geoPattersonRaw=zu,u.geoPolyconic=wc,u.geoPolyconicRaw=Ku,u.geoPolyhedral=Ac,u.geoPolyhedralButterfly=hs,u.geoPolyhedralCollignon=Jc,u.geoPolyhedralWaterman=Qc,u.geoProject=wf,u.geoGringortenQuincuncial=Tt,u.geoPeirceQuincuncial=jt,u.geoPierceQuincuncial=jt,u.geoQuantize=yr,u.geoQuincuncial=Ou,u.geoRectangularPolyconic=Wr,u.geoRectangularPolyconicRaw=dr,u.geoRobinson=Ja,u.geoRobinsonRaw=za,u.geoSatellite=Ba,u.geoSatelliteRaw=Tn,u.geoSinuMollweide=ns,u.geoSinuMollweideRaw=Go,u.geoSinusoidal=ut,u.geoSinusoidalRaw=je,u.geoStitch=cs,u.geoTimes=Xo,u.geoTimesRaw=ai,u.geoTwoPointAzimuthal=pu,u.geoTwoPointAzimuthalRaw=Do,u.geoTwoPointAzimuthalUsa=al,u.geoTwoPointEquidistant=_l,u.geoTwoPointEquidistantRaw=au,u.geoTwoPointEquidistantUsa=Nu,u.geoVanDerGrinten=xl,u.geoVanDerGrintenRaw=Su,u.geoVanDerGrinten2=ki,u.geoVanDerGrinten2Raw=hc,u.geoVanDerGrinten3=jf,u.geoVanDerGrinten3Raw=Xi,u.geoVanDerGrinten4=nu,u.geoVanDerGrinten4Raw=zc,u.geoWagner=J,u.geoWagner7=de,u.geoWagnerRaw=L,u.geoWagner4=rt,u.geoWagner4Raw=Ze,u.geoWagner6=Mt,u.geoWagner6Raw=vt,u.geoWiechel=Ht,u.geoWiechelRaw=Gt,u.geoWinkel3=wr,u.geoWinkel3Raw=fr,Object.defineProperty(u,"__esModule",{value:!0})})}}),MO=De({"src/plots/geo/zoom.js"(j,N){"use strict";var u=Qn(),v=Ar(),w=hi(),S=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function a(b,_){var I=b.projection,C;return _._isScoped?C=i:_._isClipped?C=c:C=s,C(b,I)}N.exports=a;function r(b,_){return u.behavior.zoom().translate(_.translate()).scaleExtent(_.scaleExtent()).scale(_.scale())}function n(b,_,I){var C=b.id,F=b.graphDiv,R=F.layout,z=R[C],D=F._fullLayout,k=D[C],B={},O={};function q(Y,ee){B[C+"."+Y]=v.nestedProperty(z,Y).get(),w.call("_storeDirectGUIEdit",R,D._preGUI,B);var te=v.nestedProperty(k,Y);te.get()!==ee&&(te.set(ee),v.nestedProperty(z,Y).set(ee),O[C+"."+Y]=ee)}I(q),q("projection.scale",_.scale()/b.fitScale),q("fitbounds",!1),F.emit("plotly_relayout",O)}function i(b,_){var I=r(b,_);function C(){u.select(this).style(e)}function F(){_.scale(u.event.scale).translate(u.event.translate),b.render(!0);var D=_.invert(b.midPt);b.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":_.scale()/b.fitScale,"geo.center.lon":D[0],"geo.center.lat":D[1]})}function R(D){var k=_.invert(b.midPt);D("center.lon",k[0]),D("center.lat",k[1])}function z(){u.select(this).style(t),n(b,_,R)}return I.on("zoomstart",C).on("zoom",F).on("zoomend",z),I}function s(b,_){var I=r(b,_),C=2,F,R,z,D,k,B,O,q,Y;function ee(V){return _.invert(V)}function te(V){var $=ee(V);if(!$)return!0;var X=_($);return Math.abs(X[0]-V[0])>C||Math.abs(X[1]-V[1])>C}function ae(){u.select(this).style(e);let{x:V,y:$,width:X,height:Z}=this.getBBox();F=u.event.sourceEvent?u.mouse(this):[V+X/2,$+Z/2],R=_.rotate(),z=_.translate(),D=R,k=ee(F)}function U(){let{x:V,y:$,width:X,height:Z}=this.getBBox();if(B=u.event.sourceEvent?u.mouse(this):[V+X/2,$+Z/2],te(F)){I.scale(_.scale()),I.translate(_.translate());return}_.scale(u.event.scale),_.translate([z[0],u.event.translate[1]]),k?ee(B)&&(q=ee(B),O=[D[0]+(q[0]-k[0]),R[1],R[2]],_.rotate(O),D=O):(F=B,k=ee(F)),Y=!0,b.render(!0);var Q=_.rotate(),re=_.invert(b.midPt);b.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":_.scale()/b.fitScale,"geo.center.lon":re[0],"geo.center.lat":re[1],"geo.projection.rotation.lon":-Q[0]})}function H(){u.select(this).style(t),Y&&n(b,_,K)}function K(V){var $=_.rotate(),X=_.invert(b.midPt);V("projection.rotation.lon",-$[0]),V("center.lon",X[0]),V("center.lat",X[1])}return I.on("zoomstart",ae).on("zoom",U).on("zoomend",H),I}function c(b,_){var I={r:_.rotate(),k:_.scale()},C=r(b,_),F=h(C,"zoomstart","zoom","zoomend"),R=0,z=C.on,D;C.on("zoomstart",function(){u.select(this).style(e);let{x:Y,y:ee,width:te,height:ae}=this.getBBox(),U=u.event.sourceEvent?u.mouse(this):[Y+te/2,ee+ae/2],H=_.rotate(),K=H,V=_.translate(),$=f(H);D=p(_,U),z.call(C,"zoom",function(){let{x:X,y:Z,width:Q,height:re}=this.getBBox(),ce=u.event.sourceEvent?u.mouse(this):[X+Q/2,Z+re/2];if(_.scale(I.k=u.event.scale),!D)U=ce,D=p(_,U);else if(p(_,ce)){_.rotate(H).translate(V);var me=p(_,ce),ye=y(D,me),Ae=E(d($,ye)),Se=I.r=o(Ae,D,K);(!isFinite(Se[0])||!isFinite(Se[1])||!isFinite(Se[2]))&&(Se=K),_.rotate(Se),K=Se}B(F.of(this,arguments))}),k(F.of(this,arguments))}).on("zoomend",function(){u.select(this).style(t),z.call(C,"zoom",null),O(F.of(this,arguments)),n(b,_,q)}).on("zoom.redraw",function(){b.render(!0);var Y=_.rotate();b.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":_.scale()/b.fitScale,"geo.projection.rotation.lon":-Y[0],"geo.projection.rotation.lat":-Y[1]})});function k(Y){R++||Y({type:"zoomstart"})}function B(Y){Y({type:"zoom"})}function O(Y){--R||Y({type:"zoomend"})}function q(Y){var ee=_.rotate();Y("projection.rotation.lon",-ee[0]),Y("projection.rotation.lat",-ee[1])}return u.rebind(C,F,"on")}function p(b,_){var I=b.invert(_);return I&&isFinite(I[0])&&isFinite(I[1])&&g(I)}function f(b){var _=.5*b[0]*S,I=.5*b[1]*S,C=.5*b[2]*S,F=Math.sin(_),R=Math.cos(_),z=Math.sin(I),D=Math.cos(I),k=Math.sin(C),B=Math.cos(C);return[R*D*B+F*z*k,F*D*B-R*z*k,R*z*B+F*D*k,R*D*k-F*z*B]}function d(b,_){var I=b[0],C=b[1],F=b[2],R=b[3],z=_[0],D=_[1],k=_[2],B=_[3];return[I*z-C*D-F*k-R*B,I*D+C*z+F*B-R*k,I*k-C*B+F*z+R*D,I*B+C*k-F*D+R*z]}function y(b,_){if(!(!b||!_)){var I=m(b,_),C=Math.sqrt(A(I,I)),F=.5*Math.acos(Math.max(-1,Math.min(1,A(b,_)))),R=Math.sin(F)/C;return C&&[Math.cos(F),I[2]*R,-I[1]*R,I[0]*R]}}function o(b,_,I){var C=T(_,2,b[0]);C=T(C,1,b[1]),C=T(C,0,b[2]-I[2]);var F=_[0],R=_[1],z=_[2],D=C[0],k=C[1],B=C[2],O=Math.atan2(R,F)*l,q=Math.sqrt(F*F+R*R),Y,ee;Math.abs(k)>q?(ee=(k>0?90:-90)-O,Y=0):(ee=Math.asin(k/q)*l-O,Y=Math.sqrt(q*q-k*k));var te=180-ee-2*O,ae=(Math.atan2(B,D)-Math.atan2(z,Y))*l,U=(Math.atan2(B,D)-Math.atan2(z,-Y))*l,H=x(I[0],I[1],ee,ae),K=x(I[0],I[1],te,U);return H<=K?[ee,ae,I[2]]:[te,U,I[2]]}function x(b,_,I,C){var F=M(I-b),R=M(C-_);return Math.sqrt(F*F+R*R)}function M(b){return(b%360+540)%360-180}function T(b,_,I){var C=I*S,F=b.slice(),R=_===0?1:0,z=_===2?1:2,D=Math.cos(C),k=Math.sin(C);return F[R]=b[R]*D-b[z]*k,F[z]=b[z]*D+b[R]*k,F}function E(b){return[Math.atan2(2*(b[0]*b[1]+b[2]*b[3]),1-2*(b[1]*b[1]+b[2]*b[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(b[0]*b[2]-b[3]*b[1]))))*l,Math.atan2(2*(b[0]*b[3]+b[1]*b[2]),1-2*(b[2]*b[2]+b[3]*b[3]))*l]}function g(b){var _=b[0]*S,I=b[1]*S,C=Math.cos(I);return[C*Math.cos(_),C*Math.sin(_),Math.sin(I)]}function A(b,_){for(var I=0,C=0,F=b.length;C0&&O._module.calcGeoJSON(B,R)}if(!z){var q=this.updateProjection(F,R);if(q)return;(!this.viewInitial||this.scope!==D.scope)&&this.saveViewInitial(D)}this.scope=D.scope,this.updateBaseLayers(R,D),this.updateDims(R,D),this.updateFx(R,D),s.generalUpdatePerTraceModule(this.graphDiv,this,F,D);var Y=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=Y.selectAll(".point"),this.dataPoints.text=Y.selectAll("text"),this.dataPaths.line=Y.selectAll(".js-line");var ee=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ee.selectAll("path"),this._render()},b.updateProjection=function(F,R){var z,D=this.graphDiv,k=R[this.id],B=R._size,O=k.domain,q=k.projection,Y=k.lonaxis,ee=k.lataxis,te=Y._ax,ae=ee._ax,U=this.projection=_(k),H=[[B.l+B.w*O.x[0],B.t+B.h*(1-O.y[1])],[B.l+B.w*O.x[1],B.t+B.h*(1-O.y[0])]],K=k.center||{},V=q.rotation||{},$=Y.range||[],X=ee.range||[];if(k.fitbounds){if(te._length=H[1][0]-H[0][0],ae._length=H[1][1]-H[0][1],te.range=p(D,te),ae.range=p(D,ae),!this.hasChoropleth&&k.fitbounds==="locations"){for(var Z=[],Q=!1,re=0;re0?(te.range[1]-te.range[0]-Ce)/2*(Se[1]-Se[0])/Ce:0;te.range=[Se[0]-qe,Se[1]+qe]}}}var Ue=(te.range[0]+te.range[1])/2,xe=(ae.range[0]+ae.range[1])/2;if(k._isScoped)K={lon:Ue,lat:xe};else if(k._isClipped){K={lon:Ue,lat:xe},V={lon:Ue,lat:xe,roll:V.roll};var he=q.type,oe=M.lonaxisSpan[he]/2||180,le=M.lataxisSpan[he]/2||90;$=[Ue-oe,Ue+oe],X=[xe-le,xe+le]}else K={lon:Ue,lat:xe},V={lon:Ue,lat:V.lat,roll:V.roll}}U.center([K.lon-V.lon,K.lat-V.lat]).rotate([-V.lon,-V.lat,V.roll]).parallels(q.parallels);var ne=C($,X);U.fitExtent(H,ne);var be=this.bounds=U.getBounds(ne),Fe=this.fitScale=U.scale(),Ve=U.translate();if(U.scaleExtent=()=>{var Pt;let{minscale:Zt}=q,vr=(Pt=q.maxscale)!=null?Pt:1/0;return[Fe*Math.min(Zt,vr),Fe*Math.max(Zt,vr)]},k.fitbounds){var je=U.getBounds(C(te.range,ae.range)),ut=Math.min((be[1][0]-be[0][0])/(je[1][0]-je[0][0]),(be[1][1]-be[0][1])/(je[1][1]-je[0][1]));isFinite(ut)?U.scale(ut*Fe):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else U.scale(q.scale*Fe);var st=this.midPt=[(be[0][0]+be[1][0])/2,(be[0][1]+be[1][1])/2];if(U.translate([Ve[0]+(st[0]-Ve[0]),Ve[1]+(st[1]-Ve[1])]).clipExtent(be),k._isAlbersUsa){var yt=U([K.lon,K.lat]);if(yt){var At=U.translate();U.translate([At[0]-(yt[0]-At[0]),At[1]-(yt[1]-At[1])])}}},b.updateBaseLayers=function(F,R){var z=this,D=z.topojson,k=z.layers,B=z.basePaths;function O(U){return U==="lonaxis"||U==="lataxis"}function q(U){return!!M.lineLayers[U]}function Y(U){return!!M.fillLayers[U]}var ee=this.hasChoropleth?M.layersForChoropleth:M.layers,te=ee.filter(function(U){return q(U)||Y(U)?R["show"+U]:O(U)?R[U].showgrid:!0}),ae=z.framework.selectAll(".layer").data(te,String);ae.exit().each(function(U){delete k[U],delete B[U],u.select(this).remove()}),ae.enter().append("g").attr("class",function(U){return"layer "+U}).each(function(U){var H=k[U]=u.select(this);U==="bg"?z.bgRect=H.append("rect").style("pointer-events","all"):O(U)?B[U]=H.append("path").style("fill","none"):U==="backplot"?H.append("g").classed("choroplethlayer",!0):U==="frontplot"?H.append("g").classed("scatterlayer",!0):q(U)?B[U]=H.append("path").style("fill","none").style("stroke-miterlimit",2):Y(U)&&(B[U]=H.append("path").style("stroke","none"))}),ae.order(),ae.each(function(U){var H=B[U],K=M.layerNameToAdjective[U];U==="frame"?H.datum(M.sphereSVG):q(U)||Y(U)?H.datum(m(D,D.objects[U])):O(U)&&H.datum(I(U,R,F)).call(r.stroke,R[U].gridcolor).call(n.dashLine,R[U].griddash,R[U].gridwidth),q(U)?H.call(r.stroke,R[K+"color"]).call(n.dashLine,"",R[K+"width"]):Y(U)&&H.call(r.fill,R[K+"color"])})},b.updateDims=function(F,R){var z=this.bounds,D=(R.framewidth||0)/2,k=z[0][0]-D,B=z[0][1]-D,O=z[1][0]-k+D,q=z[1][1]-B+D;n.setRect(this.clipRect,k,B,O,q),this.bgRect.call(n.setRect,k,B,O,q).call(r.fill,R.bgcolor),this.xaxis._offset=k,this.xaxis._length=O,this.yaxis._offset=B,this.yaxis._length=q},b.updateFx=function(F,R){var z=this,D=z.graphDiv,k=z.bgRect,B=F.dragmode,O=F.clickmode;if(z.isStatic)return;function q(){var ae=z.viewInitial,U={};for(var H in ae)U[z.id+"."+H]=ae[H];e.call("_guiRelayout",D,U),D.emit("plotly_doubleclick",null)}function Y(ae){return z.projection.invert([ae[0]+z.xaxis._offset,ae[1]+z.yaxis._offset])}var ee=function(ae,U){if(U.isRect){var H=ae.range={};H[z.id]=[Y([U.xmin,U.ymin]),Y([U.xmax,U.ymax])]}else{var K=ae.lassoPoints={};K[z.id]=U.map(Y)}},te={element:z.bgRect.node(),gd:D,plotinfo:{id:z.id,xaxis:z.xaxis,yaxis:z.yaxis,fillRangeItems:ee},xaxes:[z.xaxis],yaxes:[z.yaxis],subplot:z.id,clickFn:function(ae){ae===2&&y(D)}};if(B==="pan"){k.node().onmousedown=null;let ae=x(z,R);if(k.call(ae),!u.event){let U=z.projection.scale(),[H,K]=z.projection.scaleExtent();(UK)&&ae.event(k)}k.on("dblclick.zoom",q),D._context._scrollZoom.geo||k.on("wheel.zoom",null)}else(B==="select"||B==="lasso")&&(k.on(".zoom",null),te.prepFn=function(ae,U,H){d(ae,U,H,te,B)},f.init(te));k.on("mousemove",function(){var ae=z.projection.invert(t.getPositionFromD3Event());if(!ae)return f.unhover(D,u.event);z.xaxis.p2c=function(){return ae[0]},z.yaxis.p2c=function(){return ae[1]},i.hover(D,u.event,z.id)}),k.on("mouseout",function(){D._dragging||f.unhover(D,u.event)}),k.on("click",function(){B!=="select"&&B!=="lasso"&&(O.indexOf("select")>-1&&o(u.event,D,[z.xaxis],[z.yaxis],z.id,te),O.indexOf("event")>-1&&i.click(D,u.event))})},b.makeFramework=function(){var F=this,R=F.graphDiv,z=R._fullLayout,D="clip"+z._uid+F.id;F.clipDef=z._clips.append("clipPath").attr("id",D),F.clipRect=F.clipDef.append("rect"),F.framework=u.select(F.container).append("g").attr("class","geo "+F.id).call(n.setClipUrl,D,R),F.project=function(k){var B=F.projection(k);return B?[B[0]-F.xaxis._offset,B[1]-F.yaxis._offset]:[null,null]},F.xaxis={_id:"x",c2p:function(k){return F.project(k)[0]}},F.yaxis={_id:"y",c2p:function(k){return F.project(k)[1]}},F.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(F.mockAxis,z)},b.saveViewInitial=function(F){var R=F.center||{},z=F.projection,D=z.rotation||{};this.viewInitial={fitbounds:F.fitbounds,"projection.scale":z.scale};var k;F._isScoped?k={"center.lon":R.lon,"center.lat":R.lat}:F._isClipped?k={"projection.rotation.lon":D.lon,"projection.rotation.lat":D.lat,"center.lon":R.lon,"center.lat":R.lat}:k={"center.lon":R.lon,"center.lat":R.lat,"projection.rotation.lon":D.lon},t.extendFlat(this.viewInitial,k)},b.render=function(F){this._hasMarkerAngles&&F?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},b._render=function(){var F=this.projection,R=F.getPath(),z;function D(B){var O=F(B.lonlat);return O?a(O[0],O[1]):null}function k(B){return F.isLonLatOverEdges(B.lonlat)?"none":null}for(z in this.basePaths)this.basePaths[z].attr("d",R);for(z in this.dataPaths)this.dataPaths[z].attr("d",function(B){return R(B.geojson)});for(z in this.dataPoints)this.dataPoints[z].attr("display",k).attr("transform",D)};function _(F){var R=F.projection,z=R.type,D=M.projNames[z];D="geo"+t.titleCase(D);for(var k=v[D]||l[D],B=k(),O=F._isSatellite?Math.acos(1/R.distance)*180/Math.PI:F._isClipped?M.lonaxisSpan[z]/2:null,q=["center","rotate","parallels","clipExtent"],Y=function(ae){return ae?B:[]},ee=0;eeK}else return!1},B.getPath=function(){return w().projection(B)},B.getBounds=function(ae){return B.getPath().bounds(ae)},B.precision(M.precision),F._isSatellite&&B.tilt(R.tilt).distance(R.distance),O&&B.clipAngle(O-M.clipPad),B}function I(F,R,z){var D=1e-6,k=2.5,B=R[F],O=M.scopeDefaults[R.scope],q,Y,ee;F==="lonaxis"?(q=O.lonaxisRange,Y=O.lataxisRange,ee=function(Z,Q){return[Z,Q]}):F==="lataxis"&&(q=O.lataxisRange,Y=O.lonaxisRange,ee=function(Z,Q){return[Q,Z]});var te={type:"linear",range:[q[0],q[1]-D],tick0:B.tick0,dtick:B.dtick};c.setConvert(te,z);var ae=c.calcTicks(te);!R.isScoped&&F==="lonaxis"&&ae.pop();for(var U=ae.length,H=new Array(U),K=0;Kce[me]!=null)||l.fitboundsIncompatible.has(o)?n.fitbounds=!1:Q.forEach(({dst:ce,key:me})=>ce&&(ce[me]=null))}}}}),yT=De({"src/plots/geo/index.js"(j,N){"use strict";var u=Bf().getSubplotCalcData,v=Ar().counterRegex,w=SO(),S="geo",l=v(S),e={};e[S]={valType:"subplotid",dflt:S,editType:"calc"};function t(n){for(var i=n._fullLayout,s=n.calcdata,c=i._subplots[S],p=0;p")}}}}),wT=De({"src/traces/choropleth/event_data.js"(j,N){"use strict";N.exports=function(v,w,S,l,e){v.location=w.location,v.z=w.z;var t=l[e];return t.fIn&&t.fIn.properties&&(v.properties=t.fIn.properties),v.ct=t.ct,v}}}),AT=De({"src/traces/choropleth/select.js"(j,N){"use strict";N.exports=function(v,w){var S=v.cd,l=v.xaxis,e=v.yaxis,t=[],a,r,n,i,s;if(w===!1)for(a=0;a=Math.min(O,q)&&y<=Math.max(O,q)?0:1/0}if(C=Math.min(Y,ee)&&o<=Math.max(Y,ee)?0:1/0}z=Math.sqrt(C*C+F*F),h=M[I]}}}else for(I=M.length-1;I>-1;I--)m=M[I],b=f[m],_=d[m],C=c.c2p(b)-y,F=p.c2p(_)-o,R=Math.sqrt(C*C+F*F),R100},j.isDotSymbol=function(u){return typeof u=="string"?N.DOT_RE.test(u):u>200}}}),IO=De({"src/traces/scattergl/defaults.js"(j,N){"use strict";var u=Ar(),v=hi(),w=Ub(),S=_g(),l=kd(),e=Sl(),t=kp(),a=ud(),r=Jh(),n=cd(),i=Ld(),s=fd();N.exports=function(p,f,d,y){function o(h,b){return u.coerce(p,f,S,h,b)}var x=p.marker?w.isOpenSymbol(p.marker.symbol):!1,M=e.isBubble(p),T=t(p,f,y,o);if(!T){f.visible=!1;return}a(p,f,y,o),o("xhoverformat"),o("yhoverformat");var E=T>>1,p=t[c],f=r!==void 0?r(p,a):p-a;f>=0?(s=c,i=c-1):n=c+1}return s}function v(t,a,r,n,i){for(var s=i+1;n<=i;){var c=n+i>>>1,p=t[c],f=r!==void 0?r(p,a):p-a;f>0?(s=c,i=c-1):n=c+1}return s}function w(t,a,r,n,i){for(var s=n-1;n<=i;){var c=n+i>>>1,p=t[c],f=r!==void 0?r(p,a):p-a;f<0?(s=c,n=c+1):i=c-1}return s}function S(t,a,r,n,i){for(var s=n-1;n<=i;){var c=n+i>>>1,p=t[c],f=r!==void 0?r(p,a):p-a;f<=0?(s=c,n=c+1):i=c-1}return s}function l(t,a,r,n,i){for(;n<=i;){var s=n+i>>>1,c=t[s],p=r!==void 0?r(c,a):c-a;if(p===0)return s;p<=0?n=s+1:i=s-1}return-1}function e(t,a,r,n,i,s){return typeof r=="function"?s(t,a,r,n===void 0?0:n|0,i===void 0?t.length-1:i|0):s(t,a,void 0,r===void 0?0:r|0,n===void 0?t.length-1:n|0)}N.exports={ge:function(t,a,r,n,i){return e(t,a,r,n,i,u)},gt:function(t,a,r,n,i){return e(t,a,r,n,i,v)},lt:function(t,a,r,n,i){return e(t,a,r,n,i,w)},le:function(t,a,r,n,i){return e(t,a,r,n,i,S)},eq:function(t,a,r,n,i){return e(t,a,r,n,i,l)}}}}),Dd=De({"node_modules/pick-by-alias/index.js"(j,N){"use strict";N.exports=function(S,l,e){var t={},a,r;if(typeof l=="string"&&(l=v(l)),Array.isArray(l)){var n={};for(r=0;r1&&(w=arguments),typeof w=="string"?w=w.split(/\s/).map(parseFloat):typeof w=="number"&&(w=[w]),w.length&&typeof w[0]=="number"?w.length===1?S={width:w[0],height:w[0],x:0,y:0}:w.length===2?S={width:w[0],height:w[1],x:0,y:0}:S={x:w[0],y:w[1],width:w[2]-w[0]||0,height:w[3]-w[1]||0}:w&&(w=u(w,{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"}),S={x:w.left||0,y:w.top||0},w.width==null?w.right?S.width=w.right-S.x:S.width=0:S.width=w.width,w.height==null?w.bottom?S.height=w.bottom-S.y:S.height=0:S.height=w.height),S}}}),Yp=De({"node_modules/array-bounds/index.js"(j,N){"use strict";N.exports=u;function u(v,w){if(!v||v.length==null)throw Error("Argument should be an array");w==null?w=1:w=Math.floor(w);for(var S=Array(w*2),l=0;le&&(e=v[a]),v[a]>>1,M;f.dtype||(f.dtype="array"),typeof f.dtype=="string"?M=new(r(f.dtype))(x):f.dtype&&(M=f.dtype,Array.isArray(M)&&(M.length=x));for(let C=0;Cd||k>i){for(let $=0;$re||q>ce||Y=te||Z===Q)return;let me=T[X];Q===void 0&&(Q=me.length);for(let oe=Z;oe=z&&ne<=k&&be>=D&&be<=B&&ae.push(le)}let ye=E[X],Ae=ye[Z*4+0],Se=ye[Z*4+1],Ce=ye[Z*4+2],qe=ye[Z*4+3],Ue=H(ye,Z+1),xe=$*.5,he=X+1;U(K,V,xe,he,Ae,Se||Ce||qe||Ue),U(K,V+xe,xe,he,Se,Ce||qe||Ue),U(K+xe,V,xe,he,Ce,qe||Ue),U(K+xe,V+xe,xe,he,qe,Ue)}function H(K,V){let $=null,X=0;for(;$===null;)if($=K[V*4+X],X++,X>K.length)return null;return $}return ae}function _(C,F,R,z,D){let k=[];for(let B=0;B1&&(p=1),p<-1&&(p=-1),c*Math.acos(p)},e=function(r,n,i,s,c,p,f,d,y,o,x,M){var T=Math.pow(c,2),E=Math.pow(p,2),g=Math.pow(x,2),A=Math.pow(M,2),m=T*E-T*A-E*g;m<0&&(m=0),m/=T*A+E*g,m=Math.sqrt(m)*(f===d?-1:1);var h=m*c/p*M,b=m*-p/c*x,_=o*h-y*b+(r+i)/2,I=y*h+o*b+(n+s)/2,C=(x-h)/c,F=(M-b)/p,R=(-x-h)/c,z=(-M-b)/p,D=l(1,0,C,F),k=l(C,F,R,z);return d===0&&k>0&&(k-=v),d===1&&k<0&&(k+=v),[_,I,D,k]},t=function(r){var n=r.px,i=r.py,s=r.cx,c=r.cy,p=r.rx,f=r.ry,d=r.xAxisRotation,y=d===void 0?0:d,o=r.largeArcFlag,x=o===void 0?0:o,M=r.sweepFlag,T=M===void 0?0:M,E=[];if(p===0||f===0)return[];var g=Math.sin(y*v/360),A=Math.cos(y*v/360),m=A*(n-s)/2+g*(i-c)/2,h=-g*(n-s)/2+A*(i-c)/2;if(m===0&&h===0)return[];p=Math.abs(p),f=Math.abs(f);var b=Math.pow(m,2)/Math.pow(p,2)+Math.pow(h,2)/Math.pow(f,2);b>1&&(p*=Math.sqrt(b),f*=Math.sqrt(b));var _=e(n,i,s,c,p,f,x,T,g,A,m,h),I=u(_,4),C=I[0],F=I[1],R=I[2],z=I[3],D=Math.abs(z)/(v/4);Math.abs(1-D)<1e-7&&(D=1);var k=Math.max(Math.ceil(D),1);z/=k;for(var B=0;B4?(a=o[o.length-4],r=o[o.length-3]):(a=p,r=f),t.push(o)}return t}function w(l,e,t,a){return["C",l,e,t,a,t,a]}function S(l,e,t,a,r,n){return["C",l/3+2/3*t,e/3+2/3*a,r/3+2/3*t,n/3+2/3*a,r,n]}}}),MT=De({"node_modules/is-svg-path/index.js"(j,N){"use strict";N.exports=function(v){return typeof v!="string"?!1:(v=v.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(v)&&/[\dz]$/i.test(v)&&v.length>4))}}}),qO=De({"node_modules/svg-path-bounds/index.js"(j,N){"use strict";var u=A1(),v=TT(),w=UO(),S=MT(),l=Y1();N.exports=e;function e(t){if(Array.isArray(t)&&t.length===1&&typeof t[0]=="string"&&(t=t[0]),typeof t=="string"&&(l(S(t),"String is not an SVG path."),t=u(t)),l(Array.isArray(t),"Argument should be a string or an array of path segments."),t=v(t),t=w(t),!t.length)return[0,0,0,0];for(var a=[1/0,1/0,-1/0,-1/0],r=0,n=t.length;ra[2]&&(a[2]=i[s+0]),i[s+1]>a[3]&&(a[3]=i[s+1]);return a}}}),GO=De({"node_modules/normalize-svg-path/index.js"(j,N){var u=Math.PI,v=a(120);N.exports=w;function w(r){for(var n,i=[],s=0,c=0,p=0,f=0,d=null,y=null,o=0,x=0,M=0,T=r.length;M7&&(i.push(E.splice(0,7)),E.unshift("C"));break;case"S":var A=o,m=x;(n=="C"||n=="S")&&(A+=A-s,m+=m-c),E=["C",A,m,E[1],E[2],E[3],E[4]];break;case"T":n=="Q"||n=="T"?(d=o*2-d,y=x*2-y):(d=o,y=x),E=l(o,x,d,y,E[1],E[2]);break;case"Q":d=E[1],y=E[2],E=l(o,x,E[1],E[2],E[3],E[4]);break;case"L":E=S(o,x,E[1],E[2]);break;case"H":E=S(o,x,E[1],x);break;case"V":E=S(o,x,o,E[1]);break;case"Z":E=S(o,x,p,f);break}n=g,o=E[E.length-2],x=E[E.length-1],E.length>4?(s=E[E.length-4],c=E[E.length-3]):(s=o,c=x),i.push(E)}return i}function S(r,n,i,s){return["C",r,n,i,s,i,s]}function l(r,n,i,s,c,p){return["C",r/3+2/3*i,n/3+2/3*s,c/3+2/3*i,p/3+2/3*s,c,p]}function e(r,n,i,s,c,p,f,d,y,o){if(o)_=o[0],I=o[1],h=o[2],b=o[3];else{var x=t(r,n,-c);r=x.x,n=x.y,x=t(d,y,-c),d=x.x,y=x.y;var M=(r-d)/2,T=(n-y)/2,E=M*M/(i*i)+T*T/(s*s);E>1&&(E=Math.sqrt(E),i=E*i,s=E*s);var g=i*i,A=s*s,m=(p==f?-1:1)*Math.sqrt(Math.abs((g*A-g*T*T-A*M*M)/(g*T*T+A*M*M)));m==1/0&&(m=1);var h=m*i*T/s+(r+d)/2,b=m*-s*M/i+(n+y)/2,_=Math.asin(((n-b)/s).toFixed(9)),I=Math.asin(((y-b)/s).toFixed(9));_=rI&&(_=_-u*2),!f&&I>_&&(I=I-u*2)}if(Math.abs(I-_)>v){var C=I,F=d,R=y;I=_+v*(f&&I>_?1:-1),d=h+i*Math.cos(I),y=b+s*Math.sin(I);var z=e(d,y,i,s,c,0,f,F,R,[I,C,h,b])}var D=Math.tan((I-_)/4),k=4/3*i*D,B=4/3*s*D,O=[2*r-(r+k*Math.sin(_)),2*n-(n-B*Math.cos(_)),d+k*Math.sin(I),y-B*Math.cos(I),d,y];if(o)return O;z&&(O=O.concat(z));for(var q=0;q0?t.strokeStyle="white":t.strokeStyle="black",t.lineWidth=Math.abs(d)),t.translate(c*.5,p*.5),t.scale(x,x),n()){var M=new Path2D(i);t.fill(M),d&&t.stroke(M)}else{var T=v(i);w(t,T),t.fill(),d&&t.stroke()}t.setTransform(1,0,0,1,0,0);var E=l(t,{cutoff:s.cutoff!=null?s.cutoff:.5,radius:s.radius!=null?s.radius:f*.5});return E}var r;function n(){if(r!=null)return r;var i=document.createElement("canvas").getContext("2d");if(i.canvas.width=i.canvas.height=1,!window.Path2D)return r=!1;var s=new Path2D("M0,0h1v1h-1v-1Z");i.fillStyle="black",i.fill(s);var c=i.getImageData(0,0,1,1);return r=c&&c.data&&c.data[3]===255}}}),Zp=De({"src/traces/scattergl/convert.js"(j,N){"use strict";var u=io(),v=WO(),w=ap(),S=hi(),l=Ar(),e=l.isArrayOrTypedArray,t=Ki(),a=lu(),r=rv().formatColor,n=Sl(),i=w1(),s=Ub(),c=ip(),p=Zd().DESELECTDIM,f={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},d=Ch().appendArrayPointValue;function y(z,D){var k,B={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},O=z._context.plotGlPixelRatio;if(D.visible!==!0)return B;if(n.hasText(D)&&(B.text=o(z,D),B.textSel=E(z,D,D.selected),B.textUnsel=E(z,D,D.unselected)),n.hasMarkers(D)&&(B.marker=M(z,D),B.markerSel=T(z,D,D.selected),B.markerUnsel=T(z,D,D.unselected),!D.unselected&&e(D.marker.opacity))){var q=D.marker.opacity;for(B.markerUnsel.opacity=new Array(q.length),k=0;k500?"bold":"normal":z}function M(z,D){var k=D._length,B=D.marker,O={},q,Y=e(B.symbol),ee=e(B.angle),te=e(B.color),ae=e(B.line.color),U=e(B.opacity),H=e(B.size),K=e(B.line.width),V;if(Y||(V=s.isOpenSymbol(B.symbol)),Y||te||ae||U||ee){O.symbols=new Array(k),O.angles=new Array(k),O.colors=new Array(k),O.borderColors=new Array(k);var $=B.symbol,X=B.angle,Z=r(B,B.opacity,k),Q=r(B.line,B.opacity,k);if(!e(Q[0])){var re=Q;for(Q=Array(k),q=0;qc.TOO_MANY_POINTS||n.hasMarkers(D)?"rect":"round";if(ae&&D.connectgaps){var H=q[0],K=q[1];for(Y=0;Y1?te[Y]:te[0]:te,V=e(ae)?ae.length>1?ae[Y]:ae[0]:ae,$=f[K],X=f[V],Z=U?U/.8+1:0,Q=-X*Z-X*.5;q.offset[Y]=[$*Z/H,Q/H]}}return q}N.exports={style:y,markerStyle:M,markerSelection:T,linePositions:C,errorBarPositions:F,textPosition:R}}}),ST=De({"src/traces/scattergl/scene_update.js"(j,N){"use strict";var u=Ar();N.exports=function(w,S){var l=S._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return S._scene||(l=S._scene={},l.init=function(){u.extendFlat(l,t,e)},l.init(),l.update=function(r){var n=u.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(n),l.scatter2d&&l.scatter2d.update(n),l.line2d&&l.line2d.update(n),l.error2d&&l.error2d.update(n.concat(n)),l.select2d&&l.select2d.update(n),l.glText)for(var i=0;i=p,h=A*2,b={},_,I=T.makeCalcdata(x,"x"),C=E.makeCalcdata(x,"y"),F=l(x,T,"x",I),R=l(x,E,"y",C),z=F.vals,D=R.vals;x._x=z,x._y=D,x.xperiodalignment&&(x._origX=I,x._xStarts=F.starts,x._xEnds=F.ends),x.yperiodalignment&&(x._origY=C,x._yStarts=R.starts,x._yEnds=R.ends);var k=new Array(h),B=new Array(A);for(_=0;_1&&v.extendFlat(g.line,i.linePositions(y,x,M)),g.errorX||g.errorY){var A=i.errorBarPositions(y,x,M,T,E);g.errorX&&v.extendFlat(g.errorX,A.x),g.errorY&&v.extendFlat(g.errorY,A.y)}return g.text&&(v.extendFlat(g.text,{positions:M},i.textPosition(y,x,g.text,g.marker)),v.extendFlat(g.textSel,{positions:M},i.textPosition(y,x,g.text,g.markerSel)),v.extendFlat(g.textUnsel,{positions:M},i.textPosition(y,x,g.text,g.markerUnsel))),g}}}),ET=De({"src/traces/scattergl/edit_style.js"(j,N){"use strict";var u=Ar(),v=ii(),w=Zd().DESELECTDIM;function S(l){var e=l[0],t=e.trace,a=e.t,r=a._scene,n=a.index,i=r.selectBatch[n],s=r.unselectBatch[n],c=r.textOptions[n],p=r.textSelectedOptions[n]||{},f=r.textUnselectedOptions[n]||{},d=u.extendFlat({},c),y,o;if(i.length||s.length){var x=p.color,M=f.color,T=c.color,E=u.isArrayOrTypedArray(T);for(d.color=new Array(t._length),y=0;y>>24,t=(S&16711680)>>>16,a=(S&65280)>>>8,r=S&255;return l===!1?[e,t,a,r]:[e/255,t/255,a/255,r/255]}}}),_c=De({"node_modules/object-assign/index.js"(j,N){"use strict";var u=Object.getOwnPropertySymbols,v=Object.prototype.hasOwnProperty,w=Object.prototype.propertyIsEnumerable;function S(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function l(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},a=0;a<10;a++)t["_"+String.fromCharCode(a)]=a;var r=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(r.join("")!=="0123456789")return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(i){n[i]=i}),Object.keys(Object.assign({},n)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}N.exports=l()?Object.assign:function(e,t){for(var a,r=S(e),n,i=1;ib.length)&&(_=b.length);for(var I=0,C=new Array(_);I<_;I++)C[I]=b[I];return C}function r(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function n(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i=ap(),s=Yp(),c=ZO(),p=qb(),f=_c(),d=$O(),y=Dd(),o=CT(),x=Xp(),M=KO(),T=Gb(),E=Om(),g=A;function A(b,_){var I=this;if(!(this instanceof A))return new A(b,_);typeof b=="function"?(_||(_={}),_.regl=b):(_=b,b=null),_&&_.length&&(_.positions=_),b=_.regl;var C=b._gl,F,R=[],z={},D=[],k=[null],B=[null],O=255,q=100;this.tooManyColors=M,F=b.texture({data:new Uint8Array(O*4),width:O,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),f(this,{regl:b,gl:C,groups:D,markerCache:B,markerTextures:k,palette:R,paletteIds:z,paletteTexture:F,maxColors:O,maxSize:q,canvas:C.canvas}),this.update(_);var Y={uniforms:{constPointSize:!!_.constPointSize,opacity:b.prop("opacity"),paletteSize:function(U,H){return[I.tooManyColors?0:O,F.height]},pixelRatio:b.context("pixelRatio"),scale:b.prop("scale"),scaleFract:b.prop("scaleFract"),translate:b.prop("translate"),translateFract:b.prop("translateFract"),markerTexture:b.prop("markerTexture"),paletteTexture:F},attributes:{x:function(U,H){return H.xAttr||{buffer:H.positionBuffer,stride:8,offset:0}},y:function(U,H){return H.yAttr||{buffer:H.positionBuffer,stride:8,offset:4}},xFract:function(U,H){return H.xAttr?{constant:[0,0]}:{buffer:H.positionFractBuffer,stride:8,offset:0}},yFract:function(U,H){return H.yAttr?{constant:[0,0]}:{buffer:H.positionFractBuffer,stride:8,offset:4}},size:function(U,H){return H.size.length?{buffer:H.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(H.size*255/I.maxSize)]}},borderSize:function(U,H){return H.borderSize.length?{buffer:H.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(H.borderSize*255/I.maxSize)]}},colorId:function(U,H){return H.color.length?{buffer:H.colorBuffer,stride:I.tooManyColors?8:4,offset:0}:{constant:I.tooManyColors?R.slice(H.color*4,H.color*4+4):[H.color]}},borderColorId:function(U,H){return H.borderColor.length?{buffer:H.colorBuffer,stride:I.tooManyColors?8:4,offset:I.tooManyColors?4:2}:{constant:I.tooManyColors?R.slice(H.borderColor*4,H.borderColor*4+4):[H.borderColor]}},isActive:function(U,H){return H.activation===!0?{constant:[1]}:H.activation?H.activation:{constant:[0]}}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:b.prop("viewport")},viewport:b.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:b.prop("elements"),count:b.prop("count"),offset:b.prop("offset"),primitive:"points"},ee=f({},Y);ee.frag=d([`precision highp float; +`]);e.createShader=function(m){var h=n(m,a,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createPickShader=function(m){var h=n(m,a,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},e.createContourShader=function(m){var h=n(m,s,o,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h},e.createPickContourShader=function(m){var h=n(m,s,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h}},9499:function(l,e,t){"use strict";l.exports=Y;var n=t(8828),r=t(2762),a=t(8116),o=t(7766),s=t(1888),c=t(6729),m=t(5298),h=t(9994),v=t(9618),g=t(3711),i=t(6760),w=t(7608),S=t(2478),M=t(6199),C=t(990),_=C.createShader,T=C.createContourShader,f=C.createPickShader,u=C.createPickContourShader,A=4*10,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],z=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[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(){for(var q=0;q<3;++q){var Z=I[q],ee=(q+1)%3,ae=(q+2)%3;Z[ee+0]=1,Z[ae+3]=1,Z[q+6]=1}})();function O(q,Z,ee,ae,he){this.position=q,this.index=Z,this.uv=ee,this.level=ae,this.dataCoordinate=he}var D=256;function B(q,Z,ee,ae,he,xe,we,Me,Se,Ie,Ve,Ge,ke,_e,ce){this.gl=q,this.shape=Z,this.bounds=ee,this.objectOffset=ce,this.intensityBounds=[],this._shader=ae,this._pickShader=he,this._coordinateBuffer=xe,this._vao=we,this._colorMap=Me,this._contourShader=Se,this._contourPickShader=Ie,this._contourBuffer=Ve,this._contourVAO=Ge,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new O([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=ke,this._dynamicVAO=_e,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=[v(s.mallocFloat(1024),[0,0]),v(s.mallocFloat(1024),[0,0]),v(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 F=B.prototype;F.genColormap=function(q,Z){var ee=!1,ae=h([c({colormap:q,nshades:D,format:"rgba"}).map(function(he,xe){var we=Z?P(xe/255,Z):he[3];return we<1&&(ee=!0),[he[0],he[1],he[2],255*we]})]);return m.divseq(ae,255),this.hasAlphaScale=ee,ae},F.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},F.isOpaque=function(){return!this.isTransparent()},F.pickSlots=1,F.setPickBase=function(q){this.pickId=q};function P(q,Z){if(!Z||!Z.length)return 1;for(var ee=0;eeq&&ee>0){var ae=(Z[ee][0]-q)/(Z[ee][0]-Z[ee-1][0]);return Z[ee][1]*(1-ae)+ae*Z[ee-1][1]}}return 1}var j=[0,0,0],U={showSurface:!1,showContour:!1,projections:[x.slice(),x.slice(),x.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function $(q,Z){var ee,ae,he,xe=Z.axes&&Z.axes.lastCubeProps.axis||j,we=Z.showSurface,Me=Z.showContour;for(ee=0;ee<3;++ee)for(we=we||Z.surfaceProject[ee],ae=0;ae<3;++ae)Me=Me||Z.contourProject[ee][ae];for(ee=0;ee<3;++ee){var Se=U.projections[ee];for(ae=0;ae<16;++ae)Se[ae]=0;for(ae=0;ae<4;++ae)Se[5*ae]=1;Se[5*ee]=0,Se[12+ee]=Z.axesBounds[+(xe[ee]>0)][ee],i(Se,q.model,Se);var Ie=U.clipBounds[ee];for(he=0;he<2;++he)for(ae=0;ae<3;++ae)Ie[he][ae]=q.clipBounds[he][ae];Ie[0][ee]=-1e8,Ie[1][ee]=1e8}return U.showSurface=we,U.showContour=Me,U}var Q={model:x,view:x,projection:x,inverseModel:x.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},re=x.slice(),ne=[1,0,0,0,1,0,0,0,1];function se(q,Z){q=q||{};var ee=this.gl;ee.disable(ee.CULL_FACE),this._colorMap.bind(0);var ae=Q;ae.model=q.model||x,ae.view=q.view||x,ae.projection=q.projection||x,ae.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ae.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ae.objectOffset=this.objectOffset,ae.contourColor=this.contourColor[0],ae.inverseModel=w(ae.inverseModel,ae.model);for(var he=0;he<2;++he)for(var xe=ae.clipBounds[he],we=0;we<3;++we)xe[we]=Math.min(Math.max(this.clipBounds[he][we],-1e8),1e8);ae.kambient=this.ambientLight,ae.kdiffuse=this.diffuseLight,ae.kspecular=this.specularLight,ae.roughness=this.roughness,ae.fresnel=this.fresnel,ae.opacity=this.opacity,ae.height=0,ae.permutation=ne,ae.vertexColor=this.vertexColor;var Me=re;for(i(Me,ae.view,ae.model),i(Me,ae.projection,Me),w(Me,Me),he=0;he<3;++he)ae.eyePosition[he]=Me[12+he]/Me[15];var Se=Me[15];for(he=0;he<3;++he)Se+=this.lightPosition[he]*Me[4*he+3];for(he=0;he<3;++he){var Ie=Me[12+he];for(we=0;we<3;++we)Ie+=Me[4*we+he]*this.lightPosition[we];ae.lightPosition[he]=Ie/Se}var Ve=$(ae,this);if(Ve.showSurface){for(this._shader.bind(),this._shader.uniforms=ae,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ee.TRIANGLES,this._vertexCount),he=0;he<3;++he)!this.surfaceProject[he]||!this.vertexCount||(this._shader.uniforms.model=Ve.projections[he],this._shader.uniforms.clipBounds=Ve.clipBounds[he],this._vao.draw(ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ve.showContour){var Ge=this._contourShader;ae.kambient=1,ae.kdiffuse=0,ae.kspecular=0,ae.opacity=1,Ge.bind(),Ge.uniforms=ae;var ke=this._contourVAO;for(ke.bind(),he=0;he<3;++he)for(Ge.uniforms.permutation=I[he],ee.lineWidth(this.contourWidth[he]*this.pixelRatio),we=0;we>4)/16)/255,he=Math.floor(ae),xe=ae-he,we=Z[1]*(q.value[1]+(q.value[2]&15)/16)/255,Me=Math.floor(we),Se=we-Me;he+=1,Me+=1;var Ie=ee.position;Ie[0]=Ie[1]=Ie[2]=0;for(var Ve=0;Ve<2;++Ve)for(var Ge=Ve?xe:1-xe,ke=0;ke<2;++ke)for(var _e=ke?Se:1-Se,ce=he+Ve,ve=Me+ke,le=Ge*_e,Ae=0;Ae<3;++Ae)Ie[Ae]+=this._field[Ae].get(ce,ve)*le;for(var Be=this._pickResult.level,Xe=0;Xe<3;++Xe)if(Be[Xe]=S.le(this.contourLevels[Xe],Ie[Xe]),Be[Xe]<0)this.contourLevels[Xe].length>0&&(Be[Xe]=0);else if(Be[Xe]Math.abs(yt-Ie[Xe])&&(Be[Xe]+=1)}for(ee.index[0]=xe<.5?he:he+1,ee.index[1]=Se<.5?Me:Me+1,ee.uv[0]=ae/Z[0],ee.uv[1]=we/Z[1],Ae=0;Ae<3;++Ae)ee.dataCoordinate[Ae]=this._field[Ae].get(ee.index[0],ee.index[1]);return ee},F.padField=function(q,Z){var ee=Z.shape.slice(),ae=q.shape.slice();m.assign(q.lo(1,1).hi(ee[0],ee[1]),Z),m.assign(q.lo(1).hi(ee[0],1),Z.hi(ee[0],1)),m.assign(q.lo(1,ae[1]-1).hi(ee[0],1),Z.lo(0,ee[1]-1).hi(ee[0],1)),m.assign(q.lo(0,1).hi(1,ee[1]),Z.hi(1)),m.assign(q.lo(ae[0]-1,1).hi(1,ee[1]),Z.lo(ee[0]-1)),q.set(0,0,Z.get(0,0)),q.set(0,ae[1]-1,Z.get(0,ee[1]-1)),q.set(ae[0]-1,0,Z.get(ee[0]-1,0)),q.set(ae[0]-1,ae[1]-1,Z.get(ee[0]-1,ee[1]-1))};function X(q,Z){return Array.isArray(q)?[Z(q[0]),Z(q[1]),Z(q[2])]:[Z(q),Z(q),Z(q)]}function K(q){return Array.isArray(q)?q.length===3?[q[0],q[1],q[2],1]:[q[0],q[1],q[2],q[3]]:[0,0,0,1]}function H(q){if(Array.isArray(q)){if(Array.isArray(q))return[K(q[0]),K(q[1]),K(q[2])];var Z=K(q);return[Z.slice(),Z.slice(),Z.slice()]}}F.update=function(q){q=q||{},this.objectOffset=q.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in q&&(this.contourWidth=X(q.contourWidth,Number)),"showContour"in q&&(this.showContour=X(q.showContour,Boolean)),"showSurface"in q&&(this.showSurface=!!q.showSurface),"contourTint"in q&&(this.contourTint=X(q.contourTint,Boolean)),"contourColor"in q&&(this.contourColor=H(q.contourColor)),"contourProject"in q&&(this.contourProject=X(q.contourProject,function(on){return X(on,Boolean)})),"surfaceProject"in q&&(this.surfaceProject=q.surfaceProject),"dynamicColor"in q&&(this.dynamicColor=H(q.dynamicColor)),"dynamicTint"in q&&(this.dynamicTint=X(q.dynamicTint,Number)),"dynamicWidth"in q&&(this.dynamicWidth=X(q.dynamicWidth,Number)),"opacity"in q&&(this.opacity=q.opacity),"opacityscale"in q&&(this.opacityscale=q.opacityscale),"colorBounds"in q&&(this.colorBounds=q.colorBounds),"vertexColor"in q&&(this.vertexColor=q.vertexColor?1:0),"colormap"in q&&this._colorMap.setPixels(this.genColormap(q.colormap,this.opacityscale));var Z=q.field||q.coords&&q.coords[2]||null,ee=!1;if(Z||(this._field[2].shape[0]||this._field[2].shape[2]?Z=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Z=this._field[2].hi(0,0)),"field"in q||"coords"in q){var ae=(Z.shape[0]+2)*(Z.shape[1]+2);ae>this._field[2].data.length&&(s.freeFloat(this._field[2].data),this._field[2].data=s.mallocFloat(n.nextPow2(ae))),this._field[2]=v(this._field[2].data,[Z.shape[0]+2,Z.shape[1]+2]),this.padField(this._field[2],Z),this.shape=Z.shape.slice();for(var he=this.shape,xe=0;xe<2;++xe)this._field[2].size>this._field[xe].data.length&&(s.freeFloat(this._field[xe].data),this._field[xe].data=s.mallocFloat(this._field[2].size)),this._field[xe]=v(this._field[xe].data,[he[0]+2,he[1]+2]);if(q.coords){var we=q.coords;if(!Array.isArray(we)||we.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(xe=0;xe<2;++xe){var Me=we[xe];for(ke=0;ke<2;++ke)if(Me.shape[ke]!==he[ke])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[xe],Me)}}else if(q.ticks){var Se=q.ticks;if(!Array.isArray(Se)||Se.length!==2)throw new Error("gl-surface: invalid ticks");for(xe=0;xe<2;++xe){var Ie=Se[xe];if((Array.isArray(Ie)||Ie.length)&&(Ie=v(Ie)),Ie.shape[0]!==he[xe])throw new Error("gl-surface: invalid tick length");var Ve=v(Ie.data,he);Ve.stride[xe]=Ie.stride[0],Ve.stride[xe^1]=0,this.padField(this._field[xe],Ve)}}else{for(xe=0;xe<2;++xe){var Ge=[0,0];Ge[xe]=1,this._field[xe]=v(this._field[xe].data,[he[0]+2,he[1]+2],Ge,0)}this._field[0].set(0,0,0);for(var ke=0;ke0){for(var li=0;li<5;++li)Vt.pop();De-=1}continue e}}}Yt.push(De)}this._contourOffsets[Ht]=Kr,this._contourCounts[Ht]=Yt}var Yn=s.mallocFloat(Vt.length);for(xe=0;xeO||z<0||z>O)throw new Error("gl-texture2d: Invalid texture size");return A._shape=[x,z],A.bind(),I.texImage2D(I.TEXTURE_2D,0,A.format,x,z,0,A.format,A.type,null),A._mipLevels=[0],A}function i(A,x,z,I,O,D){this.gl=A,this.handle=x,this.format=O,this.type=D,this._shape=[z,I],this._mipLevels=[0],this._magFilter=A.NEAREST,this._minFilter=A.NEAREST,this._wrapS=A.CLAMP_TO_EDGE,this._wrapT=A.CLAMP_TO_EDGE,this._anisoSamples=1;var B=this,F=[this._wrapS,this._wrapT];Object.defineProperties(F,[{get:function(){return B._wrapS},set:function(j){return B.wrapS=j}},{get:function(){return B._wrapT},set:function(j){return B.wrapT=j}}]),this._wrapVector=F;var P=[this._shape[0],this._shape[1]];Object.defineProperties(P,[{get:function(){return B._shape[0]},set:function(j){return B.width=j}},{get:function(){return B._shape[1]},set:function(j){return B.height=j}}]),this._shapeVector=P}var w=i.prototype;Object.defineProperties(w,{minFilter:{get:function(){return this._minFilter},set:function(A){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(A)>=0&&(x.getExtension("OES_texture_float_linear")||(A=x.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,A),this._minFilter=A}},magFilter:{get:function(){return this._magFilter},set:function(A){this.bind();var x=this.gl;if(this.type===x.FLOAT&&o.indexOf(A)>=0&&(x.getExtension("OES_texture_float_linear")||(A=x.NEAREST)),s.indexOf(A)<0)throw new Error("gl-texture2d: Unknown filter mode "+A);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,A),this._magFilter=A}},mipSamples:{get:function(){return this._anisoSamples},set:function(A){var x=this._anisoSamples;if(this._anisoSamples=Math.max(A,1)|0,x!==this._anisoSamples){var z=this.gl.getExtension("EXT_texture_filter_anisotropic");z&&this.gl.texParameterf(this.gl.TEXTURE_2D,z.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,A),this._wrapS=A}},wrapT:{get:function(){return this._wrapT},set:function(A){if(this.bind(),c.indexOf(A)<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,A),this._wrapT=A}},wrap:{get:function(){return this._wrapVector},set:function(A){if(Array.isArray(A)||(A=[A,A]),A.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var x=0;x<2;++x)if(c.indexOf(A[x])<0)throw new Error("gl-texture2d: Unknown wrap mode "+A);this._wrapS=A[0],this._wrapT=A[1];var z=this.gl;return this.bind(),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_S,this._wrapS),z.texParameteri(z.TEXTURE_2D,z.TEXTURE_WRAP_T,this._wrapT),A}},shape:{get:function(){return this._shapeVector},set:function(A){if(!Array.isArray(A))A=[A|0,A|0];else if(A.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return g(this,A[0]|0,A[1]|0),[A[0]|0,A[1]|0]}},width:{get:function(){return this._shape[0]},set:function(A){return A=A|0,g(this,A,this._shape[1]),A}},height:{get:function(){return this._shape[1]},set:function(A){return A=A|0,g(this,this._shape[0],A),A}}}),w.bind=function(A){var x=this.gl;return A!==void 0&&x.activeTexture(x.TEXTURE0+(A|0)),x.bindTexture(x.TEXTURE_2D,this.handle),A!==void 0?A|0:x.getParameter(x.ACTIVE_TEXTURE)-x.TEXTURE0},w.dispose=function(){this.gl.deleteTexture(this.handle)},w.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var A=Math.min(this._shape[0],this._shape[1]),x=0;A>0;++x,A>>>=1)this._mipLevels.indexOf(x)<0&&this._mipLevels.push(x)},w.setPixels=function(A,x,z,I){var O=this.gl;this.bind(),Array.isArray(x)?(I=z,z=x[1]|0,x=x[0]|0):(x=x||0,z=z||0),I=I||0;var D=h(A)?A:A.raw;if(D){var B=this._mipLevels.indexOf(I)<0;B?(O.texImage2D(O.TEXTURE_2D,0,this.format,this.format,this.type,D),this._mipLevels.push(I)):O.texSubImage2D(O.TEXTURE_2D,I,x,z,this.format,this.type,D)}else if(A.shape&&A.stride&&A.data){if(A.shape.length<2||x+A.shape[1]>this._shape[1]>>>I||z+A.shape[0]>this._shape[0]>>>I||x<0||z<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");M(O,x,z,I,this.format,this.type,this._mipLevels,A)}else throw new Error("gl-texture2d: Unsupported data type")};function S(A,x){return A.length===3?x[2]===1&&x[1]===A[0]*A[2]&&x[0]===A[2]:x[0]===1&&x[1]===A[0]}function M(A,x,z,I,O,D,B,F){var P=F.dtype,j=F.shape.slice();if(j.length<2||j.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var U=0,$=0,Q=S(j,F.stride.slice());P==="float32"?U=A.FLOAT:P==="float64"?(U=A.FLOAT,Q=!1,P="float32"):P==="uint8"?U=A.UNSIGNED_BYTE:(U=A.UNSIGNED_BYTE,Q=!1,P="uint8");var re=1;if(j.length===2)$=A.LUMINANCE,j=[j[0],j[1],1],F=n(F.data,j,[F.stride[0],F.stride[1],1],F.offset);else if(j.length===3){if(j[2]===1)$=A.ALPHA;else if(j[2]===2)$=A.LUMINANCE_ALPHA;else if(j[2]===3)$=A.RGB;else if(j[2]===4)$=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");re=j[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if(($===A.LUMINANCE||$===A.ALPHA)&&(O===A.LUMINANCE||O===A.ALPHA)&&($=O),$!==O)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var ne=F.size,se=B.indexOf(I)<0;if(se&&B.push(I),U===D&&Q)F.offset===0&&F.data.length===ne?se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,F.data):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,F.data):se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,F.data.subarray(F.offset,F.offset+ne)):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,F.data.subarray(F.offset,F.offset+ne));else{var G;D===A.FLOAT?G=a.mallocFloat32(ne):G=a.mallocUint8(ne);var X=n(G,j,[j[2],j[2]*j[0],1]);U===A.FLOAT&&D===A.UNSIGNED_BYTE?v(X,F):r.assign(X,F),se?A.texImage2D(A.TEXTURE_2D,I,O,j[0],j[1],0,O,D,G.subarray(0,ne)):A.texSubImage2D(A.TEXTURE_2D,I,x,z,j[0],j[1],O,D,G.subarray(0,ne)),D===A.FLOAT?a.freeFloat32(G):a.freeUint8(G)}}function C(A){var x=A.createTexture();return A.bindTexture(A.TEXTURE_2D,x),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MIN_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_MAG_FILTER,A.NEAREST),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_S,A.CLAMP_TO_EDGE),A.texParameteri(A.TEXTURE_2D,A.TEXTURE_WRAP_T,A.CLAMP_TO_EDGE),x}function _(A,x,z,I,O){var D=A.getParameter(A.MAX_TEXTURE_SIZE);if(x<0||x>D||z<0||z>D)throw new Error("gl-texture2d: Invalid texture shape");if(O===A.FLOAT&&!A.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,I,x,z,0,I,O,null),new i(A,B,x,z,I,O)}function T(A,x,z,I,O,D){var B=C(A);return A.texImage2D(A.TEXTURE_2D,0,O,O,D,x),new i(A,B,z,I,O,D)}function f(A,x){var z=x.dtype,I=x.shape.slice(),O=A.getParameter(A.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>O||I[1]<0||I[1]>O)throw new Error("gl-texture2d: Invalid texture size");var D=S(I,x.stride.slice()),B=0;z==="float32"?B=A.FLOAT:z==="float64"?(B=A.FLOAT,D=!1,z="float32"):z==="uint8"?B=A.UNSIGNED_BYTE:(B=A.UNSIGNED_BYTE,D=!1,z="uint8");var F=0;if(I.length===2)F=A.LUMINANCE,I=[I[0],I[1],1],x=n(x.data,I,[x.stride[0],x.stride[1],1],x.offset);else if(I.length===3)if(I[2]===1)F=A.ALPHA;else if(I[2]===2)F=A.LUMINANCE_ALPHA;else if(I[2]===3)F=A.RGB;else if(I[2]===4)F=A.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");B===A.FLOAT&&!A.getExtension("OES_texture_float")&&(B=A.UNSIGNED_BYTE,D=!1);var P,j,U=x.size;if(D)x.offset===0&&x.data.length===U?P=x.data:P=x.data.subarray(x.offset,x.offset+U);else{var $=[I[2],I[2]*I[0],1];j=a.malloc(U,z);var Q=n(j,I,$,0);(z==="float32"||z==="float64")&&B===A.UNSIGNED_BYTE?v(Q,x):r.assign(Q,x),P=j.subarray(0,U)}var re=C(A);return A.texImage2D(A.TEXTURE_2D,0,F,I[0],I[1],0,F,B,P),D||a.free(j),new i(A,re,I[0],I[1],F,B)}function u(A){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(o||m(A),typeof arguments[1]=="number")return _(A,arguments[1],arguments[2],arguments[3]||A.RGBA,arguments[4]||A.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return _(A,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var x=arguments[1],z=h(x)?x:x.raw;if(z)return T(A,z,x.width|0,x.height|0,arguments[2]||A.RGBA,arguments[3]||A.UNSIGNED_BYTE);if(x.shape&&x.data&&x.stride)return f(A,x)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},1433:function(l){"use strict";function e(t,n,r){n?n.bind():t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,null);var a=t.getParameter(t.MAX_VERTEX_ATTRIBS)|0;if(r){if(r.length>a)throw new Error("gl-vao: Too many vertex attributes");for(var o=0;o1?0:Math.acos(v)}},9226:function(l){l.exports=e;function e(t,n){return t[0]=Math.ceil(n[0]),t[1]=Math.ceil(n[1]),t[2]=Math.ceil(n[2]),t}},3126:function(l){l.exports=e;function e(t){var n=new Float32Array(3);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n}},3990:function(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t}},1091:function(l){l.exports=e;function e(){var t=new Float32Array(3);return t[0]=0,t[1]=0,t[2]=0,t}},5911:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2];return t[0]=o*h-s*m,t[1]=s*c-a*h,t[2]=a*m-o*c,t}},5455:function(l,e,t){l.exports=t(7056)},7056:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return Math.sqrt(r*r+a*a+o*o)}},4008:function(l,e,t){l.exports=t(6690)},6690:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t}},244:function(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]}},2613:function(l){l.exports=1e-6},9922:function(l,e,t){l.exports=r;var n=t(2613);function r(a,o){var s=a[0],c=a[1],m=a[2],h=o[0],v=o[1],g=o[2];return Math.abs(s-h)<=n*Math.max(1,Math.abs(s),Math.abs(h))&&Math.abs(c-v)<=n*Math.max(1,Math.abs(c),Math.abs(v))&&Math.abs(m-g)<=n*Math.max(1,Math.abs(m),Math.abs(g))}},9265:function(l){l.exports=e;function e(t,n){return t[0]===n[0]&&t[1]===n[1]&&t[2]===n[2]}},2681:function(l){l.exports=e;function e(t,n){return t[0]=Math.floor(n[0]),t[1]=Math.floor(n[1]),t[2]=Math.floor(n[2]),t}},5137:function(l,e,t){l.exports=r;var n=t(1091)();function r(a,o,s,c,m,h){var v,g;for(o||(o=3),s||(s=0),c?g=Math.min(c*o+s,a.length):g=a.length,v=s;v0&&(s=1/Math.sqrt(s),t[0]=n[0]*s,t[1]=n[1]*s,t[2]=n[2]*s),t}},7636:function(l){l.exports=e;function e(t,n){n=n||1;var r=Math.random()*2*Math.PI,a=Math.random()*2-1,o=Math.sqrt(1-a*a)*n;return t[0]=Math.cos(r)*o,t[1]=Math.sin(r)*o,t[2]=a*n,t}},6894:function(l){l.exports=e;function e(t,n,r,a){var o=r[1],s=r[2],c=n[1]-o,m=n[2]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=n[0],t[1]=o+c*v-m*h,t[2]=s+c*h+m*v,t}},109:function(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[2],c=n[0]-o,m=n[2]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=o+m*h+c*v,t[1]=n[1],t[2]=s+m*v-c*h,t}},8692:function(l){l.exports=e;function e(t,n,r,a){var o=r[0],s=r[1],c=n[0]-o,m=n[1]-s,h=Math.sin(a),v=Math.cos(a);return t[0]=o+c*v-m*h,t[1]=s+c*h+m*v,t[2]=n[2],t}},2447:function(l){l.exports=e;function e(t,n){return t[0]=Math.round(n[0]),t[1]=Math.round(n[1]),t[2]=Math.round(n[2]),t}},6621:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t}},8489:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t}},1463:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n,t[1]=r,t[2]=a,t}},6141:function(l,e,t){l.exports=t(2953)},5486:function(l,e,t){l.exports=t(3066)},2953:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2];return r*r+a*a+o*o}},3066:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2];return n*n+r*r+a*a}},2229:function(l,e,t){l.exports=t(6843)},6843:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t}},492:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2];return t[0]=a*r[0]+o*r[3]+s*r[6],t[1]=a*r[1]+o*r[4]+s*r[7],t[2]=a*r[2]+o*r[5]+s*r[8],t}},5673:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[3]*a+r[7]*o+r[11]*s+r[15];return c=c||1,t[0]=(r[0]*a+r[4]*o+r[8]*s+r[12])/c,t[1]=(r[1]*a+r[5]*o+r[9]*s+r[13])/c,t[2]=(r[2]*a+r[6]*o+r[10]*s+r[14])/c,t}},264:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2],v=r[3],g=v*a+m*s-h*o,i=v*o+h*a-c*s,w=v*s+c*o-m*a,S=-c*a-m*o-h*s;return t[0]=g*v+S*-c+i*-h-w*-m,t[1]=i*v+S*-m+w*-c-g*-h,t[2]=w*v+S*-h+g*-m-i*-c,t}},4361:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]+r[0],t[1]=n[1]+r[1],t[2]=n[2]+r[2],t[3]=n[3]+r[3],t}},2335:function(l){l.exports=e;function e(t){var n=new Float32Array(4);return n[0]=t[0],n[1]=t[1],n[2]=t[2],n[3]=t[3],n}},2933:function(l){l.exports=e;function e(t,n){return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t}},7536:function(l){l.exports=e;function e(){var t=new Float32Array(4);return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t}},4691:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return Math.sqrt(r*r+a*a+o*o+s*s)}},1373:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]/r[0],t[1]=n[1]/r[1],t[2]=n[2]/r[2],t[3]=n[3]/r[3],t}},3750:function(l){l.exports=e;function e(t,n){return t[0]*n[0]+t[1]*n[1]+t[2]*n[2]+t[3]*n[3]}},3390:function(l){l.exports=e;function e(t,n,r,a){var o=new Float32Array(4);return o[0]=t,o[1]=n,o[2]=r,o[3]=a,o}},9970:function(l,e,t){l.exports={create:t(7536),clone:t(2335),fromValues:t(3390),copy:t(2933),set:t(4578),add:t(4361),subtract:t(6860),multiply:t(3576),divide:t(1373),min:t(2334),max:t(160),scale:t(9288),scaleAndAdd:t(4844),distance:t(4691),squaredDistance:t(7960),length:t(6808),squaredLength:t(483),negate:t(1498),inverse:t(4494),normalize:t(5177),dot:t(3750),lerp:t(2573),random:t(9131),transformMat4:t(5352),transformQuat:t(4041)}},4494:function(l){l.exports=e;function e(t,n){return t[0]=1/n[0],t[1]=1/n[1],t[2]=1/n[2],t[3]=1/n[3],t}},6808:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return Math.sqrt(n*n+r*r+a*a+o*o)}},2573:function(l){l.exports=e;function e(t,n,r,a){var o=n[0],s=n[1],c=n[2],m=n[3];return t[0]=o+a*(r[0]-o),t[1]=s+a*(r[1]-s),t[2]=c+a*(r[2]-c),t[3]=m+a*(r[3]-m),t}},160:function(l){l.exports=e;function e(t,n,r){return t[0]=Math.max(n[0],r[0]),t[1]=Math.max(n[1],r[1]),t[2]=Math.max(n[2],r[2]),t[3]=Math.max(n[3],r[3]),t}},2334:function(l){l.exports=e;function e(t,n,r){return t[0]=Math.min(n[0],r[0]),t[1]=Math.min(n[1],r[1]),t[2]=Math.min(n[2],r[2]),t[3]=Math.min(n[3],r[3]),t}},3576:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r[0],t[1]=n[1]*r[1],t[2]=n[2]*r[2],t[3]=n[3]*r[3],t}},1498:function(l){l.exports=e;function e(t,n){return t[0]=-n[0],t[1]=-n[1],t[2]=-n[2],t[3]=-n[3],t}},5177:function(l){l.exports=e;function e(t,n){var r=n[0],a=n[1],o=n[2],s=n[3],c=r*r+a*a+o*o+s*s;return c>0&&(c=1/Math.sqrt(c),t[0]=r*c,t[1]=a*c,t[2]=o*c,t[3]=s*c),t}},9131:function(l,e,t){var n=t(5177),r=t(9288);l.exports=a;function a(o,s){return s=s||1,o[0]=Math.random(),o[1]=Math.random(),o[2]=Math.random(),o[3]=Math.random(),n(o,o),r(o,o,s),o}},9288:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=n[3]*r,t}},4844:function(l){l.exports=e;function e(t,n,r,a){return t[0]=n[0]+r[0]*a,t[1]=n[1]+r[1]*a,t[2]=n[2]+r[2]*a,t[3]=n[3]+r[3]*a,t}},4578:function(l){l.exports=e;function e(t,n,r,a,o){return t[0]=n,t[1]=r,t[2]=a,t[3]=o,t}},7960:function(l){l.exports=e;function e(t,n){var r=n[0]-t[0],a=n[1]-t[1],o=n[2]-t[2],s=n[3]-t[3];return r*r+a*a+o*o+s*s}},483:function(l){l.exports=e;function e(t){var n=t[0],r=t[1],a=t[2],o=t[3];return n*n+r*r+a*a+o*o}},6860:function(l){l.exports=e;function e(t,n,r){return t[0]=n[0]-r[0],t[1]=n[1]-r[1],t[2]=n[2]-r[2],t[3]=n[3]-r[3],t}},5352:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=n[3];return t[0]=r[0]*a+r[4]*o+r[8]*s+r[12]*c,t[1]=r[1]*a+r[5]*o+r[9]*s+r[13]*c,t[2]=r[2]*a+r[6]*o+r[10]*s+r[14]*c,t[3]=r[3]*a+r[7]*o+r[11]*s+r[15]*c,t}},4041:function(l){l.exports=e;function e(t,n,r){var a=n[0],o=n[1],s=n[2],c=r[0],m=r[1],h=r[2],v=r[3],g=v*a+m*s-h*o,i=v*o+h*a-c*s,w=v*s+c*o-m*a,S=-c*a-m*o-h*s;return t[0]=g*v+S*-c+i*-h-w*-m,t[1]=i*v+S*-m+w*-c-g*-h,t[2]=w*v+S*-h+g*-m-i*-c,t[3]=n[3],t}},1848:function(l,e,t){var n=t(4905),r=t(6468);l.exports=a;function a(o){for(var s=Array.isArray(o)?o:n(o),c=0;c0)continue;Xe=le.slice(0,1).join("")}return ee(Xe),ne+=Xe.length,P=P.slice(Xe.length),P.length}while(!0)}function ke(){return/[^a-fA-F0-9]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function _e(){return B==="."||/[eE]/.test(B)?(P.push(B),D=S,F=B,I+1):B==="x"&&P.length===1&&P[0]==="0"?(D=u,P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ce(){return B==="f"&&(P.push(B),F=B,I+=1),/[eE]/.test(B)||(B==="-"||B==="+")&&/[eE]/.test(F)?(P.push(B),F=B,I+1):/[^\d]/.test(B)?(ee(P.join("")),D=c,I):(P.push(B),F=B,I+1)}function ve(){if(/[^\d\w_]/.test(B)){var le=P.join("");return Z[le]?D=_:q[le]?D=C:D=M,ee(P.join("")),D=c,I}return P.push(B),F=B,I+1}}},3508:function(l,e,t){var n=t(6852);n=n.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),l.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"])},6852:function(l){l.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"]},7932:function(l,e,t){var n=t(620);l.exports=n.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","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"])},620:function(l){l.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","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"]},7827:function(l){l.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},4905:function(l,e,t){var n=t(5874);l.exports=r;function r(a,o){var s=n(o),c=[];return c=c.concat(s(a)),c=c.concat(s(null)),c}},3236:function(l){l.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),n=[],r=0;r>1,g=-7,i=r?o-1:0,w=r?-1:1,S=t[n+i];for(i+=w,s=S&(1<<-g)-1,S>>=-g,g+=m;g>0;s=s*256+t[n+i],i+=w,g-=8);for(c=s&(1<<-g)-1,s>>=-g,g+=a;g>0;c=c*256+t[n+i],i+=w,g-=8);if(s===0)s=1-v;else{if(s===h)return c?NaN:(S?-1:1)*(1/0);c=c+Math.pow(2,a),s=s-v}return(S?-1:1)*c*Math.pow(2,s-a)},e.write=function(t,n,r,a,o,s){var c,m,h,v=s*8-o-1,g=(1<>1,w=o===23?Math.pow(2,-24)-Math.pow(2,-77):0,S=a?0:s-1,M=a?1:-1,C=n<0||n===0&&1/n<0?1:0;for(n=Math.abs(n),isNaN(n)||n===1/0?(m=isNaN(n)?1:0,c=g):(c=Math.floor(Math.log(n)/Math.LN2),n*(h=Math.pow(2,-c))<1&&(c--,h*=2),c+i>=1?n+=w/h:n+=w*Math.pow(2,1-i),n*h>=2&&(c++,h/=2),c+i>=g?(m=0,c=g):c+i>=1?(m=(n*h-1)*Math.pow(2,o),c=c+i):(m=n*Math.pow(2,i-1)*Math.pow(2,o),c=0));o>=8;t[r+S]=m&255,S+=M,m/=256,o-=8);for(c=c<0;t[r+S]=c&255,S+=M,c/=256,v-=8);t[r+S-M]|=C*128}},8954:function(l,e,t){"use strict";l.exports=i;var n=t(3250),r=t(6803).Fw;function a(w,S,M){this.vertices=w,this.adjacent=S,this.boundary=M,this.lastVisited=-1}a.prototype.flip=function(){var w=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=w;var S=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=S};function o(w,S,M){this.vertices=w,this.cell=S,this.index=M}function s(w,S){return r(w.vertices,S.vertices)}function c(w){return function(){var S=this.tuple;return w.apply(this,S)}}function m(w){var S=n[w+1];return S||(S=n),c(S)}var h=[];function v(w,S,M){this.dimension=w,this.vertices=S,this.simplices=M,this.interior=M.filter(function(T){return!T.boundary}),this.tuple=new Array(w+1);for(var C=0;C<=w;++C)this.tuple[C]=this.vertices[C];var _=h[w];_||(_=h[w]=m(w)),this.orient=_}var g=v.prototype;g.handleBoundaryDegeneracy=function(w,S){var M=this.dimension,C=this.vertices.length-1,_=this.tuple,T=this.vertices,f=[w];for(w.lastVisited=-C;f.length>0;){w=f.pop();for(var u=w.adjacent,A=0;A<=M;++A){var x=u[A];if(!(!x.boundary||x.lastVisited<=-C)){for(var z=x.vertices,I=0;I<=M;++I){var O=z[I];O<0?_[I]=S:_[I]=T[O]}var D=this.orient();if(D>0)return x;x.lastVisited=-C,D===0&&f.push(x)}}}return null},g.walk=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=S?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[f];e:for(;!u.boundary;){for(var A=u.vertices,x=u.adjacent,z=0;z<=C;++z)T[z]=_[A[z]];u.lastVisited=M;for(var z=0;z<=C;++z){var I=x[z];if(!(I.lastVisited>=M)){var O=T[z];T[z]=w;var D=this.orient();if(T[z]=O,D<0){u=I;continue e}else I.boundary?I.lastVisited=-M:I.lastVisited=M}}return}return u},g.addPeaks=function(w,S){var M=this.vertices.length-1,C=this.dimension,_=this.vertices,T=this.tuple,f=this.interior,u=this.simplices,A=[S];S.lastVisited=M,S.vertices[S.vertices.indexOf(-1)]=M,S.boundary=!1,f.push(S);for(var x=[];A.length>0;){var S=A.pop(),z=S.vertices,I=S.adjacent,O=z.indexOf(M);if(!(O<0)){for(var D=0;D<=C;++D)if(D!==O){var B=I[D];if(!(!B.boundary||B.lastVisited>=M)){var F=B.vertices;if(B.lastVisited!==-M){for(var P=0,j=0;j<=C;++j)F[j]<0?(P=j,T[j]=w):T[j]=_[F[j]];var U=this.orient();if(U>0){F[P]=M,B.boundary=!1,f.push(B),A.push(B),B.lastVisited=M;continue}else B.lastVisited=-M}var $=B.adjacent,Q=z.slice(),re=I.slice(),ne=new a(Q,re,!0);u.push(ne);var se=$.indexOf(S);if(!(se<0)){$[se]=ne,re[O]=B,Q[D]=-1,re[D]=S,I[D]=ne,ne.flip();for(var j=0;j<=C;++j){var G=Q[j];if(!(G<0||G===M)){for(var X=new Array(C-1),K=0,H=0;H<=C;++H){var Y=Q[H];Y<0||H===j||(X[K++]=Y)}x.push(new o(X,ne,j))}}}}}}}x.sort(s);for(var D=0;D+1=0?f[A++]=u[z]:x=z&1;if(x===(w&1)){var I=f[0];f[0]=f[1],f[1]=I}S.push(f)}}return S};function i(w,S){var M=w.length;if(M===0)throw new Error("Must have at least d+1 points");var C=w[0].length;if(M<=C)throw new Error("Must input at least d+1 points");var _=w.slice(0,C+1),T=n.apply(void 0,_);if(T===0)throw new Error("Input not in general position");for(var f=new Array(C+1),u=0;u<=C;++u)f[u]=u;T<0&&(f[0]=1,f[1]=0);for(var A=new a(f,new Array(C+1),!1),x=A.adjacent,z=new Array(C+2),u=0;u<=C;++u){for(var I=f.slice(),O=0;O<=C;++O)O===u&&(I[O]=-1);var D=I[0];I[0]=I[1],I[1]=D;var B=new a(I,new Array(C+1),!0);x[u]=B,z[u]=B}z[C+1]=A;for(var u=0;u<=C;++u)for(var I=x[u].vertices,F=x[u].adjacent,O=0;O<=C;++O){var P=I[O];if(P<0){F[O]=A;continue}for(var j=0;j<=C;++j)x[j].vertices.indexOf(P)<0&&(F[O]=x[j])}for(var U=new v(C,_,z),$=!!S,u=C+1;u3*(z+1)?v(this,x):this.left.insert(x):this.left=T([x]);else if(x[0]>this.mid)this.right?4*(this.right.count+1)>3*(z+1)?v(this,x):this.right.insert(x):this.right=T([x]);else{var I=n.ge(this.leftPoints,x,C),O=n.ge(this.rightPoints,x,_);this.leftPoints.splice(I,0,x),this.rightPoints.splice(O,0,x)}},c.remove=function(x){var z=this.count-this.leftPoints;if(x[1]3*(z-1))return g(this,x);var O=this.left.remove(x);return O===o?(this.left=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else if(x[0]>this.mid){if(!this.right)return r;var D=this.left?this.left.count:0;if(4*D>3*(z-1))return g(this,x);var O=this.right.remove(x);return O===o?(this.right=null,this.count-=1,a):(O===a&&(this.count-=1),O)}else{if(this.count===1)return this.leftPoints[0]===x?o:r;if(this.leftPoints.length===1&&this.leftPoints[0]===x){if(this.left&&this.right){for(var B=this,F=this.left;F.right;)B=F,F=F.right;if(B===this)F.right=this.right;else{var P=this.left,O=this.right;B.count-=F.count,B.right=F.left,F.left=P,F.right=O}m(this,F),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?m(this,this.left):m(this,this.right);return a}for(var P=n.ge(this.leftPoints,x,C);P=0&&x[O][1]>=z;--O){var D=I(x[O]);if(D)return D}}function S(x,z){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(x,z);if(I)return I}return w(this.rightPoints,x,z)}else return S(this.leftPoints,z)},c.queryInterval=function(x,z,I){if(xthis.mid&&this.right){var O=this.right.queryInterval(x,z,I);if(O)return O}return zthis.mid?w(this.rightPoints,x,I):S(this.leftPoints,I)};function M(x,z){return x-z}function C(x,z){var I=x[0]-z[0];return I||x[1]-z[1]}function _(x,z){var I=x[1]-z[1];return I||x[0]-z[0]}function T(x){if(x.length===0)return null;for(var z=[],I=0;I>1],D=[],B=[],F=[],I=0;I13)&&n!==32&&n!==133&&n!==160&&n!==5760&&n!==6158&&(n<8192||n>8205)&&n!==8232&&n!==8233&&n!==8239&&n!==8287&&n!==8288&&n!==12288&&n!==65279)return!1;return!0}},395:function(l){function e(t,n,r){return t*(1-r)+n*r}l.exports=e},2652:function(l,e,t){var n=t(4335),r=t(6864),a=t(1903),o=t(9921),s=t(7608),c=t(5665),m={length:t(1387),normalize:t(3536),dot:t(244),cross:t(5911)},h=r(),v=r(),g=[0,0,0,0],i=[[0,0,0],[0,0,0],[0,0,0]],w=[0,0,0];l.exports=function(T,f,u,A,x,z){if(f||(f=[0,0,0]),u||(u=[0,0,0]),A||(A=[0,0,0]),x||(x=[0,0,0,1]),z||(z=[0,0,0,1]),!n(h,T)||(a(v,h),v[3]=0,v[7]=0,v[11]=0,v[15]=1,Math.abs(o(v)<1e-8)))return!1;var I=h[3],O=h[7],D=h[11],B=h[12],F=h[13],P=h[14],j=h[15];if(I!==0||O!==0||D!==0){g[0]=I,g[1]=O,g[2]=D,g[3]=j;var U=s(v,v);if(!U)return!1;c(v,v),S(x,g,v)}else x[0]=x[1]=x[2]=0,x[3]=1;if(f[0]=B,f[1]=F,f[2]=P,M(i,h),u[0]=m.length(i[0]),m.normalize(i[0],i[0]),A[0]=m.dot(i[0],i[1]),C(i[1],i[1],i[0],1,-A[0]),u[1]=m.length(i[1]),m.normalize(i[1],i[1]),A[0]/=u[1],A[1]=m.dot(i[0],i[2]),C(i[2],i[2],i[0],1,-A[1]),A[2]=m.dot(i[1],i[2]),C(i[2],i[2],i[1],1,-A[2]),u[2]=m.length(i[2]),m.normalize(i[2],i[2]),A[1]/=u[2],A[2]/=u[2],m.cross(w,i[1],i[2]),m.dot(i[0],w)<0)for(var $=0;$<3;$++)u[$]*=-1,i[$][0]*=-1,i[$][1]*=-1,i[$][2]*=-1;return z[0]=.5*Math.sqrt(Math.max(1+i[0][0]-i[1][1]-i[2][2],0)),z[1]=.5*Math.sqrt(Math.max(1-i[0][0]+i[1][1]-i[2][2],0)),z[2]=.5*Math.sqrt(Math.max(1-i[0][0]-i[1][1]+i[2][2],0)),z[3]=.5*Math.sqrt(Math.max(1+i[0][0]+i[1][1]+i[2][2],0)),i[2][1]>i[1][2]&&(z[0]=-z[0]),i[0][2]>i[2][0]&&(z[1]=-z[1]),i[1][0]>i[0][1]&&(z[2]=-z[2]),!0};function S(_,T,f){var u=T[0],A=T[1],x=T[2],z=T[3];return _[0]=f[0]*u+f[4]*A+f[8]*x+f[12]*z,_[1]=f[1]*u+f[5]*A+f[9]*x+f[13]*z,_[2]=f[2]*u+f[6]*A+f[10]*x+f[14]*z,_[3]=f[3]*u+f[7]*A+f[11]*x+f[15]*z,_}function M(_,T){_[0][0]=T[0],_[0][1]=T[1],_[0][2]=T[2],_[1][0]=T[4],_[1][1]=T[5],_[1][2]=T[6],_[2][0]=T[8],_[2][1]=T[9],_[2][2]=T[10]}function C(_,T,f,u,A){_[0]=T[0]*u+f[0]*A,_[1]=T[1]*u+f[1]*A,_[2]=T[2]*u+f[2]*A}},4335:function(l){l.exports=function(t,n){var r=n[15];if(r===0)return!1;for(var a=1/r,o=0;o<16;o++)t[o]=n[o]*a;return!0}},7442:function(l,e,t){var n=t(6658),r=t(7182),a=t(2652),o=t(9921),s=t(8648),c=g(),m=g(),h=g();l.exports=v;function v(S,M,C,_){if(o(M)===0||o(C)===0)return!1;var T=a(M,c.translate,c.scale,c.skew,c.perspective,c.quaternion),f=a(C,m.translate,m.scale,m.skew,m.perspective,m.quaternion);return!T||!f?!1:(n(h.translate,c.translate,m.translate,_),n(h.skew,c.skew,m.skew,_),n(h.scale,c.scale,m.scale,_),n(h.perspective,c.perspective,m.perspective,_),s(h.quaternion,c.quaternion,m.quaternion,_),r(S,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function g(){return{translate:i(),scale:i(1),skew:i(),perspective:w(),quaternion:w()}}function i(S){return[S||0,S||0,S||0]}function w(){return[0,0,0,1]}},7182:function(l,e,t){var n={identity:t(7894),translate:t(7656),multiply:t(6760),create:t(6864),scale:t(2504),fromRotationTranslation:t(6743)},r=n.create(),a=n.create();l.exports=function(s,c,m,h,v,g){return n.identity(s),n.fromRotationTranslation(s,g,c),s[3]=v[0],s[7]=v[1],s[11]=v[2],s[15]=v[3],n.identity(a),h[2]!==0&&(a[9]=h[2],n.multiply(s,s,a)),h[1]!==0&&(a[9]=0,a[8]=h[1],n.multiply(s,s,a)),h[0]!==0&&(a[8]=0,a[4]=h[0],n.multiply(s,s,a)),n.scale(s,s,m),s}},1811:function(l,e,t){"use strict";var n=t(2478),r=t(7442),a=t(7608),o=t(5567),s=t(2408),c=t(7089),m=t(6582),h=t(7656),v=t(2504),g=t(3536),i=[0,0,0];l.exports=C;function w(_){this._components=_.slice(),this._time=[0],this.prevMatrix=_.slice(),this.nextMatrix=_.slice(),this.computedMatrix=_.slice(),this.computedInverse=_.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]}var S=w.prototype;S.recalcMatrix=function(_){var T=this._time,f=n.le(T,_),u=this.computedMatrix;if(!(f<0)){var A=this._components;if(f===T.length-1)for(var x=16*f,z=0;z<16;++z)u[z]=A[x++];else{for(var I=T[f+1]-T[f],x=16*f,O=this.prevMatrix,D=!0,z=0;z<16;++z)O[z]=A[x++];for(var B=this.nextMatrix,z=0;z<16;++z)B[z]=A[x++],D=D&&O[z]===B[z];if(I<1e-6||D)for(var z=0;z<16;++z)u[z]=O[z];else r(u,O,B,(_-T[f])/I)}var F=this.computedUp;F[0]=u[1],F[1]=u[5],F[2]=u[9],g(F,F);var P=this.computedInverse;a(P,u);var j=this.computedEye,U=P[15];j[0]=P[12]/U,j[1]=P[13]/U,j[2]=P[14]/U;for(var $=this.computedCenter,Q=Math.exp(this.computedRadius[0]),z=0;z<3;++z)$[z]=j[z]-u[2+4*z]*Q}},S.idle=function(_){if(!(_1&&n(a[m[i-2]],a[m[i-1]],g)<=0;)i-=1,m.pop();for(m.push(v),i=h.length;i>1&&n(a[h[i-2]],a[h[i-1]],g)>=0;)i-=1,h.pop();h.push(v)}for(var w=new Array(h.length+m.length-2),S=0,s=0,M=m.length;s0;--C)w[S++]=h[C];return w}},351:function(l,e,t){"use strict";l.exports=r;var n=t(4687);function r(a,o){o||(o=a,a=window);var s=0,c=0,m=0,h={shift:!1,alt:!1,control:!1,meta:!1},v=!1;function g(x){var z=!1;return"altKey"in x&&(z=z||x.altKey!==h.alt,h.alt=!!x.altKey),"shiftKey"in x&&(z=z||x.shiftKey!==h.shift,h.shift=!!x.shiftKey),"ctrlKey"in x&&(z=z||x.ctrlKey!==h.control,h.control=!!x.ctrlKey),"metaKey"in x&&(z=z||x.metaKey!==h.meta,h.meta=!!x.metaKey),z}function i(x,z){var I=n.x(z),O=n.y(z);"buttons"in z&&(x=z.buttons|0),(x!==s||I!==c||O!==m||g(z))&&(s=x|0,c=I||0,m=O||0,o&&o(s,c,m,h))}function w(x){i(0,x)}function S(){(s||c||m||h.shift||h.alt||h.meta||h.control)&&(c=m=0,s=0,h.shift=h.alt=h.control=h.meta=!1,o&&o(0,0,0,h))}function M(x){g(x)&&o&&o(s,c,m,h)}function C(x){n.buttons(x)===0?i(0,x):i(s,x)}function _(x){i(s|n.buttons(x),x)}function T(x){i(s&~n.buttons(x),x)}function f(){v||(v=!0,a.addEventListener("mousemove",C),a.addEventListener("mousedown",_),a.addEventListener("mouseup",T),a.addEventListener("mouseleave",w),a.addEventListener("mouseenter",w),a.addEventListener("mouseout",w),a.addEventListener("mouseover",w),a.addEventListener("blur",S),a.addEventListener("keyup",M),a.addEventListener("keydown",M),a.addEventListener("keypress",M),a!==window&&(window.addEventListener("blur",S),window.addEventListener("keyup",M),window.addEventListener("keydown",M),window.addEventListener("keypress",M)))}function u(){v&&(v=!1,a.removeEventListener("mousemove",C),a.removeEventListener("mousedown",_),a.removeEventListener("mouseup",T),a.removeEventListener("mouseleave",w),a.removeEventListener("mouseenter",w),a.removeEventListener("mouseout",w),a.removeEventListener("mouseover",w),a.removeEventListener("blur",S),a.removeEventListener("keyup",M),a.removeEventListener("keydown",M),a.removeEventListener("keypress",M),a!==window&&(window.removeEventListener("blur",S),window.removeEventListener("keyup",M),window.removeEventListener("keydown",M),window.removeEventListener("keypress",M)))}f();var A={element:a};return Object.defineProperties(A,{enabled:{get:function(){return v},set:function(x){x?f():u()},enumerable:!0},buttons:{get:function(){return s},enumerable:!0},x:{get:function(){return c},enumerable:!0},y:{get:function(){return m},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),A}},24:function(l){var e={left:0,top:0};l.exports=t;function t(r,a,o){a=a||r.currentTarget||r.srcElement,Array.isArray(o)||(o=[0,0]);var s=r.clientX||0,c=r.clientY||0,m=n(a);return o[0]=s-m.left,o[1]=c-m.top,o}function n(r){return r===window||r===document||r===document.body?e:r.getBoundingClientRect()}},4687:function(l,e){"use strict";function t(o){if(typeof o=="object"){if("buttons"in o)return o.buttons;if("which"in o){var s=o.which;if(s===2)return 4;if(s===3)return 2;if(s>0)return 1<=0)return 1<0){if(re=1,G[K++]=h(f[z],S,M,C),z+=U,_>0)for(Q=1,I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==Z&&m(X[K+Y],Se,j,D,Me,Z,S,M,C)),K+=1,z+=U;for(z+=$,K=0,Ie=Y,Y=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,re=2;re0)for(Q=1,I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,F,j,he,Me,S,M,C)),K+=1,z+=U,Q=2;Q<_;++Q)I=f[z],H=G[K]=h(I,S,M,C),Z=G[K+Y],he=G[K+ee],Me=G[K+xe],(H!==Z||H!==he||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,Z,he,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,F,j,he,Me,S,M,C),Me!==Z&&m(X[K+Y],Se,j,D,Me,Z,S,M,C)),K+=1,z+=U;re&1&&(K=0),Ie=Y,Y=q,q=Ie,Ie=ee,ee=ae,ae=Ie,Ie=xe,xe=we,we=Ie,z+=$}}g(X),g(G)}},"false,1,0":function(c,m,h,v,g){return function(w,S,M,C){var _=w.shape[0]|0,T=w.shape[1]|0,f=w.data,u=w.offset|0,A=w.stride[0]|0,x=w.stride[1]|0,z=u,I,O=-A|0,D=0,B=-x|0,F=0,P=-A-x|0,j=0,U=x|0,$=A-x*T|0,Q=0,re=0,ne=0,se=2*T|0,G=v(se),X=v(se),K=0,H=0,Y=-1,q=-1,Z=0,ee=-T|0,ae=T|0,he=0,xe=-T-1|0,we=T-1|0,Me=0,Se=0,Ie=0;for(re=0;re0){if(Q=1,G[K++]=h(f[z],S,M,C),z+=U,T>0)for(re=1,I=f[z],H=G[K]=h(I,S,M,C),he=G[K+ee],Z=G[K+Y],Me=G[K+xe],(H!==he||H!==Z||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,he,Z,Me,S,M,C),Se=X[K]=ne++),K+=1,z+=U,re=2;re0)for(re=1,I=f[z],H=G[K]=h(I,S,M,C),he=G[K+ee],Z=G[K+Y],Me=G[K+xe],(H!==he||H!==Z||H!==Me)&&(D=f[z+O],F=f[z+B],j=f[z+P],c(Q,re,I,D,F,j,H,he,Z,Me,S,M,C),Se=X[K]=ne++,Me!==he&&m(X[K+ee],Se,j,D,Me,he,S,M,C)),K+=1,z+=U,re=2;re 0"),typeof s.vertex!="function"&&c("Must specify vertex creation function"),typeof s.cell!="function"&&c("Must specify cell creation function"),typeof s.phase!="function"&&c("Must specify phase function");for(var g=s.getters||[],i=new Array(h),w=0;w=0?i[w]=!0:i[w]=!1;return a(s.vertex,s.cell,s.phase,v,m,i)}},6199:function(l,e,t){"use strict";var n=t(1338),r={zero:function(C,_,T,f){var u=C[0],A=T[0];f|=0;var x=0,z=A;for(x=0;x2&&x[1]>2&&f(A.pick(-1,-1).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,0).lo(1,1).hi(x[0]-2,x[1]-2),u.pick(-1,-1,1).lo(1,1).hi(x[0]-2,x[1]-2)),x[1]>2&&(T(A.pick(0,-1).lo(1).hi(x[1]-2),u.pick(0,-1,1).lo(1).hi(x[1]-2)),_(u.pick(0,-1,0).lo(1).hi(x[1]-2))),x[1]>2&&(T(A.pick(x[0]-1,-1).lo(1).hi(x[1]-2),u.pick(x[0]-1,-1,1).lo(1).hi(x[1]-2)),_(u.pick(x[0]-1,-1,0).lo(1).hi(x[1]-2))),x[0]>2&&(T(A.pick(-1,0).lo(1).hi(x[0]-2),u.pick(-1,0,0).lo(1).hi(x[0]-2)),_(u.pick(-1,0,1).lo(1).hi(x[0]-2))),x[0]>2&&(T(A.pick(-1,x[1]-1).lo(1).hi(x[0]-2),u.pick(-1,x[1]-1,0).lo(1).hi(x[0]-2)),_(u.pick(-1,x[1]-1,1).lo(1).hi(x[0]-2))),u.set(0,0,0,0),u.set(0,0,1,0),u.set(x[0]-1,0,0,0),u.set(x[0]-1,0,1,0),u.set(0,x[1]-1,0,0),u.set(0,x[1]-1,1,0),u.set(x[0]-1,x[1]-1,0,0),u.set(x[0]-1,x[1]-1,1,0),u}}function M(C){var _=C.join(),x=h[_];if(x)return x;for(var T=C.length,f=[g,i],u=1;u<=T;++u)f.push(w(u));var A=S,x=A.apply(void 0,f);return h[_]=x,x}l.exports=function(_,T,f){if(Array.isArray(f)||(typeof f=="string"?f=n(T.dimension,f):f=n(T.dimension,"clamp")),T.size===0)return _;if(T.dimension===0)return _.set(0),_;var u=M(f);return u(_,T)}},4317:function(l){"use strict";function e(o,s){var c=Math.floor(s),m=s-c,h=0<=c&&c0;){F<64?(_=F,F=0):(_=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(T=P,P=0):(T=64,P-=64),i=D+F*u+P*A,M=B+F*z+P*I;var j=0,U=0,$=0,Q=x,re=u-f*x,ne=A-_*u,se=O,G=z-f*O,X=I-_*z;for($=0;$0;){I<64?(_=I,I=0):(_=64,I-=64);for(var O=h[0]|0;O>0;){O<64?(C=O,O=0):(C=64,O-=64),i=x+I*f+O*T,M=z+I*A+O*u;var D=0,B=0,F=f,P=T-_*f,j=A,U=u-_*A;for(B=0;B0;){B<64?(T=B,B=0):(T=64,B-=64);for(var F=h[0]|0;F>0;){F<64?(C=F,F=0):(C=64,F-=64);for(var P=h[1]|0;P>0;){P<64?(_=P,P=0):(_=64,P-=64),i=O+B*A+F*f+P*u,M=D+B*I+F*x+P*z;var j=0,U=0,$=0,Q=A,re=f-T*A,ne=u-C*f,se=I,G=x-T*I,X=z-C*x;for($=0;$<_;++$){for(U=0;Uw;){j=0,U=D-_;t:for(F=0;FQ)break t;U+=x,j+=z}for(j=D,U=D-_,F=0;F>1,P=F-O,j=F+O,U=D,$=P,Q=F,re=j,ne=B,se=S+1,G=M-1,X=!0,K,H,Y,q,Z,ee,ae,he,xe,we=0,Me=0,Se=0,Ie,Ve,Ge,ke,_e,ce,ve,le,Ae,Be,Xe,Ye,yt,gt,Tt,At,$t=A,rr=g($t),_r=g($t);Ve=T*U,Ge=T*$,At=_;e:for(Ie=0;Ie0){H=U,U=$,$=H;break e}if(Se<0)break e;At+=z}Ve=T*re,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}Ve=T*U,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=U,U=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*U,Ge=T*re,At=_;e:for(Ie=0;Ie0){H=U,U=re,re=H;break e}if(Se<0)break e;At+=z}Ve=T*Q,Ge=T*re,At=_;e:for(Ie=0;Ie0){H=Q,Q=re,re=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=$,$=ne,ne=H;break e}if(Se<0)break e;At+=z}Ve=T*$,Ge=T*Q,At=_;e:for(Ie=0;Ie0){H=$,$=Q,Q=H;break e}if(Se<0)break e;At+=z}Ve=T*re,Ge=T*ne,At=_;e:for(Ie=0;Ie0){H=re,re=ne,ne=H;break e}if(Se<0)break e;At+=z}for(Ve=T*U,Ge=T*$,ke=T*Q,_e=T*re,ce=T*ne,ve=T*D,le=T*F,Ae=T*B,Tt=0,At=_,Ie=0;Ie0)G--;else if(Se<0){for(Ve=T*ee,Ge=T*se,ke=T*G,At=_,Ie=0;Ie0)for(;;){ae=_+G*T,Tt=0;e:for(Ie=0;Ie0){if(--GB){e:for(;;){for(ae=_+se*T,Tt=0,At=_,Ie=0;Ie1&&w?M(i,w[0],w[1]):M(i)}var m={"uint32,1,0":function(v,g){return function(i){var w=i.data,S=i.offset|0,M=i.shape,C=i.stride,_=C[0]|0,T=M[0]|0,f=C[1]|0,u=M[1]|0,A=f,x=f,z=1;T<=32?v(0,T-1,w,S,_,f,T,u,A,x,z):g(0,T-1,w,S,_,f,T,u,A,x,z)}}};function h(v,g){var i=[g,v].join(","),w=m[i],S=o(v,g),M=c(v,g,S);return w(S,M)}l.exports=h},446:function(l,e,t){"use strict";var n=t(7640),r={};function a(o){var s=o.order,c=o.dtype,m=[s,c],h=m.join(":"),v=r[h];return v||(r[h]=v=n(s,c)),v(o),o}l.exports=a},9618:function(l,e,t){var n=t(7163),r=typeof Float64Array<"u";function a(g,i){return g[0]-i[0]}function o(){var g=this.stride,i=new Array(g.length),w;for(w=0;w=0&&(f=_|0,T+=A*f,u-=f),new S(this.data,u,A,T)},M.step=function(_){var T=this.shape[0],f=this.stride[0],u=this.offset,A=0,x=Math.ceil;return typeof _=="number"&&(A=_|0,A<0?(u+=f*(T-1),T=x(-T/A)):T=x(T/A),f*=A),new S(this.data,T,f,u)},M.transpose=function(_){_=_===void 0?0:_|0;var T=this.shape,f=this.stride;return new S(this.data,T[_],f[_],this.offset)},M.pick=function(_){var T=[],f=[],u=this.offset;typeof _=="number"&&_>=0?u=u+this.stride[0]*_|0:(T.push(this.shape[0]),f.push(this.stride[0]));var A=i[T.length+1];return A(this.data,T,f,u)},function(_,T,f,u){return new S(_,T[0],f[0],u)}},2:function(g,i,w){function S(C,_,T,f,u,A){this.data=C,this.shape=[_,T],this.stride=[f,u],this.offset=A|0}var M=S.prototype;return M.dtype=g,M.dimension=2,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(M,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),M.set=function(_,T,f){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T,f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]=f},M.get=function(_,T){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T):this.data[this.offset+this.stride[0]*_+this.stride[1]*T]},M.index=function(_,T){return this.offset+this.stride[0]*_+this.stride[1]*T},M.hi=function(_,T){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,this.stride[0],this.stride[1],this.offset)},M.lo=function(_,T){var f=this.offset,u=0,A=this.shape[0],x=this.shape[1],z=this.stride[0],I=this.stride[1];return typeof _=="number"&&_>=0&&(u=_|0,f+=z*u,A-=u),typeof T=="number"&&T>=0&&(u=T|0,f+=I*u,x-=u),new S(this.data,A,x,z,I,f)},M.step=function(_,T){var f=this.shape[0],u=this.shape[1],A=this.stride[0],x=this.stride[1],z=this.offset,I=0,O=Math.ceil;return typeof _=="number"&&(I=_|0,I<0?(z+=A*(f-1),f=O(-f/I)):f=O(f/I),A*=I),typeof T=="number"&&(I=T|0,I<0?(z+=x*(u-1),u=O(-u/I)):u=O(u/I),x*=I),new S(this.data,f,u,A,x,z)},M.transpose=function(_,T){_=_===void 0?0:_|0,T=T===void 0?1:T|0;var f=this.shape,u=this.stride;return new S(this.data,f[_],f[T],u[_],u[T],this.offset)},M.pick=function(_,T){var f=[],u=[],A=this.offset;typeof _=="number"&&_>=0?A=A+this.stride[0]*_|0:(f.push(this.shape[0]),u.push(this.stride[0])),typeof T=="number"&&T>=0?A=A+this.stride[1]*T|0:(f.push(this.shape[1]),u.push(this.stride[1]));var x=i[f.length+1];return x(this.data,f,u,A)},function(_,T,f,u){return new S(_,T[0],T[1],f[0],f[1],u)}},3:function(g,i,w){function S(C,_,T,f,u,A,x,z){this.data=C,this.shape=[_,T,f],this.stride=[u,A,x],this.offset=z|0}var M=S.prototype;return M.dtype=g,M.dimension=3,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(M,"order",{get:function(){var _=Math.abs(this.stride[0]),T=Math.abs(this.stride[1]),f=Math.abs(this.stride[2]);return _>T?T>f?[2,1,0]:_>f?[1,2,0]:[1,0,2]:_>f?[2,0,1]:f>T?[0,1,2]:[0,2,1]}}),M.set=function(_,T,f,u){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f,u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]=u},M.get=function(_,T,f){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f]},M.index=function(_,T,f){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f},M.hi=function(_,T,f){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},M.lo=function(_,T,f){var u=this.offset,A=0,x=this.shape[0],z=this.shape[1],I=this.shape[2],O=this.stride[0],D=this.stride[1],B=this.stride[2];return typeof _=="number"&&_>=0&&(A=_|0,u+=O*A,x-=A),typeof T=="number"&&T>=0&&(A=T|0,u+=D*A,z-=A),typeof f=="number"&&f>=0&&(A=f|0,u+=B*A,I-=A),new S(this.data,x,z,I,O,D,B,u)},M.step=function(_,T,f){var u=this.shape[0],A=this.shape[1],x=this.shape[2],z=this.stride[0],I=this.stride[1],O=this.stride[2],D=this.offset,B=0,F=Math.ceil;return typeof _=="number"&&(B=_|0,B<0?(D+=z*(u-1),u=F(-u/B)):u=F(u/B),z*=B),typeof T=="number"&&(B=T|0,B<0?(D+=I*(A-1),A=F(-A/B)):A=F(A/B),I*=B),typeof f=="number"&&(B=f|0,B<0?(D+=O*(x-1),x=F(-x/B)):x=F(x/B),O*=B),new S(this.data,u,A,x,z,I,O,D)},M.transpose=function(_,T,f){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0;var u=this.shape,A=this.stride;return new S(this.data,u[_],u[T],u[f],A[_],A[T],A[f],this.offset)},M.pick=function(_,T,f){var u=[],A=[],x=this.offset;typeof _=="number"&&_>=0?x=x+this.stride[0]*_|0:(u.push(this.shape[0]),A.push(this.stride[0])),typeof T=="number"&&T>=0?x=x+this.stride[1]*T|0:(u.push(this.shape[1]),A.push(this.stride[1])),typeof f=="number"&&f>=0?x=x+this.stride[2]*f|0:(u.push(this.shape[2]),A.push(this.stride[2]));var z=i[u.length+1];return z(this.data,u,A,x)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],f[0],f[1],f[2],u)}},4:function(g,i,w){function S(C,_,T,f,u,A,x,z,I,O){this.data=C,this.shape=[_,T,f,u],this.stride=[A,x,z,I],this.offset=O|0}var M=S.prototype;return M.dtype=g,M.dimension=4,Object.defineProperty(M,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(M,"order",{get:w}),M.set=function(_,T,f,u,A){return g==="generic"?this.data.set(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u,A):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]=A},M.get=function(_,T,f,u){return g==="generic"?this.data.get(this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u):this.data[this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u]},M.index=function(_,T,f,u){return this.offset+this.stride[0]*_+this.stride[1]*T+this.stride[2]*f+this.stride[3]*u},M.hi=function(_,T,f,u){return new S(this.data,typeof _!="number"||_<0?this.shape[0]:_|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof f!="number"||f<0?this.shape[2]:f|0,typeof u!="number"||u<0?this.shape[3]:u|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},M.lo=function(_,T,f,u){var A=this.offset,x=0,z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.stride[0],F=this.stride[1],P=this.stride[2],j=this.stride[3];return typeof _=="number"&&_>=0&&(x=_|0,A+=B*x,z-=x),typeof T=="number"&&T>=0&&(x=T|0,A+=F*x,I-=x),typeof f=="number"&&f>=0&&(x=f|0,A+=P*x,O-=x),typeof u=="number"&&u>=0&&(x=u|0,A+=j*x,D-=x),new S(this.data,z,I,O,D,B,F,P,j,A)},M.step=function(_,T,f,u){var A=this.shape[0],x=this.shape[1],z=this.shape[2],I=this.shape[3],O=this.stride[0],D=this.stride[1],B=this.stride[2],F=this.stride[3],P=this.offset,j=0,U=Math.ceil;return typeof _=="number"&&(j=_|0,j<0?(P+=O*(A-1),A=U(-A/j)):A=U(A/j),O*=j),typeof T=="number"&&(j=T|0,j<0?(P+=D*(x-1),x=U(-x/j)):x=U(x/j),D*=j),typeof f=="number"&&(j=f|0,j<0?(P+=B*(z-1),z=U(-z/j)):z=U(z/j),B*=j),typeof u=="number"&&(j=u|0,j<0?(P+=F*(I-1),I=U(-I/j)):I=U(I/j),F*=j),new S(this.data,A,x,z,I,O,D,B,F,P)},M.transpose=function(_,T,f,u){_=_===void 0?0:_|0,T=T===void 0?1:T|0,f=f===void 0?2:f|0,u=u===void 0?3:u|0;var A=this.shape,x=this.stride;return new S(this.data,A[_],A[T],A[f],A[u],x[_],x[T],x[f],x[u],this.offset)},M.pick=function(_,T,f,u){var A=[],x=[],z=this.offset;typeof _=="number"&&_>=0?z=z+this.stride[0]*_|0:(A.push(this.shape[0]),x.push(this.stride[0])),typeof T=="number"&&T>=0?z=z+this.stride[1]*T|0:(A.push(this.shape[1]),x.push(this.stride[1])),typeof f=="number"&&f>=0?z=z+this.stride[2]*f|0:(A.push(this.shape[2]),x.push(this.stride[2])),typeof u=="number"&&u>=0?z=z+this.stride[3]*u|0:(A.push(this.shape[3]),x.push(this.stride[3]));var I=i[A.length+1];return I(this.data,A,x,z)},function(_,T,f,u){return new S(_,T[0],T[1],T[2],T[3],f[0],f[1],f[2],f[3],u)}},5:function(i,w,S){function M(_,T,f,u,A,x,z,I,O,D,B,F){this.data=_,this.shape=[T,f,u,A,x],this.stride=[z,I,O,D,B],this.offset=F|0}var C=M.prototype;return C.dtype=i,C.dimension=5,Object.defineProperty(C,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(C,"order",{get:S}),C.set=function(T,f,u,A,x,z){return i==="generic"?this.data.set(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x,z):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]=z},C.get=function(T,f,u,A,x){return i==="generic"?this.data.get(this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x):this.data[this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x]},C.index=function(T,f,u,A,x){return this.offset+this.stride[0]*T+this.stride[1]*f+this.stride[2]*u+this.stride[3]*A+this.stride[4]*x},C.hi=function(T,f,u,A,x){return new M(this.data,typeof T!="number"||T<0?this.shape[0]:T|0,typeof f!="number"||f<0?this.shape[1]:f|0,typeof u!="number"||u<0?this.shape[2]:u|0,typeof A!="number"||A<0?this.shape[3]:A|0,typeof x!="number"||x<0?this.shape[4]:x|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},C.lo=function(T,f,u,A,x){var z=this.offset,I=0,O=this.shape[0],D=this.shape[1],B=this.shape[2],F=this.shape[3],P=this.shape[4],j=this.stride[0],U=this.stride[1],$=this.stride[2],Q=this.stride[3],re=this.stride[4];return typeof T=="number"&&T>=0&&(I=T|0,z+=j*I,O-=I),typeof f=="number"&&f>=0&&(I=f|0,z+=U*I,D-=I),typeof u=="number"&&u>=0&&(I=u|0,z+=$*I,B-=I),typeof A=="number"&&A>=0&&(I=A|0,z+=Q*I,F-=I),typeof x=="number"&&x>=0&&(I=x|0,z+=re*I,P-=I),new M(this.data,O,D,B,F,P,j,U,$,Q,re,z)},C.step=function(T,f,u,A,x){var z=this.shape[0],I=this.shape[1],O=this.shape[2],D=this.shape[3],B=this.shape[4],F=this.stride[0],P=this.stride[1],j=this.stride[2],U=this.stride[3],$=this.stride[4],Q=this.offset,re=0,ne=Math.ceil;return typeof T=="number"&&(re=T|0,re<0?(Q+=F*(z-1),z=ne(-z/re)):z=ne(z/re),F*=re),typeof f=="number"&&(re=f|0,re<0?(Q+=P*(I-1),I=ne(-I/re)):I=ne(I/re),P*=re),typeof u=="number"&&(re=u|0,re<0?(Q+=j*(O-1),O=ne(-O/re)):O=ne(O/re),j*=re),typeof A=="number"&&(re=A|0,re<0?(Q+=U*(D-1),D=ne(-D/re)):D=ne(D/re),U*=re),typeof x=="number"&&(re=x|0,re<0?(Q+=$*(B-1),B=ne(-B/re)):B=ne(B/re),$*=re),new M(this.data,z,I,O,D,B,F,P,j,U,$,Q)},C.transpose=function(T,f,u,A,x){T=T===void 0?0:T|0,f=f===void 0?1:f|0,u=u===void 0?2:u|0,A=A===void 0?3:A|0,x=x===void 0?4:x|0;var z=this.shape,I=this.stride;return new M(this.data,z[T],z[f],z[u],z[A],z[x],I[T],I[f],I[u],I[A],I[x],this.offset)},C.pick=function(T,f,u,A,x){var z=[],I=[],O=this.offset;typeof T=="number"&&T>=0?O=O+this.stride[0]*T|0:(z.push(this.shape[0]),I.push(this.stride[0])),typeof f=="number"&&f>=0?O=O+this.stride[1]*f|0:(z.push(this.shape[1]),I.push(this.stride[1])),typeof u=="number"&&u>=0?O=O+this.stride[2]*u|0:(z.push(this.shape[2]),I.push(this.stride[2])),typeof A=="number"&&A>=0?O=O+this.stride[3]*A|0:(z.push(this.shape[3]),I.push(this.stride[3])),typeof x=="number"&&x>=0?O=O+this.stride[4]*x|0:(z.push(this.shape[4]),I.push(this.stride[4]));var D=w[z.length+1];return D(this.data,z,I,O)},function(T,f,u,A){return new M(T,f[0],f[1],f[2],f[3],f[4],u[0],u[1],u[2],u[3],u[4],A)}}};function c(g,i){var w=i===-1?"T":String(i),S=s[w];return i===-1?S(g):i===0?S(g,h[g][0]):S(g,h[g],o)}function m(g){if(n(g))return"buffer";if(r)switch(Object.prototype.toString.call(g)){case"[object Float64Array]":return"float64";case"[object Float32Array]":return"float32";case"[object Int8Array]":return"int8";case"[object Int16Array]":return"int16";case"[object Int32Array]":return"int32";case"[object Uint8ClampedArray]":return"uint8_clamped";case"[object Uint8Array]":return"uint8";case"[object Uint16Array]":return"uint16";case"[object Uint32Array]":return"uint32";case"[object BigInt64Array]":return"bigint64";case"[object BigUint64Array]":return"biguint64"}return Array.isArray(g)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function v(g,i,w,S){if(g===void 0){var u=h.array[0];return u([])}else typeof g=="number"&&(g=[g]);i===void 0&&(i=[g.length]);var M=i.length;if(w===void 0){w=new Array(M);for(var C=M-1,_=1;C>=0;--C)w[C]=_,_*=i[C]}if(S===void 0){S=0;for(var C=0;C>>0;l.exports=o;function o(s,c){if(isNaN(s)||isNaN(c))return NaN;if(s===c)return s;if(s===0)return c<0?-r:r;var m=n.hi(s),h=n.lo(s);return c>s==s>0?h===a?(m+=1,h=0):h+=1:h===0?(h=a,m-=1):h-=1,n.pack(h,m)}},8406:function(l,e){var t=1e-6,n=1e-6;e.vertexNormals=function(r,a,o){for(var s=a.length,c=new Array(s),m=o===void 0?t:o,h=0;hm)for(var z=c[i],I=1/Math.sqrt(f*A),x=0;x<3;++x){var O=(x+1)%3,D=(x+2)%3;z[x]+=I*(u[O]*T[D]-u[D]*T[O])}}for(var h=0;hm)for(var I=1/Math.sqrt(B),x=0;x<3;++x)z[x]*=I;else for(var x=0;x<3;++x)z[x]=0}return c},e.faceNormals=function(r,a,o){for(var s=r.length,c=new Array(s),m=o===void 0?n:o,h=0;hm?C=1/Math.sqrt(C):C=0;for(var i=0;i<3;++i)M[i]*=C;c[h]=M}return c}},4081:function(l){"use strict";l.exports=e;function e(t,n,r,a,o,s,c,m,h,v){var g=n+s+v;if(i>0){var i=Math.sqrt(g+1);t[0]=.5*(c-h)/i,t[1]=.5*(m-a)/i,t[2]=.5*(r-s)/i,t[3]=.5*i}else{var w=Math.max(n,s,v),i=Math.sqrt(2*w-g+1);n>=w?(t[0]=.5*i,t[1]=.5*(o+r)/i,t[2]=.5*(m+a)/i,t[3]=.5*(c-h)/i):s>=w?(t[0]=.5*(r+o)/i,t[1]=.5*i,t[2]=.5*(h+c)/i,t[3]=.5*(m-a)/i):(t[0]=.5*(a+m)/i,t[1]=.5*(c+h)/i,t[2]=.5*i,t[3]=.5*(r-o)/i)}return t}},9977:function(l,e,t){"use strict";l.exports=i;var n=t(9215),r=t(6582),a=t(7399),o=t(7608),s=t(4081);function c(w,S,M){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2))}function m(w,S,M,C){return Math.sqrt(Math.pow(w,2)+Math.pow(S,2)+Math.pow(M,2)+Math.pow(C,2))}function h(w,S){var M=S[0],C=S[1],_=S[2],T=S[3],f=m(M,C,_,T);f>1e-6?(w[0]=M/f,w[1]=C/f,w[2]=_/f,w[3]=T/f):(w[0]=w[1]=w[2]=0,w[3]=1)}function v(w,S,M){this.radius=n([M]),this.center=n(S),this.rotation=n(w),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 g=v.prototype;g.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},g.recalcMatrix=function(w){this.radius.curve(w),this.center.curve(w),this.rotation.curve(w);var S=this.computedRotation;h(S,S);var M=this.computedMatrix;a(M,S);var C=this.computedCenter,_=this.computedEye,T=this.computedUp,f=Math.exp(this.computedRadius[0]);_[0]=C[0]+f*M[2],_[1]=C[1]+f*M[6],_[2]=C[2]+f*M[10],T[0]=M[1],T[1]=M[5],T[2]=M[9];for(var u=0;u<3;++u){for(var A=0,x=0;x<3;++x)A+=M[u+4*x]*_[x];M[12+u]=-A}},g.getMatrix=function(w,S){this.recalcMatrix(w);var M=this.computedMatrix;if(S){for(var C=0;C<16;++C)S[C]=M[C];return S}return M},g.idle=function(w){this.center.idle(w),this.radius.idle(w),this.rotation.idle(w)},g.flush=function(w){this.center.flush(w),this.radius.flush(w),this.rotation.flush(w)},g.pan=function(w,S,M,C){S=S||0,M=M||0,C=C||0,this.recalcMatrix(w);var _=this.computedMatrix,T=_[1],f=_[5],u=_[9],A=c(T,f,u);T/=A,f/=A,u/=A;var x=_[0],z=_[4],I=_[8],O=x*T+z*f+I*u;x-=T*O,z-=f*O,I-=u*O;var D=c(x,z,I);x/=D,z/=D,I/=D;var B=_[2],F=_[6],P=_[10],j=B*T+F*f+P*u,U=B*x+F*z+P*I;B-=j*T+U*x,F-=j*f+U*z,P-=j*u+U*I;var $=c(B,F,P);B/=$,F/=$,P/=$;var Q=x*S+T*M,re=z*S+f*M,ne=I*S+u*M;this.center.move(w,Q,re,ne);var se=Math.exp(this.computedRadius[0]);se=Math.max(1e-4,se+C),this.radius.set(w,Math.log(se))},g.rotate=function(w,S,M,C){this.recalcMatrix(w),S=S||0,M=M||0;var _=this.computedMatrix,T=_[0],f=_[4],u=_[8],A=_[1],x=_[5],z=_[9],I=_[2],O=_[6],D=_[10],B=S*T+M*A,F=S*f+M*x,P=S*u+M*z,j=-(O*P-D*F),U=-(D*B-I*P),$=-(I*F-O*B),Q=Math.sqrt(Math.max(0,1-Math.pow(j,2)-Math.pow(U,2)-Math.pow($,2))),re=m(j,U,$,Q);re>1e-6?(j/=re,U/=re,$/=re,Q/=re):(j=U=$=0,Q=1);var ne=this.computedRotation,se=ne[0],G=ne[1],X=ne[2],K=ne[3],H=se*Q+K*j+G*$-X*U,Y=G*Q+K*U+X*j-se*$,q=X*Q+K*$+se*U-G*j,Z=K*Q-se*j-G*U-X*$;if(C){j=I,U=O,$=D;var ee=Math.sin(C)/c(j,U,$);j*=ee,U*=ee,$*=ee,Q=Math.cos(S),H=H*Q+Z*j+Y*$-q*U,Y=Y*Q+Z*U+q*j-H*$,q=q*Q+Z*$+H*U-Y*j,Z=Z*Q-H*j-Y*U-q*$}var ae=m(H,Y,q,Z);ae>1e-6?(H/=ae,Y/=ae,q/=ae,Z/=ae):(H=Y=q=0,Z=1),this.rotation.set(w,H,Y,q,Z)},g.lookAt=function(w,S,M,C){this.recalcMatrix(w),M=M||this.computedCenter,S=S||this.computedEye,C=C||this.computedUp;var _=this.computedMatrix;r(_,S,M,C);var T=this.computedRotation;s(T,_[0],_[1],_[2],_[4],_[5],_[6],_[8],_[9],_[10]),h(T,T),this.rotation.set(w,T[0],T[1],T[2],T[3]);for(var f=0,u=0;u<3;++u)f+=Math.pow(M[u]-S[u],2);this.radius.set(w,.5*Math.log(Math.max(f,1e-6))),this.center.set(w,M[0],M[1],M[2])},g.translate=function(w,S,M,C){this.center.move(w,S||0,M||0,C||0)},g.setMatrix=function(w,S){var M=this.computedRotation;s(M,S[0],S[1],S[2],S[4],S[5],S[6],S[8],S[9],S[10]),h(M,M),this.rotation.set(w,M[0],M[1],M[2],M[3]);var C=this.computedMatrix;o(C,S);var _=C[15];if(Math.abs(_)>1e-6){var T=C[12]/_,f=C[13]/_,u=C[14]/_;this.recalcMatrix(w);var A=Math.exp(this.computedRadius[0]);this.center.set(w,T-C[2]*A,f-C[6]*A,u-C[10]*A),this.radius.idle(w)}else this.center.idle(w),this.radius.idle(w)},g.setDistance=function(w,S){S>0&&this.radius.set(w,Math.log(S))},g.setDistanceLimits=function(w,S){w>0?w=Math.log(w):w=-1/0,S>0?S=Math.log(S):S=1/0,S=Math.max(S,w),this.radius.bounds[0][0]=w,this.radius.bounds[1][0]=S},g.getDistanceLimits=function(w){var S=this.radius.bounds;return w?(w[0]=Math.exp(S[0][0]),w[1]=Math.exp(S[1][0]),w):[Math.exp(S[0][0]),Math.exp(S[1][0])]},g.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]}},g.fromJSON=function(w){var S=this.lastT(),M=w.center;M&&this.center.set(S,M[0],M[1],M[2]);var C=w.rotation;C&&this.rotation.set(S,C[0],C[1],C[2],C[3]);var _=w.distance;_&&_>0&&this.radius.set(S,Math.log(_)),this.setDistanceLimits(w.zoomMin,w.zoomMax)};function i(w){w=w||{};var S=w.center||[0,0,0],M=w.rotation||[0,0,0,1],C=w.radius||1;S=[].slice.call(S,0,3),M=[].slice.call(M,0,4),h(M,M);var _=new v(M,S,Math.log(C));return _.setDistanceLimits(w.zoomMin,w.zoomMax),("eye"in w||"up"in w)&&_.lookAt(0,w.eye,w.center,w.up),_}},1371:function(l,e,t){"use strict";var n=t(3233);l.exports=function(a,o,s){return s=typeof s<"u"?s+"":" ",n(s,o)+a}},3202:function(l){l.exports=function(t,n){n||(n=[0,""]),t=String(t);var r=parseFloat(t,10);return n[0]=r,n[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",n}},3088:function(l,e,t){"use strict";l.exports=r;var n=t(3140);function r(a,o){for(var s=o.length|0,c=a.length,m=[new Array(s),new Array(s)],h=0;h0){z=m[D][A][0],O=D;break}I=z[O^1];for(var B=0;B<2;++B)for(var F=m[B][A],P=0;P0&&(z=j,I=U,O=B)}return x||z&&i(z,O),I}function S(u,A){var x=m[A][u][0],z=[u];i(x,A);for(var I=x[A^1],O=A;;){for(;I!==u;)z.push(I),I=w(z[z.length-2],I,!1);if(m[0][u].length+m[1][u].length===0)break;var D=z[z.length-1],B=u,F=z[1],P=w(D,B,!0);if(n(o[D],o[B],o[F],o[P])<0)break;z.push(u),I=w(D,B)}return z}function M(u,A){return A[1]===A[A.length-1]}for(var h=0;h0;){var T=m[0][h].length,f=S(h,C);M(_,f)?_.push.apply(_,f):(_.length>0&&g.push(_),_=f)}_.length>0&&g.push(_)}return g}},5609:function(l,e,t){"use strict";l.exports=r;var n=t(3134);function r(a,o){for(var s=n(a,o.length),c=new Array(o.length),m=new Array(o.length),h=[],v=0;v0;){var i=h.pop();c[i]=!1;for(var w=s[i],v=0;v0}T=T.filter(f);for(var u=T.length,A=new Array(u),x=new Array(u),_=0;_0;){var ae=q.pop(),he=re[ae];c(he,function(Ie,Ve){return Ie-Ve});var xe=he.length,we=Z[ae],Me;if(we===0){var F=T[ae];Me=[F]}for(var _=0;_=0)&&(Z[Se]=we^1,q.push(Se),we===0)){var F=T[Se];Y(F)||(F.reverse(),Me.push(F))}}we===0&&ee.push(Me)}return ee}},5085:function(l,e,t){l.exports=w;var n=t(3250)[3],r=t(4209),a=t(3352),o=t(2478);function s(){return!0}function c(S){return function(M,C){var _=S[M];return _?!!_.queryPoint(C,s):!1}}function m(S){for(var M={},C=0;C0&&M[_]===C[0])T=S[_-1];else return 1;for(var f=1;T;){var u=T.key,A=n(C,u[0],u[1]);if(u[0][0]0)f=-1,T=T.right;else return 0;else if(A>0)T=T.left;else if(A<0)f=1,T=T.right;else return 0}return f}}function v(S){return 1}function g(S){return function(C){return S(C[0],C[1])?0:1}}function i(S,M){return function(_){return S(_[0],_[1])?0:M(_)}}function w(S){for(var M=S.length,C=[],_=[],T=0,f=0;f=v?(u=1,x=v+2*w+M):(u=-w/v,x=w*u+M)):(u=0,S>=0?(A=0,x=M):-S>=i?(A=1,x=i+2*S+M):(A=-S/i,x=S*A+M));else if(A<0)A=0,w>=0?(u=0,x=M):-w>=v?(u=1,x=v+2*w+M):(u=-w/v,x=w*u+M);else{var z=1/f;u*=z,A*=z,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M}else{var I,O,D,B;u<0?(I=g+w,O=i+S,O>I?(D=O-I,B=v-2*g+i,D>=B?(u=1,A=0,x=v+2*w+M):(u=D/B,A=1-u,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(u=0,O<=0?(A=1,x=i+2*S+M):S>=0?(A=0,x=M):(A=-S/i,x=S*A+M))):A<0?(I=g+S,O=v+w,O>I?(D=O-I,B=v-2*g+i,D>=B?(A=1,u=0,x=i+2*S+M):(A=D/B,u=1-A,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)):(A=0,O<=0?(u=1,x=v+2*w+M):w>=0?(u=0,x=M):(u=-w/v,x=w*u+M))):(D=i+S-g-w,D<=0?(u=0,A=1,x=i+2*S+M):(B=v-2*g+i,D>=B?(u=1,A=0,x=v+2*w+M):(u=D/B,A=1-u,x=u*(v*u+g*A+2*w)+A*(g*u+i*A+2*S)+M)))}for(var F=1-u-A,h=0;h0){var i=s[m-1];if(n(v,i)===0&&a(i)!==g){m-=1;continue}}s[m++]=v}}return s.length=m,s}},3233:function(l){"use strict";var e="",t;l.exports=n;function n(r,a){if(typeof r!="string")throw new TypeError("expected a string");if(a===1)return r;if(a===2)return r+r;var o=r.length*a;if(t!==r||typeof t>"u")t=r,e="";else if(e.length>=o)return e.substr(0,o);for(;o>e.length&&a>1;)a&1&&(e+=r),a>>=1,r+=r;return e+=r,e=e.substr(0,o),e}},3025:function(l,e,t){l.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},7004:function(l){"use strict";l.exports=e;function e(t){for(var n=t.length,r=t[t.length-1],a=n,o=n-2;o>=0;--o){var s=r,c=t[o];r=s+c;var m=r-s,h=c-m;h&&(t[--a]=r,r=h)}for(var v=0,o=a;o0){if(O<=0)return D;B=I+O}else if(I<0){if(O>=0)return D;B=-(I+O)}else return D;var F=m*B;return D>=F||D<=-F?D:S(A,x,z)},function(A,x,z,I){var O=A[0]-I[0],D=x[0]-I[0],B=z[0]-I[0],F=A[1]-I[1],P=x[1]-I[1],j=z[1]-I[1],U=A[2]-I[2],$=x[2]-I[2],Q=z[2]-I[2],re=D*j,ne=B*P,se=B*F,G=O*j,X=O*P,K=D*F,H=U*(re-ne)+$*(se-G)+Q*(X-K),Y=(Math.abs(re)+Math.abs(ne))*Math.abs(U)+(Math.abs(se)+Math.abs(G))*Math.abs($)+(Math.abs(X)+Math.abs(K))*Math.abs(Q),q=h*Y;return H>q||-H>q?H:M(A,x,z,I)}];function _(u){var A=C[u.length];return A||(A=C[u.length]=w(u.length)),A.apply(void 0,u)}function T(u,A,x,z,I,O,D){return function(F,P,j,U,$){switch(arguments.length){case 0:case 1:return 0;case 2:return z(F,P);case 3:return I(F,P,j);case 4:return O(F,P,j,U);case 5:return D(F,P,j,U,$)}for(var Q=new Array(arguments.length),re=0;re0&&v>0||h<0&&v<0)return!1;var g=n(c,o,s),i=n(m,o,s);return g>0&&i>0||g<0&&i<0?!1:h===0&&v===0&&g===0&&i===0?r(o,s,c,m):!0}},8545:function(l){"use strict";l.exports=t;function e(n,r){var a=n+r,o=a-n,s=a-o,c=r-o,m=n-s,h=m+c;return h?[h,a]:[a]}function t(n,r){var a=n.length|0,o=r.length|0;if(a===1&&o===1)return e(n[0],-r[0]);var s=a+o,c=new Array(s),m=0,h=0,v=0,g=Math.abs,i=n[h],w=g(i),S=-r[v],M=g(S),C,_;w=o?(C=i,h+=1,h=o?(C=i,h+=1,h"u"&&(C=s(w));var _=w.length;if(_===0||C<1)return{cells:[],vertexIds:[],vertexWeights:[]};var T=c(S,+M),f=m(w,C),u=h(f,S,T,+M),A=v(f,S.length|0),x=o(C)(w,f.data,A,T),z=g(f),I=[].slice.call(u.data,0,u.shape[0]);return r.free(T),r.free(f.data),r.free(u.data),r.free(A),{cells:x,vertexIds:z,vertexWeights:I}}},1570:function(l){"use strict";l.exports=t;var e=[function(){function r(o,s,c,m){for(var h=Math.min(c,m)|0,v=Math.max(c,m)|0,g=o[2*h],i=o[2*h+1];g>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,S=s[2*w+1];if(S===v)return w;v>1,B=m(A[D],x);B<=0?(B===0&&(O=D),z=D+1):B>0&&(I=D-1)}return O}n=i;function w(A,x){for(var z=new Array(A.length),I=0,O=z.length;I=A.length||m(A[re],D)!==0););}return z}n=w;function S(A,x){if(!x)return w(g(C(A,0)),A,0);for(var z=new Array(x),I=0;I>>j&1&&P.push(O[j]);x.push(P)}return v(x)}n=M;function C(A,x){if(x<0)return[];for(var z=[],I=(1<0)-(a<0)},e.abs=function(a){var o=a>>t-1;return(a^o)-o},e.min=function(a,o){return o^(a^o)&-(a65535)<<4,a>>>=o,s=(a>255)<<3,a>>>=s,o|=s,s=(a>15)<<2,a>>>=s,o|=s,s=(a>3)<<1,a>>>=s,o|=s,o|a>>1},e.log10=function(a){return a>=1e9?9:a>=1e8?8:a>=1e7?7:a>=1e6?6:a>=1e5?5:a>=1e4?4:a>=1e3?3:a>=100?2:a>=10?1:0},e.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function n(a){var o=32;return a&=-a,a&&o--,a&65535&&(o-=16),a&16711935&&(o-=8),a&252645135&&(o-=4),a&858993459&&(o-=2),a&1431655765&&(o-=1),o}e.countTrailingZeros=n,e.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},e.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},e.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var r=new Array(256);(function(a){for(var o=0;o<256;++o){var s=o,c=o,m=7;for(s>>>=1;s;s>>>=1)c<<=1,c|=s&1,--m;a[o]=c<>>8&255]<<16|r[a>>>16&255]<<8|r[a>>>24&255]},e.interleave2=function(a,o){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,a|o<<1},e.deinterleave2=function(a,o){return a=a>>>o&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},e.interleave3=function(a,o,s){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,a|=o<<1,s&=1023,s=(s|s<<16)&4278190335,s=(s|s<<8)&251719695,s=(s|s<<4)&3272356035,s=(s|s<<2)&1227133513,a|s<<2},e.deinterleave3=function(a,o){return a=a>>>o&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},e.nextCombination=function(a){var o=a|a-1;return o+1|(~o&-~o)-1>>>n(a)+1}},2014:function(l,e,t){"use strict";"use restrict";var n=t(3105),r=t(4623);function a(u){for(var A=0,x=Math.max,z=0,I=u.length;z>1,D=c(u[O],A);D<=0?(D===0&&(I=O),x=O+1):D>0&&(z=O-1)}return I}e.findCell=g;function i(u,A){for(var x=new Array(u.length),z=0,I=x.length;z=u.length||c(u[Q],O)!==0););}return x}e.incidence=i;function w(u,A){if(!A)return i(v(M(u,0)),u,0);for(var x=new Array(A),z=0;z>>P&1&&F.push(I[P]);A.push(F)}return h(A)}e.explode=S;function M(u,A){if(A<0)return[];for(var x=[],z=(1<>1:(G>>1)-1}function z(G){for(var X=A(G);;){var K=X,H=2*G+1,Y=2*(G+1),q=G;if(H0;){var K=x(G);if(K>=0){var H=A(K);if(X0){var G=F[0];return u(0,U-1),U-=1,z(0),G}return-1}function D(G,X){var K=F[G];return w[K]===X?G:(w[K]=-1/0,I(G),O(),w[K]=X,U+=1,I(U-1))}function B(G){if(!S[G]){S[G]=!0;var X=g[G],K=i[G];g[K]>=0&&(g[K]=X),i[X]>=0&&(i[X]=K),P[X]>=0&&D(P[X],f(X)),P[K]>=0&&D(P[K],f(K))}}for(var F=[],P=new Array(h),M=0;M>1;M>=0;--M)z(M);for(;;){var $=O();if($<0||w[$]>m)break;B($)}for(var Q=[],M=0;M=0&&K>=0&&X!==K){var H=P[X],Y=P[K];H!==Y&&se.push([H,Y])}}),r.unique(r.normalize(se)),{positions:Q,edges:se}}},1303:function(l,e,t){"use strict";l.exports=a;var n=t(3250);function r(o,s){var c,m;if(s[0][0]s[1][0])c=s[1],m=s[0];else{var h=Math.min(o[0][1],o[1][1]),v=Math.max(o[0][1],o[1][1]),g=Math.min(s[0][1],s[1][1]),i=Math.max(s[0][1],s[1][1]);return vi?h-i:v-i}var w,S;o[0][1]s[1][0])c=s[1],m=s[0];else return r(s,o);var h,v;if(o[0][0]o[1][0])h=o[1],v=o[0];else return-r(o,s);var g=n(c,m,v),i=n(c,m,h);if(g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;if(g=n(v,h,m),i=n(v,h,c),g<0){if(i<=0)return g}else if(g>0){if(i>=0)return g}else if(i)return i;return m[0]-v[0]}},4209:function(l,e,t){"use strict";l.exports=i;var n=t(2478),r=t(3840),a=t(3250),o=t(1303);function s(w,S,M){this.slabs=w,this.coordinates=S,this.horizontal=M}var c=s.prototype;function m(w,S){return w.y-S}function h(w,S){for(var M=null;w;){var C=w.key,_,T;C[0][0]0)if(S[0]!==C[1][0])M=w,w=w.right;else{var u=h(w.right,S);if(u)return u;w=w.left}else{if(S[0]!==C[1][0])return w;var u=h(w.right,S);if(u)return u;w=w.left}}return M}c.castUp=function(w){var S=n.le(this.coordinates,w[0]);if(S<0)return-1;var M=this.slabs[S],C=h(this.slabs[S],w),_=-1;if(C&&(_=C.value),this.coordinates[S]===w[0]){var T=null;if(C&&(T=C.key),S>0){var f=h(this.slabs[S-1],w);f&&(T?o(f.key,T)>0&&(T=f.key,_=f.value):(_=f.value,T=f.key))}var u=this.horizontal[S];if(u.length>0){var A=n.ge(u,w[1],m);if(A=u.length)return _;x=u[A]}}if(x.start)if(T){var z=a(T[0],T[1],[w[0],x.y]);T[0][0]>T[1][0]&&(z=-z),z>0&&(_=x.index)}else _=x.index;else x.y!==w[1]&&(_=x.index)}}}return _};function v(w,S,M,C){this.y=w,this.index=S,this.start=M,this.closed=C}function g(w,S,M,C){this.x=w,this.segment=S,this.create=M,this.index=C}function i(w){for(var S=w.length,M=2*S,C=new Array(M),_=0;_1&&(S=1);for(var M=1-S,C=h.length,_=new Array(C),T=0;T0||w>0&&_<0){var T=o(S,_,M,w);g.push(T),i.push(T.slice())}_<0?i.push(M.slice()):_>0?g.push(M.slice()):(g.push(M.slice()),i.push(M.slice())),w=_}return{positive:g,negative:i}}function c(h,v){for(var g=[],i=a(h[h.length-1],v),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C>=0&&g.push(S.slice()),i=C}return g}function m(h,v){for(var g=[],i=a(h[h.length-1],v),w=h[h.length-1],S=h[0],M=0;M0||i>0&&C<0)&&g.push(o(w,C,S,i)),C<=0&&g.push(S.slice()),i=C}return g}},3387:function(l,e,t){var n;(function(){"use strict";var r={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 a(h){return s(m(h),arguments)}function o(h,v){return a.apply(null,[h].concat(v||[]))}function s(h,v){var g=1,i=h.length,w,S="",M,C,_,T,f,u,A,x;for(M=0;M=0),_.type){case"b":w=parseInt(w,10).toString(2);break;case"c":w=String.fromCharCode(parseInt(w,10));break;case"d":case"i":w=parseInt(w,10);break;case"j":w=JSON.stringify(w,null,_.width?parseInt(_.width):0);break;case"e":w=_.precision?parseFloat(w).toExponential(_.precision):parseFloat(w).toExponential();break;case"f":w=_.precision?parseFloat(w).toFixed(_.precision):parseFloat(w);break;case"g":w=_.precision?String(Number(w.toPrecision(_.precision))):parseFloat(w);break;case"o":w=(parseInt(w,10)>>>0).toString(8);break;case"s":w=String(w),w=_.precision?w.substring(0,_.precision):w;break;case"t":w=String(!!w),w=_.precision?w.substring(0,_.precision):w;break;case"T":w=Object.prototype.toString.call(w).slice(8,-1).toLowerCase(),w=_.precision?w.substring(0,_.precision):w;break;case"u":w=parseInt(w,10)>>>0;break;case"v":w=w.valueOf(),w=_.precision?w.substring(0,_.precision):w;break;case"x":w=(parseInt(w,10)>>>0).toString(16);break;case"X":w=(parseInt(w,10)>>>0).toString(16).toUpperCase();break}r.json.test(_.type)?S+=w:(r.number.test(_.type)&&(!A||_.sign)?(x=A?"+":"-",w=w.toString().replace(r.sign,"")):x="",f=_.pad_char?_.pad_char==="0"?"0":_.pad_char.charAt(1):" ",u=_.width-(x+w).length,T=_.width&&u>0?f.repeat(u):"",S+=_.align?x+w+T:f==="0"?x+T+w:T+x+w)}return S}var c=Object.create(null);function m(h){if(c[h])return c[h];for(var v=h,g,i=[],w=0;v;){if((g=r.text.exec(v))!==null)i.push(g[0]);else if((g=r.modulo.exec(v))!==null)i.push("%");else if((g=r.placeholder.exec(v))!==null){if(g[2]){w|=1;var S=[],M=g[2],C=[];if((C=r.key.exec(M))!==null)for(S.push(C[1]);(M=M.substring(C[0].length))!=="";)if((C=r.key_access.exec(M))!==null)S.push(C[1]);else if((C=r.index_access.exec(M))!==null)S.push(C[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");g[2]=S}else w|=2;if(w===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");i.push({placeholder:g[0],param_no:g[1],keys:g[2],sign:g[3],pad_char:g[4],align:g[5],width:g[6],precision:g[7],type:g[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");v=v.substring(g[0].length)}return c[h]=i}e.sprintf=a,e.vsprintf=o,typeof window<"u"&&(window.sprintf=a,window.vsprintf=o,n=function(){return{sprintf:a,vsprintf:o}}.call(e,t,e,l),n!==void 0&&(l.exports=n))})()},3711:function(l,e,t){"use strict";l.exports=m;var n=t(2640),r=t(781),a={"2d":function(h,v,g){var i=h({order:v,scalarArguments:3,getters:g==="generic"?[0]:void 0,phase:function(S,M,C,_){return S>_|0},vertex:function(S,M,C,_,T,f,u,A,x,z,I,O,D){var B=(u<<0)+(A<<1)+(x<<2)+(z<<3)|0;if(!(B===0||B===15))switch(B){case 0:I.push([S-.5,M-.5]);break;case 1:I.push([S-.25-.25*(_+C-2*D)/(C-_),M-.25-.25*(T+C-2*D)/(C-T)]);break;case 2:I.push([S-.75-.25*(-_-C+2*D)/(_-C),M-.25-.25*(f+_-2*D)/(_-f)]);break;case 3:I.push([S-.5,M-.5-.5*(T+C+f+_-4*D)/(C-T+_-f)]);break;case 4:I.push([S-.25-.25*(f+T-2*D)/(T-f),M-.75-.25*(-T-C+2*D)/(T-C)]);break;case 5:I.push([S-.5-.5*(_+C+f+T-4*D)/(C-_+T-f),M-.5]);break;case 6:I.push([S-.5-.25*(-_-C+f+T)/(_-C+T-f),M-.5-.25*(-T-C+f+_)/(T-C+_-f)]);break;case 7:I.push([S-.75-.25*(f+T-2*D)/(T-f),M-.75-.25*(f+_-2*D)/(_-f)]);break;case 8:I.push([S-.75-.25*(-f-T+2*D)/(f-T),M-.75-.25*(-f-_+2*D)/(f-_)]);break;case 9:I.push([S-.5-.25*(_+C+-f-T)/(C-_+f-T),M-.5-.25*(T+C+-f-_)/(C-T+f-_)]);break;case 10:I.push([S-.5-.5*(-_-C+-f-T+4*D)/(_-C+f-T),M-.5]);break;case 11:I.push([S-.25-.25*(-f-T+2*D)/(f-T),M-.75-.25*(T+C-2*D)/(C-T)]);break;case 12:I.push([S-.5,M-.5-.5*(-T-C+-f-_+4*D)/(T-C+f-_)]);break;case 13:I.push([S-.75-.25*(_+C-2*D)/(C-_),M-.25-.25*(-f-_+2*D)/(f-_)]);break;case 14:I.push([S-.25-.25*(-_-C+2*D)/(_-C),M-.25-.25*(-T-C+2*D)/(T-C)]);break;case 15:I.push([S-.5,M-.5]);break}},cell:function(S,M,C,_,T,f,u,A,x){T?A.push([S,M]):A.push([M,S])}});return function(w,S){var M=[],C=[];return i(w,M,C,S),{positions:M,cells:C}}}};function o(h,v){var g=h.length+"d",i=a[g];if(i)return i(n,h,v)}function s(h,v){for(var g=r(h,v),i=g.length,w=new Array(i),S=new Array(i),M=0;MMath.max(_,T)?f[2]=1:_>Math.max(C,T)?f[0]=1:f[1]=1;for(var u=0,A=0,x=0;x<3;++x)u+=M[x]*M[x],A+=f[x]*M[x];for(var x=0;x<3;++x)f[x]-=A/u*M[x];return s(f,f),f}function g(M,C,_,T,f,u,A,x){this.center=n(_),this.up=n(T),this.right=n(f),this.radius=n([u]),this.angle=n([A,x]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(M,C),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 z=0;z<16;++z)this.computedMatrix[z]=.5;this.recalcMatrix(0)}var i=g.prototype;i.setDistanceLimits=function(M,C){M>0?M=Math.log(M):M=-1/0,C>0?C=Math.log(C):C=1/0,C=Math.max(C,M),this.radius.bounds[0][0]=M,this.radius.bounds[1][0]=C},i.getDistanceLimits=function(M){var C=this.radius.bounds[0];return M?(M[0]=Math.exp(C[0][0]),M[1]=Math.exp(C[1][0]),M):[Math.exp(C[0][0]),Math.exp(C[1][0])]},i.recalcMatrix=function(M){this.center.curve(M),this.up.curve(M),this.right.curve(M),this.radius.curve(M),this.angle.curve(M);for(var C=this.computedUp,_=this.computedRight,T=0,f=0,u=0;u<3;++u)f+=C[u]*_[u],T+=C[u]*C[u];for(var A=Math.sqrt(T),x=0,u=0;u<3;++u)_[u]-=C[u]*f/T,x+=_[u]*_[u],C[u]/=A;for(var z=Math.sqrt(x),u=0;u<3;++u)_[u]/=z;var I=this.computedToward;o(I,C,_),s(I,I);for(var O=Math.exp(this.computedRadius[0]),D=this.computedAngle[0],B=this.computedAngle[1],F=Math.cos(D),P=Math.sin(D),j=Math.cos(B),U=Math.sin(B),$=this.computedCenter,Q=F*j,re=P*j,ne=U,se=-F*U,G=-P*U,X=j,K=this.computedEye,H=this.computedMatrix,u=0;u<3;++u){var Y=Q*_[u]+re*I[u]+ne*C[u];H[4*u+1]=se*_[u]+G*I[u]+X*C[u],H[4*u+2]=Y,H[4*u+3]=0}var q=H[1],Z=H[5],ee=H[9],ae=H[2],he=H[6],xe=H[10],we=Z*xe-ee*he,Me=ee*ae-q*xe,Se=q*he-Z*ae,Ie=m(we,Me,Se);we/=Ie,Me/=Ie,Se/=Ie,H[0]=we,H[4]=Me,H[8]=Se;for(var u=0;u<3;++u)K[u]=$[u]+H[2+4*u]*O;for(var u=0;u<3;++u){for(var x=0,Ve=0;Ve<3;++Ve)x+=H[u+4*Ve]*K[Ve];H[12+u]=-x}H[15]=1},i.getMatrix=function(M,C){this.recalcMatrix(M);var _=this.computedMatrix;if(C){for(var T=0;T<16;++T)C[T]=_[T];return C}return _};var w=[0,0,0];i.rotate=function(M,C,_,T){if(this.angle.move(M,C,_),T){this.recalcMatrix(M);var f=this.computedMatrix;w[0]=f[2],w[1]=f[6],w[2]=f[10];for(var u=this.computedUp,A=this.computedRight,x=this.computedToward,z=0;z<3;++z)f[4*z]=u[z],f[4*z+1]=A[z],f[4*z+2]=x[z];a(f,f,T,w);for(var z=0;z<3;++z)u[z]=f[4*z],A[z]=f[4*z+1];this.up.set(M,u[0],u[1],u[2]),this.right.set(M,A[0],A[1],A[2])}},i.pan=function(M,C,_,T){C=C||0,_=_||0,T=T||0,this.recalcMatrix(M);var f=this.computedMatrix,u=Math.exp(this.computedRadius[0]),A=f[1],x=f[5],z=f[9],I=m(A,x,z);A/=I,x/=I,z/=I;var O=f[0],D=f[4],B=f[8],F=O*A+D*x+B*z;O-=A*F,D-=x*F,B-=z*F;var P=m(O,D,B);O/=P,D/=P,B/=P;var j=O*C+A*_,U=D*C+x*_,$=B*C+z*_;this.center.move(M,j,U,$);var Q=Math.exp(this.computedRadius[0]);Q=Math.max(1e-4,Q+T),this.radius.set(M,Math.log(Q))},i.translate=function(M,C,_,T){this.center.move(M,C||0,_||0,T||0)},i.setMatrix=function(M,C,_,T){var f=1;typeof _=="number"&&(f=_|0),(f<0||f>3)&&(f=1);var u=(f+2)%3,A=(f+1)%3;C||(this.recalcMatrix(M),C=this.computedMatrix);var x=C[f],z=C[f+4],I=C[f+8];if(T){var D=Math.abs(x),B=Math.abs(z),F=Math.abs(I),P=Math.max(D,B,F);D===P?(x=x<0?-1:1,z=I=0):F===P?(I=I<0?-1:1,x=z=0):(z=z<0?-1:1,x=I=0)}else{var O=m(x,z,I);x/=O,z/=O,I/=O}var j=C[u],U=C[u+4],$=C[u+8],Q=j*x+U*z+$*I;j-=x*Q,U-=z*Q,$-=I*Q;var re=m(j,U,$);j/=re,U/=re,$/=re;var ne=z*$-I*U,se=I*j-x*$,G=x*U-z*j,X=m(ne,se,G);ne/=X,se/=X,G/=X,this.center.jump(M,ve,le,Ae),this.radius.idle(M),this.up.jump(M,x,z,I),this.right.jump(M,j,U,$);var K,H;if(f===2){var Y=C[1],q=C[5],Z=C[9],ee=Y*j+q*U+Z*$,ae=Y*ne+q*se+Z*G;Me<0?K=-Math.PI/2:K=Math.PI/2,H=Math.atan2(ae,ee)}else{var he=C[2],xe=C[6],we=C[10],Me=he*x+xe*z+we*I,Se=he*j+xe*U+we*$,Ie=he*ne+xe*se+we*G;K=Math.asin(h(Me)),H=Math.atan2(Ie,Se)}this.angle.jump(M,H,K),this.recalcMatrix(M);var Ve=C[2],Ge=C[6],ke=C[10],_e=this.computedMatrix;r(_e,C);var ce=_e[15],ve=_e[12]/ce,le=_e[13]/ce,Ae=_e[14]/ce,Be=Math.exp(this.computedRadius[0]);this.center.jump(M,ve-Ve*Be,le-Ge*Be,Ae-ke*Be)},i.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},i.idle=function(M){this.center.idle(M),this.up.idle(M),this.right.idle(M),this.radius.idle(M),this.angle.idle(M)},i.flush=function(M){this.center.flush(M),this.up.flush(M),this.right.flush(M),this.radius.flush(M),this.angle.flush(M)},i.setDistance=function(M,C){C>0&&this.radius.set(M,Math.log(C))},i.lookAt=function(M,C,_,T){this.recalcMatrix(M),C=C||this.computedEye,_=_||this.computedCenter,T=T||this.computedUp;var f=T[0],u=T[1],A=T[2],x=m(f,u,A);if(!(x<1e-6)){f/=x,u/=x,A/=x;var z=C[0]-_[0],I=C[1]-_[1],O=C[2]-_[2],D=m(z,I,O);if(!(D<1e-6)){z/=D,I/=D,O/=D;var B=this.computedRight,F=B[0],P=B[1],j=B[2],U=f*F+u*P+A*j;F-=U*f,P-=U*u,j-=U*A;var $=m(F,P,j);if(!($<.01&&(F=u*O-A*I,P=A*z-f*O,j=f*I-u*z,$=m(F,P,j),$<1e-6))){F/=$,P/=$,j/=$,this.up.set(M,f,u,A),this.right.set(M,F,P,j),this.center.set(M,_[0],_[1],_[2]),this.radius.set(M,Math.log(D));var Q=u*j-A*P,re=A*F-f*j,ne=f*P-u*F,se=m(Q,re,ne);Q/=se,re/=se,ne/=se;var G=f*z+u*I+A*O,X=F*z+P*I+j*O,K=Q*z+re*I+ne*O,H=Math.asin(h(G)),Y=Math.atan2(K,X),q=this.angle._state,Z=q[q.length-1],ee=q[q.length-2];Z=Z%(2*Math.PI);var ae=Math.abs(Z+2*Math.PI-Y),he=Math.abs(Z-Y),xe=Math.abs(Z-2*Math.PI-Y);ae0?j.pop():new ArrayBuffer(F)}e.mallocArrayBuffer=w;function S(B){return new Uint8Array(w(B),0,B)}e.mallocUint8=S;function M(B){return new Uint16Array(w(2*B),0,B)}e.mallocUint16=M;function C(B){return new Uint32Array(w(4*B),0,B)}e.mallocUint32=C;function _(B){return new Int8Array(w(B),0,B)}e.mallocInt8=_;function T(B){return new Int16Array(w(2*B),0,B)}e.mallocInt16=T;function f(B){return new Int32Array(w(4*B),0,B)}e.mallocInt32=f;function u(B){return new Float32Array(w(4*B),0,B)}e.mallocFloat32=e.mallocFloat=u;function A(B){return new Float64Array(w(8*B),0,B)}e.mallocFloat64=e.mallocDouble=A;function x(B){return o?new Uint8ClampedArray(w(B),0,B):S(B)}e.mallocUint8Clamped=x;function z(B){return s?new BigUint64Array(w(8*B),0,B):null}e.mallocBigUint64=z;function I(B){return c?new BigInt64Array(w(8*B),0,B):null}e.mallocBigInt64=I;function O(B){return new DataView(w(B),0,B)}e.mallocDataView=O;function D(B){B=n.nextPow2(B);var F=n.log2(B),P=v[F];return P.length>0?P.pop():new a(B)}e.mallocBuffer=D,e.clearCache=function(){for(var F=0;F<32;++F)m.UINT8[F].length=0,m.UINT16[F].length=0,m.UINT32[F].length=0,m.INT8[F].length=0,m.INT16[F].length=0,m.INT32[F].length=0,m.FLOAT[F].length=0,m.DOUBLE[F].length=0,m.BIGUINT64[F].length=0,m.BIGINT64[F].length=0,m.UINT8C[F].length=0,h[F].length=0,v[F].length=0}},1755:function(l){"use strict";"use restrict";l.exports=e;function e(n){this.roots=new Array(n),this.ranks=new Array(n);for(var r=0;r",j="",U=P.length,$=j.length,Q=D[0]===w||D[0]===C,re=0,ne=-$;re>-1&&(re=B.indexOf(P,re),!(re===-1||(ne=B.indexOf(j,re+U),ne===-1)||ne<=re));){for(var se=re;se=ne)F[se]=null,B=B.substr(0,se)+" "+B.substr(se+1);else if(F[se]!==null){var G=F[se].indexOf(D[0]);G===-1?F[se]+=D:Q&&(F[se]=F[se].substr(0,G+1)+(1+parseInt(F[se][G+1]))+F[se].substr(G+2))}var X=re+U,K=B.substr(X,ne-X),H=K.indexOf(P);H!==-1?re=H:re=ne+$}return F}function f(O,D,B){for(var F=D.textAlign||"start",P=D.textBaseline||"alphabetic",j=[1<<30,1<<30],U=[0,0],$=O.length,Q=0;Q<$;++Q)for(var re=O[Q],ne=0;ne<2;++ne)j[ne]=Math.min(j[ne],re[ne])|0,U[ne]=Math.max(U[ne],re[ne])|0;var se=0;switch(F){case"center":se=-.5*(j[0]+U[0]);break;case"right":case"end":se=-U[0];break;case"left":case"start":se=-j[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+F+"'")}var G=0;switch(P){case"hanging":case"top":G=-j[1];break;case"middle":G=-.5*(j[1]+U[1]);break;case"alphabetic":case"ideographic":G=-3*B;break;case"bottom":G=-U[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+P+"'")}var X=1/B;return"lineHeight"in D?X*=+D.lineHeight:"width"in D?X=D.width/(U[0]-j[0]):"height"in D&&(X=D.height/(U[1]-j[1])),O.map(function(K){return[X*(K[0]+se),X*(K[1]+G)]})}function u(O,D,B,F,P,j){B=B.replace(/\n/g,""),j.breaklines===!0?B=B.replace(/\/g,` +`):B=B.replace(/\/g," ");var U="",$=[];for(Z=0;Z-1?parseInt(le[1+Xe]):0,gt=Ye>-1?parseInt(Ae[1+Ye]):0;yt!==gt&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,gt-yt),Be=Be.replace("?px ",Se())),ae+=.25*G*(gt-yt)}if(j.superscripts===!0){var Tt=le.indexOf(w),At=Ae.indexOf(w),$t=Tt>-1?parseInt(le[1+Tt]):0,rr=At>-1?parseInt(Ae[1+At]):0;$t!==rr&&(Be=Be.replace(Se(),"?px "),he*=Math.pow(.75,rr-$t),Be=Be.replace("?px ",Se())),ae-=.25*G*(rr-$t)}if(j.bolds===!0){var _r=le.indexOf(h)>-1,Xt=Ae.indexOf(h)>-1;!_r&&Xt&&(or?Be=Be.replace("italic ","italic bold "):Be="bold "+Be),_r&&!Xt&&(Be=Be.replace("bold ",""))}if(j.italics===!0){var or=le.indexOf(g)>-1,Ot=Ae.indexOf(g)>-1;!or&&Ot&&(Be="italic "+Be),or&&!Ot&&(Be=Be.replace("italic ",""))}D.font=Be}for(q=0;q0&&(P=F.size),F.lineSpacing&&F.lineSpacing>0&&(j=F.lineSpacing),F.styletags&&F.styletags.breaklines&&(U.breaklines=!!F.styletags.breaklines),F.styletags&&F.styletags.bolds&&(U.bolds=!!F.styletags.bolds),F.styletags&&F.styletags.italics&&(U.italics=!!F.styletags.italics),F.styletags&&F.styletags.subscripts&&(U.subscripts=!!F.styletags.subscripts),F.styletags&&F.styletags.superscripts&&(U.superscripts=!!F.styletags.superscripts)),B.font=[F.fontStyle,F.fontVariant,F.fontWeight,P+"px",F.font].filter(function(Q){return Q}).join(" "),B.textAlign="start",B.textBaseline="alphabetic",B.direction="ltr";var $=u(D,B,O,P,j,U);return z($,F,P)}},1538:function(l){(function(){"use strict";if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function t(x){x.permitHostObjects___&&x.permitHostObjects___(t)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=t);var n=!1;if(typeof WeakMap=="function"){var r=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new r,o=Object.freeze({});if(a.set(o,1),a.get(o)!==1)n=!0;else{l.exports=WeakMap;return}}}var s=Object.prototype.hasOwnProperty,c=Object.getOwnPropertyNames,m=Object.defineProperty,h=Object.isExtensible,v="weakmap:",g=v+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var i=new ArrayBuffer(25),w=new Uint8Array(i);crypto.getRandomValues(w),g=v+"rand:"+Array.prototype.map.call(w,function(x){return(x%36).toString(36)}).join("")+"___"}function S(x){return!(x.substr(0,v.length)==v&&x.substr(x.length-3)==="___")}if(m(Object,"getOwnPropertyNames",{value:function(z){return c(z).filter(S)}}),"getPropertyNames"in Object){var M=Object.getPropertyNames;m(Object,"getPropertyNames",{value:function(z){return M(z).filter(S)}})}function C(x){if(x!==Object(x))throw new TypeError("Not an object: "+x);var z=x[g];if(z&&z.key===x)return z;if(h(x)){z={key:x};try{return m(x,g,{value:z,writable:!1,enumerable:!1,configurable:!1}),z}catch{return}}}(function(){var x=Object.freeze;m(Object,"freeze",{value:function(D){return C(D),x(D)}});var z=Object.seal;m(Object,"seal",{value:function(D){return C(D),z(D)}});var I=Object.preventExtensions;m(Object,"preventExtensions",{value:function(D){return C(D),I(D)}})})();function _(x){return x.prototype=null,Object.freeze(x)}var T=!1;function f(){!T&&typeof console<"u"&&(T=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var u=0,A=function(){this instanceof A||f();var x=[],z=[],I=u++;function O(P,j){var U,$=C(P);return $?I in $?$[I]:j:(U=x.indexOf(P),U>=0?z[U]:j)}function D(P){var j=C(P);return j?I in j:x.indexOf(P)>=0}function B(P,j){var U,$=C(P);return $?$[I]=j:(U=x.indexOf(P),U>=0?z[U]=j:(U=x.length,z[U]=j,x[U]=P)),this}function F(P){var j=C(P),U,$;return j?I in j&&delete j[I]:(U=x.indexOf(P),U<0?!1:($=x.length-1,x[U]=void 0,z[U]=z[$],x[U]=x[$],x.length=$,z.length=$,!0))}return Object.create(A.prototype,{get___:{value:_(O)},has___:{value:_(D)},set___:{value:_(B)},delete___:{value:_(F)}})};A.prototype=Object.create(Object.prototype,{get:{value:function(z,I){return this.get___(z,I)},writable:!0,configurable:!0},has:{value:function(z){return this.has___(z)},writable:!0,configurable:!0},set:{value:function(z,I){return this.set___(z,I)},writable:!0,configurable:!0},delete:{value:function(z){return this.delete___(z)},writable:!0,configurable:!0}}),typeof r=="function"?function(){n&&typeof Proxy<"u"&&(Proxy=void 0);function x(){this instanceof A||f();var z=new r,I=void 0,O=!1;function D(j,U){return I?z.has(j)?z.get(j):I.get___(j,U):z.get(j,U)}function B(j){return z.has(j)||(I?I.has___(j):!1)}var F;n?F=function(j,U){return z.set(j,U),z.has(j)||(I||(I=new A),I.set(j,U)),this}:F=function(j,U){if(O)try{z.set(j,U)}catch{I||(I=new A),I.set___(j,U)}else z.set(j,U);return this};function P(j){var U=!!z.delete(j);return I&&I.delete___(j)||U}return Object.create(A.prototype,{get___:{value:_(D)},has___:{value:_(B)},set___:{value:_(F)},delete___:{value:_(P)},permitHostObjects___:{value:_(function(j){if(j===t)O=!0;else throw new Error("bogus call to permitHostObjects___")})}})}x.prototype=A.prototype,l.exports=x,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),l.exports=A)})()},236:function(l,e,t){var n=t(8284);l.exports=r;function r(){var a={};return function(o){if((typeof o!="object"||o===null)&&typeof o!="function")throw new Error("Weakmap-shim: Key must be object");var s=o.valueOf(a);return s&&s.identity===a?s:n(o,a)}}},8284:function(l){l.exports=e;function e(t,n){var r={identity:n},a=t.valueOf;return Object.defineProperty(t,"valueOf",{value:function(o){return o!==n?a.apply(this,arguments):r},writable:!0}),r}},606:function(l,e,t){var n=t(236);l.exports=r;function r(){var a=n();return{get:function(o,s){var c=a(o);return c.hasOwnProperty("value")?c.value:s},set:function(o,s){return a(o).value=s,this},has:function(o){return"value"in a(o)},delete:function(o){return delete a(o).value}}}},3349:function(l){"use strict";function e(){return function(s,c,m,h,v,g){var i=s[0],w=m[0],S=[0],M=w;h|=0;var C=0,_=w;for(C=0;C=0!=f>=0&&v.push(S[0]+.5+.5*(T+f)/(T-f))}h+=_,++S[0]}}}function t(){return e()}var n=t;function r(s){var c={};return function(h,v,g){var i=h.dtype,w=h.order,S=[i,w.join()].join(),M=c[S];return M||(c[S]=M=s([i,w])),M(h.shape.slice(0),h.data,h.stride,h.offset|0,v,g)}}function a(s){return r(n.bind(void 0,s))}function o(s){return a({funcName:s.funcName})}l.exports=o({funcName:"zeroCrossings"})},781:function(l,e,t){"use strict";l.exports=r;var n=t(3349);function r(a,o){var s=[];return o=+o||0,n(a.hi(a.shape[0]-1),s,o),s}},7790:function(){}},b={};function E(l){var e=b[l];if(e!==void 0)return e.exports;var t=b[l]={id:l,loaded:!1,exports:{}};return p[l].call(t.exports,t,t.exports,E),t.loaded=!0,t.exports}(function(){E.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){E.nmd=function(l){return l.paths=[],l.children||(l.children=[]),l}}();var k=E(1964);V.exports=k})()}}),cp=ze({"src/lib/str2rgbarray.js"(J,V){"use strict";var{normalize:p}=Qn();function b(E){return E?p(E):[0,0,0,1]}V.exports=b}}),fp=ze({"src/lib/gl_format_color.js"(J,V){"use strict";var p=ao(),b=fl(),E=Qn(),k=fc().defaultLine,l=Ff().isArrayOrTypedArray,e=E.normalize(k),t=1;function n(c,m){return[c[0],c[1],c[2],c[3]*m]}function r(c){return p(c)||!E.isChannelArray(c)&&!E.isValid(c)?e:E.normalize(c)}function a(c){return p(c)?c:t}function o(c,m,h){var v=c.color;v&&v._inputArray&&(v=v._inputArray);var g=l(v),i=l(m),w=b.extractOpts(c),S=[],M,C,_,T,f;if(w.colorscale!==void 0?M=b.makeColorScaleFuncFromTrace(c):M=r,g?C=(A,x)=>A[x]===void 0?e:w.colorscale===void 0?M(A[x]):E.normalize(M(A[x])):C=r,i?_=function(A,x){return A[x]===void 0?t:a(A[x])}:_=a,g||i)for(var u=0;u0){var v=n.c2l(m);n._lowerLogErrorBound||(n._lowerLogErrorBound=v),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,v)}}else a[o]=[-s[0]*t,s[1]*t]}return a}function E(l){for(var e=0;e-1?-1:z.indexOf("right")>-1?1:0}function S(z){return z==null?0:z.indexOf("top")>-1?-1:z.indexOf("bottom")>-1?1:0}function M(z){var I=0,O=0,D=[I,O];if(Array.isArray(z))for(var B=0;B=0){var $=g(j.position,j.delaunayColor,j.delaunayAxis);$.opacity=z.opacity,this.delaunayMesh?this.delaunayMesh.update($):($.gl=I,this.delaunayMesh=k($),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},v.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function x(z,I){var O=new h(z,I.uid);return O.update(I),O}V.exports=x}}),mA=ze({"src/traces/scatter3d/attributes.js"(J,V){"use strict";var p=su(),b=Qs(),E=qs(),k=Il().axisHoverFormat,{hovertemplateAttrs:l,texttemplateAttrs:e,templatefallbackAttrs:t}=xs(),n=ws(),r=vA(),a=w2(),o=Ki().extendFlat,s=Al().overrideAll,c=(Nv(),Po(nv)).default,m=p.line,h=p.marker,v=h.line,g=o({width:m.width,dash:{valType:"enumerated",values:c(r),dflt:"solid"}},E("line"));function i(S){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var w=V.exports=s({x:p.x,y:p.y,z:{valType:"data_array"},text:o({},p.text,{}),texttemplate:e(),texttemplatefallback:t({editType:"calc"}),hovertext:o({},p.hovertext,{}),hovertemplate:l(),hovertemplatefallback:t(),xhoverformat:k("x"),yhoverformat:k("y"),zhoverformat:k("z"),mode:o({},p.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:i("x"),y:i("y"),z:i("z")},connectgaps:p.connectgaps,line:g,marker:o({symbol:{valType:"enumerated",values:c(a),dflt:"circle",arrayOk:!0},size:o({},h.size,{dflt:8}),sizeref:h.sizeref,sizemin:h.sizemin,sizemode:h.sizemode,opacity:o({},h.opacity,{arrayOk:!1}),colorbar:h.colorbar,line:o({width:o({},v.width,{arrayOk:!1})},E("marker.line"))},E("marker")),textposition:o({},p.textposition,{dflt:"top center"}),textfont:b({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:n.opacity,hoverinfo:o({},n.hoverinfo)},"calc","nested");w.x.editType=w.y.editType=w.z.editType="calc+clearAxisTypes"}}),LN=ze({"src/traces/scatter3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=el(),k=id(),l=_d(),e=xd(),t=mA();V.exports=function(a,o,s,c){function m(C,_){return b.coerce(a,o,t,C,_)}var h=n(a,o,m,c);if(!h){o.visible=!1;return}m("text"),m("hovertext"),m("hovertemplate"),m("hovertemplatefallback"),m("xhoverformat"),m("yhoverformat"),m("zhoverformat"),m("mode"),E.hasMarkers(o)&&k(a,o,s,c,m,{noAngle:!0,noLineDash:!0,noSelect:!0}),E.hasLines(o)&&(m("connectgaps"),l(a,o,s,c,m)),E.hasText(o)&&(m("texttemplate"),m("texttemplatefallback"),e(a,o,c,m,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var v=(o.line||{}).color,g=(o.marker||{}).color;m("surfaceaxis")>=0&&m("surfacecolor",v||g);for(var i=["x","y","z"],w=0;w<3;++w){var S="projection."+i[w];m(S+".show")&&(m(S+".opacity"),m(S+".scale"))}var M=p.getComponentMethod("errorbars","supplyDefaults");M(a,o,v||g||s,{axis:"z"}),M(a,o,v||g||s,{axis:"y",inherit:"z"}),M(a,o,v||g||s,{axis:"x",inherit:"z"})};function n(r,a,o,s){var c=0,m=o("x"),h=o("y"),v=o("z"),g=p.getComponentMethod("calendars","handleTraceDefaults");return g(r,a,["x","y","z"],s),m&&h&&v&&(c=Math.min(m.length,h.length,v.length),a._length=a._xlength=a._ylength=a._zlength=c),c}}}),PN=ze({"src/traces/scatter3d/calc.js"(J,V){"use strict";var p=Nd(),b=od();V.exports=function(k,l){var e=[{x:!1,y:!1,trace:l,t:{}}];return p(e,l),b(k,l),e}}}),RN=ze({"node_modules/get-canvas-context/index.js"(J,V){V.exports=p;function p(b,E){if(typeof b!="string")throw new TypeError("must specify type string");if(E=E||{},typeof document>"u"&&!E.canvas)return null;var k=E.canvas||document.createElement("canvas");typeof E.width=="number"&&(k.width=E.width),typeof E.height=="number"&&(k.height=E.height);var l=E,e;try{var t=[b];b.indexOf("webgl")===0&&t.push("experimental-"+b);for(var n=0;n/g," "));o[s]=v,c.tickmode=m}}n.ticks=o;for(var s=0;s<3;++s){k[s]=.5*(t.glplot.bounds[0][s]+t.glplot.bounds[1][s]);for(var g=0;g<2;++g)n.bounds[g][s]=t.glplot.bounds[g][s]}t.contourLevels=l(o)}}}),BN=ze({"src/plots/gl3d/scene.js"(J,V){"use strict";var p=df().gl_plot3d,b=p.createCamera,E=p.createScene,k=IN(),l=Rx(),e=mi(),t=Nr(),n=t.preserveDrawingBuffer(),r=Gi(),a=Zl(),o=cp(),s=gA(),c=C5(),m=DN(),h=FN(),v=zN(),g=md().applyAutorangeOptions,i,w,S=!1;function M(O,D){var B=document.createElement("div"),F=O.container;this.graphDiv=O.graphDiv;var P=document.createElementNS("http://www.w3.org/2000/svg","svg");P.style.position="absolute",P.style.top=P.style.left="0px",P.style.width=P.style.height="100%",P.style["z-index"]=20,P.style["pointer-events"]="none",B.appendChild(P),this.svgContainer=P,B.id=O.id,B.style.position="absolute",B.style.top=B.style.left="0px",B.style.width=B.style.height="100%",F.appendChild(B),this.fullLayout=D,this.id=O.id||"scene",this.fullSceneLayout=D[this.id],this.plotArgs=[[],{},{}],this.axesOptions=m(D,D[this.id]),this.spikeOptions=h(D[this.id]),this.container=B,this.staticMode=!!O.staticPlot,this.pixelRatio=this.pixelRatio||O.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=e.getComponentMethod("annotations3d","convert"),this.drawAnnotations=e.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var C=M.prototype;C.prepareOptions=function(){var O=this,D={canvas:O.canvas,gl:O.gl,glOptions:{preserveDrawingBuffer:n,premultipliedAlpha:!0,antialias:!0},container:O.container,axes:O.axesOptions,spikes:O.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:O.camera,pixelRatio:O.pixelRatio};if(O.staticMode){if(!w&&(i=document.createElement("canvas"),w=k({canvas:i,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!w))throw new Error("error creating static canvas/context for image server");D.gl=w,D.canvas=i}return D};var _=!0;C.tryCreatePlot=function(){var O=this,D=O.prepareOptions(),B=!0;try{O.glplot=E(D)}catch{if(O.staticMode||!_||n)B=!1;else{t.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{n=D.glOptions.preserveDrawingBuffer=!0,O.glplot=E(D)}catch{n=D.glOptions.preserveDrawingBuffer=!1,B=!1}}}return _=!1,B},C.initializeGLCamera=function(){var O=this,D=O.fullSceneLayout.camera,B=D.projection.type==="orthographic";O.camera=b(O.container,{center:[D.center.x,D.center.y,D.center.z],eye:[D.eye.x,D.eye.y,D.eye.z],up:[D.up.x,D.up.y,D.up.z],_ortho:B,zoomMin:.01,zoomMax:100,mode:"orbit"})},C.initializeGLPlot=function(){var O=this;O.initializeGLCamera();var D=O.tryCreatePlot();if(!D)return s(O);O.traces={},O.make4thDimension();var B=O.graphDiv,F=B.layout,P=function(){var U={};return O.isCameraChanged(F)&&(U[O.id+".camera"]=O.getCamera()),O.isAspectChanged(F)&&(U[O.id+".aspectratio"]=O.glplot.getAspectratio(),F[O.id].aspectmode!=="manual"&&(O.fullSceneLayout.aspectmode=F[O.id].aspectmode=U[O.id+".aspectmode"]="manual")),U},j=function(U){if(U.fullSceneLayout.dragmode!==!1){var $=P();U.saveLayout(F),U.graphDiv.emit("plotly_relayout",$)}};return O.glplot.canvas&&(O.glplot.canvas.addEventListener("mouseup",function(){j(O)}),O.glplot.canvas.addEventListener("touchstart",function(){S=!0}),O.glplot.canvas.addEventListener("wheel",function(U){if(B._context._scrollZoom.gl3d){if(O.camera._ortho){var $=U.deltaX>U.deltaY?1.1:.9090909090909091,Q=O.glplot.getAspectratio();O.glplot.setAspectratio({x:$*Q.x,y:$*Q.y,z:$*Q.z})}j(O)}},l?{passive:!1}:!1),O.glplot.canvas.addEventListener("mousemove",function(){if(O.fullSceneLayout.dragmode!==!1&&O.camera.mouseListener.buttons!==0){var U=P();O.graphDiv.emit("plotly_relayouting",U)}}),O.staticMode||O.glplot.canvas.addEventListener("webglcontextlost",function(U){B&&B.emit&&B.emit("plotly_webglcontextlost",{event:U,layer:O.id})},!1)),O.glplot.oncontextloss=function(){O.recoverContext()},O.glplot.onrender=function(){O.render()},!0},C.render=function(){var O=this,D=O.graphDiv,B,F=O.svgContainer,P=O.container.getBoundingClientRect();D._fullLayout._calcInverseTransform(D);var j=D._fullLayout._invScaleX,U=D._fullLayout._invScaleY,$=P.width*j,Q=P.height*U;F.setAttributeNS(null,"viewBox","0 0 "+$+" "+Q),F.setAttributeNS(null,"width",$),F.setAttributeNS(null,"height",Q),v(O),O.glplot.axes.update(O.axesOptions);for(var re=Object.keys(O.traces),ne=null,se=O.glplot.selection,G=0;G")):B.type==="isosurface"||B.type==="volume"?(q.valueLabel=r.hoverLabelText(O._mockAxis,O._mockAxis.d2l(se.traceCoordinate[3]),B.valuehoverformat),xe.push("value: "+q.valueLabel),se.textLabel&&xe.push(se.textLabel),he=xe.join("
")):he=se.textLabel;var we={x:se.traceCoordinate[0],y:se.traceCoordinate[1],z:se.traceCoordinate[2],data:H._input,fullData:H,curveNumber:H.index,pointNumber:Y};a.appendArrayPointValue(we,H,Y),B._module.eventData&&(we=H._module.eventData(we,se,H,{},Y));var Me={points:[we]};if(O.fullSceneLayout.hovermode){var Se=[];a.loneHover({trace:H,x:(.5+.5*K[0]/K[3])*$,y:(.5-.5*K[1]/K[3])*Q,xLabel:q.xLabel,yLabel:q.yLabel,zLabel:q.zLabel,text:he,name:ne.name,color:a.castHoverOption(H,Y,"bgcolor")||ne.color,borderColor:a.castHoverOption(H,Y,"bordercolor"),fontFamily:a.castHoverOption(H,Y,"font.family"),fontSize:a.castHoverOption(H,Y,"font.size"),fontColor:a.castHoverOption(H,Y,"font.color"),nameLength:a.castHoverOption(H,Y,"namelength"),textAlign:a.castHoverOption(H,Y,"align"),hovertemplate:t.castOption(H,Y,"hovertemplate"),hovertemplateLabels:t.extendFlat({},we,q),eventData:[we]},{container:F,gd:D,inOut_bbox:Se}),we.bbox=Se[0]}se.distance<5&&(se.buttons||S)?D.emit("plotly_click",Me):D.emit("plotly_hover",Me),this.oldEventData=Me}else a.loneUnhover(F),this.oldEventData&&D.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;O.drawAnnotations(O)},C.recoverContext=function(){var O=this;O.glplot.dispose();var D=function(){if(O.glplot.gl.isContextLost()){requestAnimationFrame(D);return}if(!O.initializeGLPlot()){t.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}O.plot.apply(O,O.plotArgs)};requestAnimationFrame(D)};var T=["xaxis","yaxis","zaxis"];function f(O,D,B){for(var F=O.fullSceneLayout,P=0;P<3;P++){var j=T[P],U=j.charAt(0),$=F[j],Q=D[U],re=D[U+"calendar"],ne=D["_"+U+"length"];if(!t.isArrayOrTypedArray(Q))B[0][P]=Math.min(B[0][P],0),B[1][P]=Math.max(B[1][P],ne-1);else for(var se,G=0;G<(ne||Q.length);G++)if(t.isArrayOrTypedArray(Q[G]))for(var X=0;XH[1][U])H[0][U]=-1,H[1][U]=1;else{var Ve=H[1][U]-H[0][U];H[0][U]-=Ve/32,H[1][U]+=Ve/32}if(Z=[H[0][U],H[1][U]],Z=g(Z,Q),H[0][U]=Z[0],H[1][U]=Z[1],Q.isReversed()){var Ge=H[0][U];H[0][U]=H[1][U],H[1][U]=Ge}}else Z=Q.range,H[0][U]=Q.r2l(Z[0]),H[1][U]=Q.r2l(Z[1]);H[0][U]===H[1][U]&&(H[0][U]-=1,H[1][U]+=1),Y[U]=H[1][U]-H[0][U],Q.range=[H[0][U],H[1][U]],Q.limitRange(),F.glplot.setBounds(U,{min:Q.range[0]*X[U],max:Q.range[1]*X[U]})}var ke,_e=ne.aspectmode;if(_e==="cube")ke=[1,1,1];else if(_e==="manual"){var ce=ne.aspectratio;ke=[ce.x,ce.y,ce.z]}else if(_e==="auto"||_e==="data"){var ve=[1,1,1];for(U=0;U<3;++U){Q=ne[T[U]],re=Q.type;var le=q[re];ve[U]=Math.pow(le.acc,1/le.count)/X[U]}_e==="data"||Math.max.apply(null,ve)/Math.min.apply(null,ve)<=4?ke=ve:ke=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");ne.aspectratio.x=se.aspectratio.x=ke[0],ne.aspectratio.y=se.aspectratio.y=ke[1],ne.aspectratio.z=se.aspectratio.z=ke[2],F.glplot.setAspectratio(ne.aspectratio),F.viewInitial.aspectratio||(F.viewInitial.aspectratio={x:ne.aspectratio.x,y:ne.aspectratio.y,z:ne.aspectratio.z}),F.viewInitial.aspectmode||(F.viewInitial.aspectmode=ne.aspectmode);var Ae=ne.domain||null,Be=D._size||null;if(Ae&&Be){var Xe=F.container.style;Xe.position="absolute",Xe.left=Be.l+Ae.x[0]*Be.w+"px",Xe.top=Be.t+(1-Ae.y[1])*Be.h+"px",Xe.width=Be.w*(Ae.x[1]-Ae.x[0])+"px",Xe.height=Be.h*(Ae.y[1]-Ae.y[0])+"px"}F.glplot.redraw()}},C.destroy=function(){var O=this;O.glplot&&(O.camera.mouseListener.enabled=!1,O.container.removeEventListener("wheel",O.camera.wheelListener),O.camera=null,O.glplot.dispose(),O.container.parentNode.removeChild(O.container),O.glplot=null)};function A(O){return[[O.eye.x,O.eye.y,O.eye.z],[O.center.x,O.center.y,O.center.z],[O.up.x,O.up.y,O.up.z]]}function x(O){return{up:{x:O.up[0],y:O.up[1],z:O.up[2]},center:{x:O.center[0],y:O.center[1],z:O.center[2]},eye:{x:O.eye[0],y:O.eye[1],z:O.eye[2]},projection:{type:O._ortho===!0?"orthographic":"perspective"}}}C.getCamera=function(){var O=this;return O.camera.view.recalcMatrix(O.camera.view.lastT()),x(O.camera)},C.setViewport=function(O){var D=this,B=O.camera;D.camera.lookAt.apply(this,A(B)),D.glplot.setAspectratio(O.aspectratio);var F=B.projection.type==="orthographic",P=D.camera._ortho;F!==P&&(D.glplot.redraw(),D.glplot.clearRGBA(),D.glplot.dispose(),D.initializeGLPlot())},C.isCameraChanged=function(O){var D=this,B=D.getCamera(),F=t.nestedProperty(O,D.id+".camera"),P=F.get();function j(re,ne,se,G){var X=["up","center","eye"],K=["x","y","z"];return ne[X[se]]&&re[X[se]][K[G]]===ne[X[se]][K[G]]}var U=!1;if(P===void 0)U=!0;else{for(var $=0;$<3;$++)for(var Q=0;Q<3;Q++)if(!j(B,P,$,Q)){U=!0;break}(!P.projection||B.projection&&B.projection.type!==P.projection.type)&&(U=!0)}return U},C.isAspectChanged=function(O){var D=this,B=D.glplot.getAspectratio(),F=t.nestedProperty(O,D.id+".aspectratio"),P=F.get();return P===void 0||P.x!==B.x||P.y!==B.y||P.z!==B.z},C.saveLayout=function(O){var D=this,B=D.fullLayout,F,P,j,U,$,Q,re=D.isCameraChanged(O),ne=D.isAspectChanged(O),se=re||ne;if(se){var G={};if(re&&(F=D.getCamera(),P=t.nestedProperty(O,D.id+".camera"),j=P.get(),G[D.id+".camera"]=j),ne&&(U=D.glplot.getAspectratio(),$=t.nestedProperty(O,D.id+".aspectratio"),Q=$.get(),G[D.id+".aspectratio"]=Q),e.call("_storeDirectGUIEdit",O,B._preGUI,G),re){P.set(F);var X=t.nestedProperty(B,D.id+".camera");X.set(F)}if(ne){$.set(U);var K=t.nestedProperty(B,D.id+".aspectratio");K.set(U),D.glplot.redraw()}}return se},C.updateFx=function(O,D){var B=this,F=B.camera;if(F)if(O==="orbit")F.mode="orbit",F.keyBindingMode="rotate";else if(O==="turntable"){F.up=[0,0,1],F.mode="turntable",F.keyBindingMode="rotate";var P=B.graphDiv,j=P._fullLayout,U=B.fullSceneLayout.camera,$=U.up.x,Q=U.up.y,re=U.up.z;if(re/Math.sqrt($*$+Q*Q+re*re)<.999){var ne=B.id+".camera.up",se={x:0,y:0,z:1},G={};G[ne]=se;var X=P.layout;e.call("_storeDirectGUIEdit",X,j._preGUI,G),U.up=se,t.nestedProperty(X,ne).set(se)}}else F.keyBindingMode=O;B.fullSceneLayout.hovermode=D};function z(O,D,B){for(var F=0,P=B-1;F0)for(var $=255/U,Q=0;Q<3;++Q)O[j+Q]=Math.min($*O[j+Q],255)}}C.toImage=function(O){var D=this;O||(O="png"),D.staticMode&&D.container.appendChild(i),D.glplot.redraw();var B=D.glplot.gl,F=B.drawingBufferWidth,P=B.drawingBufferHeight;B.bindFramebuffer(B.FRAMEBUFFER,null);var j=new Uint8Array(F*P*4);B.readPixels(0,0,F,P,B.RGBA,B.UNSIGNED_BYTE,j),z(j,F,P),I(j,F,P);var U=document.createElement("canvas");U.width=F,U.height=P;var $=U.getContext("2d",{willReadFrequently:!0}),Q=$.createImageData(F,P);Q.data.set(j),$.putImageData(Q,0,0);var re;switch(O){case"jpeg":re=U.toDataURL("image/jpeg");break;case"webp":re=U.toDataURL("image/webp");break;default:re=U.toDataURL("image/png")}return D.staticMode&&D.container.removeChild(i),re},C.setConvert=function(){for(var O=this,D=0;D<3;D++){var B=O.fullSceneLayout[T[D]];r.setConvert(B,O.fullLayout),B.setScale=t.noop}},C.make4thDimension=function(){var O=this,D=O.graphDiv,B=D._fullLayout;O._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},r.setConvert(O._mockAxis,B)},V.exports=M}}),ON=ze({"src/plots/gl3d/layout/attributes.js"(J,V){"use strict";V.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}}}),yA=ze({"src/plots/gl3d/layout/axis_attributes.js"(J,V){"use strict";var p=Qn(),b=cf(),E=Ki().extendFlat,k=Al().overrideAll;V.exports=k({visible:b.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:p.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:b.color,categoryorder:b.categoryorder,categoryarray:b.categoryarray,title:{text:b.title.text,font:b.title.font},type:E({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorange:b.autorange,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},rangemode:b.rangemode,minallowed:b.minallowed,maxallowed:b.maxallowed,range:E({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,mirror:b.mirror,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,tickfont:b.tickfont,tickangle:b.tickangle,tickprefix:b.tickprefix,showtickprefix:b.showtickprefix,ticksuffix:b.ticksuffix,showticksuffix:b.showticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickformat:b.tickformat,tickformatstops:b.tickformatstops,hoverformat:b.hoverformat,showline:b.showline,linecolor:b.linecolor,linewidth:b.linewidth,showgrid:b.showgrid,gridcolor:E({},b.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:b.gridwidth,zeroline:b.zeroline,zerolinecolor:b.zerolinecolor,zerolinewidth:b.zerolinewidth},"plot","from-root")}}),_A=ze({"src/plots/gl3d/layout/layout_attributes.js"(J,V){"use strict";var p=yA(),b=Ml().attributes,E=Ki().extendFlat,k=Nr().counterRegex;function l(e,t,n){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:n,editType:"camera"},editType:"camera"}}V.exports={_arrayAttrRegexps:[k("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:E(l(0,0,1),{}),center:E(l(0,0,0),{}),eye:E(l(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:b({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:p,yaxis:p,zaxis:p,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"}}}),NN=ze({"src/plots/gl3d/layout/axis_defaults.js"(J,V){"use strict";var p=Qn(),b=Nr(),E=hs(),k=yA(),l=E5(),e=y1(),t=["xaxis","yaxis","zaxis"],n=100*136/187;V.exports=function(a,o,s){var c,m;function h(i,w){return b.coerce(c,m,k,i,w)}for(var v=0;v1;function h(v){if(!m){var g=p.validate(o[v],e[v]);if(g)return o[v]}}k(o,s,c,{type:n,attributes:e,handleDefaults:r,fullLayout:s,font:s.font,fullData:c,getDfltFromLayout:h,autotypenumbersDflt:s.autotypenumbers,paper_bgcolor:s.paper_bgcolor,calendar:s.calendar})};function r(a,o,s,c){for(var m=s("bgcolor"),h=b.combine(m,c.paper_bgcolor),v=["up","center","eye"],g=0;g.999)&&(C="turntable")}else C="turntable";s("dragmode",C),s("hovermode",c.getDfltFromLayout("hovermode"))}}}),xv=ze({"src/plots/gl3d/index.js"(J){"use strict";var V=Al().overrideAll,p=rv(),b=BN(),E=zf().getSubplotData,k=Nr(),l=nd(),e="gl3d",t="scene";J.name=e,J.attr=t,J.idRoot=t,J.idRegex=J.attrRegex=k.counterRegex("scene"),J.attributes=ON(),J.layoutAttributes=_A(),J.baseLayoutAttrOverrides=V({hoverlabel:p.hoverlabel},"plot","nested"),J.supplyLayoutDefaults=jN(),J.plot=function(r){for(var a=r._fullLayout,o=r._fullData,s=a._subplots[e],c=0;c0){z=c[I];break}return z}function g(A,x){if(!(A<1||x<1)){for(var z=h(A),I=h(x),O=1,D=0;DM;)I--,I/=v(I),I++,I1?O:1};function C(A,x,z){var I=z[8]+z[2]*x[0]+z[5]*x[1];return A[0]=(z[6]+z[0]*x[0]+z[3]*x[1])/I,A[1]=(z[7]+z[1]*x[0]+z[4]*x[1])/I,A}function _(A,x,z){return T(A,x,C,z),A}function T(A,x,z,I){for(var O=[0,0],D=A.shape[0],B=A.shape[1],F=0;F0&&this.contourStart[I]!==null&&this.contourEnd[I]!==null&&this.contourEnd[I]>this.contourStart[I]))for(x[I]=!0,O=this.contourStart[I];OQ&&(this.minValues[j]=Q),this.maxValues[j]c&&(n.isomin=null,n.isomax=null);var m=o("x"),h=o("y"),v=o("z"),g=o("value");if(!m||!m.length||!h||!h.length||!v||!v.length||!g||!g.length){n.visible=!1;return}var i=b.getComponentMethod("calendars","handleTraceDefaults");i(t,n,["x","y","z"],a),o("valuehoverformat"),["x","y","z"].forEach(function(C){o(C+"hoverformat");var _="caps."+C,T=o(_+".show");T&&o(_+".fill");var f="slices."+C,u=o(f+".show");u&&(o(f+".fill"),o(f+".locations"))});var w=o("spaceframe.show");w&&o("spaceframe.fill");var S=o("surface.show");S&&(o("surface.count"),o("surface.fill"),o("surface.pattern"));var M=o("contour.show");M&&(o("contour.color"),o("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(C){o(C)}),k(t,n,a,o,{prefix:"",cLetter:"c"}),n._length=null}V.exports={supplyDefaults:l,supplyIsoDefaults:e}}}),A2=ze({"src/traces/streamtube/calc.js"(J,V){"use strict";var p=Nr(),b=Qf();function E(t,n){n._len=Math.min(n.u.length,n.v.length,n.w.length,n.x.length,n.y.length,n.z.length),n._u=e(n.u,n._len),n._v=e(n.v,n._len),n._w=e(n.w,n._len),n._x=e(n.x,n._len),n._y=e(n.y,n._len),n._z=e(n.z,n._len);var r=k(n);n._gridFill=r.fill,n._Xs=r.Xs,n._Ys=r.Ys,n._Zs=r.Zs,n._len=r.len;var a=0,o,s,c;n.starts&&(o=e(n.starts.x||[]),s=e(n.starts.y||[]),c=e(n.starts.z||[]),a=Math.min(o.length,s.length,c.length)),n._startsX=o||[],n._startsY=s||[],n._startsZ=c||[];var m=0,h=1/0,v;for(v=0;v1&&(u=n[o-1],x=r[o-1],I=a[o-1]),s=0;su?"-":"+")+"x"),M=M.replace("y",(A>x?"-":"+")+"y"),M=M.replace("z",(z>I?"-":"+")+"z");var F=function(){o=0,O=[],D=[],B=[]};(!o||o0;h--){var v=Math.min(m[h],m[h-1]),g=Math.max(m[h],m[h-1]);if(g>v&&v-1}function ee(Ot,vt){return Ot===null?vt:Ot}function ae(Ot,vt,ht){re();var De=[vt],Ne=[ht];if(H>=1)De=[vt],Ne=[ht];else if(H>0){var We=q(vt,ht);De=We.xyzv,Ne=We.abc}for(var Ke=0;Ke-1?ht[et]:Q(Mt,pt,Pt);qt>-1?Je[et]=qt:Je[et]=se(Mt,pt,Pt,ee(Ot,Ct))}G(Je[0],Je[1],Je[2])}}function he(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(2,3,0)}function xe(Ot,vt,ht){var De=function(Ne,We,Ke){ae(Ot,[vt[Ne],vt[We],vt[Ke]],[ht[Ne],ht[We],ht[Ke]])};De(0,1,2),De(3,0,1),De(2,3,0),De(1,2,3)}function we(Ot,vt,ht,De){var Ne=Ot[3];NeDe&&(Ne=De);for(var We=(Ot[3]-Ne)/(Ot[3]-vt[3]+1e-9),Ke=[],Je=0;Je<4;Je++)Ke[Je]=(1-We)*Ot[Je]+We*vt[Je];return Ke}function Me(Ot,vt,ht){return Ot>=vt&&Ot<=ht}function Se(Ot){var vt=.001*(F-B);return Ot>=B-vt&&Ot<=F+vt}function Ie(Ot){for(var vt=[],ht=0;ht<4;ht++){var De=Ot[ht];vt.push([c._x[De],c._y[De],c._z[De],c._value[De]])}return vt}var Ve=3;function Ge(Ot,vt,ht,De,Ne,We){We||(We=1),ht=[-1,-1,-1];var Ke=!1,Je=[Me(vt[0][3],De,Ne),Me(vt[1][3],De,Ne),Me(vt[2][3],De,Ne)];if(!Je[0]&&!Je[1]&&!Je[2])return!1;var et=function(pt,Pt,Ct){return Se(Pt[0][3])&&Se(Pt[1][3])&&Se(Pt[2][3])?(ae(pt,Pt,Ct),!0):WeJe?[O,We]:[We,D];Tt(vt,et[0],et[1])}}var Mt=[[Math.min(B,D),Math.max(B,D)],[Math.min(O,F),Math.max(O,F)]];["x","y","z"].forEach(function(pt){for(var Pt=[],Ct=0;Ct0&&(Yt.push(ur.id),pt==="x"?Rt.push([ur.distRatio,0,0]):pt==="y"?Rt.push([0,ur.distRatio,0]):Rt.push([0,0,ur.distRatio]))}else pt==="x"?Kr=_r(1,u-1):pt==="y"?Kr=_r(1,A-1):Kr=_r(1,x-1);Yt.length>0&&(pt==="x"?Pt[qt]=At(Ot,Yt,Vt,Ht,Rt,Pt[qt]):pt==="y"?Pt[qt]=$t(Ot,Yt,Vt,Ht,Rt,Pt[qt]):Pt[qt]=rr(Ot,Yt,Vt,Ht,Rt,Pt[qt]),qt++),Kr.length>0&&(pt==="x"?Pt[qt]=Be(Ot,Kr,Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,Kr,Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,Kr,Vt,Ht,Pt[qt]),qt++)}var cr=c.caps[pt];cr.show&&cr.fill&&(Y(cr.fill),pt==="x"?Pt[qt]=Be(Ot,[0,u-1],Vt,Ht,Pt[qt]):pt==="y"?Pt[qt]=Xe(Ot,[0,A-1],Vt,Ht,Pt[qt]):Pt[qt]=Ye(Ot,[0,x-1],Vt,Ht,Pt[qt]),qt++)}}),S===0&&ne(),c._meshX=P,c._meshY=j,c._meshZ=U,c._meshIntensity=$,c._Xs=_,c._Ys=T,c._Zs=f}return or(),c}function s(c,m){var h=c.glplot.gl,v=p({gl:h}),g=new n(c,v,m.uid);return v._trace=g,g.update(m),c.glplot.add(v),g}V.exports={findNearestOnAxis:t,generateIsoMeshes:o,createIsosurfaceTrace:s}}}),YN=ze({"src/traces/isosurface/index.js"(J,V){"use strict";V.exports={attributes:T2(),supplyDefaults:bA().supplyDefaults,calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:M2().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),XN=ze({"lib/isosurface.js"(J,V){"use strict";V.exports=YN()}}),TA=ze({"src/traces/volume/attributes.js"(J,V){"use strict";var p=qs(),b=T2(),E=K1(),k=ws(),l=Ki().extendFlat,e=Al().overrideAll,t=V.exports=e(l({x:b.x,y:b.y,z:b.z,value:b.value,isomin:b.isomin,isomax:b.isomax,surface:b.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:b.slices,caps:b.caps,text:b.text,hovertext:b.hovertext,xhoverformat:b.xhoverformat,yhoverformat:b.yhoverformat,zhoverformat:b.zhoverformat,valuehoverformat:b.valuehoverformat,hovertemplate:b.hovertemplate,hovertemplatefallback:b.hovertemplatefallback},p("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:b.colorbar,opacity:b.opacity,opacityscale:E.opacityscale,lightposition:b.lightposition,lighting:b.lighting,flatshading:b.flatshading,contour:b.contour,hoverinfo:l({},k.hoverinfo),showlegend:l({},k.showlegend,{dflt:!1})}),"calc","nested");t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes"}}),ZN=ze({"src/traces/volume/defaults.js"(J,V){"use strict";var p=Nr(),b=TA(),E=bA().supplyIsoDefaults,k=xA().opacityscaleDefaults;V.exports=function(e,t,n,r){function a(o,s){return p.coerce(e,t,b,o,s)}E(e,t,n,r,a),k(e,t,r,a)}}}),$N=ze({"src/traces/volume/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=fp().parseColorScale,E=Nr().isArrayOrTypedArray,k=cp(),l=fl().extractOpts,e=mg(),t=M2().findNearestOnAxis,n=M2().generateIsoMeshes;function r(s,c,m){this.scene=s,this.uid=m,this.mesh=c,this.name="",this.data=null,this.showContour=!1}var a=r.prototype;a.handlePick=function(s){if(s.object===this.mesh){var c=s.data.index,m=this.data._meshX[c],h=this.data._meshY[c],v=this.data._meshZ[c],g=this.data._Ys.length,i=this.data._Zs.length,w=t(m,this.data._Xs).id,S=t(h,this.data._Ys).id,M=t(v,this.data._Zs).id,C=s.index=M+i*S+i*g*w;s.traceCoordinate=[this.data._meshX[C],this.data._meshY[C],this.data._meshZ[C],this.data._value[C]];var _=this.data.hovertext||this.data.text;return E(_)&&_[C]!==void 0?s.textLabel=_[C]:_&&(s.textLabel=_),!0}},a.update=function(s){var c=this.scene,m=c.fullSceneLayout;this.data=n(s);function h(S,M,C,_){return M.map(function(T){return S.d2l(T,0,_)*C})}var v=e(h(m.xaxis,s._meshX,c.dataScale[0],s.xcalendar),h(m.yaxis,s._meshY,c.dataScale[1],s.ycalendar),h(m.zaxis,s._meshZ,c.dataScale[2],s.zcalendar)),g=e(s._meshI,s._meshJ,s._meshK),i={positions:v,cells:g,lightPosition:[s.lightposition.x,s.lightposition.y,s.lightposition.z],ambient:s.lighting.ambient,diffuse:s.lighting.diffuse,specular:s.lighting.specular,roughness:s.lighting.roughness,fresnel:s.lighting.fresnel,vertexNormalsEpsilon:s.lighting.vertexnormalsepsilon,faceNormalsEpsilon:s.lighting.facenormalsepsilon,opacity:s.opacity,opacityscale:s.opacityscale,contourEnable:s.contour.show,contourColor:k(s.contour.color).slice(0,3),contourWidth:s.contour.width,useFacetNormals:s.flatshading},w=l(s);i.vertexIntensity=s._meshIntensity,i.vertexIntensityBounds=[w.min,w.max],i.colormap=b(s),this.mesh.update(i)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function o(s,c){var m=s.glplot.gl,h=p({gl:m}),v=new r(s,h,c.uid);return h._trace=v,v.update(c),s.glplot.add(h),v}V.exports=o}}),KN=ze({"src/traces/volume/index.js"(J,V){"use strict";V.exports={attributes:TA(),supplyDefaults:ZN(),calc:wA(),colorbar:{min:"cmin",max:"cmax"},plot:$N(),moduleType:"trace",name:"volume",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),JN=ze({"lib/volume.js"(J,V){"use strict";V.exports=KN()}}),QN=ze({"src/traces/mesh3d/defaults.js"(J,V){"use strict";var p=mi(),b=Nr(),E=qc(),k=vg();V.exports=function(e,t,n,r){function a(h,v){return b.coerce(e,t,k,h,v)}function o(h){var v=h.map(function(g){var i=a(g);return i&&b.isArrayOrTypedArray(i)?i:null});return v.every(function(g){return g&&g.length===v[0].length})&&v}var s=o(["x","y","z"]);if(!s){t.visible=!1;return}if(o(["i","j","k"]),t.i&&(!t.j||!t.k)||t.j&&(!t.k||!t.i)||t.k&&(!t.i||!t.j)){t.visible=!1;return}var c=p.getComponentMethod("calendars","handleTraceDefaults");c(e,t,["x","y","z"],r),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(h){a(h)});var m=a("contour.show");m&&(a("contour.color"),a("contour.width")),"intensity"in e?(a("intensity"),a("intensitymode"),E(e,t,r,a,{prefix:"",cLetter:"c"})):(t.showscale=!1,"facecolor"in e?a("facecolor"):"vertexcolor"in e?a("vertexcolor"):a("color",n)),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),t._length=null}}}),ej=ze({"src/traces/mesh3d/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){k.intensity&&p(E,k,{vals:k.intensity,containerStr:"",cLetter:"c"})}}}),tj=ze({"src/traces/mesh3d/convert.js"(J,V){"use strict";var p=df().gl_mesh3d,b=df().delaunay_triangulate,E=df().alpha_shape,k=df().convex_hull,l=fp().parseColorScale,e=Nr().isArrayOrTypedArray,t=cp(),n=fl().extractOpts,r=mg();function a(i,w,S){this.scene=i,this.uid=S,this.mesh=w,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var o=a.prototype;o.handlePick=function(i){if(i.object===this.mesh){var w=i.index=i.data.index;i.data._cellCenter?i.traceCoordinate=i.data.dataCoordinate:i.traceCoordinate=[this.data.x[w],this.data.y[w],this.data.z[w]];var S=this.data.hovertext||this.data.text;return e(S)&&S[w]!==void 0?i.textLabel=S[w]:S&&(i.textLabel=S),!0}};function s(i){for(var w=[],S=i.length,M=0;M=w-.5)return!1;return!0}o.update=function(i){var w=this.scene,S=w.fullSceneLayout;this.data=i;var M=i.x.length,C=r(c(S.xaxis,i.x,w.dataScale[0],i.xcalendar),c(S.yaxis,i.y,w.dataScale[1],i.ycalendar),c(S.zaxis,i.z,w.dataScale[2],i.zcalendar)),_;if(i.i&&i.j&&i.k){if(i.i.length!==i.j.length||i.j.length!==i.k.length||!v(i.i,M)||!v(i.j,M)||!v(i.k,M))return;_=r(m(i.i),m(i.j),m(i.k))}else i.alphahull===0?_=k(C):i.alphahull>0?_=E(i.alphahull,C):_=h(i.delaunayaxis,C);var T={positions:C,cells:_,lightPosition:[i.lightposition.x,i.lightposition.y,i.lightposition.z],ambient:i.lighting.ambient,diffuse:i.lighting.diffuse,specular:i.lighting.specular,roughness:i.lighting.roughness,fresnel:i.lighting.fresnel,vertexNormalsEpsilon:i.lighting.vertexnormalsepsilon,faceNormalsEpsilon:i.lighting.facenormalsepsilon,opacity:i.opacity,contourEnable:i.contour.show,contourColor:t(i.contour.color).slice(0,3),contourWidth:i.contour.width,useFacetNormals:i.flatshading};if(i.intensity){var f=n(i);this.color="#fff";var u=i.intensitymode;T[u+"Intensity"]=i.intensity,T[u+"IntensityBounds"]=[f.min,f.max],T.colormap=l(i)}else i.vertexcolor?(this.color=i.vertexcolor[0],T.vertexColors=s(i.vertexcolor)):i.facecolor?(this.color=i.facecolor[0],T.cellColors=s(i.facecolor)):(this.color=i.color,T.meshColor=t(i.color));this.mesh.update(T)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function g(i,w){var S=i.glplot.gl,M=p({gl:S}),C=new a(i,M,w.uid);return M._trace=C,C.update(w),i.glplot.add(M),C}V.exports=g}}),rj=ze({"src/traces/mesh3d/index.js"(J,V){"use strict";V.exports={attributes:vg(),supplyDefaults:QN(),calc:ej(),colorbar:{min:"cmin",max:"cmax"},plot:tj(),moduleType:"trace",name:"mesh3d",basePlotModule:xv(),categories:["gl3d","showLegend"],meta:{}}}}),aj=ze({"lib/mesh3d.js"(J,V){"use strict";V.exports=rj()}}),AA=ze({"src/traces/cone/attributes.js"(J,V){"use strict";var p=qs(),b=Il().axisHoverFormat,{hovertemplateAttrs:E,templatefallbackAttrs:k}=xs(),l=vg(),e=ws(),t=Ki().extendFlat,n={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","raw"],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:E({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:k({editType:"calc"}),uhoverformat:b("u",1),vhoverformat:b("v",1),whoverformat:b("w",1),xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z"),showlegend:t({},e.showlegend,{dflt:!1})};t(n,p("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(a){n[a]=l[a]}),n.hoverinfo=t({},e.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),V.exports=n}}),nj=ze({"src/traces/cone/defaults.js"(J,V){"use strict";var p=Nr(),b=qc(),E=AA();V.exports=function(l,e,t,n){function r(g,i){return p.coerce(l,e,E,g,i)}var a=r("u"),o=r("v"),s=r("w"),c=r("x"),m=r("y"),h=r("z");if(!a||!a.length||!o||!o.length||!s||!s.length||!c||!c.length||!m||!m.length||!h||!h.length){e.visible=!1;return}var v=r("sizemode");r("sizeref",v==="raw"?1:.5),r("anchor"),r("lighting.ambient"),r("lighting.diffuse"),r("lighting.specular"),r("lighting.roughness"),r("lighting.fresnel"),r("lightposition.x"),r("lightposition.y"),r("lightposition.z"),b(l,e,n,r,{prefix:"",cLetter:"c"}),r("text"),r("hovertext"),r("hovertemplate"),r("hovertemplatefallback"),r("uhoverformat"),r("vhoverformat"),r("whoverformat"),r("xhoverformat"),r("yhoverformat"),r("zhoverformat"),e._length=null}}}),ij=ze({"src/traces/cone/calc.js"(J,V){"use strict";var p=Qf();V.exports=function(E,k){for(var l=k.u,e=k.v,t=k.w,n=Math.min(k.x.length,k.y.length,k.z.length,l.length,e.length,t.length),r=-1/0,a=1/0,o=0;o2?v=m.slice(1,h-1):h===2?v=[(m[0]+m[1])/2]:v=m,v}function o(m){var h=m.length;return h===1?[.5,.5]:[m[1]-m[0],m[h-1]-m[h-2]]}function s(m,h){var v=m.fullSceneLayout,g=m.dataScale,i=h._len,w={};function S(se,G){var X=v[G],K=g[t[G]];return E.simpleMap(se,function(H){return X.d2l(H)*K})}if(w.vectors=e(S(h._u,"xaxis"),S(h._v,"yaxis"),S(h._w,"zaxis"),i),!i)return{positions:[],cells:[]};var M=S(h._Xs,"xaxis"),C=S(h._Ys,"yaxis"),_=S(h._Zs,"zaxis");w.meshgrid=[M,C,_],w.gridFill=h._gridFill;var T=h._slen;if(T)w.startingPositions=e(S(h._startsX,"xaxis"),S(h._startsY,"yaxis"),S(h._startsZ,"zaxis"));else{for(var f=C[0],u=a(M),A=a(_),x=new Array(u.length*A.length),z=0,I=0;If&&(f=z[0]),z[1]u&&(u=z[1])}function x(z){switch(z.type){case"GeometryCollection":z.geometries.forEach(x);break;case"Point":A(z.coordinates);break;case"MultiPoint":z.coordinates.forEach(A);break}}S.arcs.forEach(function(z){for(var I=-1,O=z.length,D;++If&&(f=D[0]),D[1]u&&(u=D[1])});for(C in S.objects)x(S.objects[C]);return[_,T,f,u]}function l(S,M){for(var C,_=S.length,T=_-M;T<--_;)C=S[T],S[T++]=S[_],S[_]=C}function e(S,M){return typeof M=="string"&&(M=S.objects[M]),M.type==="GeometryCollection"?{type:"FeatureCollection",features:M.geometries.map(function(C){return t(S,C)})}:t(S,M)}function t(S,M){var C=M.id,_=M.bbox,T=M.properties==null?{}:M.properties,f=n(S,M);return C==null&&_==null?{type:"Feature",properties:T,geometry:f}:_==null?{type:"Feature",id:C,properties:T,geometry:f}:{type:"Feature",id:C,bbox:_,properties:T,geometry:f}}function n(S,M){var C=E(S.transform),_=S.arcs;function T(I,O){O.length&&O.pop();for(var D=_[I<0?~I:I],B=0,F=D.length;B1)_=s(S,M,C);else for(T=0,_=new Array(f=S.arcs.length);T1)for(var O=1,D=A(z[0]),B,F;OD&&(F=z[0],z[0]=z[O],z[O]=F,D=B);return z}).filter(function(x){return x.length>0})}}function v(S,M){for(var C=0,_=S.length;C<_;){var T=C+_>>>1;S[T]=2))throw new Error("n must be \u22652");x=S.bbox||k(S);var C=x[0],_=x[1],T=x[2],f=x[3],u;M={scale:[T-C?(T-C)/(u-1):1,f-_?(f-_)/(u-1):1],translate:[C,_]}}else x=S.bbox;var A=i(M),x,z,I=S.objects,O={};function D(P){return A(P)}function B(P){var j;switch(P.type){case"GeometryCollection":j={type:"GeometryCollection",geometries:P.geometries.map(B)};break;case"Point":j={type:"Point",coordinates:D(P.coordinates)};break;case"MultiPoint":j={type:"MultiPoint",coordinates:P.coordinates.map(D)};break;default:return P}return P.id!=null&&(j.id=P.id),P.bbox!=null&&(j.bbox=P.bbox),P.properties!=null&&(j.properties=P.properties),j}function F(P){var j=0,U=1,$=P.length,Q,re=new Array($);for(re[0]=A(P[0],0);++j<$;)((Q=A(P[j],j))[0]||Q[1])&&(re[U++]=Q);return U===1&&(re[U++]=[0,0]),re.length=U,re}for(z in I)O[z]=B(I[z]);return{type:"Topology",bbox:x,transform:M,objects:O,arcs:S.arcs.map(F)}}p.bbox=k,p.feature=e,p.merge=m,p.mergeArcs=h,p.mesh=a,p.meshArcs=o,p.neighbors=g,p.quantize=w,p.transform=E,p.untransform=i,Object.defineProperty(p,"__esModule",{value:!0})})}}),S2=ze({"src/lib/topojson_utils.js"(J,V){"use strict";var p=V.exports={},b=J1().locationmodeToLayer,E=EA().feature;p.getTopojsonName=function(k){return[k.scope.replace(/ /g,"-"),"_",k.resolution.toString(),"m"].join("")},p.getTopojsonPath=function(k,l){return k+=k.endsWith("/")?"":"/",`${k}${l}.json`},p.getTopojsonFeatures=function(k,l){var e=b[k.locationmode],t=l.objects[e];return E(l,t).features}}}),Q1=ze({"src/lib/geojson_utils.js"(J){"use strict";var V=No().BADNUM;J.calcTraceToLineCoords=function(p){for(var b=p[0].trace,E=b.connectgaps,k=[],l=[],e=0;e0&&(k.push(l),l=[])}return l.length>0&&k.push(l),k},J.makeLine=function(p){return p.length===1?{type:"LineString",coordinates:p[0]}:{type:"MultiLineString",coordinates:p}},J.makePolygon=function(p){if(p.length===1)return{type:"Polygon",coordinates:p};for(var b=new Array(p.length),E=0;E{for(var S in w)p(i,S,{get:w[S],enumerable:!0})},e=(i,w,S,M)=>{if(w&&typeof w=="object"||typeof w=="function")for(let C of E(w))!k.call(i,C)&&C!==S&&p(i,C,{get:()=>w[C],enumerable:!(M=b(w,C))||M.enumerable});return i},t=i=>e(p({},"__esModule",{value:!0}),i),n={};l(n,{COUNTRIES:()=>r,byAlpha2:()=>v,byAlpha3:()=>h,byM49:()=>g,createLookup:()=>o,lookup:()=>c,lookupAlpha3:()=>m,sanitize:()=>a}),V.exports=t(n);var r=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function a(i){return i.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function o(i){let w=new Map,S=new Map,M=new Map;for(let f of i)w.set(f.iso3,f),f.iso2&&S.set(f.iso2,f),f.m49&&M.set(f.m49,f);let C=new Map;for(let f of i)for(let u of[f.name,...f.aliases]){let A=a(u),x=C.get(A);if(x!==void 0&&x!==f.iso3)throw new Error(`Duplicate name/alias "${A}": ${x} vs ${f.iso3}`);C.set(A,f.iso3)}function _(f){if(f==null)return;let u=String(f).trim();if(!u)return;if(/^\d+$/.test(u)){let x=M.get(String(parseInt(u,10)).padStart(3,"0"));if(x)return x}if(/^[A-Za-z]{2}$/.test(u)){let x=S.get(u.toUpperCase());if(x)return x}if(/^[A-Za-z]{3}$/.test(u)){let x=w.get(u.toUpperCase());if(x)return x}let A=C.get(a(u));return A===void 0?void 0:w.get(A)}function T(f){var u;return(u=_(f))==null?void 0:u.iso3}return{lookup:_,lookupAlpha3:T,byAlpha3:w,byAlpha2:S,byM49:M}}var s=o(r),c=s.lookup,m=s.lookupAlpha3,h=s.byAlpha3,v=s.byAlpha2,g=s.byM49}}),E2=ze({"node_modules/@turf/helpers/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=63710088e-1,p={centimeters:V*100,centimetres:V*100,degrees:360/(2*Math.PI),feet:V*3.28084,inches:V*39.37,kilometers:V/1e3,kilometres:V/1e3,meters:V,metres:V,miles:V/1609.344,millimeters:V*1e3,millimetres:V*1e3,nauticalmiles:V/1852,radians:1,yards:V*1.0936},b={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function E(I,O,D={}){let B={type:"Feature"};return(D.id===0||D.id)&&(B.id=D.id),D.bbox&&(B.bbox=D.bbox),B.properties=O||{},B.geometry=I,B}function k(I,O,D={}){switch(I){case"Point":return l(O).geometry;case"LineString":return r(O).geometry;case"Polygon":return t(O).geometry;case"MultiPoint":return c(O).geometry;case"MultiLineString":return s(O).geometry;case"MultiPolygon":return m(O).geometry;default:throw new Error(I+" is invalid")}}function l(I,O,D={}){if(!I)throw new Error("coordinates is required");if(!Array.isArray(I))throw new Error("coordinates must be an Array");if(I.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!u(I[0])||!u(I[1]))throw new Error("coordinates must contain numbers");return E({type:"Point",coordinates:I},O,D)}function e(I,O,D={}){return o(I.map(B=>l(B,O)),D)}function t(I,O,D={}){for(let F of I){if(F.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(F[F.length-1].length!==F[0].length)throw new Error("First and last Position are not equivalent.");for(let P=0;Pt(B,O)),D)}function r(I,O,D={}){if(I.length<2)throw new Error("coordinates must be an array of two or more positions");return E({type:"LineString",coordinates:I},O,D)}function a(I,O,D={}){return o(I.map(B=>r(B,O)),D)}function o(I,O={}){let D={type:"FeatureCollection"};return O.id&&(D.id=O.id),O.bbox&&(D.bbox=O.bbox),D.features=I,D}function s(I,O,D={}){return E({type:"MultiLineString",coordinates:I},O,D)}function c(I,O,D={}){return E({type:"MultiPoint",coordinates:I},O,D)}function m(I,O,D={}){return E({type:"MultiPolygon",coordinates:I},O,D)}function h(I,O,D={}){return E({type:"GeometryCollection",geometries:I},O,D)}function v(I,O=0){if(O&&!(O>=0))throw new Error("precision must be a positive number");let D=Math.pow(10,O||0);return Math.round(I*D)/D}function g(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I*D}function i(I,O="kilometers"){let D=p[O];if(!D)throw new Error(O+" units is invalid");return I/D}function w(I,O){return C(i(I,O))}function S(I){let O=I%360;return O<0&&(O+=360),O}function M(I){return I=I%360,I>180?I-360:I<-180?I+360:I}function C(I){return I%(2*Math.PI)*180/Math.PI}function _(I){return I%360*Math.PI/180}function T(I,O="kilometers",D="kilometers"){if(!(I>=0))throw new Error("length must be a positive number");return g(i(I,O),D)}function f(I,O="meters",D="kilometers"){if(!(I>=0))throw new Error("area must be a positive number");let B=b[O];if(!B)throw new Error("invalid original units");let F=b[D];if(!F)throw new Error("invalid final units");return I/B*F}function u(I){return!isNaN(I)&&I!==null&&!Array.isArray(I)}function A(I){return I!==null&&typeof I=="object"&&!Array.isArray(I)}function x(I){if(!I)throw new Error("bbox is required");if(!Array.isArray(I))throw new Error("bbox must be an Array");if(I.length!==4&&I.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");I.forEach(O=>{if(!u(O))throw new Error("bbox must only contain numbers")})}function z(I){if(!I)throw new Error("id is required");if(["string","number"].indexOf(typeof I)===-1)throw new Error("id must be a number or a string")}J.areaFactors=b,J.azimuthToBearing=M,J.bearingToAzimuth=S,J.convertArea=f,J.convertLength=T,J.degreesToRadians=_,J.earthRadius=V,J.factors=p,J.feature=E,J.featureCollection=o,J.geometry=k,J.geometryCollection=h,J.isNumber=u,J.isObject=A,J.lengthToDegrees=w,J.lengthToRadians=i,J.lineString=r,J.lineStrings=a,J.multiLineString=s,J.multiPoint=c,J.multiPolygon=m,J.point=l,J.points=e,J.polygon=t,J.polygons=n,J.radiansToDegrees=C,J.radiansToLength=g,J.round=v,J.validateBBox=x,J.validateId=z}}),k2=ze({"node_modules/@turf/meta/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2();function p(i,w,S){if(i!==null)for(var M,C,_,T,f,u,A,x=0,z=0,I,O=i.type,D=O==="FeatureCollection",B=O==="Feature",F=D?i.features.length:1,P=0;Pu||D>A||B>x){f=z,u=M,A=D,x=B,_=0;return}var F=V.lineString.call(void 0,[f,z],S.properties);if(w(F,M,C,B,_)===!1)return!1;_++,f=z})===!1)return!1}}})}function c(i,w,S){var M=S,C=!1;return s(i,function(_,T,f,u,A){C===!1&&S===void 0?M=_:M=w(M,_,T,f,u,A),C=!0}),M}function m(i,w){if(!i)throw new Error("geojson is required");a(i,function(S,M,C){if(S.geometry!==null){var _=S.geometry.type,T=S.geometry.coordinates;switch(_){case"LineString":if(w(S,M,C,0,0)===!1)return!1;break;case"Polygon":for(var f=0;fa+E(o),0)}function E(r){let a=0,o;switch(r.type){case"Polygon":return k(r.coordinates);case"MultiPolygon":for(o=0;o0){a+=Math.abs(t(r[0]));for(let o=1;o=a?(s+2)%a:s+2],v=c[0]*e,g=m[1]*e,i=h[0]*e;o+=(i-v)*Math.sin(g),s++}return o*l}var n=b;J.area=b,J.default=n}}),gj=ze({"node_modules/@turf/centroid/dist/cjs/index.cjs"(J){"use strict";Object.defineProperty(J,"__esModule",{value:!0});var V=E2(),p=k2();function b(k,l={}){let e=0,t=0,n=0;return p.coordEach.call(void 0,k,function(r){e+=r[0],t+=r[1],n++},!0),V.point.call(void 0,[e/n,t/n],l.properties)}var E=b;J.centroid=b,J.default=E}}),yj=ze({"node_modules/d3-geo/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:Ft<0?-1:0},f=Math.sqrt,u=Math.tan;function A(Ft){return Ft>1?0:Ft<-1?r:Math.acos(Ft)}function x(Ft){return Ft>1?a:Ft<-1?-a:Math.asin(Ft)}function z(Ft){return(Ft=_(Ft/2))*Ft}function I(){}function O(Ft,tr){Ft&&B.hasOwnProperty(Ft.type)&&B[Ft.type](Ft,tr)}var D={Feature:function(Ft,tr){O(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr=0?1:-1,ea=wr*Fr,ba=i(tr),Ia=_(tr),Na=G*Ia,Za=se*ba+Na*i(ea),mn=Na*wr*_(ea);U.add(g(mn,Za)),ne=Ft,se=ba,G=Ia}function Z(Ft){return $.reset(),j(Ft,X),$*2}function ee(Ft){return[g(Ft[1],Ft[0]),x(Ft[2])]}function ae(Ft){var tr=Ft[0],Fr=Ft[1],wr=i(Fr);return[wr*i(tr),wr*_(tr),_(Fr)]}function he(Ft,tr){return Ft[0]*tr[0]+Ft[1]*tr[1]+Ft[2]*tr[2]}function xe(Ft,tr){return[Ft[1]*tr[2]-Ft[2]*tr[1],Ft[2]*tr[0]-Ft[0]*tr[2],Ft[0]*tr[1]-Ft[1]*tr[0]]}function we(Ft,tr){Ft[0]+=tr[0],Ft[1]+=tr[1],Ft[2]+=tr[2]}function Me(Ft,tr){return[Ft[0]*tr,Ft[1]*tr,Ft[2]*tr]}function Se(Ft){var tr=f(Ft[0]*Ft[0]+Ft[1]*Ft[1]+Ft[2]*Ft[2]);Ft[0]/=tr,Ft[1]/=tr,Ft[2]/=tr}var Ie,Ve,Ge,ke,_e,ce,ve,le,Ae=E(),Be,Xe,Ye={point:yt,lineStart:Tt,lineEnd:At,polygonStart:function(){Ye.point=$t,Ye.lineStart=rr,Ye.lineEnd=_r,Ae.reset(),X.polygonStart()},polygonEnd:function(){X.polygonEnd(),Ye.point=yt,Ye.lineStart=Tt,Ye.lineEnd=At,U<0?(Ie=-(Ge=180),Ve=-(ke=90)):Ae>t?ke=90:Ae<-t&&(Ve=-90),Xe[0]=Ie,Xe[1]=Ge},sphere:function(){Ie=-(Ge=180),Ve=-(ke=90)}};function yt(Ft,tr){Be.push(Xe=[Ie=Ft,Ge=Ft]),trke&&(ke=tr)}function gt(Ft,tr){var Fr=ae([Ft*m,tr*m]);if(le){var wr=xe(le,Fr),ea=[wr[1],-wr[0],0],ba=xe(ea,wr);Se(ba),ba=ee(ba);var Ia=Ft-_e,Na=Ia>0?1:-1,Za=ba[0]*c*Na,mn,Da=h(Ia)>180;Da^(Na*_eke&&(ke=mn)):(Za=(Za+360)%360-180,Da^(Na*_eke&&(ke=tr))),Da?Ft<_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft):Ge>=Ie?(FtGe&&(Ge=Ft)):Ft>_e?Xt(Ie,Ft)>Xt(Ie,Ge)&&(Ge=Ft):Xt(Ft,Ge)>Xt(Ie,Ge)&&(Ie=Ft)}else Be.push(Xe=[Ie=Ft,Ge=Ft]);trke&&(ke=tr),le=Fr,_e=Ft}function Tt(){Ye.point=gt}function At(){Xe[0]=Ie,Xe[1]=Ge,Ye.point=yt,le=null}function $t(Ft,tr){if(le){var Fr=Ft-_e;Ae.add(h(Fr)>180?Fr+(Fr>0?360:-360):Fr)}else ce=Ft,ve=tr;X.point(Ft,tr),gt(Ft,tr)}function rr(){X.lineStart()}function _r(){$t(ce,ve),X.lineEnd(),h(Ae)>t&&(Ie=-(Ge=180)),Xe[0]=Ie,Xe[1]=Ge,le=null}function Xt(Ft,tr){return(tr-=Ft)<0?tr+360:tr}function or(Ft,tr){return Ft[0]-tr[0]}function Ot(Ft,tr){return Ft[0]<=Ft[1]?Ft[0]<=tr&&tr<=Ft[1]:trXt(wr[0],wr[1])&&(wr[1]=ea[1]),Xt(ea[0],wr[1])>Xt(wr[0],wr[1])&&(wr[0]=ea[0])):ba.push(wr=ea);for(Ia=-1/0,Fr=ba.length-1,tr=0,wr=ba[Fr];tr<=Fr;wr=ea,++tr)ea=ba[tr],(Na=Xt(wr[1],ea[0]))>Ia&&(Ia=Na,Ie=ea[0],Ge=wr[1])}return Be=Xe=null,Ie===1/0||Ve===1/0?[[NaN,NaN],[NaN,NaN]]:[[Ie,Ve],[Ge,ke]]}var ht,De,Ne,We,Ke,Je,et,Mt,pt,Pt,Ct,qt,Vt,Ht,Sr,Kr,Yt={sphere:I,point:Rt,lineStart:ur,lineEnd:Qr,polygonStart:function(){Yt.lineStart=Zr,Yt.lineEnd=ha},polygonEnd:function(){Yt.lineStart=ur,Yt.lineEnd=Qr}};function Rt(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);nr(Fr*i(Ft),Fr*_(Ft),_(tr))}function nr(Ft,tr,Fr){++ht,Ne+=(Ft-Ne)/ht,We+=(tr-We)/ht,Ke+=(Fr-Ke)/ht}function ur(){Yt.point=cr}function cr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),Yt.point=Rr,nr(Ht,Sr,Kr)}function Rr(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=g(f((Ia=Sr*ba-Kr*ea)*Ia+(Ia=Kr*wr-Ht*ba)*Ia+(Ia=Ht*ea-Sr*wr)*Ia),Ht*wr+Sr*ea+Kr*ba);De+=Ia,Je+=Ia*(Ht+(Ht=wr)),et+=Ia*(Sr+(Sr=ea)),Mt+=Ia*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function Qr(){Yt.point=Rt}function Zr(){Yt.point=Pa}function ha(){La(qt,Vt),Yt.point=Rt}function Pa(Ft,tr){qt=Ft,Vt=tr,Ft*=m,tr*=m,Yt.point=La;var Fr=i(tr);Ht=Fr*i(Ft),Sr=Fr*_(Ft),Kr=_(tr),nr(Ht,Sr,Kr)}function La(Ft,tr){Ft*=m,tr*=m;var Fr=i(tr),wr=Fr*i(Ft),ea=Fr*_(Ft),ba=_(tr),Ia=Sr*ba-Kr*ea,Na=Kr*wr-Ht*ba,Za=Ht*ea-Sr*wr,mn=f(Ia*Ia+Na*Na+Za*Za),Da=x(mn),Ha=mn&&-Da/mn;pt+=Ha*Ia,Pt+=Ha*Na,Ct+=Ha*Za,De+=Da,Je+=Da*(Ht+(Ht=wr)),et+=Da*(Sr+(Sr=ea)),Mt+=Da*(Kr+(Kr=ba)),nr(Ht,Sr,Kr)}function un(Ft){ht=De=Ne=We=Ke=Je=et=Mt=pt=Pt=Ct=0,j(Ft,Yt);var tr=pt,Fr=Pt,wr=Ct,ea=tr*tr+Fr*Fr+wr*wr;return ear?Ft+Math.round(-Ft/s)*s:Ft,tr]}Nn.invert=Nn;function yn(Ft,tr,Fr){return(Ft%=s)?tr||Fr?ja(li(Ft),Yn(tr,Fr)):li(Ft):tr||Fr?Yn(tr,Fr):Nn}function Un(Ft){return function(tr,Fr){return tr+=Ft,[tr>r?tr-s:tr<-r?tr+s:tr,Fr]}}function li(Ft){var tr=Un(Ft);return tr.invert=Un(-Ft),tr}function Yn(Ft,tr){var Fr=i(Ft),wr=_(Ft),ea=i(tr),ba=_(tr);function Ia(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*Fr+Da*wr;return[g(Ha*ea-vn*ba,Da*Fr-$a*wr),x(vn*ea+Ha*ba)]}return Ia.invert=function(Na,Za){var mn=i(Za),Da=i(Na)*mn,Ha=_(Na)*mn,$a=_(Za),vn=$a*ea-Ha*ba;return[g(Ha*ea+$a*ba,Da*Fr+vn*wr),x(vn*Fr-Da*wr)]},Ia}function on(Ft){Ft=yn(Ft[0]*m,Ft[1]*m,Ft.length>2?Ft[2]*m:0);function tr(Fr){return Fr=Ft(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr}return tr.invert=function(Fr){return Fr=Ft.invert(Fr[0]*m,Fr[1]*m),Fr[0]*=c,Fr[1]*=c,Fr},tr}function en(Ft,tr,Fr,wr,ea,ba){if(Fr){var Ia=i(tr),Na=_(tr),Za=wr*Fr;ea==null?(ea=tr+wr*s,ba=tr-Za/2):(ea=vi(Ia,ea),ba=vi(Ia,ba),(wr>0?eaba)&&(ea+=wr*s));for(var mn,Da=ea;wr>0?Da>ba:Da1&&Ft.push(Ft.pop().concat(Ft.shift()))},result:function(){var Fr=Ft;return Ft=[],tr=null,Fr}}}function Oa(Ft,tr){return h(Ft[0]-tr[0])=0;--Na)ea.point((Ha=Da[Na])[0],Ha[1]);else wr($a.x,$a.p.x,-1,ea);$a=$a.p}$a=$a.o,Da=$a.z,vn=!vn}while(!$a.v);ea.lineEnd()}}}function fr(Ft){if(tr=Ft.length){for(var tr,Fr=0,wr=Ft[0],ea;++Fr=0?1:-1,Fo=Do*Co,Yo=Fo>r,bo=yi*Ni;if(lr.add(g(bo*Do*_(Fo),_i*Zi+bo*i(Fo))),Ia+=Yo?Co+Do*s:Co,Yo^vn>=Fr^En>=Fr){var Gs=xe(ae($a),ae(ri));Se(Gs);var Es=xe(ba,Gs);Se(Es);var ns=(Yo^Co>=0?-1:1)*x(Es[2]);(wr>ns||wr===ns&&(Gs[0]||Gs[1]))&&(Na+=Yo^Co>=0?1:-1)}}return(Ia<-t||Ia0){for(Za||(ea.polygonStart(),Za=!0),ea.lineStart(),Zi=0;Zi1&&Ln&2&&Ni.push(Ni.pop().concat(Ni.shift())),Da.push(Ni.filter(ot))}}return $a}}function ot(Ft){return Ft.length>1}function kt(Ft,tr){return((Ft=Ft.x)[0]<0?Ft[1]-a-t:a-Ft[1])-((tr=tr.x)[0]<0?tr[1]-a-t:a-tr[1])}var jt=Dr(function(){return!0},ar,xr,[-r,-a]);function ar(Ft){var tr=NaN,Fr=NaN,wr=NaN,ea;return{lineStart:function(){Ft.lineStart(),ea=1},point:function(ba,Ia){var Na=ba>0?r:-r,Za=h(ba-tr);h(Za-r)0?a:-a),Ft.point(wr,Fr),Ft.lineEnd(),Ft.lineStart(),Ft.point(Na,Fr),Ft.point(ba,Fr),ea=0):wr!==Na&&Za>=r&&(h(tr-wr)t?v((_(tr)*(ba=i(wr))*_(Fr)-_(wr)*(ea=i(tr))*_(Ft))/(ea*ba*Ia)):(tr+wr)/2}function xr(Ft,tr,Fr,wr){var ea;if(Ft==null)ea=Fr*a,wr.point(-r,ea),wr.point(0,ea),wr.point(r,ea),wr.point(r,0),wr.point(r,-ea),wr.point(0,-ea),wr.point(-r,-ea),wr.point(-r,0),wr.point(-r,ea);else if(h(Ft[0]-tr[0])>t){var ba=Ft[0]0,ea=h(tr)>t;function ba(Da,Ha,$a,vn){en(vn,Ft,Fr,$a,Da,Ha)}function Ia(Da,Ha){return i(Da)*i(Ha)>tr}function Na(Da){var Ha,$a,vn,Sn,yi;return{lineStart:function(){Sn=vn=!1,yi=1},point:function(_i,ki){var ri=[_i,ki],En,Ln=Ia(_i,ki),Ni=wr?Ln?0:mn(_i,ki):Ln?mn(_i+(_i<0?r:-r),ki):0;if(!Ha&&(Sn=vn=Ln)&&Da.lineStart(),Ln!==vn&&(En=Za(Ha,ri),(!En||Oa(Ha,En)||Oa(ri,En))&&(ri[2]=1)),Ln!==vn)yi=0,Ln?(Da.lineStart(),En=Za(ri,Ha),Da.point(En[0],En[1])):(En=Za(Ha,ri),Da.point(En[0],En[1],2),Da.lineEnd()),Ha=En;else if(ea&&Ha&&wr^Ln){var Zi;!(Ni&$a)&&(Zi=Za(ri,Ha,!0))&&(yi=0,wr?(Da.lineStart(),Da.point(Zi[0][0],Zi[0][1]),Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd()):(Da.point(Zi[1][0],Zi[1][1]),Da.lineEnd(),Da.lineStart(),Da.point(Zi[0][0],Zi[0][1],3)))}Ln&&(!Ha||!Oa(Ha,ri))&&Da.point(ri[0],ri[1]),Ha=ri,vn=Ln,$a=Ni},lineEnd:function(){vn&&Da.lineEnd(),Ha=null},clean:function(){return yi|(Sn&&vn)<<1}}}function Za(Da,Ha,$a){var vn=ae(Da),Sn=ae(Ha),yi=[1,0,0],_i=xe(vn,Sn),ki=he(_i,_i),ri=_i[0],En=ki-ri*ri;if(!En)return!$a&&Da;var Ln=tr*ki/En,Ni=-tr*ri/En,Zi=xe(yi,_i),Co=Me(yi,Ln),Do=Me(_i,Ni);we(Co,Do);var Fo=Zi,Yo=he(Co,Fo),bo=he(Fo,Fo),Gs=Yo*Yo-bo*(he(Co,Co)-1);if(!(Gs<0)){var Es=f(Gs),ns=Me(Fo,(-Yo-Es)/bo);if(we(ns,Co),ns=ee(ns),!$a)return ns;var Kn=Da[0],zo=Ha[0],gs=Da[1],js=Ha[1],Cl;zo0^ns[1]<(h(ns[0]-Kn)r^(Kn<=ns[0]&&ns[0]<=zo)){var xl=Me(Fo,(-Yo+Es)/bo);return we(xl,Co),[ns,ee(xl)]}}}function mn(Da,Ha){var $a=wr?Ft:r-Ft,vn=0;return Da<-$a?vn|=1:Da>$a&&(vn|=2),Ha<-$a?vn|=4:Ha>$a&&(vn|=8),vn}return Dr(Ia,Na,ba,wr?[0,-Ft]:[-r,Ft-r])}function Lr(Ft,tr,Fr,wr,ea,ba){var Ia=Ft[0],Na=Ft[1],Za=tr[0],mn=tr[1],Da=0,Ha=1,$a=Za-Ia,vn=mn-Na,Sn;if(Sn=Fr-Ia,!(!$a&&Sn>0)){if(Sn/=$a,$a<0){if(Sn0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}if(Sn=ea-Ia,!(!$a&&Sn<0)){if(Sn/=$a,$a<0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}else if($a>0){if(Sn0)){if(Sn/=vn,vn<0){if(Sn0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}if(Sn=ba-Na,!(!vn&&Sn<0)){if(Sn/=vn,vn<0){if(Sn>Ha)return;Sn>Da&&(Da=Sn)}else if(vn>0){if(Sn0&&(Ft[0]=Ia+Da*$a,Ft[1]=Na+Da*vn),Ha<1&&(tr[0]=Ia+Ha*$a,tr[1]=Na+Ha*vn),!0}}}}}var aa=1e9,Sa=-aa;function wa(Ft,tr,Fr,wr){function ea(mn,Da){return Ft<=mn&&mn<=Fr&&tr<=Da&&Da<=wr}function ba(mn,Da,Ha,$a){var vn=0,Sn=0;if(mn==null||(vn=Ia(mn,Ha))!==(Sn=Ia(Da,Ha))||Za(mn,Da)<0^Ha>0)do $a.point(vn===0||vn===3?Ft:Fr,vn>1?wr:tr);while((vn=(vn+Ha+4)%4)!==Sn);else $a.point(Da[0],Da[1])}function Ia(mn,Da){return h(mn[0]-Ft)0?0:3:h(mn[0]-Fr)0?2:1:h(mn[1]-tr)0?1:0:Da>0?3:2}function Na(mn,Da){return Za(mn.x,Da.x)}function Za(mn,Da){var Ha=Ia(mn,1),$a=Ia(Da,1);return Ha!==$a?Ha-$a:Ha===0?Da[1]-mn[1]:Ha===1?mn[0]-Da[0]:Ha===2?mn[1]-Da[1]:Da[0]-mn[0]}return function(mn){var Da=mn,Ha=Ja(),$a,vn,Sn,yi,_i,ki,ri,En,Ln,Ni,Zi,Co={point:Do,lineStart:Gs,lineEnd:Es,polygonStart:Yo,polygonEnd:bo};function Do(Kn,zo){ea(Kn,zo)&&Da.point(Kn,zo)}function Fo(){for(var Kn=0,zo=0,gs=vn.length;zowr&&(Hu-Gu)*(wr-xl)>(Su-xl)*(Ft-Gu)&&++Kn:Su<=wr&&(Hu-Gu)*(wr-xl)<(Su-xl)*(Ft-Gu)&&--Kn;return Kn}function Yo(){Da=Ha,$a=[],vn=[],Zi=!0}function bo(){var Kn=Fo(),zo=Zi&&Kn,gs=($a=b.merge($a)).length;(zo||gs)&&(mn.polygonStart(),zo&&(mn.lineStart(),ba(null,null,1,mn),mn.lineEnd()),gs&&rt($a,Na,Kn,ba,mn),mn.polygonEnd()),Da=mn,$a=vn=Sn=null}function Gs(){Co.point=ns,vn&&vn.push(Sn=[]),Ni=!0,Ln=!1,ri=En=NaN}function Es(){$a&&(ns(yi,_i),ki&&Ln&&Ha.rejoin(),$a.push(Ha.result())),Co.point=Do,Ln&&Da.lineEnd()}function ns(Kn,zo){var gs=ea(Kn,zo);if(vn&&Sn.push([Kn,zo]),Ni)yi=Kn,_i=zo,ki=gs,Ni=!1,gs&&(Da.lineStart(),Da.point(Kn,zo));else if(gs&&Ln)Da.point(Kn,zo);else{var js=[ri=Math.max(Sa,Math.min(aa,ri)),En=Math.max(Sa,Math.min(aa,En))],Cl=[Kn=Math.max(Sa,Math.min(aa,Kn)),zo=Math.max(Sa,Math.min(aa,zo))];Lr(js,Cl,Ft,tr,Fr,wr)?(Ln||(Da.lineStart(),Da.point(js[0],js[1])),Da.point(Cl[0],Cl[1]),gs||Da.lineEnd(),Zi=!1):gs&&(Da.lineStart(),Da.point(Kn,zo),Zi=!1)}ri=Kn,En=zo,Ln=gs}return Co}}function pn(){var Ft=0,tr=0,Fr=960,wr=500,ea,ba,Ia;return Ia={stream:function(Na){return ea&&ba===Na?ea:ea=wa(Ft,tr,Fr,wr)(ba=Na)},extent:function(Na){return arguments.length?(Ft=+Na[0][0],tr=+Na[0][1],Fr=+Na[1][0],wr=+Na[1][1],ea=ba=null,Ia):[[Ft,tr],[Fr,wr]]}}}var tn=E(),ai,rn,Ri,Gn={sphere:I,point:I,lineStart:no,lineEnd:I,polygonStart:I,polygonEnd:I};function no(){Gn.point=fn,Gn.lineEnd=Di}function Di(){Gn.point=Gn.lineEnd=I}function fn(Ft,tr){Ft*=m,tr*=m,ai=Ft,rn=_(tr),Ri=i(tr),Gn.point=Ai}function Ai(Ft,tr){Ft*=m,tr*=m;var Fr=_(tr),wr=i(tr),ea=h(Ft-ai),ba=i(ea),Ia=_(ea),Na=wr*Ia,Za=Ri*Fr-rn*wr*ba,mn=rn*Fr+Ri*wr*ba;tn.add(g(f(Na*Na+Za*Za),mn)),ai=Ft,rn=Fr,Ri=wr}function jn(Ft){return tn.reset(),j(Ft,Gn),+tn}var Xn=[null,null],eo={type:"LineString",coordinates:Xn};function gi(Ft,tr){return Xn[0]=Ft,Xn[1]=tr,jn(eo)}var qi={Feature:function(Ft,tr){return oo(Ft.geometry,tr)},FeatureCollection:function(Ft,tr){for(var Fr=Ft.features,wr=-1,ea=Fr.length;++wr0&&(ea=gi(Ft[ba],Ft[ba-1]),ea>0&&Fr<=ea&&wr<=ea&&(Fr+wr-ea)*(1-Math.pow((Fr-wr)/ea,2))t}).map($a)).concat(b.range(w(ba/mn)*mn,ea,mn).filter(function(En){return h(En%Ha)>t}).map(vn))}return ki.lines=function(){return ri().map(function(En){return{type:"LineString",coordinates:En}})},ki.outline=function(){return{type:"Polygon",coordinates:[Sn(wr).concat(yi(Ia).slice(1),Sn(Fr).reverse().slice(1),yi(Na).reverse().slice(1))]}},ki.extent=function(En){return arguments.length?ki.extentMajor(En).extentMinor(En):ki.extentMinor()},ki.extentMajor=function(En){return arguments.length?(wr=+En[0][0],Fr=+En[1][0],Na=+En[0][1],Ia=+En[1][1],wr>Fr&&(En=wr,wr=Fr,Fr=En),Na>Ia&&(En=Na,Na=Ia,Ia=En),ki.precision(_i)):[[wr,Na],[Fr,Ia]]},ki.extentMinor=function(En){return arguments.length?(tr=+En[0][0],Ft=+En[1][0],ba=+En[0][1],ea=+En[1][1],tr>Ft&&(En=tr,tr=Ft,Ft=En),ba>ea&&(En=ba,ba=ea,ea=En),ki.precision(_i)):[[tr,ba],[Ft,ea]]},ki.step=function(En){return arguments.length?ki.stepMajor(En).stepMinor(En):ki.stepMinor()},ki.stepMajor=function(En){return arguments.length?(Da=+En[0],Ha=+En[1],ki):[Da,Ha]},ki.stepMinor=function(En){return arguments.length?(Za=+En[0],mn=+En[1],ki):[Za,mn]},ki.precision=function(En){return arguments.length?(_i=+En,$a=Eo(ba,ea,90),vn=Ao(tr,Ft,_i),Sn=Eo(Na,Ia,90),yi=Ao(wr,Fr,_i),ki):_i},ki.extentMajor([[-180,-90+t],[180,90-t]]).extentMinor([[-180,-80-t],[180,80+t]])}function jo(){return ds()()}function Wo(Ft,tr){var Fr=Ft[0]*m,wr=Ft[1]*m,ea=tr[0]*m,ba=tr[1]*m,Ia=i(wr),Na=_(wr),Za=i(ba),mn=_(ba),Da=Ia*i(Fr),Ha=Ia*_(Fr),$a=Za*i(ea),vn=Za*_(ea),Sn=2*x(f(z(ba-wr)+Ia*Za*z(ea-Fr))),yi=_(Sn),_i=Sn?function(ki){var ri=_(ki*=Sn)/yi,En=_(Sn-ki)/yi,Ln=En*Da+ri*$a,Ni=En*Ha+ri*vn,Zi=En*Na+ri*mn;return[g(Ni,Ln)*c,g(Zi,f(Ln*Ln+Ni*Ni))*c]}:function(){return[Fr*c,wr*c]};return _i.distance=Sn,_i}function to(Ft){return Ft}var wo=E(),pi=E(),Vi,Io,Xi,Ko,Uo={point:I,lineStart:I,lineEnd:I,polygonStart:function(){Uo.lineStart=Ls,Uo.lineEnd=Vs},polygonEnd:function(){Uo.lineStart=Uo.lineEnd=Uo.point=I,wo.add(h(pi)),pi.reset()},result:function(){var Ft=wo/2;return wo.reset(),Ft}};function Ls(){Uo.point=Ss}function Ss(Ft,tr){Uo.point=Vo,Vi=Xi=Ft,Io=Ko=tr}function Vo(Ft,tr){pi.add(Ko*Ft-Xi*tr),Xi=Ft,Ko=tr}function Vs(){Vo(Vi,Io)}var Ts=1/0,Bo=Ts,_o=-Ts,Pi=_o,yo={point:bs,lineStart:I,lineEnd:I,polygonStart:I,polygonEnd:I,result:function(){var Ft=[[Ts,Bo],[_o,Pi]];return _o=Pi=-(Bo=Ts=1/0),Ft}};function bs(Ft,tr){Ft_o&&(_o=Ft),trPi&&(Pi=tr)}var Dl=0,hl=0,ps=0,dl=0,wu=0,lu=0,xc=0,Fl=0,pl=0,$u,uu,tl,vs,os={point:ms,lineStart:rl,lineEnd:Ku,polygonStart:function(){os.lineStart=bc,os.lineEnd=Lh},polygonEnd:function(){os.point=ms,os.lineStart=rl,os.lineEnd=Ku},result:function(){var Ft=pl?[xc/pl,Fl/pl]:lu?[dl/lu,wu/lu]:ps?[Dl/ps,hl/ps]:[NaN,NaN];return Dl=hl=ps=dl=wu=lu=xc=Fl=pl=0,Ft}};function ms(Ft,tr){Dl+=Ft,hl+=tr,++ps}function rl(){os.point=Fu}function Fu(Ft,tr){os.point=zu,ms(tl=Ft,vs=tr)}function zu(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ms(tl=Ft,vs=tr)}function Ku(){os.point=ms}function bc(){os.point=rh}function Lh(){Ju($u,uu)}function rh(Ft,tr){os.point=Ju,ms($u=tl=Ft,uu=vs=tr)}function Ju(Ft,tr){var Fr=Ft-tl,wr=tr-vs,ea=f(Fr*Fr+wr*wr);dl+=ea*(tl+Ft)/2,wu+=ea*(vs+tr)/2,lu+=ea,ea=vs*Ft-tl*tr,xc+=ea*(tl+Ft),Fl+=ea*(vs+tr),pl+=ea*3,ms(tl=Ft,vs=tr)}function ss(Ft){this._context=Ft}ss.prototype={_radius:4.5,pointRadius:function(Ft){return this._radius=Ft,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(Ft,tr){switch(this._point){case 0:{this._context.moveTo(Ft,tr),this._point=1;break}case 1:{this._context.lineTo(Ft,tr);break}default:{this._context.moveTo(Ft+this._radius,tr),this._context.arc(Ft,tr,this._radius,0,s);break}}},result:I};var ah=E(),wc,pc,Nf,Bu,Tc,Ou={point:I,lineStart:function(){Ou.point=Gc},lineEnd:function(){wc&&pf(pc,Nf),Ou.point=I},polygonStart:function(){wc=!0},polygonEnd:function(){wc=null},result:function(){var Ft=+ah;return ah.reset(),Ft}};function Gc(Ft,tr){Ou.point=pf,pc=Bu=Ft,Nf=Tc=tr}function pf(Ft,tr){Bu-=Ft,Tc-=tr,ah.add(f(Bu*Bu+Tc*Tc)),Bu=Ft,Tc=tr}function $l(){this._string=[]}$l.prototype={_radius:4.5,_circle:jf(4.5),pointRadius:function(Ft){return(Ft=+Ft)!==this._radius&&(this._radius=Ft,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(Ft,tr){switch(this._point){case 0:{this._string.push("M",Ft,",",tr),this._point=1;break}case 1:{this._string.push("L",Ft,",",tr);break}default:{this._circle==null&&(this._circle=jf(this._radius)),this._string.push("M",Ft,",",tr,this._circle);break}}},result:function(){if(this._string.length){var Ft=this._string.join("");return this._string=[],Ft}else return null}};function jf(Ft){return"m0,"+Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+-2*Ft+"a"+Ft+","+Ft+" 0 1,1 0,"+2*Ft+"z"}function Hc(Ft,tr){var Fr=4.5,wr,ea;function ba(Ia){return Ia&&(typeof Fr=="function"&&ea.pointRadius(+Fr.apply(this,arguments)),j(Ia,wr(ea))),ea.result()}return ba.area=function(Ia){return j(Ia,wr(Uo)),Uo.result()},ba.measure=function(Ia){return j(Ia,wr(Ou)),Ou.result()},ba.bounds=function(Ia){return j(Ia,wr(yo)),yo.result()},ba.centroid=function(Ia){return j(Ia,wr(os)),os.result()},ba.projection=function(Ia){return arguments.length?(wr=Ia==null?(Ft=null,to):(Ft=Ia).stream,ba):Ft},ba.context=function(Ia){return arguments.length?(ea=Ia==null?(tr=null,new $l):new ss(tr=Ia),typeof Fr!="function"&&ea.pointRadius(Fr),ba):tr},ba.pointRadius=function(Ia){return arguments.length?(Fr=typeof Ia=="function"?Ia:(ea.pointRadius(+Ia),+Ia),ba):Fr},ba.projection(Ft).context(tr)}function Wc(Ft){return{stream:Qu(Ft)}}function Qu(Ft){return function(tr){var Fr=new Yc;for(var wr in Ft)Fr[wr]=Ft[wr];return Fr.stream=tr,Fr}}function Yc(){}Yc.prototype={constructor:Yc,point:function(Ft,tr){this.stream.point(Ft,tr)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function Nu(Ft,tr,Fr){var wr=Ft.clipExtent&&Ft.clipExtent();return Ft.scale(150).translate([0,0]),wr!=null&&Ft.clipExtent(null),j(Fr,Ft.stream(yo)),tr(yo.result()),wr!=null&&Ft.clipExtent(wr),Ft}function Uf(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=tr[1][0]-tr[0][0],ba=tr[1][1]-tr[0][1],Ia=Math.min(ea/(wr[1][0]-wr[0][0]),ba/(wr[1][1]-wr[0][1])),Na=+tr[0][0]+(ea-Ia*(wr[1][0]+wr[0][0]))/2,Za=+tr[0][1]+(ba-Ia*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*Ia).translate([Na,Za])},Fr)}function al(Ft,tr,Fr){return Uf(Ft,[[0,0],tr],Fr)}function Xc(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][0]-wr[0][0]),Ia=(ea-ba*(wr[1][0]+wr[0][0]))/2,Na=-ba*wr[0][1];Ft.scale(150*ba).translate([Ia,Na])},Fr)}function ju(Ft,tr,Fr){return Nu(Ft,function(wr){var ea=+tr,ba=ea/(wr[1][1]-wr[0][1]),Ia=-ba*wr[0][0],Na=(ea-ba*(wr[1][1]+wr[0][1]))/2;Ft.scale(150*ba).translate([Ia,Na])},Fr)}var Ac=16,Zc=i(30*m);function ec(Ft,tr){return+tr?tc(Ft,tr):cu(Ft)}function cu(Ft){return Qu({point:function(tr,Fr){tr=Ft(tr,Fr),this.stream.point(tr[0],tr[1])}})}function tc(Ft,tr){function Fr(wr,ea,ba,Ia,Na,Za,mn,Da,Ha,$a,vn,Sn,yi,_i){var ki=mn-wr,ri=Da-ea,En=ki*ki+ri*ri;if(En>4*tr&&yi--){var Ln=Ia+$a,Ni=Na+vn,Zi=Za+Sn,Co=f(Ln*Ln+Ni*Ni+Zi*Zi),Do=x(Zi/=Co),Fo=h(h(Zi)-1)tr||h((ki*Es+ri*ns)/En-.5)>.3||Ia*$a+Na*vn+Za*Sn2?Kn[2]%360*m:0,Es()):[Na*c,Za*c,mn*c]},bo.angle=function(Kn){return arguments.length?(Ha=Kn%360*m,Es()):Ha*c},bo.reflectX=function(Kn){return arguments.length?($a=Kn?-1:1,Es()):$a<0},bo.reflectY=function(Kn){return arguments.length?(vn=Kn?-1:1,Es()):vn<0},bo.precision=function(Kn){return arguments.length?(Zi=ec(Co,Ni=Kn*Kn),ns()):f(Ni)},bo.fitExtent=function(Kn,zo){return Uf(bo,Kn,zo)},bo.fitSize=function(Kn,zo){return al(bo,Kn,zo)},bo.fitWidth=function(Kn,zo){return Xc(bo,Kn,zo)},bo.fitHeight=function(Kn,zo){return ju(bo,Kn,zo)};function Es(){var Kn=vl(Fr,0,0,$a,vn,Ha).apply(null,tr(ba,Ia)),zo=(Ha?vl:nh)(Fr,wr-Kn[0],ea-Kn[1],$a,vn,Ha);return Da=yn(Na,Za,mn),Co=ja(tr,zo),Do=ja(Da,Co),Zi=ec(Co,Ni),ns()}function ns(){return Fo=Yo=null,bo}return function(){return tr=Ft.apply(this,arguments),bo.invert=tr.invert&&Gs,Es()}}function yl(Ft){var tr=0,Fr=r/3,wr=rc(Ft),ea=wr(tr,Fr);return ea.parallels=function(ba){return arguments.length?wr(tr=ba[0]*m,Fr=ba[1]*m):[tr*c,Fr*c]},ea}function qf(Ft){var tr=i(Ft);function Fr(wr,ea){return[wr*tr,_(ea)/tr]}return Fr.invert=function(wr,ea){return[wr/tr,x(ea*tr)]},Fr}function ac(Ft,tr){var Fr=_(Ft),wr=(Fr+_(tr))/2;if(h(wr)=.12&&_i<.234&&yi>=-.425&&yi<-.214?ea:_i>=.166&&_i<.234&&yi>=-.214&&yi<-.115?Ia:Fr).invert($a)},Da.stream=function($a){return Ft&&tr===$a?Ft:Ft=Jo([Fr.stream(tr=$a),ea.stream($a),Ia.stream($a)])},Da.precision=function($a){return arguments.length?(Fr.precision($a),ea.precision($a),Ia.precision($a),Ha()):Fr.precision()},Da.scale=function($a){return arguments.length?(Fr.scale($a),ea.scale($a*.35),Ia.scale($a),Da.translate(Fr.translate())):Fr.scale()},Da.translate=function($a){if(!arguments.length)return Fr.translate();var vn=Fr.scale(),Sn=+$a[0],yi=+$a[1];return wr=Fr.translate($a).clipExtent([[Sn-.455*vn,yi-.238*vn],[Sn+.455*vn,yi+.238*vn]]).stream(mn),ba=ea.translate([Sn-.307*vn,yi+.201*vn]).clipExtent([[Sn-.425*vn+t,yi+.12*vn+t],[Sn-.214*vn-t,yi+.234*vn-t]]).stream(mn),Na=Ia.translate([Sn-.205*vn,yi+.212*vn]).clipExtent([[Sn-.214*vn+t,yi+.166*vn+t],[Sn-.115*vn-t,yi+.234*vn-t]]).stream(mn),Ha()},Da.fitExtent=function($a,vn){return Uf(Da,$a,vn)},Da.fitSize=function($a,vn){return al(Da,$a,vn)},Da.fitWidth=function($a,vn){return Xc(Da,$a,vn)},Da.fitHeight=function($a,vn){return ju(Da,$a,vn)};function Ha(){return Ft=tr=null,Da}return Da.scale(1070)}function fu(Ft){return function(tr,Fr){var wr=i(tr),ea=i(Fr),ba=Ft(wr*ea);return[ba*ea*_(tr),ba*_(Fr)]}}function Sl(Ft){return function(tr,Fr){var wr=f(tr*tr+Fr*Fr),ea=Ft(wr),ba=_(ea),Ia=i(ea);return[g(tr*ba,wr*Ia),x(wr&&Fr*ba/wr)]}}var El=fu(function(Ft){return f(2/(1+Ft))});El.invert=Sl(function(Ft){return 2*x(Ft/2)});function oh(){return ml(El).scale(124.75).clipAngle(180-.001)}var Au=fu(function(Ft){return(Ft=A(Ft))&&Ft/_(Ft)});Au.invert=Sl(function(Ft){return Ft});function $c(){return ml(Au).scale(79.4188).clipAngle(180-.001)}function _l(Ft,tr){return[Ft,M(u((a+tr)/2))]}_l.invert=function(Ft,tr){return[Ft,2*v(S(tr))-a]};function nl(){return gf(_l).scale(961/s)}function gf(Ft){var tr=ml(Ft),Fr=tr.center,wr=tr.scale,ea=tr.translate,ba=tr.clipExtent,Ia=null,Na,Za,mn;tr.scale=function(Ha){return arguments.length?(wr(Ha),Da()):wr()},tr.translate=function(Ha){return arguments.length?(ea(Ha),Da()):ea()},tr.center=function(Ha){return arguments.length?(Fr(Ha),Da()):Fr()},tr.clipExtent=function(Ha){return arguments.length?(Ha==null?Ia=Na=Za=mn=null:(Ia=+Ha[0][0],Na=+Ha[0][1],Za=+Ha[1][0],mn=+Ha[1][1]),Da()):Ia==null?null:[[Ia,Na],[Za,mn]]};function Da(){var Ha=r*wr(),$a=tr(on(tr.rotate()).invert([0,0]));return ba(Ia==null?[[$a[0]-Ha,$a[1]-Ha],[$a[0]+Ha,$a[1]+Ha]]:Ft===_l?[[Math.max($a[0]-Ha,Ia),Na],[Math.min($a[0]+Ha,Za),mn]]:[[Ia,Math.max($a[1]-Ha,Na)],[Za,Math.min($a[1]+Ha,mn)]])}return Da()}function Kc(Ft){return u((a+Ft)/2)}function sh(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):M(Fr/i(tr))/M(Kc(tr)/Kc(Ft)),ea=Fr*C(Kc(Ft),wr)/wr;if(!wr)return _l;function ba(Ia,Na){ea>0?Na<-a+t&&(Na=-a+t):Na>a-t&&(Na=a-t);var Za=ea/C(Kc(Na),wr);return[Za*_(wr*Ia),ea-Za*i(wr*Ia)]}return ba.invert=function(Ia,Na){var Za=ea-Na,mn=T(wr)*f(Ia*Ia+Za*Za),Da=g(Ia,h(Za))*T(Za);return Za*wr<0&&(Da-=r*T(Ia)*T(Za)),[Da/wr,2*v(C(ea/mn,1/wr))-a]},ba}function hu(){return yl(sh).scale(109.5).parallels([30,30])}function Uu(Ft,tr){return[Ft,tr]}Uu.invert=Uu;function qu(){return ml(Uu).scale(152.63)}function nc(Ft,tr){var Fr=i(Ft),wr=Ft===tr?_(Ft):(Fr-i(tr))/(tr-Ft),ea=Fr/wr+Ft;if(h(wr)t&&--wr>0);return[Ft/(.8707+(ba=Fr*Fr)*(-.131979+ba*(-.013791+ba*ba*ba*(.003971-.001529*ba)))),Fr]};function Hf(){return ml(bh).scale(175.295)}function il(Ft,tr){return[i(tr)*_(Ft),_(tr)]}il.invert=Sl(x);function kl(){return ml(il).scale(249.5).clipAngle(90+t)}function kc(Ft,tr){var Fr=i(tr),wr=1+i(Ft)*Fr;return[Fr*_(Ft)/wr,_(tr)/wr]}kc.invert=Sl(function(Ft){return 2*v(Ft)});function Cc(){return ml(kc).scale(250).clipAngle(142)}function Lc(Ft,tr){return[M(u((a+tr)/2)),-Ft]}Lc.invert=function(Ft,tr){return[-tr,2*v(S(Ft))-a]};function vc(){var Ft=gf(Lc),tr=Ft.center,Fr=Ft.rotate;return Ft.center=function(wr){return arguments.length?tr([-wr[1],wr[0]]):(wr=tr(),[wr[1],-wr[0]])},Ft.rotate=function(wr){return arguments.length?Fr([wr[0],wr[1],wr.length>2?wr[2]+90:90]):(wr=Fr(),[wr[0],wr[1],wr[2]-90])},Fr([0,0,90]).scale(159.155)}p.geoAlbers=mf,p.geoAlbersUsa=ih,p.geoArea=Z,p.geoAzimuthalEqualArea=oh,p.geoAzimuthalEqualAreaRaw=El,p.geoAzimuthalEquidistant=$c,p.geoAzimuthalEquidistantRaw=Au,p.geoBounds=vt,p.geoCentroid=un,p.geoCircle=Yi,p.geoClipAntimeridian=jt,p.geoClipCircle=zr,p.geoClipExtent=pn,p.geoClipRectangle=wa,p.geoConicConformal=hu,p.geoConicConformalRaw=sh,p.geoConicEqualArea=Mc,p.geoConicEqualAreaRaw=ac,p.geoConicEquidistant=yf,p.geoConicEquidistantRaw=nc,p.geoContains=go,p.geoDistance=gi,p.geoEqualEarth=xh,p.geoEqualEarthRaw=Ec,p.geoEquirectangular=qu,p.geoEquirectangularRaw=Uu,p.geoGnomonic=xf,p.geoGnomonicRaw=Vf,p.geoGraticule=ds,p.geoGraticule10=jo,p.geoIdentity=Gf,p.geoInterpolate=Wo,p.geoLength=jn,p.geoMercator=nl,p.geoMercatorRaw=_l,p.geoNaturalEarth1=Hf,p.geoNaturalEarth1Raw=bh,p.geoOrthographic=kl,p.geoOrthographicRaw=il,p.geoPath=Hc,p.geoProjection=ml,p.geoProjectionMutator=rc,p.geoRotation=on,p.geoStereographic=Cc,p.geoStereographicRaw=kc,p.geoStream=j,p.geoTransform=Wc,p.geoTransverseMercator=vc,p.geoTransverseMercatorRaw=Lc,Object.defineProperty(p,"__esModule",{value:!0})})}}),_j=ze({"src/lib/usa_location_names.js"(J,V){"use strict";var p={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},b=new Set(Object.values(p));V.exports={usaLocationAbbreviations:b,usaLocationList:p}}}),kA={};bu(kA,{COUNTRIES_X:()=>CA});var CA,xj=zi({"src/lib/custom_country_codes.ts"(){"use strict";CA=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]}}),hp=ze({"src/lib/geo_location_utils.js"(J,V){"use strict";var p=ci(),{COUNTRIES:b,createLookup:E}=vj(),{area:k}=mj(),{centroid:l}=gj(),{coordAll:e}=k2(),{geoBounds:t}=C2(),n=s1(),r=ap(),a=tv(),o=r1(),s=p1(),{usaLocationAbbreviations:c,usaLocationList:m}=_j(),{COUNTRIES_X:h}=(xj(),Po(kA)),{lookupAlpha3:v}=E([...b,...h]),g={"ISO-3":n,"USA-states":w,"country names":i};function i(P){let j=v(P);return j||(r.log("Unrecognized country name: "+P+"."),!1)}function w(P){P=P.trim();let j=c.has(P.toUpperCase())?P.toUpperCase():m[P.toLowerCase()];return j||(r.log("Unrecognized US location: "+P+"."),!1)}function S(P,j,U){var $;if(!j||typeof j!="string")return!1;let Q=g[P](j);if(Q){let re;if(P==="USA-states"){re=[];for(let ne of U)(($=ne?.properties)==null?void 0:$.gu)==="USA"&&re.push(ne)}else re=U;for(let ne of re)if(ne.id===Q)return ne;r.log(`Location with id ${Q} does not have a matching topojson feature at this resolution.`)}return!1}var M=360;function C(P){for(let j=0;j0&&P[j+1][0]<0)return j;return null}function _(P){var j=P.geometry,U=j.coordinates,$=P.id,Q=[],re,ne,se,G;switch($==="RUS"||$==="FJI"?re=function(X){var K;if(C(X)===null)K=X;else for(K=new Array(X.length),G=0;GK?H[Y++]=[X[G][0]+M,X[G][1]]:G===K?(H[Y++]=X[G],H[Y++]=[X[G][0],-90]):H[Y++]=X[G];var q=s.tester(H);q.pts.pop(),Q.push(q)}:re=function(X){Q.push(s.tester(X))},j.type){case"MultiPolygon":for(ne=0;neQ&&(Q=se,U=ne)}else U=j;return!U||!U.coordinates.some(G=>G.length>0)?[NaN,NaN]:l(U).geometry.coordinates}function A(P){var j=window.PlotlyGeoAssets||{},U=[];function $(G){return new Promise(function(X,K){p.json(G,function(H,Y){if(H){delete j[G];var q=H.status===404?'GeoJSON at URL "'+G+'" does not exist.':"Unexpected error while fetching from "+G;return K(new Error(q))}return j[G]=Y,X(Y)})})}function Q(G){return new Promise(function(X,K){var H=0,Y=setInterval(function(){if(j[G]&&j[G]!=="pending")return clearInterval(Y),X(j[G]);if(H>100)return clearInterval(Y),K("Unexpected error while fetching from "+G);H++},50)})}for(var re=0;reI(z(P));function z(P){try{return e(P)}catch{return[]}}function I(P){if(P.length===0)return null;if(P.length===1){let[re,ne]=P[0];return[re,ne,re,ne]}let[[j,U],[$,Q]]=t({type:"MultiPoint",coordinates:P});return[j,U,F([j,$])[1],Q]}var O=(P,j)=>j.fitbounds==="geojson"&&P.locationmode==="geojson-id",D=(P,j)=>O(P,j)?z(T(P)):[],B=(P,j)=>I(D(P,j));function F([P,j]){return[P,P>j?j+M:j]}V.exports={locationToFeature:S,feature2polygons:_,getTraceGeojson:T,extractTraceFeature:f,fetchTraceGeoData:A,boundsOfCoords:I,computeBbox:x,coordsOf:z,doesCrossAntiMeridian:C,fitGeojsonBbox:B,fitGeojsonCoords:D,unwrapLonRange:F,ANTIMERIDIAN_LON_SHIFT:M}}}),LA=ze({"src/traces/scattergeo/style.js"(J,V){"use strict";var p=ci(),b=$i(),E=Qn(),k=Ch(),l=k.stylePoints,e=k.styleText;V.exports=function(r,a){a&&t(r,a)};function t(n,r){var a=r[0].trace,o=r[0].node3;o.style("opacity",r[0].trace.opacity),l(o,a,n),e(o,a,n),o.selectAll("path.js-line").style("fill","none").each(function(s){var c=p.select(this),m=s.trace,h=m.line||{};c.call(E.stroke,h.color).call(b.dashLine,h.dash||"",h.width||0),m.fill!=="none"&&c.call(E.fill,m.fillcolor)})}}}),L2=ze({"src/traces/scattergeo/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=S2().getTopojsonFeatures,k=Q1(),l=hp(),e=md().findExtremes,t=No().BADNUM,n=sd().calcMarkerSize,r=el(),a=LA();function o(m,h,v){var g=h.layers.frontplot.select(".scatterlayer"),i=b.makeTraceGroups(g,v,"trace scattergeo");function w(S,M){S.lonlat[0]===t&&p.select(M).remove()}i.selectAll("*").remove(),i.each(function(S){var M=p.select(this),C=S[0].trace;if(r.hasLines(C)||C.fill!=="none"){var _=k.calcTraceToLineCoords(S),T=C.fill!=="none"?k.makePolygon(_):k.makeLine(_);M.selectAll("path.js-line").data([{geojson:T,trace:C}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}r.hasMarkers(C)&&M.selectAll("path.point").data(b.identity).enter().append("path").classed("point",!0).each(function(f){w(f,this)}),r.hasText(C)&&M.selectAll("g").data(b.identity).enter().append("g").append("text").each(function(f){w(f,this)}),a(m,S)})}function s(m,h){var v=m[0].trace,g=h[v.geo],i=g._subplot,w=v._length,S,M;if(b.isArrayOrTypedArray(v.locations)){var C=v.locationmode,_=C==="geojson-id"?l.extractTraceFeature(m):E(v,i.topojson);for(S=0;S")}}}),wj=ze({"src/traces/scattergeo/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.lon=E.lon,b.lat=E.lat,b.location=E.loc?E.loc:null;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b}}}),Tj=ze({"src/traces/scattergeo/select.js"(J,V){"use strict";var p=el(),b=No().BADNUM;V.exports=function(k,l){var e=k.cd,t=k.xaxis,n=k.yaxis,r=[],a=e[0].trace,o,s,c,m,h,v=!p.hasMarkers(a)&&!p.hasText(a);if(v)return[];if(l===!1)for(h=0;hH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q0?1:$e<0?-1:0},v=Math.sin,g=Math.tan,i=1e-6,w=1e-12,S=Math.PI,M=S/2,C=S/4,_=Math.SQRT1_2,T=D(2),f=D(S),u=S*2,A=180/S,x=S/180;function z($e){return $e?$e/Math.sin($e):1}function I($e){return $e>1?M:$e<-1?-M:Math.asin($e)}function O($e){return $e>1?0:$e<-1?S:Math.acos($e)}function D($e){return $e>0?Math.sqrt($e):0}function B($e){return $e=n(2*$e),($e-1)/($e+1)}function F($e){return(n($e)-n(-$e))/2}function P($e){return(n($e)+n(-$e))/2}function j($e){return a($e+D($e*$e+1))}function U($e){return a($e+D($e*$e-1))}function $($e){var nt=g($e/2),mt=2*a(t($e/2))/(nt*nt);function xt(Bt,zt){var Wt=t(Bt),Pr=t(zt),Br=v(zt),kr=Pr*Wt,jr=-((1-kr?a((1+kr)/2)/(1-kr):-.5)+mt/(1+kr));return[jr*Pr*v(Bt),jr*Br]}return xt.invert=function(Bt,zt){var Wt=D(Bt*Bt+zt*zt),Pr=-$e/2,Br=50,kr;if(!Wt)return[0,0];do{var jr=Pr/2,Jr=t(jr),la=v(jr),xa=la/Jr,Ba=-a(k(Jr));Pr-=kr=(2/xa*Ba-mt*xa-Wt)/(-Ba/(la*la)+1-mt/(2*Jr*Jr))*(Jr<0?.7:1)}while(k(kr)>i&&--Br>0);var an=v(Pr);return[e(Bt*an,Wt*t(Pr)),I(zt*an/Wt)]},xt}function Q(){var $e=M,nt=b.geoProjectionMutator($),mt=nt($e);return mt.radius=function(xt){return arguments.length?nt($e=xt*x):$e*A},mt.scale(179.976).clipAngle(147)}function re($e,nt){var mt=t(nt),xt=z(O(mt*t($e/=2)));return[2*mt*v($e)*xt,v(nt)*xt]}re.invert=function($e,nt){if(!($e*$e+4*nt*nt>S*S+i)){var mt=$e,xt=nt,Bt=25;do{var zt=v(mt),Wt=v(mt/2),Pr=t(mt/2),Br=v(xt),kr=t(xt),jr=v(2*xt),Jr=Br*Br,la=kr*kr,xa=Wt*Wt,Ba=1-la*Pr*Pr,an=Ba?O(kr*Pr)*D(wn=1/Ba):wn=0,wn,ii=2*an*kr*Wt-$e,Si=an*Br-nt,oi=wn*(la*xa+an*kr*Pr*Jr),Ji=wn*(.5*zt*jr-an*2*Br*Wt),Qi=wn*.25*(jr*Wt-an*Br*la*zt),Oo=wn*(Jr*Pr+an*xa*kr),Qo=Ji*Qi-Oo*oi;if(!Qo)break;var vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]}};function ne(){return b.geoProjection(re).scale(152.63)}function se($e){var nt=v($e),mt=t($e),xt=$e>=0?1:-1,Bt=g(xt*$e),zt=(1+nt-mt)/2;function Wt(Pr,Br){var kr=t(Br),jr=t(Pr/=2);return[(1+kr)*v(Pr),(xt*Br>-e(jr,Bt)-.001?0:-xt*10)+zt+v(Br)*mt-(1+kr)*nt*jr]}return Wt.invert=function(Pr,Br){var kr=0,jr=0,Jr=50;do{var la=t(kr),xa=v(kr),Ba=t(jr),an=v(jr),wn=1+Ba,ii=wn*xa-Pr,Si=zt+an*mt-wn*nt*la-Br,oi=wn*la/2,Ji=-xa*an,Qi=nt*wn*xa/2,Oo=mt*Ba+nt*la*an,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo/2,ys=(ii*Qi-Si*oi)/Qo;k(ys)>2&&(ys/=2),kr-=vo,jr-=ys}while((k(vo)>i||k(ys)>i)&&--Jr>0);return xt*jr>-e(t(kr),Bt)-.001?[kr*2,jr]:null},Wt}function G(){var $e=20*x,nt=$e>=0?1:-1,mt=g(nt*$e),xt=b.geoProjectionMutator(se),Bt=xt($e),zt=Bt.stream;return Bt.parallel=function(Wt){return arguments.length?(mt=g((nt=($e=Wt*x)>=0?1:-1)*$e),xt($e)):$e*A},Bt.stream=function(Wt){var Pr=Bt.rotate(),Br=zt(Wt),kr=(Bt.rotate([0,0]),zt(Wt)),jr=Bt.precision();return Bt.rotate(Pr),Br.sphere=function(){kr.polygonStart(),kr.lineStart();for(var Jr=nt*-180;nt*Jr<180;Jr+=nt*90)kr.point(Jr,nt*90);if($e)for(;nt*(Jr-=3*nt*jr)>=-180;)kr.point(Jr,nt*-e(t(Jr*x/2),mt)*A);kr.lineEnd(),kr.polygonEnd()},Br},Bt.scale(218.695).center([0,28.0974])}function X($e,nt){var mt=g(nt/2),xt=D(1-mt*mt),Bt=1+xt*t($e/=2),zt=v($e)*xt/Bt,Wt=mt/Bt,Pr=zt*zt,Br=Wt*Wt;return[4/3*zt*(3+Pr-3*Br),4/3*Wt*(3+3*Pr-Br)]}X.invert=function($e,nt){if($e*=3/8,nt*=3/8,!$e&&k(nt)>1)return null;var mt=$e*$e,xt=nt*nt,Bt=1+mt+xt,zt=D((Bt-D(Bt*Bt-4*nt*nt))/2),Wt=I(zt)/3,Pr=zt?U(k(nt/zt))/3:j(k($e))/3,Br=t(Wt),kr=P(Pr),jr=kr*kr-Br*Br;return[h($e)*2*e(F(Pr)*Br,.25-jr),h(nt)*2*e(kr*v(Wt),.25+jr)]};function K(){return b.geoProjection(X).scale(66.1603)}var H=D(8),Y=a(1+T);function q($e,nt){var mt=k(nt);return mtw&&--xt>0);return[$e/(t(mt)*(H-1/v(mt))),h(nt)*mt]};function Z(){return b.geoProjection(q).scale(112.314)}function ee($e){var nt=2*S/$e;function mt(xt,Bt){var zt=b.geoAzimuthalEquidistantRaw(xt,Bt);if(k(xt)>M){var Wt=e(zt[1],zt[0]),Pr=D(zt[0]*zt[0]+zt[1]*zt[1]),Br=nt*m((Wt-M)/nt)+M,kr=e(v(Wt-=Br),2-t(Wt));Wt=Br+I(S/Pr*v(kr))-kr,zt[0]=Pr*t(Wt),zt[1]=Pr*v(Wt)}return zt}return mt.invert=function(xt,Bt){var zt=D(xt*xt+Bt*Bt);if(zt>M){var Wt=e(Bt,xt),Pr=nt*m((Wt-M)/nt)+M,Br=Wt>Pr?-1:1,kr=zt*t(Pr-Wt),jr=1/g(Br*O((kr-S)/D(S*(S-2*kr)+zt*zt)));Wt=Pr+2*l((jr+Br*D(jr*jr-3))/3),xt=zt*t(Wt),Bt=zt*v(Wt)}return b.geoAzimuthalEquidistantRaw.invert(xt,Bt)},mt}function ae(){var $e=5,nt=b.geoProjectionMutator(ee),mt=nt($e),xt=mt.stream,Bt=.01,zt=-t(Bt*x),Wt=v(Bt*x);return mt.lobes=function(Pr){return arguments.length?nt($e=+Pr):$e},mt.stream=function(Pr){var Br=mt.rotate(),kr=xt(Pr),jr=(mt.rotate([0,0]),xt(Pr));return mt.rotate(Br),kr.sphere=function(){jr.polygonStart(),jr.lineStart();for(var Jr=0,la=360/$e,xa=2*S/$e,Ba=90-180/$e,an=M;Jr<$e;++Jr,Ba-=la,an-=xa)jr.point(e(Wt*t(an),zt)*A,I(Wt*v(an))*A),Ba<-90?(jr.point(-90,-180-Ba-Bt),jr.point(-90,-180-Ba+Bt)):(jr.point(90,Ba+Bt),jr.point(90,Ba-Bt));jr.lineEnd(),jr.polygonEnd()},kr},mt.scale(87.8076).center([0,17.1875]).clipAngle(180-.001)}function he($e,nt){if(arguments.length<2&&(nt=$e),nt===1)return b.geoAzimuthalEqualAreaRaw;if(nt===1/0)return xe;function mt(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw(xt/nt,Bt);return zt[0]*=$e,zt}return mt.invert=function(xt,Bt){var zt=b.geoAzimuthalEqualAreaRaw.invert(xt/$e,Bt);return zt[0]*=nt,zt},mt}function xe($e,nt){return[$e*t(nt)/t(nt/=2),2*v(nt)]}xe.invert=function($e,nt){var mt=2*I(nt/2);return[$e*t(mt/2)/t(mt),mt]};function we(){var $e=2,nt=b.geoProjectionMutator(he),mt=nt($e);return mt.coefficient=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(169.529)}function Me($e,nt,mt){var xt=100,Bt,zt,Wt;mt=mt===void 0?0:+mt,nt=+nt;do zt=$e(mt),Wt=$e(mt+i),zt===Wt&&(Wt=zt+i),mt-=Bt=-1*i*(zt-nt)/(zt-Wt);while(xt-- >0&&k(Bt)>i);return xt<0?NaN:mt}function Se($e,nt,mt){return nt===void 0&&(nt=40),mt===void 0&&(mt=w),function(xt,Bt,zt,Wt){var Pr,Br,kr;zt=zt===void 0?0:+zt,Wt=Wt===void 0?0:+Wt;for(var jr=0;jrPr){zt-=Br/=2,Wt-=kr/=2;continue}Pr=Ba;var an=(zt>0?-1:1)*mt,wn=(Wt>0?-1:1)*mt,ii=$e(zt+an,Wt),Si=$e(zt,Wt+wn),oi=(ii[0]-Jr[0])/an,Ji=(ii[1]-Jr[1])/an,Qi=(Si[0]-Jr[0])/wn,Oo=(Si[1]-Jr[1])/wn,Qo=Oo*oi-Ji*Qi,vo=(k(Qo)<.5?.5:1)/Qo;if(Br=(xa*Qi-la*Oo)*vo,kr=(la*Ji-xa*oi)*vo,zt+=Br,Wt+=kr,k(Br)0&&(Pr[1]*=1+Br/1.5*Pr[0]*Pr[0]),Pr}return xt.invert=Se(xt),xt}function Ve(){return b.geoProjection(Ie()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ge($e,nt){var mt=$e*v(nt),xt=30,Bt;do nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));while(k(Bt)>i&&--xt>0);return nt/2}function ke($e,nt,mt){function xt(Bt,zt){return[$e*Bt*t(zt=Ge(mt,zt)),nt*v(zt)]}return xt.invert=function(Bt,zt){return zt=I(zt/nt),[Bt/($e*t(zt)),I((2*zt+v(2*zt))/mt)]},xt}var _e=ke(T/M,T,S);function ce(){return b.geoProjection(_e).scale(169.529)}var ve=2.00276,le=1.11072;function Ae($e,nt){var mt=Ge(S,nt);return[ve*$e/(1/t(nt)+le/t(mt)),(nt+T*v(mt))/ve]}Ae.invert=function($e,nt){var mt=ve*nt,xt=nt<0?-C:C,Bt=25,zt,Wt;do Wt=mt-T*v(xt),xt-=zt=(v(2*xt)+2*xt-S*v(Wt))/(2*t(2*xt)+2+S*t(Wt)*T*t(xt));while(k(zt)>i&&--Bt>0);return Wt=mt-T*v(xt),[$e*(1/t(Wt)+le/t(xt))/ve,Wt]};function Be(){return b.geoProjection(Ae).scale(160.857)}function Xe($e){var nt=0,mt=b.geoProjectionMutator($e),xt=mt(nt);return xt.parallel=function(Bt){return arguments.length?mt(nt=Bt*x):nt*A},xt}function Ye($e,nt){return[$e*t(nt),nt]}Ye.invert=function($e,nt){return[$e/t(nt),nt]};function yt(){return b.geoProjection(Ye).scale(152.63)}function gt($e){if(!$e)return Ye;var nt=1/g($e);function mt(xt,Bt){var zt=nt+$e-Bt,Wt=zt&&xt*t(Bt)/zt;return[zt*v(Wt),nt-zt*t(Wt)]}return mt.invert=function(xt,Bt){var zt=D(xt*xt+(Bt=nt-Bt)*Bt),Wt=nt+$e-zt;return[zt/t(Wt)*e(xt,Bt),Wt]},mt}function Tt(){return Xe(gt).scale(123.082).center([0,26.1441]).parallel(45)}function At($e){function nt(mt,xt){var Bt=M-xt,zt=Bt&&mt*$e*v(Bt)/Bt;return[Bt*v(zt)/$e,M-Bt*t(zt)]}return nt.invert=function(mt,xt){var Bt=mt*$e,zt=M-xt,Wt=D(Bt*Bt+zt*zt),Pr=e(Bt,zt);return[(Wt?Wt/v(Wt):1)*Pr/$e,M-Wt]},nt}function $t(){var $e=.5,nt=b.geoProjectionMutator(At),mt=nt($e);return mt.fraction=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(158.837)}var rr=ke(1,4/S,S);function _r(){return b.geoProjection(rr).scale(152.63)}function Xt($e,nt,mt,xt,Bt,zt){var Wt=t(zt),Pr;if(k($e)>1||k(zt)>1)Pr=O(mt*Bt+nt*xt*Wt);else{var Br=v($e/2),kr=v(zt/2);Pr=2*I(D(Br*Br+nt*xt*kr*kr))}return k(Pr)>i?[Pr,e(xt*v(zt),nt*Bt-mt*xt*Wt)]:[0,0]}function or($e,nt,mt){return O(($e*$e+nt*nt-mt*mt)/(2*$e*nt))}function Ot($e){return $e-2*S*r(($e+S)/(2*S))}function vt($e,nt,mt){for(var xt=[[$e[0],$e[1],v($e[1]),t($e[1])],[nt[0],nt[1],v(nt[1]),t(nt[1])],[mt[0],mt[1],v(mt[1]),t(mt[1])]],Bt=xt[2],zt,Wt=0;Wt<3;++Wt,Bt=zt)zt=xt[Wt],Bt.v=Xt(zt[1]-Bt[1],Bt[3],Bt[2],zt[3],zt[2],zt[0]-Bt[0]),Bt.point=[0,0];var Pr=or(xt[0].v[0],xt[2].v[0],xt[1].v[0]),Br=or(xt[0].v[0],xt[1].v[0],xt[2].v[0]),kr=S-Pr;xt[2].point[1]=0,xt[0].point[0]=-(xt[1].point[0]=xt[0].v[0]/2);var jr=[xt[2].point[0]=xt[0].point[0]+xt[2].v[0]*t(Pr),2*(xt[0].point[1]=xt[1].point[1]=xt[2].v[0]*v(Pr))];function Jr(la,xa){var Ba=v(xa),an=t(xa),wn=new Array(3),ii;for(ii=0;ii<3;++ii){var Si=xt[ii];if(wn[ii]=Xt(xa-Si[1],Si[3],Si[2],an,Ba,la-Si[0]),!wn[ii][0])return Si.point;wn[ii][1]=Ot(wn[ii][1]-Si.v[1])}var oi=jr.slice();for(ii=0;ii<3;++ii){var Ji=ii==2?0:ii+1,Qi=or(xt[ii].v[0],wn[ii][0],wn[Ji][0]);wn[ii][1]<0&&(Qi=-Qi),ii?ii==1?(Qi=Br-Qi,oi[0]-=wn[ii][0]*t(Qi),oi[1]-=wn[ii][0]*v(Qi)):(Qi=kr-Qi,oi[0]+=wn[ii][0]*t(Qi),oi[1]+=wn[ii][0]*v(Qi)):(oi[0]+=wn[ii][0]*t(Qi),oi[1]-=wn[ii][0]*v(Qi))}return oi[0]/=3,oi[1]/=3,oi}return Jr}function ht($e){return $e[0]*=x,$e[1]*=x,$e}function De(){return Ne([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Ne($e,nt,mt){var xt=b.geoCentroid({type:"MultiPoint",coordinates:[$e,nt,mt]}),Bt=[-xt[0],-xt[1]],zt=b.geoRotation(Bt),Wt=vt(ht(zt($e)),ht(zt(nt)),ht(zt(mt)));Wt.invert=Se(Wt);var Pr=b.geoProjection(Wt).rotate(Bt),Br=Pr.center;return delete Pr.rotate,Pr.center=function(kr){return arguments.length?Br(zt(kr)):zt.invert(Br())},Pr.clipAngle(90)}function We($e,nt){var mt=D(1-v(nt));return[2/f*$e*mt,f*(1-mt)]}We.invert=function($e,nt){var mt=(mt=nt/f-1)*mt;return[mt>0?$e*D(S/mt)/2:0,I(1-mt)]};function Ke(){return b.geoProjection(We).scale(95.6464).center([0,30])}function Je($e){var nt=g($e);function mt(xt,Bt){return[xt,(xt?xt/v(xt):1)*(v(Bt)*t(xt)-nt*t(Bt))]}return mt.invert=nt?function(xt,Bt){xt&&(Bt*=v(xt)/xt);var zt=t(xt);return[xt,2*e(D(zt*zt+nt*nt-Bt*Bt)-zt,nt-Bt)]}:function(xt,Bt){return[xt,I(xt?Bt*g(xt)/xt:Bt)]},mt}function et(){return Xe(Je).scale(249.828).clipAngle(90)}var Mt=D(3);function pt($e,nt){return[Mt*$e*(2*t(2*nt/3)-1)/f,Mt*f*v(nt/3)]}pt.invert=function($e,nt){var mt=3*I(nt/(Mt*f));return[f*$e/(Mt*(2*t(2*mt/3)-1)),mt]};function Pt(){return b.geoProjection(pt).scale(156.19)}function Ct($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,v(Bt)/nt]}return mt.invert=function(xt,Bt){return[xt/nt,I(Bt*nt)]},mt}function qt(){return Xe(Ct).parallel(38.58).scale(195.044)}function Vt($e){var nt=t($e);function mt(xt,Bt){return[xt*nt,(1+nt)*g(Bt/2)]}return mt.invert=function(xt,Bt){return[xt/nt,l(Bt/(1+nt))*2]},mt}function Ht(){return Xe(Vt).scale(124.75)}function Sr($e,nt){var mt=D(8/(3*S));return[mt*$e*(1-k(nt)/S),mt*nt]}Sr.invert=function($e,nt){var mt=D(8/(3*S)),xt=nt/mt;return[$e/(mt*(1-k(xt)/S)),xt]};function Kr(){return b.geoProjection(Sr).scale(165.664)}function Yt($e,nt){var mt=D(4-3*v(k(nt)));return[2/D(6*S)*$e*mt,h(nt)*D(2*S/3)*(2-mt)]}Yt.invert=function($e,nt){var mt=2-k(nt)/D(2*S/3);return[$e*D(6*S)/(2*mt),h(nt)*I((4-mt*mt)/3)]};function Rt(){return b.geoProjection(Yt).scale(165.664)}function nr($e,nt){var mt=D(S*(4+S));return[2/mt*$e*(1+D(1-4*nt*nt/(S*S))),4/mt*nt]}nr.invert=function($e,nt){var mt=D(S*(4+S))/2;return[$e*mt/(1+D(1-nt*nt*(4+S)/(4*S))),nt*mt/2]};function ur(){return b.geoProjection(nr).scale(180.739)}function cr($e,nt){var mt=(2+M)*v(nt);nt/=2;for(var xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++){var zt=t(nt);nt-=Bt=(nt+v(nt)*(zt+2)-mt)/(2*zt*(1+zt))}return[2/D(S*(4+S))*$e*(1+t(nt)),2*D(S/(4+S))*v(nt)]}cr.invert=function($e,nt){var mt=nt*D((4+S)/S)/2,xt=I(mt),Bt=t(xt);return[$e/(2/D(S*(4+S))*(1+Bt)),I((xt+mt*(Bt+2))/(2+M))]};function Rr(){return b.geoProjection(cr).scale(180.739)}function Qr($e,nt){return[$e*(1+t(nt))/D(2+S),2*nt/D(2+S)]}Qr.invert=function($e,nt){var mt=D(2+S),xt=nt*mt/2;return[mt*$e/(1+t(xt)),xt]};function Zr(){return b.geoProjection(Qr).scale(173.044)}function ha($e,nt){for(var mt=(1+M)*v(nt),xt=0,Bt=1/0;xt<10&&k(Bt)>i;xt++)nt-=Bt=(nt+v(nt)-mt)/(1+t(nt));return mt=D(2+S),[$e*(1+t(nt))/mt,2*nt/mt]}ha.invert=function($e,nt){var mt=1+M,xt=D(mt/2);return[$e*2*xt/(1+t(nt*=xt)),I((nt+v(nt))/mt)]};function Pa(){return b.geoProjection(ha).scale(173.044)}var La=3+2*T;function un($e,nt){var mt=v($e/=2),xt=t($e),Bt=D(t(nt)),zt=t(nt/=2),Wt=v(nt)/(zt+T*xt*Bt),Pr=D(2/(1+Wt*Wt)),Br=D((T*zt+(xt+mt)*Bt)/(T*zt+(xt-mt)*Bt));return[La*(Pr*(Br-1/Br)-2*a(Br)),La*(Pr*Wt*(Br+1/Br)-2*l(Wt))]}un.invert=function($e,nt){if(!(zt=X.invert($e/1.2,nt*1.065)))return null;var mt=zt[0],xt=zt[1],Bt=20,zt;$e/=La,nt/=La;do{var Wt=mt/2,Pr=xt/2,Br=v(Wt),kr=t(Wt),jr=v(Pr),Jr=t(Pr),la=t(xt),xa=D(la),Ba=jr/(Jr+T*kr*xa),an=Ba*Ba,wn=D(2/(1+an)),ii=T*Jr+(kr+Br)*xa,Si=T*Jr+(kr-Br)*xa,oi=ii/Si,Ji=D(oi),Qi=Ji-1/Ji,Oo=Ji+1/Ji,Qo=wn*Qi-2*a(Ji)-$e,vo=wn*Ba*Oo-2*l(Ba)-nt,ys=jr&&_*xa*Br*an/jr,ol=(T*kr*Jr+xa)/(2*(Jr+T*kr*xa)*(Jr+T*kr*xa)*xa),jl=-.5*Ba*wn*wn*wn,Hs=jl*ys,Cu=jl*ol,hi=(hi=2*Jr+T*xa*(kr-Br))*hi*Ji,wi=(T*kr*Jr*xa+la)/hi,sl=-(T*Br*jr)/(xa*hi),sc=Qi*Hs-2*wi/Ji+wn*(wi+wi/oi),tu=Qi*Cu-2*sl/Ji+wn*(sl+sl/oi),Ps=Ba*Oo*Hs-2*ys/(1+an)+wn*Oo*ys+wn*Ba*(wi-wi/oi),gc=Ba*Oo*Cu-2*ol/(1+an)+wn*Oo*ol+wn*Ba*(sl-sl/oi),pu=tu*Ps-gc*sc;if(!pu)break;var ll=(vo*tu-Qo*gc)/pu,ef=(Qo*Ps-vo*sc)/pu;mt-=ll,xt=o(-M,s(M,xt-ef))}while((k(ll)>i||k(ef)>i)&&--Bt>0);return k(k(xt)-M)xt){var Jr=D(jr),la=e(kr,Br),xa=mt*m(la/mt),Ba=la-xa,an=$e*t(Ba),wn=($e*v(Ba)-Ba*v(an))/(M-an),ii=Oa(Ba,wn),Si=(S-$e)/lt(ii,an,S);Br=Jr;var oi=50,Ji;do Br-=Ji=($e+lt(ii,an,Br)*Si-Jr)/(ii(Br)*Si);while(k(Ji)>i&&--oi>0);kr=Ba*v(Br),Brxt){var Br=D(Pr),kr=e(Wt,zt),jr=mt*m(kr/mt),Jr=kr-jr;zt=Br*t(Jr),Wt=Br*v(Jr);for(var la=zt-M,xa=v(zt),Ba=Wt/xa,an=zti||k(Ba)>i)&&--an>0);return[Jr,la]},Br}var lr=fr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function Tr(){return b.geoProjection(lr).scale(149.995)}var Ir=fr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Dr(){return b.geoProjection(Ir).scale(153.93)}var ot=fr(5/6*S,-.62636,-.0344,0,1.3493,-.05524,0,.045);function kt(){return b.geoProjection(ot).scale(130.945)}function jt($e,nt){var mt=$e*$e,xt=nt*nt;return[$e*(1-.162388*xt)*(.87-952426e-9*mt*mt),nt*(1+xt/12)]}jt.invert=function($e,nt){var mt=$e,xt=nt,Bt=50,zt;do{var Wt=xt*xt;xt-=zt=(xt*(1+Wt/12)-nt)/(1+Wt/4)}while(k(zt)>i&&--Bt>0);Bt=50,$e/=1-.162388*Wt;do{var Pr=(Pr=mt*mt)*Pr;mt-=zt=(mt*(.87-952426e-9*Pr)-$e)/(.87-.00476213*Pr)}while(k(zt)>i&&--Bt>0);return[mt,xt]};function ar(){return b.geoProjection(jt).scale(131.747)}var Er=fr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function xr(){return b.geoProjection(Er).scale(131.087)}function zr($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e(xt+zt*S,Bt);return Wt[0]-=zt*nt,Wt}return $e.invert&&(mt.invert=function(xt,Bt){var zt=xt>0?-.5:.5,Wt=$e.invert(xt+zt*nt,Bt),Pr=Wt[0]-zt*S;return Pr<-S?Pr+=2*S:Pr>S&&(Pr-=2*S),Wt[0]=Pr,Wt}),mt}function Lr($e,nt){var mt=h($e),xt=h(nt),Bt=t(nt),zt=t($e)*Bt,Wt=v($e)*Bt,Pr=v(xt*nt);$e=k(e(Wt,Pr)),nt=I(zt),k($e-M)>i&&($e%=M);var Br=aa($e>S/4?M-$e:$e,nt);return $e>S/4&&(Pr=Br[0],Br[0]=-Br[1],Br[1]=-Pr),Br[0]*=mt,Br[1]*=-xt,Br}Lr.invert=function($e,nt){k($e)>1&&($e=h($e)*2-$e),k(nt)>1&&(nt=h(nt)*2-nt);var mt=h($e),xt=h(nt),Bt=-mt*$e,zt=-xt*nt,Wt=zt/Bt<1,Pr=Sa(Wt?zt:Bt,Wt?Bt:zt),Br=Pr[0],kr=Pr[1],jr=t(kr);return Wt&&(Br=-M-Br),[mt*(e(v(Br)*jr,-v(kr))+S),xt*I(t(Br)*jr)]};function aa($e,nt){if(nt===M)return[0,0];var mt=v(nt),xt=mt*mt,Bt=xt*xt,zt=1+Bt,Wt=1+3*Bt,Pr=1-Bt,Br=I(1/D(zt)),kr=Pr+xt*zt*Br,jr=(1-mt)/kr,Jr=D(jr),la=jr*zt,xa=D(la),Ba=Jr*Pr,an,wn;if($e===0)return[0,-(Ba+xt*xa)];var ii=t(nt),Si=1/ii,oi=2*mt*ii,Ji=(-3*xt+Br*Wt)*oi,Qi=(-kr*ii-(1-mt)*Ji)/(kr*kr),Oo=.5*Qi/Jr,Qo=Pr*Oo-2*xt*Jr*oi,vo=xt*zt*Qi+jr*Wt*oi,ys=-Si*oi,ol=-Si*vo,jl=-2*Si*Qo,Hs=4*$e/S,Cu;if($e>.222*S||nt.175*S){if(an=(Ba+xt*D(la*(1+Bt)-Ba*Ba))/(1+Bt),$e>S/4)return[an,an];var hi=an,wi=.5*an;an=.5*(wi+hi),wn=50;do{var sl=D(la-an*an),sc=an*(jl+ys*sl)+ol*I(an/xa)-Hs;if(!sc)break;sc<0?wi=an:hi=an,an=.5*(wi+hi)}while(k(hi-wi)>i&&--wn>0)}else{an=i,wn=25;do{var tu=an*an,Ps=D(la-tu),gc=jl+ys*Ps,pu=an*gc+ol*I(an/xa)-Hs,ll=gc+(ol-ys*tu)/Ps;an-=Cu=Ps?pu/ll:0}while(k(Cu)>i&&--wn>0)}return[an,-Ba-xt*D(la-an*an)]}function Sa($e,nt){for(var mt=0,xt=1,Bt=.5,zt=50;;){var Wt=Bt*Bt,Pr=D(Bt),Br=I(1/D(1+Wt)),kr=1-Wt+Bt*(1+Wt)*Br,jr=(1-Pr)/kr,Jr=D(jr),la=jr*(1+Wt),xa=Jr*(1-Wt),Ba=la-$e*$e,an=D(Ba),wn=nt+xa+Bt*an;if(k(xt-mt)0?mt=Bt:xt=Bt,Bt=.5*(mt+xt)}if(!zt)return null;var ii=I(Pr),Si=t(ii),oi=1/Si,Ji=2*Pr*Si,Qi=(-3*Bt+Br*(1+3*Wt))*Ji,Oo=(-kr*Si-(1-Pr)*Qi)/(kr*kr),Qo=.5*Oo/Jr,vo=(1-Wt)*Qo-2*Bt*Jr*Ji,ys=-2*oi*vo,ol=-oi*Ji,jl=-oi*(Bt*(1+Wt)*Oo+jr*(1+3*Wt)*Ji);return[S/4*($e*(ys+ol*an)+jl*I($e/D(la))),ii]}function wa(){return b.geoProjection(zr(Lr)).scale(239.75)}function pn($e,nt,mt){var xt,Bt,zt;return $e?(xt=tn($e,mt),nt?(Bt=tn(nt,1-mt),zt=Bt[1]*Bt[1]+mt*xt[0]*xt[0]*Bt[0]*Bt[0],[[xt[0]*Bt[2]/zt,xt[1]*xt[2]*Bt[0]*Bt[1]/zt],[xt[1]*Bt[1]/zt,-xt[0]*xt[2]*Bt[0]*Bt[2]/zt],[xt[2]*Bt[1]*Bt[2]/zt,-mt*xt[0]*xt[1]*Bt[0]/zt]]):[[xt[0],0],[xt[1],0],[xt[2],0]]):(Bt=tn(nt,1-mt),[[0,Bt[0]/Bt[1]],[1/Bt[1],0],[Bt[2]/Bt[1],0]])}function tn($e,nt){var mt,xt,Bt,zt,Wt;if(nt=1-i)return mt=(1-nt)/4,xt=P($e),zt=B($e),Bt=1/xt,Wt=xt*F($e),[zt+mt*(Wt-$e)/(xt*xt),Bt-mt*zt*Bt*(Wt-$e),Bt+mt*zt*Bt*(Wt+$e),2*l(n($e))-M+mt*(Wt-$e)/xt];var Pr=[1,0,0,0,0,0,0,0,0],Br=[D(nt),0,0,0,0,0,0,0,0],kr=0;for(xt=D(1-nt),Wt=1;k(Br[kr]/Pr[kr])>i&&kr<8;)mt=Pr[kr++],Br[kr]=(mt-xt)/2,Pr[kr]=(mt+xt)/2,xt=D(mt*xt),Wt*=2;Bt=Wt*Pr[kr]*$e;do zt=Br[kr]*v(xt=Bt)/Pr[kr],Bt=(I(zt)+Bt)/2;while(--kr);return[v(Bt),zt=t(Bt),zt/t(Bt-xt),Bt]}function ai($e,nt,mt){var xt=k($e),Bt=k(nt),zt=F(Bt);if(xt){var Wt=1/v(xt),Pr=1/(g(xt)*g(xt)),Br=-(Pr+mt*(zt*zt*Wt*Wt)-1+mt),kr=(mt-1)*Pr,jr=(-Br+D(Br*Br-4*kr))/2;return[rn(l(1/D(jr)),mt)*h($e),rn(l(D((jr/Pr-1)/mt)),1-mt)*h(nt)]}return[0,rn(l(zt),1-mt)*h(nt)]}function rn($e,nt){if(!nt)return $e;if(nt===1)return a(g($e/2+C));for(var mt=1,xt=D(1-nt),Bt=D(nt),zt=0;k(Bt)>i;zt++){if($e%S){var Wt=l(xt*g($e)/mt);Wt<0&&(Wt+=S),$e+=Wt+~~($e/S)*S}else $e+=$e;Bt=(mt+xt)/2,xt=D(mt*xt),Bt=((mt=Bt)-xt)/2}return $e/(c(2,zt)*mt)}function Ri($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=a(g(S/4+k(nt)/2)),Pr=n(zt*Wt)/D(mt),Br=Gn(Pr*t(zt*$e),Pr*v(zt*$e)),kr=ai(Br[0],Br[1],xt*xt);return[-kr[1],(nt>=0?1:-1)*(.5*Bt-kr[0])]}function Gn($e,nt){var mt=$e*$e,xt=nt+1,Bt=1-mt-nt*nt;return[.5*(($e>=0?M:-M)-e(Bt,2*$e)),-.25*a(Bt*Bt+4*mt)+.5*a(xt*xt+mt)]}function no($e,nt){var mt=nt[0]*nt[0]+nt[1]*nt[1];return[($e[0]*nt[0]+$e[1]*nt[1])/mt,($e[1]*nt[0]-$e[0]*nt[1])/mt]}Ri.invert=function($e,nt){var mt=(T-1)/(T+1),xt=D(1-mt*mt),Bt=rn(M,xt*xt),zt=-1,Wt=pn(.5*Bt-nt,-$e,xt*xt),Pr=no(Wt[0],Wt[1]),Br=e(Pr[1],Pr[0])/zt;return[Br,2*l(n(.5/zt*a(mt*Pr[0]*Pr[0]+mt*Pr[1]*Pr[1])))-M]};function Di(){return b.geoProjection(zr(Ri)).scale(151.496)}function fn($e){var nt=v($e),mt=t($e),xt=Ai($e);xt.invert=Ai(-$e);function Bt(zt,Wt){var Pr=xt(zt,Wt);zt=Pr[0],Wt=Pr[1];var Br=v(Wt),kr=t(Wt),jr=t(zt),Jr=O(nt*Br+mt*kr*jr),la=v(Jr),xa=k(la)>i?Jr/la:1;return[xa*mt*v(zt),(k(zt)>M?xa:-xa)*(nt*kr-mt*Br*jr)]}return Bt.invert=function(zt,Wt){var Pr=D(zt*zt+Wt*Wt),Br=-v(Pr),kr=t(Pr),jr=Pr*kr,Jr=-Wt*Br,la=Pr*nt,xa=D(jr*jr+Jr*Jr-la*la),Ba=e(jr*la+Jr*xa,Jr*la-jr*xa),an=(Pr>M?-1:1)*e(zt*Br,Pr*t(Ba)*kr+Wt*v(Ba)*Br);return xt.invert(an,Ba)},Bt}function Ai($e){var nt=v($e),mt=t($e);return function(xt,Bt){var zt=t(Bt),Wt=t(xt)*zt,Pr=v(xt)*zt,Br=v(Bt);return[e(Pr,Wt*mt-Br*nt),I(Br*mt+Wt*nt)]}}function jn(){var $e=0,nt=b.geoProjectionMutator(fn),mt=nt($e),xt=mt.rotate,Bt=mt.stream,zt=b.geoCircle();return mt.parallel=function(Wt){if(!arguments.length)return $e*A;var Pr=mt.rotate();return nt($e=Wt*x).rotate(Pr)},mt.rotate=function(Wt){return arguments.length?(xt.call(mt,[Wt[0],Wt[1]-$e*A]),zt.center([-Wt[0],-Wt[1]]),mt):(Wt=xt.call(mt),Wt[1]+=$e*A,Wt)},mt.stream=function(Wt){return Wt=Bt(Wt),Wt.sphere=function(){Wt.polygonStart();var Pr=.01,Br=zt.radius(90-Pr)().coordinates[0],kr=Br.length-1,jr=-1,Jr;for(Wt.lineStart();++jr=0;)Wt.point((Jr=Br[jr])[0],Jr[1]);Wt.lineEnd(),Wt.polygonEnd()},Wt},mt.scale(79.4187).parallel(45).clipAngle(180-.001)}var Xn=3,eo=I(1-1/Xn)*A,gi=Ct(0);function qi($e){var nt=eo*x,mt=We(S,nt)[0]-We(-S,nt)[0],xt=gi(0,nt)[1],Bt=We(0,nt)[1],zt=f-Bt,Wt=u/$e,Pr=4/u,Br=xt+zt*zt*4/u;function kr(jr,Jr){var la,xa=k(Jr);if(xa>nt){var Ba=s($e-1,o(0,r((jr+S)/Wt)));jr+=S*($e-1)/$e-Ba*Wt,la=We(jr,xa),la[0]=la[0]*u/mt-u*($e-1)/(2*$e)+Ba*u/$e,la[1]=xt+(la[1]-Bt)*4*zt/u,Jr<0&&(la[1]=-la[1])}else la=gi(jr,Jr);return la[0]*=Pr,la[1]/=Br,la}return kr.invert=function(jr,Jr){jr/=Pr,Jr*=Br;var la=k(Jr);if(la>xt){var xa=s($e-1,o(0,r((jr+S)/Wt)));jr=(jr+S*($e-1)/$e-xa*Wt)*mt/u;var Ba=We.invert(jr,.25*(la-xt)*u/zt+Bt);return Ba[0]-=S*($e-1)/$e-xa*Wt,Jr<0&&(Ba[1]=-Ba[1]),Ba}return gi.invert(jr,Jr)},kr}function io($e,nt){return[$e,nt&1?90-i:eo]}function oo($e,nt){return[$e,nt&1?-90+i:-eo]}function Vn($e){return[$e[0]*(1-i),$e[1]]}function qn($e){var nt=[].concat(E.range(-180,180+$e/2,$e).map(io),E.range(180,-180-$e/2,-$e).map(oo));return{type:"Polygon",coordinates:[$e===180?nt.map(Vn):nt]}}function Hi(){var $e=4,nt=b.geoProjectionMutator(qi),mt=nt($e),xt=mt.stream;return mt.lobes=function(Bt){return arguments.length?nt($e=+Bt):$e},mt.stream=function(Bt){var zt=mt.rotate(),Wt=xt(Bt),Pr=(mt.rotate([0,0]),xt(Bt));return mt.rotate(zt),Wt.sphere=function(){b.geoStream(qn(180/$e),Pr)},Wt},mt.scale(239.75)}function Mi($e){var nt=1+$e,mt=v(1/nt),xt=I(mt),Bt=2*D(S/(zt=S+4*xt*nt)),zt,Wt=.5*Bt*(nt+D($e*(2+$e))),Pr=$e*$e,Br=nt*nt;function kr(jr,Jr){var la=1-v(Jr),xa,Ba;if(la&&la<2){var an=M-Jr,wn=25,ii;do{var Si=v(an),oi=t(an),Ji=xt+e(Si,nt-oi),Qi=1+Br-2*nt*oi;an-=ii=(an-Pr*xt-nt*Si+Qi*Ji-.5*la*zt)/(2*nt*Si*Ji)}while(k(ii)>w&&--wn>0);xa=Bt*D(Qi),Ba=jr*Ji/S}else xa=Bt*($e+la),Ba=jr*xt/S;return[xa*v(Ba),Wt-xa*t(Ba)]}return kr.invert=function(jr,Jr){var la=jr*jr+(Jr-=Wt)*Jr,xa=(1+Br-la/(Bt*Bt))/(2*nt),Ba=O(xa),an=v(Ba),wn=xt+e(an,nt-xa);return[I(jr/D(la))*S/wn,I(1-2*(Ba-Pr*xt-nt*an+(1+Br-2*nt*xa)*wn)/zt)]},kr}function Ro(){var $e=1,nt=b.geoProjectionMutator(Mi),mt=nt($e);return mt.ratio=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(167.774).center([0,18.67])}var go=.7109889596207567,Eo=.0528035274542;function Ao($e,nt){return nt>-go?($e=_e($e,nt),$e[1]+=Eo,$e):Ye($e,nt)}Ao.invert=function($e,nt){return nt>-go?_e.invert($e,nt-Eo):Ye.invert($e,nt)};function ds(){return b.geoProjection(Ao).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function jo($e,nt){return k(nt)>go?($e=_e($e,nt),$e[1]-=nt>0?Eo:-Eo,$e):Ye($e,nt)}jo.invert=function($e,nt){return k(nt)>go?_e.invert($e,nt+(nt>0?Eo:-Eo)):Ye.invert($e,nt)};function Wo(){return b.geoProjection(jo).scale(152.63)}function to($e,nt,mt,xt){var Bt=D(4*S/(2*mt+(1+$e-nt/2)*v(2*mt)+($e+nt)/2*v(4*mt)+nt/2*v(6*mt))),zt=D(xt*v(mt)*D((1+$e*t(2*mt)+nt*t(4*mt))/(1+$e+nt))),Wt=mt*Br(1);function Pr(Jr){return D(1+$e*t(2*Jr)+nt*t(4*Jr))}function Br(Jr){var la=Jr*mt;return(2*la+(1+$e-nt/2)*v(2*la)+($e+nt)/2*v(4*la)+nt/2*v(6*la))/mt}function kr(Jr){return Pr(Jr)*v(Jr)}var jr=function(Jr,la){var xa=mt*Me(Br,Wt*v(la)/mt,la/S);isNaN(xa)&&(xa=mt*h(la));var Ba=Bt*Pr(xa);return[Ba*zt*Jr/S*t(xa),Ba/zt*v(xa)]};return jr.invert=function(Jr,la){var xa=Me(kr,la*zt/Bt);return[Jr*S/(t(xa)*Bt*zt*Pr(xa)),I(mt*Br(xa/mt)/Wt)]},mt===0&&(Bt=D(xt/S),jr=function(Jr,la){return[Jr*Bt,v(la)/Bt]},jr.invert=function(Jr,la){return[Jr/Bt,I(la*Bt)]}),jr}function wo(){var $e=1,nt=0,mt=45*x,xt=2,Bt=b.geoProjectionMutator(to),zt=Bt($e,nt,mt,xt);return zt.a=function(Wt){return arguments.length?Bt($e=+Wt,nt,mt,xt):$e},zt.b=function(Wt){return arguments.length?Bt($e,nt=+Wt,mt,xt):nt},zt.psiMax=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt*x,xt):mt*A},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(180.739)}function pi($e,nt,mt,xt,Bt,zt,Wt,Pr,Br,kr,jr){if(jr.nanEncountered)return NaN;var Jr,la,xa,Ba,an,wn,ii,Si,oi,Ji;if(Jr=mt-nt,la=$e(nt+Jr*.25),xa=$e(mt-Jr*.25),isNaN(la)){jr.nanEncountered=!0;return}if(isNaN(xa)){jr.nanEncountered=!0;return}return Ba=Jr*(xt+4*la+Bt)/12,an=Jr*(Bt+4*xa+zt)/12,wn=Ba+an,Ji=(wn-Wt)/15,kr>Br?(jr.maxDepthCount++,wn+Ji):Math.abs(Ji)>1;do Br[wn]>xa?an=wn:Ba=wn,wn=Ba+an>>1;while(wn>Ba);var ii=Br[wn+1]-Br[wn];return ii&&(ii=(xa-Br[wn+1])/ii),(wn+1+ii)/Wt}var Jr=2*jr(1)/S*zt/mt,la=function(xa,Ba){var an=jr(k(v(Ba))),wn=xt(an)*xa;return an/=Jr,[wn,Ba>=0?an:-an]};return la.invert=function(xa,Ba){var an;return Ba*=Jr,k(Ba)<1&&(an=h(Ba)*I(Bt(k(Ba))*zt)),[xa/xt(k(Ba)),an]},la}function Xi(){var $e=0,nt=2.5,mt=1.183136,xt=b.geoProjectionMutator(Io),Bt=xt($e,nt,mt);return Bt.alpha=function(zt){return arguments.length?xt($e=+zt,nt,mt):$e},Bt.k=function(zt){return arguments.length?xt($e,nt=+zt,mt):nt},Bt.gamma=function(zt){return arguments.length?xt($e,nt,mt=+zt):mt},Bt.scale(152.63)}function Ko($e,nt){return k($e[0]-nt[0])=0;--Br)mt=$e[1][Br],xt=mt[0][0],Bt=mt[0][1],zt=mt[1][1],Wt=mt[2][0],Pr=mt[2][1],nt.push(Uo([[Wt-i,Pr-i],[Wt-i,zt+i],[xt+i,zt+i],[xt+i,Bt-i]],30));return{type:"Polygon",coordinates:[E.merge(nt)]}}function Ss($e,nt,mt){var xt,Bt;function zt(Br,kr){for(var jr=kr<0?-1:1,Jr=nt[+(kr<0)],la=0,xa=Jr.length-1;laJr[la][2][0];++la);var Ba=$e(Br-Jr[la][1][0],kr);return Ba[0]+=$e(Jr[la][1][0],jr*kr>jr*Jr[la][0][1]?Jr[la][0][1]:kr)[0],Ba}mt?zt.invert=mt(zt):$e.invert&&(zt.invert=function(Br,kr){for(var jr=Bt[+(kr<0)],Jr=nt[+(kr<0)],la=0,xa=jr.length;laBa&&(an=xa,xa=Ba,Ba=an),[[Jr,xa],[la,Ba]]})}),Wt):nt.map(function(kr){return kr.map(function(jr){return[[jr[0][0]*A,jr[0][1]*A],[jr[1][0]*A,jr[1][1]*A],[jr[2][0]*A,jr[2][1]*A]]})})},nt!=null&&Wt.lobes(nt),Wt}var Vo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Vs(){return Ss(Ae,Vo).scale(160.857)}var Ts=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Bo(){return Ss(jo,Ts).scale(152.63)}var _o=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Pi(){return Ss(_e,_o).scale(169.529)}var yo=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function bs(){return Ss(_e,yo).scale(169.529).rotate([20,0])}var Dl=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function hl(){return Ss(Ao,Dl,Se).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ps=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function dl(){return Ss(Ye,ps).scale(152.63).rotate([-20,0])}function wu($e,nt){return[3/u*$e*D(S*S/3-nt*nt),nt]}wu.invert=function($e,nt){return[u/3*$e/D(S*S/3-nt*nt),nt]};function lu(){return b.geoProjection(wu).scale(158.837)}function xc($e){function nt(mt,xt){if(k(k(xt)-M)2)return null;mt/=2,xt/=2;var zt=mt*mt,Wt=xt*xt,Pr=2*xt/(1+zt+Wt);return Pr=c((1+Pr)/(1-Pr),1/$e),[e(2*mt,1-zt-Wt)/$e,I((Pr-1)/(Pr+1))]},nt}function Fl(){var $e=.5,nt=b.geoProjectionMutator(xc),mt=nt($e);return mt.spacing=function(xt){return arguments.length?nt($e=+xt):$e},mt.scale(124.75)}var pl=S/T;function $u($e,nt){return[$e*(1+D(t(nt)))/2,nt/(t(nt/2)*t($e/6))]}$u.invert=function($e,nt){var mt=k($e),xt=k(nt),Bt=i,zt=M;xti||k(wn)>i)&&--Bt>0);return Bt&&[mt,xt]};function vs(){return b.geoProjection(tl).scale(139.98)}function os($e,nt){return[v($e)/t(nt),g(nt)*t($e)]}os.invert=function($e,nt){var mt=$e*$e,xt=nt*nt,Bt=xt+1,zt=mt+Bt,Wt=$e?_*D((zt-D(zt*zt-4*mt))/mt):1/D(Bt);return[I($e*Wt),h(nt)*O(Wt)]};function ms(){return b.geoProjection(os).scale(144.049).clipAngle(90-.001)}function rl($e){var nt=t($e),mt=g(C+$e/2);function xt(Bt,zt){var Wt=zt-$e,Pr=k(Wt)=0;)jr=$e[kr],Jr=jr[0]+Pr*(xa=Jr)-Br*la,la=jr[1]+Pr*la+Br*xa;return Jr=Pr*(xa=Jr)-Br*la,la=Pr*la+Br*xa,[Jr,la]}return mt.invert=function(xt,Bt){var zt=20,Wt=xt,Pr=Bt;do{for(var Br=nt,kr=$e[Br],jr=kr[0],Jr=kr[1],la=0,xa=0,Ba;--Br>=0;)kr=$e[Br],la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=kr[0]+Wt*(Ba=jr)-Pr*Jr,Jr=kr[1]+Wt*Jr+Pr*Ba;la=jr+Wt*(Ba=la)-Pr*xa,xa=Jr+Wt*xa+Pr*Ba,jr=Wt*(Ba=jr)-Pr*Jr-xt,Jr=Wt*Jr+Pr*Ba-Bt;var an=la*la+xa*xa,wn,ii;Wt-=wn=(jr*la+Jr*xa)/an,Pr-=ii=(Jr*la-jr*xa)/an}while(k(wn)+k(ii)>i*i&&--zt>0);if(zt){var Si=D(Wt*Wt+Pr*Pr),oi=2*l(Si*.5),Ji=v(oi);return[e(Wt*Ji,Si*t(oi)),Si?I(Pr*Ji/Si):0]}},mt}var Lh=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],rh=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Ju=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ss=[[.9245,0],[0,0],[.01943,0]],ah=[[.721316,0],[0,0],[-.00881625,-.00617325]];function wc(){return Ou(Lh,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function pc(){return Ou(rh,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Nf(){return Ou(Ju,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Bu(){return Ou(ss,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Tc(){return Ou(ah,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Ou($e,nt){var mt=b.geoProjection(bc($e)).rotate(nt).clipAngle(90),xt=b.geoRotation(nt),Bt=mt.center;return delete mt.rotate,mt.center=function(zt){return arguments.length?Bt(xt(zt)):xt.invert(Bt())},mt}var Gc=D(6),pf=D(7);function $l($e,nt){var mt=I(7*v(nt)/(3*Gc));return[Gc*$e*(2*t(2*mt/3)-1)/pf,9*v(mt/3)/pf]}$l.invert=function($e,nt){var mt=3*I(nt*pf/9);return[$e*pf/(Gc*(2*t(2*mt/3)-1)),I(v(mt)*3*Gc/7)]};function jf(){return b.geoProjection($l).scale(164.859)}function Hc($e,nt){for(var mt=(1+_)*v(nt),xt=nt,Bt=0,zt;Bt<25&&(xt-=zt=(v(xt/2)+v(xt)-mt)/(.5*t(xt/2)+t(xt)),!(k(zt)w&&--xt>0);return zt=mt*mt,Wt=zt*zt,Pr=zt*Wt,[$e/(.84719-.13063*zt+Pr*Pr*(-.04515+.05494*zt-.02326*Wt+.00331*Pr)),mt]};function Uf(){return b.geoProjection(Nu).scale(175.295)}function al($e,nt){return[$e*(1+t(nt))/2,2*(nt-g(nt/2))]}al.invert=function($e,nt){for(var mt=nt/2,xt=0,Bt=1/0;xt<10&&k(Bt)>i;++xt){var zt=t(nt/2);nt-=Bt=(nt-g(nt/2)-mt)/(1-.5/(zt*zt))}return[2*$e/(1+t(nt)),nt]};function Xc(){return b.geoProjection(al).scale(152.63)}var ju=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ac(){return Ss(he(1/0),ju).rotate([20,0]).scale(152.63)}function Zc($e,nt){var mt=v(nt),xt=t(nt),Bt=h($e);if($e===0||k(nt)===M)return[0,nt];if(nt===0)return[$e,0];if(k($e)===M)return[$e*xt,M*mt];var zt=S/(2*$e)-2*$e/S,Wt=2*nt/S,Pr=(1-Wt*Wt)/(mt-Wt),Br=zt*zt,kr=Pr*Pr,jr=1+Br/kr,Jr=1+kr/Br,la=(zt*mt/Pr-zt/2)/jr,xa=(kr*mt/Br+Pr/2)/Jr,Ba=la*la+xt*xt/jr,an=xa*xa-(kr*mt*mt/Br+Pr*mt-1)/Jr;return[M*(la+D(Ba)*Bt),M*(xa+D(an<0?0:an)*h(-nt*zt)*Bt)]}Zc.invert=function($e,nt){$e/=M,nt/=M;var mt=$e*$e,xt=nt*nt,Bt=mt+xt,zt=S*S;return[$e?(Bt-1+D((1-Bt)*(1-Bt)+4*mt))/(2*$e)*M:0,Me(function(Wt){return Bt*(S*v(Wt)-2*Wt)*S+4*Wt*Wt*(nt-v(Wt))+2*S*Wt-zt*nt},0)]};function ec(){return b.geoProjection(Zc).scale(127.267)}var cu=1.0148,tc=.23185,vf=-.14499,Tu=.02406,nh=cu,vl=5*tc,ml=7*vf,rc=9*Tu,yl=1.790857183;function qf($e,nt){var mt=nt*nt;return[$e,nt*(cu+mt*mt*(tc+mt*(vf+Tu*mt)))]}qf.invert=function($e,nt){nt>yl?nt=yl:nt<-yl&&(nt=-yl);var mt=nt,xt;do{var Bt=mt*mt;mt-=xt=(mt*(cu+Bt*Bt*(tc+Bt*(vf+Tu*Bt)))-nt)/(nh+Bt*Bt*(vl+Bt*(ml+rc*Bt)))}while(k(xt)>i);return[$e,mt]};function ac(){return b.geoProjection(qf).scale(139.319)}function Mc($e,nt){if(k(nt)i&&--Bt>0);return Wt=g(xt),[(k(nt)=0;)if(xt=nt[Pr],mt[0]===xt[0]&&mt[1]===xt[1]){if(zt)return[zt,mt];zt=mt}}}function gf($e){for(var nt=$e.length,mt=[],xt=$e[nt-1],Bt=0;Bt0?[-xt[0],0]:[180-xt[0],180])};var nt=hu.map(function(mt){return{face:mt,project:$e(mt)}});return[-1,0,0,1,0,1,4,5].forEach(function(mt,xt){var Bt=nt[mt];Bt&&(Bt.children||(Bt.children=[])).push(nt[xt])}),Au(nt[0],function(mt,xt){return nt[mt<-S/2?xt<0?6:4:mt<0?xt<0?2:0:mtxt^xa>xt&&mt<(la-kr)*(xt-jr)/(xa-jr)+kr&&(Bt=!Bt)}return Bt}function Vf($e,nt){var mt=nt.stream,xt;if(!mt)throw new Error("invalid projection");switch($e&&$e.type){case"Feature":xt=Gf;break;case"FeatureCollection":xt=xf;break;default:xt=Hf;break}return xt($e,mt)}function xf($e,nt){return{type:"FeatureCollection",features:$e.features.map(function(mt){return Gf(mt,nt)})}}function Gf($e,nt){return{type:"Feature",id:$e.id,properties:$e.properties,geometry:Hf($e.geometry,nt)}}function bh($e,nt){return{type:"GeometryCollection",geometries:$e.geometries.map(function(mt){return Hf(mt,nt)})}}function Hf($e,nt){if(!$e)return null;if($e.type==="GeometryCollection")return bh($e,nt);var mt;switch($e.type){case"Point":mt=kc;break;case"MultiPoint":mt=kc;break;case"LineString":mt=Cc;break;case"MultiLineString":mt=Cc;break;case"Polygon":mt=Lc;break;case"MultiPolygon":mt=Lc;break;case"Sphere":mt=Lc;break;default:return null}return b.geoStream($e,nt(mt)),mt.result()}var il=[],kl=[],kc={point:function($e,nt){il.push([$e,nt])},result:function(){var $e=il.length?il.length<2?{type:"Point",coordinates:il[0]}:{type:"MultiPoint",coordinates:il}:null;return il=[],$e}},Cc={lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){il.length&&(kl.push(il),il=[])},result:function(){var $e=kl.length?kl.length<2?{type:"LineString",coordinates:kl[0]}:{type:"MultiLineString",coordinates:kl}:null;return kl=[],$e}},Lc={polygonStart:xo,lineStart:xo,point:function($e,nt){il.push([$e,nt])},lineEnd:function(){var $e=il.length;if($e){do il.push(il[0].slice());while(++$e<4);kl.push(il),il=[]}},polygonEnd:xo,result:function(){if(!kl.length)return null;var $e=[],nt=[];return kl.forEach(function(mt){Ec(mt)?$e.push([mt]):nt.push(mt)}),nt.forEach(function(mt){var xt=mt[0];$e.some(function(Bt){if(xh(Bt[0],xt))return Bt.push(mt),!0})||$e.push([mt])}),kl=[],$e.length?$e.length>1?{type:"MultiPolygon",coordinates:$e}:{type:"Polygon",coordinates:$e[0]}:null}};function vc($e){var nt=$e(M,0)[0]-$e(-M,0)[0];function mt(xt,Bt){var zt=k(xt)0?xt-S:xt+S,Bt),Pr=(Wt[0]-Wt[1])*_,Br=(Wt[0]+Wt[1])*_;if(zt)return[Pr,Br];var kr=nt*_,jr=Pr>0^Br>0?-1:1;return[jr*Pr-h(Br)*kr,jr*Br-h(Pr)*kr]}return $e.invert&&(mt.invert=function(xt,Bt){var zt=(xt+Bt)*_,Wt=(Bt-xt)*_,Pr=k(zt)<.5*nt&&k(Wt)<.5*nt;if(!Pr){var Br=nt*_,kr=zt>0^Wt>0?-1:1,jr=-kr*xt+(Wt>0?1:-1)*Br,Jr=-kr*Bt+(zt>0?1:-1)*Br;zt=(-jr-Jr)*_,Wt=(jr-Jr)*_}var la=$e.invert(zt,Wt);return Pr||(la[0]+=zt>0?S:-S),la}),b.geoProjection(mt).rotate([-90,-90,45]).clipAngle(180-.001)}function Ft(){return vc(Lr).scale(176.423)}function tr(){return vc(Ri).scale(111.48)}function Fr($e,nt){if(!(0<=(nt=+nt)&&nt<=20))throw new Error("invalid digits");function mt(kr){var jr=kr.length,Jr=2,la=new Array(jr);for(la[0]=+kr[0].toFixed(nt),la[1]=+kr[1].toFixed(nt);Jr2||xa[0]!=jr[0]||xa[1]!=jr[1])&&(Jr.push(xa),jr=xa)}return Jr.length===1&&kr.length>1&&Jr.push(mt(kr[kr.length-1])),Jr}function zt(kr){return kr.map(Bt)}function Wt(kr){if(kr==null)return kr;var jr;switch(kr.type){case"GeometryCollection":jr={type:"GeometryCollection",geometries:kr.geometries.map(Wt)};break;case"Point":jr={type:"Point",coordinates:mt(kr.coordinates)};break;case"MultiPoint":jr={type:kr.type,coordinates:xt(kr.coordinates)};break;case"LineString":jr={type:kr.type,coordinates:Bt(kr.coordinates)};break;case"MultiLineString":case"Polygon":jr={type:kr.type,coordinates:zt(kr.coordinates)};break;case"MultiPolygon":jr={type:"MultiPolygon",coordinates:kr.coordinates.map(zt)};break;default:return kr}return kr.bbox!=null&&(jr.bbox=kr.bbox),jr}function Pr(kr){var jr={type:"Feature",properties:kr.properties,geometry:Wt(kr.geometry)};return kr.id!=null&&(jr.id=kr.id),kr.bbox!=null&&(jr.bbox=kr.bbox),jr}if($e!=null)switch($e.type){case"Feature":return Pr($e);case"FeatureCollection":{var Br={type:"FeatureCollection",features:$e.features.map(Pr)};return $e.bbox!=null&&(Br.bbox=$e.bbox),Br}default:return Wt($e)}return $e}function wr($e){var nt=v($e);function mt(xt,Bt){var zt=nt?g(xt*nt/2)/nt:xt/2;if(!Bt)return[2*zt,-$e];var Wt=2*l(zt*v(Bt)),Pr=1/g(Bt);return[v(Wt)*Pr,Bt+(1-t(Wt))*Pr-$e]}return mt.invert=function(xt,Bt){if(k(Bt+=$e)i&&--Pr>0);var la=xt*(kr=g(Wt)),xa=g(k(Bt)0?M:-M)*(Br+Bt*(jr-Wt)/2+Bt*Bt*(jr-2*Br+Wt)/2)]}Ia.invert=function($e,nt){var mt=nt/M,xt=mt*90,Bt=s(18,k(xt/5)),zt=o(0,r(Bt));do{var Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],kr=Br-Wt,jr=Br-2*Pr+Wt,Jr=2*(k(mt)-Pr)/kr,la=jr/kr,xa=Jr*(1-la*Jr*(1-2*la*Jr));if(xa>=0||zt===1){xt=(nt>=0?5:-5)*(xa+Bt);var Ba=50,an;do Bt=s(18,k(xt)/5),zt=r(Bt),xa=Bt-zt,Wt=ba[zt][1],Pr=ba[zt+1][1],Br=ba[s(19,zt+2)][1],xt-=(an=(nt>=0?M:-M)*(Pr+xa*(Br-Wt)/2+xa*xa*(Br-2*Pr+Wt)/2)-nt)*A;while(k(an)>w&&--Ba>0);break}}while(--zt>=0);var wn=ba[zt][0],ii=ba[zt+1][0],Si=ba[s(19,zt+2)][0];return[$e/(ii+xa*(Si-wn)/2+xa*xa*(Si-2*ii+wn)/2),xt*x]};function Na(){return b.geoProjection(Ia).scale(152.63)}function Za($e){function nt(mt,xt){var Bt=t(xt),zt=($e-1)/($e-Bt*t(mt));return[zt*Bt*v(mt),zt*v(xt)]}return nt.invert=function(mt,xt){var Bt=mt*mt+xt*xt,zt=D(Bt),Wt=($e-D(1-Bt*($e+1)/($e-1)))/(($e-1)/zt+zt/($e-1));return[e(mt*Wt,zt*D(1-Wt*Wt)),zt?I(xt*Wt/zt):0]},nt}function mn($e,nt){var mt=Za($e);if(!nt)return mt;var xt=t(nt),Bt=v(nt);function zt(Wt,Pr){var Br=mt(Wt,Pr),kr=Br[1],jr=kr*Bt/($e-1)+xt;return[Br[0]*xt/jr,kr/jr]}return zt.invert=function(Wt,Pr){var Br=($e-1)/($e-1-Pr*Bt);return mt.invert(Br*Wt,Br*Pr*xt)},zt}function Da(){var $e=2,nt=0,mt=b.geoProjectionMutator(mn),xt=mt($e,nt);return xt.distance=function(Bt){return arguments.length?mt($e=+Bt,nt):$e},xt.tilt=function(Bt){return arguments.length?mt($e,nt=Bt*x):nt*A},xt.scale(432.147).clipAngle(O(1/$e)*A-1e-6)}var Ha=1e-4,$a=1e4,vn=-180,Sn=vn+Ha,yi=180,_i=yi-Ha,ki=-90,ri=ki+Ha,En=90,Ln=En-Ha;function Ni($e){return $e.length>0}function Zi($e){return Math.floor($e*$a)/$a}function Co($e){return $e===ki||$e===En?[0,$e]:[vn,Zi($e)]}function Do($e){var nt=$e[0],mt=$e[1],xt=!1;return nt<=Sn?(nt=vn,xt=!0):nt>=_i&&(nt=yi,xt=!0),mt<=ri?(mt=ki,xt=!0):mt>=Ln&&(mt=En,xt=!0),xt?[nt,mt]:$e}function Fo($e){return $e.map(Do)}function Yo($e,nt,mt){for(var xt=0,Bt=$e.length;xt=_i||jr<=ri||jr>=Ln){zt[Wt]=Do(Br);for(var Jr=Wt+1;JrSn&&xa<_i&&Ba>ri&&Ba=Pr)break;mt.push({index:-1,polygon:nt,ring:zt=zt.slice(Jr-1)}),zt[0]=Co(zt[0][1]),Wt=-1,Pr=zt.length}}}}function bo($e){var nt,mt=$e.length,xt={},Bt={},zt,Wt,Pr,Br,kr;for(nt=0;nt0?S-Pr:Pr)*A],kr=b.geoProjection($e(Wt)).rotate(Br),jr=b.geoRotation(Br),Jr=kr.center;return delete kr.rotate,kr.center=function(la){return arguments.length?Jr(jr(la)):jr.invert(Jr())},kr.clipAngle(90)}function js($e){var nt=t($e);function mt(xt,Bt){var zt=b.geoGnomonicRaw(xt,Bt);return zt[0]*=nt,zt}return mt.invert=function(xt,Bt){return b.geoGnomonicRaw.invert(xt/nt,Bt)},mt}function Cl(){return zl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function zl($e,nt){return gs(js,$e,nt)}function Kl($e){if(!($e*=2))return b.geoAzimuthalEquidistantRaw;var nt=-$e/2,mt=-nt,xt=$e*$e,Bt=g(mt),zt=.5/v(mt);function Wt(Pr,Br){var kr=O(t(Br)*t(Pr-nt)),jr=O(t(Br)*t(Pr-mt)),Jr=Br<0?-1:1;return kr*=kr,jr*=jr,[(kr-jr)/(2*$e),Jr*D(4*xt*jr-(xt-kr+jr)*(xt-kr+jr))/(2*$e)]}return Wt.invert=function(Pr,Br){var kr=Br*Br,jr=t(D(kr+(la=Pr+nt)*la)),Jr=t(D(kr+(la=Pr+mt)*la)),la,xa;return[e(xa=jr-Jr,la=(jr+Jr)*Bt),(Br<0?-1:1)*O(D(la*la+xa*xa)*zt)]},Wt}function Gu(){return xl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function xl($e,nt){return gs(Kl,$e,nt)}function Hu($e,nt){if(k(nt)i&&--Pr>0);return[h($e)*(D(Bt*Bt+4)+Bt)*S/4,M*Wt]};function Ql(){return b.geoProjection(Jl).scale(127.16)}function Eu($e,nt,mt,xt,Bt){function zt(Wt,Pr){var Br=mt*v(xt*Pr),kr=D(1-Br*Br),jr=D(2/(1+kr*t(Wt*=Bt)));return[$e*kr*jr*v(Wt),nt*Br*jr]}return zt.invert=function(Wt,Pr){var Br=Wt/$e,kr=Pr/nt,jr=D(Br*Br+kr*kr),Jr=2*I(jr/2);return[e(Wt*g(Jr),$e*jr)/Bt,jr&&I(Pr*v(Jr)/(nt*mt*jr))/xt]},zt}function bf($e,nt,mt,xt){var Bt=S/3;$e=o($e,i),nt=o(nt,i),$e=s($e,M),nt=s(nt,S-i),mt=o(mt,0),mt=s(mt,100-i),xt=o(xt,i);var zt=mt/100+1,Wt=xt/100,Pr=O(zt*t(Bt))/Bt,Br=v($e)/v(Pr*M),kr=nt/S,jr=D(Wt*v($e/2)/v(nt/2)),Jr=jr/D(kr*Br*Pr),la=1/(jr*D(kr*Br*Pr));return Eu(Jr,la,Br,Pr,kr)}function lh(){var $e=65*x,nt=60*x,mt=20,xt=200,Bt=b.geoProjectionMutator(bf),zt=Bt($e,nt,mt,xt);return zt.poleline=function(Wt){return arguments.length?Bt($e=+Wt*x,nt,mt,xt):$e*A},zt.parallels=function(Wt){return arguments.length?Bt($e,nt=+Wt*x,mt,xt):nt*A},zt.inflation=function(Wt){return arguments.length?Bt($e,nt,mt=+Wt,xt):mt},zt.ratio=function(Wt){return arguments.length?Bt($e,nt,mt,xt=+Wt):xt},zt.scale(163.775)}function Pc(){return lh().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Ks=4*S+3*D(3),Bl=2*D(2*S*D(3)/Ks),Wu=ke(Bl*D(3)/S,Bl,Ks/6);function wf(){return b.geoProjection(Wu).scale(176.84)}function Qc($e,nt){return[$e*D(1-3*nt*nt/(S*S)),nt]}Qc.invert=function($e,nt){return[$e/D(1-3*nt*nt/(S*S)),nt]};function ku(){return b.geoProjection(Qc).scale(152.63)}function Ol($e,nt){var mt=t(nt),xt=t($e)*mt,Bt=1-xt,zt=t($e=e(v($e)*mt,-v(nt))),Wt=v($e);return mt=D(1-xt*xt),[Wt*mt-zt*Bt,-zt*mt-Wt*Bt]}Ol.invert=function($e,nt){var mt=($e*$e+nt*nt)/-2,xt=D(-mt*(2+mt)),Bt=nt*mt+$e*xt,zt=$e*mt-nt*xt,Wt=D(zt*zt+Bt*Bt);return[e(xt*Bt,Wt*(1+mt)),Wt?-I(xt*zt/Wt):0]};function Nl(){return b.geoProjection(Ol).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function fi($e,nt){var mt=re($e,nt);return[(mt[0]+$e/M)/2,(mt[1]+nt)/2]}fi.invert=function($e,nt){var mt=$e,xt=nt,Bt=25;do{var zt=t(xt),Wt=v(xt),Pr=v(2*xt),Br=Wt*Wt,kr=zt*zt,jr=v(mt),Jr=t(mt/2),la=v(mt/2),xa=la*la,Ba=1-kr*Jr*Jr,an=Ba?O(zt*Jr)*D(wn=1/Ba):wn=0,wn,ii=.5*(2*an*zt*la+mt/M)-$e,Si=.5*(an*Wt+xt)-nt,oi=.5*wn*(kr*xa+an*zt*Jr*Br)+.5/M,Ji=wn*(jr*Pr/4-an*Wt*la),Qi=.125*wn*(Pr*la-an*Wt*kr*jr),Oo=.5*wn*(Br*Jr+an*xa*zt)+.5,Qo=Ji*Qi-Oo*oi,vo=(Si*Ji-ii*Oo)/Qo,ys=(ii*Qi-Si*oi)/Qo;mt-=vo,xt-=ys}while((k(vo)>i||k(ys)>i)&&--Bt>0);return[mt,xt]};function eu(){return b.geoProjection(fi).scale(158.837)}p.geoNaturalEarth=b.geoNaturalEarth1,p.geoNaturalEarthRaw=b.geoNaturalEarth1Raw,p.geoAiry=Q,p.geoAiryRaw=$,p.geoAitoff=ne,p.geoAitoffRaw=re,p.geoArmadillo=G,p.geoArmadilloRaw=se,p.geoAugust=K,p.geoAugustRaw=X,p.geoBaker=Z,p.geoBakerRaw=q,p.geoBerghaus=ae,p.geoBerghausRaw=ee,p.geoBertin1953=Ve,p.geoBertin1953Raw=Ie,p.geoBoggs=Be,p.geoBoggsRaw=Ae,p.geoBonne=Tt,p.geoBonneRaw=gt,p.geoBottomley=$t,p.geoBottomleyRaw=At,p.geoBromley=_r,p.geoBromleyRaw=rr,p.geoChamberlin=Ne,p.geoChamberlinRaw=vt,p.geoChamberlinAfrica=De,p.geoCollignon=Ke,p.geoCollignonRaw=We,p.geoCraig=et,p.geoCraigRaw=Je,p.geoCraster=Pt,p.geoCrasterRaw=pt,p.geoCylindricalEqualArea=qt,p.geoCylindricalEqualAreaRaw=Ct,p.geoCylindricalStereographic=Ht,p.geoCylindricalStereographicRaw=Vt,p.geoEckert1=Kr,p.geoEckert1Raw=Sr,p.geoEckert2=Rt,p.geoEckert2Raw=Yt,p.geoEckert3=ur,p.geoEckert3Raw=nr,p.geoEckert4=Rr,p.geoEckert4Raw=cr,p.geoEckert5=Zr,p.geoEckert5Raw=Qr,p.geoEckert6=Pa,p.geoEckert6Raw=ha,p.geoEisenlohr=Xa,p.geoEisenlohrRaw=un,p.geoFahey=yn,p.geoFaheyRaw=Nn,p.geoFoucaut=li,p.geoFoucautRaw=Un,p.geoFoucautSinusoidal=on,p.geoFoucautSinusoidalRaw=Yn,p.geoGilbert=Yi,p.geoGingery=rt,p.geoGingeryRaw=Ja,p.geoGinzburg4=Tr,p.geoGinzburg4Raw=lr,p.geoGinzburg5=Dr,p.geoGinzburg5Raw=Ir,p.geoGinzburg6=kt,p.geoGinzburg6Raw=ot,p.geoGinzburg8=ar,p.geoGinzburg8Raw=jt,p.geoGinzburg9=xr,p.geoGinzburg9Raw=Er,p.geoGringorten=wa,p.geoGringortenRaw=Lr,p.geoGuyou=Di,p.geoGuyouRaw=Ri,p.geoHammer=we,p.geoHammerRaw=he,p.geoHammerRetroazimuthal=jn,p.geoHammerRetroazimuthalRaw=fn,p.geoHealpix=Hi,p.geoHealpixRaw=qi,p.geoHill=Ro,p.geoHillRaw=Mi,p.geoHomolosine=Wo,p.geoHomolosineRaw=jo,p.geoHufnagel=wo,p.geoHufnagelRaw=to,p.geoHyperelliptical=Xi,p.geoHyperellipticalRaw=Io,p.geoInterrupt=Ss,p.geoInterruptedBoggs=Vs,p.geoInterruptedHomolosine=Bo,p.geoInterruptedMollweide=Pi,p.geoInterruptedMollweideHemispheres=bs,p.geoInterruptedSinuMollweide=hl,p.geoInterruptedSinusoidal=dl,p.geoKavrayskiy7=lu,p.geoKavrayskiy7Raw=wu,p.geoLagrange=Fl,p.geoLagrangeRaw=xc,p.geoLarrivee=uu,p.geoLarriveeRaw=$u,p.geoLaskowski=vs,p.geoLaskowskiRaw=tl,p.geoLittrow=ms,p.geoLittrowRaw=os,p.geoLoximuthal=Fu,p.geoLoximuthalRaw=rl,p.geoMiller=Ku,p.geoMillerRaw=zu,p.geoModifiedStereographic=Ou,p.geoModifiedStereographicRaw=bc,p.geoModifiedStereographicAlaska=wc,p.geoModifiedStereographicGs48=pc,p.geoModifiedStereographicGs50=Nf,p.geoModifiedStereographicMiller=Bu,p.geoModifiedStereographicLee=Tc,p.geoMollweide=ce,p.geoMollweideRaw=_e,p.geoMtFlatPolarParabolic=jf,p.geoMtFlatPolarParabolicRaw=$l,p.geoMtFlatPolarQuartic=Wc,p.geoMtFlatPolarQuarticRaw=Hc,p.geoMtFlatPolarSinusoidal=Yc,p.geoMtFlatPolarSinusoidalRaw=Qu,p.geoNaturalEarth2=Uf,p.geoNaturalEarth2Raw=Nu,p.geoNellHammer=Xc,p.geoNellHammerRaw=al,p.geoInterruptedQuarticAuthalic=Ac,p.geoNicolosi=ec,p.geoNicolosiRaw=Zc,p.geoPatterson=ac,p.geoPattersonRaw=qf,p.geoPolyconic=mf,p.geoPolyconicRaw=Mc,p.geoPolyhedral=Au,p.geoPolyhedralButterfly=Uu,p.geoPolyhedralCollignon=yf,p.geoPolyhedralWaterman=_f,p.geoProject=Vf,p.geoGringortenQuincuncial=Ft,p.geoPeirceQuincuncial=tr,p.geoPierceQuincuncial=tr,p.geoQuantize=Fr,p.geoQuincuncial=vc,p.geoRectangularPolyconic=ea,p.geoRectangularPolyconicRaw=wr,p.geoRobinson=Na,p.geoRobinsonRaw=Ia,p.geoSatellite=Da,p.geoSatelliteRaw=mn,p.geoSinuMollweide=ds,p.geoSinuMollweideRaw=Ao,p.geoSinusoidal=yt,p.geoSinusoidalRaw=Ye,p.geoStitch=ns,p.geoTimes=zo,p.geoTimesRaw=Kn,p.geoTwoPointAzimuthal=zl,p.geoTwoPointAzimuthalRaw=js,p.geoTwoPointAzimuthalUsa=Cl,p.geoTwoPointEquidistant=xl,p.geoTwoPointEquidistantRaw=Kl,p.geoTwoPointEquidistantUsa=Gu,p.geoVanDerGrinten=Su,p.geoVanDerGrintenRaw=Hu,p.geoVanDerGrinten2=Jc,p.geoVanDerGrinten2Raw=mc,p.geoVanDerGrinten3=du,p.geoVanDerGrinten3Raw=oc,p.geoVanDerGrinten4=Ql,p.geoVanDerGrinten4Raw=Jl,p.geoWagner=lh,p.geoWagner7=Pc,p.geoWagnerRaw=bf,p.geoWagner4=wf,p.geoWagner4Raw=Wu,p.geoWagner6=ku,p.geoWagner6Raw=Qc,p.geoWiechel=Nl,p.geoWiechelRaw=Ol,p.geoWinkel3=eu,p.geoWinkel3Raw=fi,Object.defineProperty(p,"__esModule",{value:!0})})}}),Sj=ze({"src/plots/geo/zoom.js"(J,V){"use strict";var p=ci(),b=Nr(),E=mi(),k=Math.PI/180,l=180/Math.PI,e={cursor:"pointer"},t={cursor:"auto"};function n(A,x){var z=A.projection,I;return x._isScoped?I=o:x._isClipped?I=c:I=s,I(A,z)}V.exports=n;function r(A,x){return p.behavior.zoom().translate(x.translate()).scaleExtent(x.scaleExtent()).scale(x.scale())}function a(A,x,z){var I=A.id,O=A.graphDiv,D=O.layout,B=D[I],F=O._fullLayout,P=F[I],j={},U={};function $(Q,re){j[I+"."+Q]=b.nestedProperty(B,Q).get(),E.call("_storeDirectGUIEdit",D,F._preGUI,j);var ne=b.nestedProperty(P,Q);ne.get()!==re&&(ne.set(re),b.nestedProperty(B,Q).set(re),U[I+"."+Q]=re)}z($),$("projection.scale",x.scale()/A.fitScale),$("fitbounds",!1),O.emit("plotly_relayout",U)}function o(A,x){var z=r(A,x);function I(){p.select(this).style(e)}function O(){x.scale(p.event.scale).translate(p.event.translate),A.render(!0);var F=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":F[0],"geo.center.lat":F[1]})}function D(F){var P=x.invert(A.midPt);F("center.lon",P[0]),F("center.lat",P[1])}function B(){p.select(this).style(t),a(A,x,D)}return z.on("zoomstart",I).on("zoom",O).on("zoomend",B),z}function s(A,x){var z=r(A,x),I=2,O,D,B,F,P,j,U,$,Q;function re(H){return x.invert(H)}function ne(H){var Y=re(H);if(!Y)return!0;var q=x(Y);return Math.abs(q[0]-H[0])>I||Math.abs(q[1]-H[1])>I}function se(){p.select(this).style(e);let{x:H,y:Y,width:q,height:Z}=this.getBBox();O=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],D=x.rotate(),B=x.translate(),F=D,P=re(O)}function G(){let{x:H,y:Y,width:q,height:Z}=this.getBBox();if(j=p.event.sourceEvent?p.mouse(this):[H+q/2,Y+Z/2],ne(O)){z.scale(x.scale()),z.translate(x.translate());return}x.scale(p.event.scale),x.translate([B[0],p.event.translate[1]]),P?re(j)&&($=re(j),U=[F[0]+($[0]-P[0]),D[1],D[2]],x.rotate(U),F=U):(O=j,P=re(O)),Q=!0,A.render(!0);var ee=x.rotate(),ae=x.invert(A.midPt);A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.center.lon":ae[0],"geo.center.lat":ae[1],"geo.projection.rotation.lon":-ee[0]})}function X(){p.select(this).style(t),Q&&a(A,x,K)}function K(H){var Y=x.rotate(),q=x.invert(A.midPt);H("projection.rotation.lon",-Y[0]),H("center.lon",q[0]),H("center.lat",q[1])}return z.on("zoomstart",se).on("zoom",G).on("zoomend",X),z}function c(A,x){var z={r:x.rotate(),k:x.scale()},I=r(A,x),O=u(I,"zoomstart","zoom","zoomend"),D=0,B=I.on,F;I.on("zoomstart",function(){p.select(this).style(e);let{x:Q,y:re,width:ne,height:se}=this.getBBox(),G=p.event.sourceEvent?p.mouse(this):[Q+ne/2,re+se/2],X=x.rotate(),K=X,H=x.translate(),Y=h(X);F=m(x,G),B.call(I,"zoom",function(){let{x:q,y:Z,width:ee,height:ae}=this.getBBox(),he=p.event.sourceEvent?p.mouse(this):[q+ee/2,Z+ae/2];if(x.scale(z.k=p.event.scale),!F)G=he,F=m(x,G);else if(m(x,he)){x.rotate(X).translate(H);var xe=m(x,he),we=g(F,xe),Me=C(v(Y,we)),Se=z.r=i(Me,F,K);(!isFinite(Se[0])||!isFinite(Se[1])||!isFinite(Se[2]))&&(Se=K),x.rotate(Se),K=Se}j(O.of(this,arguments))}),P(O.of(this,arguments))}).on("zoomend",function(){p.select(this).style(t),B.call(I,"zoom",null),U(O.of(this,arguments)),a(A,x,$)}).on("zoom.redraw",function(){A.render(!0);var Q=x.rotate();A.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":x.scale()/A.fitScale,"geo.projection.rotation.lon":-Q[0],"geo.projection.rotation.lat":-Q[1]})});function P(Q){D++||Q({type:"zoomstart"})}function j(Q){Q({type:"zoom"})}function U(Q){--D||Q({type:"zoomend"})}function $(Q){var re=x.rotate();Q("projection.rotation.lon",-re[0]),Q("projection.rotation.lat",-re[1])}return p.rebind(I,O,"on")}function m(A,x){var z=A.invert(x);return z&&isFinite(z[0])&&isFinite(z[1])&&_(z)}function h(A){var x=.5*A[0]*k,z=.5*A[1]*k,I=.5*A[2]*k,O=Math.sin(x),D=Math.cos(x),B=Math.sin(z),F=Math.cos(z),P=Math.sin(I),j=Math.cos(I);return[D*F*j+O*B*P,O*F*j-D*B*P,D*B*j+O*F*P,D*F*P-O*B*j]}function v(A,x){var z=A[0],I=A[1],O=A[2],D=A[3],B=x[0],F=x[1],P=x[2],j=x[3];return[z*B-I*F-O*P-D*j,z*F+I*B+O*j-D*P,z*P-I*j+O*B+D*F,z*j+I*P-O*F+D*B]}function g(A,x){if(!(!A||!x)){var z=f(A,x),I=Math.sqrt(T(z,z)),O=.5*Math.acos(Math.max(-1,Math.min(1,T(A,x)))),D=Math.sin(O)/I;return I&&[Math.cos(O),z[2]*D,-z[1]*D,z[0]*D]}}function i(A,x,z){var I=M(x,2,A[0]);I=M(I,1,A[1]),I=M(I,0,A[2]-z[2]);var O=x[0],D=x[1],B=x[2],F=I[0],P=I[1],j=I[2],U=Math.atan2(D,O)*l,$=Math.sqrt(O*O+D*D),Q,re;Math.abs(P)>$?(re=(P>0?90:-90)-U,Q=0):(re=Math.asin(P/$)*l-U,Q=Math.sqrt($*$-P*P));var ne=180-re-2*U,se=(Math.atan2(j,F)-Math.atan2(B,Q))*l,G=(Math.atan2(j,F)-Math.atan2(B,-Q))*l,X=w(z[0],z[1],re,se),K=w(z[0],z[1],ne,G);return X<=K?[re,se,z[2]]:[ne,G,z[2]]}function w(A,x,z,I){var O=S(z-A),D=S(I-x);return Math.sqrt(O*O+D*D)}function S(A){return(A%360+540)%360-180}function M(A,x,z){var I=z*k,O=A.slice(),D=x===0?1:0,B=x===2?1:2,F=Math.cos(I),P=Math.sin(I);return O[D]=A[D]*F-A[B]*P,O[B]=A[B]*F+A[D]*P,O}function C(A){return[Math.atan2(2*(A[0]*A[1]+A[2]*A[3]),1-2*(A[1]*A[1]+A[2]*A[2]))*l,Math.asin(Math.max(-1,Math.min(1,2*(A[0]*A[2]-A[3]*A[1]))))*l,Math.atan2(2*(A[0]*A[3]+A[1]*A[2]),1-2*(A[2]*A[2]+A[3]*A[3]))*l]}function _(A){var x=A[0]*k,z=A[1]*k,I=Math.cos(z);return[I*Math.cos(x),I*Math.sin(x),Math.sin(z)]}function T(A,x){for(var z=0,I=0,O=A.length;I0&&$._module.calcGeoJSON(U,B)}if(!F){var Q=this.updateProjection(D,B);if(Q)return;(!this.viewInitial||this.scope!==P.scope)&&this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(B,P),this.updateDims(B,P),this.updateFx(B,P),s.generalUpdatePerTraceModule(this.graphDiv,this,D,P);var re=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=re.selectAll(".point"),this.dataPoints.text=re.selectAll("text"),this.dataPaths.line=re.selectAll(".js-line");var ne=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=ne.selectAll("path"),this._render()},x.updateProjection=function(D,B){var F=this.graphDiv,P=B[this.id],j=B._size,U=P.domain,$=P.projection,Q=P.lonaxis,re=P.lataxis,ne=Q._ax,se=re._ax,G=this.projection=z(P),X=[[j.l+j.w*U.x[0],j.t+j.h*(1-U.y[1])],[j.l+j.w*U.x[1],j.t+j.h*(1-U.y[0])]],K=P.center||{},H=$.rotation||{},Y=Q.range||[],q=re.range||[];if(P.fitbounds){ne._length=X[1][0]-X[0][0],se._length=X[1][1]-X[0][1],ne.range=h(F,ne),se.range=h(F,se);let ve=[];for(let $t of D){let rr=$t[0].trace;rr.visible===!0&&rr._module.fitCoords&&ve.push(rr._module.fitCoords($t,P))}let le=m(F,ne),Ae=le.min.reduce(($t,{val:rr})=>Math.min($t,rr),1/0),Xe=le.max.reduce(($t,{val:rr})=>Math.max($t,rr),-1/0)-Ae,Ye=_.boundsOfCoords(ve.flat()),[yt,,gt]=Ye||[],Tt=gt-yt;if(!!Ye&&(Xe>360||Xe<360&&TtMath.max(ht,$t(De)),0),Xt=le.max.reduce((ht,De)=>Math.max(ht,rr(De)),0),or=ne._length-_r-Xt,Ot=or>ne._length/10?Tt*ne._length/or:Tt,vt=(yt+gt)/2;ne.range=[vt-Ot/2,vt+Ot/2]}var Z=(ne.range[0]+ne.range[1])/2,ee=(se.range[0]+se.range[1])/2;if(P._isScoped)K={lon:Z,lat:ee};else if(P._isClipped){K={lon:Z,lat:ee},H={lon:Z,lat:ee,roll:H.roll};var ae=$.type,he=C.lonaxisSpan[ae]/2||180,xe=C.lataxisSpan[ae]/2||90;Y=[Z-he,Z+he],q=[ee-xe,ee+xe]}else K={lon:Z,lat:ee},H={lon:Z,lat:H.lat,roll:H.roll}}G.center([K.lon-H.lon,K.lat-H.lat]).rotate([-H.lon,-H.lat,H.roll]).parallels($.parallels);var we=O(Y,q);G.fitExtent(X,we);var Me=this.bounds=G.getBounds(we),Se=this.fitScale=G.scale(),Ie=G.translate();if(G.scaleExtent=()=>{var ve;let{minscale:le}=$,Ae=(ve=$.maxscale)!=null?ve:1/0;return[Se*Math.min(le,Ae),Se*Math.max(le,Ae)]},P.fitbounds){var Ve=G.getBounds(O(ne.range,se.range)),Ge=Math.min((Me[1][0]-Me[0][0])/(Ve[1][0]-Ve[0][0]),(Me[1][1]-Me[0][1])/(Ve[1][1]-Ve[0][1]));isFinite(Ge)?G.scale(Ge*Se):t.warn("Something went wrong during"+this.id+"fitbounds computations.")}else G.scale($.scale*Se);var ke=this.midPt=[(Me[0][0]+Me[1][0])/2,(Me[0][1]+Me[1][1])/2];if(G.translate([Ie[0]+(ke[0]-Ie[0]),Ie[1]+(ke[1]-Ie[1])]).clipExtent(Me),P._isAlbersUsa){var _e=G([K.lon,K.lat]);if(_e){var ce=G.translate();G.translate([ce[0]-(_e[0]-ce[0]),ce[1]-(_e[1]-ce[1])])}}},x.updateBaseLayers=function(D,B){var F=this,P=F.topojson,j=F.layers,U=F.basePaths;function $(X){return X==="lonaxis"||X==="lataxis"}function Q(X){return!!C.lineLayers[X]}function re(X){return!!C.fillLayers[X]}var ne=this.hasChoropleth?C.layersForChoropleth:C.layers,se=ne.filter(function(X){return Q(X)||re(X)?B["show"+X]:$(X)?B[X].showgrid:!0}),G=F.framework.selectAll(".layer").data(se,String);G.exit().each(function(X){delete j[X],delete U[X],p.select(this).remove()}),G.enter().append("g").attr("class",function(X){return"layer "+X}).each(function(X){var K=j[X]=p.select(this);X==="bg"?F.bgRect=K.append("rect").style("pointer-events","all"):$(X)?U[X]=K.append("path").style("fill","none"):X==="backplot"?K.append("g").classed("choroplethlayer",!0):X==="frontplot"?K.append("g").classed("scatterlayer",!0):Q(X)?U[X]=K.append("path").style("fill","none").style("stroke-miterlimit",2):re(X)&&(U[X]=K.append("path").style("stroke","none"))}),G.order(),G.each(function(X){var K=U[X],H=C.layerNameToAdjective[X];X==="frame"?K.datum(C.sphereSVG):Q(X)||re(X)?K.datum(u(P,P.objects[X])):$(X)&&K.datum(I(X,B,D)).call(r.stroke,B[X].gridcolor).call(a.dashLine,B[X].griddash,B[X].gridwidth),Q(X)?K.call(r.stroke,B[H+"color"]).call(a.dashLine,"",B[H+"width"]):re(X)&&K.call(r.fill,B[H+"color"])})},x.updateDims=function(D,B){var F=this.bounds,P=(B.framewidth||0)/2,j=F[0][0]-P,U=F[0][1]-P,$=F[1][0]-j+P,Q=F[1][1]-U+P;a.setRect(this.clipRect,j,U,$,Q),this.bgRect.call(a.setRect,j,U,$,Q).call(r.fill,B.bgcolor),this.xaxis._offset=j,this.xaxis._length=$,this.yaxis._offset=U,this.yaxis._length=Q},x.updateFx=function(D,B){var F=this,P=F.graphDiv,j=F.bgRect,U=D.dragmode,$=D.clickmode;if(F.isStatic)return;function Q(){var G=F.viewInitial,X={};for(var K in G)X[F.id+"."+K]=G[K];e.call("_guiRelayout",P,X),P.emit("plotly_doubleclick",null)}function re(G){return F.projection.invert([G[0]+F.xaxis._offset,G[1]+F.yaxis._offset])}var ne=function(G,X){if(X.isRect){var K=G.range={};K[F.id]=[re([X.xmin,X.ymin]),re([X.xmax,X.ymax])]}else{var H=G.lassoPoints={};H[F.id]=X.map(re)}},se={element:F.bgRect.node(),gd:P,plotinfo:{id:F.id,xaxis:F.xaxis,yaxis:F.yaxis,fillRangeItems:ne},xaxes:[F.xaxis],yaxes:[F.yaxis],subplot:F.id,clickFn:function(G){G===2&&w(P)}};if(U==="pan"){j.node().onmousedown=null;let G=M(F,B);if(j.call(G),!p.event){let X=F.projection.scale(),[K,H]=F.projection.scaleExtent();(XH)&&G.event(j)}j.on("dblclick.zoom",Q),P._context._scrollZoom.geo||j.on("wheel.zoom",null)}else(U==="select"||U==="lasso")&&(j.on(".zoom",null),se.prepFn=function(G,X,K){i(G,X,K,se,U)},g.init(se));j.on("mousemove",function(){var G=F.projection.invert(t.getPositionFromD3Event());if(!G)return g.unhover(P,p.event);F.xaxis.p2c=function(){return G[0]},F.yaxis.p2c=function(){return G[1]},o.hover(P,p.event,F.id)}),j.on("mouseout",function(){P._dragging||g.unhover(P,p.event)}),j.on("click",function(){U!=="select"&&U!=="lasso"&&($.indexOf("select")>-1&&S(p.event,P,[F.xaxis],[F.yaxis],F.id,se),$.indexOf("event")>-1&&o.click(P,p.event))})},x.makeFramework=function(){var D=this,B=D.graphDiv,F=B._fullLayout,P="clip"+F._uid+D.id;D.clipDef=F._clips.append("clipPath").attr("id",P),D.clipRect=D.clipDef.append("rect"),D.framework=p.select(D.container).append("g").attr("class","geo "+D.id).call(a.setClipUrl,P,B),D.project=function(j){var U=D.projection(j);return U?[U[0]-D.xaxis._offset,U[1]-D.yaxis._offset]:[null,null]},D.xaxis={_id:"x",c2p:function(j){return D.project(j)[0]}},D.yaxis={_id:"y",c2p:function(j){return D.project(j)[1]}},D.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},c.setConvert(D.mockAxis,F)},x.saveViewInitial=function(D){var B=D.center||{},F=D.projection,P=F.rotation||{};this.viewInitial={fitbounds:D.fitbounds,"projection.scale":F.scale};var j;D._isScoped?j={"center.lon":B.lon,"center.lat":B.lat}:D._isClipped?j={"projection.rotation.lon":P.lon,"projection.rotation.lat":P.lat,"center.lon":B.lon,"center.lat":B.lat}:j={"center.lon":B.lon,"center.lat":B.lat,"projection.rotation.lon":P.lon},t.extendFlat(this.viewInitial,j)},x.render=function(D){this._hasMarkerAngles&&D?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},x._render=function(){var D=this.projection,B=D.getPath(),F;function P(U){var $=D(U.lonlat);return $?n($[0],$[1]):null}function j(U){return D.isLonLatOverEdges(U.lonlat)?"none":null}for(F in this.basePaths)this.basePaths[F].attr("d",B);for(F in this.dataPaths)this.dataPaths[F].attr("d",function(U){return B(U.geojson)});for(F in this.dataPoints)this.dataPoints[F].attr("display",j).attr("transform",P)};function z(D){var B=D.projection,F=B.type,P=C.projNames[F];P="geo"+t.titleCase(P);for(var j=b[P]||l[P],U=j(),$=D._isSatellite?Math.acos(1/B.distance)*180/Math.PI:D._isClipped?C.lonaxisSpan[F]/2:null,Q=["center","rotate","parallels","clipExtent"],re=function(G){return G?U:[]},ne=0;neH}else return!1},U.getPath=function(){return E().projection(U)},U.getBounds=function(G){return U.getPath().bounds(G)},U.precision(C.precision),D._isSatellite&&U.tilt(B.tilt).distance(B.distance),$&&U.clipAngle($-C.clipPad),U}function I(D,B,F){var P=1e-6,j=2.5,U=B[D],$=C.scopeDefaults[B.scope],Q,re,ne;D==="lonaxis"?(Q=$.lonaxisRange,re=$.lataxisRange,ne=function(ee,ae){return[ee,ae]}):D==="lataxis"&&(Q=$.lataxisRange,re=$.lonaxisRange,ne=function(ee,ae){return[ae,ee]});var se={type:"linear",range:[Q[0],Q[1]-P],tick0:U.tick0,dtick:U.dtick};c.setConvert(se,F);var G=c.calcTicks(se);!B.isScoped&&D==="lonaxis"&&G.pop();for(var X=G.length,K=new Array(X),H=0;Hhe[xe]!=null)||l.fitboundsIncompatible.has(i)?a.fitbounds=!1:ee.forEach(({dst:he,key:xe})=>he&&(he[xe]=null))}}}}),RA=ze({"src/plots/geo/index.js"(J,V){"use strict";var p=zf().getSubplotCalcData,b=Nr().counterRegex,E=Ej(),k="geo",l=b(k),e={};e[k]={valType:"subplotid",dflt:k,editType:"calc"};function t(a){for(var o=a._fullLayout,s=a.calcdata,c=o._subplots[k],m=0;m")}}}}),FA=ze({"src/traces/choropleth/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){b.location=E.location,b.z=E.z;var t=l[e];return t.fIn&&t.fIn.properties&&(b.properties=t.fIn.properties),b.ct=t.ct,b}}}),zA=ze({"src/traces/choropleth/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r,a,o,s;if(E===!1)for(n=0;n=Math.min(U,$)&&g<=Math.max(U,$)?0:1/0}if(I=Math.min(Q,re)&&i<=Math.max(Q,re)?0:1/0}B=Math.sqrt(I*I+O*O),u=S[z]}}}else for(z=S.length-1;z>-1;z--)f=S[z],A=h[f],x=v[f],I=c.c2p(A)-g,O=m.c2p(x)-i,D=Math.sqrt(I*I+O*O),D100},J.isDotSymbol=function(p){return typeof p=="string"?V.DOT_RE.test(p):p>200}}}),Dj=ze({"src/traces/scattergl/defaults.js"(J,V){"use strict";var p=Nr(),b=mi(),E=D2(),k=ty(),l=zd(),e=el(),t=Gv(),n=yd(),r=id(),a=_d(),o=Od(),s=xd();V.exports=function(m,h,v,g){function i(u,A){return p.coerce(m,h,k,u,A)}var w=m.marker?E.isOpenSymbol(m.marker.symbol):!1,S=e.isBubble(m),M=t(m,h,g,i);if(!M){h.visible=!1;return}n(m,h,g,i),i("xhoverformat"),i("yhoverformat");var C=M>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>=0?(s=c,o=c-1):a=c+1}return s}function b(t,n,r,a,o){for(var s=o+1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h>0?(s=c,o=c-1):a=c+1}return s}function E(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<0?(s=c,a=c+1):o=c-1}return s}function k(t,n,r,a,o){for(var s=a-1;a<=o;){var c=a+o>>>1,m=t[c],h=r!==void 0?r(m,n):m-n;h<=0?(s=c,a=c+1):o=c-1}return s}function l(t,n,r,a,o){for(;a<=o;){var s=a+o>>>1,c=t[s],m=r!==void 0?r(c,n):c-n;if(m===0)return s;m<=0?a=s+1:o=s-1}return-1}function e(t,n,r,a,o,s){return typeof r=="function"?s(t,n,r,a===void 0?0:a|0,o===void 0?t.length-1:o|0):s(t,n,void 0,r===void 0?0:r|0,a===void 0?t.length-1:a|0)}V.exports={ge:function(t,n,r,a,o){return e(t,n,r,a,o,p)},gt:function(t,n,r,a,o){return e(t,n,r,a,o,b)},lt:function(t,n,r,a,o){return e(t,n,r,a,o,E)},le:function(t,n,r,a,o){return e(t,n,r,a,o,k)},eq:function(t,n,r,a,o){return e(t,n,r,a,o,l)}}}}),BA=ze({"node_modules/clamp/index.js"(J,V){V.exports=p;function p(b,E,k){return Ek?k:b:bE?E:b}}}),qd=ze({"node_modules/pick-by-alias/index.js"(J,V){"use strict";V.exports=function(k,l,e){var t={},n,r;if(typeof l=="string"&&(l=b(l)),Array.isArray(l)){var a={};for(r=0;r1&&(E=arguments),typeof E=="string"?E=E.split(/\s/).map(parseFloat):typeof E=="number"&&(E=[E]),E.length&&typeof E[0]=="number"?E.length===1?k={width:E[0],height:E[0],x:0,y:0}:E.length===2?k={width:E[0],height:E[1],x:0,y:0}:k={x:E[0],y:E[1],width:E[2]-E[0]||0,height:E[3]-E[1]||0}:E&&(E=p(E,{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"}),k={x:E.left||0,y:E.top||0},E.width==null?E.right?k.width=E.right-k.x:k.width=0:k.width=E.width,E.height==null?E.bottom?k.height=E.bottom-k.y:k.height=0:k.height=E.height),k}}}),c0=ze({"node_modules/array-bounds/index.js"(J,V){"use strict";V.exports=p;function p(b,E){if(!b||b.length==null)throw Error("Argument should be an array");E==null?E=1:E=Math.floor(E);for(var k=Array(E*2),l=0;le&&(e=b[n]),b[n]>>1,S;h.dtype||(h.dtype="array"),typeof h.dtype=="string"?S=new(r(h.dtype))(w):h.dtype&&(S=h.dtype,Array.isArray(S)&&(S.length=w));for(let I=0;Iv||P>o){for(let Y=0;Yae||$>he||Q=ne||Z===ee)return;let xe=M[q];ee===void 0&&(ee=xe.length);for(let ce=Z;ce=B&&le<=P&&Ae>=F&&Ae<=j&&se.push(ve)}let we=C[q],Me=we[Z*4+0],Se=we[Z*4+1],Ie=we[Z*4+2],Ve=we[Z*4+3],Ge=X(we,Z+1),ke=Y*.5,_e=q+1;G(K,H,ke,_e,Me,Se||Ie||Ve||Ge),G(K,H+ke,ke,_e,Se,Ie||Ve||Ge),G(K+ke,H,ke,_e,Ie,Ve||Ge),G(K+ke,H+ke,ke,_e,Ve,Ge)}function X(K,H){let Y=null,q=0;for(;Y===null;)if(Y=K[H*4+q],q++,q>K.length)return null;return Y}return se}function x(I,O,D,B,F){let P=[];for(let j=0;j2&&(t.push([r].concat(a.splice(0,2))),o="l",r=r=="m"?"l":"L");;){if(a.length==p[o])return a.unshift(r),t.push(a);if(a.length1&&(m=1),m<-1&&(m=-1),c*Math.acos(m)},e=function(r,a,o,s,c,m,h,v,g,i,w,S){var M=Math.pow(c,2),C=Math.pow(m,2),_=Math.pow(w,2),T=Math.pow(S,2),f=M*C-M*T-C*_;f<0&&(f=0),f/=M*T+C*_,f=Math.sqrt(f)*(h===v?-1:1);var u=f*c/m*S,A=f*-m/c*w,x=i*u-g*A+(r+o)/2,z=g*u+i*A+(a+s)/2,I=(w-u)/c,O=(S-A)/m,D=(-w-u)/c,B=(-S-A)/m,F=l(1,0,I,O),P=l(I,O,D,B);return v===0&&P>0&&(P-=b),v===1&&P<0&&(P+=b),[x,z,F,P]},t=function(r){var a=r.px,o=r.py,s=r.cx,c=r.cy,m=r.rx,h=r.ry,v=r.xAxisRotation,g=v===void 0?0:v,i=r.largeArcFlag,w=i===void 0?0:i,S=r.sweepFlag,M=S===void 0?0:S,C=[];if(m===0||h===0)return[];var _=Math.sin(g*b/360),T=Math.cos(g*b/360),f=T*(a-s)/2+_*(o-c)/2,u=-_*(a-s)/2+T*(o-c)/2;if(f===0&&u===0)return[];m=Math.abs(m),h=Math.abs(h);var A=Math.pow(f,2)/Math.pow(m,2)+Math.pow(u,2)/Math.pow(h,2);A>1&&(m*=Math.sqrt(A),h*=Math.sqrt(A));var x=e(a,o,s,c,m,h,w,M,_,T,f,u),z=p(x,4),I=z[0],O=z[1],D=z[2],B=z[3],F=Math.abs(B)/(b/4);Math.abs(1-F)<1e-7&&(F=1);var P=Math.max(Math.ceil(F),1);B/=P;for(var j=0;j4?(n=i[i.length-4],r=i[i.length-3]):(n=m,r=h),t.push(i)}return t}function E(l,e,t,n){return["C",l,e,t,n,t,n]}function k(l,e,t,n,r,a){return["C",l/3+2/3*t,e/3+2/3*n,r/3+2/3*t,a/3+2/3*n,r,a]}}}),OA=ze({"node_modules/is-svg-path/index.js"(J,V){"use strict";V.exports=function(b){return typeof b!="string"?!1:(b=b.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(b)&&/[\dz]$/i.test(b)&&b.length>4))}}}),Hj=ze({"node_modules/svg-path-bounds/index.js"(J,V){"use strict";var p=Uj(),b=qj(),E=Gj(),k=OA();V.exports=l;function l(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!k(e))throw Error("String is not an SVG path.");e=p(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=b(e),e=E(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],n=0,r=e.length;nt[2]&&(t[2]=a[o+0]),a[o+1]>t[3]&&(t[3]=a[o+1]);return t}}}),Wj=ze({"node_modules/bitmap-sdf/index.js"(J,V){"use strict";V.exports=b;var p=1e20;function b(l,e){e||(e={});var t=e.cutoff==null?.25:e.cutoff,n=e.radius==null?8:e.radius,r=e.channel||0,a,o,s,c,m,h,v,g,i,w,S;if(ArrayBuffer.isView(l)||Array.isArray(l)){if(!e.width||!e.height)throw Error("For raw data width and height should be provided by options");a=e.width,o=e.height,c=l,e.stride?h=e.stride:h=Math.floor(l.length/a/o)}else window.HTMLCanvasElement&&l instanceof window.HTMLCanvasElement?(g=l,v=g.getContext("2d"),a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.CanvasRenderingContext2D&&l instanceof window.CanvasRenderingContext2D?(g=l.canvas,v=l,a=g.width,o=g.height,i=v.getImageData(0,0,a,o),c=i.data,h=4):window.ImageData&&l instanceof window.ImageData&&(i=l,a=l.width,o=l.height,c=i.data,h=4);if(s=Math.max(a,o),window.Uint8ClampedArray&&c instanceof window.Uint8ClampedArray||window.Uint8Array&&c instanceof window.Uint8Array)for(m=c,c=Array(a*o),w=0,S=Math.floor(m.length/h);wYj});function Yj(J,V={}){if(!(0,UA.default)(J))throw Error("Invalid SVG path");let p,b;V.shape||Array.isArray(V)?[p,b]=V.shape||V:(p=ry.width=V.width||V.w||200,b=ry.height=V.height||V.h||200);let E=Math.min(p,b),k=V.stroke||0,l=V.viewbox||V.viewBox||(0,jA.default)(J),e=[p/(l[2]-l[0]),b/(l[3]-l[1])],t=Math.min(e[0]||0,e[1]||0)/2;Vh.fillStyle="black",Vh.fillRect(0,0,p,b),Vh.fillStyle="white",k&&(typeof k!="number"&&(k=1),Vh.strokeStyle=k>0?"white":"black",Vh.lineWidth=Math.abs(k)),Vh.translate(p*.5,b*.5),Vh.scale(t,t);let n=new Path2D(J);return Vh.fill(n),k&&Vh.stroke(n),Vh.setTransform(1,0,0,1,0,0),(0,qA.default)(Vh,{cutoff:V.cutoff!=null?V.cutoff:.5,radius:V.radius!=null?V.radius:E*.5})}var jA,UA,qA,ry,Vh,Xj=zi({"node_modules/svg-path-sdf/svg-path-sdf.js"(){jA=Yl(Hj()),UA=Yl(OA()),qA=Yl(Wj()),ry=document.createElement("canvas"),Vh=ry.getContext("2d",{willReadFrequently:!0})}}),h0=ze({"src/traces/scattergl/convert.js"(J,V){"use strict";var p=ao(),b=(Xj(),Po(NA)).default,{normalize:E}=Qn(),k=mi(),l=Nr(),e=l.isArrayOrTypedArray,t=$i(),n=Xl(),r=fp().formatColor,a=el(),o=l1(),s=D2(),c=bv(),m=np().DESELECTDIM,h={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},v=kh().appendArrayPointValue;function g(B,F){var P,j={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},U=B._context.plotGlPixelRatio;if(F.visible!==!0)return j;if(a.hasText(F)&&(j.text=i(B,F),j.textSel=C(B,F,F.selected),j.textUnsel=C(B,F,F.unselected)),a.hasMarkers(F)&&(j.marker=S(B,F),j.markerSel=M(B,F,F.selected),j.markerUnsel=M(B,F,F.unselected),!F.unselected&&e(F.marker.opacity))){var $=F.marker.opacity;for(j.markerUnsel.opacity=new Array($.length),P=0;P<$.length;P++)j.markerUnsel.opacity[P]=m*$[P]}if(a.hasLines(F)){j.line={overlay:!0,thickness:F.line.width*U,color:F.line.color,opacity:F.opacity};var Q=(c.DASHES[F.line.dash]||[1]).slice();for(P=0;P500?"bold":"normal":B}function S(B,F){var P=F._length,j=F.marker,U={},$,Q=e(j.symbol),re=e(j.angle),ne=e(j.color),se=e(j.line.color),G=e(j.opacity),X=e(j.size),K=e(j.line.width),H;if(Q||(H=s.isOpenSymbol(j.symbol)),Q||ne||se||G||re){U.symbols=new Array(P),U.angles=new Array(P),U.colors=new Array(P),U.borderColors=new Array(P);var Y=j.symbol,q=j.angle,Z=r(j,j.opacity,P),ee=r(j.line,j.opacity,P);if(!e(ee[0])){var ae=ee;for(ee=Array(P),$=0;$c.TOO_MANY_POINTS||a.hasMarkers(F)?"rect":"round";if(se&&F.connectgaps){var X=$[0],K=$[1];for(Q=0;Q<$.length;Q+=2)isNaN($[Q])||isNaN($[Q+1])?($[Q]=X,$[Q+1]=K):(X=$[Q],K=$[Q+1])}return{join:G,positions:$}}function O(B,F,P,j,U){var $=k.getComponentMethod("errorbars","makeComputeError"),Q=n.getFromId(B,F.xaxis,"x"),re=n.getFromId(B,F.yaxis,"y"),ne=P.length/2,se={};function G(X,K){var H=K._id.charAt(0),Y=F["error_"+H];if(Y&&Y.visible&&(K.type==="linear"||K.type==="log")){for(var q=$(Y),Z={x:0,y:1}[H],ee={x:[0,1,2,3],y:[2,3,0,1]}[H],ae=new Float64Array(4*ne),he=1/0,xe=-1/0,we=0,Me=0;we1?ne[Q]:ne[0]:ne,H=e(se)?se.length>1?se[Q]:se[0]:se,Y=h[K],q=h[H],Z=G?G/.8+1:0,ee=-q*Z-q*.5;$.offset[Q]=[Y*Z/X,ee/X]}}return $}V.exports={style:g,markerStyle:S,markerSelection:M,linePositions:I,errorBarPositions:O,textPosition:D}}}),VA=ze({"src/traces/scattergl/scene_update.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=k._scene,e={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},t={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return k._scene||(l=k._scene={},l.init=function(){p.extendFlat(l,t,e)},l.init(),l.update=function(r){var a=p.repeat(r,l.count);if(l.fill2d&&l.fill2d.update(a),l.scatter2d&&l.scatter2d.update(a),l.line2d&&l.line2d.update(a),l.error2d&&l.error2d.update(a.concat(a)),l.select2d&&l.select2d.update(a),l.glText)for(var o=0;o=m,u=T*2,A={},x,z=M.makeCalcdata(w,"x"),I=C.makeCalcdata(w,"y"),O=l(w,M,"x",z),D=l(w,C,"y",I),B=O.vals,F=D.vals;w._x=B,w._y=F,w.xperiodalignment&&(w._origX=z,w._xStarts=O.starts,w._xEnds=O.ends),w.yperiodalignment&&(w._origY=I,w._yStarts=D.starts,w._yEnds=D.ends);var P=new Array(u),j=new Array(T);for(x=0;x1&&b.extendFlat(_.line,o.linePositions(g,w,S)),_.errorX||_.errorY){var T=o.errorBarPositions(g,w,S,M,C);_.errorX&&b.extendFlat(_.errorX,T.x),_.errorY&&b.extendFlat(_.errorY,T.y)}return _.text&&(b.extendFlat(_.text,{positions:S},o.textPosition(g,w,_.text,_.marker)),b.extendFlat(_.textSel,{positions:S},o.textPosition(g,w,_.text,_.markerSel)),b.extendFlat(_.textUnsel,{positions:S},o.textPosition(g,w,_.text,_.markerUnsel))),_}}}),GA=ze({"src/traces/scattergl/edit_style.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=np().DESELECTDIM;function k(l){var e=l[0],t=e.trace,n=e.t,r=n._scene,a=n.index,o=r.selectBatch[a],s=r.unselectBatch[a],c=r.textOptions[a],m=r.textSelectedOptions[a]||{},h=r.textUnselectedOptions[a]||{},v=p.extendFlat({},c),g,i;if(o.length||s.length){var w=m.color,S=h.color,M=c.color,C=p.isArrayOrTypedArray(M);for(v.color=new Array(t._length),g=0;g10&&/[0-9](?:\s|\/)/.test(k)&&(e=k.match(/([0-9]+)/g).map(function(m){return parseFloat(m)}),n=k.match(/([a-z])/ig).join("").toLowerCase());else isNaN(k)?Array.isArray(k)||k.length?(e=[k[0],k[1],k[2]],n="rgb",t=k.length===4?k[3]:1):k instanceof Object&&(k.r!=null||k.red!=null||k.R!=null?(n="rgb",e=[k.r||k.red||k.R||0,k.g||k.green||k.G||0,k.b||k.blue||k.B||0]):(n="hsl",e=[k.h||k.hue||k.H||0,k.s||k.saturation||k.S||0,k.l||k.lightness||k.L||k.b||k.brightness]),t=k.a||k.alpha||k.opacity||1,k.opacity!=null&&(t/=100)):(n="rgb",e=[k>>>16,(k&65280)>>>8,k&255]);return{space:n,values:e,alpha:t}}}}),Qj=ze({"node_modules/color-rgba/index.js"(J,V){"use strict";var p=Jj();V.exports=function(k){Array.isArray(k)&&k.raw&&(k=String.raw.apply(null,arguments));var l,e,t,n=p(k);if(!n.space)return[];var r=[0,0,0],a=n.space[0]==="h"?[360,100,100]:[255,255,255];return l=Array(3),l[0]=Math.min(Math.max(n.values[0],r[0]),a[0]),l[1]=Math.min(Math.max(n.values[1],r[1]),a[1]),l[2]=Math.min(Math.max(n.values[2],r[2]),a[2]),n.space[0]==="h"&&(l=b(l)),l.push(Math.min(Math.max(n.alpha,0),1)),l};function b(E){var k=E[0]/360,l=E[1]/100,e=E[2]/100,t,n,r,a,o,s=0;if(l===0)return o=e*255,[o,o,o];for(n=e<.5?e*(1+l):e+l-e*l,t=2*e-n,a=[0,0,0];s<3;)r=k+1/3*-(s-1),r<0?r++:r>1&&r--,o=6*r<1?t+(n-t)*6*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,a[s++]=o*255;return a}}}),ay=ze({"node_modules/color-normalize/index.js"(J,V){"use strict";var p=Qj(),b=F2();V.exports=function(l,e){(e==="float"||!e)&&(e="array"),e==="uint"&&(e="uint8"),e==="uint_clamped"&&(e="uint8_clamped");var t=b(e),n=new t(4),r=e!=="uint8"&&e!=="uint8_clamped";return(!l.length||typeof l=="string")&&(l=p(l),l[0]/=255,l[1]/=255,l[2]/=255),E(l)?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:255,r&&(n[0]/=255,n[1]/=255,n[2]/=255,n[3]/=255),n):(r?(n[0]=l[0],n[1]=l[1],n[2]=l[2],n[3]=l[3]!=null?l[3]:1):(n[0]=Math.min(Math.max(Math.floor(l[0]*255),0),255),n[1]=Math.min(Math.max(Math.floor(l[1]*255),0),255),n[2]=Math.min(Math.max(Math.floor(l[2]*255),0),255),n[3]=l[3]==null?255:Math.min(Math.max(Math.floor(l[3]*255),0),255)),n)};function E(k){return!!(k instanceof Uint8Array||k instanceof Uint8ClampedArray||Array.isArray(k)&&(k[0]>1||k[0]===0)&&(k[1]>1||k[1]===0)&&(k[2]>1||k[2]===0)&&(!k[3]||k[3]>1))}}}),eU=ze({"node_modules/color-id/index.js"(J,V){"use strict";var p=BA();V.exports=b,V.exports.to=b,V.exports.from=E;function b(k,l){l==null&&(l=!0);var e=k[0],t=k[1],n=k[2],r=k[3];r==null&&(r=l?1:255),l&&(e*=255,t*=255,n*=255,r*=255),e=p(e,0,255)&255,t=p(t,0,255)&255,n=p(n,0,255)&255,r=p(r,0,255)&255;var a=e*16777216+(t<<16)+(n<<8)+r;return a}function E(k,l){k=+k;var e=k>>>24,t=(k&16711680)>>>16,n=(k&65280)>>>8,r=k&255;return l===!1?[e,t,n,r]:[e/255,t/255,n/255,r/255]}}}),tU=ze({"node_modules/glslify/browser.js"(J,V){V.exports=function(p){typeof p=="string"&&(p=[p]);for(var b=[].slice.call(arguments,1),E=[],k=0;k[this.tooManyColors?0:_,g.height],pixelRatio:m.context("pixelRatio"),scale:m.prop("scale"),scaleFract:m.prop("scaleFract"),translate:m.prop("translate"),translateFract:m.prop("translateFract"),markerTexture:m.prop("markerTexture"),paletteTexture:g},attributes:{x:(x,z)=>z.xAttr||{buffer:z.positionBuffer,stride:8,offset:0},y:(x,z)=>z.yAttr||{buffer:z.positionBuffer,stride:8,offset:4},xFract:(x,z)=>z.xAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:0},yFract:(x,z)=>z.yAttr?{constant:[0,0]}:{buffer:z.positionFractBuffer,stride:8,offset:4},size:(x,z)=>z.size.length?{buffer:z.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(z.size*255/this.maxSize)]},borderSize:(x,z)=>z.borderSize.length?{buffer:z.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(z.borderSize*255/this.maxSize)]},colorId:(x,z)=>z.color.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?i.slice(z.color*4,z.color*4+4):[z.color]},borderColorId:(x,z)=>z.borderColor.length?{buffer:z.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?i.slice(z.borderColor*4,z.borderColor*4+4):[z.borderColor]},isActive:(x,z)=>z.activation===!0?{constant:[1]}:z.activation?z.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:m.prop("viewport")},viewport:m.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:m.prop("elements"),count:m.prop("count"),offset:m.prop("offset"),primitive:"points"},u=Object.assign({},f);u.frag=l([`precision highp float; #define GLSLIFY 1 uniform float opacity; @@ -2030,7 +2031,7 @@ void main() { } } -`]),ee.vert=d([`precision highp float; +`]),u.vert=l([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; @@ -2098,7 +2099,7 @@ void main() { fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); } -`]),this.drawMarker=b(ee);var te=f({},Y);te.frag=d([`precision highp float; +`]),this.drawMarker=m(u);let A=Object.assign({},f);A.frag=l([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor, fragBorderColor; @@ -2129,7 +2130,7 @@ void main() { color.a *= alpha * opacity; gl_FragColor = color; } -`]),te.vert=d([`precision highp float; +`]),A.vert=l([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; @@ -2193,8 +2194,8 @@ void main() { fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } -`]),M&&(te.frag=te.frag.replace("smoothstep","smoothStep"),ee.frag=ee.frag.replace("smoothstep","smoothStep")),this.drawCircle=b(te)}A.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},A.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},A.prototype.draw=function(){for(var b=this,_=arguments.length,I=new Array(_),C=0;C<_;C++)I[C]=arguments[C];var F=this.groups;if(I.length===1&&Array.isArray(I[0])&&(I[0][0]===null||Array.isArray(I[0][0]))&&(I=I[0]),this.regl._refresh(),I.length)for(var R=0;Rle)?he.tree=p(xe,{bounds:je}):le&&le.length&&(he.tree=le),he.tree){var ut={primitive:"points",usage:"static",data:he.tree,type:"uint32"};he.elements?he.elements(ut):he.elements=z.elements(ut)}var st=T.float32(xe);ne({data:st,usage:"dynamic"});var yt=T.fract32(xe,st);return be({data:yt,usage:"dynamic"}),Fe({data:new Uint8Array(Ve),type:"uint8",usage:"stream"}),xe}},{marker:function(xe,he,oe){var le=he.activation;if(le.forEach(function(yt){return yt&&yt.destroy&&yt.destroy()}),le.length=0,!xe||typeof xe[0]=="number"){var ne=b.addMarker(xe);le[ne]=!0}else{for(var be=[],Fe=0,Ve=Math.min(xe.length,he.count);Fe=0)return F;var R;if(b instanceof Uint8Array||b instanceof Uint8ClampedArray)R=b;else{R=new Uint8Array(b.length);for(var z=0,D=b.length;zC*4&&(this.tooManyColors=!0),this.updatePalette(I),F.length===1?F[0]:F},A.prototype.updatePalette=function(b){if(!this.tooManyColors){var _=this.maxColors,I=this.paletteTexture,C=Math.ceil(b.length*.25/_);if(C>1){b=b.slice();for(var F=b.length*.25%_;F80*k){ee=ae=z[0],te=U=z[1];for(var $=k;$ae&&(ae=H),K>U&&(U=K);V=Math.max(ae-ee,U-te),V=V!==0?32767/V:0}return S(q,Y,k,ee,te,V,0),Y}function v(z,D,k,B,O){var q,Y;if(O===R(z,D,k,B)>0)for(q=D;q=D;q-=B)Y=I(q,z[q],z[q+1],Y);return Y&&T(Y,Y.next)&&(C(Y),Y=Y.next),Y}function w(z,D){if(!z)return z;D||(D=z);var k=z,B;do if(B=!1,!k.steiner&&(T(k,k.next)||M(k.prev,k,k.next)===0)){if(C(k),k=D=k.prev,k===k.next)break;B=!0}else k=k.next;while(B||k!==D);return D}function S(z,D,k,B,O,q,Y){if(z){!Y&&q&&p(z,B,O,q);for(var ee=z,te,ae;z.prev!==z.next;){if(te=z.prev,ae=z.next,q?e(z,B,O,q):l(z)){D.push(te.i/k|0),D.push(z.i/k|0),D.push(ae.i/k|0),C(z),z=ae.next,ee=ae.next;continue}if(z=ae,z===ee){Y?Y===1?(z=t(w(z),D,k),S(z,D,k,B,O,q,2)):Y===2&&a(z,D,k,B,O,q):S(w(z),D,k,B,O,q,1);break}}}}function l(z){var D=z.prev,k=z,B=z.next;if(M(D,k,B)>=0)return!1;for(var O=D.x,q=k.x,Y=B.x,ee=D.y,te=k.y,ae=B.y,U=Oq?O>Y?O:Y:q>Y?q:Y,V=ee>te?ee>ae?ee:ae:te>ae?te:ae,$=B.next;$!==D;){if($.x>=U&&$.x<=K&&$.y>=H&&$.y<=V&&o(O,ee,q,te,Y,ae,$.x,$.y)&&M($.prev,$,$.next)>=0)return!1;$=$.next}return!0}function e(z,D,k,B){var O=z.prev,q=z,Y=z.next;if(M(O,q,Y)>=0)return!1;for(var ee=O.x,te=q.x,ae=Y.x,U=O.y,H=q.y,K=Y.y,V=eete?ee>ae?ee:ae:te>ae?te:ae,Z=U>H?U>K?U:K:H>K?H:K,Q=d(V,$,D,k,B),re=d(X,Z,D,k,B),ce=z.prevZ,me=z.nextZ;ce&&ce.z>=Q&&me&&me.z<=re;){if(ce.x>=V&&ce.x<=X&&ce.y>=$&&ce.y<=Z&&ce!==O&&ce!==Y&&o(ee,U,te,H,ae,K,ce.x,ce.y)&&M(ce.prev,ce,ce.next)>=0||(ce=ce.prevZ,me.x>=V&&me.x<=X&&me.y>=$&&me.y<=Z&&me!==O&&me!==Y&&o(ee,U,te,H,ae,K,me.x,me.y)&&M(me.prev,me,me.next)>=0))return!1;me=me.nextZ}for(;ce&&ce.z>=Q;){if(ce.x>=V&&ce.x<=X&&ce.y>=$&&ce.y<=Z&&ce!==O&&ce!==Y&&o(ee,U,te,H,ae,K,ce.x,ce.y)&&M(ce.prev,ce,ce.next)>=0)return!1;ce=ce.prevZ}for(;me&&me.z<=re;){if(me.x>=V&&me.x<=X&&me.y>=$&&me.y<=Z&&me!==O&&me!==Y&&o(ee,U,te,H,ae,K,me.x,me.y)&&M(me.prev,me,me.next)>=0)return!1;me=me.nextZ}return!0}function t(z,D,k){var B=z;do{var O=B.prev,q=B.next.next;!T(O,q)&&E(O,B,B.next,q)&&h(O,q)&&h(q,O)&&(D.push(O.i/k|0),D.push(B.i/k|0),D.push(q.i/k|0),C(B),C(B.next),B=z=q),B=B.next}while(B!==z);return w(B)}function a(z,D,k,B,O,q){var Y=z;do{for(var ee=Y.next.next;ee!==Y.prev;){if(Y.i!==ee.i&&x(Y,ee)){var te=_(Y,ee);Y=w(Y,Y.next),te=w(te,te.next),S(Y,D,k,B,O,q,0),S(te,D,k,B,O,q,0);return}ee=ee.next}Y=Y.next}while(Y!==z)}function r(z,D,k,B){var O=[],q,Y,ee,te,ae;for(q=0,Y=D.length;q=k.next.y&&k.next.y!==k.y){var ee=k.x+(O-k.y)*(k.next.x-k.x)/(k.next.y-k.y);if(ee<=B&&ee>q&&(q=ee,Y=k.x=k.x&&k.x>=ae&&B!==k.x&&o(OY.x||k.x===Y.x&&c(Y,k)))&&(Y=k,H=K)),k=k.next;while(k!==te);return Y}function c(z,D){return M(z.prev,z,D.prev)<0&&M(D.next,z,z.next)<0}function p(z,D,k,B){var O=z;do O.z===0&&(O.z=d(O.x,O.y,D,k,B)),O.prevZ=O.prev,O.nextZ=O.next,O=O.next;while(O!==z);O.prevZ.nextZ=null,O.prevZ=null,f(O)}function f(z){var D,k,B,O,q,Y,ee,te,ae=1;do{for(k=z,z=null,q=null,Y=0;k;){for(Y++,B=k,ee=0,D=0;D0||te>0&&B;)ee!==0&&(te===0||!B||k.z<=B.z)?(O=k,k=k.nextZ,ee--):(O=B,B=B.nextZ,te--),q?q.nextZ=O:z=O,O.prevZ=q,q=O;k=B}q.nextZ=null,ae*=2}while(Y>1);return z}function d(z,D,k,B,O){return z=(z-k)*O|0,D=(D-B)*O|0,z=(z|z<<8)&16711935,z=(z|z<<4)&252645135,z=(z|z<<2)&858993459,z=(z|z<<1)&1431655765,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,z|D<<1}function y(z){var D=z,k=z;do(D.x=(z-Y)*(q-ee)&&(z-Y)*(B-ee)>=(k-Y)*(D-ee)&&(k-Y)*(q-ee)>=(O-Y)*(B-ee)}function x(z,D){return z.next.i!==D.i&&z.prev.i!==D.i&&!m(z,D)&&(h(z,D)&&h(D,z)&&b(z,D)&&(M(z.prev,z,D.prev)||M(z,D.prev,D))||T(z,D)&&M(z.prev,z,z.next)>0&&M(D.prev,D,D.next)>0)}function M(z,D,k){return(D.y-z.y)*(k.x-D.x)-(D.x-z.x)*(k.y-D.y)}function T(z,D){return z.x===D.x&&z.y===D.y}function E(z,D,k,B){var O=A(M(z,D,k)),q=A(M(z,D,B)),Y=A(M(k,B,z)),ee=A(M(k,B,D));return!!(O!==q&&Y!==ee||O===0&&g(z,k,D)||q===0&&g(z,B,D)||Y===0&&g(k,z,B)||ee===0&&g(k,D,B))}function g(z,D,k){return D.x<=Math.max(z.x,k.x)&&D.x>=Math.min(z.x,k.x)&&D.y<=Math.max(z.y,k.y)&&D.y>=Math.min(z.y,k.y)}function A(z){return z>0?1:z<0?-1:0}function m(z,D){var k=z;do{if(k.i!==z.i&&k.next.i!==z.i&&k.i!==D.i&&k.next.i!==D.i&&E(k,k.next,z,D))return!0;k=k.next}while(k!==z);return!1}function h(z,D){return M(z.prev,z,z.next)<0?M(z,D,z.next)>=0&&M(z,z.prev,D)>=0:M(z,D,z.prev)<0||M(z,z.next,D)<0}function b(z,D){var k=z,B=!1,O=(z.x+D.x)/2,q=(z.y+D.y)/2;do k.y>q!=k.next.y>q&&k.next.y!==k.y&&O<(k.next.x-k.x)*(q-k.y)/(k.next.y-k.y)+k.x&&(B=!B),k=k.next;while(k!==z);return B}function _(z,D){var k=new F(z.i,z.x,z.y),B=new F(D.i,D.x,D.y),O=z.next,q=D.prev;return z.next=D,D.prev=z,k.next=O,O.prev=k,B.next=k,k.prev=B,q.next=B,B.prev=q,B}function I(z,D,k,B){var O=new F(z,D,k);return B?(O.next=B.next,O.prev=B,B.next.prev=O,B.next=O):(O.prev=O,O.next=O),O}function C(z){z.next.prev=z.prev,z.prev.next=z.next,z.prevZ&&(z.prevZ.nextZ=z.nextZ),z.nextZ&&(z.nextZ.prevZ=z.prevZ)}function F(z,D,k){this.i=z,this.x=D,this.y=k,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}u.deviation=function(z,D,k,B){var O=D&&D.length,q=O?D[0]*k:z.length,Y=Math.abs(R(z,0,q,k));if(O)for(var ee=0,te=D.length;ee0&&(B+=z[O-1].length,k.holes.push(B))}return k}}}),QO=De({"node_modules/array-normalize/index.js"(j,N){"use strict";var u=Yp();N.exports=v;function v(w,S,l){if(!w||w.length==null)throw Error("Argument should be an array");S==null&&(S=1),l==null&&(l=u(w,S));for(var e=0;e-1}}}),zT=De({"node_modules/es5-ext/string/#/contains/index.js"(j,N){"use strict";N.exports=hN()()?String.prototype.contains:dN()}}),iv=De({"node_modules/d/index.js"(j,N){"use strict";var u=$p(),v=DT(),w=Wb(),S=FT(),l=zT(),e=N.exports=function(t,a){var r,n,i,s,c;return arguments.length<2||typeof t!="string"?(s=a,a=t,t=null):s=arguments[2],u(t)?(r=l.call(t,"c"),n=l.call(t,"e"),i=l.call(t,"w")):(r=i=!0,n=!1),c={value:a,configurable:r,enumerable:n,writable:i},s?w(S(s),c):c};e.gs=function(t,a,r){var n,i,s,c;return typeof t!="string"?(s=r,r=a,a=t,t=null):s=arguments[3],u(a)?v(a)?u(r)?v(r)||(s=r,r=void 0):r=void 0:(s=a,a=r=void 0):a=void 0,u(t)?(n=l.call(t,"c"),i=l.call(t,"e")):(n=!0,i=!1),c={get:a,set:r,configurable:n,enumerable:i},s?w(S(s),c):c}}}),xg=De({"node_modules/es5-ext/function/is-arguments.js"(j,N){"use strict";var u=Object.prototype.toString,v=u.call(function(){return arguments}());N.exports=function(w){return u.call(w)===v}}}),bg=De({"node_modules/es5-ext/string/is-string.js"(j,N){"use strict";var u=Object.prototype.toString,v=u.call("");N.exports=function(w){return typeof w=="string"||w&&typeof w=="object"&&(w instanceof String||u.call(w)===v)||!1}}}),vN=De({"node_modules/ext/global-this/is-implemented.js"(j,N){"use strict";N.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),pN=De({"node_modules/ext/global-this/implementation.js"(j,N){var u=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};N.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return u()}try{return __global__||u()}finally{delete Object.prototype.__global__}}()}}),wg=De({"node_modules/ext/global-this/index.js"(j,N){"use strict";N.exports=vN()()?globalThis:pN()}}),mN=De({"node_modules/es6-symbol/is-implemented.js"(j,N){"use strict";var u=wg(),v={object:!0,symbol:!0};N.exports=function(){var w=u.Symbol,S;if(typeof w!="function")return!1;S=w("test symbol");try{String(S)}catch{return!1}return!(!v[typeof w.iterator]||!v[typeof w.toPrimitive]||!v[typeof w.toStringTag])}}}),gN=De({"node_modules/es6-symbol/is-symbol.js"(j,N){"use strict";N.exports=function(u){return u?typeof u=="symbol"?!0:!u.constructor||u.constructor.name!=="Symbol"?!1:u[u.constructor.toStringTag]==="Symbol":!1}}}),BT=De({"node_modules/es6-symbol/validate-symbol.js"(j,N){"use strict";var u=gN();N.exports=function(v){if(!u(v))throw new TypeError(v+" is not a symbol");return v}}}),yN=De({"node_modules/es6-symbol/lib/private/generate-name.js"(j,N){"use strict";var u=iv(),v=Object.create,w=Object.defineProperty,S=Object.prototype,l=v(null);N.exports=function(e){for(var t=0,a,r;l[e+(t||"")];)++t;return e+=t||"",l[e]=!0,a="@@"+e,w(S,a,u.gs(null,function(n){r||(r=!0,w(this,a,u(n)),r=!1)})),a}}}),_N=De({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(j,N){"use strict";var u=iv(),v=wg().Symbol;N.exports=function(w){return Object.defineProperties(w,{hasInstance:u("",v&&v.hasInstance||w("hasInstance")),isConcatSpreadable:u("",v&&v.isConcatSpreadable||w("isConcatSpreadable")),iterator:u("",v&&v.iterator||w("iterator")),match:u("",v&&v.match||w("match")),replace:u("",v&&v.replace||w("replace")),search:u("",v&&v.search||w("search")),species:u("",v&&v.species||w("species")),split:u("",v&&v.split||w("split")),toPrimitive:u("",v&&v.toPrimitive||w("toPrimitive")),toStringTag:u("",v&&v.toStringTag||w("toStringTag")),unscopables:u("",v&&v.unscopables||w("unscopables"))})}}}),xN=De({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(j,N){"use strict";var u=iv(),v=BT(),w=Object.create(null);N.exports=function(S){return Object.defineProperties(S,{for:u(function(l){return w[l]?w[l]:w[l]=S(String(l))}),keyFor:u(function(l){var e;v(l);for(e in w)if(w[e]===l)return e})})}}}),bN=De({"node_modules/es6-symbol/polyfill.js"(j,N){"use strict";var u=iv(),v=BT(),w=wg().Symbol,S=yN(),l=_N(),e=xN(),t=Object.create,a=Object.defineProperties,r=Object.defineProperty,n,i,s;if(typeof w=="function")try{String(w()),s=!0}catch{}else w=null;i=function(p){if(this instanceof i)throw new TypeError("Symbol is not a constructor");return n(p)},N.exports=n=function c(p){var f;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?w(p):(f=t(i.prototype),p=p===void 0?"":String(p),a(f,{__description__:u("",p),__name__:u("",S(p))}))},l(n),e(n),a(i.prototype,{constructor:u(n),toString:u("",function(){return this.__name__})}),a(n.prototype,{toString:u(function(){return"Symbol ("+v(this).__description__+")"}),valueOf:u(function(){return v(this)})}),r(n.prototype,n.toPrimitive,u("",function(){var c=v(this);return typeof c=="symbol"?c:c.toString()})),r(n.prototype,n.toStringTag,u("c","Symbol")),r(i.prototype,n.toStringTag,u("c",n.prototype[n.toStringTag])),r(i.prototype,n.toPrimitive,u("c",n.prototype[n.toPrimitive]))}}),sp=De({"node_modules/es6-symbol/index.js"(j,N){"use strict";N.exports=mN()()?wg().Symbol:bN()}}),wN=De({"node_modules/es5-ext/array/#/clear.js"(j,N){"use strict";var u=nv();N.exports=function(){return u(this).length=0,this}}}),Nm=De({"node_modules/es5-ext/object/valid-callable.js"(j,N){"use strict";N.exports=function(u){if(typeof u!="function")throw new TypeError(u+" is not a function");return u}}}),AN=De({"node_modules/type/string/coerce.js"(j,N){"use strict";var u=$p(),v=Hb(),w=Object.prototype.toString;N.exports=function(S){if(!u(S))return null;if(v(S)){var l=S.toString;if(typeof l!="function"||l===w)return null}try{return""+S}catch{return null}}}}),TN=De({"node_modules/type/lib/safe-to-string.js"(j,N){"use strict";N.exports=function(u){try{return u.toString()}catch{try{return String(u)}catch{return null}}}}}),MN=De({"node_modules/type/lib/to-short-string.js"(j,N){"use strict";var u=TN(),v=/[\n\r\u2028\u2029]/g;N.exports=function(w){var S=u(w);return S===null?"":(S.length>100&&(S=S.slice(0,99)+"\u2026"),S=S.replace(v,function(l){switch(l){case` -`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),S)}}}),OT=De({"node_modules/type/lib/resolve-exception.js"(j,N){"use strict";var u=$p(),v=Hb(),w=AN(),S=MN(),l=function(e,t){return e.replace("%v",S(t))};N.exports=function(e,t,a){if(!v(a))throw new TypeError(l(t,e));if(!u(e)){if("default"in a)return a.default;if(a.isOptional)return null}var r=w(a.errorMessage);throw u(r)||(r=t),new TypeError(l(r,e))}}}),SN=De({"node_modules/type/value/ensure.js"(j,N){"use strict";var u=OT(),v=$p();N.exports=function(w){return v(w)?w:u(w,"Cannot use %v",arguments[1])}}}),EN=De({"node_modules/type/plain-function/ensure.js"(j,N){"use strict";var u=OT(),v=DT();N.exports=function(w){return v(w)?w:u(w,"%v is not a plain function",arguments[1])}}}),kN=De({"node_modules/es5-ext/array/from/is-implemented.js"(j,N){"use strict";N.exports=function(){var u=Array.from,v,w;return typeof u!="function"?!1:(v=["raz","dwa"],w=u(v),!!(w&&w!==v&&w[1]==="dwa"))}}}),CN=De({"node_modules/es5-ext/function/is-function.js"(j,N){"use strict";var u=Object.prototype.toString,v=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);N.exports=function(w){return typeof w=="function"&&v(u.call(w))}}}),LN=De({"node_modules/es5-ext/math/sign/is-implemented.js"(j,N){"use strict";N.exports=function(){var u=Math.sign;return typeof u!="function"?!1:u(10)===1&&u(-20)===-1}}}),PN=De({"node_modules/es5-ext/math/sign/shim.js"(j,N){"use strict";N.exports=function(u){return u=Number(u),isNaN(u)||u===0?u:u>0?1:-1}}}),RN=De({"node_modules/es5-ext/math/sign/index.js"(j,N){"use strict";N.exports=LN()()?Math.sign:PN()}}),IN=De({"node_modules/es5-ext/number/to-integer.js"(j,N){"use strict";var u=RN(),v=Math.abs,w=Math.floor;N.exports=function(S){return isNaN(S)?0:(S=Number(S),S===0||!isFinite(S)?S:u(S)*w(v(S)))}}}),DN=De({"node_modules/es5-ext/number/to-pos-integer.js"(j,N){"use strict";var u=IN(),v=Math.max;N.exports=function(w){return v(0,u(w))}}}),FN=De({"node_modules/es5-ext/array/from/shim.js"(j,N){"use strict";var u=sp().iterator,v=xg(),w=CN(),S=DN(),l=Nm(),e=nv(),t=op(),a=bg(),r=Array.isArray,n=Function.prototype.call,i={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;N.exports=function(c){var p=arguments[1],f=arguments[2],d,y,o,x,M,T,E,g,A,m;if(c=Object(e(c)),t(p)&&l(p),!this||this===Array||!w(this)){if(!p){if(v(c))return M=c.length,M!==1?Array.apply(null,c):(x=new Array(1),x[0]=c[0],x);if(r(c)){for(x=new Array(M=c.length),y=0;y=55296&&T<=56319&&(m+=c[++y])),m=p?n.call(p,f,m,o):m,d?(i.value=m,s(x,o,i)):x[o]=m,++o;M=o}}if(M===void 0)for(M=S(c.length),d&&(x=new d(M)),y=0;y=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){a(this,"__redo__",l("c",[i]));return}this.__redo__.forEach(function(s,c){s>=i&&(this.__redo__[c]=++s)},this),this.__redo__.push(i)}}),_onDelete:l(function(i){var s;i>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(i),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,p){c>i&&(this.__redo__[p]=--c)},this)))}),_onClear:l(function(){this.__redo__&&u.call(this.__redo__),this.__nextIndex__=0})}))),a(n.prototype,t.iterator,l(function(){return this}))}}),qN=De({"node_modules/es6-iterator/array.js"(j,N){"use strict";var u=Vb(),v=zT(),w=iv(),S=sp(),l=NT(),e=Object.defineProperty,t;t=N.exports=function(a,r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");l.call(this,a),r?v.call(r,"key+value")?r="key+value":v.call(r,"key")?r="key":r="value":r="value",e(this,"__kind__",w("",r))},u&&u(t,l),delete t.prototype.constructor,t.prototype=Object.create(l.prototype,{_resolve:w(function(a){return this.__kind__==="value"?this.__list__[a]:this.__kind__==="key+value"?[a,this.__list__[a]]:a})}),e(t.prototype,S.toStringTag,w("c","Array Iterator"))}}),GN=De({"node_modules/es6-iterator/string.js"(j,N){"use strict";var u=Vb(),v=iv(),w=sp(),S=NT(),l=Object.defineProperty,e;e=N.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),S.call(this,t),l(this,"__length__",v("",t.length))},u&&u(e,S),delete e.prototype.constructor,e.prototype=Object.create(S.prototype,{_next:v(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?a+this.__list__[this.__nextIndex__++]:a)})}),l(e.prototype,w.toStringTag,v("c","String Iterator"))}}),VN=De({"node_modules/es6-iterator/is-iterable.js"(j,N){"use strict";var u=xg(),v=op(),w=bg(),S=sp().iterator,l=Array.isArray;N.exports=function(e){return v(e)?l(e)||w(e)||u(e)?!0:typeof e[S]=="function":!1}}}),HN=De({"node_modules/es6-iterator/valid-iterable.js"(j,N){"use strict";var u=VN();N.exports=function(v){if(!u(v))throw new TypeError(v+" is not iterable");return v}}}),jT=De({"node_modules/es6-iterator/get.js"(j,N){"use strict";var u=xg(),v=bg(),w=qN(),S=GN(),l=HN(),e=sp().iterator;N.exports=function(t){return typeof l(t)[e]=="function"?t[e]():u(t)?new w(t):v(t)?new S(t):new w(t)}}}),WN=De({"node_modules/es6-iterator/for-of.js"(j,N){"use strict";var u=xg(),v=Nm(),w=bg(),S=jT(),l=Array.isArray,e=Function.prototype.call,t=Array.prototype.some;N.exports=function(a,r){var n,i=arguments[2],s,c,p,f,d,y,o;if(l(a)||u(a)?n="array":w(a)?n="string":a=S(a),v(r),c=function(){p=!0},n==="array"){t.call(a,function(x){return e.call(r,i,x,c),p});return}if(n==="string"){for(d=a.length,f=0;f=55296&&o<=56319&&(y+=a[++f])),e.call(r,i,y,c),!p);++f);return}for(s=a.next();!s.done;){if(e.call(r,i,s.value,c),p)return;s=a.next()}}}}),YN=De({"node_modules/es6-weak-map/is-native-implemented.js"(j,N){"use strict";N.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),XN=De({"node_modules/es6-weak-map/polyfill.js"(j,N){"use strict";var u=op(),v=Vb(),w=aN(),S=nv(),l=nN(),e=iv(),t=jT(),a=WN(),r=sp().toStringTag,n=YN(),i=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,p=Object.getPrototypeOf,f;N.exports=f=function(){var d=arguments[0],y;if(!(this instanceof f))throw new TypeError("Constructor requires 'new'");return y=n&&v&&WeakMap!==f?v(new WeakMap,p(this)):this,u(d)&&(i(d)||(d=t(d))),s(y,"__weakMapData__",e("c","$weakMap$"+l())),d&&a(d,function(o){S(o),y.set(o[0],o[1])}),y},n&&(v&&v(f,WeakMap),f.prototype=Object.create(WeakMap.prototype,{constructor:e(f)})),Object.defineProperties(f.prototype,{delete:e(function(d){return c.call(w(d),this.__weakMapData__)?(delete d[this.__weakMapData__],!0):!1}),get:e(function(d){if(c.call(w(d),this.__weakMapData__))return d[this.__weakMapData__]}),has:e(function(d){return c.call(w(d),this.__weakMapData__)}),set:e(function(d,y){return s(w(d),this.__weakMapData__,e("c",y)),this}),toString:e(function(){return"[object WeakMap]"})}),s(f.prototype,r,e("c","WeakMap"))}}),UT=De({"node_modules/es6-weak-map/index.js"(j,N){"use strict";N.exports=eN()()?WeakMap:XN()}}),ZN=De({"node_modules/array-find-index/index.js"(j,N){"use strict";N.exports=function(u,v,w){if(typeof Array.prototype.findIndex=="function")return u.findIndex(v,w);if(typeof v!="function")throw new TypeError("predicate must be a function");var S=Object(u),l=S.length;if(l===0)return-1;for(var e=0;e{this.drawItem(w)});return this},s.prototype.drawItem=function(m,h){let{groups:v}=this,g=v[m];if(typeof h=="number"&&(m=h,g=v[h],h=null),!(g&&g.count&&g.opacity))return;g.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,g,h));let i=[];for(let w=1;w{let f=g[T];if(_===void 0)return f;_===null?_={positions:null}:typeof _=="function"?_={ondraw:_}:typeof _[0]=="number"&&(_={positions:_}),_=e(_,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),_.positions===null&&(_.positions=[]),_.tooManyColors!=null&&(this.tooManyColors=_.tooManyColors),f||(g[T]=f={id:T,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:w.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:w.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},_=Object.assign({},s.defaults,_)),_.positions&&!("marker"in _)&&(_.marker=f.marker,delete f.marker),_.marker&&!("positions"in _)&&(_.positions=f.positions,delete f.positions);let u=0,A=0;if(t(f,_,[{snap:!0,size:(x,z)=>(x==null&&(x=s.defaults.size),u+=x&&x.length?1:0,x),borderSize:(x,z)=>(x==null&&(x=s.defaults.borderSize),u+=x&&x.length?1:0,x),opacity:parseFloat,color:(x,z)=>(x==null&&(x=s.defaults.color),x=this.updateColor(x),A++,x),borderColor:(x,z)=>(x==null&&(x=s.defaults.borderColor),x=this.updateColor(x),A++,x),bounds:(x,z,I)=>("range"in I||(I.range=null),x),positions:(x,z,I)=>{let{snap:O}=z,{positionBuffer:D,positionFractBuffer:B,selectionBuffer:F}=z;if(x.x||x.y)return x.x.length?z.xAttr={buffer:w.buffer(x.x),offset:0,stride:4,count:x.x.length}:z.xAttr={buffer:x.x.buffer,offset:x.x.offset*4||0,stride:(x.x.stride||1)*4,count:x.x.count},x.y.length?z.yAttr={buffer:w.buffer(x.y),offset:0,stride:4,count:x.y.length}:z.yAttr={buffer:x.y.buffer,offset:x.y.offset*4||0,stride:(x.y.stride||1)*4,count:x.y.count},z.count=Math.max(z.xAttr.count,z.yAttr.count),x;x=n(x,"float64");let P=z.count=Math.floor(x.length/2),j=z.bounds=P?b(x,2):null;if(!I.range&&!z.range&&(delete z.range,I.range=j),!I.marker&&!z.marker&&(delete z.marker,I.marker=null),O&&(O===!0||P>O)?z.tree=k(x,{bounds:j}):O&&O.length&&(z.tree=O),z.tree){let Q={primitive:"points",usage:"static",data:z.tree,type:"uint32"};z.elements?z.elements(Q):z.elements=w.elements(Q)}var U=r.float32(x);D({data:U,usage:"dynamic"});var $=r.fract32(x,U);return B({data:$,usage:"dynamic"}),F({data:new Uint8Array(P),type:"uint8",usage:"stream"}),x}},{marker:(x,z,I)=>{let{activation:O}=z;if(O.forEach(D=>D&&D.destroy&&D.destroy()),O.length=0,!x||typeof x[0]=="number"){let D=this.addMarker(x);O[D]=!0}else{let D=[];for(let B=0,F=Math.min(x.length,z.count);B{let O=z.bounds;if(O)return x||(x=O),z.scale=[1/(x[2]-x[0]),1/(x[3]-x[1])],z.translate=[-x[0],-x[1]],z.scaleFract=r.fract(z.scale),z.translateFract=r.fract(z.translate),x},viewport:x=>a(x||[i.drawingBufferWidth,i.drawingBufferHeight])}]),u){let{count:x,size:z,borderSize:I,sizeBuffer:O}=f,D=new Uint8Array(x*2);if(z.length||I.length)for(let B=0;B=0)return i;let w;if(m instanceof Uint8Array||m instanceof Uint8ClampedArray)w=m;else{w=new Uint8Array(m.length);for(let M=0,C=m.length;Mg*4&&(this.tooManyColors=!0),this.updatePalette(v),i.length===1?i[0]:i},s.prototype.updatePalette=function(m){if(this.tooManyColors)return;let{maxColors:h,paletteTexture:v}=this,g=Math.ceil(m.length*.25/h);if(g>1){m=m.slice();for(let i=m.length*.25%h;i{m.sizeBuffer.destroy(),m.positionBuffer.destroy(),m.positionFractBuffer.destroy(),m.colorBuffer.destroy(),m.activation.forEach(h=>h&&h.destroy&&h.destroy()),m.selectionBuffer.destroy(),m.elements&&m.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(m=>m&&m.destroy&&m.destroy()),this};var c=function(m,h){var v=new o(m,h),g=v.render.bind(v);return Object.assign(g,{render:g,update:v.update.bind(v),draw:v.draw.bind(v),destroy:v.destroy.bind(v),regl:v.regl,gl:v.gl,canvas:v.gl.canvas,groups:v.groups,markers:v.markerCache,palette:v.palette}),g};V.exports=c}}),Vc=ze({"node_modules/object-assign/index.js"(J,V){"use strict";var p=Object.getOwnPropertySymbols,b=Object.prototype.hasOwnProperty,E=Object.prototype.propertyIsEnumerable;function k(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function l(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(o){return t[o]});if(r.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(o){a[o]=o}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch{return!1}}V.exports=l()?Object.assign:function(e,t){for(var n,r=k(e),a,o=1;o80*P){re=se=B[0],ne=G=B[1];for(var Y=P;Yse&&(se=X),K>G&&(G=K);H=Math.max(se-re,G-ne),H=H!==0?32767/H:0}return k($,Q,P,re,ne,H,0),Q}function b(B,F,P,j,U){var $,Q;if(U===D(B,F,P,j)>0)for($=F;$=F;$-=j)Q=z($,B[$],B[$+1],Q);return Q&&M(Q,Q.next)&&(I(Q),Q=Q.next),Q}function E(B,F){if(!B)return B;F||(F=B);var P=B,j;do if(j=!1,!P.steiner&&(M(P,P.next)||S(P.prev,P,P.next)===0)){if(I(P),P=F=P.prev,P===P.next)break;j=!0}else P=P.next;while(j||P!==F);return F}function k(B,F,P,j,U,$,Q){if(B){!Q&&$&&m(B,j,U,$);for(var re=B,ne,se;B.prev!==B.next;){if(ne=B.prev,se=B.next,$?e(B,j,U,$):l(B)){F.push(ne.i/P|0),F.push(B.i/P|0),F.push(se.i/P|0),I(B),B=se.next,re=se.next;continue}if(B=se,B===re){Q?Q===1?(B=t(E(B),F,P),k(B,F,P,j,U,$,2)):Q===2&&n(B,F,P,j,U,$):k(E(B),F,P,j,U,$,1);break}}}}function l(B){var F=B.prev,P=B,j=B.next;if(S(F,P,j)>=0)return!1;for(var U=F.x,$=P.x,Q=j.x,re=F.y,ne=P.y,se=j.y,G=U<$?U$?U>Q?U:Q:$>Q?$:Q,H=re>ne?re>se?re:se:ne>se?ne:se,Y=j.next;Y!==F;){if(Y.x>=G&&Y.x<=K&&Y.y>=X&&Y.y<=H&&i(U,re,$,ne,Q,se,Y.x,Y.y)&&S(Y.prev,Y,Y.next)>=0)return!1;Y=Y.next}return!0}function e(B,F,P,j){var U=B.prev,$=B,Q=B.next;if(S(U,$,Q)>=0)return!1;for(var re=U.x,ne=$.x,se=Q.x,G=U.y,X=$.y,K=Q.y,H=rene?re>se?re:se:ne>se?ne:se,Z=G>X?G>K?G:K:X>K?X:K,ee=v(H,Y,F,P,j),ae=v(q,Z,F,P,j),he=B.prevZ,xe=B.nextZ;he&&he.z>=ee&&xe&&xe.z<=ae;){if(he.x>=H&&he.x<=q&&he.y>=Y&&he.y<=Z&&he!==U&&he!==Q&&i(re,G,ne,X,se,K,he.x,he.y)&&S(he.prev,he,he.next)>=0||(he=he.prevZ,xe.x>=H&&xe.x<=q&&xe.y>=Y&&xe.y<=Z&&xe!==U&&xe!==Q&&i(re,G,ne,X,se,K,xe.x,xe.y)&&S(xe.prev,xe,xe.next)>=0))return!1;xe=xe.nextZ}for(;he&&he.z>=ee;){if(he.x>=H&&he.x<=q&&he.y>=Y&&he.y<=Z&&he!==U&&he!==Q&&i(re,G,ne,X,se,K,he.x,he.y)&&S(he.prev,he,he.next)>=0)return!1;he=he.prevZ}for(;xe&&xe.z<=ae;){if(xe.x>=H&&xe.x<=q&&xe.y>=Y&&xe.y<=Z&&xe!==U&&xe!==Q&&i(re,G,ne,X,se,K,xe.x,xe.y)&&S(xe.prev,xe,xe.next)>=0)return!1;xe=xe.nextZ}return!0}function t(B,F,P){var j=B;do{var U=j.prev,$=j.next.next;!M(U,$)&&C(U,j,j.next,$)&&u(U,$)&&u($,U)&&(F.push(U.i/P|0),F.push(j.i/P|0),F.push($.i/P|0),I(j),I(j.next),j=B=$),j=j.next}while(j!==B);return E(j)}function n(B,F,P,j,U,$){var Q=B;do{for(var re=Q.next.next;re!==Q.prev;){if(Q.i!==re.i&&w(Q,re)){var ne=x(Q,re);Q=E(Q,Q.next),ne=E(ne,ne.next),k(Q,F,P,j,U,$,0),k(ne,F,P,j,U,$,0);return}re=re.next}Q=Q.next}while(Q!==B)}function r(B,F,P,j){var U=[],$,Q,re,ne,se;for($=0,Q=F.length;$=P.next.y&&P.next.y!==P.y){var re=P.x+(U-P.y)*(P.next.x-P.x)/(P.next.y-P.y);if(re<=j&&re>$&&($=re,Q=P.x=P.x&&P.x>=se&&j!==P.x&&i(UQ.x||P.x===Q.x&&c(Q,P)))&&(Q=P,X=K)),P=P.next;while(P!==ne);return Q}function c(B,F){return S(B.prev,B,F.prev)<0&&S(F.next,B,B.next)<0}function m(B,F,P,j){var U=B;do U.z===0&&(U.z=v(U.x,U.y,F,P,j)),U.prevZ=U.prev,U.nextZ=U.next,U=U.next;while(U!==B);U.prevZ.nextZ=null,U.prevZ=null,h(U)}function h(B){var F,P,j,U,$,Q,re,ne,se=1;do{for(P=B,B=null,$=null,Q=0;P;){for(Q++,j=P,re=0,F=0;F0||ne>0&&j;)re!==0&&(ne===0||!j||P.z<=j.z)?(U=P,P=P.nextZ,re--):(U=j,j=j.nextZ,ne--),$?$.nextZ=U:B=U,U.prevZ=$,$=U;P=j}$.nextZ=null,se*=2}while(Q>1);return B}function v(B,F,P,j,U){return B=(B-P)*U|0,F=(F-j)*U|0,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,F=(F|F<<8)&16711935,F=(F|F<<4)&252645135,F=(F|F<<2)&858993459,F=(F|F<<1)&1431655765,B|F<<1}function g(B){var F=B,P=B;do(F.x=(B-Q)*($-re)&&(B-Q)*(j-re)>=(P-Q)*(F-re)&&(P-Q)*($-re)>=(U-Q)*(j-re)}function w(B,F){return B.next.i!==F.i&&B.prev.i!==F.i&&!f(B,F)&&(u(B,F)&&u(F,B)&&A(B,F)&&(S(B.prev,B,F.prev)||S(B,F.prev,F))||M(B,F)&&S(B.prev,B,B.next)>0&&S(F.prev,F,F.next)>0)}function S(B,F,P){return(F.y-B.y)*(P.x-F.x)-(F.x-B.x)*(P.y-F.y)}function M(B,F){return B.x===F.x&&B.y===F.y}function C(B,F,P,j){var U=T(S(B,F,P)),$=T(S(B,F,j)),Q=T(S(P,j,B)),re=T(S(P,j,F));return!!(U!==$&&Q!==re||U===0&&_(B,P,F)||$===0&&_(B,j,F)||Q===0&&_(P,B,j)||re===0&&_(P,F,j))}function _(B,F,P){return F.x<=Math.max(B.x,P.x)&&F.x>=Math.min(B.x,P.x)&&F.y<=Math.max(B.y,P.y)&&F.y>=Math.min(B.y,P.y)}function T(B){return B>0?1:B<0?-1:0}function f(B,F){var P=B;do{if(P.i!==B.i&&P.next.i!==B.i&&P.i!==F.i&&P.next.i!==F.i&&C(P,P.next,B,F))return!0;P=P.next}while(P!==B);return!1}function u(B,F){return S(B.prev,B,B.next)<0?S(B,F,B.next)>=0&&S(B,B.prev,F)>=0:S(B,F,B.prev)<0||S(B,B.next,F)<0}function A(B,F){var P=B,j=!1,U=(B.x+F.x)/2,$=(B.y+F.y)/2;do P.y>$!=P.next.y>$&&P.next.y!==P.y&&U<(P.next.x-P.x)*($-P.y)/(P.next.y-P.y)+P.x&&(j=!j),P=P.next;while(P!==B);return j}function x(B,F){var P=new O(B.i,B.x,B.y),j=new O(F.i,F.x,F.y),U=B.next,$=F.prev;return B.next=F,F.prev=B,P.next=U,U.prev=P,j.next=P,P.prev=j,$.next=j,j.prev=$,j}function z(B,F,P,j){var U=new O(B,F,P);return j?(U.next=j.next,U.prev=j,j.next.prev=U,j.next=U):(U.prev=U,U.next=U),U}function I(B){B.next.prev=B.prev,B.prev.next=B.next,B.prevZ&&(B.prevZ.nextZ=B.nextZ),B.nextZ&&(B.nextZ.prevZ=B.prevZ)}function O(B,F,P){this.i=B,this.x=F,this.y=P,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}p.deviation=function(B,F,P,j){var U=F&&F.length,$=U?F[0]*P:B.length,Q=Math.abs(D(B,0,$,P));if(U)for(var re=0,ne=F.length;re0&&(j+=B[U-1].length,P.holes.push(j))}return P}}}),aU=ze({"node_modules/array-normalize/index.js"(J,V){"use strict";var p=c0();V.exports=b;function b(E,k,l){if(!E||E.length==null)throw Error("Argument should be an array");k==null&&(k=1),l==null&&(l=p(E,k));for(var e=0;e-1}}}),eM=ze({"node_modules/es5-ext/string/#/contains/index.js"(J,V){"use strict";V.exports=mU()()?String.prototype.contains:gU()}}),pp=ze({"node_modules/d/index.js"(J,V){"use strict";var p=d0(),b=JA(),E=N2(),k=QA(),l=eM(),e=V.exports=function(t,n){var r,a,o,s,c;return arguments.length<2||typeof t!="string"?(s=n,n=t,t=null):s=arguments[2],p(t)?(r=l.call(t,"c"),a=l.call(t,"e"),o=l.call(t,"w")):(r=o=!0,a=!1),c={value:n,configurable:r,enumerable:a,writable:o},s?E(k(s),c):c};e.gs=function(t,n,r){var a,o,s,c;return typeof t!="string"?(s=r,r=n,n=t,t=null):s=arguments[3],p(n)?b(n)?p(r)?b(r)||(s=r,r=void 0):r=void 0:(s=n,n=r=void 0):n=void 0,p(t)?(a=l.call(t,"c"),o=l.call(t,"e")):(a=!0,o=!1),c={get:n,set:r,configurable:a,enumerable:o},s?E(k(s),c):c}}}),ny=ze({"node_modules/es5-ext/function/is-arguments.js"(J,V){"use strict";var p=Object.prototype.toString,b=p.call(function(){return arguments}());V.exports=function(E){return p.call(E)===b}}}),iy=ze({"node_modules/es5-ext/string/is-string.js"(J,V){"use strict";var p=Object.prototype.toString,b=p.call("");V.exports=function(E){return typeof E=="string"||E&&typeof E=="object"&&(E instanceof String||p.call(E)===b)||!1}}}),yU=ze({"node_modules/ext/global-this/is-implemented.js"(J,V){"use strict";V.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}}}),_U=ze({"node_modules/ext/global-this/implementation.js"(J,V){var p=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};V.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return p()}try{return __global__||p()}finally{delete Object.prototype.__global__}}()}}),oy=ze({"node_modules/ext/global-this/index.js"(J,V){"use strict";V.exports=yU()()?globalThis:_U()}}),xU=ze({"node_modules/es6-symbol/is-implemented.js"(J,V){"use strict";var p=oy(),b={object:!0,symbol:!0};V.exports=function(){var E=p.Symbol,k;if(typeof E!="function")return!1;k=E("test symbol");try{String(k)}catch{return!1}return!(!b[typeof E.iterator]||!b[typeof E.toPrimitive]||!b[typeof E.toStringTag])}}}),bU=ze({"node_modules/es6-symbol/is-symbol.js"(J,V){"use strict";V.exports=function(p){return p?typeof p=="symbol"?!0:!p.constructor||p.constructor.name!=="Symbol"?!1:p[p.constructor.toStringTag]==="Symbol":!1}}}),tM=ze({"node_modules/es6-symbol/validate-symbol.js"(J,V){"use strict";var p=bU();V.exports=function(b){if(!p(b))throw new TypeError(b+" is not a symbol");return b}}}),wU=ze({"node_modules/es6-symbol/lib/private/generate-name.js"(J,V){"use strict";var p=pp(),b=Object.create,E=Object.defineProperty,k=Object.prototype,l=b(null);V.exports=function(e){for(var t=0,n,r;l[e+(t||"")];)++t;return e+=t||"",l[e]=!0,n="@@"+e,E(k,n,p.gs(null,function(a){r||(r=!0,E(this,n,p(a)),r=!1)})),n}}}),TU=ze({"node_modules/es6-symbol/lib/private/setup/standard-symbols.js"(J,V){"use strict";var p=pp(),b=oy().Symbol;V.exports=function(E){return Object.defineProperties(E,{hasInstance:p("",b&&b.hasInstance||E("hasInstance")),isConcatSpreadable:p("",b&&b.isConcatSpreadable||E("isConcatSpreadable")),iterator:p("",b&&b.iterator||E("iterator")),match:p("",b&&b.match||E("match")),replace:p("",b&&b.replace||E("replace")),search:p("",b&&b.search||E("search")),species:p("",b&&b.species||E("species")),split:p("",b&&b.split||E("split")),toPrimitive:p("",b&&b.toPrimitive||E("toPrimitive")),toStringTag:p("",b&&b.toStringTag||E("toStringTag")),unscopables:p("",b&&b.unscopables||E("unscopables"))})}}}),AU=ze({"node_modules/es6-symbol/lib/private/setup/symbol-registry.js"(J,V){"use strict";var p=pp(),b=tM(),E=Object.create(null);V.exports=function(k){return Object.defineProperties(k,{for:p(function(l){return E[l]?E[l]:E[l]=k(String(l))}),keyFor:p(function(l){var e;b(l);for(e in E)if(E[e]===l)return e})})}}}),MU=ze({"node_modules/es6-symbol/polyfill.js"(J,V){"use strict";var p=pp(),b=tM(),E=oy().Symbol,k=wU(),l=TU(),e=AU(),t=Object.create,n=Object.defineProperties,r=Object.defineProperty,a,o,s;if(typeof E=="function")try{String(E()),s=!0}catch{}else E=null;o=function(m){if(this instanceof o)throw new TypeError("Symbol is not a constructor");return a(m)},V.exports=a=function c(m){var h;if(this instanceof c)throw new TypeError("Symbol is not a constructor");return s?E(m):(h=t(o.prototype),m=m===void 0?"":String(m),n(h,{__description__:p("",m),__name__:p("",k(m))}))},l(a),e(a),n(o.prototype,{constructor:p(a),toString:p("",function(){return this.__name__})}),n(a.prototype,{toString:p(function(){return"Symbol ("+b(this).__description__+")"}),valueOf:p(function(){return b(this)})}),r(a.prototype,a.toPrimitive,p("",function(){var c=b(this);return typeof c=="symbol"?c:c.toString()})),r(a.prototype,a.toStringTag,p("c","Symbol")),r(o.prototype,a.toStringTag,p("c",a.prototype[a.toStringTag])),r(o.prototype,a.toPrimitive,p("c",a.prototype[a.toPrimitive]))}}),Tv=ze({"node_modules/es6-symbol/index.js"(J,V){"use strict";V.exports=xU()()?oy().Symbol:MU()}}),SU=ze({"node_modules/es5-ext/array/#/clear.js"(J,V){"use strict";var p=dp();V.exports=function(){return p(this).length=0,this}}}),_g=ze({"node_modules/es5-ext/object/valid-callable.js"(J,V){"use strict";V.exports=function(p){if(typeof p!="function")throw new TypeError(p+" is not a function");return p}}}),EU=ze({"node_modules/type/string/coerce.js"(J,V){"use strict";var p=d0(),b=KA(),E=Object.prototype.toString;V.exports=function(k){if(!p(k))return null;if(b(k)){var l=k.toString;if(typeof l!="function"||l===E)return null}try{return""+k}catch{return null}}}}),kU=ze({"node_modules/type/lib/safe-to-string.js"(J,V){"use strict";V.exports=function(p){try{return p.toString()}catch{try{return String(p)}catch{return null}}}}}),CU=ze({"node_modules/type/lib/to-short-string.js"(J,V){"use strict";var p=kU(),b=/[\n\r\u2028\u2029]/g;V.exports=function(E){var k=p(E);return k===null?"":(k.length>100&&(k=k.slice(0,99)+"\u2026"),k=k.replace(b,function(l){switch(l){case` +`:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),k)}}}),LU=ze({"node_modules/type/lib/resolve-error-message.js"(J,V){"use strict";var p=EU(),b=CU();V.exports=function(E,k,l){l&&l.errorMessage&&(E=p(l.errorMessage));var e=E.indexOf("%v"),t=e>-1?b(k):null;if(l&&l.name){var n=E.indexOf("%n");if(n>-1){if(e>-1){var r,a,o,s;return n>e?(r=t,o=e,a=l.name,s=n):(r=l.name,o=n,a=t,s=e),E.slice(0,o)+r+E.slice(o+2,s)+a+E.slice(s+2)}return E.slice(0,n)+l.name+E.slice(n+2)}}return e>-1?E.slice(0,e)+t+E.slice(e+2):E}}}),rM=ze({"node_modules/type/lib/resolve-exception.js"(J,V){"use strict";var p=d0(),b=LU();V.exports=function(E,k,l){if(l&&!p(E)){if("default"in l)return l.default;if(l.isOptional)return null}var e=l&&l.Error||TypeError,t=new e(b(k,E,l));throw l&&l.errorCode&&(t.code=l.errorCode),t}}}),PU=ze({"node_modules/type/value/ensure.js"(J,V){"use strict";var p=rM(),b=d0();V.exports=function(E){if(b(E))return E;var k=arguments[1],l=k&&k.name?"Expected a value for %n, received %v":"Cannot use %v";return p(E,l,k)}}}),RU=ze({"node_modules/type/plain-function/ensure.js"(J,V){"use strict";var p=rM(),b=JA();V.exports=function(E){if(b(E))return E;var k=arguments[1],l=k&&k.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return p(E,l,k)}}}),IU=ze({"node_modules/es5-ext/array/from/is-implemented.js"(J,V){"use strict";V.exports=function(){var p=Array.from,b,E;return typeof p!="function"?!1:(b=["raz","dwa"],E=p(b),!!(E&&E!==b&&E[1]==="dwa"))}}}),DU=ze({"node_modules/es5-ext/function/is-function.js"(J,V){"use strict";var p=Object.prototype.toString,b=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);V.exports=function(E){return typeof E=="function"&&b(p.call(E))}}}),FU=ze({"node_modules/es5-ext/math/sign/is-implemented.js"(J,V){"use strict";V.exports=function(){var p=Math.sign;return typeof p!="function"?!1:p(10)===1&&p(-20)===-1}}}),zU=ze({"node_modules/es5-ext/math/sign/shim.js"(J,V){"use strict";V.exports=function(p){return p=Number(p),isNaN(p)||p===0?p:p>0?1:-1}}}),BU=ze({"node_modules/es5-ext/math/sign/index.js"(J,V){"use strict";V.exports=FU()()?Math.sign:zU()}}),OU=ze({"node_modules/es5-ext/number/to-integer.js"(J,V){"use strict";var p=BU(),b=Math.abs,E=Math.floor;V.exports=function(k){return isNaN(k)?0:(k=Number(k),k===0||!isFinite(k)?k:p(k)*E(b(k)))}}}),NU=ze({"node_modules/es5-ext/number/to-pos-integer.js"(J,V){"use strict";var p=OU(),b=Math.max;V.exports=function(E){return b(0,p(E))}}}),jU=ze({"node_modules/es5-ext/array/from/shim.js"(J,V){"use strict";var p=Tv().iterator,b=ny(),E=DU(),k=NU(),l=_g(),e=dp(),t=wv(),n=iy(),r=Array.isArray,a=Function.prototype.call,o={configurable:!0,enumerable:!0,writable:!0,value:null},s=Object.defineProperty;V.exports=function(c){var m=arguments[1],h=arguments[2],v,g,i,w,S,M,C,_,T,f;if(c=Object(e(c)),t(m)&&l(m),!this||this===Array||!E(this)){if(!m){if(b(c))return S=c.length,S!==1?Array.apply(null,c):(w=new Array(1),w[0]=c[0],w);if(r(c)){for(w=new Array(S=c.length),g=0;g=55296&&M<=56319&&(f+=c[++g])),f=m?a.call(m,h,f,i):f,v?(o.value=f,s(w,i,o)):w[i]=f,++i;S=i}}if(S===void 0)for(S=k(c.length),v&&(w=new v(S)),g=0;g=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){n(this,"__redo__",l("c",[o]));return}this.__redo__.forEach(function(s,c){s>=o&&(this.__redo__[c]=++s)},this),this.__redo__.push(o)}}),_onDelete:l(function(o){var s;o>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(s=this.__redo__.indexOf(o),s!==-1&&this.__redo__.splice(s,1),this.__redo__.forEach(function(c,m){c>o&&(this.__redo__[m]=--c)},this)))}),_onClear:l(function(){this.__redo__&&p.call(this.__redo__),this.__nextIndex__=0})}))),n(a.prototype,t.iterator,l(function(){return this}))}}),YU=ze({"node_modules/es6-iterator/array.js"(J,V){"use strict";var p=O2(),b=eM(),E=pp(),k=Tv(),l=aM(),e=Object.defineProperty,t;t=V.exports=function(n,r){if(!(this instanceof t))throw new TypeError("Constructor requires 'new'");l.call(this,n),r?b.call(r,"key+value")?r="key+value":b.call(r,"key")?r="key":r="value":r="value",e(this,"__kind__",E("",r))},p&&p(t,l),delete t.prototype.constructor,t.prototype=Object.create(l.prototype,{_resolve:E(function(n){return this.__kind__==="value"?this.__list__[n]:this.__kind__==="key+value"?[n,this.__list__[n]]:n})}),e(t.prototype,k.toStringTag,E("c","Array Iterator"))}}),XU=ze({"node_modules/es6-iterator/string.js"(J,V){"use strict";var p=O2(),b=pp(),E=Tv(),k=aM(),l=Object.defineProperty,e;e=V.exports=function(t){if(!(this instanceof e))throw new TypeError("Constructor requires 'new'");t=String(t),k.call(this,t),l(this,"__length__",b("",t.length))},p&&p(e,k),delete e.prototype.constructor,e.prototype=Object.create(k.prototype,{_next:b(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?n+this.__list__[this.__nextIndex__++]:n)})}),l(e.prototype,E.toStringTag,b("c","String Iterator"))}}),ZU=ze({"node_modules/es6-iterator/is-iterable.js"(J,V){"use strict";var p=ny(),b=wv(),E=iy(),k=Tv().iterator,l=Array.isArray;V.exports=function(e){return b(e)?l(e)||E(e)||p(e)?!0:typeof e[k]=="function":!1}}}),$U=ze({"node_modules/es6-iterator/valid-iterable.js"(J,V){"use strict";var p=ZU();V.exports=function(b){if(!p(b))throw new TypeError(b+" is not iterable");return b}}}),nM=ze({"node_modules/es6-iterator/get.js"(J,V){"use strict";var p=ny(),b=iy(),E=YU(),k=XU(),l=$U(),e=Tv().iterator;V.exports=function(t){return typeof l(t)[e]=="function"?t[e]():p(t)?new E(t):b(t)?new k(t):new E(t)}}}),KU=ze({"node_modules/es6-iterator/for-of.js"(J,V){"use strict";var p=ny(),b=_g(),E=iy(),k=nM(),l=Array.isArray,e=Function.prototype.call,t=Array.prototype.some;V.exports=function(n,r){var a,o=arguments[2],s,c,m,h,v,g,i;if(l(n)||p(n)?a="array":E(n)?a="string":n=k(n),b(r),c=function(){m=!0},a==="array"){t.call(n,function(w){return e.call(r,o,w,c),m});return}if(a==="string"){for(v=n.length,h=0;h=55296&&i<=56319&&(g+=n[++h])),e.call(r,o,g,c),!m);++h);return}for(s=n.next();!s.done;){if(e.call(r,o,s.value,c),m)return;s=n.next()}}}}),JU=ze({"node_modules/es6-weak-map/is-native-implemented.js"(J,V){"use strict";V.exports=function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"}()}}),QU=ze({"node_modules/es6-weak-map/polyfill.js"(J,V){"use strict";var p=wv(),b=O2(),E=sU(),k=dp(),l=lU(),e=pp(),t=nM(),n=KU(),r=Tv().toStringTag,a=JU(),o=Array.isArray,s=Object.defineProperty,c=Object.prototype.hasOwnProperty,m=Object.getPrototypeOf,h;V.exports=h=function(){var v=arguments[0],g;if(!(this instanceof h))throw new TypeError("Constructor requires 'new'");return g=a&&b&&WeakMap!==h?b(new WeakMap,m(this)):this,p(v)&&(o(v)||(v=t(v))),s(g,"__weakMapData__",e("c","$weakMap$"+l())),v&&n(v,function(i){k(i),g.set(i[0],i[1])}),g},a&&(b&&b(h,WeakMap),h.prototype=Object.create(WeakMap.prototype,{constructor:e(h)})),Object.defineProperties(h.prototype,{delete:e(function(v){return c.call(E(v),this.__weakMapData__)?(delete v[this.__weakMapData__],!0):!1}),get:e(function(v){if(c.call(E(v),this.__weakMapData__))return v[this.__weakMapData__]}),has:e(function(v){return c.call(E(v),this.__weakMapData__)}),set:e(function(v,g){return s(E(v),this.__weakMapData__,e("c",g)),this}),toString:e(function(){return"[object WeakMap]"})}),s(h.prototype,r,e("c","WeakMap"))}}),iM=ze({"node_modules/es6-weak-map/index.js"(J,V){"use strict";V.exports=nU()()?WeakMap:QU()}}),eq=ze({"node_modules/array-find-index/index.js"(J,V){"use strict";V.exports=function(p,b,E){if(typeof Array.prototype.findIndex=="function")return p.findIndex(b,E);if(typeof b!="function")throw new TypeError("predicate must be a function");var k=Object(p),l=k.length;if(l===0)return-1;for(var e=0;eb.join==="round"?2:1,miterLimit:M.prop("miterLimit"),scale:M.prop("scale"),scaleFract:M.prop("scaleFract"),translateFract:M.prop("translateFract"),translate:M.prop("translate"),thickness:M.prop("thickness"),dashTexture:M.prop("dashTexture"),opacity:M.prop("opacity"),pixelRatio:M.context("pixelRatio"),id:M.prop("id"),dashLength:M.prop("dashLength"),viewport:(h,b)=>[b.viewport.x,b.viewport.y,h.viewportWidth,h.viewportHeight],depth:M.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(h,b)=>!b.overlay},stencil:{enable:!1},scissor:{enable:!0,box:M.prop("viewport")},viewport:M.prop("viewport")},g=M(w({vert:c,frag:p,attributes:{lineEnd:{buffer:T,divisor:0,stride:8,offset:0},lineTop:{buffer:T,divisor:0,stride:8,offset:4},aCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:M.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:M.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:M.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},E)),A;try{A=M(w({cull:{enable:!0,face:"back"},vert:y,frag:o,attributes:{lineEnd:{buffer:T,divisor:0,stride:8,offset:0},lineTop:{buffer:T,divisor:0,stride:8,offset:4},aColor:{buffer:M.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:M.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:M.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},E))}catch{A=g}return{fill:M({primitive:"triangle",elements:(h,b)=>b.triangles,offset:0,vert:f,frag:d,uniforms:{scale:M.prop("scale"),color:M.prop("fill"),scaleFract:M.prop("scaleFract"),translateFract:M.prop("translateFract"),translate:M.prop("translate"),opacity:M.prop("opacity"),pixelRatio:M.context("pixelRatio"),id:M.prop("id"),viewport:(h,b)=>[b.viewport.x,b.viewport.y,h.viewportWidth,h.viewportHeight]},attributes:{position:{buffer:M.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:M.prop("positionFractBuffer"),stride:8,offset:8}},blend:E.blend,depth:{enable:!1},scissor:E.scissor,stencil:E.stencil,viewport:E.viewport}),rect:g,miter:A}},x.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},x.prototype.render=function(...M){M.length&&this.update(...M),this.draw()},x.prototype.draw=function(...M){return(M.length?M:this.passes).forEach((T,E)=>{if(T&&Array.isArray(T))return this.draw(...T);typeof T=="number"&&(T=this.passes[T]),T&&T.count>1&&T.opacity&&(this.regl._refresh(),T.fill&&T.triangles&&T.triangles.length>2&&this.shaders.fill(T),T.thickness&&(T.scale[0]*T.viewport.width>x.precisionThreshold||T.scale[1]*T.viewport.height>x.precisionThreshold?this.shaders.rect(T):T.join==="rect"||!T.join&&(T.thickness<=2||T.count>=x.maxPoints)?this.shaders.rect(T):this.shaders.miter(T)))}),this},x.prototype.update=function(M){if(!M)return;M.length!=null?typeof M[0]=="number"&&(M=[{positions:M}]):Array.isArray(M)||(M=[M]);let{regl:T,gl:E}=this;if(M.forEach((A,m)=>{let h=this.passes[m];if(A!==void 0){if(A===null){this.passes[m]=null;return}if(typeof A[0]=="number"&&(A={positions:A}),A=S(A,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),h||(this.passes[m]=h={id:m,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:T.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:T.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:T.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:T.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},A=w({},x.defaults,A)),A.thickness!=null&&(h.thickness=parseFloat(A.thickness)),A.opacity!=null&&(h.opacity=parseFloat(A.opacity)),A.miterLimit!=null&&(h.miterLimit=parseFloat(A.miterLimit)),A.overlay!=null&&(h.overlay=!!A.overlay,mte-ae),q=[],Y=0,ee=h.hole!=null?h.hole[0]:null;if(ee!=null){let te=s(O,ae=>ae>=ee);O=O.slice(0,te),O.push(ee)}for(let te=0;teK-ee+(O[te]-Y)),H=e(ae,U);H=H.map(K=>K+Y+(K+Y{M.colorBuffer.destroy(),M.positionBuffer.destroy(),M.dashTexture.destroy()}),this.passes.length=0,this}}}),$N=De({"node_modules/regl-error2d/index.js"(j,N){"use strict";var u=Yp(),v=ap(),w=CT(),S=Dd(),l=_c(),e=Xp(),{float32:t,fract32:a}=Gb();N.exports=n;var r=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function n(i,s){if(typeof i=="function"?(s||(s={}),s.regl=i):s=i,s.length&&(s.positions=s),i=s.regl,!i.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=i._gl,p,f,d,y,o,x,M={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},T=[];return y=i.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),f=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),d=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),o=i.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),x=i.buffer({usage:"static",type:"float",data:r}),m(s),p=i({vert:` +`;V.exports=w;function w(S,M){if(!(this instanceof w))return new w(S,M);if(typeof S=="function"?(M||(M={}),M.regl=S):M=S,M.length&&(M.positions=M),S=M.regl,!S.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=S._gl,this.regl=S,this.passes=[],this.shaders=w.shaders.has(S)?w.shaders.get(S):w.shaders.set(S,w.createShaders(S)).get(S),this.update(M)}w.dashMult=2,w.maxPatternLength=256,w.precisionThreshold=3e6,w.maxPoints=1e4,w.maxLines=2048,w.shaders=new a,w.createShaders=function(S){let M=S.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),C={primitive:"triangle strip",instances:S.prop("count"),count:4,offset:0,uniforms:{miterMode:(u,A)=>A.join==="round"?2:1,miterLimit:S.prop("miterLimit"),scale:S.prop("scale"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),thickness:S.prop("thickness"),dashTexture:S.prop("dashTexture"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),dashLength:S.prop("dashLength"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight],depth:S.prop("depth")},blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:(u,A)=>!A.overlay},stencil:{enable:!1},scissor:{enable:!0,box:S.prop("viewport")},viewport:S.prop("viewport")},_=S(E({vert:c,frag:m,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},C)),T;try{T=S(E({cull:{enable:!0,face:"back"},vert:g,frag:i,attributes:{lineEnd:{buffer:M,divisor:0,stride:8,offset:0},lineTop:{buffer:M,divisor:0,stride:8,offset:4},aColor:{buffer:S.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:S.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:S.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},C))}catch{T=_}return{fill:S({primitive:"triangle",elements:(u,A)=>A.triangles,offset:0,vert:h,frag:v,uniforms:{scale:S.prop("scale"),color:S.prop("fill"),scaleFract:S.prop("scaleFract"),translateFract:S.prop("translateFract"),translate:S.prop("translate"),opacity:S.prop("opacity"),pixelRatio:S.context("pixelRatio"),id:S.prop("id"),viewport:(u,A)=>[A.viewport.x,A.viewport.y,u.viewportWidth,u.viewportHeight]},attributes:{position:{buffer:S.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:S.prop("positionFractBuffer"),stride:8,offset:8}},blend:C.blend,depth:{enable:!1},scissor:C.scissor,stencil:C.stencil,viewport:C.viewport}),rect:_,miter:T}},w.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},w.prototype.render=function(...S){S.length&&this.update(...S),this.draw()},w.prototype.draw=function(...S){return(S.length?S:this.passes).forEach((M,C)=>{if(M&&Array.isArray(M))return this.draw(...M);typeof M=="number"&&(M=this.passes[M]),M&&M.count>1&&M.opacity&&(this.regl._refresh(),M.fill&&M.triangles&&M.triangles.length>2&&this.shaders.fill(M),M.thickness&&(M.scale[0]*M.viewport.width>w.precisionThreshold||M.scale[1]*M.viewport.height>w.precisionThreshold?this.shaders.rect(M):M.join==="rect"||!M.join&&(M.thickness<=2||M.count>=w.maxPoints)?this.shaders.rect(M):this.shaders.miter(M)))}),this},w.prototype.update=function(S){if(!S)return;S.length!=null?typeof S[0]=="number"&&(S=[{positions:S}]):Array.isArray(S)||(S=[S]);let{regl:M,gl:C}=this;if(S.forEach((T,f)=>{let u=this.passes[f];if(T!==void 0){if(T===null){this.passes[f]=null;return}if(typeof T[0]=="number"&&(T={positions:T}),T=k(T,{positions:"positions points data coords",thickness:"thickness lineWidth lineWidths line-width linewidth width stroke-width strokewidth strokeWidth",join:"lineJoin linejoin join type mode",miterLimit:"miterlimit miterLimit",dashes:"dash dashes dasharray dash-array dashArray",color:"color colour stroke colors colours stroke-color strokeColor",fill:"fill fill-color fillColor",opacity:"alpha opacity",overlay:"overlay crease overlap intersect",close:"closed close closed-path closePath",range:"range dataBox",viewport:"viewport viewBox",hole:"holes hole hollow",splitNull:"splitNull"}),u||(this.passes[f]=u={id:f,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:M.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:M.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:M.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},T=E({},w.defaults,T)),T.thickness!=null&&(u.thickness=parseFloat(T.thickness)),T.opacity!=null&&(u.opacity=parseFloat(T.opacity)),T.miterLimit!=null&&(u.miterLimit=parseFloat(T.miterLimit)),T.overlay!=null&&(u.overlay=!!T.overlay,fne-se),$=[],Q=0,re=u.hole!=null?u.hole[0]:null;if(re!=null){let ne=s(U,se=>se>=re);U=U.slice(0,ne),U.push(re)}for(let ne=0;neK-re+(U[ne]-Q)),X=e(se,G);X=X.map(K=>K+Q+(K+Q{S.colorBuffer.destroy(),S.positionBuffer.destroy(),S.dashTexture.destroy()}),this.passes.length=0,this}}}),tq=ze({"node_modules/regl-error2d/index.js"(J,V){"use strict";var p=c0(),b=ay(),E=WA(),k=qd(),l=Vc(),e=f0(),{float32:t,fract32:n}=B2();V.exports=a;var r=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function a(o,s){if(typeof o=="function"?(s||(s={}),s.regl=o):s=o,s.length&&(s.positions=s),o=s.regl,!o.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let c=o._gl,m,h,v,g,i,w,S={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},M=[];return g=o.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),h=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=o.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),w=o.buffer({usage:"static",type:"float",data:r}),f(s),m=o({vert:` precision highp float; attribute vec2 position, positionFract; @@ -2614,10 +2615,10 @@ void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } - `,uniforms:{range:i.prop("range"),lineWidth:i.prop("lineWidth"),capSize:i.prop("capSize"),opacity:i.prop("opacity"),scale:i.prop("scale"),translate:i.prop("translate"),scaleFract:i.prop("scaleFract"),translateFract:i.prop("translateFract"),viewport:(b,_)=>[_.viewport.x,_.viewport.y,b.viewportWidth,b.viewportHeight]},attributes:{color:{buffer:y,offset:(b,_)=>_.offset*4,divisor:1},position:{buffer:f,offset:(b,_)=>_.offset*8,divisor:1},positionFract:{buffer:d,offset:(b,_)=>_.offset*8,divisor:1},error:{buffer:o,offset:(b,_)=>_.offset*16,divisor:1},direction:{buffer:x,stride:24,offset:0},lineOffset:{buffer:x,stride:24,offset:8},capOffset:{buffer:x,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:i.prop("viewport")},viewport:i.prop("viewport"),stencil:!1,instances:i.prop("count"),count:r.length}),l(E,{update:m,draw:g,destroy:h,regl:i,gl:c,canvas:c.canvas,groups:T}),E;function E(b){b?m(b):b===null&&h(),g()}function g(b){if(typeof b=="number")return A(b);b&&!Array.isArray(b)&&(b=[b]),i._refresh(),T.forEach((_,I)=>{if(_){if(b&&(b[I]?_.draw=!0:_.draw=!1),!_.draw){_.draw=!0;return}A(I)}})}function A(b){typeof b=="number"&&(b=T[b]),b!=null&&b&&b.count&&b.color&&b.opacity&&b.positions&&b.positions.length>1&&(b.scaleRatio=[b.scale[0]*b.viewport.width,b.scale[1]*b.viewport.height],p(b),b.after&&b.after(b))}function m(b){if(!b)return;b.length!=null?typeof b[0]=="number"&&(b=[{positions:b}]):Array.isArray(b)||(b=[b]);let _=0,I=0;if(E.groups=T=b.map((R,z)=>{let D=T[z];if(R)typeof R=="function"?R={after:R}:typeof R[0]=="number"&&(R={positions:R});else return D;return R=S(R,{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"}),D||(T[z]=D={id:z,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},R=l({},M,R)),w(D,R,[{lineWidth:k=>+k*.5,capSize:k=>+k*.5,opacity:parseFloat,errors:k=>(k=e(k),I+=k.length,k),positions:(k,B)=>(k=e(k,"float64"),B.count=Math.floor(k.length/2),B.bounds=u(k,2),B.offset=_,_+=B.count,k)},{color:(k,B)=>{let O=B.count;if(k||(k="transparent"),!Array.isArray(k)||typeof k[0]=="number"){let Y=k;k=Array(O);for(let ee=0;ee{let q=B.bounds;return k||(k=q),B.scale=[1/(k[2]-k[0]),1/(k[3]-k[1])],B.translate=[-k[0],-k[1]],B.scaleFract=a(B.scale),B.translateFract=a(B.translate),k},viewport:k=>{let B;return Array.isArray(k)?B={x:k[0],y:k[1],width:k[2]-k[0],height:k[3]-k[1]}:k?(B={x:k.x||k.left||0,y:k.y||k.top||0},k.right?B.width=k.right-B.x:B.width=k.w||k.width||0,k.bottom?B.height=k.bottom-B.y:B.height=k.h||k.height||0):B={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},B}}]),D}),_||I){let R=T.reduce((B,O,q)=>B+(O?O.count:0),0),z=new Float64Array(R*2),D=new Uint8Array(R*4),k=new Float32Array(R*4);T.forEach((B,O)=>{if(!B)return;let{positions:q,count:Y,offset:ee,color:te,errors:ae}=B;Y&&(D.set(te,ee*4),k.set(ae,ee*4),z.set(q,ee*2))});var C=t(z);f(C);var F=a(z,C);d(F),y(D),o(k)}}function h(){f.destroy(),d.destroy(),y.destroy(),o.destroy(),x.destroy()}}}}),KN=De({"node_modules/unquote/index.js"(j,N){var u=/[\'\"]/;N.exports=function(w){return w?(u.test(w.charAt(0))&&(w=w.substr(1)),u.test(w.charAt(w.length-1))&&(w=w.substr(0,w.length-1)),w):""}}}),GT=De({"node_modules/css-global-keywords/index.json"(j,N){N.exports=["inherit","initial","unset"]}}),VT=De({"node_modules/css-system-font-keywords/index.json"(j,N){N.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),HT=De({"node_modules/css-font-weight-keywords/index.json"(j,N){N.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),WT=De({"node_modules/css-font-style-keywords/index.json"(j,N){N.exports=["normal","italic","oblique"]}}),YT=De({"node_modules/css-font-stretch-keywords/index.json"(j,N){N.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),JN=De({"node_modules/parenthesis/index.js"(j,N){"use strict";function u(S,l){if(typeof S!="string")return[S];var e=[S];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],a=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),p=[];function f(d,y,o){var x=e.push(d.slice(s[0].length,-s[1].length))-1;return p.push(x),a+x+a}e.forEach(function(d,y){for(var o,x=0;d!=o;)if(o=d,d=d.replace(c,f),x++>1e4)throw Error("References have circular dependency. Please, check them.");e[y]=d}),p=p.reverse(),e=e.map(function(d){return p.forEach(function(y){d=d.replace(new RegExp("(\\"+a+y+"\\"+a+")","g"),s[0]+"$1"+s[1])}),d})});var n=new RegExp("\\"+a+"([0-9]+)\\"+a);function i(s,c,p){for(var f=[],d,y=0;d=n.exec(s);){if(y++>1e4)throw Error("Circular references in parenthesis");f.push(s.slice(0,d.index)),f.push(i(c[d[1]],c)),s=s.slice(d.index+d[0].length)}return f.push(s),f}return r?e:i(e[0],e)}function v(S,l){if(l&&l.flat){var e=l&&l.escape||"___",t=S[0],a;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),n=0;t!=a;){if(n++>1e4)throw Error("Circular references in "+S);a=t,t=t.replace(r,i)}return t}return S.reduce(function s(c,p){return Array.isArray(p)&&(p=p.reduce(s,"")),c+p},"");function i(s,c){if(S[c]==null)throw Error("Reference "+c+"is undefined");return S[c]}}function w(S,l){return Array.isArray(S)?v(S,l):u(S,l)}w.parse=u,w.stringify=v,N.exports=w}}),QN=De({"node_modules/string-split-by/index.js"(j,N){"use strict";var u=JN();N.exports=function(w,S,l){if(w==null)throw Error("First argument should be a string");if(S==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=u.parse(w,{flat:!0,brackets:l.ignore}),t=e[0],a=t.split(S);if(l.escape){for(var r=[],n=0;n1&&Lt===Dt&&(Lt==='"'||Lt==="'"))return['"'+t(He.substr(1,He.length-2))+'"'];var Tr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(He);if(Tr)return a(He.substr(0,Tr.index)).concat(a(Tr[1])).concat(a(He.substr(Tr.index+Tr[0].length)));var Nr=He.split(".");if(Nr.length===1)return['"'+t(He)+'"'];for(var qr=[],Or=0;Or"u"?1:window.devicePixelRatio,Pa=!1,En={},cn=function(gr){},Wa=function(){};if(typeof Lt=="string"?Dt=document.querySelector(Lt):typeof Lt=="object"&&(x(Lt)?Dt=Lt:M(Lt)?(qr=Lt,Nr=qr.canvas):("gl"in Lt?qr=Lt.gl:"canvas"in Lt?Nr=E(Lt.canvas):"container"in Lt&&(Tr=E(Lt.container)),"attributes"in Lt&&(Or=Lt.attributes),"extensions"in Lt&&(fa=T(Lt.extensions)),"optionalExtensions"in Lt&&(Sa=T(Lt.optionalExtensions)),"onDone"in Lt&&(cn=Lt.onDone),"profile"in Lt&&(Pa=!!Lt.profile),"pixelRatio"in Lt&&(Ca=+Lt.pixelRatio),"cachedCode"in Lt&&(En=Lt.cachedCode))),Dt&&(Dt.nodeName.toLowerCase()==="canvas"?Nr=Dt:Tr=Dt),!qr){if(!Nr){var ta=y(Tr||document.body,cn,Ca);if(!ta)return null;Nr=ta.canvas,Wa=ta.onDestroy}Or.premultipliedAlpha===void 0&&(Or.premultipliedAlpha=!0),qr=o(Nr,Or)}return qr?{gl:qr,canvas:Nr,container:Tr,extensions:fa,optionalExtensions:Sa,pixelRatio:Ca,profile:Pa,cachedCode:En,onDone:cn,onDestroy:Wa}:(Wa(),cn("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(He,Lt){var Dt={};function Tr(Or){var fa=Or.toLowerCase(),Sa;try{Sa=Dt[fa]=He.getExtension(fa)}catch{}return!!Sa}for(var Nr=0;Nr65535)<<4,He>>>=Lt,Dt=(He>255)<<3,He>>>=Dt,Lt|=Dt,Dt=(He>15)<<2,He>>>=Dt,Lt|=Dt,Dt=(He>3)<<1,He>>>=Dt,Lt|=Dt,Lt|He>>1}function k(){var He=m(8,function(){return[]});function Lt(qr){var Or=z(qr),fa=He[D(Or)>>2];return fa.length>0?fa.pop():new ArrayBuffer(Or)}function Dt(qr){He[D(qr.byteLength)>>2].push(qr)}function Tr(qr,Or){var fa=null;switch(qr){case h:fa=new Int8Array(Lt(Or),0,Or);break;case b:fa=new Uint8Array(Lt(Or),0,Or);break;case _:fa=new Int16Array(Lt(2*Or),0,Or);break;case I:fa=new Uint16Array(Lt(2*Or),0,Or);break;case C:fa=new Int32Array(Lt(4*Or),0,Or);break;case F:fa=new Uint32Array(Lt(4*Or),0,Or);break;case R:fa=new Float32Array(Lt(4*Or),0,Or);break;default:return null}return fa.length!==Or?fa.subarray(0,Or):fa}function Nr(qr){Dt(qr.buffer)}return{alloc:Lt,free:Dt,allocType:Tr,freeType:Nr}}var B=k();B.zero=k();var O=3408,q=3410,Y=3411,ee=3412,te=3413,ae=3414,U=3415,H=33901,K=33902,V=3379,$=3386,X=34921,Z=36347,Q=36348,re=35661,ce=35660,me=34930,ye=36349,Ae=34076,Se=34024,Ce=7936,qe=7937,Ue=7938,xe=35724,he=34047,oe=36063,le=34852,ne=3553,be=34067,Fe=34069,Ve=33984,je=6408,ut=5126,st=5121,yt=36160,At=36053,Pt=36064,Zt=16384,vr=function(He,Lt){var Dt=1;Lt.ext_texture_filter_anisotropic&&(Dt=He.getParameter(he));var Tr=1,Nr=1;Lt.webgl_draw_buffers&&(Tr=He.getParameter(le),Nr=He.getParameter(oe));var qr=!!Lt.oes_texture_float;if(qr){var Or=He.createTexture();He.bindTexture(ne,Or),He.texImage2D(ne,0,je,1,1,0,je,ut,null);var fa=He.createFramebuffer();if(He.bindFramebuffer(yt,fa),He.framebufferTexture2D(yt,Pt,ne,Or,0),He.bindTexture(ne,null),He.checkFramebufferStatus(yt)!==At)qr=!1;else{He.viewport(0,0,1,1),He.clearColor(1,0,0,1),He.clear(Zt);var Sa=B.allocType(ut,4);He.readPixels(0,0,1,1,je,ut,Sa),He.getError()?qr=!1:(He.deleteFramebuffer(fa),He.deleteTexture(Or),qr=Sa[0]===1),B.freeType(Sa)}}var Ca=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Pa=!0;if(!Ca){var En=He.createTexture(),cn=B.allocType(st,36);He.activeTexture(Ve),He.bindTexture(be,En),He.texImage2D(Fe,0,je,3,3,0,je,st,cn),B.freeType(cn),He.bindTexture(be,null),He.deleteTexture(En),Pa=!He.getError()}return{colorBits:[He.getParameter(q),He.getParameter(Y),He.getParameter(ee),He.getParameter(te)],depthBits:He.getParameter(ae),stencilBits:He.getParameter(U),subpixelBits:He.getParameter(O),extensions:Object.keys(Lt).filter(function(Wa){return!!Lt[Wa]}),maxAnisotropic:Dt,maxDrawbuffers:Tr,maxColorAttachments:Nr,pointSizeDims:He.getParameter(H),lineWidthDims:He.getParameter(K),maxViewportDims:He.getParameter($),maxCombinedTextureUnits:He.getParameter(re),maxCubeMapSize:He.getParameter(Ae),maxRenderbufferSize:He.getParameter(Se),maxTextureUnits:He.getParameter(me),maxTextureSize:He.getParameter(V),maxAttributes:He.getParameter(X),maxVertexUniforms:He.getParameter(Z),maxVertexTextureUnits:He.getParameter(ce),maxVaryingVectors:He.getParameter(Q),maxFragmentUniforms:He.getParameter(ye),glsl:He.getParameter(xe),renderer:He.getParameter(qe),vendor:He.getParameter(Ce),version:He.getParameter(Ue),readFloat:qr,npotTextureCube:Pa}},Nt=function(He){return He instanceof Uint8Array||He instanceof Uint16Array||He instanceof Uint32Array||He instanceof Int8Array||He instanceof Int16Array||He instanceof Int32Array||He instanceof Float32Array||He instanceof Float64Array||He instanceof Uint8ClampedArray};function Kt(He){return!!He&&typeof He=="object"&&Array.isArray(He.shape)&&Array.isArray(He.stride)&&typeof He.offset=="number"&&He.shape.length===He.stride.length&&(Array.isArray(He.data)||Nt(He.data))}var nt=function(He){return Object.keys(He).map(function(Lt){return He[Lt]})},Ee={shape:We,flatten:Be};function ze(He,Lt,Dt){for(var Tr=0;Tr0){var Sn;if(Array.isArray(Hr[0])){Ua=aa(Hr);for(var na=1,ea=1;ea0){if(typeof na[0]=="number"){var Ia=B.allocType(ia.dtype,na.length);Gn(Ia,na),Ua(Ia,tn),B.freeType(Ia)}else if(Array.isArray(na[0])||Nt(na[0])){ja=aa(na);var Fa=oa(na,ja,ia.dtype);Ua(Fa,tn),B.freeType(Fa)}}}else if(Kt(na)){ja=na.shape;var rn=na.stride,kn=0,Vn=0,Oa=0,ln=0;ja.length===1?(kn=ja[0],Vn=1,Oa=rn[0],ln=0):ja.length===2&&(kn=ja[0],Vn=ja[1],Oa=rn[0],ln=rn[1]);var Hn=Array.isArray(na.data)?ia.dtype:xa(na.data),Wn=B.allocType(Hn,kn*Vn);Pn(Wn,na.data,kn,Vn,Oa,ln,na.offset),Ua(Wn,tn),B.freeType(Wn)}return Ya}return ha||Ya(gr),Ya._reglType="buffer",Ya._buffer=ia,Ya.subdata=Sn,Dt.profile&&(Ya.stats=ia.stats),Ya.destroy=function(){cn(ia)},Ya}function ta(){nt(qr).forEach(function(gr){gr.buffer=He.createBuffer(),He.bindBuffer(gr.type,gr.buffer),He.bufferData(gr.type,gr.persistentData||gr.byteLength,gr.usage)})}return Dt.profile&&(Lt.getTotalBufferSize=function(){var gr=0;return Object.keys(qr).forEach(function(Hr){gr+=qr[Hr].stats.size}),gr}),{create:Wa,createStream:Sa,destroyStream:Ca,clear:function(){nt(qr).forEach(cn),fa.forEach(cn)},getBuffer:function(gr){return gr&&gr._buffer instanceof Or?gr._buffer:null},restore:ta,_initBuffer:En}}var Yn=0,Zn=0,vi=1,Dn=1,oi=4,on=4,mn={points:Yn,point:Zn,lines:vi,line:Dn,triangles:oi,triangle:on,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},bi=0,Li=1,$a=4,Va=5120,it=5121,Qe=5122,Jt=5123,Yt=5124,ar=5125,cr=34963,tr=35040,Je=35044;function bt(He,Lt,Dt,Tr){var Nr={},qr=0,Or={uint8:it,uint16:Jt};Lt.oes_element_index_uint&&(Or.uint32=ar);function fa(ta){this.id=qr++,Nr[this.id]=this,this.buffer=ta,this.primType=$a,this.vertCount=0,this.type=0}fa.prototype.bind=function(){this.buffer.bind()};var Sa=[];function Ca(ta){var gr=Sa.pop();return gr||(gr=new fa(Dt.create(null,cr,!0,!1)._buffer)),En(gr,ta,tr,-1,-1,0,0),gr}function Pa(ta){Sa.push(ta)}function En(ta,gr,Hr,ha,Ea,ia,Ya){ta.buffer.bind();var Ua;if(gr){var Sn=Ya;!Ya&&(!Nt(gr)||Kt(gr)&&!Nt(gr.data))&&(Sn=Lt.oes_element_index_uint?ar:Jt),Dt._initBuffer(ta.buffer,gr,Hr,Sn,3)}else He.bufferData(cr,ia,Hr),ta.buffer.dtype=Ua||it,ta.buffer.usage=Hr,ta.buffer.dimension=3,ta.buffer.byteLength=ia;if(Ua=Ya,!Ya){switch(ta.buffer.dtype){case it:case Va:Ua=it;break;case Jt:case Qe:Ua=Jt;break;case ar:case Yt:Ua=ar;break;default:}ta.buffer.dtype=Ua}ta.type=Ua;var na=Ea;na<0&&(na=ta.buffer.byteLength,Ua===Jt?na>>=1:Ua===ar&&(na>>=2)),ta.vertCount=na;var ea=ha;if(ha<0){ea=$a;var tn=ta.buffer.dimension;tn===1&&(ea=bi),tn===2&&(ea=Li),tn===3&&(ea=$a)}ta.primType=ea}function cn(ta){Tr.elementsCount--,delete Nr[ta.id],ta.buffer.destroy(),ta.buffer=null}function Wa(ta,gr){var Hr=Dt.create(null,cr,!0),ha=new fa(Hr._buffer);Tr.elementsCount++;function Ea(ia){if(!ia)Hr(),ha.primType=$a,ha.vertCount=0,ha.type=it;else if(typeof ia=="number")Hr(ia),ha.primType=$a,ha.vertCount=ia|0,ha.type=it;else{var Ya=null,Ua=Je,Sn=-1,na=-1,ea=0,tn=0;Array.isArray(ia)||Nt(ia)||Kt(ia)?Ya=ia:("data"in ia&&(Ya=ia.data),"usage"in ia&&(Ua=pa[ia.usage]),"primitive"in ia&&(Sn=mn[ia.primitive]),"count"in ia&&(na=ia.count|0),"type"in ia&&(tn=Or[ia.type]),"length"in ia?ea=ia.length|0:(ea=na,tn===Jt||tn===Qe?ea*=2:(tn===ar||tn===Yt)&&(ea*=4))),En(ha,Ya,Ua,Sn,na,ea,tn)}return Ea}return Ea(ta),Ea._reglType="elements",Ea._elements=ha,Ea.subdata=function(ia,Ya){return Hr.subdata(ia,Ya),Ea},Ea.destroy=function(){cn(ha)},Ea}return{create:Wa,createStream:Ca,destroyStream:Pa,getElements:function(ta){return typeof ta=="function"&&ta._elements instanceof fa?ta._elements:null},clear:function(){nt(Nr).forEach(cn)}}}var qt=new Float32Array(1),Qt=new Uint32Array(qt.buffer),br=5123;function Ir(He){for(var Lt=B.allocType(br,He.length),Dt=0;Dt>>31<<15,qr=(Tr<<1>>>24)-127,Or=Tr>>13&1023;if(qr<-24)Lt[Dt]=Nr;else if(qr<-14){var fa=-14-qr;Lt[Dt]=Nr+(Or+1024>>fa)}else qr>15?Lt[Dt]=Nr+31744:Lt[Dt]=Nr+(qr+15<<10)+Or}return Lt}function Cr(He){return Array.isArray(He)||Nt(He)}var Mr=34467,Xr=3553,Ra=34067,wa=34069,yn=6408,fn=6406,ri=6407,On=6409,ui=6410,jn=32854,oo=32855,Qi=36194,Mn=32819,bo=32820,so=33635,Hi=34042,yo=6402,Bi=34041,fo=35904,Po=35906,po=36193,Kn=33776,yi=33777,Yi=33778,zi=33779,Uo=35986,Co=35987,Wo=34798,Go=35840,ns=35841,Ro=35842,Zi=35843,ls=36196,Eo=5121,mo=5123,Zs=5125,qo=5126,Ds=10242,Us=10243,is=10497,cl=33071,ml=33648,Qo=10240,Gl=10241,ys=9728,$o=9729,wo=9984,go=9985,rs=9986,$l=9987,cu=33170,Kl=4352,Wu=4353,Yu=4354,rc=34046,ac=3317,xc=37440,Ec=37441,fu=37443,hu=37444,du=33984,Jl=[wo,rs,go,$l],Fs=[0,On,ui,ri,yn],Yo={};Yo[On]=Yo[fn]=Yo[yo]=1,Yo[Bi]=Yo[ui]=2,Yo[ri]=Yo[fo]=3,Yo[yn]=Yo[Po]=4;function tl(He){return"[object "+He+"]"}var wu=tl("HTMLCanvasElement"),Xu=tl("OffscreenCanvas"),kc=tl("CanvasRenderingContext2D"),zs=tl("ImageBitmap"),Zf=tl("HTMLImageElement"),Io=tl("HTMLVideoElement"),$f=Object.keys(Xe).concat([wu,Xu,kc,zs,Zf,Io]),Vo=[];Vo[Eo]=1,Vo[qo]=4,Vo[po]=2,Vo[mo]=2,Vo[Zs]=4;var qi=[];qi[jn]=2,qi[oo]=2,qi[Qi]=2,qi[Bi]=4,qi[Kn]=.5,qi[yi]=.5,qi[Yi]=1,qi[zi]=1,qi[Uo]=.5,qi[Co]=1,qi[Wo]=1,qi[Go]=.5,qi[ns]=.25,qi[Ro]=.5,qi[Zi]=.25,qi[ls]=.5;function Zu(He){return Array.isArray(He)&&(He.length===0||typeof He[0]=="number")}function bc(He){if(!Array.isArray(He))return!1;var Lt=He.length;return!(Lt===0||!Cr(He[0]))}function El(He){return Object.prototype.toString.call(He)}function mf(He){return El(He)===wu}function Au(He){return El(He)===Xu}function nc(He){return El(He)===kc}function rl(He){return El(He)===zs}function gf(He){return El(He)===Zf}function Yc(He){return El(He)===Io}function ic(He){if(!He)return!1;var Lt=El(He);return $f.indexOf(Lt)>=0?!0:Zu(He)||bc(He)||Kt(He)}function oc(He){return Xe[Object.prototype.toString.call(He)]|0}function Xc(He,Lt){var Dt=Lt.length;switch(He.type){case Eo:case mo:case Zs:case qo:var Tr=B.allocType(He.type,Dt);Tr.set(Lt),He.data=Tr;break;case po:He.data=Ir(Lt);break;default:}}function Zc(He,Lt){return B.allocType(He.type===po?qo:He.type,Lt)}function Ql(He,Lt){He.type===po?(He.data=Ir(Lt),B.freeType(Lt)):He.data=Lt}function Cc(He,Lt,Dt,Tr,Nr,qr){for(var Or=He.width,fa=He.height,Sa=He.channels,Ca=Or*fa*Sa,Pa=Zc(He,Ca),En=0,cn=0;cn=1;)fa+=Or*Sa*Sa,Sa/=2;return fa}else return Or*Dt*Tr}function sc(He,Lt,Dt,Tr,Nr,qr,Or){var fa={"don't care":Kl,"dont care":Kl,nice:Yu,fast:Wu},Sa={repeat:is,clamp:cl,mirror:ml},Ca={nearest:ys,linear:$o},Pa=u({mipmap:$l,"nearest mipmap nearest":wo,"linear mipmap nearest":go,"nearest mipmap linear":rs,"linear mipmap linear":$l},Ca),En={none:0,browser:hu},cn={uint8:Eo,rgba4:Mn,rgb565:so,"rgb5 a1":bo},Wa={alpha:fn,luminance:On,"luminance alpha":ui,rgb:ri,rgba:yn,rgba4:jn,"rgb5 a1":oo,rgb565:Qi},ta={};Lt.ext_srgb&&(Wa.srgb=fo,Wa.srgba=Po),Lt.oes_texture_float&&(cn.float32=cn.float=qo),Lt.oes_texture_half_float&&(cn.float16=cn["half float"]=po),Lt.webgl_depth_texture&&(u(Wa,{depth:yo,"depth stencil":Bi}),u(cn,{uint16:mo,uint32:Zs,"depth stencil":Hi})),Lt.webgl_compressed_texture_s3tc&&u(ta,{"rgb s3tc dxt1":Kn,"rgba s3tc dxt1":yi,"rgba s3tc dxt3":Yi,"rgba s3tc dxt5":zi}),Lt.webgl_compressed_texture_atc&&u(ta,{"rgb atc":Uo,"rgba atc explicit alpha":Co,"rgba atc interpolated alpha":Wo}),Lt.webgl_compressed_texture_pvrtc&&u(ta,{"rgb pvrtc 4bppv1":Go,"rgb pvrtc 2bppv1":ns,"rgba pvrtc 4bppv1":Ro,"rgba pvrtc 2bppv1":Zi}),Lt.webgl_compressed_texture_etc1&&(ta["rgb etc1"]=ls);var gr=Array.prototype.slice.call(He.getParameter(Mr));Object.keys(ta).forEach(function(Ct){var Fr=ta[Ct];gr.indexOf(Fr)>=0&&(Wa[Ct]=Fr)});var Hr=Object.keys(Wa);Dt.textureFormats=Hr;var ha=[];Object.keys(Wa).forEach(function(Ct){var Fr=Wa[Ct];ha[Fr]=Ct});var Ea=[];Object.keys(cn).forEach(function(Ct){var Fr=cn[Ct];Ea[Fr]=Ct});var ia=[];Object.keys(Ca).forEach(function(Ct){var Fr=Ca[Ct];ia[Fr]=Ct});var Ya=[];Object.keys(Pa).forEach(function(Ct){var Fr=Pa[Ct];Ya[Fr]=Ct});var Ua=[];Object.keys(Sa).forEach(function(Ct){var Fr=Sa[Ct];Ua[Fr]=Ct});var Sn=Hr.reduce(function(Ct,Fr){var zr=Wa[Fr];return zr===On||zr===fn||zr===On||zr===ui||zr===yo||zr===Bi||Lt.ext_srgb&&(zr===fo||zr===Po)?Ct[zr]=zr:zr===oo||Fr.indexOf("rgba")>=0?Ct[zr]=yn:Ct[zr]=ri,Ct},{});function na(){this.internalformat=yn,this.format=yn,this.type=Eo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=hu,this.width=0,this.height=0,this.channels=0}function ea(Ct,Fr){Ct.internalformat=Fr.internalformat,Ct.format=Fr.format,Ct.type=Fr.type,Ct.compressed=Fr.compressed,Ct.premultiplyAlpha=Fr.premultiplyAlpha,Ct.flipY=Fr.flipY,Ct.unpackAlignment=Fr.unpackAlignment,Ct.colorSpace=Fr.colorSpace,Ct.width=Fr.width,Ct.height=Fr.height,Ct.channels=Fr.channels}function tn(Ct,Fr){if(!(typeof Fr!="object"||!Fr)){if("premultiplyAlpha"in Fr&&(Ct.premultiplyAlpha=Fr.premultiplyAlpha),"flipY"in Fr&&(Ct.flipY=Fr.flipY),"alignment"in Fr&&(Ct.unpackAlignment=Fr.alignment),"colorSpace"in Fr&&(Ct.colorSpace=En[Fr.colorSpace]),"type"in Fr){var zr=Fr.type;Ct.type=cn[zr]}var dn=Ct.width,Mi=Ct.height,xo=Ct.channels,vn=!1;"shape"in Fr?(dn=Fr.shape[0],Mi=Fr.shape[1],Fr.shape.length===3&&(xo=Fr.shape[2],vn=!0)):("radius"in Fr&&(dn=Mi=Fr.radius),"width"in Fr&&(dn=Fr.width),"height"in Fr&&(Mi=Fr.height),"channels"in Fr&&(xo=Fr.channels,vn=!0)),Ct.width=dn|0,Ct.height=Mi|0,Ct.channels=xo|0;var wt=!1;if("format"in Fr){var It=Fr.format,$t=Ct.internalformat=Wa[It];Ct.format=Sn[$t],It in cn&&("type"in Fr||(Ct.type=cn[It])),It in ta&&(Ct.compressed=!0),wt=!0}!vn&&wt?Ct.channels=Yo[Ct.format]:vn&&!wt&&Ct.channels!==Fs[Ct.format]&&(Ct.format=Ct.internalformat=Fs[Ct.channels])}}function ja(Ct){He.pixelStorei(xc,Ct.flipY),He.pixelStorei(Ec,Ct.premultiplyAlpha),He.pixelStorei(fu,Ct.colorSpace),He.pixelStorei(ac,Ct.unpackAlignment)}function Ia(){na.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Fa(Ct,Fr){var zr=null;if(ic(Fr)?zr=Fr:Fr&&(tn(Ct,Fr),"x"in Fr&&(Ct.xOffset=Fr.x|0),"y"in Fr&&(Ct.yOffset=Fr.y|0),ic(Fr.data)&&(zr=Fr.data)),Fr.copy){var dn=Nr.viewportWidth,Mi=Nr.viewportHeight;Ct.width=Ct.width||dn-Ct.xOffset,Ct.height=Ct.height||Mi-Ct.yOffset,Ct.needsCopy=!0}else if(!zr)Ct.width=Ct.width||1,Ct.height=Ct.height||1,Ct.channels=Ct.channels||4;else if(Nt(zr))Ct.channels=Ct.channels||4,Ct.data=zr,!("type"in Fr)&&Ct.type===Eo&&(Ct.type=oc(zr));else if(Zu(zr))Ct.channels=Ct.channels||4,Xc(Ct,zr),Ct.alignment=1,Ct.needsFree=!0;else if(Kt(zr)){var xo=zr.data;!Array.isArray(xo)&&Ct.type===Eo&&(Ct.type=oc(xo));var vn=zr.shape,wt=zr.stride,It,$t,Rr,Vr,_r,mr;vn.length===3?(Rr=vn[2],mr=wt[2]):(Rr=1,mr=1),It=vn[0],$t=vn[1],Vr=wt[0],_r=wt[1],Ct.alignment=1,Ct.width=It,Ct.height=$t,Ct.channels=Rr,Ct.format=Ct.internalformat=Fs[Rr],Ct.needsFree=!0,Cc(Ct,xo,Vr,_r,mr,zr.offset)}else if(mf(zr)||Au(zr)||nc(zr))mf(zr)||Au(zr)?Ct.element=zr:Ct.element=zr.canvas,Ct.width=Ct.element.width,Ct.height=Ct.element.height,Ct.channels=4;else if(rl(zr))Ct.element=zr,Ct.width=zr.width,Ct.height=zr.height,Ct.channels=4;else if(gf(zr))Ct.element=zr,Ct.width=zr.naturalWidth,Ct.height=zr.naturalHeight,Ct.channels=4;else if(Yc(zr))Ct.element=zr,Ct.width=zr.videoWidth,Ct.height=zr.videoHeight,Ct.channels=4;else if(bc(zr)){var ir=Ct.width||zr[0].length,Wt=Ct.height||zr.length,rr=Ct.channels;Cr(zr[0][0])?rr=rr||zr[0][0].length:rr=rr||1;for(var zt=Ee.shape(zr),Sr=1,Yr=0;Yr>=Mi,zr.height>>=Mi,Fa(zr,dn[Mi]),Ct.mipmask|=1<=0&&!("faces"in Fr)&&(Ct.genMipmaps=!0)}if("mag"in Fr){var dn=Fr.mag;Ct.magFilter=Ca[dn]}var Mi=Ct.wrapS,xo=Ct.wrapT;if("wrap"in Fr){var vn=Fr.wrap;typeof vn=="string"?Mi=xo=Sa[vn]:Array.isArray(vn)&&(Mi=Sa[vn[0]],xo=Sa[vn[1]])}else{if("wrapS"in Fr){var wt=Fr.wrapS;Mi=Sa[wt]}if("wrapT"in Fr){var It=Fr.wrapT;xo=Sa[It]}}if(Ct.wrapS=Mi,Ct.wrapT=xo,"anisotropic"in Fr){var $t=Fr.anisotropic;Ct.anisotropic=Fr.anisotropic}if("mipmap"in Fr){var Rr=!1;switch(typeof Fr.mipmap){case"string":Ct.mipmapHint=fa[Fr.mipmap],Ct.genMipmaps=!0,Rr=!0;break;case"boolean":Rr=Ct.genMipmaps=Fr.mipmap;break;case"object":Ct.genMipmaps=!1,Rr=!0;break;default:}Rr&&!("min"in Fr)&&(Ct.minFilter=wo)}}function Ls(Ct,Fr){He.texParameteri(Fr,Gl,Ct.minFilter),He.texParameteri(Fr,Qo,Ct.magFilter),He.texParameteri(Fr,Ds,Ct.wrapS),He.texParameteri(Fr,Us,Ct.wrapT),Lt.ext_texture_filter_anisotropic&&He.texParameteri(Fr,rc,Ct.anisotropic),Ct.genMipmaps&&(He.hint(cu,Ct.mipmapHint),He.generateMipmap(Fr))}var Js=0,ps={},ms=Dt.maxTextureUnits,Ts=Array(ms).map(function(){return null});function si(Ct){na.call(this),this.mipmask=0,this.internalformat=yn,this.id=Js++,this.refCount=1,this.target=Ct,this.texture=He.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new _o,Or.profile&&(this.stats={size:0})}function Ps(Ct){He.activeTexture(du),He.bindTexture(Ct.target,Ct.texture)}function Mo(){var Ct=Ts[0];Ct?He.bindTexture(Ct.target,Ct.texture):He.bindTexture(Xr,null)}function il(Ct){var Fr=Ct.texture,zr=Ct.unit,dn=Ct.target;zr>=0&&(He.activeTexture(du+zr),He.bindTexture(dn,null),Ts[zr]=null),He.deleteTexture(Fr),Ct.texture=null,Ct.params=null,Ct.pixels=null,Ct.refCount=0,delete ps[Ct.id],qr.textureCount--}u(si.prototype,{bind:function(){var Ct=this;Ct.bindCount+=1;var Fr=Ct.unit;if(Fr<0){for(var zr=0;zr0)continue;dn.unit=-1}Ts[zr]=Ct,Fr=zr;break}Fr>=ms,Or.profile&&qr.maxTextureUnits>_r)-Rr,mr.height=mr.height||(zr.height>>_r)-Vr,Ps(zr),kn(mr,Xr,Rr,Vr,_r),Mo(),ln(mr),dn}function xo(vn,wt){var It=vn|0,$t=wt|0||It;if(It===zr.width&&$t===zr.height)return dn;dn.width=zr.width=It,dn.height=zr.height=$t,Ps(zr);for(var Rr=0;zr.mipmask>>Rr;++Rr){var Vr=It>>Rr,_r=$t>>Rr;if(!Vr||!_r)break;He.texImage2D(Xr,Rr,zr.format,Vr,_r,0,zr.format,zr.type,null)}return Mo(),Or.profile&&(zr.stats.size=eu(zr.internalformat,zr.type,It,$t,!1,!1)),dn}return dn(Ct,Fr),dn.subimage=Mi,dn.resize=xo,dn._reglType="texture2d",dn._texture=zr,Or.profile&&(dn.stats=zr.stats),dn.destroy=function(){zr.decRef()},dn}function wl(Ct,Fr,zr,dn,Mi,xo){var vn=new si(Ra);ps[vn.id]=vn,qr.cubeCount++;var wt=new Array(6);function It(Vr,_r,mr,ir,Wt,rr){var zt,Sr=vn.texInfo;for(_o.call(Sr),zt=0;zt<6;++zt)wt[zt]=Ei();if(typeof Vr=="number"||!Vr){var Yr=Vr|0||1;for(zt=0;zt<6;++zt)Wn(wt[zt],Yr,Yr)}else if(typeof Vr=="object")if(_r)gi(wt[0],Vr),gi(wt[1],_r),gi(wt[2],mr),gi(wt[3],ir),gi(wt[4],Wt),gi(wt[5],rr);else if(Hs(Sr,Vr),tn(vn,Vr),"faces"in Vr){var va=Vr.faces;for(zt=0;zt<6;++zt)ea(wt[zt],vn),gi(wt[zt],va[zt])}else for(zt=0;zt<6;++zt)gi(wt[zt],Vr);for(ea(vn,wt[0]),Sr.genMipmaps?vn.mipmask=(wt[0].width<<1)-1:vn.mipmask=wt[0].mipmask,vn.internalformat=wt[0].internalformat,It.width=wt[0].width,It.height=wt[0].height,Ps(vn),zt=0;zt<6;++zt)Jo(wt[zt],wa+zt);for(Ls(Sr,Ra),Mo(),Or.profile&&(vn.stats.size=eu(vn.internalformat,vn.type,It.width,It.height,Sr.genMipmaps,!0)),It.format=ha[vn.internalformat],It.type=Ea[vn.type],It.mag=ia[Sr.magFilter],It.min=Ya[Sr.minFilter],It.wrapS=Ua[Sr.wrapS],It.wrapT=Ua[Sr.wrapT],zt=0;zt<6;++zt)bl(wt[zt]);return It}function $t(Vr,_r,mr,ir,Wt){var rr=mr|0,zt=ir|0,Sr=Wt|0,Yr=Oa();return ea(Yr,vn),Yr.width=0,Yr.height=0,Fa(Yr,_r),Yr.width=Yr.width||(vn.width>>Sr)-rr,Yr.height=Yr.height||(vn.height>>Sr)-zt,Ps(vn),kn(Yr,wa+Vr,rr,zt,Sr),Mo(),ln(Yr),It}function Rr(Vr){var _r=Vr|0;if(_r!==vn.width){It.width=vn.width=_r,It.height=vn.height=_r,Ps(vn);for(var mr=0;mr<6;++mr)for(var ir=0;vn.mipmask>>ir;++ir)He.texImage2D(wa+mr,ir,vn.format,_r>>ir,_r>>ir,0,vn.format,vn.type,null);return Mo(),Or.profile&&(vn.stats.size=eu(vn.internalformat,vn.type,It.width,It.height,!1,!0)),It}}return It(Ct,Fr,zr,dn,Mi,xo),It.subimage=$t,It.resize=Rr,It._reglType="textureCube",It._texture=vn,Or.profile&&(It.stats=vn.stats),It.destroy=function(){vn.decRef()},It}function $n(){for(var Ct=0;Ct>dn,zr.height>>dn,0,zr.internalformat,zr.type,null);else for(var Mi=0;Mi<6;++Mi)He.texImage2D(wa+Mi,dn,zr.internalformat,zr.width>>dn,zr.height>>dn,0,zr.internalformat,zr.type,null);Ls(zr.texInfo,zr.target)})}function Gi(){for(var Ct=0;Ct=0?bl=!0:Sa.indexOf(_o)>=0&&(bl=!1))),("depthTexture"in si||"depthStencilTexture"in si)&&(Ts=!!(si.depthTexture||si.depthStencilTexture)),"depth"in si&&(typeof si.depth=="boolean"?Jo=si.depth:(Js=si.depth,As=!1)),"stencil"in si&&(typeof si.stencil=="boolean"?As=si.stencil:(ps=si.stencil,Jo=!1)),"depthStencil"in si&&(typeof si.depthStencil=="boolean"?Jo=As=si.depthStencil:(ms=si.depthStencil,Jo=!1,As=!1))}var Mo=null,il=null,ol=null,wl=null;if(Array.isArray(Ei))Mo=Ei.map(ta);else if(Ei)Mo=[ta(Ei)];else for(Mo=new Array(Ls),Hn=0;Hn0&&(ln.depth=Fa[0].depth,ln.stencil=Fa[0].stencil,ln.depthStencil=Fa[0].depthStencil),Fa[Oa]?Fa[Oa](ln):Fa[Oa]=ea(ln)}return u(rn,{width:Hn,height:Hn,color:_o})}function kn(Vn){var Oa,ln=Vn|0;if(ln===rn.width)return rn;var Hn=rn.color;for(Oa=0;Oa=Hn.byteLength?Wn.subdata(Hn):(Wn.destroy(),ea.buffers[Vn]=null)),ea.buffers[Vn]||(Wn=ea.buffers[Vn]=Nr.create(Oa,Kc,!1,!0)),ln.buffer=Nr.getBuffer(Wn),ln.size=ln.buffer.dimension|0,ln.normalized=!1,ln.type=ln.buffer.dtype,ln.offset=0,ln.stride=0,ln.divisor=0,ln.state=1,rn[Vn]=1}else Nr.getBuffer(Oa)?(ln.buffer=Nr.getBuffer(Oa),ln.size=ln.buffer.dimension|0,ln.normalized=!1,ln.type=ln.buffer.dtype,ln.offset=0,ln.stride=0,ln.divisor=0,ln.state=1):Nr.getBuffer(Oa.buffer)?(ln.buffer=Nr.getBuffer(Oa.buffer),ln.size=(+Oa.size||ln.buffer.dimension)|0,ln.normalized=!!Oa.normalized||!1,"type"in Oa?ln.type=jr[Oa.type]:ln.type=ln.buffer.dtype,ln.offset=(Oa.offset||0)|0,ln.stride=(Oa.stride||0)|0,ln.divisor=(Oa.divisor||0)|0,ln.state=1):"x"in Oa&&(ln.x=+Oa.x||0,ln.y=+Oa.y||0,ln.z=+Oa.z||0,ln.w=+Oa.w||0,ln.state=2)}for(var gi=0;gi1)for(var ja=0;jagr&&(gr=Hr.stats.uniformsCount)}),gr},Dt.getMaxAttributesCount=function(){var gr=0;return Pa.forEach(function(Hr){Hr.stats.attributesCount>gr&&(gr=Hr.stats.attributesCount)}),gr});function ta(){Nr={},qr={};for(var gr=0;gr16&&(Dt=Ba(Dt,He.length*8));for(var Tr=Array(16),Nr=Array(16),qr=0;qr<16;qr++)Tr[qr]=Dt[qr]^909522486,Nr[qr]=Dt[qr]^1549556828;var Or=Ba(Tr.concat(Ou(Lt)),512+Lt.length*8);return Tt(Ba(Nr.concat(Or),768))}function Mu(He){for(var Lt=eh?"0123456789ABCDEF":"0123456789abcdef",Dt="",Tr,Nr=0;Nr>>4&15)+Lt.charAt(Tr&15);return Dt}function Tf(He){for(var Lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dt="",Tr=He.length,Nr=0;NrHe.length*8?Dt+=Ic:Dt+=Lt.charAt(qr>>>6*(3-Or)&63);return Dt}function th(He,Lt){var Dt=Lt.length,Tr=Array(),Nr,qr,Or,fa,Sa=Array(Math.ceil(He.length/2));for(Nr=0;Nr0;){for(fa=Array(),Or=0,Nr=0;Nr0||qr>0)&&(fa[fa.length]=qr);Tr[Tr.length]=Or,Sa=fa}var Ca="";for(Nr=Tr.length-1;Nr>=0;Nr--)Ca+=Lt.charAt(Tr[Nr]);var Pa=Math.ceil(He.length*8/(Math.log(Lt.length)/Math.log(2)));for(Nr=Ca.length;Nr>>6&31,128|Tr&63):Tr<=65535?Lt+=String.fromCharCode(224|Tr>>>12&15,128|Tr>>>6&63,128|Tr&63):Tr<=2097151&&(Lt+=String.fromCharCode(240|Tr>>>18&7,128|Tr>>>12&63,128|Tr>>>6&63,128|Tr&63));return Lt}function Ou(He){for(var Lt=Array(He.length>>2),Dt=0;Dt>5]|=(He.charCodeAt(Dt/8)&255)<<24-Dt%32;return Lt}function Tt(He){for(var Lt="",Dt=0;Dt>5]>>>24-Dt%32&255);return Lt}function jt(He,Lt){return He>>>Lt|He<<32-Lt}function yr(He,Lt){return He>>>Lt}function dr(He,Lt,Dt){return He&Lt^~He&Dt}function Wr(He,Lt,Dt){return He&Lt^He&Dt^Lt&Dt}function ma(He){return jt(He,2)^jt(He,13)^jt(He,22)}function za(He){return jt(He,6)^jt(He,11)^jt(He,25)}function Ja(He){return jt(He,7)^jt(He,18)^yr(He,3)}function nn(He){return jt(He,17)^jt(He,19)^yr(He,10)}var Tn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Ba(He,Lt){var Dt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Tr=new Array(64),Nr,qr,Or,fa,Sa,Ca,Pa,En,cn,Wa,ta,gr;for(He[Lt>>5]|=128<<24-Lt%32,He[(Lt+64>>9<<4)+15]=Lt,cn=0;cn>16)+(Lt>>16)+(Dt>>16);return Tr<<16|Dt&65535}function Xa(He){return Array.prototype.slice.call(He)}function Aa(He){return Xa(He).join("")}function Fn(He){var Lt=He&&He.cache,Dt=0,Tr=[],Nr=[],qr=[];function Or(ta,gr){var Hr=gr&&gr.stable;if(!Hr){for(var ha=0;ha0&&(ta.push(Ea,"="),ta.push.apply(ta,Xa(arguments)),ta.push(";")),Ea}return u(gr,{def:ha,toString:function(){return Aa([Hr.length>0?"var "+Hr.join(",")+";":"",Aa(ta)])}})}function Sa(){var ta=fa(),gr=fa(),Hr=ta.toString,ha=gr.toString;function Ea(ia,Ya){gr(ia,Ya,"=",ta.def(ia,Ya),";")}return u(function(){ta.apply(ta,Xa(arguments))},{def:ta.def,entry:ta,exit:gr,save:Ea,set:function(ia,Ya,Ua){Ea(ia,Ya),ta(ia,Ya,"=",Ua,";")},toString:function(){return Hr()+ha()}})}function Ca(){var ta=Aa(arguments),gr=Sa(),Hr=Sa(),ha=gr.toString,Ea=Hr.toString;return u(gr,{then:function(){return gr.apply(gr,Xa(arguments)),this},else:function(){return Hr.apply(Hr,Xa(arguments)),this},toString:function(){var ia=Ea();return ia&&(ia="else{"+ia+"}"),Aa(["if(",ta,"){",ha(),"}",ia])}})}var Pa=fa(),En={};function cn(ta,gr){var Hr=[];function ha(){var Sn="a"+Hr.length;return Hr.push(Sn),Sn}gr=gr||0;for(var Ea=0;Ea[x.viewport.x,x.viewport.y,A.viewportWidth,A.viewportHeight]},attributes:{color:{buffer:g,offset:(A,x)=>x.offset*4,divisor:1},position:{buffer:h,offset:(A,x)=>x.offset*8,divisor:1},positionFract:{buffer:v,offset:(A,x)=>x.offset*8,divisor:1},error:{buffer:i,offset:(A,x)=>x.offset*16,divisor:1},direction:{buffer:w,stride:24,offset:0},lineOffset:{buffer:w,stride:24,offset:8},capOffset:{buffer:w,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:o.prop("viewport")},viewport:o.prop("viewport"),stencil:!1,instances:o.prop("count"),count:r.length}),l(C,{update:f,draw:_,destroy:u,regl:o,gl:c,canvas:c.canvas,groups:M}),C;function C(A){A?f(A):A===null&&u(),_()}function _(A){if(typeof A=="number")return T(A);A&&!Array.isArray(A)&&(A=[A]),o._refresh(),M.forEach((x,z)=>{if(x){if(A&&(A[z]?x.draw=!0:x.draw=!1),!x.draw){x.draw=!0;return}T(z)}})}function T(A){typeof A=="number"&&(A=M[A]),A!=null&&A&&A.count&&A.color&&A.opacity&&A.positions&&A.positions.length>1&&(A.scaleRatio=[A.scale[0]*A.viewport.width,A.scale[1]*A.viewport.height],m(A),A.after&&A.after(A))}function f(A){if(!A)return;A.length!=null?typeof A[0]=="number"&&(A=[{positions:A}]):Array.isArray(A)||(A=[A]);let x=0,z=0;if(C.groups=M=A.map((D,B)=>{let F=M[B];if(D)typeof D=="function"?D={after:D}:typeof D[0]=="number"&&(D={positions:D});else return F;return D=k(D,{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"}),F||(M[B]=F={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},D=l({},S,D)),E(F,D,[{lineWidth:P=>+P*.5,capSize:P=>+P*.5,opacity:parseFloat,errors:P=>(P=e(P),z+=P.length,P),positions:(P,j)=>(P=e(P,"float64"),j.count=Math.floor(P.length/2),j.bounds=p(P,2),j.offset=x,x+=j.count,P)},{color:(P,j)=>{let U=j.count;if(P||(P="transparent"),!Array.isArray(P)||typeof P[0]=="number"){let Q=P;P=Array(U);for(let re=0;re{let $=j.bounds;return P||(P=$),j.scale=[1/(P[2]-P[0]),1/(P[3]-P[1])],j.translate=[-P[0],-P[1]],j.scaleFract=n(j.scale),j.translateFract=n(j.translate),P},viewport:P=>{let j;return Array.isArray(P)?j={x:P[0],y:P[1],width:P[2]-P[0],height:P[3]-P[1]}:P?(j={x:P.x||P.left||0,y:P.y||P.top||0},P.right?j.width=P.right-j.x:j.width=P.w||P.width||0,P.bottom?j.height=P.bottom-j.y:j.height=P.h||P.height||0):j={x:0,y:0,width:c.drawingBufferWidth,height:c.drawingBufferHeight},j}}]),F}),x||z){let D=M.reduce((j,U,$)=>j+(U?U.count:0),0),B=new Float64Array(D*2),F=new Uint8Array(D*4),P=new Float32Array(D*4);M.forEach((j,U)=>{if(!j)return;let{positions:$,count:Q,offset:re,color:ne,errors:se}=j;Q&&(F.set(ne,re*4),P.set(se,re*4),B.set($,re*2))});var I=t(B);h(I);var O=n(B,I);v(O),g(F),i(P)}}function u(){h.destroy(),v.destroy(),g.destroy(),i.destroy(),w.destroy()}}}}),rq=ze({"node_modules/unquote/index.js"(J,V){var p=/[\'\"]/;V.exports=function(E){return E?(p.test(E.charAt(0))&&(E=E.substr(1)),p.test(E.charAt(E.length-1))&&(E=E.substr(0,E.length-1)),E):""}}}),sM=ze({"node_modules/css-global-keywords/index.json"(J,V){V.exports=["inherit","initial","unset"]}}),lM=ze({"node_modules/css-system-font-keywords/index.json"(J,V){V.exports=["caption","icon","menu","message-box","small-caption","status-bar"]}}),uM=ze({"node_modules/css-font-weight-keywords/index.json"(J,V){V.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]}}),cM=ze({"node_modules/css-font-style-keywords/index.json"(J,V){V.exports=["normal","italic","oblique"]}}),fM=ze({"node_modules/css-font-stretch-keywords/index.json"(J,V){V.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]}}),aq=ze({"node_modules/parenthesis/index.js"(J,V){"use strict";function p(k,l){if(typeof k!="string")return[k];var e=[k];typeof l=="string"||Array.isArray(l)?l={brackets:l}:l||(l={});var t=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],n=l.escape||"___",r=!!l.flat;t.forEach(function(s){var c=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),m=[];function h(v,g,i){var w=e.push(v.slice(s[0].length,-s[1].length))-1;return m.push(w),n+w+n}e.forEach(function(v,g){for(var i,w=0;v!=i;)if(i=v,v=v.replace(c,h),w++>1e4)throw Error("References have circular dependency. Please, check them.");e[g]=v}),m=m.reverse(),e=e.map(function(v){return m.forEach(function(g){v=v.replace(new RegExp("(\\"+n+g+"\\"+n+")","g"),s[0]+"$1"+s[1])}),v})});var a=new RegExp("\\"+n+"([0-9]+)\\"+n);function o(s,c,m){for(var h=[],v,g=0;v=a.exec(s);){if(g++>1e4)throw Error("Circular references in parenthesis");h.push(s.slice(0,v.index)),h.push(o(c[v[1]],c)),s=s.slice(v.index+v[0].length)}return h.push(s),h}return r?e:o(e[0],e)}function b(k,l){if(l&&l.flat){var e=l&&l.escape||"___",t=k[0],n;if(!t)return"";for(var r=new RegExp("\\"+e+"([0-9]+)\\"+e),a=0;t!=n;){if(a++>1e4)throw Error("Circular references in "+k);n=t,t=t.replace(r,o)}return t}return k.reduce(function s(c,m){return Array.isArray(m)&&(m=m.reduce(s,"")),c+m},"");function o(s,c){if(k[c]==null)throw Error("Reference "+c+"is undefined");return k[c]}}function E(k,l){return Array.isArray(k)?b(k,l):p(k,l)}E.parse=p,E.stringify=b,V.exports=E}}),nq=ze({"node_modules/string-split-by/index.js"(J,V){"use strict";var p=aq();V.exports=function(E,k,l){if(E==null)throw Error("First argument should be a string");if(k==null)throw Error("Separator should be a string or a RegExp");l?(typeof l=="string"||Array.isArray(l))&&(l={ignore:l}):l={},l.escape==null&&(l.escape=!0),l.ignore==null?l.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof l.ignore=="string"&&(l.ignore=[l.ignore]),l.ignore=l.ignore.map(function(c){return c.length===1&&(c=c+c),c}));var e=p.parse(E,{flat:!0,brackets:l.ignore}),t=e[0],n=t.split(k);if(l.escape){for(var r=[],a=0;a1&&It===Ut&&(It==='"'||It==="'"))return['"'+t(st.substr(1,st.length-2))+'"'];var ir=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(st);if(ir)return n(st.substr(0,ir.index)).concat(n(ir[1])).concat(n(st.substr(ir.index+ir[0].length)));var dr=st.split(".");if(dr.length===1)return['"'+t(st)+'"'];for(var Ar=[],hr=0;hr"u"?1:window.devicePixelRatio,ta=!1,ka={},Ta=function(ia){},Ra=function(){};if(typeof It=="string"?Ut=document.querySelector(It):typeof It=="object"&&(w(It)?Ut=It:S(It)?(Ar=It,dr=Ar.canvas):("gl"in It?Ar=It.gl:"canvas"in It?dr=C(It.canvas):"container"in It&&(ir=C(It.container)),"attributes"in It&&(hr=It.attributes),"extensions"in It&&(vr=M(It.extensions)),"optionalExtensions"in It&&(Or=M(It.optionalExtensions)),"onDone"in It&&(Ta=It.onDone),"profile"in It&&(ta=!!It.profile),"pixelRatio"in It&&(Cr=+It.pixelRatio),"cachedCode"in It&&(ka=It.cachedCode))),Ut&&(Ut.nodeName.toLowerCase()==="canvas"?dr=Ut:ir=Ut),!Ar){if(!dr){var ua=g(ir||document.body,Ta,Cr);if(!ua)return null;dr=ua.canvas,Ra=ua.onDestroy}hr.premultipliedAlpha===void 0&&(hr.premultipliedAlpha=!0),Ar=i(dr,hr)}return Ar?{gl:Ar,canvas:dr,container:ir,extensions:vr,optionalExtensions:Or,pixelRatio:Cr,profile:ta,cachedCode:ka,onDone:Ta,onDestroy:Ra}:(Ra(),Ta("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function T(st,It){var Ut={};function ir(hr){var vr=hr.toLowerCase(),Or;try{Or=Ut[vr]=st.getExtension(vr)}catch{}return!!Or}for(var dr=0;dr65535)<<4,st>>>=It,Ut=(st>255)<<3,st>>>=Ut,It|=Ut,Ut=(st>15)<<2,st>>>=Ut,It|=Ut,Ut=(st>3)<<1,st>>>=Ut,It|=Ut,It|st>>1}function P(){var st=f(8,function(){return[]});function It(Ar){var hr=B(Ar),vr=st[F(hr)>>2];return vr.length>0?vr.pop():new ArrayBuffer(hr)}function Ut(Ar){st[F(Ar.byteLength)>>2].push(Ar)}function ir(Ar,hr){var vr=null;switch(Ar){case u:vr=new Int8Array(It(hr),0,hr);break;case A:vr=new Uint8Array(It(hr),0,hr);break;case x:vr=new Int16Array(It(2*hr),0,hr);break;case z:vr=new Uint16Array(It(2*hr),0,hr);break;case I:vr=new Int32Array(It(4*hr),0,hr);break;case O:vr=new Uint32Array(It(4*hr),0,hr);break;case D:vr=new Float32Array(It(4*hr),0,hr);break;default:return null}return vr.length!==hr?vr.subarray(0,hr):vr}function dr(Ar){Ut(Ar.buffer)}return{alloc:It,free:Ut,allocType:ir,freeType:dr}}var j=P();j.zero=P();var U=3408,$=3410,Q=3411,re=3412,ne=3413,se=3414,G=3415,X=33901,K=33902,H=3379,Y=3386,q=34921,Z=36347,ee=36348,ae=35661,he=35660,xe=34930,we=36349,Me=34076,Se=34024,Ie=7936,Ve=7937,Ge=7938,ke=35724,_e=34047,ce=36063,ve=34852,le=3553,Ae=34067,Be=34069,Xe=33984,Ye=6408,yt=5126,gt=5121,Tt=36160,At=36053,$t=36064,rr=16384,_r=function(st,It){var Ut=1;It.ext_texture_filter_anisotropic&&(Ut=st.getParameter(_e));var ir=1,dr=1;It.webgl_draw_buffers&&(ir=st.getParameter(ve),dr=st.getParameter(ce));var Ar=!!It.oes_texture_float;if(Ar){var hr=st.createTexture();st.bindTexture(le,hr),st.texImage2D(le,0,Ye,1,1,0,Ye,yt,null);var vr=st.createFramebuffer();if(st.bindFramebuffer(Tt,vr),st.framebufferTexture2D(Tt,$t,le,hr,0),st.bindTexture(le,null),st.checkFramebufferStatus(Tt)!==At)Ar=!1;else{st.viewport(0,0,1,1),st.clearColor(1,0,0,1),st.clear(rr);var Or=j.allocType(yt,4);st.readPixels(0,0,1,1,Ye,yt,Or),st.getError()?Ar=!1:(st.deleteFramebuffer(vr),st.deleteTexture(hr),Ar=Or[0]===1),j.freeType(Or)}}var Cr=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),ta=!0;if(!Cr){var ka=st.createTexture(),Ta=j.allocType(gt,36);st.activeTexture(Xe),st.bindTexture(Ae,ka),st.texImage2D(Be,0,Ye,3,3,0,Ye,gt,Ta),j.freeType(Ta),st.bindTexture(Ae,null),st.deleteTexture(ka),ta=!st.getError()}return{colorBits:[st.getParameter($),st.getParameter(Q),st.getParameter(re),st.getParameter(ne)],depthBits:st.getParameter(se),stencilBits:st.getParameter(G),subpixelBits:st.getParameter(U),extensions:Object.keys(It).filter(function(Ra){return!!It[Ra]}),maxAnisotropic:Ut,maxDrawbuffers:ir,maxColorAttachments:dr,pointSizeDims:st.getParameter(X),lineWidthDims:st.getParameter(K),maxViewportDims:st.getParameter(Y),maxCombinedTextureUnits:st.getParameter(ae),maxCubeMapSize:st.getParameter(Me),maxRenderbufferSize:st.getParameter(Se),maxTextureUnits:st.getParameter(xe),maxTextureSize:st.getParameter(H),maxAttributes:st.getParameter(q),maxVertexUniforms:st.getParameter(Z),maxVertexTextureUnits:st.getParameter(he),maxVaryingVectors:st.getParameter(ee),maxFragmentUniforms:st.getParameter(we),glsl:st.getParameter(ke),renderer:st.getParameter(Ve),vendor:st.getParameter(Ie),version:st.getParameter(Ge),readFloat:Ar,npotTextureCube:ta}},Xt=function(st){return st instanceof Uint8Array||st instanceof Uint16Array||st instanceof Uint32Array||st instanceof Int8Array||st instanceof Int16Array||st instanceof Int32Array||st instanceof Float32Array||st instanceof Float64Array||st instanceof Uint8ClampedArray};function or(st){return!!st&&typeof st=="object"&&Array.isArray(st.shape)&&Array.isArray(st.stride)&&typeof st.offset=="number"&&st.shape.length===st.stride.length&&(Array.isArray(st.data)||Xt(st.data))}var Ot=function(st){return Object.keys(st).map(function(It){return st[It]})},vt={shape:Je,flatten:Ke};function ht(st,It,Ut){for(var ir=0;ir0){var ui;if(Array.isArray(ma[0])){Dn=cr(ma);for(var cn=1,sn=1;sn0){if(typeof cn[0]=="number"){var Rn=j.allocType(za.dtype,cn.length);un(Rn,cn),Dn(Rn,ei),j.freeType(Rn)}else if(Array.isArray(cn[0])||Xt(cn[0])){Pn=cr(cn);var In=ur(cn,Pn,za.dtype);Dn(In,ei),j.freeType(In)}}}else if(or(cn)){Pn=cn.shape;var Jn=cn.stride,Ei=0,so=0,ti=0,bi=0;Pn.length===1?(Ei=Pn[0],so=1,ti=Jn[0],bi=0):Pn.length===2&&(Ei=Pn[0],so=Pn[1],ti=Jn[0],bi=Jn[1]);var Wi=Array.isArray(cn.data)?za.dtype:La(cn.data),ro=j.allocType(Wi,Ei*so);Xa(ro,cn.data,Ei,so,ti,bi,cn.offset),Dn(ro,ei),j.freeType(ro)}return kn}return da||kn(ia),kn._reglType="buffer",kn._buffer=za,kn.subdata=ui,Ut.profile&&(kn.stats=za.stats),kn.destroy=function(){Ta(za)},kn}function ua(){Ot(Ar).forEach(function(ia){ia.buffer=st.createBuffer(),st.bindBuffer(ia.type,ia.buffer),st.bufferData(ia.type,ia.persistentData||ia.byteLength,ia.usage)})}return Ut.profile&&(It.getTotalBufferSize=function(){var ia=0;return Object.keys(Ar).forEach(function(ma){ia+=Ar[ma].stats.size}),ia}),{create:Ra,createStream:Or,destroyStream:Cr,clear:function(){Ot(Ar).forEach(Ta),vr.forEach(Ta)},getBuffer:function(ia){return ia&&ia._buffer instanceof hr?ia._buffer:null},restore:ua,_initBuffer:ka}}var Nn=0,yn=0,Un=1,li=1,Yn=4,on=4,en={points:Nn,point:yn,lines:Un,line:li,triangles:Yn,triangle:on,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},vi=0,Yi=1,Ja=4,Oa=5120,lt=5121,rt=5122,fr=5123,lr=5124,Tr=5125,Ir=34963,Dr=35040,ot=35044;function kt(st,It,Ut,ir){var dr={},Ar=0,hr={uint8:lt,uint16:fr};It.oes_element_index_uint&&(hr.uint32=Tr);function vr(ua){this.id=Ar++,dr[this.id]=this,this.buffer=ua,this.primType=Ja,this.vertCount=0,this.type=0}vr.prototype.bind=function(){this.buffer.bind()};var Or=[];function Cr(ua){var ia=Or.pop();return ia||(ia=new vr(Ut.create(null,Ir,!0,!1)._buffer)),ka(ia,ua,Dr,-1,-1,0,0),ia}function ta(ua){Or.push(ua)}function ka(ua,ia,ma,da,Fa,za,kn){ua.buffer.bind();var Dn;if(ia){var ui=kn;!kn&&(!Xt(ia)||or(ia)&&!Xt(ia.data))&&(ui=It.oes_element_index_uint?Tr:fr),Ut._initBuffer(ua.buffer,ia,ma,ui,3)}else st.bufferData(Ir,za,ma),ua.buffer.dtype=Dn||lt,ua.buffer.usage=ma,ua.buffer.dimension=3,ua.buffer.byteLength=za;if(Dn=kn,!kn){switch(ua.buffer.dtype){case lt:case Oa:Dn=lt;break;case fr:case rt:Dn=fr;break;case Tr:case lr:Dn=Tr;break;default:}ua.buffer.dtype=Dn}ua.type=Dn;var cn=Fa;cn<0&&(cn=ua.buffer.byteLength,Dn===fr?cn>>=1:Dn===Tr&&(cn>>=2)),ua.vertCount=cn;var sn=da;if(da<0){sn=Ja;var ei=ua.buffer.dimension;ei===1&&(sn=vi),ei===2&&(sn=Yi),ei===3&&(sn=Ja)}ua.primType=sn}function Ta(ua){ir.elementsCount--,delete dr[ua.id],ua.buffer.destroy(),ua.buffer=null}function Ra(ua,ia){var ma=Ut.create(null,Ir,!0),da=new vr(ma._buffer);ir.elementsCount++;function Fa(za){if(!za)ma(),da.primType=Ja,da.vertCount=0,da.type=lt;else if(typeof za=="number")ma(za),da.primType=Ja,da.vertCount=za|0,da.type=lt;else{var kn=null,Dn=ot,ui=-1,cn=-1,sn=0,ei=0;Array.isArray(za)||Xt(za)||or(za)?kn=za:("data"in za&&(kn=za.data),"usage"in za&&(Dn=nr[za.usage]),"primitive"in za&&(ui=en[za.primitive]),"count"in za&&(cn=za.count|0),"type"in za&&(ei=hr[za.type]),"length"in za?sn=za.length|0:(sn=cn,ei===fr||ei===rt?sn*=2:(ei===Tr||ei===lr)&&(sn*=4))),ka(da,kn,Dn,ui,cn,sn,ei)}return Fa}return Fa(ua),Fa._reglType="elements",Fa._elements=da,Fa.subdata=function(za,kn){return ma.subdata(za,kn),Fa},Fa.destroy=function(){Ta(da)},Fa}return{create:Ra,createStream:Cr,destroyStream:ta,getElements:function(ua){return typeof ua=="function"&&ua._elements instanceof vr?ua._elements:null},clear:function(){Ot(dr).forEach(Ta)}}}var jt=new Float32Array(1),ar=new Uint32Array(jt.buffer),Er=5123;function xr(st){for(var It=j.allocType(Er,st.length),Ut=0;Ut>>31<<15,Ar=(ir<<1>>>24)-127,hr=ir>>13&1023;if(Ar<-24)It[Ut]=dr;else if(Ar<-14){var vr=-14-Ar;It[Ut]=dr+(hr+1024>>vr)}else Ar>15?It[Ut]=dr+31744:It[Ut]=dr+(Ar+15<<10)+hr}return It}function zr(st){return Array.isArray(st)||Xt(st)}var Lr=34467,aa=3553,Sa=34067,wa=34069,pn=6408,tn=6406,ai=6407,rn=6409,Ri=6410,Gn=32854,no=32855,Di=36194,fn=32819,Ai=32820,jn=33635,Xn=34042,eo=6402,gi=34041,qi=35904,io=35906,oo=36193,Vn=33776,qn=33777,Hi=33778,Mi=33779,Ro=35986,go=35987,Eo=34798,Ao=35840,ds=35841,jo=35842,Wo=35843,to=36196,wo=5121,pi=5123,Vi=5125,Io=5126,Xi=10242,Ko=10243,Uo=10497,Ls=33071,Ss=33648,Vo=10240,Vs=10241,Ts=9728,Bo=9729,_o=9984,Pi=9985,yo=9986,bs=9987,Dl=33170,hl=4352,ps=4353,dl=4354,wu=34046,lu=3317,xc=37440,Fl=37441,pl=37443,$u=37444,uu=33984,tl=[_o,yo,Pi,bs],vs=[0,rn,Ri,ai,pn],os={};os[rn]=os[tn]=os[eo]=1,os[gi]=os[Ri]=2,os[ai]=os[qi]=3,os[pn]=os[io]=4;function ms(st){return"[object "+st+"]"}var rl=ms("HTMLCanvasElement"),Fu=ms("OffscreenCanvas"),zu=ms("CanvasRenderingContext2D"),Ku=ms("ImageBitmap"),bc=ms("HTMLImageElement"),Lh=ms("HTMLVideoElement"),rh=Object.keys(et).concat([rl,Fu,zu,Ku,bc,Lh]),Ju=[];Ju[wo]=1,Ju[Io]=4,Ju[oo]=2,Ju[pi]=2,Ju[Vi]=4;var ss=[];ss[Gn]=2,ss[no]=2,ss[Di]=2,ss[gi]=4,ss[Vn]=.5,ss[qn]=.5,ss[Hi]=1,ss[Mi]=1,ss[Ro]=.5,ss[go]=1,ss[Eo]=1,ss[Ao]=.5,ss[ds]=.25,ss[jo]=.5,ss[Wo]=.25,ss[to]=.5;function ah(st){return Array.isArray(st)&&(st.length===0||typeof st[0]=="number")}function wc(st){if(!Array.isArray(st))return!1;var It=st.length;return!(It===0||!zr(st[0]))}function pc(st){return Object.prototype.toString.call(st)}function Nf(st){return pc(st)===rl}function Bu(st){return pc(st)===Fu}function Tc(st){return pc(st)===zu}function Ou(st){return pc(st)===Ku}function Gc(st){return pc(st)===bc}function pf(st){return pc(st)===Lh}function $l(st){if(!st)return!1;var It=pc(st);return rh.indexOf(It)>=0?!0:ah(st)||wc(st)||or(st)}function jf(st){return et[Object.prototype.toString.call(st)]|0}function Hc(st,It){var Ut=It.length;switch(st.type){case wo:case pi:case Vi:case Io:var ir=j.allocType(st.type,Ut);ir.set(It),st.data=ir;break;case oo:st.data=xr(It);break;default:}}function Wc(st,It){return j.allocType(st.type===oo?Io:st.type,It)}function Qu(st,It){st.type===oo?(st.data=xr(It),j.freeType(It)):st.data=It}function Yc(st,It,Ut,ir,dr,Ar){for(var hr=st.width,vr=st.height,Or=st.channels,Cr=hr*vr*Or,ta=Wc(st,Cr),ka=0,Ta=0;Ta=1;)vr+=hr*Or*Or,Or/=2;return vr}else return hr*Ut*ir}function Uf(st,It,Ut,ir,dr,Ar,hr){var vr={"don't care":hl,"dont care":hl,nice:dl,fast:ps},Or={repeat:Uo,clamp:Ls,mirror:Ss},Cr={nearest:Ts,linear:Bo},ta=p({mipmap:bs,"nearest mipmap nearest":_o,"linear mipmap nearest":Pi,"nearest mipmap linear":yo,"linear mipmap linear":bs},Cr),ka={none:0,browser:$u},Ta={uint8:wo,rgba4:fn,rgb565:jn,"rgb5 a1":Ai},Ra={alpha:tn,luminance:rn,"luminance alpha":Ri,rgb:ai,rgba:pn,rgba4:Gn,"rgb5 a1":no,rgb565:Di},ua={};It.ext_srgb&&(Ra.srgb=qi,Ra.srgba=io),It.oes_texture_float&&(Ta.float32=Ta.float=Io),It.oes_texture_half_float&&(Ta.float16=Ta["half float"]=oo),It.webgl_depth_texture&&(p(Ra,{depth:eo,"depth stencil":gi}),p(Ta,{uint16:pi,uint32:Vi,"depth stencil":Xn})),It.webgl_compressed_texture_s3tc&&p(ua,{"rgb s3tc dxt1":Vn,"rgba s3tc dxt1":qn,"rgba s3tc dxt3":Hi,"rgba s3tc dxt5":Mi}),It.webgl_compressed_texture_atc&&p(ua,{"rgb atc":Ro,"rgba atc explicit alpha":go,"rgba atc interpolated alpha":Eo}),It.webgl_compressed_texture_pvrtc&&p(ua,{"rgb pvrtc 4bppv1":Ao,"rgb pvrtc 2bppv1":ds,"rgba pvrtc 4bppv1":jo,"rgba pvrtc 2bppv1":Wo}),It.webgl_compressed_texture_etc1&&(ua["rgb etc1"]=to);var ia=Array.prototype.slice.call(st.getParameter(Lr));Object.keys(ua).forEach(function(ra){var Ya=ua[ra];ia.indexOf(Ya)>=0&&(Ra[ra]=Ya)});var ma=Object.keys(Ra);Ut.textureFormats=ma;var da=[];Object.keys(Ra).forEach(function(ra){var Ya=Ra[ra];da[Ya]=ra});var Fa=[];Object.keys(Ta).forEach(function(ra){var Ya=Ta[ra];Fa[Ya]=ra});var za=[];Object.keys(Cr).forEach(function(ra){var Ya=Cr[ra];za[Ya]=ra});var kn=[];Object.keys(ta).forEach(function(ra){var Ya=ta[ra];kn[Ya]=ra});var Dn=[];Object.keys(Or).forEach(function(ra){var Ya=Or[ra];Dn[Ya]=ra});var ui=ma.reduce(function(ra,Ya){var Ka=Ra[Ya];return Ka===rn||Ka===tn||Ka===rn||Ka===Ri||Ka===eo||Ka===gi||It.ext_srgb&&(Ka===qi||Ka===io)?ra[Ka]=Ka:Ka===no||Ya.indexOf("rgba")>=0?ra[Ka]=pn:ra[Ka]=ai,ra},{});function cn(){this.internalformat=pn,this.format=pn,this.type=wo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=$u,this.width=0,this.height=0,this.channels=0}function sn(ra,Ya){ra.internalformat=Ya.internalformat,ra.format=Ya.format,ra.type=Ya.type,ra.compressed=Ya.compressed,ra.premultiplyAlpha=Ya.premultiplyAlpha,ra.flipY=Ya.flipY,ra.unpackAlignment=Ya.unpackAlignment,ra.colorSpace=Ya.colorSpace,ra.width=Ya.width,ra.height=Ya.height,ra.channels=Ya.channels}function ei(ra,Ya){if(!(typeof Ya!="object"||!Ya)){if("premultiplyAlpha"in Ya&&(ra.premultiplyAlpha=Ya.premultiplyAlpha),"flipY"in Ya&&(ra.flipY=Ya.flipY),"alignment"in Ya&&(ra.unpackAlignment=Ya.alignment),"colorSpace"in Ya&&(ra.colorSpace=ka[Ya.colorSpace]),"type"in Ya){var Ka=Ya.type;ra.type=Ta[Ka]}var Bi=ra.width,rs=ra.height,Is=ra.channels,Oi=!1;"shape"in Ya?(Bi=Ya.shape[0],rs=Ya.shape[1],Ya.shape.length===3&&(Is=Ya.shape[2],Oi=!0)):("radius"in Ya&&(Bi=rs=Ya.radius),"width"in Ya&&(Bi=Ya.width),"height"in Ya&&(rs=Ya.height),"channels"in Ya&&(Is=Ya.channels,Oi=!0)),ra.width=Bi|0,ra.height=rs|0,ra.channels=Is|0;var Wr=!1;if("format"in Ya){var na=Ya.format,pa=ra.internalformat=Ra[na];ra.format=ui[pa],na in Ta&&("type"in Ya||(ra.type=Ta[na])),na in ua&&(ra.compressed=!0),Wr=!0}!Oi&&Wr?ra.channels=os[ra.format]:Oi&&!Wr&&ra.channels!==vs[ra.format]&&(ra.format=ra.internalformat=vs[ra.channels])}}function Pn(ra){st.pixelStorei(xc,ra.flipY),st.pixelStorei(Fl,ra.premultiplyAlpha),st.pixelStorei(pl,ra.colorSpace),st.pixelStorei(lu,ra.unpackAlignment)}function Rn(){cn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function In(ra,Ya){var Ka=null;if($l(Ya)?Ka=Ya:Ya&&(ei(ra,Ya),"x"in Ya&&(ra.xOffset=Ya.x|0),"y"in Ya&&(ra.yOffset=Ya.y|0),$l(Ya.data)&&(Ka=Ya.data)),Ya.copy){var Bi=dr.viewportWidth,rs=dr.viewportHeight;ra.width=ra.width||Bi-ra.xOffset,ra.height=ra.height||rs-ra.yOffset,ra.needsCopy=!0}else if(!Ka)ra.width=ra.width||1,ra.height=ra.height||1,ra.channels=ra.channels||4;else if(Xt(Ka))ra.channels=ra.channels||4,ra.data=Ka,!("type"in Ya)&&ra.type===wo&&(ra.type=jf(Ka));else if(ah(Ka))ra.channels=ra.channels||4,Hc(ra,Ka),ra.alignment=1,ra.needsFree=!0;else if(or(Ka)){var Is=Ka.data;!Array.isArray(Is)&&ra.type===wo&&(ra.type=jf(Is));var Oi=Ka.shape,Wr=Ka.stride,na,pa,Wa,ln,Le,Ue;Oi.length===3?(Wa=Oi[2],Ue=Wr[2]):(Wa=1,Ue=1),na=Oi[0],pa=Oi[1],ln=Wr[0],Le=Wr[1],ra.alignment=1,ra.width=na,ra.height=pa,ra.channels=Wa,ra.format=ra.internalformat=vs[Wa],ra.needsFree=!0,Yc(ra,Is,ln,Le,Ue,Ka.offset)}else if(Nf(Ka)||Bu(Ka)||Tc(Ka))Nf(Ka)||Bu(Ka)?ra.element=Ka:ra.element=Ka.canvas,ra.width=ra.element.width,ra.height=ra.element.height,ra.channels=4;else if(Ou(Ka))ra.element=Ka,ra.width=Ka.width,ra.height=Ka.height,ra.channels=4;else if(Gc(Ka))ra.element=Ka,ra.width=Ka.naturalWidth,ra.height=Ka.naturalHeight,ra.channels=4;else if(pf(Ka))ra.element=Ka,ra.width=Ka.videoWidth,ra.height=Ka.videoHeight,ra.channels=4;else if(wc(Ka)){var Qe=ra.width||Ka[0].length,_t=ra.height||Ka.length,wt=ra.channels;zr(Ka[0][0])?wt=wt||Ka[0][0].length:wt=wt||1;for(var Lt=vt.shape(Ka),pr=1,Gr=0;Gr>=rs,Ka.height>>=rs,In(Ka,Bi[rs]),ra.mipmask|=1<=0&&!("faces"in Ya)&&(ra.genMipmaps=!0)}if("mag"in Ya){var Bi=Ya.mag;ra.magFilter=Cr[Bi]}var rs=ra.wrapS,Is=ra.wrapT;if("wrap"in Ya){var Oi=Ya.wrap;typeof Oi=="string"?rs=Is=Or[Oi]:Array.isArray(Oi)&&(rs=Or[Oi[0]],Is=Or[Oi[1]])}else{if("wrapS"in Ya){var Wr=Ya.wrapS;rs=Or[Wr]}if("wrapT"in Ya){var na=Ya.wrapT;Is=Or[na]}}if(ra.wrapS=rs,ra.wrapT=Is,"anisotropic"in Ya){var pa=Ya.anisotropic;ra.anisotropic=Ya.anisotropic}if("mipmap"in Ya){var Wa=!1;switch(typeof Ya.mipmap){case"string":ra.mipmapHint=vr[Ya.mipmap],ra.genMipmaps=!0,Wa=!0;break;case"boolean":Wa=ra.genMipmaps=Ya.mipmap;break;case"object":ra.genMipmaps=!1,Wa=!0;break;default:}Wa&&!("min"in Ya)&&(ra.minFilter=_o)}}function $o(ra,Ya){st.texParameteri(Ya,Vs,ra.minFilter),st.texParameteri(Ya,Vo,ra.magFilter),st.texParameteri(Ya,Xi,ra.wrapS),st.texParameteri(Ya,Ko,ra.wrapT),It.ext_texture_filter_anisotropic&&st.texParameteri(Ya,wu,ra.anisotropic),ra.genMipmaps&&(st.hint(Dl,ra.mipmapHint),st.generateMipmap(Ya))}var _s=0,Go={},Ys=Ut.maxTextureUnits,Ll=Array(Ys).map(function(){return null});function mo(ra){cn.call(this),this.mipmask=0,this.internalformat=pn,this.id=_s++,this.refCount=1,this.target=ra,this.texture=st.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Zo,hr.profile&&(this.stats={size:0})}function ru(ra){st.activeTexture(uu),st.bindTexture(ra.target,ra.texture)}function Rs(){var ra=Ll[0];ra?st.bindTexture(ra.target,ra.texture):st.bindTexture(aa,null)}function Yu(ra){var Ya=ra.texture,Ka=ra.unit,Bi=ra.target;Ka>=0&&(st.activeTexture(uu+Ka),st.bindTexture(Bi,null),Ll[Ka]=null),st.deleteTexture(Ya),ra.texture=null,ra.params=null,ra.pixels=null,ra.refCount=0,delete Go[ra.id],Ar.textureCount--}p(mo.prototype,{bind:function(){var ra=this;ra.bindCount+=1;var Ya=ra.unit;if(Ya<0){for(var Ka=0;Ka0)continue;Bi.unit=-1}Ll[Ka]=ra,Ya=Ka;break}Ya>=Ys,hr.profile&&Ar.maxTextureUnits>Le)-Wa,Ue.height=Ue.height||(Ka.height>>Le)-ln,ru(Ka),Ei(Ue,aa,Wa,ln,Le),Rs(),bi(Ue),Bi}function Is(Oi,Wr){var na=Oi|0,pa=Wr|0||na;if(na===Ka.width&&pa===Ka.height)return Bi;Bi.width=Ka.width=na,Bi.height=Ka.height=pa,ru(Ka);for(var Wa=0;Ka.mipmask>>Wa;++Wa){var ln=na>>Wa,Le=pa>>Wa;if(!ln||!Le)break;st.texImage2D(aa,Wa,Ka.format,ln,Le,0,Ka.format,Ka.type,null)}return Rs(),hr.profile&&(Ka.stats.size=Nu(Ka.internalformat,Ka.type,na,pa,!1,!1)),Bi}return Bi(ra,Ya),Bi.subimage=rs,Bi.resize=Is,Bi._reglType="texture2d",Bi._texture=Ka,hr.profile&&(Bi.stats=Ka.stats),Bi.destroy=function(){Ka.decRef()},Bi}function ql(ra,Ya,Ka,Bi,rs,Is){var Oi=new mo(Sa);Go[Oi.id]=Oi,Ar.cubeCount++;var Wr=new Array(6);function na(ln,Le,Ue,Qe,_t,wt){var Lt,pr=Oi.texInfo;for(Zo.call(pr),Lt=0;Lt<6;++Lt)Wr[Lt]=So();if(typeof ln=="number"||!ln){var Gr=ln|0||1;for(Lt=0;Lt<6;++Lt)ro(Wr[Lt],Gr,Gr)}else if(typeof ln=="object")if(Le)Mo(Wr[0],ln),Mo(Wr[1],Le),Mo(Wr[2],Ue),Mo(Wr[3],Qe),Mo(Wr[4],_t),Mo(Wr[5],wt);else if(es(pr,ln),ei(Oi,ln),"faces"in ln){var va=ln.faces;for(Lt=0;Lt<6;++Lt)sn(Wr[Lt],Oi),Mo(Wr[Lt],va[Lt])}else for(Lt=0;Lt<6;++Lt)Mo(Wr[Lt],ln);for(sn(Oi,Wr[0]),pr.genMipmaps?Oi.mipmask=(Wr[0].width<<1)-1:Oi.mipmask=Wr[0].mipmask,Oi.internalformat=Wr[0].internalformat,na.width=Wr[0].width,na.height=Wr[0].height,ru(Oi),Lt=0;Lt<6;++Lt)zs(Wr[Lt],wa+Lt);for($o(pr,Sa),Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,pr.genMipmaps,!0)),na.format=da[Oi.internalformat],na.type=Fa[Oi.type],na.mag=za[pr.magFilter],na.min=kn[pr.minFilter],na.wrapS=Dn[pr.wrapS],na.wrapT=Dn[pr.wrapT],Lt=0;Lt<6;++Lt)Ws(Wr[Lt]);return na}function pa(ln,Le,Ue,Qe,_t){var wt=Ue|0,Lt=Qe|0,pr=_t|0,Gr=ti();return sn(Gr,Oi),Gr.width=0,Gr.height=0,In(Gr,Le),Gr.width=Gr.width||(Oi.width>>pr)-wt,Gr.height=Gr.height||(Oi.height>>pr)-Lt,ru(Oi),Ei(Gr,wa+ln,wt,Lt,pr),Rs(),bi(Gr),na}function Wa(ln){var Le=ln|0;if(Le!==Oi.width){na.width=Oi.width=Le,na.height=Oi.height=Le,ru(Oi);for(var Ue=0;Ue<6;++Ue)for(var Qe=0;Oi.mipmask>>Qe;++Qe)st.texImage2D(wa+Ue,Qe,Oi.format,Le>>Qe,Le>>Qe,0,Oi.format,Oi.type,null);return Rs(),hr.profile&&(Oi.stats.size=Nu(Oi.internalformat,Oi.type,na.width,na.height,!1,!0)),na}}return na(ra,Ya,Ka,Bi,rs,Is),na.subimage=pa,na.resize=Wa,na._reglType="textureCube",na._texture=Oi,hr.profile&&(na.stats=Oi.stats),na.destroy=function(){Oi.decRef()},na}function fo(){for(var ra=0;ra>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);else for(var rs=0;rs<6;++rs)st.texImage2D(wa+rs,Bi,Ka.internalformat,Ka.width>>Bi,Ka.height>>Bi,0,Ka.internalformat,Ka.type,null);$o(Ka.texInfo,Ka.target)})}function Os(){for(var ra=0;ra=0?Ws=!0:Or.indexOf(Zo)>=0&&(Ws=!1))),("depthTexture"in mo||"depthStencilTexture"in mo)&&(Ll=!!(mo.depthTexture||mo.depthStencilTexture)),"depth"in mo&&(typeof mo.depth=="boolean"?zs=mo.depth:(_s=mo.depth,Bs=!1)),"stencil"in mo&&(typeof mo.stencil=="boolean"?Bs=mo.stencil:(Go=mo.stencil,zs=!1)),"depthStencil"in mo&&(typeof mo.depthStencil=="boolean"?zs=Bs=mo.depthStencil:(Ys=mo.depthStencil,zs=!1,Bs=!1))}var Rs=null,Yu=null,Ul=null,ql=null;if(Array.isArray(So))Rs=So.map(ua);else if(So)Rs=[ua(So)];else for(Rs=new Array($o),Wi=0;Wi<$o;++Wi)Rs[Wi]=ia(ro,Mo,Ws,Zo,es);ro=ro||Rs[0].width,Mo=Mo||Rs[0].height,_s?Yu=ua(_s):zs&&!Bs&&(Yu=ia(ro,Mo,Ll,"depth","uint32")),Go?Ul=ua(Go):Bs&&!zs&&(Ul=ia(ro,Mo,!1,"stencil","uint8")),Ys?ql=ua(Ys):!_s&&!Go&&Bs&&zs&&(ql=ia(ro,Mo,Ll,"depth stencil","depth stencil"));var fo=null;for(Wi=0;Wi0&&(bi.depth=In[0].depth,bi.stencil=In[0].stencil,bi.depthStencil=In[0].depthStencil),In[ti]?In[ti](bi):In[ti]=sn(bi)}return p(Jn,{width:Wi,height:Wi,color:Zo})}function Ei(so){var ti,bi=so|0;if(bi===Jn.width)return Jn;var Wi=Jn.color;for(ti=0;ti=Wi.byteLength?ro.subdata(Wi):(ro.destroy(),sn.buffers[so]=null)),sn.buffers[so]||(ro=sn.buffers[so]=dr.create(ti,hu,!1,!0)),bi.buffer=dr.getBuffer(ro),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1,Jn[so]=1}else dr.getBuffer(ti)?(bi.buffer=dr.getBuffer(ti),bi.size=bi.buffer.dimension|0,bi.normalized=!1,bi.type=bi.buffer.dtype,bi.offset=0,bi.stride=0,bi.divisor=0,bi.state=1):dr.getBuffer(ti.buffer)?(bi.buffer=dr.getBuffer(ti.buffer),bi.size=(+ti.size||bi.buffer.dimension)|0,bi.normalized=!!ti.normalized||!1,"type"in ti?bi.type=Kr[ti.type]:bi.type=bi.buffer.dtype,bi.offset=(ti.offset||0)|0,bi.stride=(ti.stride||0)|0,bi.divisor=(ti.divisor||0)|0,bi.state=1):"x"in ti&&(bi.x=+ti.x||0,bi.y=+ti.y||0,bi.z=+ti.z||0,bi.w=+ti.w||0,bi.state=2)}for(var Mo=0;Mo1)for(var Pn=0;Pnia&&(ia=ma.stats.uniformsCount)}),ia},Ut.getMaxAttributesCount=function(){var ia=0;return ta.forEach(function(ma){ma.stats.attributesCount>ia&&(ia=ma.stats.attributesCount)}),ia});function ua(){dr={},Ar={};for(var ia=0;ia16&&(Ut=Da(Ut,st.length*8));for(var ir=Array(16),dr=Array(16),Ar=0;Ar<16;Ar++)ir[Ar]=Ut[Ar]^909522486,dr[Ar]=Ut[Ar]^1549556828;var hr=Da(ir.concat(vc(It)),512+It.length*8);return Ft(Da(dr.concat(hr),768))}function kl(st){for(var It=xf?"0123456789ABCDEF":"0123456789abcdef",Ut="",ir,dr=0;dr>>4&15)+It.charAt(ir&15);return Ut}function kc(st){for(var It="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ut="",ir=st.length,dr=0;drst.length*8?Ut+=Gf:Ut+=It.charAt(Ar>>>6*(3-hr)&63);return Ut}function Cc(st,It){var Ut=It.length,ir=Array(),dr,Ar,hr,vr,Or=Array(Math.ceil(st.length/2));for(dr=0;dr0;){for(vr=Array(),hr=0,dr=0;dr0||Ar>0)&&(vr[vr.length]=Ar);ir[ir.length]=hr,Or=vr}var Cr="";for(dr=ir.length-1;dr>=0;dr--)Cr+=It.charAt(ir[dr]);var ta=Math.ceil(st.length*8/(Math.log(It.length)/Math.log(2)));for(dr=Cr.length;dr>>6&31,128|ir&63):ir<=65535?It+=String.fromCharCode(224|ir>>>12&15,128|ir>>>6&63,128|ir&63):ir<=2097151&&(It+=String.fromCharCode(240|ir>>>18&7,128|ir>>>12&63,128|ir>>>6&63,128|ir&63));return It}function vc(st){for(var It=Array(st.length>>2),Ut=0;Ut>5]|=(st.charCodeAt(Ut/8)&255)<<24-Ut%32;return It}function Ft(st){for(var It="",Ut=0;Ut>5]>>>24-Ut%32&255);return It}function tr(st,It){return st>>>It|st<<32-It}function Fr(st,It){return st>>>It}function wr(st,It,Ut){return st&It^~st&Ut}function ea(st,It,Ut){return st&It^st&Ut^It&Ut}function ba(st){return tr(st,2)^tr(st,13)^tr(st,22)}function Ia(st){return tr(st,6)^tr(st,11)^tr(st,25)}function Na(st){return tr(st,7)^tr(st,18)^Fr(st,3)}function Za(st){return tr(st,17)^tr(st,19)^Fr(st,10)}var mn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Da(st,It){var Ut=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),ir=new Array(64),dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia;for(st[It>>5]|=128<<24-It%32,st[(It+64>>9<<4)+15]=It,Ta=0;Ta>16)+(It>>16)+(Ut>>16);return ir<<16|Ut&65535}function $a(st){return Array.prototype.slice.call(st)}function vn(st){return $a(st).join("")}function Sn(st){var It=st&&st.cache,Ut=0,ir=[],dr=[],Ar=[];function hr(ua,ia){var ma=ia&&ia.stable;if(!ma){for(var da=0;da0&&(ua.push(Fa,"="),ua.push.apply(ua,$a(arguments)),ua.push(";")),Fa}return p(ia,{def:da,toString:function(){return vn([ma.length>0?"var "+ma.join(",")+";":"",vn(ua)])}})}function Or(){var ua=vr(),ia=vr(),ma=ua.toString,da=ia.toString;function Fa(za,kn){ia(za,kn,"=",ua.def(za,kn),";")}return p(function(){ua.apply(ua,$a(arguments))},{def:ua.def,entry:ua,exit:ia,save:Fa,set:function(za,kn,Dn){Fa(za,kn),ua(za,kn,"=",Dn,";")},toString:function(){return ma()+da()}})}function Cr(){var ua=vn(arguments),ia=Or(),ma=Or(),da=ia.toString,Fa=ma.toString;return p(ia,{then:function(){return ia.apply(ia,$a(arguments)),this},else:function(){return ma.apply(ma,$a(arguments)),this},toString:function(){var za=Fa();return za&&(za="else{"+za+"}"),vn(["if(",ua,"){",da(),"}",za])}})}var ta=vr(),ka={};function Ta(ua,ia){var ma=[];function da(){var ui="a"+ma.length;return ma.push(ui),ui}ia=ia||0;for(var Fa=0;Fa":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Jr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},sa={cw:Ne,ccw:Ke};function ga(He){return Array.isArray(He)||Nt(He)||Kt(He)}function ba(He){return He.sort(function(Lt,Dt){return Lt===pe?-1:Dt===pe?1:Lt=1,Tr>=2,Lt)}else if(Dt===Lo){var Nr=He.data;return new Zr(Nr.thisDep,Nr.contextDep,Nr.propDep,Lt)}else{if(Dt===us)return new Zr(!1,!1,!1,Lt);if(Dt===Oo){for(var qr=!1,Or=!1,fa=!1,Sa=0;Sa=1&&(Or=!0),Pa>=2&&(fa=!0)}else Ca.type===Lo&&(qr=qr||Ca.data.thisDep,Or=Or||Ca.data.contextDep,fa=fa||Ca.data.propDep)}return new Zr(qr,Or,fa,Lt)}else return new Zr(Dt===ao,Dt===Oi,Dt===_n,Lt)}}var ni=new Zr(!1,!1,!1,function(){});function xi(He,Lt,Dt,Tr,Nr,qr,Or,fa,Sa,Ca,Pa,En,cn,Wa,ta,gr){var Hr=Ca.Record,ha={add:32774,subtract:32778,"reverse subtract":32779};Dt.ext_blend_minmax&&(ha.min=et,ha.max=ot);var Ea=Dt.angle_instanced_arrays,ia=Dt.webgl_draw_buffers,Ya=Dt.oes_vertex_array_object,Ua={dirty:!0,profile:gr.profile},Sn={},na=[],ea={},tn={};function ja(wt){return wt.replace(".","_")}function Ia(wt,It,$t){var Rr=ja(wt);na.push(wt),Sn[Rr]=Ua[Rr]=!!$t,ea[Rr]=It}function Fa(wt,It,$t){var Rr=ja(wt);na.push(wt),Array.isArray($t)?(Ua[Rr]=$t.slice(),Sn[Rr]=$t.slice()):Ua[Rr]=Sn[Rr]=$t,tn[Rr]=It}function rn(wt){return!!isNaN(wt)}Ia(_s,ya),Ia(ko,Kr),Fa(fl,"blendColor",[0,0,0,0]),Fa(Os,"blendEquationSeparate",[lr,lr]),Fa(cs,"blendFuncSeparate",[or,Ut,or,Ut]),Ia(ai,Ha,!0),Fa(Xo,"depthFunc",Dr),Fa(os,"depthRange",[0,1]),Fa(Do,"depthMask",!0),Fa(al,al,[!0,!0,!0,!0]),Ia(pu,Br),Fa(au,"cullFace",we),Fa(Nu,Nu,Ke),Fa(_l,_l,1),Ia(Su,Bn),Fa(xl,"polygonOffset",[0,0]),Ia(hc,li),Ia(ki,Jn),Fa(Xi,"sampleCoverage",[1,!1]),Ia(jf,Za),Fa(zc,"stencilMask",-1),Fa(nu,"stencilFunc",[kt,0,-1]),Fa(Me,"stencilOpSeparate",[ue,xt,xt,xt]),Fa(L,"stencilOpSeparate",[we,xt,xt,xt]),Ia(J,un),Fa(de,"scissor",[0,0,He.drawingBufferWidth,He.drawingBufferHeight]),Fa(pe,pe,[0,0,He.drawingBufferWidth,He.drawingBufferHeight]);var kn={gl:He,context:cn,strings:Lt,next:Sn,current:Ua,draw:En,elements:qr,buffer:Nr,shader:Pa,attributes:Ca.state,vao:Ca,uniforms:Sa,framebuffer:fa,extensions:Dt,timer:Wa,isBufferArgs:ga},Vn={primTypes:mn,compareFuncs:Ur,blendFuncs:_a,blendEquations:ha,stencilOps:Jr,glTypes:jr,orientationType:sa};ia&&(Vn.backBuffer=[we],Vn.drawBuffer=m(Tr.maxDrawbuffers,function(wt){return wt===0?[0]:m(wt,function(It){return ca+It})}));var Oa=0;function ln(){var wt=Fn({cache:ta}),It=wt.link,$t=wt.global;wt.id=Oa++,wt.batchId="0";var Rr=It(kn),Vr=wt.shared={props:"a0"};Object.keys(kn).forEach(function(rr){Vr[rr]=$t.def(Rr,".",rr)});var _r=wt.next={},mr=wt.current={};Object.keys(tn).forEach(function(rr){Array.isArray(Ua[rr])&&(_r[rr]=$t.def(Vr.next,".",rr),mr[rr]=$t.def(Vr.current,".",rr))});var ir=wt.constants={};Object.keys(Vn).forEach(function(rr){ir[rr]=$t.def(JSON.stringify(Vn[rr]))}),wt.invoke=function(rr,zt){switch(zt.type){case Un:var Sr=["this",Vr.context,Vr.props,wt.batchId];return rr.def(It(zt.data),".call(",Sr.slice(0,Math.max(zt.data.length+1,4)),")");case _n:return rr.def(Vr.props,zt.data);case Oi:return rr.def(Vr.context,zt.data);case ao:return rr.def("this",zt.data);case Lo:return zt.data.append(wt,rr),zt.data.ref;case us:return zt.data.toString();case Oo:return zt.data.map(function(Yr){return wt.invoke(rr,Yr)})}},wt.attribCache={};var Wt={};return wt.scopeAttrib=function(rr){var zt=Lt.id(rr);if(zt in Wt)return Wt[zt];var Sr=Ca.scope[zt];Sr||(Sr=Ca.scope[zt]=new Hr);var Yr=Wt[zt]=It(Sr);return Yr},wt}function Hn(wt){var It=wt.static,$t=wt.dynamic,Rr;if(Te in It){var Vr=!!It[Te];Rr=wn(function(mr,ir){return Vr}),Rr.enable=Vr}else if(Te in $t){var _r=$t[Te];Rr=Nn(_r,function(mr,ir){return mr.invoke(ir,_r)})}return Rr}function Wn(wt,It){var $t=wt.static,Rr=wt.dynamic;if(Ze in $t){var Vr=$t[Ze];return Vr?(Vr=fa.getFramebuffer(Vr),wn(function(mr,ir){var Wt=mr.link(Vr),rr=mr.shared;ir.set(rr.framebuffer,".next",Wt);var zt=rr.context;return ir.set(zt,"."+$e,Wt+".width"),ir.set(zt,"."+lt,Wt+".height"),Wt})):wn(function(mr,ir){var Wt=mr.shared;ir.set(Wt.framebuffer,".next","null");var rr=Wt.context;return ir.set(rr,"."+$e,rr+"."+Ot),ir.set(rr,"."+lt,rr+"."+Xt),"null"})}else if(Ze in Rr){var _r=Rr[Ze];return Nn(_r,function(mr,ir){var Wt=mr.invoke(ir,_r),rr=mr.shared,zt=rr.framebuffer,Sr=ir.def(zt,".getFramebuffer(",Wt,")");ir.set(zt,".next",Sr);var Yr=rr.context;return ir.set(Yr,"."+$e,Sr+"?"+Sr+".width:"+Yr+"."+Ot),ir.set(Yr,"."+lt,Sr+"?"+Sr+".height:"+Yr+"."+Xt),Sr})}else return null}function gi(wt,It,$t){var Rr=wt.static,Vr=wt.dynamic;function _r(Wt){if(Wt in Rr){var rr=Rr[Wt],zt=!0,Sr=rr.x|0,Yr=rr.y|0,va,Rn;return"width"in rr?va=rr.width|0:zt=!1,"height"in rr?Rn=rr.height|0:zt=!1,new Zr(!zt&&It&&It.thisDep,!zt&&It&&It.contextDep,!zt&&It&&It.propDep,function(Ln,An){var xn=Ln.shared.context,Qa=va;"width"in rr||(Qa=An.def(xn,".",$e,"-",Sr));var pn=Rn;return"height"in rr||(pn=An.def(xn,".",lt,"-",Yr)),[Sr,Yr,Qa,pn]})}else if(Wt in Vr){var an=Vr[Wt],en=Nn(an,function(Ln,An){var xn=Ln.invoke(An,an),Qa=Ln.shared.context,pn=An.def(xn,".x|0"),gn=An.def(xn,".y|0"),Xn=An.def('"width" in ',xn,"?",xn,".width|0:","(",Qa,".",$e,"-",pn,")"),zo=An.def('"height" in ',xn,"?",xn,".height|0:","(",Qa,".",lt,"-",gn,")");return[pn,gn,Xn,zo]});return It&&(en.thisDep=en.thisDep||It.thisDep,en.contextDep=en.contextDep||It.contextDep,en.propDep=en.propDep||It.propDep),en}else return It?new Zr(It.thisDep,It.contextDep,It.propDep,function(Ln,An){var xn=Ln.shared.context;return[0,0,An.def(xn,".",$e),An.def(xn,".",lt)]}):null}var mr=_r(pe);if(mr){var ir=mr;mr=new Zr(mr.thisDep,mr.contextDep,mr.propDep,function(Wt,rr){var zt=ir.append(Wt,rr),Sr=Wt.shared.context;return rr.set(Sr,"."+tt,zt[2]),rr.set(Sr,"."+dt,zt[3]),zt})}return{viewport:mr,scissor_box:_r(de)}}function Jo(wt,It){var $t=wt.static,Rr=typeof $t[vt]=="string"&&typeof $t[rt]=="string";if(Rr){if(Object.keys(It.dynamic).length>0)return null;var Vr=It.static,_r=Object.keys(Vr);if(_r.length>0&&typeof Vr[_r[0]]=="number"){for(var mr=[],ir=0;ir<_r.length;++ir)mr.push([Vr[_r[ir]]|0,_r[ir]]);return mr}}return null}function As(wt,It,$t){var Rr=wt.static,Vr=wt.dynamic;function _r(zt){if(zt in Rr){var Sr=Lt.id(Rr[zt]),Yr=wn(function(){return Sr});return Yr.id=Sr,Yr}else if(zt in Vr){var va=Vr[zt];return Nn(va,function(Rn,an){var en=Rn.invoke(an,va),Ln=an.def(Rn.shared.strings,".id(",en,")");return Ln})}return null}var mr=_r(vt),ir=_r(rt),Wt=null,rr;return hn(mr)&&hn(ir)?(Wt=Pa.program(ir.id,mr.id,null,$t),rr=wn(function(zt,Sr){return zt.link(Wt)})):rr=new Zr(mr&&mr.thisDep||ir&&ir.thisDep,mr&&mr.contextDep||ir&&ir.contextDep,mr&&mr.propDep||ir&&ir.propDep,function(zt,Sr){var Yr=zt.shared.shader,va;mr?va=mr.append(zt,Sr):va=Sr.def(Yr,".",vt);var Rn;ir?Rn=ir.append(zt,Sr):Rn=Sr.def(Yr,".",rt);var an=Yr+".program("+Rn+","+va;return Sr.def(an+")")}),{frag:mr,vert:ir,progVar:rr,program:Wt}}function Ei(wt,It){var $t=wt.static,Rr=wt.dynamic,Vr={},_r=!1;function mr(){if(Le in $t){var An=$t[Le];return An!==null&&Ca.getVAO(An)===null&&(An=Ca.createVAO(An)),_r=!0,Vr.vao=An,wn(function(Qa){var pn=Ca.getVAO(An);return pn?Qa.link(pn):"null"})}else if(Le in Rr){_r=!0;var xn=Rr[Le];return Nn(xn,function(Qa,pn){var gn=Qa.invoke(pn,xn);return pn.def(Qa.shared.vao+".getVAO("+gn+")")})}return null}var ir=mr(),Wt=!1;function rr(){if(Mt in $t){var An=$t[Mt];if(Vr.elements=An,ga(An)){var xn=Vr.elements=qr.create(An,!0);An=qr.getElements(xn),Wt=!0}else An&&(An=qr.getElements(An),Wt=!0);var Qa=wn(function(gn,Xn){if(An){var zo=gn.link(An);return gn.ELEMENTS=zo,zo}return gn.ELEMENTS=null,null});return Qa.value=An,Qa}else if(Mt in Rr){Wt=!0;var pn=Rr[Mt];return Nn(pn,function(gn,Xn){var zo=gn.shared,sl=zo.isBufferArgs,ku=zo.elements,Tc=gn.invoke(Xn,pn),rf=Xn.def("null"),ou=Xn.def(sl,"(",Tc,")"),Ah=gn.cond(ou).then(rf,"=",ku,".createStream(",Tc,");").else(rf,"=",ku,".getElements(",Tc,");");return Xn.entry(Ah),Xn.exit(gn.cond(ou).then(ku,".destroyStream(",rf,");")),gn.ELEMENTS=rf,rf})}else if(_r)return new Zr(ir.thisDep,ir.contextDep,ir.propDep,function(gn,Xn){return Xn.def(gn.shared.vao+".currentVAO?"+gn.shared.elements+".getElements("+gn.shared.vao+".currentVAO.elements):null")});return null}var zt=rr();function Sr(){if(Gt in $t){var An=$t[Gt];return Vr.primitive=An,wn(function(Qa,pn){return mn[An]})}else if(Gt in Rr){var xn=Rr[Gt];return Nn(xn,function(Qa,pn){var gn=Qa.constants.primTypes,Xn=Qa.invoke(pn,xn);return pn.def(gn,"[",Xn,"]")})}else{if(Wt)return hn(zt)?zt.value?wn(function(Qa,pn){return pn.def(Qa.ELEMENTS,".primType")}):wn(function(){return Ll}):new Zr(zt.thisDep,zt.contextDep,zt.propDep,function(Qa,pn){var gn=Qa.ELEMENTS;return pn.def(gn,"?",gn,".primType:",Ll)});if(_r)return new Zr(ir.thisDep,ir.contextDep,ir.propDep,function(Qa,pn){return pn.def(Qa.shared.vao+".currentVAO?"+Qa.shared.vao+".currentVAO.primitive:"+Ll)})}return null}function Yr(An,xn){if(An in $t){var Qa=$t[An]|0;return xn?Vr.offset=Qa:Vr.instances=Qa,wn(function(gn,Xn){return xn&&(gn.OFFSET=Qa),Qa})}else if(An in Rr){var pn=Rr[An];return Nn(pn,function(gn,Xn){var zo=gn.invoke(Xn,pn);return xn&&(gn.OFFSET=zo),zo})}else if(xn){if(Wt)return wn(function(gn,Xn){return gn.OFFSET=0,0});if(_r)return new Zr(ir.thisDep,ir.contextDep,ir.propDep,function(gn,Xn){return Xn.def(gn.shared.vao+".currentVAO?"+gn.shared.vao+".currentVAO.offset:0")})}else if(_r)return new Zr(ir.thisDep,ir.contextDep,ir.propDep,function(gn,Xn){return Xn.def(gn.shared.vao+".currentVAO?"+gn.shared.vao+".currentVAO.instances:-1")});return null}var va=Yr(fr,!0);function Rn(){if(Ht in $t){var An=$t[Ht]|0;return Vr.count=An,wn(function(){return An})}else if(Ht in Rr){var xn=Rr[Ht];return Nn(xn,function(Xn,zo){var sl=Xn.invoke(zo,xn);return sl})}else if(Wt)if(hn(zt)){if(zt)return va?new Zr(va.thisDep,va.contextDep,va.propDep,function(Xn,zo){var sl=zo.def(Xn.ELEMENTS,".vertCount-",Xn.OFFSET);return sl}):wn(function(Xn,zo){return zo.def(Xn.ELEMENTS,".vertCount")});var Qa=wn(function(){return-1});return Qa}else{var pn=new Zr(zt.thisDep||va.thisDep,zt.contextDep||va.contextDep,zt.propDep||va.propDep,function(Xn,zo){var sl=Xn.ELEMENTS;return Xn.OFFSET?zo.def(sl,"?",sl,".vertCount-",Xn.OFFSET,":-1"):zo.def(sl,"?",sl,".vertCount:-1")});return pn}else if(_r){var gn=new Zr(ir.thisDep,ir.contextDep,ir.propDep,function(Xn,zo){return zo.def(Xn.shared.vao,".currentVAO?",Xn.shared.vao,".currentVAO.count:-1")});return gn}return null}var an=Sr(),en=Rn(),Ln=Yr(wr,!1);return{elements:zt,primitive:an,count:en,instances:Ln,offset:va,vao:ir,vaoActive:_r,elementsActive:Wt,static:Vr}}function bl(wt,It){var $t=wt.static,Rr=wt.dynamic,Vr={};return na.forEach(function(_r){var mr=ja(_r);function ir(Wt,rr){if(_r in $t){var zt=Wt($t[_r]);Vr[mr]=wn(function(){return zt})}else if(_r in Rr){var Sr=Rr[_r];Vr[mr]=Nn(Sr,function(Yr,va){return rr(Yr,va,Yr.invoke(va,Sr))})}}switch(_r){case pu:case ko:case _s:case jf:case ai:case J:case Su:case hc:case ki:case Do:return ir(function(Wt){return Wt},function(Wt,rr,zt){return zt});case Xo:return ir(function(Wt){return Ur[Wt]},function(Wt,rr,zt){var Sr=Wt.constants.compareFuncs;return rr.def(Sr,"[",zt,"]")});case os:return ir(function(Wt){return Wt},function(Wt,rr,zt){var Sr=rr.def("+",zt,"[0]"),Yr=rr.def("+",zt,"[1]");return[Sr,Yr]});case cs:return ir(function(Wt){var rr="srcRGB"in Wt?Wt.srcRGB:Wt.src,zt="srcAlpha"in Wt?Wt.srcAlpha:Wt.src,Sr="dstRGB"in Wt?Wt.dstRGB:Wt.dst,Yr="dstAlpha"in Wt?Wt.dstAlpha:Wt.dst;return[_a[rr],_a[Sr],_a[zt],_a[Yr]]},function(Wt,rr,zt){var Sr=Wt.constants.blendFuncs;function Yr(xn,Qa){var pn=rr.def('"',xn,Qa,'" in ',zt,"?",zt,".",xn,Qa,":",zt,".",xn);return pn}var va=Yr("src","RGB"),Rn=Yr("dst","RGB"),an=rr.def(Sr,"[",va,"]"),en=rr.def(Sr,"[",Yr("src","Alpha"),"]"),Ln=rr.def(Sr,"[",Rn,"]"),An=rr.def(Sr,"[",Yr("dst","Alpha"),"]");return[an,Ln,en,An]});case Os:return ir(function(Wt){if(typeof Wt=="string")return[ha[Wt],ha[Wt]];if(typeof Wt=="object")return[ha[Wt.rgb],ha[Wt.alpha]]},function(Wt,rr,zt){var Sr=Wt.constants.blendEquations,Yr=rr.def(),va=rr.def(),Rn=Wt.cond("typeof ",zt,'==="string"');return Rn.then(Yr,"=",va,"=",Sr,"[",zt,"];"),Rn.else(Yr,"=",Sr,"[",zt,".rgb];",va,"=",Sr,"[",zt,".alpha];"),rr(Rn),[Yr,va]});case fl:return ir(function(Wt){return m(4,function(rr){return+Wt[rr]})},function(Wt,rr,zt){return m(4,function(Sr){return rr.def("+",zt,"[",Sr,"]")})});case zc:return ir(function(Wt){return Wt|0},function(Wt,rr,zt){return rr.def(zt,"|0")});case nu:return ir(function(Wt){var rr=Wt.cmp||"keep",zt=Wt.ref||0,Sr="mask"in Wt?Wt.mask:-1;return[Ur[rr],zt,Sr]},function(Wt,rr,zt){var Sr=Wt.constants.compareFuncs,Yr=rr.def('"cmp" in ',zt,"?",Sr,"[",zt,".cmp]",":",xt),va=rr.def(zt,".ref|0"),Rn=rr.def('"mask" in ',zt,"?",zt,".mask|0:-1");return[Yr,va,Rn]});case Me:case L:return ir(function(Wt){var rr=Wt.fail||"keep",zt=Wt.zfail||"keep",Sr=Wt.zpass||"keep";return[_r===L?we:ue,Jr[rr],Jr[zt],Jr[Sr]]},function(Wt,rr,zt){var Sr=Wt.constants.stencilOps;function Yr(va){return rr.def('"',va,'" in ',zt,"?",Sr,"[",zt,".",va,"]:",xt)}return[_r===L?we:ue,Yr("fail"),Yr("zfail"),Yr("zpass")]});case xl:return ir(function(Wt){var rr=Wt.factor|0,zt=Wt.units|0;return[rr,zt]},function(Wt,rr,zt){var Sr=rr.def(zt,".factor|0"),Yr=rr.def(zt,".units|0");return[Sr,Yr]});case au:return ir(function(Wt){var rr=0;return Wt==="front"?rr=ue:Wt==="back"&&(rr=we),rr},function(Wt,rr,zt){return rr.def(zt,'==="front"?',ue,":",we)});case _l:return ir(function(Wt){return Wt},function(Wt,rr,zt){return zt});case Nu:return ir(function(Wt){return sa[Wt]},function(Wt,rr,zt){return rr.def(zt+'==="cw"?'+Ne+":"+Ke)});case al:return ir(function(Wt){return Wt.map(function(rr){return!!rr})},function(Wt,rr,zt){return m(4,function(Sr){return"!!"+zt+"["+Sr+"]"})});case Xi:return ir(function(Wt){var rr="value"in Wt?Wt.value:1,zt=!!Wt.invert;return[rr,zt]},function(Wt,rr,zt){var Sr=rr.def('"value" in ',zt,"?+",zt,".value:1"),Yr=rr.def("!!",zt,".invert");return[Sr,Yr]})}}),Vr}function _o(wt,It){var $t=wt.static,Rr=wt.dynamic,Vr={};return Object.keys($t).forEach(function(_r){var mr=$t[_r],ir;if(typeof mr=="number"||typeof mr=="boolean")ir=wn(function(){return mr});else if(typeof mr=="function"){var Wt=mr._reglType;Wt==="texture2d"||Wt==="textureCube"?ir=wn(function(rr){return rr.link(mr)}):(Wt==="framebuffer"||Wt==="framebufferCube")&&(ir=wn(function(rr){return rr.link(mr.color[0])}))}else Cr(mr)&&(ir=wn(function(rr){var zt=rr.global.def("[",m(mr.length,function(Sr){return mr[Sr]}),"]");return zt}));ir.value=mr,Vr[_r]=ir}),Object.keys(Rr).forEach(function(_r){var mr=Rr[_r];Vr[_r]=Nn(mr,function(ir,Wt){return ir.invoke(Wt,mr)})}),Vr}function Hs(wt,It){var $t=wt.static,Rr=wt.dynamic,Vr={};return Object.keys($t).forEach(function(_r){var mr=$t[_r],ir=Lt.id(_r),Wt=new Hr;if(ga(mr))Wt.state=fi,Wt.buffer=Nr.getBuffer(Nr.create(mr,pr,!1,!0)),Wt.type=0;else{var rr=Nr.getBuffer(mr);if(rr)Wt.state=fi,Wt.buffer=rr,Wt.type=0;else if("constant"in mr){var zt=mr.constant;Wt.buffer="null",Wt.state=Ti,typeof zt=="number"?Wt.x=zt:ci.forEach(function(Ln,An){An"+pn+"?"+zt+".constant["+pn+"]:0;"}).join(""),"}}else{","if(",va,"(",zt,".buffer)){",Ln,"=",Rn,".createStream(",pr,",",zt,".buffer);","}else{",Ln,"=",Rn,".getBuffer(",zt,".buffer);","}",An,'="type" in ',zt,"?",Yr.glTypes,"[",zt,".type]:",Ln,".dtype;",an.normalized,"=!!",zt,".normalized;");function xn(Qa){rr(an[Qa],"=",zt,".",Qa,"|0;")}return xn("size"),xn("offset"),xn("stride"),xn("divisor"),rr("}}"),rr.exit("if(",an.isStream,"){",Rn,".destroyStream(",Ln,");","}"),an}Vr[_r]=Nn(mr,ir)}),Vr}function Ls(wt){var It=wt.static,$t=wt.dynamic,Rr={};return Object.keys(It).forEach(function(Vr){var _r=It[Vr];Rr[Vr]=wn(function(mr,ir){return typeof _r=="number"||typeof _r=="boolean"?""+_r:mr.link(_r)})}),Object.keys($t).forEach(function(Vr){var _r=$t[Vr];Rr[Vr]=Nn(_r,function(mr,ir){return mr.invoke(ir,_r)})}),Rr}function Js(wt,It,$t,Rr,Vr){var _r=wt.static,mr=wt.dynamic,ir=Jo(wt,It),Wt=Wn(wt,Vr),rr=gi(wt,Wt,Vr),zt=Ei(wt,Vr),Sr=bl(wt,Vr),Yr=As(wt,Vr,ir);function va(xn){var Qa=rr[xn];Qa&&(Sr[xn]=Qa)}va(pe),va(ja(de));var Rn=Object.keys(Sr).length>0,an={framebuffer:Wt,draw:zt,shader:Yr,state:Sr,dirty:Rn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(an.profile=Hn(wt,Vr),an.uniforms=_o($t,Vr),an.drawVAO=an.scopeVAO=zt.vao,!an.drawVAO&&Yr.program&&!ir&&Dt.angle_instanced_arrays&&zt.static.elements){var en=!0,Ln=Yr.program.attributes.map(function(xn){var Qa=It.static[xn];return en=en&&!!Qa,Qa});if(en&&Ln.length>0){var An=Ca.getVAO(Ca.createVAO({attributes:Ln,elements:zt.static.elements}));an.drawVAO=new Zr(null,null,null,function(xn,Qa){return xn.link(An)}),an.useVAO=!0}}return ir?an.useVAO=!0:an.attributes=Hs(It,Vr),an.context=Ls(Rr,Vr),an}function ps(wt,It,$t){var Rr=wt.shared,Vr=Rr.context,_r=wt.scope();Object.keys($t).forEach(function(mr){It.save(Vr,"."+mr);var ir=$t[mr],Wt=ir.append(wt,It);Array.isArray(Wt)?_r(Vr,".",mr,"=[",Wt.join(),"];"):_r(Vr,".",mr,"=",Wt,";")}),It(_r)}function ms(wt,It,$t,Rr){var Vr=wt.shared,_r=Vr.gl,mr=Vr.framebuffer,ir;ia&&(ir=It.def(Vr.extensions,".webgl_draw_buffers"));var Wt=wt.constants,rr=Wt.drawBuffer,zt=Wt.backBuffer,Sr;$t?Sr=$t.append(wt,It):Sr=It.def(mr,".next"),Rr||It("if(",Sr,"!==",mr,".cur){"),It("if(",Sr,"){",_r,".bindFramebuffer(",Pr,",",Sr,".framebuffer);"),ia&&It(ir,".drawBuffersWEBGL(",rr,"[",Sr,".colorAttachments.length]);"),It("}else{",_r,".bindFramebuffer(",Pr,",null);"),ia&&It(ir,".drawBuffersWEBGL(",zt,");"),It("}",mr,".cur=",Sr,";"),Rr||It("}")}function Ts(wt,It,$t){var Rr=wt.shared,Vr=Rr.gl,_r=wt.current,mr=wt.next,ir=Rr.current,Wt=Rr.next,rr=wt.cond(ir,".dirty");na.forEach(function(zt){var Sr=ja(zt);if(!(Sr in $t.state)){var Yr,va;if(Sr in mr){Yr=mr[Sr],va=_r[Sr];var Rn=m(Ua[Sr].length,function(en){return rr.def(Yr,"[",en,"]")});rr(wt.cond(Rn.map(function(en,Ln){return en+"!=="+va+"["+Ln+"]"}).join("||")).then(Vr,".",tn[Sr],"(",Rn,");",Rn.map(function(en,Ln){return va+"["+Ln+"]="+en}).join(";"),";"))}else{Yr=rr.def(Wt,".",Sr);var an=wt.cond(Yr,"!==",ir,".",Sr);rr(an),Sr in ea?an(wt.cond(Yr).then(Vr,".enable(",ea[Sr],");").else(Vr,".disable(",ea[Sr],");"),ir,".",Sr,"=",Yr,";"):an(Vr,".",tn[Sr],"(",Yr,");",ir,".",Sr,"=",Yr,";")}}}),Object.keys($t.state).length===0&&rr(ir,".dirty=false;"),It(rr)}function si(wt,It,$t,Rr){var Vr=wt.shared,_r=wt.current,mr=Vr.current,ir=Vr.gl,Wt;ba(Object.keys($t)).forEach(function(rr){var zt=$t[rr];if(!(Rr&&!Rr(zt))){var Sr=zt.append(wt,It);if(ea[rr]){var Yr=ea[rr];hn(zt)?(Wt=wt.link(Sr,{stable:!0}),It(wt.cond(Wt).then(ir,".enable(",Yr,");").else(ir,".disable(",Yr,");")),It(mr,".",rr,"=",Wt,";")):(It(wt.cond(Sr).then(ir,".enable(",Yr,");").else(ir,".disable(",Yr,");")),It(mr,".",rr,"=",Sr,";"))}else if(Cr(Sr)){var va=_r[rr];It(ir,".",tn[rr],"(",Sr,");",Sr.map(function(Rn,an){return va+"["+an+"]="+Rn}).join(";"),";")}else hn(zt)?(Wt=wt.link(Sr,{stable:!0}),It(ir,".",tn[rr],"(",Wt,");",mr,".",rr,"=",Wt,";")):It(ir,".",tn[rr],"(",Sr,");",mr,".",rr,"=",Sr,";")}})}function Ps(wt,It){Ea&&(wt.instancing=It.def(wt.shared.extensions,".angle_instanced_arrays"))}function Mo(wt,It,$t,Rr,Vr){var _r=wt.shared,mr=wt.stats,ir=_r.current,Wt=_r.timer,rr=$t.profile;function zt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Sr,Yr;function va(xn){Sr=It.def(),xn(Sr,"=",zt(),";"),typeof Vr=="string"?xn(mr,".count+=",Vr,";"):xn(mr,".count++;"),Wa&&(Rr?(Yr=It.def(),xn(Yr,"=",Wt,".getNumPendingQueries();")):xn(Wt,".beginQuery(",mr,");"))}function Rn(xn){xn(mr,".cpuTime+=",zt(),"-",Sr,";"),Wa&&(Rr?xn(Wt,".pushScopeStats(",Yr,",",Wt,".getNumPendingQueries(),",mr,");"):xn(Wt,".endQuery();"))}function an(xn){var Qa=It.def(ir,".profile");It(ir,".profile=",xn,";"),It.exit(ir,".profile=",Qa,";")}var en;if(rr){if(hn(rr)){rr.enable?(va(It),Rn(It.exit),an("true")):an("false");return}en=rr.append(wt,It),an(en)}else en=It.def(ir,".profile");var Ln=wt.block();va(Ln),It("if(",en,"){",Ln,"}");var An=wt.block();Rn(An),It.exit("if(",en,"){",An,"}")}function il(wt,It,$t,Rr,Vr){var _r=wt.shared;function mr(Wt){switch(Wt){case ho:case Ms:case ks:return 2;case to:case Ns:case Cl:return 3;case as:case Vs:case mu:return 4;default:return 1}}function ir(Wt,rr,zt){var Sr=_r.gl,Yr=It.def(Wt,".location"),va=It.def(_r.attributes,"[",Yr,"]"),Rn=zt.state,an=zt.buffer,en=[zt.x,zt.y,zt.z,zt.w],Ln=["buffer","normalized","offset","stride"];function An(){It("if(!",va,".buffer){",Sr,".enableVertexAttribArray(",Yr,");}");var Qa=zt.type,pn;if(zt.size?pn=It.def(zt.size,"||",rr):pn=rr,It("if(",va,".type!==",Qa,"||",va,".size!==",pn,"||",Ln.map(function(Xn){return va+"."+Xn+"!=="+zt[Xn]}).join("||"),"){",Sr,".bindBuffer(",pr,",",an,".buffer);",Sr,".vertexAttribPointer(",[Yr,pn,Qa,zt.normalized,zt.stride,zt.offset],");",va,".type=",Qa,";",va,".size=",pn,";",Ln.map(function(Xn){return va+"."+Xn+"="+zt[Xn]+";"}).join(""),"}"),Ea){var gn=zt.divisor;It("if(",va,".divisor!==",gn,"){",wt.instancing,".vertexAttribDivisorANGLE(",[Yr,gn],");",va,".divisor=",gn,";}")}}function xn(){It("if(",va,".buffer){",Sr,".disableVertexAttribArray(",Yr,");",va,".buffer=null;","}if(",ci.map(function(Qa,pn){return va+"."+Qa+"!=="+en[pn]}).join("||"),"){",Sr,".vertexAttrib4f(",Yr,",",en,");",ci.map(function(Qa,pn){return va+"."+Qa+"="+en[pn]+";"}).join(""),"}")}Rn===fi?An():Rn===Ti?xn():(It("if(",Rn,"===",fi,"){"),An(),It("}else{"),xn(),It("}"))}Rr.forEach(function(Wt){var rr=Wt.name,zt=$t.attributes[rr],Sr;if(zt){if(!Vr(zt))return;Sr=zt.append(wt,It)}else{if(!Vr(ni))return;var Yr=wt.scopeAttrib(rr);Sr={},Object.keys(new Hr).forEach(function(va){Sr[va]=It.def(Yr,".",va)})}ir(wt.link(Wt),mr(Wt.info.type),Sr)})}function ol(wt,It,$t,Rr,Vr,_r){for(var mr=wt.shared,ir=mr.gl,Wt,rr=0;rr1){for(var sl=[],ku=[],Tc=0;Tc>1)",an],");")}function gn(){$t(en,".drawArraysInstancedANGLE(",[Yr,va,Rn,an],");")}zt&&zt!=="null"?An?pn():($t("if(",zt,"){"),pn(),$t("}else{"),gn(),$t("}")):gn()}function Qa(){function pn(){$t(_r+".drawElements("+[Yr,Rn,Ln,va+"<<(("+Ln+"-"+pi+")>>1)"]+");")}function gn(){$t(_r+".drawArrays("+[Yr,va,Rn]+");")}zt&&zt!=="null"?An?pn():($t("if(",zt,"){"),pn(),$t("}else{"),gn(),$t("}")):gn()}Ea&&(typeof an!="number"||an>=0)?typeof an=="string"?($t("if(",an,">0){"),xn(),$t("}else if(",an,"<0){"),Qa(),$t("}")):xn():Qa()}function $n(wt,It,$t,Rr,Vr){var _r=ln(),mr=_r.proc("body",Vr);return Ea&&(_r.instancing=mr.def(_r.shared.extensions,".angle_instanced_arrays")),wt(_r,mr,$t,Rr),_r.compile().body}function Fi(wt,It,$t,Rr){Ps(wt,It),$t.useVAO?$t.drawVAO?It(wt.shared.vao,".setVAO(",$t.drawVAO.append(wt,It),");"):It(wt.shared.vao,".setVAO(",wt.shared.vao,".targetVAO);"):(It(wt.shared.vao,".setVAO(null);"),il(wt,It,$t,Rr.attributes,function(){return!0})),ol(wt,It,$t,Rr.uniforms,function(){return!0},!1),wl(wt,It,It,$t)}function Gi(wt,It){var $t=wt.proc("draw",1);Ps(wt,$t),ps(wt,$t,It.context),ms(wt,$t,It.framebuffer),Ts(wt,$t,It),si(wt,$t,It.state),Mo(wt,$t,It,!1,!0);var Rr=It.shader.progVar.append(wt,$t);if($t(wt.shared.gl,".useProgram(",Rr,".program);"),It.shader.program)Fi(wt,$t,It,It.shader.program);else{$t(wt.shared.vao,".setVAO(null);");var Vr=wt.global.def("{}"),_r=$t.def(Rr,".id"),mr=$t.def(Vr,"[",_r,"]");$t(wt.cond(mr).then(mr,".call(this,a0);").else(mr,"=",Vr,"[",_r,"]=",wt.link(function(ir){return $n(Fi,wt,It,ir,1)}),"(",Rr,");",mr,".call(this,a0);"))}Object.keys(It.state).length>0&&$t(wt.shared.current,".dirty=true;"),wt.shared.vao&&$t(wt.shared.vao,".setVAO(null);")}function Ct(wt,It,$t,Rr){wt.batchId="a1",Ps(wt,It);function Vr(){return!0}il(wt,It,$t,Rr.attributes,Vr),ol(wt,It,$t,Rr.uniforms,Vr,!1),wl(wt,It,It,$t)}function Fr(wt,It,$t,Rr){Ps(wt,It);var Vr=$t.contextDep,_r=It.def(),mr="a0",ir="a1",Wt=It.def();wt.shared.props=Wt,wt.batchId=_r;var rr=wt.scope(),zt=wt.scope();It(rr.entry,"for(",_r,"=0;",_r,"<",ir,";++",_r,"){",Wt,"=",mr,"[",_r,"];",zt,"}",rr.exit);function Sr(Ln){return Ln.contextDep&&Vr||Ln.propDep}function Yr(Ln){return!Sr(Ln)}if($t.needsContext&&ps(wt,zt,$t.context),$t.needsFramebuffer&&ms(wt,zt,$t.framebuffer),si(wt,zt,$t.state,Sr),$t.profile&&Sr($t.profile)&&Mo(wt,zt,$t,!1,!0),Rr)$t.useVAO?$t.drawVAO?Sr($t.drawVAO)?zt(wt.shared.vao,".setVAO(",$t.drawVAO.append(wt,zt),");"):rr(wt.shared.vao,".setVAO(",$t.drawVAO.append(wt,rr),");"):rr(wt.shared.vao,".setVAO(",wt.shared.vao,".targetVAO);"):(rr(wt.shared.vao,".setVAO(null);"),il(wt,rr,$t,Rr.attributes,Yr),il(wt,zt,$t,Rr.attributes,Sr)),ol(wt,rr,$t,Rr.uniforms,Yr,!1),ol(wt,zt,$t,Rr.uniforms,Sr,!0),wl(wt,rr,zt,$t);else{var va=wt.global.def("{}"),Rn=$t.shader.progVar.append(wt,zt),an=zt.def(Rn,".id"),en=zt.def(va,"[",an,"]");zt(wt.shared.gl,".useProgram(",Rn,".program);","if(!",en,"){",en,"=",va,"[",an,"]=",wt.link(function(Ln){return $n(Ct,wt,$t,Ln,2)}),"(",Rn,");}",en,".call(this,a0[",_r,"],",_r,");")}}function zr(wt,It){var $t=wt.proc("batch",2);wt.batchId="0",Ps(wt,$t);var Rr=!1,Vr=!0;Object.keys(It.context).forEach(function(va){Rr=Rr||It.context[va].propDep}),Rr||(ps(wt,$t,It.context),Vr=!1);var _r=It.framebuffer,mr=!1;_r?(_r.propDep?Rr=mr=!0:_r.contextDep&&Rr&&(mr=!0),mr||ms(wt,$t,_r)):ms(wt,$t,null),It.state.viewport&&It.state.viewport.propDep&&(Rr=!0);function ir(va){return va.contextDep&&Rr||va.propDep}Ts(wt,$t,It),si(wt,$t,It.state,function(va){return!ir(va)}),(!It.profile||!ir(It.profile))&&Mo(wt,$t,It,!1,"a1"),It.contextDep=Rr,It.needsContext=Vr,It.needsFramebuffer=mr;var Wt=It.shader.progVar;if(Wt.contextDep&&Rr||Wt.propDep)Fr(wt,$t,It,null);else{var rr=Wt.append(wt,$t);if($t(wt.shared.gl,".useProgram(",rr,".program);"),It.shader.program)Fr(wt,$t,It,It.shader.program);else{$t(wt.shared.vao,".setVAO(null);");var zt=wt.global.def("{}"),Sr=$t.def(rr,".id"),Yr=$t.def(zt,"[",Sr,"]");$t(wt.cond(Yr).then(Yr,".call(this,a0,a1);").else(Yr,"=",zt,"[",Sr,"]=",wt.link(function(va){return $n(Fr,wt,It,va,2)}),"(",rr,");",Yr,".call(this,a0,a1);"))}}Object.keys(It.state).length>0&&$t(wt.shared.current,".dirty=true;"),wt.shared.vao&&$t(wt.shared.vao,".setVAO(null);")}function dn(wt,It){var $t=wt.proc("scope",3);wt.batchId="a2";var Rr=wt.shared,Vr=Rr.current;if(ps(wt,$t,It.context),It.framebuffer&&It.framebuffer.append(wt,$t),ba(Object.keys(It.state)).forEach(function(ir){var Wt=It.state[ir],rr=Wt.append(wt,$t);Cr(rr)?rr.forEach(function(zt,Sr){rn(zt)?$t.set(wt.next[ir],"["+Sr+"]",zt):$t.set(wt.next[ir],"["+Sr+"]",wt.link(zt,{stable:!0}))}):hn(Wt)?$t.set(Rr.next,"."+ir,wt.link(rr,{stable:!0})):$t.set(Rr.next,"."+ir,rr)}),Mo(wt,$t,It,!0,!0),[Mt,fr,Ht,wr,Gt].forEach(function(ir){var Wt=It.draw[ir];if(Wt){var rr=Wt.append(wt,$t);rn(rr)?$t.set(Rr.draw,"."+ir,rr):$t.set(Rr.draw,"."+ir,wt.link(rr),{stable:!0})}}),Object.keys(It.uniforms).forEach(function(ir){var Wt=It.uniforms[ir].append(wt,$t);Array.isArray(Wt)&&(Wt="["+Wt.map(function(rr){return rn(rr)?rr:wt.link(rr,{stable:!0})})+"]"),$t.set(Rr.uniforms,"["+wt.link(Lt.id(ir),{stable:!0})+"]",Wt)}),Object.keys(It.attributes).forEach(function(ir){var Wt=It.attributes[ir].append(wt,$t),rr=wt.scopeAttrib(ir);Object.keys(new Hr).forEach(function(zt){$t.set(rr,"."+zt,Wt[zt])})}),It.scopeVAO){var _r=It.scopeVAO.append(wt,$t);rn(_r)?$t.set(Rr.vao,".targetVAO",_r):$t.set(Rr.vao,".targetVAO",wt.link(_r,{stable:!0}))}function mr(ir){var Wt=It.shader[ir];if(Wt){var rr=Wt.append(wt,$t);rn(rr)?$t.set(Rr.shader,"."+ir,rr):$t.set(Rr.shader,"."+ir,wt.link(rr,{stable:!0}))}}mr(rt),mr(vt),Object.keys(It.state).length>0&&($t(Vr,".dirty=true;"),$t.exit(Vr,".dirty=true;")),$t("a1(",wt.shared.context,",a0,",wt.batchId,");")}function Mi(wt){if(!(typeof wt!="object"||Cr(wt))){for(var It=Object.keys(wt),$t=0;$t=0;--$n){var Fi=kn[$n];Fi&&Fi(ta,null,0)}Dt.flush(),Pa&&Pa.update()}function gi(){!Hn&&kn.length>0&&(Hn=p.next(Wn))}function Jo(){Hn&&(p.cancel(Wn),Hn=null)}function As($n){$n.preventDefault(),Nr=!0,Jo(),Vn.forEach(function(Fi){Fi()})}function Ei($n){Dt.getError(),Nr=!1,qr.restore(),Sn.restore(),Ea.restore(),na.restore(),ea.restore(),tn.restore(),Ya.restore(),Pa&&Pa.restore(),ja.procs.refresh(),gi(),Oa.forEach(function(Fi){Fi()})}rn&&(rn.addEventListener(Ao,As,!1),rn.addEventListener(ss,Ei,!1));function bl(){kn.length=0,Jo(),rn&&(rn.removeEventListener(Ao,As),rn.removeEventListener(ss,Ei)),Sn.clear(),tn.clear(),ea.clear(),Ya.clear(),na.clear(),ia.clear(),Ea.clear(),Pa&&Pa.clear(),ln.forEach(function($n){$n()})}function _o($n){function Fi(_r){var mr=u({},_r);delete mr.uniforms,delete mr.attributes,delete mr.context,delete mr.vao,"stencil"in mr&&mr.stencil.op&&(mr.stencil.opBack=mr.stencil.opFront=mr.stencil.op,delete mr.stencil.op);function ir(Wt){if(Wt in mr){var rr=mr[Wt];delete mr[Wt],Object.keys(rr).forEach(function(zt){mr[Wt+"."+zt]=rr[zt]})}}return ir("blend"),ir("depth"),ir("cull"),ir("stencil"),ir("polygonOffset"),ir("scissor"),ir("sample"),"vao"in _r&&(mr.vao=_r.vao),mr}function Gi(_r,mr){var ir={},Wt={};return Object.keys(_r).forEach(function(rr){var zt=_r[rr];if(c.isDynamic(zt)){Wt[rr]=c.unbox(zt,rr);return}else if(mr&&Array.isArray(zt)){for(var Sr=0;Sr0)return wt.call(this,Rr(_r|0),_r|0)}else if(Array.isArray(_r)){if(_r.length)return wt.call(this,_r,_r.length)}else return vn.call(this,_r)}return u(Vr,{stats:Mi,destroy:function(){xo.destroy()}})}var Hs=tn.setFBO=_o({framebuffer:c.define.call(null,Cs,"framebuffer")});function Ls($n,Fi){var Gi=0;ja.procs.poll();var Ct=Fi.color;Ct&&(Dt.clearColor(+Ct[0]||0,+Ct[1]||0,+Ct[2]||0,+Ct[3]||0),Gi|=Ks),"depth"in Fi&&(Dt.clearDepth(+Fi.depth),Gi|=Ss),"stencil"in Fi&&(Dt.clearStencil(Fi.stencil|0),Gi|=ti),Dt.clear(Gi)}function Js($n){if("framebuffer"in $n)if($n.framebuffer&&$n.framebuffer_reglType==="framebufferCube")for(var Fi=0;Fi<6;++Fi)Hs(u({framebuffer:$n.framebuffer.faces[Fi]},$n),Ls);else Hs($n,Ls);else Ls(null,$n)}function ps($n){kn.push($n);function Fi(){var Gi=yu(kn,$n);function Ct(){var Fr=yu(kn,Ct);kn[Fr]=kn[kn.length-1],kn.length-=1,kn.length<=0&&Jo()}kn[Gi]=Ct}return gi(),{cancel:Fi}}function ms(){var $n=Fa.viewport,Fi=Fa.scissor_box;$n[0]=$n[1]=Fi[0]=Fi[1]=0,ta.viewportWidth=ta.framebufferWidth=ta.drawingBufferWidth=$n[2]=Fi[2]=Dt.drawingBufferWidth,ta.viewportHeight=ta.framebufferHeight=ta.drawingBufferHeight=$n[3]=Fi[3]=Dt.drawingBufferHeight}function Ts(){ta.tick+=1,ta.time=Ps(),ms(),ja.procs.poll()}function si(){na.refresh(),ms(),ja.procs.refresh(),Pa&&Pa.update()}function Ps(){return(f()-En)/1e3}si();function Mo($n,Fi){var Gi;switch($n){case"frame":return ps(Fi);case"lost":Gi=Vn;break;case"restore":Gi=Oa;break;case"destroy":Gi=ln;break;default:}return Gi.push(Fi),{cancel:function(){for(var Ct=0;Ct=0},read:Ia,destroy:bl,_gl:Dt,_refresh:si,poll:function(){Ts(),Pa&&Pa.update()},now:Ps,stats:fa,getCachedCode:il,preloadCachedCode:ol});return Lt.onDone(null,wl),wl}return dc})}}),nj=De({"node_modules/gl-util/context.js"(j,N){"use strict";var u=Dd();N.exports=function(a){if(a?typeof a=="string"&&(a={container:a}):a={},w(a)?a={container:a}:S(a)?a={container:a}:l(a)?a={gl:a}:a=u(a,{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),a.pixelRatio||(a.pixelRatio=window.pixelRatio||1),a.gl)return a.gl;if(a.canvas&&(a.container=a.canvas.parentNode),a.container){if(typeof a.container=="string"){var r=document.querySelector(a.container);if(!r)throw Error("Element "+a.container+" is not found");a.container=r}w(a.container)?(a.canvas=a.container,a.container=a.canvas.parentNode):a.canvas||(a.canvas=e(),a.container.appendChild(a.canvas),v(a))}else if(!a.canvas)if(typeof document<"u")a.container=document.body||document.documentElement,a.canvas=e(),a.container.appendChild(a.canvas),v(a);else throw Error("Not DOM environment. Use headless-gl.");return a.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{a.gl=a.canvas.getContext(n,a.attrs)}catch{}return a.gl}),a.gl};function v(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var a=t.container.getBoundingClientRect();t.canvas.width=t.width||a.right-a.left,t.canvas.height=t.height||a.bottom-a.top}}function w(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function S(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),ij=De({"node_modules/font-atlas/index.js"(j,N){"use strict";var u=ZT(),v=[32,126];N.exports=w;function w(S){S=S||{};var l=S.shape?S.shape:S.canvas?[S.canvas.width,S.canvas.height]:[512,512],e=S.canvas||document.createElement("canvas"),t=S.font,a=typeof S.step=="number"?[S.step,S.step]:S.step||[32,32],r=S.chars||v;if(t&&typeof t!="string"&&(t=u(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var n=[],i=r[0],s=0;i<=r[1];i++)n[s++]=String.fromCharCode(i);r=n}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var p=a[0]/2,f=a[1]/2,i=0;il[0]-a[0]/2&&(p=a[0]/2,f+=a[1]);return e}}}),$T=De({"node_modules/bit-twiddle/twiddle.js"(j){"use strict";"use restrict";var N=32;j.INT_BITS=N,j.INT_MAX=2147483647,j.INT_MIN=-1<0)-(w<0)},j.abs=function(w){var S=w>>N-1;return(w^S)-S},j.min=function(w,S){return S^(w^S)&-(w65535)<<4,w>>>=S,l=(w>255)<<3,w>>>=l,S|=l,l=(w>15)<<2,w>>>=l,S|=l,l=(w>3)<<1,w>>>=l,S|=l,S|w>>1},j.log10=function(w){return w>=1e9?9:w>=1e8?8:w>=1e7?7:w>=1e6?6:w>=1e5?5:w>=1e4?4:w>=1e3?3:w>=100?2:w>=10?1:0},j.popCount=function(w){return w=w-(w>>>1&1431655765),w=(w&858993459)+(w>>>2&858993459),(w+(w>>>4)&252645135)*16843009>>>24};function u(w){var S=32;return w&=-w,w&&S--,w&65535&&(S-=16),w&16711935&&(S-=8),w&252645135&&(S-=4),w&858993459&&(S-=2),w&1431655765&&(S-=1),S}j.countTrailingZeros=u,j.nextPow2=function(w){return w+=w===0,--w,w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w+1},j.prevPow2=function(w){return w|=w>>>1,w|=w>>>2,w|=w>>>4,w|=w>>>8,w|=w>>>16,w-(w>>>1)},j.parity=function(w){return w^=w>>>16,w^=w>>>8,w^=w>>>4,w&=15,27030>>>w&1};var v=new Array(256);(function(w){for(var S=0;S<256;++S){var l=S,e=S,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;w[S]=e<>>8&255]<<16|v[w>>>16&255]<<8|v[w>>>24&255]},j.interleave2=function(w,S){return w&=65535,w=(w|w<<8)&16711935,w=(w|w<<4)&252645135,w=(w|w<<2)&858993459,w=(w|w<<1)&1431655765,S&=65535,S=(S|S<<8)&16711935,S=(S|S<<4)&252645135,S=(S|S<<2)&858993459,S=(S|S<<1)&1431655765,w|S<<1},j.deinterleave2=function(w,S){return w=w>>>S&1431655765,w=(w|w>>>1)&858993459,w=(w|w>>>2)&252645135,w=(w|w>>>4)&16711935,w=(w|w>>>16)&65535,w<<16>>16},j.interleave3=function(w,S,l){return w&=1023,w=(w|w<<16)&4278190335,w=(w|w<<8)&251719695,w=(w|w<<4)&3272356035,w=(w|w<<2)&1227133513,S&=1023,S=(S|S<<16)&4278190335,S=(S|S<<8)&251719695,S=(S|S<<4)&3272356035,S=(S|S<<2)&1227133513,w|=S<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,w|l<<2},j.deinterleave3=function(w,S){return w=w>>>S&1227133513,w=(w|w>>>2)&3272356035,w=(w|w>>>4)&251719695,w=(w|w>>>8)&4278190335,w=(w|w>>>16)&1023,w<<22>>22},j.nextCombination=function(w){var S=w|w-1;return S+1|(~S&-~S)-1>>>u(w)+1}}}),oj=De({"node_modules/dup/dup.js"(j,N){"use strict";function u(S,l,e){var t=S[e]|0;if(t<=0)return[];var a=new Array(t),r;if(e===S.length-1)for(r=0;r"u"&&(l=0),typeof S){case"number":if(S>0)return v(S|0,l);break;case"object":if(typeof S.length=="number")return u(S,l,0);break}return[]}N.exports=w}}),sj=De({"node_modules/typedarray-pool/pool.js"(j){"use strict";var N=$T(),u=oj(),v=Dp().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:u([32,0]),UINT16:u([32,0]),UINT32:u([32,0]),BIGUINT64:u([32,0]),INT8:u([32,0]),INT16:u([32,0]),INT32:u([32,0]),BIGINT64:u([32,0]),FLOAT:u([32,0]),DOUBLE:u([32,0]),DATA:u([32,0]),UINT8C:u([32,0]),BUFFER:u([32,0])});var w=typeof Uint8ClampedArray<"u",S=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=u([32,0])),e.BIGUINT64||(e.BIGUINT64=u([32,0])),e.BIGINT64||(e.BIGINT64=u([32,0])),e.BUFFER||(e.BUFFER=u([32,0]));var t=e.DATA,a=e.BUFFER;j.free=function(h){if(v.isBuffer(h))a[N.log2(h.length)].push(h);else{if(Object.prototype.toString.call(h)!=="[object ArrayBuffer]"&&(h=h.buffer),!h)return;var b=h.length||h.byteLength,_=N.log2(b)|0;t[_].push(h)}};function r(m){if(m){var h=m.length||m.byteLength,b=N.log2(h);t[b].push(m)}}function n(m){r(m.buffer)}j.freeUint8=j.freeUint16=j.freeUint32=j.freeBigUint64=j.freeInt8=j.freeInt16=j.freeInt32=j.freeBigInt64=j.freeFloat32=j.freeFloat=j.freeFloat64=j.freeDouble=j.freeUint8Clamped=j.freeDataView=n,j.freeArrayBuffer=r,j.freeBuffer=function(h){a[N.log2(h.length)].push(h)},j.malloc=function(h,b){if(b===void 0||b==="arraybuffer")return i(h);switch(b){case"uint8":return s(h);case"uint16":return c(h);case"uint32":return p(h);case"int8":return f(h);case"int16":return d(h);case"int32":return y(h);case"float":case"float32":return o(h);case"double":case"float64":return x(h);case"uint8_clamped":return M(h);case"bigint64":return E(h);case"biguint64":return T(h);case"buffer":return A(h);case"data":case"dataview":return g(h);default:return null}return null};function i(h){var h=N.nextPow2(h),b=N.log2(h),_=t[b];return _.length>0?_.pop():new ArrayBuffer(h)}j.mallocArrayBuffer=i;function s(m){return new Uint8Array(i(m),0,m)}j.mallocUint8=s;function c(m){return new Uint16Array(i(2*m),0,m)}j.mallocUint16=c;function p(m){return new Uint32Array(i(4*m),0,m)}j.mallocUint32=p;function f(m){return new Int8Array(i(m),0,m)}j.mallocInt8=f;function d(m){return new Int16Array(i(2*m),0,m)}j.mallocInt16=d;function y(m){return new Int32Array(i(4*m),0,m)}j.mallocInt32=y;function o(m){return new Float32Array(i(4*m),0,m)}j.mallocFloat32=j.mallocFloat=o;function x(m){return new Float64Array(i(8*m),0,m)}j.mallocFloat64=j.mallocDouble=x;function M(m){return w?new Uint8ClampedArray(i(m),0,m):s(m)}j.mallocUint8Clamped=M;function T(m){return S?new BigUint64Array(i(8*m),0,m):null}j.mallocBigUint64=T;function E(m){return l?new BigInt64Array(i(8*m),0,m):null}j.mallocBigInt64=E;function g(m){return new DataView(i(m),0,m)}j.mallocDataView=g;function A(m){m=N.nextPow2(m);var h=N.log2(m),b=a[h];return b.length>0?b.pop():new v(m)}j.mallocBuffer=A,j.clearCache=function(){for(var h=0;h<32;++h)e.UINT8[h].length=0,e.UINT16[h].length=0,e.UINT32[h].length=0,e.INT8[h].length=0,e.INT16[h].length=0,e.INT32[h].length=0,e.FLOAT[h].length=0,e.DOUBLE[h].length=0,e.BIGUINT64[h].length=0,e.BIGINT64[h].length=0,e.UINT8C[h].length=0,t[h].length=0,a[h].length=0}}}),lj=De({"node_modules/is-plain-obj/index.js"(j,N){"use strict";var u=Object.prototype.toString;N.exports=function(v){var w;return u.call(v)==="[object Object]"&&(w=Object.getPrototypeOf(v),w===null||w===Object.getPrototypeOf({}))}}}),KT=De({"node_modules/parse-unit/index.js"(j,N){N.exports=function(v,w){w||(w=[0,""]),v=String(v);var S=parseFloat(v,10);return w[0]=S,w[1]=v.match(/[\d.\-\+]*\s*(.*)/)[1]||"",w}}}),uj=De({"node_modules/to-px/topx.js"(j,N){"use strict";var u=KT();N.exports=l;var v=96;function w(e,t){var a=u(getComputedStyle(e).getPropertyValue(t));return a[0]*l(a[1],e)}function S(e,t){var a=document.createElement("div");a.style["font-size"]="128"+e,t.appendChild(a);var r=w(a,"font-size")/128;return t.removeChild(a),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return S(e,t);case"em":return w(t,"font-size");case"rem":return w(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return v;case"cm":return v/2.54;case"mm":return v/25.4;case"pt":return v/72;case"pc":return v/6}return 1}}}),cj=De({"node_modules/detect-kerning/index.js"(j,N){"use strict";N.exports=S;var u=S.canvas=document.createElement("canvas"),v=u.getContext("2d"),w=l([32,126]);S.createPairs=l,S.ascii=w;function S(e,t){Array.isArray(e)&&(e=e.join(", "));var a={},r,n=16,i=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(n=t.fontSize),t.threshold!=null&&(i=t.threshold))),r||(r=w),v.font=n+"px "+e;for(var s=0;sn*i){var d=(f-p)/n;a[c]=d*1e3}}return a}function l(e){for(var t=[],a=e[0];a<=e[1];a++)for(var r=String.fromCharCode(a),n=e[0];n0;a-=4)if(t[a]!==0)return Math.floor((a-3)*.25/e)}}}),hj=De({"node_modules/gl-text/dist.js"(j,N){"use strict";var u=rj(),v=Dd(),w=aj(),S=nj(),l=UT(),e=ap(),t=ij(),a=sj(),r=Om(),n=lj(),i=KT(),s=uj(),c=cj(),p=_c(),f=fj(),d=Xp(),y=$T(),o=y.nextPow2,x=new l,M=!1;document.body&&(T=document.body.appendChild(document.createElement("div")),T.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(T).fontStretch&&(M=!0),document.body.removeChild(T));var T,E=function(m){g(m)?(m={regl:m},this.gl=m.regl._gl):this.gl=S(m),this.shader=x.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=m.regl||w({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),x.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(n(m)?m:{})};E.prototype.createShader=function(){var m=this.regl,h=m({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:m.prop("count"),offset:m.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:m.this("sizeBuffer")},width:{offset:0,stride:8,buffer:m.this("sizeBuffer")},char:m.this("charBuffer"),position:m.this("position")},uniforms:{atlasSize:function(_,I){return[I.atlas.width,I.atlas.height]},atlasDim:function(_,I){return[I.atlas.cols,I.atlas.rows]},atlas:function(_,I){return I.atlas.texture},charStep:function(_,I){return I.atlas.step},em:function(_,I){return I.atlas.em},color:m.prop("color"),opacity:m.prop("opacity"),viewport:m.this("viewportArray"),scale:m.this("scale"),align:m.prop("align"),baseline:m.prop("baseline"),translate:m.this("translate"),positionOffset:m.prop("positionOffset")},primitive:"points",viewport:m.this("viewport"),vert:` +`),ma;if(It&&(ma=bh(ia),It[ma]))return It[ma].apply(null,dr);var da=Function.apply(null,ir.concat(ia));return It&&(It[ma]=da),da.apply(null,dr)}return{global:ta,link:hr,block:vr,proc:Ta,scope:Or,cond:Cr,compile:Ra}}var yi="xyzw".split(""),_i=5121,ki=1,ri=2,En=0,Ln=1,Ni=2,Zi=3,Co=4,Do=5,Fo=6,Yo="dither",bo="blend.enable",Gs="blend.color",Es="blend.equation",ns="blend.func",Kn="depth.enable",zo="depth.func",gs="depth.range",js="depth.mask",Cl="colorMask",zl="cull.enable",Kl="cull.face",Gu="frontFace",xl="lineWidth",Hu="polygonOffset.enable",Su="polygonOffset.offset",mc="sample.alpha",Jc="sample.enable",oc="sample.coverage",du="stencil.enable",Jl="stencil.mask",Ql="stencil.func",Eu="stencil.opFront",bf="stencil.opBack",lh="scissor.enable",Pc="scissor.box",Ks="viewport",Bl="profile",Wu="framebuffer",wf="vert",Qc="frag",ku="elements",Ol="primitive",Nl="count",fi="offset",eu="instances",$e="vao",nt="Width",mt="Height",xt=Wu+nt,Bt=Wu+mt,zt=Ks+nt,Wt=Ks+mt,Pr="drawingBuffer",Br=Pr+nt,kr=Pr+mt,jr=[ns,Es,Ql,Eu,bf,oc,Ks,Pc,Su],Jr=34962,la=34963,xa=2884,Ba=3042,an=3024,wn=2960,ii=2929,Si=3089,oi=32823,Ji=32926,Qi=32928,Oo=5126,Qo=35664,vo=35665,ys=35666,ol=5124,jl=35667,Hs=35668,Cu=35669,hi=35670,wi=35671,sl=35672,sc=35673,tu=35674,Ps=35675,gc=35676,pu=35678,ll=35680,ef=4,de=1028,Ee=1029,qe=2304,tt=2305,at=32775,ct=32776,Nt=519,St=7680,Jt=0,mr=1,gr=32774,Hr=513,Vr=36160,ca=36064,Aa={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},Yr={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},oa={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},fa={cw:qe,ccw:tt};function Ea(st){return Array.isArray(st)||Xt(st)||or(st)}function Ma(st){return st.sort(function(It,Ut){return It===Ks?-1:Ut===Ks?1:It=1,ir>=2,It)}else if(Ut===Co){var dr=st.data;return new sa(dr.thisDep,dr.contextDep,dr.propDep,It)}else{if(Ut===Do)return new sa(!1,!1,!1,It);if(Ut===Fo){for(var Ar=!1,hr=!1,vr=!1,Or=0;Or=1&&(hr=!0),ta>=2&&(vr=!0)}else Cr.type===Co&&(Ar=Ar||Cr.data.thisDep,hr=hr||Cr.data.contextDep,vr=vr||Cr.data.propDep)}return new sa(Ar,hr,vr,It)}else return new sa(Ut===Zi,Ut===Ni,Ut===Ln,It)}}var $n=new sa(!1,!1,!1,function(){});function xi(st,It,Ut,ir,dr,Ar,hr,vr,Or,Cr,ta,ka,Ta,Ra,ua,ia){var ma=Cr.Record,da={add:32774,subtract:32778,"reverse subtract":32779};Ut.ext_blend_minmax&&(da.min=at,da.max=ct);var Fa=Ut.angle_instanced_arrays,za=Ut.webgl_draw_buffers,kn=Ut.oes_vertex_array_object,Dn={dirty:!0,profile:ia.profile},ui={},cn=[],sn={},ei={};function Pn(Wr){return Wr.replace(".","_")}function Rn(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),ui[Wa]=Dn[Wa]=!!pa,sn[Wa]=na}function In(Wr,na,pa){var Wa=Pn(Wr);cn.push(Wr),Array.isArray(pa)?(Dn[Wa]=pa.slice(),ui[Wa]=pa.slice()):Dn[Wa]=ui[Wa]=pa,ei[Wa]=na}function Jn(Wr){return!!isNaN(Wr)}Rn(Yo,an),Rn(bo,Ba),In(Gs,"blendColor",[0,0,0,0]),In(Es,"blendEquationSeparate",[gr,gr]),In(ns,"blendFuncSeparate",[mr,Jt,mr,Jt]),Rn(Kn,ii,!0),In(zo,"depthFunc",Hr),In(gs,"depthRange",[0,1]),In(js,"depthMask",!0),In(Cl,Cl,[!0,!0,!0,!0]),Rn(zl,xa),In(Kl,"cullFace",Ee),In(Gu,Gu,tt),In(xl,xl,1),Rn(Hu,oi),In(Su,"polygonOffset",[0,0]),Rn(mc,Ji),Rn(Jc,Qi),In(oc,"sampleCoverage",[1,!1]),Rn(du,wn),In(Jl,"stencilMask",-1),In(Ql,"stencilFunc",[Nt,0,-1]),In(Eu,"stencilOpSeparate",[de,St,St,St]),In(bf,"stencilOpSeparate",[Ee,St,St,St]),Rn(lh,Si),In(Pc,"scissor",[0,0,st.drawingBufferWidth,st.drawingBufferHeight]),In(Ks,Ks,[0,0,st.drawingBufferWidth,st.drawingBufferHeight]);var Ei={gl:st,context:Ta,strings:It,next:ui,current:Dn,draw:ka,elements:Ar,buffer:dr,shader:ta,attributes:Cr.state,vao:Cr,uniforms:Or,framebuffer:vr,extensions:Ut,timer:Ra,isBufferArgs:Ea},so={primTypes:en,compareFuncs:Yr,blendFuncs:Aa,blendEquations:da,stencilOps:oa,glTypes:Kr,orientationType:fa};za&&(so.backBuffer=[Ee],so.drawBuffer=f(ir.maxDrawbuffers,function(Wr){return Wr===0?[0]:f(Wr,function(na){return ca+na})}));var ti=0;function bi(){var Wr=Sn({cache:ua}),na=Wr.link,pa=Wr.global;Wr.id=ti++,Wr.batchId="0";var Wa=na(Ei),ln=Wr.shared={props:"a0"};Object.keys(Ei).forEach(function(wt){ln[wt]=pa.def(Wa,".",wt)});var Le=Wr.next={},Ue=Wr.current={};Object.keys(ei).forEach(function(wt){Array.isArray(Dn[wt])&&(Le[wt]=pa.def(ln.next,".",wt),Ue[wt]=pa.def(ln.current,".",wt))});var Qe=Wr.constants={};Object.keys(so).forEach(function(wt){Qe[wt]=pa.def(JSON.stringify(so[wt]))}),Wr.invoke=function(wt,Lt){switch(Lt.type){case En:var pr=["this",ln.context,ln.props,Wr.batchId];return wt.def(na(Lt.data),".call(",pr.slice(0,Math.max(Lt.data.length+1,4)),")");case Ln:return wt.def(ln.props,Lt.data);case Ni:return wt.def(ln.context,Lt.data);case Zi:return wt.def("this",Lt.data);case Co:return Lt.data.append(Wr,wt),Lt.data.ref;case Do:return Lt.data.toString();case Fo:return Lt.data.map(function(Gr){return Wr.invoke(wt,Gr)})}},Wr.attribCache={};var _t={};return Wr.scopeAttrib=function(wt){var Lt=It.id(wt);if(Lt in _t)return _t[Lt];var pr=Cr.scope[Lt];pr||(pr=Cr.scope[Lt]=new ma);var Gr=_t[Lt]=na(pr);return Gr},Wr}function Wi(Wr){var na=Wr.static,pa=Wr.dynamic,Wa;if(Bl in na){var ln=!!na[Bl];Wa=Tn(function(Ue,Qe){return ln}),Wa.enable=ln}else if(Bl in pa){var Le=pa[Bl];Wa=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}return Wa}function ro(Wr,na){var pa=Wr.static,Wa=Wr.dynamic;if(Wu in pa){var ln=pa[Wu];return ln?(ln=vr.getFramebuffer(ln),Tn(function(Ue,Qe){var _t=Ue.link(ln),wt=Ue.shared;Qe.set(wt.framebuffer,".next",_t);var Lt=wt.context;return Qe.set(Lt,"."+xt,_t+".width"),Qe.set(Lt,"."+Bt,_t+".height"),_t})):Tn(function(Ue,Qe){var _t=Ue.shared;Qe.set(_t.framebuffer,".next","null");var wt=_t.context;return Qe.set(wt,"."+xt,wt+"."+Br),Qe.set(wt,"."+Bt,wt+"."+kr),"null"})}else if(Wu in Wa){var Le=Wa[Wu];return zn(Le,function(Ue,Qe){var _t=Ue.invoke(Qe,Le),wt=Ue.shared,Lt=wt.framebuffer,pr=Qe.def(Lt,".getFramebuffer(",_t,")");Qe.set(Lt,".next",pr);var Gr=wt.context;return Qe.set(Gr,"."+xt,pr+"?"+pr+".width:"+Gr+"."+Br),Qe.set(Gr,"."+Bt,pr+"?"+pr+".height:"+Gr+"."+kr),pr})}else return null}function Mo(Wr,na,pa){var Wa=Wr.static,ln=Wr.dynamic;function Le(_t){if(_t in Wa){var wt=Wa[_t],Lt=!0,pr=wt.x|0,Gr=wt.y|0,va,Qa;return"width"in wt?va=wt.width|0:Lt=!1,"height"in wt?Qa=wt.height|0:Lt=!1,new sa(!Lt&&na&&na.thisDep,!Lt&&na&&na.contextDep,!Lt&&na&&na.propDep,function(An,dn){var _n=An.shared.context,Mn=va;"width"in wt||(Mn=dn.def(_n,".",xt,"-",pr));var Bn=Qa;return"height"in wt||(Bn=dn.def(_n,".",Bt,"-",Gr)),[pr,Gr,Mn,Bn]})}else if(_t in ln){var Ga=ln[_t],Ua=zn(Ga,function(An,dn){var _n=An.invoke(dn,Ga),Mn=An.shared.context,Bn=dn.def(_n,".x|0"),Zn=dn.def(_n,".y|0"),Ci=dn.def('"width" in ',_n,"?",_n,".width|0:","(",Mn,".",xt,"-",Bn,")"),qo=dn.def('"height" in ',_n,"?",_n,".height|0:","(",Mn,".",Bt,"-",Zn,")");return[Bn,Zn,Ci,qo]});return na&&(Ua.thisDep=Ua.thisDep||na.thisDep,Ua.contextDep=Ua.contextDep||na.contextDep,Ua.propDep=Ua.propDep||na.propDep),Ua}else return na?new sa(na.thisDep,na.contextDep,na.propDep,function(An,dn){var _n=An.shared.context;return[0,0,dn.def(_n,".",xt),dn.def(_n,".",Bt)]}):null}var Ue=Le(Ks);if(Ue){var Qe=Ue;Ue=new sa(Ue.thisDep,Ue.contextDep,Ue.propDep,function(_t,wt){var Lt=Qe.append(_t,wt),pr=_t.shared.context;return wt.set(pr,"."+zt,Lt[2]),wt.set(pr,"."+Wt,Lt[3]),Lt})}return{viewport:Ue,scissor_box:Le(Pc)}}function zs(Wr,na){var pa=Wr.static,Wa=typeof pa[Qc]=="string"&&typeof pa[wf]=="string";if(Wa){if(Object.keys(na.dynamic).length>0)return null;var ln=na.static,Le=Object.keys(ln);if(Le.length>0&&typeof ln[Le[0]]=="number"){for(var Ue=[],Qe=0;Qe"+Bn+"?"+Lt+".constant["+Bn+"]:0;"}).join(""),"}}else{","if(",va,"(",Lt,".buffer)){",An,"=",Qa,".createStream(",Jr,",",Lt,".buffer);","}else{",An,"=",Qa,".getBuffer(",Lt,".buffer);","}",dn,'="type" in ',Lt,"?",Gr.glTypes,"[",Lt,".type]:",An,".dtype;",Ga.normalized,"=!!",Lt,".normalized;");function _n(Mn){wt(Ga[Mn],"=",Lt,".",Mn,"|0;")}return _n("size"),_n("offset"),_n("stride"),_n("divisor"),wt("}}"),wt.exit("if(",Ga.isStream,"){",Qa,".destroyStream(",An,");","}"),Ga}ln[Le]=zn(Ue,Qe)}),ln}function $o(Wr){var na=Wr.static,pa=Wr.dynamic,Wa={};return Object.keys(na).forEach(function(ln){var Le=na[ln];Wa[ln]=Tn(function(Ue,Qe){return typeof Le=="number"||typeof Le=="boolean"?""+Le:Ue.link(Le)})}),Object.keys(pa).forEach(function(ln){var Le=pa[ln];Wa[ln]=zn(Le,function(Ue,Qe){return Ue.invoke(Qe,Le)})}),Wa}function _s(Wr,na,pa,Wa,ln){var Le=Wr.static,Ue=Wr.dynamic,Qe=zs(Wr,na),_t=ro(Wr,ln),wt=Mo(Wr,_t,ln),Lt=So(Wr,ln),pr=Ws(Wr,ln),Gr=Bs(Wr,ln,Qe);function va(_n){var Mn=wt[_n];Mn&&(pr[_n]=Mn)}va(Ks),va(Pn(Pc));var Qa=Object.keys(pr).length>0,Ga={framebuffer:_t,draw:Lt,shader:Gr,state:pr,dirty:Qa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Ga.profile=Wi(Wr,ln),Ga.uniforms=Zo(pa,ln),Ga.drawVAO=Ga.scopeVAO=Lt.vao,!Ga.drawVAO&&Gr.program&&!Qe&&Ut.angle_instanced_arrays&&Lt.static.elements){var Ua=!0,An=Gr.program.attributes.map(function(_n){var Mn=na.static[_n];return Ua=Ua&&!!Mn,Mn});if(Ua&&An.length>0){var dn=Cr.getVAO(Cr.createVAO({attributes:An,elements:Lt.static.elements}));Ga.drawVAO=new sa(null,null,null,function(_n,Mn){return _n.link(dn)}),Ga.useVAO=!0}}return Qe?Ga.useVAO=!0:Ga.attributes=es(na,ln),Ga.context=$o(Wa,ln),Ga}function Go(Wr,na,pa){var Wa=Wr.shared,ln=Wa.context,Le=Wr.scope();Object.keys(pa).forEach(function(Ue){na.save(ln,"."+Ue);var Qe=pa[Ue],_t=Qe.append(Wr,na);Array.isArray(_t)?Le(ln,".",Ue,"=[",_t.join(),"];"):Le(ln,".",Ue,"=",_t,";")}),na(Le)}function Ys(Wr,na,pa,Wa){var ln=Wr.shared,Le=ln.gl,Ue=ln.framebuffer,Qe;za&&(Qe=na.def(ln.extensions,".webgl_draw_buffers"));var _t=Wr.constants,wt=_t.drawBuffer,Lt=_t.backBuffer,pr;pa?pr=pa.append(Wr,na):pr=na.def(Ue,".next"),Wa||na("if(",pr,"!==",Ue,".cur){"),na("if(",pr,"){",Le,".bindFramebuffer(",Vr,",",pr,".framebuffer);"),za&&na(Qe,".drawBuffersWEBGL(",wt,"[",pr,".colorAttachments.length]);"),na("}else{",Le,".bindFramebuffer(",Vr,",null);"),za&&na(Qe,".drawBuffersWEBGL(",Lt,");"),na("}",Ue,".cur=",pr,";"),Wa||na("}")}function Ll(Wr,na,pa){var Wa=Wr.shared,ln=Wa.gl,Le=Wr.current,Ue=Wr.next,Qe=Wa.current,_t=Wa.next,wt=Wr.cond(Qe,".dirty");cn.forEach(function(Lt){var pr=Pn(Lt);if(!(pr in pa.state)){var Gr,va;if(pr in Ue){Gr=Ue[pr],va=Le[pr];var Qa=f(Dn[pr].length,function(Ua){return wt.def(Gr,"[",Ua,"]")});wt(Wr.cond(Qa.map(function(Ua,An){return Ua+"!=="+va+"["+An+"]"}).join("||")).then(ln,".",ei[pr],"(",Qa,");",Qa.map(function(Ua,An){return va+"["+An+"]="+Ua}).join(";"),";"))}else{Gr=wt.def(_t,".",pr);var Ga=Wr.cond(Gr,"!==",Qe,".",pr);wt(Ga),pr in sn?Ga(Wr.cond(Gr).then(ln,".enable(",sn[pr],");").else(ln,".disable(",sn[pr],");"),Qe,".",pr,"=",Gr,";"):Ga(ln,".",ei[pr],"(",Gr,");",Qe,".",pr,"=",Gr,";")}}}),Object.keys(pa.state).length===0&&wt(Qe,".dirty=false;"),na(wt)}function mo(Wr,na,pa,Wa){var ln=Wr.shared,Le=Wr.current,Ue=ln.current,Qe=ln.gl,_t;Ma(Object.keys(pa)).forEach(function(wt){var Lt=pa[wt];if(!(Wa&&!Wa(Lt))){var pr=Lt.append(Wr,na);if(sn[wt]){var Gr=sn[wt];hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Wr.cond(_t).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",_t,";")):(na(Wr.cond(pr).then(Qe,".enable(",Gr,");").else(Qe,".disable(",Gr,");")),na(Ue,".",wt,"=",pr,";"))}else if(zr(pr)){var va=Le[wt];na(Qe,".",ei[wt],"(",pr,");",pr.map(function(Qa,Ga){return va+"["+Ga+"]="+Qa}).join(";"),";")}else hn(Lt)?(_t=Wr.link(pr,{stable:!0}),na(Qe,".",ei[wt],"(",_t,");",Ue,".",wt,"=",_t,";")):na(Qe,".",ei[wt],"(",pr,");",Ue,".",wt,"=",pr,";")}})}function ru(Wr,na){Fa&&(Wr.instancing=na.def(Wr.shared.extensions,".angle_instanced_arrays"))}function Rs(Wr,na,pa,Wa,ln){var Le=Wr.shared,Ue=Wr.stats,Qe=Le.current,_t=Le.timer,wt=pa.profile;function Lt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var pr,Gr;function va(_n){pr=na.def(),_n(pr,"=",Lt(),";"),typeof ln=="string"?_n(Ue,".count+=",ln,";"):_n(Ue,".count++;"),Ra&&(Wa?(Gr=na.def(),_n(Gr,"=",_t,".getNumPendingQueries();")):_n(_t,".beginQuery(",Ue,");"))}function Qa(_n){_n(Ue,".cpuTime+=",Lt(),"-",pr,";"),Ra&&(Wa?_n(_t,".pushScopeStats(",Gr,",",_t,".getNumPendingQueries(),",Ue,");"):_n(_t,".endQuery();"))}function Ga(_n){var Mn=na.def(Qe,".profile");na(Qe,".profile=",_n,";"),na.exit(Qe,".profile=",Mn,";")}var Ua;if(wt){if(hn(wt)){wt.enable?(va(na),Qa(na.exit),Ga("true")):Ga("false");return}Ua=wt.append(Wr,na),Ga(Ua)}else Ua=na.def(Qe,".profile");var An=Wr.block();va(An),na("if(",Ua,"){",An,"}");var dn=Wr.block();Qa(dn),na.exit("if(",Ua,"){",dn,"}")}function Yu(Wr,na,pa,Wa,ln){var Le=Wr.shared;function Ue(_t){switch(_t){case Qo:case jl:case wi:return 2;case vo:case Hs:case sl:return 3;case ys:case Cu:case sc:return 4;default:return 1}}function Qe(_t,wt,Lt){var pr=Le.gl,Gr=na.def(_t,".location"),va=na.def(Le.attributes,"[",Gr,"]"),Qa=Lt.state,Ga=Lt.buffer,Ua=[Lt.x,Lt.y,Lt.z,Lt.w],An=["buffer","normalized","offset","stride"];function dn(){na("if(!",va,".buffer){",pr,".enableVertexAttribArray(",Gr,");}");var Mn=Lt.type,Bn;if(Lt.size?Bn=na.def(Lt.size,"||",wt):Bn=wt,na("if(",va,".type!==",Mn,"||",va,".size!==",Bn,"||",An.map(function(Ci){return va+"."+Ci+"!=="+Lt[Ci]}).join("||"),"){",pr,".bindBuffer(",Jr,",",Ga,".buffer);",pr,".vertexAttribPointer(",[Gr,Bn,Mn,Lt.normalized,Lt.stride,Lt.offset],");",va,".type=",Mn,";",va,".size=",Bn,";",An.map(function(Ci){return va+"."+Ci+"="+Lt[Ci]+";"}).join(""),"}"),Fa){var Zn=Lt.divisor;na("if(",va,".divisor!==",Zn,"){",Wr.instancing,".vertexAttribDivisorANGLE(",[Gr,Zn],");",va,".divisor=",Zn,";}")}}function _n(){na("if(",va,".buffer){",pr,".disableVertexAttribArray(",Gr,");",va,".buffer=null;","}if(",yi.map(function(Mn,Bn){return va+"."+Mn+"!=="+Ua[Bn]}).join("||"),"){",pr,".vertexAttrib4f(",Gr,",",Ua,");",yi.map(function(Mn,Bn){return va+"."+Mn+"="+Ua[Bn]+";"}).join(""),"}")}Qa===ki?dn():Qa===ri?_n():(na("if(",Qa,"===",ki,"){"),dn(),na("}else{"),_n(),na("}"))}Wa.forEach(function(_t){var wt=_t.name,Lt=pa.attributes[wt],pr;if(Lt){if(!ln(Lt))return;pr=Lt.append(Wr,na)}else{if(!ln($n))return;var Gr=Wr.scopeAttrib(wt);pr={},Object.keys(new ma).forEach(function(va){pr[va]=na.def(Gr,".",va)})}Qe(Wr.link(_t),Ue(_t.info.type),pr)})}function Ul(Wr,na,pa,Wa,ln,Le){for(var Ue=Wr.shared,Qe=Ue.gl,_t,wt=0;wt1){for(var As=[],ls=[],Vl=0;Vl>1)",Ga],");")}function Zn(){pa(Ua,".drawArraysInstancedANGLE(",[Gr,va,Qa,Ga],");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}function Mn(){function Bn(){pa(Le+".drawElements("+[Gr,Qa,An,va+"<<(("+An+"-"+_i+")>>1)"]+");")}function Zn(){pa(Le+".drawArrays("+[Gr,va,Qa]+");")}Lt&&Lt!=="null"?dn?Bn():(pa("if(",Lt,"){"),Bn(),pa("}else{"),Zn(),pa("}")):Zn()}Fa&&(typeof Ga!="number"||Ga>=0)?typeof Ga=="string"?(pa("if(",Ga,">0){"),_n(),pa("}else if(",Ga,"<0){"),Mn(),pa("}")):_n():Mn()}function fo(Wr,na,pa,Wa,ln){var Le=bi(),Ue=Le.proc("body",ln);return Fa&&(Le.instancing=Ue.def(Le.shared.extensions,".angle_instanced_arrays")),Wr(Le,Ue,pa,Wa),Le.compile().body}function Xo(Wr,na,pa,Wa){ru(Wr,na),pa.useVAO?pa.drawVAO?na(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,na),");"):na(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(na(Wr.shared.vao,".setVAO(null);"),Yu(Wr,na,pa,Wa.attributes,function(){return!0})),Ul(Wr,na,pa,Wa.uniforms,function(){return!0},!1),ql(Wr,na,na,pa)}function Os(Wr,na){var pa=Wr.proc("draw",1);ru(Wr,pa),Go(Wr,pa,na.context),Ys(Wr,pa,na.framebuffer),Ll(Wr,pa,na),mo(Wr,pa,na.state),Rs(Wr,pa,na,!1,!0);var Wa=na.shader.progVar.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",Wa,".program);"),na.shader.program)Xo(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var ln=Wr.global.def("{}"),Le=pa.def(Wa,".id"),Ue=pa.def(ln,"[",Le,"]");pa(Wr.cond(Ue).then(Ue,".call(this,a0);").else(Ue,"=",ln,"[",Le,"]=",Wr.link(function(Qe){return fo(Xo,Wr,na,Qe,1)}),"(",Wa,");",Ue,".call(this,a0);"))}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function ra(Wr,na,pa,Wa){Wr.batchId="a1",ru(Wr,na);function ln(){return!0}Yu(Wr,na,pa,Wa.attributes,ln),Ul(Wr,na,pa,Wa.uniforms,ln,!1),ql(Wr,na,na,pa)}function Ya(Wr,na,pa,Wa){ru(Wr,na);var ln=pa.contextDep,Le=na.def(),Ue="a0",Qe="a1",_t=na.def();Wr.shared.props=_t,Wr.batchId=Le;var wt=Wr.scope(),Lt=Wr.scope();na(wt.entry,"for(",Le,"=0;",Le,"<",Qe,";++",Le,"){",_t,"=",Ue,"[",Le,"];",Lt,"}",wt.exit);function pr(An){return An.contextDep&&ln||An.propDep}function Gr(An){return!pr(An)}if(pa.needsContext&&Go(Wr,Lt,pa.context),pa.needsFramebuffer&&Ys(Wr,Lt,pa.framebuffer),mo(Wr,Lt,pa.state,pr),pa.profile&&pr(pa.profile)&&Rs(Wr,Lt,pa,!1,!0),Wa)pa.useVAO?pa.drawVAO?pr(pa.drawVAO)?Lt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,Lt),");"):wt(Wr.shared.vao,".setVAO(",pa.drawVAO.append(Wr,wt),");"):wt(Wr.shared.vao,".setVAO(",Wr.shared.vao,".targetVAO);"):(wt(Wr.shared.vao,".setVAO(null);"),Yu(Wr,wt,pa,Wa.attributes,Gr),Yu(Wr,Lt,pa,Wa.attributes,pr)),Ul(Wr,wt,pa,Wa.uniforms,Gr,!1),Ul(Wr,Lt,pa,Wa.uniforms,pr,!0),ql(Wr,wt,Lt,pa);else{var va=Wr.global.def("{}"),Qa=pa.shader.progVar.append(Wr,Lt),Ga=Lt.def(Qa,".id"),Ua=Lt.def(va,"[",Ga,"]");Lt(Wr.shared.gl,".useProgram(",Qa,".program);","if(!",Ua,"){",Ua,"=",va,"[",Ga,"]=",Wr.link(function(An){return fo(ra,Wr,pa,An,2)}),"(",Qa,");}",Ua,".call(this,a0[",Le,"],",Le,");")}}function Ka(Wr,na){var pa=Wr.proc("batch",2);Wr.batchId="0",ru(Wr,pa);var Wa=!1,ln=!0;Object.keys(na.context).forEach(function(va){Wa=Wa||na.context[va].propDep}),Wa||(Go(Wr,pa,na.context),ln=!1);var Le=na.framebuffer,Ue=!1;Le?(Le.propDep?Wa=Ue=!0:Le.contextDep&&Wa&&(Ue=!0),Ue||Ys(Wr,pa,Le)):Ys(Wr,pa,null),na.state.viewport&&na.state.viewport.propDep&&(Wa=!0);function Qe(va){return va.contextDep&&Wa||va.propDep}Ll(Wr,pa,na),mo(Wr,pa,na.state,function(va){return!Qe(va)}),(!na.profile||!Qe(na.profile))&&Rs(Wr,pa,na,!1,"a1"),na.contextDep=Wa,na.needsContext=ln,na.needsFramebuffer=Ue;var _t=na.shader.progVar;if(_t.contextDep&&Wa||_t.propDep)Ya(Wr,pa,na,null);else{var wt=_t.append(Wr,pa);if(pa(Wr.shared.gl,".useProgram(",wt,".program);"),na.shader.program)Ya(Wr,pa,na,na.shader.program);else{pa(Wr.shared.vao,".setVAO(null);");var Lt=Wr.global.def("{}"),pr=pa.def(wt,".id"),Gr=pa.def(Lt,"[",pr,"]");pa(Wr.cond(Gr).then(Gr,".call(this,a0,a1);").else(Gr,"=",Lt,"[",pr,"]=",Wr.link(function(va){return fo(Ya,Wr,na,va,2)}),"(",wt,");",Gr,".call(this,a0,a1);"))}}Object.keys(na.state).length>0&&pa(Wr.shared.current,".dirty=true;"),Wr.shared.vao&&pa(Wr.shared.vao,".setVAO(null);")}function Bi(Wr,na){var pa=Wr.proc("scope",3);Wr.batchId="a2";var Wa=Wr.shared,ln=Wa.current;if(Go(Wr,pa,na.context),na.framebuffer&&na.framebuffer.append(Wr,pa),Ma(Object.keys(na.state)).forEach(function(Qe){var _t=na.state[Qe],wt=_t.append(Wr,pa);zr(wt)?wt.forEach(function(Lt,pr){Jn(Lt)?pa.set(Wr.next[Qe],"["+pr+"]",Lt):pa.set(Wr.next[Qe],"["+pr+"]",Wr.link(Lt,{stable:!0}))}):hn(_t)?pa.set(Wa.next,"."+Qe,Wr.link(wt,{stable:!0})):pa.set(Wa.next,"."+Qe,wt)}),Rs(Wr,pa,na,!0,!0),[ku,fi,Nl,eu,Ol].forEach(function(Qe){var _t=na.draw[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.draw,"."+Qe,wt):pa.set(Wa.draw,"."+Qe,Wr.link(wt),{stable:!0})}}),Object.keys(na.uniforms).forEach(function(Qe){var _t=na.uniforms[Qe].append(Wr,pa);Array.isArray(_t)&&(_t="["+_t.map(function(wt){return Jn(wt)?wt:Wr.link(wt,{stable:!0})})+"]"),pa.set(Wa.uniforms,"["+Wr.link(It.id(Qe),{stable:!0})+"]",_t)}),Object.keys(na.attributes).forEach(function(Qe){var _t=na.attributes[Qe].append(Wr,pa),wt=Wr.scopeAttrib(Qe);Object.keys(new ma).forEach(function(Lt){pa.set(wt,"."+Lt,_t[Lt])})}),na.scopeVAO){var Le=na.scopeVAO.append(Wr,pa);Jn(Le)?pa.set(Wa.vao,".targetVAO",Le):pa.set(Wa.vao,".targetVAO",Wr.link(Le,{stable:!0}))}function Ue(Qe){var _t=na.shader[Qe];if(_t){var wt=_t.append(Wr,pa);Jn(wt)?pa.set(Wa.shader,"."+Qe,wt):pa.set(Wa.shader,"."+Qe,Wr.link(wt,{stable:!0}))}}Ue(wf),Ue(Qc),Object.keys(na.state).length>0&&(pa(ln,".dirty=true;"),pa.exit(ln,".dirty=true;")),pa("a1(",Wr.shared.context,",a0,",Wr.batchId,");")}function rs(Wr){if(!(typeof Wr!="object"||zr(Wr))){for(var na=Object.keys(Wr),pa=0;pa=0;--fo){var Xo=Ei[fo];Xo&&Xo(ua,null,0)}Ut.flush(),ta&&ta.update()}function Mo(){!Wi&&Ei.length>0&&(Wi=m.next(ro))}function zs(){Wi&&(m.cancel(ro),Wi=null)}function Bs(fo){fo.preventDefault(),dr=!0,zs(),so.forEach(function(Xo){Xo()})}function So(fo){Ut.getError(),dr=!1,Ar.restore(),ui.restore(),Fa.restore(),cn.restore(),sn.restore(),ei.restore(),kn.restore(),ta&&ta.restore(),Pn.procs.refresh(),Mo(),ti.forEach(function(Xo){Xo()})}Jn&&(Jn.addEventListener(je,Bs,!1),Jn.addEventListener(Ze,So,!1));function Ws(){Ei.length=0,zs(),Jn&&(Jn.removeEventListener(je,Bs),Jn.removeEventListener(Ze,So)),ui.clear(),ei.clear(),sn.clear(),kn.clear(),cn.clear(),za.clear(),Fa.clear(),ta&&ta.clear(),bi.forEach(function(fo){fo()})}function Zo(fo){function Xo(Le){var Ue=p({},Le);delete Ue.uniforms,delete Ue.attributes,delete Ue.context,delete Ue.vao,"stencil"in Ue&&Ue.stencil.op&&(Ue.stencil.opBack=Ue.stencil.opFront=Ue.stencil.op,delete Ue.stencil.op);function Qe(_t){if(_t in Ue){var wt=Ue[_t];delete Ue[_t],Object.keys(wt).forEach(function(Lt){Ue[_t+"."+Lt]=wt[Lt]})}}return Qe("blend"),Qe("depth"),Qe("cull"),Qe("stencil"),Qe("polygonOffset"),Qe("scissor"),Qe("sample"),"vao"in Le&&(Ue.vao=Le.vao),Ue}function Os(Le,Ue){var Qe={},_t={};return Object.keys(Le).forEach(function(wt){var Lt=Le[wt];if(c.isDynamic(Lt)){_t[wt]=c.unbox(Lt,wt);return}else if(Ue&&Array.isArray(Lt)){for(var pr=0;pr0)return Wr.call(this,Wa(Le|0),Le|0)}else if(Array.isArray(Le)){if(Le.length)return Wr.call(this,Le,Le.length)}else return Oi.call(this,Le)}return p(ln,{stats:rs,destroy:function(){Is.destroy()}})}var es=ei.setFBO=Zo({framebuffer:c.define.call(null,ut,"framebuffer")});function $o(fo,Xo){var Os=0;Pn.procs.poll();var ra=Xo.color;ra&&(Ut.clearColor(+ra[0]||0,+ra[1]||0,+ra[2]||0,+ra[3]||0),Os|=ie),"depth"in Xo&&(Ut.clearDepth(+Xo.depth),Os|=fe),"stencil"in Xo&&(Ut.clearStencil(Xo.stencil|0),Os|=be),Ut.clear(Os)}function _s(fo){if("framebuffer"in fo)if(fo.framebuffer&&fo.framebuffer_reglType==="framebufferCube")for(var Xo=0;Xo<6;++Xo)es(p({framebuffer:fo.framebuffer.faces[Xo]},fo),$o);else es(fo,$o);else $o(null,fo)}function Go(fo){Ei.push(fo);function Xo(){var Os=Gt(Ei,fo);function ra(){var Ya=Gt(Ei,ra);Ei[Ya]=Ei[Ei.length-1],Ei.length-=1,Ei.length<=0&&zs()}Ei[Os]=ra}return Mo(),{cancel:Xo}}function Ys(){var fo=In.viewport,Xo=In.scissor_box;fo[0]=fo[1]=Xo[0]=Xo[1]=0,ua.viewportWidth=ua.framebufferWidth=ua.drawingBufferWidth=fo[2]=Xo[2]=Ut.drawingBufferWidth,ua.viewportHeight=ua.framebufferHeight=ua.drawingBufferHeight=fo[3]=Xo[3]=Ut.drawingBufferHeight}function Ll(){ua.tick+=1,ua.time=ru(),Ys(),Pn.procs.poll()}function mo(){cn.refresh(),Ys(),Pn.procs.refresh(),ta&&ta.update()}function ru(){return(h()-ka)/1e3}mo();function Rs(fo,Xo){var Os;switch(fo){case"frame":return Go(Xo);case"lost":Os=so;break;case"restore":Os=ti;break;case"destroy":Os=bi;break;default:}return Os.push(Xo),{cancel:function(){for(var ra=0;ra=0},read:Rn,destroy:Ws,_gl:Ut,_refresh:mo,poll:function(){Ll(),ta&&ta.update()},now:ru,stats:vr,getCachedCode:Yu,preloadCachedCode:Ul});return It.onDone(null,ql),ql}return Kt})}}),lq=ze({"node_modules/gl-util/context.js"(J,V){"use strict";var p=qd();V.exports=function(n){if(n?typeof n=="string"&&(n={container:n}):n={},E(n)?n={container:n}:k(n)?n={container:n}:l(n)?n={gl:n}:n=p(n,{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),n.pixelRatio||(n.pixelRatio=window.pixelRatio||1),n.gl)return n.gl;if(n.canvas&&(n.container=n.canvas.parentNode),n.container){if(typeof n.container=="string"){var r=document.querySelector(n.container);if(!r)throw Error("Element "+n.container+" is not found");n.container=r}E(n.container)?(n.canvas=n.container,n.container=n.canvas.parentNode):n.canvas||(n.canvas=e(),n.container.appendChild(n.canvas),b(n))}else if(!n.canvas)if(typeof document<"u")n.container=document.body||document.documentElement,n.canvas=e(),n.container.appendChild(n.canvas),b(n);else throw Error("Not DOM environment. Use headless-gl.");return n.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(a){try{n.gl=n.canvas.getContext(a,n.attrs)}catch{}return n.gl}),n.gl};function b(t){if(t.container)if(t.container==document.body)document.body.style.width||(t.canvas.width=t.width||t.pixelRatio*window.innerWidth),document.body.style.height||(t.canvas.height=t.height||t.pixelRatio*window.innerHeight);else{var n=t.container.getBoundingClientRect();t.canvas.width=t.width||n.right-n.left,t.canvas.height=t.height||n.bottom-n.top}}function E(t){return typeof t.getContext=="function"&&"width"in t&&"height"in t}function k(t){return typeof t.nodeName=="string"&&typeof t.appendChild=="function"&&typeof t.getBoundingClientRect=="function"}function l(t){return typeof t.drawArrays=="function"||typeof t.drawElements=="function"}function e(){var t=document.createElement("canvas");return t.style.position="absolute",t.style.top=0,t.style.left=0,t}}}),uq=ze({"node_modules/font-atlas/index.js"(J,V){"use strict";var p=dM(),b=[32,126];V.exports=E;function E(k){k=k||{};var l=k.shape?k.shape:k.canvas?[k.canvas.width,k.canvas.height]:[512,512],e=k.canvas||document.createElement("canvas"),t=k.font,n=typeof k.step=="number"?[k.step,k.step]:k.step||[32,32],r=k.chars||b;if(t&&typeof t!="string"&&(t=p(t)),!Array.isArray(r))r=String(r).split("");else if(r.length===2&&typeof r[0]=="number"&&typeof r[1]=="number"){for(var a=[],o=r[0],s=0;o<=r[1];o++)a[s++]=String.fromCharCode(o);r=a}l=l.slice(),e.width=l[0],e.height=l[1];var c=e.getContext("2d");c.fillStyle="#000",c.fillRect(0,0,e.width,e.height),c.font=t,c.textAlign="center",c.textBaseline="middle",c.fillStyle="#fff";for(var m=n[0]/2,h=n[1]/2,o=0;ol[0]-n[0]/2&&(m=n[0]/2,h+=n[1]);return e}}}),vM=ze({"node_modules/bit-twiddle/twiddle.js"(J){"use strict";"use restrict";var V=32;J.INT_BITS=V,J.INT_MAX=2147483647,J.INT_MIN=-1<0)-(E<0)},J.abs=function(E){var k=E>>V-1;return(E^k)-k},J.min=function(E,k){return k^(E^k)&-(E65535)<<4,E>>>=k,l=(E>255)<<3,E>>>=l,k|=l,l=(E>15)<<2,E>>>=l,k|=l,l=(E>3)<<1,E>>>=l,k|=l,k|E>>1},J.log10=function(E){return E>=1e9?9:E>=1e8?8:E>=1e7?7:E>=1e6?6:E>=1e5?5:E>=1e4?4:E>=1e3?3:E>=100?2:E>=10?1:0},J.popCount=function(E){return E=E-(E>>>1&1431655765),E=(E&858993459)+(E>>>2&858993459),(E+(E>>>4)&252645135)*16843009>>>24};function p(E){var k=32;return E&=-E,E&&k--,E&65535&&(k-=16),E&16711935&&(k-=8),E&252645135&&(k-=4),E&858993459&&(k-=2),E&1431655765&&(k-=1),k}J.countTrailingZeros=p,J.nextPow2=function(E){return E+=E===0,--E,E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E+1},J.prevPow2=function(E){return E|=E>>>1,E|=E>>>2,E|=E>>>4,E|=E>>>8,E|=E>>>16,E-(E>>>1)},J.parity=function(E){return E^=E>>>16,E^=E>>>8,E^=E>>>4,E&=15,27030>>>E&1};var b=new Array(256);(function(E){for(var k=0;k<256;++k){var l=k,e=k,t=7;for(l>>>=1;l;l>>>=1)e<<=1,e|=l&1,--t;E[k]=e<>>8&255]<<16|b[E>>>16&255]<<8|b[E>>>24&255]},J.interleave2=function(E,k){return E&=65535,E=(E|E<<8)&16711935,E=(E|E<<4)&252645135,E=(E|E<<2)&858993459,E=(E|E<<1)&1431655765,k&=65535,k=(k|k<<8)&16711935,k=(k|k<<4)&252645135,k=(k|k<<2)&858993459,k=(k|k<<1)&1431655765,E|k<<1},J.deinterleave2=function(E,k){return E=E>>>k&1431655765,E=(E|E>>>1)&858993459,E=(E|E>>>2)&252645135,E=(E|E>>>4)&16711935,E=(E|E>>>16)&65535,E<<16>>16},J.interleave3=function(E,k,l){return E&=1023,E=(E|E<<16)&4278190335,E=(E|E<<8)&251719695,E=(E|E<<4)&3272356035,E=(E|E<<2)&1227133513,k&=1023,k=(k|k<<16)&4278190335,k=(k|k<<8)&251719695,k=(k|k<<4)&3272356035,k=(k|k<<2)&1227133513,E|=k<<1,l&=1023,l=(l|l<<16)&4278190335,l=(l|l<<8)&251719695,l=(l|l<<4)&3272356035,l=(l|l<<2)&1227133513,E|l<<2},J.deinterleave3=function(E,k){return E=E>>>k&1227133513,E=(E|E>>>2)&3272356035,E=(E|E>>>4)&251719695,E=(E|E>>>8)&4278190335,E=(E|E>>>16)&1023,E<<22>>22},J.nextCombination=function(E){var k=E|E-1;return k+1|(~k&-~k)-1>>>p(E)+1}}}),cq=ze({"node_modules/dup/dup.js"(J,V){"use strict";function p(k,l,e){var t=k[e]|0;if(t<=0)return[];var n=new Array(t),r;if(e===k.length-1)for(r=0;r"u"&&(l=0),typeof k){case"number":if(k>0)return b(k|0,l);break;case"object":if(typeof k.length=="number")return p(k,l,0);break}return[]}V.exports=E}}),fq=ze({"node_modules/typedarray-pool/pool.js"(J){"use strict";var V=vM(),p=cq(),b=$v().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:p([32,0]),UINT16:p([32,0]),UINT32:p([32,0]),BIGUINT64:p([32,0]),INT8:p([32,0]),INT16:p([32,0]),INT32:p([32,0]),BIGINT64:p([32,0]),FLOAT:p([32,0]),DOUBLE:p([32,0]),DATA:p([32,0]),UINT8C:p([32,0]),BUFFER:p([32,0])});var E=typeof Uint8ClampedArray<"u",k=typeof BigUint64Array<"u",l=typeof BigInt64Array<"u",e=window.__TYPEDARRAY_POOL;e.UINT8C||(e.UINT8C=p([32,0])),e.BIGUINT64||(e.BIGUINT64=p([32,0])),e.BIGINT64||(e.BIGINT64=p([32,0])),e.BUFFER||(e.BUFFER=p([32,0]));var t=e.DATA,n=e.BUFFER;J.free=function(u){if(b.isBuffer(u))n[V.log2(u.length)].push(u);else{if(Object.prototype.toString.call(u)!=="[object ArrayBuffer]"&&(u=u.buffer),!u)return;var A=u.length||u.byteLength,x=V.log2(A)|0;t[x].push(u)}};function r(f){if(f){var u=f.length||f.byteLength,A=V.log2(u);t[A].push(f)}}function a(f){r(f.buffer)}J.freeUint8=J.freeUint16=J.freeUint32=J.freeBigUint64=J.freeInt8=J.freeInt16=J.freeInt32=J.freeBigInt64=J.freeFloat32=J.freeFloat=J.freeFloat64=J.freeDouble=J.freeUint8Clamped=J.freeDataView=a,J.freeArrayBuffer=r,J.freeBuffer=function(u){n[V.log2(u.length)].push(u)},J.malloc=function(u,A){if(A===void 0||A==="arraybuffer")return o(u);switch(A){case"uint8":return s(u);case"uint16":return c(u);case"uint32":return m(u);case"int8":return h(u);case"int16":return v(u);case"int32":return g(u);case"float":case"float32":return i(u);case"double":case"float64":return w(u);case"uint8_clamped":return S(u);case"bigint64":return C(u);case"biguint64":return M(u);case"buffer":return T(u);case"data":case"dataview":return _(u);default:return null}return null};function o(u){var u=V.nextPow2(u),A=V.log2(u),x=t[A];return x.length>0?x.pop():new ArrayBuffer(u)}J.mallocArrayBuffer=o;function s(f){return new Uint8Array(o(f),0,f)}J.mallocUint8=s;function c(f){return new Uint16Array(o(2*f),0,f)}J.mallocUint16=c;function m(f){return new Uint32Array(o(4*f),0,f)}J.mallocUint32=m;function h(f){return new Int8Array(o(f),0,f)}J.mallocInt8=h;function v(f){return new Int16Array(o(2*f),0,f)}J.mallocInt16=v;function g(f){return new Int32Array(o(4*f),0,f)}J.mallocInt32=g;function i(f){return new Float32Array(o(4*f),0,f)}J.mallocFloat32=J.mallocFloat=i;function w(f){return new Float64Array(o(8*f),0,f)}J.mallocFloat64=J.mallocDouble=w;function S(f){return E?new Uint8ClampedArray(o(f),0,f):s(f)}J.mallocUint8Clamped=S;function M(f){return k?new BigUint64Array(o(8*f),0,f):null}J.mallocBigUint64=M;function C(f){return l?new BigInt64Array(o(8*f),0,f):null}J.mallocBigInt64=C;function _(f){return new DataView(o(f),0,f)}J.mallocDataView=_;function T(f){f=V.nextPow2(f);var u=V.log2(f),A=n[u];return A.length>0?A.pop():new b(f)}J.mallocBuffer=T,J.clearCache=function(){for(var u=0;u<32;++u)e.UINT8[u].length=0,e.UINT16[u].length=0,e.UINT32[u].length=0,e.INT8[u].length=0,e.INT16[u].length=0,e.INT32[u].length=0,e.FLOAT[u].length=0,e.DOUBLE[u].length=0,e.BIGUINT64[u].length=0,e.BIGINT64[u].length=0,e.UINT8C[u].length=0,t[u].length=0,n[u].length=0}}}),hq=ze({"node_modules/is-plain-obj/index.js"(J,V){"use strict";var p=Object.prototype.toString;V.exports=function(b){var E;return p.call(b)==="[object Object]"&&(E=Object.getPrototypeOf(b),E===null||E===Object.getPrototypeOf({}))}}}),mM=ze({"node_modules/parse-unit/index.js"(J,V){V.exports=function(b,E){E||(E=[0,""]),b=String(b);var k=parseFloat(b,10);return E[0]=k,E[1]=b.match(/[\d.\-\+]*\s*(.*)/)[1]||"",E}}}),dq=ze({"node_modules/gl-text/node_modules/to-px/topx.js"(J,V){"use strict";var p=mM();V.exports=l;var b=96;function E(e,t){var n=p(getComputedStyle(e).getPropertyValue(t));return n[0]*l(n[1],e)}function k(e,t){var n=document.createElement("div");n.style["font-size"]="128"+e,t.appendChild(n);var r=E(n,"font-size")/128;return t.removeChild(n),r}function l(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return k(e,t);case"em":return E(t,"font-size");case"rem":return E(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return b;case"cm":return b/2.54;case"mm":return b/25.4;case"pt":return b/72;case"pc":return b/6}return 1}}}),pq=ze({"node_modules/detect-kerning/index.js"(J,V){"use strict";V.exports=k;var p=k.canvas=document.createElement("canvas"),b=p.getContext("2d"),E=l([32,126]);k.createPairs=l,k.ascii=E;function k(e,t){Array.isArray(e)&&(e=e.join(", "));var n={},r,a=16,o=.05;t&&(t.length===2&&typeof t[0]=="number"?r=l(t):Array.isArray(t)?r=t:(t.o?r=l(t.o):t.pairs&&(r=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(o=t.threshold))),r||(r=E),b.font=a+"px "+e;for(var s=0;sa*o){var v=(h-m)/a;n[c]=v*1e3}}return n}function l(e){for(var t=[],n=e[0];n<=e[1];n++)for(var r=String.fromCharCode(n),a=e[0];a0;n-=4)if(t[n]!==0)return Math.floor((n-3)*.25/e)}}}),mq=ze({"node_modules/gl-text/dist.js"(J,V){"use strict";var p=sq(),b=qd(),E=pM(),k=lq(),l=iM(),e=ay(),t=uq(),n=fq(),r=yg(),a=hq(),o=mM(),s=dq(),c=pq(),m=Vc(),h=vq(),v=f0(),g=vM(),i=g.nextPow2,w=new l,S=!1;document.body&&(M=document.body.appendChild(document.createElement("div")),M.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(M).fontStretch&&(S=!0),document.body.removeChild(M));var M,C=function(f){_(f)?(f={regl:f},this.gl=f.regl._gl):this.gl=k(f),this.shader=w.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=f.regl||E({gl:this.gl}),this.charBuffer=this.regl.buffer({type:"uint8",usage:"stream"}),this.sizeBuffer=this.regl.buffer({type:"float",usage:"stream"}),this.shader||(this.shader=this.createShader(),w.set(this.gl,this.shader)),this.batch=[],this.fontSize=[],this.font=[],this.fontAtlas=[],this.draw=this.shader.draw.bind(this),this.render=function(){this.regl._refresh(),this.draw(this.batch)},this.canvas=this.gl.canvas,this.update(a(f)?f:{})};C.prototype.createShader=function(){var f=this.regl,u=f({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:f.prop("count"),offset:f.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:f.this("sizeBuffer")},width:{offset:0,stride:8,buffer:f.this("sizeBuffer")},char:f.this("charBuffer"),position:f.this("position")},uniforms:{atlasSize:function(x,z){return[z.atlas.width,z.atlas.height]},atlasDim:function(x,z){return[z.atlas.cols,z.atlas.rows]},atlas:function(x,z){return z.atlas.texture},charStep:function(x,z){return z.atlas.step},em:function(x,z){return z.atlas.em},color:f.prop("color"),opacity:f.prop("opacity"),viewport:f.this("viewportArray"),scale:f.this("scale"),align:f.prop("align"),baseline:f.prop("baseline"),translate:f.this("translate"),positionOffset:f.prop("positionOffset")},primitive:"points",viewport:f.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; @@ -2691,12 +2692,9 @@ void main() { // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; - }`}),b={};return{regl:m,draw:h,atlas:b}},E.prototype.update=function(m){var h=this;if(typeof m=="string")m={text:m};else if(!m)return;m=v(m,{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),m.opacity!=null&&(Array.isArray(m.opacity)?this.opacity=m.opacity.map(function(ne){return parseFloat(ne)}):this.opacity=parseFloat(m.opacity)),m.viewport!=null&&(this.viewport=r(m.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(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]),m.kerning!=null&&(this.kerning=m.kerning),m.offset!=null&&(typeof m.offset=="number"&&(m.offset=[m.offset,0]),this.positionOffset=d(m.offset)),m.direction&&(this.direction=m.direction),m.range&&(this.range=m.range,this.scale=[1/(m.range[2]-m.range[0]),1/(m.range[3]-m.range[1])],this.translate=[-m.range[0],-m.range[1]]),m.scale&&(this.scale=m.scale),m.translate&&(this.translate=m.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!m.font&&(m.font=E.baseFontSize+"px sans-serif");var b=!1,_=!1;if(m.font&&(Array.isArray(m.font)?m.font:[m.font]).forEach(function(ne,be){if(typeof ne=="string")try{ne=u.parse(ne)}catch{ne=u.parse(E.baseFontSize+"px "+ne)}else{var Fe=ne.style,Ve=ne.weight,je=ne.stretch,ut=ne.variant;ne=u.parse(u.stringify(ne)),Fe&&(ne.style=Fe),Ve&&(ne.weight=Ve),je&&(ne.stretch=je),ut&&(ne.variant=ut)}var st=u.stringify({size:E.baseFontSize,family:ne.family,stretch:M?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style}),yt=i(ne.size),At=Math.round(yt[0]*s(yt[1]));if(At!==h.fontSize[be]&&(_=!0,h.fontSize[be]=At),(!h.font[be]||st!=h.font[be].baseString)&&(b=!0,h.font[be]=E.fonts[st],!h.font[be])){var Pt=ne.family.join(", "),Zt=[ne.style];ne.style!=ne.variant&&Zt.push(ne.variant),ne.variant!=ne.weight&&Zt.push(ne.weight),M&&ne.weight!=ne.stretch&&Zt.push(ne.stretch),h.font[be]={baseString:st,family:Pt,weight:ne.weight,stretch:ne.stretch,style:ne.style,variant:ne.variant,width:{},kerning:{},metrics:f(Pt,{origin:"top",fontSize:E.baseFontSize,fontStyle:Zt.join(" ")})},E.fonts[st]=h.font[be]}}),(b||_)&&this.font.forEach(function(ne,be){var Fe=u.stringify({size:h.fontSize[be],family:ne.family,stretch:M?ne.stretch:void 0,variant:ne.variant,weight:ne.weight,style:ne.style});if(h.fontAtlas[be]=h.shader.atlas[Fe],!h.fontAtlas[be]){var Ve=ne.metrics;h.shader.atlas[Fe]=h.fontAtlas[be]={fontString:Fe,step:Math.ceil(h.fontSize[be]*Ve.bottom*.5)*2,em:h.fontSize[be],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:h.regl.texture()}}m.text==null&&(m.text=h.text)}),typeof m.text=="string"&&m.position&&m.position.length>2){for(var I=Array(m.position.length*.5),C=0;C2){for(var z=!m.position[0].length,D=a.mallocFloat(this.count*2),k=0,B=0;k1?h.align[be]:h.align[0]:h.align;if(typeof Fe=="number")return Fe;switch(Fe){case"right":case"end":return-ne;case"center":case"centre":case"middle":return-ne*.5}return 0})),this.baseline==null&&m.baseline==null&&(m.baseline=0),m.baseline!=null&&(this.baseline=m.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(ne,be){var Fe=(h.font[be]||h.font[0]).metrics,Ve=0;return Ve+=Fe.bottom*.5,typeof ne=="number"?Ve+=ne-Fe.baseline:Ve+=-Fe[ne],Ve*=-1,Ve})),m.color!=null)if(m.color||(m.color="transparent"),typeof m.color=="string"||!isNaN(m.color))this.color=e(m.color,"uint8");else{var Ae;if(typeof m.color[0]=="number"&&m.color.length>this.counts.length){var Se=m.color.length;Ae=a.mallocUint8(Se);for(var Ce=(m.color.subarray||m.color.slice).bind(m.color),qe=0;qe4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(he){var oe=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(oe);for(var le=0;le1?this.counts[le]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[le]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(le*4,le*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[le]:this.opacity,baseline:this.baselineOffset[le]!=null?this.baselineOffset[le]:this.baselineOffset[0],align:this.align?this.alignOffset[le]!=null?this.alignOffset[le]:this.alignOffset[0]:0,atlas:this.fontAtlas[le]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(le*2,le*2+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=[]}},E.prototype.destroy=function(){},E.prototype.kerning=!0,E.prototype.position={constant:new Float32Array(2)},E.prototype.translate=null,E.prototype.scale=null,E.prototype.font=null,E.prototype.text="",E.prototype.positionOffset=[0,0],E.prototype.opacity=1,E.prototype.color=new Uint8Array([0,0,0,255]),E.prototype.alignOffset=[0,0],E.maxAtlasSize=1024,E.atlasCanvas=document.createElement("canvas"),E.atlasContext=E.atlasCanvas.getContext("2d",{alpha:!1}),E.baseFontSize=64,E.fonts={};function g(A){return typeof A=="function"&&A._gl&&A.prop&&A.texture&&A.buffer}N.exports=E}}),dj=De({"node_modules/@plotly/regl/dist/regl.unchecked.js"(j,N){(function(u,v){typeof j=="object"&&typeof N<"u"?N.exports=v():u.createREGL=v()})(j,function(){"use strict";var u=function(He,Lt){for(var Dt=Object.keys(Lt),Tr=0;Tr1&&Lt===Dt&&(Lt==='"'||Lt==="'"))return['"'+t(He.substr(1,He.length-2))+'"'];var Tr=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(He);if(Tr)return a(He.substr(0,Tr.index)).concat(a(Tr[1])).concat(a(He.substr(Tr.index+Tr[0].length)));var Nr=He.split(".");if(Nr.length===1)return['"'+t(He)+'"'];for(var qr=[],Or=0;Or"u"?1:window.devicePixelRatio,Pa=!1,En={},cn=function(gr){},Wa=function(){};if(typeof Lt=="string"?Dt=document.querySelector(Lt):typeof Lt=="object"&&(x(Lt)?Dt=Lt:M(Lt)?(qr=Lt,Nr=qr.canvas):("gl"in Lt?qr=Lt.gl:"canvas"in Lt?Nr=E(Lt.canvas):"container"in Lt&&(Tr=E(Lt.container)),"attributes"in Lt&&(Or=Lt.attributes),"extensions"in Lt&&(fa=T(Lt.extensions)),"optionalExtensions"in Lt&&(Sa=T(Lt.optionalExtensions)),"onDone"in Lt&&(cn=Lt.onDone),"profile"in Lt&&(Pa=!!Lt.profile),"pixelRatio"in Lt&&(Ca=+Lt.pixelRatio),"cachedCode"in Lt&&(En=Lt.cachedCode))),Dt&&(Dt.nodeName.toLowerCase()==="canvas"?Nr=Dt:Tr=Dt),!qr){if(!Nr){var ta=y(Tr||document.body,cn,Ca);if(!ta)return null;Nr=ta.canvas,Wa=ta.onDestroy}Or.premultipliedAlpha===void 0&&(Or.premultipliedAlpha=!0),qr=o(Nr,Or)}return qr?{gl:qr,canvas:Nr,container:Tr,extensions:fa,optionalExtensions:Sa,pixelRatio:Ca,profile:Pa,cachedCode:En,onDone:cn,onDestroy:Wa}:(Wa(),cn("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function A(He,Lt){var Dt={};function Tr(Or){var fa=Or.toLowerCase(),Sa;try{Sa=Dt[fa]=He.getExtension(fa)}catch{}return!!Sa}for(var Nr=0;Nr65535)<<4,He>>>=Lt,Dt=(He>255)<<3,He>>>=Dt,Lt|=Dt,Dt=(He>15)<<2,He>>>=Dt,Lt|=Dt,Dt=(He>3)<<1,He>>>=Dt,Lt|=Dt,Lt|He>>1}function k(){var He=m(8,function(){return[]});function Lt(qr){var Or=z(qr),fa=He[D(Or)>>2];return fa.length>0?fa.pop():new ArrayBuffer(Or)}function Dt(qr){He[D(qr.byteLength)>>2].push(qr)}function Tr(qr,Or){var fa=null;switch(qr){case h:fa=new Int8Array(Lt(Or),0,Or);break;case b:fa=new Uint8Array(Lt(Or),0,Or);break;case _:fa=new Int16Array(Lt(2*Or),0,Or);break;case I:fa=new Uint16Array(Lt(2*Or),0,Or);break;case C:fa=new Int32Array(Lt(4*Or),0,Or);break;case F:fa=new Uint32Array(Lt(4*Or),0,Or);break;case R:fa=new Float32Array(Lt(4*Or),0,Or);break;default:return null}return fa.length!==Or?fa.subarray(0,Or):fa}function Nr(qr){Dt(qr.buffer)}return{alloc:Lt,free:Dt,allocType:Tr,freeType:Nr}}var B=k();B.zero=k();var O=3408,q=3410,Y=3411,ee=3412,te=3413,ae=3414,U=3415,H=33901,K=33902,V=3379,$=3386,X=34921,Z=36347,Q=36348,re=35661,ce=35660,me=34930,ye=36349,Ae=34076,Se=34024,Ce=7936,qe=7937,Ue=7938,xe=35724,he=34047,oe=36063,le=34852,ne=3553,be=34067,Fe=34069,Ve=33984,je=6408,ut=5126,st=5121,yt=36160,At=36053,Pt=36064,Zt=16384,vr=function(He,Lt){var Dt=1;Lt.ext_texture_filter_anisotropic&&(Dt=He.getParameter(he));var Tr=1,Nr=1;Lt.webgl_draw_buffers&&(Tr=He.getParameter(le),Nr=He.getParameter(oe));var qr=!!Lt.oes_texture_float;if(qr){var Or=He.createTexture();He.bindTexture(ne,Or),He.texImage2D(ne,0,je,1,1,0,je,ut,null);var fa=He.createFramebuffer();if(He.bindFramebuffer(yt,fa),He.framebufferTexture2D(yt,Pt,ne,Or,0),He.bindTexture(ne,null),He.checkFramebufferStatus(yt)!==At)qr=!1;else{He.viewport(0,0,1,1),He.clearColor(1,0,0,1),He.clear(Zt);var Sa=B.allocType(ut,4);He.readPixels(0,0,1,1,je,ut,Sa),He.getError()?qr=!1:(He.deleteFramebuffer(fa),He.deleteTexture(Or),qr=Sa[0]===1),B.freeType(Sa)}}var Ca=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),Pa=!0;if(!Ca){var En=He.createTexture(),cn=B.allocType(st,36);He.activeTexture(Ve),He.bindTexture(be,En),He.texImage2D(Fe,0,je,3,3,0,je,st,cn),B.freeType(cn),He.bindTexture(be,null),He.deleteTexture(En),Pa=!He.getError()}return{colorBits:[He.getParameter(q),He.getParameter(Y),He.getParameter(ee),He.getParameter(te)],depthBits:He.getParameter(ae),stencilBits:He.getParameter(U),subpixelBits:He.getParameter(O),extensions:Object.keys(Lt).filter(function(Wa){return!!Lt[Wa]}),maxAnisotropic:Dt,maxDrawbuffers:Tr,maxColorAttachments:Nr,pointSizeDims:He.getParameter(H),lineWidthDims:He.getParameter(K),maxViewportDims:He.getParameter($),maxCombinedTextureUnits:He.getParameter(re),maxCubeMapSize:He.getParameter(Ae),maxRenderbufferSize:He.getParameter(Se),maxTextureUnits:He.getParameter(me),maxTextureSize:He.getParameter(V),maxAttributes:He.getParameter(X),maxVertexUniforms:He.getParameter(Z),maxVertexTextureUnits:He.getParameter(ce),maxVaryingVectors:He.getParameter(Q),maxFragmentUniforms:He.getParameter(ye),glsl:He.getParameter(xe),renderer:He.getParameter(qe),vendor:He.getParameter(Ce),version:He.getParameter(Ue),readFloat:qr,npotTextureCube:Pa}},Nt=function(He){return He instanceof Uint8Array||He instanceof Uint16Array||He instanceof Uint32Array||He instanceof Int8Array||He instanceof Int16Array||He instanceof Int32Array||He instanceof Float32Array||He instanceof Float64Array||He instanceof Uint8ClampedArray};function Kt(He){return!!He&&typeof He=="object"&&Array.isArray(He.shape)&&Array.isArray(He.stride)&&typeof He.offset=="number"&&He.shape.length===He.stride.length&&(Array.isArray(He.data)||Nt(He.data))}var nt=function(He){return Object.keys(He).map(function(Lt){return He[Lt]})},Ee={shape:We,flatten:Be};function ze(He,Lt,Dt){for(var Tr=0;Tr0){var Sn;if(Array.isArray(Hr[0])){Ua=aa(Hr);for(var na=1,ea=1;ea0){if(typeof na[0]=="number"){var Ia=B.allocType(ia.dtype,na.length);Gn(Ia,na),Ua(Ia,tn),B.freeType(Ia)}else if(Array.isArray(na[0])||Nt(na[0])){ja=aa(na);var Fa=oa(na,ja,ia.dtype);Ua(Fa,tn),B.freeType(Fa)}}}else if(Kt(na)){ja=na.shape;var rn=na.stride,kn=0,Vn=0,Oa=0,ln=0;ja.length===1?(kn=ja[0],Vn=1,Oa=rn[0],ln=0):ja.length===2&&(kn=ja[0],Vn=ja[1],Oa=rn[0],ln=rn[1]);var Hn=Array.isArray(na.data)?ia.dtype:xa(na.data),Wn=B.allocType(Hn,kn*Vn);Pn(Wn,na.data,kn,Vn,Oa,ln,na.offset),Ua(Wn,tn),B.freeType(Wn)}return Ya}return ha||Ya(gr),Ya._reglType="buffer",Ya._buffer=ia,Ya.subdata=Sn,Dt.profile&&(Ya.stats=ia.stats),Ya.destroy=function(){cn(ia)},Ya}function ta(){nt(qr).forEach(function(gr){gr.buffer=He.createBuffer(),He.bindBuffer(gr.type,gr.buffer),He.bufferData(gr.type,gr.persistentData||gr.byteLength,gr.usage)})}return Dt.profile&&(Lt.getTotalBufferSize=function(){var gr=0;return Object.keys(qr).forEach(function(Hr){gr+=qr[Hr].stats.size}),gr}),{create:Wa,createStream:Sa,destroyStream:Ca,clear:function(){nt(qr).forEach(cn),fa.forEach(cn)},getBuffer:function(gr){return gr&&gr._buffer instanceof Or?gr._buffer:null},restore:ta,_initBuffer:En}}var Yn=0,Zn=0,vi=1,Dn=1,oi=4,on=4,mn={points:Yn,point:Zn,lines:vi,line:Dn,triangles:oi,triangle:on,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},bi=0,Li=1,$a=4,Va=5120,it=5121,Qe=5122,Jt=5123,Yt=5124,ar=5125,cr=34963,tr=35040,Je=35044;function bt(He,Lt,Dt,Tr){var Nr={},qr=0,Or={uint8:it,uint16:Jt};Lt.oes_element_index_uint&&(Or.uint32=ar);function fa(ta){this.id=qr++,Nr[this.id]=this,this.buffer=ta,this.primType=$a,this.vertCount=0,this.type=0}fa.prototype.bind=function(){this.buffer.bind()};var Sa=[];function Ca(ta){var gr=Sa.pop();return gr||(gr=new fa(Dt.create(null,cr,!0,!1)._buffer)),En(gr,ta,tr,-1,-1,0,0),gr}function Pa(ta){Sa.push(ta)}function En(ta,gr,Hr,ha,Ea,ia,Ya){ta.buffer.bind();var Ua;if(gr){var Sn=Ya;!Ya&&(!Nt(gr)||Kt(gr)&&!Nt(gr.data))&&(Sn=Lt.oes_element_index_uint?ar:Jt),Dt._initBuffer(ta.buffer,gr,Hr,Sn,3)}else He.bufferData(cr,ia,Hr),ta.buffer.dtype=Ua||it,ta.buffer.usage=Hr,ta.buffer.dimension=3,ta.buffer.byteLength=ia;if(Ua=Ya,!Ya){switch(ta.buffer.dtype){case it:case Va:Ua=it;break;case Jt:case Qe:Ua=Jt;break;case ar:case Yt:Ua=ar;break;default:}ta.buffer.dtype=Ua}ta.type=Ua;var na=Ea;na<0&&(na=ta.buffer.byteLength,Ua===Jt?na>>=1:Ua===ar&&(na>>=2)),ta.vertCount=na;var ea=ha;if(ha<0){ea=$a;var tn=ta.buffer.dimension;tn===1&&(ea=bi),tn===2&&(ea=Li),tn===3&&(ea=$a)}ta.primType=ea}function cn(ta){Tr.elementsCount--,delete Nr[ta.id],ta.buffer.destroy(),ta.buffer=null}function Wa(ta,gr){var Hr=Dt.create(null,cr,!0),ha=new fa(Hr._buffer);Tr.elementsCount++;function Ea(ia){if(!ia)Hr(),ha.primType=$a,ha.vertCount=0,ha.type=it;else if(typeof ia=="number")Hr(ia),ha.primType=$a,ha.vertCount=ia|0,ha.type=it;else{var Ya=null,Ua=Je,Sn=-1,na=-1,ea=0,tn=0;Array.isArray(ia)||Nt(ia)||Kt(ia)?Ya=ia:("data"in ia&&(Ya=ia.data),"usage"in ia&&(Ua=pa[ia.usage]),"primitive"in ia&&(Sn=mn[ia.primitive]),"count"in ia&&(na=ia.count|0),"type"in ia&&(tn=Or[ia.type]),"length"in ia?ea=ia.length|0:(ea=na,tn===Jt||tn===Qe?ea*=2:(tn===ar||tn===Yt)&&(ea*=4))),En(ha,Ya,Ua,Sn,na,ea,tn)}return Ea}return Ea(ta),Ea._reglType="elements",Ea._elements=ha,Ea.subdata=function(ia,Ya){return Hr.subdata(ia,Ya),Ea},Ea.destroy=function(){cn(ha)},Ea}return{create:Wa,createStream:Ca,destroyStream:Pa,getElements:function(ta){return typeof ta=="function"&&ta._elements instanceof fa?ta._elements:null},clear:function(){nt(Nr).forEach(cn)}}}var qt=new Float32Array(1),Qt=new Uint32Array(qt.buffer),br=5123;function Ir(He){for(var Lt=B.allocType(br,He.length),Dt=0;Dt>>31<<15,qr=(Tr<<1>>>24)-127,Or=Tr>>13&1023;if(qr<-24)Lt[Dt]=Nr;else if(qr<-14){var fa=-14-qr;Lt[Dt]=Nr+(Or+1024>>fa)}else qr>15?Lt[Dt]=Nr+31744:Lt[Dt]=Nr+(qr+15<<10)+Or}return Lt}function Cr(He){return Array.isArray(He)||Nt(He)}var Mr=34467,Xr=3553,Ra=34067,wa=34069,yn=6408,fn=6406,ri=6407,On=6409,ui=6410,jn=32854,oo=32855,Qi=36194,Mn=32819,bo=32820,so=33635,Hi=34042,yo=6402,Bi=34041,fo=35904,Po=35906,po=36193,Kn=33776,yi=33777,Yi=33778,zi=33779,Uo=35986,Co=35987,Wo=34798,Go=35840,ns=35841,Ro=35842,Zi=35843,ls=36196,Eo=5121,mo=5123,Zs=5125,qo=5126,Ds=10242,Us=10243,is=10497,cl=33071,ml=33648,Qo=10240,Gl=10241,ys=9728,$o=9729,wo=9984,go=9985,rs=9986,$l=9987,cu=33170,Kl=4352,Wu=4353,Yu=4354,rc=34046,ac=3317,xc=37440,Ec=37441,fu=37443,hu=37444,du=33984,Jl=[wo,rs,go,$l],Fs=[0,On,ui,ri,yn],Yo={};Yo[On]=Yo[fn]=Yo[yo]=1,Yo[Bi]=Yo[ui]=2,Yo[ri]=Yo[fo]=3,Yo[yn]=Yo[Po]=4;function tl(He){return"[object "+He+"]"}var wu=tl("HTMLCanvasElement"),Xu=tl("OffscreenCanvas"),kc=tl("CanvasRenderingContext2D"),zs=tl("ImageBitmap"),Zf=tl("HTMLImageElement"),Io=tl("HTMLVideoElement"),$f=Object.keys(Xe).concat([wu,Xu,kc,zs,Zf,Io]),Vo=[];Vo[Eo]=1,Vo[qo]=4,Vo[po]=2,Vo[mo]=2,Vo[Zs]=4;var qi=[];qi[jn]=2,qi[oo]=2,qi[Qi]=2,qi[Bi]=4,qi[Kn]=.5,qi[yi]=.5,qi[Yi]=1,qi[zi]=1,qi[Uo]=.5,qi[Co]=1,qi[Wo]=1,qi[Go]=.5,qi[ns]=.25,qi[Ro]=.5,qi[Zi]=.25,qi[ls]=.5;function Zu(He){return Array.isArray(He)&&(He.length===0||typeof He[0]=="number")}function bc(He){if(!Array.isArray(He))return!1;var Lt=He.length;return!(Lt===0||!Cr(He[0]))}function El(He){return Object.prototype.toString.call(He)}function mf(He){return El(He)===wu}function Au(He){return El(He)===Xu}function nc(He){return El(He)===kc}function rl(He){return El(He)===zs}function gf(He){return El(He)===Zf}function Yc(He){return El(He)===Io}function ic(He){if(!He)return!1;var Lt=El(He);return $f.indexOf(Lt)>=0?!0:Zu(He)||bc(He)||Kt(He)}function oc(He){return Xe[Object.prototype.toString.call(He)]|0}function Xc(He,Lt){var Dt=Lt.length;switch(He.type){case Eo:case mo:case Zs:case qo:var Tr=B.allocType(He.type,Dt);Tr.set(Lt),He.data=Tr;break;case po:He.data=Ir(Lt);break;default:}}function Zc(He,Lt){return B.allocType(He.type===po?qo:He.type,Lt)}function Ql(He,Lt){He.type===po?(He.data=Ir(Lt),B.freeType(Lt)):He.data=Lt}function Cc(He,Lt,Dt,Tr,Nr,qr){for(var Or=He.width,fa=He.height,Sa=He.channels,Ca=Or*fa*Sa,Pa=Zc(He,Ca),En=0,cn=0;cn=1;)fa+=Or*Sa*Sa,Sa/=2;return fa}else return Or*Dt*Tr}function sc(He,Lt,Dt,Tr,Nr,qr,Or){var fa={"don't care":Kl,"dont care":Kl,nice:Yu,fast:Wu},Sa={repeat:is,clamp:cl,mirror:ml},Ca={nearest:ys,linear:$o},Pa=u({mipmap:$l,"nearest mipmap nearest":wo,"linear mipmap nearest":go,"nearest mipmap linear":rs,"linear mipmap linear":$l},Ca),En={none:0,browser:hu},cn={uint8:Eo,rgba4:Mn,rgb565:so,"rgb5 a1":bo},Wa={alpha:fn,luminance:On,"luminance alpha":ui,rgb:ri,rgba:yn,rgba4:jn,"rgb5 a1":oo,rgb565:Qi},ta={};Lt.ext_srgb&&(Wa.srgb=fo,Wa.srgba=Po),Lt.oes_texture_float&&(cn.float32=cn.float=qo),Lt.oes_texture_half_float&&(cn.float16=cn["half float"]=po),Lt.webgl_depth_texture&&(u(Wa,{depth:yo,"depth stencil":Bi}),u(cn,{uint16:mo,uint32:Zs,"depth stencil":Hi})),Lt.webgl_compressed_texture_s3tc&&u(ta,{"rgb s3tc dxt1":Kn,"rgba s3tc dxt1":yi,"rgba s3tc dxt3":Yi,"rgba s3tc dxt5":zi}),Lt.webgl_compressed_texture_atc&&u(ta,{"rgb atc":Uo,"rgba atc explicit alpha":Co,"rgba atc interpolated alpha":Wo}),Lt.webgl_compressed_texture_pvrtc&&u(ta,{"rgb pvrtc 4bppv1":Go,"rgb pvrtc 2bppv1":ns,"rgba pvrtc 4bppv1":Ro,"rgba pvrtc 2bppv1":Zi}),Lt.webgl_compressed_texture_etc1&&(ta["rgb etc1"]=ls);var gr=Array.prototype.slice.call(He.getParameter(Mr));Object.keys(ta).forEach(function(Ct){var Fr=ta[Ct];gr.indexOf(Fr)>=0&&(Wa[Ct]=Fr)});var Hr=Object.keys(Wa);Dt.textureFormats=Hr;var ha=[];Object.keys(Wa).forEach(function(Ct){var Fr=Wa[Ct];ha[Fr]=Ct});var Ea=[];Object.keys(cn).forEach(function(Ct){var Fr=cn[Ct];Ea[Fr]=Ct});var ia=[];Object.keys(Ca).forEach(function(Ct){var Fr=Ca[Ct];ia[Fr]=Ct});var Ya=[];Object.keys(Pa).forEach(function(Ct){var Fr=Pa[Ct];Ya[Fr]=Ct});var Ua=[];Object.keys(Sa).forEach(function(Ct){var Fr=Sa[Ct];Ua[Fr]=Ct});var Sn=Hr.reduce(function(Ct,Fr){var zr=Wa[Fr];return zr===On||zr===fn||zr===On||zr===ui||zr===yo||zr===Bi||Lt.ext_srgb&&(zr===fo||zr===Po)?Ct[zr]=zr:zr===oo||Fr.indexOf("rgba")>=0?Ct[zr]=yn:Ct[zr]=ri,Ct},{});function na(){this.internalformat=yn,this.format=yn,this.type=Eo,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=hu,this.width=0,this.height=0,this.channels=0}function ea(Ct,Fr){Ct.internalformat=Fr.internalformat,Ct.format=Fr.format,Ct.type=Fr.type,Ct.compressed=Fr.compressed,Ct.premultiplyAlpha=Fr.premultiplyAlpha,Ct.flipY=Fr.flipY,Ct.unpackAlignment=Fr.unpackAlignment,Ct.colorSpace=Fr.colorSpace,Ct.width=Fr.width,Ct.height=Fr.height,Ct.channels=Fr.channels}function tn(Ct,Fr){if(!(typeof Fr!="object"||!Fr)){if("premultiplyAlpha"in Fr&&(Ct.premultiplyAlpha=Fr.premultiplyAlpha),"flipY"in Fr&&(Ct.flipY=Fr.flipY),"alignment"in Fr&&(Ct.unpackAlignment=Fr.alignment),"colorSpace"in Fr&&(Ct.colorSpace=En[Fr.colorSpace]),"type"in Fr){var zr=Fr.type;Ct.type=cn[zr]}var dn=Ct.width,Mi=Ct.height,xo=Ct.channels,vn=!1;"shape"in Fr?(dn=Fr.shape[0],Mi=Fr.shape[1],Fr.shape.length===3&&(xo=Fr.shape[2],vn=!0)):("radius"in Fr&&(dn=Mi=Fr.radius),"width"in Fr&&(dn=Fr.width),"height"in Fr&&(Mi=Fr.height),"channels"in Fr&&(xo=Fr.channels,vn=!0)),Ct.width=dn|0,Ct.height=Mi|0,Ct.channels=xo|0;var wt=!1;if("format"in Fr){var It=Fr.format,$t=Ct.internalformat=Wa[It];Ct.format=Sn[$t],It in cn&&("type"in Fr||(Ct.type=cn[It])),It in ta&&(Ct.compressed=!0),wt=!0}!vn&&wt?Ct.channels=Yo[Ct.format]:vn&&!wt&&Ct.channels!==Fs[Ct.format]&&(Ct.format=Ct.internalformat=Fs[Ct.channels])}}function ja(Ct){He.pixelStorei(xc,Ct.flipY),He.pixelStorei(Ec,Ct.premultiplyAlpha),He.pixelStorei(fu,Ct.colorSpace),He.pixelStorei(ac,Ct.unpackAlignment)}function Ia(){na.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Fa(Ct,Fr){var zr=null;if(ic(Fr)?zr=Fr:Fr&&(tn(Ct,Fr),"x"in Fr&&(Ct.xOffset=Fr.x|0),"y"in Fr&&(Ct.yOffset=Fr.y|0),ic(Fr.data)&&(zr=Fr.data)),Fr.copy){var dn=Nr.viewportWidth,Mi=Nr.viewportHeight;Ct.width=Ct.width||dn-Ct.xOffset,Ct.height=Ct.height||Mi-Ct.yOffset,Ct.needsCopy=!0}else if(!zr)Ct.width=Ct.width||1,Ct.height=Ct.height||1,Ct.channels=Ct.channels||4;else if(Nt(zr))Ct.channels=Ct.channels||4,Ct.data=zr,!("type"in Fr)&&Ct.type===Eo&&(Ct.type=oc(zr));else if(Zu(zr))Ct.channels=Ct.channels||4,Xc(Ct,zr),Ct.alignment=1,Ct.needsFree=!0;else if(Kt(zr)){var xo=zr.data;!Array.isArray(xo)&&Ct.type===Eo&&(Ct.type=oc(xo));var vn=zr.shape,wt=zr.stride,It,$t,Rr,Vr,_r,mr;vn.length===3?(Rr=vn[2],mr=wt[2]):(Rr=1,mr=1),It=vn[0],$t=vn[1],Vr=wt[0],_r=wt[1],Ct.alignment=1,Ct.width=It,Ct.height=$t,Ct.channels=Rr,Ct.format=Ct.internalformat=Fs[Rr],Ct.needsFree=!0,Cc(Ct,xo,Vr,_r,mr,zr.offset)}else if(mf(zr)||Au(zr)||nc(zr))mf(zr)||Au(zr)?Ct.element=zr:Ct.element=zr.canvas,Ct.width=Ct.element.width,Ct.height=Ct.element.height,Ct.channels=4;else if(rl(zr))Ct.element=zr,Ct.width=zr.width,Ct.height=zr.height,Ct.channels=4;else if(gf(zr))Ct.element=zr,Ct.width=zr.naturalWidth,Ct.height=zr.naturalHeight,Ct.channels=4;else if(Yc(zr))Ct.element=zr,Ct.width=zr.videoWidth,Ct.height=zr.videoHeight,Ct.channels=4;else if(bc(zr)){var ir=Ct.width||zr[0].length,Wt=Ct.height||zr.length,rr=Ct.channels;Cr(zr[0][0])?rr=rr||zr[0][0].length:rr=rr||1;for(var zt=Ee.shape(zr),Sr=1,Yr=0;Yr>=Mi,zr.height>>=Mi,Fa(zr,dn[Mi]),Ct.mipmask|=1<=0&&!("faces"in Fr)&&(Ct.genMipmaps=!0)}if("mag"in Fr){var dn=Fr.mag;Ct.magFilter=Ca[dn]}var Mi=Ct.wrapS,xo=Ct.wrapT;if("wrap"in Fr){var vn=Fr.wrap;typeof vn=="string"?Mi=xo=Sa[vn]:Array.isArray(vn)&&(Mi=Sa[vn[0]],xo=Sa[vn[1]])}else{if("wrapS"in Fr){var wt=Fr.wrapS;Mi=Sa[wt]}if("wrapT"in Fr){var It=Fr.wrapT;xo=Sa[It]}}if(Ct.wrapS=Mi,Ct.wrapT=xo,"anisotropic"in Fr){var $t=Fr.anisotropic;Ct.anisotropic=Fr.anisotropic}if("mipmap"in Fr){var Rr=!1;switch(typeof Fr.mipmap){case"string":Ct.mipmapHint=fa[Fr.mipmap],Ct.genMipmaps=!0,Rr=!0;break;case"boolean":Rr=Ct.genMipmaps=Fr.mipmap;break;case"object":Ct.genMipmaps=!1,Rr=!0;break;default:}Rr&&!("min"in Fr)&&(Ct.minFilter=wo)}}function Ls(Ct,Fr){He.texParameteri(Fr,Gl,Ct.minFilter),He.texParameteri(Fr,Qo,Ct.magFilter),He.texParameteri(Fr,Ds,Ct.wrapS),He.texParameteri(Fr,Us,Ct.wrapT),Lt.ext_texture_filter_anisotropic&&He.texParameteri(Fr,rc,Ct.anisotropic),Ct.genMipmaps&&(He.hint(cu,Ct.mipmapHint),He.generateMipmap(Fr))}var Js=0,ps={},ms=Dt.maxTextureUnits,Ts=Array(ms).map(function(){return null});function si(Ct){na.call(this),this.mipmask=0,this.internalformat=yn,this.id=Js++,this.refCount=1,this.target=Ct,this.texture=He.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new _o,Or.profile&&(this.stats={size:0})}function Ps(Ct){He.activeTexture(du),He.bindTexture(Ct.target,Ct.texture)}function Mo(){var Ct=Ts[0];Ct?He.bindTexture(Ct.target,Ct.texture):He.bindTexture(Xr,null)}function il(Ct){var Fr=Ct.texture,zr=Ct.unit,dn=Ct.target;zr>=0&&(He.activeTexture(du+zr),He.bindTexture(dn,null),Ts[zr]=null),He.deleteTexture(Fr),Ct.texture=null,Ct.params=null,Ct.pixels=null,Ct.refCount=0,delete ps[Ct.id],qr.textureCount--}u(si.prototype,{bind:function(){var Ct=this;Ct.bindCount+=1;var Fr=Ct.unit;if(Fr<0){for(var zr=0;zr0)continue;dn.unit=-1}Ts[zr]=Ct,Fr=zr;break}Fr>=ms,Or.profile&&qr.maxTextureUnits>_r)-Rr,mr.height=mr.height||(zr.height>>_r)-Vr,Ps(zr),kn(mr,Xr,Rr,Vr,_r),Mo(),ln(mr),dn}function xo(vn,wt){var It=vn|0,$t=wt|0||It;if(It===zr.width&&$t===zr.height)return dn;dn.width=zr.width=It,dn.height=zr.height=$t,Ps(zr);for(var Rr=0;zr.mipmask>>Rr;++Rr){var Vr=It>>Rr,_r=$t>>Rr;if(!Vr||!_r)break;He.texImage2D(Xr,Rr,zr.format,Vr,_r,0,zr.format,zr.type,null)}return Mo(),Or.profile&&(zr.stats.size=eu(zr.internalformat,zr.type,It,$t,!1,!1)),dn}return dn(Ct,Fr),dn.subimage=Mi,dn.resize=xo,dn._reglType="texture2d",dn._texture=zr,Or.profile&&(dn.stats=zr.stats),dn.destroy=function(){zr.decRef()},dn}function wl(Ct,Fr,zr,dn,Mi,xo){var vn=new si(Ra);ps[vn.id]=vn,qr.cubeCount++;var wt=new Array(6);function It(Vr,_r,mr,ir,Wt,rr){var zt,Sr=vn.texInfo;for(_o.call(Sr),zt=0;zt<6;++zt)wt[zt]=Ei();if(typeof Vr=="number"||!Vr){var Yr=Vr|0||1;for(zt=0;zt<6;++zt)Wn(wt[zt],Yr,Yr)}else if(typeof Vr=="object")if(_r)gi(wt[0],Vr),gi(wt[1],_r),gi(wt[2],mr),gi(wt[3],ir),gi(wt[4],Wt),gi(wt[5],rr);else if(Hs(Sr,Vr),tn(vn,Vr),"faces"in Vr){var va=Vr.faces;for(zt=0;zt<6;++zt)ea(wt[zt],vn),gi(wt[zt],va[zt])}else for(zt=0;zt<6;++zt)gi(wt[zt],Vr);for(ea(vn,wt[0]),Sr.genMipmaps?vn.mipmask=(wt[0].width<<1)-1:vn.mipmask=wt[0].mipmask,vn.internalformat=wt[0].internalformat,It.width=wt[0].width,It.height=wt[0].height,Ps(vn),zt=0;zt<6;++zt)Jo(wt[zt],wa+zt);for(Ls(Sr,Ra),Mo(),Or.profile&&(vn.stats.size=eu(vn.internalformat,vn.type,It.width,It.height,Sr.genMipmaps,!0)),It.format=ha[vn.internalformat],It.type=Ea[vn.type],It.mag=ia[Sr.magFilter],It.min=Ya[Sr.minFilter],It.wrapS=Ua[Sr.wrapS],It.wrapT=Ua[Sr.wrapT],zt=0;zt<6;++zt)bl(wt[zt]);return It}function $t(Vr,_r,mr,ir,Wt){var rr=mr|0,zt=ir|0,Sr=Wt|0,Yr=Oa();return ea(Yr,vn),Yr.width=0,Yr.height=0,Fa(Yr,_r),Yr.width=Yr.width||(vn.width>>Sr)-rr,Yr.height=Yr.height||(vn.height>>Sr)-zt,Ps(vn),kn(Yr,wa+Vr,rr,zt,Sr),Mo(),ln(Yr),It}function Rr(Vr){var _r=Vr|0;if(_r!==vn.width){It.width=vn.width=_r,It.height=vn.height=_r,Ps(vn);for(var mr=0;mr<6;++mr)for(var ir=0;vn.mipmask>>ir;++ir)He.texImage2D(wa+mr,ir,vn.format,_r>>ir,_r>>ir,0,vn.format,vn.type,null);return Mo(),Or.profile&&(vn.stats.size=eu(vn.internalformat,vn.type,It.width,It.height,!1,!0)),It}}return It(Ct,Fr,zr,dn,Mi,xo),It.subimage=$t,It.resize=Rr,It._reglType="textureCube",It._texture=vn,Or.profile&&(It.stats=vn.stats),It.destroy=function(){vn.decRef()},It}function $n(){for(var Ct=0;Ct>dn,zr.height>>dn,0,zr.internalformat,zr.type,null);else for(var Mi=0;Mi<6;++Mi)He.texImage2D(wa+Mi,dn,zr.internalformat,zr.width>>dn,zr.height>>dn,0,zr.internalformat,zr.type,null);Ls(zr.texInfo,zr.target)})}function Gi(){for(var Ct=0;Ct=0?bl=!0:Sa.indexOf(_o)>=0&&(bl=!1))),("depthTexture"in si||"depthStencilTexture"in si)&&(Ts=!!(si.depthTexture||si.depthStencilTexture)),"depth"in si&&(typeof si.depth=="boolean"?Jo=si.depth:(Js=si.depth,As=!1)),"stencil"in si&&(typeof si.stencil=="boolean"?As=si.stencil:(ps=si.stencil,Jo=!1)),"depthStencil"in si&&(typeof si.depthStencil=="boolean"?Jo=As=si.depthStencil:(ms=si.depthStencil,Jo=!1,As=!1))}var Mo=null,il=null,ol=null,wl=null;if(Array.isArray(Ei))Mo=Ei.map(ta);else if(Ei)Mo=[ta(Ei)];else for(Mo=new Array(Ls),Hn=0;Hn0&&(ln.depth=Fa[0].depth,ln.stencil=Fa[0].stencil,ln.depthStencil=Fa[0].depthStencil),Fa[Oa]?Fa[Oa](ln):Fa[Oa]=ea(ln)}return u(rn,{width:Hn,height:Hn,color:_o})}function kn(Vn){var Oa,ln=Vn|0;if(ln===rn.width)return rn;var Hn=rn.color;for(Oa=0;Oa=Hn.byteLength?Wn.subdata(Hn):(Wn.destroy(),ea.buffers[Vn]=null)),ea.buffers[Vn]||(Wn=ea.buffers[Vn]=Nr.create(Oa,Kc,!1,!0)),ln.buffer=Nr.getBuffer(Wn),ln.size=ln.buffer.dimension|0,ln.normalized=!1,ln.type=ln.buffer.dtype,ln.offset=0,ln.stride=0,ln.divisor=0,ln.state=1,rn[Vn]=1}else Nr.getBuffer(Oa)?(ln.buffer=Nr.getBuffer(Oa),ln.size=ln.buffer.dimension|0,ln.normalized=!1,ln.type=ln.buffer.dtype,ln.offset=0,ln.stride=0,ln.divisor=0,ln.state=1):Nr.getBuffer(Oa.buffer)?(ln.buffer=Nr.getBuffer(Oa.buffer),ln.size=(+Oa.size||ln.buffer.dimension)|0,ln.normalized=!!Oa.normalized||!1,"type"in Oa?ln.type=jr[Oa.type]:ln.type=ln.buffer.dtype,ln.offset=(Oa.offset||0)|0,ln.stride=(Oa.stride||0)|0,ln.divisor=(Oa.divisor||0)|0,ln.state=1):"x"in Oa&&(ln.x=+Oa.x||0,ln.y=+Oa.y||0,ln.z=+Oa.z||0,ln.w=+Oa.w||0,ln.state=2)}for(var gi=0;gi1)for(var ja=0;jagr&&(gr=Hr.stats.uniformsCount)}),gr},Dt.getMaxAttributesCount=function(){var gr=0;return Pa.forEach(function(Hr){Hr.stats.attributesCount>gr&&(gr=Hr.stats.attributesCount)}),gr});function ta(){Nr={},qr={};for(var gr=0;gr16&&(Dt=Ba(Dt,He.length*8));for(var Tr=Array(16),Nr=Array(16),qr=0;qr<16;qr++)Tr[qr]=Dt[qr]^909522486,Nr[qr]=Dt[qr]^1549556828;var Or=Ba(Tr.concat(Ou(Lt)),512+Lt.length*8);return Tt(Ba(Nr.concat(Or),768))}function Mu(He){for(var Lt=eh?"0123456789ABCDEF":"0123456789abcdef",Dt="",Tr,Nr=0;Nr>>4&15)+Lt.charAt(Tr&15);return Dt}function Tf(He){for(var Lt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Dt="",Tr=He.length,Nr=0;NrHe.length*8?Dt+=Ic:Dt+=Lt.charAt(qr>>>6*(3-Or)&63);return Dt}function th(He,Lt){var Dt=Lt.length,Tr=Array(),Nr,qr,Or,fa,Sa=Array(Math.ceil(He.length/2));for(Nr=0;Nr0;){for(fa=Array(),Or=0,Nr=0;Nr0||qr>0)&&(fa[fa.length]=qr);Tr[Tr.length]=Or,Sa=fa}var Ca="";for(Nr=Tr.length-1;Nr>=0;Nr--)Ca+=Lt.charAt(Tr[Nr]);var Pa=Math.ceil(He.length*8/(Math.log(Lt.length)/Math.log(2)));for(Nr=Ca.length;Nr>>6&31,128|Tr&63):Tr<=65535?Lt+=String.fromCharCode(224|Tr>>>12&15,128|Tr>>>6&63,128|Tr&63):Tr<=2097151&&(Lt+=String.fromCharCode(240|Tr>>>18&7,128|Tr>>>12&63,128|Tr>>>6&63,128|Tr&63));return Lt}function Ou(He){for(var Lt=Array(He.length>>2),Dt=0;Dt>5]|=(He.charCodeAt(Dt/8)&255)<<24-Dt%32;return Lt}function Tt(He){for(var Lt="",Dt=0;Dt>5]>>>24-Dt%32&255);return Lt}function jt(He,Lt){return He>>>Lt|He<<32-Lt}function yr(He,Lt){return He>>>Lt}function dr(He,Lt,Dt){return He&Lt^~He&Dt}function Wr(He,Lt,Dt){return He&Lt^He&Dt^Lt&Dt}function ma(He){return jt(He,2)^jt(He,13)^jt(He,22)}function za(He){return jt(He,6)^jt(He,11)^jt(He,25)}function Ja(He){return jt(He,7)^jt(He,18)^yr(He,3)}function nn(He){return jt(He,17)^jt(He,19)^yr(He,10)}var Tn=new Array(1116352408,1899447441,-1245643825,-373957723,961987163,1508970993,-1841331548,-1424204075,-670586216,310598401,607225278,1426881987,1925078388,-2132889090,-1680079193,-1046744716,-459576895,-272742522,264347078,604807628,770255983,1249150122,1555081692,1996064986,-1740746414,-1473132947,-1341970488,-1084653625,-958395405,-710438585,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,-2117940946,-1838011259,-1564481375,-1474664885,-1035236496,-949202525,-778901479,-694614492,-200395387,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,-2067236844,-1933114872,-1866530822,-1538233109,-1090935817,-965641998);function Ba(He,Lt){var Dt=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),Tr=new Array(64),Nr,qr,Or,fa,Sa,Ca,Pa,En,cn,Wa,ta,gr;for(He[Lt>>5]|=128<<24-Lt%32,He[(Lt+64>>9<<4)+15]=Lt,cn=0;cn>16)+(Lt>>16)+(Dt>>16);return Tr<<16|Dt&65535}function Xa(He){return Array.prototype.slice.call(He)}function Aa(He){return Xa(He).join("")}function Fn(He){var Lt=He&&He.cache,Dt=0,Tr=[],Nr=[],qr=[];function Or(ta,gr){var Hr=gr&&gr.stable;if(!Hr){for(var ha=0;ha0&&(ta.push(Ea,"="),ta.push.apply(ta,Xa(arguments)),ta.push(";")),Ea}return u(gr,{def:ha,toString:function(){return Aa([Hr.length>0?"var "+Hr.join(",")+";":"",Aa(ta)])}})}function Sa(){var ta=fa(),gr=fa(),Hr=ta.toString,ha=gr.toString;function Ea(ia,Ya){gr(ia,Ya,"=",ta.def(ia,Ya),";")}return u(function(){ta.apply(ta,Xa(arguments))},{def:ta.def,entry:ta,exit:gr,save:Ea,set:function(ia,Ya,Ua){Ea(ia,Ya),ta(ia,Ya,"=",Ua,";")},toString:function(){return Hr()+ha()}})}function Ca(){var ta=Aa(arguments),gr=Sa(),Hr=Sa(),ha=gr.toString,Ea=Hr.toString;return u(gr,{then:function(){return gr.apply(gr,Xa(arguments)),this},else:function(){return Hr.apply(Hr,Xa(arguments)),this},toString:function(){var ia=Ea();return ia&&(ia="else{"+ia+"}"),Aa(["if(",ta,"){",ha(),"}",ia])}})}var Pa=fa(),En={};function cn(ta,gr){var Hr=[];function ha(){var Sn="a"+Hr.length;return Hr.push(Sn),Sn}gr=gr||0;for(var Ea=0;Ea":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},Jr={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},sa={cw:Ne,ccw:Ke};function ga(He){return Array.isArray(He)||Nt(He)||Kt(He)}function ba(He){return He.sort(function(Lt,Dt){return Lt===pe?-1:Dt===pe?1:Lt=1,Tr>=2,Lt)}else if(Dt===Lo){var Nr=He.data;return new Zr(Nr.thisDep,Nr.contextDep,Nr.propDep,Lt)}else{if(Dt===us)return new Zr(!1,!1,!1,Lt);if(Dt===Oo){for(var qr=!1,Or=!1,fa=!1,Sa=0;Sa=1&&(Or=!0),Pa>=2&&(fa=!0)}else Ca.type===Lo&&(qr=qr||Ca.data.thisDep,Or=Or||Ca.data.contextDep,fa=fa||Ca.data.propDep)}return new Zr(qr,Or,fa,Lt)}else return new Zr(Dt===ao,Dt===Oi,Dt===_n,Lt)}}var ni=new Zr(!1,!1,!1,function(){});function xi(He,Lt,Dt,Tr,Nr,qr,Or,fa,Sa,Ca,Pa,En,cn,Wa,ta,gr){var Hr=Ca.Record,ha={add:32774,subtract:32778,"reverse subtract":32779};Dt.ext_blend_minmax&&(ha.min=et,ha.max=ot);var Ea=Dt.angle_instanced_arrays,ia=Dt.webgl_draw_buffers,Ya=Dt.oes_vertex_array_object,Ua={dirty:!0,profile:gr.profile},Sn={},na=[],ea={},tn={};function ja(wt){return wt.replace(".","_")}function Ia(wt,It,$t){var Rr=ja(wt);na.push(wt),Sn[Rr]=Ua[Rr]=!!$t,ea[Rr]=It}function Fa(wt,It,$t){var Rr=ja(wt);na.push(wt),Array.isArray($t)?(Ua[Rr]=$t.slice(),Sn[Rr]=$t.slice()):Ua[Rr]=Sn[Rr]=$t,tn[Rr]=It}function rn(wt){return!!isNaN(wt)}Ia(_s,ya),Ia(ko,Kr),Fa(fl,"blendColor",[0,0,0,0]),Fa(Os,"blendEquationSeparate",[lr,lr]),Fa(cs,"blendFuncSeparate",[or,Ut,or,Ut]),Ia(ai,Ha,!0),Fa(Xo,"depthFunc",Dr),Fa(os,"depthRange",[0,1]),Fa(Do,"depthMask",!0),Fa(al,al,[!0,!0,!0,!0]),Ia(pu,Br),Fa(au,"cullFace",we),Fa(Nu,Nu,Ke),Fa(_l,_l,1),Ia(Su,Bn),Fa(xl,"polygonOffset",[0,0]),Ia(hc,li),Ia(ki,Jn),Fa(Xi,"sampleCoverage",[1,!1]),Ia(jf,Za),Fa(zc,"stencilMask",-1),Fa(nu,"stencilFunc",[kt,0,-1]),Fa(Me,"stencilOpSeparate",[ue,xt,xt,xt]),Fa(L,"stencilOpSeparate",[we,xt,xt,xt]),Ia(J,un),Fa(de,"scissor",[0,0,He.drawingBufferWidth,He.drawingBufferHeight]),Fa(pe,pe,[0,0,He.drawingBufferWidth,He.drawingBufferHeight]);var kn={gl:He,context:cn,strings:Lt,next:Sn,current:Ua,draw:En,elements:qr,buffer:Nr,shader:Pa,attributes:Ca.state,vao:Ca,uniforms:Sa,framebuffer:fa,extensions:Dt,timer:Wa,isBufferArgs:ga},Vn={primTypes:mn,compareFuncs:Ur,blendFuncs:_a,blendEquations:ha,stencilOps:Jr,glTypes:jr,orientationType:sa};ia&&(Vn.backBuffer=[we],Vn.drawBuffer=m(Tr.maxDrawbuffers,function(wt){return wt===0?[0]:m(wt,function(It){return ca+It})}));var Oa=0;function ln(){var wt=Fn({cache:ta}),It=wt.link,$t=wt.global;wt.id=Oa++,wt.batchId="0";var Rr=It(kn),Vr=wt.shared={props:"a0"};Object.keys(kn).forEach(function(rr){Vr[rr]=$t.def(Rr,".",rr)});var _r=wt.next={},mr=wt.current={};Object.keys(tn).forEach(function(rr){Array.isArray(Ua[rr])&&(_r[rr]=$t.def(Vr.next,".",rr),mr[rr]=$t.def(Vr.current,".",rr))});var ir=wt.constants={};Object.keys(Vn).forEach(function(rr){ir[rr]=$t.def(JSON.stringify(Vn[rr]))}),wt.invoke=function(rr,zt){switch(zt.type){case Un:var Sr=["this",Vr.context,Vr.props,wt.batchId];return rr.def(It(zt.data),".call(",Sr.slice(0,Math.max(zt.data.length+1,4)),")");case _n:return rr.def(Vr.props,zt.data);case Oi:return rr.def(Vr.context,zt.data);case ao:return rr.def("this",zt.data);case Lo:return zt.data.append(wt,rr),zt.data.ref;case us:return zt.data.toString();case Oo:return zt.data.map(function(Yr){return wt.invoke(rr,Yr)})}},wt.attribCache={};var Wt={};return wt.scopeAttrib=function(rr){var zt=Lt.id(rr);if(zt in Wt)return Wt[zt];var Sr=Ca.scope[zt];Sr||(Sr=Ca.scope[zt]=new Hr);var Yr=Wt[zt]=It(Sr);return Yr},wt}function Hn(wt){var It=wt.static,$t=wt.dynamic,Rr;if(Te in It){var Vr=!!It[Te];Rr=wn(function(mr,ir){return Vr}),Rr.enable=Vr}else if(Te in $t){var _r=$t[Te];Rr=Nn(_r,function(mr,ir){return mr.invoke(ir,_r)})}return Rr}function Wn(wt,It){var $t=wt.static,Rr=wt.dynamic;if(Ze in $t){var Vr=$t[Ze];return Vr?(Vr=fa.getFramebuffer(Vr),wn(function(mr,ir){var Wt=mr.link(Vr),rr=mr.shared;ir.set(rr.framebuffer,".next",Wt);var zt=rr.context;return ir.set(zt,"."+$e,Wt+".width"),ir.set(zt,"."+lt,Wt+".height"),Wt})):wn(function(mr,ir){var Wt=mr.shared;ir.set(Wt.framebuffer,".next","null");var rr=Wt.context;return ir.set(rr,"."+$e,rr+"."+Ot),ir.set(rr,"."+lt,rr+"."+Xt),"null"})}else if(Ze in Rr){var _r=Rr[Ze];return Nn(_r,function(mr,ir){var Wt=mr.invoke(ir,_r),rr=mr.shared,zt=rr.framebuffer,Sr=ir.def(zt,".getFramebuffer(",Wt,")");ir.set(zt,".next",Sr);var Yr=rr.context;return ir.set(Yr,"."+$e,Sr+"?"+Sr+".width:"+Yr+"."+Ot),ir.set(Yr,"."+lt,Sr+"?"+Sr+".height:"+Yr+"."+Xt),Sr})}else return null}function gi(wt,It,$t){var Rr=wt.static,Vr=wt.dynamic;function _r(Wt){if(Wt in Rr){var rr=Rr[Wt],zt=!0,Sr=rr.x|0,Yr=rr.y|0,va,Rn;return"width"in rr?va=rr.width|0:zt=!1,"height"in rr?Rn=rr.height|0:zt=!1,new Zr(!zt&&It&&It.thisDep,!zt&&It&&It.contextDep,!zt&&It&&It.propDep,function(Ln,An){var xn=Ln.shared.context,Qa=va;"width"in rr||(Qa=An.def(xn,".",$e,"-",Sr));var pn=Rn;return"height"in rr||(pn=An.def(xn,".",lt,"-",Yr)),[Sr,Yr,Qa,pn]})}else if(Wt in Vr){var an=Vr[Wt],en=Nn(an,function(Ln,An){var xn=Ln.invoke(An,an),Qa=Ln.shared.context,pn=An.def(xn,".x|0"),gn=An.def(xn,".y|0"),Xn=An.def('"width" in ',xn,"?",xn,".width|0:","(",Qa,".",$e,"-",pn,")"),zo=An.def('"height" in ',xn,"?",xn,".height|0:","(",Qa,".",lt,"-",gn,")");return[pn,gn,Xn,zo]});return It&&(en.thisDep=en.thisDep||It.thisDep,en.contextDep=en.contextDep||It.contextDep,en.propDep=en.propDep||It.propDep),en}else return It?new Zr(It.thisDep,It.contextDep,It.propDep,function(Ln,An){var xn=Ln.shared.context;return[0,0,An.def(xn,".",$e),An.def(xn,".",lt)]}):null}var mr=_r(pe);if(mr){var ir=mr;mr=new Zr(mr.thisDep,mr.contextDep,mr.propDep,function(Wt,rr){var zt=ir.append(Wt,rr),Sr=Wt.shared.context;return rr.set(Sr,"."+tt,zt[2]),rr.set(Sr,"."+dt,zt[3]),zt})}return{viewport:mr,scissor_box:_r(de)}}function Jo(wt,It){var $t=wt.static,Rr=typeof $t[vt]=="string"&&typeof $t[rt]=="string";if(Rr){if(Object.keys(It.dynamic).length>0)return null;var Vr=It.static,_r=Object.keys(Vr);if(_r.length>0&&typeof Vr[_r[0]]=="number"){for(var mr=[],ir=0;ir<_r.length;++ir)mr.push([Vr[_r[ir]]|0,_r[ir]]);return mr}}return null}function As(wt,It,$t){var Rr=wt.static,Vr=wt.dynamic;function _r(zt){if(zt in Rr){var Sr=Lt.id(Rr[zt]),Yr=wn(function(){return Sr});return Yr.id=Sr,Yr}else if(zt in Vr){var va=Vr[zt];return Nn(va,function(Rn,an){var en=Rn.invoke(an,va),Ln=an.def(Rn.shared.strings,".id(",en,")");return Ln})}return null}var mr=_r(vt),ir=_r(rt),Wt=null,rr;return hn(mr)&&hn(ir)?(Wt=Pa.program(ir.id,mr.id,null,$t),rr=wn(function(zt,Sr){return zt.link(Wt)})):rr=new Zr(mr&&mr.thisDep||ir&&ir.thisDep,mr&&mr.contextDep||ir&&ir.contextDep,mr&&mr.propDep||ir&&ir.propDep,function(zt,Sr){var Yr=zt.shared.shader,va;mr?va=mr.append(zt,Sr):va=Sr.def(Yr,".",vt);var Rn;ir?Rn=ir.append(zt,Sr):Rn=Sr.def(Yr,".",rt);var an=Yr+".program("+Rn+","+va;return Sr.def(an+")")}),{frag:mr,vert:ir,progVar:rr,program:Wt}}function Ei(wt,It){var $t=wt.static,Rr=wt.dynamic,Vr={},_r=!1;function mr(){if(Le in $t){var An=$t[Le];return An!==null&&Ca.getVAO(An)===null&&(An=Ca.createVAO(An)),_r=!0,Vr.vao=An,wn(function(Qa){var pn=Ca.getVAO(An);return pn?Qa.link(pn):"null"})}else if(Le in Rr){_r=!0;var xn=Rr[Le];return Nn(xn,function(Qa,pn){var gn=Qa.invoke(pn,xn);return pn.def(Qa.shared.vao+".getVAO("+gn+")")})}return null}var ir=mr(),Wt=!1;function rr(){if(Mt in $t){var An=$t[Mt];if(Vr.elements=An,ga(An)){var xn=Vr.elements=qr.create(An,!0);An=qr.getElements(xn),Wt=!0}else An&&(An=qr.getElements(An),Wt=!0);var Qa=wn(function(gn,Xn){if(An){var zo=gn.link(An);return gn.ELEMENTS=zo,zo}return gn.ELEMENTS=null,null});return Qa.value=An,Qa}else if(Mt in Rr){Wt=!0;var pn=Rr[Mt];return Nn(pn,function(gn,Xn){var zo=gn.shared,sl=zo.isBufferArgs,ku=zo.elements,Tc=gn.invoke(Xn,pn),rf=Xn.def("null"),ou=Xn.def(sl,"(",Tc,")"),Ah=gn.cond(ou).then(rf,"=",ku,".createStream(",Tc,");").else(rf,"=",ku,".getElements(",Tc,");");return Xn.entry(Ah),Xn.exit(gn.cond(ou).then(ku,".destroyStream(",rf,");")),gn.ELEMENTS=rf,rf})}else if(_r)return new Zr(ir.thisDep,ir.contextDep,ir.propDep,function(gn,Xn){return Xn.def(gn.shared.vao+".currentVAO?"+gn.shared.elements+".getElements("+gn.shared.vao+".currentVAO.elements):null")});return null}var zt=rr();function Sr(){if(Gt in $t){var An=$t[Gt];return Vr.primitive=An,wn(function(Qa,pn){return mn[An]})}else if(Gt in Rr){var xn=Rr[Gt];return Nn(xn,function(Qa,pn){var gn=Qa.constants.primTypes,Xn=Qa.invoke(pn,xn);return pn.def(gn,"[",Xn,"]")})}else{if(Wt)return hn(zt)?zt.value?wn(function(Qa,pn){return pn.def(Qa.ELEMENTS,".primType")}):wn(function(){return Ll}):new Zr(zt.thisDep,zt.contextDep,zt.propDep,function(Qa,pn){var gn=Qa.ELEMENTS;return pn.def(gn,"?",gn,".primType:",Ll)});if(_r)return new Zr(ir.thisDep,ir.contextDep,ir.propDep,function(Qa,pn){return pn.def(Qa.shared.vao+".currentVAO?"+Qa.shared.vao+".currentVAO.primitive:"+Ll)})}return null}function Yr(An,xn){if(An in $t){var Qa=$t[An]|0;return xn?Vr.offset=Qa:Vr.instances=Qa,wn(function(gn,Xn){return xn&&(gn.OFFSET=Qa),Qa})}else if(An in Rr){var pn=Rr[An];return Nn(pn,function(gn,Xn){var zo=gn.invoke(Xn,pn);return xn&&(gn.OFFSET=zo),zo})}else if(xn){if(Wt)return wn(function(gn,Xn){return gn.OFFSET=0,0});if(_r)return new Zr(ir.thisDep,ir.contextDep,ir.propDep,function(gn,Xn){return Xn.def(gn.shared.vao+".currentVAO?"+gn.shared.vao+".currentVAO.offset:0")})}else if(_r)return new Zr(ir.thisDep,ir.contextDep,ir.propDep,function(gn,Xn){return Xn.def(gn.shared.vao+".currentVAO?"+gn.shared.vao+".currentVAO.instances:-1")});return null}var va=Yr(fr,!0);function Rn(){if(Ht in $t){var An=$t[Ht]|0;return Vr.count=An,wn(function(){return An})}else if(Ht in Rr){var xn=Rr[Ht];return Nn(xn,function(Xn,zo){var sl=Xn.invoke(zo,xn);return sl})}else if(Wt)if(hn(zt)){if(zt)return va?new Zr(va.thisDep,va.contextDep,va.propDep,function(Xn,zo){var sl=zo.def(Xn.ELEMENTS,".vertCount-",Xn.OFFSET);return sl}):wn(function(Xn,zo){return zo.def(Xn.ELEMENTS,".vertCount")});var Qa=wn(function(){return-1});return Qa}else{var pn=new Zr(zt.thisDep||va.thisDep,zt.contextDep||va.contextDep,zt.propDep||va.propDep,function(Xn,zo){var sl=Xn.ELEMENTS;return Xn.OFFSET?zo.def(sl,"?",sl,".vertCount-",Xn.OFFSET,":-1"):zo.def(sl,"?",sl,".vertCount:-1")});return pn}else if(_r){var gn=new Zr(ir.thisDep,ir.contextDep,ir.propDep,function(Xn,zo){return zo.def(Xn.shared.vao,".currentVAO?",Xn.shared.vao,".currentVAO.count:-1")});return gn}return null}var an=Sr(),en=Rn(),Ln=Yr(wr,!1);return{elements:zt,primitive:an,count:en,instances:Ln,offset:va,vao:ir,vaoActive:_r,elementsActive:Wt,static:Vr}}function bl(wt,It){var $t=wt.static,Rr=wt.dynamic,Vr={};return na.forEach(function(_r){var mr=ja(_r);function ir(Wt,rr){if(_r in $t){var zt=Wt($t[_r]);Vr[mr]=wn(function(){return zt})}else if(_r in Rr){var Sr=Rr[_r];Vr[mr]=Nn(Sr,function(Yr,va){return rr(Yr,va,Yr.invoke(va,Sr))})}}switch(_r){case pu:case ko:case _s:case jf:case ai:case J:case Su:case hc:case ki:case Do:return ir(function(Wt){return Wt},function(Wt,rr,zt){return zt});case Xo:return ir(function(Wt){return Ur[Wt]},function(Wt,rr,zt){var Sr=Wt.constants.compareFuncs;return rr.def(Sr,"[",zt,"]")});case os:return ir(function(Wt){return Wt},function(Wt,rr,zt){var Sr=rr.def("+",zt,"[0]"),Yr=rr.def("+",zt,"[1]");return[Sr,Yr]});case cs:return ir(function(Wt){var rr="srcRGB"in Wt?Wt.srcRGB:Wt.src,zt="srcAlpha"in Wt?Wt.srcAlpha:Wt.src,Sr="dstRGB"in Wt?Wt.dstRGB:Wt.dst,Yr="dstAlpha"in Wt?Wt.dstAlpha:Wt.dst;return[_a[rr],_a[Sr],_a[zt],_a[Yr]]},function(Wt,rr,zt){var Sr=Wt.constants.blendFuncs;function Yr(xn,Qa){var pn=rr.def('"',xn,Qa,'" in ',zt,"?",zt,".",xn,Qa,":",zt,".",xn);return pn}var va=Yr("src","RGB"),Rn=Yr("dst","RGB"),an=rr.def(Sr,"[",va,"]"),en=rr.def(Sr,"[",Yr("src","Alpha"),"]"),Ln=rr.def(Sr,"[",Rn,"]"),An=rr.def(Sr,"[",Yr("dst","Alpha"),"]");return[an,Ln,en,An]});case Os:return ir(function(Wt){if(typeof Wt=="string")return[ha[Wt],ha[Wt]];if(typeof Wt=="object")return[ha[Wt.rgb],ha[Wt.alpha]]},function(Wt,rr,zt){var Sr=Wt.constants.blendEquations,Yr=rr.def(),va=rr.def(),Rn=Wt.cond("typeof ",zt,'==="string"');return Rn.then(Yr,"=",va,"=",Sr,"[",zt,"];"),Rn.else(Yr,"=",Sr,"[",zt,".rgb];",va,"=",Sr,"[",zt,".alpha];"),rr(Rn),[Yr,va]});case fl:return ir(function(Wt){return m(4,function(rr){return+Wt[rr]})},function(Wt,rr,zt){return m(4,function(Sr){return rr.def("+",zt,"[",Sr,"]")})});case zc:return ir(function(Wt){return Wt|0},function(Wt,rr,zt){return rr.def(zt,"|0")});case nu:return ir(function(Wt){var rr=Wt.cmp||"keep",zt=Wt.ref||0,Sr="mask"in Wt?Wt.mask:-1;return[Ur[rr],zt,Sr]},function(Wt,rr,zt){var Sr=Wt.constants.compareFuncs,Yr=rr.def('"cmp" in ',zt,"?",Sr,"[",zt,".cmp]",":",xt),va=rr.def(zt,".ref|0"),Rn=rr.def('"mask" in ',zt,"?",zt,".mask|0:-1");return[Yr,va,Rn]});case Me:case L:return ir(function(Wt){var rr=Wt.fail||"keep",zt=Wt.zfail||"keep",Sr=Wt.zpass||"keep";return[_r===L?we:ue,Jr[rr],Jr[zt],Jr[Sr]]},function(Wt,rr,zt){var Sr=Wt.constants.stencilOps;function Yr(va){return rr.def('"',va,'" in ',zt,"?",Sr,"[",zt,".",va,"]:",xt)}return[_r===L?we:ue,Yr("fail"),Yr("zfail"),Yr("zpass")]});case xl:return ir(function(Wt){var rr=Wt.factor|0,zt=Wt.units|0;return[rr,zt]},function(Wt,rr,zt){var Sr=rr.def(zt,".factor|0"),Yr=rr.def(zt,".units|0");return[Sr,Yr]});case au:return ir(function(Wt){var rr=0;return Wt==="front"?rr=ue:Wt==="back"&&(rr=we),rr},function(Wt,rr,zt){return rr.def(zt,'==="front"?',ue,":",we)});case _l:return ir(function(Wt){return Wt},function(Wt,rr,zt){return zt});case Nu:return ir(function(Wt){return sa[Wt]},function(Wt,rr,zt){return rr.def(zt+'==="cw"?'+Ne+":"+Ke)});case al:return ir(function(Wt){return Wt.map(function(rr){return!!rr})},function(Wt,rr,zt){return m(4,function(Sr){return"!!"+zt+"["+Sr+"]"})});case Xi:return ir(function(Wt){var rr="value"in Wt?Wt.value:1,zt=!!Wt.invert;return[rr,zt]},function(Wt,rr,zt){var Sr=rr.def('"value" in ',zt,"?+",zt,".value:1"),Yr=rr.def("!!",zt,".invert");return[Sr,Yr]})}}),Vr}function _o(wt,It){var $t=wt.static,Rr=wt.dynamic,Vr={};return Object.keys($t).forEach(function(_r){var mr=$t[_r],ir;if(typeof mr=="number"||typeof mr=="boolean")ir=wn(function(){return mr});else if(typeof mr=="function"){var Wt=mr._reglType;Wt==="texture2d"||Wt==="textureCube"?ir=wn(function(rr){return rr.link(mr)}):(Wt==="framebuffer"||Wt==="framebufferCube")&&(ir=wn(function(rr){return rr.link(mr.color[0])}))}else Cr(mr)&&(ir=wn(function(rr){var zt=rr.global.def("[",m(mr.length,function(Sr){return mr[Sr]}),"]");return zt}));ir.value=mr,Vr[_r]=ir}),Object.keys(Rr).forEach(function(_r){var mr=Rr[_r];Vr[_r]=Nn(mr,function(ir,Wt){return ir.invoke(Wt,mr)})}),Vr}function Hs(wt,It){var $t=wt.static,Rr=wt.dynamic,Vr={};return Object.keys($t).forEach(function(_r){var mr=$t[_r],ir=Lt.id(_r),Wt=new Hr;if(ga(mr))Wt.state=fi,Wt.buffer=Nr.getBuffer(Nr.create(mr,pr,!1,!0)),Wt.type=0;else{var rr=Nr.getBuffer(mr);if(rr)Wt.state=fi,Wt.buffer=rr,Wt.type=0;else if("constant"in mr){var zt=mr.constant;Wt.buffer="null",Wt.state=Ti,typeof zt=="number"?Wt.x=zt:ci.forEach(function(Ln,An){An"+pn+"?"+zt+".constant["+pn+"]:0;"}).join(""),"}}else{","if(",va,"(",zt,".buffer)){",Ln,"=",Rn,".createStream(",pr,",",zt,".buffer);","}else{",Ln,"=",Rn,".getBuffer(",zt,".buffer);","}",An,'="type" in ',zt,"?",Yr.glTypes,"[",zt,".type]:",Ln,".dtype;",an.normalized,"=!!",zt,".normalized;");function xn(Qa){rr(an[Qa],"=",zt,".",Qa,"|0;")}return xn("size"),xn("offset"),xn("stride"),xn("divisor"),rr("}}"),rr.exit("if(",an.isStream,"){",Rn,".destroyStream(",Ln,");","}"),an}Vr[_r]=Nn(mr,ir)}),Vr}function Ls(wt){var It=wt.static,$t=wt.dynamic,Rr={};return Object.keys(It).forEach(function(Vr){var _r=It[Vr];Rr[Vr]=wn(function(mr,ir){return typeof _r=="number"||typeof _r=="boolean"?""+_r:mr.link(_r)})}),Object.keys($t).forEach(function(Vr){var _r=$t[Vr];Rr[Vr]=Nn(_r,function(mr,ir){return mr.invoke(ir,_r)})}),Rr}function Js(wt,It,$t,Rr,Vr){var _r=wt.static,mr=wt.dynamic,ir=Jo(wt,It),Wt=Wn(wt,Vr),rr=gi(wt,Wt,Vr),zt=Ei(wt,Vr),Sr=bl(wt,Vr),Yr=As(wt,Vr,ir);function va(xn){var Qa=rr[xn];Qa&&(Sr[xn]=Qa)}va(pe),va(ja(de));var Rn=Object.keys(Sr).length>0,an={framebuffer:Wt,draw:zt,shader:Yr,state:Sr,dirty:Rn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(an.profile=Hn(wt,Vr),an.uniforms=_o($t,Vr),an.drawVAO=an.scopeVAO=zt.vao,!an.drawVAO&&Yr.program&&!ir&&Dt.angle_instanced_arrays&&zt.static.elements){var en=!0,Ln=Yr.program.attributes.map(function(xn){var Qa=It.static[xn];return en=en&&!!Qa,Qa});if(en&&Ln.length>0){var An=Ca.getVAO(Ca.createVAO({attributes:Ln,elements:zt.static.elements}));an.drawVAO=new Zr(null,null,null,function(xn,Qa){return xn.link(An)}),an.useVAO=!0}}return ir?an.useVAO=!0:an.attributes=Hs(It,Vr),an.context=Ls(Rr,Vr),an}function ps(wt,It,$t){var Rr=wt.shared,Vr=Rr.context,_r=wt.scope();Object.keys($t).forEach(function(mr){It.save(Vr,"."+mr);var ir=$t[mr],Wt=ir.append(wt,It);Array.isArray(Wt)?_r(Vr,".",mr,"=[",Wt.join(),"];"):_r(Vr,".",mr,"=",Wt,";")}),It(_r)}function ms(wt,It,$t,Rr){var Vr=wt.shared,_r=Vr.gl,mr=Vr.framebuffer,ir;ia&&(ir=It.def(Vr.extensions,".webgl_draw_buffers"));var Wt=wt.constants,rr=Wt.drawBuffer,zt=Wt.backBuffer,Sr;$t?Sr=$t.append(wt,It):Sr=It.def(mr,".next"),Rr||It("if(",Sr,"!==",mr,".cur){"),It("if(",Sr,"){",_r,".bindFramebuffer(",Pr,",",Sr,".framebuffer);"),ia&&It(ir,".drawBuffersWEBGL(",rr,"[",Sr,".colorAttachments.length]);"),It("}else{",_r,".bindFramebuffer(",Pr,",null);"),ia&&It(ir,".drawBuffersWEBGL(",zt,");"),It("}",mr,".cur=",Sr,";"),Rr||It("}")}function Ts(wt,It,$t){var Rr=wt.shared,Vr=Rr.gl,_r=wt.current,mr=wt.next,ir=Rr.current,Wt=Rr.next,rr=wt.cond(ir,".dirty");na.forEach(function(zt){var Sr=ja(zt);if(!(Sr in $t.state)){var Yr,va;if(Sr in mr){Yr=mr[Sr],va=_r[Sr];var Rn=m(Ua[Sr].length,function(en){return rr.def(Yr,"[",en,"]")});rr(wt.cond(Rn.map(function(en,Ln){return en+"!=="+va+"["+Ln+"]"}).join("||")).then(Vr,".",tn[Sr],"(",Rn,");",Rn.map(function(en,Ln){return va+"["+Ln+"]="+en}).join(";"),";"))}else{Yr=rr.def(Wt,".",Sr);var an=wt.cond(Yr,"!==",ir,".",Sr);rr(an),Sr in ea?an(wt.cond(Yr).then(Vr,".enable(",ea[Sr],");").else(Vr,".disable(",ea[Sr],");"),ir,".",Sr,"=",Yr,";"):an(Vr,".",tn[Sr],"(",Yr,");",ir,".",Sr,"=",Yr,";")}}}),Object.keys($t.state).length===0&&rr(ir,".dirty=false;"),It(rr)}function si(wt,It,$t,Rr){var Vr=wt.shared,_r=wt.current,mr=Vr.current,ir=Vr.gl,Wt;ba(Object.keys($t)).forEach(function(rr){var zt=$t[rr];if(!(Rr&&!Rr(zt))){var Sr=zt.append(wt,It);if(ea[rr]){var Yr=ea[rr];hn(zt)?(Wt=wt.link(Sr,{stable:!0}),It(wt.cond(Wt).then(ir,".enable(",Yr,");").else(ir,".disable(",Yr,");")),It(mr,".",rr,"=",Wt,";")):(It(wt.cond(Sr).then(ir,".enable(",Yr,");").else(ir,".disable(",Yr,");")),It(mr,".",rr,"=",Sr,";"))}else if(Cr(Sr)){var va=_r[rr];It(ir,".",tn[rr],"(",Sr,");",Sr.map(function(Rn,an){return va+"["+an+"]="+Rn}).join(";"),";")}else hn(zt)?(Wt=wt.link(Sr,{stable:!0}),It(ir,".",tn[rr],"(",Wt,");",mr,".",rr,"=",Wt,";")):It(ir,".",tn[rr],"(",Sr,");",mr,".",rr,"=",Sr,";")}})}function Ps(wt,It){Ea&&(wt.instancing=It.def(wt.shared.extensions,".angle_instanced_arrays"))}function Mo(wt,It,$t,Rr,Vr){var _r=wt.shared,mr=wt.stats,ir=_r.current,Wt=_r.timer,rr=$t.profile;function zt(){return typeof performance>"u"?"Date.now()":"performance.now()"}var Sr,Yr;function va(xn){Sr=It.def(),xn(Sr,"=",zt(),";"),typeof Vr=="string"?xn(mr,".count+=",Vr,";"):xn(mr,".count++;"),Wa&&(Rr?(Yr=It.def(),xn(Yr,"=",Wt,".getNumPendingQueries();")):xn(Wt,".beginQuery(",mr,");"))}function Rn(xn){xn(mr,".cpuTime+=",zt(),"-",Sr,";"),Wa&&(Rr?xn(Wt,".pushScopeStats(",Yr,",",Wt,".getNumPendingQueries(),",mr,");"):xn(Wt,".endQuery();"))}function an(xn){var Qa=It.def(ir,".profile");It(ir,".profile=",xn,";"),It.exit(ir,".profile=",Qa,";")}var en;if(rr){if(hn(rr)){rr.enable?(va(It),Rn(It.exit),an("true")):an("false");return}en=rr.append(wt,It),an(en)}else en=It.def(ir,".profile");var Ln=wt.block();va(Ln),It("if(",en,"){",Ln,"}");var An=wt.block();Rn(An),It.exit("if(",en,"){",An,"}")}function il(wt,It,$t,Rr,Vr){var _r=wt.shared;function mr(Wt){switch(Wt){case ho:case Ms:case ks:return 2;case to:case Ns:case Cl:return 3;case as:case Vs:case mu:return 4;default:return 1}}function ir(Wt,rr,zt){var Sr=_r.gl,Yr=It.def(Wt,".location"),va=It.def(_r.attributes,"[",Yr,"]"),Rn=zt.state,an=zt.buffer,en=[zt.x,zt.y,zt.z,zt.w],Ln=["buffer","normalized","offset","stride"];function An(){It("if(!",va,".buffer){",Sr,".enableVertexAttribArray(",Yr,");}");var Qa=zt.type,pn;if(zt.size?pn=It.def(zt.size,"||",rr):pn=rr,It("if(",va,".type!==",Qa,"||",va,".size!==",pn,"||",Ln.map(function(Xn){return va+"."+Xn+"!=="+zt[Xn]}).join("||"),"){",Sr,".bindBuffer(",pr,",",an,".buffer);",Sr,".vertexAttribPointer(",[Yr,pn,Qa,zt.normalized,zt.stride,zt.offset],");",va,".type=",Qa,";",va,".size=",pn,";",Ln.map(function(Xn){return va+"."+Xn+"="+zt[Xn]+";"}).join(""),"}"),Ea){var gn=zt.divisor;It("if(",va,".divisor!==",gn,"){",wt.instancing,".vertexAttribDivisorANGLE(",[Yr,gn],");",va,".divisor=",gn,";}")}}function xn(){It("if(",va,".buffer){",Sr,".disableVertexAttribArray(",Yr,");",va,".buffer=null;","}if(",ci.map(function(Qa,pn){return va+"."+Qa+"!=="+en[pn]}).join("||"),"){",Sr,".vertexAttrib4f(",Yr,",",en,");",ci.map(function(Qa,pn){return va+"."+Qa+"="+en[pn]+";"}).join(""),"}")}Rn===fi?An():Rn===Ti?xn():(It("if(",Rn,"===",fi,"){"),An(),It("}else{"),xn(),It("}"))}Rr.forEach(function(Wt){var rr=Wt.name,zt=$t.attributes[rr],Sr;if(zt){if(!Vr(zt))return;Sr=zt.append(wt,It)}else{if(!Vr(ni))return;var Yr=wt.scopeAttrib(rr);Sr={},Object.keys(new Hr).forEach(function(va){Sr[va]=It.def(Yr,".",va)})}ir(wt.link(Wt),mr(Wt.info.type),Sr)})}function ol(wt,It,$t,Rr,Vr,_r){for(var mr=wt.shared,ir=mr.gl,Wt,rr=0;rr1){for(var sl=[],ku=[],Tc=0;Tc>1)",an],");")}function gn(){$t(en,".drawArraysInstancedANGLE(",[Yr,va,Rn,an],");")}zt&&zt!=="null"?An?pn():($t("if(",zt,"){"),pn(),$t("}else{"),gn(),$t("}")):gn()}function Qa(){function pn(){$t(_r+".drawElements("+[Yr,Rn,Ln,va+"<<(("+Ln+"-"+pi+")>>1)"]+");")}function gn(){$t(_r+".drawArrays("+[Yr,va,Rn]+");")}zt&&zt!=="null"?An?pn():($t("if(",zt,"){"),pn(),$t("}else{"),gn(),$t("}")):gn()}Ea&&(typeof an!="number"||an>=0)?typeof an=="string"?($t("if(",an,">0){"),xn(),$t("}else if(",an,"<0){"),Qa(),$t("}")):xn():Qa()}function $n(wt,It,$t,Rr,Vr){var _r=ln(),mr=_r.proc("body",Vr);return Ea&&(_r.instancing=mr.def(_r.shared.extensions,".angle_instanced_arrays")),wt(_r,mr,$t,Rr),_r.compile().body}function Fi(wt,It,$t,Rr){Ps(wt,It),$t.useVAO?$t.drawVAO?It(wt.shared.vao,".setVAO(",$t.drawVAO.append(wt,It),");"):It(wt.shared.vao,".setVAO(",wt.shared.vao,".targetVAO);"):(It(wt.shared.vao,".setVAO(null);"),il(wt,It,$t,Rr.attributes,function(){return!0})),ol(wt,It,$t,Rr.uniforms,function(){return!0},!1),wl(wt,It,It,$t)}function Gi(wt,It){var $t=wt.proc("draw",1);Ps(wt,$t),ps(wt,$t,It.context),ms(wt,$t,It.framebuffer),Ts(wt,$t,It),si(wt,$t,It.state),Mo(wt,$t,It,!1,!0);var Rr=It.shader.progVar.append(wt,$t);if($t(wt.shared.gl,".useProgram(",Rr,".program);"),It.shader.program)Fi(wt,$t,It,It.shader.program);else{$t(wt.shared.vao,".setVAO(null);");var Vr=wt.global.def("{}"),_r=$t.def(Rr,".id"),mr=$t.def(Vr,"[",_r,"]");$t(wt.cond(mr).then(mr,".call(this,a0);").else(mr,"=",Vr,"[",_r,"]=",wt.link(function(ir){return $n(Fi,wt,It,ir,1)}),"(",Rr,");",mr,".call(this,a0);"))}Object.keys(It.state).length>0&&$t(wt.shared.current,".dirty=true;"),wt.shared.vao&&$t(wt.shared.vao,".setVAO(null);")}function Ct(wt,It,$t,Rr){wt.batchId="a1",Ps(wt,It);function Vr(){return!0}il(wt,It,$t,Rr.attributes,Vr),ol(wt,It,$t,Rr.uniforms,Vr,!1),wl(wt,It,It,$t)}function Fr(wt,It,$t,Rr){Ps(wt,It);var Vr=$t.contextDep,_r=It.def(),mr="a0",ir="a1",Wt=It.def();wt.shared.props=Wt,wt.batchId=_r;var rr=wt.scope(),zt=wt.scope();It(rr.entry,"for(",_r,"=0;",_r,"<",ir,";++",_r,"){",Wt,"=",mr,"[",_r,"];",zt,"}",rr.exit);function Sr(Ln){return Ln.contextDep&&Vr||Ln.propDep}function Yr(Ln){return!Sr(Ln)}if($t.needsContext&&ps(wt,zt,$t.context),$t.needsFramebuffer&&ms(wt,zt,$t.framebuffer),si(wt,zt,$t.state,Sr),$t.profile&&Sr($t.profile)&&Mo(wt,zt,$t,!1,!0),Rr)$t.useVAO?$t.drawVAO?Sr($t.drawVAO)?zt(wt.shared.vao,".setVAO(",$t.drawVAO.append(wt,zt),");"):rr(wt.shared.vao,".setVAO(",$t.drawVAO.append(wt,rr),");"):rr(wt.shared.vao,".setVAO(",wt.shared.vao,".targetVAO);"):(rr(wt.shared.vao,".setVAO(null);"),il(wt,rr,$t,Rr.attributes,Yr),il(wt,zt,$t,Rr.attributes,Sr)),ol(wt,rr,$t,Rr.uniforms,Yr,!1),ol(wt,zt,$t,Rr.uniforms,Sr,!0),wl(wt,rr,zt,$t);else{var va=wt.global.def("{}"),Rn=$t.shader.progVar.append(wt,zt),an=zt.def(Rn,".id"),en=zt.def(va,"[",an,"]");zt(wt.shared.gl,".useProgram(",Rn,".program);","if(!",en,"){",en,"=",va,"[",an,"]=",wt.link(function(Ln){return $n(Ct,wt,$t,Ln,2)}),"(",Rn,");}",en,".call(this,a0[",_r,"],",_r,");")}}function zr(wt,It){var $t=wt.proc("batch",2);wt.batchId="0",Ps(wt,$t);var Rr=!1,Vr=!0;Object.keys(It.context).forEach(function(va){Rr=Rr||It.context[va].propDep}),Rr||(ps(wt,$t,It.context),Vr=!1);var _r=It.framebuffer,mr=!1;_r?(_r.propDep?Rr=mr=!0:_r.contextDep&&Rr&&(mr=!0),mr||ms(wt,$t,_r)):ms(wt,$t,null),It.state.viewport&&It.state.viewport.propDep&&(Rr=!0);function ir(va){return va.contextDep&&Rr||va.propDep}Ts(wt,$t,It),si(wt,$t,It.state,function(va){return!ir(va)}),(!It.profile||!ir(It.profile))&&Mo(wt,$t,It,!1,"a1"),It.contextDep=Rr,It.needsContext=Vr,It.needsFramebuffer=mr;var Wt=It.shader.progVar;if(Wt.contextDep&&Rr||Wt.propDep)Fr(wt,$t,It,null);else{var rr=Wt.append(wt,$t);if($t(wt.shared.gl,".useProgram(",rr,".program);"),It.shader.program)Fr(wt,$t,It,It.shader.program);else{$t(wt.shared.vao,".setVAO(null);");var zt=wt.global.def("{}"),Sr=$t.def(rr,".id"),Yr=$t.def(zt,"[",Sr,"]");$t(wt.cond(Yr).then(Yr,".call(this,a0,a1);").else(Yr,"=",zt,"[",Sr,"]=",wt.link(function(va){return $n(Fr,wt,It,va,2)}),"(",rr,");",Yr,".call(this,a0,a1);"))}}Object.keys(It.state).length>0&&$t(wt.shared.current,".dirty=true;"),wt.shared.vao&&$t(wt.shared.vao,".setVAO(null);")}function dn(wt,It){var $t=wt.proc("scope",3);wt.batchId="a2";var Rr=wt.shared,Vr=Rr.current;if(ps(wt,$t,It.context),It.framebuffer&&It.framebuffer.append(wt,$t),ba(Object.keys(It.state)).forEach(function(ir){var Wt=It.state[ir],rr=Wt.append(wt,$t);Cr(rr)?rr.forEach(function(zt,Sr){rn(zt)?$t.set(wt.next[ir],"["+Sr+"]",zt):$t.set(wt.next[ir],"["+Sr+"]",wt.link(zt,{stable:!0}))}):hn(Wt)?$t.set(Rr.next,"."+ir,wt.link(rr,{stable:!0})):$t.set(Rr.next,"."+ir,rr)}),Mo(wt,$t,It,!0,!0),[Mt,fr,Ht,wr,Gt].forEach(function(ir){var Wt=It.draw[ir];if(Wt){var rr=Wt.append(wt,$t);rn(rr)?$t.set(Rr.draw,"."+ir,rr):$t.set(Rr.draw,"."+ir,wt.link(rr),{stable:!0})}}),Object.keys(It.uniforms).forEach(function(ir){var Wt=It.uniforms[ir].append(wt,$t);Array.isArray(Wt)&&(Wt="["+Wt.map(function(rr){return rn(rr)?rr:wt.link(rr,{stable:!0})})+"]"),$t.set(Rr.uniforms,"["+wt.link(Lt.id(ir),{stable:!0})+"]",Wt)}),Object.keys(It.attributes).forEach(function(ir){var Wt=It.attributes[ir].append(wt,$t),rr=wt.scopeAttrib(ir);Object.keys(new Hr).forEach(function(zt){$t.set(rr,"."+zt,Wt[zt])})}),It.scopeVAO){var _r=It.scopeVAO.append(wt,$t);rn(_r)?$t.set(Rr.vao,".targetVAO",_r):$t.set(Rr.vao,".targetVAO",wt.link(_r,{stable:!0}))}function mr(ir){var Wt=It.shader[ir];if(Wt){var rr=Wt.append(wt,$t);rn(rr)?$t.set(Rr.shader,"."+ir,rr):$t.set(Rr.shader,"."+ir,wt.link(rr,{stable:!0}))}}mr(rt),mr(vt),Object.keys(It.state).length>0&&($t(Vr,".dirty=true;"),$t.exit(Vr,".dirty=true;")),$t("a1(",wt.shared.context,",a0,",wt.batchId,");")}function Mi(wt){if(!(typeof wt!="object"||Cr(wt))){for(var It=Object.keys(wt),$t=0;$t=0;--$n){var Fi=kn[$n];Fi&&Fi(ta,null,0)}Dt.flush(),Pa&&Pa.update()}function gi(){!Hn&&kn.length>0&&(Hn=p.next(Wn))}function Jo(){Hn&&(p.cancel(Wn),Hn=null)}function As($n){$n.preventDefault(),Nr=!0,Jo(),Vn.forEach(function(Fi){Fi()})}function Ei($n){Dt.getError(),Nr=!1,qr.restore(),Sn.restore(),Ea.restore(),na.restore(),ea.restore(),tn.restore(),Ya.restore(),Pa&&Pa.restore(),ja.procs.refresh(),gi(),Oa.forEach(function(Fi){Fi()})}rn&&(rn.addEventListener(Ao,As,!1),rn.addEventListener(ss,Ei,!1));function bl(){kn.length=0,Jo(),rn&&(rn.removeEventListener(Ao,As),rn.removeEventListener(ss,Ei)),Sn.clear(),tn.clear(),ea.clear(),Ya.clear(),na.clear(),ia.clear(),Ea.clear(),Pa&&Pa.clear(),ln.forEach(function($n){$n()})}function _o($n){function Fi(_r){var mr=u({},_r);delete mr.uniforms,delete mr.attributes,delete mr.context,delete mr.vao,"stencil"in mr&&mr.stencil.op&&(mr.stencil.opBack=mr.stencil.opFront=mr.stencil.op,delete mr.stencil.op);function ir(Wt){if(Wt in mr){var rr=mr[Wt];delete mr[Wt],Object.keys(rr).forEach(function(zt){mr[Wt+"."+zt]=rr[zt]})}}return ir("blend"),ir("depth"),ir("cull"),ir("stencil"),ir("polygonOffset"),ir("scissor"),ir("sample"),"vao"in _r&&(mr.vao=_r.vao),mr}function Gi(_r,mr){var ir={},Wt={};return Object.keys(_r).forEach(function(rr){var zt=_r[rr];if(c.isDynamic(zt)){Wt[rr]=c.unbox(zt,rr);return}else if(mr&&Array.isArray(zt)){for(var Sr=0;Sr0)return wt.call(this,Rr(_r|0),_r|0)}else if(Array.isArray(_r)){if(_r.length)return wt.call(this,_r,_r.length)}else return vn.call(this,_r)}return u(Vr,{stats:Mi,destroy:function(){xo.destroy()}})}var Hs=tn.setFBO=_o({framebuffer:c.define.call(null,Cs,"framebuffer")});function Ls($n,Fi){var Gi=0;ja.procs.poll();var Ct=Fi.color;Ct&&(Dt.clearColor(+Ct[0]||0,+Ct[1]||0,+Ct[2]||0,+Ct[3]||0),Gi|=Ks),"depth"in Fi&&(Dt.clearDepth(+Fi.depth),Gi|=Ss),"stencil"in Fi&&(Dt.clearStencil(Fi.stencil|0),Gi|=ti),Dt.clear(Gi)}function Js($n){if("framebuffer"in $n)if($n.framebuffer&&$n.framebuffer_reglType==="framebufferCube")for(var Fi=0;Fi<6;++Fi)Hs(u({framebuffer:$n.framebuffer.faces[Fi]},$n),Ls);else Hs($n,Ls);else Ls(null,$n)}function ps($n){kn.push($n);function Fi(){var Gi=yu(kn,$n);function Ct(){var Fr=yu(kn,Ct);kn[Fr]=kn[kn.length-1],kn.length-=1,kn.length<=0&&Jo()}kn[Gi]=Ct}return gi(),{cancel:Fi}}function ms(){var $n=Fa.viewport,Fi=Fa.scissor_box;$n[0]=$n[1]=Fi[0]=Fi[1]=0,ta.viewportWidth=ta.framebufferWidth=ta.drawingBufferWidth=$n[2]=Fi[2]=Dt.drawingBufferWidth,ta.viewportHeight=ta.framebufferHeight=ta.drawingBufferHeight=$n[3]=Fi[3]=Dt.drawingBufferHeight}function Ts(){ta.tick+=1,ta.time=Ps(),ms(),ja.procs.poll()}function si(){na.refresh(),ms(),ja.procs.refresh(),Pa&&Pa.update()}function Ps(){return(f()-En)/1e3}si();function Mo($n,Fi){var Gi;switch($n){case"frame":return ps(Fi);case"lost":Gi=Vn;break;case"restore":Gi=Oa;break;case"destroy":Gi=ln;break;default:}return Gi.push(Fi),{cancel:function(){for(var Ct=0;Ct=0},read:Ia,destroy:bl,_gl:Dt,_refresh:si,poll:function(){Ts(),Pa&&Pa.update()},now:Ps,stats:fa,getCachedCode:il,preloadCachedCode:ol});return Lt.onDone(null,wl),wl}return dc})}}),Yb=De({"src/lib/prepare_regl.js"(j,N){"use strict";var u=rT(),v=dj();N.exports=function(S,l,e){var t=S._fullLayout,a=!0;return t._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(e);return}if(!(r.pick&&!t._has("parcoords"))){try{r.regl=v({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:S._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:e||{}})}catch{a=!1}r.regl||(a=!1),a&&this.addEventListener("webglcontextlost",function(n){S&&S.emit&&S.emit("plotly_webglcontextlost",{event:n,layer:r.key})},!1)}}),a||u({container:t._glcontainer.node()}),a}}}),JT=De({"src/traces/scattergl/plot.js"(c,N){"use strict";var u=LT(),v=qT(),w=$N(),S=hj(),l=Ar(),e=Ed().selectMode,t=Yb(),a=Sl(),r=cw(),n=ET().styleTextSelection,i={};function s(p,f,d,y){var o=p._size,x=p.width*y,M=p.height*y,T=o.l*y,E=o.b*y,g=o.r*y,A=o.t*y,m=o.w*y,h=o.h*y;return[T+f.domain[0]*m,E+d.domain[0]*h,x-g-(1-f.domain[1])*m,M-A-(1-d.domain[1])*h]}var c=N.exports=function(f,d,y){if(y.length){var o=f._fullLayout,x=d._scene,M=d.xaxis,T=d.yaxis,E,g;if(x){var A=t(f,["ANGLE_instanced_arrays","OES_element_index_uint"],i);if(!A){x.init();return}var m=x.count,h=o._glcanvas.data()[0].regl;if(r(f,d,y),x.dirty){if((x.line2d||x.error2d)&&!(x.scatter2d||x.fill2d||x.glText)&&h.clear({color:!0,depth:!0}),x.error2d===!0&&(x.error2d=w(h)),x.line2d===!0&&(x.line2d=v(h)),x.scatter2d===!0&&(x.scatter2d=u(h)),x.fill2d===!0&&(x.fill2d=v(h)),x.glText===!0)for(x.glText=new Array(m),E=0;Ex.glText.length){var b=m-x.glText.length;for(E=0;EQ&&(isNaN(Z[re])||isNaN(Z[re+1]));)re-=2;X.positions=Z.slice(Q,re+2)}return X}),x.line2d.update(x.lineOptions)),x.error2d){var C=(x.errorXOptions||[]).concat(x.errorYOptions||[]).map(function(X){return X||{positions:[],errors:[]}});x.error2d.update(C)}x.scatter2d&&x.scatter2d.update(x.markerOptions),x.fillOrder=l.repeat(null,m),x.fill2d&&(x.fillOptions=x.fillOptions.map(function(X,Z){var Q=y[Z];if(!(!X||!Q||!Q[0]||!Q[0].trace)){var re=Q[0],ce=re.trace,me=re.t,ye=x.lineOptions[Z],Ae,Se,Ce=[];ce._ownfill&&Ce.push(Z),ce._nexttrace&&Ce.push(Z+1),Ce.length&&(x.fillOrder[Z]=Ce);var qe=[],Ue=ye&&ye.positions||me.positions,xe,he;if(ce.fill==="tozeroy"){for(xe=0;xexe&&isNaN(Ue[he+1]);)he-=2;Ue[xe+1]!==0&&(qe=[Ue[xe],0]),qe=qe.concat(Ue.slice(xe,he+2)),Ue[he+1]!==0&&(qe=qe.concat([Ue[he],0]))}else if(ce.fill==="tozerox"){for(xe=0;xexe&&isNaN(Ue[he]);)he-=2;Ue[xe]!==0&&(qe=[0,Ue[xe+1]]),qe=qe.concat(Ue.slice(xe,he+2)),Ue[he]!==0&&(qe=qe.concat([0,Ue[he+1]]))}else if(ce.fill==="toself"||ce.fill==="tonext"){for(qe=[],Ae=0,X.splitNull=!0,Se=0;Se-1;for(let[X]of y)if(X){var D=X.trace,k=X.t,B=k.index,O=D._length,q=k.x,Y=k.y;if(D.selectedpoints||R||z){if(R||(R=!0),D.selectedpoints){var ee=x.selectBatch[B]=D.selectedpoints,te={};for(g=0;gM&&d||xn,_;for(b?_=d.sizeAvg||Math.max(d.size,3):_=w(c,f),T=0;T{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,S(()=>{this.dirty=!1})),this)},a.prototype.update=function(...s){if(!s.length)return;for(let f=0;f_||!d.lower&&b<_)continue;let I=r(d.id,b,_),C=this.passes[I]||(this.passes[I]={});if(f.data&&(f.transpose?C.positions={x:{buffer:d.buffer,offset:_,count:M,stride:x},y:{buffer:d.buffer,offset:b,count:M,stride:x}}:C.positions={x:{buffer:d.buffer,offset:_*M,count:M},y:{buffer:d.buffer,offset:b*M,count:M}},C.bounds=n(d.bounds,b,_)),f.domain||f.viewport||f.data){let F=o?n(d.padding,b,_):d.padding;if(d.domain){let[R,z,D,k]=n(d.domain,b,_);C.viewport=[g+R*T+F[0],A+z*E+F[1],g+D*T-F[2],A+k*E-F[3]]}else C.viewport=[g+_*m+m*F[0],A+b*h+h*F[1],g+(_+1)*m-m*F[2],A+(b+1)*h-h*F[3]]}f.color&&(C.color=d.color),f.size&&(C.size=d.size),f.marker&&(C.marker=d.marker),f.borderSize&&(C.borderSize=d.borderSize),f.borderColor&&(C.borderColor=d.borderColor),f.opacity&&(C.opacity=d.opacity),f.range&&(C.range=y?n(d.range,b,_):d.range||C.bounds),d.passes.push(I)}return this},a.prototype.draw=function(...s){if(!s.length)this.scatter.draw();else{let c=[];for(let p=0;p{c[y+x]=f})}this.scatter.draw(...c)}return this},a.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function r(s,c,p){let f=s.id!=null?s.id:s,d=c,y=p;return f<<16|(d&255)<<8|y&255}function n(s,c,p){let f,d,y,o,x,M,T,E,g=s[c],A=s[p];return g.length>2?(f=g[0],y=g[2],d=g[1],o=g[3]):g.length?(f=d=g[0],y=o=g[1]):(f=g.x,d=g.y,y=g.x+g.width,o=g.y+g.height),A.length>2?(x=A[0],T=A[2],M=A[1],E=A[3]):A.length?(x=M=A[0],T=E=A[1]):(x=A.x,M=A.y,T=A.x+A.width,E=A.y+A.height),[x,d,T,o]}function i(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=e(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),Aj=De({"src/traces/splom/plot.js"(j,N){"use strict";var u=wj(),v=Ar(),w=lu(),S=Ed().selectMode;N.exports=function(t,a,r){if(r.length)for(var n=0;n-1,z=S(d)||!!n.selectedpoints||R,D=!0;if(z){var k=n._length;if(n.selectedpoints){s.selectBatch=n.selectedpoints;var B=n.selectedpoints,O={};for(x=0;x=q[Y][0]&&O<=q[Y][1])return!0;return!1}function c(O){O.attr("x",-u.bar.captureWidth/2).attr("width",u.bar.captureWidth)}function p(O){O.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function f(O){if(!O.brush.filterSpecified)return"0,"+O.height;for(var q=d(O.brush.filter.getConsolidated(),O.height),Y=[0],ee,te,ae,U=q.length?q[0][0]:null,H=0;HO[1]+Y||q=.9*O[1]+.1*O[0]?"n":q<=.9*O[0]+.1*O[1]?"s":"ns"}function o(){v.select(document.body).style("cursor",null)}function x(O){O.attr("stroke-dasharray",f)}function M(O,q){var Y=v.select(O).selectAll(".highlight, .highlight-shadow"),ee=q?Y.transition().duration(u.bar.snapDuration).each("end",q):Y;x(ee)}function T(O,q){var Y=O.brush,ee=Y.filterSpecified,te=NaN,ae={},U;if(ee){var H=O.height,K=Y.filter.getConsolidated(),V=d(K,H),$=NaN,X=NaN,Z=NaN;for(U=0;U<=V.length;U++){var Q=V[U];if(Q&&Q[0]<=q&&q<=Q[1]){$=U;break}else if(X=U?U-1:NaN,Q&&Q[0]>q){Z=U;break}}if(te=$,isNaN(te)&&(isNaN(X)||isNaN(Z)?te=isNaN(X)?Z:X:te=q-V[X][1]=Ae[0]&&ye<=Ae[1]){ae.clickableOrdinalRange=Ae;break}}}return ae}function E(O,q){v.event.sourceEvent.stopPropagation();var Y=q.height-v.mouse(O)[1]-2*u.verticalPadding,ee=q.unitToPaddedPx.invert(Y),te=q.brush,ae=T(q,Y),U=ae.interval,H=te.svgBrush;if(H.wasDragged=!1,H.grabbingBar=ae.region==="ns",H.grabbingBar){var K=U.map(q.unitToPaddedPx);H.grabPoint=Y-K[0]-u.verticalPadding,H.barLength=K[1]-K[0]}H.clickableOrdinalRange=ae.clickableOrdinalRange,H.stayingIntervals=q.multiselect&&te.filterSpecified?te.filter.getConsolidated():[],U&&(H.stayingIntervals=H.stayingIntervals.filter(function(V){return V[0]!==U[0]&&V[1]!==U[1]})),H.startExtent=ae.region?U[ae.region==="s"?1:0]:ee,q.parent.inBrushDrag=!0,H.brushStartCallback()}function g(O,q){v.event.sourceEvent.stopPropagation();var Y=q.height-v.mouse(O)[1]-2*u.verticalPadding,ee=q.brush.svgBrush;ee.wasDragged=!0,ee._dragging=!0,ee.grabbingBar?ee.newExtent=[Y-ee.grabPoint,Y+ee.barLength-ee.grabPoint].map(q.unitToPaddedPx.invert):ee.newExtent=[ee.startExtent,q.unitToPaddedPx.invert(Y)].sort(l),q.brush.filterSpecified=!0,ee.extent=ee.stayingIntervals.concat([ee.newExtent]),ee.brushCallback(q),M(O.parentNode)}function A(O,q){var Y=q.brush,ee=Y.filter,te=Y.svgBrush;te._dragging||(m(O,q),g(O,q),q.brush.svgBrush.wasDragged=!1),te._dragging=!1;var ae=v.event;ae.sourceEvent.stopPropagation();var U=te.grabbingBar;if(te.grabbingBar=!1,te.grabLocation=void 0,q.parent.inBrushDrag=!1,o(),!te.wasDragged){te.wasDragged=void 0,te.clickableOrdinalRange?Y.filterSpecified&&q.multiselect?te.extent.push(te.clickableOrdinalRange):(te.extent=[te.clickableOrdinalRange],Y.filterSpecified=!0):U?(te.extent=te.stayingIntervals,te.extent.length===0&&F(Y)):F(Y),te.brushCallback(q),M(O.parentNode),te.brushEndCallback(Y.filterSpecified?ee.getConsolidated():[]);return}var H=function(){ee.set(ee.getConsolidated())};if(q.ordinal){var K=q.unitTickvals;K[K.length-1]te.newExtent[0];te.extent=te.stayingIntervals.concat(V?[te.newExtent]:[]),te.extent.length||F(Y),te.brushCallback(q),V?M(O.parentNode,H):(H(),M(O.parentNode))}else H();te.brushEndCallback(Y.filterSpecified?ee.getConsolidated():[])}function m(O,q){var Y=q.height-v.mouse(O)[1]-2*u.verticalPadding,ee=T(q,Y),te="crosshair";ee.clickableOrdinalRange?te="pointer":ee.region&&(te=ee.region+"-resize"),v.select(document.body).style("cursor",te)}function h(O){O.on("mousemove",function(q){v.event.preventDefault(),q.parent.inBrushDrag||m(this,q)}).on("mouseleave",function(q){q.parent.inBrushDrag||o()}).call(v.behavior.drag().on("dragstart",function(q){E(this,q)}).on("drag",function(q){g(this,q)}).on("dragend",function(q){A(this,q)}))}function b(O,q){return O[0]-q[0]}function _(O,q,Y){var ee=Y._context.staticPlot,te=O.selectAll(".background").data(S);te.enter().append("rect").classed("background",!0).call(c).call(p).style("pointer-events",ee?"none":"auto").attr("transform",e(0,u.verticalPadding)),te.call(h).attr("height",function(H){return H.height-u.verticalPadding});var ae=O.selectAll(".highlight-shadow").data(S);ae.enter().append("line").classed("highlight-shadow",!0).attr("x",-u.bar.width/2).attr("stroke-width",u.bar.width+u.bar.strokeWidth).attr("stroke",q).attr("opacity",u.bar.strokeOpacity).attr("stroke-linecap","butt"),ae.attr("y1",function(H){return H.height}).call(x);var U=O.selectAll(".highlight").data(S);U.enter().append("line").classed("highlight",!0).attr("x",-u.bar.width/2).attr("stroke-width",u.bar.width-u.bar.strokeWidth).attr("stroke",u.bar.fillColor).attr("opacity",u.bar.fillOpacity).attr("stroke-linecap","butt"),U.attr("y1",function(H){return H.height}).call(x)}function I(O,q,Y){var ee=O.selectAll("."+u.cn.axisBrush).data(S,w);ee.enter().append("g").classed(u.cn.axisBrush,!0),_(ee,q,Y)}function C(O){return O.svgBrush.extent.map(function(q){return q.slice()})}function F(O){O.filterSpecified=!1,O.svgBrush.extent=[[-1/0,1/0]]}function R(O){return function(Y){var ee=Y.brush,te=C(ee),ae=te.slice();ee.filter.set(ae),O()}}function z(O){for(var q=O.slice(),Y=[],ee,te=q.shift();te;){for(ee=te.slice();(te=q.shift())&&te[0]<=ee[1];)ee[1]=Math.max(ee[1],te[1]);Y.push(ee)}return Y.length===1&&Y[0][0]>Y[0][1]&&(Y=[]),Y}function D(){var O=[],q,Y;return{set:function(ee){O=ee.map(function(te){return te.slice().sort(l)}).sort(b),O.length===1&&O[0][0]===-1/0&&O[0][1]===1/0&&(O=[[0,-1]]),q=z(O),Y=O.reduce(function(te,ae){return[Math.min(te[0],ae[0]),Math.max(te[1],ae[1])]},[1/0,-1/0])},get:function(){return O.slice()},getConsolidated:function(){return q},getBounds:function(){return Y}}}function k(O,q,Y,ee,te,ae){var U=D();return U.set(Y),{filter:U,filterSpecified:q,svgBrush:{extent:[],brushStartCallback:ee,brushCallback:R(te),brushEndCallback:ae}}}function B(O,q){if(Array.isArray(O[0])?(O=O.map(function(ee){return ee.sort(l)}),q.multiselect?O=z(O.sort(b)):O=[O[0]]):O=[O.sort(l)],q.tickvals){var Y=q.tickvals.slice().sort(l);if(O=O.map(function(ee){var te=[i(0,Y,ee[0],[]),i(1,Y,ee[1],[])];if(te[1]>te[0])return te}).filter(function(ee){return ee}),!O.length)return}return O.length>1?O:O[0]}N.exports={makeBrush:k,ensureAxisBrush:I,cleanRanges:B}}}),Pj=De({"src/traces/parcoords/defaults.js"(j,N){"use strict";var u=Ar(),v=Of().hasColorscale,w=Wc(),S=ql().defaults,l=Hf(),e=Vi(),t=t6(),a=r6(),r=Ag().maxDimensionCount,n=Xb();function i(c,p,f,d,y){var o=y("line.color",f);if(v(c,"line")&&u.isArrayOrTypedArray(o)){if(o.length)return y("line.colorscale"),w(c,p,d,y,{prefix:"line.",cLetter:"c"}),o.length;p.line.color=f}return 1/0}function s(c,p,f,d){function y(E,g){return u.coerce(c,p,t.dimensions,E,g)}var o=y("values"),x=y("visible");if(o&&o.length||(x=p.visible=!1),x){y("label"),y("tickvals"),y("ticktext"),y("tickformat");var M=y("range");p._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:M},e.setConvert(p._ax,d.layout),y("multiselect");var T=y("constraintrange");T&&(p.constraintrange=a.cleanRanges(T,p))}}N.exports=function(p,f,d,y){function o(g,A){return u.coerce(p,f,t,g,A)}var x=p.dimensions;Array.isArray(x)&&x.length>r&&(u.log("parcoords traces support up to "+r+" dimensions at the moment"),x.splice(r));var M=l(p,f,{name:"dimensions",layout:y,handleItemDefaults:s}),T=i(p,f,d,y,o);S(f,y,o),(!Array.isArray(M)||!M.length)&&(f.visible=!1),n(f,M,"values",T);var E=u.extendFlat({},y.font,{size:Math.round(y.font.size/1.2)});u.coerceFont(o,"labelfont",E),u.coerceFont(o,"tickfont",E,{autoShadowDflt:!0}),u.coerceFont(o,"rangefont",E),o("labelangle"),o("labelside"),o("unselected.line.color"),o("unselected.line.opacity")}}}),Rj=De({"src/traces/parcoords/calc.js"(j,N){"use strict";var u=Ar().isArrayOrTypedArray,v=Dl(),w=Fd().wrap;N.exports=function(e,t){var a,r;return v.hasColorscale(t,"line")&&u(t.line.color)?(a=t.line.color,r=v.extractOpts(t.line).colorscale,v.calc(e,t,{vals:a,containerStr:"line",cLetter:"c"})):(a=S(t._length),r=[[0,t.line.color],[1,t.line.color]]),w({lineColor:a,cscale:r})};function S(l){for(var e=new Array(l),t=0;t>>16,(j&65280)>>>8,j&255],alpha:1};if(typeof j=="number")return{space:"rgb",values:[j>>>16,(j&65280)>>>8,j&255],alpha:1};if(j=String(j).toLowerCase(),Zb.default[j])w=Zb.default[j].slice(),l="rgb";else if(j==="transparent")S=0,l="rgb",w=[0,0,0];else if(j[0]==="#"){var e=j.slice(1),t=e.length,a=t<=4;S=1,a?(w=[parseInt(e[0]+e[0],16),parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16)],t===4&&(S=parseInt(e[3]+e[3],16)/255)):(w=[parseInt(e[0]+e[1],16),parseInt(e[2]+e[3],16),parseInt(e[4]+e[5],16)],t===8&&(S=parseInt(e[6]+e[7],16)/255)),w[0]||(w[0]=0),w[1]||(w[1]=0),w[2]||(w[2]=0),l="rgb"}else if(v=/^((?:rgba?|hs[lvb]a?|hwba?|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms|oklch|oklab|color))\s*\(([^\)]*)\)/.exec(j)){var r=v[1];l=r.replace(/a$/,"");var n=l==="cmyk"?4:l==="gray"?1:3;w=v[2].trim().split(/\s*[,\/]\s*|\s+/),l==="color"&&(l=w.shift()),w=w.map(function(i,s){if(i[i.length-1]==="%")return i=parseFloat(i)/100,s===3?i:l==="rgb"?i*255:l[0]==="h"||l[0]==="l"&&!s?i*100:l==="lab"?i*125:l==="lch"?s<2?i*150:i*360:l[0]==="o"&&!s?i:l==="oklab"?i*.4:l==="oklch"?s<2?i*.4:i*360:i;if(l[s]==="h"||s===2&&l[l.length-1]==="h"){if($b[i]!==void 0)return $b[i];if(i.endsWith("deg"))return parseFloat(i);if(i.endsWith("turn"))return parseFloat(i)*360;if(i.endsWith("grad"))return parseFloat(i)*360/400;if(i.endsWith("rad"))return parseFloat(i)*180/Math.PI}return i==="none"?0:parseFloat(i)}),S=w.length>n?w.pop():1}else/[0-9](?:\s|\/|,)/.test(j)&&(w=j.match(/([0-9]+)/g).map(function(i){return parseFloat(i)}),l=((u=(N=j.match(/([a-z])/ig))==null?void 0:N.join(""))==null?void 0:u.toLowerCase())||"rgb");return{space:l,values:w,alpha:S}}var Zb,a6,$b,Dj=di({"node_modules/color-parse/index.js"(){Zb=Du(QA(),1),a6=Ij,$b={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}}}),Tg,n6=di({"node_modules/color-space/rgb.js"(){Tg={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}}}),Mg,Fj=di({"node_modules/color-space/hsl.js"(){n6(),Mg={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(j){var N=j[0]/360,u=j[1]/100,v=j[2]/100,w,S,l,e,t,a=0;if(u===0)return t=v*255,[t,t,t];for(S=v<.5?v*(1+u):v+u-v*u,w=2*v-S,e=[0,0,0];a<3;)l=N+1/3*-(a-1),l<0?l++:l>1&&l--,t=6*l<1?w+(S-w)*6*l:2*l<1?S:3*l<2?w+(S-w)*(2/3-l)*6:w,e[a++]=t*255;return e}},Tg.hsl=function(j){var N=j[0]/255,u=j[1]/255,v=j[2]/255,w=Math.min(N,u,v),S=Math.max(N,u,v),l=S-w,e,t,a;return S===w?e=0:N===S?e=(u-v)/l:u===S?e=2+(v-N)/l:v===S&&(e=4+(N-u)/l),e=Math.min(e*60,360),e<0&&(e+=360),a=(w+S)/2,S===w?t=0:a<=.5?t=l/(S+w):t=l/(2-S-w),[e,t*100,a*100]}}}),i6={};Zo(i6,{default:()=>zj});function zj(j){Array.isArray(j)&&j.raw&&(j=String.raw(...arguments)),j instanceof Number&&(j=+j);var N,u,v,w=a6(j);if(!w.space)return[];let S=w.space[0]==="h"?Mg.min:Tg.min,l=w.space[0]==="h"?Mg.max:Tg.max;return N=Array(3),N[0]=Math.min(Math.max(w.values[0],S[0]),l[0]),N[1]=Math.min(Math.max(w.values[1],S[1]),l[1]),N[2]=Math.min(Math.max(w.values[2],S[2]),l[2]),w.space[0]==="h"&&(N=Mg.rgb(N)),N.push(Math.min(Math.max(w.alpha,0),1)),N}var Bj=di({"node_modules/color-rgba/index.js"(){Dj(),n6(),Fj()}}),o6=De({"src/traces/parcoords/helpers.js"(j){"use strict";var N=Ar().isTypedArray;j.convertTypedArray=function(u){return N(u)?Array.prototype.slice.call(u):u},j.isOrdinal=function(u){return!!u.tickvals},j.isVisible=function(u){return u.visible||!("visible"in u)}}}),Oj=De({"src/traces/parcoords/lines.js"(j,N){"use strict";var u=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` -`),v=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` -`),w=Ag().maxDimensionCount,S=Ar(),l=1e-6,e=2048,t=new Uint8Array(4),a=new Uint8Array(4),r={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function n(A){A.read({x:0,y:0,width:1,height:1,data:t})}function i(A,m,h,b,_){var I=A._gl;I.enable(I.SCISSOR_TEST),I.scissor(m,h,b,_),A.clear({color:[0,0,0,0],depth:1})}function s(A,m,h,b,_,I){var C=I.key;function F(R){var z=Math.min(b,_-R*b);R===0&&(window.cancelAnimationFrame(h.currentRafs[C]),delete h.currentRafs[C],i(A,I.scissorX,I.scissorY,I.scissorWidth,I.viewBoxSize[1])),!h.clearOnly&&(I.count=2*z,I.offset=2*R*b,m(I),R*b+z<_&&(h.currentRafs[C]=window.requestAnimationFrame(function(){F(R+1)})),h.drawCompleted=!1)}h.drawCompleted||(n(A),h.drawCompleted=!0),F(0)}function c(A){return Math.max(l,Math.min(1-l,A))}function p(A,m){for(var h=new Array(256),b=0;b<256;b++)h[b]=A(b/255).concat(m);return h}function f(A,m){return(A>>>8*m)%256/255}function d(A,m,h){for(var b=new Array(A*(w+4)),_=0,I=0;ISe&&(Se=X[ce].dim1.canvasX,ye=ce);re===0&&i(_,0,0,z.canvasWidth,z.canvasHeight);var Ce=U(h);for(ce=0;cece._length&&(he=he.slice(0,ce._length));var oe=ce.tickvals,le;function ne(ut,st){return{val:ut,text:le[st]}}function be(ut,st){return ut.val-st.val}if(w(oe)&&oe.length){v.isTypedArray(oe)&&(oe=Array.from(oe)),le=ce.ticktext,!w(le)||!le.length?le=oe.map(S(ce.tickformat)):le.length>oe.length?le=le.slice(0,oe.length):oe.length>le.length&&(oe=oe.slice(0,le.length));for(var Fe=1;Fe=st||Zt>=yt)return;var vr=je.lineLayer.readPixel(Pt,yt-1-Zt),Nt=vr[3]!==0,Kt=Nt?vr[2]+256*(vr[1]+256*vr[0]):null,nt={x:Pt,y:Zt,clientX:ut.clientX,clientY:ut.clientY,dataIndex:je.model.key,curveNumber:Kt};Kt!==ye&&(Nt?H.hover(nt):H.unhover&&H.unhover(nt),ye=Kt)}}),me.style("opacity",function(je){return je.pick?0:1}),$.style("background","rgba(255, 255, 255, 0)");var Se=$.selectAll("."+y.cn.parcoords).data(ce,c);Se.exit().remove(),Se.enter().append("g").classed(y.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Se.attr("transform",function(je){return a(je.model.translateX,je.model.translateY)});var Ce=Se.selectAll("."+y.cn.parcoordsControlView).data(p,c);Ce.enter().append("g").classed(y.cn.parcoordsControlView,!0),Ce.attr("transform",function(je){return a(je.model.pad.l,je.model.pad.t)});var qe=Ce.selectAll("."+y.cn.yAxis).data(function(je){return je.dimensions},c);qe.enter().append("g").classed(y.cn.yAxis,!0),Ce.each(function(je){B(qe,je,Z)}),me.each(function(je){if(je.viewModel){!je.lineLayer||H?je.lineLayer=x(this,je):je.lineLayer.update(je),(je.key||je.key===0)&&(je.viewModel[je.key]=je.lineLayer);var ut=!je.context||H;je.lineLayer.render(je.viewModel.panels,ut)}}),qe.attr("transform",function(je){return a(je.xScale(je.xIndex),0)}),qe.call(u.behavior.drag().origin(function(je){return je}).on("drag",function(je){var ut=je.parent;re.linePickActive(!1),je.x=Math.max(-y.overdrag,Math.min(je.model.width+y.overdrag,u.event.x)),je.canvasX=je.x*je.model.canvasPixelRatio,qe.sort(function(st,yt){return st.x-yt.x}).each(function(st,yt){st.xIndex=yt,st.x=je===st?st.x:st.xScale(st.xIndex),st.canvasX=st.x*st.model.canvasPixelRatio}),B(qe,ut,Z),qe.filter(function(st){return Math.abs(je.xIndex-st.xIndex)!==0}).attr("transform",function(st){return a(st.xScale(st.xIndex),0)}),u.select(this).attr("transform",a(je.x,0)),qe.each(function(st,yt,At){At===je.parent.key&&(ut.dimensions[yt]=st)}),ut.contextLayer&&ut.contextLayer.render(ut.panels,!1,!C(ut)),ut.focusLayer.render&&ut.focusLayer.render(ut.panels)}).on("dragend",function(je){var ut=je.parent;je.x=je.xScale(je.xIndex),je.canvasX=je.x*je.model.canvasPixelRatio,B(qe,ut,Z),u.select(this).attr("transform",function(st){return a(st.x,0)}),ut.contextLayer&&ut.contextLayer.render(ut.panels,!1,!C(ut)),ut.focusLayer&&ut.focusLayer.render(ut.panels),ut.pickLayer&&ut.pickLayer.render(ut.panels,!0),re.linePickActive(!0),H&&H.axesMoved&&H.axesMoved(ut.key,ut.dimensions.map(function(st){return st.crossfilterDimensionIndex}))})),qe.exit().remove();var Ue=qe.selectAll("."+y.cn.axisOverlays).data(p,c);Ue.enter().append("g").classed(y.cn.axisOverlays,!0),Ue.selectAll("."+y.cn.axis).remove();var xe=Ue.selectAll("."+y.cn.axis).data(p,c);xe.enter().append("g").classed(y.cn.axis,!0),xe.each(function(je){var ut=je.model.height/je.model.tickDistance,st=je.domainScale,yt=st.domain();u.select(this).call(u.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(ut,je.tickFormat).tickValues(je.ordinal?yt:null).tickFormat(function(At){return d.isOrdinal(je)?At:q(je.model.dimensions[je.visibleIndex],At)}).scale(st)),n.font(xe.selectAll("text"),je.model.tickFont)}),xe.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),xe.selectAll("text").style("cursor","default");var he=Ue.selectAll("."+y.cn.axisHeading).data(p,c);he.enter().append("g").classed(y.cn.axisHeading,!0);var oe=he.selectAll("."+y.cn.axisTitle).data(p,c);oe.enter().append("text").classed(y.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",K?"none":"auto"),oe.text(function(je){return je.label}).each(function(je){var ut=u.select(this);n.font(ut,je.model.labelFont),r.convertToTspans(ut,te)}).attr("transform",function(je){var ut=k(je.model.labelAngle,je.model.labelSide),st=y.axisTitleOffset;return(ut.dir>0?"":a(0,2*st+je.model.height))+t(ut.degrees)+a(-st*ut.dx,-st*ut.dy)}).attr("text-anchor",function(je){var ut=k(je.model.labelAngle,je.model.labelSide),st=Math.abs(ut.dx),yt=Math.abs(ut.dy);return 2*st>yt?ut.dir*ut.dx<0?"start":"end":"middle"});var le=Ue.selectAll("."+y.cn.axisExtent).data(p,c);le.enter().append("g").classed(y.cn.axisExtent,!0);var ne=le.selectAll("."+y.cn.axisExtentTop).data(p,c);ne.enter().append("g").classed(y.cn.axisExtentTop,!0),ne.attr("transform",a(0,-y.axisExtentOffset));var be=ne.selectAll("."+y.cn.axisExtentTopText).data(p,c);be.enter().append("text").classed(y.cn.axisExtentTopText,!0).call(z),be.text(function(je){return Y(je,!0)}).each(function(je){n.font(u.select(this),je.model.rangeFont)});var Fe=le.selectAll("."+y.cn.axisExtentBottom).data(p,c);Fe.enter().append("g").classed(y.cn.axisExtentBottom,!0),Fe.attr("transform",function(je){return a(0,je.model.height+y.axisExtentOffset)});var Ve=Fe.selectAll("."+y.cn.axisExtentBottomText).data(p,c);Ve.enter().append("text").classed(y.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(z),Ve.text(function(je){return Y(je,!1)}).each(function(je){n.font(u.select(this),je.model.rangeFont)}),o.ensureAxisBrush(Ue,Q,te)}}}),s6=De({"src/traces/parcoords/plot.js"(t,N){"use strict";var u=Nj(),v=Yb(),w=o6().isVisible,S={};function l(a,r,n){var i=r.indexOf(n),s=a.indexOf(i);return s===-1&&(s+=r.length),s}function e(a,r){return function(i,s){return l(a,r,i)-l(a,r,s)}}var t=N.exports=function(r,n){var i=r._fullLayout,s=v(r,[],S);if(s){var c={},p={},f={},d=i._size;n.forEach(function(T,E){var g=T[0].trace,A=f[E]=g.index;c[E]=r.data[A].dimensions,p[E]=r.data[A].dimensions.slice()});var y=function(T,E,g){var A=p[T][E],m=g.map(function(F){return F.slice()}),h="dimensions["+E+"].constraintrange",b=i._tracePreGUI[r._fullData[f[T]].uid];if(b[h]===void 0){var _=A.constraintrange;b[h]=_||null}var I=r._fullData[f[T]].dimensions[E];m.length?(m.length===1&&(m=m[0]),A.constraintrange=m,I.constraintrange=m.slice(),m=[m]):(delete A.constraintrange,delete I.constraintrange,m=null);var C={};C[h]=m,r.emit("plotly_restyle",[C,[f[T]]])},o=function(T){r.emit("plotly_hover",T)},x=function(T){r.emit("plotly_unhover",T)},M=function(T,E){var g=e(E,p[T].filter(w));c[T].sort(g),p[T].filter(function(A){return!w(A)}).sort(function(A){return p[T].indexOf(A)}).forEach(function(A){c[T].splice(c[T].indexOf(A),1),c[T].splice(p[T].indexOf(A),0,A)}),r.emit("plotly_restyle",[{dimensions:[c[T]]},[f[T]]])};u(r,n,{width:d.w,height:d.h,margin:{t:d.t,r:d.r,b:d.b,l:d.l}},{filterChanged:y,hover:o,unhover:x,axesMoved:M})}};t.reglPrecompiled=S}}),jj=De({"src/traces/parcoords/base_plot.js"(j){"use strict";var N=Qn(),u=Bf().getModuleCalcData,v=s6(),w=Kh();j.name="parcoords",j.plot=function(S){var l=u(S.calcdata,"parcoords")[0];l.length&&v(S,l)},j.clean=function(S,l,e,t){var a=t._has&&t._has("parcoords"),r=l._has&&l._has("parcoords");a&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},j.toSVG=function(S){var l=S._fullLayout._glimages,e=N.select(S).selectAll(".svg-container"),t=e.filter(function(r,n){return n===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var r=this,n=r.toDataURL("image/png"),i=l.append("svg:image");i.attr({xmlns:w.svg,"xlink:href":n,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})}t.each(a),window.setTimeout(function(){N.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Uj=De({"src/traces/parcoords/base_index.js"(j,N){"use strict";N.exports={attributes:t6(),supplyDefaults:Pj(),calc:Rj(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:jj(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),qj=De({"src/traces/parcoords/index.js"(j,N){"use strict";var u=Uj();u.plot=s6(),N.exports=u}}),Gj=De({"lib/parcoords.js"(j,N){"use strict";N.exports=qj()}}),l6=De({"src/traces/parcats/attributes.js"(j,N){"use strict";var u=Ji().extendFlat,v=Bs(),w=Ml(),S=ul(),{hovertemplateAttrs:l,templatefallbackAttrs:e}=Is(),t=ql().attributes,a=u({editType:"calc"},S("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});N.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:u({},v.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:w({editType:"calc"}),tickfont:w({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:a,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),Vj=De({"src/traces/parcats/defaults.js"(j,N){"use strict";var u=Ar(),v=Of().hasColorscale,w=Wc(),S=ql().defaults,l=Hf(),e=l6(),t=Xb(),a=Vf().isTypedArraySpec;function r(i,s,c,p,f){f("line.shape"),f("line.hovertemplate"),f("line.hovertemplatefallback");var d=f("line.color",p.colorway[0]);if(v(i,"line")&&u.isArrayOrTypedArray(d)){if(d.length)return f("line.colorscale"),w(i,s,p,f,{prefix:"line.",cLetter:"c"}),d.length;s.line.color=c}return 1/0}function n(i,s){function c(M,T){return u.coerce(i,s,e.dimensions,M,T)}var p=c("values"),f=c("visible");if(p&&p.length||(f=s.visible=!1),f){c("label"),c("displayindex",s._index);var d=i.categoryarray,y=u.isArrayOrTypedArray(d)&&d.length>0||a(d),o;y&&(o="array");var x=c("categoryorder",o);x==="array"?(c("categoryarray"),c("ticktext")):(delete i.categoryarray,delete i.ticktext),!y&&x==="array"&&(s.categoryorder="trace")}}N.exports=function(s,c,p,f){function d(M,T){return u.coerce(s,c,e,M,T)}var y=l(s,c,{name:"dimensions",handleItemDefaults:n}),o=r(s,c,p,f,d);S(c,f,d),(!Array.isArray(y)||!y.length)&&(c.visible=!1),t(c,y,"values",o),d("hoveron"),d("hovertemplate"),d("hovertemplatefallback"),d("arrangement"),d("bundlecolors"),d("sortpaths"),d("counts");var x=f.font;u.coerceFont(d,"labelfont",x,{overrideDflt:{size:Math.round(x.size)}}),u.coerceFont(d,"tickfont",x,{autoShadowDflt:!0,overrideDflt:{size:Math.round(x.size/1.2)}})}}}),Hj=De({"src/traces/parcats/calc.js"(j,N){"use strict";var u=Fd().wrap,v=Of().hasColorscale,w=Wf(),S=w3(),l=Ki(),e=Ar(),t=io();N.exports=function(x,M){var T=e.filterVisible(M.dimensions);if(T.length===0)return[];var E=T.map(function(U){var H;if(U.categoryorder==="trace")H=null;else if(U.categoryorder==="array")H=U.categoryarray;else{H=S(U.values);for(var K=!0,V=0;V=o.length||x[o[M]]!==void 0)return!1;x[o[M]]=!0}return!0}}}),Wj=De({"src/traces/parcats/parcats.js"(j,N){"use strict";var u=Qn(),v=(Hp(),ts(rp)).interpolateNumber,w=ex(),S=ii(),l=uu(),e=Ar(),t=e.strTranslate,a=Ki(),r=Xs();function n(V,$,X,Z){var Q=$._context.staticPlot,re=V.map(te.bind(0,$,X)),ce=Z.selectAll("g.parcatslayer").data([null]);ce.enter().append("g").attr("class","parcatslayer").style("pointer-events",Q?"none":"all");var me=ce.selectAll("g.trace.parcats").data(re,i),ye=me.enter().append("g").attr("class","trace parcats");me.attr("transform",function(ne){return t(ne.x,ne.y)}),ye.append("g").attr("class","paths");var Ae=me.select("g.paths"),Se=Ae.selectAll("path.path").data(function(ne){return ne.paths},i);Se.attr("fill",function(ne){return ne.model.color});var Ce=Se.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(ne){return ne.model.color}).attr("fill-opacity",0);x(Ce),Se.attr("d",function(ne){return ne.svgD}),Ce.empty()||Se.sort(c),Se.exit().remove(),Se.on("mouseover",p).on("mouseout",f).on("click",o),ye.append("g").attr("class","dimensions");var qe=me.select("g.dimensions"),Ue=qe.selectAll("g.dimension").data(function(ne){return ne.dimensions},i);Ue.enter().append("g").attr("class","dimension"),Ue.attr("transform",function(ne){return t(ne.x,0)}),Ue.exit().remove();var xe=Ue.selectAll("g.category").data(function(ne){return ne.categories},i),he=xe.enter().append("g").attr("class","category");xe.attr("transform",function(ne){return t(0,ne.y)}),he.append("rect").attr("class","catrect").attr("pointer-events","none"),xe.select("rect.catrect").attr("fill","none").attr("width",function(ne){return ne.width}).attr("height",function(ne){return ne.height}),E(he);var oe=xe.selectAll("rect.bandrect").data(function(ne){return ne.bands},i);oe.each(function(){e.raiseToTop(this)}),oe.attr("fill",function(ne){return ne.color});var le=oe.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(ne){return ne.color}).attr("fill-opacity",0);oe.attr("fill",function(ne){return ne.color}).attr("width",function(ne){return ne.width}).attr("height",function(ne){return ne.height}).attr("y",function(ne){return ne.y}).attr("cursor",function(ne){return ne.parcatsViewModel.arrangement==="fixed"?"default":ne.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),A(le),oe.exit().remove(),he.append("text").attr("class","catlabel").attr("pointer-events","none"),xe.select("text.catlabel").attr("text-anchor",function(ne){return s(ne)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(ne){return s(ne)?ne.width+5:-5}).attr("y",function(ne){return ne.height/2}).text(function(ne){return ne.model.categoryLabel}).each(function(ne){a.font(u.select(this),ne.parcatsViewModel.categorylabelfont),r.convertToTspans(u.select(this),$)}),he.append("text").attr("class","dimlabel"),xe.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(ne){return ne.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(ne){return ne.width/2}).attr("y",-5).text(function(ne,be){return be===0?ne.parcatsViewModel.model.dimensions[ne.model.dimensionInd].dimensionLabel:null}).each(function(ne){a.font(u.select(this),ne.parcatsViewModel.labelfont)}),xe.selectAll("rect.bandrect").on("mouseover",z).on("mouseout",D),xe.exit().remove(),Ue.call(u.behavior.drag().origin(function(ne){return{x:ne.x,y:0}}).on("dragstart",k).on("drag",B).on("dragend",O)),me.each(function(ne){ne.traceSelection=u.select(this),ne.pathSelection=u.select(this).selectAll("g.paths").selectAll("path.path"),ne.dimensionSelection=u.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),me.exit().remove()}N.exports=function(V,$,X,Z){n(X,V,Z,$)};function i(V){return V.key}function s(V){var $=V.parcatsViewModel.dimensions.length,X=V.parcatsViewModel.dimensions[$-1].model.dimensionInd;return V.model.dimensionInd===X}function c(V,$){return V.model.rawColor>$.model.rawColor?1:V.model.rawColor<$.model.rawColor?-1:0}function p(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),M(u.select(this));var $=d(V),X=y(V);if(V.parcatsViewModel.graphDiv.emit("plotly_hover",{points:$,event:u.event,constraints:X}),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var Z=u.mouse(this)[0],Q=V.parcatsViewModel.graphDiv,re=V.parcatsViewModel.trace,ce=Q._fullLayout,me=ce._paperdiv.node().getBoundingClientRect(),ye=V.parcatsViewModel.graphDiv.getBoundingClientRect(),Ae,Se,Ce;for(Ce=0;Ce"),je=u.mouse(Q)[0];l.loneHover({trace:re,x:xe-me.left+ye.left,y:he-me.top+ye.top,text:Ve,color:V.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:oe,idealAlign:jeS.mostReadable($.model.color)).attr("stroke-width",.3)}function T(V){V.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function E(V){V.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function g(V){V.attr("stroke","black").attr("stroke-width",1.5)}function A(V){V.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function m(V){var $=V.parcatsViewModel.pathSelection,X=V.categoryViewModel.model.dimensionInd,Z=V.categoryViewModel.model.categoryInd;return $.filter(function(Q){return Q.model.categoryInds[X]===Z&&Q.model.color===V.color})}function h(V){var $=u.select(V.parentNode).selectAll("rect.bandrect");$.each(function(X){var Z=m(X);M(Z),Z.each(function(){e.raiseToTop(this)})}),T(u.select(V.parentNode))}function b(V){var $=u.select(V).datum(),X=m($);M(X),X.each(function(){e.raiseToTop(this)}),u.select(V.parentNode).selectAll("rect.bandrect").filter(function(Z){return Z.color===$.color}).each(function(){e.raiseToTop(this),g(u.select(this))})}function _(V,$,X){var Z=u.select(V).datum(),Q=Z.categoryViewModel.model,re=Z.parcatsViewModel.graphDiv,ce=u.select(V.parentNode).selectAll("rect.bandrect"),me=[];ce.each(function(Ae){var Se=m(Ae);Se.each(function(Ce){Array.prototype.push.apply(me,d(Ce))})});var ye={};ye[Q.dimensionInd]=Q.categoryValue,re.emit($,{points:me,event:X,constraints:ye})}function I(V,$,X){var Z=u.select(V).datum(),Q=Z.categoryViewModel.model,re=Z.parcatsViewModel.graphDiv,ce=m(Z),me=[];ce.each(function(Ae){Array.prototype.push.apply(me,d(Ae))});var ye={};ye[Q.dimensionInd]=Q.categoryValue,Z.rawColor!==void 0&&(ye.color=Z.rawColor),re.emit($,{points:me,event:X,constraints:ye})}function C(V,$,X){V._fullLayout._calcInverseTransform(V);var Z=V._fullLayout._invScaleX,Q=V._fullLayout._invScaleY,re=u.select(X.parentNode).select("rect.catrect"),ce=re.node().getBoundingClientRect(),me=re.datum(),ye=me.parcatsViewModel,Ae=ye.model.dimensions[me.model.dimensionInd],Se=ye.trace,Ce=ce.top+ce.height/2,qe,Ue;ye.dimensions.length>1&&Ae.displayInd===ye.dimensions.length-1?(qe=ce.left,Ue="left"):(qe=ce.left+ce.width,Ue="right");var xe=me.model.count,he=me.model.categoryLabel,oe=xe/me.parcatsViewModel.model.count,le={countLabel:xe,categoryLabel:he,probabilityLabel:oe.toFixed(3)},ne=[];me.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ne.push(["Count:",le.countLabel].join(" ")),me.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&ne.push(["P("+le.categoryLabel+"):",le.probabilityLabel].join(" "));var be=ne.join("
");return{trace:Se,x:Z*(qe-$.left),y:Q*(Ce-$.top),text:be,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:Ue,hovertemplate:Se.hovertemplate,hovertemplateLabels:le,eventData:[{data:Se._input,fullData:Se,count:xe,category:he,probability:oe}]}}function F(V,$,X){var Z=[];return u.select(X.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Q=this;Z.push(C(V,$,Q))}),Z}function R(V,$,X){V._fullLayout._calcInverseTransform(V);var Z=V._fullLayout._invScaleX,Q=V._fullLayout._invScaleY,re=X.getBoundingClientRect(),ce=u.select(X).datum(),me=ce.categoryViewModel,ye=me.parcatsViewModel,Ae=ye.model.dimensions[me.model.dimensionInd],Se=ye.trace,Ce=re.y+re.height/2,qe,Ue;ye.dimensions.length>1&&Ae.displayInd===ye.dimensions.length-1?(qe=re.left,Ue="left"):(qe=re.left+re.width,Ue="right");var xe=me.model.categoryLabel,he=ce.parcatsViewModel.model.count,oe=0;ce.categoryViewModel.bands.forEach(function(At){At.color===ce.color&&(oe+=At.count)});var le=me.model.count,ne=0;ye.pathSelection.each(function(At){At.model.color===ce.color&&(ne+=At.model.count)});var be=oe/he,Fe=oe/ne,Ve=oe/le,je={countLabel:oe,categoryLabel:xe,probabilityLabel:be.toFixed(3)},ut=[];me.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&ut.push(["Count:",je.countLabel].join(" ")),me.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(ut.push("P(color \u2229 "+xe+"): "+je.probabilityLabel),ut.push("P("+xe+" | color): "+Fe.toFixed(3)),ut.push("P(color | "+xe+"): "+Ve.toFixed(3)));var st=ut.join("
"),yt=S.mostReadable(ce.color);return{trace:Se,x:Z*(qe-$.left),y:Q*(Ce-$.top),text:st,color:ce.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:yt,fontSize:10,idealAlign:Ue,hovertemplate:Se.hovertemplate,hovertemplateLabels:je,eventData:[{data:Se._input,fullData:Se,category:xe,count:he,probability:be,categorycount:le,colorcount:ne,bandcolorcount:oe}]}}function z(V){if(!V.parcatsViewModel.dragDimension&&V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var $=u.mouse(this)[1];if($<-1)return;var X=V.parcatsViewModel.graphDiv,Z=X._fullLayout,Q=Z._paperdiv.node().getBoundingClientRect(),re=V.parcatsViewModel.hoveron,ce=this;if(re==="color"?(b(ce),I(ce,"plotly_hover",u.event)):(h(ce),_(ce,"plotly_hover",u.event)),V.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var me;re==="category"?me=C(X,Q,ce):re==="color"?me=R(X,Q,ce):re==="dimension"&&(me=F(X,Q,ce)),me&&l.loneHover(me,{container:Z._hoverlayer.node(),outerContainer:Z._paper.node(),gd:X})}}}function D(V){var $=V.parcatsViewModel;if(!$.dragDimension&&(x($.pathSelection),E($.dimensionSelection.selectAll("g.category")),A($.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),l.loneUnhover($.graphDiv._fullLayout._hoverlayer.node()),$.pathSelection.sort(c),$.hoverinfoItems.indexOf("skip")===-1)){var X=V.parcatsViewModel.hoveron,Z=this;X==="color"?I(Z,"plotly_unhover",u.event):_(Z,"plotly_unhover",u.event)}}function k(V){V.parcatsViewModel.arrangement!=="fixed"&&(V.dragDimensionDisplayInd=V.model.displayInd,V.initialDragDimensionDisplayInds=V.parcatsViewModel.model.dimensions.map(function($){return $.displayInd}),V.dragHasMoved=!1,V.dragCategoryDisplayInd=null,u.select(this).selectAll("g.category").select("rect.catrect").each(function($){var X=u.mouse(this)[0],Z=u.mouse(this)[1];-2<=X&&X<=$.width+2&&-2<=Z&&Z<=$.height+2&&(V.dragCategoryDisplayInd=$.model.displayInd,V.initialDragCategoryDisplayInds=V.model.categories.map(function(Q){return Q.displayInd}),$.model.dragY=$.y,e.raiseToTop(this.parentNode),u.select(this.parentNode).selectAll("rect.bandrect").each(function(Q){Q.ySe.y+Se.height/2&&(re.model.displayInd=Se.model.displayInd,Se.model.displayInd=me),V.dragCategoryDisplayInd=re.model.displayInd}if(V.dragCategoryDisplayInd===null||V.parcatsViewModel.arrangement==="freeform"){Q.model.dragX=u.event.x;var Ce=V.parcatsViewModel.dimensions[X],qe=V.parcatsViewModel.dimensions[Z];Ce!==void 0&&Q.model.dragXqe.x&&(Q.model.displayInd=qe.model.displayInd,qe.model.displayInd=V.dragDimensionDisplayInd),V.dragDimensionDisplayInd=Q.model.displayInd}H(V.parcatsViewModel),U(V.parcatsViewModel),ee(V.parcatsViewModel),Y(V.parcatsViewModel)}}function O(V){if(V.parcatsViewModel.arrangement!=="fixed"&&V.dragDimensionDisplayInd!==null){u.select(this).selectAll("text").attr("font-weight","normal");var $={},X=q(V.parcatsViewModel),Z=V.parcatsViewModel.model.dimensions.map(function(qe){return qe.displayInd}),Q=V.initialDragDimensionDisplayInds.some(function(qe,Ue){return qe!==Z[Ue]});Q&&Z.forEach(function(qe,Ue){var xe=V.parcatsViewModel.model.dimensions[Ue].containerInd;$["dimensions["+xe+"].displayindex"]=qe});var re=!1;if(V.dragCategoryDisplayInd!==null){var ce=V.model.categories.map(function(qe){return qe.displayInd});if(re=V.initialDragCategoryDisplayInds.some(function(qe,Ue){return qe!==ce[Ue]}),re){var me=V.model.categories.slice().sort(function(qe,Ue){return qe.displayInd-Ue.displayInd}),ye=me.map(function(qe){return qe.categoryValue}),Ae=me.map(function(qe){return qe.categoryLabel});$["dimensions["+V.model.containerInd+"].categoryarray"]=[ye],$["dimensions["+V.model.containerInd+"].ticktext"]=[Ae],$["dimensions["+V.model.containerInd+"].categoryorder"]="array"}}if(V.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!V.dragHasMoved&&V.potentialClickBand&&(V.parcatsViewModel.hoveron==="color"?I(V.potentialClickBand,"plotly_click",u.event.sourceEvent):_(V.potentialClickBand,"plotly_click",u.event.sourceEvent)),V.model.dragX=null,V.dragCategoryDisplayInd!==null){var Se=V.parcatsViewModel.dimensions[V.dragDimensionDisplayInd].categories[V.dragCategoryDisplayInd];Se.model.dragY=null,V.dragCategoryDisplayInd=null}V.dragDimensionDisplayInd=null,V.parcatsViewModel.dragDimension=null,V.dragHasMoved=null,V.potentialClickBand=null,H(V.parcatsViewModel),U(V.parcatsViewModel);var Ce=u.transition().duration(300).ease("cubic-in-out");Ce.each(function(){ee(V.parcatsViewModel,!0),Y(V.parcatsViewModel,!0)}).each("end",function(){(Q||re)&&w.restyle(V.parcatsViewModel.graphDiv,$,[X])})}}function q(V){for(var $,X=V.graphDiv._fullData,Z=0;Z=0;ye--)Ae+="C"+ce[ye]+","+($[ye+1]+Z)+" "+re[ye]+","+($[ye]+Z)+" "+(V[ye]+X[ye])+","+($[ye]+Z),Ae+="l-"+X[ye]+",0 ";return Ae+="Z",Ae}function U(V){var $=V.dimensions,X=V.model,Z=$.map(function(vr){return vr.categories.map(function(Nt){return Nt.y})}),Q=V.model.dimensions.map(function(vr){return vr.categories.map(function(Nt){return Nt.displayInd})}),re=V.model.dimensions.map(function(vr){return vr.displayInd}),ce=V.dimensions.map(function(vr){return vr.model.dimensionInd}),me=$.map(function(vr){return vr.x}),ye=$.map(function(vr){return vr.width}),Ae=[];for(var Se in X.paths)X.paths.hasOwnProperty(Se)&&Ae.push(X.paths[Se]);function Ce(vr){var Nt=vr.categoryInds.map(function(nt,Ee){return Q[Ee][nt]}),Kt=ce.map(function(nt){return Nt[nt]});return Kt}Ae.sort(function(vr,Nt){var Kt=Ce(vr),nt=Ce(Nt);return V.sortpaths==="backward"&&(Kt.reverse(),nt.reverse()),Kt.push(vr.valueInds[0]),nt.push(Nt.valueInds[0]),V.bundlecolors&&(Kt.unshift(vr.rawColor),nt.unshift(Nt.rawColor)),Ktnt?1:0});for(var qe=new Array(Ae.length),Ue=$[0].model.count,xe=$[0].categories.map(function(vr){return vr.height}).reduce(function(vr,Nt){return vr+Nt}),he=0;he0?le=xe*(oe.count/Ue):le=0;for(var ne=new Array(Z.length),be=0;be1?ce=(V.width-2*X-Z)/(Q-1):ce=0,me=X,ye=me+ce*re;var Ae=[],Se=V.model.maxCats,Ce=$.categories.length,qe=8,Ue=$.count,xe=V.height-qe*(Se-1),he,oe,le,ne,be,Fe=(Se-Ce)*qe/2,Ve=$.categories.map(function(je){return{displayInd:je.displayInd,categoryInd:je.categoryInd}});for(Ve.sort(function(je,ut){return je.displayInd-ut.displayInd}),be=0;be0?he=oe.count/Ue*xe:he=0,le={key:oe.valueInds[0],model:oe,width:Z,height:he,y:oe.dragY!==null?oe.dragY:Fe,bands:[],parcatsViewModel:V},Fe=Fe+he+qe,Ae.push(le);return{key:$.dimensionInd,x:$.dragX!==null?$.dragX:ye,y:0,width:Z,model:$,categories:Ae,parcatsViewModel:V,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),u6=De({"src/traces/parcats/plot.js"(j,N){"use strict";var u=Wj();N.exports=function(w,S,l,e){var t=w._fullLayout,a=t._paper,r=t._size;u(w,a,S,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},l,e)}}}),Yj=De({"src/traces/parcats/base_plot.js"(j){"use strict";var N=Bf().getModuleCalcData,u=u6(),v="parcats";j.name=v,j.plot=function(w,S,l,e){var t=N(w.calcdata,v);if(t.length){var a=t[0];u(w,a,l,e)}},j.clean=function(w,S,l,e){var t=e._has&&e._has("parcats"),a=S._has&&S._has("parcats");t&&!a&&e._paperdiv.selectAll(".parcats").remove()}}}),Xj=De({"src/traces/parcats/index.js"(j,N){"use strict";N.exports={attributes:l6(),supplyDefaults:Vj(),calc:Hj(),plot:u6(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:Yj(),categories:["noOpacity"],meta:{}}}}),Zj=De({"lib/parcats.js"(j,N){"use strict";N.exports=Xj()}}),$j=De({"src/plots/map/styles/arcgis-sat-hybrid.js"(j,N){"use strict";N.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI ©
ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} + }`}),A={};return{regl:f,draw:u,atlas:A}},C.prototype.update=function(f){var u=this;if(typeof f=="string")f={text:f};else if(!f)return;f=b(f,{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),f.opacity!=null&&(Array.isArray(f.opacity)?this.opacity=f.opacity.map(function(le){return parseFloat(le)}):this.opacity=parseFloat(f.opacity)),f.viewport!=null&&(this.viewport=r(f.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(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]),f.kerning!=null&&(this.kerning=f.kerning),f.offset!=null&&(typeof f.offset=="number"&&(f.offset=[f.offset,0]),this.positionOffset=v(f.offset)),f.direction&&(this.direction=f.direction),f.range&&(this.range=f.range,this.scale=[1/(f.range[2]-f.range[0]),1/(f.range[3]-f.range[1])],this.translate=[-f.range[0],-f.range[1]]),f.scale&&(this.scale=f.scale),f.translate&&(this.translate=f.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!f.font&&(f.font=C.baseFontSize+"px sans-serif");var A=!1,x=!1;if(f.font&&(Array.isArray(f.font)?f.font:[f.font]).forEach(function(le,Ae){if(typeof le=="string")try{le=p.parse(le)}catch{le=p.parse(C.baseFontSize+"px "+le)}else{var Be=le.style,Xe=le.weight,Ye=le.stretch,yt=le.variant;le=p.parse(p.stringify(le)),Be&&(le.style=Be),Xe&&(le.weight=Xe),Ye&&(le.stretch=Ye),yt&&(le.variant=yt)}var gt=p.stringify({size:C.baseFontSize,family:le.family,stretch:S?le.stretch:void 0,variant:le.variant,weight:le.weight,style:le.style}),Tt=o(le.size),At=Math.round(Tt[0]*s(Tt[1]));if(At!==u.fontSize[Ae]&&(x=!0,u.fontSize[Ae]=At),(!u.font[Ae]||gt!=u.font[Ae].baseString)&&(A=!0,u.font[Ae]=C.fonts[gt],!u.font[Ae])){var $t=le.family.join(", "),rr=[le.style];le.style!=le.variant&&rr.push(le.variant),le.variant!=le.weight&&rr.push(le.weight),S&&le.weight!=le.stretch&&rr.push(le.stretch),u.font[Ae]={baseString:gt,family:$t,weight:le.weight,stretch:le.stretch,style:le.style,variant:le.variant,width:{},kerning:{},metrics:h($t,{origin:"top",fontSize:C.baseFontSize,fontStyle:rr.join(" ")})},C.fonts[gt]=u.font[Ae]}}),(A||x)&&this.font.forEach(function(le,Ae){var Be=p.stringify({size:u.fontSize[Ae],family:le.family,stretch:S?le.stretch:void 0,variant:le.variant,weight:le.weight,style:le.style});if(u.fontAtlas[Ae]=u.shader.atlas[Be],!u.fontAtlas[Ae]){var Xe=le.metrics;u.shader.atlas[Be]=u.fontAtlas[Ae]={fontString:Be,step:Math.ceil(u.fontSize[Ae]*Xe.bottom*.5)*2,em:u.fontSize[Ae],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:u.regl.texture()}}f.text==null&&(f.text=u.text)}),typeof f.text=="string"&&f.position&&f.position.length>2){for(var z=Array(f.position.length*.5),I=0;I2){for(var B=!f.position[0].length,F=n.mallocFloat(this.count*2),P=0,j=0;P1?u.align[Ae]:u.align[0]:u.align;if(typeof Be=="number")return Be;switch(Be){case"right":case"end":return-le;case"center":case"centre":case"middle":return-le*.5}return 0})),this.baseline==null&&f.baseline==null&&(f.baseline=0),f.baseline!=null&&(this.baseline=f.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(le,Ae){var Be=(u.font[Ae]||u.font[0]).metrics,Xe=0;return Xe+=Be.bottom*.5,typeof le=="number"?Xe+=le-Be.baseline:Xe+=-Be[le],Xe*=-1,Xe})),f.color!=null)if(f.color||(f.color="transparent"),typeof f.color=="string"||!isNaN(f.color))this.color=e(f.color,"uint8");else{var Me;if(typeof f.color[0]=="number"&&f.color.length>this.counts.length){var Se=f.color.length;Me=n.mallocUint8(Se);for(var Ie=(f.color.subarray||f.color.slice).bind(f.color),Ve=0;Ve4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(_e){var ce=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(ce);for(var ve=0;ve1?this.counts[ve]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ve]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ve*4,ve*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ve]:this.opacity,baseline:this.baselineOffset[ve]!=null?this.baselineOffset[ve]:this.baselineOffset[0],align:this.align?this.alignOffset[ve]!=null?this.alignOffset[ve]:this.alignOffset[0]:0,atlas:this.fontAtlas[ve]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ve*2,ve*2+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=[]}},C.prototype.destroy=function(){},C.prototype.kerning=!0,C.prototype.position={constant:new Float32Array(2)},C.prototype.translate=null,C.prototype.scale=null,C.prototype.font=null,C.prototype.text="",C.prototype.positionOffset=[0,0],C.prototype.opacity=1,C.prototype.color=new Uint8Array([0,0,0,255]),C.prototype.alignOffset=[0,0],C.maxAtlasSize=1024,C.atlasCanvas=document.createElement("canvas"),C.atlasContext=C.atlasCanvas.getContext("2d",{alpha:!1}),C.baseFontSize=64,C.fonts={};function _(T){return typeof T=="function"&&T._gl&&T.prop&&T.texture&&T.buffer}V.exports=C}}),j2=ze({"src/lib/prepare_regl.js"(J,V){"use strict";var p=gA(),b=pM();V.exports=function(k,l,e){var t=k._fullLayout,n=!0;return t._glcanvas.each(function(r){if(r.regl){r.regl.preloadCachedCode(e);return}if(!(r.pick&&!t._has("parcoords"))){try{r.regl=b({canvas:this,attributes:{antialias:!r.pick,preserveDrawingBuffer:!0},pixelRatio:k._context.plotGlPixelRatio||window.devicePixelRatio,extensions:l||[],cachedCode:e||{}})}catch{n=!1}r.regl||(n=!1),n&&this.addEventListener("webglcontextlost",function(a){k&&k.emit&&k.emit("plotly_webglcontextlost",{event:a,layer:r.key})},!1)}}),n||p({container:t._glcontainer.node()}),n}}}),gM=ze({"src/traces/scattergl/plot.js"(c,V){"use strict";var p=YA(),b=oM(),E=tq(),k=mq(),l=Nr(),e=Fd().selectMode,t=j2(),n=el(),r=S5(),a=GA().styleTextSelection,o={};function s(m,h,v,g){var i=m._size,w=m.width*g,S=m.height*g,M=i.l*g,C=i.b*g,_=i.r*g,T=i.t*g,f=i.w*g,u=i.h*g;return[M+h.domain[0]*f,C+v.domain[0]*u,w-_-(1-h.domain[1])*f,S-T-(1-v.domain[1])*u]}var c=V.exports=function(h,v,g){if(g.length){var i=h._fullLayout,w=v._scene,S=v.xaxis,M=v.yaxis,C,_;if(w){var T=t(h,["ANGLE_instanced_arrays","OES_element_index_uint"],o);if(!T){w.init();return}var f=w.count,u=i._glcanvas.data()[0].regl;if(r(h,v,g),w.dirty){if((w.line2d||w.error2d)&&!(w.scatter2d||w.fill2d||w.glText)&&u.clear({color:!0,depth:!0}),w.error2d===!0&&(w.error2d=E(u)),w.line2d===!0&&(w.line2d=b(u)),w.scatter2d===!0&&(w.scatter2d=p(u)),w.fill2d===!0&&(w.fill2d=b(u)),w.glText===!0)for(w.glText=new Array(f),C=0;Cw.glText.length){var A=f-w.glText.length;for(C=0;Cee&&(isNaN(Z[ae])||isNaN(Z[ae+1]));)ae-=2;q.positions=Z.slice(ee,ae+2)}return q}),w.line2d.update(w.lineOptions)),w.error2d){var I=(w.errorXOptions||[]).concat(w.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});w.error2d.update(I)}w.scatter2d&&w.scatter2d.update(w.markerOptions),w.fillOrder=l.repeat(null,f),w.fill2d&&(w.fillOptions=w.fillOptions.map(function(q,Z){var ee=g[Z];if(!(!q||!ee||!ee[0]||!ee[0].trace)){var ae=ee[0],he=ae.trace,xe=ae.t,we=w.lineOptions[Z],Me,Se,Ie=[];he._ownfill&&Ie.push(Z),he._nexttrace&&Ie.push(Z+1),Ie.length&&(w.fillOrder[Z]=Ie);var Ve=[],Ge=we&&we.positions||xe.positions,ke,_e;if(he.fill==="tozeroy"){for(ke=0;keke&&isNaN(Ge[_e+1]);)_e-=2;Ge[ke+1]!==0&&(Ve=[Ge[ke],0]),Ve=Ve.concat(Ge.slice(ke,_e+2)),Ge[_e+1]!==0&&(Ve=Ve.concat([Ge[_e],0]))}else if(he.fill==="tozerox"){for(ke=0;keke&&isNaN(Ge[_e]);)_e-=2;Ge[ke]!==0&&(Ve=[0,Ge[ke+1]]),Ve=Ve.concat(Ge.slice(ke,_e+2)),Ge[_e]!==0&&(Ve=Ve.concat([0,Ge[_e+1]]))}else if(he.fill==="toself"||he.fill==="tonext"){for(Ve=[],Me=0,q.splitNull=!0,Se=0;Se-1;for(let[q]of g)if(q){var F=q.trace,P=q.t,j=P.index,U=F._length,$=P.x,Q=P.y;if(F.selectedpoints||D||B){if(D||(D=!0),F.selectedpoints){var re=w.selectBatch[j]=F.selectedpoints,ne={};for(_=0;_S&&v||wa,x;for(A?x=v.sizeAvg||Math.max(v.size,3):x=E(c,h),M=0;M{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,k(()=>{this.dirty=!1})),this)},n.prototype.update=function(...s){if(!s.length)return;for(let h=0;hx||!v.lower&&A{c[g+w]=h})}this.scatter.draw(...c)}return this},n.prototype.destroy=function(){return this.traces.forEach(s=>{s.buffer&&s.buffer.destroy&&s.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function r(s,c,m){let h=s.id!=null?s.id:s,v=c,g=m;return h<<16|(v&255)<<8|g&255}function a(s,c,m){let h,v,g,i,w,S,M,C,_=s[c],T=s[m];return _.length>2?(h=_[0],g=_[2],v=_[1],i=_[3]):_.length?(h=v=_[0],g=i=_[1]):(h=_.x,v=_.y,g=_.x+_.width,i=_.y+_.height),T.length>2?(w=T[0],M=T[2],S=T[1],C=T[3]):T.length?(w=S=T[0],M=C=T[1]):(w=T.x,S=T.y,M=T.x+T.width,C=T.y+T.height),[w,v,M,i]}function o(s){if(typeof s=="number")return[s,s,s,s];if(s.length===2)return[s[0],s[1],s[0],s[1]];{let c=e(s);return[c.x,c.y,c.x+c.width,c.y+c.height]}}}}),Sq=ze({"src/traces/splom/plot.js"(J,V){"use strict";var p=Mq(),b=Nr(),E=Xl(),k=Fd().selectMode;V.exports=function(t,n,r){if(r.length)for(var a=0;a-1,B=k(v)||!!a.selectedpoints||D,F=!0;if(B){var P=a._length;if(a.selectedpoints){s.selectBatch=a.selectedpoints;var j=a.selectedpoints,U={};for(w=0;w=$[Q][0]&&U<=$[Q][1])return!0;return!1}function c(U){U.attr("x",-p.bar.captureWidth/2).attr("width",p.bar.captureWidth)}function m(U){U.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function h(U){if(!U.brush.filterSpecified)return"0,"+U.height;for(var $=v(U.brush.filter.getConsolidated(),U.height),Q=[0],re,ne,se,G=$.length?$[0][0]:null,X=0;X<$.length;X++)re=$[X],ne=re[1]-re[0],Q.push(G),Q.push(ne),se=X+1,se<$.length&&(G=$[se][0]-re[1]);return Q.push(U.height),Q}function v(U,$){return U.map(function(Q){return Q.map(function(re){return Math.max(0,re*$)}).sort(l)})}function g(U,$){var Q=p.bar.handleHeight;if(!($>U[1]+Q||$=.9*U[1]+.1*U[0]?"n":$<=.9*U[0]+.1*U[1]?"s":"ns"}function i(){b.select(document.body).style("cursor",null)}function w(U){U.attr("stroke-dasharray",h)}function S(U,$){var Q=b.select(U).selectAll(".highlight, .highlight-shadow"),re=$?Q.transition().duration(p.bar.snapDuration).each("end",$):Q;w(re)}function M(U,$){var Q=U.brush,re=Q.filterSpecified,ne=NaN,se={},G;if(re){var X=U.height,K=Q.filter.getConsolidated(),H=v(K,X),Y=NaN,q=NaN,Z=NaN;for(G=0;G<=H.length;G++){var ee=H[G];if(ee&&ee[0]<=$&&$<=ee[1]){Y=G;break}else if(q=G?G-1:NaN,ee&&ee[0]>$){Z=G;break}}if(ne=Y,isNaN(ne)&&(isNaN(q)||isNaN(Z)?ne=isNaN(q)?Z:q:ne=$-H[q][1]=Me[0]&&we<=Me[1]){se.clickableOrdinalRange=Me;break}}}return se}function C(U,$){b.event.sourceEvent.stopPropagation();var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=$.unitToPaddedPx.invert(Q),ne=$.brush,se=M($,Q),G=se.interval,X=ne.svgBrush;if(X.wasDragged=!1,X.grabbingBar=se.region==="ns",X.grabbingBar){var K=G.map($.unitToPaddedPx);X.grabPoint=Q-K[0]-p.verticalPadding,X.barLength=K[1]-K[0]}X.clickableOrdinalRange=se.clickableOrdinalRange,X.stayingIntervals=$.multiselect&&ne.filterSpecified?ne.filter.getConsolidated():[],G&&(X.stayingIntervals=X.stayingIntervals.filter(function(H){return H[0]!==G[0]&&H[1]!==G[1]})),X.startExtent=se.region?G[se.region==="s"?1:0]:re,$.parent.inBrushDrag=!0,X.brushStartCallback()}function _(U,$){b.event.sourceEvent.stopPropagation();var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=$.brush.svgBrush;re.wasDragged=!0,re._dragging=!0,re.grabbingBar?re.newExtent=[Q-re.grabPoint,Q+re.barLength-re.grabPoint].map($.unitToPaddedPx.invert):re.newExtent=[re.startExtent,$.unitToPaddedPx.invert(Q)].sort(l),$.brush.filterSpecified=!0,re.extent=re.stayingIntervals.concat([re.newExtent]),re.brushCallback($),S(U.parentNode)}function T(U,$){var Q=$.brush,re=Q.filter,ne=Q.svgBrush;ne._dragging||(f(U,$),_(U,$),$.brush.svgBrush.wasDragged=!1),ne._dragging=!1;var se=b.event;se.sourceEvent.stopPropagation();var G=ne.grabbingBar;if(ne.grabbingBar=!1,ne.grabLocation=void 0,$.parent.inBrushDrag=!1,i(),!ne.wasDragged){ne.wasDragged=void 0,ne.clickableOrdinalRange?Q.filterSpecified&&$.multiselect?ne.extent.push(ne.clickableOrdinalRange):(ne.extent=[ne.clickableOrdinalRange],Q.filterSpecified=!0):G?(ne.extent=ne.stayingIntervals,ne.extent.length===0&&O(Q)):O(Q),ne.brushCallback($),S(U.parentNode),ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[]);return}var X=function(){re.set(re.getConsolidated())};if($.ordinal){var K=$.unitTickvals;K[K.length-1]ne.newExtent[0];ne.extent=ne.stayingIntervals.concat(H?[ne.newExtent]:[]),ne.extent.length||O(Q),ne.brushCallback($),H?S(U.parentNode,X):(X(),S(U.parentNode))}else X();ne.brushEndCallback(Q.filterSpecified?re.getConsolidated():[])}function f(U,$){var Q=$.height-b.mouse(U)[1]-2*p.verticalPadding,re=M($,Q),ne="crosshair";re.clickableOrdinalRange?ne="pointer":re.region&&(ne=re.region+"-resize"),b.select(document.body).style("cursor",ne)}function u(U){U.on("mousemove",function($){b.event.preventDefault(),$.parent.inBrushDrag||f(this,$)}).on("mouseleave",function($){$.parent.inBrushDrag||i()}).call(b.behavior.drag().on("dragstart",function($){C(this,$)}).on("drag",function($){_(this,$)}).on("dragend",function($){T(this,$)}))}function A(U,$){return U[0]-$[0]}function x(U,$,Q){var re=Q._context.staticPlot,ne=U.selectAll(".background").data(k);ne.enter().append("rect").classed("background",!0).call(c).call(m).style("pointer-events",re?"none":"auto").attr("transform",e(0,p.verticalPadding)),ne.call(u).attr("height",function(X){return X.height-p.verticalPadding});var se=U.selectAll(".highlight-shadow").data(k);se.enter().append("line").classed("highlight-shadow",!0).attr("x",-p.bar.width/2).attr("stroke-width",p.bar.width+p.bar.strokeWidth).attr("stroke",$).attr("opacity",p.bar.strokeOpacity).attr("stroke-linecap","butt"),se.attr("y1",function(X){return X.height}).call(w);var G=U.selectAll(".highlight").data(k);G.enter().append("line").classed("highlight",!0).attr("x",-p.bar.width/2).attr("stroke-width",p.bar.width-p.bar.strokeWidth).attr("stroke",p.bar.fillColor).attr("opacity",p.bar.fillOpacity).attr("stroke-linecap","butt"),G.attr("y1",function(X){return X.height}).call(w)}function z(U,$,Q){var re=U.selectAll("."+p.cn.axisBrush).data(k,E);re.enter().append("g").classed(p.cn.axisBrush,!0),x(re,$,Q)}function I(U){return U.svgBrush.extent.map(function($){return $.slice()})}function O(U){U.filterSpecified=!1,U.svgBrush.extent=[[-1/0,1/0]]}function D(U){return function(Q){var re=Q.brush,ne=I(re),se=ne.slice();re.filter.set(se),U()}}function B(U){for(var $=U.slice(),Q=[],re,ne=$.shift();ne;){for(re=ne.slice();(ne=$.shift())&&ne[0]<=re[1];)re[1]=Math.max(re[1],ne[1]);Q.push(re)}return Q.length===1&&Q[0][0]>Q[0][1]&&(Q=[]),Q}function F(){var U=[],$,Q;return{set:function(re){U=re.map(function(ne){return ne.slice().sort(l)}).sort(A),U.length===1&&U[0][0]===-1/0&&U[0][1]===1/0&&(U=[[0,-1]]),$=B(U),Q=U.reduce(function(ne,se){return[Math.min(ne[0],se[0]),Math.max(ne[1],se[1])]},[1/0,-1/0])},get:function(){return U.slice()},getConsolidated:function(){return $},getBounds:function(){return Q}}}function P(U,$,Q,re,ne,se){var G=F();return G.set(Q),{filter:G,filterSpecified:$,svgBrush:{extent:[],brushStartCallback:re,brushCallback:D(ne),brushEndCallback:se}}}function j(U,$){if(Array.isArray(U[0])?(U=U.map(function(re){return re.sort(l)}),$.multiselect?U=B(U.sort(A)):U=[U[0]]):U=[U.sort(l)],$.tickvals){var Q=$.tickvals.slice().sort(l);if(U=U.map(function(re){var ne=[o(0,Q,re[0],[]),o(1,Q,re[1],[])];if(ne[1]>ne[0])return ne}).filter(function(re){return re}),!U.length)return}return U.length>1?U:U[0]}V.exports={makeBrush:P,ensureAxisBrush:z,cleanRanges:j}}}),Dq=ze({"src/traces/parcoords/defaults.js"(J,V){"use strict";var p=Nr(),b=Bf().hasColorscale,E=qc(),k=Ml().defaults,l=Jf(),e=Gi(),t=xM(),n=bM(),r=sy().maxDimensionCount,a=U2();function o(c,m,h,v,g){var i=g("line.color",h);if(b(c,"line")&&p.isArrayOrTypedArray(i)){if(i.length)return g("line.colorscale"),E(c,m,v,g,{prefix:"line.",cLetter:"c"}),i.length;m.line.color=h}return 1/0}function s(c,m,h,v){function g(C,_){return p.coerce(c,m,t.dimensions,C,_)}var i=g("values"),w=g("visible");if(i&&i.length||(w=m.visible=!1),w){g("label"),g("tickvals"),g("ticktext"),g("tickformat");var S=g("range");m._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:S},e.setConvert(m._ax,v.layout),g("multiselect");var M=g("constraintrange");M&&(m.constraintrange=n.cleanRanges(M,m))}}V.exports=function(m,h,v,g){function i(_,T){return p.coerce(m,h,t,_,T)}var w=m.dimensions;Array.isArray(w)&&w.length>r&&(p.log("parcoords traces support up to "+r+" dimensions at the moment"),w.splice(r));var S=l(m,h,{name:"dimensions",layout:g,handleItemDefaults:s}),M=o(m,h,v,g,i);k(h,g,i),(!Array.isArray(S)||!S.length)&&(h.visible=!1),a(h,S,"values",M);var C=p.extendFlat({},g.font,{size:Math.round(g.font.size/1.2)});p.coerceFont(i,"labelfont",C),p.coerceFont(i,"tickfont",C,{autoShadowDflt:!0}),p.coerceFont(i,"rangefont",C),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}}}),Fq=ze({"src/traces/parcoords/calc.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray,b=fl(),E=Vd().wrap;V.exports=function(e,t){var n,r;return b.hasColorscale(t,"line")&&p(t.line.color)?(n=t.line.color,r=b.extractOpts(t.line).colorscale,b.calc(e,t,{vals:n,containerStr:"line",cLetter:"c"})):(n=k(t._length),r=[[0,t.line.color],[1,t.line.color]]),E({lineColor:n,cscale:r})};function k(l){for(var e=new Array(l),t=0;t 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` +`),b=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` +`),E=sy().maxDimensionCount,k=Nr(),l=1e-6,e=2048,t=new Uint8Array(4),n=new Uint8Array(4),r={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function a(T){T.read({x:0,y:0,width:1,height:1,data:t})}function o(T,f,u,A,x){var z=T._gl;z.enable(z.SCISSOR_TEST),z.scissor(f,u,A,x),T.clear({color:[0,0,0,0],depth:1})}function s(T,f,u,A,x,z){var I=z.key;function O(D){var B=Math.min(A,x-D*A);D===0&&(window.cancelAnimationFrame(u.currentRafs[I]),delete u.currentRafs[I],o(T,z.scissorX,z.scissorY,z.scissorWidth,z.viewBoxSize[1])),!u.clearOnly&&(z.count=2*B,z.offset=2*D*A,f(z),D*A+B>>8*f)%256/255}function v(T,f,u){for(var A=new Array(T*(E+4)),x=0,z=0;zSe&&(Se=q[he].dim1.canvasX,we=he);ae===0&&o(x,0,0,B.canvasWidth,B.canvasHeight);var Ie=G(u);for(he=0;hehe._length&&(_e=_e.slice(0,he._length));var ce=he.tickvals,ve;function le(yt,gt){return{val:yt,text:ve[gt]}}function Ae(yt,gt){return yt.val-gt.val}if(E(ce)&&ce.length){b.isTypedArray(ce)&&(ce=Array.from(ce)),ve=he.ticktext,!E(ve)||!ve.length?ve=ce.map(k(he.tickformat)):ve.length>ce.length?ve=ve.slice(0,ce.length):ce.length>ve.length&&(ce=ce.slice(0,ve.length));for(var Be=1;Be=gt||rr>=Tt)return;var _r=Ye.lineLayer.readPixel($t,Tt-1-rr),Xt=_r[3]!==0,or=Xt?_r[2]+256*(_r[1]+256*_r[0]):null,Ot={x:$t,y:rr,clientX:yt.clientX,clientY:yt.clientY,dataIndex:Ye.model.key,curveNumber:or};or!==we&&(Xt?X.hover(Ot):X.unhover&&X.unhover(Ot),we=or)}}),xe.style("opacity",function(Ye){return Ye.pick?0:1}),Y.style("background","rgba(255, 255, 255, 0)");var Se=Y.selectAll("."+g.cn.parcoords).data(he,c);Se.exit().remove(),Se.enter().append("g").classed(g.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),Se.attr("transform",function(Ye){return n(Ye.model.translateX,Ye.model.translateY)});var Ie=Se.selectAll("."+g.cn.parcoordsControlView).data(m,c);Ie.enter().append("g").classed(g.cn.parcoordsControlView,!0),Ie.attr("transform",function(Ye){return n(Ye.model.pad.l,Ye.model.pad.t)});var Ve=Ie.selectAll("."+g.cn.yAxis).data(function(Ye){return Ye.dimensions},c);Ve.enter().append("g").classed(g.cn.yAxis,!0),Ie.each(function(Ye){j(Ve,Ye,Z)}),xe.each(function(Ye){if(Ye.viewModel){!Ye.lineLayer||X?Ye.lineLayer=w(this,Ye):Ye.lineLayer.update(Ye),(Ye.key||Ye.key===0)&&(Ye.viewModel[Ye.key]=Ye.lineLayer);var yt=!Ye.context||X;Ye.lineLayer.render(Ye.viewModel.panels,yt)}}),Ve.attr("transform",function(Ye){return n(Ye.xScale(Ye.xIndex),0)}),Ve.call(p.behavior.drag().origin(function(Ye){return Ye}).on("drag",function(Ye){var yt=Ye.parent;ae.linePickActive(!1),Ye.x=Math.max(-g.overdrag,Math.min(Ye.model.width+g.overdrag,p.event.x)),Ye.canvasX=Ye.x*Ye.model.canvasPixelRatio,Ve.sort(function(gt,Tt){return gt.x-Tt.x}).each(function(gt,Tt){gt.xIndex=Tt,gt.x=Ye===gt?gt.x:gt.xScale(gt.xIndex),gt.canvasX=gt.x*gt.model.canvasPixelRatio}),j(Ve,yt,Z),Ve.filter(function(gt){return Math.abs(Ye.xIndex-gt.xIndex)!==0}).attr("transform",function(gt){return n(gt.xScale(gt.xIndex),0)}),p.select(this).attr("transform",n(Ye.x,0)),Ve.each(function(gt,Tt,At){At===Ye.parent.key&&(yt.dimensions[Tt]=gt)}),yt.contextLayer&&yt.contextLayer.render(yt.panels,!1,!I(yt)),yt.focusLayer.render&&yt.focusLayer.render(yt.panels)}).on("dragend",function(Ye){var yt=Ye.parent;Ye.x=Ye.xScale(Ye.xIndex),Ye.canvasX=Ye.x*Ye.model.canvasPixelRatio,j(Ve,yt,Z),p.select(this).attr("transform",function(gt){return n(gt.x,0)}),yt.contextLayer&&yt.contextLayer.render(yt.panels,!1,!I(yt)),yt.focusLayer&&yt.focusLayer.render(yt.panels),yt.pickLayer&&yt.pickLayer.render(yt.panels,!0),ae.linePickActive(!0),X&&X.axesMoved&&X.axesMoved(yt.key,yt.dimensions.map(function(gt){return gt.crossfilterDimensionIndex}))})),Ve.exit().remove();var Ge=Ve.selectAll("."+g.cn.axisOverlays).data(m,c);Ge.enter().append("g").classed(g.cn.axisOverlays,!0),Ge.selectAll("."+g.cn.axis).remove();var ke=Ge.selectAll("."+g.cn.axis).data(m,c);ke.enter().append("g").classed(g.cn.axis,!0),ke.each(function(Ye){var yt=Ye.model.height/Ye.model.tickDistance,gt=Ye.domainScale,Tt=gt.domain();p.select(this).call(p.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(yt,Ye.tickFormat).tickValues(Ye.ordinal?Tt:null).tickFormat(function(At){return v.isOrdinal(Ye)?At:$(Ye.model.dimensions[Ye.visibleIndex],At)}).scale(gt)),a.font(ke.selectAll("text"),Ye.model.tickFont)}),ke.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ke.selectAll("text").style("cursor","default");var _e=Ge.selectAll("."+g.cn.axisHeading).data(m,c);_e.enter().append("g").classed(g.cn.axisHeading,!0);var ce=_e.selectAll("."+g.cn.axisTitle).data(m,c);ce.enter().append("text").classed(g.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",K?"none":"auto"),ce.text(function(Ye){return Ye.label}).each(function(Ye){var yt=p.select(this);a.font(yt,Ye.model.labelFont),r.convertToTspans(yt,ne)}).attr("transform",function(Ye){var yt=P(Ye.model.labelAngle,Ye.model.labelSide),gt=g.axisTitleOffset;return(yt.dir>0?"":n(0,2*gt+Ye.model.height))+t(yt.degrees)+n(-gt*yt.dx,-gt*yt.dy)}).attr("text-anchor",function(Ye){var yt=P(Ye.model.labelAngle,Ye.model.labelSide),gt=Math.abs(yt.dx),Tt=Math.abs(yt.dy);return 2*gt>Tt?yt.dir*yt.dx<0?"start":"end":"middle"});var ve=Ge.selectAll("."+g.cn.axisExtent).data(m,c);ve.enter().append("g").classed(g.cn.axisExtent,!0);var le=ve.selectAll("."+g.cn.axisExtentTop).data(m,c);le.enter().append("g").classed(g.cn.axisExtentTop,!0),le.attr("transform",n(0,-g.axisExtentOffset));var Ae=le.selectAll("."+g.cn.axisExtentTopText).data(m,c);Ae.enter().append("text").classed(g.cn.axisExtentTopText,!0).call(B),Ae.text(function(Ye){return Q(Ye,!0)}).each(function(Ye){a.font(p.select(this),Ye.model.rangeFont)});var Be=ve.selectAll("."+g.cn.axisExtentBottom).data(m,c);Be.enter().append("g").classed(g.cn.axisExtentBottom,!0),Be.attr("transform",function(Ye){return n(0,Ye.model.height+g.axisExtentOffset)});var Xe=Be.selectAll("."+g.cn.axisExtentBottomText).data(m,c);Xe.enter().append("text").classed(g.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(B),Xe.text(function(Ye){return Q(Ye,!1)}).each(function(Ye){a.font(p.select(this),Ye.model.rangeFont)}),i.ensureAxisBrush(Ge,ee,ne)}}}),TM=ze({"src/traces/parcoords/plot.js"(t,V){"use strict";var p=Bq(),b=j2(),E=wM().isVisible,k={};function l(n,r,a){var o=r.indexOf(a),s=n.indexOf(o);return s===-1&&(s+=r.length),s}function e(n,r){return function(o,s){return l(n,r,o)-l(n,r,s)}}var t=V.exports=function(r,a){var o=r._fullLayout,s=b(r,[],k);if(s){var c={},m={},h={},v=o._size;a.forEach(function(M,C){var _=M[0].trace,T=h[C]=_.index;c[C]=r.data[T].dimensions,m[C]=r.data[T].dimensions.slice()});var g=function(M,C,_){var T=m[M][C],f=_.map(function(O){return O.slice()}),u="dimensions["+C+"].constraintrange",A=o._tracePreGUI[r._fullData[h[M]].uid];if(A[u]===void 0){var x=T.constraintrange;A[u]=x||null}var z=r._fullData[h[M]].dimensions[C];f.length?(f.length===1&&(f=f[0]),T.constraintrange=f,z.constraintrange=f.slice(),f=[f]):(delete T.constraintrange,delete z.constraintrange,f=null);var I={};I[u]=f,r.emit("plotly_restyle",[I,[h[M]]])},i=function(M){r.emit("plotly_hover",M)},w=function(M){r.emit("plotly_unhover",M)},S=function(M,C){var _=e(C,m[M].filter(E));c[M].sort(_),m[M].filter(function(T){return!E(T)}).sort(function(T){return m[M].indexOf(T)}).forEach(function(T){c[M].splice(c[M].indexOf(T),1),c[M].splice(m[M].indexOf(T),0,T)}),r.emit("plotly_restyle",[{dimensions:[c[M]]},[h[M]]])};p(r,a,{width:v.w,height:v.h,margin:{t:v.t,r:v.r,b:v.b,l:v.l}},{filterChanged:g,hover:i,unhover:w,axesMoved:S})}};t.reglPrecompiled=k}}),Oq=ze({"src/traces/parcoords/base_plot.js"(J){"use strict";var V=ci(),p=zf().getModuleCalcData,b=TM(),E=nd();J.name="parcoords",J.plot=function(k){var l=p(k.calcdata,"parcoords")[0];l.length&&b(k,l)},J.clean=function(k,l,e,t){var n=t._has&&t._has("parcoords"),r=l._has&&l._has("parcoords");n&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},J.toSVG=function(k){var l=k._fullLayout._glimages,e=V.select(k).selectAll(".svg-container"),t=e.filter(function(r,a){return a===e.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function n(){var r=this,a=r.toDataURL("image/png"),o=l.append("svg:image");o.attr({xmlns:E.svg,"xlink:href":a,preserveAspectRatio:"none",x:0,y:0,width:r.style.width,height:r.style.height})}t.each(n),window.setTimeout(function(){V.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}}}),Nq=ze({"src/traces/parcoords/base_index.js"(J,V){"use strict";V.exports={attributes:xM(),supplyDefaults:Dq(),calc:Fq(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:Oq(),categories:["gl","regl","noOpacity","noHover"],meta:{}}}}),jq=ze({"src/traces/parcoords/index.js"(J,V){"use strict";var p=Nq();p.plot=TM(),V.exports=p}}),Uq=ze({"lib/parcoords.js"(J,V){"use strict";V.exports=jq()}}),AM=ze({"src/traces/parcats/attributes.js"(J,V){"use strict";var p=Ki().extendFlat,b=ws(),E=Qs(),k=qs(),{hovertemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=Ml().attributes,n=p({editType:"calc"},k("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:e({editType:"plot"})});V.exports={domain:t({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:p({},b.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:l({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:e({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:E({editType:"calc"}),tickfont:E({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:n,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}}}),qq=ze({"src/traces/parcats/defaults.js"(J,V){"use strict";var p=Nr(),b=Bf().hasColorscale,E=qc(),k=Ml().defaults,l=Jf(),e=AM(),t=U2(),n=Ff().isTypedArraySpec;function r(o,s,c,m,h){h("line.shape"),h("line.hovertemplate"),h("line.hovertemplatefallback");var v=h("line.color",m.colorway[0]);if(b(o,"line")&&p.isArrayOrTypedArray(v)){if(v.length)return h("line.colorscale"),E(o,s,m,h,{prefix:"line.",cLetter:"c"}),v.length;s.line.color=c}return 1/0}function a(o,s){function c(S,M){return p.coerce(o,s,e.dimensions,S,M)}var m=c("values"),h=c("visible");if(m&&m.length||(h=s.visible=!1),h){c("label"),c("displayindex",s._index);var v=o.categoryarray,g=p.isArrayOrTypedArray(v)&&v.length>0||n(v),i;g&&(i="array");var w=c("categoryorder",i);w==="array"?(c("categoryarray"),c("ticktext")):(delete o.categoryarray,delete o.ticktext),!g&&w==="array"&&(s.categoryorder="trace")}}V.exports=function(s,c,m,h){function v(S,M){return p.coerce(s,c,e,S,M)}var g=l(s,c,{name:"dimensions",handleItemDefaults:a}),i=r(s,c,m,h,v);k(c,h,v),(!Array.isArray(g)||!g.length)&&(c.visible=!1),t(c,g,"values",i),v("hoveron"),v("hovertemplate"),v("hovertemplatefallback"),v("arrangement"),v("bundlecolors"),v("sortpaths"),v("counts");var w=h.font;p.coerceFont(v,"labelfont",w,{overrideDflt:{size:Math.round(w.size)}}),p.coerceFont(v,"tickfont",w,{autoShadowDflt:!0,overrideDflt:{size:Math.round(w.size/1.2)}})}}}),Vq=ze({"src/traces/parcats/calc.js"(J,V){"use strict";var p=Vd().wrap,b=Bf().hasColorscale,E=Qf(),k=Bw(),l=$i(),e=Nr(),t=ao();V.exports=function(w,S){var M=e.filterVisible(S.dimensions);if(M.length===0)return[];var C=M.map(function(G){var X;if(G.categoryorder==="trace")X=null;else if(G.categoryorder==="array")X=G.categoryarray;else{X=k(G.values);for(var K=!0,H=0;H=i.length||w[i[S]]!==void 0)return!1;w[i[S]]=!0}return!0}}}),Gq=ze({"src/traces/parcats/parcats.js"(J,V){"use strict";var p=ci(),b=(l0(),Po(_v)).interpolateNumber,E=Ux(),k=Qn(),l=Zl(),e=Nr(),t=e.strTranslate,n=$i(),r=Cs();function a(Y,q,Z,ee){var ae=q._context.staticPlot,he=Y.map(se.bind(0,q,Z)),xe=ee.selectAll("g.parcatslayer").data([null]);xe.enter().append("g").attr("class","parcatslayer").style("pointer-events",ae?"none":"all");var we=xe.selectAll("g.trace.parcats").data(he,o),Me=we.enter().append("g").attr("class","trace parcats");we.attr("transform",function(Ae){return t(Ae.x,Ae.y)}),Me.append("g").attr("class","paths");var Se=we.select("g.paths"),Ie=Se.selectAll("path.path").data(function(Ae){return Ae.paths},o);Ie.attr("fill",function(Ae){return Ae.model.color});var Ve=Ie.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.model.color}).attr("fill-opacity",0);S(Ve),Ie.attr("d",function(Ae){return Ae.svgD}),Ve.empty()||Ie.sort(c),Ie.exit().remove(),Ie.on("mouseover",h).on("mouseout",v).on("click",w),Me.append("g").attr("class","dimensions");var Ge=we.select("g.dimensions"),ke=Ge.selectAll("g.dimension").data(function(Ae){return Ae.dimensions},o);ke.enter().append("g").attr("class","dimension"),ke.attr("transform",function(Ae){return t(Ae.x,0)}),ke.exit().remove();var _e=ke.selectAll("g.category").data(function(Ae){return Ae.categories},o),ce=_e.enter().append("g").attr("class","category");_e.attr("transform",function(Ae){return t(0,Ae.y)}),ce.append("rect").attr("class","catrect").attr("pointer-events","none"),_e.select("rect.catrect").attr("fill","none").attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}),_(ce);var ve=_e.selectAll("rect.bandrect").data(function(Ae){return Ae.bands},o);ve.each(function(){e.raiseToTop(this)}),ve.attr("fill",function(Ae){return Ae.color});var le=ve.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.color}).attr("fill-opacity",0);ve.attr("fill",function(Ae){return Ae.color}).attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}).attr("y",function(Ae){return Ae.y}).attr("cursor",function(Ae){return Ae.parcatsViewModel.arrangement==="fixed"?"default":Ae.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),f(le),ve.exit().remove(),ce.append("text").attr("class","catlabel").attr("pointer-events","none"),_e.select("text.catlabel").attr("text-anchor",function(Ae){return s(Ae)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(Ae){return s(Ae)?Ae.width+5:-5}).attr("y",function(Ae){return Ae.height/2}).text(function(Ae){return Ae.model.categoryLabel}).each(function(Ae){n.font(p.select(this),Ae.parcatsViewModel.categorylabelfont),r.convertToTspans(p.select(this),q)}),ce.append("text").attr("class","dimlabel"),_e.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ae){return Ae.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Ae){return Ae.width/2}).attr("y",-5).text(function(Ae,Be){return Be===0?Ae.parcatsViewModel.model.dimensions[Ae.model.dimensionInd].dimensionLabel:null}).each(function(Ae){n.font(p.select(this),Ae.parcatsViewModel.labelfont)}),_e.selectAll("rect.bandrect").on("mouseover",F).on("mouseout",P),_e.exit().remove(),ke.call(p.behavior.drag().origin(function(Ae){return{x:Ae.x,y:0}}).on("dragstart",j).on("drag",U).on("dragend",$)),we.each(function(Ae){Ae.traceSelection=p.select(this),Ae.pathSelection=p.select(this).selectAll("g.paths").selectAll("path.path"),Ae.dimensionSelection=p.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),we.exit().remove()}V.exports=function(Y,q,Z,ee){a(Z,Y,ee,q)};function o(Y){return Y.key}function s(Y){var q=Y.parcatsViewModel.dimensions.length,Z=Y.parcatsViewModel.dimensions[q-1].model.dimensionInd;return Y.model.dimensionInd===Z}function c(Y,q){return Y.model.rawColor>q.model.rawColor?1:Y.model.rawColorae)return 1;if(ee!==ae){var he=isNaN(ee),xe=isNaN(ae);if(he!==xe)return he?1:-1}}return Y.length-q.length}function h(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){e.raiseToTop(this),M(p.select(this));var q=g(Y),Z=i(Y);if(Y.parcatsViewModel.graphDiv.emit("plotly_hover",{points:q,event:p.event,constraints:Z}),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var ee=p.mouse(this)[0],ae=Y.parcatsViewModel.graphDiv,he=Y.parcatsViewModel.trace,xe=ae._fullLayout,we=xe._paperdiv.node().getBoundingClientRect(),Me=Y.parcatsViewModel.graphDiv.getBoundingClientRect(),Se,Ie,Ve;for(Ve=0;Ve"),yt=p.mouse(ae)[0];l.loneHover({trace:he,x:_e-we.left+Me.left,y:ce-we.top+Me.top,text:Ye,color:Y.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ve,idealAlign:yt<_e?"right":"left",hovertemplate:(he.line||{}).hovertemplate,hovertemplateLabels:Be,eventData:[{data:he._input,fullData:he,count:le,probability:Ae}]},{container:xe._hoverlayer.node(),outerContainer:xe._paper.node(),gd:ae})}}}function v(Y){if(!Y.parcatsViewModel.dragDimension&&(S(p.select(this)),l.loneUnhover(Y.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),Y.parcatsViewModel.pathSelection.sort(c),Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1)){var q=g(Y),Z=i(Y);Y.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:q,event:p.event,constraints:Z})}}function g(Y){for(var q=[],Z=Q(Y.parcatsViewModel),ee=0;eek.mostReadable(q.model.color)).attr("stroke-width",.3)}function C(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function _(Y){Y.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function T(Y){Y.attr("stroke","black").attr("stroke-width",1.5)}function f(Y){Y.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function u(Y){var q=Y.parcatsViewModel.pathSelection,Z=Y.categoryViewModel.model.dimensionInd,ee=Y.categoryViewModel.model.categoryInd;return q.filter(function(ae){return ae.model.categoryInds[Z]===ee&&ae.model.color===Y.color})}function A(Y){var q=p.select(Y.parentNode).selectAll("rect.bandrect");q.each(function(Z){var ee=u(Z);M(ee),ee.each(function(){e.raiseToTop(this)})}),C(p.select(Y.parentNode))}function x(Y){var q=p.select(Y).datum(),Z=u(q);M(Z),Z.each(function(){e.raiseToTop(this)}),p.select(Y.parentNode).selectAll("rect.bandrect").filter(function(ee){return ee.color===q.color}).each(function(){e.raiseToTop(this),T(p.select(this))})}function z(Y,q,Z){var ee=p.select(Y).datum(),ae=ee.categoryViewModel.model,he=ee.parcatsViewModel.graphDiv,xe=p.select(Y.parentNode).selectAll("rect.bandrect"),we=[];xe.each(function(Se){var Ie=u(Se);Ie.each(function(Ve){Array.prototype.push.apply(we,g(Ve))})});var Me={};Me[ae.dimensionInd]=ae.categoryValue,he.emit(q,{points:we,event:Z,constraints:Me})}function I(Y,q,Z){var ee=p.select(Y).datum(),ae=ee.categoryViewModel.model,he=ee.parcatsViewModel.graphDiv,xe=u(ee),we=[];xe.each(function(Se){Array.prototype.push.apply(we,g(Se))});var Me={};Me[ae.dimensionInd]=ae.categoryValue,ee.rawColor!==void 0&&(Me.color=ee.rawColor),he.emit(q,{points:we,event:Z,constraints:Me})}function O(Y,q,Z){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ae=Y._fullLayout._invScaleY,he=p.select(Z.parentNode).select("rect.catrect"),xe=he.node().getBoundingClientRect(),we=he.datum(),Me=we.parcatsViewModel,Se=Me.model.dimensions[we.model.dimensionInd],Ie=Me.trace,Ve=xe.top+xe.height/2,Ge,ke;Me.dimensions.length>1&&Se.displayInd===Me.dimensions.length-1?(Ge=xe.left,ke="left"):(Ge=xe.left+xe.width,ke="right");var _e=we.model.count,ce=we.model.categoryLabel,ve=_e/we.parcatsViewModel.model.count,le={countLabel:_e,categoryLabel:ce,probabilityLabel:ve.toFixed(3)},Ae=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ae.push(["Count:",le.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ae.push(["P("+le.categoryLabel+"):",le.probabilityLabel].join(" "));var Be=Ae.join("
");return{trace:Ie,x:ee*(Ge-q.left),y:ae*(Ve-q.top),text:Be,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:le,eventData:[{data:Ie._input,fullData:Ie,count:_e,category:ce,probability:ve}]}}function D(Y,q,Z){var ee=[];return p.select(Z.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var ae=this;ee.push(O(Y,q,ae))}),ee}function B(Y,q,Z){Y._fullLayout._calcInverseTransform(Y);var ee=Y._fullLayout._invScaleX,ae=Y._fullLayout._invScaleY,he=Z.getBoundingClientRect(),xe=p.select(Z).datum(),we=xe.categoryViewModel,Me=we.parcatsViewModel,Se=Me.model.dimensions[we.model.dimensionInd],Ie=Me.trace,Ve=he.y+he.height/2,Ge,ke;Me.dimensions.length>1&&Se.displayInd===Me.dimensions.length-1?(Ge=he.left,ke="left"):(Ge=he.left+he.width,ke="right");var _e=we.model.categoryLabel,ce=xe.parcatsViewModel.model.count,ve=0;xe.categoryViewModel.bands.forEach(function($t){$t.color===xe.color&&(ve+=$t.count)});var le=we.model.count,Ae=0;Me.pathSelection.each(function($t){$t.model.color===xe.color&&(Ae+=$t.model.count)});var Be=ve/ce,Xe=ve/Ae,Ye=ve/le,yt={countLabel:ve,categoryLabel:_e,probabilityLabel:Be.toFixed(3)},gt=[];we.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&>.push(["Count:",yt.countLabel].join(" ")),we.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(gt.push("P(color \u2229 "+_e+"): "+yt.probabilityLabel),gt.push("P("+_e+" | color): "+Xe.toFixed(3)),gt.push("P(color | "+_e+"): "+Ye.toFixed(3)));var Tt=gt.join("
"),At=k.mostReadable(xe.color);return{trace:Ie,x:ee*(Ge-q.left),y:ae*(Ve-q.top),text:Tt,color:xe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:At,fontSize:10,idealAlign:ke,hovertemplate:Ie.hovertemplate,hovertemplateLabels:yt,eventData:[{data:Ie._input,fullData:Ie,category:_e,count:ce,probability:Be,categorycount:le,colorcount:Ae,bandcolorcount:ve}]}}function F(Y){if(!Y.parcatsViewModel.dragDimension&&Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var q=p.mouse(this)[1];if(q<-1)return;var Z=Y.parcatsViewModel.graphDiv,ee=Z._fullLayout,ae=ee._paperdiv.node().getBoundingClientRect(),he=Y.parcatsViewModel.hoveron,xe=this;if(he==="color"?(x(xe),I(xe,"plotly_hover",p.event)):(A(xe),z(xe,"plotly_hover",p.event)),Y.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var we;he==="category"?we=O(Z,ae,xe):he==="color"?we=B(Z,ae,xe):he==="dimension"&&(we=D(Z,ae,xe)),we&&l.loneHover(we,{container:ee._hoverlayer.node(),outerContainer:ee._paper.node(),gd:Z})}}}function P(Y){var q=Y.parcatsViewModel;if(!q.dragDimension&&(S(q.pathSelection),_(q.dimensionSelection.selectAll("g.category")),f(q.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),l.loneUnhover(q.graphDiv._fullLayout._hoverlayer.node()),q.pathSelection.sort(c),q.hoverinfoItems.indexOf("skip")===-1)){var Z=Y.parcatsViewModel.hoveron,ee=this;Z==="color"?I(ee,"plotly_unhover",p.event):z(ee,"plotly_unhover",p.event)}}function j(Y){Y.parcatsViewModel.arrangement!=="fixed"&&(Y.dragDimensionDisplayInd=Y.model.displayInd,Y.initialDragDimensionDisplayInds=Y.parcatsViewModel.model.dimensions.map(function(q){return q.displayInd}),Y.dragHasMoved=!1,Y.dragCategoryDisplayInd=null,p.select(this).selectAll("g.category").select("rect.catrect").each(function(q){var Z=p.mouse(this)[0],ee=p.mouse(this)[1];-2<=Z&&Z<=q.width+2&&-2<=ee&&ee<=q.height+2&&(Y.dragCategoryDisplayInd=q.model.displayInd,Y.initialDragCategoryDisplayInds=Y.model.categories.map(function(ae){return ae.displayInd}),q.model.dragY=q.y,e.raiseToTop(this.parentNode),p.select(this.parentNode).selectAll("rect.bandrect").each(function(ae){ae.yIe.y+Ie.height/2&&(he.model.displayInd=Ie.model.displayInd,Ie.model.displayInd=we),Y.dragCategoryDisplayInd=he.model.displayInd}if(Y.dragCategoryDisplayInd===null||Y.parcatsViewModel.arrangement==="freeform"){ae.model.dragX=p.event.x;var Ve=Y.parcatsViewModel.dimensions[Z],Ge=Y.parcatsViewModel.dimensions[ee];Ve!==void 0&&ae.model.dragXGe.x&&(ae.model.displayInd=Ge.model.displayInd,Ge.model.displayInd=Y.dragDimensionDisplayInd),Y.dragDimensionDisplayInd=ae.model.displayInd}K(Y.parcatsViewModel),X(Y.parcatsViewModel),ne(Y.parcatsViewModel),re(Y.parcatsViewModel)}}function $(Y){if(Y.parcatsViewModel.arrangement!=="fixed"&&Y.dragDimensionDisplayInd!==null){p.select(this).selectAll("text").attr("font-weight","normal");var q={},Z=Q(Y.parcatsViewModel),ee=Y.parcatsViewModel.model.dimensions.map(function(Ge){return Ge.displayInd}),ae=Y.initialDragDimensionDisplayInds.some(function(Ge,ke){return Ge!==ee[ke]});ae&&ee.forEach(function(Ge,ke){var _e=Y.parcatsViewModel.model.dimensions[ke].containerInd;q["dimensions["+_e+"].displayindex"]=Ge});var he=!1;if(Y.dragCategoryDisplayInd!==null){var xe=Y.model.categories.map(function(Ge){return Ge.displayInd});if(he=Y.initialDragCategoryDisplayInds.some(function(Ge,ke){return Ge!==xe[ke]}),he){var we=Y.model.categories.slice().sort(function(Ge,ke){return Ge.displayInd-ke.displayInd}),Me=we.map(function(Ge){return Ge.categoryValue}),Se=we.map(function(Ge){return Ge.categoryLabel});q["dimensions["+Y.model.containerInd+"].categoryarray"]=[Me],q["dimensions["+Y.model.containerInd+"].ticktext"]=[Se],q["dimensions["+Y.model.containerInd+"].categoryorder"]="array"}}if(Y.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!Y.dragHasMoved&&Y.potentialClickBand&&(Y.parcatsViewModel.hoveron==="color"?I(Y.potentialClickBand,"plotly_click",p.event.sourceEvent):z(Y.potentialClickBand,"plotly_click",p.event.sourceEvent)),Y.model.dragX=null,Y.dragCategoryDisplayInd!==null){var Ie=Y.parcatsViewModel.dimensions[Y.dragDimensionDisplayInd].categories[Y.dragCategoryDisplayInd];Ie.model.dragY=null,Y.dragCategoryDisplayInd=null}Y.dragDimensionDisplayInd=null,Y.parcatsViewModel.dragDimension=null,Y.dragHasMoved=null,Y.potentialClickBand=null,K(Y.parcatsViewModel),X(Y.parcatsViewModel);var Ve=p.transition().duration(300).ease("cubic-in-out");Ve.each(function(){ne(Y.parcatsViewModel,!0),re(Y.parcatsViewModel,!0)}).each("end",function(){(ae||he)&&E.restyle(Y.parcatsViewModel.graphDiv,q,[Z])})}}function Q(Y){for(var q,Z=Y.graphDiv._fullData,ee=0;ee=0;Me--)Se+="C"+xe[Me]+","+(q[Me+1]+ee)+" "+he[Me]+","+(q[Me]+ee)+" "+(Y[Me]+Z[Me])+","+(q[Me]+ee),Se+="l-"+Z[Me]+",0 ";return Se+="Z",Se}function X(Y){var q=Y.dimensions,Z=Y.model,ee=q.map(function(Xt){return Xt.categories.map(function(or){return or.y})}),ae=Y.model.dimensions.map(function(Xt){return Xt.categories.map(function(or){return or.displayInd})}),he=Y.model.dimensions.map(function(Xt){return Xt.displayInd}),xe=Y.dimensions.map(function(Xt){return Xt.model.dimensionInd}),we=q.map(function(Xt){return Xt.x}),Me=q.map(function(Xt){return Xt.width}),Se=[];for(var Ie in Z.paths)Z.paths.hasOwnProperty(Ie)&&Se.push(Z.paths[Ie]);function Ve(Xt){var or=Xt.categoryInds.map(function(vt,ht){return ae[ht][vt]}),Ot=xe.map(function(vt){return or[vt]});return Ot}Se.sort(function(Xt,or){var Ot=Ve(Xt),vt=Ve(or);return Y.sortpaths==="backward"&&(Ot.reverse(),vt.reverse()),Ot.push(Xt.valueInds[0]),vt.push(or.valueInds[0]),Y.bundlecolors&&(Ot.unshift(Xt.rawColor),vt.unshift(or.rawColor)),m(Ot,vt)});for(var Ge=new Array(Se.length),ke=q[0].model.count,_e=q[0].categories.map(function(Xt){return Xt.height}).reduce(function(Xt,or){return Xt+or}),ce=0;ce0?le=_e*(ve.count/ke):le=0;for(var Ae=new Array(ee.length),Be=0;Be1?xe=(Y.width-2*Z-ee)/(ae-1):xe=0,we=Z,Me=we+xe*he;var Se=[],Ie=Y.model.maxCats,Ve=q.categories.length,Ge=8,ke=q.count,_e=Y.height-Ge*(Ie-1),ce,ve,le,Ae,Be,Xe=(Ie-Ve)*Ge/2,Ye=q.categories.map(function(yt){return{displayInd:yt.displayInd,categoryInd:yt.categoryInd}});for(Ye.sort(function(yt,gt){return yt.displayInd-gt.displayInd}),Be=0;Be0?ce=ve.count/ke*_e:ce=0,le={key:ve.valueInds[0],model:ve,width:ee,height:ce,y:ve.dragY!==null?ve.dragY:Xe,bands:[],parcatsViewModel:Y},Xe=Xe+ce+Ge,Se.push(le);return{key:q.dimensionInd,x:q.dragX!==null?q.dragX:Me,y:0,width:ee,model:q,categories:Se,parcatsViewModel:Y,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}}}),MM=ze({"src/traces/parcats/plot.js"(J,V){"use strict";var p=Gq();V.exports=function(E,k,l,e){var t=E._fullLayout,n=t._paper,r=t._size;p(E,n,k,{width:r.w,height:r.h,margin:{t:r.t,r:r.r,b:r.b,l:r.l}},l,e)}}}),Hq=ze({"src/traces/parcats/base_plot.js"(J){"use strict";var V=zf().getModuleCalcData,p=MM(),b="parcats";J.name=b,J.plot=function(E,k,l,e){var t=V(E.calcdata,b);if(t.length){var n=t[0];p(E,n,l,e)}},J.clean=function(E,k,l,e){var t=e._has&&e._has("parcats"),n=k._has&&k._has("parcats");t&&!n&&e._paperdiv.selectAll(".parcats").remove()}}}),Wq=ze({"src/traces/parcats/index.js"(J,V){"use strict";V.exports={attributes:AM(),supplyDefaults:qq(),calc:Vq(),plot:MM(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:Hq(),categories:["noOpacity"],meta:{}}}}),Yq=ze({"lib/parcats.js"(J,V){"use strict";V.exports=Wq()}}),Xq=ze({"src/plots/map/styles/arcgis-sat-hybrid.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} @@ -2707,10 +2705,10 @@ void main() { {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} -{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),Kj=De({"src/plots/map/styles/arcgis-sat.js"(j,N){"use strict";N.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),lp=De({"src/plots/map/constants.js"(j,N){"use strict";var u=(Ap(),ts(Uv)).default,v=$j(),w=Kj(),S='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",i={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:w,"satellite-streets":v,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:S,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":a,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":n},s=u(i);N.exports={styleValueDflt:"basic",stylesMap:i,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` -`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),Sg=De({"src/plots/map/layout_attributes.js"(j,N){"use strict";var u=Ar(),v=ii().defaultLine,w=ql().attributes,S=Ml(),l=bu().textposition,e=Ul().overrideAll,t=ws().templatedArray,a=lp(),r=S({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var n=N.exports=e({_arrayAttrRegexps:[u.counterRegex("map",".layers",!0)],domain:w({name:"map"}),style:{valType:"any",values:a.styleValuesMap,dflt:a.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:v},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:v}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:r,textposition:u.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");n.uirevision={valType:"any",editType:"none"}}}),Kb=De({"src/traces/scattermap/attributes.js"(j,N){"use strict";var{hovertemplateAttrs:u,texttemplateAttrs:v,templatefallbackAttrs:w}=Is(),S=Cd(),l=Bm(),e=bu(),t=Sg(),a=Bs(),r=ul(),n=Ji().extendFlat,i=Ul().overrideAll,s=Sg(),c=l.line,p=l.marker;N.exports=i({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:n({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:n({},p.opacity,{dflt:1})},mode:n({},e.mode,{dflt:"markers"}),text:n({},e.text,{}),texttemplate:v({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:w({editType:"plot"}),hovertext:n({},e.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:e.connectgaps,marker:n({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:p.opacity,size:p.size,sizeref:p.sizeref,sizemin:p.sizemin,sizemode:p.sizemode},r("marker")),fill:l.fill,fillcolor:S(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:n({},a.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:u(),hovertemplatefallback:w()},"calc","nested")}}),c6=De({"src/traces/scattermap/constants.js"(j,N){"use strict";var u=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];N.exports={isSupportedFont:function(v){return u.indexOf(v)!==-1}}}}),Jj=De({"src/traces/scattermap/defaults.js"(j,N){"use strict";var u=Ar(),v=Sl(),w=Jh(),S=cd(),l=fd(),e=Ld(),t=Kb(),a=c6().isSupportedFont;N.exports=function(i,s,c,p){function f(b,_){return u.coerce(i,s,t,b,_)}function d(b,_){return u.coerce2(i,s,t,b,_)}var y=r(i,s,f);if(!y){s.visible=!1;return}if(f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext"),f("hovertemplate"),f("hovertemplatefallback"),f("mode"),f("below"),v.hasMarkers(s)){w(i,s,c,p,f,{noLine:!0,noAngle:!0}),f("marker.allowoverlap"),f("marker.angle");var o=s.marker;o.symbol!=="circle"&&(u.isArrayOrTypedArray(o.size)&&(o.size=o.size[0]),u.isArrayOrTypedArray(o.color)&&(o.color=o.color[0]))}v.hasLines(s)&&(S(i,s,c,p,f,{noDash:!0}),f("connectgaps"));var x=d("cluster.maxzoom"),M=d("cluster.step"),T=d("cluster.color",s.marker&&s.marker.color||c),E=d("cluster.size"),g=d("cluster.opacity"),A=x!==!1||M!==!1||T!==!1||E!==!1||g!==!1,m=f("cluster.enabled",A);if(m||v.hasText(s)){var h=p.font.family;l(i,s,p,f,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:a(h)?h:"Open Sans Regular",weight:p.font.weight,style:p.font.style,size:p.font.size,color:p.font.color}})}f("fill"),s.fill!=="none"&&e(i,s,c,f),u.coerceSelectionMarkerOpacity(s,f)};function r(n,i,s){var c=s("lon")||[],p=s("lat")||[],f=Math.min(c.length,p.length);return i._length=f,f}}}),f6=De({"src/traces/scattermap/format_labels.js"(j,N){"use strict";var u=Vi();N.exports=function(w,S,l){var e={},t=l[S.subplot]._subplot,a=t.mockAxis,r=w.lonlat;return e.lonLabel=u.tickText(a,a.c2l(r[0]),!0).text,e.latLabel=u.tickText(a,a.c2l(r[1]),!0).text,e}}}),h6=De({"src/plots/map/convert_text_opts.js"(j,N){"use strict";var u=Ar();N.exports=function(w,S){var l=w.split(" "),e=l[0],t=l[1],a=u.isArrayOrTypedArray(S)?u.mean(S):S,r=.5+a/100,n=1.5+a/100,i=["",""],s=[0,0];switch(e){case"top":i[0]="top",s[1]=-n;break;case"bottom":i[0]="bottom",s[1]=n;break}switch(t){case"left":i[1]="right",s[0]=-r;break;case"right":i[1]="left",s[0]=r;break}var c;return i[0]&&i[1]?c=i.join("-"):i[0]?c=i[0]:i[1]?c=i[1]:c="center",{anchor:c,offset:s}}}}),Qj=De({"src/traces/scattermap/convert.js"(j,N){"use strict";var u=io(),v=Ar(),w=Ho().BADNUM,S=mg(),l=Dl(),e=Ki(),t=w1(),a=Sl(),r=c6().isSupportedFont,n=h6(),i=Ch().appendArrayPointValue,s=Xs().NEWLINES,c=Xs().BR_TAG_ALL;N.exports=function(g,A){var m=A[0].trace,h=m.visible===!0&&m._length!==0,b=m.fill!=="none",_=a.hasLines(m),I=a.hasMarkers(m),C=a.hasText(m),F=I&&m.marker.symbol==="circle",R=I&&m.marker.symbol!=="circle",z=m.cluster&&m.cluster.enabled,D=p("fill"),k=p("line"),B=p("circle"),O=p("symbol"),q={fill:D,line:k,circle:B,symbol:O};if(!h)return q;var Y;if((b||_)&&(Y=S.calcTraceToLineCoords(A)),b&&(D.geojson=S.makePolygon(Y),D.layout.visibility="visible",v.extendFlat(D.paint,{"fill-color":m.fillcolor})),_&&(k.geojson=S.makeLine(Y),k.layout.visibility="visible",v.extendFlat(k.paint,{"line-width":m.line.width,"line-color":m.line.color,"line-opacity":m.opacity})),F){var ee=f(A);B.geojson=ee.geojson,B.layout.visibility="visible",z&&(B.filter=["!",["has","point_count"]],q.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":M(m.cluster.color,m.cluster.step),"circle-radius":M(m.cluster.size,m.cluster.step),"circle-opacity":M(m.cluster.opacity,m.cluster.step)}},q.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":T(m),"text-size":12}}),v.extendFlat(B.paint,{"circle-color":ee.mcc,"circle-radius":ee.mrc,"circle-opacity":ee.mo})}if(F&&z&&(B.filter=["!",["has","point_count"]]),(R||C)&&(O.geojson=d(A,g),v.extendFlat(O.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),R&&(v.extendFlat(O.layout,{"icon-size":m.marker.size/10}),"angle"in m.marker&&m.marker.angle!=="auto"&&v.extendFlat(O.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),O.layout["icon-allow-overlap"]=m.marker.allowoverlap,v.extendFlat(O.paint,{"icon-opacity":m.opacity*m.marker.opacity,"icon-color":m.marker.color,"icon-halo-color":m.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),C)){var te=(m.marker||{}).size,ae=n(m.textposition,te);v.extendFlat(O.layout,{"text-size":m.textfont.size,"text-anchor":ae.anchor,"text-offset":ae.offset,"text-font":T(m)}),v.extendFlat(O.paint,{"text-color":m.textfont.color,"text-opacity":m.opacity})}return q};function p(E){return{type:E,geojson:S.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function f(E){var g=E[0].trace,A=g.marker,m=g.selectedpoints,h=v.isArrayOrTypedArray(A.color),b=v.isArrayOrTypedArray(A.size),_=v.isArrayOrTypedArray(A.opacity),I;function C(te){return g.opacity*te}function F(te){return te/2}var R;h&&(l.hasColorscale(g,"marker")?R=l.makeColorScaleFuncFromTrace(A):R=v.identity);var z;b&&(z=t(g));var D;_&&(D=function(te){var ae=u(te)?+v.constrain(te,0,1):0;return C(ae)});var k=[];for(I=0;I850?I+=" Black":h>750?I+=" Extra Bold":h>650?I+=" Bold":h>550?I+=" Semi Bold":h>450?I+=" Medium":h>350?I+=" Regular":h>250?I+=" Light":h>150?I+=" Extra Light":I+=" Thin"):b.slice(0,2).join(" ")==="Open Sans"?(I="Open Sans",h>750?I+=" Extrabold":h>650?I+=" Bold":h>550?I+=" Semibold":h>350?I+=" Regular":I+=" Light"):b.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(I="Klokantech Noto Sans",b[3]==="CJK"&&(I+=" CJK"),I+=h>500?" Bold":" Regular")),_&&(I+=" Italic"),I==="Open Sans Regular Italic"?I="Open Sans Italic":I==="Open Sans Regular Bold"?I="Open Sans Bold":I==="Open Sans Regular Bold Italic"?I="Open Sans Bold Italic":I==="Klokantech Noto Sans Regular Italic"&&(I="Klokantech Noto Sans Italic"),r(I)||(I=A);var C=I.split(", ");return C}}}),eU=De({"src/traces/scattermap/plot.js"(j,N){"use strict";var u=Ar(),v=Qj(),w=lp().traceLayerPrefix,S={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,a,r,n){this.type="scattermap",this.subplot=t,this.uid=a,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+a+"-fill",line:"source-"+a+"-line",circle:"source-"+a+"-circle",symbol:"source-"+a+"-symbol",cluster:"source-"+a+"-circle",clusterCount:"source-"+a+"-circle"},this.layerIds={fill:w+a+"-fill",line:w+a+"-line",circle:w+a+"-circle",symbol:w+a+"-symbol",cluster:w+a+"-cluster",clusterCount:w+a+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,a,r){var n={type:"geojson",data:a.geojson};r&&r.enabled&&u.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var i=this.subplot.map.getSource(this.sourceIds[t]);i?i.setData(a.geojson):this.subplot.map.addSource(this.sourceIds[t],n)},e.setSourceData=function(t,a){this.subplot.map.getSource(this.sourceIds[t]).setData(a.geojson)},e.addLayer=function(t,a,r){var n={type:a.type,id:this.layerIds[t],source:this.sourceIds[t],layout:a.layout,paint:a.paint};a.filter&&(n.filter=a.filter);for(var i=this.layerIds[t],s,c=this.subplot.getMapLayers(),p=0;p=0;_--){var I=b[_];i.removeLayer(d.layerIds[I])}h||i.removeSource(d.sourceIds.circle)}function x(h){for(var b=S.nonCluster,_=0;_=0;_--){var I=b[_];i.removeLayer(d.layerIds[I]),h||i.removeSource(d.sourceIds[I])}}function T(h){f?o(h):M(h)}function E(h){p?y(h):x(h)}function g(){for(var h=p?S.cluster:S.nonCluster,b=0;b=0;n--){var i=r[n];a.removeLayer(this.layerIds[i]),a.removeSource(this.sourceIds[i])}},N.exports=function(a,r){var n=r[0].trace,i=n.cluster&&n.cluster.enabled,s=n.visible!==!0,c=new l(a,n.uid,i,s),p=v(a.gd,r),f=c.below=a.belowLookup["trace-"+n.uid],d,y,o;if(i)for(c.addSource("circle",p.circle,n.cluster),d=0;d=0?Math.floor((n+180)/360):Math.ceil((n-180)/360),E=T*360,g=n-E;function A(z){var D=z.lonlat;if(D[0]===l||x&&y.indexOf(z.i+1)===-1)return 1/0;var k=v.modHalf(D[0],360),B=D[1],O=d.project([k,B]),q=O.x-p.c2p([g,B]),Y=O.y-f.c2p([k,i]),ee=Math.max(3,z.mrc||0);return Math.max(Math.sqrt(q*q+Y*Y)-ee,1-3/ee)}if(u.getClosest(s,A,r),r.index!==!1){var m=s[r.index],h=m.lonlat,b=[v.modHalf(h[0],360)+E,h[1]],_=p.c2p(b),I=f.c2p(b),C=m.mrc||1;r.x0=_-C,r.x1=_+C,r.y0=I-C,r.y1=I+C;var F={};F[c.subplot]={_subplot:d};var R=c._module.formatLabels(m,c,F);return r.lonLabel=R.lonLabel,r.latLabel=R.latLabel,r.color=w(c,m),r.extraText=a(c,m,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function a(r,n,i){if(r.hovertemplate)return;var s=n.hi||r.hoverinfo,c=s.split("+"),p=c.indexOf("all")!==-1,f=c.indexOf("lon")!==-1,d=c.indexOf("lat")!==-1,y=n.lonlat,o=[];function x(M){return M+"\xB0"}return p||f&&d?o.push("("+x(y[1])+", "+x(y[0])+")"):f?o.push(i.lon+x(y[0])):d&&o.push(i.lat+x(y[1])),(p||c.indexOf("text")!==-1)&&S(n,r,o),o.join("
")}N.exports={hoverPoints:t,getExtraText:a}}}),tU=De({"src/traces/scattermap/event_data.js"(j,N){"use strict";N.exports=function(v,w){return v.lon=w.lon,v.lat=w.lat,v}}}),rU=De({"src/traces/scattermap/select.js"(j,N){"use strict";var u=Ar(),v=Sl(),w=Ho().BADNUM;N.exports=function(l,e){var t=l.cd,a=l.xaxis,r=l.yaxis,n=[],i=t[0].trace,s;if(!v.hasMarkers(i))return[];if(e===!1)for(s=0;s1)return 1;for(var W=G,se=0;se<8;se++){var ge=this.sampleCurveX(W)-G;if(Math.abs(ge)ge?Pe=W:Ye=W,W=.5*(Ye-Pe)+Pe;return W},solve:function(G,P){return this.sampleCurveY(this.solveCurveX(G,P))}};var c=t(i);let p,f;function d(){return p==null&&(p=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),p}function y(){if(f==null&&(f=!1,d())){let P=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(P){for(let se=0;se<5*5;se++){let ge=4*se;P.fillStyle=`rgb(${ge},${ge+1},${ge+2})`,P.fillRect(se%5,Math.floor(se/5),1,1)}let W=P.getImageData(0,0,5,5).data;for(let se=0;se<5*5*4;se++)if(se%4!=3&&W[se]!==se){f=!0;break}}}return f||!1}function o(G,P,W,se){let ge=new c(G,P,W,se);return ke=>ge.solve(ke)}let x=o(.25,.1,.25,1);function M(G,P,W){return Math.min(W,Math.max(P,G))}function T(G,P,W){let se=W-P,ge=((G-P)%se+se)%se+P;return ge===P?W:ge}function E(G,...P){for(let W of P)for(let se in W)G[se]=W[se];return G}let g=1;function A(G,P,W){let se={};for(let ge in G)se[ge]=P.call(this,G[ge],ge,G);return se}function m(G,P,W){let se={};for(let ge in G)P.call(this,G[ge],ge,G)&&(se[ge]=G[ge]);return se}function h(G){return Array.isArray(G)?G.map(h):typeof G=="object"&&G?A(G,h):G}let b={};function _(G){b[G]||(typeof console<"u"&&console.warn(G),b[G]=!0)}function I(G,P,W){return(W.y-G.y)*(P.x-G.x)>(P.y-G.y)*(W.x-G.x)}function C(G){return typeof WorkerGlobalScope<"u"&&G!==void 0&&G instanceof WorkerGlobalScope}let F=null;function R(G){return typeof ImageBitmap<"u"&&G instanceof ImageBitmap}let z="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function D(G,P,W,se,ge){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let ke=new VideoFrame(G,{timestamp:0});try{let Pe=ke?.format;if(!Pe||!Pe.startsWith("BGR")&&!Pe.startsWith("RGB"))throw new Error(`Unrecognized format ${Pe}`);let Ye=Pe.startsWith("BGR"),at=new Uint8ClampedArray(se*ge*4);if(yield ke.copyTo(at,function(pt,Et,Vt,er,sr){let xr=4*Math.max(-Et,0),Er=(Math.max(0,Vt)-Vt)*er*4+xr,Qr=4*er,la=Math.max(0,Et),Ka=Math.max(0,Vt);return{rect:{x:la,y:Ka,width:Math.min(pt.width,Et+er)-la,height:Math.min(pt.height,Vt+sr)-Ka},layout:[{offset:Er,stride:Qr}]}}(G,P,W,se,ge)),Ye)for(let pt=0;ptC(self)?self.worker&&self.worker.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href,H=function(G,P){if(/:\/\//.test(G.url)&&!/^https?:|^file:/.test(G.url)){let se=ee(G.url);if(se)return se(G,P);if(C(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,targetMapId:te},P)}if(!(/^file:/.test(W=G.url)||/^file:/.test(U())&&!/^\w+:/.test(W))){if(fetch&&Request&&AbortController&&Object.prototype.hasOwnProperty.call(Request.prototype,"signal"))return function(se,ge){return e(this,void 0,void 0,function*(){let ke=new Request(se.url,{method:se.method||"GET",body:se.body,credentials:se.credentials,headers:se.headers,cache:se.cache,referrer:U(),signal:ge.signal});se.type!=="json"||ke.headers.has("Accept")||ke.headers.set("Accept","application/json");let Pe=yield fetch(ke);if(!Pe.ok){let pt=yield Pe.blob();throw new ae(Pe.status,Pe.statusText,se.url,pt)}let Ye;Ye=se.type==="arrayBuffer"||se.type==="image"?Pe.arrayBuffer():se.type==="json"?Pe.json():Pe.text();let at=yield Ye;if(ge.signal.aborted)throw q();return{data:at,cacheControl:Pe.headers.get("Cache-Control"),expires:Pe.headers.get("Expires")}})}(G,P);if(C(self)&&self.worker&&self.worker.actor)return self.worker.actor.sendAsync({type:"GR",data:G,mustQueue:!0,targetMapId:te},P)}var W;return function(se,ge){return new Promise((ke,Pe)=>{var Ye;let at=new XMLHttpRequest;at.open(se.method||"GET",se.url,!0),se.type!=="arrayBuffer"&&se.type!=="image"||(at.responseType="arraybuffer");for(let pt in se.headers)at.setRequestHeader(pt,se.headers[pt]);se.type==="json"&&(at.responseType="text",!((Ye=se.headers)===null||Ye===void 0)&&Ye.Accept||at.setRequestHeader("Accept","application/json")),at.withCredentials=se.credentials==="include",at.onerror=()=>{Pe(new Error(at.statusText))},at.onload=()=>{if(!ge.signal.aborted)if((at.status>=200&&at.status<300||at.status===0)&&at.response!==null){let pt=at.response;if(se.type==="json")try{pt=JSON.parse(at.response)}catch(Et){return void Pe(Et)}ke({data:pt,cacheControl:at.getResponseHeader("Cache-Control"),expires:at.getResponseHeader("Expires")})}else{let pt=new Blob([at.response],{type:at.getResponseHeader("Content-Type")});Pe(new ae(at.status,at.statusText,se.url,pt))}},ge.signal.addEventListener("abort",()=>{at.abort(),Pe(q())}),at.send(se.body)})}(G,P)};function K(G){if(!G||G.indexOf("://")<=0||G.indexOf("data:image/")===0||G.indexOf("blob:")===0)return!0;let P=new URL(G),W=window.location;return P.protocol===W.protocol&&P.host===W.host}function V(G,P,W){W[G]&&W[G].indexOf(P)!==-1||(W[G]=W[G]||[],W[G].push(P))}function $(G,P,W){if(W&&W[G]){let se=W[G].indexOf(P);se!==-1&&W[G].splice(se,1)}}class X{constructor(P,W={}){E(this,W),this.type=P}}class Z extends X{constructor(P,W={}){super("error",E({error:P},W))}}class Q{on(P,W){return this._listeners=this._listeners||{},V(P,W,this._listeners),this}off(P,W){return $(P,W,this._listeners),$(P,W,this._oneTimeListeners),this}once(P,W){return W?(this._oneTimeListeners=this._oneTimeListeners||{},V(P,W,this._oneTimeListeners),this):new Promise(se=>this.once(P,se))}fire(P,W){typeof P=="string"&&(P=new X(P,W||{}));let se=P.type;if(this.listens(se)){P.target=this;let ge=this._listeners&&this._listeners[se]?this._listeners[se].slice():[];for(let Ye of ge)Ye.call(this,P);let ke=this._oneTimeListeners&&this._oneTimeListeners[se]?this._oneTimeListeners[se].slice():[];for(let Ye of ke)$(se,Ye,this._oneTimeListeners),Ye.call(this,P);let Pe=this._eventedParent;Pe&&(E(P,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Pe.fire(P))}else P instanceof Z&&console.error(P.error);return this}listens(P){return this._listeners&&this._listeners[P]&&this._listeners[P].length>0||this._oneTimeListeners&&this._oneTimeListeners[P]&&this._oneTimeListeners[P].length>0||this._eventedParent&&this._eventedParent.listens(P)}setEventedParent(P,W){return this._eventedParent=P,this._eventedParentData=W,this}}var re={$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"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"enum",default:"mercator",values:{mercator:{},globe:{}}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}};let ce=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function me(G,P){let W={};for(let se in G)se!=="ref"&&(W[se]=G[se]);return ce.forEach(se=>{se in P&&(W[se]=P[se])}),W}function ye(G,P){if(Array.isArray(G)){if(!Array.isArray(P)||G.length!==P.length)return!1;for(let W=0;W`:G.itemType.kind==="value"?"array":`array<${P}>`}return G.kind}let ve=[Ve,je,ut,st,yt,vr,At,Ee(Pt),Nt,Kt,nt];function _e(G,P){if(P.kind==="error")return null;if(G.kind==="array"){if(P.kind==="array"&&(P.N===0&&P.itemType.kind==="value"||!_e(G.itemType,P.itemType))&&(typeof G.N!="number"||G.N===P.N))return null}else{if(G.kind===P.kind)return null;if(G.kind==="value"){for(let W of ve)if(!_e(W,P))return null}}return`Expected ${ze(G)} but found ${ze(P)} instead.`}function Ie(G,P){return P.some(W=>W.kind===G.kind)}function Be(G,P){return P.some(W=>W==="null"?G===null:W==="array"?Array.isArray(G):W==="object"?G&&!Array.isArray(G)&&typeof G=="object":W===typeof G)}function We(G,P){return G.kind==="array"&&P.kind==="array"?G.itemType.kind===P.itemType.kind&&typeof G.N=="number":G.kind===P.kind}let Xe=.96422,mt=.82521,ft=4/29,ht=6/29,gt=3*ht*ht,_t=ht*ht*ht,Ft=Math.PI/180,St=180/Math.PI;function hr(G){return(G%=360)<0&&(G+=360),G}function jr([G,P,W,se]){let ge,ke,Pe=$r((.2225045*(G=ra(G))+.7168786*(P=ra(P))+.0606169*(W=ra(W)))/1);G===P&&P===W?ge=ke=Pe:(ge=$r((.4360747*G+.3850649*P+.1430804*W)/Xe),ke=$r((.0139322*G+.0971045*P+.7141733*W)/mt));let Ye=116*Pe-16;return[Ye<0?0:Ye,500*(ge-Pe),200*(Pe-ke),se]}function ra(G){return G<=.04045?G/12.92:Math.pow((G+.055)/1.055,2.4)}function $r(G){return G>_t?Math.pow(G,1/3):G/gt+ft}function pa([G,P,W,se]){let ge=(G+16)/116,ke=isNaN(P)?ge:ge+P/500,Pe=isNaN(W)?ge:ge-W/200;return ge=1*aa(ge),ke=Xe*aa(ke),Pe=mt*aa(Pe),[oa(3.1338561*ke-1.6168667*ge-.4906146*Pe),oa(-.9787684*ke+1.9161415*ge+.033454*Pe),oa(.0719453*ke-.2289914*ge+1.4052427*Pe),se]}function oa(G){return(G=G<=.00304?12.92*G:1.055*Math.pow(G,1/2.4)-.055)<0?0:G>1?1:G}function aa(G){return G>ht?G*G*G:gt*(G-ft)}function ka(G){return parseInt(G.padEnd(2,G),16)/255}function Ta(G,P){return Da(P?G/100:G,0,1)}function Da(G,P,W){return Math.min(Math.max(P,G),W)}function La(G){return!G.some(Number.isNaN)}let Ga={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]};class xa{constructor(P,W,se,ge=1,ke=!0){this.r=P,this.g=W,this.b=se,this.a=ge,ke||(this.r*=ge,this.g*=ge,this.b*=ge,ge||this.overwriteGetter("rgb",[P,W,se,ge]))}static parse(P){if(P instanceof xa)return P;if(typeof P!="string")return;let W=function(se){if((se=se.toLowerCase().trim())==="transparent")return[0,0,0,0];let ge=Ga[se];if(ge){let[Pe,Ye,at]=ge;return[Pe/255,Ye/255,at/255,1]}if(se.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(se)){let Pe=se.length<6?1:2,Ye=1;return[ka(se.slice(Ye,Ye+=Pe)),ka(se.slice(Ye,Ye+=Pe)),ka(se.slice(Ye,Ye+=Pe)),ka(se.slice(Ye,Ye+Pe)||"ff")]}if(se.startsWith("rgb")){let Pe=se.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(Pe){let[Ye,at,pt,Et,Vt,er,sr,xr,Er,Qr,la,Ka]=Pe,Ma=[Et||" ",sr||" ",Qr].join("");if(Ma===" "||Ma===" /"||Ma===",,"||Ma===",,,"){let qa=[pt,er,Er].join(""),bn=qa==="%%%"?100:qa===""?255:0;if(bn){let ei=[Da(+at/bn,0,1),Da(+Vt/bn,0,1),Da(+xr/bn,0,1),la?Ta(+la,Ka):1];if(La(ei))return ei}}return}}let ke=se.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ke){let[Pe,Ye,at,pt,Et,Vt,er,sr,xr]=ke,Er=[at||" ",Et||" ",er].join("");if(Er===" "||Er===" /"||Er===",,"||Er===",,,"){let Qr=[+Ye,Da(+pt,0,100),Da(+Vt,0,100),sr?Ta(+sr,xr):1];if(La(Qr))return function([la,Ka,Ma,qa]){function bn(ei){let Ri=(ei+la/30)%12,To=Ka*Math.min(Ma,1-Ma);return Ma-To*Math.max(-1,Math.min(Ri-3,9-Ri,1))}return la=hr(la),Ka/=100,Ma/=100,[bn(0),bn(8),bn(4),qa]}(Qr)}}}(P);return W?new xa(...W,!1):void 0}get rgb(){let{r:P,g:W,b:se,a:ge}=this,ke=ge||1/0;return this.overwriteGetter("rgb",[P/ke,W/ke,se/ke,ge])}get hcl(){return this.overwriteGetter("hcl",function(P){let[W,se,ge,ke]=jr(P),Pe=Math.sqrt(se*se+ge*ge);return[Math.round(1e4*Pe)?hr(Math.atan2(ge,se)*St):NaN,Pe,W,ke]}(this.rgb))}get lab(){return this.overwriteGetter("lab",jr(this.rgb))}overwriteGetter(P,W){return Object.defineProperty(this,P,{value:W}),W}toString(){let[P,W,se,ge]=this.rgb;return`rgba(${[P,W,se].map(ke=>Math.round(255*ke)).join(",")},${ge})`}}xa.black=new xa(0,0,0,1),xa.white=new xa(1,1,1,1),xa.transparent=new xa(0,0,0,0),xa.red=new xa(1,0,0,1);class Gn{constructor(P,W,se){this.sensitivity=P?W?"variant":"case":W?"accent":"base",this.locale=se,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(P,W){return this.collator.compare(P,W)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}class Pn{constructor(P,W,se,ge,ke){this.text=P,this.image=W,this.scale=se,this.fontStack=ge,this.textColor=ke}}class sn{constructor(P){this.sections=P}static fromString(P){return new sn([new Pn(P,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(P=>P.text.length!==0||P.image&&P.image.name.length!==0)}static factory(P){return P instanceof sn?P:sn.fromString(P)}toString(){return this.sections.length===0?"":this.sections.map(P=>P.text).join("")}}class Yn{constructor(P){this.values=P.slice()}static parse(P){if(P instanceof Yn)return P;if(typeof P=="number")return new Yn([P,P,P,P]);if(Array.isArray(P)&&!(P.length<1||P.length>4)){for(let W of P)if(typeof W!="number")return;switch(P.length){case 1:P=[P[0],P[0],P[0],P[0]];break;case 2:P=[P[0],P[1],P[0],P[1]];break;case 3:P=[P[0],P[1],P[2],P[1]]}return new Yn(P)}}toString(){return JSON.stringify(this.values)}}let Zn=new Set(["center","left","right","top","bottom","top-left","top-right","bottom-left","bottom-right"]);class vi{constructor(P){this.values=P.slice()}static parse(P){if(P instanceof vi)return P;if(Array.isArray(P)&&!(P.length<1)&&P.length%2==0){for(let W=0;W=0&&G<=255&&typeof P=="number"&&P>=0&&P<=255&&typeof W=="number"&&W>=0&&W<=255?se===void 0||typeof se=="number"&&se>=0&&se<=1?null:`Invalid rgba value [${[G,P,W,se].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof se=="number"?[G,P,W,se]:[G,P,W]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function on(G){if(G===null||typeof G=="string"||typeof G=="boolean"||typeof G=="number"||G instanceof xa||G instanceof Gn||G instanceof sn||G instanceof Yn||G instanceof vi||G instanceof Dn)return!0;if(Array.isArray(G)){for(let P of G)if(!on(P))return!1;return!0}if(typeof G=="object"){for(let P in G)if(!on(G[P]))return!1;return!0}return!1}function mn(G){if(G===null)return Ve;if(typeof G=="string")return ut;if(typeof G=="boolean")return st;if(typeof G=="number")return je;if(G instanceof xa)return yt;if(G instanceof Gn)return Zt;if(G instanceof sn)return vr;if(G instanceof Yn)return Nt;if(G instanceof vi)return nt;if(G instanceof Dn)return Kt;if(Array.isArray(G)){let P=G.length,W;for(let se of G){let ge=mn(se);if(W){if(W===ge)continue;W=Pt;break}W=ge}return Ee(W||Pt,P)}return At}function bi(G){let P=typeof G;return G===null?"":P==="string"||P==="number"||P==="boolean"?String(G):G instanceof xa||G instanceof sn||G instanceof Yn||G instanceof vi||G instanceof Dn?G.toString():JSON.stringify(G)}class Li{constructor(P,W){this.type=P,this.value=W}static parse(P,W){if(P.length!==2)return W.error(`'literal' expression requires exactly one argument, but found ${P.length-1} instead.`);if(!on(P[1]))return W.error("invalid value");let se=P[1],ge=mn(se),ke=W.expectedType;return ge.kind!=="array"||ge.N!==0||!ke||ke.kind!=="array"||typeof ke.N=="number"&&ke.N!==0||(ge=ke),new Li(ge,se)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}class $a{constructor(P){this.name="ExpressionEvaluationError",this.message=P}toJSON(){return this.message}}let Va={string:ut,number:je,boolean:st,object:At};class it{constructor(P,W){this.type=P,this.args=W}static parse(P,W){if(P.length<2)return W.error("Expected at least one argument.");let se,ge=1,ke=P[0];if(ke==="array"){let Ye,at;if(P.length>2){let pt=P[1];if(typeof pt!="string"||!(pt in Va)||pt==="object")return W.error('The item type argument of "array" must be one of string, number, boolean',1);Ye=Va[pt],ge++}else Ye=Pt;if(P.length>3){if(P[2]!==null&&(typeof P[2]!="number"||P[2]<0||P[2]!==Math.floor(P[2])))return W.error('The length argument to "array" must be a positive integer literal',2);at=P[2],ge++}se=Ee(Ye,at)}else{if(!Va[ke])throw new Error(`Types doesn't contain name = ${ke}`);se=Va[ke]}let Pe=[];for(;geP.outputDefined())}}let Qe={"to-boolean":st,"to-color":yt,"to-number":je,"to-string":ut};class Jt{constructor(P,W){this.type=P,this.args=W}static parse(P,W){if(P.length<2)return W.error("Expected at least one argument.");let se=P[0];if(!Qe[se])throw new Error(`Can't parse ${se} as it is not part of the known types`);if((se==="to-boolean"||se==="to-string")&&P.length!==2)return W.error("Expected one argument.");let ge=Qe[se],ke=[];for(let Pe=1;Pe4?`Invalid rbga value ${JSON.stringify(W)}: expected an array containing either three or four numeric values.`:oi(W[0],W[1],W[2],W[3]),!se))return new xa(W[0]/255,W[1]/255,W[2]/255,W[3])}throw new $a(se||`Could not parse color from value '${typeof W=="string"?W:JSON.stringify(W)}'`)}case"padding":{let W;for(let se of this.args){W=se.evaluate(P);let ge=Yn.parse(W);if(ge)return ge}throw new $a(`Could not parse padding from value '${typeof W=="string"?W:JSON.stringify(W)}'`)}case"variableAnchorOffsetCollection":{let W;for(let se of this.args){W=se.evaluate(P);let ge=vi.parse(W);if(ge)return ge}throw new $a(`Could not parse variableAnchorOffsetCollection from value '${typeof W=="string"?W:JSON.stringify(W)}'`)}case"number":{let W=null;for(let se of this.args){if(W=se.evaluate(P),W===null)return 0;let ge=Number(W);if(!isNaN(ge))return ge}throw new $a(`Could not convert ${JSON.stringify(W)} to number.`)}case"formatted":return sn.fromString(bi(this.args[0].evaluate(P)));case"resolvedImage":return Dn.fromString(bi(this.args[0].evaluate(P)));default:return bi(this.args[0].evaluate(P))}}eachChild(P){this.args.forEach(P)}outputDefined(){return this.args.every(P=>P.outputDefined())}}let Yt=["Unknown","Point","LineString","Polygon"];class ar{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Yt[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(P){let W=this._parseColorCache[P];return W||(W=this._parseColorCache[P]=xa.parse(P)),W}}class cr{constructor(P,W,se=[],ge,ke=new Fe,Pe=[]){this.registry=P,this.path=se,this.key=se.map(Ye=>`[${Ye}]`).join(""),this.scope=ke,this.errors=Pe,this.expectedType=ge,this._isConstant=W}parse(P,W,se,ge,ke={}){return W?this.concat(W,se,ge)._parse(P,ke):this._parse(P,ke)}_parse(P,W){function se(ge,ke,Pe){return Pe==="assert"?new it(ke,[ge]):Pe==="coerce"?new Jt(ke,[ge]):ge}if(P!==null&&typeof P!="string"&&typeof P!="boolean"&&typeof P!="number"||(P=["literal",P]),Array.isArray(P)){if(P.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let ge=P[0];if(typeof ge!="string")return this.error(`Expression name must be a string, but found ${typeof ge} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ke=this.registry[ge];if(ke){let Pe=ke.parse(P,this);if(!Pe)return null;if(this.expectedType){let Ye=this.expectedType,at=Pe.type;if(Ye.kind!=="string"&&Ye.kind!=="number"&&Ye.kind!=="boolean"&&Ye.kind!=="object"&&Ye.kind!=="array"||at.kind!=="value")if(Ye.kind!=="color"&&Ye.kind!=="formatted"&&Ye.kind!=="resolvedImage"||at.kind!=="value"&&at.kind!=="string")if(Ye.kind!=="padding"||at.kind!=="value"&&at.kind!=="number"&&at.kind!=="array")if(Ye.kind!=="variableAnchorOffsetCollection"||at.kind!=="value"&&at.kind!=="array"){if(this.checkSubtype(Ye,at))return null}else Pe=se(Pe,Ye,W.typeAnnotation||"coerce");else Pe=se(Pe,Ye,W.typeAnnotation||"coerce");else Pe=se(Pe,Ye,W.typeAnnotation||"coerce");else Pe=se(Pe,Ye,W.typeAnnotation||"assert")}if(!(Pe instanceof Li)&&Pe.type.kind!=="resolvedImage"&&this._isConstant(Pe)){let Ye=new ar;try{Pe=new Li(Pe.type,Pe.evaluate(Ye))}catch(at){return this.error(at.message),null}}return Pe}return this.error(`Unknown expression "${ge}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(P===void 0?"'undefined' value invalid. Use null instead.":typeof P=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof P} instead.`)}concat(P,W,se){let ge=typeof P=="number"?this.path.concat(P):this.path,ke=se?this.scope.concat(se):this.scope;return new cr(this.registry,this._isConstant,ge,W||null,ke,this.errors)}error(P,...W){let se=`${this.key}${W.map(ge=>`[${ge}]`).join("")}`;this.errors.push(new be(se,P))}checkSubtype(P,W){let se=_e(P,W);return se&&this.error(se),se}}class tr{constructor(P,W){this.type=W.type,this.bindings=[].concat(P),this.result=W}evaluate(P){return this.result.evaluate(P)}eachChild(P){for(let W of this.bindings)P(W[1]);P(this.result)}static parse(P,W){if(P.length<4)return W.error(`Expected at least 3 arguments, but found ${P.length-1} instead.`);let se=[];for(let ke=1;ke=se.length)throw new $a(`Array index out of bounds: ${W} > ${se.length-1}.`);if(W!==Math.floor(W))throw new $a(`Array index must be an integer, but found ${W} instead.`);return se[W]}eachChild(P){P(this.index),P(this.input)}outputDefined(){return!1}}class qt{constructor(P,W){this.type=st,this.needle=P,this.haystack=W}static parse(P,W){if(P.length!==3)return W.error(`Expected 2 arguments, but found ${P.length-1} instead.`);let se=W.parse(P[1],1,Pt),ge=W.parse(P[2],2,Pt);return se&&ge?Ie(se.type,[st,ut,je,Ve,Pt])?new qt(se,ge):W.error(`Expected first argument to be of type boolean, string, number or null, but found ${ze(se.type)} instead`):null}evaluate(P){let W=this.needle.evaluate(P),se=this.haystack.evaluate(P);if(!se)return!1;if(!Be(W,["boolean","string","number","null"]))throw new $a(`Expected first argument to be of type boolean, string, number or null, but found ${ze(mn(W))} instead.`);if(!Be(se,["string","array"]))throw new $a(`Expected second argument to be of type array or string, but found ${ze(mn(se))} instead.`);return se.indexOf(W)>=0}eachChild(P){P(this.needle),P(this.haystack)}outputDefined(){return!0}}class Qt{constructor(P,W,se){this.type=je,this.needle=P,this.haystack=W,this.fromIndex=se}static parse(P,W){if(P.length<=2||P.length>=5)return W.error(`Expected 3 or 4 arguments, but found ${P.length-1} instead.`);let se=W.parse(P[1],1,Pt),ge=W.parse(P[2],2,Pt);if(!se||!ge)return null;if(!Ie(se.type,[st,ut,je,Ve,Pt]))return W.error(`Expected first argument to be of type boolean, string, number or null, but found ${ze(se.type)} instead`);if(P.length===4){let ke=W.parse(P[3],3,je);return ke?new Qt(se,ge,ke):null}return new Qt(se,ge)}evaluate(P){let W=this.needle.evaluate(P),se=this.haystack.evaluate(P);if(!Be(W,["boolean","string","number","null"]))throw new $a(`Expected first argument to be of type boolean, string, number or null, but found ${ze(mn(W))} instead.`);let ge;if(this.fromIndex&&(ge=this.fromIndex.evaluate(P)),Be(se,["string"])){let ke=se.indexOf(W,ge);return ke===-1?-1:[...se.slice(0,ke)].length}if(Be(se,["array"]))return se.indexOf(W,ge);throw new $a(`Expected second argument to be of type array or string, but found ${ze(mn(se))} instead.`)}eachChild(P){P(this.needle),P(this.haystack),this.fromIndex&&P(this.fromIndex)}outputDefined(){return!1}}class br{constructor(P,W,se,ge,ke,Pe){this.inputType=P,this.type=W,this.input=se,this.cases=ge,this.outputs=ke,this.otherwise=Pe}static parse(P,W){if(P.length<5)return W.error(`Expected at least 4 arguments, but found only ${P.length-1}.`);if(P.length%2!=1)return W.error("Expected an even number of arguments.");let se,ge;W.expectedType&&W.expectedType.kind!=="value"&&(ge=W.expectedType);let ke={},Pe=[];for(let pt=2;ptNumber.MAX_SAFE_INTEGER)return er.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof xr=="number"&&Math.floor(xr)!==xr)return er.error("Numeric branch labels must be integer values.");if(se){if(er.checkSubtype(se,mn(xr)))return null}else se=mn(xr);if(ke[String(xr)]!==void 0)return er.error("Branch labels must be unique.");ke[String(xr)]=Pe.length}let sr=W.parse(Vt,pt,ge);if(!sr)return null;ge=ge||sr.type,Pe.push(sr)}let Ye=W.parse(P[1],1,Pt);if(!Ye)return null;let at=W.parse(P[P.length-1],P.length-1,ge);return at?Ye.type.kind!=="value"&&W.concat(1).checkSubtype(se,Ye.type)?null:new br(se,ge,Ye,ke,Pe,at):null}evaluate(P){let W=this.input.evaluate(P);return(mn(W)===this.inputType&&this.outputs[this.cases[W]]||this.otherwise).evaluate(P)}eachChild(P){P(this.input),this.outputs.forEach(P),P(this.otherwise)}outputDefined(){return this.outputs.every(P=>P.outputDefined())&&this.otherwise.outputDefined()}}class Ir{constructor(P,W,se){this.type=P,this.branches=W,this.otherwise=se}static parse(P,W){if(P.length<4)return W.error(`Expected at least 3 arguments, but found only ${P.length-1}.`);if(P.length%2!=0)return W.error("Expected an odd number of arguments.");let se;W.expectedType&&W.expectedType.kind!=="value"&&(se=W.expectedType);let ge=[];for(let Pe=1;PeW.outputDefined())&&this.otherwise.outputDefined()}}class Cr{constructor(P,W,se,ge){this.type=P,this.input=W,this.beginIndex=se,this.endIndex=ge}static parse(P,W){if(P.length<=2||P.length>=5)return W.error(`Expected 3 or 4 arguments, but found ${P.length-1} instead.`);let se=W.parse(P[1],1,Pt),ge=W.parse(P[2],2,je);if(!se||!ge)return null;if(!Ie(se.type,[Ee(Pt),ut,Pt]))return W.error(`Expected first argument to be of type array or string, but found ${ze(se.type)} instead`);if(P.length===4){let ke=W.parse(P[3],3,je);return ke?new Cr(se.type,se,ge,ke):null}return new Cr(se.type,se,ge)}evaluate(P){let W=this.input.evaluate(P),se=this.beginIndex.evaluate(P),ge;if(this.endIndex&&(ge=this.endIndex.evaluate(P)),Be(W,["string"]))return[...W].slice(se,ge).join("");if(Be(W,["array"]))return W.slice(se,ge);throw new $a(`Expected first argument to be of type array or string, but found ${ze(mn(W))} instead.`)}eachChild(P){P(this.input),P(this.beginIndex),this.endIndex&&P(this.endIndex)}outputDefined(){return!1}}function Mr(G,P){let W=G.length-1,se,ge,ke=0,Pe=W,Ye=0;for(;ke<=Pe;)if(Ye=Math.floor((ke+Pe)/2),se=G[Ye],ge=G[Ye+1],se<=P){if(Ye===W||PP))throw new $a("Input is not a number.");Pe=Ye-1}return 0}class Xr{constructor(P,W,se){this.type=P,this.input=W,this.labels=[],this.outputs=[];for(let[ge,ke]of se)this.labels.push(ge),this.outputs.push(ke)}static parse(P,W){if(P.length-1<4)return W.error(`Expected at least 4 arguments, but found only ${P.length-1}.`);if((P.length-1)%2!=0)return W.error("Expected an even number of arguments.");let se=W.parse(P[1],1,je);if(!se)return null;let ge=[],ke=null;W.expectedType&&W.expectedType.kind!=="value"&&(ke=W.expectedType);for(let Pe=1;Pe=Ye)return W.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',pt);let Vt=W.parse(at,Et,ke);if(!Vt)return null;ke=ke||Vt.type,ge.push([Ye,Vt])}return new Xr(ke,se,ge)}evaluate(P){let W=this.labels,se=this.outputs;if(W.length===1)return se[0].evaluate(P);let ge=this.input.evaluate(P);if(ge<=W[0])return se[0].evaluate(P);let ke=W.length;return ge>=W[ke-1]?se[ke-1].evaluate(P):se[Mr(W,ge)].evaluate(P)}eachChild(P){P(this.input);for(let W of this.outputs)P(W)}outputDefined(){return this.outputs.every(P=>P.outputDefined())}}function Ra(G){return G&&G.__esModule&&Object.prototype.hasOwnProperty.call(G,"default")?G.default:G}var wa=yn;function yn(G,P,W,se){this.cx=3*G,this.bx=3*(W-G)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*P,this.by=3*(se-P)-this.cy,this.ay=1-this.cy-this.by,this.p1x=G,this.p1y=P,this.p2x=W,this.p2y=se}yn.prototype={sampleCurveX:function(G){return((this.ax*G+this.bx)*G+this.cx)*G},sampleCurveY:function(G){return((this.ay*G+this.by)*G+this.cy)*G},sampleCurveDerivativeX:function(G){return(3*this.ax*G+2*this.bx)*G+this.cx},solveCurveX:function(G,P){if(P===void 0&&(P=1e-6),G<0)return 0;if(G>1)return 1;for(var W=G,se=0;se<8;se++){var ge=this.sampleCurveX(W)-G;if(Math.abs(ge)ge?Pe=W:Ye=W,W=.5*(Ye-Pe)+Pe;return W},solve:function(G,P){return this.sampleCurveY(this.solveCurveX(G,P))}};var fn=Ra(wa);function ri(G,P,W){return G+W*(P-G)}function On(G,P,W){return G.map((se,ge)=>ri(se,P[ge],W))}let ui={number:ri,color:function(G,P,W,se="rgb"){switch(se){case"rgb":{let[ge,ke,Pe,Ye]=On(G.rgb,P.rgb,W);return new xa(ge,ke,Pe,Ye,!1)}case"hcl":{let[ge,ke,Pe,Ye]=G.hcl,[at,pt,Et,Vt]=P.hcl,er,sr;if(isNaN(ge)||isNaN(at))isNaN(ge)?isNaN(at)?er=NaN:(er=at,Pe!==1&&Pe!==0||(sr=pt)):(er=ge,Et!==1&&Et!==0||(sr=ke));else{let Ka=at-ge;at>ge&&Ka>180?Ka-=360:at180&&(Ka+=360),er=ge+W*Ka}let[xr,Er,Qr,la]=function([Ka,Ma,qa,bn]){return Ka=isNaN(Ka)?0:Ka*Ft,pa([qa,Math.cos(Ka)*Ma,Math.sin(Ka)*Ma,bn])}([er,sr??ri(ke,pt,W),ri(Pe,Et,W),ri(Ye,Vt,W)]);return new xa(xr,Er,Qr,la,!1)}case"lab":{let[ge,ke,Pe,Ye]=pa(On(G.lab,P.lab,W));return new xa(ge,ke,Pe,Ye,!1)}}},array:On,padding:function(G,P,W){return new Yn(On(G.values,P.values,W))},variableAnchorOffsetCollection:function(G,P,W){let se=G.values,ge=P.values;if(se.length!==ge.length)throw new $a(`Cannot interpolate values of different length. from: ${G.toString()}, to: ${P.toString()}`);let ke=[];for(let Pe=0;Petypeof Et!="number"||Et<0||Et>1))return W.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ge={name:"cubic-bezier",controlPoints:pt}}}if(P.length-1<4)return W.error(`Expected at least 4 arguments, but found only ${P.length-1}.`);if((P.length-1)%2!=0)return W.error("Expected an even number of arguments.");if(ke=W.parse(ke,2,je),!ke)return null;let Ye=[],at=null;se==="interpolate-hcl"||se==="interpolate-lab"?at=yt:W.expectedType&&W.expectedType.kind!=="value"&&(at=W.expectedType);for(let pt=0;pt=Et)return W.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',er);let xr=W.parse(Vt,sr,at);if(!xr)return null;at=at||xr.type,Ye.push([Et,xr])}return We(at,je)||We(at,yt)||We(at,Nt)||We(at,nt)||We(at,Ee(je))?new jn(at,se,ge,ke,Ye):W.error(`Type ${ze(at)} is not interpolatable.`)}evaluate(P){let W=this.labels,se=this.outputs;if(W.length===1)return se[0].evaluate(P);let ge=this.input.evaluate(P);if(ge<=W[0])return se[0].evaluate(P);let ke=W.length;if(ge>=W[ke-1])return se[ke-1].evaluate(P);let Pe=Mr(W,ge),Ye=jn.interpolationFactor(this.interpolation,ge,W[Pe],W[Pe+1]),at=se[Pe].evaluate(P),pt=se[Pe+1].evaluate(P);switch(this.operator){case"interpolate":return ui[this.type.kind](at,pt,Ye);case"interpolate-hcl":return ui.color(at,pt,Ye,"hcl");case"interpolate-lab":return ui.color(at,pt,Ye,"lab")}}eachChild(P){P(this.input);for(let W of this.outputs)P(W)}outputDefined(){return this.outputs.every(P=>P.outputDefined())}}function oo(G,P,W,se){let ge=se-W,ke=G-W;return ge===0?0:P===1?ke/ge:(Math.pow(P,ke)-1)/(Math.pow(P,ge)-1)}class Qi{constructor(P,W){this.type=P,this.args=W}static parse(P,W){if(P.length<2)return W.error("Expectected at least one argument.");let se=null,ge=W.expectedType;ge&&ge.kind!=="value"&&(se=ge);let ke=[];for(let Ye of P.slice(1)){let at=W.parse(Ye,1+ke.length,se,void 0,{typeAnnotation:"omit"});if(!at)return null;se=se||at.type,ke.push(at)}if(!se)throw new Error("No output type");let Pe=ge&&ke.some(Ye=>_e(ge,Ye.type));return new Qi(Pe?Pt:se,ke)}evaluate(P){let W,se=null,ge=0;for(let ke of this.args)if(ge++,se=ke.evaluate(P),se&&se instanceof Dn&&!se.available&&(W||(W=se.name),se=null,ge===this.args.length&&(se=W)),se!==null)break;return se}eachChild(P){this.args.forEach(P)}outputDefined(){return this.args.every(P=>P.outputDefined())}}function Mn(G,P){return G==="=="||G==="!="?P.kind==="boolean"||P.kind==="string"||P.kind==="number"||P.kind==="null"||P.kind==="value":P.kind==="string"||P.kind==="number"||P.kind==="value"}function bo(G,P,W,se){return se.compare(P,W)===0}function so(G,P,W){let se=G!=="=="&&G!=="!=";return class v9{constructor(ke,Pe,Ye){this.type=st,this.lhs=ke,this.rhs=Pe,this.collator=Ye,this.hasUntypedArgument=ke.type.kind==="value"||Pe.type.kind==="value"}static parse(ke,Pe){if(ke.length!==3&&ke.length!==4)return Pe.error("Expected two or three arguments.");let Ye=ke[0],at=Pe.parse(ke[1],1,Pt);if(!at)return null;if(!Mn(Ye,at.type))return Pe.concat(1).error(`"${Ye}" comparisons are not supported for type '${ze(at.type)}'.`);let pt=Pe.parse(ke[2],2,Pt);if(!pt)return null;if(!Mn(Ye,pt.type))return Pe.concat(2).error(`"${Ye}" comparisons are not supported for type '${ze(pt.type)}'.`);if(at.type.kind!==pt.type.kind&&at.type.kind!=="value"&&pt.type.kind!=="value")return Pe.error(`Cannot compare types '${ze(at.type)}' and '${ze(pt.type)}'.`);se&&(at.type.kind==="value"&&pt.type.kind!=="value"?at=new it(pt.type,[at]):at.type.kind!=="value"&&pt.type.kind==="value"&&(pt=new it(at.type,[pt])));let Et=null;if(ke.length===4){if(at.type.kind!=="string"&&pt.type.kind!=="string"&&at.type.kind!=="value"&&pt.type.kind!=="value")return Pe.error("Cannot use collator to compare non-string types.");if(Et=Pe.parse(ke[3],3,Zt),!Et)return null}return new v9(at,pt,Et)}evaluate(ke){let Pe=this.lhs.evaluate(ke),Ye=this.rhs.evaluate(ke);if(se&&this.hasUntypedArgument){let at=mn(Pe),pt=mn(Ye);if(at.kind!==pt.kind||at.kind!=="string"&&at.kind!=="number")throw new $a(`Expected arguments for "${G}" to be (string, string) or (number, number), but found (${at.kind}, ${pt.kind}) instead.`)}if(this.collator&&!se&&this.hasUntypedArgument){let at=mn(Pe),pt=mn(Ye);if(at.kind!=="string"||pt.kind!=="string")return P(ke,Pe,Ye)}return this.collator?W(ke,Pe,Ye,this.collator.evaluate(ke)):P(ke,Pe,Ye)}eachChild(ke){ke(this.lhs),ke(this.rhs),this.collator&&ke(this.collator)}outputDefined(){return!0}}}let Hi=so("==",function(G,P,W){return P===W},bo),yo=so("!=",function(G,P,W){return P!==W},function(G,P,W,se){return!bo(0,P,W,se)}),Bi=so("<",function(G,P,W){return P",function(G,P,W){return P>W},function(G,P,W,se){return se.compare(P,W)>0}),Po=so("<=",function(G,P,W){return P<=W},function(G,P,W,se){return se.compare(P,W)<=0}),po=so(">=",function(G,P,W){return P>=W},function(G,P,W,se){return se.compare(P,W)>=0});class Kn{constructor(P,W,se){this.type=Zt,this.locale=se,this.caseSensitive=P,this.diacriticSensitive=W}static parse(P,W){if(P.length!==2)return W.error("Expected one argument.");let se=P[1];if(typeof se!="object"||Array.isArray(se))return W.error("Collator options argument must be an object.");let ge=W.parse(se["case-sensitive"]!==void 0&&se["case-sensitive"],1,st);if(!ge)return null;let ke=W.parse(se["diacritic-sensitive"]!==void 0&&se["diacritic-sensitive"],1,st);if(!ke)return null;let Pe=null;return se.locale&&(Pe=W.parse(se.locale,1,ut),!Pe)?null:new Kn(ge,ke,Pe)}evaluate(P){return new Gn(this.caseSensitive.evaluate(P),this.diacriticSensitive.evaluate(P),this.locale?this.locale.evaluate(P):null)}eachChild(P){P(this.caseSensitive),P(this.diacriticSensitive),this.locale&&P(this.locale)}outputDefined(){return!1}}class yi{constructor(P,W,se,ge,ke){this.type=ut,this.number=P,this.locale=W,this.currency=se,this.minFractionDigits=ge,this.maxFractionDigits=ke}static parse(P,W){if(P.length!==3)return W.error("Expected two arguments.");let se=W.parse(P[1],1,je);if(!se)return null;let ge=P[2];if(typeof ge!="object"||Array.isArray(ge))return W.error("NumberFormat options argument must be an object.");let ke=null;if(ge.locale&&(ke=W.parse(ge.locale,1,ut),!ke))return null;let Pe=null;if(ge.currency&&(Pe=W.parse(ge.currency,1,ut),!Pe))return null;let Ye=null;if(ge["min-fraction-digits"]&&(Ye=W.parse(ge["min-fraction-digits"],1,je),!Ye))return null;let at=null;return ge["max-fraction-digits"]&&(at=W.parse(ge["max-fraction-digits"],1,je),!at)?null:new yi(se,ke,Pe,Ye,at)}evaluate(P){return new Intl.NumberFormat(this.locale?this.locale.evaluate(P):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(P):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(P):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(P):void 0}).format(this.number.evaluate(P))}eachChild(P){P(this.number),this.locale&&P(this.locale),this.currency&&P(this.currency),this.minFractionDigits&&P(this.minFractionDigits),this.maxFractionDigits&&P(this.maxFractionDigits)}outputDefined(){return!1}}class Yi{constructor(P){this.type=vr,this.sections=P}static parse(P,W){if(P.length<2)return W.error("Expected at least one argument.");let se=P[1];if(!Array.isArray(se)&&typeof se=="object")return W.error("First argument must be an image or text section.");let ge=[],ke=!1;for(let Pe=1;Pe<=P.length-1;++Pe){let Ye=P[Pe];if(ke&&typeof Ye=="object"&&!Array.isArray(Ye)){ke=!1;let at=null;if(Ye["font-scale"]&&(at=W.parse(Ye["font-scale"],1,je),!at))return null;let pt=null;if(Ye["text-font"]&&(pt=W.parse(Ye["text-font"],1,Ee(ut)),!pt))return null;let Et=null;if(Ye["text-color"]&&(Et=W.parse(Ye["text-color"],1,yt),!Et))return null;let Vt=ge[ge.length-1];Vt.scale=at,Vt.font=pt,Vt.textColor=Et}else{let at=W.parse(P[Pe],1,Pt);if(!at)return null;let pt=at.type.kind;if(pt!=="string"&&pt!=="value"&&pt!=="null"&&pt!=="resolvedImage")return W.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ke=!0,ge.push({content:at,scale:null,font:null,textColor:null})}}return new Yi(ge)}evaluate(P){return new sn(this.sections.map(W=>{let se=W.content.evaluate(P);return mn(se)===Kt?new Pn("",se,null,null,null):new Pn(bi(se),null,W.scale?W.scale.evaluate(P):null,W.font?W.font.evaluate(P).join(","):null,W.textColor?W.textColor.evaluate(P):null)}))}eachChild(P){for(let W of this.sections)P(W.content),W.scale&&P(W.scale),W.font&&P(W.font),W.textColor&&P(W.textColor)}outputDefined(){return!1}}class zi{constructor(P){this.type=Kt,this.input=P}static parse(P,W){if(P.length!==2)return W.error("Expected two arguments.");let se=W.parse(P[1],1,ut);return se?new zi(se):W.error("No image name provided.")}evaluate(P){let W=this.input.evaluate(P),se=Dn.fromString(W);return se&&P.availableImages&&(se.available=P.availableImages.indexOf(W)>-1),se}eachChild(P){P(this.input)}outputDefined(){return!1}}class Uo{constructor(P){this.type=je,this.input=P}static parse(P,W){if(P.length!==2)return W.error(`Expected 1 argument, but found ${P.length-1} instead.`);let se=W.parse(P[1],1);return se?se.type.kind!=="array"&&se.type.kind!=="string"&&se.type.kind!=="value"?W.error(`Expected argument of type string or array, but found ${ze(se.type)} instead.`):new Uo(se):null}evaluate(P){let W=this.input.evaluate(P);if(typeof W=="string")return[...W].length;if(Array.isArray(W))return W.length;throw new $a(`Expected value to be of type string or array, but found ${ze(mn(W))} instead.`)}eachChild(P){P(this.input)}outputDefined(){return!1}}let Co=8192;function Wo(G,P){let W=(180+G[0])/360,se=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G[1]*Math.PI/360)))/360,ge=Math.pow(2,P.z);return[Math.round(W*ge*Co),Math.round(se*ge*Co)]}function Go(G,P){let W=Math.pow(2,P.z);return[(ge=(G[0]/Co+P.x)/W,360*ge-180),(se=(G[1]/Co+P.y)/W,360/Math.PI*Math.atan(Math.exp((180-360*se)*Math.PI/180))-90)];var se,ge}function ns(G,P){G[0]=Math.min(G[0],P[0]),G[1]=Math.min(G[1],P[1]),G[2]=Math.max(G[2],P[0]),G[3]=Math.max(G[3],P[1])}function Ro(G,P){return!(G[0]<=P[0]||G[2]>=P[2]||G[1]<=P[1]||G[3]>=P[3])}function Zi(G,P,W){let se=G[0]-P[0],ge=G[1]-P[1],ke=G[0]-W[0],Pe=G[1]-W[1];return se*Pe-ke*ge==0&&se*ke<=0&&ge*Pe<=0}function ls(G,P,W,se){return(ge=[se[0]-W[0],se[1]-W[1]])[0]*(ke=[P[0]-G[0],P[1]-G[1]])[1]-ge[1]*ke[0]!=0&&!(!Us(G,P,W,se)||!Us(W,se,G,P));var ge,ke}function Eo(G,P,W){for(let se of W)for(let ge=0;ge(ge=G)[1]!=(Pe=Ye[at+1])[1]>ge[1]&&ge[0]<(Pe[0]-ke[0])*(ge[1]-ke[1])/(Pe[1]-ke[1])+ke[0]&&(se=!se)}var ge,ke,Pe;return se}function Zs(G,P){for(let W of P)if(mo(G,W))return!0;return!1}function qo(G,P){for(let W of G)if(!mo(W,P))return!1;for(let W=0;W0&&Ye<0||Pe<0&&Ye>0}function is(G,P,W){let se=[];for(let ge=0;geW[2]){let ge=.5*se,ke=G[0]-W[0]>ge?-se:W[0]-G[0]>ge?se:0;ke===0&&(ke=G[0]-W[2]>ge?-se:W[2]-G[0]>ge?se:0),G[0]+=ke}ns(P,G)}function Qo(G,P,W,se){let ge=Math.pow(2,se.z)*Co,ke=[se.x*Co,se.y*Co],Pe=[];for(let Ye of G)for(let at of Ye){let pt=[at.x+ke[0],at.y+ke[1]];ml(pt,P,W,ge),Pe.push(pt)}return Pe}function Gl(G,P,W,se){let ge=Math.pow(2,se.z)*Co,ke=[se.x*Co,se.y*Co],Pe=[];for(let at of G){let pt=[];for(let Et of at){let Vt=[Et.x+ke[0],Et.y+ke[1]];ns(P,Vt),pt.push(Vt)}Pe.push(pt)}if(P[2]-P[0]<=ge/2){(Ye=P)[0]=Ye[1]=1/0,Ye[2]=Ye[3]=-1/0;for(let at of Pe)for(let pt of at)ml(pt,P,W,ge)}var Ye;return Pe}class ys{constructor(P,W){this.type=st,this.geojson=P,this.geometries=W}static parse(P,W){if(P.length!==2)return W.error(`'within' expression requires exactly one argument, but found ${P.length-1} instead.`);if(on(P[1])){let se=P[1];if(se.type==="FeatureCollection"){let ge=[];for(let ke of se.features){let{type:Pe,coordinates:Ye}=ke.geometry;Pe==="Polygon"&&ge.push(Ye),Pe==="MultiPolygon"&&ge.push(...Ye)}if(ge.length)return new ys(se,{type:"MultiPolygon",coordinates:ge})}else if(se.type==="Feature"){let ge=se.geometry.type;if(ge==="Polygon"||ge==="MultiPolygon")return new ys(se,se.geometry)}else if(se.type==="Polygon"||se.type==="MultiPolygon")return new ys(se,se)}return W.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(P){if(P.geometry()!=null&&P.canonicalID()!=null){if(P.geometryType()==="Point")return function(W,se){let ge=[1/0,1/0,-1/0,-1/0],ke=[1/0,1/0,-1/0,-1/0],Pe=W.canonicalID();if(se.type==="Polygon"){let Ye=is(se.coordinates,ke,Pe),at=Qo(W.geometry(),ge,ke,Pe);if(!Ro(ge,ke))return!1;for(let pt of at)if(!mo(pt,Ye))return!1}if(se.type==="MultiPolygon"){let Ye=cl(se.coordinates,ke,Pe),at=Qo(W.geometry(),ge,ke,Pe);if(!Ro(ge,ke))return!1;for(let pt of at)if(!Zs(pt,Ye))return!1}return!0}(P,this.geometries);if(P.geometryType()==="LineString")return function(W,se){let ge=[1/0,1/0,-1/0,-1/0],ke=[1/0,1/0,-1/0,-1/0],Pe=W.canonicalID();if(se.type==="Polygon"){let Ye=is(se.coordinates,ke,Pe),at=Gl(W.geometry(),ge,ke,Pe);if(!Ro(ge,ke))return!1;for(let pt of at)if(!qo(pt,Ye))return!1}if(se.type==="MultiPolygon"){let Ye=cl(se.coordinates,ke,Pe),at=Gl(W.geometry(),ge,ke,Pe);if(!Ro(ge,ke))return!1;for(let pt of at)if(!Ds(pt,Ye))return!1}return!0}(P,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let $o=class{constructor(G=[],P=(W,se)=>Wse?1:0){if(this.data=G,this.length=this.data.length,this.compare=P,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(G){this.data.push(G),this._up(this.length++)}pop(){if(this.length===0)return;let G=this.data[0],P=this.data.pop();return--this.length>0&&(this.data[0]=P,this._down(0)),G}peek(){return this.data[0]}_up(G){let{data:P,compare:W}=this,se=P[G];for(;G>0;){let ge=G-1>>1,ke=P[ge];if(W(se,ke)>=0)break;P[G]=ke,G=ge}P[G]=se}_down(G){let{data:P,compare:W}=this,se=this.length>>1,ge=P[G];for(;G=0)break;P[G]=P[ke],G=ke}P[G]=ge}};function wo(G,P,W,se,ge){go(G,P,W,se||G.length-1,ge||$l)}function go(G,P,W,se,ge){for(;se>W;){if(se-W>600){var ke=se-W+1,Pe=P-W+1,Ye=Math.log(ke),at=.5*Math.exp(2*Ye/3),pt=.5*Math.sqrt(Ye*at*(ke-at)/ke)*(Pe-ke/2<0?-1:1);go(G,P,Math.max(W,Math.floor(P-Pe*at/ke+pt)),Math.min(se,Math.floor(P+(ke-Pe)*at/ke+pt)),ge)}var Et=G[P],Vt=W,er=se;for(rs(G,W,P),ge(G[se],Et)>0&&rs(G,W,se);Vt0;)er--}ge(G[W],Et)===0?rs(G,W,er):rs(G,++er,se),er<=P&&(W=er+1),P<=er&&(se=er-1)}}function rs(G,P,W){var se=G[P];G[P]=G[W],G[W]=se}function $l(G,P){return GP?1:0}function cu(G,P){if(G.length<=1)return[G];let W=[],se,ge;for(let ke of G){let Pe=Wu(ke);Pe!==0&&(ke.area=Math.abs(Pe),ge===void 0&&(ge=Pe<0),ge===Pe<0?(se&&W.push(se),se=[ke]):se.push(ke))}if(se&&W.push(se),P>1)for(let ke=0;ke1?(pt=P[at+1][0],Et=P[at+1][1]):sr>0&&(pt+=Vt/this.kx*sr,Et+=er/this.ky*sr)),Vt=this.wrap(W[0]-pt)*this.kx,er=(W[1]-Et)*this.ky;let xr=Vt*Vt+er*er;xr180;)P-=360;return P}}function Ec(G,P){return P[0]-G[0]}function fu(G){return G[1]-G[0]+1}function hu(G,P){return G[1]>=G[0]&&G[1]G[1])return[null,null];let W=fu(G);if(P){if(W===2)return[G,null];let ge=Math.floor(W/2);return[[G[0],G[0]+ge],[G[0]+ge,G[1]]]}if(W===1)return[G,null];let se=Math.floor(W/2)-1;return[[G[0],G[0]+se],[G[0]+se+1,G[1]]]}function Jl(G,P){if(!hu(P,G.length))return[1/0,1/0,-1/0,-1/0];let W=[1/0,1/0,-1/0,-1/0];for(let se=P[0];se<=P[1];++se)ns(W,G[se]);return W}function Fs(G){let P=[1/0,1/0,-1/0,-1/0];for(let W of G)for(let se of W)ns(P,se);return P}function Yo(G){return G[0]!==-1/0&&G[1]!==-1/0&&G[2]!==1/0&&G[3]!==1/0}function tl(G,P,W){if(!Yo(G)||!Yo(P))return NaN;let se=0,ge=0;return G[2]P[2]&&(se=G[0]-P[2]),G[1]>P[3]&&(ge=G[1]-P[3]),G[3]=se)return se;if(Ro(ge,ke)){if($f(G,P))return 0}else if($f(P,G))return 0;let Pe=1/0;for(let Ye of G)for(let at=0,pt=Ye.length,Et=pt-1;at0;){let at=Pe.pop();if(at[0]>=ke)continue;let pt=at[1],Et=P?50:100;if(fu(pt)<=Et){if(!hu(pt,G.length))return NaN;if(P){let Vt=Io(G,pt,W,se);if(isNaN(Vt)||Vt===0)return Vt;ke=Math.min(ke,Vt)}else for(let Vt=pt[0];Vt<=pt[1];++Vt){let er=Zf(G[Vt],W,se);if(ke=Math.min(ke,er),ke===0)return 0}}else{let Vt=du(pt,P);qi(Pe,ke,se,G,Ye,Vt[0]),qi(Pe,ke,se,G,Ye,Vt[1])}}return ke}function El(G,P,W,se,ge,ke=1/0){let Pe=Math.min(ke,ge.distance(G[0],W[0]));if(Pe===0)return Pe;let Ye=new $o([[0,[0,G.length-1],[0,W.length-1]]],Ec);for(;Ye.length>0;){let at=Ye.pop();if(at[0]>=Pe)continue;let pt=at[1],Et=at[2],Vt=P?50:100,er=se?50:100;if(fu(pt)<=Vt&&fu(Et)<=er){if(!hu(pt,G.length)&&hu(Et,W.length))return NaN;let sr;if(P&&se)sr=kc(G,pt,W,Et,ge),Pe=Math.min(Pe,sr);else if(P&&!se){let xr=G.slice(pt[0],pt[1]+1);for(let Er=Et[0];Er<=Et[1];++Er)if(sr=wu(W[Er],xr,ge),Pe=Math.min(Pe,sr),Pe===0)return Pe}else if(!P&&se){let xr=W.slice(Et[0],Et[1]+1);for(let Er=pt[0];Er<=pt[1];++Er)if(sr=wu(G[Er],xr,ge),Pe=Math.min(Pe,sr),Pe===0)return Pe}else sr=zs(G,pt,W,Et,ge),Pe=Math.min(Pe,sr)}else{let sr=du(pt,P),xr=du(Et,se);Zu(Ye,Pe,ge,G,W,sr[0],xr[0]),Zu(Ye,Pe,ge,G,W,sr[0],xr[1]),Zu(Ye,Pe,ge,G,W,sr[1],xr[0]),Zu(Ye,Pe,ge,G,W,sr[1],xr[1])}}return Pe}function mf(G){return G.type==="MultiPolygon"?G.coordinates.map(P=>({type:"Polygon",coordinates:P})):G.type==="MultiLineString"?G.coordinates.map(P=>({type:"LineString",coordinates:P})):G.type==="MultiPoint"?G.coordinates.map(P=>({type:"Point",coordinates:P})):[G]}class Au{constructor(P,W){this.type=je,this.geojson=P,this.geometries=W}static parse(P,W){if(P.length!==2)return W.error(`'distance' expression requires exactly one argument, but found ${P.length-1} instead.`);if(on(P[1])){let se=P[1];if(se.type==="FeatureCollection")return new Au(se,se.features.map(ge=>mf(ge.geometry)).flat());if(se.type==="Feature")return new Au(se,mf(se.geometry));if("type"in se&&"coordinates"in se)return new Au(se,mf(se))}return W.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(P){if(P.geometry()!=null&&P.canonicalID()!=null){if(P.geometryType()==="Point")return function(W,se){let ge=W.geometry(),ke=ge.flat().map(at=>Go([at.x,at.y],W.canonical));if(ge.length===0)return NaN;let Pe=new xc(ke[0][1]),Ye=1/0;for(let at of se){switch(at.type){case"Point":Ye=Math.min(Ye,El(ke,!1,[at.coordinates],!1,Pe,Ye));break;case"LineString":Ye=Math.min(Ye,El(ke,!1,at.coordinates,!0,Pe,Ye));break;case"Polygon":Ye=Math.min(Ye,bc(ke,!1,at.coordinates,Pe,Ye))}if(Ye===0)return Ye}return Ye}(P,this.geometries);if(P.geometryType()==="LineString")return function(W,se){let ge=W.geometry(),ke=ge.flat().map(at=>Go([at.x,at.y],W.canonical));if(ge.length===0)return NaN;let Pe=new xc(ke[0][1]),Ye=1/0;for(let at of se){switch(at.type){case"Point":Ye=Math.min(Ye,El(ke,!0,[at.coordinates],!1,Pe,Ye));break;case"LineString":Ye=Math.min(Ye,El(ke,!0,at.coordinates,!0,Pe,Ye));break;case"Polygon":Ye=Math.min(Ye,bc(ke,!0,at.coordinates,Pe,Ye))}if(Ye===0)return Ye}return Ye}(P,this.geometries);if(P.geometryType()==="Polygon")return function(W,se){let ge=W.geometry();if(ge.length===0||ge[0].length===0)return NaN;let ke=cu(ge,0).map(at=>at.map(pt=>pt.map(Et=>Go([Et.x,Et.y],W.canonical)))),Pe=new xc(ke[0][0][0][1]),Ye=1/0;for(let at of se)for(let pt of ke){switch(at.type){case"Point":Ye=Math.min(Ye,bc([at.coordinates],!1,pt,Pe,Ye));break;case"LineString":Ye=Math.min(Ye,bc(at.coordinates,!0,pt,Pe,Ye));break;case"Polygon":Ye=Math.min(Ye,Vo(pt,at.coordinates,Pe,Ye))}if(Ye===0)return Ye}return Ye}(P,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}let nc={"==":Hi,"!=":yo,">":fo,"<":Bi,">=":po,"<=":Po,array:it,at:bt,boolean:it,case:Ir,coalesce:Qi,collator:Kn,format:Yi,image:zi,in:qt,"index-of":Qt,interpolate:jn,"interpolate-hcl":jn,"interpolate-lab":jn,length:Uo,let:tr,literal:Li,match:br,number:it,"number-format":yi,object:it,slice:Cr,step:Xr,string:it,"to-boolean":Jt,"to-color":Jt,"to-number":Jt,"to-string":Jt,var:Je,within:ys,distance:Au};class rl{constructor(P,W,se,ge){this.name=P,this.type=W,this._evaluate=se,this.args=ge}evaluate(P){return this._evaluate(P,this.args)}eachChild(P){this.args.forEach(P)}outputDefined(){return!1}static parse(P,W){let se=P[0],ge=rl.definitions[se];if(!ge)return W.error(`Unknown expression "${se}". If you wanted a literal array, use ["literal", [...]].`,0);let ke=Array.isArray(ge)?ge[0]:ge.type,Pe=Array.isArray(ge)?[[ge[1],ge[2]]]:ge.overloads,Ye=Pe.filter(([pt])=>!Array.isArray(pt)||pt.length===P.length-1),at=null;for(let[pt,Et]of Ye){at=new cr(W.registry,Xc,W.path,null,W.scope);let Vt=[],er=!1;for(let sr=1;sr{return er=Vt,Array.isArray(er)?`(${er.map(ze).join(", ")})`:`(${ze(er.type)}...)`;var er}).join(" | "),Et=[];for(let Vt=1;Vt{W=P?W&&Xc(se):W&&se instanceof Li}),!!W&&Zc(G)&&Cc(G,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function Zc(G){if(G instanceof rl&&(G.name==="get"&&G.args.length===1||G.name==="feature-state"||G.name==="has"&&G.args.length===1||G.name==="properties"||G.name==="geometry-type"||G.name==="id"||/^filter-/.test(G.name))||G instanceof ys||G instanceof Au)return!1;let P=!0;return G.eachChild(W=>{P&&!Zc(W)&&(P=!1)}),P}function Ql(G){if(G instanceof rl&&G.name==="feature-state")return!1;let P=!0;return G.eachChild(W=>{P&&!Ql(W)&&(P=!1)}),P}function Cc(G,P){if(G instanceof rl&&P.indexOf(G.name)>=0)return!1;let W=!0;return G.eachChild(se=>{W&&!Cc(se,P)&&(W=!1)}),W}function eu(G){return{result:"success",value:G}}function sc(G){return{result:"error",value:G}}function qs(G){return G["property-type"]==="data-driven"||G["property-type"]==="cross-faded-data-driven"}function lc(G){return!!G.expression&&G.expression.parameters.indexOf("zoom")>-1}function Fu(G){return!!G.expression&&G.expression.interpolated}function Ko(G){return G instanceof Number?"number":G instanceof String?"string":G instanceof Boolean?"boolean":Array.isArray(G)?"array":G===null?"null":typeof G}function Lc(G){return typeof G=="object"&&G!==null&&!Array.isArray(G)}function Kf(G){return G}function yf(G,P){let W=P.type==="color",se=G.stops&&typeof G.stops[0][0]=="object",ge=se||!(se||G.property!==void 0),ke=G.type||(Fu(P)?"exponential":"interval");if(W||P.type==="padding"){let Et=W?xa.parse:Yn.parse;(G=ne({},G)).stops&&(G.stops=G.stops.map(Vt=>[Vt[0],Et(Vt[1])])),G.default=Et(G.default?G.default:P.default)}if(G.colorSpace&&(Pe=G.colorSpace)!=="rgb"&&Pe!=="hcl"&&Pe!=="lab")throw new Error(`Unknown color space: "${G.colorSpace}"`);var Pe;let Ye,at,pt;if(ke==="exponential")Ye=Jf;else if(ke==="interval")Ye=Pc;else if(ke==="categorical"){Ye=_f,at=Object.create(null);for(let Et of G.stops)at[Et[0]]=Et[1];pt=typeof G.stops[0][0]}else{if(ke!=="identity")throw new Error(`Unknown function type "${ke}"`);Ye=Gs}if(se){let Et={},Vt=[];for(let xr=0;xrxr[0]),evaluate:({zoom:xr},Er)=>Jf({stops:er,base:G.base},P,xr).evaluate(xr,Er)}}if(ge){let Et=ke==="exponential"?{name:"exponential",base:G.base!==void 0?G.base:1}:null;return{kind:"camera",interpolationType:Et,interpolationFactor:jn.interpolationFactor.bind(void 0,Et),zoomStops:G.stops.map(Vt=>Vt[0]),evaluate:({zoom:Vt})=>Ye(G,P,Vt,at,pt)}}return{kind:"source",evaluate(Et,Vt){let er=Vt&&Vt.properties?Vt.properties[G.property]:void 0;return er===void 0?$u(G.default,P.default):Ye(G,P,er,at,pt)}}}function $u(G,P,W){return G!==void 0?G:P!==void 0?P:W!==void 0?W:void 0}function _f(G,P,W,se,ge){return $u(typeof W===ge?se[W]:void 0,G.default,P.default)}function Pc(G,P,W){if(Ko(W)!=="number")return $u(G.default,P.default);let se=G.stops.length;if(se===1||W<=G.stops[0][0])return G.stops[0][1];if(W>=G.stops[se-1][0])return G.stops[se-1][1];let ge=Mr(G.stops.map(ke=>ke[0]),W);return G.stops[ge][1]}function Jf(G,P,W){let se=G.base!==void 0?G.base:1;if(Ko(W)!=="number")return $u(G.default,P.default);let ge=G.stops.length;if(ge===1||W<=G.stops[0][0])return G.stops[0][1];if(W>=G.stops[ge-1][0])return G.stops[ge-1][1];let ke=Mr(G.stops.map(Et=>Et[0]),W),Pe=function(Et,Vt,er,sr){let xr=sr-er,Er=Et-er;return xr===0?0:Vt===1?Er/xr:(Math.pow(Vt,Er)-1)/(Math.pow(Vt,xr)-1)}(W,se,G.stops[ke][0],G.stops[ke+1][0]),Ye=G.stops[ke][1],at=G.stops[ke+1][1],pt=ui[P.type]||Kf;return typeof Ye.evaluate=="function"?{evaluate(...Et){let Vt=Ye.evaluate.apply(void 0,Et),er=at.evaluate.apply(void 0,Et);if(Vt!==void 0&&er!==void 0)return pt(Vt,er,Pe,G.colorSpace)}}:pt(Ye,at,Pe,G.colorSpace)}function Gs(G,P,W){switch(P.type){case"color":W=xa.parse(W);break;case"formatted":W=sn.fromString(W.toString());break;case"resolvedImage":W=Dn.fromString(W.toString());break;case"padding":W=Yn.parse(W);break;default:Ko(W)===P.type||P.type==="enum"&&P.values[W]||(W=void 0)}return $u(W,G.default,P.default)}rl.register(nc,{error:[{kind:"error"},[ut],(G,[P])=>{throw new $a(P.evaluate(G))}],typeof:[ut,[Pt],(G,[P])=>ze(mn(P.evaluate(G)))],"to-rgba":[Ee(je,4),[yt],(G,[P])=>{let[W,se,ge,ke]=P.evaluate(G).rgb;return[255*W,255*se,255*ge,ke]}],rgb:[yt,[je,je,je],gf],rgba:[yt,[je,je,je,je],gf],has:{type:st,overloads:[[[ut],(G,[P])=>Yc(P.evaluate(G),G.properties())],[[ut,At],(G,[P,W])=>Yc(P.evaluate(G),W.evaluate(G))]]},get:{type:Pt,overloads:[[[ut],(G,[P])=>ic(P.evaluate(G),G.properties())],[[ut,At],(G,[P,W])=>ic(P.evaluate(G),W.evaluate(G))]]},"feature-state":[Pt,[ut],(G,[P])=>ic(P.evaluate(G),G.featureState||{})],properties:[At,[],G=>G.properties()],"geometry-type":[ut,[],G=>G.geometryType()],id:[Pt,[],G=>G.id()],zoom:[je,[],G=>G.globals.zoom],"heatmap-density":[je,[],G=>G.globals.heatmapDensity||0],"line-progress":[je,[],G=>G.globals.lineProgress||0],accumulated:[Pt,[],G=>G.globals.accumulated===void 0?null:G.globals.accumulated],"+":[je,oc(je),(G,P)=>{let W=0;for(let se of P)W+=se.evaluate(G);return W}],"*":[je,oc(je),(G,P)=>{let W=1;for(let se of P)W*=se.evaluate(G);return W}],"-":{type:je,overloads:[[[je,je],(G,[P,W])=>P.evaluate(G)-W.evaluate(G)],[[je],(G,[P])=>-P.evaluate(G)]]},"/":[je,[je,je],(G,[P,W])=>P.evaluate(G)/W.evaluate(G)],"%":[je,[je,je],(G,[P,W])=>P.evaluate(G)%W.evaluate(G)],ln2:[je,[],()=>Math.LN2],pi:[je,[],()=>Math.PI],e:[je,[],()=>Math.E],"^":[je,[je,je],(G,[P,W])=>Math.pow(P.evaluate(G),W.evaluate(G))],sqrt:[je,[je],(G,[P])=>Math.sqrt(P.evaluate(G))],log10:[je,[je],(G,[P])=>Math.log(P.evaluate(G))/Math.LN10],ln:[je,[je],(G,[P])=>Math.log(P.evaluate(G))],log2:[je,[je],(G,[P])=>Math.log(P.evaluate(G))/Math.LN2],sin:[je,[je],(G,[P])=>Math.sin(P.evaluate(G))],cos:[je,[je],(G,[P])=>Math.cos(P.evaluate(G))],tan:[je,[je],(G,[P])=>Math.tan(P.evaluate(G))],asin:[je,[je],(G,[P])=>Math.asin(P.evaluate(G))],acos:[je,[je],(G,[P])=>Math.acos(P.evaluate(G))],atan:[je,[je],(G,[P])=>Math.atan(P.evaluate(G))],min:[je,oc(je),(G,P)=>Math.min(...P.map(W=>W.evaluate(G)))],max:[je,oc(je),(G,P)=>Math.max(...P.map(W=>W.evaluate(G)))],abs:[je,[je],(G,[P])=>Math.abs(P.evaluate(G))],round:[je,[je],(G,[P])=>{let W=P.evaluate(G);return W<0?-Math.round(-W):Math.round(W)}],floor:[je,[je],(G,[P])=>Math.floor(P.evaluate(G))],ceil:[je,[je],(G,[P])=>Math.ceil(P.evaluate(G))],"filter-==":[st,[ut,Pt],(G,[P,W])=>G.properties()[P.value]===W.value],"filter-id-==":[st,[Pt],(G,[P])=>G.id()===P.value],"filter-type-==":[st,[ut],(G,[P])=>G.geometryType()===P.value],"filter-<":[st,[ut,Pt],(G,[P,W])=>{let se=G.properties()[P.value],ge=W.value;return typeof se==typeof ge&&se{let W=G.id(),se=P.value;return typeof W==typeof se&&W":[st,[ut,Pt],(G,[P,W])=>{let se=G.properties()[P.value],ge=W.value;return typeof se==typeof ge&&se>ge}],"filter-id->":[st,[Pt],(G,[P])=>{let W=G.id(),se=P.value;return typeof W==typeof se&&W>se}],"filter-<=":[st,[ut,Pt],(G,[P,W])=>{let se=G.properties()[P.value],ge=W.value;return typeof se==typeof ge&&se<=ge}],"filter-id-<=":[st,[Pt],(G,[P])=>{let W=G.id(),se=P.value;return typeof W==typeof se&&W<=se}],"filter->=":[st,[ut,Pt],(G,[P,W])=>{let se=G.properties()[P.value],ge=W.value;return typeof se==typeof ge&&se>=ge}],"filter-id->=":[st,[Pt],(G,[P])=>{let W=G.id(),se=P.value;return typeof W==typeof se&&W>=se}],"filter-has":[st,[Pt],(G,[P])=>P.value in G.properties()],"filter-has-id":[st,[],G=>G.id()!==null&&G.id()!==void 0],"filter-type-in":[st,[Ee(ut)],(G,[P])=>P.value.indexOf(G.geometryType())>=0],"filter-id-in":[st,[Ee(Pt)],(G,[P])=>P.value.indexOf(G.id())>=0],"filter-in-small":[st,[ut,Ee(Pt)],(G,[P,W])=>W.value.indexOf(G.properties()[P.value])>=0],"filter-in-large":[st,[ut,Ee(Pt)],(G,[P,W])=>function(se,ge,ke,Pe){for(;ke<=Pe;){let Ye=ke+Pe>>1;if(ge[Ye]===se)return!0;ge[Ye]>se?Pe=Ye-1:ke=Ye+1}return!1}(G.properties()[P.value],W.value,0,W.value.length-1)],all:{type:st,overloads:[[[st,st],(G,[P,W])=>P.evaluate(G)&&W.evaluate(G)],[oc(st),(G,P)=>{for(let W of P)if(!W.evaluate(G))return!1;return!0}]]},any:{type:st,overloads:[[[st,st],(G,[P,W])=>P.evaluate(G)||W.evaluate(G)],[oc(st),(G,P)=>{for(let W of P)if(W.evaluate(G))return!0;return!1}]]},"!":[st,[st],(G,[P])=>!P.evaluate(G)],"is-supported-script":[st,[ut],(G,[P])=>{let W=G.globals&&G.globals.isSupportedScript;return!W||W(P.evaluate(G))}],upcase:[ut,[ut],(G,[P])=>P.evaluate(G).toUpperCase()],downcase:[ut,[ut],(G,[P])=>P.evaluate(G).toLowerCase()],concat:[ut,oc(Pt),(G,P)=>P.map(W=>bi(W.evaluate(G))).join("")],"resolved-locale":[ut,[Zt],(G,[P])=>P.evaluate(G).resolvedLocale()]});class tu{constructor(P,W){var se;this.expression=P,this._warningHistory={},this._evaluator=new ar,this._defaultValue=W?(se=W).type==="color"&&Lc(se.default)?new xa(0,0,0,0):se.type==="color"?xa.parse(se.default)||null:se.type==="padding"?Yn.parse(se.default)||null:se.type==="variableAnchorOffsetCollection"?vi.parse(se.default)||null:se.default===void 0?null:se.default:null,this._enumValues=W&&W.type==="enum"?W.values:null}evaluateWithoutErrorHandling(P,W,se,ge,ke,Pe){return this._evaluator.globals=P,this._evaluator.feature=W,this._evaluator.featureState=se,this._evaluator.canonical=ge,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Pe,this.expression.evaluate(this._evaluator)}evaluate(P,W,se,ge,ke,Pe){this._evaluator.globals=P,this._evaluator.feature=W||null,this._evaluator.featureState=se||null,this._evaluator.canonical=ge,this._evaluator.availableImages=ke||null,this._evaluator.formattedSection=Pe||null;try{let Ye=this.expression.evaluate(this._evaluator);if(Ye==null||typeof Ye=="number"&&Ye!=Ye)return this._defaultValue;if(this._enumValues&&!(Ye in this._enumValues))throw new $a(`Expected value to be one of ${Object.keys(this._enumValues).map(at=>JSON.stringify(at)).join(", ")}, but found ${JSON.stringify(Ye)} instead.`);return Ye}catch(Ye){return this._warningHistory[Ye.message]||(this._warningHistory[Ye.message]=!0,typeof console<"u"&&console.warn(Ye.message)),this._defaultValue}}}function xf(G){return Array.isArray(G)&&G.length>0&&typeof G[0]=="string"&&G[0]in nc}function Es(G,P){let W=new cr(nc,Xc,[],P?function(ge){let ke={color:yt,string:ut,number:je,enum:ut,boolean:st,formatted:vr,padding:Nt,resolvedImage:Kt,variableAnchorOffsetCollection:nt};return ge.type==="array"?Ee(ke[ge.value]||Pt,ge.length):ke[ge.type]}(P):void 0),se=W.parse(G,void 0,void 0,void 0,P&&P.type==="string"?{typeAnnotation:"coerce"}:void 0);return se?eu(new tu(se,P)):sc(W.errors)}class zu{constructor(P,W){this.kind=P,this._styleExpression=W,this.isStateDependent=P!=="constant"&&!Ql(W.expression)}evaluateWithoutErrorHandling(P,W,se,ge,ke,Pe){return this._styleExpression.evaluateWithoutErrorHandling(P,W,se,ge,ke,Pe)}evaluate(P,W,se,ge,ke,Pe){return this._styleExpression.evaluate(P,W,se,ge,ke,Pe)}}class Fl{constructor(P,W,se,ge){this.kind=P,this.zoomStops=se,this._styleExpression=W,this.isStateDependent=P!=="camera"&&!Ql(W.expression),this.interpolationType=ge}evaluateWithoutErrorHandling(P,W,se,ge,ke,Pe){return this._styleExpression.evaluateWithoutErrorHandling(P,W,se,ge,ke,Pe)}evaluate(P,W,se,ge,ke,Pe){return this._styleExpression.evaluate(P,W,se,ge,ke,Pe)}interpolationFactor(P,W,se){return this.interpolationType?jn.interpolationFactor(this.interpolationType,P,W,se):0}}function Ku(G,P){let W=Es(G,P);if(W.result==="error")return W;let se=W.value.expression,ge=Zc(se);if(!ge&&!qs(P))return sc([new be("","data expressions not supported")]);let ke=Cc(se,["zoom"]);if(!ke&&!lc(P))return sc([new be("","zoom expressions not supported")]);let Pe=$c(se);return Pe||ke?Pe instanceof be?sc([Pe]):Pe instanceof jn&&!Fu(P)?sc([new be("",'"interpolate" expressions cannot be used with this property')]):eu(Pe?new Fl(ge?"camera":"composite",W.value,Pe.labels,Pe instanceof jn?Pe.interpolation:void 0):new zu(ge?"constant":"source",W.value)):sc([new be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class wc{constructor(P,W){this._parameters=P,this._specification=W,ne(this,yf(this._parameters,this._specification))}static deserialize(P){return new wc(P._parameters,P._specification)}static serialize(P){return{_parameters:P._parameters,_specification:P._specification}}}function $c(G){let P=null;if(G instanceof tr)P=$c(G.result);else if(G instanceof Qi){for(let W of G.args)if(P=$c(W),P)break}else(G instanceof Xr||G instanceof jn)&&G.input instanceof rl&&G.input.name==="zoom"&&(P=G);return P instanceof be||G.eachChild(W=>{let se=$c(W);se instanceof be?P=se:!P&&se?P=new be("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):P&&se&&P!==se&&(P=new be("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),P}function bf(G){if(G===!0||G===!1)return!0;if(!Array.isArray(G)||G.length===0)return!1;switch(G[0]){case"has":return G.length>=2&&G[1]!=="$id"&&G[1]!=="$type";case"in":return G.length>=3&&(typeof G[1]!="string"||Array.isArray(G[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return G.length!==3||Array.isArray(G[1])||Array.isArray(G[2]);case"any":case"all":for(let P of G.slice(1))if(!bf(P)&&typeof P!="boolean")return!1;return!0;default:return!0}}let vu={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Bu(G){if(G==null)return{filter:()=>!0,needGeometry:!1};bf(G)||(G=Ac(G));let P=Es(G,vu);if(P.result==="error")throw new Error(P.value.map(W=>`${W.key}: ${W.message}`).join(", "));return{filter:(W,se,ge)=>P.value.evaluate(W,se,{},ge),needGeometry:wh(G)}}function Tu(G,P){return GP?1:0}function wh(G){if(!Array.isArray(G))return!1;if(G[0]==="within"||G[0]==="distance")return!0;for(let P=1;P"||P==="<="||P===">="?Qf(G[1],G[2],P):P==="any"?(W=G.slice(1),["any"].concat(W.map(Ac))):P==="all"?["all"].concat(G.slice(1).map(Ac)):P==="none"?["all"].concat(G.slice(1).map(Ac).map($s)):P==="in"?Vl(G[1],G.slice(2)):P==="!in"?$s(Vl(G[1],G.slice(2))):P==="has"?uc(G[1]):P!=="!has"||$s(uc(G[1]));var W}function Qf(G,P,W){switch(G){case"$type":return[`filter-type-${W}`,P];case"$id":return[`filter-id-${W}`,P];default:return[`filter-${W}`,G,P]}}function Vl(G,P){if(P.length===0)return!1;switch(G){case"$type":return["filter-type-in",["literal",P]];case"$id":return["filter-id-in",["literal",P]];default:return P.length>200&&!P.some(W=>typeof W!=typeof P[0])?["filter-in-large",G,["literal",P.sort(Tu)]]:["filter-in-small",G,["literal",P]]}}function uc(G){switch(G){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",G]}}function $s(G){return["!",G]}function Ju(G){let P=typeof G;if(P==="number"||P==="boolean"||P==="string"||G==null)return JSON.stringify(G);if(Array.isArray(G)){let ge="[";for(let ke of G)ge+=`${Ju(ke)},`;return`${ge}]`}let W=Object.keys(G).sort(),se="{";for(let ge=0;gese.maximum?[new le(P,W,`${W} is greater than the maximum value ${se.maximum}`)]:[]}function cc(G){let P=G.valueSpec,W=hs(G.value.type),se,ge,ke,Pe={},Ye=W!=="categorical"&&G.value.property===void 0,at=!Ye,pt=Ko(G.value.stops)==="array"&&Ko(G.value.stops[0])==="array"&&Ko(G.value.stops[0][0])==="object",Et=zl({key:G.key,value:G.value,valueSpec:G.styleSpec.function,validateSpec:G.validateSpec,style:G.style,styleSpec:G.styleSpec,objectElementValidators:{stops:function(sr){if(W==="identity")return[new le(sr.key,sr.value,'identity function may not have a "stops" property')];let xr=[],Er=sr.value;return xr=xr.concat(Jc({key:sr.key,value:Er,valueSpec:sr.valueSpec,validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec,arrayElementValidator:Vt})),Ko(Er)==="array"&&Er.length===0&&xr.push(new le(sr.key,Er,"array must have at least one stop")),xr},default:function(sr){return sr.validateSpec({key:sr.key,value:sr.value,valueSpec:P,validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec})}}});return W==="identity"&&Ye&&Et.push(new le(G.key,G.value,'missing required property "property"')),W==="identity"||G.value.stops||Et.push(new le(G.key,G.value,'missing required property "stops"')),W==="exponential"&&G.valueSpec.expression&&!Fu(G.valueSpec)&&Et.push(new le(G.key,G.value,"exponential functions not supported")),G.styleSpec.$version>=8&&(at&&!qs(G.valueSpec)?Et.push(new le(G.key,G.value,"property functions not supported")):Ye&&!lc(G.valueSpec)&&Et.push(new le(G.key,G.value,"zoom functions not supported"))),W!=="categorical"&&!pt||G.value.property!==void 0||Et.push(new le(G.key,G.value,'"property" property is required')),Et;function Vt(sr){let xr=[],Er=sr.value,Qr=sr.key;if(Ko(Er)!=="array")return[new le(Qr,Er,`array expected, ${Ko(Er)} found`)];if(Er.length!==2)return[new le(Qr,Er,`array length 2 expected, length ${Er.length} found`)];if(pt){if(Ko(Er[0])!=="object")return[new le(Qr,Er,`object expected, ${Ko(Er[0])} found`)];if(Er[0].zoom===void 0)return[new le(Qr,Er,"object stop key must have zoom")];if(Er[0].value===void 0)return[new le(Qr,Er,"object stop key must have value")];if(ke&&ke>hs(Er[0].zoom))return[new le(Qr,Er[0].zoom,"stop zoom values must appear in ascending order")];hs(Er[0].zoom)!==ke&&(ke=hs(Er[0].zoom),ge=void 0,Pe={}),xr=xr.concat(zl({key:`${Qr}[0]`,value:Er[0],valueSpec:{zoom:{}},validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec,objectElementValidators:{zoom:Qc,value:er}}))}else xr=xr.concat(er({key:`${Qr}[0]`,value:Er[0],valueSpec:{},validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec},Er));return xf(kl(Er[1]))?xr.concat([new le(`${Qr}[1]`,Er[1],"expressions are not allowed in function stops.")]):xr.concat(sr.validateSpec({key:`${Qr}[1]`,value:Er[1],valueSpec:P,validateSpec:sr.validateSpec,style:sr.style,styleSpec:sr.styleSpec}))}function er(sr,xr){let Er=Ko(sr.value),Qr=hs(sr.value),la=sr.value!==null?sr.value:xr;if(se){if(Er!==se)return[new le(sr.key,la,`${Er} stop domain type must match previous stop domain type ${se}`)]}else se=Er;if(Er!=="number"&&Er!=="string"&&Er!=="boolean")return[new le(sr.key,la,"stop domain value must be a number, string, or boolean")];if(Er!=="number"&&W!=="categorical"){let Ka=`number expected, ${Er} found`;return qs(P)&&W===void 0&&(Ka+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new le(sr.key,la,Ka)]}return W!=="categorical"||Er!=="number"||isFinite(Qr)&&Math.floor(Qr)===Qr?W!=="categorical"&&Er==="number"&&ge!==void 0&&Qrnew le(`${G.key}${se.key}`,G.value,se.message));let W=P.value.expression||P.value._styleExpression.expression;if(G.expressionContext==="property"&&G.propertyKey==="text-font"&&!W.outputDefined())return[new le(G.key,G.value,`Invalid data expression for "${G.propertyKey}". Output values must be contained as literals within the expression.`)];if(G.expressionContext==="property"&&G.propertyType==="layout"&&!Ql(W))return[new le(G.key,G.value,'"feature-state" data expressions are not supported with layout properties.')];if(G.expressionContext==="filter"&&!Ql(W))return[new le(G.key,G.value,'"feature-state" data expressions are not supported with filters.')];if(G.expressionContext&&G.expressionContext.indexOf("cluster")===0){if(!Cc(W,["zoom","feature-state"]))return[new le(G.key,G.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(G.expressionContext==="cluster-initial"&&!Zc(W))return[new le(G.key,G.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function ru(G){let P=G.key,W=G.value,se=G.valueSpec,ge=[];return Array.isArray(se.values)?se.values.indexOf(hs(W))===-1&&ge.push(new le(P,W,`expected one of [${se.values.join(", ")}], ${JSON.stringify(W)} found`)):Object.keys(se.values).indexOf(hs(W))===-1&&ge.push(new le(P,W,`expected one of [${Object.keys(se.values).join(", ")}], ${JSON.stringify(W)} found`)),ge}function Rc(G){return bf(kl(G.value))?fc(ne({},G,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Qu(G)}function Qu(G){let P=G.value,W=G.key;if(Ko(P)!=="array")return[new le(W,P,`array expected, ${Ko(P)} found`)];let se=G.styleSpec,ge,ke=[];if(P.length<1)return[new le(W,P,"filter array must have at least 1 element")];switch(ke=ke.concat(ru({key:`${W}[0]`,value:P[0],valueSpec:se.filter_operator,style:G.style,styleSpec:G.styleSpec})),hs(P[0])){case"<":case"<=":case">":case">=":P.length>=2&&hs(P[1])==="$type"&&ke.push(new le(W,P,`"$type" cannot be use with operator "${P[0]}"`));case"==":case"!=":P.length!==3&&ke.push(new le(W,P,`filter array for operator "${P[0]}" must have 3 elements`));case"in":case"!in":P.length>=2&&(ge=Ko(P[1]),ge!=="string"&&ke.push(new le(`${W}[1]`,P[1],`string expected, ${ge} found`)));for(let Pe=2;Pe{pt in W&&P.push(new le(se,W[pt],`"${pt}" is prohibited for ref layers`))}),ge.layers.forEach(pt=>{hs(pt.id)===Ye&&(at=pt)}),at?at.ref?P.push(new le(se,W.ref,"ref cannot reference another ref layer")):Pe=hs(at.type):P.push(new le(se,W.ref,`ref layer "${Ye}" not found`))}else if(Pe!=="background")if(W.source){let at=ge.sources&&ge.sources[W.source],pt=at&&hs(at.type);at?pt==="vector"&&Pe==="raster"?P.push(new le(se,W.source,`layer "${W.id}" requires a raster source`)):pt!=="raster-dem"&&Pe==="hillshade"?P.push(new le(se,W.source,`layer "${W.id}" requires a raster-dem source`)):pt==="raster"&&Pe!=="raster"?P.push(new le(se,W.source,`layer "${W.id}" requires a vector source`)):pt!=="vector"||W["source-layer"]?pt==="raster-dem"&&Pe!=="hillshade"?P.push(new le(se,W.source,"raster-dem source can only be used with layer type 'hillshade'.")):Pe!=="line"||!W.paint||!W.paint["line-gradient"]||pt==="geojson"&&at.lineMetrics||P.push(new le(se,W,`layer "${W.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):P.push(new le(se,W,`layer "${W.id}" must specify a "source-layer"`)):P.push(new le(se,W.source,`source "${W.source}" not found`))}else P.push(new le(se,W,'missing required property "source"'));return P=P.concat(zl({key:se,value:W,valueSpec:ke.layer,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,objectElementValidators:{"*":()=>[],type:()=>G.validateSpec({key:`${se}.type`,value:W.type,valueSpec:ke.layer.type,style:G.style,styleSpec:G.styleSpec,validateSpec:G.validateSpec,object:W,objectKey:"type"}),filter:Rc,layout:at=>zl({layer:W,key:at.key,value:at.value,style:at.style,styleSpec:at.styleSpec,validateSpec:at.validateSpec,objectElementValidators:{"*":pt=>wf(ne({layerType:Pe},pt))}}),paint:at=>zl({layer:W,key:at.key,value:at.value,style:at.style,styleSpec:at.styleSpec,validateSpec:at.validateSpec,objectElementValidators:{"*":pt=>tf(ne({layerType:Pe},pt))}})}})),P}function Ic(G){let P=G.value,W=G.key,se=Ko(P);return se!=="string"?[new le(W,P,`string expected, ${se} found`)]:[]}let Af={promoteId:function({key:G,value:P}){if(Ko(P)==="string")return Ic({key:G,value:P});{let W=[];for(let se in P)W.push(...Ic({key:`${G}.${se}`,value:P[se]}));return W}}};function Dc(G){let P=G.value,W=G.key,se=G.styleSpec,ge=G.style,ke=G.validateSpec;if(!P.type)return[new le(W,P,'"type" is required')];let Pe=hs(P.type),Ye;switch(Pe){case"vector":case"raster":return Ye=zl({key:W,value:P,valueSpec:se[`source_${Pe.replace("-","_")}`],style:G.style,styleSpec:se,objectElementValidators:Af,validateSpec:ke}),Ye;case"raster-dem":return Ye=function(at){var pt;let Et=(pt=at.sourceName)!==null&&pt!==void 0?pt:"",Vt=at.value,er=at.styleSpec,sr=er.source_raster_dem,xr=at.style,Er=[],Qr=Ko(Vt);if(Vt===void 0)return Er;if(Qr!=="object")return Er.push(new le("source_raster_dem",Vt,`object expected, ${Qr} found`)),Er;let la=hs(Vt.encoding)==="custom",Ka=["redFactor","greenFactor","blueFactor","baseShift"],Ma=at.value.encoding?`"${at.value.encoding}"`:"Default";for(let qa in Vt)!la&&Ka.includes(qa)?Er.push(new le(qa,Vt[qa],`In "${Et}": "${qa}" is only valid when "encoding" is set to "custom". ${Ma} encoding found`)):sr[qa]?Er=Er.concat(at.validateSpec({key:qa,value:Vt[qa],valueSpec:sr[qa],validateSpec:at.validateSpec,style:xr,styleSpec:er})):Er.push(new le(qa,Vt[qa],`unknown property "${qa}"`));return Er}({sourceName:W,value:P,style:G.style,styleSpec:se,validateSpec:ke}),Ye;case"geojson":if(Ye=zl({key:W,value:P,valueSpec:se.source_geojson,style:ge,styleSpec:se,validateSpec:ke,objectElementValidators:Af}),P.cluster)for(let at in P.clusterProperties){let[pt,Et]=P.clusterProperties[at],Vt=typeof pt=="string"?[pt,["accumulated"],["get",at]]:pt;Ye.push(...fc({key:`${W}.${at}.map`,value:Et,validateSpec:ke,expressionContext:"cluster-map"})),Ye.push(...fc({key:`${W}.${at}.reduce`,value:Vt,validateSpec:ke,expressionContext:"cluster-reduce"}))}return Ye;case"video":return zl({key:W,value:P,valueSpec:se.source_video,style:ge,validateSpec:ke,styleSpec:se});case"image":return zl({key:W,value:P,valueSpec:se.source_image,style:ge,validateSpec:ke,styleSpec:se});case"canvas":return[new le(W,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ru({key:`${W}.type`,value:P.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:ge,validateSpec:ke,styleSpec:se})}}function yl(G){let P=G.value,W=G.styleSpec,se=W.light,ge=G.style,ke=[],Pe=Ko(P);if(P===void 0)return ke;if(Pe!=="object")return ke=ke.concat([new le("light",P,`object expected, ${Pe} found`)]),ke;for(let Ye in P){let at=Ye.match(/^(.*)-transition$/);ke=ke.concat(at&&se[at[1]]&&se[at[1]].transition?G.validateSpec({key:Ye,value:P[Ye],valueSpec:W.transition,validateSpec:G.validateSpec,style:ge,styleSpec:W}):se[Ye]?G.validateSpec({key:Ye,value:P[Ye],valueSpec:se[Ye],validateSpec:G.validateSpec,style:ge,styleSpec:W}):[new le(Ye,P[Ye],`unknown property "${Ye}"`)])}return ke}function Mu(G){let P=G.value,W=G.styleSpec,se=W.sky,ge=G.style,ke=Ko(P);if(P===void 0)return[];if(ke!=="object")return[new le("sky",P,`object expected, ${ke} found`)];let Pe=[];for(let Ye in P)Pe=Pe.concat(se[Ye]?G.validateSpec({key:Ye,value:P[Ye],valueSpec:se[Ye],style:ge,styleSpec:W}):[new le(Ye,P[Ye],`unknown property "${Ye}"`)]);return Pe}function Tf(G){let P=G.value,W=G.styleSpec,se=W.terrain,ge=G.style,ke=[],Pe=Ko(P);if(P===void 0)return ke;if(Pe!=="object")return ke=ke.concat([new le("terrain",P,`object expected, ${Pe} found`)]),ke;for(let Ye in P)ke=ke.concat(se[Ye]?G.validateSpec({key:Ye,value:P[Ye],valueSpec:se[Ye],validateSpec:G.validateSpec,style:ge,styleSpec:W}):[new le(Ye,P[Ye],`unknown property "${Ye}"`)]);return ke}function th(G){let P=[],W=G.value,se=G.key;if(Array.isArray(W)){let ge=[],ke=[];for(let Pe in W)W[Pe].id&&ge.includes(W[Pe].id)&&P.push(new le(se,W,`all the sprites' ids must be unique, but ${W[Pe].id} is duplicated`)),ge.push(W[Pe].id),W[Pe].url&&ke.includes(W[Pe].url)&&P.push(new le(se,W,`all the sprites' URLs must be unique, but ${W[Pe].url} is duplicated`)),ke.push(W[Pe].url),P=P.concat(zl({key:`${se}[${Pe}]`,value:W[Pe],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:G.validateSpec}));return P}return Ic({key:se,value:W})}let Fc={"*":()=>[],array:Jc,boolean:function(G){let P=G.value,W=G.key,se=Ko(P);return se!=="boolean"?[new le(W,P,`boolean expected, ${se} found`)]:[]},number:Qc,color:function(G){let P=G.key,W=G.value,se=Ko(W);return se!=="string"?[new le(P,W,`color expected, ${se} found`)]:xa.parse(String(W))?[]:[new le(P,W,`color expected, "${W}" found`)]},constants:Kc,enum:ru,filter:Rc,function:cc,layer:eh,object:zl,source:Dc,light:yl,sky:Mu,terrain:Tf,projection:function(G){let P=G.value,W=G.styleSpec,se=W.projection,ge=G.style,ke=Ko(P);if(P===void 0)return[];if(ke!=="object")return[new le("projection",P,`object expected, ${ke} found`)];let Pe=[];for(let Ye in P)Pe=Pe.concat(se[Ye]?G.validateSpec({key:Ye,value:P[Ye],valueSpec:se[Ye],style:ge,styleSpec:W}):[new le(Ye,P[Ye],`unknown property "${Ye}"`)]);return Pe},string:Ic,formatted:function(G){return Ic(G).length===0?[]:fc(G)},resolvedImage:function(G){return Ic(G).length===0?[]:fc(G)},padding:function(G){let P=G.key,W=G.value;if(Ko(W)==="array"){if(W.length<1||W.length>4)return[new le(P,W,`padding requires 1 to 4 values; ${W.length} values found`)];let se={type:"number"},ge=[];for(let ke=0;ke[]}})),G.constants&&(W=W.concat(Kc({key:"constants",value:G.constants,style:G,styleSpec:P,validateSpec:Ou}))),dr(W)}function yr(G){return function(P){return G(co(Si({},P),{validateSpec:Ou}))}}function dr(G){return[].concat(G).sort((P,W)=>P.line-W.line)}function Wr(G){return function(...P){return dr(G.apply(this,P))}}jt.source=Wr(yr(Dc)),jt.sprite=Wr(yr(th)),jt.glyphs=Wr(yr(Tt)),jt.light=Wr(yr(yl)),jt.sky=Wr(yr(Mu)),jt.terrain=Wr(yr(Tf)),jt.layer=Wr(yr(eh)),jt.filter=Wr(yr(Rc)),jt.paintProperty=Wr(yr(tf)),jt.layoutProperty=Wr(yr(wf));let ma=jt,za=ma.light,Ja=ma.sky,nn=ma.paintProperty,Tn=ma.layoutProperty;function Ba(G,P){let W=!1;if(P&&P.length)for(let se of P)G.fire(new Z(new Error(se.message))),W=!0;return W}class Na{constructor(P,W,se){let ge=this.cells=[];if(P instanceof ArrayBuffer){this.arrayBuffer=P;let Pe=new Int32Array(this.arrayBuffer);P=Pe[0],this.d=(W=Pe[1])+2*(se=Pe[2]);for(let at=0;at=Vt[xr+0]&&ge>=Vt[xr+1])?(Ye[sr]=!0,Pe.push(Et[sr])):Ye[sr]=!1}}}}_forEachCell(P,W,se,ge,ke,Pe,Ye,at){let pt=this._convertToCellCoord(P),Et=this._convertToCellCoord(W),Vt=this._convertToCellCoord(se),er=this._convertToCellCoord(ge);for(let sr=pt;sr<=Vt;sr++)for(let xr=Et;xr<=er;xr++){let Er=this.d*xr+sr;if((!at||at(this._convertFromCellCoord(sr),this._convertFromCellCoord(xr),this._convertFromCellCoord(sr+1),this._convertFromCellCoord(xr+1)))&&ke.call(this,P,W,se,ge,Er,Pe,Ye,at))return}}_convertFromCellCoord(P){return(P-this.padding)/this.scale}_convertToCellCoord(P){return Math.max(0,Math.min(this.d-1,Math.floor(P*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let P=this.cells,W=3+this.cells.length+1+1,se=0;for(let Pe=0;Pe=0)continue;let Pe=G[ke];ge[ke]=Xa[W].shallow.indexOf(ke)>=0?Pe:fi(Pe,P)}G instanceof Error&&(ge.message=G.message)}if(ge.$name)throw new Error("$name property is reserved for worker serialization logic.");return W!=="Object"&&(ge.$name=W),ge}function Ti(G){if(pi(G))return G;if(Array.isArray(G))return G.map(Ti);if(typeof G!="object")throw new Error("can't deserialize object of type "+typeof G);let P=ci(G)||"Object";if(!Xa[P])throw new Error(`can't deserialize unregistered class ${P}`);let{klass:W}=Xa[P];if(!W)throw new Error(`can't deserialize unregistered class ${P}`);if(W.deserialize)return W.deserialize(G);let se=Object.create(W.prototype);for(let ge of Object.keys(G)){if(ge==="$name")continue;let ke=G[ge];se[ge]=Xa[P].shallow.indexOf(ge)>=0?ke:Ti(ke)}return se}class Un{constructor(){this.first=!0}update(P,W){let se=Math.floor(P);return this.first?(this.first=!1,this.lastIntegerZoom=se,this.lastIntegerZoomTime=0,this.lastZoom=P,this.lastFloorZoom=se,!0):(this.lastFloorZoom>se?(this.lastIntegerZoom=se+1,this.lastIntegerZoomTime=W):this.lastFloorZoomG>=128&&G<=255,"Hangul Jamo":G=>G>=4352&&G<=4607,Khmer:G=>G>=6016&&G<=6143,"General Punctuation":G=>G>=8192&&G<=8303,"Letterlike Symbols":G=>G>=8448&&G<=8527,"Number Forms":G=>G>=8528&&G<=8591,"Miscellaneous Technical":G=>G>=8960&&G<=9215,"Control Pictures":G=>G>=9216&&G<=9279,"Optical Character Recognition":G=>G>=9280&&G<=9311,"Enclosed Alphanumerics":G=>G>=9312&&G<=9471,"Geometric Shapes":G=>G>=9632&&G<=9727,"Miscellaneous Symbols":G=>G>=9728&&G<=9983,"Miscellaneous Symbols and Arrows":G=>G>=11008&&G<=11263,"Ideographic Description Characters":G=>G>=12272&&G<=12287,"CJK Symbols and Punctuation":G=>G>=12288&&G<=12351,Katakana:G=>G>=12448&&G<=12543,Kanbun:G=>G>=12688&&G<=12703,"CJK Strokes":G=>G>=12736&&G<=12783,"Enclosed CJK Letters and Months":G=>G>=12800&&G<=13055,"CJK Compatibility":G=>G>=13056&&G<=13311,"Yijing Hexagram Symbols":G=>G>=19904&&G<=19967,"Private Use Area":G=>G>=57344&&G<=63743,"Vertical Forms":G=>G>=65040&&G<=65055,"CJK Compatibility Forms":G=>G>=65072&&G<=65103,"Small Form Variants":G=>G>=65104&&G<=65135,"Halfwidth and Fullwidth Forms":G=>G>=65280&&G<=65519};function Oi(G){for(let P of G)if(ko(P.charCodeAt(0)))return!0;return!1}function ao(G){for(let P of G)if(!Oo(P.charCodeAt(0)))return!1;return!0}function Lo(G){let P=G.map(W=>{try{return new RegExp(`\\p{sc=${W}}`,"u").source}catch{return null}}).filter(W=>W);return new RegExp(P.join("|"),"u")}let us=Lo(["Arab","Dupl","Mong","Ougr","Syrc"]);function Oo(G){return!us.test(String.fromCodePoint(G))}let _s=Lo(["Bopo","Hani","Hira","Kana","Kits","Nshu","Tang","Yiii"]);function ko(G){return!(G!==746&&G!==747&&(G<4352||!(_n["CJK Compatibility Forms"](G)&&!(G>=65097&&G<=65103)||_n["CJK Compatibility"](G)||_n["CJK Strokes"](G)||!(!_n["CJK Symbols and Punctuation"](G)||G>=12296&&G<=12305||G>=12308&&G<=12319||G===12336)||_n["Enclosed CJK Letters and Months"](G)||_n["Ideographic Description Characters"](G)||_n.Kanbun(G)||_n.Katakana(G)&&G!==12540||!(!_n["Halfwidth and Fullwidth Forms"](G)||G===65288||G===65289||G===65293||G>=65306&&G<=65310||G===65339||G===65341||G===65343||G>=65371&&G<=65503||G===65507||G>=65512&&G<=65519)||!(!_n["Small Form Variants"](G)||G>=65112&&G<=65118||G>=65123&&G<=65126)||_n["Vertical Forms"](G)||_n["Yijing Hexagram Symbols"](G)||new RegExp("\\p{sc=Cans}","u").test(String.fromCodePoint(G))||new RegExp("\\p{sc=Hang}","u").test(String.fromCodePoint(G))||_s.test(String.fromCodePoint(G)))))}function fl(G){return!(ko(G)||function(P){return!!(_n["Latin-1 Supplement"](P)&&(P===167||P===169||P===174||P===177||P===188||P===189||P===190||P===215||P===247)||_n["General Punctuation"](P)&&(P===8214||P===8224||P===8225||P===8240||P===8241||P===8251||P===8252||P===8258||P===8263||P===8264||P===8265||P===8273)||_n["Letterlike Symbols"](P)||_n["Number Forms"](P)||_n["Miscellaneous Technical"](P)&&(P>=8960&&P<=8967||P>=8972&&P<=8991||P>=8996&&P<=9e3||P===9003||P>=9085&&P<=9114||P>=9150&&P<=9165||P===9167||P>=9169&&P<=9179||P>=9186&&P<=9215)||_n["Control Pictures"](P)&&P!==9251||_n["Optical Character Recognition"](P)||_n["Enclosed Alphanumerics"](P)||_n["Geometric Shapes"](P)||_n["Miscellaneous Symbols"](P)&&!(P>=9754&&P<=9759)||_n["Miscellaneous Symbols and Arrows"](P)&&(P>=11026&&P<=11055||P>=11088&&P<=11097||P>=11192&&P<=11243)||_n["CJK Symbols and Punctuation"](P)||_n.Katakana(P)||_n["Private Use Area"](P)||_n["CJK Compatibility Forms"](P)||_n["Small Form Variants"](P)||_n["Halfwidth and Fullwidth Forms"](P)||P===8734||P===8756||P===8757||P>=9984&&P<=10087||P>=10102&&P<=10131||P===65532||P===65533)}(G))}let Os=Lo(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function cs(G){return Os.test(String.fromCodePoint(G))}function ai(G,P){return!(!P&&cs(G)||G>=2304&&G<=3583||G>=3840&&G<=4255||_n.Khmer(G))}function Xo(G){for(let P of G)if(cs(P.charCodeAt(0)))return!0;return!1}let os=new class{constructor(){this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null}setState(G){this.pluginStatus=G.pluginStatus,this.pluginURL=G.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(G){this.applyArabicShaping=G.applyArabicShaping,this.processBidirectionalText=G.processBidirectionalText,this.processStyledBidirectionalText=G.processStyledBidirectionalText}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getPluginURL(){return this.pluginURL}getRTLTextPluginStatus(){return this.pluginStatus}};class Do{constructor(P,W){this.zoom=P,W?(this.now=W.now,this.fadeDuration=W.fadeDuration,this.zoomHistory=W.zoomHistory,this.transition=W.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Un,this.transition={})}isSupportedScript(P){return function(W,se){for(let ge of W)if(!ai(ge.charCodeAt(0),se))return!1;return!0}(P,os.getRTLTextPluginStatus()==="loaded")}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let P=this.zoom,W=P-Math.floor(P),se=this.crossFadingFactor();return P>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:W+(1-W)*se}:{fromScale:.5,toScale:1,t:1-(1-se)*W}}}class al{constructor(P,W){this.property=P,this.value=W,this.expression=function(se,ge){if(Lc(se))return new wc(se,ge);if(xf(se)){let ke=Ku(se,ge);if(ke.result==="error")throw new Error(ke.value.map(Pe=>`${Pe.key}: ${Pe.message}`).join(", "));return ke.value}{let ke=se;return ge.type==="color"&&typeof se=="string"?ke=xa.parse(se):ge.type!=="padding"||typeof se!="number"&&!Array.isArray(se)?ge.type==="variableAnchorOffsetCollection"&&Array.isArray(se)&&(ke=vi.parse(se)):ke=Yn.parse(se),{kind:"constant",evaluate:()=>ke}}}(W===void 0?P.specification.default:W,P.specification)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}possiblyEvaluate(P,W,se){return this.property.possiblyEvaluate(this,P,W,se)}}class pu{constructor(P){this.property=P,this.value=new al(P,void 0)}transitioned(P,W){return new Nu(this.property,this.value,W,E({},P.transition,this.transition),P.now)}untransitioned(){return new Nu(this.property,this.value,null,{},0)}}class au{constructor(P){this._properties=P,this._values=Object.create(P.defaultTransitionablePropertyValues)}getValue(P){return h(this._values[P].value.value)}setValue(P,W){Object.prototype.hasOwnProperty.call(this._values,P)||(this._values[P]=new pu(this._values[P].property)),this._values[P].value=new al(this._values[P].property,W===null?void 0:h(W))}getTransition(P){return h(this._values[P].transition)}setTransition(P,W){Object.prototype.hasOwnProperty.call(this._values,P)||(this._values[P]=new pu(this._values[P].property)),this._values[P].transition=h(W)||void 0}serialize(){let P={};for(let W of Object.keys(this._values)){let se=this.getValue(W);se!==void 0&&(P[W]=se);let ge=this.getTransition(W);ge!==void 0&&(P[`${W}-transition`]=ge)}return P}transitioned(P,W){let se=new _l(this._properties);for(let ge of Object.keys(this._values))se._values[ge]=this._values[ge].transitioned(P,W._values[ge]);return se}untransitioned(){let P=new _l(this._properties);for(let W of Object.keys(this._values))P._values[W]=this._values[W].untransitioned();return P}}class Nu{constructor(P,W,se,ge,ke){this.property=P,this.value=W,this.begin=ke+ge.delay||0,this.end=this.begin+ge.duration||0,P.specification.transition&&(ge.delay||ge.duration)&&(this.prior=se)}possiblyEvaluate(P,W,se){let ge=P.now||0,ke=this.value.possiblyEvaluate(P,W,se),Pe=this.prior;if(Pe){if(ge>this.end)return this.prior=null,ke;if(this.value.isDataDriven())return this.prior=null,ke;if(ge=1)return 1;let pt=at*at,Et=pt*at;return 4*(at<.5?Et:3*(at-pt)+Et-.75)}(Ye))}}return ke}}class _l{constructor(P){this._properties=P,this._values=Object.create(P.defaultTransitioningPropertyValues)}possiblyEvaluate(P,W,se){let ge=new hc(this._properties);for(let ke of Object.keys(this._values))ge._values[ke]=this._values[ke].possiblyEvaluate(P,W,se);return ge}hasTransition(){for(let P of Object.keys(this._values))if(this._values[P].prior)return!0;return!1}}class Su{constructor(P){this._properties=P,this._values=Object.create(P.defaultPropertyValues)}hasValue(P){return this._values[P].value!==void 0}getValue(P){return h(this._values[P].value)}setValue(P,W){this._values[P]=new al(this._values[P].property,W===null?void 0:h(W))}serialize(){let P={};for(let W of Object.keys(this._values)){let se=this.getValue(W);se!==void 0&&(P[W]=se)}return P}possiblyEvaluate(P,W,se){let ge=new hc(this._properties);for(let ke of Object.keys(this._values))ge._values[ke]=this._values[ke].possiblyEvaluate(P,W,se);return ge}}class xl{constructor(P,W,se){this.property=P,this.value=W,this.parameters=se}isConstant(){return this.value.kind==="constant"}constantOr(P){return this.value.kind==="constant"?this.value.value:P}evaluate(P,W,se,ge){return this.property.evaluate(this.value,this.parameters,P,W,se,ge)}}class hc{constructor(P){this._properties=P,this._values=Object.create(P.defaultPossiblyEvaluatedValues)}get(P){return this._values[P]}}class ki{constructor(P){this.specification=P}possiblyEvaluate(P,W){if(P.isDataDriven())throw new Error("Value should not be data driven");return P.expression.evaluate(W)}interpolate(P,W,se){let ge=ui[this.specification.type];return ge?ge(P,W,se):P}}class Xi{constructor(P,W){this.specification=P,this.overrides=W}possiblyEvaluate(P,W,se,ge){return new xl(this,P.expression.kind==="constant"||P.expression.kind==="camera"?{kind:"constant",value:P.expression.evaluate(W,null,{},se,ge)}:P.expression,W)}interpolate(P,W,se){if(P.value.kind!=="constant"||W.value.kind!=="constant")return P;if(P.value.value===void 0||W.value.value===void 0)return new xl(this,{kind:"constant",value:void 0},P.parameters);let ge=ui[this.specification.type];if(ge){let ke=ge(P.value.value,W.value.value,se);return new xl(this,{kind:"constant",value:ke},P.parameters)}return P}evaluate(P,W,se,ge,ke,Pe){return P.kind==="constant"?P.value:P.evaluate(W,se,ge,ke,Pe)}}class jf extends Xi{possiblyEvaluate(P,W,se,ge){if(P.value===void 0)return new xl(this,{kind:"constant",value:void 0},W);if(P.expression.kind==="constant"){let ke=P.expression.evaluate(W,null,{},se,ge),Pe=P.property.specification.type==="resolvedImage"&&typeof ke!="string"?ke.name:ke,Ye=this._calculate(Pe,Pe,Pe,W);return new xl(this,{kind:"constant",value:Ye},W)}if(P.expression.kind==="camera"){let ke=this._calculate(P.expression.evaluate({zoom:W.zoom-1}),P.expression.evaluate({zoom:W.zoom}),P.expression.evaluate({zoom:W.zoom+1}),W);return new xl(this,{kind:"constant",value:ke},W)}return new xl(this,P.expression,W)}evaluate(P,W,se,ge,ke,Pe){if(P.kind==="source"){let Ye=P.evaluate(W,se,ge,ke,Pe);return this._calculate(Ye,Ye,Ye,W)}return P.kind==="composite"?this._calculate(P.evaluate({zoom:Math.floor(W.zoom)-1},se,ge),P.evaluate({zoom:Math.floor(W.zoom)},se,ge),P.evaluate({zoom:Math.floor(W.zoom)+1},se,ge),W):P.value}_calculate(P,W,se,ge){return ge.zoom>ge.zoomHistory.lastIntegerZoom?{from:P,to:W}:{from:se,to:W}}interpolate(P){return P}}class zc{constructor(P){this.specification=P}possiblyEvaluate(P,W,se,ge){if(P.value!==void 0){if(P.expression.kind==="constant"){let ke=P.expression.evaluate(W,null,{},se,ge);return this._calculate(ke,ke,ke,W)}return this._calculate(P.expression.evaluate(new Do(Math.floor(W.zoom-1),W)),P.expression.evaluate(new Do(Math.floor(W.zoom),W)),P.expression.evaluate(new Do(Math.floor(W.zoom+1),W)),W)}}_calculate(P,W,se,ge){return ge.zoom>ge.zoomHistory.lastIntegerZoom?{from:P,to:W}:{from:se,to:W}}interpolate(P){return P}}class nu{constructor(P){this.specification=P}possiblyEvaluate(P,W,se,ge){return!!P.expression.evaluate(W,null,{},se,ge)}interpolate(){return!1}}class Me{constructor(P){this.properties=P,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let W in P){let se=P[W];se.specification.overridable&&this.overridableProperties.push(W);let ge=this.defaultPropertyValues[W]=new al(se,void 0),ke=this.defaultTransitionablePropertyValues[W]=new pu(se);this.defaultTransitioningPropertyValues[W]=ke.untransitioned(),this.defaultPossiblyEvaluatedValues[W]=ge.possiblyEvaluate({})}}}Aa("DataDrivenProperty",Xi),Aa("DataConstantProperty",ki),Aa("CrossFadedDataDrivenProperty",jf),Aa("CrossFadedProperty",zc),Aa("ColorRampProperty",nu);let L="-transition";class J extends Q{constructor(P,W){if(super(),this.id=P.id,this.type=P.type,this._featureFilter={filter:()=>!0,needGeometry:!1},P.type!=="custom"&&(this.metadata=P.metadata,this.minzoom=P.minzoom,this.maxzoom=P.maxzoom,P.type!=="background"&&(this.source=P.source,this.sourceLayer=P["source-layer"],this.filter=P.filter),W.layout&&(this._unevaluatedLayout=new Su(W.layout)),W.paint)){this._transitionablePaint=new au(W.paint);for(let se in P.paint)this.setPaintProperty(se,P.paint[se],{validate:!1});for(let se in P.layout)this.setLayoutProperty(se,P.layout[se],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new hc(W.paint)}}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(P){return P==="visibility"?this.visibility:this._unevaluatedLayout.getValue(P)}setLayoutProperty(P,W,se={}){W!=null&&this._validate(Tn,`layers.${this.id}.layout.${P}`,P,W,se)||(P!=="visibility"?this._unevaluatedLayout.setValue(P,W):this.visibility=W)}getPaintProperty(P){return P.endsWith(L)?this._transitionablePaint.getTransition(P.slice(0,-11)):this._transitionablePaint.getValue(P)}setPaintProperty(P,W,se={}){if(W!=null&&this._validate(nn,`layers.${this.id}.paint.${P}`,P,W,se))return!1;if(P.endsWith(L))return this._transitionablePaint.setTransition(P.slice(0,-11),W||void 0),!1;{let ge=this._transitionablePaint._values[P],ke=ge.property.specification["property-type"]==="cross-faded-data-driven",Pe=ge.value.isDataDriven(),Ye=ge.value;this._transitionablePaint.setValue(P,W),this._handleSpecialPaintPropertyUpdate(P);let at=this._transitionablePaint._values[P].value;return at.isDataDriven()||Pe||ke||this._handleOverridablePaintPropertyUpdate(P,Ye,at)}}_handleSpecialPaintPropertyUpdate(P){}_handleOverridablePaintPropertyUpdate(P,W,se){return!1}isHidden(P){return!!(this.minzoom&&P=this.maxzoom)||this.visibility==="none"}updateTransitions(P){this._transitioningPaint=this._transitionablePaint.transitioned(P,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculate(P,W){P.getCrossfadeParameters&&(this._crossfadeParameters=P.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(P,void 0,W)),this.paint=this._transitioningPaint.possiblyEvaluate(P,void 0,W)}serialize(){let P={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&&(P.layout=P.layout||{},P.layout.visibility=this.visibility),m(P,(W,se)=>!(W===void 0||se==="layout"&&!Object.keys(W).length||se==="paint"&&!Object.keys(W).length))}_validate(P,W,se,ge,ke={}){return(!ke||ke.validate!==!1)&&Ba(this,P.call(ma,{key:W,layerType:this.type,objectKey:se,value:ge,styleSpec:re,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let P in this.paint._values){let W=this.paint.get(P);if(W instanceof xl&&qs(W.property.specification)&&(W.value.kind==="source"||W.value.kind==="composite")&&W.value.isStateDependent)return!0}return!1}}let de={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class pe{constructor(P,W){this._structArray=P,this._pos1=W*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Te{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(P,W){return P._trim(),W&&(P.isTransferred=!0,W.push(P.arrayBuffer)),{length:P.length,arrayBuffer:P.arrayBuffer}}static deserialize(P){let W=Object.create(this.prototype);return W.arrayBuffer=P.arrayBuffer,W.length=P.length,W.capacity=P.arrayBuffer.byteLength/W.bytesPerElement,W._refreshViews(),W}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(P){this.reserve(P),this.length=P}reserve(P){if(P>this.capacity){this.capacity=Math.max(P,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let W=this.uint8;this._refreshViews(),W&&this.uint8.set(W)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}}function Ze(G,P=1){let W=0,se=0;return{members:G.map(ge=>{let ke=de[ge.type].BYTES_PER_ELEMENT,Pe=W=rt(W,Math.max(P,ke)),Ye=ge.components||1;return se=Math.max(se,ke),W+=ke*Ye,{name:ge.name,type:ge.type,components:Ye,offset:Pe}}),size:rt(W,Math.max(se,P)),alignment:P}}function rt(G,P){return Math.ceil(G/P)*P}class vt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W){let se=this.length;return this.resize(se+1),this.emplace(se,P,W)}emplace(P,W,se){let ge=2*P;return this.int16[ge+0]=W,this.int16[ge+1]=se,P}}vt.prototype.bytesPerElement=4,Aa("StructArrayLayout2i4",vt);class Mt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,se){let ge=this.length;return this.resize(ge+1),this.emplace(ge,P,W,se)}emplace(P,W,se,ge){let ke=3*P;return this.int16[ke+0]=W,this.int16[ke+1]=se,this.int16[ke+2]=ge,P}}Mt.prototype.bytesPerElement=6,Aa("StructArrayLayout3i6",Mt);class Gt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,se,ge){let ke=this.length;return this.resize(ke+1),this.emplace(ke,P,W,se,ge)}emplace(P,W,se,ge,ke){let Pe=4*P;return this.int16[Pe+0]=W,this.int16[Pe+1]=se,this.int16[Pe+2]=ge,this.int16[Pe+3]=ke,P}}Gt.prototype.bytesPerElement=8,Aa("StructArrayLayout4i8",Gt);class Ht extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,se,ge,ke,Pe){let Ye=this.length;return this.resize(Ye+1),this.emplace(Ye,P,W,se,ge,ke,Pe)}emplace(P,W,se,ge,ke,Pe,Ye){let at=6*P;return this.int16[at+0]=W,this.int16[at+1]=se,this.int16[at+2]=ge,this.int16[at+3]=ke,this.int16[at+4]=Pe,this.int16[at+5]=Ye,P}}Ht.prototype.bytesPerElement=12,Aa("StructArrayLayout2i4i12",Ht);class fr extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,se,ge,ke,Pe){let Ye=this.length;return this.resize(Ye+1),this.emplace(Ye,P,W,se,ge,ke,Pe)}emplace(P,W,se,ge,ke,Pe,Ye){let at=4*P,pt=8*P;return this.int16[at+0]=W,this.int16[at+1]=se,this.uint8[pt+4]=ge,this.uint8[pt+5]=ke,this.uint8[pt+6]=Pe,this.uint8[pt+7]=Ye,P}}fr.prototype.bytesPerElement=8,Aa("StructArrayLayout2i4ub8",fr);class wr extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(P,W){let se=this.length;return this.resize(se+1),this.emplace(se,P,W)}emplace(P,W,se){let ge=2*P;return this.float32[ge+0]=W,this.float32[ge+1]=se,P}}wr.prototype.bytesPerElement=8,Aa("StructArrayLayout2f8",wr);class Le extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W,se,ge,ke,Pe,Ye,at,pt,Et){let Vt=this.length;return this.resize(Vt+1),this.emplace(Vt,P,W,se,ge,ke,Pe,Ye,at,pt,Et)}emplace(P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt){let er=10*P;return this.uint16[er+0]=W,this.uint16[er+1]=se,this.uint16[er+2]=ge,this.uint16[er+3]=ke,this.uint16[er+4]=Pe,this.uint16[er+5]=Ye,this.uint16[er+6]=at,this.uint16[er+7]=pt,this.uint16[er+8]=Et,this.uint16[er+9]=Vt,P}}Le.prototype.bytesPerElement=20,Aa("StructArrayLayout10ui20",Le);class Oe extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er){let sr=this.length;return this.resize(sr+1),this.emplace(sr,P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er)}emplace(P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er,sr){let xr=12*P;return this.int16[xr+0]=W,this.int16[xr+1]=se,this.int16[xr+2]=ge,this.int16[xr+3]=ke,this.uint16[xr+4]=Pe,this.uint16[xr+5]=Ye,this.uint16[xr+6]=at,this.uint16[xr+7]=pt,this.int16[xr+8]=Et,this.int16[xr+9]=Vt,this.int16[xr+10]=er,this.int16[xr+11]=sr,P}}Oe.prototype.bytesPerElement=24,Aa("StructArrayLayout4i4ui4i24",Oe);class Ge extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(P,W,se){let ge=this.length;return this.resize(ge+1),this.emplace(ge,P,W,se)}emplace(P,W,se,ge){let ke=3*P;return this.float32[ke+0]=W,this.float32[ke+1]=se,this.float32[ke+2]=ge,P}}Ge.prototype.bytesPerElement=12,Aa("StructArrayLayout3f12",Ge);class $e extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(P){let W=this.length;return this.resize(W+1),this.emplace(W,P)}emplace(P,W){return this.uint32[1*P+0]=W,P}}$e.prototype.bytesPerElement=4,Aa("StructArrayLayout1ul4",$e);class lt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W,se,ge,ke,Pe,Ye,at,pt){let Et=this.length;return this.resize(Et+1),this.emplace(Et,P,W,se,ge,ke,Pe,Ye,at,pt)}emplace(P,W,se,ge,ke,Pe,Ye,at,pt,Et){let Vt=10*P,er=5*P;return this.int16[Vt+0]=W,this.int16[Vt+1]=se,this.int16[Vt+2]=ge,this.int16[Vt+3]=ke,this.int16[Vt+4]=Pe,this.int16[Vt+5]=Ye,this.uint32[er+3]=at,this.uint16[Vt+8]=pt,this.uint16[Vt+9]=Et,P}}lt.prototype.bytesPerElement=20,Aa("StructArrayLayout6i1ul2ui20",lt);class tt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,se,ge,ke,Pe){let Ye=this.length;return this.resize(Ye+1),this.emplace(Ye,P,W,se,ge,ke,Pe)}emplace(P,W,se,ge,ke,Pe,Ye){let at=6*P;return this.int16[at+0]=W,this.int16[at+1]=se,this.int16[at+2]=ge,this.int16[at+3]=ke,this.int16[at+4]=Pe,this.int16[at+5]=Ye,P}}tt.prototype.bytesPerElement=12,Aa("StructArrayLayout2i2i2i12",tt);class dt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,se,ge,ke){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,P,W,se,ge,ke)}emplace(P,W,se,ge,ke,Pe){let Ye=4*P,at=8*P;return this.float32[Ye+0]=W,this.float32[Ye+1]=se,this.float32[Ye+2]=ge,this.int16[at+6]=ke,this.int16[at+7]=Pe,P}}dt.prototype.bytesPerElement=16,Aa("StructArrayLayout2f1f2i16",dt);class Rt extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(P,W,se,ge,ke,Pe){let Ye=this.length;return this.resize(Ye+1),this.emplace(Ye,P,W,se,ge,ke,Pe)}emplace(P,W,se,ge,ke,Pe,Ye){let at=16*P,pt=4*P,Et=8*P;return this.uint8[at+0]=W,this.uint8[at+1]=se,this.float32[pt+1]=ge,this.float32[pt+2]=ke,this.int16[Et+6]=Pe,this.int16[Et+7]=Ye,P}}Rt.prototype.bytesPerElement=16,Aa("StructArrayLayout2ub2f2i16",Rt);class Ot extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W,se){let ge=this.length;return this.resize(ge+1),this.emplace(ge,P,W,se)}emplace(P,W,se,ge){let ke=3*P;return this.uint16[ke+0]=W,this.uint16[ke+1]=se,this.uint16[ke+2]=ge,P}}Ot.prototype.bytesPerElement=6,Aa("StructArrayLayout3ui6",Ot);class Xt extends Te{_refreshViews(){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)}emplaceBack(P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er,sr,xr,Er,Qr,la){let Ka=this.length;return this.resize(Ka+1),this.emplace(Ka,P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er,sr,xr,Er,Qr,la)}emplace(P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er,sr,xr,Er,Qr,la,Ka){let Ma=24*P,qa=12*P,bn=48*P;return this.int16[Ma+0]=W,this.int16[Ma+1]=se,this.uint16[Ma+2]=ge,this.uint16[Ma+3]=ke,this.uint32[qa+2]=Pe,this.uint32[qa+3]=Ye,this.uint32[qa+4]=at,this.uint16[Ma+10]=pt,this.uint16[Ma+11]=Et,this.uint16[Ma+12]=Vt,this.float32[qa+7]=er,this.float32[qa+8]=sr,this.uint8[bn+36]=xr,this.uint8[bn+37]=Er,this.uint8[bn+38]=Qr,this.uint32[qa+10]=la,this.int16[Ma+22]=Ka,P}}Xt.prototype.bytesPerElement=48,Aa("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Xt);class nr extends Te{_refreshViews(){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)}emplaceBack(P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er,sr,xr,Er,Qr,la,Ka,Ma,qa,bn,ei,Ri,To,Ci,wi,no,Wi){let Ni=this.length;return this.resize(Ni+1),this.emplace(Ni,P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er,sr,xr,Er,Qr,la,Ka,Ma,qa,bn,ei,Ri,To,Ci,wi,no,Wi)}emplace(P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er,sr,xr,Er,Qr,la,Ka,Ma,qa,bn,ei,Ri,To,Ci,wi,no,Wi,Ni){let In=32*P,uo=16*P;return this.int16[In+0]=W,this.int16[In+1]=se,this.int16[In+2]=ge,this.int16[In+3]=ke,this.int16[In+4]=Pe,this.int16[In+5]=Ye,this.int16[In+6]=at,this.int16[In+7]=pt,this.uint16[In+8]=Et,this.uint16[In+9]=Vt,this.uint16[In+10]=er,this.uint16[In+11]=sr,this.uint16[In+12]=xr,this.uint16[In+13]=Er,this.uint16[In+14]=Qr,this.uint16[In+15]=la,this.uint16[In+16]=Ka,this.uint16[In+17]=Ma,this.uint16[In+18]=qa,this.uint16[In+19]=bn,this.uint16[In+20]=ei,this.uint16[In+21]=Ri,this.uint16[In+22]=To,this.uint32[uo+12]=Ci,this.float32[uo+13]=wi,this.float32[uo+14]=no,this.uint16[In+30]=Wi,this.uint16[In+31]=Ni,P}}nr.prototype.bytesPerElement=64,Aa("StructArrayLayout8i15ui1ul2f2ui64",nr);class pr extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(P){let W=this.length;return this.resize(W+1),this.emplace(W,P)}emplace(P,W){return this.float32[1*P+0]=W,P}}pr.prototype.bytesPerElement=4,Aa("StructArrayLayout1f4",pr);class Lr extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(P,W,se){let ge=this.length;return this.resize(ge+1),this.emplace(ge,P,W,se)}emplace(P,W,se,ge){let ke=3*P;return this.uint16[6*P+0]=W,this.float32[ke+1]=se,this.float32[ke+2]=ge,P}}Lr.prototype.bytesPerElement=12,Aa("StructArrayLayout1ui2f12",Lr);class Br extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W,se){let ge=this.length;return this.resize(ge+1),this.emplace(ge,P,W,se)}emplace(P,W,se,ge){let ke=4*P;return this.uint32[2*P+0]=W,this.uint16[ke+2]=se,this.uint16[ke+3]=ge,P}}Br.prototype.bytesPerElement=8,Aa("StructArrayLayout1ul2ui8",Br);class Kr extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P,W){let se=this.length;return this.resize(se+1),this.emplace(se,P,W)}emplace(P,W,se){let ge=2*P;return this.uint16[ge+0]=W,this.uint16[ge+1]=se,P}}Kr.prototype.bytesPerElement=4,Aa("StructArrayLayout2ui4",Kr);class ya extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(P){let W=this.length;return this.resize(W+1),this.emplace(W,P)}emplace(P,W){return this.uint16[1*P+0]=W,P}}ya.prototype.bytesPerElement=2,Aa("StructArrayLayout1ui2",ya);class Za extends Te{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(P,W,se,ge){let ke=this.length;return this.resize(ke+1),this.emplace(ke,P,W,se,ge)}emplace(P,W,se,ge,ke){let Pe=4*P;return this.float32[Pe+0]=W,this.float32[Pe+1]=se,this.float32[Pe+2]=ge,this.float32[Pe+3]=ke,P}}Za.prototype.bytesPerElement=16,Aa("StructArrayLayout4f16",Za);class Ha extends pe{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new n(this.anchorPointX,this.anchorPointY)}}Ha.prototype.size=20;class un extends lt{get(P){return new Ha(this,P)}}Aa("CollisionBoxArray",un);class Bn extends pe{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(P){this._structArray.uint8[this._pos1+37]=P}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(P){this._structArray.uint8[this._pos1+38]=P}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(P){this._structArray.uint32[this._pos4+10]=P}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}Bn.prototype.size=48;class li extends Xt{get(P){return new Bn(this,P)}}Aa("PlacedSymbolArray",li);class Jn extends pe{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(P){this._structArray.uint32[this._pos4+12]=P}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}Jn.prototype.size=64;class Pi extends nr{get(P){return new Jn(this,P)}}Aa("SymbolInstanceArray",Pi);class ho extends pr{getoffsetX(P){return this.float32[1*P+0]}}Aa("GlyphOffsetArray",ho);class to extends Mt{getx(P){return this.int16[3*P+0]}gety(P){return this.int16[3*P+1]}gettileUnitDistanceFromAnchor(P){return this.int16[3*P+2]}}Aa("SymbolLineVertexArray",to);class as extends pe{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}as.prototype.size=12;class Fo extends Lr{get(P){return new as(this,P)}}Aa("TextAnchorOffsetArray",Fo);class Ms extends pe{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Ms.prototype.size=8;class Ns extends Br{get(P){return new Ms(this,P)}}Aa("FeatureIndexArray",Ns);class Vs extends vt{}class xs extends vt{}class ks extends vt{}class Cl extends Ht{}class mu extends fr{}class Hl extends wr{}class el extends Le{}class Eu extends Oe{}class gu extends Ge{}class hl extends $e{}class Ll extends tt{}class ue extends Rt{}class we extends Ot{}class Ne extends Kr{}let Ke=Ze([{name:"a_pos",components:2,type:"Int16"}],4),{members:et}=Ke;class ot{constructor(P=[]){this.segments=P}prepareSegment(P,W,se,ge){let ke=this.segments[this.segments.length-1];return P>ot.MAX_VERTEX_ARRAY_LENGTH&&_(`Max vertices per segment is ${ot.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${P}`),(!ke||ke.vertexLength+P>ot.MAX_VERTEX_ARRAY_LENGTH||ke.sortKey!==ge)&&(ke={vertexOffset:W.length,primitiveOffset:se.length,vertexLength:0,primitiveLength:0},ge!==void 0&&(ke.sortKey=ge),this.segments.push(ke)),ke}get(){return this.segments}destroy(){for(let P of this.segments)for(let W in P.vaos)P.vaos[W].destroy()}static simpleSegment(P,W,se,ge){return new ot([{vertexOffset:P,primitiveOffset:W,vertexLength:se,primitiveLength:ge,vaos:{},sortKey:0}])}}function kt(G,P){return 256*(G=M(Math.floor(G),0,255))+M(Math.floor(P),0,255)}ot.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,Aa("SegmentVector",ot);let xt=Ze([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]);var Ut={exports:{}},or={exports:{}};or.exports=function(G,P){var W,se,ge,ke,Pe,Ye,at,pt;for(se=G.length-(W=3&G.length),ge=P,Pe=3432918353,Ye=461845907,pt=0;pt>>16)*Pe&65535)<<16)&4294967295)<<15|at>>>17))*Ye+(((at>>>16)*Ye&65535)<<16)&4294967295)<<13|ge>>>19))+((5*(ge>>>16)&65535)<<16)&4294967295))+((58964+(ke>>>16)&65535)<<16);switch(at=0,W){case 3:at^=(255&G.charCodeAt(pt+2))<<16;case 2:at^=(255&G.charCodeAt(pt+1))<<8;case 1:ge^=at=(65535&(at=(at=(65535&(at^=255&G.charCodeAt(pt)))*Pe+(((at>>>16)*Pe&65535)<<16)&4294967295)<<15|at>>>17))*Ye+(((at>>>16)*Ye&65535)<<16)&4294967295}return ge^=G.length,ge=2246822507*(65535&(ge^=ge>>>16))+((2246822507*(ge>>>16)&65535)<<16)&4294967295,ge=3266489909*(65535&(ge^=ge>>>13))+((3266489909*(ge>>>16)&65535)<<16)&4294967295,(ge^=ge>>>16)>>>0};var lr=or.exports,Dr={exports:{}};Dr.exports=function(G,P){for(var W,se=G.length,ge=P^se,ke=0;se>=4;)W=1540483477*(65535&(W=255&G.charCodeAt(ke)|(255&G.charCodeAt(++ke))<<8|(255&G.charCodeAt(++ke))<<16|(255&G.charCodeAt(++ke))<<24))+((1540483477*(W>>>16)&65535)<<16),ge=1540483477*(65535&ge)+((1540483477*(ge>>>16)&65535)<<16)^(W=1540483477*(65535&(W^=W>>>24))+((1540483477*(W>>>16)&65535)<<16)),se-=4,++ke;switch(se){case 3:ge^=(255&G.charCodeAt(ke+2))<<16;case 2:ge^=(255&G.charCodeAt(ke+1))<<8;case 1:ge=1540483477*(65535&(ge^=255&G.charCodeAt(ke)))+((1540483477*(ge>>>16)&65535)<<16)}return ge=1540483477*(65535&(ge^=ge>>>13))+((1540483477*(ge>>>16)&65535)<<16),(ge^=ge>>>15)>>>0};var Pr=lr,ca=Dr.exports;Ut.exports=Pr,Ut.exports.murmur3=Pr,Ut.exports.murmur2=ca;var _a=t(Ut.exports);class Ur{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(P,W,se,ge){this.ids.push(Jr(P)),this.positions.push(W,se,ge)}getPositions(P){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let W=Jr(P),se=0,ge=this.ids.length-1;for(;se>1;this.ids[Pe]>=W?ge=Pe:se=Pe+1}let ke=[];for(;this.ids[se]===W;)ke.push({index:this.positions[3*se],start:this.positions[3*se+1],end:this.positions[3*se+2]}),se++;return ke}static serialize(P,W){let se=new Float64Array(P.ids),ge=new Uint32Array(P.positions);return sa(se,ge,0,se.length-1),W&&W.push(se.buffer,ge.buffer),{ids:se,positions:ge}}static deserialize(P){let W=new Ur;return W.ids=P.ids,W.positions=P.positions,W.indexed=!0,W}}function Jr(G){let P=+G;return!isNaN(P)&&P<=Number.MAX_SAFE_INTEGER?P:_a(String(G))}function sa(G,P,W,se){for(;W>1],ke=W-1,Pe=se+1;for(;;){do ke++;while(G[ke]ge);if(ke>=Pe)break;ga(G,ke,Pe),ga(P,3*ke,3*Pe),ga(P,3*ke+1,3*Pe+1),ga(P,3*ke+2,3*Pe+2)}Pe-W`u_${ge}`),this.type=se}setUniform(P,W,se){P.set(se.constantOr(this.value))}getBinding(P,W,se){return this.type==="color"?new wn(P,W):new Zr(P,W)}}class _i{constructor(P,W){this.uniformNames=W.map(se=>`u_${se}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(P,W){this.pixelRatioFrom=W.pixelRatio,this.pixelRatioTo=P.pixelRatio,this.patternFrom=W.tlbr,this.patternTo=P.tlbr}setUniform(P,W,se,ge){let ke=ge==="u_pattern_to"?this.patternTo:ge==="u_pattern_from"?this.patternFrom:ge==="u_pixel_ratio_to"?this.pixelRatioTo:ge==="u_pixel_ratio_from"?this.pixelRatioFrom:null;ke&&P.set(ke)}getBinding(P,W,se){return se.substr(0,9)==="u_pattern"?new hn(P,W):new Zr(P,W)}}class lo{constructor(P,W,se,ge){this.expression=P,this.type=se,this.maxValue=0,this.paintVertexAttributes=W.map(ke=>({name:`a_${ke}`,type:"Float32",components:se==="color"?2:1,offset:0})),this.paintVertexArray=new ge}populatePaintArray(P,W,se,ge,ke){let Pe=this.paintVertexArray.length,Ye=this.expression.evaluate(new Do(0),W,{},ge,[],ke);this.paintVertexArray.resize(P),this._setPaintValue(Pe,P,Ye)}updatePaintArray(P,W,se,ge){let ke=this.expression.evaluate({zoom:0},se,ge);this._setPaintValue(P,W,ke)}_setPaintValue(P,W,se){if(this.type==="color"){let ge=ni(se);for(let ke=P;ke`u_${Ye}_t`),this.type=se,this.useIntegerZoom=ge,this.zoom=ke,this.maxValue=0,this.paintVertexAttributes=W.map(Ye=>({name:`a_${Ye}`,type:"Float32",components:se==="color"?4:2,offset:0})),this.paintVertexArray=new Pe}populatePaintArray(P,W,se,ge,ke){let Pe=this.expression.evaluate(new Do(this.zoom),W,{},ge,[],ke),Ye=this.expression.evaluate(new Do(this.zoom+1),W,{},ge,[],ke),at=this.paintVertexArray.length;this.paintVertexArray.resize(P),this._setPaintValue(at,P,Pe,Ye)}updatePaintArray(P,W,se,ge){let ke=this.expression.evaluate({zoom:this.zoom},se,ge),Pe=this.expression.evaluate({zoom:this.zoom+1},se,ge);this._setPaintValue(P,W,ke,Pe)}_setPaintValue(P,W,se,ge){if(this.type==="color"){let ke=ni(se),Pe=ni(ge);for(let Ye=P;Ye`#define HAS_UNIFORM_${ge}`))}return P}getBinderAttributes(){let P=[];for(let W in this.binders){let se=this.binders[W];if(se instanceof lo||se instanceof mi)for(let ge=0;ge!0){this.programConfigurations={};for(let ge of P)this.programConfigurations[ge.id]=new ds(ge,W,se);this.needsUpload=!1,this._featureMap=new Ur,this._bufferOffset=0}populatePaintArrays(P,W,se,ge,ke,Pe){for(let Ye in this.programConfigurations)this.programConfigurations[Ye].populatePaintArrays(P,W,ge,ke,Pe);W.id!==void 0&&this._featureMap.add(W.id,se,this._bufferOffset,P),this._bufferOffset=P,this.needsUpload=!0}updatePaintArrays(P,W,se,ge){for(let ke of se)this.needsUpload=this.programConfigurations[ke.id].updatePaintArrays(P,this._featureMap,W,ke,ge)||this.needsUpload}get(P){return this.programConfigurations[P]}upload(P){if(this.needsUpload){for(let W in this.programConfigurations)this.programConfigurations[W].upload(P);this.needsUpload=!1}}destroy(){for(let P in this.programConfigurations)this.programConfigurations[P].destroy()}}function Ss(G,P){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[G]||[G.replace(`${P}-`,"").replace(/-/g,"_")]}function ti(G,P,W){let se={color:{source:wr,composite:Za},number:{source:pr,composite:wr}},ge=function(ke){return{"line-pattern":{source:el,composite:el},"fill-pattern":{source:el,composite:el},"fill-extrusion-pattern":{source:el,composite:el}}[ke]}(G);return ge&&ge[W]||se[P][W]}Aa("ConstantBinder",xi),Aa("CrossFadedConstantBinder",_i),Aa("SourceExpressionBinder",lo),Aa("CrossFadedCompositeBinder",$i),Aa("CompositeExpressionBinder",mi),Aa("ProgramConfiguration",ds,{omit:["_buffers"]}),Aa("ProgramConfigurationSet",Ks);let Di=8192,Ao=Math.pow(2,14)-1,ss=-Ao-1;function Cs(G){let P=Di/G.extent,W=G.loadGeometry();for(let se=0;sePe.x+1||atPe.y+1)&&_("Geometry exceeds allowed extent, reduce your vector tile buffer size")}}return W}function nl(G,P){return{type:G.type,id:G.id,properties:G.properties,geometry:P?Cs(G):[]}}function iu(G,P,W,se,ge){G.emplaceBack(2*P+(se+1)/2,2*W+(ge+1)/2)}class yu{constructor(P){this.zoom=P.zoom,this.overscaling=P.overscaling,this.layers=P.layers,this.layerIds=this.layers.map(W=>W.id),this.index=P.index,this.hasPattern=!1,this.layoutVertexArray=new xs,this.indexArray=new we,this.segments=new ot,this.programConfigurations=new Ks(P.layers,P.zoom),this.stateDependentLayerIds=this.layers.filter(W=>W.isStateDependent()).map(W=>W.id)}populate(P,W,se){let ge=this.layers[0],ke=[],Pe=null,Ye=!1;ge.type==="circle"&&(Pe=ge.layout.get("circle-sort-key"),Ye=!Pe.isConstant());for(let{feature:at,id:pt,index:Et,sourceLayerIndex:Vt}of P){let er=this.layers[0]._featureFilter.needGeometry,sr=nl(at,er);if(!this.layers[0]._featureFilter.filter(new Do(this.zoom),sr,se))continue;let xr=Ye?Pe.evaluate(sr,{},se):void 0,Er={id:pt,properties:at.properties,type:at.type,sourceLayerIndex:Vt,index:Et,geometry:er?sr.geometry:Cs(at),patterns:{},sortKey:xr};ke.push(Er)}Ye&&ke.sort((at,pt)=>at.sortKey-pt.sortKey);for(let at of ke){let{geometry:pt,index:Et,sourceLayerIndex:Vt}=at,er=P[Et].feature;this.addFeature(at,pt,Et,se),W.featureIndex.insert(er,pt,Et,Vt,this.index)}}update(P,W,se){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(P,W,this.stateDependentLayers,se)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(P){this.uploaded||(this.layoutVertexBuffer=P.createVertexBuffer(this.layoutVertexArray,et),this.indexBuffer=P.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(P),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(P,W,se,ge){for(let ke of W)for(let Pe of ke){let Ye=Pe.x,at=Pe.y;if(Ye<0||Ye>=Di||at<0||at>=Di)continue;let pt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,P.sortKey),Et=pt.vertexLength;iu(this.layoutVertexArray,Ye,at,-1,-1),iu(this.layoutVertexArray,Ye,at,1,-1),iu(this.layoutVertexArray,Ye,at,1,1),iu(this.layoutVertexArray,Ye,at,-1,1),this.indexArray.emplaceBack(Et,Et+1,Et+2),this.indexArray.emplaceBack(Et,Et+3,Et+2),pt.vertexLength+=4,pt.primitiveLength+=2}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,P,se,{},ge)}}function dc(G,P){for(let W=0;W1){if(Tr(G,P))return!0;for(let se=0;se1?W:W.sub(P)._mult(ge)._add(P))}function fa(G,P){let W,se,ge,ke=!1;for(let Pe=0;PeP.y!=ge.y>P.y&&P.x<(ge.x-se.x)*(P.y-se.y)/(ge.y-se.y)+se.x&&(ke=!ke)}return ke}function Sa(G,P){let W=!1;for(let se=0,ge=G.length-1;seP.y!=Pe.y>P.y&&P.x<(Pe.x-ke.x)*(P.y-ke.y)/(Pe.y-ke.y)+ke.x&&(W=!W)}return W}function Ca(G,P,W){let se=W[0],ge=W[2];if(G.xge.x&&P.x>ge.x||G.yge.y&&P.y>ge.y)return!1;let ke=I(G,P,W[0]);return ke!==I(G,P,W[1])||ke!==I(G,P,W[2])||ke!==I(G,P,W[3])}function Pa(G,P,W){let se=P.paint.get(G).value;return se.kind==="constant"?se.value:W.programConfigurations.get(P.id).getMaxValue(G)}function En(G){return Math.sqrt(G[0]*G[0]+G[1]*G[1])}function cn(G,P,W,se,ge){if(!P[0]&&!P[1])return G;let ke=n.convert(P)._mult(ge);W==="viewport"&&ke._rotate(-se);let Pe=[];for(let Ye=0;Yeea(Qr,Er))}(pt,at),sr=Vt?Et*Ye:Et;for(let xr of ge)for(let Er of xr){let Qr=Vt?Er:ea(Er,at),la=sr,Ka=Sn([],[Er.x,Er.y,0,1],at);if(this.paint.get("circle-pitch-scale")==="viewport"&&this.paint.get("circle-pitch-alignment")==="map"?la*=Ka[3]/Pe.cameraToCenterDistance:this.paint.get("circle-pitch-scale")==="map"&&this.paint.get("circle-pitch-alignment")==="viewport"&&(la*=Pe.cameraToCenterDistance/Ka[3]),He(er,Qr,la))return!0}return!1}}function ea(G,P){let W=Sn([],[G.x,G.y,0,1],P);return new n(W[0]/W[3],W[1]/W[3])}class tn extends yu{}let ja;Aa("HeatmapBucket",tn,{omit:["layers"]});var Ia={get paint(){return ja=ja||new Me({"heatmap-radius":new Xi(re.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Xi(re.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new ki(re.paint_heatmap["heatmap-intensity"]),"heatmap-color":new nu(re.paint_heatmap["heatmap-color"]),"heatmap-opacity":new ki(re.paint_heatmap["heatmap-opacity"])})}};function Fa(G,{width:P,height:W},se,ge){if(ge){if(ge instanceof Uint8ClampedArray)ge=new Uint8Array(ge.buffer);else if(ge.length!==P*W*se)throw new RangeError(`mismatched image size. expected: ${ge.length} but got: ${P*W*se}`)}else ge=new Uint8Array(P*W*se);return G.width=P,G.height=W,G.data=ge,G}function rn(G,{width:P,height:W},se){if(P===G.width&&W===G.height)return;let ge=Fa({},{width:P,height:W},se);kn(G,ge,{x:0,y:0},{x:0,y:0},{width:Math.min(G.width,P),height:Math.min(G.height,W)},se),G.width=P,G.height=W,G.data=ge.data}function kn(G,P,W,se,ge,ke){if(ge.width===0||ge.height===0)return P;if(ge.width>G.width||ge.height>G.height||W.x>G.width-ge.width||W.y>G.height-ge.height)throw new RangeError("out of range source coordinates for image copy");if(ge.width>P.width||ge.height>P.height||se.x>P.width-ge.width||se.y>P.height-ge.height)throw new RangeError("out of range destination coordinates for image copy");let Pe=G.data,Ye=P.data;if(Pe===Ye)throw new Error("srcData equals dstData, so image is already copied");for(let at=0;at{P[G.evaluationKey]=at;let pt=G.expression.evaluate(P);ge.data[Pe+Ye+0]=Math.floor(255*pt.r/pt.a),ge.data[Pe+Ye+1]=Math.floor(255*pt.g/pt.a),ge.data[Pe+Ye+2]=Math.floor(255*pt.b/pt.a),ge.data[Pe+Ye+3]=Math.floor(255*pt.a)};if(G.clips)for(let Pe=0,Ye=0;Pe80*W){Ye=1/0,at=1/0;let Et=-1/0,Vt=-1/0;for(let er=W;erEt&&(Et=sr),xr>Vt&&(Vt=xr)}pt=Math.max(Et-Ye,Vt-at),pt=pt!==0?32767/pt:0}return Js(ke,Pe,W,Ye,at,pt,0),Pe}function Hs(G,P,W,se,ge){let ke;if(ge===function(Pe,Ye,at,pt){let Et=0;for(let Vt=Ye,er=at-pt;Vt0)for(let Pe=P;Pe=P;Pe-=se)ke=vn(Pe/se|0,G[Pe],G[Pe+1],ke);return ke&&Ct(ke,ke.next)&&(wt(ke),ke=ke.next),ke}function Ls(G,P){if(!G)return G;P||(P=G);let W,se=G;do if(W=!1,se.steiner||!Ct(se,se.next)&&Gi(se.prev,se,se.next)!==0)se=se.next;else{if(wt(se),se=P=se.prev,se===se.next)break;W=!0}while(W||se!==P);return P}function Js(G,P,W,se,ge,ke,Pe){if(!G)return;!Pe&&ke&&function(at,pt,Et,Vt){let er=at;do er.z===0&&(er.z=ol(er.x,er.y,pt,Et,Vt)),er.prevZ=er.prev,er.nextZ=er.next,er=er.next;while(er!==at);er.prevZ.nextZ=null,er.prevZ=null,function(sr){let xr,Er=1;do{let Qr,la=sr;sr=null;let Ka=null;for(xr=0;la;){xr++;let Ma=la,qa=0;for(let ei=0;ei0||bn>0&&Ma;)qa!==0&&(bn===0||!Ma||la.z<=Ma.z)?(Qr=la,la=la.nextZ,qa--):(Qr=Ma,Ma=Ma.nextZ,bn--),Ka?Ka.nextZ=Qr:sr=Qr,Qr.prevZ=Ka,Ka=Qr;la=Ma}Ka.nextZ=null,Er*=2}while(xr>1)}(er)}(G,se,ge,ke);let Ye=G;for(;G.prev!==G.next;){let at=G.prev,pt=G.next;if(ke?ms(G,se,ge,ke):ps(G))P.push(at.i,G.i,pt.i),wt(G),G=pt.next,Ye=pt.next;else if((G=pt)===Ye){Pe?Pe===1?Js(G=Ts(Ls(G),P),P,W,se,ge,ke,2):Pe===2&&si(G,P,W,se,ge,ke):Js(Ls(G),P,W,se,ge,ke,1);break}}}function ps(G){let P=G.prev,W=G,se=G.next;if(Gi(P,W,se)>=0)return!1;let ge=P.x,ke=W.x,Pe=se.x,Ye=P.y,at=W.y,pt=se.y,Et=geke?ge>Pe?ge:Pe:ke>Pe?ke:Pe,sr=Ye>at?Ye>pt?Ye:pt:at>pt?at:pt,xr=se.next;for(;xr!==P;){if(xr.x>=Et&&xr.x<=er&&xr.y>=Vt&&xr.y<=sr&&$n(ge,Ye,ke,at,Pe,pt,xr.x,xr.y)&&Gi(xr.prev,xr,xr.next)>=0)return!1;xr=xr.next}return!0}function ms(G,P,W,se){let ge=G.prev,ke=G,Pe=G.next;if(Gi(ge,ke,Pe)>=0)return!1;let Ye=ge.x,at=ke.x,pt=Pe.x,Et=ge.y,Vt=ke.y,er=Pe.y,sr=Yeat?Ye>pt?Ye:pt:at>pt?at:pt,Qr=Et>Vt?Et>er?Et:er:Vt>er?Vt:er,la=ol(sr,xr,P,W,se),Ka=ol(Er,Qr,P,W,se),Ma=G.prevZ,qa=G.nextZ;for(;Ma&&Ma.z>=la&&qa&&qa.z<=Ka;){if(Ma.x>=sr&&Ma.x<=Er&&Ma.y>=xr&&Ma.y<=Qr&&Ma!==ge&&Ma!==Pe&&$n(Ye,Et,at,Vt,pt,er,Ma.x,Ma.y)&&Gi(Ma.prev,Ma,Ma.next)>=0||(Ma=Ma.prevZ,qa.x>=sr&&qa.x<=Er&&qa.y>=xr&&qa.y<=Qr&&qa!==ge&&qa!==Pe&&$n(Ye,Et,at,Vt,pt,er,qa.x,qa.y)&&Gi(qa.prev,qa,qa.next)>=0))return!1;qa=qa.nextZ}for(;Ma&&Ma.z>=la;){if(Ma.x>=sr&&Ma.x<=Er&&Ma.y>=xr&&Ma.y<=Qr&&Ma!==ge&&Ma!==Pe&&$n(Ye,Et,at,Vt,pt,er,Ma.x,Ma.y)&&Gi(Ma.prev,Ma,Ma.next)>=0)return!1;Ma=Ma.prevZ}for(;qa&&qa.z<=Ka;){if(qa.x>=sr&&qa.x<=Er&&qa.y>=xr&&qa.y<=Qr&&qa!==ge&&qa!==Pe&&$n(Ye,Et,at,Vt,pt,er,qa.x,qa.y)&&Gi(qa.prev,qa,qa.next)>=0)return!1;qa=qa.nextZ}return!0}function Ts(G,P){let W=G;do{let se=W.prev,ge=W.next.next;!Ct(se,ge)&&Fr(se,W,W.next,ge)&&Mi(se,ge)&&Mi(ge,se)&&(P.push(se.i,W.i,ge.i),wt(W),wt(W.next),W=G=ge),W=W.next}while(W!==G);return Ls(W)}function si(G,P,W,se,ge,ke){let Pe=G;do{let Ye=Pe.next.next;for(;Ye!==Pe.prev;){if(Pe.i!==Ye.i&&Fi(Pe,Ye)){let at=xo(Pe,Ye);return Pe=Ls(Pe,Pe.next),at=Ls(at,at.next),Js(Pe,P,W,se,ge,ke,0),void Js(at,P,W,se,ge,ke,0)}Ye=Ye.next}Pe=Pe.next}while(Pe!==G)}function Ps(G,P){return G.x-P.x}function Mo(G,P){let W=function(ge,ke){let Pe=ke,Ye=ge.x,at=ge.y,pt,Et=-1/0;do{if(at<=Pe.y&&at>=Pe.next.y&&Pe.next.y!==Pe.y){let Er=Pe.x+(at-Pe.y)*(Pe.next.x-Pe.x)/(Pe.next.y-Pe.y);if(Er<=Ye&&Er>Et&&(Et=Er,pt=Pe.x=Pe.x&&Pe.x>=er&&Ye!==Pe.x&&$n(atpt.x||Pe.x===pt.x&&il(pt,Pe)))&&(pt=Pe,xr=Er)}Pe=Pe.next}while(Pe!==Vt);return pt}(G,P);if(!W)return P;let se=xo(W,G);return Ls(se,se.next),Ls(W,W.next)}function il(G,P){return Gi(G.prev,G,P.prev)<0&&Gi(P.next,G,G.next)<0}function ol(G,P,W,se,ge){return(G=1431655765&((G=858993459&((G=252645135&((G=16711935&((G=(G-W)*ge|0)|G<<8))|G<<4))|G<<2))|G<<1))|(P=1431655765&((P=858993459&((P=252645135&((P=16711935&((P=(P-se)*ge|0)|P<<8))|P<<4))|P<<2))|P<<1))<<1}function wl(G){let P=G,W=G;do(P.x=(G-Pe)*(ke-Ye)&&(G-Pe)*(se-Ye)>=(W-Pe)*(P-Ye)&&(W-Pe)*(ke-Ye)>=(ge-Pe)*(se-Ye)}function Fi(G,P){return G.next.i!==P.i&&G.prev.i!==P.i&&!function(W,se){let ge=W;do{if(ge.i!==W.i&&ge.next.i!==W.i&&ge.i!==se.i&&ge.next.i!==se.i&&Fr(ge,ge.next,W,se))return!0;ge=ge.next}while(ge!==W);return!1}(G,P)&&(Mi(G,P)&&Mi(P,G)&&function(W,se){let ge=W,ke=!1,Pe=(W.x+se.x)/2,Ye=(W.y+se.y)/2;do ge.y>Ye!=ge.next.y>Ye&&ge.next.y!==ge.y&&Pe<(ge.next.x-ge.x)*(Ye-ge.y)/(ge.next.y-ge.y)+ge.x&&(ke=!ke),ge=ge.next;while(ge!==W);return ke}(G,P)&&(Gi(G.prev,G,P.prev)||Gi(G,P.prev,P))||Ct(G,P)&&Gi(G.prev,G,G.next)>0&&Gi(P.prev,P,P.next)>0)}function Gi(G,P,W){return(P.y-G.y)*(W.x-P.x)-(P.x-G.x)*(W.y-P.y)}function Ct(G,P){return G.x===P.x&&G.y===P.y}function Fr(G,P,W,se){let ge=dn(Gi(G,P,W)),ke=dn(Gi(G,P,se)),Pe=dn(Gi(W,se,G)),Ye=dn(Gi(W,se,P));return ge!==ke&&Pe!==Ye||!(ge!==0||!zr(G,W,P))||!(ke!==0||!zr(G,se,P))||!(Pe!==0||!zr(W,G,se))||!(Ye!==0||!zr(W,P,se))}function zr(G,P,W){return P.x<=Math.max(G.x,W.x)&&P.x>=Math.min(G.x,W.x)&&P.y<=Math.max(G.y,W.y)&&P.y>=Math.min(G.y,W.y)}function dn(G){return G>0?1:G<0?-1:0}function Mi(G,P){return Gi(G.prev,G,G.next)<0?Gi(G,P,G.next)>=0&&Gi(G,G.prev,P)>=0:Gi(G,P,G.prev)<0||Gi(G,G.next,P)<0}function xo(G,P){let W=It(G.i,G.x,G.y),se=It(P.i,P.x,P.y),ge=G.next,ke=P.prev;return G.next=P,P.prev=G,W.next=ge,ge.prev=W,se.next=W,W.prev=se,ke.next=se,se.prev=ke,se}function vn(G,P,W,se){let ge=It(G,P,W);return se?(ge.next=se.next,ge.prev=se,se.next.prev=ge,se.next=ge):(ge.prev=ge,ge.next=ge),ge}function wt(G){G.next.prev=G.prev,G.prev.next=G.next,G.prevZ&&(G.prevZ.nextZ=G.nextZ),G.nextZ&&(G.nextZ.prevZ=G.prevZ)}function It(G,P,W){return{i:G,x:P,y:W,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}function $t(G,P,W){let se=W.patternDependencies,ge=!1;for(let ke of P){let Pe=ke.paint.get(`${G}-pattern`);Pe.isConstant()||(ge=!0);let Ye=Pe.constantOr(null);Ye&&(ge=!0,se[Ye.to]=!0,se[Ye.from]=!0)}return ge}function Rr(G,P,W,se,ge){let ke=ge.patternDependencies;for(let Pe of P){let Ye=Pe.paint.get(`${G}-pattern`).value;if(Ye.kind!=="constant"){let at=Ye.evaluate({zoom:se-1},W,{},ge.availableImages),pt=Ye.evaluate({zoom:se},W,{},ge.availableImages),Et=Ye.evaluate({zoom:se+1},W,{},ge.availableImages);at=at&&at.name?at.name:at,pt=pt&&pt.name?pt.name:pt,Et=Et&&Et.name?Et.name:Et,ke[at]=!0,ke[pt]=!0,ke[Et]=!0,W.patterns[Pe.id]={min:at,mid:pt,max:Et}}}return W}class Vr{constructor(P){this.zoom=P.zoom,this.overscaling=P.overscaling,this.layers=P.layers,this.layerIds=this.layers.map(W=>W.id),this.index=P.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ks,this.indexArray=new we,this.indexArray2=new Ne,this.programConfigurations=new Ks(P.layers,P.zoom),this.segments=new ot,this.segments2=new ot,this.stateDependentLayerIds=this.layers.filter(W=>W.isStateDependent()).map(W=>W.id)}populate(P,W,se){this.hasPattern=$t("fill",this.layers,W);let ge=this.layers[0].layout.get("fill-sort-key"),ke=!ge.isConstant(),Pe=[];for(let{feature:Ye,id:at,index:pt,sourceLayerIndex:Et}of P){let Vt=this.layers[0]._featureFilter.needGeometry,er=nl(Ye,Vt);if(!this.layers[0]._featureFilter.filter(new Do(this.zoom),er,se))continue;let sr=ke?ge.evaluate(er,{},se,W.availableImages):void 0,xr={id:at,properties:Ye.properties,type:Ye.type,sourceLayerIndex:Et,index:pt,geometry:Vt?er.geometry:Cs(Ye),patterns:{},sortKey:sr};Pe.push(xr)}ke&&Pe.sort((Ye,at)=>Ye.sortKey-at.sortKey);for(let Ye of Pe){let{geometry:at,index:pt,sourceLayerIndex:Et}=Ye;if(this.hasPattern){let Vt=Rr("fill",this.layers,Ye,this.zoom,W);this.patternFeatures.push(Vt)}else this.addFeature(Ye,at,pt,se,{});W.featureIndex.insert(P[pt].feature,at,pt,Et,this.index)}}update(P,W,se){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(P,W,this.stateDependentLayers,se)}addFeatures(P,W,se){for(let ge of this.patternFeatures)this.addFeature(ge,ge.geometry,ge.index,W,se)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(P){this.uploaded||(this.layoutVertexBuffer=P.createVertexBuffer(this.layoutVertexArray,bl),this.indexBuffer=P.createIndexBuffer(this.indexArray),this.indexBuffer2=P.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(P),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(P,W,se,ge,ke){for(let Pe of cu(W,500)){let Ye=0;for(let sr of Pe)Ye+=sr.length;let at=this.segments.prepareSegment(Ye,this.layoutVertexArray,this.indexArray),pt=at.vertexLength,Et=[],Vt=[];for(let sr of Pe){if(sr.length===0)continue;sr!==Pe[0]&&Vt.push(Et.length/2);let xr=this.segments2.prepareSegment(sr.length,this.layoutVertexArray,this.indexArray2),Er=xr.vertexLength;this.layoutVertexArray.emplaceBack(sr[0].x,sr[0].y),this.indexArray2.emplaceBack(Er+sr.length-1,Er),Et.push(sr[0].x),Et.push(sr[0].y);for(let Qr=1;Qr>3}if(ge--,se===1||se===2)ke+=G.readSVarint(),Pe+=G.readSVarint(),se===1&&(P&&Ye.push(P),P=[]),P.push(new va(ke,Pe));else{if(se!==7)throw new Error("unknown command "+se);P&&P.push(P[0].clone())}}return P&&Ye.push(P),Ye},an.prototype.bbox=function(){var G=this._pbf;G.pos=this._geometry;for(var P=G.readVarint()+G.pos,W=1,se=0,ge=0,ke=0,Pe=1/0,Ye=-1/0,at=1/0,pt=-1/0;G.pos>3}if(se--,W===1||W===2)(ge+=G.readSVarint())Ye&&(Ye=ge),(ke+=G.readSVarint())pt&&(pt=ke);else if(W!==7)throw new Error("unknown command "+W)}return[Pe,at,Ye,pt]},an.prototype.toGeoJSON=function(G,P,W){var se,ge,ke=this.extent*Math.pow(2,W),Pe=this.extent*G,Ye=this.extent*P,at=this.loadGeometry(),pt=an.types[this.type];function Et(sr){for(var xr=0;xr>3;ge=Pe===1?se.readString():Pe===2?se.readFloat():Pe===3?se.readDouble():Pe===4?se.readVarint64():Pe===5?se.readVarint():Pe===6?se.readSVarint():Pe===7?se.readBoolean():null}return ge}(W))}Qa.prototype.feature=function(G){if(G<0||G>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[G];var P=this._pbf.readVarint()+this._pbf.pos;return new An(this._pbf,P,this.extent,this._keys,this._values)};var gn=xn;function Xn(G,P,W){if(G===3){var se=new gn(W,W.readVarint()+W.pos);se.length&&(P[se.name]=se)}}Yr.VectorTile=function(G,P){this.layers=G.readFields(Xn,{},P)},Yr.VectorTileFeature=Rn,Yr.VectorTileLayer=xn;let zo=Yr.VectorTileFeature.types,sl=Math.pow(2,13);function ku(G,P,W,se,ge,ke,Pe,Ye){G.emplaceBack(P,W,2*Math.floor(se*sl)+Pe,ge*sl*2,ke*sl*2,Math.round(Ye))}class Tc{constructor(P){this.zoom=P.zoom,this.overscaling=P.overscaling,this.layers=P.layers,this.layerIds=this.layers.map(W=>W.id),this.index=P.index,this.hasPattern=!1,this.layoutVertexArray=new Cl,this.centroidVertexArray=new Vs,this.indexArray=new we,this.programConfigurations=new Ks(P.layers,P.zoom),this.segments=new ot,this.stateDependentLayerIds=this.layers.filter(W=>W.isStateDependent()).map(W=>W.id)}populate(P,W,se){this.features=[],this.hasPattern=$t("fill-extrusion",this.layers,W);for(let{feature:ge,id:ke,index:Pe,sourceLayerIndex:Ye}of P){let at=this.layers[0]._featureFilter.needGeometry,pt=nl(ge,at);if(!this.layers[0]._featureFilter.filter(new Do(this.zoom),pt,se))continue;let Et={id:ke,sourceLayerIndex:Ye,index:Pe,geometry:at?pt.geometry:Cs(ge),properties:ge.properties,type:ge.type,patterns:{}};this.hasPattern?this.features.push(Rr("fill-extrusion",this.layers,Et,this.zoom,W)):this.addFeature(Et,Et.geometry,Pe,se,{}),W.featureIndex.insert(ge,Et.geometry,Pe,Ye,this.index,!0)}}addFeatures(P,W,se){for(let ge of this.features){let{geometry:ke}=ge;this.addFeature(ge,ke,ge.index,W,se)}}update(P,W,se){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(P,W,this.stateDependentLayers,se)}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(P){this.uploaded||(this.layoutVertexBuffer=P.createVertexBuffer(this.layoutVertexArray,Sr),this.centroidVertexBuffer=P.createVertexBuffer(this.centroidVertexArray,zt.members,!0),this.indexBuffer=P.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(P),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(P,W,se,ge,ke){for(let Pe of cu(W,500)){let Ye={x:0,y:0,vertexCount:0},at=0;for(let xr of Pe)at+=xr.length;let pt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray);for(let xr of Pe){if(xr.length===0||ou(xr))continue;let Er=0;for(let Qr=0;Qr=1){let Ka=xr[Qr-1];if(!rf(la,Ka)){pt.vertexLength+4>ot.MAX_VERTEX_ARRAY_LENGTH&&(pt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let Ma=la.sub(Ka)._perp()._unit(),qa=Ka.dist(la);Er+qa>32768&&(Er=0),ku(this.layoutVertexArray,la.x,la.y,Ma.x,Ma.y,0,0,Er),ku(this.layoutVertexArray,la.x,la.y,Ma.x,Ma.y,0,1,Er),Ye.x+=2*la.x,Ye.y+=2*la.y,Ye.vertexCount+=2,Er+=qa,ku(this.layoutVertexArray,Ka.x,Ka.y,Ma.x,Ma.y,0,0,Er),ku(this.layoutVertexArray,Ka.x,Ka.y,Ma.x,Ma.y,0,1,Er),Ye.x+=2*Ka.x,Ye.y+=2*Ka.y,Ye.vertexCount+=2;let bn=pt.vertexLength;this.indexArray.emplaceBack(bn,bn+2,bn+1),this.indexArray.emplaceBack(bn+1,bn+2,bn+3),pt.vertexLength+=4,pt.primitiveLength+=2}}}}if(pt.vertexLength+at>ot.MAX_VERTEX_ARRAY_LENGTH&&(pt=this.segments.prepareSegment(at,this.layoutVertexArray,this.indexArray)),zo[P.type]!=="Polygon")continue;let Et=[],Vt=[],er=pt.vertexLength;for(let xr of Pe)if(xr.length!==0){xr!==Pe[0]&&Vt.push(Et.length/2);for(let Er=0;ErDi)||G.y===P.y&&(G.y<0||G.y>Di)}function ou(G){return G.every(P=>P.x<0)||G.every(P=>P.x>Di)||G.every(P=>P.y<0)||G.every(P=>P.y>Di)}let Ah;Aa("FillExtrusionBucket",Tc,{omit:["layers","features"]});var VG={get paint(){return Ah=Ah||new Me({"fill-extrusion-opacity":new ki(re["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Xi(re["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new ki(re["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new ki(re["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new jf(re["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Xi(re["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Xi(re["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new ki(re["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class HG extends J{constructor(P){super(P,VG)}createBucket(P){return new Tc(P)}queryRadius(){return En(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature(P,W,se,ge,ke,Pe,Ye,at){let pt=cn(P,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Pe.angle,Ye),Et=this.paint.get("fill-extrusion-height").evaluate(W,se),Vt=this.paint.get("fill-extrusion-base").evaluate(W,se),er=function(xr,Er,Qr,la){let Ka=[];for(let Ma of xr){let qa=[Ma.x,Ma.y,0,1];Sn(qa,qa,Er),Ka.push(new n(qa[0]/qa[3],qa[1]/qa[3]))}return Ka}(pt,at),sr=function(xr,Er,Qr,la){let Ka=[],Ma=[],qa=la[8]*Er,bn=la[9]*Er,ei=la[10]*Er,Ri=la[11]*Er,To=la[8]*Qr,Ci=la[9]*Qr,wi=la[10]*Qr,no=la[11]*Qr;for(let Wi of xr){let Ni=[],In=[];for(let uo of Wi){let ro=uo.x,No=uo.y,Pl=la[0]*ro+la[4]*No+la[12],Tl=la[1]*ro+la[5]*No+la[13],Bc=la[2]*ro+la[6]*No+la[14],Oh=la[3]*ro+la[7]*No+la[15],Sf=Bc+ei,Oc=Oh+Ri,rh=Pl+To,ah=Tl+Ci,nh=Bc+wi,ju=Oh+no,Nc=new n((Pl+qa)/Oc,(Tl+bn)/Oc);Nc.z=Sf/Oc,Ni.push(Nc);let Uf=new n(rh/ju,ah/ju);Uf.z=nh/ju,In.push(Uf)}Ka.push(Ni),Ma.push(In)}return[Ka,Ma]}(ge,Vt,Et,at);return function(xr,Er,Qr){let la=1/0;Lt(Qr,Er)&&(la=K6(Qr,Er[0]));for(let Ka=0;KaW.id),this.index=P.index,this.hasPattern=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={},this.layers.forEach(W=>{this.gradients[W.id]={}}),this.layoutVertexArray=new mu,this.layoutVertexArray2=new Hl,this.indexArray=new we,this.programConfigurations=new Ks(P.layers,P.zoom),this.segments=new ot,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(W=>W.isStateDependent()).map(W=>W.id)}populate(P,W,se){this.hasPattern=$t("line",this.layers,W);let ge=this.layers[0].layout.get("line-sort-key"),ke=!ge.isConstant(),Pe=[];for(let{feature:Ye,id:at,index:pt,sourceLayerIndex:Et}of P){let Vt=this.layers[0]._featureFilter.needGeometry,er=nl(Ye,Vt);if(!this.layers[0]._featureFilter.filter(new Do(this.zoom),er,se))continue;let sr=ke?ge.evaluate(er,{},se):void 0,xr={id:at,properties:Ye.properties,type:Ye.type,sourceLayerIndex:Et,index:pt,geometry:Vt?er.geometry:Cs(Ye),patterns:{},sortKey:sr};Pe.push(xr)}ke&&Pe.sort((Ye,at)=>Ye.sortKey-at.sortKey);for(let Ye of Pe){let{geometry:at,index:pt,sourceLayerIndex:Et}=Ye;if(this.hasPattern){let Vt=Rr("line",this.layers,Ye,this.zoom,W);this.patternFeatures.push(Vt)}else this.addFeature(Ye,at,pt,se,{});W.featureIndex.insert(P[pt].feature,at,pt,Et,this.index)}}update(P,W,se){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(P,W,this.stateDependentLayers,se)}addFeatures(P,W,se){for(let ge of this.patternFeatures)this.addFeature(ge,ge.geometry,ge.index,W,se)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(P){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=P.createVertexBuffer(this.layoutVertexArray2,ZG)),this.layoutVertexBuffer=P.createVertexBuffer(this.layoutVertexArray,YG),this.indexBuffer=P.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(P),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(P){if(P.properties&&Object.prototype.hasOwnProperty.call(P.properties,"mapbox_clip_start")&&Object.prototype.hasOwnProperty.call(P.properties,"mapbox_clip_end"))return{start:+P.properties.mapbox_clip_start,end:+P.properties.mapbox_clip_end}}addFeature(P,W,se,ge,ke){let Pe=this.layers[0].layout,Ye=Pe.get("line-join").evaluate(P,{}),at=Pe.get("line-cap"),pt=Pe.get("line-miter-limit"),Et=Pe.get("line-round-limit");this.lineClips=this.lineFeatureClips(P);for(let Vt of W)this.addLine(Vt,P,Ye,at,pt,Et);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,P,se,ke,ge)}addLine(P,W,se,ge,ke,Pe){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,this.lineClips){this.lineClipsArray.push(this.lineClips);for(let la=0;la=2&&P[at-1].equals(P[at-2]);)at--;let pt=0;for(;pt0;if(Ri&&la>pt){let no=er.dist(sr);if(no>2*Et){let Wi=er.sub(er.sub(sr)._mult(Et/no)._round());this.updateDistance(sr,Wi),this.addCurrentVertex(Wi,Er,0,0,Vt),sr=Wi}}let Ci=sr&&xr,wi=Ci?se:Ye?"butt":ge;if(Ci&&wi==="round"&&(bnke&&(wi="bevel"),wi==="bevel"&&(bn>2&&(wi="flipbevel"),bn100)Ka=Qr.mult(-1);else{let no=bn*Er.add(Qr).mag()/Er.sub(Qr).mag();Ka._perp()._mult(no*(To?-1:1))}this.addCurrentVertex(er,Ka,0,0,Vt),this.addCurrentVertex(er,Ka.mult(-1),0,0,Vt)}else if(wi==="bevel"||wi==="fakeround"){let no=-Math.sqrt(bn*bn-1),Wi=To?no:0,Ni=To?0:no;if(sr&&this.addCurrentVertex(er,Er,Wi,Ni,Vt),wi==="fakeround"){let In=Math.round(180*ei/Math.PI/20);for(let uo=1;uo2*Et){let Wi=er.add(xr.sub(er)._mult(Et/no)._round());this.updateDistance(er,Wi),this.addCurrentVertex(Wi,Qr,0,0,Vt),er=Wi}}}}addCurrentVertex(P,W,se,ge,ke,Pe=!1){let Ye=W.y*ge-W.x,at=-W.y-W.x*ge;this.addHalfVertex(P,W.x+W.y*se,W.y-W.x*se,Pe,!1,se,ke),this.addHalfVertex(P,Ye,at,Pe,!0,-ge,ke),this.distance>J6/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(P,W,se,ge,ke,Pe))}addHalfVertex({x:P,y:W},se,ge,ke,Pe,Ye,at){let pt=.5*(this.lineClips?this.scaledDistance*(J6-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((P<<1)+(ke?1:0),(W<<1)+(Pe?1:0),Math.round(63*se)+128,Math.round(63*ge)+128,1+(Ye===0?0:Ye<0?-1:1)|(63&pt)<<2,pt>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Et=at.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Et),at.primitiveLength++),Pe?this.e2=Et:this.e1=Et}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(P,W){this.distance+=P.dist(W),this.updateScaledDistance()}}let Q6,eM;Aa("LineBucket",c2,{omit:["layers","patternFeatures"]});var tM={get paint(){return eM=eM||new Me({"line-opacity":new Xi(re.paint_line["line-opacity"]),"line-color":new Xi(re.paint_line["line-color"]),"line-translate":new ki(re.paint_line["line-translate"]),"line-translate-anchor":new ki(re.paint_line["line-translate-anchor"]),"line-width":new Xi(re.paint_line["line-width"]),"line-gap-width":new Xi(re.paint_line["line-gap-width"]),"line-offset":new Xi(re.paint_line["line-offset"]),"line-blur":new Xi(re.paint_line["line-blur"]),"line-dasharray":new zc(re.paint_line["line-dasharray"]),"line-pattern":new jf(re.paint_line["line-pattern"]),"line-gradient":new nu(re.paint_line["line-gradient"])})},get layout(){return Q6=Q6||new Me({"line-cap":new ki(re.layout_line["line-cap"]),"line-join":new Xi(re.layout_line["line-join"]),"line-miter-limit":new ki(re.layout_line["line-miter-limit"]),"line-round-limit":new ki(re.layout_line["line-round-limit"]),"line-sort-key":new Xi(re.layout_line["line-sort-key"])})}};class JG extends Xi{possiblyEvaluate(P,W){return W=new Do(Math.floor(W.zoom),{now:W.now,fadeDuration:W.fadeDuration,zoomHistory:W.zoomHistory,transition:W.transition}),super.possiblyEvaluate(P,W)}evaluate(P,W,se,ge){return W=E({},W,{zoom:Math.floor(W.zoom)}),super.evaluate(P,W,se,ge)}}let kg;class QG extends J{constructor(P){super(P,tM),this.gradientVersion=0,kg||(kg=new JG(tM.paint.properties["line-width"].specification),kg.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(P){if(P==="line-gradient"){let W=this.gradientExpression();this.stepInterpolant=!!function(se){return se._styleExpression!==void 0}(W)&&W._styleExpression.expression instanceof Xr,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(P,W){super.recalculate(P,W),this.paint._values["line-floorwidth"]=kg.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,P)}createBucket(P){return new c2(P)}queryRadius(P){let W=P,se=rM(Pa("line-width",this,W),Pa("line-gap-width",this,W)),ge=Pa("line-offset",this,W);return se/2+Math.abs(ge)+En(this.paint.get("line-translate"))}queryIntersectsFeature(P,W,se,ge,ke,Pe,Ye){let at=cn(P,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Pe.angle,Ye),pt=Ye/2*rM(this.paint.get("line-width").evaluate(W,se),this.paint.get("line-gap-width").evaluate(W,se)),Et=this.paint.get("line-offset").evaluate(W,se);return Et&&(ge=function(Vt,er){let sr=[];for(let xr=0;xr=3){for(let Qr=0;Qr0?P+2*G:G}let eV=Ze([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),tV=Ze([{name:"a_projected_pos",components:3,type:"Float32"}],4);Ze([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let rV=Ze([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Ze([{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"}]);let aM=Ze([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),aV=Ze([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function nV(G,P,W){return G.sections.forEach(se=>{se.text=function(ge,ke,Pe){let Ye=ke.layout.get("text-transform").evaluate(Pe,{});return Ye==="uppercase"?ge=ge.toLocaleUpperCase():Ye==="lowercase"&&(ge=ge.toLocaleLowerCase()),os.applyArabicShaping&&(ge=os.applyArabicShaping(ge)),ge}(se.text,P,W)}),G}Ze([{name:"triangle",components:3,type:"Uint16"}]),Ze([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Ze([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Ze([{type:"Float32",name:"offsetX"}]),Ze([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Ze([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);let Um={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"};var Mc=24,nM=Al,iM=function(G,P,W,se,ge){var ke,Pe,Ye=8*ge-se-1,at=(1<>1,Et=-7,Vt=W?ge-1:0,er=W?-1:1,sr=G[P+Vt];for(Vt+=er,ke=sr&(1<<-Et)-1,sr>>=-Et,Et+=Ye;Et>0;ke=256*ke+G[P+Vt],Vt+=er,Et-=8);for(Pe=ke&(1<<-Et)-1,ke>>=-Et,Et+=se;Et>0;Pe=256*Pe+G[P+Vt],Vt+=er,Et-=8);if(ke===0)ke=1-pt;else{if(ke===at)return Pe?NaN:1/0*(sr?-1:1);Pe+=Math.pow(2,se),ke-=pt}return(sr?-1:1)*Pe*Math.pow(2,ke-se)},oM=function(G,P,W,se,ge,ke){var Pe,Ye,at,pt=8*ke-ge-1,Et=(1<>1,er=ge===23?Math.pow(2,-24)-Math.pow(2,-77):0,sr=se?0:ke-1,xr=se?1:-1,Er=P<0||P===0&&1/P<0?1:0;for(P=Math.abs(P),isNaN(P)||P===1/0?(Ye=isNaN(P)?1:0,Pe=Et):(Pe=Math.floor(Math.log(P)/Math.LN2),P*(at=Math.pow(2,-Pe))<1&&(Pe--,at*=2),(P+=Pe+Vt>=1?er/at:er*Math.pow(2,1-Vt))*at>=2&&(Pe++,at/=2),Pe+Vt>=Et?(Ye=0,Pe=Et):Pe+Vt>=1?(Ye=(P*at-1)*Math.pow(2,ge),Pe+=Vt):(Ye=P*Math.pow(2,Vt-1)*Math.pow(2,ge),Pe=0));ge>=8;G[W+sr]=255&Ye,sr+=xr,Ye/=256,ge-=8);for(Pe=Pe<0;G[W+sr]=255&Pe,sr+=xr,Pe/=256,pt-=8);G[W+sr-xr]|=128*Er};function Al(G){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(G)?G:new Uint8Array(G||0),this.pos=0,this.type=0,this.length=this.buf.length}Al.Varint=0,Al.Fixed64=1,Al.Bytes=2,Al.Fixed32=5;var f2=4294967296,sM=1/f2,lM=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");function zd(G){return G.type===Al.Bytes?G.readVarint()+G.pos:G.pos+1}function Kp(G,P,W){return W?4294967296*P+(G>>>0):4294967296*(P>>>0)+(G>>>0)}function uM(G,P,W){var se=P<=16383?1:P<=2097151?2:P<=268435455?3:Math.floor(Math.log(P)/(7*Math.LN2));W.realloc(se);for(var ge=W.pos-1;ge>=G;ge--)W.buf[ge+se]=W.buf[ge]}function iV(G,P){for(var W=0;W>>8,G[W+2]=P>>>16,G[W+3]=P>>>24}function cM(G,P){return(G[P]|G[P+1]<<8|G[P+2]<<16)+(G[P+3]<<24)}Al.prototype={destroy:function(){this.buf=null},readFields:function(G,P,W){for(W=W||this.length;this.pos>3,ke=this.pos;this.type=7&se,G(ge,P,this),this.pos===ke&&this.skip(se)}return P},readMessage:function(G,P){return this.readFields(G,P,this.readVarint()+this.pos)},readFixed32:function(){var G=Cg(this.buf,this.pos);return this.pos+=4,G},readSFixed32:function(){var G=cM(this.buf,this.pos);return this.pos+=4,G},readFixed64:function(){var G=Cg(this.buf,this.pos)+Cg(this.buf,this.pos+4)*f2;return this.pos+=8,G},readSFixed64:function(){var G=Cg(this.buf,this.pos)+cM(this.buf,this.pos+4)*f2;return this.pos+=8,G},readFloat:function(){var G=iM(this.buf,this.pos,!0,23,4);return this.pos+=4,G},readDouble:function(){var G=iM(this.buf,this.pos,!0,52,8);return this.pos+=8,G},readVarint:function(G){var P,W,se=this.buf;return P=127&(W=se[this.pos++]),W<128?P:(P|=(127&(W=se[this.pos++]))<<7,W<128?P:(P|=(127&(W=se[this.pos++]))<<14,W<128?P:(P|=(127&(W=se[this.pos++]))<<21,W<128?P:function(ge,ke,Pe){var Ye,at,pt=Pe.buf;if(Ye=(112&(at=pt[Pe.pos++]))>>4,at<128||(Ye|=(127&(at=pt[Pe.pos++]))<<3,at<128)||(Ye|=(127&(at=pt[Pe.pos++]))<<10,at<128)||(Ye|=(127&(at=pt[Pe.pos++]))<<17,at<128)||(Ye|=(127&(at=pt[Pe.pos++]))<<24,at<128)||(Ye|=(1&(at=pt[Pe.pos++]))<<31,at<128))return Kp(ge,Ye,ke);throw new Error("Expected varint not more than 10 bytes")}(P|=(15&(W=se[this.pos]))<<28,G,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var G=this.readVarint();return G%2==1?(G+1)/-2:G/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var G=this.readVarint()+this.pos,P=this.pos;return this.pos=G,G-P>=12&&lM?function(W,se,ge){return lM.decode(W.subarray(se,ge))}(this.buf,P,G):function(W,se,ge){for(var ke="",Pe=se;Pe239?4:Et>223?3:Et>191?2:1;if(Pe+er>ge)break;er===1?Et<128&&(Vt=Et):er===2?(192&(Ye=W[Pe+1]))==128&&(Vt=(31&Et)<<6|63&Ye)<=127&&(Vt=null):er===3?(at=W[Pe+2],(192&(Ye=W[Pe+1]))==128&&(192&at)==128&&((Vt=(15&Et)<<12|(63&Ye)<<6|63&at)<=2047||Vt>=55296&&Vt<=57343)&&(Vt=null)):er===4&&(at=W[Pe+2],pt=W[Pe+3],(192&(Ye=W[Pe+1]))==128&&(192&at)==128&&(192&pt)==128&&((Vt=(15&Et)<<18|(63&Ye)<<12|(63&at)<<6|63&pt)<=65535||Vt>=1114112)&&(Vt=null)),Vt===null?(Vt=65533,er=1):Vt>65535&&(Vt-=65536,ke+=String.fromCharCode(Vt>>>10&1023|55296),Vt=56320|1023&Vt),ke+=String.fromCharCode(Vt),Pe+=er}return ke}(this.buf,P,G)},readBytes:function(){var G=this.readVarint()+this.pos,P=this.buf.subarray(this.pos,G);return this.pos=G,P},readPackedVarint:function(G,P){if(this.type!==Al.Bytes)return G.push(this.readVarint(P));var W=zd(this);for(G=G||[];this.pos127;);else if(P===Al.Bytes)this.pos=this.readVarint()+this.pos;else if(P===Al.Fixed32)this.pos+=4;else{if(P!==Al.Fixed64)throw new Error("Unimplemented type: "+P);this.pos+=8}},writeTag:function(G,P){this.writeVarint(G<<3|P)},realloc:function(G){for(var P=this.length||16;P268435455||G<0?function(P,W){var se,ge;if(P>=0?(se=P%4294967296|0,ge=P/4294967296|0):(ge=~(-P/4294967296),4294967295^(se=~(-P%4294967296))?se=se+1|0:(se=0,ge=ge+1|0)),P>=18446744073709552e3||P<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");W.realloc(10),function(ke,Pe,Ye){Ye.buf[Ye.pos++]=127&ke|128,ke>>>=7,Ye.buf[Ye.pos++]=127&ke|128,ke>>>=7,Ye.buf[Ye.pos++]=127&ke|128,ke>>>=7,Ye.buf[Ye.pos++]=127&ke|128,Ye.buf[Ye.pos]=127&(ke>>>=7)}(se,0,W),function(ke,Pe){var Ye=(7&ke)<<4;Pe.buf[Pe.pos++]|=Ye|((ke>>>=3)?128:0),ke&&(Pe.buf[Pe.pos++]=127&ke|((ke>>>=7)?128:0),ke&&(Pe.buf[Pe.pos++]=127&ke|((ke>>>=7)?128:0),ke&&(Pe.buf[Pe.pos++]=127&ke|((ke>>>=7)?128:0),ke&&(Pe.buf[Pe.pos++]=127&ke|((ke>>>=7)?128:0),ke&&(Pe.buf[Pe.pos++]=127&ke)))))}(ge,W)}(G,this):(this.realloc(4),this.buf[this.pos++]=127&G|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=127&(G>>>=7)|(G>127?128:0),G<=127||(this.buf[this.pos++]=G>>>7&127))))},writeSVarint:function(G){this.writeVarint(G<0?2*-G-1:2*G)},writeBoolean:function(G){this.writeVarint(!!G)},writeString:function(G){G=String(G),this.realloc(4*G.length),this.pos++;var P=this.pos;this.pos=function(se,ge,ke){for(var Pe,Ye,at=0;at55295&&Pe<57344){if(!Ye){Pe>56319||at+1===ge.length?(se[ke++]=239,se[ke++]=191,se[ke++]=189):Ye=Pe;continue}if(Pe<56320){se[ke++]=239,se[ke++]=191,se[ke++]=189,Ye=Pe;continue}Pe=Ye-55296<<10|Pe-56320|65536,Ye=null}else Ye&&(se[ke++]=239,se[ke++]=191,se[ke++]=189,Ye=null);Pe<128?se[ke++]=Pe:(Pe<2048?se[ke++]=Pe>>6|192:(Pe<65536?se[ke++]=Pe>>12|224:(se[ke++]=Pe>>18|240,se[ke++]=Pe>>12&63|128),se[ke++]=Pe>>6&63|128),se[ke++]=63&Pe|128)}return ke}(this.buf,G,this.pos);var W=this.pos-P;W>=128&&uM(P,W,this),this.pos=P-1,this.writeVarint(W),this.pos+=W},writeFloat:function(G){this.realloc(4),oM(this.buf,G,this.pos,!0,23,4),this.pos+=4},writeDouble:function(G){this.realloc(8),oM(this.buf,G,this.pos,!0,52,8),this.pos+=8},writeBytes:function(G){var P=G.length;this.writeVarint(P),this.realloc(P);for(var W=0;W=128&&uM(W,se,this),this.pos=W-1,this.writeVarint(se),this.pos+=se},writeMessage:function(G,P,W){this.writeTag(G,Al.Bytes),this.writeRawMessage(P,W)},writePackedVarint:function(G,P){P.length&&this.writeMessage(G,iV,P)},writePackedSVarint:function(G,P){P.length&&this.writeMessage(G,oV,P)},writePackedBoolean:function(G,P){P.length&&this.writeMessage(G,uV,P)},writePackedFloat:function(G,P){P.length&&this.writeMessage(G,sV,P)},writePackedDouble:function(G,P){P.length&&this.writeMessage(G,lV,P)},writePackedFixed32:function(G,P){P.length&&this.writeMessage(G,cV,P)},writePackedSFixed32:function(G,P){P.length&&this.writeMessage(G,fV,P)},writePackedFixed64:function(G,P){P.length&&this.writeMessage(G,hV,P)},writePackedSFixed64:function(G,P){P.length&&this.writeMessage(G,dV,P)},writeBytesField:function(G,P){this.writeTag(G,Al.Bytes),this.writeBytes(P)},writeFixed32Field:function(G,P){this.writeTag(G,Al.Fixed32),this.writeFixed32(P)},writeSFixed32Field:function(G,P){this.writeTag(G,Al.Fixed32),this.writeSFixed32(P)},writeFixed64Field:function(G,P){this.writeTag(G,Al.Fixed64),this.writeFixed64(P)},writeSFixed64Field:function(G,P){this.writeTag(G,Al.Fixed64),this.writeSFixed64(P)},writeVarintField:function(G,P){this.writeTag(G,Al.Varint),this.writeVarint(P)},writeSVarintField:function(G,P){this.writeTag(G,Al.Varint),this.writeSVarint(P)},writeStringField:function(G,P){this.writeTag(G,Al.Bytes),this.writeString(P)},writeFloatField:function(G,P){this.writeTag(G,Al.Fixed32),this.writeFloat(P)},writeDoubleField:function(G,P){this.writeTag(G,Al.Fixed64),this.writeDouble(P)},writeBooleanField:function(G,P){this.writeVarintField(G,!!P)}};var h2=t(nM);let d2=3;function vV(G,P,W){G===1&&W.readMessage(pV,P)}function pV(G,P,W){if(G===3){let{id:se,bitmap:ge,width:ke,height:Pe,left:Ye,top:at,advance:pt}=W.readMessage(mV,{});P.push({id:se,bitmap:new Vn({width:ke+2*d2,height:Pe+2*d2},ge),metrics:{width:ke,height:Pe,left:Ye,top:at,advance:pt}})}}function mV(G,P,W){G===1?P.id=W.readVarint():G===2?P.bitmap=W.readBytes():G===3?P.width=W.readVarint():G===4?P.height=W.readVarint():G===5?P.left=W.readSVarint():G===6?P.top=W.readSVarint():G===7&&(P.advance=W.readVarint())}let fM=d2;function hM(G){let P=0,W=0;for(let Pe of G)P+=Pe.w*Pe.h,W=Math.max(W,Pe.w);G.sort((Pe,Ye)=>Ye.h-Pe.h);let se=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(P/.95)),W),h:1/0}],ge=0,ke=0;for(let Pe of G)for(let Ye=se.length-1;Ye>=0;Ye--){let at=se[Ye];if(!(Pe.w>at.w||Pe.h>at.h)){if(Pe.x=at.x,Pe.y=at.y,ke=Math.max(ke,Pe.y+Pe.h),ge=Math.max(ge,Pe.x+Pe.w),Pe.w===at.w&&Pe.h===at.h){let pt=se.pop();Ye=0&&se>=P&&Pg[this.text.charCodeAt(se)];se--)W--;this.text=this.text.substring(P,W),this.sectionIndex=this.sectionIndex.slice(P,W)}substring(P,W){let se=new Qp;return se.text=this.text.substring(P,W),se.sectionIndex=this.sectionIndex.slice(P,W),se.sections=this.sections,se}toString(){return this.text}getMaxScale(){return this.sectionIndex.reduce((P,W)=>Math.max(P,this.sections[W].scale),0)}addTextSection(P,W){this.text+=P.text,this.sections.push(Gm.forText(P.scale,P.fontStack||W));let se=this.sections.length-1;for(let ge=0;ge=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}}function Lg(G,P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er,sr,xr){let Er=Qp.fromFeature(G,ge),Qr;Vt===l.ah.vertical&&Er.verticalizePunctuation();let{processBidirectionalText:la,processStyledBidirectionalText:Ka}=os;if(la&&Er.sections.length===1){Qr=[];let bn=la(Er.toString(),p2(Er,pt,ke,P,se,sr));for(let ei of bn){let Ri=new Qp;Ri.text=ei,Ri.sections=Er.sections;for(let To=0;To0&&Bd>kf&&(kf=Bd)}else{let Rh=Ri[Ws.fontStack],af=Rh&&Rh[Wl];if(af&&af.rect)a0=af.rect,Cu=af.metrics;else{let Bd=ei[Ws.fontStack],Zm=Bd&&Bd[Wl];if(!Zm)continue;Cu=Zm.metrics}Th=(Nc-Ws.scale)*Mc}Nh?(bn.verticalizable=!0,ih.push({glyph:Wl,imageName:md,x:No,y:Pl+Th,vertical:Nh,scale:Ws.scale,fontStack:Ws.fontStack,sectionIndex:Bl,metrics:Cu,rect:a0}),No+=gd*Ws.scale+In):(ih.push({glyph:Wl,imageName:md,x:No,y:Pl+Th,vertical:Nh,scale:Ws.scale,fontStack:Ws.fontStack,sectionIndex:Bl,metrics:Cu,rect:a0}),No+=Cu.advance*Ws.scale+In)}ih.length!==0&&(Tl=Math.max(No-In,Tl),xV(ih,0,ih.length-1,Oh,kf)),No=0;let Ph=wi*Nc+kf;Ef.lineOffset=Math.max(kf,Uf),Pl+=Ph,Bc=Math.max(Ph,Bc),++Sf}var Oc;let rh=Pl-qm,{horizontalAlign:ah,verticalAlign:nh}=m2(no);(function(ju,Nc,Uf,Ef,ih,kf,Ph,mh,Ws){let Bl=(Nc-Uf)*ih,Wl=0;Wl=kf!==Ph?-mh*Ef-qm:(-Ef*Ws+.5)*Ph;for(let Th of ju)for(let Cu of Th.positionedGlyphs)Cu.x+=Bl,Cu.y+=Wl})(bn.positionedLines,Oh,ah,nh,Tl,Bc,wi,rh,Ci.length),bn.top+=-nh*rh,bn.bottom=bn.top+rh,bn.left+=-ah*Tl,bn.right=bn.left+Tl}(qa,P,W,se,Qr,Pe,Ye,at,Vt,pt,er,xr),!function(bn){for(let ei of bn)if(ei.positionedGlyphs.length!==0)return!1;return!0}(Ma)&&qa}let Pg={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},gV={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},yV={40:!0};function vM(G,P,W,se,ge,ke){if(P.imageName){let Pe=se[P.imageName];return Pe?Pe.displaySize[0]*P.scale*Mc/ke+ge:0}{let Pe=W[P.fontStack],Ye=Pe&&Pe[G];return Ye?Ye.metrics.advance*P.scale+ge:0}}function pM(G,P,W,se){let ge=Math.pow(G-P,2);return se?G=0,pt=0;for(let Vt=0;Vtpt){let Et=Math.ceil(ke/pt);ge*=Et/Pe,Pe=Et}return{x1:se,y1:ge,x2:se+ke,y2:ge+Pe}}function _M(G,P,W,se,ge,ke){let Pe=G.image,Ye;if(Pe.content){let Qr=Pe.content,la=Pe.pixelRatio||1;Ye=[Qr[0]/la,Qr[1]/la,Pe.displaySize[0]-Qr[2]/la,Pe.displaySize[1]-Qr[3]/la]}let at=P.left*ke,pt=P.right*ke,Et,Vt,er,sr;W==="width"||W==="both"?(sr=ge[0]+at-se[3],Vt=ge[0]+pt+se[1]):(sr=ge[0]+(at+pt-Pe.displaySize[0])/2,Vt=sr+Pe.displaySize[0]);let xr=P.top*ke,Er=P.bottom*ke;return W==="height"||W==="both"?(Et=ge[1]+xr-se[0],er=ge[1]+Er+se[2]):(Et=ge[1]+(xr+Er-Pe.displaySize[1])/2,er=Et+Pe.displaySize[1]),{image:Pe,top:Et,right:Vt,bottom:er,left:sr,collisionPadding:Ye}}let Vm=255,pd=128,sv=Vm*pd;function xM(G,P){let{expression:W}=P;if(W.kind==="constant")return{kind:"constant",layoutSize:W.evaluate(new Do(G+1))};if(W.kind==="source")return{kind:"source"};{let{zoomStops:se,interpolationType:ge}=W,ke=0;for(;kePe.id),this.index=P.index,this.pixelRatio=P.pixelRatio,this.sourceLayerIndex=P.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=Ea([]),this.placementViewportMatrix=Ea([]);let W=this.layers[0]._unevaluatedLayout._values;this.textSizeData=xM(this.zoom,W["text-size"]),this.iconSizeData=xM(this.zoom,W["icon-size"]);let se=this.layers[0].layout,ge=se.get("symbol-sort-key"),ke=se.get("symbol-z-order");this.canOverlap=g2(se,"text-overlap","text-allow-overlap")!=="never"||g2(se,"icon-overlap","icon-allow-overlap")!=="never"||se.get("text-ignore-placement")||se.get("icon-ignore-placement"),this.sortFeaturesByKey=ke!=="viewport-y"&&!ge.isConstant(),this.sortFeaturesByY=(ke==="viewport-y"||ke==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,se.get("symbol-placement")==="point"&&(this.writingModes=se.get("text-writing-mode").map(Pe=>l.ah[Pe])),this.stateDependentLayerIds=this.layers.filter(Pe=>Pe.isStateDependent()).map(Pe=>Pe.id),this.sourceID=P.sourceID}createArrays(){this.text=new _2(new Ks(this.layers,this.zoom,P=>/^text/.test(P))),this.icon=new _2(new Ks(this.layers,this.zoom,P=>/^icon/.test(P))),this.glyphOffsetArray=new ho,this.lineVertexArray=new to,this.symbolInstances=new Pi,this.textAnchorOffsets=new Fo}calculateGlyphDependencies(P,W,se,ge,ke){for(let Pe=0;Pe0)&&(Pe.value.kind!=="constant"||Pe.value.value.length>0),Et=at.value.kind!=="constant"||!!at.value.value||Object.keys(at.parameters).length>0,Vt=ke.get("symbol-sort-key");if(this.features=[],!pt&&!Et)return;let er=W.iconDependencies,sr=W.glyphDependencies,xr=W.availableImages,Er=new Do(this.zoom);for(let{feature:Qr,id:la,index:Ka,sourceLayerIndex:Ma}of P){let qa=ge._featureFilter.needGeometry,bn=nl(Qr,qa);if(!ge._featureFilter.filter(Er,bn,se))continue;let ei,Ri;if(qa||(bn.geometry=Cs(Qr)),pt){let Ci=ge.getValueAndResolveTokens("text-field",bn,se,xr),wi=sn.factory(Ci),no=this.hasRTLText=this.hasRTLText||TV(wi);(!no||os.getRTLTextPluginStatus()==="unavailable"||no&&os.isParsed())&&(ei=nV(wi,ge,bn))}if(Et){let Ci=ge.getValueAndResolveTokens("icon-image",bn,se,xr);Ri=Ci instanceof Dn?Ci:Dn.fromString(Ci)}if(!ei&&!Ri)continue;let To=this.sortFeaturesByKey?Vt.evaluate(bn,{},se):void 0;if(this.features.push({id:la,text:ei,icon:Ri,index:Ka,sourceLayerIndex:Ma,geometry:bn.geometry,properties:Qr.properties,type:wV[Qr.type],sortKey:To}),Ri&&(er[Ri.name]=!0),ei){let Ci=Pe.evaluate(bn,{},se).join(","),wi=ke.get("text-rotation-alignment")!=="viewport"&&ke.get("symbol-placement")!=="point";this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(l.ah.vertical)>=0;for(let no of ei.sections)if(no.image)er[no.image.name]=!0;else{let Wi=Oi(ei.toString()),Ni=no.fontStack||Ci,In=sr[Ni]=sr[Ni]||{};this.calculateGlyphDependencies(no.text,In,wi,this.allowVerticalPlacement,Wi)}}}ke.get("symbol-placement")==="line"&&(this.features=function(Qr){let la={},Ka={},Ma=[],qa=0;function bn(Ci){Ma.push(Qr[Ci]),qa++}function ei(Ci,wi,no){let Wi=Ka[Ci];return delete Ka[Ci],Ka[wi]=Wi,Ma[Wi].geometry[0].pop(),Ma[Wi].geometry[0]=Ma[Wi].geometry[0].concat(no[0]),Wi}function Ri(Ci,wi,no){let Wi=la[wi];return delete la[wi],la[Ci]=Wi,Ma[Wi].geometry[0].shift(),Ma[Wi].geometry[0]=no[0].concat(Ma[Wi].geometry[0]),Wi}function To(Ci,wi,no){let Wi=no?wi[0][wi[0].length-1]:wi[0][0];return`${Ci}:${Wi.x}:${Wi.y}`}for(let Ci=0;CiCi.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((Qr,la)=>Qr.sortKey-la.sortKey)}update(P,W,se){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(P,W,this.layers,se),this.icon.programConfigurations.updatePaintArrays(P,W,this.layers,se))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(P){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(P),this.iconCollisionBox.upload(P)),this.text.upload(P,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(P,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(P,W){let se=this.lineVertexArray.length;if(P.segment!==void 0){let ge=P.dist(W[P.segment+1]),ke=P.dist(W[P.segment]),Pe={};for(let Ye=P.segment+1;Ye=0;Ye--)Pe[Ye]={x:W[Ye].x,y:W[Ye].y,tileUnitDistanceFromAnchor:ke},Ye>0&&(ke+=W[Ye-1].dist(W[Ye]));for(let Ye=0;Ye0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(P,W){let se=P.placedSymbolArray.get(W),ge=se.vertexStartIndex+4*se.numGlyphs;for(let ke=se.vertexStartIndex;kege[Ye]-ge[at]||ke[at]-ke[Ye]),Pe}addToSortKeyRanges(P,W){let se=this.sortKeyRanges[this.sortKeyRanges.length-1];se&&se.sortKey===W?se.symbolInstanceEnd=P+1:this.sortKeyRanges.push({sortKey:W,symbolInstanceStart:P,symbolInstanceEnd:P+1})}sortFeatures(P){if(this.sortFeaturesByY&&this.sortedAngle!==P&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(P),this.sortedAngle=P,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let W of this.symbolInstanceIndexes){let se=this.symbolInstances.get(W);this.featureSortOrder.push(se.featureIndex),[se.rightJustifiedTextSymbolIndex,se.centerJustifiedTextSymbolIndex,se.leftJustifiedTextSymbolIndex].forEach((ge,ke,Pe)=>{ge>=0&&Pe.indexOf(ge)===ke&&this.addIndicesForPlacedSymbol(this.text,ge)}),se.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,se.verticalPlacedTextSymbolIndex),se.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,se.placedIconSymbolIndex),se.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,se.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let bM,wM;Aa("SymbolBucket",e0,{omit:["layers","collisionBoxArray","features","compareText"]}),e0.MAX_GLYPHS=65535,e0.addDynamicAttributes=y2;var b2={get paint(){return wM=wM||new Me({"icon-opacity":new Xi(re.paint_symbol["icon-opacity"]),"icon-color":new Xi(re.paint_symbol["icon-color"]),"icon-halo-color":new Xi(re.paint_symbol["icon-halo-color"]),"icon-halo-width":new Xi(re.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Xi(re.paint_symbol["icon-halo-blur"]),"icon-translate":new ki(re.paint_symbol["icon-translate"]),"icon-translate-anchor":new ki(re.paint_symbol["icon-translate-anchor"]),"text-opacity":new Xi(re.paint_symbol["text-opacity"]),"text-color":new Xi(re.paint_symbol["text-color"],{runtimeType:yt,getOverride:G=>G.textColor,hasOverride:G=>!!G.textColor}),"text-halo-color":new Xi(re.paint_symbol["text-halo-color"]),"text-halo-width":new Xi(re.paint_symbol["text-halo-width"]),"text-halo-blur":new Xi(re.paint_symbol["text-halo-blur"]),"text-translate":new ki(re.paint_symbol["text-translate"]),"text-translate-anchor":new ki(re.paint_symbol["text-translate-anchor"])})},get layout(){return bM=bM||new Me({"symbol-placement":new ki(re.layout_symbol["symbol-placement"]),"symbol-spacing":new ki(re.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new ki(re.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Xi(re.layout_symbol["symbol-sort-key"]),"symbol-z-order":new ki(re.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new ki(re.layout_symbol["icon-allow-overlap"]),"icon-overlap":new ki(re.layout_symbol["icon-overlap"]),"icon-ignore-placement":new ki(re.layout_symbol["icon-ignore-placement"]),"icon-optional":new ki(re.layout_symbol["icon-optional"]),"icon-rotation-alignment":new ki(re.layout_symbol["icon-rotation-alignment"]),"icon-size":new Xi(re.layout_symbol["icon-size"]),"icon-text-fit":new ki(re.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new ki(re.layout_symbol["icon-text-fit-padding"]),"icon-image":new Xi(re.layout_symbol["icon-image"]),"icon-rotate":new Xi(re.layout_symbol["icon-rotate"]),"icon-padding":new Xi(re.layout_symbol["icon-padding"]),"icon-keep-upright":new ki(re.layout_symbol["icon-keep-upright"]),"icon-offset":new Xi(re.layout_symbol["icon-offset"]),"icon-anchor":new Xi(re.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new ki(re.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new ki(re.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new ki(re.layout_symbol["text-rotation-alignment"]),"text-field":new Xi(re.layout_symbol["text-field"]),"text-font":new Xi(re.layout_symbol["text-font"]),"text-size":new Xi(re.layout_symbol["text-size"]),"text-max-width":new Xi(re.layout_symbol["text-max-width"]),"text-line-height":new ki(re.layout_symbol["text-line-height"]),"text-letter-spacing":new Xi(re.layout_symbol["text-letter-spacing"]),"text-justify":new Xi(re.layout_symbol["text-justify"]),"text-radial-offset":new Xi(re.layout_symbol["text-radial-offset"]),"text-variable-anchor":new ki(re.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Xi(re.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Xi(re.layout_symbol["text-anchor"]),"text-max-angle":new ki(re.layout_symbol["text-max-angle"]),"text-writing-mode":new ki(re.layout_symbol["text-writing-mode"]),"text-rotate":new Xi(re.layout_symbol["text-rotate"]),"text-padding":new ki(re.layout_symbol["text-padding"]),"text-keep-upright":new ki(re.layout_symbol["text-keep-upright"]),"text-transform":new Xi(re.layout_symbol["text-transform"]),"text-offset":new Xi(re.layout_symbol["text-offset"]),"text-allow-overlap":new ki(re.layout_symbol["text-allow-overlap"]),"text-overlap":new ki(re.layout_symbol["text-overlap"]),"text-ignore-placement":new ki(re.layout_symbol["text-ignore-placement"]),"text-optional":new ki(re.layout_symbol["text-optional"])})}};class AM{constructor(P){if(P.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=P.property.overrides?P.property.overrides.runtimeType:Ve,this.defaultValue=P}evaluate(P){if(P.formattedSection){let W=this.defaultValue.property.overrides;if(W&&W.hasOverride(P.formattedSection))return W.getOverride(P.formattedSection)}return P.feature&&P.featureState?this.defaultValue.evaluate(P.feature,P.featureState):this.defaultValue.property.specification.default}eachChild(P){this.defaultValue.isConstant()||P(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}Aa("FormatSectionOverride",AM,{omit:["defaultValue"]});class Ig extends J{constructor(P){super(P,b2)}recalculate(P,W){if(super.recalculate(P,W),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let se=this.layout.get("text-writing-mode");if(se){let ge=[];for(let ke of se)ge.indexOf(ke)<0&&ge.push(ke);this.layout._values["text-writing-mode"]=ge}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(P,W,se,ge){let ke=this.layout.get(P).evaluate(W,{},se,ge),Pe=this._unevaluatedLayout._values[P];return Pe.isDataDriven()||xf(Pe.value)||!ke?ke:function(Ye,at){return at.replace(/{([^{}]+)}/g,(pt,Et)=>Ye&&Et in Ye?String(Ye[Et]):"")}(W.properties,ke)}createBucket(P){return new e0(P)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let P of b2.paint.overridableProperties){if(!Ig.hasPaintOverride(this.layout,P))continue;let W=this.paint.get(P),se=new AM(W),ge=new tu(se,W.property.specification),ke=null;ke=W.value.kind==="constant"||W.value.kind==="source"?new zu("source",ge):new Fl("composite",ge,W.value.zoomStops),this.paint._values[P]=new xl(W.property,ke,W.parameters)}}_handleOverridablePaintPropertyUpdate(P,W,se){return!(!this.layout||W.isDataDriven()||se.isDataDriven())&&Ig.hasPaintOverride(this.layout,P)}static hasPaintOverride(P,W){let se=P.get("text-field"),ge=b2.paint.properties[W],ke=!1,Pe=Ye=>{for(let at of Ye)if(ge.overrides&&ge.overrides.hasOverride(at))return void(ke=!0)};if(se.value.kind==="constant"&&se.value.value instanceof sn)Pe(se.value.value.sections);else if(se.value.kind==="source"){let Ye=pt=>{ke||(pt instanceof Li&&mn(pt.value)===vr?Pe(pt.value.sections):pt instanceof Yi?Pe(pt.sections):pt.eachChild(Ye))},at=se.value;at._styleExpression&&Ye(at._styleExpression.expression)}return ke}}let TM;var MV={get paint(){return TM=TM||new Me({"background-color":new ki(re.paint_background["background-color"]),"background-pattern":new zc(re.paint_background["background-pattern"]),"background-opacity":new ki(re.paint_background["background-opacity"])})}};class SV extends J{constructor(P){super(P,MV)}}let MM;var EV={get paint(){return MM=MM||new Me({"raster-opacity":new ki(re.paint_raster["raster-opacity"]),"raster-hue-rotate":new ki(re.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new ki(re.paint_raster["raster-brightness-min"]),"raster-brightness-max":new ki(re.paint_raster["raster-brightness-max"]),"raster-saturation":new ki(re.paint_raster["raster-saturation"]),"raster-contrast":new ki(re.paint_raster["raster-contrast"]),"raster-resampling":new ki(re.paint_raster["raster-resampling"]),"raster-fade-duration":new ki(re.paint_raster["raster-fade-duration"])})}};class kV extends J{constructor(P){super(P,EV)}}class CV extends J{constructor(P){super(P,{}),this.onAdd=W=>{this.implementation.onAdd&&this.implementation.onAdd(W,W.painter.context.gl)},this.onRemove=W=>{this.implementation.onRemove&&this.implementation.onRemove(W,W.painter.context.gl)},this.implementation=P}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class LV{constructor(P){this._methodToThrottle=P,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()})}trigger(){this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(()=>{this._triggered=!1,this._methodToThrottle()},0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let w2=63710088e-1;class lv{constructor(P,W){if(isNaN(P)||isNaN(W))throw new Error(`Invalid LngLat object: (${P}, ${W})`);if(this.lng=+P,this.lat=+W,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new lv(T(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(P){let W=Math.PI/180,se=this.lat*W,ge=P.lat*W,ke=Math.sin(se)*Math.sin(ge)+Math.cos(se)*Math.cos(ge)*Math.cos((P.lng-this.lng)*W);return w2*Math.acos(Math.min(ke,1))}static convert(P){if(P instanceof lv)return P;if(Array.isArray(P)&&(P.length===2||P.length===3))return new lv(Number(P[0]),Number(P[1]));if(!Array.isArray(P)&&typeof P=="object"&&P!==null)return new lv(Number("lng"in P?P.lng:P.lon),Number(P.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 [, ]")}}let SM=2*Math.PI*w2;function EM(G){return SM*Math.cos(G*Math.PI/180)}function kM(G){return(180+G)/360}function CM(G){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+G*Math.PI/360)))/360}function LM(G,P){return G/EM(P)}function A2(G){return 360/Math.PI*Math.atan(Math.exp((180-360*G)*Math.PI/180))-90}class Hm{constructor(P,W,se=0){this.x=+P,this.y=+W,this.z=+se}static fromLngLat(P,W=0){let se=lv.convert(P);return new Hm(kM(se.lng),CM(se.lat),LM(W,se.lat))}toLngLat(){return new lv(360*this.x-180,A2(this.y))}toAltitude(){return this.z*EM(A2(this.y))}meterInMercatorCoordinateUnits(){return 1/SM*(P=A2(this.y),1/Math.cos(P*Math.PI/180));var P}}function PM(G,P,W){var se=2*Math.PI*6378137/256/Math.pow(2,W);return[G*se-2*Math.PI*6378137/2,P*se-2*Math.PI*6378137/2]}class T2{constructor(P,W,se){if(!function(ge,ke,Pe){return!(ge<0||ge>25||Pe<0||Pe>=Math.pow(2,ge)||ke<0||ke>=Math.pow(2,ge))}(P,W,se))throw new Error(`x=${W}, y=${se}, z=${P} outside of bounds. 0<=x<${Math.pow(2,P)}, 0<=y<${Math.pow(2,P)} 0<=z<=25 `);this.z=P,this.x=W,this.y=se,this.key=Wm(0,P,P,W,se)}equals(P){return this.z===P.z&&this.x===P.x&&this.y===P.y}url(P,W,se){let ge=(Pe=this.y,Ye=this.z,at=PM(256*(ke=this.x),256*(Pe=Math.pow(2,Ye)-Pe-1),Ye),pt=PM(256*(ke+1),256*(Pe+1),Ye),at[0]+","+at[1]+","+pt[0]+","+pt[1]);var ke,Pe,Ye,at,pt;let Et=function(Vt,er,sr){let xr,Er="";for(let Qr=Vt;Qr>0;Qr--)xr=1<1?"@2x":"").replace(/{quadkey}/g,Et).replace(/{bbox-epsg-3857}/g,ge)}isChildOf(P){let W=this.z-P.z;return W>0&&P.x===this.x>>W&&P.y===this.y>>W}getTilePoint(P){let W=Math.pow(2,this.z);return new n((P.x*W-this.x)*Di,(P.y*W-this.y)*Di)}toString(){return`${this.z}/${this.x}/${this.y}`}}class RM{constructor(P,W){this.wrap=P,this.canonical=W,this.key=Wm(P,W.z,W.z,W.x,W.y)}}class Lh{constructor(P,W,se,ge,ke){if(P= z; overscaledZ = ${P}; z = ${se}`);this.overscaledZ=P,this.wrap=W,this.canonical=new T2(se,+ge,+ke),this.key=Wm(W,P,se,ge,ke)}clone(){return new Lh(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(P){return this.overscaledZ===P.overscaledZ&&this.wrap===P.wrap&&this.canonical.equals(P.canonical)}scaledTo(P){if(P>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${P}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-P;return P>this.canonical.z?new Lh(P,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Lh(P,this.wrap,P,this.canonical.x>>W,this.canonical.y>>W)}calculateScaledKey(P,W){if(P>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${P}; overscaledZ = ${this.overscaledZ}`);let se=this.canonical.z-P;return P>this.canonical.z?Wm(this.wrap*+W,P,this.canonical.z,this.canonical.x,this.canonical.y):Wm(this.wrap*+W,P,P,this.canonical.x>>se,this.canonical.y>>se)}isChildOf(P){if(P.wrap!==this.wrap)return!1;let W=this.canonical.z-P.canonical.z;return P.overscaledZ===0||P.overscaledZ>W&&P.canonical.y===this.canonical.y>>W}children(P){if(this.overscaledZ>=P)return[new Lh(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let W=this.canonical.z+1,se=2*this.canonical.x,ge=2*this.canonical.y;return[new Lh(W,this.wrap,W,se,ge),new Lh(W,this.wrap,W,se+1,ge),new Lh(W,this.wrap,W,se,ge+1),new Lh(W,this.wrap,W,se+1,ge+1)]}isLessThan(P){return this.wrapP.wrap)&&(this.overscaledZP.overscaledZ)&&(this.canonical.xP.canonical.x)&&this.canonical.ythis.max&&(this.max=Vt),Vt=this.dim+1||W<-1||W>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(W+1)*this.stride+(P+1)}unpack(P,W,se){return P*this.redFactor+W*this.greenFactor+se*this.blueFactor-this.baseShift}getPixels(){return new Oa({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(P,W,se){if(this.dim!==P.dim)throw new Error("dem dimension mismatch");let ge=W*this.dim,ke=W*this.dim+this.dim,Pe=se*this.dim,Ye=se*this.dim+this.dim;switch(W){case-1:ge=ke-1;break;case 1:ke=ge+1}switch(se){case-1:Pe=Ye-1;break;case 1:Ye=Pe+1}let at=-W*this.dim,pt=-se*this.dim;for(let Et=Pe;Et=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${P} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[P]}}class FM{constructor(P,W,se,ge,ke){this.type="Feature",this._vectorTileFeature=P,P._z=W,P._x=se,P._y=ge,this.properties=P.properties,this.id=ke}get geometry(){return this._geometry===void 0&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry}set geometry(P){this._geometry=P}toJSON(){let P={geometry:this.geometry};for(let W in this)W!=="_geometry"&&W!=="_vectorTileFeature"&&(P[W]=this[W]);return P}}class zM{constructor(P,W){this.tileID=P,this.x=P.canonical.x,this.y=P.canonical.y,this.z=P.canonical.z,this.grid=new Na(Di,16,0),this.grid3D=new Na(Di,16,0),this.featureIndexArray=new Ns,this.promoteId=W}insert(P,W,se,ge,ke,Pe){let Ye=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(se,ge,ke);let at=Pe?this.grid3D:this.grid;for(let pt=0;pt=0&&Vt[3]>=0&&at.insert(Ye,Vt[0],Vt[1],Vt[2],Vt[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=new Yr.VectorTile(new h2(this.rawTileData)).layers,this.sourceLayerCoder=new DM(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers}query(P,W,se,ge){this.loadVTLayers();let ke=P.params||{},Pe=Di/P.tileSize/P.scale,Ye=Bu(ke.filter),at=P.queryGeometry,pt=P.queryPadding*Pe,Et=OM(at),Vt=this.grid.query(Et.minX-pt,Et.minY-pt,Et.maxX+pt,Et.maxY+pt),er=OM(P.cameraQueryGeometry),sr=this.grid3D.query(er.minX-pt,er.minY-pt,er.maxX+pt,er.maxY+pt,(Qr,la,Ka,Ma)=>function(qa,bn,ei,Ri,To){for(let wi of qa)if(bn<=wi.x&&ei<=wi.y&&Ri>=wi.x&&To>=wi.y)return!0;let Ci=[new n(bn,ei),new n(bn,To),new n(Ri,To),new n(Ri,ei)];if(qa.length>2){for(let wi of Ci)if(Sa(qa,wi))return!0}for(let wi=0;wi(Ma||(Ma=Cs(qa)),bn.queryIntersectsFeature(at,qa,ei,Ma,this.z,P.transform,Pe,P.pixelPosMatrix)))}return xr}loadMatchingFeature(P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt){let er=this.bucketLayerIDs[W];if(Pe&&!function(Qr,la){for(let Ka=0;Ka=0)return!0;return!1}(Pe,er))return;let sr=this.sourceLayerCoder.decode(se),xr=this.vtLayers[sr].feature(ge);if(ke.needGeometry){let Qr=nl(xr,!0);if(!ke.filter(new Do(this.tileID.overscaledZ),Qr,this.tileID.canonical))return}else if(!ke.filter(new Do(this.tileID.overscaledZ),xr))return;let Er=this.getId(xr,sr);for(let Qr=0;Qr{let Ye=P instanceof hc?P.get(Pe):null;return Ye&&Ye.evaluate?Ye.evaluate(W,se,ge):Ye})}function OM(G){let P=1/0,W=1/0,se=-1/0,ge=-1/0;for(let ke of G)P=Math.min(P,ke.x),W=Math.min(W,ke.y),se=Math.max(se,ke.x),ge=Math.max(ge,ke.y);return{minX:P,minY:W,maxX:se,maxY:ge}}function PV(G,P){return P-G}function NM(G,P,W,se,ge){let ke=[];for(let Pe=0;Pe=se&&Vt.x>=se||(Et.x>=se?Et=new n(se,Et.y+(se-Et.x)/(Vt.x-Et.x)*(Vt.y-Et.y))._round():Vt.x>=se&&(Vt=new n(se,Et.y+(se-Et.x)/(Vt.x-Et.x)*(Vt.y-Et.y))._round()),Et.y>=ge&&Vt.y>=ge||(Et.y>=ge?Et=new n(Et.x+(ge-Et.y)/(Vt.y-Et.y)*(Vt.x-Et.x),ge)._round():Vt.y>=ge&&(Vt=new n(Et.x+(ge-Et.y)/(Vt.y-Et.y)*(Vt.x-Et.x),ge)._round()),at&&Et.equals(at[at.length-1])||(at=[Et],ke.push(at)),at.push(Vt)))))}}return ke}Aa("FeatureIndex",zM,{omit:["rawTileData","sourceLayerCoder"]});class uv extends n{constructor(P,W,se,ge){super(P,W),this.angle=se,ge!==void 0&&(this.segment=ge)}clone(){return new uv(this.x,this.y,this.angle,this.segment)}}function jM(G,P,W,se,ge){if(P.segment===void 0||W===0)return!0;let ke=P,Pe=P.segment+1,Ye=0;for(;Ye>-W/2;){if(Pe--,Pe<0)return!1;Ye-=G[Pe].dist(ke),ke=G[Pe]}Ye+=G[Pe].dist(G[Pe+1]),Pe++;let at=[],pt=0;for(;Yese;)pt-=at.shift().angleDelta;if(pt>ge)return!1;Pe++,Ye+=Et.dist(Vt)}return!0}function UM(G){let P=0;for(let W=0;Wpt){let xr=(pt-at)/sr,Er=ui.number(Vt.x,er.x,xr),Qr=ui.number(Vt.y,er.y,xr),la=new uv(Er,Qr,er.angleTo(Vt),Et);return la._round(),!Pe||jM(G,la,Ye,Pe,P)?la:void 0}at+=sr}}function IV(G,P,W,se,ge,ke,Pe,Ye,at){let pt=qM(se,ke,Pe),Et=GM(se,ge),Vt=Et*Pe,er=G[0].x===0||G[0].x===at||G[0].y===0||G[0].y===at;return P-Vt

=0&&qa=0&&bn=0&&er+pt<=Et){let ei=new uv(qa,bn,Ka,xr);ei._round(),se&&!jM(G,ei,ke,se,ge)||sr.push(ei)}}Vt+=la}return Ye||sr.length||Pe||(sr=VM(G,Vt/2,W,se,ge,ke,Pe,!0,at)),sr}Aa("Anchor",uv);let t0=ph;function HM(G,P,W,se){let ge=[],ke=G.image,Pe=ke.pixelRatio,Ye=ke.paddedRect.w-2*t0,at=ke.paddedRect.h-2*t0,pt={x1:G.left,y1:G.top,x2:G.right,y2:G.bottom},Et=ke.stretchX||[[0,Ye]],Vt=ke.stretchY||[[0,at]],er=(In,uo)=>In+uo[1]-uo[0],sr=Et.reduce(er,0),xr=Vt.reduce(er,0),Er=Ye-sr,Qr=at-xr,la=0,Ka=sr,Ma=0,qa=xr,bn=0,ei=Er,Ri=0,To=Qr;if(ke.content&&se){let In=ke.content,uo=In[2]-In[0],ro=In[3]-In[1];(ke.textFitWidth||ke.textFitHeight)&&(pt=yM(G)),la=Dg(Et,0,In[0]),Ma=Dg(Vt,0,In[1]),Ka=Dg(Et,In[0],In[2]),qa=Dg(Vt,In[1],In[3]),bn=In[0]-la,Ri=In[1]-Ma,ei=uo-Ka,To=ro-qa}let Ci=pt.x1,wi=pt.y1,no=pt.x2-Ci,Wi=pt.y2-wi,Ni=(In,uo,ro,No)=>{let Pl=Fg(In.stretch-la,Ka,no,Ci),Tl=zg(In.fixed-bn,ei,In.stretch,sr),Bc=Fg(uo.stretch-Ma,qa,Wi,wi),Oh=zg(uo.fixed-Ri,To,uo.stretch,xr),Sf=Fg(ro.stretch-la,Ka,no,Ci),Oc=zg(ro.fixed-bn,ei,ro.stretch,sr),rh=Fg(No.stretch-Ma,qa,Wi,wi),ah=zg(No.fixed-Ri,To,No.stretch,xr),nh=new n(Pl,Bc),ju=new n(Sf,Bc),Nc=new n(Sf,rh),Uf=new n(Pl,rh),Ef=new n(Tl/Pe,Oh/Pe),ih=new n(Oc/Pe,ah/Pe),kf=P*Math.PI/180;if(kf){let Ws=Math.sin(kf),Bl=Math.cos(kf),Wl=[Bl,-Ws,Ws,Bl];nh._matMult(Wl),ju._matMult(Wl),Uf._matMult(Wl),Nc._matMult(Wl)}let Ph=In.stretch+In.fixed,mh=uo.stretch+uo.fixed;return{tl:nh,tr:ju,bl:Uf,br:Nc,tex:{x:ke.paddedRect.x+t0+Ph,y:ke.paddedRect.y+t0+mh,w:ro.stretch+ro.fixed-Ph,h:No.stretch+No.fixed-mh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Ef,pixelOffsetBR:ih,minFontScaleX:ei/Pe/no,minFontScaleY:To/Pe/Wi,isSDF:W}};if(se&&(ke.stretchX||ke.stretchY)){let In=WM(Et,Er,sr),uo=WM(Vt,Qr,xr);for(let ro=0;ro0&&(Er=Math.max(10,Er),this.circleDiameter=Er)}else{let er=!((Vt=Pe.image)===null||Vt===void 0)&&Vt.content&&(Pe.image.textFitWidth||Pe.image.textFitHeight)?yM(Pe):{x1:Pe.left,y1:Pe.top,x2:Pe.right,y2:Pe.bottom};er.y1=er.y1*Ye-at[0],er.y2=er.y2*Ye+at[2],er.x1=er.x1*Ye-at[3],er.x2=er.x2*Ye+at[1];let sr=Pe.collisionPadding;if(sr&&(er.x1-=sr[0]*Ye,er.y1-=sr[1]*Ye,er.x2+=sr[2]*Ye,er.y2+=sr[3]*Ye),Et){let xr=new n(er.x1,er.y1),Er=new n(er.x2,er.y1),Qr=new n(er.x1,er.y2),la=new n(er.x2,er.y2),Ka=Et*Math.PI/180;xr._rotate(Ka),Er._rotate(Ka),Qr._rotate(Ka),la._rotate(Ka),er.x1=Math.min(xr.x,Er.x,Qr.x,la.x),er.x2=Math.max(xr.x,Er.x,Qr.x,la.x),er.y1=Math.min(xr.y,Er.y,Qr.y,la.y),er.y2=Math.max(xr.y,Er.y,Qr.y,la.y)}P.emplaceBack(W.x,W.y,er.x1,er.y1,er.x2,er.y2,se,ge,ke)}this.boxEndIndex=P.length}}class DV{constructor(P=[],W=(se,ge)=>sege?1:0){if(this.data=P,this.length=this.data.length,this.compare=W,this.length>0)for(let se=(this.length>>1)-1;se>=0;se--)this._down(se)}push(P){this.data.push(P),this._up(this.length++)}pop(){if(this.length===0)return;let P=this.data[0],W=this.data.pop();return--this.length>0&&(this.data[0]=W,this._down(0)),P}peek(){return this.data[0]}_up(P){let{data:W,compare:se}=this,ge=W[P];for(;P>0;){let ke=P-1>>1,Pe=W[ke];if(se(ge,Pe)>=0)break;W[P]=Pe,P=ke}W[P]=ge}_down(P){let{data:W,compare:se}=this,ge=this.length>>1,ke=W[P];for(;P=0)break;W[P]=W[Pe],P=Pe}W[P]=ke}}function FV(G,P=1,W=!1){let se=1/0,ge=1/0,ke=-1/0,Pe=-1/0,Ye=G[0];for(let sr=0;srke)&&(ke=xr.x),(!sr||xr.y>Pe)&&(Pe=xr.y)}let at=Math.min(ke-se,Pe-ge),pt=at/2,Et=new DV([],zV);if(at===0)return new n(se,ge);for(let sr=se;srVt.d||!Vt.d)&&(Vt=sr,W&&console.log("found best %d after %d probes",Math.round(1e4*sr.d)/1e4,er)),sr.max-Vt.d<=P||(pt=sr.h/2,Et.push(new r0(sr.p.x-pt,sr.p.y-pt,pt,G)),Et.push(new r0(sr.p.x+pt,sr.p.y-pt,pt,G)),Et.push(new r0(sr.p.x-pt,sr.p.y+pt,pt,G)),Et.push(new r0(sr.p.x+pt,sr.p.y+pt,pt,G)),er+=4)}return W&&(console.log(`num probes: ${er}`),console.log(`best distance: ${Vt.d}`)),Vt.p}function zV(G,P){return P.max-G.max}function r0(G,P,W,se){this.p=new n(G,P),this.h=W,this.d=function(ge,ke){let Pe=!1,Ye=1/0;for(let at=0;atge.y!=xr.y>ge.y&&ge.x<(xr.x-sr.x)*(ge.y-sr.y)/(xr.y-sr.y)+sr.x&&(Pe=!Pe),Ye=Math.min(Ye,Or(ge,sr,xr))}}return(Pe?1:-1)*Math.sqrt(Ye)}(this.p,se),this.max=this.d+this.h*Math.SQRT2}var Mf;l.aq=void 0,(Mf=l.aq||(l.aq={}))[Mf.center=1]="center",Mf[Mf.left=2]="left",Mf[Mf.right=3]="right",Mf[Mf.top=4]="top",Mf[Mf.bottom=5]="bottom",Mf[Mf["top-left"]=6]="top-left",Mf[Mf["top-right"]=7]="top-right",Mf[Mf["bottom-left"]=8]="bottom-left",Mf[Mf["bottom-right"]=9]="bottom-right";let cv=7,M2=Number.POSITIVE_INFINITY;function YM(G,P){return P[1]!==M2?function(W,se,ge){let ke=0,Pe=0;switch(se=Math.abs(se),ge=Math.abs(ge),W){case"top-right":case"top-left":case"top":Pe=ge-cv;break;case"bottom-right":case"bottom-left":case"bottom":Pe=-ge+cv}switch(W){case"top-right":case"bottom-right":case"right":ke=-se;break;case"top-left":case"bottom-left":case"left":ke=se}return[ke,Pe]}(G,P[0],P[1]):function(W,se){let ge=0,ke=0;se<0&&(se=0);let Pe=se/Math.SQRT2;switch(W){case"top-right":case"top-left":ke=Pe-cv;break;case"bottom-right":case"bottom-left":ke=-Pe+cv;break;case"bottom":ke=-se+cv;break;case"top":ke=se-cv}switch(W){case"top-right":case"bottom-right":ge=-Pe;break;case"top-left":case"bottom-left":ge=Pe;break;case"left":ge=se;break;case"right":ge=-se}return[ge,ke]}(G,P[0])}function XM(G,P,W){var se;let ge=G.layout,ke=(se=ge.get("text-variable-anchor-offset"))===null||se===void 0?void 0:se.evaluate(P,{},W);if(ke){let Ye=ke.values,at=[];for(let pt=0;pter*Mc);Et.startsWith("top")?Vt[1]-=cv:Et.startsWith("bottom")&&(Vt[1]+=cv),at[pt+1]=Vt}return new vi(at)}let Pe=ge.get("text-variable-anchor");if(Pe){let Ye;Ye=G._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[ge.get("text-radial-offset").evaluate(P,{},W)*Mc,M2]:ge.get("text-offset").evaluate(P,{},W).map(pt=>pt*Mc);let at=[];for(let pt of Pe)at.push(pt,YM(pt,Ye));return new vi(at)}return null}function S2(G){switch(G){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function BV(G,P,W,se,ge,ke,Pe,Ye,at,pt,Et){let Vt=ke.textMaxSize.evaluate(P,{});Vt===void 0&&(Vt=Pe);let er=G.layers[0].layout,sr=er.get("icon-offset").evaluate(P,{},Et),xr=$M(W.horizontal),Er=Pe/24,Qr=G.tilePixelRatio*Er,la=G.tilePixelRatio*Vt/24,Ka=G.tilePixelRatio*Ye,Ma=G.tilePixelRatio*er.get("symbol-spacing"),qa=er.get("text-padding")*G.tilePixelRatio,bn=function(In,uo,ro,No=1){let Pl=In.get("icon-padding").evaluate(uo,{},ro),Tl=Pl&&Pl.values;return[Tl[0]*No,Tl[1]*No,Tl[2]*No,Tl[3]*No]}(er,P,Et,G.tilePixelRatio),ei=er.get("text-max-angle")/180*Math.PI,Ri=er.get("text-rotation-alignment")!=="viewport"&&er.get("symbol-placement")!=="point",To=er.get("icon-rotation-alignment")==="map"&&er.get("symbol-placement")!=="point",Ci=er.get("symbol-placement"),wi=Ma/2,no=er.get("icon-text-fit"),Wi;se&&no!=="none"&&(G.allowVerticalPlacement&&W.vertical&&(Wi=_M(se,W.vertical,no,er.get("icon-text-fit-padding"),sr,Er)),xr&&(se=_M(se,xr,no,er.get("icon-text-fit-padding"),sr,Er)));let Ni=(In,uo)=>{uo.x<0||uo.x>=Di||uo.y<0||uo.y>=Di||function(ro,No,Pl,Tl,Bc,Oh,Sf,Oc,rh,ah,nh,ju,Nc,Uf,Ef,ih,kf,Ph,mh,Ws,Bl,Wl,Th,Cu,a0){let md=ro.addToLineVertexArray(No,Pl),gd,Nh,Rh,af,Bd=0,Zm=0,eS=0,tS=0,D2=-1,F2=-1,Od={},rS=_a("");if(ro.allowVerticalPlacement&&Tl.vertical){let qf=Oc.layout.get("text-rotate").evaluate(Bl,{},Cu)+90;Rh=new Bg(rh,No,ah,nh,ju,Tl.vertical,Nc,Uf,Ef,qf),Sf&&(af=new Bg(rh,No,ah,nh,ju,Sf,kf,Ph,Ef,qf))}if(Bc){let qf=Oc.layout.get("icon-rotate").evaluate(Bl,{}),Ih=Oc.layout.get("icon-text-fit")!=="none",up=HM(Bc,qf,Th,Ih),id=Sf?HM(Sf,qf,Th,Ih):void 0;Nh=new Bg(rh,No,ah,nh,ju,Bc,kf,Ph,!1,qf),Bd=4*up.length;let cp=ro.iconSizeData,yd=null;cp.kind==="source"?(yd=[pd*Oc.layout.get("icon-size").evaluate(Bl,{})],yd[0]>sv&&_(`${ro.layerIds[0]}: Value for "icon-size" is >= ${Vm}. Reduce your "icon-size".`)):cp.kind==="composite"&&(yd=[pd*Wl.compositeIconSizes[0].evaluate(Bl,{},Cu),pd*Wl.compositeIconSizes[1].evaluate(Bl,{},Cu)],(yd[0]>sv||yd[1]>sv)&&_(`${ro.layerIds[0]}: Value for "icon-size" is >= ${Vm}. Reduce your "icon-size".`)),ro.addSymbols(ro.icon,up,yd,Ws,mh,Bl,l.ah.none,No,md.lineStartIndex,md.lineLength,-1,Cu),D2=ro.icon.placedSymbolArray.length-1,id&&(Zm=4*id.length,ro.addSymbols(ro.icon,id,yd,Ws,mh,Bl,l.ah.vertical,No,md.lineStartIndex,md.lineLength,-1,Cu),F2=ro.icon.placedSymbolArray.length-1)}let aS=Object.keys(Tl.horizontal);for(let qf of aS){let Ih=Tl.horizontal[qf];if(!gd){rS=_a(Ih.text);let id=Oc.layout.get("text-rotate").evaluate(Bl,{},Cu);gd=new Bg(rh,No,ah,nh,ju,Ih,Nc,Uf,Ef,id)}let up=Ih.positionedLines.length===1;if(eS+=ZM(ro,No,Ih,Oh,Oc,Ef,Bl,ih,md,Tl.vertical?l.ah.horizontal:l.ah.horizontalOnly,up?aS:[qf],Od,D2,Wl,Cu),up)break}Tl.vertical&&(tS+=ZM(ro,No,Tl.vertical,Oh,Oc,Ef,Bl,ih,md,l.ah.vertical,["vertical"],Od,F2,Wl,Cu));let jV=gd?gd.boxStartIndex:ro.collisionBoxArray.length,UV=gd?gd.boxEndIndex:ro.collisionBoxArray.length,qV=Rh?Rh.boxStartIndex:ro.collisionBoxArray.length,GV=Rh?Rh.boxEndIndex:ro.collisionBoxArray.length,VV=Nh?Nh.boxStartIndex:ro.collisionBoxArray.length,HV=Nh?Nh.boxEndIndex:ro.collisionBoxArray.length,WV=af?af.boxStartIndex:ro.collisionBoxArray.length,YV=af?af.boxEndIndex:ro.collisionBoxArray.length,nd=-1,Ng=(qf,Ih)=>qf&&qf.circleDiameter?Math.max(qf.circleDiameter,Ih):Ih;nd=Ng(gd,nd),nd=Ng(Rh,nd),nd=Ng(Nh,nd),nd=Ng(af,nd);let nS=nd>-1?1:0;nS&&(nd*=a0/Mc),ro.glyphOffsetArray.length>=e0.MAX_GLYPHS&&_("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Bl.sortKey!==void 0&&ro.addToSortKeyRanges(ro.symbolInstances.length,Bl.sortKey);let XV=XM(Oc,Bl,Cu),[ZV,$V]=function(qf,Ih){let up=qf.length,id=Ih?.values;if(id?.length>0)for(let cp=0;cp=0?Od.right:-1,Od.center>=0?Od.center:-1,Od.left>=0?Od.left:-1,Od.vertical||-1,D2,F2,rS,jV,UV,qV,GV,VV,HV,WV,YV,ah,eS,tS,Bd,Zm,nS,0,Nc,nd,ZV,$V)}(G,uo,In,W,se,ge,Wi,G.layers[0],G.collisionBoxArray,P.index,P.sourceLayerIndex,G.index,Qr,[qa,qa,qa,qa],Ri,at,Ka,bn,To,sr,P,ke,pt,Et,Pe)};if(Ci==="line")for(let In of NM(P.geometry,0,0,Di,Di)){let uo=IV(In,Ma,ei,W.vertical||xr,se,24,la,G.overscaling,Di);for(let ro of uo)xr&&OV(G,xr.text,wi,ro)||Ni(In,ro)}else if(Ci==="line-center"){for(let In of P.geometry)if(In.length>1){let uo=RV(In,ei,W.vertical||xr,se,24,la);uo&&Ni(In,uo)}}else if(P.type==="Polygon")for(let In of cu(P.geometry,0)){let uo=FV(In,16);Ni(In[0],new uv(uo.x,uo.y,0))}else if(P.type==="LineString")for(let In of P.geometry)Ni(In,new uv(In[0].x,In[0].y,0));else if(P.type==="Point")for(let In of P.geometry)for(let uo of In)Ni([uo],new uv(uo.x,uo.y,0))}function ZM(G,P,W,se,ge,ke,Pe,Ye,at,pt,Et,Vt,er,sr,xr){let Er=function(Ka,Ma,qa,bn,ei,Ri,To,Ci){let wi=bn.layout.get("text-rotate").evaluate(Ri,{})*Math.PI/180,no=[];for(let Wi of Ma.positionedLines)for(let Ni of Wi.positionedGlyphs){if(!Ni.rect)continue;let In=Ni.rect||{},uo=fM+1,ro=!0,No=1,Pl=0,Tl=(ei||Ci)&&Ni.vertical,Bc=Ni.metrics.advance*Ni.scale/2;if(Ci&&Ma.verticalizable&&(Pl=Wi.lineOffset/2-(Ni.imageName?-(Mc-Ni.metrics.width*Ni.scale)/2:(Ni.scale-1)*Mc)),Ni.imageName){let Ws=To[Ni.imageName];ro=Ws.sdf,No=Ws.pixelRatio,uo=ph/No}let Oh=ei?[Ni.x+Bc,Ni.y]:[0,0],Sf=ei?[0,0]:[Ni.x+Bc+qa[0],Ni.y+qa[1]-Pl],Oc=[0,0];Tl&&(Oc=Sf,Sf=[0,0]);let rh=Ni.metrics.isDoubleResolution?2:1,ah=(Ni.metrics.left-uo)*Ni.scale-Bc+Sf[0],nh=(-Ni.metrics.top-uo)*Ni.scale+Sf[1],ju=ah+In.w/rh*Ni.scale/No,Nc=nh+In.h/rh*Ni.scale/No,Uf=new n(ah,nh),Ef=new n(ju,nh),ih=new n(ah,Nc),kf=new n(ju,Nc);if(Tl){let Ws=new n(-Bc,Bc-qm),Bl=-Math.PI/2,Wl=Mc/2-Bc,Th=new n(5-qm-Wl,-(Ni.imageName?Wl:0)),Cu=new n(...Oc);Uf._rotateAround(Bl,Ws)._add(Th)._add(Cu),Ef._rotateAround(Bl,Ws)._add(Th)._add(Cu),ih._rotateAround(Bl,Ws)._add(Th)._add(Cu),kf._rotateAround(Bl,Ws)._add(Th)._add(Cu)}if(wi){let Ws=Math.sin(wi),Bl=Math.cos(wi),Wl=[Bl,-Ws,Ws,Bl];Uf._matMult(Wl),Ef._matMult(Wl),ih._matMult(Wl),kf._matMult(Wl)}let Ph=new n(0,0),mh=new n(0,0);no.push({tl:Uf,tr:Ef,bl:ih,br:kf,tex:In,writingMode:Ma.writingMode,glyphOffset:Oh,sectionIndex:Ni.sectionIndex,isSDF:ro,pixelOffsetTL:Ph,pixelOffsetBR:mh,minFontScaleX:0,minFontScaleY:0})}return no}(0,W,Ye,ge,ke,Pe,se,G.allowVerticalPlacement),Qr=G.textSizeData,la=null;Qr.kind==="source"?(la=[pd*ge.layout.get("text-size").evaluate(Pe,{})],la[0]>sv&&_(`${G.layerIds[0]}: Value for "text-size" is >= ${Vm}. Reduce your "text-size".`)):Qr.kind==="composite"&&(la=[pd*sr.compositeTextSizes[0].evaluate(Pe,{},xr),pd*sr.compositeTextSizes[1].evaluate(Pe,{},xr)],(la[0]>sv||la[1]>sv)&&_(`${G.layerIds[0]}: Value for "text-size" is >= ${Vm}. Reduce your "text-size".`)),G.addSymbols(G.text,Er,la,Ye,ke,Pe,pt,P,at.lineStartIndex,at.lineLength,er,xr);for(let Ka of Et)Vt[Ka]=G.text.placedSymbolArray.length-1;return 4*Er.length}function $M(G){for(let P in G)return G[P];return null}function OV(G,P,W,se){let ge=G.compareText;if(P in ge){let ke=ge[P];for(let Pe=ke.length-1;Pe>=0;Pe--)if(se.dist(ke[Pe])>4;if(ge!==1)throw new Error(`Got v${ge} data when expected v1.`);let ke=KM[15&se];if(!ke)throw new Error("Unrecognized array type.");let[Pe]=new Uint16Array(P,2,1),[Ye]=new Uint32Array(P,4,1);return new E2(Ye,Pe,ke,P)}constructor(P,W=64,se=Float64Array,ge){if(isNaN(P)||P<0)throw new Error(`Unpexpected numItems value: ${P}.`);this.numItems=+P,this.nodeSize=Math.min(Math.max(+W,2),65535),this.ArrayType=se,this.IndexArrayType=P<65536?Uint16Array:Uint32Array;let ke=KM.indexOf(this.ArrayType),Pe=2*P*this.ArrayType.BYTES_PER_ELEMENT,Ye=P*this.IndexArrayType.BYTES_PER_ELEMENT,at=(8-Ye%8)%8;if(ke<0)throw new Error(`Unexpected typed array class: ${se}.`);ge&&ge instanceof ArrayBuffer?(this.data=ge,this.ids=new this.IndexArrayType(this.data,8,P),this.coords=new this.ArrayType(this.data,8+Ye+at,2*P),this._pos=2*P,this._finished=!0):(this.data=new ArrayBuffer(8+Pe+Ye+at),this.ids=new this.IndexArrayType(this.data,8,P),this.coords=new this.ArrayType(this.data,8+Ye+at,2*P),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ke]),new Uint16Array(this.data,2,1)[0]=W,new Uint32Array(this.data,4,1)[0]=P)}add(P,W){let se=this._pos>>1;return this.ids[se]=se,this.coords[this._pos++]=P,this.coords[this._pos++]=W,se}finish(){let P=this._pos>>1;if(P!==this.numItems)throw new Error(`Added ${P} items when expected ${this.numItems}.`);return k2(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(P,W,se,ge){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ke,coords:Pe,nodeSize:Ye}=this,at=[0,ke.length-1,0],pt=[];for(;at.length;){let Et=at.pop()||0,Vt=at.pop()||0,er=at.pop()||0;if(Vt-er<=Ye){for(let Qr=er;Qr<=Vt;Qr++){let la=Pe[2*Qr],Ka=Pe[2*Qr+1];la>=P&&la<=se&&Ka>=W&&Ka<=ge&&pt.push(ke[Qr])}continue}let sr=er+Vt>>1,xr=Pe[2*sr],Er=Pe[2*sr+1];xr>=P&&xr<=se&&Er>=W&&Er<=ge&&pt.push(ke[sr]),(Et===0?P<=xr:W<=Er)&&(at.push(er),at.push(sr-1),at.push(1-Et)),(Et===0?se>=xr:ge>=Er)&&(at.push(sr+1),at.push(Vt),at.push(1-Et))}return pt}within(P,W,se){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ge,coords:ke,nodeSize:Pe}=this,Ye=[0,ge.length-1,0],at=[],pt=se*se;for(;Ye.length;){let Et=Ye.pop()||0,Vt=Ye.pop()||0,er=Ye.pop()||0;if(Vt-er<=Pe){for(let Qr=er;Qr<=Vt;Qr++)QM(ke[2*Qr],ke[2*Qr+1],P,W)<=pt&&at.push(ge[Qr]);continue}let sr=er+Vt>>1,xr=ke[2*sr],Er=ke[2*sr+1];QM(xr,Er,P,W)<=pt&&at.push(ge[sr]),(Et===0?P-se<=xr:W-se<=Er)&&(Ye.push(er),Ye.push(sr-1),Ye.push(1-Et)),(Et===0?P+se>=xr:W+se>=Er)&&(Ye.push(sr+1),Ye.push(Vt),Ye.push(1-Et))}return at}}function k2(G,P,W,se,ge,ke){if(ge-se<=W)return;let Pe=se+ge>>1;JM(G,P,Pe,se,ge,ke),k2(G,P,W,se,Pe-1,1-ke),k2(G,P,W,Pe+1,ge,1-ke)}function JM(G,P,W,se,ge,ke){for(;ge>se;){if(ge-se>600){let pt=ge-se+1,Et=W-se+1,Vt=Math.log(pt),er=.5*Math.exp(2*Vt/3),sr=.5*Math.sqrt(Vt*er*(pt-er)/pt)*(Et-pt/2<0?-1:1);JM(G,P,W,Math.max(se,Math.floor(W-Et*er/pt+sr)),Math.min(ge,Math.floor(W+(pt-Et)*er/pt+sr)),ke)}let Pe=P[2*W+ke],Ye=se,at=ge;for(Ym(G,P,se,W),P[2*ge+ke]>Pe&&Ym(G,P,se,ge);YePe;)at--}P[2*se+ke]===Pe?Ym(G,P,se,at):(at++,Ym(G,P,at,ge)),at<=W&&(se=at+1),W<=at&&(ge=at-1)}}function Ym(G,P,W,se){C2(G,W,se),C2(P,2*W,2*se),C2(P,2*W+1,2*se+1)}function C2(G,P,W){let se=G[P];G[P]=G[W],G[W]=se}function QM(G,P,W,se){let ge=G-W,ke=P-se;return ge*ge+ke*ke}var L2;l.bg=void 0,(L2=l.bg||(l.bg={})).create="create",L2.load="load",L2.fullLoad="fullLoad";let Og=null,Xm=[],P2=1e3/60,R2="loadTime",I2="fullLoadTime",NV={mark(G){performance.mark(G)},frame(G){let P=G;Og!=null&&Xm.push(P-Og),Og=P},clearMetrics(){Og=null,Xm=[],performance.clearMeasures(R2),performance.clearMeasures(I2);for(let G in l.bg)performance.clearMarks(l.bg[G])},getPerformanceMetrics(){performance.measure(R2,l.bg.create,l.bg.load),performance.measure(I2,l.bg.create,l.bg.fullLoad);let G=performance.getEntriesByName(R2)[0].duration,P=performance.getEntriesByName(I2)[0].duration,W=Xm.length,se=1/(Xm.reduce((ke,Pe)=>ke+Pe,0)/W/1e3),ge=Xm.filter(ke=>ke>P2).reduce((ke,Pe)=>ke+(Pe-P2)/P2,0);return{loadTime:G,fullLoadTime:P,fps:se,percentDroppedFrames:ge/(W+ge)*100,totalFrames:W}}};l.$=class extends Gt{},l.A=ha,l.B=Ja,l.C=function(G){if(F==null){let P=G.navigator?G.navigator.userAgent:null;F=!!G.safari||!(!P||!(/\b(iPad|iPhone|iPod)\b/.test(P)||P.match("Safari")&&!P.match("Chrome")))}return F},l.D=ki,l.E=Q,l.F=class{constructor(G,P){this.target=G,this.mapId=P,this.resolveRejects={},this.tasks={},this.taskQueue=[],this.abortControllers={},this.messageHandlers={},this.invoker=new LV(()=>this.process()),this.subscription=function(W,se,ge,ke){return W.addEventListener(se,ge,!1),{unsubscribe:()=>{W.removeEventListener(se,ge,!1)}}}(this.target,"message",W=>this.receive(W)),this.globalScope=C(self)?G:window}registerMessageHandler(G,P){this.messageHandlers[G]=P}sendAsync(G,P){return new Promise((W,se)=>{let ge=Math.round(1e18*Math.random()).toString(36).substring(0,10);this.resolveRejects[ge]={resolve:W,reject:se},P&&P.signal.addEventListener("abort",()=>{delete this.resolveRejects[ge];let Ye={id:ge,type:"",origin:location.origin,targetMapId:G.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ye)},{once:!0});let ke=[],Pe=Object.assign(Object.assign({},G),{id:ge,sourceMapId:this.mapId,origin:location.origin,data:fi(G.data,ke)});this.target.postMessage(Pe,{transfer:ke})})}receive(G){let P=G.data,W=P.id;if(!(P.origin!=="file://"&&location.origin!=="file://"&&P.origin!=="resource://android"&&location.origin!=="resource://android"&&P.origin!==location.origin||P.targetMapId&&this.mapId!==P.targetMapId)){if(P.type===""){delete this.tasks[W];let se=this.abortControllers[W];return delete this.abortControllers[W],void(se&&se.abort())}if(C(self)||P.mustQueue)return this.tasks[W]=P,this.taskQueue.push(W),void this.invoker.trigger();this.processTask(W,P)}}process(){if(this.taskQueue.length===0)return;let G=this.taskQueue.shift(),P=this.tasks[G];delete this.tasks[G],this.taskQueue.length>0&&this.invoker.trigger(),P&&this.processTask(G,P)}processTask(G,P){return e(this,void 0,void 0,function*(){if(P.type===""){let ge=this.resolveRejects[G];return delete this.resolveRejects[G],ge?void(P.error?ge.reject(Ti(P.error)):ge.resolve(Ti(P.data))):void 0}if(!this.messageHandlers[P.type])return void this.completeTask(G,new Error(`Could not find a registered handler for ${P.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let W=Ti(P.data),se=new AbortController;this.abortControllers[G]=se;try{let ge=yield this.messageHandlers[P.type](P.sourceMapId,W,se);this.completeTask(G,null,ge)}catch(ge){this.completeTask(G,ge)}})}completeTask(G,P,W){let se=[];delete this.abortControllers[G];let ge={id:G,type:"",sourceMapId:this.mapId,origin:location.origin,error:P?fi(P):null,data:fi(W,se)};this.target.postMessage(ge,{transfer:se})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.G=te,l.H=function(){var G=new ha(16);return ha!=Float32Array&&(G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[11]=0,G[12]=0,G[13]=0,G[14]=0),G[0]=1,G[5]=1,G[10]=1,G[15]=1,G},l.I=v2,l.J=function(G,P,W){var se,ge,ke,Pe,Ye,at,pt,Et,Vt,er,sr,xr,Er=W[0],Qr=W[1],la=W[2];return P===G?(G[12]=P[0]*Er+P[4]*Qr+P[8]*la+P[12],G[13]=P[1]*Er+P[5]*Qr+P[9]*la+P[13],G[14]=P[2]*Er+P[6]*Qr+P[10]*la+P[14],G[15]=P[3]*Er+P[7]*Qr+P[11]*la+P[15]):(ge=P[1],ke=P[2],Pe=P[3],Ye=P[4],at=P[5],pt=P[6],Et=P[7],Vt=P[8],er=P[9],sr=P[10],xr=P[11],G[0]=se=P[0],G[1]=ge,G[2]=ke,G[3]=Pe,G[4]=Ye,G[5]=at,G[6]=pt,G[7]=Et,G[8]=Vt,G[9]=er,G[10]=sr,G[11]=xr,G[12]=se*Er+Ye*Qr+Vt*la+P[12],G[13]=ge*Er+at*Qr+er*la+P[13],G[14]=ke*Er+pt*Qr+sr*la+P[14],G[15]=Pe*Er+Et*Qr+xr*la+P[15]),G},l.K=function(G,P,W){var se=W[0],ge=W[1],ke=W[2];return G[0]=P[0]*se,G[1]=P[1]*se,G[2]=P[2]*se,G[3]=P[3]*se,G[4]=P[4]*ge,G[5]=P[5]*ge,G[6]=P[6]*ge,G[7]=P[7]*ge,G[8]=P[8]*ke,G[9]=P[9]*ke,G[10]=P[10]*ke,G[11]=P[11]*ke,G[12]=P[12],G[13]=P[13],G[14]=P[14],G[15]=P[15],G},l.L=ia,l.M=function(G,P){let W={};for(let se=0;se{let P=window.document.createElement("video");return P.muted=!0,new Promise(W=>{P.onloadstart=()=>{W(P)};for(let se of G){let ge=window.document.createElement("source");K(se)||(P.crossOrigin="Anonymous"),ge.src=se,P.appendChild(ge)}})},l.a4=function(){return g++},l.a5=un,l.a6=e0,l.a7=Bu,l.a8=nl,l.a9=FM,l.aA=function(G){if(G.type==="custom")return new CV(G);switch(G.type){case"background":return new SV(G);case"circle":return new na(G);case"fill":return new Wt(G);case"fill-extrusion":return new HG(G);case"heatmap":return new Wn(G);case"hillshade":return new As(G);case"line":return new QG(G);case"raster":return new kV(G);case"symbol":return new Ig(G)}},l.aB=h,l.aC=function(G,P){if(!G)return[{command:"setStyle",args:[P]}];let W=[];try{if(!ye(G.version,P.version))return[{command:"setStyle",args:[P]}];ye(G.center,P.center)||W.push({command:"setCenter",args:[P.center]}),ye(G.zoom,P.zoom)||W.push({command:"setZoom",args:[P.zoom]}),ye(G.bearing,P.bearing)||W.push({command:"setBearing",args:[P.bearing]}),ye(G.pitch,P.pitch)||W.push({command:"setPitch",args:[P.pitch]}),ye(G.sprite,P.sprite)||W.push({command:"setSprite",args:[P.sprite]}),ye(G.glyphs,P.glyphs)||W.push({command:"setGlyphs",args:[P.glyphs]}),ye(G.transition,P.transition)||W.push({command:"setTransition",args:[P.transition]}),ye(G.light,P.light)||W.push({command:"setLight",args:[P.light]}),ye(G.terrain,P.terrain)||W.push({command:"setTerrain",args:[P.terrain]}),ye(G.sky,P.sky)||W.push({command:"setSky",args:[P.sky]}),ye(G.projection,P.projection)||W.push({command:"setProjection",args:[P.projection]});let se={},ge=[];(function(Pe,Ye,at,pt){let Et;for(Et in Ye=Ye||{},Pe=Pe||{})Object.prototype.hasOwnProperty.call(Pe,Et)&&(Object.prototype.hasOwnProperty.call(Ye,Et)||Ce(Et,at,pt));for(Et in Ye)Object.prototype.hasOwnProperty.call(Ye,Et)&&(Object.prototype.hasOwnProperty.call(Pe,Et)?ye(Pe[Et],Ye[Et])||(Pe[Et].type==="geojson"&&Ye[Et].type==="geojson"&&Ue(Pe,Ye,Et)?Ae(at,{command:"setGeoJSONSourceData",args:[Et,Ye[Et].data]}):qe(Et,Ye,at,pt)):Se(Et,Ye,at))})(G.sources,P.sources,ge,se);let ke=[];G.layers&&G.layers.forEach(Pe=>{"source"in Pe&&se[Pe.source]?W.push({command:"removeLayer",args:[Pe.id]}):ke.push(Pe)}),W=W.concat(ge),function(Pe,Ye,at){Ye=Ye||[];let pt=(Pe=Pe||[]).map(he),Et=Ye.map(he),Vt=Pe.reduce(oe,{}),er=Ye.reduce(oe,{}),sr=pt.slice(),xr=Object.create(null),Er,Qr,la,Ka,Ma;for(let qa=0,bn=0;qa@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(W,se,ge,ke)=>{let Pe=ge||ke;return P[se]=!Pe||Pe.toLowerCase(),""}),P["max-age"]){let W=parseInt(P["max-age"],10);isNaN(W)?delete P["max-age"]:P["max-age"]=W}return P},l.ab=function(G,P){let W=[];for(let se in G)se in P||W.push(se);return W},l.ac=M,l.ad=function(G,P,W){var se=Math.sin(W),ge=Math.cos(W),ke=P[0],Pe=P[1],Ye=P[2],at=P[3],pt=P[4],Et=P[5],Vt=P[6],er=P[7];return P!==G&&(G[8]=P[8],G[9]=P[9],G[10]=P[10],G[11]=P[11],G[12]=P[12],G[13]=P[13],G[14]=P[14],G[15]=P[15]),G[0]=ke*ge+pt*se,G[1]=Pe*ge+Et*se,G[2]=Ye*ge+Vt*se,G[3]=at*ge+er*se,G[4]=pt*ge-ke*se,G[5]=Et*ge-Pe*se,G[6]=Vt*ge-Ye*se,G[7]=er*ge-at*se,G},l.ae=function(G){var P=new ha(16);return P[0]=G[0],P[1]=G[1],P[2]=G[2],P[3]=G[3],P[4]=G[4],P[5]=G[5],P[6]=G[6],P[7]=G[7],P[8]=G[8],P[9]=G[9],P[10]=G[10],P[11]=G[11],P[12]=G[12],P[13]=G[13],P[14]=G[14],P[15]=G[15],P},l.af=Sn,l.ag=function(G,P){let W=0,se=0;if(G.kind==="constant")se=G.layoutSize;else if(G.kind!=="source"){let{interpolationType:ge,minZoom:ke,maxZoom:Pe}=G,Ye=ge?M(jn.interpolationFactor(ge,P,ke,Pe),0,1):0;G.kind==="camera"?se=ui.number(G.minSize,G.maxSize,Ye):W=Ye}return{uSizeT:W,uSize:se}},l.ai=function(G,{uSize:P,uSizeT:W},{lowerSize:se,upperSize:ge}){return G.kind==="source"?se/pd:G.kind==="composite"?ui.number(se/pd,ge/pd,W):P},l.aj=y2,l.ak=function(G,P,W,se){let ge=P.y-G.y,ke=P.x-G.x,Pe=se.y-W.y,Ye=se.x-W.x,at=Pe*ke-Ye*ge;if(at===0)return null;let pt=(Ye*(G.y-W.y)-Pe*(G.x-W.x))/at;return new n(G.x+pt*ke,G.y+pt*ge)},l.al=NM,l.am=dc,l.an=Ea,l.ao=function(G){let P=1/0,W=1/0,se=-1/0,ge=-1/0;for(let ke of G)P=Math.min(P,ke.x),W=Math.min(W,ke.y),se=Math.max(se,ke.x),ge=Math.max(ge,ke.y);return[P,W,se,ge]},l.ap=Mc,l.ar=g2,l.as=function(G,P){var W=P[0],se=P[1],ge=P[2],ke=P[3],Pe=P[4],Ye=P[5],at=P[6],pt=P[7],Et=P[8],Vt=P[9],er=P[10],sr=P[11],xr=P[12],Er=P[13],Qr=P[14],la=P[15],Ka=W*Ye-se*Pe,Ma=W*at-ge*Pe,qa=W*pt-ke*Pe,bn=se*at-ge*Ye,ei=se*pt-ke*Ye,Ri=ge*pt-ke*at,To=Et*Er-Vt*xr,Ci=Et*Qr-er*xr,wi=Et*la-sr*xr,no=Vt*Qr-er*Er,Wi=Vt*la-sr*Er,Ni=er*la-sr*Qr,In=Ka*Ni-Ma*Wi+qa*no+bn*wi-ei*Ci+Ri*To;return In?(G[0]=(Ye*Ni-at*Wi+pt*no)*(In=1/In),G[1]=(ge*Wi-se*Ni-ke*no)*In,G[2]=(Er*Ri-Qr*ei+la*bn)*In,G[3]=(er*ei-Vt*Ri-sr*bn)*In,G[4]=(at*wi-Pe*Ni-pt*Ci)*In,G[5]=(W*Ni-ge*wi+ke*Ci)*In,G[6]=(Qr*qa-xr*Ri-la*Ma)*In,G[7]=(Et*Ri-er*qa+sr*Ma)*In,G[8]=(Pe*Wi-Ye*wi+pt*To)*In,G[9]=(se*wi-W*Wi-ke*To)*In,G[10]=(xr*ei-Er*qa+la*Ka)*In,G[11]=(Vt*qa-Et*ei-sr*Ka)*In,G[12]=(Ye*Ci-Pe*no-at*To)*In,G[13]=(W*no-se*Ci+ge*To)*In,G[14]=(Er*Ma-xr*bn-Qr*Ka)*In,G[15]=(Et*bn-Vt*Ma+er*Ka)*In,G):null},l.at=S2,l.au=m2,l.av=E2,l.aw=function(){let G={},P=re.$version;for(let W in re.$root){let se=re.$root[W];if(se.required){let ge=null;ge=W==="version"?P:se.type==="array"?[]:{},ge!=null&&(G[W]=ge)}}return G},l.ax=Un,l.ay=U,l.az=function(G){G=G.slice();let P=Object.create(null);for(let W=0;W25||se<0||se>=1||W<0||W>=1)},l.bc=function(G,P){return G[0]=P[0],G[1]=0,G[2]=0,G[3]=0,G[4]=0,G[5]=P[1],G[6]=0,G[7]=0,G[8]=0,G[9]=0,G[10]=P[2],G[11]=0,G[12]=0,G[13]=0,G[14]=0,G[15]=1,G},l.bd=class extends Mt{},l.be=w2,l.bf=NV,l.bh=ae,l.bi=function(G,P){Y.REGISTERED_PROTOCOLS[G]=P},l.bj=function(G){delete Y.REGISTERED_PROTOCOLS[G]},l.bk=function(G,P){let W={};for(let ge=0;geNi*Mc)}let Ci=Pe?"center":W.get("text-justify").evaluate(pt,{},G.canonical),wi=W.get("symbol-placement")==="point"?W.get("text-max-width").evaluate(pt,{},G.canonical)*Mc:1/0,no=()=>{G.bucket.allowVerticalPlacement&&Oi(qa)&&(xr.vertical=Lg(Er,G.glyphMap,G.glyphPositions,G.imagePositions,Et,wi,ke,Ri,"left",ei,la,l.ah.vertical,!0,er,Vt))};if(!Pe&&To){let Wi=new Set;if(Ci==="auto")for(let In=0;Ine(void 0,void 0,void 0,function*(){if(G.byteLength===0)return createImageBitmap(new ImageData(1,1));let P=new Blob([new Uint8Array(G)],{type:"image/png"});try{return createImageBitmap(P)}catch(W){throw new Error(`Could not load image because of ${W.message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.e=E,l.f=G=>new Promise((P,W)=>{let se=new Image;se.onload=()=>{P(se),URL.revokeObjectURL(se.src),se.onload=null,window.requestAnimationFrame(()=>{se.src=z})},se.onerror=()=>W(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let ge=new Blob([new Uint8Array(G)],{type:"image/png"});se.src=G.byteLength?URL.createObjectURL(ge):z}),l.g=ee,l.h=(G,P)=>H(E(G,{type:"json"}),P),l.i=C,l.j=Z,l.k=X,l.l=(G,P)=>H(E(G,{type:"arrayBuffer"}),P),l.m=H,l.n=function(G){return new h2(G).readFields(vV,[])},l.o=Vn,l.p=hM,l.q=Me,l.r=za,l.s=K,l.t=Ba,l.u=ma,l.v=re,l.w=_,l.x=function([G,P,W]){return P+=90,P*=Math.PI/180,W*=Math.PI/180,{x:G*Math.cos(P)*Math.sin(W),y:G*Math.sin(P)*Math.sin(W),z:G*Math.cos(W)}},l.y=ui,l.z=Do}),w("worker",["./shared"],function(l){"use strict";class e{constructor(Ee){this.keyCache={},Ee&&this.replace(Ee)}replace(Ee){this._layerConfigs={},this._layers={},this.update(Ee,[])}update(Ee,ze){for(let _e of Ee){this._layerConfigs[_e.id]=_e;let Ie=this._layers[_e.id]=l.aA(_e);Ie._featureFilter=l.a7(Ie.filter),this.keyCache[_e.id]&&delete this.keyCache[_e.id]}for(let _e of ze)delete this.keyCache[_e],delete this._layerConfigs[_e],delete this._layers[_e];this.familiesBySource={};let ve=l.bk(Object.values(this._layerConfigs),this.keyCache);for(let _e of ve){let Ie=_e.map(ht=>this._layers[ht.id]),Be=Ie[0];if(Be.visibility==="none")continue;let We=Be.source||"",Xe=this.familiesBySource[We];Xe||(Xe=this.familiesBySource[We]={});let mt=Be.sourceLayer||"_geojsonTileLayer",ft=Xe[mt];ft||(ft=Xe[mt]=[]),ft.push(Ie)}}}class t{constructor(Ee){let ze={},ve=[];for(let We in Ee){let Xe=Ee[We],mt=ze[We]={};for(let ft in Xe){let ht=Xe[+ft];if(!ht||ht.bitmap.width===0||ht.bitmap.height===0)continue;let gt={x:0,y:0,w:ht.bitmap.width+2,h:ht.bitmap.height+2};ve.push(gt),mt[ft]={rect:gt,metrics:ht.metrics}}}let{w:_e,h:Ie}=l.p(ve),Be=new l.o({width:_e||1,height:Ie||1});for(let We in Ee){let Xe=Ee[We];for(let mt in Xe){let ft=Xe[+mt];if(!ft||ft.bitmap.width===0||ft.bitmap.height===0)continue;let ht=ze[We][mt].rect;l.o.copy(ft.bitmap,Be,{x:0,y:0},{x:ht.x+1,y:ht.y+1},ft.bitmap)}}this.image=Be,this.positions=ze}}l.bl("GlyphAtlas",t);class a{constructor(Ee){this.tileID=new l.S(Ee.tileID.overscaledZ,Ee.tileID.wrap,Ee.tileID.canonical.z,Ee.tileID.canonical.x,Ee.tileID.canonical.y),this.uid=Ee.uid,this.zoom=Ee.zoom,this.pixelRatio=Ee.pixelRatio,this.tileSize=Ee.tileSize,this.source=Ee.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ee.showCollisionBoxes,this.collectResourceTiming=!!Ee.collectResourceTiming,this.returnDependencies=!!Ee.returnDependencies,this.promoteId=Ee.promoteId,this.inFlightDependencies=[]}parse(Ee,ze,ve,_e){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=Ee,this.collisionBoxArray=new l.a5;let Ie=new l.bm(Object.keys(Ee.layers).sort()),Be=new l.bn(this.tileID,this.promoteId);Be.bucketLayerIDs=[];let We={},Xe={featureIndex:Be,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:ve},mt=ze.familiesBySource[this.source];for(let oa in mt){let aa=Ee.layers[oa];if(!aa)continue;aa.version===1&&l.w(`Vector tile source "${this.source}" layer "${oa}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ka=Ie.encode(oa),Ta=[];for(let Da=0;Da=La.maxzoom||La.visibility!=="none"&&(r(Da,this.zoom,ve),(We[La.id]=La.createBucket({index:Be.bucketLayerIDs.length,layers:Da,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:ka,sourceID:this.source})).populate(Ta,Xe,this.tileID.canonical),Be.bucketLayerIDs.push(Da.map(Ga=>Ga.id)))}}let ft=l.aF(Xe.glyphDependencies,oa=>Object.keys(oa).map(Number));this.inFlightDependencies.forEach(oa=>oa?.abort()),this.inFlightDependencies=[];let ht=Promise.resolve({});if(Object.keys(ft).length){let oa=new AbortController;this.inFlightDependencies.push(oa),ht=_e.sendAsync({type:"GG",data:{stacks:ft,source:this.source,tileID:this.tileID,type:"glyphs"}},oa)}let gt=Object.keys(Xe.iconDependencies),_t=Promise.resolve({});if(gt.length){let oa=new AbortController;this.inFlightDependencies.push(oa),_t=_e.sendAsync({type:"GI",data:{icons:gt,source:this.source,tileID:this.tileID,type:"icons"}},oa)}let Ft=Object.keys(Xe.patternDependencies),St=Promise.resolve({});if(Ft.length){let oa=new AbortController;this.inFlightDependencies.push(oa),St=_e.sendAsync({type:"GI",data:{icons:Ft,source:this.source,tileID:this.tileID,type:"patterns"}},oa)}let[hr,jr,ra]=yield Promise.all([ht,_t,St]),$r=new t(hr),pa=new l.bo(jr,ra);for(let oa in We){let aa=We[oa];aa instanceof l.a6?(r(aa.layers,this.zoom,ve),l.bp({bucket:aa,glyphMap:hr,glyphPositions:$r.positions,imageMap:jr,imagePositions:pa.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical})):aa.hasPattern&&(aa instanceof l.bq||aa instanceof l.br||aa instanceof l.bs)&&(r(aa.layers,this.zoom,ve),aa.addFeatures(Xe,this.tileID.canonical,pa.patternPositions))}return this.status="done",{buckets:Object.values(We).filter(oa=>!oa.isEmpty()),featureIndex:Be,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:$r.image,imageAtlas:pa,glyphMap:this.returnDependencies?hr:null,iconMap:this.returnDependencies?jr:null,glyphPositions:this.returnDependencies?$r.positions:null}})}}function r(nt,Ee,ze){let ve=new l.z(Ee);for(let _e of nt)_e.recalculate(ve,ze)}class n{constructor(Ee,ze,ve){this.actor=Ee,this.layerIndex=ze,this.availableImages=ve,this.fetching={},this.loading={},this.loaded={}}loadVectorTile(Ee,ze){return l._(this,void 0,void 0,function*(){let ve=yield l.l(Ee.request,ze);try{return{vectorTile:new l.bt.VectorTile(new l.bu(ve.data)),rawData:ve.data,cacheControl:ve.cacheControl,expires:ve.expires}}catch(_e){let Ie=new Uint8Array(ve.data),Be=`Unable to parse the tile at ${Ee.request.url}, `;throw Be+=Ie[0]===31&&Ie[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${_e.message}`,new Error(Be)}})}loadTile(Ee){return l._(this,void 0,void 0,function*(){let ze=Ee.uid,ve=!!(Ee&&Ee.request&&Ee.request.collectResourceTiming)&&new l.bv(Ee.request),_e=new a(Ee);this.loading[ze]=_e;let Ie=new AbortController;_e.abort=Ie;try{let Be=yield this.loadVectorTile(Ee,Ie);if(delete this.loading[ze],!Be)return null;let We=Be.rawData,Xe={};Be.expires&&(Xe.expires=Be.expires),Be.cacheControl&&(Xe.cacheControl=Be.cacheControl);let mt={};if(ve){let ht=ve.finish();ht&&(mt.resourceTiming=JSON.parse(JSON.stringify(ht)))}_e.vectorTile=Be.vectorTile;let ft=_e.parse(Be.vectorTile,this.layerIndex,this.availableImages,this.actor);this.loaded[ze]=_e,this.fetching[ze]={rawTileData:We,cacheControl:Xe,resourceTiming:mt};try{let ht=yield ft;return l.e({rawTileData:We.slice(0)},ht,Xe,mt)}finally{delete this.fetching[ze]}}catch(Be){throw delete this.loading[ze],_e.status="done",this.loaded[ze]=_e,Be}})}reloadTile(Ee){return l._(this,void 0,void 0,function*(){let ze=Ee.uid;if(!this.loaded||!this.loaded[ze])throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");let ve=this.loaded[ze];if(ve.showCollisionBoxes=Ee.showCollisionBoxes,ve.status==="parsing"){let _e=yield ve.parse(ve.vectorTile,this.layerIndex,this.availableImages,this.actor),Ie;if(this.fetching[ze]){let{rawTileData:Be,cacheControl:We,resourceTiming:Xe}=this.fetching[ze];delete this.fetching[ze],Ie=l.e({rawTileData:Be.slice(0)},_e,We,Xe)}else Ie=_e;return Ie}if(ve.status==="done"&&ve.vectorTile)return ve.parse(ve.vectorTile,this.layerIndex,this.availableImages,this.actor)})}abortTile(Ee){return l._(this,void 0,void 0,function*(){let ze=this.loading,ve=Ee.uid;ze&&ze[ve]&&ze[ve].abort&&(ze[ve].abort.abort(),delete ze[ve])})}removeTile(Ee){return l._(this,void 0,void 0,function*(){this.loaded&&this.loaded[Ee.uid]&&delete this.loaded[Ee.uid]})}}class i{constructor(){this.loaded={}}loadTile(Ee){return l._(this,void 0,void 0,function*(){let{uid:ze,encoding:ve,rawImageData:_e,redFactor:Ie,greenFactor:Be,blueFactor:We,baseShift:Xe}=Ee,mt=_e.width+2,ft=_e.height+2,ht=l.b(_e)?new l.R({width:mt,height:ft},yield l.bw(_e,-1,-1,mt,ft)):_e,gt=new l.bx(ze,ht,ve,Ie,Be,We,Xe);return this.loaded=this.loaded||{},this.loaded[ze]=gt,gt})}removeTile(Ee){let ze=this.loaded,ve=Ee.uid;ze&&ze[ve]&&delete ze[ve]}}function s(nt,Ee){if(nt.length!==0){c(nt[0],Ee);for(var ze=1;ze=Math.abs(We)?ze-Xe+We:We-Xe+ze,ze=Xe}ze+ve>=0!=!!Ee&&nt.reverse()}var p=l.by(function nt(Ee,ze){var ve,_e=Ee&&Ee.type;if(_e==="FeatureCollection")for(ve=0;ve>31}function C(nt,Ee){for(var ze=nt.loadGeometry(),ve=nt.type,_e=0,Ie=0,Be=ze.length,We=0;Went},D=Math.fround||(k=new Float32Array(1),nt=>(k[0]=+nt,k[0]));var k;let B=3,O=5,q=6;class Y{constructor(Ee){this.options=Object.assign(Object.create(z),Ee),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(Ee){let{log:ze,minZoom:ve,maxZoom:_e}=this.options;ze&&console.time("total time");let Ie=`prepare ${Ee.length} points`;ze&&console.time(Ie),this.points=Ee;let Be=[];for(let Xe=0;Xe=ve;Xe--){let mt=+Date.now();We=this.trees[Xe]=this._createTree(this._cluster(We,Xe)),ze&&console.log("z%d: %d clusters in %dms",Xe,We.numItems,+Date.now()-mt)}return ze&&console.timeEnd("total time"),this}getClusters(Ee,ze){let ve=((Ee[0]+180)%360+360)%360-180,_e=Math.max(-90,Math.min(90,Ee[1])),Ie=Ee[2]===180?180:((Ee[2]+180)%360+360)%360-180,Be=Math.max(-90,Math.min(90,Ee[3]));if(Ee[2]-Ee[0]>=360)ve=-180,Ie=180;else if(ve>Ie){let ht=this.getClusters([ve,_e,180,Be],ze),gt=this.getClusters([-180,_e,Ie,Be],ze);return ht.concat(gt)}let We=this.trees[this._limitZoom(ze)],Xe=We.range(ae(ve),U(Be),ae(Ie),U(_e)),mt=We.data,ft=[];for(let ht of Xe){let gt=this.stride*ht;ft.push(mt[gt+O]>1?ee(mt,gt,this.clusterProps):this.points[mt[gt+B]])}return ft}getChildren(Ee){let ze=this._getOriginId(Ee),ve=this._getOriginZoom(Ee),_e="No cluster with the specified id.",Ie=this.trees[ve];if(!Ie)throw new Error(_e);let Be=Ie.data;if(ze*this.stride>=Be.length)throw new Error(_e);let We=this.options.radius/(this.options.extent*Math.pow(2,ve-1)),Xe=Ie.within(Be[ze*this.stride],Be[ze*this.stride+1],We),mt=[];for(let ft of Xe){let ht=ft*this.stride;Be[ht+4]===Ee&&mt.push(Be[ht+O]>1?ee(Be,ht,this.clusterProps):this.points[Be[ht+B]])}if(mt.length===0)throw new Error(_e);return mt}getLeaves(Ee,ze,ve){let _e=[];return this._appendLeaves(_e,Ee,ze=ze||10,ve=ve||0,0),_e}getTile(Ee,ze,ve){let _e=this.trees[this._limitZoom(Ee)],Ie=Math.pow(2,Ee),{extent:Be,radius:We}=this.options,Xe=We/Be,mt=(ve-Xe)/Ie,ft=(ve+1+Xe)/Ie,ht={features:[]};return this._addTileFeatures(_e.range((ze-Xe)/Ie,mt,(ze+1+Xe)/Ie,ft),_e.data,ze,ve,Ie,ht),ze===0&&this._addTileFeatures(_e.range(1-Xe/Ie,mt,1,ft),_e.data,Ie,ve,Ie,ht),ze===Ie-1&&this._addTileFeatures(_e.range(0,mt,Xe/Ie,ft),_e.data,-1,ve,Ie,ht),ht.features.length?ht:null}getClusterExpansionZoom(Ee){let ze=this._getOriginZoom(Ee)-1;for(;ze<=this.options.maxZoom;){let ve=this.getChildren(Ee);if(ze++,ve.length!==1)break;Ee=ve[0].properties.cluster_id}return ze}_appendLeaves(Ee,ze,ve,_e,Ie){let Be=this.getChildren(ze);for(let We of Be){let Xe=We.properties;if(Xe&&Xe.cluster?Ie+Xe.point_count<=_e?Ie+=Xe.point_count:Ie=this._appendLeaves(Ee,Xe.cluster_id,ve,_e,Ie):Ie<_e?Ie++:Ee.push(We),Ee.length===ve)break}return Ie}_createTree(Ee){let ze=new l.av(Ee.length/this.stride|0,this.options.nodeSize,Float32Array);for(let ve=0;ve1,ft,ht,gt;if(mt)ft=te(ze,Xe,this.clusterProps),ht=ze[Xe],gt=ze[Xe+1];else{let St=this.points[ze[Xe+B]];ft=St.properties;let[hr,jr]=St.geometry.coordinates;ht=ae(hr),gt=U(jr)}let _t={type:1,geometry:[[Math.round(this.options.extent*(ht*Ie-ve)),Math.round(this.options.extent*(gt*Ie-_e))]],tags:ft},Ft;Ft=mt||this.options.generateId?ze[Xe+B]:this.points[ze[Xe+B]].id,Ft!==void 0&&(_t.id=Ft),Be.features.push(_t)}}_limitZoom(Ee){return Math.max(this.options.minZoom,Math.min(Math.floor(+Ee),this.options.maxZoom+1))}_cluster(Ee,ze){let{radius:ve,extent:_e,reduce:Ie,minPoints:Be}=this.options,We=ve/(_e*Math.pow(2,ze)),Xe=Ee.data,mt=[],ft=this.stride;for(let ht=0;htze&&(hr+=Xe[ra+O])}if(hr>St&&hr>=Be){let jr,ra=gt*St,$r=_t*St,pa=-1,oa=((ht/ft|0)<<5)+(ze+1)+this.points.length;for(let aa of Ft){let ka=aa*ft;if(Xe[ka+2]<=ze)continue;Xe[ka+2]=ze;let Ta=Xe[ka+O];ra+=Xe[ka]*Ta,$r+=Xe[ka+1]*Ta,Xe[ka+4]=oa,Ie&&(jr||(jr=this._map(Xe,ht,!0),pa=this.clusterProps.length,this.clusterProps.push(jr)),Ie(jr,this._map(Xe,ka)))}Xe[ht+4]=oa,mt.push(ra/hr,$r/hr,1/0,oa,-1,hr),Ie&&mt.push(pa)}else{for(let jr=0;jr1)for(let jr of Ft){let ra=jr*ft;if(!(Xe[ra+2]<=ze)){Xe[ra+2]=ze;for(let $r=0;$r>5}_getOriginZoom(Ee){return(Ee-this.points.length)%32}_map(Ee,ze,ve){if(Ee[ze+O]>1){let Be=this.clusterProps[Ee[ze+q]];return ve?Object.assign({},Be):Be}let _e=this.points[Ee[ze+B]].properties,Ie=this.options.map(_e);return ve&&Ie===_e?Object.assign({},Ie):Ie}}function ee(nt,Ee,ze){return{type:"Feature",id:nt[Ee+B],properties:te(nt,Ee,ze),geometry:{type:"Point",coordinates:[(ve=nt[Ee],360*(ve-.5)),H(nt[Ee+1])]}};var ve}function te(nt,Ee,ze){let ve=nt[Ee+O],_e=ve>=1e4?`${Math.round(ve/1e3)}k`:ve>=1e3?Math.round(ve/100)/10+"k":ve,Ie=nt[Ee+q],Be=Ie===-1?{}:Object.assign({},ze[Ie]);return Object.assign(Be,{cluster:!0,cluster_id:nt[Ee+B],point_count:ve,point_count_abbreviated:_e})}function ae(nt){return nt/360+.5}function U(nt){let Ee=Math.sin(nt*Math.PI/180),ze=.5-.25*Math.log((1+Ee)/(1-Ee))/Math.PI;return ze<0?0:ze>1?1:ze}function H(nt){let Ee=(180-360*nt)*Math.PI/180;return 360*Math.atan(Math.exp(Ee))/Math.PI-90}function K(nt,Ee,ze,ve){let _e=ve,Ie=Ee+(ze-Ee>>1),Be,We=ze-Ee,Xe=nt[Ee],mt=nt[Ee+1],ft=nt[ze],ht=nt[ze+1];for(let gt=Ee+3;gt_e)Be=gt,_e=_t;else if(_t===_e){let Ft=Math.abs(gt-Ie);Ftve&&(Be-Ee>3&&K(nt,Ee,Be,ve),nt[Be+2]=_e,ze-Be>3&&K(nt,Be,ze,ve))}function V(nt,Ee,ze,ve,_e,Ie){let Be=_e-ze,We=Ie-ve;if(Be!==0||We!==0){let Xe=((nt-ze)*Be+(Ee-ve)*We)/(Be*Be+We*We);Xe>1?(ze=_e,ve=Ie):Xe>0&&(ze+=Be*Xe,ve+=We*Xe)}return Be=nt-ze,We=Ee-ve,Be*Be+We*We}function $(nt,Ee,ze,ve){let _e={id:nt??null,type:Ee,geometry:ze,tags:ve,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};if(Ee==="Point"||Ee==="MultiPoint"||Ee==="LineString")X(_e,ze);else if(Ee==="Polygon")X(_e,ze[0]);else if(Ee==="MultiLineString")for(let Ie of ze)X(_e,Ie);else if(Ee==="MultiPolygon")for(let Ie of ze)X(_e,Ie[0]);return _e}function X(nt,Ee){for(let ze=0;ze0&&(Be+=ve?(_e*ft-mt*Ie)/2:Math.sqrt(Math.pow(mt-_e,2)+Math.pow(ft-Ie,2))),_e=mt,Ie=ft}let We=Ee.length-3;Ee[2]=1,K(Ee,0,We,ze),Ee[We+2]=1,Ee.size=Math.abs(Be),Ee.start=0,Ee.end=Ee.size}function ce(nt,Ee,ze,ve){for(let _e=0;_e1?1:ze}function Ae(nt,Ee,ze,ve,_e,Ie,Be,We){if(ve/=Ee,Ie>=(ze/=Ee)&&Be=ve)return null;let Xe=[];for(let mt of nt){let ft=mt.geometry,ht=mt.type,gt=_e===0?mt.minX:mt.minY,_t=_e===0?mt.maxX:mt.maxY;if(gt>=ze&&_t=ve)continue;let Ft=[];if(ht==="Point"||ht==="MultiPoint")Se(ft,Ft,ze,ve,_e);else if(ht==="LineString")Ce(ft,Ft,ze,ve,_e,!1,We.lineMetrics);else if(ht==="MultiLineString")Ue(ft,Ft,ze,ve,_e,!1);else if(ht==="Polygon")Ue(ft,Ft,ze,ve,_e,!0);else if(ht==="MultiPolygon")for(let St of ft){let hr=[];Ue(St,hr,ze,ve,_e,!0),hr.length&&Ft.push(hr)}if(Ft.length){if(We.lineMetrics&&ht==="LineString"){for(let St of Ft)Xe.push($(mt.id,ht,St,mt.tags));continue}ht!=="LineString"&&ht!=="MultiLineString"||(Ft.length===1?(ht="LineString",Ft=Ft[0]):ht="MultiLineString"),ht!=="Point"&&ht!=="MultiPoint"||(ht=Ft.length===3?"Point":"MultiPoint"),Xe.push($(mt.id,ht,Ft,mt.tags))}}return Xe.length?Xe:null}function Se(nt,Ee,ze,ve,_e){for(let Ie=0;Ie=ze&&Be<=ve&&xe(Ee,nt[Ie],nt[Ie+1],nt[Ie+2])}}function Ce(nt,Ee,ze,ve,_e,Ie,Be){let We=qe(nt),Xe=_e===0?he:oe,mt,ft,ht=nt.start;for(let hr=0;hrze&&(ft=Xe(We,jr,ra,pa,oa,ze),Be&&(We.start=ht+mt*ft)):aa>ve?ka=ze&&(ft=Xe(We,jr,ra,pa,oa,ze),Ta=!0),ka>ve&&aa<=ve&&(ft=Xe(We,jr,ra,pa,oa,ve),Ta=!0),!Ie&&Ta&&(Be&&(We.end=ht+mt*ft),Ee.push(We),We=qe(nt)),Be&&(ht+=mt)}let gt=nt.length-3,_t=nt[gt],Ft=nt[gt+1],St=_e===0?_t:Ft;St>=ze&&St<=ve&&xe(We,_t,Ft,nt[gt+2]),gt=We.length-3,Ie&>>=3&&(We[gt]!==We[0]||We[gt+1]!==We[1])&&xe(We,We[0],We[1],We[2]),We.length&&Ee.push(We)}function qe(nt){let Ee=[];return Ee.size=nt.size,Ee.start=nt.start,Ee.end=nt.end,Ee}function Ue(nt,Ee,ze,ve,_e,Ie){for(let Be of nt)Ce(Be,Ee,ze,ve,_e,Ie,!1)}function xe(nt,Ee,ze,ve){nt.push(Ee,ze,ve)}function he(nt,Ee,ze,ve,_e,Ie){let Be=(Ie-Ee)/(ve-Ee);return xe(nt,Ie,ze+(_e-ze)*Be,1),Be}function oe(nt,Ee,ze,ve,_e,Ie){let Be=(Ie-ze)/(_e-ze);return xe(nt,Ee+(ve-Ee)*Be,Ie,1),Be}function le(nt,Ee){let ze=[];for(let ve=0;ve0&&Ee.size<(_e?Be:ve))return void(ze.numPoints+=Ee.length/3);let We=[];for(let Xe=0;XeBe)&&(ze.numSimplified++,We.push(Ee[Xe],Ee[Xe+1])),ze.numPoints++;_e&&function(Xe,mt){let ft=0;for(let ht=0,gt=Xe.length,_t=gt-2;ht0===mt)for(let ht=0,gt=Xe.length;ht24)throw new Error("maxZoom should be in the 0-24 range");if(ze.promoteId&&ze.generateId)throw new Error("promoteId and generateId cannot be used together.");let _e=function(Ie,Be){let We=[];if(Ie.type==="FeatureCollection")for(let Xe=0;Xe1&&console.time("creation"),_t=this.tiles[gt]=Ve(Ee,ze,ve,_e,mt),this.tileCoords.push({z:ze,x:ve,y:_e}),ft)){ft>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",ze,ve,_e,_t.numFeatures,_t.numPoints,_t.numSimplified),console.timeEnd("creation"));let Ta=`z${ze}`;this.stats[Ta]=(this.stats[Ta]||0)+1,this.total++}if(_t.source=Ee,Ie==null){if(ze===mt.indexMaxZoom||_t.numPoints<=mt.indexMaxPoints)continue}else{if(ze===mt.maxZoom||ze===Ie)continue;if(Ie!=null){let Ta=Ie-ze;if(ve!==Be>>Ta||_e!==We>>Ta)continue}}if(_t.source=null,Ee.length===0)continue;ft>1&&console.time("clipping");let Ft=.5*mt.buffer/mt.extent,St=.5-Ft,hr=.5+Ft,jr=1+Ft,ra=null,$r=null,pa=null,oa=null,aa=Ae(Ee,ht,ve-Ft,ve+hr,0,_t.minX,_t.maxX,mt),ka=Ae(Ee,ht,ve+St,ve+jr,0,_t.minX,_t.maxX,mt);Ee=null,aa&&(ra=Ae(aa,ht,_e-Ft,_e+hr,1,_t.minY,_t.maxY,mt),$r=Ae(aa,ht,_e+St,_e+jr,1,_t.minY,_t.maxY,mt),aa=null),ka&&(pa=Ae(ka,ht,_e-Ft,_e+hr,1,_t.minY,_t.maxY,mt),oa=Ae(ka,ht,_e+St,_e+jr,1,_t.minY,_t.maxY,mt),ka=null),ft>1&&console.timeEnd("clipping"),Xe.push(ra||[],ze+1,2*ve,2*_e),Xe.push($r||[],ze+1,2*ve,2*_e+1),Xe.push(pa||[],ze+1,2*ve+1,2*_e),Xe.push(oa||[],ze+1,2*ve+1,2*_e+1)}}getTile(Ee,ze,ve){Ee=+Ee,ze=+ze,ve=+ve;let _e=this.options,{extent:Ie,debug:Be}=_e;if(Ee<0||Ee>24)return null;let We=1<1&&console.log("drilling down to z%d-%d-%d",Ee,ze,ve);let mt,ft=Ee,ht=ze,gt=ve;for(;!mt&&ft>0;)ft--,ht>>=1,gt>>=1,mt=this.tiles[At(ft,ht,gt)];return mt&&mt.source?(Be>1&&(console.log("found parent tile z%d-%d-%d",ft,ht,gt),console.time("drilling down")),this.splitTile(mt.source,ft,ht,gt,Ee,ze,ve),Be>1&&console.timeEnd("drilling down"),this.tiles[Xe]?be(this.tiles[Xe],Ie):null):null}}function At(nt,Ee,ze){return 32*((1<{ht.properties=_t;let Ft={};for(let St of gt)Ft[St]=Xe[St].evaluate(ft,ht);return Ft},Be.reduce=(_t,Ft)=>{ht.properties=Ft;for(let St of gt)ft.accumulated=_t[St],_t[St]=mt[St].evaluate(ft,ht)},Be}(Ee)).load((yield this._pendingData).features):(_e=yield this._pendingData,new yt(_e,Ee.geojsonVtOptions)),this.loaded={};let Ie={};if(ve){let Be=ve.finish();Be&&(Ie.resourceTiming={},Ie.resourceTiming[Ee.source]=JSON.parse(JSON.stringify(Be)))}return Ie}catch(Ie){if(delete this._pendingRequest,l.bB(Ie))return{abandoned:!0};throw Ie}var _e})}getData(){return l._(this,void 0,void 0,function*(){return this._pendingData})}reloadTile(Ee){let ze=this.loaded;return ze&&ze[Ee.uid]?super.reloadTile(Ee):this.loadTile(Ee)}loadAndProcessGeoJSON(Ee,ze){return l._(this,void 0,void 0,function*(){let ve=yield this.loadGeoJSON(Ee,ze);if(delete this._pendingRequest,typeof ve!="object")throw new Error(`Input data given to '${Ee.source}' is not a valid GeoJSON object.`);if(p(ve,!0),Ee.filter){let _e=l.bC(Ee.filter,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(_e.result==="error")throw new Error(_e.value.map(Be=>`${Be.key}: ${Be.message}`).join(", "));ve={type:"FeatureCollection",features:ve.features.filter(Be=>_e.value.evaluate({zoom:0},Be))}}return ve})}loadGeoJSON(Ee,ze){return l._(this,void 0,void 0,function*(){let{promoteId:ve}=Ee;if(Ee.request){let _e=yield l.h(Ee.request,ze);return this._dataUpdateable=Zt(_e.data,ve)?vr(_e.data,ve):void 0,_e.data}if(typeof Ee.data=="string")try{let _e=JSON.parse(Ee.data);return this._dataUpdateable=Zt(_e,ve)?vr(_e,ve):void 0,_e}catch{throw new Error(`Input data given to '${Ee.source}' is not a valid GeoJSON object.`)}if(!Ee.dataDiff)throw new Error(`Input data given to '${Ee.source}' is not a valid GeoJSON object.`);if(!this._dataUpdateable)throw new Error(`Cannot update existing geojson data in ${Ee.source}`);return function(_e,Ie,Be){var We,Xe,mt,ft;if(Ie.removeAll&&_e.clear(),Ie.remove)for(let ht of Ie.remove)_e.delete(ht);if(Ie.add)for(let ht of Ie.add){let gt=Pt(ht,Be);gt!=null&&_e.set(gt,ht)}if(Ie.update)for(let ht of Ie.update){let gt=_e.get(ht.id);if(gt==null)continue;let _t=!ht.removeAllProperties&&(((We=ht.removeProperties)===null||We===void 0?void 0:We.length)>0||((Xe=ht.addOrUpdateProperties)===null||Xe===void 0?void 0:Xe.length)>0);if((ht.newGeometry||ht.removeAllProperties||_t)&&(gt=Object.assign({},gt),_e.set(ht.id,gt),_t&&(gt.properties=Object.assign({},gt.properties))),ht.newGeometry&&(gt.geometry=ht.newGeometry),ht.removeAllProperties)gt.properties={};else if(((mt=ht.removeProperties)===null||mt===void 0?void 0:mt.length)>0)for(let Ft of ht.removeProperties)Object.prototype.hasOwnProperty.call(gt.properties,Ft)&&delete gt.properties[Ft];if(((ft=ht.addOrUpdateProperties)===null||ft===void 0?void 0:ft.length)>0)for(let{key:Ft,value:St}of ht.addOrUpdateProperties)gt.properties[Ft]=St}}(this._dataUpdateable,Ee.dataDiff,ve),{type:"FeatureCollection",features:Array.from(this._dataUpdateable.values())}})}removeSource(Ee){return l._(this,void 0,void 0,function*(){this._pendingRequest&&this._pendingRequest.abort()})}getClusterExpansionZoom(Ee){return this._geoJSONIndex.getClusterExpansionZoom(Ee.clusterId)}getClusterChildren(Ee){return this._geoJSONIndex.getChildren(Ee.clusterId)}getClusterLeaves(Ee){return this._geoJSONIndex.getLeaves(Ee.clusterId,Ee.limit,Ee.offset)}}class Kt{constructor(Ee){this.self=Ee,this.actor=new l.F(Ee),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.self.registerWorkerSource=(ze,ve)=>{if(this.externalWorkerSourceTypes[ze])throw new Error(`Worker source with name "${ze}" already registered.`);this.externalWorkerSourceTypes[ze]=ve},this.self.addProtocol=l.bi,this.self.removeProtocol=l.bj,this.self.registerRTLTextPlugin=ze=>{if(l.bD.isParsed())throw new Error("RTL text plugin already registered.");l.bD.setMethods(ze)},this.actor.registerMessageHandler("LDT",(ze,ve)=>this._getDEMWorkerSource(ze,ve.source).loadTile(ve)),this.actor.registerMessageHandler("RDT",(ze,ve)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(ze,ve.source).removeTile(ve)})),this.actor.registerMessageHandler("GCEZ",(ze,ve)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(ze,ve.type,ve.source).getClusterExpansionZoom(ve)})),this.actor.registerMessageHandler("GCC",(ze,ve)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(ze,ve.type,ve.source).getClusterChildren(ve)})),this.actor.registerMessageHandler("GCL",(ze,ve)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(ze,ve.type,ve.source).getClusterLeaves(ve)})),this.actor.registerMessageHandler("LD",(ze,ve)=>this._getWorkerSource(ze,ve.type,ve.source).loadData(ve)),this.actor.registerMessageHandler("GD",(ze,ve)=>this._getWorkerSource(ze,ve.type,ve.source).getData()),this.actor.registerMessageHandler("LT",(ze,ve)=>this._getWorkerSource(ze,ve.type,ve.source).loadTile(ve)),this.actor.registerMessageHandler("RT",(ze,ve)=>this._getWorkerSource(ze,ve.type,ve.source).reloadTile(ve)),this.actor.registerMessageHandler("AT",(ze,ve)=>this._getWorkerSource(ze,ve.type,ve.source).abortTile(ve)),this.actor.registerMessageHandler("RMT",(ze,ve)=>this._getWorkerSource(ze,ve.type,ve.source).removeTile(ve)),this.actor.registerMessageHandler("RS",(ze,ve)=>l._(this,void 0,void 0,function*(){if(!this.workerSources[ze]||!this.workerSources[ze][ve.type]||!this.workerSources[ze][ve.type][ve.source])return;let _e=this.workerSources[ze][ve.type][ve.source];delete this.workerSources[ze][ve.type][ve.source],_e.removeSource!==void 0&&_e.removeSource(ve)})),this.actor.registerMessageHandler("RM",ze=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[ze],delete this.availableImages[ze],delete this.workerSources[ze],delete this.demWorkerSources[ze]})),this.actor.registerMessageHandler("SR",(ze,ve)=>l._(this,void 0,void 0,function*(){this.referrer=ve})),this.actor.registerMessageHandler("SRPS",(ze,ve)=>this._syncRTLPluginState(ze,ve)),this.actor.registerMessageHandler("IS",(ze,ve)=>l._(this,void 0,void 0,function*(){this.self.importScripts(ve)})),this.actor.registerMessageHandler("SI",(ze,ve)=>this._setImages(ze,ve)),this.actor.registerMessageHandler("UL",(ze,ve)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(ze).update(ve.layers,ve.removedIds)})),this.actor.registerMessageHandler("SL",(ze,ve)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(ze).replace(ve)}))}_setImages(Ee,ze){return l._(this,void 0,void 0,function*(){this.availableImages[Ee]=ze;for(let ve in this.workerSources[Ee]){let _e=this.workerSources[Ee][ve];for(let Ie in _e)_e[Ie].availableImages=ze}})}_syncRTLPluginState(Ee,ze){return l._(this,void 0,void 0,function*(){if(l.bD.isParsed())return l.bD.getState();if(ze.pluginStatus!=="loading")return l.bD.setState(ze),ze;let ve=ze.pluginURL;if(this.self.importScripts(ve),l.bD.isParsed()){let _e={pluginStatus:"loaded",pluginURL:ve};return l.bD.setState(_e),_e}throw l.bD.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${ve}`)})}_getAvailableImages(Ee){let ze=this.availableImages[Ee];return ze||(ze=[]),ze}_getLayerIndex(Ee){let ze=this.layerIndexes[Ee];return ze||(ze=this.layerIndexes[Ee]=new e),ze}_getWorkerSource(Ee,ze,ve){if(this.workerSources[Ee]||(this.workerSources[Ee]={}),this.workerSources[Ee][ze]||(this.workerSources[Ee][ze]={}),!this.workerSources[Ee][ze][ve]){let _e={sendAsync:(Ie,Be)=>(Ie.targetMapId=Ee,this.actor.sendAsync(Ie,Be))};switch(ze){case"vector":this.workerSources[Ee][ze][ve]=new n(_e,this._getLayerIndex(Ee),this._getAvailableImages(Ee));break;case"geojson":this.workerSources[Ee][ze][ve]=new Nt(_e,this._getLayerIndex(Ee),this._getAvailableImages(Ee));break;default:this.workerSources[Ee][ze][ve]=new this.externalWorkerSourceTypes[ze](_e,this._getLayerIndex(Ee),this._getAvailableImages(Ee))}}return this.workerSources[Ee][ze][ve]}_getDEMWorkerSource(Ee,ze){return this.demWorkerSources[Ee]||(this.demWorkerSources[Ee]={}),this.demWorkerSources[Ee][ze]||(this.demWorkerSources[Ee][ze]=new i),this.demWorkerSources[Ee][ze]}}return l.i(self)&&(self.worker=new Kt(self)),Kt}),w("index",["exports","./shared"],function(l,e){"use strict";var t="4.7.1";let a,r,n={now:typeof performance<"u"&&performance&&performance.now?performance.now.bind(performance):Date.now.bind(Date),frameAsync:Me=>new Promise((L,J)=>{let de=requestAnimationFrame(L);Me.signal.addEventListener("abort",()=>{cancelAnimationFrame(de),J(e.c())})}),getImageData(Me,L=0){return this.getImageCanvasContext(Me).getImageData(-L,-L,Me.width+2*L,Me.height+2*L)},getImageCanvasContext(Me){let L=window.document.createElement("canvas"),J=L.getContext("2d",{willReadFrequently:!0});if(!J)throw new Error("failed to create canvas 2d context");return L.width=Me.width,L.height=Me.height,J.drawImage(Me,0,0,Me.width,Me.height),J},resolveURL:Me=>(a||(a=document.createElement("a")),a.href=Me,a.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return!!matchMedia&&(r==null&&(r=matchMedia("(prefers-reduced-motion: reduce)")),r.matches)}};class i{static testProp(L){if(!i.docStyle)return L[0];for(let J=0;J{window.removeEventListener("click",i.suppressClickInternal,!0)},0)}static getScale(L){let J=L.getBoundingClientRect();return{x:J.width/L.offsetWidth||1,y:J.height/L.offsetHeight||1,boundingClientRect:J}}static getPoint(L,J,de){let pe=J.boundingClientRect;return new e.P((de.clientX-pe.left)/J.x-L.clientLeft,(de.clientY-pe.top)/J.y-L.clientTop)}static mousePos(L,J){let de=i.getScale(L);return i.getPoint(L,de,J)}static touchPos(L,J){let de=[],pe=i.getScale(L);for(let Te=0;Te{c&&y(c),c=null,d=!0},p.onerror=()=>{f=!0,c=null},p.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA="),function(Me){let L,J,de,pe;Me.resetRequestQueue=()=>{L=[],J=0,de=0,pe={}},Me.addThrottleControl=vt=>{let Mt=de++;return pe[Mt]=vt,Mt},Me.removeThrottleControl=vt=>{delete pe[vt],Ze()},Me.getImage=(vt,Mt,Gt=!0)=>new Promise((Ht,fr)=>{s.supported&&(vt.headers||(vt.headers={}),vt.headers.accept="image/webp,*/*"),e.e(vt,{type:"image"}),L.push({abortController:Mt,requestParameters:vt,supportImageRefresh:Gt,state:"queued",onError:wr=>{fr(wr)},onSuccess:wr=>{Ht(wr)}}),Ze()});let Te=vt=>e._(this,void 0,void 0,function*(){vt.state="running";let{requestParameters:Mt,supportImageRefresh:Gt,onError:Ht,onSuccess:fr,abortController:wr}=vt,Le=Gt===!1&&!e.i(self)&&!e.g(Mt.url)&&(!Mt.headers||Object.keys(Mt.headers).reduce(($e,lt)=>$e&<==="accept",!0));J++;let Oe=Le?rt(Mt,wr):e.m(Mt,wr);try{let $e=yield Oe;delete vt.abortController,vt.state="completed",$e.data instanceof HTMLImageElement||e.b($e.data)?fr($e):$e.data&&fr({data:yield(Ge=$e.data,typeof createImageBitmap=="function"?e.d(Ge):e.f(Ge)),cacheControl:$e.cacheControl,expires:$e.expires})}catch($e){delete vt.abortController,Ht($e)}finally{J--,Ze()}var Ge}),Ze=()=>{let vt=(()=>{for(let Mt of Object.keys(pe))if(pe[Mt]())return!0;return!1})()?e.a.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.a.MAX_PARALLEL_IMAGE_REQUESTS;for(let Mt=J;Mt0;Mt++){let Gt=L.shift();Gt.abortController.signal.aborted?Mt--:Te(Gt)}},rt=(vt,Mt)=>new Promise((Gt,Ht)=>{let fr=new Image,wr=vt.url,Le=vt.credentials;Le&&Le==="include"?fr.crossOrigin="use-credentials":(Le&&Le==="same-origin"||!e.s(wr))&&(fr.crossOrigin="anonymous"),Mt.signal.addEventListener("abort",()=>{fr.src="",Ht(e.c())}),fr.fetchPriority="high",fr.onload=()=>{fr.onerror=fr.onload=null,Gt({data:fr})},fr.onerror=()=>{fr.onerror=fr.onload=null,Mt.signal.aborted||Ht(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},fr.src=wr})}(o||(o={})),o.resetRequestQueue();class x{constructor(L){this._transformRequestFn=L}transformRequest(L,J){return this._transformRequestFn&&this._transformRequestFn(L,J)||{url:L}}setTransformRequest(L){this._transformRequestFn=L}}function M(Me){var L=new e.A(3);return L[0]=Me[0],L[1]=Me[1],L[2]=Me[2],L}var T,E=function(Me,L,J){return Me[0]=L[0]-J[0],Me[1]=L[1]-J[1],Me[2]=L[2]-J[2],Me};T=new e.A(3),e.A!=Float32Array&&(T[0]=0,T[1]=0,T[2]=0);var g=function(Me){var L=Me[0],J=Me[1];return L*L+J*J};function A(Me){let L=[];if(typeof Me=="string")L.push({id:"default",url:Me});else if(Me&&Me.length>0){let J=[];for(let{id:de,url:pe}of Me){let Te=`${de}${pe}`;J.indexOf(Te)===-1&&(J.push(Te),L.push({id:de,url:pe}))}}return L}function m(Me,L,J){let de=Me.split("?");return de[0]+=`${L}${J}`,de.join("?")}(function(){var Me=new e.A(2);e.A!=Float32Array&&(Me[0]=0,Me[1]=0)})();class h{constructor(L,J,de,pe){this.context=L,this.format=de,this.texture=L.gl.createTexture(),this.update(J,pe)}update(L,J,de){let{width:pe,height:Te}=L,Ze=!(this.size&&this.size[0]===pe&&this.size[1]===Te||de),{context:rt}=this,{gl:vt}=rt;if(this.useMipmap=!!(J&&J.useMipmap),vt.bindTexture(vt.TEXTURE_2D,this.texture),rt.pixelStoreUnpackFlipY.set(!1),rt.pixelStoreUnpack.set(1),rt.pixelStoreUnpackPremultiplyAlpha.set(this.format===vt.RGBA&&(!J||J.premultiply!==!1)),Ze)this.size=[pe,Te],L instanceof HTMLImageElement||L instanceof HTMLCanvasElement||L instanceof HTMLVideoElement||L instanceof ImageData||e.b(L)?vt.texImage2D(vt.TEXTURE_2D,0,this.format,this.format,vt.UNSIGNED_BYTE,L):vt.texImage2D(vt.TEXTURE_2D,0,this.format,pe,Te,0,this.format,vt.UNSIGNED_BYTE,L.data);else{let{x:Mt,y:Gt}=de||{x:0,y:0};L instanceof HTMLImageElement||L instanceof HTMLCanvasElement||L instanceof HTMLVideoElement||L instanceof ImageData||e.b(L)?vt.texSubImage2D(vt.TEXTURE_2D,0,Mt,Gt,vt.RGBA,vt.UNSIGNED_BYTE,L):vt.texSubImage2D(vt.TEXTURE_2D,0,Mt,Gt,pe,Te,vt.RGBA,vt.UNSIGNED_BYTE,L.data)}this.useMipmap&&this.isSizePowerOfTwo()&&vt.generateMipmap(vt.TEXTURE_2D)}bind(L,J,de){let{context:pe}=this,{gl:Te}=pe;Te.bindTexture(Te.TEXTURE_2D,this.texture),de!==Te.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(de=Te.LINEAR),L!==this.filter&&(Te.texParameteri(Te.TEXTURE_2D,Te.TEXTURE_MAG_FILTER,L),Te.texParameteri(Te.TEXTURE_2D,Te.TEXTURE_MIN_FILTER,de||L),this.filter=L),J!==this.wrap&&(Te.texParameteri(Te.TEXTURE_2D,Te.TEXTURE_WRAP_S,J),Te.texParameteri(Te.TEXTURE_2D,Te.TEXTURE_WRAP_T,J),this.wrap=J)}isSizePowerOfTwo(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0}destroy(){let{gl:L}=this.context;L.deleteTexture(this.texture),this.texture=null}}function b(Me){let{userImage:L}=Me;return!!(L&&L.render&&L.render())&&(Me.data.replace(new Uint8Array(L.data.buffer)),!0)}class _ extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(L){if(this.loaded!==L&&(this.loaded=L,L)){for(let{ids:J,promiseResolve:de}of this.requestors)de(this._getImagesForIds(J));this.requestors=[]}}getImage(L){let J=this.images[L];if(J&&!J.data&&J.spriteData){let de=J.spriteData;J.data=new e.R({width:de.width,height:de.height},de.context.getImageData(de.x,de.y,de.width,de.height).data),J.spriteData=null}return J}addImage(L,J){if(this.images[L])throw new Error(`Image id ${L} already exist, use updateImage instead`);this._validate(L,J)&&(this.images[L]=J)}_validate(L,J){let de=!0,pe=J.data||J.spriteData;return this._validateStretch(J.stretchX,pe&&pe.width)||(this.fire(new e.j(new Error(`Image "${L}" has invalid "stretchX" value`))),de=!1),this._validateStretch(J.stretchY,pe&&pe.height)||(this.fire(new e.j(new Error(`Image "${L}" has invalid "stretchY" value`))),de=!1),this._validateContent(J.content,J)||(this.fire(new e.j(new Error(`Image "${L}" has invalid "content" value`))),de=!1),de}_validateStretch(L,J){if(!L)return!0;let de=0;for(let pe of L){if(pe[0]{let pe=!0;if(!this.isLoaded())for(let Te of L)this.images[Te]||(pe=!1);this.isLoaded()||pe?J(this._getImagesForIds(L)):this.requestors.push({ids:L,promiseResolve:J})})}_getImagesForIds(L){let J={};for(let de of L){let pe=this.getImage(de);pe||(this.fire(new e.k("styleimagemissing",{id:de})),pe=this.getImage(de)),pe?J[de]={data:pe.data.clone(),pixelRatio:pe.pixelRatio,sdf:pe.sdf,version:pe.version,stretchX:pe.stretchX,stretchY:pe.stretchY,content:pe.content,textFitWidth:pe.textFitWidth,textFitHeight:pe.textFitHeight,hasRenderCallback:!!(pe.userImage&&pe.userImage.render)}:e.w(`Image "${de}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return J}getPixelSize(){let{width:L,height:J}=this.atlasImage;return{width:L,height:J}}getPattern(L){let J=this.patterns[L],de=this.getImage(L);if(!de)return null;if(J&&J.position.version===de.version)return J.position;if(J)J.position.version=de.version;else{let pe={w:de.data.width+2,h:de.data.height+2,x:0,y:0},Te=new e.I(pe,de);this.patterns[L]={bin:pe,position:Te}}return this._updatePatternAtlas(),this.patterns[L].position}bind(L){let J=L.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new h(L,this.atlasImage,J.RGBA),this.atlasTexture.bind(J.LINEAR,J.CLAMP_TO_EDGE)}_updatePatternAtlas(){let L=[];for(let Te in this.patterns)L.push(this.patterns[Te].bin);let{w:J,h:de}=e.p(L),pe=this.atlasImage;pe.resize({width:J||1,height:de||1});for(let Te in this.patterns){let{bin:Ze}=this.patterns[Te],rt=Ze.x+1,vt=Ze.y+1,Mt=this.getImage(Te).data,Gt=Mt.width,Ht=Mt.height;e.R.copy(Mt,pe,{x:0,y:0},{x:rt,y:vt},{width:Gt,height:Ht}),e.R.copy(Mt,pe,{x:0,y:Ht-1},{x:rt,y:vt-1},{width:Gt,height:1}),e.R.copy(Mt,pe,{x:0,y:0},{x:rt,y:vt+Ht},{width:Gt,height:1}),e.R.copy(Mt,pe,{x:Gt-1,y:0},{x:rt-1,y:vt},{width:1,height:Ht}),e.R.copy(Mt,pe,{x:0,y:0},{x:rt+Gt,y:vt},{width:1,height:Ht})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(L){for(let J of L){if(this.callbackDispatchedThisFrame[J])continue;this.callbackDispatchedThisFrame[J]=!0;let de=this.getImage(J);de||e.w(`Image with ID: "${J}" was not found`),b(de)&&this.updateImage(J,de)}}}let I=1e20;function C(Me,L,J,de,pe,Te,Ze,rt,vt){for(let Mt=L;Mt-1);vt++,Te[vt]=rt,Ze[vt]=Mt,Ze[vt+1]=I}for(let rt=0,vt=0;rt65535)throw new Error("glyphs > 65535 not supported");if(de.ranges[Te])return{stack:L,id:J,glyph:pe};if(!this.url)throw new Error("glyphsUrl is not set");if(!de.requests[Te]){let rt=R.loadGlyphRange(L,Te,this.url,this.requestManager);de.requests[Te]=rt}let Ze=yield de.requests[Te];for(let rt in Ze)this._doesCharSupportLocalGlyph(+rt)||(de.glyphs[+rt]=Ze[+rt]);return de.ranges[Te]=!0,{stack:L,id:J,glyph:Ze[J]||null}})}_doesCharSupportLocalGlyph(L){return!!this.localIdeographFontFamily&&new RegExp("\\p{Ideo}|\\p{sc=Hang}|\\p{sc=Hira}|\\p{sc=Kana}","u").test(String.fromCodePoint(L))}_tinySDF(L,J,de){let pe=this.localIdeographFontFamily;if(!pe||!this._doesCharSupportLocalGlyph(de))return;let Te=L.tinySDF;if(!Te){let rt="400";/bold/i.test(J)?rt="900":/medium/i.test(J)?rt="500":/light/i.test(J)&&(rt="200"),Te=L.tinySDF=new R.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:pe,fontWeight:rt})}let Ze=Te.draw(String.fromCharCode(de));return{id:de,bitmap:new e.o({width:Ze.width||60,height:Ze.height||60},Ze.data),metrics:{width:Ze.glyphWidth/2||24,height:Ze.glyphHeight/2||24,left:Ze.glyphLeft/2+.5||0,top:Ze.glyphTop/2-27.5||-8,advance:Ze.glyphAdvance/2||24,isDoubleResolution:!0}}}}R.loadGlyphRange=function(Me,L,J,de){return e._(this,void 0,void 0,function*(){let pe=256*L,Te=pe+255,Ze=de.transformRequest(J.replace("{fontstack}",Me).replace("{range}",`${pe}-${Te}`),"Glyphs"),rt=yield e.l(Ze,new AbortController);if(!rt||!rt.data)throw new Error(`Could not load glyph range. range: ${L}, ${pe}-${Te}`);let vt={};for(let Mt of e.n(rt.data))vt[Mt.id]=Mt;return vt})},R.TinySDF=class{constructor({fontSize:Me=24,buffer:L=3,radius:J=8,cutoff:de=.25,fontFamily:pe="sans-serif",fontWeight:Te="normal",fontStyle:Ze="normal"}={}){this.buffer=L,this.cutoff=de,this.radius=J;let rt=this.size=Me+4*L,vt=this._createCanvas(rt),Mt=this.ctx=vt.getContext("2d",{willReadFrequently:!0});Mt.font=`${Ze} ${Te} ${Me}px ${pe}`,Mt.textBaseline="alphabetic",Mt.textAlign="left",Mt.fillStyle="black",this.gridOuter=new Float64Array(rt*rt),this.gridInner=new Float64Array(rt*rt),this.f=new Float64Array(rt),this.z=new Float64Array(rt+1),this.v=new Uint16Array(rt)}_createCanvas(Me){let L=document.createElement("canvas");return L.width=L.height=Me,L}draw(Me){let{width:L,actualBoundingBoxAscent:J,actualBoundingBoxDescent:de,actualBoundingBoxLeft:pe,actualBoundingBoxRight:Te}=this.ctx.measureText(Me),Ze=Math.ceil(J),rt=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(Te-pe))),vt=Math.min(this.size-this.buffer,Ze+Math.ceil(de)),Mt=rt+2*this.buffer,Gt=vt+2*this.buffer,Ht=Math.max(Mt*Gt,0),fr=new Uint8ClampedArray(Ht),wr={data:fr,width:Mt,height:Gt,glyphWidth:rt,glyphHeight:vt,glyphTop:Ze,glyphLeft:0,glyphAdvance:L};if(rt===0||vt===0)return wr;let{ctx:Le,buffer:Oe,gridInner:Ge,gridOuter:$e}=this;Le.clearRect(Oe,Oe,rt,vt),Le.fillText(Me,Oe,Oe+Ze);let lt=Le.getImageData(Oe,Oe,rt,vt);$e.fill(I,0,Ht),Ge.fill(0,0,Ht);for(let tt=0;tt0?Xt*Xt:0,Ge[Ot]=Xt<0?Xt*Xt:0}}C($e,0,0,Mt,Gt,Mt,this.f,this.v,this.z),C(Ge,Oe,Oe,rt,vt,Mt,this.f,this.v,this.z);for(let tt=0;tt1&&(vt=L[++rt]);let Gt=Math.abs(Mt-vt.left),Ht=Math.abs(Mt-vt.right),fr=Math.min(Gt,Ht),wr,Le=Te/de*(pe+1);if(vt.isDash){let Oe=pe-Math.abs(Le);wr=Math.sqrt(fr*fr+Oe*Oe)}else wr=pe-Math.sqrt(fr*fr+Le*Le);this.data[Ze+Mt]=Math.max(0,Math.min(255,wr+128))}}}addRegularDash(L){for(let rt=L.length-1;rt>=0;--rt){let vt=L[rt],Mt=L[rt+1];vt.zeroLength?L.splice(rt,1):Mt&&Mt.isDash===vt.isDash&&(Mt.left=vt.left,L.splice(rt,1))}let J=L[0],de=L[L.length-1];J.isDash===de.isDash&&(J.left=de.left-this.width,de.right=J.right+this.width);let pe=this.width*this.nextRow,Te=0,Ze=L[Te];for(let rt=0;rt1&&(Ze=L[++Te]);let vt=Math.abs(rt-Ze.left),Mt=Math.abs(rt-Ze.right),Gt=Math.min(vt,Mt);this.data[pe+rt]=Math.max(0,Math.min(255,(Ze.isDash?Gt:-Gt)+128))}}addDash(L,J){let de=J?7:0,pe=2*de+1;if(this.nextRow+pe>this.height)return e.w("LineAtlas out of space"),null;let Te=0;for(let rt=0;rt{J.terminate()}),this.workers=null)}isPreloaded(){return!!this.active[Y]}numActive(){return Object.keys(this.active).length}}let te=Math.floor(n.hardwareConcurrency/2),ae,U;function H(){return ae||(ae=new ee),ae}ee.workerCount=e.C(globalThis)?Math.max(Math.min(te,3),1):1;class K{constructor(L,J){this.workerPool=L,this.actors=[],this.currentActor=0,this.id=J;let de=this.workerPool.acquire(J);for(let pe=0;pe{J.remove()}),this.actors=[],L&&this.workerPool.release(this.id)}registerMessageHandler(L,J){for(let de of this.actors)de.registerMessageHandler(L,J)}}function V(){return U||(U=new K(H(),e.G),U.registerMessageHandler("GR",(Me,L,J)=>e.m(L,J))),U}function $(Me,L){let J=e.H();return e.J(J,J,[1,1,0]),e.K(J,J,[.5*Me.width,.5*Me.height,1]),e.L(J,J,Me.calculatePosMatrix(L.toUnwrapped()))}function X(Me,L,J,de,pe,Te){let Ze=function(Ht,fr,wr){if(Ht)for(let Le of Ht){let Oe=fr[Le];if(Oe&&Oe.source===wr&&Oe.type==="fill-extrusion")return!0}else for(let Le in fr){let Oe=fr[Le];if(Oe.source===wr&&Oe.type==="fill-extrusion")return!0}return!1}(pe&&pe.layers,L,Me.id),rt=Te.maxPitchScaleFactor(),vt=Me.tilesIn(de,rt,Ze);vt.sort(Z);let Mt=[];for(let Ht of vt)Mt.push({wrappedTileID:Ht.tileID.wrapped().key,queryResults:Ht.tile.queryRenderedFeatures(L,J,Me._state,Ht.queryGeometry,Ht.cameraQueryGeometry,Ht.scale,pe,Te,rt,$(Me.transform,Ht.tileID))});let Gt=function(Ht){let fr={},wr={};for(let Le of Ht){let Oe=Le.queryResults,Ge=Le.wrappedTileID,$e=wr[Ge]=wr[Ge]||{};for(let lt in Oe){let tt=Oe[lt],dt=$e[lt]=$e[lt]||{},Rt=fr[lt]=fr[lt]||[];for(let Ot of tt)dt[Ot.featureIndex]||(dt[Ot.featureIndex]=!0,Rt.push(Ot))}}return fr}(Mt);for(let Ht in Gt)Gt[Ht].forEach(fr=>{let wr=fr.feature,Le=Me.getFeatureState(wr.layer["source-layer"],wr.id);wr.source=wr.layer.source,wr.layer["source-layer"]&&(wr.sourceLayer=wr.layer["source-layer"]),wr.state=Le});return Gt}function Z(Me,L){let J=Me.tileID,de=L.tileID;return J.overscaledZ-de.overscaledZ||J.canonical.y-de.canonical.y||J.wrap-de.wrap||J.canonical.x-de.canonical.x}function Q(Me,L,J){return e._(this,void 0,void 0,function*(){let de=Me;if(Me.url?de=(yield e.h(L.transformRequest(Me.url,"Source"),J)).data:yield n.frameAsync(J),!de)return null;let pe=e.M(e.e(de,Me),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in de&&de.vector_layers&&(pe.vectorLayerIds=de.vector_layers.map(Te=>Te.id)),pe})}class re{constructor(L,J){L&&(J?this.setSouthWest(L).setNorthEast(J):Array.isArray(L)&&(L.length===4?this.setSouthWest([L[0],L[1]]).setNorthEast([L[2],L[3]]):this.setSouthWest(L[0]).setNorthEast(L[1])))}setNorthEast(L){return this._ne=L instanceof e.N?new e.N(L.lng,L.lat):e.N.convert(L),this}setSouthWest(L){return this._sw=L instanceof e.N?new e.N(L.lng,L.lat):e.N.convert(L),this}extend(L){let J=this._sw,de=this._ne,pe,Te;if(L instanceof e.N)pe=L,Te=L;else{if(!(L instanceof re))return Array.isArray(L)?L.length===4||L.every(Array.isArray)?this.extend(re.convert(L)):this.extend(e.N.convert(L)):L&&("lng"in L||"lon"in L)&&"lat"in L?this.extend(e.N.convert(L)):this;if(pe=L._sw,Te=L._ne,!pe||!Te)return this}return J||de?(J.lng=Math.min(pe.lng,J.lng),J.lat=Math.min(pe.lat,J.lat),de.lng=Math.max(Te.lng,de.lng),de.lat=Math.max(Te.lat,de.lat)):(this._sw=new e.N(pe.lng,pe.lat),this._ne=new e.N(Te.lng,Te.lat)),this}getCenter(){return new e.N((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.N(this.getWest(),this.getNorth())}getSouthEast(){return new e.N(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(L){let{lng:J,lat:de}=e.N.convert(L),pe=this._sw.lng<=J&&J<=this._ne.lng;return this._sw.lng>this._ne.lng&&(pe=this._sw.lng>=J&&J>=this._ne.lng),this._sw.lat<=de&&de<=this._ne.lat&&pe}static convert(L){return L instanceof re?L:L&&new re(L)}static fromLngLat(L,J=0){let de=360*J/40075017,pe=de/Math.cos(Math.PI/180*L.lat);return new re(new e.N(L.lng-pe,L.lat-de),new e.N(L.lng+pe,L.lat+de))}adjustAntiMeridian(){let L=new e.N(this._sw.lng,this._sw.lat),J=new e.N(this._ne.lng,this._ne.lat);return new re(L,L.lng>J.lng?new e.N(J.lng+360,J.lat):J)}}class ce{constructor(L,J,de){this.bounds=re.convert(this.validateBounds(L)),this.minzoom=J||0,this.maxzoom=de||24}validateBounds(L){return Array.isArray(L)&&L.length===4?[Math.max(-180,L[0]),Math.max(-90,L[1]),Math.min(180,L[2]),Math.min(90,L[3])]:[-180,-90,180,90]}contains(L){let J=Math.pow(2,L.z),de=Math.floor(e.O(this.bounds.getWest())*J),pe=Math.floor(e.Q(this.bounds.getNorth())*J),Te=Math.ceil(e.O(this.bounds.getEast())*J),Ze=Math.ceil(e.Q(this.bounds.getSouth())*J);return L.x>=de&&L.x=pe&&L.y{this._options.tiles=L}),this}setUrl(L){return this.setSourceProperty(()=>{this.url=L,this._options.url=L}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(L){return e._(this,void 0,void 0,function*(){let J=L.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),de={request:this.map._requestManager.transformRequest(J,"Tile"),uid:L.uid,tileID:L.tileID,zoom:L.tileID.overscaledZ,tileSize:this.tileSize*L.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};de.request.collectResourceTiming=this._collectResourceTiming;let pe="RT";if(L.actor&&L.state!=="expired"){if(L.state==="loading")return new Promise((Te,Ze)=>{L.reloadPromise={resolve:Te,reject:Ze}})}else L.actor=this.dispatcher.getActor(),pe="LT";L.abortController=new AbortController;try{let Te=yield L.actor.sendAsync({type:pe,data:de},L.abortController);if(delete L.abortController,L.aborted)return;this._afterTileLoadWorkerResponse(L,Te)}catch(Te){if(delete L.abortController,L.aborted)return;if(Te&&Te.status!==404)throw Te;this._afterTileLoadWorkerResponse(L,null)}})}_afterTileLoadWorkerResponse(L,J){if(J&&J.resourceTiming&&(L.resourceTiming=J.resourceTiming),J&&this.map._refreshExpiredTiles&&L.setExpiryData(J),L.loadVectorData(J,this.map.painter),L.reloadPromise){let de=L.reloadPromise;L.reloadPromise=null,this.loadTile(L).then(de.resolve).catch(de.reject)}}abortTile(L){return e._(this,void 0,void 0,function*(){L.abortController&&(L.abortController.abort(),delete L.abortController),L.actor&&(yield L.actor.sendAsync({type:"AT",data:{uid:L.uid,type:this.type,source:this.id}}))})}unloadTile(L){return e._(this,void 0,void 0,function*(){L.unloadVectorData(),L.actor&&(yield L.actor.sendAsync({type:"RMT",data:{uid:L.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ye extends e.E{constructor(L,J,de,pe){super(),this.id=L,this.dispatcher=de,this.setEventedParent(pe),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},J),e.e(this,e.M(J,["url","scheme","tileSize"]))}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let L=yield Q(this._options,this.map._requestManager,this._tileJSONRequest);this._tileJSONRequest=null,this._loaded=!0,L&&(e.e(this,L),L.bounds&&(this.tileBounds=new ce(L.bounds,this.minzoom,this.maxzoom)),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})))}catch(L){this._tileJSONRequest=null,this.fire(new e.j(L))}})}loaded(){return this._loaded}onAdd(L){this.map=L,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(L){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),L(),this.load()}setTiles(L){return this.setSourceProperty(()=>{this._options.tiles=L}),this}setUrl(L){return this.setSourceProperty(()=>{this.url=L,this._options.url=L}),this}serialize(){return e.e({},this._options)}hasTile(L){return!this.tileBounds||this.tileBounds.contains(L.canonical)}loadTile(L){return e._(this,void 0,void 0,function*(){let J=L.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);L.abortController=new AbortController;try{let de=yield o.getImage(this.map._requestManager.transformRequest(J,"Tile"),L.abortController,this.map._refreshExpiredTiles);if(delete L.abortController,L.aborted)return void(L.state="unloaded");if(de&&de.data){this.map._refreshExpiredTiles&&de.cacheControl&&de.expires&&L.setExpiryData({cacheControl:de.cacheControl,expires:de.expires});let pe=this.map.painter.context,Te=pe.gl,Ze=de.data;L.texture=this.map.painter.getTileTexture(Ze.width),L.texture?L.texture.update(Ze,{useMipmap:!0}):(L.texture=new h(pe,Ze,Te.RGBA,{useMipmap:!0}),L.texture.bind(Te.LINEAR,Te.CLAMP_TO_EDGE,Te.LINEAR_MIPMAP_NEAREST)),L.state="loaded"}}catch(de){if(delete L.abortController,L.aborted)L.state="unloaded";else if(de)throw L.state="errored",de}})}abortTile(L){return e._(this,void 0,void 0,function*(){L.abortController&&(L.abortController.abort(),delete L.abortController)})}unloadTile(L){return e._(this,void 0,void 0,function*(){L.texture&&this.map.painter.saveTileTexture(L.texture)})}hasTransition(){return!1}}class Ae extends ye{constructor(L,J,de,pe){super(L,J,de,pe),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},J),this.encoding=J.encoding||"mapbox",this.redFactor=J.redFactor,this.greenFactor=J.greenFactor,this.blueFactor=J.blueFactor,this.baseShift=J.baseShift}loadTile(L){return e._(this,void 0,void 0,function*(){let J=L.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),de=this.map._requestManager.transformRequest(J,"Tile");L.neighboringTiles=this._getNeighboringTiles(L.tileID),L.abortController=new AbortController;try{let pe=yield o.getImage(de,L.abortController,this.map._refreshExpiredTiles);if(delete L.abortController,L.aborted)return void(L.state="unloaded");if(pe&&pe.data){let Te=pe.data;this.map._refreshExpiredTiles&&pe.cacheControl&&pe.expires&&L.setExpiryData({cacheControl:pe.cacheControl,expires:pe.expires});let Ze=e.b(Te)&&e.U()?Te:yield this.readImageNow(Te),rt={type:this.type,uid:L.uid,source:this.id,rawImageData:Ze,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(!L.actor||L.state==="expired"){L.actor=this.dispatcher.getActor();let vt=yield L.actor.sendAsync({type:"LDT",data:rt});L.dem=vt,L.needsHillshadePrepare=!0,L.needsTerrainPrepare=!0,L.state="loaded"}}}catch(pe){if(delete L.abortController,L.aborted)L.state="unloaded";else if(pe)throw L.state="errored",pe}})}readImageNow(L){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.V()){let J=L.width+2,de=L.height+2;try{return new e.R({width:J,height:de},yield e.W(L,-1,-1,J,de))}catch{}}return n.getImageData(L,1)})}_getNeighboringTiles(L){let J=L.canonical,de=Math.pow(2,J.z),pe=(J.x-1+de)%de,Te=J.x===0?L.wrap-1:L.wrap,Ze=(J.x+1+de)%de,rt=J.x+1===de?L.wrap+1:L.wrap,vt={};return vt[new e.S(L.overscaledZ,Te,J.z,pe,J.y).key]={backfilled:!1},vt[new e.S(L.overscaledZ,rt,J.z,Ze,J.y).key]={backfilled:!1},J.y>0&&(vt[new e.S(L.overscaledZ,Te,J.z,pe,J.y-1).key]={backfilled:!1},vt[new e.S(L.overscaledZ,L.wrap,J.z,J.x,J.y-1).key]={backfilled:!1},vt[new e.S(L.overscaledZ,rt,J.z,Ze,J.y-1).key]={backfilled:!1}),J.y+10&&e.e(Te,{resourceTiming:pe}),this.fire(new e.k("data",Object.assign(Object.assign({},Te),{sourceDataType:"metadata"}))),this.fire(new e.k("data",Object.assign(Object.assign({},Te),{sourceDataType:"content"})))}catch(de){if(this._pendingLoads--,this._removed)return void this.fire(new e.k("dataabort",{dataType:"source"}));this.fire(new e.j(de))}})}loaded(){return this._pendingLoads===0}loadTile(L){return e._(this,void 0,void 0,function*(){let J=L.actor?"RT":"LT";L.actor=this.actor;let de={type:this.type,uid:L.uid,tileID:L.tileID,zoom:L.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};L.abortController=new AbortController;let pe=yield this.actor.sendAsync({type:J,data:de},L.abortController);delete L.abortController,L.unloadVectorData(),L.aborted||L.loadVectorData(pe,this.map.painter,J==="RT")})}abortTile(L){return e._(this,void 0,void 0,function*(){L.abortController&&(L.abortController.abort(),delete L.abortController),L.aborted=!0})}unloadTile(L){return e._(this,void 0,void 0,function*(){L.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:L.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data})}hasTransition(){return!1}}var Ce=e.Y([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class qe extends e.E{constructor(L,J,de,pe){super(),this.id=L,this.dispatcher=de,this.coordinates=J.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(pe),this.options=J}load(L){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.k("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let J=yield o.getImage(this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,J&&J.data&&(this.image=J.data,L&&(this.coordinates=L),this._finishLoading())}catch(J){this._request=null,this._loaded=!0,this.fire(new e.j(J))}})}loaded(){return this._loaded}updateImage(L){return L.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=L.url,this.load(L.coordinates).finally(()=>{this.texture=null}),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.k("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(L){this.map=L,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(L){this.coordinates=L;let J=L.map(e.Z.fromLngLat);this.tileID=function(pe){let Te=1/0,Ze=1/0,rt=-1/0,vt=-1/0;for(let fr of pe)Te=Math.min(Te,fr.x),Ze=Math.min(Ze,fr.y),rt=Math.max(rt,fr.x),vt=Math.max(vt,fr.y);let Mt=Math.max(rt-Te,vt-Ze),Gt=Math.max(0,Math.floor(-Math.log(Mt)/Math.LN2)),Ht=Math.pow(2,Gt);return new e.a1(Gt,Math.floor((Te+rt)/2*Ht),Math.floor((Ze+vt)/2*Ht))}(J),this.minzoom=this.maxzoom=this.tileID.z;let de=J.map(pe=>this.tileID.getTilePoint(pe)._round());return this._boundsArray=new e.$,this._boundsArray.emplaceBack(de[0].x,de[0].y,0,0),this._boundsArray.emplaceBack(de[1].x,de[1].y,e.X,0),this._boundsArray.emplaceBack(de[3].x,de[3].y,0,e.X),this._boundsArray.emplaceBack(de[2].x,de[2].y,e.X,e.X),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new e.k("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let L=this.map.painter.context,J=L.gl;this.boundsBuffer||(this.boundsBuffer=L.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture||(this.texture=new h(L,this.image,J.RGBA),this.texture.bind(J.LINEAR,J.CLAMP_TO_EDGE));let de=!1;for(let pe in this.tiles){let Te=this.tiles[pe];Te.state!=="loaded"&&(Te.state="loaded",Te.texture=this.texture,de=!0)}de&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(L){return e._(this,void 0,void 0,function*(){this.tileID&&this.tileID.equals(L.tileID.canonical)?(this.tiles[String(L.tileID.wrap)]=L,L.buckets={}):L.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}}class Ue extends qe{constructor(L,J,de,pe){super(L,J,de,pe),this.roundZoom=!0,this.type="video",this.options=J}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let L=this.options;this.urls=[];for(let J of L.urls)this.urls.push(this.map._requestManager.transformRequest(J,"Source").url);try{let J=yield e.a3(this.urls);if(this._loaded=!0,!J)return;this.video=J,this.video.loop=!0,this.video.addEventListener("playing",()=>{this.map.triggerRepaint()}),this.map&&this.video.play(),this._finishLoading()}catch(J){this.fire(new e.j(J))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(L){if(this.video){let J=this.video.seekable;LJ.end(0)?this.fire(new e.j(new e.a2(`sources.${this.id}`,null,`Playback for this video can be set only between the ${J.start(0)} and ${J.end(0)}-second mark.`))):this.video.currentTime=L}}getVideo(){return this.video}onAdd(L){this.map||(this.map=L,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let L=this.map.painter.context,J=L.gl;this.boundsBuffer||(this.boundsBuffer=L.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(J.LINEAR,J.CLAMP_TO_EDGE),J.texSubImage2D(J.TEXTURE_2D,0,0,0,J.RGBA,J.UNSIGNED_BYTE,this.video)):(this.texture=new h(L,this.video,J.RGBA),this.texture.bind(J.LINEAR,J.CLAMP_TO_EDGE));let de=!1;for(let pe in this.tiles){let Te=this.tiles[pe];Te.state!=="loaded"&&(Te.state="loaded",Te.texture=this.texture,de=!0)}de&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class xe extends qe{constructor(L,J,de,pe){super(L,J,de,pe),J.coordinates?Array.isArray(J.coordinates)&&J.coordinates.length===4&&!J.coordinates.some(Te=>!Array.isArray(Te)||Te.length!==2||Te.some(Ze=>typeof Ze!="number"))||this.fire(new e.j(new e.a2(`sources.${L}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.j(new e.a2(`sources.${L}`,null,'missing required property "coordinates"'))),J.animate&&typeof J.animate!="boolean"&&this.fire(new e.j(new e.a2(`sources.${L}`,null,'optional "animate" property must be a boolean value'))),J.canvas?typeof J.canvas=="string"||J.canvas instanceof HTMLCanvasElement||this.fire(new e.j(new e.a2(`sources.${L}`,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 e.j(new e.a2(`sources.${L}`,null,'missing required property "canvas"'))),this.options=J,this.animate=J.animate===void 0||J.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.j(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())})}getCanvas(){return this.canvas}onAdd(L){this.map=L,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let L=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,L=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,L=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let J=this.map.painter.context,de=J.gl;this.boundsBuffer||(this.boundsBuffer=J.createVertexBuffer(this._boundsArray,Ce.members)),this.boundsSegments||(this.boundsSegments=e.a0.simpleSegment(0,0,4,2)),this.texture?(L||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new h(J,this.canvas,de.RGBA,{premultiply:!0});let pe=!1;for(let Te in this.tiles){let Ze=this.tiles[Te];Ze.state!=="loaded"&&(Ze.state="loaded",Ze.texture=this.texture,pe=!0)}pe&&this.fire(new e.k("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let L of[this.canvas.width,this.canvas.height])if(isNaN(L)||L<=0)return!0;return!1}}let he={},oe=Me=>{switch(Me){case"geojson":return Se;case"image":return qe;case"raster":return ye;case"raster-dem":return Ae;case"vector":return me;case"video":return Ue;case"canvas":return xe}return he[Me]},le="RTLPluginLoaded";class ne extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=V()}_syncState(L){return this.status=L,this.dispatcher.broadcast("SRPS",{pluginStatus:L,pluginURL:this.url}).catch(J=>{throw this.status="error",J})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(L){return e._(this,arguments,void 0,function*(J,de=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=n.resolveURL(J),!this.url)throw new Error(`requested url ${J} is invalid`);if(this.status==="unavailable"){if(!de)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.k(le))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let be=null;function Fe(){return be||(be=new ne),be}class Ve{constructor(L,J){this.timeAdded=0,this.fadeEndTime=0,this.tileID=L,this.uid=e.a4(),this.uses=0,this.tileSize=J,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttCoords={},this.expiredRequestCount=0,this.state="loading"}registerFadeDuration(L){let J=L+this.timeAdded;JTe.getLayer(Mt)).filter(Boolean);if(vt.length!==0){rt.layers=vt,rt.stateDependentLayerIds&&(rt.stateDependentLayers=rt.stateDependentLayerIds.map(Mt=>vt.filter(Gt=>Gt.id===Mt)[0]));for(let Mt of vt)Ze[Mt.id]=rt}}return Ze}(L.buckets,J.style),this.hasSymbolBuckets=!1;for(let pe in this.buckets){let Te=this.buckets[pe];if(Te instanceof e.a6){if(this.hasSymbolBuckets=!0,!de)break;Te.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let pe in this.buckets){let Te=this.buckets[pe];if(Te instanceof e.a6&&Te.hasRTLText){this.hasRTLText=!0,Fe().lazyLoad();break}}this.queryPadding=0;for(let pe in this.buckets){let Te=this.buckets[pe];this.queryPadding=Math.max(this.queryPadding,J.style.getLayer(pe).queryRadius(Te))}L.imageAtlas&&(this.imageAtlas=L.imageAtlas),L.glyphAtlasImage&&(this.glyphAtlasImage=L.glyphAtlasImage)}else this.collisionBoxArray=new e.a5}unloadVectorData(){for(let L in this.buckets)this.buckets[L].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"}getBucket(L){return this.buckets[L.id]}upload(L){for(let de in this.buckets){let pe=this.buckets[de];pe.uploadPending()&&pe.upload(L)}let J=L.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new h(L,this.imageAtlas.image,J.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new h(L,this.glyphAtlasImage,J.ALPHA),this.glyphAtlasImage=null)}prepare(L){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(L,this.imageAtlasTexture)}queryRenderedFeatures(L,J,de,pe,Te,Ze,rt,vt,Mt,Gt){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:pe,cameraQueryGeometry:Te,scale:Ze,tileSize:this.tileSize,pixelPosMatrix:Gt,transform:vt,params:rt,queryPadding:this.queryPadding*Mt},L,J,de):{}}querySourceFeatures(L,J){let de=this.latestFeatureIndex;if(!de||!de.rawTileData)return;let pe=de.loadVTLayers(),Te=J&&J.sourceLayer?J.sourceLayer:"",Ze=pe._geojsonTileLayer||pe[Te];if(!Ze)return;let rt=e.a7(J&&J.filter),{z:vt,x:Mt,y:Gt}=this.tileID.canonical,Ht={z:vt,x:Mt,y:Gt};for(let fr=0;frde)pe=!1;else if(J)if(this.expirationTime{this.remove(L,Te)},de)),this.data[pe].push(Te),this.order.push(pe),this.order.length>this.max){let Ze=this._getAndRemoveByKey(this.order[0]);Ze&&this.onRemove(Ze)}return this}has(L){return L.wrapped().key in this.data}getAndRemove(L){return this.has(L)?this._getAndRemoveByKey(L.wrapped().key):null}_getAndRemoveByKey(L){let J=this.data[L].shift();return J.timeout&&clearTimeout(J.timeout),this.data[L].length===0&&delete this.data[L],this.order.splice(this.order.indexOf(L),1),J.value}getByKey(L){let J=this.data[L];return J?J[0].value:null}get(L){return this.has(L)?this.data[L.wrapped().key][0].value:null}remove(L,J){if(!this.has(L))return this;let de=L.wrapped().key,pe=J===void 0?0:this.data[de].indexOf(J),Te=this.data[de][pe];return this.data[de].splice(pe,1),Te.timeout&&clearTimeout(Te.timeout),this.data[de].length===0&&delete this.data[de],this.onRemove(Te.value),this.order.splice(this.order.indexOf(de),1),this}setMaxSize(L){for(this.max=L;this.order.length>this.max;){let J=this._getAndRemoveByKey(this.order[0]);J&&this.onRemove(J)}return this}filter(L){let J=[];for(let de in this.data)for(let pe of this.data[de])L(pe.value)||J.push(pe);for(let de of J)this.remove(de.value.tileID,de)}}class ut{constructor(){this.state={},this.stateChanges={},this.deletedStates={}}updateState(L,J,de){let pe=String(J);if(this.stateChanges[L]=this.stateChanges[L]||{},this.stateChanges[L][pe]=this.stateChanges[L][pe]||{},e.e(this.stateChanges[L][pe],de),this.deletedStates[L]===null){this.deletedStates[L]={};for(let Te in this.state[L])Te!==pe&&(this.deletedStates[L][Te]=null)}else if(this.deletedStates[L]&&this.deletedStates[L][pe]===null){this.deletedStates[L][pe]={};for(let Te in this.state[L][pe])de[Te]||(this.deletedStates[L][pe][Te]=null)}else for(let Te in de)this.deletedStates[L]&&this.deletedStates[L][pe]&&this.deletedStates[L][pe][Te]===null&&delete this.deletedStates[L][pe][Te]}removeFeatureState(L,J,de){if(this.deletedStates[L]===null)return;let pe=String(J);if(this.deletedStates[L]=this.deletedStates[L]||{},de&&J!==void 0)this.deletedStates[L][pe]!==null&&(this.deletedStates[L][pe]=this.deletedStates[L][pe]||{},this.deletedStates[L][pe][de]=null);else if(J!==void 0)if(this.stateChanges[L]&&this.stateChanges[L][pe])for(de in this.deletedStates[L][pe]={},this.stateChanges[L][pe])this.deletedStates[L][pe][de]=null;else this.deletedStates[L][pe]=null;else this.deletedStates[L]=null}getState(L,J){let de=String(J),pe=e.e({},(this.state[L]||{})[de],(this.stateChanges[L]||{})[de]);if(this.deletedStates[L]===null)return{};if(this.deletedStates[L]){let Te=this.deletedStates[L][J];if(Te===null)return{};for(let Ze in Te)delete pe[Ze]}return pe}initializeTileState(L,J){L.setFeatureState(this.state,J)}coalesceChanges(L,J){let de={};for(let pe in this.stateChanges){this.state[pe]=this.state[pe]||{};let Te={};for(let Ze in this.stateChanges[pe])this.state[pe][Ze]||(this.state[pe][Ze]={}),e.e(this.state[pe][Ze],this.stateChanges[pe][Ze]),Te[Ze]=this.state[pe][Ze];de[pe]=Te}for(let pe in this.deletedStates){this.state[pe]=this.state[pe]||{};let Te={};if(this.deletedStates[pe]===null)for(let Ze in this.state[pe])Te[Ze]={},this.state[pe][Ze]={};else for(let Ze in this.deletedStates[pe]){if(this.deletedStates[pe][Ze]===null)this.state[pe][Ze]={};else for(let rt of Object.keys(this.deletedStates[pe][Ze]))delete this.state[pe][Ze][rt];Te[Ze]=this.state[pe][Ze]}de[pe]=de[pe]||{},e.e(de[pe],Te)}if(this.stateChanges={},this.deletedStates={},Object.keys(de).length!==0)for(let pe in L)L[pe].setFeatureState(de,J)}}class st extends e.E{constructor(L,J,de){super(),this.id=L,this.dispatcher=de,this.on("data",pe=>this._dataHandler(pe)),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((pe,Te,Ze,rt)=>{let vt=new(oe(Te.type))(pe,Te,Ze,rt);if(vt.id!==pe)throw new Error(`Expected Source id to be ${pe} instead of ${vt.id}`);return vt})(L,J,de,this),this._tiles={},this._cache=new je(0,pe=>this._unloadTile(pe)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new ut,this._didEmitContent=!1,this._updated=!1}onAdd(L){this.map=L,this._maxTileCacheSize=L?L._maxTileCacheSize:null,this._maxTileCacheZoomLevels=L?L._maxTileCacheZoomLevels:null,this._source&&this._source.onAdd&&this._source.onAdd(L)}onRemove(L){this.clearTiles(),this._source&&this._source.onRemove&&this._source.onRemove(L)}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let L in this._tiles){let J=this._tiles[L];if(J.state!=="loaded"&&J.state!=="errored")return!1}return!0}getSource(){return this._source}pause(){this._paused=!0}resume(){if(!this._paused)return;let L=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,L&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(L,J,de){return e._(this,void 0,void 0,function*(){try{yield this._source.loadTile(L),this._tileLoaded(L,J,de)}catch(pe){L.state="errored",pe.status!==404?this._source.fire(new e.j(pe,{tile:L})):this.update(this.transform,this.terrain)}})}_unloadTile(L){this._source.unloadTile&&this._source.unloadTile(L)}_abortTile(L){this._source.abortTile&&this._source.abortTile(L),this._source.fire(new e.k("dataabort",{tile:L,coord:L.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(L){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null);for(let J in this._tiles){let de=this._tiles[J];de.upload(L),de.prepare(this.map.style.imageManager)}}getIds(){return Object.values(this._tiles).map(L=>L.tileID).sort(yt).map(L=>L.key)}getRenderableIds(L){let J=[];for(let de in this._tiles)this._isIdRenderable(de,L)&&J.push(this._tiles[de]);return L?J.sort((de,pe)=>{let Te=de.tileID,Ze=pe.tileID,rt=new e.P(Te.canonical.x,Te.canonical.y)._rotate(this.transform.angle),vt=new e.P(Ze.canonical.x,Ze.canonical.y)._rotate(this.transform.angle);return Te.overscaledZ-Ze.overscaledZ||vt.y-rt.y||vt.x-rt.x}).map(de=>de.tileID.key):J.map(de=>de.tileID).sort(yt).map(de=>de.key)}hasRenderableParent(L){let J=this.findLoadedParent(L,0);return!!J&&this._isIdRenderable(J.tileID.key)}_isIdRenderable(L,J){return this._tiles[L]&&this._tiles[L].hasData()&&!this._coveredTiles[L]&&(J||!this._tiles[L].holdingForFade())}reload(){if(this._paused)this._shouldReloadOnResume=!0;else{this._cache.reset();for(let L in this._tiles)this._tiles[L].state!=="errored"&&this._reloadTile(L,"reloading")}}_reloadTile(L,J){return e._(this,void 0,void 0,function*(){let de=this._tiles[L];de&&(de.state!=="loading"&&(de.state=J),yield this._loadTile(de,L,J))})}_tileLoaded(L,J,de){L.timeAdded=n.now(),de==="expired"&&(L.refreshedUponExpiration=!0),this._setTileReloadTimer(J,L),this.getSource().type==="raster-dem"&&L.dem&&this._backfillDEM(L),this._state.initializeTileState(L,this.map?this.map.painter:null),L.aborted||this._source.fire(new e.k("data",{dataType:"source",tile:L,coord:L.tileID}))}_backfillDEM(L){let J=this.getRenderableIds();for(let pe=0;pe1||(Math.abs(Ze)>1&&(Math.abs(Ze+vt)===1?Ze+=vt:Math.abs(Ze-vt)===1&&(Ze-=vt)),Te.dem&&pe.dem&&(pe.dem.backfillBorder(Te.dem,Ze,rt),pe.neighboringTiles&&pe.neighboringTiles[Mt]&&(pe.neighboringTiles[Mt].backfilled=!0)))}}getTile(L){return this.getTileByID(L.key)}getTileByID(L){return this._tiles[L]}_retainLoadedChildren(L,J,de,pe){for(let Te in this._tiles){let Ze=this._tiles[Te];if(pe[Te]||!Ze.hasData()||Ze.tileID.overscaledZ<=J||Ze.tileID.overscaledZ>de)continue;let rt=Ze.tileID;for(;Ze&&Ze.tileID.overscaledZ>J+1;){let Mt=Ze.tileID.scaledTo(Ze.tileID.overscaledZ-1);Ze=this._tiles[Mt.key],Ze&&Ze.hasData()&&(rt=Mt)}let vt=rt;for(;vt.overscaledZ>J;)if(vt=vt.scaledTo(vt.overscaledZ-1),L[vt.key]){pe[rt.key]=rt;break}}}findLoadedParent(L,J){if(L.key in this._loadedParentTiles){let de=this._loadedParentTiles[L.key];return de&&de.tileID.overscaledZ>=J?de:null}for(let de=L.overscaledZ-1;de>=J;de--){let pe=L.scaledTo(de),Te=this._getLoadedTile(pe);if(Te)return Te}}findLoadedSibling(L){return this._getLoadedTile(L)}_getLoadedTile(L){let J=this._tiles[L.key];return J&&J.hasData()?J:this._cache.getByKey(L.wrapped().key)}updateCacheSize(L){let J=Math.ceil(L.width/this._source.tileSize)+1,de=Math.ceil(L.height/this._source.tileSize)+1,pe=Math.floor(J*de*(this._maxTileCacheZoomLevels===null?e.a.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),Te=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,pe):pe;this._cache.setMaxSize(Te)}handleWrapJump(L){let J=Math.round((L-(this._prevLng===void 0?L:this._prevLng))/360);if(this._prevLng=L,J){let de={};for(let pe in this._tiles){let Te=this._tiles[pe];Te.tileID=Te.tileID.unwrapTo(Te.tileID.wrap+J),de[Te.tileID.key]=Te}this._tiles=de;for(let pe in this._timers)clearTimeout(this._timers[pe]),delete this._timers[pe];for(let pe in this._tiles)this._setTileReloadTimer(pe,this._tiles[pe])}}_updateCoveredAndRetainedTiles(L,J,de,pe,Te,Ze){let rt={},vt={},Mt=Object.keys(L),Gt=n.now();for(let Ht of Mt){let fr=L[Ht],wr=this._tiles[Ht];if(!wr||wr.fadeEndTime!==0&&wr.fadeEndTime<=Gt)continue;let Le=this.findLoadedParent(fr,J),Oe=this.findLoadedSibling(fr),Ge=Le||Oe||null;Ge&&(this._addTile(Ge.tileID),rt[Ge.tileID.key]=Ge.tileID),vt[Ht]=fr}this._retainLoadedChildren(vt,pe,de,L);for(let Ht in rt)L[Ht]||(this._coveredTiles[Ht]=!0,L[Ht]=rt[Ht]);if(Ze){let Ht={},fr={};for(let wr of Te)this._tiles[wr.key].hasData()?Ht[wr.key]=wr:fr[wr.key]=wr;for(let wr in fr){let Le=fr[wr].children(this._source.maxzoom);this._tiles[Le[0].key]&&this._tiles[Le[1].key]&&this._tiles[Le[2].key]&&this._tiles[Le[3].key]&&(Ht[Le[0].key]=L[Le[0].key]=Le[0],Ht[Le[1].key]=L[Le[1].key]=Le[1],Ht[Le[2].key]=L[Le[2].key]=Le[2],Ht[Le[3].key]=L[Le[3].key]=Le[3],delete fr[wr])}for(let wr in fr){let Le=fr[wr],Oe=this.findLoadedParent(Le,this._source.minzoom),Ge=this.findLoadedSibling(Le),$e=Oe||Ge||null;if($e){Ht[$e.tileID.key]=L[$e.tileID.key]=$e.tileID;for(let lt in Ht)Ht[lt].isChildOf($e.tileID)&&delete Ht[lt]}}for(let wr in this._tiles)Ht[wr]||(this._coveredTiles[wr]=!0)}}update(L,J){if(!this._sourceLoaded||this._paused)return;let de;this.transform=L,this.terrain=J,this.updateCacheSize(L),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used||this.usedForTerrain?this._source.tileID?de=L.getVisibleUnwrappedCoordinates(this._source.tileID).map(Gt=>new e.S(Gt.canonical.z,Gt.wrap,Gt.canonical.z,Gt.canonical.x,Gt.canonical.y)):(de=L.coveringTiles({tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:J}),this._source.hasTile&&(de=de.filter(Gt=>this._source.hasTile(Gt)))):de=[];let pe=L.coveringZoomLevel(this._source),Te=Math.max(pe-st.maxOverzooming,this._source.minzoom),Ze=Math.max(pe+st.maxUnderzooming,this._source.minzoom);if(this.usedForTerrain){let Gt={};for(let Ht of de)if(Ht.canonical.z>this._source.minzoom){let fr=Ht.scaledTo(Ht.canonical.z-1);Gt[fr.key]=fr;let wr=Ht.scaledTo(Math.max(this._source.minzoom,Math.min(Ht.canonical.z,5)));Gt[wr.key]=wr}de=de.concat(Object.values(Gt))}let rt=de.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,rt&&this.fire(new e.k("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let vt=this._updateRetainedTiles(de,pe);At(this._source.type)&&this._updateCoveredAndRetainedTiles(vt,Te,Ze,pe,de,J);for(let Gt in vt)this._tiles[Gt].clearFadeHold();let Mt=e.ab(this._tiles,vt);for(let Gt of Mt){let Ht=this._tiles[Gt];Ht.hasSymbolBuckets&&!Ht.holdingForFade()?Ht.setHoldDuration(this.map._fadeDuration):Ht.hasSymbolBuckets&&!Ht.symbolFadeFinished()||this._removeTile(Gt)}this._updateLoadedParentTileCache(),this._updateLoadedSiblingTileCache()}releaseSymbolFadeTiles(){for(let L in this._tiles)this._tiles[L].holdingForFade()&&this._removeTile(L)}_updateRetainedTiles(L,J){var de;let pe={},Te={},Ze=Math.max(J-st.maxOverzooming,this._source.minzoom),rt=Math.max(J+st.maxUnderzooming,this._source.minzoom),vt={};for(let Mt of L){let Gt=this._addTile(Mt);pe[Mt.key]=Mt,Gt.hasData()||Jthis._source.maxzoom){let fr=Mt.children(this._source.maxzoom)[0],wr=this.getTile(fr);if(wr&&wr.hasData()){pe[fr.key]=fr;continue}}else{let fr=Mt.children(this._source.maxzoom);if(pe[fr[0].key]&&pe[fr[1].key]&&pe[fr[2].key]&&pe[fr[3].key])continue}let Ht=Gt.wasRequested();for(let fr=Mt.overscaledZ-1;fr>=Ze;--fr){let wr=Mt.scaledTo(fr);if(Te[wr.key])break;if(Te[wr.key]=!0,Gt=this.getTile(wr),!Gt&&Ht&&(Gt=this._addTile(wr)),Gt){let Le=Gt.hasData();if((Le||!(!((de=this.map)===null||de===void 0)&&de.cancelPendingTileRequestsWhileZooming)||Ht)&&(pe[wr.key]=wr),Ht=Gt.wasRequested(),Le)break}}}return pe}_updateLoadedParentTileCache(){this._loadedParentTiles={};for(let L in this._tiles){let J=[],de,pe=this._tiles[L].tileID;for(;pe.overscaledZ>0;){if(pe.key in this._loadedParentTiles){de=this._loadedParentTiles[pe.key];break}J.push(pe.key);let Te=pe.scaledTo(pe.overscaledZ-1);if(de=this._getLoadedTile(Te),de)break;pe=Te}for(let Te of J)this._loadedParentTiles[Te]=de}}_updateLoadedSiblingTileCache(){this._loadedSiblingTiles={};for(let L in this._tiles){let J=this._tiles[L].tileID,de=this._getLoadedTile(J);this._loadedSiblingTiles[J.key]=de}}_addTile(L){let J=this._tiles[L.key];if(J)return J;J=this._cache.getAndRemove(L),J&&(this._setTileReloadTimer(L.key,J),J.tileID=L,this._state.initializeTileState(J,this.map?this.map.painter:null),this._cacheTimers[L.key]&&(clearTimeout(this._cacheTimers[L.key]),delete this._cacheTimers[L.key],this._setTileReloadTimer(L.key,J)));let de=J;return J||(J=new Ve(L,this._source.tileSize*L.overscaleFactor()),this._loadTile(J,L.key,J.state)),J.uses++,this._tiles[L.key]=J,de||this._source.fire(new e.k("dataloading",{tile:J,coord:J.tileID,dataType:"source"})),J}_setTileReloadTimer(L,J){L in this._timers&&(clearTimeout(this._timers[L]),delete this._timers[L]);let de=J.getExpiryTimeout();de&&(this._timers[L]=setTimeout(()=>{this._reloadTile(L,"expired"),delete this._timers[L]},de))}_removeTile(L){let J=this._tiles[L];J&&(J.uses--,delete this._tiles[L],this._timers[L]&&(clearTimeout(this._timers[L]),delete this._timers[L]),J.uses>0||(J.hasData()&&J.state!=="reloading"?this._cache.add(J.tileID,J,J.getExpiryTimeout()):(J.aborted=!0,this._abortTile(J),this._unloadTile(J))))}_dataHandler(L){let J=L.sourceDataType;L.dataType==="source"&&J==="metadata"&&(this._sourceLoaded=!0),this._sourceLoaded&&!this._paused&&L.dataType==="source"&&J==="content"&&(this.reload(),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let L in this._tiles)this._removeTile(L);this._cache.reset()}tilesIn(L,J,de){let pe=[],Te=this.transform;if(!Te)return pe;let Ze=de?Te.getCameraQueryGeometry(L):L,rt=L.map(Le=>Te.pointCoordinate(Le,this.terrain)),vt=Ze.map(Le=>Te.pointCoordinate(Le,this.terrain)),Mt=this.getIds(),Gt=1/0,Ht=1/0,fr=-1/0,wr=-1/0;for(let Le of vt)Gt=Math.min(Gt,Le.x),Ht=Math.min(Ht,Le.y),fr=Math.max(fr,Le.x),wr=Math.max(wr,Le.y);for(let Le=0;Le=0&&tt[1].y+lt>=0){let dt=rt.map(Ot=>Ge.getTilePoint(Ot)),Rt=vt.map(Ot=>Ge.getTilePoint(Ot));pe.push({tile:Oe,tileID:Ge,queryGeometry:dt,cameraQueryGeometry:Rt,scale:$e})}}return pe}getVisibleCoordinates(L){let J=this.getRenderableIds(L).map(de=>this._tiles[de].tileID);for(let de of J)de.posMatrix=this.transform.calculatePosMatrix(de.toUnwrapped());return J}hasTransition(){if(this._source.hasTransition())return!0;if(At(this._source.type)){let L=n.now();for(let J in this._tiles)if(this._tiles[J].fadeEndTime>=L)return!0}return!1}setFeatureState(L,J,de){this._state.updateState(L=L||"_geojsonTileLayer",J,de)}removeFeatureState(L,J,de){this._state.removeFeatureState(L=L||"_geojsonTileLayer",J,de)}getFeatureState(L,J){return this._state.getState(L=L||"_geojsonTileLayer",J)}setDependencies(L,J,de){let pe=this._tiles[L];pe&&pe.setDependencies(J,de)}reloadTilesForDependencies(L,J){for(let de in this._tiles)this._tiles[de].hasDependency(L,J)&&this._reloadTile(de,"reloading");this._cache.filter(de=>!de.hasDependency(L,J))}}function yt(Me,L){let J=Math.abs(2*Me.wrap)-+(Me.wrap<0),de=Math.abs(2*L.wrap)-+(L.wrap<0);return Me.overscaledZ-L.overscaledZ||de-J||L.canonical.y-Me.canonical.y||L.canonical.x-Me.canonical.x}function At(Me){return Me==="raster"||Me==="image"||Me==="video"}st.maxOverzooming=10,st.maxUnderzooming=3;class Pt{constructor(L,J){this.reset(L,J)}reset(L,J){this.points=L||[],this._distances=[0];for(let de=1;de0?(pe-Ze)/rt:0;return this.points[Te].mult(1-vt).add(this.points[J].mult(vt))}}function Zt(Me,L){let J=!0;return Me==="always"||Me!=="never"&&L!=="never"||(J=!1),J}class vr{constructor(L,J,de){let pe=this.boxCells=[],Te=this.circleCells=[];this.xCellCount=Math.ceil(L/de),this.yCellCount=Math.ceil(J/de);for(let Ze=0;Zethis.width||pe<0||J>this.height)return[];let vt=[];if(L<=0&&J<=0&&this.width<=de&&this.height<=pe){if(Te)return[{key:null,x1:L,y1:J,x2:de,y2:pe}];for(let Mt=0;Mt0}hitTestCircle(L,J,de,pe,Te){let Ze=L-de,rt=L+de,vt=J-de,Mt=J+de;if(rt<0||Ze>this.width||Mt<0||vt>this.height)return!1;let Gt=[];return this._forEachCell(Ze,vt,rt,Mt,this._queryCellCircle,Gt,{hitTest:!0,overlapMode:pe,circle:{x:L,y:J,radius:de},seenUids:{box:{},circle:{}}},Te),Gt.length>0}_queryCell(L,J,de,pe,Te,Ze,rt,vt){let{seenUids:Mt,hitTest:Gt,overlapMode:Ht}=rt,fr=this.boxCells[Te];if(fr!==null){let Le=this.bboxes;for(let Oe of fr)if(!Mt.box[Oe]){Mt.box[Oe]=!0;let Ge=4*Oe,$e=this.boxKeys[Oe];if(L<=Le[Ge+2]&&J<=Le[Ge+3]&&de>=Le[Ge+0]&&pe>=Le[Ge+1]&&(!vt||vt($e))&&(!Gt||!Zt(Ht,$e.overlapMode))&&(Ze.push({key:$e,x1:Le[Ge],y1:Le[Ge+1],x2:Le[Ge+2],y2:Le[Ge+3]}),Gt))return!0}}let wr=this.circleCells[Te];if(wr!==null){let Le=this.circles;for(let Oe of wr)if(!Mt.circle[Oe]){Mt.circle[Oe]=!0;let Ge=3*Oe,$e=this.circleKeys[Oe];if(this._circleAndRectCollide(Le[Ge],Le[Ge+1],Le[Ge+2],L,J,de,pe)&&(!vt||vt($e))&&(!Gt||!Zt(Ht,$e.overlapMode))){let lt=Le[Ge],tt=Le[Ge+1],dt=Le[Ge+2];if(Ze.push({key:$e,x1:lt-dt,y1:tt-dt,x2:lt+dt,y2:tt+dt}),Gt)return!0}}}return!1}_queryCellCircle(L,J,de,pe,Te,Ze,rt,vt){let{circle:Mt,seenUids:Gt,overlapMode:Ht}=rt,fr=this.boxCells[Te];if(fr!==null){let Le=this.bboxes;for(let Oe of fr)if(!Gt.box[Oe]){Gt.box[Oe]=!0;let Ge=4*Oe,$e=this.boxKeys[Oe];if(this._circleAndRectCollide(Mt.x,Mt.y,Mt.radius,Le[Ge+0],Le[Ge+1],Le[Ge+2],Le[Ge+3])&&(!vt||vt($e))&&!Zt(Ht,$e.overlapMode))return Ze.push(!0),!0}}let wr=this.circleCells[Te];if(wr!==null){let Le=this.circles;for(let Oe of wr)if(!Gt.circle[Oe]){Gt.circle[Oe]=!0;let Ge=3*Oe,$e=this.circleKeys[Oe];if(this._circlesCollide(Le[Ge],Le[Ge+1],Le[Ge+2],Mt.x,Mt.y,Mt.radius)&&(!vt||vt($e))&&!Zt(Ht,$e.overlapMode))return Ze.push(!0),!0}}}_forEachCell(L,J,de,pe,Te,Ze,rt,vt){let Mt=this._convertToXCellCoord(L),Gt=this._convertToYCellCoord(J),Ht=this._convertToXCellCoord(de),fr=this._convertToYCellCoord(pe);for(let wr=Mt;wr<=Ht;wr++)for(let Le=Gt;Le<=fr;Le++)if(Te.call(this,L,J,de,pe,this.xCellCount*Le+wr,Ze,rt,vt))return}_convertToXCellCoord(L){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(L*this.xScale)))}_convertToYCellCoord(L){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(L*this.yScale)))}_circlesCollide(L,J,de,pe,Te,Ze){let rt=pe-L,vt=Te-J,Mt=de+Ze;return Mt*Mt>rt*rt+vt*vt}_circleAndRectCollide(L,J,de,pe,Te,Ze,rt){let vt=(Ze-pe)/2,Mt=Math.abs(L-(pe+vt));if(Mt>vt+de)return!1;let Gt=(rt-Te)/2,Ht=Math.abs(J-(Te+Gt));if(Ht>Gt+de)return!1;if(Mt<=vt||Ht<=Gt)return!0;let fr=Mt-vt,wr=Ht-Gt;return fr*fr+wr*wr<=de*de}}function Nt(Me,L,J,de,pe){let Te=e.H();return L?(e.K(Te,Te,[1/pe,1/pe,1]),J||e.ad(Te,Te,de.angle)):e.L(Te,de.labelPlaneMatrix,Me),Te}function Kt(Me,L,J,de,pe){if(L){let Te=e.ae(Me);return e.K(Te,Te,[pe,pe,1]),J||e.ad(Te,Te,-de.angle),Te}return de.glCoordMatrix}function nt(Me,L,J,de){let pe;de?(pe=[Me,L,de(Me,L),1],e.af(pe,pe,J)):(pe=[Me,L,0,1],St(pe,pe,J));let Te=pe[3];return{point:new e.P(pe[0]/Te,pe[1]/Te),signedDistanceFromCamera:Te,isOccluded:!1}}function Ee(Me,L){return .5+Me/L*.5}function ze(Me,L){return Me.x>=-L[0]&&Me.x<=L[0]&&Me.y>=-L[1]&&Me.y<=L[1]}function ve(Me,L,J,de,pe,Te,Ze,rt,vt,Mt,Gt,Ht,fr,wr,Le){let Oe=de?Me.textSizeData:Me.iconSizeData,Ge=e.ag(Oe,J.transform.zoom),$e=[256/J.width*2+1,256/J.height*2+1],lt=de?Me.text.dynamicLayoutVertexArray:Me.icon.dynamicLayoutVertexArray;lt.clear();let tt=Me.lineVertexArray,dt=de?Me.text.placedSymbolArray:Me.icon.placedSymbolArray,Rt=J.transform.width/J.transform.height,Ot=!1;for(let Xt=0;XtMath.abs(J.x-L.x)*de?{useVertical:!0}:(Me===e.ah.vertical?L.yJ.x)?{needsFlipping:!0}:null}function Be(Me,L,J,de,pe,Te,Ze,rt,vt,Mt,Gt){let Ht=J/24,fr=L.lineOffsetX*Ht,wr=L.lineOffsetY*Ht,Le;if(L.numGlyphs>1){let Oe=L.glyphStartIndex+L.numGlyphs,Ge=L.lineStartIndex,$e=L.lineStartIndex+L.lineLength,lt=_e(Ht,rt,fr,wr,de,L,Gt,Me);if(!lt)return{notEnoughRoom:!0};let tt=nt(lt.first.point.x,lt.first.point.y,Ze,Me.getElevation).point,dt=nt(lt.last.point.x,lt.last.point.y,Ze,Me.getElevation).point;if(pe&&!de){let Rt=Ie(L.writingMode,tt,dt,Mt);if(Rt)return Rt}Le=[lt.first];for(let Rt=L.glyphStartIndex+1;Rt0?tt.point:function(Ot,Xt,nr,pr,Lr,Br){return We(Ot,Xt,nr,1,Lr,Br)}(Me.tileAnchorPoint,lt,Ge,0,Te,Me),Rt=Ie(L.writingMode,Ge,dt,Mt);if(Rt)return Rt}let Oe=gt(Ht*rt.getoffsetX(L.glyphStartIndex),fr,wr,de,L.segment,L.lineStartIndex,L.lineStartIndex+L.lineLength,Me,Gt);if(!Oe||Me.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Le=[Oe]}for(let Oe of Le)e.aj(vt,Oe.point,Oe.angle);return{}}function We(Me,L,J,de,pe,Te){let Ze=Me.add(Me.sub(L)._unit()),rt=pe!==void 0?nt(Ze.x,Ze.y,pe,Te.getElevation).point:mt(Ze.x,Ze.y,Te).point,vt=J.sub(rt);return J.add(vt._mult(de/vt.mag()))}function Xe(Me,L,J){let de=L.projectionCache;if(de.projections[Me])return de.projections[Me];let pe=new e.P(L.lineVertexArray.getx(Me),L.lineVertexArray.gety(Me)),Te=mt(pe.x,pe.y,L);if(Te.signedDistanceFromCamera>0)return de.projections[Me]=Te.point,de.anyProjectionOccluded=de.anyProjectionOccluded||Te.isOccluded,Te.point;let Ze=Me-J.direction;return function(rt,vt,Mt,Gt,Ht){return We(rt,vt,Mt,Gt,void 0,Ht)}(J.distanceFromAnchor===0?L.tileAnchorPoint:new e.P(L.lineVertexArray.getx(Ze),L.lineVertexArray.gety(Ze)),pe,J.previousVertex,J.absOffsetX-J.distanceFromAnchor+1,L)}function mt(Me,L,J){let de=Me+J.translation[0],pe=L+J.translation[1],Te;return!J.pitchWithMap&&J.projection.useSpecialProjectionForSymbols?(Te=J.projection.projectTileCoordinates(de,pe,J.unwrappedTileID,J.getElevation),Te.point.x=(.5*Te.point.x+.5)*J.width,Te.point.y=(.5*-Te.point.y+.5)*J.height):(Te=nt(de,pe,J.labelPlaneMatrix,J.getElevation),Te.isOccluded=!1),Te}function ft(Me,L,J){return Me._unit()._perp()._mult(L*J)}function ht(Me,L,J,de,pe,Te,Ze,rt,vt){if(rt.projectionCache.offsets[Me])return rt.projectionCache.offsets[Me];let Mt=J.add(L);if(Me+vt.direction=pe)return rt.projectionCache.offsets[Me]=Mt,Mt;let Gt=Xe(Me+vt.direction,rt,vt),Ht=ft(Gt.sub(J),Ze,vt.direction),fr=J.add(Ht),wr=Gt.add(Ht);return rt.projectionCache.offsets[Me]=e.ak(Te,Mt,fr,wr)||Mt,rt.projectionCache.offsets[Me]}function gt(Me,L,J,de,pe,Te,Ze,rt,vt){let Mt=de?Me-L:Me+L,Gt=Mt>0?1:-1,Ht=0;de&&(Gt*=-1,Ht=Math.PI),Gt<0&&(Ht+=Math.PI);let fr,wr=Gt>0?Te+pe:Te+pe+1;rt.projectionCache.cachedAnchorPoint?fr=rt.projectionCache.cachedAnchorPoint:(fr=mt(rt.tileAnchorPoint.x,rt.tileAnchorPoint.y,rt).point,rt.projectionCache.cachedAnchorPoint=fr);let Le,Oe,Ge=fr,$e=fr,lt=0,tt=0,dt=Math.abs(Mt),Rt=[],Ot;for(;lt+tt<=dt;){if(wr+=Gt,wr=Ze)return null;lt+=tt,$e=Ge,Oe=Le;let pr={absOffsetX:dt,direction:Gt,distanceFromAnchor:lt,previousVertex:$e};if(Ge=Xe(wr,rt,pr),J===0)Rt.push($e),Ot=Ge.sub($e);else{let Lr,Br=Ge.sub($e);Lr=Br.mag()===0?ft(Xe(wr+Gt,rt,pr).sub(Ge),J,Gt):ft(Br,J,Gt),Oe||(Oe=$e.add(Lr)),Le=ht(wr,Lr,Ge,Te,Ze,Oe,J,rt,pr),Rt.push(Oe),Ot=Le.sub(Oe)}tt=Ot.mag()}let Xt=Ot._mult((dt-lt)/tt)._add(Oe||$e),nr=Ht+Math.atan2(Ge.y-$e.y,Ge.x-$e.x);return Rt.push(Xt),{point:Xt,angle:vt?nr:0,path:Rt}}let _t=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ft(Me,L){for(let J=0;J=1;Jn--)un.push(Za.path[Jn]);for(let Jn=1;JnPi.signedDistanceFromCamera<=0)?[]:Jn.map(Pi=>Pi.point)}let li=[];if(un.length>0){let Jn=un[0].clone(),Pi=un[0].clone();for(let ho=1;ho=Br.x&&Pi.x<=Kr.x&&Jn.y>=Br.y&&Pi.y<=Kr.y?[un]:Pi.xKr.x||Pi.yKr.y?[]:e.al([un],Br.x,Br.y,Kr.x,Kr.y)}for(let Jn of li){ya.reset(Jn,.25*Lr);let Pi=0;Pi=ya.length<=.5*Lr?1:Math.ceil(ya.paddedLength/Bn)+1;for(let ho=0;hont(pe.x,pe.y,de,J.getElevation))}queryRenderedSymbols(L){if(L.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let J=[],de=1/0,pe=1/0,Te=-1/0,Ze=-1/0;for(let Gt of L){let Ht=new e.P(Gt.x+hr,Gt.y+hr);de=Math.min(de,Ht.x),pe=Math.min(pe,Ht.y),Te=Math.max(Te,Ht.x),Ze=Math.max(Ze,Ht.y),J.push(Ht)}let rt=this.grid.query(de,pe,Te,Ze).concat(this.ignoredGrid.query(de,pe,Te,Ze)),vt={},Mt={};for(let Gt of rt){let Ht=Gt.key;if(vt[Ht.bucketInstanceId]===void 0&&(vt[Ht.bucketInstanceId]={}),vt[Ht.bucketInstanceId][Ht.featureIndex])continue;let fr=[new e.P(Gt.x1,Gt.y1),new e.P(Gt.x2,Gt.y1),new e.P(Gt.x2,Gt.y2),new e.P(Gt.x1,Gt.y2)];e.am(J,fr)&&(vt[Ht.bucketInstanceId][Ht.featureIndex]=!0,Mt[Ht.bucketInstanceId]===void 0&&(Mt[Ht.bucketInstanceId]=[]),Mt[Ht.bucketInstanceId].push(Ht.featureIndex))}return Mt}insertCollisionBox(L,J,de,pe,Te,Ze){(de?this.ignoredGrid:this.grid).insert({bucketInstanceId:pe,featureIndex:Te,collisionGroupID:Ze,overlapMode:J},L[0],L[1],L[2],L[3])}insertCollisionCircles(L,J,de,pe,Te,Ze){let rt=de?this.ignoredGrid:this.grid,vt={bucketInstanceId:pe,featureIndex:Te,collisionGroupID:Ze,overlapMode:J};for(let Mt=0;Mt=this.screenRightBoundary||pethis.screenBottomBoundary}isInsideGrid(L,J,de,pe){return de>=0&&L=0&&Jthis.projectAndGetPerspectiveRatio(de,Lr.x,Lr.y,pe,Mt));nr=pr.some(Lr=>!Lr.isOccluded),Xt=pr.map(Lr=>Lr.point)}else nr=!0;return{box:e.ao(Xt),allPointsOccluded:!nr}}}function ra(Me,L,J){return L*(e.X/(Me.tileSize*Math.pow(2,J-Me.tileID.overscaledZ)))}class $r{constructor(L,J,de,pe){this.opacity=L?Math.max(0,Math.min(1,L.opacity+(L.placed?J:-J))):pe&&de?1:0,this.placed=de}isHidden(){return this.opacity===0&&!this.placed}}class pa{constructor(L,J,de,pe,Te){this.text=new $r(L?L.text:null,J,de,Te),this.icon=new $r(L?L.icon:null,J,pe,Te)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class oa{constructor(L,J,de){this.text=L,this.icon=J,this.skipFade=de}}class aa{constructor(){this.invProjMatrix=e.H(),this.viewportMatrix=e.H(),this.circles=[]}}class ka{constructor(L,J,de,pe,Te){this.bucketInstanceId=L,this.featureIndex=J,this.sourceLayerIndex=de,this.bucketIndex=pe,this.tileID=Te}}class Ta{constructor(L){this.crossSourceCollisions=L,this.maxGroupID=0,this.collisionGroups={}}get(L){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[L]){let J=++this.maxGroupID;this.collisionGroups[L]={ID:J,predicate:de=>de.collisionGroupID===J}}return this.collisionGroups[L]}}function Da(Me,L,J,de,pe){let{horizontalAlign:Te,verticalAlign:Ze}=e.au(Me);return new e.P(-(Te-.5)*L+de[0]*pe,-(Ze-.5)*J+de[1]*pe)}class La{constructor(L,J,de,pe,Te,Ze){this.transform=L.clone(),this.terrain=de,this.collisionIndex=new jr(this.transform,J),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=pe,this.retainedQueryData={},this.collisionGroups=new Ta(Te),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=Ze,Ze&&(Ze.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(L){let J=this.terrain;return J?(de,pe)=>J.getElevation(L,de,pe):null}getBucketParts(L,J,de,pe){let Te=de.getBucket(J),Ze=de.latestFeatureIndex;if(!Te||!Ze||J.id!==Te.layerIds[0])return;let rt=de.collisionBoxArray,vt=Te.layers[0].layout,Mt=Te.layers[0].paint,Gt=Math.pow(2,this.transform.zoom-de.tileID.overscaledZ),Ht=de.tileSize/e.X,fr=de.tileID.toUnwrapped(),wr=this.transform.calculatePosMatrix(fr),Le=vt.get("text-pitch-alignment")==="map",Oe=vt.get("text-rotation-alignment")==="map",Ge=ra(de,1,this.transform.zoom),$e=this.collisionIndex.mapProjection.translatePosition(this.transform,de,Mt.get("text-translate"),Mt.get("text-translate-anchor")),lt=this.collisionIndex.mapProjection.translatePosition(this.transform,de,Mt.get("icon-translate"),Mt.get("icon-translate-anchor")),tt=Nt(wr,Le,Oe,this.transform,Ge),dt=null;if(Le){let Ot=Kt(wr,Le,Oe,this.transform,Ge);dt=e.L([],this.transform.labelPlaneMatrix,Ot)}this.retainedQueryData[Te.bucketInstanceId]=new ka(Te.bucketInstanceId,Ze,Te.sourceLayerIndex,Te.index,de.tileID);let Rt={bucket:Te,layout:vt,translationText:$e,translationIcon:lt,posMatrix:wr,unwrappedTileID:fr,textLabelPlaneMatrix:tt,labelToScreenMatrix:dt,scale:Gt,textPixelRatio:Ht,holdingForFade:de.holdingForFade(),collisionBoxArray:rt,partiallyEvaluatedTextSize:e.ag(Te.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(Te.sourceID)};if(pe)for(let Ot of Te.sortKeyRanges){let{sortKey:Xt,symbolInstanceStart:nr,symbolInstanceEnd:pr}=Ot;L.push({sortKey:Xt,symbolInstanceStart:nr,symbolInstanceEnd:pr,parameters:Rt})}else L.push({symbolInstanceStart:0,symbolInstanceEnd:Te.symbolInstances.length,parameters:Rt})}attemptAnchorPlacement(L,J,de,pe,Te,Ze,rt,vt,Mt,Gt,Ht,fr,wr,Le,Oe,Ge,$e,lt,tt){let dt=e.aq[L.textAnchor],Rt=[L.textOffset0,L.textOffset1],Ot=Da(dt,de,pe,Rt,Te),Xt=this.collisionIndex.placeCollisionBox(J,fr,vt,Mt,Gt,rt,Ze,Ge,Ht.predicate,tt,Ot);if((!lt||this.collisionIndex.placeCollisionBox(lt,fr,vt,Mt,Gt,rt,Ze,$e,Ht.predicate,tt,Ot).placeable)&&Xt.placeable){let nr;if(this.prevPlacement&&this.prevPlacement.variableOffsets[wr.crossTileID]&&this.prevPlacement.placements[wr.crossTileID]&&this.prevPlacement.placements[wr.crossTileID].text&&(nr=this.prevPlacement.variableOffsets[wr.crossTileID].anchor),wr.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[wr.crossTileID]={textOffset:Rt,width:de,height:pe,anchor:dt,textBoxScale:Te,prevAnchor:nr},this.markUsedJustification(Le,dt,wr,Oe),Le.allowVerticalPlacement&&(this.markUsedOrientation(Le,Oe,wr),this.placedOrientations[wr.crossTileID]=Oe),{shift:Ot,placedGlyphBoxes:Xt}}}placeLayerBucketPart(L,J,de){let{bucket:pe,layout:Te,translationText:Ze,translationIcon:rt,posMatrix:vt,unwrappedTileID:Mt,textLabelPlaneMatrix:Gt,labelToScreenMatrix:Ht,textPixelRatio:fr,holdingForFade:wr,collisionBoxArray:Le,partiallyEvaluatedTextSize:Oe,collisionGroup:Ge}=L.parameters,$e=Te.get("text-optional"),lt=Te.get("icon-optional"),tt=e.ar(Te,"text-overlap","text-allow-overlap"),dt=tt==="always",Rt=e.ar(Te,"icon-overlap","icon-allow-overlap"),Ot=Rt==="always",Xt=Te.get("text-rotation-alignment")==="map",nr=Te.get("text-pitch-alignment")==="map",pr=Te.get("icon-text-fit")!=="none",Lr=Te.get("symbol-z-order")==="viewport-y",Br=dt&&(Ot||!pe.hasIconData()||lt),Kr=Ot&&(dt||!pe.hasTextData()||$e);!pe.collisionArrays&&Le&&pe.deserializeCollisionBoxes(Le);let ya=this._getTerrainElevationFunc(this.retainedQueryData[pe.bucketInstanceId].tileID),Za=(Ha,un,Bn)=>{var li,Jn;if(J[Ha.crossTileID])return;if(wr)return void(this.placements[Ha.crossTileID]=new oa(!1,!1,!1));let Pi=!1,ho=!1,to=!0,as=null,Fo={box:null,placeable:!1,offscreen:null},Ms={box:null,placeable:!1,offscreen:null},Ns=null,Vs=null,xs=null,ks=0,Cl=0,mu=0;un.textFeatureIndex?ks=un.textFeatureIndex:Ha.useRuntimeCollisionCircles&&(ks=Ha.featureIndex),un.verticalTextFeatureIndex&&(Cl=un.verticalTextFeatureIndex);let Hl=un.textBox;if(Hl){let hl=Ne=>{let Ke=e.ah.horizontal;if(pe.allowVerticalPlacement&&!Ne&&this.prevPlacement){let et=this.prevPlacement.placedOrientations[Ha.crossTileID];et&&(this.placedOrientations[Ha.crossTileID]=et,Ke=et,this.markUsedOrientation(pe,Ke,Ha))}return Ke},Ll=(Ne,Ke)=>{if(pe.allowVerticalPlacement&&Ha.numVerticalGlyphVertices>0&&un.verticalTextBox){for(let et of pe.writingModes)if(et===e.ah.vertical?(Fo=Ke(),Ms=Fo):Fo=Ne(),Fo&&Fo.placeable)break}else Fo=Ne()},ue=Ha.textAnchorOffsetStartIndex,we=Ha.textAnchorOffsetEndIndex;if(we===ue){let Ne=(Ke,et)=>{let ot=this.collisionIndex.placeCollisionBox(Ke,tt,fr,vt,Mt,nr,Xt,Ze,Ge.predicate,ya);return ot&&ot.placeable&&(this.markUsedOrientation(pe,et,Ha),this.placedOrientations[Ha.crossTileID]=et),ot};Ll(()=>Ne(Hl,e.ah.horizontal),()=>{let Ke=un.verticalTextBox;return pe.allowVerticalPlacement&&Ha.numVerticalGlyphVertices>0&&Ke?Ne(Ke,e.ah.vertical):{box:null,offscreen:null}}),hl(Fo&&Fo.placeable)}else{let Ne=e.aq[(Jn=(li=this.prevPlacement)===null||li===void 0?void 0:li.variableOffsets[Ha.crossTileID])===null||Jn===void 0?void 0:Jn.anchor],Ke=(ot,kt,xt)=>{let Ut=ot.x2-ot.x1,or=ot.y2-ot.y1,lr=Ha.textBoxScale,Dr=pr&&Rt==="never"?kt:null,Pr=null,ca=tt==="never"?1:2,_a="never";Ne&&ca++;for(let Ur=0;UrKe(Hl,un.iconBox,e.ah.horizontal),()=>{let ot=un.verticalTextBox;return pe.allowVerticalPlacement&&(!Fo||!Fo.placeable)&&Ha.numVerticalGlyphVertices>0&&ot?Ke(ot,un.verticalIconBox,e.ah.vertical):{box:null,occluded:!0,offscreen:null}}),Fo&&(Pi=Fo.placeable,to=Fo.offscreen);let et=hl(Fo&&Fo.placeable);if(!Pi&&this.prevPlacement){let ot=this.prevPlacement.variableOffsets[Ha.crossTileID];ot&&(this.variableOffsets[Ha.crossTileID]=ot,this.markUsedJustification(pe,ot.anchor,Ha,et))}}}if(Ns=Fo,Pi=Ns&&Ns.placeable,to=Ns&&Ns.offscreen,Ha.useRuntimeCollisionCircles){let hl=pe.text.placedSymbolArray.get(Ha.centerJustifiedTextSymbolIndex),Ll=e.ai(pe.textSizeData,Oe,hl),ue=Te.get("text-padding");Vs=this.collisionIndex.placeCollisionCircles(tt,hl,pe.lineVertexArray,pe.glyphOffsetArray,Ll,vt,Mt,Gt,Ht,de,nr,Ge.predicate,Ha.collisionCircleDiameter,ue,Ze,ya),Vs.circles.length&&Vs.collisionDetected&&!de&&e.w("Collisions detected, but collision boxes are not shown"),Pi=dt||Vs.circles.length>0&&!Vs.collisionDetected,to=to&&Vs.offscreen}if(un.iconFeatureIndex&&(mu=un.iconFeatureIndex),un.iconBox){let hl=Ll=>this.collisionIndex.placeCollisionBox(Ll,Rt,fr,vt,Mt,nr,Xt,rt,Ge.predicate,ya,pr&&as?as:void 0);Ms&&Ms.placeable&&un.verticalIconBox?(xs=hl(un.verticalIconBox),ho=xs.placeable):(xs=hl(un.iconBox),ho=xs.placeable),to=to&&xs.offscreen}let el=$e||Ha.numHorizontalGlyphVertices===0&&Ha.numVerticalGlyphVertices===0,Eu=lt||Ha.numIconVertices===0;el||Eu?Eu?el||(ho=ho&&Pi):Pi=ho&&Pi:ho=Pi=ho&Πlet gu=ho&&xs.placeable;if(Pi&&Ns.placeable&&this.collisionIndex.insertCollisionBox(Ns.box,tt,Te.get("text-ignore-placement"),pe.bucketInstanceId,Ms&&Ms.placeable&&Cl?Cl:ks,Ge.ID),gu&&this.collisionIndex.insertCollisionBox(xs.box,Rt,Te.get("icon-ignore-placement"),pe.bucketInstanceId,mu,Ge.ID),Vs&&Pi&&this.collisionIndex.insertCollisionCircles(Vs.circles,tt,Te.get("text-ignore-placement"),pe.bucketInstanceId,ks,Ge.ID),de&&this.storeCollisionData(pe.bucketInstanceId,Bn,un,Ns,xs,Vs),Ha.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(pe.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Ha.crossTileID]=new oa(Pi||Br,ho||Kr,to||pe.justReloaded),J[Ha.crossTileID]=!0};if(Lr){if(L.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Ha=pe.getSortedSymbolIndexes(this.transform.angle);for(let un=Ha.length-1;un>=0;--un){let Bn=Ha[un];Za(pe.symbolInstances.get(Bn),pe.collisionArrays[Bn],Bn)}}else for(let Ha=L.symbolInstanceStart;Ha=0&&(L.text.placedSymbolArray.get(rt).crossTileID=Te>=0&&rt!==Te?0:de.crossTileID)}markUsedOrientation(L,J,de){let pe=J===e.ah.horizontal||J===e.ah.horizontalOnly?J:0,Te=J===e.ah.vertical?J:0,Ze=[de.leftJustifiedTextSymbolIndex,de.centerJustifiedTextSymbolIndex,de.rightJustifiedTextSymbolIndex];for(let rt of Ze)L.text.placedSymbolArray.get(rt).placedOrientation=pe;de.verticalPlacedTextSymbolIndex&&(L.text.placedSymbolArray.get(de.verticalPlacedTextSymbolIndex).placedOrientation=Te)}commit(L){this.commitTime=L,this.zoomAtLastRecencyCheck=this.transform.zoom;let J=this.prevPlacement,de=!1;this.prevZoomAdjustment=J?J.zoomAdjustment(this.transform.zoom):0;let pe=J?J.symbolFadeChange(L):1,Te=J?J.opacities:{},Ze=J?J.variableOffsets:{},rt=J?J.placedOrientations:{};for(let vt in this.placements){let Mt=this.placements[vt],Gt=Te[vt];Gt?(this.opacities[vt]=new pa(Gt,pe,Mt.text,Mt.icon),de=de||Mt.text!==Gt.text.placed||Mt.icon!==Gt.icon.placed):(this.opacities[vt]=new pa(null,pe,Mt.text,Mt.icon,Mt.skipFade),de=de||Mt.text||Mt.icon)}for(let vt in Te){let Mt=Te[vt];if(!this.opacities[vt]){let Gt=new pa(Mt,pe,!1,!1);Gt.isHidden()||(this.opacities[vt]=Gt,de=de||Mt.text.placed||Mt.icon.placed)}}for(let vt in Ze)this.variableOffsets[vt]||!this.opacities[vt]||this.opacities[vt].isHidden()||(this.variableOffsets[vt]=Ze[vt]);for(let vt in rt)this.placedOrientations[vt]||!this.opacities[vt]||this.opacities[vt].isHidden()||(this.placedOrientations[vt]=rt[vt]);if(J&&J.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");de?this.lastPlacementChangeTime=L:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=J?J.lastPlacementChangeTime:L)}updateLayerOpacities(L,J){let de={};for(let pe of J){let Te=pe.getBucket(L);Te&&pe.latestFeatureIndex&&L.id===Te.layerIds[0]&&this.updateBucketOpacities(Te,pe.tileID,de,pe.collisionBoxArray)}}updateBucketOpacities(L,J,de,pe){L.hasTextData()&&(L.text.opacityVertexArray.clear(),L.text.hasVisibleVertices=!1),L.hasIconData()&&(L.icon.opacityVertexArray.clear(),L.icon.hasVisibleVertices=!1),L.hasIconCollisionBoxData()&&L.iconCollisionBox.collisionVertexArray.clear(),L.hasTextCollisionBoxData()&&L.textCollisionBox.collisionVertexArray.clear();let Te=L.layers[0],Ze=Te.layout,rt=new pa(null,0,!1,!1,!0),vt=Ze.get("text-allow-overlap"),Mt=Ze.get("icon-allow-overlap"),Gt=Te._unevaluatedLayout.hasValue("text-variable-anchor")||Te._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ht=Ze.get("text-rotation-alignment")==="map",fr=Ze.get("text-pitch-alignment")==="map",wr=Ze.get("icon-text-fit")!=="none",Le=new pa(null,0,vt&&(Mt||!L.hasIconData()||Ze.get("icon-optional")),Mt&&(vt||!L.hasTextData()||Ze.get("text-optional")),!0);!L.collisionArrays&&pe&&(L.hasIconCollisionBoxData()||L.hasTextCollisionBoxData())&&L.deserializeCollisionBoxes(pe);let Oe=($e,lt,tt)=>{for(let dt=0;dt0,nr=this.placedOrientations[lt.crossTileID],pr=nr===e.ah.vertical,Lr=nr===e.ah.horizontal||nr===e.ah.horizontalOnly;if(tt>0||dt>0){let Kr=Dn(Ot.text);Oe(L.text,tt,pr?oi:Kr),Oe(L.text,dt,Lr?oi:Kr);let ya=Ot.text.isHidden();[lt.rightJustifiedTextSymbolIndex,lt.centerJustifiedTextSymbolIndex,lt.leftJustifiedTextSymbolIndex].forEach(un=>{un>=0&&(L.text.placedSymbolArray.get(un).hidden=ya||pr?1:0)}),lt.verticalPlacedTextSymbolIndex>=0&&(L.text.placedSymbolArray.get(lt.verticalPlacedTextSymbolIndex).hidden=ya||Lr?1:0);let Za=this.variableOffsets[lt.crossTileID];Za&&this.markUsedJustification(L,Za.anchor,lt,nr);let Ha=this.placedOrientations[lt.crossTileID];Ha&&(this.markUsedJustification(L,"left",lt,Ha),this.markUsedOrientation(L,Ha,lt))}if(Xt){let Kr=Dn(Ot.icon),ya=!(wr&<.verticalPlacedIconSymbolIndex&&pr);lt.placedIconSymbolIndex>=0&&(Oe(L.icon,lt.numIconVertices,ya?Kr:oi),L.icon.placedSymbolArray.get(lt.placedIconSymbolIndex).hidden=Ot.icon.isHidden()),lt.verticalPlacedIconSymbolIndex>=0&&(Oe(L.icon,lt.numVerticalIconVertices,ya?oi:Kr),L.icon.placedSymbolArray.get(lt.verticalPlacedIconSymbolIndex).hidden=Ot.icon.isHidden())}let Br=Ge&&Ge.has($e)?Ge.get($e):{text:null,icon:null};if(L.hasIconCollisionBoxData()||L.hasTextCollisionBoxData()){let Kr=L.collisionArrays[$e];if(Kr){let ya=new e.P(0,0);if(Kr.textBox||Kr.verticalTextBox){let Za=!0;if(Gt){let Ha=this.variableOffsets[Rt];Ha?(ya=Da(Ha.anchor,Ha.width,Ha.height,Ha.textOffset,Ha.textBoxScale),Ht&&ya._rotate(fr?this.transform.angle:-this.transform.angle)):Za=!1}if(Kr.textBox||Kr.verticalTextBox){let Ha;Kr.textBox&&(Ha=pr),Kr.verticalTextBox&&(Ha=Lr),Ga(L.textCollisionBox.collisionVertexArray,Ot.text.placed,!Za||Ha,Br.text,ya.x,ya.y)}}if(Kr.iconBox||Kr.verticalIconBox){let Za=!!(!Lr&&Kr.verticalIconBox),Ha;Kr.iconBox&&(Ha=Za),Kr.verticalIconBox&&(Ha=!Za),Ga(L.iconCollisionBox.collisionVertexArray,Ot.icon.placed,Ha,Br.icon,wr?ya.x:0,wr?ya.y:0)}}}}if(L.sortFeatures(this.transform.angle),this.retainedQueryData[L.bucketInstanceId]&&(this.retainedQueryData[L.bucketInstanceId].featureSortOrder=L.featureSortOrder),L.hasTextData()&&L.text.opacityVertexBuffer&&L.text.opacityVertexBuffer.updateData(L.text.opacityVertexArray),L.hasIconData()&&L.icon.opacityVertexBuffer&&L.icon.opacityVertexBuffer.updateData(L.icon.opacityVertexArray),L.hasIconCollisionBoxData()&&L.iconCollisionBox.collisionVertexBuffer&&L.iconCollisionBox.collisionVertexBuffer.updateData(L.iconCollisionBox.collisionVertexArray),L.hasTextCollisionBoxData()&&L.textCollisionBox.collisionVertexBuffer&&L.textCollisionBox.collisionVertexBuffer.updateData(L.textCollisionBox.collisionVertexArray),L.text.opacityVertexArray.length!==L.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${L.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${L.text.layoutVertexArray.length}) / 4`);if(L.icon.opacityVertexArray.length!==L.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${L.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${L.icon.layoutVertexArray.length}) / 4`);if(L.bucketInstanceId in this.collisionCircleArrays){let $e=this.collisionCircleArrays[L.bucketInstanceId];L.placementInvProjMatrix=$e.invProjMatrix,L.placementViewportMatrix=$e.viewportMatrix,L.collisionCircleArray=$e.circles,delete this.collisionCircleArrays[L.bucketInstanceId]}}symbolFadeChange(L){return this.fadeDuration===0?1:(L-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(L){return Math.max(0,(this.transform.zoom-L)/1.5)}hasTransitions(L){return this.stale||L-this.lastPlacementChangeTimeL}setStale(){this.stale=!0}}function Ga(Me,L,J,de,pe,Te){de&&de.length!==0||(de=[0,0,0,0]);let Ze=de[0]-hr,rt=de[1]-hr,vt=de[2]-hr,Mt=de[3]-hr;Me.emplaceBack(L?1:0,J?1:0,pe||0,Te||0,Ze,rt),Me.emplaceBack(L?1:0,J?1:0,pe||0,Te||0,vt,rt),Me.emplaceBack(L?1:0,J?1:0,pe||0,Te||0,vt,Mt),Me.emplaceBack(L?1:0,J?1:0,pe||0,Te||0,Ze,Mt)}let xa=Math.pow(2,25),Gn=Math.pow(2,24),Pn=Math.pow(2,17),sn=Math.pow(2,16),Yn=Math.pow(2,9),Zn=Math.pow(2,8),vi=Math.pow(2,1);function Dn(Me){if(Me.opacity===0&&!Me.placed)return 0;if(Me.opacity===1&&Me.placed)return 4294967295;let L=Me.placed?1:0,J=Math.floor(127*Me.opacity);return J*xa+L*Gn+J*Pn+L*sn+J*Yn+L*Zn+J*vi+L}let oi=0;function on(){return{isOccluded:(Me,L,J)=>!1,getPitchedTextCorrection:(Me,L,J)=>1,get useSpecialProjectionForSymbols(){return!1},projectTileCoordinates(Me,L,J,de){throw new Error("Not implemented.")},translatePosition:(Me,L,J,de)=>function(pe,Te,Ze,rt,vt=!1){if(!Ze[0]&&!Ze[1])return[0,0];let Mt=vt?rt==="map"?pe.angle:0:rt==="viewport"?-pe.angle:0;if(Mt){let Gt=Math.sin(Mt),Ht=Math.cos(Mt);Ze=[Ze[0]*Ht-Ze[1]*Gt,Ze[0]*Gt+Ze[1]*Ht]}return[vt?Ze[0]:ra(Te,Ze[0],pe.zoom),vt?Ze[1]:ra(Te,Ze[1],pe.zoom)]}(Me,L,J,de),getCircleRadiusCorrection:Me=>1}}class mn{constructor(L){this._sortAcrossTiles=L.layout.get("symbol-z-order")!=="viewport-y"&&!L.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(L,J,de,pe,Te){let Ze=this._bucketParts;for(;this._currentTileIndexrt.sortKey-vt.sortKey));this._currentPartIndex!this._forceFullPlacement&&n.now()-pe>2;for(;this._currentPlacementIndex>=0;){let Ze=J[L[this._currentPlacementIndex]],rt=this.placement.collisionIndex.transform.zoom;if(Ze.type==="symbol"&&(!Ze.minzoom||Ze.minzoom<=rt)&&(!Ze.maxzoom||Ze.maxzoom>rt)){if(this._inProgressLayer||(this._inProgressLayer=new mn(Ze)),this._inProgressLayer.continuePlacement(de[Ze.source],this.placement,this._showCollisionBoxes,Ze,Te))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(L){return this.placement.commit(L),this.placement}}let Li=512/e.X/2;class $a{constructor(L,J,de){this.tileID=L,this.bucketInstanceId=de,this._symbolsByKey={};let pe=new Map;for(let Te=0;Te({x:Math.floor(vt.anchorX*Li),y:Math.floor(vt.anchorY*Li)})),crossTileIDs:Ze.map(vt=>vt.crossTileID)};if(rt.positions.length>128){let vt=new e.av(rt.positions.length,16,Uint16Array);for(let{x:Mt,y:Gt}of rt.positions)vt.add(Mt,Gt);vt.finish(),delete rt.positions,rt.index=vt}this._symbolsByKey[Te]=rt}}getScaledCoordinates(L,J){let{x:de,y:pe,z:Te}=this.tileID.canonical,{x:Ze,y:rt,z:vt}=J.canonical,Mt=Li/Math.pow(2,vt-Te),Gt=(rt*e.X+L.anchorY)*Mt,Ht=pe*e.X*Li;return{x:Math.floor((Ze*e.X+L.anchorX)*Mt-de*e.X*Li),y:Math.floor(Gt-Ht)}}findMatches(L,J,de){let pe=this.tileID.canonical.zL)}}class Va{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class it{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(L){let J=Math.round((L-this.lng)/360);if(J!==0)for(let de in this.indexes){let pe=this.indexes[de],Te={};for(let Ze in pe){let rt=pe[Ze];rt.tileID=rt.tileID.unwrapTo(rt.tileID.wrap+J),Te[rt.tileID.key]=rt}this.indexes[de]=Te}this.lng=L}addBucket(L,J,de){if(this.indexes[L.overscaledZ]&&this.indexes[L.overscaledZ][L.key]){if(this.indexes[L.overscaledZ][L.key].bucketInstanceId===J.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(L.overscaledZ,this.indexes[L.overscaledZ][L.key])}for(let Te=0;TeL.overscaledZ)for(let rt in Ze){let vt=Ze[rt];vt.tileID.isChildOf(L)&&vt.findMatches(J.symbolInstances,L,pe)}else{let rt=Ze[L.scaledTo(Number(Te)).key];rt&&rt.findMatches(J.symbolInstances,L,pe)}}for(let Te=0;Te{J[de]=!0});for(let de in this.layerIndexes)J[de]||delete this.layerIndexes[de]}}let Jt=(Me,L)=>e.t(Me,L&&L.filter(J=>J.identifier!=="source.canvas")),Yt=e.aw();class ar extends e.E{constructor(L,J={}){super(),this._rtlPluginLoaded=()=>{for(let de in this.sourceCaches){let pe=this.sourceCaches[de].getSource().type;pe!=="vector"&&pe!=="geojson"||this.sourceCaches[de].reload()}},this.map=L,this.dispatcher=new K(H(),L._getMapId()),this.dispatcher.registerMessageHandler("GG",(de,pe)=>this.getGlyphs(de,pe)),this.dispatcher.registerMessageHandler("GI",(de,pe)=>this.getImages(de,pe)),this.imageManager=new _,this.imageManager.setEventedParent(this),this.glyphManager=new R(L._requestManager,J.localIdeographFontFamily),this.lineAtlas=new q(256,512),this.crossTileSymbolIndex=new Qe,this._spritesImagesIds={},this._layers={},this._order=[],this.sourceCaches={},this.zoomHistory=new e.ax,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("SR",e.ay()),Fe().on(le,this._rtlPluginLoaded),this.on("data",de=>{if(de.dataType!=="source"||de.sourceDataType!=="metadata")return;let pe=this.sourceCaches[de.sourceId];if(!pe)return;let Te=pe.getSource();if(Te&&Te.vectorLayerIds)for(let Ze in this._layers){let rt=this._layers[Ze];rt.source===Te.id&&this._validateLayer(rt)}})}loadURL(L,J={},de){this.fire(new e.k("dataloading",{dataType:"style"})),J.validate=typeof J.validate!="boolean"||J.validate;let pe=this.map._requestManager.transformRequest(L,"Style");this._loadStyleRequest=new AbortController;let Te=this._loadStyleRequest;e.h(pe,this._loadStyleRequest).then(Ze=>{this._loadStyleRequest=null,this._load(Ze.data,J,de)}).catch(Ze=>{this._loadStyleRequest=null,Ze&&!Te.signal.aborted&&this.fire(new e.j(Ze))})}loadJSON(L,J={},de){this.fire(new e.k("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(()=>{this._frameRequest=null,J.validate=J.validate!==!1,this._load(L,J,de)}).catch(()=>{})}loadEmpty(){this.fire(new e.k("dataloading",{dataType:"style"})),this._load(Yt,{validate:!1})}_load(L,J,de){var pe;let Te=J.transformStyle?J.transformStyle(de,L):L;if(!J.validate||!Jt(this,e.u(Te))){this._loaded=!0,this.stylesheet=Te;for(let Ze in Te.sources)this.addSource(Ze,Te.sources[Ze],{validate:!1});Te.sprite?this._loadSprite(Te.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Te.glyphs),this._createLayers(),this.light=new k(this.stylesheet.light),this.sky=new O(this.stylesheet.sky),this.map.setTerrain((pe=this.stylesheet.terrain)!==null&&pe!==void 0?pe:null),this.fire(new e.k("data",{dataType:"style"})),this.fire(new e.k("style.load"))}}_createLayers(){let L=e.az(this.stylesheet.layers);this.dispatcher.broadcast("SL",L),this._order=L.map(J=>J.id),this._layers={},this._serializedLayers=null;for(let J of L){let de=e.aA(J);de.setEventedParent(this,{layer:{id:J.id}}),this._layers[J.id]=de}}_loadSprite(L,J=!1,de=void 0){let pe;this.imageManager.setLoaded(!1),this._spriteRequest=new AbortController,function(Te,Ze,rt,vt){return e._(this,void 0,void 0,function*(){let Mt=A(Te),Gt=rt>1?"@2x":"",Ht={},fr={};for(let{id:wr,url:Le}of Mt){let Oe=Ze.transformRequest(m(Le,Gt,".json"),"SpriteJSON");Ht[wr]=e.h(Oe,vt);let Ge=Ze.transformRequest(m(Le,Gt,".png"),"SpriteImage");fr[wr]=o.getImage(Ge,vt)}return yield Promise.all([...Object.values(Ht),...Object.values(fr)]),function(wr,Le){return e._(this,void 0,void 0,function*(){let Oe={};for(let Ge in wr){Oe[Ge]={};let $e=n.getImageCanvasContext((yield Le[Ge]).data),lt=(yield wr[Ge]).data;for(let tt in lt){let{width:dt,height:Rt,x:Ot,y:Xt,sdf:nr,pixelRatio:pr,stretchX:Lr,stretchY:Br,content:Kr,textFitWidth:ya,textFitHeight:Za}=lt[tt];Oe[Ge][tt]={data:null,pixelRatio:pr,sdf:nr,stretchX:Lr,stretchY:Br,content:Kr,textFitWidth:ya,textFitHeight:Za,spriteData:{width:dt,height:Rt,x:Ot,y:Xt,context:$e}}}}return Oe})}(Ht,fr)})}(L,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Te=>{if(this._spriteRequest=null,Te)for(let Ze in Te){this._spritesImagesIds[Ze]=[];let rt=this._spritesImagesIds[Ze]?this._spritesImagesIds[Ze].filter(vt=>!(vt in Te)):[];for(let vt of rt)this.imageManager.removeImage(vt),this._changedImages[vt]=!0;for(let vt in Te[Ze]){let Mt=Ze==="default"?vt:`${Ze}:${vt}`;this._spritesImagesIds[Ze].push(Mt),Mt in this.imageManager.images?this.imageManager.updateImage(Mt,Te[Ze][vt],!1):this.imageManager.addImage(Mt,Te[Ze][vt]),J&&(this._changedImages[Mt]=!0)}}}).catch(Te=>{this._spriteRequest=null,pe=Te,this.fire(new e.j(pe))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),J&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"})),de&&de(pe)})}_unloadSprite(){for(let L of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(L),this._changedImages[L]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}_validateLayer(L){let J=this.sourceCaches[L.source];if(!J)return;let de=L.sourceLayer;if(!de)return;let pe=J.getSource();(pe.type==="geojson"||pe.vectorLayerIds&&pe.vectorLayerIds.indexOf(de)===-1)&&this.fire(new e.j(new Error(`Source layer "${de}" does not exist on source "${pe.id}" as specified by style layer "${L.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let L in this.sourceCaches)if(!this.sourceCaches[L].loaded())return!1;return!!this.imageManager.isLoaded()}_serializeByIds(L,J=!1){let de=this._serializedAllLayers();if(!L||L.length===0)return Object.values(J?e.aB(de):de);let pe=[];for(let Te of L)if(de[Te]){let Ze=J?e.aB(de[Te]):de[Te];pe.push(Ze)}return pe}_serializedAllLayers(){let L=this._serializedLayers;if(L)return L;L=this._serializedLayers={};let J=Object.keys(this._layers);for(let de of J){let pe=this._layers[de];pe.type!=="custom"&&(L[de]=pe.serialize())}return L}hasTransitions(){if(this.light&&this.light.hasTransition()||this.sky&&this.sky.hasTransition())return!0;for(let L in this.sourceCaches)if(this.sourceCaches[L].hasTransition())return!0;for(let L in this._layers)if(this._layers[L].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(L){if(!this._loaded)return;let J=this._changed;if(J){let pe=Object.keys(this._updatedLayers),Te=Object.keys(this._removedLayers);(pe.length||Te.length)&&this._updateWorkerLayers(pe,Te);for(let Ze in this._updatedSources){let rt=this._updatedSources[Ze];if(rt==="reload")this._reloadSource(Ze);else{if(rt!=="clear")throw new Error(`Invalid action ${rt}`);this._clearSource(Ze)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Ze in this._updatedPaintProps)this._layers[Ze].updateTransitions(L);this.light.updateTransitions(L),this.sky.updateTransitions(L),this._resetUpdates()}let de={};for(let pe in this.sourceCaches){let Te=this.sourceCaches[pe];de[pe]=Te.used,Te.used=!1}for(let pe of this._order){let Te=this._layers[pe];Te.recalculate(L,this._availableImages),!Te.isHidden(L.zoom)&&Te.source&&(this.sourceCaches[Te.source].used=!0)}for(let pe in de){let Te=this.sourceCaches[pe];!!de[pe]!=!!Te.used&&Te.fire(new e.k("data",{sourceDataType:"visibility",dataType:"source",sourceId:pe}))}this.light.recalculate(L),this.sky.recalculate(L),this.z=L.zoom,J&&this.fire(new e.k("data",{dataType:"style"}))}_updateTilesForChangedImages(){let L=Object.keys(this._changedImages);if(L.length){for(let J in this.sourceCaches)this.sourceCaches[J].reloadTilesForDependencies(["icons","patterns"],L);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let L in this.sourceCaches)this.sourceCaches[L].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(L,J){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(L,!1),removedIds:J})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(L,J={}){var de;this._checkLoaded();let pe=this.serialize();if(L=J.transformStyle?J.transformStyle(pe,L):L,((de=J.validate)===null||de===void 0||de)&&Jt(this,e.u(L)))return!1;(L=e.aB(L)).layers=e.az(L.layers);let Te=e.aC(pe,L),Ze=this._getOperationsToPerform(Te);if(Ze.unimplemented.length>0)throw new Error(`Unimplemented: ${Ze.unimplemented.join(", ")}.`);if(Ze.operations.length===0)return!1;for(let rt of Ze.operations)rt();return this.stylesheet=L,this._serializedLayers=null,!0}_getOperationsToPerform(L){let J=[],de=[];for(let pe of L)switch(pe.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":continue;case"addLayer":J.push(()=>this.addLayer.apply(this,pe.args));break;case"removeLayer":J.push(()=>this.removeLayer.apply(this,pe.args));break;case"setPaintProperty":J.push(()=>this.setPaintProperty.apply(this,pe.args));break;case"setLayoutProperty":J.push(()=>this.setLayoutProperty.apply(this,pe.args));break;case"setFilter":J.push(()=>this.setFilter.apply(this,pe.args));break;case"addSource":J.push(()=>this.addSource.apply(this,pe.args));break;case"removeSource":J.push(()=>this.removeSource.apply(this,pe.args));break;case"setLayerZoomRange":J.push(()=>this.setLayerZoomRange.apply(this,pe.args));break;case"setLight":J.push(()=>this.setLight.apply(this,pe.args));break;case"setGeoJSONSourceData":J.push(()=>this.setGeoJSONSourceData.apply(this,pe.args));break;case"setGlyphs":J.push(()=>this.setGlyphs.apply(this,pe.args));break;case"setSprite":J.push(()=>this.setSprite.apply(this,pe.args));break;case"setSky":J.push(()=>this.setSky.apply(this,pe.args));break;case"setTerrain":J.push(()=>this.map.setTerrain.apply(this,pe.args));break;case"setTransition":J.push(()=>{});break;default:de.push(pe.command)}return{operations:J,unimplemented:de}}addImage(L,J){if(this.getImage(L))return this.fire(new e.j(new Error(`An image named "${L}" already exists.`)));this.imageManager.addImage(L,J),this._afterImageUpdated(L)}updateImage(L,J){this.imageManager.updateImage(L,J)}getImage(L){return this.imageManager.getImage(L)}removeImage(L){if(!this.getImage(L))return this.fire(new e.j(new Error(`An image named "${L}" does not exist.`)));this.imageManager.removeImage(L),this._afterImageUpdated(L)}_afterImageUpdated(L){this._availableImages=this.imageManager.listImages(),this._changedImages[L]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(L,J,de={}){if(this._checkLoaded(),this.sourceCaches[L]!==void 0)throw new Error(`Source "${L}" already exists.`);if(!J.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(J).join(", ")}.`);if(["vector","raster","geojson","video","image"].indexOf(J.type)>=0&&this._validate(e.u.source,`sources.${L}`,J,null,de))return;this.map&&this.map._collectResourceTiming&&(J.collectResourceTiming=!0);let pe=this.sourceCaches[L]=new st(L,J,this.dispatcher);pe.style=this,pe.setEventedParent(this,()=>({isSourceLoaded:pe.loaded(),source:pe.serialize(),sourceId:L})),pe.onAdd(this.map),this._changed=!0}removeSource(L){if(this._checkLoaded(),this.sourceCaches[L]===void 0)throw new Error("There is no source with this ID");for(let de in this._layers)if(this._layers[de].source===L)return this.fire(new e.j(new Error(`Source "${L}" cannot be removed while layer "${de}" is using it.`)));let J=this.sourceCaches[L];delete this.sourceCaches[L],delete this._updatedSources[L],J.fire(new e.k("data",{sourceDataType:"metadata",dataType:"source",sourceId:L})),J.setEventedParent(null),J.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(L,J){if(this._checkLoaded(),this.sourceCaches[L]===void 0)throw new Error(`There is no source with this ID=${L}`);let de=this.sourceCaches[L].getSource();if(de.type!=="geojson")throw new Error(`geojsonSource.type is ${de.type}, which is !== 'geojson`);de.setData(J),this._changed=!0}getSource(L){return this.sourceCaches[L]&&this.sourceCaches[L].getSource()}addLayer(L,J,de={}){this._checkLoaded();let pe=L.id;if(this.getLayer(pe))return void this.fire(new e.j(new Error(`Layer "${pe}" already exists on this map.`)));let Te;if(L.type==="custom"){if(Jt(this,e.aD(L)))return;Te=e.aA(L)}else{if("source"in L&&typeof L.source=="object"&&(this.addSource(pe,L.source),L=e.aB(L),L=e.e(L,{source:pe})),this._validate(e.u.layer,`layers.${pe}`,L,{arrayIndex:-1},de))return;Te=e.aA(L),this._validateLayer(Te),Te.setEventedParent(this,{layer:{id:pe}})}let Ze=J?this._order.indexOf(J):this._order.length;if(J&&Ze===-1)this.fire(new e.j(new Error(`Cannot add layer "${pe}" before non-existing layer "${J}".`)));else{if(this._order.splice(Ze,0,pe),this._layerOrderChanged=!0,this._layers[pe]=Te,this._removedLayers[pe]&&Te.source&&Te.type!=="custom"){let rt=this._removedLayers[pe];delete this._removedLayers[pe],rt.type!==Te.type?this._updatedSources[Te.source]="clear":(this._updatedSources[Te.source]="reload",this.sourceCaches[Te.source].pause())}this._updateLayer(Te),Te.onAdd&&Te.onAdd(this.map)}}moveLayer(L,J){if(this._checkLoaded(),this._changed=!0,!this._layers[L])return void this.fire(new e.j(new Error(`The layer '${L}' does not exist in the map's style and cannot be moved.`)));if(L===J)return;let de=this._order.indexOf(L);this._order.splice(de,1);let pe=J?this._order.indexOf(J):this._order.length;J&&pe===-1?this.fire(new e.j(new Error(`Cannot move layer "${L}" before non-existing layer "${J}".`))):(this._order.splice(pe,0,L),this._layerOrderChanged=!0)}removeLayer(L){this._checkLoaded();let J=this._layers[L];if(!J)return void this.fire(new e.j(new Error(`Cannot remove non-existing layer "${L}".`)));J.setEventedParent(null);let de=this._order.indexOf(L);this._order.splice(de,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[L]=J,delete this._layers[L],this._serializedLayers&&delete this._serializedLayers[L],delete this._updatedLayers[L],delete this._updatedPaintProps[L],J.onRemove&&J.onRemove(this.map)}getLayer(L){return this._layers[L]}getLayersOrder(){return[...this._order]}hasLayer(L){return L in this._layers}setLayerZoomRange(L,J,de){this._checkLoaded();let pe=this.getLayer(L);pe?pe.minzoom===J&&pe.maxzoom===de||(J!=null&&(pe.minzoom=J),de!=null&&(pe.maxzoom=de),this._updateLayer(pe)):this.fire(new e.j(new Error(`Cannot set the zoom range of non-existing layer "${L}".`)))}setFilter(L,J,de={}){this._checkLoaded();let pe=this.getLayer(L);if(pe){if(!e.aE(pe.filter,J))return J==null?(pe.filter=void 0,void this._updateLayer(pe)):void(this._validate(e.u.filter,`layers.${pe.id}.filter`,J,null,de)||(pe.filter=e.aB(J),this._updateLayer(pe)))}else this.fire(new e.j(new Error(`Cannot filter non-existing layer "${L}".`)))}getFilter(L){return e.aB(this.getLayer(L).filter)}setLayoutProperty(L,J,de,pe={}){this._checkLoaded();let Te=this.getLayer(L);Te?e.aE(Te.getLayoutProperty(J),de)||(Te.setLayoutProperty(J,de,pe),this._updateLayer(Te)):this.fire(new e.j(new Error(`Cannot style non-existing layer "${L}".`)))}getLayoutProperty(L,J){let de=this.getLayer(L);if(de)return de.getLayoutProperty(J);this.fire(new e.j(new Error(`Cannot get style of non-existing layer "${L}".`)))}setPaintProperty(L,J,de,pe={}){this._checkLoaded();let Te=this.getLayer(L);Te?e.aE(Te.getPaintProperty(J),de)||(Te.setPaintProperty(J,de,pe)&&this._updateLayer(Te),this._changed=!0,this._updatedPaintProps[L]=!0,this._serializedLayers=null):this.fire(new e.j(new Error(`Cannot style non-existing layer "${L}".`)))}getPaintProperty(L,J){return this.getLayer(L).getPaintProperty(J)}setFeatureState(L,J){this._checkLoaded();let de=L.source,pe=L.sourceLayer,Te=this.sourceCaches[de];if(Te===void 0)return void this.fire(new e.j(new Error(`The source '${de}' does not exist in the map's style.`)));let Ze=Te.getSource().type;Ze==="geojson"&&pe?this.fire(new e.j(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Ze!=="vector"||pe?(L.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),Te.setFeatureState(pe,L.id,J)):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(L,J){this._checkLoaded();let de=L.source,pe=this.sourceCaches[de];if(pe===void 0)return void this.fire(new e.j(new Error(`The source '${de}' does not exist in the map's style.`)));let Te=pe.getSource().type,Ze=Te==="vector"?L.sourceLayer:void 0;Te!=="vector"||Ze?J&&typeof L.id!="string"&&typeof L.id!="number"?this.fire(new e.j(new Error("A feature id is required to remove its specific state property."))):pe.removeFeatureState(Ze,L.id,J):this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(L){this._checkLoaded();let J=L.source,de=L.sourceLayer,pe=this.sourceCaches[J];if(pe!==void 0)return pe.getSource().type!=="vector"||de?(L.id===void 0&&this.fire(new e.j(new Error("The feature id parameter must be provided."))),pe.getFeatureState(de,L.id)):void this.fire(new e.j(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.j(new Error(`The source '${J}' does not exist in the map's style.`)))}getTransition(){return e.e({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)}serialize(){if(!this._loaded)return;let L=e.aF(this.sourceCaches,Te=>Te.serialize()),J=this._serializeByIds(this._order,!0),de=this.map.getTerrain()||void 0,pe=this.stylesheet;return e.aG({version:pe.version,name:pe.name,metadata:pe.metadata,light:pe.light,sky:pe.sky,center:pe.center,zoom:pe.zoom,bearing:pe.bearing,pitch:pe.pitch,sprite:pe.sprite,glyphs:pe.glyphs,transition:pe.transition,sources:L,layers:J,terrain:de},Te=>Te!==void 0)}_updateLayer(L){this._updatedLayers[L.id]=!0,L.source&&!this._updatedSources[L.source]&&this.sourceCaches[L.source].getSource().type!=="raster"&&(this._updatedSources[L.source]="reload",this.sourceCaches[L.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(L){let J=Ze=>this._layers[Ze].type==="fill-extrusion",de={},pe=[];for(let Ze=this._order.length-1;Ze>=0;Ze--){let rt=this._order[Ze];if(J(rt)){de[rt]=Ze;for(let vt of L){let Mt=vt[rt];if(Mt)for(let Gt of Mt)pe.push(Gt)}}}pe.sort((Ze,rt)=>rt.intersectionZ-Ze.intersectionZ);let Te=[];for(let Ze=this._order.length-1;Ze>=0;Ze--){let rt=this._order[Ze];if(J(rt))for(let vt=pe.length-1;vt>=0;vt--){let Mt=pe[vt].feature;if(de[Mt.layer.id]{let nr=$e.featureSortOrder;if(nr){let pr=nr.indexOf(Ot.featureIndex);return nr.indexOf(Xt.featureIndex)-pr}return Xt.featureIndex-Ot.featureIndex});for(let Ot of Rt)dt.push(Ot)}}for(let $e in Le)Le[$e].forEach(lt=>{let tt=lt.feature,dt=Mt[rt[$e].source].getFeatureState(tt.layer["source-layer"],tt.id);tt.source=tt.layer.source,tt.layer["source-layer"]&&(tt.sourceLayer=tt.layer["source-layer"]),tt.state=dt});return Le}(this._layers,Ze,this.sourceCaches,L,J,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(Te)}querySourceFeatures(L,J){J&&J.filter&&this._validate(e.u.filter,"querySourceFeatures.filter",J.filter,null,J);let de=this.sourceCaches[L];return de?function(pe,Te){let Ze=pe.getRenderableIds().map(Mt=>pe.getTileByID(Mt)),rt=[],vt={};for(let Mt=0;Mtfr.getTileByID(wr)).sort((wr,Le)=>Le.tileID.overscaledZ-wr.tileID.overscaledZ||(wr.tileID.isLessThan(Le.tileID)?-1:1))}let Ht=this.crossTileSymbolIndex.addLayer(Gt,vt[Gt.source],L.center.lng);Ze=Ze||Ht}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Te=Te||this._layerOrderChanged||de===0)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(n.now(),L.zoom))&&(this.pauseablePlacement=new bi(L,this.map.terrain,this._order,Te,J,de,pe,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,vt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(n.now()),rt=!0),Ze&&this.pauseablePlacement.placement.setStale()),rt||Ze)for(let Mt of this._order){let Gt=this._layers[Mt];Gt.type==="symbol"&&this.placement.updateLayerOpacities(Gt,vt[Gt.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(n.now())}_releaseSymbolFadeTiles(){for(let L in this.sourceCaches)this.sourceCaches[L].releaseSymbolFadeTiles()}getImages(L,J){return e._(this,void 0,void 0,function*(){let de=yield this.imageManager.getImages(J.icons);this._updateTilesForChangedImages();let pe=this.sourceCaches[J.source];return pe&&pe.setDependencies(J.tileID.key,J.type,J.icons),de})}getGlyphs(L,J){return e._(this,void 0,void 0,function*(){let de=yield this.glyphManager.getGlyphs(J.stacks),pe=this.sourceCaches[J.source];return pe&&pe.setDependencies(J.tileID.key,J.type,[""]),de})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(L,J={}){this._checkLoaded(),L&&this._validate(e.u.glyphs,"glyphs",L,null,J)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=L,this.glyphManager.entries={},this.glyphManager.setURL(L))}addSprite(L,J,de={},pe){this._checkLoaded();let Te=[{id:L,url:J}],Ze=[...A(this.stylesheet.sprite),...Te];this._validate(e.u.sprite,"sprite",Ze,null,de)||(this.stylesheet.sprite=Ze,this._loadSprite(Te,!0,pe))}removeSprite(L){this._checkLoaded();let J=A(this.stylesheet.sprite);if(J.find(de=>de.id===L)){if(this._spritesImagesIds[L])for(let de of this._spritesImagesIds[L])this.imageManager.removeImage(de),this._changedImages[de]=!0;J.splice(J.findIndex(de=>de.id===L),1),this.stylesheet.sprite=J.length>0?J:void 0,delete this._spritesImagesIds[L],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.k("data",{dataType:"style"}))}else this.fire(new e.j(new Error(`Sprite "${L}" doesn't exists on this map.`)))}getSprite(){return A(this.stylesheet.sprite)}setSprite(L,J={},de){this._checkLoaded(),L&&this._validate(e.u.sprite,"sprite",L,null,J)||(this.stylesheet.sprite=L,L?this._loadSprite(L,!0,de):(this._unloadSprite(),de&&de(null)))}}var cr=e.Y([{name:"a_pos",type:"Int16",components:2}]);let tr={prelude:Je(`#ifdef GL_ES +{name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}}}),Zq=ze({"src/plots/map/styles/arcgis-sat.js"(J,V){"use strict";V.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}}}),Av=ze({"src/plots/map/constants.js"(J,V){"use strict";var p=(Nv(),Po(nv)).default,b=Xq(),E=Zq(),k='\xA9 OpenStreetMap contributors',l="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",e="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",t="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",n="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",r="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",a="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",o={basic:t,streets:t,outdoors:t,light:l,dark:e,satellite:E,"satellite-streets":b,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:k,tiles:["https://tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":l,"carto-darkmatter":e,"carto-voyager":t,"carto-positron-nolabels":n,"carto-darkmatter-nolabels":r,"carto-voyager-nolabels":a},s=p(o);V.exports={styleValueDflt:"basic",stylesMap:o,styleValuesMap:s,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",s.join(", "),"or use a tile service."].join(` +`),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}}}),ly=ze({"src/plots/map/layout_attributes.js"(J,V){"use strict";var p=Nr(),b=Qn().defaultLine,E=Ml().attributes,k=Qs(),l=su().textposition,e=Al().overrideAll,t=hs().templatedArray,n=Av(),r=k({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});r.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var a=V.exports=e({_arrayAttrRegexps:[p.counterRegex("map",".layers",!0)],domain:E({name:"map"}),style:{valType:"any",values:n.styleValuesMap,dflt:n.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:t("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:b},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:b}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:r,textposition:p.extendFlat({},l,{arrayOk:!1})}})},"plot","from-root");a.uirevision={valType:"any",editType:"none"}}}),q2=ze({"src/traces/scattermap/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,texttemplateAttrs:b,templatefallbackAttrs:E}=xs(),k=Bd(),l=gg(),e=su(),t=ly(),n=ws(),r=qs(),a=Ki().extendFlat,o=Al().overrideAll,s=ly(),c=l.line,m=l.marker;V.exports=o({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:a({},s.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:a({},m.opacity,{dflt:1})},mode:a({},e.mode,{dflt:"markers"}),text:a({},e.text,{}),texttemplate:b({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:E({editType:"plot"}),hovertext:a({},e.hovertext,{}),line:{color:c.color,width:c.width},connectgaps:e.connectgaps,marker:a({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:m.opacity,size:m.size,sizeref:m.sizeref,sizemin:m.sizemin,sizemode:m.sizemode},r("marker")),fill:l.fill,fillcolor:k(),textfont:t.layers.symbol.textfont,textposition:t.layers.symbol.textposition,below:{valType:"string"},selected:{marker:e.selected.marker},unselected:{marker:e.unselected.marker},hoverinfo:a({},n.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:p(),hovertemplatefallback:E()},"calc","nested")}}),SM=ze({"src/traces/scattermap/constants.js"(J,V){"use strict";var p=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];V.exports={isSupportedFont:function(b){return p.indexOf(b)!==-1}}}}),$q=ze({"src/traces/scattermap/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=id(),k=_d(),l=xd(),e=Od(),t=q2(),n=SM().isSupportedFont;V.exports=function(o,s,c,m){function h(A,x){return p.coerce(o,s,t,A,x)}function v(A,x){return p.coerce2(o,s,t,A,x)}var g=r(o,s,h);if(!g){s.visible=!1;return}if(h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext"),h("hovertemplate"),h("hovertemplatefallback"),h("mode"),h("below"),b.hasMarkers(s)){E(o,s,c,m,h,{noLine:!0,noAngle:!0}),h("marker.allowoverlap"),h("marker.angle");var i=s.marker;i.symbol!=="circle"&&(p.isArrayOrTypedArray(i.size)&&(i.size=i.size[0]),p.isArrayOrTypedArray(i.color)&&(i.color=i.color[0]))}b.hasLines(s)&&(k(o,s,c,m,h,{noDash:!0}),h("connectgaps"));var w=v("cluster.maxzoom"),S=v("cluster.step"),M=v("cluster.color",s.marker&&s.marker.color||c),C=v("cluster.size"),_=v("cluster.opacity"),T=w!==!1||S!==!1||M!==!1||C!==!1||_!==!1,f=h("cluster.enabled",T);if(f||b.hasText(s)){var u=m.font.family;l(o,s,m,h,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:n(u)?u:"Open Sans Regular",weight:m.font.weight,style:m.font.style,size:m.font.size,color:m.font.color}})}h("fill"),s.fill!=="none"&&e(o,s,c,h),p.coerceSelectionMarkerOpacity(s,h)};function r(a,o,s){var c=s("lon")||[],m=s("lat")||[],h=Math.min(c.length,m.length);return o._length=h,h}}}),EM=ze({"src/traces/scattermap/format_labels.js"(J,V){"use strict";var p=Gi();V.exports=function(E,k,l){var e={},t=l[k.subplot]._subplot,n=t.mockAxis,r=E.lonlat;return e.lonLabel=p.tickText(n,n.c2l(r[0]),!0).text,e.latLabel=p.tickText(n,n.c2l(r[1]),!0).text,e}}}),kM=ze({"src/plots/map/convert_text_opts.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k){var l=E.split(" "),e=l[0],t=l[1],n=p.isArrayOrTypedArray(k)?p.mean(k):k,r=.5+n/100,a=1.5+n/100,o=["",""],s=[0,0];switch(e){case"top":o[0]="top",s[1]=-a;break;case"bottom":o[0]="bottom",s[1]=a;break}switch(t){case"left":o[1]="right",s[0]=-r;break;case"right":o[1]="left",s[0]=r;break}var c;return o[0]&&o[1]?c=o.join("-"):o[0]?c=o[0]:o[1]?c=o[1]:c="center",{anchor:c,offset:s}}}}),Kq=ze({"src/traces/scattermap/convert.js"(J,V){"use strict";var p=ao(),b=Nr(),E=No().BADNUM,k=Q1(),l=fl(),e=$i(),t=l1(),n=el(),r=SM().isSupportedFont,a=kM(),o=kh().appendArrayPointValue,s=Cs().NEWLINES,c=Cs().BR_TAG_ALL;V.exports=function(_,T){var f=T[0].trace,u=f.visible===!0&&f._length!==0,A=f.fill!=="none",x=n.hasLines(f),z=n.hasMarkers(f),I=n.hasText(f),O=z&&f.marker.symbol==="circle",D=z&&f.marker.symbol!=="circle",B=f.cluster&&f.cluster.enabled,F=m("fill"),P=m("line"),j=m("circle"),U=m("symbol"),$={fill:F,line:P,circle:j,symbol:U};if(!u)return $;var Q;if((A||x)&&(Q=k.calcTraceToLineCoords(T)),A&&(F.geojson=k.makePolygon(Q),F.layout.visibility="visible",b.extendFlat(F.paint,{"fill-color":f.fillcolor})),x&&(P.geojson=k.makeLine(Q),P.layout.visibility="visible",b.extendFlat(P.paint,{"line-width":f.line.width,"line-color":f.line.color,"line-opacity":f.opacity})),O){var re=h(T);j.geojson=re.geojson,j.layout.visibility="visible",B&&(j.filter=["!",["has","point_count"]],$.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":S(f.cluster.color,f.cluster.step),"circle-radius":S(f.cluster.size,f.cluster.step),"circle-opacity":S(f.cluster.opacity,f.cluster.step)}},$.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":M(f),"text-size":12}}),b.extendFlat(j.paint,{"circle-color":re.mcc,"circle-radius":re.mrc,"circle-opacity":re.mo})}if(O&&B&&(j.filter=["!",["has","point_count"]]),(D||I)&&(U.geojson=v(T,_),b.extendFlat(U.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),D&&(b.extendFlat(U.layout,{"icon-size":f.marker.size/10}),"angle"in f.marker&&f.marker.angle!=="auto"&&b.extendFlat(U.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),U.layout["icon-allow-overlap"]=f.marker.allowoverlap,b.extendFlat(U.paint,{"icon-opacity":f.opacity*f.marker.opacity,"icon-color":f.marker.color,"icon-halo-color":f.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),I)){var ne=(f.marker||{}).size,se=a(f.textposition,ne);b.extendFlat(U.layout,{"text-size":f.textfont.size,"text-anchor":se.anchor,"text-offset":se.offset,"text-font":M(f)}),b.extendFlat(U.paint,{"text-color":f.textfont.color,"text-opacity":f.opacity})}return $};function m(C){return{type:C,geojson:k.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function h(C){var _=C[0].trace,T=_.marker,f=_.selectedpoints,u=b.isArrayOrTypedArray(T.color),A=b.isArrayOrTypedArray(T.size),x=b.isArrayOrTypedArray(T.opacity),z;function I(ne){return _.opacity*ne}function O(ne){return ne/2}var D;u&&(l.hasColorscale(_,"marker")?D=l.makeColorScaleFuncFromTrace(T):D=b.identity);var B;A&&(B=t(_));var F;x&&(F=function(ne){var se=p(ne)?+b.constrain(ne,0,1):0;return I(se)});var P=[];for(z=0;z850?z+=" Black":u>750?z+=" Extra Bold":u>650?z+=" Bold":u>550?z+=" Semi Bold":u>450?z+=" Medium":u>350?z+=" Regular":u>250?z+=" Light":u>150?z+=" Extra Light":z+=" Thin"):A.slice(0,2).join(" ")==="Open Sans"?(z="Open Sans",u>750?z+=" Extrabold":u>650?z+=" Bold":u>550?z+=" Semibold":u>350?z+=" Regular":z+=" Light"):A.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(z="Klokantech Noto Sans",A[3]==="CJK"&&(z+=" CJK"),z+=u>500?" Bold":" Regular")),x&&(z+=" Italic"),z==="Open Sans Regular Italic"?z="Open Sans Italic":z==="Open Sans Regular Bold"?z="Open Sans Bold":z==="Open Sans Regular Bold Italic"?z="Open Sans Bold Italic":z==="Klokantech Noto Sans Regular Italic"&&(z="Klokantech Noto Sans Italic"),r(z)||(z=T);var I=z.split(", ");return I}}}),Jq=ze({"src/traces/scattermap/plot.js"(J,V){"use strict";var p=Nr(),b=Kq(),E=Av().traceLayerPrefix,k={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function l(t,n,r,a){this.type="scattermap",this.subplot=t,this.uid=n,this.clusterEnabled=r,this.isHidden=a,this.sourceIds={fill:"source-"+n+"-fill",line:"source-"+n+"-line",circle:"source-"+n+"-circle",symbol:"source-"+n+"-symbol",cluster:"source-"+n+"-circle",clusterCount:"source-"+n+"-circle"},this.layerIds={fill:E+n+"-fill",line:E+n+"-line",circle:E+n+"-circle",symbol:E+n+"-symbol",cluster:E+n+"-cluster",clusterCount:E+n+"-cluster-count"},this.below=null}var e=l.prototype;e.addSource=function(t,n,r){var a={type:"geojson",data:n.geojson};r&&r.enabled&&p.extendFlat(a,{cluster:!0,clusterMaxZoom:r.maxzoom});var o=this.subplot.map.getSource(this.sourceIds[t]);o?o.setData(n.geojson):this.subplot.map.addSource(this.sourceIds[t],a)},e.setSourceData=function(t,n){this.subplot.map.getSource(this.sourceIds[t]).setData(n.geojson)},e.addLayer=function(t,n,r){var a={type:n.type,id:this.layerIds[t],source:this.sourceIds[t],layout:n.layout,paint:n.paint};n.filter&&(a.filter=n.filter);for(var o=this.layerIds[t],s,c=this.subplot.getMapLayers(),m=0;m=0;x--){var z=A[x];o.removeLayer(v.layerIds[z])}u||o.removeSource(v.sourceIds.circle)}function w(u){for(var A=k.nonCluster,x=0;x=0;x--){var z=A[x];o.removeLayer(v.layerIds[z]),u||o.removeSource(v.sourceIds[z])}}function M(u){h?i(u):S(u)}function C(u){m?g(u):w(u)}function _(){for(var u=m?k.cluster:k.nonCluster,A=0;A=0;a--){var o=r[a];n.removeLayer(this.layerIds[o]),n.removeSource(this.sourceIds[o])}},V.exports=function(n,r){var a=r[0].trace,o=a.cluster&&a.cluster.enabled,s=a.visible!==!0,c=new l(n,a.uid,o,s),m=b(n.gd,r),h=c.below=n.belowLookup["trace-"+a.uid],v,g,i;if(o)for(c.addSource("circle",m.circle,a.cluster),v=0;v=0?Math.floor((a+180)/360):Math.ceil((a-180)/360),C=M*360,_=a-C;function T(B){var F=B.lonlat;if(F[0]===l||w&&g.indexOf(B.i+1)===-1)return 1/0;var P=b.modHalf(F[0],360),j=F[1],U=v.project([P,j]),$=U.x-m.c2p([_,j]),Q=U.y-h.c2p([P,o]),re=Math.max(3,B.mrc||0);return Math.max(Math.sqrt($*$+Q*Q)-re,1-3/re)}if(p.getClosest(s,T,r),r.index!==!1){var f=s[r.index],u=f.lonlat,A=[b.modHalf(u[0],360)+C,u[1]],x=m.c2p(A),z=h.c2p(A),I=f.mrc||1;r.x0=x-I,r.x1=x+I,r.y0=z-I,r.y1=z+I;var O={};O[c.subplot]={_subplot:v};var D=c._module.formatLabels(f,c,O);return r.lonLabel=D.lonLabel,r.latLabel=D.latLabel,r.color=E(c,f),r.extraText=n(c,f,s[0].t.labels),r.hovertemplate=c.hovertemplate,[r]}}function n(r,a,o){if(r.hovertemplate)return;var s=a.hi||r.hoverinfo,c=s.split("+"),m=c.indexOf("all")!==-1,h=c.indexOf("lon")!==-1,v=c.indexOf("lat")!==-1,g=a.lonlat,i=[];function w(S){return S+"\xB0"}return m||h&&v?i.push("("+w(g[1])+", "+w(g[0])+")"):h?i.push(o.lon+w(g[0])):v&&i.push(o.lat+w(g[1])),(m||c.indexOf("text")!==-1)&&k(a,r,i),i.join("
")}V.exports={hoverPoints:t,getExtraText:n}}}),Qq=ze({"src/traces/scattermap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b}}}),eV=ze({"src/traces/scattermap/select.js"(J,V){"use strict";var p=Nr(),b=el(),{BADNUM:E}=No();V.exports=function(l,e){var t;let{cd:n,xaxis:r,yaxis:a}=l,{trace:o}=n[0];if(!b.hasMarkers(o))return[];if(e===!1){for(let h of n)h.selected=0;return[]}let s=(t=r._subplot)==null?void 0:t.map,c=s?.getRenderWorldCopies()&&e.xmax>e.xmin?s.transform.worldSize:0,m=[];for(let h=0;h1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},r}(),s=n(o);let c,m;function h(){return c!=null||(c=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),c}function v(){if(m==null&&(m=!1,h())){let d=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(d){for(let W=0;W<5*5;W++){let te=4*W;d.fillStyle=`rgb(${te},${te+1},${te+2})`,d.fillRect(W%5,Math.floor(W/5),1,1)}let L=d.getImageData(0,0,5,5).data;for(let W=0;W<5*5*4;W++)if(W%4!=3&&L[W]!==W){m=!0;break}}}return m||!1}var g=1e-6,i=typeof Float32Array<"u"?Float32Array:Array;function w(){var R=new i(9);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[5]=0,R[6]=0,R[7]=0),R[0]=1,R[4]=1,R[8]=1,R}function S(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}function M(){var R=new i(3);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R}function C(R){var d=R[0],L=R[1],W=R[2];return Math.sqrt(d*d+L*L+W*W)}function _(R,d,L){var W=new i(3);return W[0]=R,W[1]=d,W[2]=L,W}function T(R,d,L){return R[0]=d[0]+L[0],R[1]=d[1]+L[1],R[2]=d[2]+L[2],R}function f(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R}function u(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[0],ge=L[1],Ce=L[2];return R[0]=te*Ce-ue*ge,R[1]=ue*me-W*Ce,R[2]=W*ge-te*me,R}var A,x=C;function z(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3];return R[0]=L[0]*W+L[4]*te+L[8]*ue+L[12]*me,R[1]=L[1]*W+L[5]*te+L[9]*ue+L[13]*me,R[2]=L[2]*W+L[6]*te+L[10]*ue+L[14]*me,R[3]=L[3]*W+L[7]*te+L[11]*ue+L[15]*me,R}function I(){var R=new i(4);return i!=Float32Array&&(R[0]=0,R[1]=0,R[2]=0),R[3]=1,R}function O(R,d,L,W){var te=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",ue=Math.PI/360;d*=ue,W*=ue,L*=ue;var me=Math.sin(d),ge=Math.cos(d),Ce=Math.sin(L),Te=Math.cos(L),Oe=Math.sin(W),Pe=Math.cos(W);switch(te){case"xyz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"xzy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yxz":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe-me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;case"yzx":R[0]=me*Te*Pe+ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zxy":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe+me*Ce*Pe,R[3]=ge*Te*Pe-me*Ce*Oe;break;case"zyx":R[0]=me*Te*Pe-ge*Ce*Oe,R[1]=ge*Ce*Pe+me*Te*Oe,R[2]=ge*Te*Oe-me*Ce*Pe,R[3]=ge*Te*Pe+me*Ce*Oe;break;default:throw new Error("Unknown angle order "+te)}return R}function D(){var R=new i(2);return i!=Float32Array&&(R[0]=0,R[1]=0),R}function B(R,d){var L=new i(2);return L[0]=R,L[1]=d,L}M(),A=new i(4),i!=Float32Array&&(A[0]=0,A[1]=0,A[2]=0,A[3]=0),M(),_(1,0,0),_(0,1,0),I(),I(),w(),D();let F=8192;function P(R,d,L){return d*(F/(R.tileSize*Math.pow(2,L-R.tileID.overscaledZ)))}function j(R){return R instanceof Error?R:new Error(typeof R=="string"?R:String(R))}function U(R,d){return(R%d+d)%d}function $(R,d,L){return R*(1-L)+d*L}function Q(R){if(R<=0)return 0;if(R>=1)return 1;let d=R*R,L=d*R;return 4*(R<.5?L:3*(R-d)+L-.75)}function re(R,d,L,W){let te=new s(R,d,L,W);return ue=>te.solve(ue)}let ne=re(.25,.1,.25,1);function se(R,d,L){return Math.min(L,Math.max(d,R))}function G(R,d,L){let W=L-d,te=((R-d)%W+W)%W+d;return te===d?L:te}function X(R,...d){for(let L of d)for(let W in L)R[W]=L[W];return R}let K=1;function H(R,d,L){let W={};for(let te in R)W[te]=d.call(this,R[te],te,R);return W}function Y(R,d,L){let W={};for(let te in R)d.call(this,R[te],te,R)&&(W[te]=R[te]);return W}function q(R){return Array.isArray(R)?R.map(q):typeof R=="object"&&R?H(R,q):R}let Z={};function ee(R){Z[R]||(typeof console<"u"&&console.warn(R),Z[R]=!0)}function ae(R,d,L){return(L.y-R.y)*(d.x-R.x)>(d.y-R.y)*(L.x-R.x)}function he(R){return typeof WorkerGlobalScope<"u"&&R!==void 0&&R instanceof WorkerGlobalScope}let xe=null;function we(R){return typeof ImageBitmap<"u"&&R instanceof ImageBitmap}let Me="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Se(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(typeof VideoFrame>"u")throw new Error("VideoFrame not supported");let ue=new VideoFrame(R,{timestamp:0});try{let me=ue?.format;if(!me||!me.startsWith("BGR")&&!me.startsWith("RGB"))throw new Error(`Unrecognized format ${me}`);let ge=me.startsWith("BGR"),Ce=new Uint8ClampedArray(W*te*4);if(yield ue.copyTo(Ce,function(Te,Oe,Pe,it,He){let bt=4*Math.max(-Oe,0),Et=(Math.max(0,Pe)-Pe)*it*4+bt,Qt=4*it,er=Math.max(0,Oe),br=Math.max(0,Pe);return{rect:{x:er,y:br,width:Math.min(Te.width,Oe+it)-er,height:Math.min(Te.height,Pe+He)-br},layout:[{offset:Et,stride:Qt}]}}(R,d,L,W,te)),ge)for(let Te=0;Te{R.removeEventListener(d,L,W)}}}function ke(R){return R*Math.PI/180}function _e(R){return R/Math.PI*180}let ce={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},ve={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},le="AbortError";class Ae extends Error{constructor(d=le){super(d instanceof Error?d.message:d),this.name=le,d instanceof Error&&d.stack&&(this.stack=d.stack)}}function Be(R){return R instanceof Error&&R.name===le}function Xe(R){if(R.aborted)throw new Ae(R.reason)}let Ye={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function yt(R){return Ye.REGISTERED_PROTOCOLS[R.substring(0,R.indexOf("://"))]}let gt="global-dispatcher";class Tt extends Error{constructor(d,L,W,te){super(`AJAXError: ${L} (${d}): ${W}`),this.status=d,this.statusText=L,this.url=W,this.body=te}}let At=()=>{var R;return he(self)?(R=self.worker)===null||R===void 0?void 0:R.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},$t=function(R,d){return e(this,void 0,void 0,function*(){var L,W;if(R.url.includes("://")&&!/^https?:|^file:/.test(R.url)){let te=yt(R.url);if(te){let ue=yield te(R,d);return ue.data||R.type!=="arrayBuffer"?ue:X(ue,{data:new ArrayBuffer(0)})}if(he(self)&&(!((L=self.worker)===null||L===void 0)&&L.actor))return self.worker.actor.sendAsync({type:"GR",data:R,targetMapId:gt},d)}if(!(te=>{var ue;return te.startsWith("file:")||((ue=At())===null||ue===void 0?void 0:ue.startsWith("file:"))&&!/^\w+:/.test(te)})(R.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return function(te,ue){return e(this,void 0,void 0,function*(){let me=new Request(te.url,{method:te.method||"GET",body:te.body,credentials:te.credentials,headers:te.headers,cache:te.cache,referrer:At(),referrerPolicy:te.referrerPolicy,signal:ue.signal}),ge,Ce;te.type!=="json"||me.headers.has("Accept")||me.headers.set("Accept","application/json");try{ge=yield fetch(me)}catch(Oe){throw Be(Oe)?Oe:new Tt(0,j(Oe).message,te.url,new Blob)}if(!ge.ok){let Oe=yield ge.blob();throw new Tt(ge.status,ge.statusText,te.url,Oe)}Ce=te.type==="arrayBuffer"||te.type==="image"?ge.arrayBuffer():te.type==="json"?ge.json():ge.text();let Te=yield Ce;return Xe(ue.signal),{data:Te,cacheControl:ge.headers.get("Cache-Control"),expires:ge.headers.get("Expires"),etag:ge.headers.get("ETag")}})}(R,d);if(he(self)&&(!((W=self.worker)===null||W===void 0)&&W.actor))return self.worker.actor.sendAsync({type:"GR",data:R,mustQueue:!0,targetMapId:gt},d)}return function(te,ue){return new Promise((me,ge)=>{var Ce;let Te=new XMLHttpRequest;Te.open(te.method||"GET",te.url,!0),te.type!=="arrayBuffer"&&te.type!=="image"||(Te.responseType="arraybuffer");for(let Oe in te.headers)Te.setRequestHeader(Oe,te.headers[Oe]);te.type==="json"&&(Te.responseType="text",!((Ce=te.headers)===null||Ce===void 0)&&Ce.Accept||Te.setRequestHeader("Accept","application/json")),Te.withCredentials=te.credentials==="include",Te.onerror=()=>{ge(new Error(Te.statusText))},Te.onload=()=>{if(!ue.signal.aborted)if((Te.status>=200&&Te.status<300||Te.status===0)&&Te.response!==null){let Oe=Te.response;if(te.type==="json")try{Oe=JSON.parse(Te.response)}catch(Pe){return void ge(Pe)}me({data:Oe,cacheControl:Te.getResponseHeader("Cache-Control"),expires:Te.getResponseHeader("Expires"),etag:Te.getResponseHeader("ETag")})}else{let Oe=new Blob([Te.response],{type:Te.getResponseHeader("Content-Type")});ge(new Tt(Te.status,Te.statusText,te.url,Oe))}},ue.signal.addEventListener("abort",()=>{Te.abort(),ge(new Ae(ue.signal.reason))}),Te.send(te.body)})}(R,d)})};function rr(R){if(!R||R.indexOf("://")<=0||R.startsWith("data:image/")||R.startsWith("blob:"))return!0;let d=new URL(R),L=window.location;return d.protocol===L.protocol&&d.host===L.host}function _r(R,d,L){var W;!((W=L[R])===null||W===void 0)&&W.includes(d)||(L[R]||(L[R]=[]),L[R].push(d))}function Xt(R,d,L){if(L?.[R]){let W=L[R].indexOf(d);W!==-1&&L[R].splice(W,1)}}class or{constructor(d,L={}){X(this,L),this.type=d}}class Ot extends or{constructor(d,L={}){super("error",X({error:d},L))}}class vt{on(d,L){return this._listeners||(this._listeners={}),_r(d,L,this._listeners),{unsubscribe:()=>{this.off(d,L)}}}off(d,L){return Xt(d,L,this._listeners),Xt(d,L,this._oneTimeListeners),this}once(d,L){return L?(this._oneTimeListeners||(this._oneTimeListeners={}),_r(d,L,this._oneTimeListeners),this):new Promise(W=>this.once(d,W))}fire(d,L){var W,te;typeof d=="string"&&(d=new or(d,L||{}));let ue=d.type;if(this.listens(ue)){d.target=this;let me=!((W=this._listeners)===null||W===void 0)&&W[ue]?this._listeners[ue].slice():[];for(let Te of me)Te.call(this,d);let ge=!((te=this._oneTimeListeners)===null||te===void 0)&&te[ue]?this._oneTimeListeners[ue].slice():[];for(let Te of ge)Xt(ue,Te,this._oneTimeListeners),Te.call(this,d);let Ce=this._eventedParent;Ce&&(X(d,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),Ce.fire(d))}else d instanceof Ot&&console.error(d.error);return this}listens(d){var L,W,te,ue,me;return((W=(L=this._listeners)===null||L===void 0?void 0:L[d])===null||W===void 0?void 0:W.length)>0||((ue=(te=this._oneTimeListeners)===null||te===void 0?void 0:te[d])===null||ue===void 0?void 0:ue.length)>0||((me=this._eventedParent)===null||me===void 0?void 0:me.listens(d))}setEventedParent(d,L){return this._eventedParent=d,this._eventedParentData=L,this}}var ht={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{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"},volatile:{type:"boolean",default:!1},"*":{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:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},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_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-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",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},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:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},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}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,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:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,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:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",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"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let De=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Ne(R,d){let L={};for(let W in R)W!=="ref"&&(L[W]=R[W]);return De.forEach(W=>{W in d&&(L[W]=d[W])}),L}function We(R,d){if(Array.isArray(R)){if(!Array.isArray(d)||R.length!==d.length)return!1;for(let L=0;L`:R.itemType.kind==="value"?"array":`array<${d}>`}return R.kind}let li=[Yt,Rt,nr,ur,cr,Rr,Pa,Qr,yn(Zr),La,Xa,un,ja,Nn];function Yn(R,d){if(d.kind==="error")return null;if(R.kind==="array"){if(d.kind==="array"&&(d.N===0&&d.itemType.kind==="value"||!Yn(R.itemType,d.itemType))&&(typeof R.N!="number"||R.N===d.N))return null}else{if(R.kind===d.kind)return null;if(R.kind==="value"){for(let L of li)if(!Yn(L,d))return null}}return`Expected ${Un(R)} but found ${Un(d)} instead.`}function on(R,d){return d.some(L=>L.kind===R.kind)}function en(R,d){return d.some(L=>L==="null"?R===null:L==="array"?Array.isArray(R):L==="object"?R&&!Array.isArray(R)&&typeof R=="object":L===typeof R)}function vi(R,d){return R.kind==="array"&&d.kind==="array"?R.itemType.kind===d.itemType.kind&&typeof R.N=="number":R.kind===d.kind}let Yi=.96422,Ja=.82521,Oa=4/29,lt=6/29,rt=3*lt*lt,fr=lt*lt*lt,lr=Math.PI/180,Tr=180/Math.PI;function Ir(R){return(R%=360)<0&&(R+=360),R}function Dr([R,d,L,W]){let te,ue,me=kt((.2225045*(R=ot(R))+.7168786*(d=ot(d))+.0606169*(L=ot(L)))/1);R===d&&d===L?te=ue=me:(te=kt((.4360747*R+.3850649*d+.1430804*L)/Yi),ue=kt((.0139322*R+.0971045*d+.7141733*L)/Ja));let ge=116*me-16;return[ge<0?0:ge,500*(te-me),200*(me-ue),W]}function ot(R){return R<=.04045?R/12.92:Math.pow((R+.055)/1.055,2.4)}function kt(R){return R>fr?Math.pow(R,1/3):R/rt+Oa}function jt([R,d,L,W]){let te=(R+16)/116,ue=isNaN(d)?te:te+d/500,me=isNaN(L)?te:te-L/200;return te=1*Er(te),ue=Yi*Er(ue),me=Ja*Er(me),[ar(3.1338561*ue-1.6168667*te-.4906146*me),ar(-.9787684*ue+1.9161415*te+.033454*me),ar(.0719453*ue-.2289914*te+1.4052427*me),W]}function ar(R){return(R=R<=.00304?12.92*R:1.055*Math.pow(R,1/2.4)-.055)<0?0:R>1?1:R}function Er(R){return R>lt?R*R*R:rt*(R-Oa)}let xr=Object.hasOwn||function(R,d){return Object.prototype.hasOwnProperty.call(R,d)};function zr(R,d){return xr(R,d)?R[d]:void 0}function Lr(R){return parseInt(R.padEnd(2,R),16)/255}function aa(R,d){return Sa(d?R/100:R,0,1)}function Sa(R,d,L){return Math.min(Math.max(d,R),L)}function wa(R){return!R.some(Number.isNaN)}let pn={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]};function tn(R,d,L){return R+L*(d-R)}function ai(R,d,L){return R.map((W,te)=>tn(W,d[te],L))}class rn{constructor(d,L,W,te=1,ue=!0){this.r=d,this.g=L,this.b=W,this.a=te,ue||(this.r*=te,this.g*=te,this.b*=te,te||this.overwriteGetter("rgb",[d,L,W,te]))}static parse(d){if(d instanceof rn)return d;if(typeof d!="string")return;let L=function(W){if((W=W.toLowerCase().trim())==="transparent")return[0,0,0,0];let te=zr(pn,W);if(te){let[me,ge,Ce]=te;return[me/255,ge/255,Ce/255,1]}if(W.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(W)){let me=W.length<6?1:2,ge=1;return[Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+=me)),Lr(W.slice(ge,ge+me)||"ff")]}if(W.startsWith("rgb")){let me=W.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(me){let[ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br]=me,sr=[Oe||" ",He||" ",Qt].join("");if(sr===" "||sr===" /"||sr===",,"||sr===",,,"){let Mr=[Te,it,Et].join(""),qr=Mr==="%%%"?100:Mr===""?255:0;if(qr){let $r=[Sa(+Ce/qr,0,1),Sa(+Pe/qr,0,1),Sa(+bt/qr,0,1),er?aa(+er,br):1];if(wa($r))return $r}}return}}let ue=W.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(ue){let[me,ge,Ce,Te,Oe,Pe,it,He,bt]=ue,Et=[Ce||" ",Oe||" ",it].join("");if(Et===" "||Et===" /"||Et===",,"||Et===",,,"){let Qt=[+ge,Sa(+Te,0,100),Sa(+Pe,0,100),He?aa(+He,bt):1];if(wa(Qt))return function([er,br,sr,Mr]){function qr($r){let _a=($r+er/30)%12,Ca=br*Math.min(sr,1-sr);return sr-Ca*Math.max(-1,Math.min(_a-3,9-_a,1))}return er=Ir(er),br/=100,sr/=100,[qr(0),qr(8),qr(4),Mr]}(Qt)}}}(d);return L?new rn(...L,!1):void 0}get rgb(){let{r:d,g:L,b:W,a:te}=this,ue=te||1/0;return this.overwriteGetter("rgb",[d/ue,L/ue,W/ue,te])}get hcl(){return this.overwriteGetter("hcl",function(d){let[L,W,te,ue]=Dr(d),me=Math.sqrt(W*W+te*te);return[Math.round(1e4*me)?Ir(Math.atan2(te,W)*Tr):NaN,me,L,ue]}(this.rgb))}get lab(){return this.overwriteGetter("lab",Dr(this.rgb))}overwriteGetter(d,L){return Object.defineProperty(this,d,{value:L}),L}toString(){let[d,L,W,te]=this.rgb;return`rgba(${[d,L,W].map(ue=>Math.round(255*ue)).join(",")},${te})`}static interpolate(d,L,W,te="rgb"){switch(te){case"rgb":{let[ue,me,ge,Ce]=ai(d.rgb,L.rgb,W);return new rn(ue,me,ge,Ce,!1)}case"hcl":{let[ue,me,ge,Ce]=d.hcl,[Te,Oe,Pe,it]=L.hcl,He,bt;if(isNaN(ue)||isNaN(Te))isNaN(ue)?isNaN(Te)?He=NaN:(He=Te,ge!==1&&ge!==0||(bt=Oe)):(He=ue,Pe!==1&&Pe!==0||(bt=me));else{let sr=Te-ue;Te>ue&&sr>180?sr-=360:Te180&&(sr+=360),He=ue+W*sr}let[Et,Qt,er,br]=function([sr,Mr,qr,$r]){return sr=isNaN(sr)?0:sr*lr,jt([qr,Math.cos(sr)*Mr,Math.sin(sr)*Mr,$r])}([He,bt??tn(me,Oe,W),tn(ge,Pe,W),tn(Ce,it,W)]);return new rn(Et,Qt,er,br,!1)}case"lab":{let[ue,me,ge,Ce]=jt(ai(d.lab,L.lab,W));return new rn(ue,me,ge,Ce,!1)}}}}rn.black=new rn(0,0,0,1),rn.white=new rn(1,1,1,1),rn.transparent=new rn(0,0,0,0),rn.red=new rn(1,0,0,1);class Ri{constructor(d,L,W){this.sensitivity=d?L?"variant":"case":L?"accent":"base",this.locale=W,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(d,L){return this.collator.compare(d,L)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let Gn=["bottom","center","top"];class no{constructor(d,L,W,te,ue,me){this.text=d,this.image=L,this.scale=W,this.fontStack=te,this.textColor=ue,this.verticalAlign=me}}class Di{constructor(d){this.sections=d}static fromString(d){return new Di([new no(d,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some(d=>d.text.length!==0||d.image&&d.image.name.length!==0)}static factory(d){return d instanceof Di?d:Di.fromString(d)}toString(){return this.sections.length===0?"":this.sections.map(d=>d.text).join("")}}class fn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof fn)return d;if(typeof d=="number")return new fn([d,d,d,d]);if(Array.isArray(d)&&!(d.length<1||d.length>4)){for(let L of d)if(typeof L!="number")return;switch(d.length){case 1:d=[d[0],d[0],d[0],d[0]];break;case 2:d=[d[0],d[1],d[0],d[1]];break;case 3:d=[d[0],d[1],d[2],d[1]]}return new fn(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new fn(ai(d.values,L.values,W))}}class Ai{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof Ai)return d;if(typeof d=="number")return new Ai([d]);if(Array.isArray(d)){for(let L of d)if(typeof L!="number")return;return new Ai(d)}}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W){return new Ai(ai(d.values,L.values,W))}}class jn{constructor(d){this.values=d.slice()}static parse(d){if(d instanceof jn)return d;if(typeof d=="string"){let W=rn.parse(d);return W?new jn([W]):void 0}if(!Array.isArray(d))return;let L=[];for(let W of d){if(typeof W!="string")return;let te=rn.parse(W);if(!te)return;L.push(te)}return new jn(L)}toString(){return JSON.stringify(this.values)}static interpolate(d,L,W,te="rgb"){let ue=[];if(d.values.length!=L.values.length)throw new Error(`colorArray: Arrays have mismatched length (${d.values.length} vs. ${L.values.length}), cannot interpolate.`);for(let me=0;me=0&&R<=255&&typeof d=="number"&&d>=0&&d<=255&&typeof L=="number"&&L>=0&&L<=255?W===void 0||typeof W=="number"&&W>=0&&W<=1?null:`Invalid rgba value [${[R,d,L,W].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof W=="number"?[R,d,L,W]:[R,d,L]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function Vn(R){if(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number"||R instanceof io||R instanceof rn||R instanceof Ri||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi)return!0;if(Array.isArray(R)){for(let d of R)if(!Vn(d))return!1;return!0}if(typeof R=="object"){for(let d in R)if(!Vn(R[d]))return!1;return!0}return!1}function qn(R){if(R===null)return Yt;if(typeof R=="string")return nr;if(typeof R=="boolean")return ur;if(typeof R=="number")return Rt;if(R instanceof rn)return cr;if(R instanceof io)return Rr;if(R instanceof Ri)return ha;if(R instanceof Di)return Pa;if(R instanceof fn)return La;if(R instanceof Ai)return Xa;if(R instanceof jn)return un;if(R instanceof gi)return Nn;if(R instanceof qi)return ja;if(Array.isArray(R)){let d=R.length,L;for(let W of R){let te=qn(W);if(L){if(L===te)continue;L=Zr;break}L=te}return yn(L||Zr,d)}return Qr}function Hi(R){let d=typeof R;return R===null?"":d==="string"||d==="number"||d==="boolean"?String(R):R instanceof rn||R instanceof io||R instanceof Di||R instanceof fn||R instanceof Ai||R instanceof jn||R instanceof gi||R instanceof qi?R.toString():JSON.stringify(R)}class Mi{constructor(d,L){this.type=d,this.value=L}static parse(d,L){if(d.length!==2)return L.error(`'literal' expression requires exactly one argument, but found ${d.length-1} instead.`);if(!Vn(d[1]))return L.error("invalid value");let W=d[1],te=qn(W),ue=L.expectedType;return te.kind!=="array"||te.N!==0||!ue||ue.kind!=="array"||typeof ue.N=="number"&&ue.N!==0||(te=ue),new Mi(te,W)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let Ro={string:nr,number:Rt,boolean:ur,object:Qr};class go{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W,te=1,ue=d[0];if(ue==="array"){let ge,Ce;if(d.length>2){let Te=d[1];if(typeof Te!="string"||!(Te in Ro)||Te==="object")return L.error('The item type argument of "array" must be one of string, number, boolean',1);ge=Ro[Te],te++}else ge=Zr;if(d.length>3){if(d[2]!==null&&(typeof d[2]!="number"||d[2]<0||d[2]!==Math.floor(d[2])))return L.error('The length argument to "array" must be a positive integer literal',2);Ce=d[2],te++}W=yn(ge,Ce)}else{if(!Ro[ue])throw new Error(`Types doesn't contain name = ${ue}`);W=Ro[ue]}let me=[];for(;ted.outputDefined())}}let Eo={"to-boolean":ur,"to-color":cr,"to-number":Rt,"to-string":nr};class Ao{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[0];if(!Eo[W])throw new Error(`Can't parse ${W} as it is not part of the known types`);if((W==="to-boolean"||W==="to-string")&&d.length!==2)return L.error("Expected one argument.");let te=Eo[W],ue=[];for(let me=1;me4?`Invalid rgba value ${JSON.stringify(L)}: expected an array containing either three or four numeric values.`:oo(L[0],L[1],L[2],L[3]),!W))return new rn(L[0]/255,L[1]/255,L[2]/255,L[3])}throw new Xn(W||`Could not parse color from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"padding":{let L;for(let W of this.args){L=W.evaluate(d);let te=fn.parse(L);if(te)return te}throw new Xn(`Could not parse padding from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"numberArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=Ai.parse(L);if(te)return te}throw new Xn(`Could not parse numberArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"colorArray":{let L;for(let W of this.args){L=W.evaluate(d);let te=jn.parse(L);if(te)return te}throw new Xn(`Could not parse colorArray from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"variableAnchorOffsetCollection":{let L;for(let W of this.args){L=W.evaluate(d);let te=gi.parse(L);if(te)return te}throw new Xn(`Could not parse variableAnchorOffsetCollection from value '${typeof L=="string"?L:JSON.stringify(L)}'`)}case"number":{let L=null;for(let W of this.args){if(L=W.evaluate(d),L===null)return 0;let te=Number(L);if(!isNaN(te))return te}throw new Xn(`Could not convert ${JSON.stringify(L)} to number.`)}case"formatted":return Di.fromString(Hi(this.args[0].evaluate(d)));case"resolvedImage":return qi.fromString(Hi(this.args[0].evaluate(d)));case"projectionDefinition":return this.args[0].evaluate(d);default:return Hi(this.args[0].evaluate(d))}}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}let ds=["Unknown","Point","LineString","Polygon"];class jo{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?ds[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(d){let L=this._parseColorCache.get(d);return L||(L=rn.parse(d),this._parseColorCache.set(d,L)),L}}class Wo{constructor(d,L,W=[],te,ue=new Kr,me=[]){this.registry=d,this.path=W,this.key=W.map(ge=>`[${ge}]`).join(""),this.scope=ue,this.errors=me,this.expectedType=te,this._isConstant=L}parse(d,L,W,te,ue={}){return L?this.concat(L,W,te)._parse(d,ue):this._parse(d,ue)}_parse(d,L){function W(te,ue,me){return me==="assert"?new go(ue,[te]):me==="coerce"?new Ao(ue,[te]):te}if(d!==null&&typeof d!="string"&&typeof d!="boolean"&&typeof d!="number"||(d=["literal",d]),Array.isArray(d)){if(d.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let te=d[0];if(typeof te!="string")return this.error(`Expression name must be a string, but found ${typeof te} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let ue=this.registry[te];if(ue){let me=ue.parse(d,this);if(!me)return null;if(this.expectedType){let ge=this.expectedType,Ce=me.type;if(ge.kind!=="string"&&ge.kind!=="number"&&ge.kind!=="boolean"&&ge.kind!=="object"&&ge.kind!=="array"||Ce.kind!=="value"){if(ge.kind==="projectionDefinition"&&["string","array"].includes(Ce.kind)||["color","formatted","resolvedImage"].includes(ge.kind)&&["value","string"].includes(Ce.kind)||["padding","numberArray"].includes(ge.kind)&&["value","number","array"].includes(Ce.kind)||ge.kind==="colorArray"&&["value","string","array"].includes(Ce.kind)||ge.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(Ce.kind))me=W(me,ge,L.typeAnnotation||"coerce");else if(this.checkSubtype(ge,Ce))return null}else me=W(me,ge,L.typeAnnotation||"assert")}if(!(me instanceof Mi)&&me.type.kind!=="resolvedImage"&&this._isConstant(me)){let ge=new jo;try{me=new Mi(me.type,me.evaluate(ge))}catch(Ce){return this.error(Ce.message),null}}return me}return this.error(`Unknown expression "${te}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(d===void 0?"'undefined' value invalid. Use null instead.":typeof d=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof d} instead.`)}concat(d,L,W){let te=typeof d=="number"?this.path.concat(d):this.path,ue=W?this.scope.concat(W):this.scope;return new Wo(this.registry,this._isConstant,te,L||null,ue,this.errors)}error(d,...L){let W=`${this.key}${L.map(te=>`[${te}]`).join("")}`;this.errors.push(new Sr(W,d))}checkSubtype(d,L){let W=Yn(d,L);return W&&this.error(W),W}}class to{constructor(d,L){this.type=L.type,this.bindings=[].concat(d),this.result=L}evaluate(d){return this.result.evaluate(d)}eachChild(d){for(let L of this.bindings)d(L[1]);d(this.result)}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found ${d.length-1} instead.`);let W=[];for(let ue=1;ue=W.length)throw new Xn(`Array index out of bounds: ${L} > ${W.length-1}.`);if(L!==Math.floor(L))throw new Xn(`Array index must be an integer, but found ${L} instead.`);return W[L]}eachChild(d){d(this.index),d(this.input)}outputDefined(){return!1}}class Vi{constructor(d,L){this.type=ur,this.needle=d,this.haystack=L}static parse(d,L){if(d.length!==3)return L.error(`Expected 2 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);return W&&te?on(W.type,[ur,nr,Rt,Yt,Zr])?new Vi(W,te):L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`):null}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!W)return!1;if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);if(!en(W,["string","array"]))throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`);return W.indexOf(L)>=0}eachChild(d){d(this.needle),d(this.haystack)}outputDefined(){return!0}}class Io{constructor(d,L,W){this.type=Rt,this.needle=d,this.haystack=L,this.fromIndex=W}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Zr);if(!W||!te)return null;if(!on(W.type,[ur,nr,Rt,Yt,Zr]))return L.error(`Expected first argument to be of type boolean, string, number or null, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Io(W,te,ue):null}return new Io(W,te)}evaluate(d){let L=this.needle.evaluate(d),W=this.haystack.evaluate(d);if(!en(L,["boolean","string","number","null"]))throw new Xn(`Expected first argument to be of type boolean, string, number or null, but found ${Un(qn(L))} instead.`);let te;if(this.fromIndex&&(te=this.fromIndex.evaluate(d)),en(W,["string"])){let ue=W.indexOf(L,te);return ue===-1?-1:[...W.slice(0,ue)].length}if(en(W,["array"]))return W.indexOf(L,te);throw new Xn(`Expected second argument to be of type array or string, but found ${Un(qn(W))} instead.`)}eachChild(d){d(this.needle),d(this.haystack),this.fromIndex&&d(this.fromIndex)}outputDefined(){return!1}}class Xi{constructor(d,L,W,te,ue,me){this.inputType=d,this.type=L,this.input=W,this.cases=te,this.outputs=ue,this.otherwise=me}static parse(d,L){if(d.length<5)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if(d.length%2!=1)return L.error("Expected an even number of arguments.");let W,te;L.expectedType&&L.expectedType.kind!=="value"&&(te=L.expectedType);let ue={},me=[];for(let Te=2;TeNumber.MAX_SAFE_INTEGER)return it.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof bt=="number"&&Math.floor(bt)!==bt)return it.error("Numeric branch labels must be integer values.");if(W){if(it.checkSubtype(W,qn(bt)))return null}else W=qn(bt);if(ue[String(bt)]!==void 0)return it.error("Branch labels must be unique.");ue[String(bt)]=me.length}let He=L.parse(Pe,Te,te);if(!He)return null;te=te||He.type,me.push(He)}let ge=L.parse(d[1],1,Zr);if(!ge)return null;let Ce=L.parse(d[d.length-1],d.length-1,te);return Ce?ge.type.kind!=="value"&&L.concat(1).checkSubtype(W,ge.type)?null:new Xi(W,te,ge,ue,me,Ce):null}evaluate(d){let L=this.input.evaluate(d);return(qn(L)===this.inputType&&this.outputs[this.cases[L]]||this.otherwise).evaluate(d)}eachChild(d){d(this.input),this.outputs.forEach(d),d(this.otherwise)}outputDefined(){return this.outputs.every(d=>d.outputDefined())&&this.otherwise.outputDefined()}}class Ko{constructor(d,L,W){this.type=d,this.branches=L,this.otherwise=W}static parse(d,L){if(d.length<4)return L.error(`Expected at least 3 arguments, but found only ${d.length-1}.`);if(d.length%2!=0)return L.error("Expected an odd number of arguments.");let W;L.expectedType&&L.expectedType.kind!=="value"&&(W=L.expectedType);let te=[];for(let me=1;meL.outputDefined())&&this.otherwise.outputDefined()}}class Uo{constructor(d,L,W,te){this.type=d,this.input=L,this.beginIndex=W,this.endIndex=te}static parse(d,L){if(d.length<=2||d.length>=5)return L.error(`Expected 2 or 3 arguments, but found ${d.length-1} instead.`);let W=L.parse(d[1],1,Zr),te=L.parse(d[2],2,Rt);if(!W||!te)return null;if(!on(W.type,[yn(Zr),nr,Zr]))return L.error(`Expected first argument to be of type array or string, but found ${Un(W.type)} instead`);if(d.length===4){let ue=L.parse(d[3],3,Rt);return ue?new Uo(W.type,W,te,ue):null}return new Uo(W.type,W,te)}evaluate(d){let L=this.input.evaluate(d),W=this.beginIndex.evaluate(d),te;if(this.endIndex&&(te=this.endIndex.evaluate(d)),en(L,["string"]))return[...L].slice(W,te).join("");if(en(L,["array"]))return L.slice(W,te);throw new Xn(`Expected first argument to be of type array or string, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input),d(this.beginIndex),this.endIndex&&d(this.endIndex)}outputDefined(){return!1}}function Ls(R,d){let L=R.length-1,W,te,ue=0,me=L,ge=0;for(;ue<=me;)if(ge=Math.floor((ue+me)/2),W=R[ge],te=R[ge+1],W<=d){if(ge===L||dd))throw new Xn("Input is not a number.");me=ge-1}return 0}class Ss{constructor(d,L,W){this.type=d,this.input=L,this.labels=[],this.outputs=[];for(let[te,ue]of W)this.labels.push(te),this.outputs.push(ue)}static parse(d,L){if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=[],ue=null;L.expectedType&&L.expectedType.kind!=="value"&&(ue=L.expectedType);for(let me=1;me=ge)return L.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Te);let Pe=L.parse(Ce,Oe,ue);if(!Pe)return null;ue=ue||Pe.type,te.push([ge,Pe])}return new Ss(ue,W,te)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;return te>=L[ue-1]?W[ue-1].evaluate(d):W[Ls(L,te)].evaluate(d)}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function Vo(R){return R&&R.__esModule&&Object.prototype.hasOwnProperty.call(R,"default")?R.default:R}var Vs,Ts,Bo=function(){if(Ts)return Vs;function R(d,L,W,te){this.cx=3*d,this.bx=3*(W-d)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*L,this.by=3*(te-L)-this.cy,this.ay=1-this.cy-this.by,this.p1x=d,this.p1y=L,this.p2x=W,this.p2y=te}return Ts=1,Vs=R,R.prototype={sampleCurveX:function(d){return((this.ax*d+this.bx)*d+this.cx)*d},sampleCurveY:function(d){return((this.ay*d+this.by)*d+this.cy)*d},sampleCurveDerivativeX:function(d){return(3*this.ax*d+2*this.bx)*d+this.cx},solveCurveX:function(d,L){if(L===void 0&&(L=1e-6),d<0)return 0;if(d>1)return 1;for(var W=d,te=0;te<8;te++){var ue=this.sampleCurveX(W)-d;if(Math.abs(ue)ue?ge=W:Ce=W,W=.5*(Ce-ge)+ge;return W},solve:function(d,L){return this.sampleCurveY(this.solveCurveX(d,L))}},Vs}(),_o=Vo(Bo);class Pi{constructor(d,L,W,te,ue){this.type=d,this.operator=L,this.interpolation=W,this.input=te,this.labels=[],this.outputs=[];for(let[me,ge]of ue)this.labels.push(me),this.outputs.push(ge)}static interpolationFactor(d,L,W,te){let ue=0;if(d.name==="exponential")ue=yo(L,d.base,W,te);else if(d.name==="linear")ue=yo(L,1,W,te);else if(d.name==="cubic-bezier"){let me=d.controlPoints;ue=new _o(me[0],me[1],me[2],me[3]).solve(yo(L,1,W,te))}return ue}static parse(d,L){let[W,te,ue,...me]=d;if(!Array.isArray(te)||te.length===0)return L.error("Expected an interpolation type expression.",1);if(te[0]==="linear")te={name:"linear"};else if(te[0]==="exponential"){let Te=te[1];if(typeof Te!="number")return L.error("Exponential interpolation requires a numeric base.",1,1);te={name:"exponential",base:Te}}else{if(te[0]!=="cubic-bezier")return L.error(`Unknown interpolation type ${String(te[0])}`,1,0);{let Te=te.slice(1);if(Te.length!==4||Te.some(Oe=>typeof Oe!="number"||Oe<0||Oe>1))return L.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);te={name:"cubic-bezier",controlPoints:Te}}}if(d.length-1<4)return L.error(`Expected at least 4 arguments, but found only ${d.length-1}.`);if((d.length-1)%2!=0)return L.error("Expected an even number of arguments.");if(ue=L.parse(ue,2,Rt),!ue)return null;let ge=[],Ce=null;W!=="interpolate-hcl"&&W!=="interpolate-lab"||L.expectedType==un?L.expectedType&&L.expectedType.kind!=="value"&&(Ce=L.expectedType):Ce=cr;for(let Te=0;Te=Oe)return L.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',it);let bt=L.parse(Pe,He,Ce);if(!bt)return null;Ce=Ce||bt.type,ge.push([Oe,bt])}return vi(Ce,Rt)||vi(Ce,Rr)||vi(Ce,cr)||vi(Ce,La)||vi(Ce,Xa)||vi(Ce,un)||vi(Ce,Nn)||vi(Ce,yn(Rt))?new Pi(Ce,W,te,ue,ge):L.error(`Type ${Un(Ce)} is not interpolatable.`)}evaluate(d){let L=this.labels,W=this.outputs;if(L.length===1)return W[0].evaluate(d);let te=this.input.evaluate(d);if(te<=L[0])return W[0].evaluate(d);let ue=L.length;if(te>=L[ue-1])return W[ue-1].evaluate(d);let me=Ls(L,te),ge=Pi.interpolationFactor(this.interpolation,te,L[me],L[me+1]),Ce=W[me].evaluate(d),Te=W[me+1].evaluate(d);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return tn(Ce,Te,ge);case"color":return rn.interpolate(Ce,Te,ge);case"padding":return fn.interpolate(Ce,Te,ge);case"colorArray":return jn.interpolate(Ce,Te,ge);case"numberArray":return Ai.interpolate(Ce,Te,ge);case"variableAnchorOffsetCollection":return gi.interpolate(Ce,Te,ge);case"array":return ai(Ce,Te,ge);case"projectionDefinition":return io.interpolate(Ce,Te,ge)}case"interpolate-hcl":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"hcl");case"colorArray":return jn.interpolate(Ce,Te,ge,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return rn.interpolate(Ce,Te,ge,"lab");case"colorArray":return jn.interpolate(Ce,Te,ge,"lab")}}}eachChild(d){d(this.input);for(let L of this.outputs)d(L)}outputDefined(){return this.outputs.every(d=>d.outputDefined())}}function yo(R,d,L,W){let te=W-L,ue=R-L;return te===0?0:d===1?ue/te:(Math.pow(d,ue)-1)/(Math.pow(d,te)-1)}let bs={color:rn.interpolate,number:tn,padding:fn.interpolate,numberArray:Ai.interpolate,colorArray:jn.interpolate,variableAnchorOffsetCollection:gi.interpolate,array:ai};class Dl{constructor(d,L){this.type=d,this.args=L}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=null,te=L.expectedType;te&&te.kind!=="value"&&(W=te);let ue=[];for(let ge of d.slice(1)){let Ce=L.parse(ge,1+ue.length,W,void 0,{typeAnnotation:"omit"});if(!Ce)return null;W=W||Ce.type,ue.push(Ce)}if(!W)throw new Error("No output type");let me=te&&ue.some(ge=>Yn(te,ge.type));return new Dl(me?Zr:W,ue)}evaluate(d){let L,W=null,te=0;for(let ue of this.args)if(te++,W=ue.evaluate(d),W&&W instanceof qi&&!W.available&&(L||(L=W.name),W=null,te===this.args.length&&(W=L)),W!==null)break;return W}eachChild(d){this.args.forEach(d)}outputDefined(){return this.args.every(d=>d.outputDefined())}}function hl(R,d){return R==="=="||R==="!="?d.kind==="boolean"||d.kind==="string"||d.kind==="number"||d.kind==="null"||d.kind==="value":d.kind==="string"||d.kind==="number"||d.kind==="value"}function ps(R,d,L,W){return W.compare(d,L)===0}function dl(R,d,L){let W=R!=="=="&&R!=="!=";return class ER{constructor(ue,me,ge){this.type=ur,this.lhs=ue,this.rhs=me,this.collator=ge,this.hasUntypedArgument=ue.type.kind==="value"||me.type.kind==="value"}static parse(ue,me){if(ue.length!==3&&ue.length!==4)return me.error("Expected two or three arguments.");let ge=ue[0],Ce=me.parse(ue[1],1,Zr);if(!Ce)return null;if(!hl(ge,Ce.type))return me.concat(1).error(`"${ge}" comparisons are not supported for type '${Un(Ce.type)}'.`);let Te=me.parse(ue[2],2,Zr);if(!Te)return null;if(!hl(ge,Te.type))return me.concat(2).error(`"${ge}" comparisons are not supported for type '${Un(Te.type)}'.`);if(Ce.type.kind!==Te.type.kind&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error(`Cannot compare types '${Un(Ce.type)}' and '${Un(Te.type)}'.`);W&&(Ce.type.kind==="value"&&Te.type.kind!=="value"?Ce=new go(Te.type,[Ce]):Ce.type.kind!=="value"&&Te.type.kind==="value"&&(Te=new go(Ce.type,[Te])));let Oe=null;if(ue.length===4){if(Ce.type.kind!=="string"&&Te.type.kind!=="string"&&Ce.type.kind!=="value"&&Te.type.kind!=="value")return me.error("Cannot use collator to compare non-string types.");if(Oe=me.parse(ue[3],3,ha),!Oe)return null}return new ER(Ce,Te,Oe)}evaluate(ue){let me=this.lhs.evaluate(ue),ge=this.rhs.evaluate(ue);if(W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!==Te.kind||Ce.kind!=="string"&&Ce.kind!=="number")throw new Xn(`Expected arguments for "${R}" to be (string, string) or (number, number), but found (${Ce.kind}, ${Te.kind}) instead.`)}if(this.collator&&!W&&this.hasUntypedArgument){let Ce=qn(me),Te=qn(ge);if(Ce.kind!=="string"||Te.kind!=="string")return d(ue,me,ge)}return this.collator?L(ue,me,ge,this.collator.evaluate(ue)):d(ue,me,ge)}eachChild(ue){ue(this.lhs),ue(this.rhs),this.collator&&ue(this.collator)}outputDefined(){return!0}}}let wu=dl("==",function(R,d,L){return d===L},ps),lu=dl("!=",function(R,d,L){return d!==L},function(R,d,L,W){return!ps(0,d,L,W)}),xc=dl("<",function(R,d,L){return d",function(R,d,L){return d>L},function(R,d,L,W){return W.compare(d,L)>0}),pl=dl("<=",function(R,d,L){return d<=L},function(R,d,L,W){return W.compare(d,L)<=0}),$u=dl(">=",function(R,d,L){return d>=L},function(R,d,L,W){return W.compare(d,L)>=0});class uu{constructor(d,L,W){this.type=ha,this.locale=W,this.caseSensitive=d,this.diacriticSensitive=L}static parse(d,L){if(d.length!==2)return L.error("Expected one argument.");let W=d[1];if(typeof W!="object"||Array.isArray(W))return L.error("Collator options argument must be an object.");let te=L.parse(W["case-sensitive"]!==void 0&&W["case-sensitive"],1,ur);if(!te)return null;let ue=L.parse(W["diacritic-sensitive"]!==void 0&&W["diacritic-sensitive"],1,ur);if(!ue)return null;let me=null;return W.locale&&(me=L.parse(W.locale,1,nr),!me)?null:new uu(te,ue,me)}evaluate(d){return new Ri(this.caseSensitive.evaluate(d),this.diacriticSensitive.evaluate(d),this.locale?this.locale.evaluate(d):null)}eachChild(d){d(this.caseSensitive),d(this.diacriticSensitive),this.locale&&d(this.locale)}outputDefined(){return!1}}class tl{constructor(d,L,W,te,ue,me){this.type=nr,this.number=d,this.locale=L,this.currency=W,this.unit=te,this.minFractionDigits=ue,this.maxFractionDigits=me}static parse(d,L){if(d.length!==3)return L.error("Expected two arguments.");let W=L.parse(d[1],1,Rt);if(!W)return null;let te=d[2];if(typeof te!="object"||Array.isArray(te))return L.error("NumberFormat options argument must be an object.");let ue=null;if(te.locale&&(ue=L.parse(te.locale,1,nr),!ue))return null;let me=null;if(te.currency&&(me=L.parse(te.currency,1,nr),!me))return null;let ge=null;if(te.unit&&(ge=L.parse(te.unit,1,nr),!ge))return null;if(me&&ge)return L.error("NumberFormat options `currency` and `unit` are mutually exclusive");let Ce=null;if(te["min-fraction-digits"]&&(Ce=L.parse(te["min-fraction-digits"],1,Rt),!Ce))return null;let Te=null;return te["max-fraction-digits"]&&(Te=L.parse(te["max-fraction-digits"],1,Rt),!Te)?null:new tl(W,ue,me,ge,Ce,Te)}evaluate(d){return new Intl.NumberFormat(this.locale?this.locale.evaluate(d):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(d):void 0,unit:this.unit?this.unit.evaluate(d):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(d):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(d):void 0}).format(this.number.evaluate(d))}eachChild(d){d(this.number),this.locale&&d(this.locale),this.currency&&d(this.currency),this.unit&&d(this.unit),this.minFractionDigits&&d(this.minFractionDigits),this.maxFractionDigits&&d(this.maxFractionDigits)}outputDefined(){return!1}}class vs{constructor(d){this.type=Pa,this.sections=d}static parse(d,L){if(d.length<2)return L.error("Expected at least one argument.");let W=d[1];if(!Array.isArray(W)&&typeof W=="object")return L.error("First argument must be an image or text section.");let te=[],ue=!1;for(let me=1;me<=d.length-1;++me){let ge=d[me];if(ue&&typeof ge=="object"&&!Array.isArray(ge)){ue=!1;let Ce=null;if(ge["font-scale"]&&(Ce=L.parse(ge["font-scale"],1,Rt),!Ce))return null;let Te=null;if(ge["text-font"]&&(Te=L.parse(ge["text-font"],1,yn(nr)),!Te))return null;let Oe=null;if(ge["text-color"]&&(Oe=L.parse(ge["text-color"],1,cr),!Oe))return null;let Pe=null;if(ge["vertical-align"]){if(typeof ge["vertical-align"]=="string"&&!Gn.includes(ge["vertical-align"]))return L.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${ge["vertical-align"]}' instead.`);if(Pe=L.parse(ge["vertical-align"],1,nr),!Pe)return null}let it=te[te.length-1];it.scale=Ce,it.font=Te,it.textColor=Oe,it.verticalAlign=Pe}else{let Ce=L.parse(d[me],1,Zr);if(!Ce)return null;let Te=Ce.type.kind;if(Te!=="string"&&Te!=="value"&&Te!=="null"&&Te!=="resolvedImage")return L.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");ue=!0,te.push({content:Ce,scale:null,font:null,textColor:null,verticalAlign:null})}}return new vs(te)}evaluate(d){return new Di(this.sections.map(L=>{let W=L.content.evaluate(d);return qn(W)===ja?new no("",W,null,null,null,L.verticalAlign?L.verticalAlign.evaluate(d):null):new no(Hi(W),null,L.scale?L.scale.evaluate(d):null,L.font?L.font.evaluate(d).join(","):null,L.textColor?L.textColor.evaluate(d):null,L.verticalAlign?L.verticalAlign.evaluate(d):null)}))}eachChild(d){for(let L of this.sections)d(L.content),L.scale&&d(L.scale),L.font&&d(L.font),L.textColor&&d(L.textColor),L.verticalAlign&&d(L.verticalAlign)}outputDefined(){return!1}}class os{constructor(d){this.type=ja,this.input=d}static parse(d,L){if(d.length!==2)return L.error("Expected two arguments.");let W=L.parse(d[1],1,nr);return W?new os(W):L.error("No image name provided.")}evaluate(d){let L=this.input.evaluate(d),W=qi.fromString(L);return W&&d.availableImages&&(W.available=d.availableImages.indexOf(L)>-1),W}eachChild(d){d(this.input)}outputDefined(){return!1}}class ms{constructor(d){this.type=Rt,this.input=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=L.parse(d[1],1);return W?W.type.kind!=="array"&&W.type.kind!=="string"&&W.type.kind!=="value"?L.error(`Expected argument of type string or array, but found ${Un(W.type)} instead.`):new ms(W):null}evaluate(d){let L=this.input.evaluate(d);if(typeof L=="string")return[...L].length;if(Array.isArray(L))return L.length;throw new Xn(`Expected value to be of type string or array, but found ${Un(qn(L))} instead.`)}eachChild(d){d(this.input)}outputDefined(){return!1}}let rl=8192;function Fu(R,d){let L=(180+R[0])/360,W=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R[1]*Math.PI/360)))/360,te=Math.pow(2,d.z);return[Math.round(L*te*rl),Math.round(W*te*rl)]}function zu(R,d){let L=Math.pow(2,d.z);return[(te=(R[0]/rl+d.x)/L,360*te-180),(W=(R[1]/rl+d.y)/L,360/Math.PI*Math.atan(Math.exp((180-360*W)*Math.PI/180))-90)];var W,te}function Ku(R,d){R[0]=Math.min(R[0],d[0]),R[1]=Math.min(R[1],d[1]),R[2]=Math.max(R[2],d[0]),R[3]=Math.max(R[3],d[1])}function bc(R,d){return!(R[0]<=d[0]||R[2]>=d[2]||R[1]<=d[1]||R[3]>=d[3])}function Lh(R,d,L){let W=R[0]-d[0],te=R[1]-d[1],ue=R[0]-L[0],me=R[1]-L[1];return W*me-ue*te==0&&W*ue<=0&&te*me<=0}function rh(R,d,L,W){return(te=[W[0]-L[0],W[1]-L[1]])[0]*(ue=[d[0]-R[0],d[1]-R[1]])[1]-te[1]*ue[0]!=0&&!(!Nf(R,d,L,W)||!Nf(L,W,R,d));var te,ue}function Ju(R,d,L){for(let W of L)for(let te=0;te(te=R)[1]!=(me=ge[Ce+1])[1]>te[1]&&te[0]<(me[0]-ue[0])*(te[1]-ue[1])/(me[1]-ue[1])+ue[0]&&(W=!W)}var te,ue,me;return W}function ah(R,d){for(let L of d)if(ss(R,L))return!0;return!1}function wc(R,d){for(let L of R)if(!ss(L,d))return!1;for(let L=0;L0&&ge<0||me<0&&ge>0}function Bu(R,d,L){let W=[];for(let te=0;teL[2]){let te=.5*W,ue=R[0]-L[0]>te?-W:L[0]-R[0]>te?W:0;ue===0&&(ue=R[0]-L[2]>te?-W:L[2]-R[0]>te?W:0),R[0]+=ue}Ku(d,R)}function Gc(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let ge of R)for(let Ce of ge){let Te=[Ce.x+ue[0],Ce.y+ue[1]];Ou(Te,d,L,te),me.push(Te)}return me}function pf(R,d,L,W){let te=Math.pow(2,W.z)*rl,ue=[W.x*rl,W.y*rl],me=[];for(let Ce of R){let Te=[];for(let Oe of Ce){let Pe=[Oe.x+ue[0],Oe.y+ue[1]];Ku(d,Pe),Te.push(Pe)}me.push(Te)}if(d[2]-d[0]<=te/2){(ge=d)[0]=ge[1]=1/0,ge[2]=ge[3]=-1/0;for(let Ce of me)for(let Te of Ce)Ou(Te,d,L,te)}var ge;return me}class $l{constructor(d,L){this.type=ur,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'within' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection"){let te=[];for(let ue of W.features){let{type:me,coordinates:ge}=ue.geometry;me==="Polygon"&&te.push(ge),me==="MultiPolygon"&&te.push(...ge)}if(te.length)return new $l(W,{type:"MultiPolygon",coordinates:te})}else if(W.type==="Feature"){let te=W.geometry.type;if(te==="Polygon"||te==="MultiPolygon")return new $l(W,W.geometry)}else if(W.type==="Polygon"||W.type==="MultiPolygon")return new $l(W,W)}return L.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ss(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=Gc(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!ah(Te,ge))return!1}return!0}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=[1/0,1/0,-1/0,-1/0],ue=[1/0,1/0,-1/0,-1/0],me=L.canonicalID();if(W.type==="Polygon"){let ge=Bu(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!wc(Te,ge))return!1}if(W.type==="MultiPolygon"){let ge=Tc(W.coordinates,ue,me),Ce=pf(L.geometry(),te,ue,me);if(!bc(te,ue))return!1;for(let Te of Ce)if(!pc(Te,ge))return!1}return!0}(d,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let jf=class{constructor(R=[],d=(L,W)=>LW?1:0){if(this.data=R,this.length=this.data.length,this.compare=d,this.length>0)for(let L=(this.length>>1)-1;L>=0;L--)this._down(L)}push(R){this.data.push(R),this._up(this.length++)}pop(){if(this.length===0)return;let R=this.data[0],d=this.data.pop();return--this.length>0&&(this.data[0]=d,this._down(0)),R}peek(){return this.data[0]}_up(R){let{data:d,compare:L}=this,W=d[R];for(;R>0;){let te=R-1>>1,ue=d[te];if(L(W,ue)>=0)break;d[R]=ue,R=te}d[R]=W}_down(R){let{data:d,compare:L}=this,W=this.length>>1,te=d[R];for(;R=0)break;d[R]=d[ue],R=ue}d[R]=te}};function Hc(R,d,L=0,W=R.length-1,te=Qu){for(;W>L;){if(W-L>600){let Ce=W-L+1,Te=d-L+1,Oe=Math.log(Ce),Pe=.5*Math.exp(2*Oe/3),it=.5*Math.sqrt(Oe*Pe*(Ce-Pe)/Ce)*(Te-Ce/2<0?-1:1);Hc(R,d,Math.max(L,Math.floor(d-Te*Pe/Ce+it)),Math.min(W,Math.floor(d+(Ce-Te)*Pe/Ce+it)),te)}let ue=R[d],me=L,ge=W;for(Wc(R,L,d),te(R[W],ue)>0&&Wc(R,L,W);me0;)ge--}te(R[L],ue)===0?Wc(R,L,ge):(ge++,Wc(R,ge,W)),ge<=d&&(L=ge+1),d<=ge&&(W=ge-1)}}function Wc(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function Qu(R,d){return Rd?1:0}function Yc(R,d){if(R.length<=1)return[R];let L=[],W,te;for(let ue of R){let me=Uf(ue);me!==0&&(ue.area=Math.abs(me),te===void 0&&(te=me<0),te===me<0?(W&&L.push(W),W=[ue]):W.push(ue))}if(W&&L.push(W),d>1)for(let ue=0;ue1?(Te=d[Ce+1][0],Oe=d[Ce+1][1]):He>0&&(Te+=Pe/this.kx*He,Oe+=it/this.ky*He)),Pe=this.wrap(L[0]-Te)*this.kx,it=(L[1]-Oe)*this.ky;let bt=Pe*Pe+it*it;bt180;)d-=360;return d}}function Zc(R,d){return d[0]-R[0]}function ec(R){return R[1]-R[0]+1}function cu(R,d){return R[1]>=R[0]&&R[1]R[1])return[null,null];let L=ec(R);if(d){if(L===2)return[R,null];let te=Math.floor(L/2);return[[R[0],R[0]+te],[R[0]+te,R[1]]]}if(L===1)return[R,null];let W=Math.floor(L/2)-1;return[[R[0],R[0]+W],[R[0]+W+1,R[1]]]}function vf(R,d){if(!cu(d,R.length))return[1/0,1/0,-1/0,-1/0];let L=[1/0,1/0,-1/0,-1/0];for(let W=d[0];W<=d[1];++W)Ku(L,R[W]);return L}function Tu(R){let d=[1/0,1/0,-1/0,-1/0];for(let L of R)for(let W of L)Ku(d,W);return d}function nh(R){return R[0]!==-1/0&&R[1]!==-1/0&&R[2]!==1/0&&R[3]!==1/0}function vl(R,d,L){if(!nh(R)||!nh(d))return NaN;let W=0,te=0;return R[2]d[2]&&(W=R[0]-d[2]),R[1]>d[3]&&(te=R[1]-d[3]),R[3]=W)return W;if(bc(te,ue)){if(mf(R,d))return 0}else if(mf(d,R))return 0;let me=1/0;for(let ge of R)for(let Ce=0,Te=ge.length,Oe=Te-1;Ce0;){let Ce=me.pop();if(Ce[0]>=ue)continue;let Te=Ce[1],Oe=d?50:100;if(ec(Te)<=Oe){if(!cu(Te,R.length))return NaN;if(d){let Pe=Mc(R,Te,L,W);if(isNaN(Pe)||Pe===0)return Pe;ue=Math.min(ue,Pe)}else for(let Pe=Te[0];Pe<=Te[1];++Pe){let it=ac(R[Pe],L,W);if(ue=Math.min(ue,it),ue===0)return 0}}else{let Pe=tc(Te,d);ih(me,ue,W,R,ge,Pe[0]),ih(me,ue,W,R,ge,Pe[1])}}return ue}function El(R,d,L,W,te,ue=1/0){let me=Math.min(ue,te.distance(R[0],L[0]));if(me===0)return me;let ge=new jf([[0,[0,R.length-1],[0,L.length-1]]],Zc);for(;ge.length>0;){let Ce=ge.pop();if(Ce[0]>=me)continue;let Te=Ce[1],Oe=Ce[2],Pe=d?50:100,it=W?50:100;if(ec(Te)<=Pe&&ec(Oe)<=it){if(!cu(Te,R.length)&&cu(Oe,L.length))return NaN;let He;if(d&&W)He=yl(R,Te,L,Oe,te),me=Math.min(me,He);else if(d&&!W){let bt=R.slice(Te[0],Te[1]+1);for(let Et=Oe[0];Et<=Oe[1];++Et)if(He=ml(L[Et],bt,te),me=Math.min(me,He),me===0)return me}else if(!d&&W){let bt=L.slice(Oe[0],Oe[1]+1);for(let Et=Te[0];Et<=Te[1];++Et)if(He=ml(R[Et],bt,te),me=Math.min(me,He),me===0)return me}else He=qf(R,Te,L,Oe,te),me=Math.min(me,He)}else{let He=tc(Te,d),bt=tc(Oe,W);fu(ge,me,te,R,L,He[0],bt[0]),fu(ge,me,te,R,L,He[0],bt[1]),fu(ge,me,te,R,L,He[1],bt[0]),fu(ge,me,te,R,L,He[1],bt[1])}}return me}function oh(R){return R.type==="MultiPolygon"?R.coordinates.map(d=>({type:"Polygon",coordinates:d})):R.type==="MultiLineString"?R.coordinates.map(d=>({type:"LineString",coordinates:d})):R.type==="MultiPoint"?R.coordinates.map(d=>({type:"Point",coordinates:d})):[R]}class Au{constructor(d,L){this.type=Rt,this.geojson=d,this.geometries=L}static parse(d,L){if(d.length!==2)return L.error(`'distance' expression requires exactly one argument, but found ${d.length-1} instead.`);if(Vn(d[1])){let W=d[1];if(W.type==="FeatureCollection")return new Au(W,W.features.map(te=>oh(te.geometry)).flat());if(W.type==="Feature")return new Au(W,oh(W.geometry));if("type"in W&&"coordinates"in W)return new Au(W,oh(W))}return L.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(d){if(d.geometry()!=null&&d.canonicalID()!=null){if(d.geometryType()==="Point")return function(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!1,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!1,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!1,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="LineString")return function(L,W){let te=L.geometry(),ue=te.flat().map(Ce=>zu([Ce.x,Ce.y],L.canonical));if(te.length===0)return NaN;let me=new Ac(ue[0][1]),ge=1/0;for(let Ce of W){switch(Ce.type){case"Point":ge=Math.min(ge,El(ue,!0,[Ce.coordinates],!1,me,ge));break;case"LineString":ge=Math.min(ge,El(ue,!0,Ce.coordinates,!0,me,ge));break;case"Polygon":ge=Math.min(ge,Sl(ue,!0,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries);if(d.geometryType()==="Polygon")return function(L,W){let te=L.geometry();if(te.length===0||te[0].length===0)return NaN;let ue=Yc(te,0).map(Ce=>Ce.map(Te=>Te.map(Oe=>zu([Oe.x,Oe.y],L.canonical)))),me=new Ac(ue[0][0][0][1]),ge=1/0;for(let Ce of W)for(let Te of ue){switch(Ce.type){case"Point":ge=Math.min(ge,Sl([Ce.coordinates],!1,Te,me,ge));break;case"LineString":ge=Math.min(ge,Sl(Ce.coordinates,!0,Te,me,ge));break;case"Polygon":ge=Math.min(ge,Jo(Te,Ce.coordinates,me,ge))}if(ge===0)return ge}return ge}(d,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class $c{constructor(d){this.type=Zr,this.key=d}static parse(d,L){if(d.length!==2)return L.error(`Expected 1 argument, but found ${d.length-1} instead.`);let W=d[1];return W==null?L.error("Global state property must be defined."):typeof W!="string"?L.error(`Global state property must be string, but found ${typeof d[1]} instead.`):new $c(W)}evaluate(d){var L;let W=(L=d.globals)===null||L===void 0?void 0:L.globalState;return W&&Object.keys(W).length!==0?zr(W,this.key):null}eachChild(){}outputDefined(){return!1}}let _l={"==":wu,"!=":lu,">":Fl,"<":xc,">=":$u,"<=":pl,array:go,at:pi,boolean:go,case:Ko,coalesce:Dl,collator:uu,format:vs,image:os,in:Vi,"index-of":Io,interpolate:Pi,"interpolate-hcl":Pi,"interpolate-lab":Pi,length:ms,let:to,literal:Mi,match:Xi,number:go,"number-format":tl,object:go,slice:Uo,step:Ss,string:go,"to-boolean":Ao,"to-color":Ao,"to-number":Ao,"to-string":Ao,var:wo,within:$l,distance:Au,"global-state":$c};class nl{constructor(d,L,W,te){this.name=d,this.type=L,this._evaluate=W,this.args=te}evaluate(d){return this._evaluate(d,this.args)}eachChild(d){this.args.forEach(d)}outputDefined(){return!1}static parse(d,L){let W=d[0],te=nl.definitions[W];if(!te)return L.error(`Unknown expression "${W}". If you wanted a literal array, use ["literal", [...]].`,0);let ue=Array.isArray(te)?te[0]:te.type,me=Array.isArray(te)?[[te[1],te[2]]]:te.overloads,ge=me.filter(([Te])=>!Array.isArray(Te)||Te.length===d.length-1),Ce=null;for(let[Te,Oe]of ge){Ce=new Wo(L.registry,Uu,L.path,null,L.scope);let Pe=[],it=!1;for(let He=1;He{return it=Pe,Array.isArray(it)?`(${it.map(Un).join(", ")})`:`(${Un(it.type)}...)`;var it}).join(" | "),Oe=[];for(let Pe=1;Pe{L=d?L&&Uu(W):L&&W instanceof Mi}),!!L&&qu(R)&&yf(R,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function qu(R){if(R instanceof nl&&(R.name==="get"&&R.args.length===1||R.name==="feature-state"||R.name==="has"&&R.args.length===1||R.name==="properties"||R.name==="geometry-type"||R.name==="id"||/^filter-/.test(R.name))||R instanceof $l||R instanceof Au)return!1;let d=!0;return R.eachChild(L=>{d&&!qu(L)&&(d=!1)}),d}function nc(R){if(R instanceof nl&&R.name==="feature-state")return!1;let d=!0;return R.eachChild(L=>{d&&!nc(L)&&(d=!1)}),d}function yf(R,d){if(R instanceof nl&&d.indexOf(R.name)>=0)return!1;let L=!0;return R.eachChild(W=>{L&&!yf(W,d)&&(L=!1)}),L}function _f(R){return{result:"success",value:R}}function Mu(R){return{result:"error",value:R}}function ic(R){return R["property-type"]==="data-driven"||R["property-type"]==="cross-faded-data-driven"}function Sc(R){return!!R.expression&&R.expression.parameters.indexOf("zoom")>-1}function Vu(R){return!!R.expression&&R.expression.interpolated}function xo(R){return R instanceof Number?"number":R instanceof String?"string":R instanceof Boolean?"boolean":Array.isArray(R)?"array":R===null?"null":typeof R}function Ec(R){return typeof R=="object"&&R!==null&&!Array.isArray(R)&&qn(R)===Qr}function xh(R){return R}function Vf(R,d){let L=R.stops&&typeof R.stops[0][0]=="object",W=L||!(L||R.property!==void 0),te=R.type||(Vu(d)?"exponential":"interval"),ue=function(Oe){switch(Oe.type){case"color":return rn.parse;case"padding":return fn.parse;case"numberArray":return Ai.parse;case"colorArray":return jn.parse;default:return null}}(d);if(ue&&((R=Ht({},R)).stops&&(R.stops=R.stops.map(Oe=>[Oe[0],ue(Oe[1])])),R.default=ue(R.default?R.default:d.default)),R.colorSpace&&(me=R.colorSpace)!=="rgb"&&me!=="hcl"&&me!=="lab")throw new Error(`Unknown color space: "${R.colorSpace}"`);var me;let ge=function(Oe){switch(Oe){case"exponential":return Hf;case"interval":return bh;case"categorical":return Gf;case"identity":return il;default:throw new Error(`Unknown function type "${Oe}"`)}}(te),Ce,Te;if(te==="categorical"){Ce=Object.create(null);for(let Oe of R.stops)Ce[Oe[0]]=Oe[1];Te=typeof R.stops[0][0]}if(L){let Oe={},Pe=[];for(let bt=0;btbt[0]),evaluate:({zoom:bt},Et)=>Hf({stops:it,base:R.base},d,bt).evaluate(bt,Et)}}if(W){let Oe=te==="exponential"?{name:"exponential",base:R.base!==void 0?R.base:1}:null;return{kind:"camera",interpolationType:Oe,interpolationFactor:Pi.interpolationFactor.bind(void 0,Oe),zoomStops:R.stops.map(Pe=>Pe[0]),evaluate:({zoom:Pe})=>ge(R,d,Pe,Ce,Te)}}return{kind:"source",evaluate(Oe,Pe){let it=Pe&&Pe.properties?Pe.properties[R.property]:void 0;return it===void 0?xf(R.default,d.default):ge(R,d,it,Ce,Te)}}}function xf(R,d,L){return R!==void 0?R:d!==void 0?d:L!==void 0?L:void 0}function Gf(R,d,L,W,te){return xf(typeof L===te?W[L]:void 0,R.default,d.default)}function bh(R,d,L){if(xo(L)!=="number")return xf(R.default,d.default);let W=R.stops.length;if(W===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[W-1][0])return R.stops[W-1][1];let te=Ls(R.stops.map(ue=>ue[0]),L);return R.stops[te][1]}function Hf(R,d,L){let W=R.base!==void 0?R.base:1;if(xo(L)!=="number")return xf(R.default,d.default);let te=R.stops.length;if(te===1||L<=R.stops[0][0])return R.stops[0][1];if(L>=R.stops[te-1][0])return R.stops[te-1][1];let ue=Ls(R.stops.map(Oe=>Oe[0]),L),me=function(Oe,Pe,it,He){let bt=He-it,Et=Oe-it;return bt===0?0:Pe===1?Et/bt:(Math.pow(Pe,Et)-1)/(Math.pow(Pe,bt)-1)}(L,W,R.stops[ue][0],R.stops[ue+1][0]),ge=R.stops[ue][1],Ce=R.stops[ue+1][1],Te=bs[d.type]||xh;return typeof ge.evaluate=="function"?{evaluate(...Oe){let Pe=ge.evaluate.apply(void 0,Oe),it=Ce.evaluate.apply(void 0,Oe);if(Pe!==void 0&&it!==void 0)return Te(Pe,it,me,R.colorSpace)}}:Te(ge,Ce,me,R.colorSpace)}function il(R,d,L){switch(d.type){case"color":L=rn.parse(L);break;case"formatted":L=Di.fromString(L.toString());break;case"resolvedImage":L=qi.fromString(L.toString());break;case"padding":L=fn.parse(L);break;case"colorArray":L=jn.parse(L);break;case"numberArray":L=Ai.parse(L);break;default:xo(L)===d.type||d.type==="enum"&&d.values[L]||(L=void 0)}return xf(L,R.default,d.default)}nl.register(_l,{error:[{kind:"error"},[nr],(R,[d])=>{throw new Xn(d.evaluate(R))}],typeof:[nr,[Zr],(R,[d])=>Un(qn(d.evaluate(R)))],"to-rgba":[yn(Rt,4),[cr],(R,[d])=>{let[L,W,te,ue]=d.evaluate(R).rgb;return[255*L,255*W,255*te,ue]}],rgb:[cr,[Rt,Rt,Rt],gf],rgba:[cr,[Rt,Rt,Rt,Rt],gf],has:{type:ur,overloads:[[[nr],(R,[d])=>Kc(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>Kc(d.evaluate(R),L.evaluate(R))]]},get:{type:Zr,overloads:[[[nr],(R,[d])=>sh(d.evaluate(R),R.properties())],[[nr,Qr],(R,[d,L])=>sh(d.evaluate(R),L.evaluate(R))]]},"feature-state":[Zr,[nr],(R,[d])=>sh(d.evaluate(R),R.featureState||{})],properties:[Qr,[],R=>R.properties()],"geometry-type":[nr,[],R=>R.geometryType()],id:[Zr,[],R=>R.id()],zoom:[Rt,[],R=>R.globals.zoom],"heatmap-density":[Rt,[],R=>R.globals.heatmapDensity||0],elevation:[Rt,[],R=>R.globals.elevation||0],"line-progress":[Rt,[],R=>R.globals.lineProgress||0],accumulated:[Zr,[],R=>R.globals.accumulated===void 0?null:R.globals.accumulated],"+":[Rt,hu(Rt),(R,d)=>{let L=0;for(let W of d)L+=W.evaluate(R);return L}],"*":[Rt,hu(Rt),(R,d)=>{let L=1;for(let W of d)L*=W.evaluate(R);return L}],"-":{type:Rt,overloads:[[[Rt,Rt],(R,[d,L])=>d.evaluate(R)-L.evaluate(R)],[[Rt],(R,[d])=>-d.evaluate(R)]]},"/":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)/L.evaluate(R)],"%":[Rt,[Rt,Rt],(R,[d,L])=>d.evaluate(R)%L.evaluate(R)],ln2:[Rt,[],()=>Math.LN2],pi:[Rt,[],()=>Math.PI],e:[Rt,[],()=>Math.E],"^":[Rt,[Rt,Rt],(R,[d,L])=>Math.pow(d.evaluate(R),L.evaluate(R))],sqrt:[Rt,[Rt],(R,[d])=>Math.sqrt(d.evaluate(R))],log10:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN10],ln:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))],log2:[Rt,[Rt],(R,[d])=>Math.log(d.evaluate(R))/Math.LN2],sin:[Rt,[Rt],(R,[d])=>Math.sin(d.evaluate(R))],cos:[Rt,[Rt],(R,[d])=>Math.cos(d.evaluate(R))],tan:[Rt,[Rt],(R,[d])=>Math.tan(d.evaluate(R))],asin:[Rt,[Rt],(R,[d])=>Math.asin(d.evaluate(R))],acos:[Rt,[Rt],(R,[d])=>Math.acos(d.evaluate(R))],atan:[Rt,[Rt],(R,[d])=>Math.atan(d.evaluate(R))],min:[Rt,hu(Rt),(R,d)=>Math.min(...d.map(L=>L.evaluate(R)))],max:[Rt,hu(Rt),(R,d)=>Math.max(...d.map(L=>L.evaluate(R)))],abs:[Rt,[Rt],(R,[d])=>Math.abs(d.evaluate(R))],round:[Rt,[Rt],(R,[d])=>{let L=d.evaluate(R);return L<0?-Math.round(-L):Math.round(L)}],floor:[Rt,[Rt],(R,[d])=>Math.floor(d.evaluate(R))],ceil:[Rt,[Rt],(R,[d])=>Math.ceil(d.evaluate(R))],"filter-==":[ur,[nr,Zr],(R,[d,L])=>R.properties()[d.value]===L.value],"filter-id-==":[ur,[Zr],(R,[d])=>R.id()===d.value],"filter-type-==":[ur,[nr],(R,[d])=>R.geometryType()===d.value],"filter-<":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W{let L=R.id(),W=d.value;return typeof L==typeof W&&L":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>te}],"filter-id->":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>W}],"filter-<=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W<=te}],"filter-id-<=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L<=W}],"filter->=":[ur,[nr,Zr],(R,[d,L])=>{let W=R.properties()[d.value],te=L.value;return typeof W==typeof te&&W>=te}],"filter-id->=":[ur,[Zr],(R,[d])=>{let L=R.id(),W=d.value;return typeof L==typeof W&&L>=W}],"filter-has":[ur,[Zr],(R,[d])=>d.value in R.properties()],"filter-has-id":[ur,[],R=>R.id()!==null&&R.id()!==void 0],"filter-type-in":[ur,[yn(nr)],(R,[d])=>d.value.indexOf(R.geometryType())>=0],"filter-id-in":[ur,[yn(Zr)],(R,[d])=>d.value.indexOf(R.id())>=0],"filter-in-small":[ur,[nr,yn(Zr)],(R,[d,L])=>L.value.indexOf(R.properties()[d.value])>=0],"filter-in-large":[ur,[nr,yn(Zr)],(R,[d,L])=>function(W,te,ue,me){for(;ue<=me;){let ge=ue+me>>1;if(te[ge]===W)return!0;te[ge]>W?me=ge-1:ue=ge+1}return!1}(R.properties()[d.value],L.value,0,L.value.length-1)],all:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)&&L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(!L.evaluate(R))return!1;return!0}]]},any:{type:ur,overloads:[[[ur,ur],(R,[d,L])=>d.evaluate(R)||L.evaluate(R)],[hu(ur),(R,d)=>{for(let L of d)if(L.evaluate(R))return!0;return!1}]]},"!":[ur,[ur],(R,[d])=>!d.evaluate(R)],"is-supported-script":[ur,[nr],(R,[d])=>{let L=R.globals&&R.globals.isSupportedScript;return!L||L(d.evaluate(R))}],upcase:[nr,[nr],(R,[d])=>d.evaluate(R).toUpperCase()],downcase:[nr,[nr],(R,[d])=>d.evaluate(R).toLowerCase()],concat:[nr,hu(Zr),(R,d)=>d.map(L=>Hi(L.evaluate(R))).join("")],split:[yn(nr),[nr,nr],(R,[d,L])=>d.evaluate(R).split(L.evaluate(R))],join:[nr,[yn(nr),nr],(R,[d,L])=>d.evaluate(R).join(L.evaluate(R))],"resolved-locale":[nr,[ha],(R,[d])=>d.evaluate(R).resolvedLocale()]});class kl{constructor(d,L,W){this.expression=d,this._warningHistory={},this._evaluator=new jo,this._defaultValue=L?function(te){if(te.type==="color"&&Ec(te.default))return new rn(0,0,0,0);switch(te.type){case"color":return rn.parse(te.default)||null;case"padding":return fn.parse(te.default)||null;case"numberArray":return Ai.parse(te.default)||null;case"colorArray":return jn.parse(te.default)||null;case"variableAnchorOffsetCollection":return gi.parse(te.default)||null;case"projectionDefinition":return io.parse(te.default)||null;default:return te.default===void 0?null:te.default}}(L):null,this._enumValues=L&&L.type==="enum"?L.values:null,this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L,this._evaluator.featureState=W,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me,this.expression.evaluate(this._evaluator)}evaluate(d,L,W,te,ue,me){this._globalState&&(d=ea(d,this._globalState)),this._evaluator.globals=d,this._evaluator.feature=L||null,this._evaluator.featureState=W||null,this._evaluator.canonical=te,this._evaluator.availableImages=ue||null,this._evaluator.formattedSection=me||null;try{let ge=this.expression.evaluate(this._evaluator);if(ge==null||typeof ge=="number"&&ge!=ge)return this._defaultValue;if(this._enumValues&&!(ge in this._enumValues))throw new Xn(`Expected value to be one of ${Object.keys(this._enumValues).map(Ce=>JSON.stringify(Ce)).join(", ")}, but found ${JSON.stringify(ge)} instead.`);return ge}catch(ge){return this._warningHistory[ge.message]||(this._warningHistory[ge.message]=!0,typeof console<"u"&&console.warn(ge.message)),this._defaultValue}}}function kc(R){return Array.isArray(R)&&R.length>0&&typeof R[0]=="string"&&R[0]in _l}function Cc(R,d,L){let W=new Wo(_l,Uu,[],d?function(ue){let me={color:cr,string:nr,number:Rt,enum:nr,boolean:ur,formatted:Pa,padding:La,numberArray:Xa,colorArray:un,projectionDefinition:Rr,resolvedImage:ja,variableAnchorOffsetCollection:Nn};return ue.type==="array"?yn(me[ue.value]||Zr,ue.length):me[ue.type]}(d):void 0),te=W.parse(R,void 0,void 0,void 0,d&&d.type==="string"?{typeAnnotation:"coerce"}:void 0);return te?_f(new kl(te,d,L)):Mu(W.errors)}class Lc{constructor(d,L,W){this.kind=d,this._styleExpression=L,this.isStateDependent=d!=="constant"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this._globalState=W}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}}class vc{constructor(d,L,W,te,ue){this.kind=d,this.zoomStops=W,this._styleExpression=L,this.isStateDependent=d!=="camera"&&!nc(L.expression),this.globalStateRefs=wr(L.expression),this.interpolationType=te,this._globalState=ue}evaluateWithoutErrorHandling(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(d,L,W,te,ue,me)}evaluate(d,L,W,te,ue,me){return this._globalState&&(d=ea(d,this._globalState)),this._styleExpression.evaluate(d,L,W,te,ue,me)}interpolationFactor(d,L,W){return this.interpolationType?Pi.interpolationFactor(this.interpolationType,d,L,W):0}}function Ft(R,d,L){let W=Cc(R,d,L);if(W.result==="error")return W;let te=W.value.expression,ue=qu(te);if(!ue&&!ic(d))return Mu([new Sr("","data expressions not supported")]);let me=yf(te,["zoom"]);if(!me&&!Sc(d))return Mu([new Sr("","zoom expressions not supported")]);let ge=Fr(te);return ge||me?ge instanceof Sr?Mu([ge]):ge instanceof Pi&&!Vu(d)?Mu([new Sr("",'"interpolate" expressions cannot be used with this property')]):_f(ge?new vc(ue?"camera":"composite",W.value,ge.labels,ge instanceof Pi?ge.interpolation:void 0,L):new Lc(ue?"constant":"source",W.value,L)):Mu([new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class tr{constructor(d,L){this._parameters=d,this._specification=L,Ht(this,Vf(this._parameters,this._specification))}static deserialize(d){return new tr(d._parameters,d._specification)}static serialize(d){return{_parameters:d._parameters,_specification:d._specification}}}function Fr(R){let d=null;if(R instanceof to)d=Fr(R.result);else if(R instanceof Dl){for(let L of R.args)if(d=Fr(L),d)break}else(R instanceof Ss||R instanceof Pi)&&R.input instanceof nl&&R.input.name==="zoom"&&(d=R);return d instanceof Sr||R.eachChild(L=>{let W=Fr(L);W instanceof Sr?d=W:!d&&W?d=new Sr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):d&&W&&d!==W&&(d=new Sr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),d}function wr(R,d=new Set){return R instanceof $c&&d.add(R.key),R.eachChild(L=>{wr(L,d)}),d}function ea(R,d){let{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge}=R??{};return{zoom:L,heatmapDensity:W,elevation:te,lineProgress:ue,isSupportedScript:me,accumulated:ge,globalState:d}}function ba(R){if(R===!0||R===!1)return!0;if(!Array.isArray(R)||R.length===0)return!1;switch(R[0]){case"has":return R.length>=2&&R[1]!=="$id"&&R[1]!=="$type";case"in":return R.length>=3&&(typeof R[1]!="string"||Array.isArray(R[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return R.length!==3||Array.isArray(R[1])||Array.isArray(R[2]);case"any":case"all":for(let d of R.slice(1))if(!ba(d)&&typeof d!="boolean")return!1;return!0;default:return!0}}let Ia={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function Na(R,d){if(R==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};ba(R)||(R=Da(R));let L=Cc(R,Ia,d);if(L.result==="error")throw new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));return{filter:(W,te,ue)=>L.value.evaluate(W,te,{},ue),needGeometry:mn(R),getGlobalStateRefs:()=>wr(L.value.expression)}}function Za(R,d){return Rd?1:0}function mn(R){if(!Array.isArray(R))return!1;if(R[0]==="within"||R[0]==="distance")return!0;for(let d=1;d"||d==="<="||d===">="?Ha(R[1],R[2],d):d==="any"?(L=R.slice(1),["any"].concat(L.map(Da))):d==="all"?["all"].concat(R.slice(1).map(Da)):d==="none"?["all"].concat(R.slice(1).map(Da).map(Sn)):d==="in"?$a(R[1],R.slice(2)):d==="!in"?Sn($a(R[1],R.slice(2))):d==="has"?vn(R[1]):d!=="!has"||Sn(vn(R[1]));var L}function Ha(R,d,L){switch(R){case"$type":return[`filter-type-${L}`,d];case"$id":return[`filter-id-${L}`,d];default:return[`filter-${L}`,R,d]}}function $a(R,d){if(d.length===0)return!1;switch(R){case"$type":return["filter-type-in",["literal",d]];case"$id":return["filter-id-in",["literal",d]];default:return d.length>200&&!d.some(L=>typeof L!=typeof d[0])?["filter-in-large",R,["literal",d.sort(Za)]]:["filter-in-small",R,["literal",d]]}}function vn(R){switch(R){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",R]}}function Sn(R){return["!",R]}function yi(R){let d=typeof R;if(d==="number"||d==="boolean"||d==="string"||R==null)return JSON.stringify(R);if(Array.isArray(R)){let te="[";for(let ue of R)te+=`${yi(ue)},`;return`${te}]`}let L=Object.keys(R).sort(),W="{";for(let te=0;teW.maximum?[new Vt(d,L,`${L} is greater than the maximum value ${W.maximum}`)]:[]}function Co(R){let d=R.valueSpec,L=ri(R.value.type),W,te,ue,me={},ge=L!=="categorical"&&R.value.property===void 0,Ce=!ge,Te=xo(R.value.stops)==="array"&&xo(R.value.stops[0])==="array"&&xo(R.value.stops[0][0])==="object",Oe=Ln({key:R.key,value:R.value,valueSpec:R.styleSpec.function,validateSpec:R.validateSpec,style:R.style,styleSpec:R.styleSpec,objectElementValidators:{stops:function(He){if(L==="identity")return[new Vt(He.key,He.value,'identity function may not have a "stops" property')];let bt=[],Et=He.value;return bt=bt.concat(Ni({key:He.key,value:Et,valueSpec:He.valueSpec,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,arrayElementValidator:Pe})),xo(Et)==="array"&&Et.length===0&&bt.push(new Vt(He.key,Et,"array must have at least one stop")),bt},default:function(He){return He.validateSpec({key:He.key,value:He.value,valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec})}}});return L==="identity"&&ge&&Oe.push(new Vt(R.key,R.value,'missing required property "property"')),L==="identity"||R.value.stops||Oe.push(new Vt(R.key,R.value,'missing required property "stops"')),L==="exponential"&&R.valueSpec.expression&&!Vu(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"exponential functions not supported")),R.styleSpec.$version>=8&&(Ce&&!ic(R.valueSpec)?Oe.push(new Vt(R.key,R.value,"property functions not supported")):ge&&!Sc(R.valueSpec)&&Oe.push(new Vt(R.key,R.value,"zoom functions not supported"))),L!=="categorical"&&!Te||R.value.property!==void 0||Oe.push(new Vt(R.key,R.value,'"property" property is required')),Oe;function Pe(He){let bt=[],Et=He.value,Qt=He.key;if(xo(Et)!=="array")return[new Vt(Qt,Et,`array expected, ${xo(Et)} found`)];if(Et.length!==2)return[new Vt(Qt,Et,`array length 2 expected, length ${Et.length} found`)];if(Te){if(xo(Et[0])!=="object")return[new Vt(Qt,Et,`object expected, ${xo(Et[0])} found`)];if(Et[0].zoom===void 0)return[new Vt(Qt,Et,"object stop key must have zoom")];if(Et[0].value===void 0)return[new Vt(Qt,Et,"object stop key must have value")];if(ue&&ue>ri(Et[0].zoom))return[new Vt(Qt,Et[0].zoom,"stop zoom values must appear in ascending order")];ri(Et[0].zoom)!==ue&&(ue=ri(Et[0].zoom),te=void 0,me={}),bt=bt.concat(Ln({key:`${Qt}[0]`,value:Et[0],valueSpec:{zoom:{}},validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec,objectElementValidators:{zoom:Zi,value:it}}))}else bt=bt.concat(it({key:`${Qt}[0]`,value:Et[0],validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec},Et));return kc(En(Et[1]))?bt.concat([new Vt(`${Qt}[1]`,Et[1],"expressions are not allowed in function stops.")]):bt.concat(He.validateSpec({key:`${Qt}[1]`,value:Et[1],valueSpec:d,validateSpec:He.validateSpec,style:He.style,styleSpec:He.styleSpec}))}function it(He,bt){let Et=xo(He.value),Qt=ri(He.value),er=He.value!==null?He.value:bt;if(W){if(Et!==W)return[new Vt(He.key,er,`${Et} stop domain type must match previous stop domain type ${W}`)]}else W=Et;if(Et!=="number"&&Et!=="string"&&Et!=="boolean")return[new Vt(He.key,er,"stop domain value must be a number, string, or boolean")];if(Et!=="number"&&L!=="categorical"){let br=`number expected, ${Et} found`;return ic(d)&&L===void 0&&(br+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Vt(He.key,er,br)]}return L!=="categorical"||Et!=="number"||isFinite(Qt)&&Math.floor(Qt)===Qt?L!=="categorical"&&Et==="number"&&te!==void 0&&Qtnew Vt(`${R.key}${W.key}`,R.value,W.message));let L=d.value.expression||d.value._styleExpression.expression;if(R.expressionContext==="property"&&R.propertyKey==="text-font"&&!L.outputDefined())return[new Vt(R.key,R.value,`Invalid data expression for "${R.propertyKey}". Output values must be contained as literals within the expression.`)];if(R.expressionContext==="property"&&R.propertyType==="layout"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with layout properties.')];if(R.expressionContext==="filter"&&!nc(L))return[new Vt(R.key,R.value,'"feature-state" data expressions are not supported with filters.')];if(R.expressionContext&&R.expressionContext.indexOf("cluster")===0){if(!yf(L,["zoom","feature-state"]))return[new Vt(R.key,R.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(R.expressionContext==="cluster-initial"&&!qu(L))return[new Vt(R.key,R.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Fo(R){let d=R.key,L=R.value,W=xo(L);return W!=="string"?[new Vt(d,L,`color expected, ${W} found`)]:rn.parse(String(L))?[]:[new Vt(d,L,`color expected, "${L}" found`)]}function Yo(R){let d=R.key,L=R.value,W=R.valueSpec,te=[];return Array.isArray(W.values)?W.values.indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${W.values.join(", ")}], ${JSON.stringify(L)} found`)):Object.keys(W.values).indexOf(ri(L))===-1&&te.push(new Vt(d,L,`expected one of [${Object.keys(W.values).join(", ")}], ${JSON.stringify(L)} found`)),te}function bo(R){return ba(En(R.value))?Do(Ht({},R,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Gs(R)}function Gs(R){let d=R.value,L=R.key;if(xo(d)!=="array")return[new Vt(L,d,`array expected, ${xo(d)} found`)];let W=R.styleSpec,te,ue=[];if(d.length<1)return[new Vt(L,d,"filter array must have at least 1 element")];switch(ue=ue.concat(Yo({key:`${L}[0]`,value:d[0],valueSpec:W.filter_operator,style:R.style,styleSpec:R.styleSpec})),ri(d[0])){case"<":case"<=":case">":case">=":d.length>=2&&ri(d[1])==="$type"&&ue.push(new Vt(L,d,`"$type" cannot be use with operator "${d[0]}"`));case"==":case"!=":d.length!==3&&ue.push(new Vt(L,d,`filter array for operator "${d[0]}" must have 3 elements`));case"in":case"!in":d.length>=2&&(te=xo(d[1]),te!=="string"&&ue.push(new Vt(`${L}[1]`,d[1],`string expected, ${te} found`)));for(let me=2;me{Pe in te&&W.push(new Vt(ue,te[Pe],`"${Pe}" is prohibited for ref layers`))}),me.layers.forEach(Pe=>{ri(Pe.id)===Te&&(Oe=Pe)}),Oe?Oe.ref?W.push(new Vt(ue,te.ref,"ref cannot reference another ref layer")):Ce=ri(Oe.type):W.push(new Vt(ue,te.ref,`ref layer "${Te}" not found`))}else if(Ce!=="background")if(te.source){let Oe=me.sources&&me.sources[te.source],Pe=Oe&&ri(Oe.type);Oe?Pe==="vector"&&Ce==="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster source`)):Pe!=="raster-dem"&&Ce==="hillshade"||Pe!=="raster-dem"&&Ce==="color-relief"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a raster-dem source`)):Pe==="raster"&&Ce!=="raster"?W.push(new Vt(ue,te.source,`layer "${te.id}" requires a vector source`)):Pe!=="vector"||te["source-layer"]?Pe==="raster-dem"&&Ce!=="hillshade"&&Ce!=="color-relief"?W.push(new Vt(ue,te.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):Ce!=="line"||!te.paint||!te.paint["line-gradient"]||Pe==="geojson"&&Oe.lineMetrics||W.push(new Vt(ue,te,`layer "${te.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):W.push(new Vt(ue,te,`layer "${te.id}" must specify a "source-layer"`)):W.push(new Vt(ue,te.source,`source "${te.source}" not found`))}else W.push(new Vt(ue,te,'missing required property "source"'));return Ce==="raster"&&(!((d=te.paint)===null||d===void 0)&&d.resampling)&&(!((L=te.paint)===null||L===void 0)&&L["raster-resampling"])&&W.push(new Vt(ue,te.paint,`layer "${te.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),W=W.concat(Ln({key:ue,value:te,valueSpec:ge.layer,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,objectElementValidators:{"*":()=>[],type:()=>R.validateSpec({key:`${ue}.type`,value:te.type,valueSpec:ge.layer.type,style:R.style,styleSpec:R.styleSpec,validateSpec:R.validateSpec,object:te,objectKey:"type"}),filter:bo,layout:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>Kn(Ht({layerType:Ce},Pe))}}),paint:Oe=>Ln({layer:te,key:Oe.key,value:Oe.value,style:Oe.style,styleSpec:Oe.styleSpec,validateSpec:Oe.validateSpec,objectElementValidators:{"*":Pe=>ns(Ht({layerType:Ce},Pe))}})}})),W}function gs(R){let d=R.value,L=R.key,W=xo(d);return W!=="string"?[new Vt(L,d,`string expected, ${W} found`)]:[]}let js={promoteId:function({key:R,value:d}){if(xo(d)==="string")return gs({key:R,value:d});{let L=[];for(let W in d)L.push(...gs({key:`${R}.${W}`,value:d[W]}));return L}}};function Cl(R){let d=R.value,L=R.key,W=R.styleSpec,te=R.style,ue=R.validateSpec;if(!d.type)return[new Vt(L,d,'"type" is required')];let me=ri(d.type),ge;switch(me){case"vector":case"raster":return ge=Ln({key:L,value:d,valueSpec:W[`source_${me.replace("-","_")}`],style:R.style,styleSpec:W,objectElementValidators:js,validateSpec:ue}),ge;case"raster-dem":return ge=function(Ce){var Te;let Oe=(Te=Ce.sourceName)!==null&&Te!==void 0?Te:"",Pe=Ce.value,it=Ce.styleSpec,He=it.source_raster_dem,bt=Ce.style,Et=[],Qt=xo(Pe);if(Pe===void 0)return Et;if(Qt!=="object")return Et.push(new Vt("source_raster_dem",Pe,`object expected, ${Qt} found`)),Et;let er=ri(Pe.encoding)==="custom",br=["redFactor","greenFactor","blueFactor","baseShift"],sr=Ce.value.encoding?`"${Ce.value.encoding}"`:"Default";for(let Mr in Pe)!er&&br.includes(Mr)?Et.push(new Vt(Mr,Pe[Mr],`In "${Oe}": "${Mr}" is only valid when "encoding" is set to "custom". ${sr} encoding found`)):He[Mr]?Et=Et.concat(Ce.validateSpec({key:Mr,value:Pe[Mr],valueSpec:He[Mr],validateSpec:Ce.validateSpec,style:bt,styleSpec:it})):Et.push(new Vt(Mr,Pe[Mr],`unknown property "${Mr}"`));return Et}({sourceName:L,value:d,style:R.style,styleSpec:W,validateSpec:ue}),ge;case"geojson":if(ge=Ln({key:L,value:d,valueSpec:W.source_geojson,style:te,styleSpec:W,validateSpec:ue,objectElementValidators:js}),d.cluster)for(let Ce in d.clusterProperties){let[Te,Oe]=d.clusterProperties[Ce],Pe=typeof Te=="string"?[Te,["accumulated"],["get",Ce]]:Te;ge.push(...Do({key:`${L}.${Ce}.map`,value:Oe,expressionContext:"cluster-map"})),ge.push(...Do({key:`${L}.${Ce}.reduce`,value:Pe,expressionContext:"cluster-reduce"}))}return ge;case"video":return Ln({key:L,value:d,valueSpec:W.source_video,style:te,validateSpec:ue,styleSpec:W});case"image":return Ln({key:L,value:d,valueSpec:W.source_image,style:te,validateSpec:ue,styleSpec:W});case"canvas":return[new Vt(L,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Yo({key:`${L}.type`,value:d.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function zl(R){let d=R.value,L=R.styleSpec,W=L.light,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("light",d,`object expected, ${me} found`)]),ue;for(let ge in d){let Ce=ge.match(/^(.*)-transition$/);ue=ue.concat(Ce&&W[Ce[1]]&&W[Ce[1]].transition?R.validateSpec({key:ge,value:d[ge],valueSpec:L.transition,validateSpec:R.validateSpec,style:te,styleSpec:L}):W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)])}return ue}function Kl(R){let d=R.value,L=R.styleSpec,W=L.sky,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("sky",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me}function Gu(R){let d=R.value,L=R.styleSpec,W=L.terrain,te=R.style,ue=[],me=xo(d);if(d===void 0)return ue;if(me!=="object")return ue=ue.concat([new Vt("terrain",d,`object expected, ${me} found`)]),ue;for(let ge in d)ue=ue.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],validateSpec:R.validateSpec,style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return ue}function xl(R){let d=[],L=R.value,W=R.key;if(Array.isArray(L)){let te=[],ue=[];for(let me in L)L[me].id&&te.includes(L[me].id)&&d.push(new Vt(W,L,`all the sprites' ids must be unique, but ${L[me].id} is duplicated`)),te.push(L[me].id),L[me].url&&ue.includes(L[me].url)&&d.push(new Vt(W,L,`all the sprites' URLs must be unique, but ${L[me].url} is duplicated`)),ue.push(L[me].url),d=d.concat(Ln({key:`${W}[${me}]`,value:L[me],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:R.validateSpec}));return d}return gs({key:W,value:L})}function Hu(R){return!!R&&R.constructor===Object}function Su(R){return Hu(R.value)?[]:[new Vt(R.key,R.value,`object expected, ${xo(R.value)} found`)]}let mc={"*":()=>[],array:Ni,boolean:function(R){let d=R.value,L=R.key,W=xo(d);return W!=="boolean"?[new Vt(L,d,`boolean expected, ${W} found`)]:[]},number:Zi,color:Fo,constants:ki,enum:Yo,filter:bo,function:Co,layer:zo,object:Ln,source:Cl,light:zl,sky:Kl,terrain:Gu,projection:function(R){let d=R.value,L=R.styleSpec,W=L.projection,te=R.style,ue=xo(d);if(d===void 0)return[];if(ue!=="object")return[new Vt("projection",d,`object expected, ${ue} found`)];let me=[];for(let ge in d)me=me.concat(W[ge]?R.validateSpec({key:ge,value:d[ge],valueSpec:W[ge],style:te,styleSpec:L}):[new Vt(ge,d[ge],`unknown property "${ge}"`)]);return me},projectionDefinition:function(R){let d=R.key,L=R.value;L=L instanceof String?L.valueOf():L;let W=xo(L);return W!=="array"||function(te){return Array.isArray(te)&&te.length===3&&typeof te[0]=="string"&&typeof te[1]=="string"&&typeof te[2]=="number"}(L)||function(te){return!!["interpolate","step","literal"].includes(te[0])}(L)?["array","string"].includes(W)?[]:[new Vt(d,L,`projection expected, invalid type "${W}" found`)]:[new Vt(d,L,`projection expected, invalid array ${JSON.stringify(L)} found`)]},string:gs,formatted:function(R){return gs(R).length===0?[]:Do(R)},resolvedImage:function(R){return gs(R).length===0?[]:Do(R)},padding:function(R){let d=R.key,L=R.value;if(xo(L)==="array"){if(L.length<1||L.length>4)return[new Vt(d,L,`padding requires 1 to 4 values; ${L.length} values found`)];let W={type:"number"},te=[];for(let ue=0;ue[]}})),R.constants&&(L=L.concat(ki({key:"constants",value:R.constants}))),Ql(L)}function Jl(R){return function(d){return R(Object.assign({},d,{validateSpec:Jc}))}}function Ql(R){return[].concat(R).sort((d,L)=>d.line-L.line)}function Eu(R){return function(...d){return Ql(R.apply(this,d))}}du.source=Eu(Jl(Cl)),du.sprite=Eu(Jl(xl)),du.glyphs=Eu(Jl(oc)),du.light=Eu(Jl(zl)),du.sky=Eu(Jl(Kl)),du.terrain=Eu(Jl(Gu)),du.state=Eu(Jl(Su)),du.layer=Eu(Jl(zo)),du.filter=Eu(Jl(bo)),du.paintProperty=Eu(Jl(ns)),du.layoutProperty=Eu(Jl(Kn));let bf={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class lh{constructor(d,L){this._globalState=L,this.setValue(d)}evaluate(){var d;return(d=this._literalValue)!==null&&d!==void 0?d:this._compiledValue.evaluate({})}setValue(d){if(d==null||d==="visible"||d==="none")return this._literalValue=d==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let L=Cc(d,bf,this._globalState);if(L.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(L.value.map(W=>`${W.key}: ${W.message}`).join(", "));this._literalValue=void 0,this._compiledValue=L.value,this._globalStateRefs=wr(L.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Pc=ht,Ks=du,Bl=Ks.light,Wu=Ks.sky,wf=Ks.paintProperty,Qc=Ks.layoutProperty;function ku(R,d){let L=!1;if(d?.length)for(let W of d)R.fire(new Ot(new Error(W.message))),L=!0;return L}class Ol{constructor(d,L,W){let te=this.cells=[];if(d instanceof ArrayBuffer){this.arrayBuffer=d;let me=new Int32Array(this.arrayBuffer);d=me[0],this.d=(L=me[1])+2*(W=me[2]);for(let Ce=0;Ce=Pe[He+0]&&te>=Pe[He+1])?(ge[it]=!0,me.push(Oe[it])):ge[it]=!1}}}_forEachCell(d,L,W,te,ue,me,ge,Ce){let Te=this._convertToCellCoord(d),Oe=this._convertToCellCoord(L),Pe=this._convertToCellCoord(W),it=this._convertToCellCoord(te);for(let He=Te;He<=Pe;He++)for(let bt=Oe;bt<=it;bt++){let Et=this.d*bt+He;if((!Ce||Ce(this._convertFromCellCoord(He),this._convertFromCellCoord(bt),this._convertFromCellCoord(He+1),this._convertFromCellCoord(bt+1)))&&ue.call(this,d,L,W,te,Et,me,ge,Ce))return}}_convertFromCellCoord(d){return(d-this.padding)/this.scale}_convertToCellCoord(d){return Math.max(0,Math.min(this.d-1,Math.floor(d*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let d=this.cells,L=3+this.cells.length+1+1,W=0;for(let me of this.cells)W+=me.length;let te=new Int32Array(L+W+this.keys.length+this.bboxes.length);te[0]=this.extent,te[1]=this.n,te[2]=this.padding;let ue=L;for(let me=0;meW?(this.lastIntegerZoom=W+1,this.lastIntegerZoomTime=L):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${L}}`,"u").source}catch{return null}}).filter(L=>L);return new RegExp(d.join("|"),"u")}let Jr=jr(["Arab","Dupl","Mong","Ougr","Syrc"]);function la(R){return!Jr.test(String.fromCodePoint(R))}function xa(R){return!(Wt(R)||(d=R,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(d))));var d}let Ba=jr(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function an(R){return Ba.test(String.fromCodePoint(R))}function wn(R,d){return!(!d&&an(R)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(R)))}function ii(R){for(let d of R)if(an(d.codePointAt(0)))return!0;return!1}let Si=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(R){this.pluginStatus=R.pluginStatus,this.pluginURL=R.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(R){if(Si.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=R.applyArabicShaping,this.processBidirectionalText=R.processBidirectionalText,this.processStyledBidirectionalText=R.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(R,d){return e(this,void 0,void 0,function*(){if(this.isParsed())return this.getState();if(R.pluginStatus!=="loading")return this.setState(R),R;let L=R.pluginURL,W=new Promise(ue=>{this.loadScriptResolve=ue});d(L);let te=new Promise(ue=>setTimeout(()=>ue(),this.TIMEOUT));if(yield Promise.race([W,te]),this.isParsed()){let ue={pluginStatus:"loaded",pluginURL:L};return this.setState(ue),ue}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${L}`)})}};class oi{constructor(d,L){this.isSupportedScript=Ji,this.zoom=d,L?(this.now=L.now||0,this.fadeDuration=L.fadeDuration||0,this.zoomHistory=L.zoomHistory||new Bt,this.transition=L.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Bt,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let d=this.zoom,L=d-Math.floor(d),W=this.crossFadingFactor();return d>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:L+(1-L)*W}:{fromScale:.5,toScale:1,t:1-(1-W)*L}}}function Ji(R){return function(d,L){for(let W of d)if(!wn(W.codePointAt(0),L))return!1;return!0}(R,Si.getRTLTextPluginStatus()==="loaded")}let Qi="-transition";class Oo{constructor(d,L,W){this.property=d,this.value=L,this.expression=function(te,ue,me){if(Ec(te))return new tr(te,ue);if(kc(te)){let ge=Ft(te,ue,me);if(ge.result==="error")throw new Error(ge.value.map(Ce=>`${Ce.key}: ${Ce.message}`).join(", "));return ge.value}{let ge=te;return ue.type==="color"&&typeof te=="string"?ge=rn.parse(te):ue.type!=="padding"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="numberArray"||typeof te!="number"&&!Array.isArray(te)?ue.type!=="colorArray"||typeof te!="string"&&!Array.isArray(te)?ue.type==="variableAnchorOffsetCollection"&&Array.isArray(te)?ge=gi.parse(te):ue.type==="projectionDefinition"&&typeof te=="string"&&(ge=io.parse(te)):ge=jn.parse(te):ge=Ai.parse(te):ge=fn.parse(te),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>ge}}}(L===void 0?d.specification.default:L,d.specification,W)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(d,L,W){return this.property.possiblyEvaluate(this,d,L,W)}}class Qo{constructor(d,L){this.property=d,this.value=new Oo(d,void 0,L)}transitioned(d,L){return new ys(this.property,this.value,L,X({},d.transition,this.transition),d.now)}untransitioned(){return new ys(this.property,this.value,null,{},0)}}class vo{constructor(d,L){this._properties=d,this._values=Object.create(d.defaultTransitionablePropertyValues),this._globalState=L}hasProperty(d){return d in this._properties.defaultTransitionablePropertyValues}getValue(d){return q(this._values[d].value.value)}setValue(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].value=new Oo(this._values[d].property,L===null?void 0:q(L),this._globalState)}getTransition(d){return q(this._values[d].transition)}setTransition(d,L){Object.hasOwn(this._values,d)||(this._values[d]=new Qo(this._values[d].property,this._globalState)),this._values[d].transition=q(L)||void 0}serialize(){let d={};for(let L of Object.keys(this._values)){let W=this.getValue(L);W!==void 0&&(d[L]=W);let te=this.getTransition(L);te!==void 0&&(d[`${L}${Qi}`]=te)}return d}transitioned(d,L){let W=new ol(this._properties);for(let te of Object.keys(this._values))W._values[te]=this._values[te].transitioned(d,L._values[te]);return W}untransitioned(){let d=new ol(this._properties);for(let L of Object.keys(this._values))d._values[L]=this._values[L].untransitioned();return d}}class ys{constructor(d,L,W,te,ue){this.property=d,this.value=L,this.begin=ue+te.delay||0,this.end=this.begin+te.duration||0,d.specification.transition&&(te.delay||te.duration)&&(this.prior=W)}possiblyEvaluate(d,L,W){let te=d.now||0,ue=this.value.possiblyEvaluate(d,L,W),me=this.prior;if(me){if(te>this.end)return this.prior=null,ue;if(this.value.isDataDriven())return this.prior=null,ue;if(tete.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class sc{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){if(d.value!==void 0){if(d.expression.kind==="constant"){let ue=d.expression.evaluate(L,null,{},W,te);return this._calculate(ue,ue,ue,L)}return this._calculate(d.expression.evaluate(new oi(Math.floor(L.zoom-1),L)),d.expression.evaluate(new oi(Math.floor(L.zoom),L)),d.expression.evaluate(new oi(Math.floor(L.zoom+1),L)),L)}}_calculate(d,L,W,te){return te.zoom>te.zoomHistory.lastIntegerZoom?{from:d,to:L}:{from:W,to:L}}interpolate(d){return d}}class tu{constructor(d){this.specification=d}possiblyEvaluate(d,L,W,te){return!!d.expression.evaluate(L,null,{},W,te)}interpolate(){return!1}}class Ps{constructor(d){this.properties=d,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let L in d){let W=d[L];W.specification.overridable&&this.overridableProperties.push(L);let te=this.defaultPropertyValues[L]=new Oo(W,void 0,void 0),ue=this.defaultTransitionablePropertyValues[L]=new Qo(W,void 0);this.defaultTransitioningPropertyValues[L]=ue.untransitioned(),this.defaultPossiblyEvaluatedValues[L]=te.possiblyEvaluate({})}}}fi("DataDrivenProperty",wi),fi("DataConstantProperty",hi),fi("CrossFadedDataDrivenProperty",sl),fi("CrossFadedProperty",sc),fi("ColorRampProperty",tu);let gc=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",pu=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class ll extends vt{constructor(d,L,W){if(super(),this.id=d.id,this.type=d.type,this._globalState=W,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=function(te,ue){return new lh(te,ue)}(this.visibility,W),d.type!=="custom"&&(this.metadata=d.metadata,this.minzoom=d.minzoom,this.maxzoom=d.maxzoom,d.type!=="background"&&(this.source=d.source,this.sourceLayer=d["source-layer"],this.filter=d.filter,this._featureFilter=Na(d.filter,W)),L.layout&&(this._unevaluatedLayout=new jl(L.layout,W)),L.paint)){this._transitionablePaint=new vo(L.paint,W);for(let te in d.paint)this.setPaintProperty(te,d.paint[te],{validate:!1});for(let te in d.layout)this.setLayoutProperty(te,d.layout[te],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Cu(L.paint)}}setFilter(d){this.filter=d,this._featureFilter=Na(d,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(d){var L;if(d==="visibility")return this.visibility;if(!((L=this._transitionablePaint)===null||L===void 0)&&L.hasProperty(d))throw new Error(d+gc);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${d}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(d)}getLayoutAffectingGlobalStateRefs(){let d=new Set;for(let L of this._visibilityExpression.getGlobalStateRefs())d.add(L);if(this._unevaluatedLayout)for(let L in this._unevaluatedLayout._values){let W=this._unevaluatedLayout._values[L];for(let te of W.getGlobalStateRefs())d.add(te)}for(let L of this._featureFilter.getGlobalStateRefs())d.add(L);return d}getPaintAffectingGlobalStateRefs(){var d;let L=new globalThis.Map;if(this._transitionablePaint)for(let W in this._transitionablePaint._values){let te=this._transitionablePaint._values[W].value;for(let ue of te.getGlobalStateRefs()){let me=(d=L.get(ue))!==null&&d!==void 0?d:[];me.push({name:W,value:te.value}),L.set(ue,me)}}return L}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(d,L,W={}){var te;if(d==="visibility")return this.visibility=L,this._visibilityExpression.setValue(L),void this.recalculateVisibility();!((te=this._transitionablePaint)===null||te===void 0)&&te.hasProperty(d)?this.fire(new Ot(new Error(d+gc))):L!=null&&this._validate(Qc,`layers.${this.id}.layout.${d}`,d,L,W)||this._unevaluatedLayout.setValue(d,L)}getPaintProperty(d){var L,W;if(d.endsWith(Qi)){let te=d.slice(0,-11);if(te==="visibility"||!((L=this._unevaluatedLayout)===null||L===void 0)&&L.hasProperty(te))throw new Error(d+pu);return this._transitionablePaint.getTransition(te)}if(d==="visibility"||!((W=this._unevaluatedLayout)===null||W===void 0)&&W.hasProperty(d))throw new Error(d+pu);return this._transitionablePaint.getValue(d)}setPaintProperty(d,L,W={}){var te;if(d==="visibility"||!((te=this._unevaluatedLayout)===null||te===void 0)&&te.hasProperty(d))return this.fire(new Ot(new Error(d+pu))),!1;if(L!=null&&this._validate(wf,`layers.${this.id}.paint.${d}`,d,L,W))return!1;if(d.endsWith(Qi))return this._transitionablePaint.setTransition(d.slice(0,-11),L||void 0),!1;{let ue=this._transitionablePaint._values[d],me=ue.property.specification["property-type"]==="cross-faded-data-driven",ge=ue.value.isDataDriven(),Ce=ue.value;this._transitionablePaint.setValue(d,L),this._handleSpecialPaintPropertyUpdate(d);let Te=this._transitionablePaint._values[d].value;return Te.isDataDriven()||ge||me||this._handleOverridablePaintPropertyUpdate(d,Ce,Te)}}_handleSpecialPaintPropertyUpdate(d){}_handleOverridablePaintPropertyUpdate(d,L,W){return!1}isHidden(d=this.minzoom,L=!1){return!!(this.minzoom&&d<(L?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&d>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(d){this._transitioningPaint=this._transitionablePaint.transitioned(d,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(d,L){d.getCrossfadeParameters&&(this._crossfadeParameters=d.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(d,void 0,L)),this.paint=this._transitioningPaint.possiblyEvaluate(d,void 0,L)}serialize(){var d,L;let W={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:(d=this._unevaluatedLayout)===null||d===void 0?void 0:d.serialize(),paint:(L=this._transitionablePaint)===null||L===void 0?void 0:L.serialize()};return this.visibility&&(W.layout||(W.layout={}),W.layout.visibility=this.visibility),Y(W,(te,ue)=>!(te===void 0||ue==="layout"&&!Object.keys(te).length||ue==="paint"&&!Object.keys(te).length))}_validate(d,L,W,te,ue={}){return ue?.validate!==!1&&ku(this,d.call(Ks,{key:L,layerType:this.type,objectKey:W,value:te,styleSpec:ht,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let d in this.paint._values){let L=this.paint.get(d);if(L instanceof Hs&&ic(L.property.specification)&&(L.value.kind==="source"||L.value.kind==="composite")&&L.value.isStateDependent)return!0}return!1}}let ef;var de={get paint(){return ef=ef||new Ps({"raster-opacity":new hi(ht.paint_raster["raster-opacity"]),"raster-hue-rotate":new hi(ht.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new hi(ht.paint_raster["raster-brightness-min"]),"raster-brightness-max":new hi(ht.paint_raster["raster-brightness-max"]),"raster-saturation":new hi(ht.paint_raster["raster-saturation"]),"raster-contrast":new hi(ht.paint_raster["raster-contrast"]),resampling:new hi(ht.paint_raster.resampling),"raster-resampling":new hi(ht.paint_raster["raster-resampling"]),"raster-fade-duration":new hi(ht.paint_raster["raster-fade-duration"])})}};class Ee extends ll{constructor(d,L){super(d,de,L)}}let qe={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class tt{constructor(d,L){this._structArray=d,this._pos1=L*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class at{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(d,L){return d._trim(),L&&(d.isTransferred=!0,L.push(d.arrayBuffer)),{length:d.length,arrayBuffer:d.arrayBuffer}}static deserialize(d){let L=Object.create(this.prototype);return L.arrayBuffer=d.arrayBuffer,L.length=d.length,L.capacity=d.arrayBuffer.byteLength/L.bytesPerElement,L._refreshViews(),L}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(d){this.reserve(d),this.length=d}reserve(d){if(d>this.capacity){this.capacity=Math.max(d,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let L=this.uint8;this._refreshViews(),L&&this.uint8.set(L)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function ct(R,d=1){let L=0,W=0;return{members:R.map(te=>{let ue=qe[te.type].BYTES_PER_ELEMENT,me=L=Nt(L,Math.max(d,ue)),ge=te.components||1;return W=Math.max(W,ue),L+=ue*ge,{name:te.name,type:te.type,components:ge,offset:me}}),size:Nt(L,Math.max(W,d)),alignment:d}}function Nt(R,d){return Math.ceil(R/d)*d}class St extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.int16[te+0]=L,this.int16[te+1]=W,d}}St.prototype.bytesPerElement=4,fi("StructArrayLayout2i4",St);class Jt extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.int16[ue+0]=L,this.int16[ue+1]=W,this.int16[ue+2]=te,d}}Jt.prototype.bytesPerElement=6,fi("StructArrayLayout3i6",Jt);class mr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.int16[me+0]=L,this.int16[me+1]=W,this.int16[me+2]=te,this.int16[me+3]=ue,d}}mr.prototype.bytesPerElement=8,fi("StructArrayLayout4i8",mr);class gr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}gr.prototype.bytesPerElement=12,fi("StructArrayLayout2i4i12",gr);class Hr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=4*d,Te=8*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.uint8[Te+4]=te,this.uint8[Te+5]=ue,this.uint8[Te+6]=me,this.uint8[Te+7]=ge,d}}Hr.prototype.bytesPerElement=8,fi("StructArrayLayout2i4ub8",Hr);class Vr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.float32[te+0]=L,this.float32[te+1]=W,d}}Vr.prototype.bytesPerElement=8,fi("StructArrayLayout2f8",Vr);class ca extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=this.length;return this.resize(Pe+1),this.emplace(Pe,d,L,W,te,ue,me,ge,Ce,Te,Oe)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=10*d;return this.uint16[it+0]=L,this.uint16[it+1]=W,this.uint16[it+2]=te,this.uint16[it+3]=ue,this.uint16[it+4]=me,this.uint16[it+5]=ge,this.uint16[it+6]=Ce,this.uint16[it+7]=Te,this.uint16[it+8]=Oe,this.uint16[it+9]=Pe,d}}ca.prototype.bytesPerElement=20,fi("StructArrayLayout10ui20",ca);class Aa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce){let Te=this.length;return this.resize(Te+1),this.emplace(Te,d,L,W,te,ue,me,ge,Ce)}emplace(d,L,W,te,ue,me,ge,Ce,Te){let Oe=8*d;return this.uint16[Oe+0]=L,this.uint16[Oe+1]=W,this.uint16[Oe+2]=te,this.uint16[Oe+3]=ue,this.uint16[Oe+4]=me,this.uint16[Oe+5]=ge,this.uint16[Oe+6]=Ce,this.uint16[Oe+7]=Te,d}}Aa.prototype.bytesPerElement=16,fi("StructArrayLayout8ui16",Aa);class Yr extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it){let He=this.length;return this.resize(He+1),this.emplace(He,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He){let bt=12*d;return this.int16[bt+0]=L,this.int16[bt+1]=W,this.int16[bt+2]=te,this.int16[bt+3]=ue,this.uint16[bt+4]=me,this.uint16[bt+5]=ge,this.uint16[bt+6]=Ce,this.uint16[bt+7]=Te,this.int16[bt+8]=Oe,this.int16[bt+9]=Pe,this.int16[bt+10]=it,this.int16[bt+11]=He,d}}Yr.prototype.bytesPerElement=24,fi("StructArrayLayout4i4ui4i24",Yr);class oa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.float32[ue+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}oa.prototype.bytesPerElement=12,fi("StructArrayLayout3f12",oa);class fa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint32[1*d+0]=L,d}}fa.prototype.bytesPerElement=4,fi("StructArrayLayout1ul4",fa);class Ea extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te){let Oe=this.length;return this.resize(Oe+1),this.emplace(Oe,d,L,W,te,ue,me,ge,Ce,Te)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=10*d,it=5*d;return this.int16[Pe+0]=L,this.int16[Pe+1]=W,this.int16[Pe+2]=te,this.int16[Pe+3]=ue,this.int16[Pe+4]=me,this.int16[Pe+5]=ge,this.uint32[it+3]=Ce,this.uint16[Pe+8]=Te,this.uint16[Pe+9]=Oe,d}}Ea.prototype.bytesPerElement=20,fi("StructArrayLayout6i1ul2ui20",Ea);class Ma extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=6*d;return this.int16[Ce+0]=L,this.int16[Ce+1]=W,this.int16[Ce+2]=te,this.int16[Ce+3]=ue,this.int16[Ce+4]=me,this.int16[Ce+5]=ge,d}}Ma.prototype.bytesPerElement=12,fi("StructArrayLayout2i2i2i12",Ma);class sa extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue){let me=this.length;return this.resize(me+1),this.emplace(me,d,L,W,te,ue)}emplace(d,L,W,te,ue,me){let ge=4*d,Ce=8*d;return this.float32[ge+0]=L,this.float32[ge+1]=W,this.float32[ge+2]=te,this.int16[Ce+6]=ue,this.int16[Ce+7]=me,d}}sa.prototype.bytesPerElement=16,fi("StructArrayLayout2f1f2i16",sa);class hn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(d,L,W,te,ue,me){let ge=this.length;return this.resize(ge+1),this.emplace(ge,d,L,W,te,ue,me)}emplace(d,L,W,te,ue,me,ge){let Ce=16*d,Te=4*d,Oe=8*d;return this.uint8[Ce+0]=L,this.uint8[Ce+1]=W,this.float32[Te+1]=te,this.float32[Te+2]=ue,this.int16[Oe+6]=me,this.int16[Oe+7]=ge,d}}hn.prototype.bytesPerElement=16,fi("StructArrayLayout2ub2f2i16",hn);class Tn extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[ue+0]=L,this.uint16[ue+1]=W,this.uint16[ue+2]=te,d}}Tn.prototype.bytesPerElement=6,fi("StructArrayLayout3ui6",Tn);class zn extends at{_refreshViews(){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)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er){let br=this.length;return this.resize(br+1),this.emplace(br,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br){let sr=24*d,Mr=12*d,qr=48*d;return this.int16[sr+0]=L,this.int16[sr+1]=W,this.uint16[sr+2]=te,this.uint16[sr+3]=ue,this.uint32[Mr+2]=me,this.uint32[Mr+3]=ge,this.uint32[Mr+4]=Ce,this.uint16[sr+10]=Te,this.uint16[sr+11]=Oe,this.uint16[sr+12]=Pe,this.float32[Mr+7]=it,this.float32[Mr+8]=He,this.uint8[qr+36]=bt,this.uint8[qr+37]=Et,this.uint8[qr+38]=Qt,this.uint32[Mr+10]=er,this.int16[sr+22]=br,d}}zn.prototype.bytesPerElement=48,fi("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",zn);class $n extends at{_refreshViews(){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)}emplaceBack(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn){let gn=this.length;return this.resize(gn+1),this.emplace(gn,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn)}emplace(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr,Mr,qr,$r,_a,Ca,nn,qa,bn,Fn,gn){let Va=32*d,Hn=16*d;return this.int16[Va+0]=L,this.int16[Va+1]=W,this.int16[Va+2]=te,this.int16[Va+3]=ue,this.int16[Va+4]=me,this.int16[Va+5]=ge,this.int16[Va+6]=Ce,this.int16[Va+7]=Te,this.uint16[Va+8]=Oe,this.uint16[Va+9]=Pe,this.uint16[Va+10]=it,this.uint16[Va+11]=He,this.uint16[Va+12]=bt,this.uint16[Va+13]=Et,this.uint16[Va+14]=Qt,this.uint16[Va+15]=er,this.uint16[Va+16]=br,this.uint16[Va+17]=sr,this.uint16[Va+18]=Mr,this.uint16[Va+19]=qr,this.uint16[Va+20]=$r,this.uint16[Va+21]=_a,this.uint16[Va+22]=Ca,this.uint32[Hn+12]=nn,this.float32[Hn+13]=qa,this.float32[Hn+14]=bn,this.uint16[Va+30]=Fn,this.uint16[Va+31]=gn,d}}$n.prototype.bytesPerElement=64,fi("StructArrayLayout8i15ui1ul2f2ui64",$n);class xi extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.float32[1*d+0]=L,d}}xi.prototype.bytesPerElement=4,fi("StructArrayLayout1f4",xi);class di extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=3*d;return this.uint16[6*d+0]=L,this.float32[ue+1]=W,this.float32[ue+2]=te,d}}di.prototype.bytesPerElement=12,fi("StructArrayLayout1ui2f12",di);class uo extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L,W){let te=this.length;return this.resize(te+1),this.emplace(te,d,L,W)}emplace(d,L,W,te){let ue=4*d;return this.uint32[2*d+0]=L,this.uint16[ue+2]=W,this.uint16[ue+3]=te,d}}uo.prototype.bytesPerElement=8,fi("StructArrayLayout1ul2ui8",uo);class pe extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d,L){let W=this.length;return this.resize(W+1),this.emplace(W,d,L)}emplace(d,L,W){let te=2*d;return this.uint16[te+0]=L,this.uint16[te+1]=W,d}}pe.prototype.bytesPerElement=4,fi("StructArrayLayout2ui4",pe);class y extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(d){let L=this.length;return this.resize(L+1),this.emplace(L,d)}emplace(d,L){return this.uint16[1*d+0]=L,d}}y.prototype.bytesPerElement=2,fi("StructArrayLayout1ui2",y);class N extends at{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(d,L,W,te){let ue=this.length;return this.resize(ue+1),this.emplace(ue,d,L,W,te)}emplace(d,L,W,te,ue){let me=4*d;return this.float32[me+0]=L,this.float32[me+1]=W,this.float32[me+2]=te,this.float32[me+3]=ue,d}}N.prototype.bytesPerElement=16,fi("StructArrayLayout4f16",N);class ie extends tt{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new t(this.anchorPointX,this.anchorPointY)}}ie.prototype.size=20;class fe extends Ea{get(d){return new ie(this,d)}}fi("CollisionBoxArray",fe);class be extends tt{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(d){this._structArray.uint8[this._pos1+37]=d}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(d){this._structArray.uint8[this._pos1+38]=d}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(d){this._structArray.uint32[this._pos4+10]=d}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}be.prototype.size=48;class Re extends zn{get(d){return new be(this,d)}}fi("PlacedSymbolArray",Re);class je extends tt{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(d){this._structArray.uint32[this._pos4+12]=d}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}je.prototype.size=64;class Ze extends $n{get(d){return new je(this,d)}}fi("SymbolInstanceArray",Ze);class ut extends xi{getoffsetX(d){return this.float32[1*d+0]}}fi("GlyphOffsetArray",ut);class ft extends Jt{getx(d){return this.int16[3*d+0]}gety(d){return this.int16[3*d+1]}gettileUnitDistanceFromAnchor(d){return this.int16[3*d+2]}}fi("SymbolLineVertexArray",ft);class Dt extends tt{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Dt.prototype.size=12;class Gt extends di{get(d){return new Dt(this,d)}}fi("TextAnchorOffsetArray",Gt);class Kt extends tt{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}Kt.prototype.size=8;class st extends uo{get(d){return new Kt(this,d)}}fi("FeatureIndexArray",st);class It extends St{}class Ut extends St{}class ir extends St{}class dr extends gr{}class Ar extends Hr{}class hr extends Vr{}class vr extends ca{}class Or extends Aa{}class Cr extends Yr{}class ta extends oa{}class ka extends fa{}class Ta extends Ma{}class Ra extends hn{}class ua extends Tn{}class ia extends pe{}let ma=ct([{name:"a_pos",components:2,type:"Int16"}],4),{members:da}=ma;class Fa{constructor(d=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=d}prepareSegment(d,L,W,te){let ue=this.segments[this.segments.length-1];return d>Fa.MAX_VERTEX_ARRAY_LENGTH&&ee(`Max vertices per segment is ${Fa.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${d}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${Fa.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!ue||ue.vertexLength+d>Fa.MAX_VERTEX_ARRAY_LENGTH||ue.sortKey!==te?this.createNewSegment(L,W,te):ue}createNewSegment(d,L,W){let te={vertexOffset:d.length,primitiveOffset:L.length,vertexLength:0,primitiveLength:0,vaos:{}};return W!==void 0&&(te.sortKey=W),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(te),te}getOrCreateLatestSegment(d,L,W){return this.prepareSegment(0,d,L,W)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let d of this.segments)for(let L in d.vaos)d.vaos[L].destroy()}static simpleSegment(d,L,W,te){return new Fa([{vertexOffset:d,primitiveOffset:L,vertexLength:W,primitiveLength:te,vaos:{},sortKey:0}])}}function za(R,d){return 256*(R=se(Math.floor(R),0,255))+se(Math.floor(d),0,255)}Fa.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,fi("SegmentVector",Fa);let kn=ct([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),Dn=ct([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var ui,cn,sn,ei={exports:{}},Pn={exports:{}},Rn={exports:{}},In=function(){if(sn)return ei.exports;sn=1;var R=(ui||(ui=1,Pn.exports=function(L,W){var te,ue,me,ge,Ce,Te,Oe,Pe;for(ue=L.length-(te=3&L.length),me=W,Ce=3432918353,Te=461845907,Pe=0;Pe>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295)<<13|me>>>19))+((5*(me>>>16)&65535)<<16)&4294967295))+((58964+(ge>>>16)&65535)<<16);switch(Oe=0,te){case 3:Oe^=(255&L.charCodeAt(Pe+2))<<16;case 2:Oe^=(255&L.charCodeAt(Pe+1))<<8;case 1:me^=Oe=(65535&(Oe=(Oe=(65535&(Oe^=255&L.charCodeAt(Pe)))*Ce+(((Oe>>>16)*Ce&65535)<<16)&4294967295)<<15|Oe>>>17))*Te+(((Oe>>>16)*Te&65535)<<16)&4294967295}return me^=L.length,me=2246822507*(65535&(me^=me>>>16))+((2246822507*(me>>>16)&65535)<<16)&4294967295,me=3266489909*(65535&(me^=me>>>13))+((3266489909*(me>>>16)&65535)<<16)&4294967295,(me^=me>>>16)>>>0}),Pn.exports),d=(cn||(cn=1,Rn.exports=function(L,W){for(var te,ue=L.length,me=W^ue,ge=0;ue>=4;)te=1540483477*(65535&(te=255&L.charCodeAt(ge)|(255&L.charCodeAt(++ge))<<8|(255&L.charCodeAt(++ge))<<16|(255&L.charCodeAt(++ge))<<24))+((1540483477*(te>>>16)&65535)<<16),me=1540483477*(65535&me)+((1540483477*(me>>>16)&65535)<<16)^(te=1540483477*(65535&(te^=te>>>24))+((1540483477*(te>>>16)&65535)<<16)),ue-=4,++ge;switch(ue){case 3:me^=(255&L.charCodeAt(ge+2))<<16;case 2:me^=(255&L.charCodeAt(ge+1))<<8;case 1:me=1540483477*(65535&(me^=255&L.charCodeAt(ge)))+((1540483477*(me>>>16)&65535)<<16)}return me=1540483477*(65535&(me^=me>>>13))+((1540483477*(me>>>16)&65535)<<16),(me^=me>>>15)>>>0}),Rn.exports);return ei.exports=R,ei.exports.murmur3=R,ei.exports.murmur2=d,ei.exports}(),Jn=n(In);class Ei{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(d,L,W,te){this.ids.push(so(d)),this.positions.push(L,W,te)}getPositions(d){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let L=so(d),W=0,te=this.ids.length-1;for(;W>1;this.ids[me]>=L?te=me:W=me+1}let ue=[];for(;this.ids[W]===L;)ue.push({index:this.positions[3*W],start:this.positions[3*W+1],end:this.positions[3*W+2]}),W++;return ue}static serialize(d,L){let W=new Float64Array(d.ids),te=new Uint32Array(d.positions);return ti(W,te,0,W.length-1),L&&L.push(W.buffer,te.buffer),{ids:W,positions:te}}static deserialize(d){let L=new Ei;return L.ids=d.ids,L.positions=d.positions,L.indexed=!0,L}}function so(R){let d=+R;return!isNaN(d)&&d<=Number.MAX_SAFE_INTEGER?d:Jn(String(R))}function ti(R,d,L,W){for(;L>1],ue=L-1,me=W+1;for(;;){do ue++;while(R[ue]te);if(ue>=me)break;bi(R,ue,me),bi(d,3*ue,3*me),bi(d,3*ue+1,3*me+1),bi(d,3*ue+2,3*me+2)}me-L`u_${te}`),this.type=W}setUniform(d,L,W){d.set(W.constantOr(this.value))}getBinding(d,L,W){return this.type==="color"?new zs(d,L):new ro(d,L)}}class Zo{constructor(d,L){this.uniformNames=L.map(W=>`u_${W}`),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(d,L){this.pixelRatioFrom=L.pixelRatio,this.pixelRatioTo=d.pixelRatio,this.patternFrom=L.tlbr,this.patternTo=d.tlbr}setConstantDashPositions(d,L){this.dashTo=[0,d.y,d.height,d.width],this.dashFrom=[0,L.y,L.height,L.width]}setUniform(d,L,W,te){let ue=null;te==="u_pattern_to"?ue=this.patternTo:te==="u_pattern_from"?ue=this.patternFrom:te==="u_dasharray_to"?ue=this.dashTo:te==="u_dasharray_from"?ue=this.dashFrom:te==="u_pixel_ratio_to"?ue=this.pixelRatioTo:te==="u_pixel_ratio_from"&&(ue=this.pixelRatioFrom),ue!==null&&d.set(ue)}getBinding(d,L,W){return W.startsWith("u_pattern")||W.startsWith("u_dasharray_")?new Mo(d,L):new ro(d,L)}}class es{constructor(d,L,W,te){this.expression=d,this.type=W,this.maxValue=0,this.paintVertexAttributes=L.map(ue=>({name:`a_${ue}`,type:"Float32",components:W==="color"?2:1,offset:0})),this.paintVertexArray=new te}populatePaintArray(d,L,W){let te=this.paintVertexArray.length,ue=this.expression.evaluate(new oi(0,W),L,{},W.canonical,[],W.formattedSection);this.paintVertexArray.resize(d),this._setPaintValue(te,d,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(0,ue),W,te);this._setPaintValue(d,L,me)}_setPaintValue(d,L,W){if(this.type==="color"){let te=So(W);for(let ue=d;ue`u_${ge}_t`),this.type=W,this.useIntegerZoom=te,this.zoom=ue,this.maxValue=0,this.paintVertexAttributes=L.map(ge=>({name:`a_${ge}`,type:"Float32",components:W==="color"?4:2,offset:0})),this.paintVertexArray=new me}populatePaintArray(d,L,W){let te=this.expression.evaluate(new oi(this.zoom,W),L,{},W.canonical,[],W.formattedSection),ue=this.expression.evaluate(new oi(this.zoom+1,W),L,{},W.canonical,[],W.formattedSection),me=this.paintVertexArray.length;this.paintVertexArray.resize(d),this._setPaintValue(me,d,te,ue)}updatePaintArray(d,L,W,te,ue){let me=this.expression.evaluate(new oi(this.zoom,ue),W,te),ge=this.expression.evaluate(new oi(this.zoom+1,ue),W,te);this._setPaintValue(d,L,me,ge)}_setPaintValue(d,L,W,te){if(this.type==="color"){let ue=So(W),me=So(te);for(let ge=d;ge`#define HAS_UNIFORM_${te}`))}return d}getBinderAttributes(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof es||W instanceof $o)for(let te of W.paintVertexAttributes)d.push(te.name);else if(W instanceof _s){let te=W.getVertexAttributes();for(let ue of te)d.push(ue.name)}}return d}getBinderUniforms(){let d=[];for(let L in this.binders){let W=this.binders[L];if(W instanceof Ws||W instanceof Zo||W instanceof $o)for(let te of W.uniformNames)d.push(te)}return d}getPaintVertexBuffers(){return this._buffers}getUniforms(d,L){let W=[];for(let te in this.binders){let ue=this.binders[te];if(ue instanceof Ws||ue instanceof Zo||ue instanceof $o){for(let me of ue.uniformNames)if(L[me]){let ge=ue.getBinding(d,L[me],me);W.push({name:me,property:te,binding:ge})}}}return W}setUniforms(d,L,W,te){for(let{name:ue,property:me,binding:ge}of L)this.binders[me].setUniform(ge,te,W.get(me),ue)}updatePaintBuffers(d){this._buffers=[];for(let L in this.binders){let W=this.binders[L];if(d&&W instanceof _s){let te=d.fromScale===2?W.zoomInPaintVertexBuffer:W.zoomOutPaintVertexBuffer;te&&this._buffers.push(te)}else(W instanceof es||W instanceof $o)&&W.paintVertexBuffer&&this._buffers.push(W.paintVertexBuffer)}}upload(d){for(let L in this.binders){let W=this.binders[L];(W instanceof es||W instanceof $o||W instanceof _s)&&W.upload(d)}this.updatePaintBuffers()}destroy(){for(let d in this.binders){let L=this.binders[d];(L instanceof es||L instanceof $o||L instanceof _s)&&L.destroy()}}}class mo{constructor(d,L,W=()=>!0){this.programConfigurations={};for(let te of d)this.programConfigurations[te.id]=new Ll(te,L,W);this.needsUpload=!1,this._featureMap=new Ei,this._bufferOffset=0}populatePaintArrays(d,L,W,te){for(let ue in this.programConfigurations)this.programConfigurations[ue].populatePaintArrays(d,L,te);L.id!==void 0&&this._featureMap.add(L.id,W,this._bufferOffset,d),this._bufferOffset=d,this.needsUpload=!0}updatePaintArrays(d,L,W,te){for(let ue of W)this.needsUpload=this.programConfigurations[ue.id].updatePaintArrays(d,this._featureMap,L,ue,te)||this.needsUpload}get(d){return this.programConfigurations[d]}upload(d){if(this.needsUpload){for(let L in this.programConfigurations)this.programConfigurations[L].upload(d);this.needsUpload=!1}}destroy(){for(let d in this.programConfigurations)this.programConfigurations[d].destroy()}}function ru(R,d){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[R]||[R.replace(`${d}-`,"").replace(/-/g,"_")]}function Rs(R,d,L){let W={color:{source:Vr,composite:N},number:{source:xi,composite:Vr}},te=function(ue){return{"line-pattern":{source:vr,composite:vr},"fill-pattern":{source:vr,composite:vr},"fill-extrusion-pattern":{source:vr,composite:vr},"line-dasharray":{source:Or,composite:Or}}[ue]}(R);return te?.[L]||W[d][L]}fi("ConstantBinder",Ws),fi("CrossFadedConstantBinder",Zo),fi("SourceExpressionBinder",es),fi("CrossFadedPatternBinder",Go),fi("CrossFadedDasharrayBinder",Ys),fi("CompositeExpressionBinder",$o),fi("ProgramConfiguration",Ll,{omit:["_buffers"]}),fi("ProgramConfigurationSet",mo);let Yu=Math.pow(2,14)-1,Ul=-Yu-1;function ql(R){let d=F/R.extent,L=R.loadGeometry();for(let W of L)for(let te of W){let ue=Math.round(te.x*d),me=Math.round(te.y*d);te.x=se(ue,Ul,Yu),te.y=se(me,Ul,Yu),(uete.x+1||mete.y+1)&&ee("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return L}function fo(R,d){return{type:R.type,id:R.id,properties:R.properties,geometry:d?ql(R):[]}}let Xo=-32768;function Os(R,d,L,W,te){R.emplaceBack(Xo+8*d+W,Xo+8*L+te)}class ra{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new Ut,this.indexArray=new ua,this.segments=new Fa,this.programConfigurations=new mo(d.layers,d.zoom),this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){let te=this.layers[0],ue=[],me=null,ge=!1,Ce=te.type==="heatmap";if(te.type==="circle"){let Oe=te;me=Oe.layout.get("circle-sort-key"),ge=!me.isConstant(),Ce||(Ce=Oe.paint.get("circle-pitch-alignment")==="map")}let Te=Ce?L.subdivisionGranularity.circle:1;for(let{feature:Oe,id:Pe,index:it,sourceLayerIndex:He}of d){let bt=this.layers[0]._featureFilter.needGeometry,Et=fo(Oe,bt);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Et,W))continue;let Qt=ge?me.evaluate(Et,{},W):void 0,er={id:Pe,properties:Oe.properties,type:Oe.type,sourceLayerIndex:He,index:it,geometry:bt?Et.geometry:ql(Oe),patterns:{},sortKey:Qt};ue.push(er)}ge&&ue.sort((Oe,Pe)=>Oe.sortKey-Pe.sortKey);for(let Oe of ue){let{geometry:Pe,index:it,sourceLayerIndex:He}=Oe,bt=d[it].feature;this.addFeature(Oe,Pe,it,W,Te),L.featureIndex.insert(bt,Pe,it,He,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,da),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(d,L,W,te,ue=1){let me;switch(ue){case 1:me=[0,7];break;case 3:me=[0,2,5,7];break;case 5:me=[0,1,3,4,6,7];break;case 7:me=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${ue}; valid values are 1, 3, 5, 7.`)}let ge=me.length;for(let Ce of L)for(let Te of Ce){let Oe=Te.x,Pe=Te.y;if(Oe<0||Oe>=F||Pe<0||Pe>=F)continue;let it=this.segments.prepareSegment(ge*ge,this.layoutVertexArray,this.indexArray,d.sortKey),He=it.vertexLength;for(let bt=0;bt1){if(Is(R,d))return!0;for(let W of d)if(Wr(W,R,L))return!0}for(let W of R)if(Wr(W,d,L))return!0;return!1}function Is(R,d){if(R.length===0||d.length===0)return!1;for(let L=0;L1?L:L.sub(d)._mult(te)._add(d))}function pa(R,d){let L,W,te,ue=!1;for(let me of R){L=me;for(let ge=0,Ce=L.length-1;ged.y!=te.y>d.y&&d.x<(te.x-W.x)*(d.y-W.y)/(te.y-W.y)+W.x&&(ue=!ue)}return ue}function Wa(R,d){let L=!1;for(let W=0,te=R.length-1;Wd.y!=me.y>d.y&&d.x<(me.x-ue.x)*(d.y-ue.y)/(me.y-ue.y)+ue.x&&(L=!L)}return L}function ln(R,d,L){let W=L[0],te=L[2];if(R.xte.x&&d.x>te.x||R.yte.y&&d.y>te.y)return!1;let ue=ae(R,d,L[0]);return ue!==ae(R,d,L[1])||ue!==ae(R,d,L[2])||ue!==ae(R,d,L[3])}function Le(R,d,L){let W=d.paint.get(R).value;return W.kind==="constant"?W.value:L.programConfigurations.get(d.id).getMaxValue(R)}function Ue(R){return Math.sqrt(R[0]*R[0]+R[1]*R[1])}function Qe(R,d,L,W,te){if(!d[0]&&!d[1])return R;let ue=t.convert(d)._mult(te);L==="viewport"&&ue._rotate(-W);let me=[];for(let ge of R)me.push(ge.sub(ue));return me}function _t(R){let d=[];for(let L=0;LQa(sr,Qt,er,br))}(Te,ue,ge,Ce),bt=Oe),va({queryGeometry:He,size:bt,transform:ue,unwrappedTileID:ge,getElevation:Ce,pitchAlignment:it,pitchScale:Pe},te)}}class _n extends ra{}let Mn;fi("HeatmapBucket",_n,{omit:["layers"]});var Bn={get paint(){return Mn=Mn||new Ps({"heatmap-radius":new wi(ht.paint_heatmap["heatmap-radius"]),"heatmap-weight":new wi(ht.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new hi(ht.paint_heatmap["heatmap-intensity"]),"heatmap-color":new tu(ht.paint_heatmap["heatmap-color"]),"heatmap-opacity":new hi(ht.paint_heatmap["heatmap-opacity"])})}};function Zn(R,{width:d,height:L},W,te){if(te){if(te instanceof Uint8ClampedArray)te=new Uint8Array(te.buffer);else if(te.length!==d*L*W)throw new RangeError(`mismatched image size. expected: ${te.length} but got: ${d*L*W}`)}else te=new Uint8Array(d*L*W);return R.width=d,R.height=L,R.data=te,R}function Ci(R,{width:d,height:L},W){if(d===R.width&&L===R.height)return;let te=Zn({},{width:d,height:L},W);qo(R,te,{x:0,y:0},{x:0,y:0},{width:Math.min(R.width,d),height:Math.min(R.height,L)},W),R.width=d,R.height=L,R.data=te.data}function qo(R,d,L,W,te,ue){if(te.width===0||te.height===0)return d;if(te.width>R.width||te.height>R.height||L.x>R.width-te.width||L.y>R.height-te.height)throw new RangeError("out of range source coordinates for image copy");if(te.width>d.width||te.height>d.height||W.x>d.width-te.width||W.y>d.height-te.height)throw new RangeError("out of range destination coordinates for image copy");let me=R.data,ge=d.data;if(me===ge)throw new Error("srcData equals dstData, so image is already copied");for(let Ce=0;Ce{d[R.evaluationKey]=Ce;let Te=R.expression.evaluate(d);te.setPixel(me/4/L,ge/4,Te)};if(R.clips)for(let me=0,ge=0;methis.max&&(this.max=Pe),Pe=this.dim+1||L<-1||L>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${d}, y: ${L}, dim: ${this.dim}`);return(L+1)*this.stride+(d+1)}unpack(d,L,W){return d*this.redFactor+L*this.greenFactor+W*this.blueFactor-this.baseShift}pack(d){return gp(d,this.getUnpackVector())}getPixels(){return new ls({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(d,L,W){if(this.dim!==d.dim)throw new Error("dem dimension mismatch");let te=L*this.dim,ue=L*this.dim+this.dim,me=W*this.dim,ge=W*this.dim+this.dim;switch(L){case-1:te=ue-1;break;case 1:ue=te+1}switch(W){case-1:me=ge-1;break;case 1:ge=me+1}let Ce=-L*this.dim,Te=-W*this.dim;for(let Oe=me;Oe0)for(let me=d;me=d;me-=W)ue=m4(me/W|0,R[me],R[me+1],ue);return ue&&g0(ue,ue.next)&&(Ag(ue),ue=ue.next),ue}function Hd(R,d){if(!R)return R;d||(d=R);let L,W=R;do if(L=!1,W.steiner||!g0(W,W.next)&&Xu(W.prev,W,W.next)!==0)W=W.next;else{if(Ag(W),W=d=W.prev,W===W.next)break;L=!0}while(L||W!==d);return d}function _p(R,d,L,W,te,ue,me){if(!R)return;!me&&ue&&function(Ce,Te,Oe,Pe){let it=Ce;do it.z===0&&(it.z=t3(it.x,it.y,Te,Oe,Pe)),it.prevZ=it.prev,it.nextZ=it.next,it=it.next;while(it!==Ce);it.prevZ.nextZ=null,it.prevZ=null,function(He){let bt,Et=1;do{let Qt,er=He;He=null;let br=null;for(bt=0;er;){bt++;let sr=er,Mr=0;for(let $r=0;$r0||qr>0&&sr;)Mr!==0&&(qr===0||!sr||er.z<=sr.z)?(Qt=er,er=er.nextZ,Mr--):(Qt=sr,sr=sr.nextZ,qr--),br?br.nextZ=Qt:He=Qt,Qt.prevZ=br,br=Qt;er=sr}br.nextZ=null,Et*=2}while(bt>1)}(it)}(R,W,te,ue);let ge=R;for(;R.prev!==R.next;){let Ce=R.prev,Te=R.next;if(ue?GH(R,W,te,ue):bg(R))d.push(Ce.i,R.i,Te.i),Ag(R),R=Te.next,ge=Te.next;else if((R=Te)===ge){me?me===1?_p(R=HH(Hd(R),d),d,L,W,te,ue,2):me===2&&WH(R,d,L,W,te,ue):_p(Hd(R),d,L,W,te,ue,1);break}}}function bg(R){let d=R.prev,L=R,W=R.next;if(Xu(d,L,W)>=0)return!1;let te=d.x,ue=L.x,me=W.x,ge=d.y,Ce=L.y,Te=W.y,Oe=Math.min(te,ue,me),Pe=Math.min(ge,Ce,Te),it=Math.max(te,ue,me),He=Math.max(ge,Ce,Te),bt=W.next;for(;bt!==d;){if(bt.x>=Oe&&bt.x<=it&&bt.y>=Pe&&bt.y<=He&&wg(te,ge,ue,Ce,me,Te,bt.x,bt.y)&&Xu(bt.prev,bt,bt.next)>=0)return!1;bt=bt.next}return!0}function GH(R,d,L,W){let te=R.prev,ue=R,me=R.next;if(Xu(te,ue,me)>=0)return!1;let ge=te.x,Ce=ue.x,Te=me.x,Oe=te.y,Pe=ue.y,it=me.y,He=Math.min(ge,Ce,Te),bt=Math.min(Oe,Pe,it),Et=Math.max(ge,Ce,Te),Qt=Math.max(Oe,Pe,it),er=t3(He,bt,d,L,W),br=t3(Et,Qt,d,L,W),sr=R.prevZ,Mr=R.nextZ;for(;sr&&sr.z>=er&&Mr&&Mr.z<=br;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0||(sr=sr.prevZ,Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0))return!1;Mr=Mr.nextZ}for(;sr&&sr.z>=er;){if(sr.x>=He&&sr.x<=Et&&sr.y>=bt&&sr.y<=Qt&&sr!==te&&sr!==me&&wg(ge,Oe,Ce,Pe,Te,it,sr.x,sr.y)&&Xu(sr.prev,sr,sr.next)>=0)return!1;sr=sr.prevZ}for(;Mr&&Mr.z<=br;){if(Mr.x>=He&&Mr.x<=Et&&Mr.y>=bt&&Mr.y<=Qt&&Mr!==te&&Mr!==me&&wg(ge,Oe,Ce,Pe,Te,it,Mr.x,Mr.y)&&Xu(Mr.prev,Mr,Mr.next)>=0)return!1;Mr=Mr.nextZ}return!0}function HH(R,d){let L=R;do{let W=L.prev,te=L.next.next;!g0(W,te)&&p4(W,L,L.next,te)&&Tg(W,te)&&Tg(te,W)&&(d.push(W.i,L.i,te.i),Ag(L),Ag(L.next),L=R=te),L=L.next}while(L!==R);return Hd(L)}function WH(R,d,L,W,te,ue){let me=R;do{let ge=me.next.next;for(;ge!==me.prev;){if(me.i!==ge.i&&KH(me,ge)){let Ce=v4(me,ge);return me=Hd(me,me.next),Ce=Hd(Ce,Ce.next),_p(me,d,L,W,te,ue,0),void _p(Ce,d,L,W,te,ue,0)}ge=ge.next}me=me.next}while(me!==R)}function YH(R,d){let L=R.x-d.x;return L===0&&(L=R.y-d.y,L===0)&&(L=(R.next.y-R.y)/(R.next.x-R.x)-(d.next.y-d.y)/(d.next.x-d.x)),L}function XH(R,d){let L=function(te,ue){let me=ue,ge=te.x,Ce=te.y,Te,Oe=-1/0;if(g0(te,me))return me;do{if(g0(te,me.next))return me.next;if(Ce<=me.y&&Ce>=me.next.y&&me.next.y!==me.y){let Et=me.x+(Ce-me.y)*(me.next.x-me.x)/(me.next.y-me.y);if(Et<=ge&&Et>Oe&&(Oe=Et,Te=me.x=me.x&&me.x>=it&&ge!==me.x&&d4(CeTe.x||me.x===Te.x&&ZH(Te,me)))&&(Te=me,bt=Et)}me=me.next}while(me!==Pe);return Te}(R,d);if(!L)return d;let W=v4(L,R);return Hd(W,W.next),Hd(L,L.next)}function ZH(R,d){return Xu(R.prev,R,d.prev)<0&&Xu(d.next,R,R.next)<0}function t3(R,d,L,W,te){return(R=1431655765&((R=858993459&((R=252645135&((R=16711935&((R=(R-L)*te|0)|R<<8))|R<<4))|R<<2))|R<<1))|(d=1431655765&((d=858993459&((d=252645135&((d=16711935&((d=(d-W)*te|0)|d<<8))|d<<4))|d<<2))|d<<1))<<1}function $H(R){let d=R,L=R;do(d.x=(R-me)*(ue-ge)&&(R-me)*(W-ge)>=(L-me)*(d-ge)&&(L-me)*(ue-ge)>=(te-me)*(W-ge)}function wg(R,d,L,W,te,ue,me,ge){return!(R===me&&d===ge)&&d4(R,d,L,W,te,ue,me,ge)}function KH(R,d){return R.next.i!==d.i&&R.prev.i!==d.i&&!function(L,W){let te=L;do{if(te.i!==L.i&&te.next.i!==L.i&&te.i!==W.i&&te.next.i!==W.i&&p4(te,te.next,L,W))return!0;te=te.next}while(te!==L);return!1}(R,d)&&(Tg(R,d)&&Tg(d,R)&&function(L,W){let te=L,ue=!1,me=(L.x+W.x)/2,ge=(L.y+W.y)/2;do te.y>ge!=te.next.y>ge&&te.next.y!==te.y&&me<(te.next.x-te.x)*(ge-te.y)/(te.next.y-te.y)+te.x&&(ue=!ue),te=te.next;while(te!==L);return ue}(R,d)&&(Xu(R.prev,R,d.prev)||Xu(R,d.prev,d))||g0(R,d)&&Xu(R.prev,R,R.next)>0&&Xu(d.prev,d,d.next)>0)}function Xu(R,d,L){return(d.y-R.y)*(L.x-d.x)-(d.x-R.x)*(L.y-d.y)}function g0(R,d){return R.x===d.x&&R.y===d.y}function p4(R,d,L,W){let te=fy(Xu(R,d,L)),ue=fy(Xu(R,d,W)),me=fy(Xu(L,W,R)),ge=fy(Xu(L,W,d));return te!==ue&&me!==ge||!(te!==0||!cy(R,L,d))||!(ue!==0||!cy(R,W,d))||!(me!==0||!cy(L,R,W))||!(ge!==0||!cy(L,d,W))}function cy(R,d,L){return d.x<=Math.max(R.x,L.x)&&d.x>=Math.min(R.x,L.x)&&d.y<=Math.max(R.y,L.y)&&d.y>=Math.min(R.y,L.y)}function fy(R){return R>0?1:R<0?-1:0}function Tg(R,d){return Xu(R.prev,R,R.next)<0?Xu(R,d,R.next)>=0&&Xu(R,R.prev,d)>=0:Xu(R,d,R.prev)<0||Xu(R,R.next,d)<0}function v4(R,d){let L=r3(R.i,R.x,R.y),W=r3(d.i,d.x,d.y),te=R.next,ue=d.prev;return R.next=d,d.prev=R,L.next=te,te.prev=L,W.next=L,L.prev=W,ue.next=W,W.prev=ue,W}function m4(R,d,L,W){let te=r3(R,d,L);return W?(te.next=W.next,te.prev=W,W.next.prev=te,W.next=te):(te.prev=te,te.next=te),te}function Ag(R){R.next.prev=R.prev,R.prev.next=R.next,R.prevZ&&(R.prevZ.nextZ=R.nextZ),R.nextZ&&(R.nextZ.prevZ=R.prevZ)}function r3(R,d,L){return{i:R,x:d,y:L,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class y0{constructor(d,L){if(L>d)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=d,this._minGranularity=L}getGranularityForZoomLevel(d){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||L>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let W=0|Math.round(d),te=0|Math.round(L),ue=this._getKey(W,te);if(this._vertexDictionary.has(ue))return this._vertexDictionary.get(ue);let me=this._vertexBuffer.length/2;return this._vertexDictionary.set(ue,me),this._vertexBuffer.push(W,te),me}_subdivideTrianglesScanline(d){if(this._granularity<2)return function(te,ue){let me=[];for(let ge=0;ge0?(me.push(Ce),me.push(Oe),me.push(Te)):(me.push(Ce),me.push(Te),me.push(Oe))}return me}(this._vertexBuffer,d);let L=[],W=d.length;for(let te=0;te=1||qr<=0)||er&&(Teue)){Pe>=te&&Pe<=ue&&me.push(W[(ge+1)%3]);continue}!er&&Mr>0&&me.push(this._vertexToIndex(Ce+bt*Mr,Te+Et*Mr));let $r=Ce+bt*Math.max(Mr,0),_a=Ce+bt*Math.min(qr,1);Qt||this._generateIntraEdgeVertices(me,Ce,Te,Oe,Pe,$r,_a),!er&&qr<1&&me.push(this._vertexToIndex(Ce+bt*qr,Te+Et*qr)),(er||Pe>=te&&Pe<=ue)&&me.push(W[(ge+1)%3]),!er&&(Pe<=te||Pe>=ue)&&this._generateInterEdgeVertices(me,Ce,Te,Oe,Pe,it,He,_a,te,ue)}return me}_generateIntraEdgeVertices(d,L,W,te,ue,me,ge){let Ce=te-L,Te=ue-W,Oe=Te===0,Pe=Oe?Math.min(L,te):Math.min(me,ge),it=Oe?Math.max(L,te):Math.max(me,ge),He=Math.floor(Pe/this._granularityCellSize)+1,bt=Math.ceil(it/this._granularityCellSize)-1;if(Oe?L=He;Et--){let Qt=Et*this._granularityCellSize;d.push(this._vertexToIndex(Qt,W+Te*(Qt-L)/Ce))}}_generateInterEdgeVertices(d,L,W,te,ue,me,ge,Ce,Te,Oe){let Pe=ue-W,it=me-te,He=ge-ue,bt=(Te-ue)/He,Et=(Oe-ue)/He,Qt=Math.min(bt,Et),er=Math.max(bt,Et),br=te+it*Qt,sr=Math.floor(Math.min(br,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(br,Ce)/this._granularityCellSize)-1,qr=Ce=1||er<=0){let Ca=W-ge,nn=me+(L-me)*Math.min((Te-ge)/Ca,(Oe-ge)/Ca);sr=Math.floor(Math.min(nn,Ce)/this._granularityCellSize)+1,Mr=Math.ceil(Math.max(nn,Ce)/this._granularityCellSize)-1,qr=Ce0?Oe:Te;if(qr)for(let Ca=sr;Ca<=Mr;Ca++)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a));else for(let Ca=Mr;Ca>=sr;Ca--)d.push(this._vertexToIndex(Ca*this._granularityCellSize,_a))}_generateOutline(d){let L=[];for(let W of d){let te=Sv(W,this._granularity,!0),ue=this._pointArrayToIndices(te),me=[];for(let ge=1;geue!=(me===_0)?(d.push(L),d.push(W),d.push(this._vertexToIndex(te,me)),d.push(W),d.push(this._vertexToIndex(ue,me)),d.push(this._vertexToIndex(te,me))):(d.push(W),d.push(L),d.push(this._vertexToIndex(te,me)),d.push(this._vertexToIndex(ue,me)),d.push(W),d.push(this._vertexToIndex(te,me)))}_fillPoles(d,L,W){let te=this._vertexBuffer,ue=F,me=d.length;for(let ge=2;ge80*Pe){Qt=Te[0],er=Te[1];let sr=Qt,Mr=er;for(let qr=Pe;qrsr&&(sr=$r),_a>Mr&&(Mr=_a)}br=Math.max(sr-Qt,Mr-er),br=br!==0?32767/br:0}return _p(bt,Et,Pe,Qt,er,br,0),Et}(W,te),Ce=this._convertIndices(W,ge);ue=this._subdivideTrianglesScanline(Ce)}catch(ge){console.error(ge)}let me=[];return L&&(me=this._generateOutline(d)),this._ensureNoPoleVertices(),this._handlePoles(ue),{verticesFlattened:this._vertexBuffer,indicesTriangles:ue,indicesLineList:me}}_convertIndices(d,L){let W=[];for(let te of L)W.push(this._vertexToIndex(d[2*te],d[2*te+1]));return W}_pointArrayToIndices(d){let L=[];for(let W of d)L.push(this._vertexToIndex(W.x,W.y));return L}}function g4(R,d,L,W=!0){return new JH(L,d).subdividePolygonInternal(R,W)}function Sv(R,d,L=!1){if(!R||R.length<1)return[];if(R.length<2)return[];let W=R[0],te=R[R.length-1],ue=L&&(W.x!==te.x||W.y!==te.y);if(d<2)return ue?[...R,R[0]]:[...R];let me=Math.floor(F/d),ge=[];ge.push(new t(R[0].x,R[0].y));let Ce=R.length,Te=ue?Ce:Ce-1;for(let Oe=0;Oe0?(Math.floor(_a/me)+1)*me:(Math.ceil(_a/me)-1)*me,bn=Mr>0?(Math.floor(Ca/me)+1)*me:(Math.ceil(Ca/me)-1)*me,Fn=Math.abs(_a-qa),gn=Math.abs(Ca-bn),Va=Math.abs(_a-Et),Hn=Math.abs(Ca-Qt),ni=er?Fn/qr:Number.POSITIVE_INFINITY,Wn=br?gn/$r:Number.POSITIVE_INFINITY;if((Va<=Fn||!er)&&(Hn<=gn||!br))break;if(ni=0?me-1:ue-1,Te=(ge+1)%ue,Oe=R[2*d[Ce]],Pe=R[2*d[Te]],it=R[2*d[me]],He=R[2*d[me]+1],bt=R[2*d[ge]+1],Et=!1;if(OePe)Et=!1;else{let Qt=bt-He,er=-(R[2*d[ge]]-it),br=He((Pe-it)*Qt+(R[2*d[Te]+1]-He)*er)*br&&(Et=!0)}if(Et){let Qt=d[Ce],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),me--,me<0&&(me=ue-1)}else{let Qt=d[Te],er=d[me],br=d[ge];Qt!==er&&Qt!==br&&er!==br&&L.push(br,er,Qt),ge++,ge>=ue&&(ge=0)}if(Ce===Te)break}}function y4(R,d,L,W,te,ue,me,ge,Ce){let Te=te.length/2,Oe=me&&ge&&Ce;if(TeFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,Fn=!0,qr=0);let gn=Sg(er,bt,Qt,br,_a,qa,Mr),Va=Sg(er,bt,Qt,br,Ca,bn,Mr),Hn=Sg(er,bt,Qt,br,nn,Fn,Mr);He.emplaceBack(qr+gn-sr,qr+Va-sr,qr+Hn-sr),Mr.primitiveLength++}})(d,L,W,te,ue,R),Oe&&function(Pe,it,He,bt,Et,Qt){let er=[];for(let $r=0;$rFa.MAX_VERTEX_ARRAY_LENGTH&&(Mr=Pe.createNewSegment(it,He),sr=br.count,qa=!0,bn=!0,qr=0);let Fn=Sg(er,bt,Qt,br,Ca,qa,Mr),gn=Sg(er,bt,Qt,br,nn,bn,Mr);He.emplaceBack(qr+Fn-sr,qr+gn-sr),Mr.primitiveLength++}}(me,L,ge,te,Ce,R),d.forceNewSegmentOnNextPrepare(),me?.forceNewSegmentOnNextPrepare()}function Sg(R,d,L,W,te,ue,me){if(ue){let ge=W.count;return L(d[2*te],d[2*te+1]),R[te]=W.count,W.count++,me.vertexLength++,ge}return R[te]}class a3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new ir,this.indexArray=new ua,this.indexArray2=new ia,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.segments2=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("fill",this.layers,L);let te=this.layers[0].layout.get("fill-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W,L.availableImages):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;if(this.hasDependencies){let Pe=v0("fill",this.layers,ge,{zoom:this.zoom},L);this.patternFeatures.push(Pe)}else this.addFeature(ge,Ce,Te,W,{},L.subdivisionGranularity);L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}addFeatures(d,L,W){for(let te of this.patternFeatures)this.addFeature(te,te.geometry,te.index,L,W,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,p0),this.indexBuffer=d.createIndexBuffer(this.indexArray),this.indexBuffer2=d.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(d,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce=g4(ge,te,me.fill.getGranularityForZoomLevel(te.z)),Te=this.layoutVertexArray;y4((Oe,Pe)=>{Te.emplaceBack(Oe,Pe)},this.segments,this.layoutVertexArray,this.indexArray,Ce.verticesFlattened,Ce.indicesTriangles,this.segments2,this.indexArray2,Ce.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,canonical:te})}}let _4,x4;fi("FillBucket",a3,{omit:["layers","patternFeatures"]});var eW={get paint(){return x4=x4||new Ps({"fill-antialias":new hi(ht.paint_fill["fill-antialias"]),"fill-opacity":new wi(ht.paint_fill["fill-opacity"]),"fill-color":new wi(ht.paint_fill["fill-color"]),"fill-outline-color":new wi(ht.paint_fill["fill-outline-color"]),"fill-translate":new hi(ht.paint_fill["fill-translate"]),"fill-translate-anchor":new hi(ht.paint_fill["fill-translate-anchor"]),"fill-pattern":new sl(ht.paint_fill["fill-pattern"])})},get layout(){return _4=_4||new Ps({"fill-sort-key":new wi(ht.layout_fill["fill-sort-key"])})}};class tW extends ll{constructor(d,L){super(d,eW,L)}recalculate(d,L){super.recalculate(d,L);let W=this.paint._values["fill-outline-color"];W.value.kind==="constant"&&W.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(d){return new a3(d)}queryRadius(){return Ue(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:d,geometry:L,transform:W,pixelsToTileUnits:te}){return Bi(Qe(d,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-W.bearingInRadians,te),L)}isTileClipped(){return!0}}let rW=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),aW=ct([{name:"a_centroid",components:2,type:"Int16"}],4),{members:nW}=rW;class Eg{constructor(d,L,W,te,ue){this.properties={},this.extent=W,this.type=0,this.id=void 0,this._pbf=d,this._geometry=-1,this._keys=te,this._values=ue,d.readFields(iW,this,L)}loadGeometry(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=[],te,ue=1,me=0,ge=0,Ce=0;for(;d.pos>3}if(me--,ue===1||ue===2)ge+=d.readSVarint(),Ce+=d.readSVarint(),ue===1&&(te&&W.push(te),te=[]),te&&te.push(new t(ge,Ce));else{if(ue!==7)throw new Error(`unknown command ${ue}`);te&&te.push(te[0].clone())}}return te&&W.push(te),W}bbox(){let d=this._pbf;d.pos=this._geometry;let L=d.readVarint()+d.pos,W=1,te=0,ue=0,me=0,ge=1/0,Ce=-1/0,Te=1/0,Oe=-1/0;for(;d.pos>3}if(te--,W===1||W===2)ue+=d.readSVarint(),me+=d.readSVarint(),ueCe&&(Ce=ue),meOe&&(Oe=me);else if(W!==7)throw new Error(`unknown command ${W}`)}return[ge,Te,Ce,Oe]}toGeoJSON(d,L,W){let te=this.extent*Math.pow(2,W),ue=this.extent*d,me=this.extent*L,ge=this.loadGeometry();function Ce(it){return[360*(it.x+ue)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(it.y+me)/te)*Math.PI))-90]}function Te(it){return it.map(Ce)}let Oe;if(this.type===1){let it=[];for(let bt of ge)it.push(bt[0]);let He=Te(it);Oe=it.length===1?{type:"Point",coordinates:He[0]}:{type:"MultiPoint",coordinates:He}}else if(this.type===2){let it=ge.map(Te);Oe=it.length===1?{type:"LineString",coordinates:it[0]}:{type:"MultiLineString",coordinates:it}}else{if(this.type!==3)throw new Error("unknown feature type");{let it=b4(ge),He=[];for(let bt of it)He.push(bt.map(Te));Oe=He.length===1?{type:"Polygon",coordinates:He[0]}:{type:"MultiPolygon",coordinates:He}}}let Pe={type:"Feature",geometry:Oe,properties:this.properties};return this.id!=null&&(Pe.id=this.id),Pe}}function iW(R,d,L){R===1?d.id=L.readVarint():R===2?function(W,te){let ue=W.readVarint()+W.pos;for(;W.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[d];let L=this._pbf.readVarint()+this._pbf.pos;return new Eg(this._pbf,L,this.extent,this._keys,this._values)}}function lW(R,d,L){R===15?d.version=L.readVarint():R===1?d.name=L.readString():R===5?d.extent=L.readVarint():R===2?d._features.push(L.pos):R===3?d._keys.push(L.readString()):R===4&&d._values.push(function(W){let te=null,ue=W.readVarint()+W.pos;for(;W.pos>3;te=me===1?W.readString():me===2?W.readFloat():me===3?W.readDouble():me===4?W.readVarint64():me===5?W.readVarint():me===6?W.readSVarint():me===7?W.readBoolean():null}if(te==null)throw new Error("unknown feature value");return te}(L))}class w4{constructor(d,L){this.layers=d.readFields(uW,{},L)}}function uW(R,d,L){if(R===3){let W=new sW(L,L.readVarint()+L.pos);W.length&&(d[W.name]=W)}}let n3=Math.pow(2,13);function kg(R,d,L,W,te,ue,me,ge){R.emplaceBack(d,L,2*Math.floor(W*n3)+me,te*n3*2,ue*n3*2,Math.round(ge))}class i3{constructor(d){this.zoom=d.zoom,this.overscaling=d.overscaling,this.layers=d.layers,this.layerIds=this.layers.map(L=>L.id),this.index=d.index,this.hasDependencies=!1,this.layoutVertexArray=new dr,this.centroidVertexArray=new It,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.features=[],this.hasDependencies=Md("fill-extrusion",this.layers,L);for(let{feature:te,id:ue,index:me,sourceLayerIndex:ge}of d){let Ce=this.layers[0]._featureFilter.needGeometry,Te=fo(te,Ce);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),Te,W))continue;let Oe={id:ue,sourceLayerIndex:ge,index:me,geometry:Ce?Te.geometry:ql(te),properties:te.properties,type:te.type,patterns:{}};this.hasDependencies?this.features.push(v0("fill-extrusion",this.layers,Oe,{zoom:this.zoom},L)):this.addFeature(Oe,Oe.geometry,me,W,{},L.subdivisionGranularity),L.featureIndex.insert(te,Oe.geometry,me,ge,this.index,!0)}}addFeatures(d,L,W){for(let te of this.features){let{geometry:ue}=te;this.addFeature(te,ue,te.index,L,W,d.subdivisionGranularity)}}update(d,L,W){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,nW),this.centroidVertexBuffer=d.createVertexBuffer(this.centroidVertexArray,aW.members,!0),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(d,L,W,te,ue,me){for(let ge of Yc(L,500)){let Ce={x:0,y:0,sampleCount:0},Te=this.layoutVertexArray.length;this.processPolygon(Ce,te,d,ge,me);let Oe=this.layoutVertexArray.length-Te,Pe=Math.floor(Ce.x/Ce.sampleCount),it=Math.floor(Ce.y/Ce.sampleCount);for(let He=0;He{kg(Oe,Pe,it,0,0,1,1,0)},this.segments,this.layoutVertexArray,this.indexArray,Te.verticesFlattened,Te.indicesTriangles)}_generateSideFaces(d,L){let W=0;for(let te=1;teFa.MAX_VERTEX_ARRAY_LENGTH&&(L.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let ge=ue.sub(me)._perp()._unit(),Ce=me.dist(ue);W+Ce>32768&&(W=0),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,ue.x,ue.y,ge.x,ge.y,0,1,W),W+=Ce,kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,0,W),kg(this.layoutVertexArray,me.x,me.y,ge.x,ge.y,0,1,W);let Te=L.segment.vertexLength;this.indexArray.emplaceBack(Te,Te+2,Te+1),this.indexArray.emplaceBack(Te+1,Te+2,Te+3),L.segment.vertexLength+=4,L.segment.primitiveLength+=2}}}function cW(R,d){for(let L=0;LF)||R.y===d.y&&(R.y<0||R.y>F)}function T4(R){return R.every(d=>d.x<0)||R.every(d=>d.x>F)||R.every(d=>d.y<0)||R.every(d=>d.y>F)}let A4;fi("FillExtrusionBucket",i3,{omit:["layers","features"]});var hW={get paint(){return A4=A4||new Ps({"fill-extrusion-opacity":new hi(ht["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new wi(ht["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new hi(ht["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new sl(ht["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new wi(ht["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new wi(ht["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new hi(ht["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class dW extends ll{constructor(d,L){super(d,hW,L)}createBucket(d){return new i3(d)}queryRadius(){return Ue(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me,pixelPosMatrix:ge}){let Ce=Qe(d,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-ue.bearingInRadians,me),Te=this.paint.get("fill-extrusion-height").evaluate(L,W),Oe=this.paint.get("fill-extrusion-base").evaluate(L,W),Pe=function(He,bt){let Et=[];for(let Qt of He){let er=[Qt.x,Qt.y,0,1];z(er,er,bt),Et.push(new t(er[0]/er[3],er[1]/er[3]))}return Et}(Ce,ge),it=function(He,bt,Et,Qt){let er=[],br=[],sr=Qt[8]*bt,Mr=Qt[9]*bt,qr=Qt[10]*bt,$r=Qt[11]*bt,_a=Qt[8]*Et,Ca=Qt[9]*Et,nn=Qt[10]*Et,qa=Qt[11]*Et;for(let bn of He){let Fn=[],gn=[];for(let Va of bn){let Hn=Va.x,ni=Va.y,Wn=Qt[0]*Hn+Qt[4]*ni+Qt[12],si=Qt[1]*Hn+Qt[5]*ni+Qt[13],po=Qt[2]*Hn+Qt[6]*ni+Qt[14],cs=Qt[3]*Hn+Qt[7]*ni+Qt[15],Ds=po+qr,Xs=cs+$r,Mf=Wn+_a,vu=si+Ca,yc=po+nn,Dc=cs+qa,Hl=new t((Wn+sr)/Xs,(si+Mr)/Xs);Hl.z=Ds/Xs,Fn.push(Hl);let rf=new t(Mf/Dc,vu/Dc);rf.z=yc/Dc,gn.push(rf)}er.push(Fn),br.push(gn)}return[er,br]}(te,Oe,Te,ge);return function(He,bt,Et){let Qt=1/0;Bi(Et,bt)&&(Qt=M4(Et,bt[0]));for(let er=0;er>4;if(te!==1)throw new Error(`Got v${te} data when expected v1.`);let ue=S4[15&W];if(!ue)throw new Error("Unrecognized array type.");let[me]=new Uint16Array(d,2,1),[ge]=new Uint32Array(d,4,1);return new dy(ge,me,ue,d)}constructor(d,L=64,W=Float64Array,te){if(isNaN(d)||d<0)throw new Error(`Unpexpected numItems value: ${d}.`);this.numItems=+d,this.nodeSize=Math.min(Math.max(+L,2),65535),this.ArrayType=W,this.IndexArrayType=d<65536?Uint16Array:Uint32Array;let ue=S4.indexOf(this.ArrayType),me=2*d*this.ArrayType.BYTES_PER_ELEMENT,ge=d*this.IndexArrayType.BYTES_PER_ELEMENT,Ce=(8-ge%8)%8;if(ue<0)throw new Error(`Unexpected typed array class: ${W}.`);te&&te instanceof ArrayBuffer?(this.data=te,this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=2*d,this._finished=!0):(this.data=new ArrayBuffer(8+me+ge+Ce),this.ids=new this.IndexArrayType(this.data,8,d),this.coords=new this.ArrayType(this.data,8+ge+Ce,2*d),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+ue]),new Uint16Array(this.data,2,1)[0]=L,new Uint32Array(this.data,4,1)[0]=d)}add(d,L){let W=this._pos>>1;return this.ids[W]=W,this.coords[this._pos++]=d,this.coords[this._pos++]=L,W}finish(){let d=this._pos>>1;if(d!==this.numItems)throw new Error(`Added ${d} items when expected ${this.numItems}.`);return o3(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(d,L,W,te){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:ue,coords:me,nodeSize:ge}=this,Ce=[0,ue.length-1,0],Te=[];for(;Ce.length;){let Oe=Ce.pop()||0,Pe=Ce.pop()||0,it=Ce.pop()||0;if(Pe-it<=ge){for(let Qt=it;Qt<=Pe;Qt++){let er=me[2*Qt],br=me[2*Qt+1];er>=d&&er<=W&&br>=L&&br<=te&&Te.push(ue[Qt])}continue}let He=it+Pe>>1,bt=me[2*He],Et=me[2*He+1];bt>=d&&bt<=W&&Et>=L&&Et<=te&&Te.push(ue[He]),(Oe===0?d<=bt:L<=Et)&&(Ce.push(it),Ce.push(He-1),Ce.push(1-Oe)),(Oe===0?W>=bt:te>=Et)&&(Ce.push(He+1),Ce.push(Pe),Ce.push(1-Oe))}return Te}within(d,L,W){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:te,coords:ue,nodeSize:me}=this,ge=[0,te.length-1,0],Ce=[],Te=W*W;for(;ge.length;){let Oe=ge.pop()||0,Pe=ge.pop()||0,it=ge.pop()||0;if(Pe-it<=me){for(let Qt=it;Qt<=Pe;Qt++)k4(ue[2*Qt],ue[2*Qt+1],d,L)<=Te&&Ce.push(te[Qt]);continue}let He=it+Pe>>1,bt=ue[2*He],Et=ue[2*He+1];k4(bt,Et,d,L)<=Te&&Ce.push(te[He]),(Oe===0?d-W<=bt:L-W<=Et)&&(ge.push(it),ge.push(He-1),ge.push(1-Oe)),(Oe===0?d+W>=bt:L+W>=Et)&&(ge.push(He+1),ge.push(Pe),ge.push(1-Oe))}return Ce}}function o3(R,d,L,W,te,ue){if(te-W<=L)return;let me=W+te>>1;E4(R,d,me,W,te,ue),o3(R,d,L,W,me-1,1-ue),o3(R,d,L,me+1,te,1-ue)}function E4(R,d,L,W,te,ue){for(;te>W;){if(te-W>600){let Te=te-W+1,Oe=L-W+1,Pe=Math.log(Te),it=.5*Math.exp(2*Pe/3),He=.5*Math.sqrt(Pe*it*(Te-it)/Te)*(Oe-Te/2<0?-1:1);E4(R,d,L,Math.max(W,Math.floor(L-Oe*it/Te+He)),Math.min(te,Math.floor(L+(Te-Oe)*it/Te+He)),ue)}let me=d[2*L+ue],ge=W,Ce=te;for(Lg(R,d,W,L),d[2*te+ue]>me&&Lg(R,d,W,te);geme;)Ce--}d[2*W+ue]===me?Lg(R,d,W,Ce):(Ce++,Lg(R,d,Ce,te)),Ce<=L&&(W=Ce+1),L<=Ce&&(te=Ce-1)}}function Lg(R,d,L,W){s3(R,L,W),s3(d,2*L,2*W),s3(d,2*L+1,2*W+1)}function s3(R,d,L){let W=R[d];R[d]=R[L],R[L]=W}function k4(R,d,L,W){let te=R-L,ue=d-W;return te*te+ue*ue}function l3(R,d,L,W){let te=W,ue=d+(L-d>>1),me,ge=L-d,Ce=R[d],Te=R[d+1],Oe=R[L],Pe=R[L+1];for(let it=d+3;itte)me=it,te=He;else if(He===te){let bt=Math.abs(it-ue);btW&&(me-d>3&&l3(R,d,me,W),R[me+2]=te,L-me>3&&l3(R,me,L,W))}function pW(R,d,L,W,te,ue){let me=te-L,ge=ue-W;if(me!==0||ge!==0){let Ce=((R-L)*me+(d-W)*ge)/(me*me+ge*ge);Ce>1?(L=te,W=ue):Ce>0&&(L+=me*Ce,W+=ge*Ce)}return me=R-L,ge=d-W,me*me+ge*ge}function tf(R,d,L,W){let te={type:d,geom:L},ue={id:R??null,type:te.type,geometry:te.geom,tags:W,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(te.type){case"Point":case"MultiPoint":Pg(ue,te.geom);break;case"LineString":Pg(ue,te.geom.points);break;case"Polygon":Pg(ue,te.geom[0].points);break;case"MultiLineString":for(let me of te.geom)Pg(ue,me.points);break;case"MultiPolygon":for(let me of te.geom)Pg(ue,me[0].points)}return ue}function u3(R){R.points.length>64&&(R.points=new Float64Array(R.points))}function Pg(R,d){for(let L=0;L0&&(me+=W?(te*Oe-Te*ue)/2:Math.sqrt(Math.pow(Te-te,2)+Math.pow(Oe-ue,2))),te=Te,ue=Oe}let ge=d.points.length-3;d.points[2]=1,L>0&&l3(d.points,0,ge,L),d.points[ge+2]=1,u3(d),d.size=Math.abs(me),d.start=0,d.end=d.size}function h3(R,d,L,W){for(let te=0;te1?1:L}function vy(R){let d={type:"Feature",geometry:vW(R),properties:R.tags};return R.id!=null&&(d.id=R.id),d}function vW(R){let{type:d,geometry:L}=R;switch(d){case"Point":return{type:d,coordinates:C4(L[0],L[1])};case"MultiPoint":return{type:d,coordinates:my(L)};case"LineString":return{type:d,coordinates:my(L.points)};case"MultiLineString":case"Polygon":return{type:d,coordinates:L.map(W=>my(W.points))};case"MultiPolygon":return{type:d,coordinates:L.map(W=>W.map(te=>my(te.points)))}}}function my(R){let d=[];for(let L=0;L=(L/=d)&&me=W)return null;let Ce=[];for(let Te of R){let Oe=te===Wf.X?Te.minX:Te.minY,Pe=te===Wf.X?Te.maxX:Te.maxY;if(Oe>=L&&Pe=W))switch(Te.type){case"Point":case"MultiPoint":mW(Te,Ce,L,W,te);continue;case"LineString":gW(Te,Ce,L,W,te,ge);continue;case"MultiLineString":yW(Te,Ce,L,W,te);continue;case"Polygon":_W(Te,Ce,L,W,te);continue;case"MultiPolygon":xW(Te,Ce,L,W,te);continue}}return Ce.length?Ce:null}function mW(R,d,L,W,te){let ue=[];(function(me,ge,Ce,Te,Oe){for(let Pe=0;Pe=Ce&&it<=Te&&w0(ge,me[Pe],me[Pe+1],me[Pe+2])}})(R.geometry,ue,L,W,te),ue.length&&d.push(tf(R.id,ue.length===3?"Point":"MultiPoint",ue,R.tags))}function gW(R,d,L,W,te,ue){let me=[];if(R4(R.geometry,me,L,W,te,!1,ue.lineMetrics),me.length)if(ue.lineMetrics)for(let ge of me)d.push(tf(R.id,"LineString",ge,R.tags));else d.push(me.length>1?tf(R.id,"MultiLineString",me,R.tags):tf(R.id,"LineString",me[0],R.tags))}function yW(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!1),ue.length&&d.push(ue.length!==1?tf(R.id,"MultiLineString",ue,R.tags):tf(R.id,"LineString",ue[0],R.tags))}function _W(R,d,L,W,te){let ue=[];d3(R.geometry,ue,L,W,te,!0),ue.length&&d.push(tf(R.id,"Polygon",ue,R.tags))}function xW(R,d,L,W,te){let ue=[];for(let me of R.geometry){let ge=[];d3(me,ge,L,W,te,!0),ge.length&&ue.push(ge)}ue.length&&d.push(tf(R.id,"MultiPolygon",ue,R.tags))}function R4(R,d,L,W,te,ue,me){let ge=I4(R),Ce=te===Wf.X?bW:wW,Te,Oe,Pe=R.start;for(let Qt=0;QtL&&(Oe=Ce(ge,er,br,Mr,qr,L),me&&(ge.start=Pe+Te*Oe)):$r>W?_a=L&&(Oe=Ce(ge,er,br,Mr,qr,L),Ca=!0),_a>W&&$r<=W&&(Oe=Ce(ge,er,br,Mr,qr,W),Ca=!0),!ue&&Ca&&(me&&(ge.end=Pe+Te*Oe),d.push(ge),ge=I4(R)),me&&(Pe+=Te)}let it=R.points.length-3,He=R.points[it],bt=R.points[it+1],Et=te===Wf.X?He:bt;Et>=L&&Et<=W&&w0(ge.points,He,bt,R.points[it+2]),it=ge.points.length-3,ue&&it>=3&&(ge.points[it]!==ge.points[0]||ge.points[it+1]!==ge.points[1])&&w0(ge.points,ge.points[0],ge.points[1],ge.points[2]),ge.points.length&&(u3(ge),d.push(ge))}function I4(R){return{points:[],size:R.size,start:R.start,end:R.end}}function d3(R,d,L,W,te,ue){for(let me of R)R4(me,d,L,W,te,ue,!1)}function w0(R,d,L,W){R.push(d,L,W)}function bW(R,d,L,W,te,ue){let me=(ue-d)/(W-d);return w0(R.points,ue,L+(te-L)*me,1),me}function wW(R,d,L,W,te,ue){let me=(ue-L)/(te-L);return w0(R.points,d+(W-d)*me,ue,1),me}function p3(R,d){let L=d.buffer/d.extent,W=R,te=Wd(R,1,-1-L,L,Wf.X,-1,2,d),ue=Wd(R,1,1-L,2+L,Wf.X,-1,2,d);return(te||ue)&&(W=Wd(R,1,-L,1+L,Wf.X,-1,2,d)||[],te&&(W=D4(te,1).concat(W)),ue&&(W=W.concat(D4(ue,-1)))),W}function D4(R,d){let L=[];for(let W of R)switch(W.type){case"Point":case"MultiPoint":{let te=TW(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"LineString":{let te=v3(W.geometry,d);L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiLineString":case"Polygon":{let te=[];for(let ue of W.geometry)te.push(v3(ue,d));L.push(tf(W.id,W.type,te,W.tags));continue}case"MultiPolygon":{let te=[];for(let ue of W.geometry){let me=[];for(let ge of ue)me.push(v3(ge,d));te.push(me)}L.push(tf(W.id,W.type,te,W.tags));continue}}return L}function TW(R,d){let L=[];for(let W=0;W0||((te=d.addOrUpdateProperties)==null?void 0:te.length)>0;if(ue){let ge=R[0],Ce=c3({type:"FeatureCollection",features:[{type:"Feature",id:ge.id,geometry:d.newGeometry,properties:me?F4(ge.tags,d):ge.tags}]},L);return Ce=p3(Ce,L),Ce}if(me){let ge=[];for(let Ce of R){let Te=Li({},Ce);Te.tags=F4(Te.tags,d),ge.push(Te)}return ge}return R}function F4(R,d){if(d.removeAllProperties)return{};let L=Li({},R||{});if(d.removeProperties)for(let W of d.removeProperties)delete L[W];if(d.addOrUpdateProperties)for(let{key:W,value:te}of d.addOrUpdateProperties)L[W]=te;return L}(function(R){R[R.X=0]="X",R[R.Y=1]="Y"})(Wf||(Wf={}));let m3={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:R=>R};class MW{constructor(d){this.options=Object.assign(Object.create(m3),d),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(d){let L=[];for(let W of d){if(!W.geometry)continue;let[te,ue]=W.geometry.coordinates,[me,ge]=[x0(te),b0(ue)];L.push({id:W.id,type:"Point",geometry:[me,ge],tags:W.properties})}this.createIndex(L)}initialize(d){let L=[];for(let W of d)W.type==="Point"&&L.push(W);this.createIndex(L)}updateIndex(d,L,W){this.options=Object.assign(Object.create(m3),W.clusterOptions),this.initialize(d)}createIndex(d){let{log:L,minZoom:W,maxZoom:te}=this.options;L&&console.time("total time");let ue=`prepare ${d.length} points`;L&&console.time(ue),this.points=d;let me=[];for(let Ce=0;Ce=W;Ce--){let Te=Date.now();ge=this.trees[Ce]=this.createTree(this.cluster(ge,Ce)),L&&console.log("z%d: %d clusters in %dms",Ce,ge.numItems,Date.now()-Te)}L&&console.timeEnd("total time")}getClusters(d,L){return this.getClustersInternal(d,L).map(W=>vy(W))}getClustersInternal(d,L){let W=((d[0]+180)%360+360)%360-180,te=Math.max(-90,Math.min(90,d[1])),ue=d[2]===180?180:((d[2]+180)%360+360)%360-180,me=Math.max(-90,Math.min(90,d[3]));if(d[2]-d[0]>=360)W=-180,ue=180;else if(W>ue){let Pe=this.getClustersInternal([W,te,180,me],L),it=this.getClustersInternal([-180,te,ue,me],L);return Pe.concat(it)}let ge=this.trees[this.limitZoom(L)],Ce=ge.range(x0(W),b0(me),x0(ue),b0(te)),Te=ge.flatData,Oe=[];for(let Pe of Ce){let it=this.stride*Pe;Oe.push(Te[it+5]>1?SW(Te,it,this.clusterProps):this.points[Te[it+3]])}return Oe}getChildren(d){let L=this.getOriginId(d),W=this.getOriginZoom(d),te=new Error("No cluster with the specified id: "+d),ue=this.trees[W];if(!ue)throw te;let me=ue.flatData;if(L*this.stride>=me.length)throw te;let ge=this.options.radius/(this.options.extent*Math.pow(2,W-1)),Ce=ue.within(me[L*this.stride],me[L*this.stride+1],ge),Te=[];for(let Oe of Ce){let Pe=Oe*this.stride;me[Pe+4]===d&&Te.push(me[Pe+5]>1?EW(me,Pe,this.clusterProps):vy(this.points[me[Pe+3]]))}if(Te.length===0)throw te;return Te}getLeaves(d,L,W){let te=[];return this.appendLeaves(te,d,L=L||10,W=W||0,0),te}getTile(d,L,W){let te=this.trees[this.limitZoom(d)];if(!te)return null;let ue=Math.pow(2,d),{extent:me,radius:ge}=this.options,Ce=ge/me,Te=(W-Ce)/ue,Oe=(W+1+Ce)/ue,Pe={transformed:!0,features:[],source:null,x:L,y:W,z:d};return this.addTileFeatures(te.range((L-Ce)/ue,Te,(L+1+Ce)/ue,Oe),te.flatData,L,W,ue,Pe),L===0&&this.addTileFeatures(te.range(1-Ce/ue,Te,1,Oe),te.flatData,ue,W,ue,Pe),L===ue-1&&this.addTileFeatures(te.range(0,Te,Ce/ue,Oe),te.flatData,-1,W,ue,Pe),Pe}getClusterExpansionZoom(d){return this.getOriginZoom(d)}appendLeaves(d,L,W,te,ue){let me=this.getChildren(L);for(let ge of me){let Ce=ge.properties;if(Ce?.cluster?ue+Ce.point_count<=te?ue+=Ce.point_count:ue=this.appendLeaves(d,Ce.cluster_id,W,te,ue):ue1,Oe,Pe,it;if(Te)Oe=g3(L,Ce,this.clusterProps),Pe=L[Ce],it=L[Ce+1];else{let Et=this.points[L[Ce+3]];Oe=Et.tags,[Pe,it]=Et.geometry}let He={type:1,geometry:[[Math.round(this.options.extent*(Pe*ue-W)),Math.round(this.options.extent*(it*ue-te))]],tags:Oe},bt;bt=Te||this.options.generateId?L[Ce+3]:this.points[L[Ce+3]].id,bt!==void 0&&(He.id=bt),me.features.push(He)}}limitZoom(d){return Math.max(this.options.minZoom,Math.min(Math.floor(+d),this.options.maxZoom+1))}cluster(d,L){let{radius:W,extent:te,reduce:ue,minPoints:me}=this.options,ge=W/(te*Math.pow(2,L)),Ce=d.flatData,Te=[],Oe=this.stride;for(let Pe=0;PeL&&(Qt+=Ce[br+5])}if(Qt>Et&&Qt>=me){let er,br=it*Et,sr=He*Et,Mr=-1,qr=(Pe/Oe<<5)+(L+1)+this.points.length;for(let $r of bt){let _a=$r*Oe;if(Ce[_a+2]<=L)continue;Ce[_a+2]=L;let Ca=Ce[_a+5];br+=Ce[_a]*Ca,sr+=Ce[_a+1]*Ca,Ce[_a+4]=qr,ue&&(er||(er=this.map(Ce,Pe,!0),Mr=this.clusterProps.length,this.clusterProps.push(er)),ue(er,this.map(Ce,_a)))}Ce[Pe+4]=qr,Te.push(br/Qt,sr/Qt,1/0,qr,-1,Qt),ue&&Te.push(Mr)}else{for(let er=0;er1)for(let er of bt){let br=er*Oe;if(!(Ce[br+2]<=L)){Ce[br+2]=L;for(let sr=0;sr>5}getOriginZoom(d){return(d-this.points.length)%32}map(d,L,W){if(d[L+5]>1){let me=this.clusterProps[d[L+6]];return W?Object.assign({},me):me}let te=this.points[d[L+3]].tags,ue=this.options.map(te);return W&&ue===te?Object.assign({},ue):ue}}function SW(R,d,L){return{id:R[d+3],type:"Point",tags:g3(R,d,L),geometry:[R[d],R[d+1]]}}function EW(R,d,L){return{type:"Feature",id:R[d+3],properties:g3(R,d,L),geometry:{type:"Point",coordinates:[L4(R[d]),P4(R[d+1])]}}}function g3(R,d,L){let W=R[d+5],te=W>=1e4?`${Math.round(W/1e3)}k`:W>=1e3?Math.round(W/100)/10+"k":W,ue=R[d+6],me=ue===-1?{}:Object.assign({},L[ue]);return Object.assign(me,{cluster:!0,cluster_id:R[d+3],point_count:W,point_count_abbreviated:te})}let y3="geojsonvt_clip_start",_3="geojsonvt_clip_end";function z4(R,d,L,W,te){let ue=d===te.maxZoom?0:te.tolerance/((1<0&&d.size<(te?me:W))return void(L.numPoints+=d.points.length/3);let ge=[];for(let Ce=0;Ceme)&&(L.numSimplified++,ge.push(d.points[Ce],d.points[Ce+1])),L.numPoints++;te&&function(Ce,Te){let Oe=0;for(let Pe=0,it=Ce.length,He=it-2;Pe0===Te)for(let Pe=0,it=Ce.length;Pe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(L),W.debug>1&&console.timeEnd("invalidating");let[te,ue,me]=[0,0,0],ge=z4(d,te,ue,me,W);ge.source=d;let Ce=gy(te,ue,me);if(this.tiles[Ce]=ge,this.tileCoords.push({z:te,x:ue,y:me,id:Ce}),W.debug){let Te=`z${te}`;this.stats[Te]=(this.stats[Te]||0)+1,this.total++}}getClusterExpansionZoom(d){return null}getChildren(d){return null}getLeaves(d,L,W){return null}getTile(d,L,W){let{extent:te,debug:ue}=this.options,me=1<1&&console.log("drilling down to z%d-%d-%d",d,L,W);let Ce,Te=d,Oe=L,Pe=W;for(;!Ce&&Te>0;)Te--,Oe>>=1,Pe>>=1,Ce=this.tiles[gy(Te,Oe,Pe)];return Ce?.source?(ue>1&&(console.log("found parent tile z%d-%d-%d",Te,Oe,Pe),console.time("drilling down")),this.splitTile(Ce.source,Te,Oe,Pe,d,L,W),ue>1&&console.timeEnd("drilling down"),this.tiles[ge]?B4(this.tiles[ge],te):null):null}splitTile(d,L,W,te,ue,me,ge){let Ce=[d,L,W,te],Te=this.options,Oe=Te.debug;for(;Ce.length;){te=Ce.pop(),W=Ce.pop(),L=Ce.pop(),d=Ce.pop();let Pe=1<1&&console.time("creation"),He=this.tiles[it]=z4(d,L,W,te,Te),this.tileCoords.push({z:L,x:W,y:te,id:it}),Oe)){Oe>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",L,W,te,He.numFeatures,He.numPoints,He.numSimplified),console.timeEnd("creation"));let Ca=`z${L}`;this.stats[Ca]=(this.stats[Ca]||0)+1,this.total++}if(He.source=d,ue==null){if(L===Te.indexMaxZoom||He.numPoints<=Te.indexMaxPoints)continue}else{if(L===Te.maxZoom||L===ue)continue;if(ue!=null){let Ca=ue-L;if(W!==me>>Ca||te!==ge>>Ca)continue}}if(He.source=null,!d.length)continue;Oe>1&&console.time("clipping");let bt=.5*Te.buffer/Te.extent,Et=.5-bt,Qt=.5+bt,er=1+bt,br=null,sr=null,Mr=null,qr=null,$r=Wd(d,Pe,W-bt,W+Qt,Wf.X,He.minX,He.maxX,Te),_a=Wd(d,Pe,W+Et,W+er,Wf.X,He.minX,He.maxX,Te);$r&&(br=Wd($r,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),sr=Wd($r,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),_a&&(Mr=Wd(_a,Pe,te-bt,te+Qt,Wf.Y,He.minY,He.maxY,Te),qr=Wd(_a,Pe,te+Et,te+er,Wf.Y,He.minY,He.maxY,Te)),Oe>1&&console.timeEnd("clipping"),Ce.push(br||[],L+1,2*W,2*te),Ce.push(sr||[],L+1,2*W,2*te+1),Ce.push(Mr||[],L+1,2*W+1,2*te),Ce.push(qr||[],L+1,2*W+1,2*te+1)}}invalidateTiles(d){if(!d.length)return;let L=this.options,{debug:W}=L,te=1/0,ue=-1/0,me=1/0,ge=-1/0;for(let Oe of d)te=Math.min(te,Oe.minX),ue=Math.max(ue,Oe.maxX),me=Math.min(me,Oe.minY),ge=Math.max(ge,Oe.maxY);let Ce=L.buffer/L.extent,Te=new Set;for(let Oe in this.tiles){let Pe=this.tiles[Oe],it=1<=bt||ge=Qt)continue;let er=!1;for(let br of d)if(br.maxX>=He&&br.minX=Et&&br.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",Pe.z,Pe.x,Pe.y,Pe.numFeatures,Pe.numPoints,Pe.numSimplified);let br=`z${Pe.z}`;this.stats[br]=(this.stats[br]||0)-1,this.total--}delete this.tiles[Oe],Te.add(Oe)}}Te.size&&(this.tileCoords=this.tileCoords.filter(Oe=>!Te.has(Oe.id)))}}function gy(R,d,L){return 32*((1<L.id),this.index=d.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let L of this.layers)this.gradients[L.id]={};this.layoutVertexArray=new Ar,this.layoutVertexArray2=new hr,this.indexArray=new ua,this.programConfigurations=new mo(d.layers,d.zoom),this.segments=new Fa,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter(L=>L.isStateDependent()).map(L=>L.id)}populate(d,L,W){this.hasDependencies=Md("line",this.layers,L)||this.hasLineDasharray(this.layers);let te=this.layers[0].layout.get("line-sort-key"),ue=!te.isConstant(),me=[];for(let{feature:ge,id:Ce,index:Te,sourceLayerIndex:Oe}of d){let Pe=this.layers[0]._featureFilter.needGeometry,it=fo(ge,Pe);if(!this.layers[0]._featureFilter.filter(new oi(this.zoom),it,W))continue;let He=ue?te.evaluate(it,{},W):void 0,bt={id:Ce,properties:ge.properties,type:ge.type,sourceLayerIndex:Oe,index:Te,geometry:Pe?it.geometry:ql(ge),patterns:{},dashes:{},sortKey:He};me.push(bt)}ue&&me.sort((ge,Ce)=>ge.sortKey-Ce.sortKey);for(let ge of me){let{geometry:Ce,index:Te,sourceLayerIndex:Oe}=ge;this.hasDependencies?(Md("line",this.layers,L)?v0("line",this.layers,ge,{zoom:this.zoom},L):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,ge,this.zoom,L),this.patternFeatures.push(ge)):this.addFeature(ge,Ce,Te,W,{},{},L.subdivisionGranularity),L.featureIndex.insert(d[Te].feature,Ce,Te,Oe,this.index)}}update(d,L,W,te){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(d,L,this.stateDependentLayers,{imagePositions:W,dashPositions:te})}addFeatures(d,L,W,te){for(let ue of this.patternFeatures)this.addFeature(ue,ue.geometry,ue.index,L,W,te,d.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(d){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=d.createVertexBuffer(this.layoutVertexArray2,zW)),this.layoutVertexBuffer=d.createVertexBuffer(this.layoutVertexArray,DW),this.indexBuffer=d.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(d),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(d){if(d.properties&&Object.hasOwn(d.properties,y3)&&Object.hasOwn(d.properties,_3))return{start:+d.properties[y3],end:+d.properties[_3]}}addFeature(d,L,W,te,ue,me,ge){let Ce=this.layers[0].layout,Te=Ce.get("line-join").evaluate(d,{}),Oe=Ce.get("line-cap").evaluate(d,{}),Pe=Ce.get("line-miter-limit").evaluate(d,{}),it=Ce.get("line-round-limit").evaluate(d,{});this.lineClips=this.lineFeatureClips(d);for(let He of L)this.addLine(He,d,Te,Oe,Pe,it,te,ge);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,d,W,{imagePositions:ue,dashPositions:me,canonical:te})}addLine(d,L,W,te,ue,me,ge,Ce){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,d=Sv(d,ge?Ce.line.getGranularityForZoomLevel(ge.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let sr=0;sr=2&&d[Oe-1].equals(d[Oe-2]);)Oe--;let Pe=0;for(;Pe0;if(nn&&sr>Pe){let gn=bt.dist(Et);if(gn>2*it){let Va=bt.sub(bt.sub(Et)._mult(it/gn)._round());this.updateDistance(Et,Va),this.addCurrentVertex(Va,er,0,0,He),Et=Va}}let bn=Et&&Qt,Fn=bn?W:Te?"butt":te;if(bn&&Fn==="round"&&(_aue&&(Fn="bevel"),Fn==="bevel"&&(_a>2&&(Fn="flipbevel"),_a100)Mr=br.mult(-1);else{let gn=_a*er.add(br).mag()/er.sub(br).mag();Mr._perp()._mult(gn*(qa?-1:1))}this.addCurrentVertex(bt,Mr,0,0,He),this.addCurrentVertex(bt,Mr.mult(-1),0,0,He)}else if(Fn==="bevel"||Fn==="fakeround"){let gn=-Math.sqrt(_a*_a-1),Va=qa?gn:0,Hn=qa?0:gn;if(Et&&this.addCurrentVertex(bt,er,Va,Hn,He),Fn==="fakeround"){let ni=Math.round(180*Ca/Math.PI/20);for(let Wn=1;Wn2*it){let Va=bt.add(Qt.sub(bt)._mult(it/gn)._round());this.updateDistance(bt,Va),this.addCurrentVertex(Va,br,0,0,He),bt=Va}}}}addCurrentVertex(d,L,W,te,ue,me=!1){let ge=L.y*te-L.x,Ce=-L.y-L.x*te;this.addHalfVertex(d,L.x+L.y*W,L.y-L.x*W,me,!1,W,ue),this.addHalfVertex(d,ge,Ce,me,!0,-te,ue),this.distance>N4/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(d,L,W,te,ue,me))}addHalfVertex({x:d,y:L},W,te,ue,me,ge,Ce){let Te=.5*(this.lineClips?this.scaledDistance*(N4-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((d<<1)+(ue?1:0),(L<<1)+(me?1:0),Math.round(63*W)+128,Math.round(63*te)+128,1+(ge===0?0:ge<0?-1:1)|(63&Te)<<2,Te>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let Oe=Ce.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,Oe,this.e2),Ce.primitiveLength++),me?this.e2=Oe:this.e1=Oe}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(d,L){this.distance+=d.dist(L),this.updateScaledDistance()}hasLineDasharray(d){for(let L of d){let W=L.paint.get("line-dasharray");if(W&&!W.isConstant())return!0}return!1}addLineDashDependencies(d,L,W,te){for(let ue of d){let me=ue.paint.get("line-dasharray");if(!me||me.value.kind==="constant")continue;let ge=ue.layout.get("line-cap").evaluate(L,{})==="round",Ce={dasharray:me.value.evaluate({zoom:W-1},L,{}),round:ge},Te={dasharray:me.value.evaluate({zoom:W},L,{}),round:ge},Oe={dasharray:me.value.evaluate({zoom:W+1},L,{}),round:ge},Pe=`${Ce.dasharray.join(",")},${Ce.round}`,it=`${Te.dasharray.join(",")},${Te.round}`,He=`${Oe.dasharray.join(",")},${Oe.round}`;te.dashDependencies[Pe]=Ce,te.dashDependencies[it]=Te,te.dashDependencies[He]=Oe,L.dashes[ue.id]={min:Pe,mid:it,max:He}}}}let j4,U4;fi("LineBucket",b3,{omit:["layers","patternFeatures"]});var q4={get paint(){return U4=U4||new Ps({"line-opacity":new wi(ht.paint_line["line-opacity"]),"line-color":new wi(ht.paint_line["line-color"]),"line-translate":new hi(ht.paint_line["line-translate"]),"line-translate-anchor":new hi(ht.paint_line["line-translate-anchor"]),"line-width":new wi(ht.paint_line["line-width"]),"line-gap-width":new wi(ht.paint_line["line-gap-width"]),"line-offset":new wi(ht.paint_line["line-offset"]),"line-blur":new wi(ht.paint_line["line-blur"]),"line-dasharray":new sl(ht.paint_line["line-dasharray"]),"line-pattern":new sl(ht.paint_line["line-pattern"]),"line-gradient":new tu(ht.paint_line["line-gradient"])})},get layout(){return j4=j4||new Ps({"line-cap":new wi(ht.layout_line["line-cap"]),"line-join":new wi(ht.layout_line["line-join"]),"line-miter-limit":new wi(ht.layout_line["line-miter-limit"]),"line-round-limit":new wi(ht.layout_line["line-round-limit"]),"line-sort-key":new wi(ht.layout_line["line-sort-key"])})}};class OW extends wi{possiblyEvaluate(d,L){return L=new oi(Math.floor(L.zoom),{now:L.now,fadeDuration:L.fadeDuration,zoomHistory:L.zoomHistory,transition:L.transition}),super.possiblyEvaluate(d,L)}evaluate(d,L,W,te){return L=X({},L,{zoom:Math.floor(L.zoom)}),super.evaluate(d,L,W,te)}}let yy;class NW extends ll{constructor(d,L){super(d,q4,L),this.gradientVersion=0,yy||(yy=new OW(q4.paint.properties["line-width"].specification),yy.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(d){if(d==="line-gradient"){let L=this.gradientExpression();this.stepInterpolant=!!function(W){return W._styleExpression!==void 0}(L)&&L._styleExpression.expression instanceof Ss,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(d,L){super.recalculate(d,L),this.paint._values["line-floorwidth"]=yy.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,d)}createBucket(d){return new b3(d)}queryRadius(d){let L=d,W=V4(Le("line-width",this,L),Le("line-gap-width",this,L)),te=Le("line-offset",this,L);return W/2+Math.abs(te)+Ue(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:d,feature:L,featureState:W,geometry:te,transform:ue,pixelsToTileUnits:me}){let ge=Qe(d,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-ue.bearingInRadians,me),Ce=me/2*V4(this.paint.get("line-width").evaluate(L,W),this.paint.get("line-gap-width").evaluate(L,W)),Te=this.paint.get("line-offset").evaluate(L,W);return Te&&(te=function(Oe,Pe){let it=[];for(let He of Oe){let bt=_t(He),Et=[];for(let Qt=0;Qt=3){for(let bt of He)if(Wa(Oe,bt))return!0}if(rs(Oe,He,it))return!0}return!1}(ge,te,Ce)}isTileClipped(){return!0}}function V4(R,d){return d>0?d+2*R:R}let jW=ct([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),UW=ct([{name:"a_projected_pos",components:3,type:"Float32"}],4);ct([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let qW=ct([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);ct([{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"}]);let G4=ct([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),VW=ct([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function GW(R,d,L){let W=d.layout.get("text-transform").evaluate(L,{});return W==="uppercase"?R=R.toLocaleUpperCase():W==="lowercase"&&(R=R.toLocaleLowerCase()),Si.applyArabicShaping&&(R=Si.applyArabicShaping(R)),R}function HW(R,d,L){for(let W of R.sections)W.text=GW(W.text,d,L);return R}ct([{name:"triangle",components:3,type:"Uint16"}]),ct([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),ct([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),ct([{type:"Float32",name:"offsetX"}]),ct([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),ct([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let Rg={"!":"\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","\u22EF":"\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"},WW={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},YW={40:!0};function H4(R,d,L,W,te,ue){if("fontStack"in d){let me=L[d.fontStack],ge=me?.[R];return ge?ge.metrics.advance*d.scale+te:0}{let me=W[d.imageName];return me?me.displaySize[0]*d.scale*Rc/ue+te:0}}function W4(R,d,L,W){let te=Math.pow(R-d,2);return W?RMath.max(d,this.sections[L].scale),0)}getMaxImageSize(d){let L=0,W=0;for(let te=0;teW))}addImageSection(d){let L=d.image?d.image.name:"";if(L.length===0)return void ee("Can't add FormattedSection with an empty image.");let W=this.getNextImageSectionCharCode();W?(this.text+=String.fromCharCode(W),this.sections.push({scale:1,verticalAlign:d.verticalAlign||"bottom",imageName:L}),this.sectionIndex.push(this.sections.length-1)):ee("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(d,L,W,te,ue){let me=[],ge=this.determineAverageLineWidth(d,L,W,te,ue),Ce=this.hasZeroWidthSpaces(),Te=0,Oe=0,Pe=this.text[Symbol.iterator](),it=Pe.next(),He=this.text[Symbol.iterator]();He.next();let bt=He.next(),Et=this.text[Symbol.iterator]();Et.next(),Et.next();let Qt=Et.next();for(;!it.done;){let er=this.getSection(Oe),br=it.value.codePointAt(0);if(Pr(br)||(Te+=H4(br,er,W,te,d,ue)),!bt.done){let sr=zt(br),Mr=bt.value.codePointAt(0);(WW[br]||sr||"imageName"in er||!Qt.done&&YW[Mr])&&me.push(Y4(Oe+1,Te,ge,me,XW(br,Mr,sr&&Ce),!1))}Oe++,it=Pe.next(),bt=He.next(),Qt=Et.next()}return X4(Y4(this.length(),Te,ge,me,0,!0))}determineAverageLineWidth(d,L,W,te,ue){let me=0,ge=0;for(let Ce of this.text){let Te=this.getSection(ge);me+=H4(Ce.codePointAt(0),Te,W,te,d,ue),ge++}return me/Math.max(1,Math.ceil(me/L))}}let w3=4294967296,Z4=1/w3,$4=typeof TextDecoder>"u"?null:new TextDecoder("utf-8");class _y{constructor(d=new Uint8Array(16)){this.buf=ArrayBuffer.isView(d)?d:new Uint8Array(d),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(d,L,W=this.length){for(;this.pos>3,me=this.pos;this.type=7&te,d(ue,L,this),this.pos===me&&this.skip(te)}return L}readMessage(d,L){return this.readFields(d,L,this.readVarint()+this.pos)}readFixed32(){let d=this.dataView.getUint32(this.pos,!0);return this.pos+=4,d}readSFixed32(){let d=this.dataView.getInt32(this.pos,!0);return this.pos+=4,d}readFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*w3;return this.pos+=8,d}readSFixed64(){let d=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*w3;return this.pos+=8,d}readFloat(){let d=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,d}readDouble(){let d=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,d}readVarint(d){let L=this.buf,W,te;return te=L[this.pos++],W=127&te,te<128?W:(te=L[this.pos++],W|=(127&te)<<7,te<128?W:(te=L[this.pos++],W|=(127&te)<<14,te<128?W:(te=L[this.pos++],W|=(127&te)<<21,te<128?W:(te=L[this.pos],W|=(15&te)<<28,function(ue,me,ge){let Ce=ge.buf,Te,Oe;if(Oe=Ce[ge.pos++],Te=(112&Oe)>>4,Oe<128||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<3,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<10,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<17,Oe<128)||(Oe=Ce[ge.pos++],Te|=(127&Oe)<<24,Oe<128)||(Oe=Ce[ge.pos++],Te|=(1&Oe)<<31,Oe<128))return A0(ue,Te,me);throw new Error("Expected varint not more than 10 bytes")}(W,d,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let d=this.readVarint();return d%2==1?(d+1)/-2:d/2}readBoolean(){return!!this.readVarint()}readString(){let d=this.readVarint()+this.pos,L=this.pos;return this.pos=d,d-L>=12&&$4?$4.decode(this.buf.subarray(L,d)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(this.buf,L,d)}readBytes(){let d=this.readVarint()+this.pos,L=this.buf.subarray(this.pos,d);return this.pos=d,L}readPackedVarint(d=[],L){let W=this.readPackedEnd();for(;this.pos127;);else if(L===2)this.pos=this.readVarint()+this.pos;else if(L===5)this.pos+=4;else{if(L!==1)throw new Error(`Unimplemented type: ${L}`);this.pos+=8}}writeTag(d,L){this.writeVarint(d<<3|L)}realloc(d){let L=this.length||16;for(;L268435455||d<0?function(L,W){let te,ue;if(L>=0?(te=L%4294967296|0,ue=L/4294967296|0):(te=~(-L%4294967296),ue=~(-L/4294967296),4294967295^te?te=te+1|0:(te=0,ue=ue+1|0)),L>=18446744073709552e3||L<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");W.realloc(10),function(me,ge,Ce){Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,me>>>=7,Ce.buf[Ce.pos++]=127&me|128,Ce.buf[Ce.pos]=127&(me>>>=7)}(te,0,W),function(me,ge){let Ce=(7&me)<<4;ge.buf[ge.pos++]|=Ce|((me>>>=3)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me|((me>>>=7)?128:0),me&&(ge.buf[ge.pos++]=127&me)))))}(ue,W)}(d,this):(this.realloc(4),this.buf[this.pos++]=127&d|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=127&(d>>>=7)|(d>127?128:0),d<=127||(this.buf[this.pos++]=d>>>7&127))))}writeSVarint(d){this.writeVarint(d<0?2*-d-1:2*d)}writeBoolean(d){this.writeVarint(+d)}writeString(d){d=String(d),this.realloc(4*d.length),this.pos++;let L=this.pos;this.pos=function(te,ue,me){for(let ge,Ce,Te=0;Te55295&&ge<57344){if(!Ce){ge>56319||Te+1===ue.length?(te[me++]=239,te[me++]=191,te[me++]=189):Ce=ge;continue}if(ge<56320){te[me++]=239,te[me++]=191,te[me++]=189,Ce=ge;continue}ge=Ce-55296<<10|ge-56320|65536,Ce=null}else Ce&&(te[me++]=239,te[me++]=191,te[me++]=189,Ce=null);ge<128?te[me++]=ge:(ge<2048?te[me++]=ge>>6|192:(ge<65536?te[me++]=ge>>12|224:(te[me++]=ge>>18|240,te[me++]=ge>>12&63|128),te[me++]=ge>>6&63|128),te[me++]=63&ge|128)}return me}(this.buf,d,this.pos);let W=this.pos-L;W>=128&&K4(L,W,this),this.pos=L-1,this.writeVarint(W),this.pos+=W}writeFloat(d){this.realloc(4),this.dataView.setFloat32(this.pos,d,!0),this.pos+=4}writeDouble(d){this.realloc(8),this.dataView.setFloat64(this.pos,d,!0),this.pos+=8}writeBytes(d){let L=d.length;this.writeVarint(L),this.realloc(L);for(let W=0;W=128&&K4(W,te,this),this.pos=W-1,this.writeVarint(te),this.pos+=te}writeMessage(d,L,W){this.writeTag(d,2),this.writeRawMessage(L,W)}writePackedVarint(d,L){L.length&&this.writeMessage(d,ZW,L)}writePackedSVarint(d,L){L.length&&this.writeMessage(d,$W,L)}writePackedBoolean(d,L){L.length&&this.writeMessage(d,QW,L)}writePackedFloat(d,L){L.length&&this.writeMessage(d,KW,L)}writePackedDouble(d,L){L.length&&this.writeMessage(d,JW,L)}writePackedFixed32(d,L){L.length&&this.writeMessage(d,eY,L)}writePackedSFixed32(d,L){L.length&&this.writeMessage(d,tY,L)}writePackedFixed64(d,L){L.length&&this.writeMessage(d,rY,L)}writePackedSFixed64(d,L){L.length&&this.writeMessage(d,aY,L)}writeBytesField(d,L){this.writeTag(d,2),this.writeBytes(L)}writeFixed32Field(d,L){this.writeTag(d,5),this.writeFixed32(L)}writeSFixed32Field(d,L){this.writeTag(d,5),this.writeSFixed32(L)}writeFixed64Field(d,L){this.writeTag(d,1),this.writeFixed64(L)}writeSFixed64Field(d,L){this.writeTag(d,1),this.writeSFixed64(L)}writeVarintField(d,L){this.writeTag(d,0),this.writeVarint(L)}writeSVarintField(d,L){this.writeTag(d,0),this.writeSVarint(L)}writeStringField(d,L){this.writeTag(d,2),this.writeString(L)}writeFloatField(d,L){this.writeTag(d,5),this.writeFloat(L)}writeDoubleField(d,L){this.writeTag(d,1),this.writeDouble(L)}writeBooleanField(d,L){this.writeVarintField(d,+L)}}function A0(R,d,L){return L?4294967296*d+(R>>>0):4294967296*(d>>>0)+(R>>>0)}function K4(R,d,L){let W=d<=16383?1:d<=2097151?2:d<=268435455?3:Math.floor(Math.log(d)/(7*Math.LN2));L.realloc(W);for(let te=L.pos-1;te>=R;te--)L.buf[te+W]=L.buf[te]}function ZW(R,d){for(let L=0;Lge.h-me.h);let W=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(d/.95)),L),h:1/0}],te=0,ue=0;for(let me of R)for(let ge=W.length-1;ge>=0;ge--){let Ce=W[ge];if(!(me.w>Ce.w||me.h>Ce.h)){if(me.x=Ce.x,me.y=Ce.y,ue=Math.max(ue,me.y+me.h),te=Math.max(te,me.x+me.w),me.w===Ce.w&&me.h===Ce.h){let Te=W.pop();Te&&geEt.toCodeUnitIndex(_a));let $r=br(Et.toString(),er);for(let _a of $r){let Ca=[..._a].map(()=>0);Qt.push(new T0(_a,Et.sections,Ca))}}else if(sr){Qt=[],er=er.map(nn=>Et.toCodeUnitIndex(nn));let $r=0,_a=[];for(let nn of Et.text)_a.push(...Array(nn.length).fill(Et.sectionIndex[$r])),$r++;let Ca=sr(Et.text,_a,er);for(let nn of Ca){let qa=[],bn="";for(let Fn of nn[0])qa.push(nn[1][bn.length]),bn+=Fn;Qt.push(new T0(nn[0],Et.sections,qa))}}else Qt=function($r,_a){let Ca=[],nn=0;for(let qa of _a)Ca.push($r.substring(nn,qa)),nn=qa;return nn<$r.length()&&Ca.push($r.substring(nn,$r.length())),Ca}(Et,er);let Mr=[],qr={positionedLines:Mr,text:Et.toString(),top:Oe[1],bottom:Oe[1],left:Oe[0],right:Oe[0],writingMode:Pe,iconsInText:!1,verticalizable:!1};return function($r,_a,Ca,nn,qa,bn,Fn,gn,Va,Hn,ni,Wn){let si=0,po=0,cs=0,Ds=0,Xs=gn==="right"?1:gn==="left"?0:.5,Mf=Rc/Wn,vu=0;for(let Hl of qa){Hl.trim();let rf=Hl.getMaxScale(),Xf={positionedGlyphs:[],lineOffset:0};$r.positionedLines[vu]=Xf;let Zf=Xf.positionedGlyphs,Th=0;if(!Hl.length()){po+=bn,++vu;continue}let Sf=sY(nn,Hl,Mf),Ah=0;for(let Fc of Hl.text){let nu=Hl.getSection(Ah),lc=Fc.codePointAt(0),mu=lY(Va,ni,lc),zc={glyph:lc,imageName:null,x:si,y:po+-17,vertical:mu,scale:1,fontStack:"",sectionIndex:Hl.getSectionIndex(Ah),metrics:null,rect:null},Zd;if("fontStack"in nu){if(Zd=uY(nu,lc,mu,Sf,_a,Ca),!Zd)continue;zc.fontStack=nu.fontStack}else{if($r.iconsInText=!0,nu.scale*=Mf,Zd=cY(nu,mu,rf,Sf,nn),!Zd)continue;Th=Math.max(Th,Zd.imageOffset),zc.imageName=nu.imageName}let{rect:dd,metrics:Bg,baselineOffset:Ep}=Zd;zc.y+=Ep,zc.scale=nu.scale,zc.metrics=Bg,zc.rect=dd,Zf.push(zc),mu?($r.verticalizable=!0,si+=("imageName"in nu?Bg.advance:Rc)*nu.scale+Hn):si+=Bg.advance*nu.scale+Hn,Ah++}Zf.length!==0&&(cs=Math.max(si-Hn,cs),fY(Zf,0,Zf.length-1,Xs)),si=0,Xf.lineOffset=Math.max(Th,(rf-1)*Rc);let Hh=bn*rf+Th;po+=Hh,Ds=Math.max(Hh,Ds),++vu}let{horizontalAlign:yc,verticalAlign:Dc}=A3(Fn);(function(Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc){let nu=(rf-Xf)*Th,lc=0;lc=Sf!==Ah?-Hh*Zf- -17:-Zf*Fc*Ah+.5*Ah;for(let mu of Hl)for(let zc of mu.positionedGlyphs)zc.x+=nu,zc.y+=lc})($r.positionedLines,Xs,yc,Dc,cs,Ds,bn,po,qa.length),$r.top+=-Dc*po,$r.bottom=$r.top+po,$r.left+=-yc*cs,$r.right=$r.left+cs}(qr,d,L,W,Qt,me,ge,Ce,Pe,Te,it,bt),!function($r){for(let _a of $r)if(_a.positionedGlyphs.length!==0)return!1;return!0}(Mr)&&qr}function A3(R){let d=.5,L=.5;switch(R){case"right":case"top-right":case"bottom-right":d=1;break;case"left":case"top-left":case"bottom-left":d=0}switch(R){case"bottom":case"bottom-right":case"bottom-left":L=1;break;case"top":case"top-right":case"top-left":L=0}return{horizontalAlign:d,verticalAlign:L}}function sY(R,d,L){let W=d.getMaxScale()*Rc,{maxImageWidth:te,maxImageHeight:ue}=d.getMaxImageSize(R),me=Math.max(W,ue*L);return{verticalLineContentWidth:Math.max(W,te*L),horizontalLineContentHeight:me}}function eS(R){switch(R){case"top":return 0;case"center":return .5;default:return 1}}function lY(R,d,L){return!(R===l.ax.horizontal||!d&&!Wt(L)||d&&(Pr(L)||(W=L,new RegExp("\\p{sc=Arab}","u").test(String.fromCodePoint(W)))));var W}function uY(R,d,L,W,te,ue){let me=ue[R.fontStack],ge=function(Te,Oe,Pe,it){if(Te?.rect)return Te;let He=Oe[Pe.fontStack],bt=He?.[it];return bt?{rect:null,metrics:bt.metrics}:null}(me?.[d],te,R,d);if(ge===null)return null;let Ce;if(L)Ce=W.verticalLineContentWidth-R.scale*Rc;else{let Te=eS(R.verticalAlign);Ce=(W.horizontalLineContentHeight-R.scale*Rc)*Te}return{rect:ge.rect,metrics:ge.metrics,baselineOffset:Ce}}function cY(R,d,L,W,te){let ue=te[R.imageName];if(!ue)return null;let me=ue.paddedRect,ge=ue.displaySize,Ce={width:ge[0],height:ge[1],left:1,top:-3,advance:d?ge[1]:ge[0]},Te;if(d)Te=W.verticalLineContentWidth-ge[1]*R.scale;else{let Oe=eS(R.verticalAlign);Te=(W.horizontalLineContentHeight-ge[1]*R.scale)*Oe}return{rect:me,metrics:Ce,baselineOffset:Te,imageOffset:(d?ge[0]:ge[1])*R.scale-Rc*L}}function fY(R,d,L,W){if(W===0)return;let te=R[L],ue=(R[L].x+te.metrics.advance*te.scale)*W;for(let me=d;me<=L;me++)R[me].x-=ue}function hY(R,d,L){let{horizontalAlign:W,verticalAlign:te}=A3(L),ue=d[0]-R.displaySize[0]*W,me=d[1]-R.displaySize[1]*te;return{image:R,top:me,bottom:me+R.displaySize[1],left:ue,right:ue+R.displaySize[0]}}function tS(R){var d,L;let W=R.left,te=R.top,ue=R.right-W,me=R.bottom-te,ge=(d=R.image.textFitWidth)!==null&&d!==void 0?d:"stretchOrShrink",Ce=(L=R.image.textFitHeight)!==null&&L!==void 0?L:"stretchOrShrink",Te=(R.image.content[2]-R.image.content[0])/(R.image.content[3]-R.image.content[1]);if(Ce==="proportional"){if(ge==="stretchOnly"&&ue/meTe){let Oe=Math.ceil(ue/Te);te*=Oe/me,me=Oe}return{x1:W,y1:te,x2:W+ue,y2:te+me}}function rS(R,d,L,W,te,ue){let me=R.image,ge;if(me.content){let Qt=me.content,er=me.pixelRatio||1;ge=[Qt[0]/er,Qt[1]/er,me.displaySize[0]-Qt[2]/er,me.displaySize[1]-Qt[3]/er]}let Ce=d.left*ue,Te=d.right*ue,Oe,Pe,it,He;L==="width"||L==="both"?(He=te[0]+Ce-W[3],Pe=te[0]+Te+W[1]):(He=te[0]+(Ce+Te-me.displaySize[0])/2,Pe=He+me.displaySize[0]);let bt=d.top*ue,Et=d.bottom*ue;return L==="height"||L==="both"?(Oe=te[1]+bt-W[0],it=te[1]+Et+W[2]):(Oe=te[1]+(bt+Et-me.displaySize[1])/2,it=Oe+me.displaySize[1]),{image:me,top:Oe,right:Pe,bottom:it,left:He,collisionPadding:ge}}fi("ImagePosition",T3),fi("ImageAtlas",Q4),l.ax=void 0,(xp=l.ax||(l.ax={}))[xp.none=0]="none",xp[xp.horizontal=1]="horizontal",xp[xp.vertical=2]="vertical",xp[xp.horizontalOnly=3]="horizontalOnly";let Yd=128,bp=32640;function aS(R,d){let{expression:L}=d;if(L.kind==="constant")return{kind:"constant",layoutSize:L.evaluate(new oi(R+1))};if(L.kind==="source")return{kind:"source"};{let{zoomStops:W,interpolationType:te}=L,ue=0;for(;ueme.id),this.index=d.index,this.pixelRatio=d.pixelRatio,this.sourceLayerIndex=d.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let L=this.layers[0]._unevaluatedLayout._values;this.textSizeData=aS(this.zoom,L["text-size"]),this.iconSizeData=aS(this.zoom,L["icon-size"]);let W=this.layers[0].layout,te=W.get("symbol-sort-key"),ue=W.get("symbol-z-order");this.canOverlap=M3(W,"text-overlap","text-allow-overlap")!=="never"||M3(W,"icon-overlap","icon-allow-overlap")!=="never"||W.get("text-ignore-placement")||W.get("icon-ignore-placement"),this.sortFeaturesByKey=ue!=="viewport-y"&&!te.isConstant(),this.sortFeaturesByY=(ue==="viewport-y"||ue==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,W.get("symbol-placement")==="point"&&(this.writingModes=W.get("text-writing-mode").map(me=>l.ax[me])),this.stateDependentLayerIds=this.layers.filter(me=>me.isStateDependent()).map(me=>me.id),this.sourceID=d.sourceID}createArrays(){this.text=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("text"))),this.icon=new E3(new mo(this.layers,this.zoom,d=>d.startsWith("icon"))),this.glyphOffsetArray=new ut,this.lineVertexArray=new ft,this.symbolInstances=new Ze,this.textAnchorOffsets=new Gt}calculateGlyphDependencies(d,L,W,te,ue){for(let me of d)if(L[me.codePointAt(0)]=!0,(W||te)&&ue){let ge=Rg[me];ge&&(L[ge.codePointAt(0)]=!0)}}populate(d,L,W){var te;let ue=this.layers[0],me=ue.layout,ge=me.get("text-font"),Ce=me.get("text-field"),Te=me.get("icon-image"),Oe=(Ce.value.kind!=="constant"||Ce.value.value instanceof Di&&!Ce.value.value.isEmpty()||Ce.value.value.toString().length>0)&&(ge.value.kind!=="constant"||ge.value.value.length>0),Pe=Te.value.kind!=="constant"||!!Te.value.value||Object.keys(Te.parameters).length>0,it=me.get("symbol-sort-key");if(this.features=[],!Oe&&!Pe)return;let He=L.iconDependencies,bt=L.glyphDependencies,Et=L.availableImages,Qt=new oi(this.zoom);for(let{feature:er,id:br,index:sr,sourceLayerIndex:Mr}of d){let qr=ue._featureFilter.needGeometry,$r=fo(er,qr);if(!ue._featureFilter.filter(Qt,$r,W))continue;let _a,Ca;if(qr||($r.geometry=ql(er)),Oe){let qa=ue.getValueAndResolveTokens("text-field",$r,W,Et),bn=Di.factory(qa);this.hasRTLText||(this.hasRTLText=pY(bn)),(!this.hasRTLText||Si.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Si.isParsed())&&(_a=HW(bn,ue,$r))}if(Pe){let qa=ue.getValueAndResolveTokens("icon-image",$r,W,Et);Ca=qa instanceof qi?qa:qi.fromString(qa)}if(!_a&&!Ca)continue;let nn=this.sortFeaturesByKey?it.evaluate($r,{},W):void 0;if(this.features.push({id:br,text:_a,icon:Ca,index:sr,sourceLayerIndex:Mr,geometry:$r.geometry,properties:er.properties,type:Eg.types[er.type],sortKey:nn}),Ca&&(He[Ca.name]=!0),_a){let qa=ge.evaluate($r,{},W).join(","),bn=me.get("text-rotation-alignment")!=="viewport"&&me.get("symbol-placement")!=="point";this.allowVerticalPlacement=(te=this.writingModes)===null||te===void 0?void 0:te.includes(l.ax.vertical);for(let Fn of _a.sections)if(Fn.image)He[Fn.image.name]=!0;else{let gn=Br(_a.toString()),Va=Fn.fontStack||qa;bt[Va]||(bt[Va]={}),this.calculateGlyphDependencies(Fn.text,bt[Va],bn,this.allowVerticalPlacement,gn)}}}me.get("symbol-placement")==="line"&&(this.features=function(er){let br={},sr={},Mr=[],qr=0;function $r(qa){Mr.push(er[qa]),qr++}function _a(qa,bn,Fn){let gn=sr[qa];return delete sr[qa],sr[bn]=gn,Mr[gn].geometry[0].pop(),Mr[gn].geometry[0]=Mr[gn].geometry[0].concat(Fn[0]),gn}function Ca(qa,bn,Fn){let gn=br[bn];return delete br[bn],br[qa]=gn,Mr[gn].geometry[0].shift(),Mr[gn].geometry[0]=Fn[0].concat(Mr[gn].geometry[0]),gn}function nn(qa,bn,Fn){let gn=Fn?bn[0][bn[0].length-1]:bn[0][0];return`${qa}:${gn.x}:${gn.y}`}for(let qa=0;qaqa.geometry)}(this.features)),this.sortFeaturesByKey&&this.features.sort((er,br)=>er.sortKey-br.sortKey)}update(d,L,W){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}),this.icon.programConfigurations.updatePaintArrays(d,L,this.layers,{imagePositions:W}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(d){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(d),this.iconCollisionBox.upload(d)),this.text.upload(d,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(d,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(d,L){let W=this.lineVertexArray.length;if(d.segment!==void 0){let te=d.dist(L[d.segment+1]),ue=d.dist(L[d.segment]),me={};for(let ge=d.segment+1;ge=0;ge--)me[ge]={x:L[ge].x,y:L[ge].y,tileUnitDistanceFromAnchor:ue},ge>0&&(ue+=L[ge-1].dist(L[ge]));for(let ge=0;ge0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(d,L){let W=d.placedSymbolArray.get(L),te=W.vertexStartIndex+4*W.numGlyphs;for(let ue=W.vertexStartIndex;uete[ge]-te[Ce]||ue[Ce]-ue[ge]),me}addToSortKeyRanges(d,L){let W=this.sortKeyRanges[this.sortKeyRanges.length-1];W?.sortKey===L?W.symbolInstanceEnd=d+1:this.sortKeyRanges.push({sortKey:L,symbolInstanceStart:d,symbolInstanceEnd:d+1})}sortFeatures(d){if(this.sortFeaturesByY&&this.sortedAngle!==d&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(d),this.sortedAngle=d,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let L of this.symbolInstanceIndexes){let W=this.symbolInstances.get(L);this.featureSortOrder.push(W.featureIndex);let te=[W.rightJustifiedTextSymbolIndex,W.centerJustifiedTextSymbolIndex,W.leftJustifiedTextSymbolIndex];for(let ue=0;ue=0&&te.indexOf(me)===ue&&this.addIndicesForPlacedSymbol(this.text,me)}W.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,W.verticalPlacedTextSymbolIndex),W.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.placedIconSymbolIndex),W.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,W.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let nS,iS;fi("SymbolBucket",M0,{omit:["layers","collisionBoxArray","features","compareText"]}),M0.MAX_GLYPHS=65535,M0.addDynamicAttributes=S3;var C3={get paint(){return iS=iS||new Ps({"icon-opacity":new wi(ht.paint_symbol["icon-opacity"]),"icon-color":new wi(ht.paint_symbol["icon-color"]),"icon-halo-color":new wi(ht.paint_symbol["icon-halo-color"]),"icon-halo-width":new wi(ht.paint_symbol["icon-halo-width"]),"icon-halo-blur":new wi(ht.paint_symbol["icon-halo-blur"]),"icon-translate":new hi(ht.paint_symbol["icon-translate"]),"icon-translate-anchor":new hi(ht.paint_symbol["icon-translate-anchor"]),"text-opacity":new wi(ht.paint_symbol["text-opacity"]),"text-color":new wi(ht.paint_symbol["text-color"],{runtimeType:cr,getOverride:R=>R.textColor,hasOverride:R=>!!R.textColor}),"text-halo-color":new wi(ht.paint_symbol["text-halo-color"]),"text-halo-width":new wi(ht.paint_symbol["text-halo-width"]),"text-halo-blur":new wi(ht.paint_symbol["text-halo-blur"]),"text-translate":new hi(ht.paint_symbol["text-translate"]),"text-translate-anchor":new hi(ht.paint_symbol["text-translate-anchor"])})},get layout(){return nS=nS||new Ps({"symbol-placement":new hi(ht.layout_symbol["symbol-placement"]),"symbol-spacing":new hi(ht.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new hi(ht.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new wi(ht.layout_symbol["symbol-sort-key"]),"symbol-z-order":new hi(ht.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new hi(ht.layout_symbol["icon-allow-overlap"]),"icon-overlap":new hi(ht.layout_symbol["icon-overlap"]),"icon-ignore-placement":new hi(ht.layout_symbol["icon-ignore-placement"]),"icon-optional":new hi(ht.layout_symbol["icon-optional"]),"icon-rotation-alignment":new hi(ht.layout_symbol["icon-rotation-alignment"]),"icon-size":new wi(ht.layout_symbol["icon-size"]),"icon-text-fit":new hi(ht.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new hi(ht.layout_symbol["icon-text-fit-padding"]),"icon-image":new wi(ht.layout_symbol["icon-image"]),"icon-rotate":new wi(ht.layout_symbol["icon-rotate"]),"icon-padding":new wi(ht.layout_symbol["icon-padding"]),"icon-keep-upright":new hi(ht.layout_symbol["icon-keep-upright"]),"icon-offset":new wi(ht.layout_symbol["icon-offset"]),"icon-anchor":new wi(ht.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new hi(ht.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new hi(ht.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new hi(ht.layout_symbol["text-rotation-alignment"]),"text-field":new wi(ht.layout_symbol["text-field"]),"text-font":new wi(ht.layout_symbol["text-font"]),"text-size":new wi(ht.layout_symbol["text-size"]),"text-max-width":new wi(ht.layout_symbol["text-max-width"]),"text-line-height":new hi(ht.layout_symbol["text-line-height"]),"text-letter-spacing":new wi(ht.layout_symbol["text-letter-spacing"]),"text-justify":new wi(ht.layout_symbol["text-justify"]),"text-radial-offset":new wi(ht.layout_symbol["text-radial-offset"]),"text-variable-anchor":new hi(ht.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new wi(ht.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new wi(ht.layout_symbol["text-anchor"]),"text-max-angle":new hi(ht.layout_symbol["text-max-angle"]),"text-writing-mode":new hi(ht.layout_symbol["text-writing-mode"]),"text-rotate":new wi(ht.layout_symbol["text-rotate"]),"text-padding":new hi(ht.layout_symbol["text-padding"]),"text-keep-upright":new hi(ht.layout_symbol["text-keep-upright"]),"text-transform":new wi(ht.layout_symbol["text-transform"]),"text-offset":new wi(ht.layout_symbol["text-offset"]),"text-allow-overlap":new hi(ht.layout_symbol["text-allow-overlap"]),"text-overlap":new hi(ht.layout_symbol["text-overlap"]),"text-ignore-placement":new hi(ht.layout_symbol["text-ignore-placement"]),"text-optional":new hi(ht.layout_symbol["text-optional"])})}};class oS{constructor(d){if(d.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=d.property.overrides?d.property.overrides.runtimeType:Yt,this.defaultValue=d}evaluate(d){if(d.formattedSection){let L=this.defaultValue.property.overrides;if(L?.hasOverride(d.formattedSection))return L.getOverride(d.formattedSection)}return d.feature&&d.featureState?this.defaultValue.evaluate(d.feature,d.featureState):this.defaultValue.property.specification.default}eachChild(d){this.defaultValue.isConstant()||d(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}fi("FormatSectionOverride",oS,{omit:["defaultValue"]});class wy extends ll{constructor(d,L){super(d,C3,L)}recalculate(d,L){if(super.recalculate(d,L),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){let W=this.layout.get("text-writing-mode");if(W){let te=[];for(let ue of W)te.includes(ue)||te.push(ue);this.layout._values["text-writing-mode"]=te}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(d,L,W,te){let ue=this.layout.get(d).evaluate(L,{},W,te),me=this._unevaluatedLayout._values[d];return me.isDataDriven()||kc(me.value)||!ue?ue:function(ge,Ce){return Ce.replace(/{([^{}]+)}/g,(Te,Oe)=>ge&&Oe in ge?String(ge[Oe]):"")}(L.properties,ue)}createBucket(d){return new M0(d)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let d of C3.paint.overridableProperties){if(!wy.hasPaintOverride(this.layout,d))continue;let L=this.paint.get(d),W=new oS(L),te=new kl(W,L.property.specification),ue=null;ue=L.value.kind==="constant"||L.value.kind==="source"?new Lc("source",te):new vc("composite",te,L.value.zoomStops),this.paint._values[d]=new Hs(L.property,ue,L.parameters)}}_handleOverridablePaintPropertyUpdate(d,L,W){return!(!this.layout||L.isDataDriven()||W.isDataDriven())&&wy.hasPaintOverride(this.layout,d)}static hasPaintOverride(d,L){let W=d.get("text-field"),te=C3.paint.properties[L],ue=!1,me=ge=>{var Ce;for(let Te of ge)if(!((Ce=te.overrides)===null||Ce===void 0)&&Ce.hasOverride(Te))return void(ue=!0)};if(W.value.kind==="constant"&&W.value.value instanceof Di)me(W.value.value.sections);else if(W.value.kind==="source"||W.value.kind==="composite"){let ge=Te=>{ue||(Te instanceof Mi&&qn(Te.value)===Pa?me(Te.value.sections):Te instanceof vs?me(Te.sections):Te.eachChild(ge))},Ce=W.value;Ce._styleExpression&&ge(Ce._styleExpression.expression)}return ue}}let sS;var vY={get paint(){return sS=sS||new Ps({"background-color":new hi(ht.paint_background["background-color"]),"background-pattern":new sc(ht.paint_background["background-pattern"]),"background-opacity":new hi(ht.paint_background["background-opacity"])})}};class mY extends ll{constructor(d,L){super(d,vY,L)}}class gY extends ll{constructor(d,L){super(d,{},L),this.onAdd=W=>{this.implementation.onAdd&&this.implementation.onAdd(W,W.painter.context.gl)},this.onRemove=W=>{this.implementation.onRemove&&this.implementation.onRemove(W,W.painter.context.gl)},this.implementation=d}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class yY{constructor(d){this._methodToThrottle=d,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var d;this._triggered||(this._triggered=!0,(d=this._channel)===null||d===void 0||d.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let _Y={once:!0},L3=63710088e-1;class wp{constructor(d,L){if(isNaN(d)||isNaN(L))throw new Error(`Invalid LngLat object: (${d}, ${L})`);if(this.lng=+d,this.lat=+L,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new wp(G(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(d){let L=Math.PI/180,W=this.lat*L,te=d.lat*L,ue=Math.sin(W)*Math.sin(te)+Math.cos(W)*Math.cos(te)*Math.cos((d.lng-this.lng)*L);return L3*Math.acos(Math.min(ue,1))}static convert(d){if(d instanceof wp)return d;if(Array.isArray(d)&&(d.length===2||d.length===3))return new wp(Number(d[0]),Number(d[1]));if(!Array.isArray(d)&&typeof d=="object"&&d!==null)return new wp(Number("lng"in d?d.lng:d.lon),Number(d.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 [, ]")}}let lS=2*Math.PI*L3;function uS(R){return lS*Math.cos(R*Math.PI/180)}function cS(R){return(180+R)/360}function fS(R){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+R*Math.PI/360)))/360}function hS(R,d){return R/uS(d)}function dS(R){return 360*R-180}function Ty(R){return 360/Math.PI*Math.atan(Math.exp((180-360*R)*Math.PI/180))-90}function pS(R,d){return R*uS(Ty(d))}class Ig{constructor(d,L,W=0){this.x=+d,this.y=+L,this.z=+W}static fromLngLat(d,L=0){let W=wp.convert(d);return new Ig(cS(W.lng),fS(W.lat),hS(L,W.lat))}toLngLat(){return new wp(dS(this.x),Ty(this.y))}toAltitude(){return pS(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/lS*(d=Ty(this.y),1/Math.cos(d*Math.PI/180));var d}}function vS(R,d,L){var W=2*Math.PI*6378137/256/Math.pow(2,L);return[R*W-2*Math.PI*6378137/2,d*W-2*Math.PI*6378137/2]}class P3{constructor(d,L,W){if(!function(te,ue,me){return!(te<0||te>25||me<0||me>=Math.pow(2,te)||ue<0||ue>=Math.pow(2,te))}(d,L,W))throw new Error(`x=${L}, y=${W}, z=${d} outside of bounds. 0<=x<${Math.pow(2,d)}, 0<=y<${Math.pow(2,d)} 0<=z<=25 `);this.z=d,this.x=L,this.y=W,this.key=S0(0,d,d,L,W)}equals(d){return this.z===d.z&&this.x===d.x&&this.y===d.y}url(d,L,W){let te=(me=this.y,ge=this.z,Ce=vS(256*(ue=this.x),256*(me=Math.pow(2,ge)-me-1),ge),Te=vS(256*(ue+1),256*(me+1),ge),Ce[0]+","+Ce[1]+","+Te[0]+","+Te[1]);var ue,me,ge,Ce,Te;let Oe=function(Pe,it,He){let bt="";for(let Et=Pe;Et>0;Et--){let Qt=1<1?"@2x":"").replace(/{quadkey}/g,Oe).replace(/{bbox-epsg-3857}/g,te)}isChildOf(d){let L=this.z-d.z;return L>0&&d.x===this.x>>L&&d.y===this.y>>L}getTilePoint(d){let L=Math.pow(2,this.z);return new t((d.x*L-this.x)*F,(d.y*L-this.y)*F)}toString(){return`${this.z}/${this.x}/${this.y}`}}class mS{constructor(d,L){this.wrap=d,this.canonical=L,this.key=S0(d,L.z,L.z,L.x,L.y)}}class Ph{constructor(d,L,W,te,ue){if(this.terrainRttPosMatrix32f=null,d= z; overscaledZ = ${d}; z = ${W}`);this.overscaledZ=d,this.wrap=L,this.canonical=new P3(W,+te,+ue),this.key=S0(L,d,W,te,ue)}clone(){return new Ph(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(d){return this.overscaledZ===d.overscaledZ&&this.wrap===d.wrap&&this.canonical.equals(d.canonical)}scaledTo(d){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let L=this.canonical.z-d;return d>this.canonical.z?new Ph(d,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Ph(d,this.wrap,d,this.canonical.x>>L,this.canonical.y>>L)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(d,L){if(d>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${d}; overscaledZ = ${this.overscaledZ}`);let W=this.canonical.z-d;return d>this.canonical.z?S0(this.wrap*+L,d,this.canonical.z,this.canonical.x,this.canonical.y):S0(this.wrap*+L,d,d,this.canonical.x>>W,this.canonical.y>>W)}isChildOf(d){if(d.wrap!==this.wrap||this.overscaledZ-d.overscaledZ<=0)return!1;if(d.overscaledZ===0)return this.overscaledZ>0;let L=this.canonical.z-d.canonical.z;return!(L<0)&&d.canonical.x===this.canonical.x>>L&&d.canonical.y===this.canonical.y>>L}children(d){if(this.overscaledZ>=d)return[new Ph(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let L=this.canonical.z+1,W=2*this.canonical.x,te=2*this.canonical.y;return[new Ph(L,this.wrap,L,W,te),new Ph(L,this.wrap,L,W+1,te),new Ph(L,this.wrap,L,W,te+1),new Ph(L,this.wrap,L,W+1,te+1)]}isLessThan(d){return this.wrapd.wrap)&&(this.overscaledZd.overscaledZ)&&(this.canonical.xd.canonical.x)&&this.canonical.y=0&&d=0&&L=Te)return null;let Pe=this.canonical.x+te,it=this.wrap;return Pe<0?(it-=Math.ceil(-Pe/Te),Pe=(Pe%Te+Te)%Te):Pe>=Te&&(it+=Math.floor(Pe/Te),Pe%=Te),{tileID:new Ph(this.overscaledZ,it,Ce,Pe,Oe),x:me,y:ge}}}function S0(R,d,L,W,te){(R*=2)<0&&(R=-1*R-1);let ue=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(d){return this.expandBy(-d)}map(d){let L=new Ev;return L.extend(d(new t(this.minX,this.minY))),L.extend(d(new t(this.maxX,this.minY))),L.extend(d(new t(this.minX,this.maxY))),L.extend(d(new t(this.maxX,this.maxY))),L}static fromPoints(d){let L=new Ev;for(let W of d)L.extend(W);return L}contains(d){return d.x>=this.minX&&d.x<=this.maxX&&d.y>=this.minY&&d.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(d){return!this.empty()&&!d.empty()&&d.minX>=this.minX&&d.maxX<=this.maxX&&d.minY>=this.minY&&d.maxY<=this.maxY}intersects(d){return!this.empty()&&!d.empty()&&d.minX<=this.maxX&&d.maxX>=this.minX&&d.minY<=this.maxY&&d.maxY>=this.minY}}class gS{constructor(d){this._stringToNumber={},this._numberToString=[];for(let L=0;L=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${d} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[d]}}class yS{constructor(d,L,W,te,ue){this.type="Feature",this._vectorTileFeature=d,this._x=W,this._y=te,this._z=L,this.properties=d.properties,this.id=ue}projectPoint(d,L,W,te){return[360*(d.x+L)/te-180,360/Math.PI*Math.atan(Math.exp((1-2*(d.y+W)/te)*Math.PI))-90]}projectLine(d,L,W,te){return d.map(ue=>this.projectPoint(ue,L,W,te))}get geometry(){if(this._geometry)return this._geometry;let d=this._vectorTileFeature,L=d.extent*Math.pow(2,this._z),W=d.extent*this._x,te=d.extent*this._y,ue=d.loadGeometry();switch(d.type){case 1:{let me=[];for(let Ce of ue)me.push(Ce[0]);let ge=this.projectLine(me,W,te,L);this._geometry=me.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge};break}case 2:{let me=ue.map(ge=>this.projectLine(ge,W,te,L));this._geometry=me.length===1?{type:"LineString",coordinates:me[0]}:{type:"MultiLineString",coordinates:me};break}case 3:{let me=b4(ue),ge=[];for(let Ce of me)ge.push(Ce.map(Te=>this.projectLine(Te,W,te,L)));this._geometry=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge};break}default:throw new Error(`unknown feature type: ${d.type}`)}return this._geometry}set geometry(d){this._geometry=d}toJSON(){let d={geometry:this.geometry};for(let L in this)L!=="_geometry"&&L!=="_vectorTileFeature"&&L!=="_x"&&L!=="_y"&&L!=="_z"&&(d[L]=this[L]);return d}}class E0{constructor(d,L,W){this._name=d,this.dataBuffer=L,typeof W=="number"?this._size=W:(this.nullabilityBuffer=W,this._size=W.size())}getValue(d){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(d)?null:this.getValueFromBuffer(d)}has(d){var L;return((L=this.nullabilityBuffer)==null?void 0:L.get(d))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class Ay extends E0{}class R3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class I3 extends Ay{getValueFromBuffer(d){return this.dataBuffer[d]}}class _S extends E0{constructor(d,L,W,te){super(d,L,te),this.delta=W}}class D3 extends _S{constructor(d,L,W,te){super(d,Int32Array.of(L),W,te)}getValueFromBuffer(d){return this.dataBuffer[0]+d*this.delta}}class F3 extends E0{constructor(d,L,W,te){super(d,te?Int32Array.of(L):Uint32Array.of(L),W)}getValueFromBuffer(d){return this.dataBuffer[0]}}class xY{constructor(d,L,W,te,ue=4096){this._name=d,this._geometryVector=L,this._idVector=W,this._propertyVectors=te,this._extent=ue}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(d){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map(L=>[L.name,L]))),this.propertyVectorsMap.get(d)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let d=[],L=this.geometryVector.getGeometries();for(let W=0;W>>32-R;let B3=z3,Xd=256;function O3(R,d){return R-R%d}function bY(R){let d=R>>>0;return((255&d)<<24|(65280&d)<<8|d>>>8&65280|d>>>24&255)>>>0}let N3=function(){if(!Number.isFinite(65536))return 65536;let R=O3(Math.floor(65536),Xd);return R===0?Xd:R}(),wY=3*N3/Xd+N3|0;function bS(){let R=new Uint8Array(wY);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:R,byteContainerI32:new Int32Array(R.buffer,R.byteOffset,R.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function TY(R,d,L,W,te){switch(te){case 1:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=it>>>0&1,ge[Te++]=it>>>1&1,ge[Te++]=it>>>2&1,ge[Te++]=it>>>3&1,ge[Te++]=it>>>4&1,ge[Te++]=it>>>5&1,ge[Te++]=it>>>6&1,ge[Te++]=it>>>7&1,ge[Te++]=it>>>8&1,ge[Te++]=it>>>9&1,ge[Te++]=it>>>10&1,ge[Te++]=it>>>11&1,ge[Te++]=it>>>12&1,ge[Te++]=it>>>13&1,ge[Te++]=it>>>14&1,ge[Te++]=it>>>15&1,ge[Te++]=it>>>16&1,ge[Te++]=it>>>17&1,ge[Te++]=it>>>18&1,ge[Te++]=it>>>19&1,ge[Te++]=it>>>20&1,ge[Te++]=it>>>21&1,ge[Te++]=it>>>22&1,ge[Te++]=it>>>23&1,ge[Te++]=it>>>24&1,ge[Te++]=it>>>25&1,ge[Te++]=it>>>26&1,ge[Te++]=it>>>27&1,ge[Te++]=it>>>28&1,ge[Te++]=it>>>29&1,ge[Te++]=it>>>30&1,ge[Te++]=it>>>31&1}})(R,d,L,W);break;case 2:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0;ge[Te++]=it>>>0&3,ge[Te++]=it>>>2&3,ge[Te++]=it>>>4&3,ge[Te++]=it>>>6&3,ge[Te++]=it>>>8&3,ge[Te++]=it>>>10&3,ge[Te++]=it>>>12&3,ge[Te++]=it>>>14&3,ge[Te++]=it>>>16&3,ge[Te++]=it>>>18&3,ge[Te++]=it>>>20&3,ge[Te++]=it>>>22&3,ge[Te++]=it>>>24&3,ge[Te++]=it>>>26&3,ge[Te++]=it>>>28&3,ge[Te++]=it>>>30&3,ge[Te++]=He>>>0&3,ge[Te++]=He>>>2&3,ge[Te++]=He>>>4&3,ge[Te++]=He>>>6&3,ge[Te++]=He>>>8&3,ge[Te++]=He>>>10&3,ge[Te++]=He>>>12&3,ge[Te++]=He>>>14&3,ge[Te++]=He>>>16&3,ge[Te++]=He>>>18&3,ge[Te++]=He>>>20&3,ge[Te++]=He>>>22&3,ge[Te++]=He>>>24&3,ge[Te++]=He>>>26&3,ge[Te++]=He>>>28&3,ge[Te++]=He>>>30&3}})(R,d,L,W);break;case 3:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0;ge[Te++]=it>>>0&7,ge[Te++]=it>>>3&7,ge[Te++]=it>>>6&7,ge[Te++]=it>>>9&7,ge[Te++]=it>>>12&7,ge[Te++]=it>>>15&7,ge[Te++]=it>>>18&7,ge[Te++]=it>>>21&7,ge[Te++]=it>>>24&7,ge[Te++]=it>>>27&7,ge[Te++]=7&(it>>>30|(1&He)<<2),ge[Te++]=He>>>1&7,ge[Te++]=He>>>4&7,ge[Te++]=He>>>7&7,ge[Te++]=He>>>10&7,ge[Te++]=He>>>13&7,ge[Te++]=He>>>16&7,ge[Te++]=He>>>19&7,ge[Te++]=He>>>22&7,ge[Te++]=He>>>25&7,ge[Te++]=He>>>28&7,ge[Te++]=7&(He>>>31|(3&bt)<<1),ge[Te++]=bt>>>2&7,ge[Te++]=bt>>>5&7,ge[Te++]=bt>>>8&7,ge[Te++]=bt>>>11&7,ge[Te++]=bt>>>14&7,ge[Te++]=bt>>>17&7,ge[Te++]=bt>>>20&7,ge[Te++]=bt>>>23&7,ge[Te++]=bt>>>26&7,ge[Te++]=bt>>>29&7}})(R,d,L,W);break;case 4:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0;ge[Te++]=it>>>0&15,ge[Te++]=it>>>4&15,ge[Te++]=it>>>8&15,ge[Te++]=it>>>12&15,ge[Te++]=it>>>16&15,ge[Te++]=it>>>20&15,ge[Te++]=it>>>24&15,ge[Te++]=it>>>28&15,ge[Te++]=He>>>0&15,ge[Te++]=He>>>4&15,ge[Te++]=He>>>8&15,ge[Te++]=He>>>12&15,ge[Te++]=He>>>16&15,ge[Te++]=He>>>20&15,ge[Te++]=He>>>24&15,ge[Te++]=He>>>28&15,ge[Te++]=bt>>>0&15,ge[Te++]=bt>>>4&15,ge[Te++]=bt>>>8&15,ge[Te++]=bt>>>12&15,ge[Te++]=bt>>>16&15,ge[Te++]=bt>>>20&15,ge[Te++]=bt>>>24&15,ge[Te++]=bt>>>28&15,ge[Te++]=Et>>>0&15,ge[Te++]=Et>>>4&15,ge[Te++]=Et>>>8&15,ge[Te++]=Et>>>12&15,ge[Te++]=Et>>>16&15,ge[Te++]=Et>>>20&15,ge[Te++]=Et>>>24&15,ge[Te++]=Et>>>28&15}})(R,d,L,W);break;case 5:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0;ge[Te++]=it>>>0&31,ge[Te++]=it>>>5&31,ge[Te++]=it>>>10&31,ge[Te++]=it>>>15&31,ge[Te++]=it>>>20&31,ge[Te++]=it>>>25&31,ge[Te++]=31&(it>>>30|(7&He)<<2),ge[Te++]=He>>>3&31,ge[Te++]=He>>>8&31,ge[Te++]=He>>>13&31,ge[Te++]=He>>>18&31,ge[Te++]=He>>>23&31,ge[Te++]=31&(He>>>28|(1&bt)<<4),ge[Te++]=bt>>>1&31,ge[Te++]=bt>>>6&31,ge[Te++]=bt>>>11&31,ge[Te++]=bt>>>16&31,ge[Te++]=bt>>>21&31,ge[Te++]=bt>>>26&31,ge[Te++]=31&(bt>>>31|(15&Et)<<1),ge[Te++]=Et>>>4&31,ge[Te++]=Et>>>9&31,ge[Te++]=Et>>>14&31,ge[Te++]=Et>>>19&31,ge[Te++]=Et>>>24&31,ge[Te++]=31&(Et>>>29|(3&Qt)<<3),ge[Te++]=Qt>>>2&31,ge[Te++]=Qt>>>7&31,ge[Te++]=Qt>>>12&31,ge[Te++]=Qt>>>17&31,ge[Te++]=Qt>>>22&31,ge[Te++]=Qt>>>27&31}})(R,d,L,W);break;case 6:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0;ge[Te++]=it>>>0&63,ge[Te++]=it>>>6&63,ge[Te++]=it>>>12&63,ge[Te++]=it>>>18&63,ge[Te++]=it>>>24&63,ge[Te++]=63&(it>>>30|(15&He)<<2),ge[Te++]=He>>>4&63,ge[Te++]=He>>>10&63,ge[Te++]=He>>>16&63,ge[Te++]=He>>>22&63,ge[Te++]=63&(He>>>28|(3&bt)<<4),ge[Te++]=bt>>>2&63,ge[Te++]=bt>>>8&63,ge[Te++]=bt>>>14&63,ge[Te++]=bt>>>20&63,ge[Te++]=bt>>>26&63,ge[Te++]=Et>>>0&63,ge[Te++]=Et>>>6&63,ge[Te++]=Et>>>12&63,ge[Te++]=Et>>>18&63,ge[Te++]=Et>>>24&63,ge[Te++]=63&(Et>>>30|(15&Qt)<<2),ge[Te++]=Qt>>>4&63,ge[Te++]=Qt>>>10&63,ge[Te++]=Qt>>>16&63,ge[Te++]=Qt>>>22&63,ge[Te++]=63&(Qt>>>28|(3&er)<<4),ge[Te++]=er>>>2&63,ge[Te++]=er>>>8&63,ge[Te++]=er>>>14&63,ge[Te++]=er>>>20&63,ge[Te++]=er>>>26&63}})(R,d,L,W);break;case 7:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0;ge[Te++]=it>>>0&127,ge[Te++]=it>>>7&127,ge[Te++]=it>>>14&127,ge[Te++]=it>>>21&127,ge[Te++]=127&(it>>>28|(7&He)<<4),ge[Te++]=He>>>3&127,ge[Te++]=He>>>10&127,ge[Te++]=He>>>17&127,ge[Te++]=He>>>24&127,ge[Te++]=127&(He>>>31|(63&bt)<<1),ge[Te++]=bt>>>6&127,ge[Te++]=bt>>>13&127,ge[Te++]=bt>>>20&127,ge[Te++]=127&(bt>>>27|(3&Et)<<5),ge[Te++]=Et>>>2&127,ge[Te++]=Et>>>9&127,ge[Te++]=Et>>>16&127,ge[Te++]=Et>>>23&127,ge[Te++]=127&(Et>>>30|(31&Qt)<<2),ge[Te++]=Qt>>>5&127,ge[Te++]=Qt>>>12&127,ge[Te++]=Qt>>>19&127,ge[Te++]=127&(Qt>>>26|(1&er)<<6),ge[Te++]=er>>>1&127,ge[Te++]=er>>>8&127,ge[Te++]=er>>>15&127,ge[Te++]=er>>>22&127,ge[Te++]=127&(er>>>29|(15&br)<<3),ge[Te++]=br>>>4&127,ge[Te++]=br>>>11&127,ge[Te++]=br>>>18&127,ge[Te++]=br>>>25&127}})(R,d,L,W);break;case 8:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<8;Pe++){let it=ue[Oe++]>>>0,He=ue[Oe++]>>>0,bt=ue[Oe++]>>>0,Et=ue[Oe++]>>>0,Qt=ue[Oe++]>>>0,er=ue[Oe++]>>>0,br=ue[Oe++]>>>0,sr=ue[Oe++]>>>0;ge[Te++]=it>>>0&255,ge[Te++]=it>>>8&255,ge[Te++]=it>>>16&255,ge[Te++]=it>>>24&255,ge[Te++]=He>>>0&255,ge[Te++]=He>>>8&255,ge[Te++]=He>>>16&255,ge[Te++]=He>>>24&255,ge[Te++]=bt>>>0&255,ge[Te++]=bt>>>8&255,ge[Te++]=bt>>>16&255,ge[Te++]=bt>>>24&255,ge[Te++]=Et>>>0&255,ge[Te++]=Et>>>8&255,ge[Te++]=Et>>>16&255,ge[Te++]=Et>>>24&255,ge[Te++]=Qt>>>0&255,ge[Te++]=Qt>>>8&255,ge[Te++]=Qt>>>16&255,ge[Te++]=Qt>>>24&255,ge[Te++]=er>>>0&255,ge[Te++]=er>>>8&255,ge[Te++]=er>>>16&255,ge[Te++]=er>>>24&255,ge[Te++]=br>>>0&255,ge[Te++]=br>>>8&255,ge[Te++]=br>>>16&255,ge[Te++]=br>>>24&255,ge[Te++]=sr>>>0&255,ge[Te++]=sr>>>8&255,ge[Te++]=sr>>>16&255,ge[Te++]=sr>>>24&255}})(R,d,L,W);break;case 16:(function(ue,me,ge,Ce){let Te=Ce,Oe=me;for(let Pe=0;Pe<128;Pe++){let it=ue[Oe++]>>>0;ge[Te++]=65535&it,ge[Te++]=it>>>16&65535}})(R,d,L,W);break;default:(function(ue,me,ge,Ce,Te){let Oe=B3[Te]>>>0,Pe=me,it=0,He=ue[Pe]>>>0,bt=Ce;for(let Et=0;Et<8;Et++){for(let Qt=0;Qt<32;Qt++)if(it+Te<=32)ge[bt+Qt]=He>>>it&Oe,it+=Te,it===32&&(it=0,Pe++,Qt!==31&&(He=ue[Pe]>>>0));else{let er=32-it,br=He>>>it;Pe++,He=ue[Pe]>>>0;let sr=Te-er;ge[bt+Qt]=(br|(He&-1>>>32-sr>>>0)<>>0)}})(R,d,L,W,te)}return d+(te<<3)|0}function AY(R,d,L,W){if(L+2>d)throw new Error(`FastPFOR decode: byteContainer underflow at block=${W} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${L}, byteSize=${d})`);let te=R[L++],ue=R[L++];if(te>32)throw new Error(`FastPFOR decode: invalid bitWidth=${te} at block=${W} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:te,exceptionCount:ue,bytePosIn:L}}function MY(R,d,L,W,te,ue,me,ge,Ce){let{maxBits:Te,exceptionBitWidth:Oe,bytePosIn:Pe}=function(Qt,er,br,sr,Mr,qr){if(br+1>er)throw new Error(`FastPFOR decode: exception header underflow at block=${qr} (need 1 byte for maxBits, bytePos=${br}, byteSize=${er})`);let $r=Qt[br++];if($r32)throw new Error(`FastPFOR decode: invalid maxBits=${$r} at block=${qr} (bitWidth=${sr}, expected ${sr}..32)`);let _a=$r-sr|0;if(_a<1||_a>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${_a} at block=${qr} (bitWidth=${sr}, maxBits=${$r})`);if(br+Mr>er)throw new Error(`FastPFOR decode: exception positions underflow at block=${qr} (need=${Mr}, have=${er-br})`);return{maxBits:$r,exceptionBitWidth:_a,bytePosIn:br}}(te,ue,me,L,W,Ce);if(me=Pe,Oe===1){let Qt=1<Et)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${Oe} (ptr=${bt}, need ${W}, size=${Et}) at block ${Ce}`);for(let Qt=0;QtR.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${ge} at pageStart=${me} (expected > 0 and pageStart+whereMeta < encoded.length=${R.length})`);let Ce=me+1|0,Te=me+ge|0,Oe=R[Te]>>>0,Pe=Oe+3>>>2,it=Te+1,He=it+Pe;if(He>=R.length)throw new Error(`FastPFOR decode: invalid byteSize=${Oe} (metaInts=${Pe}, pageStart=${me}, packedEnd=${Te}, byteContainerStart=${it}) causes bitmapPos=${He} out of bounds (encoded.length=${R.length})`);let bt=function(er,br,sr,Mr){Mr.byteContainer.length>>2;if(3&qr.byteOffset)for(let Ca=0;Ca<$r;Ca=Ca+1|0){let nn=0|er[br+Ca|0],qa=Ca<<2;qr[qa]=255&nn,qr[qa+1|0]=nn>>>8&255,qr[qa+2|0]=nn>>>16&255,qr[qa+3|0]=nn>>>24&255}else{let Ca=Mr.byteContainerI32;(!Ca||Ca.buffer!==qr.buffer||Ca.byteOffset!==qr.byteOffset||Ca.length<$r)&&(Ca=Mr.byteContainerI32=new Int32Array(qr.buffer,qr.byteOffset,qr.byteLength>>>2)),Ca.set(er.subarray(br,br+$r))}let _a=3&sr;if(_a>0){let Ca=0|er[br+$r|0],nn=$r<<2;for(let qa=0;qa<_a;qa=qa+1|0)qr[nn+qa|0]=Ca>>>(qa<<3)&255}return qr}(R,it,Oe,ue),Et=Oe,Qt=function(er,br,sr){let Mr=0|er[br++],qr=sr.dataToBePacked;for(let $r=2;$r<=32;$r=$r+1|0){if(!(Mr>>>$r-1&1))continue;if(br>=er.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${$r}, streamWordIndex=${br}, needWords=1, availableWords=${er.length-br}, encodedWords=${er.length})`);let _a=er[br++]>>>0,Ca=O3(_a+31,32),nn=_a*$r+31>>>5;if(br+nn>er.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${$r}, size=${_a}, streamWordIndex=${br}, needWords=${nn}, availableWords=${er.length-br}, encodedWords=${er.length})`);let qa=qr[$r];(!qa||qa.length>>5)|0,sr.exceptionSizes[$r]=_a}return br}(R,He,ue);return ue.dataPointers.fill(0),function(er,br,sr,Mr,qr,$r,_a,Ca,nn,qa){let bn=0|sr,Fn=0;for(let gn=0;gn<_a;gn=gn+1|0){let Va=AY(Ca,nn,Fn,gn);Fn=Va.bytePosIn;let Hn=Va.bitWidth,ni=Va.exceptionCount,Wn=$r+gn*Xd|0;switch(Hn){case 0:qr.fill(0,Wn,Wn+Xd);break;case 32:for(let si=0;si0&&(Fn=MY(qr,Wn,Hn,ni,Ca,nn,Fn,qa,gn))}if(bn!==Mr)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${br}, packedStart=${sr}, consumedPackedEnd=${bn}, expectedPackedEnd=${Mr}, packedWords=${Mr-sr}, encoded.length=${er.length})`)}(R,me,Ce,Te,d,0|W,te/Xd|0,bt,Et,ue),Qt}function EY(R,d,L,W,te){switch(te){case 2:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0;Pe[He++]=bt>>>0&3,Pe[He++]=bt>>>2&3,Pe[He++]=bt>>>4&3,Pe[He++]=bt>>>6&3,Pe[He++]=bt>>>8&3,Pe[He++]=bt>>>10&3,Pe[He++]=bt>>>12&3,Pe[He++]=bt>>>14&3,Pe[He++]=bt>>>16&3,Pe[He++]=bt>>>18&3,Pe[He++]=bt>>>20&3,Pe[He++]=bt>>>22&3,Pe[He++]=bt>>>24&3,Pe[He++]=bt>>>26&3,Pe[He++]=bt>>>28&3,Pe[He++]=bt>>>30&3,Pe[He++]=Et>>>0&3,Pe[He++]=Et>>>2&3,Pe[He++]=Et>>>4&3,Pe[He++]=Et>>>6&3,Pe[He++]=Et>>>8&3,Pe[He++]=Et>>>10&3,Pe[He++]=Et>>>12&3,Pe[He++]=Et>>>14&3,Pe[He++]=Et>>>16&3,Pe[He++]=Et>>>18&3,Pe[He++]=Et>>>20&3,Pe[He++]=Et>>>22&3,Pe[He++]=Et>>>24&3,Pe[He++]=Et>>>26&3,Pe[He++]=Et>>>28&3,Pe[He]=Et>>>30&3}(R,d,L,W);case 3:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0;Pe[He++]=bt>>>0&7,Pe[He++]=bt>>>3&7,Pe[He++]=bt>>>6&7,Pe[He++]=bt>>>9&7,Pe[He++]=bt>>>12&7,Pe[He++]=bt>>>15&7,Pe[He++]=bt>>>18&7,Pe[He++]=bt>>>21&7,Pe[He++]=bt>>>24&7,Pe[He++]=bt>>>27&7,Pe[He++]=7&(bt>>>30|(1&Et)<<2),Pe[He++]=Et>>>1&7,Pe[He++]=Et>>>4&7,Pe[He++]=Et>>>7&7,Pe[He++]=Et>>>10&7,Pe[He++]=Et>>>13&7,Pe[He++]=Et>>>16&7,Pe[He++]=Et>>>19&7,Pe[He++]=Et>>>22&7,Pe[He++]=Et>>>25&7,Pe[He++]=Et>>>28&7,Pe[He++]=7&(Et>>>31|(3&Qt)<<1),Pe[He++]=Qt>>>2&7,Pe[He++]=Qt>>>5&7,Pe[He++]=Qt>>>8&7,Pe[He++]=Qt>>>11&7,Pe[He++]=Qt>>>14&7,Pe[He++]=Qt>>>17&7,Pe[He++]=Qt>>>20&7,Pe[He++]=Qt>>>23&7,Pe[He++]=Qt>>>26&7,Pe[He]=Qt>>>29&7}(R,d,L,W);case 4:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0;Pe[He++]=bt>>>0&15,Pe[He++]=bt>>>4&15,Pe[He++]=bt>>>8&15,Pe[He++]=bt>>>12&15,Pe[He++]=bt>>>16&15,Pe[He++]=bt>>>20&15,Pe[He++]=bt>>>24&15,Pe[He++]=bt>>>28&15,Pe[He++]=Et>>>0&15,Pe[He++]=Et>>>4&15,Pe[He++]=Et>>>8&15,Pe[He++]=Et>>>12&15,Pe[He++]=Et>>>16&15,Pe[He++]=Et>>>20&15,Pe[He++]=Et>>>24&15,Pe[He++]=Et>>>28&15,Pe[He++]=Qt>>>0&15,Pe[He++]=Qt>>>4&15,Pe[He++]=Qt>>>8&15,Pe[He++]=Qt>>>12&15,Pe[He++]=Qt>>>16&15,Pe[He++]=Qt>>>20&15,Pe[He++]=Qt>>>24&15,Pe[He++]=Qt>>>28&15,Pe[He++]=er>>>0&15,Pe[He++]=er>>>4&15,Pe[He++]=er>>>8&15,Pe[He++]=er>>>12&15,Pe[He++]=er>>>16&15,Pe[He++]=er>>>20&15,Pe[He++]=er>>>24&15,Pe[He]=er>>>28&15}(R,d,L,W);case 5:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0;Pe[He++]=bt>>>0&31,Pe[He++]=bt>>>5&31,Pe[He++]=bt>>>10&31,Pe[He++]=bt>>>15&31,Pe[He++]=bt>>>20&31,Pe[He++]=bt>>>25&31,Pe[He++]=31&(bt>>>30|(7&Et)<<2),Pe[He++]=Et>>>3&31,Pe[He++]=Et>>>8&31,Pe[He++]=Et>>>13&31,Pe[He++]=Et>>>18&31,Pe[He++]=Et>>>23&31,Pe[He++]=31&(Et>>>28|(1&Qt)<<4),Pe[He++]=Qt>>>1&31,Pe[He++]=Qt>>>6&31,Pe[He++]=Qt>>>11&31,Pe[He++]=Qt>>>16&31,Pe[He++]=Qt>>>21&31,Pe[He++]=Qt>>>26&31,Pe[He++]=31&(Qt>>>31|(15&er)<<1),Pe[He++]=er>>>4&31,Pe[He++]=er>>>9&31,Pe[He++]=er>>>14&31,Pe[He++]=er>>>19&31,Pe[He++]=er>>>24&31,Pe[He++]=31&(er>>>29|(3&br)<<3),Pe[He++]=br>>>2&31,Pe[He++]=br>>>7&31,Pe[He++]=br>>>12&31,Pe[He++]=br>>>17&31,Pe[He++]=br>>>22&31,Pe[He]=br>>>27&31}(R,d,L,W);case 6:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0;Pe[He++]=bt>>>0&63,Pe[He++]=bt>>>6&63,Pe[He++]=bt>>>12&63,Pe[He++]=bt>>>18&63,Pe[He++]=bt>>>24&63,Pe[He++]=63&(bt>>>30|(15&Et)<<2),Pe[He++]=Et>>>4&63,Pe[He++]=Et>>>10&63,Pe[He++]=Et>>>16&63,Pe[He++]=Et>>>22&63,Pe[He++]=63&(Et>>>28|(3&Qt)<<4),Pe[He++]=Qt>>>2&63,Pe[He++]=Qt>>>8&63,Pe[He++]=Qt>>>14&63,Pe[He++]=Qt>>>20&63,Pe[He++]=Qt>>>26&63,Pe[He++]=er>>>0&63,Pe[He++]=er>>>6&63,Pe[He++]=er>>>12&63,Pe[He++]=er>>>18&63,Pe[He++]=er>>>24&63,Pe[He++]=63&(er>>>30|(15&br)<<2),Pe[He++]=br>>>4&63,Pe[He++]=br>>>10&63,Pe[He++]=br>>>16&63,Pe[He++]=br>>>22&63,Pe[He++]=63&(br>>>28|(3&sr)<<4),Pe[He++]=sr>>>2&63,Pe[He++]=sr>>>8&63,Pe[He++]=sr>>>14&63,Pe[He++]=sr>>>20&63,Pe[He]=sr>>>26&63}(R,d,L,W);case 7:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0;Pe[He++]=bt>>>0&127,Pe[He++]=bt>>>7&127,Pe[He++]=bt>>>14&127,Pe[He++]=bt>>>21&127,Pe[He++]=127&(bt>>>28|(7&Et)<<4),Pe[He++]=Et>>>3&127,Pe[He++]=Et>>>10&127,Pe[He++]=Et>>>17&127,Pe[He++]=Et>>>24&127,Pe[He++]=127&(Et>>>31|(63&Qt)<<1),Pe[He++]=Qt>>>6&127,Pe[He++]=Qt>>>13&127,Pe[He++]=Qt>>>20&127,Pe[He++]=127&(Qt>>>27|(3&er)<<5),Pe[He++]=er>>>2&127,Pe[He++]=er>>>9&127,Pe[He++]=er>>>16&127,Pe[He++]=er>>>23&127,Pe[He++]=127&(er>>>30|(31&br)<<2),Pe[He++]=br>>>5&127,Pe[He++]=br>>>12&127,Pe[He++]=br>>>19&127,Pe[He++]=127&(br>>>26|(1&sr)<<6),Pe[He++]=sr>>>1&127,Pe[He++]=sr>>>8&127,Pe[He++]=sr>>>15&127,Pe[He++]=sr>>>22&127,Pe[He++]=127&(sr>>>29|(15&Mr)<<3),Pe[He++]=Mr>>>4&127,Pe[He++]=Mr>>>11&127,Pe[He++]=Mr>>>18&127,Pe[He]=Mr>>>25&127}(R,d,L,W);case 8:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0;Pe[He++]=bt>>>0&255,Pe[He++]=bt>>>8&255,Pe[He++]=bt>>>16&255,Pe[He++]=bt>>>24&255,Pe[He++]=Et>>>0&255,Pe[He++]=Et>>>8&255,Pe[He++]=Et>>>16&255,Pe[He++]=Et>>>24&255,Pe[He++]=Qt>>>0&255,Pe[He++]=Qt>>>8&255,Pe[He++]=Qt>>>16&255,Pe[He++]=Qt>>>24&255,Pe[He++]=er>>>0&255,Pe[He++]=er>>>8&255,Pe[He++]=er>>>16&255,Pe[He++]=er>>>24&255,Pe[He++]=br>>>0&255,Pe[He++]=br>>>8&255,Pe[He++]=br>>>16&255,Pe[He++]=br>>>24&255,Pe[He++]=sr>>>0&255,Pe[He++]=sr>>>8&255,Pe[He++]=sr>>>16&255,Pe[He++]=sr>>>24&255,Pe[He++]=Mr>>>0&255,Pe[He++]=Mr>>>8&255,Pe[He++]=Mr>>>16&255,Pe[He++]=Mr>>>24&255,Pe[He++]=qr>>>0&255,Pe[He++]=qr>>>8&255,Pe[He++]=qr>>>16&255,Pe[He]=qr>>>24&255}(R,d,L,W);case 9:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0;Pe[He++]=bt>>>0&511,Pe[He++]=bt>>>9&511,Pe[He++]=bt>>>18&511,Pe[He++]=511&(bt>>>27|(15&Et)<<5),Pe[He++]=Et>>>4&511,Pe[He++]=Et>>>13&511,Pe[He++]=Et>>>22&511,Pe[He++]=511&(Et>>>31|(255&Qt)<<1),Pe[He++]=Qt>>>8&511,Pe[He++]=Qt>>>17&511,Pe[He++]=511&(Qt>>>26|(7&er)<<6),Pe[He++]=er>>>3&511,Pe[He++]=er>>>12&511,Pe[He++]=er>>>21&511,Pe[He++]=511&(er>>>30|(127&br)<<2),Pe[He++]=br>>>7&511,Pe[He++]=br>>>16&511,Pe[He++]=511&(br>>>25|(3&sr)<<7),Pe[He++]=sr>>>2&511,Pe[He++]=sr>>>11&511,Pe[He++]=sr>>>20&511,Pe[He++]=511&(sr>>>29|(63&Mr)<<3),Pe[He++]=Mr>>>6&511,Pe[He++]=Mr>>>15&511,Pe[He++]=511&(Mr>>>24|(1&qr)<<8),Pe[He++]=qr>>>1&511,Pe[He++]=qr>>>10&511,Pe[He++]=qr>>>19&511,Pe[He++]=511&(qr>>>28|(31&$r)<<4),Pe[He++]=$r>>>5&511,Pe[He++]=$r>>>14&511,Pe[He]=$r>>>23&511}(R,d,L,W);case 10:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0;Pe[He++]=bt>>>0&1023,Pe[He++]=bt>>>10&1023,Pe[He++]=bt>>>20&1023,Pe[He++]=1023&(bt>>>30|(255&Et)<<2),Pe[He++]=Et>>>8&1023,Pe[He++]=Et>>>18&1023,Pe[He++]=1023&(Et>>>28|(63&Qt)<<4),Pe[He++]=Qt>>>6&1023,Pe[He++]=Qt>>>16&1023,Pe[He++]=1023&(Qt>>>26|(15&er)<<6),Pe[He++]=er>>>4&1023,Pe[He++]=er>>>14&1023,Pe[He++]=1023&(er>>>24|(3&br)<<8),Pe[He++]=br>>>2&1023,Pe[He++]=br>>>12&1023,Pe[He++]=br>>>22&1023,Pe[He++]=sr>>>0&1023,Pe[He++]=sr>>>10&1023,Pe[He++]=sr>>>20&1023,Pe[He++]=1023&(sr>>>30|(255&Mr)<<2),Pe[He++]=Mr>>>8&1023,Pe[He++]=Mr>>>18&1023,Pe[He++]=1023&(Mr>>>28|(63&qr)<<4),Pe[He++]=qr>>>6&1023,Pe[He++]=qr>>>16&1023,Pe[He++]=1023&(qr>>>26|(15&$r)<<6),Pe[He++]=$r>>>4&1023,Pe[He++]=$r>>>14&1023,Pe[He++]=1023&($r>>>24|(3&_a)<<8),Pe[He++]=_a>>>2&1023,Pe[He++]=_a>>>12&1023,Pe[He]=_a>>>22&1023}(R,d,L,W);case 11:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0;Pe[He++]=bt>>>0&2047,Pe[He++]=bt>>>11&2047,Pe[He++]=2047&(bt>>>22|(1&Et)<<10),Pe[He++]=Et>>>1&2047,Pe[He++]=Et>>>12&2047,Pe[He++]=2047&(Et>>>23|(3&Qt)<<9),Pe[He++]=Qt>>>2&2047,Pe[He++]=Qt>>>13&2047,Pe[He++]=2047&(Qt>>>24|(7&er)<<8),Pe[He++]=er>>>3&2047,Pe[He++]=er>>>14&2047,Pe[He++]=2047&(er>>>25|(15&br)<<7),Pe[He++]=br>>>4&2047,Pe[He++]=br>>>15&2047,Pe[He++]=2047&(br>>>26|(31&sr)<<6),Pe[He++]=sr>>>5&2047,Pe[He++]=sr>>>16&2047,Pe[He++]=2047&(sr>>>27|(63&Mr)<<5),Pe[He++]=Mr>>>6&2047,Pe[He++]=Mr>>>17&2047,Pe[He++]=2047&(Mr>>>28|(127&qr)<<4),Pe[He++]=qr>>>7&2047,Pe[He++]=qr>>>18&2047,Pe[He++]=2047&(qr>>>29|(255&$r)<<3),Pe[He++]=$r>>>8&2047,Pe[He++]=$r>>>19&2047,Pe[He++]=2047&($r>>>30|(511&_a)<<2),Pe[He++]=_a>>>9&2047,Pe[He++]=_a>>>20&2047,Pe[He++]=2047&(_a>>>31|(1023&Ca)<<1),Pe[He++]=Ca>>>10&2047,Pe[He]=Ca>>>21&2047}(R,d,L,W);case 12:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0;Pe[He++]=bt>>>0&4095,Pe[He++]=bt>>>12&4095,Pe[He++]=4095&(bt>>>24|(15&Et)<<8),Pe[He++]=Et>>>4&4095,Pe[He++]=Et>>>16&4095,Pe[He++]=4095&(Et>>>28|(255&Qt)<<4),Pe[He++]=Qt>>>8&4095,Pe[He++]=Qt>>>20&4095,Pe[He++]=er>>>0&4095,Pe[He++]=er>>>12&4095,Pe[He++]=4095&(er>>>24|(15&br)<<8),Pe[He++]=br>>>4&4095,Pe[He++]=br>>>16&4095,Pe[He++]=4095&(br>>>28|(255&sr)<<4),Pe[He++]=sr>>>8&4095,Pe[He++]=sr>>>20&4095,Pe[He++]=Mr>>>0&4095,Pe[He++]=Mr>>>12&4095,Pe[He++]=4095&(Mr>>>24|(15&qr)<<8),Pe[He++]=qr>>>4&4095,Pe[He++]=qr>>>16&4095,Pe[He++]=4095&(qr>>>28|(255&$r)<<4),Pe[He++]=$r>>>8&4095,Pe[He++]=$r>>>20&4095,Pe[He++]=_a>>>0&4095,Pe[He++]=_a>>>12&4095,Pe[He++]=4095&(_a>>>24|(15&Ca)<<8),Pe[He++]=Ca>>>4&4095,Pe[He++]=Ca>>>16&4095,Pe[He++]=4095&(Ca>>>28|(255&nn)<<4),Pe[He++]=nn>>>8&4095,Pe[He]=nn>>>20&4095}(R,d,L,W);case 16:return void function(Te,Oe,Pe,it){let He=it,bt=Te[Oe]>>>0,Et=Te[Oe+1]>>>0,Qt=Te[Oe+2]>>>0,er=Te[Oe+3]>>>0,br=Te[Oe+4]>>>0,sr=Te[Oe+5]>>>0,Mr=Te[Oe+6]>>>0,qr=Te[Oe+7]>>>0,$r=Te[Oe+8]>>>0,_a=Te[Oe+9]>>>0,Ca=Te[Oe+10]>>>0,nn=Te[Oe+11]>>>0,qa=Te[Oe+12]>>>0,bn=Te[Oe+13]>>>0,Fn=Te[Oe+14]>>>0,gn=Te[Oe+15]>>>0;Pe[He++]=bt>>>0&65535,Pe[He++]=bt>>>16&65535,Pe[He++]=Et>>>0&65535,Pe[He++]=Et>>>16&65535,Pe[He++]=Qt>>>0&65535,Pe[He++]=Qt>>>16&65535,Pe[He++]=er>>>0&65535,Pe[He++]=er>>>16&65535,Pe[He++]=br>>>0&65535,Pe[He++]=br>>>16&65535,Pe[He++]=sr>>>0&65535,Pe[He++]=sr>>>16&65535,Pe[He++]=Mr>>>0&65535,Pe[He++]=Mr>>>16&65535,Pe[He++]=qr>>>0&65535,Pe[He++]=qr>>>16&65535,Pe[He++]=$r>>>0&65535,Pe[He++]=$r>>>16&65535,Pe[He++]=_a>>>0&65535,Pe[He++]=_a>>>16&65535,Pe[He++]=Ca>>>0&65535,Pe[He++]=Ca>>>16&65535,Pe[He++]=nn>>>0&65535,Pe[He++]=nn>>>16&65535,Pe[He++]=qa>>>0&65535,Pe[He++]=qa>>>16&65535,Pe[He++]=bn>>>0&65535,Pe[He++]=bn>>>16&65535,Pe[He++]=Fn>>>0&65535,Pe[He++]=Fn>>>16&65535,Pe[He++]=gn>>>0&65535,Pe[He]=gn>>>16&65535}(R,d,L,W);case 32:for(let Te=0;Te<32;Te=Te+1|0)L[W+Te|0]=0|R[d+Te|0];return}let ue=B3[te]>>>0,me=d,ge=0,Ce=R[me]>>>0;for(let Te=0;Te<32;Te++)if(ge+te<=32)L[W+Te]=Ce>>>ge&ue,ge+=te,ge===32&&(ge=0,me++,Te!==31&&(Ce=R[me]>>>0));else{let Oe=32-ge,Pe=Ce>>>ge;me++,Ce=R[me]>>>0,L[W+Te]=(Pe|(Ce&B3[te-Oe]>>>0)<=64)throw new Error("Varint too long")}return d.set(te),L}function CY(R,d){let L,W;return W=R[d.get()],d.increment(),L=127&W,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<7,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<14,W<128?L:(W=R[d.get()],d.increment(),L|=(127&W)<<21,W<128?L:(W=R[d.get()],L|=(15&W)<<28,function(te,ue,me){let ge,Ce;if(Ce=ue[me.get()],me.increment(),ge=(112&Ce)>>4,Ce<128||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<3,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<10,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<17,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(127&Ce)<<24,Ce<128)||(Ce=ue[me.get()],me.increment(),ge|=(1&Ce)<<31,Ce<128))return 4294967296*ge+(te>>>0);throw new Error("Expected varint not more than 10 bytes")}(L,R,d)))))}function Js(R){return R>>>1^-(1&R)}function fh(R){return R>>BigInt("1")^-(BigInt("1")&R)}function C0(R){return R%2==1?(R+1)/-2:R/2}function j3(R,d,L){if(L===void 0){L=0;for(let ue=0;ue=4)for(;W=4)for(;W=4)for(let W=R[0];L>4],ge=null;switch(me){case Tf.DATA:ge={dictionaryType:Object.values(fd)[15&ue]};break;case Tf.OFFSET:ge={offsetType:Object.values(kv)[15&ue]};break;case Tf.LENGTH:ge={lengthType:Object.values(Rh)[15&ue]}}te.increment();let Ce=W[te.get()],Te=Object.values(us)[Ce>>5],Oe=Object.values(us)[Ce>>2&7],Pe=Object.values(Tp)[3&Ce];te.increment();let it=Yf(W,te,2),He=it[0];return{physicalStreamType:me,logicalStreamType:ge,logicalLevelTechnique1:Te,logicalLevelTechnique2:Oe,physicalLevelTechnique:Pe,numValues:He,byteLength:it[1],decompressedCount:He}}(R,d);return L.logicalLevelTechnique1===us.MORTON?function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:W.decompressedCount,numBits:me[0],coordinateShift:me[1]}}(L,R,d):us.RLE!==L.logicalLevelTechnique1&&us.RLE!==L.logicalLevelTechnique2||Tp.NONE===L.physicalLevelTechnique?L:function(W,te,ue){let me=Yf(te,ue,2);return{physicalStreamType:W.physicalStreamType,logicalStreamType:W.logicalStreamType,logicalLevelTechnique1:W.logicalLevelTechnique1,logicalLevelTechnique2:W.logicalLevelTechnique2,physicalLevelTechnique:W.physicalLevelTechnique,numValues:W.numValues,byteLength:W.byteLength,decompressedCount:me[1],runs:me[0],numRleValues:me[1]}}(L,R,d)}(function(R){R.PRESENT="PRESENT",R.DATA="DATA",R.OFFSET="OFFSET",R.LENGTH="LENGTH"})(Tf||(Tf={})),function(R){R.NONE="NONE",R.SINGLE="SINGLE",R.SHARED="SHARED",R.VERTEX="VERTEX",R.MORTON="MORTON",R.FSST="FSST"}(fd||(fd={})),function(R){R.VERTEX="VERTEX",R.INDEX="INDEX",R.STRING="STRING",R.KEY="KEY"}(kv||(kv={})),function(R){R.VAR_BINARY="VAR_BINARY",R.GEOMETRIES="GEOMETRIES",R.PARTS="PARTS",R.RINGS="RINGS",R.TRIANGLES="TRIANGLES",R.SYMBOL="SYMBOL",R.DICTIONARY="DICTIONARY"}(Rh||(Rh={})),function(R){R[R.FLAT=0]="FLAT",R[R.CONST=1]="CONST",R[R.SEQUENCE=2]="SEQUENCE",R[R.DICTIONARY=3]="DICTIONARY",R[R.FSST_DICTIONARY=4]="FSST_DICTIONARY"}(Gl||(Gl={}));class hd{constructor(d,L){this.values=d,this._size=L}get(d){let L=Math.floor(d/8);return(this.values[L]>>d%8&1)==1}set(d,L){let W=Math.floor(d/8);this.values[W]=this.values[W]|(L?1:0)<>d%8&1}size(){return this._size}getBuffer(){return this.values}}function L0(R,d,L){if(!d)return R;let W=d.size(),te=new R.constructor(W),ue=0;for(let me=0;me=4)for(;He>>0;for(let it=1;it>>0;return Pe}(me.logicalLevelTechnique2===us.RLE?j3(ue,me.runs,me.numRleValues):ue);break;case us.RLE:Te=j3(ue,me.runs,me.numRleValues);break;case us.MORTON:q3(ue),Te=ue;break;case us.COMPONENTWISE_DELTA:Te=function(Oe){if(Oe.length<2)return new Uint32Array(Oe);let Pe=new Uint32Array(Oe.length);Pe[0]=Js(Oe[0])>>>0,Pe[1]=Js(Oe[1])>>>0;for(let it=2;it>>0,Pe[it+1]=Pe[it-1]+Js(Oe[it+1])>>>0;return Pe}(ue);break;case us.NONE:Te=ue;break;default:throw new Error(`The specified Logical level technique is not supported: ${me.logicalLevelTechnique1}`)}return Ce?L0(Te,Ce,0):Te}(P0(R,d,L),L,0,te)}function Mp(R,d,L){return function(W,te){if(te.logicalLevelTechnique1===us.DELTA&&te.logicalLevelTechnique2===us.NONE)return function(ue){let me=new Int32Array(ue.length+1);me[0]=0,me[1]=Js(ue[0]);let ge=me[1];for(let Ce=2;Ce!==me.length;++Ce)ge+=Js(ue[Ce-1]),me[Ce]=me[Ce-1]+ge;return new Uint32Array(me)}(W);if(te.logicalLevelTechnique1===us.RLE&&te.logicalLevelTechnique2===us.NONE)return function(ue,me,ge){let Ce=new Uint32Array(ge+1);Ce[0]=0;let Te=1,Oe=Ce[0];for(let Pe=0;Pe>>2,Et=function(er,br){if(br<=er.encodedWords.length)return er.encodedWords;let sr=new Uint32Array(Math.max(16,2*br));return er.encodedWords=sr,sr}(it,bt);(function(er,br,sr,Mr){if(br<0||sr<0||br+sr>er.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${br}, byteLength=${sr}, bytes.length=${er.length})`);let qr=Math.floor(sr/4),$r=sr%4!=0,_a=$r?qr+1:qr;if(Mr.length<_a)throw new RangeError(`decodeBigEndianInt32sInto: out.length=${Mr.length} < ${_a}`);if(qr>0){let Ca=er.byteOffset+br;if(3&Ca)for(let nn=0;nn0){let Ca=0|er[Mr];if(Mr=Mr+1|0,255&Ca)throw new Error(`FastPFOR decode: invalid alignedLength=${Ca} (expected multiple of 256)`);if(qr+Ca>$r.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${qr}, alignedLength=${Ca}, out.length=${$r.length})`);Mr=function(nn,qa,bn,Fn,gn,Va){let Hn=Fn+O3(gn,Xd),ni=Fn,Wn=bn;for(;ni!==Hn;){let si=Math.min(N3,Hn-ni);Wn=SY(nn,qa,Wn,ni,si,Va),ni=ni+si|0}return Wn}(er,$r,Mr,qr,Ca,_a),qr=qr+Ca|0}return function(Ca,nn,qa,bn,Fn,gn){if(gn===0)return nn;let Va=0,Hn=nn,ni=nn+qa,Wn=Fn,si=Fn,po=Fn+gn,cs=0,Ds=0;for(;Hn>>Va&255;if(Va+=8,Hn+=Va>>>5,Va&=31,cs|=(127&Xs)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${Ds}, partial=${cs}, decoded=${si-Wn}/${gn}, inPos=${Hn}, inEnd=${ni})`)}if(si!==po)throw new Error(`FastPFOR VByte: truncated stream (decoded=${si-Wn}, expected=${gn}, consumedWords=${Hn-nn}/${qa}, vbyteStart=${nn}, vbyteEnd=${ni})`)}(er,Mr,er.length-Mr|0,$r,qr,br-qr|0),$r}(Et.subarray(0,bt),Te,it.decoderWorkspace);return Pe.add(Oe),Qt}(te,ue,me,ge,function(Ce=16){if(Ce<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${Ce}`);let Te=Math.max(16,0|Ce);return{encodedWords:new Uint32Array(Te),decoderWorkspace:bS()}}(me>>>2))}(R,L.numValues,L.byteLength,d);case Tp.VARINT:return Yf(R,d,L.numValues);case Tp.NONE:{let te=d.get();d.add(L.byteLength);let ue=R.subarray(te,d.get());return new Uint32Array(ue)}default:throw new Error(`Specified physicalLevelTechnique ${W} is not supported (yet).`)}}function G3(R,d,L){let W=P0(R,d,L);return W.length===1?W[0]:function(te){return te[1]}(W)}function SS(R,d,L){return function(W){if(W.length===2){let te=Js(W[1]);return[te,te]}return[Js(W[2]),Js(W[3])]}(P0(R,d,L))}function ES(R,d,L){return function(W){if(W.length===2){let te=fh(W[1]);return[te,te]}return[fh(W[2]),fh(W[3])]}(k0(R,d,L.numValues))}function kS(R,d,L,W){return function(te,ue,me){let ge;switch(ue.logicalLevelTechnique1){case us.DELTA:ge=function(Ce){let Te=new BigUint64Array(Ce.length);Te[0]=BigInt.asUintN(64,fh(Ce[0]));for(let Oe=1;Oe>1,d)-L}}function RS(R,d){let L=0;for(let W=0;W>W;return L}function R0(R,d,L,W,te,ue,me){return R===Ap.MORTON?function(ge,Ce,Te,Oe,Pe,it){let He=new Array(Pe?Oe+1:Oe);for(let bt=0;bt[qr]),W+=sr,te+=sr}break;case Ic.LINESTRING:{let sr,Mr;Qt?(sr=He[te]-He[te-1],te++):sr=it[W]-it[W-1],W++,Et?(Mr=I0(er,ge,sr,!1),ge+=2*sr):(Mr=R0(d.vertexBufferType,er,bt,Ce,sr,!1,Te),Ce+=sr),L[me++]=[Mr],Pe&&ue++}break;case Ic.POLYGON:{let sr=it[W]-it[W-1];W++;let Mr=new Array(sr-1),qr,$r=He[te]-He[te-1];if(te++,Et){qr=I0(er,ge,$r,!0),ge+=2*$r;for(let _a=0;_a0&&Et.push(Et[0]),it.push(Et)}d[Oe]=it,ue&&Te++}break;case Ic.MULTIPOLYGON:{let Pe=ue[Te]-ue[Te-1];Te++;let it=[];for(let He=0;He0&&er.push(er[0]),it.push(er)}}d[Oe]=it}}return d}[Symbol.iterator](){return null}}function BS(R,d,L,W,te,ue){return new LY(R,d,L,W,te,ue)}class LY extends zS{constructor(d,L,W,te,ue,me){super(W,te,ue,me),this._numGeometries=d,this._geometryType=L}geometryType(d){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function OS(R,d,L,W,te){return new PY(R,d,L,W,te)}class PY extends zS{constructor(d,L,W,te,ue){super(L,W,te,ue),this._geometryTypes=d}geometryType(d){return this._geometryTypes[d]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function RY(R,d,L,W,te){let ue=hh(R,L),me,ge,Ce,Te;if(My(ue,W,R,L)===Gl.CONST){let br=G3(R,L,ue),sr,Mr,qr,$r;for(let _a=0;_aL?d[ue++]:1);return W}function NS(R,d,L,W){let te=new Uint32Array(d[d.length-1]+1),ue=0;te[0]=ue;let me=1,ge=0;for(let Ce=0;Ce=it);){let He=me[Te.increment()];if(He<=127){let bt=He+3,Et=me[Te.increment()],Qt=Math.min(Pe+bt,ge);Oe.fill(Et,Pe,Qt),Pe=Qt}else{let bt=256-He;for(let Et=0;Et=12?FY.decode(R.subarray(d,L)):function(W,te,ue){let me="",ge=te;for(;ge239?4:Ce>223?3:Ce>191?2:1;if(ge+He>ue)break;He===1?Ce<128&&(it=Ce):He===2?(Te=W[ge+1],(192&Te)==128&&(it=(31&Ce)<<6|63&Te,it<=127&&(it=null))):He===3?(Te=W[ge+1],Oe=W[ge+2],(192&Te)==128&&(192&Oe)==128&&(it=(15&Ce)<<12|(63&Te)<<6|63&Oe,(it<=2047||it>=55296&&it<=57343)&&(it=null))):He===4&&(Te=W[ge+1],Oe=W[ge+2],Pe=W[ge+3],(192&Te)==128&&(192&Oe)==128&&(192&Pe)==128&&(it=(15&Ce)<<18|(63&Te)<<12|(63&Oe)<<6|63&Pe,(it<=65535||it>=1114112)&&(it=null))),it===null?(it=65533,He=1):it>65535&&(it-=65536,me+=String.fromCharCode(it>>>10&1023|55296),it=56320|1023&it),me+=String.fromCharCode(it),ge+=He}return me}(R,d,L)}class X3 extends E0{constructor(d,L,W,te){super(d,W,te),this.offsetBuffer=L}}class US extends X3{constructor(d,L,W,te){super(d,L,W,te??L.length-1)}getValueFromBuffer(d){return Y3(this.dataBuffer,this.offsetBuffer[d],this.offsetBuffer[d+1])}}class D0 extends X3{constructor(d,L,W,te,ue){super(d,W,te,ue??L.length),this.indexBuffer=L,this.indexBuffer=L}getValueFromBuffer(d){let L=this.indexBuffer[d];return Y3(this.dataBuffer,this.offsetBuffer[L],this.offsetBuffer[L+1])}}class qS extends X3{constructor(d,L,W,te,ue,me,ge){super(d,W,te,ge),this.indexBuffer=L,this.symbolOffsetBuffer=ue,this.symbolTableBuffer=me}getValueFromBuffer(d){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=function(W,te,ue){let me=[],ge=new Array(te.length).fill(0);for(let Ce=1;Ce=10}function HS(R){return R===30}function BY(R){if(R.type==="scalarType"){let d=R.scalarType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(d.type==="logicalType")return!1}else if(R.type==="complexType"){let d=R.complexType;if(d.type==="physicalType")switch(d.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",R),!1}function OY(R){var d;return R.type==="complexType"&&((d=R.complexType)==null?void 0:d.type)==="physicalType"&&R.complexType.physicalType===0}let NY=new TextDecoder;function Z3(R,d){let L=Yf(R,d,1)[0];if(L===0)return"";let W=d.get(),te=R.subarray(W,W+L);return d.add(L),NY.decode(te)}function WS(R,d){let L=Yf(R,d,1)[0]>>>0;if(L<10||L>30)throw new Error(`Unsupported field type code ${L}. Supported: 10-29(scalars), 30(STRUCT)`);let W=VS(L);if(GS(L)&&(W.name=Z3(R,d)),HS(L)){let te=Yf(R,d,1)[0]>>>0;W.complexType.children=new Array(te);for(let ue=0;ue>>0,W=VS(L);if(!W)throw new Error(`Unsupported column type code ${L}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(GS(L)?W.name=Z3(R,d):L>=0&&L<=3?W.name="id":L===4&&(W.name="geometry"),HS(L)){let te=Yf(R,d,1)[0]>>>0,ue=W.complexType;ue.children=new Array(te);for(let me=0;me>>0,ue=Yf(R,d,1)[0]>>>0;W.columns=new Array(ue);for(let me=0;me=4)for(;qr>>0,Pe=ge.get()+Oe;if(Pe>W.length)throw new Error(`Block overruns tile: ${Pe} > ${W.length}`);if(Yf(W,ge,1)[0]>>>0!=1){ge.set(Pe);continue}let[it,He]=UY(W,ge),bt=it.featureTables[0],Et=null,Qt=null,er=[],br=0;for(let Mr of bt.columns){let qr=Mr.name;if((Te=Mr).type==="scalarType"&&((me=Te.scalarType)==null?void 0:me.type)==="logicalType"&&Te.scalarType.logicalType===0){let $r=null;if(Mr.nullable){let Ca=hh(W,ge),nn=ge.get(),qa=Dg(W,Ca.numValues,Ca.byteLength,ge);ge.set(nn+Ca.byteLength),$r=new hd(qa,Ca.numValues)}let _a=hh(W,ge);br=$r?$r.size():_a.decompressedCount,Et=qY(W,Mr,ge,qr,_a,$r??br,ue)}else if(OY(Mr)){let $r=Yf(W,ge,1)[0];if(br===0){let _a=ge.get();br=hh(W,ge).decompressedCount,ge.set(_a)}Qt=RY(W,$r,ge,br)}else{let $r=BY(Mr)?Yf(W,ge,1)[0]:1;if($r===0)continue;let _a=zY(W,ge,Mr,$r,br);if(_a)if(Array.isArray(_a))for(let Ca of _a)er.push(Ca);else er.push(_a)}}let sr=new xY(bt.name,Qt,Et,er,He);Ce.push(sr),ge.set(Pe)}var Te;return Ce}(new Uint8Array(d));this.layers=L.reduce((W,te)=>Object.assign(Object.assign({},W),{[te.name]:new GY(te)}),{})}}class HY{constructor(d,L){this.feature=d,this.type=d.type,this.properties=d.tags?d.tags:{},this.extent=L,"id"in d&&(typeof d.id=="string"?this.id=parseInt(d.id,10):typeof d.id!="number"||isNaN(d.id)||(this.id=d.id))}loadGeometry(){let d=[],L=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let W of L){let te=[];for(let ue of W)te.push(new t(ue[0],ue[1]));d.push(te)}return d}}let zg="_geojsonTileLayer";function WY(R,d,L=""){d.writeVarintField(15,R.version||1),d.writeStringField(1,R.name||""),d.writeVarintField(5,R.extent||4096);let W={jsonPrefix:L,keys:[],values:[],keycache:{},valuecache:{}};for(let me=0;me>31}function ZY(R,d){let L=R.loadGeometry(),W=R.type,te=0,ue=0;for(let me of L){let ge=1;W===1&&(ge=me.length),d.writeVarint($3(1,ge));let Ce=W===3?me.length-1:me.length;for(let Te=0;Te=0&&Oe[3]>=0&&Ce.insert(ge,Oe[0],Oe[1],Oe[2],Oe[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new w4(new _y(this.rawTileData)).layers:new YS(this.rawTileData).layers,this.sourceLayerCoder=new gS(this.vtLayers?Object.keys(this.vtLayers).sort():[zg])),this.vtLayers}query(d,L,W,te){this.loadVTLayers();let ue=d.params,me=F/d.tileSize/d.scale,ge=Na(ue.filter,ue.globalState),Ce=d.queryGeometry,Te=d.queryPadding*me,Oe=Ev.fromPoints(Ce),Pe=this.grid.query(Oe.minX-Te,Oe.minY-Te,Oe.maxX+Te,Oe.maxY+Te),it=Ev.fromPoints(d.cameraQueryGeometry).expandBy(Te),He=this.grid3D.query(it.minX,it.minY,it.maxX,it.maxY,(Qt,er,br,sr)=>function(Mr,qr,$r,_a,Ca){for(let qa of Mr)if(qr<=qa.x&&$r<=qa.y&&_a>=qa.x&&Ca>=qa.y)return!0;let nn=[new t(qr,$r),new t(qr,Ca),new t(_a,Ca),new t(_a,$r)];if(Mr.length>2){for(let qa of nn)if(Wa(Mr,qa))return!0}for(let qa=0;qa(br||(br=ql(sr)),Mr.queryIntersectsFeature({queryGeometry:Ce,feature:sr,featureState:qr,geometry:br,zoom:this.z,transform:d.transform,pixelsToTileUnits:me,pixelPosMatrix:d.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:d.getElevation})))}return bt}loadMatchingFeature(d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=this.bucketLayerIDs[L];if(me&&!it.some(Qt=>me.has(Qt)))return;let He=this.sourceLayerCoder.decode(W),bt=this.vtLayers[He].feature(te);if(ue.needGeometry){let Qt=fo(bt,!0);if(!ue.filter(new oi(this.tileID.overscaledZ),Qt,this.tileID.canonical))return}else if(!ue.filter(new oi(this.tileID.overscaledZ),bt))return;let Et=this.getId(bt,He);for(let Qt of it){if(me&&!me.has(Qt))continue;let er=Ce[Qt];if(!er)continue;let br={};Et&&Oe&&(br=Oe.getState(er.sourceLayer||zg,Et));let sr=X({},Te[Qt]);sr.paint=$S(sr.paint,er.paint,bt,br,ge),sr.layout=$S(sr.layout,er.layout,bt,br,ge);let Mr=!Pe||Pe(bt,er,br);if(!Mr)continue;let qr=new yS(bt,this.z,this.x,this.y,Et);qr.layer=sr;let $r=d[Qt];$r===void 0&&($r=d[Qt]=[]),$r.push({featureIndex:te,feature:qr,intersectionZ:Mr})}}lookupSymbolFeatures(d,L,W,te,ue,me,ge,Ce){let Te={};this.loadVTLayers();let Oe=Na(ue.filterSpec,ue.globalState);for(let Pe of d)this.loadMatchingFeature(Te,W,te,Pe,Oe,me,ge,Ce,L);return Te}hasLayer(d){for(let L of this.bucketLayerIDs)for(let W of L)if(d===W)return!0;return!1}getId(d,L){var W;let te=d.id;return this.promoteId&&(te=d.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[L]],typeof te=="boolean"&&(te=Number(te)),te===void 0&&(!((W=d.properties)===null||W===void 0)&&W.cluster)&&this.promoteId&&(te=Number(d.properties.cluster_id))),te}}function $S(R,d,L,W,te){return H(R,(ue,me)=>{let ge=d instanceof Cu?d.get(me):null;return ge?.evaluate?ge.evaluate(L,W,te):ge})}function KY(R,d){return d-R}function KS(R,d,L,W,te){let ue=[];for(let me of R){let ge;for(let Ce=0;Ce=W&&Oe.x>=W||(Te.x>=W?Te=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round():Oe.x>=W&&(Oe=new t(W,Te.y+(W-Te.x)/(Oe.x-Te.x)*(Oe.y-Te.y))._round()),Te.y>=te&&Oe.y>=te||(Te.y>=te?Te=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round():Oe.y>=te&&(Oe=new t(Te.x+(te-Te.y)/(Oe.y-Te.y)*(Oe.x-Te.x),te)._round()),ge&&Te.equals(ge[ge.length-1])||(ge=[Te],ue.push(ge)),ge.push(Oe)))))}}return ue}function JS(R,d,L,W,te){switch(d){case 1:return function(ue,me,ge,Ce){let Te=[];for(let Oe of ue)for(let Pe of Oe){let it=Ce===0?Pe.x:Pe.y;it>=me&&it<=ge&&Te.push([Pe])}return Te}(R,L,W,te);case 2:return QS(R,L,W,te,!1);case 3:return QS(R,L,W,te,!0)}return[]}function JY(R,d,L,W,te){let ue=W===0?QY:eX,me=[],ge=[];for(let Oe=0;Oed&&me.push(ue(Pe,it,d)):He>L?bt=d&&(me.push(ue(Pe,it,d)),Et=!0),bt>L&&He<=L&&(me.push(ue(Pe,it,L)),Et=!0),!te&&Et&&(ge.push(me),me=[])}let Ce=R.length-1,Te=W===0?R[Ce].x:R[Ce].y;return Te>=d&&Te<=L&&me.push(R[Ce]),te&&me.length>0&&!me[0].equals(me[me.length-1])&&me.push(new t(me[0].x,me[0].y)),me.length>0&&ge.push(me),ge}function QS(R,d,L,W,te){let ue=[];for(let me of R){let ge=JY(me,d,L,W,te);ge.length>0&&ue.push(...ge)}return ue}function QY(R,d,L){return new t(L,R.y+(L-R.x)/(d.x-R.x)*(d.y-R.y))}function eX(R,d,L){return new t(R.x+(L-R.y)/(d.y-R.y)*(d.x-R.x),L)}fi("FeatureIndex",ZS,{omit:["rawTileData","sourceLayerCoder"]});class Sp extends t{constructor(d,L,W,te){super(d,L),this.angle=W,te!==void 0&&(this.segment=te)}clone(){return new Sp(this.x,this.y,this.angle,this.segment)}}function eE(R,d,L,W,te){if(d.segment===void 0||L===0)return!0;let ue=d,me=d.segment+1,ge=0;for(;ge>-L/2;){if(me--,me<0)return!1;ge-=R[me].dist(ue),ue=R[me]}ge+=R[me].dist(R[me+1]),me++;let Ce=[],Te=0;for(;geW;)Te-=Ce.shift().angleDelta;if(Te>te)return!1;me++,ge+=Oe.dist(Pe)}return!0}function tE(R){let d=0;for(let L=0;LTe){let bt=(Te-Ce)/He,Et=bs.number(Pe.x,it.x,bt),Qt=bs.number(Pe.y,it.y,bt),er=new Sp(Et,Qt,it.angleTo(Pe),Oe);return er._round(),!me||eE(R,er,ge,me,d)?er:void 0}Ce+=He}}function rX(R,d,L,W,te,ue,me,ge,Ce){let Te=rE(W,ue,me),Oe=aE(W,te),Pe=Oe*me,it=R[0].x===0||R[0].x===Ce||R[0].y===0||R[0].y===Ce;return d-Pe=0&&Mr=0&&qr=0&&it+Te<=Oe){let $r=new Sp(Mr,qr,br,bt);$r._round(),W&&!eE(R,$r,ue,W,te)||He.push($r)}}Pe+=er}return ge||He.length||me||(He=nE(R,Pe/2,L,W,te,ue,me,!0,Ce)),He}function iE(R,d,L,W){let te=[],ue=R.image,me=ue.pixelRatio,ge=ue.paddedRect.w-2,Ce=ue.paddedRect.h-2,Te={x1:R.left,y1:R.top,x2:R.right,y2:R.bottom},Oe=ue.stretchX||[[0,ge]],Pe=ue.stretchY||[[0,Ce]],it=(Va,Hn)=>Va+Hn[1]-Hn[0],He=Oe.reduce(it,0),bt=Pe.reduce(it,0),Et=ge-He,Qt=Ce-bt,er=0,br=He,sr=0,Mr=bt,qr=0,$r=Et,_a=0,Ca=Qt;if(ue.content&&W){let Va=ue.content,Hn=Va[2]-Va[0],ni=Va[3]-Va[1];(ue.textFitWidth||ue.textFitHeight)&&(Te=tS(R)),er=Sy(Oe,0,Va[0]),sr=Sy(Pe,0,Va[1]),br=Sy(Oe,Va[0],Va[2]),Mr=Sy(Pe,Va[1],Va[3]),qr=Va[0]-er,_a=Va[1]-sr,$r=Hn-br,Ca=ni-Mr}let nn=Te.x1,qa=Te.y1,bn=Te.x2-nn,Fn=Te.y2-qa,gn=(Va,Hn,ni,Wn)=>{let si=Ey(Va.stretch-er,br,bn,nn),po=ky(Va.fixed-qr,$r,Va.stretch,He),cs=Ey(Hn.stretch-sr,Mr,Fn,qa),Ds=ky(Hn.fixed-_a,Ca,Hn.stretch,bt),Xs=Ey(ni.stretch-er,br,bn,nn),Mf=ky(ni.fixed-qr,$r,ni.stretch,He),vu=Ey(Wn.stretch-sr,Mr,Fn,qa),yc=ky(Wn.fixed-_a,Ca,Wn.stretch,bt),Dc=new t(si,cs),Hl=new t(Xs,cs),rf=new t(Xs,vu),Xf=new t(si,vu),Zf=new t(po/me,Ds/me),Th=new t(Mf/me,yc/me),Sf=d*Math.PI/180;if(Sf){let Fc=Math.sin(Sf),nu=Math.cos(Sf),lc=[nu,-Fc,Fc,nu];Dc._matMult(lc),Hl._matMult(lc),Xf._matMult(lc),rf._matMult(lc)}let Ah=Va.stretch+Va.fixed,Hh=Hn.stretch+Hn.fixed;return{tl:Dc,tr:Hl,bl:Xf,br:rf,tex:{x:ue.paddedRect.x+1+Ah,y:ue.paddedRect.y+1+Hh,w:ni.stretch+ni.fixed-Ah,h:Wn.stretch+Wn.fixed-Hh},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Zf,pixelOffsetBR:Th,minFontScaleX:$r/me/bn,minFontScaleY:Ca/me/Fn,isSDF:L}};if(W&&(ue.stretchX||ue.stretchY)){let Va=oE(Oe,Et,He),Hn=oE(Pe,Qt,bt);for(let ni=0;ni0&&(Et=Math.max(10,Et),this.circleDiameter=Et)}else{let it=!((Pe=me.image)===null||Pe===void 0)&&Pe.content&&(me.image.textFitWidth||me.image.textFitHeight)?tS(me):{x1:me.left,y1:me.top,x2:me.right,y2:me.bottom};it.y1=it.y1*ge-Ce[0],it.y2=it.y2*ge+Ce[2],it.x1=it.x1*ge-Ce[3],it.x2=it.x2*ge+Ce[1];let He=me.collisionPadding;if(He&&(it.x1-=He[0]*ge,it.y1-=He[1]*ge,it.x2+=He[2]*ge,it.y2+=He[3]*ge),Oe){let bt=new t(it.x1,it.y1),Et=new t(it.x2,it.y1),Qt=new t(it.x1,it.y2),er=new t(it.x2,it.y2),br=Oe*Math.PI/180;bt._rotate(br),Et._rotate(br),Qt._rotate(br),er._rotate(br),it.x1=Math.min(bt.x,Et.x,Qt.x,er.x),it.x2=Math.max(bt.x,Et.x,Qt.x,er.x),it.y1=Math.min(bt.y,Et.y,Qt.y,er.y),it.y2=Math.max(bt.y,Et.y,Qt.y,er.y)}d.emplaceBack(L.x,L.y,it.x1,it.y1,it.x2,it.y2,W,te,ue)}this.boxEndIndex=d.length}}class aX{constructor(d=[],L=(W,te)=>Wte?1:0){if(this.data=d,this.length=this.data.length,this.compare=L,this.length>0)for(let W=(this.length>>1)-1;W>=0;W--)this._down(W)}push(d){this.data.push(d),this._up(this.length++)}pop(){if(this.length===0)return;let d=this.data[0],L=this.data.pop();return--this.length>0&&(this.data[0]=L,this._down(0)),d}peek(){return this.data[0]}_up(d){let{data:L,compare:W}=this,te=L[d];for(;d>0;){let ue=d-1>>1,me=L[ue];if(W(te,me)>=0)break;L[d]=me,d=ue}L[d]=te}_down(d){let{data:L,compare:W}=this,te=this.length>>1,ue=L[d];for(;d=0)break;L[d]=L[me],d=me}L[d]=ue}}function nX(R,d=1){let L=Ev.fromPoints(R[0]),W=Math.min(L.width(),L.height()),te=W/2,ue=new aX([],iX),{minX:me,minY:ge,maxX:Ce,maxY:Te}=L;if(W===0)return new t(me,ge);for(let it=me;itPe.d||!Pe.d)&&(Pe=it),it.max-Pe.d<=d||(te=it.h/2,ue.push(new F0(it.p.x-te,it.p.y-te,te,R)),ue.push(new F0(it.p.x+te,it.p.y-te,te,R)),ue.push(new F0(it.p.x-te,it.p.y+te,te,R)),ue.push(new F0(it.p.x+te,it.p.y+te,te,R)))}return Oe.d>0&&Pe.d-Oe.d<=d?Oe.p:Pe.p}function iX(R,d){return d.max-R.max}class F0{constructor(d,L,W,te){this.p=new t(d,L),this.h=W,this.d=function(ue,me){let ge=!1,Ce=1/0;for(let Te of me)for(let Oe=0,Pe=Te.length,it=Pe-1;Oeue.y!=bt.y>ue.y&&ue.x<(bt.x-He.x)*(ue.y-He.y)/(bt.y-He.y)+He.x&&(ge=!ge),Ce=Math.min(Ce,na(ue,He,bt))}return(ge?1:-1)*Math.sqrt(Ce)}(this.p,te),this.max=this.d+this.h*Math.SQRT2}}var Af;l.aM=void 0,(Af=l.aM||(l.aM={}))[Af.center=1]="center",Af[Af.left=2]="left",Af[Af.right=3]="right",Af[Af.top=4]="top",Af[Af.bottom=5]="bottom",Af[Af["top-left"]=6]="top-left",Af[Af["top-right"]=7]="top-right",Af[Af["bottom-left"]=8]="bottom-left",Af[Af["bottom-right"]=9]="bottom-right";let K3=Number.POSITIVE_INFINITY;function sE(R,d){return d[1]!==K3?function(L,W,te){let ue=0,me=0;switch(W=Math.abs(W),te=Math.abs(te),L){case"top-right":case"top-left":case"top":me=te-7;break;case"bottom-right":case"bottom-left":case"bottom":me=7-te}switch(L){case"top-right":case"bottom-right":case"right":ue=-W;break;case"top-left":case"bottom-left":case"left":ue=W}return[ue,me]}(R,d[0],d[1]):function(L,W){let te=0,ue=0;W<0&&(W=0);let me=W/Math.SQRT2;switch(L){case"top-right":case"top-left":ue=me-7;break;case"bottom-right":case"bottom-left":ue=7-me;break;case"bottom":ue=7-W;break;case"top":ue=W-7}switch(L){case"top-right":case"bottom-right":te=-me;break;case"top-left":case"bottom-left":te=me;break;case"left":te=W;break;case"right":te=-W}return[te,ue]}(R,d[0])}function lE(R,d,L){var W;let te=R.layout,ue=(W=te.get("text-variable-anchor-offset"))===null||W===void 0?void 0:W.evaluate(d,{},L);if(ue){let ge=ue.values,Ce=[];for(let Te=0;Teit*Rc);Oe.startsWith("top")?Pe[1]-=7:Oe.startsWith("bottom")&&(Pe[1]+=7),Ce[Te+1]=Pe}return new gi(Ce)}let me=te.get("text-variable-anchor");if(me){let ge;ge=R._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[te.get("text-radial-offset").evaluate(d,{},L)*Rc,K3]:te.get("text-offset").evaluate(d,{},L).map(Te=>Te*Rc);let Ce=[];for(let Te of me)Ce.push(Te,sE(Te,ge));return new gi(Ce)}return null}function J3(R){switch(R){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function oX(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe){let it=ue.textMaxSize.evaluate(d,{});it===void 0&&(it=me);let He=R.layers[0].layout,bt=He.get("icon-offset").evaluate(d,{},Oe),Et=cE(L.horizontal),Qt=me/24,er=R.tilePixelRatio*Qt,br=R.tilePixelRatio*it/24,sr=R.tilePixelRatio*ge,Mr=R.tilePixelRatio*He.get("symbol-spacing"),qr=He.get("text-padding")*R.tilePixelRatio,$r=function(ni,Wn,si,po=1){let cs=ni.get("icon-padding").evaluate(Wn,{},si),Ds=cs?.values;return[Ds[0]*po,Ds[1]*po,Ds[2]*po,Ds[3]*po]}(He,d,Oe,R.tilePixelRatio),_a=He.get("text-max-angle")/180*Math.PI,Ca=He.get("text-rotation-alignment")!=="viewport"&&He.get("symbol-placement")!=="point",nn=He.get("icon-rotation-alignment")==="map"&&He.get("symbol-placement")!=="point",qa=He.get("symbol-placement"),bn=Mr/2,Fn=He.get("icon-text-fit"),gn;W&&Fn!=="none"&&(R.allowVerticalPlacement&&L.vertical&&(gn=rS(W,L.vertical,Fn,He.get("icon-text-fit-padding"),bt,Qt)),Et&&(W=rS(W,Et,Fn,He.get("icon-text-fit-padding"),bt,Qt)));let Va=Oe?Pe.line.getGranularityForZoomLevel(Oe.z):1,Hn=(ni,Wn)=>{Wn.x<0||Wn.x>=F||Wn.y<0||Wn.y>=F||function(si,po,cs,Ds,Xs,Mf,vu,yc,Dc,Hl,rf,Xf,Zf,Th,Sf,Ah,Hh,Fc,nu,lc,mu,zc,Zd,dd,Bg){let Ep=si.addToLineVertexArray(po,cs),Cv,z0,B0,O0,fE=0,hE=0,dE=0,pE=0,Q3=-1,ew=-1,$d={},vE=Jn("");if(si.allowVerticalPlacement&&Ds.vertical){let $f=yc.layout.get("text-rotate").evaluate(mu,{},dd)+90;B0=new Cy(Dc,po,Hl,rf,Xf,Ds.vertical,Zf,Th,Sf,$f),vu&&(O0=new Cy(Dc,po,Hl,rf,Xf,vu,Hh,Fc,Sf,$f))}if(Xs){let $f=yc.layout.get("icon-rotate").evaluate(mu,{}),Nh=yc.layout.get("icon-text-fit")!=="none",Lv=iE(Xs,$f,Zd,Nh),vd=vu?iE(vu,$f,Zd,Nh):void 0;z0=new Cy(Dc,po,Hl,rf,Xf,Xs,Hh,Fc,!1,$f),fE=4*Lv.length;let Pv=si.iconSizeData,Sd=null;Pv.kind==="source"?(Sd=[Yd*yc.layout.get("icon-size").evaluate(mu,{})],Sd[0]>bp&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):Pv.kind==="composite"&&(Sd=[Yd*zc.compositeIconSizes[0].evaluate(mu,{},dd),Yd*zc.compositeIconSizes[1].evaluate(mu,{},dd)],(Sd[0]>bp||Sd[1]>bp)&&ee(`${si.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),si.addSymbols(si.icon,Lv,Sd,lc,nu,mu,l.ax.none,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),Q3=si.icon.placedSymbolArray.length-1,vd&&(hE=4*vd.length,si.addSymbols(si.icon,vd,Sd,lc,nu,mu,l.ax.vertical,po,Ep.lineStartIndex,Ep.lineLength,-1,dd),ew=si.icon.placedSymbolArray.length-1)}let mE=Object.keys(Ds.horizontal);for(let $f of mE){let Nh=Ds.horizontal[$f];if(!Cv){vE=Jn(Nh.text);let vd=yc.layout.get("text-rotate").evaluate(mu,{},dd);Cv=new Cy(Dc,po,Hl,rf,Xf,Nh,Zf,Th,Sf,vd)}let Lv=Nh.positionedLines.length===1;if(dE+=uE(si,po,Nh,Mf,yc,Sf,mu,Ah,Ep,Ds.vertical?l.ax.horizontal:l.ax.horizontalOnly,Lv?mE:[$f],$d,Q3,zc,dd),Lv)break}Ds.vertical&&(pE+=uE(si,po,Ds.vertical,Mf,yc,Sf,mu,Ah,Ep,l.ax.vertical,["vertical"],$d,ew,zc,dd));let lX=Cv?Cv.boxStartIndex:si.collisionBoxArray.length,uX=Cv?Cv.boxEndIndex:si.collisionBoxArray.length,cX=B0?B0.boxStartIndex:si.collisionBoxArray.length,fX=B0?B0.boxEndIndex:si.collisionBoxArray.length,hX=z0?z0.boxStartIndex:si.collisionBoxArray.length,dX=z0?z0.boxEndIndex:si.collisionBoxArray.length,pX=O0?O0.boxStartIndex:si.collisionBoxArray.length,vX=O0?O0.boxEndIndex:si.collisionBoxArray.length,pd=-1,Ly=($f,Nh)=>$f?.circleDiameter?Math.max($f.circleDiameter,Nh):Nh;pd=Ly(Cv,pd),pd=Ly(B0,pd),pd=Ly(z0,pd),pd=Ly(O0,pd);let gE=pd>-1?1:0;gE&&(pd*=Bg/Rc),si.glyphOffsetArray.length>=M0.MAX_GLYPHS&&ee("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),mu.sortKey!==void 0&&si.addToSortKeyRanges(si.symbolInstances.length,mu.sortKey);let mX=lE(yc,mu,dd),[gX,yX]=function($f,Nh){let Lv=$f.length,vd=Nh?.values;if(vd?.length>0)for(let Pv=0;Pv=0?$d.right:-1,$d.center>=0?$d.center:-1,$d.left>=0?$d.left:-1,$d.vertical||-1,Q3,ew,vE,lX,uX,cX,fX,hX,dX,pX,vX,Hl,dE,pE,fE,hE,gE,0,Zf,pd,gX,yX)}(R,Wn,ni,L,W,te,gn,R.layers[0],R.collisionBoxArray,d.index,d.sourceLayerIndex,R.index,er,[qr,qr,qr,qr],Ca,Ce,sr,$r,nn,bt,d,ue,Te,Oe,me)};if(qa==="line")for(let ni of KS(d.geometry,0,0,F,F)){let Wn=Sv(ni,Va),si=rX(Wn,Mr,_a,L.vertical||Et,W,24,br,R.overscaling,F);for(let po of si)Et&&sX(R,Et.text,bn,po)||Hn(Wn,po)}else if(qa==="line-center"){for(let ni of d.geometry)if(ni.length>1){let Wn=Sv(ni,Va),si=tX(Wn,_a,L.vertical||Et,W,24,br);si&&Hn(Wn,si)}}else if(d.type==="Polygon")for(let ni of Yc(d.geometry,0)){let Wn=nX(ni,16);Hn(Sv(ni[0],Va,!0),new Sp(Wn.x,Wn.y,0))}else if(d.type==="LineString")for(let ni of d.geometry){let Wn=Sv(ni,Va);Hn(Wn,new Sp(Wn[0].x,Wn[0].y,0))}else if(d.type==="Point")for(let ni of d.geometry)for(let Wn of ni)Hn([Wn],new Sp(Wn.x,Wn.y,0))}function uE(R,d,L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt){let Et=function(br,sr,Mr,qr,$r,_a,Ca,nn){let qa=qr.layout.get("text-rotate").evaluate(_a,{})*Math.PI/180,bn=[];for(let Fn of sr.positionedLines)for(let gn of Fn.positionedGlyphs){if(!gn.rect)continue;let Va=gn.rect||{},Hn=4,ni=!0,Wn=1,si=0,po=($r||nn)&&gn.vertical,cs=gn.metrics.advance*gn.scale/2;if(nn&&sr.verticalizable&&(si=Fn.lineOffset/2-(gn.imageName?-(Rc-gn.metrics.width*gn.scale)/2:(gn.scale-1)*Rc)),gn.imageName){let Fc=Ca[gn.imageName];ni=Fc.sdf,Wn=Fc.pixelRatio,Hn=1/Wn}let Ds=$r?[gn.x+cs,gn.y]:[0,0],Xs=$r?[0,0]:[gn.x+cs+Mr[0],gn.y+Mr[1]-si],Mf=[0,0];po&&(Mf=Xs,Xs=[0,0]);let vu=gn.metrics.isDoubleResolution?2:1,yc=(gn.metrics.left-Hn)*gn.scale-cs+Xs[0],Dc=(-gn.metrics.top-Hn)*gn.scale+Xs[1],Hl=yc+Va.w/vu*gn.scale/Wn,rf=Dc+Va.h/vu*gn.scale/Wn,Xf=new t(yc,Dc),Zf=new t(Hl,Dc),Th=new t(yc,rf),Sf=new t(Hl,rf);if(po){let Fc=new t(-cs,cs- -17),nu=-Math.PI/2,lc=12-cs,mu=new t(22-lc,-(gn.imageName?lc:0)),zc=new t(...Mf);Xf._rotateAround(nu,Fc)._add(mu)._add(zc),Zf._rotateAround(nu,Fc)._add(mu)._add(zc),Th._rotateAround(nu,Fc)._add(mu)._add(zc),Sf._rotateAround(nu,Fc)._add(mu)._add(zc)}if(qa){let Fc=Math.sin(qa),nu=Math.cos(qa),lc=[nu,-Fc,Fc,nu];Xf._matMult(lc),Zf._matMult(lc),Th._matMult(lc),Sf._matMult(lc)}let Ah=new t(0,0),Hh=new t(0,0);bn.push({tl:Xf,tr:Zf,bl:Th,br:Sf,tex:Va,writingMode:sr.writingMode,glyphOffset:Ds,sectionIndex:gn.sectionIndex,isSDF:ni,pixelOffsetTL:Ah,pixelOffsetBR:Hh,minFontScaleX:0,minFontScaleY:0})}return bn}(0,L,ge,te,ue,me,W,R.allowVerticalPlacement),Qt=R.textSizeData,er=null;Qt.kind==="source"?(er=[Yd*te.layout.get("text-size").evaluate(me,{})],er[0]>bp&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):Qt.kind==="composite"&&(er=[Yd*He.compositeTextSizes[0].evaluate(me,{},bt),Yd*He.compositeTextSizes[1].evaluate(me,{},bt)],(er[0]>bp||er[1]>bp)&&ee(`${R.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),R.addSymbols(R.text,Et,er,ge,ue,me,Te,d,Ce.lineStartIndex,Ce.lineLength,it,bt);for(let br of Oe)Pe[br]=R.text.placedSymbolArray.length-1;return 4*Et.length}function cE(R){for(let d in R)return R[d];return null}function sX(R,d,L,W){let te=R.compareText;if(d in te){let ue=te[d];for(let me=ue.length-1;me>=0;me--)if(W.dist(ue[me])this.process()),this.subscription=Ge(this.target,"message",L=>this.receive(L),!1),this.globalScope=he(self)?R:window}registerMessageHandler(R,d){this.messageHandlers[R]=d}unregisterMessageHandler(R){delete this.messageHandlers[R]}sendAsync(R,d){return new Promise((L,W)=>{let te=Math.round(1e18*Math.random()).toString(36).substring(0,10),ue=d?Ge(d.signal,"abort",()=>{ue?.unsubscribe(),delete this.resolveRejects[te];let Ce={id:te,type:"",origin:location.origin,targetMapId:R.targetMapId,sourceMapId:this.mapId};this.target.postMessage(Ce)},_Y):null;this.resolveRejects[te]={resolve:Ce=>{ue?.unsubscribe(),L(Ce)},reject:Ce=>{ue?.unsubscribe(),W(Ce)}};let me=[],ge=Object.assign(Object.assign({},R),{id:te,sourceMapId:this.mapId,origin:location.origin,data:mt(R.data,me)});this.target.postMessage(ge,{transfer:me})})}receive(R){let d=R.data,L=d.id,W=["file://","resource://android","null"],te=[d.origin,location.origin],ue=d.origin===location.origin,me=te.some(ge=>W.includes(ge));if((ue||me)&&(!d.targetMapId||this.mapId===d.targetMapId)){if(d.type===""){delete this.tasks[L];let ge=this.abortControllers[L];return delete this.abortControllers[L],void(ge&&ge.abort())}if(he(self)||d.mustQueue)return this.tasks[L]=d,this.taskQueue.push(L),void this.invoker.trigger();this.processTask(L,d)}}process(){if(this.taskQueue.length===0)return;let R=this.taskQueue.shift(),d=this.tasks[R];delete this.tasks[R],this.taskQueue.length>0&&this.invoker.trigger(),d&&this.processTask(R,d)}processTask(R,d){return e(this,void 0,void 0,function*(){if(d.type===""){let te=this.resolveRejects[R];return delete this.resolveRejects[R],te?void(d.error?te.reject(j(xt(d.error))):te.resolve(xt(d.data))):void 0}if(!this.messageHandlers[d.type])return void this.completeTask(R,new Error(`Could not find a registered handler for ${d.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let L=xt(d.data),W=new AbortController;this.abortControllers[R]=W;try{let te=yield this.messageHandlers[d.type](d.sourceMapId,L,W);this.completeTask(R,null,te)}catch(te){this.completeTask(R,j(te))}})}completeTask(R,d,L){let W=[];delete this.abortControllers[R];let te={id:R,type:"",sourceMapId:this.mapId,origin:location.origin,error:d?mt(d):null,data:mt(L,W)};this.target.postMessage(te,{transfer:W})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},l.O=function(){var R=new i(16);return i!=Float32Array&&(R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[11]=0,R[12]=0,R[13]=0,R[14]=0),R[0]=1,R[5]=1,R[10]=1,R[15]=1,R},l.P=t,l.Q=function(R,d,L){var W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et=L[0],Qt=L[1],er=L[2];return d===R?(R[12]=d[0]*Et+d[4]*Qt+d[8]*er+d[12],R[13]=d[1]*Et+d[5]*Qt+d[9]*er+d[13],R[14]=d[2]*Et+d[6]*Qt+d[10]*er+d[14],R[15]=d[3]*Et+d[7]*Qt+d[11]*er+d[15]):(te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],R[0]=W=d[0],R[1]=te,R[2]=ue,R[3]=me,R[4]=ge,R[5]=Ce,R[6]=Te,R[7]=Oe,R[8]=Pe,R[9]=it,R[10]=He,R[11]=bt,R[12]=W*Et+ge*Qt+Pe*er+d[12],R[13]=te*Et+Ce*Qt+it*er+d[13],R[14]=ue*Et+Te*Qt+He*er+d[14],R[15]=me*Et+Oe*Qt+bt*er+d[15]),R},l.R=ls,l.S=function(R,d,L){var W=L[0],te=L[1],ue=L[2];return R[0]=d[0]*W,R[1]=d[1]*W,R[2]=d[2]*W,R[3]=d[3]*W,R[4]=d[4]*te,R[5]=d[5]*te,R[6]=d[6]*te,R[7]=d[7]*te,R[8]=d[8]*ue,R[9]=d[9]*ue,R[10]=d[10]*ue,R[11]=d[11]*ue,R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.T=vp,l.U=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=d[3],ge=d[4],Ce=d[5],Te=d[6],Oe=d[7],Pe=d[8],it=d[9],He=d[10],bt=d[11],Et=d[12],Qt=d[13],er=d[14],br=d[15],sr=L[0],Mr=L[1],qr=L[2],$r=L[3];return R[0]=sr*W+Mr*ge+qr*Pe+$r*Et,R[1]=sr*te+Mr*Ce+qr*it+$r*Qt,R[2]=sr*ue+Mr*Te+qr*He+$r*er,R[3]=sr*me+Mr*Oe+qr*bt+$r*br,R[4]=(sr=L[4])*W+(Mr=L[5])*ge+(qr=L[6])*Pe+($r=L[7])*Et,R[5]=sr*te+Mr*Ce+qr*it+$r*Qt,R[6]=sr*ue+Mr*Te+qr*He+$r*er,R[7]=sr*me+Mr*Oe+qr*bt+$r*br,R[8]=(sr=L[8])*W+(Mr=L[9])*ge+(qr=L[10])*Pe+($r=L[11])*Et,R[9]=sr*te+Mr*Ce+qr*it+$r*Qt,R[10]=sr*ue+Mr*Te+qr*He+$r*er,R[11]=sr*me+Mr*Oe+qr*bt+$r*br,R[12]=(sr=L[12])*W+(Mr=L[13])*ge+(qr=L[14])*Pe+($r=L[15])*Et,R[13]=sr*te+Mr*Ce+qr*it+$r*Qt,R[14]=sr*ue+Mr*Te+qr*He+$r*er,R[15]=sr*me+Mr*Oe+qr*bt+$r*br,R},l.V=function(R,d){let L={};for(let W of d)W in R&&(L[W]=R[W]);return L},l.W=wp,l.X=G,l.Y=fS,l.Z=cS,l._=e,l.a=Ae,l.a$=function(R){var d=new i(3);return d[0]=R[0],d[1]=R[1],d[2]=R[2],d},l.a0=h,l.a1=v,l.a2=Se,l.a3=Ph,l.a4=dS,l.a5=Ty,l.a6=F,l.a7=Ig,l.a8=Ev,l.a9=25,l.aA=function(R){var d=R[0],L=R[1];return Math.sqrt(d*d+L*L)},l.aB=function(R){return R[0]=0,R[1]=0,R},l.aC=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R},l.aD=S3,l.aE=z,l.aF=function(R,d,L,W){let te=d.y-R.y,ue=d.x-R.x,me=W.y-L.y,ge=W.x-L.x,Ce=me*ue-ge*te;if(Ce===0)return null;let Te=(ge*(R.y-L.y)-me*(R.x-L.x))/Ce;return new t(R.x+Te*ue,R.y+Te*te)},l.aG=KS,l.aH=Ya,l.aI=function(R){let d=1/0,L=1/0,W=-1/0,te=-1/0;for(let ue of R)d=Math.min(d,ue.x),L=Math.min(L,ue.y),W=Math.max(W,ue.x),te=Math.max(te,ue.y);return[d,L,W,te]},l.aJ=Rc,l.aK=P,l.aL=function(R,d,L,W,te=!1){if(!L[0]&&!L[1])return[0,0];let ue=te?W==="map"?-R.bearingInRadians:0:W==="viewport"?R.bearingInRadians:0;if(ue){let me=Math.sin(ue),ge=Math.cos(ue);L=[L[0]*ge-L[1]*me,L[0]*me+L[1]*ge]}return[te?L[0]:P(d,L[0],R.zoom),te?L[1]:P(d,L[1],R.zoom)]},l.aN=M3,l.aO=J3,l.aP=A3,l.aQ=R=>R.type==="symbol",l.aR=dy,l.aS=ct,l.aT=hy,l.aU=It,l.aV=Fa,l.aW=ua,l.aX=_e,l.aY=pS,l.aZ=f,l.a_=T,l.aa=P3,l.ab=R=>{let d=window.document.createElement("video");return d.muted=!0,new Promise(L=>{d.onloadstart=()=>{L(d)};for(let W of R){let te=window.document.createElement("source");rr(W)||(d.crossOrigin="Anonymous"),te.src=W,d.appendChild(te)}})},l.ac=Vt,l.ad=function(){return K++},l.ae=fe,l.af=M0,l.ag=zg,l.ah=Na,l.ai=fo,l.aj=yS,l.ak=function(R){let d={};if(R.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,(L,W,te,ue)=>{let me=te||ue;return d[W]=!me||me.toLowerCase(),""}),d["max-age"]){let L=parseInt(d["max-age"],10);isNaN(L)?delete d["max-age"]:d["max-age"]=L}return d},l.al=se,l.am=85.051129,l.an=ke,l.ao=function(R){return Math.pow(2,R)},l.ap=S,l.aq=hS,l.ar=function(R){return Math.log(R)/Math.LN2},l.as=function(R){var d=R[0],L=R[1];return d*d+L*L},l.at=function(R){if(!R.length)return new Set;let d=Math.max(...R.map(Ce=>Ce.canonical.z)),L=1/0,W=-1/0,te=1/0,ue=-1/0,me=[];for(let Ce of R){let{x:Te,y:Oe,z:Pe}=Ce.canonical,it=Math.pow(2,d-Pe),He=Te*it,bt=Oe*it;me.push({id:Ce,x:He,y:bt}),HeW&&(W=He),btue&&(ue=bt)}let ge=new Set;for(let Ce of me)Ce.x!==L&&Ce.x!==W&&Ce.y!==te&&Ce.y!==ue||ge.add(Ce.id);return ge},l.au=function(R,d){let L=Math.abs(2*R.wrap)-+(R.wrap<0),W=Math.abs(2*d.wrap)-+(d.wrap<0);return R.overscaledZ-d.overscaledZ||W-L||d.canonical.y-R.canonical.y||d.canonical.x-R.canonical.x},l.av=class{constructor(R,d){this.max=R,this.onRemove=d,this.reset()}reset(){for(let R in this.data)for(let d of this.data[R])d.timeout&&clearTimeout(d.timeout),this.onRemove(d.value);return this.data={},this.order=[],this}add(R,d,L){let W=R.wrapped().key;this.data[W]===void 0&&(this.data[W]=[]);let te={value:d,timeout:void 0};if(L!==void 0&&(te.timeout=setTimeout(()=>{this.remove(R,te)},L)),this.data[W].push(te),this.order.push(W),this.order.length>this.max){let ue=this._getAndRemoveByKey(this.order[0]);ue&&this.onRemove(ue)}return this}has(R){return R.wrapped().key in this.data}getAndRemove(R){return this.has(R)?this._getAndRemoveByKey(R.wrapped().key):null}_getAndRemoveByKey(R){let d=this.data[R].shift();return d.timeout&&clearTimeout(d.timeout),this.data[R].length===0&&delete this.data[R],this.order.splice(this.order.indexOf(R),1),d.value}getByKey(R){let d=this.data[R];return d?d[0].value:null}get(R){return this.has(R)?this.data[R.wrapped().key][0].value:null}remove(R,d){if(!this.has(R))return this;let L=R.wrapped().key,W=d===void 0?0:this.data[L].indexOf(d),te=this.data[L][W];return this.data[L].splice(W,1),te.timeout&&clearTimeout(te.timeout),this.data[L].length===0&&delete this.data[L],this.onRemove(te.value),this.order.splice(this.order.indexOf(L),1),this}setMaxSize(R){for(this.max=R;this.order.length>this.max;){let d=this._getAndRemoveByKey(this.order[0]);d&&this.onRemove(d)}return this}filter(R){let d=[];for(let L in this.data)for(let W of this.data[L])R(W.value)||d.push(W);for(let L of d)this.remove(L.value.tileID,L)}},l.aw=function(R,d){let L=0,W=0;if(R.kind==="constant")W=R.layoutSize;else if(R.kind!=="source"){let{interpolationType:te,minZoom:ue,maxZoom:me}=R,ge=te?se(Pi.interpolationFactor(te,d,ue,me),0,1):0;R.kind==="camera"?W=bs.number(R.minSize,R.maxSize,ge):L=ge}return{uSizeT:L,uSize:W}},l.ay=function(R,{uSize:d,uSizeT:L},{lowerSize:W,upperSize:te}){return R.kind==="source"?W/Yd:R.kind==="composite"?bs.number(W/Yd,te/Yd,L):d},l.az=D,l.b=we,l.b$=zs,l.b0=function(R,d,L){return R[0]=d[0]-L[0],R[1]=d[1]-L[1],R[2]=d[2]-L[2],R},l.b1=function(R,d){var L=d[0],W=d[1],te=d[2],ue=L*L+W*W+te*te;return ue>0&&(ue=1/Math.sqrt(ue)),R[0]=d[0]*ue,R[1]=d[1]*ue,R[2]=d[2]*ue,R},l.b2=u,l.b3=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]},l.b4=function(R,d,L){return R[0]=d[0]*L[0],R[1]=d[1]*L[1],R[2]=d[2]*L[2],R[3]=d[3]*L[3],R},l.b5=C,l.b6=function(R,d,L){let W=d[0]*L[0]+d[1]*L[1]+d[2]*L[2];return W===0?null:(-(R[0]*L[0]+R[1]*L[1]+R[2]*L[2])-L[3])/W},l.b7=x,l.b8=function(R,d,L){return R[0]=d[0]*L,R[1]=d[1]*L,R[2]=d[2]*L,R[3]=d[3]*L,R},l.b9=function(R,d){return R[0]*d[0]+R[1]*d[1]+R[2]*d[2]+R[3]},l.bA=O,l.bB=function(R,d,L){var W=L[0],te=L[1],ue=L[2],me=L[3],ge=d[0],Ce=d[1],Te=d[2],Oe=te*Te-ue*Ce,Pe=ue*ge-W*Te,it=W*Ce-te*ge;return R[0]=ge+me*(Oe+=Oe)+te*(it+=it)-ue*(Pe+=Pe),R[1]=Ce+me*Pe+ue*Oe-W*it,R[2]=Te+me*it+W*Pe-te*Oe,R},l.bC=function(R,d,L){let W=(te=[R[0],R[1],R[2],d[0],d[1],d[2],L[0],L[1],L[2]])[0]*((Oe=te[8])*(me=te[4])-(ge=te[5])*(Te=te[7]))+te[1]*(-Oe*(ue=te[3])+ge*(Ce=te[6]))+te[2]*(Te*ue-me*Ce);var te,ue,me,ge,Ce,Te,Oe;if(W===0)return null;let Pe=u([],[d[0],d[1],d[2]],[L[0],L[1],L[2]]),it=u([],[L[0],L[1],L[2]],[R[0],R[1],R[2]]),He=u([],[R[0],R[1],R[2]],[d[0],d[1],d[2]]),bt=f([],Pe,-R[3]);return T(bt,bt,f([],it,-d[3])),T(bt,bt,f([],He,-L[3])),f(bt,bt,1/W),bt},l.bD=L3,l.bE=function(){return new Float64Array(4)},l.bF=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0]*Math.cos(W)-te[1]*Math.sin(W),ue[1]=te[0]*Math.sin(W)+te[1]*Math.cos(W),ue[2]=te[2],R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bG=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[0],ue[1]=te[1]*Math.cos(W)-te[2]*Math.sin(W),ue[2]=te[1]*Math.sin(W)+te[2]*Math.cos(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bH=function(R,d,L,W){var te=[],ue=[];return te[0]=d[0]-L[0],te[1]=d[1]-L[1],te[2]=d[2]-L[2],ue[0]=te[2]*Math.sin(W)+te[0]*Math.cos(W),ue[1]=te[1],ue[2]=te[2]*Math.cos(W)-te[0]*Math.sin(W),R[0]=ue[0]+L[0],R[1]=ue[1]+L[1],R[2]=ue[2]+L[2],R},l.bI=function(R,d,L){var W=Math.sin(L),te=Math.cos(L),ue=d[0],me=d[1],ge=d[2],Ce=d[3],Te=d[8],Oe=d[9],Pe=d[10],it=d[11];return d!==R&&(R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15]),R[0]=ue*te-Te*W,R[1]=me*te-Oe*W,R[2]=ge*te-Pe*W,R[3]=Ce*te-it*W,R[8]=ue*W+Te*te,R[9]=me*W+Oe*te,R[10]=ge*W+Pe*te,R[11]=Ce*W+it*te,R},l.bJ=function(R,d){let L=U(R,360),W=U(d,360),te=W-L,ue=W>L?te-360:te+360;return Math.abs(te)0?me:-me},l.bM=function(R,d){let L=U(R,2*Math.PI),W=U(d,2*Math.PI);return Math.min(Math.abs(L-W),Math.abs(L-W+2*Math.PI),Math.abs(L-W-2*Math.PI))},l.bN=function(){let R={},d=ht.$version;for(let L in ht.$root){let W=ht.$root[L];if(W.required){let te=null;te=L==="version"?d:W.type==="array"?[]:{},te!=null&&(R[L]=te)}}return R},l.bO=At,l.bP=Bt,l.bQ=function R(d,L){if(Array.isArray(d)){if(!Array.isArray(L)||d.length!==L.length)return!1;for(let W=0;WR.type==="raster",l.bV=q,l.bW=function(R,d){if(!R)return[{command:"setStyle",args:[d]}];let L=[];try{if(!We(R.version,d.version))return[{command:"setStyle",args:[d]}];We(R.center,d.center)||L.push({command:"setCenter",args:[d.center]}),We(R.state,d.state)||L.push({command:"setGlobalState",args:[d.state]}),We(R.centerAltitude,d.centerAltitude)||L.push({command:"setCenterAltitude",args:[d.centerAltitude]}),We(R.zoom,d.zoom)||L.push({command:"setZoom",args:[d.zoom]}),We(R.bearing,d.bearing)||L.push({command:"setBearing",args:[d.bearing]}),We(R.pitch,d.pitch)||L.push({command:"setPitch",args:[d.pitch]}),We(R.roll,d.roll)||L.push({command:"setRoll",args:[d.roll]}),We(R.sprite,d.sprite)||L.push({command:"setSprite",args:[d.sprite]}),We(R.glyphs,d.glyphs)||L.push({command:"setGlyphs",args:[d.glyphs]}),We(R.transition,d.transition)||L.push({command:"setTransition",args:[d.transition]}),We(R.light,d.light)||L.push({command:"setLight",args:[d.light]}),We(R.terrain,d.terrain)||L.push({command:"setTerrain",args:[d.terrain]}),We(R.sky,d.sky)||L.push({command:"setSky",args:[d.sky]}),We(R.projection,d.projection)||L.push({command:"setProjection",args:[d.projection]});let W={},te=[];(function(me,ge,Ce,Te){let Oe;for(Oe in ge=ge||{},me=me||{})Object.prototype.hasOwnProperty.call(me,Oe)&&(Object.prototype.hasOwnProperty.call(ge,Oe)||et(Oe,Ce,Te));for(Oe in ge)Object.prototype.hasOwnProperty.call(ge,Oe)&&(Object.prototype.hasOwnProperty.call(me,Oe)?We(me[Oe],ge[Oe])||(me[Oe].type==="geojson"&&ge[Oe].type==="geojson"&&pt(me,ge,Oe)?Ke(Ce,{command:"setGeoJSONSourceData",args:[Oe,ge[Oe].data]}):Mt(Oe,ge,Ce,Te)):Je(Oe,ge,Ce))})(R.sources,d.sources,te,W);let ue=[];R.layers&&R.layers.forEach(me=>{"source"in me&&W[me.source]?L.push({command:"removeLayer",args:[me.id]}):ue.push(me)}),L=L.concat(te),function(me,ge,Ce){ge=ge||[];let Te=(me=me||[]).map(Ct),Oe=ge.map(Ct),Pe=me.reduce(qt,{}),it=ge.reduce(qt,{}),He=Te.slice(),bt=Object.create(null),Et,Qt,er,br,sr;for(let Mr=0,qr=0;Mrg?(te=Math.acos(ue),me=Math.sin(te),ge=Math.sin((1-W)*te)/me,Ce=Math.sin(W*te)/me):(ge=1-W,Ce=W),R[0]=ge*Te+Ce*He,R[1]=ge*Oe+Ce*bt,R[2]=ge*Pe+Ce*Et,R[3]=ge*it+Ce*Qt,R},l.bm=function(R){let d=new Float64Array(9);var L,W,te,ue,me,ge,Ce,Te,Oe,Pe,it,He,bt,Et,Qt,er,br,sr;Pe=(te=(W=R)[0])*(Ce=te+te),it=(ue=W[1])*Ce,bt=(me=W[2])*Ce,Et=me*(Te=ue+ue),er=(ge=W[3])*Ce,br=ge*Te,sr=ge*(Oe=me+me),(L=d)[0]=1-(He=ue*Te)-(Qt=me*Oe),L[3]=it-sr,L[6]=bt+br,L[1]=it+sr,L[4]=1-Pe-Qt,L[7]=Et-er,L[2]=bt-br,L[5]=Et+er,L[8]=1-Pe-He;let Mr=_e(-Math.asin(se(d[2],-1,1))),qr,$r;return Math.hypot(d[5],d[8])<.001?(qr=0,$r=-_e(Math.atan2(d[3],d[4]))):(qr=_e(d[5]===0&&d[8]===0?0:Math.atan2(d[5],d[8])),$r=_e(d[1]===0&&d[0]===0?0:Math.atan2(d[1],d[0]))),{roll:qr,pitch:Mr+90,bearing:$r}},l.bn=function(R,d){return R.roll==d.roll&&R.pitch==d.pitch&&R.bearing==d.bearing},l.bo=rn,l.bp=ro,l.bq=_0,l.br=Mg,l.bs=y0,l.bt=$,l.bu=Q,l.bv=io,l.bw=function(R,d,L,W,te){return $(W,te,se((R-d)/(L-d),0,1))},l.bx=function(R,d,L,W){return R[0]=d[0]+L[0]*W,R[1]=d[1]+L[1]*W,R[2]=d[2]+L[2]*W,R},l.by=U,l.bz=function(){return new Float64Array(3)},l.c=Ye,l.c$=Cc,l.c0=class extends Wi{constructor(R,d){super(R,d),this.current=Bs}set(R){if(R[12]!==this.current[12]||R[0]!==this.current[0])return this.current=R,void this.gl.uniformMatrix4fv(this.location,!1,R);for(let d=1;d<16;d++)if(R[d]!==this.current[d]){this.current=R,this.gl.uniformMatrix4fv(this.location,!1,R);break}}},l.c1=Mo,l.c2=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]&&R[2]===this.current[2]||(this.current=R,this.gl.uniform3f(this.location,R[0],R[1],R[2]))}},l.c3=class extends Wi{constructor(R,d){super(R,d),this.current=[0,0]}set(R){R[0]===this.current[0]&&R[1]===this.current[1]||(this.current=R,this.gl.uniform2f(this.location,R[0],R[1]))}},l.c4=w,l.c5=function(R,d){var L=Math.sin(d),W=Math.cos(d);return R[0]=W,R[1]=L,R[2]=0,R[3]=-L,R[4]=W,R[5]=0,R[6]=0,R[7]=0,R[8]=1,R},l.c6=function(R,d,L){var W=d[0],te=d[1],ue=d[2];return R[0]=W*L[0]+te*L[3]+ue*L[6],R[1]=W*L[1]+te*L[4]+ue*L[7],R[2]=W*L[2]+te*L[5]+ue*L[8],R},l.c7=function(R,d,L,W,te,ue,me){var ge=1/(d-L),Ce=1/(W-te),Te=1/(ue-me);return R[0]=-2*ge,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*Ce,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*Te,R[11]=0,R[12]=(d+L)*ge,R[13]=(te+W)*Ce,R[14]=(me+ue)*Te,R[15]=1,R},l.c8=class extends Wi{constructor(R,d){super(R,d),this.current=new Array}set(R){if(R!=this.current){this.current=R;let d=new Float32Array(4*R.length);for(let L=0;L25||W<0||W>=1||L<0||L>=1)},l.cE=function(R,d){return R[0]=d[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=d[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=d[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R},l.cF=class extends Jt{},l.cG=Tt,l.cH=function(R,d){Ye.REGISTERED_PROTOCOLS[R]=d},l.cI=function(R){delete Ye.REGISTERED_PROTOCOLS[R]},l.cJ=function(R,d){let L={};for(let te=0;teHn*Rc)}let bn=Ce?"center":te.get("text-justify").evaluate(Pe,{},R.canonical),Fn=te.get("symbol-placement")==="point"?te.get("text-max-width").evaluate(Pe,{},R.canonical)*Rc:1/0,gn=()=>{R.bucket.allowVerticalPlacement&&Br($r)&&(Qt.vertical=xy(er,R.glyphMap,R.glyphPositions,R.imagePositions,it,Fn,ge,nn,"left",Ca,sr,l.ax.vertical,!0,bt,He))};if(!Ce&&qa){let Va=new Set;if(bn==="auto")for(let ni=0;niWY(ge,Ce,ue),W.layers[me])}(R,L,d),L.finish()},l.cT=function(R,d,L,W,te,ue){let me=JS(R,d,L,te,0);return me=JS(me,d,W,ue,1),me},l.cU=class{constructor(R){this.maxEntries=R,this.map=new Map}get(R){let d=this.map.get(R);return d!==void 0&&(this.map.delete(R),this.map.set(R,d)),d}set(R,d){if(this.map.has(R))this.map.delete(R);else if(this.map.size>=this.maxEntries){let L=this.map.keys().next().value;this.map.delete(L)}this.map.set(R,d)}clear(){this.map.clear()}},l.cV=w4,l.cW=_y,l.cX=YS,l.cY=function(R,d,L,W,te){return e(this,void 0,void 0,function*(){if(v())try{return yield Se(R,d,L,W,te)}catch{}return function(ue,me,ge,Ce,Te){let Oe=ue.width,Pe=ue.height;Ie&&Ve||(Ie=new OffscreenCanvas(Oe,Pe),Ve=Ie.getContext("2d",{willReadFrequently:!0})),Ie.width=Oe,Ie.height=Pe,Ve.drawImage(ue,0,0,Oe,Pe);let it=Ve.getImageData(me,ge,Ce,Te);return Ve.clearRect(0,0,Oe,Pe),it.data}(R,d,L,W,te)})},l.cZ=mp,l.c_=class{constructor(R,d){this.layers={[zg]:this},this.name=zg,this.version=d?d.version:1,this.extent=d?d.extent:4096,this.length=R.length,this.features=R}feature(R){return new HY(this.features[R],this.extent)}},l.ca=class extends sa{},l.cb=VW,l.cc=class extends Tn{},l.cd=Lu,l.ce=function(R){return R<=1?1:Math.pow(2,Math.ceil(Math.log(R)/Math.LN2))},l.cf=au,l.cg=function(R,d,L){var W=d[0],te=d[1],ue=d[2],me=L[3]*W+L[7]*te+L[11]*ue+L[15];return R[0]=(L[0]*W+L[4]*te+L[8]*ue+L[12])/(me=me||1),R[1]=(L[1]*W+L[5]*te+L[9]*ue+L[13])/me,R[2]=(L[2]*W+L[6]*te+L[10]*ue+L[14])/me,R},l.ch=class extends mr{},l.ci=class extends y{},l.cj=function(R,d){return R[0]===d[0]&&R[1]===d[1]&&R[2]===d[2]&&R[3]===d[3]&&R[4]===d[4]&&R[5]===d[5]&&R[6]===d[6]&&R[7]===d[7]&&R[8]===d[8]&&R[9]===d[9]&&R[10]===d[10]&&R[11]===d[11]&&R[12]===d[12]&&R[13]===d[13]&&R[14]===d[14]&&R[15]===d[15]},l.ck=function(R,d){var L=R[0],W=R[1],te=R[2],ue=R[3],me=R[4],ge=R[5],Ce=R[6],Te=R[7],Oe=R[8],Pe=R[9],it=R[10],He=R[11],bt=R[12],Et=R[13],Qt=R[14],er=R[15],br=d[0],sr=d[1],Mr=d[2],qr=d[3],$r=d[4],_a=d[5],Ca=d[6],nn=d[7],qa=d[8],bn=d[9],Fn=d[10],gn=d[11],Va=d[12],Hn=d[13],ni=d[14],Wn=d[15];return Math.abs(L-br)<=g*Math.max(1,Math.abs(L),Math.abs(br))&&Math.abs(W-sr)<=g*Math.max(1,Math.abs(W),Math.abs(sr))&&Math.abs(te-Mr)<=g*Math.max(1,Math.abs(te),Math.abs(Mr))&&Math.abs(ue-qr)<=g*Math.max(1,Math.abs(ue),Math.abs(qr))&&Math.abs(me-$r)<=g*Math.max(1,Math.abs(me),Math.abs($r))&&Math.abs(ge-_a)<=g*Math.max(1,Math.abs(ge),Math.abs(_a))&&Math.abs(Ce-Ca)<=g*Math.max(1,Math.abs(Ce),Math.abs(Ca))&&Math.abs(Te-nn)<=g*Math.max(1,Math.abs(Te),Math.abs(nn))&&Math.abs(Oe-qa)<=g*Math.max(1,Math.abs(Oe),Math.abs(qa))&&Math.abs(Pe-bn)<=g*Math.max(1,Math.abs(Pe),Math.abs(bn))&&Math.abs(it-Fn)<=g*Math.max(1,Math.abs(it),Math.abs(Fn))&&Math.abs(He-gn)<=g*Math.max(1,Math.abs(He),Math.abs(gn))&&Math.abs(bt-Va)<=g*Math.max(1,Math.abs(bt),Math.abs(Va))&&Math.abs(Et-Hn)<=g*Math.max(1,Math.abs(Et),Math.abs(Hn))&&Math.abs(Qt-ni)<=g*Math.max(1,Math.abs(Qt),Math.abs(ni))&&Math.abs(er-Wn)<=g*Math.max(1,Math.abs(er),Math.abs(Wn))},l.cl=function(R,d){return R[0]=d[0],R[1]=d[1],R[2]=d[2],R[3]=d[3],R[4]=d[4],R[5]=d[5],R[6]=d[6],R[7]=d[7],R[8]=d[8],R[9]=d[9],R[10]=d[10],R[11]=d[11],R[12]=d[12],R[13]=d[13],R[14]=d[14],R[15]=d[15],R},l.cm=R=>R.type==="circle",l.cn=R=>R.type==="heatmap",l.co=R=>R.type==="line",l.cp=R=>R.type==="fill",l.cq=R=>R.type==="fill-extrusion",l.cr=R=>R.type==="hillshade",l.cs=R=>R.type==="color-relief",l.ct=R=>R.type==="background",l.cu=R=>R.type==="custom",l.cv=re,l.cw=function(R,d,L){if(d<=0)return R;let W=1/d;return L===void 0||Math.abs(L)<1e-10?Math.round(R*W)/W:(L>0?Math.ceil(R*W-1e-9):Math.floor(R*W+1e-10))/W},l.cx=function(R,d,L){let W=B(d.x-L.x,d.y-L.y),te=B(R.x-L.x,R.y-L.y);var ue,me;return _e(Math.atan2(W[0]*te[1]-W[1]*te[0],(ue=W)[0]*(me=te)[0]+ue[1]*me[1]))},l.cy=ne,l.cz=function(R,d){var L;if(!ve[d])return!1;let W=R?.target,te=((L=W?.ownerDocument)===null||L===void 0?void 0:L.defaultView)||window;return R instanceof te.MouseEvent||R instanceof te.WheelEvent},l.d=j,l.d0=class{constructor(R,d){let L=(d=this.options=Object.assign({},RW,d)).debug;if(L&&console.time("preprocess data"),d.maxZoom<0||d.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(d.promoteId&&d.generateId)throw new Error("promoteId and generateId cannot be used together.");let W=c3(R,d);L&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",d.indexMaxZoom,d.indexMaxPoints),console.time("generate tiles")),W=p3(W,d),d.updateable&&(this.source=W),this.initializeIndex(W,d)}initializeIndex(R,d){this.tileIndex=d.cluster?new MW(d.clusterOptions):new PW(d),R.length&&this.tileIndex.initialize(R)}getTile(R,d,L){return d=+d,L=+L,(R=+R)<0||R>24?null:this.tileIndex.getTile(R,d,L)}updateData(R,d){let L=this.options;if(!L.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:W,source:te}=function(ue,me,ge){let Ce=function(Oe,Pe){var it,He;return Oe?{removeAll:Oe.removeAll,remove:new Set(Oe.remove||[]),add:new Map((it=Oe.add)==null?void 0:it.map(bt=>[Pe.promoteId?bt.properties[Pe.promoteId]:bt.id,bt])),update:new Map((He=Oe.update)==null?void 0:He.map(bt=>[bt.id,bt]))}:{remove:new Set,add:new Map,update:new Map}}(me,ge),Te=[];if(Ce.removeAll&&(Te=ue,ue=[]),Ce.remove.size||Ce.add.size){let Oe=[];for(let Pe of ue)(Ce.remove.has(Pe.id)||Ce.add.has(Pe.id))&&Oe.push(Pe);if(Oe.length){Te.push(...Oe);let Pe=new Set(Oe.map(it=>it.id));ue=ue.filter(it=>!Pe.has(it.id))}if(Ce.add.size){let Pe=c3({type:"FeatureCollection",features:Array.from(Ce.add.values())},ge);Pe=p3(Pe,ge),Te.push(...Pe),ue.push(...Pe)}}if(Ce.update.size){let Oe=new Map,Pe=[];for(let it of ue)Ce.update.has(it.id)?Oe.set(it.id,[...Oe.get(it.id)||[],it]):Pe.push(it);for(let[it,He]of Ce.update){let bt=Oe.get(it);if(!bt||bt.length===0)continue;let Et=AW(bt,He,ge);Te.push(...bt,...Et),Pe.push(...Et)}ue=Pe}return{affected:Te,source:ue}}(this.source,R,L);d&&({affected:W,source:te}=this.filterUpdate(te,W,d)),W.length&&(this.source=te,this.tileIndex.updateIndex(te,W,L))}filterUpdate(R,d,L){let W=new Set;for(let te of R)te.id!=null&&(L(vy(te))||(d.push(te),W.add(te.id)));return{affected:d,source:R=R.filter(te=>!W.has(te.id))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map(R=>vy(R))}}updateClusterOptions(R,d){let L=this.options.cluster;this.options.cluster=R,this.options.clusterOptions=d,L!=R?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(R){return this.tileIndex.getClusterExpansionZoom(R)}getClusterChildren(R){return this.tileIndex.getChildren(R)}getClusterLeaves(R,d,L){return this.tileIndex.getLeaves(R,d,L)}},l.d1=Si,l.e=X,l.f=rr,l.g=yt,l.h=R=>e(void 0,void 0,void 0,function*(){if(R.byteLength===0)return createImageBitmap(new ImageData(1,1));let d=new Blob([new Uint8Array(R)],{type:"image/png"});try{return createImageBitmap(d)}catch(L){throw new Error(`Could not load image because of ${j(L).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}}),l.i=he,l.j=R=>new Promise((d,L)=>{let W=new Image;W.onload=()=>{d(W),URL.revokeObjectURL(W.src),W.onload=null,window.requestAnimationFrame(()=>W.src=Me)},W.onerror=()=>L(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."));let te=new Blob([new Uint8Array(R)],{type:"image/png"});W.src=R.byteLength?URL.createObjectURL(te):Me}),l.k=(R,d)=>$t(X(R,{type:"json"}),d),l.l=Ot,l.m=$t,l.n=or,l.o=(R,d)=>$t(X(R,{type:"arrayBuffer"}),d),l.p=J4,l.q=function(R){return new _y(R).readFields(nY,[])},l.r=function(R){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(R))},l.s=Ge,l.t=As,l.u=Ps,l.v=Pc,l.w=ee,l.x=ht,l.y=vo,l.z=Bl}),E("worker",["./shared"],function(l){"use strict";class e{constructor(T,f){this.keyCache={},T&&this.replace(T,f)}replace(T,f){this._layerConfigs={},this._layers={},this.update(T,[],f)}update(T,f,u){for(let x of T){this._layerConfigs[x.id]=x;let z=this._layers[x.id]=l.bT(x,u);z._featureFilter=l.ah(z.filter,u),this.keyCache[x.id]&&delete this.keyCache[x.id]}for(let x of f)delete this.keyCache[x],delete this._layerConfigs[x],delete this._layers[x];this.familiesBySource={};let A=l.cJ(Object.values(this._layerConfigs),this.keyCache);for(let x of A){let z=x.map(P=>this._layers[P.id]),I=z[0];if(I.isHidden())continue;let O=I.source||"",D=this.familiesBySource[O];D||(D=this.familiesBySource[O]={});let B=I.sourceLayer||l.ag,F=D[B];F||(F=D[B]=[]),F.push(z)}}}class t{constructor(T){let f={},u=[];for(let I in T){let O=T[I],D=f[I]={};for(let B in O){let F=O[+B];if(!F||F.bitmap.width===0||F.bitmap.height===0)continue;let P={x:0,y:0,w:F.bitmap.width+2,h:F.bitmap.height+2};u.push(P),D[B]={rect:P,metrics:F.metrics}}}let{w:A,h:x}=l.p(u),z=new l.t({width:A||1,height:x||1});for(let I in T){let O=T[I];for(let D in O){let B=O[+D];if(!B||B.bitmap.width===0||B.bitmap.height===0)continue;let F=f[I][D].rect;l.t.copy(B.bitmap,z,{x:0,y:0},{x:F.x+1,y:F.y+1},B.bitmap)}}this.image=z,this.positions=f}}l.cK("GlyphAtlas",t);class n{constructor(T){this.tileID=new l.a3(T.tileID.overscaledZ,T.tileID.wrap,T.tileID.canonical.z,T.tileID.canonical.x,T.tileID.canonical.y),this.uid=T.uid,this.zoom=T.zoom,this.pixelRatio=T.pixelRatio,this.tileSize=T.tileSize,this.source=T.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=T.showCollisionBoxes,this.collectResourceTiming=!!T.collectResourceTiming,this.returnDependencies=!!T.returnDependencies,this.promoteId=T.promoteId,this.inFlightDependencies=[]}parse(T,f,u,A,x){return l._(this,void 0,void 0,function*(){this.status="parsing",this.data=T,this.collisionBoxArray=new l.ae;let z=new l.cL(Object.keys(T.layers).sort()),I=new l.cM(this.tileID,this.promoteId);I.bucketLayerIDs=[];let O={},D={featureIndex:I,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:u,subdivisionGranularity:x},B=f.familiesBySource[this.source];for(let q in B){let Z=T.layers[q];if(!Z)continue;Z.version===1&&l.w(`Vector tile source "${this.source}" layer "${q}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let ee=z.encode(q),ae=[];for(let he=0;hewe.id)))}}let F=l.bY(D.glyphDependencies,q=>Object.keys(q).map(Number));for(let q of this.inFlightDependencies)q?.abort();this.inFlightDependencies=[];let P=Promise.resolve({});if(Object.keys(F).length){let q=new AbortController;this.inFlightDependencies.push(q),P=A.sendAsync({type:"GG",data:{stacks:F,source:this.source,tileID:this.tileID,type:"glyphs"}},q)}let j=Object.keys(D.iconDependencies),U=Promise.resolve({});if(j.length){let q=new AbortController;this.inFlightDependencies.push(q),U=A.sendAsync({type:"GI",data:{icons:j,source:this.source,tileID:this.tileID,type:"icons"}},q)}let $=Object.keys(D.patternDependencies),Q=Promise.resolve({});if($.length){let q=new AbortController;this.inFlightDependencies.push(q),Q=A.sendAsync({type:"GI",data:{icons:$,source:this.source,tileID:this.tileID,type:"patterns"}},q)}let re=D.dashDependencies,ne=Promise.resolve({});if(Object.keys(re).length){let q=new AbortController;this.inFlightDependencies.push(q),ne=A.sendAsync({type:"GDA",data:{dashes:re}},q)}let[se,G,X,K]=yield Promise.all([P,U,Q,ne]),H=new t(se),Y=new l.cN(G,X);for(let q in O){let Z=O[q];Z instanceof l.af?(r(Z.layers,this.zoom,u),l.cO({bucket:Z,glyphMap:se,glyphPositions:H.positions,imageMap:G,imagePositions:Y.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:D.subdivisionGranularity})):Z.hasDependencies&&(Z instanceof l.cP||Z instanceof l.cQ||Z instanceof l.cR)&&(r(Z.layers,this.zoom,u),Z.addFeatures(D,this.tileID.canonical,Y.patternPositions,K))}return this.status="done",{buckets:Object.values(O).filter(q=>!q.isEmpty()),featureIndex:I,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:H.image,imageAtlas:Y,dashPositions:K,glyphMap:this.returnDependencies?se:null,iconMap:this.returnDependencies?G:null,glyphPositions:this.returnDependencies?H.positions:null}})}}function r(_,T,f){let u=new l.J(T);for(let A of _)A.recalculate(u,f)}class a{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(T,f){this.loading[T]=f}finishLoading(T){delete this.loading[T]}abort(T){let f=this.loading[T];f?.abort&&(f.abort.abort(),delete this.loading[T])}setParsing(T,f){this.parsing[T]=f}consumeParsing(T){let f=this.parsing[T];if(f)return delete this.parsing[T],f}clearParsing(T){delete this.parsing[T]}markLoaded(T,f){this.loaded[T]=f}getLoaded(T){let f=this.loaded[T];if(f)return f}removeLoaded(T){delete this.loaded[T]}clearLoaded(){this.loaded={}}}class o{constructor(T){this.start=`${T}#start`,this.end=`${T}#end`,this.measure=T,performance.mark(this.start)}finish(){performance.mark(this.end);let T=performance.getEntriesByName(this.measure);return T.length===0&&(performance.measure(this.measure,this.start,this.end),T=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),T}}class s{constructor(T,f,u,A,x){this.type=T,this.properties=u||{},this.extent=x,this.pointsArray=f,this.id=A}loadGeometry(){return this.pointsArray.map(T=>T.map(f=>new l.P(f.x,f.y)))}}class c{constructor(T,f,u){this.version=2,this._myFeatures=T,this.name=f,this.length=T.length,this.extent=u}feature(T){return this._myFeatures[T]}}class m{constructor(){this.layers={}}addLayer(T){this.layers[T.name]=T}}function h(_){let T=l.cS(_);return T.byteOffset===0&&T.byteLength===T.buffer.byteLength||(T=new Uint8Array(T)),{vectorTile:_,rawData:T.buffer}}function v(_,T,f){let{extent:u}=_,A=Math.pow(2,f.z-T.z),x=(f.x-T.x*A)*u,z=(f.y-T.y*A)*u,I=[];for(let O=0;O<_.length;O++){let D=_.feature(O),B=D.loadGeometry();for(let P of B)for(let j of P)j.x=j.x*A-x,j.y=j.y*A-z;let F=128;B=l.cT(B,D.type,-F,-F,u+F,u+F),B.length!==0&&I.push(new s(D.type,B,D.properties,D.id,u))}return new c(I,_.name,u)}class g{constructor(T,f,u){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this.overzoomedTileResultCache=new l.cU(1e3)}loadVectorTile(T,f){try{return{vectorTile:T.encoding!=="mlt"?new l.cV(new l.cW(f)):new l.cX(f),rawData:f}}catch(u){let A=new Uint8Array(f),x=`Unable to parse the tile at ${T.request.url}, `;throw x+=A[0]===31&&A[1]===139?"please make sure the data is not gzipped and that you have configured the relevant header in the server":`got error: ${l.d(u).message}`,new Error(x)}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,overzoomParameters:u}=T;u&&(T.request=u.overzoomRequest);let A=this._startRequestTiming(T),x=new n(T);this.tileState.startLoading(f,x);let z=new AbortController;x.abort=z;try{let I=yield l.o(T.request,z);if(T.etag&&T.etag===I.etag)return this.tileState.finishLoading(f),this._getEtagUnmodifiedResult(I,A);let O=this.loadVectorTile(T,I.data);if(this.tileState.finishLoading(f),!O)return null;let{vectorTile:D,rawData:B}=O;u&&({vectorTile:D,rawData:B}=this._getOverzoomTile(T,D));let F=this._getExpiryData(I),P=this._finishRequestTiming(A);x.vectorTile=D,this.tileState.markLoaded(f,x);let j={rawData:B,cacheControl:F,resourceTiming:P};this.tileState.setParsing(f,j);try{return yield this._parseWorkerTile(x,T,j)}finally{this.tileState.clearParsing(f)}}catch(I){throw this.tileState.finishLoading(f),x.status="done",this.tileState.markLoaded(f,x),I}})}_getEtagUnmodifiedResult(T,f){let u=this._getExpiryData(T),A=this._finishRequestTiming(f);return l.e({etagUnmodified:!0},u,A)}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x,cacheControl:z,resourceTiming:I}=u;A=l.e({rawTileData:x.slice(0),encoding:f.encoding},A,z,I)}return A})}_getExpiryData({expires:T,cacheControl:f,etag:u}){let A={};return T&&(A.expires=T),f&&(A.cacheControl=f),u&&(A.etag=u),A}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T){let f=T?.finish();return f?{resourceTiming:JSON.parse(JSON.stringify(f))}:{}}_getOverzoomTile(T,f){var u;let{tileID:A,source:x,overzoomParameters:z}=T,{maxZoomTileID:I}=z,O=`${I.key}_${A.key}_${(u=T.request)===null||u===void 0?void 0:u.url}`,D=this.overzoomedTileResultCache.get(O);if(D)return D;let B=new m,F=this.layerIndex.familiesBySource[x];for(let j in F){let U=f.layers[j];if(!U)continue;let $=v(U,I,A.canonical);$.length>0&&B.addLayer($)}let P=h(B);return this.overzoomedTileResultCache.set(O,P),P}reloadTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}}class i{constructor(){this.loaded={}}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f,encoding:u,rawImageData:A,redFactor:x,greenFactor:z,blueFactor:I,baseShift:O}=T,D=A.width+2,B=A.height+2,F=l.b(A)?new l.R({width:D,height:B},yield l.cY(A,-1,-1,D,B)):A,P=new l.cZ(f,F,u,x,z,I,O);return this.loaded||(this.loaded={}),this.loaded[f]=P,P})}removeTile(T){let f=this.loaded,u=T.uid;f?.[u]&&delete f[u]}}class w{constructor(T,f,u,A=S){this.actor=T,this.layerIndex=f,this.availableImages=u,this.tileState=new a,this._createGeoJSONIndex=A}loadVectorTile(T){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:f,x:u,y:A}=T.tileID.canonical,x=this._geoJSONIndex.getTile(f,u,A);return x?h(new l.c_(x.features,{version:2,extent:l.a6})):null}loadTile(T){return l._(this,void 0,void 0,function*(){let{uid:f}=T,u=new n(T);u.abort=new AbortController;try{let A=this.loadVectorTile(T);if(!A)return null;let{vectorTile:x,rawData:z}=A;u.vectorTile=x,this.tileState.markLoaded(f,u);let I={rawData:z};this.tileState.setParsing(f,I);try{return yield this._parseWorkerTile(u,T,I)}finally{this.tileState.clearParsing(f)}}catch(A){throw u.status="done",this.tileState.markLoaded(f,u),A}})}_reloadLoadedTile(T){return l._(this,void 0,void 0,function*(){let f=T.uid,u=this.tileState.getLoaded(f);if(!u)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(u.showCollisionBoxes=T.showCollisionBoxes,u.status==="parsing"){let A=this.tileState.consumeParsing(f);return yield this._parseWorkerTile(u,T,A)}if(u.status==="done"&&u.vectorTile)return yield this._parseWorkerTile(u,T)})}_parseWorkerTile(T,f,u){return l._(this,void 0,void 0,function*(){let A=yield T.parse(T.vectorTile,this.layerIndex,this.availableImages,this.actor,f.subdivisionGranularity);if(u){let{rawData:x}=u;A=l.e({rawTileData:x.slice(0),encoding:"mvt"},A)}return A})}abortTile(T){return l._(this,void 0,void 0,function*(){this.tileState.abort(T.uid)})}removeTile(T){return l._(this,void 0,void 0,function*(){this.tileState.removeLoaded(T.uid)})}loadData(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort();let u=this._startRequestTiming(T);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(T,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let A={};return T.request&&(A.data=T.data),this._finishRequestTiming(u,T,A),A}catch(A){if(delete this._pendingRequest,!l.$(A))throw A;return{abandoned:!0}}})}_startRequestTiming(T){var f;if(!((f=T.request)===null||f===void 0)&&f.collectResourceTiming)return new o(T.request.url)}_finishRequestTiming(T,f,u){let A=T?.finish();A&&(u.resourceTiming={[f.source]:JSON.parse(JSON.stringify(A))})}reloadTile(T){return this.tileState.getLoaded(T.uid)?this._reloadLoadedTile(T):this.loadTile(T)}loadAndProcessGeoJSON(T,f){return l._(this,void 0,void 0,function*(){var u;if(T.request&&(T.data=(yield l.k(T.request,f)).data),T.data)return T.data=this._filterGeoJSON(T.data,T.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(T.data,T));if(T.dataDiff)return(u=this._geoJSONIndex)!==null&&u!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},T)),void this._geoJSONIndex.updateData(T.dataDiff,this._getFilterPredicate(T.filter));if(T.updateCluster&&this._geoJSONIndex.updateClusterOptions(T.geojsonVtOptions.cluster,M(T)),this._geoJSONIndex==null)throw new Error(`Input data given to '${T.source}' is not a valid GeoJSON object.`)})}_filterGeoJSON(T,f){if(T.type!=="FeatureCollection")return T;let u=this._getFilterPredicate(f);return u?{type:"FeatureCollection",features:T.features.filter(A=>u(A))}:T}_getFilterPredicate(T){if(typeof T!="boolean"&&!T?.length)return;let f=l.c$(T,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(f.result==="error")throw new Error(f.value.map(u=>`${u.key}: ${u.message}`).join(", "));return u=>f.value.evaluate({zoom:0},u)}removeSource(T){return l._(this,void 0,void 0,function*(){var f;(f=this._pendingRequest)===null||f===void 0||f.abort()})}getClusterExpansionZoom(T){return this._geoJSONIndex.getClusterExpansionZoom(T.clusterId)}getClusterChildren(T){return this._geoJSONIndex.getClusterChildren(T.clusterId)}getClusterLeaves(T){return this._geoJSONIndex.getClusterLeaves(T.clusterId,T.limit,T.offset)}}function S(_,T){let f=l.e(T.geojsonVtOptions||{},{updateable:!0,clusterOptions:M(T)});return new l.d0(_,f)}function M({geojsonVtOptions:_,clusterProperties:T}){if(!T||!_.clusterOptions)return _.clusterOptions;let f={},u={},A={accumulated:null,zoom:0},x={properties:null},z=Object.keys(T);for(let I of z){let[O,D]=T[I],B=l.c$(D),F=l.c$(typeof O=="string"?[O,["accumulated"],["get",I]]:O);f[I]=B.value,u[I]=F.value}return _.clusterOptions.map=I=>{x.properties=I;let O={};for(let D of z)O[D]=f[D].evaluate(A,x);return O},_.clusterOptions.reduce=(I,O)=>{x.properties=O;for(let D of z)A.accumulated=I[D],I[D]=u[D].evaluate(A,x)},_.clusterOptions}class C{constructor(T){this.self=T,this.actor=new l.N(T),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(f,u)=>{if(this.externalWorkerSourceTypes[f])throw new Error(`Worker source with name "${f}" already registered.`);this.externalWorkerSourceTypes[f]=u},this.self.addProtocol=l.cH,this.self.removeProtocol=l.cI,this.self.registerRTLTextPlugin=f=>{l.d1.setMethods(f)},this.self.makeRequest=l.m,this.actor.registerMessageHandler("LDT",(f,u)=>this._getDEMWorkerSource(f,u.source).loadTile(u)),this.actor.registerMessageHandler("RDT",(f,u)=>l._(this,void 0,void 0,function*(){this._getDEMWorkerSource(f,u.source).removeTile(u)})),this.actor.registerMessageHandler("GCEZ",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterExpansionZoom(u)})),this.actor.registerMessageHandler("GCC",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterChildren(u)})),this.actor.registerMessageHandler("GCL",(f,u)=>l._(this,void 0,void 0,function*(){return this._getWorkerSource(f,u.type,u.source).getClusterLeaves(u)})),this.actor.registerMessageHandler("LD",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadData(u)),this.actor.registerMessageHandler("LT",(f,u)=>this._getWorkerSource(f,u.type,u.source).loadTile(u)),this.actor.registerMessageHandler("RT",(f,u)=>this._getWorkerSource(f,u.type,u.source).reloadTile(u)),this.actor.registerMessageHandler("AT",(f,u)=>this._getWorkerSource(f,u.type,u.source).abortTile(u)),this.actor.registerMessageHandler("RMT",(f,u)=>this._getWorkerSource(f,u.type,u.source).removeTile(u)),this.actor.registerMessageHandler("RS",(f,u)=>l._(this,void 0,void 0,function*(){var A,x;if(!(!((x=(A=this.workerSources[f])===null||A===void 0?void 0:A[u.type])===null||x===void 0)&&x[u.source]))return;let z=this.workerSources[f][u.type][u.source];delete this.workerSources[f][u.type][u.source],z.removeSource!==void 0&&z.removeSource(u)})),this.actor.registerMessageHandler("RM",f=>l._(this,void 0,void 0,function*(){delete this.layerIndexes[f],delete this.availableImages[f],delete this.workerSources[f],delete this.demWorkerSources[f],this.globalStates.delete(f)})),this.actor.registerMessageHandler("SR",(f,u)=>l._(this,void 0,void 0,function*(){this.referrer=u})),this.actor.registerMessageHandler("SRPS",(f,u)=>this._syncRTLPluginState(f,u)),this.actor.registerMessageHandler("IS",(f,u)=>l._(this,void 0,void 0,function*(){this.self.importScripts(u)})),this.actor.registerMessageHandler("SI",(f,u)=>this._setImages(f,u)),this.actor.registerMessageHandler("UL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).update(u.layers,u.removedIds,this._getGlobalState(f))})),this.actor.registerMessageHandler("UGS",(f,u)=>l._(this,void 0,void 0,function*(){let A=this._getGlobalState(f);for(let x in u)A[x]=u[x]})),this.actor.registerMessageHandler("SL",(f,u)=>l._(this,void 0,void 0,function*(){this._getLayerIndex(f).replace(u,this._getGlobalState(f))}))}_getGlobalState(T){let f=this.globalStates.get(T);return f||(f={},this.globalStates.set(T,f)),f}_setImages(T,f){return l._(this,void 0,void 0,function*(){this.availableImages[T]=f;for(let u in this.workerSources[T]){let A=this.workerSources[T][u];for(let x in A)A[x].availableImages=f}})}_syncRTLPluginState(T,f){return l._(this,void 0,void 0,function*(){return yield l.d1.syncState(f,this.self.importScripts)})}_getAvailableImages(T){let f=this.availableImages[T];return f||(f=[]),f}_getLayerIndex(T){let f=this.layerIndexes[T];return f||(f=this.layerIndexes[T]=new e),f}_getWorkerSource(T,f,u){var A,x;if((A=this.workerSources)[T]||(A[T]={}),(x=this.workerSources[T])[f]||(x[f]={}),!this.workerSources[T][f][u]){let z={sendAsync:(I,O)=>(I.targetMapId=T,this.actor.sendAsync(I,O))};switch(f){case"vector":this.workerSources[T][f][u]=new g(z,this._getLayerIndex(T),this._getAvailableImages(T));break;case"geojson":this.workerSources[T][f][u]=new w(z,this._getLayerIndex(T),this._getAvailableImages(T));break;default:this.workerSources[T][f][u]=new this.externalWorkerSourceTypes[f](z,this._getLayerIndex(T),this._getAvailableImages(T))}}return this.workerSources[T][f][u]}_getDEMWorkerSource(T,f){var u,A;return(u=this.demWorkerSources)[T]||(u[T]={}),(A=this.demWorkerSources[T])[f]||(A[f]=new i),this.demWorkerSources[T][f]}}return l.i(self)&&(self.worker=new C(self)),C}),E("index",["exports","./shared"],function(l,e){"use strict";var t="5.24.0";function n(){var pe=new e.A(4);return e.A!=Float32Array&&(pe[1]=0,pe[2]=0),pe[0]=1,pe[3]=1,pe}let r,a,o,s={frame(pe,y,N,ie){let fe=ie||window,be=fe.requestAnimationFrame(je=>{Re(),y(je)}),{unsubscribe:Re}=e.s(pe.signal,"abort",()=>{Re(),fe.cancelAnimationFrame(be),N(new e.a(pe.signal.reason))},!1)},frameAsync(pe,y){return new Promise((N,ie)=>{this.frame(pe,N,ie,y)})},getImageData(pe,y=0){return this.getImageCanvasContext(pe).getImageData(-y,-y,pe.width+2*y,pe.height+2*y)},getImageCanvasContext(pe){let y=window.document.createElement("canvas"),N=y.getContext("2d",{willReadFrequently:!0});if(!N)throw new Error("failed to create canvas 2d context");return y.width=pe.width,y.height=pe.height,N.drawImage(pe,0,0,pe.width,pe.height),N},resolveURL:pe=>(r||(r=document.createElement("a")),r.href=pe,r.href),hardwareConcurrency:typeof navigator<"u"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return o!==void 0?o:!!matchMedia&&(a!=null||(a=matchMedia("(prefers-reduced-motion: reduce)")),a.matches)},set prefersReducedMotion(pe){o=pe}},c=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(pe){this._frozenAt=pe}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function m(){return c.getCurrentTime()}var h,v;class g{static create(y,N,ie){let fe=window.document.createElement(y);return N!==void 0&&(fe.className=N),ie&&ie.appendChild(fe),fe}static createNS(y,N){return window.document.createElementNS(y,N)}static disableDrag(){g.docStyle&&g.selectProp&&(g.userSelect=g.docStyle[g.selectProp],g.docStyle[g.selectProp]="none")}static enableDrag(){g.docStyle&&g.selectProp&&(g.docStyle[g.selectProp]=g.userSelect)}static suppressClickInternal(y){y.preventDefault(),y.stopPropagation(),window.removeEventListener("click",g.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",g.suppressClickInternal,!0),window.setTimeout(()=>{window.removeEventListener("click",g.suppressClickInternal,!0)},0)}static getScale(y){let N=y.getBoundingClientRect();return{x:N.width/y.offsetWidth||1,y:N.height/y.offsetHeight||1,boundingClientRect:N}}static getPoint(y,N,ie){let fe=N.boundingClientRect;return new e.P((ie.clientX-fe.left)/N.x-y.clientLeft,(ie.clientY-fe.top)/N.y-y.clientTop)}static mousePos(y,N){let ie=g.getScale(y);return g.getPoint(y,ie,N)}static touchPos(y,N){let ie=[],fe=g.getScale(y);for(let be of N)ie.push(g.getPoint(y,fe,be));return ie}static sanitize(y){let N=new DOMParser().parseFromString(y,"text/html").body||document.createElement("body"),ie=N.querySelectorAll("script");for(let fe of ie)fe.remove();return g.clean(N),N.innerHTML}static isPossiblyDangerous(y,N){let ie=N.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(y)||!ie.includes("javascript:")&&!ie.includes("data:"))||!!y.startsWith("on")||void 0}static clean(y){let N=y.children;for(let ie of N)g.removeAttributes(ie),g.clean(ie)}static removeAttributes(y){for(let{name:N,value:ie}of y.attributes)g.isPossiblyDangerous(N,ie)&&y.removeAttribute(N)}}g.docStyle=typeof window<"u"&&((h=window.document)===null||h===void 0?void 0:h.documentElement.style),g.selectProp=!g.docStyle||"userSelect"in g.docStyle?"userSelect":"webkitUserSelect",function(pe){let y,N,ie,fe;pe.resetRequestQueue=()=>{y=[],N=0,ie=0,fe={}},pe.addThrottleControl=Ze=>{let ut=ie++;return fe[ut]=Ze,ut},pe.removeThrottleControl=Ze=>{delete fe[Ze],Re()},pe.getImage=(Ze,ut,ft=!0)=>new Promise((Dt,Gt)=>{Ze.headers||(Ze.headers={}),Ze.headers.accept="image/webp,*/*",e.e(Ze,{type:"image"}),y.push({abortController:ut,requestParameters:Ze,supportImageRefresh:ft,state:"queued",onError:Kt=>{Gt(Kt)},onSuccess:Kt=>{Dt(Kt)}}),Re()});let be=Ze=>e._(this,void 0,void 0,function*(){Ze.state="running";let{requestParameters:ut,supportImageRefresh:ft,onError:Dt,onSuccess:Gt,abortController:Kt}=Ze,st=ft===!1&&!e.i(self)&&!e.g(ut.url)&&(!ut.headers||Object.keys(ut.headers).reduce((ir,dr)=>ir&&dr==="accept",!0));N++;let It=st?je(ut,Kt):e.m(ut,Kt);try{let ir=yield It;delete Ze.abortController,Ze.state="completed",ir.data instanceof HTMLImageElement||e.b(ir.data)?Gt(ir):ir.data&&Gt({data:yield(Ut=ir.data,typeof createImageBitmap=="function"?e.h(Ut):e.j(Ut)),cacheControl:ir.cacheControl,expires:ir.expires})}catch(ir){delete Ze.abortController,Dt(e.d(ir))}finally{N--,Re()}var Ut}),Re=()=>{let Ze=(()=>{for(let ut of Object.keys(fe))if(fe[ut]())return!0;return!1})()?e.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:e.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let ut=N;ut0;ut++){let ft=y.shift();ft.abortController.signal.aborted?ut--:be(ft)}},je=(Ze,ut)=>new Promise((ft,Dt)=>{let Gt=new Image,Kt=Ze.url,st=Ze.credentials;st&&st==="include"?Gt.crossOrigin="use-credentials":(st&&st==="same-origin"||!e.f(Kt))&&(Gt.crossOrigin="anonymous"),ut.signal.addEventListener("abort",()=>{Gt.src="",Dt(new e.a(ut.signal.reason))}),Gt.fetchPriority="high",Gt.onload=()=>{Gt.onerror=Gt.onload=null,ft({data:Gt})},Gt.onerror=()=>{Gt.onerror=Gt.onload=null,ut.signal.aborted||Dt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))},Gt.src=Kt})}(v||(v={})),v.resetRequestQueue();class i{constructor(y){this._transformRequestFn=y??null}transformRequest(y,N){return this._transformRequestFn&&this._transformRequestFn(y,N)||{url:y}}setTransformRequest(y){this._transformRequestFn=y}}function w(pe){let y=[];if(typeof pe=="string")y.push({id:"default",url:pe});else if(pe&&pe.length>0){let N=[];for(let{id:ie,url:fe}of pe){let be=`${ie}${fe}`;N.includes(be)||(N.push(be),y.push({id:ie,url:fe}))}}return y}function S(pe,y,N){try{let ie=new URL(pe);return ie.pathname+=`${y}${N}`,ie.toString()}catch{throw new Error(`Invalid sprite URL "${pe}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function M(pe){let{userImage:y}=pe;return!(!y?.render||!y.render()||(pe.data.replace(new Uint8Array(y.data.buffer)),0))}class C extends e.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let y of Object.keys(this.images))this.removeImage(y);this.patterns={},this.atlasImage=new e.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(y){if(this.loaded!==y&&(this.loaded=y,y)){for(let{ids:N,promiseResolve:ie}of this.requestors)ie(this._getImagesForIds(N));this.requestors=[]}}getImage(y){let N=this.images[y];if(N&&!N.data&&N.spriteData){let ie=N.spriteData;N.data=new e.R({width:ie.width,height:ie.height},ie.context.getImageData(ie.x,ie.y,ie.width,ie.height).data),N.spriteData=null}return N}addImage(y,N){if(this.images[y])throw new Error(`Image id ${y} already exist, use updateImage instead`);this._validate(y,N)&&(this.images[y]=N)}_validate(y,N){let ie=!0,fe=N.data||N.spriteData;return this._validateStretch(N.stretchX,fe?.width)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchX" value`))),ie=!1),this._validateStretch(N.stretchY,fe?.height)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "stretchY" value`))),ie=!1),this._validateContent(N.content,N)||(this.fire(new e.l(new Error(`Image "${y}" has invalid "content" value`))),ie=!1),ie}_validateStretch(y,N){if(!y)return!0;let ie=0;for(let fe of y){if(fe[0]=y[1]))}updateImage(y,N,ie=!0){let fe=this.getImage(y);if(ie&&(fe.data.width!==N.data.width||fe.data.height!==N.data.height))throw new Error(`size mismatch between old image (${fe.data.width}x${fe.data.height}) and new image (${N.data.width}x${N.data.height}).`);N.version=fe.version+1,this.images[y]=N,this.updatedImages[y]=!0}removeImage(y){var N;let ie=this.images[y];delete this.images[y],delete this.patterns[y],!((N=ie.userImage)===null||N===void 0)&&N.onRemove&&ie.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(y){return new Promise((N,ie)=>{let fe=!0;if(!this.isLoaded())for(let be of y)this.images[be]||(fe=!1);this.isLoaded()||fe?N(this._getImagesForIds(y)):this.requestors.push({ids:y,promiseResolve:N})})}_getImagesForIds(y){var N;let ie={};for(let fe of y){let be=this.getImage(fe);be||(this.fire(new e.n("styleimagemissing",{id:fe})),be=this.getImage(fe)),be?ie[fe]={data:be.data.clone(),pixelRatio:be.pixelRatio,sdf:be.sdf,version:be.version,stretchX:be.stretchX,stretchY:be.stretchY,content:be.content,textFitWidth:be.textFitWidth,textFitHeight:be.textFitHeight,hasRenderCallback:!!(!((N=be.userImage)===null||N===void 0)&&N.render)}:e.w(`Image "${fe}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return ie}getPixelSize(){let{width:y,height:N}=this.atlasImage;return{width:y,height:N}}getPattern(y){let N=this.patterns[y],ie=this.getImage(y);if(!ie)return null;if(N&&N.position.version===ie.version)return N.position;if(N)N.position.version=ie.version;else{let fe={w:ie.data.width+2,h:ie.data.height+2,x:0,y:0},be=new e.I(fe,ie);this.patterns[y]={bin:fe,position:be}}return this._updatePatternAtlas(),this.patterns[y].position}bind(y){let N=y.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new e.T(y,this.atlasImage,N.RGBA),this.atlasTexture.bind(N.LINEAR,N.CLAMP_TO_EDGE)}_updatePatternAtlas(){let y=[];for(let be in this.patterns)y.push(this.patterns[be].bin);let{w:N,h:ie}=e.p(y),fe=this.atlasImage;fe.resize({width:N||1,height:ie||1});for(let be in this.patterns){let{bin:Re}=this.patterns[be],je=Re.x+1,Ze=Re.y+1,ut=this.getImage(be).data,ft=ut.width,Dt=ut.height;e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze},{width:ft,height:Dt}),e.R.copy(ut,fe,{x:0,y:Dt-1},{x:je,y:Ze-1},{width:ft,height:1}),e.R.copy(ut,fe,{x:0,y:0},{x:je,y:Ze+Dt},{width:ft,height:1}),e.R.copy(ut,fe,{x:ft-1,y:0},{x:je-1,y:Ze},{width:1,height:Dt}),e.R.copy(ut,fe,{x:0,y:0},{x:je+ft,y:Ze},{width:1,height:Dt})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(y){for(let N of y){if(this.callbackDispatchedThisFrame[N])continue;this.callbackDispatchedThisFrame[N]=!0;let ie=this.getImage(N);ie||e.w(`Image with ID: "${N}" was not found`),M(ie)&&this.updateImage(N,ie)}}cloneImages(){let y={};for(let N in this.images){let ie=this.images[N];y[N]=Object.assign(Object.assign({},ie),{data:ie.data?ie.data.clone():null})}return y}}let _=1e20,T=new Float64Array(256);for(let pe=0;pe<256;pe++){let y=.5-Math.pow(pe/255,.45454545454545453);T[pe]=y*Math.abs(y)}function f(pe,y,N,ie,fe,be,Re,je,Ze){for(let ut=y;ut-1);Ze++,be[Ze]=je,Re[Ze]=ut,Re[Ze+1]=_}for(let je=0,Ze=0;je/[-\w]+/.test(fe)?fe:`'${CSS.escape(fe)}'`).join(",");return new x.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:ie,fontWeight:this._fontWeight(N[0]),fontStyle:this._fontStyle(N[0]),lang:this.lang})}_fontStyle(y){return/italic/i.test(y)?"italic":/oblique/i.test(y)?"oblique":"normal"}_fontWeight(y){let N={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},ie;for(let[fe,be]of Object.entries(N))new RegExp(`\\b${fe}\\b`,"i").test(y)&&(ie=`${be}`);return ie}destroy(){for(let y in this.entries){let N=this.entries[y];N.tinySDF=null,N.ideographTinySDF=null,N.glyphs={},N.requests={},N.ranges={}}this.entries={}}}x.loadGlyphRange=function(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=256*y,be=fe+255,Re=yield ie.transformRequest(N.replace("{fontstack}",pe).replace("{range}",`${fe}-${be}`),"Glyphs"),je=yield e.o(Re,new AbortController);if(!je?.data)throw new Error(`Could not load glyph range. range: ${y}, ${fe}-${be}`);let Ze={};for(let ut of e.q(je.data))Ze[ut.id]=ut;return Ze})},x.TinySDF=class{constructor({fontSize:pe=24,buffer:y=3,radius:N=8,cutoff:ie=.25,fontFamily:fe="sans-serif",fontWeight:be="normal",fontStyle:Re="normal",lang:je=null}={}){this.buffer=y,this.radius=N,this.cutoff=ie,this.lang=je;let Ze=this.size=pe+4*y,ut=this._createCanvas(Ze),ft=this.ctx=ut.getContext("2d",{willReadFrequently:!0});ft.font=`${Re} ${be} ${pe}px ${fe}`,ft.textBaseline="alphabetic",ft.textAlign="left",ft.fillStyle="black",this.gridOuter=new Float64Array(Ze*Ze),this.gridInner=new Float64Array(Ze*Ze),this.f=new Float64Array(Ze),this.z=new Float64Array(Ze+1),this.v=new Uint16Array(Ze)}_createCanvas(pe){if(typeof OffscreenCanvas<"u")return new OffscreenCanvas(pe,pe);let y=document.createElement("canvas");return y.width=y.height=pe,y}draw(pe){let{width:y,actualBoundingBoxAscent:N,actualBoundingBoxDescent:ie,actualBoundingBoxLeft:fe,actualBoundingBoxRight:be}=this.ctx.measureText(pe),Re=Math.ceil(N),je=Math.floor(fe),Ze=Math.max(0,Math.min(this.size-this.buffer,Math.ceil(be)-je)),ut=Math.max(0,Math.min(this.size-this.buffer,Re+Math.ceil(ie))),ft=Ze+2*this.buffer,Dt=ut+2*this.buffer,Gt=Math.max(ft*Dt,0),Kt=new Uint8ClampedArray(Gt),st={data:Kt,width:ft,height:Dt,glyphWidth:Ze,glyphHeight:ut,glyphTop:Re,glyphLeft:je,glyphAdvance:y};if(Ze===0||ut===0)return st;let{ctx:It,buffer:Ut,gridInner:ir,gridOuter:dr}=this;this.lang&&(It.lang=this.lang),It.clearRect(Ut,Ut,Ze,ut),It.fillText(pe,Ut-je,Ut+Re);let Ar=It.getImageData(Ut,Ut,Ze,ut);dr.fill(_,0,Gt),ir.fill(0,0,Gt);let hr=3;for(let Cr=0;Cr1&&(Ze=y[++je]);let ft=Math.abs(ut-Ze.left),Dt=Math.abs(ut-Ze.right),Gt=Math.min(ft,Dt),Kt,st=be/ie*(fe+1);if(Ze.isDash){let It=fe-Math.abs(st);Kt=Math.sqrt(Gt*Gt+It*It)}else Kt=fe-Math.sqrt(Gt*Gt+st*st);this.data[Re+ut]=Math.max(0,Math.min(255,Kt+128))}}}addRegularDash(y){for(let je=y.length-1;je>=0;--je){let Ze=y[je],ut=y[je+1];Ze.zeroLength?y.splice(je,1):ut&&ut.isDash===Ze.isDash&&(ut.left=Ze.left,y.splice(je,1))}let N=y[0],ie=y[y.length-1];N.isDash===ie.isDash&&(N.left=ie.left-this.width,ie.right=N.right+this.width);let fe=this.width*this.nextRow,be=0,Re=y[be];for(let je=0;je1&&(Re=y[++be]);let Ze=Math.abs(je-Re.left),ut=Math.abs(je-Re.right),ft=Math.min(Ze,ut);this.data[fe+je]=Math.max(0,Math.min(255,(Re.isDash?ft:-ft)+128))}}addDash(y,N){let ie=N?7:0,fe=2*ie+1;if(this.nextRow+fe>this.height)return e.w("LineAtlas out of space"),null;let be=0;for(let je of y)be+=je;if(be!==0){let je=this.width/be,Ze=this.getDashRanges(y,this.width,je);N?this.addRoundDash(Ze,je,ie):this.addRegularDash(Ze)}let Re={y:this.nextRow+ie,height:2*ie,width:be};return this.nextRow+=fe,this.dirty=!0,Re}bind(y){let N=y.gl;this.texture?(N.bindTexture(N.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,N.texSubImage2D(N.TEXTURE_2D,0,0,0,this.width,this.height,N.ALPHA,N.UNSIGNED_BYTE,this.data))):(this.texture=N.createTexture(),N.bindTexture(N.TEXTURE_2D,this.texture),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.REPEAT),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.LINEAR),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.LINEAR),N.texImage2D(N.TEXTURE_2D,0,N.ALPHA,this.width,this.height,0,N.ALPHA,N.UNSIGNED_BYTE,this.data))}}let P="maplibre_preloaded_worker_pool";class j{constructor(){this.active={}}acquire(y){if(!this.workers)for(this.workers=[];this.workers.lengthe.m(y,N))),Q}function G(pe,y){let N=e.O();return e.Q(N,N,[1,1,0]),e.S(N,N,[.5*pe.width,.5*pe.height,1]),pe.calculatePosMatrix?e.U(N,N,pe.calculatePosMatrix(y.toUnwrapped())):N}function X(pe,y,N,ie,fe,be,Re){var je;let Ze=function(Gt,Kt,st){if(Gt)for(let It of Gt){let Ut=Kt[It];if(Ut?.source===st&&Ut.type==="fill-extrusion")return!0}else for(let It in Kt){let Ut=Kt[It];if(Ut.source===st&&Ut.type==="fill-extrusion")return!0}return!1}((je=fe?.layers)!==null&&je!==void 0?je:null,y,pe.id),ut=be.maxPitchScaleFactor(),ft=pe.tilesIn(ie,ut,Ze);ft.sort(K);let Dt=[];for(let Gt of ft)Dt.push({wrappedTileID:Gt.tileID.wrapped().key,queryResults:Gt.tile.queryRenderedFeatures(y,N,pe.getState(),Gt.queryGeometry,Gt.cameraQueryGeometry,Gt.scale,fe,be,ut,G(be,Gt.tileID),Re?(Kt,st)=>Re(Gt.tileID,Kt,st):void 0)});return function(Gt,Kt){for(let st in Gt)for(let It of Gt[st])H(It,Kt);return Gt}(function(Gt){let Kt={},st={};for(let{queryResults:It,wrappedTileID:Ut}of Gt){st[Ut]||(st[Ut]={});let ir=st[Ut];for(let dr in It){let Ar=It[dr];ir[dr]||(ir[dr]={});let hr=ir[dr];Kt[dr]||(Kt[dr]=[]);for(let vr of Ar)hr[vr.featureIndex]||(hr[vr.featureIndex]=!0,Kt[dr].push(vr))}}return Kt}(Dt),pe)}function K(pe,y){let N=pe.tileID,ie=y.tileID;return N.overscaledZ-ie.overscaledZ||N.canonical.y-ie.canonical.y||N.wrap-ie.wrap||N.canonical.x-ie.canonical.x}function H(pe,y){let N=pe.feature,ie=y.getFeatureState(N.layer["source-layer"],N.id);N.source=N.layer.source,N.layer["source-layer"]&&(N.sourceLayer=N.layer["source-layer"]),N.state=ie}function Y(pe,y,N,ie){return e._(this,void 0,void 0,function*(){let fe=pe;if(pe.url?fe=(yield e.k(yield y.transformRequest(pe.url,"Source"),N)).data:yield s.frameAsync(N,ie),!fe)return null;let be=e.V(e.e(fe,pe),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in fe&&fe.vector_layers&&(be.vectorLayerIds=fe.vector_layers.map(Re=>Re.id)),be})}class q{constructor(y,N){y&&(N?this.setSouthWest(y).setNorthEast(N):Array.isArray(y)&&(y.length===4?this.setSouthWest([y[0],y[1]]).setNorthEast([y[2],y[3]]):this.setSouthWest(y[0]).setNorthEast(y[1])))}setNorthEast(y){return this._ne=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}setSouthWest(y){return this._sw=y instanceof e.W?new e.W(y.lng,y.lat):e.W.convert(y),this}extend(y){let N=this._sw,ie=this._ne,fe,be;if(y instanceof e.W)fe=y,be=y;else{if(!(y instanceof q))return Array.isArray(y)?y.length===4||y.every(Array.isArray)?this.extend(q.convert(y)):this.extend(e.W.convert(y)):y&&("lng"in y||"lon"in y)&&"lat"in y?this.extend(e.W.convert(y)):this;if(fe=y._sw,be=y._ne,!fe||!be)return this}return N||ie?(N.lng=Math.min(fe.lng,N.lng),N.lat=Math.min(fe.lat,N.lat),ie.lng=Math.max(be.lng,ie.lng),ie.lat=Math.max(be.lat,ie.lat)):(this._sw=new e.W(fe.lng,fe.lat),this._ne=new e.W(be.lng,be.lat)),this}getCenter(){return new e.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new e.W(this.getWest(),this.getNorth())}getSouthEast(){return new e.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(y){let{lng:N,lat:ie}=e.W.convert(y),fe=this._sw.lng<=N&&N<=this._ne.lng;return this._sw.lng>this._ne.lng&&(fe=this._sw.lng>=N&&N>=this._ne.lng),this._sw.lat<=ie&&ie<=this._ne.lat&&fe}intersects(y){if(!((y=q.convert(y)).getNorth()>=this.getSouth()&&y.getSouth()<=this.getNorth()))return!1;let N=Math.abs(this.getEast()-this.getWest()),ie=Math.abs(y.getEast()-y.getWest());if(N>=360||ie>=360)return!0;let fe=e.X(this.getWest(),-180,180),be=e.X(this.getEast(),-180,180),Re=e.X(y.getWest(),-180,180),je=e.X(y.getEast(),-180,180),Ze=fe>be,ut=Re>je;return!(!Ze||!ut)||(Ze?je>=fe||Re<=be:ut?be>=Re||fe<=je:Re<=be&&je>=fe)}static convert(y){return y instanceof q?y:y&&new q(y)}static fromLngLat(y,N=0){let ie=360*N/40075017,fe=ie/Math.cos(Math.PI/180*y.lat);return new q(new e.W(y.lng-fe,y.lat-ie),new e.W(y.lng+fe,y.lat+ie))}adjustAntiMeridian(){let y=new e.W(this._sw.lng,this._sw.lat),N=new e.W(this._ne.lng,this._ne.lat);return new q(y,y.lng>N.lng?new e.W(N.lng+360,N.lat):N)}}class Z{constructor(y,N,ie){this.bounds=q.convert(this.validateBounds(y)),this.minzoom=N||0,this.maxzoom=ie||24}validateBounds(y){return Array.isArray(y)&&y.length===4?[Math.max(-180,y[0]),Math.max(-90,y[1]),Math.min(180,y[2]),Math.min(90,y[3])]:[-180,-90,180,90]}contains(y){let N=Math.pow(2,y.z),ie=Math.floor(e.Z(this.bounds.getWest())*N),fe=Math.floor(e.Y(this.bounds.getNorth())*N),be=Math.ceil(e.Z(this.bounds.getEast())*N),Re=Math.ceil(e.Y(this.bounds.getSouth())*N);return y.x>=ie&&y.x=fe&&y.y{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return e.e({},this._options)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie={request:yield this.map._requestManager.transformRequest(N,"Tile"),uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,tileSize:this.tileSize*y.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(y),etag:y.etag};ie.request.collectResourceTiming=this._collectResourceTiming;let fe="RT";if(y.actor&&y.state!=="expired"){if(y.state==="loading")return new Promise((be,Re)=>{y.reloadPromise={resolve:be,reject:Re}})}else y.actor=this.dispatcher.getActor(),fe="LT";y.abortController=new AbortController;try{let be=yield y.actor.sendAsync({type:fe,data:ie},y.abortController);if(delete y.abortController,y.aborted)return;this._afterTileLoadWorkerResponse(y,be);let Re={};return be?.etagUnmodified&&(Re.unmodified=!0),Re}catch(be){if(delete y.abortController,y.aborted)return;if(be&&be.status!==404)throw be;this._afterTileLoadWorkerResponse(y,null)}})}_getOverzoomParameters(y){return e._(this,void 0,void 0,function*(){if(y.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let N=y.tileID.scaledTo(this.maxzoom).canonical,ie=N.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:N,overzoomRequest:yield this.map._requestManager.transformRequest(ie,"Tile")}})}_afterTileLoadWorkerResponse(y,N){if(N?.resourceTiming&&(y.resourceTiming=N.resourceTiming),N&&this.map._refreshExpiredTiles&&y.setExpiryData(N),y.etag=N?.etag,y.loadVectorData(N,this.map.painter),y.reloadPromise){let ie=y.reloadPromise;y.reloadPromise=null,this.loadTile(y).then(ie.resolve).catch(ie.reject)}}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.actor&&(yield y.actor.sendAsync({type:"AT",data:{uid:y.uid,type:this.type,source:this.id}}))})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),y.actor&&(yield y.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}}))})}hasTransition(){return!1}}class ae extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.dispatcher=ie,this.setEventedParent(fe),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=e.e({type:"raster"},N),e.e(this,e.V(N,["url","scheme","tileSize"]))}load(){return e._(this,arguments,void 0,function*(y=!1){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let N=yield Y(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,N&&(e.e(this,N),N.bounds&&(this.tileBounds=new Z(N.bounds,this.minzoom,this.maxzoom)),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new e.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:y})))}catch(N){this._tileJSONRequest=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}onAdd(y){this.map=y,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(y){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),y(),this.load(!0)}setTiles(y){return this.setSourceProperty(()=>{this._options.tiles=y}),this}setUrl(y){return this.setSourceProperty(()=>{this.url=y,this._options.url=y}),this}serialize(){return e.e({},this._options)}hasTile(y){return!this.tileBounds||this.tileBounds.contains(y.canonical)}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);y.abortController=new AbortController;try{let ie=yield v.getImage(yield this.map._requestManager.transformRequest(N,"Tile"),y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(ie?.data){this.map._refreshExpiredTiles&&(ie.cacheControl||ie.expires)&&y.setExpiryData({cacheControl:ie.cacheControl,expires:ie.expires});let fe=this.map.painter.context,be=fe.gl,Re=ie.data;y.texture=this.map.painter.getTileTexture(Re.width),y.texture?y.texture.update(Re,{useMipmap:!0}):(y.texture=new e.T(fe,Re,be.RGBA,{useMipmap:!0}),y.texture.bind(be.LINEAR,be.CLAMP_TO_EDGE,be.LINEAR_MIPMAP_NEAREST)),y.state="loaded"}}catch(ie){if(delete y.abortController,y.aborted)y.state="unloaded";else if(ie)throw y.state="errored",ie}})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController)})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.texture&&this.map.painter.saveTileTexture(y.texture)})}hasTransition(){return!1}}class he extends ae{constructor(y,N,ie,fe){super(y,N,ie,fe),this.type="raster-dem",this.maxzoom=22,this._options=e.e({type:"raster-dem"},N),this.encoding=N.encoding||"mapbox",this.redFactor=N.redFactor,this.greenFactor=N.greenFactor,this.blueFactor=N.blueFactor,this.baseShift=N.baseShift}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),ie=yield this.map._requestManager.transformRequest(N,"Tile");y.neighboringTiles=this._getNeighboringTiles(y.tileID),y.abortController=new AbortController;try{let fe=yield v.getImage(ie,y.abortController,this.map._refreshExpiredTiles);if(delete y.abortController,y.aborted)return void(y.state="unloaded");if(fe?.data){let be=fe.data;this.map._refreshExpiredTiles&&(fe.cacheControl||fe.expires)&&y.setExpiryData({cacheControl:fe.cacheControl,expires:fe.expires});let Re=e.b(be)&&e.a0()?be:yield this.readImageNow(be),je={type:this.type,uid:y.uid,source:this.id,rawImageData:Re,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(y.actor&&y.state!=="expired"&&y.state!=="reloading")return;y.actor&&y.state!=="expired"||(y.actor=this.dispatcher.getActor()),y.dem=yield y.actor.sendAsync({type:"LDT",data:je}),y.needsHillshadePrepare=!0,y.needsTerrainPrepare=!0,y.state="loaded"}}catch(fe){if(delete y.abortController,y.aborted)y.state="unloaded";else if(fe)throw y.state="errored",fe}})}readImageNow(y){return e._(this,void 0,void 0,function*(){if(typeof VideoFrame<"u"&&e.a1()){let N=y.width+2,ie=y.height+2;try{return new e.R({width:N,height:ie},yield e.a2(y,-1,-1,N,ie))}catch{}}return s.getImageData(y,1)})}_getNeighboringTiles(y){let N=y.canonical,ie=Math.pow(2,N.z),fe=(N.x-1+ie)%ie,be=N.x===0?y.wrap-1:y.wrap,Re=(N.x+1+ie)%ie,je=N.x+1===ie?y.wrap+1:y.wrap,Ze={};return Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y).key]={backfilled:!1},N.y>0&&(Ze[new e.a3(y.overscaledZ,be,N.z,fe,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,y.wrap,N.z,N.x,N.y-1).key]={backfilled:!1},Ze[new e.a3(y.overscaledZ,je,N.z,Re,N.y-1).key]={backfilled:!1}),N.y+1be.key===ie);fe>-1&&pe.addOrUpdateProperties.splice(fe,1)}return(pe.removeAllProperties||y.removeAllProperties)&&(N.removeAllProperties=!0),(pe.removeProperties||y.removeProperties)&&(N.removeProperties=[...pe.removeProperties||[],...y.removeProperties||[]]),(pe.addOrUpdateProperties||y.addOrUpdateProperties)&&(N.addOrUpdateProperties=[...pe.addOrUpdateProperties||[],...y.addOrUpdateProperties||[]]),(pe.newGeometry||y.newGeometry)&&(N.newGeometry=y.newGeometry||pe.newGeometry),N}function Me(pe){var y,N;if(!pe)return{};let ie={};return ie.removeAll=pe.removeAll,ie.remove=new Set(pe.remove||[]),ie.add=new Map((y=pe.add)===null||y===void 0?void 0:y.map(fe=>[fe.id,fe])),ie.update=new Map((N=pe.update)===null||N===void 0?void 0:N.map(fe=>[fe.id,fe])),ie}function Se(pe){return pe&&pe.length!==0?typeof pe[0]=="number"?[pe]:pe.flatMap(y=>Se(y)):[]}function Ie(pe){return pe.type==="GeometryCollection"?pe.geometries.flatMap(y=>Ie(y)):Se(pe.coordinates)}function Ve(pe){let y=new q,N;switch(pe.type){case"FeatureCollection":N=pe.features.flatMap(ie=>Ie(ie.geometry));break;case"Feature":N=Ie(pe.geometry);break;default:N=Ie(pe)}if(N.length===0)return y;for(let ie of N){let[fe,be]=ie;y.extend([fe,be])}return y}class Ge extends e.E{constructor(y,N,ie,fe){super(),this.id=y,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:N.data},this.actor=ie.getActor(),this.setEventedParent(fe),this._data=typeof N.data=="string"?{url:N.data}:{geojson:N.data},this._options=e.e({},N),this._collectResourceTiming=N.collectResourceTiming,N.maxzoom!==void 0&&(this.maxzoom=N.maxzoom),N.type&&(this.type=N.type),N.attribution&&(this.attribution=N.attribution),this.promoteId=N.promoteId,N.clusterMaxZoom!==void 0&&this.maxzoom<=N.clusterMaxZoom&&e.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${N.clusterMaxZoom}".`),this.workerOptions=e.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(N.buffer!==void 0?N.buffer:128),tolerance:this._pixelsToTileUnits(N.tolerance!==void 0?N.tolerance:.375),extent:e.a6,maxZoom:this.maxzoom,lineMetrics:N.lineMetrics||!1,generateId:N.generateId||!1,promoteId:typeof N.promoteId=="string"?N.promoteId:void 0,cluster:N.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(N.clusterMaxZoom),minPoints:Math.max(2,N.clusterMinPoints||2),extent:e.a6,radius:this._pixelsToTileUnits(N.clusterRadius||50),log:!1,generateId:N.generateId||!1}},clusterProperties:N.clusterProperties,filter:N.filter},N.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(y){return y*(e.a6/this.tileSize)}_getClusterMaxZoom(y){let N=y?Math.round(y):this.maxzoom-1;return Number.isInteger(y)||y===void 0||e.w(`Integer expected for option 'clusterMaxZoom': provided value "${y}" rounded to "${N}"`),N}load(){return e._(this,void 0,void 0,function*(){yield this._updateWorkerData()})}onAdd(y){this.map=y,this.load()}setData(y,N){this._data=typeof y=="string"?{url:y}:{geojson:y},this._pendingWorkerUpdate={data:y};let ie=this._updateWorkerData();return N?ie:this}updateData(y,N){this._pendingWorkerUpdate.diff=function(fe,be){if(!fe)return be||{};if(!be)return fe||{};let Re=Me(fe),je=Me(be);(function(ut,ft){ft.removeAll&&(ut.add.clear(),ut.update.clear(),ut.remove.clear(),ft.remove.clear());for(let Dt of ft.remove)ut.add.delete(Dt),ut.update.delete(Dt);for(let[Dt,Gt]of ft.update){let Kt=ut.update.get(Dt);Kt&&(ft.update.set(Dt,we(Kt,Gt)),ut.update.delete(Dt))}})(Re,je);let Ze={};if((Re.removeAll||je.removeAll)&&(Ze.removeAll=!0),Ze.remove=new Set([...Re.remove,...je.remove]),Ze.add=new Map([...Re.add,...je.add]),Ze.update=new Map([...Re.update,...je.update]),Ze.remove.size&&Ze.add.size)for(let ut of Ze.add.keys())Ze.remove.delete(ut);return function(ut){let ft={};return ut.removeAll&&(ft.removeAll=ut.removeAll),ut.remove&&(ft.remove=Array.from(ut.remove)),ut.add&&(ft.add=Array.from(ut.add.values())),ut.update&&(ft.update=Array.from(ut.update.values())),ft}(Ze)}(this._pendingWorkerUpdate.diff,y);let ie=this._updateWorkerData();return N?ie:this}getData(){return e._(this,void 0,void 0,function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}})}getBounds(){return e._(this,void 0,void 0,function*(){return Ve(yield this.getData())})}setClusterOptions(y){return this.workerOptions.geojsonVtOptions.cluster=y.cluster,y.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(y.clusterRadius)),y.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(y.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(y){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:y,source:this.id}})}getClusterChildren(y){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:y,source:this.id}})}getClusterLeaves(y,N,ie){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:y,limit:N,offset:ie}})}_updateWorkerData(){return e._(this,void 0,void 0,function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void e.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:y,diff:N,updateCluster:ie}=this._pendingWorkerUpdate,fe=this._getLoadGeoJSONParameters(y,N,ie);y!==void 0?this._pendingWorkerUpdate.data=void 0:N?this._pendingWorkerUpdate.diff=void 0:ie&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(fe)})}_getLoadGeoJSONParameters(y,N,ie){return e._(this,void 0,void 0,function*(){let fe=e.e({type:this.type},this.workerOptions);return typeof y=="string"?(fe.request=yield this.map._requestManager.transformRequest(s.resolveURL(y),"Source"),fe.request.collectResourceTiming=this._collectResourceTiming,fe):y!==void 0?(fe.data=y,fe):N?(fe.dataDiff=N,fe):ie?(fe.updateCluster=!0,fe):void 0})}_dispatchWorkerUpdate(y){return e._(this,void 0,void 0,function*(){this._isUpdatingWorker=!0,this.fire(new e.n("dataloading",{dataType:"source"}));try{let N=yield y,ie=yield this.actor.sendAsync({type:"LD",data:N});if(this._isUpdatingWorker=!1,this._removed||ie.abandoned)return void this.fire(new e.n("dataabort",{dataType:"source"}));ie.data&&(this._data={geojson:ie.data});let fe=this._applyDiffToSource(N.dataDiff),be=this._getShouldReloadTileOptions(fe),Re={dataType:"source"};this._applyResourceTiming(Re,ie),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"metadata"}))),this.fire(new e.n("data",Object.assign(Object.assign({},Re),{sourceDataType:"content",shouldReloadTileOptions:be})))}catch(N){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new e.n("dataabort",{dataType:"source"}));this.fire(new e.l(e.d(N)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}})}_applyResourceTiming(y,N){var ie;if(!this._collectResourceTiming)return;let fe=(ie=N.resourceTiming)===null||ie===void 0?void 0:ie[this.id];if(!fe)return;let be=fe.slice(0);be?.length&&e.e(y,{resourceTiming:be})}_applyDiffToSource(y){if(!y)return;let N=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let fe=function(be,Re){let je=new Map;if(be==null||be.type==null)return je;if(be.type==="Feature"){let Ze=xe(be,Re);return Ze==null?void 0:(je.set(Ze,be),je)}if(be.type==="FeatureCollection"){let Ze=new Set;for(let ut of be.features){let ft=xe(ut,Re);if(ft==null||Ze.has(ft))return;Ze.add(ft),je.set(ft,ut)}return je}}(this._data.geojson,N);if(!fe)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:fe}}if(!this._data.updateable)return;let ie=function(fe,be,Re){var je,Ze;let ut=[];if(be.removeAll)fe.clear();else if(be.remove)for(let ft of be.remove){let Dt=fe.get(ft);Dt&&(ut.push(Dt.geometry),fe.delete(ft))}if(be.add)for(let ft of be.add){let Dt=xe(ft,Re);if(Dt==null)continue;let Gt=fe.get(Dt);Gt&&ut.push(Gt.geometry),ut.push(ft.geometry),fe.set(Dt,ft)}if(be.update)for(let ft of be.update){let Dt=fe.get(ft.id);if(!Dt)continue;let Gt=!!ft.newGeometry,Kt=ft.removeAllProperties||((je=ft.removeProperties)===null||je===void 0?void 0:je.length)>0||((Ze=ft.addOrUpdateProperties)===null||Ze===void 0?void 0:Ze.length)>0;if(!Gt&&!Kt)continue;ut.push(Dt.geometry);let st=Object.assign({},Dt);if(fe.set(ft.id,st),Gt&&(ut.push(ft.newGeometry),st.geometry=ft.newGeometry),Kt){if(st.properties=ft.removeAllProperties?{}:Object.assign({},st.properties||{}),ft.removeProperties)for(let It of ft.removeProperties)delete st.properties[It];if(ft.addOrUpdateProperties)for(let{key:It,value:Ut}of ft.addOrUpdateProperties)st.properties[It]=Ut}}return ut}(this._data.updateable,y,N);return y.removeAll||this._options.cluster?void 0:ie}_getShouldReloadTileOptions(y){if(y)return{affectedBounds:y.filter(Boolean).map(N=>Ve(N))}}shouldReloadTile(y,{affectedBounds:N}){if(y.state==="loading")return!0;if(y.state==="unloaded")return!1;let{buffer:ie,extent:fe}=this.workerOptions.geojsonVtOptions,be=function({x:Re,y:je,z:Ze},ut=0){let ft=e.a4((Re-ut)/Math.pow(2,Ze)),Dt=e.a5((je+1+ut)/Math.pow(2,Ze)),Gt=e.a4((Re+1+ut)/Math.pow(2,Ze)),Kt=e.a5((je-ut)/Math.pow(2,Ze));return new q([ft,Dt],[Gt,Kt])}(y.tileID.canonical,ie/fe);for(let Re of N)if(be.intersects(Re))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(y){return e._(this,void 0,void 0,function*(){let N=y.actor?"RT":"LT";y.actor=this.actor;let ie={type:this.type,uid:y.uid,tileID:y.tileID,zoom:y.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};y.abortController=new AbortController;let fe=yield this.actor.sendAsync({type:N,data:ie},y.abortController);delete y.abortController,y.unloadVectorData(),y.aborted||y.loadVectorData(fe,this.map.painter,N==="RT")})}abortTile(y){return e._(this,void 0,void 0,function*(){y.abortController&&(y.abortController.abort(),delete y.abortController),y.aborted=!0})}unloadTile(y){return e._(this,void 0,void 0,function*(){y.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:y.uid,type:this.type,source:this.id}})})}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return e.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class ke extends e.E{constructor(y,N,ie,fe){super(),this.flippedWindingOrder=!1,this.id=y,this.dispatcher=ie,this.coordinates=N.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(fe),this.options=N}load(y){return e._(this,void 0,void 0,function*(){this._loaded=!1,this.fire(new e.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let N=yield v.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,N?.data&&(this.image=N.data,y&&(this.coordinates=y),this._finishLoading())}catch(N){this._request=null,this._loaded=!0,e.$(N)||this.fire(new e.l(e.d(N)))}})}loaded(){return this._loaded}updateImage(y){return y.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=y.url,this.load(y.coordinates).finally(()=>this.texture=null),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new e.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(y){this.map=y,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(y){this.coordinates=y;let N=y.map(e.a7.fromLngLat);var ie;return this.tileID=function(fe){let be=e.a8.fromPoints(fe),Re=be.width(),je=be.height(),Ze=Math.max(Re,je),ut=Math.max(0,Math.floor(-Math.log(Ze)/Math.LN2)),ft=Math.pow(2,ut);return new e.aa(ut,Math.floor((be.minX+be.maxX)/2*ft),Math.floor((be.minY+be.maxY)/2*ft))}(N),this.terrainTileRanges=this._getOverlappingTileRanges(N),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=N.map(fe=>this.tileID.getTilePoint(fe)._round()),this.flippedWindingOrder=((ie=this.tileCoords)[1].x-ie[0].x)*(ie[2].y-ie[0].y)-(ie[1].y-ie[0].y)*(ie[2].x-ie[0].x)<0,this.fire(new e.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let y=this.map.painter.context,N=y.gl;this.texture||(this.texture=new e.T(y,this.image,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(y){return e._(this,void 0,void 0,function*(){var N;!((N=this.tileID)===null||N===void 0)&&N.equals(y.tileID.canonical)?(this.tiles[String(y.tileID.wrap)]=y,y.buckets={}):y.state="errored"})}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(y){let{minX:N,minY:ie,maxX:fe,maxY:be}=e.a8.fromPoints(y),Re={};for(let je=0;je<=e.a9;je++){let Ze=Math.pow(2,je),ut=Math.floor(N*Ze),ft=Math.floor(ie*Ze),Dt=Math.floor(fe*Ze),Gt=Math.floor(be*Ze),Kt=(ut%Ze+Ze)%Ze,st=Dt%Ze,It=Math.floor(ut/Ze),Ut=Math.floor(Dt/Ze);Re[je]={minWrap:It,maxWrap:Ut,minTileXWrapped:Kt,maxTileXWrapped:st,minTileY:ft,maxTileY:Gt}}return Re}}class _e extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),this._onPlayingHandler=()=>{var be;(be=this.map)===null||be===void 0||be.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=N}load(){return e._(this,void 0,void 0,function*(){this._loaded=!1;let y=this.options;this.urls=[];for(let N of y.urls)this.urls.push((yield this.map._requestManager.transformRequest(N,"Source")).url);try{let N=yield e.ab(this.urls);if(this._loaded=!0,!N)return;this.video=N,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(N){this.fire(new e.l(e.d(N)))}})}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(y){if(this.video){let N=this.video.seekable;yN.end(0)?this.fire(new e.l(new e.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${N.start(0)} and ${N.end(0)}-second mark.`))):this.video.currentTime=y}}getVideo(){return this.video}onAdd(y){this.map||(this.map=y,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let y=this.map.painter.context,N=y.gl;this.texture?this.video.paused||(this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE),N.texSubImage2D(N.TEXTURE_2D,0,0,0,N.RGBA,N.UNSIGNED_BYTE,this.video)):(this.texture=new e.T(y,this.video,N.RGBA),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let ie=!1;for(let fe in this.tiles){let be=this.tiles[fe];be.state!=="loaded"&&(be.state="loaded",be.texture=this.texture,ie=!0)}ie&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class ce extends ke{constructor(y,N,ie,fe){super(y,N,ie,fe),N.coordinates?Array.isArray(N.coordinates)&&N.coordinates.length===4&&!N.coordinates.some(be=>!Array.isArray(be)||be.length!==2||be.some(Re=>typeof Re!="number"))||this.fire(new e.l(new e.ac(`sources.${y}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new e.l(new e.ac(`sources.${y}`,null,'missing required property "coordinates"'))),N.animate&&typeof N.animate!="boolean"&&this.fire(new e.l(new e.ac(`sources.${y}`,null,'optional "animate" property must be a boolean value'))),N.canvas?typeof N.canvas=="string"||N.canvas instanceof HTMLCanvasElement||this.fire(new e.l(new e.ac(`sources.${y}`,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 e.l(new e.ac(`sources.${y}`,null,'missing required property "canvas"'))),this.options=N,this.animate=N.animate===void 0||N.animate}load(){return e._(this,void 0,void 0,function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new e.l(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())})}getCanvas(){return this.canvas}onAdd(y){this.map=y,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let y=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,y=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,y=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let N=this.map.painter.context,ie=N.gl;this.texture?(y||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new e.T(N,this.canvas,ie.RGBA,{premultiply:!0}),this.texture.bind(ie.LINEAR,ie.CLAMP_TO_EDGE));let fe=!1;for(let be in this.tiles){let Re=this.tiles[be];Re.state!=="loaded"&&(Re.state="loaded",Re.texture=this.texture,fe=!0)}fe&&this.fire(new e.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let y of[this.canvas.width,this.canvas.height])if(isNaN(y)||y<=0)return!0;return!1}}let ve={},le=pe=>{switch(pe){case"geojson":return Ge;case"image":return ke;case"raster":return ae;case"raster-dem":return he;case"vector":return ee;case"video":return _e;case"canvas":return ce}return ve[pe]},Ae="RTLPluginLoaded";class Be extends e.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=se()}_syncState(y){return this.status=y,this.dispatcher.broadcast("SRPS",{pluginStatus:y,pluginURL:this.url}).catch(N=>{throw this.status="error",N})}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(y){return e._(this,arguments,void 0,function*(N,ie=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=s.resolveURL(N),!this.url)throw new Error(`requested url ${N} is invalid`);if(this.status==="unavailable"){if(!ie)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()})}_requestImport(){return e._(this,void 0,void 0,function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new e.n(Ae))})}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let Xe=null;function Ye(){return Xe||(Xe=new Be),Xe}var yt,gt;(function(pe){pe[pe.Base=0]="Base",pe[pe.Parent=1]="Parent"})(yt||(yt={})),function(pe){pe[pe.Departing=0]="Departing",pe[pe.Incoming=1]="Incoming"}(gt||(gt={}));class Tt{constructor(y,N){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=y,this.uid=e.ad(),this.uses=0,this.tileSize=N,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(y){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(y||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:y,fadingDirection:N,fadingParentID:ie,fadeEndTime:fe}){this.resetFadeLogic(),this.fadingRole=y,this.fadingDirection=N,this.fadingParentID=ie,this.fadeEndTime=fe}setSelfFadeLogic(y){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=y}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=m(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(y){this.demTexture&&y.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(y,N,ie){if(y?.etagUnmodified!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",y){y.featureIndex&&(this.latestFeatureIndex=y.featureIndex,y.rawTileData?(this.latestRawTileData=y.rawTileData,this.latestEncoding=y.encoding,this.latestFeatureIndex.rawTileData=y.rawTileData,this.latestFeatureIndex.encoding=y.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=y.collisionBoxArray,this.buckets=function(fe,be){let Re={};if(!be)return Re;for(let je of fe){let Ze=je.layerIds.map(ut=>be.getLayer(ut)).filter(Boolean);if(Ze.length!==0){je.layers=Ze,je.stateDependentLayerIds&&(je.stateDependentLayers=je.stateDependentLayerIds.map(ut=>Ze.filter(ft=>ft.id===ut)[0]));for(let ut of Ze)Re[ut.id]=je}}return Re}(y.buckets,N?.style),this.hasSymbolBuckets=!1;for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af){if(this.hasSymbolBuckets=!0,!ie)break;be.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let fe in this.buckets){let be=this.buckets[fe];if(be instanceof e.af&&be.hasRTLText){this.hasRTLText=!0,Ye().lazyLoad();break}}this.queryPadding=0;for(let fe in this.buckets){let be=this.buckets[fe];this.queryPadding=Math.max(this.queryPadding,N.style.getLayer(fe).queryRadius(be))}y.imageAtlas&&(this.imageAtlas=y.imageAtlas),y.glyphAtlasImage&&(this.glyphAtlasImage=y.glyphAtlasImage),this.dashPositions=y.dashPositions}else this.collisionBoxArray=new e.ae;else this.state="loaded"}unloadVectorData(){for(let y in this.buckets)this.buckets[y].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(y){return this.buckets[y.id]}upload(y){for(let ie in this.buckets){let fe=this.buckets[ie];fe.uploadPending()&&fe.upload(y)}let N=y.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new e.T(y,this.imageAtlas.image,N.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new e.T(y,this.glyphAtlasImage,N.ALPHA),this.glyphAtlasImage=null)}prepare(y){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(y,this.imageAtlasTexture)}queryRenderedFeatures(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt){var Gt;return!((Gt=this.latestFeatureIndex)===null||Gt===void 0)&&Gt.rawTileData?this.latestFeatureIndex.query({queryGeometry:fe,cameraQueryGeometry:be,scale:Re,tileSize:this.tileSize,pixelPosMatrix:ft,transform:Ze,params:je,queryPadding:this.queryPadding*ut,getElevation:Dt},y,N,ie):{}}querySourceFeatures(y,N){let ie=this.latestFeatureIndex;if(!ie?.rawTileData)return;let fe=ie.loadVTLayers(),be=N?.sourceLayer?N.sourceLayer:"",Re=fe[e.ag]||fe[be];if(!Re)return;let je=e.ah(N?.filter,N?.globalState),{z:Ze,x:ut,y:ft}=this.tileID.canonical,Dt={z:Ze,x:ut,y:ft};for(let Gt=0;Gtie)fe=!1;else if(N)if(this.expirationTime({zoom:0,x:0,y:0,wrap:vr,fullyVisible:!1}),Ar=[],hr=[];if(pe.renderWorldCopies&&Re.allowWorldCopies())for(let vr=1;vr<=3;vr++)Ar.push(dr(-vr)),Ar.push(dr(vr));for(Ar.push(dr(0));Ar.length>0;){let vr=Ar.pop(),Or=vr.x,Cr=vr.y,ta=vr.fullyVisible,ka={x:Or,y:Cr,z:vr.zoom},Ta=Re.getTileBoundingVolume(ka,vr.wrap,pe.elevation,y);if(!ta){let ma=ht(N,Ta,ie);if(ma===0)continue;ta=ma===2}let Ra=Re.distanceToTile2d(fe.x,fe.y,ka,Ta),ua=Ze;je&&(ua=(y.calculateTileZoom||We)(pe.zoom+e.ar(pe.tileSize/y.tileSize),Ra,Ut,ir,pe.fov)),ua=(y.roundZoom?Math.round:Math.floor)(ua),ua=Math.max(0,ua);let ia=Math.min(ua,ft);if(vr.wrap=Re.getWrap(be,ka,vr.wrap),vr.zoom>=ia){if(vr.zoom>1),wrap:vr.wrap,fullyVisible:ta})}return hr.sort((vr,Or)=>vr.distanceSq-Or.distanceSq).map(vr=>vr.tileID)}let et=e.a8.fromPoints([new e.P(0,0),new e.P(e.a6,e.a6)]);function Mt(pe){return pe==="raster"||pe==="image"||pe==="video"}function pt(pe,y,N,ie,fe,be,Re){if(!y.hasData())return!1;let{tileID:je,fadingRole:Ze,fadingDirection:ut,fadingParentID:ft}=y;if(Ze===yt.Base&&ut===gt.Incoming&&ft)return N[ft.key]=ft,!0;let Dt=Math.max(je.overscaledZ-fe,be);for(let Gt=je.overscaledZ-1;Gt>=Dt;Gt--){let Kt=je.scaledTo(Gt),st=pe.getLoadedTile(Kt);if(st)return y.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Incoming,fadingParentID:st.tileID,fadeEndTime:ie+Re}),st.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Departing,fadeEndTime:ie+Re}),N[Kt.key]=Kt,!0}return!1}function Pt(pe,y,N,ie,fe,be){if(!y.hasData())return!1;let Re=y.tileID.children(fe),je=Ct(pe,y,Re,N,ie,fe,be);if(je)return!0;for(let Ze of Re)Ct(pe,y,Ze.children(fe),N,ie,fe,be)&&(je=!0);return je}function Ct(pe,y,N,ie,fe,be,Re){if(N[0].overscaledZ>=be)return!1;let je=!1;for(let Ze of N){let ut=pe.getLoadedTile(Ze);if(!ut)continue;let{fadingRole:ft,fadingDirection:Dt,fadingParentID:Gt}=ut;ft===yt.Base&&Dt===gt.Departing&&Gt||(ut.setCrossFadeLogic({fadingRole:yt.Base,fadingDirection:gt.Departing,fadingParentID:y.tileID,fadeEndTime:fe+Re}),y.setCrossFadeLogic({fadingRole:yt.Parent,fadingDirection:gt.Incoming,fadeEndTime:fe+Re})),ie[Ze.key]=Ze,je=!0}return je}function qt(pe,y,N,ie){let fe=pe.tileID;return!!pe.selfFading||!pe.hasData()&&!!y.has(fe)&&(pe.setSelfFadeLogic(N+ie),!0)}function Vt(pe,y){var N;pe.needsHillshadePrepare=!0,pe.needsTerrainPrepare=!0;let ie=y.tileID.canonical.x-pe.tileID.canonical.x,fe=y.tileID.canonical.y-pe.tileID.canonical.y,be=Math.pow(2,pe.tileID.canonical.z),Re=y.tileID.key;ie===0&&fe===0||Math.abs(fe)>1||(Math.abs(ie)>1&&(Math.abs(ie+be)===1?ie+=be:Math.abs(ie-be)===1&&(ie-=be)),y.dem&&pe.dem&&(pe.dem.backfillBorder(y.dem,ie,fe),!((N=pe.neighboringTiles)===null||N===void 0)&&N[Re]&&(pe.neighboringTiles[Re].backfilled=!0)))}class Ht{constructor(){this._tiles={}}handleWrapJump(y){let N={};for(let ie in this._tiles){let fe=this._tiles[ie];fe.tileID=fe.tileID.unwrapTo(fe.tileID.wrap+y),N[fe.tileID.key]=fe}this._tiles=N}setFeatureState(y,N){for(let ie in this._tiles)this._tiles[ie].setFeatureState(y,N)}getAllTiles(){return Object.values(this._tiles)}getAllIds(y=!1){return y?Object.values(this._tiles).map(N=>N.tileID).sort(e.au).map(N=>N.key):Object.keys(this._tiles)}getTileById(y){return this._tiles[y]}setTile(y,N){this._tiles[y]=N}deleteTileById(y){delete this._tiles[y]}getLoadedTile(y){let N=this.getTileById(y.key);return N?.hasData()?N:null}isIdRenderable(y,N=!1){var ie;return(ie=this.getTileById(y))===null||ie===void 0?void 0:ie.isRenderable(N)}getRenderableIds(y=0,N){let ie=[];for(let fe of this.getAllIds())this.isIdRenderable(fe,N)&&ie.push(this.getTileById(fe));return N?ie.sort((fe,be)=>{let Re=fe.tileID,je=be.tileID,Ze=new e.P(Re.canonical.x,Re.canonical.y)._rotate(-y),ut=new e.P(je.canonical.x,je.canonical.y)._rotate(-y);return Re.overscaledZ-je.overscaledZ||ut.y-Ze.y||ut.x-Ze.x}).map(fe=>fe.tileID.key):ie.map(fe=>fe.tileID).sort(e.au).map(fe=>fe.key)}}class Sr extends e.E{constructor(y,N,ie){super(),this.id=y,this.dispatcher=ie,this.on("data",fe=>{this._dataHandler(fe)}),this.on("dataloading",()=>{this._sourceErrored=!1}),this.on("error",()=>{this._sourceErrored=this._source.loaded()}),this._source=((fe,be,Re,je)=>{let Ze=new(le(be.type))(fe,be,Re,je);if(Ze.id!==fe)throw new Error(`Expected Source id to be ${fe} instead of ${Ze.id}`);return Ze})(y,N,ie,this),this._inViewTiles=new Ht,this._outOfViewCache=new e.av(0,fe=>this._unloadTile(fe)),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new At,this._didEmitContent=!1,this._updated=!1}onAdd(y){var N;this.map=y,this._maxTileCacheSize=y?y._maxTileCacheSize:null,this._maxTileCacheZoomLevels=y?y._maxTileCacheZoomLevels:null,!((N=this._source)===null||N===void 0)&&N.onAdd&&this._source.onAdd(y)}onRemove(y){var N;for(let ie of this._inViewTiles.getAllTiles())ie.unloadVectorData();this.clearTiles(),!((N=this._source)===null||N===void 0)&&N.onRemove&&this._source.onRemove(y),this._inViewTiles=new Ht}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let y=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,y&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(y,N,ie){return e._(this,void 0,void 0,function*(){try{let fe=yield this._source.loadTile(y);this._tileLoaded(y,N,ie,fe)}catch(fe){y.state="errored",fe.status!==404?this._source.fire(new e.l(e.d(fe),{tile:y})):this.update(this.transform,this.terrain)}})}_unloadTile(y){this._source.unloadTile&&this._source.unloadTile(y)}_abortTile(y){this._source.abortTile&&this._source.abortTile(y),this._source.fire(new e.n("dataabort",{tile:y,coord:y.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(y){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let N of this._inViewTiles.getAllTiles())N.upload(y),N.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(y){var N;return this._inViewTiles.getRenderableIds((N=this.transform)===null||N===void 0?void 0:N.bearingInRadians,y)}hasRenderableParent(y){let N=y.overscaledZ-1;if(N>=this._source.minzoom){let ie=this.getLoadedTile(y.scaledTo(N));if(ie)return this._inViewTiles.isIdRenderable(ie.tileID.key)}return!1}reload(y,N=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let ie of this._inViewTiles.getAllIds()){let fe=this._inViewTiles.getTileById(ie);N&&!this._source.shouldReloadTile(fe,N)||(y?this._reloadTile(ie,"expired"):fe.state!=="errored"&&this._reloadTile(ie,"reloading"))}}}_reloadTile(y,N){return e._(this,void 0,void 0,function*(){let ie=this._inViewTiles.getTileById(y);ie&&(ie.state!=="loading"&&(ie.state=N),yield this._loadTile(ie,y,N))})}_tileLoaded(y,N,ie,fe){y.timeAdded=m(),y.selfFading&&(y.fadeEndTime=y.timeAdded+this._rasterFadeDuration),ie==="expired"&&(y.refreshedUponExpiration=!0),this._setTileReloadTimer(N,y),fe?.unmodified||(this.getSource().type==="raster-dem"&&y.dem&&function(be,Re){var je,Ze,ut;let ft=Re.getRenderableIds();for(let Dt of ft){if(!(!((je=be.neighboringTiles)===null||je===void 0)&&je[Dt]))continue;let Gt=Re.getTileById(Dt);be.neighboringTiles[Dt].backfilled||Vt(be,Gt),!((ut=(Ze=Gt.neighboringTiles)===null||Ze===void 0?void 0:Ze[be.tileID.key])===null||ut===void 0)&&ut.backfilled||Vt(Gt,be)}}(y,this._inViewTiles),this._state.initializeTileState(y,this.map?this.map.painter:null),y.aborted||this._source.fire(new e.n("data",{dataType:"source",tile:y,coord:y.tileID})))}getTile(y){return this.getTileByID(y.key)}getTileByID(y){return this._inViewTiles.getTileById(y)}_retainLoadedChildren(y,N){let ie=this._getLoadedDescendents(N),fe=new Set;for(let be of N){let Re=ie[be.key];if(!Re?.length){fe.add(be);continue}let je=be.overscaledZ+Sr.maxOverzooming,Ze=Re.filter(Dt=>Dt.tileID.overscaledZ<=je);if(!Ze.length){fe.add(be);continue}let ut=Math.min(...Ze.map(Dt=>Dt.tileID.overscaledZ)),ft=Ze.filter(Dt=>Dt.tileID.overscaledZ===ut).map(Dt=>Dt.tileID);for(let Dt of ft)y[Dt.key]=Dt;this._areDescendentsComplete(ft,ut,be.overscaledZ)||fe.add(be)}return fe}_getLoadedDescendents(y){var N;let ie={};for(let fe of this._inViewTiles.getAllTiles().filter(be=>be.hasData()))for(let be of y)fe.tileID.isChildOf(be)&&(ie[N=be.key]||(ie[N]=[]),ie[be.key].push(fe));return ie}_areDescendentsComplete(y,N,ie){return y.length===1&&y[0].isOverscaled()?y[0].overscaledZ===N:Math.pow(4,N-ie)===y.length}getLoadedTile(y){return this._inViewTiles.getLoadedTile(y)}updateCacheSize(y){let N=Math.ceil(y.width/this._source.tileSize)+1,ie=Math.ceil(y.height/this._source.tileSize)+1,fe=Math.floor(N*ie*(this._maxTileCacheZoomLevels===null?e.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),be=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,fe):fe;this._outOfViewCache.setMaxSize(be)}handleWrapJump(y){let N=Math.round((y-(this._prevLng===void 0?y:this._prevLng))/360);this._prevLng=y,N&&(this._inViewTiles.handleWrapJump(N),this._resetTileReloadTimers())}update(y,N){if(!this._sourceLoaded||this._paused)return;let ie;this.transform=y,this.terrain=N,this.updateCacheSize(y),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?ie=y.getVisibleUnwrappedCoordinates(this._source.tileID).map(Ze=>new e.a3(Ze.canonical.z,Ze.wrap,Ze.canonical.z,Ze.canonical.x,Ze.canonical.y)):(ie=Je(y,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?y.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:N,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(ie=ie.filter(Ze=>this._source.hasTile(Ze)))):ie=[],this.usedForTerrain&&(ie=this._addTerrainIdealTiles(ie));let fe=ie.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,fe&&this.fire(new e.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let be=Ke(y,this._source),Re=this._updateRetainedTiles(ie,be),je=Mt(this._source.type);je&&this._rasterFadeDuration>0&&!N&&function(Ze,ut,ft,Dt,Gt,Kt,st){let It=m(),Ut=e.at(ut);for(let ir of ut){let dr=Ze.getTileById(ir.key);dr.fadingDirection!==gt.Departing&&dr.fadeOpacity!==0||dr.resetFadeLogic(),pt(Ze,dr,ft,It,Dt,Gt,st)||Pt(Ze,dr,ft,It,Kt,st)||qt(dr,Ut,It,st)||dr.resetFadeLogic()}}(this._inViewTiles,ie,Re,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),je?this._cleanUpRasterTiles(Re):this._cleanUpVectorTiles(Re)}_cleanUpRasterTiles(y){for(let N of this._inViewTiles.getAllIds())y[N]||this._removeTile(N)}_cleanUpVectorTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);y[N]?ie.clearSymbolFadeHold():ie.hasSymbolBuckets?ie.holdingForSymbolFade()?ie.symbolFadeFinished()&&this._removeTile(N):ie.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(N)}}_addTerrainIdealTiles(y){let N=[];for(let ie of y)if(ie.canonical.z>this._source.minzoom){let fe=ie.scaledTo(ie.canonical.z-1);N.push(fe);let be=ie.scaledTo(Math.max(this._source.minzoom,Math.min(ie.canonical.z,5)));N.push(be)}return y.concat(N)}releaseSymbolFadeTiles(){for(let y of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(y).holdingForSymbolFade()&&this._removeTile(y)}_updateRetainedTiles(y,N){var ie;let fe=new Set;for(let ut of y)this._addTile(ut).hasData()||fe.add(ut);let be=y.reduce((ut,ft)=>(ut[ft.key]=ft,ut),{}),Re=this._retainLoadedChildren(be,fe),je={},Ze=Math.max(N-Sr.maxUnderzooming,this._source.minzoom);for(let ut of Re){let ft=this._inViewTiles.getTileById(ut.key),Dt=ft?.wasRequested();for(let Gt=ut.overscaledZ-1;Gt>=Ze;--Gt){let Kt=ut.scaledTo(Gt);if(je[Kt.key])break;if(je[Kt.key]=!0,ft=this.getTile(Kt),!ft&&Dt&&(ft=this._addTile(Kt)),ft){let st=ft.hasData();if((st||!(!((ie=this.map)===null||ie===void 0)&&ie.cancelPendingTileRequestsWhileZooming)||Dt)&&(be[Kt.key]=Kt),Dt=ft.wasRequested(),st)break}}}return be}_addTile(y){let N=this._inViewTiles.getTileById(y.key);if(N)return N;N=this._outOfViewCache.getAndRemove(y),N&&(N.resetFadeLogic(),this._setTileReloadTimer(y.key,N),N.tileID=y,this._state.initializeTileState(N,this.map?this.map.painter:null));let ie=N;return N||(N=new Tt(y,this._source.tileSize*y.overscaleFactor()),this._loadTile(N,y.key,N.state)),N.uses++,this._inViewTiles.setTile(y.key,N),ie||this._source.fire(new e.n("dataloading",{tile:N,coord:N.tileID,dataType:"source"})),N}_setTileReloadTimer(y,N){this._clearTileReloadTimer(y);let ie=N.getExpiryTimeout();ie&&(this._timers[y]=setTimeout(()=>{this._reloadTile(y,"expired"),delete this._timers[y]},ie))}_clearTileReloadTimer(y){let N=this._timers[y];N&&(clearTimeout(N),delete this._timers[y])}_resetTileReloadTimers(){for(let y in this._timers)clearTimeout(this._timers[y]),delete this._timers[y];for(let y of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(y);this._setTileReloadTimer(y,N)}}refreshTiles(y){for(let N of this._inViewTiles.getAllIds()){let ie=this._inViewTiles.getTileById(N);(this._inViewTiles.isIdRenderable(N)||ie.state=="errored")&&y.some(fe=>fe.equals(ie.tileID.canonical))&&this._reloadTile(N,"expired")}}_removeTile(y){let N=this._inViewTiles.getTileById(y);N&&(N.uses--,this._inViewTiles.deleteTileById(y),this._clearTileReloadTimer(y),N.uses>0||(N.hasData()&&N.state!=="reloading"?this._outOfViewCache.add(N.tileID,N,N.getExpiryTimeout()):(N.aborted=!0,this._abortTile(N),this._unloadTile(N))))}_dataHandler(y){y.dataType==="source"&&(y.sourceDataType!=="metadata"?y.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(y.sourceDataChanged,y.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let y of this._inViewTiles.getAllIds())this._removeTile(y);this._outOfViewCache.reset()}tilesIn(y,N,ie){let fe=[],be=this.transform;if(!be)return fe;let Re=be.getCoveringTilesDetailsProvider().allowWorldCopies(),je=ie?be.getCameraQueryGeometry(y):y,Ze=Kt=>be.screenPointToMercatorCoordinate(Kt,this.terrain),ut=this.transformBbox(y,Ze,!Re),ft=this.transformBbox(je,Ze,!Re),Dt=this.getIds(),Gt=e.a8.fromPoints(ft);for(let Kt of Dt){let st=this._inViewTiles.getTileById(Kt);if(st.holdingForSymbolFade())continue;let It=Re?[st.tileID]:[st.tileID.unwrapTo(-1),st.tileID.unwrapTo(0)],Ut=Math.pow(2,be.zoom-st.tileID.overscaledZ),ir=N*st.queryPadding*e.a6/st.tileSize/Ut;for(let dr of It){let Ar=Gt.map(hr=>dr.getTilePoint(new e.a7(hr.x,hr.y)));if(Ar.expandBy(ir),Ar.intersects(et)){let hr=ut.map(Or=>dr.getTilePoint(Or)),vr=ft.map(Or=>dr.getTilePoint(Or));fe.push({tile:st,tileID:Re?dr:dr.unwrapTo(0),queryGeometry:hr,cameraQueryGeometry:vr,scale:Ut})}}}return fe}transformBbox(y,N,ie){let fe=y.map(N);if(ie){let be=e.a8.fromPoints(y);be.shrinkBy(.001*Math.min(be.width(),be.height()));let Re=be.map(N);e.a8.fromPoints(fe).covers(Re)||(fe=fe.map(je=>je.x>.5?new e.a7(je.x-1,je.y,je.z):je))}return fe}getVisibleCoordinates(y){let N=this.getRenderableIds(y).map(ie=>this._inViewTiles.getTileById(ie).tileID);return this.transform&&this.transform.populateCache(N),N}hasTransition(){return!!this._source.hasTransition()||Mt(this._source.type)&&function(y,N){if(N<=0)return!1;let ie=m();for(let fe of y.getAllTiles())if(fe.fadeEndTime>=ie)return!0;return!1}(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(y){this._rasterFadeDuration=y}setFeatureState(y,N,ie){y||(y=e.ag),this._state.updateState(y,N,ie)}removeFeatureState(y,N,ie){y||(y=e.ag),this._state.removeFeatureState(y,N,ie)}getFeatureState(y,N){return y||(y=e.ag),this._state.getState(y,N)}setDependencies(y,N,ie){let fe=this._inViewTiles.getTileById(y);fe&&fe.setDependencies(N,ie)}reloadTilesForDependencies(y,N){for(let ie of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(ie).hasDependency(y,N)&&this._reloadTile(ie,"reloading");this._outOfViewCache.filter(ie=>!ie.hasDependency(y,N))}areTilesLoaded(){for(let y of this._inViewTiles.getAllTiles())if(y.state!=="loaded"&&y.state!=="errored")return!1;return!0}}Sr.maxUnderzooming=10,Sr.maxOverzooming=3;class Kr{constructor(y,N){this.reset(y,N)}reset(y,N){this.points=y||[],this._distances=[0];for(let ie=1;ie0?(fe-Re)/je:0;return this.points[be].mult(1-Ze).add(this.points[N].mult(Ze))}}function Yt(pe,y){let N=!0;return pe==="always"||pe!=="never"&&y!=="never"||(N=!1),N}class Rt{constructor(y,N,ie){let fe=this.boxCells=[],be=this.circleCells=[];this.xCellCount=Math.ceil(y/ie),this.yCellCount=Math.ceil(N/ie);for(let Re=0;Rethis.width||fe<0||N>this.height)return[];let Ze=[];if(y<=0&&N<=0&&this.width<=ie&&this.height<=fe){if(be)return[{key:null,x1:y,y1:N,x2:ie,y2:fe}];for(let ut=0;ut0}hitTestCircle(y,N,ie,fe,be){let Re=y-ie,je=y+ie,Ze=N-ie,ut=N+ie;if(je<0||Re>this.width||ut<0||Ze>this.height)return!1;let ft=[];return this._forEachCell(Re,Ze,je,ut,this._queryCellCircle,ft,{hitTest:!0,overlapMode:fe,circle:{x:y,y:N,radius:ie},seenUids:{box:{},circle:{}}},be),ft.length>0}_queryCell(y,N,ie,fe,be,Re,je,Ze){let{seenUids:ut,hitTest:ft,overlapMode:Dt}=je,Gt=this.boxCells[be],Kt=1e-6;if(Gt!==null){let It=this.bboxes;for(let Ut of Gt)if(!ut.box[Ut]){ut.box[Ut]=!0;let ir=4*Ut,dr=this.boxKeys[Ut];if(y<=It[ir+2]+Kt&&N<=It[ir+3]+Kt&&ie>=It[ir+0]-Kt&&fe>=It[ir+1]-Kt&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))&&(Re.push({key:dr,x1:It[ir],y1:It[ir+1],x2:It[ir+2],y2:It[ir+3]}),ft))return!0}}let st=this.circleCells[be];if(st!==null){let It=this.circles;for(let Ut of st)if(!ut.circle[Ut]){ut.circle[Ut]=!0;let ir=3*Ut,dr=this.circleKeys[Ut];if(this._circleAndRectCollide(It[ir],It[ir+1],It[ir+2],y,N,ie,fe)&&(!Ze||Ze(dr))&&(!ft||!Yt(Dt,dr.overlapMode))){let Ar=It[ir],hr=It[ir+1],vr=It[ir+2];if(Re.push({key:dr,x1:Ar-vr,y1:hr-vr,x2:Ar+vr,y2:hr+vr}),ft)return!0}}}return!1}_queryCellCircle(y,N,ie,fe,be,Re,je,Ze){let{circle:ut,seenUids:ft,overlapMode:Dt}=je,Gt=this.boxCells[be];if(Gt!==null){let st=this.bboxes;for(let It of Gt)if(!ft.box[It]){ft.box[It]=!0;let Ut=4*It,ir=this.boxKeys[It];if(this._circleAndRectCollide(ut.x,ut.y,ut.radius,st[Ut+0],st[Ut+1],st[Ut+2],st[Ut+3])&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}let Kt=this.circleCells[be];if(Kt!==null){let st=this.circles;for(let It of Kt)if(!ft.circle[It]){ft.circle[It]=!0;let Ut=3*It,ir=this.circleKeys[It];if(this._circlesCollide(st[Ut],st[Ut+1],st[Ut+2],ut.x,ut.y,ut.radius)&&(!Ze||Ze(ir))&&!Yt(Dt,ir.overlapMode))return Re.push(!0),!0}}}_forEachCell(y,N,ie,fe,be,Re,je,Ze){let ut=this._convertToXCellCoord(y),ft=this._convertToYCellCoord(N),Dt=this._convertToXCellCoord(ie),Gt=this._convertToYCellCoord(fe);for(let Kt=ut;Kt<=Dt;Kt++)for(let st=ft;st<=Gt;st++)if(be.call(this,y,N,ie,fe,this.xCellCount*st+Kt,Re,je,Ze))return}_convertToXCellCoord(y){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(y*this.xScale)))}_convertToYCellCoord(y){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(y*this.yScale)))}_circlesCollide(y,N,ie,fe,be,Re){let je=fe-y,Ze=be-N,ut=ie+Re;return ut*ut>je*je+Ze*Ze}_circleAndRectCollide(y,N,ie,fe,be,Re,je){let Ze=(Re-fe)/2,ut=Math.abs(y-(fe+Ze));if(ut>Ze+ie)return!1;let ft=(je-be)/2,Dt=Math.abs(N-(be+ft));if(Dt>ft+ie)return!1;if(ut<=Ze||Dt<=ft)return!0;let Gt=ut-Ze,Kt=Dt-ft;return Gt*Gt+Kt*Kt<=ie*ie}}function nr(pe,y){let N=1/(y[0]*y[0]+y[1]*y[1]+y[2]*y[2]),ie=1/(y[8]*y[8]+y[9]*y[9]+y[10]*y[10]),fe=y[0]*N,be=y[4]*N,Re=y[8]*ie,je=y[1]*N,Ze=y[5]*N,ut=y[9]*ie,ft=y[2]*N,Dt=y[6]*N,Gt=y[10]*ie;pe[0]=fe,pe[1]=be,pe[2]=Re,pe[4]=je,pe[5]=Ze,pe[6]=ut,pe[8]=ft,pe[9]=Dt,pe[10]=Gt;let Kt=y[12],st=y[13],It=y[14];return pe[12]=-fe*Kt-je*st-ft*It,pe[13]=-be*Kt-Ze*st-Dt*It,pe[14]=-Re*Kt-ut*st-Gt*It,pe[3]=0,pe[7]=0,pe[11]=0,pe[15]=1,pe}let ur=e.O();function cr(pe,y,N){let ie=e.O();if(!pe){let{vecSouth:Dt,vecEast:Gt}=Qr(y),Kt=n();Kt[0]=Gt[0],Kt[1]=Gt[1],Kt[2]=Dt[0],Kt[3]=Dt[1],fe=Kt,(ft=(Re=(be=Kt)[0])*(ut=be[3])-(Ze=be[2])*(je=be[1]))&&(fe[0]=ut*(ft=1/ft),fe[1]=-je*ft,fe[2]=-Ze*ft,fe[3]=Re*ft),ie[0]=Kt[0],ie[1]=Kt[1],ie[4]=Kt[2],ie[5]=Kt[3]}var fe,be,Re,je,Ze,ut,ft;return e.S(ie,ie,[1/N,1/N,1]),ie}function Rr(pe,y,N,ie){if(pe){let fe=e.O();if(!y){let{vecSouth:be,vecEast:Re}=Qr(N);fe[0]=Re[0],fe[1]=Re[1],fe[4]=be[0],fe[5]=be[1]}return e.S(fe,fe,[ie,ie,1]),fe}return N.pixelsToClipSpaceMatrix}function Qr(pe){let y=Math.cos(pe.rollInRadians),N=Math.sin(pe.rollInRadians),ie=Math.cos(pe.pitchInRadians),fe=Math.cos(pe.bearingInRadians),be=Math.sin(pe.bearingInRadians),Re=e.az();Re[0]=-fe*ie*N-be*y,Re[1]=-be*ie*N+fe*y;let je=e.aA(Re);je<1e-9?e.aB(Re):e.aC(Re,Re,1/je);let Ze=e.az();Ze[0]=fe*ie*y-be*N,Ze[1]=be*ie*y+fe*N;let ut=e.aA(Ze);return ut<1e-9?e.aB(Ze):e.aC(Ze,Ze,1/ut),{vecEast:Ze,vecSouth:Re}}function Zr(pe,y,N,ie){let fe;ie?(fe=[pe,y,ie(pe,y),1],e.aE(fe,fe,N)):(fe=[pe,y,0,1],Oa(fe,fe,N));let be=fe[3];return{point:new e.P(fe[0]/be,fe[1]/be),signedDistanceFromCamera:be,isOccluded:!1}}function ha(pe,y){return .5+pe/y*.5}function Pa(pe,y){return pe.x>=-y[0]&&pe.x<=y[0]&&pe.y>=-y[1]&&pe.y<=y[1]}function La(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt){let Kt=N?pe.textSizeData:pe.iconSizeData,st=e.aw(Kt,y.transform.zoom),It=[256/y.width*2+1,256/y.height*2+1],Ut=N?pe.text.dynamicLayoutVertexArray:pe.icon.dynamicLayoutVertexArray;Ut.clear();let ir=pe.lineVertexArray,dr=N?pe.text.placedSymbolArray:pe.icon.placedSymbolArray,Ar=y.transform.width/y.transform.height,hr=!1;for(let vr=0;vrMath.abs(N.x-y.x)*ie?{useVertical:!0}:(pe===e.ax.vertical?y.yN.x)?{needsFlipping:!0}:null}function ja(pe){let{projectionContext:y,pitchedLabelPlaneMatrixInverse:N,symbol:ie,fontSize:fe,flip:be,keepUpright:Re,glyphOffsetArray:je,dynamicLayoutVertexArray:Ze,aspectRatio:ut,rotateToLine:ft}=pe,Dt=fe/24,Gt=ie.lineOffsetX*Dt,Kt=ie.lineOffsetY*Dt,st;if(ie.numGlyphs>1){let It=ie.glyphStartIndex+ie.numGlyphs,Ut=ie.lineStartIndex,ir=ie.lineStartIndex+ie.lineLength,dr=un(Dt,je,Gt,Kt,be,ie,ft,y);if(!dr)return{notEnoughRoom:!0};let Ar=li(dr.first.point.x,dr.first.point.y,y,N),hr=li(dr.last.point.x,dr.last.point.y,y,N);if(Re&&!be){let vr=Xa(ie.writingMode,Ar,hr,ut);if(vr)return vr}st=[dr.first];for(let vr=ie.glyphStartIndex+1;vr0?Ar.point:Nn(y.tileAnchorPoint,dr,Ut,1,y),vr=li(Ut.x,Ut.y,y,N),Or=li(hr.x,hr.y,y,N),Cr=Xa(ie.writingMode,vr,Or,ut);if(Cr)return Cr}let It=vi(Dt*je.getoffsetX(ie.glyphStartIndex),Gt,Kt,be,ie.segment,ie.lineStartIndex,ie.lineStartIndex+ie.lineLength,y,ft);if(!It||y.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};st=[It]}for(let It of st)e.aD(Ze,It.point,It.angle);return{}}function Nn(pe,y,N,ie,fe){let be=pe.add(pe.sub(y)._unit()),Re=Un(be.x,be.y,fe).point,je=N.sub(Re);return N.add(je._mult(ie/je.mag()))}function yn(pe,y,N){let ie=y.projectionCache;if(ie.projections[pe])return ie.projections[pe];let fe=new e.P(y.lineVertexArray.getx(pe),y.lineVertexArray.gety(pe)),be=Un(fe.x,fe.y,y);if(be.signedDistanceFromCamera>0)return ie.projections[pe]=be.point,ie.anyProjectionOccluded||(ie.anyProjectionOccluded=be.isOccluded),be.point;let Re=pe-N.direction;return Nn(N.distanceFromAnchor===0?y.tileAnchorPoint:new e.P(y.lineVertexArray.getx(Re),y.lineVertexArray.gety(Re)),fe,N.previousVertex,N.absOffsetX-N.distanceFromAnchor+1,y)}function Un(pe,y,N){let ie=pe+N.translation[0],fe=y+N.translation[1],be;return N.pitchWithMap?(be=Zr(ie,fe,N.pitchedLabelPlaneMatrix,N.getElevation),be.isOccluded=!1):(be=N.transform.projectTileCoordinates(ie,fe,N.unwrappedTileID,N.getElevation),be.point.x=(.5*be.point.x+.5)*N.width,be.point.y=(.5*-be.point.y+.5)*N.height),be}function li(pe,y,N,ie){if(N.pitchWithMap){let fe=[pe,y,0,1];return e.aE(fe,fe,ie),N.transform.projectTileCoordinates(fe[0]/fe[3],fe[1]/fe[3],N.unwrappedTileID,N.getElevation).point}return{x:pe/N.width*2-1,y:1-y/N.height*2}}function Yn(pe,y,N){return N.transform.projectTileCoordinates(pe,y,N.unwrappedTileID,N.getElevation)}function on(pe,y,N){return pe._unit()._perp()._mult(y*N)}function en(pe,y,N,ie,fe,be,Re,je,Ze){if(je.projectionCache.offsets[pe])return je.projectionCache.offsets[pe];let ut=N.add(y);if(pe+Ze.direction=fe)return je.projectionCache.offsets[pe]=ut,ut;let ft=yn(pe+Ze.direction,je,Ze),Dt=on(ft.sub(N),Re,Ze.direction),Gt=N.add(Dt),Kt=ft.add(Dt);return je.projectionCache.offsets[pe]=e.aF(be,ut,Gt,Kt)||ut,je.projectionCache.offsets[pe]}function vi(pe,y,N,ie,fe,be,Re,je,Ze){let ut=ie?pe-y:pe+y,ft=ut>0?1:-1,Dt=0;ie&&(ft*=-1,Dt=Math.PI),ft<0&&(Dt+=Math.PI);let Gt,Kt=ft>0?be+fe:be+fe+1;je.projectionCache.cachedAnchorPoint?Gt=je.projectionCache.cachedAnchorPoint:(Gt=Un(je.tileAnchorPoint.x,je.tileAnchorPoint.y,je).point,je.projectionCache.cachedAnchorPoint=Gt);let st,It,Ut=Gt,ir=Gt,dr=0,Ar=0,hr=Math.abs(ut),vr=[],Or;for(;dr+Ar<=hr;){if(Kt+=ft,Kt=Re)return null;dr+=Ar,ir=Ut,It=st;let ka={absOffsetX:hr,direction:ft,distanceFromAnchor:dr,previousVertex:ir};if(Ut=yn(Kt,je,ka),N===0)vr.push(ir),Or=Ut.sub(ir);else{let Ta,Ra=Ut.sub(ir);Ta=Ra.mag()===0?on(yn(Kt+ft,je,ka).sub(Ut),N,ft):on(Ra,N,ft),It||(It=ir.add(Ta)),st=en(Kt,Ta,Ut,be,Re,It,N,je,ka),vr.push(It),Or=st.sub(It)}Ar=Or.mag()}let Cr=Or._mult((hr-dr)/Ar)._add(It||ir),ta=Dt+Math.atan2(Ut.y-ir.y,Ut.x-ir.x);return vr.push(Cr),{point:Cr,angle:Ze?ta:0,path:vr}}let Yi=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Ja(pe,y){for(let N=0;N=1;za--)ma.push(ua.path[za]);for(let za=1;zakn.signedDistanceFromCamera<=0)?[]:za.map(kn=>kn.point)}let Fa=[];if(ma.length>0){let za=ma[0].clone(),kn=ma[0].clone();for(let Dn=1;Dn=ka.x&&kn.x<=Ta.x&&za.y>=ka.y&&kn.y<=Ta.y?[ma]:kn.xTa.x||kn.yTa.y?[]:e.aG([ma],ka.x,ka.y,Ta.x,Ta.y)}for(let za of Fa){Ra.reset(za,.25*ta);let kn=0;kn=Ra.length<=.5*ta?1:Math.ceil(Ra.paddedLength/da)+1;for(let Dn=0;Dn{let Ze=Zr(je.x,je.y,Re,be.getElevation),ut=be.transform.projectTileCoordinates(Ze.point.x,Ze.point.y,be.unwrappedTileID,be.getElevation);return ut.point.x=(.5*ut.point.x+.5)*be.width,ut.point.y=(.5*-ut.point.y+.5)*be.height,ut})}(y,N);return function(fe){let be=0,Re=0,je=0,Ze=0;for(let ut=0;utRe&&(Re=Ze,be=je));return fe.slice(be,be+Re)}(ie)}queryRenderedSymbols(y){if(y.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let N=[],ie=new e.a8;for(let Dt of y){let Gt=new e.P(Dt.x+lt,Dt.y+lt);ie.extend(Gt),N.push(Gt)}let{minX:fe,minY:be,maxX:Re,maxY:je}=ie,Ze=this.grid.query(fe,be,Re,je).concat(this.ignoredGrid.query(fe,be,Re,je)),ut={},ft={};for(let Dt of Ze){let Gt=Dt.key;if(ut[Gt.bucketInstanceId]===void 0&&(ut[Gt.bucketInstanceId]={}),ut[Gt.bucketInstanceId][Gt.featureIndex])continue;let Kt=[new e.P(Dt.x1,Dt.y1),new e.P(Dt.x2,Dt.y1),new e.P(Dt.x2,Dt.y2),new e.P(Dt.x1,Dt.y2)];e.aH(N,Kt)&&(ut[Gt.bucketInstanceId][Gt.featureIndex]=!0,ft[Gt.bucketInstanceId]===void 0&&(ft[Gt.bucketInstanceId]=[]),ft[Gt.bucketInstanceId].push(Gt.featureIndex))}return ft}insertCollisionBox(y,N,ie,fe,be,Re){(ie?this.ignoredGrid:this.grid).insert({bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N},y[0],y[1],y[2],y[3])}insertCollisionCircles(y,N,ie,fe,be,Re){let je=ie?this.ignoredGrid:this.grid,Ze={bucketInstanceId:fe,featureIndex:be,collisionGroupID:Re,overlapMode:N};for(let ut=0;ut=this.screenRightBoundary||fethis.screenBottomBoundary}isInsideGrid(y,N,ie,fe){return ie>=0&&y=0&&Nthis.projectAndGetPerspectiveRatio(da.x,da.y,fe,ut,Dt));ia=ma.some(da=>!da.isOccluded),ua=ma.map(da=>new e.P(da.x,da.y))}else ia=!0;return{box:e.aI(ua),allPointsOccluded:!ia}}}class fr{constructor(y,N,ie,fe){this.opacity=y?Math.max(0,Math.min(1,y.opacity+(y.placed?N:-N))):fe&&ie?1:0,this.placed=ie}isHidden(){return this.opacity===0&&!this.placed}}class lr{constructor(y,N,ie,fe,be){this.text=new fr(y?y.text:null,N,ie,be),this.icon=new fr(y?y.icon:null,N,fe,be)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class Tr{constructor(y,N,ie){this.text=y,this.icon=N,this.skipFade=ie}}class Ir{constructor(y,N,ie,fe,be){this.bucketInstanceId=y,this.featureIndex=N,this.sourceLayerIndex=ie,this.bucketIndex=fe,this.tileID=be}}class Dr{constructor(y){this.crossSourceCollisions=y,this.maxGroupID=0,this.collisionGroups={}}get(y){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[y]){let N=++this.maxGroupID;this.collisionGroups[y]={ID:N,predicate:ie=>ie.collisionGroupID===N}}return this.collisionGroups[y]}}function ot(pe,y,N,ie,fe){let{horizontalAlign:be,verticalAlign:Re}=e.aP(pe);return new e.P(-(be-.5)*y+ie[0]*fe,-(Re-.5)*N+ie[1]*fe)}class kt{constructor(y,N,ie,fe,be){this.transform=y.clone(),this.terrain=N,this.collisionIndex=new rt(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=ie,this.retainedQueryData={},this.collisionGroups=new Dr(fe),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=be,be&&(be.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(y){let N=this.terrain;return N?(ie,fe)=>N.getElevation(y,ie,fe):null}getBucketParts(y,N,ie,fe){let be=ie.getBucket(N),Re=ie.latestFeatureIndex;if(!be||!Re||N.id!==be.layerIds[0])return;let je=ie.collisionBoxArray,Ze=be.layers[0].layout,ut=be.layers[0].paint,ft=Math.pow(2,this.transform.zoom-ie.tileID.overscaledZ),Dt=ie.tileSize/e.a6,Gt=ie.tileID.toUnwrapped(),Kt=Ze.get("text-rotation-alignment")==="map",st=e.aK(ie,1,this.transform.zoom),It=e.aL(this.collisionIndex.transform,ie,ut.get("text-translate"),ut.get("text-translate-anchor")),Ut=e.aL(this.collisionIndex.transform,ie,ut.get("icon-translate"),ut.get("icon-translate-anchor")),ir=cr(Kt,this.transform,st);this.retainedQueryData[be.bucketInstanceId]=new Ir(be.bucketInstanceId,Re,be.sourceLayerIndex,be.index,ie.tileID);let dr={bucket:be,layout:Ze,translationText:It,translationIcon:Ut,unwrappedTileID:Gt,pitchedLabelPlaneMatrix:ir,scale:ft,textPixelRatio:Dt,holdingForFade:ie.holdingForSymbolFade(),collisionBoxArray:je,partiallyEvaluatedTextSize:e.aw(be.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(be.sourceID)};if(fe)for(let Ar of be.sortKeyRanges){let{sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or}=Ar;y.push({sortKey:hr,symbolInstanceStart:vr,symbolInstanceEnd:Or,parameters:dr})}else y.push({symbolInstanceStart:0,symbolInstanceEnd:be.symbolInstances.length,parameters:dr})}attemptAnchorPlacement(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar,hr){var vr,Or,Cr;let ta=e.aM[y.textAnchor],ka=[y.textOffset0,y.textOffset1],Ta=ot(ta,ie,fe,ka,be),Ra=this.collisionIndex.placeCollisionBox(N,Gt,Ze,ut,ft,je,Re,Ut,Dt.predicate,Ar,Ta,hr);if((!dr||this.collisionIndex.placeCollisionBox(dr,Gt,Ze,ut,ft,je,Re,ir,Dt.predicate,Ar,Ta,hr).placeable)&&Ra.placeable){let ua;if(!((vr=this.prevPlacement)===null||vr===void 0)&&vr.variableOffsets[Kt.crossTileID]&&(!((Cr=(Or=this.prevPlacement)===null||Or===void 0?void 0:Or.placements[Kt.crossTileID])===null||Cr===void 0)&&Cr.text)&&(ua=this.prevPlacement.variableOffsets[Kt.crossTileID].anchor),Kt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[Kt.crossTileID]={textOffset:ka,width:ie,height:fe,anchor:ta,textBoxScale:be,prevAnchor:ua},this.markUsedJustification(st,ta,Kt,It),st.allowVerticalPlacement&&(this.markUsedOrientation(st,It,Kt),this.placedOrientations[Kt.crossTileID]=It),{shift:Ta,placedGlyphBoxes:Ra}}}placeLayerBucketPart(y,N,ie){let{bucket:fe,layout:be,translationText:Re,translationIcon:je,unwrappedTileID:Ze,pitchedLabelPlaneMatrix:ut,textPixelRatio:ft,holdingForFade:Dt,collisionBoxArray:Gt,partiallyEvaluatedTextSize:Kt,collisionGroup:st}=y.parameters,It=be.get("text-optional"),Ut=be.get("icon-optional"),ir=e.aN(be,"text-overlap","text-allow-overlap"),dr=ir==="always",Ar=e.aN(be,"icon-overlap","icon-allow-overlap"),hr=Ar==="always",vr=be.get("text-rotation-alignment")==="map",Or=be.get("text-pitch-alignment")==="map",Cr=be.get("icon-text-fit")!=="none",ta=be.get("symbol-z-order")==="viewport-y",ka=dr&&(hr||!fe.hasIconData()||Ut),Ta=hr&&(dr||!fe.hasTextData()||It);!fe.collisionArrays&&Gt&&fe.deserializeCollisionBoxes(Gt);let Ra=this.retainedQueryData[fe.bucketInstanceId].tileID,ua=this._getTerrainElevationFunc(Ra),ia=this.transform.getFastPathSimpleProjectionMatrix(Ra),ma=(da,Fa,za)=>{var kn,Dn;if(N[da.crossTileID])return;if(Dt)return void(this.placements[da.crossTileID]=new Tr(!1,!1,!1));let ui=!1,cn=!1,sn=!0,ei=null,Pn={box:null,placeable:!1,offscreen:null,occluded:!1},Rn={placeable:!1},In=null,Jn=null,Ei=null,so=0,ti=0,bi=0;Fa.textFeatureIndex?so=Fa.textFeatureIndex:da.useRuntimeCollisionCircles&&(so=da.featureIndex),Fa.verticalTextFeatureIndex&&(ti=Fa.verticalTextFeatureIndex);let Wi=Fa.textBox;if(Wi){let Bs=es=>{let $o=e.ax.horizontal;if(fe.allowVerticalPlacement&&!es&&this.prevPlacement){let _s=this.prevPlacement.placedOrientations[da.crossTileID];_s&&(this.placedOrientations[da.crossTileID]=_s,$o=_s,this.markUsedOrientation(fe,$o,da))}return $o},So=(es,$o)=>{if(fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&Fa.verticalTextBox){for(let _s of fe.writingModes)if(_s===e.ax.vertical?(Pn=$o(),Rn=Pn):Pn=es(),Pn?.placeable)break}else Pn=es()},Ws=da.textAnchorOffsetStartIndex,Zo=da.textAnchorOffsetEndIndex;if(Zo===Ws){let es=($o,_s)=>{let Go=this.collisionIndex.placeCollisionBox($o,ir,ft,Ra,Ze,Or,vr,Re,st.predicate,ua,void 0,ia);return Go?.placeable&&(this.markUsedOrientation(fe,_s,da),this.placedOrientations[da.crossTileID]=_s),Go};So(()=>es(Wi,e.ax.horizontal),()=>{let $o=Fa.verticalTextBox;return fe.allowVerticalPlacement&&da.numVerticalGlyphVertices>0&&$o?es($o,e.ax.vertical):{box:null,offscreen:null}}),Bs(Pn?.placeable)}else{let es=e.aM[(Dn=(kn=this.prevPlacement)===null||kn===void 0?void 0:kn.variableOffsets[da.crossTileID])===null||Dn===void 0?void 0:Dn.anchor],$o=(Go,Ys,Ll)=>{let mo=Go.x2-Go.x1,ru=Go.y2-Go.y1,Rs=da.textBoxScale,Yu=Cr&&Ar==="never"?Ys:null,Ul=null,ql=ir==="never"?1:2,fo="never";es&&ql++;for(let Xo=0;Xo$o(Wi,Fa.iconBox,e.ax.horizontal),()=>{let Go=Fa.verticalTextBox;return fe.allowVerticalPlacement&&!Pn?.placeable&&da.numVerticalGlyphVertices>0&&Go?$o(Go,Fa.verticalIconBox,e.ax.vertical):{box:null,occluded:!0,offscreen:null}}),Pn&&(ui=Pn.placeable,sn=Pn.offscreen);let _s=Bs(Pn?.placeable);if(!ui&&this.prevPlacement){let Go=this.prevPlacement.variableOffsets[da.crossTileID];Go&&(this.variableOffsets[da.crossTileID]=Go,this.markUsedJustification(fe,Go.anchor,da,_s))}}}if(In=Pn,ui=In?.placeable,sn=In?.offscreen,da.useRuntimeCollisionCircles&&da.centerJustifiedTextSymbolIndex>=0){let Bs=fe.text.placedSymbolArray.get(da.centerJustifiedTextSymbolIndex),So=e.ay(fe.textSizeData,Kt,Bs),Ws=be.get("text-padding");Jn=this.collisionIndex.placeCollisionCircles(ir,Bs,fe.lineVertexArray,fe.glyphOffsetArray,So,Ze,ut,ie,Or,st.predicate,da.collisionCircleDiameter,Ws,Re,ua),Jn.circles.length&&Jn.collisionDetected&&!ie&&e.w("Collisions detected, but collision boxes are not shown"),ui=dr||Jn.circles.length>0&&!Jn.collisionDetected,sn&&(sn=Jn.offscreen)}if(Fa.iconFeatureIndex&&(bi=Fa.iconFeatureIndex),Fa.iconBox){let Bs=So=>this.collisionIndex.placeCollisionBox(So,Ar,ft,Ra,Ze,Or,vr,je,st.predicate,ua,Cr&&ei?ei:void 0,ia);Rn&&Rn.placeable&&Fa.verticalIconBox?(Ei=Bs(Fa.verticalIconBox),cn=Ei.placeable):(Ei=Bs(Fa.iconBox),cn=Ei.placeable),sn&&(sn=Ei.offscreen)}let ro=It||da.numHorizontalGlyphVertices===0&&da.numVerticalGlyphVertices===0,Mo=Ut||da.numIconVertices===0;ro||Mo?Mo?ro||cn&&(cn=ui):ui=cn&&ui:cn=ui=cn&&ui;let zs=cn&&Ei.placeable;if(ui&&In.placeable&&this.collisionIndex.insertCollisionBox(In.box,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,Rn&&Rn.placeable&&ti?ti:so,st.ID),zs&&this.collisionIndex.insertCollisionBox(Ei.box,Ar,be.get("icon-ignore-placement"),fe.bucketInstanceId,bi,st.ID),Jn&&ui&&this.collisionIndex.insertCollisionCircles(Jn.circles,ir,be.get("text-ignore-placement"),fe.bucketInstanceId,so,st.ID),ie&&this.storeCollisionData(fe.bucketInstanceId,za,Fa,In,Ei,Jn),da.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(fe.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[da.crossTileID]=new Tr((ui||ka)&&!In?.occluded,(cn||Ta)&&!Ei?.occluded,sn||fe.justReloaded),N[da.crossTileID]=!0};if(ta){if(y.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let da=fe.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let Fa=da.length-1;Fa>=0;--Fa){let za=da[Fa];ma(fe.symbolInstances.get(za),fe.collisionArrays[za],za)}}else for(let da=y.symbolInstanceStart;da=0&&(y.text.placedSymbolArray.get(je).crossTileID=be>=0&&je!==be?0:ie.crossTileID)}markUsedOrientation(y,N,ie){let fe=N===e.ax.horizontal||N===e.ax.horizontalOnly?N:0,be=N===e.ax.vertical?N:0,Re=[ie.leftJustifiedTextSymbolIndex,ie.centerJustifiedTextSymbolIndex,ie.rightJustifiedTextSymbolIndex];for(let je of Re)y.text.placedSymbolArray.get(je).placedOrientation=fe;ie.verticalPlacedTextSymbolIndex&&(y.text.placedSymbolArray.get(ie.verticalPlacedTextSymbolIndex).placedOrientation=be)}commit(y){this.commitTime=y,this.zoomAtLastRecencyCheck=this.transform.zoom;let N=this.prevPlacement,ie=!1;this.prevZoomAdjustment=N?N.zoomAdjustment(this.transform.zoom):0;let fe=N?N.symbolFadeChange(y):1,be=N?N.opacities:{},Re=N?N.variableOffsets:{},je=N?N.placedOrientations:{};for(let Ze in this.placements){let ut=this.placements[Ze],ft=be[Ze];ft?(this.opacities[Ze]=new lr(ft,fe,ut.text,ut.icon),ie||(ie=ut.text!==ft.text.placed),ie||(ie=ut.icon!==ft.icon.placed)):(this.opacities[Ze]=new lr(null,fe,ut.text,ut.icon,ut.skipFade),ie||(ie=ut.text||ut.icon))}for(let Ze in be){let ut=be[Ze];if(!this.opacities[Ze]){let ft=new lr(ut,fe,!1,!1);ft.isHidden()||(this.opacities[Ze]=ft,ie||(ie=ut.text.placed),ie||(ie=ut.icon.placed))}}for(let Ze in Re)this.variableOffsets[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.variableOffsets[Ze]=Re[Ze]);for(let Ze in je)this.placedOrientations[Ze]||!this.opacities[Ze]||this.opacities[Ze].isHidden()||(this.placedOrientations[Ze]=je[Ze]);if(N&&N.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");ie?this.lastPlacementChangeTime=y:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=N?N.lastPlacementChangeTime:y)}updateLayerOpacities(y,N){let ie={};for(let fe of N){let be=fe.getBucket(y);be&&fe.latestFeatureIndex&&y.id===be.layerIds[0]&&this.updateBucketOpacities(be,fe.tileID,ie,fe.collisionBoxArray)}}updateBucketOpacities(y,N,ie,fe){y.hasTextData()&&(y.text.opacityVertexArray.clear(),y.text.hasVisibleVertices=!1),y.hasIconData()&&(y.icon.opacityVertexArray.clear(),y.icon.hasVisibleVertices=!1),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexArray.clear(),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexArray.clear();let be=y.layers[0],Re=be.layout,je=new lr(null,0,!1,!1,!0),Ze=Re.get("text-allow-overlap"),ut=Re.get("icon-allow-overlap"),ft=be._unevaluatedLayout.hasValue("text-variable-anchor")||be._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Dt=Re.get("text-rotation-alignment")==="map",Gt=Re.get("text-pitch-alignment")==="map",Kt=Re.get("icon-text-fit")!=="none",st=new lr(null,0,Ze&&(ut||!y.hasIconData()||Re.get("icon-optional")),ut&&(Ze||!y.hasTextData()||Re.get("text-optional")),!0);!y.collisionArrays&&fe&&(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData())&&y.deserializeCollisionBoxes(fe);let It=(ir,dr,Ar)=>{for(let hr=0;hr0,ta=this.placedOrientations[dr.crossTileID],ka=ta===e.ax.vertical,Ta=ta===e.ax.horizontal||ta===e.ax.horizontalOnly;if(Ar>0||hr>0){let ua=wa(Or.text);It(y.text,Ar,ka?pn:ua),It(y.text,hr,Ta?pn:ua);let ia=Or.text.isHidden(),ma=[dr.rightJustifiedTextSymbolIndex,dr.centerJustifiedTextSymbolIndex,dr.leftJustifiedTextSymbolIndex];for(let za of ma)za>=0&&(y.text.placedSymbolArray.get(za).hidden=ia||ka?1:0);dr.verticalPlacedTextSymbolIndex>=0&&(y.text.placedSymbolArray.get(dr.verticalPlacedTextSymbolIndex).hidden=ia||Ta?1:0);let da=this.variableOffsets[dr.crossTileID];da&&this.markUsedJustification(y,da.anchor,dr,ta);let Fa=this.placedOrientations[dr.crossTileID];Fa&&(this.markUsedJustification(y,"left",dr,Fa),this.markUsedOrientation(y,Fa,dr))}if(Cr){let ua=wa(Or.icon),ia=!(Kt&&dr.verticalPlacedIconSymbolIndex&&ka);dr.placedIconSymbolIndex>=0&&(It(y.icon,dr.numIconVertices,ia?ua:pn),y.icon.placedSymbolArray.get(dr.placedIconSymbolIndex).hidden=Or.icon.isHidden()),dr.verticalPlacedIconSymbolIndex>=0&&(It(y.icon,dr.numVerticalIconVertices,ia?pn:ua),y.icon.placedSymbolArray.get(dr.verticalPlacedIconSymbolIndex).hidden=Or.icon.isHidden())}let Ra=Ut?.has(ir)?Ut.get(ir):{text:null,icon:null};if(y.hasIconCollisionBoxData()||y.hasTextCollisionBoxData()){let ua=y.collisionArrays[ir];if(ua){let ia=new e.P(0,0);if(ua.textBox||ua.verticalTextBox){let ma=!0;if(ft){let da=this.variableOffsets[vr];da?(ia=ot(da.anchor,da.width,da.height,da.textOffset,da.textBoxScale),Dt&&ia._rotate(Gt?-this.transform.bearingInRadians:this.transform.bearingInRadians)):ma=!1}if(ua.textBox||ua.verticalTextBox){let da;ua.textBox&&(da=ka),ua.verticalTextBox&&(da=Ta),jt(y.textCollisionBox.collisionVertexArray,Or.text.placed,!ma||da,Ra.text,ia.x,ia.y)}}if(ua.iconBox||ua.verticalIconBox){let ma=!!(!Ta&&ua.verticalIconBox),da;ua.iconBox&&(da=ma),ua.verticalIconBox&&(da=!ma),jt(y.iconCollisionBox.collisionVertexArray,Or.icon.placed,da,Ra.icon,Kt?ia.x:0,Kt?ia.y:0)}}}}if(y.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[y.bucketInstanceId]&&(this.retainedQueryData[y.bucketInstanceId].featureSortOrder=y.featureSortOrder),y.hasTextData()&&y.text.opacityVertexBuffer&&y.text.opacityVertexBuffer.updateData(y.text.opacityVertexArray),y.hasIconData()&&y.icon.opacityVertexBuffer&&y.icon.opacityVertexBuffer.updateData(y.icon.opacityVertexArray),y.hasIconCollisionBoxData()&&y.iconCollisionBox.collisionVertexBuffer&&y.iconCollisionBox.collisionVertexBuffer.updateData(y.iconCollisionBox.collisionVertexArray),y.hasTextCollisionBoxData()&&y.textCollisionBox.collisionVertexBuffer&&y.textCollisionBox.collisionVertexBuffer.updateData(y.textCollisionBox.collisionVertexArray),y.text.opacityVertexArray.length!==y.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${y.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${y.text.layoutVertexArray.length}) / 4`);if(y.icon.opacityVertexArray.length!==y.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${y.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${y.icon.layoutVertexArray.length}) / 4`);y.bucketInstanceId in this.collisionCircleArrays&&(y.collisionCircleArray=this.collisionCircleArrays[y.bucketInstanceId],delete this.collisionCircleArrays[y.bucketInstanceId])}symbolFadeChange(y){return this.fadeDuration===0?1:(y-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(y){return Math.max(0,(this.transform.zoom-y)/1.5)}hasTransitions(y){return this.stale||y-this.lastPlacementChangeTimey}setStale(){this.stale=!0}}function jt(pe,y,N,ie,fe,be){ie&&ie.length!==0||(ie=[0,0,0,0]);let Re=ie[0]-lt,je=ie[1]-lt,Ze=ie[2]-lt,ut=ie[3]-lt;pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,je),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Ze,ut),pe.emplaceBack(y?1:0,N?1:0,fe||0,be||0,Re,ut)}let ar=Math.pow(2,25),Er=Math.pow(2,24),xr=Math.pow(2,17),zr=Math.pow(2,16),Lr=Math.pow(2,9),aa=Math.pow(2,8),Sa=Math.pow(2,1);function wa(pe){if(pe.opacity===0&&!pe.placed)return 0;if(pe.opacity===1&&pe.placed)return 4294967295;let y=pe.placed?1:0,N=Math.floor(127*pe.opacity);return N*ar+y*Er+N*xr+y*zr+N*Lr+y*aa+N*Sa+y}let pn=0;class tn{constructor(y){this._sortAcrossTiles=y.layout.get("symbol-z-order")!=="viewport-y"&&!y.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(y,N,ie,fe,be){let Re=this._bucketParts;for(;this._currentTileIndexje.sortKey-Ze.sortKey));this._currentPartIndex!this._forceFullPlacement&&m()-fe>2;for(;this._currentPlacementIndex>=0;){let Re=N[y[this._currentPlacementIndex]],je=this.placement.collisionIndex.transform.zoom;if(e.aQ(Re)&&Re.layout&&(!Re.minzoom||Re.minzoom<=je)&&(!Re.maxzoom||Re.maxzoom>je)){if(this._inProgressLayer||(this._inProgressLayer=new tn(Re)),this._inProgressLayer.continuePlacement(ie[Re.source],this.placement,this._showCollisionBoxes,Re,be))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(y){return this.placement.commit(y),this.placement}}let rn=512/e.a6/2;class Ri{constructor(y,N,ie){this.tileID=y,this.bucketInstanceId=ie,this._symbolsByKey={};let fe=new Map;for(let be=0;be({x:Math.floor(Ze.anchorX*rn),y:Math.floor(Ze.anchorY*rn)})),crossTileIDs:Re.map(Ze=>Ze.crossTileID)};if(je.positions.length>128){let Ze=new e.aR(je.positions.length,16,Uint16Array);for(let{x:ut,y:ft}of je.positions)Ze.add(ut,ft);Ze.finish(),delete je.positions,je.index=Ze}this._symbolsByKey[be]=je}}getScaledCoordinates(y,N){let{x:ie,y:fe,z:be}=this.tileID.canonical,{x:Re,y:je,z:Ze}=N.canonical,ut=rn/Math.pow(2,Ze-be),ft=(je*e.a6+y.anchorY)*ut,Dt=fe*e.a6*rn;return{x:Math.floor((Re*e.a6+y.anchorX)*ut-ie*e.a6*rn),y:Math.floor(ft-Dt)}}findMatches(y,N,ie){let fe=this.tileID.canonical.zy)}}class Gn{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class no{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(y){let N=Math.round((y-this.lng)/360);if(N!==0)for(let ie in this.indexes){let fe=this.indexes[ie],be={};for(let Re in fe){let je=fe[Re];je.tileID=je.tileID.unwrapTo(je.tileID.wrap+N),be[je.tileID.key]=je}this.indexes[ie]=be}this.lng=y}addBucket(y,N,ie){var fe,be,Re;if(!((fe=this.indexes[y.overscaledZ])===null||fe===void 0)&&fe[y.key]){if(this.indexes[y.overscaledZ][y.key].bucketInstanceId===N.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(y.overscaledZ,this.indexes[y.overscaledZ][y.key])}for(let Ze=0;Zey.overscaledZ)for(let ft in ut){let Dt=ut[ft];Dt.tileID.isChildOf(y)&&Dt.findMatches(N.symbolInstances,y,je)}else{let ft=ut[y.scaledTo(Number(Ze)).key];ft&&ft.findMatches(N.symbolInstances,y,je)}}for(let Ze=0;Ze 32766.5)) {return 0.0;} +#endif vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; #else return 0.0; #endif -}`),background:Je(`uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity; +}const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:jn("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:jn("",`#define GLOBE_RADIUS 6371008.8 +uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos +);}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); +if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len +);if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:jn(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,"attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),backgroundPattern:Je(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity; +}`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:jn(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Je(`varying vec3 v_data;varying float v_visibility; +}`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:jn(`in vec3 v_data;in float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur @@ -2789,11 +2795,11 @@ void main() { #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t); +vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;varying float v_visibility; +}`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur @@ -2809,16 +2815,32 @@ void main(void) { #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity -vec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);float ele=get_elevation(circle_center);v_visibility=calculate_visibility(u_matrix*vec4(circle_center,ele,1.0));if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,ele,1);} else {gl_Position=u_matrix*vec4(circle_center,ele,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Je("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),heatmap:Je(`uniform highp float u_intensity;varying vec2 v_extrude; +vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { +#ifdef GLOBE +vec3 center_vector=projectToSphere(circle_center); +#endif +float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else { +#ifdef GLOBE +vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); +#else +vec4 projected_center=projectTileWithElevation(circle_center,ele); +#endif +corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);} +#ifdef GLOBE +vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); +#else +gl_Position=projectTileWithElevation(corner_position,ele); +#endif +} else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:jn(fn,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:jn(`uniform highp float u_intensity;in vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight -float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0); +float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude; +}`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; @@ -2826,42 +2848,78 @@ const highp float ZERO=1.0/255.0/16.0; void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius -vec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,get_elevation(floor(a_pos*0.5)),1);gl_Position=u_matrix*pos;}`),heatmapTexture:Je(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity; +vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0); +#ifdef GLOBE +vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); +#else +gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); +#endif +}`),heatmapTexture:jn(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(0.0); +fragColor=vec4(0.0); #endif -}`,"uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Je("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 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_anchor_pos;attribute vec2 a_placed;attribute vec2 a_box_real;uniform mat4 u_matrix;uniform vec2 u_pixel_extrude_scale;varying float v_placed;varying float v_notUsed;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);}void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Je("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),debug:Je("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,get_elevation(a_pos),1);}"),fill:Je(`#pragma mapbox: define highp vec4 color +}`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:jn("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:jn("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:jn(`#ifdef GL_ES +precision highp float; +#endif +uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else +{l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0)); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:jn("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:jn(fn,`in vec2 a_pos;void main() { +#ifdef GLOBE +gl_Position=projectTileFor3D(a_pos,0.0); +#else +gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); +#endif +}`),fill:jn(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity -gl_FragColor=color*opacity; +fragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix; +}`,`uniform vec2 u_fill_translate;in vec2 a_pos; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);}`),fillOutline:Je(`varying vec2 v_pos; +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:jn(`in vec2 v_pos; +#ifdef GLOBE +in float v_depth; +#endif #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity -float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity); +float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; +#ifdef GLOBE +out float v_depth; #endif -}`,`attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos; #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity -gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillOutlinePattern:Je(`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; +gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}`),fillOutlinePattern:jn(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; +#ifdef GLOBE +in float v_depth; +#endif #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2869,11 +2927,17 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; +vec2 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=texture(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=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; +#ifdef GLOBE +out float v_depth; #endif -}`,`uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2885,10 +2949,14 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}`),fillPattern:Je(`#ifdef GL_ES +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +}`),fillPattern:jn(`#ifdef GL_ES precision highp float; #endif -uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b; +uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2896,11 +2964,11 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to -vec2 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; +vec2 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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b; +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to @@ -2912,15 +2980,15 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Je(`varying vec4 v_color;void main() {gl_FragColor=v_color; +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);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);}`),fillExtrusion:jn(`in vec4 v_color;void main() {fragColor=v_color; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`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; +}`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D -attribute vec2 a_centroid; +in vec2 a_centroid; #endif -varying vec4 v_color; +out vec4 v_color; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color @@ -2934,7 +3002,17 @@ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_off #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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;}`),fillExtrusionPattern:Je(`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; +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +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;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0); +#ifdef GLOBE +mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); +#endif +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;}`),fillExtrusionPattern:jn(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from @@ -2948,15 +3026,18 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -vec2 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; +vec2 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=texture(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=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed; +}`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D -attribute vec2 a_centroid; +in vec2 a_centroid; #endif -varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting; +#ifdef GLOBE +out vec3 v_sphere_pos; +#endif +out vec2 v_pos_a;out vec2 v_pos_b;out vec4 v_lighting; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from @@ -2976,22 +3057,38 @@ float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_off #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif -base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;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 +base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; +#ifdef GLOBE +vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); +#else +gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); +#endif +vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos -: 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;}`),hillshadePrepare:Je(`#ifdef GL_ES +: vec2(edgedistance,elevation*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;}`),hillshadePrepare:jn(`#ifdef GL_ES precision highp float; #endif -uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,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); +uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;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 exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,"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;}"),hillshade:Je(`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; +}`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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;}"),hillshade:jn(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; #define PI 3.141592653589793 -void 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; +#define STANDARD 0 +#define COMBINED 1 +#define IGOR 2 +#define MULTIDIRECTIONAL 3 +#define BASIC 4 +float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;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_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else +{fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else +{fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:jn(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; +#ifdef GLOBE +in float v_depth; #endif -}`,"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;}"),line:Je(`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -2999,13 +3096,19 @@ void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -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);gl_FragColor=color*(alpha*opacity); +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);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 -attribute 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; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3019,25 +3122,37 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float 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 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_width2=vec2(outset,inset);}`),lineGradient:jn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; +#ifdef GLOBE +in float v_depth; #endif -v_width2=vec2(outset,inset);}`),lineGradient:Je(`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 vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -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);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); +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);vec4 color=texture(u_image,v_uv);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 -attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; +in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth @@ -3049,16 +3164,22 @@ void main() { #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width -float 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif -v_width2=vec2(outset,inset);}`),linePattern:Je(`#ifdef GL_ES +v_width2=vec2(outset,inset);}`),linePattern:jn(`#ifdef GL_ES precision highp float; #endif -uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width; +#ifdef GLOBE +in float v_depth; +#endif #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from @@ -3072,14 +3193,20 @@ void main() { #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity; +vec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset @@ -3101,32 +3228,48 @@ void main() { #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to -float 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 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:jn(`uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; +#ifdef GLOBE +in float v_depth; #endif -v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Je(`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; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth -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 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); +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +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 sdfdist_a=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} +#endif #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 -attribute 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; +in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; +#ifdef GLOBE +out float v_depth; +#endif #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity @@ -3134,6 +3277,8 @@ attribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur @@ -3142,48 +3287,112 @@ void main() { #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth -float 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; +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +float 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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else -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; +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:jn(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; +#ifdef GLOBE +in float v_depth; +#endif +#pragma mapbox: define lowp float blur +#pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to +void main() { +#pragma mapbox: initialize lowp float blur +#pragma mapbox: initialize lowp float opacity +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +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);vec4 color=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); +#ifdef GLOBE +if (v_depth > 1.0) {discard;} #endif -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);}`),raster:Je(`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); #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); +#endif +}`,` +#define scale 0.015873016 +#define LINE_DISTANCE_SCALE 2.0 +in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; +#ifdef GLOBE +out float v_depth; #endif -}`,"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;}"),symbolIcon:Je(`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; +#pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity +#pragma mapbox: define mediump float gapwidth +#pragma mapbox: define lowp float offset +#pragma mapbox: define mediump float width +#pragma mapbox: define lowp float floorwidth +#pragma mapbox: define mediump vec4 dasharray_from +#pragma mapbox: define mediump vec4 dasharray_to void main() { +#pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity -lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; +#pragma mapbox: initialize mediump float gapwidth +#pragma mapbox: initialize lowp float offset +#pragma mapbox: initialize mediump float width +#pragma mapbox: initialize lowp float floorwidth +#pragma mapbox: initialize mediump vec4 dasharray_from +#pragma mapbox: initialize mediump vec4 dasharray_to +float 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;float texel_height=1.0/u_image_height;float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; +#ifdef GLOBE +v_depth=gl_Position.z/gl_Position.w; +#endif +#ifdef TERRAIN3D +v_gamma_scale=1.0; +#else +float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; +#endif +float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),raster:jn(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in 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=texture(u_image0,v_pos0);vec4 color1=texture(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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); +#ifdef OVERDRAW_INSPECTOR +fragColor=vec4(1.0); +#endif +}`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5; +#ifdef GLOBE +if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} +#endif +v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:jn(`uniform sampler2D u_texture;in vec2 v_tex;in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_tex;varying float v_fade_opacity;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_total_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;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;float visibility=calculate_visibility(projectedPoint);v_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));}`),symbolSDF:Je(`#define SDF_PX 8.0 -uniform 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; +u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}`),symbolSDF:jn(`#define SDF_PX 8.0 +uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -float 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 inner_edge=(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);inner_edge=inner_edge+gamma*gamma_scale;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);if (u_is_halo) {lowp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha=min(smoothstep(halo_edge-gamma_scaled,halo_edge+gamma_scaled,dist),1.0-alpha);}gl_FragColor=color*(alpha*opacity*fade_opacity); +float 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 total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec2 v_data0;varying vec3 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_data0;out vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -3195,32 +3404,34 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}`),symbolTextAndIcon:Je(`#define SDF_PX 8.0 +u_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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:jn(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 -uniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1; +uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color -#pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color -#pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -float fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha; +float total_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity); +return;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;} #ifdef OVERDRAW_INSPECTOR -gl_FragColor=vec4(1.0); +fragColor=vec4(1.0); #endif -}`,`attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;varying vec4 v_data0;varying vec4 v_data1;vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_matrix*vec4(posInTile,elevation,1.0);} +}`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity @@ -3232,79 +3443,89 @@ void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur -vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? +vec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;float ele=get_elevation(a_pos);highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ? camera_to_anchor_distance/u_camera_to_center_distance : -u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0;vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}`),terrain:Je("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;varying vec2 v_texture_pos;varying float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture2D(u_texture,v_texture_pos);if (v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);gl_FragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {gl_FragColor=surface_color;}}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform mat4 u_fog_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;varying float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Je("varying float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {gl_FragColor=pack(v_depth);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Je("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;varying vec2 v_texture_pos;void main() {vec4 rgba=texture2D(u_texture,v_texture_pos);gl_FragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","attribute vec3 a_pos3d;uniform mat4 u_matrix;uniform float u_ele_delta;varying vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=u_matrix*vec4(a_pos3d.xy,ele-ele_delta,1.0);}"),sky:Je("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform float u_horizon;uniform float u_sky_horizon_blend;void main() {float y=gl_FragCoord.y;if (y > u_horizon) {float blend=y-u_horizon;if (blend < u_sky_horizon_blend) {gl_FragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {gl_FragColor=u_sky_color;}}}","attribute vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Je(Me,L){let J=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,de=L.match(/attribute ([\w]+) ([\w]+)/g),pe=Me.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Te=L.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ze=Te?Te.concat(pe):pe,rt={};return{fragmentSource:Me=Me.replace(J,(vt,Mt,Gt,Ht,fr)=>(rt[fr]=!0,Mt==="define"?` -#ifndef HAS_UNIFORM_u_${fr} -varying ${Gt} ${Ht} ${fr}; +u_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; +#ifdef GLOBE +if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} +#endif +vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,total_opacity,is_sdf);}`),terrain:jn("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:jn("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:jn("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:jn("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:jn(`#ifdef GL_ES +precision highp float; +#endif +in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 +);color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:jn("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function jn(pe,y){let N=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,ie=y.match(/in ([\w]+) ([\w]+)/g),fe=pe.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),be=y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Re=be?be.concat(fe):fe,je={};return{fragmentSource:pe=pe.replace(N,(Ze,ut,ft,Dt,Gt)=>(je[Gt]=!0,ut==="define"?` +#ifndef HAS_UNIFORM_u_${Gt} +in ${ft} ${Dt} ${Gt}; #else -uniform ${Gt} ${Ht} u_${fr}; +uniform ${ft} ${Dt} u_${Gt}; #endif `:` -#ifdef HAS_UNIFORM_u_${fr} - ${Gt} ${Ht} ${fr} = u_${fr}; -#endif -`)),vertexSource:L=L.replace(J,(vt,Mt,Gt,Ht,fr)=>{let wr=Ht==="float"?"vec2":"vec4",Le=fr.match(/color/)?"color":wr;return rt[fr]?Mt==="define"?` -#ifndef HAS_UNIFORM_u_${fr} -uniform lowp float u_${fr}_t; -attribute ${Gt} ${wr} a_${fr}; -varying ${Gt} ${Ht} ${fr}; +#ifdef HAS_UNIFORM_u_${Gt} + ${ft} ${Dt} ${Gt} = u_${Gt}; +#endif +`)),vertexSource:y=y.replace(N,(Ze,ut,ft,Dt,Gt)=>{let Kt=Dt==="float"?"vec2":"vec4",st=Gt.match(/color/)?"color":Kt;return je[Gt]?ut==="define"?` +#ifndef HAS_UNIFORM_u_${Gt} +uniform lowp float u_${Gt}_t; +in ${ft} ${Kt} a_${Gt}; +out ${ft} ${Dt} ${Gt}; #else -uniform ${Gt} ${Ht} u_${fr}; +uniform ${ft} ${Dt} u_${Gt}; #endif -`:Le==="vec4"?` -#ifndef HAS_UNIFORM_u_${fr} - ${fr} = a_${fr}; +`:st==="vec4"?` +#ifndef HAS_UNIFORM_u_${Gt} + ${Gt} = a_${Gt}; #else - ${Gt} ${Ht} ${fr} = u_${fr}; + ${ft} ${Dt} ${Gt} = u_${Gt}; #endif `:` -#ifndef HAS_UNIFORM_u_${fr} - ${fr} = unpack_mix_${Le}(a_${fr}, u_${fr}_t); +#ifndef HAS_UNIFORM_u_${Gt} + ${Gt} = unpack_mix_${st}(a_${Gt}, u_${Gt}_t); #else - ${Gt} ${Ht} ${fr} = u_${fr}; + ${ft} ${Dt} ${Gt} = u_${Gt}; #endif -`:Mt==="define"?` -#ifndef HAS_UNIFORM_u_${fr} -uniform lowp float u_${fr}_t; -attribute ${Gt} ${wr} a_${fr}; +`:ut==="define"?` +#ifndef HAS_UNIFORM_u_${Gt} +uniform lowp float u_${Gt}_t; +in ${ft} ${Kt} a_${Gt}; #else -uniform ${Gt} ${Ht} u_${fr}; +uniform ${ft} ${Dt} u_${Gt}; #endif -`:Le==="vec4"?` -#ifndef HAS_UNIFORM_u_${fr} - ${Gt} ${Ht} ${fr} = a_${fr}; +`:st==="vec4"?` +#ifndef HAS_UNIFORM_u_${Gt} + ${ft} ${Dt} ${Gt} = a_${Gt}; #else - ${Gt} ${Ht} ${fr} = u_${fr}; + ${ft} ${Dt} ${Gt} = u_${Gt}; #endif `:` -#ifndef HAS_UNIFORM_u_${fr} - ${Gt} ${Ht} ${fr} = unpack_mix_${Le}(a_${fr}, u_${fr}_t); +#ifndef HAS_UNIFORM_u_${Gt} + ${ft} ${Dt} ${Gt} = unpack_mix_${st}(a_${Gt}, u_${Gt}_t); #else - ${Gt} ${Ht} ${fr} = u_${fr}; -#endif -`}),staticAttributes:de,staticUniforms:Ze}}class bt{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(L,J,de,pe,Te,Ze,rt,vt,Mt){this.context=L;let Gt=this.boundPaintVertexBuffers.length!==pe.length;for(let Ht=0;!Gt&&Ht({u_matrix:Me,u_texture:0,u_ele_delta:L,u_fog_matrix:J,u_fog_color:de?de.properties.get("fog-color"):e.aM.white,u_fog_ground_blend:de?de.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:de?de.calculateFogBlendOpacity(pe):0,u_horizon_color:de?de.properties.get("horizon-color"):e.aM.white,u_horizon_fog_blend:de?de.properties.get("horizon-fog-blend"):1});function Qt(Me){let L=[];for(let J=0;J({u_depth:new e.aH(Ot,Xt.u_depth),u_terrain:new e.aH(Ot,Xt.u_terrain),u_terrain_dim:new e.aI(Ot,Xt.u_terrain_dim),u_terrain_matrix:new e.aJ(Ot,Xt.u_terrain_matrix),u_terrain_unpack:new e.aK(Ot,Xt.u_terrain_unpack),u_terrain_exaggeration:new e.aI(Ot,Xt.u_terrain_exaggeration)}))(L,Rt),this.binderUniforms=de?de.getUniforms(L,Rt):[]}draw(L,J,de,pe,Te,Ze,rt,vt,Mt,Gt,Ht,fr,wr,Le,Oe,Ge,$e,lt){let tt=L.gl;if(this.failedToCreate)return;if(L.program.set(this.program),L.setDepthMode(de),L.setStencilMode(pe),L.setColorMode(Te),L.setCullFace(Ze),vt){L.activeTexture.set(tt.TEXTURE2),tt.bindTexture(tt.TEXTURE_2D,vt.depthTexture),L.activeTexture.set(tt.TEXTURE3),tt.bindTexture(tt.TEXTURE_2D,vt.texture);for(let Rt in this.terrainUniforms)this.terrainUniforms[Rt].set(vt[Rt])}for(let Rt in this.fixedUniforms)this.fixedUniforms[Rt].set(rt[Rt]);Oe&&Oe.setUniforms(L,this.binderUniforms,wr,{zoom:Le});let dt=0;switch(J){case tt.LINES:dt=2;break;case tt.TRIANGLES:dt=3;break;case tt.LINE_STRIP:dt=1}for(let Rt of fr.get()){let Ot=Rt.vaos||(Rt.vaos={});(Ot[Mt]||(Ot[Mt]=new bt)).bind(L,this,Gt,Oe?Oe.getPaintVertexBuffers():[],Ht,Rt.vertexOffset,Ge,$e,lt),tt.drawElements(J,Rt.primitiveLength*dt,tt.UNSIGNED_SHORT,Rt.primitiveOffset*dt*2)}}}function Ir(Me,L,J){let de=1/ra(J,1,L.transform.tileZoom),pe=Math.pow(2,J.tileID.overscaledZ),Te=J.tileSize*Math.pow(2,L.transform.tileZoom)/pe,Ze=Te*(J.tileID.canonical.x+J.tileID.wrap*pe),rt=Te*J.tileID.canonical.y;return{u_image:0,u_texsize:J.imageAtlasTexture.size,u_scale:[de,Me.fromScale,Me.toScale],u_fade:Me.t,u_pixel_coord_upper:[Ze>>16,rt>>16],u_pixel_coord_lower:[65535&Ze,65535&rt]}}let Cr=(Me,L,J,de)=>{let pe=L.style.light,Te=pe.properties.get("position"),Ze=[Te.x,Te.y,Te.z],rt=function(){var Mt=new e.A(9);return e.A!=Float32Array&&(Mt[1]=0,Mt[2]=0,Mt[3]=0,Mt[5]=0,Mt[6]=0,Mt[7]=0),Mt[0]=1,Mt[4]=1,Mt[8]=1,Mt}();pe.properties.get("anchor")==="viewport"&&function(Mt,Gt){var Ht=Math.sin(Gt),fr=Math.cos(Gt);Mt[0]=fr,Mt[1]=Ht,Mt[2]=0,Mt[3]=-Ht,Mt[4]=fr,Mt[5]=0,Mt[6]=0,Mt[7]=0,Mt[8]=1}(rt,-L.transform.angle),function(Mt,Gt,Ht){var fr=Gt[0],wr=Gt[1],Le=Gt[2];Mt[0]=fr*Ht[0]+wr*Ht[3]+Le*Ht[6],Mt[1]=fr*Ht[1]+wr*Ht[4]+Le*Ht[7],Mt[2]=fr*Ht[2]+wr*Ht[5]+Le*Ht[8]}(Ze,Ze,rt);let vt=pe.properties.get("color");return{u_matrix:Me,u_lightpos:Ze,u_lightintensity:pe.properties.get("intensity"),u_lightcolor:[vt.r,vt.g,vt.b],u_vertical_gradient:+J,u_opacity:de}},Mr=(Me,L,J,de,pe,Te,Ze)=>e.e(Cr(Me,L,J,de),Ir(Te,L,Ze),{u_height_factor:-Math.pow(2,pe.overscaledZ)/Ze.tileSize/8}),Xr=Me=>({u_matrix:Me}),Ra=(Me,L,J,de)=>e.e(Xr(Me),Ir(J,L,de)),wa=(Me,L)=>({u_matrix:Me,u_world:L}),yn=(Me,L,J,de,pe)=>e.e(Ra(Me,L,J,de),{u_world:pe}),fn=(Me,L,J,de)=>{let pe=Me.transform,Te,Ze;if(de.paint.get("circle-pitch-alignment")==="map"){let rt=ra(J,1,pe.zoom);Te=!0,Ze=[rt,rt]}else Te=!1,Ze=pe.pixelsToGLUnits;return{u_camera_to_center_distance:pe.cameraToCenterDistance,u_scale_with_map:+(de.paint.get("circle-pitch-scale")==="map"),u_matrix:Me.translatePosMatrix(L.posMatrix,J,de.paint.get("circle-translate"),de.paint.get("circle-translate-anchor")),u_pitch_with_map:+Te,u_device_pixel_ratio:Me.pixelRatio,u_extrude_scale:Ze}},ri=(Me,L,J)=>({u_matrix:Me,u_inv_matrix:L,u_camera_to_center_distance:J.cameraToCenterDistance,u_viewport_size:[J.width,J.height]}),On=(Me,L,J=1)=>({u_matrix:Me,u_color:L,u_overlay:0,u_overlay_scale:J}),ui=Me=>({u_matrix:Me}),jn=(Me,L,J,de)=>({u_matrix:Me,u_extrude_scale:ra(L,1,J),u_intensity:de}),oo=(Me,L,J,de)=>{let pe=e.H();e.aP(pe,0,Me.width,Me.height,0,0,1);let Te=Me.context.gl;return{u_matrix:pe,u_world:[Te.drawingBufferWidth,Te.drawingBufferHeight],u_image:J,u_color_ramp:de,u_opacity:L.paint.get("heatmap-opacity")}};function Qi(Me,L){let J=Math.pow(2,L.canonical.z),de=L.canonical.y;return[new e.Z(0,de/J).toLngLat().lat,new e.Z(0,(de+1)/J).toLngLat().lat]}let Mn=(Me,L,J,de)=>{let pe=Me.transform;return{u_matrix:Bi(Me,L,J,de),u_ratio:1/ra(L,1,pe.zoom),u_device_pixel_ratio:Me.pixelRatio,u_units_to_pixels:[1/pe.pixelsToGLUnits[0],1/pe.pixelsToGLUnits[1]]}},bo=(Me,L,J,de,pe)=>e.e(Mn(Me,L,J,pe),{u_image:0,u_image_height:de}),so=(Me,L,J,de,pe)=>{let Te=Me.transform,Ze=yo(L,Te);return{u_matrix:Bi(Me,L,J,pe),u_texsize:L.imageAtlasTexture.size,u_ratio:1/ra(L,1,Te.zoom),u_device_pixel_ratio:Me.pixelRatio,u_image:0,u_scale:[Ze,de.fromScale,de.toScale],u_fade:de.t,u_units_to_pixels:[1/Te.pixelsToGLUnits[0],1/Te.pixelsToGLUnits[1]]}},Hi=(Me,L,J,de,pe,Te)=>{let Ze=Me.lineAtlas,rt=yo(L,Me.transform),vt=J.layout.get("line-cap")==="round",Mt=Ze.getDash(de.from,vt),Gt=Ze.getDash(de.to,vt),Ht=Mt.width*pe.fromScale,fr=Gt.width*pe.toScale;return e.e(Mn(Me,L,J,Te),{u_patternscale_a:[rt/Ht,-Mt.height/2],u_patternscale_b:[rt/fr,-Gt.height/2],u_sdfgamma:Ze.width/(256*Math.min(Ht,fr)*Me.pixelRatio)/2,u_image:0,u_tex_y_a:Mt.y,u_tex_y_b:Gt.y,u_mix:pe.t})};function yo(Me,L){return 1/ra(Me,1,L.tileZoom)}function Bi(Me,L,J,de){return Me.translatePosMatrix(de?de.posMatrix:L.tileID.posMatrix,L,J.paint.get("line-translate"),J.paint.get("line-translate-anchor"))}let fo=(Me,L,J,de,pe)=>{return{u_matrix:Me,u_tl_parent:L,u_scale_parent:J,u_buffer_scale:1,u_fade_t:de.mix,u_opacity:de.opacity*pe.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:pe.paint.get("raster-brightness-min"),u_brightness_high:pe.paint.get("raster-brightness-max"),u_saturation_factor:(Ze=pe.paint.get("raster-saturation"),Ze>0?1-1/(1.001-Ze):-Ze),u_contrast_factor:(Te=pe.paint.get("raster-contrast"),Te>0?1/(1-Te):1+Te),u_spin_weights:Po(pe.paint.get("raster-hue-rotate"))};var Te,Ze};function Po(Me){Me*=Math.PI/180;let L=Math.sin(Me),J=Math.cos(Me);return[(2*J+1)/3,(-Math.sqrt(3)*L-J+1)/3,(Math.sqrt(3)*L-J+1)/3]}let po=(Me,L,J,de,pe,Te,Ze,rt,vt,Mt,Gt,Ht,fr,wr)=>{let Le=Ze.transform;return{u_is_size_zoom_constant:+(Me==="constant"||Me==="source"),u_is_size_feature_constant:+(Me==="constant"||Me==="camera"),u_size_t:L?L.uSizeT:0,u_size:L?L.uSize:0,u_camera_to_center_distance:Le.cameraToCenterDistance,u_pitch:Le.pitch/360*2*Math.PI,u_rotate_symbol:+J,u_aspect_ratio:Le.width/Le.height,u_fade_change:Ze.options.fadeDuration?Ze.symbolFadeChange:1,u_matrix:rt,u_label_plane_matrix:vt,u_coord_matrix:Mt,u_is_text:+Ht,u_pitch_with_map:+de,u_is_along_line:pe,u_is_variable_anchor:Te,u_texsize:fr,u_texture:0,u_translation:Gt,u_pitched_scale:wr}},Kn=(Me,L,J,de,pe,Te,Ze,rt,vt,Mt,Gt,Ht,fr,wr,Le)=>{let Oe=Ze.transform;return e.e(po(Me,L,J,de,pe,Te,Ze,rt,vt,Mt,Gt,Ht,fr,Le),{u_gamma_scale:de?Math.cos(Oe._pitch)*Oe.cameraToCenterDistance:1,u_device_pixel_ratio:Ze.pixelRatio,u_is_halo:+wr})},yi=(Me,L,J,de,pe,Te,Ze,rt,vt,Mt,Gt,Ht,fr,wr)=>e.e(Kn(Me,L,J,de,pe,Te,Ze,rt,vt,Mt,Gt,!0,Ht,!0,wr),{u_texsize_icon:fr,u_texture_icon:1}),Yi=(Me,L,J)=>({u_matrix:Me,u_opacity:L,u_color:J}),zi=(Me,L,J,de,pe,Te)=>e.e(function(Ze,rt,vt,Mt){let Gt=vt.imageManager.getPattern(Ze.from.toString()),Ht=vt.imageManager.getPattern(Ze.to.toString()),{width:fr,height:wr}=vt.imageManager.getPixelSize(),Le=Math.pow(2,Mt.tileID.overscaledZ),Oe=Mt.tileSize*Math.pow(2,vt.transform.tileZoom)/Le,Ge=Oe*(Mt.tileID.canonical.x+Mt.tileID.wrap*Le),$e=Oe*Mt.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Gt.tl,u_pattern_br_a:Gt.br,u_pattern_tl_b:Ht.tl,u_pattern_br_b:Ht.br,u_texsize:[fr,wr],u_mix:rt.t,u_pattern_size_a:Gt.displaySize,u_pattern_size_b:Ht.displaySize,u_scale_a:rt.fromScale,u_scale_b:rt.toScale,u_tile_units_to_pixels:1/ra(Mt,1,vt.transform.tileZoom),u_pixel_coord_upper:[Ge>>16,$e>>16],u_pixel_coord_lower:[65535&Ge,65535&$e]}}(de,Te,J,pe),{u_matrix:Me,u_opacity:L}),Uo={fillExtrusion:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_lightpos:new e.aN(Me,L.u_lightpos),u_lightintensity:new e.aI(Me,L.u_lightintensity),u_lightcolor:new e.aN(Me,L.u_lightcolor),u_vertical_gradient:new e.aI(Me,L.u_vertical_gradient),u_opacity:new e.aI(Me,L.u_opacity)}),fillExtrusionPattern:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_lightpos:new e.aN(Me,L.u_lightpos),u_lightintensity:new e.aI(Me,L.u_lightintensity),u_lightcolor:new e.aN(Me,L.u_lightcolor),u_vertical_gradient:new e.aI(Me,L.u_vertical_gradient),u_height_factor:new e.aI(Me,L.u_height_factor),u_image:new e.aH(Me,L.u_image),u_texsize:new e.aO(Me,L.u_texsize),u_pixel_coord_upper:new e.aO(Me,L.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(Me,L.u_pixel_coord_lower),u_scale:new e.aN(Me,L.u_scale),u_fade:new e.aI(Me,L.u_fade),u_opacity:new e.aI(Me,L.u_opacity)}),fill:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix)}),fillPattern:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_image:new e.aH(Me,L.u_image),u_texsize:new e.aO(Me,L.u_texsize),u_pixel_coord_upper:new e.aO(Me,L.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(Me,L.u_pixel_coord_lower),u_scale:new e.aN(Me,L.u_scale),u_fade:new e.aI(Me,L.u_fade)}),fillOutline:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_world:new e.aO(Me,L.u_world)}),fillOutlinePattern:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_world:new e.aO(Me,L.u_world),u_image:new e.aH(Me,L.u_image),u_texsize:new e.aO(Me,L.u_texsize),u_pixel_coord_upper:new e.aO(Me,L.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(Me,L.u_pixel_coord_lower),u_scale:new e.aN(Me,L.u_scale),u_fade:new e.aI(Me,L.u_fade)}),circle:(Me,L)=>({u_camera_to_center_distance:new e.aI(Me,L.u_camera_to_center_distance),u_scale_with_map:new e.aH(Me,L.u_scale_with_map),u_pitch_with_map:new e.aH(Me,L.u_pitch_with_map),u_extrude_scale:new e.aO(Me,L.u_extrude_scale),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_matrix:new e.aJ(Me,L.u_matrix)}),collisionBox:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_pixel_extrude_scale:new e.aO(Me,L.u_pixel_extrude_scale)}),collisionCircle:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_inv_matrix:new e.aJ(Me,L.u_inv_matrix),u_camera_to_center_distance:new e.aI(Me,L.u_camera_to_center_distance),u_viewport_size:new e.aO(Me,L.u_viewport_size)}),debug:(Me,L)=>({u_color:new e.aL(Me,L.u_color),u_matrix:new e.aJ(Me,L.u_matrix),u_overlay:new e.aH(Me,L.u_overlay),u_overlay_scale:new e.aI(Me,L.u_overlay_scale)}),clippingMask:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix)}),heatmap:(Me,L)=>({u_extrude_scale:new e.aI(Me,L.u_extrude_scale),u_intensity:new e.aI(Me,L.u_intensity),u_matrix:new e.aJ(Me,L.u_matrix)}),heatmapTexture:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_world:new e.aO(Me,L.u_world),u_image:new e.aH(Me,L.u_image),u_color_ramp:new e.aH(Me,L.u_color_ramp),u_opacity:new e.aI(Me,L.u_opacity)}),hillshade:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_image:new e.aH(Me,L.u_image),u_latrange:new e.aO(Me,L.u_latrange),u_light:new e.aO(Me,L.u_light),u_shadow:new e.aL(Me,L.u_shadow),u_highlight:new e.aL(Me,L.u_highlight),u_accent:new e.aL(Me,L.u_accent)}),hillshadePrepare:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_image:new e.aH(Me,L.u_image),u_dimension:new e.aO(Me,L.u_dimension),u_zoom:new e.aI(Me,L.u_zoom),u_unpack:new e.aK(Me,L.u_unpack)}),line:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_ratio:new e.aI(Me,L.u_ratio),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_units_to_pixels:new e.aO(Me,L.u_units_to_pixels)}),lineGradient:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_ratio:new e.aI(Me,L.u_ratio),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_units_to_pixels:new e.aO(Me,L.u_units_to_pixels),u_image:new e.aH(Me,L.u_image),u_image_height:new e.aI(Me,L.u_image_height)}),linePattern:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_texsize:new e.aO(Me,L.u_texsize),u_ratio:new e.aI(Me,L.u_ratio),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_image:new e.aH(Me,L.u_image),u_units_to_pixels:new e.aO(Me,L.u_units_to_pixels),u_scale:new e.aN(Me,L.u_scale),u_fade:new e.aI(Me,L.u_fade)}),lineSDF:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_ratio:new e.aI(Me,L.u_ratio),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_units_to_pixels:new e.aO(Me,L.u_units_to_pixels),u_patternscale_a:new e.aO(Me,L.u_patternscale_a),u_patternscale_b:new e.aO(Me,L.u_patternscale_b),u_sdfgamma:new e.aI(Me,L.u_sdfgamma),u_image:new e.aH(Me,L.u_image),u_tex_y_a:new e.aI(Me,L.u_tex_y_a),u_tex_y_b:new e.aI(Me,L.u_tex_y_b),u_mix:new e.aI(Me,L.u_mix)}),raster:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_tl_parent:new e.aO(Me,L.u_tl_parent),u_scale_parent:new e.aI(Me,L.u_scale_parent),u_buffer_scale:new e.aI(Me,L.u_buffer_scale),u_fade_t:new e.aI(Me,L.u_fade_t),u_opacity:new e.aI(Me,L.u_opacity),u_image0:new e.aH(Me,L.u_image0),u_image1:new e.aH(Me,L.u_image1),u_brightness_low:new e.aI(Me,L.u_brightness_low),u_brightness_high:new e.aI(Me,L.u_brightness_high),u_saturation_factor:new e.aI(Me,L.u_saturation_factor),u_contrast_factor:new e.aI(Me,L.u_contrast_factor),u_spin_weights:new e.aN(Me,L.u_spin_weights)}),symbolIcon:(Me,L)=>({u_is_size_zoom_constant:new e.aH(Me,L.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(Me,L.u_is_size_feature_constant),u_size_t:new e.aI(Me,L.u_size_t),u_size:new e.aI(Me,L.u_size),u_camera_to_center_distance:new e.aI(Me,L.u_camera_to_center_distance),u_pitch:new e.aI(Me,L.u_pitch),u_rotate_symbol:new e.aH(Me,L.u_rotate_symbol),u_aspect_ratio:new e.aI(Me,L.u_aspect_ratio),u_fade_change:new e.aI(Me,L.u_fade_change),u_matrix:new e.aJ(Me,L.u_matrix),u_label_plane_matrix:new e.aJ(Me,L.u_label_plane_matrix),u_coord_matrix:new e.aJ(Me,L.u_coord_matrix),u_is_text:new e.aH(Me,L.u_is_text),u_pitch_with_map:new e.aH(Me,L.u_pitch_with_map),u_is_along_line:new e.aH(Me,L.u_is_along_line),u_is_variable_anchor:new e.aH(Me,L.u_is_variable_anchor),u_texsize:new e.aO(Me,L.u_texsize),u_texture:new e.aH(Me,L.u_texture),u_translation:new e.aO(Me,L.u_translation),u_pitched_scale:new e.aI(Me,L.u_pitched_scale)}),symbolSDF:(Me,L)=>({u_is_size_zoom_constant:new e.aH(Me,L.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(Me,L.u_is_size_feature_constant),u_size_t:new e.aI(Me,L.u_size_t),u_size:new e.aI(Me,L.u_size),u_camera_to_center_distance:new e.aI(Me,L.u_camera_to_center_distance),u_pitch:new e.aI(Me,L.u_pitch),u_rotate_symbol:new e.aH(Me,L.u_rotate_symbol),u_aspect_ratio:new e.aI(Me,L.u_aspect_ratio),u_fade_change:new e.aI(Me,L.u_fade_change),u_matrix:new e.aJ(Me,L.u_matrix),u_label_plane_matrix:new e.aJ(Me,L.u_label_plane_matrix),u_coord_matrix:new e.aJ(Me,L.u_coord_matrix),u_is_text:new e.aH(Me,L.u_is_text),u_pitch_with_map:new e.aH(Me,L.u_pitch_with_map),u_is_along_line:new e.aH(Me,L.u_is_along_line),u_is_variable_anchor:new e.aH(Me,L.u_is_variable_anchor),u_texsize:new e.aO(Me,L.u_texsize),u_texture:new e.aH(Me,L.u_texture),u_gamma_scale:new e.aI(Me,L.u_gamma_scale),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_is_halo:new e.aH(Me,L.u_is_halo),u_translation:new e.aO(Me,L.u_translation),u_pitched_scale:new e.aI(Me,L.u_pitched_scale)}),symbolTextAndIcon:(Me,L)=>({u_is_size_zoom_constant:new e.aH(Me,L.u_is_size_zoom_constant),u_is_size_feature_constant:new e.aH(Me,L.u_is_size_feature_constant),u_size_t:new e.aI(Me,L.u_size_t),u_size:new e.aI(Me,L.u_size),u_camera_to_center_distance:new e.aI(Me,L.u_camera_to_center_distance),u_pitch:new e.aI(Me,L.u_pitch),u_rotate_symbol:new e.aH(Me,L.u_rotate_symbol),u_aspect_ratio:new e.aI(Me,L.u_aspect_ratio),u_fade_change:new e.aI(Me,L.u_fade_change),u_matrix:new e.aJ(Me,L.u_matrix),u_label_plane_matrix:new e.aJ(Me,L.u_label_plane_matrix),u_coord_matrix:new e.aJ(Me,L.u_coord_matrix),u_is_text:new e.aH(Me,L.u_is_text),u_pitch_with_map:new e.aH(Me,L.u_pitch_with_map),u_is_along_line:new e.aH(Me,L.u_is_along_line),u_is_variable_anchor:new e.aH(Me,L.u_is_variable_anchor),u_texsize:new e.aO(Me,L.u_texsize),u_texsize_icon:new e.aO(Me,L.u_texsize_icon),u_texture:new e.aH(Me,L.u_texture),u_texture_icon:new e.aH(Me,L.u_texture_icon),u_gamma_scale:new e.aI(Me,L.u_gamma_scale),u_device_pixel_ratio:new e.aI(Me,L.u_device_pixel_ratio),u_is_halo:new e.aH(Me,L.u_is_halo),u_translation:new e.aO(Me,L.u_translation),u_pitched_scale:new e.aI(Me,L.u_pitched_scale)}),background:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_opacity:new e.aI(Me,L.u_opacity),u_color:new e.aL(Me,L.u_color)}),backgroundPattern:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_opacity:new e.aI(Me,L.u_opacity),u_image:new e.aH(Me,L.u_image),u_pattern_tl_a:new e.aO(Me,L.u_pattern_tl_a),u_pattern_br_a:new e.aO(Me,L.u_pattern_br_a),u_pattern_tl_b:new e.aO(Me,L.u_pattern_tl_b),u_pattern_br_b:new e.aO(Me,L.u_pattern_br_b),u_texsize:new e.aO(Me,L.u_texsize),u_mix:new e.aI(Me,L.u_mix),u_pattern_size_a:new e.aO(Me,L.u_pattern_size_a),u_pattern_size_b:new e.aO(Me,L.u_pattern_size_b),u_scale_a:new e.aI(Me,L.u_scale_a),u_scale_b:new e.aI(Me,L.u_scale_b),u_pixel_coord_upper:new e.aO(Me,L.u_pixel_coord_upper),u_pixel_coord_lower:new e.aO(Me,L.u_pixel_coord_lower),u_tile_units_to_pixels:new e.aI(Me,L.u_tile_units_to_pixels)}),terrain:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_texture:new e.aH(Me,L.u_texture),u_ele_delta:new e.aI(Me,L.u_ele_delta),u_fog_matrix:new e.aJ(Me,L.u_fog_matrix),u_fog_color:new e.aL(Me,L.u_fog_color),u_fog_ground_blend:new e.aI(Me,L.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.aI(Me,L.u_fog_ground_blend_opacity),u_horizon_color:new e.aL(Me,L.u_horizon_color),u_horizon_fog_blend:new e.aI(Me,L.u_horizon_fog_blend)}),terrainDepth:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_ele_delta:new e.aI(Me,L.u_ele_delta)}),terrainCoords:(Me,L)=>({u_matrix:new e.aJ(Me,L.u_matrix),u_texture:new e.aH(Me,L.u_texture),u_terrain_coords_id:new e.aI(Me,L.u_terrain_coords_id),u_ele_delta:new e.aI(Me,L.u_ele_delta)}),sky:(Me,L)=>({u_sky_color:new e.aL(Me,L.u_sky_color),u_horizon_color:new e.aL(Me,L.u_horizon_color),u_horizon:new e.aI(Me,L.u_horizon),u_sky_horizon_blend:new e.aI(Me,L.u_sky_horizon_blend)})};class Co{constructor(L,J,de){this.context=L;let pe=L.gl;this.buffer=pe.createBuffer(),this.dynamicDraw=!!de,this.context.unbindVAO(),L.bindElementBuffer.set(this.buffer),pe.bufferData(pe.ELEMENT_ARRAY_BUFFER,J.arrayBuffer,this.dynamicDraw?pe.DYNAMIC_DRAW:pe.STATIC_DRAW),this.dynamicDraw||delete J.arrayBuffer}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(L){let J=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),J.bufferSubData(J.ELEMENT_ARRAY_BUFFER,0,L.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Wo={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Go{constructor(L,J,de,pe){this.length=J.length,this.attributes=de,this.itemSize=J.bytesPerElement,this.dynamicDraw=pe,this.context=L;let Te=L.gl;this.buffer=Te.createBuffer(),L.bindVertexBuffer.set(this.buffer),Te.bufferData(Te.ARRAY_BUFFER,J.arrayBuffer,this.dynamicDraw?Te.DYNAMIC_DRAW:Te.STATIC_DRAW),this.dynamicDraw||delete J.arrayBuffer}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(L){if(L.length!==this.length)throw new Error(`Length of new data is ${L.length}, which doesn't match current length of ${this.length}`);let J=this.context.gl;this.bind(),J.bufferSubData(J.ARRAY_BUFFER,0,L.arrayBuffer)}enableAttributes(L,J){for(let de=0;de0){let Ot=e.H();e.aQ(Ot,tt.placementInvProjMatrix,Me.transform.glCoordMatrix),e.aQ(Ot,Ot,tt.placementViewportMatrix),vt.push({circleArray:Rt,circleOffset:Gt,transform:lt.posMatrix,invTransform:Ot,coord:lt}),Mt+=Rt.length/4,Gt=Mt}dt&&rt.draw(Te,Ze.LINES,Io.disabled,Vo.disabled,Me.colorModeForRenderPass(),qi.disabled,{u_matrix:lt.posMatrix,u_pixel_extrude_scale:[1/(Ht=Me.transform).width,1/Ht.height]},Me.style.map.terrain&&Me.style.map.terrain.getTerrainData(lt),J.id,dt.layoutVertexBuffer,dt.indexBuffer,dt.segments,null,Me.transform.zoom,null,null,dt.collisionVertexBuffer)}var Ht;if(!pe||!vt.length)return;let fr=Me.useProgram("collisionCircle"),wr=new e.aR;wr.resize(4*Mt),wr._trim();let Le=0;for(let $e of vt)for(let lt=0;lt<$e.circleArray.length/4;lt++){let tt=4*lt,dt=$e.circleArray[tt+0],Rt=$e.circleArray[tt+1],Ot=$e.circleArray[tt+2],Xt=$e.circleArray[tt+3];wr.emplace(Le++,dt,Rt,Ot,Xt,0),wr.emplace(Le++,dt,Rt,Ot,Xt,1),wr.emplace(Le++,dt,Rt,Ot,Xt,2),wr.emplace(Le++,dt,Rt,Ot,Xt,3)}(!Zu||Zu.length<2*Mt)&&(Zu=function($e){let lt=2*$e,tt=new e.aT;tt.resize(lt),tt._trim();for(let dt=0;dt=0&&($e[tt.associatedIconIndex]={shiftedAnchor:Bn,angle:li})}else Ft(tt.numGlyphs,Oe)}if(Mt){Ge.clear();let lt=Me.icon.placedSymbolArray;for(let tt=0;ttMe.style.map.terrain.getElevation(Br,xt,Ut):null,kt=J.layout.get("text-rotation-alignment")==="map";ve(ya,Br.posMatrix,Me,pe,Cl,Hl,$e,Mt,kt,Oe,Br.toUnwrapped(),Le.width,Le.height,el,ot)}let hl=Br.posMatrix,Ll=pe&&nr||gu,ue=lt||Ll?El:Cl,we=mu,Ne=un&&J.paint.get(pe?"text-halo-width":"icon-halo-width").constantOr(1)!==0,Ke;Ke=un?ya.iconsInText?yi(Bn.kind,Pi,tt,$e,lt,Ll,Me,hl,ue,we,el,to,Ns,Lr):Kn(Bn.kind,Pi,tt,$e,lt,Ll,Me,hl,ue,we,el,pe,to,!0,Lr):po(Bn.kind,Pi,tt,$e,lt,Ll,Me,hl,ue,we,el,pe,to,Lr);let et={program:Jn,buffers:Za,uniformValues:Ke,atlasTexture:as,atlasTextureIcon:Vs,atlasInterpolation:Fo,atlasInterpolationIcon:Ms,isSDF:un,hasHalo:Ne};if(Rt&&ya.canOverlap){Ot=!0;let ot=Za.segments.get();for(let kt of ot)pr.push({segments:new e.a0([kt]),sortKey:kt.sortKey,state:et,terrainData:ho})}else pr.push({segments:Za.segments,sortKey:0,state:et,terrainData:ho})}Ot&&pr.sort((Br,Kr)=>Br.sortKey-Kr.sortKey);for(let Br of pr){let Kr=Br.state;if(fr.activeTexture.set(wr.TEXTURE0),Kr.atlasTexture.bind(Kr.atlasInterpolation,wr.CLAMP_TO_EDGE),Kr.atlasTextureIcon&&(fr.activeTexture.set(wr.TEXTURE1),Kr.atlasTextureIcon&&Kr.atlasTextureIcon.bind(Kr.atlasInterpolationIcon,wr.CLAMP_TO_EDGE)),Kr.isSDF){let ya=Kr.uniformValues;Kr.hasHalo&&(ya.u_is_halo=1,Yc(Kr.buffers,Br.segments,J,Me,Kr.program,Xt,Gt,Ht,ya,Br.terrainData)),ya.u_is_halo=0}Yc(Kr.buffers,Br.segments,J,Me,Kr.program,Xt,Gt,Ht,Kr.uniformValues,Br.terrainData)}}function Yc(Me,L,J,de,pe,Te,Ze,rt,vt,Mt){let Gt=de.context;pe.draw(Gt,Gt.gl.TRIANGLES,Te,Ze,rt,qi.disabled,vt,Mt,J.id,Me.layoutVertexBuffer,Me.indexBuffer,L,J.paint,de.transform.zoom,Me.programConfigurations.get(J.id),Me.dynamicLayoutVertexBuffer,Me.opacityVertexBuffer)}function ic(Me,L,J,de){let pe=Me.context,Te=pe.gl,Ze=Vo.disabled,rt=new zs([Te.ONE,Te.ONE],e.aM.transparent,[!0,!0,!0,!0]),vt=L.getBucket(J);if(!vt)return;let Mt=de.key,Gt=J.heatmapFbos.get(Mt);Gt||(Gt=Xc(pe,L.tileSize,L.tileSize),J.heatmapFbos.set(Mt,Gt)),pe.bindFramebuffer.set(Gt.framebuffer),pe.viewport.set([0,0,L.tileSize,L.tileSize]),pe.clear({color:e.aM.transparent});let Ht=vt.programConfigurations.get(J.id),fr=Me.useProgram("heatmap",Ht),wr=Me.style.map.terrain.getTerrainData(de);fr.draw(pe,Te.TRIANGLES,Io.disabled,Ze,rt,qi.disabled,jn(de.posMatrix,L,Me.transform.zoom,J.paint.get("heatmap-intensity")),wr,J.id,vt.layoutVertexBuffer,vt.indexBuffer,vt.segments,J.paint,Me.transform.zoom,Ht)}function oc(Me,L,J){let de=Me.context,pe=de.gl;de.setColorMode(Me.colorModeForRenderPass());let Te=Zc(de,L),Ze=J.key,rt=L.heatmapFbos.get(Ze);rt&&(de.activeTexture.set(pe.TEXTURE0),pe.bindTexture(pe.TEXTURE_2D,rt.colorAttachment.get()),de.activeTexture.set(pe.TEXTURE1),Te.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Me.useProgram("heatmapTexture").draw(de,pe.TRIANGLES,Io.disabled,Vo.disabled,Me.colorModeForRenderPass(),qi.disabled,oo(Me,L,0,1),null,L.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments,L.paint,Me.transform.zoom),rt.destroy(),L.heatmapFbos.delete(Ze))}function Xc(Me,L,J){var de,pe;let Te=Me.gl,Ze=Te.createTexture();Te.bindTexture(Te.TEXTURE_2D,Ze),Te.texParameteri(Te.TEXTURE_2D,Te.TEXTURE_WRAP_S,Te.CLAMP_TO_EDGE),Te.texParameteri(Te.TEXTURE_2D,Te.TEXTURE_WRAP_T,Te.CLAMP_TO_EDGE),Te.texParameteri(Te.TEXTURE_2D,Te.TEXTURE_MIN_FILTER,Te.LINEAR),Te.texParameteri(Te.TEXTURE_2D,Te.TEXTURE_MAG_FILTER,Te.LINEAR);let rt=(de=Me.HALF_FLOAT)!==null&&de!==void 0?de:Te.UNSIGNED_BYTE,vt=(pe=Me.RGBA16F)!==null&&pe!==void 0?pe:Te.RGBA;Te.texImage2D(Te.TEXTURE_2D,0,vt,L,J,0,Te.RGBA,rt,null);let Mt=Me.createFramebuffer(L,J,!1,!1);return Mt.colorAttachment.set(Ze),Mt}function Zc(Me,L){return L.colorRampTexture||(L.colorRampTexture=new h(Me,L.colorRamp,Me.gl.RGBA)),L.colorRampTexture}function Ql(Me,L,J,de,pe){if(!J||!de||!de.imageAtlas)return;let Te=de.imageAtlas.patternPositions,Ze=Te[J.to.toString()],rt=Te[J.from.toString()];if(!Ze&&rt&&(Ze=rt),!rt&&Ze&&(rt=Ze),!Ze||!rt){let vt=pe.getPaintProperty(L);Ze=Te[vt],rt=Te[vt]}Ze&&rt&&Me.setConstantPatternPositions(Ze,rt)}function Cc(Me,L,J,de,pe,Te,Ze){let rt=Me.context.gl,vt="fill-pattern",Mt=J.paint.get(vt),Gt=Mt&&Mt.constantOr(1),Ht=J.getCrossfadeParameters(),fr,wr,Le,Oe,Ge;Ze?(wr=Gt&&!J.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",fr=rt.LINES):(wr=Gt?"fillPattern":"fill",fr=rt.TRIANGLES);let $e=Mt.constantOr(null);for(let lt of de){let tt=L.getTile(lt);if(Gt&&!tt.patternsLoaded())continue;let dt=tt.getBucket(J);if(!dt)continue;let Rt=dt.programConfigurations.get(J.id),Ot=Me.useProgram(wr,Rt),Xt=Me.style.map.terrain&&Me.style.map.terrain.getTerrainData(lt);Gt&&(Me.context.activeTexture.set(rt.TEXTURE0),tt.imageAtlasTexture.bind(rt.LINEAR,rt.CLAMP_TO_EDGE),Rt.updatePaintBuffers(Ht)),Ql(Rt,vt,$e,tt,J);let nr=Xt?lt:null,pr=Me.translatePosMatrix(nr?nr.posMatrix:lt.posMatrix,tt,J.paint.get("fill-translate"),J.paint.get("fill-translate-anchor"));if(Ze){Oe=dt.indexBuffer2,Ge=dt.segments2;let Lr=[rt.drawingBufferWidth,rt.drawingBufferHeight];Le=wr==="fillOutlinePattern"&&Gt?yn(pr,Me,Ht,tt,Lr):wa(pr,Lr)}else Oe=dt.indexBuffer,Ge=dt.segments,Le=Gt?Ra(pr,Me,Ht,tt):Xr(pr);Ot.draw(Me.context,fr,pe,Me.stencilModeForClipping(lt),Te,qi.disabled,Le,Xt,J.id,dt.layoutVertexBuffer,Oe,Ge,J.paint,Me.transform.zoom,Rt)}}function eu(Me,L,J,de,pe,Te,Ze){let rt=Me.context,vt=rt.gl,Mt="fill-extrusion-pattern",Gt=J.paint.get(Mt),Ht=Gt.constantOr(1),fr=J.getCrossfadeParameters(),wr=J.paint.get("fill-extrusion-opacity"),Le=Gt.constantOr(null);for(let Oe of de){let Ge=L.getTile(Oe),$e=Ge.getBucket(J);if(!$e)continue;let lt=Me.style.map.terrain&&Me.style.map.terrain.getTerrainData(Oe),tt=$e.programConfigurations.get(J.id),dt=Me.useProgram(Ht?"fillExtrusionPattern":"fillExtrusion",tt);Ht&&(Me.context.activeTexture.set(vt.TEXTURE0),Ge.imageAtlasTexture.bind(vt.LINEAR,vt.CLAMP_TO_EDGE),tt.updatePaintBuffers(fr)),Ql(tt,Mt,Le,Ge,J);let Rt=Me.translatePosMatrix(Oe.posMatrix,Ge,J.paint.get("fill-extrusion-translate"),J.paint.get("fill-extrusion-translate-anchor")),Ot=J.paint.get("fill-extrusion-vertical-gradient"),Xt=Ht?Mr(Rt,Me,Ot,wr,Oe,fr,Ge):Cr(Rt,Me,Ot,wr);dt.draw(rt,rt.gl.TRIANGLES,pe,Te,Ze,qi.backCCW,Xt,lt,J.id,$e.layoutVertexBuffer,$e.indexBuffer,$e.segments,J.paint,Me.transform.zoom,tt,Me.style.map.terrain&&$e.centroidVertexBuffer)}}function sc(Me,L,J,de,pe,Te,Ze){let rt=Me.context,vt=rt.gl,Mt=J.fbo;if(!Mt)return;let Gt=Me.useProgram("hillshade"),Ht=Me.style.map.terrain&&Me.style.map.terrain.getTerrainData(L);rt.activeTexture.set(vt.TEXTURE0),vt.bindTexture(vt.TEXTURE_2D,Mt.colorAttachment.get()),Gt.draw(rt,vt.TRIANGLES,pe,Te,Ze,qi.disabled,((fr,wr,Le,Oe)=>{let Ge=Le.paint.get("hillshade-shadow-color"),$e=Le.paint.get("hillshade-highlight-color"),lt=Le.paint.get("hillshade-accent-color"),tt=Le.paint.get("hillshade-illumination-direction")*(Math.PI/180);Le.paint.get("hillshade-illumination-anchor")==="viewport"&&(tt-=fr.transform.angle);let dt=!fr.options.moving;return{u_matrix:Oe?Oe.posMatrix:fr.transform.calculatePosMatrix(wr.tileID.toUnwrapped(),dt),u_image:0,u_latrange:Qi(0,wr.tileID),u_light:[Le.paint.get("hillshade-exaggeration"),tt],u_shadow:Ge,u_highlight:$e,u_accent:lt}})(Me,J,de,Ht?L:null),Ht,de.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments)}function qs(Me,L,J,de,pe,Te){let Ze=Me.context,rt=Ze.gl,vt=L.dem;if(vt&&vt.data){let Mt=vt.dim,Gt=vt.stride,Ht=vt.getPixels();if(Ze.activeTexture.set(rt.TEXTURE1),Ze.pixelStoreUnpackPremultiplyAlpha.set(!1),L.demTexture=L.demTexture||Me.getTileTexture(Gt),L.demTexture){let wr=L.demTexture;wr.update(Ht,{premultiply:!1}),wr.bind(rt.NEAREST,rt.CLAMP_TO_EDGE)}else L.demTexture=new h(Ze,Ht,rt.RGBA,{premultiply:!1}),L.demTexture.bind(rt.NEAREST,rt.CLAMP_TO_EDGE);Ze.activeTexture.set(rt.TEXTURE0);let fr=L.fbo;if(!fr){let wr=new h(Ze,{width:Mt,height:Mt,data:null},rt.RGBA);wr.bind(rt.LINEAR,rt.CLAMP_TO_EDGE),fr=L.fbo=Ze.createFramebuffer(Mt,Mt,!0,!1),fr.colorAttachment.set(wr.texture)}Ze.bindFramebuffer.set(fr.framebuffer),Ze.viewport.set([0,0,Mt,Mt]),Me.useProgram("hillshadePrepare").draw(Ze,rt.TRIANGLES,de,pe,Te,qi.disabled,((wr,Le)=>{let Oe=Le.stride,Ge=e.H();return e.aP(Ge,0,e.X,-e.X,0,0,1),e.J(Ge,Ge,[0,-e.X,0]),{u_matrix:Ge,u_image:1,u_dimension:[Oe,Oe],u_zoom:wr.overscaledZ,u_unpack:Le.getUnpackVector()}})(L.tileID,vt),null,J.id,Me.rasterBoundsBuffer,Me.quadTriangleIndexBuffer,Me.rasterBoundsSegments),L.needsHillshadePrepare=!1}}function lc(Me,L,J,de,pe,Te){let Ze=de.paint.get("raster-fade-duration");if(!Te&&Ze>0){let rt=n.now(),vt=(rt-Me.timeAdded)/Ze,Mt=L?(rt-L.timeAdded)/Ze:-1,Gt=J.getSource(),Ht=pe.coveringZoomLevel({tileSize:Gt.tileSize,roundZoom:Gt.roundZoom}),fr=!L||Math.abs(L.tileID.overscaledZ-Ht)>Math.abs(Me.tileID.overscaledZ-Ht),wr=fr&&Me.refreshedUponExpiration?1:e.ac(fr?vt:1-Mt,0,1);return Me.refreshedUponExpiration&&vt>=1&&(Me.refreshedUponExpiration=!1),L?{opacity:1,mix:1-wr}:{opacity:wr,mix:0}}return{opacity:1,mix:0}}let Fu=new e.aM(1,0,0,1),Ko=new e.aM(0,1,0,1),Lc=new e.aM(0,0,1,1),Kf=new e.aM(1,0,1,1),yf=new e.aM(0,1,1,1);function $u(Me,L,J,de){Pc(Me,0,L+J/2,Me.transform.width,J,de)}function _f(Me,L,J,de){Pc(Me,L-J/2,0,J,Me.transform.height,de)}function Pc(Me,L,J,de,pe,Te){let Ze=Me.context,rt=Ze.gl;rt.enable(rt.SCISSOR_TEST),rt.scissor(L*Me.pixelRatio,J*Me.pixelRatio,de*Me.pixelRatio,pe*Me.pixelRatio),Ze.clear({color:Te}),rt.disable(rt.SCISSOR_TEST)}function Jf(Me,L,J){let de=Me.context,pe=de.gl,Te=J.posMatrix,Ze=Me.useProgram("debug"),rt=Io.disabled,vt=Vo.disabled,Mt=Me.colorModeForRenderPass(),Gt="$debug",Ht=Me.style.map.terrain&&Me.style.map.terrain.getTerrainData(J);de.activeTexture.set(pe.TEXTURE0);let fr=L.getTileByID(J.key).latestRawTileData,wr=Math.floor((fr&&fr.byteLength||0)/1024),Le=L.getTile(J).tileSize,Oe=512/Math.min(Le,512)*(J.overscaledZ/Me.transform.zoom)*.5,Ge=J.canonical.toString();J.overscaledZ!==J.canonical.z&&(Ge+=` => ${J.overscaledZ}`),function($e,lt){$e.initDebugOverlayCanvas();let tt=$e.debugOverlayCanvas,dt=$e.context.gl,Rt=$e.debugOverlayCanvas.getContext("2d");Rt.clearRect(0,0,tt.width,tt.height),Rt.shadowColor="white",Rt.shadowBlur=2,Rt.lineWidth=1.5,Rt.strokeStyle="white",Rt.textBaseline="top",Rt.font="bold 36px Open Sans, sans-serif",Rt.fillText(lt,5,5),Rt.strokeText(lt,5,5),$e.debugOverlayTexture.update(tt),$e.debugOverlayTexture.bind(dt.LINEAR,dt.CLAMP_TO_EDGE)}(Me,`${Ge} ${wr}kB`),Ze.draw(de,pe.TRIANGLES,rt,vt,zs.alphaBlended,qi.disabled,On(Te,e.aM.transparent,Oe),null,Gt,Me.debugBuffer,Me.quadTriangleIndexBuffer,Me.debugSegments),Ze.draw(de,pe.LINE_STRIP,rt,vt,Mt,qi.disabled,On(Te,e.aM.red),Ht,Gt,Me.debugBuffer,Me.tileBorderIndexBuffer,Me.debugSegments)}function Gs(Me,L,J){let de=Me.context,pe=de.gl,Te=Me.colorModeForRenderPass(),Ze=new Io(pe.LEQUAL,Io.ReadWrite,Me.depthRangeFor3D),rt=Me.useProgram("terrain"),vt=L.getTerrainMesh();de.bindFramebuffer.set(null),de.viewport.set([0,0,Me.width,Me.height]);for(let Mt of J){let Gt=Me.renderToTexture.getTexture(Mt),Ht=L.getTerrainData(Mt.tileID);de.activeTexture.set(pe.TEXTURE0),pe.bindTexture(pe.TEXTURE_2D,Gt.texture);let fr=Me.transform.calculatePosMatrix(Mt.tileID.toUnwrapped()),wr=L.getMeshFrameDelta(Me.transform.zoom),Le=Me.transform.calculateFogMatrix(Mt.tileID.toUnwrapped()),Oe=qt(fr,wr,Le,Me.style.sky,Me.transform.pitch);rt.draw(de,pe.TRIANGLES,Ze,Vo.disabled,Te,qi.backCCW,Oe,Ht,"terrain",vt.vertexBuffer,vt.indexBuffer,vt.segments)}}class tu{constructor(L,J,de){this.vertexBuffer=L,this.indexBuffer=J,this.segments=de}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}class xf{constructor(L,J){this.context=new Zf(L),this.transform=J,this._tileTextures={},this.terrainFacilitator={dirty:!0,matrix:e.an(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=st.maxUnderzooming+st.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Qe}resize(L,J,de){if(this.width=Math.floor(L*de),this.height=Math.floor(J*de),this.pixelRatio=de,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let pe of this.style._order)this.style._layers[pe].resize()}setup(){let L=this.context,J=new e.aX;J.emplaceBack(0,0),J.emplaceBack(e.X,0),J.emplaceBack(0,e.X),J.emplaceBack(e.X,e.X),this.tileExtentBuffer=L.createVertexBuffer(J,cr.members),this.tileExtentSegments=e.a0.simpleSegment(0,0,4,2);let de=new e.aX;de.emplaceBack(0,0),de.emplaceBack(e.X,0),de.emplaceBack(0,e.X),de.emplaceBack(e.X,e.X),this.debugBuffer=L.createVertexBuffer(de,cr.members),this.debugSegments=e.a0.simpleSegment(0,0,4,5);let pe=new e.$;pe.emplaceBack(0,0,0,0),pe.emplaceBack(e.X,0,e.X,0),pe.emplaceBack(0,e.X,0,e.X),pe.emplaceBack(e.X,e.X,e.X,e.X),this.rasterBoundsBuffer=L.createVertexBuffer(pe,Ce.members),this.rasterBoundsSegments=e.a0.simpleSegment(0,0,4,2);let Te=new e.aX;Te.emplaceBack(0,0),Te.emplaceBack(1,0),Te.emplaceBack(0,1),Te.emplaceBack(1,1),this.viewportBuffer=L.createVertexBuffer(Te,cr.members),this.viewportSegments=e.a0.simpleSegment(0,0,4,2);let Ze=new e.aZ;Ze.emplaceBack(0),Ze.emplaceBack(1),Ze.emplaceBack(3),Ze.emplaceBack(2),Ze.emplaceBack(0),this.tileBorderIndexBuffer=L.createIndexBuffer(Ze);let rt=new e.aY;rt.emplaceBack(0,1,2),rt.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=L.createIndexBuffer(rt);let vt=this.context.gl;this.stencilClearMode=new Vo({func:vt.ALWAYS,mask:0},0,255,vt.ZERO,vt.ZERO,vt.ZERO)}clearStencil(){let L=this.context,J=L.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let de=e.H();e.aP(de,0,this.width,this.height,0,0,1),e.K(de,de,[J.drawingBufferWidth,J.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(L,J.TRIANGLES,Io.disabled,this.stencilClearMode,zs.disabled,qi.disabled,ui(de),null,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(L,J){if(this.currentStencilSource===L.source||!L.isTileClipped()||!J||!J.length)return;this.currentStencilSource=L.source;let de=this.context,pe=de.gl;this.nextStencilID+J.length>256&&this.clearStencil(),de.setColorMode(zs.disabled),de.setDepthMode(Io.disabled);let Te=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(let Ze of J){let rt=this._tileClippingMaskIDs[Ze.key]=this.nextStencilID++,vt=this.style.map.terrain&&this.style.map.terrain.getTerrainData(Ze);Te.draw(de,pe.TRIANGLES,Io.disabled,new Vo({func:pe.ALWAYS,mask:0},rt,255,pe.KEEP,pe.KEEP,pe.REPLACE),zs.disabled,qi.disabled,ui(Ze.posMatrix),vt,"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let L=this.nextStencilID++,J=this.context.gl;return new Vo({func:J.NOTEQUAL,mask:255},L,255,J.KEEP,J.KEEP,J.REPLACE)}stencilModeForClipping(L){let J=this.context.gl;return new Vo({func:J.EQUAL,mask:255},this._tileClippingMaskIDs[L.key],0,J.KEEP,J.KEEP,J.REPLACE)}stencilConfigForOverlap(L){let J=this.context.gl,de=L.sort((Ze,rt)=>rt.overscaledZ-Ze.overscaledZ),pe=de[de.length-1].overscaledZ,Te=de[0].overscaledZ-pe+1;if(Te>1){this.currentStencilSource=void 0,this.nextStencilID+Te>256&&this.clearStencil();let Ze={};for(let rt=0;rt({u_sky_color:$e.properties.get("sky-color"),u_horizon_color:$e.properties.get("horizon-color"),u_horizon:(lt.height/2+lt.getHorizon())*tt,u_sky_horizon_blend:$e.properties.get("sky-horizon-blend")*lt.height/2*tt}))(Mt,vt.style.map.transform,vt.pixelRatio),wr=new Io(Ht.LEQUAL,Io.ReadWrite,[0,1]),Le=Vo.disabled,Oe=vt.colorModeForRenderPass(),Ge=vt.useProgram("sky");if(!Mt.mesh){let $e=new e.aX;$e.emplaceBack(-1,-1),$e.emplaceBack(1,-1),$e.emplaceBack(1,1),$e.emplaceBack(-1,1);let lt=new e.aY;lt.emplaceBack(0,1,2),lt.emplaceBack(0,2,3),Mt.mesh=new tu(Gt.createVertexBuffer($e,cr.members),Gt.createIndexBuffer(lt),e.a0.simpleSegment(0,0,$e.length,lt.length))}Ge.draw(Gt,Ht.TRIANGLES,wr,Le,Oe,qi.disabled,fr,void 0,"sky",Mt.mesh.vertexBuffer,Mt.mesh.indexBuffer,Mt.mesh.segments)}(this,this.style.sky),this._showOverdrawInspector=J.showOverdrawInspector,this.depthRangeFor3D=[0,1-(L._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=de.length-1;this.currentLayer>=0;this.currentLayer--){let vt=this.style._layers[de[this.currentLayer]],Mt=pe[vt.source],Gt=Te[vt.source];this._renderTileClippingMasks(vt,Gt),this.renderLayer(this,Mt,vt,Gt)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayerGe.source&&!Ge.isHidden(Gt)?[Mt.sourceCaches[Ge.source]]:[]),wr=fr.filter(Ge=>Ge.getSource().type==="vector"),Le=fr.filter(Ge=>Ge.getSource().type!=="vector"),Oe=Ge=>{(!Ht||Ht.getSource().maxzoomOe(Ge)),Ht||Le.forEach(Ge=>Oe(Ge)),Ht}(this.style,this.transform.zoom);vt&&function(Mt,Gt,Ht){for(let fr=0;fr0),pe&&(e.b0(J,de),this.terrainFacilitator.renderTime=Date.now(),this.terrainFacilitator.dirty=!1,function(Te,Ze){let rt=Te.context,vt=rt.gl,Mt=zs.unblended,Gt=new Io(vt.LEQUAL,Io.ReadWrite,[0,1]),Ht=Ze.getTerrainMesh(),fr=Ze.sourceCache.getRenderableTiles(),wr=Te.useProgram("terrainDepth");rt.bindFramebuffer.set(Ze.getFramebuffer("depth").framebuffer),rt.viewport.set([0,0,Te.width/devicePixelRatio,Te.height/devicePixelRatio]),rt.clear({color:e.aM.transparent,depth:1});for(let Le of fr){let Oe=Ze.getTerrainData(Le.tileID),Ge={u_matrix:Te.transform.calculatePosMatrix(Le.tileID.toUnwrapped()),u_ele_delta:Ze.getMeshFrameDelta(Te.transform.zoom)};wr.draw(rt,vt.TRIANGLES,Gt,Vo.disabled,Mt,qi.backCCW,Ge,Oe,"terrain",Ht.vertexBuffer,Ht.indexBuffer,Ht.segments)}rt.bindFramebuffer.set(null),rt.viewport.set([0,0,Te.width,Te.height])}(this,this.style.map.terrain),function(Te,Ze){let rt=Te.context,vt=rt.gl,Mt=zs.unblended,Gt=new Io(vt.LEQUAL,Io.ReadWrite,[0,1]),Ht=Ze.getTerrainMesh(),fr=Ze.getCoordsTexture(),wr=Ze.sourceCache.getRenderableTiles(),Le=Te.useProgram("terrainCoords");rt.bindFramebuffer.set(Ze.getFramebuffer("coords").framebuffer),rt.viewport.set([0,0,Te.width/devicePixelRatio,Te.height/devicePixelRatio]),rt.clear({color:e.aM.transparent,depth:1}),Ze.coordsIndex=[];for(let Oe of wr){let Ge=Ze.getTerrainData(Oe.tileID);rt.activeTexture.set(vt.TEXTURE0),vt.bindTexture(vt.TEXTURE_2D,fr.texture);let $e={u_matrix:Te.transform.calculatePosMatrix(Oe.tileID.toUnwrapped()),u_terrain_coords_id:(255-Ze.coordsIndex.length)/255,u_texture:0,u_ele_delta:Ze.getMeshFrameDelta(Te.transform.zoom)};Le.draw(rt,vt.TRIANGLES,Gt,Vo.disabled,Mt,qi.backCCW,$e,Ge,"terrain",Ht.vertexBuffer,Ht.indexBuffer,Ht.segments),Ze.coordsIndex.push(Oe.tileID.key)}rt.bindFramebuffer.set(null),rt.viewport.set([0,0,Te.width,Te.height])}(this,this.style.map.terrain))}renderLayer(L,J,de,pe){if(!de.isHidden(this.transform.zoom)&&(de.type==="background"||de.type==="custom"||(pe||[]).length))switch(this.id=de.id,de.type){case"symbol":(function(Te,Ze,rt,vt,Mt){if(Te.renderPass!=="translucent")return;let Gt=Vo.disabled,Ht=Te.colorModeForRenderPass();(rt._unevaluatedLayout.hasValue("text-variable-anchor")||rt._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(fr,wr,Le,Oe,Ge,$e,lt,tt,dt){let Rt=wr.transform,Ot=on(),Xt=Ge==="map",nr=$e==="map";for(let pr of fr){let Lr=Oe.getTile(pr),Br=Lr.getBucket(Le);if(!Br||!Br.text||!Br.text.segments.get().length)continue;let Kr=e.ag(Br.textSizeData,Rt.zoom),ya=ra(Lr,1,wr.transform.zoom),Za=Nt(pr.posMatrix,nr,Xt,wr.transform,ya),Ha=Le.layout.get("icon-text-fit")!=="none"&&Br.hasIconData();if(Kr){let un=Math.pow(2,Rt.zoom-Lr.tileID.overscaledZ),Bn=wr.style.map.terrain?(Jn,Pi)=>wr.style.map.terrain.getElevation(pr,Jn,Pi):null,li=Ot.translatePosition(Rt,Lr,lt,tt);nc(Br,Xt,nr,dt,Rt,Za,pr.posMatrix,un,Kr,Ha,Ot,li,pr.toUnwrapped(),Bn)}}}(vt,Te,rt,Ze,rt.layout.get("text-rotation-alignment"),rt.layout.get("text-pitch-alignment"),rt.paint.get("text-translate"),rt.paint.get("text-translate-anchor"),Mt),rt.paint.get("icon-opacity").constantOr(1)!==0&&gf(Te,Ze,rt,vt,!1,rt.paint.get("icon-translate"),rt.paint.get("icon-translate-anchor"),rt.layout.get("icon-rotation-alignment"),rt.layout.get("icon-pitch-alignment"),rt.layout.get("icon-keep-upright"),Gt,Ht),rt.paint.get("text-opacity").constantOr(1)!==0&&gf(Te,Ze,rt,vt,!0,rt.paint.get("text-translate"),rt.paint.get("text-translate-anchor"),rt.layout.get("text-rotation-alignment"),rt.layout.get("text-pitch-alignment"),rt.layout.get("text-keep-upright"),Gt,Ht),Ze.map.showCollisionBoxes&&(bc(Te,Ze,rt,vt,!0),bc(Te,Ze,rt,vt,!1))})(L,J,de,pe,this.style.placement.variableOffsets);break;case"circle":(function(Te,Ze,rt,vt){if(Te.renderPass!=="translucent")return;let Mt=rt.paint.get("circle-opacity"),Gt=rt.paint.get("circle-stroke-width"),Ht=rt.paint.get("circle-stroke-opacity"),fr=!rt.layout.get("circle-sort-key").isConstant();if(Mt.constantOr(1)===0&&(Gt.constantOr(1)===0||Ht.constantOr(1)===0))return;let wr=Te.context,Le=wr.gl,Oe=Te.depthModeForSublayer(0,Io.ReadOnly),Ge=Vo.disabled,$e=Te.colorModeForRenderPass(),lt=[];for(let tt=0;tttt.sortKey-dt.sortKey);for(let tt of lt){let{programConfiguration:dt,program:Rt,layoutVertexBuffer:Ot,indexBuffer:Xt,uniformValues:nr,terrainData:pr}=tt.state;Rt.draw(wr,Le.TRIANGLES,Oe,Ge,$e,qi.disabled,nr,pr,rt.id,Ot,Xt,tt.segments,rt.paint,Te.transform.zoom,dt)}})(L,J,de,pe);break;case"heatmap":(function(Te,Ze,rt,vt){if(rt.paint.get("heatmap-opacity")===0)return;let Mt=Te.context;if(Te.style.map.terrain){for(let Gt of vt){let Ht=Ze.getTile(Gt);Ze.hasRenderableParent(Gt)||(Te.renderPass==="offscreen"?ic(Te,Ht,rt,Gt):Te.renderPass==="translucent"&&oc(Te,rt,Gt))}Mt.viewport.set([0,0,Te.width,Te.height])}else Te.renderPass==="offscreen"?function(Gt,Ht,fr,wr){let Le=Gt.context,Oe=Le.gl,Ge=Vo.disabled,$e=new zs([Oe.ONE,Oe.ONE],e.aM.transparent,[!0,!0,!0,!0]);(function(lt,tt,dt){let Rt=lt.gl;lt.activeTexture.set(Rt.TEXTURE1),lt.viewport.set([0,0,tt.width/4,tt.height/4]);let Ot=dt.heatmapFbos.get(e.aU);Ot?(Rt.bindTexture(Rt.TEXTURE_2D,Ot.colorAttachment.get()),lt.bindFramebuffer.set(Ot.framebuffer)):(Ot=Xc(lt,tt.width/4,tt.height/4),dt.heatmapFbos.set(e.aU,Ot))})(Le,Gt,fr),Le.clear({color:e.aM.transparent});for(let lt=0;lt20&&Gt.texParameterf(Gt.TEXTURE_2D,Mt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Mt.extTextureFilterAnisotropicMax);let Br=Te.style.map.terrain&&Te.style.map.terrain.getTerrainData(lt),Kr=Br?lt:null,ya=Kr?Kr.posMatrix:Te.transform.calculatePosMatrix(lt.toUnwrapped(),$e),Za=fo(ya,pr||[0,0],nr||1,Xt,rt);Ht instanceof qe?fr.draw(Mt,Gt.TRIANGLES,tt,Vo.disabled,wr,qi.disabled,Za,Br,rt.id,Ht.boundsBuffer,Te.quadTriangleIndexBuffer,Ht.boundsSegments):fr.draw(Mt,Gt.TRIANGLES,tt,Le[lt.overscaledZ],wr,qi.disabled,Za,Br,rt.id,Te.rasterBoundsBuffer,Te.quadTriangleIndexBuffer,Te.rasterBoundsSegments)}})(L,J,de,pe);break;case"background":(function(Te,Ze,rt,vt){let Mt=rt.paint.get("background-color"),Gt=rt.paint.get("background-opacity");if(Gt===0)return;let Ht=Te.context,fr=Ht.gl,wr=Te.transform,Le=wr.tileSize,Oe=rt.paint.get("background-pattern");if(Te.isPatternMissing(Oe))return;let Ge=!Oe&&Mt.a===1&&Gt===1&&Te.opaquePassEnabledForLayer()?"opaque":"translucent";if(Te.renderPass!==Ge)return;let $e=Vo.disabled,lt=Te.depthModeForSublayer(0,Ge==="opaque"?Io.ReadWrite:Io.ReadOnly),tt=Te.colorModeForRenderPass(),dt=Te.useProgram(Oe?"backgroundPattern":"background"),Rt=vt||wr.coveringTiles({tileSize:Le,terrain:Te.style.map.terrain});Oe&&(Ht.activeTexture.set(fr.TEXTURE0),Te.imageManager.bind(Te.context));let Ot=rt.getCrossfadeParameters();for(let Xt of Rt){let nr=vt?Xt.posMatrix:Te.transform.calculatePosMatrix(Xt.toUnwrapped()),pr=Oe?zi(nr,Gt,Te,Oe,{tileID:Xt,tileSize:Le},Ot):Yi(nr,Gt,Mt),Lr=Te.style.map.terrain&&Te.style.map.terrain.getTerrainData(Xt);dt.draw(Ht,fr.TRIANGLES,lt,$e,tt,qi.disabled,pr,Lr,rt.id,Te.tileExtentBuffer,Te.quadTriangleIndexBuffer,Te.tileExtentSegments)}})(L,0,de,pe);break;case"custom":(function(Te,Ze,rt){let vt=Te.context,Mt=rt.implementation;if(Te.renderPass==="offscreen"){let Gt=Mt.prerender;Gt&&(Te.setCustomLayerDefaults(),vt.setColorMode(Te.colorModeForRenderPass()),Gt.call(Mt,vt.gl,Te.transform.customLayerMatrix()),vt.setDirty(),Te.setBaseState())}else if(Te.renderPass==="translucent"){Te.setCustomLayerDefaults(),vt.setColorMode(Te.colorModeForRenderPass()),vt.setStencilMode(Vo.disabled);let Gt=Mt.renderingMode==="3d"?new Io(Te.context.gl.LEQUAL,Io.ReadWrite,Te.depthRangeFor3D):Te.depthModeForSublayer(0,Io.ReadOnly);vt.setDepthMode(Gt),Mt.render(vt.gl,Te.transform.customLayerMatrix(),{farZ:Te.transform.farZ,nearZ:Te.transform.nearZ,fov:Te.transform._fov,modelViewProjectionMatrix:Te.transform.modelViewProjectionMatrix,projectionMatrix:Te.transform.projectionMatrix}),vt.setDirty(),Te.setBaseState(),vt.bindFramebuffer.set(null)}})(L,0,de)}}translatePosMatrix(L,J,de,pe,Te){if(!de[0]&&!de[1])return L;let Ze=Te?pe==="map"?this.transform.angle:0:pe==="viewport"?-this.transform.angle:0;if(Ze){let Mt=Math.sin(Ze),Gt=Math.cos(Ze);de=[de[0]*Gt-de[1]*Mt,de[0]*Mt+de[1]*Gt]}let rt=[Te?de[0]:ra(J,de[0],this.transform.zoom),Te?de[1]:ra(J,de[1],this.transform.zoom),0],vt=new Float32Array(16);return e.J(vt,L,rt),vt}saveTileTexture(L){let J=this._tileTextures[L.size[0]];J?J.push(L):this._tileTextures[L.size[0]]=[L]}getTileTexture(L){let J=this._tileTextures[L];return J&&J.length>0?J.pop():null}isPatternMissing(L){if(!L)return!1;if(!L.from||!L.to)return!0;let J=this.imageManager.getPattern(L.from.toString()),de=this.imageManager.getPattern(L.to.toString());return!J||!de}useProgram(L,J){this.cache=this.cache||{};let de=L+(J?J.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"")+(this.style.map.terrain?"/terrain":"");return this.cache[de]||(this.cache[de]=new br(this.context,tr[L],J,Uo[L],this._showOverdrawInspector,this.style.map.terrain)),this.cache[de]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let L=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(L.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new h(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){this.debugOverlayTexture&&this.debugOverlayTexture.destroy()}overLimit(){let{drawingBufferWidth:L,drawingBufferHeight:J}=this.context.gl;return this.width!==L||this.height!==J}}class Es{constructor(L,J){this.points=L,this.planes=J}static fromInvProjectionMatrix(L,J,de){let pe=Math.pow(2,de),Te=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(rt=>{let vt=1/(rt=e.af([],rt,L))[3]/J*pe;return e.b1(rt,rt,[vt,vt,1/rt[3],vt])}),Ze=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(rt=>{let vt=function(fr,wr){var Le=wr[0],Oe=wr[1],Ge=wr[2],$e=Le*Le+Oe*Oe+Ge*Ge;return $e>0&&($e=1/Math.sqrt($e)),fr[0]=wr[0]*$e,fr[1]=wr[1]*$e,fr[2]=wr[2]*$e,fr}([],function(fr,wr,Le){var Oe=wr[0],Ge=wr[1],$e=wr[2],lt=Le[0],tt=Le[1],dt=Le[2];return fr[0]=Ge*dt-$e*tt,fr[1]=$e*lt-Oe*dt,fr[2]=Oe*tt-Ge*lt,fr}([],E([],Te[rt[0]],Te[rt[1]]),E([],Te[rt[2]],Te[rt[1]]))),Mt=-((Gt=vt)[0]*(Ht=Te[rt[1]])[0]+Gt[1]*Ht[1]+Gt[2]*Ht[2]);var Gt,Ht;return vt.concat(Mt)});return new Es(Te,Ze)}}class zu{constructor(L,J){this.min=L,this.max=J,this.center=function(de,pe,Te){return de[0]=.5*pe[0],de[1]=.5*pe[1],de[2]=.5*pe[2],de}([],function(de,pe,Te){return de[0]=pe[0]+Te[0],de[1]=pe[1]+Te[1],de[2]=pe[2]+Te[2],de}([],this.min,this.max))}quadrant(L){let J=[L%2==0,L<2],de=M(this.min),pe=M(this.max);for(let Te=0;Te=0&&Ze++;if(Ze===0)return 0;Ze!==J.length&&(de=!1)}if(de)return 2;for(let pe=0;pe<3;pe++){let Te=Number.MAX_VALUE,Ze=-Number.MAX_VALUE;for(let rt=0;rtthis.max[pe]-this.min[pe])return 0}return 1}}class Fl{constructor(L=0,J=0,de=0,pe=0){if(isNaN(L)||L<0||isNaN(J)||J<0||isNaN(de)||de<0||isNaN(pe)||pe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=L,this.bottom=J,this.left=de,this.right=pe}interpolate(L,J,de){return J.top!=null&&L.top!=null&&(this.top=e.y.number(L.top,J.top,de)),J.bottom!=null&&L.bottom!=null&&(this.bottom=e.y.number(L.bottom,J.bottom,de)),J.left!=null&&L.left!=null&&(this.left=e.y.number(L.left,J.left,de)),J.right!=null&&L.right!=null&&(this.right=e.y.number(L.right,J.right,de)),this}getCenter(L,J){let de=e.ac((this.left+L-this.right)/2,0,L),pe=e.ac((this.top+J-this.bottom)/2,0,J);return new e.P(de,pe)}equals(L){return this.top===L.top&&this.bottom===L.bottom&&this.left===L.left&&this.right===L.right}clone(){return new Fl(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}let Ku=85.051129;class wc{constructor(L,J,de,pe,Te){this.tileSize=512,this._renderWorldCopies=Te===void 0||!!Te,this._minZoom=L||0,this._maxZoom=J||22,this._minPitch=de??0,this._maxPitch=pe??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new e.N(0,0),this._elevation=0,this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Fl,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={},this.minElevationForCurrentTile=0}clone(){let L=new wc(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return L.apply(this),L}apply(L){this.tileSize=L.tileSize,this.latRange=L.latRange,this.lngRange=L.lngRange,this.width=L.width,this.height=L.height,this._center=L._center,this._elevation=L._elevation,this.minElevationForCurrentTile=L.minElevationForCurrentTile,this.zoom=L.zoom,this.angle=L.angle,this._fov=L._fov,this._pitch=L._pitch,this._unmodified=L._unmodified,this._edgeInsets=L._edgeInsets.clone(),this._calcMatrices()}get minZoom(){return this._minZoom}set minZoom(L){this._minZoom!==L&&(this._minZoom=L,this.zoom=Math.max(this.zoom,L))}get maxZoom(){return this._maxZoom}set maxZoom(L){this._maxZoom!==L&&(this._maxZoom=L,this.zoom=Math.min(this.zoom,L))}get minPitch(){return this._minPitch}set minPitch(L){this._minPitch!==L&&(this._minPitch=L,this.pitch=Math.max(this.pitch,L))}get maxPitch(){return this._maxPitch}set maxPitch(L){this._maxPitch!==L&&(this._maxPitch=L,this.pitch=Math.min(this.pitch,L))}get renderWorldCopies(){return this._renderWorldCopies}set renderWorldCopies(L){L===void 0?L=!0:L===null&&(L=!1),this._renderWorldCopies=L}get worldSize(){return this.tileSize*this.scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this.width,this.height)}get bearing(){return-this.angle/Math.PI*180}set bearing(L){let J=-e.b3(L,-180,180)*Math.PI/180;this.angle!==J&&(this._unmodified=!1,this.angle=J,this._calcMatrices(),this.rotationMatrix=function(){var de=new e.A(4);return e.A!=Float32Array&&(de[1]=0,de[2]=0),de[0]=1,de[3]=1,de}(),function(de,pe,Te){var Ze=pe[0],rt=pe[1],vt=pe[2],Mt=pe[3],Gt=Math.sin(Te),Ht=Math.cos(Te);de[0]=Ze*Ht+vt*Gt,de[1]=rt*Ht+Mt*Gt,de[2]=Ze*-Gt+vt*Ht,de[3]=rt*-Gt+Mt*Ht}(this.rotationMatrix,this.rotationMatrix,this.angle))}get pitch(){return this._pitch/Math.PI*180}set pitch(L){let J=e.ac(L,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==J&&(this._unmodified=!1,this._pitch=J,this._calcMatrices())}get fov(){return this._fov/Math.PI*180}set fov(L){L=Math.max(.01,Math.min(60,L)),this._fov!==L&&(this._unmodified=!1,this._fov=L/180*Math.PI,this._calcMatrices())}get zoom(){return this._zoom}set zoom(L){let J=Math.min(Math.max(L,this.minZoom),this.maxZoom);this._zoom!==J&&(this._unmodified=!1,this._zoom=J,this.tileZoom=Math.max(0,Math.floor(J)),this.scale=this.zoomScale(J),this._constrain(),this._calcMatrices())}get center(){return this._center}set center(L){L.lat===this._center.lat&&L.lng===this._center.lng||(this._unmodified=!1,this._center=L,this._constrain(),this._calcMatrices())}get elevation(){return this._elevation}set elevation(L){L!==this._elevation&&(this._elevation=L,this._constrain(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}set padding(L){this._edgeInsets.equals(L)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,L,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this.width,this.height)}isPaddingEqual(L){return this._edgeInsets.equals(L)}interpolatePadding(L,J,de){this._unmodified=!1,this._edgeInsets.interpolate(L,J,de),this._constrain(),this._calcMatrices()}coveringZoomLevel(L){let J=(L.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/L.tileSize));return Math.max(0,J)}getVisibleUnwrappedCoordinates(L){let J=[new e.b4(0,L)];if(this._renderWorldCopies){let de=this.pointCoordinate(new e.P(0,0)),pe=this.pointCoordinate(new e.P(this.width,0)),Te=this.pointCoordinate(new e.P(this.width,this.height)),Ze=this.pointCoordinate(new e.P(0,this.height)),rt=Math.floor(Math.min(de.x,pe.x,Te.x,Ze.x)),vt=Math.floor(Math.max(de.x,pe.x,Te.x,Ze.x)),Mt=1;for(let Gt=rt-Mt;Gt<=vt+Mt;Gt++)Gt!==0&&J.push(new e.b4(Gt,L))}return J}coveringTiles(L){var J,de;let pe=this.coveringZoomLevel(L),Te=pe;if(L.minzoom!==void 0&&peL.maxzoom&&(pe=L.maxzoom);let Ze=this.pointCoordinate(this.getCameraPoint()),rt=e.Z.fromLngLat(this.center),vt=Math.pow(2,pe),Mt=[vt*Ze.x,vt*Ze.y,0],Gt=[vt*rt.x,vt*rt.y,0],Ht=Es.fromInvProjectionMatrix(this.invModelViewProjectionMatrix,this.worldSize,pe),fr=L.minzoom||0;!L.terrain&&this.pitch<=60&&this._edgeInsets.top<.1&&(fr=pe);let wr=L.terrain?2/Math.min(this.tileSize,L.tileSize)*this.tileSize:3,Le=tt=>({aabb:new zu([tt*vt,0,0],[(tt+1)*vt,vt,0]),zoom:0,x:0,y:0,wrap:tt,fullyVisible:!1}),Oe=[],Ge=[],$e=pe,lt=L.reparseOverscaled?Te:pe;if(this._renderWorldCopies)for(let tt=1;tt<=3;tt++)Oe.push(Le(-tt)),Oe.push(Le(tt));for(Oe.push(Le(0));Oe.length>0;){let tt=Oe.pop(),dt=tt.x,Rt=tt.y,Ot=tt.fullyVisible;if(!Ot){let Br=tt.aabb.intersects(Ht);if(Br===0)continue;Ot=Br===2}let Xt=L.terrain?Mt:Gt,nr=tt.aabb.distanceX(Xt),pr=tt.aabb.distanceY(Xt),Lr=Math.max(Math.abs(nr),Math.abs(pr));if(tt.zoom===$e||Lr>wr+(1<<$e-tt.zoom)-2&&tt.zoom>=fr){let Br=$e-tt.zoom,Kr=Mt[0]-.5-(dt<>1),Za=tt.zoom+1,Ha=tt.aabb.quadrant(Br);if(L.terrain){let un=new e.S(Za,tt.wrap,Za,Kr,ya),Bn=L.terrain.getMinMaxElevation(un),li=(J=Bn.minElevation)!==null&&J!==void 0?J:this.elevation,Jn=(de=Bn.maxElevation)!==null&&de!==void 0?de:this.elevation;Ha=new zu([Ha.min[0],Ha.min[1],li],[Ha.max[0],Ha.max[1],Jn])}Oe.push({aabb:Ha,zoom:Za,x:Kr,y:ya,wrap:tt.wrap,fullyVisible:Ot})}}return Ge.sort((tt,dt)=>tt.distanceSq-dt.distanceSq).map(tt=>tt.tileID)}resize(L,J){this.width=L,this.height=J,this.pixelsToGLUnits=[2/L,-2/J],this._constrain(),this._calcMatrices()}get unmodified(){return this._unmodified}zoomScale(L){return Math.pow(2,L)}scaleZoom(L){return Math.log(L)/Math.LN2}project(L){let J=e.ac(L.lat,-85.051129,Ku);return new e.P(e.O(L.lng)*this.worldSize,e.Q(J)*this.worldSize)}unproject(L){return new e.Z(L.x/this.worldSize,L.y/this.worldSize).toLngLat()}get point(){return this.project(this.center)}getCameraPosition(){return{lngLat:this.pointLocation(this.getCameraPoint()),altitude:Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter+this.elevation}}recalculateZoom(L){let J=this.elevation,de=Math.cos(this._pitch)*this.cameraToCenterDistance/this._pixelPerMeter,pe=this.pointLocation(this.centerPoint,L),Te=L.getElevationForLngLatZoom(pe,this.tileZoom);if(!(this.elevation-Te))return;let Ze=de+J-Te,rt=Math.cos(this._pitch)*this.cameraToCenterDistance/Ze/e.b5(1,pe.lat),vt=this.scaleZoom(rt/this.tileSize);this._elevation=Te,this._center=pe,this.zoom=vt}setLocationAtPoint(L,J){let de=this.pointCoordinate(J),pe=this.pointCoordinate(this.centerPoint),Te=this.locationCoordinate(L),Ze=new e.Z(Te.x-(de.x-pe.x),Te.y-(de.y-pe.y));this.center=this.coordinateLocation(Ze),this._renderWorldCopies&&(this.center=this.center.wrap())}locationPoint(L,J){return J?this.coordinatePoint(this.locationCoordinate(L),J.getElevationForLngLatZoom(L,this.tileZoom),this.pixelMatrix3D):this.coordinatePoint(this.locationCoordinate(L))}pointLocation(L,J){return this.coordinateLocation(this.pointCoordinate(L,J))}locationCoordinate(L){return e.Z.fromLngLat(L)}coordinateLocation(L){return L&&L.toLngLat()}pointCoordinate(L,J){if(J){let fr=J.pointCoordinate(L);if(fr!=null)return fr}let de=[L.x,L.y,0,1],pe=[L.x,L.y,1,1];e.af(de,de,this.pixelMatrixInverse),e.af(pe,pe,this.pixelMatrixInverse);let Te=de[3],Ze=pe[3],rt=de[1]/Te,vt=pe[1]/Ze,Mt=de[2]/Te,Gt=pe[2]/Ze,Ht=Mt===Gt?0:(0-Mt)/(Gt-Mt);return new e.Z(e.y.number(de[0]/Te,pe[0]/Ze,Ht)/this.worldSize,e.y.number(rt,vt,Ht)/this.worldSize)}coordinatePoint(L,J=0,de=this.pixelMatrix){let pe=[L.x*this.worldSize,L.y*this.worldSize,J,1];return e.af(pe,pe,de),new e.P(pe[0]/pe[3],pe[1]/pe[3])}getBounds(){let L=Math.max(0,this.height/2-this.getHorizon());return new re().extend(this.pointLocation(new e.P(0,L))).extend(this.pointLocation(new e.P(this.width,L))).extend(this.pointLocation(new e.P(this.width,this.height))).extend(this.pointLocation(new e.P(0,this.height)))}getMaxBounds(){return this.latRange&&this.latRange.length===2&&this.lngRange&&this.lngRange.length===2?new re([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null}getHorizon(){return Math.tan(Math.PI/2-this._pitch)*this.cameraToCenterDistance*.85}setMaxBounds(L){L?(this.lngRange=[L.getWest(),L.getEast()],this.latRange=[L.getSouth(),L.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-85.051129,Ku])}calculateTileMatrix(L){let J=L.canonical,de=this.worldSize/this.zoomScale(J.z),pe=J.x+Math.pow(2,J.z)*L.wrap,Te=e.an(new Float64Array(16));return e.J(Te,Te,[pe*de,J.y*de,0]),e.K(Te,Te,[de/e.X,de/e.X,1]),Te}calculatePosMatrix(L,J=!1){let de=L.key,pe=J?this._alignedPosMatrixCache:this._posMatrixCache;if(pe[de])return pe[de];let Te=this.calculateTileMatrix(L);return e.L(Te,J?this.alignedModelViewProjectionMatrix:this.modelViewProjectionMatrix,Te),pe[de]=new Float32Array(Te),pe[de]}calculateFogMatrix(L){let J=L.key,de=this._fogMatrixCache;if(de[J])return de[J];let pe=this.calculateTileMatrix(L);return e.L(pe,this.fogMatrix,pe),de[J]=new Float32Array(pe),de[J]}customLayerMatrix(){return this.mercatorMatrix.slice()}getConstrained(L,J){J=e.ac(+J,this.minZoom,this.maxZoom);let de={center:new e.N(L.lng,L.lat),zoom:J},pe=this.lngRange;if(!this._renderWorldCopies&&pe===null){let tt=179.9999999999;pe=[-tt,tt]}let Te=this.tileSize*this.zoomScale(de.zoom),Ze=0,rt=Te,vt=0,Mt=Te,Gt=0,Ht=0,{x:fr,y:wr}=this.size;if(this.latRange){let tt=this.latRange;Ze=e.Q(tt[1])*Te,rt=e.Q(tt[0])*Te,rt-Zert&&($e=rt-tt)}if(pe){let tt=(vt+Mt)/2,dt=Le;this._renderWorldCopies&&(dt=e.b3(Le,tt-Te/2,tt+Te/2));let Rt=fr/2;dt-RtMt&&(Ge=Mt-Rt)}if(Ge!==void 0||$e!==void 0){let tt=new e.P(Ge??Le,$e??Oe);de.center=this.unproject.call({worldSize:Te},tt).wrap()}return de}_constrain(){if(!this.center||!this.width||!this.height||this._constraining)return;this._constraining=!0;let L=this._unmodified,{center:J,zoom:de}=this.getConstrained(this.center,this.zoom);this.center=J,this.zoom=de,this._unmodified=L,this._constraining=!1}_calcMatrices(){if(!this.height)return;let L=this.centerOffset,J=this.point.x,de=this.point.y;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height,this._pixelPerMeter=e.b5(1,this.center.lat)*this.worldSize;let pe=e.an(new Float64Array(16));e.K(pe,pe,[this.width/2,-this.height/2,1]),e.J(pe,pe,[1,-1,0]),this.labelPlaneMatrix=pe,pe=e.an(new Float64Array(16)),e.K(pe,pe,[1,-1,1]),e.J(pe,pe,[-1,-1,0]),e.K(pe,pe,[2/this.width,2/this.height,1]),this.glCoordMatrix=pe;let Te=this.cameraToCenterDistance+this._elevation*this._pixelPerMeter/Math.cos(this._pitch),Ze=Math.min(this.elevation,this.minElevationForCurrentTile),rt=Te-Ze*this._pixelPerMeter/Math.cos(this._pitch),vt=Ze<0?rt:Te,Mt=Math.PI/2+this._pitch,Gt=this._fov*(.5+L.y/this.height),Ht=Math.sin(Gt)*vt/Math.sin(e.ac(Math.PI-Mt-Gt,.01,Math.PI-.01)),fr=this.getHorizon(),wr=2*Math.atan(fr/this.cameraToCenterDistance)*(.5+L.y/(2*fr)),Le=Math.sin(wr)*vt/Math.sin(e.ac(Math.PI-Mt-wr,.01,Math.PI-.01)),Oe=Math.min(Ht,Le);this.farZ=1.01*(Math.cos(Math.PI/2-this._pitch)*Oe+vt),this.nearZ=this.height/50,pe=new Float64Array(16),e.b6(pe,this._fov,this.width/this.height,this.nearZ,this.farZ),pe[8]=2*-L.x/this.width,pe[9]=2*L.y/this.height,this.projectionMatrix=e.ae(pe),e.K(pe,pe,[1,-1,1]),e.J(pe,pe,[0,0,-this.cameraToCenterDistance]),e.b7(pe,pe,this._pitch),e.ad(pe,pe,this.angle),e.J(pe,pe,[-J,-de,0]),this.mercatorMatrix=e.K([],pe,[this.worldSize,this.worldSize,this.worldSize]),e.K(pe,pe,[1,1,this._pixelPerMeter]),this.pixelMatrix=e.L(new Float64Array(16),this.labelPlaneMatrix,pe),e.J(pe,pe,[0,0,-this.elevation]),this.modelViewProjectionMatrix=pe,this.invModelViewProjectionMatrix=e.as([],pe),this.fogMatrix=new Float64Array(16),e.b6(this.fogMatrix,this._fov,this.width/this.height,Te,this.farZ),this.fogMatrix[8]=2*-L.x/this.width,this.fogMatrix[9]=2*L.y/this.height,e.K(this.fogMatrix,this.fogMatrix,[1,-1,1]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.cameraToCenterDistance]),e.b7(this.fogMatrix,this.fogMatrix,this._pitch),e.ad(this.fogMatrix,this.fogMatrix,this.angle),e.J(this.fogMatrix,this.fogMatrix,[-J,-de,0]),e.K(this.fogMatrix,this.fogMatrix,[1,1,this._pixelPerMeter]),e.J(this.fogMatrix,this.fogMatrix,[0,0,-this.elevation]),this.pixelMatrix3D=e.L(new Float64Array(16),this.labelPlaneMatrix,pe);let Ge=this.width%2/2,$e=this.height%2/2,lt=Math.cos(this.angle),tt=Math.sin(this.angle),dt=J-Math.round(J)+lt*Ge+tt*$e,Rt=de-Math.round(de)+lt*$e+tt*Ge,Ot=new Float64Array(pe);if(e.J(Ot,Ot,[dt>.5?dt-1:dt,Rt>.5?Rt-1:Rt,0]),this.alignedModelViewProjectionMatrix=Ot,pe=e.as(new Float64Array(16),this.pixelMatrix),!pe)throw new Error("failed to invert matrix");this.pixelMatrixInverse=pe,this._posMatrixCache={},this._alignedPosMatrixCache={},this._fogMatrixCache={}}maxPitchScaleFactor(){if(!this.pixelMatrixInverse)return 1;let L=this.pointCoordinate(new e.P(0,0)),J=[L.x*this.worldSize,L.y*this.worldSize,0,1];return e.af(J,J,this.pixelMatrix)[3]/this.cameraToCenterDistance}getCameraPoint(){let L=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(0,L))}getCameraQueryGeometry(L){let J=this.getCameraPoint();if(L.length===1)return[L[0],J];{let de=J.x,pe=J.y,Te=J.x,Ze=J.y;for(let rt of L)de=Math.min(de,rt.x),pe=Math.min(pe,rt.y),Te=Math.max(Te,rt.x),Ze=Math.max(Ze,rt.y);return[new e.P(de,pe),new e.P(Te,pe),new e.P(Te,Ze),new e.P(de,Ze),new e.P(de,pe)]}}lngLatToCameraDepth(L,J){let de=this.locationCoordinate(L),pe=[de.x*this.worldSize,de.y*this.worldSize,J,1];return e.af(pe,pe,this.modelViewProjectionMatrix),pe[2]/pe[3]}}function $c(Me,L){let J,de=!1,pe=null,Te=null,Ze=()=>{pe=null,de&&(Me.apply(Te,J),pe=setTimeout(Ze,L),de=!1)};return(...rt)=>(de=!0,Te=this,J=rt,pe||Ze(),pe)}class bf{constructor(L){this._getCurrentHash=()=>{let J=window.location.hash.replace("#","");if(this._hashName){let de;return J.split("&").map(pe=>pe.split("=")).forEach(pe=>{pe[0]===this._hashName&&(de=pe)}),(de&&de[1]||"").split("/")}return J.split("/")},this._onHashChange=()=>{let J=this._getCurrentHash();if(J.length>=3&&!J.some(de=>isNaN(de))){let de=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(J[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+J[2],+J[1]],zoom:+J[0],bearing:de,pitch:+(J[4]||0)}),!0}return!1},this._updateHashUnthrottled=()=>{let J=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,J)},this._removeHash=()=>{let J=this._getCurrentHash();if(J.length===0)return;let de=J.join("/"),pe=de;pe.split("&").length>0&&(pe=pe.split("&")[0]),this._hashName&&(pe=`${this._hashName}=${de}`);let Te=window.location.hash.replace(pe,"");Te.startsWith("#&")?Te=Te.slice(0,1)+Te.slice(2):Te==="#"&&(Te="");let Ze=window.location.href.replace(/(#.+)?$/,Te);Ze=Ze.replace("&&","&"),window.history.replaceState(window.history.state,null,Ze)},this._updateHash=$c(this._updateHashUnthrottled,300),this._hashName=L&&encodeURIComponent(L)}addTo(L){return this._map=L,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(L){let J=this._map.getCenter(),de=Math.round(100*this._map.getZoom())/100,pe=Math.ceil((de*Math.LN2+Math.log(512/360/.5))/Math.LN10),Te=Math.pow(10,pe),Ze=Math.round(J.lng*Te)/Te,rt=Math.round(J.lat*Te)/Te,vt=this._map.getBearing(),Mt=this._map.getPitch(),Gt="";if(Gt+=L?`/${Ze}/${rt}/${de}`:`${de}/${rt}/${Ze}`,(vt||Mt)&&(Gt+="/"+Math.round(10*vt)/10),Mt&&(Gt+=`/${Math.round(Mt)}`),this._hashName){let Ht=this._hashName,fr=!1,wr=window.location.hash.slice(1).split("&").map(Le=>{let Oe=Le.split("=")[0];return Oe===Ht?(fr=!0,`${Oe}=${Gt}`):Le}).filter(Le=>Le);return fr||wr.push(`${Ht}=${Gt}`),`#${wr.join("&")}`}return`#${Gt}`}}let vu={linearity:.3,easing:e.b8(0,0,.3,1)},Bu=e.e({deceleration:2500,maxSpeed:1400},vu),Tu=e.e({deceleration:20,maxSpeed:1400},vu),wh=e.e({deceleration:1e3,maxSpeed:360},vu),Ac=e.e({deceleration:1e3,maxSpeed:90},vu);class Qf{constructor(L){this._map=L,this.clear()}clear(){this._inertiaBuffer=[]}record(L){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:n.now(),settings:L})}_drainInertiaBuffer(){let L=this._inertiaBuffer,J=n.now();for(;L.length>0&&J-L[0].time>160;)L.shift()}_onMoveEnd(L){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let J={zoom:0,bearing:0,pitch:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:Te}of this._inertiaBuffer)J.zoom+=Te.zoomDelta||0,J.bearing+=Te.bearingDelta||0,J.pitch+=Te.pitchDelta||0,Te.panDelta&&J.pan._add(Te.panDelta),Te.around&&(J.around=Te.around),Te.pinchAround&&(J.pinchAround=Te.pinchAround);let de=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,pe={};if(J.pan.mag()){let Te=uc(J.pan.mag(),de,e.e({},Bu,L||{}));pe.offset=J.pan.mult(Te.amount/J.pan.mag()),pe.center=this._map.transform.center,Vl(pe,Te)}if(J.zoom){let Te=uc(J.zoom,de,Tu);pe.zoom=this._map.transform.zoom+Te.amount,Vl(pe,Te)}if(J.bearing){let Te=uc(J.bearing,de,wh);pe.bearing=this._map.transform.bearing+e.ac(Te.amount,-179,179),Vl(pe,Te)}if(J.pitch){let Te=uc(J.pitch,de,Ac);pe.pitch=this._map.transform.pitch+Te.amount,Vl(pe,Te)}if(pe.zoom||pe.bearing){let Te=J.pinchAround===void 0?J.around:J.pinchAround;pe.around=Te?this._map.unproject(Te):this._map.getCenter()}return this.clear(),e.e(pe,{noMoveStart:!0})}}function Vl(Me,L){(!Me.duration||Me.durationJ.unproject(vt)),rt=Te.reduce((vt,Mt,Gt,Ht)=>vt.add(Mt.div(Ht.length)),new e.P(0,0));super(L,{points:Te,point:rt,lngLats:Ze,lngLat:J.unproject(rt),originalEvent:de}),this._defaultPrevented=!1}}class vh extends e.k{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(L,J,de){super(L,{originalEvent:de}),this._defaultPrevented=!1}}class Kc{constructor(L,J){this._map=L,this._clickTolerance=J.clickTolerance}reset(){delete this._mousedownPos}wheel(L){return this._firePreventable(new vh(L.type,this._map,L))}mousedown(L,J){return this._mousedownPos=J,this._firePreventable(new $s(L.type,this._map,L))}mouseup(L){this._map.fire(new $s(L.type,this._map,L))}click(L,J){this._mousedownPos&&this._mousedownPos.dist(J)>=this._clickTolerance||this._map.fire(new $s(L.type,this._map,L))}dblclick(L){return this._firePreventable(new $s(L.type,this._map,L))}mouseover(L){this._map.fire(new $s(L.type,this._map,L))}mouseout(L){this._map.fire(new $s(L.type,this._map,L))}touchstart(L){return this._firePreventable(new Ju(L.type,this._map,L))}touchmove(L){this._map.fire(new Ju(L.type,this._map,L))}touchend(L){this._map.fire(new Ju(L.type,this._map,L))}touchcancel(L){this._map.fire(new Ju(L.type,this._map,L))}_firePreventable(L){if(this._map.fire(L),L.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class hs{constructor(L){this._map=L}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(L){this._map.fire(new $s(L.type,this._map,L))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new $s("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(L){this._delayContextMenu?this._contextMenuEvent=L:this._ignoreContextMenu||this._map.fire(new $s(L.type,this._map,L)),this._map.listens("contextmenu")&&L.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class kl{constructor(L){this._map=L}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(L){return this.transform.pointLocation(e.P.convert(L),this._map.terrain)}}class zl{constructor(L,J){this._map=L,this._tr=new kl(L),this._el=L.getCanvasContainer(),this._container=L.getContainer(),this._clickTolerance=J.clickTolerance||1}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(L,J){this.isEnabled()&&L.shiftKey&&L.button===0&&(i.disableDrag(),this._startPos=this._lastPos=J,this._active=!0)}mousemoveWindow(L,J){if(!this._active)return;let de=J;if(this._lastPos.equals(de)||!this._box&&de.dist(this._startPos)Te.fitScreenCoordinates(de,pe,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",L)}keydown(L){this._active&&L.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",L))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(i.remove(this._box),this._box=null),i.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(L,J){return this._map.fire(new e.k(L,{originalEvent:J}))}}function Jc(Me,L){if(Me.length!==L.length)throw new Error(`The number of touches and points are not equal - touches ${Me.length}, points ${L.length}`);let J={};for(let de=0;dethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=L.timeStamp),de.length===this.numTouches&&(this.centroid=function(pe){let Te=new e.P(0,0);for(let Ze of pe)Te._add(Ze);return Te.div(pe.length)}(J),this.touches=Jc(de,J)))}touchmove(L,J,de){if(this.aborted||!this.centroid)return;let pe=Jc(de,J);for(let Te in this.touches){let Ze=pe[Te];(!Ze||Ze.dist(this.touches[Te])>30)&&(this.aborted=!0)}}touchend(L,J,de){if((!this.centroid||L.timeStamp-this.startTime>500)&&(this.aborted=!0),de.length===0){let pe=!this.aborted&&this.centroid;if(this.reset(),pe)return pe}}}class cc{constructor(L){this.singleTap=new Qc(L),this.numTaps=L.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(L,J,de){this.singleTap.touchstart(L,J,de)}touchmove(L,J,de){this.singleTap.touchmove(L,J,de)}touchend(L,J,de){let pe=this.singleTap.touchend(L,J,de);if(pe){let Te=L.timeStamp-this.lastTime<500,Ze=!this.lastTap||this.lastTap.dist(pe)<30;if(Te&&Ze||this.reset(),this.count++,this.lastTime=L.timeStamp,this.lastTap=pe,this.count===this.numTaps)return this.reset(),pe}}}class fc{constructor(L){this._tr=new kl(L),this._zoomIn=new cc({numTouches:1,numTaps:2}),this._zoomOut=new cc({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(L,J,de){this._zoomIn.touchstart(L,J,de),this._zoomOut.touchstart(L,J,de)}touchmove(L,J,de){this._zoomIn.touchmove(L,J,de),this._zoomOut.touchmove(L,J,de)}touchend(L,J,de){let pe=this._zoomIn.touchend(L,J,de),Te=this._zoomOut.touchend(L,J,de),Ze=this._tr;return pe?(this._active=!0,L.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:rt=>rt.easeTo({duration:300,zoom:Ze.zoom+1,around:Ze.unproject(pe)},{originalEvent:L})}):Te?(this._active=!0,L.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:rt=>rt.easeTo({duration:300,zoom:Ze.zoom-1,around:Ze.unproject(Te)},{originalEvent:L})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class ru{constructor(L){this._enabled=!!L.enable,this._moveStateManager=L.moveStateManager,this._clickTolerance=L.clickTolerance||1,this._moveFunction=L.move,this._activateOnStart=!!L.activateOnStart,L.assignEvents(this),this.reset()}reset(L){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(L)}_move(...L){let J=this._moveFunction(...L);if(J.bearingDelta||J.pitchDelta||J.around||J.panDelta)return this._active=!0,J}dragStart(L,J){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(L)&&(this._moveStateManager.startMove(L),this._lastPoint=J.length?J[0]:J,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(L,J){if(!this.isEnabled())return;let de=this._lastPoint;if(!de)return;if(L.preventDefault(),!this._moveStateManager.isValidMoveEvent(L))return void this.reset(L);let pe=J.length?J[0]:J;return!this._moved&&pe.dist(de){Me.mousedown=Me.dragStart,Me.mousemoveWindow=Me.dragMove,Me.mouseup=Me.dragEnd,Me.contextmenu=L=>{L.preventDefault()}},wf=({enable:Me,clickTolerance:L,bearingDegreesPerPixelMoved:J=.8})=>{let de=new Qu({checkCorrectEvent:pe=>i.mouseButton(pe)===0&&pe.ctrlKey||i.mouseButton(pe)===2});return new ru({clickTolerance:L,move:(pe,Te)=>({bearingDelta:(Te.x-pe.x)*J}),moveStateManager:de,enable:Me,assignEvents:tf})},eh=({enable:Me,clickTolerance:L,pitchDegreesPerPixelMoved:J=-.5})=>{let de=new Qu({checkCorrectEvent:pe=>i.mouseButton(pe)===0&&pe.ctrlKey||i.mouseButton(pe)===2});return new ru({clickTolerance:L,move:(pe,Te)=>({pitchDelta:(Te.y-pe.y)*J}),moveStateManager:de,enable:Me,assignEvents:tf})};class Ic{constructor(L,J){this._clickTolerance=L.clickTolerance||1,this._map=J,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(L){return L<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(L,J,de){return this._calculateTransform(L,J,de)}touchmove(L,J,de){if(this._active){if(!this._shouldBePrevented(de.length))return L.preventDefault(),this._calculateTransform(L,J,de);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",L)}}touchend(L,J,de){this._calculateTransform(L,J,de),this._active&&this._shouldBePrevented(de.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(L,J,de){de.length>0&&(this._active=!0);let pe=Jc(de,J),Te=new e.P(0,0),Ze=new e.P(0,0),rt=0;for(let Mt in pe){let Gt=pe[Mt],Ht=this._touches[Mt];Ht&&(Te._add(Gt),Ze._add(Gt.sub(Ht)),rt++,pe[Mt]=Gt)}if(this._touches=pe,this._shouldBePrevented(rt)||!Ze.mag())return;let vt=Ze.div(rt);return this._sum._add(vt),this._sum.mag()Math.abs(Me.x)}class Ou extends Af{constructor(L){super(),this._currentTouchCount=0,this._map=L}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(L,J,de){super.touchstart(L,J,de),this._currentTouchCount=de.length}_start(L){this._lastPoints=L,Fc(L[0].sub(L[1]))&&(this._valid=!1)}_move(L,J,de){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let pe=L[0].sub(this._lastPoints[0]),Te=L[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(pe,Te,de.timeStamp),this._valid?(this._lastPoints=L,this._active=!0,{pitchDelta:(pe.y+Te.y)/2*-.5}):void 0}gestureBeginsVertically(L,J,de){if(this._valid!==void 0)return this._valid;let pe=L.mag()>=2,Te=J.mag()>=2;if(!pe&&!Te)return;if(!pe||!Te)return this._firstMove===void 0&&(this._firstMove=de),de-this._firstMove<100&&void 0;let Ze=L.y>0==J.y>0;return Fc(L)&&Fc(J)&&Ze}}let Tt={panStep:100,bearingStep:15,pitchStep:10};class jt{constructor(L){this._tr=new kl(L);let J=Tt;this._panStep=J.panStep,this._bearingStep=J.bearingStep,this._pitchStep=J.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(L){if(L.altKey||L.ctrlKey||L.metaKey)return;let J=0,de=0,pe=0,Te=0,Ze=0;switch(L.keyCode){case 61:case 107:case 171:case 187:J=1;break;case 189:case 109:case 173:J=-1;break;case 37:L.shiftKey?de=-1:(L.preventDefault(),Te=-1);break;case 39:L.shiftKey?de=1:(L.preventDefault(),Te=1);break;case 38:L.shiftKey?pe=1:(L.preventDefault(),Ze=-1);break;case 40:L.shiftKey?pe=-1:(L.preventDefault(),Ze=1);break;default:return}return this._rotationDisabled&&(de=0,pe=0),{cameraAnimation:rt=>{let vt=this._tr;rt.easeTo({duration:300,easeId:"keyboardHandler",easing:yr,zoom:J?Math.round(vt.zoom)+J*(L.shiftKey?2:1):vt.zoom,bearing:vt.bearing+de*this._bearingStep,pitch:vt.pitch+pe*this._pitchStep,offset:[-Te*this._panStep,-Ze*this._panStep],center:vt.center},{originalEvent:L})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function yr(Me){return Me*(2-Me)}let dr=4.000244140625;class Wr{constructor(L,J){this._onTimeout=de=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(de)},this._map=L,this._tr=new kl(L),this._triggerRenderFrame=J,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222}setZoomRate(L){this._defaultZoomRate=L}setWheelZoomRate(L){this._wheelZoomRate=L}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(L){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!L&&L.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(L){return!!this._map.cooperativeGestures.isEnabled()&&!(L.ctrlKey||this._map.cooperativeGestures.isBypassed(L))}wheel(L){if(!this.isEnabled())return;if(this._shouldBePrevented(L))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",L);let J=L.deltaMode===WheelEvent.DOM_DELTA_LINE?40*L.deltaY:L.deltaY,de=n.now(),pe=de-(this._lastWheelEventTime||0);this._lastWheelEventTime=de,J!==0&&J%dr==0?this._type="wheel":J!==0&&Math.abs(J)<4?this._type="trackpad":pe>400?(this._type=null,this._lastValue=J,this._timeout=setTimeout(this._onTimeout,40,L)):this._type||(this._type=Math.abs(pe*J)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,J+=this._lastValue)),L.shiftKey&&J&&(J/=4),this._type&&(this._lastWheelEvent=L,this._delta-=J,this._active||this._start(L)),L.preventDefault()}_start(L){if(!this._delta)return;this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let J=i.mousePos(this._map.getCanvas(),L),de=this._tr;this._around=J.y>de.transform.height/2-de.transform.getHorizon()?e.N.convert(this._aroundCenter?de.center:de.unproject(J)):e.N.convert(de.center),this._aroundPoint=de.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._triggerRenderFrame())}renderFrame(){if(!this._frameId||(this._frameId=null,!this.isActive()))return;let L=this._tr.transform;if(this._delta!==0){let vt=this._type==="wheel"&&Math.abs(this._delta)>dr?this._wheelZoomRate:this._defaultZoomRate,Mt=2/(1+Math.exp(-Math.abs(this._delta*vt)));this._delta<0&&Mt!==0&&(Mt=1/Mt);let Gt=typeof this._targetZoom=="number"?L.zoomScale(this._targetZoom):L.scale;this._targetZoom=Math.min(L.maxZoom,Math.max(L.minZoom,L.scaleZoom(Gt*Mt))),this._type==="wheel"&&(this._startZoom=L.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let J=typeof this._targetZoom=="number"?this._targetZoom:L.zoom,de=this._startZoom,pe=this._easing,Te,Ze=!1,rt=n.now()-this._lastWheelEventTime;if(this._type==="wheel"&&de&&pe&&rt){let vt=Math.min(rt/200,1),Mt=pe(vt);Te=e.y.number(de,J,Mt),vt<1?this._frameId||(this._frameId=!0):Ze=!0}else Te=J,Ze=!0;return this._active=!0,Ze&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!Ze,zoomDelta:Te-L.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(L){let J=e.b9;if(this._prevEase){let de=this._prevEase,pe=(n.now()-de.start)/de.duration,Te=de.easing(pe+.01)-de.easing(pe),Ze=.27/Math.sqrt(Te*Te+1e-4)*.01,rt=Math.sqrt(.0729-Ze*Ze);J=e.b8(Ze,rt,.25,1)}return this._prevEase={start:n.now(),duration:L,easing:J},J}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ma{constructor(L,J){this._clickZoom=L,this._tapZoom=J}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class za{constructor(L){this._tr=new kl(L),this.reset()}reset(){this._active=!1}dblclick(L,J){return L.preventDefault(),{cameraAnimation:de=>{de.easeTo({duration:300,zoom:this._tr.zoom+(L.shiftKey?-1:1),around:this._tr.unproject(J)},{originalEvent:L})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Ja{constructor(){this._tap=new cc({numTouches:1,numTaps:1}),this.reset()}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(L,J,de){if(!this._swipePoint)if(this._tapTime){let pe=J[0],Te=L.timeStamp-this._tapTime<500,Ze=this._tapPoint.dist(pe)<30;Te&&Ze?de.length>0&&(this._swipePoint=pe,this._swipeTouch=de[0].identifier):this.reset()}else this._tap.touchstart(L,J,de)}touchmove(L,J,de){if(this._tapTime){if(this._swipePoint){if(de[0].identifier!==this._swipeTouch)return;let pe=J[0],Te=pe.y-this._swipePoint.y;return this._swipePoint=pe,L.preventDefault(),this._active=!0,{zoomDelta:Te/128}}}else this._tap.touchmove(L,J,de)}touchend(L,J,de){if(this._tapTime)this._swipePoint&&de.length===0&&this.reset();else{let pe=this._tap.touchend(L,J,de);pe&&(this._tapTime=L.timeStamp,this._tapPoint=pe)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class nn{constructor(L,J,de){this._el=L,this._mousePan=J,this._touchPan=de}enable(L){this._inertiaOptions=L||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Tn{constructor(L,J,de){this._pitchWithRotate=L.pitchWithRotate,this._mouseRotate=J,this._mousePitch=de}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()}}class Ba{constructor(L,J,de,pe){this._el=L,this._touchZoom=J,this._touchRotate=de,this._tapDragZoom=pe,this._rotationDisabled=!1,this._enabled=!0}enable(L){this._touchZoom.enable(L),this._rotationDisabled||this._touchRotate.enable(L),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Na{constructor(L,J){this._bypassKey=navigator.userAgent.indexOf("Mac")!==-1?"metaKey":"ctrlKey",this._map=L,this._options=J,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let L=this._map.getCanvasContainer();L.classList.add("maplibregl-cooperative-gestures"),this._container=i.create("div","maplibregl-cooperative-gesture-screen",L);let J=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(J=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let de=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),pe=document.createElement("div");pe.className="maplibregl-desktop-message",pe.textContent=J,this._container.appendChild(pe);let Te=document.createElement("div");Te.className="maplibregl-mobile-message",Te.textContent=de,this._container.appendChild(Te),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(i.remove(this._container),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(L){return L[this._bypassKey]}notifyGestureBlocked(L,J){this._enabled&&(this._map.fire(new e.k("cooperativegestureprevented",{gestureType:L,originalEvent:J})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let Xa=Me=>Me.zoom||Me.drag||Me.pitch||Me.rotate;class Aa extends e.k{}function Fn(Me){return Me.panDelta&&Me.panDelta.mag()||Me.zoomDelta||Me.bearingDelta||Me.pitchDelta}class ci{constructor(L,J){this.handleWindowEvent=pe=>{this.handleEvent(pe,`${pe.type}Window`)},this.handleEvent=(pe,Te)=>{if(pe.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Ze=pe.type==="renderFrame"?void 0:pe,rt={needsRenderFrame:!1},vt={},Mt={},Gt=pe.touches,Ht=Gt?this._getMapTouches(Gt):void 0,fr=Ht?i.touchPos(this._map.getCanvas(),Ht):i.mousePos(this._map.getCanvas(),pe);for(let{handlerName:Oe,handler:Ge,allowed:$e}of this._handlers){if(!Ge.isEnabled())continue;let lt;this._blockedByActive(Mt,$e,Oe)?Ge.reset():Ge[Te||pe.type]&&(lt=Ge[Te||pe.type](pe,fr,Ht),this.mergeHandlerResult(rt,vt,lt,Oe,Ze),lt&<.needsRenderFrame&&this._triggerRenderFrame()),(lt||Ge.isActive())&&(Mt[Oe]=Ge)}let wr={};for(let Oe in this._previousActiveHandlers)Mt[Oe]||(wr[Oe]=Ze);this._previousActiveHandlers=Mt,(Object.keys(wr).length||Fn(rt))&&(this._changes.push([rt,vt,wr]),this._triggerRenderFrame()),(Object.keys(Mt).length||Fn(rt))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Le}=rt;Le&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Le(this._map))},this._map=L,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Qf(L),this._bearingSnap=J.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(J);let de=this._el;this._listeners=[[de,"touchstart",{passive:!0}],[de,"touchmove",{passive:!1}],[de,"touchend",void 0],[de,"touchcancel",void 0],[de,"mousedown",void 0],[de,"mousemove",void 0],[de,"mouseup",void 0],[document,"mousemove",{capture:!0}],[document,"mouseup",void 0],[de,"mouseover",void 0],[de,"mouseout",void 0],[de,"dblclick",void 0],[de,"click",void 0],[de,"keydown",{capture:!1}],[de,"keyup",void 0],[de,"wheel",{passive:!1}],[de,"contextmenu",void 0],[window,"blur",void 0]];for(let[pe,Te,Ze]of this._listeners)i.addEventListener(pe,Te,pe===document?this.handleWindowEvent:this.handleEvent,Ze)}destroy(){for(let[L,J,de]of this._listeners)i.removeEventListener(L,J,L===document?this.handleWindowEvent:this.handleEvent,de)}_addDefaultHandlers(L){let J=this._map,de=J.getCanvasContainer();this._add("mapEvent",new Kc(J,L));let pe=J.boxZoom=new zl(J,L);this._add("boxZoom",pe),L.interactive&&L.boxZoom&&pe.enable();let Te=J.cooperativeGestures=new Na(J,L.cooperativeGestures);this._add("cooperativeGestures",Te),L.cooperativeGestures&&Te.enable();let Ze=new fc(J),rt=new za(J);J.doubleClickZoom=new ma(rt,Ze),this._add("tapZoom",Ze),this._add("clickZoom",rt),L.interactive&&L.doubleClickZoom&&J.doubleClickZoom.enable();let vt=new Ja;this._add("tapDragZoom",vt);let Mt=J.touchPitch=new Ou(J);this._add("touchPitch",Mt),L.interactive&&L.touchPitch&&J.touchPitch.enable(L.touchPitch);let Gt=wf(L),Ht=eh(L);J.dragRotate=new Tn(L,Gt,Ht),this._add("mouseRotate",Gt,["mousePitch"]),this._add("mousePitch",Ht,["mouseRotate"]),L.interactive&&L.dragRotate&&J.dragRotate.enable();let fr=(({enable:lt,clickTolerance:tt})=>{let dt=new Qu({checkCorrectEvent:Rt=>i.mouseButton(Rt)===0&&!Rt.ctrlKey});return new ru({clickTolerance:tt,move:(Rt,Ot)=>({around:Ot,panDelta:Ot.sub(Rt)}),activateOnStart:!0,moveStateManager:dt,enable:lt,assignEvents:tf})})(L),wr=new Ic(L,J);J.dragPan=new nn(de,fr,wr),this._add("mousePan",fr),this._add("touchPan",wr,["touchZoom","touchRotate"]),L.interactive&&L.dragPan&&J.dragPan.enable(L.dragPan);let Le=new th,Oe=new Mu;J.touchZoomRotate=new Ba(de,Oe,Le,vt),this._add("touchRotate",Le,["touchPan","touchZoom"]),this._add("touchZoom",Oe,["touchPan","touchRotate"]),L.interactive&&L.touchZoomRotate&&J.touchZoomRotate.enable(L.touchZoomRotate);let Ge=J.scrollZoom=new Wr(J,()=>this._triggerRenderFrame());this._add("scrollZoom",Ge,["mousePan"]),L.interactive&&L.scrollZoom&&J.scrollZoom.enable(L.scrollZoom);let $e=J.keyboard=new jt(J);this._add("keyboard",$e),L.interactive&&L.keyboard&&J.keyboard.enable(),this._add("blockableMapEvent",new hs(J))}_add(L,J,de){this._handlers.push({handlerName:L,handler:J,allowed:de}),this._handlersById[L]=J}stop(L){if(!this._updatingCamera){for(let{handler:J}of this._handlers)J.reset();this._inertia.clear(),this._fireEvents({},{},L),this._changes=[]}}isActive(){for(let{handler:L}of this._handlers)if(L.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!Xa(this._eventsInProgress)||this.isZooming()}_blockedByActive(L,J,de){for(let pe in L)if(pe!==de&&(!J||J.indexOf(pe)<0))return!0;return!1}_getMapTouches(L){let J=[];for(let de of L)this._el.contains(de.target)&&J.push(de);return J}mergeHandlerResult(L,J,de,pe,Te){if(!de)return;e.e(L,de);let Ze={handlerName:pe,originalEvent:de.originalEvent||Te};de.zoomDelta!==void 0&&(J.zoom=Ze),de.panDelta!==void 0&&(J.drag=Ze),de.pitchDelta!==void 0&&(J.pitch=Ze),de.bearingDelta!==void 0&&(J.rotate=Ze)}_applyChanges(){let L={},J={},de={};for(let[pe,Te,Ze]of this._changes)pe.panDelta&&(L.panDelta=(L.panDelta||new e.P(0,0))._add(pe.panDelta)),pe.zoomDelta&&(L.zoomDelta=(L.zoomDelta||0)+pe.zoomDelta),pe.bearingDelta&&(L.bearingDelta=(L.bearingDelta||0)+pe.bearingDelta),pe.pitchDelta&&(L.pitchDelta=(L.pitchDelta||0)+pe.pitchDelta),pe.around!==void 0&&(L.around=pe.around),pe.pinchAround!==void 0&&(L.pinchAround=pe.pinchAround),pe.noInertia&&(L.noInertia=pe.noInertia),e.e(J,Te),e.e(de,Ze);this._updateMapTransform(L,J,de),this._changes=[]}_updateMapTransform(L,J,de){let pe=this._map,Te=pe._getTransformForUpdate(),Ze=pe.terrain;if(!(Fn(L)||Ze&&this._terrainMovement))return this._fireEvents(J,de,!0);let{panDelta:rt,zoomDelta:vt,bearingDelta:Mt,pitchDelta:Gt,around:Ht,pinchAround:fr}=L;fr!==void 0&&(Ht=fr),pe._stop(!0),Ht=Ht||pe.transform.centerPoint;let wr=Te.pointLocation(rt?Ht.sub(rt):Ht);Mt&&(Te.bearing+=Mt),Gt&&(Te.pitch+=Gt),vt&&(Te.zoom+=vt),Ze?this._terrainMovement||!J.drag&&!J.zoom?J.drag&&this._terrainMovement?Te.center=Te.pointLocation(Te.centerPoint.sub(rt)):Te.setLocationAtPoint(wr,Ht):(this._terrainMovement=!0,this._map._elevationFreeze=!0,Te.setLocationAtPoint(wr,Ht)):Te.setLocationAtPoint(wr,Ht),pe._applyUpdatedTransform(Te),this._map._update(),L.noInertia||this._inertia.record(L),this._fireEvents(J,de,!0)}_fireEvents(L,J,de){let pe=Xa(this._eventsInProgress),Te=Xa(L),Ze={};for(let Ht in L){let{originalEvent:fr}=L[Ht];this._eventsInProgress[Ht]||(Ze[`${Ht}start`]=fr),this._eventsInProgress[Ht]=L[Ht]}!pe&&Te&&this._fireEvent("movestart",Te.originalEvent);for(let Ht in Ze)this._fireEvent(Ht,Ze[Ht]);Te&&this._fireEvent("move",Te.originalEvent);for(let Ht in L){let{originalEvent:fr}=L[Ht];this._fireEvent(Ht,fr)}let rt={},vt;for(let Ht in this._eventsInProgress){let{handlerName:fr,originalEvent:wr}=this._eventsInProgress[Ht];this._handlersById[fr].isActive()||(delete this._eventsInProgress[Ht],vt=J[fr]||wr,rt[`${Ht}end`]=vt)}for(let Ht in rt)this._fireEvent(Ht,rt[Ht]);let Mt=Xa(this._eventsInProgress),Gt=(pe||Te)&&!Mt;if(Gt&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ht=this._map._getTransformForUpdate();Ht.recalculateZoom(this._map.terrain),this._map._applyUpdatedTransform(Ht)}if(de&&Gt){this._updatingCamera=!0;let Ht=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),fr=wr=>wr!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Aa("renderFrame",{timeStamp:L})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class pi extends e.E{constructor(L,J){super(),this._renderFrameCallback=()=>{let de=Math.min((n.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(de)),de<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=L,this._bearingSnap=J.bearingSnap,this.on("moveend",()=>{delete this._requestedCameraState})}getCenter(){return new e.N(this.transform.center.lng,this.transform.center.lat)}setCenter(L,J){return this.jumpTo({center:L},J)}panBy(L,J,de){return L=e.P.convert(L).mult(-1),this.panTo(this.transform.center,e.e({offset:L},J),de)}panTo(L,J,de){return this.easeTo(e.e({center:L},J),de)}getZoom(){return this.transform.zoom}setZoom(L,J){return this.jumpTo({zoom:L},J),this}zoomTo(L,J,de){return this.easeTo(e.e({zoom:L},J),de)}zoomIn(L,J){return this.zoomTo(this.getZoom()+1,L,J),this}zoomOut(L,J){return this.zoomTo(this.getZoom()-1,L,J),this}getBearing(){return this.transform.bearing}setBearing(L,J){return this.jumpTo({bearing:L},J),this}getPadding(){return this.transform.padding}setPadding(L,J){return this.jumpTo({padding:L},J),this}rotateTo(L,J,de){return this.easeTo(e.e({bearing:L},J),de)}resetNorth(L,J){return this.rotateTo(0,e.e({duration:1e3},L),J),this}resetNorthPitch(L,J){return this.easeTo(e.e({bearing:0,pitch:0,duration:1e3},L),J),this}snapToNorth(L,J){return Math.abs(this.getBearing()){if(this._zooming&&(pe.zoom=e.y.number(Te,Ge,Xt)),this._rotating&&(pe.bearing=e.y.number(Ze,Mt,Xt)),this._pitching&&(pe.pitch=e.y.number(rt,Gt,Xt)),this._padding&&(pe.interpolatePadding(vt,Ht,Xt),wr=pe.centerPoint.add(fr)),this.terrain&&!L.freezeElevation&&this._updateElevation(Xt),dt)pe.setLocationAtPoint(dt,Rt);else{let nr=pe.zoomScale(pe.zoom-Te),pr=Ge>Te?Math.min(2,tt):Math.max(.5,tt),Lr=Math.pow(pr,1-Xt),Br=pe.unproject($e.add(lt.mult(Xt*Lr)).mult(nr));pe.setLocationAtPoint(pe.renderWorldCopies?Br.wrap():Br,wr)}this._applyUpdatedTransform(pe),this._fireMoveEvents(J)},Xt=>{this.terrain&&L.freezeElevation&&this._finalizeElevation(),this._afterEase(J,Xt)},L),this}_prepareEase(L,J,de={}){this._moving=!0,J||de.moving||this.fire(new e.k("movestart",L)),this._zooming&&!de.zooming&&this.fire(new e.k("zoomstart",L)),this._rotating&&!de.rotating&&this.fire(new e.k("rotatestart",L)),this._pitching&&!de.pitching&&this.fire(new e.k("pitchstart",L))}_prepareElevation(L){this._elevationCenter=L,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(L,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(L){this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);let J=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(L<1&&J!==this._elevationTarget){let de=this._elevationTarget-this._elevationStart;this._elevationStart+=L*(de-(J-(de*L+this._elevationStart))/(1-L)),this._elevationTarget=J}this.transform.elevation=e.y.number(this._elevationStart,this._elevationTarget,L)}_finalizeElevation(){this._elevationFreeze=!1,this.transform.recalculateZoom(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(L){let J=L.getCameraPosition(),de=this.terrain.getElevationForLngLatZoom(J.lngLat,L.zoom);if(J.altitudethis._elevateCameraIfInsideTerrain(pe)),this.transformCameraUpdate&&J.push(pe=>this.transformCameraUpdate(pe)),!J.length)return;let de=L.clone();for(let pe of J){let Te=de.clone(),{center:Ze,zoom:rt,pitch:vt,bearing:Mt,elevation:Gt}=pe(Te);Ze&&(Te.center=Ze),rt!==void 0&&(Te.zoom=rt),vt!==void 0&&(Te.pitch=vt),Mt!==void 0&&(Te.bearing=Mt),Gt!==void 0&&(Te.elevation=Gt),de.apply(Te)}this.transform.apply(de)}_fireMoveEvents(L){this.fire(new e.k("move",L)),this._zooming&&this.fire(new e.k("zoom",L)),this._rotating&&this.fire(new e.k("rotate",L)),this._pitching&&this.fire(new e.k("pitch",L))}_afterEase(L,J){if(this._easeId&&J&&this._easeId===J)return;delete this._easeId;let de=this._zooming,pe=this._rotating,Te=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,de&&this.fire(new e.k("zoomend",L)),pe&&this.fire(new e.k("rotateend",L)),Te&&this.fire(new e.k("pitchend",L)),this.fire(new e.k("moveend",L))}flyTo(L,J){var de;if(!L.essential&&n.prefersReducedMotion){let un=e.M(L,["center","zoom","bearing","pitch","around"]);return this.jumpTo(un,J)}this.stop(),L=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.b9},L);let pe=this._getTransformForUpdate(),Te=pe.zoom,Ze=pe.bearing,rt=pe.pitch,vt=pe.padding,Mt="bearing"in L?this._normalizeBearing(L.bearing,Ze):Ze,Gt="pitch"in L?+L.pitch:rt,Ht="padding"in L?L.padding:pe.padding,fr=e.P.convert(L.offset),wr=pe.centerPoint.add(fr),Le=pe.pointLocation(wr),{center:Oe,zoom:Ge}=pe.getConstrained(e.N.convert(L.center||Le),(de=L.zoom)!==null&&de!==void 0?de:Te);this._normalizeCenter(Oe,pe);let $e=pe.zoomScale(Ge-Te),lt=pe.project(Le),tt=pe.project(Oe).sub(lt),dt=L.curve,Rt=Math.max(pe.width,pe.height),Ot=Rt/$e,Xt=tt.mag();if("minZoom"in L){let un=e.ac(Math.min(L.minZoom,Te,Ge),pe.minZoom,pe.maxZoom),Bn=Rt/pe.zoomScale(un-Te);dt=Math.sqrt(Bn/Xt*2)}let nr=dt*dt;function pr(un){let Bn=(Ot*Ot-Rt*Rt+(un?-1:1)*nr*nr*Xt*Xt)/(2*(un?Ot:Rt)*nr*Xt);return Math.log(Math.sqrt(Bn*Bn+1)-Bn)}function Lr(un){return(Math.exp(un)-Math.exp(-un))/2}function Br(un){return(Math.exp(un)+Math.exp(-un))/2}let Kr=pr(!1),ya=function(un){return Br(Kr)/Br(Kr+dt*un)},Za=function(un){return Rt*((Br(Kr)*(Lr(Bn=Kr+dt*un)/Br(Bn))-Lr(Kr))/nr)/Xt;var Bn},Ha=(pr(!0)-Kr)/dt;if(Math.abs(Xt)<1e-6||!isFinite(Ha)){if(Math.abs(Rt-Ot)<1e-6)return this.easeTo(L,J);let un=Ot0,ya=Bn=>Math.exp(un*dt*Bn)}return L.duration="duration"in L?+L.duration:1e3*Ha/("screenSpeed"in L?+L.screenSpeed/dt:+L.speed),L.maxDuration&&L.duration>L.maxDuration&&(L.duration=0),this._zooming=!0,this._rotating=Ze!==Mt,this._pitching=Gt!==rt,this._padding=!pe.isPaddingEqual(Ht),this._prepareEase(J,!1),this.terrain&&this._prepareElevation(Oe),this._ease(un=>{let Bn=un*Ha,li=1/ya(Bn);pe.zoom=un===1?Ge:Te+pe.scaleZoom(li),this._rotating&&(pe.bearing=e.y.number(Ze,Mt,un)),this._pitching&&(pe.pitch=e.y.number(rt,Gt,un)),this._padding&&(pe.interpolatePadding(vt,Ht,un),wr=pe.centerPoint.add(fr)),this.terrain&&!L.freezeElevation&&this._updateElevation(un);let Jn=un===1?Oe:pe.unproject(lt.add(tt.mult(Za(Bn))).mult(li));pe.setLocationAtPoint(pe.renderWorldCopies?Jn.wrap():Jn,wr),this._applyUpdatedTransform(pe),this._fireMoveEvents(J)},()=>{this.terrain&&L.freezeElevation&&this._finalizeElevation(),this._afterEase(J)},L),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(L,J){var de;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let pe=this._onEaseEnd;delete this._onEaseEnd,pe.call(this,J)}return L||(de=this.handlers)===null||de===void 0||de.stop(!1),this}_ease(L,J,de){de.animate===!1||de.duration===0?(L(1),J()):(this._easeStart=n.now(),this._easeOptions=de,this._onEaseFrame=L,this._onEaseEnd=J,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(L,J){L=e.b3(L,-180,180);let de=Math.abs(L-J);return Math.abs(L-360-J)180?-360:de<-180?360:0}queryTerrainElevation(L){return this.terrain?this.terrain.getElevationForLngLatZoom(e.N.convert(L),this.transform.tileZoom)-this.transform.elevation:null}}let fi={compact:!0,customAttribution:'MapLibre'};class Ti{constructor(L=fi){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=J=>{!J||J.sourceDataType!=="metadata"&&J.sourceDataType!=="visibility"&&J.dataType!=="style"&&J.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=L}getDefaultPosition(){return"bottom-right"}onAdd(L){return this._map=L,this._compact=this.options.compact,this._container=i.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=i.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=i.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){i.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(L,J){let de=this._map._getUIString(`AttributionControl.${J}`);L.title=de,L.setAttribute("aria-label",de)}_updateAttributions(){if(!this._map.style)return;let L=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?L=L.concat(this.options.customAttribution.map(pe=>typeof pe!="string"?"":pe)):typeof this.options.customAttribution=="string"&&L.push(this.options.customAttribution)),this._map.style.stylesheet){let pe=this._map.style.stylesheet;this.styleOwner=pe.owner,this.styleId=pe.id}let J=this._map.style.sourceCaches;for(let pe in J){let Te=J[pe];if(Te.used||Te.usedForTerrain){let Ze=Te.getSource();Ze.attribution&&L.indexOf(Ze.attribution)<0&&L.push(Ze.attribution)}}L=L.filter(pe=>String(pe).trim()),L.sort((pe,Te)=>pe.length-Te.length),L=L.filter((pe,Te)=>{for(let Ze=Te+1;Ze=0)return!1;return!0});let de=L.join(" | ");de!==this._attribHTML&&(this._attribHTML=de,L.length?(this._innerContainer.innerHTML=de,this._container.classList.remove("maplibregl-attrib-empty")):this._container.classList.add("maplibregl-attrib-empty"),this._updateCompact(),this._editLink=null)}}class Un{constructor(L={}){this._updateCompact=()=>{let J=this._container.children;if(J.length){let de=J[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&de.classList.add("maplibregl-compact"):de.classList.remove("maplibregl-compact")}},this.options=L}getDefaultPosition(){return"bottom-left"}onAdd(L){this._map=L,this._compact=this.options&&this.options.compact,this._container=i.create("div","maplibregl-ctrl");let J=i.create("a","maplibregl-ctrl-logo");return J.target="_blank",J.rel="noopener nofollow",J.href="https://maplibre.org/",J.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),J.setAttribute("rel","noopener nofollow"),this._container.appendChild(J),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){i.remove(this._container),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class _n{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(L){let J=++this._id;return this._queue.push({callback:L,id:J,cancelled:!1}),J}remove(L){let J=this._currentlyRunning,de=J?this._queue.concat(J):this._queue;for(let pe of de)if(pe.id===L)return void(pe.cancelled=!0)}run(L=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let J=this._currentlyRunning=this._queue;this._queue=[];for(let de of J)if(!de.cancelled&&(de.callback(L),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Oi=e.Y([{name:"a_pos3d",type:"Int16",components:3}]);class ao extends e.E{constructor(L){super(),this.sourceCache=L,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.deltaZoom=1,L.usedForTerrain=!0,L.tileSize=this.tileSize*2**this.deltaZoom}destruct(){this.sourceCache.usedForTerrain=!1,this.sourceCache.tileSize=null}update(L,J){this.sourceCache.update(L,J),this._renderableTilesKeys=[];let de={};for(let pe of L.coveringTiles({tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:J}))de[pe.key]=!0,this._renderableTilesKeys.push(pe.key),this._tiles[pe.key]||(pe.posMatrix=new Float64Array(16),e.aP(pe.posMatrix,0,e.X,0,e.X,0,1),this._tiles[pe.key]=new Ve(pe,this.tileSize));for(let pe in this._tiles)de[pe]||delete this._tiles[pe]}freeRtt(L){for(let J in this._tiles){let de=this._tiles[J];(!L||de.tileID.equals(L)||de.tileID.isChildOf(L)||L.isChildOf(de.tileID))&&(de.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(L=>this.getTileByID(L))}getTileByID(L){return this._tiles[L]}getTerrainCoords(L){let J={};for(let de of this._renderableTilesKeys){let pe=this._tiles[de].tileID;if(pe.canonical.equals(L.canonical)){let Te=L.clone();Te.posMatrix=new Float64Array(16),e.aP(Te.posMatrix,0,e.X,0,e.X,0,1),J[de]=Te}else if(pe.canonical.isChildOf(L.canonical)){let Te=L.clone();Te.posMatrix=new Float64Array(16);let Ze=pe.canonical.z-L.canonical.z,rt=pe.canonical.x-(pe.canonical.x>>Ze<>Ze<>Ze;e.aP(Te.posMatrix,0,Mt,0,Mt,0,1),e.J(Te.posMatrix,Te.posMatrix,[-rt*Mt,-vt*Mt,0]),J[de]=Te}else if(L.canonical.isChildOf(pe.canonical)){let Te=L.clone();Te.posMatrix=new Float64Array(16);let Ze=L.canonical.z-pe.canonical.z,rt=L.canonical.x-(L.canonical.x>>Ze<>Ze<>Ze;e.aP(Te.posMatrix,0,e.X,0,e.X,0,1),e.J(Te.posMatrix,Te.posMatrix,[rt*Mt,vt*Mt,0]),e.K(Te.posMatrix,Te.posMatrix,[1/2**Ze,1/2**Ze,0]),J[de]=Te}}return J}getSourceTile(L,J){let de=this.sourceCache._source,pe=L.overscaledZ-this.deltaZoom;if(pe>de.maxzoom&&(pe=de.maxzoom),pe=de.minzoom&&(!Te||!Te.dem);)Te=this.sourceCache.getTileByID(L.scaledTo(pe--).key);return Te}tilesAfterTime(L=Date.now()){return Object.values(this._tiles).filter(J=>J.timeAdded>=L)}}class Lo{constructor(L,J,de){this.painter=L,this.sourceCache=new ao(J),this.options=de,this.exaggeration=typeof de.exaggeration=="number"?de.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}getDEMElevation(L,J,de,pe=e.X){var Te;if(!(J>=0&&J=0&&deL.canonical.z&&(L.canonical.z>=pe?Te=L.canonical.z-pe:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ze=L.canonical.x-(L.canonical.x>>Te<>Te<>8<<4|Te>>8,J[Ze+3]=0;let de=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(J.buffer)),pe=new h(L,de,L.gl.RGBA,{premultiply:!1});return pe.bind(L.gl.NEAREST,L.gl.CLAMP_TO_EDGE),this._coordsTexture=pe,pe}pointCoordinate(L){this.painter.maybeDrawDepthAndCoords(!0);let J=new Uint8Array(4),de=this.painter.context,pe=de.gl,Te=Math.round(L.x*this.painter.pixelRatio/devicePixelRatio),Ze=Math.round(L.y*this.painter.pixelRatio/devicePixelRatio),rt=Math.round(this.painter.height/devicePixelRatio);de.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),pe.readPixels(Te,rt-Ze-1,1,1,pe.RGBA,pe.UNSIGNED_BYTE,J),de.bindFramebuffer.set(null);let vt=J[0]+(J[2]>>4<<8),Mt=J[1]+((15&J[2])<<8),Gt=this.coordsIndex[255-J[3]],Ht=Gt&&this.sourceCache.getTileByID(Gt);if(!Ht)return null;let fr=this._coordsTextureSize,wr=(1<L.id!==J),this._recentlyUsed.push(L.id)}stampObject(L){L.stamp=++this._stamp}getOrCreateFreeObject(){for(let J of this._recentlyUsed)if(!this._objects[J].inUse)return this._objects[J];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let L=this._createObject(this._objects.length);return this._objects.push(L),L}freeObject(L){L.inUse=!1}freeAllObjects(){for(let L of this._objects)this.freeObject(L)}isFull(){return!(this._objects.length!L.inUse)===!1}}let Oo={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0};class _s{constructor(L,J){this.painter=L,this.terrain=J,this.pool=new us(L.context,30,J.sourceCache.tileSize*J.qualityFactor)}destruct(){this.pool.destruct()}getTexture(L){return this.pool.getObjectForId(L.rtt[this._stacks.length-1].id).texture}prepareForRender(L,J){this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.sourceCache.getRenderableTiles(),this._renderableLayerIds=L._order.filter(de=>!L._layers[de].isHidden(J)),this._coordsDescendingInv={};for(let de in L.sourceCaches){this._coordsDescendingInv[de]={};let pe=L.sourceCaches[de].getVisibleCoordinates();for(let Te of pe){let Ze=this.terrain.sourceCache.getTerrainCoords(Te);for(let rt in Ze)this._coordsDescendingInv[de][rt]||(this._coordsDescendingInv[de][rt]=[]),this._coordsDescendingInv[de][rt].push(Ze[rt])}}this._coordsDescendingInvStr={};for(let de of L._order){let pe=L._layers[de],Te=pe.source;if(Oo[pe.type]&&!this._coordsDescendingInvStr[Te]){this._coordsDescendingInvStr[Te]={};for(let Ze in this._coordsDescendingInv[Te])this._coordsDescendingInvStr[Te][Ze]=this._coordsDescendingInv[Te][Ze].map(rt=>rt.key).sort().join()}}for(let de of this._renderableTiles)for(let pe in this._coordsDescendingInvStr){let Te=this._coordsDescendingInvStr[pe][de.tileID.key];Te&&Te!==de.rttCoords[pe]&&(de.rtt=[])}}renderLayer(L){if(L.isHidden(this.painter.transform.zoom))return!1;let J=L.type,de=this.painter,pe=this._renderableLayerIds[this._renderableLayerIds.length-1]===L.id;if(Oo[J]&&(this._prevType&&Oo[this._prevType]||this._stacks.push([]),this._prevType=J,this._stacks[this._stacks.length-1].push(L.id),!pe))return!0;if(Oo[this._prevType]||Oo[J]&&pe){this._prevType=J;let Te=this._stacks.length-1,Ze=this._stacks[Te]||[];for(let rt of this._renderableTiles){if(this.pool.isFull()&&(Gs(this.painter,this.terrain,this._rttTiles),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(rt),rt.rtt[Te]){let Mt=this.pool.getObjectForId(rt.rtt[Te].id);if(Mt.stamp===rt.rtt[Te].stamp){this.pool.useObject(Mt);continue}}let vt=this.pool.getOrCreateFreeObject();this.pool.useObject(vt),this.pool.stampObject(vt),rt.rtt[Te]={id:vt.id,stamp:vt.stamp},de.context.bindFramebuffer.set(vt.fbo.framebuffer),de.context.clear({color:e.aM.transparent,stencil:0}),de.currentStencilSource=void 0;for(let Mt=0;Mt{Me.touchstart=Me.dragStart,Me.touchmoveWindow=Me.dragMove,Me.touchend=Me.dragEnd},ai={showCompass:!0,showZoom:!0,visualizePitch:!1};class Xo{constructor(L,J,de=!1){this.mousedown=Ze=>{this.startMouse(e.e({},Ze,{ctrlKey:!0,preventDefault:()=>Ze.preventDefault()}),i.mousePos(this.element,Ze)),i.addEventListener(window,"mousemove",this.mousemove),i.addEventListener(window,"mouseup",this.mouseup)},this.mousemove=Ze=>{this.moveMouse(Ze,i.mousePos(this.element,Ze))},this.mouseup=Ze=>{this.mouseRotate.dragEnd(Ze),this.mousePitch&&this.mousePitch.dragEnd(Ze),this.offTemp()},this.touchstart=Ze=>{Ze.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=i.touchPos(this.element,Ze.targetTouches)[0],this.startTouch(Ze,this._startPos),i.addEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.addEventListener(window,"touchend",this.touchend))},this.touchmove=Ze=>{Ze.targetTouches.length!==1?this.reset():(this._lastPos=i.touchPos(this.element,Ze.targetTouches)[0],this.moveTouch(Ze,this._lastPos))},this.touchend=Ze=>{Ze.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),this.touchRotate.reset(),this.touchPitch&&this.touchPitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10;let pe=L.dragRotate._mouseRotate.getClickTolerance(),Te=L.dragRotate._mousePitch.getClickTolerance();this.element=J,this.mouseRotate=wf({clickTolerance:pe,enable:!0}),this.touchRotate=(({enable:Ze,clickTolerance:rt,bearingDegreesPerPixelMoved:vt=.8})=>{let Mt=new ef;return new ru({clickTolerance:rt,move:(Gt,Ht)=>({bearingDelta:(Ht.x-Gt.x)*vt}),moveStateManager:Mt,enable:Ze,assignEvents:cs})})({clickTolerance:pe,enable:!0}),this.map=L,de&&(this.mousePitch=eh({clickTolerance:Te,enable:!0}),this.touchPitch=(({enable:Ze,clickTolerance:rt,pitchDegreesPerPixelMoved:vt=-.5})=>{let Mt=new ef;return new ru({clickTolerance:rt,move:(Gt,Ht)=>({pitchDelta:(Ht.y-Gt.y)*vt}),moveStateManager:Mt,enable:Ze,assignEvents:cs})})({clickTolerance:Te,enable:!0})),i.addEventListener(J,"mousedown",this.mousedown),i.addEventListener(J,"touchstart",this.touchstart,{passive:!1}),i.addEventListener(J,"touchcancel",this.reset)}startMouse(L,J){this.mouseRotate.dragStart(L,J),this.mousePitch&&this.mousePitch.dragStart(L,J),i.disableDrag()}startTouch(L,J){this.touchRotate.dragStart(L,J),this.touchPitch&&this.touchPitch.dragStart(L,J),i.disableDrag()}moveMouse(L,J){let de=this.map,{bearingDelta:pe}=this.mouseRotate.dragMove(L,J)||{};if(pe&&de.setBearing(de.getBearing()+pe),this.mousePitch){let{pitchDelta:Te}=this.mousePitch.dragMove(L,J)||{};Te&&de.setPitch(de.getPitch()+Te)}}moveTouch(L,J){let de=this.map,{bearingDelta:pe}=this.touchRotate.dragMove(L,J)||{};if(pe&&de.setBearing(de.getBearing()+pe),this.touchPitch){let{pitchDelta:Te}=this.touchPitch.dragMove(L,J)||{};Te&&de.setPitch(de.getPitch()+Te)}}off(){let L=this.element;i.removeEventListener(L,"mousedown",this.mousedown),i.removeEventListener(L,"touchstart",this.touchstart,{passive:!1}),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend),i.removeEventListener(L,"touchcancel",this.reset),this.offTemp()}offTemp(){i.enableDrag(),i.removeEventListener(window,"mousemove",this.mousemove),i.removeEventListener(window,"mouseup",this.mouseup),i.removeEventListener(window,"touchmove",this.touchmove,{passive:!1}),i.removeEventListener(window,"touchend",this.touchend)}}let os;function Do(Me,L,J){let de=new e.N(Me.lng,Me.lat);if(Me=new e.N(Me.lng,Me.lat),L){let pe=new e.N(Me.lng-360,Me.lat),Te=new e.N(Me.lng+360,Me.lat),Ze=J.locationPoint(Me).distSqr(L);J.locationPoint(pe).distSqr(L)180;){let pe=J.locationPoint(Me);if(pe.x>=0&&pe.y>=0&&pe.x<=J.width&&pe.y<=J.height)break;Me.lng>J.center.lng?Me.lng-=360:Me.lng+=360}return Me.lng!==de.lng&&J.locationPoint(Me).y>J.height/2-J.getHorizon()?Me:de}let al={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 pu(Me,L,J){let de=Me.classList;for(let pe in al)de.remove(`maplibregl-${J}-anchor-${pe}`);de.add(`maplibregl-${J}-anchor-${L}`)}class au extends e.E{constructor(L){if(super(),this._onKeyPress=J=>{let de=J.code,pe=J.charCode||J.keyCode;de!=="Space"&&de!=="Enter"&&pe!==32&&pe!==13||this.togglePopup()},this._onMapClick=J=>{let de=J.originalEvent.target,pe=this._element;this._popup&&(de===pe||pe.contains(de))&&this.togglePopup()},this._update=J=>{var de;if(!this._map)return;let pe=this._map.loaded()&&!this._map.isMoving();(J?.type==="terrain"||J?.type==="render"&&!pe)&&this._map.once("render",this._update),this._lngLat=this._map.transform.renderWorldCopies?Do(this._lngLat,this._flatPos,this._map.transform):(de=this._lngLat)===null||de===void 0?void 0:de.wrap(),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationPoint(this._lngLat)._add(this._offset));let Te="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?Te=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(Te=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let Ze="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?Ze="rotateX(0deg)":this._pitchAlignment==="map"&&(Ze=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||J&&J.type!=="moveend"||(this._pos=this._pos.round()),i.setTransform(this._element,`${al[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${Ze} ${Te}`),n.frameAsync(new AbortController).then(()=>{this._updateOpacity(J&&J.type==="moveend")}).catch(()=>{})},this._onMove=J=>{if(!this._isDragging){let de=this._clickTolerance||this._map._clickTolerance;this._isDragging=J.point.dist(this._pointerdownPos)>=de}this._isDragging&&(this._pos=J.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.k("dragstart"))),this.fire(new e.k("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.k("dragend")),this._state="inactive"},this._addDragHandler=J=>{this._element.contains(J.originalEvent.target)&&(J.preventDefault(),this._positionDelta=J.point.sub(this._pos).add(this._offset),this._pointerdownPos=J.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=L&&L.anchor||"center",this._color=L&&L.color||"#3FB1CE",this._scale=L&&L.scale||1,this._draggable=L&&L.draggable||!1,this._clickTolerance=L&&L.clickTolerance||0,this._subpixelPositioning=L&&L.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=L&&L.rotation||0,this._rotationAlignment=L&&L.rotationAlignment||"auto",this._pitchAlignment=L&&L.pitchAlignment&&L.pitchAlignment!=="auto"?L.pitchAlignment:this._rotationAlignment,this.setOpacity(),this.setOpacity(L?.opacity,L?.opacityWhenCovered),L&&L.element)this._element=L.element,this._offset=e.P.convert(L&&L.offset||[0,0]);else{this._defaultMarker=!0,this._element=i.create("div");let J=i.createNS("http://www.w3.org/2000/svg","svg"),de=41,pe=27;J.setAttributeNS(null,"display","block"),J.setAttributeNS(null,"height",`${de}px`),J.setAttributeNS(null,"width",`${pe}px`),J.setAttributeNS(null,"viewBox",`0 0 ${pe} ${de}`);let Te=i.createNS("http://www.w3.org/2000/svg","g");Te.setAttributeNS(null,"stroke","none"),Te.setAttributeNS(null,"stroke-width","1"),Te.setAttributeNS(null,"fill","none"),Te.setAttributeNS(null,"fill-rule","evenodd");let Ze=i.createNS("http://www.w3.org/2000/svg","g");Ze.setAttributeNS(null,"fill-rule","nonzero");let rt=i.createNS("http://www.w3.org/2000/svg","g");rt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),rt.setAttributeNS(null,"fill","#000000");let vt=[{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"}];for(let $e of vt){let lt=i.createNS("http://www.w3.org/2000/svg","ellipse");lt.setAttributeNS(null,"opacity","0.04"),lt.setAttributeNS(null,"cx","10.5"),lt.setAttributeNS(null,"cy","5.80029008"),lt.setAttributeNS(null,"rx",$e.rx),lt.setAttributeNS(null,"ry",$e.ry),rt.appendChild(lt)}let Mt=i.createNS("http://www.w3.org/2000/svg","g");Mt.setAttributeNS(null,"fill",this._color);let Gt=i.createNS("http://www.w3.org/2000/svg","path");Gt.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Mt.appendChild(Gt);let Ht=i.createNS("http://www.w3.org/2000/svg","g");Ht.setAttributeNS(null,"opacity","0.25"),Ht.setAttributeNS(null,"fill","#000000");let fr=i.createNS("http://www.w3.org/2000/svg","path");fr.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ht.appendChild(fr);let wr=i.createNS("http://www.w3.org/2000/svg","g");wr.setAttributeNS(null,"transform","translate(6.0, 7.0)"),wr.setAttributeNS(null,"fill","#FFFFFF");let Le=i.createNS("http://www.w3.org/2000/svg","g");Le.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Oe=i.createNS("http://www.w3.org/2000/svg","circle");Oe.setAttributeNS(null,"fill","#000000"),Oe.setAttributeNS(null,"opacity","0.25"),Oe.setAttributeNS(null,"cx","5.5"),Oe.setAttributeNS(null,"cy","5.5"),Oe.setAttributeNS(null,"r","5.4999962");let Ge=i.createNS("http://www.w3.org/2000/svg","circle");Ge.setAttributeNS(null,"fill","#FFFFFF"),Ge.setAttributeNS(null,"cx","5.5"),Ge.setAttributeNS(null,"cy","5.5"),Ge.setAttributeNS(null,"r","5.4999962"),Le.appendChild(Oe),Le.appendChild(Ge),Ze.appendChild(rt),Ze.appendChild(Mt),Ze.appendChild(Ht),Ze.appendChild(wr),Ze.appendChild(Le),J.appendChild(Ze),J.setAttributeNS(null,"height",de*this._scale+"px"),J.setAttributeNS(null,"width",pe*this._scale+"px"),this._element.appendChild(J),this._offset=e.P.convert(L&&L.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",J=>{J.preventDefault()}),this._element.addEventListener("mousedown",J=>{J.preventDefault()}),pu(this._element,this._anchor,"marker"),L&&L.className)for(let J of L.className.split(" "))this._element.classList.add(J);this._popup=null}addTo(L){return this.remove(),this._map=L,this._element.setAttribute("aria-label",L._getUIString("Marker.Title")),L.getCanvasContainer().appendChild(this._element),L.on("move",this._update),L.on("moveend",this._update),L.on("terrain",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),i.remove(this._element),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(L){return this._lngLat=e.N.convert(L),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(L){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),L){if(!("offset"in L.options)){let pe=Math.abs(13.5)/Math.SQRT2;L.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[pe,-1*(38.1-13.5+pe)],"bottom-right":[-pe,-1*(38.1-13.5+pe)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=L,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(L){return this._subpixelPositioning=L,this}getPopup(){return this._popup}togglePopup(){let L=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:L?(L.isOpen()?L.remove():(L.setLngLat(this._lngLat),L.addTo(this._map)),this):this}_updateOpacity(L=!1){var J,de;if(!(!((J=this._map)===null||J===void 0)&&J.terrain))return void(this._element.style.opacity!==this._opacity&&(this._element.style.opacity=this._opacity));if(L)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let pe=this._map,Te=pe.terrain.depthAtPoint(this._pos),Ze=pe.terrain.getElevationForLngLatZoom(this._lngLat,pe.transform.tileZoom);if(pe.transform.lngLatToCameraDepth(this._lngLat,Ze)-Te<.006)return void(this._element.style.opacity=this._opacity);let rt=-this._offset.y/pe.transform._pixelPerMeter,vt=Math.sin(pe.getPitch()*Math.PI/180)*rt,Mt=pe.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=pe.transform.lngLatToCameraDepth(this._lngLat,Ze+vt)-Mt>.006;!((de=this._popup)===null||de===void 0)&&de.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity}getOffset(){return this._offset}setOffset(L){return this._offset=e.P.convert(L),this._update(),this}addClassName(L){this._element.classList.add(L)}removeClassName(L){this._element.classList.remove(L)}toggleClassName(L){return this._element.classList.toggle(L)}setDraggable(L){return this._draggable=!!L,this._map&&(L?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(L){return this._rotation=L||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(L){return this._rotationAlignment=L||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(L){return this._pitchAlignment=L&&L!=="auto"?L:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(L,J){return L===void 0&&J===void 0&&(this._opacity="1",this._opacityWhenCovered="0.2"),L!==void 0&&(this._opacity=L),J!==void 0&&(this._opacityWhenCovered=J),this._map&&this._updateOpacity(!0),this}}let Nu={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},_l=0,Su=!1,xl={maxWidth:100,unit:"metric"};function hc(Me,L,J){let de=J&&J.maxWidth||100,pe=Me._container.clientHeight/2,Te=Me.unproject([0,pe]),Ze=Me.unproject([de,pe]),rt=Te.distanceTo(Ze);if(J&&J.unit==="imperial"){let vt=3.2808*rt;vt>5280?ki(L,de,vt/5280,Me._getUIString("ScaleControl.Miles")):ki(L,de,vt,Me._getUIString("ScaleControl.Feet"))}else J&&J.unit==="nautical"?ki(L,de,rt/1852,Me._getUIString("ScaleControl.NauticalMiles")):rt>=1e3?ki(L,de,rt/1e3,Me._getUIString("ScaleControl.Kilometers")):ki(L,de,rt,Me._getUIString("ScaleControl.Meters"))}function ki(Me,L,J,de){let pe=function(Te){let Ze=Math.pow(10,`${Math.floor(Te)}`.length-1),rt=Te/Ze;return rt=rt>=10?10:rt>=5?5:rt>=3?3:rt>=2?2:rt>=1?1:function(vt){let Mt=Math.pow(10,Math.ceil(-Math.log(vt)/Math.LN10));return Math.round(vt*Mt)/Mt}(rt),Ze*rt}(J);Me.style.width=L*(pe/J)+"px",Me.innerHTML=`${pe} ${de}`}let Xi={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1},jf=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function zc(Me){if(Me){if(typeof Me=="number"){let L=Math.round(Math.abs(Me)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,Me),"top-left":new e.P(L,L),"top-right":new e.P(-L,L),bottom:new e.P(0,-Me),"bottom-left":new e.P(L,-L),"bottom-right":new e.P(-L,-L),left:new e.P(Me,0),right:new e.P(-Me,0)}}if(Me instanceof e.P||Array.isArray(Me)){let L=e.P.convert(Me);return{center:L,top:L,"top-left":L,"top-right":L,bottom:L,"bottom-left":L,"bottom-right":L,left:L,right:L}}return{center:e.P.convert(Me.center||[0,0]),top:e.P.convert(Me.top||[0,0]),"top-left":e.P.convert(Me["top-left"]||[0,0]),"top-right":e.P.convert(Me["top-right"]||[0,0]),bottom:e.P.convert(Me.bottom||[0,0]),"bottom-left":e.P.convert(Me["bottom-left"]||[0,0]),"bottom-right":e.P.convert(Me["bottom-right"]||[0,0]),left:e.P.convert(Me.left||[0,0]),right:e.P.convert(Me.right||[0,0])}}return zc(new e.P(0,0))}let nu=t;l.AJAXError=e.bh,l.Evented=e.E,l.LngLat=e.N,l.MercatorCoordinate=e.Z,l.Point=e.P,l.addProtocol=e.bi,l.config=e.a,l.removeProtocol=e.bj,l.AttributionControl=Ti,l.BoxZoomHandler=zl,l.CanvasSource=xe,l.CooperativeGesturesHandler=Na,l.DoubleClickZoomHandler=ma,l.DragPanHandler=nn,l.DragRotateHandler=Tn,l.EdgeInsets=Fl,l.FullscreenControl=class extends e.E{constructor(Me={}){super(),this._onFullscreenChange=()=>{var L;let J=window.document.fullscreenElement||window.document.mozFullScreenElement||window.document.webkitFullscreenElement||window.document.msFullscreenElement;for(;!((L=J?.shadowRoot)===null||L===void 0)&&L.fullscreenElement;)J=J.shadowRoot.fullscreenElement;J===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,Me&&Me.container&&(Me.container instanceof HTMLElement?this._container=Me.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(Me){return this._map=Me,this._container||(this._container=this._map.getContainer()),this._controlContainer=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){i.remove(this._controlContainer),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Me=this._fullscreenButton=i.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);i.create("span","maplibregl-ctrl-icon",Me).setAttribute("aria-hidden","true"),Me.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Me=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Me),this._fullscreenButton.title=Me}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.k("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.k("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){window.document.exitFullscreen?window.document.exitFullscreen():window.document.mozCancelFullScreen?window.document.mozCancelFullScreen():window.document.msExitFullscreen?window.document.msExitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=Se,l.GeolocateControl=class extends e.E{constructor(Me){super(),this._onSuccess=L=>{if(this._map){if(this._isOutOfMapMaxBounds(L))return this._setErrorState(),this.fire(new e.k("outofmaxbounds",L)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=L,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(L),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(L),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.k("geolocate",L)),this._finish()}},this._updateCamera=L=>{let J=new e.N(L.coords.longitude,L.coords.latitude),de=L.coords.accuracy,pe=this._map.getBearing(),Te=e.e({bearing:pe},this.options.fitBoundsOptions),Ze=re.fromLngLat(J,de);this._map.fitBounds(Ze,Te,{geolocateSource:!0})},this._updateMarker=L=>{if(L){let J=new e.N(L.coords.longitude,L.coords.latitude);this._accuracyCircleMarker.setLngLat(J).addTo(this._map),this._userLocationDotMarker.setLngLat(J).addTo(this._map),this._accuracy=L.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onZoom=()=>{this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},this._onError=L=>{if(this._map){if(this.options.trackUserLocation)if(L.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let J=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=J,this._geolocateButton.setAttribute("aria-label",J),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(L.code===3&&Su)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.k("error",L)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",L=>L.preventDefault()),this._geolocateButton=i.create("button","maplibregl-ctrl-geolocate",this._container),i.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=L=>{if(this._map){if(L===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let J=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=J,this._geolocateButton.setAttribute("aria-label",J)}else{let J=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=J,this._geolocateButton.setAttribute("aria-label",J)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=i.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new au({element:this._dotElement}),this._circleElement=i.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new au({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",J=>{J.geolocateSource||this._watchState!=="ACTIVE_LOCK"||J.originalEvent&&J.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.k("trackuserlocationend")),this.fire(new e.k("userlocationlostfocus")))})}},this.options=e.e({},Nu,Me)}onAdd(Me){return this._map=Me,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(L=!1){if(os!==void 0&&!L)return os;if(window.navigator.permissions===void 0)return os=!!window.navigator.geolocation,os;try{os=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{os=!!window.navigator.geolocation}return os})}().then(L=>this._finishSetupUI(L)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),i.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,_l=0,Su=!1}_isOutOfMapMaxBounds(Me){let L=this._map.getMaxBounds(),J=Me.coords;return L&&(J.longitudeL.getEast()||J.latitudeL.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadius(){let Me=this._map.getBounds(),L=Me.getSouthEast(),J=Me.getNorthEast(),de=L.distanceTo(J),pe=Math.ceil(this._accuracy/(de/this._map._container.clientHeight)*2);this._circleElement.style.width=`${pe}px`,this._circleElement.style.height=`${pe}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.k("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":_l--,Su=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.k("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.k("trackuserlocationstart")),this.fire(new e.k("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let Me;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),_l++,_l>1?(Me={maximumAge:6e5,timeout:0},Su=!0):(Me=this.options.positionOptions,Su=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Me)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},l.Hash=bf,l.ImageSource=qe,l.KeyboardHandler=jt,l.LngLatBounds=re,l.LogoControl=Un,l.Map=class extends pi{constructor(Me){e.bf.mark(e.bg.create);let L=Object.assign(Object.assign({},Os),Me);if(L.minZoom!=null&&L.maxZoom!=null&&L.minZoom>L.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(L.minPitch!=null&&L.maxPitch!=null&&L.minPitch>L.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(L.minPitch!=null&&L.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(L.maxPitch!=null&&L.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(super(new wc(L.minZoom,L.maxZoom,L.minPitch,L.maxPitch,L.renderWorldCopies),{bearingSnap:L.bearingSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new _n,this._controls=[],this._mapId=e.a4(),this._contextLost=J=>{J.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.fire(new e.k("webglcontextlost",{originalEvent:J}))},this._contextRestored=J=>{this._setupPainter(),this.resize(),this._update(),this.fire(new e.k("webglcontextrestored",{originalEvent:J}))},this._onMapScroll=J=>{if(J.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=L.interactive,this._maxTileCacheSize=L.maxTileCacheSize,this._maxTileCacheZoomLevels=L.maxTileCacheZoomLevels,this._failIfMajorPerformanceCaveat=L.failIfMajorPerformanceCaveat===!0,this._preserveDrawingBuffer=L.preserveDrawingBuffer===!0,this._antialias=L.antialias===!0,this._trackResize=L.trackResize===!0,this._bearingSnap=L.bearingSnap,this._refreshExpiredTiles=L.refreshExpiredTiles===!0,this._fadeDuration=L.fadeDuration,this._crossSourceCollisions=L.crossSourceCollisions===!0,this._collectResourceTiming=L.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},ko),L.locale),this._clickTolerance=L.clickTolerance,this._overridePixelRatio=L.pixelRatio,this._maxCanvasSize=L.maxCanvasSize,this.transformCameraUpdate=L.transformCameraUpdate,this.cancelPendingTileRequestsWhileZooming=L.cancelPendingTileRequestsWhileZooming===!0,this._imageQueueHandle=o.addThrottleControl(()=>this.isMoving()),this._requestManager=new x(L.transformRequest),typeof L.container=="string"){if(this._container=document.getElementById(L.container),!this._container)throw new Error(`Container '${L.container}' not found.`)}else{if(!(L.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=L.container}if(L.maxBounds&&this.setMaxBounds(L.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)).on("moveend",()=>this._update(!1)).on("zoom",()=>this._update(!0)).on("terrain",()=>{this.painter.terrainFacilitator.dirty=!0,this._update(!0)}).once("idle",()=>{this._idleTriggered=!0}),typeof window<"u"){addEventListener("online",this._onWindowOnline,!1);let J=!1,de=$c(pe=>{this._trackResize&&!this._removed&&(this.resize(pe),this.redraw())},50);this._resizeObserver=new ResizeObserver(pe=>{J?de(pe):J=!0}),this._resizeObserver.observe(this._container)}this.handlers=new ci(this,L),this._hash=L.hash&&new bf(typeof L.hash=="string"&&L.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:L.center,zoom:L.zoom,bearing:L.bearing,pitch:L.pitch}),L.bounds&&(this.resize(),this.fitBounds(L.bounds,e.e({},L.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=L.localIdeographFontFamily,this._validateStyle=L.validateStyle,L.style&&this.setStyle(L.style,{localIdeographFontFamily:L.localIdeographFontFamily}),L.attributionControl&&this.addControl(new Ti(typeof L.attributionControl=="boolean"?void 0:L.attributionControl)),L.maplibreLogo&&this.addControl(new Un,L.logoPosition),this.on("style.load",()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet)}),this.on("data",J=>{this._update(J.dataType==="style"),this.fire(new e.k(`${J.dataType}data`,J))}),this.on("dataloading",J=>{this.fire(new e.k(`${J.dataType}dataloading`,J))}),this.on("dataabort",J=>{this.fire(new e.k("sourcedataabort",J))})}_getMapId(){return this._mapId}addControl(Me,L){if(L===void 0&&(L=Me.getDefaultPosition?Me.getDefaultPosition():"top-right"),!Me||!Me.onAdd)return this.fire(new e.j(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let J=Me.onAdd(this);this._controls.push(Me);let de=this._controlPositions[L];return L.indexOf("bottom")!==-1?de.insertBefore(J,de.firstChild):de.appendChild(J),this}removeControl(Me){if(!Me||!Me.onRemove)return this.fire(new e.j(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let L=this._controls.indexOf(Me);return L>-1&&this._controls.splice(L,1),Me.onRemove(this),this}hasControl(Me){return this._controls.indexOf(Me)>-1}calculateCameraOptionsFromTo(Me,L,J,de){return de==null&&this.terrain&&(de=this.terrain.getElevationForLngLatZoom(J,this.transform.tileZoom)),super.calculateCameraOptionsFromTo(Me,L,J,de)}resize(Me){var L;let J=this._containerDimensions(),de=J[0],pe=J[1],Te=this._getClampedPixelRatio(de,pe);if(this._resizeCanvas(de,pe,Te),this.painter.resize(de,pe,Te),this.painter.overLimit()){let rt=this.painter.context.gl;this._maxCanvasSize=[rt.drawingBufferWidth,rt.drawingBufferHeight];let vt=this._getClampedPixelRatio(de,pe);this._resizeCanvas(de,pe,vt),this.painter.resize(de,pe,vt)}this.transform.resize(de,pe),(L=this._requestedCameraState)===null||L===void 0||L.resize(de,pe);let Ze=!this._moving;return Ze&&(this.stop(),this.fire(new e.k("movestart",Me)).fire(new e.k("move",Me))),this.fire(new e.k("resize",Me)),Ze&&this.fire(new e.k("moveend",Me)),this}_getClampedPixelRatio(Me,L){let{0:J,1:de}=this._maxCanvasSize,pe=this.getPixelRatio(),Te=Me*pe,Ze=L*pe;return Math.min(Te>J?J/Te:1,Ze>de?de/Ze:1)*pe}getPixelRatio(){var Me;return(Me=this._overridePixelRatio)!==null&&Me!==void 0?Me:devicePixelRatio}setPixelRatio(Me){this._overridePixelRatio=Me,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Me){return this.transform.setMaxBounds(re.convert(Me)),this._update()}setMinZoom(Me){if((Me=Me??-2)>=-2&&Me<=this.transform.maxZoom)return this.transform.minZoom=Me,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=Me,this._update(),this.getZoom()>Me&&this.setZoom(Me),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Me){if((Me=Me??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(Me>=0&&Me<=this.transform.maxPitch)return this.transform.minPitch=Me,this._update(),this.getPitch()85)throw new Error("maxPitch must be less than or equal to 85");if(Me>=this.transform.minPitch)return this.transform.maxPitch=Me,this._update(),this.getPitch()>Me&&this.setPitch(Me),this;throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Me){return this.transform.renderWorldCopies=Me,this._update()}project(Me){return this.transform.locationPoint(e.N.convert(Me),this.style&&this.terrain)}unproject(Me){return this.transform.pointLocation(e.P.convert(Me),this.terrain)}isMoving(){var Me;return this._moving||((Me=this.handlers)===null||Me===void 0?void 0:Me.isMoving())}isZooming(){var Me;return this._zooming||((Me=this.handlers)===null||Me===void 0?void 0:Me.isZooming())}isRotating(){var Me;return this._rotating||((Me=this.handlers)===null||Me===void 0?void 0:Me.isRotating())}_createDelegatedListener(Me,L,J){if(Me==="mouseenter"||Me==="mouseover"){let de=!1;return{layers:L,listener:J,delegates:{mousemove:Te=>{let Ze=L.filter(vt=>this.getLayer(vt)),rt=Ze.length!==0?this.queryRenderedFeatures(Te.point,{layers:Ze}):[];rt.length?de||(de=!0,J.call(this,new $s(Me,this,Te.originalEvent,{features:rt}))):de=!1},mouseout:()=>{de=!1}}}}if(Me==="mouseleave"||Me==="mouseout"){let de=!1;return{layers:L,listener:J,delegates:{mousemove:Ze=>{let rt=L.filter(vt=>this.getLayer(vt));(rt.length!==0?this.queryRenderedFeatures(Ze.point,{layers:rt}):[]).length?de=!0:de&&(de=!1,J.call(this,new $s(Me,this,Ze.originalEvent)))},mouseout:Ze=>{de&&(de=!1,J.call(this,new $s(Me,this,Ze.originalEvent)))}}}}{let de=pe=>{let Te=L.filter(rt=>this.getLayer(rt)),Ze=Te.length!==0?this.queryRenderedFeatures(pe.point,{layers:Te}):[];Ze.length&&(pe.features=Ze,J.call(this,pe),delete pe.features)};return{layers:L,listener:J,delegates:{[Me]:de}}}}_saveDelegatedListener(Me,L){this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[Me]=this._delegatedListeners[Me]||[],this._delegatedListeners[Me].push(L)}_removeDelegatedListener(Me,L,J){if(!this._delegatedListeners||!this._delegatedListeners[Me])return;let de=this._delegatedListeners[Me];for(let pe=0;peL.includes(Ze))){for(let Ze in Te.delegates)this.off(Ze,Te.delegates[Ze]);return void de.splice(pe,1)}}}on(Me,L,J){if(J===void 0)return super.on(Me,L);let de=this._createDelegatedListener(Me,typeof L=="string"?[L]:L,J);this._saveDelegatedListener(Me,de);for(let pe in de.delegates)this.on(pe,de.delegates[pe]);return this}once(Me,L,J){if(J===void 0)return super.once(Me,L);let de=typeof L=="string"?[L]:L,pe=this._createDelegatedListener(Me,de,J);for(let Te in pe.delegates){let Ze=pe.delegates[Te];pe.delegates[Te]=(...rt)=>{this._removeDelegatedListener(Me,de,J),Ze(...rt)}}this._saveDelegatedListener(Me,pe);for(let Te in pe.delegates)this.once(Te,pe.delegates[Te]);return this}off(Me,L,J){return J===void 0?super.off(Me,L):(this._removeDelegatedListener(Me,typeof L=="string"?[L]:L,J),this)}queryRenderedFeatures(Me,L){if(!this.style)return[];let J,de=Me instanceof e.P||Array.isArray(Me),pe=de?Me:[[0,0],[this.transform.width,this.transform.height]];if(L=L||(de?{}:Me)||{},pe instanceof e.P||typeof pe[0]=="number")J=[e.P.convert(pe)];else{let Te=e.P.convert(pe[0]),Ze=e.P.convert(pe[1]);J=[Te,new e.P(Ze.x,Te.y),Ze,new e.P(Te.x,Ze.y),Te]}return this.style.queryRenderedFeatures(J,L,this.transform)}querySourceFeatures(Me,L){return this.style.querySourceFeatures(Me,L)}setStyle(Me,L){return(L=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},L)).diff!==!1&&L.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Me?(this._diffStyle(Me,L),this):(this._localIdeographFontFamily=L.localIdeographFontFamily,this._updateStyle(Me,L))}setTransformRequest(Me){return this._requestManager.setTransformRequest(Me),this}_getUIString(Me){let L=this._locale[Me];if(L==null)throw new Error(`Missing UI string '${Me}'`);return L}_updateStyle(Me,L){if(L.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(Me,L));let J=this.style&&L.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Me)),Me?(this.style=new ar(this,L||{}),this.style.setEventedParent(this,{style:this.style}),typeof Me=="string"?this.style.loadURL(Me,L,J):this.style.loadJSON(Me,L,J),this):(delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new ar(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Me,L){if(typeof Me=="string"){let J=this._requestManager.transformRequest(Me,"Style");e.h(J,new AbortController).then(de=>{this._updateDiff(de.data,L)}).catch(de=>{de&&this.fire(new e.j(de))})}else typeof Me=="object"&&this._updateDiff(Me,L)}_updateDiff(Me,L){try{this.style.setState(Me,L)&&this._update(!0)}catch(J){e.w(`Unable to perform style diff: ${J.message||J.error||J}. Rebuilding the style from scratch.`),this._updateStyle(Me,L)}}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():e.w("There is no style added to the map.")}addSource(Me,L){return this._lazyInitEmptyStyle(),this.style.addSource(Me,L),this._update(!0)}isSourceLoaded(Me){let L=this.style&&this.style.sourceCaches[Me];if(L!==void 0)return L.loaded();this.fire(new e.j(new Error(`There is no source with ID '${Me}'`)))}setTerrain(Me){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Me){let L=this.style.sourceCaches[Me.source];if(!L)throw new Error(`cannot load terrain, because there exists no source with ID: ${Me.source}`);this.terrain===null&&L.reload();for(let J in this.style._layers){let de=this.style._layers[J];de.type==="hillshade"&&de.source===Me.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Lo(this.painter,L,Me),this.painter.renderToTexture=new _s(this.painter,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._terrainDataCallback=J=>{J.dataType==="style"?this.terrain.sourceCache.freeRtt():J.dataType==="source"&&J.tile&&(J.sourceId!==Me.source||this._elevationFreeze||(this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.terrain.sourceCache.freeRtt(J.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.sourceCache.destruct(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.minElevationForCurrentTile=0,this.transform.elevation=0;return this.fire(new e.k("terrain",{terrain:Me})),this}getTerrain(){var Me,L;return(L=(Me=this.terrain)===null||Me===void 0?void 0:Me.options)!==null&&L!==void 0?L:null}areTilesLoaded(){let Me=this.style&&this.style.sourceCaches;for(let L in Me){let J=Me[L]._tiles;for(let de in J){let pe=J[de];if(pe.state!=="loaded"&&pe.state!=="errored")return!1}}return!0}removeSource(Me){return this.style.removeSource(Me),this._update(!0)}getSource(Me){return this.style.getSource(Me)}addImage(Me,L,J={}){let{pixelRatio:de=1,sdf:pe=!1,stretchX:Te,stretchY:Ze,content:rt,textFitWidth:vt,textFitHeight:Mt}=J;if(this._lazyInitEmptyStyle(),!(L instanceof HTMLImageElement||e.b(L))){if(L.width===void 0||L.height===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Gt,height:Ht,data:fr}=L,wr=L;return this.style.addImage(Me,{data:new e.R({width:Gt,height:Ht},new Uint8Array(fr)),pixelRatio:de,stretchX:Te,stretchY:Ze,content:rt,textFitWidth:vt,textFitHeight:Mt,sdf:pe,version:0,userImage:wr}),wr.onAdd&&wr.onAdd(this,Me),this}}{let{width:Gt,height:Ht,data:fr}=n.getImageData(L);this.style.addImage(Me,{data:new e.R({width:Gt,height:Ht},fr),pixelRatio:de,stretchX:Te,stretchY:Ze,content:rt,textFitWidth:vt,textFitHeight:Mt,sdf:pe,version:0})}}updateImage(Me,L){let J=this.style.getImage(Me);if(!J)return this.fire(new e.j(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let de=L instanceof HTMLImageElement||e.b(L)?n.getImageData(L):L,{width:pe,height:Te,data:Ze}=de;if(pe===void 0||Te===void 0)return this.fire(new e.j(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(pe!==J.data.width||Te!==J.data.height)return this.fire(new e.j(new Error("The width and height of the updated image must be that same as the previous version of the image")));let rt=!(L instanceof HTMLImageElement||e.b(L));return J.data.replace(Ze,rt),this.style.updateImage(Me,J),this}getImage(Me){return this.style.getImage(Me)}hasImage(Me){return Me?!!this.style.getImage(Me):(this.fire(new e.j(new Error("Missing required image id"))),!1)}removeImage(Me){this.style.removeImage(Me)}loadImage(Me){return o.getImage(this._requestManager.transformRequest(Me,"Image"),new AbortController)}listImages(){return this.style.listImages()}addLayer(Me,L){return this._lazyInitEmptyStyle(),this.style.addLayer(Me,L),this._update(!0)}moveLayer(Me,L){return this.style.moveLayer(Me,L),this._update(!0)}removeLayer(Me){return this.style.removeLayer(Me),this._update(!0)}getLayer(Me){return this.style.getLayer(Me)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Me,L,J){return this.style.setLayerZoomRange(Me,L,J),this._update(!0)}setFilter(Me,L,J={}){return this.style.setFilter(Me,L,J),this._update(!0)}getFilter(Me){return this.style.getFilter(Me)}setPaintProperty(Me,L,J,de={}){return this.style.setPaintProperty(Me,L,J,de),this._update(!0)}getPaintProperty(Me,L){return this.style.getPaintProperty(Me,L)}setLayoutProperty(Me,L,J,de={}){return this.style.setLayoutProperty(Me,L,J,de),this._update(!0)}getLayoutProperty(Me,L){return this.style.getLayoutProperty(Me,L)}setGlyphs(Me,L={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Me,L),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Me,L,J={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Me,L,J,de=>{de||this._update(!0)}),this}removeSprite(Me){return this._lazyInitEmptyStyle(),this.style.removeSprite(Me),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Me,L={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Me,L,J=>{J||this._update(!0)}),this}setLight(Me,L={}){return this._lazyInitEmptyStyle(),this.style.setLight(Me,L),this._update(!0)}getLight(){return this.style.getLight()}setSky(Me){return this._lazyInitEmptyStyle(),this.style.setSky(Me),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Me,L){return this.style.setFeatureState(Me,L),this._update()}removeFeatureState(Me,L){return this.style.removeFeatureState(Me,L),this._update()}getFeatureState(Me){return this.style.getFeatureState(Me)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Me=0,L=0;return this._container&&(Me=this._container.clientWidth||400,L=this._container.clientHeight||300),[Me,L]}_setupContainer(){let Me=this._container;Me.classList.add("maplibregl-map");let L=this._canvasContainer=i.create("div","maplibregl-canvas-container",Me);this._interactive&&L.classList.add("maplibregl-interactive"),this._canvas=i.create("canvas","maplibregl-canvas",L),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let J=this._containerDimensions(),de=this._getClampedPixelRatio(J[0],J[1]);this._resizeCanvas(J[0],J[1],de);let pe=this._controlContainer=i.create("div","maplibregl-control-container",Me),Te=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(Ze=>{Te[Ze]=i.create("div",`maplibregl-ctrl-${Ze} `,pe)}),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Me,L,J){this._canvas.width=Math.floor(J*Me),this._canvas.height=Math.floor(J*L),this._canvas.style.width=`${Me}px`,this._canvas.style.height=`${L}px`}_setupPainter(){let Me={alpha:!0,stencil:!0,depth:!0,failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1},L=null;this._canvas.addEventListener("webglcontextcreationerror",de=>{L={requestedAttributes:Me},de&&(L.statusMessage=de.statusMessage,L.type=de.type)},{once:!0});let J=this._canvas.getContext("webgl2",Me)||this._canvas.getContext("webgl",Me);if(!J){let de="Failed to initialize WebGL";throw L?(L.message=de,new Error(JSON.stringify(L))):new Error(de)}this.painter=new xf(J,this.transform),s.testSupport(J)}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Me){return this.style&&this.style._loaded?(this._styleDirty=this._styleDirty||Me,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Me){return this._update(),this._renderTaskQueue.add(Me)}_cancelRenderFrame(Me){this._renderTaskQueue.remove(Me)}_render(Me){let L=this._idleTriggered?this._fadeDuration:0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Me),this._removed)return;let J=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let pe=this.transform.zoom,Te=n.now();this.style.zoomHistory.update(pe,Te);let Ze=new e.z(pe,{now:Te,fadeDuration:L,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),rt=Ze.crossFadingFactor();rt===1&&rt===this._crossFadingFactor||(J=!0,this._crossFadingFactor=rt),this.style.update(Ze)}this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.sourceCache.update(this.transform,this.terrain),this.transform.minElevationForCurrentTile=this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom),this._elevationFreeze||(this.transform.elevation=this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.minElevationForCurrentTile=0,this.transform.elevation=0),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,L,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:L,showPadding:this.showPadding}),this.fire(new e.k("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,e.bf.mark(e.bg.load),this.fire(new e.k("load"))),this.style&&(this.style.hasTransitions()||J)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let de=this._sourcesDirty||this._styleDirty||this._placementDirty;return de||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.k("idle")),!this._loaded||this._fullyLoaded||de||(this._fullyLoaded=!0,e.bf.mark(e.bg.fullLoad)),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Me;this._hash&&this._hash.remove();for(let J of this._controls)J.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&removeEventListener("online",this._onWindowOnline,!1),o.removeThrottleControl(this._imageQueueHandle),(Me=this._resizeObserver)===null||Me===void 0||Me.disconnect();let L=this.painter.context.gl.getExtension("WEBGL_lose_context");L?.loseContext&&L.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),i.remove(this._canvasContainer),i.remove(this._controlContainer),this._container.classList.remove("maplibregl-map"),e.bf.clearMetrics(),this._removed=!0,this.fire(new e.k("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,n.frameAsync(this._frameRequest).then(Me=>{e.bf.frame(Me),this._frameRequest=null,this._render(Me)}).catch(()=>{}))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Me){this._showTileBoundaries!==Me&&(this._showTileBoundaries=Me,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Me){this._showPadding!==Me&&(this._showPadding=Me,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Me){this._showCollisionBoxes!==Me&&(this._showCollisionBoxes=Me,Me?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Me){this._showOverdrawInspector!==Me&&(this._showOverdrawInspector=Me,this._update())}get repaint(){return!!this._repaint}set repaint(Me){this._repaint!==Me&&(this._repaint=Me,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Me){this._vertices=Me,this._update()}get version(){return fl}getCameraTargetElevation(){return this.transform.elevation}},l.MapMouseEvent=$s,l.MapTouchEvent=Ju,l.MapWheelEvent=vh,l.Marker=au,l.NavigationControl=class{constructor(Me){this._updateZoomButtons=()=>{let L=this._map.getZoom(),J=L===this._map.getMaxZoom(),de=L===this._map.getMinZoom();this._zoomInButton.disabled=J,this._zoomOutButton.disabled=de,this._zoomInButton.setAttribute("aria-disabled",J.toString()),this._zoomOutButton.setAttribute("aria-disabled",de.toString())},this._rotateCompassArrow=()=>{let L=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._compassIcon.style.transform=L},this._setButtonTitle=(L,J)=>{let de=this._map._getUIString(`NavigationControl.${J}`);L.title=de,L.setAttribute("aria-label",de)},this.options=e.e({},ai,Me),this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",L=>L.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",L=>this._map.zoomIn({},{originalEvent:L})),i.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",L=>this._map.zoomOut({},{originalEvent:L})),i.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",L=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:L}):this._map.resetNorth({},{originalEvent:L})}),this._compassIcon=i.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Me){return this._map=Me,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Xo(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){i.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),this._handler.off(),delete this._handler),delete this._map}_createButton(Me,L){let J=i.create("button",Me,this._container);return J.type="button",J.addEventListener("click",L),J}},l.Popup=class extends e.E{constructor(Me){super(),this.remove=()=>(this._content&&i.remove(this._content),this._container&&(i.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.k("close"))),this),this._onMouseUp=L=>{this._update(L.point)},this._onMouseMove=L=>{this._update(L.point)},this._onDrag=L=>{this._update(L.point)},this._update=L=>{var J;if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=i.create("div","maplibregl-popup",this._map.getContainer()),this._tip=i.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let rt of this.options.className.split(" "))this._container.classList.add(rt);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=this._map.transform.renderWorldCopies&&!this._trackPointer?Do(this._lngLat,this._flatPos,this._map.transform):(J=this._lngLat)===null||J===void 0?void 0:J.wrap(),this._trackPointer&&!L)return;let de=this._flatPos=this._pos=this._trackPointer&&L?L:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&L?L:this._map.transform.locationPoint(this._lngLat));let pe=this.options.anchor,Te=zc(this.options.offset);if(!pe){let rt=this._container.offsetWidth,vt=this._container.offsetHeight,Mt;Mt=de.y+Te.bottom.ythis._map.transform.height-vt?["bottom"]:[],de.xthis._map.transform.width-rt/2&&Mt.push("right"),pe=Mt.length===0?"bottom":Mt.join("-")}let Ze=de.add(Te[pe]);this.options.subpixelPositioning||(Ze=Ze.round()),i.setTransform(this._container,`${al[pe]} translate(${Ze.x}px,${Ze.y}px)`),pu(this._container,pe,"popup")},this._onClose=()=>{this.remove()},this.options=e.e(Object.create(Xi),Me)}addTo(Me){return this._map&&this.remove(),this._map=Me,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.k("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Me){return this._lngLat=e.N.convert(Me),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Me){return this.setDOMContent(document.createTextNode(Me))}setHTML(Me){let L=document.createDocumentFragment(),J=document.createElement("body"),de;for(J.innerHTML=Me;de=J.firstChild,de;)L.appendChild(de);return this.setDOMContent(L)}getMaxWidth(){var Me;return(Me=this._container)===null||Me===void 0?void 0:Me.style.maxWidth}setMaxWidth(Me){return this.options.maxWidth=Me,this._update(),this}setDOMContent(Me){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=i.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Me),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Me){return this._container&&this._container.classList.add(Me),this}removeClassName(Me){return this._container&&this._container.classList.remove(Me),this}setOffset(Me){return this.options.offset=Me,this._update(),this}toggleClassName(Me){if(this._container)return this._container.classList.toggle(Me)}setSubpixelPositioning(Me){this.options.subpixelPositioning=Me}_createCloseButton(){this.options.closeButton&&(this._closeButton=i.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Me=this._container.querySelector(jf);Me&&Me.focus()}},l.RasterDEMTileSource=Ae,l.RasterTileSource=ye,l.ScaleControl=class{constructor(Me){this._onMove=()=>{hc(this._map,this._container,this.options)},this.setUnit=L=>{this.options.unit=L,hc(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},xl),Me)}getDefaultPosition(){return"bottom-left"}onAdd(Me){return this._map=Me,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Me.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){i.remove(this._container),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=Wr,l.Style=ar,l.TerrainControl=class{constructor(Me){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=Me}onAdd(Me){return this._map=Me,this._container=i.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=i.create("button","maplibregl-ctrl-terrain",this._container),i.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){i.remove(this._container),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Ou,l.TwoFingersTouchRotateHandler=th,l.TwoFingersTouchZoomHandler=Mu,l.TwoFingersTouchZoomRotateHandler=Ba,l.VectorTileSource=me,l.VideoSource=Ue,l.addSourceType=(Me,L)=>e._(void 0,void 0,void 0,function*(){if(oe(Me))throw new Error(`A source type called "${Me}" already exists.`);((J,de)=>{he[J]=de})(Me,L)}),l.clearPrewarmedResources=function(){let Me=ae;Me&&(Me.isPreloaded()&&Me.numActive()===1?(Me.release(Y),ae=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},l.getMaxParallelImageRequests=function(){return e.a.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Fe().getRTLTextPluginStatus()},l.getVersion=function(){return nu},l.getWorkerCount=function(){return ee.workerCount},l.getWorkerUrl=function(){return e.a.WORKER_URL},l.importScriptInWorkers=function(Me){return V().broadcast("IS",Me)},l.prewarm=function(){H().acquire(Y)},l.setMaxParallelImageRequests=function(Me){e.a.MAX_PARALLEL_IMAGE_REQUESTS=Me},l.setRTLTextPlugin=function(Me,L){return Fe().setRTLTextPlugin(Me,L)},l.setWorkerCount=function(Me){ee.workerCount=Me},l.setWorkerUrl=function(Me){e.a.WORKER_URL=Me}});var S=u;return S})}}),nU=De({"src/plots/map/layers.js"(j,N){"use strict";var u=Ar(),v=Xs().sanitizeHTML,w=h6(),S=lp();function l(n,i){this.subplot=n,this.uid=n.uid+"-"+i,this.index=i,this.idSource="source-"+this.uid,this.idLayer=S.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(i){this.visible?this.needsNewImage(i)?this.updateImage(i):this.needsNewSource(i)?(this.removeLayer(),this.updateSource(i),this.updateLayer(i)):this.needsNewLayer(i)?this.updateLayer(i):this.updateStyle(i):(this.updateSource(i),this.updateLayer(i)),this.visible=t(i)},e.needsNewImage=function(n){var i=this.subplot.map;return i.getSource(this.idSource)&&this.sourceType==="image"&&n.sourcetype==="image"&&(this.source!==n.source||JSON.stringify(this.coordinates)!==JSON.stringify(n.coordinates))},e.needsNewSource=function(n){return this.sourceType!==n.sourcetype||JSON.stringify(this.source)!==JSON.stringify(n.source)||this.layerType!==n.type},e.needsNewLayer=function(n){return this.layerType!==n.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(n){var i=this.subplot.map;i.getSource(this.idSource).updateImage({url:n.source,coordinates:n.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(n){var i=this.subplot.map;if(i.getSource(this.idSource)&&i.removeSource(this.idSource),this.sourceType=n.sourcetype,this.source=n.source,!!t(n)){var s=r(n);i.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(n){if(n==="traces")for(var i=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function a(n){var i={},s={};switch(n.type){case"circle":u.extendFlat(s,{"circle-radius":n.circle.radius,"circle-color":n.color,"circle-opacity":n.opacity});break;case"line":u.extendFlat(s,{"line-width":n.line.width,"line-color":n.color,"line-opacity":n.opacity,"line-dasharray":n.line.dash});break;case"fill":u.extendFlat(s,{"fill-color":n.color,"fill-outline-color":n.fill.outlinecolor,"fill-opacity":n.opacity});break;case"symbol":var c=n.symbol,p=w(c.textposition,c.iconsize);u.extendFlat(i,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":p.anchor,"text-offset":p.offset,"symbol-placement":c.placement}),u.extendFlat(s,{"icon-color":n.color,"text-color":c.textfont.color,"text-opacity":n.opacity});break;case"raster":u.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":n.opacity});break}return{layout:i,paint:s}}function r(n){var i=n.sourcetype,s=n.source,c={type:i},p;return i==="geojson"?p="data":i==="vector"?p=typeof s=="string"?"url":"tiles":i==="raster"?(p="tiles",c.tileSize=256):i==="image"&&(p="url",c.coordinates=n.coordinates),c[p]=s,n.sourceattribution&&(c.attribution=v(n.sourceattribution)),c}N.exports=function(i,s,c){var p=new l(i,s);return p.update(c),p}}}),iU=De({"src/plots/map/map.js"(j,N){"use strict";var u=aU(),v=Ar(),w=av(),S=hi(),l=Vi(),e=dh(),t=uu(),a=Ed(),r=a.drawMode,n=a.selectMode,i=Sc().prepSelect,s=Sc().clearOutline,c=Sc().clearSelectionsCache,p=Sc().selectOnClick,f=lp(),d=nU();function y(A,m){this.id=m,this.gd=A;var h=A._fullLayout,b=A._context;this.container=h._glcontainer.node(),this.isStatic=b.staticPlot,this.uid=h._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(h),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var o=y.prototype;o.plot=function(A,m,h){var b=this,_;b.map?_=new Promise(function(I,C){b.updateMap(A,m,I,C)}):_=new Promise(function(I,C){b.createMap(A,m,I,C)}),h.push(_)},o.createMap=function(A,m,h,b){var _=this,I=m[_.id],C=_.styleObj=E(I.style),F=I.bounds,R=F?[[F.west,F.south],[F.east,F.north]]:null;let z={container:_.div,style:C.style,center:g(I.center),zoom:I.zoom,bearing:I.bearing,pitch:I.pitch,maxBounds:R,interactive:!_.isStatic,preserveDrawingBuffer:_.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},D=I._fitBounds;D&&(z.bounds=[[D.west,D.south],[D.east,D.north]],z.fitBoundsOptions={padding:f.fitBoundsPadding});let k=_.map=new u.Map(z).addControl(new u.AttributionControl({compact:!0}));var B={};k.on("styleimagemissing",function(q){var Y=q.id;if(!B[Y]&&/^[a-zA-Z0-9-]+$/.test(Y)){B[Y]=!0;var ee=new Image(15,15);ee.onload=function(){k.addImage(Y,ee,{sdf:!0})},ee.crossOrigin="Anonymous",ee.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Y+".svg"}}),k.setTransformRequest(function(q){return q=q.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),q=q.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),q=q.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:q}}),k._canvas.style.left="0px",k._canvas.style.top="0px",_.rejectOnError(b),_.isStatic||_.initFx(A,m);var O=[];O.push(new Promise(function(q){k.once("load",q)})),O=O.concat(w.fetchTraceGeoData(A)),Promise.all(O).then(function(){D&&x(_,I),M(_,I),_.fillBelowLookup(A,m),_.updateData(A),_.updateLayout(m),_.resolveOnRender(h)}).catch(b)},o.updateMap=function(A,m,h,b){var _=this,I=_.map,C=m[this.id];_.rejectOnError(b);var F=[],R=E(C.style);JSON.stringify(_.styleObj)!==JSON.stringify(R)&&(_.styleObj=R,I.setStyle(R.style),_.traceHash={},F.push(new Promise(function(z){I.once("styledata",z)}))),F=F.concat(w.fetchTraceGeoData(A)),Promise.all(F).then(function(){_.fillBelowLookup(A,m),_.updateData(A);let z=C._fitBounds;z&&(I.fitBounds([[z.west,z.south],[z.east,z.north]],{padding:f.fitBoundsPadding,animate:!1}),x(_,C),M(_,C)),_.updateLayout(m),_.resolveOnRender(h)}).catch(b)};function x(A,m){let{center:h,zoom:b}=A.getView();m._input.center=m.center=h,m._input.zoom=m.zoom=b,m._input._fitView={center:Si({},h),zoom:b}}function M(A,m){let h=A.getView();A.viewInitial={center:v.extendFlat({},h.center),bearing:m.bearing,pitch:m.pitch,zoom:h.zoom}}o.fillBelowLookup=function(A,m){var h=m[this.id],b=h.layers,_,I,C=this.belowLookup={},F=!1;for(_=0;_1)for(_=0;_-1&&p(R.originalEvent,b,[h.xaxis],[h.yaxis],h.id,F),z.indexOf("event")>-1&&t.click(b,R.originalEvent)}}},o.updateFx=function(A){var m=this,h=m.map,b=m.gd;if(m.isStatic)return;function _(R){var z=m.map.unproject(R);return[z.lng,z.lat]}var I=A.dragmode,C;C=function(R,z){if(z.isRect){var D=R.range={};D[m.id]=[_([z.xmin,z.ymin]),_([z.xmax,z.ymax])]}else{var k=R.lassoPoints={};k[m.id]=z.map(_)}};var F=m.dragOptions;m.dragOptions=v.extendDeep(F||{},{dragmode:A.dragmode,element:m.div,gd:b,plotinfo:{id:m.id,domain:A[m.id].domain,xaxis:m.xaxis,yaxis:m.yaxis,fillRangeItems:C},xaxes:[m.xaxis],yaxes:[m.yaxis],subplot:m.id}),h.off("click",m.onClickInPanHandler),n(I)||r(I)?(h.dragPan.disable(),h.on("zoomstart",m.clearOutline),m.dragOptions.prepFn=function(R,z,D){i(R,z,D,m.dragOptions,I)},e.init(m.dragOptions)):(h.dragPan.enable(),h.off("zoomstart",m.clearOutline),m.div.onmousedown=null,m.div.ontouchstart=null,m.div.removeEventListener("touchstart",m.div._ontouchstart),m.onClickInPanHandler=m.onClickInPanFn(m.dragOptions),h.on("click",m.onClickInPanHandler))},o.updateFramework=function(A){var m=A[this.id].domain,h=A._size,b=this.div.style;b.width=h.w*(m.x[1]-m.x[0])+"px",b.height=h.h*(m.y[1]-m.y[0])+"px",b.left=h.l+m.x[0]*h.w+"px",b.top=h.t+(1-m.y[1])*h.h+"px",this.xaxis._offset=h.l+m.x[0]*h.w,this.xaxis._length=h.w*(m.x[1]-m.x[0]),this.yaxis._offset=h.t+(1-m.y[1])*h.h,this.yaxis._length=h.h*(m.y[1]-m.y[0])},o.updateLayers=function(A){var m=A[this.id],h=m.layers,b=this.layerList,_;if(h.length!==b.length){for(_=0;_oU});function oU(j,N){let u=[];for(let t of j){if(t.subplot!==N||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:a,lon:r}=t;if(!r||!a)continue;let n=Math.min(r.length,a.length);for(let i=0;im/2){var h=T.split("|").join("
");g.text(h).attr("data-unformatted",h).call(t.convertToTspans,n),A=e.bBox(g.node())}g.attr("transform",u(-3,-A.height+8)),E.insert("rect",".static-attribution").attr({x:-A.width-6,y:-A.height-3,width:A.width+6,height:A.height+3,fill:"rgba(255, 255, 255, 0.75)"});var b=1;A.width+6>m&&(b=m/(A.width+6));var _=[c.l+c.w*d.x[1],c.t+c.h*(1-d.y[0])];E.attr("transform",u(_[0],_[1])+v(b))}},j.updateFx=function(n){for(var i=n._fullLayout,s=i._subplots[r],c=0;c=0;a--)e.removeLayer(t[a][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},N.exports=function(t,a){var r=a[0].trace,n=new S(t,r.uid),i=n.sourceId,s=u(a),c=n.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(i,{type:"geojson",data:s.geojson}),n._addLayers(s,c),a[0].trace._glTrace=n,n}}}),dU=De({"src/traces/choroplethmap/index.js"(j,N){"use strict";N.exports={attributes:p6(),supplyDefaults:fU(),colorbar:wm(),calc:_T(),plot:hU(),hoverPoints:bT(),eventData:wT(),selectPoints:AT(),styleOnSelect:function(u,v){if(v){var w=v[0].trace;w._glTrace.updateOnSelect(v)}},getBelow:function(u,v){for(var w=v.getMapLayers(),S=w.length-2;S>=0;S--){var l=w[S].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=S+1;e0?+d[p]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:M},properties:T})}}var g=S.extractOpts(r),A=g.reversescale?S.flipScale(g.colorscale):g.colorscale,m=A[0][1],h=w.opacity(m)<1?m:w.addOpacity(m,0),b=["interpolate",["linear"],["heatmap-density"],0,h];for(p=1;p=0;t--)l.removeLayer(e[t][1])},S.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},N.exports=function(e,t){var a=t[0].trace,r=new w(e,a.uid),n=r.sourceId,i=u(t),s=r.below=e.belowLookup["trace-"+a.uid];return e.map.addSource(n,{type:"geojson",data:i.geojson}),r._addLayers(i,s),r}}}),_U=De({"src/traces/densitymap/hover.js"(j,N){"use strict";var u=Vi(),v=Jb().hoverPoints,w=Jb().getExtraText;N.exports=function(l,e,t){var a=v(l,e,t);if(a){var r=a[0],n=r.cd,i=n[0].trace,s=n[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=u.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=w(i,s,n[0].t.labels),[r]}}}}),xU=De({"src/traces/densitymap/event_data.js"(j,N){"use strict";N.exports=function(v,w){return v.lon=w.lon,v.lat=w.lat,v.z=w.z,v}}}),bU=De({"src/traces/densitymap/index.js"(j,N){"use strict";N.exports={attributes:g6(),supplyDefaults:pU(),colorbar:wm(),formatLabels:f6(),calc:mU(),plot:yU(),hoverPoints:_U(),eventData:xU(),getBelow:function(u,v){for(var w=v.getMapLayers(),S=0;Sx[I%x.length];o("color",y.label.map((I,C)=>w.addOpacity(M(C),.8))),o("customdata");var T=n.link||{},E=e.newContainer(i,"link");function g(I,C){return u.coerce(T,E,v.link,I,C)}g("label"),g("arrowlen"),g("source"),g("target"),g("value"),g("line.color"),g("line.width"),g("hoverinfo",n.hoverinfo),l(T,E,g,f),g("hovertemplate"),g("sort");var A=w.color(c.paper_bgcolor).luminosity()<.333,m=A?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",h=g("color",m);function b(I){if(!w.isValid(I))return I;let C=w.color(I),F=C.alpha();return F<=.8?C.alpha(F+.2).rgb().string():A?w.brighten(C,10):w.adjustLightness(C,-10).rgb().string()}g("hovercolor",Array.isArray(h)?h.map(b):b(h)),g("customdata"),t(T,E,{name:"colorscales",handleItemDefaults:a}),S(i,c,p),p("orientation"),p("valueformat"),p("valuesuffix");let _=y.x.length&&y.y.length?"freeform":void 0;p("arrangement",_),u.coerceFont(p,"textfont",c.font,{autoShadowDflt:!0}),i._length=null};function a(r,n){function i(s,c){return u.coerce(r,n,v.link.colorscales,s,c)}i("label"),i("cmin"),i("cmax"),i("colorscale")}}}),_6=De({"node_modules/strongly-connected-components/scc.js"(j,N){"use strict";N.exports=u;function u(v){for(var w=v.length,S=new Array(w),l=new Array(w),e=new Array(w),t=new Array(w),a=new Array(w),r=new Array(w),n=0;n0;){o=M[M.length-1];var T=v[o];if(t[o]=0&&r[o].push(a[g])}t[o]=E}else{if(l[o]===S[o]){for(var A=[],m=[],h=0,E=x.length-1;E>=0;--E){var b=x[E];if(e[b]=!1,A.push(b),m.push(r[b]),h+=r[b].length,a[b]=s.length,b===o){x.length=E;break}}s.push(A);for(var _=new Array(h),E=0;Eg&&(g=i.source[x]),i.target[x]>g&&(g=i.target[x]);var A=g+1;r.node._count=A;var m,h=r.node.groups,b={};for(x=0;x0&&l(z,A)&&l(D,A)&&!(b.hasOwnProperty(z)&&b.hasOwnProperty(D)&&b[z]===b[D])){b.hasOwnProperty(D)&&(D=b[D]),b.hasOwnProperty(z)&&(z=b[z]),z=+z,D=+D,d[z]=d[D]=!0;var k="";i.label&&i.label[x]&&(k=i.label[x]);var B=null;k&&y.hasOwnProperty(k)&&(B=y[k]),s.push({pointNumber:x,label:k,color:c?i.color[x]:i.color,hovercolor:p?i.hovercolor[x]:i.hovercolor,customdata:f?i.customdata[x]:i.customdata,concentrationscale:B,source:z,target:D,value:+R}),F.source.push(z),F.target.push(D)}}var O=A+h.length,q=S(n.color),Y=S(n.customdata),ee=[];for(x=0;xA-1,childrenNodes:[],pointNumber:x,label:te,color:q?n.color[x]:n.color,customdata:Y?n.customdata[x]:n.customdata})}var ae=!1;return a(O,F.source,F.target)&&(ae=!0),{circular:ae,links:s,nodes:ee,groups:h,groupLookup:b}}function a(r,n,i){for(var s=v.init2dArray(r,0),c=0;c1})}N.exports=function(n,i){var s=t(i);return w({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),MU=De({"node_modules/d3-quadtree/dist/d3-quadtree.js"(j,N){(function(u,v){typeof j=="object"&&typeof N<"u"?v(j):(u=u||self,v(u.d3=u.d3||{}))})(j,function(u){"use strict";function v(A){var m=+this._x.call(null,A),h=+this._y.call(null,A);return w(this.cover(m,h),m,h,A)}function w(A,m,h,b){if(isNaN(m)||isNaN(h))return A;var _,I=A._root,C={data:b},F=A._x0,R=A._y0,z=A._x1,D=A._y1,k,B,O,q,Y,ee,te,ae;if(!I)return A._root=C,A;for(;I.length;)if((Y=m>=(k=(F+z)/2))?F=k:z=k,(ee=h>=(B=(R+D)/2))?R=B:D=B,_=I,!(I=I[te=ee<<1|Y]))return _[te]=C,A;if(O=+A._x.call(null,I.data),q=+A._y.call(null,I.data),m===O&&h===q)return C.next=I,_?_[te]=C:A._root=C,A;do _=_?_[te]=new Array(4):A._root=new Array(4),(Y=m>=(k=(F+z)/2))?F=k:z=k,(ee=h>=(B=(R+D)/2))?R=B:D=B;while((te=ee<<1|Y)===(ae=(q>=B)<<1|O>=k));return _[ae]=I,_[te]=C,A}function S(A){var m,h,b=A.length,_,I,C=new Array(b),F=new Array(b),R=1/0,z=1/0,D=-1/0,k=-1/0;for(h=0;hD&&(D=_),Ik&&(k=I));if(R>D||z>k)return this;for(this.cover(R,z).cover(D,k),h=0;hA||A>=_||b>m||m>=I;)switch(z=(mD||(F=q.y0)>k||(R=q.x1)<_||(z=q.y1)=te)<<1|A>=ee)&&(q=B[B.length-1],B[B.length-1]=B[B.length-1-Y],B[B.length-1-Y]=q)}else{var ae=A-+this._x.call(null,O.data),U=m-+this._y.call(null,O.data),H=ae*ae+U*U;if(H=(B=(C+R)/2))?C=B:R=B,(Y=k>=(O=(F+z)/2))?F=O:z=O,m=h,!(h=h[ee=Y<<1|q]))return this;if(!h.length)break;(m[ee+1&3]||m[ee+2&3]||m[ee+3&3])&&(b=m,te=ee)}for(;h.data!==A;)if(_=h,!(h=h.next))return this;return(I=h.next)&&delete h.next,_?(I?_.next=I:delete _.next,this):m?(I?m[ee]=I:delete m[ee],(h=m[0]||m[1]||m[2]||m[3])&&h===(m[3]||m[2]||m[1]||m[0])&&!h.length&&(b?b[te]=h:this._root=h),this):(this._root=I,this)}function i(A){for(var m=0,h=A.length;m=d.length)return o!=null&&g.sort(o),x!=null?x(g):g;for(var b=-1,_=g.length,I=d[A++],C,F,R=S(),z,D=m();++b<_;)(z=R.get(C=I(F=g[b])+""))?z.push(F):R.set(C,[F]);return R.each(function(k,B){h(D,B,T(k,A,m,h))}),D}function E(g,A){if(++A>d.length)return g;var m,h=y[A-1];return x!=null&&A>=d.length?m=g.entries():(m=[],g.each(function(b,_){m.push({key:_,values:E(b,A)})})),h!=null?m.sort(function(b,_){return h(b.key,_.key)}):m}return M={object:function(g){return T(g,0,e,t)},map:function(g){return T(g,0,a,r)},entries:function(g){return E(T(g,0,a,r),0)},key:function(g){return d.push(g),M},sortKeys:function(g){return y[d.length-1]=g,M},sortValues:function(g){return o=g,M},rollup:function(g){return x=g,M}}}function e(){return{}}function t(d,y,o){d[y]=o}function a(){return S()}function r(d,y,o){d.set(y,o)}function n(){}var i=S.prototype;n.prototype=s.prototype={constructor:n,has:i.has,add:function(d){return d+="",this[v+d]=d,this},remove:i.remove,clear:i.clear,values:i.keys,size:i.size,empty:i.empty,each:i.each};function s(d,y){var o=new n;if(d instanceof n)d.each(function(T){o.add(T)});else if(d){var x=-1,M=d.length;if(y==null)for(;++x=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}S.prototype=w.prototype={constructor:S,on:function(a,r){var n=this._,i=l(a+"",n),s,c=-1,p=i.length;if(arguments.length<2){for(;++c0)for(var n=new Array(s),i=0,s,c;i=0&&A._call.call(null,m),A=A._next;--v}function o(){r=(a=i.now())+n,v=w=0;try{y()}finally{v=0,M(),r=0}}function x(){var A=i.now(),m=A-a;m>l&&(n-=m,a=A)}function M(){for(var A,m=e,h,b=1/0;m;)m._call?(b>m._time&&(b=m._time),A=m,m=m._next):(h=m._next,m._next=null,m=A?A._next=h:e=h);t=A,T(b)}function T(A){if(!v){w&&(w=clearTimeout(w));var m=A-r;m>24?(A<1/0&&(w=setTimeout(o,A-i.now()-n)),S&&(S=clearInterval(S))):(S||(a=i.now(),S=setInterval(x,l)),v=1,s(o))}}function E(A,m,h){var b=new f;return m=m==null?0:+m,b.restart(function(_){b.stop(),A(_+m)},m,h),b}function g(A,m,h){var b=new f,_=m;return m==null?(b.restart(A,m,h),b):(m=+m,h=h==null?c():+h,b.restart(function I(C){C+=_,b.restart(I,_+=m,h),A(C)},m,h),b)}u.interval=g,u.now=c,u.timeout=E,u.timer=d,u.timerFlush=y,Object.defineProperty(u,"__esModule",{value:!0})})}}),kU=De({"node_modules/d3-force/dist/d3-force.js"(j,N){(function(u,v){typeof j=="object"&&typeof N<"u"?v(j,MU(),x6(),SU(),EU()):v(u.d3=u.d3||{},u.d3,u.d3,u.d3,u.d3)})(j,function(u,v,w,S,l){"use strict";function e(A,m){var h;A==null&&(A=0),m==null&&(m=0);function b(){var _,I=h.length,C,F=0,R=0;for(_=0;_k.index){var Q=B-$.x-$.vx,re=O-$.y-$.vy,ce=Q*Q+re*re;ceB+Z||KO+Z||VR.r&&(R.r=R[z].r)}function F(){if(m){var R,z=m.length,D;for(h=new Array(z),R=0;R1?(Y==null?F.remove(q):F.set(q,O(Y)),m):F.get(q)},find:function(q,Y,ee){var te=0,ae=A.length,U,H,K,V,$;for(ee==null?ee=1/0:ee*=ee,te=0;te1?(z.on(q,Y),m):z.on(q)}}}function M(){var A,m,h,b=t(-30),_,I=1,C=1/0,F=.81;function R(B){var O,q=A.length,Y=v.quadtree(A,f,d).visitAfter(D);for(h=B,O=0;O=C)return;(B.data!==m||B.next)&&(ee===0&&(ee=a(),U+=ee*ee),te===0&&(te=a(),U+=te*te),US)if(!(Math.abs(o*f-d*y)>S)||!s)this._+="L"+(this._x1=a)+","+(this._y1=r);else{var M=n-c,T=i-p,E=f*f+d*d,g=M*M+T*T,A=Math.sqrt(E),m=Math.sqrt(x),h=s*Math.tan((v-Math.acos((E+x-g)/(2*A*m)))/2),b=h/m,_=h/A;Math.abs(b-1)>S&&(this._+="L"+(a+b*y)+","+(r+b*o)),this._+="A"+s+","+s+",0,0,"+ +(o*M>y*T)+","+(this._x1=a+_*f)+","+(this._y1=r+_*d)}},arc:function(a,r,n,i,s,c){a=+a,r=+r,n=+n,c=!!c;var p=n*Math.cos(i),f=n*Math.sin(i),d=a+p,y=r+f,o=1^c,x=c?i-s:s-i;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+d+","+y:(Math.abs(this._x1-d)>S||Math.abs(this._y1-y)>S)&&(this._+="L"+d+","+y),n&&(x<0&&(x=x%w+w),x>l?this._+="A"+n+","+n+",0,1,"+o+","+(a-p)+","+(r-f)+"A"+n+","+n+",0,1,"+o+","+(this._x1=d)+","+(this._y1=y):x>S&&(this._+="A"+n+","+n+",0,"+ +(x>=v)+","+o+","+(this._x1=a+n*Math.cos(s))+","+(this._y1=r+n*Math.sin(s))))},rect:function(a,r,n,i){this._+="M"+(this._x0=this._x1=+a)+","+(this._y0=this._y1=+r)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},u.path=t,Object.defineProperty(u,"__esModule",{value:!0})})}}),b6=De({"node_modules/d3-shape/dist/d3-shape.js"(j,N){(function(u,v){typeof j=="object"&&typeof N<"u"?v(j,CU()):(u=u||self,v(u.d3=u.d3||{},u.d3))})(j,function(u,v){"use strict";function w(Je){return function(){return Je}}var S=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,a=Math.min,r=Math.sin,n=Math.sqrt,i=1e-12,s=Math.PI,c=s/2,p=2*s;function f(Je){return Je>1?0:Je<-1?s:Math.acos(Je)}function d(Je){return Je>=1?c:Je<=-1?-c:Math.asin(Je)}function y(Je){return Je.innerRadius}function o(Je){return Je.outerRadius}function x(Je){return Je.startAngle}function M(Je){return Je.endAngle}function T(Je){return Je&&Je.padAngle}function E(Je,bt,qt,Qt,br,Ir,Cr,Mr){var Xr=qt-Je,Ra=Qt-bt,wa=Cr-br,yn=Mr-Ir,fn=yn*Xr-wa*Ra;if(!(fn*fnYi*Yi+zi*zi&&(Bi=Po,fo=po),{cx:Bi,cy:fo,x01:-wa,y01:-yn,x11:Bi*(br/so-1),y11:fo*(br/so-1)}}function A(){var Je=y,bt=o,qt=w(0),Qt=null,br=x,Ir=M,Cr=T,Mr=null;function Xr(){var Ra,wa,yn=+Je.apply(this,arguments),fn=+bt.apply(this,arguments),ri=br.apply(this,arguments)-c,On=Ir.apply(this,arguments)-c,ui=S(On-ri),jn=On>ri;if(Mr||(Mr=Ra=v.path()),fni))Mr.moveTo(0,0);else if(ui>p-i)Mr.moveTo(fn*e(ri),fn*r(ri)),Mr.arc(0,0,fn,ri,On,!jn),yn>i&&(Mr.moveTo(yn*e(On),yn*r(On)),Mr.arc(0,0,yn,On,ri,jn));else{var oo=ri,Qi=On,Mn=ri,bo=On,so=ui,Hi=ui,yo=Cr.apply(this,arguments)/2,Bi=yo>i&&(Qt?+Qt.apply(this,arguments):n(yn*yn+fn*fn)),fo=a(S(fn-yn)/2,+qt.apply(this,arguments)),Po=fo,po=fo,Kn,yi;if(Bi>i){var Yi=d(Bi/yn*r(yo)),zi=d(Bi/fn*r(yo));(so-=Yi*2)>i?(Yi*=jn?1:-1,Mn+=Yi,bo-=Yi):(so=0,Mn=bo=(ri+On)/2),(Hi-=zi*2)>i?(zi*=jn?1:-1,oo+=zi,Qi-=zi):(Hi=0,oo=Qi=(ri+On)/2)}var Uo=fn*e(oo),Co=fn*r(oo),Wo=yn*e(bo),Go=yn*r(bo);if(fo>i){var ns=fn*e(Qi),Ro=fn*r(Qi),Zi=yn*e(Mn),ls=yn*r(Mn),Eo;if(uii?po>i?(Kn=g(Zi,ls,Uo,Co,fn,po,jn),yi=g(ns,Ro,Wo,Go,fn,po,jn),Mr.moveTo(Kn.cx+Kn.x01,Kn.cy+Kn.y01),poi)||!(so>i)?Mr.lineTo(Wo,Go):Po>i?(Kn=g(Wo,Go,ns,Ro,yn,-Po,jn),yi=g(Uo,Co,Zi,ls,yn,-Po,jn),Mr.lineTo(Kn.cx+Kn.x01,Kn.cy+Kn.y01),Po=fn;--ri)Mr.point(Qi[ri],Mn[ri]);Mr.lineEnd(),Mr.areaEnd()}jn&&(Qi[yn]=+Je(ui,yn,wa),Mn[yn]=+qt(ui,yn,wa),Mr.point(bt?+bt(ui,yn,wa):Qi[yn],Qt?+Qt(ui,yn,wa):Mn[yn]))}if(oo)return Mr=null,oo+""||null}function Ra(){return I().defined(br).curve(Cr).context(Ir)}return Xr.x=function(wa){return arguments.length?(Je=typeof wa=="function"?wa:w(+wa),bt=null,Xr):Je},Xr.x0=function(wa){return arguments.length?(Je=typeof wa=="function"?wa:w(+wa),Xr):Je},Xr.x1=function(wa){return arguments.length?(bt=wa==null?null:typeof wa=="function"?wa:w(+wa),Xr):bt},Xr.y=function(wa){return arguments.length?(qt=typeof wa=="function"?wa:w(+wa),Qt=null,Xr):qt},Xr.y0=function(wa){return arguments.length?(qt=typeof wa=="function"?wa:w(+wa),Xr):qt},Xr.y1=function(wa){return arguments.length?(Qt=wa==null?null:typeof wa=="function"?wa:w(+wa),Xr):Qt},Xr.lineX0=Xr.lineY0=function(){return Ra().x(Je).y(qt)},Xr.lineY1=function(){return Ra().x(Je).y(Qt)},Xr.lineX1=function(){return Ra().x(bt).y(qt)},Xr.defined=function(wa){return arguments.length?(br=typeof wa=="function"?wa:w(!!wa),Xr):br},Xr.curve=function(wa){return arguments.length?(Cr=wa,Ir!=null&&(Mr=Cr(Ir)),Xr):Cr},Xr.context=function(wa){return arguments.length?(wa==null?Ir=Mr=null:Mr=Cr(Ir=wa),Xr):Ir},Xr}function F(Je,bt){return btJe?1:bt>=Je?0:NaN}function R(Je){return Je}function z(){var Je=R,bt=F,qt=null,Qt=w(0),br=w(p),Ir=w(0);function Cr(Mr){var Xr,Ra=Mr.length,wa,yn,fn=0,ri=new Array(Ra),On=new Array(Ra),ui=+Qt.apply(this,arguments),jn=Math.min(p,Math.max(-p,br.apply(this,arguments)-ui)),oo,Qi=Math.min(Math.abs(jn)/Ra,Ir.apply(this,arguments)),Mn=Qi*(jn<0?-1:1),bo;for(Xr=0;Xr0&&(fn+=bo);for(bt!=null?ri.sort(function(so,Hi){return bt(On[so],On[Hi])}):qt!=null&&ri.sort(function(so,Hi){return qt(Mr[so],Mr[Hi])}),Xr=0,yn=fn?(jn-Ra*Mn)/fn:0;Xr0?bo*yn:0)+Mn,On[wa]={data:Mr[wa],index:Xr,value:bo,startAngle:ui,endAngle:oo,padAngle:Qi};return On}return Cr.value=function(Mr){return arguments.length?(Je=typeof Mr=="function"?Mr:w(+Mr),Cr):Je},Cr.sortValues=function(Mr){return arguments.length?(bt=Mr,qt=null,Cr):bt},Cr.sort=function(Mr){return arguments.length?(qt=Mr,bt=null,Cr):qt},Cr.startAngle=function(Mr){return arguments.length?(Qt=typeof Mr=="function"?Mr:w(+Mr),Cr):Qt},Cr.endAngle=function(Mr){return arguments.length?(br=typeof Mr=="function"?Mr:w(+Mr),Cr):br},Cr.padAngle=function(Mr){return arguments.length?(Ir=typeof Mr=="function"?Mr:w(+Mr),Cr):Ir},Cr}var D=B(h);function k(Je){this._curve=Je}k.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(Je,bt){this._curve.point(bt*Math.sin(Je),bt*-Math.cos(Je))}};function B(Je){function bt(qt){return new k(Je(qt))}return bt._curve=Je,bt}function O(Je){var bt=Je.curve;return Je.angle=Je.x,delete Je.x,Je.radius=Je.y,delete Je.y,Je.curve=function(qt){return arguments.length?bt(B(qt)):bt()._curve},Je}function q(){return O(I().curve(D))}function Y(){var Je=C().curve(D),bt=Je.curve,qt=Je.lineX0,Qt=Je.lineX1,br=Je.lineY0,Ir=Je.lineY1;return Je.angle=Je.x,delete Je.x,Je.startAngle=Je.x0,delete Je.x0,Je.endAngle=Je.x1,delete Je.x1,Je.radius=Je.y,delete Je.y,Je.innerRadius=Je.y0,delete Je.y0,Je.outerRadius=Je.y1,delete Je.y1,Je.lineStartAngle=function(){return O(qt())},delete Je.lineX0,Je.lineEndAngle=function(){return O(Qt())},delete Je.lineX1,Je.lineInnerRadius=function(){return O(br())},delete Je.lineY0,Je.lineOuterRadius=function(){return O(Ir())},delete Je.lineY1,Je.curve=function(Cr){return arguments.length?bt(B(Cr)):bt()._curve},Je}function ee(Je,bt){return[(bt=+bt)*Math.cos(Je-=Math.PI/2),bt*Math.sin(Je)]}var te=Array.prototype.slice;function ae(Je){return Je.source}function U(Je){return Je.target}function H(Je){var bt=ae,qt=U,Qt=b,br=_,Ir=null;function Cr(){var Mr,Xr=te.call(arguments),Ra=bt.apply(this,Xr),wa=qt.apply(this,Xr);if(Ir||(Ir=Mr=v.path()),Je(Ir,+Qt.apply(this,(Xr[0]=Ra,Xr)),+br.apply(this,Xr),+Qt.apply(this,(Xr[0]=wa,Xr)),+br.apply(this,Xr)),Mr)return Ir=null,Mr+""||null}return Cr.source=function(Mr){return arguments.length?(bt=Mr,Cr):bt},Cr.target=function(Mr){return arguments.length?(qt=Mr,Cr):qt},Cr.x=function(Mr){return arguments.length?(Qt=typeof Mr=="function"?Mr:w(+Mr),Cr):Qt},Cr.y=function(Mr){return arguments.length?(br=typeof Mr=="function"?Mr:w(+Mr),Cr):br},Cr.context=function(Mr){return arguments.length?(Ir=Mr??null,Cr):Ir},Cr}function K(Je,bt,qt,Qt,br){Je.moveTo(bt,qt),Je.bezierCurveTo(bt=(bt+Qt)/2,qt,bt,br,Qt,br)}function V(Je,bt,qt,Qt,br){Je.moveTo(bt,qt),Je.bezierCurveTo(bt,qt=(qt+br)/2,Qt,qt,Qt,br)}function $(Je,bt,qt,Qt,br){var Ir=ee(bt,qt),Cr=ee(bt,qt=(qt+br)/2),Mr=ee(Qt,qt),Xr=ee(Qt,br);Je.moveTo(Ir[0],Ir[1]),Je.bezierCurveTo(Cr[0],Cr[1],Mr[0],Mr[1],Xr[0],Xr[1])}function X(){return H(K)}function Z(){return H(V)}function Q(){var Je=H($);return Je.angle=Je.x,delete Je.x,Je.radius=Je.y,delete Je.y,Je}var re={draw:function(Je,bt){var qt=Math.sqrt(bt/s);Je.moveTo(qt,0),Je.arc(0,0,qt,0,p)}},ce={draw:function(Je,bt){var qt=Math.sqrt(bt/5)/2;Je.moveTo(-3*qt,-qt),Je.lineTo(-qt,-qt),Je.lineTo(-qt,-3*qt),Je.lineTo(qt,-3*qt),Je.lineTo(qt,-qt),Je.lineTo(3*qt,-qt),Je.lineTo(3*qt,qt),Je.lineTo(qt,qt),Je.lineTo(qt,3*qt),Je.lineTo(-qt,3*qt),Je.lineTo(-qt,qt),Je.lineTo(-3*qt,qt),Je.closePath()}},me=Math.sqrt(1/3),ye=me*2,Ae={draw:function(Je,bt){var qt=Math.sqrt(bt/ye),Qt=qt*me;Je.moveTo(0,-qt),Je.lineTo(Qt,0),Je.lineTo(0,qt),Je.lineTo(-Qt,0),Je.closePath()}},Se=.8908130915292852,Ce=Math.sin(s/10)/Math.sin(7*s/10),qe=Math.sin(p/10)*Ce,Ue=-Math.cos(p/10)*Ce,xe={draw:function(Je,bt){var qt=Math.sqrt(bt*Se),Qt=qe*qt,br=Ue*qt;Je.moveTo(0,-qt),Je.lineTo(Qt,br);for(var Ir=1;Ir<5;++Ir){var Cr=p*Ir/5,Mr=Math.cos(Cr),Xr=Math.sin(Cr);Je.lineTo(Xr*qt,-Mr*qt),Je.lineTo(Mr*Qt-Xr*br,Xr*Qt+Mr*br)}Je.closePath()}},he={draw:function(Je,bt){var qt=Math.sqrt(bt),Qt=-qt/2;Je.rect(Qt,Qt,qt,qt)}},oe=Math.sqrt(3),le={draw:function(Je,bt){var qt=-Math.sqrt(bt/(oe*3));Je.moveTo(0,qt*2),Je.lineTo(-oe*qt,-qt),Je.lineTo(oe*qt,-qt),Je.closePath()}},ne=-.5,be=Math.sqrt(3)/2,Fe=1/Math.sqrt(12),Ve=(Fe/2+1)*3,je={draw:function(Je,bt){var qt=Math.sqrt(bt/Ve),Qt=qt/2,br=qt*Fe,Ir=Qt,Cr=qt*Fe+qt,Mr=-Ir,Xr=Cr;Je.moveTo(Qt,br),Je.lineTo(Ir,Cr),Je.lineTo(Mr,Xr),Je.lineTo(ne*Qt-be*br,be*Qt+ne*br),Je.lineTo(ne*Ir-be*Cr,be*Ir+ne*Cr),Je.lineTo(ne*Mr-be*Xr,be*Mr+ne*Xr),Je.lineTo(ne*Qt+be*br,ne*br-be*Qt),Je.lineTo(ne*Ir+be*Cr,ne*Cr-be*Ir),Je.lineTo(ne*Mr+be*Xr,ne*Xr-be*Mr),Je.closePath()}},ut=[re,ce,Ae,he,xe,le,je];function st(){var Je=w(re),bt=w(64),qt=null;function Qt(){var br;if(qt||(qt=br=v.path()),Je.apply(this,arguments).draw(qt,+bt.apply(this,arguments)),br)return qt=null,br+""||null}return Qt.type=function(br){return arguments.length?(Je=typeof br=="function"?br:w(br),Qt):Je},Qt.size=function(br){return arguments.length?(bt=typeof br=="function"?br:w(+br),Qt):bt},Qt.context=function(br){return arguments.length?(qt=br??null,Qt):qt},Qt}function yt(){}function At(Je,bt,qt){Je._context.bezierCurveTo((2*Je._x0+Je._x1)/3,(2*Je._y0+Je._y1)/3,(Je._x0+2*Je._x1)/3,(Je._y0+2*Je._y1)/3,(Je._x0+4*Je._x1+bt)/6,(Je._y0+4*Je._y1+qt)/6)}function Pt(Je){this._context=Je}Pt.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:At(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Je,bt){switch(Je=+Je,bt=+bt,this._point){case 0:this._point=1,this._line?this._context.lineTo(Je,bt):this._context.moveTo(Je,bt);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:At(this,Je,bt);break}this._x0=this._x1,this._x1=Je,this._y0=this._y1,this._y1=bt}};function Zt(Je){return new Pt(Je)}function vr(Je){this._context=Je}vr.prototype={areaStart:yt,areaEnd:yt,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);break}}},point:function(Je,bt){switch(Je=+Je,bt=+bt,this._point){case 0:this._point=1,this._x2=Je,this._y2=bt;break;case 1:this._point=2,this._x3=Je,this._y3=bt;break;case 2:this._point=3,this._x4=Je,this._y4=bt,this._context.moveTo((this._x0+4*this._x1+Je)/6,(this._y0+4*this._y1+bt)/6);break;default:At(this,Je,bt);break}this._x0=this._x1,this._x1=Je,this._y0=this._y1,this._y1=bt}};function Nt(Je){return new vr(Je)}function Kt(Je){this._context=Je}Kt.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Je,bt){switch(Je=+Je,bt=+bt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var qt=(this._x0+4*this._x1+Je)/6,Qt=(this._y0+4*this._y1+bt)/6;this._line?this._context.lineTo(qt,Qt):this._context.moveTo(qt,Qt);break;case 3:this._point=4;default:At(this,Je,bt);break}this._x0=this._x1,this._x1=Je,this._y0=this._y1,this._y1=bt}};function nt(Je){return new Kt(Je)}function Ee(Je,bt){this._basis=new Pt(Je),this._beta=bt}Ee.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var Je=this._x,bt=this._y,qt=Je.length-1;if(qt>0)for(var Qt=Je[0],br=bt[0],Ir=Je[qt]-Qt,Cr=bt[qt]-br,Mr=-1,Xr;++Mr<=qt;)Xr=Mr/qt,this._basis.point(this._beta*Je[Mr]+(1-this._beta)*(Qt+Xr*Ir),this._beta*bt[Mr]+(1-this._beta)*(br+Xr*Cr));this._x=this._y=null,this._basis.lineEnd()},point:function(Je,bt){this._x.push(+Je),this._y.push(+bt)}};var ze=function Je(bt){function qt(Qt){return bt===1?new Pt(Qt):new Ee(Qt,bt)}return qt.beta=function(Qt){return Je(+Qt)},qt}(.85);function ve(Je,bt,qt){Je._context.bezierCurveTo(Je._x1+Je._k*(Je._x2-Je._x0),Je._y1+Je._k*(Je._y2-Je._y0),Je._x2+Je._k*(Je._x1-bt),Je._y2+Je._k*(Je._y1-qt),Je._x2,Je._y2)}function _e(Je,bt){this._context=Je,this._k=(1-bt)/6}_e.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:ve(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Je,bt){switch(Je=+Je,bt=+bt,this._point){case 0:this._point=1,this._line?this._context.lineTo(Je,bt):this._context.moveTo(Je,bt);break;case 1:this._point=2,this._x1=Je,this._y1=bt;break;case 2:this._point=3;default:ve(this,Je,bt);break}this._x0=this._x1,this._x1=this._x2,this._x2=Je,this._y0=this._y1,this._y1=this._y2,this._y2=bt}};var Ie=function Je(bt){function qt(Qt){return new _e(Qt,bt)}return qt.tension=function(Qt){return Je(+Qt)},qt}(0);function Be(Je,bt){this._context=Je,this._k=(1-bt)/6}Be.prototype={areaStart:yt,areaEnd:yt,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);break}}},point:function(Je,bt){switch(Je=+Je,bt=+bt,this._point){case 0:this._point=1,this._x3=Je,this._y3=bt;break;case 1:this._point=2,this._context.moveTo(this._x4=Je,this._y4=bt);break;case 2:this._point=3,this._x5=Je,this._y5=bt;break;default:ve(this,Je,bt);break}this._x0=this._x1,this._x1=this._x2,this._x2=Je,this._y0=this._y1,this._y1=this._y2,this._y2=bt}};var We=function Je(bt){function qt(Qt){return new Be(Qt,bt)}return qt.tension=function(Qt){return Je(+Qt)},qt}(0);function Xe(Je,bt){this._context=Je,this._k=(1-bt)/6}Xe.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Je,bt){switch(Je=+Je,bt=+bt,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:ve(this,Je,bt);break}this._x0=this._x1,this._x1=this._x2,this._x2=Je,this._y0=this._y1,this._y1=this._y2,this._y2=bt}};var mt=function Je(bt){function qt(Qt){return new Xe(Qt,bt)}return qt.tension=function(Qt){return Je(+Qt)},qt}(0);function ft(Je,bt,qt){var Qt=Je._x1,br=Je._y1,Ir=Je._x2,Cr=Je._y2;if(Je._l01_a>i){var Mr=2*Je._l01_2a+3*Je._l01_a*Je._l12_a+Je._l12_2a,Xr=3*Je._l01_a*(Je._l01_a+Je._l12_a);Qt=(Qt*Mr-Je._x0*Je._l12_2a+Je._x2*Je._l01_2a)/Xr,br=(br*Mr-Je._y0*Je._l12_2a+Je._y2*Je._l01_2a)/Xr}if(Je._l23_a>i){var Ra=2*Je._l23_2a+3*Je._l23_a*Je._l12_a+Je._l12_2a,wa=3*Je._l23_a*(Je._l23_a+Je._l12_a);Ir=(Ir*Ra+Je._x1*Je._l23_2a-bt*Je._l12_2a)/wa,Cr=(Cr*Ra+Je._y1*Je._l23_2a-qt*Je._l12_2a)/wa}Je._context.bezierCurveTo(Qt,br,Ir,Cr,Je._x2,Je._y2)}function ht(Je,bt){this._context=Je,this._alpha=bt}ht.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Je,bt){if(Je=+Je,bt=+bt,this._point){var qt=this._x2-Je,Qt=this._y2-bt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(qt*qt+Qt*Qt,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Je,bt):this._context.moveTo(Je,bt);break;case 1:this._point=2;break;case 2:this._point=3;default:ft(this,Je,bt);break}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=Je,this._y0=this._y1,this._y1=this._y2,this._y2=bt}};var gt=function Je(bt){function qt(Qt){return bt?new ht(Qt,bt):new _e(Qt,0)}return qt.alpha=function(Qt){return Je(+Qt)},qt}(.5);function _t(Je,bt){this._context=Je,this._alpha=bt}_t.prototype={areaStart:yt,areaEnd:yt,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);break}}},point:function(Je,bt){if(Je=+Je,bt=+bt,this._point){var qt=this._x2-Je,Qt=this._y2-bt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(qt*qt+Qt*Qt,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=Je,this._y3=bt;break;case 1:this._point=2,this._context.moveTo(this._x4=Je,this._y4=bt);break;case 2:this._point=3,this._x5=Je,this._y5=bt;break;default:ft(this,Je,bt);break}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=Je,this._y0=this._y1,this._y1=this._y2,this._y2=bt}};var Ft=function Je(bt){function qt(Qt){return bt?new _t(Qt,bt):new Be(Qt,0)}return qt.alpha=function(Qt){return Je(+Qt)},qt}(.5);function St(Je,bt){this._context=Je,this._alpha=bt}St.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(Je,bt){if(Je=+Je,bt=+bt,this._point){var qt=this._x2-Je,Qt=this._y2-bt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(qt*qt+Qt*Qt,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:ft(this,Je,bt);break}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=Je,this._y0=this._y1,this._y1=this._y2,this._y2=bt}};var hr=function Je(bt){function qt(Qt){return bt?new St(Qt,bt):new Xe(Qt,0)}return qt.alpha=function(Qt){return Je(+Qt)},qt}(.5);function jr(Je){this._context=Je}jr.prototype={areaStart:yt,areaEnd:yt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(Je,bt){Je=+Je,bt=+bt,this._point?this._context.lineTo(Je,bt):(this._point=1,this._context.moveTo(Je,bt))}};function ra(Je){return new jr(Je)}function $r(Je){return Je<0?-1:1}function pa(Je,bt,qt){var Qt=Je._x1-Je._x0,br=bt-Je._x1,Ir=(Je._y1-Je._y0)/(Qt||br<0&&-0),Cr=(qt-Je._y1)/(br||Qt<0&&-0),Mr=(Ir*br+Cr*Qt)/(Qt+br);return($r(Ir)+$r(Cr))*Math.min(Math.abs(Ir),Math.abs(Cr),.5*Math.abs(Mr))||0}function oa(Je,bt){var qt=Je._x1-Je._x0;return qt?(3*(Je._y1-Je._y0)/qt-bt)/2:bt}function aa(Je,bt,qt){var Qt=Je._x0,br=Je._y0,Ir=Je._x1,Cr=Je._y1,Mr=(Ir-Qt)/3;Je._context.bezierCurveTo(Qt+Mr,br+Mr*bt,Ir-Mr,Cr-Mr*qt,Ir,Cr)}function ka(Je){this._context=Je}ka.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:aa(this,this._t0,oa(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(Je,bt){var qt=NaN;if(Je=+Je,bt=+bt,!(Je===this._x1&&bt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(Je,bt):this._context.moveTo(Je,bt);break;case 1:this._point=2;break;case 2:this._point=3,aa(this,oa(this,qt=pa(this,Je,bt)),qt);break;default:aa(this,this._t0,qt=pa(this,Je,bt));break}this._x0=this._x1,this._x1=Je,this._y0=this._y1,this._y1=bt,this._t0=qt}}};function Ta(Je){this._context=new Da(Je)}(Ta.prototype=Object.create(ka.prototype)).point=function(Je,bt){ka.prototype.point.call(this,bt,Je)};function Da(Je){this._context=Je}Da.prototype={moveTo:function(Je,bt){this._context.moveTo(bt,Je)},closePath:function(){this._context.closePath()},lineTo:function(Je,bt){this._context.lineTo(bt,Je)},bezierCurveTo:function(Je,bt,qt,Qt,br,Ir){this._context.bezierCurveTo(bt,Je,Qt,qt,Ir,br)}};function La(Je){return new ka(Je)}function Ga(Je){return new Ta(Je)}function xa(Je){this._context=Je}xa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var Je=this._x,bt=this._y,qt=Je.length;if(qt)if(this._line?this._context.lineTo(Je[0],bt[0]):this._context.moveTo(Je[0],bt[0]),qt===2)this._context.lineTo(Je[1],bt[1]);else for(var Qt=Gn(Je),br=Gn(bt),Ir=0,Cr=1;Cr=0;--bt)br[bt]=(Cr[bt]-br[bt+1])/Ir[bt];for(Ir[qt-1]=(Je[qt]+br[qt-1])/2,bt=0;bt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(Je,bt){switch(Je=+Je,bt=+bt,this._point){case 0:this._point=1,this._line?this._context.lineTo(Je,bt):this._context.moveTo(Je,bt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,bt),this._context.lineTo(Je,bt);else{var qt=this._x*(1-this._t)+Je*this._t;this._context.lineTo(qt,this._y),this._context.lineTo(qt,bt)}break}}this._x=Je,this._y=bt}};function Yn(Je){return new sn(Je,.5)}function Zn(Je){return new sn(Je,0)}function vi(Je){return new sn(Je,1)}function Dn(Je,bt){if((Cr=Je.length)>1)for(var qt=1,Qt,br,Ir=Je[bt[0]],Cr,Mr=Ir.length;qt=0;)qt[bt]=bt;return qt}function on(Je,bt){return Je[bt]}function mn(){var Je=w([]),bt=oi,qt=Dn,Qt=on;function br(Ir){var Cr=Je.apply(this,arguments),Mr,Xr=Ir.length,Ra=Cr.length,wa=new Array(Ra),yn;for(Mr=0;Mr0){for(var qt,Qt,br=0,Ir=Je[0].length,Cr;br0)for(var qt,Qt=0,br,Ir,Cr,Mr,Xr,Ra=Je[bt[0]].length;Qt0?(br[0]=Cr,br[1]=Cr+=Ir):Ir<0?(br[1]=Mr,br[0]=Mr+=Ir):(br[0]=0,br[1]=Ir)}function $a(Je,bt){if((br=Je.length)>0){for(var qt=0,Qt=Je[bt[0]],br,Ir=Qt.length;qt0)||!((Ir=(br=Je[bt[0]]).length)>0))){for(var qt=0,Qt=1,br,Ir,Cr;QtIr&&(Ir=br,qt=bt);return qt}function Jt(Je){var bt=Je.map(Yt);return oi(Je).sort(function(qt,Qt){return bt[qt]-bt[Qt]})}function Yt(Je){for(var bt=0,qt=-1,Qt=Je.length,br;++qt[C(qe,Ue,Ae),qe]));for(let[qe,Ue]of Se.entries()){Ue.index=qe;let{source:xe,target:he}=Ue;typeof xe!="object"&&(xe=Ue.source=y(Ce,xe)),typeof he!="object"&&(he=Ue.target=y(Ce,he)),xe.sourceLinks.push(Ue),he.targetLinks.push(Ue)}if(z!=null)for(let{sourceLinks:qe,targetLinks:Ue}of Ae)qe.sort(z),Ue.sort(z)}function ee({nodes:Ae}){for(let Se of Ae)Se.value=Se.fixedValue===void 0?Math.max(v.sum(Se.sourceLinks,c),v.sum(Se.targetLinks,c)):Se.fixedValue}function te({nodes:Ae}){let Se=Ae.length,Ce=new Set(Ae),qe=new Set,Ue=0;for(;Ce.size;){for(let xe of Ce){xe.depth=Ue;for(let{target:he}of xe.sourceLinks)qe.add(he)}if(++Ue>Se)throw new Error("circular link");Ce=qe,qe=new Set}}function ae({nodes:Ae}){let Se=Ae.length,Ce=new Set(Ae),qe=new Set,Ue=0;for(;Ce.size;){for(let xe of Ce){xe.height=Ue;for(let{source:he}of xe.targetLinks)qe.add(he)}if(++Ue>Se)throw new Error("circular link");Ce=qe,qe=new Set}}function U({nodes:Ae}){let Se=v.max(Ae,Ue=>Ue.depth)+1,Ce=(m-g-b)/(Se-1),qe=new Array(Se);for(let Ue of Ae){let xe=Math.max(0,Math.min(Se-1,Math.floor(F.call(null,Ue,Se))));Ue.layer=xe,Ue.x0=g+xe*Ce,Ue.x1=Ue.x0+b,qe[xe]?qe[xe].push(Ue):qe[xe]=[Ue]}if(R)for(let Ue of qe)Ue.sort(R);return qe}function H(Ae){let Se=v.min(Ae,Ce=>(h-A-(Ce.length-1)*I)/v.sum(Ce,c));for(let Ce of Ae){let qe=A;for(let Ue of Ce){Ue.y0=qe,Ue.y1=qe+Ue.value*Se,qe=Ue.y1+I;for(let xe of Ue.sourceLinks)xe.width=xe.value*Se}qe=(h-qe+I)/(Ce.length+1);for(let Ue=0;UeCe.length)-1)),H(Se);for(let Ce=0;Ce0))continue;let ne=(oe/le-he.y0)*Se;he.y0+=ne,he.y1+=ne,re(he)}R===void 0&&xe.sort(s),X(xe,Ce)}}function $(Ae,Se,Ce){for(let qe=Ae.length,Ue=qe-2;Ue>=0;--Ue){let xe=Ae[Ue];for(let he of xe){let oe=0,le=0;for(let{target:be,value:Fe}of he.sourceLinks){let Ve=Fe*(be.layer-he.layer);oe+=ye(he,be)*Ve,le+=Ve}if(!(le>0))continue;let ne=(oe/le-he.y0)*Se;he.y0+=ne,he.y1+=ne,re(he)}R===void 0&&xe.sort(s),X(xe,Ce)}}function X(Ae,Se){let Ce=Ae.length>>1,qe=Ae[Ce];Q(Ae,qe.y0-I,Ce-1,Se),Z(Ae,qe.y1+I,Ce+1,Se),Q(Ae,h,Ae.length-1,Se),Z(Ae,A,0,Se)}function Z(Ae,Se,Ce,qe){for(;Ce1e-6&&(Ue.y0+=xe,Ue.y1+=xe),Se=Ue.y1+I}}function Q(Ae,Se,Ce,qe){for(;Ce>=0;--Ce){let Ue=Ae[Ce],xe=(Ue.y1-Se)*qe;xe>1e-6&&(Ue.y0-=xe,Ue.y1-=xe),Se=Ue.y0-I}}function re({sourceLinks:Ae,targetLinks:Se}){if(z===void 0){for(let{source:{sourceLinks:Ce}}of Se)Ce.sort(i);for(let{target:{targetLinks:Ce}}of Ae)Ce.sort(n)}}function ce(Ae){if(z===void 0)for(let{sourceLinks:Se,targetLinks:Ce}of Ae)Se.sort(i),Ce.sort(n)}function me(Ae,Se){let Ce=Ae.y0-(Ae.sourceLinks.length-1)*I/2;for(let{target:qe,width:Ue}of Ae.sourceLinks){if(qe===Se)break;Ce+=Ue+I}for(let{source:qe,width:Ue}of Se.targetLinks){if(qe===Ae)break;Ce-=Ue}return Ce}function ye(Ae,Se){let Ce=Se.y0-(Se.targetLinks.length-1)*I/2;for(let{source:qe,width:Ue}of Se.targetLinks){if(qe===Ae)break;Ce+=Ue+I}for(let{target:qe,width:Ue}of Ae.sourceLinks){if(qe===Se)break;Ce-=Ue}return Ce}return q}function M(g){return[g.source.x1,g.y0]}function T(g){return[g.target.x0,g.y1]}function E(){return w.linkHorizontal().source(M).target(T)}u.sankey=x,u.sankeyCenter=a,u.sankeyJustify=t,u.sankeyLeft=l,u.sankeyLinkHorizontal=E,u.sankeyRight=e,Object.defineProperty(u,"__esModule",{value:!0})})}}),PU=De({"node_modules/elementary-circuits-directed-graph/johnson.js"(j,N){var u=_6();N.exports=function(w,S){var l=[],e=[],t=[],a={},r=[],n;function i(T){t[T]=!1,a.hasOwnProperty(T)&&Object.keys(a[T]).forEach(function(E){delete a[T][E],t[E]&&i(E)})}function s(T){var E=!1;e.push(T),t[T]=!0;var g,A;for(g=0;g=T})}function f(T){p(T);for(var E=w,g=u(E),A=g.components.filter(function(F){return F.length>1}),m=1/0,h,b=0;b"u"?"undefined":s(_e))!=="object"&&(_e=ze.source=g(Ee,_e)),(typeof Ie>"u"?"undefined":s(Ie))!=="object"&&(Ie=ze.target=g(Ee,Ie)),_e.sourceLinks.push(ze),Ie.targetLinks.push(ze)}),nt}function At(nt){nt.nodes.forEach(function(Ee){Ee.partOfCycle=!1,Ee.value=Math.max(v.sum(Ee.sourceLinks,d),v.sum(Ee.targetLinks,d)),Ee.sourceLinks.forEach(function(ze){ze.circular&&(Ee.partOfCycle=!0,Ee.circularLinkType=ze.circularLinkType)}),Ee.targetLinks.forEach(function(ze){ze.circular&&(Ee.partOfCycle=!0,Ee.circularLinkType=ze.circularLinkType)})})}function Pt(nt){var Ee=0,ze=0,ve=0,_e=0,Ie=v.max(nt.nodes,function(Be){return Be.column});return nt.links.forEach(function(Be){Be.circular&&(Be.circularLinkType=="top"?Ee=Ee+Be.width:ze=ze+Be.width,Be.target.column==0&&(_e=_e+Be.width),Be.source.column==Ie&&(ve=ve+Be.width))}),Ee=Ee>0?Ee+m+h:Ee,ze=ze>0?ze+m+h:ze,ve=ve>0?ve+m+h:ve,_e=_e>0?_e+m+h:_e,{top:Ee,bottom:ze,left:_e,right:ve}}function Zt(nt,Ee){var ze=v.max(nt.nodes,function(mt){return mt.column}),ve=qe-Se,_e=Ue-Ce,Ie=ve+Ee.right+Ee.left,Be=_e+Ee.top+Ee.bottom,We=ve/Ie,Xe=_e/Be;return Se=Se*We+Ee.left,qe=Ee.right==0?qe:qe*We,Ce=Ce*Xe+Ee.top,Ue=Ue*Xe,nt.nodes.forEach(function(mt){mt.x0=Se+mt.column*((qe-Se-xe)/ze),mt.x1=mt.x0+xe}),Xe}function vr(nt){var Ee,ze,ve;for(Ee=nt.nodes,ze=[],ve=0;Ee.length;++ve,Ee=ze,ze=[])Ee.forEach(function(_e){_e.depth=ve,_e.sourceLinks.forEach(function(Ie){ze.indexOf(Ie.target)<0&&!Ie.circular&&ze.push(Ie.target)})});for(Ee=nt.nodes,ze=[],ve=0;Ee.length;++ve,Ee=ze,ze=[])Ee.forEach(function(_e){_e.height=ve,_e.targetLinks.forEach(function(Ie){ze.indexOf(Ie.source)<0&&!Ie.circular&&ze.push(Ie.source)})});nt.nodes.forEach(function(_e){_e.column=Math.floor(le.call(null,_e,ve))})}function Nt(nt,Ee,ze){var ve=w.nest().key(function(mt){return mt.column}).sortKeys(v.ascending).entries(nt.nodes).map(function(mt){return mt.values});Be(ze),Xe();for(var _e=1,Ie=Ee;Ie>0;--Ie)We(_e*=.99,ze),Xe();function Be(mt){if(je){var ft=1/0;ve.forEach(function(Ft){var St=Ue*je/(Ft.length+1);ft=St0))if(Ft==0&&_t==1)hr=St.y1-St.y0,St.y0=Ue/2-hr/2,St.y1=Ue/2+hr/2;else if(Ft==ht-1&&_t==1)hr=St.y1-St.y0,St.y0=Ue/2-hr/2,St.y1=Ue/2+hr/2;else{var jr=0,ra=v.mean(St.sourceLinks,x),$r=v.mean(St.targetLinks,o);ra&&$r?jr=(ra+$r)/2:jr=ra||$r;var pa=(jr-y(St))*mt;St.y0+=pa,St.y1+=pa}})})}function Xe(){ve.forEach(function(mt){var ft,ht,gt=Ce,_t=mt.length,Ft;for(mt.sort(f),Ft=0;Ft<_t;++Ft)ft=mt[Ft],ht=gt-ft.y0,ht>0&&(ft.y0+=ht,ft.y1+=ht),gt=ft.y1+he;if(ht=gt-he-Ue,ht>0)for(gt=ft.y0-=ht,ft.y1-=ht,Ft=_t-2;Ft>=0;--Ft)ft=mt[Ft],ht=ft.y1+he-gt,ht>0&&(ft.y0-=ht,ft.y1-=ht),gt=ft.y0})}}function Kt(nt){nt.nodes.forEach(function(Ee){Ee.sourceLinks.sort(p),Ee.targetLinks.sort(c)}),nt.nodes.forEach(function(Ee){var ze=Ee.y0,ve=ze,_e=Ee.y1,Ie=_e;Ee.sourceLinks.forEach(function(Be){Be.circular?(Be.y0=_e-Be.width/2,_e=_e-Be.width):(Be.y0=ze+Be.width/2,ze+=Be.width)}),Ee.targetLinks.forEach(function(Be){Be.circular?(Be.y1=Ie-Be.width/2,Ie=Ie-Be.width):(Be.y1=ve+Be.width/2,ve+=Be.width)})})}return st}function I(Se,Ce,qe){var Ue=0;if(qe===null){for(var xe=[],he=0;heCe.source.column)}function z(Se,Ce){var qe=0;Se.sourceLinks.forEach(function(xe){qe=xe.circular&&!ye(xe,Ce)?qe+1:qe});var Ue=0;return Se.targetLinks.forEach(function(xe){Ue=xe.circular&&!ye(xe,Ce)?Ue+1:Ue}),qe+Ue}function D(Se){var Ce=Se.source.sourceLinks,qe=0;Ce.forEach(function(he){qe=he.circular?qe+1:qe});var Ue=Se.target.targetLinks,xe=0;return Ue.forEach(function(he){xe=he.circular?xe+1:xe}),!(qe>1||xe>1)}function k(Se,Ce,qe){return Se.sort(q),Se.forEach(function(Ue,xe){var he=0;if(ye(Ue,qe)&&D(Ue))Ue.circularPathData.verticalBuffer=he+Ue.width/2;else{var oe=0;for(oe;oehe?le:he}Ue.circularPathData.verticalBuffer=he+Ue.width/2}}),Se}function B(Se,Ce,qe,Ue){var xe=5,he=v.min(Se.links,function(ne){return ne.source.y0});Se.links.forEach(function(ne){ne.circular&&(ne.circularPathData={})});var oe=Se.links.filter(function(ne){return ne.circularLinkType=="top"});k(oe,Ce,Ue);var le=Se.links.filter(function(ne){return ne.circularLinkType=="bottom"});k(le,Ce,Ue),Se.links.forEach(function(ne){if(ne.circular){if(ne.circularPathData.arcRadius=ne.width+h,ne.circularPathData.leftNodeBuffer=xe,ne.circularPathData.rightNodeBuffer=xe,ne.circularPathData.sourceWidth=ne.source.x1-ne.source.x0,ne.circularPathData.sourceX=ne.source.x0+ne.circularPathData.sourceWidth,ne.circularPathData.targetX=ne.target.x0,ne.circularPathData.sourceY=ne.y0,ne.circularPathData.targetY=ne.y1,ye(ne,Ue)&&D(ne))ne.circularPathData.leftSmallArcRadius=h+ne.width/2,ne.circularPathData.leftLargeArcRadius=h+ne.width/2,ne.circularPathData.rightSmallArcRadius=h+ne.width/2,ne.circularPathData.rightLargeArcRadius=h+ne.width/2,ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=ne.source.y1+m+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=ne.source.y0-m-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius);else{var be=ne.source.column,Fe=ne.circularLinkType,Ve=Se.links.filter(function(st){return st.source.column==be&&st.circularLinkType==Fe});ne.circularLinkType=="bottom"?Ve.sort(ee):Ve.sort(Y);var je=0;Ve.forEach(function(st,yt){st.circularLinkID==ne.circularLinkID&&(ne.circularPathData.leftSmallArcRadius=h+ne.width/2+je,ne.circularPathData.leftLargeArcRadius=h+ne.width/2+yt*Ce+je),je=je+st.width}),be=ne.target.column,Ve=Se.links.filter(function(st){return st.target.column==be&&st.circularLinkType==Fe}),ne.circularLinkType=="bottom"?Ve.sort(ae):Ve.sort(te),je=0,Ve.forEach(function(st,yt){st.circularLinkID==ne.circularLinkID&&(ne.circularPathData.rightSmallArcRadius=h+ne.width/2+je,ne.circularPathData.rightLargeArcRadius=h+ne.width/2+yt*Ce+je),je=je+st.width}),ne.circularLinkType=="bottom"?(ne.circularPathData.verticalFullExtent=Math.max(qe,ne.source.y1,ne.target.y1)+m+ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent-ne.circularPathData.rightLargeArcRadius):(ne.circularPathData.verticalFullExtent=he-m-ne.circularPathData.verticalBuffer,ne.circularPathData.verticalLeftInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.leftLargeArcRadius,ne.circularPathData.verticalRightInnerExtent=ne.circularPathData.verticalFullExtent+ne.circularPathData.rightLargeArcRadius)}ne.circularPathData.leftInnerExtent=ne.circularPathData.sourceX+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightInnerExtent=ne.circularPathData.targetX-ne.circularPathData.rightNodeBuffer,ne.circularPathData.leftFullExtent=ne.circularPathData.sourceX+ne.circularPathData.leftLargeArcRadius+ne.circularPathData.leftNodeBuffer,ne.circularPathData.rightFullExtent=ne.circularPathData.targetX-ne.circularPathData.rightLargeArcRadius-ne.circularPathData.rightNodeBuffer}if(ne.circular)ne.path=O(ne);else{var ut=S.linkHorizontal().source(function(st){var yt=st.source.x0+(st.source.x1-st.source.x0),At=st.y0;return[yt,At]}).target(function(st){var yt=st.target.x0,At=st.y1;return[yt,At]});ne.path=ut(ne)}})}function O(Se){var Ce="";return Se.circularLinkType=="top"?Ce="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 0 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY-Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 0 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 0 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY-Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 0 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY:Ce="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 1 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY+Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 1 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 1 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY+Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 1 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY,Ce}function q(Se,Ce){return U(Se)==U(Ce)?Se.circularLinkType=="bottom"?ee(Se,Ce):Y(Se,Ce):U(Ce)-U(Se)}function Y(Se,Ce){return Se.y0-Ce.y0}function ee(Se,Ce){return Ce.y0-Se.y0}function te(Se,Ce){return Se.y1-Ce.y1}function ae(Se,Ce){return Ce.y1-Se.y1}function U(Se){return Se.target.column-Se.source.column}function H(Se){return Se.target.x0-Se.source.x1}function K(Se,Ce){var qe=F(Se),Ue=H(Ce)/Math.tan(qe),xe=me(Se)=="up"?Se.y1+Ue:Se.y1-Ue;return xe}function V(Se,Ce){var qe=F(Se),Ue=H(Ce)/Math.tan(qe),xe=me(Se)=="up"?Se.y1-Ue:Se.y1+Ue;return xe}function $(Se,Ce,qe,Ue){Se.links.forEach(function(xe){if(!xe.circular&&xe.target.column-xe.source.column>1){var he=xe.source.column+1,oe=xe.target.column-1,le=1,ne=oe-he+1;for(le=1;he<=oe;he++,le++)Se.nodes.forEach(function(be){if(be.column==he){var Fe=le/(ne+1),Ve=Math.pow(1-Fe,3),je=3*Fe*Math.pow(1-Fe,2),ut=3*Math.pow(Fe,2)*(1-Fe),st=Math.pow(Fe,3),yt=Ve*xe.y0+je*xe.y0+ut*xe.y1+st*xe.y1,At=yt-xe.width/2,Pt=yt+xe.width/2,Zt;At>be.y0&&Atbe.y0&&Ptbe.y1&&Z(vr,Zt,Ce,qe)})):Atbe.y1&&(Zt=Pt-be.y0+10,be=Z(be,Zt,Ce,qe),Se.nodes.forEach(function(vr){A(vr,Ue)==A(be,Ue)||vr.column!=be.column||vr.y0be.y1&&Z(vr,Zt,Ce,qe)}))}})}})}function X(Se,Ce){return Se.y0>Ce.y0&&Se.y0Ce.y0&&Se.y1Ce.y1}function Z(Se,Ce,qe,Ue){return Se.y0+Ce>=qe&&Se.y1+Ce<=Ue&&(Se.y0=Se.y0+Ce,Se.y1=Se.y1+Ce,Se.targetLinks.forEach(function(xe){xe.y1=xe.y1+Ce}),Se.sourceLinks.forEach(function(xe){xe.y0=xe.y0+Ce})),Se}function Q(Se,Ce,qe,Ue){Se.nodes.forEach(function(xe){Ue&&xe.y+(xe.y1-xe.y0)>Ce&&(xe.y=xe.y-(xe.y+(xe.y1-xe.y0)-Ce));var he=Se.links.filter(function(ne){return A(ne.source,qe)==A(xe,qe)}),oe=he.length;oe>1&&he.sort(function(ne,be){if(!ne.circular&&!be.circular){if(ne.target.column==be.target.column)return ne.y1-be.y1;if(ce(ne,be)){if(ne.target.column>be.target.column){var Fe=V(be,ne);return ne.y1-Fe}if(be.target.column>ne.target.column){var Ve=V(ne,be);return Ve-be.y1}}else return ne.y1-be.y1}if(ne.circular&&!be.circular)return ne.circularLinkType=="top"?-1:1;if(be.circular&&!ne.circular)return be.circularLinkType=="top"?1:-1;if(ne.circular&&be.circular)return ne.circularLinkType===be.circularLinkType&&ne.circularLinkType=="top"?ne.target.column===be.target.column?ne.target.y1-be.target.y1:be.target.column-ne.target.column:ne.circularLinkType===be.circularLinkType&&ne.circularLinkType=="bottom"?ne.target.column===be.target.column?be.target.y1-ne.target.y1:ne.target.column-be.target.column:ne.circularLinkType=="top"?-1:1});var le=xe.y0;he.forEach(function(ne){ne.y0=le+ne.width/2,le=le+ne.width}),he.forEach(function(ne,be){if(ne.circularLinkType=="bottom"){var Fe=be+1,Ve=0;for(Fe;Fe1&&xe.sort(function(le,ne){if(!le.circular&&!ne.circular){if(le.source.column==ne.source.column)return le.y0-ne.y0;if(ce(le,ne)){if(ne.source.column0?"up":"down"}function ye(Se,Ce){return A(Se.source,Ce)==A(Se.target,Ce)}function Ae(Se,Ce,qe){var Ue=Se.nodes,xe=Se.links,he=!1,oe=!1;if(xe.forEach(function(je){je.circularLinkType=="top"?he=!0:je.circularLinkType=="bottom"&&(oe=!0)}),he==!1||oe==!1){var le=v.min(Ue,function(je){return je.y0}),ne=v.max(Ue,function(je){return je.y1}),be=ne-le,Fe=qe-Ce,Ve=Fe/be;Ue.forEach(function(je){var ut=(je.y1-je.y0)*Ve;je.y0=(je.y0-le)*Ve,je.y1=je.y0+ut}),xe.forEach(function(je){je.y0=(je.y0-le)*Ve,je.y1=(je.y1-le)*Ve,je.width=je.width*Ve})}}u.sankeyCircular=_,u.sankeyCenter=n,u.sankeyLeft=t,u.sankeyRight=a,u.sankeyJustify=r,Object.defineProperty(u,"__esModule",{value:!0})})}}),w6=De({"src/traces/sankey/constants.js"(j,N){"use strict";N.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),IU=De({"src/traces/sankey/render.js"(j,N){"use strict";var u=kU(),v=(Hp(),ts(rp)).interpolateNumber,w=Qn(),S=LU(),l=RU(),e=w6(),t=ii(),a=Ki(),r=Ar(),n=r.strTranslate,i=r.strRotate,s=Fd(),c=s.keyFun,p=s.repeat,f=s.unwrap,d=Xs(),y=hi(),o=yc(),x=o.CAP_SHIFT,M=o.LINE_SPACING,T=3;function E(H,K,V){var $=f(K),X=$.trace,Z=X.domain,Q=X.orientation==="h",re=X.node.pad,ce=X.node.thickness,me={justify:S.sankeyJustify,left:S.sankeyLeft,right:S.sankeyRight,center:S.sankeyCenter}[X.node.align],ye=H.width*(Z.x[1]-Z.x[0]),Ae=H.height*(Z.y[1]-Z.y[0]),Se=$._nodes,Ce=$._links,qe=$.circular,Ue;qe?Ue=l.sankeyCircular().circularLinkGap(0):Ue=S.sankey(),Ue.iterations(e.sankeyIterations).size(Q?[ye,Ae]:[Ae,ye]).nodeWidth(ce).nodePadding(re).nodeId(function(vr){return vr.pointNumber}).nodeAlign(me).nodes(Se).links(Ce);function xe(vr){X[vr].sort==="input"&&(qe?r.warn(`Circular Sankey diagrams do not support the "input" ${vr}.sort mode; falling back to the default sort.`):Ue[`${vr}Sort`](null))}xe("link"),xe("node");var he=Ue();Ue.nodePadding()=Ee||(nt=Ee-Kt.y0,nt>1e-6&&(Kt.y0+=nt,Kt.y1+=nt)),Ee=Kt.y1+re})}function yt(vr){var Nt=vr.map(function(Ie,Be){return{x0:Ie.x0,index:Be}}).sort(function(Ie,Be){return Ie.x0-Be.x0}),Kt=[],nt=-1,Ee,ze=-1/0,ve;for(oe=0;oeze+ce&&(nt+=1,Ee=_e.x0),ze=_e.x0,Kt[nt]||(Kt[nt]=[]),Kt[nt].push(_e),ve=Ee-_e.x0,_e.x0+=ve,_e.x1+=ve}return Kt}if(X.node.x.length&&X.node.y.length){for(oe=0;oe0?" L "+X.targetX+" "+X.targetY:"")+"Z"):(V="M "+(X.targetX-K)+" "+(X.targetY-$)+" L "+(X.rightInnerExtent-K)+" "+(X.targetY-$)+" A "+(X.rightLargeArcRadius+$)+" "+(X.rightSmallArcRadius+$)+" 0 0 0 "+(X.rightFullExtent-$-K)+" "+(X.targetY+X.rightSmallArcRadius)+" L "+(X.rightFullExtent-$-K)+" "+X.verticalRightInnerExtent,Z&&Q?V+=" A "+(X.rightLargeArcRadius+$)+" "+(X.rightLargeArcRadius+$)+" 0 0 0 "+(X.rightInnerExtent-$-K)+" "+(X.verticalFullExtent+$)+" L "+(X.rightFullExtent+$-K-(X.rightLargeArcRadius-$))+" "+(X.verticalFullExtent+$)+" A "+(X.rightLargeArcRadius+$)+" "+(X.rightLargeArcRadius+$)+" 0 0 0 "+(X.leftFullExtent+$)+" "+X.verticalLeftInnerExtent:Z?V+=" A "+(X.rightLargeArcRadius-$)+" "+(X.rightSmallArcRadius-$)+" 0 0 1 "+(X.rightFullExtent-K-$-(X.rightLargeArcRadius-$))+" "+(X.verticalFullExtent-$)+" L "+(X.leftFullExtent+$+(X.rightLargeArcRadius-$))+" "+(X.verticalFullExtent-$)+" A "+(X.rightLargeArcRadius-$)+" "+(X.rightSmallArcRadius-$)+" 0 0 1 "+(X.leftFullExtent+$)+" "+X.verticalLeftInnerExtent:V+=" A "+(X.rightLargeArcRadius+$)+" "+(X.rightLargeArcRadius+$)+" 0 0 0 "+(X.rightInnerExtent-K)+" "+(X.verticalFullExtent+$)+" L "+X.leftInnerExtent+" "+(X.verticalFullExtent+$)+" A "+(X.leftLargeArcRadius+$)+" "+(X.leftLargeArcRadius+$)+" 0 0 0 "+(X.leftFullExtent+$)+" "+X.verticalLeftInnerExtent,V+=" L "+(X.leftFullExtent+$)+" "+(X.sourceY+X.leftSmallArcRadius)+" A "+(X.leftLargeArcRadius+$)+" "+(X.leftSmallArcRadius+$)+" 0 0 0 "+X.leftInnerExtent+" "+(X.sourceY-$)+" L "+X.sourceX+" "+(X.sourceY-$)+" L "+X.sourceX+" "+(X.sourceY+$)+" L "+X.leftInnerExtent+" "+(X.sourceY+$)+" A "+(X.leftLargeArcRadius-$)+" "+(X.leftSmallArcRadius-$)+" 0 0 1 "+(X.leftFullExtent-$)+" "+(X.sourceY+X.leftSmallArcRadius)+" L "+(X.leftFullExtent-$)+" "+X.verticalLeftInnerExtent,Z&&Q?V+=" A "+(X.rightLargeArcRadius-$)+" "+(X.rightSmallArcRadius-$)+" 0 0 1 "+(X.leftFullExtent-$-(X.rightLargeArcRadius-$))+" "+(X.verticalFullExtent-$)+" L "+(X.rightFullExtent+$-K+(X.rightLargeArcRadius-$))+" "+(X.verticalFullExtent-$)+" A "+(X.rightLargeArcRadius-$)+" "+(X.rightSmallArcRadius-$)+" 0 0 1 "+(X.rightFullExtent+$-K)+" "+X.verticalRightInnerExtent:Z?V+=" A "+(X.rightLargeArcRadius+$)+" "+(X.rightLargeArcRadius+$)+" 0 0 0 "+(X.leftFullExtent+$)+" "+(X.verticalFullExtent+$)+" L "+(X.rightFullExtent-K-$)+" "+(X.verticalFullExtent+$)+" A "+(X.rightLargeArcRadius+$)+" "+(X.rightLargeArcRadius+$)+" 0 0 0 "+(X.rightFullExtent+$-K)+" "+X.verticalRightInnerExtent:V+=" A "+(X.leftLargeArcRadius-$)+" "+(X.leftLargeArcRadius-$)+" 0 0 1 "+X.leftInnerExtent+" "+(X.verticalFullExtent-$)+" L "+(X.rightInnerExtent-K)+" "+(X.verticalFullExtent-$)+" A "+(X.rightLargeArcRadius-$)+" "+(X.rightLargeArcRadius-$)+" 0 0 1 "+(X.rightFullExtent+$-K)+" "+X.verticalRightInnerExtent,V+=" L "+(X.rightFullExtent+$-K)+" "+(X.targetY+X.rightSmallArcRadius)+" A "+(X.rightLargeArcRadius-$)+" "+(X.rightSmallArcRadius-$)+" 0 0 1 "+(X.rightInnerExtent-K)+" "+(X.targetY+$)+" L "+(X.targetX-K)+" "+(X.targetY+$)+(K>0?" L "+X.targetX+" "+X.targetY:"")+"Z"),V}function m(){var H=.5;function K(V){var $=V.linkArrowLength;if(V.link.circular)return A(V.link,$);var X=Math.abs((V.link.target.x0-V.link.source.x1)/2);$>X&&($=X);var Z=V.link.source.x1,Q=V.link.target.x0-$,re=v(Z,Q),ce=re(H),me=re(1-H),ye=V.link.y0-V.link.width/2,Ae=V.link.y0+V.link.width/2,Se=V.link.y1-V.link.width/2,Ce=V.link.y1+V.link.width/2,qe="M"+Z+","+ye,Ue="C"+ce+","+ye+" "+me+","+Se+" "+Q+","+Se,xe="C"+me+","+Ce+" "+ce+","+Ae+" "+Z+","+Ae,he=$>0?"L"+(Q+$)+","+(Se+V.link.width/2):"";return he+="L"+Q+","+Ce,qe+Ue+he+xe+"Z"}return K}function h(H,K){var V=e.nodePadAcross,$=H.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var X=K.dx,Z=Math.max(.5,K.dy),Q="node_"+K.pointNumber;return K.group&&(Q=r.randstr()),K.trace=H.trace,K.curveNumber=H.trace.index,{index:K.pointNumber,key:Q,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:H.key,trace:H.trace,node:K,nodePad:H.nodePad,nodeLineColor:H.nodeLineColor,nodeLineWidth:H.nodeLineWidth,textFont:H.textFont,size:H.horizontal?H.height:H.width,visibleWidth:Math.ceil(X),visibleHeight:Z,zoneX:-V,zoneY:-$,zoneWidth:X+2*V,zoneHeight:Z+2*$,labelY:H.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:H.width,forceLayouts:H.forceLayouts,horizontal:H.horizontal,darkBackground:t.color(K.color).isDark(),rgb:t.rgb(K.color),alpha:t.color(K.color).alpha(),valueFormat:H.valueFormat,valueSuffix:H.valueSuffix,sankey:H.sankey,graph:H.graph,arrangement:H.arrangement,uniqueNodeLabelPathId:[H.guid,H.key,Q].join("_"),interactionState:H.interactionState,figure:H}}function b(H){H.attr("transform",function(K){return n(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function _(H){H.call(b)}function I(H,K){H.call(_),K.attr("d",m())}function C(H){H.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function F(H){return H.link.width>1||H.linkLineWidth>0}function R(H){var K=n(H.translateX,H.translateY);return K+(H.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function z(H,K,V){H.on(".basic",null).on("mouseover.basic",function($){!$.interactionState.dragInProgress&&!$.partOfGroup&&(V.hover(this,$,K),$.interactionState.hovered=[this,$])}).on("mousemove.basic",function($){!$.interactionState.dragInProgress&&!$.partOfGroup&&(V.follow(this,$),$.interactionState.hovered=[this,$])}).on("mouseout.basic",function($){!$.interactionState.dragInProgress&&!$.partOfGroup&&(V.unhover(this,$,K),$.interactionState.hovered=!1)}).on("click.basic",function($){$.interactionState.hovered&&(V.unhover(this,$,K),$.interactionState.hovered=!1),!$.interactionState.dragInProgress&&!$.partOfGroup&&V.select(this,$,K)})}function D(H,K,V,$){var X=w.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(r.ensureSingle($._fullLayout._infolayer,"g","dragcover",function(re){$._fullLayout._dragCover=re}),r.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,ee(Z.node),Z.interactionState.hovered&&(V.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var Q=Z.traceId+"|"+Z.key;Z.forceLayouts[Q]?Z.forceLayouts[Q].alpha(1):k(H,Q,Z,$),B(H,K,Z,Q,$)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var Q=w.event.x,re=w.event.y;Z.arrangement==="snap"?(Z.node.x0=Q-Z.visibleWidth/2,Z.node.x1=Q+Z.visibleWidth/2,Z.node.y0=re-Z.visibleHeight/2,Z.node.y1=re+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=Q-Z.visibleWidth/2,Z.node.x1=Q+Z.visibleWidth/2),re=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,re)),Z.node.y0=re-Z.visibleHeight/2,Z.node.y1=re+Z.visibleHeight/2),ee(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),I(H.filter(te(Z)),K))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var Q=0;Q0)window.requestAnimationFrame(Z);else{var ce=V.node.originalX;V.node.x0=ce-V.visibleWidth/2,V.node.x1=ce+V.visibleWidth/2,q(V,X)}})}function O(H,K,V,$){return function(){for(var Z=0,Q=0;Q0&&$.forceLayouts[K].alpha(0)}}function q(H,K){for(var V=[],$=[],X=0;XF(xe)?t.rgb(xe.linkLineColor):xe.rgb).style("stroke-opacity",xe=>F(xe)?t.opacity(xe.linkLineColor):xe.alpha).style("fill",xe=>xe.rgb).style("fill-opacity",xe=>xe.alpha).style("stroke-width",xe=>F(xe)?xe.linkLineWidth:1).attr("d",m()),Ae.style("opacity",function(){return H._context.staticPlot||Q||re?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Ae.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Se=me.selectAll("."+e.cn.sankeyNodeSet).data(p,c);Se.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Se.style("cursor",function(xe){switch(xe.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ce=Se.selectAll("."+e.cn.sankeyNode).data(function(xe){var he=xe.graph.nodes;return Y(he),he.map(h.bind(null,xe))},c);Ce.enter().append("g").classed(e.cn.sankeyNode,!0).call(b).style("opacity",function(xe){return(H._context.staticPlot||Q)&&!xe.partOfGroup?1:0}),Ce.call(z,me,X.nodeEvents).call(D,Ae,X,H),Ce.transition().ease(e.ease).duration(e.duration).call(b).style("opacity",function(xe){return xe.partOfGroup?0:1}),Ce.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var qe=Ce.selectAll("."+e.cn.nodeRect).data(p);qe.enter().append("rect").classed(e.cn.nodeRect,!0).call(C),qe.style("stroke-width",function(xe){return xe.nodeLineWidth}).style("stroke",function(xe){return t.rgb(xe.nodeLineColor)}).style("stroke-opacity",function(xe){return t.opacity(xe.nodeLineColor)}).style("fill",xe=>xe.rgb).style("fill-opacity",xe=>xe.alpha),qe.transition().ease(e.ease).duration(e.duration).call(C);var Ue=Ce.selectAll("."+e.cn.nodeLabel).data(p);Ue.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),Ue.attr("data-notex",1).text(function(xe){return xe.node.label}).each(function(xe){var he=w.select(this);a.font(he,xe.textFont),d.convertToTspans(he,H)}).attr("text-anchor",function(xe){return xe.horizontal&&xe.left?"end":"start"}).attr("transform",function(xe){var he=w.select(this),oe=d.lineCount(he),le=xe.textFont.size*((oe-1)*M-x),ne=xe.nodeLineWidth/2+T,be=((xe.horizontal?xe.visibleHeight:xe.visibleWidth)-le)/2;xe.horizontal&&(xe.left?ne=-ne:ne+=xe.visibleWidth);var Fe=xe.horizontal?"":"scale(-1,1)"+i(90);return n(xe.horizontal?ne:be,xe.horizontal?be:ne)+Fe}),Ue.transition().ease(e.ease).duration(e.duration)}}}),A6=De({"src/traces/sankey/plot.js"(j,N){"use strict";var u=Qn(),v=Ar(),w=v.numberFormat,S=IU(),l=uu(),e=ii(),t=w6().cn,a=v._;function r(M){return M!==""}function n(M,T){return M.filter(function(E){return E.key===T.traceId})}function i(M,T){u.select(M).select("path").style("fill-opacity",T),u.select(M).select("rect").style("fill-opacity",T)}function s(M){u.select(M).select("text.name").style("fill","black")}function c(M){return function(T){return M.node.sourceLinks.indexOf(T.link)!==-1||M.node.targetLinks.indexOf(T.link)!==-1}}function p(M){return function(T){return T.node.sourceLinks.indexOf(M.link)!==-1||T.node.targetLinks.indexOf(M.link)!==-1}}function f(M,T,E){T&&E&&n(E,T).selectAll("."+t.sankeyLink).filter(c(T)).call(y.bind(0,T,E,!1))}function d(M,T,E){T&&E&&n(E,T).selectAll("."+t.sankeyLink).filter(c(T)).call(o.bind(0,T,E,!1))}function y(M,T,E,g){g.style("fill",function(A){if(!A.link.concentrationscale)return A.hoverRgb}).style("fill-opacity",function(A){if(!A.link.concentrationscale)return A.hoverAlpha}),g.each(function(A){var m=A.link.label;m!==""&&n(T,M).selectAll("."+t.sankeyLink).filter(function(h){return h.link.label===m}).style("fill",function(h){if(!h.link.concentrationscale)return h.hoverRgb}).style("fill-opacity",function(h){if(!h.link.concentrationscale)return h.hoverAlpha})}),E&&n(T,M).selectAll("."+t.sankeyNode).filter(p(M)).call(f)}function o(M,T,E,g){g.style("fill",function(A){return A.rgb}).style("fill-opacity",function(A){return A.alpha}),g.each(function(A){var m=A.link.label;m!==""&&n(T,M).selectAll("."+t.sankeyLink).filter(function(h){return h.link.label===m}).style("fill",h=>h.rgb).style("fill-opacity",h=>h.alpha)}),E&&n(T,M).selectAll(t.sankeyNode).filter(p(M)).call(d)}function x(M,T){var E=M.hoverlabel||{},g=v.nestedProperty(E,T).get();return Array.isArray(g)?!1:g}N.exports=function(T,E){for(var g=T._fullLayout,A=g._paper,m=g._size,h=0;h"),color:x(U,"bgcolor")||e.addOpacity(X.color,1),borderColor:x(U,"bordercolor"),fontFamily:x(U,"font.family"),fontSize:x(U,"font.size"),fontColor:x(U,"font.color"),fontWeight:x(U,"font.weight"),fontStyle:x(U,"font.style"),fontVariant:x(U,"font.variant"),fontTextcase:x(U,"font.textcase"),fontLineposition:x(U,"font.lineposition"),fontShadow:x(U,"font.shadow"),nameLength:x(U,"namelength"),textAlign:x(U,"align"),idealAlign:u.event.x"),color:x(U,"bgcolor")||ae.rgb,borderColor:x(U,"bordercolor"),fontFamily:x(U,"font.family"),fontSize:x(U,"font.size"),fontColor:x(U,"font.color"),fontWeight:x(U,"font.weight"),fontStyle:x(U,"font.style"),fontVariant:x(U,"font.variant"),fontTextcase:x(U,"font.textcase"),fontLineposition:x(U,"font.lineposition"),fontShadow:x(U,"font.shadow"),nameLength:x(U,"namelength"),textAlign:x(U,"align"),idealAlign:"left",hovertemplate:U.hovertemplate,hovertemplateLabels:Q,eventData:[ae.node]},{container:g._hoverlayer.node(),outerContainer:g._paper.node(),gd:T});i(me,.85),s(me)}}},ee=function(te,ae,U){T._fullLayout.hovermode!==!1&&(u.select(te).call(d,ae,U),ae.node.trace.node.hoverinfo!=="skip"&&(ae.node.fullData=ae.node.trace,T.emit("plotly_unhover",{event:u.event,points:[ae.node]})),l.loneUnhover(g._hoverlayer.node()))};S(T,A,E,{width:m.w,height:m.h,margin:{t:m.t,r:m.r,b:m.b,l:m.l}},{linkEvents:{hover:I,follow:k,unhover:B,select:_},nodeEvents:{hover:q,follow:Y,unhover:ee,select:O}})}}}),DU=De({"src/traces/sankey/base_plot.js"(j){"use strict";var N=Ul().overrideAll,u=Bf().getModuleCalcData,v=A6(),w=Ov(),S=ld(),l=dh(),e=Sc().prepSelect,t=Ar(),a=hi(),r="sankey";j.name=r,j.baseLayoutAttrOverrides=N({hoverlabel:w.hoverlabel},"plot","nested"),j.plot=function(i){var s=u(i.calcdata,r)[0];v(i,s),j.updateFx(i)},j.clean=function(i,s,c,p){var f=p._has&&p._has(r),d=s._has&&s._has(r);f&&!d&&(p._paperdiv.selectAll(".sankey").remove(),p._paperdiv.selectAll(".bgsankey").remove())},j.updateFx=function(i){for(var s=0;s0}N.exports=function(R,z,D,k){var B=R._fullLayout,O;M(D)&&k&&(O=k()),S.makeTraceGroups(B._indicatorlayer,z,"trace").each(function(q){var Y=q[0],ee=Y.trace,te=u.select(this),ae=ee._hasGauge,U=ee._isAngular,H=ee._isBullet,K=ee.domain,V={w:B._size.w*(K.x[1]-K.x[0]),h:B._size.h*(K.y[1]-K.y[0]),l:B._size.l+B._size.w*K.x[0],r:B._size.r+B._size.w*(1-K.x[1]),t:B._size.t+B._size.h*(1-K.y[1]),b:B._size.b+B._size.h*K.y[0]},$=V.l+V.w/2,X=V.t+V.h/2,Z=Math.min(V.w/2,V.h),Q=n.innerRadius*Z,re,ce,me,ye=ee.align||"center";if(ce=X,!ae)re=V.l+o[ye]*V.w,me=function(ne){return b(ne,V.w,V.h)};else if(U&&(re=$,ce=X+Z/2,me=function(ne){return _(ne,.9*Q)}),H){var Ae=n.bulletPadding,Se=1-n.bulletNumberDomainSize+Ae;re=V.l+(Se+(1-Se)*o[ye])*V.w,me=function(ne){return b(ne,(n.bulletNumberDomainSize-Ae)*V.w,V.h)}}g(R,te,q,{numbersX:re,numbersY:ce,numbersScaler:me,transitionOpts:D,onComplete:O});var Ce,qe;ae&&(Ce={range:ee.gauge.axis.range,color:ee.gauge.bgcolor,line:{color:ee.gauge.bordercolor,width:0},thickness:1},qe={range:ee.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:ee.gauge.bordercolor,width:ee.gauge.borderwidth},thickness:1});var Ue=te.selectAll("g.angular").data(U?q:[]);Ue.exit().remove();var xe=te.selectAll("g.angularaxis").data(U?q:[]);xe.exit().remove(),U&&E(R,te,q,{radius:Z,innerRadius:Q,gauge:Ue,layer:xe,size:V,gaugeBg:Ce,gaugeOutline:qe,transitionOpts:D,onComplete:O});var he=te.selectAll("g.bullet").data(H?q:[]);he.exit().remove();var oe=te.selectAll("g.bulletaxis").data(H?q:[]);oe.exit().remove(),H&&T(R,te,q,{gauge:he,layer:oe,size:V,gaugeBg:Ce,gaugeOutline:qe,transitionOpts:D,onComplete:O});var le=te.selectAll("text.title").data(q);le.exit().remove(),le.enter().append("text").classed("title",!0),le.attr("text-anchor",function(){return H?y.right:y[ee.title.align]}).text(ee.title.text).call(r.font,ee.title.font).call(i.convertToTspans,R),le.attr("transform",function(){var ne=V.l+V.w*o[ee.title.align],be,Fe=n.titlePadding,Ve=r.bBox(le.node());if(ae){if(U)if(ee.gauge.axis.visible){var je=r.bBox(xe.node());be=je.top-Fe-Ve.bottom}else be=V.t+V.h/2-Z/2-Ve.bottom-Fe;H&&(be=ce-(Ve.top+Ve.bottom)/2,ne=V.l-n.bulletPadding*V.w)}else be=ee._numbersTop-Fe-Ve.bottom;return e(ne,be)})})};function T(F,R,z,D){var k=z[0].trace,B=D.gauge,O=D.layer,q=D.gaugeBg,Y=D.gaugeOutline,ee=D.size,te=k.domain,ae=D.transitionOpts,U=D.onComplete,H,K,V,$,X;B.enter().append("g").classed("bullet",!0),B.attr("transform",e(ee.l,ee.t)),O.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),O.selectAll("g.xbulletaxistick,path,text").remove();var Z=ee.h,Q=k.gauge.bar.thickness*Z,re=te.x[0],ce=te.x[0]+(te.x[1]-te.x[0])*(k._hasNumber||k._hasDelta?1-n.bulletNumberDomainSize:1);H=h(F,k.gauge.axis),H._id="xbulletaxis",H.domain=[re,ce],H.setScale(),K=s.calcTicks(H),V=s.makeTransTickFn(H),$=s.getTickSigns(H)[2],X=ee.t+ee.h,H.visible&&(s.drawTicks(F,H,{vals:H.ticks==="inside"?s.clipEnds(H,K):K,layer:O,path:s.makeTickPath(H,X,$),transFn:V}),s.drawLabels(F,H,{vals:K,layer:O,transFn:V,labelFns:s.makeLabelFns(H,X)}));function me(xe){xe.attr("width",function(he){return Math.max(0,H.c2p(he.range[1])-H.c2p(he.range[0]))}).attr("x",function(he){return H.c2p(he.range[0])}).attr("y",function(he){return .5*(1-he.thickness)*Z}).attr("height",function(he){return he.thickness*Z})}var ye=[q].concat(k.gauge.steps),Ae=B.selectAll("g.bg-bullet").data(ye);Ae.enter().append("g").classed("bg-bullet",!0).append("rect"),Ae.select("rect").call(me).call(A),Ae.exit().remove();var Se=B.selectAll("g.value-bullet").data([k.gauge.bar]);Se.enter().append("g").classed("value-bullet",!0).append("rect"),Se.select("rect").attr("height",Q).attr("y",(Z-Q)/2).call(A),M(ae)?Se.select("rect").transition().duration(ae.duration).ease(ae.easing).each("end",function(){U&&U()}).each("interrupt",function(){U&&U()}).attr("width",Math.max(0,H.c2p(Math.min(k.gauge.axis.range[1],z[0].y)))):Se.select("rect").attr("width",typeof z[0].y=="number"?Math.max(0,H.c2p(Math.min(k.gauge.axis.range[1],z[0].y))):0),Se.exit().remove();var Ce=z.filter(function(){return k.gauge.threshold.value||k.gauge.threshold.value===0}),qe=B.selectAll("g.threshold-bullet").data(Ce);qe.enter().append("g").classed("threshold-bullet",!0).append("line"),qe.select("line").attr("x1",H.c2p(k.gauge.threshold.value)).attr("x2",H.c2p(k.gauge.threshold.value)).attr("y1",(1-k.gauge.threshold.thickness)/2*Z).attr("y2",(1-(1-k.gauge.threshold.thickness)/2)*Z).call(d.stroke,k.gauge.threshold.line.color).style("stroke-width",k.gauge.threshold.line.width),qe.exit().remove();var Ue=B.selectAll("g.gauge-outline").data([Y]);Ue.enter().append("g").classed("gauge-outline",!0).append("rect"),Ue.select("rect").call(me).call(A),Ue.exit().remove()}function E(F,R,z,D){var k=z[0].trace,B=D.size,O=D.radius,q=D.innerRadius,Y=D.gaugeBg,ee=D.gaugeOutline,te=[B.l+B.w/2,B.t+B.h/2+O/2],ae=D.gauge,U=D.layer,H=D.transitionOpts,K=D.onComplete,V=Math.PI/2;function $(ut){var st=k.gauge.axis.range[0],yt=k.gauge.axis.range[1],At=(ut-st)/(yt-st)*Math.PI-V;return At<-V?-V:At>V?V:At}function X(ut){return u.svg.arc().innerRadius((q+O)/2-ut/2*(O-q)).outerRadius((q+O)/2+ut/2*(O-q)).startAngle(-V)}function Z(ut){ut.attr("d",function(st){return X(st.thickness).startAngle($(st.range[0])).endAngle($(st.range[1]))()})}var Q,re,ce,me;ae.enter().append("g").classed("angular",!0),ae.attr("transform",e(te[0],te[1])),U.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),U.selectAll("g.xangularaxistick,path,text").remove(),Q=h(F,k.gauge.axis),Q.type="linear",Q.range=k.gauge.axis.range,Q._id="xangularaxis",Q.ticklabeloverflow="allow",Q.setScale();var ye=function(ut){return(Q.range[0]-ut.x)/(Q.range[1]-Q.range[0])*Math.PI+Math.PI},Ae={},Se=s.makeLabelFns(Q,0),Ce=Se.labelStandoff;Ae.xFn=function(ut){var st=ye(ut);return Math.cos(st)*Ce},Ae.yFn=function(ut){var st=ye(ut),yt=Math.sin(st)>0?.2:1;return-Math.sin(st)*(Ce+ut.fontSize*yt)+Math.abs(Math.cos(st))*(ut.fontSize*a)},Ae.anchorFn=function(ut){var st=ye(ut),yt=Math.cos(st);return Math.abs(yt)<.1?"middle":yt>0?"start":"end"},Ae.heightFn=function(ut,st,yt){var At=ye(ut);return-.5*(1+Math.sin(At))*yt};var qe=function(ut){return e(te[0]+O*Math.cos(ut),te[1]-O*Math.sin(ut))};ce=function(ut){return qe(ye(ut))};var Ue=function(ut){var st=ye(ut);return qe(st)+"rotate("+-t(st)+")"};if(re=s.calcTicks(Q),me=s.getTickSigns(Q)[2],Q.visible){me=Q.ticks==="inside"?-1:1;var xe=(Q.linewidth||1)/2;s.drawTicks(F,Q,{vals:re,layer:U,path:"M"+me*xe+",0h"+me*Q.ticklen,transFn:Ue}),s.drawLabels(F,Q,{vals:re,layer:U,transFn:ce,labelFns:Ae})}var he=[Y].concat(k.gauge.steps),oe=ae.selectAll("g.bg-arc").data(he);oe.enter().append("g").classed("bg-arc",!0).append("path"),oe.select("path").call(Z).call(A),oe.exit().remove();var le=X(k.gauge.bar.thickness),ne=ae.selectAll("g.value-arc").data([k.gauge.bar]);ne.enter().append("g").classed("value-arc",!0).append("path");var be=ne.select("path");M(H)?(be.transition().duration(H.duration).ease(H.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",m(le,$(z[0].lastY),$(z[0].y))),k._lastValue=z[0].y):be.attr("d",typeof z[0].y=="number"?le.endAngle($(z[0].y)):"M0,0Z"),be.call(A),ne.exit().remove(),he=[];var Fe=k.gauge.threshold.value;(Fe||Fe===0)&&he.push({range:[Fe,Fe],color:k.gauge.threshold.color,line:{color:k.gauge.threshold.line.color,width:k.gauge.threshold.line.width},thickness:k.gauge.threshold.thickness});var Ve=ae.selectAll("g.threshold-arc").data(he);Ve.enter().append("g").classed("threshold-arc",!0).append("path"),Ve.select("path").call(Z).call(A),Ve.exit().remove();var je=ae.selectAll("g.gauge-outline").data([ee]);je.enter().append("g").classed("gauge-outline",!0).append("path"),je.select("path").call(Z).call(A),je.exit().remove()}function g(F,R,z,D){var k=z[0].trace,B=D.numbersX,O=D.numbersY,q=k.align||"center",Y=y[q],ee=D.transitionOpts,te=D.onComplete,ae=S.ensureSingle(R,"g","numbers"),U,H,K,V=[];k._hasNumber&&V.push("number"),k._hasDelta&&(V.push("delta"),k.delta.position==="left"&&V.reverse());var $=ae.selectAll("text").data(V);$.enter().append("text"),$.attr("text-anchor",function(){return Y}).attr("class",function(qe){return qe}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),$.exit().remove();function X(qe,Ue,xe,he){if(qe.match("s")&&xe>=0!=he>=0&&!Ue(xe).slice(-1).match(x)&&!Ue(he).slice(-1).match(x)){var oe=qe.slice().replace("s","f").replace(/\d+/,function(ne){return parseInt(ne)-1}),le=h(F,{tickformat:oe});return function(ne){return Math.abs(ne)<1?s.tickText(le,ne).text:Ue(ne)}}else return Ue}function Z(){var qe=h(F,{tickformat:k.number.valueformat},k._range);qe.setScale(),s.prepTicks(qe);var Ue=function(ne){return s.tickText(qe,ne).text},xe=k.number.suffix,he=k.number.prefix,oe=ae.select("text.number");function le(){var ne=typeof z[0].y=="number"?he+Ue(z[0].y)+xe:"-";oe.text(ne).call(r.font,k.number.font).call(i.convertToTspans,F)}return M(ee)?oe.transition().duration(ee.duration).ease(ee.easing).each("end",function(){le(),te&&te()}).each("interrupt",function(){le(),te&&te()}).attrTween("text",function(){var ne=u.select(this),be=w(z[0].lastY,z[0].y);k._lastValue=z[0].y;var Fe=X(k.number.valueformat,Ue,z[0].lastY,z[0].y);return function(Ve){ne.text(he+Fe(be(Ve))+xe)}}):le(),U=I(he+Ue(z[0].y)+xe,k.number.font,Y,F),oe}function Q(){var qe=h(F,{tickformat:k.delta.valueformat},k._range);qe.setScale(),s.prepTicks(qe);var Ue=function(Ve){return s.tickText(qe,Ve).text},xe=k.delta.suffix,he=k.delta.prefix,oe=function(Ve){var je=k.delta.relative?Ve.relativeDelta:Ve.delta;return je},le=function(Ve,je){return Ve===0||typeof Ve!="number"||isNaN(Ve)?"-":(Ve>0?k.delta.increasing.symbol:k.delta.decreasing.symbol)+he+je(Ve)+xe},ne=function(Ve){return Ve.delta>=0?k.delta.increasing.color:k.delta.decreasing.color};k._deltaLastValue===void 0&&(k._deltaLastValue=oe(z[0]));var be=ae.select("text.delta");be.call(r.font,k.delta.font).call(d.fill,ne({delta:k._deltaLastValue}));function Fe(){be.text(le(oe(z[0]),Ue)).call(d.fill,ne(z[0])).call(i.convertToTspans,F)}return M(ee)?be.transition().duration(ee.duration).ease(ee.easing).tween("text",function(){var Ve=u.select(this),je=oe(z[0]),ut=k._deltaLastValue,st=X(k.delta.valueformat,Ue,ut,je),yt=w(ut,je);return k._deltaLastValue=je,function(At){Ve.text(le(yt(At),st)),Ve.call(d.fill,ne({delta:yt(At)}))}}).each("end",function(){Fe(),te&&te()}).each("interrupt",function(){Fe(),te&&te()}):Fe(),H=I(le(oe(z[0]),Ue),k.delta.font,Y,F),be}var re=k.mode+k.align,ce;if(k._hasDelta&&(ce=Q(),re+=k.delta.position+k.delta.font.size+k.delta.font.family+k.delta.valueformat,re+=k.delta.increasing.symbol+k.delta.decreasing.symbol,K=H),k._hasNumber&&(Z(),re+=k.number.font.size+k.number.font.family+k.number.valueformat+k.number.suffix+k.number.prefix,K=U),k._hasDelta&&k._hasNumber){var me=[(U.left+U.right)/2,(U.top+U.bottom)/2],ye=[(H.left+H.right)/2,(H.top+H.bottom)/2],Ae,Se,Ce=.75*k.delta.font.size;k.delta.position==="left"&&(Ae=C(k,"deltaPos",0,-1*(U.width*o[k.align]+H.width*(1-o[k.align])+Ce),re,Math.min),Se=me[1]-ye[1],K={width:U.width+H.width+Ce,height:Math.max(U.height,H.height),left:H.left+Ae,right:U.right,top:Math.min(U.top,H.top+Se),bottom:Math.max(U.bottom,H.bottom+Se)}),k.delta.position==="right"&&(Ae=C(k,"deltaPos",0,U.width*(1-o[k.align])+H.width*o[k.align]+Ce,re,Math.max),Se=me[1]-ye[1],K={width:U.width+H.width+Ce,height:Math.max(U.height,H.height),left:U.left,right:H.right+Ae,top:Math.min(U.top,H.top+Se),bottom:Math.max(U.bottom,H.bottom+Se)}),k.delta.position==="bottom"&&(Ae=null,Se=H.height,K={width:Math.max(U.width,H.width),height:U.height+H.height,left:Math.min(U.left,H.left),right:Math.max(U.right,H.right),top:U.bottom-U.height,bottom:U.bottom+H.height}),k.delta.position==="top"&&(Ae=null,Se=U.top,K={width:Math.max(U.width,H.width),height:U.height+H.height,left:Math.min(U.left,H.left),right:Math.max(U.right,H.right),top:U.bottom-U.height-H.height,bottom:U.bottom}),ce.attr({dx:Ae,dy:Se})}(k._hasNumber||k._hasDelta)&&ae.attr("transform",function(){var qe=D.numbersScaler(K);re+=qe[2];var Ue=C(k,"numbersScale",1,qe[0],re,Math.min),xe;k._scaleNumbers||(Ue=1),k._isAngular?xe=O-Ue*K.bottom:xe=O-Ue*(K.top+K.bottom)/2,k._numbersTop=Ue*K.top+xe;var he=K[q];q==="center"&&(he=(K.left+K.right)/2);var oe=B-Ue*he;return oe=C(k,"numbersTranslate",0,oe,re,Math.max),e(oe,xe)+l(Ue)})}function A(F){F.each(function(R){d.stroke(u.select(this),R.line.color)}).each(function(R){d.fill(u.select(this),R.color)}).style("stroke-width",function(R){return R.line.width})}function m(F,R,z){return function(){var D=v(R,z);return function(k){return F.endAngle(D(k))()}}}function h(F,R,z){var D=F._fullLayout,k=S.extendFlat({type:"linear",ticks:"outside",range:z,showline:!0},R),B={type:"linear",_id:"x"+R._id},O={letter:"x",font:D.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function q(Y,ee){return S.coerce(k,B,f,Y,ee)}return c(k,B,q,O,D),p(k,B,q,O),B}function b(F,R,z){var D=Math.min(R/F.width,z/F.height);return[D,F,R+"x"+z]}function _(F,R){var z=Math.sqrt(F.width/2*(F.width/2)+F.height*F.height),D=R/z;return[D,F,R]}function I(F,R,z,D){var k=document.createElementNS("http://www.w3.org/2000/svg","text"),B=u.select(k);return B.text(F).attr("x",0).attr("y",0).attr("text-anchor",z).attr("data-unformatted",F).call(i.convertToTspans,D).call(r.font,R),r.bBox(B.node())}function C(F,R,z,D,k,B){var O="_cache"+R;F[O]&&F[O].key===k||(F[O]={key:k,value:z});var q=S.aggNums(B,null,[F[O].value,D],2);return F[O].value=q,q}}}),qU=De({"src/traces/indicator/index.js"(j,N){"use strict";N.exports={moduleType:"trace",name:"indicator",basePlotModule:OU(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:T6(),supplyDefaults:NU().supplyDefaults,calc:jU().calc,plot:UU(),meta:{}}}}),GU=De({"lib/indicator.js"(j,N){"use strict";N.exports=qU()}}),S6=De({"src/traces/table/attributes.js"(j,N){"use strict";var u=Xv(),v=Ji().extendFlat,w=Ul().overrideAll,S=Ml(),l=ql().attributes,e=Zl().descriptionOnlyNumbers,t=N.exports=w({domain:l({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:v({},u.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:v({},S({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:v({},u.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:v({},S({arrayOk:!0}))}},"calc","from-root")}}),VU=De({"src/traces/table/defaults.js"(j,N){"use strict";var u=Ar(),v=S6(),w=ql().defaults;function S(l,e){for(var t=l.columnorder||[],a=l.header.values.length,r=t.slice(0,a),n=r.slice().sort(function(c,p){return c-p}),i=r.map(function(c){return n.indexOf(c)}),s=i.length;s",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"}}}}),WU=De({"src/traces/table/data_preparation_helper.js"(j,N){"use strict";var u=E6(),v=Ji().extendFlat,w=io(),S=Vf().isTypedArray,l=Vf().isArrayOrTypedArray;N.exports=function(f,d){var y=a(d.cells.values),o=function(Y){return Y.slice(d.header.values.length,Y.length)},x=a(d.header.values);x.length&&!x[0].length&&(x[0]=[""],x=a(x));var M=x.concat(o(y).map(function(){return r((x[0]||[""]).length)})),T=d.domain,E=Math.floor(f._fullLayout._size.w*(T.x[1]-T.x[0])),g=Math.floor(f._fullLayout._size.h*(T.y[1]-T.y[0])),A=d.header.values.length?M[0].map(function(){return d.header.height}):[u.emptyHeaderHeight],m=y.length?y[0].map(function(){return d.cells.height}):[],h=A.reduce(t,0),b=g-h,_=b+u.uplift,I=s(m,_),C=s(A,h),F=i(C,[]),R=i(I,F),z={},D=d.columnorder;l(D)&&(D=Array.from(D)),D=D.concat(o(y.map(function(Y,ee){return ee})));var k=M.map(function(Y,ee){var te=l(d.columnwidth)?d.columnwidth[Math.min(ee,d.columnwidth.length-1)]:d.columnwidth;return w(te)?Number(te):1}),B=k.reduce(t,0);k=k.map(function(Y){return Y/B*E});var O=Math.max(e(d.header.line.width),e(d.cells.line.width)),q={key:d.uid+f._context.staticPlot,translateX:T.x[0]*f._fullLayout._size.w,translateY:f._fullLayout._size.h*(1-T.y[1]),size:f._fullLayout._size,width:E,maxLineWidth:O,height:g,columnOrder:D,groupHeight:g,rowBlocks:R,headerRowBlocks:F,scrollY:0,cells:v({},d.cells,{values:y}),headerCells:v({},d.header,{values:M}),gdColumns:M.map(function(Y){return Y[0]}),gdColumnsOriginalOrder:M.map(function(Y){return Y[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:M.map(function(Y,ee){var te=z[Y];z[Y]=(te||0)+1;var ae=Y+"__"+z[Y];return{key:ae,label:Y,specIndex:ee,xIndex:D[ee],xScale:n,x:void 0,calcdata:void 0,columnWidth:k[ee]}})};return q.columns.forEach(function(Y){Y.calcdata=q,Y.x=n(Y)}),q};function e(p){if(l(p)){for(var f=0,d=0;d=f||g===p.length-1)&&(d[o]=M,M.key=E++,M.firstRowIndex=T,M.lastRowIndex=g,M=c(),o+=x,T=g+1,x=0);return d}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),YU=De({"src/traces/table/data_split_helpers.js"(j){"use strict";var N=Ji().extendFlat;j.splitToPanels=function(v){var w=[0,0],S=N({},v,{key:"header",type:"header",page:0,prevPages:w,currentRepaint:[null,null],dragHandle:!0,values:v.calcdata.headerCells.values[v.specIndex],rowBlocks:v.calcdata.headerRowBlocks,calcdata:N({},v.calcdata,{cells:v.calcdata.headerCells})}),l=N({},v,{key:"cells1",type:"cells",page:0,prevPages:w,currentRepaint:[null,null],dragHandle:!1,values:v.calcdata.cells.values[v.specIndex],rowBlocks:v.calcdata.rowBlocks}),e=N({},v,{key:"cells2",type:"cells",page:1,prevPages:w,currentRepaint:[null,null],dragHandle:!1,values:v.calcdata.cells.values[v.specIndex],rowBlocks:v.calcdata.rowBlocks});return[l,e,S]},j.splitToCells=function(v){var w=u(v);return(v.values||[]).slice(w[0],w[1]).map(function(S,l){var e=typeof S=="string"&&S.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:w[0]+l,column:v,calcdata:v.calcdata,page:v.page,rowBlocks:v.rowBlocks,value:S}})};function u(v){var w=v.rowBlocks[v.page],S=w?w.rows[0].rowIndex:0,l=w?S+w.rows.length:0;return[S,l]}}}),k6=De({"src/traces/table/plot.js"(j,N){"use strict";var u=E6(),v=Qn(),w=Ar(),S=w.numberFormat,l=Fd(),e=Ki(),t=Xs(),a=Ar().raiseToTop,r=Ar().strTranslate,n=Ar().cancelTransition,i=WU(),s=YU(),c=ii();N.exports=function(re,ce){var me=!re._context.staticPlot,ye=re._fullLayout._paper.selectAll("."+u.cn.table).data(ce.map(function(je){var ut=l.unwrap(je),st=ut.trace;return i(re,st)}),l.keyFun);ye.exit().remove(),ye.enter().append("g").classed(u.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),ye.attr("width",function(je){return je.width+je.size.l+je.size.r}).attr("height",function(je){return je.height+je.size.t+je.size.b}).attr("transform",function(je){return r(je.translateX,je.translateY)});var Ae=ye.selectAll("."+u.cn.tableControlView).data(l.repeat,l.keyFun),Se=Ae.enter().append("g").classed(u.cn.tableControlView,!0).style("box-sizing","content-box");if(me){var Ce="onwheel"in document?"wheel":"mousewheel";Se.on("mousemove",function(je){Ae.filter(function(ut){return je===ut}).call(o,re)}).on(Ce,function(je){if(!je.scrollbarState.wheeling){je.scrollbarState.wheeling=!0;var ut=je.scrollY+v.event.deltaY,st=Y(re,Ae,null,ut)(je);st||(v.event.stopPropagation(),v.event.preventDefault()),je.scrollbarState.wheeling=!1}}).call(o,re,!0)}Ae.attr("transform",function(je){return r(je.size.l,je.size.t)});var qe=Ae.selectAll("."+u.cn.scrollBackground).data(l.repeat,l.keyFun);qe.enter().append("rect").classed(u.cn.scrollBackground,!0).attr("fill","none"),qe.attr("width",function(je){return je.width}).attr("height",function(je){return je.height}),Ae.each(function(je){e.setClipUrl(v.select(this),f(re,je),re)});var Ue=Ae.selectAll("."+u.cn.yColumn).data(function(je){return je.columns},l.keyFun);Ue.enter().append("g").classed(u.cn.yColumn,!0),Ue.exit().remove(),Ue.attr("transform",function(je){return r(je.x,0)}),me&&Ue.call(v.behavior.drag().origin(function(je){var ut=v.select(this);return z(ut,je,-u.uplift),a(this),je.calcdata.columnDragInProgress=!0,o(Ae.filter(function(st){return je.calcdata.key===st.key}),re),je}).on("drag",function(je){var ut=v.select(this),st=function(Pt){return(je===Pt?v.event.x:Pt.x)+Pt.columnWidth/2};je.x=Math.max(-u.overdrag,Math.min(je.calcdata.width+u.overdrag-je.columnWidth,v.event.x));var yt=y(Ue).filter(function(Pt){return Pt.calcdata.key===je.calcdata.key}),At=yt.sort(function(Pt,Zt){return st(Pt)-st(Zt)});At.forEach(function(Pt,Zt){Pt.xIndex=Zt,Pt.x=je===Pt?Pt.x:Pt.xScale(Pt)}),Ue.filter(function(Pt){return je!==Pt}).transition().ease(u.transitionEase).duration(u.transitionDuration).attr("transform",function(Pt){return r(Pt.x,0)}),ut.call(n).attr("transform",r(je.x,-u.uplift))}).on("dragend",function(je){var ut=v.select(this),st=je.calcdata;je.x=je.xScale(je),je.calcdata.columnDragInProgress=!1,z(ut,je,0),F(re,st,st.columns.map(function(yt){return yt.xIndex}))})),Ue.each(function(je){e.setClipUrl(v.select(this),d(re,je),re)});var xe=Ue.selectAll("."+u.cn.columnBlock).data(s.splitToPanels,l.keyFun);xe.enter().append("g").classed(u.cn.columnBlock,!0).attr("id",function(je){return je.key}),xe.style("cursor",function(je){return je.dragHandle?"ew-resize":je.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var he=xe.filter(k),oe=xe.filter(D);me&&oe.call(v.behavior.drag().origin(function(je){return v.event.stopPropagation(),je}).on("drag",Y(re,Ae,-1)).on("dragend",function(){})),x(re,Ae,he,xe),x(re,Ae,oe,xe);var le=Ae.selectAll("."+u.cn.scrollAreaClip).data(l.repeat,l.keyFun);le.enter().append("clipPath").classed(u.cn.scrollAreaClip,!0).attr("id",function(je){return f(re,je)});var ne=le.selectAll("."+u.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);ne.enter().append("rect").classed(u.cn.scrollAreaClipRect,!0).attr("x",-u.overdrag).attr("y",-u.uplift).attr("fill","none"),ne.attr("width",function(je){return je.width+2*u.overdrag}).attr("height",function(je){return je.height+u.uplift});var be=Ue.selectAll("."+u.cn.columnBoundary).data(l.repeat,l.keyFun);be.enter().append("g").classed(u.cn.columnBoundary,!0);var Fe=Ue.selectAll("."+u.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Fe.enter().append("clipPath").classed(u.cn.columnBoundaryClippath,!0),Fe.attr("id",function(je){return d(re,je)});var Ve=Fe.selectAll("."+u.cn.columnBoundaryRect).data(l.repeat,l.keyFun);Ve.enter().append("rect").classed(u.cn.columnBoundaryRect,!0).attr("fill","none"),Ve.attr("width",function(je){return je.columnWidth+2*p(je)}).attr("height",function(je){return je.calcdata.height+2*p(je)+u.uplift}).attr("x",function(je){return-p(je)}).attr("y",function(je){return-p(je)}),q(null,oe,Ae)};function p(Q){return Math.ceil(Q.calcdata.maxLineWidth/2)}function f(Q,re){return"clip"+Q._fullLayout._uid+"_scrollAreaBottomClip_"+re.key}function d(Q,re){return"clip"+Q._fullLayout._uid+"_columnBoundaryClippath_"+re.calcdata.key+"_"+re.specIndex}function y(Q){return[].concat.apply([],Q.map(function(re){return re})).map(function(re){return re.__data__})}function o(Q,re,ce){function me(Ue){var xe=Ue.rowBlocks;return K(xe,xe.length-1)+(xe.length?V(xe[xe.length-1],1/0):1)}var ye=Q.selectAll("."+u.cn.scrollbarKit).data(l.repeat,l.keyFun);ye.enter().append("g").classed(u.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),ye.each(function(Ue){var xe=Ue.scrollbarState;xe.totalHeight=me(Ue),xe.scrollableAreaHeight=Ue.groupHeight-B(Ue),xe.currentlyVisibleHeight=Math.min(xe.totalHeight,xe.scrollableAreaHeight),xe.ratio=xe.currentlyVisibleHeight/xe.totalHeight,xe.barLength=Math.max(xe.ratio*xe.currentlyVisibleHeight,u.goldenRatio*u.scrollbarWidth),xe.barWiggleRoom=xe.currentlyVisibleHeight-xe.barLength,xe.wiggleRoom=Math.max(0,xe.totalHeight-xe.scrollableAreaHeight),xe.topY=xe.barWiggleRoom===0?0:Ue.scrollY/xe.wiggleRoom*xe.barWiggleRoom,xe.bottomY=xe.topY+xe.barLength,xe.dragMultiplier=xe.wiggleRoom/xe.barWiggleRoom}).attr("transform",function(Ue){var xe=Ue.width+u.scrollbarWidth/2+u.scrollbarOffset;return r(xe,B(Ue))});var Ae=ye.selectAll("."+u.cn.scrollbar).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(u.cn.scrollbar,!0);var Se=Ae.selectAll("."+u.cn.scrollbarSlider).data(l.repeat,l.keyFun);Se.enter().append("g").classed(u.cn.scrollbarSlider,!0),Se.attr("transform",function(Ue){return r(0,Ue.scrollbarState.topY||0)});var Ce=Se.selectAll("."+u.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ce.enter().append("line").classed(u.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",u.scrollbarWidth).attr("stroke-linecap","round").attr("y1",u.scrollbarWidth/2),Ce.attr("y2",function(Ue){return Ue.scrollbarState.barLength-u.scrollbarWidth/2}).attr("stroke-opacity",function(Ue){return Ue.columnDragInProgress||!Ue.scrollbarState.barWiggleRoom||ce?0:.4}),Ce.transition().delay(0).duration(0),Ce.transition().delay(u.scrollbarHideDelay).duration(u.scrollbarHideDuration).attr("stroke-opacity",0);var qe=Ae.selectAll("."+u.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);qe.enter().append("line").classed(u.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",u.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Ue){var xe=v.event.y,he=this.getBoundingClientRect(),oe=Ue.scrollbarState,le=xe-he.top,ne=v.scale.linear().domain([0,oe.scrollableAreaHeight]).range([0,oe.totalHeight]).clamp(!0);oe.topY<=le&&le<=oe.bottomY||Y(re,Q,null,ne(le-oe.barLength/2))(Ue)}).call(v.behavior.drag().origin(function(Ue){return v.event.stopPropagation(),Ue.scrollbarState.scrollbarScrollInProgress=!0,Ue}).on("drag",Y(re,Q)).on("dragend",function(){})),qe.attr("y2",function(Ue){return Ue.scrollbarState.scrollableAreaHeight}),re._context.staticPlot&&(Ce.remove(),qe.remove())}function x(Q,re,ce,me){var ye=M(ce),Ae=T(ye);m(Ae);var Se=E(Ae);b(Se);var Ce=A(Ae),qe=g(Ce);h(qe),_(qe,re,me,Q),H(Ae)}function M(Q){var re=Q.selectAll("."+u.cn.columnCells).data(l.repeat,l.keyFun);return re.enter().append("g").classed(u.cn.columnCells,!0),re.exit().remove(),re}function T(Q){var re=Q.selectAll("."+u.cn.columnCell).data(s.splitToCells,function(ce){return ce.keyWithinBlock});return re.enter().append("g").classed(u.cn.columnCell,!0),re.exit().remove(),re}function E(Q){var re=Q.selectAll("."+u.cn.cellRect).data(l.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("rect").classed(u.cn.cellRect,!0),re}function g(Q){var re=Q.selectAll("."+u.cn.cellText).data(l.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("text").classed(u.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){v.event.stopPropagation()}),re}function A(Q){var re=Q.selectAll("."+u.cn.cellTextHolder).data(l.repeat,function(ce){return ce.keyWithinBlock});return re.enter().append("g").classed(u.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),re}function m(Q){Q.each(function(re,ce){var me=re.calcdata.cells.font,ye=re.column.specIndex,Ae={size:R(me.size,ye,ce),color:R(me.color,ye,ce),family:R(me.family,ye,ce),weight:R(me.weight,ye,ce),style:R(me.style,ye,ce),variant:R(me.variant,ye,ce),textcase:R(me.textcase,ye,ce),lineposition:R(me.lineposition,ye,ce),shadow:R(me.shadow,ye,ce)};re.rowNumber=re.key,re.align=R(re.calcdata.cells.align,ye,ce),re.cellBorderWidth=R(re.calcdata.cells.line.width,ye,ce),re.font=Ae})}function h(Q){Q.each(function(re){e.font(v.select(this),re.font)})}function b(Q){Q.attr("width",function(re){return re.column.columnWidth}).attr("stroke-width",function(re){return re.cellBorderWidth}).each(function(re){var ce=v.select(this);c.stroke(ce,R(re.calcdata.cells.line.color,re.column.specIndex,re.rowNumber)),c.fill(ce,R(re.calcdata.cells.fill.color,re.column.specIndex,re.rowNumber))})}function _(Q,re,ce,me){Q.text(function(ye){var Ae=ye.column.specIndex,Se=ye.rowNumber,Ce=ye.value,qe=typeof Ce=="string",Ue=qe&&Ce.match(/
/i),xe=!qe||Ue;ye.mayHaveMarkup=qe&&Ce.match(/[<&>]/);var he=I(Ce);ye.latex=he;var oe=he?"":R(ye.calcdata.cells.prefix,Ae,Se)||"",le=he?"":R(ye.calcdata.cells.suffix,Ae,Se)||"",ne=he?null:R(ye.calcdata.cells.format,Ae,Se)||null,be=oe+(ne?S(ne)(ye.value):ye.value)+le,Fe;ye.wrappingNeeded=!ye.wrapped&&!xe&&!he&&(Fe=C(be)),ye.cellHeightMayIncrease=Ue||he||ye.mayHaveMarkup||(Fe===void 0?C(be):Fe),ye.needsConvertToTspans=ye.mayHaveMarkup||ye.wrappingNeeded||ye.latex;var Ve;if(ye.wrappingNeeded){var je=u.wrapSplitCharacter===" "?be.replace(/ye&&me.push(Ae),ye+=qe}return me}function q(Q,re,ce){var me=y(re)[0];if(me!==void 0){var ye=me.rowBlocks,Ae=me.calcdata,Se=K(ye,ye.length),Ce=me.calcdata.groupHeight-B(me),qe=Ae.scrollY=Math.max(0,Math.min(Se-Ce,Ae.scrollY)),Ue=O(ye,qe,Ce);Ue.length===1&&(Ue[0]===ye.length-1?Ue.unshift(Ue[0]-1):Ue.push(Ue[0]+1)),Ue[0]%2&&Ue.reverse(),re.each(function(xe,he){xe.page=Ue[he],xe.scrollY=qe}),re.attr("transform",function(xe){var he=K(xe.rowBlocks,xe.page)-xe.scrollY;return r(0,he)}),Q&&(ee(Q,ce,re,Ue,me.prevPages,me,0),ee(Q,ce,re,Ue,me.prevPages,me,1),o(ce,Q))}}function Y(Q,re,ce,me){return function(Ae){var Se=Ae.calcdata?Ae.calcdata:Ae,Ce=re.filter(function(he){return Se.key===he.key}),qe=ce||Se.scrollbarState.dragMultiplier,Ue=Se.scrollY;Se.scrollY=me===void 0?Se.scrollY+qe*v.event.dy:me;var xe=Ce.selectAll("."+u.cn.yColumn).selectAll("."+u.cn.columnBlock).filter(D);return q(Q,xe,Ce),Se.scrollY===Ue}}function ee(Q,re,ce,me,ye,Ae,Se){var Ce=me[Se]!==ye[Se];Ce&&(clearTimeout(Ae.currentRepaint[Se]),Ae.currentRepaint[Se]=setTimeout(function(){var qe=ce.filter(function(Ue,xe){return xe===Se&&me[xe]!==ye[xe]});x(Q,re,qe,ce),ye[Se]=me[Se]}))}function te(Q,re,ce,me){return function(){var Ae=v.select(re.parentNode);Ae.each(function(Se){var Ce=Se.fragments;Ae.selectAll("tspan.line").each(function(be,Fe){Ce[Fe].width=this.getComputedTextLength()});var qe=Ce[Ce.length-1].width,Ue=Ce.slice(0,-1),xe=[],he,oe,le=0,ne=Se.column.columnWidth-2*u.cellPad;for(Se.value="";Ue.length;)he=Ue.shift(),oe=he.width+qe,le+oe>ne&&(Se.value+=xe.join(u.wrapSpacer)+u.lineBreaker,xe=[],le=0),xe.push(he.text),le+=oe;le&&(Se.value+=xe.join(u.wrapSpacer)),Se.wrapped=!0}),Ae.selectAll("tspan.line").remove(),_(Ae.select("."+u.cn.cellText),ce,Q,me),v.select(re.parentNode.parentNode).call(H)}}function ae(Q,re,ce,me,ye){return function(){if(!ye.settledY){var Se=v.select(re.parentNode),Ce=X(ye),qe=ye.key-Ce.firstRowIndex,Ue=Ce.rows[qe].rowHeight,xe=ye.cellHeightMayIncrease?re.parentNode.getBoundingClientRect().height+2*u.cellPad:Ue,he=Math.max(xe,Ue),oe=he-Ce.rows[qe].rowHeight;oe&&(Ce.rows[qe].rowHeight=he,Q.selectAll("."+u.cn.columnCell).call(H),q(null,Q.filter(D),0),o(ce,me,!0)),Se.attr("transform",function(){var le=this,ne=le.parentNode,be=ne.getBoundingClientRect(),Fe=v.select(le.parentNode).select("."+u.cn.cellRect).node().getBoundingClientRect(),Ve=le.transform.baseVal.consolidate(),je=Fe.top-be.top+(Ve?Ve.matrix.f:u.cellPad);return r(U(ye,v.select(le.parentNode).select("."+u.cn.cellTextHolder).node().getBoundingClientRect().width),je)}),ye.settledY=!0}}}function U(Q,re){switch(Q.align){case"left":return u.cellPad;case"right":return Q.column.columnWidth-(re||0)-u.cellPad;case"center":return(Q.column.columnWidth-(re||0))/2;default:return u.cellPad}}function H(Q){Q.attr("transform",function(re){var ce=re.rowBlocks[0].auxiliaryBlocks.reduce(function(Se,Ce){return Se+V(Ce,1/0)},0),me=X(re),ye=V(me,re.key),Ae=ye+ce;return r(0,Ae)}).selectAll("."+u.cn.cellRect).attr("height",function(re){return Z(X(re),re.key).rowHeight})}function K(Q,re){for(var ce=0,me=re-1;me>=0;me--)ce+=$(Q[me]);return ce}function V(Q,re){for(var ce=0,me=0;meS.length&&(w=w.slice(0,S.length)):w=[],e=0;e90&&(f-=180,n=-n),{angle:f,flip:n,p:v.c2p(l,w,S),offsetMultplier:i}}}}),aq=De({"src/traces/carpet/plot.js"(j,N){"use strict";var u=Qn(),v=Ki(),w=C6(),S=L6(),l=rq(),e=Xs(),t=Ar(),a=t.strRotate,r=t.strTranslate,n=yc();N.exports=function(x,M,T,E){var g=x._context.staticPlot,A=M.xaxis,m=M.yaxis,h=x._fullLayout,b=h._clips;t.makeTraceGroups(E,T,"trace").each(function(_){var I=u.select(this),C=_[0],F=C.trace,R=F.aaxis,z=F.baxis,D=t.ensureSingle(I,"g","minorlayer"),k=t.ensureSingle(I,"g","majorlayer"),B=t.ensureSingle(I,"g","boundarylayer"),O=t.ensureSingle(I,"g","labellayer");I.style("opacity",F.opacity),s(A,m,k,R,"a",R._gridlines,!0,g),s(A,m,k,z,"b",z._gridlines,!0,g),s(A,m,D,R,"a",R._minorgridlines,!0,g),s(A,m,D,z,"b",z._minorgridlines,!0,g),s(A,m,B,R,"a-boundary",R._boundarylines,g),s(A,m,B,z,"b-boundary",z._boundarylines,g);var q=c(x,A,m,F,C,O,R._labels,"a-label"),Y=c(x,A,m,F,C,O,z._labels,"b-label");p(x,O,F,C,A,m,q,Y),i(F,C,b,A,m)})};function i(o,x,M,T,E){var g,A,m,h,b=M.select("#"+o._clipPathId);b.size()||(b=M.append("clipPath").classed("carpetclip",!0));var _=t.ensureSingle(b,"path","carpetboundary"),I=x.clipsegments,C=[];for(h=0;h0?"start":"end","data-notex":1}).call(v.font,I.font).text(I.text).call(e.convertToTspans,o),k=v.bBox(this);D.attr("transform",r(F.p[0],F.p[1])+a(F.angle)+r(I.axis.labelpadding*z,k.height*.3)),b=Math.max(b,k.width+I.axis.labelpadding)}),h.exit().remove(),_.maxExtent=b,_}function p(o,x,M,T,E,g,A,m){var h,b,_,I,C=t.aggNums(Math.min,null,M.a),F=t.aggNums(Math.max,null,M.a),R=t.aggNums(Math.min,null,M.b),z=t.aggNums(Math.max,null,M.b);h=.5*(C+F),b=R,_=M.ab2xy(h,b,!0),I=M.dxyda_rough(h,b),A.angle===void 0&&t.extendFlat(A,l(M,E,g,_,M.dxydb_rough(h,b))),y(o,x,M,T,_,I,M.aaxis,E,g,A,"a-title"),h=C,b=.5*(R+z),_=M.ab2xy(h,b,!0),I=M.dxydb_rough(h,b),m.angle===void 0&&t.extendFlat(m,l(M,E,g,_,M.dxyda_rough(h,b))),y(o,x,M,T,_,I,M.baxis,E,g,m,"b-title")}var f=n.LINE_SPACING,d=(1-n.MID_SHIFT)/f+1;function y(o,x,M,T,E,g,A,m,h,b,_){var I=[];A.title.text&&I.push(A.title.text);var C=x.selectAll("text."+_).data(I),F=b.maxExtent;C.enter().append("text").classed(_,!0),C.each(function(){var R=l(M,m,h,E,g);["start","both"].indexOf(A.showticklabels)===-1&&(F=0);var z=A.title.font.size;F+=z+A.title.offset;var D=b.angle+(b.flip<0?180:0),k=(D-R.angle+450)%360,B=k>90&&k<270,O=u.select(this);O.text(A.title.text).call(e.convertToTspans,o),B&&(F=(-e.lineCount(O)+d)*f*z-F),O.attr("transform",r(R.p[0],R.p[1])+a(R.angle)+r(0,F)).attr("text-anchor","middle").call(v.font,A.title.font)}),C.exit().remove()}}}),nq=De({"src/traces/carpet/cheater_basis.js"(j,N){"use strict";var u=Ar().isArrayOrTypedArray;N.exports=function(v,w,S){var l,e,t,a,r,n,i=[],s=u(v)?v.length:v,c=u(w)?w.length:w,p=u(v)?v:null,f=u(w)?w:null;p&&(t=(p.length-1)/(p[p.length-1]-p[0])/(s-1)),f&&(a=(f.length-1)/(f[f.length-1]-f[0])/(c-1));var d,y=1/0,o=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=w.length,a=0;a0&&(V=S.dxydi([],q-1,ee,0,te),Q.push(ae[0]+V[0]/3),re.push(ae[1]+V[1]/3),$=S.dxydi([],q-1,ee,1,te),Q.push(K[0]-$[0]/3),re.push(K[1]-$[1]/3)),Q.push(K[0]),re.push(K[1]),ae=K;else for(q=S.a2i(O),U=Math.floor(Math.max(0,Math.min(R-2,q))),H=q-U,ce.length=R,ce.crossLength=z,ce.xy=function(me){return S.evalxy([],q,me)},ce.dxy=function(me,ye){return S.dxydj([],U,me,H,ye)},Y=0;Y0&&(X=S.dxydj([],U,Y-1,H,0),Q.push(ae[0]+X[0]/3),re.push(ae[1]+X[1]/3),Z=S.dxydj([],U,Y-1,H,1),Q.push(K[0]-Z[0]/3),re.push(K[1]-Z[1]/3)),Q.push(K[0]),re.push(K[1]),ae=K;return ce.axisLetter=l,ce.axis=E,ce.crossAxis=b,ce.value=O,ce.constvar=e,ce.index=p,ce.x=Q,ce.y=re,ce.smoothing=b.smoothing,ce}function B(O){var q,Y,ee,te,ae,U=[],H=[],K={};if(K.length=T.length,K.crossLength=h.length,l==="b")for(ee=Math.max(0,Math.min(z-2,O)),ae=Math.min(1,Math.max(0,O-ee)),K.xy=function(V){return S.evalxy([],V,O)},K.dxy=function(V,$){return S.dxydi([],V,ee,$,ae)},q=0;qT.length-1)&&g.push(v(B(a),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(p=s;pT.length-1)&&!(y<0||y>T.length-1))for(o=T[r],x=T[y],t=0;tT[T.length-1])&&A.push(v(k(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash})));E.startline&&m.push(v(B(0),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&m.push(v(B(T.length-1),{color:E.endlinecolor,width:E.endlinewidth}))}else{for(n=5e-15,i=[Math.floor((T[T.length-1]-E.tick0)/E.dtick*(1+n)),Math.ceil((T[0]-E.tick0)/E.dtick/(1+n))].sort(function(O,q){return O-q}),s=i[0],c=i[1],p=s;p<=c;p++)f=E.tick0+E.dtick*p,g.push(v(k(f),{color:E.gridcolor,width:E.gridwidth,dash:E.griddash}));for(p=s-1;pT[T.length-1])&&A.push(v(k(d),{color:E.minorgridcolor,width:E.minorgridwidth,dash:E.minorgriddash}));E.startline&&m.push(v(k(T[0]),{color:E.startlinecolor,width:E.startlinewidth})),E.endline&&m.push(v(k(T[T.length-1]),{color:E.endlinecolor,width:E.endlinewidth}))}}}}),sq=De({"src/traces/carpet/calc_labels.js"(j,N){"use strict";var u=Vi(),v=Ji().extendFlat;N.exports=function(S,l){var e,t,a,r,n,i=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=v[c][e],a[s-e]=w[c][e];for(r.push({x:t,y:a,bicubic:n}),e=c,t=[],a=[];e>=0;e--)t[c-e]=v[e][0],a[c-e]=w[e][0];return r.push({x:t,y:a,bicubic:i}),r}}}),uq=De({"src/traces/carpet/smooth_fill_2d_array.js"(j,N){"use strict";var u=Ar();N.exports=function(w,S,l){var e,t,a,r=[],n=[],i=w[0].length,s=w.length;function c(Y,ee){var te=0,ae,U=0;return Y>0&&(ae=w[ee][Y-1])!==void 0&&(U++,te+=ae),Y0&&(ae=w[ee-1][Y])!==void 0&&(U++,te+=ae),ee0&&t0&&eh);return u.log("Smoother converged to",b,"after",I,"iterations"),w}}}),cq=De({"src/traces/carpet/constants.js"(j,N){"use strict";N.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),fq=De({"src/traces/carpet/catmull_rom.js"(j,N){"use strict";var u=.5;N.exports=function(w,S,l,e){var t=w[0]-S[0],a=w[1]-S[1],r=l[0]-S[0],n=l[1]-S[1],i=Math.pow(t*t+a*a,u/2),s=Math.pow(r*r+n*n,u/2),c=(s*s*t-i*i*r)*e,p=(s*s*a-i*i*n)*e,f=s*(i+s)*3,d=i*(i+s)*3;return[[S[0]+(f&&c/f),S[1]+(f&&p/f)],[S[0]-(d&&c/d),S[1]-(d&&p/d)]]}}}),hq=De({"src/traces/carpet/compute_control_points.js"(j,N){"use strict";var u=fq(),v=Ar().ensureArray;function w(S,l,e){var t=-.5*e[0]+1.5*l[0],a=-.5*e[1]+1.5*l[1];return[(2*t+S[0])/3,(2*a+S[1])/3]}N.exports=function(l,e,t,a,r,n){var i,s,c,p,f,d,y,o,x,M,T=t[0].length,E=t.length,g=r?3*T-2:T,A=n?3*E-2:E;for(l=v(l,A),e=v(e,A),c=0;cf&&gy&&Ad||Ao},a.setScale=function(){var g=a._x,A=a._y,m=w(a._xctrl,a._yctrl,g,A,c.smoothing,p.smoothing);a._xctrl=m[0],a._yctrl=m[1],a.evalxy=S([a._xctrl,a._yctrl],i,s,c.smoothing,p.smoothing),a.dxydi=l([a._xctrl,a._yctrl],c.smoothing,p.smoothing),a.dxydj=e([a._xctrl,a._yctrl],c.smoothing,p.smoothing)},a.i2a=function(g){var A=Math.max(0,Math.floor(g[0]),i-2),m=g[0]-A;return(1-m)*r[A]+m*r[A+1]},a.j2b=function(g){var A=Math.max(0,Math.floor(g[1]),i-2),m=g[1]-A;return(1-m)*n[A]+m*n[A+1]},a.ij2ab=function(g){return[a.i2a(g[0]),a.j2b(g[1])]},a.a2i=function(g){var A=Math.max(0,Math.min(v(g,r),i-2)),m=r[A],h=r[A+1];return Math.max(0,Math.min(i-1,A+(g-m)/(h-m)))},a.b2j=function(g){var A=Math.max(0,Math.min(v(g,n),s-2)),m=n[A],h=n[A+1];return Math.max(0,Math.min(s-1,A+(g-m)/(h-m)))},a.ab2ij=function(g){return[a.a2i(g[0]),a.b2j(g[1])]},a.i2c=function(g,A){return a.evalxy([],g,A)},a.ab2xy=function(g,A,m){if(!m&&(gr[i-1]|An[s-1]))return[!1,!1];var h=a.a2i(g),b=a.b2j(A),_=a.evalxy([],h,b);if(m){var I=0,C=0,F=[],R,z,D,k;gr[i-1]?(R=i-2,z=1,I=(g-r[i-1])/(r[i-1]-r[i-2])):(R=Math.max(0,Math.min(i-2,Math.floor(h))),z=h-R),An[s-1]?(D=s-2,k=1,C=(A-n[s-1])/(n[s-1]-n[s-2])):(D=Math.max(0,Math.min(s-2,Math.floor(b))),k=b-D),I&&(a.dxydi(F,R,D,z,k),_[0]+=F[0]*I,_[1]+=F[1]*I),C&&(a.dxydj(F,R,D,z,k),_[0]+=F[0]*C,_[1]+=F[1]*C)}return _},a.c2p=function(g,A,m){return[A.c2p(g[0]),m.c2p(g[1])]},a.p2x=function(g,A,m){return[A.p2c(g[0]),m.p2c(g[1])]},a.dadi=function(g){var A=Math.max(0,Math.min(r.length-2,g));return r[A+1]-r[A]},a.dbdj=function(g){var A=Math.max(0,Math.min(n.length-2,g));return n[A+1]-n[A]},a.dxyda=function(g,A,m,h){var b=a.dxydi(null,g,A,m,h),_=a.dadi(g,m);return[b[0]/_,b[1]/_]},a.dxydb=function(g,A,m,h){var b=a.dxydj(null,g,A,m,h),_=a.dbdj(A,h);return[b[0]/_,b[1]/_]},a.dxyda_rough=function(g,A,m){var h=x*(m||.1),b=a.ab2xy(g+h,A,!0),_=a.ab2xy(g-h,A,!0);return[(b[0]-_[0])*.5/h,(b[1]-_[1])*.5/h]},a.dxydb_rough=function(g,A,m){var h=M*(m||.1),b=a.ab2xy(g,A+h,!0),_=a.ab2xy(g,A-h,!0);return[(b[0]-_[0])*.5/h,(b[1]-_[1])*.5/h]},a.dpdx=function(g){return g._m},a.dpdy=function(g){return g._m}}}}),gq=De({"src/traces/carpet/calc.js"(j,N){"use strict";var u=Vi(),v=Ar().isArray1D,w=nq(),S=iq(),l=oq(),e=sq(),t=lq(),a=bx(),r=uq(),n=xx(),i=mq();N.exports=function(c,p){var f=u.getFromId(c,p.xaxis),d=u.getFromId(c,p.yaxis),y=p.aaxis,o=p.baxis,x=p.x,M=p.y,T=[];x&&v(x)&&T.push("x"),M&&v(M)&&T.push("y"),T.length&&n(p,y,o,"a","b",T);var E=p._a=p._a||p.a,g=p._b=p._b||p.b;x=p._x||p.x,M=p._y||p.y;var A={};if(p._cheater){var m=y.cheatertype==="index"?E.length:E,h=o.cheatertype==="index"?g.length:g;x=w(m,h,p.cheaterslope)}p._x=x=a(x),p._y=M=a(M),r(x,E,g),r(M,E,g),i(p),p.setScale();var b=S(x),_=S(M),I=.5*(b[1]-b[0]),C=.5*(b[1]+b[0]),F=.5*(_[1]-_[0]),R=.5*(_[1]+_[0]),z=1.3;return b=[C-I*z,C+I*z],_=[R-F*z,R+F*z],p._extremes[f._id]=u.findExtremes(f,b,{padded:!0}),p._extremes[d._id]=u.findExtremes(d,_,{padded:!0}),l(p,"a","b"),l(p,"b","a"),e(p,y),e(p,o),A.clipsegments=t(p._xctrl,p._yctrl,y,o),A.x=x,A.y=M,A.a=E,A.b=g,[A]}}}),yq=De({"src/traces/carpet/index.js"(j,N){"use strict";N.exports={attributes:e2(),supplyDefaults:tq(),plot:aq(),calc:gq(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Hu(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),_q=De({"lib/carpet.js"(j,N){"use strict";N.exports=yq()}}),P6=De({"src/traces/scattercarpet/attributes.js"(j,N){"use strict";var u=Cd(),v=bu(),w=Bs(),{hovertemplateAttrs:S,texttemplateAttrs:l,templatefallbackAttrs:e}=Is(),t=ul(),a=Ji().extendFlat,r=v.marker,n=v.line,i=r.line;N.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:a({},v.mode,{dflt:"markers"}),text:a({},v.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:a({},v.hovertext,{}),line:{color:n.color,width:n.width,dash:n.dash,backoff:n.backoff,shape:a({},n.shape,{values:["linear","spline"]}),smoothing:n.smoothing,editType:"calc"},connectgaps:v.connectgaps,fill:a({},v.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:u(),marker:a({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:a({width:i.width,dash:i.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:v.textfont,textposition:v.textposition,selected:v.selected,unselected:v.unselected,hoverinfo:a({},w.hoverinfo,{flags:["a","b","text","name"]}),hoveron:v.hoveron,hovertemplate:S(),hovertemplatefallback:e(),zorder:v.zorder}}}),xq=De({"src/traces/scattercarpet/defaults.js"(j,N){"use strict";var u=Ar(),v=kd(),w=Sl(),S=Jh(),l=cd(),e=pm(),t=fd(),a=Ld(),r=P6();N.exports=function(i,s,c,p){function f(E,g){return u.coerce(i,s,r,E,g)}f("carpet"),s.xaxis="x",s.yaxis="y";var d=f("a"),y=f("b"),o=Math.min(d.length,y.length);if(!o){s.visible=!1;return}s._length=o,f("text"),f("texttemplate"),f("texttemplatefallback"),f("hovertext");var x=o0?A=E.labelprefix.replace(/ = $/,""):A=E._hovertitle,o.push(A+": "+g.toFixed(3)+E.labelsuffix)}if(!f.hovertemplate){var M=p.hi||f.hoverinfo,T=M.split("+");T.indexOf("all")!==-1&&(T=["a","b","text"]),T.indexOf("a")!==-1&&x(d.aaxis,p.a),T.indexOf("b")!==-1&&x(d.baxis,p.b),o.push("y: "+r.yLabel),T.indexOf("text")!==-1&&v(p,f,o),r.extraText=o.join("
")}return a}}}),Mq=De({"src/traces/scattercarpet/event_data.js"(j,N){"use strict";N.exports=function(v,w,S,l,e){var t=l[e];return v.a=t.a,v.b=t.b,v.y=t.y,v}}}),Sq=De({"src/traces/scattercarpet/index.js"(j,N){"use strict";N.exports={attributes:P6(),supplyDefaults:xq(),colorbar:Nf(),formatLabels:bq(),calc:wq(),plot:Aq(),style:bh().style,styleOnSelect:bh().styleOnSelect,hoverPoints:Tq(),selectPoints:Pp(),eventData:Mq(),moduleType:"trace",name:"scattercarpet",basePlotModule:Hu(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),Eq=De({"lib/scattercarpet.js"(j,N){"use strict";N.exports=Sq()}}),R6=De({"src/traces/contourcarpet/attributes.js"(j,N){"use strict";var u=bm(),v=j1(),w=ul(),S=Ji().extendFlat,l=v.contours;N.exports=S({carpet:{valType:"string",editType:"calc"},z:u.z,a:u.x,a0:u.x0,da:u.dx,b:u.y,b0:u.y0,db:u.dy,text:u.text,hovertext:u.hovertext,transpose:u.transpose,atype:u.xtype,btype:u.ytype,fillcolor:v.fillcolor,autocontour:v.autocontour,ncontours:v.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:v.line.color,width:v.line.width,dash:v.line.dash,smoothing:v.line.smoothing,editType:"plot"},zorder:v.zorder},w("",{cLetter:"z",autoColorDflt:!1}))}}),I6=De({"src/traces/contourcarpet/defaults.js"(j,N){"use strict";var u=Ar(),v=_x(),w=R6(),S=$w(),l=Ix(),e=Dx();N.exports=function(a,r,n,i){function s(d,y){return u.coerce(a,r,w,d,y)}function c(d){return u.coerce2(a,r,w,d)}if(s("carpet"),a.a&&a.b){var p=v(a,r,s,i,"a","b");if(!p){r.visible=!1;return}s("text");var f=s("contours.type")==="constraint";f?S(a,r,s,i,n,{hasHover:!1}):(l(a,r,s,c),e(a,r,s,i,{hasHover:!1}))}else r._defaultColor=n,r._length=null;s("zorder")}}}),kq=De({"src/traces/contourcarpet/calc.js"(j,N){"use strict";var u=Wf(),v=Ar(),w=xx(),S=bx(),l=wx(),e=Ax(),t=Dw(),a=I6(),r=t2(),n=Uw();N.exports=function(c,p){var f=p._carpetTrace=r(c,p);if(!(!f||!f.visible||f.visible==="legendonly")){if(!p.a||!p.b){var d=c.data[f.index],y=c.data[p.index];y.a||(y.a=d.a),y.b||(y.b=d.b),a(y,p,p._defaultColor,c._fullLayout)}var o=i(c,p);return n(p,p._z),o}};function i(s,c){var p=c._carpetTrace,f=p.aaxis,d=p.baxis,y,o,x,M,T,E,g;f._minDtick=0,d._minDtick=0,v.isArray1D(c.z)&&w(c,f,d,"a","b",["z"]),y=c._a=c._a||c.a,M=c._b=c._b||c.b,y=y?f.makeCalcdata(c,"_a"):[],M=M?d.makeCalcdata(c,"_b"):[],o=c.a0||0,x=c.da||1,T=c.b0||0,E=c.db||1,g=c._z=S(c._z||c.z,c.transpose),c._emptypoints=e(g),l(g,c._emptypoints);var A=v.maxRowLength(g),m=c.xtype==="scaled"?"":y,h=t(c,m,o,x,A,f),b=c.ytype==="scaled"?"":M,_=t(c,b,T,E,g.length,d),I={a:h,b:_,z:g};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&u(s,c,{vals:g,containerStr:"",cLetter:"z"}),[I]}}}),Cq=De({"src/traces/carpet/axis_aligned_line.js"(j,N){"use strict";var u=Ar().isArrayOrTypedArray;N.exports=function(v,w,S,l){var e,t,a,r,n,i,s,c,p,f,d,y,o,x=u(S)?"a":"b",M=x==="a"?v.aaxis:v.baxis,T=M.smoothing,E=x==="a"?v.a2i:v.b2j,g=x==="a"?S:l,A=x==="a"?l:S,m=x==="a"?w.a.length:w.b.length,h=x==="a"?w.b.length:w.a.length,b=Math.floor(x==="a"?v.b2j(A):v.a2i(A)),_=x==="a"?function(ee){return v.evalxy([],ee,b)}:function(ee){return v.evalxy([],b,ee)};T&&(a=Math.max(0,Math.min(h-2,b)),r=b-a,t=x==="a"?function(ee,te){return v.dxydi([],ee,a,te,r)}:function(ee,te){return v.dxydj([],a,ee,r,te)});var I=E(g[0]),C=E(g[1]),F=I0?Math.floor:Math.ceil,D=F>0?Math.ceil:Math.floor,k=F>0?Math.min:Math.max,B=F>0?Math.max:Math.min,O=z(I+R),q=D(C-R);s=_(I);var Y=[[s]];for(e=O;e*F=0;ce--)Z=B.clipsegments[ce],Q=v([],Z.x,I.c2p),re=v([],Z.y,C.c2p),Q.reverse(),re.reverse(),me.push(w(Q,re,Z.bicubic));var ye="M"+me.join("L")+"Z";T(R,B.clipsegments,I,C,te,U),E(D,R,I,C,X,K,H,k,B,U,ye),d(R,ee,m,z,Y,h,k),S.setClipUrl(R,k._clipPathId,m)})};function f(A,m){var h,b,_,I,C,F,R,z,D;for(h=0;hee&&(b.max=ee),b.len=b.max-b.min}function o(A,m,h){var b=A.getPointAtLength(m),_=A.getPointAtLength(h),I=_.x-b.x,C=_.y-b.y,F=Math.sqrt(I*I+C*C);return[I/F,C/F]}function x(A){var m=Math.sqrt(A[0]*A[0]+A[1]*A[1]);return[A[0]/m,A[1]/m]}function M(A,m){var h=Math.abs(A[0]*m[0]+A[1]*m[1]),b=Math.sqrt(1-h*h);return b/h}function T(A,m,h,b,_,I){var C,F,R,z,D=l.ensureSingle(A,"g","contourbg"),k=D.selectAll("path").data(I==="fill"&&!_?[0]:[]);k.enter().append("path"),k.exit().remove();var B=[];for(z=0;z=0&&(O=Q,Y=ee):Math.abs(B[1]-O[1])=0&&(O=Q,Y=ee):l.log("endpt to newendpt is not vert. or horz.",B,O,Q)}if(Y>=0)break;z+=X(B,O),B=O}if(Y===m.edgepaths.length){l.log("unclosed perimeter path");break}R=Y,k=D.indexOf(R)===-1,k&&(R=D[0],z+=X(B,O)+"Z",B=null)}for(R=0;Rg):E=F>_,g=F;var R=f(_,I,C,F);R.pos=b,R.yc=(_+F)/2,R.i=h,R.dir=E?"increasing":"decreasing",R.x=R.pos,R.y=[C,I],A&&(R.orig_p=s[h]),M&&(R.tx=i.text[h]),T&&(R.htx=i.hovertext[h]),m.push(R)}else m.push({pos:b,empty:!0})}return i._extremes[p._id]=w.findExtremes(p,u.concat(o,y),{padded:!0}),m.length&&(m[0].t={labels:{open:v(n,"open:")+" ",high:v(n,"high:")+" ",low:v(n,"low:")+" ",close:v(n,"close:")+" "}}),m}function r(n,i,s){var c=s._minDiff;if(!c){var p=n._fullData,f=[];c=1/0;var d;for(d=0;d"+x.labels[b]+u.hoverLabelText(y,_,o.yhoverformat)):(C=v.extendFlat({},T),C.y0=C.y1=I,C.yLabelVal=_,C.yLabel=x.labels[b]+u.hoverLabelText(y,_,o.yhoverformat),C.name="",M.push(C),m[_]=C)}return M}function i(s,c,p,f){var d=s.cd,y=s.ya,o=d[0].trace,x=d[0].t,M=r(s,c,p,f);if(!M)return[];var T=M.index,E=d[T],g=M.index=E.i,A=E.dir;function m(R){return x.labels[R]+u.hoverLabelText(y,o[R][g],o.yhoverformat)}var h=E.hi||o.hoverinfo||"",b=h.split("+"),_=h==="all",I=_||b.indexOf("y")!==-1,C=_||b.indexOf("text")!==-1,F=I?[m("open"),m("high"),m("low"),m("close")+" "+t[A]]:[];return C&&l(E,o,F),M.extraText=F.join("
"),M.y0=M.y1=y.c2p(E.yc,!0),[M]}N.exports={hoverPoints:a,hoverSplit:n,hoverOnPoints:i}}}),B6=De({"src/traces/ohlc/select.js"(j,N){"use strict";N.exports=function(v,w){var S=v.cd,l=v.xaxis,e=v.yaxis,t=[],a,r=S[0].t.bPos||0;if(w===!1)for(a=0;ac?function(o){return o<=0}:function(o){return o>=0};r.c2g=function(o){var x=r.c2l(o)-s;return(y(x)?x:0)+d},r.g2c=function(o){return r.l2c(o+s-d)},r.g2p=function(o){return o*f},r.c2p=function(o){return r.g2p(r.c2g(o))}}}function e(r,n){return n==="degrees"?w(r):r}function t(r,n){return n==="degrees"?S(r):r}function a(r,n){var i=r.type;if(i==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(p,f){return e(s(p),f)},r.c2d=function(p,f){return c(t(p,f))}}r.makeCalcdata=function(p,f){var d=p[f],y=p._length,o,x,M=function(m){return r.d2c(m,p.thetaunit)};if(d)for(o=new Array(y),x=0;x0?m:1/0},E=w(M,T),g=u.mod(E+1,M.length);return[M[E],M[g]]}function f(x){return Math.abs(x)>1e-10?x:0}function d(x,M,T){M=M||0,T=T||0;for(var E=x.length,g=new Array(E),A=0;A0?1:0}function v(t){var a=t[0],r=t[1];if(!isFinite(a)||!isFinite(r))return[1,0];var n=(a+1)*(a+1)+r*r;return[(a*a+r*r-1)/n,2*r/n]}function w(t,a){var r=a[0],n=a[1];return[r*t.radius+t.cx,-n*t.radius+t.cy]}function S(t,a){return a*t.radius}function l(t,a,r,n){var i=w(t,v([r,a])),s=i[0],c=i[1],p=w(t,v([n,a])),f=p[0],d=p[1];if(a===0)return["M"+s+","+c,"L"+f+","+d].join(" ");var y=S(t,1/Math.abs(a));return["M"+s+","+c,"A"+y+","+y+" 0 0,"+(a<0?1:0)+" "+f+","+d].join(" ")}function e(t,a,r,n){var i=S(t,1/(a+1)),s=w(t,v([a,r])),c=s[0],p=s[1],f=w(t,v([a,n])),d=f[0],y=f[1];if(u(r)!==u(n)){var o=w(t,v([a,0])),x=o[0],M=o[1];return["M"+c+","+p,"A"+i+","+i+" 0 0,"+(0Ce?(qe=Q,Ue=Q*Ce,oe=(re-Ue)/K.h/2,xe=[X[0],X[1]],he=[Z[0]+oe,Z[1]-oe]):(qe=re/Ce,Ue=re,oe=(Q-qe)/K.w/2,xe=[X[0]+oe,X[1]-oe],he=[Z[0],Z[1]]),U.xLength2=qe,U.yLength2=Ue,U.xDomain2=xe,U.yDomain2=he;var le=U.xOffset2=K.l+K.w*xe[0],ne=U.yOffset2=K.t+K.h*(1-he[1]),be=U.radius=qe/ye,Fe=U.innerRadius=U.getHole(ae)*be,Ve=U.cx=le-be*me[0],je=U.cy=ne+be*me[3],ut=U.cxx=Ve-le,st=U.cyy=je-ne,yt=V.side,At;yt==="counterclockwise"?(At=yt,yt="top"):yt==="clockwise"&&(At=yt,yt="bottom"),U.radialAxis=U.mockAxis(te,ae,V,{_id:"x",side:yt,_trueSide:At,domain:[Fe/K.w,be/K.w]}),U.angularAxis=U.mockAxis(te,ae,$,{side:"right",domain:[0,Math.PI],autorange:!1}),U.doAutoRange(te,ae),U.updateAngularAxis(te,ae),U.updateRadialAxis(te,ae),U.updateRadialAxisTitle(te,ae),U.xaxis=U.mockCartesianAxis(te,ae,{_id:"x",domain:xe}),U.yaxis=U.mockCartesianAxis(te,ae,{_id:"y",domain:he});var Pt=U.pathSubplot();U.clipPaths.forTraces.select("path").attr("d",Pt).attr("transform",l(ut,st)),H.frontplot.attr("transform",l(le,ne)).call(t.setClipUrl,U._hasClipOnAxisFalse?null:U.clipIds.forTraces,U.gd),H.bg.attr("d",Pt).attr("transform",l(Ve,je)).call(e.fill,ae.bgcolor)},B.mockAxis=function(te,ae,U,H){var K=w.extendFlat({},U,H);return i(K,ae,te),K},B.mockCartesianAxis=function(te,ae,U){var H=this,K=H.isSmith,V=U._id,$=w.extendFlat({type:"linear"},U);n($,te);var X={x:[0,2],y:[1,3]};return $.setRange=function(){var Z=H.sectorBBox,Q=X[V],re=H.radialAxis._rl,ce=(re[1]-re[0])/(1-H.getHole(ae));$.range=[Z[Q[0]]*ce,Z[Q[1]]*ce]},$.isPtWithinRange=V==="x"&&!K?function(Z){return H.isPtInside(Z)}:function(){return!0},$.setRange(),$.setScale(),$},B.doAutoRange=function(te,ae){var U=this,H=U.gd,K=U.radialAxis,V=U.getRadial(ae);s(H,K);var $=K.range;if(V.range=$.slice(),V._input.range=$.slice(),K._rl=[K.r2l($[0],null,"gregorian"),K.r2l($[1],null,"gregorian")],K.minallowed!==void 0){var X=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],X):K._rl[0]=Math.max(K._rl[0],X)}if(K.maxallowed!==void 0){var Z=K.r2l(K.maxallowed);K._rl[0]90&&re<=270&&(ce.tickangle=180);var Ae=ye?function(be){var Fe=C(U,b([be.x,0]));return l(Fe[0]-X,Fe[1]-Z)}:function(be){return l(ce.l2p(be.x)+$,0)},Se=ye?function(be){return I(U,be.x,-1/0,1/0)}:function(be){return U.pathArc(ce.r2p(be.x)+$)},Ce=O(Q);if(U.radialTickLayout!==Ce&&(K["radial-axis"].selectAll(".xtick").remove(),U.radialTickLayout=Ce),me){ce.setScale();var qe=0,Ue=ye?(ce.tickvals||[]).filter(function(be){return be>=0}).map(function(be){return r.tickText(ce,be,!0,!1)}):r.calcTicks(ce),xe=ye?Ue:r.clipEnds(ce,Ue),he=r.getTickSigns(ce)[2];ye&&((ce.ticks==="top"&&ce.side==="bottom"||ce.ticks==="bottom"&&ce.side==="top")&&(he=-he),ce.ticks==="top"&&ce.side==="top"&&(qe=-ce.ticklen),ce.ticks==="bottom"&&ce.side==="bottom"&&(qe=ce.ticklen)),r.drawTicks(H,ce,{vals:Ue,layer:K["radial-axis"],path:r.makeTickPath(ce,0,he),transFn:Ae,crisp:!1}),r.drawGrid(H,ce,{vals:xe,layer:K["radial-grid"],path:Se,transFn:w.noop,crisp:!1}),r.drawLabels(H,ce,{vals:Ue,layer:K["radial-axis"],transFn:Ae,labelFns:r.makeLabelFns(ce,qe)})}var oe=U.radialAxisAngle=U.vangles?D(Y(z(Q.angle),U.vangles)):Q.angle,le=l(X,Z),ne=le+S(-oe);ee(K["radial-axis"],me&&(Q.showticklabels||Q.ticks),{transform:ne}),ee(K["radial-grid"],me&&Q.showgrid,{transform:ye?"":le}),ee(K["radial-line"].select("line"),me&&Q.showline,{x1:ye?-V:$,y1:0,x2:V,y2:0,transform:ne}).attr("stroke-width",Q.linewidth).call(e.stroke,Q.linecolor)},B.updateRadialAxisTitle=function(te,ae,U){if(!this.isSmith){var H=this,K=H.gd,V=H.radius,$=H.cx,X=H.cy,Z=H.getRadial(ae),Q=H.id+"title",re=0;if(Z.title){var ce=t.bBox(H.layers["radial-axis"].node()).height,me=Z.title.font.size,ye=Z.side;re=ye==="top"?me:ye==="counterclockwise"?-(ce+me*.4):ce+me*.8}var Ae=U!==void 0?U:H.radialAxisAngle,Se=z(Ae),Ce=Math.cos(Se),qe=Math.sin(Se),Ue=$+V/2*Ce+re*qe,xe=X-V/2*qe+re*Ce;H.layers["radial-axis-title"]=d.draw(K,Q,{propContainer:Z,propName:H.id+".radialaxis.title.text",placeholder:F(K,"Click to enter radial axis title"),attributes:{x:Ue,y:xe,"text-anchor":"middle"},transform:{rotate:-Ae}})}},B.updateAngularAxis=function(te,ae){var U=this,H=U.gd,K=U.layers,V=U.radius,$=U.innerRadius,X=U.cx,Z=U.cy,Q=U.getAngular(ae),re=U.angularAxis,ce=U.isSmith;ce||(U.fillViewInitialKey("angularaxis.rotation",Q.rotation),re.setGeometry(),re.setScale());var me=ce?function(Fe){var Ve=C(U,b([0,Fe.x]));return Math.atan2(Ve[0]-X,Ve[1]-Z)-Math.PI/2}:function(Fe){return re.t2g(Fe.x)};re.type==="linear"&&re.thetaunit==="radians"&&(re.tick0=D(re.tick0),re.dtick=D(re.dtick));var ye=function(Fe){return l(X+V*Math.cos(Fe),Z-V*Math.sin(Fe))},Ae=ce?function(Fe){var Ve=C(U,b([0,Fe.x]));return l(Ve[0],Ve[1])}:function(Fe){return ye(me(Fe))},Se=ce?function(Fe){var Ve=C(U,b([0,Fe.x])),je=Math.atan2(Ve[0]-X,Ve[1]-Z)-Math.PI/2;return l(Ve[0],Ve[1])+S(-D(je))}:function(Fe){var Ve=me(Fe);return ye(Ve)+S(-D(Ve))},Ce=ce?function(Fe){return _(U,Fe.x,0,1/0)}:function(Fe){var Ve=me(Fe),je=Math.cos(Ve),ut=Math.sin(Ve);return"M"+[X+$*je,Z-$*ut]+"L"+[X+V*je,Z-V*ut]},qe=r.makeLabelFns(re,0),Ue=qe.labelStandoff,xe={};xe.xFn=function(Fe){var Ve=me(Fe);return Math.cos(Ve)*Ue},xe.yFn=function(Fe){var Ve=me(Fe),je=Math.sin(Ve)>0?.2:1;return-Math.sin(Ve)*(Ue+Fe.fontSize*je)+Math.abs(Math.cos(Ve))*(Fe.fontSize*g)},xe.anchorFn=function(Fe){var Ve=me(Fe),je=Math.cos(Ve);return Math.abs(je)<.1?"middle":je>0?"start":"end"},xe.heightFn=function(Fe,Ve,je){var ut=me(Fe);return-.5*(1+Math.sin(ut))*je};var he=O(Q);U.angularTickLayout!==he&&(K["angular-axis"].selectAll("."+re._id+"tick").remove(),U.angularTickLayout=he);var oe=ce?[1/0].concat(re.tickvals||[]).map(function(Fe){return r.tickText(re,Fe,!0,!1)}):r.calcTicks(re);ce&&(oe[0].text="\u221E",oe[0].fontSize*=1.75);var le;if(ae.gridshape==="linear"?(le=oe.map(me),w.angleDelta(le[0],le[1])<0&&(le=le.slice().reverse())):le=null,U.vangles=le,re.type==="category"&&(oe=oe.filter(function(Fe){return w.isAngleInsideSector(me(Fe),U.sectorInRad)})),re.visible){var ne=re.ticks==="inside"?-1:1,be=(re.linewidth||1)/2;r.drawTicks(H,re,{vals:oe,layer:K["angular-axis"],path:"M"+ne*be+",0h"+ne*re.ticklen,transFn:Se,crisp:!1}),r.drawGrid(H,re,{vals:oe,layer:K["angular-grid"],path:Ce,transFn:w.noop,crisp:!1}),r.drawLabels(H,re,{vals:oe,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Ae,labelFns:xe})}ee(K["angular-line"].select("path"),Q.showline,{d:U.pathSubplot(),transform:l(X,Z)}).attr("stroke-width",Q.linewidth).call(e.stroke,Q.linecolor)},B.updateFx=function(te,ae){if(!this.gd._context.staticPlot){var U=!this.isSmith;U&&(this.updateAngularDrag(te),this.updateRadialDrag(te,ae,0),this.updateRadialDrag(te,ae,1)),this.updateHoverAndMainDrag(te)}},B.updateHoverAndMainDrag=function(te){var ae=this,U=ae.isSmith,H=ae.gd,K=ae.layers,V=te._zoomlayer,$=A.MINZOOM,X=A.OFFEDGE,Z=ae.radius,Q=ae.innerRadius,re=ae.cx,ce=ae.cy,me=ae.cxx,ye=ae.cyy,Ae=ae.sectorInRad,Se=ae.vangles,Ce=ae.radialAxis,qe=m.clampTiny,Ue=m.findXYatLength,xe=m.findEnclosingVertexAngles,he=A.cornerHalfWidth,oe=A.cornerLen/2,le,ne,be=c.makeDragger(K,"path","maindrag",te.dragmode===!1?"none":"crosshair");u.select(be).attr("d",ae.pathSubplot()).attr("transform",l(re,ce)),be.onmousemove=function(_t){f.hover(H,_t,ae.id),H._fullLayout._lasthover=be,H._fullLayout._hoversubplot=ae.id},be.onmouseout=function(_t){H._dragging||p.unhover(H,_t)};var Fe={element:be,gd:H,subplot:ae.id,plotinfo:{id:ae.id,xaxis:ae.xaxis,yaxis:ae.yaxis},xaxes:[ae.xaxis],yaxes:[ae.yaxis]},Ve,je,ut,st,yt,At,Pt,Zt,vr;function Nt(_t,Ft){return Math.sqrt(_t*_t+Ft*Ft)}function Kt(_t,Ft){return Nt(_t-me,Ft-ye)}function nt(_t,Ft){return Math.atan2(ye-Ft,_t-me)}function Ee(_t,Ft){return[_t*Math.cos(Ft),_t*Math.sin(-Ft)]}function ze(_t,Ft){if(_t===0)return ae.pathSector(2*he);var St=oe/_t,hr=Ft-St,jr=Ft+St,ra=Math.max(0,Math.min(_t,Z)),$r=ra-he,pa=ra+he;return"M"+Ee($r,hr)+"A"+[$r,$r]+" 0,0,0 "+Ee($r,jr)+"L"+Ee(pa,jr)+"A"+[pa,pa]+" 0,0,1 "+Ee(pa,hr)+"Z"}function ve(_t,Ft,St){if(_t===0)return ae.pathSector(2*he);var hr=Ee(_t,Ft),jr=Ee(_t,St),ra=qe((hr[0]+jr[0])/2),$r=qe((hr[1]+jr[1])/2),pa,oa;if(ra&&$r){var aa=$r/ra,ka=-1/aa,Ta=Ue(he,aa,ra,$r);pa=Ue(oe,ka,Ta[0][0],Ta[0][1]),oa=Ue(oe,ka,Ta[1][0],Ta[1][1])}else{var Da,La;$r?(Da=oe,La=he):(Da=he,La=oe),pa=[[ra-Da,$r-La],[ra+Da,$r-La]],oa=[[ra-Da,$r+La],[ra+Da,$r+La]]}return"M"+pa.join("L")+"L"+oa.reverse().join("L")+"Z"}function _e(){ut=null,st=null,yt=ae.pathSubplot(),At=!1;var _t=H._fullLayout[ae.id];Pt=e.color(_t.bgcolor).luminosity(),Zt=c.makeZoombox(V,Pt,re,ce,yt),Zt.attr("fill-rule","evenodd"),vr=c.makeCorners(V,re,ce),x(H)}function Ie(_t,Ft){return Ft=Math.max(Math.min(Ft,Z),Q),_t$?(_t-1&&_t===1&&o(Ft,H,[ae.xaxis],[ae.yaxis],ae.id,Fe),St.indexOf("event")>-1&&f.click(H,Ft,ae.id)}Fe.prepFn=function(_t,Ft,St){var hr=H._fullLayout.dragmode,jr=be.getBoundingClientRect();H._fullLayout._calcInverseTransform(H);var ra=H._fullLayout._invTransform;le=H._fullLayout._invScaleX,ne=H._fullLayout._invScaleY;var $r=w.apply3DTransform(ra)(Ft-jr.left,St-jr.top);if(Ve=$r[0],je=$r[1],Se){var pa=m.findPolygonOffset(Z,Ae[0],Ae[1],Se);Ve+=me+pa[0],je+=ye+pa[1]}switch(hr){case"zoom":Fe.clickFn=gt,U||(Se?Fe.moveFn=mt:Fe.moveFn=We,Fe.doneFn=ft,_e(_t,Ft,St));break;case"select":case"lasso":y(_t,Ft,St,Fe,hr);break}},p.init(Fe)},B.updateRadialDrag=function(te,ae,U){var H=this,K=H.gd,V=H.layers,$=H.radius,X=H.innerRadius,Z=H.cx,Q=H.cy,re=H.radialAxis,ce=A.radialDragBoxSize,me=ce/2;if(!re.visible)return;var ye=z(H.radialAxisAngle),Ae=re._rl,Se=Ae[0],Ce=Ae[1],qe=Ae[U],Ue=.75*(Ae[1]-Ae[0])/(1-H.getHole(ae))/$,xe,he,oe;U?(xe=Z+($+me)*Math.cos(ye),he=Q-($+me)*Math.sin(ye),oe="radialdrag"):(xe=Z+(X-me)*Math.cos(ye),he=Q-(X-me)*Math.sin(ye),oe="radialdrag-inner");var le=c.makeRectDragger(V,oe,"crosshair",-me,-me,ce,ce),ne={element:le,gd:K};te.dragmode===!1&&(ne.dragmode=!1),ee(u.select(le),re.visible&&X<$,{transform:l(xe,he)});var be,Fe,Ve;function je(Pt,Zt){if(be)be(Pt,Zt);else{var vr=[Pt,-Zt],Nt=[Math.cos(ye),Math.sin(ye)],Kt=Math.abs(w.dot(vr,Nt)/Math.sqrt(w.dot(vr,vr)));isNaN(Kt)||(be=Kt<.5?yt:At)}var nt={};ut(nt),K.emit("plotly_relayouting",nt)}function ut(Pt){Fe!==null?Pt[H.id+".radialaxis.angle"]=Fe:Ve!==null&&(Pt[H.id+".radialaxis.range["+U+"]"]=Ve)}function st(){Fe!==null?v.call("_guiRelayout",K,H.id+".radialaxis.angle",Fe):Ve!==null&&v.call("_guiRelayout",K,H.id+".radialaxis.range["+U+"]",Ve)}function yt(Pt,Zt){if(U!==0){var vr=xe+Pt,Nt=he+Zt;Fe=Math.atan2(Q-Nt,vr-Z),H.vangles&&(Fe=Y(Fe,H.vangles)),Fe=D(Fe);var Kt=l(Z,Q)+S(-Fe);V["radial-axis"].attr("transform",Kt),V["radial-line"].select("line").attr("transform",Kt);var nt=H.gd._fullLayout,Ee=nt[H.id];H.updateRadialAxisTitle(nt,Ee,Fe)}}function At(Pt,Zt){var vr=w.dot([Pt,-Zt],[Math.cos(ye),Math.sin(ye)]);if(Ve=qe-Ue*vr,Ue>0!=(U?Ve>Se:Ve=90||K>90&&V>=450?ye=1:X<=0&&Q<=0?ye=0:ye=Math.max(X,Q),K<=180&&V>=180||K>180&&V>=540?re=-1:$>=0&&Z>=0?re=0:re=Math.min($,Z),K<=270&&V>=270||K>270&&V>=630?ce=-1:X>=0&&Q>=0?ce=0:ce=Math.min(X,Q),V>=360?me=1:$<=0&&Z<=0?me=0:me=Math.max($,Z),[re,ce,me,ye]}function Y(te,ae){var U=function(K){return w.angleDist(te,K)},H=w.findIndexOfMin(ae,U);return ae[H]}function ee(te,ae,U){return ae?(te.attr("display",null),te.attr(U)):te&&te.attr("display","none"),te}}}),q6=De({"src/plots/polar/layout_attributes.js"(j,N){"use strict";var u=mc(),v=hf(),w=ql().attributes,S=Ar().extendFlat,l=Ul().overrideAll,e=l({color:v.color,showline:S({},v.showline,{dflt:!0}),linecolor:v.linecolor,linewidth:v.linewidth,showgrid:S({},v.showgrid,{dflt:!0}),gridcolor:v.gridcolor,gridwidth:v.gridwidth,griddash:v.griddash},"plot","from-root"),t=l({tickmode:v.minor.tickmode,nticks:v.nticks,tick0:v.tick0,dtick:v.dtick,tickvals:v.tickvals,ticktext:v.ticktext,ticks:v.ticks,ticklen:v.ticklen,tickwidth:v.tickwidth,tickcolor:v.tickcolor,ticklabelstep:v.ticklabelstep,showticklabels:v.showticklabels,labelalias:v.labelalias,minorloglabels:v.minorloglabels,showtickprefix:v.showtickprefix,tickprefix:v.tickprefix,showticksuffix:v.showticksuffix,ticksuffix:v.ticksuffix,showexponent:v.showexponent,exponentformat:v.exponentformat,minexponent:v.minexponent,separatethousands:v.separatethousands,tickfont:v.tickfont,tickangle:v.tickangle,tickformat:v.tickformat,tickformatstops:v.tickformatstops,layer:v.layer},"plot","from-root"),a={visible:S({},v.visible,{dflt:!0}),type:S({},v.type,{values:["-","linear","log","date","category"]}),autotypenumbers:v.autotypenumbers,autorangeoptions:{minallowed:v.autorangeoptions.minallowed,maxallowed:v.autorangeoptions.maxallowed,clipmin:v.autorangeoptions.clipmin,clipmax:v.autorangeoptions.clipmax,include:v.autorangeoptions.include,editType:"plot"},autorange:S({},v.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:S({},v.minallowed,{editType:"plot"}),maxallowed:S({},v.maxallowed,{editType:"plot"}),range:S({},v.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:v.categoryorder,categoryarray:v.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:v.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:S({},v.title.text,{editType:"plot",dflt:""}),font:S({},v.title.font,{editType:"plot"}),editType:"plot"},hoverformat:v.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(a,e,t);var r={visible:S({},v.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:v.autotypenumbers,categoryorder:v.categoryorder,categoryarray:v.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:v.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};S(r,e,t),N.exports={domain:w({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:u.background},radialaxis:a,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),qq=De({"src/plots/polar/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=ii(),w=ws(),S=Ip(),l=Bf().getSubplotData,e=Mp(),t=hm(),a=Gv(),r=Vv(),n=nx(),i=R1(),s=z3(),c=dm(),p=q6(),f=N6(),d=a2(),y=d.axisNames;function o(M,T,E,g){var A=E("bgcolor");g.bgColor=v.combine(A,g.paper_bgcolor);var m=E("sector");E("hole");var h=l(g.fullData,d.name,g.id),b=g.layoutOut,_;function I(me,ye){return E(_+"."+me,ye)}for(var C=0;C")}}N.exports={hoverPoints:v,makeHoverPointText:w}}}),Hq=De({"src/traces/scatterpolar/index.js"(j,N){"use strict";N.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:i2(),categories:["polar","symbols","showLegend","scatter-like"],attributes:Eg(),supplyDefaults:o2().supplyDefaults,colorbar:Nf(),formatLabels:s2(),calc:Gq(),plot:Vq(),style:bh().style,styleOnSelect:bh().styleOnSelect,hoverPoints:l2().hoverPoints,selectPoints:Pp(),meta:{}}}}),Wq=De({"lib/scatterpolar.js"(j,N){"use strict";N.exports=Hq()}}),G6=De({"src/traces/scatterpolargl/attributes.js"(j,N){"use strict";var u=Eg(),{cliponaxis:v,hoveron:w}=u,S=jo(u,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:a},fill:r,fillcolor:n,marker:i,textfont:s,textposition:c}=_g();N.exports=co(Si({},S),{connectgaps:l,fill:r,fillcolor:n,line:{color:e,dash:t,editType:"calc",width:a},marker:i,textfont:s,textposition:c})}}),Yq=De({"src/traces/scatterpolargl/defaults.js"(j,N){"use strict";var u=Ar(),v=Sl(),w=o2().handleRThetaDefaults,S=Jh(),l=cd(),e=fd(),t=Ld(),a=kd().PTS_LINESONLY,r=G6();N.exports=function(i,s,c,p){function f(y,o){return u.coerce(i,s,r,y,o)}var d=w(i,s,p,f);if(!d){s.visible=!1;return}f("thetaunit"),f("mode",d=t&&(g.marker.cluster=x.tree),g.marker&&(g.markerSel.positions=g.markerUnsel.positions=g.marker.positions=b),g.line&&b.length>1&&e.extendFlat(g.line,l.linePositions(n,o,b)),g.text&&(e.extendFlat(g.text,{positions:b},l.textPosition(n,o,g.text,g.marker)),e.extendFlat(g.textSel,{positions:b},l.textPosition(n,o,g.text,g.markerSel)),e.extendFlat(g.textUnsel,{positions:b},l.textPosition(n,o,g.text,g.markerUnsel))),g.fill&&!f.fill2d&&(f.fill2d=!0),g.marker&&!f.scatter2d&&(f.scatter2d=!0),g.line&&!f.line2d&&(f.line2d=!0),g.text&&!f.glText&&(f.glText=!0),f.lineOptions.push(g.line),f.fillOptions.push(g.fill),f.markerOptions.push(g.marker),f.markerSelectedOptions.push(g.markerSel),f.markerUnselectedOptions.push(g.markerUnsel),f.textOptions.push(g.text),f.textSelectedOptions.push(g.textSel),f.textUnselectedOptions.push(g.textUnsel),f.selectBatch.push([]),f.unselectBatch.push([]),x.x=_,x.y=I,x.rawx=_,x.rawy=I,x.r=T,x.theta=E,x.positions=b,x._scene=f,x.index=f.count,f.count++}}),w(n,i,s)}},N.exports.reglPrecompiled=a}}),Qq=De({"src/traces/scatterpolargl/index.js"(j,N){"use strict";var u=Kq();u.plot=Jq(),N.exports=u}}),eG=De({"lib/scatterpolargl.js"(j,N){"use strict";N.exports=Qq()}}),V6=De({"src/traces/barpolar/attributes.js"(j,N){"use strict";var{hovertemplateAttrs:u,templatefallbackAttrs:v}=Is(),w=Ji().extendFlat,S=Eg(),l=Rd();N.exports={r:S.r,theta:S.theta,r0:S.r0,dr:S.dr,theta0:S.theta0,dtheta:S.dtheta,thetaunit:S.thetaunit,base:w({},l.base,{}),offset:w({},l.offset,{}),width:w({},l.width,{}),text:w({},l.text,{}),hovertext:w({},l.hovertext,{}),marker:e(),hoverinfo:S.hoverinfo,hovertemplate:u(),hovertemplatefallback:v(),selected:l.selected,unselected:l.unselected};function e(){var t=w({},l.marker);return delete t.cornerradius,t}}}),H6=De({"src/traces/barpolar/layout_attributes.js"(j,N){"use strict";N.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),tG=De({"src/traces/barpolar/defaults.js"(j,N){"use strict";var u=Ar(),v=o2().handleRThetaDefaults,w=dx(),S=V6();N.exports=function(e,t,a,r){function n(s,c){return u.coerce(e,t,S,s,c)}var i=v(e,t,r,n);if(!i){t.visible=!1;return}n("thetaunit"),n("base"),n("offset"),n("width"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),w(e,t,n,a,r),u.coerceSelectionMarkerOpacity(t,n)}}}),rG=De({"src/traces/barpolar/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=H6();N.exports=function(w,S,l){var e={},t;function a(i,s){return u.coerce(w[t]||{},S[t],v,i,s)}for(var r=0;r0?(p=s,f=c):(p=c,f=s);var d=l.findEnclosingVertexAngles(p,t.vangles)[0],y=l.findEnclosingVertexAngles(f,t.vangles)[1],o=[d,(p+f)/2,y];return l.pathPolygonAnnulus(n,i,p,f,o,a,r)}:function(n,i,s,c){return w.pathAnnulus(n,i,s,c,a,r)}}}}),nG=De({"src/traces/barpolar/hover.js"(j,N){"use strict";var u=uu(),v=Ar(),w=_m().getTraceColor,S=v.fillText,l=l2().makeHoverPointText,e=n2().isPtInsidePolygon;N.exports=function(a,r,n){var i=a.cd,s=i[0].trace,c=a.subplot,p=c.radialAxis,f=c.angularAxis,d=c.vangles,y=d?e:v.isPtInsideSector,o=a.maxHoverDistance,x=f._period||2*Math.PI,M=Math.abs(p.g2p(Math.sqrt(r*r+n*n))),T=Math.atan2(n,r);p.range[0]>p.range[1]&&(T+=Math.PI);var E=function(h){return y(M,T,[h.rp0,h.rp1],[h.thetag0,h.thetag1],d)?o+Math.min(1,Math.abs(h.thetag1-h.thetag0)/x)-1+(h.rp1-M)/(h.rp1-h.rp0)-1:1/0};if(u.getClosest(i,E,a),a.index!==!1){var g=a.index,A=i[g];a.x0=a.x1=A.ct[0],a.y0=a.y1=A.ct[1];var m=v.extendFlat({},A,{r:A.s,theta:A.p});return S(A,s,a),l(m,s,c,a),a.hovertemplate=s.hovertemplate,a.color=w(s,A),a.xLabelVal=a.yLabelVal=void 0,A.s<0&&(a.idealAlign="left"),[a]}}}}),iG=De({"src/traces/barpolar/index.js"(j,N){"use strict";N.exports={moduleType:"trace",name:"barpolar",basePlotModule:i2(),categories:["polar","bar","showLegend"],attributes:V6(),layoutAttributes:H6(),supplyDefaults:tG(),supplyLayoutDefaults:rG(),calc:W6().calc,crossTraceCalc:W6().crossTraceCalc,plot:aG(),colorbar:Nf(),formatLabels:s2(),style:td().style,styleOnSelect:td().styleOnSelect,hoverPoints:nG(),selectPoints:xm(),meta:{}}}}),oG=De({"lib/barpolar.js"(j,N){"use strict";N.exports=iG()}}),Y6=De({"src/plots/smith/constants.js"(j,N){"use strict";N.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),X6=De({"src/plots/smith/layout_attributes.js"(j,N){"use strict";var u=mc(),v=hf(),w=ql().attributes,S=Ar().extendFlat,l=Ul().overrideAll,e=l({color:v.color,showline:S({},v.showline,{dflt:!0}),linecolor:v.linecolor,linewidth:v.linewidth,showgrid:S({},v.showgrid,{dflt:!0}),gridcolor:v.gridcolor,gridwidth:v.gridwidth,griddash:v.griddash},"plot","from-root"),t=l({ticklen:v.ticklen,tickwidth:S({},v.tickwidth,{dflt:2}),tickcolor:v.tickcolor,showticklabels:v.showticklabels,labelalias:v.labelalias,showtickprefix:v.showtickprefix,tickprefix:v.tickprefix,showticksuffix:v.showticksuffix,ticksuffix:v.ticksuffix,tickfont:v.tickfont,tickformat:v.tickformat,hoverformat:v.hoverformat,layer:v.layer},"plot","from-root"),a=S({visible:S({},v.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:S({},v.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=S({visible:S({},v.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:v.ticks,editType:"calc"},e,t);N.exports={domain:w({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:u.background},realaxis:a,imaginaryaxis:r,editType:"calc"}}}),sG=De({"src/plots/smith/layout_defaults.js"(j,N){"use strict";var u=Ar(),v=ii(),w=ws(),S=Ip(),l=Bf().getSubplotData,e=Vv(),t=Gv(),a=R1(),r=Sd(),n=X6(),i=Y6(),s=i.axisNames,c=f(function(d){return u.isTypedArray(d)&&(d=Array.from(d)),d.slice().reverse().map(function(y){return-y}).concat([0]).concat(d)},String);function p(d,y,o,x){var M=o("bgcolor");x.bgColor=v.combine(M,x.paper_bgcolor);var T=l(x.fullData,i.name,x.id),E=x.layoutOut,g;function A(O,q){return o(g+"."+O,q)}for(var m=0;m")}}N.exports={hoverPoints:v,makeHoverPointText:w}}}),vG=De({"src/traces/scattersmith/index.js"(j,N){"use strict";N.exports={moduleType:"trace",name:"scattersmith",basePlotModule:lG(),categories:["smith","symbols","showLegend","scatter-like"],attributes:Z6(),supplyDefaults:uG(),colorbar:Nf(),formatLabels:cG(),calc:fG(),plot:hG(),style:bh().style,styleOnSelect:bh().styleOnSelect,hoverPoints:dG().hoverPoints,selectPoints:Pp(),meta:{}}}}),pG=De({"lib/scattersmith.js"(j,N){"use strict";N.exports=vG()}}),$6=De({"src/traces/quiver/attributes.js"(j,N){"use strict";var u=Bs(),v=Is().hovertemplateAttrs,w=Zl().axisHoverFormat,S=Ji().extendFlat,l=ul(),e=Hc().dash,t=Xv(),a=bu(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:a.x0,dx:a.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:a.y0,dy:a.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},anglemode:{valType:"enumerated",values:["paper","data"],dflt:"axis",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:w("x"),yhoverformat:w("y"),uhoverformat:w("u","noDate"),vhoverformat:w("v","noDate"),hoverinfo:S({},u.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:v({},{keys:["x","y","u","v","text","name"]}),text:a.text,textposition:a.textposition,textfont:a.textfont,marker:S({arrowsize:S({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};N.exports=r}}),mG=De({"src/traces/quiver/defaults.js"(j,N){"use strict";var u=Ar(),v=$6(),w=kp(),S=Of().hasColorscale,l=Wc();N.exports=function(t,a,r,n){function i(M,T){return u.coerce(t,a,v,M,T)}var s=w(t,a,n,i);if(!s){a.visible=!1;return}var c=i("u"),p=i("v");if(!u.isArrayOrTypedArray(c)||c.length===0){a.u=new Array(s);for(var f=0;fC&&(C=s[q]),c[q]R&&(R=c[q]),aeD&&(D=ae),UB&&(B=U);var H=Math.sqrt(ae*ae+U*U);if(H>y&&(y=H),Hx&&(x=K))}}else Y.x=S,Y.y=S}if(r._maxNorm=y,m==="scaled"||A==="paper"){let ye=(C-I)*(R-F)/p;ye===0?r._scaleFactor=1/r._maxNorm:r._scaleFactor=Math.sqrt(ye)/r._maxNorm}else r._scaleFactor=1;r._scaleFactor*=r.sizeref;let V=new Array(p),$=new Array(p),X=new Array(p),Z=new Array(p);for(var Q,re,q=0;qp.i&&isFinite(f[p.i]))d=f[p.i];else{var y=i.u&&i.u[p.i]||0,o=i.v&&i.v[p.i]||0;d=Math.sqrt(y*y+o*o)}return c(d)})}function t(n){var i=u.select(n).selectAll("g.trace.quiver");i.each(function(s){r(n,s,u.select(this))})}function a(n,i,s){r(n,i,s)}function r(n,i,s){var c=i[0].trace,p=c.marker||{},f=p.line||{},d=v.isArrayOrTypedArray(p.color)?void 0:p.color,y=c._hasColorscale;if(s)if(c.selectedpoints){var o=(c.selected||{}).marker||{},x=(c.unselected||{}).marker||{},M=o.line||{},T=x.line||{};s.selectAll("path.js-line").each(function(g){var A=u.select(this),m=!g.selected,h=m?x.color:o.color,b=m?T.width!==void 0?T.width:f.width:M.width!==void 0?M.width:f.width;h?(w.lineGroupStyle(A,b,h,f.dash),A.style("stroke-opacity",1)):(w.lineGroupStyle(A,b,d,f.dash),y&&e(A,c),A.style("stroke-opacity",m?l:1))}),w.selectedTextStyle(s.selectAll("text"),c)}else{var E=s.selectAll("path.js-line");E.call(w.lineGroupStyle,f.width,d,f.dash),y&&e(E,c),E.style("stroke-opacity",1),w.textPointStyle(s.selectAll("text"),c,n)}}N.exports={style:t,styleOnSelect:a,colorscaleStroke:e}}}),_G=De({"src/traces/quiver/plot.js"(j,N){"use strict";var u=Qn(),v=Ar(),w=Ki(),S=u2().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,a=.7;N.exports=function(i,s,c,p,f,d){var y,o,x=!f,M=!!f&&f.duration>0;if(y=p.selectAll("g.trace").data(c,function(E){return E[0].trace.uid}),y.enter().append("g").attr("class",function(E){return"trace quiver trace"+E[0].trace.uid}).style("stroke-miterlimit",2),y.order(),M){d&&(o=d());var T=u.transition().duration(f.duration).ease(f.easing).each("end",function(){o&&o()}).each("interrupt",function(){o&&o()});T.each(function(){p.selectAll("g.trace").each(function(E,g){r(i,g,s,E,c,this,f)})})}else y.each(function(E,g){r(i,g,s,E,c,this,f)});x&&y.exit().remove()};function r(n,i,s,c,p,f,d){var y=c[0].trace,o=s.xaxis,x=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=u.select(f);var M=u.select(f).selectAll("g.lines").data([c]);M.enter().append("g").classed("lines",!0),w.setClipUrl(M,s.layerClipId,n);var T=M.selectAll("path.js-line").data(c);T.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),T.exit().remove();let E=y._maxNorm||0,g=y.anglemode,A=y.sizemode,m=y.sizeref,h=y.anchor,b=g==="paper"?y._scaleFactor*Math.sqrt(Math.abs(o._m*x._m)):y._scaleFactor,_=y.marker.arrowsize;T.each(function(k){let B=u.select(this);if(k.x===void 0||k.y===void 0){B.attr("d",null);return}let O=(g==="paper"?k._u*Math.sign(o._m):u.round(o._m*k._u))*b,q=(g==="paper"?k._v*Math.sign(x._m):u.round(x._m*k._v))*b,Y=(y._input.marker||{}).arrowsize!==void 0;var ee,te,ae,U;h==="tip"?(ee=o.c2p(k.x)-O,ae=x.c2p(k.y)-q,te=o.c2p(k.x),U=x.c2p(k.y)):h==="center"?(ee=o.c2p(k.x)-O/2,ae=x.c2p(k.y)-q/2,te=o.c2p(k.x)+O/2,U=x.c2p(k.y)+q/2):(ee=o.c2p(k.x),ae=x.c2p(k.y),te=o.c2p(k.x)+O,U=x.c2p(k.y)+q),k._px0=ee,k._py0=ae,k._px1=te,k._py1=U;var H=y.marker.line.width;Y||(H=Math.max(H,t));let K=Math.sqrt((te-ee)*(te-ee)+(U-ae)*(U-ae)),V=a*K,$=Math.min(e*_*H,V),X=Math.atan2(U-ae,te-ee),Z=te-$*Math.cos(X-l),Q=U-$*Math.sin(X-l),re=te-$*Math.cos(X+l),ce=U-$*Math.sin(X+l),me="M"+ee+","+ae+"L"+te+","+U+"L"+Z+","+Q+"L"+te+","+U+"L"+re+","+ce;B.attr("d",me)});var I=y.marker||{},C=I.line||{},F=v.isArrayOrTypedArray(I.color)?void 0:I.color;w.lineGroupStyle(T,C.width,F,C.dash),y._hasColorscale&&S(T,y);var R=u.select(f).selectAll("g.text").data([c]);R.enter().append("g").classed("text",!0),w.setClipUrl(R,s.layerClipId,n);var z=R.selectAll("g.textpoint").data(c);if(z.enter().append("g").classed("textpoint",!0).append("text"),z.exit().remove(),z.each(function(k){var B=u.select(this),O=w.translatePoint(k,B.select("text"),o,x);O||B.remove()}),z.selectAll("text").call(w.textPointStyle,y,n).each(function(k){var B=o.c2p(k.x),O=x.c2p(k.y);u.select(this).selectAll("tspan.line").each(function(){u.select(this).attr({x:B,y:O})})}),d&&d.duration>0){var D=u.transition().duration(d.duration).ease(d.easing);T.transition(D).style("opacity",1)}}}}),xG=De({"src/traces/quiver/hover.js"(j,N){"use strict";var u=Ar(),v=uu(),w=gm();function S(l,e,t,a,r,n){let i=r-t,s=n-a,c=i*i+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-a)*(e-a));var p=((l-t)*i+(e-a)*s)/c;p=Math.max(0,Math.min(1,p));let f=t+p*i,d=a+p*s;return Math.sqrt((l-f)*(l-f)+(e-d)*(e-d))}N.exports=function(e,t,a,r){var n=e.cd,i=n[0].trace,s=e.xa,c=e.ya,p=s.c2p(t),f=c.c2p(a),d=function(A){return A._px0===void 0?1/0:S(p,f,A._px0,A._py0,A._px1,A._py1)};if(v.getClosest(n,d,e),e.index!==!1){var y=n[e.index],o=s.c2p(y.x,!0),x=c.c2p(y.y,!0),M=Math.sqrt((p-o)*(p-o)+(f-x)*(f-x));e.index=y.i;var T=i.u?i.u[y.i]:0,E=i.v?i.v[y.i]:0,g="u: "+T+", v: "+E;return u.extendFlat(e,{color:w(i,y),x0:o-3,x1:o+3,xLabelVal:y.x,y0:x-3,y1:x+3,yLabelVal:y.y,uLabelVal:T,vLabelVal:E,extraText:g,spikeDistance:M,hovertemplate:i.hovertemplate}),u.fillText(y,i,e),[e]}}}}),bG=De({"src/traces/quiver/format_labels.js"(j,N){"use strict";var u=Vi(),v=Ar();N.exports=function(S,l,e){var t={},a={_fullLayout:e},r=u.getFromTrace(a,l,"x"),n=u.getFromTrace(a,l,"y"),i=S.x,s=S.y;t.xLabel=u.tickText(r,r.c2l(i),!0).text,t.yLabel=u.tickText(n,n.c2l(s),!0).text;var c=l.u?l.u[S.i]:0,p=l.v?l.v[S.i]:0,f=l.uhoverformat,d=l.vhoverformat;return t.uLabel=f?v.numberFormat(f)(c):String(c),t.vLabel=d?v.numberFormat(d)(p):String(p),t}}}),wG=De({"src/traces/quiver/event_data.js"(j,N){"use strict";N.exports=function(v,w,S,l,e){return v.x=w.x,v.y=w.y,v.u=S.u?S.u[e]:void 0,v.v=S.v?S.v[e]:void 0,v}}}),AG=De({"src/traces/quiver/index.js"(j,N){"use strict";N.exports={moduleType:"trace",name:"quiver",basePlotModule:Hu(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:$6(),supplyDefaults:mG(),calc:gG(),crossTraceCalc:yG(),plot:_G(),style:u2().style,styleOnSelect:u2().styleOnSelect,hoverPoints:xG(),formatLabels:bG(),eventData:wG(),selectPoints:Pp(),colorbar:Nf(),animatable:!0,meta:{}}}}),TG=De({"lib/quiver.js"(j,N){"use strict";N.exports=AG()}}),Xf=De({"node_modules/world-calendars/dist/main.js"(j,N){var u=_c();function v(){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={}}u(v.prototype,{instance:function(a,r){a=(a||"gregorian").toLowerCase(),r=r||"";var n=this._localCals[a+"-"+r];if(!n&&this.calendars[a]&&(n=new this.calendars[a](r),this._localCals[a+"-"+r]=n),!n)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,a);return n},newDate:function(a,r,n,i,s){return i=(a!=null&&a.year?a.calendar():typeof i=="string"?this.instance(i,s):i)||this.instance(),i.newDate(a,r,n)},substituteDigits:function(a){return function(r){return(r+"").replace(/[0-9]/g,function(n){return a[n]})}},substituteChineseDigits:function(a,r){return function(n){for(var i="",s=0;n>0;){var c=n%10;i=(c===0?"":a[c]+r[s])+i,s++,n=Math.floor(n/10)}return i.indexOf(a[1]+r[1])===0&&(i=i.substr(1)),i||a[0]}}});function w(a,r,n,i){if(this._calendar=a,this._year=r,this._month=n,this._day=i,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function S(a,r){return a=""+a,"000000".substring(0,r-a.length)+a}u(w.prototype,{newDate:function(a,r,n){return this._calendar.newDate(a??this,r,n)},year:function(a){return arguments.length===0?this._year:this.set(a,"y")},month:function(a){return arguments.length===0?this._month:this.set(a,"m")},day:function(a){return arguments.length===0?this._day:this.set(a,"d")},date:function(a,r,n){if(!this._calendar.isValid(a,r,n))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=a,this._month=r,this._day=n,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(a,r){return this._calendar.add(this,a,r)},set:function(a,r){return this._calendar.set(this,a,r)},compareTo:function(a){if(this._calendar.name!==a._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,a._calendar.local.name);var r=this._year!==a._year?this._year-a._year:this._month!==a._month?this.monthOfYear()-a.monthOfYear():this._day-a._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(a){return this._calendar.fromJD(a)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(a){return this._calendar.fromJSDate(a)},toString:function(){return(this.year()<0?"-":"")+S(Math.abs(this.year()),4)+"-"+S(this.month(),2)+"-"+S(this.day(),2)}});function l(){this.shortYearCutoff="+10"}u(l.prototype,{_validateLevel:0,newDate:function(a,r,n){return a==null?this.today():(a.year&&(this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),n=a.day(),r=a.month(),a=a.year()),new w(this,a,r,n))},today:function(){return this.fromJSDate(new Date)},epoch:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+S(Math.abs(r.year()),4)},monthsInYear:function(a){return this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(a,r){var n=this._validate(a,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(n.month()+this.monthsInYear(n)-this.firstMonth)%this.monthsInYear(n)+this.minMonth},fromMonthOfYear:function(a,r){var n=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(a)+this.minMonth;return this._validate(a,n,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),n},daysInYear:function(a){var r=this._validate(a,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(a,r,n){var i=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate);return i.toJD()-this.newDate(i.year(),this.fromMonthOfYear(i.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(a,r,n){var i=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(i))+2)%this.daysInWeek()},extraInfo:function(a,r,n){return this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(a,r,n){return this._validate(a,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(a,this._add(a,r,n),r,n)},_add:function(a,r,n){if(this._validateLevel++,n==="d"||n==="w"){var i=a.toJD()+r*(n==="w"?this.daysInWeek():1),s=a.calendar().fromJD(i);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=a.year()+(n==="y"?r:0),p=a.monthOfYear()+(n==="m"?r:0),s=a.day(),f=function(o){for(;px-1+o.minMonth;)c++,p-=x,x=o.monthsInYear(c)};n==="y"?(a.month()!==this.fromMonthOfYear(c,p)&&(p=this.newDate(c,a.month(),this.minDay).monthOfYear()),p=Math.min(p,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,p)))):n==="m"&&(f(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,p))));var d=[c,this.fromMonthOfYear(c,p),s];return this._validateLevel--,d}catch(y){throw this._validateLevel--,y}},_correctAdd:function(a,r,n,i){if(!this.hasYearZero&&(i==="y"||i==="m")&&(r[0]===0||a.year()>0!=r[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[i],c=n<0?-1:1;r=this._add(a,n*s[0]+c*s[1],s[2])}return a.date(r[0],r[1],r[2])},set:function(a,r,n){this._validate(a,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var i=n==="y"?r:a.year(),s=n==="m"?r:a.month(),c=n==="d"?r:a.day();return(n==="y"||n==="m")&&(c=Math.min(c,this.daysInMonth(i,s))),a.date(i,s,c)},isValid:function(a,r,n){this._validateLevel++;var i=this.hasYearZero||a!==0;if(i){var s=this.newDate(a,r,this.minDay);i=r>=this.minMonth&&r-this.minMonth=this.minDay&&n-this.minDay13.5?13:1),y=s-(d>2.5?4716:4715);return y<=0&&y--,this.newDate(y,d,f)},toJSDate:function(a,r,n){var i=this._validate(a,r,n,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(i.year(),i.month()-1,i.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(a){return this.newDate(a.getFullYear(),a.getMonth()+1,a.getDate())}});var t=N.exports=new v;t.cdate=w,t.baseCalendar=l,t.calendars.gregorian=e}}),MG=De({"node_modules/world-calendars/dist/plus.js"(){var j=_c(),N=Xf();j(N.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"}),N.local=N.regionalOptions[""],j(N.cdate.prototype,{formatDate:function(u,v){return typeof u!="string"&&(v=u,u=""),this._calendar.formatDate(u||"",this,v)}}),j(N.baseCalendar.prototype,{UNIX_EPOCH:N.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:N.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,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(u,v,w){if(typeof u!="string"&&(w=v,v=u,u=""),!v)return"";if(v.calendar()!==this)throw N.local.invalidFormat||N.regionalOptions[""].invalidFormat;u=u||this.local.dateFormat,w=w||{};for(var S=w.dayNamesShort||this.local.dayNamesShort,l=w.dayNames||this.local.dayNames,e=w.monthNumbers||this.local.monthNumbers,t=w.monthNamesShort||this.local.monthNamesShort,a=w.monthNames||this.local.monthNames,r=w.calculateWeek||this.local.calculateWeek,n=function(T,E){for(var g=1;M+g1},i=function(T,E,g,A){var m=""+E;if(n(T,A))for(;m.length1},x=function(I,C){var F=o(I,C),R=[2,3,F?4:2,F?4:2,10,11,20]["oyYJ@!".indexOf(I)+1],z=new RegExp("^-?\\d{1,"+R+"}"),D=v.substring(m).match(z);if(!D)throw(N.local.missingNumberAt||N.regionalOptions[""].missingNumberAt).replace(/\{0\}/,m);return m+=D[0].length,parseInt(D[0],10)},M=this,T=function(){if(typeof a=="function"){o("m");var I=a.call(M,v.substring(m));return m+=I.length,I}return x("m")},E=function(I,C,F,R){for(var z=o(I,R)?F:C,D=0;D-1){c=1,p=f;for(var _=this.daysInMonth(s,c);p>_;_=this.daysInMonth(s,c))c++,p-=_}return i>-1?this.fromJD(i):this.newDate(s,c,p)},determineDate:function(u,v,w,S,l){w&&typeof w!="object"&&(l=S,S=w,w=null),typeof S!="string"&&(l=S,S="");var e=this,t=function(a){try{return e.parseDate(S,a,l)}catch{}a=a.toLowerCase();for(var r=(a.match(/^c/)&&w?w.newDate():null)||e.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=n.exec(a);i;)r.add(parseInt(i[1],10),i[2]||"d"),i=n.exec(a);return r};return v=v?v.newDate():null,u=u==null?v:typeof u=="string"?t(u):typeof u=="number"?isNaN(u)||u===1/0||u===-1/0?v:e.today().add(u,"d"):e.newDate(u),u}})}}),SG=De({"node_modules/world-calendars/dist/calendars/chinese.js"(){var j=Xf(),N=_c(),u=j.instance();function v(i){this.local=this.regionalOptions[i||""]||this.regionalOptions[""]}v.prototype=new j.baseCalendar,N(v.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(i,s){if(typeof i=="string"){var c=i.match(S);return c?c[0]:""}var p=this._validateYear(i),f=i.month(),d=""+this.toChineseMonth(p,f);return s&&d.length<2&&(d="0"+d),this.isIntercalaryMonth(p,f)&&(d+="i"),d},monthNames:function(i){if(typeof i=="string"){var s=i.match(l);return s?s[0]:""}var c=this._validateYear(i),p=i.month(),f=this.toChineseMonth(c,p),d=["\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"][f-1];return this.isIntercalaryMonth(c,p)&&(d="\u95F0"+d),d},monthNamesShort:function(i){if(typeof i=="string"){var s=i.match(e);return s?s[0]:""}var c=this._validateYear(i),p=i.month(),f=this.toChineseMonth(c,p),d=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][f-1];return this.isIntercalaryMonth(c,p)&&(d="\u95F0"+d),d},parseMonth:function(i,s){i=this._validateYear(i);var c=parseInt(s),p;if(isNaN(c))s[0]==="\u95F0"&&(p=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var f=s[s.length-1];p=f==="i"||f==="I"}var d=this.toMonthIndex(i,c,p);return d},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(i,s){if(i.year&&(i=i.year()),typeof i!="number"||i<1888||i>2111)throw s.replace(/\{0\}/,this.local.name);return i},toMonthIndex:function(i,s,c){var p=this.intercalaryMonth(i),f=c&&s!==p;if(f||s<1||s>12)throw j.local.invalidMonth.replace(/\{0\}/,this.local.name);var d;return p?!c&&s<=p?d=s-1:d=s:d=s-1,d},toChineseMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var c=this.intercalaryMonth(i),p=c?12:11;if(s<0||s>p)throw j.local.invalidMonth.replace(/\{0\}/,this.local.name);var f;return c?s>13;return c},isIntercalaryMonth:function(i,s){i.year&&(i=i.year(),s=i.month());var c=this.intercalaryMonth(i);return!!c&&c===s},leapYear:function(i){return this.intercalaryMonth(i)!==0},weekOfYear:function(i,s,c){var p=this._validateYear(i,j.local.invalidyear),f=a[p-a[0]],d=f>>9&4095,y=f>>5&15,o=f&31,x;x=u.newDate(d,y,o),x.add(4-(x.dayOfWeek()||7),"d");var M=this.toJD(i,s,c)-x.toJD();return 1+Math.floor(M/7)},monthsInYear:function(i){return this.leapYear(i)?13:12},daysInMonth:function(i,s){i.year&&(s=i.month(),i=i.year()),i=this._validateYear(i);var c=t[i-t[0]],p=c>>13,f=p?12:11;if(s>f)throw j.local.invalidMonth.replace(/\{0\}/,this.local.name);var d=c&1<<12-s?30:29;return d},weekDay:function(i,s,c){return(this.dayOfWeek(i,s,c)||7)<6},toJD:function(i,s,c){var p=this._validate(i,d,c,j.local.invalidDate);i=this._validateYear(p.year()),s=p.month(),c=p.day();var f=this.isIntercalaryMonth(i,s),d=this.toChineseMonth(i,s),y=n(i,d,c,f);return u.toJD(y.year,y.month,y.day)},fromJD:function(i){var s=u.fromJD(i),c=r(s.year(),s.month(),s.day()),p=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,p,c.day)},fromString:function(i){var s=i.match(w),c=this._validateYear(+s[1]),p=+s[2],f=!!s[3],d=this.toMonthIndex(c,p,f),y=+s[4];return this.newDate(c,d,y)},add:function(i,s,c){var p=i.year(),f=i.month(),d=this.isIntercalaryMonth(p,f),y=this.toChineseMonth(p,f),o=Object.getPrototypeOf(v.prototype).add.call(this,i,s,c);if(c==="y"){var x=o.year(),M=o.month(),T=this.isIntercalaryMonth(x,y),E=d&&T?this.toMonthIndex(x,y,!0):this.toMonthIndex(x,y,!1);E!==M&&o.month(E)}return o}});var w=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,S=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;j.calendars.chinese=v;var t=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],a=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function r(i,s,c,p){var f,d;if(typeof i=="object")f=i,d=s||{};else{var y=typeof i=="number"&&i>=1888&&i<=2111;if(!y)throw new Error("Solar year outside range 1888-2111");var o=typeof s=="number"&&s>=1&&s<=12;if(!o)throw new Error("Solar month outside range 1 - 12");var x=typeof c=="number"&&c>=1&&c<=31;if(!x)throw new Error("Solar day outside range 1 - 31");f={year:i,month:s,day:c},d=p||{}}var M=a[f.year-a[0]],T=f.year<<9|f.month<<5|f.day;d.year=T>=M?f.year:f.year-1,M=a[d.year-a[0]];var E=M>>9&4095,g=M>>5&15,A=M&31,m,h=new Date(E,g-1,A),b=new Date(f.year,f.month-1,f.day);m=Math.round((b-h)/(24*3600*1e3));var _=t[d.year-t[0]],I;for(I=0;I<13;I++){var C=_&1<<12-I?30:29;if(m>13;return!F||I=1888&&i<=2111;if(!o)throw new Error("Lunar year outside range 1888-2111");var x=typeof s=="number"&&s>=1&&s<=12;if(!x)throw new Error("Lunar month outside range 1 - 12");var M=typeof c=="number"&&c>=1&&c<=30;if(!M)throw new Error("Lunar day outside range 1 - 30");var T;typeof p=="object"?(T=!1,d=p):(T=!!p,d=f||{}),y={year:i,month:s,day:c,isIntercalary:T}}var E;E=y.day-1;var g=t[y.year-t[0]],A=g>>13,m;A&&(y.month>A||y.isIntercalary)?m=y.month:m=y.month-1;for(var h=0;h>9&4095,C=_>>5&15,F=_&31,R=new Date(I,C-1,F+E);return d.year=R.getFullYear(),d.month=1+R.getMonth(),d.day=R.getDate(),d}}}),EG=De({"node_modules/world-calendars/dist/calendars/coptic.js"(){var j=Xf(),N=_c();function u(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}u.prototype=new j.baseCalendar,N(u.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(S){var w=this._validate(S,this.minMonth,this.minDay,j.local.invalidYear),S=w.year()+(w.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,j.local.invalidYear||j.regionalOptions[""].invalidYear),13},weekOfYear:function(v,w,S){var l=this.newDate(v,w,S);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(v,w){var S=this._validate(v,w,this.minDay,j.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(v,w,S){return(this.dayOfWeek(v,w,S)||7)<6},toJD:function(v,w,S){var l=this._validate(v,w,S,j.local.invalidDate);return v=l.year(),v<0&&v++,l.day()+(l.month()-1)*30+(v-1)*365+Math.floor(v/4)+this.jdEpoch-1},fromJD:function(v){var w=Math.floor(v)+.5-this.jdEpoch,S=Math.floor((w-Math.floor((w+366)/1461))/365)+1;S<=0&&S--,w=Math.floor(v)+.5-this.newDate(S,1,1).toJD();var l=Math.floor(w/30)+1,e=w-(l-1)*30+1;return this.newDate(S,l,e)}}),j.calendars.coptic=u}}),kG=De({"node_modules/world-calendars/dist/calendars/discworld.js"(){var j=Xf(),N=_c();function u(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}u.prototype=new j.baseCalendar,N(u.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(w){return this._validate(w,this.minMonth,this.minDay,j.local.invalidYear),!1},monthsInYear:function(w){return this._validate(w,this.minMonth,this.minDay,j.local.invalidYear),13},daysInYear:function(w){return this._validate(w,this.minMonth,this.minDay,j.local.invalidYear),400},weekOfYear:function(w,S,l){var e=this.newDate(w,S,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(w,S){var l=this._validate(w,S,this.minDay,j.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(w,S,l){var e=this._validate(w,S,l,j.local.invalidDate);return(e.day()+1)%8},weekDay:function(w,S,l){var e=this.dayOfWeek(w,S,l);return e>=2&&e<=6},extraInfo:function(w,S,l){var e=this._validate(w,S,l,j.local.invalidDate);return{century:v[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(w,S,l){var e=this._validate(w,S,l,j.local.invalidDate);return w=e.year()+(e.year()<0?1:0),S=e.month(),l=e.day(),l+(S>1?16:0)+(S>2?(S-2)*32:0)+(w-1)*400+this.jdEpoch-1},fromJD:function(w){w=Math.floor(w+.5)-Math.floor(this.jdEpoch)-1;var S=Math.floor(w/400)+1;w-=(S-1)*400,w+=w>15?16:0;var l=Math.floor(w/32)+1,e=w-(l-1)*32+1;return this.newDate(S<=0?S-1:S,l,e)}});var v={20:"Fruitbat",21:"Anchovy"};j.calendars.discworld=u}}),CG=De({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var j=Xf(),N=_c();function u(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}u.prototype=new j.baseCalendar,N(u.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,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(S){var w=this._validate(S,this.minMonth,this.minDay,j.local.invalidYear),S=w.year()+(w.year()<0?1:0);return S%4===3||S%4===-1},monthsInYear:function(v){return this._validate(v,this.minMonth,this.minDay,j.local.invalidYear||j.regionalOptions[""].invalidYear),13},weekOfYear:function(v,w,S){var l=this.newDate(v,w,S);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(v,w){var S=this._validate(v,w,this.minDay,j.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===13&&this.leapYear(S.year())?1:0)},weekDay:function(v,w,S){return(this.dayOfWeek(v,w,S)||7)<6},toJD:function(v,w,S){var l=this._validate(v,w,S,j.local.invalidDate);return v=l.year(),v<0&&v++,l.day()+(l.month()-1)*30+(v-1)*365+Math.floor(v/4)+this.jdEpoch-1},fromJD:function(v){var w=Math.floor(v)+.5-this.jdEpoch,S=Math.floor((w-Math.floor((w+366)/1461))/365)+1;S<=0&&S--,w=Math.floor(v)+.5-this.newDate(S,1,1).toJD();var l=Math.floor(w/30)+1,e=w-(l-1)*30+1;return this.newDate(S,l,e)}}),j.calendars.ethiopian=u}}),LG=De({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var j=Xf(),N=_c();function u(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}u.prototype=new j.baseCalendar,N(u.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(w){var S=this._validate(w,this.minMonth,this.minDay,j.local.invalidYear);return this._leapYear(S.year())},_leapYear:function(w){return w=w<0?w+1:w,v(w*7+1,19)<7},monthsInYear:function(w){return this._validate(w,this.minMonth,this.minDay,j.local.invalidYear),this._leapYear(w.year?w.year():w)?13:12},weekOfYear:function(w,S,l){var e=this.newDate(w,S,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(w){var S=this._validate(w,this.minMonth,this.minDay,j.local.invalidYear);return w=S.year(),this.toJD(w===-1?1:w+1,7,1)-this.toJD(w,7,1)},daysInMonth:function(w,S){return w.year&&(S=w.month(),w=w.year()),this._validate(w,S,this.minDay,j.local.invalidMonth),S===12&&this.leapYear(w)||S===8&&v(this.daysInYear(w),10)===5?30:S===9&&v(this.daysInYear(w),10)===3?29:this.daysPerMonth[S-1]},weekDay:function(w,S,l){return this.dayOfWeek(w,S,l)!==6},extraInfo:function(w,S,l){var e=this._validate(w,S,l,j.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(w,S,l){var e=this._validate(w,S,l,j.local.invalidDate);w=e.year(),S=e.month(),l=e.day();var t=w<=0?w+1:w,a=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(S<7){for(var r=7;r<=this.monthsInYear(w);r++)a+=this.daysInMonth(w,r);for(var r=1;r=this.toJD(S===-1?1:S+1,7,1);)S++;for(var l=wthis.toJD(S,l,this.daysInMonth(S,l));)l++;var e=w-this.toJD(S,l,1)+1;return this.newDate(S,l,e)}});function v(w,S){return w-S*Math.floor(w/S)}j.calendars.hebrew=u}}),PG=De({"node_modules/world-calendars/dist/calendars/islamic.js"(){var j=Xf(),N=_c();function u(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}u.prototype=new j.baseCalendar,N(u.prototype,{name:"Islamic",jdEpoch:19484395e-1,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(v){var w=this._validate(v,this.minMonth,this.minDay,j.local.invalidYear);return(w.year()*11+14)%30<11},weekOfYear:function(v,w,S){var l=this.newDate(v,w,S);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(v){return this.leapYear(v)?355:354},daysInMonth:function(v,w){var S=this._validate(v,w,this.minDay,j.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===12&&this.leapYear(S.year())?1:0)},weekDay:function(v,w,S){return this.dayOfWeek(v,w,S)!==5},toJD:function(v,w,S){var l=this._validate(v,w,S,j.local.invalidDate);return v=l.year(),w=l.month(),S=l.day(),v=v<=0?v+1:v,S+Math.ceil(29.5*(w-1))+(v-1)*354+Math.floor((3+11*v)/30)+this.jdEpoch-1},fromJD:function(v){v=Math.floor(v)+.5;var w=Math.floor((30*(v-this.jdEpoch)+10646)/10631);w=w<=0?w-1:w;var S=Math.min(12,Math.ceil((v-29-this.toJD(w,1,1))/29.5)+1),l=v-this.toJD(w,S,1)+1;return this.newDate(w,S,l)}}),j.calendars.islamic=u}}),RG=De({"node_modules/world-calendars/dist/calendars/julian.js"(){var j=Xf(),N=_c();function u(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}u.prototype=new j.baseCalendar,N(u.prototype,{name:"Julian",jdEpoch:17214235e-1,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(S){var w=this._validate(S,this.minMonth,this.minDay,j.local.invalidYear),S=w.year()<0?w.year()+1:w.year();return S%4===0},weekOfYear:function(v,w,S){var l=this.newDate(v,w,S);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(v,w){var S=this._validate(v,w,this.minDay,j.local.invalidMonth);return this.daysPerMonth[S.month()-1]+(S.month()===2&&this.leapYear(S.year())?1:0)},weekDay:function(v,w,S){return(this.dayOfWeek(v,w,S)||7)<6},toJD:function(v,w,S){var l=this._validate(v,w,S,j.local.invalidDate);return v=l.year(),w=l.month(),S=l.day(),v<0&&v++,w<=2&&(v--,w+=12),Math.floor(365.25*(v+4716))+Math.floor(30.6001*(w+1))+S-1524.5},fromJD:function(v){var w=Math.floor(v+.5),S=w+1524,l=Math.floor((S-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((S-e)/30.6001),a=t-Math.floor(t<14?1:13),r=l-Math.floor(a>2?4716:4715),n=S-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,a,n)}}),j.calendars.julian=u}}),IG=De({"node_modules/world-calendars/dist/calendars/mayan.js"(){var j=Xf(),N=_c();function u(S){this.local=this.regionalOptions[S||""]||this.regionalOptions[""]}u.prototype=new j.baseCalendar,N(u.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(S){return this._validate(S,this.minMonth,this.minDay,j.local.invalidYear),!1},formatYear:function(S){var l=this._validate(S,this.minMonth,this.minDay,j.local.invalidYear);S=l.year();var e=Math.floor(S/400);S=S%400,S+=S<0?400:0;var t=Math.floor(S/20);return e+"."+t+"."+S%20},forYear:function(S){if(S=S.split("."),S.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(S){return this._validate(S,this.minMonth,this.minDay,j.local.invalidYear),18},weekOfYear:function(S,l,e){return this._validate(S,l,e,j.local.invalidDate),0},daysInYear:function(S){return this._validate(S,this.minMonth,this.minDay,j.local.invalidYear),360},daysInMonth:function(S,l){return this._validate(S,l,this.minDay,j.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(S,l,e){var t=this._validate(S,l,e,j.local.invalidDate);return t.day()},weekDay:function(S,l,e){return this._validate(S,l,e,j.local.invalidDate),!0},extraInfo:function(S,l,e){var t=this._validate(S,l,e,j.local.invalidDate),a=t.toJD(),r=this._toHaab(a),n=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(S){S-=this.jdEpoch;var l=v(S+8+17*20,365);return[Math.floor(l/20)+1,v(l,20)]},_toTzolkin:function(S){return S-=this.jdEpoch,[w(S+20,20),w(S+4,13)]},toJD:function(S,l,e){var t=this._validate(S,l,e,j.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(S){S=Math.floor(S)+.5-this.jdEpoch;var l=Math.floor(S/360);S=S%360,S+=S<0?360:0;var e=Math.floor(S/20),t=S%20;return this.newDate(l,e,t)}});function v(S,l){return S-l*Math.floor(S/l)}function w(S,l){return v(S-1,l)+1}j.calendars.mayan=u}}),DG=De({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var j=Xf(),N=_c();function u(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}u.prototype=new j.baseCalendar;var v=j.instance("gregorian");N(u.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,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(w){var S=this._validate(w,this.minMonth,this.minDay,j.local.invalidYear||j.regionalOptions[""].invalidYear);return v.leapYear(S.year()+(S.year()<1?1:0)+1469)},weekOfYear:function(w,S,l){var e=this.newDate(w,S,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(w,S){var l=this._validate(w,S,this.minDay,j.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(w,S,l){return(this.dayOfWeek(w,S,l)||7)<6},toJD:function(t,S,l){var e=this._validate(t,S,l,j.local.invalidMonth),t=e.year();t<0&&t++;for(var a=e.day(),r=1;r=this.toJD(S+1,1,1);)S++;for(var l=w-Math.floor(this.toJD(S,1,1)+.5)+1,e=1;l>this.daysInMonth(S,e);)l-=this.daysInMonth(S,e),e++;return this.newDate(S,e,l)}}),j.calendars.nanakshahi=u}}),FG=De({"node_modules/world-calendars/dist/calendars/nepali.js"(){var j=Xf(),N=_c();function u(v){this.local=this.regionalOptions[v||""]||this.regionalOptions[""]}u.prototype=new j.baseCalendar,N(u.prototype,{name:"Nepali",jdEpoch:17007095e-1,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(v){return this.daysInYear(v)!==this.daysPerYear},weekOfYear:function(v,w,S){var l=this.newDate(v,w,S);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(v){var w=this._validate(v,this.minMonth,this.minDay,j.local.invalidYear);if(v=w.year(),typeof this.NEPALI_CALENDAR_DATA[v]>"u")return this.daysPerYear;for(var S=0,l=this.minMonth;l<=12;l++)S+=this.NEPALI_CALENDAR_DATA[v][l];return S},daysInMonth:function(v,w){return v.year&&(w=v.month(),v=v.year()),this._validate(v,w,this.minDay,j.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[v]>"u"?this.daysPerMonth[w-1]:this.NEPALI_CALENDAR_DATA[v][w]},weekDay:function(v,w,S){return this.dayOfWeek(v,w,S)!==6},toJD:function(v,w,S){var l=this._validate(v,w,S,j.local.invalidDate);v=l.year(),w=l.month(),S=l.day();var e=j.instance(),t=0,a=w,r=v;this._createMissingCalendarData(v);var n=v-(a>9||a===9&&S>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(w!==9&&(t=S,a--);a!==9;)a<=0&&(a=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][a],a--;return w===9?(t+=S-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(n))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(n,1,1).add(t,"d").toJD()},fromJD:function(v){var w=j.instance(),S=w.fromJD(v),l=S.year(),e=S.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var a=9,r=this.NEPALI_CALENDAR_DATA[t][0],n=this.NEPALI_CALENDAR_DATA[t][a]-r+1;e>n;)a++,a>12&&(a=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][a];var i=this.NEPALI_CALENDAR_DATA[t][a]-(n-e);return this.newDate(t,a,i)},_createMissingCalendarData:function(v){var w=this.daysPerMonth.slice(0);w.unshift(17);for(var S=v-1;S"u"&&(this.NEPALI_CALENDAR_DATA[S]=w)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),j.calendars.nepali=u}}),zG=De({"node_modules/world-calendars/dist/calendars/persian.js"(){var j=Xf(),N=_c();function u(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}function v(w){var S=w-475;w<0&&S++;var l=.242197,e=l*S,t=l*(S+1),a=e-Math.floor(e),r=t-Math.floor(t);return a>r}u.prototype=new j.baseCalendar,N(u.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(w){var S=this._validate(w,this.minMonth,this.minDay,j.local.invalidYear);return v(S.year())},weekOfYear:function(w,S,l){var e=this.newDate(w,S,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(w,S){var l=this._validate(w,S,this.minDay,j.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(w,S,l){return this.dayOfWeek(w,S,l)!==5},toJD:function(w,S,l){var e=this._validate(w,S,l,j.local.invalidDate);w=e.year(),S=e.month(),l=e.day();var t=0;if(w>0)for(var a=1;a0?w-1:w)*365+t+this.jdEpoch-1},fromJD:function(w){w=Math.floor(w)+.5;var S=475+(w-this.toJD(475,1,1))/365.242197,l=Math.floor(S);l<=0&&l--,w>this.toJD(l,12,v(l)?30:29)&&(l++,l===0&&l++);var e=w-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),a=w-this.toJD(l,t,1)+1;return this.newDate(l,t,a)}}),j.calendars.persian=u,j.calendars.jalali=u}}),BG=De({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var j=Xf(),N=_c(),u=j.instance();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new j.baseCalendar,N(v.prototype,{name:"Taiwan",jdEpoch:24194025e-1,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(l){var S=this._validate(l,this.minMonth,this.minDay,j.local.invalidYear),l=this._t2gYear(S.year());return u.leapYear(l)},weekOfYear:function(t,S,l){var e=this._validate(t,this.minMonth,this.minDay,j.local.invalidYear),t=this._t2gYear(e.year());return u.weekOfYear(t,e.month(),e.day())},daysInMonth:function(w,S){var l=this._validate(w,S,this.minDay,j.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(w,S,l){return(this.dayOfWeek(w,S,l)||7)<6},toJD:function(t,S,l){var e=this._validate(t,S,l,j.local.invalidDate),t=this._t2gYear(e.year());return u.toJD(t,e.month(),e.day())},fromJD:function(w){var S=u.fromJD(w),l=this._g2tYear(S.year());return this.newDate(l,S.month(),S.day())},_t2gYear:function(w){return w+this.yearsOffset+(w>=-this.yearsOffset&&w<=-1?1:0)},_g2tYear:function(w){return w-this.yearsOffset-(w>=1&&w<=this.yearsOffset?1:0)}}),j.calendars.taiwan=v}}),OG=De({"node_modules/world-calendars/dist/calendars/thai.js"(){var j=Xf(),N=_c(),u=j.instance();function v(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}v.prototype=new j.baseCalendar,N(v.prototype,{name:"Thai",jdEpoch:15230985e-1,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(l){var S=this._validate(l,this.minMonth,this.minDay,j.local.invalidYear),l=this._t2gYear(S.year());return u.leapYear(l)},weekOfYear:function(t,S,l){var e=this._validate(t,this.minMonth,this.minDay,j.local.invalidYear),t=this._t2gYear(e.year());return u.weekOfYear(t,e.month(),e.day())},daysInMonth:function(w,S){var l=this._validate(w,S,this.minDay,j.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(w,S,l){return(this.dayOfWeek(w,S,l)||7)<6},toJD:function(t,S,l){var e=this._validate(t,S,l,j.local.invalidDate),t=this._t2gYear(e.year());return u.toJD(t,e.month(),e.day())},fromJD:function(w){var S=u.fromJD(w),l=this._g2tYear(S.year());return this.newDate(l,S.month(),S.day())},_t2gYear:function(w){return w-this.yearsOffset-(w>=1&&w<=this.yearsOffset?1:0)},_g2tYear:function(w){return w+this.yearsOffset+(w>=-this.yearsOffset&&w<=-1?1:0)}}),j.calendars.thai=v}}),NG=De({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var j=Xf(),N=_c();function u(w){this.local=this.regionalOptions[w||""]||this.regionalOptions[""]}u.prototype=new j.baseCalendar,N(u.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(w){var S=this._validate(w,this.minMonth,this.minDay,j.local.invalidYear);return this.daysInYear(S.year())===355},weekOfYear:function(w,S,l){var e=this.newDate(w,S,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(w){for(var S=0,l=1;l<=12;l++)S+=this.daysInMonth(w,l);return S},daysInMonth:function(w,S){for(var l=this._validate(w,S,this.minDay,j.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,a=0;ae)return v[t]-v[t-1];t++}return 30},weekDay:function(w,S,l){return this.dayOfWeek(w,S,l)!==5},toJD:function(w,S,l){var e=this._validate(w,S,l,j.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,a=e.day()+v[t-1]-1;return a+24e5-.5},fromJD:function(w){for(var S=w-24e5+.5,l=0,e=0;eS);e++)l++;var t=l+15292,a=Math.floor((t-1)/12),r=a+1,n=t-12*a,i=S-v[l-1]+1;return this.newDate(r,n,i)},isValid:function(w,S,l){var e=j.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(w=w.year!=null?w.year:w,e=w>=1276&&w<=1500),e},_validate:function(w,S,l,e){var t=j.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),j.calendars.ummalqura=u;var v=[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]}}),jG=De({"src/components/calendars/calendars.js"(j,N){"use strict";N.exports=Xf(),MG(),SG(),EG(),kG(),CG(),LG(),PG(),RG(),IG(),DG(),FG(),zG(),BG(),OG(),NG()}}),UG=De({"src/components/calendars/index.js"(j,N){"use strict";var u=jG(),v=Ar(),w=Ho(),S=w.EPOCHJD,l=w.ONEDAY,e={valType:"enumerated",values:v.sortObjectKeys(u.calendars),editType:"calc",dflt:"gregorian"},t=function(g,A,m,h){var b={};return b[m]=e,v.coerce(g,A,b,m,h)},a=function(g,A,m,h){for(var b=0;b0){if(++fe>=zW)return arguments[0]}else fe=0;return ie.apply(void 0,arguments)}}var Kg=NW;var jW=Kg(Vg),Jg=jW;var UW=/\{\n\/\* \[wrapped with (.+)\] \*/,qW=/,? & /;function GW(ie){var fe=ie.match(UW);return fe?fe[1].split(qW):[]}var AS=GW;var VW=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function HW(ie,fe){var Re=fe.length;if(!Re)return ie;var ct=Re-1;return fe[ct]=(Re>1?"& ":"")+fe[ct],fe=fe.join(Re>2?", ":" "),ie.replace(VW,`{ -/* [wrapped with `+fe+`] */ -`)}var TS=HW;function WW(ie){return function(){return ie}}var u0=WW;var YW=function(){try{var ie=Sh(Object,"defineProperty");return ie({},"",{}),ie}catch{}}(),c0=YW;var XW=c0?function(ie,fe){return c0(ie,"toString",{configurable:!0,enumerable:!1,value:u0(fe),writable:!0})}:Nl,MS=XW;var ZW=Kg(MS),f0=ZW;function $W(ie,fe){for(var Re=-1,ct=ie==null?0:ie.length;++Re-1}var pv=tY;var rY=1,aY=2,nY=8,iY=16,oY=32,sY=64,lY=128,uY=256,cY=512,fY=[["ary",lY],["bind",rY],["bindKey",aY],["curry",nY],["curryRight",iY],["flip",cY],["partial",oY],["partialRight",sY],["rearg",uY]];function hY(ie,fe){return nf(fY,function(Re){var ct="_."+Re[0];fe&Re[1]&&!pv(ie,ct)&&ie.push(ct)}),ie.sort()}var ES=hY;function dY(ie,fe,Re){var ct=fe+"";return f0(ie,TS(ct,ES(AS(ct),Re)))}var ey=dY;var vY=1,pY=2,mY=4,gY=8,kS=32,CS=64;function yY(ie,fe,Re,ct,Bt,ur,Gr,ua,da,zn){var Cn=fe&gY,qn=Cn?Gr:void 0,Si=Cn?void 0:Gr,co=Cn?ur:void 0,jo=Cn?void 0:ur;fe|=Cn?kS:CS,fe&=~(Cn?CS:kS),fe&mY||(fe&=~(vY|pY));var di=[ie,fe,Bt,co,qn,jo,Si,ua,da,zn],De=Re.apply(void 0,di);return Km(ie)&&Jg(De,di),De.placeholder=ct,ey(De,ie,fe)}var ty=yY;function _Y(ie){var fe=ie;return fe.placeholder}var qh=_Y;var xY=9007199254740991,bY=/^(?:0|[1-9]\d*)$/;function wY(ie,fe){var Re=typeof ie;return fe=fe??xY,!!fe&&(Re=="number"||Re!="symbol"&&bY.test(ie))&&ie>-1&&ie%1==0&&ie1&&Rs.reverse(),Cn&&da-1&&ie%1==0&&ie<=JY}var mv=QY;function eX(ie){return ie!=null&&mv(ie.length)&&!Cf(ie)}var Yl=eX;function tX(ie,fe,Re){if(!vs(Re))return!1;var ct=typeof fe;return(ct=="number"?Yl(Re)&&Lf(fe,Re.length):ct=="string"&&fe in Re)?pc(Re[fe],ie):!1}var jl=tX;function rX(ie){return Ui(function(fe,Re){var ct=-1,Bt=Re.length,ur=Bt>1?Re[Bt-1]:void 0,Gr=Bt>2?Re[2]:void 0;for(ur=ie.length>3&&typeof ur=="function"?(Bt--,ur):void 0,Gr&&jl(Re[0],Re[1],Gr)&&(ur=Bt<3?void 0:ur,Bt=1),fe=Object(fe);++ct-1}var uE=PZ;function RZ(ie,fe){var Re=this.__data__,ct=yv(Re,ie);return ct<0?(++this.size,Re.push([ie,fe])):Re[ct][1]=fe,this}var cE=RZ;function y0(ie){var fe=-1,Re=ie==null?0:ie.length;for(this.clear();++fe0&&Re(ua)?fe>1?xE(ua,fe-1,Re,ct,Bt):lh(Bt,ua):ct||(Bt[Bt.length]=ua)}return Bt}var dl=xE;function r$(ie){var fe=ie==null?0:ie.length;return fe?dl(ie,1):[]}var ly=r$;function a$(ie){return f0(ay(ie,void 0,ly),ie+"")}var Df=a$;var n$=Df(b0),bE=n$;var i$=iy(Object.getPrototypeOf,Object),wv=i$;var o$="[object Object]",s$=Function.prototype,l$=Object.prototype,wE=s$.toString,u$=l$.hasOwnProperty,c$=wE.call(Object);function f$(ie){if(!gs(ie)||Ol(ie)!=o$)return!1;var fe=wv(ie);if(fe===null)return!0;var Re=u$.call(fe,"constructor")&&fe.constructor;return typeof Re=="function"&&Re instanceof Re&&wE.call(Re)==c$}var bd=f$;var h$="[object DOMException]",d$="[object Error]";function v$(ie){if(!gs(ie))return!1;var fe=Ol(ie);return fe==d$||fe==h$||typeof ie.message=="string"&&typeof ie.name=="string"&&!bd(ie)}var w0=v$;var p$=Ui(function(ie,fe){try{return Lu(ie,void 0,fe)}catch(Re){return w0(Re)?Re:new Error(Re)}}),uy=p$;var m$="Expected a function";function g$(ie,fe){var Re;if(typeof fe!="function")throw new TypeError(m$);return ie=ji(ie),function(){return--ie>0&&(Re=fe.apply(this,arguments)),ie<=1&&(fe=void 0),Re}}var cy=g$;var y$=1,_$=32,H2=Ui(function(ie,fe,Re){var ct=y$;if(Re.length){var Bt=gh(Re,qh(H2));ct|=_$}return Pf(ie,ct,fe,Re,Bt)});H2.placeholder={};var fy=H2;var x$=Df(function(ie,fe){return nf(fe,function(Re){Re=qc(Re),Rf(ie,Re,fy(ie[Re],ie))}),ie}),AE=x$;var b$=1,w$=2,A$=32,W2=Ui(function(ie,fe,Re){var ct=b$|w$;if(Re.length){var Bt=gh(Re,qh(W2));ct|=A$}return Pf(fe,ct,ie,Re,Bt)});W2.placeholder={};var TE=W2;function T$(ie,fe,Re){var ct=-1,Bt=ie.length;fe<0&&(fe=-fe>Bt?0:Bt+fe),Re=Re>Bt?Bt:Re,Re<0&&(Re+=Bt),Bt=fe>Re?0:Re-fe>>>0,fe>>>=0;for(var ur=Array(Bt);++ct=ct?ie:ec(ie,fe,Re)}var uh=M$;var S$="\\ud800-\\udfff",E$="\\u0300-\\u036f",k$="\\ufe20-\\ufe2f",C$="\\u20d0-\\u20ff",L$=E$+k$+C$,P$="\\ufe0e\\ufe0f",R$="\\u200d",I$=RegExp("["+R$+S$+L$+P$+"]");function D$(ie){return I$.test(ie)}var Hh=D$;function F$(ie){return ie.split("")}var ME=F$;var SE="\\ud800-\\udfff",z$="\\u0300-\\u036f",B$="\\ufe20-\\ufe2f",O$="\\u20d0-\\u20ff",N$=z$+B$+O$,j$="\\ufe0e\\ufe0f",U$="["+SE+"]",Y2="["+N$+"]",X2="\\ud83c[\\udffb-\\udfff]",q$="(?:"+Y2+"|"+X2+")",EE="[^"+SE+"]",kE="(?:\\ud83c[\\udde6-\\uddff]){2}",CE="[\\ud800-\\udbff][\\udc00-\\udfff]",G$="\\u200d",LE=q$+"?",PE="["+j$+"]?",V$="(?:"+G$+"(?:"+[EE,kE,CE].join("|")+")"+PE+LE+")*",H$=PE+LE+V$,W$="(?:"+[EE+Y2+"?",Y2,kE,CE,U$].join("|")+")",Y$=RegExp(X2+"(?="+X2+")|"+W$+H$,"g");function X$(ie){return ie.match(Y$)||[]}var RE=X$;function Z$(ie){return Hh(ie)?RE(ie):ME(ie)}var of=Z$;function $$(ie){return function(fe){fe=So(fe);var Re=Hh(fe)?of(fe):void 0,ct=Re?Re[0]:fe.charAt(0),Bt=Re?uh(Re,1).join(""):fe.slice(1);return ct[ie]()+Bt}}var hy=$$;var K$=hy("toUpperCase"),A0=K$;function J$(ie){return A0(So(ie).toLowerCase())}var dy=J$;function Q$(ie,fe,Re,ct){var Bt=-1,ur=ie==null?0:ie.length;for(ct&&ur&&(Re=ie[++Bt]);++Bt=fe?ie:fe)),ie}var kh=JK;function QK(ie,fe,Re){return Re===void 0&&(Re=fe,fe=void 0),Re!==void 0&&(Re=jc(Re),Re=Re===Re?Re:0),fe!==void 0&&(fe=jc(fe),fe=fe===fe?fe:0),kh(jc(ie),fe,Re)}var nk=QK;function eJ(){this.__data__=new _v,this.size=0}var ik=eJ;function tJ(ie){var fe=this.__data__,Re=fe.delete(ie);return this.size=fe.size,Re}var ok=tJ;function rJ(ie){return this.__data__.get(ie)}var sk=rJ;function aJ(ie){return this.__data__.has(ie)}var lk=aJ;var nJ=200;function iJ(ie,fe){var Re=this.__data__;if(Re instanceof _v){var ct=Re.__data__;if(!xv||ct.lengthua))return!1;var zn=ur.get(ie),Cn=ur.get(fe);if(zn&&Cn)return zn==fe&&Cn==ie;var qn=-1,Si=!0,co=Re&iee?new Tv:void 0;for(ur.set(ie,fe),ur.set(fe,ie);++qn=fe||Qn<0||qn&&Fh>=ur}function Zo(){var Vu=U0();if(De(Vu))return Rs(Vu);ua=setTimeout(Zo,di(Vu))}function Rs(Vu){return ua=void 0,Si&&ct?co(Vu):(ct=Bt=void 0,Gr)}function Du(){ua!==void 0&&clearTimeout(ua),zn=0,ct=da=Bt=ua=void 0}function ts(){return ua===void 0?Gr:Rs(U0())}function cf(){var Vu=U0(),Qn=De(Vu);if(ct=arguments,Bt=this,da=Vu,Qn){if(ua===void 0)return jo(da);if(qn)return clearTimeout(ua),ua=setTimeout(Zo,fe),co(da)}return ua===void 0&&(ua=setTimeout(Zo,fe)),Gr}return cf.cancel=Du,cf.flush=ts,cf}var jy=yte;function _te(ie,fe){return ie==null||ie!==ie?fe:ie}var h4=_te;var d4=Object.prototype,xte=d4.hasOwnProperty,bte=Ui(function(ie,fe){ie=Object(ie);var Re=-1,ct=fe.length,Bt=ct>2?fe[2]:void 0;for(Bt&&jl(fe[0],fe[1],Bt)&&(ct=1);++Re=Dte&&(ur=qd,Gr=!1,fe=new Tv(fe));e:for(;++Bt=0&&ie.slice(Re,Bt)==fe}var P4=Qte;function ere(ie,fe){return fs(fe,function(Re){return[Re,ie[Re]]})}var R4=ere;function tre(ie){var fe=-1,Re=Array(ie.size);return ie.forEach(function(ct){Re[++fe]=[ct,ct]}),Re}var I4=tre;var rre="[object Map]",are="[object Set]";function nre(ie){return function(fe){var Re=sf(fe);return Re==rre?F0(fe):Re==are?I4(fe):R4(fe,ie(fe))}}var Wy=nre;var ire=Wy(js),o1=ire;var ore=Wy(Xl),s1=ore;var sre={"&":"&","<":"<",">":">",'"':""","'":"'"},lre=M0(sre),D4=lre;var F4=/[&<>"']/g,ure=RegExp(F4.source);function cre(ie){return ie=So(ie),ie&&ure.test(ie)?ie.replace(F4,D4):ie}var Yy=cre;var z4=/[\\^$.*+?()[\]{}|]/g,fre=RegExp(z4.source);function hre(ie){return ie=So(ie),ie&&fre.test(ie)?ie.replace(z4,"\\$&"):ie}var B4=hre;function dre(ie,fe){for(var Re=-1,ct=ie==null?0:ie.length;++ReBt?0:Bt+Re),ct=ct===void 0||ct>Bt?Bt:ji(ct),ct<0&&(ct+=Bt),ct=Re>ct?0:Zy(ct);Re-1?Bt[ur?fe[Gr]:Gr]:void 0}}var Ky=wre;var Are=Math.max;function Tre(ie,fe,Re){var ct=ie==null?0:ie.length;if(!ct)return-1;var Bt=Re==null?0:ji(Re);return Bt<0&&(Bt=Are(ct+Bt,0)),vv(ie,Ai(fe,3),Bt)}var Jy=Tre;var Mre=Ky(Jy),G4=Mre;function Sre(ie,fe,Re){var ct;return Re(ie,function(Bt,ur,Gr){if(fe(Bt,ur,Gr))return ct=ur,!1}),ct}var Qy=Sre;function Ere(ie,fe){return Qy(ie,Ai(fe,3),zf)}var V4=Ere;var kre=Math.max,Cre=Math.min;function Lre(ie,fe,Re){var ct=ie==null?0:ie.length;if(!ct)return-1;var Bt=ct-1;return Re!==void 0&&(Bt=ji(Re),Bt=Re<0?kre(ct+Bt,0):Cre(Bt,ct-1)),vv(ie,Ai(fe,3),Bt,!0)}var e_=Lre;var Pre=Ky(e_),H4=Pre;function Rre(ie,fe){return Qy(ie,Ai(fe,3),V0)}var W4=Rre;function Ire(ie){return ie&&ie.length?ie[0]:void 0}var l1=Ire;function Dre(ie,fe){var Re=-1,ct=Yl(ie)?Array(ie.length):[];return fh(ie,function(Bt,ur,Gr){ct[++Re]=fe(Bt,ur,Gr)}),ct}var t_=Dre;function Fre(ie,fe){var Re=Ii(ie)?fs:t_;return Re(ie,Ai(fe,3))}var Cv=Fre;function zre(ie,fe){return dl(Cv(ie,fe),1)}var Y4=zre;var Bre=1/0;function Ore(ie,fe){return dl(Cv(ie,fe),Bre)}var X4=Ore;function Nre(ie,fe,Re){return Re=Re===void 0?1:ji(Re),dl(Cv(ie,fe),Re)}var Z4=Nre;var jre=1/0;function Ure(ie){var fe=ie==null?0:ie.length;return fe?dl(ie,jre):[]}var $4=Ure;function qre(ie,fe){var Re=ie==null?0:ie.length;return Re?(fe=fe===void 0?1:ji(fe),dl(ie,fe)):[]}var K4=qre;var Gre=512;function Vre(ie){return Pf(ie,Gre)}var J4=Vre;var Hre=E0("floor"),Q4=Hre;var Wre="Expected a function",Yre=8,Xre=32,Zre=128,$re=256;function Kre(ie){return Df(function(fe){var Re=fe.length,ct=Re,Bt=oh.prototype.thru;for(ie&&fe.reverse();ct--;){var ur=fe[ct];if(typeof ur!="function")throw new TypeError(Wre);if(Bt&&!Gr&&l0(ur)=="wrapper")var Gr=new oh([],!0)}for(ct=Gr?ct:Re;++ctfe}var H0=fae;function hae(ie){return function(fe,Re){return typeof fe=="string"&&typeof Re=="string"||(fe=jc(fe),Re=jc(Re)),ie(fe,Re)}}var Pv=hae;var dae=Pv(H0),cC=dae;var vae=Pv(function(ie,fe){return ie>=fe}),fC=vae;var pae=Object.prototype,mae=pae.hasOwnProperty;function gae(ie,fe){return ie!=null&&mae.call(ie,fe)}var hC=gae;function yae(ie,fe){return ie!=null&&Dy(ie,fe,hC)}var dC=yae;var _ae=Math.max,xae=Math.min;function bae(ie,fe,Re){return ie>=xae(fe,Re)&&ie<_ae(fe,Re)}var vC=bae;function wae(ie,fe,Re){return fe=Mh(fe),Re===void 0?(Re=fe,fe=0):Re=Mh(Re),ie=jc(ie),vC(ie,fe,Re)}var pC=wae;var Aae="[object String]";function Tae(ie){return typeof ie=="string"||!Ii(ie)&&gs(ie)&&Ol(ie)==Aae}var Rv=Tae;function Mae(ie,fe){return fs(fe,function(Re){return ie[Re]})}var W0=Mae;function Sae(ie){return ie==null?[]:W0(ie,js(ie))}var Yh=Sae;var Eae=Math.max;function kae(ie,fe,Re,ct){ie=Yl(ie)?ie:Yh(ie),Re=Re&&!ct?ji(Re):0;var Bt=ie.length;return Re<0&&(Re=Eae(Bt+Re,0)),Rv(ie)?Re<=Bt&&ie.indexOf(fe,Re)>-1:!!Bt&&Uh(ie,fe,Re)>-1}var mC=kae;var Cae=Math.max;function Lae(ie,fe,Re){var ct=ie==null?0:ie.length;if(!ct)return-1;var Bt=Re==null?0:ji(Re);return Bt<0&&(Bt=Cae(ct+Bt,0)),Uh(ie,fe,Bt)}var gC=Lae;function Pae(ie){var fe=ie==null?0:ie.length;return fe?ec(ie,0,-1):[]}var yC=Pae;var Rae=Math.min;function Iae(ie,fe,Re){for(var ct=Re?G0:pv,Bt=ie[0].length,ur=ie.length,Gr=ur,ua=Array(ur),da=1/0,zn=[];Gr--;){var Cn=ie[Gr];Gr&&fe&&(Cn=fs(Cn,Ru(fe))),da=Rae(Cn.length,da),ua[Gr]=!Re&&(fe||Bt>=120&&Cn.length>=120)?new Tv(Gr&&Cn):void 0}Cn=ie[0];var qn=-1,Si=ua[0];e:for(;++qn=-ZC&&ie<=ZC}var $C=kne;function Cne(ie){return ie===void 0}var KC=Cne;var Lne="[object WeakMap]";function Pne(ie){return gs(ie)&&sf(ie)==Lne}var JC=Pne;var Rne="[object WeakSet]";function Ine(ie){return gs(ie)&&Ol(ie)==Rne}var QC=Ine;var Dne=1;function Fne(ie){return Ai(typeof ie=="function"?ie:Ff(ie,Dne))}var e8=Fne;var zne=Array.prototype,Bne=zne.join;function One(ie,fe){return ie==null?"":Bne.call(ie,fe)}var t8=One;var Nne=Wh(function(ie,fe,Re){return ie+(Re?"-":"")+fe.toLowerCase()}),r8=Nne;var jne=Ev(function(ie,fe,Re){Rf(ie,Re,fe)}),a8=jne;function Une(ie,fe,Re){for(var ct=Re+1;ct--;)if(ie[ct]===fe)return ct;return ct}var n8=Une;var qne=Math.max,Gne=Math.min;function Vne(ie,fe,Re){var ct=ie==null?0:ie.length;if(!ct)return-1;var Bt=ct;return Re!==void 0&&(Bt=ji(Re),Bt=Bt<0?qne(ct+Bt,0):Gne(Bt,ct-1)),fe===fe?n8(ie,fe,Bt):vv(ie,Qg,Bt,!0)}var i8=Vne;var Hne=Wh(function(ie,fe,Re){return ie+(Re?" ":"")+fe.toLowerCase()}),o8=Hne;var Wne=hy("toLowerCase"),s8=Wne;function Yne(ie,fe){return ie=this.__values__.length,fe=ie?void 0:this.__values__[this.__index__++];return{done:ie,value:fe}}var M8=Aie;function Tie(ie,fe){var Re=ie.length;if(Re)return fe+=fe<0?Re:0,Lf(fe,Re)?ie[fe]:void 0}var c_=Tie;function Mie(ie,fe){return ie&&ie.length?c_(ie,ji(fe)):void 0}var S8=Mie;function Sie(ie){return ie=ji(ie),Ui(function(fe){return c_(fe,ie)})}var E8=Sie;function Eie(ie,fe){return fe=sh(fe,ie),ie=n_(ie,fe),ie==null||delete ie[qc(Iu(fe))]}var J0=Eie;function kie(ie){return bd(ie)?void 0:ie}var k8=kie;var Cie=1,Lie=2,Pie=4,Rie=Df(function(ie,fe){var Re={};if(ie==null)return Re;var ct=!1;fe=fs(fe,function(ur){return ur=sh(ur,ie),ct||(ct=ur.length>1),ur}),Uc(ie,P0(ie),Re),ct&&(Re=Ff(Re,Cie|Lie|Pie,k8));for(var Bt=fe.length;Bt--;)J0(Re,fe[Bt]);return Re}),C8=Rie;function Iie(ie,fe,Re,ct){if(!vs(ie))return ie;fe=sh(fe,ie);for(var Bt=-1,ur=fe.length,Gr=ur-1,ua=ie;ua!=null&&++Btfe||ur&&Gr&&da&&!ua&&!zn||ct&&Gr&&da||!Re&&da||!Bt)return 1;if(!ct&&!ur&&!zn&&ie=ua)return da;var zn=Re[ct];return da*(zn=="desc"?-1:1)}}return ie.index-fe.index}var I8=jie;function Uie(ie,fe,Re){fe.length?fe=fs(fe,function(ur){return Ii(ur)?function(Gr){return Eh(Gr,ur.length===1?ur[0]:ur)}:ur}):fe=[Nl];var ct=-1;fe=fs(fe,Ru(Ai));var Bt=t_(ie,function(ur,Gr,ua){var da=fs(fe,function(zn){return zn(ur)});return{criteria:da,index:++ct,value:ur}});return R8(Bt,function(ur,Gr){return I8(ur,Gr,Re)})}var v_=Uie;function qie(ie,fe,Re,ct){return ie==null?[]:(Ii(fe)||(fe=fe==null?[]:[fe]),Re=ct?void 0:Re,Ii(Re)||(Re=Re==null?[]:[Re]),v_(ie,fe,Re))}var D8=qie;function Gie(ie){return Df(function(fe){return fe=fs(fe,Ru(Ai)),Ui(function(Re){var ct=this;return ie(fe,function(Bt){return Lu(Bt,ct,Re)})})})}var Q0=Gie;var Vie=Q0(fs),F8=Vie;var Hie=Ui,z8=Hie;var Wie=Math.min,Yie=z8(function(ie,fe){fe=fe.length==1&&Ii(fe[0])?fs(fe[0],Ru(Ai)):fs(dl(fe,1),Ru(Ai));var Re=fe.length;return Ui(function(ct){for(var Bt=-1,ur=Wie(ct.length,Re);++Bt$ie)return Re;do fe%2&&(Re+=ie),fe=Kie(fe/2),fe&&(ie+=ie);while(fe);return Re}var u1=Jie;var Qie=N0("length"),j8=Qie;var q8="\\ud800-\\udfff",eoe="\\u0300-\\u036f",toe="\\ufe20-\\ufe2f",roe="\\u20d0-\\u20ff",aoe=eoe+toe+roe,noe="\\ufe0e\\ufe0f",ioe="["+q8+"]",Q2="["+aoe+"]",e3="\\ud83c[\\udffb-\\udfff]",ooe="(?:"+Q2+"|"+e3+")",G8="[^"+q8+"]",V8="(?:\\ud83c[\\udde6-\\uddff]){2}",H8="[\\ud800-\\udbff][\\udc00-\\udfff]",soe="\\u200d",W8=ooe+"?",Y8="["+noe+"]?",loe="(?:"+soe+"(?:"+[G8,V8,H8].join("|")+")"+Y8+W8+")*",uoe=Y8+W8+loe,coe="(?:"+[G8+Q2+"?",Q2,V8,H8,ioe].join("|")+")",U8=RegExp(e3+"(?="+e3+")|"+coe+uoe,"g");function foe(ie){for(var fe=U8.lastIndex=0;U8.test(ie);)++fe;return fe}var X8=foe;function hoe(ie){return Hh(ie)?X8(ie):j8(ie)}var Xh=hoe;var doe=Math.ceil;function voe(ie,fe){fe=fe===void 0?" ":vc(fe);var Re=fe.length;if(Re<2)return Re?u1(fe,ie):fe;var ct=u1(fe,doe(ie/Xh(fe)));return Hh(fe)?uh(of(ct),0,ie).join(""):ct.slice(0,ie)}var vp=voe;var poe=Math.ceil,moe=Math.floor;function goe(ie,fe,Re){ie=So(ie),fe=ji(fe);var ct=fe?Xh(ie):0;if(!fe||ct>=fe)return ie;var Bt=(fe-ct)/2;return vp(moe(Bt),Re)+ie+vp(poe(Bt),Re)}var Z8=goe;function yoe(ie,fe,Re){ie=So(ie),fe=ji(fe);var ct=fe?Xh(ie):0;return fe&&ct-1;)ua!==ie&&o7.call(ua,da,1),o7.call(ie,da,1);return ie}var em=Roe;function Ioe(ie,fe){return ie&&ie.length&&fe&&fe.length?em(ie,fe):ie}var m_=Ioe;var Doe=Ui(m_),s7=Doe;function Foe(ie,fe,Re){return ie&&ie.length&&fe&&fe.length?em(ie,fe,Ai(Re,2)):ie}var l7=Foe;function zoe(ie,fe,Re){return ie&&ie.length&&fe&&fe.length?em(ie,fe,void 0,Re):ie}var u7=zoe;var Boe=Array.prototype,Ooe=Boe.splice;function Noe(ie,fe){for(var Re=ie?fe.length:0,ct=Re-1;Re--;){var Bt=fe[Re];if(Re==ct||Bt!==ur){var ur=Bt;Lf(Bt)?Ooe.call(ie,Bt,1):J0(ie,Bt)}}return ie}var g_=Noe;var joe=Df(function(ie,fe){var Re=ie==null?0:ie.length,ct=b0(ie,fe);return g_(ie,fs(fe,function(Bt){return Lf(Bt,Re)?+Bt:Bt}).sort(d_)),ct}),c7=joe;var Uoe=Math.floor,qoe=Math.random;function Goe(ie,fe){return ie+Uoe(qoe()*(fe-ie+1))}var tm=Goe;var Voe=parseFloat,Hoe=Math.min,Woe=Math.random;function Yoe(ie,fe,Re){if(Re&&typeof Re!="boolean"&&jl(ie,fe,Re)&&(fe=Re=void 0),Re===void 0&&(typeof fe=="boolean"?(Re=fe,fe=void 0):typeof ie=="boolean"&&(Re=ie,ie=void 0)),ie===void 0&&fe===void 0?(ie=0,fe=1):(ie=Mh(ie),fe===void 0?(fe=ie,ie=0):fe=Mh(fe)),ie>fe){var ct=ie;ie=fe,fe=ct}if(Re||ie%1||fe%1){var Bt=Woe();return Hoe(ie+Bt*(fe-ie+Voe("1e-"+((Bt+"").length-1))),fe)}return tm(ie,fe)}var f7=Yoe;var Xoe=Math.ceil,Zoe=Math.max;function $oe(ie,fe,Re,ct){for(var Bt=-1,ur=Zoe(Xoe((fe-ie)/(Re||1)),0),Gr=Array(ur);ur--;)Gr[ct?ur:++Bt]=ie,ie+=Re;return Gr}var h7=$oe;function Koe(ie){return function(fe,Re,ct){return ct&&typeof ct!="number"&&jl(fe,Re,ct)&&(Re=ct=void 0),fe=Mh(fe),Re===void 0?(Re=fe,fe=0):Re=Mh(Re),ct=ct===void 0?fe1&&jl(ie,fe[0],fe[1])?fe=[]:Re>2&&jl(fe[0],fe[1],fe[2])&&(fe=[fe[0]]),v_(ie,dl(fe,1),[])}),U7=zse;var Bse=4294967295,Ose=Bse-1,Nse=Math.floor,jse=Math.min;function Use(ie,fe,Re,ct){var Bt=0,ur=ie==null?0:ie.length;if(ur===0)return 0;fe=Re(fe);for(var Gr=fe!==fe,ua=fe===null,da=qu(fe),zn=fe===void 0;Bt>>1;function Vse(ie,fe,Re){var ct=0,Bt=ie==null?ct:ie.length;if(typeof fe=="number"&&fe===fe&&Bt<=Gse){for(;ct>>1,Gr=ie[ur];Gr!==null&&!qu(Gr)&&(Re?Gr<=fe:Gr>>0,Re?(ie=So(ie),ie&&(typeof fe=="string"||fe!=null&&!Z0(fe))&&(fe=vc(fe),!fe&&Hh(ie))?uh(of(ie),0,Re):ie.split(fe,Re)):[]}var $7=tle;var rle="Expected a function",ale=Math.max;function nle(ie,fe){if(typeof ie!="function")throw new TypeError(rle);return fe=fe==null?0:ale(ji(fe),0),Ui(function(Re){var ct=Re[fe],Bt=uh(Re,0,fe);return ct&&lh(Bt,ct),Lu(ie,this,Bt)})}var K7=nle;var ile=Wh(function(ie,fe,Re){return ie+(Re?" ":"")+A0(fe)}),J7=ile;function ole(ie,fe,Re){return ie=So(ie),Re=Re==null?0:kh(ji(Re),0,ie.length),fe=vc(fe),ie.slice(Re,Re+fe.length)==fe}var Q7=ole;function sle(){return{}}var eL=sle;function lle(){return""}var tL=lle;function ule(){return!0}var rL=ule;var cle=fv(function(ie,fe){return ie-fe},0),aL=cle;function fle(ie){return ie&&ie.length?K0(ie,Nl):0}var nL=fle;function hle(ie,fe){return ie&&ie.length?K0(ie,Ai(fe,2)):0}var iL=hle;function dle(ie){var fe=ie==null?0:ie.length;return fe?ec(ie,1,fe):[]}var oL=dle;function vle(ie,fe,Re){return ie&&ie.length?(fe=Re||fe===void 0?1:ji(fe),ec(ie,0,fe<0?0:fe)):[]}var sL=vle;function ple(ie,fe,Re){var ct=ie==null?0:ie.length;return ct?(fe=Re||fe===void 0?1:ji(fe),fe=ct-fe,ec(ie,fe<0?0:fe,ct)):[]}var lL=ple;function mle(ie,fe){return ie&&ie.length?kv(ie,Ai(fe,3),!1,!0):[]}var uL=mle;function gle(ie,fe){return ie&&ie.length?kv(ie,Ai(fe,3)):[]}var cL=gle;function yle(ie,fe){return fe(ie),ie}var fL=yle;var hL=Object.prototype,_le=hL.hasOwnProperty;function xle(ie,fe,Re,ct){return ie===void 0||pc(ie,hL[Re])&&!_le.call(ct,Re)?fe:ie}var a3=xle;var ble={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function wle(ie){return"\\"+ble[ie]}var dL=wle;var Ale=/<%=([\s\S]+?)%>/g,w_=Ale;var Tle=/<%-([\s\S]+?)%>/g,vL=Tle;var Mle=/<%([\s\S]+?)%>/g,pL=Mle;var Sle={escape:vL,evaluate:pL,interpolate:w_,variable:"",imports:{_:{escape:Yy}}},f1=Sle;var Ele="Invalid `variable` option passed into `_.template`",kle=/\b__p \+= '';/g,Cle=/\b(__p \+=) '' \+/g,Lle=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ple=/[()=,{}\[\]\/\s]/,Rle=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,A_=/($^)/,Ile=/['\n\r\u2028\u2029\\]/g,Dle=Object.prototype,mL=Dle.hasOwnProperty;function Fle(ie,fe,Re){var ct=f1.imports._.templateSettings||f1;Re&&jl(ie,fe,Re)&&(fe=void 0),ie=So(ie),fe=gv({},fe,ct,a3);var Bt=gv({},fe.imports,ct.imports,a3),ur=js(Bt),Gr=W0(Bt,ur),ua,da,zn=0,Cn=fe.interpolate||A_,qn="__p += '",Si=RegExp((fe.escape||A_).source+"|"+Cn.source+"|"+(Cn===w_?Rle:A_).source+"|"+(fe.evaluate||A_).source+"|$","g"),co=mL.call(fe,"sourceURL")?"//# sourceURL="+(fe.sourceURL+"").replace(/\s/g," ")+` -`:"";ie.replace(Si,function(De,Zo,Rs,Du,ts,cf){return Rs||(Rs=Du),qn+=ie.slice(zn,cf).replace(Ile,dL),Zo&&(ua=!0,qn+=`' + -__e(`+Zo+`) + -'`),ts&&(da=!0,qn+=`'; -`+ts+`; -__p += '`),Rs&&(qn+=`' + -((__t = (`+Rs+`)) == null ? '' : __t) + -'`),zn=cf+De.length,De}),qn+=`'; -`;var jo=mL.call(fe,"variable")&&fe.variable;if(!jo)qn=`with (obj) { -`+qn+` -} -`;else if(Ple.test(jo))throw new Error(Ele);qn=(da?qn.replace(kle,""):qn).replace(Cle,"$1").replace(Lle,"$1;"),qn="function("+(jo||"obj")+`) { -`+(jo?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(ua?", __e = _.escape":"")+(da?`, __j = Array.prototype.join; + ${ft} ${Dt} ${Gt} = u_${Gt}; +#endif +`}),staticAttributes:ie,staticUniforms:Re}}class Xn{constructor(y,N,ie){this.vertexBuffer=y,this.indexBuffer=N,this.segments=ie}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var eo=e.aS([{name:"a_pos",type:"Int16",components:2}]);let gi="#define PROJECTION_MERCATOR",qi="mercator";class io{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return qi}get shaderDefine(){return gi}get shaderPreludeCode(){return Ai.projectionMercator}get vertexShaderPreludeCode(){return Ai.projectionMercator.vertexSource}get subdivisionGranularity(){return e.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(y){}getMeshFromTileID(y,N,ie,fe,be){if(this._cachedMesh)return this._cachedMesh;let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(e.a6,0),Re.emplaceBack(0,e.a6),Re.emplaceBack(e.a6,e.a6);let je=y.createVertexBuffer(Re,eo.members),Ze=e.aV.simpleSegment(0,0,4,2),ut=new e.aW;ut.emplaceBack(1,0,2),ut.emplaceBack(1,2,3);let ft=y.createIndexBuffer(ut);return this._cachedMesh=new Xn(je,ft,Ze),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(y){}}class oo{constructor(y=0,N=0,ie=0,fe=0){if(isNaN(y)||y<0||isNaN(N)||N<0||isNaN(ie)||ie<0||isNaN(fe)||fe<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=y,this.bottom=N,this.left=ie,this.right=fe}interpolate(y,N,ie){return N.top!=null&&y.top!=null&&(this.top=e.H.number(y.top,N.top,ie)),N.bottom!=null&&y.bottom!=null&&(this.bottom=e.H.number(y.bottom,N.bottom,ie)),N.left!=null&&y.left!=null&&(this.left=e.H.number(y.left,N.left,ie)),N.right!=null&&y.right!=null&&(this.right=e.H.number(y.right,N.right,ie)),this}getCenter(y,N){let ie=e.al((this.left+y-this.right)/2,0,y),fe=e.al((this.top+N-this.bottom)/2,0,N);return new e.P(ie,fe)}equals(y){return this.top===y.top&&this.bottom===y.bottom&&this.left===y.left&&this.right===y.right}clone(){return new oo(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function Vn(pe,y){if(!pe.renderWorldCopies||pe.lngRange)return;let N=y.lng-pe.center.lng;y.lng+=N>180?-360:N<-180?360:0}function qn(pe){return Math.max(0,Math.floor(pe))}class Hi{constructor(y,N){var ie;this.applyConstrain=(fe,be)=>this._constrainOverride!==null?this._constrainOverride(fe,be):this._callbacks.defaultConstrain(fe,be),this._callbacks=y,this._tileSize=512,this._renderWorldCopies=N?.renderWorldCopies===void 0||!!N?.renderWorldCopies,this._minZoom=N?.minZoom||0,this._maxZoom=N?.maxZoom||22,this._minPitch=N?.minPitch==null?0:N?.minPitch,this._maxPitch=N?.maxPitch==null?60:N?.maxPitch,this._constrainOverride=(ie=N?.constrainOverride)!==null&&ie!==void 0?ie:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new e.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new oo,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(y,N,ie){this._constrainOverride=y.constrainOverride,this._latRange=y.latRange,this._lngRange=y.lngRange,this._width=y.width,this._height=y.height,this._center=y.center,this._elevation=y.elevation,this._minElevationForCurrentTile=y.minElevationForCurrentTile,this._zoom=y.zoom,this._tileZoom=qn(this._zoom),this._scale=e.ao(this._zoom),this._bearingInRadians=y.bearingInRadians,this._fovInRadians=y.fovInRadians,this._pitchInRadians=y.pitchInRadians,this._rollInRadians=y.rollInRadians,this._unmodified=y.unmodified,this._edgeInsets=new oo(y.padding.top,y.padding.bottom,y.padding.left,y.padding.right),this._minZoom=y.minZoom,this._maxZoom=y.maxZoom,this._minPitch=y.minPitch,this._maxPitch=y.maxPitch,this._renderWorldCopies=y.renderWorldCopies,this._cameraToCenterDistance=y.cameraToCenterDistance,this._nearZ=y.nearZ,this._farZ=y.farZ,this._autoCalculateNearFarZ=!ie&&y.autoCalculateNearFarZ,N&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(y){this._minElevationForCurrentTile=y}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(y){this._minZoom!==y&&(this._minZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(y){this._maxZoom!==y&&(this._maxZoom=y,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(y){this._minPitch!==y&&(this._minPitch=y,this.setPitch(Math.max(this.pitch,y)))}get maxPitch(){return this._maxPitch}setMaxPitch(y){this._maxPitch!==y&&(this._maxPitch=y,this.setPitch(Math.min(this.pitch,y)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(y){y===void 0?y=!0:y===null&&(y=!1),this._renderWorldCopies=y}get constrainOverride(){return this._constrainOverride}setConstrainOverride(y){y===void 0&&(y=null),this._constrainOverride!==y&&(this._constrainOverride=y,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new e.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(y){let N=e.X(y,-180,180)*Math.PI/180;var ie,fe,be,Re,je,Ze,ut,ft,Dt;this._bearingInRadians!==N&&(this._unmodified=!1,this._bearingInRadians=N,this._calcMatrices(),this._rotationMatrix=n(),ie=this._rotationMatrix,be=-this._bearingInRadians,Re=(fe=this._rotationMatrix)[0],je=fe[1],Ze=fe[2],ut=fe[3],ft=Math.sin(be),Dt=Math.cos(be),ie[0]=Re*Dt+Ze*ft,ie[1]=je*Dt+ut*ft,ie[2]=Re*-ft+Ze*Dt,ie[3]=je*-ft+ut*Dt)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(y){let N=e.al(y,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==N&&(this._unmodified=!1,this._pitchInRadians=N,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(y){let N=y/180*Math.PI;this._rollInRadians!==N&&(this._unmodified=!1,this._rollInRadians=N,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return e.aX(this._fovInRadians)}setFov(y){y=e.al(y,.1,150),this.fov!==y&&(this._unmodified=!1,this._fovInRadians=e.an(y),this._calcMatrices())}get zoom(){return this._zoom}setZoom(y){let N=this.applyConstrain(this._center,y).zoom;this._zoom!==N&&(this._unmodified=!1,this._zoom=N,this._tileZoom=Math.max(0,Math.floor(N)),this._scale=e.ao(N),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(y){y.lat===this._center.lat&&y.lng===this._center.lng||(this._unmodified=!1,this._center=y,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(y){y!==this._elevation&&(this._elevation=y,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(y){this._edgeInsets.equals(y)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,y,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(y,N){this._autoCalculateNearFarZ=!1,this._nearZ=y,this._farZ=N,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(y){return this._edgeInsets.equals(y)}interpolatePadding(y,N,ie){this._unmodified=!1,this._edgeInsets.interpolate(y,N,ie),this.constrainInternal(),this._calcMatrices()}resize(y,N,ie=!0){this._width=y,this._height=N,ie&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var y,N;return((y=this._latRange)===null||y===void 0?void 0:y.length)!==2||((N=this._lngRange)===null||N===void 0?void 0:N.length)!==2?null:new q([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(y){y?(this._lngRange=[y.getWest(),y.getEast()],this._latRange=[y.getSouth(),y.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-e.am,e.am])}getCameraQueryGeometry(y,N){if(N.length===1)return[N[0],y];{let{minX:ie,minY:fe,maxX:be,maxY:Re}=e.a8.fromPoints(N).extend(y);return[new e.P(ie,fe),new e.P(be,fe),new e.P(be,Re),new e.P(ie,Re),new e.P(ie,fe)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let y=this._unmodified,{center:N,zoom:ie}=this.applyConstrain(this.center,this.zoom);this.setCenter(N),this.setZoom(ie),this._unmodified=y,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let y=e.ap(new Float64Array(16));e.S(y,y,[this._width/2,-this._height/2,1]),e.Q(y,y,[1,-1,0]),this._clipSpaceToPixelsMatrix=y,y=e.ap(new Float64Array(16)),e.S(y,y,[1,-1,1]),e.Q(y,y,[-1,-1,0]),e.S(y,y,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=y,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){let be=ie!==void 0?ie:this.bearing,Re=fe=fe!==void 0?fe:this.pitch,{distanceToCenter:je,clampedElevation:Ze}=this._distanceToCenterFromAltElevationPitch(N,this.elevation,Re),{x:ut,y:ft}=vt(Re,be),Dt=e.a7.fromLngLat(y,N),Gt,Kt,st=e.aY(1,Dt.y),It=0;do{if(It+=1,It>10)break;Kt=je/st,Gt=new e.a7(Dt.x+ut*Kt,Dt.y+ft*Kt),st=1/Gt.meterInMercatorCoordinateUnits()}while(Math.abs(je-Kt*st)>1e-12);return{center:Gt.toLngLat(),elevation:Ze,zoom:e.ar(this.height/2/Math.tan(this.fovInRadians/2)/Kt/this.tileSize)}}recalculateZoomAndCenter(y){if(this.elevation-y==0)return;let N=1/this.worldSize,ie=e.aq(1,this.center.lat)*this.worldSize,fe=e.a7.fromLngLat(this.center,this.elevation),be=fe.x/N,Re=fe.y/N,je=fe.z/N,Ze=this.pitch,ut=this.bearing,{x:ft,y:Dt,z:Gt}=vt(Ze,ut),Kt=this.cameraToCenterDistance,st=be+Kt*-ft,It=Re+Kt*-Dt,Ut=je+Kt*Gt,{distanceToCenter:ir,clampedElevation:dr}=this._distanceToCenterFromAltElevationPitch(Ut/ie,y,Ze),Ar=ir*ie,hr=new e.a7((st+ft*Ar)*N,(It+Dt*Ar)*N,0).toLngLat(),vr=e.aq(1,hr.lat),Or=e.ar(this.height/2/Math.tan(this.fovInRadians/2)/ir/vr/this.tileSize);this._elevation=dr,this._center=hr,this.setZoom(Or)}_distanceToCenterFromAltElevationPitch(y,N,ie){let fe=-Math.cos(e.an(ie)),be=y-N,Re,je=N;return fe*be>=0||Math.abs(fe)<.1?(Re=1e4,je=y+Re*fe):Re=-be/fe,{distanceToCenter:Re,clampedElevation:je}}getCameraPoint(){let y=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new e.P(y*Math.sin(this.rollInRadians),y*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/y).toLngLat()}getMercatorTileCoordinates(y){if(!y)return[0,0,1,1];let N=y.canonical.z>=0?1<this.max[0]||y.aabb.min[1]>this.max[1]||y.aabb.min[2]>this.max[2]||y.aabb.max[0]0?(N+=y[fe]*this.min[fe],ie+=y[fe]*this.max[fe]):(ie+=y[fe]*this.min[fe],N+=y[fe]*this.max[fe]);return N>=0?2:ie<0?0:1}}class Ro{distanceToTile2d(y,N,ie,fe){let be=fe,Re=be.distanceX([y,N]),je=be.distanceY([y,N]);return Math.hypot(Re,je)}getWrap(y,N,ie){return ie}getTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ft=new e.a3(y.z,N,y.z,y.x,y.y),Dt=fe.terrain.getMinMaxElevation(ft);je=(be=Dt.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=Dt.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}let ut=1<fe}allowWorldCopies(){return!0}prepareNextFrame(){}}class go{constructor(y,N,ie){this.points=y,this.planes=N,this.aabb=ie}static fromInvProjectionMatrix(y,N=1,ie=0,fe,be){let Re=be?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],je=Math.pow(2,ie),Ze=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(Gt=>function(Kt,st,It,Ut){let ir=e.aE([],Kt,st),dr=1/ir[3]/It*Ut;return e.b4(ir,ir,[dr,dr,1/ir[3],dr])}(Gt,y,N,je));fe&&function(Gt,Kt,st,It){let Ut=It?4:0,ir=It?0:4,dr=0,Ar=[],hr=[];for(let Cr=0;Cr<4;Cr++){let ta=e.b0([],Gt[Cr+ir],Gt[Cr+Ut]),ka=e.b5(ta);e.aZ(ta,ta,1/ka),Ar.push(ka),hr.push(ta)}for(let Cr=0;Cr<4;Cr++){let ta=e.b6(Gt[Cr+Ut],hr[Cr],st);dr=ta!==null&&ta>=0?Math.max(dr,ta):Math.max(dr,Ar[Cr])}let vr=function(Cr,ta){let ka=e.b0([],Cr[ta[0]],Cr[ta[1]]),Ta=e.b0([],Cr[ta[2]],Cr[ta[1]]),Ra=[0,0,0,0];return e.b1(Ra,e.b2([],ka,Ta)),Ra[3]=-e.b3(Ra,Cr[ta[0]]),Ra}(Gt,Kt),Or=function(Cr,ta){let ka=e.b7(Cr),Ta=e.b8([],Cr,1/ka),Ra=e.b0([],ta,e.aZ([],Ta,e.b3(ta,Ta))),ua=e.b7(Ra);if(ua>0){let ia=Math.sqrt(1-Ta[3]*Ta[3]),ma=e.aZ([],Ta,-Ta[3]),da=e.a_([],ma,e.aZ([],Ra,ia/ua));return e.b9(ta,da)}return null}(st,vr);if(Or!==null){let Cr=Or/e.b3(hr[0],vr);dr=Math.min(dr,Cr)}for(let Cr=0;Cr<4;Cr++){let ta=Math.min(dr,Ar[Cr]);Gt[Cr+ir]=[Gt[Cr+Ut][0]+hr[Cr][0]*ta,Gt[Cr+Ut][1]+hr[Cr][1]*ta,Gt[Cr+Ut][2]+hr[Cr][2]*ta,1]}}(Ze,Re[0],fe,be);let ut=Re.map(Gt=>{let Kt=e.b0([],Ze[Gt[0]],Ze[Gt[1]]),st=e.b0([],Ze[Gt[2]],Ze[Gt[1]]),It=e.b1([],e.b2([],Kt,st)),Ut=-e.b3(It,Ze[Gt[1]]);return It.concat(Ut)}),ft=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Dt=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let Gt of Ze)for(let Kt=0;Kt<3;Kt++)ft[Kt]=Math.min(ft[Kt],Gt[Kt]),Dt[Kt]=Math.max(Dt[Kt],Gt[Kt]);return new go(Ze,ut,new Mi(ft,Dt))}}class Eo{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(y,N){}constructor(y){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(N,ie)=>{ie=e.al(+ie,this.minZoom,this.maxZoom);let fe={center:new e.W(N.lng,N.lat),zoom:ie},be=this._helper._lngRange;if(!this._helper._renderWorldCopies&&be===null){let hr=179.9999999999;be=[-hr,hr]}let Re=this.tileSize*e.ao(fe.zoom),je=0,Ze=Re,ut=0,ft=Re,Dt=0,Gt=0,{x:Kt,y:st}=this.size;if(this._helper._latRange){let hr=this._helper._latRange;je=e.Y(hr[1])*Re,Ze=e.Y(hr[0])*Re,Ze-jeZe&&(dr=Ze-hr)}if(be){let hr=(ut+ft)/2,vr=It;this._helper._renderWorldCopies&&(vr=e.X(It,hr-Re/2,hr+Re/2));let Or=Kt/2;vr-Orft&&(ir=ft-Or)}if(ir!==void 0||dr!==void 0){let hr=new e.P(ir??It,dr??Ut);fe.center=_r(Re,hr).wrap()}return fe},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new Ro}clone(){let y=new Eo;return y.apply(this,!1),y}apply(y,N,ie){this._helper.apply(y,N,ie)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(y){let N=[new e.ba(0,y)];if(this._helper._renderWorldCopies){let ie=this.screenPointToMercatorCoordinate(new e.P(0,0)),fe=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,0)),be=this.screenPointToMercatorCoordinate(new e.P(this._helper._width,this._helper._height)),Re=this.screenPointToMercatorCoordinate(new e.P(0,this._helper._height)),je=Math.floor(Math.min(ie.x,fe.x,be.x,Re.x)),Ze=Math.floor(Math.max(ie.x,fe.x,be.x,Re.x)),ut=1;for(let ft=je-ut;ft<=Ze+ut;ft++)ft!==0&&N.push(new e.ba(ft,y))}return N}getCameraFrustum(){return go.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(y){let N=this.screenPointToLocation(this.centerPoint,y),ie=y?y.getElevationForLngLatZoom(N,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(ie)}setLocationAtPoint(y,N){let ie=e.aq(this.elevation,this.center.lat),fe=this.screenPointToMercatorCoordinateAtZ(N,ie),be=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,ie),Re=e.a7.fromLngLat(y),je=new e.a7(Re.x-(fe.x-be.x),Re.y-(fe.y-be.y));this.setCenter(je?.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(y,N){return N?this.coordinatePoint(e.a7.fromLngLat(y),N.getElevationForLngLat(y,this),this._pixelMatrix3D):this.coordinatePoint(e.a7.fromLngLat(y))}screenPointToLocation(y,N){var ie;return(ie=this.screenPointToMercatorCoordinate(y,N))===null||ie===void 0?void 0:ie.toLngLat()}screenPointToMercatorCoordinate(y,N){if(N){let ie=N.pointCoordinate(y);if(ie!=null)return ie}return this.screenPointToMercatorCoordinateAtZ(y)}screenPointToMercatorCoordinateAtZ(y,N){let ie=N||0,fe=[y.x,y.y,0,1],be=[y.x,y.y,1,1];e.aE(fe,fe,this._pixelMatrixInverse),e.aE(be,be,this._pixelMatrixInverse);let Re=fe[3],je=be[3],Ze=fe[1]/Re,ut=be[1]/je,ft=fe[2]/Re,Dt=be[2]/je,Gt=ft===Dt?0:(ie-ft)/(Dt-ft);return new e.a7(e.H.number(fe[0]/Re,be[0]/je,Gt)/this.worldSize,e.H.number(Ze,ut,Gt)/this.worldSize,ie)}coordinatePoint(y,N=0,ie=this._pixelMatrix){let fe=[y.x*this.worldSize,y.y*this.worldSize,N,1];return e.aE(fe,fe,ie),new e.P(fe[0]/fe[3],fe[1]/fe[3])}getBounds(){let y=Math.max(0,this._helper._height/2-Xt(this));return new q().extend(this.screenPointToLocation(new e.P(0,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,y))).extend(this.screenPointToLocation(new e.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new e.P(0,this._helper._height)))}isPointOnMapSurface(y,N){return N?N.pointCoordinate(y)!=null:y.y>this.height/2-Xt(this)}calculatePosMatrix(y,N=!1,ie){var fe;let be=(fe=y.key)!==null&&fe!==void 0?fe:e.bb(y.wrap,y.canonical.z,y.canonical.z,y.canonical.x,y.canonical.y),Re=N?this._alignedPosMatrixCache:this._posMatrixCache;if(Re.has(be)){let ut=Re.get(be);return ie?ut.f32:ut.f64}let je=or(y,this.worldSize);e.U(je,N?this._alignedProjMatrix:this._viewProjMatrix,je);let Ze={f64:je,f32:new Float32Array(je)};return Re.set(be,Ze),ie?Ze.f32:Ze.f64}calculateFogMatrix(y){let N=y.key,ie=this._fogMatrixCacheF32;if(ie.has(N))return ie.get(N);let fe=or(y,this.worldSize);return e.U(fe,this._fogMatrix,fe),ie.set(N,new Float32Array(fe)),ie.get(N)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}_calculateNearFarZIfNeeded(y,N,ie){if(!this._helper.autoCalculateNearFarZ)return;let fe=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),be=y-fe*this._helper._pixelPerMeter/Math.cos(N),Re=fe<0?be:y,je=Math.PI/2+this.pitchInRadians,Ze=e.an(this.fov)*(Math.abs(Math.cos(e.an(this.roll)))*this.height+Math.abs(Math.sin(e.an(this.roll)))*this.width)/this.height*(.5+ie.y/this.height),ut=Math.sin(Ze)*Re/Math.sin(e.al(Math.PI-je-Ze,.01,Math.PI-.01)),ft=Xt(this),Dt=Math.atan(ft/this._helper.cameraToCenterDistance),Gt=e.an(.75),Kt=Dt>Gt?2*Dt*(.5+ie.y/(2*ft)):Gt,st=Math.sin(Kt)*Re/Math.sin(e.al(Math.PI-je-Kt,.01,Math.PI-.01)),It=Math.min(ut,st);this._helper._farZ=1.01*(Math.cos(Math.PI/2-N)*It+Re),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let y=this.centerOffset,N=rr(this.worldSize,this.center),ie=N.x,fe=N.y;this._helper._pixelPerMeter=e.aq(1,this.center.lat)*this.worldSize;let be=e.an(Math.min(this.pitch,$t)),Re=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos(be)),je;var Ze,ut;this._calculateNearFarZIfNeeded(Re,be,y),je=new Float64Array(16),e.bc(je,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ze=this._invProjMatrix)[0]=1/(ut=je)[0],Ze[1]=0,Ze[2]=0,Ze[3]=0,Ze[4]=0,Ze[5]=1/ut[5],Ze[6]=0,Ze[7]=0,Ze[8]=0,Ze[9]=0,Ze[10]=0,Ze[11]=1/ut[14],Ze[12]=0,Ze[13]=0,Ze[14]=-1,Ze[15]=ut[10]/ut[14],je[8]=2*-y.x/this._helper._width,je[9]=2*y.y/this._helper._height,this._projectionMatrix=e.bd(je),e.S(je,je,[1,-1,1]),e.Q(je,je,[0,0,-this._helper.cameraToCenterDistance]),e.be(je,je,-this.rollInRadians),e.bf(je,je,this.pitchInRadians),e.be(je,je,-this.bearingInRadians),e.Q(je,je,[-ie,-fe,0]),this._mercatorMatrix=e.S([],je,[this.worldSize,this.worldSize,this.worldSize]),e.S(je,je,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je),e.Q(je,je,[0,0,-this.elevation]),this._viewProjMatrix=je,this._invViewProjMatrix=e.bg([],je);let ft=[0,0,-1,1];e.aE(ft,ft,this._invViewProjMatrix),this._cameraPosition=[ft[0]/ft[3],ft[1]/ft[3],ft[2]/ft[3]],this._fogMatrix=new Float64Array(16),e.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,Re,this._helper._farZ),this._fogMatrix[8]=2*-y.x/this.width,this._fogMatrix[9]=2*y.y/this.height,e.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),e.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),e.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),e.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),e.Q(this._fogMatrix,this._fogMatrix,[-ie,-fe,0]),e.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),e.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=e.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,je);let Dt=this._helper._width%2/2,Gt=this._helper._height%2/2,Kt=Math.cos(this.bearingInRadians),st=Math.sin(-this.bearingInRadians),It=ie-Math.round(ie)+Kt*Dt+st*Gt,Ut=fe-Math.round(fe)+Kt*Gt+st*Dt,ir=new Float64Array(je);if(e.Q(ir,ir,[It>.5?It-1:It,Ut>.5?Ut-1:Ut,0]),this._alignedProjMatrix=ir,je=e.bg(new Float64Array(16),this._pixelMatrix),!je)throw new Error("failed to invert matrix");this._pixelMatrixInverse=je,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let y=this.screenPointToMercatorCoordinate(new e.P(0,0)),N=[y.x*this.worldSize,y.y*this.worldSize,0,1];return e.aE(N,N,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let y=e.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/y).toLngLat()}lngLatToCameraDepth(y,N){let ie=e.a7.fromLngLat(y),fe=[ie.x*this.worldSize,ie.y*this.worldSize,N,1];return e.aE(fe,fe,this._viewProjMatrix),fe[2]/fe[3]}getProjectionData(y){let{overscaledTileID:N,aligned:ie,applyTerrainMatrix:fe}=y,be=this._helper.getMercatorTileCoordinates(N),Re=N?this.calculatePosMatrix(N,ie,!0):null,je;return je=N?.terrainRttPosMatrix32f&&fe?N.terrainRttPosMatrix32f:Re||e.bh(),{mainMatrix:je,tileMercatorCoords:be,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:je}}isLocationOccluded(y){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(y,N,ie){return 1}transformLightDirection(y){return e.a$(y)}getRayDirectionFromPixel(y){throw new Error("Not implemented.")}projectTileCoordinates(y,N,ie,fe){let be=this.calculatePosMatrix(ie),Re;fe?(Re=[y,N,fe(y,N),1],e.aE(Re,Re,be)):(Re=[y,N,0,1],Oa(Re,Re,be));let je=Re[3];return{point:new e.P(Re[0]/je,Re[1]/je),signedDistanceFromCamera:je,isOccluded:!1}}populateCache(y){for(let N of y)this.calculatePosMatrix(N)}getMatrixForModel(y,N){let ie=e.a7.fromLngLat(y,N),fe=ie.meterInMercatorCoordinateUnits(),be=e.bi();return e.Q(be,be,[ie.x,ie.y,ie.z]),e.be(be,be,Math.PI),e.bf(be,be,Math.PI/2),e.S(be,be,[-fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=new e.a3(0,0,0,0,0),ie=this.getProjectionData({overscaledTileID:N,applyGlobeMatrix:y}),fe=or(N,this.worldSize);e.U(fe,this._viewProjMatrix,fe),ie.tileMercatorCoords=[0,0,1,1];let be=[e.a6,e.a6,this.worldSize/this._helper.pixelsPerMeter],Re=e.bj();return e.S(Re,fe,be),ie.fallbackMatrix=Re,ie.mainMatrix=Re,ie}getFastPathSimpleProjectionMatrix(y){return this.calculatePosMatrix(y)}}function Ao(){e.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function ds(pe){if(pe.useSlerp)if(pe.k<1){let y=e.bk(pe.startEulerAngles.roll,pe.startEulerAngles.pitch,pe.startEulerAngles.bearing),N=e.bk(pe.endEulerAngles.roll,pe.endEulerAngles.pitch,pe.endEulerAngles.bearing),ie=new Float64Array(4);e.bl(ie,y,N,pe.k);let fe=e.bm(ie);pe.tr.setRoll(fe.roll),pe.tr.setPitch(fe.pitch),pe.tr.setBearing(fe.bearing)}else pe.tr.setRoll(pe.endEulerAngles.roll),pe.tr.setPitch(pe.endEulerAngles.pitch),pe.tr.setBearing(pe.endEulerAngles.bearing);else pe.tr.setRoll(e.H.number(pe.startEulerAngles.roll,pe.endEulerAngles.roll,pe.k)),pe.tr.setPitch(e.H.number(pe.startEulerAngles.pitch,pe.endEulerAngles.pitch,pe.k)),pe.tr.setBearing(e.H.number(pe.startEulerAngles.bearing,pe.endEulerAngles.bearing,pe.k))}function jo(pe,y,N,ie,fe){let be=fe.padding,Re=rr(fe.worldSize,N.getNorthWest()),je=rr(fe.worldSize,N.getNorthEast()),Ze=rr(fe.worldSize,N.getSouthEast()),ut=rr(fe.worldSize,N.getSouthWest()),ft=e.an(-ie),Dt=Re.rotate(ft),Gt=je.rotate(ft),Kt=Ze.rotate(ft),st=ut.rotate(ft),It=new e.P(Math.max(Dt.x,Gt.x,st.x,Kt.x),Math.max(Dt.y,Gt.y,st.y,Kt.y)),Ut=new e.P(Math.min(Dt.x,Gt.x,st.x,Kt.x),Math.min(Dt.y,Gt.y,st.y,Kt.y)),ir=It.sub(Ut),dr=(fe.width-(be.left+be.right+y.left+y.right))/ir.x,Ar=(fe.height-(be.top+be.bottom+y.top+y.bottom))/ir.y;if(Ar<0||dr<0)return void Ao();let hr=Math.min(e.ar(fe.scale*Math.min(dr,Ar)),pe.maxZoom),vr=e.P.convert(pe.offset),Or=new e.P((y.left-y.right)/2,(y.top-y.bottom)/2).rotate(e.an(ie)),Cr=vr.add(Or).mult(fe.scale/e.ao(hr));return{center:_r(fe.worldSize,Re.add(Ze).div(2).sub(Cr)),zoom:hr,bearing:ie}}class Wo{get useGlobeControls(){return!1}handlePanInertia(y,N){let ie=y.mag(),fe=Math.abs(Xt(N));return{easingOffset:y.mult(Math.min(.75*fe/ie,1)),easingCenter:N.center}}handleMapControlsRollPitchBearingZoom(y,N){y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta),y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta)}handleMapControlsPan(y,N,ie){y.around.distSqr(N.centerPoint)<.01||N.setLocationAtPoint(ie,y.around)}cameraForBoxAndBearing(y,N,ie,fe,be){return jo(y,N,ie,fe,be)}handleJumpToCenterZoom(y,N){y.zoom!==(N.zoom!==void 0?+N.zoom:y.zoom)&&y.setZoom(+N.zoom),N.center!==void 0&&y.setCenter(e.W.convert(N.center))}handleEaseTo(y,N){let ie=y.zoom,fe=y.padding,be={roll:y.roll,pitch:y.pitch,bearing:y.bearing},Re={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},je=N.zoom!==void 0,Ze=!y.isPaddingEqual(N.padding),ut=!1,ft=je?+N.zoom:y.zoom,Dt=y.centerPoint.add(N.offsetAsPoint),Gt=y.screenPointToLocation(Dt),{center:Kt,zoom:st}=y.applyConstrain(e.W.convert(N.center||Gt),ft??ie);Vn(y,Kt);let It=rr(y.worldSize,Gt),Ut=rr(y.worldSize,Kt).sub(It),ir=e.ao(st-ie);return ut=st!==ie,{easeFunc:dr=>{if(ut&&y.setZoom(e.H.number(ie,st,dr)),e.bn(be,Re)||ds({startEulerAngles:be,endEulerAngles:Re,tr:y,k:dr,useSlerp:be.roll!=Re.roll}),Ze&&(y.interpolatePadding(fe,N.padding,dr),Dt=y.centerPoint.add(N.offsetAsPoint)),N.around)y.setLocationAtPoint(N.around,N.aroundPoint);else{let Ar=e.ao(y.zoom-ie),hr=st>ie?Math.min(2,ir):Math.max(.5,ir),vr=Math.pow(hr,1-dr),Or=_r(y.worldSize,It.add(Ut.mult(dr*vr)).mult(Ar));y.setLocationAtPoint(y.renderWorldCopies?Or.wrap():Or,Dt)}},isZooming:ut,elevationCenter:Kt}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.zoom,be=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),ie?+N.zoom:fe),Re=be.center,je=be.zoom;Vn(y,Re);let Ze=rr(y.worldSize,N.locationAtOffset),ut=rr(y.worldSize,Re).sub(Ze),ft=ut.mag(),Dt=e.ao(je-fe),Gt;if(N.minZoom!==void 0){let Kt=Math.min(+N.minZoom,fe,je),st=y.applyConstrain(Re,Kt).zoom;Gt=e.ao(st-fe)}return{easeFunc:(Kt,st,It,Ut)=>{y.setZoom(Kt===1?je:fe+e.ar(st));let ir=Kt===1?Re:_r(y.worldSize,Ze.add(ut.mult(It)).mult(st));y.setLocationAtPoint(y.renderWorldCopies?ir.wrap():ir,Ut)},scaleOfZoom:Dt,targetCenter:Re,scaleOfMinZoom:Gt,pixelPathLength:ft}}}class to{constructor(y,N,ie){this.blendFunction=y,this.blendColor=N,this.mask=ie}}to.Replace=[1,0],to.disabled=new to(to.Replace,e.bo.transparent,[!1,!1,!1,!1]),to.unblended=new to(to.Replace,e.bo.transparent,[!0,!0,!0,!0]),to.alphaBlended=new to([1,771],e.bo.transparent,[!0,!0,!0,!0]);let wo=2305;class pi{constructor(y,N,ie){this.enable=y,this.mode=N,this.frontFace=ie}}pi.disabled=new pi(!1,1029,wo),pi.backCCW=new pi(!0,1029,wo),pi.frontCCW=new pi(!0,1028,wo);class Vi{constructor(y,N,ie){this.func=y,this.mask=N,this.range=ie}}Vi.ReadOnly=!1,Vi.ReadWrite=!0,Vi.disabled=new Vi(519,Vi.ReadOnly,[0,1]);let Io=7680;class Xi{constructor(y,N,ie,fe,be,Re){this.test=y,this.ref=N,this.mask=ie,this.fail=fe,this.depthFail=be,this.pass=Re}}function Ko(pe){return typeof WebGL2RenderingContext<"u"&&pe instanceof WebGL2RenderingContext}Xi.disabled=new Xi({func:519,mask:0},0,0,Io,Io,Io);class Uo{get awaitingQuery(){return!!this._readbackQueue}constructor(y){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=y;let N=y.context,ie=N.gl;this._texFormat=ie.RGBA,this._texType=ie.UNSIGNED_BYTE;let fe=new e.aU;fe.emplaceBack(-1,-1),fe.emplaceBack(2,-1),fe.emplaceBack(-1,2);let be=new e.aW;be.emplaceBack(0,1,2),this._fullscreenTriangle=new Xn(N.createVertexBuffer(fe,eo.members),N.createIndexBuffer(be),e.aV.simpleSegment(0,0,fe.length,be.length)),this._resultBuffer=new Uint8Array(4),N.activeTexture.set(ie.TEXTURE1);let Re=ie.createTexture();ie.bindTexture(ie.TEXTURE_2D,Re),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_S,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_WRAP_T,ie.CLAMP_TO_EDGE),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MIN_FILTER,ie.NEAREST),ie.texParameteri(ie.TEXTURE_2D,ie.TEXTURE_MAG_FILTER,ie.NEAREST),ie.texImage2D(ie.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=N.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(Re),Ko(ie)&&(this._pbo=ie.createBuffer(),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,this._pbo),ie.bufferData(ie.PIXEL_PACK_BUFFER,4,ie.STREAM_READ),ie.bindBuffer(ie.PIXEL_PACK_BUFFER,null))}destroy(){let y=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),y.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(y,N){let ie=this._updateCount;return this._readbackQueue?ie>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():ie>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(y,N),this._updateCount++,this._measuredError}_bindFramebuffer(){let y=this._cachedRenderContext.context,N=y.gl;y.activeTexture.set(N.TEXTURE1),N.bindTexture(N.TEXTURE_2D,this._fbo.colorAttachment.get()),y.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(y,N){let ie=this._cachedRenderContext.context,fe=ie.gl;if(this._bindFramebuffer(),ie.viewport.set([0,0,this._texWidth,this._texHeight]),ie.clear({color:e.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(ie,fe.TRIANGLES,Vi.disabled,Xi.disabled,to.unblended,pi.disabled,((be,Re)=>({u_input:be,u_output_expected:Re}))(y,N),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Ko(fe)){fe.bindBuffer(fe.PIXEL_PACK_BUFFER,this._pbo),fe.readBuffer(fe.COLOR_ATTACHMENT0),fe.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),fe.bindBuffer(fe.PIXEL_PACK_BUFFER,null);let be=fe.fenceSync(fe.SYNC_GPU_COMMANDS_COMPLETE,0);fe.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:be}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let y=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Ko(y)){let N=y.clientWaitSync(this._readbackQueue.sync,0,0);if(N===y.WAIT_FAILED)return e.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(N===y.TIMEOUT_EXPIRED)return;y.bindBuffer(y.PIXEL_PACK_BUFFER,this._pbo),y.getBufferSubData(y.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),y.bindBuffer(y.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),y.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=Uo._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(y){let N=0;return N+=y[0]/256,N+=y[1]/65536,N+=y[2]/16777216,y[3]<127&&(N=-N),N/128}}let Ls=e.a6/128;function Ss(pe,y){let N=pe.granularity!==void 0?Math.max(pe.granularity,1):1,ie=N+(pe.generateBorders?2:0),fe=N+(pe.extendToNorthPole||pe.generateBorders?1:0)+(pe.extendToSouthPole||pe.generateBorders?1:0),be=ie+1,Re=fe+1,je=pe.generateBorders?-1:0,Ze=pe.generateBorders||pe.extendToNorthPole?-1:0,ut=N+(pe.generateBorders?1:0),ft=N+(pe.generateBorders||pe.extendToSouthPole?1:0),Dt=be*Re,Gt=ie*fe*6,Kt=be*Re>65536;if(Kt&&y==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let st=Kt||y==="32bit",It=new Int16Array(2*Dt),Ut=0;for(let Ar=Ze;Ar<=ft;Ar++)for(let hr=je;hr<=ut;hr++){let vr=hr/N*e.a6;hr===-1&&(vr=-Ls),hr===N+1&&(vr=e.a6+Ls);let Or=Ar/N*e.a6;Ar===-1&&(Or=pe.extendToNorthPole?e.bq:-Ls),Ar===N+1&&(Or=pe.extendToSouthPole?e.br:e.a6+Ls),It[Ut++]=vr,It[Ut++]=Or}let ir=st?new Uint32Array(Gt):new Uint16Array(Gt),dr=0;for(let Ar=0;Ar0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(y){this._mercatorProjection.updateGPUdependent(y),this._verticalPerspectiveProjection.updateGPUdependent(y)}getMeshFromTileID(y,N,ie,fe,be){return this.currentProjection.getMeshFromTileID(y,N,ie,fe,be)}setProjection(y){this._transitionable.setValue("type",y?.type||"mercator")}updateTransitions(y){this._transitioning=this._transitionable.transitioned(y,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(y){this.properties=this._transitioning.possiblyEvaluate(y)}setErrorQueryLatitudeDegrees(y){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(y),this._mercatorProjection.setErrorQueryLatitudeDegrees(y)}}function _o(pe){let y=bs(pe.worldSize,pe.center.lat);return 2*Math.PI*y}function Pi(pe,y,N,ie,fe){let be=1/(1<1e-6){let ie=pe[0]/N,fe=Math.acos(pe[2]/N),be=(ie>0?fe:-fe)/Math.PI*180;return new e.W(e.X(be,-180,180),y)}return new e.W(0,y)}function hl(pe){return Math.cos(pe*Math.PI/180)}function ps(pe,y){let N=hl(pe),ie=hl(y);return e.ar(ie/N)}function dl(pe,y){let N=pe.rotate(y.bearingInRadians),ie=y.zoom+ps(y.center.lat,0),fe=e.bt(1/hl(y.center.lat),1/hl(Math.min(Math.abs(y.center.lat),60)),e.bw(ie,7,3,0,1)),be=360/_o({worldSize:y.worldSize,center:{lat:y.center.lat}});return new e.W(y.center.lng-N.x*be*fe,e.al(y.center.lat+N.y*be,-e.am,e.am))}function wu(pe){let y=.5*pe,N=Math.sin(y),ie=Math.cos(y);return Math.log(N+ie)-Math.log(ie-N)}function lu(pe,y,N,ie){let fe=pe.lat+N*ie;if(Math.abs(N)>1){let be=(Math.sign(pe.lat+N)!==Math.sign(pe.lat)?-Math.abs(pe.lat):Math.abs(pe.lat))*Math.PI/180,Re=Math.abs(pe.lat+N)*Math.PI/180,je=wu(be+ie*(Re-be)),Ze=wu(be),ut=wu(Re);return new e.W(pe.lng+y*((je-Ze)/(ut-Ze)),fe)}return new e.W(pe.lng+y*ie,fe)}class xc{constructor(y){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=y}swapBuffers(){if(!this._hadAnyChanges)return;let y=this._cachePrevious;this._cachePrevious=this._cache,this._cache=y,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(y,N,ie,fe){let be=`${y.z}_${y.x}_${y.y}_${fe?.terrain?"t":""}`,Re=this._cache.get(be);if(Re)return Re;let je=this._cachePrevious.get(be);if(je)return this._cache.set(be,je),je;let Ze=this._boundingVolumeFactory(y,N,ie,fe);return this._cache.set(be,Ze),this._hadAnyChanges=!0,Ze}}class Fl{constructor(y,N,ie,fe){this.min=ie,this.max=fe,this.points=y,this.planes=N}static fromAabb(y,N){let ie=[];for(let fe=0;fe<8;fe++)ie.push([1&~fe?y[0]:N[0],(fe>>1&1)==1?N[1]:y[1],(fe>>2&1)==1?N[2]:y[2]]);return new Fl(ie,[[-1,0,0,N[0]],[1,0,0,-y[0]],[0,-1,0,N[1]],[0,1,0,-y[1]],[0,0,-1,N[2]],[0,0,1,-y[2]]],y,N)}static fromCenterSizeAngles(y,N,ie){let fe=e.bA([],ie[0],ie[1],ie[2]),be=e.bB([],[N[0],0,0],fe),Re=e.bB([],[0,N[1],0],fe),je=e.bB([],[0,0,N[2]],fe),Ze=[...y],ut=[...y];for(let Dt=0;Dt<8;Dt++)for(let Gt=0;Gt<3;Gt++){let Kt=y[Gt]+be[Gt]*(1&~Dt?-1:1)+Re[Gt]*((Dt>>1&1)==1?1:-1)+je[Gt]*((Dt>>2&1)==1?1:-1);Ze[Gt]=Math.min(Ze[Gt],Kt),ut[Gt]=Math.max(ut[Gt],Kt)}let ft=[];for(let Dt=0;Dt<8;Dt++){let Gt=[...y];e.a_(Gt,Gt,e.aZ([],be,1&~Dt?-1:1)),e.a_(Gt,Gt,e.aZ([],Re,(Dt>>1&1)==1?1:-1)),e.a_(Gt,Gt,e.aZ([],je,(Dt>>2&1)==1?1:-1)),ft.push(Gt)}return new Fl(ft,[[...be,-e.b3(be,ft[0])],[...Re,-e.b3(Re,ft[0])],[...je,-e.b3(je,ft[0])],[-be[0],-be[1],-be[2],-e.b3(be,ft[7])],[-Re[0],-Re[1],-Re[2],-e.b3(Re,ft[7])],[-je[0],-je[1],-je[2],-e.b3(je,ft[7])]],Ze,ut)}intersectsFrustum(y){let N=!0,ie=this.points.length,fe=this.planes.length,be=y.planes.length,Re=y.points.length;for(let je=0;je=0&&ut++}if(ut===0)return 0;ut=0&&ut++}if(ut===0)return 0}return 1}intersectsPlane(y){let N=this.points.length,ie=0;for(let fe=0;fe=0&&ie++}return ie===N?2:ie===0?0:1}}function pl(pe,y,N){let ie=pe-y;return ie<0?-ie:Math.max(0,ie-N)}function $u(pe,y,N,ie,fe){let be=pe-N,Re;return Re=be<0?Math.min(-be,1+be-fe):be>fe?Math.min(Math.max(be-fe,0),1-be):0,Math.max(Re,pl(y,ie,fe))}class uu{constructor(){this._boundingVolumeCache=new xc(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(y,N,ie,fe){let be=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(y,N,ie,fe){return this._boundingVolumeCache.getTileBoundingVolume(y,N,ie,fe)}_computeTileBoundingVolume(y,N,ie,fe){var be,Re;let je=0,Ze=0;if(fe?.terrain){let ut=new e.a3(y.z,N,y.z,y.x,y.y),ft=fe.terrain.getMinMaxElevation(ut);je=(be=ft.minElevation)!==null&&be!==void 0?be:Math.min(0,ie),Ze=(Re=ft.maxElevation)!==null&&Re!==void 0?Re:Math.max(0,ie)}if(je/=e.bD,Ze/=e.bD,je+=1,Ze+=1,y.z<=0)return Fl.fromAabb([-Ze,-Ze,-Ze],[Ze,Ze,Ze]);if(y.z===1)return Fl.fromAabb([y.x===0?-Ze:0,y.y===0?0:-Ze,-Ze],[y.x===0?0:Ze,y.y===0?Ze:0,Ze]);{let ut=[Pi(0,0,y.x,y.y,y.z),Pi(e.a6,0,y.x,y.y,y.z),Pi(e.a6,e.a6,y.x,y.y,y.z),Pi(0,e.a6,y.x,y.y,y.z)],ft=[];for(let Ra of ut)ft.push(e.aZ([],Ra,Ze));if(Ze!==je)for(let Ra of ut)ft.push(e.aZ([],Ra,je));y.y===0&&ft.push([0,1,0]),y.y===(1<=(1<{let fe=e.al(N.lat,-e.am,e.am),be=e.al(+ie,this.minZoom+ps(0,fe),this.maxZoom);return{center:new e.W(N.lng,fe),zoom:be}},this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._coveringTilesDetailsProvider=new uu}clone(){let y=new vs;return y.apply(this,!1),y}apply(y,N,ie){this._globeLatitudeErrorCorrectionRadians=ie||0,this._helper.apply(y,N)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let y=e.bz();return y[0]=this._cameraPosition[0],y[1]=this._cameraPosition[1],y[2]=this._cameraPosition[2],y}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(y){let{overscaledTileID:N,applyGlobeMatrix:ie}=y,fe=this._helper.getMercatorTileCoordinates(N);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:fe,clippingPlane:this._cachedClippingPlane,projectionTransition:ie?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(y){let N=this.pitchInRadians,ie=this.cameraToCenterDistance/y,fe=Math.sin(N)*ie,be=Math.cos(N)*ie+1,Re=1/Math.sqrt(fe*fe+be*be)*1,je=-fe,Ze=be,ut=Math.sqrt(je*je+Ze*Ze);je/=ut,Ze/=ut;let ft=[0,je,Ze];e.bF(ft,ft,[0,0,0],-this.bearingInRadians),e.bG(ft,ft,[0,0,0],-1*this.center.lat*Math.PI/180),e.bH(ft,ft,[0,0,0],this.center.lng*Math.PI/180);let Dt=1/e.b5(ft);return e.aZ(ft,ft,Dt),[...ft,-Re*Dt]}isLocationOccluded(y){return!this.isSurfacePointVisible(yo(y))}transformLightDirection(y){let N=this._helper._center.lng*Math.PI/180,ie=this._helper._center.lat*Math.PI/180,fe=Math.cos(ie),be=[Math.sin(N)*fe,Math.sin(ie),Math.cos(N)*fe],Re=[be[2],0,-be[0]],je=[0,0,0];e.b2(je,Re,be),e.b1(Re,Re),e.b1(je,je);let Ze=[0,0,0];return e.b1(Ze,[Re[0]*y[0]+je[0]*y[1]+be[0]*y[2],Re[1]*y[0]+je[1]*y[1]+be[1]*y[2],Re[2]*y[0]+je[2]*y[1]+be[2]*y[2]]),Ze}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(y,N,ie){let fe=function(je,Ze,ut){let ft=1/(1<be&&(be=Gt),Ktje&&(je=Kt)}let ft=[ut.lng+Re,ut.lat+Ze,ut.lng+be,ut.lat+je];return this.isSurfacePointOnScreen([0,1,0])&&(ft[3]=90,ft[0]=-180,ft[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(ft[1]=-90,ft[0]=-180,ft[2]=180),new q(ft)}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){let ie=yo(this.unprojectScreenPoint(N)),fe=yo(y),be=e.bz();e.bK(be);let Re=e.bz();e.bH(Re,ie,be,-this.center.lng*Math.PI/180),e.bG(Re,Re,be,this.center.lat*Math.PI/180);let je=fe[0]*fe[0]+fe[2]*fe[2],Ze=Re[0]*Re[0];if(je=-ir&&st<=ir,Ar=Ut>=-ir&&Ut<=ir,hr,vr;if(dr&&Ar){let ka=this.center.lng*Math.PI/180,Ta=this.center.lat*Math.PI/180;e.bM(Dt,ka)+e.bM(st,Ta)=0}isSurfacePointOnScreen(y){if(!this.isSurfacePointVisible(y))return!1;let N=e.bE();return e.aE(N,[...y,1],this._globeViewProjMatrixNoCorrection),N[0]/=N[3],N[1]/=N[3],N[2]/=N[3],N[0]>-1&&N[0]<1&&N[1]>-1&&N[1]<1&&N[2]>-1&&N[2]<1}rayPlanetIntersection(y,N){let ie=e.b3(y,N),fe=e.bz(),be=e.bz();e.aZ(be,N,ie),e.b0(fe,y,be);let Re=1-e.b3(fe,fe);if(Re<0)return null;let je=e.b3(y,y)-1,Ze=-ie+(ie<0?1:-1)*Math.sqrt(Re),ut=je/Ze,ft=Ze;return{tMin:Math.min(ut,ft),tMax:Math.max(ut,ft)}}unprojectScreenPoint(y){let N=this._cameraPosition,ie=this.getRayDirectionFromPixel(y),fe=this.rayPlanetIntersection(N,ie);if(fe){let ft=e.bz();e.a_(ft,N,[ie[0]*fe.tMin,ie[1]*fe.tMin,ie[2]*fe.tMin]);let Dt=e.bz();return e.b1(Dt,ft),Dl(Dt)}let be=this._cachedClippingPlane,Re=be[0]*ie[0]+be[1]*ie[1]+be[2]*ie[2],je=-e.b9(be,N)/Re,Ze=e.bz();if(je>0)e.a_(Ze,N,[ie[0]*je,ie[1]*je,ie[2]*je]);else{let ft=e.bz();e.a_(ft,N,[2*ie[0],2*ie[1],2*ie[2]]);let Dt=e.b9(this._cachedClippingPlane,ft);e.b0(Ze,ft,[this._cachedClippingPlane[0]*Dt,this._cachedClippingPlane[1]*Dt,this._cachedClippingPlane[2]*Dt])}let ut=function(ft){let Dt=e.bz();return Dt[0]=ft[0]*-ft[3],Dt[1]=ft[1]*-ft[3],Dt[2]=ft[2]*-ft[3],{center:Dt,radius:Math.sqrt(1-ft[3]*ft[3])}}(be);return Dl(function(ft,Dt,Gt){let Kt=e.bz();e.b0(Kt,Gt,ft);let st=e.bz();return e.bx(st,ft,Kt,Dt/e.b7(Kt)),st}(ut.center,ut.radius,Ze))}getMatrixForModel(y,N){let ie=e.W.convert(y),fe=1/e.bD,be=e.bi();return e.bI(be,be,ie.lng/180*Math.PI),e.bf(be,be,-ie.lat/180*Math.PI),e.Q(be,be,[0,0,1+N/e.bD]),e.bf(be,be,.5*Math.PI),e.S(be,be,[fe,fe,fe]),be}getProjectionDataForCustomLayer(y=!0){let N=this.getProjectionData({overscaledTileID:new e.a3(0,0,0,0,0),applyGlobeMatrix:y});return N.tileMercatorCoords=[0,0,1,1],N}getFastPathSimpleProjectionMatrix(y){}}class os{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(y){this._helper.setMinZoom(y)}setMaxZoom(y){this._helper.setMaxZoom(y)}setMinPitch(y){this._helper.setMinPitch(y)}setMaxPitch(y){this._helper.setMaxPitch(y)}setRenderWorldCopies(y){this._helper.setRenderWorldCopies(y)}setBearing(y){this._helper.setBearing(y)}setPitch(y){this._helper.setPitch(y)}setRoll(y){this._helper.setRoll(y)}setFov(y){this._helper.setFov(y)}setZoom(y){this._helper.setZoom(y)}setCenter(y){this._helper.setCenter(y)}setElevation(y){this._helper.setElevation(y)}setMinElevationForCurrentTile(y){this._helper.setMinElevationForCurrentTile(y)}setPadding(y){this._helper.setPadding(y)}interpolatePadding(y,N,ie){this._helper.interpolatePadding(y,N,ie)}isPaddingEqual(y){return this._helper.isPaddingEqual(y)}resize(y,N,ie=!0){this._helper.resize(y,N,ie)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(y){this._helper.setMaxBounds(y)}setConstrainOverride(y){this._helper.setConstrainOverride(y)}overrideNearFarZ(y,N){this._helper.overrideNearFarZ(y,N)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(y){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),y)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(y,N){this._globeness=y,this._globeLatitudeErrorCorrectionRadians=N,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(y){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(N,ie)=>this.currentTransform.defaultConstrain(N,ie),this.applyConstrain=(N,ie)=>this._helper.applyConstrain(N,ie),this._helper=new Hi({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(N,ie)=>this.defaultConstrain(N,ie)},y),this._globeness=1,this._mercatorTransform=new Eo,this._verticalPerspectiveTransform=new vs}clone(){let y=new os;return y._globeness=this._globeness,y._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,y.apply(this,!1),y}apply(y,N){this._helper.apply(y,N),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(y){let N=this._mercatorTransform.getProjectionData(y),ie=this._verticalPerspectiveTransform.getProjectionData(y);return{mainMatrix:this.isGlobeRendering?ie.mainMatrix:N.mainMatrix,clippingPlane:ie.clippingPlane,tileMercatorCoords:ie.tileMercatorCoords,projectionTransition:y.applyGlobeMatrix?this._globeness:0,fallbackMatrix:N.fallbackMatrix}}isLocationOccluded(y){return this.currentTransform.isLocationOccluded(y)}transformLightDirection(y){return this.currentTransform.transformLightDirection(y)}getPixelScale(){return e.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return e.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(y,N,ie){let fe=this._mercatorTransform.getPitchedTextCorrection(y,N,ie),be=this._verticalPerspectiveTransform.getPitchedTextCorrection(y,N,ie);return e.bt(fe,be,this._globeness)}projectTileCoordinates(y,N,ie,fe){return this.currentTransform.projectTileCoordinates(y,N,ie,fe)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(y){return this.currentTransform.calculateFogMatrix(y)}getVisibleUnwrappedCoordinates(y){return this.currentTransform.getVisibleUnwrappedCoordinates(y)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(y){this._mercatorTransform.recalculateZoomAndCenter(y),this._verticalPerspectiveTransform.recalculateZoomAndCenter(y)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(y,N){return this.currentTransform.lngLatToCameraDepth(y,N)}populateCache(y){this._mercatorTransform.populateCache(y),this._verticalPerspectiveTransform.populateCache(y)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(y,N,ie,fe){return this._helper.calculateCenterFromCameraLngLatAlt(y,N,ie,fe)}setLocationAtPoint(y,N){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(y,N),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(y,N),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(y,N){return this.currentTransform.locationToScreenPoint(y,N)}screenPointToMercatorCoordinate(y,N){return this.currentTransform.screenPointToMercatorCoordinate(y,N)}screenPointToLocation(y,N){return this.currentTransform.screenPointToLocation(y,N)}isPointOnMapSurface(y,N){return this.currentTransform.isPointOnMapSurface(y,N)}getRayDirectionFromPixel(y){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(y)}getMatrixForModel(y,N){return this.currentTransform.getMatrixForModel(y,N)}getProjectionDataForCustomLayer(y=!0){let N=this._mercatorTransform.getProjectionDataForCustomLayer(y);if(!this.isGlobeRendering)return N;let ie=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(y);return ie.fallbackMatrix=N.mainMatrix,ie}getFastPathSimpleProjectionMatrix(y){return this.currentTransform.getFastPathSimpleProjectionMatrix(y)}}class ms{get useGlobeControls(){return!0}handlePanInertia(y,N){let ie=dl(y,N);return Math.abs(ie.lng-N.center.lng)>180&&(ie.lng=N.center.lng+179.5*Math.sign(ie.lng-N.center.lng)),{easingCenter:ie,easingOffset:new e.P(0,0)}}handleMapControlsRollPitchBearingZoom(y,N){let ie=y.around,fe=N.screenPointToLocation(ie);y.bearingDelta&&N.setBearing(N.bearing+y.bearingDelta),y.pitchDelta&&N.setPitch(N.pitch+y.pitchDelta),y.rollDelta&&N.setRoll(N.roll+y.rollDelta);let be=N.zoom;y.zoomDelta&&N.setZoom(N.zoom+y.zoomDelta);let Re=N.zoom-be;if(Re===0)return;let je=e.bJ(N.center.lng,fe.lng),Ze=je/(Math.abs(je/180)+1),ut=e.bJ(N.center.lat,fe.lat),ft=N.getRayDirectionFromPixel(ie),Dt=N.cameraPosition,Gt=-1*e.b3(Dt,ft),Kt=e.bz();e.a_(Kt,Dt,[ft[0]*Gt,ft[1]*Gt,ft[2]*Gt]);let st=e.b5(Kt)-1,It=Math.exp(.5*-Math.max(st-.3,0)),Ut=bs(N.worldSize,N.center.lat)/Math.min(N.width,N.height),ir=e.bw(Ut,.9,.5,1,.25),dr=(1-e.ao(-Re))*Math.min(It,ir),Ar=N.center.lat,hr=N.zoom,vr=new e.W(N.center.lng+Ze*dr,e.al(N.center.lat+ut*dr,-e.am,e.am));N.setLocationAtPoint(fe,ie);let Or=N.center,Cr=e.bw(Math.abs(je),45,85,0,1),ta=e.bw(Ut,.75,.35,0,1),ka=Math.pow(Math.max(Cr,ta),.25),Ta=e.bJ(Or.lng,vr.lng),Ra=e.bJ(Or.lat,vr.lat);N.setCenter(new e.W(Or.lng+Ta*ka,Or.lat+Ra*ka).wrap()),N.setZoom(hr+ps(Ar,N.center.lat))}handleMapControlsPan(y,N,ie){if(!y.panDelta)return;let fe=N.center.lat,be=N.zoom;N.setCenter(dl(y.panDelta,N).wrap()),N.setZoom(be+ps(fe,N.center.lat))}cameraForBoxAndBearing(y,N,ie,fe,be){let Re=jo(y,N,ie,fe,be),je=N.left/be.width*2-1,Ze=(be.width-N.right)/be.width*2-1,ut=N.top/be.height*-2+1,ft=(be.height-N.bottom)/be.height*-2+1,Dt=e.bJ(ie.getWest(),ie.getEast())<0,Gt=Dt?ie.getEast():ie.getWest(),Kt=Dt?ie.getWest():ie.getEast(),st=Math.max(ie.getNorth(),ie.getSouth()),It=Math.min(ie.getNorth(),ie.getSouth()),Ut=Gt+.5*e.bJ(Gt,Kt),ir=st+.5*e.bJ(st,It),dr=be.clone();dr.setCenter(Re.center),dr.setBearing(Re.bearing),dr.setPitch(0),dr.setRoll(0),dr.setZoom(Re.zoom);let Ar=dr.modelViewProjectionMatrix,hr=[yo(ie.getNorthWest()),yo(ie.getNorthEast()),yo(ie.getSouthWest()),yo(ie.getSouthEast()),yo(new e.W(Kt,ir)),yo(new e.W(Gt,ir)),yo(new e.W(Ut,st)),yo(new e.W(Ut,It))],vr=yo(Re.center),Or=Number.POSITIVE_INFINITY;for(let Cr of hr)je<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",je))),Ze>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"x",Ze))),ut>0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ut))),ft<0&&(Or=ms.getLesserNonNegativeNonNull(Or,ms.solveVectorScale(Cr,vr,Ar,"y",ft)));if(Number.isFinite(Or)&&Or!==0)return Re.zoom=Math.min(dr.zoom+e.ar(Or),y.maxZoom),Re;Ao()}handleJumpToCenterZoom(y,N){let ie=y.center.lat,fe=y.applyConstrain(N.center?e.W.convert(N.center):y.center,y.zoom).center;y.setCenter(fe.wrap());let be=N.zoom!==void 0?+N.zoom:y.zoom+ps(ie,fe.lat);y.zoom!==be&&y.setZoom(be)}handleEaseTo(y,N){let ie=y.zoom,fe=y.center,be=y.padding,Re={roll:y.roll,pitch:y.pitch,bearing:y.bearing},je={roll:N.roll===void 0?y.roll:N.roll,pitch:N.pitch===void 0?y.pitch:N.pitch,bearing:N.bearing===void 0?y.bearing:N.bearing},Ze=N.zoom!==void 0,ut=!y.isPaddingEqual(N.padding),ft=!1,Dt=N.center?e.W.convert(N.center):fe,Gt=y.applyConstrain(Dt,ie).center;Vn(y,Gt);let Kt=y.clone();Kt.setCenter(Gt),Kt.setZoom(Ze?+N.zoom:ie+ps(fe.lat,Dt.lat)),Kt.setBearing(N.bearing);let st=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));Kt.setLocationAtPoint(Gt,st);let It=(N.offset&&N.offsetAsPoint.mag())>0?Kt.center:Gt,Ut=Ze?+N.zoom:ie+ps(fe.lat,It.lat),ir=ie+ps(fe.lat,0),dr=Ut+ps(It.lat,0),Ar=e.bJ(fe.lng,It.lng),hr=e.bJ(fe.lat,It.lat),vr=e.ao(dr-ir);return ft=Ut!==ie,{easeFunc:Or=>{if(e.bn(Re,je)||ds({startEulerAngles:Re,endEulerAngles:je,tr:y,k:Or,useSlerp:Re.roll!=je.roll}),ut&&y.interpolatePadding(be,N.padding,Or),N.around)e.w("Easing around a point is not supported under globe projection."),y.setLocationAtPoint(N.around,N.aroundPoint);else{let Cr=dr>ir?Math.min(2,vr):Math.max(.5,vr),ta=Math.pow(Cr,1-Or),ka=lu(fe,Ar,hr,Or*ta);y.setCenter(ka.wrap())}if(ft){let Cr=e.H.number(ir,dr,Or)+ps(0,y.center.lat);y.setZoom(Cr)}},isZooming:ft,elevationCenter:It}}handleFlyTo(y,N){let ie=N.zoom!==void 0,fe=y.center,be=y.zoom,Re=y.padding,je=!y.isPaddingEqual(N.padding),Ze=y.applyConstrain(e.W.convert(N.center||N.locationAtOffset),be).center,ut=ie?+N.zoom:y.zoom+ps(y.center.lat,Ze.lat),ft=y.clone();ft.setCenter(Ze),ft.setZoom(ut),ft.setBearing(N.bearing);let Dt=new e.P(e.al(y.centerPoint.x+N.offsetAsPoint.x,0,y.width),e.al(y.centerPoint.y+N.offsetAsPoint.y,0,y.height));ft.setLocationAtPoint(Ze,Dt);let Gt=ft.center;Vn(y,Gt);let Kt=function(hr,vr,Or){let Cr=yo(vr),ta=yo(Or),ka=e.b3(Cr,ta),Ta=Math.acos(ka),Ra=_o(hr);return Ta/(2*Math.PI)*Ra}(y,fe,Gt),st=be+ps(fe.lat,0),It=ut+ps(Gt.lat,0),Ut=e.ao(It-st),ir;if(typeof N.minZoom=="number"){let hr=+N.minZoom+ps(Gt.lat,0),vr=Math.min(hr,st,It)+ps(0,Gt.lat),Or=y.applyConstrain(Gt,vr).zoom+ps(Gt.lat,0);ir=e.ao(Or-st)}let dr=e.bJ(fe.lng,Gt.lng),Ar=e.bJ(fe.lat,Gt.lat);return{easeFunc:(hr,vr,Or,Cr)=>{let ta=lu(fe,dr,Ar,Or);je&&y.interpolatePadding(Re,N.padding,hr);let ka=hr===1?Gt:ta;y.setCenter(ka.wrap());let Ta=st+e.ar(vr);y.setZoom(hr===1?ut:Ta+ps(0,ka.lat))},scaleOfZoom:Ut,targetCenter:Gt,scaleOfMinZoom:ir,pixelPathLength:Kt}}static solveVectorScale(y,N,ie,fe,be){let Re=fe==="x"?[ie[0],ie[4],ie[8],ie[12]]:[ie[1],ie[5],ie[9],ie[13]],je=[ie[3],ie[7],ie[11],ie[15]],Ze=y[0]*Re[0]+y[1]*Re[1]+y[2]*Re[2],ut=y[0]*je[0]+y[1]*je[1]+y[2]*je[2],ft=N[0]*Re[0]+N[1]*Re[1]+N[2]*Re[2],Dt=N[0]*je[0]+N[1]*je[1]+N[2]*je[2];return ft+be*ut===Ze+be*Dt||je[3]*(Ze-ft)+Re[3]*(Dt-ut)+Ze*Dt==ft*ut?null:(ft+Re[3]-be*Dt-be*je[3])/(ft-Ze-be*Dt+be*ut)}static getLesserNonNegativeNonNull(y,N){return N!==null&&N>=0&&Ne.C(pe,y?.filter(N=>N.identifier!=="source.canvas")),zu=e.bN();class Ku extends e.E{constructor(y,N={}){var ie,fe;super(),this._rtlPluginLoaded=()=>{for(let Re in this.tileManagers){let je=this.tileManagers[Re].getSource().type;je!=="vector"&&je!=="geojson"||this.tileManagers[Re].reload()}},this.map=y,this.dispatcher=new ne(re(),y._getMapId()),this.dispatcher.registerMessageHandler("GG",(Re,je)=>this.getGlyphs(Re,je)),this.dispatcher.registerMessageHandler("GI",(Re,je)=>this.getImages(Re,je)),this.dispatcher.registerMessageHandler("GDA",(Re,je)=>this.getDashes(Re,je)),this.imageManager=new C,this.imageManager.setEventedParent(this);let be=((ie=y._container)===null||ie===void 0?void 0:ie.lang)||typeof document<"u"&&((fe=document.documentElement)===null||fe===void 0?void 0:fe.lang)||void 0;this.glyphManager=new x(y._requestManager,N.localIdeographFontFamily,be),this.lineAtlas=new F(256,512),this.crossTileSymbolIndex=new Di,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",e.bO()),Ye().on(Ae,this._rtlPluginLoaded),this.on("data",Re=>{if(Re.dataType!=="source"||Re.sourceDataType!=="metadata")return;let je=this.tileManagers[Re.sourceId];if(!je)return;let Ze=je.getSource();if(Ze?.vectorLayerIds)for(let ut in this._layers){let ft=this._layers[ut];ft.source===Ze.id&&this._validateLayer(ft)}})}_setInitialValues(){var y;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new e.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((y=this.crossTileSymbolIndex)===null||y===void 0?void 0:y.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(y,N){var ie,fe,be;this._checkLoaded();let Re=N===null?(be=(fe=(ie=this.stylesheet.state)===null||ie===void 0?void 0:ie[y])===null||fe===void 0?void 0:fe.default)!==null&&be!==void 0?be:null:N;if(e.bQ(Re,this._globalState[y]))return this;this._globalState[y]=Re,this._applyGlobalStateChanges([y])}getGlobalState(){return this._globalState}setGlobalState(y){this._checkLoaded();let N=[];for(let ie in y)!e.bQ(this._globalState[ie],y[ie].default)&&(N.push(ie),this._globalState[ie]=y[ie].default);this._applyGlobalStateChanges(N)}_applyGlobalStateChanges(y){if(y.length===0)return;let N=new Set,ie={};for(let fe of y){ie[fe]=this._globalState[fe];for(let be in this._layers){let Re=this._layers[be],je=Re.getLayoutAffectingGlobalStateRefs(),Ze=Re.getPaintAffectingGlobalStateRefs(),ut=Re.getVisibilityAffectingGlobalStateRefs();if(je.has(fe)&&N.add(Re.source),Ze.has(fe))for(let{name:ft,value:Dt}of Ze.get(fe))this._updatePaintProperty(Re,ft,Dt);ut?.has(fe)&&(Re.recalculateVisibility(),this._updateLayer(Re))}}this.dispatcher.broadcast("UGS",ie);for(let fe in this.tileManagers)N.has(fe)&&(this._reloadSource(fe),this._changed=!0)}loadURL(y){return e._(this,arguments,void 0,function*(N,ie={},fe){this.fire(new e.n("dataloading",{dataType:"style"})),ie.validate=typeof ie.validate!="boolean"||ie.validate,this._loadStyleRequest=new AbortController;let be=this._loadStyleRequest;try{let Re=yield this.map._requestManager.transformRequest(N,"Style");e.bR(be.signal);let je=yield e.k(Re,be);this._loadStyleRequest===be&&(this._loadStyleRequest=null),this._load(je.data,ie,fe)}catch(Re){this._loadStyleRequest===be&&(this._loadStyleRequest=null),Re&&!be.signal.aborted&&this.fire(new e.l(e.d(Re)))}})}loadJSON(y,N={},ie){this.fire(new e.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,s.frameAsync(this._frameRequest,this.map._ownerWindow).then(()=>{this._frameRequest=null,N.validate=N.validate!==!1,this._load(y,N,ie)}).catch(()=>{})}loadEmpty(){this.fire(new e.n("dataloading",{dataType:"style"})),this._load(zu,{validate:!1})}_load(y,N,ie){var fe,be;let Re=N.transformStyle?N.transformStyle(ie,y):y;if(!N.validate||!Fu(this,e.F(Re))){Re=Object.assign({},Re),this._loaded=!0,this.stylesheet=Re;for(let je in Re.sources)this.addSource(je,Re.sources[je],{validate:!1});Re.sprite?this._loadSprite(Re.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(Re.glyphs),this._createLayers(),this.light=new O(this.stylesheet.light),this._setProjectionInternal(((fe=this.stylesheet.projection)===null||fe===void 0?void 0:fe.type)||"mercator"),this.sky=new B(this.stylesheet.sky),this.map.setTerrain((be=this.stylesheet.terrain)!==null&&be!==void 0?be:null),this.fire(new e.n("data",{dataType:"style"})),this.fire(new e.n("style.load"))}}_createLayers(){var y,N,ie;let fe=e.bS(this.stylesheet.layers);this.setGlobalState((y=this.stylesheet.state)!==null&&y!==void 0?y:null),this.dispatcher.broadcast("SL",fe),this._order=fe.map(be=>be.id),this._layers={},this._serializedLayers=null;for(let be of fe){let Re=e.bT(be,this._globalState);if(Re.setEventedParent(this,{layer:{id:be.id}}),this._layers[be.id]=Re,e.bU(Re)&&this.tileManagers[Re.source]){let je=(ie=(N=be.paint)===null||N===void 0?void 0:N["raster-fade-duration"])!==null&&ie!==void 0?ie:Re.paint.get("raster-fade-duration");this.tileManagers[Re.source].setRasterFadeDuration(je)}}}_loadSprite(y,N=!1,ie=void 0){this.imageManager.setLoaded(!1);let fe=new AbortController,be;this._spriteRequest=fe,function(Re,je,Ze,ut){return e._(this,void 0,void 0,function*(){let ft=w(Re),Dt=Ze>1?"@2x":"",Gt={},Kt={};for(let{id:st,url:It}of ft){let Ut=yield je.transformRequest(S(It,Dt,".json"),"SpriteJSON");Gt[st]=e.k(Ut,ut);let ir=yield je.transformRequest(S(It,Dt,".png"),"SpriteImage");Kt[st]=v.getImage(ir,ut)}return yield Promise.all([...Object.values(Gt),...Object.values(Kt)]),function(st,It){return e._(this,void 0,void 0,function*(){let Ut={};for(let ir in st){Ut[ir]={};let dr=s.getImageCanvasContext((yield It[ir]).data),Ar=(yield st[ir]).data;for(let hr in Ar){let{width:vr,height:Or,x:Cr,y:ta,sdf:ka,pixelRatio:Ta,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ma,textFitHeight:da}=Ar[hr];Ut[ir][hr]={data:null,pixelRatio:Ta,sdf:ka,stretchX:Ra,stretchY:ua,content:ia,textFitWidth:ma,textFitHeight:da,spriteData:{width:vr,height:Or,x:Cr,y:ta,context:dr}}}}return Ut})}(Gt,Kt)})}(y,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then(Re=>{if(this._spriteRequest=null,Re)for(let je in Re){this._spritesImagesIds[je]=[];let Ze=this._spritesImagesIds[je]?this._spritesImagesIds[je].filter(ut=>!(ut in Re)):[];for(let ut of Ze)this.imageManager.removeImage(ut),this._changedImages[ut]=!0;for(let ut in Re[je]){let ft=je==="default"?ut:`${je}:${ut}`;this._spritesImagesIds[je].push(ft),ft in this.imageManager.images?this.imageManager.updateImage(ft,Re[je][ut],!1):this.imageManager.addImage(ft,Re[je][ut]),N&&(this._changedImages[ft]=!0)}}}).catch(Re=>{this._spriteRequest=null,be=Re,fe.signal.aborted||this.fire(new e.l(be))}).finally(()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),N&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"})),ie&&ie(be)})}_unloadSprite(){for(let y of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(y),this._changedImages[y]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}_validateLayer(y){let N=this.tileManagers[y.source];if(!N)return;let ie=y.sourceLayer;if(!ie)return;let fe=N.getSource();(fe.type==="geojson"||fe.vectorLayerIds&&!fe.vectorLayerIds.includes(ie))&&this.fire(new e.l(new Error(`Source layer "${ie}" does not exist on source "${fe.id}" as specified by style layer "${y.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let y in this.tileManagers)if(!this.tileManagers[y].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(y,N=!1){let ie=this._serializedAllLayers();if(!y||y.length===0)return Object.values(N?e.bV(ie):ie);let fe=[];for(let be of y)if(ie[be]){let Re=N?e.bV(ie[be]):ie[be];fe.push(Re)}return fe}_serializedAllLayers(){let y=this._serializedLayers;if(y)return y;y=this._serializedLayers={};let N=Object.keys(this._layers);for(let ie of N){let fe=this._layers[ie];fe.type!=="custom"&&(y[ie]=fe.serialize())}return y}hasTransitions(){var y,N,ie;if(!((y=this.light)===null||y===void 0)&&y.hasTransition()||!((N=this.sky)===null||N===void 0)&&N.hasTransition()||!((ie=this.projection)===null||ie===void 0)&&ie.hasTransition())return!0;for(let fe in this.tileManagers)if(this.tileManagers[fe].hasTransition())return!0;for(let fe in this._layers)if(this._layers[fe].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(y){if(!this._loaded)return;let N=this._changed;if(N){let fe=Object.keys(this._updatedLayers),be=Object.keys(this._removedLayers);(fe.length||be.length)&&this._updateWorkerLayers(fe,be);for(let Re in this._updatedSources){let je=this._updatedSources[Re];if(je==="reload")this._reloadSource(Re);else{if(je!=="clear")throw new Error(`Invalid action ${je}`);this._clearSource(Re)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let Re in this._updatedPaintProps)this._layers[Re].updateTransitions(y);this.light.updateTransitions(y),this.sky.updateTransitions(y),this._resetUpdates()}let ie={};for(let fe in this.tileManagers){let be=this.tileManagers[fe];ie[fe]=be.used,be.used=!1}for(let fe of this._order){let be=this._layers[fe];be.recalculate(y,this._availableImages),!be.isHidden(y.zoom)&&be.source&&(this.tileManagers[be.source].used=!0)}for(let fe in ie){let be=this.tileManagers[fe];!!ie[fe]!=!!be.used&&be.fire(new e.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:fe}))}this.light.recalculate(y),this.sky.recalculate(y),this.projection.recalculate(y),this.z=y.zoom,N&&this.fire(new e.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let y=Object.keys(this._changedImages);if(y.length){for(let N in this.tileManagers)this.tileManagers[N].reloadTilesForDependencies(["icons","patterns"],y);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let y in this.tileManagers)this.tileManagers[y].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(y,N){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(y,!1),removedIds:N})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(y,N={}){var ie;this._checkLoaded();let fe=this.serialize();if(y=N.transformStyle?N.transformStyle(fe,y):y,((ie=N.validate)===null||ie===void 0||ie)&&Fu(this,e.F(y)))return!1;(y=e.bV(y)).layers=e.bS(y.layers);let be=e.bW(fe,y),Re=this._getOperationsToPerform(be);if(Re.unimplemented.length>0)throw new Error(`Unimplemented: ${Re.unimplemented.join(", ")}.`);if(Re.operations.length===0)return!1;for(let je of Re.operations)je();return this.stylesheet=y,this._serializedLayers=null,this.fire(new e.n("style.load",{style:this})),!0}_getOperationsToPerform(y){let N=[],ie=[];for(let fe of y)switch(fe.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":N.push(()=>this.addLayer.apply(this,fe.args));break;case"removeLayer":N.push(()=>this.removeLayer.apply(this,fe.args));break;case"setPaintProperty":N.push(()=>this.setPaintProperty.apply(this,fe.args));break;case"setLayoutProperty":N.push(()=>this.setLayoutProperty.apply(this,fe.args));break;case"setFilter":N.push(()=>this.setFilter.apply(this,fe.args));break;case"addSource":N.push(()=>this.addSource.apply(this,fe.args));break;case"removeSource":N.push(()=>this.removeSource.apply(this,fe.args));break;case"setLayerZoomRange":N.push(()=>this.setLayerZoomRange.apply(this,fe.args));break;case"setLight":N.push(()=>this.setLight.apply(this,fe.args));break;case"setGeoJSONSourceData":N.push(()=>this.setGeoJSONSourceData.apply(this,fe.args));break;case"setGlyphs":N.push(()=>this.setGlyphs.apply(this,fe.args));break;case"setSprite":N.push(()=>this.setSprite.apply(this,fe.args));break;case"setTerrain":N.push(()=>this.map.setTerrain.apply(this,fe.args));break;case"setSky":N.push(()=>this.setSky.apply(this,fe.args));break;case"setProjection":this.setProjection.apply(this,fe.args);break;case"setGlobalState":N.push(()=>this.setGlobalState.apply(this,fe.args));break;case"setTransition":N.push(()=>{});break;default:ie.push(fe.command)}return{operations:N,unimplemented:ie}}addImage(y,N){if(this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" already exists.`)));this.imageManager.addImage(y,N),this._afterImageUpdated(y)}updateImage(y,N){this.imageManager.updateImage(y,N)}getImage(y){return this.imageManager.getImage(y)}removeImage(y){if(!this.getImage(y))return this.fire(new e.l(new Error(`An image named "${y}" does not exist.`)));this.imageManager.removeImage(y),this._afterImageUpdated(y)}_afterImageUpdated(y){this._availableImages=this.imageManager.listImages(),this._changedImages[y]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(y,N,ie={}){var fe;if(this._checkLoaded(),this.tileManagers[y]!==void 0)throw new Error(`Source "${y}" already exists.`);if(!N.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(N).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(N.type)&&this._validate(e.F.source,`sources.${y}`,N,null,ie))return;!((fe=this.map)===null||fe===void 0)&&fe._collectResourceTiming&&(N.collectResourceTiming=!0);let be=this.tileManagers[y]=new Sr(y,N,this.dispatcher);be.style=this,be.setEventedParent(this,()=>({isSourceLoaded:be.loaded(),source:be.serialize(),sourceId:y})),be.onAdd(this.map),this._changed=!0}removeSource(y){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);for(let ie in this._layers)if(this._layers[ie].source===y)return this.fire(new e.l(new Error(`Source "${y}" cannot be removed while layer "${ie}" is using it.`)));let N=this.tileManagers[y];delete this.tileManagers[y],delete this._updatedSources[y],N.fire(new e.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:y})),N.setEventedParent(null),N.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(y,N){if(this._checkLoaded(),this.tileManagers[y]===void 0)throw new Error(`There is no source with this ID=${y}`);let ie=this.tileManagers[y].getSource();if(ie.type!=="geojson")throw new Error(`geojsonSource.type is ${ie.type}, which is !== 'geojson`);ie.setData(N),this._changed=!0}getSource(y){var N;return(N=this.tileManagers[y])===null||N===void 0?void 0:N.getSource()}addLayer(y,N,ie={}){this._checkLoaded();let fe=y.id;if(this.getLayer(fe))return void this.fire(new e.l(new Error(`Layer "${fe}" already exists on this map.`)));let be;if(y.type==="custom"){if(Fu(this,e.bX(y)))return;be=e.bT(y,this._globalState)}else{if("source"in y&&typeof y.source=="object"&&(this.addSource(fe,y.source),y=e.bV(y),y=e.e(y,{source:fe})),this._validate(e.F.layer,`layers.${fe}`,y,{arrayIndex:-1},ie))return;be=e.bT(y,this._globalState),this._validateLayer(be),be.setEventedParent(this,{layer:{id:fe}})}let Re=N?this._order.indexOf(N):this._order.length;if(N&&Re===-1)this.fire(new e.l(new Error(`Cannot add layer "${fe}" before non-existing layer "${N}".`)));else{if(this._order.splice(Re,0,fe),this._layerOrderChanged=!0,this._layers[fe]=be,this._removedLayers[fe]&&be.source&&be.type!=="custom"){let je=this._removedLayers[fe];delete this._removedLayers[fe],je.type!==be.type?this._updatedSources[be.source]="clear":(this._updatedSources[be.source]="reload",this.tileManagers[be.source].pause())}this._updateLayer(be),be.onAdd&&be.onAdd(this.map)}}moveLayer(y,N){if(this._checkLoaded(),this._changed=!0,!this._layers[y])return void this.fire(new e.l(new Error(`The layer '${y}' does not exist in the map's style and cannot be moved.`)));if(y===N)return;let ie=this._order.indexOf(y);this._order.splice(ie,1);let fe=N?this._order.indexOf(N):this._order.length;N&&fe===-1?this.fire(new e.l(new Error(`Cannot move layer "${y}" before non-existing layer "${N}".`))):(this._order.splice(fe,0,y),this._layerOrderChanged=!0)}removeLayer(y){this._checkLoaded();let N=this._layers[y];if(!N)return void this.fire(new e.l(new Error(`Cannot remove non-existing layer "${y}".`)));N.setEventedParent(null);let ie=this._order.indexOf(y);this._order.splice(ie,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[y]=N,delete this._layers[y],this._serializedLayers&&delete this._serializedLayers[y],delete this._updatedLayers[y],delete this._updatedPaintProps[y],N.onRemove&&N.onRemove(this.map)}getLayer(y){return this._layers[y]}getLayersOrder(){return[...this._order]}hasLayer(y){return y in this._layers}setLayerZoomRange(y,N,ie){this._checkLoaded();let fe=this.getLayer(y);fe?fe.minzoom===N&&fe.maxzoom===ie||(N!=null&&(fe.minzoom=N),ie!=null&&(fe.maxzoom=ie),this._updateLayer(fe)):this.fire(new e.l(new Error(`Cannot set the zoom range of non-existing layer "${y}".`)))}setFilter(y,N,ie={}){this._checkLoaded();let fe=this.getLayer(y);if(fe){if(!e.bQ(fe.filter,N))return N==null?(fe.setFilter(void 0),void this._updateLayer(fe)):void(this._validate(e.F.filter,`layers.${fe.id}.filter`,N,null,ie)||(fe.setFilter(e.bV(N)),this._updateLayer(fe)))}else this.fire(new e.l(new Error(`Cannot filter non-existing layer "${y}".`)))}getFilter(y){return e.bV(this.getLayer(y).filter)}setLayoutProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getLayoutProperty(N),ie)||(be.setLayoutProperty(N,ie,fe),this._updateLayer(be)):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}getLayoutProperty(y,N){let ie=this.getLayer(y);if(ie)return ie.getLayoutProperty(N);this.fire(new e.l(new Error(`Cannot get style of non-existing layer "${y}".`)))}setPaintProperty(y,N,ie,fe={}){this._checkLoaded();let be=this.getLayer(y);be?e.bQ(be.getPaintProperty(N),ie)||this._updatePaintProperty(be,N,ie,fe):this.fire(new e.l(new Error(`Cannot style non-existing layer "${y}".`)))}_updatePaintProperty(y,N,ie,fe={}){y.setPaintProperty(N,ie,fe)&&this._updateLayer(y),e.bU(y)&&N==="raster-fade-duration"&&this.tileManagers[y.source].setRasterFadeDuration(ie),this._changed=!0,this._updatedPaintProps[y.id]=!0,this._serializedLayers=null}getPaintProperty(y,N){return this.getLayer(y).getPaintProperty(N)}setFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=y.sourceLayer,be=this.tileManagers[ie];if(be===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let Re=be.getSource().type;Re==="geojson"&&fe?this.fire(new e.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):Re!=="vector"||fe?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),be.setFeatureState(fe,y.id,N)):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(y,N){this._checkLoaded();let ie=y.source,fe=this.tileManagers[ie];if(fe===void 0)return void this.fire(new e.l(new Error(`The source '${ie}' does not exist in the map's style.`)));let be=fe.getSource().type,Re=be==="vector"?y.sourceLayer:void 0;be!=="vector"||Re?N&&typeof y.id!="string"&&typeof y.id!="number"?this.fire(new e.l(new Error("A feature id is required to remove its specific state property."))):fe.removeFeatureState(Re,y.id,N):this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(y){this._checkLoaded();let N=y.source,ie=y.sourceLayer,fe=this.tileManagers[N];if(fe!==void 0)return fe.getSource().type!=="vector"||ie?(y.id===void 0&&this.fire(new e.l(new Error("The feature id parameter must be provided."))),fe.getFeatureState(ie,y.id)):void this.fire(new e.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new e.l(new Error(`The source '${N}' does not exist in the map's style.`)))}getTransition(){var y;return e.e({duration:300,delay:0},(y=this.stylesheet)===null||y===void 0?void 0:y.transition)}serialize(){if(!this._loaded)return;let y=e.bY(this.tileManagers,be=>be.serialize()),N=this._serializeByIds(this._order,!0),ie=this.map.getTerrain()||void 0,fe=this.stylesheet;return e.bZ({version:fe.version,name:fe.name,metadata:fe.metadata,light:fe.light,sky:fe.sky,center:fe.center,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,sprite:fe.sprite,glyphs:fe.glyphs,transition:fe.transition,projection:fe.projection,sources:y,layers:N,terrain:ie},be=>be!==void 0)}_updateLayer(y){this._updatedLayers[y.id]=!0,y.source&&!this._updatedSources[y.source]&&this.tileManagers[y.source].getSource().type!=="raster"&&(this._updatedSources[y.source]="reload",this.tileManagers[y.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(y){let N=Re=>this._layers[Re].type==="fill-extrusion",ie={},fe=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je)){ie[je]=Re;for(let Ze of y){let ut=Ze[je];if(ut)for(let ft of ut)fe.push(ft)}}}fe.sort((Re,je)=>je.intersectionZ-Re.intersectionZ);let be=[];for(let Re=this._order.length-1;Re>=0;Re--){let je=this._order[Re];if(N(je))for(let Ze=fe.length-1;Ze>=0;Ze--){let ut=fe[Ze].feature;if(ie[ut.layer.id]this.map.terrain.getElevation(ft,Dt,Gt):void 0));return this.placement&&be.push(function(ut,ft,Dt,Gt,Kt,st,It){let Ut={},ir=st.queryRenderedSymbols(Gt),dr=[];for(let Ar of Object.keys(ir).map(Number))dr.push(It[Ar]);dr.sort(K);for(let Ar of dr){let hr=Ar.featureIndex.lookupSymbolFeatures(ir[Ar.bucketInstanceId],ft,Ar.bucketIndex,Ar.sourceLayerIndex,{filterSpec:Kt.filter,globalState:Kt.globalState},Kt.layers,Kt.availableImages,ut);for(let vr in hr){Ut[vr]||(Ut[vr]=[]);let Or=hr[vr];Or.sort((Cr,ta)=>{let ka=Ar.featureSortOrder;if(ka){let Ta=ka.indexOf(Cr.featureIndex);return ka.indexOf(ta.featureIndex)-Ta}return ta.featureIndex-Cr.featureIndex});for(let Cr of Or)Ut[vr].push(Cr)}}return function(Ar,hr,vr){for(let Or in Ar)for(let Cr of Ar[Or])H(Cr,vr[hr[Or].source]);return Ar}(Ut,ut,Dt)}(this._layers,Re,this.tileManagers,y,Ze,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(be)}querySourceFeatures(y,N){N?.filter&&this._validate(e.F.filter,"querySourceFeatures.filter",N.filter,null,N);let ie=this.tileManagers[y];return ie?function(fe,be){let Re=fe.getRenderableIds().map(ut=>fe.getTileByID(ut)),je=[],Ze={};for(let ut of Re){let ft=ut.tileID.canonical.key;Ze[ft]||(Ze[ft]=!0,ut.querySourceFeatures(je,be))}return je}(ie,N?Object.assign(Object.assign({},N),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(y,N={}){this._checkLoaded();let ie=this.light.getLight(),fe=!1;for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(y,N),this.light.updateTransitions(be)}getProjection(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.projection}setProjection(y){this._checkLoaded();let N=y??{type:"mercator"};if(this.stylesheet.projection=y,this.projection){if(this.projection.name===N.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(N.type)}getSky(){var y;return(y=this.stylesheet)===null||y===void 0?void 0:y.sky}setSky(y,N={}){this._checkLoaded();let ie=this.getSky(),fe=!1;if(!y&&!ie)return;if(y&&!ie)fe=!0;else if(!y&&ie)fe=!0;else for(let Re in y)if(!e.bQ(y[Re],ie[Re])){fe=!0;break}if(!fe)return;let be={now:m(),transition:e.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=y,this.sky.setSky(y,N),this.sky.updateTransitions(be)}_setProjectionInternal(y){let N=function(ie,fe){let be={constrainOverride:fe};if(Array.isArray(ie)){let Re=new Bo({type:ie});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}switch(ie){case"mercator":return{projection:new io,transform:new Eo(be),cameraHelper:new Wo};case"globe":{let Re=new Bo({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:Re,transform:new os(be),cameraHelper:new rl(Re)}}case"vertical-perspective":return{projection:new Vs,transform:new vs(be),cameraHelper:new ms};default:return e.w(`Unknown projection name: ${ie}. Falling back to mercator projection.`),{projection:new io,transform:new Eo(be),cameraHelper:new Wo}}}(y,this.map.transformConstrain);this.projection=N.projection,this.map.migrateProjection(N.transform,N.cameraHelper);for(let ie in this.tileManagers)this.tileManagers[ie].reload()}_validate(y,N,ie,fe,be={}){return be?.validate!==!1&&Fu(this,y.call(e.F,e.e({key:N,style:this.serialize(),value:ie,styleSpec:e.x},fe)))}_remove(y=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),Ye().off(Ae,this._rtlPluginLoaded);for(let N in this._layers)this._layers[N].setEventedParent(null);for(let N in this.tileManagers){let ie=this.tileManagers[N];ie.setEventedParent(null),ie.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),y&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(y)}_clearSource(y){this.tileManagers[y].clearTiles()}_reloadSource(y){this.tileManagers[y].resume(),this.tileManagers[y].reload()}_updateSources(y){for(let N in this.tileManagers)this.tileManagers[N].update(y,this.map.terrain)}_generateCollisionBoxes(){for(let y in this.tileManagers)this._reloadSource(y)}_updatePlacement(y,N,ie,fe,be=!1){let Re=!1,je=!1,Ze={};for(let ut of this._order){let ft=this._layers[ut];if(ft.type!=="symbol")continue;if(!Ze[ft.source]){let Gt=this.tileManagers[ft.source];Ze[ft.source]=Gt.getRenderableIds(!0).map(Kt=>Gt.getTileByID(Kt)).sort((Kt,st)=>st.tileID.overscaledZ-Kt.tileID.overscaledZ||(Kt.tileID.isLessThan(st.tileID)?-1:1))}let Dt=this.crossTileSymbolIndex.addLayer(ft,Ze[ft.source],y.center.lng);Re||(Re=Dt)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),be||(be=this._layerOrderChanged||ie===0),(be||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(m(),y.zoom))&&(this.pauseablePlacement=new ai(y,this.map.terrain,this._order,be,N,ie,fe,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ze),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(m()),je=!0),Re&&this.pauseablePlacement.placement.setStale()),je||Re)for(let ut of this._order){let ft=this._layers[ut];ft.type==="symbol"&&this.placement.updateLayerOpacities(ft,Ze[ft.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(m())}_releaseSymbolFadeTiles(){for(let y in this.tileManagers)this.tileManagers[y].releaseSymbolFadeTiles()}getImages(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.imageManager.getImages(N.icons);this._updateTilesForChangedImages();let fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,N.icons),ie})}getGlyphs(y,N){return e._(this,void 0,void 0,function*(){let ie=yield this.glyphManager.getGlyphs(N.stacks),fe=this.tileManagers[N.source];return fe&&fe.setDependencies(N.tileID.key,N.type,[""]),ie})}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(y,N={}){this._checkLoaded(),y&&this._validate(e.F.glyphs,"glyphs",y,null,N)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=y,this.glyphManager.entries={},this.glyphManager.setURL(y))}getDashes(y,N){return e._(this,void 0,void 0,function*(){let ie={};for(let[fe,be]of Object.entries(N.dashes))ie[fe]=this.lineAtlas.getDash(be.dasharray,be.round);return ie})}addSprite(y,N,ie={},fe){this._checkLoaded();let be=[{id:y,url:N}],Re=[...w(this.stylesheet.sprite),...be];this._validate(e.F.sprite,"sprite",Re,null,ie)||(this.stylesheet.sprite=Re,this._loadSprite(be,!0,fe))}removeSprite(y){this._checkLoaded();let N=w(this.stylesheet.sprite);if(N.find(ie=>ie.id===y)){if(this._spritesImagesIds[y])for(let ie of this._spritesImagesIds[y])this.imageManager.removeImage(ie),this._changedImages[ie]=!0;N.splice(N.findIndex(ie=>ie.id===y),1),this.stylesheet.sprite=N.length>0?N:void 0,delete this._spritesImagesIds[y],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new e.n("data",{dataType:"style"}))}else this.fire(new e.l(new Error(`Sprite "${y}" doesn't exists on this map.`)))}getSprite(){return w(this.stylesheet.sprite)}setSprite(y,N={},ie){this._checkLoaded(),y&&this._validate(e.F.sprite,"sprite",y,null,N)||(this.stylesheet.sprite=y,y?this._loadSprite(y,!0,ie):(this._unloadSprite(),ie&&ie(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let y in this.tileManagers){let N=this.tileManagers[y];N.setEventedParent(null),N.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let y in this._layers){let N=this._layers[y];N.setEventedParent(null),N.onRemove&&N.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var bc=e.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Lh{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(y,N,ie,fe,be,Re,je,Ze,ut){this.context=y;let ft=this.boundPaintVertexBuffers.length!==fe.length;for(let Dt=0;!ft&&Dt({u_texture:0,u_ele_delta:pe,u_fog_matrix:y,u_fog_color:N?N.properties.get("fog-color"):e.bo.white,u_fog_ground_blend:N?N.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:fe?0:N?N.calculateFogBlendOpacity(ie):0,u_horizon_color:N?N.properties.get("horizon-color"):e.bo.white,u_horizon_fog_blend:N?N.properties.get("horizon-fog-blend"):1,u_is_globe_mode:fe?1:0}),Ju={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function ss(pe){let y=[];for(let N of pe){if(N===null)continue;let ie=N.split(" ");y.push(ie.pop())}return y}class ah{constructor(y,N,ie,fe,be,Re,je,Ze,ut=[]){let ft=y.gl;this.program=ft.createProgram();let Dt=ss(N.staticAttributes),Gt=ie?ie.getBinderAttributes():[],Kt=Dt.concat(Gt),st=Ai.prelude.staticUniforms?ss(Ai.prelude.staticUniforms):[],It=je.staticUniforms?ss(je.staticUniforms):[],Ut=N.staticUniforms?ss(N.staticUniforms):[],ir=ie?ie.getBinderUniforms():[],dr=st.concat(It).concat(Ut).concat(ir),Ar=[];for(let Ta of dr)Ar.includes(Ta)||Ar.push(Ta);let hr=ie?ie.defines():[];Ko(ft)&&hr.unshift("#version 300 es"),be&&hr.push("#define OVERDRAW_INSPECTOR;"),Re&&hr.push("#define TERRAIN3D;"),Ze&&hr.push(Ze),ut&&hr.push(...ut);let vr=hr.concat(Ai.prelude.fragmentSource,je.fragmentSource,N.fragmentSource).join(` +`),Or=hr.concat(Ai.prelude.vertexSource,je.vertexSource,N.vertexSource).join(` +`);Ko(ft)||(vr=function(Ta){return Ta.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")}(vr),Or=function(Ta){return Ta.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")}(Or));let Cr=ft.createShader(ft.FRAGMENT_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(Cr,vr),ft.compileShader(Cr),!ft.getShaderParameter(Cr,ft.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${ft.getShaderInfoLog(Cr)}`);ft.attachShader(this.program,Cr);let ta=ft.createShader(ft.VERTEX_SHADER);if(ft.isContextLost())return void(this.failedToCreate=!0);if(ft.shaderSource(ta,Or),ft.compileShader(ta),!ft.getShaderParameter(ta,ft.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${ft.getShaderInfoLog(ta)}`);ft.attachShader(this.program,ta),this.attributes={};let ka={};this.numAttributes=Kt.length;for(let Ta=0;Ta({u_depth:new e.b_(Ta,Ra.u_depth),u_terrain:new e.b_(Ta,Ra.u_terrain),u_terrain_dim:new e.bp(Ta,Ra.u_terrain_dim),u_terrain_matrix:new e.c0(Ta,Ra.u_terrain_matrix),u_terrain_unpack:new e.c1(Ta,Ra.u_terrain_unpack),u_terrain_exaggeration:new e.bp(Ta,Ra.u_terrain_exaggeration)}))(y,ka),this.projectionUniforms=((Ta,Ra)=>({u_projection_matrix:new e.c0(Ta,Ra.u_projection_matrix),u_projection_tile_mercator_coords:new e.c1(Ta,Ra.u_projection_tile_mercator_coords),u_projection_clipping_plane:new e.c1(Ta,Ra.u_projection_clipping_plane),u_projection_transition:new e.bp(Ta,Ra.u_projection_transition),u_projection_fallback_matrix:new e.c0(Ta,Ra.u_projection_fallback_matrix)}))(y,ka),this.binderUniforms=ie?ie.getUniforms(y,ka):[]}draw(y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt,st,It,Ut,ir,dr,Ar){var hr;let vr=y.gl;if(this.failedToCreate)return;if(y.program.set(this.program),y.setDepthMode(ie),y.setStencilMode(fe),y.setColorMode(be),y.setCullFace(Re),Ze){y.activeTexture.set(vr.TEXTURE2),vr.bindTexture(vr.TEXTURE_2D,Ze.depthTexture),y.activeTexture.set(vr.TEXTURE3),vr.bindTexture(vr.TEXTURE_2D,Ze.texture);for(let Cr in this.terrainUniforms)this.terrainUniforms[Cr].set(Ze[Cr])}if(ut)for(let Cr in ut)this.projectionUniforms[Ju[Cr]].set(ut[Cr]);if(je)for(let Cr in this.fixedUniforms)this.fixedUniforms[Cr].set(je[Cr]);Ut&&Ut.setUniforms(y,this.binderUniforms,st,{zoom:It});let Or=0;switch(N){case vr.LINES:Or=2;break;case vr.TRIANGLES:Or=3;break;case vr.LINE_STRIP:Or=1}for(let Cr of Kt.get())Cr.vaos||(Cr.vaos={}),(hr=Cr.vaos)[ft]||(hr[ft]=new Lh),Cr.vaos[ft].bind(y,this,Dt,Ut?Ut.getPaintVertexBuffers():[],Gt,Cr.vertexOffset,ir,dr,Ar),vr.drawElements(N,Cr.primitiveLength*Or,vr.UNSIGNED_SHORT,Cr.primitiveOffset*Or*2)}}function wc(pe,y,N){let ie=1/e.aK(N,1,y.transform.tileZoom),fe=Math.pow(2,N.tileID.overscaledZ),be=N.tileSize*Math.pow(2,y.transform.tileZoom)/fe,Re=be*(N.tileID.canonical.x+N.tileID.wrap*fe),je=be*N.tileID.canonical.y;return{u_image:0,u_texsize:N.imageAtlasTexture.size,u_scale:[ie,pe.fromScale,pe.toScale],u_fade:pe.t,u_pixel_coord_upper:[Re>>16,je>>16],u_pixel_coord_lower:[65535&Re,65535&je]}}let pc=(pe,y,N,ie)=>{let fe=pe.style.light,be=fe.properties.get("position"),Re=[be.x,be.y,be.z],je=e.c4();fe.properties.get("anchor")==="viewport"&&e.c5(je,pe.transform.bearingInRadians),e.c6(Re,Re,je);let Ze=pe.transform.transformLightDirection(Re),ut=fe.properties.get("color");return{u_lightpos:Re,u_lightpos_globe:Ze,u_lightintensity:fe.properties.get("intensity"),u_lightcolor:[ut.r,ut.g,ut.b],u_vertical_gradient:+y,u_opacity:N,u_fill_translate:ie}},Nf=(pe,y,N,ie,fe,be,Re)=>e.e(pc(pe,y,N,ie),wc(be,pe,Re),{u_height_factor:-Math.pow(2,fe.overscaledZ)/Re.tileSize/8}),Bu=(pe,y,N,ie)=>e.e(wc(y,pe,N),{u_fill_translate:ie}),Tc=(pe,y)=>({u_world:pe,u_fill_translate:y}),Ou=(pe,y,N,ie,fe)=>e.e(Bu(pe,y,N,fe),{u_world:ie}),Gc=(pe,y,N,ie,fe)=>{let be=pe.transform,Re,je,Ze=0;if(N.paint.get("circle-pitch-alignment")==="map"){let ut=e.aK(y,1,be.zoom);Re=!0,je=[ut,ut],Ze=ut/(e.a6*Math.pow(2,y.tileID.overscaledZ))*2*Math.PI*fe}else Re=!1,je=be.pixelsToGLUnits;return{u_camera_to_center_distance:be.cameraToCenterDistance,u_scale_with_map:+(N.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+Re,u_device_pixel_ratio:pe.pixelRatio,u_extrude_scale:je,u_globe_extrude_scale:Ze,u_translate:ie}},pf=pe=>({u_pixel_extrude_scale:[1/pe.width,1/pe.height]}),$l=pe=>({u_viewport_size:[pe.width,pe.height]}),jf=(pe,y=1)=>({u_color:pe,u_overlay:0,u_overlay_scale:y}),Hc=(pe,y,N,ie)=>{let fe=e.aK(pe,1,y)/(e.a6*Math.pow(2,pe.tileID.overscaledZ))*2*Math.PI*ie;return{u_extrude_scale:e.aK(pe,1,y),u_intensity:N,u_globe_extrude_scale:fe}},Wc=(pe,y,N,ie)=>{let fe=e.O();e.c7(fe,0,pe.width,pe.height,0,0,1);let be=pe.context.gl;return{u_matrix:fe,u_world:[be.drawingBufferWidth,be.drawingBufferHeight],u_image:N,u_color_ramp:ie,u_opacity:y.paint.get("heatmap-opacity")}},Qu=(pe,y,N)=>{let ie=N.paint.get("hillshade-accent-color"),fe;switch(N.paint.get("hillshade-method")){case"basic":fe=4;break;case"combined":fe=1;break;case"igor":fe=2;break;case"multidirectional":fe=3;break;default:fe=0}let be=N.getIlluminationProperties();for(let Re=0;Re{let N=y.stride,ie=e.O();return e.c7(ie,0,e.a6,-e.a6,0,0,1),e.Q(ie,ie,[0,-e.a6,0]),{u_matrix:ie,u_image:1,u_dimension:[N,N],u_zoom:pe.overscaledZ,u_unpack:y.getUnpackVector()}};function Nu(pe,y){let N=Math.pow(2,y.canonical.z),ie=y.canonical.y;return[new e.a7(0,ie/N).toLngLat().lat,new e.a7(0,(ie+1)/N).toLngLat().lat]}let Uf=(pe,y,N=0)=>({u_image:0,u_unpack:y.getUnpackVector(),u_dimension:[y.stride,y.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:N,u_opacity:pe.paint.get("color-relief-opacity")}),al=(pe,y,N,ie)=>{let fe=pe.transform;return{u_translation:cu(pe,y,N),u_ratio:ie/e.aK(y,1,fe.zoom),u_device_pixel_ratio:pe.pixelRatio,u_units_to_pixels:[1/fe.pixelsToGLUnits[0],1/fe.pixelsToGLUnits[1]]}},Xc=(pe,y,N,ie,fe)=>e.e(al(pe,y,N,ie),{u_image:0,u_image_height:fe}),ju=(pe,y,N,ie,fe)=>{let be=pe.transform,Re=ec(y,be);return{u_translation:cu(pe,y,N),u_texsize:y.imageAtlasTexture.size,u_ratio:ie/e.aK(y,1,be.zoom),u_device_pixel_ratio:pe.pixelRatio,u_image:0,u_scale:[Re,fe.fromScale,fe.toScale],u_fade:fe.t,u_units_to_pixels:[1/be.pixelsToGLUnits[0],1/be.pixelsToGLUnits[1]]}},Ac=(pe,y,N,ie,fe)=>{let be=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_tileratio:be,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image:0,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})},Zc=(pe,y,N,ie,fe,be)=>{let Re=ec(y,pe.transform);return e.e(al(pe,y,N,ie),{u_image:0,u_image_height:be,u_tileratio:Re,u_crossfade_from:fe.fromScale,u_crossfade_to:fe.toScale,u_image_dash:1,u_mix:fe.t,u_lineatlas_width:pe.lineAtlas.width,u_lineatlas_height:pe.lineAtlas.height})};function ec(pe,y){return 1/e.aK(pe,1,y.tileZoom)}function cu(pe,y,N){return e.aL(pe.transform,y,N.paint.get("line-translate"),N.paint.get("line-translate-anchor"))}let tc=(pe,y,N,ie,fe)=>{return{u_tl_parent:pe,u_scale_parent:y,u_buffer_scale:1,u_fade_t:N.mix,u_opacity:N.opacity*ie.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:ie.paint.get("raster-brightness-min"),u_brightness_high:ie.paint.get("raster-brightness-max"),u_saturation_factor:(Re=ie.paint.get("raster-saturation"),Re>0?1-1/(1.001-Re):-Re),u_contrast_factor:(be=ie.paint.get("raster-contrast"),be>0?1/(1-be):1+be),u_spin_weights:vf(ie.paint.get("raster-hue-rotate")),u_coords_top:[fe[0].x,fe[0].y,fe[1].x,fe[1].y],u_coords_bottom:[fe[3].x,fe[3].y,fe[2].x,fe[2].y]};var be,Re};function vf(pe){pe*=Math.PI/180;let y=Math.sin(pe),N=Math.cos(pe);return[(2*N+1)/3,(-Math.sqrt(3)*y-N+1)/3,(Math.sqrt(3)*y-N+1)/3]}let Tu=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>{let Kt=Re.transform;return{u_is_size_zoom_constant:+(pe==="constant"||pe==="source"),u_is_size_feature_constant:+(pe==="constant"||pe==="camera"),u_size_t:y?y.uSizeT:0,u_size:y?y.uSize:0,u_camera_to_center_distance:Kt.cameraToCenterDistance,u_pitch:Kt.pitch/360*2*Math.PI,u_rotate_symbol:+N,u_aspect_ratio:Kt.width/Kt.height,u_fade_change:Re.options.fadeDuration?Re.symbolFadeChange:1,u_label_plane_matrix:je,u_coord_matrix:Ze,u_is_text:+ft,u_pitch_with_map:+ie,u_is_along_line:fe,u_is_variable_anchor:be,u_texsize:Dt,u_texture:0,u_translation:ut,u_pitched_scale:Gt}},nh=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt,Kt)=>{let st=Re.transform;return e.e(Tu(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Kt),{u_gamma_scale:ie?Math.cos(st.pitch*Math.PI/180)*st.cameraToCenterDistance:1,u_device_pixel_ratio:Re.pixelRatio,u_is_halo:Gt?1:0,u_is_plain:1})},vl=(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft,Dt,Gt)=>e.e(nh(pe,y,N,ie,fe,be,Re,je,Ze,ut,!0,ft,!0,Gt),{u_texsize_icon:Dt,u_texture_icon:1}),ml=(pe,y)=>({u_opacity:pe,u_color:y}),rc=(pe,y,N,ie,fe)=>e.e(function(be,Re,je,Ze){let ut=je.imageManager.getPattern(be.from.toString()),ft=je.imageManager.getPattern(be.to.toString()),{width:Dt,height:Gt}=je.imageManager.getPixelSize(),Kt=Math.pow(2,Ze.tileID.overscaledZ),st=Ze.tileSize*Math.pow(2,je.transform.tileZoom)/Kt,It=st*(Ze.tileID.canonical.x+Ze.tileID.wrap*Kt),Ut=st*Ze.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:ut.tl,u_pattern_br_a:ut.br,u_pattern_tl_b:ft.tl,u_pattern_br_b:ft.br,u_texsize:[Dt,Gt],u_mix:Re.t,u_pattern_size_a:ut.displaySize,u_pattern_size_b:ft.displaySize,u_scale_a:Re.fromScale,u_scale_b:Re.toScale,u_tile_units_to_pixels:1/e.aK(Ze,1,je.transform.tileZoom),u_pixel_coord_upper:[It>>16,Ut>>16],u_pixel_coord_lower:[65535&It,65535&Ut]}}(N,fe,y,ie),{u_opacity:pe}),yl=(pe,y)=>{},qf={fillExtrusion:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillExtrusionPattern:(pe,y)=>({u_lightpos:new e.c2(pe,y.u_lightpos),u_lightpos_globe:new e.c2(pe,y.u_lightpos_globe),u_lightintensity:new e.bp(pe,y.u_lightintensity),u_lightcolor:new e.c2(pe,y.u_lightcolor),u_vertical_gradient:new e.bp(pe,y.u_vertical_gradient),u_height_factor:new e.bp(pe,y.u_height_factor),u_opacity:new e.bp(pe,y.u_opacity),u_fill_translate:new e.c3(pe,y.u_fill_translate),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),fill:(pe,y)=>({u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillPattern:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutline:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),fillOutlinePattern:(pe,y)=>({u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_texsize:new e.c3(pe,y.u_texsize),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade),u_fill_translate:new e.c3(pe,y.u_fill_translate)}),circle:(pe,y)=>({u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_scale_with_map:new e.b_(pe,y.u_scale_with_map),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_extrude_scale:new e.c3(pe,y.u_extrude_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale),u_translate:new e.c3(pe,y.u_translate)}),collisionBox:(pe,y)=>({u_pixel_extrude_scale:new e.c3(pe,y.u_pixel_extrude_scale)}),collisionCircle:(pe,y)=>({u_viewport_size:new e.c3(pe,y.u_viewport_size)}),debug:(pe,y)=>({u_color:new e.b$(pe,y.u_color),u_overlay:new e.b_(pe,y.u_overlay),u_overlay_scale:new e.bp(pe,y.u_overlay_scale)}),depth:yl,clippingMask:yl,heatmap:(pe,y)=>({u_extrude_scale:new e.bp(pe,y.u_extrude_scale),u_intensity:new e.bp(pe,y.u_intensity),u_globe_extrude_scale:new e.bp(pe,y.u_globe_extrude_scale)}),heatmapTexture:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_world:new e.c3(pe,y.u_world),u_image:new e.b_(pe,y.u_image),u_color_ramp:new e.b_(pe,y.u_color_ramp),u_opacity:new e.bp(pe,y.u_opacity)}),hillshade:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_latrange:new e.c3(pe,y.u_latrange),u_exaggeration:new e.bp(pe,y.u_exaggeration),u_altitudes:new e.c9(pe,y.u_altitudes),u_azimuths:new e.c9(pe,y.u_azimuths),u_accent:new e.b$(pe,y.u_accent),u_method:new e.b_(pe,y.u_method),u_shadows:new e.c8(pe,y.u_shadows),u_highlights:new e.c8(pe,y.u_highlights)}),hillshadePrepare:(pe,y)=>({u_matrix:new e.c0(pe,y.u_matrix),u_image:new e.b_(pe,y.u_image),u_dimension:new e.c3(pe,y.u_dimension),u_zoom:new e.bp(pe,y.u_zoom),u_unpack:new e.c1(pe,y.u_unpack)}),colorRelief:(pe,y)=>({u_image:new e.b_(pe,y.u_image),u_unpack:new e.c1(pe,y.u_unpack),u_dimension:new e.c3(pe,y.u_dimension),u_elevation_stops:new e.b_(pe,y.u_elevation_stops),u_color_stops:new e.b_(pe,y.u_color_stops),u_color_ramp_size:new e.b_(pe,y.u_color_ramp_size),u_opacity:new e.bp(pe,y.u_opacity)}),line:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels)}),lineGradient:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height)}),linePattern:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_texsize:new e.c3(pe,y.u_texsize),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_image:new e.b_(pe,y.u_image),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_scale:new e.c2(pe,y.u_scale),u_fade:new e.bp(pe,y.u_fade)}),lineSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_mix:new e.bp(pe,y.u_mix),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),lineGradientSDF:(pe,y)=>({u_translation:new e.c3(pe,y.u_translation),u_ratio:new e.bp(pe,y.u_ratio),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_units_to_pixels:new e.c3(pe,y.u_units_to_pixels),u_image:new e.b_(pe,y.u_image),u_image_height:new e.bp(pe,y.u_image_height),u_tileratio:new e.bp(pe,y.u_tileratio),u_crossfade_from:new e.bp(pe,y.u_crossfade_from),u_crossfade_to:new e.bp(pe,y.u_crossfade_to),u_image_dash:new e.b_(pe,y.u_image_dash),u_mix:new e.bp(pe,y.u_mix),u_lineatlas_width:new e.bp(pe,y.u_lineatlas_width),u_lineatlas_height:new e.bp(pe,y.u_lineatlas_height)}),raster:(pe,y)=>({u_tl_parent:new e.c3(pe,y.u_tl_parent),u_scale_parent:new e.bp(pe,y.u_scale_parent),u_buffer_scale:new e.bp(pe,y.u_buffer_scale),u_fade_t:new e.bp(pe,y.u_fade_t),u_opacity:new e.bp(pe,y.u_opacity),u_image0:new e.b_(pe,y.u_image0),u_image1:new e.b_(pe,y.u_image1),u_brightness_low:new e.bp(pe,y.u_brightness_low),u_brightness_high:new e.bp(pe,y.u_brightness_high),u_saturation_factor:new e.bp(pe,y.u_saturation_factor),u_contrast_factor:new e.bp(pe,y.u_contrast_factor),u_spin_weights:new e.c2(pe,y.u_spin_weights),u_coords_top:new e.c1(pe,y.u_coords_top),u_coords_bottom:new e.c1(pe,y.u_coords_bottom)}),symbolIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolSDF:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texture:new e.b_(pe,y.u_texture),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_is_plain:new e.b_(pe,y.u_is_plain),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),symbolTextAndIcon:(pe,y)=>({u_is_size_zoom_constant:new e.b_(pe,y.u_is_size_zoom_constant),u_is_size_feature_constant:new e.b_(pe,y.u_is_size_feature_constant),u_size_t:new e.bp(pe,y.u_size_t),u_size:new e.bp(pe,y.u_size),u_camera_to_center_distance:new e.bp(pe,y.u_camera_to_center_distance),u_pitch:new e.bp(pe,y.u_pitch),u_rotate_symbol:new e.b_(pe,y.u_rotate_symbol),u_aspect_ratio:new e.bp(pe,y.u_aspect_ratio),u_fade_change:new e.bp(pe,y.u_fade_change),u_label_plane_matrix:new e.c0(pe,y.u_label_plane_matrix),u_coord_matrix:new e.c0(pe,y.u_coord_matrix),u_is_text:new e.b_(pe,y.u_is_text),u_pitch_with_map:new e.b_(pe,y.u_pitch_with_map),u_is_along_line:new e.b_(pe,y.u_is_along_line),u_is_variable_anchor:new e.b_(pe,y.u_is_variable_anchor),u_texsize:new e.c3(pe,y.u_texsize),u_texsize_icon:new e.c3(pe,y.u_texsize_icon),u_texture:new e.b_(pe,y.u_texture),u_texture_icon:new e.b_(pe,y.u_texture_icon),u_gamma_scale:new e.bp(pe,y.u_gamma_scale),u_device_pixel_ratio:new e.bp(pe,y.u_device_pixel_ratio),u_is_halo:new e.b_(pe,y.u_is_halo),u_translation:new e.c3(pe,y.u_translation),u_pitched_scale:new e.bp(pe,y.u_pitched_scale)}),background:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_color:new e.b$(pe,y.u_color)}),backgroundPattern:(pe,y)=>({u_opacity:new e.bp(pe,y.u_opacity),u_image:new e.b_(pe,y.u_image),u_pattern_tl_a:new e.c3(pe,y.u_pattern_tl_a),u_pattern_br_a:new e.c3(pe,y.u_pattern_br_a),u_pattern_tl_b:new e.c3(pe,y.u_pattern_tl_b),u_pattern_br_b:new e.c3(pe,y.u_pattern_br_b),u_texsize:new e.c3(pe,y.u_texsize),u_mix:new e.bp(pe,y.u_mix),u_pattern_size_a:new e.c3(pe,y.u_pattern_size_a),u_pattern_size_b:new e.c3(pe,y.u_pattern_size_b),u_scale_a:new e.bp(pe,y.u_scale_a),u_scale_b:new e.bp(pe,y.u_scale_b),u_pixel_coord_upper:new e.c3(pe,y.u_pixel_coord_upper),u_pixel_coord_lower:new e.c3(pe,y.u_pixel_coord_lower),u_tile_units_to_pixels:new e.bp(pe,y.u_tile_units_to_pixels)}),terrain:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_ele_delta:new e.bp(pe,y.u_ele_delta),u_fog_matrix:new e.c0(pe,y.u_fog_matrix),u_fog_color:new e.b$(pe,y.u_fog_color),u_fog_ground_blend:new e.bp(pe,y.u_fog_ground_blend),u_fog_ground_blend_opacity:new e.bp(pe,y.u_fog_ground_blend_opacity),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon_fog_blend:new e.bp(pe,y.u_horizon_fog_blend),u_is_globe_mode:new e.bp(pe,y.u_is_globe_mode)}),terrainDepth:(pe,y)=>({u_ele_delta:new e.bp(pe,y.u_ele_delta)}),terrainCoords:(pe,y)=>({u_texture:new e.b_(pe,y.u_texture),u_terrain_coords_id:new e.bp(pe,y.u_terrain_coords_id),u_ele_delta:new e.bp(pe,y.u_ele_delta)}),projectionErrorMeasurement:(pe,y)=>({u_input:new e.bp(pe,y.u_input),u_output_expected:new e.bp(pe,y.u_output_expected)}),atmosphere:(pe,y)=>({u_sun_pos:new e.c2(pe,y.u_sun_pos),u_atmosphere_blend:new e.bp(pe,y.u_atmosphere_blend),u_globe_position:new e.c2(pe,y.u_globe_position),u_globe_radius:new e.bp(pe,y.u_globe_radius),u_inv_proj_matrix:new e.c0(pe,y.u_inv_proj_matrix)}),sky:(pe,y)=>({u_sky_color:new e.b$(pe,y.u_sky_color),u_horizon_color:new e.b$(pe,y.u_horizon_color),u_horizon:new e.c3(pe,y.u_horizon),u_horizon_normal:new e.c3(pe,y.u_horizon_normal),u_sky_horizon_blend:new e.bp(pe,y.u_sky_horizon_blend),u_sky_blend:new e.bp(pe,y.u_sky_blend)})};class ac{constructor(y,N,ie){this.context=y;let fe=y.gl;this.buffer=fe.createBuffer(),this.dynamicDraw=!!ie,this.context.unbindVAO(),y.bindElementBuffer.set(this.buffer),fe.bufferData(fe.ELEMENT_ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?fe.DYNAMIC_DRAW:fe.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(y){let N=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),N.bufferSubData(N.ELEMENT_ARRAY_BUFFER,0,y.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Mc={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class mf{constructor(y,N,ie,fe){this.length=N.length,this.attributes=ie,this.itemSize=N.bytesPerElement,this.dynamicDraw=fe,this.context=y;let be=y.gl;this.buffer=be.createBuffer(),y.bindVertexBuffer.set(this.buffer),be.bufferData(be.ARRAY_BUFFER,N.arrayBuffer,this.dynamicDraw?be.DYNAMIC_DRAW:be.STATIC_DRAW),this.dynamicDraw||N.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(y){if(y.length!==this.length)throw new Error(`Length of new data is ${y.length}, which doesn't match current length of ${this.length}`);let N=this.context.gl;this.bind(),N.bufferSubData(N.ARRAY_BUFFER,0,y.arrayBuffer)}enableAttributes(y,N){for(let ie of this.attributes){let fe=N.attributes[ie.name];fe!==void 0&&y.enableVertexAttribArray(fe)}}setVertexAttribPointers(y,N,ie){for(let fe of this.attributes){let be=N.attributes[fe.name];be!==void 0&&y.vertexAttribPointer(be,fe.components,y[Mc[fe.type]],!1,this.itemSize,fe.offset+this.itemSize*(ie||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class Jo{constructor(y){this.gl=y.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(y){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class ih extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.clearColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class fu extends Jo{getDefault(){return 1}set(y){(y!==this.current||this.dirty)&&(this.gl.clearDepth(y),this.current=y,this.dirty=!1)}}class Sl extends Jo{getDefault(){return 0}set(y){(y!==this.current||this.dirty)&&(this.gl.clearStencil(y),this.current=y,this.dirty=!1)}}class El extends Jo{getDefault(){return[!0,!0,!0,!0]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.colorMask(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class oh extends Jo{getDefault(){return!0}set(y){(y!==this.current||this.dirty)&&(this.gl.depthMask(y),this.current=y,this.dirty=!1)}}class Au extends Jo{getDefault(){return 255}set(y){(y!==this.current||this.dirty)&&(this.gl.stencilMask(y),this.current=y,this.dirty=!1)}}class $c extends Jo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(y){let N=this.current;(y.func!==N.func||y.ref!==N.ref||y.mask!==N.mask||this.dirty)&&(this.gl.stencilFunc(y.func,y.ref,y.mask),this.current=y,this.dirty=!1)}}class _l extends Jo{getDefault(){let y=this.gl;return[y.KEEP,y.KEEP,y.KEEP]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||this.dirty)&&(this.gl.stencilOp(y[0],y[1],y[2]),this.current=y,this.dirty=!1)}}class nl extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.STENCIL_TEST):N.disable(N.STENCIL_TEST),this.current=y,this.dirty=!1}}class gf extends Jo{getDefault(){return[0,1]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.depthRange(y[0],y[1]),this.current=y,this.dirty=!1)}}class Kc extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.DEPTH_TEST):N.disable(N.DEPTH_TEST),this.current=y,this.dirty=!1}}class sh extends Jo{getDefault(){return this.gl.LESS}set(y){(y!==this.current||this.dirty)&&(this.gl.depthFunc(y),this.current=y,this.dirty=!1)}}class hu extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.BLEND):N.disable(N.BLEND),this.current=y,this.dirty=!1}}class Uu extends Jo{getDefault(){let y=this.gl;return[y.ONE,y.ZERO]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||this.dirty)&&(this.gl.blendFunc(y[0],y[1]),this.current=y,this.dirty=!1)}}class qu extends Jo{getDefault(){return e.bo.transparent}set(y){let N=this.current;(y.r!==N.r||y.g!==N.g||y.b!==N.b||y.a!==N.a||this.dirty)&&(this.gl.blendColor(y.r,y.g,y.b,y.a),this.current=y,this.dirty=!1)}}class nc extends Jo{getDefault(){return this.gl.FUNC_ADD}set(y){(y!==this.current||this.dirty)&&(this.gl.blendEquation(y),this.current=y,this.dirty=!1)}}class yf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;y?N.enable(N.CULL_FACE):N.disable(N.CULL_FACE),this.current=y,this.dirty=!1}}class _f extends Jo{getDefault(){return this.gl.BACK}set(y){(y!==this.current||this.dirty)&&(this.gl.cullFace(y),this.current=y,this.dirty=!1)}}class Mu extends Jo{getDefault(){return this.gl.CCW}set(y){(y!==this.current||this.dirty)&&(this.gl.frontFace(y),this.current=y,this.dirty=!1)}}class ic extends Jo{getDefault(){return null}set(y){(y!==this.current||this.dirty)&&(this.gl.useProgram(y),this.current=y,this.dirty=!1)}}class Sc extends Jo{getDefault(){return this.gl.TEXTURE0}set(y){(y!==this.current||this.dirty)&&(this.gl.activeTexture(y),this.current=y,this.dirty=!1)}}class Vu extends Jo{getDefault(){let y=this.gl;return[0,0,y.drawingBufferWidth,y.drawingBufferHeight]}set(y){let N=this.current;(y[0]!==N[0]||y[1]!==N[1]||y[2]!==N[2]||y[3]!==N[3]||this.dirty)&&(this.gl.viewport(y[0],y[1],y[2],y[3]),this.current=y,this.dirty=!1)}}class xo extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindFramebuffer(N.FRAMEBUFFER,y),this.current=y,this.dirty=!1}}class Ec extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindRenderbuffer(N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class xh extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindTexture(N.TEXTURE_2D,y),this.current=y,this.dirty=!1}}class Vf extends Jo{getDefault(){return null}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.bindBuffer(N.ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class xf extends Jo{getDefault(){return null}set(y){let N=this.gl;N.bindBuffer(N.ELEMENT_ARRAY_BUFFER,y),this.current=y,this.dirty=!1}}class Gf extends Jo{getDefault(){return null}set(y){var N;if(y===this.current&&!this.dirty)return;let ie=this.gl;Ko(ie)?ie.bindVertexArray(y):(N=ie.getExtension("OES_vertex_array_object"))===null||N===void 0||N.bindVertexArrayOES(y),this.current=y,this.dirty=!1}}class bh extends Jo{getDefault(){return 4}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_ALIGNMENT,y),this.current=y,this.dirty=!1}}class Hf extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_PREMULTIPLY_ALPHA_WEBGL,y),this.current=y,this.dirty=!1}}class il extends Jo{getDefault(){return!1}set(y){if(y===this.current&&!this.dirty)return;let N=this.gl;N.pixelStorei(N.UNPACK_FLIP_Y_WEBGL,y),this.current=y,this.dirty=!1}}class kl extends Jo{constructor(y,N){super(y),this.context=y,this.parent=N}getDefault(){return null}}class kc extends kl{setDirty(){this.dirty=!0}set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferTexture2D(N.FRAMEBUFFER,N.COLOR_ATTACHMENT0,N.TEXTURE_2D,y,0),this.current=y,this.dirty=!1}}class Cc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}class Lc extends kl{set(y){if(y===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let N=this.gl;N.framebufferRenderbuffer(N.FRAMEBUFFER,N.DEPTH_STENCIL_ATTACHMENT,N.RENDERBUFFER,y),this.current=y,this.dirty=!1}}let vc="Framebuffer is not complete";class Ft{constructor(y,N,ie,fe,be){this.context=y,this.width=N,this.height=ie;let Re=y.gl,je=this.framebuffer=Re.createFramebuffer();if(this.colorAttachment=new kc(y,je),fe)this.depthAttachment=be?new Lc(y,je):new Cc(y,je);else if(be)throw new Error("Stencil cannot be set without depth");if(Re.checkFramebufferStatus(Re.FRAMEBUFFER)!==Re.FRAMEBUFFER_COMPLETE)throw new Error(vc)}destroy(){let y=this.context.gl,N=this.colorAttachment.get();if(N&&y.deleteTexture(N),this.depthAttachment){let ie=this.depthAttachment.get();ie&&y.deleteRenderbuffer(ie)}y.deleteFramebuffer(this.framebuffer)}}class tr{constructor(y){var N,ie;if(this.gl=y,this.clearColor=new ih(this),this.clearDepth=new fu(this),this.clearStencil=new Sl(this),this.colorMask=new El(this),this.depthMask=new oh(this),this.stencilMask=new Au(this),this.stencilFunc=new $c(this),this.stencilOp=new _l(this),this.stencilTest=new nl(this),this.depthRange=new gf(this),this.depthTest=new Kc(this),this.depthFunc=new sh(this),this.blend=new hu(this),this.blendFunc=new Uu(this),this.blendColor=new qu(this),this.blendEquation=new nc(this),this.cullFace=new yf(this),this.cullFaceSide=new _f(this),this.frontFace=new Mu(this),this.program=new ic(this),this.activeTexture=new Sc(this),this.viewport=new Vu(this),this.bindFramebuffer=new xo(this),this.bindRenderbuffer=new Ec(this),this.bindTexture=new xh(this),this.bindVertexBuffer=new Vf(this),this.bindElementBuffer=new xf(this),this.bindVertexArray=new Gf(this),this.pixelStoreUnpack=new bh(this),this.pixelStoreUnpackPremultiplyAlpha=new Hf(this),this.pixelStoreUnpackFlipY=new il(this),this.extTextureFilterAnisotropic=y.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=y.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=y.getParameter(y.MAX_TEXTURE_SIZE),Ko(y)){this.HALF_FLOAT=y.HALF_FLOAT;let fe=y.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(N=y.RGBA16F)!==null&&N!==void 0?N:fe?.RGBA16F_EXT,this.RGB16F=(ie=y.RGB16F)!==null&&ie!==void 0?ie:fe?.RGB16F_EXT,y.getExtension("EXT_color_buffer_float")}else{y.getExtension("EXT_color_buffer_half_float"),y.getExtension("OES_texture_half_float_linear");let fe=y.getExtension("OES_texture_half_float");this.HALF_FLOAT=fe?.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(y,N){return new ac(this,y,N)}createVertexBuffer(y,N,ie){return new mf(this,y,N,ie)}createRenderbuffer(y,N,ie){let fe=this.gl,be=fe.createRenderbuffer();return this.bindRenderbuffer.set(be),fe.renderbufferStorage(fe.RENDERBUFFER,y,N,ie),this.bindRenderbuffer.set(null),be}createFramebuffer(y,N,ie,fe){return new Ft(this,y,N,ie,fe)}clear({color:y,depth:N,stencil:ie}){let fe=this.gl,be=0;y&&(be|=fe.COLOR_BUFFER_BIT,this.clearColor.set(y),this.colorMask.set([!0,!0,!0,!0])),N!==void 0&&(be|=fe.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(N),this.depthMask.set(!0)),ie!==void 0&&(be|=fe.STENCIL_BUFFER_BIT,this.clearStencil.set(ie),this.stencilMask.set(255)),fe.clear(be)}setCullFace(y){y.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(y.mode),this.frontFace.set(y.frontFace))}setDepthMode(y){y.func!==this.gl.ALWAYS||y.mask?(this.depthTest.set(!0),this.depthFunc.set(y.func),this.depthMask.set(y.mask),this.depthRange.set(y.range)):this.depthTest.set(!1)}setStencilMode(y){y.test.func!==this.gl.ALWAYS||y.mask?(this.stencilTest.set(!0),this.stencilMask.set(y.mask),this.stencilOp.set([y.fail,y.depthFail,y.pass]),this.stencilFunc.set({func:y.test.func,ref:y.ref,mask:y.test.mask})):this.stencilTest.set(!1)}setColorMode(y){e.bQ(y.blendFunction,to.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(y.blendFunction),this.blendColor.set(y.blendColor)),this.colorMask.set(y.mask)}createVertexArray(){var y;return Ko(this.gl)?this.gl.createVertexArray():(y=this.gl.getExtension("OES_vertex_array_object"))===null||y===void 0?void 0:y.createVertexArrayOES()}deleteVertexArray(y){var N;Ko(this.gl)?this.gl.deleteVertexArray(y):(N=this.gl.getExtension("OES_vertex_array_object"))===null||N===void 0||N.deleteVertexArrayOES(y)}unbindVAO(){this.bindVertexArray.set(null)}}let Fr;function wr(pe,y,N,ie,fe){var be,Re;let je=pe.context,Ze=pe.transform,ut=je.gl,ft=pe.useProgram("collisionBox"),Dt=[],Gt=0,Kt=0;for(let Ar of ie){let hr=y.getTile(Ar).getBucket(N);if(!hr)continue;let vr=fe?hr.textCollisionBox:hr.iconCollisionBox,Or=hr.collisionCircleArray;Or.length>0&&(Dt.push({circleArray:Or,circleOffset:Kt,coord:Ar}),Gt+=Or.length/4,Kt=Gt),vr&&ft.draw(je,ut.LINES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,pf(pe.transform),(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),Ze.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),N.id,vr.layoutVertexBuffer,vr.indexBuffer,vr.segments,null,pe.transform.zoom,null,null,vr.collisionVertexBuffer)}if(!fe||!Dt.length)return;let st=pe.useProgram("collisionCircle"),It=new e.ca;It.resize(4*Gt),It._trim();let Ut=0;for(let Ar of Dt)for(let hr=0;hr=0&&(It[ir.associatedIconIndex]={shiftedAnchor:da,angle:Fa})}else Ja(ir.numGlyphs,Kt)}if(Ze){st.clear();let Ut=pe.icon.placedSymbolArray;for(let ir=0;irpe.style.map.terrain.getElevation(ma,mo,ru):null,Ll=N.layout.get("text-rotation-alignment")==="map";La(Fa,pe,fe,Wi,Go,Ar,ut,Ll,ma.toUnwrapped(),ir.width,ir.height,Mo,Ys)}let Ws=fe&&ka||So,Zo=hr||Ws?ea:Ar?Wi:pe.transform.clipSpaceToPixelsMatrix,es=Dn&&N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(1)!==0,$o;$o=Dn?Fa.iconsInText?vl(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,Rn,so,Ra):nh(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,es,Ra):Tu(ui.kind,ei,vr,Ar,hr,Ws,pe,Zo,ro,Mo,fe,Rn,Ra);let _s={program:sn,buffers:za,uniformValues:$o,projectionData:zs,atlasTexture:In,atlasTextureIcon:ti,atlasInterpolation:Jn,atlasInterpolationIcon:Ei,isSDF:Dn,hasHalo:es};if(Or&&Fa.canOverlap){Cr=!0;let Go=za.segments.get();for(let Ys of Go)Ta.push({segments:new e.aV([Ys]),sortKey:Ys.sortKey,state:_s,terrainData:Pn})}else Ta.push({segments:za.segments,sortKey:0,state:_s,terrainData:Pn})}Cr&&Ta.sort((ma,da)=>ma.sortKey-da.sortKey);let ua=(st=N.paint.get(fe?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&st!==void 0?st:1/0,ia=N.layout.get("text-letter-spacing").constantOr(0)*e.aJ<0||ua>1;for(let ma of Ta){let da=ma.state;It.activeTexture.set(Ut.TEXTURE0),da.atlasTexture.bind(da.atlasInterpolation,Ut.CLAMP_TO_EDGE),da.atlasTextureIcon&&(It.activeTexture.set(Ut.TEXTURE1),da.atlasTextureIcon&&da.atlasTextureIcon.bind(da.atlasInterpolationIcon,Ut.CLAMP_TO_EDGE));let Fa=da.isSDF&&da.hasHalo;if(Fa){let za=da.uniformValues;za.u_is_halo=1,ia&&(za.u_is_plain=0,Da(da.buffers,ma.segments,N,pe,da.program,ta,ft,Dt,za,da.projectionData,ma.terrainData),za.u_is_halo=0,za.u_is_plain=1)}Da(da.buffers,ma.segments,N,pe,da.program,ta,ft,Dt,da.uniformValues,da.projectionData,ma.terrainData),Fa&&!ia&&(da.uniformValues.u_is_halo=0)}}function Da(pe,y,N,ie,fe,be,Re,je,Ze,ut,ft){let Dt=ie.context;fe.draw(Dt,Dt.gl.TRIANGLES,be,Re,je,pi.backCCW,Ze,ft,ut,N.id,pe.layoutVertexBuffer,pe.indexBuffer,y,N.paint,ie.transform.zoom,pe.programConfigurations.get(N.id),pe.dynamicLayoutVertexBuffer,pe.opacityVertexBuffer)}function Ha(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=Xi.disabled,Ze=new to([Re.ONE,Re.ONE],e.bo.transparent,[!0,!0,!0,!0]),ut=y.getBucket(N);if(!ut)return;let ft=ie.key,Dt=N.heatmapFbos.get(ft);Dt||(Dt=vn(be,y.tileSize,y.tileSize),N.heatmapFbos.set(ft,Dt)),be.bindFramebuffer.set(Dt.framebuffer),be.viewport.set([0,0,y.tileSize,y.tileSize]),be.clear({color:e.bo.transparent});let Gt=ut.programConfigurations.get(N.id),Kt=pe.useProgram("heatmap",Gt,!fe),st=pe.transform.getProjectionData({overscaledTileID:y.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),It=pe.style.map.terrain.getTerrainData(ie);Kt.draw(be,Re.TRIANGLES,Vi.disabled,je,Ze,pi.disabled,Hc(y,pe.transform.zoom,N.paint.get("heatmap-intensity"),1),It,st,N.id,ut.layoutVertexBuffer,ut.indexBuffer,ut.segments,N.paint,pe.transform.zoom,Gt)}function $a(pe,y,N,ie,fe){let be=pe.context,Re=be.gl,je=pe.transform;be.setColorMode(pe.colorModeForRenderPass());let Ze=Sn(be,y),ut=N.key,ft=y.heatmapFbos.get(ut);if(!ft)return;be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,ft.colorAttachment.get()),be.activeTexture.set(Re.TEXTURE1),Ze.bind(Re.LINEAR,Re.CLAMP_TO_EDGE);let Dt=je.getProjectionData({overscaledTileID:N,applyTerrainMatrix:fe,applyGlobeMatrix:!ie});pe.useProgram("heatmapTexture").draw(be,Re.TRIANGLES,Vi.disabled,Xi.disabled,pe.colorModeForRenderPass(),pi.disabled,Wc(pe,y,0,1),null,Dt,y.id,pe.rasterBoundsBuffer,pe.quadTriangleIndexBuffer,pe.rasterBoundsSegments,y.paint,je.zoom),ft.destroy(),y.heatmapFbos.delete(ut)}function vn(pe,y,N){var ie,fe;let be=pe.gl,Re=be.createTexture();be.bindTexture(be.TEXTURE_2D,Re),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_WRAP_S,be.CLAMP_TO_EDGE),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_WRAP_T,be.CLAMP_TO_EDGE),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_MIN_FILTER,be.LINEAR),be.texParameteri(be.TEXTURE_2D,be.TEXTURE_MAG_FILTER,be.LINEAR);let je=(ie=pe.HALF_FLOAT)!==null&&ie!==void 0?ie:be.UNSIGNED_BYTE,Ze=(fe=pe.RGBA16F)!==null&&fe!==void 0?fe:be.RGBA;be.texImage2D(be.TEXTURE_2D,0,Ze,y,N,0,be.RGBA,je,null);let ut=pe.createFramebuffer(y,N,!1,!1);return ut.colorAttachment.set(Re),ut}function Sn(pe,y){return y.colorRampTexture||(y.colorRampTexture=new e.T(pe,y.colorRamp,pe.gl.RGBA)),y.colorRampTexture}function yi(pe,y,N,ie,fe,be,Re,je){let Ze=256;if(fe.stepInterpolant){let ut=y.getSource().maxzoom,ft=Re.canonical.z===ut?Math.ceil(1<pe.options.anisotropicFilterPitch&&Kt.texParameterf(Kt.TEXTURE_2D,Gt.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,Gt.extTextureFilterAnisotropicMax);let ma=(ft=pe.style.map.terrain)===null||ft===void 0?void 0:ft.getTerrainData(Cr),da=It.getProjectionData({overscaledTileID:Cr,aligned:dr,applyGlobeMatrix:!ut,applyTerrainMatrix:!0}),Fa=tc(ua,Ra,ia.fadeMix,N,je),za=Ut.getMeshFromTileID(Gt,Cr.canonical,be,Re,"raster");st.draw(Gt,Kt.TRIANGLES,ta,fe?fe[Cr.overscaledZ]:Xi.disabled,ir,Ze?pi.frontCCW:pi.backCCW,Fa,ma,da,N.id,za.vertexBuffer,za.indexBuffer,za.segments)}}function Gs(pe,y,N,ie){let fe={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(N===0||ie)return fe;if(pe.fadingParentID){let be=y.getLoadedTile(pe.fadingParentID);if(!be)return fe;let Re=Math.pow(2,be.tileID.overscaledZ-pe.tileID.overscaledZ),je=[pe.tileID.canonical.x*Re%1,pe.tileID.canonical.y*Re%1],Ze=function(ut,ft,Dt){let Gt=m(),Kt=(Gt-ft.timeAdded)/Dt,st=ut.fadingDirection===gt.Incoming,It=e.al((Gt-ut.timeAdded)/Dt,0,1),Ut=e.al(1-Kt,0,1),ir=st?It:Ut;return{tileOpacity:ir,parentTileOpacity:st?Ut:It,fadeMix:{opacity:1,mix:1-ir}}}(pe,be,N);return{parentTile:be,parentScaleBy:Re,parentTopLeft:je,fadeValues:Ze}}if(pe.selfFading){let be=function(Re,je){let Ze=(m()-Re.timeAdded)/je,ut=e.al(Ze,0,1);return{tileOpacity:ut,fadeMix:{opacity:ut,mix:0}}}(pe,N);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:be}}return fe}let Es=new e.bo(1,0,0,1),ns=new e.bo(0,1,0,1),Kn=new e.bo(0,0,1,1),zo=new e.bo(1,0,1,1),gs=new e.bo(0,1,1,1);function js(pe,y,N,ie){zl(pe,0,y+N/2,pe.transform.width,N,ie)}function Cl(pe,y,N,ie){zl(pe,y-N/2,0,N,pe.transform.height,ie)}function zl(pe,y,N,ie,fe,be){let Re=pe.context,je=Re.gl;je.enable(je.SCISSOR_TEST),je.scissor(y*pe.pixelRatio,N*pe.pixelRatio,ie*pe.pixelRatio,fe*pe.pixelRatio),Re.clear({color:be}),je.disable(je.SCISSOR_TEST)}function Kl(pe,y,N){var ie;let fe=pe.context,be=fe.gl,Re=pe.useProgram("debug"),je=Vi.disabled,Ze=Xi.disabled,ut=pe.colorModeForRenderPass(),ft="$debug",Dt=(ie=pe.style.map.terrain)===null||ie===void 0?void 0:ie.getTerrainData(N);fe.activeTexture.set(be.TEXTURE0);let Gt=y.getTileByID(N.key).latestRawTileData,Kt=Math.floor((Gt?.byteLength||0)/1024),st=y.getTile(N).tileSize,It=512/Math.min(st,512)*(N.overscaledZ/pe.transform.zoom)*.5,Ut=N.canonical.toString();N.overscaledZ!==N.canonical.z&&(Ut+=` => ${N.overscaledZ}`),function(dr,Ar){dr.initDebugOverlayCanvas();let hr=dr.debugOverlayCanvas,vr=dr.context.gl,Or=dr.debugOverlayCanvas.getContext("2d");Or.clearRect(0,0,hr.width,hr.height),Or.shadowColor="white",Or.shadowBlur=2,Or.lineWidth=1.5,Or.strokeStyle="white",Or.textBaseline="top",Or.font="bold 36px Open Sans, sans-serif",Or.fillText(Ar,5,5),Or.strokeText(Ar,5,5),dr.debugOverlayTexture.update(hr),dr.debugOverlayTexture.bind(vr.LINEAR,vr.CLAMP_TO_EDGE)}(pe,`${Ut} ${Kt}kB`);let ir=pe.transform.getProjectionData({overscaledTileID:N,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(fe,be.TRIANGLES,je,Ze,to.alphaBlended,pi.disabled,jf(e.bo.transparent,It),null,ir,ft,pe.debugBuffer,pe.quadTriangleIndexBuffer,pe.debugSegments),Re.draw(fe,be.LINE_STRIP,je,Ze,ut,pi.disabled,jf(e.bo.red),Dt,ir,ft,pe.debugBuffer,pe.tileBorderIndexBuffer,pe.debugSegments)}function Gu(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=be.gl,je=pe.transform,Ze=pe.colorModeForRenderPass(),ut=pe.getDepthModeFor3D(),ft=pe.useProgram("terrain");be.bindFramebuffer.set(null),be.viewport.set([0,0,pe.width,pe.height]);for(let Dt of N){let Gt=y.getTerrainMesh(Dt.tileID),Kt=pe.renderToTexture.getTexture(Dt),st=y.getTerrainData(Dt.tileID);be.activeTexture.set(Re.TEXTURE0),Re.bindTexture(Re.TEXTURE_2D,Kt.texture);let It=y.getMeshFrameDelta(je.zoom),Ut=je.calculateFogMatrix(Dt.tileID.toUnwrapped()),ir=rh(It,Ut,pe.style.sky,je.pitch,fe),dr=je.getProjectionData({overscaledTileID:Dt.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ft.draw(be,Re.TRIANGLES,ut,Xi.disabled,Ze,pi.backCCW,ir,st,dr,"terrain",Gt.vertexBuffer,Gt.indexBuffer,Gt.segments)}}function xl(pe,y){if(!y.mesh){let N=new e.aU;N.emplaceBack(-1,-1),N.emplaceBack(1,-1),N.emplaceBack(1,1),N.emplaceBack(-1,1);let ie=new e.aW;ie.emplaceBack(0,1,2),ie.emplaceBack(0,2,3),y.mesh=new Xn(pe.createVertexBuffer(N,eo.members),pe.createIndexBuffer(ie),e.aV.simpleSegment(0,0,N.length,ie.length))}return y.mesh}let Hu={symbol:function(pe,y,N,ie,fe,be){if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=be,je=Xi.disabled,Ze=pe.colorModeForRenderPass();(N._unevaluatedLayout.hasValue("text-variable-anchor")||N._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&function(ut,ft,Dt,Gt,Kt,st,It,Ut,ir){var dr;let Ar=ft.transform,hr=ft.style.map.terrain,vr=Kt==="map",Or=st==="map";for(let Cr of ut){let ta=Gt.getTile(Cr),ka=ta.getBucket(Dt);if(!(!((dr=ka?.text)===null||dr===void 0)&&dr.segments.get().length))continue;let Ta=e.aw(ka.textSizeData,Ar.zoom),Ra=e.aK(ta,1,ft.transform.zoom),ua=cr(vr,ft.transform,Ra),ia=Dt.layout.get("icon-text-fit")!=="none"&&ka.hasIconData();if(Ta){let ma=Math.pow(2,Ar.zoom-ta.tileID.overscaledZ),da=hr?(Fa,za)=>hr.getElevation(Cr,Fa,za):null;Na(ka,vr,Or,ir,Ar,ua,ma,Ta,ia,e.aL(Ar,ta,It,Ut),Cr.toUnwrapped(),da)}}}(ie,pe,N,y,N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),fe),N.paint.get("icon-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!1,N.paint.get("icon-translate"),N.paint.get("icon-translate-anchor"),N.layout.get("icon-rotation-alignment"),N.layout.get("icon-pitch-alignment"),N.layout.get("icon-keep-upright"),je,Ze,Re),N.paint.get("text-opacity").constantOr(1)!==0&&mn(pe,y,N,ie,!0,N.paint.get("text-translate"),N.paint.get("text-translate-anchor"),N.layout.get("text-rotation-alignment"),N.layout.get("text-pitch-alignment"),N.layout.get("text-keep-upright"),je,Ze,Re),y.map.showCollisionBoxes&&(wr(pe,y,N,ie,!0),wr(pe,y,N,ie,!1))},circle:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("circle-opacity"),Ze=N.paint.get("circle-stroke-width"),ut=N.paint.get("circle-stroke-opacity"),ft=!N.layout.get("circle-sort-key").isConstant();if(je.constantOr(1)===0&&(Ze.constantOr(1)===0||ut.constantOr(1)===0))return;let Dt=pe.context,Gt=Dt.gl,Kt=pe.transform,st=pe.getDepthModeForSublayer(0,Vi.ReadOnly),It=Xi.disabled,Ut=pe.colorModeForRenderPass(),ir=[],dr=Kt.getCircleRadiusCorrection();for(let Ar of ie){let hr=y.getTile(Ar),vr=hr.getBucket(N);if(!vr)continue;let Or=N.paint.get("circle-translate"),Cr=N.paint.get("circle-translate-anchor"),ta=e.aL(Kt,hr,Or,Cr),ka=vr.programConfigurations.get(N.id),Ta=pe.useProgram("circle",ka),Ra=vr.layoutVertexBuffer,ua=vr.indexBuffer,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Ar),ma={programConfiguration:ka,program:Ta,layoutVertexBuffer:Ra,indexBuffer:ua,uniformValues:Gc(pe,hr,N,ta,dr),terrainData:ia,projectionData:Kt.getProjectionData({overscaledTileID:Ar,applyGlobeMatrix:!Re,applyTerrainMatrix:!0})};if(ft){let da=vr.segments.get();for(let Fa of da)ir.push({segments:new e.aV([Fa]),sortKey:Fa.sortKey,state:ma})}else ir.push({segments:vr.segments,sortKey:0,state:ma})}ft&&ir.sort((Ar,hr)=>Ar.sortKey-hr.sortKey);for(let Ar of ir){let{programConfiguration:hr,program:vr,layoutVertexBuffer:Or,indexBuffer:Cr,uniformValues:ta,terrainData:ka,projectionData:Ta}=Ar.state;vr.draw(Dt,Gt.TRIANGLES,st,It,Ut,pi.backCCW,ta,ka,Ta,N.id,Or,Cr,Ar.segments,N.paint,pe.transform.zoom,hr)}},heatmap:function(pe,y,N,ie,fe){if(N.paint.get("heatmap-opacity")===0)return;let be=pe.context,{isRenderingToTexture:Re,isRenderingGlobe:je}=fe;if(pe.style.map.terrain){for(let Ze of ie){let ut=y.getTile(Ze);y.hasRenderableParent(Ze)||(pe.renderPass==="offscreen"?Ha(pe,ut,N,Ze,je):pe.renderPass==="translucent"&&$a(pe,N,Ze,Re,je))}be.viewport.set([0,0,pe.width,pe.height])}else pe.renderPass==="offscreen"?function(Ze,ut,ft,Dt){let Gt=Ze.context,Kt=Gt.gl,st=Ze.transform,It=Xi.disabled,Ut=new to([Kt.ONE,Kt.ONE],e.bo.transparent,[!0,!0,!0,!0]);(function(ir,dr,Ar){let hr=ir.gl;ir.activeTexture.set(hr.TEXTURE1),ir.viewport.set([0,0,dr.width/4,dr.height/4]);let vr=Ar.heatmapFbos.get(e.cd);vr?(hr.bindTexture(hr.TEXTURE_2D,vr.colorAttachment.get()),ir.bindFramebuffer.set(vr.framebuffer)):(vr=vn(ir,dr.width/4,dr.height/4),Ar.heatmapFbos.set(e.cd,vr))})(Gt,Ze,ft),Gt.clear({color:e.bo.transparent});for(let ir of Dt){if(ut.hasRenderableParent(ir))continue;let dr=ut.getTile(ir),Ar=dr.getBucket(ft);if(!Ar)continue;let hr=Ar.programConfigurations.get(ft.id),vr=Ze.useProgram("heatmap",hr),Or=st.getProjectionData({overscaledTileID:ir,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Cr=st.getCircleRadiusCorrection();vr.draw(Gt,Kt.TRIANGLES,Vi.disabled,It,Ut,pi.backCCW,Hc(dr,st.zoom,ft.paint.get("heatmap-intensity"),Cr),null,Or,ft.id,Ar.layoutVertexBuffer,Ar.indexBuffer,Ar.segments,ft.paint,st.zoom,hr)}Gt.viewport.set([0,0,Ze.width,Ze.height])}(pe,y,N,ie):pe.renderPass==="translucent"&&function(Ze,ut){let ft=Ze.context,Dt=ft.gl;ft.setColorMode(Ze.colorModeForRenderPass());let Gt=ut.heatmapFbos.get(e.cd);Gt&&(ft.activeTexture.set(Dt.TEXTURE0),Dt.bindTexture(Dt.TEXTURE_2D,Gt.colorAttachment.get()),ft.activeTexture.set(Dt.TEXTURE1),Sn(ft,ut).bind(Dt.LINEAR,Dt.CLAMP_TO_EDGE),Ze.useProgram("heatmapTexture").draw(ft,Dt.TRIANGLES,Vi.disabled,Xi.disabled,Ze.colorModeForRenderPass(),pi.disabled,Wc(Ze,ut,0,1),null,null,ut.id,Ze.viewportBuffer,Ze.quadTriangleIndexBuffer,Ze.viewportSegments,ut.paint,Ze.transform.zoom))}(pe,N)},line:function(pe,y,N,ie,fe){var be;if(pe.renderPass!=="translucent")return;let{isRenderingToTexture:Re}=fe,je=N.paint.get("line-opacity"),Ze=N.paint.get("line-width");if(je.constantOr(1)===0||Ze.constantOr(1)===0)return;let ut=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ft=pe.colorModeForRenderPass(),Dt=N.paint.get("line-dasharray"),Gt=Dt.constantOr(1),Kt=N.paint.get("line-pattern"),st=Kt.constantOr(1),It=N.paint.get("line-gradient"),Ut=N.getCrossfadeParameters(),ir;ir=st?"linePattern":Gt&&It?"lineGradientSDF":Gt?"lineSDF":It?"lineGradient":"line";let dr=pe.context,Ar=dr.gl,hr=pe.transform,vr=!0;for(let Or of ie){let Cr=y.getTile(Or);if(st&&!Cr.patternsLoaded())continue;let ta=Cr.getBucket(N);if(!ta)continue;let ka=ta.programConfigurations.get(N.id),Ta=pe.context.program.get(),Ra=pe.useProgram(ir,ka),ua=vr||Ra.program!==Ta,ia=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),ma=Kt.constantOr(null),da=Dt?.constantOr(null);if(ma&&Cr.imageAtlas){let ui=Cr.imageAtlas,cn=ui.patternPositions[ma.to.toString()],sn=ui.patternPositions[ma.from.toString()];cn&&sn&&ka.setConstantPatternPositions(cn,sn)}else if(da){let ui=N.layout.get("line-cap").constantOr(null)==="round",cn=pe.lineAtlas.getDash(da.to,ui),sn=pe.lineAtlas.getDash(da.from,ui);ka.setConstantDashPositions(cn,sn)}let Fa=hr.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Re,applyTerrainMatrix:!0}),za=hr.getPixelScale(),kn;st?(kn=ju(pe,Cr,N,za,Ut),_i(dr,Ar,Cr,ka,Ut)):Gt&&It?(kn=Zc(pe,Cr,N,za,Ut,ta.lineClipsArray.length),En(pe,y,dr,Ar,N,ta,Or,ka,Ut)):Gt?(kn=Ac(pe,Cr,N,za,Ut),ki(pe,dr,Ar,ka,ua,Ut)):It?(kn=Xc(pe,Cr,N,za,ta.lineClipsArray.length),ri(pe,y,dr,Ar,N,ta,Or)):kn=al(pe,Cr,N,za);let Dn=pe.stencilModeForClipping(Or);Ra.draw(dr,Ar.TRIANGLES,ut,Dn,ft,pi.disabled,kn,ia,Fa,N.id,ta.layoutVertexBuffer,ta.indexBuffer,ta.segments,N.paint,pe.transform.zoom,ka,ta.layoutVertexBuffer2),vr=!1}},fill:function(pe,y,N,ie,fe){let be=N.paint.get("fill-color"),Re=N.paint.get("fill-opacity");if(Re.constantOr(1)===0)return;let{isRenderingToTexture:je}=fe,Ze=pe.colorModeForRenderPass(),ut=N.paint.get("fill-pattern"),ft=pe.opaquePassEnabledForLayer()&&!ut.constantOr(1)&&be.constantOr(e.bo.transparent).a===1&&Re.constantOr(0)===1?"opaque":"translucent";if(pe.renderPass===ft){let Dt=pe.getDepthModeForSublayer(1,pe.renderPass==="opaque"?Vi.ReadWrite:Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!1,je)}if(pe.renderPass==="translucent"&&N.paint.get("fill-antialias")){let Dt=pe.getDepthModeForSublayer(N.getPaintProperty("fill-outline-color")?2:0,Vi.ReadOnly);Ni(pe,y,N,ie,Dt,Ze,!0,je)}},fillExtrusion:function(pe,y,N,ie,fe){let be=N.paint.get("fill-extrusion-opacity");if(be===0)return;let{isRenderingToTexture:Re}=fe;if(pe.renderPass==="translucent"){let je=new Vi(pe.context.gl.LEQUAL,Vi.ReadWrite,pe.depthRangeFor3D);if(be!==1||N.paint.get("fill-extrusion-pattern").constantOr(1))Zi(pe,y,N,ie,je,Xi.disabled,to.disabled,Re),Zi(pe,y,N,ie,je,pe.stencilModeFor3D(),pe.colorModeForRenderPass(),Re);else{let Ze=pe.colorModeForRenderPass();Zi(pe,y,N,ie,je,Xi.disabled,Ze,Re)}}},hillshade:function(pe,y,N,ie,fe){if(pe.renderPass!=="offscreen"&&pe.renderPass!=="translucent")return;let{isRenderingToTexture:be}=fe,Re=pe.context,je=pe.style.projection.useSubdivision,Ze=pe.getDepthModeForSublayer(0,Vi.ReadOnly),ut=pe.colorModeForRenderPass();if(pe.renderPass==="offscreen")(function(ft,Dt,Gt,Kt,st,It,Ut){let ir=ft.context,dr=ir.gl,Ar=Kt.paint.get("resampling")==="nearest"?dr.NEAREST:dr.LINEAR;for(let hr of Gt){let vr=Dt.getTile(hr),Or=vr.dem;if(!Or?.data||!vr.needsHillshadePrepare)continue;let Cr=Or.dim,ta=Or.stride,ka=Or.getPixels();if(ir.activeTexture.set(dr.TEXTURE1),ir.pixelStoreUnpackPremultiplyAlpha.set(!1),vr.demTexture||(vr.demTexture=ft.getTileTexture(ta)),vr.demTexture){let Ra=vr.demTexture;Ra.update(ka,{premultiply:!1}),Ra.bind(dr.NEAREST,dr.CLAMP_TO_EDGE)}else vr.demTexture=new e.T(ir,ka,dr.RGBA,{premultiply:!1}),vr.demTexture.bind(dr.NEAREST,dr.CLAMP_TO_EDGE);ir.activeTexture.set(dr.TEXTURE0);let Ta=vr.fbo;if(!Ta){let Ra=new e.T(ir,{width:Cr,height:Cr,data:null},dr.RGBA);Ra.bind(Ar,dr.CLAMP_TO_EDGE),Ta=vr.fbo=ir.createFramebuffer(Cr,Cr,!0,!1),Ta.colorAttachment.set(Ra.texture)}ir.bindFramebuffer.set(Ta.framebuffer),ir.viewport.set([0,0,Cr,Cr]),ft.useProgram("hillshadePrepare").draw(ir,dr.TRIANGLES,st,It,Ut,pi.disabled,Yc(vr.tileID,Or),null,null,Kt.id,ft.rasterBoundsBuffer,ft.quadTriangleIndexBuffer,ft.rasterBoundsSegments),vr.needsHillshadePrepare=!1}})(pe,y,ie,N,Ze,Xi.disabled,ut),Re.viewport.set([0,0,pe.width,pe.height]);else if(pe.renderPass==="translucent")if(je){let[ft,Dt,Gt]=pe.stencilConfigForOverlapTwoPass(ie);Co(pe,y,N,Gt,ft,Ze,ut,!1,be),Co(pe,y,N,Gt,Dt,Ze,ut,!0,be)}else{let[ft,Dt]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Co(pe,y,N,Dt,ft,Ze,ut,!1,be)}},colorRelief:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=pe.style.projection.useSubdivision,je=pe.getDepthModeForSublayer(0,Vi.ReadOnly),Ze=pe.colorModeForRenderPass();if(Re){let[ut,ft,Dt]=pe.stencilConfigForOverlapTwoPass(ie);Fo(pe,y,N,Dt,ut,je,Ze,!1,be),Fo(pe,y,N,Dt,ft,je,Ze,!0,be)}else{let[ut,ft]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);Fo(pe,y,N,ft,ut,je,Ze,!1,be)}},raster:function(pe,y,N,ie,fe){if(pe.renderPass!=="translucent"||N.paint.get("raster-opacity")===0||!ie.length)return;let{isRenderingToTexture:be}=fe,Re=y.getSource(),je=pe.style.projection.useSubdivision;if(Re instanceof ke)bo(pe,y,N,ie,null,!1,!1,Re.tileCoords,Re.flippedWindingOrder,be);else if(je){let[Ze,ut,ft]=pe.stencilConfigForOverlapTwoPass(ie);bo(pe,y,N,ft,Ze,!1,!0,Yo,!1,be),bo(pe,y,N,ft,ut,!0,!0,Yo,!1,be)}else{let[Ze,ut]=pe.getStencilConfigForOverlapAndUpdateStencilID(ie);bo(pe,y,N,ut,Ze,!1,!0,Yo,!1,be)}},background:function(pe,y,N,ie,fe){var be;let Re=N.paint.get("background-color"),je=N.paint.get("background-opacity");if(je===0)return;let{isRenderingToTexture:Ze}=fe,ut=pe.context,ft=ut.gl,Dt=pe.style.projection,Gt=pe.transform,Kt=Gt.tileSize,st=N.paint.get("background-pattern");if(pe.isPatternMissing(st))return;let It=!st&&Re.a===1&&je===1&&pe.opaquePassEnabledForLayer()?"opaque":"translucent";if(pe.renderPass!==It)return;let Ut=Xi.disabled,ir=pe.getDepthModeForSublayer(0,It==="opaque"?Vi.ReadWrite:Vi.ReadOnly),dr=pe.colorModeForRenderPass(),Ar=pe.useProgram(st?"backgroundPattern":"background"),hr=ie||Je(Gt,{tileSize:Kt,terrain:pe.style.map.terrain});st&&(ut.activeTexture.set(ft.TEXTURE0),pe.imageManager.bind(pe.context));let vr=N.getCrossfadeParameters();for(let Or of hr){let Cr=Gt.getProjectionData({overscaledTileID:Or,applyGlobeMatrix:!Ze,applyTerrainMatrix:!0}),ta=st?rc(je,pe,st,{tileID:Or,tileSize:Kt},vr):ml(je,Re),ka=(be=pe.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Or),Ta=Dt.getMeshFromTileID(ut,Or.canonical,!1,!0,"raster");Ar.draw(ut,ft.TRIANGLES,ir,Ut,dr,pi.backCCW,ta,ka,Cr,N.id,Ta.vertexBuffer,Ta.indexBuffer,Ta.segments)}},sky:function(pe,y){let N=pe.context,ie=N.gl,fe=((ft,Dt,Gt)=>{let Kt=Math.cos(Dt.rollInRadians),st=Math.sin(Dt.rollInRadians),It=Xt(Dt),Ut=Dt.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:ft.properties.get("sky-color"),u_horizon_color:ft.properties.get("horizon-color"),u_horizon:[(Dt.width/2-It*st)*Gt,(Dt.height/2+It*Kt)*Gt],u_horizon_normal:[-st,Kt],u_sky_horizon_blend:ft.properties.get("sky-horizon-blend")*Dt.height/2*Gt,u_sky_blend:Ut}})(y,pe.style.map.transform,pe.pixelRatio),be=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),Re=Xi.disabled,je=pe.colorModeForRenderPass(),Ze=pe.useProgram("sky"),ut=xl(N,y);Ze.draw(N,ie.TRIANGLES,be,Re,je,pi.disabled,fe,null,void 0,"sky",ut.vertexBuffer,ut.indexBuffer,ut.segments)},atmosphere:function(pe,y,N){let ie=pe.context,fe=ie.gl,be=pe.useProgram("atmosphere"),Re=new Vi(fe.LEQUAL,Vi.ReadOnly,[0,1]),je=pe.transform,Ze=function(Ut,ir){let dr=Ut.properties.get("position"),Ar=[-dr.x,-dr.y,-dr.z],hr=e.ap(new Float64Array(16));return Ut.properties.get("anchor")==="map"&&(e.be(hr,hr,ir.rollInRadians),e.bf(hr,hr,-ir.pitchInRadians),e.be(hr,hr,ir.bearingInRadians),e.bf(hr,hr,ir.center.lat*Math.PI/180),e.bI(hr,hr,-ir.center.lng*Math.PI/180)),e.cg(Ar,Ar,hr),Ar}(N,pe.transform),ut=je.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),ft=y.properties.get("atmosphere-blend")*ut.projectionTransition;if(ft===0)return;let Dt=bs(je.worldSize,je.center.lat),Gt=je.inverseProjectionMatrix,Kt=new Float64Array(4);Kt[3]=1,e.aE(Kt,Kt,je.modelViewProjectionMatrix),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1,e.aE(Kt,Kt,Gt),Kt[0]/=Kt[3],Kt[1]/=Kt[3],Kt[2]/=Kt[3],Kt[3]=1;let st=((Ut,ir,dr,Ar,hr)=>({u_sun_pos:Ut,u_atmosphere_blend:ir,u_globe_position:dr,u_globe_radius:Ar,u_inv_proj_matrix:hr}))(Ze,ft,[Kt[0],Kt[1],Kt[2]],Dt,Gt),It=xl(ie,y);be.draw(ie,fe.TRIANGLES,Re,Xi.disabled,to.alphaBlended,pi.disabled,st,null,null,"atmosphere",It.vertexBuffer,It.indexBuffer,It.segments)},custom:function(pe,y,N,ie){let{isRenderingGlobe:fe}=ie,be=pe.context,Re=N.implementation,je=pe.style.projection,Ze=pe.transform,ut=Ze.getProjectionDataForCustomLayer(fe),ft={farZ:Ze.farZ,nearZ:Ze.nearZ,fov:Ze.fov*Math.PI/180,modelViewProjectionMatrix:Ze.modelViewProjectionMatrix,projectionMatrix:Ze.projectionMatrix,shaderData:{variantName:je.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; +uniform mat4 u_projection_matrix; +${je.shaderPreludeCode.vertexSource}`,define:je.shaderDefine},defaultProjectionData:ut},Dt=Re.renderingMode?Re.renderingMode:"2d";if(pe.renderPass==="offscreen"){let Gt=Re.prerender;Gt&&(pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),Gt.call(Re,be.gl,ft),be.setDirty(),pe.setBaseState())}else if(pe.renderPass==="translucent"){pe.setCustomLayerDefaults(),be.setColorMode(pe.colorModeForRenderPass()),be.setStencilMode(Xi.disabled);let Gt=Dt==="3d"?pe.getDepthModeFor3D():pe.getDepthModeForSublayer(0,Vi.ReadOnly);be.setDepthMode(Gt),Re.render(be.gl,ft),be.setDirty(),pe.setBaseState(),be.bindFramebuffer.set(null)}},debug:function(pe,y,N){for(let ie of N)Kl(pe,y,ie)},debugPadding:function(pe){let y=pe.transform.padding;js(pe,pe.transform.height-(y.top||0),3,Es),js(pe,y.bottom||0,3,ns),Cl(pe,y.left||0,3,Kn),Cl(pe,pe.transform.width-(y.right||0),3,zo);let N=pe.transform.centerPoint;(function(ie,fe,be,Re){zl(ie,fe-1,be-10,2,20,Re),zl(ie,fe-10,be-1,20,2,Re)})(pe,N.x,pe.transform.height-N.y,gs)},terrainDepth:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.tileManager.getRenderableTiles(),Ze=pe.useProgram("terrainDepth");N.bindFramebuffer.set(y.getFramebuffer("depth").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1});for(let ut of je){let ft=y.getTerrainMesh(ut.tileID),Dt=y.getTerrainData(ut.tileID),Gt=fe.getProjectionData({overscaledTileID:ut.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),Kt={u_ele_delta:y.getMeshFrameDelta(fe.zoom)};Ze.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Dt,Gt,"terrain",ft.vertexBuffer,ft.indexBuffer,ft.segments)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])},terrainCoords:function(pe,y){let N=pe.context,ie=N.gl,fe=pe.transform,be=to.unblended,Re=new Vi(ie.LEQUAL,Vi.ReadWrite,[0,1]),je=y.getCoordsTexture(),Ze=y.tileManager.getRenderableTiles(),ut=pe.useProgram("terrainCoords");N.bindFramebuffer.set(y.getFramebuffer("coords").framebuffer),N.viewport.set([0,0,pe.width/devicePixelRatio,pe.height/devicePixelRatio]),N.clear({color:e.bo.transparent,depth:1}),y.coordsIndex=[];for(let ft of Ze){let Dt=y.getTerrainMesh(ft.tileID),Gt=y.getTerrainData(ft.tileID);N.activeTexture.set(ie.TEXTURE0),ie.bindTexture(ie.TEXTURE_2D,je.texture);let Kt={u_terrain_coords_id:(255-y.coordsIndex.length)/255,u_texture:0,u_ele_delta:y.getMeshFrameDelta(fe.zoom)},st=fe.getProjectionData({overscaledTileID:ft.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});ut.draw(N,ie.TRIANGLES,Re,Xi.disabled,be,pi.backCCW,Kt,Gt,st,"terrain",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments),y.coordsIndex.push(ft.tileID.key)}N.bindFramebuffer.set(null),N.viewport.set([0,0,pe.width,pe.height])}};class Su{constructor(y,N){this.drawFunctions=Hu,this.context=new tr(y),this.transform=N,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:e.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Sr.maxOverzooming+Sr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Di}resize(y,N,ie){if(this.width=Math.floor(y*ie),this.height=Math.floor(N*ie),this.pixelRatio=ie,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let fe of this.style._order)this.style._layers[fe].resize()}setup(){let y=this.context,N=new e.aU;N.emplaceBack(0,0),N.emplaceBack(e.a6,0),N.emplaceBack(0,e.a6),N.emplaceBack(e.a6,e.a6),this.tileExtentBuffer=y.createVertexBuffer(N,eo.members),this.tileExtentSegments=e.aV.simpleSegment(0,0,4,2);let ie=new e.aU;ie.emplaceBack(0,0),ie.emplaceBack(e.a6,0),ie.emplaceBack(0,e.a6),ie.emplaceBack(e.a6,e.a6),this.debugBuffer=y.createVertexBuffer(ie,eo.members),this.debugSegments=e.aV.simpleSegment(0,0,4,5);let fe=new e.ch;fe.emplaceBack(0,0,0,0),fe.emplaceBack(e.a6,0,e.a6,0),fe.emplaceBack(0,e.a6,0,e.a6),fe.emplaceBack(e.a6,e.a6,e.a6,e.a6),this.rasterBoundsBuffer=y.createVertexBuffer(fe,bc.members),this.rasterBoundsSegments=e.aV.simpleSegment(0,0,4,2);let be=new e.aU;be.emplaceBack(0,0),be.emplaceBack(e.a6,0),be.emplaceBack(0,e.a6),be.emplaceBack(e.a6,e.a6),this.rasterBoundsBufferPosOnly=y.createVertexBuffer(be,eo.members),this.rasterBoundsSegmentsPosOnly=e.aV.simpleSegment(0,0,4,5);let Re=new e.aU;Re.emplaceBack(0,0),Re.emplaceBack(1,0),Re.emplaceBack(0,1),Re.emplaceBack(1,1),this.viewportBuffer=y.createVertexBuffer(Re,eo.members),this.viewportSegments=e.aV.simpleSegment(0,0,4,2);let je=new e.ci;je.emplaceBack(0),je.emplaceBack(1),je.emplaceBack(3),je.emplaceBack(2),je.emplaceBack(0),this.tileBorderIndexBuffer=y.createIndexBuffer(je);let Ze=new e.aW;Ze.emplaceBack(1,0,2),Ze.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=y.createIndexBuffer(Ze);let ut=this.context.gl;this.stencilClearMode=new Xi({func:ut.ALWAYS,mask:0},0,255,ut.ZERO,ut.ZERO,ut.ZERO),this.tileExtentMesh=new Xn(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let y=this.context,N=y.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let ie=e.O();e.c7(ie,0,this.width,this.height,0,0,1),e.S(ie,ie,[N.drawingBufferWidth,N.drawingBufferHeight,0]);let fe={mainMatrix:ie,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:ie};this.useProgram("clippingMask",null,!0).draw(y,N.TRIANGLES,Vi.disabled,this.stencilClearMode,to.disabled,pi.disabled,null,null,fe,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(y,N,ie){if(this.currentStencilSource===y.source||!y.isTileClipped()||!N?.length)return;this.currentStencilSource=y.source,this.nextStencilID+N.length>256&&this.clearStencil();let fe=this.context;fe.setColorMode(to.disabled),fe.setDepthMode(Vi.disabled);let be={};for(let Re of N)be[Re.key]=this.nextStencilID++;this._renderTileMasks(be,N,ie,!0),this._renderTileMasks(be,N,ie,!1),this._tileClippingMaskIDs=be}_renderTileMasks(y,N,ie,fe){var be;let Re=this.context,je=Re.gl,Ze=this.style.projection,ut=this.transform,ft=this.useProgram("clippingMask");for(let Dt of N){let Gt=y[Dt.key],Kt=(be=this.style.map.terrain)===null||be===void 0?void 0:be.getTerrainData(Dt),st=Ze.getMeshFromTileID(this.context,Dt.canonical,fe,!0,"stencil"),It=ut.getProjectionData({overscaledTileID:Dt,applyGlobeMatrix:!ie,applyTerrainMatrix:!0});ft.draw(Re,je.TRIANGLES,Vi.disabled,new Xi({func:je.ALWAYS,mask:0},Gt,255,je.KEEP,je.KEEP,je.REPLACE),to.disabled,ie?pi.disabled:pi.backCCW,null,Kt,It,"$clipping",st.vertexBuffer,st.indexBuffer,st.segments)}}_renderTilesDepthBuffer(){var y;let N=this.context,ie=N.gl,fe=this.style.projection,be=this.transform,Re=this.useProgram("depth"),je=this.getDepthModeFor3D(),Ze=Je(be,{tileSize:be.tileSize});for(let ut of Ze){let ft=(y=this.style.map.terrain)===null||y===void 0?void 0:y.getTerrainData(ut),Dt=fe.getMeshFromTileID(this.context,ut.canonical,!0,!0,"raster"),Gt=be.getProjectionData({overscaledTileID:ut,applyGlobeMatrix:!0,applyTerrainMatrix:!0});Re.draw(N,ie.TRIANGLES,je,Xi.disabled,to.disabled,pi.backCCW,null,ft,Gt,"$clipping",Dt.vertexBuffer,Dt.indexBuffer,Dt.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let y=this.nextStencilID++,N=this.context.gl;return new Xi({func:N.NOTEQUAL,mask:255},y,255,N.KEEP,N.KEEP,N.REPLACE)}stencilModeForClipping(y){let N=this.context.gl;return new Xi({func:N.EQUAL,mask:255},this._tileClippingMaskIDs[y.key],0,N.KEEP,N.KEEP,N.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(y){let N=this.context.gl,ie=y.sort((Re,je)=>je.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(be>1){this.currentStencilSource=void 0,this.nextStencilID+be>256&&this.clearStencil();let Re={};for(let je=0;jeje.overscaledZ-Re.overscaledZ),fe=ie[ie.length-1].overscaledZ,be=ie[0].overscaledZ-fe+1;if(this.clearStencil(),be>1){let Re={},je={};for(let Ze=0;Ze0};for(let Kt in je){let st=je[Kt];st.used&&st.prepare(this.context),Ze[Kt]=st.getVisibleCoordinates(!1),ut[Kt]=Ze[Kt].slice().reverse(),ft[Kt]=st.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let Kt=0;Ktthis.useProgram(Kt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:N.showOverdrawInspector?e.bo.black:e.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=N.showOverdrawInspector,this.depthRangeFor3D=[0,1-(y._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=Re.length-1;this.currentLayer>=0;this.currentLayer--){let Kt=this.style._layers[Re[this.currentLayer]],st=je[Kt.source],It=Ze[Kt.source];this._renderTileClippingMasks(Kt,It,!1),this.renderLayer(this,st,Kt,It,Dt)}this.renderPass="translucent";let Gt=!1;for(this.currentLayer=0;this.currentLayervr.source&&!vr.isHidden(It)?[st.tileManagers[vr.source]]:[]),dr=ir.filter(vr=>vr.getSource().type==="vector"),Ar=ir.filter(vr=>vr.getSource().type!=="vector"),hr=vr=>{(!Ut||Ut.getSource().maxzoom0?N.pop():null}isPatternMissing(y){if(!y)return!1;if(!y.from||!y.to)return!0;let N=this.imageManager.getPattern(y.from.toString()),ie=this.imageManager.getPattern(y.to.toString());return!N||!ie}useProgram(y,N,ie=!1,fe=[]){var be;this.cache||(this.cache={});let Re=!!this.style.map.terrain,je=this.style.projection,Ze=ie?Ai.projectionMercator:je.shaderPreludeCode,ut=ie?gi:je.shaderDefine,ft=y+(N?N.cacheKey:"")+`/${ie?qi:je.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(Re?"/terrain":"")+(fe?`/${fe.join("/")}`:"");return(be=this.cache)[ft]||(be[ft]=new ah(this.context,Ai[y],N,qf[y],this._showOverdrawInspector,Re,Ze,ut,fe)),this.cache[ft]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let y=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(y.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new e.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var y,N;if(this._tileTextures){for(let ie in this._tileTextures){let fe=this._tileTextures[ie];if(fe)for(let be of fe)be.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((y=this.tileExtentMesh.vertexBuffer)===null||y===void 0||y.destroy()),this.tileExtentMesh&&((N=this.tileExtentMesh.indexBuffer)===null||N===void 0||N.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let ie in this.cache){let fe=this.cache[ie];fe?.program&&this.context.gl.deleteProgram(fe.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:y,drawingBufferHeight:N}=this.context.gl;return this.width!==y||this.height!==N}}function mc(pe,y){let N,ie=!1,fe=null,be=()=>{fe=null,ie&&(pe(...N),fe=setTimeout(be,y),ie=!1)};return(...Re)=>(ie=!0,N=Re,fe||be(),fe)}Su.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class Jc{constructor(y){this._getCurrentHash=()=>{let N=window.location.hash.replace("#","");if(this._hashName){let ie,fe=N.split("&").map(be=>be.split("="));for(let be of fe)be[0]===this._hashName&&(ie=be);return(ie&&ie[1]||"").split("/")}return N.split("/")},this._onHashChange=()=>{let N=this._getCurrentHash();if(!this._isValidHash(N))return!1;let ie=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(N[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+N[2],+N[1]],zoom:+N[0],bearing:ie,pitch:+(N[4]||0)}),!0},this._updateHashUnthrottled=()=>{let N=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,N)},this._removeHash=()=>{let N=this._getCurrentHash();if(N.length===0)return;let ie=N.join("/"),fe=ie;fe.split("&").length>0&&(fe=fe.split("&")[0]),this._hashName&&(fe=`${this._hashName}=${ie}`);let be=window.location.hash.replace(fe,"");be.startsWith("#&")?be=be.slice(0,1)+be.slice(2):be==="#"&&(be="");let Re=window.location.href.replace(/(#.+)?$/,be);Re=Re.replace("&&","&"),window.history.replaceState(window.history.state,null,Re)},this._updateHash=mc(this._updateHashUnthrottled,300),this._hashName=y&&encodeURIComponent(y)}addTo(y){return this._map=y,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(y){let N=this._map.getCenter(),ie=Math.round(100*this._map.getZoom())/100,fe=Math.ceil((ie*Math.LN2+Math.log(512/360/.5))/Math.LN10),be=Math.pow(10,fe),Re=Math.round(N.lng*be)/be,je=Math.round(N.lat*be)/be,Ze=this._map.getBearing(),ut=this._map.getPitch(),ft="";if(ft+=y?`/${Re}/${je}/${ie}`:`${ie}/${je}/${Re}`,(Ze||ut)&&(ft+="/"+Math.round(10*Ze)/10),ut&&(ft+=`/${Math.round(ut)}`),this._hashName){let Dt=this._hashName,Gt=!1,Kt=window.location.hash.slice(1).split("&").map(st=>{let It=st.split("=")[0];return It===Dt?(Gt=!0,`${It}=${ft}`):st}).filter(st=>st);return Gt||Kt.push(`${Dt}=${ft}`),`#${Kt.join("&")}`}return`#${ft}`}_isValidHash(y){if(y.length<3||y.some(isNaN))return!1;try{new e.W(+y[2],+y[1])}catch{return!1}let N=+y[0],ie=+(y[3]||0),fe=+(y[4]||0);return N>=this._map.getMinZoom()&&N<=this._map.getMaxZoom()&&ie>=-180&&ie<=180&&fe>=this._map.getMinPitch()&&fe<=this._map.getMaxPitch()}}let oc={linearity:.3,easing:e.cv(0,0,.3,1)},du=e.e({deceleration:2500,maxSpeed:1400},oc),Jl=e.e({deceleration:20,maxSpeed:1400},oc),Ql=e.e({deceleration:1e3,maxSpeed:360},oc),Eu=e.e({deceleration:1e3,maxSpeed:90},oc),bf=e.e({deceleration:1e3,maxSpeed:360},oc);class lh{constructor(y){this._map=y,this.clear()}clear(){this._inertiaBuffer=[]}record(y){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:m(),settings:y})}_drainInertiaBuffer(){let y=this._inertiaBuffer,N=m();for(;y.length>0&&N-y[0].time>160;)y.shift()}_onMoveEnd(y){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let N={zoom:0,bearing:0,pitch:0,roll:0,pan:new e.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:be}of this._inertiaBuffer)N.zoom+=be.zoomDelta||0,N.bearing+=be.bearingDelta||0,N.pitch+=be.pitchDelta||0,N.roll+=be.rollDelta||0,be.panDelta&&N.pan._add(be.panDelta),be.around&&(N.around=be.around),be.pinchAround&&(N.pinchAround=be.pinchAround);let ie=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,fe={};if(N.pan.mag()){let be=Ks(N.pan.mag(),ie,e.e({},du,y||{})),Re=N.pan.mult(be.amount/N.pan.mag()),je=this._map.cameraHelper.handlePanInertia(Re,this._map.transform);fe.center=je.easingCenter,fe.offset=je.easingOffset,Pc(fe,be)}if(N.zoom){let be=Ks(N.zoom,ie,Jl);fe.zoom=e.cw(this._map.transform.zoom+be.amount,this._map.getZoomSnap(),be.amount),Pc(fe,be)}if(N.bearing){let be=Ks(N.bearing,ie,Ql);fe.bearing=this._map.transform.bearing+e.al(be.amount,-179,179),Pc(fe,be)}if(N.pitch){let be=Ks(N.pitch,ie,Eu);fe.pitch=this._map.transform.pitch+be.amount,Pc(fe,be)}if(N.roll){let be=Ks(N.roll,ie,bf);fe.roll=this._map.transform.roll+e.al(be.amount,-179,179),Pc(fe,be)}if(fe.zoom||fe.bearing){let be=N.pinchAround===void 0?N.around:N.pinchAround;fe.around=be?this._map.unproject(be):this._map.getCenter()}return this.clear(),e.e(fe,{noMoveStart:!0})}}function Pc(pe,y){(!pe.duration||pe.durationN.unproject(Ze)),je=be.reduce((Ze,ut,ft,Dt)=>Ze.add(ut.div(Dt.length)),new e.P(0,0));super(y,{points:be,point:je,lngLats:Re,lngLat:N.unproject(je),originalEvent:ie}),this._defaultPrevented=!1}}class wf extends e.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(y,N,ie){super(y,{originalEvent:ie}),this._defaultPrevented=!1}}class Qc{constructor(y,N){this._map=y,this._clickTolerance=N.clickTolerance}reset(){delete this._mousedownPos}wheel(y){return this._firePreventable(new wf(y.type,this._map,y))}mousedown(y,N){return this._mousedownPos=N,this._firePreventable(new Bl(y.type,this._map,y))}mouseup(y){this._map.fire(new Bl(y.type,this._map,y))}click(y,N){this._mousedownPos&&this._mousedownPos.dist(N)>=this._clickTolerance||this._map.fire(new Bl(y.type,this._map,y))}dblclick(y){return this._firePreventable(new Bl(y.type,this._map,y))}mouseover(y){this._map.fire(new Bl(y.type,this._map,y))}mouseout(y){this._map.fire(new Bl(y.type,this._map,y))}touchstart(y){return this._firePreventable(new Wu(y.type,this._map,y))}touchmove(y){this._map.fire(new Wu(y.type,this._map,y))}touchend(y){this._map.fire(new Wu(y.type,this._map,y))}touchcancel(y){this._map.fire(new Wu(y.type,this._map,y))}_firePreventable(y){if(this._map.fire(y),y.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class ku{constructor(y){this._map=y}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(y){this._map.fire(new Bl(y.type,this._map,y))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Bl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(y){this._delayContextMenu?this._contextMenuEvent=y:this._ignoreContextMenu||this._map.fire(new Bl(y.type,this._map,y)),this._map.listens("contextmenu")&&y.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Ol{constructor(y){this._map=y}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(y){return this.transform.screenPointToLocation(e.P.convert(y),this._map.terrain)}}class Nl{constructor(y,N){this._map=y,this._tr=new Ol(y),this._el=y.getCanvasContainer(),this._container=y.getContainer(),this._clickTolerance=N.clickTolerance||1,N.boxZoom&&typeof N.boxZoom=="object"&&(this._boxZoomEnd=N.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(y,N){this.isEnabled()&&y.shiftKey&&y.button===0&&(g.disableDrag(),this._startPos=this._lastPos=N,this._active=!0)}mousemoveWindow(y,N){if(!this._active)return;let ie=N;if(this._lastPos.equals(ie)||!this._box&&ie.dist(this._startPos)be.fitScreenCoordinates(ie,fe,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",y)}keydown(y){this._active&&y.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",y))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),g.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(y,N){return this._map.fire(new e.n(y,{originalEvent:N}))}}function fi(pe,y){if(pe.length!==y.length)throw new Error(`The number of touches and points are not equal - touches ${pe.length}, points ${y.length}`);let N={};for(let ie=0;iethis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=y.timeStamp),ie.length===this.numTouches&&(this.centroid=function(fe){let be=new e.P(0,0);for(let Re of fe)be._add(Re);return be.div(fe.length)}(N),this.touches=fi(ie,N)))}touchmove(y,N,ie){if(this.aborted||!this.centroid)return;let fe=fi(ie,N);for(let be in this.touches){let Re=fe[be];(!Re||Re.dist(this.touches[be])>30)&&(this.aborted=!0)}}touchend(y,N,ie){if((!this.centroid||y.timeStamp-this.startTime>500)&&(this.aborted=!0),ie.length===0){let fe=!this.aborted&&this.centroid;if(this.reset(),fe)return fe}}}class $e{constructor(y){this.singleTap=new eu(y),this.numTaps=y.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(y,N,ie){this.singleTap.touchstart(y,N,ie)}touchmove(y,N,ie){this.singleTap.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this.singleTap.touchend(y,N,ie);if(fe){let be=y.timeStamp-this.lastTime<500,Re=!this.lastTap||this.lastTap.dist(fe)<30;if(be&&Re||this.reset(),this.count++,this.lastTime=y.timeStamp,this.lastTap=fe,this.count===this.numTaps)return this.reset(),fe}}}class nt{constructor(y){this._tr=new Ol(y),this._zoomIn=new $e({numTouches:1,numTaps:2}),this._zoomOut=new $e({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(y,N,ie){this._zoomIn.touchstart(y,N,ie),this._zoomOut.touchstart(y,N,ie)}touchmove(y,N,ie){this._zoomIn.touchmove(y,N,ie),this._zoomOut.touchmove(y,N,ie)}touchend(y,N,ie){let fe=this._zoomIn.touchend(y,N,ie),be=this._zoomOut.touchend(y,N,ie),Re=this._tr;return fe?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom+1,je.getZoomSnap()),around:Re.unproject(fe)},{originalEvent:y})}):be?(this._active=!0,y.preventDefault(),setTimeout(()=>this.reset(),0),{cameraAnimation:je=>je.easeTo({duration:300,zoom:e.cw(Re.zoom-1,je.getZoomSnap()),around:Re.unproject(be)},{originalEvent:y})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class mt{constructor(y){this._enabled=!!y.enable,this._moveStateManager=y.moveStateManager,this._clickTolerance=y.clickTolerance||1,this._moveFunction=y.move,this._activateOnStart=!!y.activateOnStart,y.assignEvents(this),this.reset()}reset(y){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(y)}_move(...y){let N=this._moveFunction(...y);if(N.bearingDelta||N.pitchDelta||N.rollDelta||N.around||N.panDelta)return this._active=!0,N}dragStart(y,N){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(y)&&(this._moveStateManager.startMove(y),this._lastPoint=Array.isArray(N)?N[0]:N,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(y,N){if(!this.isEnabled())return;let ie=this._lastPoint;if(!ie)return;if(y.preventDefault(),!this._moveStateManager.isValidMoveEvent(y))return void this.reset(y);let fe=Array.isArray(N)?N[0]:N;return!this._moved&&fe.dist(ie)!0}),N=new Pr){this.mouseMoveStateManager=y,this.oneFingerTouchMoveStateManager=N}_executeRelevantHandler(y,N,ie){return y instanceof MouseEvent?N(y):typeof TouchEvent<"u"&&y instanceof TouchEvent?ie(y):void 0}startMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.startMove(N)},N=>{this.oneFingerTouchMoveStateManager.startMove(N)})}endMove(y){this._executeRelevantHandler(y,N=>{this.mouseMoveStateManager.endMove(N)},N=>{this.oneFingerTouchMoveStateManager.endMove(N)})}isValidStartEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidStartEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidStartEvent(N))}isValidMoveEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidMoveEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(N))}isValidEndEvent(y){return this._executeRelevantHandler(y,N=>this.mouseMoveStateManager.isValidEndEvent(N),N=>this.oneFingerTouchMoveStateManager.isValidEndEvent(N))}}let kr=pe=>{pe.mousedown=pe.dragStart,pe.mousemoveWindow=pe.dragMove,pe.mouseup=pe.dragEnd,pe.contextmenu=y=>{y.preventDefault()}};class jr{constructor(y,N){this._clickTolerance=y.clickTolerance||1,this._map=N,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new e.P(0,0)}_shouldBePrevented(y){return y<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(y,N,ie){return this._calculateTransform(y,N,ie)}touchmove(y,N,ie){if(this._active){if(!this._shouldBePrevented(ie.length))return y.preventDefault(),this._calculateTransform(y,N,ie);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",y)}}touchend(y,N,ie){this._calculateTransform(y,N,ie),this._active&&this._shouldBePrevented(ie.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(y,N,ie){ie.length>0&&(this._active=!0);let fe=fi(ie,N),be=new e.P(0,0),Re=new e.P(0,0),je=0;for(let ut in fe){let ft=fe[ut],Dt=this._touches[ut];Dt&&(be._add(ft),Re._add(ft.sub(Dt)),je++,fe[ut]=ft)}if(this._touches=fe,this._shouldBePrevented(je)||!Re.mag())return;let Ze=Re.div(je);return this._sum._add(Ze),this._sum.mag()Math.abs(pe.x)}class Si extends Jr{constructor(y){super(),this._currentTouchCount=0,this._map=y}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(y,N,ie){super.touchstart(y,N,ie),this._currentTouchCount=ie.length}_start(y){this._lastPoints=y,ii(y[0].sub(y[1]))&&(this._valid=!1)}_move(y,N,ie){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let fe=y[0].sub(this._lastPoints[0]),be=y[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(fe,be,ie.timeStamp),this._valid?(this._lastPoints=y,this._active=!0,{pitchDelta:(fe.y+be.y)/2*-.5}):void 0}gestureBeginsVertically(y,N,ie){if(this._valid!==void 0)return this._valid;let fe=y.mag()>=2,be=N.mag()>=2;if(!fe&&!be)return;if(!fe||!be)return this._firstMove===void 0&&(this._firstMove=ie),ie-this._firstMove<100&&void 0;let Re=y.y>0==N.y>0;return ii(y)&&ii(N)&&Re}}let oi={panStep:100,bearingStep:15,pitchStep:10};class Ji{constructor(y){this._tr=new Ol(y);let N=oi;this._panStep=N.panStep,this._bearingStep=N.bearingStep,this._pitchStep=N.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(y){if(y.altKey||y.ctrlKey||y.metaKey)return;let N=0,ie=0,fe=0,be=0,Re=0;switch(y.keyCode){case 61:case 107:case 171:case 187:N=1;break;case 189:case 109:case 173:N=-1;break;case 37:y.shiftKey?ie=-1:(y.preventDefault(),be=-1);break;case 39:y.shiftKey?ie=1:(y.preventDefault(),be=1);break;case 38:y.shiftKey?fe=1:(y.preventDefault(),Re=-1);break;case 40:y.shiftKey?fe=-1:(y.preventDefault(),Re=1);break;default:return}return this._rotationDisabled&&(ie=0,fe=0),{cameraAnimation:je=>{let Ze=this._tr;je.easeTo({duration:300,easeId:"keyboardHandler",easing:Qi,zoom:N?e.cw(Ze.zoom+N*(y.shiftKey?2:1),je.getZoomSnap()):Ze.zoom,bearing:Ze.bearing+ie*this._bearingStep,pitch:Ze.pitch+fe*this._pitchStep,offset:[-be*this._panStep,-Re*this._panStep],center:Ze.center},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function Qi(pe){return pe*(2-pe)}let Oo=4.000244140625,Qo=1/450;class vo{constructor(y,N){this._onTimeout=ie=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(ie)},this._map=y,this._tr=new Ol(y),this._triggerRenderFrame=N,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Qo}setZoomRate(y){this._defaultZoomRate=y}setWheelZoomRate(y){this._wheelZoomRate=y}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(y){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!y&&y.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(y){return!!this._map.cooperativeGestures.isEnabled()&&!(y.ctrlKey||this._map.cooperativeGestures.isBypassed(y))}wheel(y){if(!this.isEnabled())return;if(this._shouldBePrevented(y))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",y);let N=y.deltaMode===WheelEvent.DOM_DELTA_LINE?40*y.deltaY:y.deltaY,ie=m(),fe=ie-(this._lastWheelEventTime||0);this._lastWheelEventTime=ie,N!==0&&N%Oo==0?this._type="wheel":N!==0&&Math.abs(N)<4?this._type="trackpad":fe>400?(this._type=null,this._lastValue=N,this._timeout=setTimeout(this._onTimeout,40,y)):this._type||(this._type=Math.abs(fe*N)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,N+=this._lastValue)),y.shiftKey&&N&&(N/=4),this._type&&(this._lastWheelEvent=y,this._delta-=N,this._active||this._start(y)),y.preventDefault()}_start(y){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let N=g.mousePos(this._map.getCanvas(),y),ie=this._tr;this._aroundPoint=this._aroundCenter?ie.transform.locationToScreenPoint(e.W.convert(ie.center)):N,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let y=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let je=y.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=je),typeof this._targetZoom=="number"&&(this._targetZoom+=je)}if(this._delta!==0){let je=this._type==="wheel"&&Math.abs(this._delta)>Oo?this._wheelZoomRate:this._defaultZoomRate,Ze=2/(1+Math.exp(-Math.abs(this._delta*je)));this._delta<0&&Ze!==0&&(Ze=1/Ze);let ut=typeof this._targetZoom!="number"?y.scale:e.ao(this._targetZoom),ft=y.applyConstrain(y.getCameraLngLat(),e.ar(ut*Ze)).zoom,Dt=this._map.getZoomSnap();if(this._type==="wheel"&&Dt>0){let Gt=e.cw(y.zoom,Dt);this._targetZoom=e.cw(ft,Dt,ft-Gt)}else this._targetZoom=ft;this._type==="wheel"&&(this._startZoom=y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let N=typeof this._targetZoom!="number"?y.zoom:this._targetZoom,ie=this._startZoom,fe=this._easing,be,Re=!1;if(this._type==="wheel"&&ie&&fe){let je=m()-this._lastWheelEventTime,Ze=Math.min((je+5)/200,1),ut=fe(Ze);be=e.H.number(ie,N,ut),Ze<1?this._needsRerender=!0:Re=!0}else be=N,Re=!0;return this._active=!0,Re&&(this._active=!1,this._finishTimeout=setTimeout(()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout},200)),this._lastExpectedZoom=be,{noInertia:!0,needsRenderFrame:!Re,zoomDelta:be-y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(y){let N=e.cy;if(this._prevEase){let ie=this._prevEase,fe=(m()-ie.start)/ie.duration,be=ie.easing(fe+.01)-ie.easing(fe),Re=.27/Math.sqrt(be*be+1e-4)*.01,je=Math.sqrt(.0729-Re*Re);N=e.cv(Re,je,.25,1)}return this._prevEase={start:m(),duration:y,easing:N},N}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ys{constructor(y,N){this._clickZoom=y,this._tapZoom=N}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class ol{constructor(y){this._tr=new Ol(y),this.reset()}reset(){this._active=!1}dblclick(y,N){return y.preventDefault(),{cameraAnimation:ie=>{ie.easeTo({duration:300,zoom:e.cw(this._tr.zoom+(y.shiftKey?-1:1),ie.getZoomSnap()),around:this._tr.unproject(N)},{originalEvent:y})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class jl{constructor(){this._tap=new $e({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(y){this._zoomRate=y??1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(y,N,ie){if(!this._swipePoint)if(this._tapTime){let fe=N[0],be=y.timeStamp-this._tapTime<500,Re=this._tapPoint.dist(fe)<30;be&&Re?ie.length>0&&(this._swipePoint=fe,this._swipeTouch=ie[0].identifier):this.reset()}else this._tap.touchstart(y,N,ie)}touchmove(y,N,ie){if(this._tapTime){if(this._swipePoint){if(ie[0].identifier!==this._swipeTouch)return;let fe=N[0],be=fe.y-this._swipePoint.y;return this._swipePoint=fe,y.preventDefault(),this._active=!0,{zoomDelta:be/128*this._zoomRate}}}else this._tap.touchmove(y,N,ie)}touchend(y,N,ie){if(this._tapTime)this._swipePoint&&ie.length===0&&this.reset();else{let fe=this._tap.touchend(y,N,ie);fe&&(this._tapTime=y.timeStamp,this._tapPoint=fe)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Hs{constructor(y,N,ie){this._el=y,this._mousePan=N,this._touchPan=ie}enable(y){this._inertiaOptions=y||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class Cu{constructor(y,N,ie,fe){this._pitchWithRotate=y.pitchWithRotate,this._rollEnabled=y.rollEnabled,this._mouseRotate=N,this._mousePitch=ie,this._mouseRoll=fe}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class hi{constructor(y,N,ie,fe){this._el=y,this._touchZoom=N,this._touchRotate=ie,this._tapDragZoom=fe,this._rotationDisabled=!1,this._enabled=!0}enable(y){this._touchZoom.enable(y),this._rotationDisabled||this._touchRotate.enable(y),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(y){this._touchZoom.setZoomRate(y),this._tapDragZoom.setZoomRate(y)}setZoomThreshold(y){this._touchZoom.setZoomThreshold(y)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class wi{constructor(y,N){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=y,this._options=N,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let y=this._map.getCanvasContainer();y.classList.add("maplibregl-cooperative-gestures"),this._container=g.create("div","maplibregl-cooperative-gesture-screen",y);let N=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(N=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let ie=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),fe=document.createElement("div");fe.className="maplibregl-desktop-message",fe.textContent=N,this._container.appendChild(fe);let be=document.createElement("div");be.className="maplibregl-mobile-message",be.textContent=ie,this._container.appendChild(be),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(y){return y[this._bypassKey]}notifyGestureBlocked(y,N){this._enabled&&(this._map.fire(new e.n("cooperativegestureprevented",{gestureType:y,originalEvent:N})),this._container.classList.add("maplibregl-show"),setTimeout(()=>{this._container.classList.remove("maplibregl-show")},100))}}let sl=pe=>pe.zoom||pe.drag||pe.roll||pe.pitch||pe.rotate;class sc extends e.n{}function tu(pe){var y;return((y=pe.panDelta)===null||y===void 0?void 0:y.mag())||pe.zoomDelta||pe.bearingDelta||pe.pitchDelta||pe.rollDelta}class Ps{get _ownerDocument(){var y;return((y=this._el)===null||y===void 0?void 0:y.ownerDocument)||document}get _ownerWindow(){var y,N;return((N=(y=this._el)===null||y===void 0?void 0:y.ownerDocument)===null||N===void 0?void 0:N.defaultView)||window}constructor(y,N){this.handleWindowEvent=fe=>{this.handleEvent(fe,`${fe.type}Window`)},this.handleEvent=(fe,be)=>{if(fe.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let Re=fe.type==="renderFrame"?void 0:fe,je={needsRenderFrame:!1},Ze={},ut={};for(let{handlerName:Gt,handler:Kt,allowed:st}of this._handlers){if(!Kt.isEnabled())continue;let It;if(this._blockedByActive(ut,st,Gt))Kt.reset();else if(Kt[be||fe.type]){if(e.cz(fe,be||fe.type)){let Ut=g.mousePos(this._map.getCanvas(),fe);It=Kt[be||fe.type](fe,Ut)}else if(e.cA(fe,be||fe.type)){let Ut=this._getMapTouches(fe.touches),ir=g.touchPos(this._map.getCanvas(),Ut);It=Kt[be||fe.type](fe,ir,Ut)}else e.cB(be||fe.type)||(It=Kt[be||fe.type](fe));this.mergeHandlerResult(je,Ze,It,Gt,Re),It?.needsRenderFrame&&this._triggerRenderFrame()}(It||Kt.isActive())&&(ut[Gt]=Kt)}let ft={};for(let Gt in this._previousActiveHandlers)ut[Gt]||(ft[Gt]=Re);this._previousActiveHandlers=ut,(Object.keys(ft).length||tu(je))&&(this._changes.push([je,Ze,ft]),this._triggerRenderFrame()),(Object.keys(ut).length||tu(je))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Dt}=je;Dt&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Dt(this._map))},this._map=y,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new lh(y),this._bearingSnap=N.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(N);let ie=this._el;this._listeners=[[ie,"touchstart",{passive:!0}],[ie,"touchmove",{passive:!1}],[ie,"touchend",void 0],[ie,"touchcancel",void 0],[ie,"mousedown",void 0],[ie,"mousemove",void 0],[ie,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[ie,"mouseover",void 0],[ie,"mouseout",void 0],[ie,"dblclick",void 0],[ie,"click",void 0],[ie,"keydown",{capture:!1}],[ie,"keyup",void 0],[ie,"wheel",{passive:!1}],[ie,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[fe,be,Re]of this._listeners)fe.addEventListener(be,fe===this._ownerDocument?this.handleWindowEvent:this.handleEvent,Re)}destroy(){for(let[y,N,ie]of this._listeners)y.removeEventListener(N,y===this._ownerDocument?this.handleWindowEvent:this.handleEvent,ie)}_addDefaultHandlers(y){let N=this._map,ie=N.getCanvasContainer();this._add("mapEvent",new Qc(N,y));let fe=N.boxZoom=new Nl(N,y);this._add("boxZoom",fe),y.interactive&&y.boxZoom&&fe.enable();let be=N.cooperativeGestures=new wi(N,y.cooperativeGestures);this._add("cooperativeGestures",be),y.cooperativeGestures&&be.enable();let Re=new nt(N),je=new ol(N);N.doubleClickZoom=new ys(je,Re),this._add("tapZoom",Re),this._add("clickZoom",je),y.interactive&&y.doubleClickZoom&&N.doubleClickZoom.enable();let Ze=new jl;this._add("tapDragZoom",Ze);let ut=N.touchPitch=new Si(N);this._add("touchPitch",ut),y.interactive&&y.touchPitch&&N.touchPitch.enable(y.touchPitch);let ft=()=>N.project(N.getCenter()),Dt=function({enable:hr,clickTolerance:vr,aroundCenter:Or=!0,minPixelCenterThreshold:Cr=100,rotateDegreesPerPixelMoved:ta=.8},ka){let Ta=new Wt({checkCorrectEvent:Ra=>Ra.button===0&&Ra.ctrlKey||Ra.button===2&&!Ra.ctrlKey});return new mt({clickTolerance:vr,move:(Ra,ua)=>{let ia=ka();if(Or&&Math.abs(ia.y-Ra.y)>Cr)return{bearingDelta:e.cx(new e.P(Ra.x,ua.y),ua,ia)};let ma=(ua.x-Ra.x)*ta;return Or&&ua.yta.button===0&&ta.ctrlKey||ta.button===2});return new mt({clickTolerance:vr,move:(ta,ka)=>({pitchDelta:(ka.y-ta.y)*Or}),moveStateManager:Cr,enable:hr,assignEvents:kr})}(y),Kt=function({enable:hr,clickTolerance:vr,rollDegreesPerPixelMoved:Or=.3},Cr){let ta=new Wt({checkCorrectEvent:ka=>ka.button===2&&ka.ctrlKey});return new mt({clickTolerance:vr,move:(ka,Ta)=>{let Ra=Cr(),ua=(Ta.x-ka.x)*Or;return Ta.yCr.button===0&&!Cr.ctrlKey});return new mt({clickTolerance:vr,move:(Cr,ta)=>({around:ta,panDelta:ta.sub(Cr)}),activateOnStart:!0,moveStateManager:Or,enable:hr,assignEvents:kr})}(y),It=new jr(y,N);N.dragPan=new Hs(ie,st,It),this._add("mousePan",st),this._add("touchPan",It,["touchZoom","touchRotate"]),y.interactive&&y.dragPan&&N.dragPan.enable(y.dragPan);let Ut=new wn,ir=new Ba;N.touchZoomRotate=new hi(ie,ir,Ut,Ze),this._add("touchRotate",Ut,["touchPan","touchZoom"]),this._add("touchZoom",ir,["touchPan","touchRotate"]),y.interactive&&y.touchZoomRotate&&N.touchZoomRotate.enable(y.touchZoomRotate),this._add("blockableMapEvent",new ku(N));let dr=N.scrollZoom=new vo(N,()=>this._triggerRenderFrame());this._add("scrollZoom",dr,["mousePan"]),y.interactive&&y.scrollZoom&&N.scrollZoom.enable(y.scrollZoom);let Ar=N.keyboard=new Ji(N);this._add("keyboard",Ar),y.interactive&&y.keyboard&&N.keyboard.enable()}_add(y,N,ie){this._handlers.push({handlerName:y,handler:N,allowed:ie}),this._handlersById[y]=N}stop(y){if(!this._updatingCamera){for(let{handler:N}of this._handlers)N.reset();this._inertia.clear(),this._fireEvents({},{},y),this._changes=[]}}isActive(){for(let{handler:y}of this._handlers)if(y.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!sl(this._eventsInProgress)||this.isZooming()}_blockedByActive(y,N,ie){for(let fe in y)if(fe!==ie&&!N?.includes(fe))return!0;return!1}_getMapTouches(y){let N=[];for(let ie of y)this._el.contains(ie.target)&&N.push(ie);return N}mergeHandlerResult(y,N,ie,fe,be){if(!ie)return;e.e(y,ie);let Re={handlerName:fe,originalEvent:ie.originalEvent||be};ie.zoomDelta!==void 0&&(N.zoom=Re),ie.panDelta!==void 0&&(N.drag=Re),ie.rollDelta!==void 0&&(N.roll=Re),ie.pitchDelta!==void 0&&(N.pitch=Re),ie.bearingDelta!==void 0&&(N.rotate=Re)}_applyChanges(){let y={},N={},ie={};for(let[fe,be,Re]of this._changes)fe.panDelta&&(y.panDelta=(y.panDelta||new e.P(0,0))._add(fe.panDelta)),fe.zoomDelta&&(y.zoomDelta=(y.zoomDelta||0)+fe.zoomDelta),fe.bearingDelta&&(y.bearingDelta=(y.bearingDelta||0)+fe.bearingDelta),fe.pitchDelta&&(y.pitchDelta=(y.pitchDelta||0)+fe.pitchDelta),fe.rollDelta&&(y.rollDelta=(y.rollDelta||0)+fe.rollDelta),fe.around!==void 0&&(y.around=fe.around),fe.pinchAround!==void 0&&(y.pinchAround=fe.pinchAround),fe.noInertia&&(y.noInertia=fe.noInertia),e.e(N,be),e.e(ie,Re);this._updateMapTransform(y,N,ie),this._changes=[]}_updateMapTransform(y,N,ie){let fe=this._map,be=fe._getTransformForUpdate(),Re=fe.terrain;if(!(tu(y)||Re&&this._terrainMovement))return void this._fireEvents(N,ie,!0);fe._stop(!0);let{panDelta:je,zoomDelta:Ze,bearingDelta:ut,pitchDelta:ft,rollDelta:Dt,around:Gt,pinchAround:Kt}=y;Kt!==void 0&&(Gt=Kt),Gt||(Gt=fe.transform.centerPoint),Re&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let st={panDelta:je,zoomDelta:Ze,rollDelta:Dt,pitchDelta:ft,bearingDelta:ut,around:Gt};this._map.cameraHelper.useGlobeControls&&!be.isPointOnMapSurface(Gt)&&(Gt=be.centerPoint);let It=Gt.distSqr(be.centerPoint)<.01?be.center:be.screenPointToLocation(je?Gt.sub(je):Gt);this._handleMapControls({terrain:Re,tr:be,deltasForHelper:st,preZoomAroundLoc:It,combinedEventsInProgress:N,panDelta:je}),fe._applyUpdatedTransform(be),this._map._update(),y.noInertia||this._inertia.record(y),this._fireEvents(N,ie,!0)}_handleMapControls({terrain:y,tr:N,deltasForHelper:ie,preZoomAroundLoc:fe,combinedEventsInProgress:be,panDelta:Re}){let je=this._map.cameraHelper;if(je.handleMapControlsRollPitchBearingZoom(ie,N),y)return je.useGlobeControls?(this._terrainMovement||!be.drag&&!be.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void je.handleMapControlsPan(ie,N,fe)):this._terrainMovement||!be.drag&&!be.zoom?void(be.drag&&this._terrainMovement&&Re?N.setCenter(N.screenPointToLocation(N.centerPoint.sub(Re))):je.handleMapControlsPan(ie,N,fe)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void je.handleMapControlsPan(ie,N,fe));je.handleMapControlsPan(ie,N,fe)}_fireEvents(y,N,ie){let fe=sl(this._eventsInProgress),be=sl(y),Re={};for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._eventsInProgress[Dt]||(Re[`${Dt}start`]=Gt),this._eventsInProgress[Dt]=y[Dt]}!fe&&be&&this._fireEvent("movestart",be.originalEvent);for(let Dt in Re)this._fireEvent(Dt,Re[Dt]);be&&this._fireEvent("move",be.originalEvent);for(let Dt in y){let{originalEvent:Gt}=y[Dt];this._fireEvent(Dt,Gt)}let je={},Ze;for(let Dt in this._eventsInProgress){let{handlerName:Gt,originalEvent:Kt}=this._eventsInProgress[Dt];this._handlersById[Gt].isActive()||(delete this._eventsInProgress[Dt],Ze=N[Gt]||Kt,je[`${Dt}end`]=Ze)}for(let Dt in je)this._fireEvent(Dt,je[Dt]);let ut=sl(this._eventsInProgress),ft=(fe||be)&&!ut;if(ft&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Dt=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Dt.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Dt)}if(ie&&ft){this._updatingCamera=!0;let Dt=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),Gt=Kt=>Kt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new sc("renderFrame",{timeStamp:y})),this._applyChanges()})}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class gc extends e.E{constructor(y,N,ie){super(),this._renderFrameCallback=()=>{let fe=Math.min((m()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(fe)),fe<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=y,this._bearingSnap=ie.bearingSnap,this._zoomSnap=ie.zoomSnap,this.cameraHelper=N,this.on("moveend",()=>{delete this._requestedCameraState})}migrateProjection(y,N){y.apply(this.transform,!0),this.transform=y,this.cameraHelper=N}getCenter(){return new e.W(this.transform.center.lng,this.transform.center.lat)}setCenter(y,N){return this.jumpTo({center:y},N)}getCenterElevation(){return this.transform.elevation}setCenterElevation(y,N){return this.jumpTo({elevation:y},N),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(y){this._centerClampedToGround=y}panBy(y,N,ie){return y=e.P.convert(y).mult(-1),this.panTo(this.transform.center,e.e({offset:y},N),ie)}panTo(y,N,ie){return this.easeTo(e.e({center:y},N),ie)}getZoom(){return this.transform.zoom}setZoom(y,N){return this.jumpTo({zoom:y},N),this}zoomTo(y,N,ie){return this.easeTo(e.e({zoom:y},N),ie)}zoomIn(y,N){return this.zoomTo(e.cw(this.getZoom()+1,this._zoomSnap),y,N),this}zoomOut(y,N){return this.zoomTo(e.cw(this.getZoom()-1,this._zoomSnap),y,N),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(y,N){return y!=this.transform.fov&&(this.transform.setFov(y),this.fire(new e.n("movestart",N)).fire(new e.n("move",N)).fire(new e.n("moveend",N))),this}getBearing(){return this.transform.bearing}setZoomSnap(y){return this._zoomSnap=y,this}getZoomSnap(){return this._zoomSnap}setBearing(y,N){return this.jumpTo({bearing:y},N),this}getPadding(){return this.transform.padding}setPadding(y,N){return this.jumpTo({padding:y},N),this}rotateTo(y,N,ie){return this.easeTo(e.e({bearing:y},N),ie)}resetNorth(y,N){return this.rotateTo(0,e.e({duration:1e3},y),N),this}resetNorthPitch(y,N){return this.easeTo(e.e({bearing:0,pitch:0,roll:0,duration:1e3},y),N),this}snapToNorth(y,N){return Math.abs(this.getBearing()){It.easeFunc(Ut),this.terrain&&!y.freezeElevation&&this._updateElevation(Ut),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},Ut=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N,Ut)},y),this}_prepareEase(y,N,ie={}){this._moving=!0,N||ie.moving||this.fire(new e.n("movestart",y)),this._zooming&&!ie.zooming&&this.fire(new e.n("zoomstart",y)),this._rotating&&!ie.rotating&&this.fire(new e.n("rotatestart",y)),this._pitching&&!ie.pitching&&this.fire(new e.n("pitchstart",y)),this._rolling&&!ie.rolling&&this.fire(new e.n("rollstart",y))}_prepareElevation(y){this._elevationCenter=y,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(y,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(y){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let N=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(y<1&&N!==this._elevationTarget){let ie=this._elevationTarget-this._elevationStart;this._elevationStart+=y*(ie-(N-(ie*y+this._elevationStart))/(1-y)),this._elevationTarget=N}this.transform.setElevation(e.H.number(this._elevationStart,this._elevationTarget,y))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(y){if(!this.terrain&&y.elevation>=0&&y.pitch<=90)return{};let N=y.getCameraLngLat(),ie=y.getCameraAltitude(),fe=this.terrain?this.terrain.getElevationForLngLatZoom(N,y.zoom):0;if(iethis._elevateCameraIfInsideTerrain(fe)),this.transformCameraUpdate&&N.push(fe=>this.transformCameraUpdate(fe)),!N.length)return;let ie=y.clone();for(let fe of N){let be=ie.clone(),{center:Re,zoom:je,roll:Ze,pitch:ut,bearing:ft,elevation:Dt}=fe(be);Re&&be.setCenter(Re),Dt!==void 0&&be.setElevation(Dt),je!==void 0&&be.setZoom(je),Ze!==void 0&&be.setRoll(Ze),ut!==void 0&&be.setPitch(ut),ft!==void 0&&be.setBearing(ft),ie.apply(be,!1)}this.transform.apply(ie,!1)}_fireMoveEvents(y){this.fire(new e.n("move",y)),this._zooming&&this.fire(new e.n("zoom",y)),this._rotating&&this.fire(new e.n("rotate",y)),this._pitching&&this.fire(new e.n("pitch",y)),this._rolling&&this.fire(new e.n("roll",y))}_afterEase(y,N){if(this._easeId&&N&&this._easeId===N)return;delete this._easeId;let ie=this._zooming,fe=this._rotating,be=this._pitching,Re=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,ie&&this.fire(new e.n("zoomend",y)),fe&&this.fire(new e.n("rotateend",y)),be&&this.fire(new e.n("pitchend",y)),Re&&this.fire(new e.n("rollend",y)),this.fire(new e.n("moveend",y))}flyTo(y,N){if(!y.essential&&s.prefersReducedMotion){let ua=e.V(y,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(ua,N)}this.stop(),"zoom"in(y=e.e({offset:[0,0],speed:1.2,curve:1.42,easing:e.cy},y))&&this._zoomSnap&&(y.zoom=e.cw(y.zoom,this._zoomSnap));let ie=this._getTransformForUpdate(),fe=ie.bearing,be=ie.pitch,Re=ie.roll,je=ie.padding,Ze="bearing"in y?this._normalizeBearing(y.bearing,fe):fe,ut="pitch"in y?+y.pitch:be,ft="roll"in y?this._normalizeBearing(y.roll,Re):Re,Dt="padding"in y?y.padding:ie.padding,Gt=e.P.convert(y.offset),Kt=ie.centerPoint.add(Gt),st=ie.screenPointToLocation(Kt),It=this.cameraHelper.handleFlyTo(ie,{bearing:Ze,pitch:ut,roll:ft,padding:Dt,locationAtOffset:st,offsetAsPoint:Gt,center:y.center,minZoom:y.minZoom,zoom:y.zoom}),Ut=y.curve,ir=Math.max(ie.width,ie.height),dr=ir/It.scaleOfZoom,Ar=It.pixelPathLength;typeof It.scaleOfMinZoom=="number"&&(Ut=Math.sqrt(ir/It.scaleOfMinZoom/Ar*2));let hr=Ut*Ut;function vr(ua){let ia=(dr*dr-ir*ir+(ua?-1:1)*hr*hr*Ar*Ar)/(2*(ua?dr:ir)*hr*Ar);return Math.log(Math.sqrt(ia*ia+1)-ia)}function Or(ua){return(Math.exp(ua)-Math.exp(-ua))/2}function Cr(ua){return(Math.exp(ua)+Math.exp(-ua))/2}let ta=vr(!1),ka=function(ua){return Cr(ta)/Cr(ta+Ut*ua)},Ta=function(ua){return ir*((Cr(ta)*(Or(ia=ta+Ut*ua)/Cr(ia))-Or(ta))/hr)/Ar;var ia},Ra=(vr(!0)-ta)/Ut;if(Math.abs(Ar)<2e-6||!isFinite(Ra)){if(Math.abs(ir-dr)<1e-6)return this.easeTo(y,N);let ua=dr0,ka=ia=>Math.exp(ua*Ut*ia)}return y.duration="duration"in y?+y.duration:1e3*Ra/("screenSpeed"in y?+y.screenSpeed/Ut:+y.speed),y.maxDuration&&y.duration>y.maxDuration&&(y.duration=0),this._zooming=!0,this._rotating=fe!==Ze,this._pitching=ut!==be,this._rolling=ft!==Re,this._padding=!ie.isPaddingEqual(Dt),this._prepareEase(N,!1),this.terrain&&this._prepareElevation(It.targetCenter),this._ease(ua=>{let ia=ua*Ra,ma=1/ka(ia),da=Ta(ia);this._rotating&&ie.setBearing(e.H.number(fe,Ze,ua)),this._pitching&&ie.setPitch(e.H.number(be,ut,ua)),this._rolling&&ie.setRoll(e.H.number(Re,ft,ua)),this._padding&&(ie.interpolatePadding(je,Dt,ua),Kt=ie.centerPoint.add(Gt)),It.easeFunc(ua,ma,da,Kt),this.terrain&&!y.freezeElevation&&this._updateElevation(ua),this._applyUpdatedTransform(ie),this._fireMoveEvents(N)},()=>{this.terrain&&y.freezeElevation&&this._finalizeElevation(),this._afterEase(N)},y),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(y,N){var ie;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let fe=this._onEaseEnd;delete this._onEaseEnd,fe.call(this,N)}return y||(ie=this.handlers)===null||ie===void 0||ie.stop(!1),this}_ease(y,N,ie){ie.animate===!1||ie.duration===0?(y(1),N()):(this._easeStart=m(),this._easeOptions=ie,this._onEaseFrame=y,this._onEaseEnd=N,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(y,N){y=e.X(y,-180,180);let ie=Math.abs(y-N);return Math.abs(y-360-N)MapLibre
'};class ll{constructor(y=pu){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=N=>{!N||N.sourceDataType!=="metadata"&&N.sourceDataType!=="visibility"&&N.dataType!=="style"&&N.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=y}getDefaultPosition(){return"bottom-right"}onAdd(y){return this._map=y,this._compact=this.options.compact,this._container=g.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=g.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=g.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(y,N){let ie=this._map._getUIString(`AttributionControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)}_updateAttributions(){if(!this._map.style)return;let y=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?y=y.concat(this.options.customAttribution.map(fe=>typeof fe!="string"?"":fe)):typeof this.options.customAttribution=="string"&&y.push(this.options.customAttribution)),this._map.style.stylesheet){let fe=this._map.style.stylesheet;this.styleOwner=fe.owner,this.styleId=fe.id}let N=this._map.style.tileManagers;for(let fe in N){let be=N[fe];if(be.used||be.usedForTerrain){let Re=be.getSource();Re.attribution&&!y.includes(Re.attribution)&&y.push(Re.attribution)}}y=y.filter(fe=>String(fe).trim()),y.sort((fe,be)=>fe.length-be.length),y=y.filter((fe,be)=>{for(let Re=be+1;Re{let N=this._container.children;if(N.length){let ie=N[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&ie.classList.add("maplibregl-compact"):ie.classList.remove("maplibregl-compact")}},this.options=y}getDefaultPosition(){return"bottom-left"}onAdd(y){var N;this._map=y,this._compact=(N=this.options)===null||N===void 0?void 0:N.compact,this._container=g.create("div","maplibregl-ctrl");let ie=g.create("a","maplibregl-ctrl-logo");return ie.target="_blank",ie.rel="noopener nofollow",ie.href="https://maplibre.org/",ie.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),ie.setAttribute("rel","noopener nofollow"),this._container.appendChild(ie),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class de{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(y){let N=++this._id;return this._queue.push({callback:y,id:N,cancelled:!1}),N}remove(y){let N=this._currentlyRunning,ie=N?this._queue.concat(N):this._queue;for(let fe of ie)if(fe.id===y)return void(fe.cancelled=!0)}run(y=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let N=this._currentlyRunning=this._queue;this._queue=[];for(let ie of N)if(!ie.cancelled&&(ie.callback(y),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var Ee=e.aS([{name:"a_pos3d",type:"Int16",components:3}]);class qe extends e.E{constructor(y){super(),this._lastTilesetChange=m(),this.tileManager=y,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=y._source.tileSize*2**this.deltaZoom,y.usedForTerrain=!0,y.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(y,N){this.tileManager.update(y,N),this._renderableTilesKeys=[];let ie={};for(let fe of Je(y,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:N,calculateTileZoom:this.tileManager._source.calculateTileZoom}))ie[fe.key]=!0,this._renderableTilesKeys.push(fe.key),this._tiles[fe.key]||(fe.terrainRttPosMatrix32f=new Float64Array(16),e.c7(fe.terrainRttPosMatrix32f,0,e.a6,e.a6,0,0,1),this._tiles[fe.key]=new Tt(fe,this.tileSize),this._lastTilesetChange=m());for(let fe in this._tiles)ie[fe]||delete this._tiles[fe]}freeRtt(y){for(let N in this._tiles){let ie=this._tiles[N];(!y||ie.tileID.equals(y)||ie.tileID.isChildOf(y)||y.isChildOf(ie.tileID))&&(ie.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map(y=>this.getTileByID(y))}getTileByID(y){return this._tiles[y]}getTerrainCoords(y,N){return N?this._getTerrainCoordsForTileRanges(y,N):this._getTerrainCoordsForRegularTile(y)}_getTerrainCoordsForRegularTile(y){let N={};for(let ie of this._renderableTilesKeys){let fe=this._tiles[ie].tileID,be=y.clone(),Re=e.bj();if(fe.canonical.equals(y.canonical))e.c7(Re,0,e.a6,e.a6,0,0,1);else if(fe.canonical.isChildOf(y.canonical)){let je=fe.canonical.z-y.canonical.z,Ze=fe.canonical.x-(fe.canonical.x>>je<>je<>je;e.c7(Re,0,ft,ft,0,0,1),e.Q(Re,Re,[-Ze*ft,-ut*ft,0])}else{if(!y.canonical.isChildOf(fe.canonical))continue;{let je=y.canonical.z-fe.canonical.z,Ze=y.canonical.x-(y.canonical.x>>je<>je<>je;e.c7(Re,0,e.a6,e.a6,0,0,1),e.Q(Re,Re,[Ze*ft,ut*ft,0]),e.S(Re,Re,[1/2**je,1/2**je,0])}}be.terrainRttPosMatrix32f=new Float32Array(Re),N[ie]=be}return N}_getTerrainCoordsForTileRanges(y,N){let ie={};for(let fe of this._renderableTilesKeys){let be=this._tiles[fe].tileID;if(!this._isWithinTileRanges(be,N))continue;let Re=y.clone(),je=e.bj();if(be.canonical.z===y.canonical.z){let Ze=y.canonical.x-be.canonical.x+y.wrap*(1<y.canonical.z){let Ze=be.canonical.z-y.canonical.z,ut=be.canonical.x-(be.canonical.x>>Ze<>Ze<>Ze),Gt=y.canonical.y-(be.canonical.y>>Ze),Kt=e.a6>>Ze;e.c7(je,0,Kt,Kt,0,0,1),e.Q(je,je,[-ut*Kt+Dt*e.a6,-ft*Kt+Gt*e.a6,0])}else{let Ze=y.canonical.z-be.canonical.z,ut=y.canonical.x-(y.canonical.x>>Ze<>Ze<>Ze)-be.canonical.x,Gt=(y.canonical.y>>Ze)-be.canonical.y,Kt=e.a6<be.maxzoom&&(Re=be.maxzoom),Re=be.minzoom&&!je?.dem;)je=this.findTileInCaches(y.scaledTo(Re--).key);return je}findTileInCaches(y){let N=this.tileManager.getTileByID(y);return N||(N=this.tileManager._outOfViewCache.getByKey(y),N)}anyTilesAfterTime(y=Date.now()){return this._lastTilesetChange>=y}_isWithinTileRanges(y,N){let ie=N[y.canonical.z];return!!ie&&(y.wrap>ie.minWrap||y.wrap=ie.minTileXWrapped&&y.canonical.x<=ie.maxTileXWrapped&&y.canonical.y>=ie.minTileY&&y.canonical.y<=ie.maxTileY)}}class tt{constructor(y,N,ie){this._meshCache={},this.painter=y,this.tileManager=new qe(N),this.options=ie,this.exaggeration=typeof ie.exaggeration=="number"?ie.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let y in this._meshCache)this._meshCache[y].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(y,N,ie,fe=e.a6){var be;let Re=y.normalizeCoordinates(N,ie,fe);if(!Re)return 0;let je=this.getTerrainData(Re.tileID),Ze=(be=je.tile)===null||be===void 0?void 0:be.dem;if(!Ze)return 0;let ut=e.cC([],[Re.x/fe*e.a6,Re.y/fe*e.a6],je.u_terrain_matrix),ft=[ut[0]*Ze.dim,ut[1]*Ze.dim],Dt=Math.floor(ft[0]),Gt=Math.floor(ft[1]),Kt=ft[0]-Dt,st=ft[1]-Gt;return Ze.get(Dt,Gt)*(1-Kt)*(1-st)+Ze.get(Dt+1,Gt)*Kt*(1-st)+Ze.get(Dt,Gt+1)*(1-Kt)*st+Ze.get(Dt+1,Gt+1)*Kt*st}getElevationForLngLatZoom(y,N){if(!e.cD(N,y.wrap()))return 0;let{tileID:ie,mercatorX:fe,mercatorY:be}=this._getOverscaledTileIDFromLngLatZoom(y,N);return this.getElevation(ie,fe%e.a6,be%e.a6,e.a6)}getElevationForLngLat(y,N){let ie=Je(N,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),fe=0;for(let be of ie)be.canonical.z>fe&&(fe=Math.min(be.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(y,fe)}getElevation(y,N,ie,fe=e.a6){return this.getDEMElevation(y,N,ie,fe)*this.exaggeration}getTerrainData(y){var N,ie;if(!this._emptyDemTexture){let Re=this.painter.context,je=new e.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new e.T(Re,je,Re.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new e.T(Re,new e.R({width:1,height:1}),Re.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=e.ap([])}let fe=this.tileManager.getSourceTile(y,!0);if(fe?.dem&&(!fe.demTexture||fe.needsTerrainPrepare)){let Re=this.painter.context;fe.demTexture=this.painter.getTileTexture(fe.dem.stride),fe.demTexture?fe.demTexture.update(fe.dem.getPixels(),{premultiply:!1}):fe.demTexture=new e.T(Re,fe.dem.getPixels(),Re.gl.RGBA,{premultiply:!1}),fe.demTexture.bind(Re.gl.NEAREST,Re.gl.CLAMP_TO_EDGE),fe.needsTerrainPrepare=!1}let be=fe&&fe.toString()+fe.tileID.key+y.key;if(be&&!this._demMatrixCache[be]){let Re=this.tileManager.getSource().maxzoom,je=y.canonical.z-fe.tileID.canonical.z;y.overscaledZ>y.canonical.z&&(y.canonical.z>=Re?je=y.canonical.z-Re:e.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ze=y.canonical.x-(y.canonical.x>>je<>je<>8<<4|be>>8,N[Re+3]=0;let ie=new e.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(N.buffer)),fe=new e.T(y,ie,y.gl.RGBA,{premultiply:!1});return fe.bind(y.gl.NEAREST,y.gl.CLAMP_TO_EDGE),this._coordsTexture=fe,fe}pointCoordinate(y){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let N=new Uint8Array(4),ie=this.painter.context,fe=ie.gl,be=Math.round(y.x*this.painter.pixelRatio/devicePixelRatio),Re=Math.round(y.y*this.painter.pixelRatio/devicePixelRatio),je=Math.round(this.painter.height/devicePixelRatio);ie.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),fe.readPixels(be,je-Re-1,1,1,fe.RGBA,fe.UNSIGNED_BYTE,N),ie.bindFramebuffer.set(null);let Ze=N[0]+(N[2]>>4<<8),ut=N[1]+((15&N[2])<<8),ft=this.coordsIndex[255-N[3]],Dt=ft&&this.tileManager.getTileByID(ft);if(!Dt)return null;let Gt=this._coordsTextureSize,Kt=(1<0,fe=ie&&y.canonical.y===0,be=ie&&y.canonical.y===(1<y.id!==N),this._recentlyUsed.push(y.id)}stampObject(y){y.stamp=++this._stamp}getOrCreateFreeObject(){for(let N of this._recentlyUsed)if(!this._objects[N].inUse)return this._objects[N];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let y=this._createObject(this._objects.length);return this._objects.push(y),y}freeObject(y){y.inUse=!1}freeAllObjects(){for(let y of this._objects)this.freeObject(y)}isFull(){return!(this._objects.length!y.inUse)===!1}}let ct={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class Nt{constructor(y,N){this.painter=y,this.terrain=N,this.pool=new at(y.context,30,N.tileManager.tileSize*N.qualityFactor)}destruct(){this.pool.destruct()}getTexture(y){return this.pool.getObjectForId(y.rtt[this._stacks.length-1].id).texture}prepareForRender(y,N){var ie,fe,be;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=y._order.filter(Re=>!y._layers[Re].isHidden(N)),this._coordsAscending={};for(let Re in y.tileManagers){this._coordsAscending[Re]={};let je=y.tileManagers[Re].getVisibleCoordinates(),Ze=y.tileManagers[Re].getSource(),ut=Ze instanceof ke?Ze.terrainTileRanges:null;for(let ft of je){let Dt=this.terrain.tileManager.getTerrainCoords(ft,ut);for(let Gt in Dt)(be=this._coordsAscending[Re])[Gt]||(be[Gt]=[]),this._coordsAscending[Re][Gt].push(Dt[Gt])}}this._rttFingerprints={};for(let Re of y._order){let je=y._layers[Re],Ze=je.source;if(ct[je.type]&&!this._rttFingerprints[Ze]){this._rttFingerprints[Ze]={};let ut=(fe=(ie=y.tileManagers[Ze])===null||ie===void 0?void 0:ie.getState().revision)!==null&&fe!==void 0?fe:0;for(let ft in this._coordsAscending[Ze])this._rttFingerprints[Ze][ft]=`${this._coordsAscending[Ze][ft].map(Dt=>Dt.key).sort().join()}#${ut}`}}for(let Re of this._renderableTiles)for(let je in this._rttFingerprints){let Ze=this._rttFingerprints[je][Re.tileID.key];Ze&&Ze!==Re.rttFingerprint[je]&&(Re.rtt=[])}}renderLayer(y,N){if(y.isHidden(this.painter.transform.zoom))return!1;let ie=Object.assign(Object.assign({},N),{isRenderingToTexture:!0}),fe=y.type,be=this.painter,Re=this._renderableLayerIds[this._renderableLayerIds.length-1]===y.id;if(ct[fe]&&(this._prevType&&ct[this._prevType]||this._stacks.push([]),this._prevType=fe,this._stacks[this._stacks.length-1].push(y.id),!Re))return!0;if(ct[this._prevType]||ct[fe]&&Re){this._prevType=fe;let je=this._stacks.length-1,Ze=this._stacks[je]||[];for(let ut of this._renderableTiles){if(this.pool.isFull()&&(Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(ut),ut.rtt[je]){let Dt=this.pool.getObjectForId(ut.rtt[je].id);if(Dt.stamp===ut.rtt[je].stamp){this.pool.useObject(Dt);continue}}let ft=this.pool.getOrCreateFreeObject();this.pool.useObject(ft),this.pool.stampObject(ft),ut.rtt[je]={id:ft.id,stamp:ft.stamp},be.context.bindFramebuffer.set(ft.fbo.framebuffer),be.context.clear({color:e.bo.transparent,stencil:0}),be.currentStencilSource=void 0;for(let Dt of Ze){let Gt=be.style._layers[Dt],Kt=Gt.source?this._coordsAscending[Gt.source][ut.tileID.key]:[ut.tileID];be.context.viewport.set([0,0,ft.fbo.width,ft.fbo.height]),be._renderTileClippingMasks(Gt,Kt,!0),be.renderLayer(be,be.style.tileManagers[Gt.source],Gt,Kt,ie),Gt.source&&(ut.rttFingerprint[Gt.source]=this._rttFingerprints[Gt.source][ut.tileID.key])}}return Gu(this.painter,this.terrain,this._rttTiles,ie),this._rttTiles=[],this.pool.freeAllObjects(),ct[fe]}return!1}}let St={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},Jt=t,mr={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:pu,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:e.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},gr=class extends gc{get _ownerWindow(){var pe,y;return((y=(pe=this._container)===null||pe===void 0?void 0:pe.ownerDocument)===null||y===void 0?void 0:y.defaultView)||window}constructor(pe){var y,N,ie;let fe=Object.assign(Object.assign(Object.assign({},mr),pe),{canvasContextAttributes:Object.assign(Object.assign({},mr.canvasContextAttributes),pe.canvasContextAttributes)});if(fe.minZoom!=null&&fe.maxZoom!=null&&fe.minZoom>fe.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(fe.minPitch!=null&&fe.maxPitch!=null&&fe.minPitch>fe.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(fe.minPitch!=null&&fe.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(fe.maxPitch!=null&&fe.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let be=new Eo,Re=new Wo;fe.minZoom!==void 0&&be.setMinZoom(fe.minZoom),fe.maxZoom!==void 0&&be.setMaxZoom(fe.maxZoom),fe.minPitch!==void 0&&be.setMinPitch(fe.minPitch),fe.maxPitch!==void 0&&be.setMaxPitch(fe.maxPitch),fe.renderWorldCopies!==void 0&&be.setRenderWorldCopies(fe.renderWorldCopies),fe.transformConstrain!==null&&be.setConstrainOverride(fe.transformConstrain),super(be,Re,{bearingSnap:fe.bearingSnap,zoomSnap:fe.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new de,this._controls=[],this._mapId=e.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ze=>{if(Ze.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let ut of Object.values(this.style._layers))if(ut.type==="custom"&&console.warn(`Custom layer with id '${ut.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),ut._listeners)for(let[ft]of Object.entries(ut._listeners))console.warn(`Custom layer with id '${ut.id}' had event listeners for event '${ft}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))}else this.fire(new e.n("webglcontextlost",{originalEvent:Ze}))},this._contextRestored=Ze=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new e.n("webglcontextrestored",{originalEvent:Ze}))},this._onMapScroll=Ze=>{if(Ze.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=fe.interactive,this._maxTileCacheSize=fe.maxTileCacheSize,this._maxTileCacheZoomLevels=fe.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},fe.canvasContextAttributes),this._trackResize=fe.trackResize===!0,this._bearingSnap=fe.bearingSnap,this._zoomSnap=fe.zoomSnap,this._centerClampedToGround=fe.centerClampedToGround,this._refreshExpiredTiles=fe.refreshExpiredTiles===!0,this._fadeDuration=fe.fadeDuration,this._crossSourceCollisions=fe.crossSourceCollisions===!0,this._collectResourceTiming=fe.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},St),fe.locale),this._clickTolerance=fe.clickTolerance,this._overridePixelRatio=fe.pixelRatio,this._maxCanvasSize=fe.maxCanvasSize,this._zoomLevelsToOverscale=fe.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=fe.transformCameraUpdate,this.transformConstrain=fe.transformConstrain,this.cancelPendingTileRequestsWhileZooming=fe.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(fe.anisotropicFilterPitch),fe.reduceMotion!==void 0&&(s.prefersReducedMotion=fe.reduceMotion),this._imageQueueHandle=v.addThrottleControl(()=>this.isMoving()),this._requestManager=new i(fe.transformRequest),this._container=this._resolveContainer(fe.container),fe.maxBounds&&this.setMaxBounds(fe.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",()=>this._update(!1)),this.on("moveend",()=>this._update(!1)),this.on("zoom",()=>this._update(!0)),this.on("terrain",()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)}),this.once("idle",()=>this._idleTriggered=!0),typeof window<"u"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new Ps(this,fe),this._hash=fe.hash?new Jc(typeof fe.hash=="string"&&fe.hash||void 0).addTo(this):void 0,!((y=this._hash)===null||y===void 0)&&y._onHashChange()||(this.jumpTo({center:fe.center,elevation:fe.elevation,zoom:fe.zoom,bearing:fe.bearing,pitch:fe.pitch,roll:fe.roll}),fe.bounds&&(this.resize(),this.fitBounds(fe.bounds,e.e({},fe.fitBoundsOptions,{duration:0}))));let je=typeof fe.style=="string"||((ie=(N=fe.style)===null||N===void 0?void 0:N.projection)===null||ie===void 0?void 0:ie.type)!=="globe";this.resize(null,je),this._localIdeographFontFamily=fe.localIdeographFontFamily,this._validateStyle=fe.validateStyle,fe.style&&this.setStyle(fe.style,{localIdeographFontFamily:fe.localIdeographFontFamily}),fe.attributionControl&&this.addControl(new ll(typeof fe.attributionControl=="boolean"?void 0:fe.attributionControl)),fe.maplibreLogo&&this.addControl(new ef,fe.logoPosition),this.on("style.load",()=>{if(je||this._resizeTransform(),this.transform.unmodified){let Ze=e.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ze)}}),this.on("data",Ze=>{this._update(Ze.dataType==="style"),this.fire(new e.n(`${Ze.dataType}data`,Ze))}),this.on("dataloading",Ze=>{this.fire(new e.n(`${Ze.dataType}dataloading`,Ze))}),this.on("dataabort",Ze=>{this.fire(new e.n("sourcedataabort",Ze))})}_getMapId(){return this._mapId}setGlobalStateProperty(pe,y){return this.style.setGlobalStateProperty(pe,y),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(pe,y){if(y===void 0&&(y=pe.getDefaultPosition?pe.getDefaultPosition():"top-right"),!pe?.onAdd)return this.fire(new e.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let N=pe.onAdd(this);this._controls.push(pe);let ie=this._controlPositions[y];return y.includes("bottom")?ie.insertBefore(N,ie.firstChild):ie.appendChild(N),this}removeControl(pe){if(!pe?.onRemove)return this.fire(new e.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let y=this._controls.indexOf(pe);return y>-1&&this._controls.splice(y,1),pe.onRemove(this),this}hasControl(pe){return this._controls.includes(pe)}coveringTiles(pe){return Je(this.transform,pe)}calculateCameraOptionsFromTo(pe,y,N,ie){return ie==null&&this.terrain&&(ie=this.terrain.getElevationForLngLat(N,this.transform)),super.calculateCameraOptionsFromTo(pe,y,N,ie)}resize(pe,y=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(y);let N=!this._moving;return N&&(this.stop(),this.fire(new e.n("movestart",pe)).fire(new e.n("move",pe))),this.fire(new e.n("resize",pe)),N&&this.fire(new e.n("moveend",pe)),this}_resizeInternal(pe=!0){let[y,N]=this._containerDimensions(),ie=this._getClampedPixelRatio(y,N);if(this._resizeCanvas(y,N,ie),this.painter.resize(y,N,ie),this.painter.overLimit()){let fe=this.painter.context.gl;this._maxCanvasSize=[fe.drawingBufferWidth,fe.drawingBufferHeight];let be=this._getClampedPixelRatio(y,N);this._resizeCanvas(y,N,be),this.painter.resize(y,N,be)}this._resizeTransform(pe)}_resizeTransform(pe=!0){var y;let[N,ie]=this._containerDimensions();this.transform.resize(N,ie,pe),(y=this._requestedCameraState)===null||y===void 0||y.resize(N,ie,pe)}_getClampedPixelRatio(pe,y){let{0:N,1:ie}=this._maxCanvasSize,fe=this.getPixelRatio(),be=pe*fe,Re=y*fe;return Math.min(be>N?N/be:1,Re>ie?ie/Re:1)*fe}getPixelRatio(){var pe;return(pe=this._overridePixelRatio)!==null&&pe!==void 0?pe:devicePixelRatio}setPixelRatio(pe){this._overridePixelRatio=pe,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(pe){return this.transform.setMaxBounds(q.convert(pe)),this._update()}setMinZoom(pe){if((pe=pe??-2)>=-2&&pe<=this.transform.maxZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMinZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(pe){if((pe=pe??22)>=this.transform.minZoom){let y=this.transform.zoom,N=this._getTransformForUpdate();return N.setMaxZoom(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.zoom&&this.fire(new e.n("zoomstart")).fire(new e.n("zoom")).fire(new e.n("zoomend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(pe){if((pe=pe??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(pe>=0&&pe<=this.transform.maxPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMinPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(pe){if((pe=pe??60)>180)throw new Error("maxPitch must be less than or equal to 180");if(pe>=this.transform.minPitch){let y=this.transform.pitch,N=this._getTransformForUpdate();return N.setMaxPitch(pe),this._applyUpdatedTransform(N),this._update(),y!==this.transform.pitch&&this.fire(new e.n("pitchstart")).fire(new e.n("pitch")).fire(new e.n("pitchend")).fire(new e.n("movestart")).fire(new e.n("move")).fire(new e.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(pe){if((pe=pe??20)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(pe<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=pe,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(pe){return this.transform.setRenderWorldCopies(pe),this._update()}setTransformConstrain(pe){return this.transform.setConstrainOverride(pe),this._update()}project(pe){return this.transform.locationToScreenPoint(e.W.convert(pe),this.style&&this.terrain)}unproject(pe){return this.transform.screenPointToLocation(e.P.convert(pe),this.terrain)}isMoving(){var pe;return this._moving||((pe=this.handlers)===null||pe===void 0?void 0:pe.isMoving())}isZooming(){var pe;return this._zooming||((pe=this.handlers)===null||pe===void 0?void 0:pe.isZooming())}isRotating(){var pe;return this._rotating||((pe=this.handlers)===null||pe===void 0?void 0:pe.isRotating())}_createDelegatedListener(pe,y,N){if(pe==="mouseenter"||pe==="mouseover"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:be=>{let Re=y.filter(Ze=>this.getLayer(Ze)),je=Re.length!==0?this.queryRenderedFeatures(be.point,{layers:Re}):[];je.length?ie||(ie=!0,N.call(this,new Bl(pe,this,be.originalEvent,{features:je}))):ie=!1},mouseout:()=>{ie=!1}}}}if(pe==="mouseleave"||pe==="mouseout"){let ie=!1;return{layers:y,listener:N,delegates:{mousemove:Re=>{let je=y.filter(Ze=>this.getLayer(Ze));(je.length!==0?this.queryRenderedFeatures(Re.point,{layers:je}):[]).length?ie=!0:ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))},mouseout:Re=>{ie&&(ie=!1,N.call(this,new Bl(pe,this,Re.originalEvent)))}}}}{let ie=fe=>{let be=y.filter(je=>this.getLayer(je)),Re=be.length!==0?this.queryRenderedFeatures(fe.point,{layers:be}):[];Re.length&&(fe.features=Re,N.call(this,fe),delete fe.features)};return{layers:y,listener:N,delegates:{[pe]:ie}}}}_saveDelegatedListener(pe,y){var N;this._delegatedListeners||(this._delegatedListeners={}),(N=this._delegatedListeners)[pe]||(N[pe]=[]),this._delegatedListeners[pe].push(y)}_removeDelegatedListener(pe,y,N){var ie;if(!(!((ie=this._delegatedListeners)===null||ie===void 0)&&ie[pe]))return;let fe=this._delegatedListeners[pe];for(let be=0;bey.includes(je))){for(let je in Re.delegates)this.off(je,Re.delegates[je]);return void fe.splice(be,1)}}}on(pe,y,N){if(N===void 0)return super.on(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.on(be,fe.delegates[be]);return{unsubscribe:()=>{this._removeDelegatedListener(pe,ie,N)}}}once(pe,y,N){if(N===void 0)return super.once(pe,y);let ie=typeof y=="string"?[y]:y,fe=this._createDelegatedListener(pe,ie,N);for(let be in fe.delegates){let Re=fe.delegates[be];fe.delegates[be]=(...je)=>{this._removeDelegatedListener(pe,ie,N),Re(...je)}}this._saveDelegatedListener(pe,fe);for(let be in fe.delegates)this.once(be,fe.delegates[be]);return this}off(pe,y,N){return N===void 0?super.off(pe,y):(this._removeDelegatedListener(pe,typeof y=="string"?[y]:y,N),this)}queryRenderedFeatures(pe,y){if(!this.style)return[];let N,ie=pe instanceof e.P||Array.isArray(pe),fe=ie?pe:[[0,0],[this.transform.width,this.transform.height]];if(y||(y=(ie?{}:pe)||{}),fe instanceof e.P||typeof fe[0]=="number")N=[e.P.convert(fe)];else{let be=e.P.convert(fe[0]),Re=e.P.convert(fe[1]);N=[be,new e.P(Re.x,be.y),Re,new e.P(be.x,Re.y),be]}return this.style.queryRenderedFeatures(N,y,this.transform)}querySourceFeatures(pe,y){return this.style.querySourceFeatures(pe,y)}setStyle(pe,y){return(y=e.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},y)).diff!==!1&&y.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&pe?(this._diffStyle(pe,y),this):(this._localIdeographFontFamily=y.localIdeographFontFamily,this._updateStyle(pe,y))}setTransformRequest(pe){return this._requestManager.setTransformRequest(pe),this}_getUIString(pe){let y=this._locale[pe];if(y==null)throw new Error(`Missing UI string '${pe}'`);return y}_updateStyle(pe,y){var N,ie,fe;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),this._diffStyleRequest=null,y.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",()=>this._updateStyle(pe,y));let be=this.style&&y.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!pe)),pe?(this.style=new Ku(this,y||{}),this.style.setEventedParent(this,{style:this.style}),typeof pe=="string"?this.style.loadURL(pe,y,be):this.style.loadJSON(pe,y,be),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(fe=(ie=this.style)===null||ie===void 0?void 0:ie.projection)===null||fe===void 0||fe.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Ku(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(pe,y){return e._(this,void 0,void 0,function*(){var N;if((N=this._diffStyleRequest)===null||N===void 0||N.abort(),typeof pe=="string"){let ie=pe;this._diffStyleRequest=new AbortController;let fe=this._diffStyleRequest;try{let be=yield this._requestManager.transformRequest(ie,"Style");if(fe.signal.aborted)return void(this._diffStyleRequest=null);let Re=yield e.k(be,fe);this._diffStyleRequest=null,this._updateDiff(Re.data,y)}catch(be){this._diffStyleRequest=null,e.$(be)||this.fire(new e.l(e.d(be)))}}else typeof pe=="object"&&(this._diffStyleRequest=null,this._updateDiff(pe,y))})}_updateDiff(pe,y){try{this.style.setState(pe,y)&&this._update(!0)}catch(N){e.w(`Unable to perform style diff: ${e.d(N).message}. Rebuilding the style from scratch.`),this._updateStyle(pe,y)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();e.w("There is no style added to the map.")}addSource(pe,y){return this._lazyInitEmptyStyle(),this.style.addSource(pe,y),this._update(!0)}isSourceLoaded(pe){var y;let N=(y=this.style)===null||y===void 0?void 0:y.tileManagers[pe];if(N!==void 0)return N.loaded();this.fire(new e.l(new Error(`There is no tile manager with ID '${pe}'`)))}setTerrain(pe){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),pe){let y=this.style.tileManagers[pe.source];if(!y)throw new Error(`cannot load terrain, because there exists no source with ID: ${pe.source}`);this.terrain===null&&y.reload();for(let N in this.style._layers){let ie=this.style._layers[N];ie.type==="hillshade"&&ie.source===pe.source&&e.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),ie.type==="color-relief"&&ie.source===pe.source&&e.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new tt(this.painter,y,pe),this.painter.renderToTexture=new Nt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=N=>{var ie;N.dataType==="style"?this.terrain.tileManager.freeRtt():N.dataType==="source"&&N.tile&&(N.sourceId!==pe.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((ie=N.source)===null||ie===void 0?void 0:ie.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(N.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new e.n("terrain",{terrain:pe})),this}getTerrain(){var pe,y;return(y=(pe=this.terrain)===null||pe===void 0?void 0:pe.options)!==null&&y!==void 0?y:null}areTilesLoaded(){var pe;let y=(pe=this.style)===null||pe===void 0?void 0:pe.tileManagers;for(let N of Object.values(y))if(!N.areTilesLoaded())return!1;return!0}removeSource(pe){return this.style.removeSource(pe),this._update(!0)}getSource(pe){return this.style.getSource(pe)}setSourceTileLodParams(pe,y,N){if(N){let ie=this.getSource(N);if(!ie)throw new Error(`There is no source with ID "${N}", cannot set LOD parameters`);ie.calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y))}else for(let ie in this.style.tileManagers)this.style.tileManagers[ie].getSource().calculateTileZoom=Ne(Math.max(1,pe),Math.max(1,y));return this._update(!0),this}refreshTiles(pe,y){let N=this.style.tileManagers[pe];if(!N)throw new Error(`There is no tile manager with ID "${pe}", cannot refresh tile`);y===void 0?N.reload(!0):N.refreshTiles(y.map(ie=>new e.aa(ie.z,ie.x,ie.y)))}addImage(pe,y,N={}){let{pixelRatio:ie=1,sdf:fe=!1,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut}=N;if(this._lazyInitEmptyStyle(),!(y instanceof HTMLImageElement||e.b(y))){if(y.width===void 0||y.height===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:ft,height:Dt,data:Gt}=y,Kt=y;return this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},new Uint8Array(Gt)),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0,userImage:Kt}),Kt.onAdd&&Kt.onAdd(this,pe),this}}{let{width:ft,height:Dt,data:Gt}=s.getImageData(y);this.style.addImage(pe,{data:new e.R({width:ft,height:Dt},Gt),pixelRatio:ie,stretchX:be,stretchY:Re,content:je,textFitWidth:Ze,textFitHeight:ut,sdf:fe,version:0})}}updateImage(pe,y){let N=this.style.getImage(pe);if(!N)return this.fire(new e.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let ie=y instanceof HTMLImageElement||e.b(y)?s.getImageData(y):y,{width:fe,height:be,data:Re}=ie;if(fe===void 0||be===void 0)return this.fire(new e.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(fe!==N.data.width||be!==N.data.height)return this.fire(new e.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let je=!(y instanceof HTMLImageElement||e.b(y));return N.data.replace(Re,je),this.style.updateImage(pe,N),this}getImage(pe){return this.style.getImage(pe)}hasImage(pe){return pe?!!this.style.getImage(pe):(this.fire(new e.l(new Error("Missing required image id"))),!1)}removeImage(pe){this.style.removeImage(pe)}loadImage(pe){return e._(this,void 0,void 0,function*(){return v.getImage(yield this._requestManager.transformRequest(pe,"Image"),new AbortController)})}listImages(){return this.style.listImages()}addLayer(pe,y){return this._lazyInitEmptyStyle(),this.style.addLayer(pe,y),this._update(!0)}moveLayer(pe,y){return this.style.moveLayer(pe,y),this._update(!0)}removeLayer(pe){return this.style.removeLayer(pe),this._update(!0)}getLayer(pe){return this.style.getLayer(pe)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(pe,y,N){return this.style.setLayerZoomRange(pe,y,N),this._update(!0)}setFilter(pe,y,N={}){return this.style.setFilter(pe,y,N),this._update(!0)}getFilter(pe){return this.style.getFilter(pe)}setPaintProperty(pe,y,N,ie={}){return this.style.setPaintProperty(pe,y,N,ie),this._update(!0)}getPaintProperty(pe,y){return this.style.getPaintProperty(pe,y)}setLayoutProperty(pe,y,N,ie={}){return this.style.setLayoutProperty(pe,y,N,ie),this._update(!0)}getLayoutProperty(pe,y){return this.style.getLayoutProperty(pe,y)}setGlyphs(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(pe,y),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(pe,y,N={}){return this._lazyInitEmptyStyle(),this.style.addSprite(pe,y,N,ie=>{ie||this._update(!0)}),this}removeSprite(pe){return this._lazyInitEmptyStyle(),this.style.removeSprite(pe),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSprite(pe,y,N=>{N||this._update(!0)}),this}setLight(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setLight(pe,y),this._update(!0)}getLight(){return this.style.getLight()}setSky(pe,y={}){return this._lazyInitEmptyStyle(),this.style.setSky(pe,y),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(pe,y){return this.style.setFeatureState(pe,y),this._update()}removeFeatureState(pe,y){return this.style.removeFeatureState(pe,y),this._update()}getFeatureState(pe){return this.style.getFeatureState(pe)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let pe=0,y=0;return this._container&&(pe=this._container.clientWidth||400,y=this._container.clientHeight||300),[pe,y]}_setupResizeObserver(){var pe;let y=!1,N=mc(fe=>{this._trackResize&&!this._removed&&(this.resize(fe),this.redraw())},50),ie=(pe=this._ownerWindow.ResizeObserver)!==null&&pe!==void 0?pe:ResizeObserver;this._resizeObserver=new ie(fe=>{y?N(fe):y=!0}),this._resizeObserver.observe(this._container)}_resolveContainer(pe){if(typeof pe=="string"){let y=document.getElementById(pe);if(!y)throw new Error(`Container '${pe}' not found.`);return y}if(pe instanceof HTMLElement||pe&&typeof pe=="object"&&pe.nodeType===1)return pe;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let pe=this._container;pe.classList.add("maplibregl-map");let y=this._canvasContainer=g.create("div","maplibregl-canvas-container",pe);this._interactive&&y.classList.add("maplibregl-interactive"),this._canvas=g.create("canvas","maplibregl-canvas",y),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let N=this._containerDimensions(),ie=this._getClampedPixelRatio(N[0],N[1]);this._resizeCanvas(N[0],N[1],ie);let fe=this._controlContainer=g.create("div","maplibregl-control-container",pe),be=this._controlPositions={};for(let Re of["top-left","top-right","bottom-left","bottom-right"])be[Re]=g.create("div",`maplibregl-ctrl-${Re} `,fe);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(pe,y,N){this._canvas.width=Math.floor(N*pe),this._canvas.height=Math.floor(N*y),this._canvas.style.width=`${pe}px`,this._canvas.style.height=`${y}px`}_setupPainter(){let pe=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),y=null;this._canvas.addEventListener("webglcontextcreationerror",ie=>{y={requestedAttributes:pe},ie&&(y.statusMessage=ie.statusMessage,y.type=ie.type)},{once:!0});let N=null;if(N=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,pe):this._canvas.getContext("webgl2",pe)||this._canvas.getContext("webgl",pe),!N){let ie="Failed to initialize WebGL";throw y?(y.message=ie,new Error(JSON.stringify(y))):new Error(ie)}this.painter=new Su(N,this.transform)}migrateProjection(pe,y){super.migrateProjection(pe,y),this.painter.transform=pe,this.fire(new e.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(pe){var y;return!((y=this.style)===null||y===void 0)&&y._loaded?(this._styleDirty||(this._styleDirty=pe),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(pe){return this._update(),this._renderTaskQueue.add(pe)}_cancelRenderFrame(pe){this._renderTaskQueue.remove(pe)}_render(pe){var y,N,ie,fe,be,Re;let je=this._idleTriggered?this._fadeDuration:0,Ze=((y=this.style.projection)===null||y===void 0?void 0:y.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(pe),this._removed)return;let ut=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let Gt=this.transform.zoom,Kt=m();this.style.zoomHistory.update(Gt,Kt);let st=new e.J(Gt,{now:Kt,fadeDuration:je,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),It=st.crossFadingFactor();It===1&&It===this._crossFadingFactor||(ut=!0,this._crossFadingFactor=It),this.style.update(st)}let ft=((N=this.style.projection)===null||N===void 0?void 0:N.transitionState)>0!==Ze;(ie=this.style.projection)===null||ie===void 0||ie.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((fe=this.style.projection)===null||fe===void 0?void 0:fe.transitionState,(be=this.style.projection)===null||be===void 0?void 0:be.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||ft)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(Re=this.style)===null||Re===void 0?void 0:Re._updatePlacement(this.transform,this.showCollisionBoxes,je,this._crossSourceCollisions,ft),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:je,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new e.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new e.n("load"))),this.style&&(this.style.hasTransitions()||ut)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Dt=this._sourcesDirty||this._styleDirty||this._placementDirty;return Dt||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new e.n("idle")),!this._loaded||this._fullyLoaded||Dt||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var pe,y;this._hash&&this._hash.remove();for(let ie of this._controls)ie.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(pe=this._diffStyleRequest)===null||pe===void 0||pe.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window<"u"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),v.removeThrottleControl(this._imageQueueHandle),(y=this._resizeObserver)===null||y===void 0||y.disconnect();let N=this.painter.context.gl.getExtension("WEBGL_lose_context");N?.loseContext&&N.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new e.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,s.frame(this._frameRequest,pe=>{this._frameRequest=null;try{this._render(pe)}catch(y){if(!e.$(y)&&!function(N){return N.message===vc}(y))throw y}},()=>{},this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(pe){this._showTileBoundaries!==pe&&(this._showTileBoundaries=pe,this._update())}get showPadding(){return!!this._showPadding}set showPadding(pe){this._showPadding!==pe&&(this._showPadding=pe,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(pe){this._showCollisionBoxes!==pe&&(this._showCollisionBoxes=pe,pe?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(pe){this._showOverdrawInspector!==pe&&(this._showOverdrawInspector=pe,this._update())}get repaint(){return!!this._repaint}set repaint(pe){this._repaint!==pe&&(this._repaint=pe,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(pe){this._vertices=pe,this._update()}get version(){return Jt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(pe){return this._lazyInitEmptyStyle(),this.style.setProjection(pe),this._update(!0)}},Hr={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class Vr{constructor(y,N,ie=!1){this.mousedown=be=>{this.startMove(be,g.mousePos(this.element,be)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=be=>{this.move(be,g.mousePos(this.element,be))},this.mouseup=be=>{this._rotatePitchHandler.dragEnd(be),this.offTemp()},this.touchstart=be=>{be.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.startMove(be,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=be=>{be.targetTouches.length!==1?this.reset():(this._lastPos=g.touchPos(this.element,be.targetTouches)[0],this.move(be,this._lastPos))},this.touchend=be=>{be.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=N;let fe=new Br;this._rotatePitchHandler=new mt({clickTolerance:3,move:(be,Re)=>{let je=N.getBoundingClientRect(),Ze=new e.P((je.bottom-je.top)/2,(je.right-je.left)/2);return{bearingDelta:e.cx(new e.P(be.x,Re.y),Re,Ze),pitchDelta:ie?-.5*(Re.y-be.y):void 0}},moveStateManager:fe,enable:!0,assignEvents:()=>{}}),this.map=y,N.addEventListener("mousedown",this.mousedown),N.addEventListener("touchstart",this.touchstart,{passive:!1}),N.addEventListener("touchcancel",this.reset)}startMove(y,N){this._rotatePitchHandler.dragStart(y,N),g.disableDrag()}move(y,N){let ie=this.map,{bearingDelta:fe,pitchDelta:be}=this._rotatePitchHandler.dragMove(y,N)||{};fe&&ie.setBearing(ie.getBearing()+fe),be&&ie.setPitch(ie.getPitch()+be)}off(){let y=this.element;y.removeEventListener("mousedown",this.mousedown),y.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),y.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){g.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let ca;function Aa(pe,y,N,ie=!1){if(ie||!N.getCoveringTilesDetailsProvider().allowWorldCopies())return pe?.wrap();let fe=new e.W(pe.lng,pe.lat);if(pe=new e.W(pe.lng,pe.lat),y){let be=new e.W(pe.lng-360,pe.lat),Re=new e.W(pe.lng+360,pe.lat),je=N.locationToScreenPoint(pe).distSqr(y);N.locationToScreenPoint(be).distSqr(y)180;){let be=N.locationToScreenPoint(pe);if(be.x>=0&&be.y>=0&&be.x<=N.width&&be.y<=N.height)break;pe.lng>N.center.lng?pe.lng-=360:pe.lng+=360}return pe.lng!==fe.lng&&N.isPointOnMapSurface(N.locationToScreenPoint(pe))?pe:fe}let Yr={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 oa(pe,y,N){let ie=pe.classList;for(let fe in Yr)ie.remove(`maplibregl-${N}-anchor-${fe}`);ie.add(`maplibregl-${N}-anchor-${y}`)}class fa extends e.E{constructor(y){if(super(),this._onClick=N=>{this.fire(new e.n("click",{originalEvent:N}))},this._onKeyPress=N=>{N.code!=="Space"&&N.code!=="Enter"||this.togglePopup()},this._onMapClick=N=>{let ie=N.originalEvent.target,fe=this._element;this._popup&&(ie===fe||fe.contains(ie))&&this.togglePopup()},this._update=N=>{if(!this._map)return;let ie=this._map.loaded()&&!this._map.isMoving();(N?.type==="terrain"||N?.type==="render"&&!ie)&&this._map.once("render",this._update),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let fe="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?fe=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(fe=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let be="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?be="rotateX(0deg)":this._pitchAlignment==="map"&&(be=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||N&&N.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${Yr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${be} ${fe}`,s.frameAsync(new AbortController,this._map._ownerWindow).then(()=>{this._updateOpacity(N?.type==="moveend")}).catch(()=>{})},this._onMove=N=>{if(!this._isDragging){let ie=this._clickTolerance||this._map._clickTolerance;this._isDragging=N.point.dist(this._pointerdownPos)>=ie}this._isDragging&&(this._pos=N.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new e.n("dragstart"))),this.fire(new e.n("drag")))},this._onUp=()=>{this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new e.n("dragend")),this._state="inactive"},this._addDragHandler=N=>{this._element.contains(N.originalEvent.target)&&(N.preventDefault(),this._positionDelta=N.point.sub(this._pos).add(this._offset),this._pointerdownPos=N.point,this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},this._anchor=y?.anchor||"center",this._color=y?.color||"#3FB1CE",this._scale=y?.scale||1,this._draggable=y?.draggable||!1,this._clickTolerance=y?.clickTolerance||0,this._subpixelPositioning=y?.subpixelPositioning||!1,this._isDragging=!1,this._state="inactive",this._rotation=y?.rotation||0,this._rotationAlignment=y?.rotationAlignment||"auto",this._pitchAlignment=y?.pitchAlignment&&y.pitchAlignment!=="auto"?y.pitchAlignment:this._rotationAlignment,this.setOpacity(y?.opacity,y?.opacityWhenCovered),y?.element)this._element=y.element,this._offset=e.P.convert(y?.offset||[0,0]);else{this._defaultMarker=!0,this._element=g.create("div");let N=g.createNS("http://www.w3.org/2000/svg","svg"),ie=41,fe=27;N.setAttributeNS(null,"display","block"),N.setAttributeNS(null,"height",`${ie}px`),N.setAttributeNS(null,"width",`${fe}px`),N.setAttributeNS(null,"viewBox",`0 0 ${fe} ${ie}`);let be=g.createNS("http://www.w3.org/2000/svg","g");be.setAttributeNS(null,"stroke","none"),be.setAttributeNS(null,"stroke-width","1"),be.setAttributeNS(null,"fill","none"),be.setAttributeNS(null,"fill-rule","evenodd");let Re=g.createNS("http://www.w3.org/2000/svg","g");Re.setAttributeNS(null,"fill-rule","nonzero");let je=g.createNS("http://www.w3.org/2000/svg","g");je.setAttributeNS(null,"transform","translate(3.0, 29.0)"),je.setAttributeNS(null,"fill","#000000");let Ze=[{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"}];for(let ir of Ze){let dr=g.createNS("http://www.w3.org/2000/svg","ellipse");dr.setAttributeNS(null,"opacity","0.04"),dr.setAttributeNS(null,"cx","10.5"),dr.setAttributeNS(null,"cy","5.80029008"),dr.setAttributeNS(null,"rx",ir.rx),dr.setAttributeNS(null,"ry",ir.ry),je.appendChild(dr)}let ut=g.createNS("http://www.w3.org/2000/svg","g");ut.setAttributeNS(null,"fill",this._color);let ft=g.createNS("http://www.w3.org/2000/svg","path");ft.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),ut.appendChild(ft);let Dt=g.createNS("http://www.w3.org/2000/svg","g");Dt.setAttributeNS(null,"opacity","0.25"),Dt.setAttributeNS(null,"fill","#000000");let Gt=g.createNS("http://www.w3.org/2000/svg","path");Gt.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Dt.appendChild(Gt);let Kt=g.createNS("http://www.w3.org/2000/svg","g");Kt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Kt.setAttributeNS(null,"fill","#FFFFFF");let st=g.createNS("http://www.w3.org/2000/svg","g");st.setAttributeNS(null,"transform","translate(8.0, 8.0)");let It=g.createNS("http://www.w3.org/2000/svg","circle");It.setAttributeNS(null,"fill","#000000"),It.setAttributeNS(null,"opacity","0.25"),It.setAttributeNS(null,"cx","5.5"),It.setAttributeNS(null,"cy","5.5"),It.setAttributeNS(null,"r","5.4999962");let Ut=g.createNS("http://www.w3.org/2000/svg","circle");Ut.setAttributeNS(null,"fill","#FFFFFF"),Ut.setAttributeNS(null,"cx","5.5"),Ut.setAttributeNS(null,"cy","5.5"),Ut.setAttributeNS(null,"r","5.4999962"),st.appendChild(It),st.appendChild(Ut),Re.appendChild(je),Re.appendChild(ut),Re.appendChild(Dt),Re.appendChild(Kt),Re.appendChild(st),N.appendChild(Re),N.setAttributeNS(null,"height",ie*this._scale+"px"),N.setAttributeNS(null,"width",fe*this._scale+"px"),this._element.appendChild(N),this._offset=e.P.convert(y?.offset||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",N=>{N.preventDefault()}),this._element.addEventListener("mousedown",N=>{N.preventDefault()}),oa(this._element,this._anchor,"marker"),y?.className)for(let N of y.className.split(" "))this._element.classList.add(N);this._popup=null}addTo(y){return this.remove(),this._map=y,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",y._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),y.getCanvasContainer().appendChild(this._element),y.on("move",this._update),y.on("moveend",this._update),y.on("terrain",this._update),y.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(y){return this._lngLat=e.W.convert(y),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(y){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),y){if(!("offset"in y.options)){let fe=Math.abs(13.5)/Math.SQRT2;y.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[fe,-1*(38.1-13.5+fe)],"bottom-right":[-fe,-1*(38.1-13.5+fe)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=y,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(y){return this._subpixelPositioning=y,this}getPopup(){return this._popup}togglePopup(){let y=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:y?(y.isOpen()?y.remove():(y.setLngLat(this._lngLat),y.addTo(this._map)),this):this}_updateOpacity(y=!1){var N,ie;let fe=(N=this._map)===null||N===void 0?void 0:N.terrain,be=this._map.transform.isLocationOccluded(this._lngLat);if(!fe||be){let Kt=be?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==Kt&&(this._element.style.opacity=Kt,this._element.classList.toggle("maplibregl-marker-covered",be)))}if(y)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout(()=>{this._opacityTimeout=null},100)}let Re=this._map,je=Re.terrain.depthAtPoint(this._pos),Ze=Re.terrain.getElevationForLngLat(this._lngLat,Re.transform);if(Re.transform.lngLatToCameraDepth(this._lngLat,Ze)-je<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let ut=-this._offset.y/Re.transform.pixelsPerMeter,ft=Math.sin(Re.getPitch()*Math.PI/180)*ut,Dt=Re.terrain.depthAtPoint(new e.P(this._pos.x,this._pos.y-this._offset.y)),Gt=Re.transform.lngLatToCameraDepth(this._lngLat,Ze+ft)-Dt>.006;!((ie=this._popup)===null||ie===void 0)&&ie.isOpen()&&Gt&&this._popup.remove(),this._element.style.opacity=Gt?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",Gt)}getOffset(){return this._offset}setOffset(y){return this._offset=e.P.convert(y),this._update(),this}addClassName(y){this._element.classList.add(y)}removeClassName(y){this._element.classList.remove(y)}toggleClassName(y){return this._element.classList.toggle(y)}setDraggable(y){return this._draggable=!!y,this._map&&(y?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(y){return this._rotation=y||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(y){return this._rotationAlignment=y||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(y){return this._pitchAlignment=y&&y!=="auto"?y:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(y,N){return(this._opacity===void 0||y===void 0&&N===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),y!==void 0&&(this._opacity=String(y)),N!==void 0&&(this._opacityWhenCovered=String(N)),this._map&&this._updateOpacity(!0),this}}let Ea={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Ma=0,sa=!1,hn={maxWidth:100,unit:"metric"};function Tn(pe,y,N){let ie=N?.maxWidth||100,fe=pe._container.clientHeight/2,be=pe._container.clientWidth/2,Re=pe.unproject([be-ie/2,fe]),je=pe.unproject([be+ie/2,fe]),Ze=Math.round(pe.project(je).x-pe.project(Re).x),ut=Math.min(ie,Ze,pe._container.clientWidth),ft=Re.distanceTo(je);if(N?.unit==="imperial"){let Dt=3.2808*ft;Dt>5280?zn(y,ut,Dt/5280,pe._getUIString("ScaleControl.Miles")):zn(y,ut,Dt,pe._getUIString("ScaleControl.Feet"))}else N?.unit==="nautical"?zn(y,ut,ft/1852,pe._getUIString("ScaleControl.NauticalMiles")):ft>=1e3?zn(y,ut,ft/1e3,pe._getUIString("ScaleControl.Kilometers")):zn(y,ut,ft,pe._getUIString("ScaleControl.Meters"))}function zn(pe,y,N,ie){let fe=function(be){let Re=Math.pow(10,`${Math.floor(be)}`.length-1),je=be/Re;return je=je>=10?10:je>=5?5:je>=3?3:je>=2?2:je>=1?1:function(Ze){let ut=Math.pow(10,Math.ceil(-Math.log(Ze)/Math.LN10));return Math.round(Ze*ut)/ut}(je),Re*je}(N);pe.style.width=y*(fe/N)+"px",pe.innerHTML=`${fe} ${ie}`}let $n={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},xi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function di(pe){if(pe){if(typeof pe=="number"){let y=Math.round(Math.abs(pe)/Math.SQRT2);return{center:new e.P(0,0),top:new e.P(0,pe),"top-left":new e.P(y,y),"top-right":new e.P(-y,y),bottom:new e.P(0,-pe),"bottom-left":new e.P(y,-y),"bottom-right":new e.P(-y,-y),left:new e.P(pe,0),right:new e.P(-pe,0)}}if(pe instanceof e.P||Array.isArray(pe)){let y=e.P.convert(pe);return{center:y,top:y,"top-left":y,"top-right":y,bottom:y,"bottom-left":y,"bottom-right":y,left:y,right:y}}return{center:e.P.convert(pe.center||[0,0]),top:e.P.convert(pe.top||[0,0]),"top-left":e.P.convert(pe["top-left"]||[0,0]),"top-right":e.P.convert(pe["top-right"]||[0,0]),bottom:e.P.convert(pe.bottom||[0,0]),"bottom-left":e.P.convert(pe["bottom-left"]||[0,0]),"bottom-right":e.P.convert(pe["bottom-right"]||[0,0]),left:e.P.convert(pe.left||[0,0]),right:e.P.convert(pe.right||[0,0])}}return di(new e.P(0,0))}let uo=t;l.AJAXError=e.cG,l.EXTENT=e.a6,l.Event=e.n,l.Evented=e.E,l.LngLat=e.W,l.MercatorCoordinate=e.a7,l.Point=e.P,l.addProtocol=e.cH,l.config=e.c,l.removeProtocol=e.cI,l.AttributionControl=ll,l.BoxZoomHandler=Nl,l.CanvasSource=ce,l.CooperativeGesturesHandler=wi,l.DoubleClickZoomHandler=ys,l.DragPanHandler=Hs,l.DragRotateHandler=Cu,l.EdgeInsets=oo,l.FullscreenControl=class extends e.E{constructor(pe={}){var y;super(),this._onFullscreenChange=()=>{var N;let ie=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((N=ie?.shadowRoot)===null||N===void 0)&&N.fullscreenElement;)ie=ie.shadowRoot.fullscreenElement;ie===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(y=pe.pseudo)!==null&&y!==void 0&&y,pe?.container&&(pe.container instanceof HTMLElement?this._container=pe.container:e.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(pe){return this._map=pe,this._container||(this._container=this._map.getContainer()),this._controlContainer=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let pe=this._fullscreenButton=g.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);g.create("span","maplibregl-ctrl-icon",pe).setAttribute("aria-hidden","true"),pe.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let pe=this._getTitle();this._fullscreenButton.setAttribute("aria-label",pe),this._fullscreenButton.title=pe}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new e.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new e.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},l.GeoJSONSource=Ge,l.GeolocateControl=class extends e.E{constructor(pe){super(),this._onSuccess=y=>{if(this._map){if(this._isOutOfMapMaxBounds(y))return this._setErrorState(),this.fire(new e.n("outofmaxbounds",y)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=y,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(y),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(y),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new e.n("geolocate",y)),this._finish()}},this._updateCamera=y=>{let N=new e.W(y.coords.longitude,y.coords.latitude),ie=y.coords.accuracy,fe=this._map.getBearing(),be=e.e({bearing:fe},this.options.fitBoundsOptions),Re=q.fromLngLat(N,ie);this._map.fitBounds(Re,be,{geolocateSource:!0})},this._updateMarker=y=>{if(y){let N=new e.W(y.coords.longitude,y.coords.latitude);this._accuracyCircleMarker.setLngLat(N).addTo(this._map),this._userLocationDotMarker.setLngLat(N).addTo(this._map),this._accuracy=y.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=y=>{if(this._map){if(y.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(y.code===3&&sa)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new e.n("error",y)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=y=>{if(!this._map)return;let N=y?.[0]instanceof ResizeObserverEntry;y.geolocateSource||this._watchState!=="ACTIVE_LOCK"||N||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new e.n("trackuserlocationend")),this.fire(new e.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",y=>{y.preventDefault()}),this._geolocateButton=g.create("button","maplibregl-ctrl-geolocate",this._container),g.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=y=>{if(this._map){if(y===!1){e.w("Geolocation support is not available so the GeolocateControl will be disabled.");let N=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}else{let N=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=N,this._geolocateButton.setAttribute("aria-label",N)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=g.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new fa({element:this._dotElement}),this._circleElement=g.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new fa({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",()=>this.trigger()),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=e.e({},Ea,pe)}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),function(){return e._(this,arguments,void 0,function*(y=!1){if(ca!==void 0&&!y)return ca;if(window.navigator.permissions===void 0)return ca=!!window.navigator.geolocation,ca;try{ca=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch{ca=!!window.navigator.geolocation}return ca})}().then(y=>this._finishSetupUI(y)),this._container}onRemove(){this._geolocationWatchID!==void 0&&(window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Ma=0,sa=!1}_isOutOfMapMaxBounds(pe){let y=this._map.getMaxBounds(),N=pe.coords;return y&&(N.longitudey.getEast()||N.latitudey.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let pe=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&pe))return;let y=this._map.project(pe),N=this._map.unproject([y.x+100,y.y]),ie=pe.distanceTo(N)/100,fe=2*this._accuracy/ie;this._circleElement.style.width=`${fe.toFixed(2)}px`,this._circleElement.style.height=`${fe.toFixed(2)}px`}trigger(){if(!this._setup)return e.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new e.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Ma--,sa=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new e.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new e.n("trackuserlocationstart")),this.fire(new e.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let pe;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Ma++,Ma>1?(pe={maximumAge:6e5,timeout:0},sa=!0):(pe=this.options.positionOptions,sa=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,pe)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},l.GlobeControl=class{constructor(){this._toggleProjection=()=>{var pe;let y=(pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type;this._map.setProjection(y!=="mercator"&&y?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var pe;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((pe=this._map.getProjection())===null||pe===void 0?void 0:pe.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=g.create("button","maplibregl-ctrl-globe",this._container),g.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},l.Hash=Jc,l.ImageSource=ke,l.KeyboardHandler=Ji,l.LngLatBounds=q,l.LogoControl=ef,l.Map=gr,l.MapLibreMap=gr,l.MapMouseEvent=Bl,l.MapTouchEvent=Wu,l.MapWheelEvent=wf,l.Marker=fa,l.NavigationControl=class{constructor(pe){this._updateZoomButtons=()=>{let y=this._map.getZoom(),N=y===this._map.getMaxZoom(),ie=y===this._map.getMinZoom();this._zoomInButton.disabled=N,this._zoomOutButton.disabled=ie,this._zoomInButton.setAttribute("aria-disabled",N.toString()),this._zoomOutButton.setAttribute("aria-disabled",ie.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(y,N)=>{let ie=this._map._getUIString(`NavigationControl.${N}`);y.title=ie,y.setAttribute("aria-label",ie)},this.options=e.e({},Hr,pe),this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",y=>y.preventDefault()),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",y=>this._map.zoomIn({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",y=>this._map.zoomOut({},{originalEvent:y})),g.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",y=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:y}):this._map.resetNorth({},{originalEvent:y})}),this._compassIcon=g.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(pe){return this._map=pe,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Vr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(pe,y){let N=g.create("button",pe,this._container);return N.type="button",N.addEventListener("click",y),N}},l.Popup=class extends e.E{constructor(pe){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new e.n("close"))),this),this._update=y=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=g.create("div","maplibregl-popup",this._map.getContainer()),this._tip=g.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let je of this.options.className.split(" "))this._container.classList.add(je);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let N;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Aa(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),y&&"point"in y&&y.point&&(N=y.point),this._trackPointer&&!N)return;let ie=this._flatPos=this._pos=this._trackPointer&&N?N:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&N?N:this._map.transform.locationToScreenPoint(this._lngLat));let fe=this.options.anchor,be=di(this.options.offset);if(!fe){let je=this._container.offsetWidth,Ze=this._container.offsetHeight,ut=function(Dt){var Gt,Kt,st,It;return Dt?{top:(Gt=Dt.top)!==null&&Gt!==void 0?Gt:0,right:(Kt=Dt.right)!==null&&Kt!==void 0?Kt:0,bottom:(st=Dt.bottom)!==null&&st!==void 0?st:0,left:(It=Dt.left)!==null&&It!==void 0?It:0}:{top:0,right:0,bottom:0,left:0}}(this.options.padding),ft;ft=ie.y+be.bottom.ythis._map.transform.height-Ze-ut.bottom?["bottom"]:[],ie.xthis._map.transform.width-je/2-ut.right&&ft.push("right"),fe=ft.length===0?"bottom":ft.join("-")}let Re=ie.add(be[fe]);this.options.subpixelPositioning||(Re=Re.round()),this._container.style.transform=`${Yr[fe]} translate(${Re.x}px,${Re.y}px)`,oa(this._container,fe,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=e.e(Object.create($n),pe)}addTo(pe){return this._map&&this.remove(),this._map=pe,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new e.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(pe){return this._lngLat=e.W.convert(pe),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(pe){return this.setDOMContent(document.createTextNode(pe))}setHTML(pe){let y=document.createDocumentFragment(),N=document.createElement("body"),ie;for(N.innerHTML=pe;ie=N.firstChild,ie;)y.appendChild(ie);return this.setDOMContent(y)}getMaxWidth(){var pe;return(pe=this._container)===null||pe===void 0?void 0:pe.style.maxWidth}setMaxWidth(pe){return this.options.maxWidth=pe,this._update(),this}setDOMContent(pe){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=g.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(pe),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(pe){return this._container&&this._container.classList.add(pe),this}removeClassName(pe){return this._container&&this._container.classList.remove(pe),this}setOffset(pe){return this.options.offset=pe,this._update(),this}toggleClassName(pe){if(this._container)return this._container.classList.toggle(pe)}setSubpixelPositioning(pe){this.options.subpixelPositioning=pe}setPadding(pe){this.options.padding=pe,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=g.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let pe=this._container.querySelector(xi);pe&&pe.focus()}},l.RasterDEMTileSource=he,l.RasterTileSource=ae,l.ScaleControl=class{constructor(pe){this._onMove=()=>{Tn(this._map,this._container,this.options)},this.setUnit=y=>{this.options.unit=y,Tn(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},hn),pe)}getDefaultPosition(){return"bottom-left"}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-scale",pe.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},l.ScrollZoomHandler=vo,l.Style=Ku,l.TerrainControl=class{constructor(pe){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=pe}onAdd(pe){return this._map=pe,this._container=g.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=g.create("button","maplibregl-ctrl-terrain",this._container),g.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},l.TwoFingersTouchPitchHandler=Si,l.TwoFingersTouchRotateHandler=wn,l.TwoFingersTouchZoomHandler=Ba,l.TwoFingersTouchZoomRotateHandler=hi,l.VectorTileSource=ee,l.VideoSource=_e,l.addSourceType=(pe,y)=>e._(void 0,void 0,void 0,function*(){if(le(pe))throw new Error(`A source type called "${pe}" already exists.`);((N,ie)=>{ve[N]=ie})(pe,y)}),l.clearPrewarmedResources=function(){let pe=$;pe&&(pe.isPreloaded()&&pe.numActive()===1?(pe.release(P),$=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},l.createTileMesh=Ss,l.getGlobalDispatcher=se,l.getMaxParallelImageRequests=function(){return e.c.MAX_PARALLEL_IMAGE_REQUESTS},l.getRTLTextPluginStatus=function(){return Ye().getRTLTextPluginStatus()},l.getVersion=function(){return uo},l.getWorkerCount=function(){return j.workerCount},l.getWorkerUrl=function(){return e.c.WORKER_URL},l.importScriptInWorkers=function(pe){return se().broadcast("IS",pe)},l.isTimeFrozen=function(){return c.isFrozen()},l.now=m,l.prewarm=function(){re().acquire(P)},l.restoreNow=function(){c.restoreNow()},l.setMaxParallelImageRequests=function(pe){e.c.MAX_PARALLEL_IMAGE_REQUESTS=pe},l.setNow=function(pe){c.setNow(pe)},l.setRTLTextPlugin=function(pe,y){return Ye().setRTLTextPlugin(pe,y)},l.setWorkerCount=function(pe){j.workerCount=pe},l.setWorkerUrl=function(pe){e.c.WORKER_URL=pe}});var k=p;return k})}}),rV=ze({"src/plots/map/layers.js"(J,V){"use strict";var p=Nr(),b=Cs().sanitizeHTML,E=kM(),k=Av();function l(a,o){this.subplot=a,this.uid=a.uid+"-"+o,this.index=o,this.idSource="source-"+this.uid,this.idLayer=k.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var e=l.prototype;e.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=t(o)},e.needsNewImage=function(a){var o=this.subplot.map;return o.getSource(this.idSource)&&this.sourceType==="image"&&a.sourcetype==="image"&&(this.source!==a.source||JSON.stringify(this.coordinates)!==JSON.stringify(a.coordinates))},e.needsNewSource=function(a){return this.sourceType!==a.sourcetype||JSON.stringify(this.source)!==JSON.stringify(a.source)||this.layerType!==a.type},e.needsNewLayer=function(a){return this.layerType!==a.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},e.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},e.updateImage=function(a){var o=this.subplot.map;o.getSource(this.idSource).updateImage({url:a.source,coordinates:a.coordinates});var s=this.findFollowingMapLayerId(this.lookupBelow());s!==null&&this.subplot.map.moveLayer(this.idLayer,s)},e.updateSource=function(a){var o=this.subplot.map;if(o.getSource(this.idSource)&&o.removeSource(this.idSource),this.sourceType=a.sourcetype,this.source=a.source,!!t(a)){var s=r(a);o.addSource(this.idSource,s)}},e.findFollowingMapLayerId=function(a){if(a==="traces")for(var o=this.subplot.getMapLayers(),s=0;s0){for(var s=0;s0}function n(a){var o={},s={};switch(a.type){case"circle":p.extendFlat(s,{"circle-radius":a.circle.radius,"circle-color":a.color,"circle-opacity":a.opacity});break;case"line":p.extendFlat(s,{"line-width":a.line.width,"line-color":a.color,"line-opacity":a.opacity,"line-dasharray":a.line.dash});break;case"fill":p.extendFlat(s,{"fill-color":a.color,"fill-outline-color":a.fill.outlinecolor,"fill-opacity":a.opacity});break;case"symbol":var c=a.symbol,m=E(c.textposition,c.iconsize);p.extendFlat(o,{"icon-image":c.icon,"icon-size":c.iconsize/10,"text-field":c.text,"text-size":c.textfont.size,"text-anchor":m.anchor,"text-offset":m.offset,"symbol-placement":c.placement}),p.extendFlat(s,{"icon-color":a.color,"text-color":c.textfont.color,"text-opacity":a.opacity});break;case"raster":p.extendFlat(s,{"raster-fade-duration":0,"raster-opacity":a.opacity});break}return{layout:o,paint:s}}function r(a){var o=a.sourcetype,s=a.source,c={type:o},m;return o==="geojson"?m="data":o==="vector"?m=typeof s=="string"?"url":"tiles":o==="raster"?(m="tiles",c.tileSize=256):o==="image"&&(m="url",c.coordinates=a.coordinates),c[m]=s,a.sourceattribution&&(c.attribution=b(a.sourceattribution)),c}V.exports=function(o,s,c){var m=new l(o,s);return m.update(c),m}}}),aV=ze({"src/plots/map/map.js"(J,V){"use strict";var p=tV(),b=Nr(),E=hp(),k=mi(),l=Gi(),e=_h(),t=Zl(),n=Fd(),r=n.drawMode,a=n.selectMode,o=_c().prepSelect,s=_c().clearOutline,c=_c().clearSelectionsCache,m=_c().selectOnClick,h=Av(),v=rV();function g(T,f){this.id=f,this.gd=T;var u=T._fullLayout,A=T._context;this.container=u._glcontainer.node(),this.isStatic=A.staticPlot,this.uid=u._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(u),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var i=g.prototype;i.plot=function(T,f,u){var A=this,x;A.map?x=new Promise(function(z,I){A.updateMap(T,f,z,I)}):x=new Promise(function(z,I){A.createMap(T,f,z,I)}),u.push(x)},i.createMap=function(T,f,u,A){var x=this,z=f[x.id],I=x.styleObj=C(z.style),O=z.bounds,D=O?[[O.west,O.south],[O.east,O.north]]:null;let B={container:x.div,style:I.style,center:_(z.center),zoom:z.zoom,bearing:z.bearing,pitch:z.pitch,maxBounds:D,interactive:!x.isStatic,canvasContextAttributes:{preserveDrawingBuffer:x.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},F=z._fitBounds;F&&(B.bounds=[[F.west,F.south],[F.east,F.north]],B.fitBoundsOptions={padding:h.fitBoundsPadding});let P=x.map=new p.Map(B).addControl(new p.AttributionControl({compact:!0}));var j={};P.on("styleimagemissing",function($){var Q=$.id;if(!j[Q]&&/^[a-zA-Z0-9-]+$/.test(Q)){j[Q]=!0;var re=new Image(15,15);re.onload=function(){P.addImage(Q,re,{sdf:!0})},re.crossOrigin="Anonymous",re.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+Q+".svg"}}),P.setTransformRequest(function($){return $=$.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),$=$.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:$}}),P._canvas.style.left="0px",P._canvas.style.top="0px",x.rejectOnError(A),x.isStatic||x.initFx(T,f);var U=[];U.push(new Promise(function($){P.once("load",$)})),U=U.concat(E.fetchTraceGeoData(T)),Promise.all(U).then(function(){F&&w(x,z),S(x,z),x.fillBelowLookup(T,f),x.updateData(T),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)},i.updateMap=function(T,f,u,A){var x=this,z=x.map,I=f[this.id];x.rejectOnError(A);var O=[],D=C(I.style);JSON.stringify(x.styleObj)!==JSON.stringify(D)&&(x.styleObj=D,z.setStyle(D.style),x.traceHash={},O.push(new Promise(function(B){z.once("styledata",B)}))),O=O.concat(E.fetchTraceGeoData(T)),Promise.all(O).then(function(){x.fillBelowLookup(T,f),x.updateData(T);let B=I._fitBounds;B&&(z.fitBounds([[B.west,B.south],[B.east,B.north]],{padding:h.fitBoundsPadding,animate:!1}),w(x,I),S(x,I)),x.updateLayout(f),x.resolveOnRender(u)}).catch(A)};function w(T,f){let{center:u,zoom:A}=T.getView();f._input.center=f.center=u,f._input.zoom=f.zoom=A,f._input._fitView={center:Li({},u),zoom:A}}function S(T,f){let u=T.getView();T.viewInitial={center:b.extendFlat({},u.center),bearing:f.bearing,pitch:f.pitch,zoom:u.zoom}}i.fillBelowLookup=function(T,f){var u=f[this.id],A=u.layers,x,z,I=this.belowLookup={},O=!1;for(x=0;x1)for(x=0;x<$.length;x++)j=$[x],j.indexOf("trace-")===0?(U=j.split("trace-")[1],this.traceHash[U]&&(this.traceHash[U].below=null)):j.indexOf("layout-")===0&&(U=j.split("layout-")[1],this.layerList[U]&&(this.layerList[U].below=null))}};var M={choroplethmap:0,densitymap:1,scattermap:2};i.updateData=function(T){var f=this.traceHash,u,A,x,z,I=T.slice().sort(function(P,j){return M[P[0].trace.type]-M[j[0].trace.type]});for(x=0;xf.project(A).x,_subplot:f},f.yaxis={_id:"y",c2p:A=>f.project(A).y,_subplot:f},f.updateFramework(T),f.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},l.setConvert(f.mockAxis,T)},i.initFx=function(T,f){var u=this,A=u.gd,x=u.map;x.on("moveend",function(O){if(u.map){var D=A._fullLayout;if(O.originalEvent||u.wheeling){var B=D[u.id];k.call("_storeDirectGUIEdit",A.layout,D._preGUI,u.getViewEdits(B));var F=u.getView();B._input.center=B.center=F.center,B._input.zoom=B.zoom=F.zoom,B._input.bearing=B.bearing=F.bearing,B._input.pitch=B.pitch=F.pitch,A.emit("plotly_relayout",u.getViewEditsWithDerived(F))}O.originalEvent&&O.originalEvent.type==="mouseup"?u.dragging=!1:u.wheeling&&(u.wheeling=!1),D&&D._rehover&&D._rehover()}}),x.on("wheel",function(){u.wheeling=!0}),x.on("mousemove",function(O){var D=u.div.getBoundingClientRect(),B=[O.originalEvent.offsetX,O.originalEvent.offsetY];O.target.getBoundingClientRect=function(){return D},u.xaxis.p2c=function(){return x.unproject(B).lng},u.yaxis.p2c=function(){return x.unproject(B).lat},A._fullLayout._rehover=function(){A._fullLayout._hoversubplot===u.id&&A._fullLayout[u.id]&&t.hover(A,O,u.id)},t.hover(A,O,u.id),A._fullLayout._hoversubplot=u.id});function z(){t.loneUnhover(f._hoverlayer)}x.on("dragstart",function(){u.dragging=!0,z()}),x.on("zoomstart",z),x.on("mouseout",function(){A._fullLayout._hoversubplot=null});function I(){var O=u.getView();A.emit("plotly_relayouting",u.getViewEditsWithDerived(O))}x.on("drag",I),x.on("zoom",I),x.on("dblclick",function(){var O=A._fullLayout[u.id];k.call("_storeDirectGUIEdit",A.layout,A._fullLayout._preGUI,u.getViewEdits(O));var D=u.viewInitial;x.setCenter(_(D.center)),x.setZoom(D.zoom),x.setBearing(D.bearing),x.setPitch(D.pitch);var B=u.getView();O._input.center=O.center=B.center,O._input.zoom=O.zoom=B.zoom,O._input.bearing=O.bearing=B.bearing,O._input.pitch=O.pitch=B.pitch,A.emit("plotly_doubleclick",null),A.emit("plotly_relayout",u.getViewEditsWithDerived(B))}),u.clearOutline=function(){c(u.dragOptions),s(u.dragOptions.gd)},u.onClickInPanFn=function(O){return function(D){var B=A._fullLayout.clickmode;B.indexOf("select")>-1&&m(D.originalEvent,A,[u.xaxis],[u.yaxis],u.id,O),B.indexOf("event")>-1&&t.click(A,D.originalEvent)}}},i.updateFx=function(T){var f=this,u=f.map,A=f.gd;if(f.isStatic)return;function x(D){var B=f.map.unproject(D);return[B.lng,B.lat]}var z=T.dragmode,I;I=function(D,B){if(B.isRect){var F=D.range={};F[f.id]=[x([B.xmin,B.ymin]),x([B.xmax,B.ymax])]}else{var P=D.lassoPoints={};P[f.id]=B.map(x)}};var O=f.dragOptions;f.dragOptions=b.extendDeep(O||{},{dragmode:T.dragmode,element:f.div,gd:A,plotinfo:{id:f.id,domain:T[f.id].domain,xaxis:f.xaxis,yaxis:f.yaxis,fillRangeItems:I},xaxes:[f.xaxis],yaxes:[f.yaxis],subplot:f.id}),u.off("click",f.onClickInPanHandler),a(z)||r(z)?(u.dragPan.disable(),u.on("zoomstart",f.clearOutline),f.dragOptions.prepFn=function(D,B,F){o(D,B,F,f.dragOptions,z)},e.init(f.dragOptions)):(u.dragPan.enable(),u.off("zoomstart",f.clearOutline),f.div.onmousedown=null,f.div.ontouchstart=null,f.div.removeEventListener("touchstart",f.div._ontouchstart),f.onClickInPanHandler=f.onClickInPanFn(f.dragOptions),u.on("click",f.onClickInPanHandler))},i.updateFramework=function(T){var f=T[this.id].domain,u=T._size,A=this.div.style;A.width=u.w*(f.x[1]-f.x[0])+"px",A.height=u.h*(f.y[1]-f.y[0])+"px",A.left=u.l+f.x[0]*u.w+"px",A.top=u.t+(1-f.y[1])*u.h+"px",this.xaxis._offset=u.l+f.x[0]*u.w,this.xaxis._length=u.w*(f.x[1]-f.x[0]),this.yaxis._offset=u.t+(1-f.y[1])*u.h,this.yaxis._length=u.h*(f.y[1]-f.y[0])},i.updateLayers=function(T){var f=T[this.id],u=f.layers,A=this.layerList,x;if(u.length!==A.length){for(x=0;xnV});function nV(J,V){let p=[];for(let t of J){if(t.subplot!==V||t.visible!==!0)continue;if(t.type==="choroplethmap")return null;let{lat:n,lon:r}=t;if(!r||!n)continue;let a=Math.min(r.length,n.length);for(let o=0;of/2){var u=M.split("|").join("
");_.text(u).attr("data-unformatted",u).call(t.convertToTspans,a),T=e.bBox(_.node())}_.attr("transform",p(-3,-T.height+8)),C.insert("rect",".static-attribution").attr({x:-T.width-6,y:-T.height-3,width:T.width+6,height:T.height+3,fill:"rgba(255, 255, 255, 0.75)"});var A=1;T.width+6>f&&(A=f/(T.width+6));var x=[c.l+c.w*v.x[1],c.t+c.h*(1-v.y[0])];C.attr("transform",p(x[0],x[1])+b(A))}},J.updateFx=function(a){for(var o=a._fullLayout,s=o._subplots[r],c=0;c=0;n--)e.removeLayer(t[n][1])},l.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)},V.exports=function(t,n){var r=n[0].trace,a=new k(t,r.uid),o=a.sourceId,s=p(n),c=a.below=t.belowLookup["trace-"+r.uid];return t.map.addSource(o,{type:"geojson",data:s.geojson}),a._addLayers(s,c),n[0].trace._glTrace=a,a}}}),fV=ze({"src/traces/choroplethmap/index.js"(J,V){"use strict";V.exports={attributes:PM(),supplyDefaults:uV(),colorbar:ag(),calc:IA(),plot:cV(),hoverPoints:DA(),eventData:FA(),selectPoints:zA(),styleOnSelect:function(p,b){if(b){var E=b[0].trace;E._glTrace.updateOnSelect(b)}},getBelow:function(p,b){for(var E=b.getMapLayers(),k=E.length-2;k>=0;k--){var l=E[k].id;if(typeof l=="string"&&l.indexOf("water")===0){for(var e=k+1;e0?+v[m]:0),c.push({type:"Feature",geometry:{type:"Point",coordinates:S},properties:M})}}var _=k.extractOpts(r),T=_.reversescale?k.flipScale(_.colorscale):_.colorscale,f=T[0][1],u=E.opacity(f)<1?f:E.addOpacity(f,0),A=["interpolate",["linear"],["heatmap-density"],0,u];for(m=1;m=0;t--)l.removeLayer(e[t][1])},k.dispose=function(){var l=this.subplot.map;this._removeLayers(),l.removeSource(this.sourceId)},V.exports=function(e,t){var n=t[0].trace,r=new E(e,n.uid),a=r.sourceId,o=p(t),s=r.below=e.belowLookup["trace-"+n.uid];return e.map.addSource(a,{type:"geojson",data:o.geojson}),r._addLayers(o,s),r}}}),gV=ze({"src/traces/densitymap/hover.js"(J,V){"use strict";var p=Gi(),b=V2().hoverPoints,E=V2().getExtraText;V.exports=function(l,e,t){var n=b(l,e,t);if(n){var r=n[0],a=r.cd,o=a[0].trace,s=a[r.index];if(delete r.color,"z"in s){var c=r.subplot.mockAxis;r.z=s.z,r.zLabel=p.tickText(c,c.c2l(s.z),"hover").text}return r.extraText=E(o,s,a[0].t.labels),[r]}}}}),yV=ze({"src/traces/densitymap/event_data.js"(J,V){"use strict";V.exports=function(b,E){return b.lon=E.lon,b.lat=E.lat,b.z=E.z,b}}}),_V=ze({"src/traces/densitymap/index.js"(J,V){"use strict";V.exports={attributes:IM(),supplyDefaults:dV(),colorbar:ag(),formatLabels:EM(),calc:pV(),plot:mV(),hoverPoints:gV(),eventData:yV(),getBelow:function(p,b){for(var E=b.getMapLayers(),k=0;kw[z%w.length];i("color",g.label.map((z,I)=>E.addOpacity(S(I),.8))),i("customdata");var M=a.link||{},C=e.newContainer(o,"link");function _(z,I){return p.coerce(M,C,b.link,z,I)}_("label"),_("arrowlen"),_("source"),_("target"),_("value"),_("line.color"),_("line.width"),_("hoverinfo",a.hoverinfo),l(M,C,_,h),_("hovertemplate"),_("sort");var T=E.luminosity(c.paper_bgcolor)<.333,f=T?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",u=_("color",f);function A(z){if(!E.isValid(z))return z;let I=E.opacity(z);return I<=.8?E.addOpacity(z,I+.2):T?E.brighten(z,10):E.adjustLightness(z,-10)}_("hovercolor",Array.isArray(u)?u.map(A):A(u)),_("customdata"),t(M,C,{name:"colorscales",handleItemDefaults:n}),k(o,c,m),m("orientation"),m("direction"),m("valueformat"),m("valuesuffix");let x=g.x.length&&g.y.length?"freeform":void 0;m("arrangement",x),p.coerceFont(m,"textfont",c.font,{autoShadowDflt:!0}),o._length=null};function n(r,a){function o(s,c){return p.coerce(r,a,b.link.colorscales,s,c)}o("label"),o("cmin"),o("cmax"),o("colorscale")}}}),FM=ze({"node_modules/strongly-connected-components/scc.js"(J,V){"use strict";V.exports=p;function p(b){for(var E=b.length,k=new Array(E),l=new Array(E),e=new Array(E),t=new Array(E),n=new Array(E),r=new Array(E),a=0;a0;){i=S[S.length-1];var M=b[i];if(t[i]=0&&r[i].push(n[_])}t[i]=C}else{if(l[i]===k[i]){for(var T=[],f=[],u=0,C=w.length-1;C>=0;--C){var A=w[C];if(e[A]=!1,T.push(A),f.push(r[A]),u+=r[A].length,n[A]=s.length,A===i){w.length=C;break}}s.push(T);for(var x=new Array(u),C=0;C_&&(_=o.source[w]),o.target[w]>_&&(_=o.target[w]);var T=_+1;r.node._count=T;var f,u=r.node.groups,A={};for(w=0;w0&&l(B,T)&&l(F,T)&&!(A.hasOwnProperty(B)&&A.hasOwnProperty(F)&&A[B]===A[F])){A.hasOwnProperty(F)&&(F=A[F]),A.hasOwnProperty(B)&&(B=A[B]),B=+B,F=+F,v[B]=v[F]=!0;var P="";o.label&&o.label[w]&&(P=o.label[w]);var j=null;P&&g.hasOwnProperty(P)&&(j=g[P]),s.push({pointNumber:w,label:P,color:c?o.color[w]:o.color,hovercolor:m?o.hovercolor[w]:o.hovercolor,customdata:h?o.customdata[w]:o.customdata,concentrationscale:j,source:B,target:F,value:+D}),O.source.push(B),O.target.push(F)}}var U=T+u.length,$=k(a.color),Q=k(a.customdata),re=[];for(w=0;wT-1,childrenNodes:[],pointNumber:w,label:ne,color:$?a.color[w]:a.color,customdata:Q?a.customdata[w]:a.customdata})}var se=!1;return n(U,O.source,O.target)&&(se=!0),{circular:se,links:s,nodes:re,groups:u,groupLookup:A}}function n(r,a,o){for(var s=b.init2dArray(r,0),c=0;c1})}V.exports=function(a,o){var s=t(o);return E({circular:s.circular,_nodes:s.nodes,_links:s.links,_groups:s.groups,_groupLookup:s.groupLookup})}}}),TV=ze({"node_modules/d3-quadtree/dist/d3-quadtree.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";function b(T){var f=+this._x.call(null,T),u=+this._y.call(null,T);return E(this.cover(f,u),f,u,T)}function E(T,f,u,A){if(isNaN(f)||isNaN(u))return T;var x,z=T._root,I={data:A},O=T._x0,D=T._y0,B=T._x1,F=T._y1,P,j,U,$,Q,re,ne,se;if(!z)return T._root=I,T;for(;z.length;)if((Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j,x=z,!(z=z[ne=re<<1|Q]))return x[ne]=I,T;if(U=+T._x.call(null,z.data),$=+T._y.call(null,z.data),f===U&&u===$)return I.next=z,x?x[ne]=I:T._root=I,T;do x=x?x[ne]=new Array(4):T._root=new Array(4),(Q=f>=(P=(O+B)/2))?O=P:B=P,(re=u>=(j=(D+F)/2))?D=j:F=j;while((ne=re<<1|Q)===(se=($>=j)<<1|U>=P));return x[se]=z,x[ne]=I,T}function k(T){var f,u,A=T.length,x,z,I=new Array(A),O=new Array(A),D=1/0,B=1/0,F=-1/0,P=-1/0;for(u=0;uF&&(F=x),zP&&(P=z));if(D>F||B>P)return this;for(this.cover(D,B).cover(F,P),u=0;uT||T>=x||A>f||f>=z;)switch(B=(fF||(O=$.y0)>P||(D=$.x1)=ne)<<1|T>=re)&&($=j[j.length-1],j[j.length-1]=j[j.length-1-Q],j[j.length-1-Q]=$)}else{var se=T-+this._x.call(null,U.data),G=f-+this._y.call(null,U.data),X=se*se+G*G;if(X=(j=(I+D)/2))?I=j:D=j,(Q=P>=(U=(O+B)/2))?O=U:B=U,f=u,!(u=u[re=Q<<1|$]))return this;if(!u.length)break;(f[re+1&3]||f[re+2&3]||f[re+3&3])&&(A=f,ne=re)}for(;u.data!==T;)if(x=u,!(u=u.next))return this;return(z=u.next)&&delete u.next,x?(z?x.next=z:delete x.next,this):f?(z?f[re]=z:delete f[re],(u=f[0]||f[1]||f[2]||f[3])&&u===(f[3]||f[2]||f[1]||f[0])&&!u.length&&(A?A[ne]=u:this._root=u),this):(this._root=z,this)}function o(T){for(var f=0,u=T.length;f=v.length)return i!=null&&_.sort(i),w!=null?w(_):_;for(var A=-1,x=_.length,z=v[T++],I,O,D=k(),B,F=f();++Av.length)return _;var f,u=g[T-1];return w!=null&&T>=v.length?f=_.entries():(f=[],_.each(function(A,x){f.push({key:x,values:C(A,T)})})),u!=null?f.sort(function(A,x){return u(A.key,x.key)}):f}return S={object:function(_){return M(_,0,e,t)},map:function(_){return M(_,0,n,r)},entries:function(_){return C(M(_,0,n,r),0)},key:function(_){return v.push(_),S},sortKeys:function(_){return g[v.length-1]=_,S},sortValues:function(_){return i=_,S},rollup:function(_){return w=_,S}}}function e(){return{}}function t(v,g,i){v[g]=i}function n(){return k()}function r(v,g,i){v.set(g,i)}function a(){}var o=k.prototype;a.prototype=s.prototype={constructor:a,has:o.has,add:function(v){return v+="",this[b+v]=v,this},remove:o.remove,clear:o.clear,values:o.keys,size:o.size,empty:o.empty,each:o.each};function s(v,g){var i=new a;if(v instanceof a)v.each(function(M){i.add(M)});else if(v){var w=-1,S=v.length;if(g==null)for(;++w=0&&(o=a.slice(s+1),a=a.slice(0,s)),a&&!r.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:o}})}k.prototype=E.prototype={constructor:k,on:function(n,r){var a=this._,o=l(n+"",a),s,c=-1,m=o.length;if(arguments.length<2){for(;++c0)for(var a=new Array(s),o=0,s,c;o=0&&T._call.call(null,f),T=T._next;--b}function i(){r=(n=o.now())+a,b=E=0;try{g()}finally{b=0,S(),r=0}}function w(){var T=o.now(),f=T-n;f>l&&(a-=f,n=T)}function S(){for(var T,f=e,u,A=1/0;f;)f._call?(A>f._time&&(A=f._time),T=f,f=f._next):(u=f._next,f._next=null,f=T?T._next=u:e=u);t=T,M(A)}function M(T){if(!b){E&&(E=clearTimeout(E));var f=T-r;f>24?(T<1/0&&(E=setTimeout(i,T-o.now()-a)),k&&(k=clearInterval(k))):(k||(n=o.now(),k=setInterval(w,l)),b=1,s(i))}}function C(T,f,u){var A=new h;return f=f==null?0:+f,A.restart(function(x){A.stop(),T(x+f)},f,u),A}function _(T,f,u){var A=new h,x=f;return f==null?(A.restart(T,f,u),A):(f=+f,u=u==null?c():+u,A.restart(function z(I){I+=x,A.restart(z,x+=f,u),T(I)},f,u),A)}p.interval=_,p.now=c,p.timeout=C,p.timer=v,p.timerFlush=g,Object.defineProperty(p,"__esModule",{value:!0})})}}),SV=ze({"node_modules/d3-force/dist/d3-force.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,TV(),zM(),AV(),MV()):b(p.d3=p.d3||{},p.d3,p.d3,p.d3,p.d3)})(J,function(p,b,E,k,l){"use strict";function e(T,f){var u;T==null&&(T=0),f==null&&(f=0);function A(){var x,z=u.length,I,O=0,D=0;for(x=0;xP.index){var ee=j-Y.x-Y.vx,ae=U-Y.y-Y.vy,he=ee*ee+ae*ae;hej+Z||KU+Z||HD.r&&(D.r=D[B].r)}function O(){if(f){var D,B=f.length,F;for(u=new Array(B),D=0;D1?(Q==null?O.remove($):O.set($,U(Q)),f):O.get($)},find:function($,Q,re){var ne=0,se=T.length,G,X,K,H,Y;for(re==null?re=1/0:re*=re,ne=0;ne1?(B.on($,Q),f):B.on($)}}}function S(){var T,f,u,A=t(-30),x,z=1,I=1/0,O=.81;function D(j){var U,$=T.length,Q=b.quadtree(T,h,v).visitAfter(F);for(u=j,U=0;U<$;++U)f=T[U],Q.visit(P)}function B(){if(T){var j,U=T.length,$;for(x=new Array(U),j=0;j=I)return;(j.data!==f||j.next)&&(re===0&&(re=n(),G+=re*re),ne===0&&(ne=n(),G+=ne*ne),GRt?1:Yt>=Rt?0:NaN}function E(Yt){let Rt=Yt,nr=Yt;Yt.length===1&&(Rt=(Qr,Zr)=>Yt(Qr)-Zr,nr=k(Yt));function ur(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)<0?ha=La+1:Pa=La}return ha}function cr(Qr,Zr,ha,Pa){for(ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);ha>>1;nr(Qr[La],Zr)>0?Pa=La:ha=La+1}return ha}function Rr(Qr,Zr,ha,Pa){ha==null&&(ha=0),Pa==null&&(Pa=Qr.length);let La=ur(Qr,Zr,ha,Pa-1);return La>ha&&Rt(Qr[La-1],Zr)>-Rt(Qr[La],Zr)?La-1:La}return{left:ur,center:Rr,right:cr}}function k(Yt){return(Rt,nr)=>b(Yt(Rt),nr)}function l(Yt){return Yt===null?NaN:+Yt}function*e(Yt,Rt){if(Rt===void 0)for(let nr of Yt)nr!=null&&(nr=+nr)>=nr&&(yield nr);else{let nr=-1;for(let ur of Yt)(ur=Rt(ur,++nr,Yt))!=null&&(ur=+ur)>=ur&&(yield ur)}}let t=E(b),n=t.right,r=t.left,a=E(l).center;function o(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)ur!=null&&(ur=+ur)>=ur&&++nr;else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(cr=+cr)>=cr&&++nr}return nr}function s(Yt){return Yt.length|0}function c(Yt){return!(Yt>0)}function m(Yt){return typeof Yt!="object"||"length"in Yt?Yt:Array.from(Yt)}function h(Yt){return Rt=>Yt(...Rt)}function v(...Yt){let Rt=typeof Yt[Yt.length-1]=="function"&&h(Yt.pop());Yt=Yt.map(m);let nr=Yt.map(s),ur=Yt.length-1,cr=new Array(ur+1).fill(0),Rr=[];if(ur<0||nr.some(c))return Rr;for(;;){Rr.push(cr.map((Zr,ha)=>Yt[ha][Zr]));let Qr=ur;for(;++cr[Qr]===nr[Qr];){if(Qr===0)return Rt?Rr.map(Rt):Rr;cr[Qr--]=0}}}function g(Yt,Rt){var nr=0,ur=0;return Float64Array.from(Yt,Rt===void 0?cr=>nr+=+cr||0:cr=>nr+=+Rt(cr,ur++,Yt)||0)}function i(Yt,Rt){return RtYt?1:Rt>=Yt?0:NaN}function w(Yt,Rt){let nr=0,ur,cr=0,Rr=0;if(Rt===void 0)for(let Qr of Yt)Qr!=null&&(Qr=+Qr)>=Qr&&(ur=Qr-cr,cr+=ur/++nr,Rr+=ur*(Qr-cr));else{let Qr=-1;for(let Zr of Yt)(Zr=Rt(Zr,++Qr,Yt))!=null&&(Zr=+Zr)>=Zr&&(ur=Zr-cr,cr+=ur/++nr,Rr+=ur*(Zr-cr))}if(nr>1)return Rr/(nr-1)}function S(Yt,Rt){let nr=w(Yt,Rt);return nr&&Math.sqrt(nr)}function M(Yt,Rt){let nr,ur;if(Rt===void 0)for(let cr of Yt)cr!=null&&(nr===void 0?cr>=cr&&(nr=ur=cr):(nr>cr&&(nr=cr),ur=Rr&&(nr=ur=Rr):(nr>Rr&&(nr=Rr),ur0){for(Qr=Rt[--nr];nr>0&&(ur=Qr,cr=Rt[--nr],Qr=ur+cr,Rr=cr-(Qr-ur),!Rr););nr>0&&(Rr<0&&Rt[nr-1]<0||Rr>0&&Rt[nr-1]>0)&&(cr=Rr*2,ur=Qr+cr,cr==ur-Qr&&(Qr=ur))}return Qr}}function _(Yt,Rt){let nr=new C;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&nr.add(ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&nr.add(cr)}return+nr}function T(Yt,Rt){let nr=new C,ur=-1;return Float64Array.from(Yt,Rt===void 0?cr=>nr.add(+cr||0):cr=>nr.add(+Rt(cr,++ur,Yt)||0))}class f extends Map{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let[ur,cr]of Rt)this.set(ur,cr)}get(Rt){return super.get(A(this,Rt))}has(Rt){return super.has(A(this,Rt))}set(Rt,nr){return super.set(x(this,Rt),nr)}delete(Rt){return super.delete(z(this,Rt))}}class u extends Set{constructor(Rt,nr=I){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:nr}}),Rt!=null)for(let ur of Rt)this.add(ur)}has(Rt){return super.has(A(this,Rt))}add(Rt){return super.add(x(this,Rt))}delete(Rt){return super.delete(z(this,Rt))}}function A({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):nr}function x({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)?Yt.get(ur):(Yt.set(ur,nr),nr)}function z({_intern:Yt,_key:Rt},nr){let ur=Rt(nr);return Yt.has(ur)&&(nr=Yt.get(nr),Yt.delete(ur)),nr}function I(Yt){return Yt!==null&&typeof Yt=="object"?Yt.valueOf():Yt}function O(Yt){return Yt}function D(Yt,...Rt){return Q(Yt,O,O,Rt)}function B(Yt,...Rt){return Q(Yt,Array.from,O,Rt)}function F(Yt,Rt,...nr){return Q(Yt,O,Rt,nr)}function P(Yt,Rt,...nr){return Q(Yt,Array.from,Rt,nr)}function j(Yt,...Rt){return Q(Yt,O,$,Rt)}function U(Yt,...Rt){return Q(Yt,Array.from,$,Rt)}function $(Yt){if(Yt.length!==1)throw new Error("duplicate key");return Yt[0]}function Q(Yt,Rt,nr,ur){return function cr(Rr,Qr){if(Qr>=ur.length)return nr(Rr);let Zr=new f,ha=ur[Qr++],Pa=-1;for(let La of Rr){let un=ha(La,++Pa,Rr),Xa=Zr.get(un);Xa?Xa.push(La):Zr.set(un,[La])}for(let[La,un]of Zr)Zr.set(La,cr(un,Qr));return Rt(Zr)}(Yt,0)}function re(Yt,Rt){return Array.from(Rt,nr=>Yt[nr])}function ne(Yt,...Rt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Yt=Array.from(Yt);let[nr=b]=Rt;if(nr.length===1||Rt.length>1){let ur=Uint32Array.from(Yt,(cr,Rr)=>Rr);return Rt.length>1?(Rt=Rt.map(cr=>Yt.map(cr)),ur.sort((cr,Rr)=>{for(let Qr of Rt){let Zr=b(Qr[cr],Qr[Rr]);if(Zr)return Zr}})):(nr=Yt.map(nr),ur.sort((cr,Rr)=>b(nr[cr],nr[Rr]))),re(Yt,ur)}return Yt.sort(nr)}function se(Yt,Rt,nr){return(Rt.length===1?ne(F(Yt,Rt,nr),([ur,cr],[Rr,Qr])=>b(cr,Qr)||b(ur,Rr)):ne(D(Yt,nr),([ur,cr],[Rr,Qr])=>Rt(cr,Qr)||b(ur,Rr))).map(([ur])=>ur)}var G=Array.prototype,X=G.slice;function K(Yt){return function(){return Yt}}var H=Math.sqrt(50),Y=Math.sqrt(10),q=Math.sqrt(2);function Z(Yt,Rt,nr){var ur,cr=-1,Rr,Qr,Zr;if(Rt=+Rt,Yt=+Yt,nr=+nr,Yt===Rt&&nr>0)return[Yt];if((ur=Rt0){let ha=Math.round(Yt/Zr),Pa=Math.round(Rt/Zr);for(ha*ZrRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++crRt&&--Pa,Qr=new Array(Rr=Pa-ha+1);++cr=0?(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)*Math.pow(10,cr):-Math.pow(10,-cr)/(Rr>=H?10:Rr>=Y?5:Rr>=q?2:1)}function ae(Yt,Rt,nr){var ur=Math.abs(Rt-Yt)/Math.max(0,nr),cr=Math.pow(10,Math.floor(Math.log(ur)/Math.LN10)),Rr=ur/cr;return Rr>=H?cr*=10:Rr>=Y?cr*=5:Rr>=q&&(cr*=2),Rt0?(Yt=Math.floor(Yt/cr)*cr,Rt=Math.ceil(Rt/cr)*cr):cr<0&&(Yt=Math.ceil(Yt*cr)/cr,Rt=Math.floor(Rt*cr)/cr),ur=cr}}function xe(Yt){return Math.ceil(Math.log(o(Yt))/Math.LN2)+1}function we(){var Yt=O,Rt=M,nr=xe;function ur(cr){Array.isArray(cr)||(cr=Array.from(cr));var Rr,Qr=cr.length,Zr,ha=new Array(Qr);for(Rr=0;Rr=un)if(Un>=un&&Rt===M){let Yn=ee(La,un,li);isFinite(Yn)&&(Yn>0?un=(Math.floor(un/Yn)+1)*Yn:Yn<0&&(un=(Math.ceil(un*-Yn)+1)/-Yn))}else Xa.pop()}for(var ja=Xa.length;Xa[0]<=La;)Xa.shift(),--ja;for(;Xa[ja-1]>un;)Xa.pop(),--ja;var Nn=new Array(ja+1),yn;for(Rr=0;Rr<=ja;++Rr)yn=Nn[Rr]=[],yn.x0=Rr>0?Xa[Rr-1]:La,yn.x1=Rr=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr=cr)&&(nr=cr)}return nr}function Se(Yt,Rt){let nr;if(Rt===void 0)for(let ur of Yt)ur!=null&&(nr>ur||nr===void 0&&ur>=ur)&&(nr=ur);else{let ur=-1;for(let cr of Yt)(cr=Rt(cr,++ur,Yt))!=null&&(nr>cr||nr===void 0&&cr>=cr)&&(nr=cr)}return nr}function Ie(Yt,Rt,nr=0,ur=Yt.length-1,cr=b){for(;ur>nr;){if(ur-nr>600){let ha=ur-nr+1,Pa=Rt-nr+1,La=Math.log(ha),un=.5*Math.exp(2*La/3),Xa=.5*Math.sqrt(La*un*(ha-un)/ha)*(Pa-ha/2<0?-1:1),ja=Math.max(nr,Math.floor(Rt-Pa*un/ha+Xa)),Nn=Math.min(ur,Math.floor(Rt+(ha-Pa)*un/ha+Xa));Ie(Yt,Rt,ja,Nn,cr)}let Rr=Yt[Rt],Qr=nr,Zr=ur;for(Ve(Yt,nr,Rt),cr(Yt[ur],Rr)>0&&Ve(Yt,nr,ur);Qr0;)--Zr}cr(Yt[nr],Rr)===0?Ve(Yt,nr,Zr):(++Zr,Ve(Yt,Zr,ur)),Zr<=Rt&&(nr=Zr+1),Rt<=Zr&&(ur=Zr-1)}return Yt}function Ve(Yt,Rt,nr){let ur=Yt[Rt];Yt[Rt]=Yt[nr],Yt[nr]=ur}function Ge(Yt,Rt,nr){if(Yt=Float64Array.from(e(Yt,nr)),!!(ur=Yt.length)){if((Rt=+Rt)<=0||ur<2)return Se(Yt);if(Rt>=1)return Me(Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=Me(Ie(Yt,Rr).subarray(0,Rr+1)),Zr=Se(Yt.subarray(Rr+1));return Qr+(Zr-Qr)*(cr-Rr)}}function ke(Yt,Rt,nr=l){if(ur=Yt.length){if((Rt=+Rt)<=0||ur<2)return+nr(Yt[0],0,Yt);if(Rt>=1)return+nr(Yt[ur-1],ur-1,Yt);var ur,cr=(ur-1)*Rt,Rr=Math.floor(cr),Qr=+nr(Yt[Rr],Rr,Yt),Zr=+nr(Yt[Rr+1],Rr+1,Yt);return Qr+(Zr-Qr)*(cr-Rr)}}function _e(Yt,Rt,nr){return Math.ceil((nr-Rt)/(2*(Ge(Yt,.75)-Ge(Yt,.25))*Math.pow(o(Yt),-1/3)))}function ce(Yt,Rt,nr){return Math.ceil((nr-Rt)/(3.5*S(Yt)*Math.pow(o(Yt),-1/3)))}function ve(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr=Rr)&&(nr=Rr,ur=cr);return ur}function le(Yt,Rt){let nr=0,ur=0;if(Rt===void 0)for(let cr of Yt)cr!=null&&(cr=+cr)>=cr&&(++nr,ur+=cr);else{let cr=-1;for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(Rr=+Rr)>=Rr&&(++nr,ur+=Rr)}if(nr)return ur/nr}function Ae(Yt,Rt){return Ge(Yt,.5,Rt)}function*Be(Yt){for(let Rt of Yt)yield*ad(Rt)}function Xe(Yt){return Array.from(Be(Yt))}function Ye(Yt,Rt){let nr,ur=-1,cr=-1;if(Rt===void 0)for(let Rr of Yt)++cr,Rr!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);else for(let Rr of Yt)(Rr=Rt(Rr,++cr,Yt))!=null&&(nr>Rr||nr===void 0&&Rr>=Rr)&&(nr=Rr,ur=cr);return ur}function yt(Yt,Rt=gt){let nr=[],ur,cr=!1;for(let Rr of Yt)cr&&nr.push(Rt(ur,Rr)),ur=Rr,cr=!0;return nr}function gt(Yt,Rt){return[Yt,Rt]}function Tt(Yt,Rt,nr){Yt=+Yt,Rt=+Rt,nr=(cr=arguments.length)<2?(Rt=Yt,Yt=0,1):cr<3?1:+nr;for(var ur=-1,cr=Math.max(0,Math.ceil((Rt-Yt)/nr))|0,Rr=new Array(cr);++ur0:b(Qr,Qr)===0)&&(nr=Rr,cr=Qr,ur=!0)}}else for(let cr of Yt)(ur?Rt(cr,nr)>0:Rt(cr,cr)===0)&&(nr=cr,ur=!0);return nr}function _r(Yt,Rt=b){if(Rt.length===1)return ve(Yt,Rt);let nr,ur=-1,cr=-1;for(let Rr of Yt)++cr,(ur<0?Rt(Rr,Rr)===0:Rt(Rr,nr)>0)&&(nr=Rr,ur=cr);return ur}function Xt(Yt,Rt){let nr=$t(Yt,Rt);return nr<0?void 0:nr}var or=Ot(Math.random);function Ot(Yt){return function(nr,ur=0,cr=nr.length){let Rr=cr-(ur=+ur);for(;Rr;){let Qr=Yt()*Rr--|0,Zr=nr[Rr+ur];nr[Rr+ur]=nr[Qr+ur],nr[Qr+ur]=Zr}return nr}}function vt(Yt,Rt){let nr=0;if(Rt===void 0)for(let ur of Yt)(ur=+ur)&&(nr+=ur);else{let ur=-1;for(let cr of Yt)(cr=+Rt(cr,++ur,Yt))&&(nr+=cr)}return nr}function ht(Yt){if(!(Rr=Yt.length))return[];for(var Rt=-1,nr=Se(Yt,De),ur=new Array(nr);++RtRt(nr,ur,Yt))}function Mt(Yt,Rt,nr){if(typeof Rt!="function")throw new TypeError("reducer is not a function");let ur=Yt[Symbol.iterator](),cr,Rr,Qr=-1;if(arguments.length<3){if({done:cr,value:nr}=ur.next(),cr)return;++Qr}for(;{done:cr,value:Rr}=ur.next(),!cr;)nr=Rt(nr,Rr,++Qr,Yt);return nr}function pt(Yt){if(typeof Yt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Yt).reverse()}function Pt(Yt,...Rt){Yt=new Set(Yt);for(let nr of Rt)for(let ur of nr)Yt.delete(ur);return Yt}function Ct(Yt,Rt){let nr=Rt[Symbol.iterator](),ur=new Set;for(let cr of Yt){if(ur.has(cr))return!1;let Rr,Qr;for(;({value:Rr,done:Qr}=nr.next())&&!Qr;){if(Object.is(cr,Rr))return!1;ur.add(Rr)}}return!0}function qt(Yt){return Yt instanceof Set?Yt:new Set(Yt)}function Vt(Yt,...Rt){Yt=new Set(Yt),Rt=Rt.map(qt);e:for(let nr of Yt)for(let ur of Rt)if(!ur.has(nr)){Yt.delete(nr);continue e}return Yt}function Ht(Yt,Rt){let nr=Yt[Symbol.iterator](),ur=new Set;for(let cr of Rt){if(ur.has(cr))continue;let Rr,Qr;for(;{value:Rr,done:Qr}=nr.next();){if(Qr)return!1;if(ur.add(Rr),Object.is(cr,Rr))break}}return!0}function Sr(Yt,Rt){return Ht(Rt,Yt)}function Kr(...Yt){let Rt=new Set;for(let nr of Yt)for(let ur of nr)Rt.add(ur);return Rt}p.Adder=C,p.InternMap=f,p.InternSet=u,p.ascending=b,p.bin=we,p.bisect=n,p.bisectCenter=a,p.bisectLeft=r,p.bisectRight=n,p.bisector=E,p.count=o,p.cross=v,p.cumsum=g,p.descending=i,p.deviation=S,p.difference=Pt,p.disjoint=Ct,p.every=We,p.extent=M,p.fcumsum=T,p.filter=Je,p.fsum=_,p.greatest=rr,p.greatestIndex=_r,p.group=D,p.groupSort=se,p.groups=B,p.histogram=we,p.index=j,p.indexes=U,p.intersection=Vt,p.least=At,p.leastIndex=$t,p.map=et,p.max=Me,p.maxIndex=ve,p.mean=le,p.median=Ae,p.merge=Xe,p.min=Se,p.minIndex=Ye,p.nice=he,p.pairs=yt,p.permute=re,p.quantile=Ge,p.quantileSorted=ke,p.quickselect=Ie,p.range=Tt,p.reduce=Mt,p.reverse=pt,p.rollup=F,p.rollups=P,p.scan=Xt,p.shuffle=or,p.shuffler=Ot,p.some=Ke,p.sort=ne,p.subset=Sr,p.sum=vt,p.superset=Ht,p.thresholdFreedmanDiaconis=_e,p.thresholdScott=ce,p.thresholdSturges=xe,p.tickIncrement=ee,p.tickStep=ae,p.ticks=Z,p.transpose=ht,p.union=Kr,p.variance=w,p.zip=Ne,Object.defineProperty(p,"__esModule",{value:!0})})}}),kV=ze({"node_modules/d3-path/dist/d3-path.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J):(p=p||self,b(p.d3=p.d3||{}))})(J,function(p){"use strict";var b=Math.PI,E=2*b,k=1e-6,l=E-k;function e(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function t(){return new e}e.prototype=t.prototype={constructor:e,moveTo:function(n,r){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(n,r){this._+="L"+(this._x1=+n)+","+(this._y1=+r)},quadraticCurveTo:function(n,r,a,o){this._+="Q"+ +n+","+ +r+","+(this._x1=+a)+","+(this._y1=+o)},bezierCurveTo:function(n,r,a,o,s,c){this._+="C"+ +n+","+ +r+","+ +a+","+ +o+","+(this._x1=+s)+","+(this._y1=+c)},arcTo:function(n,r,a,o,s){n=+n,r=+r,a=+a,o=+o,s=+s;var c=this._x1,m=this._y1,h=a-n,v=o-r,g=c-n,i=m-r,w=g*g+i*i;if(s<0)throw new Error("negative radius: "+s);if(this._x1===null)this._+="M"+(this._x1=n)+","+(this._y1=r);else if(w>k)if(!(Math.abs(i*h-v*g)>k)||!s)this._+="L"+(this._x1=n)+","+(this._y1=r);else{var S=a-c,M=o-m,C=h*h+v*v,_=S*S+M*M,T=Math.sqrt(C),f=Math.sqrt(w),u=s*Math.tan((b-Math.acos((C+w-_)/(2*T*f)))/2),A=u/f,x=u/T;Math.abs(A-1)>k&&(this._+="L"+(n+A*g)+","+(r+A*i)),this._+="A"+s+","+s+",0,0,"+ +(i*S>g*M)+","+(this._x1=n+x*h)+","+(this._y1=r+x*v)}},arc:function(n,r,a,o,s,c){n=+n,r=+r,a=+a,c=!!c;var m=a*Math.cos(o),h=a*Math.sin(o),v=n+m,g=r+h,i=1^c,w=c?o-s:s-o;if(a<0)throw new Error("negative radius: "+a);this._x1===null?this._+="M"+v+","+g:(Math.abs(this._x1-v)>k||Math.abs(this._y1-g)>k)&&(this._+="L"+v+","+g),a&&(w<0&&(w=w%E+E),w>l?this._+="A"+a+","+a+",0,1,"+i+","+(n-m)+","+(r-h)+"A"+a+","+a+",0,1,"+i+","+(this._x1=v)+","+(this._y1=g):w>k&&(this._+="A"+a+","+a+",0,"+ +(w>=b)+","+i+","+(this._x1=n+a*Math.cos(s))+","+(this._y1=r+a*Math.sin(s))))},rect:function(n,r,a,o){this._+="M"+(this._x0=this._x1=+n)+","+(this._y0=this._y1=+r)+"h"+ +a+"v"+ +o+"h"+-a+"Z"},toString:function(){return this._}},p.path=t,Object.defineProperty(p,"__esModule",{value:!0})})}}),BM=ze({"node_modules/d3-shape/dist/d3-shape.js"(J,V){(function(p,b){typeof J=="object"&&typeof V<"u"?b(J,kV()):(p=p||self,b(p.d3=p.d3||{},p.d3))})(J,function(p,b){"use strict";function E(ot){return function(){return ot}}var k=Math.abs,l=Math.atan2,e=Math.cos,t=Math.max,n=Math.min,r=Math.sin,a=Math.sqrt,o=1e-12,s=Math.PI,c=s/2,m=2*s;function h(ot){return ot>1?0:ot<-1?s:Math.acos(ot)}function v(ot){return ot>=1?c:ot<=-1?-c:Math.asin(ot)}function g(ot){return ot.innerRadius}function i(ot){return ot.outerRadius}function w(ot){return ot.startAngle}function S(ot){return ot.endAngle}function M(ot){return ot&&ot.padAngle}function C(ot,kt,jt,ar,Er,xr,zr,Lr){var aa=jt-ot,Sa=ar-kt,wa=zr-Er,pn=Lr-xr,tn=pn*aa-wa*Sa;if(!(tn*tnHi*Hi+Mi*Mi&&(gi=io,qi=oo),{cx:gi,cy:qi,x01:-wa,y01:-pn,x11:gi*(Er/jn-1),y11:qi*(Er/jn-1)}}function T(){var ot=g,kt=i,jt=E(0),ar=null,Er=w,xr=S,zr=M,Lr=null;function aa(){var Sa,wa,pn=+ot.apply(this,arguments),tn=+kt.apply(this,arguments),ai=Er.apply(this,arguments)-c,rn=xr.apply(this,arguments)-c,Ri=k(rn-ai),Gn=rn>ai;if(Lr||(Lr=Sa=b.path()),tno))Lr.moveTo(0,0);else if(Ri>m-o)Lr.moveTo(tn*e(ai),tn*r(ai)),Lr.arc(0,0,tn,ai,rn,!Gn),pn>o&&(Lr.moveTo(pn*e(rn),pn*r(rn)),Lr.arc(0,0,pn,rn,ai,Gn));else{var no=ai,Di=rn,fn=ai,Ai=rn,jn=Ri,Xn=Ri,eo=zr.apply(this,arguments)/2,gi=eo>o&&(ar?+ar.apply(this,arguments):a(pn*pn+tn*tn)),qi=n(k(tn-pn)/2,+jt.apply(this,arguments)),io=qi,oo=qi,Vn,qn;if(gi>o){var Hi=v(gi/pn*r(eo)),Mi=v(gi/tn*r(eo));(jn-=Hi*2)>o?(Hi*=Gn?1:-1,fn+=Hi,Ai-=Hi):(jn=0,fn=Ai=(ai+rn)/2),(Xn-=Mi*2)>o?(Mi*=Gn?1:-1,no+=Mi,Di-=Mi):(Xn=0,no=Di=(ai+rn)/2)}var Ro=tn*e(no),go=tn*r(no),Eo=pn*e(Ai),Ao=pn*r(Ai);if(qi>o){var ds=tn*e(Di),jo=tn*r(Di),Wo=pn*e(fn),to=pn*r(fn),wo;if(Rio?oo>o?(Vn=_(Wo,to,Ro,go,tn,oo,Gn),qn=_(ds,jo,Eo,Ao,tn,oo,Gn),Lr.moveTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),ooo)||!(jn>o)?Lr.lineTo(Eo,Ao):io>o?(Vn=_(Eo,Ao,ds,jo,pn,-io,Gn),qn=_(Ro,go,Wo,to,pn,-io,Gn),Lr.lineTo(Vn.cx+Vn.x01,Vn.cy+Vn.y01),io=tn;--ai)Lr.point(Di[ai],fn[ai]);Lr.lineEnd(),Lr.areaEnd()}Gn&&(Di[pn]=+ot(Ri,pn,wa),fn[pn]=+jt(Ri,pn,wa),Lr.point(kt?+kt(Ri,pn,wa):Di[pn],ar?+ar(Ri,pn,wa):fn[pn]))}if(no)return Lr=null,no+""||null}function Sa(){return z().defined(Er).curve(zr).context(xr)}return aa.x=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),kt=null,aa):ot},aa.x0=function(wa){return arguments.length?(ot=typeof wa=="function"?wa:E(+wa),aa):ot},aa.x1=function(wa){return arguments.length?(kt=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):kt},aa.y=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),ar=null,aa):jt},aa.y0=function(wa){return arguments.length?(jt=typeof wa=="function"?wa:E(+wa),aa):jt},aa.y1=function(wa){return arguments.length?(ar=wa==null?null:typeof wa=="function"?wa:E(+wa),aa):ar},aa.lineX0=aa.lineY0=function(){return Sa().x(ot).y(jt)},aa.lineY1=function(){return Sa().x(ot).y(ar)},aa.lineX1=function(){return Sa().x(kt).y(jt)},aa.defined=function(wa){return arguments.length?(Er=typeof wa=="function"?wa:E(!!wa),aa):Er},aa.curve=function(wa){return arguments.length?(zr=wa,xr!=null&&(Lr=zr(xr)),aa):zr},aa.context=function(wa){return arguments.length?(wa==null?xr=Lr=null:Lr=zr(xr=wa),aa):xr},aa}function O(ot,kt){return ktot?1:kt>=ot?0:NaN}function D(ot){return ot}function B(){var ot=D,kt=O,jt=null,ar=E(0),Er=E(m),xr=E(0);function zr(Lr){var aa,Sa=Lr.length,wa,pn,tn=0,ai=new Array(Sa),rn=new Array(Sa),Ri=+ar.apply(this,arguments),Gn=Math.min(m,Math.max(-m,Er.apply(this,arguments)-Ri)),no,Di=Math.min(Math.abs(Gn)/Sa,xr.apply(this,arguments)),fn=Di*(Gn<0?-1:1),Ai;for(aa=0;aa0&&(tn+=Ai);for(kt!=null?ai.sort(function(jn,Xn){return kt(rn[jn],rn[Xn])}):jt!=null&&ai.sort(function(jn,Xn){return jt(Lr[jn],Lr[Xn])}),aa=0,pn=tn?(Gn-Sa*fn)/tn:0;aa0?Ai*pn:0)+fn,rn[wa]={data:Lr[wa],index:aa,value:Ai,startAngle:Ri,endAngle:no,padAngle:Di};return rn}return zr.value=function(Lr){return arguments.length?(ot=typeof Lr=="function"?Lr:E(+Lr),zr):ot},zr.sortValues=function(Lr){return arguments.length?(kt=Lr,jt=null,zr):kt},zr.sort=function(Lr){return arguments.length?(jt=Lr,kt=null,zr):jt},zr.startAngle=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.endAngle=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.padAngle=function(Lr){return arguments.length?(xr=typeof Lr=="function"?Lr:E(+Lr),zr):xr},zr}var F=j(u);function P(ot){this._curve=ot}P.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ot,kt){this._curve.point(kt*Math.sin(ot),kt*-Math.cos(ot))}};function j(ot){function kt(jt){return new P(ot(jt))}return kt._curve=ot,kt}function U(ot){var kt=ot.curve;return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot.curve=function(jt){return arguments.length?kt(j(jt)):kt()._curve},ot}function $(){return U(z().curve(F))}function Q(){var ot=I().curve(F),kt=ot.curve,jt=ot.lineX0,ar=ot.lineX1,Er=ot.lineY0,xr=ot.lineY1;return ot.angle=ot.x,delete ot.x,ot.startAngle=ot.x0,delete ot.x0,ot.endAngle=ot.x1,delete ot.x1,ot.radius=ot.y,delete ot.y,ot.innerRadius=ot.y0,delete ot.y0,ot.outerRadius=ot.y1,delete ot.y1,ot.lineStartAngle=function(){return U(jt())},delete ot.lineX0,ot.lineEndAngle=function(){return U(ar())},delete ot.lineX1,ot.lineInnerRadius=function(){return U(Er())},delete ot.lineY0,ot.lineOuterRadius=function(){return U(xr())},delete ot.lineY1,ot.curve=function(zr){return arguments.length?kt(j(zr)):kt()._curve},ot}function re(ot,kt){return[(kt=+kt)*Math.cos(ot-=Math.PI/2),kt*Math.sin(ot)]}var ne=Array.prototype.slice;function se(ot){return ot.source}function G(ot){return ot.target}function X(ot){var kt=se,jt=G,ar=A,Er=x,xr=null;function zr(){var Lr,aa=ne.call(arguments),Sa=kt.apply(this,aa),wa=jt.apply(this,aa);if(xr||(xr=Lr=b.path()),ot(xr,+ar.apply(this,(aa[0]=Sa,aa)),+Er.apply(this,aa),+ar.apply(this,(aa[0]=wa,aa)),+Er.apply(this,aa)),Lr)return xr=null,Lr+""||null}return zr.source=function(Lr){return arguments.length?(kt=Lr,zr):kt},zr.target=function(Lr){return arguments.length?(jt=Lr,zr):jt},zr.x=function(Lr){return arguments.length?(ar=typeof Lr=="function"?Lr:E(+Lr),zr):ar},zr.y=function(Lr){return arguments.length?(Er=typeof Lr=="function"?Lr:E(+Lr),zr):Er},zr.context=function(Lr){return arguments.length?(xr=Lr??null,zr):xr},zr}function K(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt=(kt+ar)/2,jt,kt,Er,ar,Er)}function H(ot,kt,jt,ar,Er){ot.moveTo(kt,jt),ot.bezierCurveTo(kt,jt=(jt+Er)/2,ar,jt,ar,Er)}function Y(ot,kt,jt,ar,Er){var xr=re(kt,jt),zr=re(kt,jt=(jt+Er)/2),Lr=re(ar,jt),aa=re(ar,Er);ot.moveTo(xr[0],xr[1]),ot.bezierCurveTo(zr[0],zr[1],Lr[0],Lr[1],aa[0],aa[1])}function q(){return X(K)}function Z(){return X(H)}function ee(){var ot=X(Y);return ot.angle=ot.x,delete ot.x,ot.radius=ot.y,delete ot.y,ot}var ae={draw:function(ot,kt){var jt=Math.sqrt(kt/s);ot.moveTo(jt,0),ot.arc(0,0,jt,0,m)}},he={draw:function(ot,kt){var jt=Math.sqrt(kt/5)/2;ot.moveTo(-3*jt,-jt),ot.lineTo(-jt,-jt),ot.lineTo(-jt,-3*jt),ot.lineTo(jt,-3*jt),ot.lineTo(jt,-jt),ot.lineTo(3*jt,-jt),ot.lineTo(3*jt,jt),ot.lineTo(jt,jt),ot.lineTo(jt,3*jt),ot.lineTo(-jt,3*jt),ot.lineTo(-jt,jt),ot.lineTo(-3*jt,jt),ot.closePath()}},xe=Math.sqrt(1/3),we=xe*2,Me={draw:function(ot,kt){var jt=Math.sqrt(kt/we),ar=jt*xe;ot.moveTo(0,-jt),ot.lineTo(ar,0),ot.lineTo(0,jt),ot.lineTo(-ar,0),ot.closePath()}},Se=.8908130915292852,Ie=Math.sin(s/10)/Math.sin(7*s/10),Ve=Math.sin(m/10)*Ie,Ge=-Math.cos(m/10)*Ie,ke={draw:function(ot,kt){var jt=Math.sqrt(kt*Se),ar=Ve*jt,Er=Ge*jt;ot.moveTo(0,-jt),ot.lineTo(ar,Er);for(var xr=1;xr<5;++xr){var zr=m*xr/5,Lr=Math.cos(zr),aa=Math.sin(zr);ot.lineTo(aa*jt,-Lr*jt),ot.lineTo(Lr*ar-aa*Er,aa*ar+Lr*Er)}ot.closePath()}},_e={draw:function(ot,kt){var jt=Math.sqrt(kt),ar=-jt/2;ot.rect(ar,ar,jt,jt)}},ce=Math.sqrt(3),ve={draw:function(ot,kt){var jt=-Math.sqrt(kt/(ce*3));ot.moveTo(0,jt*2),ot.lineTo(-ce*jt,-jt),ot.lineTo(ce*jt,-jt),ot.closePath()}},le=-.5,Ae=Math.sqrt(3)/2,Be=1/Math.sqrt(12),Xe=(Be/2+1)*3,Ye={draw:function(ot,kt){var jt=Math.sqrt(kt/Xe),ar=jt/2,Er=jt*Be,xr=ar,zr=jt*Be+jt,Lr=-xr,aa=zr;ot.moveTo(ar,Er),ot.lineTo(xr,zr),ot.lineTo(Lr,aa),ot.lineTo(le*ar-Ae*Er,Ae*ar+le*Er),ot.lineTo(le*xr-Ae*zr,Ae*xr+le*zr),ot.lineTo(le*Lr-Ae*aa,Ae*Lr+le*aa),ot.lineTo(le*ar+Ae*Er,le*Er-Ae*ar),ot.lineTo(le*xr+Ae*zr,le*zr-Ae*xr),ot.lineTo(le*Lr+Ae*aa,le*aa-Ae*Lr),ot.closePath()}},yt=[ae,he,Me,_e,ke,ve,Ye];function gt(){var ot=E(ae),kt=E(64),jt=null;function ar(){var Er;if(jt||(jt=Er=b.path()),ot.apply(this,arguments).draw(jt,+kt.apply(this,arguments)),Er)return jt=null,Er+""||null}return ar.type=function(Er){return arguments.length?(ot=typeof Er=="function"?Er:E(Er),ar):ot},ar.size=function(Er){return arguments.length?(kt=typeof Er=="function"?Er:E(+Er),ar):kt},ar.context=function(Er){return arguments.length?(jt=Er??null,ar):jt},ar}function Tt(){}function At(ot,kt,jt){ot._context.bezierCurveTo((2*ot._x0+ot._x1)/3,(2*ot._y0+ot._y1)/3,(ot._x0+2*ot._x1)/3,(ot._y0+2*ot._y1)/3,(ot._x0+4*ot._x1+kt)/6,(ot._y0+4*ot._y1+jt)/6)}function $t(ot){this._context=ot}$t.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:At(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);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:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function rr(ot){return new $t(ot)}function _r(ot){this._context=ot}_r.prototype={areaStart:Tt,areaEnd:Tt,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);break}}},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x2=ot,this._y2=kt;break;case 1:this._point=2,this._x3=ot,this._y3=kt;break;case 2:this._point=3,this._x4=ot,this._y4=kt,this._context.moveTo((this._x0+4*this._x1+ot)/6,(this._y0+4*this._y1+kt)/6);break;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Xt(ot){return new _r(ot)}function or(ot){this._context=ot}or.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var jt=(this._x0+4*this._x1+ot)/6,ar=(this._y0+4*this._y1+kt)/6;this._line?this._context.lineTo(jt,ar):this._context.moveTo(jt,ar);break;case 3:this._point=4;default:At(this,ot,kt);break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt}};function Ot(ot){return new or(ot)}function vt(ot,kt){this._basis=new $t(ot),this._beta=kt}vt.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length-1;if(jt>0)for(var ar=ot[0],Er=kt[0],xr=ot[jt]-ar,zr=kt[jt]-Er,Lr=-1,aa;++Lr<=jt;)aa=Lr/jt,this._basis.point(this._beta*ot[Lr]+(1-this._beta)*(ar+aa*xr),this._beta*kt[Lr]+(1-this._beta)*(Er+aa*zr));this._x=this._y=null,this._basis.lineEnd()},point:function(ot,kt){this._x.push(+ot),this._y.push(+kt)}};var ht=function ot(kt){function jt(ar){return kt===1?new $t(ar):new vt(ar,kt)}return jt.beta=function(ar){return ot(+ar)},jt}(.85);function De(ot,kt,jt){ot._context.bezierCurveTo(ot._x1+ot._k*(ot._x2-ot._x0),ot._y1+ot._k*(ot._y2-ot._y0),ot._x2+ot._k*(ot._x1-kt),ot._y2+ot._k*(ot._y1-jt),ot._x2,ot._y2)}function Ne(ot,kt){this._context=ot,this._k=(1-kt)/6}Ne.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:De(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2,this._x1=ot,this._y1=kt;break;case 2:this._point=3;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var We=function ot(kt){function jt(ar){return new Ne(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function Ke(ot,kt){this._context=ot,this._k=(1-kt)/6}Ke.prototype={areaStart:Tt,areaEnd:Tt,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);break}}},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Je=function ot(kt){function jt(ar){return new Ke(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function et(ot,kt){this._context=ot,this._k=(1-kt)/6}et.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){switch(ot=+ot,kt=+kt,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:De(this,ot,kt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Mt=function ot(kt){function jt(ar){return new et(ar,kt)}return jt.tension=function(ar){return ot(+ar)},jt}(0);function pt(ot,kt,jt){var ar=ot._x1,Er=ot._y1,xr=ot._x2,zr=ot._y2;if(ot._l01_a>o){var Lr=2*ot._l01_2a+3*ot._l01_a*ot._l12_a+ot._l12_2a,aa=3*ot._l01_a*(ot._l01_a+ot._l12_a);ar=(ar*Lr-ot._x0*ot._l12_2a+ot._x2*ot._l01_2a)/aa,Er=(Er*Lr-ot._y0*ot._l12_2a+ot._y2*ot._l01_2a)/aa}if(ot._l23_a>o){var Sa=2*ot._l23_2a+3*ot._l23_a*ot._l12_a+ot._l12_2a,wa=3*ot._l23_a*(ot._l23_a+ot._l12_a);xr=(xr*Sa+ot._x1*ot._l23_2a-kt*ot._l12_2a)/wa,zr=(zr*Sa+ot._y1*ot._l23_2a-jt*ot._l12_2a)/wa}ot._context.bezierCurveTo(ar,Er,xr,zr,ot._x2,ot._y2)}function Pt(ot,kt){this._context=ot,this._alpha=kt}Pt.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3;default:pt(this,ot,kt);break}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=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Ct=function ot(kt){function jt(ar){return kt?new Pt(ar,kt):new Ne(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function qt(ot,kt){this._context=ot,this._alpha=kt}qt.prototype={areaStart:Tt,areaEnd:Tt,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);break}}},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ot,this._y3=kt;break;case 1:this._point=2,this._context.moveTo(this._x4=ot,this._y4=kt);break;case 2:this._point=3,this._x5=ot,this._y5=kt;break;default:pt(this,ot,kt);break}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=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Vt=function ot(kt){function jt(ar){return kt?new qt(ar,kt):new Ke(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Ht(ot,kt){this._context=ot,this._alpha=kt}Ht.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){if(ot=+ot,kt=+kt,this._point){var jt=this._x2-ot,ar=this._y2-kt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(jt*jt+ar*ar,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:pt(this,ot,kt);break}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=ot,this._y0=this._y1,this._y1=this._y2,this._y2=kt}};var Sr=function ot(kt){function jt(ar){return kt?new Ht(ar,kt):new et(ar,0)}return jt.alpha=function(ar){return ot(+ar)},jt}(.5);function Kr(ot){this._context=ot}Kr.prototype={areaStart:Tt,areaEnd:Tt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ot,kt){ot=+ot,kt=+kt,this._point?this._context.lineTo(ot,kt):(this._point=1,this._context.moveTo(ot,kt))}};function Yt(ot){return new Kr(ot)}function Rt(ot){return ot<0?-1:1}function nr(ot,kt,jt){var ar=ot._x1-ot._x0,Er=kt-ot._x1,xr=(ot._y1-ot._y0)/(ar||Er<0&&-0),zr=(jt-ot._y1)/(Er||ar<0&&-0),Lr=(xr*Er+zr*ar)/(ar+Er);return(Rt(xr)+Rt(zr))*Math.min(Math.abs(xr),Math.abs(zr),.5*Math.abs(Lr))||0}function ur(ot,kt){var jt=ot._x1-ot._x0;return jt?(3*(ot._y1-ot._y0)/jt-kt)/2:kt}function cr(ot,kt,jt){var ar=ot._x0,Er=ot._y0,xr=ot._x1,zr=ot._y1,Lr=(xr-ar)/3;ot._context.bezierCurveTo(ar+Lr,Er+Lr*kt,xr-Lr,zr-Lr*jt,xr,zr)}function Rr(ot){this._context=ot}Rr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:cr(this,this._t0,ur(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ot,kt){var jt=NaN;if(ot=+ot,kt=+kt,!(ot===this._x1&&kt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;break;case 2:this._point=3,cr(this,ur(this,jt=nr(this,ot,kt)),jt);break;default:cr(this,this._t0,jt=nr(this,ot,kt));break}this._x0=this._x1,this._x1=ot,this._y0=this._y1,this._y1=kt,this._t0=jt}}};function Qr(ot){this._context=new Zr(ot)}(Qr.prototype=Object.create(Rr.prototype)).point=function(ot,kt){Rr.prototype.point.call(this,kt,ot)};function Zr(ot){this._context=ot}Zr.prototype={moveTo:function(ot,kt){this._context.moveTo(kt,ot)},closePath:function(){this._context.closePath()},lineTo:function(ot,kt){this._context.lineTo(kt,ot)},bezierCurveTo:function(ot,kt,jt,ar,Er,xr){this._context.bezierCurveTo(kt,ot,ar,jt,xr,Er)}};function ha(ot){return new Rr(ot)}function Pa(ot){return new Qr(ot)}function La(ot){this._context=ot}La.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ot=this._x,kt=this._y,jt=ot.length;if(jt)if(this._line?this._context.lineTo(ot[0],kt[0]):this._context.moveTo(ot[0],kt[0]),jt===2)this._context.lineTo(ot[1],kt[1]);else for(var ar=un(ot),Er=un(kt),xr=0,zr=1;zr=0;--kt)Er[kt]=(zr[kt]-Er[kt+1])/xr[kt];for(xr[jt-1]=(ot[jt]+Er[jt-1])/2,kt=0;kt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ot,kt){switch(ot=+ot,kt=+kt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ot,kt):this._context.moveTo(ot,kt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,kt),this._context.lineTo(ot,kt);else{var jt=this._x*(1-this._t)+ot*this._t;this._context.lineTo(jt,this._y),this._context.lineTo(jt,kt)}break}}this._x=ot,this._y=kt}};function Nn(ot){return new ja(ot,.5)}function yn(ot){return new ja(ot,0)}function Un(ot){return new ja(ot,1)}function li(ot,kt){if((zr=ot.length)>1)for(var jt=1,ar,Er,xr=ot[kt[0]],zr,Lr=xr.length;jt=0;)jt[kt]=kt;return jt}function on(ot,kt){return ot[kt]}function en(){var ot=E([]),kt=Yn,jt=li,ar=on;function Er(xr){var zr=ot.apply(this,arguments),Lr,aa=xr.length,Sa=zr.length,wa=new Array(Sa),pn;for(Lr=0;Lr0){for(var jt,ar,Er=0,xr=ot[0].length,zr;Er0)for(var jt,ar=0,Er,xr,zr,Lr,aa,Sa=ot[kt[0]].length;ar0?(Er[0]=zr,Er[1]=zr+=xr):xr<0?(Er[1]=Lr,Er[0]=Lr+=xr):(Er[0]=0,Er[1]=xr)}function Ja(ot,kt){if((Er=ot.length)>0){for(var jt=0,ar=ot[kt[0]],Er,xr=ar.length;jt0)||!((xr=(Er=ot[kt[0]]).length)>0))){for(var jt=0,ar=1,Er,xr,zr;arxr&&(xr=Er,jt=kt);return jt}function fr(ot){var kt=ot.map(lr);return Yn(ot).sort(function(jt,ar){return kt[jt]-kt[ar]})}function lr(ot){for(var kt=0,jt=-1,ar=ot.length,Er;++jt[I(Ve,Ge,Me),Ve]));for(let[Ve,Ge]of Se.entries()){Ge.index=Ve;let{source:ke,target:_e}=Ge;typeof ke!="object"&&(ke=Ge.source=g(Ie,ke)),typeof _e!="object"&&(_e=Ge.target=g(Ie,_e)),ke.sourceLinks.push(Ge),_e.targetLinks.push(Ge)}if(B!=null)for(let{sourceLinks:Ve,targetLinks:Ge}of Me)Ve.sort(B),Ge.sort(B)}function re({nodes:Me}){for(let Se of Me)Se.value=Se.fixedValue===void 0?Math.max(b.sum(Se.sourceLinks,c),b.sum(Se.targetLinks,c)):Se.fixedValue}function ne({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.depth=Ge;for(let{target:_e}of ke.sourceLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function se({nodes:Me}){let Se=Me.length,Ie=new Set(Me),Ve=new Set,Ge=0;for(;Ie.size;){for(let ke of Ie){ke.height=Ge;for(let{source:_e}of ke.targetLinks)Ve.add(_e)}if(++Ge>Se)throw new Error("circular link");Ie=Ve,Ve=new Set}}function G({nodes:Me}){let Se=b.max(Me,Ge=>Ge.depth)+1,Ie=(f-_-A)/(Se-1),Ve=new Array(Se);for(let Ge of Me){let ke=Math.max(0,Math.min(Se-1,Math.floor(O.call(null,Ge,Se))));Ge.layer=ke,Ge.x0=_+ke*Ie,Ge.x1=Ge.x0+A,Ve[ke]?Ve[ke].push(Ge):Ve[ke]=[Ge]}if(D)for(let Ge of Ve)Ge.sort(D);return Ve}function X(Me){let Se=b.min(Me,Ie=>(u-T-(Ie.length-1)*z)/b.sum(Ie,c));for(let Ie of Me){let Ve=T;for(let Ge of Ie){Ge.y0=Ve,Ge.y1=Ve+Ge.value*Se,Ve=Ge.y1+z;for(let ke of Ge.sourceLinks)ke.width=ke.value*Se}Ve=(u-Ve+z)/(Ie.length+1);for(let Ge=0;GeIe.length)-1)),X(Se);for(let Ie=0;Ie0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function Y(Me,Se,Ie){for(let Ve=Me.length,Ge=Ve-2;Ge>=0;--Ge){let ke=Me[Ge];for(let _e of ke){let ce=0,ve=0;for(let{target:Ae,value:Be}of _e.sourceLinks){let Xe=Be*(Ae.layer-_e.layer);ce+=we(_e,Ae)*Xe,ve+=Xe}if(!(ve>0))continue;let le=(ce/ve-_e.y0)*Se;_e.y0+=le,_e.y1+=le,ae(_e)}D===void 0&&ke.sort(s),q(ke,Ie)}}function q(Me,Se){let Ie=Me.length>>1,Ve=Me[Ie];ee(Me,Ve.y0-z,Ie-1,Se),Z(Me,Ve.y1+z,Ie+1,Se),ee(Me,u,Me.length-1,Se),Z(Me,T,0,Se)}function Z(Me,Se,Ie,Ve){for(;Ie1e-6&&(Ge.y0+=ke,Ge.y1+=ke),Se=Ge.y1+z}}function ee(Me,Se,Ie,Ve){for(;Ie>=0;--Ie){let Ge=Me[Ie],ke=(Ge.y1-Se)*Ve;ke>1e-6&&(Ge.y0-=ke,Ge.y1-=ke),Se=Ge.y0-z}}function ae({sourceLinks:Me,targetLinks:Se}){if(B===void 0){for(let{source:{sourceLinks:Ie}}of Se)Ie.sort(o);for(let{target:{targetLinks:Ie}}of Me)Ie.sort(a)}}function he(Me){if(B===void 0)for(let{sourceLinks:Se,targetLinks:Ie}of Me)Se.sort(o),Ie.sort(a)}function xe(Me,Se){let Ie=Me.y0-(Me.sourceLinks.length-1)*z/2;for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie+=Ge+z}for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie-=Ge}return Ie}function we(Me,Se){let Ie=Se.y0-(Se.targetLinks.length-1)*z/2;for(let{source:Ve,width:Ge}of Se.targetLinks){if(Ve===Me)break;Ie+=Ge+z}for(let{target:Ve,width:Ge}of Me.sourceLinks){if(Ve===Se)break;Ie-=Ge}return Ie}return $}function S(_){return[_.source.x1,_.y0]}function M(_){return[_.target.x0,_.y1]}function C(){return E.linkHorizontal().source(S).target(M)}p.sankey=w,p.sankeyCenter=n,p.sankeyJustify=t,p.sankeyLeft=l,p.sankeyLinkHorizontal=C,p.sankeyRight=e,Object.defineProperty(p,"__esModule",{value:!0})})}}),LV=ze({"node_modules/@plotly/d3-sankey-circular/node_modules/d3-array/dist/d3-array.js"(J,V){(function(p,b){b(typeof J=="object"&&typeof V<"u"?J:p.d3=p.d3||{})})(J,function(p){"use strict";function b(K,H){return KH?1:K>=H?0:NaN}function E(K){return K.length===1&&(K=k(K)),{left:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)<0?q=ee+1:Z=ee}return q},right:function(H,Y,q,Z){for(q==null&&(q=0),Z==null&&(Z=H.length);q>>1;K(H[ee],Y)>0?Z=ee:q=ee+1}return q}}}function k(K){return function(H,Y){return b(K(H),Y)}}var l=E(b),e=l.right,t=l.left;function n(K,H){H==null&&(H=r);for(var Y=0,q=K.length-1,Z=K[0],ee=new Array(q<0?0:q);YK?1:H>=K?0:NaN}function s(K){return K===null?NaN:+K}function c(K,H){var Y=K.length,q=0,Z=-1,ee=0,ae,he,xe=0;if(H==null)for(;++Z1)return xe/(q-1)}function m(K,H){var Y=c(K,H);return Y&&Math.sqrt(Y)}function h(K,H){var Y=K.length,q=-1,Z,ee,ae;if(H==null){for(;++q=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae=Z)for(ee=ae=Z;++qZ&&(ee=Z),ae0)return[K];if((q=H0)for(K=Math.ceil(K/he),H=Math.floor(H/he),ae=new Array(ee=Math.ceil(H-K+1));++Z=0?(ee>=C?10:ee>=_?5:ee>=T?2:1)*Math.pow(10,Z):-Math.pow(10,-Z)/(ee>=C?10:ee>=_?5:ee>=T?2:1)}function A(K,H,Y){var q=Math.abs(H-K)/Math.max(0,Y),Z=Math.pow(10,Math.floor(Math.log(q)/Math.LN10)),ee=q/Z;return ee>=C?Z*=10:ee>=_?Z*=5:ee>=T&&(Z*=2),HSe;)Ie.pop(),--Ve;var Ge=new Array(Ve+1),ke;for(ee=0;ee<=Ve;++ee)ke=Ge[ee]=[],ke.x0=ee>0?Ie[ee-1]:Me,ke.x1=ee=1)return+Y(K[q-1],q-1,K);var q,Z=(q-1)*H,ee=Math.floor(Z),ae=+Y(K[ee],ee,K),he=+Y(K[ee+1],ee+1,K);return ae+(he-ae)*(Z-ee)}}function O(K,H,Y){return K=i.call(K,s).sort(b),Math.ceil((Y-H)/(2*(I(K,.75)-I(K,.25))*Math.pow(K.length,-1/3)))}function D(K,H,Y){return Math.ceil((Y-H)/(3.5*m(K)*Math.pow(K.length,-1/3)))}function B(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qee&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qee&&(ee=Z);return ee}function F(K,H){var Y=K.length,q=Y,Z=-1,ee,ae=0;if(H==null)for(;++Z=0;)for(ae=K[H],Y=ae.length;--Y>=0;)ee[--Z]=ae[Y];return ee}function U(K,H){var Y=K.length,q=-1,Z,ee;if(H==null){for(;++q=Z)for(ee=Z;++qZ&&(ee=Z)}else for(;++q=Z)for(ee=Z;++qZ&&(ee=Z);return ee}function $(K,H){for(var Y=H.length,q=new Array(Y);Y--;)q[Y]=K[H[Y]];return q}function Q(K,H){if(Y=K.length){var Y,q=0,Z=0,ee,ae=K[Z];for(H==null&&(H=b);++q=M})}function h(M){m(M);for(var C=E,_=p(C),T=_.components.filter(function(O){return O.length>1}),f=1/0,u,A=0;A"u"?"undefined":s(Ne))!=="object"&&(Ne=ht.source=_(vt,Ne)),(typeof We>"u"?"undefined":s(We))!=="object"&&(We=ht.target=_(vt,We)),Ne.sourceLinks.push(ht),We.targetLinks.push(ht)}),Ot}function At(Ot){Ot.nodes.forEach(function(vt){vt.partOfCycle=!1,vt.value=Math.max(b.sum(vt.sourceLinks,v),b.sum(vt.targetLinks,v)),vt.sourceLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)}),vt.targetLinks.forEach(function(ht){ht.circular&&(vt.partOfCycle=!0,vt.circularLinkType=ht.circularLinkType)})})}function $t(Ot){var vt=0,ht=0,De=0,Ne=0,We=b.max(Ot.nodes,function(Ke){return Ke.column});return Ot.links.forEach(function(Ke){Ke.circular&&(Ke.circularLinkType=="top"?vt=vt+Ke.width:ht=ht+Ke.width,Ke.target.column==0&&(Ne=Ne+Ke.width),Ke.source.column==We&&(De=De+Ke.width))}),vt=vt>0?vt+f+u:vt,ht=ht>0?ht+f+u:ht,De=De>0?De+f+u:De,Ne=Ne>0?Ne+f+u:Ne,{top:vt,bottom:ht,left:Ne,right:De}}function rr(Ot,vt){var ht=b.max(Ot.nodes,function(Mt){return Mt.column}),De=Ve-Se,Ne=Ge-Ie,We=De+vt.right+vt.left,Ke=Ne+vt.top+vt.bottom,Je=De/We,et=Ne/Ke;return Se=Se*Je+vt.left,Ve=vt.right==0?Ve:Ve*Je,Ie=Ie*et+vt.top,Ge=Ge*et,Ot.nodes.forEach(function(Mt){Mt.x0=Se+Mt.column*((Ve-Se-ke)/ht),Mt.x1=Mt.x0+ke}),et}function _r(Ot){var vt,ht,De;for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.depth=De,Ne.sourceLinks.forEach(function(We){ht.indexOf(We.target)<0&&!We.circular&&ht.push(We.target)})});for(vt=Ot.nodes,ht=[],De=0;vt.length;++De,vt=ht,ht=[])vt.forEach(function(Ne){Ne.height=De,Ne.targetLinks.forEach(function(We){ht.indexOf(We.source)<0&&!We.circular&&ht.push(We.source)})});Ot.nodes.forEach(function(Ne){Ne.column=Math.floor(ve.call(null,Ne,De))})}function Xt(Ot,vt,ht){var De=E.nest().key(function(Mt){return Mt.column}).sortKeys(b.ascending).entries(Ot.nodes).map(function(Mt){return Mt.values});Ke(ht),et();for(var Ne=1,We=vt;We>0;--We)Je(Ne*=.99,ht),et();function Ke(Mt){if(Ye){var pt=1/0;De.forEach(function(Vt){var Ht=Ge*Ye/(Vt.length+1);pt=Ht0))if(Vt==0&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else if(Vt==Pt-1&&qt==1)Sr=Ht.y1-Ht.y0,Ht.y0=Ge/2-Sr/2,Ht.y1=Ge/2+Sr/2;else{var Kr=0,Yt=b.mean(Ht.sourceLinks,w),Rt=b.mean(Ht.targetLinks,i);Yt&&Rt?Kr=(Yt+Rt)/2:Kr=Yt||Rt;var nr=(Kr-g(Ht))*Mt;Ht.y0+=nr,Ht.y1+=nr}})})}function et(){De.forEach(function(Mt){var pt,Pt,Ct=Ie,qt=Mt.length,Vt;for(Mt.sort(h),Vt=0;Vt0&&(pt.y0+=Pt,pt.y1+=Pt),Ct=pt.y1+_e;if(Pt=Ct-_e-Ge,Pt>0)for(Ct=pt.y0-=Pt,pt.y1-=Pt,Vt=qt-2;Vt>=0;--Vt)pt=Mt[Vt],Pt=pt.y1+_e-Ct,Pt>0&&(pt.y0-=Pt,pt.y1-=Pt),Ct=pt.y0})}}function or(Ot){Ot.nodes.forEach(function(vt){vt.sourceLinks.sort(m),vt.targetLinks.sort(c)}),Ot.nodes.forEach(function(vt){var ht=vt.y0,De=ht,Ne=vt.y1,We=Ne;vt.sourceLinks.forEach(function(Ke){Ke.circular?(Ke.y0=Ne-Ke.width/2,Ne=Ne-Ke.width):(Ke.y0=ht+Ke.width/2,ht+=Ke.width)}),vt.targetLinks.forEach(function(Ke){Ke.circular?(Ke.y1=We-Ke.width/2,We=We-Ke.width):(Ke.y1=De+Ke.width/2,De+=Ke.width)})})}return gt}function z(Se,Ie,Ve){var Ge=0;if(Ve===null){for(var ke=[],_e=0;_eIe.source.column)}function B(Se,Ie){var Ve=0;Se.sourceLinks.forEach(function(ke){Ve=ke.circular&&!we(ke,Ie)?Ve+1:Ve});var Ge=0;return Se.targetLinks.forEach(function(ke){Ge=ke.circular&&!we(ke,Ie)?Ge+1:Ge}),Ve+Ge}function F(Se){var Ie=Se.source.sourceLinks,Ve=0;Ie.forEach(function(_e){Ve=_e.circular?Ve+1:Ve});var Ge=Se.target.targetLinks,ke=0;return Ge.forEach(function(_e){ke=_e.circular?ke+1:ke}),!(Ve>1||ke>1)}function P(Se,Ie,Ve){return Se.sort($),Se.forEach(function(Ge,ke){var _e=0;if(we(Ge,Ve)&&F(Ge))Ge.circularPathData.verticalBuffer=_e+Ge.width/2;else{var ce=0;for(ce;ce_e?ve:_e}Ge.circularPathData.verticalBuffer=_e+Ge.width/2}}),Se}function j(Se,Ie,Ve,Ge){var ke=5,_e=b.min(Se.links,function(le){return le.source.y0});Se.links.forEach(function(le){le.circular&&(le.circularPathData={})});var ce=Se.links.filter(function(le){return le.circularLinkType=="top"});P(ce,Ie,Ge);var ve=Se.links.filter(function(le){return le.circularLinkType=="bottom"});P(ve,Ie,Ge),Se.links.forEach(function(le){if(le.circular){if(le.circularPathData.arcRadius=le.width+u,le.circularPathData.leftNodeBuffer=ke,le.circularPathData.rightNodeBuffer=ke,le.circularPathData.sourceWidth=le.source.x1-le.source.x0,le.circularPathData.sourceX=le.source.x0+le.circularPathData.sourceWidth,le.circularPathData.targetX=le.target.x0,le.circularPathData.sourceY=le.y0,le.circularPathData.targetY=le.y1,we(le,Ge)&&F(le))le.circularPathData.leftSmallArcRadius=u+le.width/2,le.circularPathData.leftLargeArcRadius=u+le.width/2,le.circularPathData.rightSmallArcRadius=u+le.width/2,le.circularPathData.rightLargeArcRadius=u+le.width/2,le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=le.source.y1+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=le.source.y0-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius);else{var Ae=le.source.column,Be=le.circularLinkType,Xe=Se.links.filter(function(gt){return gt.source.column==Ae&>.circularLinkType==Be});le.circularLinkType=="bottom"?Xe.sort(re):Xe.sort(Q);var Ye=0;Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.leftSmallArcRadius=u+le.width/2+Ye,le.circularPathData.leftLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),Ae=le.target.column,Xe=Se.links.filter(function(gt){return gt.target.column==Ae&>.circularLinkType==Be}),le.circularLinkType=="bottom"?Xe.sort(se):Xe.sort(ne),Ye=0,Xe.forEach(function(gt,Tt){gt.circularLinkID==le.circularLinkID&&(le.circularPathData.rightSmallArcRadius=u+le.width/2+Ye,le.circularPathData.rightLargeArcRadius=u+le.width/2+Tt*Ie+Ye),Ye=Ye+gt.width}),le.circularLinkType=="bottom"?(le.circularPathData.verticalFullExtent=Math.max(Ve,le.source.y1,le.target.y1)+f+le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent-le.circularPathData.rightLargeArcRadius):(le.circularPathData.verticalFullExtent=_e-f-le.circularPathData.verticalBuffer,le.circularPathData.verticalLeftInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.leftLargeArcRadius,le.circularPathData.verticalRightInnerExtent=le.circularPathData.verticalFullExtent+le.circularPathData.rightLargeArcRadius)}le.circularPathData.leftInnerExtent=le.circularPathData.sourceX+le.circularPathData.leftNodeBuffer,le.circularPathData.rightInnerExtent=le.circularPathData.targetX-le.circularPathData.rightNodeBuffer,le.circularPathData.leftFullExtent=le.circularPathData.sourceX+le.circularPathData.leftLargeArcRadius+le.circularPathData.leftNodeBuffer,le.circularPathData.rightFullExtent=le.circularPathData.targetX-le.circularPathData.rightLargeArcRadius-le.circularPathData.rightNodeBuffer}if(le.circular)le.path=U(le);else{var yt=k.linkHorizontal().source(function(gt){var Tt=gt.source.x0+(gt.source.x1-gt.source.x0),At=gt.y0;return[Tt,At]}).target(function(gt){var Tt=gt.target.x0,At=gt.y1;return[Tt,At]});le.path=yt(le)}})}function U(Se){var Ie="";return Se.circularLinkType=="top"?Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 0 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY-Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 0 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 0 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY-Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 0 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY:Ie="M"+Se.circularPathData.sourceX+" "+Se.circularPathData.sourceY+" L"+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.sourceY+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftSmallArcRadius+" 0 0 1 "+Se.circularPathData.leftFullExtent+" "+(Se.circularPathData.sourceY+Se.circularPathData.leftSmallArcRadius)+" L"+Se.circularPathData.leftFullExtent+" "+Se.circularPathData.verticalLeftInnerExtent+" A"+Se.circularPathData.leftLargeArcRadius+" "+Se.circularPathData.leftLargeArcRadius+" 0 0 1 "+Se.circularPathData.leftInnerExtent+" "+Se.circularPathData.verticalFullExtent+" L"+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.verticalFullExtent+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightLargeArcRadius+" 0 0 1 "+Se.circularPathData.rightFullExtent+" "+Se.circularPathData.verticalRightInnerExtent+" L"+Se.circularPathData.rightFullExtent+" "+(Se.circularPathData.targetY+Se.circularPathData.rightSmallArcRadius)+" A"+Se.circularPathData.rightLargeArcRadius+" "+Se.circularPathData.rightSmallArcRadius+" 0 0 1 "+Se.circularPathData.rightInnerExtent+" "+Se.circularPathData.targetY+" L"+Se.circularPathData.targetX+" "+Se.circularPathData.targetY,Ie}function $(Se,Ie){return G(Se)==G(Ie)?Se.circularLinkType=="bottom"?re(Se,Ie):Q(Se,Ie):G(Ie)-G(Se)}function Q(Se,Ie){return Se.y0-Ie.y0}function re(Se,Ie){return Ie.y0-Se.y0}function ne(Se,Ie){return Se.y1-Ie.y1}function se(Se,Ie){return Ie.y1-Se.y1}function G(Se){return Se.target.column-Se.source.column}function X(Se){return Se.target.x0-Se.source.x1}function K(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1+Ge:Se.y1-Ge;return ke}function H(Se,Ie){var Ve=O(Se),Ge=X(Ie)/Math.tan(Ve),ke=xe(Se)=="up"?Se.y1-Ge:Se.y1+Ge;return ke}function Y(Se,Ie,Ve,Ge){Se.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var _e=ke.source.column+1,ce=ke.target.column-1,ve=1,le=ce-_e+1;for(ve=1;_e<=ce;_e++,ve++)Se.nodes.forEach(function(Ae){if(Ae.column==_e){var Be=ve/(le+1),Xe=Math.pow(1-Be,3),Ye=3*Be*Math.pow(1-Be,2),yt=3*Math.pow(Be,2)*(1-Be),gt=Math.pow(Be,3),Tt=Xe*ke.y0+Ye*ke.y0+yt*ke.y1+gt*ke.y1,At=Tt-ke.width/2,$t=Tt+ke.width/2,rr;At>Ae.y0&&AtAe.y0&&$tAe.y1&&Z(_r,rr,Ie,Ve)})):AtAe.y1&&(rr=$t-Ae.y0+10,Ae=Z(Ae,rr,Ie,Ve),Se.nodes.forEach(function(_r){T(_r,Ge)==T(Ae,Ge)||_r.column!=Ae.column||_r.y0Ae.y1&&Z(_r,rr,Ie,Ve)}))}})}})}function q(Se,Ie){return Se.y0>Ie.y0&&Se.y0Ie.y0&&Se.y1Ie.y1}function Z(Se,Ie,Ve,Ge){return Se.y0+Ie>=Ve&&Se.y1+Ie<=Ge&&(Se.y0=Se.y0+Ie,Se.y1=Se.y1+Ie,Se.targetLinks.forEach(function(ke){ke.y1=ke.y1+Ie}),Se.sourceLinks.forEach(function(ke){ke.y0=ke.y0+Ie})),Se}function ee(Se,Ie,Ve,Ge){Se.nodes.forEach(function(ke){Ge&&ke.y+(ke.y1-ke.y0)>Ie&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-Ie));var _e=Se.links.filter(function(le){return T(le.source,Ve)==T(ke,Ve)}),ce=_e.length;ce>1&&_e.sort(function(le,Ae){if(!le.circular&&!Ae.circular){if(le.target.column==Ae.target.column)return le.y1-Ae.y1;if(he(le,Ae)){if(le.target.column>Ae.target.column){var Be=H(Ae,le);return le.y1-Be}if(Ae.target.column>le.target.column){var Xe=H(le,Ae);return Xe-Ae.y1}}else return le.y1-Ae.y1}if(le.circular&&!Ae.circular)return le.circularLinkType=="top"?-1:1;if(Ae.circular&&!le.circular)return Ae.circularLinkType=="top"?1:-1;if(le.circular&&Ae.circular)return le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="top"?le.target.column===Ae.target.column?le.target.y1-Ae.target.y1:Ae.target.column-le.target.column:le.circularLinkType===Ae.circularLinkType&&le.circularLinkType=="bottom"?le.target.column===Ae.target.column?Ae.target.y1-le.target.y1:le.target.column-Ae.target.column:le.circularLinkType=="top"?-1:1});var ve=ke.y0;_e.forEach(function(le){le.y0=ve+le.width/2,ve=ve+le.width}),_e.forEach(function(le,Ae){if(le.circularLinkType=="bottom"){var Be=Ae+1,Xe=0;for(Be;Be1&&ke.sort(function(ve,le){if(!ve.circular&&!le.circular){if(ve.source.column==le.source.column)return ve.y0-le.y0;if(he(ve,le)){if(le.source.column0?"up":"down"}function we(Se,Ie){return T(Se.source,Ie)==T(Se.target,Ie)}function Me(Se,Ie,Ve){var Ge=Se.nodes,ke=Se.links,_e=!1,ce=!1;if(ke.forEach(function(Ye){Ye.circularLinkType=="top"?_e=!0:Ye.circularLinkType=="bottom"&&(ce=!0)}),_e==!1||ce==!1){var ve=b.min(Ge,function(Ye){return Ye.y0}),le=b.max(Ge,function(Ye){return Ye.y1}),Ae=le-ve,Be=Ve-Ie,Xe=Be/Ae;Ge.forEach(function(Ye){var yt=(Ye.y1-Ye.y0)*Xe;Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=Ye.y0+yt}),ke.forEach(function(Ye){Ye.y0=(Ye.y0-ve)*Xe,Ye.y1=(Ye.y1-ve)*Xe,Ye.width=Ye.width*Xe})}}p.sankeyCircular=x,p.sankeyCenter=a,p.sankeyLeft=t,p.sankeyRight=n,p.sankeyJustify=r,Object.defineProperty(p,"__esModule",{value:!0})})}}),OM=ze({"src/traces/sankey/constants.js"(J,V){"use strict";V.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}}}),IV=ze({"src/traces/sankey/render.js"(J,V){"use strict";var p=SV(),b=(l0(),Po(_v)).interpolateNumber,E=ci(),k=CV(),l=RV(),e=OM(),t=Qn(),n=$i(),r=Nr(),a=r.strTranslate,o=r.strRotate,s=Vd(),c=s.keyFun,m=s.repeat,h=s.unwrap,v=Cs(),g=mi(),i=dc(),w=i.CAP_SHIFT,S=i.LINE_SPACING,M=3;function C(X,K,H){var Y=h(K),q=Y.trace,Z=q.domain,ee=q.orientation==="h",ae=q.direction==="reversed",he=q.node.pad,xe=q.node.thickness,we={justify:k.sankeyJustify,left:k.sankeyLeft,right:k.sankeyRight,center:k.sankeyCenter}[q.node.align],Me=X.width*(Z.x[1]-Z.x[0]),Se=X.height*(Z.y[1]-Z.y[0]),Ie=Y._nodes,Ve=Y._links,Ge=Y.circular,ke;Ge?ke=l.sankeyCircular().circularLinkGap(0):ke=k.sankey(),ke.iterations(e.sankeyIterations).size(ee?[Me,Se]:[Se,Me]).nodeWidth(xe).nodePadding(he).nodeId(function(Xt){return Xt.pointNumber}).nodeAlign(we).nodes(Ie).links(Ve);function _e(Xt){q[Xt].sort==="input"&&(Ge?r.warn(`Circular Sankey diagrams do not support the "input" ${Xt}.sort mode; falling back to the default sort.`):ke[`${Xt}Sort`](null))}_e("link"),_e("node");var ce=ke();ke.nodePadding()=ht||(vt=ht-Ot.y0,vt>1e-6&&(Ot.y0+=vt,Ot.y1+=vt)),ht=Ot.y1+he})}function At(Xt){var or=Xt.map(function(Ke,Je){return{x0:Ke.x0,index:Je}}).sort(function(Ke,Je){return Ke.x0-Je.x0}),Ot=[],vt=-1,ht,De=-1/0,Ne;for(ve=0;veDe+xe&&(vt+=1,ht=We.x0),De=We.x0,Ot[vt]||(Ot[vt]=[]),Ot[vt].push(We),Ne=ht-We.x0,We.x0+=Ne,We.x1+=Ne}return Ot}if(q.node.x.length&&q.node.y.length){for(ve=0;ve0?" L "+q.targetX+" "+q.targetY:"")+"Z"):(H="M "+(q.targetX-K)+" "+(q.targetY-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.targetY-Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightSmallArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent-Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" L "+(q.rightFullExtent-Y-K)+" "+q.verticalRightInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-Y-K)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent+Y-K-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent-K-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.leftFullExtent+Y+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent:H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent+Y)+" L "+q.leftInnerExtent+" "+(q.verticalFullExtent+Y)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+q.verticalLeftInnerExtent,H+=" L "+(q.leftFullExtent+Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" A "+(q.leftLargeArcRadius+Y)+" "+(q.leftSmallArcRadius+Y)+" 0 0 0 "+q.leftInnerExtent+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY-Y)+" L "+q.sourceX+" "+(q.sourceY+Y)+" L "+q.leftInnerExtent+" "+(q.sourceY+Y)+" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y)+" "+(q.sourceY+q.leftSmallArcRadius)+" L "+(q.leftFullExtent-Y)+" "+q.verticalLeftInnerExtent,Z&&ee?H+=" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.leftFullExtent-Y-(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" L "+(q.rightFullExtent+Y-K+(q.rightLargeArcRadius-Y))+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:Z?H+=" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.leftFullExtent+Y)+" "+(q.verticalFullExtent+Y)+" L "+(q.rightFullExtent-K-Y)+" "+(q.verticalFullExtent+Y)+" A "+(q.rightLargeArcRadius+Y)+" "+(q.rightLargeArcRadius+Y)+" 0 0 0 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent:H+=" A "+(q.leftLargeArcRadius-Y)+" "+(q.leftLargeArcRadius-Y)+" 0 0 1 "+q.leftInnerExtent+" "+(q.verticalFullExtent-Y)+" L "+(q.rightInnerExtent-K)+" "+(q.verticalFullExtent-Y)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightLargeArcRadius-Y)+" 0 0 1 "+(q.rightFullExtent+Y-K)+" "+q.verticalRightInnerExtent,H+=" L "+(q.rightFullExtent+Y-K)+" "+(q.targetY+q.rightSmallArcRadius)+" A "+(q.rightLargeArcRadius-Y)+" "+(q.rightSmallArcRadius-Y)+" 0 0 1 "+(q.rightInnerExtent-K)+" "+(q.targetY+Y)+" L "+(q.targetX-K)+" "+(q.targetY+Y)+(K>0?" L "+q.targetX+" "+q.targetY:"")+"Z"),H}function f(){var X=.5;function K(H){var Y=H.linkArrowLength;if(H.link.circular)return T(H.link,Y);var q=Math.abs((H.link.target.x0-H.link.source.x1)/2);Y>q&&(Y=q);var Z=H.link.source.x1,ee=H.link.target.x0-Y,ae=b(Z,ee),he=ae(X),xe=ae(1-X),we=H.link.y0-H.link.width/2,Me=H.link.y0+H.link.width/2,Se=H.link.y1-H.link.width/2,Ie=H.link.y1+H.link.width/2,Ve="M"+Z+","+we,Ge="C"+he+","+we+" "+xe+","+Se+" "+ee+","+Se,ke="C"+xe+","+Ie+" "+he+","+Me+" "+Z+","+Me,_e=Y>0?"L"+(ee+Y)+","+(Se+H.link.width/2):"";return _e+="L"+ee+","+Ie,Ve+Ge+_e+ke+"Z"}return K}function u(X,K){var H=e.nodePadAcross,Y=X.nodePad/2;K.dx=K.x1-K.x0,K.dy=K.y1-K.y0;var q=K.dx,Z=Math.max(.5,K.dy),ee="node_"+K.pointNumber;return K.group&&(ee=r.randstr()),K.trace=X.trace,K.curveNumber=X.trace.index,{index:K.pointNumber,key:ee,partOfGroup:K.partOfGroup||!1,group:K.group,traceId:X.key,trace:X.trace,node:K,nodePad:X.nodePad,nodeLineColor:X.nodeLineColor,nodeLineWidth:X.nodeLineWidth,textFont:X.textFont,size:X.horizontal?X.height:X.width,visibleWidth:Math.ceil(q),visibleHeight:Z,zoneX:-H,zoneY:-Y,zoneWidth:q+2*H,zoneHeight:Z+2*Y,labelY:X.horizontal?K.dy/2+1:K.dx/2+1,left:K.originalLayer===1,sizeAcross:X.width,forceLayouts:X.forceLayouts,horizontal:X.horizontal,reversed:X.reversed,rgb:t.rgb(K.color),alpha:t.parse(K.color).alpha,valueFormat:X.valueFormat,valueSuffix:X.valueSuffix,sankey:X.sankey,graph:X.graph,arrangement:X.arrangement,uniqueNodeLabelPathId:[X.guid,X.key,ee].join("_"),interactionState:X.interactionState,figure:X}}function A(X){X.attr("transform",function(K){return a(K.node.x0.toFixed(3),K.node.y0.toFixed(3))})}function x(X){X.call(A)}function z(X,K){X.call(x),K.attr("d",f())}function I(X){X.attr("width",function(K){return K.node.x1-K.node.x0}).attr("height",function(K){return K.visibleHeight})}function O(X){return X.link.width>1||X.linkLineWidth>0}function D(X){return X.horizontal?X.reversed?a(X.translateX+X.width,X.translateY)+"matrix(-1 0 0 1 0 0)":a(X.translateX,X.translateY)+"matrix(1 0 0 1 0 0)":X.reversed?a(X.translateX,X.translateY+X.height)+"matrix(0 -1 1 0 0 0)":a(X.translateX,X.translateY)+"matrix(0 1 1 0 0 0)"}function B(X,K,H){X.on(".basic",null).on("mouseover.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.hover(this,Y,K),Y.interactionState.hovered=[this,Y])}).on("mousemove.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.follow(this,Y),Y.interactionState.hovered=[this,Y])}).on("mouseout.basic",function(Y){!Y.interactionState.dragInProgress&&!Y.partOfGroup&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1)}).on("click.basic",function(Y){Y.interactionState.hovered&&(H.unhover(this,Y,K),Y.interactionState.hovered=!1),!Y.interactionState.dragInProgress&&!Y.partOfGroup&&H.select(this,Y,K)})}function F(X,K,H,Y){var q=E.behavior.drag().origin(function(Z){return{x:Z.node.x0+Z.visibleWidth/2,y:Z.node.y0+Z.visibleHeight/2}}).on("dragstart",function(Z){if(Z.arrangement!=="fixed"&&(r.ensureSingle(Y._fullLayout._infolayer,"g","dragcover",function(ae){Y._fullLayout._dragCover=ae}),r.raiseToTop(this),Z.interactionState.dragInProgress=Z.node,re(Z.node),Z.interactionState.hovered&&(H.nodeEvents.unhover.apply(0,Z.interactionState.hovered),Z.interactionState.hovered=!1),Z.arrangement==="snap")){var ee=Z.traceId+"|"+Z.key;Z.forceLayouts[ee]?Z.forceLayouts[ee].alpha(1):P(X,ee,Z,Y),j(X,K,Z,ee,Y)}}).on("drag",function(Z){if(Z.arrangement!=="fixed"){var ee=E.event.x,ae=E.event.y;Z.arrangement==="snap"?(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2,Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2):(Z.arrangement==="freeform"&&(Z.node.x0=ee-Z.visibleWidth/2,Z.node.x1=ee+Z.visibleWidth/2),ae=Math.max(0,Math.min(Z.size-Z.visibleHeight/2,ae)),Z.node.y0=ae-Z.visibleHeight/2,Z.node.y1=ae+Z.visibleHeight/2),re(Z.node),Z.arrangement!=="snap"&&(Z.sankey.update(Z.graph),z(X.filter(ne(Z)),K))}}).on("dragend",function(Z){if(Z.arrangement!=="fixed"){Z.interactionState.dragInProgress=!1;for(var ee=0;ee0)window.requestAnimationFrame(Z);else{var he=H.node.originalX;H.node.x0=he-H.visibleWidth/2,H.node.x1=he+H.visibleWidth/2,$(H,q)}})}function U(X,K,H,Y){return function(){for(var Z=0,ee=0;ee0&&Y.forceLayouts[K].alpha(0)}}function $(X,K){for(var H=[],Y=[],q=0;qO(ke)?t.rgb(ke.linkLineColor):ke.rgb).style("stroke-opacity",ke=>O(ke)?t.opacity(ke.linkLineColor):ke.alpha).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha).style("stroke-width",ke=>O(ke)?ke.linkLineWidth:1).attr("d",f()),Me.style("opacity",function(){return X._context.staticPlot||ee||ae?1:0}).transition().ease(e.ease).duration(e.duration).style("opacity",1),Me.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Se=xe.selectAll("."+e.cn.sankeyNodeSet).data(m,c);Se.enter().append("g").classed(e.cn.sankeyNodeSet,!0),Se.style("cursor",function(ke){switch(ke.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var Ie=Se.selectAll("."+e.cn.sankeyNode).data(function(ke){var _e=ke.graph.nodes;return Q(_e),_e.map(u.bind(null,ke))},c);Ie.enter().append("g").classed(e.cn.sankeyNode,!0).call(A).style("opacity",function(ke){return(X._context.staticPlot||ee)&&!ke.partOfGroup?1:0}),Ie.call(B,xe,q.nodeEvents).call(F,Me,q,X),Ie.transition().ease(e.ease).duration(e.duration).call(A).style("opacity",function(ke){return ke.partOfGroup?0:1}),Ie.exit().transition().ease(e.ease).duration(e.duration).style("opacity",0).remove();var Ve=Ie.selectAll("."+e.cn.nodeRect).data(m);Ve.enter().append("rect").classed(e.cn.nodeRect,!0).call(I),Ve.style("stroke-width",function(ke){return ke.nodeLineWidth}).style("stroke",function(ke){return t.rgb(ke.nodeLineColor)}).style("stroke-opacity",function(ke){return t.opacity(ke.nodeLineColor)}).style("fill",ke=>ke.rgb).style("fill-opacity",ke=>ke.alpha),Ve.transition().ease(e.ease).duration(e.duration).call(I);var Ge=Ie.selectAll("."+e.cn.nodeLabel).data(m);Ge.enter().append("text").classed(e.cn.nodeLabel,!0).style("cursor","default"),Ge.attr("data-notex",1).text(function(ke){return ke.node.label}).each(function(ke){var _e=E.select(this);n.font(_e,ke.textFont),v.convertToTspans(_e,X)}).attr("text-anchor",function(ke){return ke.horizontal&&ke.left!==ke.reversed?"end":"start"}).attr("transform",function(ke){var _e=E.select(this),ce=v.lineCount(_e),ve=ke.textFont.size*((ce-1)*S-w),le=ke.nodeLineWidth/2+M;if(!ke.horizontal){var Xe=ke.reversed?(ke.visibleWidth+ve)/2:(ke.visibleWidth-ve)/2,Ae=ke.reversed?o(90):"scale(-1,1)"+o(90);return a(Xe,le)+Ae}var Be=le,Xe=(ke.visibleHeight-ve)/2;return ke.left?Be=-Be:Be+=ke.visibleWidth,a(Be,Xe)+(ke.reversed?"scale(-1,1)":"")}),Ge.transition().ease(e.ease).duration(e.duration)}}}),NM=ze({"src/traces/sankey/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=b.numberFormat,k=IV(),l=Zl(),e=Qn(),t=OM().cn,n=b._;function r(S){return S!==""}function a(S,M){return S.filter(function(C){return C.key===M.traceId})}function o(S,M){p.select(S).select("path").style("fill-opacity",M),p.select(S).select("rect").style("fill-opacity",M)}function s(S){p.select(S).select("text.name").style("fill","black")}function c(S){return function(M){return S.node.sourceLinks.indexOf(M.link)!==-1||S.node.targetLinks.indexOf(M.link)!==-1}}function m(S){return function(M){return M.node.sourceLinks.indexOf(S.link)!==-1||M.node.targetLinks.indexOf(S.link)!==-1}}function h(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(g.bind(0,M,C,!1))}function v(S,M,C){M&&C&&a(C,M).selectAll("."+t.sankeyLink).filter(c(M)).call(i.bind(0,M,C,!1))}function g(S,M,C,_){_.style("fill",function(T){if(!T.link.concentrationscale)return T.hoverRgb}).style("fill-opacity",function(T){if(!T.link.concentrationscale)return T.hoverAlpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",function(u){if(!u.link.concentrationscale)return u.hoverRgb}).style("fill-opacity",function(u){if(!u.link.concentrationscale)return u.hoverAlpha})}),C&&a(M,S).selectAll("."+t.sankeyNode).filter(m(S)).call(h)}function i(S,M,C,_){_.style("fill",function(T){return T.rgb}).style("fill-opacity",function(T){return T.alpha}),_.each(function(T){var f=T.link.label;f!==""&&a(M,S).selectAll("."+t.sankeyLink).filter(function(u){return u.link.label===f}).style("fill",u=>u.rgb).style("fill-opacity",u=>u.alpha)}),C&&a(M,S).selectAll(t.sankeyNode).filter(m(S)).call(v)}function w(S,M){var C=S.hoverlabel||{},_=b.nestedProperty(C,M).get();return Array.isArray(_)?!1:_}V.exports=function(M,C){for(var _=M._fullLayout,T=_._paper,f=_._size,u=0;u"),color:w(G,"bgcolor")||e.addOpacity(q.color,1),borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:p.event.x"),color:w(G,"bgcolor")||se.rgb,borderColor:w(G,"bordercolor"),fontFamily:w(G,"font.family"),fontSize:w(G,"font.size"),fontColor:w(G,"font.color"),fontWeight:w(G,"font.weight"),fontStyle:w(G,"font.style"),fontVariant:w(G,"font.variant"),fontTextcase:w(G,"font.textcase"),fontLineposition:w(G,"font.lineposition"),fontShadow:w(G,"font.shadow"),nameLength:w(G,"namelength"),textAlign:w(G,"align"),idealAlign:"left",hovertemplate:G.hovertemplate,hovertemplateLabels:ee,eventData:[se.node]},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:M});o(xe,.85),s(xe)}}},re=function(ne,se,G){M._fullLayout.hovermode!==!1&&(p.select(ne).call(v,se,G),se.node.trace.node.hoverinfo!=="skip"&&(se.node.fullData=se.node.trace,M.emit("plotly_unhover",{event:p.event,points:[se.node]})),l.loneUnhover(_._hoverlayer.node()))};k(M,T,C,{width:f.w,height:f.h,margin:{t:f.t,r:f.r,b:f.b,l:f.l}},{linkEvents:{hover:z,follow:P,unhover:j,select:x},nodeEvents:{hover:$,follow:Q,unhover:re,select:U}})}}}),DV=ze({"src/traces/sankey/base_plot.js"(J){"use strict";var V=Al().overrideAll,p=zf().getModuleCalcData,b=NM(),E=rv(),k=gd(),l=_h(),e=_c().prepSelect,t=Nr(),n=mi(),r="sankey";J.name=r,J.baseLayoutAttrOverrides=V({hoverlabel:E.hoverlabel},"plot","nested"),J.plot=function(o){var s=p(o.calcdata,r)[0];b(o,s),J.updateFx(o)},J.clean=function(o,s,c,m){var h=m._has&&m._has(r),v=s._has&&s._has(r);h&&!v&&(m._paperdiv.selectAll(".sankey").remove(),m._paperdiv.selectAll(".bgsankey").remove())},J.updateFx=function(o){for(var s=0;s0}V.exports=function(D,B,F,P){var j=D._fullLayout,U;S(F)&&P&&(U=P()),k.makeTraceGroups(j._indicatorlayer,B,"trace").each(function($){var Q=$[0],re=Q.trace,ne=p.select(this),se=re._hasGauge,G=re._isAngular,X=re._isBullet,K=re.domain,H={w:j._size.w*(K.x[1]-K.x[0]),h:j._size.h*(K.y[1]-K.y[0]),l:j._size.l+j._size.w*K.x[0],r:j._size.r+j._size.w*(1-K.x[1]),t:j._size.t+j._size.h*(1-K.y[1]),b:j._size.b+j._size.h*K.y[0]},Y=H.l+H.w/2,q=H.t+H.h/2,Z=Math.min(H.w/2,H.h),ee=a.innerRadius*Z,ae,he,xe,we=re.align||"center";if(he=q,!se)ae=H.l+i[we]*H.w,xe=function(le){return A(le,H.w,H.h)};else if(G&&(ae=Y,he=q+Z/2,xe=function(le){return x(le,.9*ee)}),X){var Me=a.bulletPadding,Se=1-a.bulletNumberDomainSize+Me;ae=H.l+(Se+(1-Se)*i[we])*H.w,xe=function(le){return A(le,(a.bulletNumberDomainSize-Me)*H.w,H.h)}}_(D,ne,$,{numbersX:ae,numbersY:he,numbersScaler:xe,transitionOpts:F,onComplete:U});var Ie,Ve;se&&(Ie={range:re.gauge.axis.range,color:re.gauge.bgcolor,line:{color:re.gauge.bordercolor,width:0},thickness:1},Ve={range:re.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:re.gauge.bordercolor,width:re.gauge.borderwidth},thickness:1});var Ge=ne.selectAll("g.angular").data(G?$:[]);Ge.exit().remove();var ke=ne.selectAll("g.angularaxis").data(G?$:[]);ke.exit().remove(),G&&C(D,ne,$,{radius:Z,innerRadius:ee,gauge:Ge,layer:ke,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var _e=ne.selectAll("g.bullet").data(X?$:[]);_e.exit().remove();var ce=ne.selectAll("g.bulletaxis").data(X?$:[]);ce.exit().remove(),X&&M(D,ne,$,{gauge:_e,layer:ce,size:H,gaugeBg:Ie,gaugeOutline:Ve,transitionOpts:F,onComplete:U});var ve=ne.selectAll("text.title").data($);ve.exit().remove(),ve.enter().append("text").classed("title",!0),ve.attr("text-anchor",function(){return X?g.right:g[re.title.align]}).text(re.title.text).call(r.font,re.title.font).call(o.convertToTspans,D),ve.attr("transform",function(){var le=H.l+H.w*i[re.title.align],Ae,Be=a.titlePadding,Xe=r.bBox(ve.node());if(se){if(G)if(re.gauge.axis.visible){var Ye=r.bBox(ke.node());Ae=Ye.top-Be-Xe.bottom}else Ae=H.t+H.h/2-Z/2-Xe.bottom-Be;X&&(Ae=he-(Xe.top+Xe.bottom)/2,le=H.l-a.bulletPadding*H.w)}else Ae=re._numbersTop-Be-Xe.bottom;return e(le,Ae)})})};function M(O,D,B,F){var P=B[0].trace,j=F.gauge,U=F.layer,$=F.gaugeBg,Q=F.gaugeOutline,re=F.size,ne=P.domain,se=F.transitionOpts,G=F.onComplete,X,K,H,Y,q;j.enter().append("g").classed("bullet",!0),j.attr("transform",e(re.l,re.t)),U.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),U.selectAll("g.xbulletaxistick,path,text").remove();var Z=re.h,ee=P.gauge.bar.thickness*Z,ae=ne.x[0],he=ne.x[0]+(ne.x[1]-ne.x[0])*(P._hasNumber||P._hasDelta?1-a.bulletNumberDomainSize:1);X=u(O,P.gauge.axis),X._id="xbulletaxis",X.domain=[ae,he],X.setScale(),K=s.calcTicks(X),H=s.makeTransTickFn(X),Y=s.getTickSigns(X)[2],q=re.t+re.h,X.visible&&(s.drawTicks(O,X,{vals:X.ticks==="inside"?s.clipEnds(X,K):K,layer:U,path:s.makeTickPath(X,q,Y),transFn:H}),s.drawLabels(O,X,{vals:K,layer:U,transFn:H,labelFns:s.makeLabelFns(X,q)}));function xe(ke){ke.attr("width",function(_e){return Math.max(0,X.c2p(_e.range[1])-X.c2p(_e.range[0]))}).attr("x",function(_e){return X.c2p(_e.range[0])}).attr("y",function(_e){return .5*(1-_e.thickness)*Z}).attr("height",function(_e){return _e.thickness*Z})}var we=[$].concat(P.gauge.steps),Me=j.selectAll("g.bg-bullet").data(we);Me.enter().append("g").classed("bg-bullet",!0).append("rect"),Me.select("rect").call(xe).call(T),Me.exit().remove();var Se=j.selectAll("g.value-bullet").data([P.gauge.bar]);Se.enter().append("g").classed("value-bullet",!0).append("rect"),Se.select("rect").attr("height",ee).attr("y",(Z-ee)/2).call(T),S(se)?Se.select("rect").transition().duration(se.duration).ease(se.easing).each("end",function(){G&&G()}).each("interrupt",function(){G&&G()}).attr("width",Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y)))):Se.select("rect").attr("width",typeof B[0].y=="number"?Math.max(0,X.c2p(Math.min(P.gauge.axis.range[1],B[0].y))):0),Se.exit().remove();var Ie=B.filter(function(){return P.gauge.threshold.value||P.gauge.threshold.value===0}),Ve=j.selectAll("g.threshold-bullet").data(Ie);Ve.enter().append("g").classed("threshold-bullet",!0).append("line"),Ve.select("line").attr("x1",X.c2p(P.gauge.threshold.value)).attr("x2",X.c2p(P.gauge.threshold.value)).attr("y1",(1-P.gauge.threshold.thickness)/2*Z).attr("y2",(1-(1-P.gauge.threshold.thickness)/2)*Z).call(v.stroke,P.gauge.threshold.line.color).style("stroke-width",P.gauge.threshold.line.width),Ve.exit().remove();var Ge=j.selectAll("g.gauge-outline").data([Q]);Ge.enter().append("g").classed("gauge-outline",!0).append("rect"),Ge.select("rect").call(xe).call(T),Ge.exit().remove()}function C(O,D,B,F){var P=B[0].trace,j=F.size,U=F.radius,$=F.innerRadius,Q=F.gaugeBg,re=F.gaugeOutline,ne=[j.l+j.w/2,j.t+j.h/2+U/2],se=F.gauge,G=F.layer,X=F.transitionOpts,K=F.onComplete,H=Math.PI/2;function Y(yt){var gt=P.gauge.axis.range[0],Tt=P.gauge.axis.range[1],At=(yt-gt)/(Tt-gt)*Math.PI-H;return At<-H?-H:At>H?H:At}function q(yt){return p.svg.arc().innerRadius(($+U)/2-yt/2*(U-$)).outerRadius(($+U)/2+yt/2*(U-$)).startAngle(-H)}function Z(yt){yt.attr("d",function(gt){return q(gt.thickness).startAngle(Y(gt.range[0])).endAngle(Y(gt.range[1]))()})}var ee,ae,he,xe;se.enter().append("g").classed("angular",!0),se.attr("transform",e(ne[0],ne[1])),G.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),G.selectAll("g.xangularaxistick,path,text").remove(),ee=u(O,P.gauge.axis),ee.type="linear",ee.range=P.gauge.axis.range,ee._id="xangularaxis",ee.ticklabeloverflow="allow",ee.setScale();var we=function(yt){return(ee.range[0]-yt.x)/(ee.range[1]-ee.range[0])*Math.PI+Math.PI},Me={},Se=s.makeLabelFns(ee,0),Ie=Se.labelStandoff;Me.xFn=function(yt){var gt=we(yt);return Math.cos(gt)*Ie},Me.yFn=function(yt){var gt=we(yt),Tt=Math.sin(gt)>0?.2:1;return-Math.sin(gt)*(Ie+yt.fontSize*Tt)+Math.abs(Math.cos(gt))*(yt.fontSize*n)},Me.anchorFn=function(yt){var gt=we(yt),Tt=Math.cos(gt);return Math.abs(Tt)<.1?"middle":Tt>0?"start":"end"},Me.heightFn=function(yt,gt,Tt){var At=we(yt);return-.5*(1+Math.sin(At))*Tt};var Ve=function(yt){return e(ne[0]+U*Math.cos(yt),ne[1]-U*Math.sin(yt))};he=function(yt){return Ve(we(yt))};var Ge=function(yt){var gt=we(yt);return Ve(gt)+"rotate("+-t(gt)+")"};if(ae=s.calcTicks(ee),xe=s.getTickSigns(ee)[2],ee.visible){xe=ee.ticks==="inside"?-1:1;var ke=(ee.linewidth||1)/2;s.drawTicks(O,ee,{vals:ae,layer:G,path:"M"+xe*ke+",0h"+xe*ee.ticklen,transFn:Ge}),s.drawLabels(O,ee,{vals:ae,layer:G,transFn:he,labelFns:Me})}var _e=[Q].concat(P.gauge.steps),ce=se.selectAll("g.bg-arc").data(_e);ce.enter().append("g").classed("bg-arc",!0).append("path"),ce.select("path").call(Z).call(T),ce.exit().remove();var ve=q(P.gauge.bar.thickness),le=se.selectAll("g.value-arc").data([P.gauge.bar]);le.enter().append("g").classed("value-arc",!0).append("path");var Ae=le.select("path");S(X)?(Ae.transition().duration(X.duration).ease(X.easing).each("end",function(){K&&K()}).each("interrupt",function(){K&&K()}).attrTween("d",f(ve,Y(B[0].lastY),Y(B[0].y))),P._lastValue=B[0].y):Ae.attr("d",typeof B[0].y=="number"?ve.endAngle(Y(B[0].y)):"M0,0Z"),Ae.call(T),le.exit().remove(),_e=[];var Be=P.gauge.threshold.value;(Be||Be===0)&&_e.push({range:[Be,Be],color:P.gauge.threshold.color,line:{color:P.gauge.threshold.line.color,width:P.gauge.threshold.line.width},thickness:P.gauge.threshold.thickness});var Xe=se.selectAll("g.threshold-arc").data(_e);Xe.enter().append("g").classed("threshold-arc",!0).append("path"),Xe.select("path").call(Z).call(T),Xe.exit().remove();var Ye=se.selectAll("g.gauge-outline").data([re]);Ye.enter().append("g").classed("gauge-outline",!0).append("path"),Ye.select("path").call(Z).call(T),Ye.exit().remove()}function _(O,D,B,F){var P=B[0].trace,j=F.numbersX,U=F.numbersY,$=P.align||"center",Q=g[$],re=F.transitionOpts,ne=F.onComplete,se=k.ensureSingle(D,"g","numbers"),G,X,K,H=[];P._hasNumber&&H.push("number"),P._hasDelta&&(H.push("delta"),P.delta.position==="left"&&H.reverse());var Y=se.selectAll("text").data(H);Y.enter().append("text"),Y.attr("text-anchor",function(){return Q}).attr("class",function(Ve){return Ve}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),Y.exit().remove();function q(Ve,Ge,ke,_e){if(Ve.match("s")&&ke>=0!=_e>=0&&!Ge(ke).slice(-1).match(w)&&!Ge(_e).slice(-1).match(w)){var ce=Ve.slice().replace("s","f").replace(/\d+/,function(le){return parseInt(le)-1}),ve=u(O,{tickformat:ce});return function(le){return Math.abs(le)<1?s.tickText(ve,le).text:Ge(le)}}else return Ge}function Z(){var Ve=u(O,{tickformat:P.number.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(le){return s.tickText(Ve,le).text},ke=P.number.suffix,_e=P.number.prefix,ce=se.select("text.number");function ve(){var le=typeof B[0].y=="number"?_e+Ge(B[0].y)+ke:"-";ce.text(le).call(r.font,P.number.font).call(o.convertToTspans,O)}return S(re)?ce.transition().duration(re.duration).ease(re.easing).each("end",function(){ve(),ne&&ne()}).each("interrupt",function(){ve(),ne&&ne()}).attrTween("text",function(){var le=p.select(this),Ae=E(B[0].lastY,B[0].y);P._lastValue=B[0].y;var Be=q(P.number.valueformat,Ge,B[0].lastY,B[0].y);return function(Xe){le.text(_e+Be(Ae(Xe))+ke)}}):ve(),G=z(_e+Ge(B[0].y)+ke,P.number.font,Q,O),ce}function ee(){var Ve=u(O,{tickformat:P.delta.valueformat},P._range);Ve.setScale(),s.prepTicks(Ve);var Ge=function(Xe){return s.tickText(Ve,Xe).text},ke=P.delta.suffix,_e=P.delta.prefix,ce=function(Xe){var Ye=P.delta.relative?Xe.relativeDelta:Xe.delta;return Ye},ve=function(Xe,Ye){return Xe===0||typeof Xe!="number"||isNaN(Xe)?"-":(Xe>0?P.delta.increasing.symbol:P.delta.decreasing.symbol)+_e+Ye(Xe)+ke},le=function(Xe){return Xe.delta>=0?P.delta.increasing.color:P.delta.decreasing.color};P._deltaLastValue===void 0&&(P._deltaLastValue=ce(B[0]));var Ae=se.select("text.delta");Ae.call(r.font,P.delta.font).call(v.fill,le({delta:P._deltaLastValue}));function Be(){Ae.text(ve(ce(B[0]),Ge)).call(v.fill,le(B[0])).call(o.convertToTspans,O)}return S(re)?Ae.transition().duration(re.duration).ease(re.easing).tween("text",function(){var Xe=p.select(this),Ye=ce(B[0]),yt=P._deltaLastValue,gt=q(P.delta.valueformat,Ge,yt,Ye),Tt=E(yt,Ye);return P._deltaLastValue=Ye,function(At){Xe.text(ve(Tt(At),gt)),Xe.call(v.fill,le({delta:Tt(At)}))}}).each("end",function(){Be(),ne&&ne()}).each("interrupt",function(){Be(),ne&&ne()}):Be(),X=z(ve(ce(B[0]),Ge),P.delta.font,Q,O),Ae}var ae=P.mode+P.align,he;if(P._hasDelta&&(he=ee(),ae+=P.delta.position+P.delta.font.size+P.delta.font.family+P.delta.valueformat,ae+=P.delta.increasing.symbol+P.delta.decreasing.symbol,K=X),P._hasNumber&&(Z(),ae+=P.number.font.size+P.number.font.family+P.number.valueformat+P.number.suffix+P.number.prefix,K=G),P._hasDelta&&P._hasNumber){var xe=[(G.left+G.right)/2,(G.top+G.bottom)/2],we=[(X.left+X.right)/2,(X.top+X.bottom)/2],Me,Se,Ie=.75*P.delta.font.size;P.delta.position==="left"&&(Me=I(P,"deltaPos",0,-1*(G.width*i[P.align]+X.width*(1-i[P.align])+Ie),ae,Math.min),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:X.left+Me,right:G.right,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="right"&&(Me=I(P,"deltaPos",0,G.width*(1-i[P.align])+X.width*i[P.align]+Ie,ae,Math.max),Se=xe[1]-we[1],K={width:G.width+X.width+Ie,height:Math.max(G.height,X.height),left:G.left,right:X.right+Me,top:Math.min(G.top,X.top+Se),bottom:Math.max(G.bottom,X.bottom+Se)}),P.delta.position==="bottom"&&(Me=null,Se=X.height,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height,bottom:G.bottom+X.height}),P.delta.position==="top"&&(Me=null,Se=G.top,K={width:Math.max(G.width,X.width),height:G.height+X.height,left:Math.min(G.left,X.left),right:Math.max(G.right,X.right),top:G.bottom-G.height-X.height,bottom:G.bottom}),he.attr({dx:Me,dy:Se})}(P._hasNumber||P._hasDelta)&&se.attr("transform",function(){var Ve=F.numbersScaler(K);ae+=Ve[2];var Ge=I(P,"numbersScale",1,Ve[0],ae,Math.min),ke;P._scaleNumbers||(Ge=1),P._isAngular?ke=U-Ge*K.bottom:ke=U-Ge*(K.top+K.bottom)/2,P._numbersTop=Ge*K.top+ke;var _e=K[$];$==="center"&&(_e=(K.left+K.right)/2);var ce=j-Ge*_e;return ce=I(P,"numbersTranslate",0,ce,ae,Math.max),e(ce,ke)+l(Ge)})}function T(O){O.each(function(D){v.stroke(p.select(this),D.line.color)}).each(function(D){v.fill(p.select(this),D.color)}).style("stroke-width",function(D){return D.line.width})}function f(O,D,B){return function(){var F=b(D,B);return function(P){return O.endAngle(F(P))()}}}function u(O,D,B){var F=O._fullLayout,P=k.extendFlat({type:"linear",ticks:"outside",range:B,showline:!0},D),j={type:"linear",_id:"x"+D._id},U={letter:"x",font:F.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function $(Q,re){return k.coerce(P,j,h,Q,re)}return c(P,j,$,U,F),m(P,j,$,U),j}function A(O,D,B){var F=Math.min(D/O.width,B/O.height);return[F,O,D+"x"+B]}function x(O,D){var B=Math.sqrt(O.width/2*(O.width/2)+O.height*O.height),F=D/B;return[F,O,D]}function z(O,D,B,F){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),j=p.select(P);return j.text(O).attr("x",0).attr("y",0).attr("text-anchor",B).attr("data-unformatted",O).call(o.convertToTspans,F).call(r.font,D),r.bBox(j.node())}function I(O,D,B,F,P,j){var U="_cache"+D;O[U]&&O[U].key===P||(O[U]={key:P,value:B});var $=k.aggNums(j,null,[O[U].value,F],2);return O[U].value=$,$}}}),qV=ze({"src/traces/indicator/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"indicator",basePlotModule:OV(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:jM(),supplyDefaults:NV().supplyDefaults,calc:jV().calc,plot:UV(),meta:{}}}}),VV=ze({"lib/indicator.js"(J,V){"use strict";V.exports=qV()}}),qM=ze({"src/traces/table/attributes.js"(J,V){"use strict";var p=fv(),b=Ki().extendFlat,E=Al().overrideAll,k=Qs(),l=Ml().attributes,e=Il().descriptionOnlyNumbers,t=V.exports=E({domain:l({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:b({},p.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:b({},k({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:e("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:b({},p.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:b({},k({arrayOk:!0}))}},"calc","from-root")}}),GV=ze({"src/traces/table/defaults.js"(J,V){"use strict";var p=Nr(),b=qM(),E=Ml().defaults;function k(l,e){for(var t=l.columnorder||[],n=l.header.values.length,r=t.slice(0,n),a=r.slice().sort(function(c,m){return c-m}),o=r.map(function(c){return a.indexOf(c)}),s=o.length;s",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"}}}}),WV=ze({"src/traces/table/data_preparation_helper.js"(J,V){"use strict";var p=VM(),b=Ki().extendFlat,E=ao(),k=Ff().isTypedArray,l=Ff().isArrayOrTypedArray;V.exports=function(h,v){var g=n(v.cells.values),i=function(Q){return Q.slice(v.header.values.length,Q.length)},w=n(v.header.values);w.length&&!w[0].length&&(w[0]=[""],w=n(w));var S=w.concat(i(g).map(function(){return r((w[0]||[""]).length)})),M=v.domain,C=Math.floor(h._fullLayout._size.w*(M.x[1]-M.x[0])),_=Math.floor(h._fullLayout._size.h*(M.y[1]-M.y[0])),T=v.header.values.length?S[0].map(function(){return v.header.height}):[p.emptyHeaderHeight],f=g.length?g[0].map(function(){return v.cells.height}):[],u=T.reduce(t,0),A=_-u,x=A+p.uplift,z=s(f,x),I=s(T,u),O=o(I,[]),D=o(z,O),B={},F=v.columnorder;l(F)&&(F=Array.from(F)),F=F.concat(i(g.map(function(Q,re){return re})));var P=S.map(function(Q,re){var ne=l(v.columnwidth)?v.columnwidth[Math.min(re,v.columnwidth.length-1)]:v.columnwidth;return E(ne)?Number(ne):1}),j=P.reduce(t,0);P=P.map(function(Q){return Q/j*C});var U=Math.max(e(v.header.line.width),e(v.cells.line.width)),$={key:v.uid+h._context.staticPlot,translateX:M.x[0]*h._fullLayout._size.w,translateY:h._fullLayout._size.h*(1-M.y[1]),size:h._fullLayout._size,width:C,maxLineWidth:U,height:_,columnOrder:F,groupHeight:_,rowBlocks:D,headerRowBlocks:O,scrollY:0,cells:b({},v.cells,{values:g}),headerCells:b({},v.header,{values:S}),gdColumns:S.map(function(Q){return Q[0]}),gdColumnsOriginalOrder:S.map(function(Q){return Q[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:S.map(function(Q,re){var ne=B[Q];B[Q]=(ne||0)+1;var se=Q+"__"+B[Q];return{key:se,label:Q,specIndex:re,xIndex:F[re],xScale:a,x:void 0,calcdata:void 0,columnWidth:P[re]}})};return $.columns.forEach(function(Q){Q.calcdata=$,Q.x=a(Q)}),$};function e(m){if(l(m)){for(var h=0,v=0;v=h||_===m.length-1)&&(v[i]=S,S.key=C++,S.firstRowIndex=M,S.lastRowIndex=_,S=c(),i+=w,M=_+1,w=0);return v}function c(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}}}),YV=ze({"src/traces/table/data_split_helpers.js"(J){"use strict";var V=Ki().extendFlat;J.splitToPanels=function(b){var E=[0,0],k=V({},b,{key:"header",type:"header",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!0,values:b.calcdata.headerCells.values[b.specIndex],rowBlocks:b.calcdata.headerRowBlocks,calcdata:V({},b.calcdata,{cells:b.calcdata.headerCells})}),l=V({},b,{key:"cells1",type:"cells",page:0,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks}),e=V({},b,{key:"cells2",type:"cells",page:1,prevPages:E,currentRepaint:[null,null],dragHandle:!1,values:b.calcdata.cells.values[b.specIndex],rowBlocks:b.calcdata.rowBlocks});return[l,e,k]},J.splitToCells=function(b){var E=p(b);return(b.values||[]).slice(E[0],E[1]).map(function(k,l){var e=typeof k=="string"&&k.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:l+e,key:E[0]+l,column:b,calcdata:b.calcdata,page:b.page,rowBlocks:b.rowBlocks,value:k}})};function p(b){var E=b.rowBlocks[b.page],k=E?E.rows[0].rowIndex:0,l=E?k+E.rows.length:0;return[k,l]}}}),GM=ze({"src/traces/table/plot.js"(J,V){"use strict";var p=VM(),b=ci(),E=Nr(),k=E.numberFormat,l=Vd(),e=$i(),t=Cs(),n=Nr().raiseToTop,r=Nr().strTranslate,a=Nr().cancelTransition,o=WV(),s=YV(),c=Qn();V.exports=function(ae,he){var xe=!ae._context.staticPlot,we=ae._fullLayout._paper.selectAll("."+p.cn.table).data(he.map(function(Ye){var yt=l.unwrap(Ye),gt=yt.trace;return o(ae,gt)}),l.keyFun);we.exit().remove(),we.enter().append("g").classed(p.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),we.attr("width",function(Ye){return Ye.width+Ye.size.l+Ye.size.r}).attr("height",function(Ye){return Ye.height+Ye.size.t+Ye.size.b}).attr("transform",function(Ye){return r(Ye.translateX,Ye.translateY)});var Me=we.selectAll("."+p.cn.tableControlView).data(l.repeat,l.keyFun),Se=Me.enter().append("g").classed(p.cn.tableControlView,!0).style("box-sizing","content-box");if(xe){var Ie="onwheel"in document?"wheel":"mousewheel";Se.on("mousemove",function(Ye){Me.filter(function(yt){return Ye===yt}).call(i,ae)}).on(Ie,function(Ye){if(!Ye.scrollbarState.wheeling){Ye.scrollbarState.wheeling=!0;var yt=Ye.scrollY+b.event.deltaY,gt=Q(ae,Me,null,yt)(Ye);gt||(b.event.stopPropagation(),b.event.preventDefault()),Ye.scrollbarState.wheeling=!1}}).call(i,ae,!0)}Me.attr("transform",function(Ye){return r(Ye.size.l,Ye.size.t)});var Ve=Me.selectAll("."+p.cn.scrollBackground).data(l.repeat,l.keyFun);Ve.enter().append("rect").classed(p.cn.scrollBackground,!0).attr("fill","none"),Ve.attr("width",function(Ye){return Ye.width}).attr("height",function(Ye){return Ye.height}),Me.each(function(Ye){e.setClipUrl(b.select(this),h(ae,Ye),ae)});var Ge=Me.selectAll("."+p.cn.yColumn).data(function(Ye){return Ye.columns},l.keyFun);Ge.enter().append("g").classed(p.cn.yColumn,!0),Ge.exit().remove(),Ge.attr("transform",function(Ye){return r(Ye.x,0)}),xe&&Ge.call(b.behavior.drag().origin(function(Ye){var yt=b.select(this);return B(yt,Ye,-p.uplift),n(this),Ye.calcdata.columnDragInProgress=!0,i(Me.filter(function(gt){return Ye.calcdata.key===gt.key}),ae),Ye}).on("drag",function(Ye){var yt=b.select(this),gt=function($t){return(Ye===$t?b.event.x:$t.x)+$t.columnWidth/2};Ye.x=Math.max(-p.overdrag,Math.min(Ye.calcdata.width+p.overdrag-Ye.columnWidth,b.event.x));var Tt=g(Ge).filter(function($t){return $t.calcdata.key===Ye.calcdata.key}),At=Tt.sort(function($t,rr){return gt($t)-gt(rr)});At.forEach(function($t,rr){$t.xIndex=rr,$t.x=Ye===$t?$t.x:$t.xScale($t)}),Ge.filter(function($t){return Ye!==$t}).transition().ease(p.transitionEase).duration(p.transitionDuration).attr("transform",function($t){return r($t.x,0)}),yt.call(a).attr("transform",r(Ye.x,-p.uplift))}).on("dragend",function(Ye){var yt=b.select(this),gt=Ye.calcdata;Ye.x=Ye.xScale(Ye),Ye.calcdata.columnDragInProgress=!1,B(yt,Ye,0),O(ae,gt,gt.columns.map(function(Tt){return Tt.xIndex}))})),Ge.each(function(Ye){e.setClipUrl(b.select(this),v(ae,Ye),ae)});var ke=Ge.selectAll("."+p.cn.columnBlock).data(s.splitToPanels,l.keyFun);ke.enter().append("g").classed(p.cn.columnBlock,!0).attr("id",function(Ye){return Ye.key}),ke.style("cursor",function(Ye){return Ye.dragHandle?"ew-resize":Ye.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var _e=ke.filter(P),ce=ke.filter(F);xe&&ce.call(b.behavior.drag().origin(function(Ye){return b.event.stopPropagation(),Ye}).on("drag",Q(ae,Me,-1)).on("dragend",function(){})),w(ae,Me,_e,ke),w(ae,Me,ce,ke);var ve=Me.selectAll("."+p.cn.scrollAreaClip).data(l.repeat,l.keyFun);ve.enter().append("clipPath").classed(p.cn.scrollAreaClip,!0).attr("id",function(Ye){return h(ae,Ye)});var le=ve.selectAll("."+p.cn.scrollAreaClipRect).data(l.repeat,l.keyFun);le.enter().append("rect").classed(p.cn.scrollAreaClipRect,!0).attr("x",-p.overdrag).attr("y",-p.uplift).attr("fill","none"),le.attr("width",function(Ye){return Ye.width+2*p.overdrag}).attr("height",function(Ye){return Ye.height+p.uplift});var Ae=Ge.selectAll("."+p.cn.columnBoundary).data(l.repeat,l.keyFun);Ae.enter().append("g").classed(p.cn.columnBoundary,!0);var Be=Ge.selectAll("."+p.cn.columnBoundaryClippath).data(l.repeat,l.keyFun);Be.enter().append("clipPath").classed(p.cn.columnBoundaryClippath,!0),Be.attr("id",function(Ye){return v(ae,Ye)});var Xe=Be.selectAll("."+p.cn.columnBoundaryRect).data(l.repeat,l.keyFun);Xe.enter().append("rect").classed(p.cn.columnBoundaryRect,!0).attr("fill","none"),Xe.attr("width",function(Ye){return Ye.columnWidth+2*m(Ye)}).attr("height",function(Ye){return Ye.calcdata.height+2*m(Ye)+p.uplift}).attr("x",function(Ye){return-m(Ye)}).attr("y",function(Ye){return-m(Ye)}),$(null,ce,Me)};function m(ee){return Math.ceil(ee.calcdata.maxLineWidth/2)}function h(ee,ae){return"clip"+ee._fullLayout._uid+"_scrollAreaBottomClip_"+ae.key}function v(ee,ae){return"clip"+ee._fullLayout._uid+"_columnBoundaryClippath_"+ae.calcdata.key+"_"+ae.specIndex}function g(ee){return[].concat.apply([],ee.map(function(ae){return ae})).map(function(ae){return ae.__data__})}function i(ee,ae,he){function xe(Ge){var ke=Ge.rowBlocks;return K(ke,ke.length-1)+(ke.length?H(ke[ke.length-1],1/0):1)}var we=ee.selectAll("."+p.cn.scrollbarKit).data(l.repeat,l.keyFun);we.enter().append("g").classed(p.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),we.each(function(Ge){var ke=Ge.scrollbarState;ke.totalHeight=xe(Ge),ke.scrollableAreaHeight=Ge.groupHeight-j(Ge),ke.currentlyVisibleHeight=Math.min(ke.totalHeight,ke.scrollableAreaHeight),ke.ratio=ke.currentlyVisibleHeight/ke.totalHeight,ke.barLength=Math.max(ke.ratio*ke.currentlyVisibleHeight,p.goldenRatio*p.scrollbarWidth),ke.barWiggleRoom=ke.currentlyVisibleHeight-ke.barLength,ke.wiggleRoom=Math.max(0,ke.totalHeight-ke.scrollableAreaHeight),ke.topY=ke.barWiggleRoom===0?0:Ge.scrollY/ke.wiggleRoom*ke.barWiggleRoom,ke.bottomY=ke.topY+ke.barLength,ke.dragMultiplier=ke.wiggleRoom/ke.barWiggleRoom}).attr("transform",function(Ge){var ke=Ge.width+p.scrollbarWidth/2+p.scrollbarOffset;return r(ke,j(Ge))});var Me=we.selectAll("."+p.cn.scrollbar).data(l.repeat,l.keyFun);Me.enter().append("g").classed(p.cn.scrollbar,!0);var Se=Me.selectAll("."+p.cn.scrollbarSlider).data(l.repeat,l.keyFun);Se.enter().append("g").classed(p.cn.scrollbarSlider,!0),Se.attr("transform",function(Ge){return r(0,Ge.scrollbarState.topY||0)});var Ie=Se.selectAll("."+p.cn.scrollbarGlyph).data(l.repeat,l.keyFun);Ie.enter().append("line").classed(p.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",p.scrollbarWidth).attr("stroke-linecap","round").attr("y1",p.scrollbarWidth/2),Ie.attr("y2",function(Ge){return Ge.scrollbarState.barLength-p.scrollbarWidth/2}).attr("stroke-opacity",function(Ge){return Ge.columnDragInProgress||!Ge.scrollbarState.barWiggleRoom||he?0:.4}),Ie.transition().delay(0).duration(0),Ie.transition().delay(p.scrollbarHideDelay).duration(p.scrollbarHideDuration).attr("stroke-opacity",0);var Ve=Me.selectAll("."+p.cn.scrollbarCaptureZone).data(l.repeat,l.keyFun);Ve.enter().append("line").classed(p.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",p.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(Ge){var ke=b.event.y,_e=this.getBoundingClientRect(),ce=Ge.scrollbarState,ve=ke-_e.top,le=b.scale.linear().domain([0,ce.scrollableAreaHeight]).range([0,ce.totalHeight]).clamp(!0);ce.topY<=ve&&ve<=ce.bottomY||Q(ae,ee,null,le(ve-ce.barLength/2))(Ge)}).call(b.behavior.drag().origin(function(Ge){return b.event.stopPropagation(),Ge.scrollbarState.scrollbarScrollInProgress=!0,Ge}).on("drag",Q(ae,ee)).on("dragend",function(){})),Ve.attr("y2",function(Ge){return Ge.scrollbarState.scrollableAreaHeight}),ae._context.staticPlot&&(Ie.remove(),Ve.remove())}function w(ee,ae,he,xe){var we=S(he),Me=M(we);f(Me);var Se=C(Me);A(Se);var Ie=T(Me),Ve=_(Ie);u(Ve),x(Ve,ae,xe,ee),X(Me)}function S(ee){var ae=ee.selectAll("."+p.cn.columnCells).data(l.repeat,l.keyFun);return ae.enter().append("g").classed(p.cn.columnCells,!0),ae.exit().remove(),ae}function M(ee){var ae=ee.selectAll("."+p.cn.columnCell).data(s.splitToCells,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.columnCell,!0),ae.exit().remove(),ae}function C(ee){var ae=ee.selectAll("."+p.cn.cellRect).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("rect").classed(p.cn.cellRect,!0),ae}function _(ee){var ae=ee.selectAll("."+p.cn.cellText).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("text").classed(p.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){b.event.stopPropagation()}),ae}function T(ee){var ae=ee.selectAll("."+p.cn.cellTextHolder).data(l.repeat,function(he){return he.keyWithinBlock});return ae.enter().append("g").classed(p.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ae}function f(ee){ee.each(function(ae,he){var xe=ae.calcdata.cells.font,we=ae.column.specIndex,Me={size:D(xe.size,we,he),color:D(xe.color,we,he),family:D(xe.family,we,he),weight:D(xe.weight,we,he),style:D(xe.style,we,he),variant:D(xe.variant,we,he),textcase:D(xe.textcase,we,he),lineposition:D(xe.lineposition,we,he),shadow:D(xe.shadow,we,he)};ae.rowNumber=ae.key,ae.align=D(ae.calcdata.cells.align,we,he),ae.cellBorderWidth=D(ae.calcdata.cells.line.width,we,he),ae.font=Me})}function u(ee){ee.each(function(ae){e.font(b.select(this),ae.font)})}function A(ee){ee.attr("width",function(ae){return ae.column.columnWidth}).attr("stroke-width",function(ae){return ae.cellBorderWidth}).each(function(ae){var he=b.select(this);c.stroke(he,D(ae.calcdata.cells.line.color,ae.column.specIndex,ae.rowNumber)),c.fill(he,D(ae.calcdata.cells.fill.color,ae.column.specIndex,ae.rowNumber))})}function x(ee,ae,he,xe){ee.text(function(we){var Me=we.column.specIndex,Se=we.rowNumber,Ie=we.value,Ve=typeof Ie=="string",Ge=Ve&&Ie.match(/
/i),ke=!Ve||Ge;we.mayHaveMarkup=Ve&&Ie.match(/[<&>]/);var _e=z(Ie);we.latex=_e;var ce=_e?"":D(we.calcdata.cells.prefix,Me,Se)||"",ve=_e?"":D(we.calcdata.cells.suffix,Me,Se)||"",le=_e?null:D(we.calcdata.cells.format,Me,Se)||null,Ae=ce+(le?k(le)(we.value):we.value)+ve,Be;we.wrappingNeeded=!we.wrapped&&!ke&&!_e&&(Be=I(Ae)),we.cellHeightMayIncrease=Ge||_e||we.mayHaveMarkup||(Be===void 0?I(Ae):Be),we.needsConvertToTspans=we.mayHaveMarkup||we.wrappingNeeded||we.latex;var Xe;if(we.wrappingNeeded){var Ye=p.wrapSplitCharacter===" "?Ae.replace(/we&&xe.push(Me),we+=Ve}return xe}function $(ee,ae,he){var xe=g(ae)[0];if(xe!==void 0){var we=xe.rowBlocks,Me=xe.calcdata,Se=K(we,we.length),Ie=xe.calcdata.groupHeight-j(xe),Ve=Me.scrollY=Math.max(0,Math.min(Se-Ie,Me.scrollY)),Ge=U(we,Ve,Ie);Ge.length===1&&(Ge[0]===we.length-1?Ge.unshift(Ge[0]-1):Ge.push(Ge[0]+1)),Ge[0]%2&&Ge.reverse(),ae.each(function(ke,_e){ke.page=Ge[_e],ke.scrollY=Ve}),ae.attr("transform",function(ke){var _e=K(ke.rowBlocks,ke.page)-ke.scrollY;return r(0,_e)}),ee&&(re(ee,he,ae,Ge,xe.prevPages,xe,0),re(ee,he,ae,Ge,xe.prevPages,xe,1),i(he,ee))}}function Q(ee,ae,he,xe){return function(Me){var Se=Me.calcdata?Me.calcdata:Me,Ie=ae.filter(function(_e){return Se.key===_e.key}),Ve=he||Se.scrollbarState.dragMultiplier,Ge=Se.scrollY;Se.scrollY=xe===void 0?Se.scrollY+Ve*b.event.dy:xe;var ke=Ie.selectAll("."+p.cn.yColumn).selectAll("."+p.cn.columnBlock).filter(F);return $(ee,ke,Ie),Se.scrollY===Ge}}function re(ee,ae,he,xe,we,Me,Se){var Ie=xe[Se]!==we[Se];Ie&&(clearTimeout(Me.currentRepaint[Se]),Me.currentRepaint[Se]=setTimeout(function(){var Ve=he.filter(function(Ge,ke){return ke===Se&&xe[ke]!==we[ke]});w(ee,ae,Ve,he),we[Se]=xe[Se]}))}function ne(ee,ae,he,xe){return function(){var Me=b.select(ae.parentNode);Me.each(function(Se){var Ie=Se.fragments;Me.selectAll("tspan.line").each(function(Ae,Be){Ie[Be].width=this.getComputedTextLength()});var Ve=Ie[Ie.length-1].width,Ge=Ie.slice(0,-1),ke=[],_e,ce,ve=0,le=Se.column.columnWidth-2*p.cellPad;for(Se.value="";Ge.length;)_e=Ge.shift(),ce=_e.width+Ve,ve+ce>le&&(Se.value+=ke.join(p.wrapSpacer)+p.lineBreaker,ke=[],ve=0),ke.push(_e.text),ve+=ce;ve&&(Se.value+=ke.join(p.wrapSpacer)),Se.wrapped=!0}),Me.selectAll("tspan.line").remove(),x(Me.select("."+p.cn.cellText),he,ee,xe),b.select(ae.parentNode.parentNode).call(X)}}function se(ee,ae,he,xe,we){return function(){if(!we.settledY){var Se=b.select(ae.parentNode),Ie=q(we),Ve=we.key-Ie.firstRowIndex,Ge=Ie.rows[Ve].rowHeight,ke=we.cellHeightMayIncrease?ae.parentNode.getBoundingClientRect().height+2*p.cellPad:Ge,_e=Math.max(ke,Ge),ce=_e-Ie.rows[Ve].rowHeight;ce&&(Ie.rows[Ve].rowHeight=_e,ee.selectAll("."+p.cn.columnCell).call(X),$(null,ee.filter(F),0),i(he,xe,!0)),Se.attr("transform",function(){var ve=this,le=ve.parentNode,Ae=le.getBoundingClientRect(),Be=b.select(ve.parentNode).select("."+p.cn.cellRect).node().getBoundingClientRect(),Xe=ve.transform.baseVal.consolidate(),Ye=Be.top-Ae.top+(Xe?Xe.matrix.f:p.cellPad);return r(G(we,b.select(ve.parentNode).select("."+p.cn.cellTextHolder).node().getBoundingClientRect().width),Ye)}),we.settledY=!0}}}function G(ee,ae){switch(ee.align){case"left":return p.cellPad;case"right":return ee.column.columnWidth-(ae||0)-p.cellPad;case"center":return(ee.column.columnWidth-(ae||0))/2;default:return p.cellPad}}function X(ee){ee.attr("transform",function(ae){var he=ae.rowBlocks[0].auxiliaryBlocks.reduce(function(Se,Ie){return Se+H(Ie,1/0)},0),xe=q(ae),we=H(xe,ae.key),Me=we+he;return r(0,Me)}).selectAll("."+p.cn.cellRect).attr("height",function(ae){return Z(q(ae),ae.key).rowHeight})}function K(ee,ae){for(var he=0,xe=ae-1;xe>=0;xe--)he+=Y(ee[xe]);return he}function H(ee,ae){for(var he=0,xe=0;xek.length&&(E=E.slice(0,k.length)):E=[],e=0;e90&&(h-=180,a=-a),{angle:h,flip:a,p:b.c2p(l,E,k),offsetMultplier:o}}}}),aG=ze({"src/traces/carpet/plot.js"(J,V){"use strict";var p=ci(),b=$i(),E=HM(),k=WM(),l=rG(),e=Cs(),t=Nr(),n=t.strRotate,r=t.strTranslate,a=dc();V.exports=function(w,S,M,C){var _=w._context.staticPlot,T=S.xaxis,f=S.yaxis,u=w._fullLayout,A=u._clips;t.makeTraceGroups(C,M,"trace").each(function(x){var z=p.select(this),I=x[0],O=I.trace,D=O.aaxis,B=O.baxis,F=t.ensureSingle(z,"g","minorlayer"),P=t.ensureSingle(z,"g","majorlayer"),j=t.ensureSingle(z,"g","boundarylayer"),U=t.ensureSingle(z,"g","labellayer");z.style("opacity",O.opacity),s(T,f,P,D,"a",D._gridlines,!0,_),s(T,f,P,B,"b",B._gridlines,!0,_),s(T,f,F,D,"a",D._minorgridlines,!0,_),s(T,f,F,B,"b",B._minorgridlines,!0,_),s(T,f,j,D,"a-boundary",D._boundarylines,_),s(T,f,j,B,"b-boundary",B._boundarylines,_);var $=c(w,T,f,O,I,U,D._labels,"a-label"),Q=c(w,T,f,O,I,U,B._labels,"b-label");m(w,U,O,I,T,f,$,Q),o(O,I,A,T,f)})};function o(i,w,S,M,C){var _,T,f,u,A=S.select("#"+i._clipPathId);A.size()||(A=S.append("clipPath").classed("carpetclip",!0));var x=t.ensureSingle(A,"path","carpetboundary"),z=w.clipsegments,I=[];for(u=0;u0?"start":"end","data-notex":1}).call(b.font,z.font).text(z.text).call(e.convertToTspans,i),P=b.bBox(this);F.attr("transform",r(O.p[0],O.p[1])+n(O.angle)+r(z.axis.labelpadding*B,P.height*.3)),A=Math.max(A,P.width+z.axis.labelpadding)}),u.exit().remove(),x.maxExtent=A,x}function m(i,w,S,M,C,_,T,f){var u,A,x,z,I=t.aggNums(Math.min,null,S.a),O=t.aggNums(Math.max,null,S.a),D=t.aggNums(Math.min,null,S.b),B=t.aggNums(Math.max,null,S.b);u=.5*(I+O),A=D,x=S.ab2xy(u,A,!0),z=S.dxyda_rough(u,A),T.angle===void 0&&t.extendFlat(T,l(S,C,_,x,S.dxydb_rough(u,A))),g(i,w,S,M,x,z,S.aaxis,C,_,T,"a-title"),u=I,A=.5*(D+B),x=S.ab2xy(u,A,!0),z=S.dxydb_rough(u,A),f.angle===void 0&&t.extendFlat(f,l(S,C,_,x,S.dxyda_rough(u,A))),g(i,w,S,M,x,z,S.baxis,C,_,f,"b-title")}var h=a.LINE_SPACING,v=(1-a.MID_SHIFT)/h+1;function g(i,w,S,M,C,_,T,f,u,A,x){var z=[];T.title.text&&z.push(T.title.text);var I=w.selectAll("text."+x).data(z),O=A.maxExtent;I.enter().append("text").classed(x,!0),I.each(function(){var D=l(S,f,u,C,_);["start","both"].indexOf(T.showticklabels)===-1&&(O=0);var B=T.title.font.size;O+=B+T.title.offset;var F=A.angle+(A.flip<0?180:0),P=(F-D.angle+450)%360,j=P>90&&P<270,U=p.select(this);U.text(T.title.text).call(e.convertToTspans,i),j&&(O=(-e.lineCount(U)+v)*h*B-O),U.attr("transform",r(D.p[0],D.p[1])+n(D.angle)+r(0,O)).attr("text-anchor","middle").call(b.font,T.title.font)}),I.exit().remove()}}}),nG=ze({"src/traces/carpet/cheater_basis.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k){var l,e,t,n,r,a,o=[],s=p(b)?b.length:b,c=p(E)?E.length:E,m=p(b)?b:null,h=p(E)?E:null;m&&(t=(m.length-1)/(m[m.length-1]-m[0])/(s-1)),h&&(n=(h.length-1)/(h[h.length-1]-h[0])/(c-1));var v,g=1/0,i=-1/0;for(e=0;e=10)return null;for(var l=1/0,e=-1/0,t=E.length,n=0;n0&&(H=k.dxydi([],$-1,re,0,ne),ee.push(se[0]+H[0]/3),ae.push(se[1]+H[1]/3),Y=k.dxydi([],$-1,re,1,ne),ee.push(K[0]-Y[0]/3),ae.push(K[1]-Y[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;else for($=k.a2i(U),G=Math.floor(Math.max(0,Math.min(D-2,$))),X=$-G,he.length=D,he.crossLength=B,he.xy=function(xe){return k.evalxy([],$,xe)},he.dxy=function(xe,we){return k.dxydj([],G,xe,X,we)},Q=0;Q0&&(q=k.dxydj([],G,Q-1,X,0),ee.push(se[0]+q[0]/3),ae.push(se[1]+q[1]/3),Z=k.dxydj([],G,Q-1,X,1),ee.push(K[0]-Z[0]/3),ae.push(K[1]-Z[1]/3)),ee.push(K[0]),ae.push(K[1]),se=K;return he.axisLetter=l,he.axis=C,he.crossAxis=A,he.value=U,he.constvar=e,he.index=m,he.x=ee,he.y=ae,he.smoothing=A.smoothing,he}function j(U){var $,Q,re,ne,se,G=[],X=[],K={};if(K.length=M.length,K.crossLength=u.length,l==="b")for(re=Math.max(0,Math.min(B-2,U)),se=Math.min(1,Math.max(0,U-re)),K.xy=function(H){return k.evalxy([],H,U)},K.dxy=function(H,Y){return k.dxydi([],H,re,Y,se)},$=0;$M.length-1)&&_.push(b(j(n),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s;mM.length-1)&&!(g<0||g>M.length-1))for(i=M[r],w=M[g],t=0;tM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash})));C.startline&&f.push(b(j(0),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(j(M.length-1),{color:C.endlinecolor,width:C.endlinewidth}))}else{for(a=5e-15,o=[Math.floor((M[M.length-1]-C.tick0)/C.dtick*(1+a)),Math.ceil((M[0]-C.tick0)/C.dtick/(1+a))].sort(function(U,$){return U-$}),s=o[0],c=o[1],m=s;m<=c;m++)h=C.tick0+C.dtick*m,_.push(b(P(h),{color:C.gridcolor,width:C.gridwidth,dash:C.griddash}));for(m=s-1;mM[M.length-1])&&T.push(b(P(v),{color:C.minorgridcolor,width:C.minorgridwidth,dash:C.minorgriddash}));C.startline&&f.push(b(P(M[0]),{color:C.startlinecolor,width:C.startlinewidth})),C.endline&&f.push(b(P(M[M.length-1]),{color:C.endlinecolor,width:C.endlinewidth}))}}}}),sG=ze({"src/traces/carpet/calc_labels.js"(J,V){"use strict";var p=Gi(),b=Ki().extendFlat;V.exports=function(k,l){var e,t,n,r,a,o=l._labels=[],s=l._gridlines;for(e=0;e=0;e--)t[s-e]=b[c][e],n[s-e]=E[c][e];for(r.push({x:t,y:n,bicubic:a}),e=c,t=[],n=[];e>=0;e--)t[c-e]=b[e][0],n[c-e]=E[e][0];return r.push({x:t,y:n,bicubic:o}),r}}}),uG=ze({"src/traces/carpet/smooth_fill_2d_array.js"(J,V){"use strict";var p=Nr();V.exports=function(E,k,l){var e,t,n,r=[],a=[],o=E[0].length,s=E.length;function c(Q,re){var ne=0,se,G=0;return Q>0&&(se=E[re][Q-1])!==void 0&&(G++,ne+=se),Q0&&(se=E[re-1][Q])!==void 0&&(G++,ne+=se),re0&&t0&&eu);return p.log("Smoother converged to",A,"after",z,"iterations"),E}}}),cG=ze({"src/traces/carpet/constants.js"(J,V){"use strict";V.exports={RELATIVE_CULL_TOLERANCE:1e-6}}}),fG=ze({"src/traces/carpet/catmull_rom.js"(J,V){"use strict";var p=.5;V.exports=function(E,k,l,e){var t=E[0]-k[0],n=E[1]-k[1],r=l[0]-k[0],a=l[1]-k[1],o=Math.pow(t*t+n*n,p/2),s=Math.pow(r*r+a*a,p/2),c=(s*s*t-o*o*r)*e,m=(s*s*n-o*o*a)*e,h=s*(o+s)*3,v=o*(o+s)*3;return[[k[0]+(h&&c/h),k[1]+(h&&m/h)],[k[0]-(v&&c/v),k[1]-(v&&m/v)]]}}}),hG=ze({"src/traces/carpet/compute_control_points.js"(J,V){"use strict";var p=fG(),b=Nr().ensureArray;function E(k,l,e){var t=-.5*e[0]+1.5*l[0],n=-.5*e[1]+1.5*l[1];return[(2*t+k[0])/3,(2*n+k[1])/3]}V.exports=function(l,e,t,n,r,a){var o,s,c,m,h,v,g,i,w,S,M=t[0].length,C=t.length,_=r?3*M-2:M,T=a?3*C-2:C;for(l=b(l,T),e=b(e,T),c=0;ch&&_g&&Tv||Ti},n.setScale=function(){var _=n._x,T=n._y,f=E(n._xctrl,n._yctrl,_,T,c.smoothing,m.smoothing);n._xctrl=f[0],n._yctrl=f[1],n.evalxy=k([n._xctrl,n._yctrl],o,s,c.smoothing,m.smoothing),n.dxydi=l([n._xctrl,n._yctrl],c.smoothing,m.smoothing),n.dxydj=e([n._xctrl,n._yctrl],c.smoothing,m.smoothing)},n.i2a=function(_){var T=Math.max(0,Math.floor(_[0]),o-2),f=_[0]-T;return(1-f)*r[T]+f*r[T+1]},n.j2b=function(_){var T=Math.max(0,Math.floor(_[1]),o-2),f=_[1]-T;return(1-f)*a[T]+f*a[T+1]},n.ij2ab=function(_){return[n.i2a(_[0]),n.j2b(_[1])]},n.a2i=function(_){var T=Math.max(0,Math.min(b(_,r),o-2)),f=r[T],u=r[T+1];return Math.max(0,Math.min(o-1,T+(_-f)/(u-f)))},n.b2j=function(_){var T=Math.max(0,Math.min(b(_,a),s-2)),f=a[T],u=a[T+1];return Math.max(0,Math.min(s-1,T+(_-f)/(u-f)))},n.ab2ij=function(_){return[n.a2i(_[0]),n.b2j(_[1])]},n.i2c=function(_,T){return n.evalxy([],_,T)},n.ab2xy=function(_,T,f){if(!f&&(_r[o-1]|Ta[s-1]))return[!1,!1];var u=n.a2i(_),A=n.b2j(T),x=n.evalxy([],u,A);if(f){var z=0,I=0,O=[],D,B,F,P;_r[o-1]?(D=o-2,B=1,z=(_-r[o-1])/(r[o-1]-r[o-2])):(D=Math.max(0,Math.min(o-2,Math.floor(u))),B=u-D),Ta[s-1]?(F=s-2,P=1,I=(T-a[s-1])/(a[s-1]-a[s-2])):(F=Math.max(0,Math.min(s-2,Math.floor(A))),P=A-F),z&&(n.dxydi(O,D,F,B,P),x[0]+=O[0]*z,x[1]+=O[1]*z),I&&(n.dxydj(O,D,F,B,P),x[0]+=O[0]*I,x[1]+=O[1]*I)}return x},n.c2p=function(_,T,f){return[T.c2p(_[0]),f.c2p(_[1])]},n.p2x=function(_,T,f){return[T.p2c(_[0]),f.p2c(_[1])]},n.dadi=function(_){var T=Math.max(0,Math.min(r.length-2,_));return r[T+1]-r[T]},n.dbdj=function(_){var T=Math.max(0,Math.min(a.length-2,_));return a[T+1]-a[T]},n.dxyda=function(_,T,f,u){var A=n.dxydi(null,_,T,f,u),x=n.dadi(_,f);return[A[0]/x,A[1]/x]},n.dxydb=function(_,T,f,u){var A=n.dxydj(null,_,T,f,u),x=n.dbdj(T,u);return[A[0]/x,A[1]/x]},n.dxyda_rough=function(_,T,f){var u=w*(f||.1),A=n.ab2xy(_+u,T,!0),x=n.ab2xy(_-u,T,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dxydb_rough=function(_,T,f){var u=S*(f||.1),A=n.ab2xy(_,T+u,!0),x=n.ab2xy(_,T-u,!0);return[(A[0]-x[0])*.5/u,(A[1]-x[1])*.5/u]},n.dpdx=function(_){return _._m},n.dpdy=function(_){return _._m}}}}),gG=ze({"src/traces/carpet/calc.js"(J,V){"use strict";var p=Gi(),b=Nr().isArray1D,E=nG(),k=iG(),l=oG(),e=sG(),t=lG(),n=lb(),r=uG(),a=sb(),o=mG();V.exports=function(c,m){var h=p.getFromId(c,m.xaxis),v=p.getFromId(c,m.yaxis),g=m.aaxis,i=m.baxis,w=m.x,S=m.y,M=[];w&&b(w)&&M.push("x"),S&&b(S)&&M.push("y"),M.length&&a(m,g,i,"a","b",M);var C=m._a=m._a||m.a,_=m._b=m._b||m.b;w=m._x||m.x,S=m._y||m.y;var T={};if(m._cheater){var f=g.cheatertype==="index"?C.length:C,u=i.cheatertype==="index"?_.length:_;w=E(f,u,m.cheaterslope)}m._x=w=n(w),m._y=S=n(S),r(w,C,_),r(S,C,_),o(m),m.setScale();var A=k(w),x=k(S),z=.5*(A[1]-A[0]),I=.5*(A[1]+A[0]),O=.5*(x[1]-x[0]),D=.5*(x[1]+x[0]),B=1.3;return A=[I-z*B,I+z*B],x=[D-O*B,D+O*B],m._extremes[h._id]=p.findExtremes(h,A,{padded:!0}),m._extremes[v._id]=p.findExtremes(v,x,{padded:!0}),l(m,"a","b"),l(m,"b","a"),e(m,g),e(m,i),T.clipsegments=t(m._xctrl,m._yctrl,g,i),T.x=w,T.y=S,T.a=C,T.b=_,[T]}}}),yG=ze({"src/traces/carpet/index.js"(J,V){"use strict";V.exports={attributes:H2(),supplyDefaults:tG(),plot:aG(),calc:gG(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:Du(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}}}),_G=ze({"lib/carpet.js"(J,V){"use strict";V.exports=yG()}}),YM=ze({"src/traces/scattercarpet/attributes.js"(J,V){"use strict";var p=Bd(),b=su(),E=ws(),{hovertemplateAttrs:k,texttemplateAttrs:l,templatefallbackAttrs:e}=xs(),t=qs(),n=Ki().extendFlat,r=b.marker,a=b.line,o=r.line;V.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:n({},b.mode,{dflt:"markers"}),text:n({},b.text,{}),texttemplate:l({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:e({editType:"plot"}),hovertext:n({},b.hovertext,{}),line:{color:a.color,width:a.width,dash:a.dash,backoff:a.backoff,shape:n({},a.shape,{values:["linear","spline"]}),smoothing:a.smoothing,editType:"calc"},connectgaps:b.connectgaps,fill:n({},b.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:p(),marker:n({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:n({width:o.width,dash:o.dash,editType:"calc"},t("marker.line")),gradient:r.gradient,editType:"calc"},t("marker")),textfont:b.textfont,textposition:b.textposition,selected:b.selected,unselected:b.unselected,hoverinfo:n({},E.hoverinfo,{flags:["a","b","text","name"]}),hoveron:b.hoveron,hovertemplate:k(),hovertemplatefallback:e(),zorder:b.zorder}}}),xG=ze({"src/traces/scattercarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=zd(),E=el(),k=id(),l=_d(),e=$m(),t=xd(),n=Od(),r=YM();V.exports=function(o,s,c,m){function h(C,_){return p.coerce(o,s,r,C,_)}h("carpet"),s.xaxis="x",s.yaxis="y";var v=h("a"),g=h("b"),i=Math.min(v.length,g.length);if(!i){s.visible=!1;return}s._length=i,h("text"),h("texttemplate"),h("texttemplatefallback"),h("hovertext");var w=i0?T=C.labelprefix.replace(/ = $/,""):T=C._hovertitle,i.push(T+": "+_.toFixed(3)+C.labelsuffix)}if(!h.hovertemplate){var S=m.hi||h.hoverinfo,M=S.split("+");M.indexOf("all")!==-1&&(M=["a","b","text"]),M.indexOf("a")!==-1&&w(v.aaxis,m.a),M.indexOf("b")!==-1&&w(v.baxis,m.b),i.push("y: "+r.yLabel),M.indexOf("text")!==-1&&b(m,h,i),r.extraText=i.join("
")}return n}}}),MG=ze({"src/traces/scattercarpet/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){var t=l[e];return b.a=t.a,b.b=t.b,b.y=t.y,b}}}),SG=ze({"src/traces/scattercarpet/index.js"(J,V){"use strict";V.exports={attributes:YM(),supplyDefaults:xG(),colorbar:Of(),formatLabels:bG(),calc:wG(),plot:TG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:AG(),selectPoints:Yv(),eventData:MG(),moduleType:"trace",name:"scattercarpet",basePlotModule:Du(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}}}),EG=ze({"lib/scattercarpet.js"(J,V){"use strict";V.exports=SG()}}),XM=ze({"src/traces/contourcarpet/attributes.js"(J,V){"use strict";var p=rg(),b=M1(),E=qs(),k=Ki().extendFlat,l=b.contours;V.exports=k({carpet:{valType:"string",editType:"calc"},z:p.z,a:p.x,a0:p.x0,da:p.dx,b:p.y,b0:p.y0,db:p.dy,text:p.text,hovertext:p.hovertext,transpose:p.transpose,atype:p.xtype,btype:p.ytype,fillcolor:b.fillcolor,autocontour:b.autocontour,ncontours:b.ncontours,contours:{type:l.type,start:l.start,end:l.end,size:l.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:l.showlines,showlabels:l.showlabels,labelfont:l.labelfont,labelformat:l.labelformat,operation:l.operation,value:l.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:b.line.color,width:b.line.width,dash:b.line.dash,smoothing:b.line.smoothing,editType:"plot"},zorder:b.zorder},E("",{cLetter:"z",autoColorDflt:!1}))}}),ZM=ze({"src/traces/contourcarpet/defaults.js"(J,V){"use strict";var p=Nr(),b=ob(),E=XM(),k=hT(),l=xb(),e=bb();V.exports=function(n,r,a,o){function s(v,g){return p.coerce(n,r,E,v,g)}function c(v){return p.coerce2(n,r,E,v)}if(s("carpet"),n.a&&n.b){var m=b(n,r,s,o,"a","b");if(!m){r.visible=!1;return}s("text");var h=s("contours.type")==="constraint";h?k(n,r,s,o,a,{hasHover:!1}):(l(n,r,s,c),e(n,r,s,o,{hasHover:!1}))}else r._defaultColor=a,r._length=null;s("zorder")}}}),kG=ze({"src/traces/contourcarpet/calc.js"(J,V){"use strict";var p=Qf(),b=Nr(),E=sb(),k=lb(),l=ub(),e=cb(),t=$5(),n=ZM(),r=W2(),a=aT();V.exports=function(c,m){var h=m._carpetTrace=r(c,m);if(!(!h||!h.visible||h.visible==="legendonly")){if(!m.a||!m.b){var v=c.data[h.index],g=c.data[m.index];g.a||(g.a=v.a),g.b||(g.b=v.b),n(g,m,m._defaultColor,c._fullLayout)}var i=o(c,m);return a(m,m._z),i}};function o(s,c){var m=c._carpetTrace,h=m.aaxis,v=m.baxis,g,i,w,S,M,C,_;h._minDtick=0,v._minDtick=0,b.isArray1D(c.z)&&E(c,h,v,"a","b",["z"]),g=c._a=c._a||c.a,S=c._b=c._b||c.b,g=g?h.makeCalcdata(c,"_a"):[],S=S?v.makeCalcdata(c,"_b"):[],i=c.a0||0,w=c.da||1,M=c.b0||0,C=c.db||1,_=c._z=k(c._z||c.z,c.transpose),c._emptypoints=e(_),l(_,c._emptypoints);var T=b.maxRowLength(_),f=c.xtype==="scaled"?"":g,u=t(c,f,i,w,T,h),A=c.ytype==="scaled"?"":S,x=t(c,A,M,C,_.length,v),z={a:u,b:x,z:_};return c.contours.type==="levels"&&c.contours.coloring!=="none"&&p(s,c,{vals:_,containerStr:"",cLetter:"z"}),[z]}}}),CG=ze({"src/traces/carpet/axis_aligned_line.js"(J,V){"use strict";var p=Nr().isArrayOrTypedArray;V.exports=function(b,E,k,l){var e,t,n,r,a,o,s,c,m,h,v,g,i,w=p(k)?"a":"b",S=w==="a"?b.aaxis:b.baxis,M=S.smoothing,C=w==="a"?b.a2i:b.b2j,_=w==="a"?k:l,T=w==="a"?l:k,f=w==="a"?E.a.length:E.b.length,u=w==="a"?E.b.length:E.a.length,A=Math.floor(w==="a"?b.b2j(T):b.a2i(T)),x=w==="a"?function(re){return b.evalxy([],re,A)}:function(re){return b.evalxy([],A,re)};M&&(n=Math.max(0,Math.min(u-2,A)),r=A-n,t=w==="a"?function(re,ne){return b.dxydi([],re,n,ne,r)}:function(re,ne){return b.dxydj([],n,re,r,ne)});var z=C(_[0]),I=C(_[1]),O=z0?Math.floor:Math.ceil,F=O>0?Math.ceil:Math.floor,P=O>0?Math.min:Math.max,j=O>0?Math.max:Math.min,U=B(z+D),$=F(I-D);s=x(z);var Q=[[s]];for(e=U;e*O<$*O;e+=O)a=[],v=j(z,e),g=P(I,e+O),i=g-v,o=Math.max(0,Math.min(f-2,Math.floor(.5*(v+g)))),c=x(g),M&&(m=t(o,v-o),h=t(o,g-o),a.push([s[0]+m[0]/3*i,s[1]+m[1]/3*i]),a.push([c[0]-h[0]/3*i,c[1]-h[1]/3*i])),a.push(c),Q.push(a),s=c;return Q}}}),LG=ze({"src/traces/contourcarpet/plot.js"(J,V){"use strict";var p=ci(),b=HM(),E=WM(),k=$i(),l=Nr(),e=iT(),t=oT(),n=wb(),r=E1(),a=lT(),o=sT(),s=uT(),c=W2(),m=CG();V.exports=function(f,u,A,x){var z=u.xaxis,I=u.yaxis;l.makeTraceGroups(x,A,"contour").each(function(O){var D=p.select(this),B=O[0],F=B.trace,P=F._carpetTrace=c(f,F),j=f.calcdata[P.index][0];if(!P.visible||P.visible==="legendonly")return;var U=B.a,$=B.b,Q=F.contours,re=o(Q,u,B),ne=Q.type==="constraint",se=Q._operation,G=ne?se==="="?"lines":"fill":Q.coloring;function X(Me){var Se=P.ab2xy(Me[0],Me[1],!0);return[z.c2p(Se[0]),I.c2p(Se[1])]}var K=[[U[0],$[$.length-1]],[U[U.length-1],$[$.length-1]],[U[U.length-1],$[0]],[U[0],$[0]]];e(re);var H=(U[U.length-1]-U[0])*1e-8,Y=($[$.length-1]-$[0])*1e-8;t(re,H,Y);var q=re;Q.type==="constraint"&&(q=a(re,se)),h(re,X);var Z,ee,ae,he,xe=[];for(he=j.clipsegments.length-1;he>=0;he--)Z=j.clipsegments[he],ee=b([],Z.x,z.c2p),ae=b([],Z.y,I.c2p),ee.reverse(),ae.reverse(),xe.push(E(ee,ae,Z.bicubic));var we="M"+xe.join("L")+"Z";M(D,j.clipsegments,z,I,ne,G),C(F,D,z,I,q,K,X,P,j,G,we),v(D,re,f,B,Q,u,P),k.setClipUrl(D,P._clipPathId,f)})};function h(T,f){var u,A,x,z,I,O,D,B,F;for(u=0;ure&&(A.max=re),A.len=A.max-A.min}function i(T,f,u){var A=T.getPointAtLength(f),x=T.getPointAtLength(u),z=x.x-A.x,I=x.y-A.y,O=Math.sqrt(z*z+I*I);return[z/O,I/O]}function w(T){var f=Math.sqrt(T[0]*T[0]+T[1]*T[1]);return[T[0]/f,T[1]/f]}function S(T,f){var u=Math.abs(T[0]*f[0]+T[1]*f[1]),A=Math.sqrt(1-u*u);return A/u}function M(T,f,u,A,x,z){var I,O,D,B,F=l.ensureSingle(T,"g","contourbg"),P=F.selectAll("path").data(z==="fill"&&!x?[0]:[]);P.enter().append("path"),P.exit().remove();var j=[];for(B=0;B=0&&(U=ee,Q=re):Math.abs(j[1]-U[1])=0&&(U=ee,Q=re):l.log("endpt to newendpt is not vert. or horz.",j,U,ee)}if(Q>=0)break;B+=q(j,U),j=U}if(Q===f.edgepaths.length){l.log("unclosed perimeter path");break}D=Q,P=F.indexOf(D)===-1,P&&(D=F[0],B+=q(j,U)+"Z",j=null)}for(D=0;D_):C=O>x,_=O;var D=h(x,z,I,O);D.pos=A,D.yc=(x+O)/2,D.i=u,D.dir=C?"increasing":"decreasing",D.x=D.pos,D.y=[I,z],T&&(D.orig_p=s[u]),S&&(D.tx=o.text[u]),M&&(D.htx=o.hovertext[u]),f.push(D)}else f.push({pos:A,empty:!0})}return o._extremes[m._id]=E.findExtremes(m,p.concat(i,g),{padded:!0}),f.length&&(f[0].t={labels:{open:b(a,"open:")+" ",high:b(a,"high:")+" ",low:b(a,"low:")+" ",close:b(a,"close:")+" "}}),f}function r(a,o,s){var c=s._minDiff;if(!c){var m=a._fullData,h=[];c=1/0;var v;for(v=0;v"+w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat)):(I=b.extendFlat({},M),I.y0=I.y1=z,I.yLabelVal=x,I.yLabel=w.labels[A]+p.hoverLabelText(g,x,i.yhoverformat),I.name="",S.push(I),f[x]=I)}return S}function o(s,c,m,h){var v=s.cd,g=s.ya,i=v[0].trace,w=v[0].t,S=r(s,c,m,h);if(!S)return[];var M=S.index,C=v[M],_=S.index=C.i,T=C.dir;function f(D){return w.labels[D]+p.hoverLabelText(g,i[D][_],i.yhoverformat)}var u=C.hi||i.hoverinfo||"",A=u.split("+"),x=u==="all",z=x||A.indexOf("y")!==-1,I=x||A.indexOf("text")!==-1,O=z?[f("open"),f("high"),f("low"),f("close")+" "+t[T]]:[];return I&&l(C,i,O),S.extraText=O.join("
"),S.y0=S.y1=g.c2p(C.yc,!0),[S]}V.exports={hoverPoints:n,hoverSplit:a,hoverOnPoints:o}}}),QM=ze({"src/traces/ohlc/select.js"(J,V){"use strict";V.exports=function(b,E){var k=b.cd,l=b.xaxis,e=b.yaxis,t=[],n,r=k[0].t.bPos||0;if(E===!1)for(n=0;nc?function(i){return i<=0}:function(i){return i>=0};r.c2g=function(i){var w=r.c2l(i)-s;return(g(w)?w:0)+v},r.g2c=function(i){return r.l2c(i+s-v)},r.g2p=function(i){return i*h},r.c2p=function(i){return r.g2p(r.c2g(i))}}}function e(r,a){return a==="degrees"?E(r):r}function t(r,a){return a==="degrees"?k(r):r}function n(r,a){var o=r.type;if(o==="linear"){var s=r.d2c,c=r.c2d;r.d2c=function(m,h){return e(s(m),h)},r.c2d=function(m,h){return c(t(m,h))}}r.makeCalcdata=function(m,h){var v=m[h],g=m._length,i,w,S=function(f){return r.d2c(f,m.thetaunit)};if(v)for(i=new Array(g),w=0;w0?f:1/0},C=E(S,M),_=p.mod(C+1,S.length);return[S[C],S[_]]}function h(w){return Math.abs(w)>1e-10?w:0}function v(w,S,M){S=S||0,M=M||0;for(var C=w.length,_=new Array(C),T=0;T0?1:0}function b(t){var n=t[0],r=t[1];if(!isFinite(n)||!isFinite(r))return[1,0];var a=(n+1)*(n+1)+r*r;return[(n*n+r*r-1)/a,2*r/a]}function E(t,n){var r=n[0],a=n[1];return[r*t.radius+t.cx,-a*t.radius+t.cy]}function k(t,n){return n*t.radius}function l(t,n,r,a){var o=E(t,b([r,n])),s=o[0],c=o[1],m=E(t,b([a,n])),h=m[0],v=m[1];if(n===0)return["M"+s+","+c,"L"+h+","+v].join(" ");var g=k(t,1/Math.abs(n));return["M"+s+","+c,"A"+g+","+g+" 0 0,"+(n<0?1:0)+" "+h+","+v].join(" ")}function e(t,n,r,a){var o=k(t,1/(n+1)),s=E(t,b([n,r])),c=s[0],m=s[1],h=E(t,b([n,a])),v=h[0],g=h[1];if(p(r)!==p(a)){var i=E(t,b([n,0])),w=i[0],S=i[1];return["M"+c+","+m,"A"+o+","+o+" 0 0,"+(0Ie?(Ve=ee,Ge=ee*Ie,ce=(ae-Ge)/K.h/2,ke=[q[0],q[1]],_e=[Z[0]+ce,Z[1]-ce]):(Ve=ae/Ie,Ge=ae,ce=(ee-Ve)/K.w/2,ke=[q[0]+ce,q[1]-ce],_e=[Z[0],Z[1]]),G.xLength2=Ve,G.yLength2=Ge,G.xDomain2=ke,G.yDomain2=_e;var ve=G.xOffset2=K.l+K.w*ke[0],le=G.yOffset2=K.t+K.h*(1-_e[1]),Ae=G.radius=Ve/we,Be=G.innerRadius=G.getHole(se)*Ae,Xe=G.cx=ve-Ae*xe[0],Ye=G.cy=le+Ae*xe[3],yt=G.cxx=Xe-ve,gt=G.cyy=Ye-le,Tt=H.side,At;Tt==="counterclockwise"?(At=Tt,Tt="top"):Tt==="clockwise"&&(At=Tt,Tt="bottom"),G.radialAxis=G.mockAxis(ne,se,H,{_id:"x",side:Tt,_trueSide:At,domain:[Be/K.w,Ae/K.w]}),G.angularAxis=G.mockAxis(ne,se,Y,{side:"right",domain:[0,Math.PI],autorange:!1}),G.doAutoRange(ne,se),G.updateAngularAxis(ne,se),G.updateRadialAxis(ne,se),G.updateRadialAxisTitle(ne,se),G.xaxis=G.mockCartesianAxis(ne,se,{_id:"x",domain:ke}),G.yaxis=G.mockCartesianAxis(ne,se,{_id:"y",domain:_e});var $t=G.pathSubplot();G.clipPaths.forTraces.select("path").attr("d",$t).attr("transform",l(yt,gt)),X.frontplot.attr("transform",l(ve,le)).call(t.setClipUrl,G._hasClipOnAxisFalse?null:G.clipIds.forTraces,G.gd),X.bg.attr("d",$t).attr("transform",l(Xe,Ye)).call(e.fill,se.bgcolor)},j.mockAxis=function(ne,se,G,X){var K=E.extendFlat({},G,X);return o(K,se,ne),K},j.mockCartesianAxis=function(ne,se,G){var X=this,K=X.isSmith,H=G._id,Y=E.extendFlat({type:"linear"},G);a(Y,ne);var q={x:[0,2],y:[1,3]};return Y.setRange=function(){var Z=X.sectorBBox,ee=q[H],ae=X.radialAxis._rl,he=(ae[1]-ae[0])/(1-X.getHole(se));Y.range=[Z[ee[0]]*he,Z[ee[1]]*he]},Y.isPtWithinRange=H==="x"&&!K?function(Z){return X.isPtInside(Z)}:function(){return!0},Y.setRange(),Y.setScale(),Y},j.doAutoRange=function(ne,se){var G=this,X=G.gd,K=G.radialAxis,H=G.getRadial(se);s(X,K);var Y=K.range;if(H.range=Y.slice(),H._input.range=Y.slice(),K._rl=[K.r2l(Y[0],null,"gregorian"),K.r2l(Y[1],null,"gregorian")],K.minallowed!==void 0){var q=K.r2l(K.minallowed);K._rl[0]>K._rl[1]?K._rl[1]=Math.max(K._rl[1],q):K._rl[0]=Math.max(K._rl[0],q)}if(K.maxallowed!==void 0){var Z=K.r2l(K.maxallowed);K._rl[0]90&&ae<=270&&(he.tickangle=180);var Me=we?function(Ae){var Be=I(G,A([Ae.x,0]));return l(Be[0]-q,Be[1]-Z)}:function(Ae){return l(he.l2p(Ae.x)+Y,0)},Se=we?function(Ae){return z(G,Ae.x,-1/0,1/0)}:function(Ae){return G.pathArc(he.r2p(Ae.x)+Y)},Ie=U(ee);if(G.radialTickLayout!==Ie&&(K["radial-axis"].selectAll(".xtick").remove(),G.radialTickLayout=Ie),xe){he.setScale();var Ve=0,Ge=we?(he.tickvals||[]).filter(function(Ae){return Ae>=0}).map(function(Ae){return r.tickText(he,Ae,!0,!1)}):r.calcTicks(he),ke=we?Ge:r.clipEnds(he,Ge),_e=r.getTickSigns(he)[2];we&&((he.ticks==="top"&&he.side==="bottom"||he.ticks==="bottom"&&he.side==="top")&&(_e=-_e),he.ticks==="top"&&he.side==="top"&&(Ve=-he.ticklen),he.ticks==="bottom"&&he.side==="bottom"&&(Ve=he.ticklen)),r.drawTicks(X,he,{vals:Ge,layer:K["radial-axis"],path:r.makeTickPath(he,0,_e),transFn:Me,crisp:!1}),r.drawGrid(X,he,{vals:ke,layer:K["radial-grid"],path:Se,transFn:E.noop,crisp:!1}),r.drawLabels(X,he,{vals:Ge,layer:K["radial-axis"],transFn:Me,labelFns:r.makeLabelFns(he,Ve)})}var ce=G.radialAxisAngle=G.vangles?F(Q(B(ee.angle),G.vangles)):ee.angle,ve=l(q,Z),le=ve+k(-ce);re(K["radial-axis"],xe&&(ee.showticklabels||ee.ticks),{transform:le}),re(K["radial-grid"],xe&&ee.showgrid,{transform:we?"":ve}),re(K["radial-line"].select("line"),xe&&ee.showline,{x1:we?-H:Y,y1:0,x2:H,y2:0,transform:le}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateRadialAxisTitle=function(ne,se,G){if(!this.isSmith){var X=this,K=X.gd,H=X.radius,Y=X.cx,q=X.cy,Z=X.getRadial(se),ee=X.id+"title",ae=0;if(Z.title){var he=t.bBox(X.layers["radial-axis"].node()).height,xe=Z.title.font.size,we=Z.side;ae=we==="top"?xe:we==="counterclockwise"?-(he+xe*.4):he+xe*.8}var Me=G!==void 0?G:X.radialAxisAngle,Se=B(Me),Ie=Math.cos(Se),Ve=Math.sin(Se),Ge=Y+H/2*Ie+ae*Ve,ke=q-H/2*Ve+ae*Ie;X.layers["radial-axis-title"]=v.draw(K,ee,{propContainer:Z,propName:X.id+".radialaxis.title.text",placeholder:O(K,"Click to enter radial axis title"),attributes:{x:Ge,y:ke,"text-anchor":"middle"},transform:{rotate:-Me}})}},j.updateAngularAxis=function(ne,se){var G=this,X=G.gd,K=G.layers,H=G.radius,Y=G.innerRadius,q=G.cx,Z=G.cy,ee=G.getAngular(se),ae=G.angularAxis,he=G.isSmith;he||(G.fillViewInitialKey("angularaxis.rotation",ee.rotation),ae.setGeometry(),ae.setScale());var xe=he?function(Be){var Xe=I(G,A([0,Be.x]));return Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2}:function(Be){return ae.t2g(Be.x)};ae.type==="linear"&&ae.thetaunit==="radians"&&(ae.tick0=F(ae.tick0),ae.dtick=F(ae.dtick));var we=function(Be){return l(q+H*Math.cos(Be),Z-H*Math.sin(Be))},Me=he?function(Be){var Xe=I(G,A([0,Be.x]));return l(Xe[0],Xe[1])}:function(Be){return we(xe(Be))},Se=he?function(Be){var Xe=I(G,A([0,Be.x])),Ye=Math.atan2(Xe[0]-q,Xe[1]-Z)-Math.PI/2;return l(Xe[0],Xe[1])+k(-F(Ye))}:function(Be){var Xe=xe(Be);return we(Xe)+k(-F(Xe))},Ie=he?function(Be){return x(G,Be.x,0,1/0)}:function(Be){var Xe=xe(Be),Ye=Math.cos(Xe),yt=Math.sin(Xe);return"M"+[q+Y*Ye,Z-Y*yt]+"L"+[q+H*Ye,Z-H*yt]},Ve=r.makeLabelFns(ae,0),Ge=Ve.labelStandoff,ke={};ke.xFn=function(Be){var Xe=xe(Be);return Math.cos(Xe)*Ge},ke.yFn=function(Be){var Xe=xe(Be),Ye=Math.sin(Xe)>0?.2:1;return-Math.sin(Xe)*(Ge+Be.fontSize*Ye)+Math.abs(Math.cos(Xe))*(Be.fontSize*_)},ke.anchorFn=function(Be){var Xe=xe(Be),Ye=Math.cos(Xe);return Math.abs(Ye)<.1?"middle":Ye>0?"start":"end"},ke.heightFn=function(Be,Xe,Ye){var yt=xe(Be);return-.5*(1+Math.sin(yt))*Ye};var _e=U(ee);G.angularTickLayout!==_e&&(K["angular-axis"].selectAll("."+ae._id+"tick").remove(),G.angularTickLayout=_e);var ce=he?[1/0].concat(ae.tickvals||[]).map(function(Be){return r.tickText(ae,Be,!0,!1)}):r.calcTicks(ae);he&&(ce[0].text="\u221E",ce[0].fontSize*=1.75);var ve;if(se.gridshape==="linear"?(ve=ce.map(xe),E.angleDelta(ve[0],ve[1])<0&&(ve=ve.slice().reverse())):ve=null,G.vangles=ve,ae.type==="category"&&(ce=ce.filter(function(Be){return E.isAngleInsideSector(xe(Be),G.sectorInRad)})),ae.visible){var le=ae.ticks==="inside"?-1:1,Ae=(ae.linewidth||1)/2;r.drawTicks(X,ae,{vals:ce,layer:K["angular-axis"],path:"M"+le*Ae+",0h"+le*ae.ticklen,transFn:Se,crisp:!1}),r.drawGrid(X,ae,{vals:ce,layer:K["angular-grid"],path:Ie,transFn:E.noop,crisp:!1}),r.drawLabels(X,ae,{vals:ce,layer:K["angular-axis"],repositionOnUpdate:!0,transFn:Me,labelFns:ke})}re(K["angular-line"].select("path"),ee.showline,{d:G.pathSubplot(),transform:l(q,Z)}).attr("stroke-width",ee.linewidth).call(e.stroke,ee.linecolor)},j.updateFx=function(ne,se){if(!this.gd._context.staticPlot){var G=!this.isSmith;G&&(this.updateAngularDrag(ne),this.updateRadialDrag(ne,se,0),this.updateRadialDrag(ne,se,1)),this.updateHoverAndMainDrag(ne)}},j.updateHoverAndMainDrag=function(ne){var se=this,G=se.isSmith,X=se.gd,K=se.layers,H=ne._zoomlayer,Y=T.MINZOOM,q=T.OFFEDGE,Z=se.radius,ee=se.innerRadius,ae=se.cx,he=se.cy,xe=se.cxx,we=se.cyy,Me=se.sectorInRad,Se=se.vangles,Ie=se.radialAxis,Ve=f.clampTiny,Ge=f.findXYatLength,ke=f.findEnclosingVertexAngles,_e=T.cornerHalfWidth,ce=T.cornerLen/2,ve,le,Ae=c.makeDragger(K,"path","maindrag",ne.dragmode===!1?"none":"crosshair");p.select(Ae).attr("d",se.pathSubplot()).attr("transform",l(ae,he)),Ae.onmousemove=function(qt){h.hover(X,qt,se.id),X._fullLayout._lasthover=Ae,X._fullLayout._hoversubplot=se.id},Ae.onmouseout=function(qt){X._dragging||m.unhover(X,qt)};var Be={element:Ae,gd:X,subplot:se.id,plotinfo:{id:se.id,xaxis:se.xaxis,yaxis:se.yaxis},xaxes:[se.xaxis],yaxes:[se.yaxis]},Xe,Ye,yt,gt,Tt,At,$t,rr,_r;function Xt(qt,Vt){return Math.sqrt(qt*qt+Vt*Vt)}function or(qt,Vt){return Xt(qt-xe,Vt-we)}function Ot(qt,Vt){return Math.atan2(we-Vt,qt-xe)}function vt(qt,Vt){return[qt*Math.cos(Vt),qt*Math.sin(-Vt)]}function ht(qt,Vt){if(qt===0)return se.pathSector(2*_e);var Ht=ce/qt,Sr=Vt-Ht,Kr=Vt+Ht,Yt=Math.max(0,Math.min(qt,Z)),Rt=Yt-_e,nr=Yt+_e;return"M"+vt(Rt,Sr)+"A"+[Rt,Rt]+" 0,0,0 "+vt(Rt,Kr)+"L"+vt(nr,Kr)+"A"+[nr,nr]+" 0,0,1 "+vt(nr,Sr)+"Z"}function De(qt,Vt,Ht){if(qt===0)return se.pathSector(2*_e);var Sr=vt(qt,Vt),Kr=vt(qt,Ht),Yt=Ve((Sr[0]+Kr[0])/2),Rt=Ve((Sr[1]+Kr[1])/2),nr,ur;if(Yt&&Rt){var cr=Rt/Yt,Rr=-1/cr,Qr=Ge(_e,cr,Yt,Rt);nr=Ge(ce,Rr,Qr[0][0],Qr[0][1]),ur=Ge(ce,Rr,Qr[1][0],Qr[1][1])}else{var Zr,ha;Rt?(Zr=ce,ha=_e):(Zr=_e,ha=ce),nr=[[Yt-Zr,Rt-ha],[Yt+Zr,Rt-ha]],ur=[[Yt-Zr,Rt+ha],[Yt+Zr,Rt+ha]]}return"M"+nr.join("L")+"L"+ur.reverse().join("L")+"Z"}function Ne(){yt=null,gt=null,Tt=se.pathSubplot(),At=!1;var qt=X._fullLayout[se.id];$t=e.luminosity(qt.bgcolor),rr=c.makeZoombox(H,$t,ae,he,Tt),rr.attr("fill-rule","evenodd"),_r=c.makeCorners(H,ae,he),w(X)}function We(qt,Vt){return Vt=Math.max(Math.min(Vt,Z),ee),qtY?(qt-1&&qt===1&&i(Vt,X,[se.xaxis],[se.yaxis],se.id,Be),Ht.indexOf("event")>-1&&h.click(X,Vt,se.id)}Be.prepFn=function(qt,Vt,Ht){var Sr=X._fullLayout.dragmode,Kr=Ae.getBoundingClientRect();X._fullLayout._calcInverseTransform(X);var Yt=X._fullLayout._invTransform;ve=X._fullLayout._invScaleX,le=X._fullLayout._invScaleY;var Rt=E.apply3DTransform(Yt)(Vt-Kr.left,Ht-Kr.top);if(Xe=Rt[0],Ye=Rt[1],Se){var nr=f.findPolygonOffset(Z,Me[0],Me[1],Se);Xe+=xe+nr[0],Ye+=we+nr[1]}switch(Sr){case"zoom":Be.clickFn=Ct,G||(Se?Be.moveFn=Mt:Be.moveFn=Je,Be.doneFn=pt,Ne(qt,Vt,Ht));break;case"select":case"lasso":g(qt,Vt,Ht,Be,Sr);break}},m.init(Be)},j.updateRadialDrag=function(ne,se,G){var X=this,K=X.gd,H=X.layers,Y=X.radius,q=X.innerRadius,Z=X.cx,ee=X.cy,ae=X.radialAxis,he=T.radialDragBoxSize,xe=he/2;if(!ae.visible)return;var we=B(X.radialAxisAngle),Me=ae._rl,Se=Me[0],Ie=Me[1],Ve=Me[G],Ge=.75*(Me[1]-Me[0])/(1-X.getHole(se))/Y,ke,_e,ce;G?(ke=Z+(Y+xe)*Math.cos(we),_e=ee-(Y+xe)*Math.sin(we),ce="radialdrag"):(ke=Z+(q-xe)*Math.cos(we),_e=ee-(q-xe)*Math.sin(we),ce="radialdrag-inner");var ve=c.makeRectDragger(H,ce,"crosshair",-xe,-xe,he,he),le={element:ve,gd:K};ne.dragmode===!1&&(le.dragmode=!1),re(p.select(ve),ae.visible&&q0!=(G?Xe>Se:Xe=90||K>90&&H>=450?we=1:q<=0&&ee<=0?we=0:we=Math.max(q,ee),K<=180&&H>=180||K>180&&H>=540?ae=-1:Y>=0&&Z>=0?ae=0:ae=Math.min(Y,Z),K<=270&&H>=270||K>270&&H>=630?he=-1:q>=0&&ee>=0?he=0:he=Math.min(q,ee),H>=360?xe=1:Y<=0&&Z<=0?xe=0:xe=Math.max(Y,Z),[ae,he,xe,we]}function Q(ne,se){var G=function(K){return E.angleDist(ne,K)},X=E.findIndexOfMin(se,G);return se[X]}function re(ne,se,G){return se?(ne.attr("display",null),ne.attr(G)):ne&&ne.attr("display","none"),ne}}}),n4=ze({"src/plots/polar/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({tickmode:b.minor.tickmode,nticks:b.nticks,tick0:b.tick0,dtick:b.dtick,tickvals:b.tickvals,ticktext:b.ticktext,ticks:b.ticks,ticklen:b.ticklen,tickwidth:b.tickwidth,tickcolor:b.tickcolor,ticklabelstep:b.ticklabelstep,showticklabels:b.showticklabels,labelalias:b.labelalias,minorloglabels:b.minorloglabels,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,showexponent:b.showexponent,exponentformat:b.exponentformat,minexponent:b.minexponent,separatethousands:b.separatethousands,tickfont:b.tickfont,tickangle:b.tickangle,tickformat:b.tickformat,tickformatstops:b.tickformatstops,layer:b.layer},"plot","from-root"),n={visible:k({},b.visible,{dflt:!0}),type:k({},b.type,{values:["-","linear","log","date","category"]}),autotypenumbers:b.autotypenumbers,autorangeoptions:{minallowed:b.autorangeoptions.minallowed,maxallowed:b.autorangeoptions.maxallowed,clipmin:b.autorangeoptions.clipmin,clipmax:b.autorangeoptions.clipmax,include:b.autorangeoptions.include,editType:"plot"},autorange:k({},b.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:k({},b.minallowed,{editType:"plot"}),maxallowed:k({},b.maxallowed,{editType:"plot"}),range:k({},b.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:b.categoryorder,categoryarray:b.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:b.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:k({},b.title.text,{editType:"plot",dflt:""}),font:k({},b.title.font,{editType:"plot"}),editType:"plot"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(n,e,t);var r={visible:k({},b.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:b.autotypenumbers,categoryorder:b.categoryorder,categoryarray:b.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:b.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};k(r,e,t),V.exports={domain:E({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:p.background},radialaxis:n,angularaxis:r,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}}}),qG=ze({"src/plots/polar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=Uv(),t=Ym(),n=ov(),r=sv(),a=Hx(),o=g1(),s=Jw(),c=Xm(),m=n4(),h=t4(),v=X2(),g=v.axisNames;function i(S,M,C,_){var T=C("bgcolor");_.bgColor=b.combine(T,_.paper_bgcolor);var f=C("sector");C("hole");var u=l(_.fullData,v.name,_.id),A=_.layoutOut,x;function z(xe,we){return C(x+"."+xe,we)}for(var I=0;I")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),HG=ze({"src/traces/scatterpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:$2(),categories:["polar","symbols","showLegend","scatter-like"],attributes:uy(),supplyDefaults:K2().supplyDefaults,colorbar:Of(),formatLabels:J2(),calc:VG(),plot:GG(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:Q2().hoverPoints,selectPoints:Yv(),meta:{}}}}),WG=ze({"lib/scatterpolar.js"(J,V){"use strict";V.exports=HG()}}),i4=ze({"src/traces/scatterpolargl/attributes.js"(J,V){"use strict";var p=uy(),{cliponaxis:b,hoveron:E}=p,k=Lo(p,["cliponaxis","hoveron"]),{connectgaps:l,line:{color:e,dash:t,width:n},fill:r,fillcolor:a,marker:o,textfont:s,textposition:c}=ty();V.exports=lo(Li({},k),{connectgaps:l,fill:r,fillcolor:a,line:{color:e,dash:t,editType:"calc",width:n},marker:o,textfont:s,textposition:c})}}),YG=ze({"src/traces/scatterpolargl/defaults.js"(J,V){"use strict";var p=Nr(),b=el(),E=K2().handleRThetaDefaults,k=id(),l=_d(),e=xd(),t=Od(),n=zd().PTS_LINESONLY,r=i4();V.exports=function(o,s,c,m){function h(g,i){return p.coerce(o,s,r,g,i)}var v=E(o,s,m,h);if(!v){s.visible=!1;return}h("thetaunit"),h("mode",v=t&&(_.marker.cluster=w.tree),_.marker&&(_.markerSel.positions=_.markerUnsel.positions=_.marker.positions=A),_.line&&A.length>1&&e.extendFlat(_.line,l.linePositions(a,i,A)),_.text&&(e.extendFlat(_.text,{positions:A},l.textPosition(a,i,_.text,_.marker)),e.extendFlat(_.textSel,{positions:A},l.textPosition(a,i,_.text,_.markerSel)),e.extendFlat(_.textUnsel,{positions:A},l.textPosition(a,i,_.text,_.markerUnsel))),_.fill&&!h.fill2d&&(h.fill2d=!0),_.marker&&!h.scatter2d&&(h.scatter2d=!0),_.line&&!h.line2d&&(h.line2d=!0),_.text&&!h.glText&&(h.glText=!0),h.lineOptions.push(_.line),h.fillOptions.push(_.fill),h.markerOptions.push(_.marker),h.markerSelectedOptions.push(_.markerSel),h.markerUnselectedOptions.push(_.markerUnsel),h.textOptions.push(_.text),h.textSelectedOptions.push(_.textSel),h.textUnselectedOptions.push(_.textUnsel),h.selectBatch.push([]),h.unselectBatch.push([]),w.x=x,w.y=z,w.rawx=x,w.rawy=z,w.r=M,w.theta=C,w.positions=A,w._scene=h,w.index=h.count,h.count++}}),E(a,o,s)}},V.exports.reglPrecompiled=n}}),QG=ze({"src/traces/scatterpolargl/index.js"(J,V){"use strict";var p=KG();p.plot=JG(),V.exports=p}}),eH=ze({"lib/scatterpolargl.js"(J,V){"use strict";V.exports=QG()}}),o4=ze({"src/traces/barpolar/attributes.js"(J,V){"use strict";var{hovertemplateAttrs:p,templatefallbackAttrs:b}=xs(),E=Ki().extendFlat,k=uy(),l=jd();V.exports={r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,base:E({},l.base,{}),offset:E({},l.offset,{}),width:E({},l.width,{}),text:E({},l.text,{}),hovertext:E({},l.hovertext,{}),marker:e(),hoverinfo:k.hoverinfo,hovertemplate:p(),hovertemplatefallback:b(),selected:l.selected,unselected:l.unselected};function e(){var t=E({},l.marker);return delete t.cornerradius,t}}}),s4=ze({"src/traces/barpolar/layout_attributes.js"(J,V){"use strict";V.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}}}),tH=ze({"src/traces/barpolar/defaults.js"(J,V){"use strict";var p=Nr(),b=K2().handleRThetaDefaults,E=eb(),k=o4();V.exports=function(e,t,n,r){function a(s,c){return p.coerce(e,t,k,s,c)}var o=b(e,t,r,a);if(!o){t.visible=!1;return}a("thetaunit"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),E(e,t,a,n,r),p.coerceSelectionMarkerOpacity(t,a)}}}),rH=ze({"src/traces/barpolar/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=s4();V.exports=function(E,k,l){var e={},t;function n(o,s){return p.coerce(E[t]||{},k[t],b,o,s)}for(var r=0;r0?(m=s,h=c):(m=c,h=s);var v=l.findEnclosingVertexAngles(m,t.vangles)[0],g=l.findEnclosingVertexAngles(h,t.vangles)[1],i=[v,(m+h)/2,g];return l.pathPolygonAnnulus(a,o,m,h,i,n,r)}:function(a,o,s,c){return E.pathAnnulus(a,o,s,c,n,r)}}}}),nH=ze({"src/traces/barpolar/hover.js"(J,V){"use strict";var p=Zl(),b=Nr(),E=eg().getTraceColor,k=b.fillText,l=Q2().makeHoverPointText,e=Z2().isPtInsidePolygon;V.exports=function(n,r,a){var o=n.cd,s=o[0].trace,c=n.subplot,m=c.radialAxis,h=c.angularAxis,v=c.vangles,g=v?e:b.isPtInsideSector,i=n.maxHoverDistance,w=h._period||2*Math.PI,S=Math.abs(m.g2p(Math.sqrt(r*r+a*a))),M=Math.atan2(a,r);m.range[0]>m.range[1]&&(M+=Math.PI);var C=function(u){return g(S,M,[u.rp0,u.rp1],[u.thetag0,u.thetag1],v)?i+Math.min(1,Math.abs(u.thetag1-u.thetag0)/w)-1+(u.rp1-S)/(u.rp1-u.rp0)-1:1/0};if(p.getClosest(o,C,n),n.index!==!1){var _=n.index,T=o[_];n.x0=n.x1=T.ct[0],n.y0=n.y1=T.ct[1];var f=b.extendFlat({},T,{r:T.s,theta:T.p});return k(T,s,n),l(f,s,c,n),n.hovertemplate=s.hovertemplate,n.color=E(s,T),n.xLabelVal=n.yLabelVal=void 0,T.s<0&&(n.idealAlign="left"),[n]}}}}),iH=ze({"src/traces/barpolar/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"barpolar",basePlotModule:$2(),categories:["polar","bar","showLegend"],attributes:o4(),layoutAttributes:s4(),supplyDefaults:tH(),supplyLayoutDefaults:rH(),calc:l4().calc,crossTraceCalc:l4().crossTraceCalc,plot:aH(),colorbar:Of(),formatLabels:J2(),style:ld().style,styleOnSelect:ld().styleOnSelect,hoverPoints:nH(),selectPoints:tg(),meta:{}}}}),oH=ze({"lib/barpolar.js"(J,V){"use strict";V.exports=iH()}}),u4=ze({"src/plots/smith/constants.js"(J,V){"use strict";V.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}}}),c4=ze({"src/plots/smith/layout_attributes.js"(J,V){"use strict";var p=fc(),b=cf(),E=Ml().attributes,k=Nr().extendFlat,l=Al().overrideAll,e=l({color:b.color,showline:k({},b.showline,{dflt:!0}),linecolor:b.linecolor,linewidth:b.linewidth,showgrid:k({},b.showgrid,{dflt:!0}),gridcolor:b.gridcolor,gridwidth:b.gridwidth,griddash:b.griddash},"plot","from-root"),t=l({ticklen:b.ticklen,tickwidth:k({},b.tickwidth,{dflt:2}),tickcolor:b.tickcolor,showticklabels:b.showticklabels,labelalias:b.labelalias,showtickprefix:b.showtickprefix,tickprefix:b.tickprefix,showticksuffix:b.showticksuffix,ticksuffix:b.ticksuffix,tickfont:b.tickfont,tickformat:b.tickformat,hoverformat:b.hoverformat,layer:b.layer},"plot","from-root"),n=k({visible:k({},b.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:k({},b.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},e,t),r=k({visible:k({},b.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:b.ticks,editType:"calc"},e,t);V.exports={domain:E({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:p.background},realaxis:n,imaginaryaxis:r,editType:"calc"}}}),sH=ze({"src/plots/smith/layout_defaults.js"(J,V){"use strict";var p=Nr(),b=Qn(),E=hs(),k=Zv(),l=zf().getSubplotData,e=sv(),t=ov(),n=g1(),r=Dd(),a=c4(),o=u4(),s=o.axisNames,c=h(function(v){return p.isTypedArray(v)&&(v=Array.from(v)),v.slice().reverse().map(function(g){return-g}).concat([0]).concat(v)},String);function m(v,g,i,w){var S=i("bgcolor");w.bgColor=b.combine(S,w.paper_bgcolor);var M=l(w.fullData,o.name,w.id),C=w.layoutOut,_;function T(U,$){return i(_+"."+U,$)}for(var f=0;f")}}V.exports={hoverPoints:b,makeHoverPointText:E}}}),pH=ze({"src/traces/scattersmith/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"scattersmith",basePlotModule:lH(),categories:["smith","symbols","showLegend","scatter-like"],attributes:f4(),supplyDefaults:uH(),colorbar:Of(),formatLabels:cH(),calc:fH(),plot:hH(),style:Ch().style,styleOnSelect:Ch().styleOnSelect,hoverPoints:dH().hoverPoints,selectPoints:Yv(),meta:{}}}}),vH=ze({"lib/scattersmith.js"(J,V){"use strict";V.exports=pH()}}),h4=ze({"src/traces/quiver/attributes.js"(J,V){"use strict";var p=ws(),b=xs().hovertemplateAttrs,E=Il().axisHoverFormat,k=Ki().extendFlat,l=qs(),e=Uc().dash,t=fv(),n=su(),r={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:n.x0,dx:n.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:n.y0,dy:n.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:E("x"),yhoverformat:E("y"),uhoverformat:E("u","noDate"),vhoverformat:E("v","noDate"),hoverinfo:k({},p.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:b({},{keys:["x","y","u","v","text","name"]}),text:n.text,textposition:n.textposition,textfont:n.textfont,marker:k({arrowsize:k({},t.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:e,editType:"style"},editType:"calc"},l("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};V.exports=r}}),mH=ze({"src/traces/quiver/defaults.js"(J,V){"use strict";var p=Nr(),b=h4(),E=Gv(),k=Bf().hasColorscale,l=qc();V.exports=function(t,n,r,a){function o(S,M){return p.coerce(t,n,b,S,M)}var s=E(t,n,a,o);if(!s){n.visible=!1;return}var c=o("u"),m=o("v");if(!p.isArrayOrTypedArray(c)||c.length===0){n.u=new Array(s);for(var h=0;hO&&(O=c[Q]),m[Q]B&&(B=m[Q]),GP&&(P=G),XU&&(U=X);var K=Math.sqrt(G*G+X*X);if(K>i&&(i=K),KS&&(S=H))}}else re.x=k,re.y=k}if(a._maxNorm=i,u==="scaled"||A==="paper"){let Me=O-I,Se=B-D;var Y;Me===0&&Se===0?Y=1:Y=(Me+Se+Math.sqrt((Me-Se)*(Me-Se)+4*$*Me*Se))/(2*($-1)),Y*=t,a._scaleFactor=Y/a._maxNorm}else a._scaleFactor=1;a._scaleFactor*=a.lengthfactor;let q=new Array(h),Z=new Array(h),ee=new Array(h),ae=new Array(h);for(var he,xe,Q=0;Qm.i&&isFinite(h[m.i]))v=h[m.i];else{var g=o.u&&o.u[m.i]||0,i=o.v&&o.v[m.i]||0;v=Math.sqrt(g*g+i*i)}return c(v)})}function t(a){var o=p.select(a).selectAll("g.trace.quiver");o.each(function(s){r(a,s,p.select(this))})}function n(a,o,s){r(a,o,s)}function r(a,o,s){var c=o[0].trace,m=c.marker||{},h=m.line||{},v=b.isArrayOrTypedArray(m.color)?void 0:m.color,g=c._hasColorscale;if(s)if(c.selectedpoints){var i=(c.selected||{}).marker||{},w=(c.unselected||{}).marker||{},S=i.line||{},M=w.line||{};s.selectAll("path.js-line").each(function(_){var T=p.select(this),f=!_.selected,u=f?w.color:i.color,A=f?M.width!==void 0?M.width:h.width:S.width!==void 0?S.width:h.width;u?(E.lineGroupStyle(T,A,u,h.dash),T.style("stroke-opacity",1)):(E.lineGroupStyle(T,A,v,h.dash),g&&e(T,c),T.style("stroke-opacity",f?l:1))}),E.selectedTextStyle(s.selectAll("text"),c)}else{var C=s.selectAll("path.js-line");C.call(E.lineGroupStyle,h.width,v,h.dash),g&&e(C,c),C.style("stroke-opacity",1),E.textPointStyle(s.selectAll("text"),c,a)}}V.exports={style:t,styleOnSelect:n,colorscaleStroke:e}}}),_H=ze({"src/traces/quiver/plot.js"(J,V){"use strict";var p=ci(),b=Nr(),E=$i(),k=e3().colorscaleStroke,l=Math.PI/12,e=5.8,t=1.5,n=.7;V.exports=function(o,s,c,m,h,v){var g,i,w=!h,S=!!h&&h.duration>0;if(g=m.selectAll("g.trace").data(c,function(C){return C[0].trace.uid}),g.enter().append("g").attr("class",function(C){return"trace quiver trace"+C[0].trace.uid}).style("stroke-miterlimit",2),g.order(),S){v&&(i=v());var M=p.transition().duration(h.duration).ease(h.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()});M.each(function(){m.selectAll("g.trace").each(function(C,_){r(o,_,s,C,c,this,h)})})}else g.each(function(C,_){r(o,_,s,C,c,this,h)});w&&g.exit().remove()};function r(a,o,s,c,m,h,v){var g=c[0].trace,i=s.xaxis,w=s.yaxis;c[0][s.isRangePlot?"nodeRangePlot3":"node3"]=p.select(h);var S=p.select(h).selectAll("g.lines").data([c]);S.enter().append("g").classed("lines",!0),E.setClipUrl(S,s.layerClipId,a);var M=S.selectAll("path.js-line").data(c);M.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),M.exit().remove();let{anchor:C,maxNorm:_=0,arrowref:T}=g,f=T==="paper"?g._scaleFactor*Math.sqrt(Math.abs(i._m*w._m)):g._scaleFactor,u=g.marker.arrowsize;M.each(function(B){let F=p.select(this);if(B.x===void 0||B.y===void 0){F.attr("d",null);return}let P=(T==="paper"?B._u*Math.sign(i._m):p.round(i._m*B._u))*f,j=(T==="paper"?B._v*Math.sign(w._m):p.round(w._m*B._v))*f,U=(g._input.marker||{}).arrowsize!==void 0;var $,Q,re,ne;C==="tip"?($=i.c2p(B.x)-P,re=w.c2p(B.y)-j,Q=i.c2p(B.x),ne=w.c2p(B.y)):C==="center"?($=i.c2p(B.x)-P/2,re=w.c2p(B.y)-j/2,Q=i.c2p(B.x)+P/2,ne=w.c2p(B.y)+j/2):($=i.c2p(B.x),re=w.c2p(B.y),Q=i.c2p(B.x)+P,ne=w.c2p(B.y)+j),B._px0=$,B._py0=re,B._px1=Q,B._py1=ne;var se=g.marker.line.width;U||(se=Math.max(se,t));let G=Math.sqrt((Q-$)*(Q-$)+(ne-re)*(ne-re)),X=n*G,K=Math.min(e*u*se,X),H=Math.atan2(ne-re,Q-$),Y=Q-K*Math.cos(H-l),q=ne-K*Math.sin(H-l),Z=Q-K*Math.cos(H+l),ee=ne-K*Math.sin(H+l),ae="M"+$+","+re+"L"+Q+","+ne+"L"+Y+","+q+"L"+Q+","+ne+"L"+Z+","+ee;F.attr("d",ae)});var A=g.marker||{},x=A.line||{},z=b.isArrayOrTypedArray(A.color)?void 0:A.color;E.lineGroupStyle(M,x.width,z,x.dash),g._hasColorscale&&k(M,g);var I=p.select(h).selectAll("g.text").data([c]);I.enter().append("g").classed("text",!0),E.setClipUrl(I,s.layerClipId,a);var O=I.selectAll("g.textpoint").data(c);if(O.enter().append("g").classed("textpoint",!0).append("text"),O.exit().remove(),O.each(function(B){var F=p.select(this),P=E.translatePoint(B,F.select("text"),i,w);P||F.remove()}),O.selectAll("text").call(E.textPointStyle,g,a).each(function(B){var F=i.c2p(B.x),P=w.c2p(B.y);p.select(this).selectAll("tspan.line").each(function(){p.select(this).attr({x:F,y:P})})}),v&&v.duration>0){var D=p.transition().duration(v.duration).ease(v.easing);M.transition(D).style("opacity",1)}}}}),xH=ze({"src/traces/quiver/hover.js"(J,V){"use strict";var p=Nr(),b=Zl(),E=Jm();function k(l,e,t,n,r,a){let o=r-t,s=a-n,c=o*o+s*s;if(!c)return Math.sqrt((l-t)*(l-t)+(e-n)*(e-n));var m=((l-t)*o+(e-n)*s)/c;m=Math.max(0,Math.min(1,m));let h=t+m*o,v=n+m*s;return Math.sqrt((l-h)*(l-h)+(e-v)*(e-v))}V.exports=function(e,t,n,r){var a=e.cd,o=a[0].trace,s=e.xa,c=e.ya,m=s.c2p(t),h=c.c2p(n),v=function(T){return T._px0===void 0?1/0:k(m,h,T._px0,T._py0,T._px1,T._py1)};if(b.getClosest(a,v,e),e.index!==!1){var g=a[e.index],i=s.c2p(g.x,!0),w=c.c2p(g.y,!0),S=Math.sqrt((m-i)*(m-i)+(h-w)*(h-w));e.index=g.i;var M=o.u?o.u[g.i]:0,C=o.v?o.v[g.i]:0,_="u: "+M+", v: "+C;return p.extendFlat(e,{color:E(o,g),x0:i-3,x1:i+3,xLabelVal:g.x,y0:w-3,y1:w+3,yLabelVal:g.y,uLabelVal:M,vLabelVal:C,extraText:_,spikeDistance:S,hovertemplate:o.hovertemplate}),p.fillText(g,o,e),[e]}}}}),bH=ze({"src/traces/quiver/format_labels.js"(J,V){"use strict";var p=Gi(),b=Nr();V.exports=function(k,l,e){var t={},n={_fullLayout:e},r=p.getFromTrace(n,l,"x"),a=p.getFromTrace(n,l,"y"),o=k.x,s=k.y;t.xLabel=p.tickText(r,r.c2l(o),!0).text,t.yLabel=p.tickText(a,a.c2l(s),!0).text;var c=l.u?l.u[k.i]:0,m=l.v?l.v[k.i]:0,h=l.uhoverformat,v=l.vhoverformat;return t.uLabel=h?b.numberFormat(h)(c):String(c),t.vLabel=v?b.numberFormat(v)(m):String(m),t}}}),wH=ze({"src/traces/quiver/event_data.js"(J,V){"use strict";V.exports=function(b,E,k,l,e){return b.x=E.x,b.y=E.y,b.u=k.u?k.u[e]:void 0,b.v=k.v?k.v[e]:void 0,b}}}),TH=ze({"src/traces/quiver/index.js"(J,V){"use strict";V.exports={moduleType:"trace",name:"quiver",basePlotModule:Du(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:h4(),supplyDefaults:mH(),calc:gH(),crossTraceCalc:yH(),plot:_H(),style:e3().style,styleOnSelect:e3().styleOnSelect,hoverPoints:xH(),formatLabels:bH(),eventData:wH(),selectPoints:Yv(),colorbar:Of(),animatable:!0,meta:{}}}}),AH=ze({"lib/quiver.js"(J,V){"use strict";V.exports=TH()}}),th=ze({"node_modules/world-calendars/dist/main.js"(J,V){var p=Vc();function b(){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={}}p(b.prototype,{instance:function(n,r){n=(n||"gregorian").toLowerCase(),r=r||"";var a=this._localCals[n+"-"+r];if(!a&&this.calendars[n]&&(a=new this.calendars[n](r),this._localCals[n+"-"+r]=a),!a)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,n);return a},newDate:function(n,r,a,o,s){return o=(n!=null&&n.year?n.calendar():typeof o=="string"?this.instance(o,s):o)||this.instance(),o.newDate(n,r,a)},substituteDigits:function(n){return function(r){return(r+"").replace(/[0-9]/g,function(a){return n[a]})}},substituteChineseDigits:function(n,r){return function(a){for(var o="",s=0;a>0;){var c=a%10;o=(c===0?"":n[c]+r[s])+o,s++,a=Math.floor(a/10)}return o.indexOf(n[1]+r[1])===0&&(o=o.substr(1)),o||n[0]}}});function E(n,r,a,o){if(this._calendar=n,this._year=r,this._month=a,this._day=o,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function k(n,r){return n=""+n,"000000".substring(0,r-n.length)+n}p(E.prototype,{newDate:function(n,r,a){return this._calendar.newDate(n??this,r,a)},year:function(n){return arguments.length===0?this._year:this.set(n,"y")},month:function(n){return arguments.length===0?this._month:this.set(n,"m")},day:function(n){return arguments.length===0?this._day:this.set(n,"d")},date:function(n,r,a){if(!this._calendar.isValid(n,r,a))throw(t.local.invalidDate||t.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=n,this._month=r,this._day=a,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(n,r){return this._calendar.add(this,n,r)},set:function(n,r){return this._calendar.set(this,n,r)},compareTo:function(n){if(this._calendar.name!==n._calendar.name)throw(t.local.differentCalendars||t.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,n._calendar.local.name);var r=this._year!==n._year?this._year-n._year:this._month!==n._month?this.monthOfYear()-n.monthOfYear():this._day-n._day;return r===0?0:r<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(n){return this._calendar.fromJD(n)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(n){return this._calendar.fromJSDate(n)},toString:function(){return(this.year()<0?"-":"")+k(Math.abs(this.year()),4)+"-"+k(this.month(),2)+"-"+k(this.day(),2)}});function l(){this.shortYearCutoff="+10"}p(l.prototype,{_validateLevel:0,newDate:function(n,r,a){return n==null?this.today():(n.year&&(this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),a=n.day(),r=n.month(),n=n.year()),new E(this,n,r,a))},today:function(){return this.fromJSDate(new Date)},epoch:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return r.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return(r.year()<0?"-":"")+k(Math.abs(r.year()),4)},monthsInYear:function(n){return this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear),12},monthOfYear:function(n,r){var a=this._validate(n,r,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth);return(a.month()+this.monthsInYear(a)-this.firstMonth)%this.monthsInYear(a)+this.minMonth},fromMonthOfYear:function(n,r){var a=(r+this.firstMonth-2*this.minMonth)%this.monthsInYear(n)+this.minMonth;return this._validate(n,a,this.minDay,t.local.invalidMonth||t.regionalOptions[""].invalidMonth),a},daysInYear:function(n){var r=this._validate(n,this.minMonth,this.minDay,t.local.invalidYear||t.regionalOptions[""].invalidYear);return this.leapYear(r)?366:365},dayOfYear:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return o.toJD()-this.newDate(o.year(),this.fromMonthOfYear(o.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(o))+2)%this.daysInWeek()},extraInfo:function(n,r,a){return this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),{}},add:function(n,r,a){return this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate),this._correctAdd(n,this._add(n,r,a),r,a)},_add:function(n,r,a){if(this._validateLevel++,a==="d"||a==="w"){var o=n.toJD()+r*(a==="w"?this.daysInWeek():1),s=n.calendar().fromJD(o);return this._validateLevel--,[s.year(),s.month(),s.day()]}try{var c=n.year()+(a==="y"?r:0),m=n.monthOfYear()+(a==="m"?r:0),s=n.day(),h=function(i){for(;mw-1+i.minMonth;)c++,m-=w,w=i.monthsInYear(c)};a==="y"?(n.month()!==this.fromMonthOfYear(c,m)&&(m=this.newDate(c,n.month(),this.minDay).monthOfYear()),m=Math.min(m,this.monthsInYear(c)),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m)))):a==="m"&&(h(this),s=Math.min(s,this.daysInMonth(c,this.fromMonthOfYear(c,m))));var v=[c,this.fromMonthOfYear(c,m),s];return this._validateLevel--,v}catch(g){throw this._validateLevel--,g}},_correctAdd:function(n,r,a,o){if(!this.hasYearZero&&(o==="y"||o==="m")&&(r[0]===0||n.year()>0!=r[0]>0)){var s={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[o],c=a<0?-1:1;r=this._add(n,a*s[0]+c*s[1],s[2])}return n.date(r[0],r[1],r[2])},set:function(n,r,a){this._validate(n,this.minMonth,this.minDay,t.local.invalidDate||t.regionalOptions[""].invalidDate);var o=a==="y"?r:n.year(),s=a==="m"?r:n.month(),c=a==="d"?r:n.day();return(a==="y"||a==="m")&&(c=Math.min(c,this.daysInMonth(o,s))),n.date(o,s,c)},isValid:function(n,r,a){this._validateLevel++;var o=this.hasYearZero||n!==0;if(o){var s=this.newDate(n,r,this.minDay);o=r>=this.minMonth&&r-this.minMonth=this.minDay&&a-this.minDay13.5?13:1),g=s-(v>2.5?4716:4715);return g<=0&&g--,this.newDate(g,v,h)},toJSDate:function(n,r,a){var o=this._validate(n,r,a,t.local.invalidDate||t.regionalOptions[""].invalidDate),s=new Date(o.year(),o.month()-1,o.day());return s.setHours(0),s.setMinutes(0),s.setSeconds(0),s.setMilliseconds(0),s.setHours(s.getHours()>12?s.getHours()+2:0),s},fromJSDate:function(n){return this.newDate(n.getFullYear(),n.getMonth()+1,n.getDate())}});var t=V.exports=new b;t.cdate=E,t.baseCalendar=l,t.calendars.gregorian=e}}),MH=ze({"node_modules/world-calendars/dist/plus.js"(){var J=Vc(),V=th();J(V.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"}),V.local=V.regionalOptions[""],J(V.cdate.prototype,{formatDate:function(p,b){return typeof p!="string"&&(b=p,p=""),this._calendar.formatDate(p||"",this,b)}}),J(V.baseCalendar.prototype,{UNIX_EPOCH:V.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:24*60*60,TICKS_EPOCH:V.instance().jdEpoch,TICKS_PER_DAY:24*60*60*1e7,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(p,b,E){if(typeof p!="string"&&(E=b,b=p,p=""),!b)return"";if(b.calendar()!==this)throw V.local.invalidFormat||V.regionalOptions[""].invalidFormat;p=p||this.local.dateFormat,E=E||{};for(var k=E.dayNamesShort||this.local.dayNamesShort,l=E.dayNames||this.local.dayNames,e=E.monthNumbers||this.local.monthNumbers,t=E.monthNamesShort||this.local.monthNamesShort,n=E.monthNames||this.local.monthNames,r=E.calculateWeek||this.local.calculateWeek,a=function(M,C){for(var _=1;S+_1},o=function(M,C,_,T){var f=""+C;if(a(M,T))for(;f.length<_;)f="0"+f;return f},s=function(M,C,_,T){return a(M)?T[C]:_[C]},c=this,m=function(M){return typeof e=="function"?e.call(c,M,a("m")):g(o("m",M.month(),2))},h=function(M,C){return C?typeof n=="function"?n.call(c,M):n[M.month()-c.minMonth]:typeof t=="function"?t.call(c,M):t[M.month()-c.minMonth]},v=this.local.digits,g=function(M){return E.localNumbers&&v?v(M):M},i="",w=!1,S=0;S1},w=function(z,I){var O=i(z,I),D=[2,3,O?4:2,O?4:2,10,11,20]["oyYJ@!".indexOf(z)+1],B=new RegExp("^-?\\d{1,"+D+"}"),F=b.substring(f).match(B);if(!F)throw(V.local.missingNumberAt||V.regionalOptions[""].missingNumberAt).replace(/\{0\}/,f);return f+=F[0].length,parseInt(F[0],10)},S=this,M=function(){if(typeof n=="function"){i("m");var z=n.call(S,b.substring(f));return f+=z.length,z}return w("m")},C=function(z,I,O,D){for(var B=i(z,D)?O:I,F=0;F-1){c=1,m=h;for(var x=this.daysInMonth(s,c);m>x;x=this.daysInMonth(s,c))c++,m-=x}return o>-1?this.fromJD(o):this.newDate(s,c,m)},determineDate:function(p,b,E,k,l){E&&typeof E!="object"&&(l=k,k=E,E=null),typeof k!="string"&&(l=k,k="");var e=this,t=function(n){try{return e.parseDate(k,n,l)}catch{}n=n.toLowerCase();for(var r=(n.match(/^c/)&&E?E.newDate():null)||e.today(),a=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,o=a.exec(n);o;)r.add(parseInt(o[1],10),o[2]||"d"),o=a.exec(n);return r};return b=b?b.newDate():null,p=p==null?b:typeof p=="string"?t(p):typeof p=="number"?isNaN(p)||p===1/0||p===-1/0?b:e.today().add(p,"d"):e.newDate(p),p}})}}),SH=ze({"node_modules/world-calendars/dist/calendars/chinese.js"(){var J=th(),V=Vc(),p=J.instance();function b(o){this.local=this.regionalOptions[o||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(o,s){if(typeof o=="string"){var c=o.match(k);return c?c[0]:""}var m=this._validateYear(o),h=o.month(),v=""+this.toChineseMonth(m,h);return s&&v.length<2&&(v="0"+v),this.isIntercalaryMonth(m,h)&&(v+="i"),v},monthNames:function(o){if(typeof o=="string"){var s=o.match(l);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),v=["\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"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},monthNamesShort:function(o){if(typeof o=="string"){var s=o.match(e);return s?s[0]:""}var c=this._validateYear(o),m=o.month(),h=this.toChineseMonth(c,m),v=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][h-1];return this.isIntercalaryMonth(c,m)&&(v="\u95F0"+v),v},parseMonth:function(o,s){o=this._validateYear(o);var c=parseInt(s),m;if(isNaN(c))s[0]==="\u95F0"&&(m=!0,s=s.substring(1)),s[s.length-1]==="\u6708"&&(s=s.substring(0,s.length-1)),c=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(s);else{var h=s[s.length-1];m=h==="i"||h==="I"}var v=this.toMonthIndex(o,c,m);return v},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(o,s){if(o.year&&(o=o.year()),typeof o!="number"||o<1888||o>2111)throw s.replace(/\{0\}/,this.local.name);return o},toMonthIndex:function(o,s,c){var m=this.intercalaryMonth(o),h=c&&s!==m;if(h||s<1||s>12)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v;return m?!c&&s<=m?v=s-1:v=s:v=s-1,v},toChineseMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o),m=c?12:11;if(s<0||s>m)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var h;return c?s>13;return c},isIntercalaryMonth:function(o,s){o.year&&(o=o.year(),s=o.month());var c=this.intercalaryMonth(o);return!!c&&c===s},leapYear:function(o){return this.intercalaryMonth(o)!==0},weekOfYear:function(o,s,c){var m=this._validateYear(o,J.local.invalidyear),h=n[m-n[0]],v=h>>9&4095,g=h>>5&15,i=h&31,w;w=p.newDate(v,g,i),w.add(4-(w.dayOfWeek()||7),"d");var S=this.toJD(o,s,c)-w.toJD();return 1+Math.floor(S/7)},monthsInYear:function(o){return this.leapYear(o)?13:12},daysInMonth:function(o,s){o.year&&(s=o.month(),o=o.year()),o=this._validateYear(o);var c=t[o-t[0]],m=c>>13,h=m?12:11;if(s>h)throw J.local.invalidMonth.replace(/\{0\}/,this.local.name);var v=c&1<<12-s?30:29;return v},weekDay:function(o,s,c){return(this.dayOfWeek(o,s,c)||7)<6},toJD:function(o,s,c){var m=this._validate(o,v,c,J.local.invalidDate);o=this._validateYear(m.year()),s=m.month(),c=m.day();var h=this.isIntercalaryMonth(o,s),v=this.toChineseMonth(o,s),g=a(o,v,c,h);return p.toJD(g.year,g.month,g.day)},fromJD:function(o){var s=p.fromJD(o),c=r(s.year(),s.month(),s.day()),m=this.toMonthIndex(c.year,c.month,c.isIntercalary);return this.newDate(c.year,m,c.day)},fromString:function(o){var s=o.match(E),c=this._validateYear(+s[1]),m=+s[2],h=!!s[3],v=this.toMonthIndex(c,m,h),g=+s[4];return this.newDate(c,v,g)},add:function(o,s,c){var m=o.year(),h=o.month(),v=this.isIntercalaryMonth(m,h),g=this.toChineseMonth(m,h),i=Object.getPrototypeOf(b.prototype).add.call(this,o,s,c);if(c==="y"){var w=i.year(),S=i.month(),M=this.isIntercalaryMonth(w,g),C=v&&M?this.toMonthIndex(w,g,!0):this.toMonthIndex(w,g,!1);C!==S&&i.month(C)}return i}});var E=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,k=/^\d?\d[iI]?/m,l=/^闰?十?[一二三四五六七八九]?月/m,e=/^闰?十?[一二三四五六七八九]?/m;J.calendars.chinese=b;var t=[1887,5780,5802,19157,2742,50359,1198,2646,46378,7466,3412,30122,5482,67949,2396,5294,43597,6732,6954,36181,2772,4954,18781,2396,54427,5274,6730,47781,5800,6868,21210,4790,59703,2350,5270,46667,3402,3496,38325,1388,4782,18735,2350,52374,6804,7498,44457,2906,1388,29294,4700,63789,6442,6804,56138,5802,2772,38235,1210,4698,22827,5418,63125,3476,5802,43701,2484,5302,27223,2646,70954,7466,3412,54698,5482,2412,38062,5294,2636,32038,6954,60245,2772,4826,43357,2394,5274,39501,6730,72357,5800,5844,53978,4790,2358,38039,5270,87627,3402,3496,54708,5484,4782,43311,2350,3222,27978,7498,68965,2904,5484,45677,4700,6444,39573,6804,6986,19285,2772,62811,1210,4698,47403,5418,5780,38570,5546,76469,2420,5302,51799,2646,5414,36501,3412,5546,18869,2412,54446,5276,6732,48422,6822,2900,28010,4826,92509,2394,5274,55883,6730,6820,47956,5812,2778,18779,2358,62615,5270,5450,46757,3492,5556,27318,4718,67887,2350,3222,52554,7498,3428,38252,5468,4700,31022,6444,64149,6804,6986,43861,2772,5338,35421,2650,70955,5418,5780,54954,5546,2740,38074,5302,2646,29991,3366,61011,3412,5546,43445,2412,5294,35406,6732,72998,6820,6996,52586,2778,2396,38045,5274,6698,23333,6820,64338,5812,2746,43355,2358,5270,39499,5450,79525,3492,5548],n=[1887,966732,967231,967733,968265,968766,969297,969798,970298,970829,971330,971830,972362,972863,973395,973896,974397,974928,975428,975929,976461,976962,977462,977994,978494,979026,979526,980026,980558,981059,981559,982091,982593,983124,983624,984124,984656,985157,985656,986189,986690,987191,987722,988222,988753,989254,989754,990286,990788,991288,991819,992319,992851,993352,993851,994383,994885,995385,995917,996418,996918,997450,997949,998481,998982,999483,1000014,1000515,1001016,1001548,1002047,1002578,1003080,1003580,1004111,1004613,1005113,1005645,1006146,1006645,1007177,1007678,1008209,1008710,1009211,1009743,1010243,1010743,1011275,1011775,1012306,1012807,1013308,1013840,1014341,1014841,1015373,1015874,1016404,1016905,1017405,1017937,1018438,1018939,1019471,1019972,1020471,1021002,1021503,1022035,1022535,1023036,1023568,1024069,1024568,1025100,1025601,1026102,1026633,1027133,1027666,1028167,1028666,1029198,1029699,1030199,1030730,1031231,1031763,1032264,1032764,1033296,1033797,1034297,1034828,1035329,1035830,1036362,1036861,1037393,1037894,1038394,1038925,1039427,1039927,1040459,1040959,1041491,1041992,1042492,1043023,1043524,1044024,1044556,1045057,1045558,1046090,1046590,1047121,1047622,1048122,1048654,1049154,1049655,1050187,1050689,1051219,1051720,1052220,1052751,1053252,1053752,1054284,1054786,1055285,1055817,1056317,1056849,1057349,1057850,1058382,1058883,1059383,1059915,1060415,1060947,1061447,1061947,1062479,1062981,1063480,1064012,1064514,1065014,1065545,1066045,1066577,1067078,1067578,1068110,1068611,1069112,1069642,1070142,1070674,1071175,1071675,1072207,1072709,1073209,1073740,1074241,1074741,1075273,1075773,1076305,1076807,1077308,1077839,1078340,1078840,1079372,1079871,1080403,1080904];function r(o,s,c,m){var h,v;if(typeof o=="object")h=o,v=s||{};else{var g=typeof o=="number"&&o>=1888&&o<=2111;if(!g)throw new Error("Solar year outside range 1888-2111");var i=typeof s=="number"&&s>=1&&s<=12;if(!i)throw new Error("Solar month outside range 1 - 12");var w=typeof c=="number"&&c>=1&&c<=31;if(!w)throw new Error("Solar day outside range 1 - 31");h={year:o,month:s,day:c},v=m||{}}var S=n[h.year-n[0]],M=h.year<<9|h.month<<5|h.day;v.year=M>=S?h.year:h.year-1,S=n[v.year-n[0]];var C=S>>9&4095,_=S>>5&15,T=S&31,f,u=new Date(C,_-1,T),A=new Date(h.year,h.month-1,h.day);f=Math.round((A-u)/(24*3600*1e3));var x=t[v.year-t[0]],z;for(z=0;z<13;z++){var I=x&1<<12-z?30:29;if(f>13;return!O||z=1888&&o<=2111;if(!i)throw new Error("Lunar year outside range 1888-2111");var w=typeof s=="number"&&s>=1&&s<=12;if(!w)throw new Error("Lunar month outside range 1 - 12");var S=typeof c=="number"&&c>=1&&c<=30;if(!S)throw new Error("Lunar day outside range 1 - 30");var M;typeof m=="object"?(M=!1,v=m):(M=!!m,v=h||{}),g={year:o,month:s,day:c,isIntercalary:M}}var C;C=g.day-1;var _=t[g.year-t[0]],T=_>>13,f;T&&(g.month>T||g.isIntercalary)?f=g.month:f=g.month-1;for(var u=0;u>9&4095,I=x>>5&15,O=x&31,D=new Date(z,I-1,O+C);return v.year=D.getFullYear(),v.month=1+D.getMonth(),v.day=D.getDate(),v}}}),EH=ze({"node_modules/world-calendars/dist/calendars/coptic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Coptic",jdEpoch:18250295e-1,daysPerMonth:[30,30,30,30,30,30,30,30,30,30,30,30,5],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Coptic",epochs:["BAM","AM"],monthNames:["Thout","Paopi","Hathor","Koiak","Tobi","Meshir","Paremhat","Paremoude","Pashons","Paoni","Epip","Mesori","Pi Kogi Enavot"],monthNamesShort:["Tho","Pao","Hath","Koi","Tob","Mesh","Pat","Pad","Pash","Pao","Epi","Meso","PiK"],dayNames:["Tkyriaka","Pesnau","Pshoment","Peftoou","Ptiou","Psoou","Psabbaton"],dayNamesShort:["Tky","Pes","Psh","Pef","Pti","Pso","Psa"],dayNamesMin:["Tk","Pes","Psh","Pef","Pt","Pso","Psa"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.coptic=p}}),kH=ze({"node_modules/world-calendars/dist/calendars/discworld.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Discworld",jdEpoch:17214255e-1,daysPerMonth:[16,32,32,32,32,32,32,32,32,32,32,32,32],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Discworld",epochs:["BUC","UC"],monthNames:["Ick","Offle","February","March","April","May","June","Grune","August","Spune","Sektober","Ember","December"],monthNamesShort:["Ick","Off","Feb","Mar","Apr","May","Jun","Gru","Aug","Spu","Sek","Emb","Dec"],dayNames:["Sunday","Octeday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Oct","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Oc","Mo","Tu","We","Th","Fr","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:2,isRTL:!1}},leapYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),!1},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),13},daysInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),400},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/8)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return(e.day()+1)%8},weekDay:function(E,k,l){var e=this.dayOfWeek(E,k,l);return e>=2&&e<=6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{century:b[Math.floor((e.year()-1)/100)+1]||""}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return E=e.year()+(e.year()<0?1:0),k=e.month(),l=e.day(),l+(k>1?16:0)+(k>2?(k-2)*32:0)+(E-1)*400+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E+.5)-Math.floor(this.jdEpoch)-1;var k=Math.floor(E/400)+1;E-=(k-1)*400,E+=E>15?16:0;var l=Math.floor(E/32)+1,e=E-(l-1)*32+1;return this.newDate(k<=0?k-1:k,l,e)}});var b={20:"Fruitbat",21:"Anchovy"};J.calendars.discworld=p}}),CH=ze({"node_modules/world-calendars/dist/calendars/ethiopian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()+(E.year()<0?1:0);return k%4===3||k%4===-1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear),13},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===13&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),b<0&&b++,l.day()+(l.month()-1)*30+(b-1)*365+Math.floor(b/4)+this.jdEpoch-1},fromJD:function(b){var E=Math.floor(b)+.5-this.jdEpoch,k=Math.floor((E-Math.floor((E+366)/1461))/365)+1;k<=0&&k--,E=Math.floor(b)+.5-this.newDate(k,1,1).toJD();var l=Math.floor(E/30)+1,e=E-(l-1)*30+1;return this.newDate(k,l,e)}}),J.calendars.ethiopian=p}}),LH=ze({"node_modules/world-calendars/dist/calendars/hebrew.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this._leapYear(k.year())},_leapYear:function(E){return E=E<0?E+1:E,b(E*7+1,19)<7},monthsInYear:function(E){return this._validate(E,this.minMonth,this.minDay,J.local.invalidYear),this._leapYear(E.year?E.year():E)?13:12},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return E=k.year(),this.toJD(E===-1?1:E+1,7,1)-this.toJD(E,7,1)},daysInMonth:function(E,k){return E.year&&(k=E.month(),E=E.year()),this._validate(E,k,this.minDay,J.local.invalidMonth),k===12&&this.leapYear(E)||k===8&&b(this.daysInYear(E),10)===5?30:k===9&&b(this.daysInYear(E),10)===3?29:this.daysPerMonth[k-1]},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==6},extraInfo:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);return{yearType:(this.leapYear(e)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(e)%10-3]}},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=E<=0?E+1:E,n=this.jdEpoch+this._delay1(t)+this._delay2(t)+l+1;if(k<7){for(var r=7;r<=this.monthsInYear(E);r++)n+=this.daysInMonth(E,r);for(var r=1;r=this.toJD(k===-1?1:k+1,7,1);)k++;for(var l=Ethis.toJD(k,l,this.daysInMonth(k,l));)l++;var e=E-this.toJD(k,l,1)+1;return this.newDate(k,l,e)}});function b(E,k){return E-k*Math.floor(E/k)}J.calendars.hebrew=p}}),PH=ze({"node_modules/world-calendars/dist/calendars/islamic.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Islamic",jdEpoch:19484395e-1,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(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);return(E.year()*11+14)%30<11},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){return this.leapYear(b)?355:354},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===12&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==5},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b=b<=0?b+1:b,k+Math.ceil(29.5*(E-1))+(b-1)*354+Math.floor((3+11*b)/30)+this.jdEpoch-1},fromJD:function(b){b=Math.floor(b)+.5;var E=Math.floor((30*(b-this.jdEpoch)+10646)/10631);E=E<=0?E-1:E;var k=Math.min(12,Math.ceil((b-29-this.toJD(E,1,1))/29.5)+1),l=b-this.toJD(E,k,1)+1;return this.newDate(E,k,l)}}),J.calendars.islamic=p}}),RH=ze({"node_modules/world-calendars/dist/calendars/julian.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Julian",jdEpoch:17214235e-1,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(k){var E=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),k=E.year()<0?E.year()+1:E.year();return k%4===0},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(4-(l.dayOfWeek()||7),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInMonth:function(b,E){var k=this._validate(b,E,this.minDay,J.local.invalidMonth);return this.daysPerMonth[k.month()-1]+(k.month()===2&&this.leapYear(k.year())?1:0)},weekDay:function(b,E,k){return(this.dayOfWeek(b,E,k)||7)<6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);return b=l.year(),E=l.month(),k=l.day(),b<0&&b++,E<=2&&(b--,E+=12),Math.floor(365.25*(b+4716))+Math.floor(30.6001*(E+1))+k-1524.5},fromJD:function(b){var E=Math.floor(b+.5),k=E+1524,l=Math.floor((k-122.1)/365.25),e=Math.floor(365.25*l),t=Math.floor((k-e)/30.6001),n=t-Math.floor(t<14?1:13),r=l-Math.floor(n>2?4716:4715),a=k-e-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,n,a)}}),J.calendars.julian=p}}),IH=ze({"node_modules/world-calendars/dist/calendars/mayan.js"(){var J=th(),V=Vc();function p(k){this.local=this.regionalOptions[k||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),!1},formatYear:function(k){var l=this._validate(k,this.minMonth,this.minDay,J.local.invalidYear);k=l.year();var e=Math.floor(k/400);k=k%400,k+=k<0?400:0;var t=Math.floor(k/20);return e+"."+t+"."+k%20},forYear:function(k){if(k=k.split("."),k.length<3)throw"Invalid Mayan year";for(var l=0,e=0;e19||e>0&&t<0)throw"Invalid Mayan year";l=l*20+t}return l},monthsInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),18},weekOfYear:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),0},daysInYear:function(k){return this._validate(k,this.minMonth,this.minDay,J.local.invalidYear),360},daysInMonth:function(k,l){return this._validate(k,l,this.minDay,J.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()},weekDay:function(k,l,e){return this._validate(k,l,e,J.local.invalidDate),!0},extraInfo:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate),n=t.toJD(),r=this._toHaab(n),a=this._toTzolkin(n);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[a[0]-1],tzolkinDay:a[0],tzolkinTrecena:a[1]}},_toHaab:function(k){k-=this.jdEpoch;var l=b(k+8+17*20,365);return[Math.floor(l/20)+1,b(l,20)]},_toTzolkin:function(k){return k-=this.jdEpoch,[E(k+20,20),E(k+4,13)]},toJD:function(k,l,e){var t=this._validate(k,l,e,J.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(k){k=Math.floor(k)+.5-this.jdEpoch;var l=Math.floor(k/360);k=k%360,k+=k<0?360:0;var e=Math.floor(k/20),t=k%20;return this.newDate(l,e,t)}});function b(k,l){return k-l*Math.floor(k/l)}function E(k,l){return b(k-1,l)+1}J.calendars.mayan=p}}),DH=ze({"node_modules/world-calendars/dist/calendars/nanakshahi.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar;var b=J.instance("gregorian");V(p.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear||J.regionalOptions[""].invalidYear);return b.leapYear(k.year()+(k.year()<1?1:0)+1469)},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(1-(e.dayOfWeek()||7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidMonth),t=e.year();t<0&&t++;for(var n=e.day(),r=1;r=this.toJD(k+1,1,1);)k++;for(var l=E-Math.floor(this.toJD(k,1,1)+.5)+1,e=1;l>this.daysInMonth(k,e);)l-=this.daysInMonth(k,e),e++;return this.newDate(k,e,l)}}),J.calendars.nanakshahi=p}}),FH=ze({"node_modules/world-calendars/dist/calendars/nepali.js"(){var J=th(),V=Vc();function p(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Nepali",jdEpoch:17007095e-1,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(b){return this.daysInYear(b)!==this.daysPerYear},weekOfYear:function(b,E,k){var l=this.newDate(b,E,k);return l.add(-l.dayOfWeek(),"d"),Math.floor((l.dayOfYear()-1)/7)+1},daysInYear:function(b){var E=this._validate(b,this.minMonth,this.minDay,J.local.invalidYear);if(b=E.year(),typeof this.NEPALI_CALENDAR_DATA[b]>"u")return this.daysPerYear;for(var k=0,l=this.minMonth;l<=12;l++)k+=this.NEPALI_CALENDAR_DATA[b][l];return k},daysInMonth:function(b,E){return b.year&&(E=b.month(),b=b.year()),this._validate(b,E,this.minDay,J.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[b]>"u"?this.daysPerMonth[E-1]:this.NEPALI_CALENDAR_DATA[b][E]},weekDay:function(b,E,k){return this.dayOfWeek(b,E,k)!==6},toJD:function(b,E,k){var l=this._validate(b,E,k,J.local.invalidDate);b=l.year(),E=l.month(),k=l.day();var e=J.instance(),t=0,n=E,r=b;this._createMissingCalendarData(b);var a=b-(n>9||n===9&&k>=this.NEPALI_CALENDAR_DATA[r][0]?56:57);for(E!==9&&(t=k,n--);n!==9;)n<=0&&(n=12,r--),t+=this.NEPALI_CALENDAR_DATA[r][n],n--;return E===9?(t+=k-this.NEPALI_CALENDAR_DATA[r][0],t<0&&(t+=e.daysInYear(a))):t+=this.NEPALI_CALENDAR_DATA[r][9]-this.NEPALI_CALENDAR_DATA[r][0],e.newDate(a,1,1).add(t,"d").toJD()},fromJD:function(b){var E=J.instance(),k=E.fromJD(b),l=k.year(),e=k.dayOfYear(),t=l+56;this._createMissingCalendarData(t);for(var n=9,r=this.NEPALI_CALENDAR_DATA[t][0],a=this.NEPALI_CALENDAR_DATA[t][n]-r+1;e>a;)n++,n>12&&(n=1,t++),a+=this.NEPALI_CALENDAR_DATA[t][n];var o=this.NEPALI_CALENDAR_DATA[t][n]-(a-e);return this.newDate(t,n,o)},_createMissingCalendarData:function(b){var E=this.daysPerMonth.slice(0);E.unshift(17);for(var k=b-1;k"u"&&(this.NEPALI_CALENDAR_DATA[k]=E)},NEPALI_CALENDAR_DATA:{1970:[18,31,31,32,31,31,31,30,29,30,29,30,30],1971:[18,31,31,32,31,32,30,30,29,30,29,30,30],1972:[17,31,32,31,32,31,30,30,30,29,29,30,30],1973:[19,30,32,31,32,31,30,30,30,29,30,29,31],1974:[19,31,31,32,30,31,31,30,29,30,29,30,30],1975:[18,31,31,32,32,30,31,30,29,30,29,30,30],1976:[17,31,32,31,32,31,30,30,30,29,29,30,31],1977:[18,31,32,31,32,31,31,29,30,29,30,29,31],1978:[18,31,31,32,31,31,31,30,29,30,29,30,30],1979:[18,31,31,32,32,31,30,30,29,30,29,30,30],1980:[17,31,32,31,32,31,30,30,30,29,29,30,31],1981:[18,31,31,31,32,31,31,29,30,30,29,30,30],1982:[18,31,31,32,31,31,31,30,29,30,29,30,30],1983:[18,31,31,32,32,31,30,30,29,30,29,30,30],1984:[17,31,32,31,32,31,30,30,30,29,29,30,31],1985:[18,31,31,31,32,31,31,29,30,30,29,30,30],1986:[18,31,31,32,31,31,31,30,29,30,29,30,30],1987:[18,31,32,31,32,31,30,30,29,30,29,30,30],1988:[17,31,32,31,32,31,30,30,30,29,29,30,31],1989:[18,31,31,31,32,31,31,30,29,30,29,30,30],1990:[18,31,31,32,31,31,31,30,29,30,29,30,30],1991:[18,31,32,31,32,31,30,30,29,30,29,30,30],1992:[17,31,32,31,32,31,30,30,30,29,30,29,31],1993:[18,31,31,31,32,31,31,30,29,30,29,30,30],1994:[18,31,31,32,31,31,31,30,29,30,29,30,30],1995:[17,31,32,31,32,31,30,30,30,29,29,30,30],1996:[17,31,32,31,32,31,30,30,30,29,30,29,31],1997:[18,31,31,32,31,31,31,30,29,30,29,30,30],1998:[18,31,31,32,31,31,31,30,29,30,29,30,30],1999:[17,31,32,31,32,31,30,30,30,29,29,30,31],2e3:[17,30,32,31,32,31,30,30,30,29,30,29,31],2001:[18,31,31,32,31,31,31,30,29,30,29,30,30],2002:[18,31,31,32,32,31,30,30,29,30,29,30,30],2003:[17,31,32,31,32,31,30,30,30,29,29,30,31],2004:[17,30,32,31,32,31,30,30,30,29,30,29,31],2005:[18,31,31,32,31,31,31,30,29,30,29,30,30],2006:[18,31,31,32,32,31,30,30,29,30,29,30,30],2007:[17,31,32,31,32,31,30,30,30,29,29,30,31],2008:[17,31,31,31,32,31,31,29,30,30,29,29,31],2009:[18,31,31,32,31,31,31,30,29,30,29,30,30],2010:[18,31,31,32,32,31,30,30,29,30,29,30,30],2011:[17,31,32,31,32,31,30,30,30,29,29,30,31],2012:[17,31,31,31,32,31,31,29,30,30,29,30,30],2013:[18,31,31,32,31,31,31,30,29,30,29,30,30],2014:[18,31,31,32,32,31,30,30,29,30,29,30,30],2015:[17,31,32,31,32,31,30,30,30,29,29,30,31],2016:[17,31,31,31,32,31,31,29,30,30,29,30,30],2017:[18,31,31,32,31,31,31,30,29,30,29,30,30],2018:[18,31,32,31,32,31,30,30,29,30,29,30,30],2019:[17,31,32,31,32,31,30,30,30,29,30,29,31],2020:[17,31,31,31,32,31,31,30,29,30,29,30,30],2021:[18,31,31,32,31,31,31,30,29,30,29,30,30],2022:[17,31,32,31,32,31,30,30,30,29,29,30,30],2023:[17,31,32,31,32,31,30,30,30,29,30,29,31],2024:[17,31,31,31,32,31,31,30,29,30,29,30,30],2025:[18,31,31,32,31,31,31,30,29,30,29,30,30],2026:[17,31,32,31,32,31,30,30,30,29,29,30,31],2027:[17,30,32,31,32,31,30,30,30,29,30,29,31],2028:[17,31,31,32,31,31,31,30,29,30,29,30,30],2029:[18,31,31,32,31,32,30,30,29,30,29,30,30],2030:[17,31,32,31,32,31,30,30,30,30,30,30,31],2031:[17,31,32,31,32,31,31,31,31,31,31,31,31],2032:[17,32,32,32,32,32,32,32,32,32,32,32,32],2033:[18,31,31,32,32,31,30,30,29,30,29,30,30],2034:[17,31,32,31,32,31,30,30,30,29,29,30,31],2035:[17,30,32,31,32,31,31,29,30,30,29,29,31],2036:[17,31,31,32,31,31,31,30,29,30,29,30,30],2037:[18,31,31,32,32,31,30,30,29,30,29,30,30],2038:[17,31,32,31,32,31,30,30,30,29,29,30,31],2039:[17,31,31,31,32,31,31,29,30,30,29,30,30],2040:[17,31,31,32,31,31,31,30,29,30,29,30,30],2041:[18,31,31,32,32,31,30,30,29,30,29,30,30],2042:[17,31,32,31,32,31,30,30,30,29,29,30,31],2043:[17,31,31,31,32,31,31,29,30,30,29,30,30],2044:[17,31,31,32,31,31,31,30,29,30,29,30,30],2045:[18,31,32,31,32,31,30,30,29,30,29,30,30],2046:[17,31,32,31,32,31,30,30,30,29,29,30,31],2047:[17,31,31,31,32,31,31,30,29,30,29,30,30],2048:[17,31,31,32,31,31,31,30,29,30,29,30,30],2049:[17,31,32,31,32,31,30,30,30,29,29,30,30],2050:[17,31,32,31,32,31,30,30,30,29,30,29,31],2051:[17,31,31,31,32,31,31,30,29,30,29,30,30],2052:[17,31,31,32,31,31,31,30,29,30,29,30,30],2053:[17,31,32,31,32,31,30,30,30,29,29,30,30],2054:[17,31,32,31,32,31,30,30,30,29,30,29,31],2055:[17,31,31,32,31,31,31,30,29,30,30,29,30],2056:[17,31,31,32,31,32,30,30,29,30,29,30,30],2057:[17,31,32,31,32,31,30,30,30,29,29,30,31],2058:[17,30,32,31,32,31,30,30,30,29,30,29,31],2059:[17,31,31,32,31,31,31,30,29,30,29,30,30],2060:[17,31,31,32,32,31,30,30,29,30,29,30,30],2061:[17,31,32,31,32,31,30,30,30,29,29,30,31],2062:[17,30,32,31,32,31,31,29,30,29,30,29,31],2063:[17,31,31,32,31,31,31,30,29,30,29,30,30],2064:[17,31,31,32,32,31,30,30,29,30,29,30,30],2065:[17,31,32,31,32,31,30,30,30,29,29,30,31],2066:[17,31,31,31,32,31,31,29,30,30,29,29,31],2067:[17,31,31,32,31,31,31,30,29,30,29,30,30],2068:[17,31,31,32,32,31,30,30,29,30,29,30,30],2069:[17,31,32,31,32,31,30,30,30,29,29,30,31],2070:[17,31,31,31,32,31,31,29,30,30,29,30,30],2071:[17,31,31,32,31,31,31,30,29,30,29,30,30],2072:[17,31,32,31,32,31,30,30,29,30,29,30,30],2073:[17,31,32,31,32,31,30,30,30,29,29,30,31],2074:[17,31,31,31,32,31,31,30,29,30,29,30,30],2075:[17,31,31,32,31,31,31,30,29,30,29,30,30],2076:[16,31,32,31,32,31,30,30,30,29,29,30,30],2077:[17,31,32,31,32,31,30,30,30,29,30,29,31],2078:[17,31,31,31,32,31,31,30,29,30,29,30,30],2079:[17,31,31,32,31,31,31,30,29,30,29,30,30],2080:[16,31,32,31,32,31,30,30,30,29,29,30,30],2081:[17,31,31,32,32,31,30,30,30,29,30,30,30],2082:[17,31,32,31,32,31,30,30,30,29,30,30,30],2083:[17,31,31,32,31,31,30,30,30,29,30,30,30],2084:[17,31,31,32,31,31,30,30,30,29,30,30,30],2085:[17,31,32,31,32,31,31,30,30,29,30,30,30],2086:[17,31,32,31,32,31,30,30,30,29,30,30,30],2087:[16,31,31,32,31,31,31,30,30,29,30,30,30],2088:[16,30,31,32,32,30,31,30,30,29,30,30,30],2089:[17,31,32,31,32,31,30,30,30,29,30,30,30],2090:[17,31,32,31,32,31,30,30,30,29,30,30,30],2091:[16,31,31,32,31,31,31,30,30,29,30,30,30],2092:[16,31,31,32,32,31,30,30,30,29,30,30,30],2093:[17,31,32,31,32,31,30,30,30,29,30,30,30],2094:[17,31,31,32,31,31,30,30,30,29,30,30,30],2095:[17,31,31,32,31,31,31,30,29,30,30,30,30],2096:[17,30,31,32,32,31,30,30,29,30,29,30,30],2097:[17,31,32,31,32,31,30,30,30,29,30,30,30],2098:[17,31,31,32,31,31,31,29,30,29,30,30,31],2099:[17,31,31,32,31,31,31,30,29,29,30,30,30],2100:[17,31,32,31,32,30,31,30,29,30,29,30,30]}}),J.calendars.nepali=p}}),zH=ze({"node_modules/world-calendars/dist/calendars/persian.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}function b(E){var k=E-475;E<0&&k++;var l=.242197,e=l*k,t=l*(k+1),n=e-Math.floor(e),r=t-Math.floor(t);return n>r}p.prototype=new J.baseCalendar,V(p.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return b(k.year())},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-((e.dayOfWeek()+1)%7),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===12&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate);E=e.year(),k=e.month(),l=e.day();var t=0;if(E>0)for(var n=1;n0?E-1:E)*365+t+this.jdEpoch-1},fromJD:function(E){E=Math.floor(E)+.5;var k=475+(E-this.toJD(475,1,1))/365.242197,l=Math.floor(k);l<=0&&l--,E>this.toJD(l,12,b(l)?30:29)&&(l++,l===0&&l++);var e=E-this.toJD(l,1,1)+1,t=e<=186?Math.ceil(e/31):Math.ceil((e-6)/30),n=E-this.toJD(l,t,1)+1;return this.newDate(l,t,n)}}),J.calendars.persian=p,J.calendars.jalali=p}}),BH=ze({"node_modules/world-calendars/dist/calendars/taiwan.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.prototype,{name:"Taiwan",jdEpoch:24194025e-1,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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)},_g2tYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)}}),J.calendars.taiwan=b}}),OH=ze({"node_modules/world-calendars/dist/calendars/thai.js"(){var J=th(),V=Vc(),p=J.instance();function b(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}b.prototype=new J.baseCalendar,V(b.prototype,{name:"Thai",jdEpoch:15230985e-1,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(l){var k=this._validate(l,this.minMonth,this.minDay,J.local.invalidYear),l=this._t2gYear(k.year());return p.leapYear(l)},weekOfYear:function(t,k,l){var e=this._validate(t,this.minMonth,this.minDay,J.local.invalidYear),t=this._t2gYear(e.year());return p.weekOfYear(t,e.month(),e.day())},daysInMonth:function(E,k){var l=this._validate(E,k,this.minDay,J.local.invalidMonth);return this.daysPerMonth[l.month()-1]+(l.month()===2&&this.leapYear(l.year())?1:0)},weekDay:function(E,k,l){return(this.dayOfWeek(E,k,l)||7)<6},toJD:function(t,k,l){var e=this._validate(t,k,l,J.local.invalidDate),t=this._t2gYear(e.year());return p.toJD(t,e.month(),e.day())},fromJD:function(E){var k=p.fromJD(E),l=this._g2tYear(k.year());return this.newDate(l,k.month(),k.day())},_t2gYear:function(E){return E-this.yearsOffset-(E>=1&&E<=this.yearsOffset?1:0)},_g2tYear:function(E){return E+this.yearsOffset+(E>=-this.yearsOffset&&E<=-1?1:0)}}),J.calendars.thai=b}}),NH=ze({"node_modules/world-calendars/dist/calendars/ummalqura.js"(){var J=th(),V=Vc();function p(E){this.local=this.regionalOptions[E||""]||this.regionalOptions[""]}p.prototype=new J.baseCalendar,V(p.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(E){var k=this._validate(E,this.minMonth,this.minDay,J.local.invalidYear);return this.daysInYear(k.year())===355},weekOfYear:function(E,k,l){var e=this.newDate(E,k,l);return e.add(-e.dayOfWeek(),"d"),Math.floor((e.dayOfYear()-1)/7)+1},daysInYear:function(E){for(var k=0,l=1;l<=12;l++)k+=this.daysInMonth(E,l);return k},daysInMonth:function(E,k){for(var l=this._validate(E,k,this.minDay,J.local.invalidMonth),e=l.toJD()-24e5+.5,t=0,n=0;ne)return b[t]-b[t-1];t++}return 30},weekDay:function(E,k,l){return this.dayOfWeek(E,k,l)!==5},toJD:function(E,k,l){var e=this._validate(E,k,l,J.local.invalidDate),t=12*(e.year()-1)+e.month()-15292,n=e.day()+b[t-1]-1;return n+24e5-.5},fromJD:function(E){for(var k=E-24e5+.5,l=0,e=0;ek);e++)l++;var t=l+15292,n=Math.floor((t-1)/12),r=n+1,a=t-12*n,o=k-b[l-1]+1;return this.newDate(r,a,o)},isValid:function(E,k,l){var e=J.baseCalendar.prototype.isValid.apply(this,arguments);return e&&(E=E.year!=null?E.year:E,e=E>=1276&&E<=1500),e},_validate:function(E,k,l,e){var t=J.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw e.replace(/\{0\}/,this.local.name);return t}}),J.calendars.ummalqura=p;var b=[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]}}),jH=ze({"src/components/calendars/calendars.js"(J,V){"use strict";V.exports=th(),MH(),SH(),EH(),kH(),CH(),LH(),PH(),RH(),IH(),DH(),FH(),zH(),BH(),OH(),NH()}}),UH=ze({"src/components/calendars/index.js"(J,V){"use strict";var p=jH(),b=Nr(),E=No(),k=E.EPOCHJD,l=E.ONEDAY,e={valType:"enumerated",values:b.sortObjectKeys(p.calendars),editType:"calc",dflt:"gregorian"},t=function(_,T,f,u){var A={};return A[f]=e,b.coerce(_,T,A,f,u)},n=function(_,T,f,u){for(var A=0;A0){if(++ye>=n$)return arguments[0]}else ye=0;return oe.apply(void 0,arguments)}}var qy=s$;var l$=qy(Fy),Vy=l$;var u$=/\{\n\/\* \[wrapped with (.+)\] \*/,c$=/,? & /;function f$(oe){var ye=oe.match(u$);return ye?ye[1].split(c$):[]}var zE=f$;var h$=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;function d$(oe,ye){var Fe=ye.length;if(!Fe)return oe;var dt=Fe-1;return ye[dt]=(Fe>1?"& ":"")+ye[dt],ye=ye.join(Fe>2?", ":" "),oe.replace(h$,`{ +/* [wrapped with `+ye+`] */ +`)}var BE=d$;function p$(oe){return function(){return oe}}var G0=p$;var v$=function(){try{var oe=Fh(Object,"defineProperty");return oe({},"",{}),oe}catch{}}(),H0=v$;var m$=H0?function(oe,ye){return H0(oe,"toString",{configurable:!0,enumerable:!1,value:G0(ye),writable:!0})}:wl,OE=m$;var g$=qy(OE),W0=g$;function y$(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++Fe-1}var Rp=T$;var A$=1,M$=2,S$=8,E$=16,k$=32,C$=64,L$=128,P$=256,R$=512,I$=[["ary",L$],["bind",A$],["bindKey",M$],["curry",S$],["curryRight",E$],["flip",R$],["partial",k$],["partialRight",C$],["rearg",P$]];function D$(oe,ye){return af(I$,function(Fe){var dt="_."+Fe[0];ye&Fe[1]&&!Rp(oe,dt)&&oe.push(dt)}),oe.sort()}var jE=D$;function F$(oe,ye,Fe){var dt=ye+"";return W0(oe,BE(dt,jE(zE(dt),Fe)))}var Hy=F$;var z$=1,B$=2,O$=4,N$=8,UE=32,qE=64;function j$(oe,ye,Fe,dt,Zt,yr,Xr,ga,ya,Cn){var xn=ye&N$,On=xn?Xr:void 0,Fi=xn?void 0:Xr,ho=xn?yr:void 0,Li=xn?void 0:yr;ye|=xn?UE:qE,ye&=~(xn?qE:UE),ye&O$||(ye&=~(z$|B$));var lo=[oe,ye,Zt,ho,On,Li,Fi,ga,ya,Cn],Lo=Fe.apply(void 0,lo);return Ng(oe)&&Vy(Lo,lo),Lo.placeholder=dt,Hy(Lo,oe,ye)}var Wy=j$;function U$(oe){var ye=oe;return ye.placeholder}var Xh=U$;var q$=9007199254740991,V$=/^(?:0|[1-9]\d*)$/;function G$(oe,ye){var Fe=typeof oe;return ye=ye??q$,!!ye&&(Fe=="number"||Fe!="symbol"&&V$.test(oe))&&oe>-1&&oe%1==0&&oe1&&ze.reverse(),xn&&ya-1&&oe%1==0&&oe<=xK}var Ip=bK;function wK(oe){return oe!=null&&Ip(oe.length)&&!Ef(oe)}var Pl=wK;function TK(oe,ye,Fe){if(!as(Fe))return!1;var dt=typeof ye;return(dt=="number"?Pl(Fe)&&kf(ye,Fe.length):dt=="string"&&ye in Fe)?cc(Fe[ye],oe):!1}var Tl=TK;function AK(oe){return Ui(function(ye,Fe){var dt=-1,Zt=Fe.length,yr=Zt>1?Fe[Zt-1]:void 0,Xr=Zt>2?Fe[2]:void 0;for(yr=oe.length>3&&typeof yr=="function"?(Zt--,yr):void 0,Xr&&Tl(Fe[0],Fe[1],Xr)&&(yr=Zt<3?void 0:yr,Zt=1),ye=Object(ye);++dt-1}var w8=QJ;function eQ(oe,ye){var Fe=this.__data__,dt=Fp(Fe,oe);return dt<0?(++this.size,Fe.push([oe,ye])):Fe[dt][1]=ye,this}var T8=eQ;function Q0(oe){var ye=-1,Fe=oe==null?0:oe.length;for(this.clear();++ye0&&Fe(ga)?ye>1?I8(ga,ye-1,Fe,dt,Zt):vh(Zt,ga):dt||(Zt[Zt.length]=ga)}return Zt}var Zs=I8;function AQ(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,1):[]}var Qy=AQ;function MQ(oe){return W0(Xy(oe,void 0,Qy),oe+"")}var Rf=MQ;var SQ=Rf(rm),D8=SQ;var EQ=$y(Object.getPrototypeOf,Object),Np=EQ;var kQ="[object Object]",CQ=Function.prototype,LQ=Object.prototype,F8=CQ.toString,PQ=LQ.hasOwnProperty,RQ=F8.call(Object);function IQ(oe){if(!is(oe)||bl(oe)!=kQ)return!1;var ye=Np(oe);if(ye===null)return!0;var Fe=PQ.call(ye,"constructor")&&ye.constructor;return typeof Fe=="function"&&Fe instanceof Fe&&F8.call(Fe)==RQ}var Cd=IQ;var DQ="[object DOMException]",FQ="[object Error]";function zQ(oe){if(!is(oe))return!1;var ye=bl(oe);return ye==FQ||ye==DQ||typeof oe.message=="string"&&typeof oe.name=="string"&&!Cd(oe)}var am=zQ;var BQ=Ui(function(oe,ye){try{return gu(oe,void 0,ye)}catch(Fe){return am(Fe)?Fe:new Error(Fe)}}),e_=BQ;var OQ="Expected a function";function NQ(oe,ye){var Fe;if(typeof ye!="function")throw new TypeError(OQ);return oe=ji(oe),function(){return--oe>0&&(Fe=ye.apply(this,arguments)),oe<=1&&(ye=void 0),Fe}}var t_=NQ;var jQ=1,UQ=32,cw=Ui(function(oe,ye,Fe){var dt=jQ;if(Fe.length){var Zt=Mh(Fe,Xh(cw));dt|=UQ}return Cf(oe,dt,ye,Fe,Zt)});cw.placeholder={};var r_=cw;var qQ=Rf(function(oe,ye){return af(ye,function(Fe){Fe=Nc(Fe),Lf(oe,Fe,r_(oe[Fe],oe))}),oe}),z8=qQ;var VQ=1,GQ=2,HQ=32,fw=Ui(function(oe,ye,Fe){var dt=VQ|GQ;if(Fe.length){var Zt=Mh(Fe,Xh(fw));dt|=HQ}return Cf(ye,dt,oe,Fe,Zt)});fw.placeholder={};var B8=fw;function WQ(oe,ye,Fe){var dt=-1,Zt=oe.length;ye<0&&(ye=-ye>Zt?0:Zt+ye),Fe=Fe>Zt?Zt:Fe,Fe<0&&(Fe+=Zt),Zt=ye>Fe?0:Fe-ye>>>0,ye>>>=0;for(var yr=Array(Zt);++dt=dt?oe:Zu(oe,ye,Fe)}var mh=YQ;var XQ="\\ud800-\\udfff",ZQ="\\u0300-\\u036f",$Q="\\ufe20-\\ufe2f",KQ="\\u20d0-\\u20ff",JQ=ZQ+$Q+KQ,QQ="\\ufe0e\\ufe0f",eee="\\u200d",tee=RegExp("["+eee+XQ+JQ+QQ+"]");function ree(oe){return tee.test(oe)}var Kh=ree;function aee(oe){return oe.split("")}var O8=aee;var N8="\\ud800-\\udfff",nee="\\u0300-\\u036f",iee="\\ufe20-\\ufe2f",oee="\\u20d0-\\u20ff",see=nee+iee+oee,lee="\\ufe0e\\ufe0f",uee="["+N8+"]",hw="["+see+"]",dw="\\ud83c[\\udffb-\\udfff]",cee="(?:"+hw+"|"+dw+")",j8="[^"+N8+"]",U8="(?:\\ud83c[\\udde6-\\uddff]){2}",q8="[\\ud800-\\udbff][\\udc00-\\udfff]",fee="\\u200d",V8=cee+"?",G8="["+lee+"]?",hee="(?:"+fee+"(?:"+[j8,U8,q8].join("|")+")"+G8+V8+")*",dee=G8+V8+hee,pee="(?:"+[j8+hw+"?",hw,U8,q8,uee].join("|")+")",vee=RegExp(dw+"(?="+dw+")|"+pee+dee,"g");function mee(oe){return oe.match(vee)||[]}var H8=mee;function gee(oe){return Kh(oe)?H8(oe):O8(oe)}var nf=gee;function yee(oe){return function(ye){ye=To(ye);var Fe=Kh(ye)?nf(ye):void 0,dt=Fe?Fe[0]:ye.charAt(0),Zt=Fe?mh(Fe,1).join(""):ye.slice(1);return dt[oe]()+Zt}}var a_=yee;var _ee=a_("toUpperCase"),nm=_ee;function xee(oe){return nm(To(oe).toLowerCase())}var n_=xee;function bee(oe,ye,Fe,dt){var Zt=-1,yr=oe==null?0:oe.length;for(dt&&yr&&(Fe=oe[++Zt]);++Zt=ye?oe:ye)),oe}var Bh=xte;function bte(oe,ye,Fe){return Fe===void 0&&(Fe=ye,ye=void 0),Fe!==void 0&&(Fe=Bc(Fe),Fe=Fe===Fe?Fe:0),ye!==void 0&&(ye=Bc(ye),ye=ye===ye?ye:0),Bh(Bc(oe),ye,Fe)}var gk=bte;function wte(){this.__data__=new zp,this.size=0}var yk=wte;function Tte(oe){var ye=this.__data__,Fe=ye.delete(oe);return this.size=ye.size,Fe}var _k=Tte;function Ate(oe){return this.__data__.get(oe)}var xk=Ate;function Mte(oe){return this.__data__.has(oe)}var bk=Mte;var Ste=200;function Ete(oe,ye){var Fe=this.__data__;if(Fe instanceof zp){var dt=Fe.__data__;if(!Bp||dt.lengthga))return!1;var Cn=yr.get(oe),xn=yr.get(ye);if(Cn&&xn)return Cn==ye&&xn==oe;var On=-1,Fi=!0,ho=Fe&Eae?new Up:void 0;for(yr.set(oe,ye),yr.set(ye,oe);++On=ye||Oh<0||On&&ad>=yr}function zi(){var Po=wm();if(Lo(Po))return ze(Po);ga=setTimeout(zi,lo(Po))}function ze(Po){return ga=void 0,Fi&&dt?ho(Po):(dt=Zt=void 0,Xr)}function bu(){ga!==void 0&&clearTimeout(ga),Cn=0,dt=ya=Zt=ga=void 0}function uf(){return ga===void 0?Xr:ze(wm())}function Yl(){var Po=wm(),Oh=Lo(Po);if(dt=arguments,Zt=this,ya=Po,Oh){if(ga===void 0)return Li(ya);if(On)return clearTimeout(ga),ga=setTimeout(zi,ye),ho(ya)}return ga===void 0&&(ga=setTimeout(zi,ye)),Xr}return Yl.cancel=bu,Yl.flush=uf,Yl}var P_=jne;function Une(oe,ye){return oe==null||oe!==oe?ye:oe}var MC=Une;var SC=Object.prototype,qne=SC.hasOwnProperty,Vne=Ui(function(oe,ye){oe=Object(oe);var Fe=-1,dt=ye.length,Zt=dt>2?ye[2]:void 0;for(Zt&&Tl(ye[0],ye[1],Zt)&&(dt=1);++Fe=rie&&(yr=ep,Xr=!1,ye=new Up(ye));e:for(;++Zt=0&&oe.slice(Fe,Zt)==ye}var GC=bie;function wie(oe,ye){return ts(ye,function(Fe){return[Fe,oe[Fe]]})}var HC=wie;function Tie(oe){var ye=-1,Fe=Array(oe.size);return oe.forEach(function(dt){Fe[++ye]=[dt,dt]}),Fe}var WC=Tie;var Aie="[object Map]",Mie="[object Set]";function Sie(oe){return function(ye){var Fe=of(ye);return Fe==Aie?mm(ye):Fe==Mie?WC(ye):HC(ye,oe(ye))}}var B_=Sie;var Eie=B_(Ms),Xg=Eie;var kie=B_(Rl),Zg=kie;var Cie={"&":"&","<":"<",">":">",'"':""","'":"'"},Lie=om(Cie),YC=Lie;var XC=/[&<>"']/g,Pie=RegExp(XC.source);function Rie(oe){return oe=To(oe),oe&&Pie.test(oe)?oe.replace(XC,YC):oe}var O_=Rie;var ZC=/[\\^$.*+?()[\]{}|]/g,Iie=RegExp(ZC.source);function Die(oe){return oe=To(oe),oe&&Iie.test(oe)?oe.replace(ZC,"\\$&"):oe}var $C=Die;function Fie(oe,ye){for(var Fe=-1,dt=oe==null?0:oe.length;++FeZt?0:Zt+Fe),dt=dt===void 0||dt>Zt?Zt:ji(dt),dt<0&&(dt+=Zt),dt=Fe>dt?0:j_(dt);Fe-1?Zt[yr?ye[Xr]:Xr]:void 0}}var q_=Gie;var Hie=Math.max;function Wie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Hie(dt+Zt,0)),Pp(oe,Ti(ye,3),Zt)}var V_=Wie;var Yie=q_(V_),r7=Yie;function Xie(oe,ye,Fe){var dt;return Fe(oe,function(Zt,yr,Xr){if(ye(Zt,yr,Xr))return dt=yr,!1}),dt}var G_=Xie;function Zie(oe,ye){return G_(oe,Ti(ye,3),Df)}var a7=Zie;var $ie=Math.max,Kie=Math.min;function Jie(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt-1;return Fe!==void 0&&(Zt=ji(Fe),Zt=Fe<0?$ie(dt+Zt,0):Kie(Zt,dt-1)),Pp(oe,Ti(ye,3),Zt,!0)}var H_=Jie;var Qie=q_(H_),n7=Qie;function eoe(oe,ye){return G_(oe,Ti(ye,3),Mm)}var i7=eoe;function toe(oe){return oe&&oe.length?oe[0]:void 0}var $g=toe;function roe(oe,ye){var Fe=-1,dt=Pl(oe)?Array(oe.length):[];return yh(oe,function(Zt,yr,Xr){dt[++Fe]=ye(Zt,yr,Xr)}),dt}var W_=roe;function aoe(oe,ye){var Fe=Ii(oe)?ts:W_;return Fe(oe,Ti(ye,3))}var Wp=aoe;function noe(oe,ye){return Zs(Wp(oe,ye),1)}var o7=noe;var ioe=1/0;function ooe(oe,ye){return Zs(Wp(oe,ye),ioe)}var s7=ooe;function soe(oe,ye,Fe){return Fe=Fe===void 0?1:ji(Fe),Zs(Wp(oe,ye),Fe)}var l7=soe;var loe=1/0;function uoe(oe){var ye=oe==null?0:oe.length;return ye?Zs(oe,loe):[]}var u7=uoe;function coe(oe,ye){var Fe=oe==null?0:oe.length;return Fe?(ye=ye===void 0?1:ji(ye),Zs(oe,ye)):[]}var c7=coe;var foe=512;function hoe(oe){return Cf(oe,foe)}var f7=hoe;var doe=lm("floor"),h7=doe;var poe="Expected a function",voe=8,moe=32,goe=128,yoe=256;function _oe(oe){return Rf(function(ye){var Fe=ye.length,dt=Fe,Zt=dh.prototype.thru;for(oe&&ye.reverse();dt--;){var yr=ye[dt];if(typeof yr!="function")throw new TypeError(poe);if(Zt&&!Xr&&V0(yr)=="wrapper")var Xr=new dh([],!0)}for(dt=Xr?dt:Fe;++dtye}var Sm=Ioe;function Doe(oe){return function(ye,Fe){return typeof ye=="string"&&typeof Fe=="string"||(ye=Bc(ye),Fe=Bc(Fe)),oe(ye,Fe)}}var Xp=Doe;var Foe=Xp(Sm),T7=Foe;var zoe=Xp(function(oe,ye){return oe>=ye}),A7=zoe;var Boe=Object.prototype,Ooe=Boe.hasOwnProperty;function Noe(oe,ye){return oe!=null&&Ooe.call(oe,ye)}var M7=Noe;function joe(oe,ye){return oe!=null&&M_(oe,ye,M7)}var S7=joe;var Uoe=Math.max,qoe=Math.min;function Voe(oe,ye,Fe){return oe>=qoe(ye,Fe)&&oe-1:!!Zt&&Yh(oe,ye,Fe)>-1}var C7=$oe;var Koe=Math.max;function Joe(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=Fe==null?0:ji(Fe);return Zt<0&&(Zt=Koe(dt+Zt,0)),Yh(oe,ye,Zt)}var L7=Joe;function Qoe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,0,-1):[]}var P7=Qoe;var ese=Math.min;function tse(oe,ye,Fe){for(var dt=Fe?Am:Rp,Zt=oe[0].length,yr=oe.length,Xr=yr,ga=Array(yr),ya=1/0,Cn=[];Xr--;){var xn=oe[Xr];Xr&&ye&&(xn=ts(xn,_u(ye))),ya=ese(xn.length,ya),ga[Xr]=!Fe&&(ye||Zt>=120&&xn.length>=120)?new Up(Xr&&xn):void 0}xn=oe[0];var On=-1,Fi=ga[0];e:for(;++On=-l9&&oe<=l9}var u9=$se;function Kse(oe){return oe===void 0}var c9=Kse;var Jse="[object WeakMap]";function Qse(oe){return is(oe)&&of(oe)==Jse}var f9=Qse;var ele="[object WeakSet]";function tle(oe){return is(oe)&&bl(oe)==ele}var h9=tle;var rle=1;function ale(oe){return Ti(typeof oe=="function"?oe:If(oe,rle))}var d9=ale;var nle=Array.prototype,ile=nle.join;function ole(oe,ye){return oe==null?"":ile.call(oe,ye)}var p9=ole;var sle=Jh(function(oe,ye,Fe){return oe+(Fe?"-":"")+ye.toLowerCase()}),v9=sle;var lle=Gp(function(oe,ye,Fe){Lf(oe,Fe,ye)}),m9=lle;function ule(oe,ye,Fe){for(var dt=Fe+1;dt--;)if(oe[dt]===ye)return dt;return dt}var g9=ule;var cle=Math.max,fle=Math.min;function hle(oe,ye,Fe){var dt=oe==null?0:oe.length;if(!dt)return-1;var Zt=dt;return Fe!==void 0&&(Zt=ji(Fe),Zt=Zt<0?cle(dt+Zt,0):fle(Zt,dt-1)),ye===ye?g9(oe,ye,Zt):Pp(oe,Gy,Zt,!0)}var y9=hle;var dle=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+ye.toLowerCase()}),_9=dle;var ple=a_("toLowerCase"),x9=ple;function vle(oe,ye){return oe=this.__values__.length,ye=oe?void 0:this.__values__[this.__index__++];return{done:oe,value:ye}}var O9=Hle;function Wle(oe,ye){var Fe=oe.length;if(Fe)return ye+=ye<0?Fe:0,kf(ye,Fe)?oe[ye]:void 0}var tx=Wle;function Yle(oe,ye){return oe&&oe.length?tx(oe,ji(ye)):void 0}var N9=Yle;function Xle(oe){return oe=ji(oe),Ui(function(ye){return tx(ye,oe)})}var j9=Xle;function Zle(oe,ye){return ye=ph(ye,oe),oe=Z_(oe,ye),oe==null||delete oe[Nc(xu(ye))]}var Im=Zle;function $le(oe){return Cd(oe)?void 0:oe}var U9=$le;var Kle=1,Jle=2,Qle=4,eue=Rf(function(oe,ye){var Fe={};if(oe==null)return Fe;var dt=!1;ye=ts(ye,function(yr){return yr=ph(yr,oe),dt||(dt=yr.length>1),yr}),Oc(oe,hm(oe),Fe),dt&&(Fe=If(Fe,Kle|Jle|Qle,U9));for(var Zt=ye.length;Zt--;)Im(Fe,ye[Zt]);return Fe}),q9=eue;function tue(oe,ye,Fe,dt){if(!as(oe))return oe;ye=ph(ye,oe);for(var Zt=-1,yr=ye.length,Xr=yr-1,ga=oe;ga!=null&&++Ztye||yr&&Xr&&ya&&!ga&&!Cn||dt&&Xr&&ya||!Fe&&ya||!Zt)return 1;if(!dt&&!yr&&!Cn&&oe=ga)return ya;var Cn=Fe[dt];return ya*(Cn=="desc"?-1:1)}}return oe.index-ye.index}var W9=lue;function uue(oe,ye,Fe){ye.length?ye=ts(ye,function(yr){return Ii(yr)?function(Xr){return zh(Xr,yr.length===1?yr[0]:yr)}:yr}):ye=[wl];var dt=-1;ye=ts(ye,_u(Ti));var Zt=W_(oe,function(yr,Xr,ga){var ya=ts(ye,function(Cn){return Cn(yr)});return{criteria:ya,index:++dt,value:yr}});return H9(Zt,function(yr,Xr){return W9(yr,Xr,Fe)})}var ix=uue;function cue(oe,ye,Fe,dt){return oe==null?[]:(Ii(ye)||(ye=ye==null?[]:[ye]),Fe=dt?void 0:Fe,Ii(Fe)||(Fe=Fe==null?[]:[Fe]),ix(oe,ye,Fe))}var Y9=cue;function fue(oe){return Rf(function(ye){return ye=ts(ye,_u(Ti)),Ui(function(Fe){var dt=this;return oe(ye,function(Zt){return gu(Zt,dt,Fe)})})})}var Dm=fue;var hue=Dm(ts),X9=hue;var due=Ui,Z9=due;var pue=Math.min,vue=Z9(function(oe,ye){ye=ye.length==1&&Ii(ye[0])?ts(ye[0],_u(Ti)):ts(Zs(ye,1),_u(Ti));var Fe=ye.length;return Ui(function(dt){for(var Zt=-1,yr=pue(dt.length,Fe);++Ztyue)return Fe;do ye%2&&(Fe+=oe),ye=_ue(ye/2),ye&&(oe+=oe);while(ye);return Fe}var Kg=xue;var bue=xm("length"),Q9=bue;var tL="\\ud800-\\udfff",wue="\\u0300-\\u036f",Tue="\\ufe20-\\ufe2f",Aue="\\u20d0-\\u20ff",Mue=wue+Tue+Aue,Sue="\\ufe0e\\ufe0f",Eue="["+tL+"]",yw="["+Mue+"]",_w="\\ud83c[\\udffb-\\udfff]",kue="(?:"+yw+"|"+_w+")",rL="[^"+tL+"]",aL="(?:\\ud83c[\\udde6-\\uddff]){2}",nL="[\\ud800-\\udbff][\\udc00-\\udfff]",Cue="\\u200d",iL=kue+"?",oL="["+Sue+"]?",Lue="(?:"+Cue+"(?:"+[rL,aL,nL].join("|")+")"+oL+iL+")*",Pue=oL+iL+Lue,Rue="(?:"+[rL+yw+"?",yw,aL,nL,Eue].join("|")+")",eL=RegExp(_w+"(?="+_w+")|"+Rue+Pue,"g");function Iue(oe){for(var ye=eL.lastIndex=0;eL.test(oe);)++ye;return ye}var sL=Iue;function Due(oe){return Kh(oe)?sL(oe):Q9(oe)}var ed=Due;var Fue=Math.ceil;function zue(oe,ye){ye=ye===void 0?" ":uc(ye);var Fe=ye.length;if(Fe<2)return Fe?Kg(ye,oe):ye;var dt=Kg(ye,Fue(oe/ed(ye)));return Kh(ye)?mh(nf(dt),0,oe).join(""):dt.slice(0,oe)}var Fv=zue;var Bue=Math.ceil,Oue=Math.floor;function Nue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;if(!ye||dt>=ye)return oe;var Zt=(ye-dt)/2;return Fv(Oue(Zt),Fe)+oe+Fv(Bue(Zt),Fe)}var lL=Nue;function jue(oe,ye,Fe){oe=To(oe),ye=ji(ye);var dt=ye?ed(oe):0;return ye&&dt-1;)ga!==oe&&_L.call(ga,ya,1),_L.call(oe,ya,1);return oe}var Fm=ece;function tce(oe,ye){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye):oe}var sx=tce;var rce=Ui(sx),xL=rce;function ace(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,Ti(Fe,2)):oe}var bL=ace;function nce(oe,ye,Fe){return oe&&oe.length&&ye&&ye.length?Fm(oe,ye,void 0,Fe):oe}var wL=nce;var ice=Array.prototype,oce=ice.splice;function sce(oe,ye){for(var Fe=oe?ye.length:0,dt=Fe-1;Fe--;){var Zt=ye[Fe];if(Fe==dt||Zt!==yr){var yr=Zt;kf(Zt)?oce.call(oe,Zt,1):Im(oe,Zt)}}return oe}var lx=sce;var lce=Rf(function(oe,ye){var Fe=oe==null?0:oe.length,dt=rm(oe,ye);return lx(oe,ts(ye,function(Zt){return kf(Zt,Fe)?+Zt:Zt}).sort(nx)),dt}),TL=lce;var uce=Math.floor,cce=Math.random;function fce(oe,ye){return oe+uce(cce()*(ye-oe+1))}var zm=fce;var hce=parseFloat,dce=Math.min,pce=Math.random;function vce(oe,ye,Fe){if(Fe&&typeof Fe!="boolean"&&Tl(oe,ye,Fe)&&(ye=Fe=void 0),Fe===void 0&&(typeof ye=="boolean"?(Fe=ye,ye=void 0):typeof oe=="boolean"&&(Fe=oe,oe=void 0)),oe===void 0&&ye===void 0?(oe=0,ye=1):(oe=Dh(oe),ye===void 0?(ye=oe,oe=0):ye=Dh(ye)),oe>ye){var dt=oe;oe=ye,ye=dt}if(Fe||oe%1||ye%1){var Zt=pce();return dce(oe+Zt*(ye-oe+hce("1e-"+((Zt+"").length-1))),ye)}return zm(oe,ye)}var AL=vce;var mce=Math.ceil,gce=Math.max;function yce(oe,ye,Fe,dt){for(var Zt=-1,yr=gce(mce((ye-oe)/(Fe||1)),0),Xr=Array(yr);yr--;)Xr[dt?yr:++Zt]=oe,oe+=Fe;return Xr}var ML=yce;function _ce(oe){return function(ye,Fe,dt){return dt&&typeof dt!="number"&&Tl(ye,Fe,dt)&&(Fe=dt=void 0),ye=Dh(ye),Fe===void 0?(Fe=ye,ye=0):Fe=Dh(Fe),dt=dt===void 0?ye1&&Tl(oe,ye[0],ye[1])?ye=[]:Fe>2&&Tl(ye[0],ye[1],ye[2])&&(ye=[ye[0]]),ix(oe,Zs(ye,1),[])}),eP=nfe;var ife=4294967295,ofe=ife-1,sfe=Math.floor,lfe=Math.min;function ufe(oe,ye,Fe,dt){var Zt=0,yr=oe==null?0:oe.length;if(yr===0)return 0;ye=Fe(ye);for(var Xr=ye!==ye,ga=ye===null,ya=Ru(ye),Cn=ye===void 0;Zt>>1;function hfe(oe,ye,Fe){var dt=0,Zt=oe==null?dt:oe.length;if(typeof ye=="number"&&ye===ye&&Zt<=ffe){for(;dt>>1,Xr=oe[yr];Xr!==null&&!Ru(Xr)&&(Fe?Xr<=ye:Xr>>0,Fe?(oe=To(oe),oe&&(typeof ye=="string"||ye!=null&&!Lm(ye))&&(ye=uc(ye),!ye&&Kh(oe))?mh(nf(oe),0,Fe):oe.split(ye,Fe)):[]}var uP=Tfe;var Afe="Expected a function",Mfe=Math.max;function Sfe(oe,ye){if(typeof oe!="function")throw new TypeError(Afe);return ye=ye==null?0:Mfe(ji(ye),0),Ui(function(Fe){var dt=Fe[ye],Zt=mh(Fe,0,ye);return dt&&vh(Zt,dt),gu(oe,this,Zt)})}var cP=Sfe;var Efe=Jh(function(oe,ye,Fe){return oe+(Fe?" ":"")+nm(ye)}),fP=Efe;function kfe(oe,ye,Fe){return oe=To(oe),Fe=Fe==null?0:Bh(ji(Fe),0,oe.length),ye=uc(ye),oe.slice(Fe,Fe+ye.length)==ye}var hP=kfe;function Cfe(){return{}}var dP=Cfe;function Lfe(){return""}var pP=Lfe;function Pfe(){return!0}var vP=Pfe;var Rfe=kp(function(oe,ye){return oe-ye},0),mP=Rfe;function Ife(oe){return oe&&oe.length?Rm(oe,wl):0}var gP=Ife;function Dfe(oe,ye){return oe&&oe.length?Rm(oe,Ti(ye,2)):0}var yP=Dfe;function Ffe(oe){var ye=oe==null?0:oe.length;return ye?Zu(oe,1,ye):[]}var _P=Ffe;function zfe(oe,ye,Fe){return oe&&oe.length?(ye=Fe||ye===void 0?1:ji(ye),Zu(oe,0,ye<0?0:ye)):[]}var xP=zfe;function Bfe(oe,ye,Fe){var dt=oe==null?0:oe.length;return dt?(ye=Fe||ye===void 0?1:ji(ye),ye=dt-ye,Zu(oe,ye<0?0:ye,dt)):[]}var bP=Bfe;function Ofe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3),!1,!0):[]}var wP=Ofe;function Nfe(oe,ye){return oe&&oe.length?Hp(oe,Ti(ye,3)):[]}var TP=Nfe;function jfe(oe,ye){return ye(oe),oe}var AP=jfe;var MP=Object.prototype,Ufe=MP.hasOwnProperty;function qfe(oe,ye,Fe,dt){return oe===void 0||cc(oe,MP[Fe])&&!Ufe.call(dt,Fe)?ye:oe}var ww=qfe;var Vfe={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"};function Gfe(oe){return"\\"+Vfe[oe]}var SP=Gfe;var Hfe=/<%=([\s\S]+?)%>/g,dx=Hfe;var Wfe=/<%-([\s\S]+?)%>/g,EP=Wfe;var Yfe=/<%([\s\S]+?)%>/g,kP=Yfe;var Xfe={escape:EP,evaluate:kP,interpolate:dx,variable:"",imports:{_:{escape:O_}}},Qg=Xfe;var Zfe="Invalid `variable` option passed into `_.template`",$fe=/\b__p \+= '';/g,Kfe=/\b(__p \+=) '' \+/g,Jfe=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Qfe=/[()=,{}\[\]\/\s]/,ehe=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,px=/($^)/,the=/['\n\r\u2028\u2029\\]/g,rhe=Object.prototype,CP=rhe.hasOwnProperty;function ahe(oe,ye,Fe){var dt=Qg.imports._.templateSettings||Qg;Fe&&Tl(oe,ye,Fe)&&(ye=void 0),oe=To(oe),ye=Dp({},ye,dt,ww);var Zt=Dp({},ye.imports,dt.imports,ww),yr=Ms(Zt),Xr=Em(Zt,yr),ga,ya,Cn=0,xn=ye.interpolate||px,On="__p += '",Fi=RegExp((ye.escape||px).source+"|"+xn.source+"|"+(xn===dx?ehe:px).source+"|"+(ye.evaluate||px).source+"|$","g"),ho=CP.call(ye,"sourceURL")?"//# sourceURL="+(ye.sourceURL+"").replace(/\s/g," ")+` +`:"";oe.replace(Fi,function(Lo,zi,ze,bu,uf,Yl){return ze||(ze=bu),On+=oe.slice(Cn,Yl).replace(the,SP),zi&&(ga=!0,On+=`' + +__e(`+zi+`) + +'`),uf&&(ya=!0,On+=`'; +`+uf+`; +__p += '`),ze&&(On+=`' + +((__t = (`+ze+`)) == null ? '' : __t) + +'`),Cn=Yl+Lo.length,Lo}),On+=`'; +`;var Li=CP.call(ye,"variable")&&ye.variable;if(!Li)On=`with (obj) { +`+On+` +} +`;else if(Qfe.test(Li))throw new Error(Zfe);On=(ya?On.replace($fe,""):On).replace(Kfe,"$1").replace(Jfe,"$1;"),On="function("+(Li||"obj")+`) { +`+(Li?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(ga?", __e = _.escape":"")+(ya?`, __j = Array.prototype.join; function print() { __p += __j.call(arguments, '') } `:`; -`)+qn+`return __p -}`;var di=uy(function(){return Function(ur,co+"return "+qn).apply(void 0,Gr)});if(di.source=qn,w0(di))throw di;return di}var gL=Fle;var zle="Expected a function";function Ble(ie,fe,Re){var ct=!0,Bt=!0;if(typeof ie!="function")throw new TypeError(zle);return vs(Re)&&(ct="leading"in Re?!!Re.leading:ct,Bt="trailing"in Re?!!Re.trailing:Bt),jy(ie,fe,{leading:ct,maxWait:fe,trailing:Bt})}var yL=Ble;function Ole(ie,fe){return fe(ie)}var Vd=Ole;var Nle=9007199254740991,n3=4294967295,jle=Math.min;function Ule(ie,fe){if(ie=ji(ie),ie<1||ie>Nle)return[];var Re=n3,ct=jle(ie,n3);fe=Gc(fe),ie-=n3;for(var Bt=d0(ct,fe);++Re-1;);return Re}var M_=$le;function Kle(ie,fe){for(var Re=-1,ct=ie.length;++Re-1;);return Re}var S_=Kle;function Jle(ie,fe,Re){if(ie=So(ie),ie&&(Re||fe===void 0))return qg(ie);if(!ie||!(fe=vc(fe)))return ie;var ct=of(ie),Bt=of(fe),ur=S_(ct,Bt),Gr=M_(ct,Bt)+1;return uh(ct,ur,Gr).join("")}var EL=Jle;function Qle(ie,fe,Re){if(ie=So(ie),ie&&(Re||fe===void 0))return ie.slice(0,Ug(ie)+1);if(!ie||!(fe=vc(fe)))return ie;var ct=of(ie),Bt=M_(ct,of(fe))+1;return uh(ct,0,Bt).join("")}var kL=Qle;var eue=/^\s+/;function tue(ie,fe,Re){if(ie=So(ie),ie&&(Re||fe===void 0))return ie.replace(eue,"");if(!ie||!(fe=vc(fe)))return ie;var ct=of(ie),Bt=S_(ct,of(fe));return uh(ct,Bt).join("")}var CL=tue;var rue=30,aue="...",nue=/\w*$/;function iue(ie,fe){var Re=rue,ct=aue;if(vs(fe)){var Bt="separator"in fe?fe.separator:Bt;Re="length"in fe?ji(fe.length):Re,ct="omission"in fe?vc(fe.omission):ct}ie=So(ie);var ur=ie.length;if(Hh(ie)){var Gr=of(ie);ur=Gr.length}if(Re>=ur)return ie;var ua=Re-Xh(ct);if(ua<1)return ct;var da=Gr?uh(Gr,0,ua).join(""):ie.slice(0,ua);if(Bt===void 0)return da+ct;if(Gr&&(ua+=da.length-ua),Z0(Bt)){if(ie.slice(ua).search(Bt)){var zn,Cn=da;for(Bt.global||(Bt=RegExp(Bt.source,So(nue.exec(Bt))+"g")),Bt.lastIndex=0;zn=Bt.exec(Cn);)var qn=zn.index;da=da.slice(0,qn===void 0?ua:qn)}}else if(ie.indexOf(vc(Bt),ua)!=ua){var Si=da.lastIndexOf(Bt);Si>-1&&(da=da.slice(0,Si))}return da+ct}var LL=iue;function oue(ie){return ry(ie,1)}var PL=oue;var sue={"&":"&","<":"<",">":">",""":'"',"'":"'"},lue=M0(sue),RL=lue;var IL=/&(?:amp|lt|gt|quot|#39);/g,uue=RegExp(IL.source);function cue(ie){return ie=So(ie),ie&&uue.test(ie)?ie.replace(IL,RL):ie}var DL=cue;var fue=1/0,hue=Av&&1/Mv(new Av([,-0]))[1]==fue?function(ie){return new Av(ie)}:o0,FL=hue;var due=200;function vue(ie,fe,Re){var ct=-1,Bt=pv,ur=ie.length,Gr=!0,ua=[],da=ua;if(Re)Gr=!1,Bt=G0;else if(ur>=due){var zn=fe?null:FL(ie);if(zn)return Mv(zn);Gr=!1,Bt=qd,da=new Tv}else da=fe?[]:ua;e:for(;++ct1||this.__actions__.length||!(ct instanceof bs)||!Lf(Re)?this.thru(Bt):(ct=ct.slice(Re,+Re+(fe?1:0)),ct.__actions__.push({func:Vd,args:[Bt],thisArg:void 0}),new oh(ct,this.__chain__).thru(function(ur){return fe&&!ur.length&&ur.push(void 0),ur}))}),$L=Due;function Fue(){return my(this)}var KL=Fue;function zue(){var ie=this.__wrapped__;if(ie instanceof bs){var fe=ie;return this.__actions__.length&&(fe=new bs(this)),fe=fe.reverse(),fe.__actions__.push({func:Vd,args:[c1],thisArg:void 0}),new oh(fe,this.__chain__)}return this.thru(c1)}var JL=zue;function Bue(ie,fe,Re){var ct=ie.length;if(ct<2)return ct?_h(ie[0]):[];for(var Bt=-1,ur=Array(ct);++Bt1?ie[fe-1]:void 0;return Re=typeof Re=="function"?(ie.pop(),Re):void 0,E_(ie,Re)}),i9=Hue;var vo={chunk:ak,compact:qk,concat:Gk,difference:w4,differenceBy:A4,differenceWith:T4,drop:S4,dropRight:E4,dropRightWhile:k4,dropWhile:C4,fill:U4,findIndex:Jy,findLastIndex:e_,first:l1,flatten:ly,flattenDeep:$4,flattenDepth:K4,fromPairs:oC,head:l1,indexOf:gC,initial:yC,intersection:_C,intersectionBy:xC,intersectionWith:bC,join:t8,last:Iu,lastIndexOf:i8,nth:S8,pull:s7,pullAll:m_,pullAllBy:l7,pullAllWith:u7,pullAt:c7,remove:x7,reverse:c1,slice:B7,sortedIndex:q7,sortedIndexBy:G7,sortedIndexOf:V7,sortedLastIndex:H7,sortedLastIndexBy:W7,sortedLastIndexOf:Y7,sortedUniq:X7,sortedUniqBy:Z7,tail:oL,take:sL,takeRight:lL,takeRightWhile:uL,takeWhile:cL,union:zL,unionBy:BL,unionWith:OL,uniq:NL,uniqBy:jL,uniqWith:UL,unzip:am,unzipWith:E_,without:XL,xor:QL,xorBy:e9,xorWith:t9,zip:r9,zipObject:a9,zipObjectDeep:n9,zipWith:i9};var Rl={countBy:l4,each:n1,eachRight:i1,every:N4,filter:q4,find:G4,findLast:H4,flatMap:Y4,flatMapDeep:X4,flatMapDepth:Z4,forEach:n1,forEachRight:i1,groupBy:uC,includes:mC,invokeMap:EC,keyBy:a8,map:Cv,orderBy:D8,partition:e7,reduce:m7,reduceRight:y7,reject:_7,sample:E7,sampleSize:L7,shuffle:F7,size:z7,some:j7,sortBy:U7};var i3={now:U0};var Gu={after:mS,ary:ry,before:cy,bind:fy,bindKey:TE,curry:c4,curryRight:f4,debounce:jy,defer:x4,delay:b4,flip:J4,memoize:oy,negate:Gd,once:P8,overArgs:B8,partial:p_,partialRight:Q8,rearg:p7,rest:A7,spread:K7,throttle:yL,unary:PL,wrap:ZL};var Bo={castArray:tk,clone:Bk,cloneDeep:Ok,cloneDeepWith:Nk,cloneWith:jk,conformsTo:i4,eq:pc,gt:cC,gte:fC,isArguments:Dh,isArray:Ii,isArrayBuffer:LC,isArrayLike:Yl,isArrayLikeObject:Qs,isBoolean:PC,isBuffer:yh,isDate:DC,isElement:FC,isEmpty:zC,isEqual:BC,isEqualWith:OC,isError:w0,isFinite:NC,isFunction:Cf,isInteger:i_,isLength:mv,isMap:My,isMatch:jC,isMatchWith:UC,isNaN:qC,isNative:VC,isNil:HC,isNull:WC,isNumber:o_,isObject:vs,isObjectLike:gs,isPlainObject:bd,isRegExp:Z0,isSafeInteger:$C,isSet:Sy,isString:Rv,isSymbol:qu,isTypedArray:Vh,isUndefined:KC,isWeakMap:JC,isWeakSet:QC,lt:l8,lte:u8,toArray:u_,toFinite:Mh,toInteger:ji,toLength:Zy,toNumber:jc,toPlainObject:Uy,toSafeInteger:TL,toString:So};var Gf={add:dS,ceil:rk,divide:M4,floor:Q4,max:v8,maxBy:p8,mean:m8,meanBy:g8,min:b8,minBy:w8,multiply:A8,round:M7,subtract:aL,sum:nL,sumBy:iL};var h1={clamp:nk,inRange:pC,random:f7};var es={assign:KS,assignIn:e1,assignInWith:gv,assignWith:eE,at:bE,create:u4,defaults:v4,defaultsDeep:_4,entries:o1,entriesIn:s1,extend:e1,extendWith:gv,findKey:V4,findLastKey:W4,forIn:rC,forInRight:aC,forOwn:nC,forOwnRight:iC,functions:sC,functionsIn:lC,get:x0,has:dC,hasIn:O0,invert:AC,invertBy:MC,invoke:SC,keys:js,keysIn:Xl,mapKeys:c8,mapValues:f8,merge:y8,mergeWith:qy,omit:C8,omitBy:L8,pick:r7,pickBy:h_,result:T7,set:P7,setWith:R7,toPairs:o1,toPairsIn:s1,transform:SL,unset:GL,update:VL,updateWith:HL,values:Yh,valuesIn:YL};var Zh={at:$L,chain:my,commit:Uk,lodash:kr,next:M8,plant:a7,reverse:JL,tap:fL,thru:Vd,toIterator:xL,toJSON:zv,value:zv,valueOf:zv,wrapperChain:KL};var ll={camelCase:ek,capitalize:dy,deburr:vy,endsWith:P4,escape:Yy,escapeRegExp:B4,kebabCase:r8,lowerCase:o8,lowerFirst:s8,pad:Z8,padEnd:$8,padStart:K8,parseInt:J8,repeat:b7,replace:w7,snakeCase:O7,split:$7,startCase:J7,startsWith:Q7,template:gL,templateSettings:f1,toLower:bL,toUpper:ML,trim:EL,trimEnd:kL,trimStart:CL,truncate:LL,unescape:DL,upperCase:WL,upperFirst:A0,words:py};var vl={attempt:uy,bindAll:AE,cond:r4,conforms:n4,constant:u0,defaultTo:h4,flow:eC,flowRight:tC,identity:Nl,iteratee:e8,matches:h8,matchesProperty:d8,method:_8,methodOf:x8,mixin:l_,noop:o0,nthArg:E8,over:F8,overEvery:O8,overSome:N8,property:zy,propertyOf:n7,range:d7,rangeRight:v7,stubArray:C0,stubFalse:v0,stubObject:eL,stubString:tL,stubTrue:rL,times:_L,toPath:wL,uniqueId:qL};function Wue(){var ie=new bs(this.__wrapped__);return ie.__actions__=_u(this.__actions__),ie.__dir__=this.__dir__,ie.__filtered__=this.__filtered__,ie.__iteratees__=_u(this.__iteratees__),ie.__takeCount__=this.__takeCount__,ie.__views__=_u(this.__views__),ie}var o9=Wue;function Yue(){if(this.__filtered__){var ie=new bs(this);ie.__dir__=-1,ie.__filtered__=!0}else ie=this.clone(),ie.__dir__*=-1;return ie}var s9=Yue;var Xue=Math.max,Zue=Math.min;function $ue(ie,fe,Re){for(var ct=-1,Bt=Re.length;++ct0||fe<0)?new bs(Re):(ie<0?Re=Re.takeRight(-ie):ie&&(Re=Re.drop(ie)),fe!==void 0&&(fe=ji(fe),Re=fe<0?Re.dropRight(-fe):Re.take(fe-ie)),Re)};bs.prototype.takeRightWhile=function(ie){return this.reverse().takeWhile(ie).reverse()};bs.prototype.toArray=function(){return this.take(h9)};zf(bs.prototype,function(ie,fe){var Re=/^(?:filter|find|map|reject)|While$/.test(fe),ct=/^(?:head|last)$/.test(fe),Bt=kr[ct?"take"+(fe=="last"?"Right":""):fe],ur=ct||/^find/.test(fe);Bt&&(kr.prototype[fe]=function(){var Gr=this.__wrapped__,ua=ct?[1]:arguments,da=Gr instanceof bs,zn=ua[0],Cn=da||Ii(Gr),qn=function(Zo){var Rs=Bt.apply(kr,lh([Zo],ua));return ct&&Si?Rs[0]:Rs};Cn&&Re&&typeof zn=="function"&&zn.length!=1&&(da=Cn=!1);var Si=this.__chain__,co=!!this.__actions__.length,jo=ur&&!Si,di=da&&!co;if(!ur&&Cn){Gr=di?Gr:new bs(this);var De=ie.apply(Gr,ua);return De.__actions__.push({func:Vd,args:[qn],thisArg:void 0}),new oh(De,Si)}return jo&&di?ie.apply(this,ua):(De=this.thru(qn),jo?ct?De.value()[0]:De.value():De)})});nf(["pop","push","shift","sort","splice","unshift"],function(ie){var fe=ice[ie],Re=/^(?:push|sort|unshift)$/.test(ie)?"tap":"thru",ct=/^(?:pop|shift)$/.test(ie);kr.prototype[ie]=function(){var Bt=arguments;if(ct&&!this.__chain__){var ur=this.value();return fe.apply(Ii(ur)?ur:[],Bt)}return this[Re](function(Gr){return fe.apply(Ii(Gr)?Gr:[],Bt)})}});zf(bs.prototype,function(ie,fe){var Re=kr[fe];if(Re){var ct=Re.name+"";d9.call(dv,ct)||(dv[ct]=[]),dv[ct].push({name:fe,func:Re})}});dv[h0(void 0,rce).name]=[{name:"wrapper",func:void 0}];bs.prototype.clone=o9;bs.prototype.reverse=s9;bs.prototype.value=u9;kr.prototype.at=Zh.at;kr.prototype.chain=Zh.wrapperChain;kr.prototype.commit=Zh.commit;kr.prototype.next=Zh.next;kr.prototype.plant=Zh.plant;kr.prototype.reverse=Zh.reverse;kr.prototype.toJSON=kr.prototype.valueOf=kr.prototype.value=Zh.value;kr.prototype.first=kr.prototype.head;c9&&(kr.prototype[c9]=Zh.toIterator);var su=kr;var $h=nH(m9());window.PlotlyConfig={MathJaxConfig:"local"};var s3=class{constructor(fe,Re){this.model=fe,this.serializers=Re}get(fe){let Re=this.serializers[fe],ct=this.model.get(fe);return Re?.deserialize?Re.deserialize(ct):ct}set(fe,Re){let ct=this.serializers[fe];ct?.serialize&&(Re=ct.serialize(Re)),this.model.set(fe,Re)}on(fe,Re){this.model.on(fe,Re)}save_changes(){this.model.save_changes()}defaults(){return{_widget_data:[],_widget_layout:{},_config:{},_py2js_addTraces:null,_py2js_deleteTraces:null,_py2js_moveTraces:null,_py2js_restyle:null,_py2js_relayout:null,_py2js_update:null,_py2js_animate:null,_py2js_removeLayoutProps:null,_py2js_removeTraceProps:null,_js2py_restyle:null,_js2py_relayout:null,_js2py_update:null,_js2py_layoutDelta:null,_js2py_traceDeltas:null,_js2py_pointsCallback:null,_last_layout_edit_id:0,_last_trace_edit_id:0}}initialize(){this.model.on("change:_widget_data",()=>this.do_data()),this.model.on("change:_widget_layout",()=>this.do_layout()),this.model.on("change:_py2js_addTraces",()=>this.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),this.model.on("change:_py2js_removeLayoutProps",()=>this.do_removeLayoutProps()),this.model.on("change:_py2js_removeTraceProps",()=>this.do_removeTraceProps())}_normalize_trace_indexes(fe){if(fe==null){var Re=this.model.get("_widget_data").length;fe=su.range(Re)}return Array.isArray(fe)||(fe=[fe]),fe}do_data(){}do_layout(){}do_addTraces(){var fe=this.model.get("_py2js_addTraces");if(fe!==null){var Re=this.model.get("_widget_data"),ct=fe.trace_data;su.forEach(ct,function(Bt){Re.push(Bt)})}}do_deleteTraces(){var fe=this.model.get("_py2js_deleteTraces");if(fe!==null){var Re=fe.delete_inds,ct=this.model.get("_widget_data");Re.slice().reverse().forEach(function(Bt){ct.splice(Bt,1)})}}do_moveTraces(){var fe=this.model.get("_py2js_moveTraces");if(fe!==null){var Re=this.model.get("_widget_data"),ct=fe.current_trace_inds,Bt=fe.new_trace_inds;hce(Re,ct,Bt)}}do_restyle(){var fe=this.model.get("_py2js_restyle");if(fe!==null){var Re=fe.restyle_data,ct=this._normalize_trace_indexes(fe.restyle_traces);y9(this.model.get("_widget_data"),Re,ct)}}do_relayout(){var fe=this.model.get("_py2js_relayout");fe!==null&&P_(this.model.get("_widget_layout"),fe.relayout_data)}do_update(){var fe=this.model.get("_py2js_update");if(fe!==null){var Re=fe.style_data,ct=fe.layout_data,Bt=this._normalize_trace_indexes(fe.style_traces);y9(this.model.get("_widget_data"),Re,Bt),P_(this.model.get("_widget_layout"),ct)}}do_animate(){var fe=this.model.get("_py2js_animate");if(fe!==null){for(var Re=fe.style_data,ct=fe.layout_data,Bt=this._normalize_trace_indexes(fe.style_traces),ur=0;urthis.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),window?.MathJax?.Hub?.Config?.({SVG:{font:"STIX-Web"}});var Re=this.model.get("_last_layout_edit_id"),ct=this.model.get("_last_trace_edit_id");this.viewID=x9();var Bt=su.cloneDeep(this.model.get("_widget_data")),ur=su.cloneDeep(this.model.get("_widget_layout"));ur.height||(ur.height=360);var Gr=this.model.get("_config");Gr.editSelection=!1,$h.default.newPlot(fe.el,Bt,ur,Gr).then(function(){fe._sendTraceDeltas(ct),fe._sendLayoutDelta(Re),fe.el.on("plotly_restyle",function(da){fe.handle_plotly_restyle(da)}),fe.el.on("plotly_relayout",function(da){fe.handle_plotly_relayout(da)}),fe.el.on("plotly_update",function(da){fe.handle_plotly_update(da)}),fe.el.on("plotly_click",function(da){fe.handle_plotly_click(da)}),fe.el.on("plotly_hover",function(da){fe.handle_plotly_hover(da)}),fe.el.on("plotly_unhover",function(da){fe.handle_plotly_unhover(da)}),fe.el.on("plotly_selected",function(da){fe.handle_plotly_selected(da)}),fe.el.on("plotly_deselect",function(da){fe.handle_plotly_deselect(da)}),fe.el.on("plotly_doubleclick",function(da){fe.handle_plotly_doubleclick(da)});var ua=new CustomEvent("plotlywidget-after-render",{detail:{element:fe.el,viewID:fe.viewID}});document.dispatchEvent(ua)})}_processLuminoMessage(fe,Re){Re.apply(this,arguments);var ct=this;switch(fe.type){case"before-attach":var Bt={showgrid:!1,showline:!1,tickvals:[]};$h.default.newPlot(ct.el,[],{xaxis:Bt,yaxis:Bt}),this.resizeEventListener=()=>{this.autosizeFigure()},window.addEventListener("resize",this.resizeEventListener);break;case"after-attach":this.perform_render();break;case"after-show":case"resize":this.autosizeFigure();break}}autosizeFigure(){var fe=this,Re=fe.model.get("_widget_layout");(su.isNil(Re)||su.isNil(Re.width))&&$h.default.Plots.resize(fe.el).then(function(){var ct=fe.model.get("_last_layout_edit_id");fe._sendLayoutDelta(ct)})}remove(){$h.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return su.mergeWith({},this.el._fullData,this.el.data,g9)}getFullLayout(){return su.mergeWith({},this.el._fullLayout,this.el.layout,g9)}buildPointsObject(fe){var Re;if(fe.hasOwnProperty("points")){var ct=fe.points,Bt=ct.length,ur=!0;for(let Cn=0;Cn=0;Bt--)ct.splice(0,0,ie[fe[Bt]]),ie.splice(fe[Bt],1);var ur=su(Re).zip(ct).sortBy(0).unzip().value();Re=ur[0],ct=ur[1];for(var Gr=0;Gr0&&typeof ur[0]=="object"){Re[ct]=new Array(ur.length);for(var Gr=0;Gr0&&(Re[ct]=ua)}else typeof ur=="object"&&!Array.isArray(ur)?Re[ct]=d1(ur,{}):ur!==void 0&&typeof ur!="function"&&(Re[ct]=ur)}}return Re}function x9(ie,fe,Re,ct){if(Re||(Re=16),fe===void 0&&(fe=24),fe<=0)return"0";var Bt=Math.log(Math.pow(2,fe))/Math.log(Re),ur="",Gr,ua,da;for(Gr=2;Bt===1/0;Gr*=2)Bt=Math.log(Math.pow(2,fe/Gr))/Math.log(Re)*Gr;var zn=Bt-Math.floor(Bt);for(Gr=0;Gr=Math.pow(2,fe)?ct>10?(console.warn("randstr failed uniqueness"),ur):x9(ie,fe,Re,(ct||0)+1):ur}var bGe=()=>{let ie;return{initialize(fe){ie=new s3(fe.model,lce),ie.initialize()},render({el:fe}){let Re=new l3(ie,fe);return Re.perform_render(),()=>Re.remove()}}};export{s3 as FigureModel,l3 as FigureView,bGe as default}; +`)+On+`return __p +}`;var lo=e_(function(){return Function(yr,ho+"return "+On).apply(void 0,Xr)});if(lo.source=On,am(lo))throw lo;return lo}var LP=ahe;var nhe="Expected a function";function ihe(oe,ye,Fe){var dt=!0,Zt=!0;if(typeof oe!="function")throw new TypeError(nhe);return as(Fe)&&(dt="leading"in Fe?!!Fe.leading:dt,Zt="trailing"in Fe?!!Fe.trailing:Zt),P_(oe,ye,{leading:dt,maxWait:ye,trailing:Zt})}var PP=ihe;function ohe(oe,ye){return ye(oe)}var rp=ohe;var she=9007199254740991,Tw=4294967295,lhe=Math.min;function uhe(oe,ye){if(oe=ji(oe),oe<1||oe>she)return[];var Fe=Tw,dt=lhe(oe,Tw);ye=jc(ye),oe-=Tw;for(var Zt=X0(dt,ye);++Fe-1;);return Fe}var mx=yhe;function _he(oe,ye){for(var Fe=-1,dt=oe.length;++Fe-1;);return Fe}var gx=_he;function xhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return Iy(oe);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=nf(ye),yr=gx(dt,Zt),Xr=mx(dt,Zt)+1;return mh(dt,yr,Xr).join("")}var jP=xhe;function bhe(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.slice(0,Ry(oe)+1);if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=mx(dt,nf(ye))+1;return mh(dt,0,Zt).join("")}var UP=bhe;var whe=/^\s+/;function The(oe,ye,Fe){if(oe=To(oe),oe&&(Fe||ye===void 0))return oe.replace(whe,"");if(!oe||!(ye=uc(ye)))return oe;var dt=nf(oe),Zt=gx(dt,nf(ye));return mh(dt,Zt).join("")}var qP=The;var Ahe=30,Mhe="...",She=/\w*$/;function Ehe(oe,ye){var Fe=Ahe,dt=Mhe;if(as(ye)){var Zt="separator"in ye?ye.separator:Zt;Fe="length"in ye?ji(ye.length):Fe,dt="omission"in ye?uc(ye.omission):dt}oe=To(oe);var yr=oe.length;if(Kh(oe)){var Xr=nf(oe);yr=Xr.length}if(Fe>=yr)return oe;var ga=Fe-ed(dt);if(ga<1)return dt;var ya=Xr?mh(Xr,0,ga).join(""):oe.slice(0,ga);if(Zt===void 0)return ya+dt;if(Xr&&(ga+=ya.length-ga),Lm(Zt)){if(oe.slice(ga).search(Zt)){var Cn,xn=ya;for(Zt.global||(Zt=RegExp(Zt.source,To(She.exec(Zt))+"g")),Zt.lastIndex=0;Cn=Zt.exec(xn);)var On=Cn.index;ya=ya.slice(0,On===void 0?ga:On)}}else if(oe.indexOf(uc(Zt),ga)!=ga){var Fi=ya.lastIndexOf(Zt);Fi>-1&&(ya=ya.slice(0,Fi))}return ya+dt}var VP=Ehe;function khe(oe){return Yy(oe,1)}var GP=khe;var Che={"&":"&","<":"<",">":">",""":'"',"'":"'"},Lhe=om(Che),HP=Lhe;var WP=/&(?:amp|lt|gt|quot|#39);/g,Phe=RegExp(WP.source);function Rhe(oe){return oe=To(oe),oe&&Phe.test(oe)?oe.replace(WP,HP):oe}var YP=Rhe;var Ihe=1/0,Dhe=jp&&1/qp(new jp([,-0]))[1]==Ihe?function(oe){return new jp(oe)}:U0,XP=Dhe;var Fhe=200;function zhe(oe,ye,Fe){var dt=-1,Zt=Rp,yr=oe.length,Xr=!0,ga=[],ya=ga;if(Fe)Xr=!1,Zt=Am;else if(yr>=Fhe){var Cn=ye?null:XP(oe);if(Cn)return qp(Cn);Xr=!1,Zt=ep,ya=new Up}else ya=ye?[]:ga;e:for(;++dt1||this.__actions__.length||!(dt instanceof fs)||!kf(Fe)?this.thru(Zt):(dt=dt.slice(Fe,+Fe+(ye?1:0)),dt.__actions__.push({func:rp,args:[Zt],thisArg:void 0}),new dh(dt,this.__chain__).thru(function(yr){return ye&&!yr.length&&yr.push(void 0),yr}))}),uR=rde;function ade(){return s_(this)}var cR=ade;function nde(){var oe=this.__wrapped__;if(oe instanceof fs){var ye=oe;return this.__actions__.length&&(ye=new fs(this)),ye=ye.reverse(),ye.__actions__.push({func:rp,args:[Jg],thisArg:void 0}),new dh(ye,this.__chain__)}return this.thru(Jg)}var fR=nde;function ide(oe,ye,Fe){var dt=oe.length;if(dt<2)return dt?Eh(oe[0]):[];for(var Zt=-1,yr=Array(dt);++Zt1?oe[ye-1]:void 0;return Fe=typeof Fe=="function"?(oe.pop(),Fe):void 0,yx(oe,Fe)}),yR=dde;var co={chunk:mk,compact:tC,concat:rC,difference:FC,differenceBy:zC,differenceWith:BC,drop:NC,dropRight:jC,dropRightWhile:UC,dropWhile:qC,fill:e7,findIndex:V_,findLastIndex:H_,first:$g,flatten:Qy,flattenDeep:u7,flattenDepth:c7,fromPairs:_7,head:$g,indexOf:L7,initial:P7,intersection:R7,intersectionBy:I7,intersectionWith:D7,join:p9,last:xu,lastIndexOf:y9,nth:N9,pull:xL,pullAll:sx,pullAllBy:bL,pullAllWith:wL,pullAt:TL,remove:IL,reverse:Jg,slice:$L,sortedIndex:tP,sortedIndexBy:rP,sortedIndexOf:aP,sortedLastIndex:nP,sortedLastIndexBy:iP,sortedLastIndexOf:oP,sortedUniq:sP,sortedUniqBy:lP,tail:_P,take:xP,takeRight:bP,takeRightWhile:wP,takeWhile:TP,union:ZP,unionBy:$P,unionWith:KP,uniq:JP,uniqBy:QP,uniqWith:eR,unzip:Om,unzipWith:yx,without:sR,xor:hR,xorBy:dR,xorWith:pR,zip:vR,zipObject:mR,zipObjectDeep:gR,zipWith:yR};var ul={countBy:bC,each:Wg,eachRight:Yg,every:JC,filter:t7,find:r7,findLast:n7,flatMap:o7,flatMapDeep:s7,flatMapDepth:l7,forEach:Wg,forEachRight:Yg,groupBy:w7,includes:C7,invokeMap:j7,keyBy:m9,map:Wp,orderBy:Y9,partition:dL,reduce:CL,reduceRight:PL,reject:RL,sample:jL,sampleSize:VL,shuffle:XL,size:ZL,some:QL,sortBy:eP};var Aw={now:wm};var Iu={after:CE,ary:Yy,before:t_,bind:r_,bindKey:B8,curry:TC,curryRight:AC,debounce:P_,defer:IC,delay:DC,flip:f7,memoize:Ky,negate:tp,once:G9,overArgs:$9,partial:ox,partialRight:hL,rearg:kL,rest:zL,spread:cP,throttle:PP,unary:GP,wrap:lR};var ko={castArray:pk,clone:$k,cloneDeep:Kk,cloneDeepWith:Jk,cloneWith:Qk,conformsTo:yC,eq:cc,gt:T7,gte:A7,isArguments:jh,isArray:Ii,isArrayBuffer:V7,isArrayLike:Pl,isArrayLikeObject:Fs,isBoolean:G7,isBuffer:Sh,isDate:Y7,isElement:X7,isEmpty:Z7,isEqual:$7,isEqualWith:K7,isError:am,isFinite:J7,isFunction:Ef,isInteger:$_,isLength:Ip,isMap:m_,isMatch:Q7,isMatchWith:e9,isNaN:t9,isNative:a9,isNil:n9,isNull:i9,isNumber:K_,isObject:as,isObjectLike:is,isPlainObject:Cd,isRegExp:Lm,isSafeInteger:u9,isSet:g_,isString:Zp,isSymbol:Ru,isTypedArray:$h,isUndefined:c9,isWeakMap:f9,isWeakSet:h9,lt:b9,lte:w9,toArray:ex,toFinite:Dh,toInteger:ji,toLength:j_,toNumber:Bc,toPlainObject:R_,toSafeInteger:BP,toString:To};var Kf={add:SE,ceil:vk,divide:OC,floor:h7,max:E9,maxBy:k9,mean:C9,meanBy:L9,min:D9,minBy:F9,multiply:z9,round:OL,subtract:mP,sum:gP,sumBy:yP};var e1={clamp:gk,inRange:k7,random:AL};var Ho={assign:c8,assignIn:qg,assignInWith:Dp,assignWith:d8,at:D8,create:wC,defaults:EC,defaultsDeep:RC,entries:Xg,entriesIn:Zg,extend:qg,extendWith:Dp,findKey:a7,findLastKey:i7,forIn:v7,forInRight:m7,forOwn:g7,forOwnRight:y7,functions:x7,functionsIn:b7,get:tm,has:S7,hasIn:_m,invert:z7,invertBy:O7,invoke:N7,keys:Ms,keysIn:Rl,mapKeys:T9,mapValues:A9,merge:P9,mergeWith:I_,omit:q9,omitBy:V9,pick:vL,pickBy:ax,result:BL,set:GL,setWith:HL,toPairs:Xg,toPairsIn:Zg,transform:NP,unset:rR,update:aR,updateWith:nR,values:Qh,valuesIn:oR};var td={at:uR,chain:s_,commit:eC,lodash:Ur,next:O9,plant:mL,reverse:fR,tap:AP,thru:rp,toIterator:IP,toJSON:Qp,value:Qp,valueOf:Qp,wrapperChain:cR};var Us={camelCase:dk,capitalize:n_,deburr:i_,endsWith:GC,escape:O_,escapeRegExp:$C,kebabCase:v9,lowerCase:_9,lowerFirst:x9,pad:lL,padEnd:uL,padStart:cL,parseInt:fL,repeat:DL,replace:FL,snakeCase:KL,split:uP,startCase:fP,startsWith:hP,template:LP,templateSettings:Qg,toLower:DP,toUpper:OP,trim:jP,trimEnd:UP,trimStart:qP,truncate:VP,unescape:YP,upperCase:iR,upperFirst:nm,words:o_};var $s={attempt:e_,bindAll:z8,cond:vC,conforms:gC,constant:G0,defaultTo:MC,flow:d7,flowRight:p7,identity:wl,iteratee:d9,matches:M9,matchesProperty:S9,method:R9,methodOf:I9,mixin:Q_,noop:U0,nthArg:j9,over:X9,overEvery:K9,overSome:J9,property:E_,propertyOf:gL,range:SL,rangeRight:EL,stubArray:cm,stubFalse:Z0,stubObject:dP,stubString:pP,stubTrue:vP,times:RP,toPath:FP,uniqueId:tR};function pde(){var oe=new fs(this.__wrapped__);return oe.__actions__=iu(this.__actions__),oe.__dir__=this.__dir__,oe.__filtered__=this.__filtered__,oe.__iteratees__=iu(this.__iteratees__),oe.__takeCount__=this.__takeCount__,oe.__views__=iu(this.__views__),oe}var _R=pde;function vde(){if(this.__filtered__){var oe=new fs(this);oe.__dir__=-1,oe.__filtered__=!0}else oe=this.clone(),oe.__dir__*=-1;return oe}var xR=vde;var mde=Math.max,gde=Math.min;function yde(oe,ye,Fe){for(var dt=-1,Zt=Fe.length;++dt0||ye<0)?new fs(Fe):(oe<0?Fe=Fe.takeRight(-oe):oe&&(Fe=Fe.drop(oe)),ye!==void 0&&(ye=ji(ye),Fe=ye<0?Fe.dropRight(-ye):Fe.take(ye-oe)),Fe)};fs.prototype.takeRightWhile=function(oe){return this.reverse().takeWhile(oe).reverse()};fs.prototype.toArray=function(){return this.take(MR)};Df(fs.prototype,function(oe,ye){var Fe=/^(?:filter|find|map|reject)|While$/.test(ye),dt=/^(?:head|last)$/.test(ye),Zt=Ur[dt?"take"+(ye=="last"?"Right":""):ye],yr=dt||/^find/.test(ye);Zt&&(Ur.prototype[ye]=function(){var Xr=this.__wrapped__,ga=dt?[1]:arguments,ya=Xr instanceof fs,Cn=ga[0],xn=ya||Ii(Xr),On=function(zi){var ze=Zt.apply(Ur,vh([zi],ga));return dt&&Fi?ze[0]:ze};xn&&Fe&&typeof Cn=="function"&&Cn.length!=1&&(ya=xn=!1);var Fi=this.__chain__,ho=!!this.__actions__.length,Li=yr&&!Fi,lo=ya&&!ho;if(!yr&&xn){Xr=lo?Xr:new fs(this);var Lo=oe.apply(Xr,ga);return Lo.__actions__.push({func:rp,args:[On],thisArg:void 0}),new dh(Lo,Fi)}return Li&&lo?oe.apply(this,ga):(Lo=this.thru(On),Li?dt?Lo.value()[0]:Lo.value():Lo)})});af(["pop","push","shift","sort","splice","unshift"],function(oe){var ye=Ede[oe],Fe=/^(?:push|sort|unshift)$/.test(oe)?"tap":"thru",dt=/^(?:pop|shift)$/.test(oe);Ur.prototype[oe]=function(){var Zt=arguments;if(dt&&!this.__chain__){var yr=this.value();return ye.apply(Ii(yr)?yr:[],Zt)}return this[Fe](function(Xr){return ye.apply(Ii(Xr)?Xr:[],Zt)})}});Df(fs.prototype,function(oe,ye){var Fe=Ur[ye];if(Fe){var dt=Fe.name+"";SR.call(Lp,dt)||(Lp[dt]=[]),Lp[dt].push({name:ye,func:Fe})}});Lp[Y0(void 0,Ade).name]=[{name:"wrapper",func:void 0}];fs.prototype.clone=_R;fs.prototype.reverse=xR;fs.prototype.value=wR;Ur.prototype.at=td.at;Ur.prototype.chain=td.wrapperChain;Ur.prototype.commit=td.commit;Ur.prototype.next=td.next;Ur.prototype.plant=td.plant;Ur.prototype.reverse=td.reverse;Ur.prototype.toJSON=Ur.prototype.valueOf=Ur.prototype.value=td.value;Ur.prototype.first=Ur.prototype.head;TR&&(Ur.prototype[TR]=td.toIterator);var Wl=Ur;var rd=SX(CR());window.PlotlyConfig={MathJaxConfig:"local"};var Sw=class{constructor(ye,Fe){this.model=ye,this.serializers=Fe}get(ye){let Fe=this.serializers[ye],dt=this.model.get(ye);return Fe?.deserialize?Fe.deserialize(dt):dt}set(ye,Fe){let dt=this.serializers[ye];dt?.serialize&&(Fe=dt.serialize(Fe)),this.model.set(ye,Fe)}on(ye,Fe){this.model.on(ye,Fe)}save_changes(){this.model.save_changes()}defaults(){return{_widget_data:[],_widget_layout:{},_config:{},_py2js_addTraces:null,_py2js_deleteTraces:null,_py2js_moveTraces:null,_py2js_restyle:null,_py2js_relayout:null,_py2js_update:null,_py2js_animate:null,_py2js_removeLayoutProps:null,_py2js_removeTraceProps:null,_js2py_restyle:null,_js2py_relayout:null,_js2py_update:null,_js2py_layoutDelta:null,_js2py_traceDeltas:null,_js2py_pointsCallback:null,_last_layout_edit_id:0,_last_trace_edit_id:0}}initialize(){this.model.on("change:_widget_data",()=>this.do_data()),this.model.on("change:_widget_layout",()=>this.do_layout()),this.model.on("change:_py2js_addTraces",()=>this.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),this.model.on("change:_py2js_removeLayoutProps",()=>this.do_removeLayoutProps()),this.model.on("change:_py2js_removeTraceProps",()=>this.do_removeTraceProps())}_normalize_trace_indexes(ye){if(ye==null){var Fe=this.model.get("_widget_data").length;ye=Wl.range(Fe)}return Array.isArray(ye)||(ye=[ye]),ye}do_data(){}do_layout(){}do_addTraces(){var ye=this.model.get("_py2js_addTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.trace_data;Wl.forEach(dt,function(Zt){Fe.push(Zt)})}}do_deleteTraces(){var ye=this.model.get("_py2js_deleteTraces");if(ye!==null){var Fe=ye.delete_inds,dt=this.model.get("_widget_data");Fe.slice().reverse().forEach(function(Zt){dt.splice(Zt,1)})}}do_moveTraces(){var ye=this.model.get("_py2js_moveTraces");if(ye!==null){var Fe=this.model.get("_widget_data"),dt=ye.current_trace_inds,Zt=ye.new_trace_inds;Dde(Fe,dt,Zt)}}do_restyle(){var ye=this.model.get("_py2js_restyle");if(ye!==null){var Fe=ye.restyle_data,dt=this._normalize_trace_indexes(ye.restyle_traces);PR(this.model.get("_widget_data"),Fe,dt)}}do_relayout(){var ye=this.model.get("_py2js_relayout");ye!==null&&wx(this.model.get("_widget_layout"),ye.relayout_data)}do_update(){var ye=this.model.get("_py2js_update");if(ye!==null){var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces);PR(this.model.get("_widget_data"),Fe,Zt),wx(this.model.get("_widget_layout"),dt)}}do_animate(){var ye=this.model.get("_py2js_animate");if(ye!==null){for(var Fe=ye.style_data,dt=ye.layout_data,Zt=this._normalize_trace_indexes(ye.style_traces),yr=0;yrthis.do_addTraces()),this.model.on("change:_py2js_deleteTraces",()=>this.do_deleteTraces()),this.model.on("change:_py2js_moveTraces",()=>this.do_moveTraces()),this.model.on("change:_py2js_restyle",()=>this.do_restyle()),this.model.on("change:_py2js_relayout",()=>this.do_relayout()),this.model.on("change:_py2js_update",()=>this.do_update()),this.model.on("change:_py2js_animate",()=>this.do_animate()),window?.MathJax?.Hub?.Config?.({SVG:{font:"STIX-Web"}});var Fe=this.model.get("_last_layout_edit_id"),dt=this.model.get("_last_trace_edit_id");this.viewID=IR();var Zt=Wl.cloneDeep(this.model.get("_widget_data")),yr=Wl.cloneDeep(this.model.get("_widget_layout"));yr.height||(yr.height=360);var Xr=this.model.get("_config");Xr.editSelection=!1,rd.default.newPlot(ye.el,Zt,yr,Xr).then(function(){ye._sendTraceDeltas(dt),ye._sendLayoutDelta(Fe),ye.el.on("plotly_restyle",function(ya){ye.handle_plotly_restyle(ya)}),ye.el.on("plotly_relayout",function(ya){ye.handle_plotly_relayout(ya)}),ye.el.on("plotly_update",function(ya){ye.handle_plotly_update(ya)}),ye.el.on("plotly_click",function(ya){ye.handle_plotly_click(ya)}),ye.el.on("plotly_hover",function(ya){ye.handle_plotly_hover(ya)}),ye.el.on("plotly_unhover",function(ya){ye.handle_plotly_unhover(ya)}),ye.el.on("plotly_selected",function(ya){ye.handle_plotly_selected(ya)}),ye.el.on("plotly_deselect",function(ya){ye.handle_plotly_deselect(ya)}),ye.el.on("plotly_doubleclick",function(ya){ye.handle_plotly_doubleclick(ya)});var ga=new CustomEvent("plotlywidget-after-render",{detail:{element:ye.el,viewID:ye.viewID}});document.dispatchEvent(ga)})}_processLuminoMessage(ye,Fe){Fe.apply(this,arguments);var dt=this;switch(ye.type){case"before-attach":var Zt={showgrid:!1,showline:!1,tickvals:[]};rd.default.newPlot(dt.el,[],{xaxis:Zt,yaxis:Zt}),this.resizeEventListener=()=>{this.autosizeFigure()},window.addEventListener("resize",this.resizeEventListener);break;case"after-attach":this.perform_render();break;case"after-show":case"resize":this.autosizeFigure();break}}autosizeFigure(){var ye=this,Fe=ye.model.get("_widget_layout");(Wl.isNil(Fe)||Wl.isNil(Fe.width))&&rd.default.Plots.resize(ye.el).then(function(){var dt=ye.model.get("_last_layout_edit_id");ye._sendLayoutDelta(dt)})}remove(){rd.default.purge(this.el),window.removeEventListener("resize",this.resizeEventListener)}getFullData(){return Wl.mergeWith({},this.el._fullData,this.el.data,LR)}getFullLayout(){return Wl.mergeWith({},this.el._fullLayout,this.el.layout,LR)}buildPointsObject(ye){var Fe;if(ye.hasOwnProperty("points")){var dt=ye.points,Zt=dt.length,yr=!0;for(let xn=0;xn=0;Zt--)dt.splice(0,0,oe[ye[Zt]]),oe.splice(ye[Zt],1);var yr=Wl(Fe).zip(dt).sortBy(0).unzip().value();Fe=yr[0],dt=yr[1];for(var Xr=0;Xr0&&typeof yr[0]=="object"){Fe[dt]=new Array(yr.length);for(var Xr=0;Xr0&&(Fe[dt]=ga)}else typeof yr=="object"&&!Array.isArray(yr)?Fe[dt]=t1(yr,{}):yr!==void 0&&typeof yr!="function"&&(Fe[dt]=yr)}}return Fe}function IR(oe,ye,Fe,dt){if(Fe||(Fe=16),ye===void 0&&(ye=24),ye<=0)return"0";var Zt=Math.log(Math.pow(2,ye))/Math.log(Fe),yr="",Xr,ga,ya;for(Xr=2;Zt===1/0;Xr*=2)Zt=Math.log(Math.pow(2,ye/Xr))/Math.log(Fe)*Xr;var Cn=Zt-Math.floor(Zt);for(Xr=0;Xr=Math.pow(2,ye)?dt>10?(console.warn("randstr failed uniqueness"),yr):IR(oe,ye,Fe,(dt||0)+1):yr}var XWe=()=>{let oe;return{initialize(ye){oe=new Sw(ye.model,Lde),oe.initialize()},render({el:ye}){let Fe=new Ew(oe,ye);return Fe.perform_render(),()=>Fe.remove()}}};export{Sw as FigureModel,Ew as FigureView,XWe as default}; /*! Bundled license information: plotly.js/dist/plotly.js: @@ -3380,7 +3601,7 @@ plotly.js/dist/plotly.js: maplibre-gl/dist/maplibre-gl.js: (** * MapLibre GL JS - * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.7.1/LICENSE.txt + * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.24.0/LICENSE.txt *) *) diff --git a/plotly/validators/_validators.json b/plotly/validators/_validators.json index 99e3b1b972..9e9c01be62 100644 --- a/plotly/validators/_validators.json +++ b/plotly/validators/_validators.json @@ -65018,6 +65018,18 @@ }, "superclass": "IntegerValidator" }, + "sankey.direction": { + "params": { + "plotly_name": "direction", + "parent_name": "sankey", + "edit_type": "calc", + "values": [ + "forward", + "reversed" + ] + }, + "superclass": "EnumeratedValidator" + }, "sankey.customdata": { "params": { "plotly_name": "customdata", @@ -65398,27 +65410,6 @@ }, "superclass": "StringValidator" }, - "quiver.sizeref": { - "params": { - "plotly_name": "sizeref", - "parent_name": "quiver", - "edit_type": "calc", - "min": 0 - }, - "superclass": "NumberValidator" - }, - "quiver.sizemode": { - "params": { - "plotly_name": "sizemode", - "parent_name": "quiver", - "edit_type": "calc", - "values": [ - "scaled", - "raw" - ] - }, - "superclass": "EnumeratedValidator" - }, "quiver.showlegend": { "params": { "plotly_name": "showlegend", @@ -66456,6 +66447,27 @@ }, "superclass": "NumberValidator" }, + "quiver.lengthmode": { + "params": { + "plotly_name": "lengthmode", + "parent_name": "quiver", + "edit_type": "calc", + "values": [ + "scaled", + "raw" + ] + }, + "superclass": "EnumeratedValidator" + }, + "quiver.lengthfactor": { + "params": { + "plotly_name": "lengthfactor", + "parent_name": "quiver", + "edit_type": "calc", + "min": 0 + }, + "superclass": "NumberValidator" + }, "quiver.legendwidth": { "params": { "plotly_name": "legendwidth", @@ -66873,9 +66885,9 @@ }, "superclass": "DataArrayValidator" }, - "quiver.anglemode": { + "quiver.arrowref": { "params": { - "plotly_name": "anglemode", + "plotly_name": "arrowref", "parent_name": "quiver", "edit_type": "calc", "values": [ diff --git a/tests/test_plotly_utils/validators/test_color_validator.py b/tests/test_plotly_utils/validators/test_color_validator.py index ee29318b85..83d8d152b8 100644 --- a/tests/test_plotly_utils/validators/test_color_validator.py +++ b/tests/test_plotly_utils/validators/test_color_validator.py @@ -50,10 +50,13 @@ def validator_aok_colorscale(): "hsla(0, 100%, 50%, 100%)", "hsla(0 100% 50% 100%)", "hsla(0deg 100% 50% 100%)", - "hwb(0, 100%, 50%)", "hwb(0 100% 50%)", - "hwb(0, 100%, 50%, 0.5)", "hwb(0 100% 50% 0.5)", + "oklch(0.7 0.15 180)", + "oklab(0.7 0.15 0.5)", + "lab(70 15 50)", + "lch(70 15 180)", + "color(display-p3 1 0 0)", ] INVALID_COLORS_WRONG_TYPE = [